var NR=Object.defineProperty;var d4=e=>{throw TypeError(e)};var kR=(e,t,n)=>t in e?NR(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var ge=(e,t,n)=>kR(e,typeof t!="symbol"?t+"":t,n),_1=(e,t,n)=>t.has(e)||d4("Cannot "+n);var X=(e,t,n)=>(_1(e,t,"read from private field"),n?n.call(e):t.get(e)),vt=(e,t,n)=>t.has(e)?d4("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),Se=(e,t,n,i)=>(_1(e,t,"write to private field"),i?i.call(e,n):t.set(e,n),n),Ee=(e,t,n)=>(_1(e,t,"access private method"),n);function ER(e,t){for(var n=0;n<t.length;n++){const i=t[n];if(typeof i!="string"&&!Array.isArray(i)){for(const s in i)if(s!=="default"&&!(s in e)){const r=Object.getOwnPropertyDescriptor(i,s);r&&Object.defineProperty(e,s,r.get?r:{enumerable:!0,get:()=>i[s]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const s of document.querySelectorAll('link[rel="modulepreload"]'))i(s);new MutationObserver(s=>{for(const r of s)if(r.type==="childList")for(const a of r.addedNodes)a.tagName==="LINK"&&a.rel==="modulepreload"&&i(a)}).observe(document,{childList:!0,subtree:!0});function n(s){const r={};return s.integrity&&(r.integrity=s.integrity),s.referrerPolicy&&(r.referrerPolicy=s.referrerPolicy),s.crossOrigin==="use-credentials"?r.credentials="include":s.crossOrigin==="anonymous"?r.credentials="omit":r.credentials="same-origin",r}function i(s){if(s.ep)return;s.ep=!0;const r=n(s);fetch(s.href,r)}})();var In=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function yp(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function AR(e){if(e.__esModule)return e;var t=e.default;if(typeof t=="function"){var n=function i(){return this instanceof i?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach(function(i){var s=Object.getOwnPropertyDescriptor(e,i);Object.defineProperty(n,i,s.get?s:{enumerable:!0,get:function(){return e[i]}})}),n}var G5={exports:{}},_p={};/**
 * @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 OR=Symbol.for("react.transitional.element"),DR=Symbol.for("react.fragment");function Y5(e,t,n){var i=null;if(n!==void 0&&(i=""+n),t.key!==void 0&&(i=""+t.key),"key"in t){n={};for(var s in t)s!=="key"&&(n[s]=t[s])}else n=t;return t=n.ref,{$$typeof:OR,type:e,key:i,ref:t!==void 0?t:null,props:n}}_p.Fragment=DR;_p.jsx=Y5;_p.jsxs=Y5;G5.exports=_p;var u=G5.exports,q5={exports:{}},He={};/**
 * @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 e_=Symbol.for("react.transitional.element"),PR=Symbol.for("react.portal"),RR=Symbol.for("react.fragment"),LR=Symbol.for("react.strict_mode"),zR=Symbol.for("react.profiler"),IR=Symbol.for("react.consumer"),BR=Symbol.for("react.context"),VR=Symbol.for("react.forward_ref"),HR=Symbol.for("react.suspense"),FR=Symbol.for("react.memo"),X5=Symbol.for("react.lazy"),f4=Symbol.iterator;function UR(e){return e===null||typeof e!="object"?null:(e=f4&&e[f4]||e["@@iterator"],typeof e=="function"?e:null)}var K5={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},Q5=Object.assign,J5={};function Kc(e,t,n){this.props=e,this.context=t,this.refs=J5,this.updater=n||K5}Kc.prototype.isReactComponent={};Kc.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=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,e,t,"setState")};Kc.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function eM(){}eM.prototype=Kc.prototype;function t_(e,t,n){this.props=e,this.context=t,this.refs=J5,this.updater=n||K5}var n_=t_.prototype=new eM;n_.constructor=t_;Q5(n_,Kc.prototype);n_.isPureReactComponent=!0;var h4=Array.isArray,zt={H:null,A:null,T:null,S:null},tM=Object.prototype.hasOwnProperty;function i_(e,t,n,i,s,r,a){return n=a.ref,{$$typeof:e_,type:e,key:t,ref:n!==void 0?n:null,props:a}}function ZR(e,t){return i_(e.type,t,null,void 0,void 0,void 0,e.props)}function s_(e){return typeof e=="object"&&e!==null&&e.$$typeof===e_}function $R(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(n){return t[n]})}var m4=/\/+/g;function b1(e,t){return typeof e=="object"&&e!==null&&e.key!=null?$R(""+e.key):t.toString(36)}function g4(){}function WR(e){switch(e.status){case"fulfilled":return e.value;case"rejected":throw e.reason;default:switch(typeof e.status=="string"?e.then(g4,g4):(e.status="pending",e.then(function(t){e.status==="pending"&&(e.status="fulfilled",e.value=t)},function(t){e.status==="pending"&&(e.status="rejected",e.reason=t)})),e.status){case"fulfilled":return e.value;case"rejected":throw e.reason}}throw e}function Ll(e,t,n,i,s){var r=typeof e;(r==="undefined"||r==="boolean")&&(e=null);var a=!1;if(e===null)a=!0;else switch(r){case"bigint":case"string":case"number":a=!0;break;case"object":switch(e.$$typeof){case e_:case PR:a=!0;break;case X5:return a=e._init,Ll(a(e._payload),t,n,i,s)}}if(a)return s=s(e),a=i===""?"."+b1(e,0):i,h4(s)?(n="",a!=null&&(n=a.replace(m4,"$&/")+"/"),Ll(s,t,n,"",function(d){return d})):s!=null&&(s_(s)&&(s=ZR(s,n+(s.key==null||e&&e.key===s.key?"":(""+s.key).replace(m4,"$&/")+"/")+a)),t.push(s)),1;a=0;var o=i===""?".":i+":";if(h4(e))for(var c=0;c<e.length;c++)i=e[c],r=o+b1(i,c),a+=Ll(i,t,n,r,s);else if(c=UR(e),typeof c=="function")for(e=c.call(e),c=0;!(i=e.next()).done;)i=i.value,r=o+b1(i,c++),a+=Ll(i,t,n,r,s);else if(r==="object"){if(typeof e.then=="function")return Ll(WR(e),t,n,i,s);throw t=String(e),Error("Objects are not valid as a React child (found: "+(t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.")}return a}function Sh(e,t,n){if(e==null)return e;var i=[],s=0;return Ll(e,i,"","",function(r){return t.call(n,r,s++)}),i}function GR(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(n){(e._status===0||e._status===-1)&&(e._status=1,e._result=n)},function(n){(e._status===0||e._status===-1)&&(e._status=2,e._result=n)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var p4=typeof reportError=="function"?reportError:function(e){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var t=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof e=="object"&&e!==null&&typeof e.message=="string"?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",e);return}console.error(e)};function YR(){}He.Children={map:Sh,forEach:function(e,t,n){Sh(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return Sh(e,function(){t++}),t},toArray:function(e){return Sh(e,function(t){return t})||[]},only:function(e){if(!s_(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};He.Component=Kc;He.Fragment=RR;He.Profiler=zR;He.PureComponent=t_;He.StrictMode=LR;He.Suspense=HR;He.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=zt;He.act=function(){throw Error("act(...) is not supported in production builds of React.")};He.cache=function(e){return function(){return e.apply(null,arguments)}};He.cloneElement=function(e,t,n){if(e==null)throw Error("The argument must be a React element, but you passed "+e+".");var i=Q5({},e.props),s=e.key,r=void 0;if(t!=null)for(a in t.ref!==void 0&&(r=void 0),t.key!==void 0&&(s=""+t.key),t)!tM.call(t,a)||a==="key"||a==="__self"||a==="__source"||a==="ref"&&t.ref===void 0||(i[a]=t[a]);var a=arguments.length-2;if(a===1)i.children=n;else if(1<a){for(var o=Array(a),c=0;c<a;c++)o[c]=arguments[c+2];i.children=o}return i_(e.type,s,null,void 0,void 0,r,i)};He.createContext=function(e){return e={$$typeof:BR,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null},e.Provider=e,e.Consumer={$$typeof:IR,_context:e},e};He.createElement=function(e,t,n){var i,s={},r=null;if(t!=null)for(i in t.key!==void 0&&(r=""+t.key),t)tM.call(t,i)&&i!=="key"&&i!=="__self"&&i!=="__source"&&(s[i]=t[i]);var a=arguments.length-2;if(a===1)s.children=n;else if(1<a){for(var o=Array(a),c=0;c<a;c++)o[c]=arguments[c+2];s.children=o}if(e&&e.defaultProps)for(i in a=e.defaultProps,a)s[i]===void 0&&(s[i]=a[i]);return i_(e,r,null,void 0,void 0,null,s)};He.createRef=function(){return{current:null}};He.forwardRef=function(e){return{$$typeof:VR,render:e}};He.isValidElement=s_;He.lazy=function(e){return{$$typeof:X5,_payload:{_status:-1,_result:e},_init:GR}};He.memo=function(e,t){return{$$typeof:FR,type:e,compare:t===void 0?null:t}};He.startTransition=function(e){var t=zt.T,n={};zt.T=n;try{var i=e(),s=zt.S;s!==null&&s(n,i),typeof i=="object"&&i!==null&&typeof i.then=="function"&&i.then(YR,p4)}catch(r){p4(r)}finally{zt.T=t}};He.unstable_useCacheRefresh=function(){return zt.H.useCacheRefresh()};He.use=function(e){return zt.H.use(e)};He.useActionState=function(e,t,n){return zt.H.useActionState(e,t,n)};He.useCallback=function(e,t){return zt.H.useCallback(e,t)};He.useContext=function(e){return zt.H.useContext(e)};He.useDebugValue=function(){};He.useDeferredValue=function(e,t){return zt.H.useDeferredValue(e,t)};He.useEffect=function(e,t){return zt.H.useEffect(e,t)};He.useId=function(){return zt.H.useId()};He.useImperativeHandle=function(e,t,n){return zt.H.useImperativeHandle(e,t,n)};He.useInsertionEffect=function(e,t){return zt.H.useInsertionEffect(e,t)};He.useLayoutEffect=function(e,t){return zt.H.useLayoutEffect(e,t)};He.useMemo=function(e,t){return zt.H.useMemo(e,t)};He.useOptimistic=function(e,t){return zt.H.useOptimistic(e,t)};He.useReducer=function(e,t,n){return zt.H.useReducer(e,t,n)};He.useRef=function(e){return zt.H.useRef(e)};He.useState=function(e){return zt.H.useState(e)};He.useSyncExternalStore=function(e,t,n){return zt.H.useSyncExternalStore(e,t,n)};He.useTransition=function(){return zt.H.useTransition()};He.version="19.0.0-rc-941e1b4a-20240729";q5.exports=He;var x=q5.exports;const ae=yp(x),nM=ER({__proto__:null,default:ae},[x]);var iM={exports:{}},bp={},sM={exports:{}},rM={};/**
 * @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.
 */(function(e){function t(R,$){var B=R.length;R.push($);e:for(;0<B;){var W=B-1>>>1,G=R[W];if(0<s(G,$))R[W]=$,R[B]=G,B=W;else break e}}function n(R){return R.length===0?null:R[0]}function i(R){if(R.length===0)return null;var $=R[0],B=R.pop();if(B!==$){R[0]=B;e:for(var W=0,G=R.length,ie=G>>>1;W<ie;){var se=2*(W+1)-1,Le=R[se],je=se+1,be=R[je];if(0>s(Le,B))je<G&&0>s(be,Le)?(R[W]=be,R[je]=B,W=je):(R[W]=Le,R[se]=B,W=se);else if(je<G&&0>s(be,B))R[W]=be,R[je]=B,W=je;else break e}}return $}function s(R,$){var B=R.sortIndex-$.sortIndex;return B!==0?B:R.id-$.id}if(e.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var r=performance;e.unstable_now=function(){return r.now()}}else{var a=Date,o=a.now();e.unstable_now=function(){return a.now()-o}}var c=[],d=[],h=1,m=null,g=3,v=!1,b=!1,w=!1,M=typeof setTimeout=="function"?setTimeout:null,y=typeof clearTimeout=="function"?clearTimeout:null,S=typeof setImmediate<"u"?setImmediate:null;function T(R){for(var $=n(d);$!==null;){if($.callback===null)i(d);else if($.startTime<=R)i(d),$.sortIndex=$.expirationTime,t(c,$);else break;$=n(d)}}function N(R){if(w=!1,T(R),!b)if(n(c)!==null)b=!0,Q();else{var $=n(d);$!==null&&U(N,$.startTime-R)}}var k=!1,E=-1,D=5,O=-1;function I(){return!(e.unstable_now()-O<D)}function P(){if(k){var R=e.unstable_now();O=R;var $=!0;try{e:{b=!1,w&&(w=!1,y(E),E=-1),v=!0;var B=g;try{t:{for(T(R),m=n(c);m!==null&&!(m.expirationTime>R&&I());){var W=m.callback;if(typeof W=="function"){m.callback=null,g=m.priorityLevel;var G=W(m.expirationTime<=R);if(R=e.unstable_now(),typeof G=="function"){m.callback=G,T(R),$=!0;break t}m===n(c)&&i(c),T(R)}else i(c);m=n(c)}if(m!==null)$=!0;else{var ie=n(d);ie!==null&&U(N,ie.startTime-R),$=!1}}break e}finally{m=null,g=B,v=!1}$=void 0}}finally{$?H():k=!1}}}var H;if(typeof S=="function")H=function(){S(P)};else if(typeof MessageChannel<"u"){var V=new MessageChannel,J=V.port2;V.port1.onmessage=P,H=function(){J.postMessage(null)}}else H=function(){M(P,0)};function Q(){k||(k=!0,H())}function U(R,$){E=M(function(){R(e.unstable_now())},$)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(R){R.callback=null},e.unstable_continueExecution=function(){b||v||(b=!0,Q())},e.unstable_forceFrameRate=function(R){0>R||125<R?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):D=0<R?Math.floor(1e3/R):5},e.unstable_getCurrentPriorityLevel=function(){return g},e.unstable_getFirstCallbackNode=function(){return n(c)},e.unstable_next=function(R){switch(g){case 1:case 2:case 3:var $=3;break;default:$=g}var B=g;g=$;try{return R()}finally{g=B}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(R,$){switch(R){case 1:case 2:case 3:case 4:case 5:break;default:R=3}var B=g;g=R;try{return $()}finally{g=B}},e.unstable_scheduleCallback=function(R,$,B){var W=e.unstable_now();switch(typeof B=="object"&&B!==null?(B=B.delay,B=typeof B=="number"&&0<B?W+B:W):B=W,R){case 1:var G=-1;break;case 2:G=250;break;case 5:G=1073741823;break;case 4:G=1e4;break;default:G=5e3}return G=B+G,R={id:h++,callback:$,priorityLevel:R,startTime:B,expirationTime:G,sortIndex:-1},B>W?(R.sortIndex=B,t(d,R),n(c)===null&&R===n(d)&&(w?(y(E),E=-1):w=!0,U(N,B-W))):(R.sortIndex=G,t(c,R),b||v||(b=!0,Q())),R},e.unstable_shouldYield=I,e.unstable_wrapCallback=function(R){var $=g;return function(){var B=g;g=$;try{return R.apply(this,arguments)}finally{g=B}}}})(rM);sM.exports=rM;var qR=sM.exports,aM={exports:{}},Fn={};/**
 * @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 XR=x;function oM(e){var t="https://react.dev/errors/"+e;if(1<arguments.length){t+="?args[]="+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n])}return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function Fr(){}var Bn={d:{f:Fr,r:function(){throw Error(oM(522))},D:Fr,C:Fr,L:Fr,m:Fr,X:Fr,S:Fr,M:Fr},p:0,findDOMNode:null},KR=Symbol.for("react.portal");function QR(e,t,n){var i=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:KR,key:i==null?null:""+i,children:e,containerInfo:t,implementation:n}}var vd=XR.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function wp(e,t){if(e==="font")return"";if(typeof t=="string")return t==="use-credentials"?t:""}Fn.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=Bn;Fn.createPortal=function(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11)throw Error(oM(299));return QR(e,t,null,n)};Fn.flushSync=function(e){var t=vd.T,n=Bn.p;try{if(vd.T=null,Bn.p=2,e)return e()}finally{vd.T=t,Bn.p=n,Bn.d.f()}};Fn.preconnect=function(e,t){typeof e=="string"&&(t?(t=t.crossOrigin,t=typeof t=="string"?t==="use-credentials"?t:"":void 0):t=null,Bn.d.C(e,t))};Fn.prefetchDNS=function(e){typeof e=="string"&&Bn.d.D(e)};Fn.preinit=function(e,t){if(typeof e=="string"&&t&&typeof t.as=="string"){var n=t.as,i=wp(n,t.crossOrigin),s=typeof t.integrity=="string"?t.integrity:void 0,r=typeof t.fetchPriority=="string"?t.fetchPriority:void 0;n==="style"?Bn.d.S(e,typeof t.precedence=="string"?t.precedence:void 0,{crossOrigin:i,integrity:s,fetchPriority:r}):n==="script"&&Bn.d.X(e,{crossOrigin:i,integrity:s,fetchPriority:r,nonce:typeof t.nonce=="string"?t.nonce:void 0})}};Fn.preinitModule=function(e,t){if(typeof e=="string")if(typeof t=="object"&&t!==null){if(t.as==null||t.as==="script"){var n=wp(t.as,t.crossOrigin);Bn.d.M(e,{crossOrigin:n,integrity:typeof t.integrity=="string"?t.integrity:void 0,nonce:typeof t.nonce=="string"?t.nonce:void 0})}}else t==null&&Bn.d.M(e)};Fn.preload=function(e,t){if(typeof e=="string"&&typeof t=="object"&&t!==null&&typeof t.as=="string"){var n=t.as,i=wp(n,t.crossOrigin);Bn.d.L(e,n,{crossOrigin:i,integrity:typeof t.integrity=="string"?t.integrity:void 0,nonce:typeof t.nonce=="string"?t.nonce:void 0,type:typeof t.type=="string"?t.type:void 0,fetchPriority:typeof t.fetchPriority=="string"?t.fetchPriority:void 0,referrerPolicy:typeof t.referrerPolicy=="string"?t.referrerPolicy:void 0,imageSrcSet:typeof t.imageSrcSet=="string"?t.imageSrcSet:void 0,imageSizes:typeof t.imageSizes=="string"?t.imageSizes:void 0,media:typeof t.media=="string"?t.media:void 0})}};Fn.preloadModule=function(e,t){if(typeof e=="string")if(t){var n=wp(t.as,t.crossOrigin);Bn.d.m(e,{as:typeof t.as=="string"&&t.as!=="script"?t.as:void 0,crossOrigin:n,integrity:typeof t.integrity=="string"?t.integrity:void 0})}else Bn.d.m(e)};Fn.requestFormReset=function(e){Bn.d.r(e)};Fn.unstable_batchedUpdates=function(e,t){return e(t)};Fn.useFormState=function(e,t,n){return vd.H.useFormState(e,t,n)};Fn.useFormStatus=function(){return vd.H.useHostTransitionStatus()};Fn.version="19.0.0-rc-941e1b4a-20240729";function lM(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(lM)}catch(e){console.error(e)}}lM(),aM.exports=Fn;var Nf=aM.exports;const JR=yp(Nf);/**
 * @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 tn=qR,cM=x,eL=Nf;function ee(e){var t="https://react.dev/errors/"+e;if(1<arguments.length){t+="?args[]="+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n])}return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function uM(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}var tL=Symbol.for("react.element"),Ch=Symbol.for("react.transitional.element"),ed=Symbol.for("react.portal"),Ul=Symbol.for("react.fragment"),dM=Symbol.for("react.strict_mode"),Kv=Symbol.for("react.profiler"),nL=Symbol.for("react.provider"),fM=Symbol.for("react.consumer"),fr=Symbol.for("react.context"),r_=Symbol.for("react.forward_ref"),Qv=Symbol.for("react.suspense"),Jv=Symbol.for("react.suspense_list"),a_=Symbol.for("react.memo"),Jr=Symbol.for("react.lazy"),hM=Symbol.for("react.offscreen"),iL=Symbol.for("react.memo_cache_sentinel"),v4=Symbol.iterator;function Du(e){return e===null||typeof e!="object"?null:(e=v4&&e[v4]||e["@@iterator"],typeof e=="function"?e:null)}var sL=Symbol.for("react.client.reference");function ex(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===sL?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case Ul:return"Fragment";case ed:return"Portal";case Kv:return"Profiler";case dM:return"StrictMode";case Qv:return"Suspense";case Jv:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case fr:return(e.displayName||"Context")+".Provider";case fM:return(e._context.displayName||"Context")+".Consumer";case r_:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case a_:return t=e.displayName||null,t!==null?t:ex(e.type)||"Memo";case Jr:t=e._payload,e=e._init;try{return ex(e(t))}catch{}}return null}var Ie=cM.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,Mt=Object.assign,w1,x4;function td(e){if(w1===void 0)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);w1=t&&t[1]||"",x4=-1<n.stack.indexOf(`
    at`)?" (<anonymous>)":-1<n.stack.indexOf("@")?"@unknown:0:0":""}return`
`+w1+e+x4}var S1=!1;function C1(e,t){if(!e||S1)return"";S1=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var i={DetermineComponentFrameRoot:function(){try{if(t){var m=function(){throw Error()};if(Object.defineProperty(m.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(m,[])}catch(v){var g=v}Reflect.construct(e,[],m)}else{try{m.call()}catch(v){g=v}e.call(m.prototype)}}else{try{throw Error()}catch(v){g=v}(m=e())&&typeof m.catch=="function"&&m.catch(function(){})}}catch(v){if(v&&g&&typeof v.stack=="string")return[v.stack,g.stack]}return[null,null]}};i.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var s=Object.getOwnPropertyDescriptor(i.DetermineComponentFrameRoot,"name");s&&s.configurable&&Object.defineProperty(i.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});try{var r=i.DetermineComponentFrameRoot(),a=r[0],o=r[1];if(a&&o){var c=a.split(`
`),d=o.split(`
`);for(s=i=0;i<c.length&&!c[i].includes("DetermineComponentFrameRoot");)i++;for(;s<d.length&&!d[s].includes("DetermineComponentFrameRoot");)s++;if(i===c.length||s===d.length)for(i=c.length-1,s=d.length-1;1<=i&&0<=s&&c[i]!==d[s];)s--;for(;1<=i&&0<=s;i--,s--)if(c[i]!==d[s]){if(i!==1||s!==1)do if(i--,s--,0>s||c[i]!==d[s]){var h=`
`+c[i].replace(" at new "," at ");return e.displayName&&h.includes("<anonymous>")&&(h=h.replace("<anonymous>",e.displayName)),h}while(1<=i&&0<=s);break}}}finally{S1=!1,Error.prepareStackTrace=n}return(n=e?e.displayName||e.name:"")?td(n):""}function rL(e){switch(e.tag){case 26:case 27:case 5:return td(e.type);case 16:return td("Lazy");case 13:return td("Suspense");case 19:return td("SuspenseList");case 0:case 15:return e=C1(e.type,!1),e;case 11:return e=C1(e.type.render,!1),e;case 1:return e=C1(e.type,!0),e;default:return""}}function y4(e){try{var t="";do t+=rL(e),e=e.return;while(e);return t}catch(n){return`
Error generating stack: `+n.message+`
`+n.stack}}function Qc(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,t.flags&4098&&(n=t.return),e=t.return;while(e)}return t.tag===3?n:null}function mM(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function _4(e){if(Qc(e)!==e)throw Error(ee(188))}function aL(e){var t=e.alternate;if(!t){if(t=Qc(e),t===null)throw Error(ee(188));return t!==e?null:e}for(var n=e,i=t;;){var s=n.return;if(s===null)break;var r=s.alternate;if(r===null){if(i=s.return,i!==null){n=i;continue}break}if(s.child===r.child){for(r=s.child;r;){if(r===n)return _4(s),e;if(r===i)return _4(s),t;r=r.sibling}throw Error(ee(188))}if(n.return!==i.return)n=s,i=r;else{for(var a=!1,o=s.child;o;){if(o===n){a=!0,n=s,i=r;break}if(o===i){a=!0,i=s,n=r;break}o=o.sibling}if(!a){for(o=r.child;o;){if(o===n){a=!0,n=r,i=s;break}if(o===i){a=!0,i=r,n=s;break}o=o.sibling}if(!a)throw Error(ee(189))}}if(n.alternate!==i)throw Error(ee(190))}if(n.tag!==3)throw Error(ee(188));return n.stateNode.current===n?e:t}function gM(e){return e=aL(e),e!==null?pM(e):null}function pM(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=pM(e),t!==null)return t;e=e.sibling}return null}var nd=Array.isArray,Ct=eL.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,xd={pending:!1,data:null,method:null,action:null},tx=[],Zl=-1;function $s(e){return{current:e}}function ln(e){0>Zl||(e.current=tx[Zl],tx[Zl]=null,Zl--)}function kt(e,t){Zl++,tx[Zl]=e.current,e.current=t}var Ms=$s(null),Zd=$s(null),ya=$s(null),nx=$s(null),qm={$$typeof:fr,Provider:null,Consumer:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Xm(e,t){switch(kt(ya,t),kt(Zd,e),kt(Ms,null),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)&&(t=t.namespaceURI)?y3(t):0;break;default:if(e=e===8?t.parentNode:t,t=e.tagName,e=e.namespaceURI)e=y3(e),t=k8(e,t);else switch(t){case"svg":t=1;break;case"math":t=2;break;default:t=0}}ln(Ms),kt(Ms,t)}function Ec(){ln(Ms),ln(Zd),ln(ya)}function ix(e){e.memoizedState!==null&&kt(nx,e);var t=Ms.current,n=k8(t,e.type);t!==n&&(kt(Zd,e),kt(Ms,n))}function Km(e){Zd.current===e&&(ln(Ms),ln(Zd)),nx.current===e&&(ln(nx),qm._currentValue=null)}var sx=Object.prototype.hasOwnProperty,o_=tn.unstable_scheduleCallback,M1=tn.unstable_cancelCallback,oL=tn.unstable_shouldYield,lL=tn.unstable_requestPaint,Ts=tn.unstable_now,cL=tn.unstable_getCurrentPriorityLevel,l_=tn.unstable_ImmediatePriority,vM=tn.unstable_UserBlockingPriority,Qm=tn.unstable_NormalPriority,uL=tn.unstable_LowPriority,xM=tn.unstable_IdlePriority,dL=tn.log,fL=tn.unstable_setDisableYieldValue,kf=null,ui=null;function hL(e){if(ui&&typeof ui.onCommitFiberRoot=="function")try{ui.onCommitFiberRoot(kf,e,void 0,(e.current.flags&128)===128)}catch{}}function fa(e){if(typeof dL=="function"&&fL(e),ui&&typeof ui.setStrictMode=="function")try{ui.setStrictMode(kf,e)}catch{}}var Li=Math.clz32?Math.clz32:pL,mL=Math.log,gL=Math.LN2;function pL(e){return e>>>=0,e===0?32:31-(mL(e)/gL|0)|0}var Mh=128,Th=4194304;function id(e){var t=e&42;if(t!==0)return t;switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194176;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function Jm(e,t){var n=e.pendingLanes;if(n===0)return 0;var i=0,s=e.suspendedLanes;e=e.pingedLanes;var r=n&134217727;return r!==0?(n=r&~s,n!==0?i=id(n):(e&=r,e!==0&&(i=id(e)))):(n&=~s,n!==0?i=id(n):e!==0&&(i=id(e))),i===0?0:t!==0&&t!==i&&!(t&s)&&(s=i&-i,e=t&-t,s>=e||s===32&&(e&4194176)!==0)?t:i}function vL(e,t){switch(e){case 1:case 2:case 4:case 8:return t+250;case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function yM(e,t){return e.errorRecoveryDisabledLanes&t?0:(e=e.pendingLanes&-536870913,e!==0?e:e&536870912?536870912:0)}function _M(){var e=Mh;return Mh<<=1,!(Mh&4194176)&&(Mh=128),e}function bM(){var e=Th;return Th<<=1,!(Th&62914560)&&(Th=4194304),e}function T1(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function xL(e,t,n){var i=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.entangledLanes&=t,e.errorRecoveryDisabledLanes&=t,e.shellSuspendCounter=0,t=e.entanglements;for(var s=e.expirationTimes,r=e.hiddenUpdates;0<i;){var a=31-Li(i),o=1<<a;t[a]=0,s[a]=-1;var c=r[a];if(c!==null)for(r[a]=null,a=0;a<c.length;a++){var d=c[a];d!==null&&(d.lane&=-536870913)}i&=~o}n!==0&&wM(e,n,0)}function wM(e,t,n){e.pendingLanes|=t,e.suspendedLanes&=~t;var i=31-Li(t);e.entangledLanes|=t,e.entanglements[i]=e.entanglements[i]|1073741824|n&4194218}function SM(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var i=31-Li(n),s=1<<i;s&t|e[i]&t&&(e[i]|=t),n&=~s}}function CM(e){return e&=-e,2<e?8<e?e&134217727?32:268435456:8:2}function MM(){var e=Ct.p;return e!==0?e:(e=window.event,e===void 0?32:B8(e.type))}function yL(e,t){var n=Ct.p;try{return Ct.p=e,t()}finally{Ct.p=n}}var Ha=Math.random().toString(36).slice(2),Nn="__reactFiber$"+Ha,Vn="__reactProps$"+Ha,Jc="__reactContainer$"+Ha,rx="__reactEvents$"+Ha,_L="__reactListeners$"+Ha,bL="__reactHandles$"+Ha,b4="__reactResources$"+Ha,$d="__reactMarker$"+Ha;function c_(e){delete e[Nn],delete e[Vn],delete e[rx],delete e[_L],delete e[bL]}function _o(e){var t=e[Nn];if(t)return t;for(var n=e.parentNode;n;){if(t=n[Jc]||n[Nn]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=b3(e);e!==null;){if(n=e[Nn])return n;e=b3(e)}return t}e=n,n=e.parentNode}return null}function eu(e){if(e=e[Nn]||e[Jc]){var t=e.tag;if(t===5||t===6||t===13||t===26||t===27||t===3)return e}return null}function sd(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(ee(33))}function oc(e){var t=e[b4];return t||(t=e[b4]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function an(e){e[$d]=!0}var TM=new Set,jM={};function Jo(e,t){Ac(e,t),Ac(e+"Capture",t)}function Ac(e,t){for(jM[e]=t,e=0;e<t.length;e++)TM.add(t[e])}var Er=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),wL=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]*$"),w4={},S4={};function SL(e){return sx.call(S4,e)?!0:sx.call(w4,e)?!1:wL.test(e)?S4[e]=!0:(w4[e]=!0,!1)}function _m(e,t,n){if(SL(t))if(n===null)e.removeAttribute(t);else{switch(typeof n){case"undefined":case"function":case"symbol":e.removeAttribute(t);return;case"boolean":var i=t.toLowerCase().slice(0,5);if(i!=="data-"&&i!=="aria-"){e.removeAttribute(t);return}}e.setAttribute(t,""+n)}}function jh(e,t,n){if(n===null)e.removeAttribute(t);else{switch(typeof n){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(t);return}e.setAttribute(t,""+n)}}function Js(e,t,n,i){if(i===null)e.removeAttribute(n);else{switch(typeof i){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(n);return}e.setAttributeNS(t,n,""+i)}}function Mi(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function NM(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function CL(e){var t=NM(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),i=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var s=n.get,r=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return s.call(this)},set:function(a){i=""+a,r.call(this,a)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return i},setValue:function(a){i=""+a},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function eg(e){e._valueTracker||(e._valueTracker=CL(e))}function kM(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),i="";return e&&(i=NM(e)?e.checked?"true":"false":e.value),e=i,e!==n?(t.setValue(e),!0):!1}function tg(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}var ML=/[\n"\\]/g;function ki(e){return e.replace(ML,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function ax(e,t,n,i,s,r,a,o){e.name="",a!=null&&typeof a!="function"&&typeof a!="symbol"&&typeof a!="boolean"?e.type=a:e.removeAttribute("type"),t!=null?a==="number"?(t===0&&e.value===""||e.value!=t)&&(e.value=""+Mi(t)):e.value!==""+Mi(t)&&(e.value=""+Mi(t)):a!=="submit"&&a!=="reset"||e.removeAttribute("value"),t!=null?ox(e,a,Mi(t)):n!=null?ox(e,a,Mi(n)):i!=null&&e.removeAttribute("value"),s==null&&r!=null&&(e.defaultChecked=!!r),s!=null&&(e.checked=s&&typeof s!="function"&&typeof s!="symbol"),o!=null&&typeof o!="function"&&typeof o!="symbol"&&typeof o!="boolean"?e.name=""+Mi(o):e.removeAttribute("name")}function EM(e,t,n,i,s,r,a,o){if(r!=null&&typeof r!="function"&&typeof r!="symbol"&&typeof r!="boolean"&&(e.type=r),t!=null||n!=null){if(!(r!=="submit"&&r!=="reset"||t!=null))return;n=n!=null?""+Mi(n):"",t=t!=null?""+Mi(t):n,o||t===e.value||(e.value=t),e.defaultValue=t}i=i??s,i=typeof i!="function"&&typeof i!="symbol"&&!!i,e.checked=o?e.checked:!!i,e.defaultChecked=!!i,a!=null&&typeof a!="function"&&typeof a!="symbol"&&typeof a!="boolean"&&(e.name=a)}function ox(e,t,n){t==="number"&&tg(e.ownerDocument)===e||e.defaultValue===""+n||(e.defaultValue=""+n)}function lc(e,t,n,i){if(e=e.options,t){t={};for(var s=0;s<n.length;s++)t["$"+n[s]]=!0;for(n=0;n<e.length;n++)s=t.hasOwnProperty("$"+e[n].value),e[n].selected!==s&&(e[n].selected=s),s&&i&&(e[n].defaultSelected=!0)}else{for(n=""+Mi(n),t=null,s=0;s<e.length;s++){if(e[s].value===n){e[s].selected=!0,i&&(e[s].defaultSelected=!0);return}t!==null||e[s].disabled||(t=e[s])}t!==null&&(t.selected=!0)}}function AM(e,t,n){if(t!=null&&(t=""+Mi(t),t!==e.value&&(e.value=t),n==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=n!=null?""+Mi(n):""}function OM(e,t,n,i){if(t==null){if(i!=null){if(n!=null)throw Error(ee(92));if(nd(i)){if(1<i.length)throw Error(ee(93));i=i[0]}n=i}n==null&&(n=""),t=n}n=Mi(t),e.defaultValue=n,i=e.textContent,i===n&&i!==""&&i!==null&&(e.value=i)}function Oc(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var TL=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 C4(e,t,n){var i=t.indexOf("--")===0;n==null||typeof n=="boolean"||n===""?i?e.setProperty(t,""):t==="float"?e.cssFloat="":e[t]="":i?e.setProperty(t,n):typeof n!="number"||n===0||TL.has(t)?t==="float"?e.cssFloat=n:e[t]=(""+n).trim():e[t]=n+"px"}function DM(e,t,n){if(t!=null&&typeof t!="object")throw Error(ee(62));if(e=e.style,n!=null){for(var i in n)!n.hasOwnProperty(i)||t!=null&&t.hasOwnProperty(i)||(i.indexOf("--")===0?e.setProperty(i,""):i==="float"?e.cssFloat="":e[i]="");for(var s in t)i=t[s],t.hasOwnProperty(s)&&n[s]!==i&&C4(e,s,i)}else for(var r in t)t.hasOwnProperty(r)&&C4(e,r,t[r])}function u_(e){if(e.indexOf("-")===-1)return!1;switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var jL=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"]]),NL=/^[\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 bm(e){return NL.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}var lx=null;function d_(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var $l=null,cc=null;function M4(e){var t=eu(e);if(t&&(e=t.stateNode)){var n=e[Vn]||null;e:switch(e=t.stateNode,t.type){case"input":if(ax(e,n.value,n.defaultValue,n.defaultValue,n.checked,n.defaultChecked,n.type,n.name),t=n.name,n.type==="radio"&&t!=null){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll('input[name="'+ki(""+t)+'"][type="radio"]'),t=0;t<n.length;t++){var i=n[t];if(i!==e&&i.form===e.form){var s=i[Vn]||null;if(!s)throw Error(ee(90));ax(i,s.value,s.defaultValue,s.defaultValue,s.checked,s.defaultChecked,s.type,s.name)}}for(t=0;t<n.length;t++)i=n[t],i.form===e.form&&kM(i)}break e;case"textarea":AM(e,n.value,n.defaultValue);break e;case"select":t=n.value,t!=null&&lc(e,!!n.multiple,t,!1)}}}var j1=!1;function PM(e,t,n){if(j1)return e(t,n);j1=!0;try{var i=e(t);return i}finally{if(j1=!1,($l!==null||cc!==null)&&(Pp(),$l&&(t=$l,e=cc,cc=$l=null,M4(t),e)))for(t=0;t<e.length;t++)M4(e[t])}}function Wd(e,t){var n=e.stateNode;if(n===null)return null;var i=n[Vn]||null;if(i===null)return null;n=i[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(i=!i.disabled)||(e=e.type,i=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!i;break e;default:e=!1}if(e)return null;if(n&&typeof n!="function")throw Error(ee(231,t,typeof n));return n}var cx=!1;if(Er)try{var Pu={};Object.defineProperty(Pu,"passive",{get:function(){cx=!0}}),window.addEventListener("test",Pu,Pu),window.removeEventListener("test",Pu,Pu)}catch{cx=!1}var ha=null,f_=null,wm=null;function RM(){if(wm)return wm;var e,t=f_,n=t.length,i,s="value"in ha?ha.value:ha.textContent,r=s.length;for(e=0;e<n&&t[e]===s[e];e++);var a=n-e;for(i=1;i<=a&&t[n-i]===s[r-i];i++);return wm=s.slice(e,1<i?1-i:void 0)}function Sm(e){var t=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function Nh(){return!0}function T4(){return!1}function ei(e){function t(n,i,s,r,a){this._reactName=n,this._targetInst=s,this.type=i,this.nativeEvent=r,this.target=a,this.currentTarget=null;for(var o in e)e.hasOwnProperty(o)&&(n=e[o],this[o]=n?n(r):r[o]);return this.isDefaultPrevented=(r.defaultPrevented!=null?r.defaultPrevented:r.returnValue===!1)?Nh:T4,this.isPropagationStopped=T4,this}return Mt(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var n=this.nativeEvent;n&&(n.preventDefault?n.preventDefault():typeof n.returnValue!="unknown"&&(n.returnValue=!1),this.isDefaultPrevented=Nh)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=Nh)},persist:function(){},isPersistent:Nh}),t}var el={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Sp=ei(el),Ef=Mt({},el,{view:0,detail:0}),kL=ei(Ef),N1,k1,Ru,Cp=Mt({},Ef,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:h_,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==Ru&&(Ru&&e.type==="mousemove"?(N1=e.screenX-Ru.screenX,k1=e.screenY-Ru.screenY):k1=N1=0,Ru=e),N1)},movementY:function(e){return"movementY"in e?e.movementY:k1}}),j4=ei(Cp),EL=Mt({},Cp,{dataTransfer:0}),AL=ei(EL),OL=Mt({},Ef,{relatedTarget:0}),E1=ei(OL),DL=Mt({},el,{animationName:0,elapsedTime:0,pseudoElement:0}),PL=ei(DL),RL=Mt({},el,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),LL=ei(RL),zL=Mt({},el,{data:0}),N4=ei(zL),IL={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},BL={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"},VL={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function HL(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=VL[e])?!!t[e]:!1}function h_(){return HL}var FL=Mt({},Ef,{key:function(e){if(e.key){var t=IL[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=Sm(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?BL[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:h_,charCode:function(e){return e.type==="keypress"?Sm(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Sm(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),UL=ei(FL),ZL=Mt({},Cp,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),k4=ei(ZL),$L=Mt({},Ef,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:h_}),WL=ei($L),GL=Mt({},el,{propertyName:0,elapsedTime:0,pseudoElement:0}),YL=ei(GL),qL=Mt({},Cp,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),XL=ei(qL),KL=Mt({},el,{newState:0,oldState:0}),QL=ei(KL),JL=[9,13,27,32],m_=Er&&"CompositionEvent"in window,yd=null;Er&&"documentMode"in document&&(yd=document.documentMode);var e9=Er&&"TextEvent"in window&&!yd,LM=Er&&(!m_||yd&&8<yd&&11>=yd),E4=" ",A4=!1;function zM(e,t){switch(e){case"keyup":return JL.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function IM(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Wl=!1;function t9(e,t){switch(e){case"compositionend":return IM(t);case"keypress":return t.which!==32?null:(A4=!0,E4);case"textInput":return e=t.data,e===E4&&A4?null:e;default:return null}}function n9(e,t){if(Wl)return e==="compositionend"||!m_&&zM(e,t)?(e=RM(),wm=f_=ha=null,Wl=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return LM&&t.locale!=="ko"?null:t.data;default:return null}}var i9={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 O4(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!i9[e.type]:t==="textarea"}function BM(e,t,n,i){$l?cc?cc.push(i):cc=[i]:$l=i,t=vg(t,"onChange"),0<t.length&&(n=new Sp("onChange","change",null,n,i),e.push({event:n,listeners:t}))}var _d=null,Gd=null;function s9(e){T8(e,0)}function Mp(e){var t=sd(e);if(kM(t))return e}function D4(e,t){if(e==="change")return t}var VM=!1;if(Er){var A1;if(Er){var O1="oninput"in document;if(!O1){var P4=document.createElement("div");P4.setAttribute("oninput","return;"),O1=typeof P4.oninput=="function"}A1=O1}else A1=!1;VM=A1&&(!document.documentMode||9<document.documentMode)}function R4(){_d&&(_d.detachEvent("onpropertychange",HM),Gd=_d=null)}function HM(e){if(e.propertyName==="value"&&Mp(Gd)){var t=[];BM(t,Gd,e,d_(e)),PM(s9,t)}}function r9(e,t,n){e==="focusin"?(R4(),_d=t,Gd=n,_d.attachEvent("onpropertychange",HM)):e==="focusout"&&R4()}function a9(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return Mp(Gd)}function o9(e,t){if(e==="click")return Mp(t)}function l9(e,t){if(e==="input"||e==="change")return Mp(t)}function c9(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Ii=typeof Object.is=="function"?Object.is:c9;function Yd(e,t){if(Ii(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var n=Object.keys(e),i=Object.keys(t);if(n.length!==i.length)return!1;for(i=0;i<n.length;i++){var s=n[i];if(!sx.call(t,s)||!Ii(e[s],t[s]))return!1}return!0}function L4(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function z4(e,t){var n=L4(e);e=0;for(var i;n;){if(n.nodeType===3){if(i=e+n.textContent.length,e<=t&&i>=t)return{node:n,offset:t-e};e=i}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=L4(n)}}function FM(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?FM(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function UM(){for(var e=window,t=tg();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=tg(e.document)}return t}function g_(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function u9(e){var t=UM(),n=e.focusedElem,i=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&FM(n.ownerDocument.documentElement,n)){if(i!==null&&g_(n)){if(t=i.start,e=i.end,e===void 0&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var s=n.textContent.length,r=Math.min(i.start,s);i=i.end===void 0?r:Math.min(i.end,s),!e.extend&&r>i&&(s=i,i=r,r=s),s=z4(n,r);var a=z4(n,i);s&&a&&(e.rangeCount!==1||e.anchorNode!==s.node||e.anchorOffset!==s.offset||e.focusNode!==a.node||e.focusOffset!==a.offset)&&(t=t.createRange(),t.setStart(s.node,s.offset),e.removeAllRanges(),r>i?(e.addRange(t),e.extend(a.node,a.offset)):(t.setEnd(a.node,a.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n<t.length;n++)e=t[n],e.element.scrollLeft=e.left,e.element.scrollTop=e.top}}var d9=Er&&"documentMode"in document&&11>=document.documentMode,Gl=null,ux=null,bd=null,dx=!1;function I4(e,t,n){var i=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;dx||Gl==null||Gl!==tg(i)||(i=Gl,"selectionStart"in i&&g_(i)?i={start:i.selectionStart,end:i.selectionEnd}:(i=(i.ownerDocument&&i.ownerDocument.defaultView||window).getSelection(),i={anchorNode:i.anchorNode,anchorOffset:i.anchorOffset,focusNode:i.focusNode,focusOffset:i.focusOffset}),bd&&Yd(bd,i)||(bd=i,i=vg(ux,"onSelect"),0<i.length&&(t=new Sp("onSelect","select",null,t,n),e.push({event:t,listeners:i}),t.target=Gl)))}function eo(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var Yl={animationend:eo("Animation","AnimationEnd"),animationiteration:eo("Animation","AnimationIteration"),animationstart:eo("Animation","AnimationStart"),transitionrun:eo("Transition","TransitionRun"),transitionstart:eo("Transition","TransitionStart"),transitioncancel:eo("Transition","TransitionCancel"),transitionend:eo("Transition","TransitionEnd")},D1={},ZM={};Er&&(ZM=document.createElement("div").style,"AnimationEvent"in window||(delete Yl.animationend.animation,delete Yl.animationiteration.animation,delete Yl.animationstart.animation),"TransitionEvent"in window||delete Yl.transitionend.transition);function tl(e){if(D1[e])return D1[e];if(!Yl[e])return e;var t=Yl[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in ZM)return D1[e]=t[n];return e}var $M=tl("animationend"),WM=tl("animationiteration"),GM=tl("animationstart"),f9=tl("transitionrun"),h9=tl("transitionstart"),m9=tl("transitioncancel"),YM=tl("transitionend"),qM=new Map,B4="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 scrollEnd toggle touchMove waiting wheel".split(" ");function cs(e,t){qM.set(e,t),Jo(t,[e])}var Si=[],ql=0,p_=0;function Tp(){for(var e=ql,t=p_=ql=0;t<e;){var n=Si[t];Si[t++]=null;var i=Si[t];Si[t++]=null;var s=Si[t];Si[t++]=null;var r=Si[t];if(Si[t++]=null,i!==null&&s!==null){var a=i.pending;a===null?s.next=s:(s.next=a.next,a.next=s),i.pending=s}r!==0&&XM(n,s,r)}}function jp(e,t,n,i){Si[ql++]=e,Si[ql++]=t,Si[ql++]=n,Si[ql++]=i,p_|=i,e.lanes|=i,e=e.alternate,e!==null&&(e.lanes|=i)}function v_(e,t,n,i){return jp(e,t,n,i),ng(e)}function Da(e,t){return jp(e,null,null,t),ng(e)}function XM(e,t,n){e.lanes|=n;var i=e.alternate;i!==null&&(i.lanes|=n);for(var s=!1,r=e.return;r!==null;)r.childLanes|=n,i=r.alternate,i!==null&&(i.childLanes|=n),r.tag===22&&(e=r.stateNode,e===null||e._visibility&1||(s=!0)),e=r,r=r.return;s&&t!==null&&e.tag===3&&(r=e.stateNode,s=31-Li(n),r=r.hiddenUpdates,e=r[s],e===null?r[s]=[t]:e.push(t),t.lane=n|536870912)}function ng(e){$_();for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var Xl={},V4=new WeakMap;function Ei(e,t){if(typeof e=="object"&&e!==null){var n=V4.get(e);typeof n!="string"&&(n=y4(t),V4.set(e,n))}else n=y4(t);return{value:e,source:t,stack:n}}var Kl=[],Ql=0,ig=null,sg=0,Ti=[],ji=0,Ao=null,hr=1,mr="";function uo(e,t){Kl[Ql++]=sg,Kl[Ql++]=ig,ig=e,sg=t}function KM(e,t,n){Ti[ji++]=hr,Ti[ji++]=mr,Ti[ji++]=Ao,Ao=e;var i=hr;e=mr;var s=32-Li(i)-1;i&=~(1<<s),n+=1;var r=32-Li(t)+s;if(30<r){var a=s-s%5;r=(i&(1<<a)-1).toString(32),i>>=a,s-=a,hr=1<<32-Li(t)+s|n<<s|i,mr=r+e}else hr=1<<r|n<<s|i,mr=e}function x_(e){e.return!==null&&(uo(e,1),KM(e,1,0))}function y_(e){for(;e===ig;)ig=Kl[--Ql],Kl[Ql]=null,sg=Kl[--Ql],Kl[Ql]=null;for(;e===Ao;)Ao=Ti[--ji],Ti[ji]=null,mr=Ti[--ji],Ti[ji]=null,hr=Ti[--ji],Ti[ji]=null}var zn=null,hn=null,it=!1,Ki=null,_s=!1,fx=Error(ee(519));function Vo(e){var t=Error(ee(418,""));throw qd(Ei(t,e)),fx}function H4(e){var t=e.stateNode,n=e.type,i=e.memoizedProps;switch(t[Nn]=e,t[Vn]=i,n){case"dialog":Ye("cancel",t),Ye("close",t);break;case"iframe":case"object":case"embed":Ye("load",t);break;case"video":case"audio":for(n=0;n<Jd.length;n++)Ye(Jd[n],t);break;case"source":Ye("error",t);break;case"img":case"image":case"link":Ye("error",t),Ye("load",t);break;case"details":Ye("toggle",t);break;case"input":Ye("invalid",t),EM(t,i.value,i.defaultValue,i.checked,i.defaultChecked,i.type,i.name,!0),eg(t);break;case"select":Ye("invalid",t);break;case"textarea":Ye("invalid",t),OM(t,i.value,i.defaultValue,i.children),eg(t)}n=i.children,typeof n!="string"&&typeof n!="number"&&typeof n!="bigint"||t.textContent===""+n||i.suppressHydrationWarning===!0||N8(t.textContent,n)?(i.popover!=null&&(Ye("beforetoggle",t),Ye("toggle",t)),i.onScroll!=null&&Ye("scroll",t),i.onScrollEnd!=null&&Ye("scrollend",t),i.onClick!=null&&(t.onclick=Lp),t=!0):t=!1,t||Vo(e)}function F4(e){for(zn=e.return;zn;)switch(zn.tag){case 3:case 27:_s=!0;return;case 5:case 13:_s=!1;return;default:zn=zn.return}}function Lu(e){if(e!==zn)return!1;if(!it)return F4(e),it=!0,!1;var t=!1,n;if((n=e.tag!==3&&e.tag!==27)&&((n=e.tag===5)&&(n=e.type,n=!(n!=="form"&&n!=="button")||Vx(e.type,e.memoizedProps)),n=!n),n&&(t=!0),t&&hn&&Vo(e),F4(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(ee(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8)if(n=e.data,n==="/$"){if(t===0){hn=ts(e.nextSibling);break e}t--}else n!=="$"&&n!=="$!"&&n!=="$?"||t++;e=e.nextSibling}hn=null}}else hn=zn?ts(e.stateNode.nextSibling):null;return!0}function Af(){hn=zn=null,it=!1}function qd(e){Ki===null?Ki=[e]:Ki.push(e)}var wd=Error(ee(460)),QM=Error(ee(474)),hx={then:function(){}};function U4(e){return e=e.status,e==="fulfilled"||e==="rejected"}function kh(){}function JM(e,t,n){switch(n=e[n],n===void 0?e.push(t):n!==t&&(t.then(kh,kh),t=n),t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,e===wd?Error(ee(483)):e;default:if(typeof t.status=="string")t.then(kh,kh);else{if(e=mt,e!==null&&100<e.shellSuspendCounter)throw Error(ee(482));e=t,e.status="pending",e.then(function(i){if(t.status==="pending"){var s=t;s.status="fulfilled",s.value=i}},function(i){if(t.status==="pending"){var s=t;s.status="rejected",s.reason=i}})}switch(t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,e===wd?Error(ee(483)):e}throw Sd=t,wd}}var Sd=null;function Z4(){if(Sd===null)throw Error(ee(459));var e=Sd;return Sd=null,e}var uc=null,Xd=0;function Eh(e){var t=Xd;return Xd+=1,uc===null&&(uc=[]),JM(uc,e,t)}function zu(e,t,n,i){e=i.props.ref,n.ref=e!==void 0?e:null}function Ah(e,t){throw t.$$typeof===tL?Error(ee(525)):(e=Object.prototype.toString.call(t),Error(ee(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)))}function $4(e){var t=e._init;return t(e._payload)}function eT(e){function t(y,S){if(e){var T=y.deletions;T===null?(y.deletions=[S],y.flags|=16):T.push(S)}}function n(y,S){if(!e)return null;for(;S!==null;)t(y,S),S=S.sibling;return null}function i(y){for(var S=new Map;y!==null;)y.key!==null?S.set(y.key,y):S.set(y.index,y),y=y.sibling;return S}function s(y,S){return y=ba(y,S),y.index=0,y.sibling=null,y}function r(y,S,T){return y.index=T,e?(T=y.alternate,T!==null?(T=T.index,T<S?(y.flags|=33554434,S):T):(y.flags|=33554434,S)):(y.flags|=1048576,S)}function a(y){return e&&y.alternate===null&&(y.flags|=33554434),y}function o(y,S,T,N){return S===null||S.tag!==6?(S=W1(T,y.mode,N),S.return=y,S):(S=s(S,T),S.return=y,S)}function c(y,S,T,N){var k=T.type;return k===Ul?h(y,S,T.props.children,N,T.key):S!==null&&(S.elementType===k||typeof k=="object"&&k!==null&&k.$$typeof===Jr&&$4(k)===S.type)?(N=s(S,T.props),zu(y,S,N,T),N.return=y,N):(N=Nm(T.type,T.key,T.props,null,y.mode,N),zu(y,S,N,T),N.return=y,N)}function d(y,S,T,N){return S===null||S.tag!==4||S.stateNode.containerInfo!==T.containerInfo||S.stateNode.implementation!==T.implementation?(S=G1(T,y.mode,N),S.return=y,S):(S=s(S,T.children||[]),S.return=y,S)}function h(y,S,T,N,k){return S===null||S.tag!==7?(S=Do(T,y.mode,N,k),S.return=y,S):(S=s(S,T),S.return=y,S)}function m(y,S,T){if(typeof S=="string"&&S!==""||typeof S=="number"||typeof S=="bigint")return S=W1(""+S,y.mode,T),S.return=y,S;if(typeof S=="object"&&S!==null){switch(S.$$typeof){case Ch:return T=Nm(S.type,S.key,S.props,null,y.mode,T),zu(y,null,T,S),T.return=y,T;case ed:return S=G1(S,y.mode,T),S.return=y,S;case Jr:var N=S._init;return S=N(S._payload),m(y,S,T)}if(nd(S)||Du(S))return S=Do(S,y.mode,T,null),S.return=y,S;if(typeof S.then=="function")return m(y,Eh(S),T);if(S.$$typeof===fr)return m(y,Dh(y,S,T),T);Ah(y,S)}return null}function g(y,S,T,N){var k=S!==null?S.key:null;if(typeof T=="string"&&T!==""||typeof T=="number"||typeof T=="bigint")return k!==null?null:o(y,S,""+T,N);if(typeof T=="object"&&T!==null){switch(T.$$typeof){case Ch:return T.key===k?c(y,S,T,N):null;case ed:return T.key===k?d(y,S,T,N):null;case Jr:return k=T._init,T=k(T._payload),g(y,S,T,N)}if(nd(T)||Du(T))return k!==null?null:h(y,S,T,N,null);if(typeof T.then=="function")return g(y,S,Eh(T),N);if(T.$$typeof===fr)return g(y,S,Dh(y,T,N),N);Ah(y,T)}return null}function v(y,S,T,N,k){if(typeof N=="string"&&N!==""||typeof N=="number"||typeof N=="bigint")return y=y.get(T)||null,o(S,y,""+N,k);if(typeof N=="object"&&N!==null){switch(N.$$typeof){case Ch:return y=y.get(N.key===null?T:N.key)||null,c(S,y,N,k);case ed:return y=y.get(N.key===null?T:N.key)||null,d(S,y,N,k);case Jr:var E=N._init;return N=E(N._payload),v(y,S,T,N,k)}if(nd(N)||Du(N))return y=y.get(T)||null,h(S,y,N,k,null);if(typeof N.then=="function")return v(y,S,T,Eh(N),k);if(N.$$typeof===fr)return v(y,S,T,Dh(S,N,k),k);Ah(S,N)}return null}function b(y,S,T,N){for(var k=null,E=null,D=S,O=S=0,I=null;D!==null&&O<T.length;O++){D.index>O?(I=D,D=null):I=D.sibling;var P=g(y,D,T[O],N);if(P===null){D===null&&(D=I);break}e&&D&&P.alternate===null&&t(y,D),S=r(P,S,O),E===null?k=P:E.sibling=P,E=P,D=I}if(O===T.length)return n(y,D),it&&uo(y,O),k;if(D===null){for(;O<T.length;O++)D=m(y,T[O],N),D!==null&&(S=r(D,S,O),E===null?k=D:E.sibling=D,E=D);return it&&uo(y,O),k}for(D=i(D);O<T.length;O++)I=v(D,y,O,T[O],N),I!==null&&(e&&I.alternate!==null&&D.delete(I.key===null?O:I.key),S=r(I,S,O),E===null?k=I:E.sibling=I,E=I);return e&&D.forEach(function(H){return t(y,H)}),it&&uo(y,O),k}function w(y,S,T,N){if(T==null)throw Error(ee(151));for(var k=null,E=null,D=S,O=S=0,I=null,P=T.next();D!==null&&!P.done;O++,P=T.next()){D.index>O?(I=D,D=null):I=D.sibling;var H=g(y,D,P.value,N);if(H===null){D===null&&(D=I);break}e&&D&&H.alternate===null&&t(y,D),S=r(H,S,O),E===null?k=H:E.sibling=H,E=H,D=I}if(P.done)return n(y,D),it&&uo(y,O),k;if(D===null){for(;!P.done;O++,P=T.next())P=m(y,P.value,N),P!==null&&(S=r(P,S,O),E===null?k=P:E.sibling=P,E=P);return it&&uo(y,O),k}for(D=i(D);!P.done;O++,P=T.next())P=v(D,y,O,P.value,N),P!==null&&(e&&P.alternate!==null&&D.delete(P.key===null?O:P.key),S=r(P,S,O),E===null?k=P:E.sibling=P,E=P);return e&&D.forEach(function(V){return t(y,V)}),it&&uo(y,O),k}function M(y,S,T,N){if(typeof T=="object"&&T!==null&&T.type===Ul&&T.key===null&&(T=T.props.children),typeof T=="object"&&T!==null){switch(T.$$typeof){case Ch:e:{for(var k=T.key,E=S;E!==null;){if(E.key===k){if(k=T.type,k===Ul){if(E.tag===7){n(y,E.sibling),S=s(E,T.props.children),S.return=y,y=S;break e}}else if(E.elementType===k||typeof k=="object"&&k!==null&&k.$$typeof===Jr&&$4(k)===E.type){n(y,E.sibling),S=s(E,T.props),zu(y,E,S,T),S.return=y,y=S;break e}n(y,E);break}else t(y,E);E=E.sibling}T.type===Ul?(S=Do(T.props.children,y.mode,N,T.key),S.return=y,y=S):(N=Nm(T.type,T.key,T.props,null,y.mode,N),zu(y,S,N,T),N.return=y,y=N)}return a(y);case ed:e:{for(E=T.key;S!==null;){if(S.key===E)if(S.tag===4&&S.stateNode.containerInfo===T.containerInfo&&S.stateNode.implementation===T.implementation){n(y,S.sibling),S=s(S,T.children||[]),S.return=y,y=S;break e}else{n(y,S);break}else t(y,S);S=S.sibling}S=G1(T,y.mode,N),S.return=y,y=S}return a(y);case Jr:return E=T._init,T=E(T._payload),M(y,S,T,N)}if(nd(T))return b(y,S,T,N);if(Du(T)){if(E=Du(T),typeof E!="function")throw Error(ee(150));return T=E.call(T),w(y,S,T,N)}if(typeof T.then=="function")return M(y,S,Eh(T),N);if(T.$$typeof===fr)return M(y,S,Dh(y,T,N),N);Ah(y,T)}return typeof T=="string"&&T!==""||typeof T=="number"||typeof T=="bigint"?(T=""+T,S!==null&&S.tag===6?(n(y,S.sibling),S=s(S,T),S.return=y,y=S):(n(y,S),S=W1(T,y.mode,N),S.return=y,y=S),a(y)):n(y,S)}return function(y,S,T,N){try{Xd=0;var k=M(y,S,T,N);return uc=null,k}catch(D){if(D===wd)throw D;var E=Oi(29,D,null,y.mode);return E.lanes=N,E.return=y,E}finally{}}}var Ho=eT(!0),tT=eT(!1),Dc=$s(null),rg=$s(0);function W4(e,t){e=Or,kt(rg,e),kt(Dc,t),Or=e|t.baseLanes}function mx(){kt(rg,Or),kt(Dc,Dc.current)}function __(){Or=rg.current,ln(Dc),ln(rg)}var Os=$s(null),js=null;function ia(e){var t=e.alternate;kt(Jt,Jt.current&1),kt(Os,e),js===null&&(t===null||Dc.current!==null||t.memoizedState!==null)&&(js=e)}function nT(e){if(e.tag===22){if(kt(Jt,Jt.current),kt(Os,e),js===null){var t=e.alternate;t!==null&&t.memoizedState!==null&&(js=e)}}else sa()}function sa(){kt(Jt,Jt.current),kt(Os,Os.current)}function gr(e){ln(Os),js===e&&(js=null),ln(Jt)}var Jt=$s(0);function ag(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||n.data==="$?"||n.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if(t.flags&128)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var g9=typeof AbortController<"u"?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(n,i){e.push(i)}};this.abort=function(){t.aborted=!0,e.forEach(function(n){return n()})}},p9=tn.unstable_scheduleCallback,v9=tn.unstable_NormalPriority,Qt={$$typeof:fr,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function b_(){return{controller:new g9,data:new Map,refCount:0}}function Of(e){e.refCount--,e.refCount===0&&p9(v9,function(){e.controller.abort()})}var Cd=null,gx=0,Pc=0,dc=null;function x9(e,t){if(Cd===null){var n=Cd=[];gx=0,Pc=W_(),dc={status:"pending",value:void 0,then:function(i){n.push(i)}}}return gx++,t.then(G4,G4),t}function G4(){if(Cd!==null&&--gx===0){dc!==null&&(dc.status="fulfilled");var e=Cd;Cd=null,Pc=0,dc=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function y9(e,t){var n=[],i={status:"pending",value:null,reason:null,then:function(s){n.push(s)}};return e.then(function(){i.status="fulfilled",i.value=t;for(var s=0;s<n.length;s++)(0,n[s])(t)},function(s){for(i.status="rejected",i.reason=s,s=0;s<n.length;s++)(0,n[s])(void 0)}),i}var Y4=Ie.S;Ie.S=function(e,t){typeof t=="object"&&t!==null&&typeof t.then=="function"&&x9(e,t),Y4!==null&&Y4(e,t)};var Oo=$s(null);function w_(){var e=Oo.current;return e!==null?e:mt.pooledCache}function Cm(e,t){t===null?kt(Oo,Oo.current):kt(Oo,t.pool)}function iT(){var e=w_();return e===null?null:{parent:Qt._currentValue,pool:e}}var Pa=0,Ue=null,ft=null,Xt=null,og=!1,fc=!1,Fo=!1,lg=0,Kd=0,hc=null,_9=0;function Zt(){throw Error(ee(321))}function S_(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!Ii(e[n],t[n]))return!1;return!0}function C_(e,t,n,i,s,r){return Pa=r,Ue=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,Ie.H=e===null||e.memoizedState===null?nl:Fa,Fo=!1,e=n(i,s),Fo=!1,fc&&(e=rT(t,n,i,s)),sT(),e}function sT(){Ie.H=Ds;var e=ft!==null&&ft.next!==null;if(Pa=0,Xt=ft=Ue=null,og=!1,Kd=0,hc=null,e)throw Error(ee(300))}function rT(e,t,n,i){Ue=e;var s=0;do{if(fc&&(hc=null),Kd=0,fc=!1,25<=s)throw Error(ee(301));s+=1,Xt=ft=null,e.updateQueue=null,Ie.H=il;var r=t(n,i)}while(fc);return r}function b9(){var e=Ie.H,t=e.useState()[0];return t=typeof t.then=="function"?Df(t):t,e=e.useState()[0],(ft!==null?ft.memoizedState:null)!==e&&(Ue.flags|=1024),t}function M_(){var e=lg!==0;return lg=0,e}function T_(e,t,n){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~n}function j_(e){if(og){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}og=!1}Pa=0,Xt=ft=Ue=null,fc=!1,Kd=lg=0,hc=null}function Gn(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Xt===null?Ue.memoizedState=Xt=e:Xt=Xt.next=e,Xt}function Kt(){if(ft===null){var e=Ue.alternate;e=e!==null?e.memoizedState:null}else e=ft.next;var t=Xt===null?Ue.memoizedState:Xt.next;if(t!==null)Xt=t,ft=e;else{if(e===null)throw Ue.alternate===null?Error(ee(467)):Error(ee(310));ft=e,e={memoizedState:ft.memoizedState,baseState:ft.baseState,baseQueue:ft.baseQueue,queue:ft.queue,next:null},Xt===null?Ue.memoizedState=Xt=e:Xt=Xt.next=e}return Xt}var Np;Np=function(){return{lastEffect:null,events:null,stores:null,memoCache:null}};function Df(e){var t=Kd;return Kd+=1,hc===null&&(hc=[]),e=JM(hc,e,t),t=Ue,(Xt===null?t.memoizedState:Xt.next)===null&&(t=t.alternate,Ie.H=t===null||t.memoizedState===null?nl:Fa),e}function kp(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return Df(e);if(e.$$typeof===fr)return kn(e)}throw Error(ee(438,String(e)))}function N_(e){var t=null,n=Ue.updateQueue;if(n!==null&&(t=n.memoCache),t==null){var i=Ue.alternate;i!==null&&(i=i.updateQueue,i!==null&&(i=i.memoCache,i!=null&&(t={data:i.data.map(function(s){return s.slice()}),index:0})))}if(t==null&&(t={data:[],index:0}),n===null&&(n=Np(),Ue.updateQueue=n),n.memoCache=t,n=t.data[t.index],n===void 0)for(n=t.data[t.index]=Array(e),i=0;i<e;i++)n[i]=iL;return t.index++,n}function Ar(e,t){return typeof t=="function"?t(e):t}function Mm(e){var t=Kt();return k_(t,ft,e)}function k_(e,t,n){var i=e.queue;if(i===null)throw Error(ee(311));i.lastRenderedReducer=n;var s=e.baseQueue,r=i.pending;if(r!==null){if(s!==null){var a=s.next;s.next=r.next,r.next=a}t.baseQueue=s=r,i.pending=null}if(r=e.baseState,s===null)e.memoizedState=r;else{t=s.next;var o=a=null,c=null,d=t,h=!1;do{var m=d.lane&-536870913;if(m!==d.lane?(st&m)===m:(Pa&m)===m){var g=d.revertLane;if(g===0)c!==null&&(c=c.next={lane:0,revertLane:0,action:d.action,hasEagerState:d.hasEagerState,eagerState:d.eagerState,next:null}),m===Pc&&(h=!0);else if((Pa&g)===g){d=d.next,g===Pc&&(h=!0);continue}else m={lane:0,revertLane:d.revertLane,action:d.action,hasEagerState:d.hasEagerState,eagerState:d.eagerState,next:null},c===null?(o=c=m,a=r):c=c.next=m,Ue.lanes|=g,Dr|=g;m=d.action,Fo&&n(r,m),r=d.hasEagerState?d.eagerState:n(r,m)}else g={lane:m,revertLane:d.revertLane,action:d.action,hasEagerState:d.hasEagerState,eagerState:d.eagerState,next:null},c===null?(o=c=g,a=r):c=c.next=g,Ue.lanes|=m,Dr|=m;d=d.next}while(d!==null&&d!==t);if(c===null?a=r:c.next=o,!Ii(r,e.memoizedState)&&(mn=!0,h&&(n=dc,n!==null)))throw n;e.memoizedState=r,e.baseState=a,e.baseQueue=c,i.lastRenderedState=r}return s===null&&(i.lanes=0),[e.memoizedState,i.dispatch]}function P1(e){var t=Kt(),n=t.queue;if(n===null)throw Error(ee(311));n.lastRenderedReducer=e;var i=n.dispatch,s=n.pending,r=t.memoizedState;if(s!==null){n.pending=null;var a=s=s.next;do r=e(r,a.action),a=a.next;while(a!==s);Ii(r,t.memoizedState)||(mn=!0),t.memoizedState=r,t.baseQueue===null&&(t.baseState=r),n.lastRenderedState=r}return[r,i]}function aT(e,t,n){var i=Ue,s=Kt(),r=it;if(r){if(n===void 0)throw Error(ee(407));n=n()}else n=t();var a=!Ii((ft||s).memoizedState,n);if(a&&(s.memoizedState=n,mn=!0),s=s.queue,E_(cT.bind(null,i,s,e),[e]),s.getSnapshot!==t||a||Xt!==null&&Xt.memoizedState.tag&1){if(i.flags|=2048,Rc(9,lT.bind(null,i,s,n,t),{destroy:void 0},null),mt===null)throw Error(ee(349));r||Pa&60||oT(i,t,n)}return n}function oT(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=Ue.updateQueue,t===null?(t=Np(),Ue.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function lT(e,t,n,i){t.value=n,t.getSnapshot=i,uT(t)&&dT(e)}function cT(e,t,n){return n(function(){uT(t)&&dT(e)})}function uT(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!Ii(e,n)}catch{return!0}}function dT(e){var t=Da(e,2);t!==null&&Hn(t,e,2)}function px(e){var t=Gn();if(typeof e=="function"){var n=e;e=n(),Fo&&(fa(!0),n(),fa(!1))}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ar,lastRenderedState:e},t}function fT(e,t,n,i){return e.baseState=n,k_(e,ft,typeof i=="function"?i:Ar)}function w9(e,t,n,i,s){if(Ap(e))throw Error(ee(485));if(e=t.action,e!==null){var r={payload:s,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(a){r.listeners.push(a)}};Ie.T!==null?n(!0):r.isTransition=!1,i(r),n=t.pending,n===null?(r.next=t.pending=r,hT(t,r)):(r.next=n.next,t.pending=n.next=r)}}function hT(e,t){var n=t.action,i=t.payload,s=e.state;if(t.isTransition){var r=Ie.T,a={};Ie.T=a;try{var o=n(s,i),c=Ie.S;c!==null&&c(a,o),q4(e,t,o)}catch(d){vx(e,t,d)}finally{Ie.T=r}}else try{r=n(s,i),q4(e,t,r)}catch(d){vx(e,t,d)}}function q4(e,t,n){n!==null&&typeof n=="object"&&typeof n.then=="function"?n.then(function(i){X4(e,t,i)},function(i){return vx(e,t,i)}):X4(e,t,n)}function X4(e,t,n){t.status="fulfilled",t.value=n,mT(t),e.state=n,t=e.pending,t!==null&&(n=t.next,n===t?e.pending=null:(n=n.next,t.next=n,hT(e,n)))}function vx(e,t,n){var i=e.pending;if(e.pending=null,i!==null){i=i.next;do t.status="rejected",t.reason=n,mT(t),t=t.next;while(t!==i)}e.action=null}function mT(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function gT(e,t){return t}function pT(e,t){if(it){var n=mt.formState;if(n!==null){e:{var i=Ue;if(it){if(hn){t:{for(var s=hn,r=_s;s.nodeType!==8;){if(!r){s=null;break t}if(s=ts(s.nextSibling),s===null){s=null;break t}}r=s.data,s=r==="F!"||r==="F"?s:null}if(s){hn=ts(s.nextSibling),i=s.data==="F!";break e}}Vo(i)}i=!1}i&&(t=n[0])}}return n=Gn(),n.memoizedState=n.baseState=t,i={pending:null,lanes:0,dispatch:null,lastRenderedReducer:gT,lastRenderedState:t},n.queue=i,n=mc.bind(null,Ue,i),i.dispatch=n,i=px(!1),r=P_.bind(null,Ue,!1,i.queue),i=Gn(),s={state:t,dispatch:null,action:e,pending:null},i.queue=s,n=w9.bind(null,Ue,s,r,n),s.dispatch=n,i.memoizedState=e,[t,n,!1]}function vT(e){var t=Kt();return xT(t,ft,e)}function xT(e,t,n){t=k_(e,t,gT)[0],e=Mm(Ar)[0],t=typeof t=="object"&&t!==null&&typeof t.then=="function"?Df(t):t;var i=Kt(),s=i.queue,r=s.dispatch;return n!==i.memoizedState&&(Ue.flags|=2048,Rc(9,S9.bind(null,s,n),{destroy:void 0},null)),[t,r,e]}function S9(e,t){e.action=t}function yT(e){var t=Kt(),n=ft;if(n!==null)return xT(t,n,e);Kt(),t=t.memoizedState,n=Kt();var i=n.queue.dispatch;return n.memoizedState=e,[t,i,!1]}function Rc(e,t,n,i){return e={tag:e,create:t,inst:n,deps:i,next:null},t=Ue.updateQueue,t===null?(t=Np(),Ue.updateQueue=t,t.lastEffect=e.next=e):(n=t.lastEffect,n===null?t.lastEffect=e.next=e:(i=n.next,n.next=e,e.next=i,t.lastEffect=e)),e}function _T(){return Kt().memoizedState}function Tm(e,t,n,i){var s=Gn();Ue.flags|=e,s.memoizedState=Rc(1|t,n,{destroy:void 0},i===void 0?null:i)}function Ep(e,t,n,i){var s=Kt();i=i===void 0?null:i;var r=s.memoizedState.inst;ft!==null&&i!==null&&S_(i,ft.memoizedState.deps)?s.memoizedState=Rc(t,n,r,i):(Ue.flags|=e,s.memoizedState=Rc(1|t,n,r,i))}function K4(e,t){Tm(8390656,8,e,t)}function E_(e,t){Ep(2048,8,e,t)}function bT(e,t){return Ep(4,2,e,t)}function wT(e,t){return Ep(4,4,e,t)}function ST(e,t){if(typeof t=="function"){e=e();var n=t(e);return function(){typeof n=="function"?n():t(null)}}if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function CT(e,t,n){n=n!=null?n.concat([e]):null,Ep(4,4,ST.bind(null,t,e),n)}function A_(){}function MT(e,t){var n=Kt();t=t===void 0?null:t;var i=n.memoizedState;return t!==null&&S_(t,i[1])?i[0]:(n.memoizedState=[e,t],e)}function TT(e,t){var n=Kt();t=t===void 0?null:t;var i=n.memoizedState;return t!==null&&S_(t,i[1])?i[0]:(i=e(),Fo&&(fa(!0),e(),fa(!1)),n.memoizedState=[i,t],i)}function O_(e,t,n){return n===void 0||Pa&1073741824?e.memoizedState=t:(e.memoizedState=n,e=g8(),Ue.lanes|=e,Dr|=e,n)}function jT(e,t,n,i){return Ii(n,t)?n:Dc.current!==null?(e=O_(e,n,i),Ii(e,t)||(mn=!0),e):Pa&42?(e=g8(),Ue.lanes|=e,Dr|=e,t):(mn=!0,e.memoizedState=n)}function NT(e,t,n,i,s){var r=Ct.p;Ct.p=r!==0&&8>r?r:8;var a=Ie.T,o={};Ie.T=o,P_(e,!1,t,n);try{var c=s(),d=Ie.S;if(d!==null&&d(o,c),c!==null&&typeof c=="object"&&typeof c.then=="function"){var h=y9(c,i);mc(e,t,h)}else mc(e,t,i)}catch(m){mc(e,t,{then:function(){},status:"rejected",reason:m})}finally{Ct.p=r,Ie.T=a}}function C9(){}function xx(e,t,n,i){if(e.tag!==5)throw Error(ee(476));var s=kT(e).queue;NT(e,s,t,xd,n===null?C9:function(){return ET(e),n(i)})}function kT(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:xd,baseState:xd,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ar,lastRenderedState:xd},next:null};var n={};return t.next={memoizedState:n,baseState:n,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ar,lastRenderedState:n},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function ET(e){var t=kT(e).next.queue;mc(e,t,{})}function D_(){var e=kn(qm);return e!==null?e:xd}function AT(){return Kt().memoizedState}function OT(){return Kt().memoizedState}function M9(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var n=br();e=_r(n);var i=_a(t,e,n);i!==null&&(Hn(i,t,n),Td(i,t,n)),t={cache:b_()},e.payload=t;return}t=t.return}}function T9(e,t,n){var i=br();n={lane:i,revertLane:0,action:n,hasEagerState:!1,eagerState:null,next:null},Ap(e)?DT(t,n):(n=v_(e,t,n,i),n!==null&&(Hn(n,e,i),PT(n,t,i)))}function mc(e,t,n){var i=br(),s={lane:i,revertLane:0,action:n,hasEagerState:!1,eagerState:null,next:null};if(Ap(e))DT(t,s);else{var r=e.alternate;if(e.lanes===0&&(r===null||r.lanes===0)&&(r=t.lastRenderedReducer,r!==null))try{var a=t.lastRenderedState,o=r(a,n);if(s.hasEagerState=!0,s.eagerState=o,Ii(o,a)){jp(e,t,s,0),mt===null&&Tp();return}}catch{}finally{}n=v_(e,t,s,i),n!==null&&(Hn(n,e,i),PT(n,t,i))}}function P_(e,t,n,i){if(i={lane:2,revertLane:W_(),action:i,hasEagerState:!1,eagerState:null,next:null},Ap(e)){if(t)throw Error(ee(479))}else t=v_(e,n,i,2),t!==null&&Hn(t,e,2)}function Ap(e){var t=e.alternate;return e===Ue||t!==null&&t===Ue}function DT(e,t){fc=og=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function PT(e,t,n){if(n&4194176){var i=t.lanes;i&=e.pendingLanes,n|=i,t.lanes=n,SM(e,n)}}var Ds={readContext:kn,use:kp,useCallback:Zt,useContext:Zt,useEffect:Zt,useImperativeHandle:Zt,useLayoutEffect:Zt,useInsertionEffect:Zt,useMemo:Zt,useReducer:Zt,useRef:Zt,useState:Zt,useDebugValue:Zt,useDeferredValue:Zt,useTransition:Zt,useSyncExternalStore:Zt,useId:Zt};Ds.useCacheRefresh=Zt;Ds.useMemoCache=Zt;Ds.useHostTransitionStatus=Zt;Ds.useFormState=Zt;Ds.useActionState=Zt;Ds.useOptimistic=Zt;var nl={readContext:kn,use:kp,useCallback:function(e,t){return Gn().memoizedState=[e,t===void 0?null:t],e},useContext:kn,useEffect:K4,useImperativeHandle:function(e,t,n){n=n!=null?n.concat([e]):null,Tm(4194308,4,ST.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Tm(4194308,4,e,t)},useInsertionEffect:function(e,t){Tm(4,2,e,t)},useMemo:function(e,t){var n=Gn();t=t===void 0?null:t;var i=e();return Fo&&(fa(!0),e(),fa(!1)),n.memoizedState=[i,t],i},useReducer:function(e,t,n){var i=Gn();if(n!==void 0){var s=n(t);Fo&&(fa(!0),n(t),fa(!1))}else s=t;return i.memoizedState=i.baseState=s,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:s},i.queue=e,e=e.dispatch=T9.bind(null,Ue,e),[i.memoizedState,e]},useRef:function(e){var t=Gn();return e={current:e},t.memoizedState=e},useState:function(e){e=px(e);var t=e.queue,n=mc.bind(null,Ue,t);return t.dispatch=n,[e.memoizedState,n]},useDebugValue:A_,useDeferredValue:function(e,t){var n=Gn();return O_(n,e,t)},useTransition:function(){var e=px(!1);return e=NT.bind(null,Ue,e.queue,!0,!1),Gn().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,n){var i=Ue,s=Gn();if(it){if(n===void 0)throw Error(ee(407));n=n()}else{if(n=t(),mt===null)throw Error(ee(349));st&60||oT(i,t,n)}s.memoizedState=n;var r={value:n,getSnapshot:t};return s.queue=r,K4(cT.bind(null,i,r,e),[e]),i.flags|=2048,Rc(9,lT.bind(null,i,r,n,t),{destroy:void 0},null),n},useId:function(){var e=Gn(),t=mt.identifierPrefix;if(it){var n=mr,i=hr;n=(i&~(1<<32-Li(i)-1)).toString(32)+n,t=":"+t+"R"+n,n=lg++,0<n&&(t+="H"+n.toString(32)),t+=":"}else n=_9++,t=":"+t+"r"+n.toString(32)+":";return e.memoizedState=t},useCacheRefresh:function(){return Gn().memoizedState=M9.bind(null,Ue)}};nl.useMemoCache=N_;nl.useHostTransitionStatus=D_;nl.useFormState=pT;nl.useActionState=pT;nl.useOptimistic=function(e){var t=Gn();t.memoizedState=t.baseState=e;var n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=n,t=P_.bind(null,Ue,!0,n),n.dispatch=t,[e,t]};var Fa={readContext:kn,use:kp,useCallback:MT,useContext:kn,useEffect:E_,useImperativeHandle:CT,useInsertionEffect:bT,useLayoutEffect:wT,useMemo:TT,useReducer:Mm,useRef:_T,useState:function(){return Mm(Ar)},useDebugValue:A_,useDeferredValue:function(e,t){var n=Kt();return jT(n,ft.memoizedState,e,t)},useTransition:function(){var e=Mm(Ar)[0],t=Kt().memoizedState;return[typeof e=="boolean"?e:Df(e),t]},useSyncExternalStore:aT,useId:AT};Fa.useCacheRefresh=OT;Fa.useMemoCache=N_;Fa.useHostTransitionStatus=D_;Fa.useFormState=vT;Fa.useActionState=vT;Fa.useOptimistic=function(e,t){var n=Kt();return fT(n,ft,e,t)};var il={readContext:kn,use:kp,useCallback:MT,useContext:kn,useEffect:E_,useImperativeHandle:CT,useInsertionEffect:bT,useLayoutEffect:wT,useMemo:TT,useReducer:P1,useRef:_T,useState:function(){return P1(Ar)},useDebugValue:A_,useDeferredValue:function(e,t){var n=Kt();return ft===null?O_(n,e,t):jT(n,ft.memoizedState,e,t)},useTransition:function(){var e=P1(Ar)[0],t=Kt().memoizedState;return[typeof e=="boolean"?e:Df(e),t]},useSyncExternalStore:aT,useId:AT};il.useCacheRefresh=OT;il.useMemoCache=N_;il.useHostTransitionStatus=D_;il.useFormState=yT;il.useActionState=yT;il.useOptimistic=function(e,t){var n=Kt();return ft!==null?fT(n,ft,e,t):(n.baseState=e,[e,n.queue.dispatch])};var cg=typeof reportError=="function"?reportError:function(e){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var t=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof e=="object"&&e!==null&&typeof e.message=="string"?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",e);return}console.error(e)};function RT(e){cg(e)}function LT(e){console.error(e)}function zT(e){cg(e)}function ug(e,t){try{var n=e.onUncaughtError;n(t.value,{componentStack:t.stack})}catch(i){setTimeout(function(){throw i})}}function Q4(e,t,n){try{var i=e.onCaughtError;i(n.value,{componentStack:n.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(s){setTimeout(function(){throw s})}}function yx(e,t,n){return n=_r(n),n.tag=3,n.payload={element:null},n.callback=function(){ug(e,t)},n}function IT(e){return e=_r(e),e.tag=3,e}function BT(e,t,n,i){var s=n.type.getDerivedStateFromError;if(typeof s=="function"){var r=i.value;e.payload=function(){return s(r)},e.callback=function(){Q4(t,n,i)}}var a=n.stateNode;a!==null&&typeof a.componentDidCatch=="function"&&(e.callback=function(){Q4(t,n,i),typeof s!="function"&&(wa===null?wa=new Set([this]):wa.add(this));var o=i.stack;this.componentDidCatch(i.value,{componentStack:o!==null?o:""})})}function j9(e,t,n,i,s){if(n.flags|=32768,i!==null&&typeof i=="object"&&typeof i.then=="function"){if(n=Os.current,n!==null){switch(n.tag){case 13:return js===null?Px():n.alternate===null&&Bt===0&&(Bt=3),n.flags&=-257,n.flags|=65536,n.lanes=s,i===hx?n.flags|=16384:(t=n.updateQueue,t===null?n.updateQueue=new Set([i]):t.add(i),Y1(e,i,s)),!1;case 22:return n.flags|=65536,i===hx?n.flags|=16384:(t=n.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([i])},n.updateQueue=t):(n=t.retryQueue,n===null?t.retryQueue=new Set([i]):n.add(i)),Y1(e,i,s)),!1}throw Error(ee(435,n.tag))}return Y1(e,i,s),Px(),!1}if(it)return t=Os.current,t!==null?(!(t.flags&65536)&&(t.flags|=256),t.flags|=65536,t.lanes=s,i!==fx&&(e=Error(ee(422),{cause:i}),qd(Ei(e,n)))):(i!==fx&&(t=Error(ee(423),{cause:i}),qd(Ei(t,n))),e=e.current.alternate,e.flags|=65536,s&=-s,e.lanes|=s,i=Ei(i,n),s=yx(e.stateNode,i,s),V1(e,s),Bt!==4&&(Bt=2)),!1;var r=Error(ee(520),{cause:i});if(r=Ei(r,n),Ed===null?Ed=[r]:Ed.push(r),Bt!==4&&(Bt=2),t===null)return!0;i=Ei(i,n),n=t;do{switch(n.tag){case 3:return n.flags|=65536,e=s&-s,n.lanes|=e,e=yx(n.stateNode,i,e),V1(n,e),!1;case 1:if(t=n.type,r=n.stateNode,(n.flags&128)===0&&(typeof t.getDerivedStateFromError=="function"||r!==null&&typeof r.componentDidCatch=="function"&&(wa===null||!wa.has(r))))return n.flags|=65536,s&=-s,n.lanes|=s,s=IT(s),BT(s,e,n,i),V1(n,s),!1}n=n.return}while(n!==null);return!1}var VT=Error(ee(461)),mn=!1;function fn(e,t,n,i){t.child=e===null?tT(t,null,n,i):Ho(t,e.child,n,i)}function J4(e,t,n,i,s){n=n.render;var r=t.ref;if("ref"in i){var a={};for(var o in i)o!=="ref"&&(a[o]=i[o])}else a=i;return Uo(t,s),i=C_(e,t,n,a,r,s),o=M_(),e!==null&&!mn?(T_(e,t,s),Ps(e,t,s)):(it&&o&&x_(t),t.flags|=1,fn(e,t,i,s),t.child)}function e3(e,t,n,i,s){if(e===null){var r=n.type;return typeof r=="function"&&!V_(r)&&r.defaultProps===void 0&&n.compare===null?(t.tag=15,t.type=r,HT(e,t,r,i,s)):(e=Nm(n.type,null,i,t,t.mode,s),e.ref=t.ref,e.return=t,t.child=e)}if(r=e.child,!(e.lanes&s)){var a=r.memoizedProps;if(n=n.compare,n=n!==null?n:Yd,n(a,i)&&e.ref===t.ref)return Ps(e,t,s)}return t.flags|=1,e=ba(r,i),e.ref=t.ref,e.return=t,t.child=e}function HT(e,t,n,i,s){if(e!==null){var r=e.memoizedProps;if(Yd(r,i)&&e.ref===t.ref)if(mn=!1,t.pendingProps=i=r,(e.lanes&s)!==0)e.flags&131072&&(mn=!0);else return t.lanes=e.lanes,Ps(e,t,s)}return _x(e,t,n,i,s)}function FT(e,t,n){var i=t.pendingProps,s=i.children,r=(t.stateNode._pendingVisibility&2)!==0,a=e!==null?e.memoizedState:null;if(Md(e,t),i.mode==="hidden"||r){if(t.flags&128){if(n=a!==null?a.baseLanes|n:n,e!==null){for(i=t.child=e.child,s=0;i!==null;)s=s|i.lanes|i.childLanes,i=i.sibling;t.childLanes=s&~n}else t.childLanes=0,t.child=null;return t3(e,t,n)}if(n&536870912)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&Cm(t,a!==null?a.cachePool:null),a!==null?W4(t,a):mx(),nT(t);else return t.lanes=t.childLanes=536870912,t3(e,t,a!==null?a.baseLanes|n:n)}else a!==null?(Cm(t,a.cachePool),W4(t,a),sa(),t.memoizedState=null):(e!==null&&Cm(t,null),mx(),sa());return fn(e,t,s,n),t.child}function t3(e,t,n){var i=w_();return i=i===null?null:{parent:Qt._currentValue,pool:i},t.memoizedState={baseLanes:n,cachePool:i},e!==null&&Cm(t,null),mx(),nT(t),null}function Md(e,t){var n=t.ref;if(n===null)e!==null&&e.ref!==null&&(t.flags|=2097664);else{if(typeof n!="function"&&typeof n!="object")throw Error(ee(284));(e===null||e.ref!==n)&&(t.flags|=2097664)}}function _x(e,t,n,i,s){return Uo(t,s),n=C_(e,t,n,i,void 0,s),i=M_(),e!==null&&!mn?(T_(e,t,s),Ps(e,t,s)):(it&&i&&x_(t),t.flags|=1,fn(e,t,n,s),t.child)}function n3(e,t,n,i,s,r){return Uo(t,r),n=rT(t,i,n,s),sT(),i=M_(),e!==null&&!mn?(T_(e,t,r),Ps(e,t,r)):(it&&i&&x_(t),t.flags|=1,fn(e,t,n,r),t.child)}function i3(e,t,n,i,s){if(Uo(t,s),t.stateNode===null){var r=Xl,a=n.contextType;typeof a=="object"&&a!==null&&(r=kn(a)),r=new n(i,r),t.memoizedState=r.state!==null&&r.state!==void 0?r.state:null,r.updater=jx,t.stateNode=r,r._reactInternals=t,r=t.stateNode,r.props=i,r.state=t.memoizedState,r.refs={},L_(t),a=n.contextType,r.context=typeof a=="object"&&a!==null?kn(a):Xl,r.state=t.memoizedState,a=n.getDerivedStateFromProps,typeof a=="function"&&(H1(t,n,a,i),r.state=t.memoizedState),typeof n.getDerivedStateFromProps=="function"||typeof r.getSnapshotBeforeUpdate=="function"||typeof r.UNSAFE_componentWillMount!="function"&&typeof r.componentWillMount!="function"||(a=r.state,typeof r.componentWillMount=="function"&&r.componentWillMount(),typeof r.UNSAFE_componentWillMount=="function"&&r.UNSAFE_componentWillMount(),a!==r.state&&jx.enqueueReplaceState(r,r.state,null),Nd(t,i,r,s),jd(),r.state=t.memoizedState),typeof r.componentDidMount=="function"&&(t.flags|=4194308),i=!0}else if(e===null){r=t.stateNode;var o=t.memoizedProps,c=Zo(n,o);r.props=c;var d=r.context,h=n.contextType;a=Xl,typeof h=="object"&&h!==null&&(a=kn(h));var m=n.getDerivedStateFromProps;h=typeof m=="function"||typeof r.getSnapshotBeforeUpdate=="function",o=t.pendingProps!==o,h||typeof r.UNSAFE_componentWillReceiveProps!="function"&&typeof r.componentWillReceiveProps!="function"||(o||d!==a)&&o3(t,r,i,a),ea=!1;var g=t.memoizedState;r.state=g,Nd(t,i,r,s),jd(),d=t.memoizedState,o||g!==d||ea?(typeof m=="function"&&(H1(t,n,m,i),d=t.memoizedState),(c=ea||a3(t,n,c,i,g,d,a))?(h||typeof r.UNSAFE_componentWillMount!="function"&&typeof r.componentWillMount!="function"||(typeof r.componentWillMount=="function"&&r.componentWillMount(),typeof r.UNSAFE_componentWillMount=="function"&&r.UNSAFE_componentWillMount()),typeof r.componentDidMount=="function"&&(t.flags|=4194308)):(typeof r.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=i,t.memoizedState=d),r.props=i,r.state=d,r.context=a,i=c):(typeof r.componentDidMount=="function"&&(t.flags|=4194308),i=!1)}else{r=t.stateNode,Mx(e,t),a=t.memoizedProps,h=Zo(n,a),r.props=h,m=t.pendingProps,g=r.context,d=n.contextType,c=Xl,typeof d=="object"&&d!==null&&(c=kn(d)),o=n.getDerivedStateFromProps,(d=typeof o=="function"||typeof r.getSnapshotBeforeUpdate=="function")||typeof r.UNSAFE_componentWillReceiveProps!="function"&&typeof r.componentWillReceiveProps!="function"||(a!==m||g!==c)&&o3(t,r,i,c),ea=!1,g=t.memoizedState,r.state=g,Nd(t,i,r,s),jd();var v=t.memoizedState;a!==m||g!==v||ea?(typeof o=="function"&&(H1(t,n,o,i),v=t.memoizedState),(h=ea||a3(t,n,h,i,g,v,c)||!1)?(d||typeof r.UNSAFE_componentWillUpdate!="function"&&typeof r.componentWillUpdate!="function"||(typeof r.componentWillUpdate=="function"&&r.componentWillUpdate(i,v,c),typeof r.UNSAFE_componentWillUpdate=="function"&&r.UNSAFE_componentWillUpdate(i,v,c)),typeof r.componentDidUpdate=="function"&&(t.flags|=4),typeof r.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof r.componentDidUpdate!="function"||a===e.memoizedProps&&g===e.memoizedState||(t.flags|=4),typeof r.getSnapshotBeforeUpdate!="function"||a===e.memoizedProps&&g===e.memoizedState||(t.flags|=1024),t.memoizedProps=i,t.memoizedState=v),r.props=i,r.state=v,r.context=c,i=h):(typeof r.componentDidUpdate!="function"||a===e.memoizedProps&&g===e.memoizedState||(t.flags|=4),typeof r.getSnapshotBeforeUpdate!="function"||a===e.memoizedProps&&g===e.memoizedState||(t.flags|=1024),i=!1)}return r=i,Md(e,t),i=(t.flags&128)!==0,r||i?(r=t.stateNode,n=i&&typeof n.getDerivedStateFromError!="function"?null:r.render(),t.flags|=1,e!==null&&i?(t.child=Ho(t,e.child,null,s),t.child=Ho(t,null,n,s)):fn(e,t,n,s),t.memoizedState=r.state,e=t.child):e=Ps(e,t,s),e}function s3(e,t,n,i){return Af(),t.flags|=256,fn(e,t,n,i),t.child}var R1={dehydrated:null,treeContext:null,retryLane:0};function L1(e){return{baseLanes:e,cachePool:iT()}}function z1(e,t,n){return e=e!==null?e.childLanes&~n:0,t&&(e|=Xn),e}function UT(e,t,n){var i=t.pendingProps,s=!1,r=(t.flags&128)!==0,a;if((a=r)||(a=e!==null&&e.memoizedState===null?!1:(Jt.current&2)!==0),a&&(s=!0,t.flags&=-129),a=(t.flags&32)!==0,t.flags&=-33,e===null){if(it){if(s?ia(t):sa(),it){var o=hn,c;if(c=o){e:{for(c=o,o=_s;c.nodeType!==8;){if(!o){o=null;break e}if(c=ts(c.nextSibling),c===null){o=null;break e}}o=c}o!==null?(t.memoizedState={dehydrated:o,treeContext:Ao!==null?{id:hr,overflow:mr}:null,retryLane:536870912},c=Oi(18,null,null,0),c.stateNode=o,c.return=t,t.child=c,zn=t,hn=null,c=!0):c=!1}c||Vo(t)}if(o=t.memoizedState,o!==null&&(o=o.dehydrated,o!==null))return o.data==="$!"?t.lanes=16:t.lanes=536870912,null;gr(t)}return o=i.children,i=i.fallback,s?(sa(),s=t.mode,o=wx({mode:"hidden",children:o},s),i=Do(i,s,n,null),o.return=t,i.return=t,o.sibling=i,t.child=o,s=t.child,s.memoizedState=L1(n),s.childLanes=z1(e,a,n),t.memoizedState=R1,i):(ia(t),bx(t,o))}if(c=e.memoizedState,c!==null&&(o=c.dehydrated,o!==null)){if(r)t.flags&256?(ia(t),t.flags&=-257,t=I1(e,t,n)):t.memoizedState!==null?(sa(),t.child=e.child,t.flags|=128,t=null):(sa(),s=i.fallback,o=t.mode,i=wx({mode:"visible",children:i.children},o),s=Do(s,o,n,null),s.flags|=2,i.return=t,s.return=t,i.sibling=s,t.child=i,Ho(t,e.child,null,n),i=t.child,i.memoizedState=L1(n),i.childLanes=z1(e,a,n),t.memoizedState=R1,t=s);else if(ia(t),o.data==="$!"){if(a=o.nextSibling&&o.nextSibling.dataset,a)var d=a.dgst;a=d,i=Error(ee(419)),i.stack="",i.digest=a,qd({value:i,source:null,stack:null}),t=I1(e,t,n)}else if(a=(n&e.childLanes)!==0,mn||a){if(a=mt,a!==null){if(i=n&-n,i&42)i=1;else switch(i){case 2:i=1;break;case 8:i=4;break;case 32:i=16;break;case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:i=64;break;case 268435456:i=134217728;break;default:i=0}if(i=i&(a.suspendedLanes|n)?0:i,i!==0&&i!==c.retryLane)throw c.retryLane=i,Da(e,i),Hn(a,e,i),VT}o.data==="$?"||Px(),t=I1(e,t,n)}else o.data==="$?"?(t.flags|=128,t.child=e.child,t=U9.bind(null,e),o._reactRetry=t,t=null):(e=c.treeContext,hn=ts(o.nextSibling),zn=t,it=!0,Ki=null,_s=!1,e!==null&&(Ti[ji++]=hr,Ti[ji++]=mr,Ti[ji++]=Ao,hr=e.id,mr=e.overflow,Ao=t),t=bx(t,i.children),t.flags|=4096);return t}return s?(sa(),s=i.fallback,o=t.mode,c=e.child,d=c.sibling,i=ba(c,{mode:"hidden",children:i.children}),i.subtreeFlags=c.subtreeFlags&31457280,d!==null?s=ba(d,s):(s=Do(s,o,n,null),s.flags|=2),s.return=t,i.return=t,i.sibling=s,t.child=i,i=s,s=t.child,o=e.child.memoizedState,o===null?o=L1(n):(c=o.cachePool,c!==null?(d=Qt._currentValue,c=c.parent!==d?{parent:d,pool:d}:c):c=iT(),o={baseLanes:o.baseLanes|n,cachePool:c}),s.memoizedState=o,s.childLanes=z1(e,a,n),t.memoizedState=R1,i):(ia(t),n=e.child,e=n.sibling,n=ba(n,{mode:"visible",children:i.children}),n.return=t,n.sibling=null,e!==null&&(a=t.deletions,a===null?(t.deletions=[e],t.flags|=16):a.push(e)),t.child=n,t.memoizedState=null,n)}function bx(e,t){return t=wx({mode:"visible",children:t},e.mode),t.return=e,e.child=t}function wx(e,t){return h8(e,t,0,null)}function I1(e,t,n){return Ho(t,e.child,null,n),e=bx(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function r3(e,t,n){e.lanes|=t;var i=e.alternate;i!==null&&(i.lanes|=t),Cx(e.return,t,n)}function B1(e,t,n,i,s){var r=e.memoizedState;r===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:i,tail:n,tailMode:s}:(r.isBackwards=t,r.rendering=null,r.renderingStartTime=0,r.last=i,r.tail=n,r.tailMode=s)}function ZT(e,t,n){var i=t.pendingProps,s=i.revealOrder,r=i.tail;if(fn(e,t,i.children,n),i=Jt.current,i&2)i=i&1|2,t.flags|=128;else{if(e!==null&&e.flags&128)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&r3(e,n,t);else if(e.tag===19)r3(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}i&=1}switch(kt(Jt,i),s){case"forwards":for(n=t.child,s=null;n!==null;)e=n.alternate,e!==null&&ag(e)===null&&(s=n),n=n.sibling;n=s,n===null?(s=t.child,t.child=null):(s=n.sibling,n.sibling=null),B1(t,!1,s,n,r);break;case"backwards":for(n=null,s=t.child,t.child=null;s!==null;){if(e=s.alternate,e!==null&&ag(e)===null){t.child=s;break}e=s.sibling,s.sibling=n,n=s,s=e}B1(t,!0,n,null,r);break;case"together":B1(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function Ps(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),Dr|=t.lanes,!(n&t.childLanes))return null;if(e!==null&&t.child!==e.child)throw Error(ee(153));if(t.child!==null){for(e=t.child,n=ba(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=ba(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function N9(e,t,n){switch(t.tag){case 3:Xm(t,t.stateNode.containerInfo),ra(t,Qt,e.memoizedState.cache),Af();break;case 27:case 5:ix(t);break;case 4:Xm(t,t.stateNode.containerInfo);break;case 10:ra(t,t.type,t.memoizedProps.value);break;case 13:var i=t.memoizedState;if(i!==null)return i.dehydrated!==null?(ia(t),t.flags|=128,null):n&t.child.childLanes?UT(e,t,n):(ia(t),e=Ps(e,t,n),e!==null?e.sibling:null);ia(t);break;case 19:if(i=(n&t.childLanes)!==0,e.flags&128){if(i)return ZT(e,t,n);t.flags|=128}var s=t.memoizedState;if(s!==null&&(s.rendering=null,s.tail=null,s.lastEffect=null),kt(Jt,Jt.current),i)break;return null;case 22:case 23:return t.lanes=0,FT(e,t,n);case 24:ra(t,Qt,e.memoizedState.cache)}return Ps(e,t,n)}function $T(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps)mn=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return mn=!1,N9(e,t,n);mn=!!(e.flags&131072)}else mn=!1,it&&t.flags&1048576&&KM(t,sg,t.index);switch(t.lanes=0,t.tag){case 16:e:{e=t.pendingProps;var i=t.elementType,s=i._init;if(i=s(i._payload),t.type=i,typeof i=="function")V_(i)?(e=Zo(i,e),t.tag=1,t=i3(null,t,i,e,n)):(t.tag=0,t=_x(null,t,i,e,n));else{if(i!=null){if(s=i.$$typeof,s===r_){t.tag=11,t=J4(null,t,i,e,n);break e}else if(s===a_){t.tag=14,t=e3(null,t,i,e,n);break e}}throw t=ex(i)||i,Error(ee(306,t,""))}}return t;case 0:return _x(e,t,t.type,t.pendingProps,n);case 1:return i=t.type,s=Zo(i,t.pendingProps),i3(e,t,i,s,n);case 3:e:{if(Xm(t,t.stateNode.containerInfo),e===null)throw Error(ee(387));var r=t.pendingProps;s=t.memoizedState,i=s.element,Mx(e,t),Nd(t,r,null,n);var a=t.memoizedState;if(r=a.cache,ra(t,Qt,r),r!==s.cache&&Oh(t,Qt,n),jd(),r=a.element,s.isDehydrated)if(s={element:r,isDehydrated:!1,cache:a.cache},t.updateQueue.baseState=s,t.memoizedState=s,t.flags&256){t=s3(e,t,r,n);break e}else if(r!==i){i=Ei(Error(ee(424)),t),qd(i),t=s3(e,t,r,n);break e}else for(hn=ts(t.stateNode.containerInfo.firstChild),zn=t,it=!0,Ki=null,_s=!0,n=tT(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(Af(),r===i){t=Ps(e,t,n);break e}fn(e,t,r,n)}t=t.child}return t;case 26:return Md(e,t),e===null?(n=S3(t.type,null,t.pendingProps,null))?t.memoizedState=n:it||(n=t.type,e=t.pendingProps,i=xg(ya.current).createElement(n),i[Nn]=t,i[Vn]=e,gn(i,n,e),an(i),t.stateNode=i):t.memoizedState=S3(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return ix(t),e===null&&it&&(i=t.stateNode=A8(t.type,t.pendingProps,ya.current),zn=t,_s=!0,hn=ts(i.firstChild)),i=t.pendingProps.children,e!==null||it?fn(e,t,i,n):t.child=Ho(t,null,i,n),Md(e,t),t.child;case 5:return e===null&&it&&((s=i=hn)&&(i=sz(i,t.type,t.pendingProps,_s),i!==null?(t.stateNode=i,zn=t,hn=ts(i.firstChild),_s=!1,s=!0):s=!1),s||Vo(t)),ix(t),s=t.type,r=t.pendingProps,a=e!==null?e.memoizedProps:null,i=r.children,Vx(s,r)?i=null:a!==null&&Vx(s,a)&&(t.flags|=32),t.memoizedState!==null&&(s=C_(e,t,b9,null,null,n),qm._currentValue=s,mn&&e!==null&&e.memoizedState.memoizedState!==s&&Oh(t,qm,n)),Md(e,t),fn(e,t,i,n),t.child;case 6:return e===null&&it&&((e=n=hn)&&(n=rz(n,t.pendingProps,_s),n!==null?(t.stateNode=n,zn=t,hn=null,e=!0):e=!1),e||Vo(t)),null;case 13:return UT(e,t,n);case 4:return Xm(t,t.stateNode.containerInfo),i=t.pendingProps,e===null?t.child=Ho(t,null,i,n):fn(e,t,i,n),t.child;case 11:return J4(e,t,t.type,t.pendingProps,n);case 7:return fn(e,t,t.pendingProps,n),t.child;case 8:return fn(e,t,t.pendingProps.children,n),t.child;case 12:return fn(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(i=t.type,s=t.pendingProps,r=t.memoizedProps,a=s.value,ra(t,i,a),r!==null)if(Ii(r.value,a)){if(r.children===s.children){t=Ps(e,t,n);break e}}else Oh(t,i,n);fn(e,t,s.children,n),t=t.child}return t;case 9:return s=t.type._context,i=t.pendingProps.children,Uo(t,n),s=kn(s),i=i(s),t.flags|=1,fn(e,t,i,n),t.child;case 14:return e3(e,t,t.type,t.pendingProps,n);case 15:return HT(e,t,t.type,t.pendingProps,n);case 19:return ZT(e,t,n);case 22:return FT(e,t,n);case 24:return Uo(t,n),i=kn(Qt),e===null?(s=w_(),s===null&&(s=mt,r=b_(),s.pooledCache=r,r.refCount++,r!==null&&(s.pooledCacheLanes|=n),s=r),t.memoizedState={parent:i,cache:s},L_(t),ra(t,Qt,s)):(e.lanes&n&&(Mx(e,t),Nd(t,null,null,n),jd()),s=e.memoizedState,r=t.memoizedState,s.parent!==i?(s={parent:i,cache:i},t.memoizedState=s,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=s),ra(t,Qt,i)):(i=r.cache,ra(t,Qt,i),i!==s.cache&&Oh(t,Qt,n))),fn(e,t,t.pendingProps.children,n),t.child;case 29:throw t.pendingProps}throw Error(ee(156,t.tag))}var Sx=$s(null),Op=null,Jl=null,R_=null;function Dp(){R_=Jl=Op=null}function ra(e,t,n){kt(Sx,t._currentValue),t._currentValue=n}function yr(e){e._currentValue=Sx.current,ln(Sx)}function Cx(e,t,n){for(;e!==null;){var i=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,i!==null&&(i.childLanes|=t)):i!==null&&(i.childLanes&t)!==t&&(i.childLanes|=t),e===n)break;e=e.return}}function Oh(e,t,n){var i=e.child;for(i!==null&&(i.return=e);i!==null;){var s=i.dependencies;if(s!==null)for(var r=i.child,a=s.firstContext;a!==null;){if(a.context===t){if(i.tag===1){a=_r(n&-n),a.tag=2;var o=i.updateQueue;if(o!==null){o=o.shared;var c=o.pending;c===null?a.next=a:(a.next=c.next,c.next=a),o.pending=a}}i.lanes|=n,a=i.alternate,a!==null&&(a.lanes|=n),Cx(i.return,n,e),s.lanes|=n;break}a=a.next}else if(i.tag===10)r=i.type===e.type?null:i.child;else if(i.tag===18){if(r=i.return,r===null)throw Error(ee(341));r.lanes|=n,s=r.alternate,s!==null&&(s.lanes|=n),Cx(r,n,e),r=i.sibling}else r=i.child;if(r!==null)r.return=i;else for(r=i;r!==null;){if(r===e){r=null;break}if(i=r.sibling,i!==null){i.return=r.return,r=i;break}r=r.return}i=r}}function Uo(e,t){Op=e,R_=Jl=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(mn=!0),e.firstContext=null)}function kn(e){return WT(Op,e)}function Dh(e,t,n){return Op===null&&Uo(e,n),WT(e,t)}function WT(e,t){var n=t._currentValue;if(R_!==t)if(t={context:t,memoizedValue:n,next:null},Jl===null){if(e===null)throw Error(ee(308));Jl=t,e.dependencies={lanes:0,firstContext:t}}else Jl=Jl.next=t;return n}var ea=!1;function L_(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Mx(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function _r(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function _a(e,t,n){var i=e.updateQueue;if(i===null)return null;if(i=i.shared,ut&2){var s=i.pending;return s===null?t.next=t:(t.next=s.next,s.next=t),i.pending=t,t=ng(e),XM(e,null,n),t}return jp(e,i,t,n),ng(e)}function Td(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194176)!==0)){var i=t.lanes;i&=e.pendingLanes,n|=i,t.lanes=n,SM(e,n)}}function V1(e,t){var n=e.updateQueue,i=e.alternate;if(i!==null&&(i=i.updateQueue,n===i)){var s=null,r=null;if(n=n.firstBaseUpdate,n!==null){do{var a={lane:n.lane,tag:n.tag,payload:n.payload,callback:null,next:null};r===null?s=r=a:r=r.next=a,n=n.next}while(n!==null);r===null?s=r=t:r=r.next=t}else s=r=t;n={baseState:i.baseState,firstBaseUpdate:s,lastBaseUpdate:r,shared:i.shared,callbacks:i.callbacks},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}var Tx=!1;function jd(){if(Tx){var e=dc;if(e!==null)throw e}}function Nd(e,t,n,i){Tx=!1;var s=e.updateQueue;ea=!1;var r=s.firstBaseUpdate,a=s.lastBaseUpdate,o=s.shared.pending;if(o!==null){s.shared.pending=null;var c=o,d=c.next;c.next=null,a===null?r=d:a.next=d,a=c;var h=e.alternate;h!==null&&(h=h.updateQueue,o=h.lastBaseUpdate,o!==a&&(o===null?h.firstBaseUpdate=d:o.next=d,h.lastBaseUpdate=c))}if(r!==null){var m=s.baseState;a=0,h=d=c=null,o=r;do{var g=o.lane&-536870913,v=g!==o.lane;if(v?(st&g)===g:(i&g)===g){g!==0&&g===Pc&&(Tx=!0),h!==null&&(h=h.next={lane:0,tag:o.tag,payload:o.payload,callback:null,next:null});e:{var b=e,w=o;g=t;var M=n;switch(w.tag){case 1:if(b=w.payload,typeof b=="function"){m=b.call(M,m,g);break e}m=b;break e;case 3:b.flags=b.flags&-65537|128;case 0:if(b=w.payload,g=typeof b=="function"?b.call(M,m,g):b,g==null)break e;m=Mt({},m,g);break e;case 2:ea=!0}}g=o.callback,g!==null&&(e.flags|=64,v&&(e.flags|=8192),v=s.callbacks,v===null?s.callbacks=[g]:v.push(g))}else v={lane:g,tag:o.tag,payload:o.payload,callback:o.callback,next:null},h===null?(d=h=v,c=m):h=h.next=v,a|=g;if(o=o.next,o===null){if(o=s.shared.pending,o===null)break;v=o,o=v.next,v.next=null,s.lastBaseUpdate=v,s.shared.pending=null}}while(!0);h===null&&(c=m),s.baseState=c,s.firstBaseUpdate=d,s.lastBaseUpdate=h,r===null&&(s.shared.lanes=0),Dr|=a,e.lanes=a,e.memoizedState=m}}function GT(e,t){if(typeof e!="function")throw Error(ee(191,e));e.call(t)}function YT(e,t){var n=e.callbacks;if(n!==null)for(e.callbacks=null,e=0;e<n.length;e++)GT(n[e],t)}function H1(e,t,n,i){t=e.memoizedState,n=n(i,t),n=n==null?t:Mt({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var jx={isMounted:function(e){return(e=e._reactInternals)?Qc(e)===e:!1},enqueueSetState:function(e,t,n){e=e._reactInternals;var i=br(),s=_r(i);s.payload=t,n!=null&&(s.callback=n),t=_a(e,s,i),t!==null&&(Hn(t,e,i),Td(t,e,i))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var i=br(),s=_r(i);s.tag=1,s.payload=t,n!=null&&(s.callback=n),t=_a(e,s,i),t!==null&&(Hn(t,e,i),Td(t,e,i))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=br(),i=_r(n);i.tag=2,t!=null&&(i.callback=t),t=_a(e,i,n),t!==null&&(Hn(t,e,n),Td(t,e,n))}};function a3(e,t,n,i,s,r,a){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(i,r,a):t.prototype&&t.prototype.isPureReactComponent?!Yd(n,i)||!Yd(s,r):!0}function o3(e,t,n,i){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(n,i),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(n,i),t.state!==e&&jx.enqueueReplaceState(t,t.state,null)}function Zo(e,t){var n=t;if("ref"in t){n={};for(var i in t)i!=="ref"&&(n[i]=t[i])}if(e=e.defaultProps){n===t&&(n=Mt({},n));for(var s in e)n[s]===void 0&&(n[s]=e[s])}return n}var dr=!1,Sn=!1,F1=!1,l3=typeof WeakSet=="function"?WeakSet:Set,rn=null;function qT(e,t,n){n.props=Zo(e.type,e.memoizedProps),n.state=e.memoizedState;try{n.componentWillUnmount()}catch(i){yt(e,t,i)}}function bo(e,t){try{var n=e.ref;if(n!==null){var i=e.stateNode;switch(e.tag){case 26:case 27:case 5:var s=i;break;default:s=i}typeof n=="function"?e.refCleanup=n(s):n.current=s}}catch(r){yt(e,t,r)}}function oi(e,t){var n=e.ref,i=e.refCleanup;if(n!==null)if(typeof i=="function")try{i()}catch(s){yt(e,t,s)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof n=="function")try{n(null)}catch(s){yt(e,t,s)}else n.current=null}function Nx(e,t,n){try{n()}catch(i){yt(e,t,i)}}var c3=!1;function k9(e,t){if(Ix=wg,e=UM(),g_(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var i=n.getSelection&&n.getSelection();if(i&&i.rangeCount!==0){n=i.anchorNode;var s=i.anchorOffset,r=i.focusNode;i=i.focusOffset;try{n.nodeType,r.nodeType}catch{n=null;break e}var a=0,o=-1,c=-1,d=0,h=0,m=e,g=null;t:for(;;){for(var v;m!==n||s!==0&&m.nodeType!==3||(o=a+s),m!==r||i!==0&&m.nodeType!==3||(c=a+i),m.nodeType===3&&(a+=m.nodeValue.length),(v=m.firstChild)!==null;)g=m,m=v;for(;;){if(m===e)break t;if(g===n&&++d===s&&(o=a),g===r&&++h===i&&(c=a),(v=m.nextSibling)!==null)break;m=g,g=m.parentNode}m=v}n=o===-1||c===-1?null:{start:o,end:c}}else n=null}n=n||{start:0,end:0}}else n=null;for(Bx={focusedElem:e,selectionRange:n},wg=!1,rn=t;rn!==null;)if(t=rn,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,rn=e;else for(;rn!==null;){t=rn;try{var b=t.alternate,w=t.flags;switch(t.tag){case 0:break;case 11:case 15:break;case 1:if(w&1024&&b!==null){var M=b.memoizedState,y=t.stateNode,S=y.getSnapshotBeforeUpdate(Zo(t.type,b.memoizedProps),M);y.__reactInternalSnapshotBeforeUpdate=S}break;case 3:if(w&1024){var T=t.stateNode.containerInfo,N=T.nodeType;if(N===9)Hx(T);else if(N===1)switch(T.nodeName){case"HEAD":case"HTML":case"BODY":Hx(T);break;default:T.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if(w&1024)throw Error(ee(163))}}catch(k){yt(t,t.return,k)}if(e=t.sibling,e!==null){e.return=t.return,rn=e;break}rn=t.return}return b=c3,c3=!1,b}function Lc(e,t,n){var i=t.updateQueue;if(i=i!==null?i.lastEffect:null,i!==null){var s=i=i.next;do{if((s.tag&e)===e){var r=s.inst,a=r.destroy;a!==void 0&&(r.destroy=void 0,Nx(t,n,a))}s=s.next}while(s!==i)}}function z_(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var i=n.create,s=n.inst;i=i(),s.destroy=i}n=n.next}while(n!==t)}}function XT(e,t){try{z_(t,e)}catch(n){yt(e,e.return,n)}}function KT(e){var t=e.updateQueue;if(t!==null){var n=e.stateNode;try{YT(t,n)}catch(i){yt(e,e.return,i)}}}function QT(e){var t=e.type,n=e.memoizedProps,i=e.stateNode;try{e:switch(t){case"button":case"input":case"select":case"textarea":n.autoFocus&&i.focus();break e;case"img":n.src?i.src=n.src:n.srcSet&&(i.srcset=n.srcSet)}}catch(s){yt(e,e.return,s)}}function JT(e,t,n){var i=n.flags;switch(n.tag){case 0:case 11:case 15:tr(e,n),i&4&&XT(n,5);break;case 1:if(tr(e,n),i&4)if(e=n.stateNode,t===null)try{e.componentDidMount()}catch(o){yt(n,n.return,o)}else{var s=Zo(n.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(s,t,e.__reactInternalSnapshotBeforeUpdate)}catch(o){yt(n,n.return,o)}}i&64&&KT(n),i&512&&bo(n,n.return);break;case 3:if(tr(e,n),i&64&&(i=n.updateQueue,i!==null)){if(e=null,n.child!==null)switch(n.child.tag){case 27:case 5:e=n.child.stateNode;break;case 1:e=n.child.stateNode}try{YT(i,e)}catch(o){yt(n,n.return,o)}}break;case 26:tr(e,n),i&512&&bo(n,n.return);break;case 27:case 5:tr(e,n),t===null&&i&4&&QT(n),i&512&&bo(n,n.return);break;case 12:tr(e,n);break;case 13:tr(e,n),i&4&&i8(e,n);break;case 22:if(s=n.memoizedState!==null||dr,!s){t=t!==null&&t.memoizedState!==null||Sn;var r=dr,a=Sn;dr=s,(Sn=t)&&!a?Yr(e,n,(n.subtreeFlags&8772)!==0):tr(e,n),dr=r,Sn=a}i&512&&(n.memoizedProps.mode==="manual"?bo(n,n.return):oi(n,n.return));break;default:tr(e,n)}}function e8(e){var t=e.alternate;t!==null&&(e.alternate=null,e8(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&c_(t)),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function t8(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27||e.tag===4}function U1(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||t8(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==27&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function kx(e,t,n){var i=e.tag;if(i===5||i===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=Lp));else if(i!==4&&i!==27&&(e=e.child,e!==null))for(kx(e,t,n),e=e.sibling;e!==null;)kx(e,t,n),e=e.sibling}function dg(e,t,n){var i=e.tag;if(i===5||i===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(i!==4&&i!==27&&(e=e.child,e!==null))for(dg(e,t,n),e=e.sibling;e!==null;)dg(e,t,n),e=e.sibling}var Yt=null,si=!1;function er(e,t,n){for(n=n.child;n!==null;)n8(e,t,n),n=n.sibling}function n8(e,t,n){if(ui&&typeof ui.onCommitFiberUnmount=="function")try{ui.onCommitFiberUnmount(kf,n)}catch{}switch(n.tag){case 26:Sn||oi(n,t),er(e,t,n),n.memoizedState?n.memoizedState.count--:n.stateNode&&(n=n.stateNode,n.parentNode.removeChild(n));break;case 27:Sn||oi(n,t);var i=Yt,s=si;for(Yt=n.stateNode,er(e,t,n),n=n.stateNode,e=n.attributes;e.length;)n.removeAttributeNode(e[0]);c_(n),Yt=i,si=s;break;case 5:Sn||oi(n,t);case 6:i=Yt,s=si,Yt=null,er(e,t,n),Yt=i,si=s,Yt!==null&&(si?(e=Yt,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):Yt.removeChild(n.stateNode));break;case 18:Yt!==null&&(si?(e=Yt,n=n.stateNode,e.nodeType===8?tv(e.parentNode,n):e.nodeType===1&&tv(e,n),rf(e)):tv(Yt,n.stateNode));break;case 4:i=Yt,s=si,Yt=n.stateNode.containerInfo,si=!0,er(e,t,n),Yt=i,si=s;break;case 0:case 11:case 14:case 15:if(!Sn&&(i=n.updateQueue,i!==null&&(i=i.lastEffect,i!==null))){s=i=i.next;do{var r=s.tag,a=s.inst,o=a.destroy;o!==void 0&&(r&2||r&4)&&(a.destroy=void 0,Nx(n,t,o)),s=s.next}while(s!==i)}er(e,t,n);break;case 1:Sn||(oi(n,t),i=n.stateNode,typeof i.componentWillUnmount=="function"&&qT(n,t,i)),er(e,t,n);break;case 21:er(e,t,n);break;case 22:oi(n,t),Sn=(i=Sn)||n.memoizedState!==null,er(e,t,n),Sn=i;break;default:er(e,t,n)}}function i8(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{rf(e)}catch(n){yt(t,t.return,n)}}function E9(e){switch(e.tag){case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new l3),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new l3),t;default:throw Error(ee(435,e.tag))}}function Z1(e,t){var n=E9(e);t.forEach(function(i){var s=Z9.bind(null,e,i);n.has(i)||(n.add(i),i.then(s,s))})}function Zi(e,t){var n=t.deletions;if(n!==null)for(var i=0;i<n.length;i++){var s=n[i];try{var r=e,a=t,o=a;e:for(;o!==null;){switch(o.tag){case 27:case 5:Yt=o.stateNode,si=!1;break e;case 3:Yt=o.stateNode.containerInfo,si=!0;break e;case 4:Yt=o.stateNode.containerInfo,si=!0;break e}o=o.return}if(Yt===null)throw Error(ee(160));n8(r,a,s),Yt=null,si=!1;var c=s.alternate;c!==null&&(c.return=null),s.return=null}catch(d){yt(s,t,d)}}if(t.subtreeFlags&13878)for(t=t.child;t!==null;)s8(t,e),t=t.sibling}var Xi=null;function s8(e,t){var n=e.alternate,i=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(Zi(t,e),$i(e),i&4){try{Lc(3,e,e.return),z_(3,e)}catch(v){yt(e,e.return,v)}try{Lc(5,e,e.return)}catch(v){yt(e,e.return,v)}}break;case 1:Zi(t,e),$i(e),i&512&&n!==null&&oi(n,n.return),i&64&&dr&&(e=e.updateQueue,e!==null&&(i=e.callbacks,i!==null&&(n=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=n===null?i:n.concat(i))));break;case 26:var s=Xi;if(Zi(t,e),$i(e),i&512&&n!==null&&oi(n,n.return),i&4){if(t=n!==null?n.memoizedState:null,i=e.memoizedState,n===null)if(i===null)if(e.stateNode===null){e:{i=e.type,n=e.memoizedProps,t=s.ownerDocument||s;t:switch(i){case"title":s=t.getElementsByTagName("title")[0],(!s||s[$d]||s[Nn]||s.namespaceURI==="http://www.w3.org/2000/svg"||s.hasAttribute("itemprop"))&&(s=t.createElement(i),t.head.insertBefore(s,t.querySelector("head > title"))),gn(s,i,n),s[Nn]=e,an(s),i=s;break e;case"link":var r=M3("link","href",t).get(i+(n.href||""));if(r){for(var a=0;a<r.length;a++)if(s=r[a],s.getAttribute("href")===(n.href==null?null:n.href)&&s.getAttribute("rel")===(n.rel==null?null:n.rel)&&s.getAttribute("title")===(n.title==null?null:n.title)&&s.getAttribute("crossorigin")===(n.crossOrigin==null?null:n.crossOrigin)){r.splice(a,1);break t}}s=t.createElement(i),gn(s,i,n),t.head.appendChild(s);break;case"meta":if(r=M3("meta","content",t).get(i+(n.content||""))){for(a=0;a<r.length;a++)if(s=r[a],s.getAttribute("content")===(n.content==null?null:""+n.content)&&s.getAttribute("name")===(n.name==null?null:n.name)&&s.getAttribute("property")===(n.property==null?null:n.property)&&s.getAttribute("http-equiv")===(n.httpEquiv==null?null:n.httpEquiv)&&s.getAttribute("charset")===(n.charSet==null?null:n.charSet)){r.splice(a,1);break t}}s=t.createElement(i),gn(s,i,n),t.head.appendChild(s);break;default:throw Error(ee(468,i))}s[Nn]=e,an(s),i=s}e.stateNode=i}else T3(s,e.type,e.stateNode);else e.stateNode=C3(s,i,e.memoizedProps);else if(t!==i)t===null?n.stateNode!==null&&(n=n.stateNode,n.parentNode.removeChild(n)):t.count--,i===null?T3(s,e.type,e.stateNode):C3(s,i,e.memoizedProps);else if(i===null&&e.stateNode!==null)try{var o=e.stateNode,c=e.memoizedProps;x3(o,e.type,n.memoizedProps,c),o[Vn]=c}catch(v){yt(e,e.return,v)}}break;case 27:if(i&4&&e.alternate===null){for(s=e.stateNode,r=e.memoizedProps,a=s.firstChild;a;){var d=a.nextSibling,h=a.nodeName;a[$d]||h==="HEAD"||h==="BODY"||h==="SCRIPT"||h==="STYLE"||h==="LINK"&&a.rel.toLowerCase()==="stylesheet"||s.removeChild(a),a=d}for(a=e.type,d=s.attributes;d.length;)s.removeAttributeNode(d[0]);gn(s,a,r),s[Nn]=e,s[Vn]=r}case 5:if(Zi(t,e),$i(e),i&512&&n!==null&&oi(n,n.return),e.flags&32){t=e.stateNode;try{Oc(t,"")}catch(v){yt(e,e.return,v)}}if(i&4&&(t=e.stateNode,t!=null)){s=e.memoizedProps,n=n!==null?n.memoizedProps:s,r=e.type;try{x3(t,r,n,s),t[Vn]=s}catch(v){yt(e,e.return,v)}}i&1024&&(F1=!0);break;case 6:if(Zi(t,e),$i(e),i&4){if(e.stateNode===null)throw Error(ee(162));i=e.stateNode,n=e.memoizedProps;try{i.nodeValue=n}catch(v){yt(e,e.return,v)}}break;case 3:if(Em=null,s=Xi,Xi=yg(t.containerInfo),Zi(t,e),Xi=s,$i(e),i&4&&n!==null&&n.memoizedState.isDehydrated)try{rf(t.containerInfo)}catch(v){yt(e,e.return,v)}F1&&(F1=!1,r8(e));break;case 4:i=Xi,Xi=yg(e.stateNode.containerInfo),Zi(t,e),$i(e),Xi=i;break;case 13:Zi(t,e),$i(e),e.child.flags&8192&&e.memoizedState!==null!=(n!==null&&n.memoizedState!==null)&&(U_=Ts()),i&4&&(i=e.updateQueue,i!==null&&(e.updateQueue=null,Z1(e,i)));break;case 22:i&512&&n!==null&&oi(n,n.return),o=e.memoizedState!==null,c=n!==null&&n.memoizedState!==null;var m=dr,g=Sn;if(dr=m||o,Sn=g||c,Zi(t,e),Sn=g,dr=m,$i(e),t=e.stateNode,t._current=e,t._visibility&=-3,t._visibility|=t._pendingVisibility&2,i&8192&&(t._visibility=o?t._visibility&-2:t._visibility|1,o&&(t=dr||Sn,n===null||c||t||zl(e)),e.memoizedProps===null||e.memoizedProps.mode!=="manual"))e:for(n=null,t=e;;){if(t.tag===5||t.tag===26||t.tag===27){if(n===null){n=t;try{s=t.stateNode,o?(r=s.style,typeof r.setProperty=="function"?r.setProperty("display","none","important"):r.display="none"):(a=t.stateNode,d=t.memoizedProps.style,h=d!=null&&d.hasOwnProperty("display")?d.display:null,a.style.display=h==null||typeof h=="boolean"?"":(""+h).trim())}catch(v){yt(e,e.return,v)}}}else if(t.tag===6){if(n===null)try{t.stateNode.nodeValue=o?"":t.memoizedProps}catch(v){yt(e,e.return,v)}}else if((t.tag!==22&&t.tag!==23||t.memoizedState===null||t===e)&&t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break e;for(;t.sibling===null;){if(t.return===null||t.return===e)break e;n===t&&(n=null),t=t.return}n===t&&(n=null),t.sibling.return=t.return,t=t.sibling}i&4&&(i=e.updateQueue,i!==null&&(n=i.retryQueue,n!==null&&(i.retryQueue=null,Z1(e,n))));break;case 19:Zi(t,e),$i(e),i&4&&(i=e.updateQueue,i!==null&&(e.updateQueue=null,Z1(e,i)));break;case 21:break;default:Zi(t,e),$i(e)}}function $i(e){var t=e.flags;if(t&2){try{if(e.tag!==27){e:{for(var n=e.return;n!==null;){if(t8(n)){var i=n;break e}n=n.return}throw Error(ee(160))}switch(i.tag){case 27:var s=i.stateNode,r=U1(e);dg(e,r,s);break;case 5:var a=i.stateNode;i.flags&32&&(Oc(a,""),i.flags&=-33);var o=U1(e);dg(e,o,a);break;case 3:case 4:var c=i.stateNode.containerInfo,d=U1(e);kx(e,d,c);break;default:throw Error(ee(161))}}}catch(h){yt(e,e.return,h)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function r8(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;r8(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function tr(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)JT(e,t.alternate,t),t=t.sibling}function zl(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:Lc(4,t,t.return),zl(t);break;case 1:oi(t,t.return);var n=t.stateNode;typeof n.componentWillUnmount=="function"&&qT(t,t.return,n),zl(t);break;case 26:case 27:case 5:oi(t,t.return),zl(t);break;case 22:oi(t,t.return),t.memoizedState===null&&zl(t);break;default:zl(t)}e=e.sibling}}function Yr(e,t,n){for(n=n&&(t.subtreeFlags&8772)!==0,t=t.child;t!==null;){var i=t.alternate,s=e,r=t,a=r.flags;switch(r.tag){case 0:case 11:case 15:Yr(s,r,n),XT(r,4);break;case 1:if(Yr(s,r,n),s=r.stateNode,typeof s.componentDidMount=="function")try{s.componentDidMount()}catch(c){yt(r,r.return,c)}if(i=r.updateQueue,i!==null){var o=i.shared.hiddenCallbacks;if(o!==null)for(i.shared.hiddenCallbacks=null,i=0;i<o.length;i++)GT(o[i],s)}n&&a&64&&KT(r),bo(r,r.return);break;case 26:case 27:case 5:Yr(s,r,n),n&&i===null&&a&4&&QT(r),bo(r,r.return);break;case 12:Yr(s,r,n);break;case 13:Yr(s,r,n),n&&a&4&&i8(s,r);break;case 22:r.memoizedState===null&&Yr(s,r,n),bo(r,r.return);break;default:Yr(s,r,n)}t=t.sibling}}function a8(e,t){try{z_(t,e)}catch(n){yt(e,e.return,n)}}function I_(e,t){var n=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),e=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(e=t.memoizedState.cachePool.pool),e!==n&&(e!=null&&e.refCount++,n!=null&&Of(n))}function B_(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&Of(e))}function Cl(e,t,n,i){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)o8(e,t,n,i),t=t.sibling}function o8(e,t,n,i){var s=t.flags;switch(t.tag){case 0:case 11:case 15:Cl(e,t,n,i),s&2048&&a8(t,9);break;case 3:Cl(e,t,n,i),s&2048&&(e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&Of(e)));break;case 23:break;case 22:var r=t.stateNode;t.memoizedState!==null?r._visibility&4?Cl(e,t,n,i):kd(e,t):r._visibility&4?Cl(e,t,n,i):(r._visibility|=4,Il(e,t,n,i,(t.subtreeFlags&10256)!==0)),s&2048&&I_(t.alternate,t);break;case 24:Cl(e,t,n,i),s&2048&&B_(t.alternate,t);break;default:Cl(e,t,n,i)}}function Il(e,t,n,i,s){for(s=s&&(t.subtreeFlags&10256)!==0,t=t.child;t!==null;){var r=e,a=t,o=n,c=i,d=a.flags;switch(a.tag){case 0:case 11:case 15:Il(r,a,o,c,s),a8(a,8);break;case 23:break;case 22:var h=a.stateNode;a.memoizedState!==null?h._visibility&4?Il(r,a,o,c,s):kd(r,a):(h._visibility|=4,Il(r,a,o,c,s)),s&&d&2048&&I_(a.alternate,a);break;case 24:Il(r,a,o,c,s),s&&d&2048&&B_(a.alternate,a);break;default:Il(r,a,o,c,s)}t=t.sibling}}function kd(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var n=e,i=t,s=i.flags;switch(i.tag){case 22:kd(n,i),s&2048&&I_(i.alternate,i);break;case 24:kd(n,i),s&2048&&B_(i.alternate,i);break;default:kd(n,i)}t=t.sibling}}var rd=8192;function Ml(e){if(e.subtreeFlags&rd)for(e=e.child;e!==null;)l8(e),e=e.sibling}function l8(e){switch(e.tag){case 26:Ml(e),e.flags&rd&&e.memoizedState!==null&&xz(Xi,e.memoizedState,e.memoizedProps);break;case 5:Ml(e);break;case 3:case 4:var t=Xi;Xi=yg(e.stateNode.containerInfo),Ml(e),Xi=t;break;case 22:e.memoizedState===null&&(t=e.alternate,t!==null&&t.memoizedState!==null?(t=rd,rd=16777216,Ml(e),rd=t):Ml(e));break;default:Ml(e)}}function c8(e){var t=e.alternate;if(t!==null&&(e=t.child,e!==null)){t.child=null;do t=e.sibling,e.sibling=null,e=t;while(e!==null)}}function $1(e){var t=e.deletions;if(e.flags&16){if(t!==null)for(var n=0;n<t.length;n++){var i=t[n];rn=i,d8(i,e)}c8(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)u8(e),e=e.sibling}function u8(e){switch(e.tag){case 0:case 11:case 15:$1(e),e.flags&2048&&Lc(9,e,e.return);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&4&&(e.return===null||e.return.tag!==13)?(t._visibility&=-5,jm(e)):$1(e);break;default:$1(e)}}function jm(e){var t=e.deletions;if(e.flags&16){if(t!==null)for(var n=0;n<t.length;n++){var i=t[n];rn=i,d8(i,e)}c8(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:Lc(8,t,t.return),jm(t);break;case 22:n=t.stateNode,n._visibility&4&&(n._visibility&=-5,jm(t));break;default:jm(t)}e=e.sibling}}function d8(e,t){for(;rn!==null;){var n=rn;switch(n.tag){case 0:case 11:case 15:Lc(8,n,t);break;case 23:case 22:if(n.memoizedState!==null&&n.memoizedState.cachePool!==null){var i=n.memoizedState.cachePool.pool;i!=null&&i.refCount++}break;case 24:Of(n.memoizedState.cache)}if(i=n.child,i!==null)i.return=n,rn=i;else e:for(n=e;rn!==null;){i=rn;var s=i.sibling,r=i.return;if(e8(i),i===n){rn=null;break e}if(s!==null){s.return=r,rn=s;break e}rn=r}}}function A9(e,t,n,i){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=i,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Oi(e,t,n,i){return new A9(e,t,n,i)}function V_(e){return e=e.prototype,!(!e||!e.isReactComponent)}function ba(e,t){var n=e.alternate;return n===null?(n=Oi(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&31457280,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n.refCleanup=e.refCleanup,n}function f8(e,t){e.flags&=31457282;var n=e.alternate;return n===null?(e.childLanes=0,e.lanes=t,e.child=null,e.subtreeFlags=0,e.memoizedProps=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.stateNode=null):(e.childLanes=n.childLanes,e.lanes=n.lanes,e.child=n.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=n.memoizedProps,e.memoizedState=n.memoizedState,e.updateQueue=n.updateQueue,e.type=n.type,t=n.dependencies,e.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),e}function Nm(e,t,n,i,s,r){var a=0;if(i=e,typeof e=="function")V_(e)&&(a=1);else if(typeof e=="string")a=pz(e,n,Ms.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case Ul:return Do(n.children,s,r,t);case dM:a=8,s|=24;break;case Kv:return e=Oi(12,n,t,s|2),e.elementType=Kv,e.lanes=r,e;case Qv:return e=Oi(13,n,t,s),e.elementType=Qv,e.lanes=r,e;case Jv:return e=Oi(19,n,t,s),e.elementType=Jv,e.lanes=r,e;case hM:return h8(n,s,r,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case nL:case fr:a=10;break e;case fM:a=9;break e;case r_:a=11;break e;case a_:a=14;break e;case Jr:a=16,i=null;break e}a=29,n=Error(ee(130,e===null?"null":typeof e,"")),i=null}return t=Oi(a,n,t,s),t.elementType=e,t.type=i,t.lanes=r,t}function Do(e,t,n,i){return e=Oi(7,e,i,t),e.lanes=n,e}function h8(e,t,n,i){e=Oi(22,e,i,t),e.elementType=hM,e.lanes=n;var s={_visibility:1,_pendingVisibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null,_current:null,detach:function(){var r=s._current;if(r===null)throw Error(ee(456));if(!(s._pendingVisibility&2)){var a=Da(r,2);a!==null&&(s._pendingVisibility|=2,Hn(a,r,2))}},attach:function(){var r=s._current;if(r===null)throw Error(ee(456));if(s._pendingVisibility&2){var a=Da(r,2);a!==null&&(s._pendingVisibility&=-3,Hn(a,r,2))}}};return e.stateNode=s,e}function W1(e,t,n){return e=Oi(6,e,null,t),e.lanes=n,e}function G1(e,t,n){return t=Oi(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function nr(e){e.flags|=4}function u3(e,t){if(t.type!=="stylesheet"||t.state.loading&4)e.flags&=-16777217;else if(e.flags|=16777216,!P8(t))if(y8())e.flags|=8192;else throw Sd=hx,QM}function Ph(e,t){t!==null?e.flags|=4:e.flags&16384&&(t=e.tag!==22?bM():536870912,e.lanes|=t)}function Iu(e,t){if(!it)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var i=null;n!==null;)n.alternate!==null&&(i=n),n=n.sibling;i===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:i.sibling=null}}function Dt(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,i=0;if(t)for(var s=e.child;s!==null;)n|=s.lanes|s.childLanes,i|=s.subtreeFlags&31457280,i|=s.flags&31457280,s.return=e,s=s.sibling;else for(s=e.child;s!==null;)n|=s.lanes|s.childLanes,i|=s.subtreeFlags,i|=s.flags,s.return=e,s=s.sibling;return e.subtreeFlags|=i,e.childLanes=n,t}function O9(e,t,n){var i=t.pendingProps;switch(y_(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Dt(t),null;case 1:return Dt(t),null;case 3:return n=t.stateNode,i=null,e!==null&&(i=e.memoizedState.cache),t.memoizedState.cache!==i&&(t.flags|=2048),yr(Qt),Ec(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(e===null||e.child===null)&&(Lu(t)?nr(t):e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,Ki!==null&&(Dx(Ki),Ki=null))),Dt(t),null;case 26:return n=t.memoizedState,e===null?(nr(t),n!==null?(Dt(t),u3(t,n)):(Dt(t),t.flags&=-16777217)):n?n!==e.memoizedState?(nr(t),Dt(t),u3(t,n)):(Dt(t),t.flags&=-16777217):(e.memoizedProps!==i&&nr(t),Dt(t),t.flags&=-16777217),null;case 27:Km(t),n=ya.current;var s=t.type;if(e!==null&&t.stateNode!=null)e.memoizedProps!==i&&nr(t);else{if(!i){if(t.stateNode===null)throw Error(ee(166));return Dt(t),null}e=Ms.current,Lu(t)?H4(t):(e=A8(s,i,n),t.stateNode=e,nr(t))}return Dt(t),null;case 5:if(Km(t),n=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==i&&nr(t);else{if(!i){if(t.stateNode===null)throw Error(ee(166));return Dt(t),null}if(e=Ms.current,Lu(t))H4(t);else{switch(s=xg(ya.current),e){case 1:e=s.createElementNS("http://www.w3.org/2000/svg",n);break;case 2:e=s.createElementNS("http://www.w3.org/1998/Math/MathML",n);break;default:switch(n){case"svg":e=s.createElementNS("http://www.w3.org/2000/svg",n);break;case"math":e=s.createElementNS("http://www.w3.org/1998/Math/MathML",n);break;case"script":e=s.createElement("div"),e.innerHTML="<script><\/script>",e=e.removeChild(e.firstChild);break;case"select":e=typeof i.is=="string"?s.createElement("select",{is:i.is}):s.createElement("select"),i.multiple?e.multiple=!0:i.size&&(e.size=i.size);break;default:e=typeof i.is=="string"?s.createElement(n,{is:i.is}):s.createElement(n)}}e[Nn]=t,e[Vn]=i;e:for(s=t.child;s!==null;){if(s.tag===5||s.tag===6)e.appendChild(s.stateNode);else if(s.tag!==4&&s.tag!==27&&s.child!==null){s.child.return=s,s=s.child;continue}if(s===t)break e;for(;s.sibling===null;){if(s.return===null||s.return===t)break e;s=s.return}s.sibling.return=s.return,s=s.sibling}t.stateNode=e;e:switch(gn(e,n,i),n){case"button":case"input":case"select":case"textarea":e=!!i.autoFocus;break e;case"img":e=!0;break e;default:e=!1}e&&nr(t)}}return Dt(t),t.flags&=-16777217,null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==i&&nr(t);else{if(typeof i!="string"&&t.stateNode===null)throw Error(ee(166));if(e=ya.current,Lu(t)){if(e=t.stateNode,n=t.memoizedProps,i=null,s=zn,s!==null)switch(s.tag){case 27:case 5:i=s.memoizedProps}e[Nn]=t,e=!!(e.nodeValue===n||i!==null&&i.suppressHydrationWarning===!0||N8(e.nodeValue,n)),e||Vo(t)}else e=xg(e).createTextNode(i),e[Nn]=t,t.stateNode=e}return Dt(t),null;case 13:if(i=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(s=Lu(t),i!==null&&i.dehydrated!==null){if(e===null){if(!s)throw Error(ee(318));if(s=t.memoizedState,s=s!==null?s.dehydrated:null,!s)throw Error(ee(317));s[Nn]=t}else Af(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Dt(t),s=!1}else Ki!==null&&(Dx(Ki),Ki=null),s=!0;if(!s)return t.flags&256?(gr(t),t):(gr(t),null)}if(gr(t),t.flags&128)return t.lanes=n,t;if(n=i!==null,e=e!==null&&e.memoizedState!==null,n){i=t.child,s=null,i.alternate!==null&&i.alternate.memoizedState!==null&&i.alternate.memoizedState.cachePool!==null&&(s=i.alternate.memoizedState.cachePool.pool);var r=null;i.memoizedState!==null&&i.memoizedState.cachePool!==null&&(r=i.memoizedState.cachePool.pool),r!==s&&(i.flags|=2048)}return n!==e&&n&&(t.child.flags|=8192),Ph(t,t.updateQueue),Dt(t),null;case 4:return Ec(),e===null&&G_(t.stateNode.containerInfo),Dt(t),null;case 10:return yr(t.type),Dt(t),null;case 19:if(ln(Jt),s=t.memoizedState,s===null)return Dt(t),null;if(i=(t.flags&128)!==0,r=s.rendering,r===null)if(i)Iu(s,!1);else{if(Bt!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(r=ag(e),r!==null){for(t.flags|=128,Iu(s,!1),e=r.updateQueue,t.updateQueue=e,Ph(t,e),t.subtreeFlags=0,e=n,n=t.child;n!==null;)f8(n,e),n=n.sibling;return kt(Jt,Jt.current&1|2),t.child}e=e.sibling}s.tail!==null&&Ts()>hg&&(t.flags|=128,i=!0,Iu(s,!1),t.lanes=4194304)}else{if(!i)if(e=ag(r),e!==null){if(t.flags|=128,i=!0,e=e.updateQueue,t.updateQueue=e,Ph(t,e),Iu(s,!0),s.tail===null&&s.tailMode==="hidden"&&!r.alternate&&!it)return Dt(t),null}else 2*Ts()-s.renderingStartTime>hg&&n!==536870912&&(t.flags|=128,i=!0,Iu(s,!1),t.lanes=4194304);s.isBackwards?(r.sibling=t.child,t.child=r):(e=s.last,e!==null?e.sibling=r:t.child=r,s.last=r)}return s.tail!==null?(t=s.tail,s.rendering=t,s.tail=t.sibling,s.renderingStartTime=Ts(),t.sibling=null,e=Jt.current,kt(Jt,i?e&1|2:e&1),t):(Dt(t),null);case 22:case 23:return gr(t),__(),i=t.memoizedState!==null,e!==null?e.memoizedState!==null!==i&&(t.flags|=8192):i&&(t.flags|=8192),i?n&536870912&&!(t.flags&128)&&(Dt(t),t.subtreeFlags&6&&(t.flags|=8192)):Dt(t),n=t.updateQueue,n!==null&&Ph(t,n.retryQueue),n=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),i=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(i=t.memoizedState.cachePool.pool),i!==n&&(t.flags|=2048),e!==null&&ln(Oo),null;case 24:return n=null,e!==null&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),yr(Qt),Dt(t),null;case 25:return null}throw Error(ee(156,t.tag))}function D9(e,t){switch(y_(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return yr(Qt),Ec(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return Km(t),null;case 13:if(gr(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(ee(340));Af()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return ln(Jt),null;case 4:return Ec(),null;case 10:return yr(t.type),null;case 22:case 23:return gr(t),__(),e!==null&&ln(Oo),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return yr(Qt),null;case 25:return null;default:return null}}function m8(e,t){switch(y_(t),t.tag){case 3:yr(Qt),Ec();break;case 26:case 27:case 5:Km(t);break;case 4:Ec();break;case 13:gr(t);break;case 19:ln(Jt);break;case 10:yr(t.type);break;case 22:case 23:gr(t),__(),e!==null&&ln(Oo);break;case 24:yr(Qt)}}var P9={getCacheForType:function(e){var t=kn(Qt),n=t.data.get(e);return n===void 0&&(n=e(),t.data.set(e,n)),n}},R9=typeof WeakMap=="function"?WeakMap:Map,ut=0,mt=null,We=null,st=0,Rt=0,Ci=null,H_=!1,Or=0,Bt=0,Dr=0,tu=0,F_=0,Xn=0,Ed=null,Ji=null,zc=!1,fg=!1,U_=0,hg=1/0,Qd=null,wa=null,Rh=!1,xo=null,Ad=0,Ex=0,Ax=null,Od=0,Ox=null;function br(){if(ut&2&&st!==0)return st&-st;if(Ie.T!==null){var e=Pc;return e!==0?e:W_()}return MM()}function g8(){Xn===0&&(Xn=!(st&536870912)||it?_M():536870912);var e=Os.current;return e!==null&&(e.flags|=32),Xn}function Hn(e,t,n){(e===mt&&Rt===2||e.cancelPendingCommit!==null)&&(sl(e,0),Ss(e,st,Xn)),Pf(e,n),(!(ut&2)||e!==mt)&&(e===mt&&(!(ut&2)&&(tu|=n),Bt===4&&Ss(e,st,Xn)),Kn(e))}function p8(e,t){if(ut&6)throw Error(ee(327));var n=e.callbackNode;if(gc()&&e.callbackNode!==n)return null;var i=Jm(e,e===mt?st:0);if(i===0)return null;var s=(i&60)===0&&(i&e.expiredLanes)===0&&!t;if(t=s?B9(e,i):mg(e,i),t!==0){var r=s;do{if(t===6)Ss(e,i,0);else{if(s=e.current.alternate,r&&!L9(s)){t=mg(e,i),r=!1;continue}if(t===2){r=i;var a=yM(e,r);if(a!==0&&(i=a,t=v8(e,r,a),r=!1,t!==2))continue}if(t===1){sl(e,0),Ss(e,i,0);break}e.finishedWork=s,e.finishedLanes=i;e:{switch(r=e,t){case 0:case 1:throw Error(ee(345));case 4:if((i&4194176)===i){Ss(r,i,Xn);break e}break;case 2:Ji=null;break;case 3:case 5:break;default:throw Error(ee(329))}if((i&62914560)===i&&(t=U_+300-Ts(),10<t)){if(Ss(r,i,Xn),Jm(r,0)!==0)break e;r.timeoutHandle=E8(d3.bind(null,r,s,Ji,Qd,zc,i,Xn),t);break e}d3(r,s,Ji,Qd,zc,i,Xn)}}break}while(!0)}return Kn(e),M8(e,Ts()),e=e.callbackNode===n?p8.bind(null,e):null,e}function v8(e,t,n){var i=Ed,s=e.current.memoizedState.isDehydrated;if(s&&(sl(e,n).flags|=256),n=mg(e,n),n!==2){if(H_&&!s)return e.errorRecoveryDisabledLanes|=t,tu|=t,4;e=Ji,Ji=i,e!==null&&Dx(e)}return n}function Dx(e){Ji===null?Ji=e:Ji.push.apply(Ji,e)}function d3(e,t,n,i,s,r,a){var o=t.subtreeFlags;if((o&8192||(o&16785408)===16785408)&&(tf={stylesheets:null,count:0,unsuspend:vz},l8(t),t=yz(),t!==null)){e.cancelPendingCommit=t(Rx.bind(null,e,n,i,s)),Ss(e,r,a);return}Rx(e,n,i,s,a)}function L9(e){for(var t=e;;){if(t.flags&16384){var n=t.updateQueue;if(n!==null&&(n=n.stores,n!==null))for(var i=0;i<n.length;i++){var s=n[i],r=s.getSnapshot;s=s.value;try{if(!Ii(r(),s))return!1}catch{return!1}}}if(n=t.child,t.subtreeFlags&16384&&n!==null)n.return=t,t=n;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function Pf(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0),ut&2?zc=!0:ut&4&&(fg=!0),$_()}function Ss(e,t,n){t&=~F_,t&=~tu,e.suspendedLanes|=t,e.pingedLanes&=~t;for(var i=e.expirationTimes,s=t;0<s;){var r=31-Li(s),a=1<<r;i[r]=-1,s&=~a}n!==0&&wM(e,n,t)}function z9(e,t){if(ut&6)throw Error(ee(327));if(gc())return Kn(e),null;var n=mg(e,t);if(n===2){var i=t,s=yM(e,i);s!==0&&(t=s,n=v8(e,i,s))}return n===1?(sl(e,0),Ss(e,t,0),Kn(e),null):n===6?(Ss(e,t,Xn),Kn(e),null):(e.finishedWork=e.current.alternate,e.finishedLanes=t,Rx(e,Ji,Qd,zc,Xn),Kn(e),null)}function Pp(){return ut&6?!0:(Rf(),!1)}function Z_(){if(We!==null){if(Rt===0)var e=We.return;else e=We,Dp(),j_(e),uc=null,Xd=0,e=We;for(;e!==null;)m8(e.alternate,e),e=e.return;We=null}}function sl(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;n!==-1&&(e.timeoutHandle=-1,tz(n)),n=e.cancelPendingCommit,n!==null&&(e.cancelPendingCommit=null,n()),Z_(),mt=e,We=n=ba(e.current,null),st=t,Rt=0,Ci=null,H_=!1,Xn=F_=tu=Dr=Bt=0,Ji=Ed=null,zc=!1,t&8&&(t|=t&32);var i=e.entangledLanes;if(i!==0)for(e=e.entanglements,i&=t;0<i;){var s=31-Li(i),r=1<<s;t|=e[s],i&=~r}return Or=t,Tp(),n}function x8(e,t){Ue=null,Ie.H=Ds,t===wd?(t=Z4(),Rt=y8()&&!(Dr&134217727)&&!(tu&134217727)?2:3):t===QM?(t=Z4(),Rt=4):Rt=t===VT?8:t!==null&&typeof t=="object"&&typeof t.then=="function"?6:1,Ci=t,We===null&&(Bt=1,ug(e,Ei(t,e.current)))}function y8(){var e=Os.current;return e===null?!0:(st&4194176)===st?js===null:(st&62914560)===st||st&536870912?e===js:!1}function _8(){var e=Ie.H;return Ie.H=Ds,e===null?Ds:e}function b8(){var e=Ie.A;return Ie.A=P9,e}function Px(){Bt=4,!(Dr&134217727)&&!(tu&134217727)||mt===null||Ss(mt,st,Xn)}function mg(e,t){var n=ut;ut|=2;var i=_8(),s=b8();(mt!==e||st!==t)&&(Qd=null,sl(e,t)),t=!1;e:do try{if(Rt!==0&&We!==null){var r=We,a=Ci;switch(Rt){case 8:Z_(),Bt=6;break e;case 3:case 2:t||Os.current!==null||(t=!0);default:Rt=0,Ci=null,ad(e,r,a)}}I9();break}catch(o){x8(e,o)}while(!0);if(t&&e.shellSuspendCounter++,Dp(),ut=n,Ie.H=i,Ie.A=s,We!==null)throw Error(ee(261));return mt=null,st=0,Tp(),Bt}function I9(){for(;We!==null;)w8(We)}function B9(e,t){var n=ut;ut|=2;var i=_8(),s=b8();(mt!==e||st!==t)&&(Qd=null,hg=Ts()+500,sl(e,t));e:do try{if(Rt!==0&&We!==null){t=We;var r=Ci;t:switch(Rt){case 1:Rt=0,Ci=null,ad(e,t,r);break;case 2:if(U4(r)){Rt=0,Ci=null,f3(t);break}t=function(){Rt===2&&mt===e&&(Rt=7),Kn(e)},r.then(t,t);break e;case 3:Rt=7;break e;case 4:Rt=5;break e;case 7:U4(r)?(Rt=0,Ci=null,f3(t)):(Rt=0,Ci=null,ad(e,t,r));break;case 5:var a=null;switch(We.tag){case 26:a=We.memoizedState;case 5:case 27:var o=We;if(!a||P8(a)){Rt=0,Ci=null;var c=o.sibling;if(c!==null)We=c;else{var d=o.return;d!==null?(We=d,Rp(d)):We=null}break t}}Rt=0,Ci=null,ad(e,t,r);break;case 6:Rt=0,Ci=null,ad(e,t,r);break;case 8:Z_(),Bt=6;break e;default:throw Error(ee(462))}}V9();break}catch(h){x8(e,h)}while(!0);return Dp(),Ie.H=i,Ie.A=s,ut=n,We!==null?0:(mt=null,st=0,Tp(),Bt)}function V9(){for(;We!==null&&!oL();)w8(We)}function w8(e){var t=$T(e.alternate,e,Or);e.memoizedProps=e.pendingProps,t===null?Rp(e):We=t}function f3(e){var t=e,n=t.alternate;switch(t.tag){case 15:case 0:t=n3(n,t,t.pendingProps,t.type,void 0,st);break;case 11:t=n3(n,t,t.pendingProps,t.type.render,t.ref,st);break;case 5:j_(t);default:m8(n,t),t=We=f8(t,Or),t=$T(n,t,Or)}e.memoizedProps=e.pendingProps,t===null?Rp(e):We=t}function ad(e,t,n){Dp(),j_(t),uc=null,Xd=0;var i=t.return;try{if(j9(e,i,t,n,st)){Bt=1,ug(e,Ei(n,e.current)),We=null;return}}catch(s){if(i!==null)throw We=i,s;Bt=1,ug(e,Ei(n,e.current)),We=null;return}if(t.flags&32768)e:{e=t;do{if(t=D9(e.alternate,e),t!==null){t.flags&=32767,We=t;break e}e=e.return,e!==null&&(e.flags|=32768,e.subtreeFlags=0,e.deletions=null),We=e}while(e!==null);Bt=6,We=null}else Rp(t)}function Rp(e){var t=e;do{e=t.return;var n=O9(t.alternate,t,Or);if(n!==null){We=n;return}if(t=t.sibling,t!==null){We=t;return}We=t=e}while(t!==null);Bt===0&&(Bt=5)}function Rx(e,t,n,i,s){var r=Ie.T,a=Ct.p;try{Ct.p=2,Ie.T=null,H9(e,t,n,i,a,s)}finally{Ie.T=r,Ct.p=a}return null}function H9(e,t,n,i,s,r){do gc();while(xo!==null);if(ut&6)throw Error(ee(327));var a=e.finishedWork,o=e.finishedLanes;if(a===null)return null;if(e.finishedWork=null,e.finishedLanes=0,a===e.current)throw Error(ee(177));e.callbackNode=null,e.callbackPriority=0,e.cancelPendingCommit=null;var c=a.lanes|a.childLanes;if(c|=p_,xL(e,c,r),fg=!1,e===mt&&(We=mt=null,st=0),!(a.subtreeFlags&10256)&&!(a.flags&10256)||Rh||(Rh=!0,Ex=c,Ax=n,$9(Qm,function(){return gc(),null})),n=(a.flags&15990)!==0,a.subtreeFlags&15990||n){n=Ie.T,Ie.T=null,r=Ct.p,Ct.p=2;var d=ut;ut|=4,k9(e,a),s8(a,e),u9(Bx),wg=!!Ix,Bx=Ix=null,e.current=a,JT(e,a.alternate,a),lL(),ut=d,Ct.p=r,Ie.T=n}else e.current=a;if(Rh?(Rh=!1,xo=e,Ad=o):S8(e,c),c=e.pendingLanes,c===0&&(wa=null),hL(a.stateNode),Kn(e),t!==null)for(s=e.onRecoverableError,a=0;a<t.length;a++)c=t[a],s(c.value,{componentStack:c.stack});return Ad&3&&gc(),c=e.pendingLanes,i||fg||o&4194218&&c&42?e===Ox?Od++:(Od=0,Ox=e):Od=0,Rf(),null}function S8(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,Of(t)))}function gc(){if(xo!==null){var e=xo,t=Ex;Ex=0;var n=CM(Ad),i=Ie.T,s=Ct.p;try{if(Ct.p=32>n?32:n,Ie.T=null,xo===null)var r=!1;else{n=Ax,Ax=null;var a=xo,o=Ad;if(xo=null,Ad=0,ut&6)throw Error(ee(331));var c=ut;if(ut|=4,u8(a.current),o8(a,a.current,o,n),ut=c,Rf(),ui&&typeof ui.onPostCommitFiberRoot=="function")try{ui.onPostCommitFiberRoot(kf,a)}catch{}r=!0}return r}finally{Ct.p=s,Ie.T=i,S8(e,t)}}return!1}function h3(e,t,n){t=Ei(n,t),t=yx(e.stateNode,t,2),e=_a(e,t,2),e!==null&&(Pf(e,2),Kn(e))}function yt(e,t,n){if(e.tag===3)h3(e,e,n);else for(;t!==null;){if(t.tag===3){h3(t,e,n);break}else if(t.tag===1){var i=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof i.componentDidCatch=="function"&&(wa===null||!wa.has(i))){e=Ei(n,e),n=IT(2),i=_a(t,n,2),i!==null&&(BT(n,i,t,e),Pf(i,2),Kn(i));break}}t=t.return}}function Y1(e,t,n){var i=e.pingCache;if(i===null){i=e.pingCache=new R9;var s=new Set;i.set(t,s)}else s=i.get(t),s===void 0&&(s=new Set,i.set(t,s));s.has(n)||(H_=!0,s.add(n),e=F9.bind(null,e,t,n),t.then(e,e))}function F9(e,t,n){var i=e.pingCache;i!==null&&i.delete(t),e.pingedLanes|=e.suspendedLanes&n,ut&2?zc=!0:ut&4&&(fg=!0),$_(),mt===e&&(st&n)===n&&(Bt===4||Bt===3&&(st&62914560)===st&&300>Ts()-U_?!(ut&2)&&sl(e,0):F_|=n),Kn(e)}function C8(e,t){t===0&&(t=bM()),e=Da(e,t),e!==null&&(Pf(e,t),Kn(e))}function U9(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),C8(e,n)}function Z9(e,t){var n=0;switch(e.tag){case 13:var i=e.stateNode,s=e.memoizedState;s!==null&&(n=s.retryLane);break;case 19:i=e.stateNode;break;case 22:i=e.stateNode._retryCache;break;default:throw Error(ee(314))}i!==null&&i.delete(t),C8(e,n)}function $_(){if(50<Od)throw Od=0,Ox=null,ut&2&&mt!==null&&(mt.errorRecoveryDisabledLanes|=st),Error(ee(185))}function $9(e,t){return o_(e,t)}var gg=null,Bl=null,Lx=!1,pg=!1,q1=!1,Po=0;function Kn(e){e!==Bl&&e.next===null&&(Bl===null?gg=Bl=e:Bl=Bl.next=e),pg=!0,Lx||(Lx=!0,G9(W9))}function Rf(){if(!q1&&pg){q1=!0;do for(var e=!1,t=gg;t!==null;){var n=st;n=Jm(t,t===mt?n:0),n&3&&(e=!0,z9(t,n)),t=t.next}while(e);q1=!1}}function W9(){pg=Lx=!1;for(var e=Ts(),t=null,n=gg;n!==null;){var i=n.next;if(Po!==0&&ez()){var s=n,r=Po;s.pendingLanes|=2,s.entangledLanes|=2,s.entanglements[1]|=r}s=M8(n,e),s===0?(n.next=null,t===null?gg=i:t.next=i,i===null&&(Bl=t)):(t=n,s&3&&(pg=!0)),n=i}Po=0,Rf()}function M8(e,t){for(var n=e.suspendedLanes,i=e.pingedLanes,s=e.expirationTimes,r=e.pendingLanes&-62914561;0<r;){var a=31-Li(r),o=1<<a,c=s[a];c===-1?(!(o&n)||o&i)&&(s[a]=vL(o,t)):c<=t&&(e.expiredLanes|=o),r&=~o}if(t=mt,n=st,n=Jm(e,e===t?n:0),i=e.callbackNode,n===0||e===t&&Rt===2||e.cancelPendingCommit!==null)return i!==null&&i!==null&&M1(i),e.callbackNode=null,e.callbackPriority=0;if(n&3)return i!==null&&i!==null&&M1(i),e.callbackPriority=2,e.callbackNode=null,2;if(t=n&-n,t===e.callbackPriority)return t;switch(i!==null&&M1(i),CM(n)){case 2:n=l_;break;case 8:n=vM;break;case 32:n=Qm;break;case 268435456:n=xM;break;default:n=Qm}return i=p8.bind(null,e),n=o_(n,i),e.callbackPriority=t,e.callbackNode=n,t}function G9(e){nz(function(){ut&6?o_(l_,e):e()})}function W_(){return Po===0&&(Po=_M()),Po}function m3(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:bm(""+e)}function g3(e,t){var n=t.ownerDocument.createElement("input");return n.name=t.name,n.value=t.value,e.id&&n.setAttribute("form",e.id),t.parentNode.insertBefore(n,t),e=new FormData(e),n.parentNode.removeChild(n),e}function Y9(e,t,n,i,s){if(t==="submit"&&n&&n.stateNode===s){var r=m3((s[Vn]||null).action),a=i.submitter;a&&(t=(t=a[Vn]||null)?m3(t.formAction):a.getAttribute("formAction"),t!==null&&(r=t,a=null));var o=new Sp("action","action",null,i,s);e.push({event:o,listeners:[{instance:null,listener:function(){if(i.defaultPrevented){if(Po!==0){var c=a?g3(s,a):new FormData(s);xx(n,{pending:!0,data:c,method:s.method,action:r},null,c)}}else typeof r=="function"&&(o.preventDefault(),c=a?g3(s,a):new FormData(s),xx(n,{pending:!0,data:c,method:s.method,action:r},r,c))},currentTarget:s}]})}}for(var X1=0;X1<B4.length;X1++){var K1=B4[X1],q9=K1.toLowerCase(),X9=K1[0].toUpperCase()+K1.slice(1);cs(q9,"on"+X9)}cs($M,"onAnimationEnd");cs(WM,"onAnimationIteration");cs(GM,"onAnimationStart");cs("dblclick","onDoubleClick");cs("focusin","onFocus");cs("focusout","onBlur");cs(f9,"onTransitionRun");cs(h9,"onTransitionStart");cs(m9,"onTransitionCancel");cs(YM,"onTransitionEnd");Ac("onMouseEnter",["mouseout","mouseover"]);Ac("onMouseLeave",["mouseout","mouseover"]);Ac("onPointerEnter",["pointerout","pointerover"]);Ac("onPointerLeave",["pointerout","pointerover"]);Jo("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));Jo("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));Jo("onBeforeInput",["compositionend","keypress","textInput","paste"]);Jo("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));Jo("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));Jo("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Jd="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(" "),K9=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Jd));function T8(e,t){t=(t&4)!==0;for(var n=0;n<e.length;n++){var i=e[n],s=i.event;i=i.listeners;e:{var r=void 0;if(t)for(var a=i.length-1;0<=a;a--){var o=i[a],c=o.instance,d=o.currentTarget;if(o=o.listener,c!==r&&s.isPropagationStopped())break e;r=o,s.currentTarget=d;try{r(s)}catch(h){cg(h)}s.currentTarget=null,r=c}else for(a=0;a<i.length;a++){if(o=i[a],c=o.instance,d=o.currentTarget,o=o.listener,c!==r&&s.isPropagationStopped())break e;r=o,s.currentTarget=d;try{r(s)}catch(h){cg(h)}s.currentTarget=null,r=c}}}}function Ye(e,t){var n=t[rx];n===void 0&&(n=t[rx]=new Set);var i=e+"__bubble";n.has(i)||(j8(t,e,2,!1),n.add(i))}function Q1(e,t,n){var i=0;t&&(i|=4),j8(n,e,i,t)}var Lh="_reactListening"+Math.random().toString(36).slice(2);function G_(e){if(!e[Lh]){e[Lh]=!0,TM.forEach(function(n){n!=="selectionchange"&&(K9.has(n)||Q1(n,!1,e),Q1(n,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Lh]||(t[Lh]=!0,Q1("selectionchange",!1,t))}}function j8(e,t,n,i){switch(B8(t)){case 2:var s=Sz;break;case 8:s=Cz;break;default:s=K_}n=s.bind(null,t,n,e),s=void 0,!cx||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(s=!0),i?s!==void 0?e.addEventListener(t,n,{capture:!0,passive:s}):e.addEventListener(t,n,!0):s!==void 0?e.addEventListener(t,n,{passive:s}):e.addEventListener(t,n,!1)}function J1(e,t,n,i,s){var r=i;if(!(t&1)&&!(t&2)&&i!==null)e:for(;;){if(i===null)return;var a=i.tag;if(a===3||a===4){var o=i.stateNode.containerInfo;if(o===s||o.nodeType===8&&o.parentNode===s)break;if(a===4)for(a=i.return;a!==null;){var c=a.tag;if((c===3||c===4)&&(c=a.stateNode.containerInfo,c===s||c.nodeType===8&&c.parentNode===s))return;a=a.return}for(;o!==null;){if(a=_o(o),a===null)return;if(c=a.tag,c===5||c===6||c===26||c===27){i=r=a;continue e}o=o.parentNode}}i=i.return}PM(function(){var d=r,h=d_(n),m=[];e:{var g=qM.get(e);if(g!==void 0){var v=Sp,b=e;switch(e){case"keypress":if(Sm(n)===0)break e;case"keydown":case"keyup":v=UL;break;case"focusin":b="focus",v=E1;break;case"focusout":b="blur",v=E1;break;case"beforeblur":case"afterblur":v=E1;break;case"click":if(n.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":v=j4;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":v=AL;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":v=WL;break;case $M:case WM:case GM:v=PL;break;case YM:v=YL;break;case"scroll":case"scrollend":v=kL;break;case"wheel":v=XL;break;case"copy":case"cut":case"paste":v=LL;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":v=k4;break;case"toggle":case"beforetoggle":v=QL}var w=(t&4)!==0,M=!w&&(e==="scroll"||e==="scrollend"),y=w?g!==null?g+"Capture":null:g;w=[];for(var S=d,T;S!==null;){var N=S;if(T=N.stateNode,N=N.tag,N!==5&&N!==26&&N!==27||T===null||y===null||(N=Wd(S,y),N!=null&&w.push(ef(S,N,T))),M)break;S=S.return}0<w.length&&(g=new v(g,b,null,n,h),m.push({event:g,listeners:w}))}}if(!(t&7)){e:{if(g=e==="mouseover"||e==="pointerover",v=e==="mouseout"||e==="pointerout",g&&n!==lx&&(b=n.relatedTarget||n.fromElement)&&(_o(b)||b[Jc]))break e;if((v||g)&&(g=h.window===h?h:(g=h.ownerDocument)?g.defaultView||g.parentWindow:window,v?(b=n.relatedTarget||n.toElement,v=d,b=b?_o(b):null,b!==null&&(M=Qc(b),w=b.tag,b!==M||w!==5&&w!==27&&w!==6)&&(b=null)):(v=null,b=d),v!==b)){if(w=j4,N="onMouseLeave",y="onMouseEnter",S="mouse",(e==="pointerout"||e==="pointerover")&&(w=k4,N="onPointerLeave",y="onPointerEnter",S="pointer"),M=v==null?g:sd(v),T=b==null?g:sd(b),g=new w(N,S+"leave",v,n,h),g.target=M,g.relatedTarget=T,N=null,_o(h)===d&&(w=new w(y,S+"enter",b,n,h),w.target=T,w.relatedTarget=M,N=w),M=N,v&&b)t:{for(w=v,y=b,S=0,T=w;T;T=Tl(T))S++;for(T=0,N=y;N;N=Tl(N))T++;for(;0<S-T;)w=Tl(w),S--;for(;0<T-S;)y=Tl(y),T--;for(;S--;){if(w===y||y!==null&&w===y.alternate)break t;w=Tl(w),y=Tl(y)}w=null}else w=null;v!==null&&p3(m,g,v,w,!1),b!==null&&M!==null&&p3(m,M,b,w,!0)}}e:{if(g=d?sd(d):window,v=g.nodeName&&g.nodeName.toLowerCase(),v==="select"||v==="input"&&g.type==="file")var k=D4;else if(O4(g))if(VM)k=l9;else{k=a9;var E=r9}else v=g.nodeName,!v||v.toLowerCase()!=="input"||g.type!=="checkbox"&&g.type!=="radio"?d&&u_(d.elementType)&&(k=D4):k=o9;if(k&&(k=k(e,d))){BM(m,k,n,h);break e}E&&E(e,g,d),e==="focusout"&&d&&g.type==="number"&&d.memoizedProps.value!=null&&ox(g,"number",g.value)}switch(E=d?sd(d):window,e){case"focusin":(O4(E)||E.contentEditable==="true")&&(Gl=E,ux=d,bd=null);break;case"focusout":bd=ux=Gl=null;break;case"mousedown":dx=!0;break;case"contextmenu":case"mouseup":case"dragend":dx=!1,I4(m,n,h);break;case"selectionchange":if(d9)break;case"keydown":case"keyup":I4(m,n,h)}var D;if(m_)e:{switch(e){case"compositionstart":var O="onCompositionStart";break e;case"compositionend":O="onCompositionEnd";break e;case"compositionupdate":O="onCompositionUpdate";break e}O=void 0}else Wl?zM(e,n)&&(O="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(O="onCompositionStart");O&&(LM&&n.locale!=="ko"&&(Wl||O!=="onCompositionStart"?O==="onCompositionEnd"&&Wl&&(D=RM()):(ha=h,f_="value"in ha?ha.value:ha.textContent,Wl=!0)),E=vg(d,O),0<E.length&&(O=new N4(O,e,null,n,h),m.push({event:O,listeners:E}),D?O.data=D:(D=IM(n),D!==null&&(O.data=D)))),(D=e9?t9(e,n):n9(e,n))&&(O=vg(d,"onBeforeInput"),0<O.length&&(E=new N4("onBeforeInput","beforeinput",null,n,h),m.push({event:E,listeners:O}),E.data=D)),Y9(m,e,d,n,h)}T8(m,t)})}function ef(e,t,n){return{instance:e,listener:t,currentTarget:n}}function vg(e,t){for(var n=t+"Capture",i=[];e!==null;){var s=e,r=s.stateNode;s=s.tag,s!==5&&s!==26&&s!==27||r===null||(s=Wd(e,n),s!=null&&i.unshift(ef(e,s,r)),s=Wd(e,t),s!=null&&i.push(ef(e,s,r))),e=e.return}return i}function Tl(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function p3(e,t,n,i,s){for(var r=t._reactName,a=[];n!==null&&n!==i;){var o=n,c=o.alternate,d=o.stateNode;if(o=o.tag,c!==null&&c===i)break;o!==5&&o!==26&&o!==27||d===null||(c=d,s?(d=Wd(n,r),d!=null&&a.unshift(ef(n,d,c))):s||(d=Wd(n,r),d!=null&&a.push(ef(n,d,c)))),n=n.return}a.length!==0&&e.push({event:t,listeners:a})}var Q9=/\r\n?/g,J9=/\u0000|\uFFFD/g;function v3(e){return(typeof e=="string"?e:""+e).replace(Q9,`
`).replace(J9,"")}function N8(e,t){return t=v3(t),v3(e)===t}function Lp(){}function dt(e,t,n,i,s,r){switch(n){case"children":typeof i=="string"?t==="body"||t==="textarea"&&i===""||Oc(e,i):(typeof i=="number"||typeof i=="bigint")&&t!=="body"&&Oc(e,""+i);break;case"className":jh(e,"class",i);break;case"tabIndex":jh(e,"tabindex",i);break;case"dir":case"role":case"viewBox":case"width":case"height":jh(e,n,i);break;case"style":DM(e,i,r);break;case"data":if(t!=="object"){jh(e,"data",i);break}case"src":case"href":if(i===""&&(t!=="a"||n!=="href")){e.removeAttribute(n);break}if(i==null||typeof i=="function"||typeof i=="symbol"||typeof i=="boolean"){e.removeAttribute(n);break}i=bm(""+i),e.setAttribute(n,i);break;case"action":case"formAction":if(typeof i=="function"){e.setAttribute(n,"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 r=="function"&&(n==="formAction"?(t!=="input"&&dt(e,t,"name",s.name,s,null),dt(e,t,"formEncType",s.formEncType,s,null),dt(e,t,"formMethod",s.formMethod,s,null),dt(e,t,"formTarget",s.formTarget,s,null)):(dt(e,t,"encType",s.encType,s,null),dt(e,t,"method",s.method,s,null),dt(e,t,"target",s.target,s,null)));if(i==null||typeof i=="symbol"||typeof i=="boolean"){e.removeAttribute(n);break}i=bm(""+i),e.setAttribute(n,i);break;case"onClick":i!=null&&(e.onclick=Lp);break;case"onScroll":i!=null&&Ye("scroll",e);break;case"onScrollEnd":i!=null&&Ye("scrollend",e);break;case"dangerouslySetInnerHTML":if(i!=null){if(typeof i!="object"||!("__html"in i))throw Error(ee(61));if(n=i.__html,n!=null){if(s.children!=null)throw Error(ee(60));e.innerHTML=n}}break;case"multiple":e.multiple=i&&typeof i!="function"&&typeof i!="symbol";break;case"muted":e.muted=i&&typeof i!="function"&&typeof i!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(i==null||typeof i=="function"||typeof i=="boolean"||typeof i=="symbol"){e.removeAttribute("xlink:href");break}n=bm(""+i),e.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",n);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":i!=null&&typeof i!="function"&&typeof i!="symbol"?e.setAttribute(n,""+i):e.removeAttribute(n);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":i&&typeof i!="function"&&typeof i!="symbol"?e.setAttribute(n,""):e.removeAttribute(n);break;case"capture":case"download":i===!0?e.setAttribute(n,""):i!==!1&&i!=null&&typeof i!="function"&&typeof i!="symbol"?e.setAttribute(n,i):e.removeAttribute(n);break;case"cols":case"rows":case"size":case"span":i!=null&&typeof i!="function"&&typeof i!="symbol"&&!isNaN(i)&&1<=i?e.setAttribute(n,i):e.removeAttribute(n);break;case"rowSpan":case"start":i==null||typeof i=="function"||typeof i=="symbol"||isNaN(i)?e.removeAttribute(n):e.setAttribute(n,i);break;case"popover":Ye("beforetoggle",e),Ye("toggle",e),_m(e,"popover",i);break;case"xlinkActuate":Js(e,"http://www.w3.org/1999/xlink","xlink:actuate",i);break;case"xlinkArcrole":Js(e,"http://www.w3.org/1999/xlink","xlink:arcrole",i);break;case"xlinkRole":Js(e,"http://www.w3.org/1999/xlink","xlink:role",i);break;case"xlinkShow":Js(e,"http://www.w3.org/1999/xlink","xlink:show",i);break;case"xlinkTitle":Js(e,"http://www.w3.org/1999/xlink","xlink:title",i);break;case"xlinkType":Js(e,"http://www.w3.org/1999/xlink","xlink:type",i);break;case"xmlBase":Js(e,"http://www.w3.org/XML/1998/namespace","xml:base",i);break;case"xmlLang":Js(e,"http://www.w3.org/XML/1998/namespace","xml:lang",i);break;case"xmlSpace":Js(e,"http://www.w3.org/XML/1998/namespace","xml:space",i);break;case"is":_m(e,"is",i);break;case"innerText":case"textContent":break;default:(!(2<n.length)||n[0]!=="o"&&n[0]!=="O"||n[1]!=="n"&&n[1]!=="N")&&(n=jL.get(n)||n,_m(e,n,i))}}function zx(e,t,n,i,s,r){switch(n){case"style":DM(e,i,r);break;case"dangerouslySetInnerHTML":if(i!=null){if(typeof i!="object"||!("__html"in i))throw Error(ee(61));if(n=i.__html,n!=null){if(s.children!=null)throw Error(ee(60));e.innerHTML=n}}break;case"children":typeof i=="string"?Oc(e,i):(typeof i=="number"||typeof i=="bigint")&&Oc(e,""+i);break;case"onScroll":i!=null&&Ye("scroll",e);break;case"onScrollEnd":i!=null&&Ye("scrollend",e);break;case"onClick":i!=null&&(e.onclick=Lp);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!jM.hasOwnProperty(n))e:{if(n[0]==="o"&&n[1]==="n"&&(s=n.endsWith("Capture"),t=n.slice(2,s?n.length-7:void 0),r=e[Vn]||null,r=r!=null?r[n]:null,typeof r=="function"&&e.removeEventListener(t,r,s),typeof i=="function")){typeof r!="function"&&r!==null&&(n in e?e[n]=null:e.hasAttribute(n)&&e.removeAttribute(n)),e.addEventListener(t,i,s);break e}n in e?e[n]=i:i===!0?e.setAttribute(n,""):_m(e,n,i)}}}function gn(e,t,n){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Ye("error",e),Ye("load",e);var i=!1,s=!1,r;for(r in n)if(n.hasOwnProperty(r)){var a=n[r];if(a!=null)switch(r){case"src":i=!0;break;case"srcSet":s=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(ee(137,t));default:dt(e,t,r,a,n,null)}}s&&dt(e,t,"srcSet",n.srcSet,n,null),i&&dt(e,t,"src",n.src,n,null);return;case"input":Ye("invalid",e);var o=r=a=s=null,c=null,d=null;for(i in n)if(n.hasOwnProperty(i)){var h=n[i];if(h!=null)switch(i){case"name":s=h;break;case"type":a=h;break;case"checked":c=h;break;case"defaultChecked":d=h;break;case"value":r=h;break;case"defaultValue":o=h;break;case"children":case"dangerouslySetInnerHTML":if(h!=null)throw Error(ee(137,t));break;default:dt(e,t,i,h,n,null)}}EM(e,r,o,c,d,a,s,!1),eg(e);return;case"select":Ye("invalid",e),i=a=r=null;for(s in n)if(n.hasOwnProperty(s)&&(o=n[s],o!=null))switch(s){case"value":r=o;break;case"defaultValue":a=o;break;case"multiple":i=o;default:dt(e,t,s,o,n,null)}t=r,n=a,e.multiple=!!i,t!=null?lc(e,!!i,t,!1):n!=null&&lc(e,!!i,n,!0);return;case"textarea":Ye("invalid",e),r=s=i=null;for(a in n)if(n.hasOwnProperty(a)&&(o=n[a],o!=null))switch(a){case"value":i=o;break;case"defaultValue":s=o;break;case"children":r=o;break;case"dangerouslySetInnerHTML":if(o!=null)throw Error(ee(91));break;default:dt(e,t,a,o,n,null)}OM(e,i,s,r),eg(e);return;case"option":for(c in n)if(n.hasOwnProperty(c)&&(i=n[c],i!=null))switch(c){case"selected":e.selected=i&&typeof i!="function"&&typeof i!="symbol";break;default:dt(e,t,c,i,n,null)}return;case"dialog":Ye("cancel",e),Ye("close",e);break;case"iframe":case"object":Ye("load",e);break;case"video":case"audio":for(i=0;i<Jd.length;i++)Ye(Jd[i],e);break;case"image":Ye("error",e),Ye("load",e);break;case"details":Ye("toggle",e);break;case"embed":case"source":case"link":Ye("error",e),Ye("load",e);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(d in n)if(n.hasOwnProperty(d)&&(i=n[d],i!=null))switch(d){case"children":case"dangerouslySetInnerHTML":throw Error(ee(137,t));default:dt(e,t,d,i,n,null)}return;default:if(u_(t)){for(h in n)n.hasOwnProperty(h)&&(i=n[h],i!==void 0&&zx(e,t,h,i,n,void 0));return}}for(o in n)n.hasOwnProperty(o)&&(i=n[o],i!=null&&dt(e,t,o,i,n,null))}function x3(e,t,n,i){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var s=null,r=null,a=null,o=null,c=null,d=null,h=null;for(v in n){var m=n[v];if(n.hasOwnProperty(v)&&m!=null)switch(v){case"checked":break;case"value":break;case"defaultValue":c=m;default:i.hasOwnProperty(v)||dt(e,t,v,null,i,m)}}for(var g in i){var v=i[g];if(m=n[g],i.hasOwnProperty(g)&&(v!=null||m!=null))switch(g){case"type":r=v;break;case"name":s=v;break;case"checked":d=v;break;case"defaultChecked":h=v;break;case"value":a=v;break;case"defaultValue":o=v;break;case"children":case"dangerouslySetInnerHTML":if(v!=null)throw Error(ee(137,t));break;default:v!==m&&dt(e,t,g,v,i,m)}}ax(e,a,o,c,d,h,r,s);return;case"select":v=a=o=g=null;for(r in n)if(c=n[r],n.hasOwnProperty(r)&&c!=null)switch(r){case"value":break;case"multiple":v=c;default:i.hasOwnProperty(r)||dt(e,t,r,null,i,c)}for(s in i)if(r=i[s],c=n[s],i.hasOwnProperty(s)&&(r!=null||c!=null))switch(s){case"value":g=r;break;case"defaultValue":o=r;break;case"multiple":a=r;default:r!==c&&dt(e,t,s,r,i,c)}t=o,n=a,i=v,g!=null?lc(e,!!n,g,!1):!!i!=!!n&&(t!=null?lc(e,!!n,t,!0):lc(e,!!n,n?[]:"",!1));return;case"textarea":v=g=null;for(o in n)if(s=n[o],n.hasOwnProperty(o)&&s!=null&&!i.hasOwnProperty(o))switch(o){case"value":break;case"children":break;default:dt(e,t,o,null,i,s)}for(a in i)if(s=i[a],r=n[a],i.hasOwnProperty(a)&&(s!=null||r!=null))switch(a){case"value":g=s;break;case"defaultValue":v=s;break;case"children":break;case"dangerouslySetInnerHTML":if(s!=null)throw Error(ee(91));break;default:s!==r&&dt(e,t,a,s,i,r)}AM(e,g,v);return;case"option":for(var b in n)if(g=n[b],n.hasOwnProperty(b)&&g!=null&&!i.hasOwnProperty(b))switch(b){case"selected":e.selected=!1;break;default:dt(e,t,b,null,i,g)}for(c in i)if(g=i[c],v=n[c],i.hasOwnProperty(c)&&g!==v&&(g!=null||v!=null))switch(c){case"selected":e.selected=g&&typeof g!="function"&&typeof g!="symbol";break;default:dt(e,t,c,g,i,v)}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 w in n)g=n[w],n.hasOwnProperty(w)&&g!=null&&!i.hasOwnProperty(w)&&dt(e,t,w,null,i,g);for(d in i)if(g=i[d],v=n[d],i.hasOwnProperty(d)&&g!==v&&(g!=null||v!=null))switch(d){case"children":case"dangerouslySetInnerHTML":if(g!=null)throw Error(ee(137,t));break;default:dt(e,t,d,g,i,v)}return;default:if(u_(t)){for(var M in n)g=n[M],n.hasOwnProperty(M)&&g!==void 0&&!i.hasOwnProperty(M)&&zx(e,t,M,void 0,i,g);for(h in i)g=i[h],v=n[h],!i.hasOwnProperty(h)||g===v||g===void 0&&v===void 0||zx(e,t,h,g,i,v);return}}for(var y in n)g=n[y],n.hasOwnProperty(y)&&g!=null&&!i.hasOwnProperty(y)&&dt(e,t,y,null,i,g);for(m in i)g=i[m],v=n[m],!i.hasOwnProperty(m)||g===v||g==null&&v==null||dt(e,t,m,g,i,v)}var Ix=null,Bx=null;function xg(e){return e.nodeType===9?e:e.ownerDocument}function y3(e){switch(e){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function k8(e,t){if(e===0)switch(t){case"svg":return 1;case"math":return 2;default:return 0}return e===1&&t==="foreignObject"?0:e}function Vx(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.children=="bigint"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var ev=null;function ez(){var e=window.event;return e&&e.type==="popstate"?e===ev?!1:(ev=e,!0):(ev=null,!1)}var E8=typeof setTimeout=="function"?setTimeout:void 0,tz=typeof clearTimeout=="function"?clearTimeout:void 0,_3=typeof Promise=="function"?Promise:void 0,nz=typeof queueMicrotask=="function"?queueMicrotask:typeof _3<"u"?function(e){return _3.resolve(null).then(e).catch(iz)}:E8;function iz(e){setTimeout(function(){throw e})}function tv(e,t){var n=t,i=0;do{var s=n.nextSibling;if(e.removeChild(n),s&&s.nodeType===8)if(n=s.data,n==="/$"){if(i===0){e.removeChild(s),rf(t);return}i--}else n!=="$"&&n!=="$?"&&n!=="$!"||i++;n=s}while(n);rf(t)}function Hx(e){var t=e.firstChild;for(t&&t.nodeType===10&&(t=t.nextSibling);t;){var n=t;switch(t=t.nextSibling,n.nodeName){case"HTML":case"HEAD":case"BODY":Hx(n),c_(n);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(n.rel.toLowerCase()==="stylesheet")continue}e.removeChild(n)}}function sz(e,t,n,i){for(;e.nodeType===1;){var s=n;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!i&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(i){if(!e[$d])switch(t){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if(r=e.getAttribute("rel"),r==="stylesheet"&&e.hasAttribute("data-precedence"))break;if(r!==s.rel||e.getAttribute("href")!==(s.href==null?null:s.href)||e.getAttribute("crossorigin")!==(s.crossOrigin==null?null:s.crossOrigin)||e.getAttribute("title")!==(s.title==null?null:s.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(r=e.getAttribute("src"),(r!==(s.src==null?null:s.src)||e.getAttribute("type")!==(s.type==null?null:s.type)||e.getAttribute("crossorigin")!==(s.crossOrigin==null?null:s.crossOrigin))&&r&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(t==="input"&&e.type==="hidden"){var r=s.name==null?null:""+s.name;if(s.type==="hidden"&&e.getAttribute("name")===r)return e}else return e;if(e=ts(e.nextSibling),e===null)break}return null}function rz(e,t,n){if(t==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!n||(e=ts(e.nextSibling),e===null))return null;return e}function ts(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t==="$"||t==="$!"||t==="$?"||t==="F!"||t==="F")break;if(t==="/$")return null}}return e}function b3(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="$"||n==="$!"||n==="$?"){if(t===0)return e;t--}else n==="/$"&&t++}e=e.previousSibling}return null}function A8(e,t,n){switch(t=xg(n),e){case"html":if(e=t.documentElement,!e)throw Error(ee(452));return e;case"head":if(e=t.head,!e)throw Error(ee(453));return e;case"body":if(e=t.body,!e)throw Error(ee(454));return e;default:throw Error(ee(451))}}var Bi=new Map,w3=new Set;function yg(e){return typeof e.getRootNode=="function"?e.getRootNode():e.ownerDocument}var Lr=Ct.d;Ct.d={f:az,r:oz,D:lz,C:cz,L:uz,m:dz,X:hz,S:fz,M:mz};function az(){var e=Lr.f(),t=Pp();return e||t}function oz(e){var t=eu(e);t!==null&&t.tag===5&&t.type==="form"?ET(t):Lr.r(e)}var nu=typeof document>"u"?null:document;function O8(e,t,n){var i=nu;if(i&&typeof t=="string"&&t){var s=ki(t);s='link[rel="'+e+'"][href="'+s+'"]',typeof n=="string"&&(s+='[crossorigin="'+n+'"]'),w3.has(s)||(w3.add(s),e={rel:e,crossOrigin:n,href:t},i.querySelector(s)===null&&(t=i.createElement("link"),gn(t,"link",e),an(t),i.head.appendChild(t)))}}function lz(e){Lr.D(e),O8("dns-prefetch",e,null)}function cz(e,t){Lr.C(e,t),O8("preconnect",e,t)}function uz(e,t,n){Lr.L(e,t,n);var i=nu;if(i&&e&&t){var s='link[rel="preload"][as="'+ki(t)+'"]';t==="image"&&n&&n.imageSrcSet?(s+='[imagesrcset="'+ki(n.imageSrcSet)+'"]',typeof n.imageSizes=="string"&&(s+='[imagesizes="'+ki(n.imageSizes)+'"]')):s+='[href="'+ki(e)+'"]';var r=s;switch(t){case"style":r=Ic(e);break;case"script":r=iu(e)}Bi.has(r)||(e=Mt({rel:"preload",href:t==="image"&&n&&n.imageSrcSet?void 0:e,as:t},n),Bi.set(r,e),i.querySelector(s)!==null||t==="style"&&i.querySelector(Lf(r))||t==="script"&&i.querySelector(zf(r))||(t=i.createElement("link"),gn(t,"link",e),an(t),i.head.appendChild(t)))}}function dz(e,t){Lr.m(e,t);var n=nu;if(n&&e){var i=t&&typeof t.as=="string"?t.as:"script",s='link[rel="modulepreload"][as="'+ki(i)+'"][href="'+ki(e)+'"]',r=s;switch(i){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":r=iu(e)}if(!Bi.has(r)&&(e=Mt({rel:"modulepreload",href:e},t),Bi.set(r,e),n.querySelector(s)===null)){switch(i){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(n.querySelector(zf(r)))return}i=n.createElement("link"),gn(i,"link",e),an(i),n.head.appendChild(i)}}}function fz(e,t,n){Lr.S(e,t,n);var i=nu;if(i&&e){var s=oc(i).hoistableStyles,r=Ic(e);t=t||"default";var a=s.get(r);if(!a){var o={loading:0,preload:null};if(a=i.querySelector(Lf(r)))o.loading=5;else{e=Mt({rel:"stylesheet",href:e,"data-precedence":t},n),(n=Bi.get(r))&&Y_(e,n);var c=a=i.createElement("link");an(c),gn(c,"link",e),c._p=new Promise(function(d,h){c.onload=d,c.onerror=h}),c.addEventListener("load",function(){o.loading|=1}),c.addEventListener("error",function(){o.loading|=2}),o.loading|=4,km(a,t,i)}a={type:"stylesheet",instance:a,count:1,state:o},s.set(r,a)}}}function hz(e,t){Lr.X(e,t);var n=nu;if(n&&e){var i=oc(n).hoistableScripts,s=iu(e),r=i.get(s);r||(r=n.querySelector(zf(s)),r||(e=Mt({src:e,async:!0},t),(t=Bi.get(s))&&q_(e,t),r=n.createElement("script"),an(r),gn(r,"link",e),n.head.appendChild(r)),r={type:"script",instance:r,count:1,state:null},i.set(s,r))}}function mz(e,t){Lr.M(e,t);var n=nu;if(n&&e){var i=oc(n).hoistableScripts,s=iu(e),r=i.get(s);r||(r=n.querySelector(zf(s)),r||(e=Mt({src:e,async:!0,type:"module"},t),(t=Bi.get(s))&&q_(e,t),r=n.createElement("script"),an(r),gn(r,"link",e),n.head.appendChild(r)),r={type:"script",instance:r,count:1,state:null},i.set(s,r))}}function S3(e,t,n,i){var s=(s=ya.current)?yg(s):null;if(!s)throw Error(ee(446));switch(e){case"meta":case"title":return null;case"style":return typeof n.precedence=="string"&&typeof n.href=="string"?(t=Ic(n.href),n=oc(s).hoistableStyles,i=n.get(t),i||(i={type:"style",instance:null,count:0,state:null},n.set(t,i)),i):{type:"void",instance:null,count:0,state:null};case"link":if(n.rel==="stylesheet"&&typeof n.href=="string"&&typeof n.precedence=="string"){e=Ic(n.href);var r=oc(s).hoistableStyles,a=r.get(e);if(a||(s=s.ownerDocument||s,a={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},r.set(e,a),(r=s.querySelector(Lf(e)))&&!r._p&&(a.instance=r,a.state.loading=5),Bi.has(e)||(n={rel:"preload",as:"style",href:n.href,crossOrigin:n.crossOrigin,integrity:n.integrity,media:n.media,hrefLang:n.hrefLang,referrerPolicy:n.referrerPolicy},Bi.set(e,n),r||gz(s,e,n,a.state))),t&&i===null)throw Error(ee(528,""));return a}if(t&&i!==null)throw Error(ee(529,""));return null;case"script":return t=n.async,n=n.src,typeof n=="string"&&t&&typeof t!="function"&&typeof t!="symbol"?(t=iu(n),n=oc(s).hoistableScripts,i=n.get(t),i||(i={type:"script",instance:null,count:0,state:null},n.set(t,i)),i):{type:"void",instance:null,count:0,state:null};default:throw Error(ee(444,e))}}function Ic(e){return'href="'+ki(e)+'"'}function Lf(e){return'link[rel="stylesheet"]['+e+"]"}function D8(e){return Mt({},e,{"data-precedence":e.precedence,precedence:null})}function gz(e,t,n,i){e.querySelector('link[rel="preload"][as="style"]['+t+"]")?i.loading=1:(t=e.createElement("link"),i.preload=t,t.addEventListener("load",function(){return i.loading|=1}),t.addEventListener("error",function(){return i.loading|=2}),gn(t,"link",n),an(t),e.head.appendChild(t))}function iu(e){return'[src="'+ki(e)+'"]'}function zf(e){return"script[async]"+e}function C3(e,t,n){if(t.count++,t.instance===null)switch(t.type){case"style":var i=e.querySelector('style[data-href~="'+ki(n.href)+'"]');if(i)return t.instance=i,an(i),i;var s=Mt({},n,{"data-href":n.href,"data-precedence":n.precedence,href:null,precedence:null});return i=(e.ownerDocument||e).createElement("style"),an(i),gn(i,"style",s),km(i,n.precedence,e),t.instance=i;case"stylesheet":s=Ic(n.href);var r=e.querySelector(Lf(s));if(r)return t.state.loading|=4,t.instance=r,an(r),r;i=D8(n),(s=Bi.get(s))&&Y_(i,s),r=(e.ownerDocument||e).createElement("link"),an(r);var a=r;return a._p=new Promise(function(o,c){a.onload=o,a.onerror=c}),gn(r,"link",i),t.state.loading|=4,km(r,n.precedence,e),t.instance=r;case"script":return r=iu(n.src),(s=e.querySelector(zf(r)))?(t.instance=s,an(s),s):(i=n,(s=Bi.get(r))&&(i=Mt({},n),q_(i,s)),e=e.ownerDocument||e,s=e.createElement("script"),an(s),gn(s,"link",i),e.head.appendChild(s),t.instance=s);case"void":return null;default:throw Error(ee(443,t.type))}else t.type==="stylesheet"&&!(t.state.loading&4)&&(i=t.instance,t.state.loading|=4,km(i,n.precedence,e));return t.instance}function km(e,t,n){for(var i=n.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),s=i.length?i[i.length-1]:null,r=s,a=0;a<i.length;a++){var o=i[a];if(o.dataset.precedence===t)r=o;else if(r!==s)break}r?r.parentNode.insertBefore(e,r.nextSibling):(t=n.nodeType===9?n.head:n,t.insertBefore(e,t.firstChild))}function Y_(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.title==null&&(e.title=t.title)}function q_(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.integrity==null&&(e.integrity=t.integrity)}var Em=null;function M3(e,t,n){if(Em===null){var i=new Map,s=Em=new Map;s.set(n,i)}else s=Em,i=s.get(n),i||(i=new Map,s.set(n,i));if(i.has(e))return i;for(i.set(e,null),n=n.getElementsByTagName(e),s=0;s<n.length;s++){var r=n[s];if(!(r[$d]||r[Nn]||e==="link"&&r.getAttribute("rel")==="stylesheet")&&r.namespaceURI!=="http://www.w3.org/2000/svg"){var a=r.getAttribute(t)||"";a=e+a;var o=i.get(a);o?o.push(r):i.set(a,[r])}}return i}function T3(e,t,n){e=e.ownerDocument||e,e.head.insertBefore(n,t==="title"?e.querySelector("head > title"):null)}function pz(e,t,n){if(n===1||t.itemProp!=null)return!1;switch(e){case"meta":case"title":return!0;case"style":if(typeof t.precedence!="string"||typeof t.href!="string"||t.href==="")break;return!0;case"link":if(typeof t.rel!="string"||typeof t.href!="string"||t.href===""||t.onLoad||t.onError)break;switch(t.rel){case"stylesheet":return e=t.disabled,typeof t.precedence=="string"&&e==null;default:return!0}case"script":if(t.async&&typeof t.async!="function"&&typeof t.async!="symbol"&&!t.onLoad&&!t.onError&&t.src&&typeof t.src=="string")return!0}return!1}function P8(e){return!(e.type==="stylesheet"&&!(e.state.loading&3))}var tf=null;function vz(){}function xz(e,t,n){if(tf===null)throw Error(ee(475));var i=tf;if(t.type==="stylesheet"&&(typeof n.media!="string"||matchMedia(n.media).matches!==!1)&&!(t.state.loading&4)){if(t.instance===null){var s=Ic(n.href),r=e.querySelector(Lf(s));if(r){e=r._p,e!==null&&typeof e=="object"&&typeof e.then=="function"&&(i.count++,i=_g.bind(i),e.then(i,i)),t.state.loading|=4,t.instance=r,an(r);return}r=e.ownerDocument||e,n=D8(n),(s=Bi.get(s))&&Y_(n,s),r=r.createElement("link"),an(r);var a=r;a._p=new Promise(function(o,c){a.onload=o,a.onerror=c}),gn(r,"link",n),t.instance=r}i.stylesheets===null&&(i.stylesheets=new Map),i.stylesheets.set(t,e),(e=t.state.preload)&&!(t.state.loading&3)&&(i.count++,t=_g.bind(i),e.addEventListener("load",t),e.addEventListener("error",t))}}function yz(){if(tf===null)throw Error(ee(475));var e=tf;return e.stylesheets&&e.count===0&&Fx(e,e.stylesheets),0<e.count?function(t){var n=setTimeout(function(){if(e.stylesheets&&Fx(e,e.stylesheets),e.unsuspend){var i=e.unsuspend;e.unsuspend=null,i()}},6e4);return e.unsuspend=t,function(){e.unsuspend=null,clearTimeout(n)}}:null}function _g(){if(this.count--,this.count===0){if(this.stylesheets)Fx(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var bg=null;function Fx(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,bg=new Map,t.forEach(_z,e),bg=null,_g.call(e))}function _z(e,t){if(!(t.state.loading&4)){var n=bg.get(e);if(n)var i=n.get(null);else{n=new Map,bg.set(e,n);for(var s=e.querySelectorAll("link[data-precedence],style[data-precedence]"),r=0;r<s.length;r++){var a=s[r];(a.nodeName==="link"||a.getAttribute("media")!=="not all")&&(n.set(a.dataset.precedence,a),i=a)}i&&n.set(null,i)}s=t.instance,a=s.getAttribute("data-precedence"),r=n.get(a)||i,r===i&&n.set(null,s),n.set(a,s),this.count++,i=_g.bind(this),s.addEventListener("load",i),s.addEventListener("error",i),r?r.parentNode.insertBefore(s,r.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(s,e.firstChild)),t.state.loading|=4}}function bz(e,t,n,i,s,r,a,o){this.tag=1,this.containerInfo=e,this.finishedWork=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=T1(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.finishedLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=T1(0),this.hiddenUpdates=T1(null),this.identifierPrefix=i,this.onUncaughtError=s,this.onCaughtError=r,this.onRecoverableError=a,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=o,this.incompleteTransitions=new Map}function R8(e,t,n,i,s,r,a,o,c,d,h,m){return e=new bz(e,t,n,a,o,c,d,m),t=1,r===!0&&(t|=24),r=Oi(3,null,null,t),e.current=r,r.stateNode=e,t=b_(),t.refCount++,e.pooledCache=t,t.refCount++,r.memoizedState={element:i,isDehydrated:n,cache:t},L_(r),e}function L8(e){return e?(e=Xl,e):Xl}function z8(e,t,n,i,s,r){s=L8(s),i.context===null?i.context=s:i.pendingContext=s,i=_r(t),i.payload={element:n},r=r===void 0?null:r,r!==null&&(i.callback=r),n=_a(e,i,t),n!==null&&(Hn(n,e,t),Td(n,e,t))}function j3(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function X_(e,t){j3(e,t),(e=e.alternate)&&j3(e,t)}function I8(e){if(e.tag===13){var t=Da(e,67108864);t!==null&&Hn(t,e,67108864),X_(e,67108864)}}function wz(){return null}var wg=!0;function Sz(e,t,n,i){var s=Ie.T;Ie.T=null;var r=Ct.p;try{Ct.p=2,K_(e,t,n,i)}finally{Ct.p=r,Ie.T=s}}function Cz(e,t,n,i){var s=Ie.T;Ie.T=null;var r=Ct.p;try{Ct.p=8,K_(e,t,n,i)}finally{Ct.p=r,Ie.T=s}}function K_(e,t,n,i){if(wg){var s=Ux(i);if(s===null)J1(e,t,i,Sg,n),N3(e,i);else if(Tz(s,e,t,n,i))i.stopPropagation();else if(N3(e,i),t&4&&-1<Mz.indexOf(e)){for(;s!==null;){var r=eu(s);if(r!==null)switch(r.tag){case 3:if(r=r.stateNode,r.current.memoizedState.isDehydrated){var a=id(r.pendingLanes);if(a!==0){var o=r;for(o.pendingLanes|=2,o.entangledLanes|=2;a;){var c=1<<31-Li(a);o.entanglements[1]|=c,a&=~c}Kn(r),!(ut&6)&&(hg=Ts()+500,Rf())}}break;case 13:o=Da(r,2),o!==null&&Hn(o,r,2),Pp(),X_(r,2)}if(r=Ux(i),r===null&&J1(e,t,i,Sg,n),r===s)break;s=r}s!==null&&i.stopPropagation()}else J1(e,t,i,null,n)}}function Ux(e){return e=d_(e),Q_(e)}var Sg=null;function Q_(e){if(Sg=null,e=_o(e),e!==null){var t=Qc(e);if(t===null)e=null;else{var n=t.tag;if(n===13){if(e=mM(t),e!==null)return e;e=null}else if(n===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}}return Sg=e,null}function B8(e){switch(e){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(cL()){case l_:return 2;case vM:return 8;case Qm:case uL:return 32;case xM:return 268435456;default:return 32}default:return 32}}var Zx=!1,Sa=null,Ca=null,Ma=null,nf=new Map,sf=new Map,aa=[],Mz="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 N3(e,t){switch(e){case"focusin":case"focusout":Sa=null;break;case"dragenter":case"dragleave":Ca=null;break;case"mouseover":case"mouseout":Ma=null;break;case"pointerover":case"pointerout":nf.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":sf.delete(t.pointerId)}}function Bu(e,t,n,i,s,r){return e===null||e.nativeEvent!==r?(e={blockedOn:t,domEventName:n,eventSystemFlags:i,nativeEvent:r,targetContainers:[s]},t!==null&&(t=eu(t),t!==null&&I8(t)),e):(e.eventSystemFlags|=i,t=e.targetContainers,s!==null&&t.indexOf(s)===-1&&t.push(s),e)}function Tz(e,t,n,i,s){switch(t){case"focusin":return Sa=Bu(Sa,e,t,n,i,s),!0;case"dragenter":return Ca=Bu(Ca,e,t,n,i,s),!0;case"mouseover":return Ma=Bu(Ma,e,t,n,i,s),!0;case"pointerover":var r=s.pointerId;return nf.set(r,Bu(nf.get(r)||null,e,t,n,i,s)),!0;case"gotpointercapture":return r=s.pointerId,sf.set(r,Bu(sf.get(r)||null,e,t,n,i,s)),!0}return!1}function V8(e){var t=_o(e.target);if(t!==null){var n=Qc(t);if(n!==null){if(t=n.tag,t===13){if(t=mM(n),t!==null){e.blockedOn=t,yL(e.priority,function(){if(n.tag===13){var i=br(),s=Da(n,i);s!==null&&Hn(s,n,i),X_(n,i)}});return}}else if(t===3&&n.stateNode.current.memoizedState.isDehydrated){e.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}e.blockedOn=null}function Am(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=Ux(e.nativeEvent);if(n===null){n=e.nativeEvent;var i=new n.constructor(n.type,n);lx=i,n.target.dispatchEvent(i),lx=null}else return t=eu(n),t!==null&&I8(t),e.blockedOn=n,!1;t.shift()}return!0}function k3(e,t,n){Am(e)&&n.delete(t)}function jz(){Zx=!1,Sa!==null&&Am(Sa)&&(Sa=null),Ca!==null&&Am(Ca)&&(Ca=null),Ma!==null&&Am(Ma)&&(Ma=null),nf.forEach(k3),sf.forEach(k3)}function zh(e,t){e.blockedOn===t&&(e.blockedOn=null,Zx||(Zx=!0,tn.unstable_scheduleCallback(tn.unstable_NormalPriority,jz)))}var Ih=null;function E3(e){Ih!==e&&(Ih=e,tn.unstable_scheduleCallback(tn.unstable_NormalPriority,function(){Ih===e&&(Ih=null);for(var t=0;t<e.length;t+=3){var n=e[t],i=e[t+1],s=e[t+2];if(typeof i!="function"){if(Q_(i||n)===null)continue;break}var r=eu(n);r!==null&&(e.splice(t,3),t-=3,xx(r,{pending:!0,data:s,method:n.method,action:i},i,s))}}))}function rf(e){function t(c){return zh(c,e)}Sa!==null&&zh(Sa,e),Ca!==null&&zh(Ca,e),Ma!==null&&zh(Ma,e),nf.forEach(t),sf.forEach(t);for(var n=0;n<aa.length;n++){var i=aa[n];i.blockedOn===e&&(i.blockedOn=null)}for(;0<aa.length&&(n=aa[0],n.blockedOn===null);)V8(n),n.blockedOn===null&&aa.shift();if(n=(e.ownerDocument||e).$$reactFormReplay,n!=null)for(i=0;i<n.length;i+=3){var s=n[i],r=n[i+1],a=s[Vn]||null;if(typeof r=="function")a||E3(n);else if(a){var o=null;if(r&&r.hasAttribute("formAction")){if(s=r,a=r[Vn]||null)o=a.formAction;else if(Q_(s)!==null)continue}else o=a.action;typeof o=="function"?n[i+1]=o:(n.splice(i,3),i-=3),E3(n)}}}function J_(e){this._internalRoot=e}zp.prototype.render=J_.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(ee(409));var n=t.current,i=br();z8(n,i,e,t,null,null)};zp.prototype.unmount=J_.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;e.tag===0&&gc(),z8(e.current,2,null,e,null,null),Pp(),t[Jc]=null}};function zp(e){this._internalRoot=e}zp.prototype.unstable_scheduleHydration=function(e){if(e){var t=MM();e={blockedOn:null,target:e,priority:t};for(var n=0;n<aa.length&&t!==0&&t<aa[n].priority;n++);aa.splice(n,0,e),n===0&&V8(e)}};var A3=cM.version;if(A3!=="19.0.0-rc-941e1b4a-20240729")throw Error(ee(527,A3,"19.0.0-rc-941e1b4a-20240729"));Ct.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(ee(188)):(e=Object.keys(e).join(","),Error(ee(268,e)));return e=gM(t),e=e===null?null:e.stateNode,e};var Vu={findFiberByHostInstance:_o,bundleType:0,version:"19.0.0-rc-941e1b4a-20240729",rendererPackageName:"react-dom"},Nz={bundleType:Vu.bundleType,version:Vu.version,rendererPackageName:Vu.rendererPackageName,rendererConfig:Vu.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:Ie,findHostInstanceByFiber:function(e){return e=gM(e),e===null?null:e.stateNode},findFiberByHostInstance:Vu.findFiberByHostInstance||wz,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"19.0.0-rc-941e1b4a-20240729"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Bh=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Bh.isDisabled&&Bh.supportsFiber)try{kf=Bh.inject(Nz),ui=Bh}catch{}}bp.createRoot=function(e,t){if(!uM(e))throw Error(ee(299));var n=!1,i="",s=RT,r=LT,a=zT,o=null;return t!=null&&(t.unstable_strictMode===!0&&(n=!0),t.identifierPrefix!==void 0&&(i=t.identifierPrefix),t.onUncaughtError!==void 0&&(s=t.onUncaughtError),t.onCaughtError!==void 0&&(r=t.onCaughtError),t.onRecoverableError!==void 0&&(a=t.onRecoverableError),t.unstable_transitionCallbacks!==void 0&&(o=t.unstable_transitionCallbacks)),t=R8(e,1,!1,null,null,n,i,s,r,a,o,null),e[Jc]=t.current,G_(e.nodeType===8?e.parentNode:e),new J_(t)};bp.hydrateRoot=function(e,t,n){if(!uM(e))throw Error(ee(299));var i=!1,s="",r=RT,a=LT,o=zT,c=null,d=null;return n!=null&&(n.unstable_strictMode===!0&&(i=!0),n.identifierPrefix!==void 0&&(s=n.identifierPrefix),n.onUncaughtError!==void 0&&(r=n.onUncaughtError),n.onCaughtError!==void 0&&(a=n.onCaughtError),n.onRecoverableError!==void 0&&(o=n.onRecoverableError),n.unstable_transitionCallbacks!==void 0&&(c=n.unstable_transitionCallbacks),n.formState!==void 0&&(d=n.formState)),t=R8(e,1,!0,t,n??null,i,s,r,a,o,c,d),t.context=L8(null),n=t.current,i=br(),s=_r(i),s.callback=null,_a(n,s,i),t.current.lanes=i,Pf(t,i),Kn(t),e[Jc]=t.current,G_(e),new zp(t)};bp.version="19.0.0-rc-941e1b4a-20240729";function H8(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(H8)}catch(e){console.error(e)}}H8(),iM.exports=bp;var kz=iM.exports;const Ez=yp(kz),F8=()=>!window.invokeNative,Az=()=>{},ss=(e,t)=>{const n=x.useRef(Az);x.useEffect(()=>{n.current=t},[t]),x.useEffect(()=>{const i=s=>{const{action:r,data:a}=s.data;n.current&&r===e&&n.current(a)};return window.addEventListener("message",i),()=>window.removeEventListener("message",i)},[e])};async function K(e,t,n){const i={method:"post",headers:{"Content-Type":"application/json; charset=UTF-8"},body:JSON.stringify(t)};if(F8()&&n)return n;const s=window.GetParentResourceName?window.GetParentResourceName():"electus_gangs";return await(await fetch(`https://${s}/${e}`,i)).json()}const Oz=x.createContext(null),Dz=({children:e})=>{const[t,n]=x.useState(!1);return ss("setVisible",n),window.addEventListener("message",i=>{i.data==="componentsLoaded"&&n(!0)}),x.useEffect(()=>{if(!t)return;const i=s=>{["Escape"].includes(s.code)&&(F8()?n(!t):K("hideFrame"))};return window.addEventListener("keydown",i),()=>window.removeEventListener("keydown",i)},[t]),u.jsx(Oz.Provider,{value:{visible:t,setVisible:n},children:u.jsx("div",{style:{visibility:t?"visible":"hidden",height:"100%",display:t?"inline":"none"},children:e})})},Ip=x.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"}),Bp=x.createContext({}),Vp=x.createContext(null),eb=typeof document<"u",Hp=eb?x.useLayoutEffect:x.useEffect,U8=x.createContext({strict:!1}),tb=e=>e.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),Pz="framerAppearId",Z8="data-"+tb(Pz),Rz={skipAnimations:!1,useManualTiming:!1};class O3{constructor(){this.order=[],this.scheduled=new Set}add(t){if(!this.scheduled.has(t))return this.scheduled.add(t),this.order.push(t),!0}remove(t){const n=this.order.indexOf(t);n!==-1&&(this.order.splice(n,1),this.scheduled.delete(t))}clear(){this.order.length=0,this.scheduled.clear()}}function Lz(e){let t=new O3,n=new O3,i=0,s=!1,r=!1;const a=new WeakSet,o={schedule:(c,d=!1,h=!1)=>{const m=h&&s,g=m?t:n;return d&&a.add(c),g.add(c)&&m&&s&&(i=t.order.length),c},cancel:c=>{n.remove(c),a.delete(c)},process:c=>{if(s){r=!0;return}if(s=!0,[t,n]=[n,t],n.clear(),i=t.order.length,i)for(let d=0;d<i;d++){const h=t.order[d];a.has(h)&&(o.schedule(h),e()),h(c)}s=!1,r&&(r=!1,o.process(c))}};return o}const Vh=["read","resolveKeyframes","update","preRender","render","postRender"],zz=40;function $8(e,t){let n=!1,i=!0;const s={delta:0,timestamp:0,isProcessing:!1},r=Vh.reduce((m,g)=>(m[g]=Lz(()=>n=!0),m),{}),a=m=>{r[m].process(s)},o=()=>{const m=performance.now();n=!1,s.delta=i?1e3/60:Math.max(Math.min(m-s.timestamp,zz),1),s.timestamp=m,s.isProcessing=!0,Vh.forEach(a),s.isProcessing=!1,n&&t&&(i=!1,e(o))},c=()=>{n=!0,i=!0,s.isProcessing||e(o)};return{schedule:Vh.reduce((m,g)=>{const v=r[g];return m[g]=(b,w=!1,M=!1)=>(n||c(),v.schedule(b,w,M)),m},{}),cancel:m=>Vh.forEach(g=>r[g].cancel(m)),state:s,steps:r}}const{schedule:nb,cancel:oae}=$8(queueMicrotask,!1);function ec(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}const W8=x.createContext({});let D3=!1;function Iz(e,t,n,i,s){const{visualElement:r}=x.useContext(Bp),a=x.useContext(U8),o=x.useContext(Vp),c=x.useContext(Ip).reducedMotion,d=x.useRef();i=i||a.renderer,!d.current&&i&&(d.current=i(e,{visualState:t,parent:r,props:n,presenceContext:o,blockInitialAnimation:o?o.initial===!1:!1,reducedMotionConfig:c}));const h=d.current,m=x.useContext(W8);h&&!h.projection&&s&&(h.type==="html"||h.type==="svg")&&Vz(d.current,n,s,m),x.useInsertionEffect(()=>{h&&h.update(n,o)});const g=x.useRef(!!(n[Z8]&&!window.HandoffComplete));return Hp(()=>{h&&(h.updateFeatures(),nb.render(h.render),g.current&&h.animationState&&h.animationState.animateChanges())}),x.useEffect(()=>{h&&(!g.current&&h.animationState&&h.animationState.animateChanges(),g.current&&(g.current=!1,D3||(D3=!0,queueMicrotask(Bz))))}),h}function Bz(){window.HandoffComplete=!0}function Vz(e,t,n,i){const{layoutId:s,layout:r,drag:a,dragConstraints:o,layoutScroll:c,layoutRoot:d}=t;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:G8(e.parent)),e.projection.setOptions({layoutId:s,layout:r,alwaysMeasureLayout:!!a||o&&ec(o),visualElement:e,scheduleRender:()=>e.scheduleRender(),animationType:typeof r=="string"?r:"both",initialPromotionConfig:i,layoutScroll:c,layoutRoot:d})}function G8(e){if(e)return e.options.allowProjection!==!1?e.projection:G8(e.parent)}function Hz(e,t,n){return x.useCallback(i=>{i&&e.mount&&e.mount(i),t&&(i?t.mount(i):t.unmount()),n&&(typeof n=="function"?n(i):ec(n)&&(n.current=i))},[t])}function af(e){return typeof e=="string"||Array.isArray(e)}function Fp(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}const ib=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],sb=["initial",...ib];function Up(e){return Fp(e.animate)||sb.some(t=>af(e[t]))}function Y8(e){return!!(Up(e)||e.variants)}function Fz(e,t){if(Up(e)){const{initial:n,animate:i}=e;return{initial:n===!1||af(n)?n:void 0,animate:af(i)?i:void 0}}return e.inherit!==!1?t:{}}function Uz(e){const{initial:t,animate:n}=Fz(e,x.useContext(Bp));return x.useMemo(()=>({initial:t,animate:n}),[P3(t),P3(n)])}function P3(e){return Array.isArray(e)?e.join(" "):e}const R3={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]},Bc={};for(const e in R3)Bc[e]={isEnabled:t=>R3[e].some(n=>!!t[n])};function Zz(e){for(const t in e)Bc[t]={...Bc[t],...e[t]}}const rb=x.createContext({}),$z=Symbol.for("motionComponentSymbol"),On=e=>e;let $x=On;function Wz({preloadedFeatures:e,createVisualElement:t,useRender:n,useVisualState:i,Component:s}){e&&Zz(e);function r(o,c){let d;const h={...x.useContext(Ip),...o,layoutId:Gz(o)},{isStatic:m}=h,g=Uz(o),v=i(o,m);if(!m&&eb){Yz();const b=qz(h);d=b.MeasureLayout,g.visualElement=Iz(s,v,h,t,b.ProjectionNode)}return u.jsxs(Bp.Provider,{value:g,children:[d&&g.visualElement?u.jsx(d,{visualElement:g.visualElement,...h}):null,n(s,o,Hz(v,g.visualElement,c),v,m,g.visualElement)]})}const a=x.forwardRef(r);return a[$z]=s,a}function Gz({layoutId:e}){const t=x.useContext(rb).id;return t&&e!==void 0?t+"-"+e:e}function Yz(e,t){x.useContext(U8).strict}function qz(e){const{drag:t,layout:n}=Bc;if(!t&&!n)return{};const i={...t,...n};return{MeasureLayout:t!=null&&t.isEnabled(e)||n!=null&&n.isEnabled(e)?i.MeasureLayout:void 0,ProjectionNode:i.ProjectionNode}}function Xz(e){function t(i,s={}){return Wz(e(i,s))}if(typeof Proxy>"u")return t;const n=new Map;return new Proxy(t,{get:(i,s)=>(n.has(s)||n.set(s,t(s)),n.get(s))})}const Kz=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function ab(e){return typeof e!="string"||e.includes("-")?!1:!!(Kz.indexOf(e)>-1||/[A-Z]/u.test(e))}const Cg={};function Qz(e){Object.assign(Cg,e)}const If=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],rl=new Set(If);function q8(e,{layout:t,layoutId:n}){return rl.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!Cg[e]||e==="opacity")}const on=e=>!!(e&&e.getVelocity),Jz={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},eI=If.length;function tI(e,{enableHardwareAcceleration:t=!0,allowTransformNone:n=!0},i,s){let r="";for(let a=0;a<eI;a++){const o=If[a];if(e[o]!==void 0){const c=Jz[o]||o;r+=`${c}(${e[o]}) `}}return t&&!e.z&&(r+="translateZ(0)"),r=r.trim(),s?r=s(e,i?"":r):n&&i&&(r="none"),r}const X8=e=>t=>typeof t=="string"&&t.startsWith(e),K8=X8("--"),nI=X8("var(--"),ob=e=>nI(e)?iI.test(e.split("/*")[0].trim()):!1,iI=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,sI=(e,t)=>t&&typeof e=="number"?t.transform(e):e,Ra=(e,t,n)=>n>t?t:n<e?e:n,su={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},Dd={...su,transform:e=>Ra(0,1,e)},Hh={...su,default:1},Pd=e=>Math.round(e*1e5)/1e5,lb=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu,rI=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu,aI=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu;function Bf(e){return typeof e=="string"}const Vf=e=>({test:t=>Bf(t)&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),qr=Vf("deg"),Ns=Vf("%"),Me=Vf("px"),oI=Vf("vh"),lI=Vf("vw"),L3={...Ns,parse:e=>Ns.parse(e)/100,transform:e=>Ns.transform(e*100)},z3={...su,transform:Math.round},Q8={borderWidth:Me,borderTopWidth:Me,borderRightWidth:Me,borderBottomWidth:Me,borderLeftWidth:Me,borderRadius:Me,radius:Me,borderTopLeftRadius:Me,borderTopRightRadius:Me,borderBottomRightRadius:Me,borderBottomLeftRadius:Me,width:Me,maxWidth:Me,height:Me,maxHeight:Me,size:Me,top:Me,right:Me,bottom:Me,left:Me,padding:Me,paddingTop:Me,paddingRight:Me,paddingBottom:Me,paddingLeft:Me,margin:Me,marginTop:Me,marginRight:Me,marginBottom:Me,marginLeft:Me,rotate:qr,rotateX:qr,rotateY:qr,rotateZ:qr,scale:Hh,scaleX:Hh,scaleY:Hh,scaleZ:Hh,skew:qr,skewX:qr,skewY:qr,distance:Me,translateX:Me,translateY:Me,translateZ:Me,x:Me,y:Me,z:Me,perspective:Me,transformPerspective:Me,opacity:Dd,originX:L3,originY:L3,originZ:Me,zIndex:z3,backgroundPositionX:Me,backgroundPositionY:Me,fillOpacity:Dd,strokeOpacity:Dd,numOctaves:z3};function cb(e,t,n,i){const{style:s,vars:r,transform:a,transformOrigin:o}=e;let c=!1,d=!1,h=!0;for(const m in t){const g=t[m];if(K8(m)){r[m]=g;continue}const v=Q8[m],b=sI(g,v);if(rl.has(m)){if(c=!0,a[m]=b,!h)continue;g!==(v.default||0)&&(h=!1)}else m.startsWith("origin")?(d=!0,o[m]=b):s[m]=b}if(t.transform||(c||i?s.transform=tI(e.transform,n,h,i):s.transform&&(s.transform="none")),d){const{originX:m="50%",originY:g="50%",originZ:v=0}=o;s.transformOrigin=`${m} ${g} ${v}`}}const ub=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function J8(e,t,n){for(const i in t)!on(t[i])&&!q8(i,n)&&(e[i]=t[i])}function cI({transformTemplate:e},t,n){return x.useMemo(()=>{const i=ub();return cb(i,t,{enableHardwareAcceleration:!n},e),Object.assign({},i.vars,i.style)},[t])}function uI(e,t,n){const i=e.style||{},s={};return J8(s,i,e),Object.assign(s,cI(e,t,n)),s}function dI(e,t,n){const i={},s=uI(e,t,n);return e.drag&&e.dragListener!==!1&&(i.draggable=!1,s.userSelect=s.WebkitUserSelect=s.WebkitTouchCallout="none",s.touchAction=e.drag===!0?"none":`pan-${e.drag==="x"?"y":"x"}`),e.tabIndex===void 0&&(e.onTap||e.onTapStart||e.whileTap)&&(i.tabIndex=0),i.style=s,i}const fI=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","ignoreStrict","viewport"]);function Mg(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||fI.has(e)}let ej=e=>!Mg(e);function hI(e){e&&(ej=t=>t.startsWith("on")?!Mg(t):e(t))}try{hI(require("@emotion/is-prop-valid").default)}catch{}function mI(e,t,n){const i={};for(const s in e)s==="values"&&typeof e.values=="object"||(ej(s)||n===!0&&Mg(s)||!t&&!Mg(s)||e.draggable&&s.startsWith("onDrag"))&&(i[s]=e[s]);return i}function I3(e,t,n){return typeof e=="string"?e:Me.transform(t+n*e)}function gI(e,t,n){const i=I3(t,e.x,e.width),s=I3(n,e.y,e.height);return`${i} ${s}`}const pI={offset:"stroke-dashoffset",array:"stroke-dasharray"},vI={offset:"strokeDashoffset",array:"strokeDasharray"};function xI(e,t,n=1,i=0,s=!0){e.pathLength=1;const r=s?pI:vI;e[r.offset]=Me.transform(-i);const a=Me.transform(t),o=Me.transform(n);e[r.array]=`${a} ${o}`}function db(e,{attrX:t,attrY:n,attrScale:i,originX:s,originY:r,pathLength:a,pathSpacing:o=1,pathOffset:c=0,...d},h,m,g){if(cb(e,d,h,g),m){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};const{attrs:v,style:b,dimensions:w}=e;v.transform&&(w&&(b.transform=v.transform),delete v.transform),w&&(s!==void 0||r!==void 0||b.transform)&&(b.transformOrigin=gI(w,s!==void 0?s:.5,r!==void 0?r:.5)),t!==void 0&&(v.x=t),n!==void 0&&(v.y=n),i!==void 0&&(v.scale=i),a!==void 0&&xI(v,a,o,c,!1)}const tj=()=>({...ub(),attrs:{}}),fb=e=>typeof e=="string"&&e.toLowerCase()==="svg";function yI(e,t,n,i){const s=x.useMemo(()=>{const r=tj();return db(r,t,{enableHardwareAcceleration:!1},fb(i),e.transformTemplate),{...r.attrs,style:{...r.style}}},[t]);if(e.style){const r={};J8(r,e.style,e),s.style={...r,...s.style}}return s}function _I(e=!1){return(n,i,s,{latestValues:r},a)=>{const c=(ab(n)?yI:dI)(i,r,a,n),d=mI(i,typeof n=="string",e),h=n!==x.Fragment?{...d,...c,ref:s}:{},{children:m}=i,g=x.useMemo(()=>on(m)?m.get():m,[m]);return x.createElement(n,{...h,children:g})}}function nj(e,{style:t,vars:n},i,s){Object.assign(e.style,t,s&&s.getProjectionStyles(i));for(const r in n)e.style.setProperty(r,n[r])}const ij=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]);function sj(e,t,n,i){nj(e,t,void 0,i);for(const s in t.attrs)e.setAttribute(ij.has(s)?s:tb(s),t.attrs[s])}function hb(e,t,n){var i;const{style:s}=e,r={};for(const a in s)(on(s[a])||t.style&&on(t.style[a])||q8(a,e)||((i=n==null?void 0:n.getValue(a))===null||i===void 0?void 0:i.liveStyle)!==void 0)&&(r[a]=s[a]);return r}function rj(e,t,n){const i=hb(e,t,n);for(const s in e)if(on(e[s])||on(t[s])){const r=If.indexOf(s)!==-1?"attr"+s.charAt(0).toUpperCase()+s.substring(1):s;i[r]=e[s]}return i}function B3(e){const t=[{},{}];return e==null||e.values.forEach((n,i)=>{t[0][i]=n.get(),t[1][i]=n.getVelocity()}),t}function mb(e,t,n,i){if(typeof t=="function"){const[s,r]=B3(i);t=t(n!==void 0?n:e.custom,s,r)}if(typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"){const[s,r]=B3(i);t=t(n!==void 0?n:e.custom,s,r)}return t}function Zp(e){const t=x.useRef(null);return t.current===null&&(t.current=e()),t.current}const Wx=e=>Array.isArray(e),bI=e=>!!(e&&typeof e=="object"&&e.mix&&e.toValue),wI=e=>Wx(e)?e[e.length-1]||0:e;function Om(e){const t=on(e)?e.get():e;return bI(t)?t.toValue():t}function SI({scrapeMotionValuesFromProps:e,createRenderState:t,onMount:n},i,s,r){const a={latestValues:CI(i,s,r,e),renderState:t()};return n&&(a.mount=o=>n(i,o,a)),a}const aj=e=>(t,n)=>{const i=x.useContext(Bp),s=x.useContext(Vp),r=()=>SI(e,t,i,s);return n?r():Zp(r)};function CI(e,t,n,i){const s={},r=i(e,{});for(const g in r)s[g]=Om(r[g]);let{initial:a,animate:o}=e;const c=Up(e),d=Y8(e);t&&d&&!c&&e.inherit!==!1&&(a===void 0&&(a=t.initial),o===void 0&&(o=t.animate));let h=n?n.initial===!1:!1;h=h||a===!1;const m=h?o:a;return m&&typeof m!="boolean"&&!Fp(m)&&(Array.isArray(m)?m:[m]).forEach(v=>{const b=mb(e,v);if(!b)return;const{transitionEnd:w,transition:M,...y}=b;for(const S in y){let T=y[S];if(Array.isArray(T)){const N=h?T.length-1:0;T=T[N]}T!==null&&(s[S]=T)}for(const S in w)s[S]=w[S]}),s}const{schedule:rt,cancel:Rs,state:dn,steps:nv}=$8(typeof requestAnimationFrame<"u"?requestAnimationFrame:On,!0),MI={useVisualState:aj({scrapeMotionValuesFromProps:rj,createRenderState:tj,onMount:(e,t,{renderState:n,latestValues:i})=>{rt.read(()=>{try{n.dimensions=typeof t.getBBox=="function"?t.getBBox():t.getBoundingClientRect()}catch{n.dimensions={x:0,y:0,width:0,height:0}}}),rt.render(()=>{db(n,i,{enableHardwareAcceleration:!1},fb(t.tagName),e.transformTemplate),sj(t,n)})}})},TI={useVisualState:aj({scrapeMotionValuesFromProps:hb,createRenderState:ub})};function jI(e,{forwardMotionProps:t=!1},n,i){return{...ab(e)?MI:TI,preloadedFeatures:n,useRender:_I(t),createVisualElement:i,Component:e}}function pr(e,t,n,i={passive:!0}){return e.addEventListener(t,n,i),()=>e.removeEventListener(t,n)}const oj=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1;function $p(e,t="page"){return{point:{x:e[`${t}X`],y:e[`${t}Y`]}}}const NI=e=>t=>oj(t)&&e(t,$p(t));function wr(e,t,n,i){return pr(e,t,NI(n),i)}const kI=(e,t)=>n=>t(e(n)),Sr=(...e)=>e.reduce(kI);function lj(e){let t=null;return()=>{const n=()=>{t=null};return t===null?(t=e,n):!1}}const V3=lj("dragHorizontal"),H3=lj("dragVertical");function cj(e){let t=!1;if(e==="y")t=H3();else if(e==="x")t=V3();else{const n=V3(),i=H3();n&&i?t=()=>{n(),i()}:(n&&n(),i&&i())}return t}function uj(){const e=cj(!0);return e?(e(),!1):!0}class Ua{constructor(t){this.isMounted=!1,this.node=t}update(){}}function F3(e,t){const n=t?"pointerenter":"pointerleave",i=t?"onHoverStart":"onHoverEnd",s=(r,a)=>{if(r.pointerType==="touch"||uj())return;const o=e.getProps();e.animationState&&o.whileHover&&e.animationState.setActive("whileHover",t);const c=o[i];c&&rt.postRender(()=>c(r,a))};return wr(e.current,n,s,{passive:!e.getProps()[i]})}class EI extends Ua{mount(){this.unmount=Sr(F3(this.node,!0),F3(this.node,!1))}unmount(){}}class AI extends Ua{constructor(){super(...arguments),this.isActive=!1}onFocus(){let t=!1;try{t=this.node.current.matches(":focus-visible")}catch{t=!0}!t||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=Sr(pr(this.node.current,"focus",()=>this.onFocus()),pr(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}const dj=(e,t)=>t?e===t?!0:dj(e,t.parentElement):!1;function iv(e,t){if(!t)return;const n=new PointerEvent("pointer"+e);t(n,$p(n))}class OI extends Ua{constructor(){super(...arguments),this.removeStartListeners=On,this.removeEndListeners=On,this.removeAccessibleListeners=On,this.startPointerPress=(t,n)=>{if(this.isPressing)return;this.removeEndListeners();const i=this.node.getProps(),r=wr(window,"pointerup",(o,c)=>{if(!this.checkPressEnd())return;const{onTap:d,onTapCancel:h,globalTapTarget:m}=this.node.getProps(),g=!m&&!dj(this.node.current,o.target)?h:d;g&&rt.update(()=>g(o,c))},{passive:!(i.onTap||i.onPointerUp)}),a=wr(window,"pointercancel",(o,c)=>this.cancelPress(o,c),{passive:!(i.onTapCancel||i.onPointerCancel)});this.removeEndListeners=Sr(r,a),this.startPress(t,n)},this.startAccessiblePress=()=>{const t=r=>{if(r.key!=="Enter"||this.isPressing)return;const a=o=>{o.key!=="Enter"||!this.checkPressEnd()||iv("up",(c,d)=>{const{onTap:h}=this.node.getProps();h&&rt.postRender(()=>h(c,d))})};this.removeEndListeners(),this.removeEndListeners=pr(this.node.current,"keyup",a),iv("down",(o,c)=>{this.startPress(o,c)})},n=pr(this.node.current,"keydown",t),i=()=>{this.isPressing&&iv("cancel",(r,a)=>this.cancelPress(r,a))},s=pr(this.node.current,"blur",i);this.removeAccessibleListeners=Sr(n,s)}}startPress(t,n){this.isPressing=!0;const{onTapStart:i,whileTap:s}=this.node.getProps();s&&this.node.animationState&&this.node.animationState.setActive("whileTap",!0),i&&rt.postRender(()=>i(t,n))}checkPressEnd(){return this.removeEndListeners(),this.isPressing=!1,this.node.getProps().whileTap&&this.node.animationState&&this.node.animationState.setActive("whileTap",!1),!uj()}cancelPress(t,n){if(!this.checkPressEnd())return;const{onTapCancel:i}=this.node.getProps();i&&rt.postRender(()=>i(t,n))}mount(){const t=this.node.getProps(),n=wr(t.globalTapTarget?window:this.node.current,"pointerdown",this.startPointerPress,{passive:!(t.onTapStart||t.onPointerStart)}),i=pr(this.node.current,"focus",this.startAccessiblePress);this.removeStartListeners=Sr(n,i)}unmount(){this.removeStartListeners(),this.removeEndListeners(),this.removeAccessibleListeners()}}const Gx=new WeakMap,sv=new WeakMap,DI=e=>{const t=Gx.get(e.target);t&&t(e)},PI=e=>{e.forEach(DI)};function RI({root:e,...t}){const n=e||document;sv.has(n)||sv.set(n,{});const i=sv.get(n),s=JSON.stringify(t);return i[s]||(i[s]=new IntersectionObserver(PI,{root:e,...t})),i[s]}function LI(e,t,n){const i=RI(t);return Gx.set(e,n),i.observe(e),()=>{Gx.delete(e),i.unobserve(e)}}const zI={some:0,all:1};class II extends Ua{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:t={}}=this.node.getProps(),{root:n,margin:i,amount:s="some",once:r}=t,a={root:n?n.current:void 0,rootMargin:i,threshold:typeof s=="number"?s:zI[s]},o=c=>{const{isIntersecting:d}=c;if(this.isInView===d||(this.isInView=d,r&&!d&&this.hasEnteredView))return;d&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",d);const{onViewportEnter:h,onViewportLeave:m}=this.node.getProps(),g=d?h:m;g&&g(c)};return LI(this.node.current,a,o)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:t,prevProps:n}=this.node;["amount","margin","root"].some(BI(t,n))&&this.startObserver()}unmount(){}}function BI({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const VI={inView:{Feature:II},tap:{Feature:OI},focus:{Feature:AI},hover:{Feature:EI}};function fj(e,t){if(!Array.isArray(t))return!1;const n=t.length;if(n!==e.length)return!1;for(let i=0;i<n;i++)if(t[i]!==e[i])return!1;return!0}function Wp(e,t,n){const i=e.getProps();return mb(i,t,n!==void 0?n:i.custom,e)}const Cr=e=>e*1e3,ks=e=>e/1e3,HI={type:"spring",stiffness:500,damping:25,restSpeed:10},FI=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),UI={type:"keyframes",duration:.8},ZI={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},$I=(e,{keyframes:t})=>t.length>2?UI:rl.has(e)?e.startsWith("scale")?FI(t[1]):HI:ZI;function WI({when:e,delay:t,delayChildren:n,staggerChildren:i,staggerDirection:s,repeat:r,repeatType:a,repeatDelay:o,from:c,elapsed:d,...h}){return!!Object.keys(h).length}function gb(e,t){return e[t]||e.default||e}const GI=e=>e!==null;function Gp(e,{repeat:t,repeatType:n="loop"},i){const s=e.filter(GI),r=t&&n!=="loop"&&t%2===1?0:s.length-1;return!r||i===void 0?s[r]:i}let Dm;function YI(){Dm=void 0}const Ta={now:()=>(Dm===void 0&&Ta.set(dn.isProcessing||Rz.useManualTiming?dn.timestamp:performance.now()),Dm),set:e=>{Dm=e,queueMicrotask(YI)}},hj=e=>/^0[^.\s]+$/u.test(e);function qI(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||hj(e):!0}const mj=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e),XI=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function KI(e){const t=XI.exec(e);if(!t)return[,];const[,n,i,s]=t;return[`--${n??i}`,s]}function gj(e,t,n=1){const[i,s]=KI(e);if(!i)return;const r=window.getComputedStyle(t).getPropertyValue(i);if(r){const a=r.trim();return mj(a)?parseFloat(a):a}return ob(s)?gj(s,t,n+1):s}const QI=new Set(["width","height","top","left","right","bottom","x","y","translateX","translateY"]),U3=e=>e===su||e===Me,Z3=(e,t)=>parseFloat(e.split(", ")[t]),$3=(e,t)=>(n,{transform:i})=>{if(i==="none"||!i)return 0;const s=i.match(/^matrix3d\((.+)\)$/u);if(s)return Z3(s[1],t);{const r=i.match(/^matrix\((.+)\)$/u);return r?Z3(r[1],e):0}},JI=new Set(["x","y","z"]),eB=If.filter(e=>!JI.has(e));function tB(e){const t=[];return eB.forEach(n=>{const i=e.getValue(n);i!==void 0&&(t.push([n,i.get()]),i.set(n.startsWith("scale")?1:0))}),t}const Vc={width:({x:e},{paddingLeft:t="0",paddingRight:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),height:({y:e},{paddingTop:t="0",paddingBottom:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:$3(4,13),y:$3(5,14)};Vc.translateX=Vc.x;Vc.translateY=Vc.y;const pj=e=>t=>t.test(e),nB={test:e=>e==="auto",parse:e=>e},vj=[su,Me,Ns,qr,lI,oI,nB],W3=e=>vj.find(pj(e)),Ro=new Set;let Yx=!1,qx=!1;function xj(){if(qx){const e=Array.from(Ro).filter(i=>i.needsMeasurement),t=new Set(e.map(i=>i.element)),n=new Map;t.forEach(i=>{const s=tB(i);s.length&&(n.set(i,s),i.render())}),e.forEach(i=>i.measureInitialState()),t.forEach(i=>{i.render();const s=n.get(i);s&&s.forEach(([r,a])=>{var o;(o=i.getValue(r))===null||o===void 0||o.set(a)})}),e.forEach(i=>i.measureEndState()),e.forEach(i=>{i.suspendedScrollY!==void 0&&window.scrollTo(0,i.suspendedScrollY)})}qx=!1,Yx=!1,Ro.forEach(e=>e.complete()),Ro.clear()}function yj(){Ro.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(qx=!0)})}function iB(){yj(),xj()}class pb{constructor(t,n,i,s,r,a=!1){this.isComplete=!1,this.isAsync=!1,this.needsMeasurement=!1,this.isScheduled=!1,this.unresolvedKeyframes=[...t],this.onComplete=n,this.name=i,this.motionValue=s,this.element=r,this.isAsync=a}scheduleResolve(){this.isScheduled=!0,this.isAsync?(Ro.add(this),Yx||(Yx=!0,rt.read(yj),rt.resolveKeyframes(xj))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:n,element:i,motionValue:s}=this;for(let r=0;r<t.length;r++)if(t[r]===null)if(r===0){const a=s==null?void 0:s.get(),o=t[t.length-1];if(a!==void 0)t[0]=a;else if(i&&n){const c=i.readValue(n,o);c!=null&&(t[0]=c)}t[0]===void 0&&(t[0]=o),s&&a===void 0&&s.set(t[0])}else t[r]=t[r-1]}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(){this.isComplete=!0,this.onComplete(this.unresolvedKeyframes,this.finalKeyframe),Ro.delete(this)}cancel(){this.isComplete||(this.isScheduled=!1,Ro.delete(this))}resume(){this.isComplete||this.scheduleResolve()}}const vb=(e,t)=>n=>!!(Bf(n)&&aI.test(n)&&n.startsWith(e)||t&&Object.prototype.hasOwnProperty.call(n,t)),_j=(e,t,n)=>i=>{if(!Bf(i))return i;const[s,r,a,o]=i.match(lb);return{[e]:parseFloat(s),[t]:parseFloat(r),[n]:parseFloat(a),alpha:o!==void 0?parseFloat(o):1}},sB=e=>Ra(0,255,e),rv={...su,transform:e=>Math.round(sB(e))},wo={test:vb("rgb","red"),parse:_j("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:i=1})=>"rgba("+rv.transform(e)+", "+rv.transform(t)+", "+rv.transform(n)+", "+Pd(Dd.transform(i))+")"};function rB(e){let t="",n="",i="",s="";return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),i=e.substring(5,7),s=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),i=e.substring(3,4),s=e.substring(4,5),t+=t,n+=n,i+=i,s+=s),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(i,16),alpha:s?parseInt(s,16)/255:1}}const Xx={test:vb("#"),parse:rB,transform:wo.transform},tc={test:vb("hsl","hue"),parse:_j("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:i=1})=>"hsla("+Math.round(e)+", "+Ns.transform(Pd(t))+", "+Ns.transform(Pd(n))+", "+Pd(Dd.transform(i))+")"},wn={test:e=>wo.test(e)||Xx.test(e)||tc.test(e),parse:e=>wo.test(e)?wo.parse(e):tc.test(e)?tc.parse(e):Xx.parse(e),transform:e=>Bf(e)?e:e.hasOwnProperty("red")?wo.transform(e):tc.transform(e)};function aB(e){var t,n;return isNaN(e)&&Bf(e)&&(((t=e.match(lb))===null||t===void 0?void 0:t.length)||0)+(((n=e.match(rI))===null||n===void 0?void 0:n.length)||0)>0}const bj="number",wj="color",oB="var",lB="var(",G3="${}",cB=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function of(e){const t=e.toString(),n=[],i={color:[],number:[],var:[]},s=[];let r=0;const o=t.replace(cB,c=>(wn.test(c)?(i.color.push(r),s.push(wj),n.push(wn.parse(c))):c.startsWith(lB)?(i.var.push(r),s.push(oB),n.push(c)):(i.number.push(r),s.push(bj),n.push(parseFloat(c))),++r,G3)).split(G3);return{values:n,split:o,indexes:i,types:s}}function Sj(e){return of(e).values}function Cj(e){const{split:t,types:n}=of(e),i=t.length;return s=>{let r="";for(let a=0;a<i;a++)if(r+=t[a],s[a]!==void 0){const o=n[a];o===bj?r+=Pd(s[a]):o===wj?r+=wn.transform(s[a]):r+=s[a]}return r}}const uB=e=>typeof e=="number"?0:e;function dB(e){const t=Sj(e);return Cj(e)(t.map(uB))}const La={test:aB,parse:Sj,createTransformer:Cj,getAnimatableNone:dB},fB=new Set(["brightness","contrast","saturate","opacity"]);function hB(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[i]=n.match(lb)||[];if(!i)return e;const s=n.replace(i,"");let r=fB.has(t)?1:0;return i!==n&&(r*=100),t+"("+r+s+")"}const mB=/\b([a-z-]*)\(.*?\)/gu,Kx={...La,getAnimatableNone:e=>{const t=e.match(mB);return t?t.map(hB).join(" "):e}},gB={...Q8,color:wn,backgroundColor:wn,outlineColor:wn,fill:wn,stroke:wn,borderColor:wn,borderTopColor:wn,borderRightColor:wn,borderBottomColor:wn,borderLeftColor:wn,filter:Kx,WebkitFilter:Kx},xb=e=>gB[e];function Mj(e,t){let n=xb(e);return n!==Kx&&(n=La),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const pB=new Set(["auto","none","0"]);function vB(e,t,n){let i=0,s;for(;i<e.length&&!s;){const r=e[i];typeof r=="string"&&!pB.has(r)&&of(r).values.length&&(s=e[i]),i++}if(s&&n)for(const r of t)e[r]=Mj(n,s)}class Tj extends pb{constructor(t,n,i,s){super(t,n,i,s,s==null?void 0:s.owner,!0)}readKeyframes(){const{unresolvedKeyframes:t,element:n,name:i}=this;if(!n.current)return;super.readKeyframes();for(let c=0;c<t.length;c++){let d=t[c];if(typeof d=="string"&&(d=d.trim(),ob(d))){const h=gj(d,n.current);h!==void 0&&(t[c]=h),c===t.length-1&&(this.finalKeyframe=d)}}if(this.resolveNoneKeyframes(),!QI.has(i)||t.length!==2)return;const[s,r]=t,a=W3(s),o=W3(r);if(a!==o)if(U3(a)&&U3(o))for(let c=0;c<t.length;c++){const d=t[c];typeof d=="string"&&(t[c]=parseFloat(d))}else this.needsMeasurement=!0}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:n}=this,i=[];for(let s=0;s<t.length;s++)qI(t[s])&&i.push(s);i.length&&vB(t,i,n)}measureInitialState(){const{element:t,unresolvedKeyframes:n,name:i}=this;if(!t.current)return;i==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=Vc[i](t.measureViewportBox(),window.getComputedStyle(t.current)),n[0]=this.measuredOrigin;const s=n[n.length-1];s!==void 0&&t.getValue(i,s).jump(s,!1)}measureEndState(){var t;const{element:n,name:i,unresolvedKeyframes:s}=this;if(!n.current)return;const r=n.getValue(i);r&&r.jump(this.measuredOrigin,!1);const a=s.length-1,o=s[a];s[a]=Vc[i](n.measureViewportBox(),window.getComputedStyle(n.current)),o!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=o),!((t=this.removedTransforms)===null||t===void 0)&&t.length&&this.removedTransforms.forEach(([c,d])=>{n.getValue(c).set(d)}),this.resolveNoneKeyframes()}}function jj(e){let t;return()=>(t===void 0&&(t=e()),t)}const Y3=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(La.test(e)||e==="0")&&!e.startsWith("url("));function xB(e){const t=e[0];if(e.length===1)return!0;for(let n=0;n<e.length;n++)if(e[n]!==t)return!0}function yB(e,t,n,i){const s=e[0];if(s===null)return!1;if(t==="display"||t==="visibility")return!0;const r=e[e.length-1],a=Y3(s,t),o=Y3(r,t);return!a||!o?!1:xB(e)||n==="spring"&&i}class Nj{constructor({autoplay:t=!0,delay:n=0,type:i="keyframes",repeat:s=0,repeatDelay:r=0,repeatType:a="loop",...o}){this.isStopped=!1,this.hasAttemptedResolve=!1,this.options={autoplay:t,delay:n,type:i,repeat:s,repeatDelay:r,repeatType:a,...o},this.updateFinishedPromise()}get resolved(){return!this._resolved&&!this.hasAttemptedResolve&&iB(),this._resolved}onKeyframesResolved(t,n){this.hasAttemptedResolve=!0;const{name:i,type:s,velocity:r,delay:a,onComplete:o,onUpdate:c,isGenerator:d}=this.options;if(!d&&!yB(t,i,s,r))if(a)this.options.duration=0;else{c==null||c(Gp(t,this.options,n)),o==null||o(),this.resolveFinishedPromise();return}const h=this.initPlayback(t,n);h!==!1&&(this._resolved={keyframes:t,finalKeyframe:n,...h},this.onPostResolved())}onPostResolved(){}then(t,n){return this.currentFinishedPromise.then(t,n)}updateFinishedPromise(){this.currentFinishedPromise=new Promise(t=>{this.resolveFinishedPromise=t})}}function kj(e,t){return t?e*(1e3/t):0}const _B=5;function Ej(e,t,n){const i=Math.max(t-_B,0);return kj(n-e(i),t-i)}const av=.001,bB=.01,wB=10,SB=.05,CB=1;function MB({duration:e=800,bounce:t=.25,velocity:n=0,mass:i=1}){let s,r,a=1-t;a=Ra(SB,CB,a),e=Ra(bB,wB,ks(e)),a<1?(s=d=>{const h=d*a,m=h*e,g=h-n,v=Qx(d,a),b=Math.exp(-m);return av-g/v*b},r=d=>{const m=d*a*e,g=m*n+n,v=Math.pow(a,2)*Math.pow(d,2)*e,b=Math.exp(-m),w=Qx(Math.pow(d,2),a);return(-s(d)+av>0?-1:1)*((g-v)*b)/w}):(s=d=>{const h=Math.exp(-d*e),m=(d-n)*e+1;return-av+h*m},r=d=>{const h=Math.exp(-d*e),m=(n-d)*(e*e);return h*m});const o=5/e,c=jB(s,r,o);if(e=Cr(e),isNaN(c))return{stiffness:100,damping:10,duration:e};{const d=Math.pow(c,2)*i;return{stiffness:d,damping:a*2*Math.sqrt(i*d),duration:e}}}const TB=12;function jB(e,t,n){let i=n;for(let s=1;s<TB;s++)i=i-e(i)/t(i);return i}function Qx(e,t){return e*Math.sqrt(1-t*t)}const NB=["duration","bounce"],kB=["stiffness","damping","mass"];function q3(e,t){return t.some(n=>e[n]!==void 0)}function EB(e){let t={velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1,...e};if(!q3(e,kB)&&q3(e,NB)){const n=MB(e);t={...t,...n,mass:1},t.isResolvedFromDuration=!0}return t}function yb({keyframes:e,restDelta:t,restSpeed:n,...i}){const s=e[0],r=e[e.length-1],a={done:!1,value:s},{stiffness:o,damping:c,mass:d,duration:h,velocity:m,isResolvedFromDuration:g}=EB({...i,velocity:-ks(i.velocity||0)}),v=m||0,b=c/(2*Math.sqrt(o*d)),w=r-s,M=ks(Math.sqrt(o/d)),y=Math.abs(w)<5;n||(n=y?.01:2),t||(t=y?.005:.5);let S;if(b<1){const T=Qx(M,b);S=N=>{const k=Math.exp(-b*M*N);return r-k*((v+b*M*w)/T*Math.sin(T*N)+w*Math.cos(T*N))}}else if(b===1)S=T=>r-Math.exp(-M*T)*(w+(v+M*w)*T);else{const T=M*Math.sqrt(b*b-1);S=N=>{const k=Math.exp(-b*M*N),E=Math.min(T*N,300);return r-k*((v+b*M*w)*Math.sinh(E)+T*w*Math.cosh(E))/T}}return{calculatedDuration:g&&h||null,next:T=>{const N=S(T);if(g)a.done=T>=h;else{let k=v;T!==0&&(b<1?k=Ej(S,T,N):k=0);const E=Math.abs(k)<=n,D=Math.abs(r-N)<=t;a.done=E&&D}return a.value=a.done?r:N,a}}}function X3({keyframes:e,velocity:t=0,power:n=.8,timeConstant:i=325,bounceDamping:s=10,bounceStiffness:r=500,modifyTarget:a,min:o,max:c,restDelta:d=.5,restSpeed:h}){const m=e[0],g={done:!1,value:m},v=O=>o!==void 0&&O<o||c!==void 0&&O>c,b=O=>o===void 0?c:c===void 0||Math.abs(o-O)<Math.abs(c-O)?o:c;let w=n*t;const M=m+w,y=a===void 0?M:a(M);y!==M&&(w=y-m);const S=O=>-w*Math.exp(-O/i),T=O=>y+S(O),N=O=>{const I=S(O),P=T(O);g.done=Math.abs(I)<=d,g.value=g.done?y:P};let k,E;const D=O=>{v(g.value)&&(k=O,E=yb({keyframes:[g.value,b(g.value)],velocity:Ej(T,O,g.value),damping:s,stiffness:r,restDelta:d,restSpeed:h}))};return D(0),{calculatedDuration:null,next:O=>{let I=!1;return!E&&k===void 0&&(I=!0,N(O),D(O)),k!==void 0&&O>=k?E.next(O-k):(!I&&N(O),g)}}}const Aj=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,AB=1e-7,OB=12;function DB(e,t,n,i,s){let r,a,o=0;do a=t+(n-t)/2,r=Aj(a,i,s)-e,r>0?n=a:t=a;while(Math.abs(r)>AB&&++o<OB);return a}function Hf(e,t,n,i){if(e===t&&n===i)return On;const s=r=>DB(r,0,1,e,n);return r=>r===0||r===1?r:Aj(s(r),t,i)}const PB=Hf(.42,0,1,1),RB=Hf(0,0,.58,1),Oj=Hf(.42,0,.58,1),Dj=e=>Array.isArray(e)&&typeof e[0]!="number",Pj=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,Rj=e=>t=>1-e(1-t),_b=e=>1-Math.sin(Math.acos(e)),Lj=Rj(_b),LB=Pj(_b),zj=Hf(.33,1.53,.69,.99),bb=Rj(zj),zB=Pj(bb),IB=e=>(e*=2)<1?.5*bb(e):.5*(2-Math.pow(2,-10*(e-1))),K3={linear:On,easeIn:PB,easeInOut:Oj,easeOut:RB,circIn:_b,circInOut:LB,circOut:Lj,backIn:bb,backInOut:zB,backOut:zj,anticipate:IB},Q3=e=>{if(Array.isArray(e)){$x(e.length===4);const[t,n,i,s]=e;return Hf(t,n,i,s)}else if(typeof e=="string")return $x(K3[e]!==void 0),K3[e];return e},Hc=(e,t,n)=>{const i=t-e;return i===0?1:(n-e)/i},jt=(e,t,n)=>e+(t-e)*n;function ov(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function BB({hue:e,saturation:t,lightness:n,alpha:i}){e/=360,t/=100,n/=100;let s=0,r=0,a=0;if(!t)s=r=a=n;else{const o=n<.5?n*(1+t):n+t-n*t,c=2*n-o;s=ov(c,o,e+1/3),r=ov(c,o,e),a=ov(c,o,e-1/3)}return{red:Math.round(s*255),green:Math.round(r*255),blue:Math.round(a*255),alpha:i}}function Tg(e,t){return n=>n>0?t:e}const lv=(e,t,n)=>{const i=e*e,s=n*(t*t-i)+i;return s<0?0:Math.sqrt(s)},VB=[Xx,wo,tc],HB=e=>VB.find(t=>t.test(e));function J3(e){const t=HB(e);if(!t)return!1;let n=t.parse(e);return t===tc&&(n=BB(n)),n}const eS=(e,t)=>{const n=J3(e),i=J3(t);if(!n||!i)return Tg(e,t);const s={...n};return r=>(s.red=lv(n.red,i.red,r),s.green=lv(n.green,i.green,r),s.blue=lv(n.blue,i.blue,r),s.alpha=jt(n.alpha,i.alpha,r),wo.transform(s))},Jx=new Set(["none","hidden"]);function FB(e,t){return Jx.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function UB(e,t){return n=>jt(e,t,n)}function wb(e){return typeof e=="number"?UB:typeof e=="string"?ob(e)?Tg:wn.test(e)?eS:WB:Array.isArray(e)?Ij:typeof e=="object"?wn.test(e)?eS:ZB:Tg}function Ij(e,t){const n=[...e],i=n.length,s=e.map((r,a)=>wb(r)(r,t[a]));return r=>{for(let a=0;a<i;a++)n[a]=s[a](r);return n}}function ZB(e,t){const n={...e,...t},i={};for(const s in n)e[s]!==void 0&&t[s]!==void 0&&(i[s]=wb(e[s])(e[s],t[s]));return s=>{for(const r in i)n[r]=i[r](s);return n}}function $B(e,t){var n;const i=[],s={color:0,var:0,number:0};for(let r=0;r<t.values.length;r++){const a=t.types[r],o=e.indexes[a][s[a]],c=(n=e.values[o])!==null&&n!==void 0?n:0;i[r]=c,s[a]++}return i}const WB=(e,t)=>{const n=La.createTransformer(t),i=of(e),s=of(t);return i.indexes.var.length===s.indexes.var.length&&i.indexes.color.length===s.indexes.color.length&&i.indexes.number.length>=s.indexes.number.length?Jx.has(e)&&!s.values.length||Jx.has(t)&&!i.values.length?FB(e,t):Sr(Ij($B(i,s),s.values),n):Tg(e,t)};function Bj(e,t,n){return typeof e=="number"&&typeof t=="number"&&typeof n=="number"?jt(e,t,n):wb(e)(e,t)}function GB(e,t,n){const i=[],s=n||Bj,r=e.length-1;for(let a=0;a<r;a++){let o=s(e[a],e[a+1]);if(t){const c=Array.isArray(t)?t[a]||On:t;o=Sr(c,o)}i.push(o)}return i}function Vj(e,t,{clamp:n=!0,ease:i,mixer:s}={}){const r=e.length;if($x(r===t.length),r===1)return()=>t[0];if(r===2&&e[0]===e[1])return()=>t[1];e[0]>e[r-1]&&(e=[...e].reverse(),t=[...t].reverse());const a=GB(t,i,s),o=a.length,c=d=>{let h=0;if(o>1)for(;h<e.length-2&&!(d<e[h+1]);h++);const m=Hc(e[h],e[h+1],d);return a[h](m)};return n?d=>c(Ra(e[0],e[r-1],d)):c}function Hj(e,t){const n=e[e.length-1];for(let i=1;i<=t;i++){const s=Hc(0,t,i);e.push(jt(n,1,s))}}function Fj(e){const t=[0];return Hj(t,e.length-1),t}function YB(e,t){return e.map(n=>n*t)}function qB(e,t){return e.map(()=>t||Oj).splice(0,e.length-1)}function jg({duration:e=300,keyframes:t,times:n,ease:i="easeInOut"}){const s=Dj(i)?i.map(Q3):Q3(i),r={done:!1,value:t[0]},a=YB(n&&n.length===t.length?n:Fj(t),e),o=Vj(a,t,{ease:Array.isArray(s)?s:qB(t,s)});return{calculatedDuration:e,next:c=>(r.value=o(c),r.done=c>=e,r)}}const ey=2e4;function Uj(e){let t=0;const n=50;let i=e.next(t);for(;!i.done&&t<ey;)t+=n,i=e.next(t);return t>=ey?1/0:t}const XB=e=>{const t=({timestamp:n})=>e(n);return{start:()=>rt.update(t,!0),stop:()=>Rs(t),now:()=>dn.isProcessing?dn.timestamp:Ta.now()}},KB={decay:X3,inertia:X3,tween:jg,keyframes:jg,spring:yb},QB=e=>e/100;class Sb extends Nj{constructor({KeyframeResolver:t=pb,...n}){super(n),this.holdTime=null,this.startTime=null,this.cancelTime=null,this.currentTime=0,this.playbackSpeed=1,this.pendingPlayState="running",this.state="idle",this.stop=()=>{if(this.resolver.cancel(),this.isStopped=!0,this.state==="idle")return;this.teardown();const{onStop:o}=this.options;o&&o()};const{name:i,motionValue:s,keyframes:r}=this.options,a=(o,c)=>this.onKeyframesResolved(o,c);i&&s&&s.owner?this.resolver=s.owner.resolveKeyframes(r,a,i,s):this.resolver=new t(r,a,i,s),this.resolver.scheduleResolve()}initPlayback(t){const{type:n="keyframes",repeat:i=0,repeatDelay:s=0,repeatType:r,velocity:a=0}=this.options,o=KB[n]||jg;let c,d;o!==jg&&typeof t[0]!="number"&&(c=Sr(QB,Bj(t[0],t[1])),t=[0,100]);const h=o({...this.options,keyframes:t});r==="mirror"&&(d=o({...this.options,keyframes:[...t].reverse(),velocity:-a})),h.calculatedDuration===null&&(h.calculatedDuration=Uj(h));const{calculatedDuration:m}=h,g=m+s,v=g*(i+1)-s;return{generator:h,mirroredGenerator:d,mapPercentToKeyframes:c,calculatedDuration:m,resolvedDuration:g,totalDuration:v}}onPostResolved(){const{autoplay:t=!0}=this.options;this.play(),this.pendingPlayState==="paused"||!t?this.pause():this.state=this.pendingPlayState}tick(t,n=!1){const{resolved:i}=this;if(!i){const{keyframes:O}=this.options;return{done:!0,value:O[O.length-1]}}const{finalKeyframe:s,generator:r,mirroredGenerator:a,mapPercentToKeyframes:o,keyframes:c,calculatedDuration:d,totalDuration:h,resolvedDuration:m}=i;if(this.startTime===null)return r.next(0);const{delay:g,repeat:v,repeatType:b,repeatDelay:w,onUpdate:M}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-h/this.speed,this.startTime)),n?this.currentTime=t:this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=Math.round(t-this.startTime)*this.speed;const y=this.currentTime-g*(this.speed>=0?1:-1),S=this.speed>=0?y<0:y>h;this.currentTime=Math.max(y,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=h);let T=this.currentTime,N=r;if(v){const O=Math.min(this.currentTime,h)/m;let I=Math.floor(O),P=O%1;!P&&O>=1&&(P=1),P===1&&I--,I=Math.min(I,v+1),!!(I%2)&&(b==="reverse"?(P=1-P,w&&(P-=w/m)):b==="mirror"&&(N=a)),T=Ra(0,1,P)*m}const k=S?{done:!1,value:c[0]}:N.next(T);o&&(k.value=o(k.value));let{done:E}=k;!S&&d!==null&&(E=this.speed>=0?this.currentTime>=h:this.currentTime<=0);const D=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&E);return D&&s!==void 0&&(k.value=Gp(c,this.options,s)),M&&M(k.value),D&&this.finish(),k}get duration(){const{resolved:t}=this;return t?ks(t.calculatedDuration):0}get time(){return ks(this.currentTime)}set time(t){t=Cr(t),this.currentTime=t,this.holdTime!==null||this.speed===0?this.holdTime=t:this.driver&&(this.startTime=this.driver.now()-t/this.speed)}get speed(){return this.playbackSpeed}set speed(t){const n=this.playbackSpeed!==t;this.playbackSpeed=t,n&&(this.time=ks(this.currentTime))}play(){if(this.resolver.isScheduled||this.resolver.resume(),!this._resolved){this.pendingPlayState="running";return}if(this.isStopped)return;const{driver:t=XB,onPlay:n}=this.options;this.driver||(this.driver=t(s=>this.tick(s))),n&&n();const i=this.driver.now();this.holdTime!==null?this.startTime=i-this.holdTime:(!this.startTime||this.state==="finished")&&(this.startTime=i),this.state==="finished"&&this.updateFinishedPromise(),this.cancelTime=this.startTime,this.holdTime=null,this.state="running",this.driver.start()}pause(){var t;if(!this._resolved){this.pendingPlayState="paused";return}this.state="paused",this.holdTime=(t=this.currentTime)!==null&&t!==void 0?t:0}complete(){this.state!=="running"&&this.play(),this.pendingPlayState=this.state="finished",this.holdTime=null}finish(){this.teardown(),this.state="finished";const{onComplete:t}=this.options;t&&t()}cancel(){this.cancelTime!==null&&this.tick(this.cancelTime),this.teardown(),this.updateFinishedPromise()}teardown(){this.state="idle",this.stopDriver(),this.resolveFinishedPromise(),this.updateFinishedPromise(),this.startTime=this.cancelTime=null,this.resolver.cancel()}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(t){return this.startTime=0,this.tick(t,!0)}}const Zj=e=>Array.isArray(e)&&typeof e[0]=="number";function $j(e){return!!(!e||typeof e=="string"&&e in Cb||Zj(e)||Array.isArray(e)&&e.every($j))}const od=([e,t,n,i])=>`cubic-bezier(${e}, ${t}, ${n}, ${i})`,Cb={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:od([0,.65,.55,1]),circOut:od([.55,0,1,.45]),backIn:od([.31,.01,.66,-.59]),backOut:od([.33,1.53,.69,.99])};function JB(e){return Wj(e)||Cb.easeOut}function Wj(e){if(e)return Zj(e)?od(e):Array.isArray(e)?e.map(JB):Cb[e]}function eV(e,t,n,{delay:i=0,duration:s=300,repeat:r=0,repeatType:a="loop",ease:o,times:c}={}){const d={[t]:n};c&&(d.offset=c);const h=Wj(o);return Array.isArray(h)&&(d.easing=h),e.animate(d,{delay:i,duration:s,easing:Array.isArray(h)?"linear":h,fill:"both",iterations:r+1,direction:a==="reverse"?"alternate":"normal"})}const tV=jj(()=>Object.hasOwnProperty.call(Element.prototype,"animate")),nV=new Set(["opacity","clipPath","filter","transform"]),Ng=10,iV=2e4;function sV(e){return e.type==="spring"||e.name==="backgroundColor"||!$j(e.ease)}function rV(e,t){const n=new Sb({...t,keyframes:e,repeat:0,delay:0,isGenerator:!0});let i={done:!1,value:e[0]};const s=[];let r=0;for(;!i.done&&r<iV;)i=n.sample(r),s.push(i.value),r+=Ng;return{times:void 0,keyframes:s,duration:r-Ng,ease:"linear"}}class tS extends Nj{constructor(t){super(t);const{name:n,motionValue:i,keyframes:s}=this.options;this.resolver=new Tj(s,(r,a)=>this.onKeyframesResolved(r,a),n,i),this.resolver.scheduleResolve()}initPlayback(t,n){var i;let{duration:s=300,times:r,ease:a,type:o,motionValue:c,name:d}=this.options;if(!(!((i=c.owner)===null||i===void 0)&&i.current))return!1;if(sV(this.options)){const{onComplete:m,onUpdate:g,motionValue:v,...b}=this.options,w=rV(t,b);t=w.keyframes,t.length===1&&(t[1]=t[0]),s=w.duration,r=w.times,a=w.ease,o="keyframes"}const h=eV(c.owner.current,d,t,{...this.options,duration:s,times:r,ease:a});return h.startTime=Ta.now(),this.pendingTimeline?(h.timeline=this.pendingTimeline,this.pendingTimeline=void 0):h.onfinish=()=>{const{onComplete:m}=this.options;c.set(Gp(t,this.options,n)),m&&m(),this.cancel(),this.resolveFinishedPromise()},{animation:h,duration:s,times:r,type:o,ease:a,keyframes:t}}get duration(){const{resolved:t}=this;if(!t)return 0;const{duration:n}=t;return ks(n)}get time(){const{resolved:t}=this;if(!t)return 0;const{animation:n}=t;return ks(n.currentTime||0)}set time(t){const{resolved:n}=this;if(!n)return;const{animation:i}=n;i.currentTime=Cr(t)}get speed(){const{resolved:t}=this;if(!t)return 1;const{animation:n}=t;return n.playbackRate}set speed(t){const{resolved:n}=this;if(!n)return;const{animation:i}=n;i.playbackRate=t}get state(){const{resolved:t}=this;if(!t)return"idle";const{animation:n}=t;return n.playState}attachTimeline(t){if(!this._resolved)this.pendingTimeline=t;else{const{resolved:n}=this;if(!n)return On;const{animation:i}=n;i.timeline=t,i.onfinish=null}return On}play(){if(this.isStopped)return;const{resolved:t}=this;if(!t)return;const{animation:n}=t;n.playState==="finished"&&this.updateFinishedPromise(),n.play()}pause(){const{resolved:t}=this;if(!t)return;const{animation:n}=t;n.pause()}stop(){if(this.resolver.cancel(),this.isStopped=!0,this.state==="idle")return;const{resolved:t}=this;if(!t)return;const{animation:n,keyframes:i,duration:s,type:r,ease:a,times:o}=t;if(!(n.playState==="idle"||n.playState==="finished")){if(this.time){const{motionValue:c,onUpdate:d,onComplete:h,...m}=this.options,g=new Sb({...m,keyframes:i,duration:s,type:r,ease:a,times:o,isGenerator:!0}),v=Cr(this.time);c.setWithVelocity(g.sample(v-Ng).value,g.sample(v).value,Ng)}this.cancel()}}complete(){const{resolved:t}=this;t&&t.animation.finish()}cancel(){const{resolved:t}=this;t&&t.animation.cancel()}static supports(t){const{motionValue:n,name:i,repeatDelay:s,repeatType:r,damping:a,type:o}=t;return tV()&&i&&nV.has(i)&&n&&n.owner&&n.owner.current instanceof HTMLElement&&!n.owner.getProps().onUpdate&&!s&&r!=="mirror"&&a!==0&&o!=="inertia"}}function aV(e,t){let n;const i=()=>{const{currentTime:s}=t,a=(s===null?0:s.value)/100;n!==a&&e(a),n=a};return rt.update(i,!0),()=>Rs(i)}const oV=jj(()=>window.ScrollTimeline!==void 0);class Mb{constructor(t){this.stop=()=>this.runAll("stop"),this.animations=t.filter(Boolean)}then(t,n){return Promise.all(this.animations).then(t).catch(n)}getAll(t){return this.animations[0][t]}setAll(t,n){for(let i=0;i<this.animations.length;i++)this.animations[i][t]=n}attachTimeline(t){const n=this.animations.map(i=>{if(oV()&&i.attachTimeline)i.attachTimeline(t);else return i.pause(),aV(s=>{i.time=i.duration*s},t)});return()=>{n.forEach((i,s)=>{i&&i(),this.animations[s].stop()})}}get time(){return this.getAll("time")}set time(t){this.setAll("time",t)}get speed(){return this.getAll("speed")}set speed(t){this.setAll("speed",t)}get duration(){let t=0;for(let n=0;n<this.animations.length;n++)t=Math.max(t,this.animations[n].duration);return t}runAll(t){this.animations.forEach(n=>n[t]())}play(){this.runAll("play")}pause(){this.runAll("pause")}cancel(){this.runAll("cancel")}complete(){this.runAll("complete")}}const Tb=(e,t,n,i={},s,r)=>a=>{const o=gb(i,e)||{},c=o.delay||i.delay||0;let{elapsed:d=0}=i;d=d-Cr(c);let h={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:t.getVelocity(),...o,delay:-d,onUpdate:g=>{t.set(g),o.onUpdate&&o.onUpdate(g)},onComplete:()=>{a(),o.onComplete&&o.onComplete()},name:e,motionValue:t,element:r?void 0:s};WI(o)||(h={...h,...$I(e,h)}),h.duration&&(h.duration=Cr(h.duration)),h.repeatDelay&&(h.repeatDelay=Cr(h.repeatDelay)),h.from!==void 0&&(h.keyframes[0]=h.from);let m=!1;if((h.type===!1||h.duration===0&&!h.repeatDelay)&&(h.duration=0,h.delay===0&&(m=!0)),m&&!r&&t.get()!==void 0){const g=Gp(h.keyframes,o);if(g!==void 0)return rt.update(()=>{h.onUpdate(g),h.onComplete()}),new Mb([])}return!r&&tS.supports(h)?new tS(h):new Sb(h)};function kg(e){return!!(on(e)&&e.add)}function jb(e,t){e.indexOf(t)===-1&&e.push(t)}function Yp(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}class Nb{constructor(){this.subscriptions=[]}add(t){return jb(this.subscriptions,t),()=>Yp(this.subscriptions,t)}notify(t,n,i){const s=this.subscriptions.length;if(s)if(s===1)this.subscriptions[0](t,n,i);else for(let r=0;r<s;r++){const a=this.subscriptions[r];a&&a(t,n,i)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const nS=30,lV=e=>!isNaN(parseFloat(e)),Rd={current:void 0};class cV{constructor(t,n={}){this.version="11.2.12",this.canTrackVelocity=null,this.events={},this.updateAndNotify=(i,s=!0)=>{const r=Ta.now();this.updatedAt!==r&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(i),this.current!==this.prev&&this.events.change&&this.events.change.notify(this.current),s&&this.events.renderRequest&&this.events.renderRequest.notify(this.current)},this.hasAnimated=!1,this.setCurrent(t),this.owner=n.owner}setCurrent(t){this.current=t,this.updatedAt=Ta.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=lV(this.current))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return this.on("change",t)}on(t,n){this.events[t]||(this.events[t]=new Nb);const i=this.events[t].add(n);return t==="change"?()=>{i(),rt.read(()=>{this.events.change.getSize()||this.stop()})}:i}clearListeners(){for(const t in this.events)this.events[t].clear()}attach(t,n){this.passiveEffect=t,this.stopPassiveEffect=n}set(t,n=!0){!n||!this.passiveEffect?this.updateAndNotify(t,n):this.passiveEffect(t,this.updateAndNotify)}setWithVelocity(t,n,i){this.set(n),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-i}jump(t,n=!0){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,n&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}get(){return Rd.current&&Rd.current.push(this),this.current}getPrevious(){return this.prev}getVelocity(){const t=Ta.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>nS)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,nS);return kj(parseFloat(this.current)-parseFloat(this.prevFrameValue),n)}start(t){return this.stop(),new Promise(n=>{this.hasAnimated=!0,this.animation=t(n),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function Fc(e,t){return new cV(e,t)}function uV(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,Fc(n))}function dV(e,t){const n=Wp(e,t);let{transitionEnd:i={},transition:s={},...r}=n||{};r={...r,...i};for(const a in r){const o=wI(r[a]);uV(e,a,o)}}function Gj(e){return e.getProps()[Z8]}function fV({protectedKeys:e,needsAnimating:t},n){const i=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,i}function kb(e,t,{delay:n=0,transitionOverride:i,type:s}={}){var r;let{transition:a=e.getDefaultTransition(),transitionEnd:o,...c}=t;const d=e.getValue("willChange");i&&(a=i);const h=[],m=s&&e.animationState&&e.animationState.getState()[s];for(const g in c){const v=e.getValue(g,(r=e.latestValues[g])!==null&&r!==void 0?r:null),b=c[g];if(b===void 0||m&&fV(m,g))continue;const w={delay:n,elapsed:0,...gb(a||{},g)};let M=!1;if(window.HandoffAppearAnimations){const S=Gj(e);if(S){const T=window.HandoffAppearAnimations(S,g,v,rt);T!==null&&(w.elapsed=T,M=!0)}}v.start(Tb(g,v,b,e.shouldReduceMotion&&rl.has(g)?{type:!1}:w,e,M));const y=v.animation;y&&(kg(d)&&(d.add(g),y.then(()=>d.remove(g))),h.push(y))}return o&&Promise.all(h).then(()=>{rt.update(()=>{o&&dV(e,o)})}),h}function ty(e,t,n={}){var i;const s=Wp(e,t,n.type==="exit"?(i=e.presenceContext)===null||i===void 0?void 0:i.custom:void 0);let{transition:r=e.getDefaultTransition()||{}}=s||{};n.transitionOverride&&(r=n.transitionOverride);const a=s?()=>Promise.all(kb(e,s,n)):()=>Promise.resolve(),o=e.variantChildren&&e.variantChildren.size?(d=0)=>{const{delayChildren:h=0,staggerChildren:m,staggerDirection:g}=r;return hV(e,t,h+d,m,g,n)}:()=>Promise.resolve(),{when:c}=r;if(c){const[d,h]=c==="beforeChildren"?[a,o]:[o,a];return d().then(()=>h())}else return Promise.all([a(),o(n.delay)])}function hV(e,t,n=0,i=0,s=1,r){const a=[],o=(e.variantChildren.size-1)*i,c=s===1?(d=0)=>d*i:(d=0)=>o-d*i;return Array.from(e.variantChildren).sort(mV).forEach((d,h)=>{d.notify("AnimationStart",t),a.push(ty(d,t,{...r,delay:n+c(h)}).then(()=>d.notify("AnimationComplete",t)))}),Promise.all(a)}function mV(e,t){return e.sortNodePosition(t)}function gV(e,t,n={}){e.notify("AnimationStart",t);let i;if(Array.isArray(t)){const s=t.map(r=>ty(e,r,n));i=Promise.all(s)}else if(typeof t=="string")i=ty(e,t,n);else{const s=typeof t=="function"?Wp(e,t,n.custom):t;i=Promise.all(kb(e,s,n))}return i.then(()=>{rt.postRender(()=>{e.notify("AnimationComplete",t)})})}const pV=[...ib].reverse(),vV=ib.length;function xV(e){return t=>Promise.all(t.map(({animation:n,options:i})=>gV(e,n,i)))}function yV(e){let t=xV(e),n=iS(),i=!0;const s=c=>(d,h)=>{var m;const g=Wp(e,h,c==="exit"?(m=e.presenceContext)===null||m===void 0?void 0:m.custom:void 0);if(g){const{transition:v,transitionEnd:b,...w}=g;d={...d,...w,...b}}return d};function r(c){t=c(e)}function a(c){const d=e.getProps(),h=e.getVariantContext(!0)||{},m=[],g=new Set;let v={},b=1/0;for(let M=0;M<vV;M++){const y=pV[M],S=n[y],T=d[y]!==void 0?d[y]:h[y],N=af(T),k=y===c?S.isActive:null;k===!1&&(b=M);let E=T===h[y]&&T!==d[y]&&N;if(E&&i&&e.manuallyAnimateOnMount&&(E=!1),S.protectedKeys={...v},!S.isActive&&k===null||!T&&!S.prevProp||Fp(T)||typeof T=="boolean")continue;let O=_V(S.prevProp,T)||y===c&&S.isActive&&!E&&N||M>b&&N,I=!1;const P=Array.isArray(T)?T:[T];let H=P.reduce(s(y),{});k===!1&&(H={});const{prevResolvedValues:V={}}=S,J={...V,...H},Q=U=>{O=!0,g.has(U)&&(I=!0,g.delete(U)),S.needsAnimating[U]=!0;const R=e.getValue(U);R&&(R.liveStyle=!1)};for(const U in J){const R=H[U],$=V[U];if(v.hasOwnProperty(U))continue;let B=!1;Wx(R)&&Wx($)?B=!fj(R,$):B=R!==$,B?R!=null?Q(U):g.add(U):R!==void 0&&g.has(U)?Q(U):S.protectedKeys[U]=!0}S.prevProp=T,S.prevResolvedValues=H,S.isActive&&(v={...v,...H}),i&&e.blockInitialAnimation&&(O=!1),O&&(!E||I)&&m.push(...P.map(U=>({animation:U,options:{type:y}})))}if(g.size){const M={};g.forEach(y=>{const S=e.getBaseTarget(y),T=e.getValue(y);T&&(T.liveStyle=!0),M[y]=S??null}),m.push({animation:M})}let w=!!m.length;return i&&(d.initial===!1||d.initial===d.animate)&&!e.manuallyAnimateOnMount&&(w=!1),i=!1,w?t(m):Promise.resolve()}function o(c,d){var h;if(n[c].isActive===d)return Promise.resolve();(h=e.variantChildren)===null||h===void 0||h.forEach(g=>{var v;return(v=g.animationState)===null||v===void 0?void 0:v.setActive(c,d)}),n[c].isActive=d;const m=a(c);for(const g in n)n[g].protectedKeys={};return m}return{animateChanges:a,setActive:o,setAnimateFunction:r,getState:()=>n,reset:()=>{n=iS(),i=!0}}}function _V(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!fj(t,e):!1}function to(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function iS(){return{animate:to(!0),whileInView:to(),whileHover:to(),whileTap:to(),whileDrag:to(),whileFocus:to(),exit:to()}}class bV extends Ua{constructor(t){super(t),t.animationState||(t.animationState=yV(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();Fp(t)&&(this.unmountControls=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:t}=this.node.getProps(),{animate:n}=this.node.prevProps||{};t!==n&&this.updateAnimationControlsSubscription()}unmount(){var t;this.node.animationState.reset(),(t=this.unmountControls)===null||t===void 0||t.call(this)}}let wV=0;class SV extends Ua{constructor(){super(...arguments),this.id=wV++}update(){if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:n}=this.node.presenceContext,{isPresent:i}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===i)return;const s=this.node.animationState.setActive("exit",!t);n&&!t&&s.then(()=>n(this.id))}mount(){const{register:t}=this.node.presenceContext||{};t&&(this.unmount=t(this.id))}unmount(){}}const CV={animation:{Feature:bV},exit:{Feature:SV}},sS=(e,t)=>Math.abs(e-t);function MV(e,t){const n=sS(e.x,t.x),i=sS(e.y,t.y);return Math.sqrt(n**2+i**2)}class Yj{constructor(t,n,{transformPagePoint:i,contextWindow:s,dragSnapToOrigin:r=!1}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const m=uv(this.lastMoveEventInfo,this.history),g=this.startEvent!==null,v=MV(m.offset,{x:0,y:0})>=3;if(!g&&!v)return;const{point:b}=m,{timestamp:w}=dn;this.history.push({...b,timestamp:w});const{onStart:M,onMove:y}=this.handlers;g||(M&&M(this.lastMoveEvent,m),this.startEvent=this.lastMoveEvent),y&&y(this.lastMoveEvent,m)},this.handlePointerMove=(m,g)=>{this.lastMoveEvent=m,this.lastMoveEventInfo=cv(g,this.transformPagePoint),rt.update(this.updatePoint,!0)},this.handlePointerUp=(m,g)=>{this.end();const{onEnd:v,onSessionEnd:b,resumeAnimation:w}=this.handlers;if(this.dragSnapToOrigin&&w&&w(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const M=uv(m.type==="pointercancel"?this.lastMoveEventInfo:cv(g,this.transformPagePoint),this.history);this.startEvent&&v&&v(m,M),b&&b(m,M)},!oj(t))return;this.dragSnapToOrigin=r,this.handlers=n,this.transformPagePoint=i,this.contextWindow=s||window;const a=$p(t),o=cv(a,this.transformPagePoint),{point:c}=o,{timestamp:d}=dn;this.history=[{...c,timestamp:d}];const{onSessionStart:h}=n;h&&h(t,uv(o,this.history)),this.removeListeners=Sr(wr(this.contextWindow,"pointermove",this.handlePointerMove),wr(this.contextWindow,"pointerup",this.handlePointerUp),wr(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),Rs(this.updatePoint)}}function cv(e,t){return t?{point:t(e.point)}:e}function rS(e,t){return{x:e.x-t.x,y:e.y-t.y}}function uv({point:e},t){return{point:e,delta:rS(e,qj(t)),offset:rS(e,TV(t)),velocity:jV(t,.1)}}function TV(e){return e[0]}function qj(e){return e[e.length-1]}function jV(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,i=null;const s=qj(e);for(;n>=0&&(i=e[n],!(s.timestamp-i.timestamp>Cr(t)));)n--;if(!i)return{x:0,y:0};const r=ks(s.timestamp-i.timestamp);if(r===0)return{x:0,y:0};const a={x:(s.x-i.x)/r,y:(s.y-i.y)/r};return a.x===1/0&&(a.x=0),a.y===1/0&&(a.y=0),a}function hi(e){return e.max-e.min}function ny(e,t=0,n=.01){return Math.abs(e-t)<=n}function aS(e,t,n,i=.5){e.origin=i,e.originPoint=jt(t.min,t.max,e.origin),e.scale=hi(n)/hi(t),(ny(e.scale,1,1e-4)||isNaN(e.scale))&&(e.scale=1),e.translate=jt(n.min,n.max,e.origin)-e.originPoint,(ny(e.translate)||isNaN(e.translate))&&(e.translate=0)}function Ld(e,t,n,i){aS(e.x,t.x,n.x,i?i.originX:void 0),aS(e.y,t.y,n.y,i?i.originY:void 0)}function oS(e,t,n){e.min=n.min+t.min,e.max=e.min+hi(t)}function NV(e,t,n){oS(e.x,t.x,n.x),oS(e.y,t.y,n.y)}function lS(e,t,n){e.min=t.min-n.min,e.max=e.min+hi(t)}function zd(e,t,n){lS(e.x,t.x,n.x),lS(e.y,t.y,n.y)}function kV(e,{min:t,max:n},i){return t!==void 0&&e<t?e=i?jt(t,e,i.min):Math.max(e,t):n!==void 0&&e>n&&(e=i?jt(n,e,i.max):Math.min(e,n)),e}function cS(e,t,n){return{min:t!==void 0?e.min+t:void 0,max:n!==void 0?e.max+n-(e.max-e.min):void 0}}function EV(e,{top:t,left:n,bottom:i,right:s}){return{x:cS(e.x,n,s),y:cS(e.y,t,i)}}function uS(e,t){let n=t.min-e.min,i=t.max-e.max;return t.max-t.min<e.max-e.min&&([n,i]=[i,n]),{min:n,max:i}}function AV(e,t){return{x:uS(e.x,t.x),y:uS(e.y,t.y)}}function OV(e,t){let n=.5;const i=hi(e),s=hi(t);return s>i?n=Hc(t.min,t.max-i,e.min):i>s&&(n=Hc(e.min,e.max-s,t.min)),Ra(0,1,n)}function DV(e,t){const n={};return t.min!==void 0&&(n.min=t.min-e.min),t.max!==void 0&&(n.max=t.max-e.min),n}const iy=.35;function PV(e=iy){return e===!1?e=0:e===!0&&(e=iy),{x:dS(e,"left","right"),y:dS(e,"top","bottom")}}function dS(e,t,n){return{min:fS(e,t),max:fS(e,n)}}function fS(e,t){return typeof e=="number"?e:e[t]||0}const hS=()=>({translate:0,scale:1,origin:0,originPoint:0}),nc=()=>({x:hS(),y:hS()}),mS=()=>({min:0,max:0}),Ut=()=>({x:mS(),y:mS()});function bi(e){return[e("x"),e("y")]}function Xj({top:e,left:t,right:n,bottom:i}){return{x:{min:t,max:n},y:{min:e,max:i}}}function RV({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function LV(e,t){if(!t)return e;const n=t({x:e.left,y:e.top}),i=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:i.y,right:i.x}}function dv(e){return e===void 0||e===1}function sy({scale:e,scaleX:t,scaleY:n}){return!dv(e)||!dv(t)||!dv(n)}function fo(e){return sy(e)||Kj(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function Kj(e){return gS(e.x)||gS(e.y)}function gS(e){return e&&e!=="0%"}function Eg(e,t,n){const i=e-n,s=t*i;return n+s}function pS(e,t,n,i,s){return s!==void 0&&(e=Eg(e,s,i)),Eg(e,n,i)+t}function ry(e,t=0,n=1,i,s){e.min=pS(e.min,t,n,i,s),e.max=pS(e.max,t,n,i,s)}function Qj(e,{x:t,y:n}){ry(e.x,t.translate,t.scale,t.originPoint),ry(e.y,n.translate,n.scale,n.originPoint)}function zV(e,t,n,i=!1){const s=n.length;if(!s)return;t.x=t.y=1;let r,a;for(let o=0;o<s;o++){r=n[o],a=r.projectionDelta;const c=r.instance;c&&c.style&&c.style.display==="contents"||(i&&r.options.layoutScroll&&r.scroll&&r!==r.root&&ic(e,{x:-r.scroll.offset.x,y:-r.scroll.offset.y}),a&&(t.x*=a.x.scale,t.y*=a.y.scale,Qj(e,a)),i&&fo(r.latestValues)&&ic(e,r.latestValues))}t.x=vS(t.x),t.y=vS(t.y)}function vS(e){return Number.isInteger(e)||e>1.0000000000001||e<.999999999999?e:1}function ta(e,t){e.min=e.min+t,e.max=e.max+t}function xS(e,t,[n,i,s]){const r=t[s]!==void 0?t[s]:.5,a=jt(e.min,e.max,r);ry(e,t[n],t[i],a,t.scale)}const IV=["x","scaleX","originX"],BV=["y","scaleY","originY"];function ic(e,t){xS(e.x,t,IV),xS(e.y,t,BV)}function Jj(e,t){return Xj(LV(e.getBoundingClientRect(),t))}function VV(e,t,n){const i=Jj(e,n),{scroll:s}=t;return s&&(ta(i.x,s.offset.x),ta(i.y,s.offset.y)),i}const eN=({current:e})=>e?e.ownerDocument.defaultView:null,HV=new WeakMap;class FV{constructor(t){this.openGlobalLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=Ut(),this.visualElement=t}start(t,{snapToCursor:n=!1}={}){const{presenceContext:i}=this.visualElement;if(i&&i.isPresent===!1)return;const s=h=>{const{dragSnapToOrigin:m}=this.getProps();m?this.pauseAnimation():this.stopAnimation(),n&&this.snapToCursor($p(h,"page").point)},r=(h,m)=>{const{drag:g,dragPropagation:v,onDragStart:b}=this.getProps();if(g&&!v&&(this.openGlobalLock&&this.openGlobalLock(),this.openGlobalLock=cj(g),!this.openGlobalLock))return;this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),bi(M=>{let y=this.getAxisMotionValue(M).get()||0;if(Ns.test(y)){const{projection:S}=this.visualElement;if(S&&S.layout){const T=S.layout.layoutBox[M];T&&(y=hi(T)*(parseFloat(y)/100))}}this.originPoint[M]=y}),b&&rt.postRender(()=>b(h,m));const{animationState:w}=this.visualElement;w&&w.setActive("whileDrag",!0)},a=(h,m)=>{const{dragPropagation:g,dragDirectionLock:v,onDirectionLock:b,onDrag:w}=this.getProps();if(!g&&!this.openGlobalLock)return;const{offset:M}=m;if(v&&this.currentDirection===null){this.currentDirection=UV(M),this.currentDirection!==null&&b&&b(this.currentDirection);return}this.updateAxis("x",m.point,M),this.updateAxis("y",m.point,M),this.visualElement.render(),w&&w(h,m)},o=(h,m)=>this.stop(h,m),c=()=>bi(h=>{var m;return this.getAnimationState(h)==="paused"&&((m=this.getAxisMotionValue(h).animation)===null||m===void 0?void 0:m.play())}),{dragSnapToOrigin:d}=this.getProps();this.panSession=new Yj(t,{onSessionStart:s,onStart:r,onMove:a,onSessionEnd:o,resumeAnimation:c},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:d,contextWindow:eN(this.visualElement)})}stop(t,n){const i=this.isDragging;if(this.cancel(),!i)return;const{velocity:s}=n;this.startAnimation(s);const{onDragEnd:r}=this.getProps();r&&rt.postRender(()=>r(t,n))}cancel(){this.isDragging=!1;const{projection:t,animationState:n}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:i}=this.getProps();!i&&this.openGlobalLock&&(this.openGlobalLock(),this.openGlobalLock=null),n&&n.setActive("whileDrag",!1)}updateAxis(t,n,i){const{drag:s}=this.getProps();if(!i||!Fh(t,s,this.currentDirection))return;const r=this.getAxisMotionValue(t);let a=this.originPoint[t]+i[t];this.constraints&&this.constraints[t]&&(a=kV(a,this.constraints[t],this.elastic[t])),r.set(a)}resolveConstraints(){var t;const{dragConstraints:n,dragElastic:i}=this.getProps(),s=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):(t=this.visualElement.projection)===null||t===void 0?void 0:t.layout,r=this.constraints;n&&ec(n)?this.constraints||(this.constraints=this.resolveRefConstraints()):n&&s?this.constraints=EV(s.layoutBox,n):this.constraints=!1,this.elastic=PV(i),r!==this.constraints&&s&&this.constraints&&!this.hasMutatedConstraints&&bi(a=>{this.constraints!==!1&&this.getAxisMotionValue(a)&&(this.constraints[a]=DV(s.layoutBox[a],this.constraints[a]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!ec(t))return!1;const i=t.current,{projection:s}=this.visualElement;if(!s||!s.layout)return!1;const r=VV(i,s.root,this.visualElement.getTransformPagePoint());let a=AV(s.layout.layoutBox,r);if(n){const o=n(RV(a));this.hasMutatedConstraints=!!o,o&&(a=Xj(o))}return a}startAnimation(t){const{drag:n,dragMomentum:i,dragElastic:s,dragTransition:r,dragSnapToOrigin:a,onDragTransitionEnd:o}=this.getProps(),c=this.constraints||{},d=bi(h=>{if(!Fh(h,n,this.currentDirection))return;let m=c&&c[h]||{};a&&(m={min:0,max:0});const g=s?200:1e6,v=s?40:1e7,b={type:"inertia",velocity:i?t[h]:0,bounceStiffness:g,bounceDamping:v,timeConstant:750,restDelta:1,restSpeed:10,...r,...m};return this.startAxisValueAnimation(h,b)});return Promise.all(d).then(o)}startAxisValueAnimation(t,n){const i=this.getAxisMotionValue(t);return i.start(Tb(t,i,0,n,this.visualElement))}stopAnimation(){bi(t=>this.getAxisMotionValue(t).stop())}pauseAnimation(){bi(t=>{var n;return(n=this.getAxisMotionValue(t).animation)===null||n===void 0?void 0:n.pause()})}getAnimationState(t){var n;return(n=this.getAxisMotionValue(t).animation)===null||n===void 0?void 0:n.state}getAxisMotionValue(t){const n=`_drag${t.toUpperCase()}`,i=this.visualElement.getProps(),s=i[n];return s||this.visualElement.getValue(t,(i.initial?i.initial[t]:void 0)||0)}snapToCursor(t){bi(n=>{const{drag:i}=this.getProps();if(!Fh(n,i,this.currentDirection))return;const{projection:s}=this.visualElement,r=this.getAxisMotionValue(n);if(s&&s.layout){const{min:a,max:o}=s.layout.layoutBox[n];r.set(t[n]-jt(a,o,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:n}=this.getProps(),{projection:i}=this.visualElement;if(!ec(n)||!i||!this.constraints)return;this.stopAnimation();const s={x:0,y:0};bi(a=>{const o=this.getAxisMotionValue(a);if(o&&this.constraints!==!1){const c=o.get();s[a]=OV({min:c,max:c},this.constraints[a])}});const{transformTemplate:r}=this.visualElement.getProps();this.visualElement.current.style.transform=r?r({},""):"none",i.root&&i.root.updateScroll(),i.updateLayout(),this.resolveConstraints(),bi(a=>{if(!Fh(a,t,null))return;const o=this.getAxisMotionValue(a),{min:c,max:d}=this.constraints[a];o.set(jt(c,d,s[a]))})}addListeners(){if(!this.visualElement.current)return;HV.set(this.visualElement,this);const t=this.visualElement.current,n=wr(t,"pointerdown",c=>{const{drag:d,dragListener:h=!0}=this.getProps();d&&h&&this.start(c)}),i=()=>{const{dragConstraints:c}=this.getProps();ec(c)&&c.current&&(this.constraints=this.resolveRefConstraints())},{projection:s}=this.visualElement,r=s.addEventListener("measure",i);s&&!s.layout&&(s.root&&s.root.updateScroll(),s.updateLayout()),rt.read(i);const a=pr(window,"resize",()=>this.scalePositionWithinConstraints()),o=s.addEventListener("didUpdate",({delta:c,hasLayoutChanged:d})=>{this.isDragging&&d&&(bi(h=>{const m=this.getAxisMotionValue(h);m&&(this.originPoint[h]+=c[h].translate,m.set(m.get()+c[h].translate))}),this.visualElement.render())});return()=>{a(),n(),r(),o&&o()}}getProps(){const t=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:i=!1,dragPropagation:s=!1,dragConstraints:r=!1,dragElastic:a=iy,dragMomentum:o=!0}=t;return{...t,drag:n,dragDirectionLock:i,dragPropagation:s,dragConstraints:r,dragElastic:a,dragMomentum:o}}}function Fh(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function UV(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class ZV extends Ua{constructor(t){super(t),this.removeGroupControls=On,this.removeListeners=On,this.controls=new FV(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||On}unmount(){this.removeGroupControls(),this.removeListeners()}}const yS=e=>(t,n)=>{e&&rt.postRender(()=>e(t,n))};class $V extends Ua{constructor(){super(...arguments),this.removePointerDownListener=On}onPointerDown(t){this.session=new Yj(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:eN(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:i,onPanEnd:s}=this.node.getProps();return{onSessionStart:yS(t),onStart:yS(n),onMove:i,onEnd:(r,a)=>{delete this.session,s&&rt.postRender(()=>s(r,a))}}}mount(){this.removePointerDownListener=wr(this.node.current,"pointerdown",t=>this.onPointerDown(t))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}function WV(){const e=x.useContext(Vp);if(e===null)return[!0,null];const{isPresent:t,onExitComplete:n,register:i}=e,s=x.useId();return x.useEffect(()=>i(s),[]),!t&&n?[!1,()=>n&&n(s)]:[!0]}const Pm={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function _S(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const Hu={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(Me.test(e))e=parseFloat(e);else return e;const n=_S(e,t.target.x),i=_S(e,t.target.y);return`${n}% ${i}%`}},GV={correct:(e,{treeScale:t,projectionDelta:n})=>{const i=e,s=La.parse(e);if(s.length>5)return i;const r=La.createTransformer(e),a=typeof s[0]!="number"?1:0,o=n.x.scale*t.x,c=n.y.scale*t.y;s[0+a]/=o,s[1+a]/=c;const d=jt(o,c,.5);return typeof s[2+a]=="number"&&(s[2+a]/=d),typeof s[3+a]=="number"&&(s[3+a]/=d),r(s)}};class YV extends x.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:i,layoutId:s}=this.props,{projection:r}=t;Qz(qV),r&&(n.group&&n.group.add(r),i&&i.register&&s&&i.register(r),r.root.didUpdate(),r.addEventListener("animationComplete",()=>{this.safeToRemove()}),r.setOptions({...r.options,onExitComplete:()=>this.safeToRemove()})),Pm.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:n,visualElement:i,drag:s,isPresent:r}=this.props,a=i.projection;return a&&(a.isPresent=r,s||t.layoutDependency!==n||n===void 0?a.willUpdate():this.safeToRemove(),t.isPresent!==r&&(r?a.promote():a.relegate()||rt.postRender(()=>{const o=a.getStack();(!o||!o.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),nb.postRender(()=>{!t.currentAnimation&&t.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:i}=this.props,{projection:s}=t;s&&(s.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(s),i&&i.deregister&&i.deregister(s))}safeToRemove(){const{safeToRemove:t}=this.props;t&&t()}render(){return null}}function tN(e){const[t,n]=WV(),i=x.useContext(rb);return u.jsx(YV,{...e,layoutGroup:i,switchLayoutGroup:x.useContext(W8),isPresent:t,safeToRemove:n})}const qV={borderRadius:{...Hu,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:Hu,borderTopRightRadius:Hu,borderBottomLeftRadius:Hu,borderBottomRightRadius:Hu,boxShadow:GV},nN=["TopLeft","TopRight","BottomLeft","BottomRight"],XV=nN.length,bS=e=>typeof e=="string"?parseFloat(e):e,wS=e=>typeof e=="number"||Me.test(e);function KV(e,t,n,i,s,r){s?(e.opacity=jt(0,n.opacity!==void 0?n.opacity:1,QV(i)),e.opacityExit=jt(t.opacity!==void 0?t.opacity:1,0,JV(i))):r&&(e.opacity=jt(t.opacity!==void 0?t.opacity:1,n.opacity!==void 0?n.opacity:1,i));for(let a=0;a<XV;a++){const o=`border${nN[a]}Radius`;let c=SS(t,o),d=SS(n,o);if(c===void 0&&d===void 0)continue;c||(c=0),d||(d=0),c===0||d===0||wS(c)===wS(d)?(e[o]=Math.max(jt(bS(c),bS(d),i),0),(Ns.test(d)||Ns.test(c))&&(e[o]+="%")):e[o]=d}(t.rotate||n.rotate)&&(e.rotate=jt(t.rotate||0,n.rotate||0,i))}function SS(e,t){return e[t]!==void 0?e[t]:e.borderRadius}const QV=iN(0,.5,Lj),JV=iN(.5,.95,On);function iN(e,t,n){return i=>i<e?0:i>t?1:n(Hc(e,t,i))}function CS(e,t){e.min=t.min,e.max=t.max}function vi(e,t){CS(e.x,t.x),CS(e.y,t.y)}function MS(e,t,n,i,s){return e-=t,e=Eg(e,1/n,i),s!==void 0&&(e=Eg(e,1/s,i)),e}function eH(e,t=0,n=1,i=.5,s,r=e,a=e){if(Ns.test(t)&&(t=parseFloat(t),t=jt(a.min,a.max,t/100)-a.min),typeof t!="number")return;let o=jt(r.min,r.max,i);e===r&&(o-=t),e.min=MS(e.min,t,n,o,s),e.max=MS(e.max,t,n,o,s)}function TS(e,t,[n,i,s],r,a){eH(e,t[n],t[i],t[s],t.scale,r,a)}const tH=["x","scaleX","originX"],nH=["y","scaleY","originY"];function jS(e,t,n,i){TS(e.x,t,tH,n?n.x:void 0,i?i.x:void 0),TS(e.y,t,nH,n?n.y:void 0,i?i.y:void 0)}function NS(e){return e.translate===0&&e.scale===1}function sN(e){return NS(e.x)&&NS(e.y)}function iH(e,t){return e.x.min===t.x.min&&e.x.max===t.x.max&&e.y.min===t.y.min&&e.y.max===t.y.max}function rN(e,t){return Math.round(e.x.min)===Math.round(t.x.min)&&Math.round(e.x.max)===Math.round(t.x.max)&&Math.round(e.y.min)===Math.round(t.y.min)&&Math.round(e.y.max)===Math.round(t.y.max)}function kS(e){return hi(e.x)/hi(e.y)}class sH{constructor(){this.members=[]}add(t){jb(this.members,t),t.scheduleRender()}remove(t){if(Yp(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){const n=this.members[this.members.length-1];n&&this.promote(n)}}relegate(t){const n=this.members.findIndex(s=>t===s);if(n===0)return!1;let i;for(let s=n;s>=0;s--){const r=this.members[s];if(r.isPresent!==!1){i=r;break}}return i?(this.promote(i),!0):!1}promote(t,n){const i=this.lead;if(t!==i&&(this.prevLead=i,this.lead=t,t.show(),i)){i.instance&&i.scheduleRender(),t.scheduleRender(),t.resumeFrom=i,n&&(t.resumeFrom.preserveOpacity=!0),i.snapshot&&(t.snapshot=i.snapshot,t.snapshot.latestValues=i.animationValues||i.latestValues),t.root&&t.root.isUpdating&&(t.isLayoutDirty=!0);const{crossfade:s}=t.options;s===!1&&i.hide()}}exitAnimationComplete(){this.members.forEach(t=>{const{options:n,resumingFrom:i}=t;n.onExitComplete&&n.onExitComplete(),i&&i.options.onExitComplete&&i.options.onExitComplete()})}scheduleRender(){this.members.forEach(t=>{t.instance&&t.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function ES(e,t,n){let i="";const s=e.x.translate/t.x,r=e.y.translate/t.y,a=(n==null?void 0:n.z)||0;if((s||r||a)&&(i=`translate3d(${s}px, ${r}px, ${a}px) `),(t.x!==1||t.y!==1)&&(i+=`scale(${1/t.x}, ${1/t.y}) `),n){const{transformPerspective:d,rotate:h,rotateX:m,rotateY:g,skewX:v,skewY:b}=n;d&&(i=`perspective(${d}px) ${i}`),h&&(i+=`rotate(${h}deg) `),m&&(i+=`rotateX(${m}deg) `),g&&(i+=`rotateY(${g}deg) `),v&&(i+=`skewX(${v}deg) `),b&&(i+=`skewY(${b}deg) `)}const o=e.x.scale*t.x,c=e.y.scale*t.y;return(o!==1||c!==1)&&(i+=`scale(${o}, ${c})`),i||"none"}const rH=(e,t)=>e.depth-t.depth;class aH{constructor(){this.children=[],this.isDirty=!1}add(t){jb(this.children,t),this.isDirty=!0}remove(t){Yp(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(rH),this.isDirty=!1,this.children.forEach(t)}}function oH(e,t){const n=Ta.now(),i=({timestamp:s})=>{const r=s-n;r>=t&&(Rs(i),e(r-t))};return rt.read(i,!0),()=>Rs(i)}function lH(e){window.MotionDebug&&window.MotionDebug.record(e)}function aN(e){return e instanceof SVGElement&&e.tagName!=="svg"}function Eb(e,t,n){const i=on(e)?e:Fc(e);return i.start(Tb("",i,t,n)),i.animation}const fv=["","X","Y","Z"],cH={visibility:"hidden"},AS=1e3;let uH=0;const ho={type:"projectionFrame",totalNodes:0,resolvedTargetDeltas:0,recalculatedProjection:0};function hv(e,t,n,i){const{latestValues:s}=t;s[e]&&(n[e]=s[e],t.setStaticValue(e,0),i&&(i[e]=0))}function oN(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return!1;const{visualElement:t}=e.options;return t?Gj(t)?!0:e.parent&&!e.parent.hasCheckedOptimisedAppear?oN(e.parent):!1:!1}function lN({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:i,resetTransform:s}){return class{constructor(a={},o=t==null?void 0:t()){this.id=uH++,this.animationId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,ho.totalNodes=ho.resolvedTargetDeltas=ho.recalculatedProjection=0,this.nodes.forEach(hH),this.nodes.forEach(xH),this.nodes.forEach(yH),this.nodes.forEach(mH),lH(ho)},this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=a,this.root=o?o.root||o:this,this.path=o?[...o.path,o]:[],this.parent=o,this.depth=o?o.depth+1:0;for(let c=0;c<this.path.length;c++)this.path[c].shouldResetTransform=!0;this.root===this&&(this.nodes=new aH)}addEventListener(a,o){return this.eventHandlers.has(a)||this.eventHandlers.set(a,new Nb),this.eventHandlers.get(a).add(o)}notifyListeners(a,...o){const c=this.eventHandlers.get(a);c&&c.notify(...o)}hasListeners(a){return this.eventHandlers.has(a)}mount(a,o=this.root.hasTreeAnimated){if(this.instance)return;this.isSVG=aN(a),this.instance=a;const{layoutId:c,layout:d,visualElement:h}=this.options;if(h&&!h.current&&h.mount(a),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),o&&(d||c)&&(this.isLayoutDirty=!0),e){let m;const g=()=>this.root.updateBlockedByResize=!1;e(a,()=>{this.root.updateBlockedByResize=!0,m&&m(),m=oH(g,250),Pm.hasAnimatedSinceResize&&(Pm.hasAnimatedSinceResize=!1,this.nodes.forEach(DS))})}c&&this.root.registerSharedNode(c,this),this.options.animate!==!1&&h&&(c||d)&&this.addEventListener("didUpdate",({delta:m,hasLayoutChanged:g,hasRelativeTargetChanged:v,layout:b})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const w=this.options.transition||h.getDefaultTransition()||CH,{onLayoutAnimationStart:M,onLayoutAnimationComplete:y}=h.getProps(),S=!this.targetLayout||!rN(this.targetLayout,b)||v,T=!g&&v;if(this.options.layoutRoot||this.resumeFrom&&this.resumeFrom.instance||T||g&&(S||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(m,T);const N={...gb(w,"layout"),onPlay:M,onComplete:y};(h.shouldReduceMotion||this.options.layoutRoot)&&(N.delay=0,N.type=!1),this.startAnimation(N)}else g||DS(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=b})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const a=this.getStack();a&&a.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,Rs(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(_H),this.animationId++)}getTransformTemplate(){const{visualElement:a}=this.options;return a&&a.getProps().transformTemplate}willUpdate(a=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.HandoffCancelAllAnimations&&oN(this)&&window.HandoffCancelAllAnimations(),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let h=0;h<this.path.length;h++){const m=this.path[h];m.shouldResetTransform=!0,m.updateScroll("snapshot"),m.options.layoutRoot&&m.willUpdate(!1)}const{layoutId:o,layout:c}=this.options;if(o===void 0&&!c)return;const d=this.getTransformTemplate();this.prevTransformTemplateValue=d?d(this.latestValues,""):void 0,this.updateSnapshot(),a&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(OS);return}this.isUpdating||this.nodes.forEach(pH),this.isUpdating=!1,this.nodes.forEach(vH),this.nodes.forEach(dH),this.nodes.forEach(fH),this.clearAllSnapshots();const o=Ta.now();dn.delta=Ra(0,1e3/60,o-dn.timestamp),dn.timestamp=o,dn.isProcessing=!0,nv.update.process(dn),nv.preRender.process(dn),nv.render.process(dn),dn.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,nb.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(gH),this.sharedNodes.forEach(bH)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,rt.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){rt.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure())}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let c=0;c<this.path.length;c++)this.path[c].updateScroll();const a=this.layout;this.layout=this.measure(!1),this.layoutCorrected=Ut(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:o}=this.options;o&&o.notify("LayoutMeasure",this.layout.layoutBox,a?a.layoutBox:void 0)}updateScroll(a="measure"){let o=!!(this.options.layoutScroll&&this.instance);this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===a&&(o=!1),o&&(this.scroll={animationId:this.root.animationId,phase:a,isRoot:i(this.instance),offset:n(this.instance)})}resetTransform(){if(!s)return;const a=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,o=this.projectionDelta&&!sN(this.projectionDelta),c=this.getTransformTemplate(),d=c?c(this.latestValues,""):void 0,h=d!==this.prevTransformTemplateValue;a&&(o||fo(this.latestValues)||h)&&(s(this.instance,d),this.shouldResetTransform=!1,this.scheduleRender())}measure(a=!0){const o=this.measurePageBox();let c=this.removeElementScroll(o);return a&&(c=this.removeTransform(c)),MH(c),{animationId:this.root.animationId,measuredBox:o,layoutBox:c,latestValues:{},source:this.id}}measurePageBox(){const{visualElement:a}=this.options;if(!a)return Ut();const o=a.measureViewportBox(),{scroll:c}=this.root;return c&&(ta(o.x,c.offset.x),ta(o.y,c.offset.y)),o}removeElementScroll(a){const o=Ut();vi(o,a);for(let c=0;c<this.path.length;c++){const d=this.path[c],{scroll:h,options:m}=d;if(d!==this.root&&h&&m.layoutScroll){if(h.isRoot){vi(o,a);const{scroll:g}=this.root;g&&(ta(o.x,-g.offset.x),ta(o.y,-g.offset.y))}ta(o.x,h.offset.x),ta(o.y,h.offset.y)}}return o}applyTransform(a,o=!1){const c=Ut();vi(c,a);for(let d=0;d<this.path.length;d++){const h=this.path[d];!o&&h.options.layoutScroll&&h.scroll&&h!==h.root&&ic(c,{x:-h.scroll.offset.x,y:-h.scroll.offset.y}),fo(h.latestValues)&&ic(c,h.latestValues)}return fo(this.latestValues)&&ic(c,this.latestValues),c}removeTransform(a){const o=Ut();vi(o,a);for(let c=0;c<this.path.length;c++){const d=this.path[c];if(!d.instance||!fo(d.latestValues))continue;sy(d.latestValues)&&d.updateSnapshot();const h=Ut(),m=d.measurePageBox();vi(h,m),jS(o,d.latestValues,d.snapshot?d.snapshot.layoutBox:void 0,h)}return fo(this.latestValues)&&jS(o,this.latestValues),o}setTargetDelta(a){this.targetDelta=a,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(a){this.options={...this.options,...a,crossfade:a.crossfade!==void 0?a.crossfade:!0}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==dn.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(a=!1){var o;const c=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=c.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=c.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=c.isSharedProjectionDirty);const d=!!this.resumingFrom||this!==c;if(!(a||d&&this.isSharedProjectionDirty||this.isProjectionDirty||!((o=this.parent)===null||o===void 0)&&o.isProjectionDirty||this.attemptToResolveRelativeTarget))return;const{layout:m,layoutId:g}=this.options;if(!(!this.layout||!(m||g))){if(this.resolvedRelativeTargetAt=dn.timestamp,!this.targetDelta&&!this.relativeTarget){const v=this.getClosestProjectingParent();v&&v.layout&&this.animationProgress!==1?(this.relativeParent=v,this.forceRelativeParentToResolveTarget(),this.relativeTarget=Ut(),this.relativeTargetOrigin=Ut(),zd(this.relativeTargetOrigin,this.layout.layoutBox,v.layout.layoutBox),vi(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(!(!this.relativeTarget&&!this.targetDelta)){if(this.target||(this.target=Ut(),this.targetWithTransforms=Ut()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),NV(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):vi(this.target,this.layout.layoutBox),Qj(this.target,this.targetDelta)):vi(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget){this.attemptToResolveRelativeTarget=!1;const v=this.getClosestProjectingParent();v&&!!v.resumingFrom==!!this.resumingFrom&&!v.options.layoutScroll&&v.target&&this.animationProgress!==1?(this.relativeParent=v,this.forceRelativeParentToResolveTarget(),this.relativeTarget=Ut(),this.relativeTargetOrigin=Ut(),zd(this.relativeTargetOrigin,this.target,v.target),vi(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}ho.resolvedTargetDeltas++}}}getClosestProjectingParent(){if(!(!this.parent||sy(this.parent.latestValues)||Kj(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}calcProjection(){var a;const o=this.getLead(),c=!!this.resumingFrom||this!==o;let d=!0;if((this.isProjectionDirty||!((a=this.parent)===null||a===void 0)&&a.isProjectionDirty)&&(d=!1),c&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(d=!1),this.resolvedRelativeTargetAt===dn.timestamp&&(d=!1),d)return;const{layout:h,layoutId:m}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(h||m))return;vi(this.layoutCorrected,this.layout.layoutBox);const g=this.treeScale.x,v=this.treeScale.y;zV(this.layoutCorrected,this.treeScale,this.path,c),o.layout&&!o.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(o.target=o.layout.layoutBox,o.targetWithTransforms=Ut());const{target:b}=o;if(!b){this.projectionTransform&&(this.projectionDelta=nc(),this.projectionTransform="none",this.scheduleRender());return}this.projectionDelta||(this.projectionDelta=nc(),this.projectionDeltaWithTransform=nc());const w=this.projectionTransform;Ld(this.projectionDelta,this.layoutCorrected,b,this.latestValues),this.projectionTransform=ES(this.projectionDelta,this.treeScale),(this.projectionTransform!==w||this.treeScale.x!==g||this.treeScale.y!==v)&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",b)),ho.recalculatedProjection++}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(a=!0){if(this.options.scheduleRender&&this.options.scheduleRender(),a){const o=this.getStack();o&&o.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}setAnimationOrigin(a,o=!1){const c=this.snapshot,d=c?c.latestValues:{},h={...this.latestValues},m=nc();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!o;const g=Ut(),v=c?c.source:void 0,b=this.layout?this.layout.source:void 0,w=v!==b,M=this.getStack(),y=!M||M.members.length<=1,S=!!(w&&!y&&this.options.crossfade===!0&&!this.path.some(SH));this.animationProgress=0;let T;this.mixTargetDelta=N=>{const k=N/1e3;PS(m.x,a.x,k),PS(m.y,a.y,k),this.setTargetDelta(m),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(zd(g,this.layout.layoutBox,this.relativeParent.layout.layoutBox),wH(this.relativeTarget,this.relativeTargetOrigin,g,k),T&&iH(this.relativeTarget,T)&&(this.isProjectionDirty=!1),T||(T=Ut()),vi(T,this.relativeTarget)),w&&(this.animationValues=h,KV(h,d,this.latestValues,k,S,y)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=k},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(a){this.notifyListeners("animationStart"),this.currentAnimation&&this.currentAnimation.stop(),this.resumingFrom&&this.resumingFrom.currentAnimation&&this.resumingFrom.currentAnimation.stop(),this.pendingAnimation&&(Rs(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=rt.update(()=>{Pm.hasAnimatedSinceResize=!0,this.currentAnimation=Eb(0,AS,{...a,onUpdate:o=>{this.mixTargetDelta(o),a.onUpdate&&a.onUpdate(o)},onComplete:()=>{a.onComplete&&a.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const a=this.getStack();a&&a.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(AS),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const a=this.getLead();let{targetWithTransforms:o,target:c,layout:d,latestValues:h}=a;if(!(!o||!c||!d)){if(this!==a&&this.layout&&d&&cN(this.options.animationType,this.layout.layoutBox,d.layoutBox)){c=this.target||Ut();const m=hi(this.layout.layoutBox.x);c.x.min=a.target.x.min,c.x.max=c.x.min+m;const g=hi(this.layout.layoutBox.y);c.y.min=a.target.y.min,c.y.max=c.y.min+g}vi(o,c),ic(o,h),Ld(this.projectionDeltaWithTransform,this.layoutCorrected,o,h)}}registerSharedNode(a,o){this.sharedNodes.has(a)||this.sharedNodes.set(a,new sH),this.sharedNodes.get(a).add(o);const d=o.options.initialPromotionConfig;o.promote({transition:d?d.transition:void 0,preserveFollowOpacity:d&&d.shouldPreserveFollowOpacity?d.shouldPreserveFollowOpacity(o):void 0})}isLead(){const a=this.getStack();return a?a.lead===this:!0}getLead(){var a;const{layoutId:o}=this.options;return o?((a=this.getStack())===null||a===void 0?void 0:a.lead)||this:this}getPrevLead(){var a;const{layoutId:o}=this.options;return o?(a=this.getStack())===null||a===void 0?void 0:a.prevLead:void 0}getStack(){const{layoutId:a}=this.options;if(a)return this.root.sharedNodes.get(a)}promote({needsReset:a,transition:o,preserveFollowOpacity:c}={}){const d=this.getStack();d&&d.promote(this,c),a&&(this.projectionDelta=void 0,this.needsReset=!0),o&&this.setOptions({transition:o})}relegate(){const a=this.getStack();return a?a.relegate(this):!1}resetSkewAndRotation(){const{visualElement:a}=this.options;if(!a)return;let o=!1;const{latestValues:c}=a;if((c.z||c.rotate||c.rotateX||c.rotateY||c.rotateZ||c.skewX||c.skewY)&&(o=!0),!o)return;const d={};c.z&&hv("z",a,d,this.animationValues);for(let h=0;h<fv.length;h++)hv(`rotate${fv[h]}`,a,d,this.animationValues),hv(`skew${fv[h]}`,a,d,this.animationValues);a.render();for(const h in d)a.setStaticValue(h,d[h]),this.animationValues&&(this.animationValues[h]=d[h]);a.scheduleRender()}getProjectionStyles(a){var o,c;if(!this.instance||this.isSVG)return;if(!this.isVisible)return cH;const d={visibility:""},h=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,d.opacity="",d.pointerEvents=Om(a==null?void 0:a.pointerEvents)||"",d.transform=h?h(this.latestValues,""):"none",d;const m=this.getLead();if(!this.projectionDelta||!this.layout||!m.target){const w={};return this.options.layoutId&&(w.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,w.pointerEvents=Om(a==null?void 0:a.pointerEvents)||""),this.hasProjected&&!fo(this.latestValues)&&(w.transform=h?h({},""):"none",this.hasProjected=!1),w}const g=m.animationValues||m.latestValues;this.applyTransformsToTarget(),d.transform=ES(this.projectionDeltaWithTransform,this.treeScale,g),h&&(d.transform=h(g,d.transform));const{x:v,y:b}=this.projectionDelta;d.transformOrigin=`${v.origin*100}% ${b.origin*100}% 0`,m.animationValues?d.opacity=m===this?(c=(o=g.opacity)!==null&&o!==void 0?o:this.latestValues.opacity)!==null&&c!==void 0?c:1:this.preserveOpacity?this.latestValues.opacity:g.opacityExit:d.opacity=m===this?g.opacity!==void 0?g.opacity:"":g.opacityExit!==void 0?g.opacityExit:0;for(const w in Cg){if(g[w]===void 0)continue;const{correct:M,applyTo:y}=Cg[w],S=d.transform==="none"?g[w]:M(g[w],m);if(y){const T=y.length;for(let N=0;N<T;N++)d[y[N]]=S}else d[w]=S}return this.options.layoutId&&(d.pointerEvents=m===this?Om(a==null?void 0:a.pointerEvents)||"":"none"),d}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(a=>{var o;return(o=a.currentAnimation)===null||o===void 0?void 0:o.stop()}),this.root.nodes.forEach(OS),this.root.sharedNodes.clear()}}}function dH(e){e.updateLayout()}function fH(e){var t;const n=((t=e.resumeFrom)===null||t===void 0?void 0:t.snapshot)||e.snapshot;if(e.isLead()&&e.layout&&n&&e.hasListeners("didUpdate")){const{layoutBox:i,measuredBox:s}=e.layout,{animationType:r}=e.options,a=n.source!==e.layout.source;r==="size"?bi(m=>{const g=a?n.measuredBox[m]:n.layoutBox[m],v=hi(g);g.min=i[m].min,g.max=g.min+v}):cN(r,n.layoutBox,i)&&bi(m=>{const g=a?n.measuredBox[m]:n.layoutBox[m],v=hi(i[m]);g.max=g.min+v,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[m].max=e.relativeTarget[m].min+v)});const o=nc();Ld(o,i,n.layoutBox);const c=nc();a?Ld(c,e.applyTransform(s,!0),n.measuredBox):Ld(c,i,n.layoutBox);const d=!sN(o);let h=!1;if(!e.resumeFrom){const m=e.getClosestProjectingParent();if(m&&!m.resumeFrom){const{snapshot:g,layout:v}=m;if(g&&v){const b=Ut();zd(b,n.layoutBox,g.layoutBox);const w=Ut();zd(w,i,v.layoutBox),rN(b,w)||(h=!0),m.options.layoutRoot&&(e.relativeTarget=w,e.relativeTargetOrigin=b,e.relativeParent=m)}}}e.notifyListeners("didUpdate",{layout:i,snapshot:n,delta:c,layoutDelta:o,hasLayoutChanged:d,hasRelativeTargetChanged:h})}else if(e.isLead()){const{onExitComplete:i}=e.options;i&&i()}e.options.transition=void 0}function hH(e){ho.totalNodes++,e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||(e.isSharedProjectionDirty=!!(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty)),e.isTransformDirty||(e.isTransformDirty=e.parent.isTransformDirty))}function mH(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function gH(e){e.clearSnapshot()}function OS(e){e.clearMeasurements()}function pH(e){e.isLayoutDirty=!1}function vH(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function DS(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function xH(e){e.resolveTargetDelta()}function yH(e){e.calcProjection()}function _H(e){e.resetSkewAndRotation()}function bH(e){e.removeLeadSnapshot()}function PS(e,t,n){e.translate=jt(t.translate,0,n),e.scale=jt(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function RS(e,t,n,i){e.min=jt(t.min,n.min,i),e.max=jt(t.max,n.max,i)}function wH(e,t,n,i){RS(e.x,t.x,n.x,i),RS(e.y,t.y,n.y,i)}function SH(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const CH={duration:.45,ease:[.4,0,.1,1]},LS=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),zS=LS("applewebkit/")&&!LS("chrome/")?Math.round:On;function IS(e){e.min=zS(e.min),e.max=zS(e.max)}function MH(e){IS(e.x),IS(e.y)}function cN(e,t,n){return e==="position"||e==="preserve-aspect"&&!ny(kS(t),kS(n),.2)}const TH=lN({attachResizeListener:(e,t)=>pr(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),mv={current:void 0},uN=lN({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!mv.current){const e=new TH({});e.mount(window),e.setOptions({layoutScroll:!0}),mv.current=e}return mv.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),jH={pan:{Feature:$V},drag:{Feature:ZV,ProjectionNode:uN,MeasureLayout:tN}},ay={current:null},dN={current:!1};function NH(){if(dN.current=!0,!!eb)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>ay.current=e.matches;e.addListener(t),t()}else ay.current=!1}function kH(e,t,n){const{willChange:i}=t;for(const s in t){const r=t[s],a=n[s];if(on(r))e.addValue(s,r),kg(i)&&i.add(s);else if(on(a))e.addValue(s,Fc(r,{owner:e})),kg(i)&&i.remove(s);else if(a!==r)if(e.hasValue(s)){const o=e.getValue(s);o.liveStyle===!0?o.jump(r):o.hasAnimated||o.set(r)}else{const o=e.getStaticValue(s);e.addValue(s,Fc(o!==void 0?o:r,{owner:e}))}}for(const s in n)t[s]===void 0&&e.removeValue(s);return t}const lf=new WeakMap,EH=[...vj,wn,La],AH=e=>EH.find(pj(e)),BS=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"],OH=sb.length;class DH{scrapeMotionValuesFromProps(t,n,i){return{}}constructor({parent:t,props:n,presenceContext:i,reducedMotionConfig:s,blockInitialAnimation:r,visualState:a},o={}){this.resolveKeyframes=(g,v,b,w)=>new this.KeyframeResolver(g,v,b,w,this),this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=pb,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.scheduleRender=()=>rt.render(this.render,!1,!0);const{latestValues:c,renderState:d}=a;this.latestValues=c,this.baseTarget={...c},this.initialValues=n.initial?{...c}:{},this.renderState=d,this.parent=t,this.props=n,this.presenceContext=i,this.depth=t?t.depth+1:0,this.reducedMotionConfig=s,this.options=o,this.blockInitialAnimation=!!r,this.isControllingVariants=Up(n),this.isVariantNode=Y8(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);const{willChange:h,...m}=this.scrapeMotionValuesFromProps(n,{},this);for(const g in m){const v=m[g];c[g]!==void 0&&on(v)&&(v.set(c[g],!1),kg(h)&&h.add(g))}}mount(t){this.current=t,lf.set(t,this),this.projection&&!this.projection.instance&&this.projection.mount(t),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((n,i)=>this.bindToMotionValue(i,n)),dN.current||NH(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:ay.current,this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){lf.delete(this.current),this.projection&&this.projection.unmount(),Rs(this.notifyUpdate),Rs(this.render),this.valueSubscriptions.forEach(t=>t()),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent&&this.parent.children.delete(this);for(const t in this.events)this.events[t].clear();for(const t in this.features){const n=this.features[t];n&&(n.unmount(),n.isMounted=!1)}this.current=null}bindToMotionValue(t,n){const i=rl.has(t),s=n.on("change",a=>{this.latestValues[t]=a,this.props.onUpdate&&rt.preRender(this.notifyUpdate),i&&this.projection&&(this.projection.isTransformDirty=!0)}),r=n.on("renderRequest",this.scheduleRender);this.valueSubscriptions.set(t,()=>{s(),r(),n.owner&&n.stop()})}sortNodePosition(t){return!this.current||!this.sortInstanceNodePosition||this.type!==t.type?0:this.sortInstanceNodePosition(this.current,t.current)}updateFeatures(){let t="animation";for(t in Bc){const n=Bc[t];if(!n)continue;const{isEnabled:i,Feature:s}=n;if(!this.features[t]&&s&&i(this.props)&&(this.features[t]=new s(this)),this.features[t]){const r=this.features[t];r.isMounted?r.update():(r.mount(),r.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.options,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):Ut()}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,n){this.latestValues[t]=n}update(t,n){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=n;for(let i=0;i<BS.length;i++){const s=BS[i];this.propEventSubscriptions[s]&&(this.propEventSubscriptions[s](),delete this.propEventSubscriptions[s]);const r="on"+s,a=t[r];a&&(this.propEventSubscriptions[s]=this.on(s,a))}this.prevMotionValues=kH(this,this.scrapeMotionValuesFromProps(t,this.prevProps,this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(t){return this.props.variants?this.props.variants[t]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}getVariantContext(t=!1){if(t)return this.parent?this.parent.getVariantContext():void 0;if(!this.isControllingVariants){const i=this.parent?this.parent.getVariantContext()||{}:{};return this.props.initial!==void 0&&(i.initial=this.props.initial),i}const n={};for(let i=0;i<OH;i++){const s=sb[i],r=this.props[s];(af(r)||r===!1)&&(n[s]=r)}return n}addVariantChild(t){const n=this.getClosestVariantNode();if(n)return n.variantChildren&&n.variantChildren.add(t),()=>n.variantChildren.delete(t)}addValue(t,n){const i=this.values.get(t);n!==i&&(i&&this.removeValue(t),this.bindToMotionValue(t,n),this.values.set(t,n),this.latestValues[t]=n.get())}removeValue(t){this.values.delete(t);const n=this.valueSubscriptions.get(t);n&&(n(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,n){if(this.props.values&&this.props.values[t])return this.props.values[t];let i=this.values.get(t);return i===void 0&&n!==void 0&&(i=Fc(n===null?void 0:n,{owner:this}),this.addValue(t,i)),i}readValue(t,n){var i;let s=this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:(i=this.getBaseTargetFromProps(this.props,t))!==null&&i!==void 0?i:this.readValueFromInstance(this.current,t,this.options);return s!=null&&(typeof s=="string"&&(mj(s)||hj(s))?s=parseFloat(s):!AH(s)&&La.test(n)&&(s=Mj(t,n)),this.setBaseTarget(t,on(s)?s.get():s)),on(s)?s.get():s}setBaseTarget(t,n){this.baseTarget[t]=n}getBaseTarget(t){var n;const{initial:i}=this.props;let s;if(typeof i=="string"||typeof i=="object"){const a=mb(this.props,i,(n=this.presenceContext)===null||n===void 0?void 0:n.custom);a&&(s=a[t])}if(i&&s!==void 0)return s;const r=this.getBaseTargetFromProps(this.props,t);return r!==void 0&&!on(r)?r:this.initialValues[t]!==void 0&&s===void 0?void 0:this.baseTarget[t]}on(t,n){return this.events[t]||(this.events[t]=new Nb),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}}class fN extends DH{constructor(){super(...arguments),this.KeyframeResolver=Tj}sortInstanceNodePosition(t,n){return t.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(t,n){return t.style?t.style[n]:void 0}removeValueFromRenderState(t,{vars:n,style:i}){delete n[t],delete i[t]}}function PH(e){return window.getComputedStyle(e)}class hN extends fN{constructor(){super(...arguments),this.type="html"}readValueFromInstance(t,n){if(rl.has(n)){const i=xb(n);return i&&i.default||0}else{const i=PH(t),s=(K8(n)?i.getPropertyValue(n):i[n])||0;return typeof s=="string"?s.trim():s}}measureInstanceViewportBox(t,{transformPagePoint:n}){return Jj(t,n)}build(t,n,i,s){cb(t,n,i,s.transformTemplate)}scrapeMotionValuesFromProps(t,n,i){return hb(t,n,i)}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;on(t)&&(this.childSubscription=t.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}renderInstance(t,n,i,s){nj(t,n,i,s)}}class mN extends fN{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(rl.has(n)){const i=xb(n);return i&&i.default||0}return n=ij.has(n)?n:tb(n),t.getAttribute(n)}measureInstanceViewportBox(){return Ut()}scrapeMotionValuesFromProps(t,n,i){return rj(t,n,i)}build(t,n,i,s){db(t,n,i,this.isSVGTag,s.transformTemplate)}renderInstance(t,n,i,s){sj(t,n,i,s)}mount(t){this.isSVGTag=fb(t.tagName),super.mount(t)}}const RH=(e,t)=>ab(e)?new mN(t,{enableHardwareAcceleration:!1}):new hN(t,{allowProjection:e!==x.Fragment,enableHardwareAcceleration:!0}),LH={layout:{ProjectionNode:uN,MeasureLayout:tN}},zH={...CV,...VI,...jH,...LH},de=Xz((e,t)=>jI(e,t,zH,RH));function gN(){const e=x.useRef(!1);return Hp(()=>(e.current=!0,()=>{e.current=!1}),[]),e}function IH(){const e=gN(),[t,n]=x.useState(0),i=x.useCallback(()=>{e.current&&n(t+1)},[t]);return[x.useCallback(()=>rt.postRender(i),[i]),t]}class BH extends x.Component{getSnapshotBeforeUpdate(t){const n=this.props.childRef.current;if(n&&t.isPresent&&!this.props.isPresent){const i=this.props.sizeRef.current;i.height=n.offsetHeight||0,i.width=n.offsetWidth||0,i.top=n.offsetTop,i.left=n.offsetLeft}return null}componentDidUpdate(){}render(){return this.props.children}}function VH({children:e,isPresent:t}){const n=x.useId(),i=x.useRef(null),s=x.useRef({width:0,height:0,top:0,left:0}),{nonce:r}=x.useContext(Ip);return x.useInsertionEffect(()=>{const{width:a,height:o,top:c,left:d}=s.current;if(t||!i.current||!a||!o)return;i.current.dataset.motionPopId=n;const h=document.createElement("style");return r&&(h.nonce=r),document.head.appendChild(h),h.sheet&&h.sheet.insertRule(`
          [data-motion-pop-id="${n}"] {
            position: absolute !important;
            width: ${a}px !important;
            height: ${o}px !important;
            top: ${c}px !important;
            left: ${d}px !important;
          }
        `),()=>{document.head.removeChild(h)}},[t]),u.jsx(BH,{isPresent:t,childRef:i,sizeRef:s,children:x.cloneElement(e,{ref:i})})}const gv=({children:e,initial:t,isPresent:n,onExitComplete:i,custom:s,presenceAffectsLayout:r,mode:a})=>{const o=Zp(HH),c=x.useId(),d=x.useMemo(()=>({id:c,initial:t,isPresent:n,custom:s,onExitComplete:h=>{o.set(h,!0);for(const m of o.values())if(!m)return;i&&i()},register:h=>(o.set(h,!1),()=>o.delete(h))}),r?[Math.random()]:[n]);return x.useMemo(()=>{o.forEach((h,m)=>o.set(m,!1))},[n]),x.useEffect(()=>{!n&&!o.size&&i&&i()},[n]),a==="popLayout"&&(e=u.jsx(VH,{isPresent:n,children:e})),u.jsx(Vp.Provider,{value:d,children:e})};function HH(){return new Map}function FH(e){return x.useEffect(()=>()=>e(),[])}const mo=e=>e.key||"";function UH(e,t){e.forEach(n=>{const i=mo(n);t.set(i,n)})}function ZH(e){const t=[];return x.Children.forEach(e,n=>{x.isValidElement(n)&&t.push(n)}),t}const oa=({children:e,custom:t,initial:n=!0,onExitComplete:i,exitBeforeEnter:s,presenceAffectsLayout:r=!0,mode:a="sync"})=>{const o=x.useContext(rb).forceRender||IH()[0],c=gN(),d=ZH(e);let h=d;const m=x.useRef(new Map).current,g=x.useRef(h),v=x.useRef(new Map).current,b=x.useRef(!0);if(Hp(()=>{b.current=!1,UH(d,v),g.current=h}),FH(()=>{b.current=!0,v.clear(),m.clear()}),b.current)return u.jsx(u.Fragment,{children:h.map(S=>u.jsx(gv,{isPresent:!0,initial:n?void 0:!1,presenceAffectsLayout:r,mode:a,children:S},mo(S)))});h=[...h];const w=g.current.map(mo),M=d.map(mo),y=w.length;for(let S=0;S<y;S++){const T=w[S];M.indexOf(T)===-1&&!m.has(T)&&m.set(T,void 0)}return a==="wait"&&m.size&&(h=[]),m.forEach((S,T)=>{if(M.indexOf(T)!==-1)return;const N=v.get(T);if(!N)return;const k=w.indexOf(T);let E=S;if(!E){const D=()=>{m.delete(T);const O=Array.from(v.keys()).filter(I=>!M.includes(I));if(O.forEach(I=>v.delete(I)),g.current=d.filter(I=>{const P=mo(I);return P===T||O.includes(P)}),!m.size){if(c.current===!1)return;o(),i&&i()}};E=u.jsx(gv,{isPresent:!1,onExitComplete:D,custom:t,presenceAffectsLayout:r,mode:a,children:N},mo(N)),m.set(T,E)}h.splice(k,0,E)}),h=h.map(S=>{const T=S.key;return m.has(T)?S:u.jsx(gv,{isPresent:!0,presenceAffectsLayout:r,mode:a,children:S},mo(S))}),u.jsx(u.Fragment,{children:m.size?h:h.map(S=>x.cloneElement(S))})};function Vl(e){const t=Zp(()=>Fc(e)),{isStatic:n}=x.useContext(Ip);if(n){const[,i]=x.useState(e);x.useEffect(()=>t.on("change",i),[])}return t}const $H=e=>e&&typeof e=="object"&&e.mix,WH=e=>$H(e)?e.mix:void 0;function GH(...e){const t=!Array.isArray(e[0]),n=t?0:-1,i=e[0+n],s=e[1+n],r=e[2+n],a=e[3+n],o=Vj(s,r,{mixer:WH(r[0]),...a});return t?o(i):o}function pN(e,t){const n=Vl(t()),i=()=>n.set(t());return i(),Hp(()=>{const s=()=>rt.preRender(i,!1,!0),r=e.map(a=>a.on("change",s));return()=>{r.forEach(a=>a()),Rs(i)}}),n}function YH(e){Rd.current=[],e();const t=pN(Rd.current,e);return Rd.current=void 0,t}function Fu(e,t,n,i){if(typeof e=="function")return YH(e);const s=typeof t=="function"?t:GH(t,n,i);return Array.isArray(e)?VS(e,s):VS([e],([r])=>s(r))}function VS(e,t){const n=Zp(()=>[]);return pN(e,()=>{n.length=0;const i=e.length;for(let s=0;s<i;s++)n[s]=e[s].get();return t(n)})}function vN(e,t,n){var i;if(typeof e=="string"){let s=document;n?((i=n[e])!==null&&i!==void 0||(n[e]=s.querySelectorAll(e)),e=n[e]):e=s.querySelectorAll(e)}else e instanceof Element&&(e=[e]);return Array.from(e||[])}function qH(e){return typeof e=="object"&&!Array.isArray(e)}function XH(e){const t={presenceContext:null,props:{},visualState:{renderState:{transform:{},transformOrigin:{},style:{},vars:{},attrs:{}},latestValues:{}}},n=aN(e)?new mN(t,{enableHardwareAcceleration:!1}):new hN(t,{enableHardwareAcceleration:!0});n.mount(e),lf.set(e,n)}function KH(e,t=100){const n=yb({keyframes:[0,t],...e}),i=Math.min(Uj(n),ey);return{type:"keyframes",ease:s=>n.next(i*s).value/t,duration:ks(i)}}function HS(e,t,n,i){var s;return typeof t=="number"?t:t.startsWith("-")||t.startsWith("+")?Math.max(0,e+parseFloat(t)):t==="<"?n:(s=i.get(t))!==null&&s!==void 0?s:e}const QH=(e,t,n)=>{const i=t-e;return((n-e)%i+i)%i+e};function JH(e,t){return Dj(e)?e[QH(0,e.length,t)]:e}function eF(e,t,n){for(let i=0;i<e.length;i++){const s=e[i];s.at>t&&s.at<n&&(Yp(e,s),i--)}}function tF(e,t,n,i,s,r){eF(e,s,r);for(let a=0;a<t.length;a++)e.push({value:t[a],at:jt(s,r,i[a]),easing:JH(n,a)})}function nF(e,t){return e.at===t.at?e.value===null?1:t.value===null?-1:0:e.at-t.at}const iF="easeInOut";function sF(e,{defaultTransition:t={},...n}={},i){const s=t.duration||.3,r=new Map,a=new Map,o={},c=new Map;let d=0,h=0,m=0;for(let g=0;g<e.length;g++){const v=e[g];if(typeof v=="string"){c.set(v,h);continue}else if(!Array.isArray(v)){c.set(v.name,HS(h,v.at,d,c));continue}let[b,w,M={}]=v;M.at!==void 0&&(h=HS(h,M.at,d,c));let y=0;const S=(T,N,k,E=0,D=0)=>{const O=rF(T),{delay:I=0,times:P=Fj(O),type:H="keyframes",...V}=N;let{ease:J=t.ease||"easeOut",duration:Q}=N;const U=typeof I=="function"?I(E,D):I,R=O.length;if(R<=2&&H==="spring"){let G=100;if(R===2&&lF(O)){const Le=O[1]-O[0];G=Math.abs(Le)}const ie={...V};Q!==void 0&&(ie.duration=Cr(Q));const se=KH(ie,G);J=se.ease,Q=se.duration}Q??(Q=s);const $=h+U,B=$+Q;P.length===1&&P[0]===0&&(P[1]=1);const W=P.length-O.length;W>0&&Hj(P,W),O.length===1&&O.unshift(null),tF(k,O,J,P,$,B),y=Math.max(U+Q,y),m=Math.max(B,m)};if(on(b)){const T=FS(b,a);S(w,M,US("default",T))}else{const T=vN(b,i,o),N=T.length;for(let k=0;k<N;k++){w=w,M=M;const E=T[k],D=FS(E,a);for(const O in w)S(w[O],aF(M,O),US(O,D),k,N)}}d=h,h+=y}return a.forEach((g,v)=>{for(const b in g){const w=g[b];w.sort(nF);const M=[],y=[],S=[];for(let N=0;N<w.length;N++){const{at:k,value:E,easing:D}=w[N];M.push(E),y.push(Hc(0,m,k)),S.push(D||"easeOut")}y[0]!==0&&(y.unshift(0),M.unshift(M[0]),S.unshift(iF)),y[y.length-1]!==1&&(y.push(1),M.push(null)),r.has(v)||r.set(v,{keyframes:{},transition:{}});const T=r.get(v);T.keyframes[b]=M,T.transition[b]={...t,duration:m,ease:S,times:y,...n}}}),r}function FS(e,t){return!t.has(e)&&t.set(e,{}),t.get(e)}function US(e,t){return t[e]||(t[e]=[]),t[e]}function rF(e){return Array.isArray(e)?e:[e]}function aF(e,t){return e[t]?{...e,...e[t]}:{...e}}const oF=e=>typeof e=="number",lF=e=>e.every(oF);function xN(e,t,n,i){const s=vN(e),r=s.length,a=[];for(let o=0;o<r;o++){const c=s[o];lf.has(c)||XH(c);const d=lf.get(c),h={...n};typeof h.delay=="function"&&(h.delay=h.delay(o,r)),a.push(...kb(d,{...t,transition:h},{}))}return new Mb(a)}const cF=e=>Array.isArray(e)&&Array.isArray(e[0]);function uF(e,t,n){const i=[];return sF(e,t,n).forEach(({keyframes:r,transition:a},o)=>{let c;on(o)?c=Eb(o,r.default,a.default):c=xN(o,r,a),i.push(c)}),new Mb(i)}const dF=e=>{function t(n,i,s){let r;return cF(n)?r=uF(n,i,e):qH(i)?r=xN(n,i,s):r=Eb(n,i,s),r}return t},Uu=dF(),Un=x.createContext(null),Rm={};function Ag(e){for(let t of e)Rm[t.name]={value:t.value},document.body.style.setProperty(`--${t.name}`,t.value)}function li(e){var t,n,i;return(t=Rm[e])!=null&&t.value.includes("%")?`hsl(${(n=Rm[e])==null?void 0:n.value})`:(i=Rm[e])==null?void 0:i.value}let yN=[];const fF=e=>{yN=e},C=(e,t=new Map)=>{let n=yN[e];if(typeof n=="object"){let i=n[Math.floor(Math.random()*n.length)];for(let[s,r]of t)i=i.replace(`{${s}}`,r);return i}if(typeof n!="string")return e;for(let[i,s]of t)n=n.replace(`{${i}}`,s);return n};/*!
 * @kurkle/color v0.3.2
 * https://github.com/kurkle/color#readme
 * (c) 2023 Jukka Kurkela
 * Released under the MIT License
 */function Ff(e){return e+.5|0}const ma=(e,t,n)=>Math.max(Math.min(e,n),t);function ld(e){return ma(Ff(e*2.55),0,255)}function ja(e){return ma(Ff(e*255),0,255)}function lr(e){return ma(Ff(e/2.55)/100,0,1)}function ZS(e){return ma(Ff(e*100),0,100)}const xi={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,A:10,B:11,C:12,D:13,E:14,F:15,a:10,b:11,c:12,d:13,e:14,f:15},oy=[..."0123456789ABCDEF"],hF=e=>oy[e&15],mF=e=>oy[(e&240)>>4]+oy[e&15],Uh=e=>(e&240)>>4===(e&15),gF=e=>Uh(e.r)&&Uh(e.g)&&Uh(e.b)&&Uh(e.a);function pF(e){var t=e.length,n;return e[0]==="#"&&(t===4||t===5?n={r:255&xi[e[1]]*17,g:255&xi[e[2]]*17,b:255&xi[e[3]]*17,a:t===5?xi[e[4]]*17:255}:(t===7||t===9)&&(n={r:xi[e[1]]<<4|xi[e[2]],g:xi[e[3]]<<4|xi[e[4]],b:xi[e[5]]<<4|xi[e[6]],a:t===9?xi[e[7]]<<4|xi[e[8]]:255})),n}const vF=(e,t)=>e<255?t(e):"";function xF(e){var t=gF(e)?hF:mF;return e?"#"+t(e.r)+t(e.g)+t(e.b)+vF(e.a,t):void 0}const yF=/^(hsla?|hwb|hsv)\(\s*([-+.e\d]+)(?:deg)?[\s,]+([-+.e\d]+)%[\s,]+([-+.e\d]+)%(?:[\s,]+([-+.e\d]+)(%)?)?\s*\)$/;function _N(e,t,n){const i=t*Math.min(n,1-n),s=(r,a=(r+e/30)%12)=>n-i*Math.max(Math.min(a-3,9-a,1),-1);return[s(0),s(8),s(4)]}function _F(e,t,n){const i=(s,r=(s+e/60)%6)=>n-n*t*Math.max(Math.min(r,4-r,1),0);return[i(5),i(3),i(1)]}function bF(e,t,n){const i=_N(e,1,.5);let s;for(t+n>1&&(s=1/(t+n),t*=s,n*=s),s=0;s<3;s++)i[s]*=1-t-n,i[s]+=t;return i}function wF(e,t,n,i,s){return e===s?(t-n)/i+(t<n?6:0):t===s?(n-e)/i+2:(e-t)/i+4}function Ab(e){const n=e.r/255,i=e.g/255,s=e.b/255,r=Math.max(n,i,s),a=Math.min(n,i,s),o=(r+a)/2;let c,d,h;return r!==a&&(h=r-a,d=o>.5?h/(2-r-a):h/(r+a),c=wF(n,i,s,h,r),c=c*60+.5),[c|0,d||0,o]}function Ob(e,t,n,i){return(Array.isArray(t)?e(t[0],t[1],t[2]):e(t,n,i)).map(ja)}function Db(e,t,n){return Ob(_N,e,t,n)}function SF(e,t,n){return Ob(bF,e,t,n)}function CF(e,t,n){return Ob(_F,e,t,n)}function bN(e){return(e%360+360)%360}function MF(e){const t=yF.exec(e);let n=255,i;if(!t)return;t[5]!==i&&(n=t[6]?ld(+t[5]):ja(+t[5]));const s=bN(+t[2]),r=+t[3]/100,a=+t[4]/100;return t[1]==="hwb"?i=SF(s,r,a):t[1]==="hsv"?i=CF(s,r,a):i=Db(s,r,a),{r:i[0],g:i[1],b:i[2],a:n}}function TF(e,t){var n=Ab(e);n[0]=bN(n[0]+t),n=Db(n),e.r=n[0],e.g=n[1],e.b=n[2]}function jF(e){if(!e)return;const t=Ab(e),n=t[0],i=ZS(t[1]),s=ZS(t[2]);return e.a<255?`hsla(${n}, ${i}%, ${s}%, ${lr(e.a)})`:`hsl(${n}, ${i}%, ${s}%)`}const $S={x:"dark",Z:"light",Y:"re",X:"blu",W:"gr",V:"medium",U:"slate",A:"ee",T:"ol",S:"or",B:"ra",C:"lateg",D:"ights",R:"in",Q:"turquois",E:"hi",P:"ro",O:"al",N:"le",M:"de",L:"yello",F:"en",K:"ch",G:"arks",H:"ea",I:"ightg",J:"wh"},WS={OiceXe:"f0f8ff",antiquewEte:"faebd7",aqua:"ffff",aquamarRe:"7fffd4",azuY:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"0",blanKedOmond:"ffebcd",Xe:"ff",XeviTet:"8a2be2",bPwn:"a52a2a",burlywood:"deb887",caMtXe:"5f9ea0",KartYuse:"7fff00",KocTate:"d2691e",cSO:"ff7f50",cSnflowerXe:"6495ed",cSnsilk:"fff8dc",crimson:"dc143c",cyan:"ffff",xXe:"8b",xcyan:"8b8b",xgTMnPd:"b8860b",xWay:"a9a9a9",xgYF:"6400",xgYy:"a9a9a9",xkhaki:"bdb76b",xmagFta:"8b008b",xTivegYF:"556b2f",xSange:"ff8c00",xScEd:"9932cc",xYd:"8b0000",xsOmon:"e9967a",xsHgYF:"8fbc8f",xUXe:"483d8b",xUWay:"2f4f4f",xUgYy:"2f4f4f",xQe:"ced1",xviTet:"9400d3",dAppRk:"ff1493",dApskyXe:"bfff",dimWay:"696969",dimgYy:"696969",dodgerXe:"1e90ff",fiYbrick:"b22222",flSOwEte:"fffaf0",foYstWAn:"228b22",fuKsia:"ff00ff",gaRsbSo:"dcdcdc",ghostwEte:"f8f8ff",gTd:"ffd700",gTMnPd:"daa520",Way:"808080",gYF:"8000",gYFLw:"adff2f",gYy:"808080",honeyMw:"f0fff0",hotpRk:"ff69b4",RdianYd:"cd5c5c",Rdigo:"4b0082",ivSy:"fffff0",khaki:"f0e68c",lavFMr:"e6e6fa",lavFMrXsh:"fff0f5",lawngYF:"7cfc00",NmoncEffon:"fffacd",ZXe:"add8e6",ZcSO:"f08080",Zcyan:"e0ffff",ZgTMnPdLw:"fafad2",ZWay:"d3d3d3",ZgYF:"90ee90",ZgYy:"d3d3d3",ZpRk:"ffb6c1",ZsOmon:"ffa07a",ZsHgYF:"20b2aa",ZskyXe:"87cefa",ZUWay:"778899",ZUgYy:"778899",ZstAlXe:"b0c4de",ZLw:"ffffe0",lime:"ff00",limegYF:"32cd32",lRF:"faf0e6",magFta:"ff00ff",maPon:"800000",VaquamarRe:"66cdaa",VXe:"cd",VScEd:"ba55d3",VpurpN:"9370db",VsHgYF:"3cb371",VUXe:"7b68ee",VsprRggYF:"fa9a",VQe:"48d1cc",VviTetYd:"c71585",midnightXe:"191970",mRtcYam:"f5fffa",mistyPse:"ffe4e1",moccasR:"ffe4b5",navajowEte:"ffdead",navy:"80",Tdlace:"fdf5e6",Tive:"808000",TivedBb:"6b8e23",Sange:"ffa500",SangeYd:"ff4500",ScEd:"da70d6",pOegTMnPd:"eee8aa",pOegYF:"98fb98",pOeQe:"afeeee",pOeviTetYd:"db7093",papayawEp:"ffefd5",pHKpuff:"ffdab9",peru:"cd853f",pRk:"ffc0cb",plum:"dda0dd",powMrXe:"b0e0e6",purpN:"800080",YbeccapurpN:"663399",Yd:"ff0000",Psybrown:"bc8f8f",PyOXe:"4169e1",saddNbPwn:"8b4513",sOmon:"fa8072",sandybPwn:"f4a460",sHgYF:"2e8b57",sHshell:"fff5ee",siFna:"a0522d",silver:"c0c0c0",skyXe:"87ceeb",UXe:"6a5acd",UWay:"708090",UgYy:"708090",snow:"fffafa",sprRggYF:"ff7f",stAlXe:"4682b4",tan:"d2b48c",teO:"8080",tEstN:"d8bfd8",tomato:"ff6347",Qe:"40e0d0",viTet:"ee82ee",JHt:"f5deb3",wEte:"ffffff",wEtesmoke:"f5f5f5",Lw:"ffff00",LwgYF:"9acd32"};function NF(){const e={},t=Object.keys(WS),n=Object.keys($S);let i,s,r,a,o;for(i=0;i<t.length;i++){for(a=o=t[i],s=0;s<n.length;s++)r=n[s],o=o.replace(r,$S[r]);r=parseInt(WS[a],16),e[o]=[r>>16&255,r>>8&255,r&255]}return e}let Zh;function kF(e){Zh||(Zh=NF(),Zh.transparent=[0,0,0,0]);const t=Zh[e.toLowerCase()];return t&&{r:t[0],g:t[1],b:t[2],a:t.length===4?t[3]:255}}const EF=/^rgba?\(\s*([-+.\d]+)(%)?[\s,]+([-+.e\d]+)(%)?[\s,]+([-+.e\d]+)(%)?(?:[\s,/]+([-+.e\d]+)(%)?)?\s*\)$/;function AF(e){const t=EF.exec(e);let n=255,i,s,r;if(t){if(t[7]!==i){const a=+t[7];n=t[8]?ld(a):ma(a*255,0,255)}return i=+t[1],s=+t[3],r=+t[5],i=255&(t[2]?ld(i):ma(i,0,255)),s=255&(t[4]?ld(s):ma(s,0,255)),r=255&(t[6]?ld(r):ma(r,0,255)),{r:i,g:s,b:r,a:n}}}function OF(e){return e&&(e.a<255?`rgba(${e.r}, ${e.g}, ${e.b}, ${lr(e.a)})`:`rgb(${e.r}, ${e.g}, ${e.b})`)}const pv=e=>e<=.0031308?e*12.92:Math.pow(e,1/2.4)*1.055-.055,jl=e=>e<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4);function DF(e,t,n){const i=jl(lr(e.r)),s=jl(lr(e.g)),r=jl(lr(e.b));return{r:ja(pv(i+n*(jl(lr(t.r))-i))),g:ja(pv(s+n*(jl(lr(t.g))-s))),b:ja(pv(r+n*(jl(lr(t.b))-r))),a:e.a+n*(t.a-e.a)}}function $h(e,t,n){if(e){let i=Ab(e);i[t]=Math.max(0,Math.min(i[t]+i[t]*n,t===0?360:1)),i=Db(i),e.r=i[0],e.g=i[1],e.b=i[2]}}function wN(e,t){return e&&Object.assign(t||{},e)}function GS(e){var t={r:0,g:0,b:0,a:255};return Array.isArray(e)?e.length>=3&&(t={r:e[0],g:e[1],b:e[2],a:255},e.length>3&&(t.a=ja(e[3]))):(t=wN(e,{r:0,g:0,b:0,a:1}),t.a=ja(t.a)),t}function PF(e){return e.charAt(0)==="r"?AF(e):MF(e)}class cf{constructor(t){if(t instanceof cf)return t;const n=typeof t;let i;n==="object"?i=GS(t):n==="string"&&(i=pF(t)||kF(t)||PF(t)),this._rgb=i,this._valid=!!i}get valid(){return this._valid}get rgb(){var t=wN(this._rgb);return t&&(t.a=lr(t.a)),t}set rgb(t){this._rgb=GS(t)}rgbString(){return this._valid?OF(this._rgb):void 0}hexString(){return this._valid?xF(this._rgb):void 0}hslString(){return this._valid?jF(this._rgb):void 0}mix(t,n){if(t){const i=this.rgb,s=t.rgb;let r;const a=n===r?.5:n,o=2*a-1,c=i.a-s.a,d=((o*c===-1?o:(o+c)/(1+o*c))+1)/2;r=1-d,i.r=255&d*i.r+r*s.r+.5,i.g=255&d*i.g+r*s.g+.5,i.b=255&d*i.b+r*s.b+.5,i.a=a*i.a+(1-a)*s.a,this.rgb=i}return this}interpolate(t,n){return t&&(this._rgb=DF(this._rgb,t._rgb,n)),this}clone(){return new cf(this.rgb)}alpha(t){return this._rgb.a=ja(t),this}clearer(t){const n=this._rgb;return n.a*=1-t,this}greyscale(){const t=this._rgb,n=Ff(t.r*.3+t.g*.59+t.b*.11);return t.r=t.g=t.b=n,this}opaquer(t){const n=this._rgb;return n.a*=1+t,this}negate(){const t=this._rgb;return t.r=255-t.r,t.g=255-t.g,t.b=255-t.b,this}lighten(t){return $h(this._rgb,2,t),this}darken(t){return $h(this._rgb,2,-t),this}saturate(t){return $h(this._rgb,1,t),this}desaturate(t){return $h(this._rgb,1,-t),this}rotate(t){return TF(this._rgb,t),this}}/*!
 * Chart.js v4.4.3
 * https://www.chartjs.org
 * (c) 2024 Chart.js Contributors
 * Released under the MIT License
 */function ir(){}const RF=(()=>{let e=0;return()=>e++})();function ct(e){return e===null||typeof e>"u"}function Nt(e){if(Array.isArray&&Array.isArray(e))return!0;const t=Object.prototype.toString.call(e);return t.slice(0,7)==="[object"&&t.slice(-6)==="Array]"}function Ge(e){return e!==null&&Object.prototype.toString.call(e)==="[object Object]"}function Vt(e){return(typeof e=="number"||e instanceof Number)&&isFinite(+e)}function ii(e,t){return Vt(e)?e:t}function Fe(e,t){return typeof e>"u"?t:e}const LF=(e,t)=>typeof e=="string"&&e.endsWith("%")?parseFloat(e)/100:+e/t,SN=(e,t)=>typeof e=="string"&&e.endsWith("%")?parseFloat(e)/100*t:+e;function xt(e,t,n){if(e&&typeof e.call=="function")return e.apply(n,t)}function lt(e,t,n,i){let s,r,a;if(Nt(e))for(r=e.length,s=0;s<r;s++)t.call(n,e[s],s);else if(Ge(e))for(a=Object.keys(e),r=a.length,s=0;s<r;s++)t.call(n,e[a[s]],a[s])}function Og(e,t){let n,i,s,r;if(!e||!t||e.length!==t.length)return!1;for(n=0,i=e.length;n<i;++n)if(s=e[n],r=t[n],s.datasetIndex!==r.datasetIndex||s.index!==r.index)return!1;return!0}function Dg(e){if(Nt(e))return e.map(Dg);if(Ge(e)){const t=Object.create(null),n=Object.keys(e),i=n.length;let s=0;for(;s<i;++s)t[n[s]]=Dg(e[n[s]]);return t}return e}function CN(e){return["__proto__","prototype","constructor"].indexOf(e)===-1}function zF(e,t,n,i){if(!CN(e))return;const s=t[e],r=n[e];Ge(s)&&Ge(r)?uf(s,r,i):t[e]=Dg(r)}function uf(e,t,n){const i=Nt(t)?t:[t],s=i.length;if(!Ge(e))return e;n=n||{};const r=n.merger||zF;let a;for(let o=0;o<s;++o){if(a=i[o],!Ge(a))continue;const c=Object.keys(a);for(let d=0,h=c.length;d<h;++d)r(c[d],e,a,n)}return e}function Id(e,t){return uf(e,t,{merger:IF})}function IF(e,t,n){if(!CN(e))return;const i=t[e],s=n[e];Ge(i)&&Ge(s)?Id(i,s):Object.prototype.hasOwnProperty.call(t,e)||(t[e]=Dg(s))}const YS={"":e=>e,x:e=>e.x,y:e=>e.y};function BF(e){const t=e.split("."),n=[];let i="";for(const s of t)i+=s,i.endsWith("\\")?i=i.slice(0,-1)+".":(n.push(i),i="");return n}function VF(e){const t=BF(e);return n=>{for(const i of t){if(i==="")break;n=n&&n[i]}return n}}function $o(e,t){return(YS[t]||(YS[t]=VF(t)))(e)}function Pb(e){return e.charAt(0).toUpperCase()+e.slice(1)}const df=e=>typeof e<"u",za=e=>typeof e=="function",qS=(e,t)=>{if(e.size!==t.size)return!1;for(const n of e)if(!t.has(n))return!1;return!0};function HF(e){return e.type==="mouseup"||e.type==="click"||e.type==="contextmenu"}const Et=Math.PI,bt=2*Et,FF=bt+Et,Pg=Number.POSITIVE_INFINITY,UF=Et/180,$t=Et/2,no=Et/4,XS=Et*2/3,ga=Math.log10,Es=Math.sign;function Bd(e,t,n){return Math.abs(e-t)<n}function KS(e){const t=Math.round(e);e=Bd(e,t,e/1e3)?t:e;const n=Math.pow(10,Math.floor(ga(e))),i=e/n;return(i<=1?1:i<=2?2:i<=5?5:10)*n}function ZF(e){const t=[],n=Math.sqrt(e);let i;for(i=1;i<n;i++)e%i===0&&(t.push(i),t.push(e/i));return n===(n|0)&&t.push(n),t.sort((s,r)=>s-r).pop(),t}function ff(e){return!isNaN(parseFloat(e))&&isFinite(e)}function $F(e,t){const n=Math.round(e);return n-t<=e&&n+t>=e}function MN(e,t,n){let i,s,r;for(i=0,s=e.length;i<s;i++)r=e[i][n],isNaN(r)||(t.min=Math.min(t.min,r),t.max=Math.max(t.max,r))}function Cs(e){return e*(Et/180)}function Rb(e){return e*(180/Et)}function QS(e){if(!Vt(e))return;let t=1,n=0;for(;Math.round(e*t)/t!==e;)t*=10,n++;return n}function TN(e,t){const n=t.x-e.x,i=t.y-e.y,s=Math.sqrt(n*n+i*i);let r=Math.atan2(i,n);return r<-.5*Et&&(r+=bt),{angle:r,distance:s}}function ly(e,t){return Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2))}function WF(e,t){return(e-t+FF)%bt-Et}function ri(e){return(e%bt+bt)%bt}function hf(e,t,n,i){const s=ri(e),r=ri(t),a=ri(n),o=ri(r-s),c=ri(a-s),d=ri(s-r),h=ri(s-a);return s===r||s===a||i&&r===a||o>c&&d<h}function En(e,t,n){return Math.max(t,Math.min(n,e))}function GF(e){return En(e,-32768,32767)}function vr(e,t,n,i=1e-6){return e>=Math.min(t,n)-i&&e<=Math.max(t,n)+i}function Lb(e,t,n){n=n||(a=>e[a]<t);let i=e.length-1,s=0,r;for(;i-s>1;)r=s+i>>1,n(r)?s=r:i=r;return{lo:s,hi:i}}const So=(e,t,n,i)=>Lb(e,n,i?s=>{const r=e[s][t];return r<n||r===n&&e[s+1][t]===n}:s=>e[s][t]<n),YF=(e,t,n)=>Lb(e,n,i=>e[i][t]>=n);function qF(e,t,n){let i=0,s=e.length;for(;i<s&&e[i]<t;)i++;for(;s>i&&e[s-1]>n;)s--;return i>0||s<e.length?e.slice(i,s):e}const jN=["push","pop","shift","splice","unshift"];function XF(e,t){if(e._chartjs){e._chartjs.listeners.push(t);return}Object.defineProperty(e,"_chartjs",{configurable:!0,enumerable:!1,value:{listeners:[t]}}),jN.forEach(n=>{const i="_onData"+Pb(n),s=e[n];Object.defineProperty(e,n,{configurable:!0,enumerable:!1,value(...r){const a=s.apply(this,r);return e._chartjs.listeners.forEach(o=>{typeof o[i]=="function"&&o[i](...r)}),a}})})}function JS(e,t){const n=e._chartjs;if(!n)return;const i=n.listeners,s=i.indexOf(t);s!==-1&&i.splice(s,1),!(i.length>0)&&(jN.forEach(r=>{delete e[r]}),delete e._chartjs)}function NN(e){const t=new Set(e);return t.size===e.length?e:Array.from(t)}const kN=function(){return typeof window>"u"?function(e){return e()}:window.requestAnimationFrame}();function EN(e,t){let n=[],i=!1;return function(...s){n=s,i||(i=!0,kN.call(window,()=>{i=!1,e.apply(t,n)}))}}function KF(e,t){let n;return function(...i){return t?(clearTimeout(n),n=setTimeout(e,t,i)):e.apply(this,i),t}}const zb=e=>e==="start"?"left":e==="end"?"right":"center",bn=(e,t,n)=>e==="start"?t:e==="end"?n:(t+n)/2,QF=(e,t,n,i)=>e===(i?"left":"right")?n:e==="center"?(t+n)/2:t;function JF(e,t,n){const i=t.length;let s=0,r=i;if(e._sorted){const{iScale:a,_parsed:o}=e,c=a.axis,{min:d,max:h,minDefined:m,maxDefined:g}=a.getUserBounds();m&&(s=En(Math.min(So(o,c,d).lo,n?i:So(t,c,a.getPixelForValue(d)).lo),0,i-1)),g?r=En(Math.max(So(o,a.axis,h,!0).hi+1,n?0:So(t,c,a.getPixelForValue(h),!0).hi+1),s,i)-s:r=i-s}return{start:s,count:r}}function eU(e){const{xScale:t,yScale:n,_scaleRanges:i}=e,s={xmin:t.min,xmax:t.max,ymin:n.min,ymax:n.max};if(!i)return e._scaleRanges=s,!0;const r=i.xmin!==t.min||i.xmax!==t.max||i.ymin!==n.min||i.ymax!==n.max;return Object.assign(i,s),r}const Wh=e=>e===0||e===1,e6=(e,t,n)=>-(Math.pow(2,10*(e-=1))*Math.sin((e-t)*bt/n)),t6=(e,t,n)=>Math.pow(2,-10*e)*Math.sin((e-t)*bt/n)+1,Vd={linear:e=>e,easeInQuad:e=>e*e,easeOutQuad:e=>-e*(e-2),easeInOutQuad:e=>(e/=.5)<1?.5*e*e:-.5*(--e*(e-2)-1),easeInCubic:e=>e*e*e,easeOutCubic:e=>(e-=1)*e*e+1,easeInOutCubic:e=>(e/=.5)<1?.5*e*e*e:.5*((e-=2)*e*e+2),easeInQuart:e=>e*e*e*e,easeOutQuart:e=>-((e-=1)*e*e*e-1),easeInOutQuart:e=>(e/=.5)<1?.5*e*e*e*e:-.5*((e-=2)*e*e*e-2),easeInQuint:e=>e*e*e*e*e,easeOutQuint:e=>(e-=1)*e*e*e*e+1,easeInOutQuint:e=>(e/=.5)<1?.5*e*e*e*e*e:.5*((e-=2)*e*e*e*e+2),easeInSine:e=>-Math.cos(e*$t)+1,easeOutSine:e=>Math.sin(e*$t),easeInOutSine:e=>-.5*(Math.cos(Et*e)-1),easeInExpo:e=>e===0?0:Math.pow(2,10*(e-1)),easeOutExpo:e=>e===1?1:-Math.pow(2,-10*e)+1,easeInOutExpo:e=>Wh(e)?e:e<.5?.5*Math.pow(2,10*(e*2-1)):.5*(-Math.pow(2,-10*(e*2-1))+2),easeInCirc:e=>e>=1?e:-(Math.sqrt(1-e*e)-1),easeOutCirc:e=>Math.sqrt(1-(e-=1)*e),easeInOutCirc:e=>(e/=.5)<1?-.5*(Math.sqrt(1-e*e)-1):.5*(Math.sqrt(1-(e-=2)*e)+1),easeInElastic:e=>Wh(e)?e:e6(e,.075,.3),easeOutElastic:e=>Wh(e)?e:t6(e,.075,.3),easeInOutElastic(e){return Wh(e)?e:e<.5?.5*e6(e*2,.1125,.45):.5+.5*t6(e*2-1,.1125,.45)},easeInBack(e){return e*e*((1.70158+1)*e-1.70158)},easeOutBack(e){return(e-=1)*e*((1.70158+1)*e+1.70158)+1},easeInOutBack(e){let t=1.70158;return(e/=.5)<1?.5*(e*e*(((t*=1.525)+1)*e-t)):.5*((e-=2)*e*(((t*=1.525)+1)*e+t)+2)},easeInBounce:e=>1-Vd.easeOutBounce(1-e),easeOutBounce(e){return e<1/2.75?7.5625*e*e:e<2/2.75?7.5625*(e-=1.5/2.75)*e+.75:e<2.5/2.75?7.5625*(e-=2.25/2.75)*e+.9375:7.5625*(e-=2.625/2.75)*e+.984375},easeInOutBounce:e=>e<.5?Vd.easeInBounce(e*2)*.5:Vd.easeOutBounce(e*2-1)*.5+.5};function Ib(e){if(e&&typeof e=="object"){const t=e.toString();return t==="[object CanvasPattern]"||t==="[object CanvasGradient]"}return!1}function n6(e){return Ib(e)?e:new cf(e)}function vv(e){return Ib(e)?e:new cf(e).saturate(.5).darken(.1).hexString()}const tU=["x","y","borderWidth","radius","tension"],nU=["color","borderColor","backgroundColor"];function iU(e){e.set("animation",{delay:void 0,duration:1e3,easing:"easeOutQuart",fn:void 0,from:void 0,loop:void 0,to:void 0,type:void 0}),e.describe("animation",{_fallback:!1,_indexable:!1,_scriptable:t=>t!=="onProgress"&&t!=="onComplete"&&t!=="fn"}),e.set("animations",{colors:{type:"color",properties:nU},numbers:{type:"number",properties:tU}}),e.describe("animations",{_fallback:"animation"}),e.set("transitions",{active:{animation:{duration:400}},resize:{animation:{duration:0}},show:{animations:{colors:{from:"transparent"},visible:{type:"boolean",duration:0}}},hide:{animations:{colors:{to:"transparent"},visible:{type:"boolean",easing:"linear",fn:t=>t|0}}}})}function sU(e){e.set("layout",{autoPadding:!0,padding:{top:0,right:0,bottom:0,left:0}})}const i6=new Map;function rU(e,t){t=t||{};const n=e+JSON.stringify(t);let i=i6.get(n);return i||(i=new Intl.NumberFormat(e,t),i6.set(n,i)),i}function qp(e,t,n){return rU(t,n).format(e)}const AN={values(e){return Nt(e)?e:""+e},numeric(e,t,n){if(e===0)return"0";const i=this.chart.options.locale;let s,r=e;if(n.length>1){const d=Math.max(Math.abs(n[0].value),Math.abs(n[n.length-1].value));(d<1e-4||d>1e15)&&(s="scientific"),r=aU(e,n)}const a=ga(Math.abs(r)),o=isNaN(a)?1:Math.max(Math.min(-1*Math.floor(a),20),0),c={notation:s,minimumFractionDigits:o,maximumFractionDigits:o};return Object.assign(c,this.options.ticks.format),qp(e,i,c)},logarithmic(e,t,n){if(e===0)return"0";const i=n[t].significand||e/Math.pow(10,Math.floor(ga(e)));return[1,2,3,5,10,15].includes(i)||t>.8*n.length?AN.numeric.call(this,e,t,n):""}};function aU(e,t){let n=t.length>3?t[2].value-t[1].value:t[1].value-t[0].value;return Math.abs(n)>=1&&e!==Math.floor(e)&&(n=e-Math.floor(e)),n}var Xp={formatters:AN};function oU(e){e.set("scale",{display:!0,offset:!1,reverse:!1,beginAtZero:!1,bounds:"ticks",clip:!0,grace:0,grid:{display:!0,lineWidth:1,drawOnChartArea:!0,drawTicks:!0,tickLength:8,tickWidth:(t,n)=>n.lineWidth,tickColor:(t,n)=>n.color,offset:!1},border:{display:!0,dash:[],dashOffset:0,width:1},title:{display:!1,text:"",padding:{top:4,bottom:4}},ticks:{minRotation:0,maxRotation:50,mirror:!1,textStrokeWidth:0,textStrokeColor:"",padding:3,display:!0,autoSkip:!0,autoSkipPadding:3,labelOffset:0,callback:Xp.formatters.values,minor:{},major:{},align:"center",crossAlign:"near",showLabelBackdrop:!1,backdropColor:"rgba(255, 255, 255, 0.75)",backdropPadding:2}}),e.route("scale.ticks","color","","color"),e.route("scale.grid","color","","borderColor"),e.route("scale.border","color","","borderColor"),e.route("scale.title","color","","color"),e.describe("scale",{_fallback:!1,_scriptable:t=>!t.startsWith("before")&&!t.startsWith("after")&&t!=="callback"&&t!=="parser",_indexable:t=>t!=="borderDash"&&t!=="tickBorderDash"&&t!=="dash"}),e.describe("scales",{_fallback:"scale"}),e.describe("scale.ticks",{_scriptable:t=>t!=="backdropPadding"&&t!=="callback",_indexable:t=>t!=="backdropPadding"})}const Wo=Object.create(null),cy=Object.create(null);function Hd(e,t){if(!t)return e;const n=t.split(".");for(let i=0,s=n.length;i<s;++i){const r=n[i];e=e[r]||(e[r]=Object.create(null))}return e}function xv(e,t,n){return typeof t=="string"?uf(Hd(e,t),n):uf(Hd(e,""),t)}class lU{constructor(t,n){this.animation=void 0,this.backgroundColor="rgba(0,0,0,0.1)",this.borderColor="rgba(0,0,0,0.1)",this.color="#666",this.datasets={},this.devicePixelRatio=i=>i.chart.platform.getDevicePixelRatio(),this.elements={},this.events=["mousemove","mouseout","click","touchstart","touchmove"],this.font={family:"'Helvetica Neue', 'Helvetica', 'Arial', sans-serif",size:12,style:"normal",lineHeight:1.2,weight:null},this.hover={},this.hoverBackgroundColor=(i,s)=>vv(s.backgroundColor),this.hoverBorderColor=(i,s)=>vv(s.borderColor),this.hoverColor=(i,s)=>vv(s.color),this.indexAxis="x",this.interaction={mode:"nearest",intersect:!0,includeInvisible:!1},this.maintainAspectRatio=!0,this.onHover=null,this.onClick=null,this.parsing=!0,this.plugins={},this.responsive=!0,this.scale=void 0,this.scales={},this.showLine=!0,this.drawActiveElementsOnTop=!0,this.describe(t),this.apply(n)}set(t,n){return xv(this,t,n)}get(t){return Hd(this,t)}describe(t,n){return xv(cy,t,n)}override(t,n){return xv(Wo,t,n)}route(t,n,i,s){const r=Hd(this,t),a=Hd(this,i),o="_"+n;Object.defineProperties(r,{[o]:{value:r[n],writable:!0},[n]:{enumerable:!0,get(){const c=this[o],d=a[s];return Ge(c)?Object.assign({},d,c):Fe(c,d)},set(c){this[o]=c}}})}apply(t){t.forEach(n=>n(this))}}var Ht=new lU({_scriptable:e=>!e.startsWith("on"),_indexable:e=>e!=="events",hover:{_fallback:"interaction"},interaction:{_scriptable:!1,_indexable:!1}},[iU,sU,oU]);function cU(e){return!e||ct(e.size)||ct(e.family)?null:(e.style?e.style+" ":"")+(e.weight?e.weight+" ":"")+e.size+"px "+e.family}function Rg(e,t,n,i,s){let r=t[s];return r||(r=t[s]=e.measureText(s).width,n.push(s)),r>i&&(i=r),i}function uU(e,t,n,i){i=i||{};let s=i.data=i.data||{},r=i.garbageCollect=i.garbageCollect||[];i.font!==t&&(s=i.data={},r=i.garbageCollect=[],i.font=t),e.save(),e.font=t;let a=0;const o=n.length;let c,d,h,m,g;for(c=0;c<o;c++)if(m=n[c],m!=null&&!Nt(m))a=Rg(e,s,r,a,m);else if(Nt(m))for(d=0,h=m.length;d<h;d++)g=m[d],g!=null&&!Nt(g)&&(a=Rg(e,s,r,a,g));e.restore();const v=r.length/2;if(v>n.length){for(c=0;c<v;c++)delete s[r[c]];r.splice(0,v)}return a}function io(e,t,n){const i=e.currentDevicePixelRatio,s=n!==0?Math.max(n/2,.5):0;return Math.round((t-s)*i)/i+s}function s6(e,t){!t&&!e||(t=t||e.getContext("2d"),t.save(),t.resetTransform(),t.clearRect(0,0,e.width,e.height),t.restore())}function uy(e,t,n,i){ON(e,t,n,i,null)}function ON(e,t,n,i,s){let r,a,o,c,d,h,m,g;const v=t.pointStyle,b=t.rotation,w=t.radius;let M=(b||0)*UF;if(v&&typeof v=="object"&&(r=v.toString(),r==="[object HTMLImageElement]"||r==="[object HTMLCanvasElement]")){e.save(),e.translate(n,i),e.rotate(M),e.drawImage(v,-v.width/2,-v.height/2,v.width,v.height),e.restore();return}if(!(isNaN(w)||w<=0)){switch(e.beginPath(),v){default:s?e.ellipse(n,i,s/2,w,0,0,bt):e.arc(n,i,w,0,bt),e.closePath();break;case"triangle":h=s?s/2:w,e.moveTo(n+Math.sin(M)*h,i-Math.cos(M)*w),M+=XS,e.lineTo(n+Math.sin(M)*h,i-Math.cos(M)*w),M+=XS,e.lineTo(n+Math.sin(M)*h,i-Math.cos(M)*w),e.closePath();break;case"rectRounded":d=w*.516,c=w-d,a=Math.cos(M+no)*c,m=Math.cos(M+no)*(s?s/2-d:c),o=Math.sin(M+no)*c,g=Math.sin(M+no)*(s?s/2-d:c),e.arc(n-m,i-o,d,M-Et,M-$t),e.arc(n+g,i-a,d,M-$t,M),e.arc(n+m,i+o,d,M,M+$t),e.arc(n-g,i+a,d,M+$t,M+Et),e.closePath();break;case"rect":if(!b){c=Math.SQRT1_2*w,h=s?s/2:c,e.rect(n-h,i-c,2*h,2*c);break}M+=no;case"rectRot":m=Math.cos(M)*(s?s/2:w),a=Math.cos(M)*w,o=Math.sin(M)*w,g=Math.sin(M)*(s?s/2:w),e.moveTo(n-m,i-o),e.lineTo(n+g,i-a),e.lineTo(n+m,i+o),e.lineTo(n-g,i+a),e.closePath();break;case"crossRot":M+=no;case"cross":m=Math.cos(M)*(s?s/2:w),a=Math.cos(M)*w,o=Math.sin(M)*w,g=Math.sin(M)*(s?s/2:w),e.moveTo(n-m,i-o),e.lineTo(n+m,i+o),e.moveTo(n+g,i-a),e.lineTo(n-g,i+a);break;case"star":m=Math.cos(M)*(s?s/2:w),a=Math.cos(M)*w,o=Math.sin(M)*w,g=Math.sin(M)*(s?s/2:w),e.moveTo(n-m,i-o),e.lineTo(n+m,i+o),e.moveTo(n+g,i-a),e.lineTo(n-g,i+a),M+=no,m=Math.cos(M)*(s?s/2:w),a=Math.cos(M)*w,o=Math.sin(M)*w,g=Math.sin(M)*(s?s/2:w),e.moveTo(n-m,i-o),e.lineTo(n+m,i+o),e.moveTo(n+g,i-a),e.lineTo(n-g,i+a);break;case"line":a=s?s/2:Math.cos(M)*w,o=Math.sin(M)*w,e.moveTo(n-a,i-o),e.lineTo(n+a,i+o);break;case"dash":e.moveTo(n,i),e.lineTo(n+Math.cos(M)*(s?s/2:w),i+Math.sin(M)*w);break;case!1:e.closePath();break}e.fill(),t.borderWidth>0&&e.stroke()}}function xr(e,t,n){return n=n||.5,!t||e&&e.x>t.left-n&&e.x<t.right+n&&e.y>t.top-n&&e.y<t.bottom+n}function Kp(e,t){e.save(),e.beginPath(),e.rect(t.left,t.top,t.right-t.left,t.bottom-t.top),e.clip()}function Qp(e){e.restore()}function dU(e,t,n,i,s){if(!t)return e.lineTo(n.x,n.y);if(s==="middle"){const r=(t.x+n.x)/2;e.lineTo(r,t.y),e.lineTo(r,n.y)}else s==="after"!=!!i?e.lineTo(t.x,n.y):e.lineTo(n.x,t.y);e.lineTo(n.x,n.y)}function fU(e,t,n,i){if(!t)return e.lineTo(n.x,n.y);e.bezierCurveTo(i?t.cp1x:t.cp2x,i?t.cp1y:t.cp2y,i?n.cp2x:n.cp1x,i?n.cp2y:n.cp1y,n.x,n.y)}function hU(e,t){t.translation&&e.translate(t.translation[0],t.translation[1]),ct(t.rotation)||e.rotate(t.rotation),t.color&&(e.fillStyle=t.color),t.textAlign&&(e.textAlign=t.textAlign),t.textBaseline&&(e.textBaseline=t.textBaseline)}function mU(e,t,n,i,s){if(s.strikethrough||s.underline){const r=e.measureText(i),a=t-r.actualBoundingBoxLeft,o=t+r.actualBoundingBoxRight,c=n-r.actualBoundingBoxAscent,d=n+r.actualBoundingBoxDescent,h=s.strikethrough?(c+d)/2:d;e.strokeStyle=e.fillStyle,e.beginPath(),e.lineWidth=s.decorationWidth||2,e.moveTo(a,h),e.lineTo(o,h),e.stroke()}}function gU(e,t){const n=e.fillStyle;e.fillStyle=t.color,e.fillRect(t.left,t.top,t.width,t.height),e.fillStyle=n}function Go(e,t,n,i,s,r={}){const a=Nt(t)?t:[t],o=r.strokeWidth>0&&r.strokeColor!=="";let c,d;for(e.save(),e.font=s.string,hU(e,r),c=0;c<a.length;++c)d=a[c],r.backdrop&&gU(e,r.backdrop),o&&(r.strokeColor&&(e.strokeStyle=r.strokeColor),ct(r.strokeWidth)||(e.lineWidth=r.strokeWidth),e.strokeText(d,n,i,r.maxWidth)),e.fillText(d,n,i,r.maxWidth),mU(e,n,i,d,r),i+=Number(s.lineHeight);e.restore()}function mf(e,t){const{x:n,y:i,w:s,h:r,radius:a}=t;e.arc(n+a.topLeft,i+a.topLeft,a.topLeft,1.5*Et,Et,!0),e.lineTo(n,i+r-a.bottomLeft),e.arc(n+a.bottomLeft,i+r-a.bottomLeft,a.bottomLeft,Et,$t,!0),e.lineTo(n+s-a.bottomRight,i+r),e.arc(n+s-a.bottomRight,i+r-a.bottomRight,a.bottomRight,$t,0,!0),e.lineTo(n+s,i+a.topRight),e.arc(n+s-a.topRight,i+a.topRight,a.topRight,0,-$t,!0),e.lineTo(n+a.topLeft,i)}const pU=/^(normal|(\d+(?:\.\d+)?)(px|em|%)?)$/,vU=/^(normal|italic|initial|inherit|unset|(oblique( -?[0-9]?[0-9]deg)?))$/;function xU(e,t){const n=(""+e).match(pU);if(!n||n[1]==="normal")return t*1.2;switch(e=+n[2],n[3]){case"px":return e;case"%":e/=100;break}return t*e}const yU=e=>+e||0;function Bb(e,t){const n={},i=Ge(t),s=i?Object.keys(t):t,r=Ge(e)?i?a=>Fe(e[a],e[t[a]]):a=>e[a]:()=>e;for(const a of s)n[a]=yU(r(a));return n}function DN(e){return Bb(e,{top:"y",right:"x",bottom:"y",left:"x"})}function Lo(e){return Bb(e,["topLeft","topRight","bottomLeft","bottomRight"])}function Dn(e){const t=DN(e);return t.width=t.left+t.right,t.height=t.top+t.bottom,t}function en(e,t){e=e||{},t=t||Ht.font;let n=Fe(e.size,t.size);typeof n=="string"&&(n=parseInt(n,10));let i=Fe(e.style,t.style);i&&!(""+i).match(vU)&&(console.warn('Invalid font style specified: "'+i+'"'),i=void 0);const s={family:Fe(e.family,t.family),lineHeight:xU(Fe(e.lineHeight,t.lineHeight),n),size:n,style:i,weight:Fe(e.weight,t.weight),string:""};return s.string=cU(s),s}function Gh(e,t,n,i){let s,r,a;for(s=0,r=e.length;s<r;++s)if(a=e[s],a!==void 0&&a!==void 0)return a}function _U(e,t,n){const{min:i,max:s}=e,r=SN(t,(s-i)/2),a=(o,c)=>n&&o===0?0:o+c;return{min:a(i,-Math.abs(r)),max:a(s,r)}}function Za(e,t){return Object.assign(Object.create(e),t)}function Vb(e,t=[""],n,i,s=()=>e[0]){const r=n||e;typeof i>"u"&&(i=zN("_fallback",e));const a={[Symbol.toStringTag]:"Object",_cacheable:!0,_scopes:e,_rootScopes:r,_fallback:i,_getTarget:s,override:o=>Vb([o,...e],t,r,i)};return new Proxy(a,{deleteProperty(o,c){return delete o[c],delete o._keys,delete e[0][c],!0},get(o,c){return RN(o,c,()=>NU(c,t,e,o))},getOwnPropertyDescriptor(o,c){return Reflect.getOwnPropertyDescriptor(o._scopes[0],c)},getPrototypeOf(){return Reflect.getPrototypeOf(e[0])},has(o,c){return a6(o).includes(c)},ownKeys(o){return a6(o)},set(o,c,d){const h=o._storage||(o._storage=s());return o[c]=h[c]=d,delete o._keys,!0}})}function Uc(e,t,n,i){const s={_cacheable:!1,_proxy:e,_context:t,_subProxy:n,_stack:new Set,_descriptors:PN(e,i),setContext:r=>Uc(e,r,n,i),override:r=>Uc(e.override(r),t,n,i)};return new Proxy(s,{deleteProperty(r,a){return delete r[a],delete e[a],!0},get(r,a,o){return RN(r,a,()=>wU(r,a,o))},getOwnPropertyDescriptor(r,a){return r._descriptors.allKeys?Reflect.has(e,a)?{enumerable:!0,configurable:!0}:void 0:Reflect.getOwnPropertyDescriptor(e,a)},getPrototypeOf(){return Reflect.getPrototypeOf(e)},has(r,a){return Reflect.has(e,a)},ownKeys(){return Reflect.ownKeys(e)},set(r,a,o){return e[a]=o,delete r[a],!0}})}function PN(e,t={scriptable:!0,indexable:!0}){const{_scriptable:n=t.scriptable,_indexable:i=t.indexable,_allKeys:s=t.allKeys}=e;return{allKeys:s,scriptable:n,indexable:i,isScriptable:za(n)?n:()=>n,isIndexable:za(i)?i:()=>i}}const bU=(e,t)=>e?e+Pb(t):t,Hb=(e,t)=>Ge(t)&&e!=="adapters"&&(Object.getPrototypeOf(t)===null||t.constructor===Object);function RN(e,t,n){if(Object.prototype.hasOwnProperty.call(e,t)||t==="constructor")return e[t];const i=n();return e[t]=i,i}function wU(e,t,n){const{_proxy:i,_context:s,_subProxy:r,_descriptors:a}=e;let o=i[t];return za(o)&&a.isScriptable(t)&&(o=SU(t,o,e,n)),Nt(o)&&o.length&&(o=CU(t,o,e,a.isIndexable)),Hb(t,o)&&(o=Uc(o,s,r&&r[t],a)),o}function SU(e,t,n,i){const{_proxy:s,_context:r,_subProxy:a,_stack:o}=n;if(o.has(e))throw new Error("Recursion detected: "+Array.from(o).join("->")+"->"+e);o.add(e);let c=t(r,a||i);return o.delete(e),Hb(e,c)&&(c=Fb(s._scopes,s,e,c)),c}function CU(e,t,n,i){const{_proxy:s,_context:r,_subProxy:a,_descriptors:o}=n;if(typeof r.index<"u"&&i(e))return t[r.index%t.length];if(Ge(t[0])){const c=t,d=s._scopes.filter(h=>h!==c);t=[];for(const h of c){const m=Fb(d,s,e,h);t.push(Uc(m,r,a&&a[e],o))}}return t}function LN(e,t,n){return za(e)?e(t,n):e}const MU=(e,t)=>e===!0?t:typeof e=="string"?$o(t,e):void 0;function TU(e,t,n,i,s){for(const r of t){const a=MU(n,r);if(a){e.add(a);const o=LN(a._fallback,n,s);if(typeof o<"u"&&o!==n&&o!==i)return o}else if(a===!1&&typeof i<"u"&&n!==i)return null}return!1}function Fb(e,t,n,i){const s=t._rootScopes,r=LN(t._fallback,n,i),a=[...e,...s],o=new Set;o.add(i);let c=r6(o,a,n,r||n,i);return c===null||typeof r<"u"&&r!==n&&(c=r6(o,a,r,c,i),c===null)?!1:Vb(Array.from(o),[""],s,r,()=>jU(t,n,i))}function r6(e,t,n,i,s){for(;n;)n=TU(e,t,n,i,s);return n}function jU(e,t,n){const i=e._getTarget();t in i||(i[t]={});const s=i[t];return Nt(s)&&Ge(n)?n:s||{}}function NU(e,t,n,i){let s;for(const r of t)if(s=zN(bU(r,e),n),typeof s<"u")return Hb(e,s)?Fb(n,i,e,s):s}function zN(e,t){for(const n of t){if(!n)continue;const i=n[e];if(typeof i<"u")return i}}function a6(e){let t=e._keys;return t||(t=e._keys=kU(e._scopes)),t}function kU(e){const t=new Set;for(const n of e)for(const i of Object.keys(n).filter(s=>!s.startsWith("_")))t.add(i);return Array.from(t)}const EU=Number.EPSILON||1e-14,Zc=(e,t)=>t<e.length&&!e[t].skip&&e[t],IN=e=>e==="x"?"y":"x";function AU(e,t,n,i){const s=e.skip?t:e,r=t,a=n.skip?t:n,o=ly(r,s),c=ly(a,r);let d=o/(o+c),h=c/(o+c);d=isNaN(d)?0:d,h=isNaN(h)?0:h;const m=i*d,g=i*h;return{previous:{x:r.x-m*(a.x-s.x),y:r.y-m*(a.y-s.y)},next:{x:r.x+g*(a.x-s.x),y:r.y+g*(a.y-s.y)}}}function OU(e,t,n){const i=e.length;let s,r,a,o,c,d=Zc(e,0);for(let h=0;h<i-1;++h)if(c=d,d=Zc(e,h+1),!(!c||!d)){if(Bd(t[h],0,EU)){n[h]=n[h+1]=0;continue}s=n[h]/t[h],r=n[h+1]/t[h],o=Math.pow(s,2)+Math.pow(r,2),!(o<=9)&&(a=3/Math.sqrt(o),n[h]=s*a*t[h],n[h+1]=r*a*t[h])}}function DU(e,t,n="x"){const i=IN(n),s=e.length;let r,a,o,c=Zc(e,0);for(let d=0;d<s;++d){if(a=o,o=c,c=Zc(e,d+1),!o)continue;const h=o[n],m=o[i];a&&(r=(h-a[n])/3,o[`cp1${n}`]=h-r,o[`cp1${i}`]=m-r*t[d]),c&&(r=(c[n]-h)/3,o[`cp2${n}`]=h+r,o[`cp2${i}`]=m+r*t[d])}}function PU(e,t="x"){const n=IN(t),i=e.length,s=Array(i).fill(0),r=Array(i);let a,o,c,d=Zc(e,0);for(a=0;a<i;++a)if(o=c,c=d,d=Zc(e,a+1),!!c){if(d){const h=d[t]-c[t];s[a]=h!==0?(d[n]-c[n])/h:0}r[a]=o?d?Es(s[a-1])!==Es(s[a])?0:(s[a-1]+s[a])/2:s[a-1]:s[a]}OU(e,s,r),DU(e,r,t)}function Yh(e,t,n){return Math.max(Math.min(e,n),t)}function RU(e,t){let n,i,s,r,a,o=xr(e[0],t);for(n=0,i=e.length;n<i;++n)a=r,r=o,o=n<i-1&&xr(e[n+1],t),r&&(s=e[n],a&&(s.cp1x=Yh(s.cp1x,t.left,t.right),s.cp1y=Yh(s.cp1y,t.top,t.bottom)),o&&(s.cp2x=Yh(s.cp2x,t.left,t.right),s.cp2y=Yh(s.cp2y,t.top,t.bottom)))}function LU(e,t,n,i,s){let r,a,o,c;if(t.spanGaps&&(e=e.filter(d=>!d.skip)),t.cubicInterpolationMode==="monotone")PU(e,s);else{let d=i?e[e.length-1]:e[0];for(r=0,a=e.length;r<a;++r)o=e[r],c=AU(d,o,e[Math.min(r+1,a-(i?0:1))%a],t.tension),o.cp1x=c.previous.x,o.cp1y=c.previous.y,o.cp2x=c.next.x,o.cp2y=c.next.y,d=o}t.capBezierPoints&&RU(e,n)}function Ub(){return typeof window<"u"&&typeof document<"u"}function Zb(e){let t=e.parentNode;return t&&t.toString()==="[object ShadowRoot]"&&(t=t.host),t}function Lg(e,t,n){let i;return typeof e=="string"?(i=parseInt(e,10),e.indexOf("%")!==-1&&(i=i/100*t.parentNode[n])):i=e,i}const Jp=e=>e.ownerDocument.defaultView.getComputedStyle(e,null);function zU(e,t){return Jp(e).getPropertyValue(t)}const IU=["top","right","bottom","left"];function zo(e,t,n){const i={};n=n?"-"+n:"";for(let s=0;s<4;s++){const r=IU[s];i[r]=parseFloat(e[t+"-"+r+n])||0}return i.width=i.left+i.right,i.height=i.top+i.bottom,i}const BU=(e,t,n)=>(e>0||t>0)&&(!n||!n.shadowRoot);function VU(e,t){const n=e.touches,i=n&&n.length?n[0]:e,{offsetX:s,offsetY:r}=i;let a=!1,o,c;if(BU(s,r,e.target))o=s,c=r;else{const d=t.getBoundingClientRect();o=i.clientX-d.left,c=i.clientY-d.top,a=!0}return{x:o,y:c,box:a}}function go(e,t){if("native"in e)return e;const{canvas:n,currentDevicePixelRatio:i}=t,s=Jp(n),r=s.boxSizing==="border-box",a=zo(s,"padding"),o=zo(s,"border","width"),{x:c,y:d,box:h}=VU(e,n),m=a.left+(h&&o.left),g=a.top+(h&&o.top);let{width:v,height:b}=t;return r&&(v-=a.width+o.width,b-=a.height+o.height),{x:Math.round((c-m)/v*n.width/i),y:Math.round((d-g)/b*n.height/i)}}function HU(e,t,n){let i,s;if(t===void 0||n===void 0){const r=e&&Zb(e);if(!r)t=e.clientWidth,n=e.clientHeight;else{const a=r.getBoundingClientRect(),o=Jp(r),c=zo(o,"border","width"),d=zo(o,"padding");t=a.width-d.width-c.width,n=a.height-d.height-c.height,i=Lg(o.maxWidth,r,"clientWidth"),s=Lg(o.maxHeight,r,"clientHeight")}}return{width:t,height:n,maxWidth:i||Pg,maxHeight:s||Pg}}const qh=e=>Math.round(e*10)/10;function FU(e,t,n,i){const s=Jp(e),r=zo(s,"margin"),a=Lg(s.maxWidth,e,"clientWidth")||Pg,o=Lg(s.maxHeight,e,"clientHeight")||Pg,c=HU(e,t,n);let{width:d,height:h}=c;if(s.boxSizing==="content-box"){const g=zo(s,"border","width"),v=zo(s,"padding");d-=v.width+g.width,h-=v.height+g.height}return d=Math.max(0,d-r.width),h=Math.max(0,i?d/i:h-r.height),d=qh(Math.min(d,a,c.maxWidth)),h=qh(Math.min(h,o,c.maxHeight)),d&&!h&&(h=qh(d/2)),(t!==void 0||n!==void 0)&&i&&c.height&&h>c.height&&(h=c.height,d=qh(Math.floor(h*i))),{width:d,height:h}}function o6(e,t,n){const i=t||1,s=Math.floor(e.height*i),r=Math.floor(e.width*i);e.height=Math.floor(e.height),e.width=Math.floor(e.width);const a=e.canvas;return a.style&&(n||!a.style.height&&!a.style.width)&&(a.style.height=`${e.height}px`,a.style.width=`${e.width}px`),e.currentDevicePixelRatio!==i||a.height!==s||a.width!==r?(e.currentDevicePixelRatio=i,a.height=s,a.width=r,e.ctx.setTransform(i,0,0,i,0,0),!0):!1}const UU=function(){let e=!1;try{const t={get passive(){return e=!0,!1}};Ub()&&(window.addEventListener("test",null,t),window.removeEventListener("test",null,t))}catch{}return e}();function l6(e,t){const n=zU(e,t),i=n&&n.match(/^(\d+)(\.\d+)?px$/);return i?+i[1]:void 0}function po(e,t,n,i){return{x:e.x+n*(t.x-e.x),y:e.y+n*(t.y-e.y)}}function ZU(e,t,n,i){return{x:e.x+n*(t.x-e.x),y:i==="middle"?n<.5?e.y:t.y:i==="after"?n<1?e.y:t.y:n>0?t.y:e.y}}function $U(e,t,n,i){const s={x:e.cp2x,y:e.cp2y},r={x:t.cp1x,y:t.cp1y},a=po(e,s,n),o=po(s,r,n),c=po(r,t,n),d=po(a,o,n),h=po(o,c,n);return po(d,h,n)}const WU=function(e,t){return{x(n){return e+e+t-n},setWidth(n){t=n},textAlign(n){return n==="center"?n:n==="right"?"left":"right"},xPlus(n,i){return n-i},leftForLtr(n,i){return n-i}}},GU=function(){return{x(e){return e},setWidth(e){},textAlign(e){return e},xPlus(e,t){return e+t},leftForLtr(e,t){return e}}};function pc(e,t,n){return e?WU(t,n):GU()}function BN(e,t){let n,i;(t==="ltr"||t==="rtl")&&(n=e.canvas.style,i=[n.getPropertyValue("direction"),n.getPropertyPriority("direction")],n.setProperty("direction",t,"important"),e.prevTextDirection=i)}function VN(e,t){t!==void 0&&(delete e.prevTextDirection,e.canvas.style.setProperty("direction",t[0],t[1]))}function HN(e){return e==="angle"?{between:hf,compare:WF,normalize:ri}:{between:vr,compare:(t,n)=>t-n,normalize:t=>t}}function c6({start:e,end:t,count:n,loop:i,style:s}){return{start:e%n,end:t%n,loop:i&&(t-e+1)%n===0,style:s}}function YU(e,t,n){const{property:i,start:s,end:r}=n,{between:a,normalize:o}=HN(i),c=t.length;let{start:d,end:h,loop:m}=e,g,v;if(m){for(d+=c,h+=c,g=0,v=c;g<v&&a(o(t[d%c][i]),s,r);++g)d--,h--;d%=c,h%=c}return h<d&&(h+=c),{start:d,end:h,loop:m,style:e.style}}function FN(e,t,n){if(!n)return[e];const{property:i,start:s,end:r}=n,a=t.length,{compare:o,between:c,normalize:d}=HN(i),{start:h,end:m,loop:g,style:v}=YU(e,t,n),b=[];let w=!1,M=null,y,S,T;const N=()=>c(s,T,y)&&o(s,T)!==0,k=()=>o(r,y)===0||c(r,T,y),E=()=>w||N(),D=()=>!w||k();for(let O=h,I=h;O<=m;++O)S=t[O%a],!S.skip&&(y=d(S[i]),y!==T&&(w=c(y,s,r),M===null&&E()&&(M=o(y,s)===0?O:I),M!==null&&D()&&(b.push(c6({start:M,end:O,loop:g,count:a,style:v})),M=null),I=O,T=y));return M!==null&&b.push(c6({start:M,end:m,loop:g,count:a,style:v})),b}function UN(e,t){const n=[],i=e.segments;for(let s=0;s<i.length;s++){const r=FN(i[s],e.points,t);r.length&&n.push(...r)}return n}function qU(e,t,n,i){let s=0,r=t-1;if(n&&!i)for(;s<t&&!e[s].skip;)s++;for(;s<t&&e[s].skip;)s++;for(s%=t,n&&(r+=s);r>s&&e[r%t].skip;)r--;return r%=t,{start:s,end:r}}function XU(e,t,n,i){const s=e.length,r=[];let a=t,o=e[t],c;for(c=t+1;c<=n;++c){const d=e[c%s];d.skip||d.stop?o.skip||(i=!1,r.push({start:t%s,end:(c-1)%s,loop:i}),t=a=d.stop?c:null):(a=c,o.skip&&(t=c)),o=d}return a!==null&&r.push({start:t%s,end:a%s,loop:i}),r}function KU(e,t){const n=e.points,i=e.options.spanGaps,s=n.length;if(!s)return[];const r=!!e._loop,{start:a,end:o}=qU(n,s,r,i);if(i===!0)return u6(e,[{start:a,end:o,loop:r}],n,t);const c=o<a?o+s:o,d=!!e._fullLoop&&a===0&&o===s-1;return u6(e,XU(n,a,c,d),n,t)}function u6(e,t,n,i){return!i||!i.setContext||!n?t:QU(e,t,n,i)}function QU(e,t,n,i){const s=e._chart.getContext(),r=d6(e.options),{_datasetIndex:a,options:{spanGaps:o}}=e,c=n.length,d=[];let h=r,m=t[0].start,g=m;function v(b,w,M,y){const S=o?-1:1;if(b!==w){for(b+=c;n[b%c].skip;)b-=S;for(;n[w%c].skip;)w+=S;b%c!==w%c&&(d.push({start:b%c,end:w%c,loop:M,style:y}),h=y,m=w%c)}}for(const b of t){m=o?m:b.start;let w=n[m%c],M;for(g=m+1;g<=b.end;g++){const y=n[g%c];M=d6(i.setContext(Za(s,{type:"segment",p0:w,p1:y,p0DataIndex:(g-1)%c,p1DataIndex:g%c,datasetIndex:a}))),JU(M,h)&&v(m,g-1,b.loop,h),w=y,h=M}m<g-1&&v(m,g-1,b.loop,h)}return d}function d6(e){return{backgroundColor:e.backgroundColor,borderCapStyle:e.borderCapStyle,borderDash:e.borderDash,borderDashOffset:e.borderDashOffset,borderJoinStyle:e.borderJoinStyle,borderWidth:e.borderWidth,borderColor:e.borderColor}}function JU(e,t){if(!t)return!1;const n=[],i=function(s,r){return Ib(r)?(n.includes(r)||n.push(r),n.indexOf(r)):r};return JSON.stringify(e,i)!==JSON.stringify(t,i)}/*!
 * Chart.js v4.4.3
 * https://www.chartjs.org
 * (c) 2024 Chart.js Contributors
 * Released under the MIT License
 */class eZ{constructor(){this._request=null,this._charts=new Map,this._running=!1,this._lastDate=void 0}_notify(t,n,i,s){const r=n.listeners[s],a=n.duration;r.forEach(o=>o({chart:t,initial:n.initial,numSteps:a,currentStep:Math.min(i-n.start,a)}))}_refresh(){this._request||(this._running=!0,this._request=kN.call(window,()=>{this._update(),this._request=null,this._running&&this._refresh()}))}_update(t=Date.now()){let n=0;this._charts.forEach((i,s)=>{if(!i.running||!i.items.length)return;const r=i.items;let a=r.length-1,o=!1,c;for(;a>=0;--a)c=r[a],c._active?(c._total>i.duration&&(i.duration=c._total),c.tick(t),o=!0):(r[a]=r[r.length-1],r.pop());o&&(s.draw(),this._notify(s,i,t,"progress")),r.length||(i.running=!1,this._notify(s,i,t,"complete"),i.initial=!1),n+=r.length}),this._lastDate=t,n===0&&(this._running=!1)}_getAnims(t){const n=this._charts;let i=n.get(t);return i||(i={running:!1,initial:!0,items:[],listeners:{complete:[],progress:[]}},n.set(t,i)),i}listen(t,n,i){this._getAnims(t).listeners[n].push(i)}add(t,n){!n||!n.length||this._getAnims(t).items.push(...n)}has(t){return this._getAnims(t).items.length>0}start(t){const n=this._charts.get(t);n&&(n.running=!0,n.start=Date.now(),n.duration=n.items.reduce((i,s)=>Math.max(i,s._duration),0),this._refresh())}running(t){if(!this._running)return!1;const n=this._charts.get(t);return!(!n||!n.running||!n.items.length)}stop(t){const n=this._charts.get(t);if(!n||!n.items.length)return;const i=n.items;let s=i.length-1;for(;s>=0;--s)i[s].cancel();n.items=[],this._notify(t,n,Date.now(),"complete")}remove(t){return this._charts.delete(t)}}var ar=new eZ;const f6="transparent",tZ={boolean(e,t,n){return n>.5?t:e},color(e,t,n){const i=n6(e||f6),s=i.valid&&n6(t||f6);return s&&s.valid?s.mix(i,n).hexString():t},number(e,t,n){return e+(t-e)*n}};class nZ{constructor(t,n,i,s){const r=n[i];s=Gh([t.to,s,r,t.from]);const a=Gh([t.from,r,s]);this._active=!0,this._fn=t.fn||tZ[t.type||typeof a],this._easing=Vd[t.easing]||Vd.linear,this._start=Math.floor(Date.now()+(t.delay||0)),this._duration=this._total=Math.floor(t.duration),this._loop=!!t.loop,this._target=n,this._prop=i,this._from=a,this._to=s,this._promises=void 0}active(){return this._active}update(t,n,i){if(this._active){this._notify(!1);const s=this._target[this._prop],r=i-this._start,a=this._duration-r;this._start=i,this._duration=Math.floor(Math.max(a,t.duration)),this._total+=r,this._loop=!!t.loop,this._to=Gh([t.to,n,s,t.from]),this._from=Gh([t.from,s,n])}}cancel(){this._active&&(this.tick(Date.now()),this._active=!1,this._notify(!1))}tick(t){const n=t-this._start,i=this._duration,s=this._prop,r=this._from,a=this._loop,o=this._to;let c;if(this._active=r!==o&&(a||n<i),!this._active){this._target[s]=o,this._notify(!0);return}if(n<0){this._target[s]=r;return}c=n/i%2,c=a&&c>1?2-c:c,c=this._easing(Math.min(1,Math.max(0,c))),this._target[s]=this._fn(r,o,c)}wait(){const t=this._promises||(this._promises=[]);return new Promise((n,i)=>{t.push({res:n,rej:i})})}_notify(t){const n=t?"res":"rej",i=this._promises||[];for(let s=0;s<i.length;s++)i[s][n]()}}class ZN{constructor(t,n){this._chart=t,this._properties=new Map,this.configure(n)}configure(t){if(!Ge(t))return;const n=Object.keys(Ht.animation),i=this._properties;Object.getOwnPropertyNames(t).forEach(s=>{const r=t[s];if(!Ge(r))return;const a={};for(const o of n)a[o]=r[o];(Nt(r.properties)&&r.properties||[s]).forEach(o=>{(o===s||!i.has(o))&&i.set(o,a)})})}_animateOptions(t,n){const i=n.options,s=sZ(t,i);if(!s)return[];const r=this._createAnimations(s,i);return i.$shared&&iZ(t.options.$animations,i).then(()=>{t.options=i},()=>{}),r}_createAnimations(t,n){const i=this._properties,s=[],r=t.$animations||(t.$animations={}),a=Object.keys(n),o=Date.now();let c;for(c=a.length-1;c>=0;--c){const d=a[c];if(d.charAt(0)==="$")continue;if(d==="options"){s.push(...this._animateOptions(t,n));continue}const h=n[d];let m=r[d];const g=i.get(d);if(m)if(g&&m.active()){m.update(g,h,o);continue}else m.cancel();if(!g||!g.duration){t[d]=h;continue}r[d]=m=new nZ(g,t,d,h),s.push(m)}return s}update(t,n){if(this._properties.size===0){Object.assign(t,n);return}const i=this._createAnimations(t,n);if(i.length)return ar.add(this._chart,i),!0}}function iZ(e,t){const n=[],i=Object.keys(t);for(let s=0;s<i.length;s++){const r=e[i[s]];r&&r.active()&&n.push(r.wait())}return Promise.all(n)}function sZ(e,t){if(!t)return;let n=e.options;if(!n){e.options=t;return}return n.$shared&&(e.options=n=Object.assign({},n,{$shared:!1,$animations:{}})),n}function h6(e,t){const n=e&&e.options||{},i=n.reverse,s=n.min===void 0?t:0,r=n.max===void 0?t:0;return{start:i?r:s,end:i?s:r}}function rZ(e,t,n){if(n===!1)return!1;const i=h6(e,n),s=h6(t,n);return{top:s.end,right:i.end,bottom:s.start,left:i.start}}function aZ(e){let t,n,i,s;return Ge(e)?(t=e.top,n=e.right,i=e.bottom,s=e.left):t=n=i=s=e,{top:t,right:n,bottom:i,left:s,disabled:e===!1}}function $N(e,t){const n=[],i=e._getSortedDatasetMetas(t);let s,r;for(s=0,r=i.length;s<r;++s)n.push(i[s].index);return n}function m6(e,t,n,i={}){const s=e.keys,r=i.mode==="single";let a,o,c,d;if(t!==null){for(a=0,o=s.length;a<o;++a){if(c=+s[a],c===n){if(i.all)continue;break}d=e.values[c],Vt(d)&&(r||t===0||Es(t)===Es(d))&&(t+=d)}return t}}function oZ(e,t){const{iScale:n,vScale:i}=t,s=n.axis==="x"?"x":"y",r=i.axis==="x"?"x":"y",a=Object.keys(e),o=new Array(a.length);let c,d,h;for(c=0,d=a.length;c<d;++c)h=a[c],o[c]={[s]:h,[r]:e[h]};return o}function g6(e,t){const n=e&&e.options.stacked;return n||n===void 0&&t.stack!==void 0}function lZ(e,t,n){return`${e.id}.${t.id}.${n.stack||n.type}`}function cZ(e){const{min:t,max:n,minDefined:i,maxDefined:s}=e.getUserBounds();return{min:i?t:Number.NEGATIVE_INFINITY,max:s?n:Number.POSITIVE_INFINITY}}function uZ(e,t,n){const i=e[t]||(e[t]={});return i[n]||(i[n]={})}function p6(e,t,n,i){for(const s of t.getMatchingVisibleMetas(i).reverse()){const r=e[s.index];if(n&&r>0||!n&&r<0)return s.index}return null}function v6(e,t){const{chart:n,_cachedMeta:i}=e,s=n._stacks||(n._stacks={}),{iScale:r,vScale:a,index:o}=i,c=r.axis,d=a.axis,h=lZ(r,a,i),m=t.length;let g;for(let v=0;v<m;++v){const b=t[v],{[c]:w,[d]:M}=b,y=b._stacks||(b._stacks={});g=y[d]=uZ(s,h,w),g[o]=M,g._top=p6(g,a,!0,i.type),g._bottom=p6(g,a,!1,i.type);const S=g._visualValues||(g._visualValues={});S[o]=M}}function yv(e,t){const n=e.scales;return Object.keys(n).filter(i=>n[i].axis===t).shift()}function dZ(e,t){return Za(e,{active:!1,dataset:void 0,datasetIndex:t,index:t,mode:"default",type:"dataset"})}function fZ(e,t,n){return Za(e,{active:!1,dataIndex:t,parsed:void 0,raw:void 0,element:n,index:t,mode:"default",type:"data"})}function Zu(e,t){const n=e.controller.index,i=e.vScale&&e.vScale.axis;if(i){t=t||e._parsed;for(const s of t){const r=s._stacks;if(!r||r[i]===void 0||r[i][n]===void 0)return;delete r[i][n],r[i]._visualValues!==void 0&&r[i]._visualValues[n]!==void 0&&delete r[i]._visualValues[n]}}}const _v=e=>e==="reset"||e==="none",x6=(e,t)=>t?e:Object.assign({},e),hZ=(e,t,n)=>e&&!t.hidden&&t._stacked&&{keys:$N(n,!0),values:null};class Io{constructor(t,n){this.chart=t,this._ctx=t.ctx,this.index=n,this._cachedDataOpts={},this._cachedMeta=this.getMeta(),this._type=this._cachedMeta.type,this.options=void 0,this._parsing=!1,this._data=void 0,this._objectData=void 0,this._sharedOptions=void 0,this._drawStart=void 0,this._drawCount=void 0,this.enableOptionSharing=!1,this.supportsDecimation=!1,this.$context=void 0,this._syncList=[],this.datasetElementType=new.target.datasetElementType,this.dataElementType=new.target.dataElementType,this.initialize()}initialize(){const t=this._cachedMeta;this.configure(),this.linkScales(),t._stacked=g6(t.vScale,t),this.addElements(),this.options.fill&&!this.chart.isPluginEnabled("filler")&&console.warn("Tried to use the 'fill' option without the 'Filler' plugin enabled. Please import and register the 'Filler' plugin and make sure it is not disabled in the options")}updateIndex(t){this.index!==t&&Zu(this._cachedMeta),this.index=t}linkScales(){const t=this.chart,n=this._cachedMeta,i=this.getDataset(),s=(m,g,v,b)=>m==="x"?g:m==="r"?b:v,r=n.xAxisID=Fe(i.xAxisID,yv(t,"x")),a=n.yAxisID=Fe(i.yAxisID,yv(t,"y")),o=n.rAxisID=Fe(i.rAxisID,yv(t,"r")),c=n.indexAxis,d=n.iAxisID=s(c,r,a,o),h=n.vAxisID=s(c,a,r,o);n.xScale=this.getScaleForId(r),n.yScale=this.getScaleForId(a),n.rScale=this.getScaleForId(o),n.iScale=this.getScaleForId(d),n.vScale=this.getScaleForId(h)}getDataset(){return this.chart.data.datasets[this.index]}getMeta(){return this.chart.getDatasetMeta(this.index)}getScaleForId(t){return this.chart.scales[t]}_getOtherScale(t){const n=this._cachedMeta;return t===n.iScale?n.vScale:n.iScale}reset(){this._update("reset")}_destroy(){const t=this._cachedMeta;this._data&&JS(this._data,this),t._stacked&&Zu(t)}_dataCheck(){const t=this.getDataset(),n=t.data||(t.data=[]),i=this._data;if(Ge(n)){const s=this._cachedMeta;this._data=oZ(n,s)}else if(i!==n){if(i){JS(i,this);const s=this._cachedMeta;Zu(s),s._parsed=[]}n&&Object.isExtensible(n)&&XF(n,this),this._syncList=[],this._data=n}}addElements(){const t=this._cachedMeta;this._dataCheck(),this.datasetElementType&&(t.dataset=new this.datasetElementType)}buildOrUpdateElements(t){const n=this._cachedMeta,i=this.getDataset();let s=!1;this._dataCheck();const r=n._stacked;n._stacked=g6(n.vScale,n),n.stack!==i.stack&&(s=!0,Zu(n),n.stack=i.stack),this._resyncElements(t),(s||r!==n._stacked)&&v6(this,n._parsed)}configure(){const t=this.chart.config,n=t.datasetScopeKeys(this._type),i=t.getOptionScopes(this.getDataset(),n,!0);this.options=t.createResolver(i,this.getContext()),this._parsing=this.options.parsing,this._cachedDataOpts={}}parse(t,n){const{_cachedMeta:i,_data:s}=this,{iScale:r,_stacked:a}=i,o=r.axis;let c=t===0&&n===s.length?!0:i._sorted,d=t>0&&i._parsed[t-1],h,m,g;if(this._parsing===!1)i._parsed=s,i._sorted=!0,g=s;else{Nt(s[t])?g=this.parseArrayData(i,s,t,n):Ge(s[t])?g=this.parseObjectData(i,s,t,n):g=this.parsePrimitiveData(i,s,t,n);const v=()=>m[o]===null||d&&m[o]<d[o];for(h=0;h<n;++h)i._parsed[h+t]=m=g[h],c&&(v()&&(c=!1),d=m);i._sorted=c}a&&v6(this,g)}parsePrimitiveData(t,n,i,s){const{iScale:r,vScale:a}=t,o=r.axis,c=a.axis,d=r.getLabels(),h=r===a,m=new Array(s);let g,v,b;for(g=0,v=s;g<v;++g)b=g+i,m[g]={[o]:h||r.parse(d[b],b),[c]:a.parse(n[b],b)};return m}parseArrayData(t,n,i,s){const{xScale:r,yScale:a}=t,o=new Array(s);let c,d,h,m;for(c=0,d=s;c<d;++c)h=c+i,m=n[h],o[c]={x:r.parse(m[0],h),y:a.parse(m[1],h)};return o}parseObjectData(t,n,i,s){const{xScale:r,yScale:a}=t,{xAxisKey:o="x",yAxisKey:c="y"}=this._parsing,d=new Array(s);let h,m,g,v;for(h=0,m=s;h<m;++h)g=h+i,v=n[g],d[h]={x:r.parse($o(v,o),g),y:a.parse($o(v,c),g)};return d}getParsed(t){return this._cachedMeta._parsed[t]}getDataElement(t){return this._cachedMeta.data[t]}applyStack(t,n,i){const s=this.chart,r=this._cachedMeta,a=n[t.axis],o={keys:$N(s,!0),values:n._stacks[t.axis]._visualValues};return m6(o,a,r.index,{mode:i})}updateRangeFromParsed(t,n,i,s){const r=i[n.axis];let a=r===null?NaN:r;const o=s&&i._stacks[n.axis];s&&o&&(s.values=o,a=m6(s,r,this._cachedMeta.index)),t.min=Math.min(t.min,a),t.max=Math.max(t.max,a)}getMinMax(t,n){const i=this._cachedMeta,s=i._parsed,r=i._sorted&&t===i.iScale,a=s.length,o=this._getOtherScale(t),c=hZ(n,i,this.chart),d={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY},{min:h,max:m}=cZ(o);let g,v;function b(){v=s[g];const w=v[o.axis];return!Vt(v[t.axis])||h>w||m<w}for(g=0;g<a&&!(!b()&&(this.updateRangeFromParsed(d,t,v,c),r));++g);if(r){for(g=a-1;g>=0;--g)if(!b()){this.updateRangeFromParsed(d,t,v,c);break}}return d}getAllParsedValues(t){const n=this._cachedMeta._parsed,i=[];let s,r,a;for(s=0,r=n.length;s<r;++s)a=n[s][t.axis],Vt(a)&&i.push(a);return i}getMaxOverflow(){return!1}getLabelAndValue(t){const n=this._cachedMeta,i=n.iScale,s=n.vScale,r=this.getParsed(t);return{label:i?""+i.getLabelForValue(r[i.axis]):"",value:s?""+s.getLabelForValue(r[s.axis]):""}}_update(t){const n=this._cachedMeta;this.update(t||"default"),n._clip=aZ(Fe(this.options.clip,rZ(n.xScale,n.yScale,this.getMaxOverflow())))}update(t){}draw(){const t=this._ctx,n=this.chart,i=this._cachedMeta,s=i.data||[],r=n.chartArea,a=[],o=this._drawStart||0,c=this._drawCount||s.length-o,d=this.options.drawActiveElementsOnTop;let h;for(i.dataset&&i.dataset.draw(t,r,o,c),h=o;h<o+c;++h){const m=s[h];m.hidden||(m.active&&d?a.push(m):m.draw(t,r))}for(h=0;h<a.length;++h)a[h].draw(t,r)}getStyle(t,n){const i=n?"active":"default";return t===void 0&&this._cachedMeta.dataset?this.resolveDatasetElementOptions(i):this.resolveDataElementOptions(t||0,i)}getContext(t,n,i){const s=this.getDataset();let r;if(t>=0&&t<this._cachedMeta.data.length){const a=this._cachedMeta.data[t];r=a.$context||(a.$context=fZ(this.getContext(),t,a)),r.parsed=this.getParsed(t),r.raw=s.data[t],r.index=r.dataIndex=t}else r=this.$context||(this.$context=dZ(this.chart.getContext(),this.index)),r.dataset=s,r.index=r.datasetIndex=this.index;return r.active=!!n,r.mode=i,r}resolveDatasetElementOptions(t){return this._resolveElementOptions(this.datasetElementType.id,t)}resolveDataElementOptions(t,n){return this._resolveElementOptions(this.dataElementType.id,n,t)}_resolveElementOptions(t,n="default",i){const s=n==="active",r=this._cachedDataOpts,a=t+"-"+n,o=r[a],c=this.enableOptionSharing&&df(i);if(o)return x6(o,c);const d=this.chart.config,h=d.datasetElementScopeKeys(this._type,t),m=s?[`${t}Hover`,"hover",t,""]:[t,""],g=d.getOptionScopes(this.getDataset(),h),v=Object.keys(Ht.elements[t]),b=()=>this.getContext(i,s,n),w=d.resolveNamedOptions(g,v,b,m);return w.$shared&&(w.$shared=c,r[a]=Object.freeze(x6(w,c))),w}_resolveAnimations(t,n,i){const s=this.chart,r=this._cachedDataOpts,a=`animation-${n}`,o=r[a];if(o)return o;let c;if(s.options.animation!==!1){const h=this.chart.config,m=h.datasetAnimationScopeKeys(this._type,n),g=h.getOptionScopes(this.getDataset(),m);c=h.createResolver(g,this.getContext(t,i,n))}const d=new ZN(s,c&&c.animations);return c&&c._cacheable&&(r[a]=Object.freeze(d)),d}getSharedOptions(t){if(t.$shared)return this._sharedOptions||(this._sharedOptions=Object.assign({},t))}includeOptions(t,n){return!n||_v(t)||this.chart._animationsDisabled}_getSharedOptions(t,n){const i=this.resolveDataElementOptions(t,n),s=this._sharedOptions,r=this.getSharedOptions(i),a=this.includeOptions(n,r)||r!==s;return this.updateSharedOptions(r,n,i),{sharedOptions:r,includeOptions:a}}updateElement(t,n,i,s){_v(s)?Object.assign(t,i):this._resolveAnimations(n,s).update(t,i)}updateSharedOptions(t,n,i){t&&!_v(n)&&this._resolveAnimations(void 0,n).update(t,i)}_setStyle(t,n,i,s){t.active=s;const r=this.getStyle(n,s);this._resolveAnimations(n,i,s).update(t,{options:!s&&this.getSharedOptions(r)||r})}removeHoverStyle(t,n,i){this._setStyle(t,i,"active",!1)}setHoverStyle(t,n,i){this._setStyle(t,i,"active",!0)}_removeDatasetHoverStyle(){const t=this._cachedMeta.dataset;t&&this._setStyle(t,void 0,"active",!1)}_setDatasetHoverStyle(){const t=this._cachedMeta.dataset;t&&this._setStyle(t,void 0,"active",!0)}_resyncElements(t){const n=this._data,i=this._cachedMeta.data;for(const[o,c,d]of this._syncList)this[o](c,d);this._syncList=[];const s=i.length,r=n.length,a=Math.min(r,s);a&&this.parse(0,a),r>s?this._insertElements(s,r-s,t):r<s&&this._removeElements(r,s-r)}_insertElements(t,n,i=!0){const s=this._cachedMeta,r=s.data,a=t+n;let o;const c=d=>{for(d.length+=n,o=d.length-1;o>=a;o--)d[o]=d[o-n]};for(c(r),o=t;o<a;++o)r[o]=new this.dataElementType;this._parsing&&c(s._parsed),this.parse(t,n),i&&this.updateElements(r,t,n,"reset")}updateElements(t,n,i,s){}_removeElements(t,n){const i=this._cachedMeta;if(this._parsing){const s=i._parsed.splice(t,n);i._stacked&&Zu(i,s)}i.data.splice(t,n)}_sync(t){if(this._parsing)this._syncList.push(t);else{const[n,i,s]=t;this[n](i,s)}this.chart._dataChanges.push([this.index,...t])}_onDataPush(){const t=arguments.length;this._sync(["_insertElements",this.getDataset().data.length-t,t])}_onDataPop(){this._sync(["_removeElements",this._cachedMeta.data.length-1,1])}_onDataShift(){this._sync(["_removeElements",0,1])}_onDataSplice(t,n){n&&this._sync(["_removeElements",t,n]);const i=arguments.length-2;i&&this._sync(["_insertElements",t,i])}_onDataUnshift(){this._sync(["_insertElements",0,arguments.length])}}ge(Io,"defaults",{}),ge(Io,"datasetElementType",null),ge(Io,"dataElementType",null);function mZ(e,t){if(!e._cache.$bar){const n=e.getMatchingVisibleMetas(t);let i=[];for(let s=0,r=n.length;s<r;s++)i=i.concat(n[s].controller.getAllParsedValues(e));e._cache.$bar=NN(i.sort((s,r)=>s-r))}return e._cache.$bar}function gZ(e){const t=e.iScale,n=mZ(t,e.type);let i=t._length,s,r,a,o;const c=()=>{a===32767||a===-32768||(df(o)&&(i=Math.min(i,Math.abs(a-o)||i)),o=a)};for(s=0,r=n.length;s<r;++s)a=t.getPixelForValue(n[s]),c();for(o=void 0,s=0,r=t.ticks.length;s<r;++s)a=t.getPixelForTick(s),c();return i}function pZ(e,t,n,i){const s=n.barThickness;let r,a;return ct(s)?(r=t.min*n.categoryPercentage,a=n.barPercentage):(r=s*i,a=1),{chunk:r/i,ratio:a,start:t.pixels[e]-r/2}}function vZ(e,t,n,i){const s=t.pixels,r=s[e];let a=e>0?s[e-1]:null,o=e<s.length-1?s[e+1]:null;const c=n.categoryPercentage;a===null&&(a=r-(o===null?t.end-t.start:o-r)),o===null&&(o=r+r-a);const d=r-(r-Math.min(a,o))/2*c;return{chunk:Math.abs(o-a)/2*c/i,ratio:n.barPercentage,start:d}}function xZ(e,t,n,i){const s=n.parse(e[0],i),r=n.parse(e[1],i),a=Math.min(s,r),o=Math.max(s,r);let c=a,d=o;Math.abs(a)>Math.abs(o)&&(c=o,d=a),t[n.axis]=d,t._custom={barStart:c,barEnd:d,start:s,end:r,min:a,max:o}}function WN(e,t,n,i){return Nt(e)?xZ(e,t,n,i):t[n.axis]=n.parse(e,i),t}function y6(e,t,n,i){const s=e.iScale,r=e.vScale,a=s.getLabels(),o=s===r,c=[];let d,h,m,g;for(d=n,h=n+i;d<h;++d)g=t[d],m={},m[s.axis]=o||s.parse(a[d],d),c.push(WN(g,m,r,d));return c}function bv(e){return e&&e.barStart!==void 0&&e.barEnd!==void 0}function yZ(e,t,n){return e!==0?Es(e):(t.isHorizontal()?1:-1)*(t.min>=n?1:-1)}function _Z(e){let t,n,i,s,r;return e.horizontal?(t=e.base>e.x,n="left",i="right"):(t=e.base<e.y,n="bottom",i="top"),t?(s="end",r="start"):(s="start",r="end"),{start:n,end:i,reverse:t,top:s,bottom:r}}function bZ(e,t,n,i){let s=t.borderSkipped;const r={};if(!s){e.borderSkipped=r;return}if(s===!0){e.borderSkipped={top:!0,right:!0,bottom:!0,left:!0};return}const{start:a,end:o,reverse:c,top:d,bottom:h}=_Z(e);s==="middle"&&n&&(e.enableBorderRadius=!0,(n._top||0)===i?s=d:(n._bottom||0)===i?s=h:(r[_6(h,a,o,c)]=!0,s=d)),r[_6(s,a,o,c)]=!0,e.borderSkipped=r}function _6(e,t,n,i){return i?(e=wZ(e,t,n),e=b6(e,n,t)):e=b6(e,t,n),e}function wZ(e,t,n){return e===t?n:e===n?t:e}function b6(e,t,n){return e==="start"?t:e==="end"?n:e}function SZ(e,{inflateAmount:t},n){e.inflateAmount=t==="auto"?n===1?.33:0:t}class Lm extends Io{parsePrimitiveData(t,n,i,s){return y6(t,n,i,s)}parseArrayData(t,n,i,s){return y6(t,n,i,s)}parseObjectData(t,n,i,s){const{iScale:r,vScale:a}=t,{xAxisKey:o="x",yAxisKey:c="y"}=this._parsing,d=r.axis==="x"?o:c,h=a.axis==="x"?o:c,m=[];let g,v,b,w;for(g=i,v=i+s;g<v;++g)w=n[g],b={},b[r.axis]=r.parse($o(w,d),g),m.push(WN($o(w,h),b,a,g));return m}updateRangeFromParsed(t,n,i,s){super.updateRangeFromParsed(t,n,i,s);const r=i._custom;r&&n===this._cachedMeta.vScale&&(t.min=Math.min(t.min,r.min),t.max=Math.max(t.max,r.max))}getMaxOverflow(){return 0}getLabelAndValue(t){const n=this._cachedMeta,{iScale:i,vScale:s}=n,r=this.getParsed(t),a=r._custom,o=bv(a)?"["+a.start+", "+a.end+"]":""+s.getLabelForValue(r[s.axis]);return{label:""+i.getLabelForValue(r[i.axis]),value:o}}initialize(){this.enableOptionSharing=!0,super.initialize();const t=this._cachedMeta;t.stack=this.getDataset().stack}update(t){const n=this._cachedMeta;this.updateElements(n.data,0,n.data.length,t)}updateElements(t,n,i,s){const r=s==="reset",{index:a,_cachedMeta:{vScale:o}}=this,c=o.getBasePixel(),d=o.isHorizontal(),h=this._getRuler(),{sharedOptions:m,includeOptions:g}=this._getSharedOptions(n,s);for(let v=n;v<n+i;v++){const b=this.getParsed(v),w=r||ct(b[o.axis])?{base:c,head:c}:this._calculateBarValuePixels(v),M=this._calculateBarIndexPixels(v,h),y=(b._stacks||{})[o.axis],S={horizontal:d,base:w.base,enableBorderRadius:!y||bv(b._custom)||a===y._top||a===y._bottom,x:d?w.head:M.center,y:d?M.center:w.head,height:d?M.size:Math.abs(w.size),width:d?Math.abs(w.size):M.size};g&&(S.options=m||this.resolveDataElementOptions(v,t[v].active?"active":s));const T=S.options||t[v].options;bZ(S,T,y,a),SZ(S,T,h.ratio),this.updateElement(t[v],v,S,s)}}_getStacks(t,n){const{iScale:i}=this._cachedMeta,s=i.getMatchingVisibleMetas(this._type).filter(c=>c.controller.options.grouped),r=i.options.stacked,a=[],o=c=>{const d=c.controller.getParsed(n),h=d&&d[c.vScale.axis];if(ct(h)||isNaN(h))return!0};for(const c of s)if(!(n!==void 0&&o(c))&&((r===!1||a.indexOf(c.stack)===-1||r===void 0&&c.stack===void 0)&&a.push(c.stack),c.index===t))break;return a.length||a.push(void 0),a}_getStackCount(t){return this._getStacks(void 0,t).length}_getStackIndex(t,n,i){const s=this._getStacks(t,i),r=n!==void 0?s.indexOf(n):-1;return r===-1?s.length-1:r}_getRuler(){const t=this.options,n=this._cachedMeta,i=n.iScale,s=[];let r,a;for(r=0,a=n.data.length;r<a;++r)s.push(i.getPixelForValue(this.getParsed(r)[i.axis],r));const o=t.barThickness;return{min:o||gZ(n),pixels:s,start:i._startPixel,end:i._endPixel,stackCount:this._getStackCount(),scale:i,grouped:t.grouped,ratio:o?1:t.categoryPercentage*t.barPercentage}}_calculateBarValuePixels(t){const{_cachedMeta:{vScale:n,_stacked:i,index:s},options:{base:r,minBarLength:a}}=this,o=r||0,c=this.getParsed(t),d=c._custom,h=bv(d);let m=c[n.axis],g=0,v=i?this.applyStack(n,c,i):m,b,w;v!==m&&(g=v-m,v=m),h&&(m=d.barStart,v=d.barEnd-d.barStart,m!==0&&Es(m)!==Es(d.barEnd)&&(g=0),g+=m);const M=!ct(r)&&!h?r:g;let y=n.getPixelForValue(M);if(this.chart.getDataVisibility(t)?b=n.getPixelForValue(g+v):b=y,w=b-y,Math.abs(w)<a){w=yZ(w,n,o)*a,m===o&&(y-=w/2);const S=n.getPixelForDecimal(0),T=n.getPixelForDecimal(1),N=Math.min(S,T),k=Math.max(S,T);y=Math.max(Math.min(y,k),N),b=y+w,i&&!h&&(c._stacks[n.axis]._visualValues[s]=n.getValueForPixel(b)-n.getValueForPixel(y))}if(y===n.getPixelForValue(o)){const S=Es(w)*n.getLineWidthForValue(o)/2;y+=S,w-=S}return{size:w,base:y,head:b,center:b+w/2}}_calculateBarIndexPixels(t,n){const i=n.scale,s=this.options,r=s.skipNull,a=Fe(s.maxBarThickness,1/0);let o,c;if(n.grouped){const d=r?this._getStackCount(t):n.stackCount,h=s.barThickness==="flex"?vZ(t,n,s,d):pZ(t,n,s,d),m=this._getStackIndex(this.index,this._cachedMeta.stack,r?t:void 0);o=h.start+h.chunk*m+h.chunk/2,c=Math.min(a,h.chunk*h.ratio)}else o=i.getPixelForValue(this.getParsed(t)[i.axis],t),c=Math.min(a,n.min*n.ratio);return{base:o-c/2,head:o+c/2,center:o,size:c}}draw(){const t=this._cachedMeta,n=t.vScale,i=t.data,s=i.length;let r=0;for(;r<s;++r)this.getParsed(r)[n.axis]!==null&&!i[r].hidden&&i[r].draw(this._ctx)}}ge(Lm,"id","bar"),ge(Lm,"defaults",{datasetElementType:!1,dataElementType:"bar",categoryPercentage:.8,barPercentage:.9,grouped:!0,animations:{numbers:{type:"number",properties:["x","y","base","width","height"]}}}),ge(Lm,"overrides",{scales:{_index_:{type:"category",offset:!0,grid:{offset:!0}},_value_:{type:"linear",beginAtZero:!0}}});function CZ(e,t,n){let i=1,s=1,r=0,a=0;if(t<bt){const o=e,c=o+t,d=Math.cos(o),h=Math.sin(o),m=Math.cos(c),g=Math.sin(c),v=(T,N,k)=>hf(T,o,c,!0)?1:Math.max(N,N*n,k,k*n),b=(T,N,k)=>hf(T,o,c,!0)?-1:Math.min(N,N*n,k,k*n),w=v(0,d,m),M=v($t,h,g),y=b(Et,d,m),S=b(Et+$t,h,g);i=(w-y)/2,s=(M-S)/2,r=-(w+y)/2,a=-(M+S)/2}return{ratioX:i,ratioY:s,offsetX:r,offsetY:a}}class cd extends Io{constructor(t,n){super(t,n),this.enableOptionSharing=!0,this.innerRadius=void 0,this.outerRadius=void 0,this.offsetX=void 0,this.offsetY=void 0}linkScales(){}parse(t,n){const i=this.getDataset().data,s=this._cachedMeta;if(this._parsing===!1)s._parsed=i;else{let r=c=>+i[c];if(Ge(i[t])){const{key:c="value"}=this._parsing;r=d=>+$o(i[d],c)}let a,o;for(a=t,o=t+n;a<o;++a)s._parsed[a]=r(a)}}_getRotation(){return Cs(this.options.rotation-90)}_getCircumference(){return Cs(this.options.circumference)}_getRotationExtents(){let t=bt,n=-bt;for(let i=0;i<this.chart.data.datasets.length;++i)if(this.chart.isDatasetVisible(i)&&this.chart.getDatasetMeta(i).type===this._type){const s=this.chart.getDatasetMeta(i).controller,r=s._getRotation(),a=s._getCircumference();t=Math.min(t,r),n=Math.max(n,r+a)}return{rotation:t,circumference:n-t}}update(t){const n=this.chart,{chartArea:i}=n,s=this._cachedMeta,r=s.data,a=this.getMaxBorderWidth()+this.getMaxOffset(r)+this.options.spacing,o=Math.max((Math.min(i.width,i.height)-a)/2,0),c=Math.min(LF(this.options.cutout,o),1),d=this._getRingWeight(this.index),{circumference:h,rotation:m}=this._getRotationExtents(),{ratioX:g,ratioY:v,offsetX:b,offsetY:w}=CZ(m,h,c),M=(i.width-a)/g,y=(i.height-a)/v,S=Math.max(Math.min(M,y)/2,0),T=SN(this.options.radius,S),N=Math.max(T*c,0),k=(T-N)/this._getVisibleDatasetWeightTotal();this.offsetX=b*T,this.offsetY=w*T,s.total=this.calculateTotal(),this.outerRadius=T-k*this._getRingWeightOffset(this.index),this.innerRadius=Math.max(this.outerRadius-k*d,0),this.updateElements(r,0,r.length,t)}_circumference(t,n){const i=this.options,s=this._cachedMeta,r=this._getCircumference();return n&&i.animation.animateRotate||!this.chart.getDataVisibility(t)||s._parsed[t]===null||s.data[t].hidden?0:this.calculateCircumference(s._parsed[t]*r/bt)}updateElements(t,n,i,s){const r=s==="reset",a=this.chart,o=a.chartArea,d=a.options.animation,h=(o.left+o.right)/2,m=(o.top+o.bottom)/2,g=r&&d.animateScale,v=g?0:this.innerRadius,b=g?0:this.outerRadius,{sharedOptions:w,includeOptions:M}=this._getSharedOptions(n,s);let y=this._getRotation(),S;for(S=0;S<n;++S)y+=this._circumference(S,r);for(S=n;S<n+i;++S){const T=this._circumference(S,r),N=t[S],k={x:h+this.offsetX,y:m+this.offsetY,startAngle:y,endAngle:y+T,circumference:T,outerRadius:b,innerRadius:v};M&&(k.options=w||this.resolveDataElementOptions(S,N.active?"active":s)),y+=T,this.updateElement(N,S,k,s)}}calculateTotal(){const t=this._cachedMeta,n=t.data;let i=0,s;for(s=0;s<n.length;s++){const r=t._parsed[s];r!==null&&!isNaN(r)&&this.chart.getDataVisibility(s)&&!n[s].hidden&&(i+=Math.abs(r))}return i}calculateCircumference(t){const n=this._cachedMeta.total;return n>0&&!isNaN(t)?bt*(Math.abs(t)/n):0}getLabelAndValue(t){const n=this._cachedMeta,i=this.chart,s=i.data.labels||[],r=qp(n._parsed[t],i.options.locale);return{label:s[t]||"",value:r}}getMaxBorderWidth(t){let n=0;const i=this.chart;let s,r,a,o,c;if(!t){for(s=0,r=i.data.datasets.length;s<r;++s)if(i.isDatasetVisible(s)){a=i.getDatasetMeta(s),t=a.data,o=a.controller;break}}if(!t)return 0;for(s=0,r=t.length;s<r;++s)c=o.resolveDataElementOptions(s),c.borderAlign!=="inner"&&(n=Math.max(n,c.borderWidth||0,c.hoverBorderWidth||0));return n}getMaxOffset(t){let n=0;for(let i=0,s=t.length;i<s;++i){const r=this.resolveDataElementOptions(i);n=Math.max(n,r.offset||0,r.hoverOffset||0)}return n}_getRingWeightOffset(t){let n=0;for(let i=0;i<t;++i)this.chart.isDatasetVisible(i)&&(n+=this._getRingWeight(i));return n}_getRingWeight(t){return Math.max(Fe(this.chart.data.datasets[t].weight,1),0)}_getVisibleDatasetWeightTotal(){return this._getRingWeightOffset(this.chart.data.datasets.length)||1}}ge(cd,"id","doughnut"),ge(cd,"defaults",{datasetElementType:!1,dataElementType:"arc",animation:{animateRotate:!0,animateScale:!1},animations:{numbers:{type:"number",properties:["circumference","endAngle","innerRadius","outerRadius","startAngle","x","y","offset","borderWidth","spacing"]}},cutout:"50%",rotation:0,circumference:360,radius:"100%",spacing:0,indexAxis:"r"}),ge(cd,"descriptors",{_scriptable:t=>t!=="spacing",_indexable:t=>t!=="spacing"&&!t.startsWith("borderDash")&&!t.startsWith("hoverBorderDash")}),ge(cd,"overrides",{aspectRatio:1,plugins:{legend:{labels:{generateLabels(t){const n=t.data;if(n.labels.length&&n.datasets.length){const{labels:{pointStyle:i,color:s}}=t.legend.options;return n.labels.map((r,a)=>{const c=t.getDatasetMeta(0).controller.getStyle(a);return{text:r,fillStyle:c.backgroundColor,strokeStyle:c.borderColor,fontColor:s,lineWidth:c.borderWidth,pointStyle:i,hidden:!t.getDataVisibility(a),index:a}})}return[]}},onClick(t,n,i){i.chart.toggleDataVisibility(n.index),i.chart.update()}}}});class zm extends Io{initialize(){this.enableOptionSharing=!0,this.supportsDecimation=!0,super.initialize()}update(t){const n=this._cachedMeta,{dataset:i,data:s=[],_dataset:r}=n,a=this.chart._animationsDisabled;let{start:o,count:c}=JF(n,s,a);this._drawStart=o,this._drawCount=c,eU(n)&&(o=0,c=s.length),i._chart=this.chart,i._datasetIndex=this.index,i._decimated=!!r._decimated,i.points=s;const d=this.resolveDatasetElementOptions(t);this.options.showLine||(d.borderWidth=0),d.segment=this.options.segment,this.updateElement(i,void 0,{animated:!a,options:d},t),this.updateElements(s,o,c,t)}updateElements(t,n,i,s){const r=s==="reset",{iScale:a,vScale:o,_stacked:c,_dataset:d}=this._cachedMeta,{sharedOptions:h,includeOptions:m}=this._getSharedOptions(n,s),g=a.axis,v=o.axis,{spanGaps:b,segment:w}=this.options,M=ff(b)?b:Number.POSITIVE_INFINITY,y=this.chart._animationsDisabled||r||s==="none",S=n+i,T=t.length;let N=n>0&&this.getParsed(n-1);for(let k=0;k<T;++k){const E=t[k],D=y?E:{};if(k<n||k>=S){D.skip=!0;continue}const O=this.getParsed(k),I=ct(O[v]),P=D[g]=a.getPixelForValue(O[g],k),H=D[v]=r||I?o.getBasePixel():o.getPixelForValue(c?this.applyStack(o,O,c):O[v],k);D.skip=isNaN(P)||isNaN(H)||I,D.stop=k>0&&Math.abs(O[g]-N[g])>M,w&&(D.parsed=O,D.raw=d.data[k]),m&&(D.options=h||this.resolveDataElementOptions(k,E.active?"active":s)),y||this.updateElement(E,k,D,s),N=O}}getMaxOverflow(){const t=this._cachedMeta,n=t.dataset,i=n.options&&n.options.borderWidth||0,s=t.data||[];if(!s.length)return i;const r=s[0].size(this.resolveDataElementOptions(0)),a=s[s.length-1].size(this.resolveDataElementOptions(s.length-1));return Math.max(i,r,a)/2}draw(){const t=this._cachedMeta;t.dataset.updateControlPoints(this.chart.chartArea,t.iScale.axis),super.draw()}}ge(zm,"id","line"),ge(zm,"defaults",{datasetElementType:"line",dataElementType:"point",showLine:!0,spanGaps:!1}),ge(zm,"overrides",{scales:{_index_:{type:"category"},_value_:{type:"linear"}}});function so(){throw new Error("This method is not implemented: Check that a complete date adapter is provided.")}class $b{constructor(t){ge(this,"options");this.options=t||{}}static override(t){Object.assign($b.prototype,t)}init(){}formats(){return so()}parse(){return so()}format(){return so()}add(){return so()}diff(){return so()}startOf(){return so()}endOf(){return so()}}var MZ={_date:$b};function TZ(e,t,n,i){const{controller:s,data:r,_sorted:a}=e,o=s._cachedMeta.iScale;if(o&&t===o.axis&&t!=="r"&&a&&r.length){const c=o._reversePixels?YF:So;if(i){if(s._sharedOptions){const d=r[0],h=typeof d.getRange=="function"&&d.getRange(t);if(h){const m=c(r,t,n-h),g=c(r,t,n+h);return{lo:m.lo,hi:g.hi}}}}else return c(r,t,n)}return{lo:0,hi:r.length-1}}function Uf(e,t,n,i,s){const r=e.getSortedVisibleDatasetMetas(),a=n[t];for(let o=0,c=r.length;o<c;++o){const{index:d,data:h}=r[o],{lo:m,hi:g}=TZ(r[o],t,a,s);for(let v=m;v<=g;++v){const b=h[v];b.skip||i(b,d,v)}}}function jZ(e){const t=e.indexOf("x")!==-1,n=e.indexOf("y")!==-1;return function(i,s){const r=t?Math.abs(i.x-s.x):0,a=n?Math.abs(i.y-s.y):0;return Math.sqrt(Math.pow(r,2)+Math.pow(a,2))}}function wv(e,t,n,i,s){const r=[];return!s&&!e.isPointInArea(t)||Uf(e,n,t,function(o,c,d){!s&&!xr(o,e.chartArea,0)||o.inRange(t.x,t.y,i)&&r.push({element:o,datasetIndex:c,index:d})},!0),r}function NZ(e,t,n,i){let s=[];function r(a,o,c){const{startAngle:d,endAngle:h}=a.getProps(["startAngle","endAngle"],i),{angle:m}=TN(a,{x:t.x,y:t.y});hf(m,d,h)&&s.push({element:a,datasetIndex:o,index:c})}return Uf(e,n,t,r),s}function kZ(e,t,n,i,s,r){let a=[];const o=jZ(n);let c=Number.POSITIVE_INFINITY;function d(h,m,g){const v=h.inRange(t.x,t.y,s);if(i&&!v)return;const b=h.getCenterPoint(s);if(!(!!r||e.isPointInArea(b))&&!v)return;const M=o(t,b);M<c?(a=[{element:h,datasetIndex:m,index:g}],c=M):M===c&&a.push({element:h,datasetIndex:m,index:g})}return Uf(e,n,t,d),a}function Sv(e,t,n,i,s,r){return!r&&!e.isPointInArea(t)?[]:n==="r"&&!i?NZ(e,t,n,s):kZ(e,t,n,i,s,r)}function w6(e,t,n,i,s){const r=[],a=n==="x"?"inXRange":"inYRange";let o=!1;return Uf(e,n,t,(c,d,h)=>{c[a](t[n],s)&&(r.push({element:c,datasetIndex:d,index:h}),o=o||c.inRange(t.x,t.y,s))}),i&&!o?[]:r}var EZ={evaluateInteractionItems:Uf,modes:{index(e,t,n,i){const s=go(t,e),r=n.axis||"x",a=n.includeInvisible||!1,o=n.intersect?wv(e,s,r,i,a):Sv(e,s,r,!1,i,a),c=[];return o.length?(e.getSortedVisibleDatasetMetas().forEach(d=>{const h=o[0].index,m=d.data[h];m&&!m.skip&&c.push({element:m,datasetIndex:d.index,index:h})}),c):[]},dataset(e,t,n,i){const s=go(t,e),r=n.axis||"xy",a=n.includeInvisible||!1;let o=n.intersect?wv(e,s,r,i,a):Sv(e,s,r,!1,i,a);if(o.length>0){const c=o[0].datasetIndex,d=e.getDatasetMeta(c).data;o=[];for(let h=0;h<d.length;++h)o.push({element:d[h],datasetIndex:c,index:h})}return o},point(e,t,n,i){const s=go(t,e),r=n.axis||"xy",a=n.includeInvisible||!1;return wv(e,s,r,i,a)},nearest(e,t,n,i){const s=go(t,e),r=n.axis||"xy",a=n.includeInvisible||!1;return Sv(e,s,r,n.intersect,i,a)},x(e,t,n,i){const s=go(t,e);return w6(e,s,"x",n.intersect,i)},y(e,t,n,i){const s=go(t,e);return w6(e,s,"y",n.intersect,i)}}};const GN=["left","top","right","bottom"];function $u(e,t){return e.filter(n=>n.pos===t)}function S6(e,t){return e.filter(n=>GN.indexOf(n.pos)===-1&&n.box.axis===t)}function Wu(e,t){return e.sort((n,i)=>{const s=t?i:n,r=t?n:i;return s.weight===r.weight?s.index-r.index:s.weight-r.weight})}function AZ(e){const t=[];let n,i,s,r,a,o;for(n=0,i=(e||[]).length;n<i;++n)s=e[n],{position:r,options:{stack:a,stackWeight:o=1}}=s,t.push({index:n,box:s,pos:r,horizontal:s.isHorizontal(),weight:s.weight,stack:a&&r+a,stackWeight:o});return t}function OZ(e){const t={};for(const n of e){const{stack:i,pos:s,stackWeight:r}=n;if(!i||!GN.includes(s))continue;const a=t[i]||(t[i]={count:0,placed:0,weight:0,size:0});a.count++,a.weight+=r}return t}function DZ(e,t){const n=OZ(e),{vBoxMaxWidth:i,hBoxMaxHeight:s}=t;let r,a,o;for(r=0,a=e.length;r<a;++r){o=e[r];const{fullSize:c}=o.box,d=n[o.stack],h=d&&o.stackWeight/d.weight;o.horizontal?(o.width=h?h*i:c&&t.availableWidth,o.height=s):(o.width=i,o.height=h?h*s:c&&t.availableHeight)}return n}function PZ(e){const t=AZ(e),n=Wu(t.filter(d=>d.box.fullSize),!0),i=Wu($u(t,"left"),!0),s=Wu($u(t,"right")),r=Wu($u(t,"top"),!0),a=Wu($u(t,"bottom")),o=S6(t,"x"),c=S6(t,"y");return{fullSize:n,leftAndTop:i.concat(r),rightAndBottom:s.concat(c).concat(a).concat(o),chartArea:$u(t,"chartArea"),vertical:i.concat(s).concat(c),horizontal:r.concat(a).concat(o)}}function C6(e,t,n,i){return Math.max(e[n],t[n])+Math.max(e[i],t[i])}function YN(e,t){e.top=Math.max(e.top,t.top),e.left=Math.max(e.left,t.left),e.bottom=Math.max(e.bottom,t.bottom),e.right=Math.max(e.right,t.right)}function RZ(e,t,n,i){const{pos:s,box:r}=n,a=e.maxPadding;if(!Ge(s)){n.size&&(e[s]-=n.size);const m=i[n.stack]||{size:0,count:1};m.size=Math.max(m.size,n.horizontal?r.height:r.width),n.size=m.size/m.count,e[s]+=n.size}r.getPadding&&YN(a,r.getPadding());const o=Math.max(0,t.outerWidth-C6(a,e,"left","right")),c=Math.max(0,t.outerHeight-C6(a,e,"top","bottom")),d=o!==e.w,h=c!==e.h;return e.w=o,e.h=c,n.horizontal?{same:d,other:h}:{same:h,other:d}}function LZ(e){const t=e.maxPadding;function n(i){const s=Math.max(t[i]-e[i],0);return e[i]+=s,s}e.y+=n("top"),e.x+=n("left"),n("right"),n("bottom")}function zZ(e,t){const n=t.maxPadding;function i(s){const r={left:0,top:0,right:0,bottom:0};return s.forEach(a=>{r[a]=Math.max(t[a],n[a])}),r}return i(e?["left","right"]:["top","bottom"])}function ud(e,t,n,i){const s=[];let r,a,o,c,d,h;for(r=0,a=e.length,d=0;r<a;++r){o=e[r],c=o.box,c.update(o.width||t.w,o.height||t.h,zZ(o.horizontal,t));const{same:m,other:g}=RZ(t,n,o,i);d|=m&&s.length,h=h||g,c.fullSize||s.push(o)}return d&&ud(s,t,n,i)||h}function Xh(e,t,n,i,s){e.top=n,e.left=t,e.right=t+i,e.bottom=n+s,e.width=i,e.height=s}function M6(e,t,n,i){const s=n.padding;let{x:r,y:a}=t;for(const o of e){const c=o.box,d=i[o.stack]||{count:1,placed:0,weight:1},h=o.stackWeight/d.weight||1;if(o.horizontal){const m=t.w*h,g=d.size||c.height;df(d.start)&&(a=d.start),c.fullSize?Xh(c,s.left,a,n.outerWidth-s.right-s.left,g):Xh(c,t.left+d.placed,a,m,g),d.start=a,d.placed+=m,a=c.bottom}else{const m=t.h*h,g=d.size||c.width;df(d.start)&&(r=d.start),c.fullSize?Xh(c,r,s.top,g,n.outerHeight-s.bottom-s.top):Xh(c,r,t.top+d.placed,g,m),d.start=r,d.placed+=m,r=c.right}}t.x=r,t.y=a}var Di={addBox(e,t){e.boxes||(e.boxes=[]),t.fullSize=t.fullSize||!1,t.position=t.position||"top",t.weight=t.weight||0,t._layers=t._layers||function(){return[{z:0,draw(n){t.draw(n)}}]},e.boxes.push(t)},removeBox(e,t){const n=e.boxes?e.boxes.indexOf(t):-1;n!==-1&&e.boxes.splice(n,1)},configure(e,t,n){t.fullSize=n.fullSize,t.position=n.position,t.weight=n.weight},update(e,t,n,i){if(!e)return;const s=Dn(e.options.layout.padding),r=Math.max(t-s.width,0),a=Math.max(n-s.height,0),o=PZ(e.boxes),c=o.vertical,d=o.horizontal;lt(e.boxes,w=>{typeof w.beforeLayout=="function"&&w.beforeLayout()});const h=c.reduce((w,M)=>M.box.options&&M.box.options.display===!1?w:w+1,0)||1,m=Object.freeze({outerWidth:t,outerHeight:n,padding:s,availableWidth:r,availableHeight:a,vBoxMaxWidth:r/2/h,hBoxMaxHeight:a/2}),g=Object.assign({},s);YN(g,Dn(i));const v=Object.assign({maxPadding:g,w:r,h:a,x:s.left,y:s.top},s),b=DZ(c.concat(d),m);ud(o.fullSize,v,m,b),ud(c,v,m,b),ud(d,v,m,b)&&ud(c,v,m,b),LZ(v),M6(o.leftAndTop,v,m,b),v.x+=v.w,v.y+=v.h,M6(o.rightAndBottom,v,m,b),e.chartArea={left:v.left,top:v.top,right:v.left+v.w,bottom:v.top+v.h,height:v.h,width:v.w},lt(o.chartArea,w=>{const M=w.box;Object.assign(M,e.chartArea),M.update(v.w,v.h,{left:0,top:0,right:0,bottom:0})})}};class qN{acquireContext(t,n){}releaseContext(t){return!1}addEventListener(t,n,i){}removeEventListener(t,n,i){}getDevicePixelRatio(){return 1}getMaximumSize(t,n,i,s){return n=Math.max(0,n||t.width),i=i||t.height,{width:n,height:Math.max(0,s?Math.floor(n/s):i)}}isAttached(t){return!0}updateConfig(t){}}class IZ extends qN{acquireContext(t){return t&&t.getContext&&t.getContext("2d")||null}updateConfig(t){t.options.animation=!1}}const Im="$chartjs",BZ={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"},T6=e=>e===null||e==="";function VZ(e,t){const n=e.style,i=e.getAttribute("height"),s=e.getAttribute("width");if(e[Im]={initial:{height:i,width:s,style:{display:n.display,height:n.height,width:n.width}}},n.display=n.display||"block",n.boxSizing=n.boxSizing||"border-box",T6(s)){const r=l6(e,"width");r!==void 0&&(e.width=r)}if(T6(i))if(e.style.height==="")e.height=e.width/(t||2);else{const r=l6(e,"height");r!==void 0&&(e.height=r)}return e}const XN=UU?{passive:!0}:!1;function HZ(e,t,n){e&&e.addEventListener(t,n,XN)}function FZ(e,t,n){e&&e.canvas&&e.canvas.removeEventListener(t,n,XN)}function UZ(e,t){const n=BZ[e.type]||e.type,{x:i,y:s}=go(e,t);return{type:n,chart:t,native:e,x:i!==void 0?i:null,y:s!==void 0?s:null}}function zg(e,t){for(const n of e)if(n===t||n.contains(t))return!0}function ZZ(e,t,n){const i=e.canvas,s=new MutationObserver(r=>{let a=!1;for(const o of r)a=a||zg(o.addedNodes,i),a=a&&!zg(o.removedNodes,i);a&&n()});return s.observe(document,{childList:!0,subtree:!0}),s}function $Z(e,t,n){const i=e.canvas,s=new MutationObserver(r=>{let a=!1;for(const o of r)a=a||zg(o.removedNodes,i),a=a&&!zg(o.addedNodes,i);a&&n()});return s.observe(document,{childList:!0,subtree:!0}),s}const gf=new Map;let j6=0;function KN(){const e=window.devicePixelRatio;e!==j6&&(j6=e,gf.forEach((t,n)=>{n.currentDevicePixelRatio!==e&&t()}))}function WZ(e,t){gf.size||window.addEventListener("resize",KN),gf.set(e,t)}function GZ(e){gf.delete(e),gf.size||window.removeEventListener("resize",KN)}function YZ(e,t,n){const i=e.canvas,s=i&&Zb(i);if(!s)return;const r=EN((o,c)=>{const d=s.clientWidth;n(o,c),d<s.clientWidth&&n()},window),a=new ResizeObserver(o=>{const c=o[0],d=c.contentRect.width,h=c.contentRect.height;d===0&&h===0||r(d,h)});return a.observe(s),WZ(e,r),a}function Cv(e,t,n){n&&n.disconnect(),t==="resize"&&GZ(e)}function qZ(e,t,n){const i=e.canvas,s=EN(r=>{e.ctx!==null&&n(UZ(r,e))},e);return HZ(i,t,s),s}class XZ extends qN{acquireContext(t,n){const i=t&&t.getContext&&t.getContext("2d");return i&&i.canvas===t?(VZ(t,n),i):null}releaseContext(t){const n=t.canvas;if(!n[Im])return!1;const i=n[Im].initial;["height","width"].forEach(r=>{const a=i[r];ct(a)?n.removeAttribute(r):n.setAttribute(r,a)});const s=i.style||{};return Object.keys(s).forEach(r=>{n.style[r]=s[r]}),n.width=n.width,delete n[Im],!0}addEventListener(t,n,i){this.removeEventListener(t,n);const s=t.$proxies||(t.$proxies={}),a={attach:ZZ,detach:$Z,resize:YZ}[n]||qZ;s[n]=a(t,n,i)}removeEventListener(t,n){const i=t.$proxies||(t.$proxies={}),s=i[n];if(!s)return;({attach:Cv,detach:Cv,resize:Cv}[n]||FZ)(t,n,s),i[n]=void 0}getDevicePixelRatio(){return window.devicePixelRatio}getMaximumSize(t,n,i,s){return FU(t,n,i,s)}isAttached(t){const n=t&&Zb(t);return!!(n&&n.isConnected)}}function KZ(e){return!Ub()||typeof OffscreenCanvas<"u"&&e instanceof OffscreenCanvas?IZ:XZ}var ym;let zr=(ym=class{constructor(){ge(this,"x");ge(this,"y");ge(this,"active",!1);ge(this,"options");ge(this,"$animations")}tooltipPosition(t){const{x:n,y:i}=this.getProps(["x","y"],t);return{x:n,y:i}}hasValue(){return ff(this.x)&&ff(this.y)}getProps(t,n){const i=this.$animations;if(!n||!i)return this;const s={};return t.forEach(r=>{s[r]=i[r]&&i[r].active()?i[r]._to:this[r]}),s}},ge(ym,"defaults",{}),ge(ym,"defaultRoutes"),ym);function QZ(e,t){const n=e.options.ticks,i=JZ(e),s=Math.min(n.maxTicksLimit||i,i),r=n.major.enabled?t$(t):[],a=r.length,o=r[0],c=r[a-1],d=[];if(a>s)return n$(t,d,r,a/s),d;const h=e$(r,t,s);if(a>0){let m,g;const v=a>1?Math.round((c-o)/(a-1)):null;for(Kh(t,d,h,ct(v)?0:o-v,o),m=0,g=a-1;m<g;m++)Kh(t,d,h,r[m],r[m+1]);return Kh(t,d,h,c,ct(v)?t.length:c+v),d}return Kh(t,d,h),d}function JZ(e){const t=e.options.offset,n=e._tickSize(),i=e._length/n+(t?0:1),s=e._maxLength/n;return Math.floor(Math.min(i,s))}function e$(e,t,n){const i=i$(e),s=t.length/n;if(!i)return Math.max(s,1);const r=ZF(i);for(let a=0,o=r.length-1;a<o;a++){const c=r[a];if(c>s)return c}return Math.max(s,1)}function t$(e){const t=[];let n,i;for(n=0,i=e.length;n<i;n++)e[n].major&&t.push(n);return t}function n$(e,t,n,i){let s=0,r=n[0],a;for(i=Math.ceil(i),a=0;a<e.length;a++)a===r&&(t.push(e[a]),s++,r=n[s*i])}function Kh(e,t,n,i,s){const r=Fe(i,0),a=Math.min(Fe(s,e.length),e.length);let o=0,c,d,h;for(n=Math.ceil(n),s&&(c=s-i,n=c/Math.floor(c/n)),h=r;h<0;)o++,h=Math.round(r+o*n);for(d=Math.max(r,0);d<a;d++)d===h&&(t.push(e[d]),o++,h=Math.round(r+o*n))}function i$(e){const t=e.length;let n,i;if(t<2)return!1;for(i=e[0],n=1;n<t;++n)if(e[n]-e[n-1]!==i)return!1;return i}const s$=e=>e==="left"?"right":e==="right"?"left":e,N6=(e,t,n)=>t==="top"||t==="left"?e[t]+n:e[t]-n,k6=(e,t)=>Math.min(t||e,e);function E6(e,t){const n=[],i=e.length/t,s=e.length;let r=0;for(;r<s;r+=i)n.push(e[Math.floor(r)]);return n}function r$(e,t,n){const i=e.ticks.length,s=Math.min(t,i-1),r=e._startPixel,a=e._endPixel,o=1e-6;let c=e.getPixelForTick(s),d;if(!(n&&(i===1?d=Math.max(c-r,a-c):t===0?d=(e.getPixelForTick(1)-c)/2:d=(c-e.getPixelForTick(s-1))/2,c+=s<t?d:-d,c<r-o||c>a+o)))return c}function a$(e,t){lt(e,n=>{const i=n.gc,s=i.length/2;let r;if(s>t){for(r=0;r<s;++r)delete n.data[i[r]];i.splice(0,s)}})}function Gu(e){return e.drawTicks?e.tickLength:0}function A6(e,t){if(!e.display)return 0;const n=en(e.font,t),i=Dn(e.padding);return(Nt(e.text)?e.text.length:1)*n.lineHeight+i.height}function o$(e,t){return Za(e,{scale:t,type:"scale"})}function l$(e,t,n){return Za(e,{tick:n,index:t,type:"tick"})}function c$(e,t,n){let i=zb(e);return(n&&t!=="right"||!n&&t==="right")&&(i=s$(i)),i}function u$(e,t,n,i){const{top:s,left:r,bottom:a,right:o,chart:c}=e,{chartArea:d,scales:h}=c;let m=0,g,v,b;const w=a-s,M=o-r;if(e.isHorizontal()){if(v=bn(i,r,o),Ge(n)){const y=Object.keys(n)[0],S=n[y];b=h[y].getPixelForValue(S)+w-t}else n==="center"?b=(d.bottom+d.top)/2+w-t:b=N6(e,n,t);g=o-r}else{if(Ge(n)){const y=Object.keys(n)[0],S=n[y];v=h[y].getPixelForValue(S)-M+t}else n==="center"?v=(d.left+d.right)/2-M+t:v=N6(e,n,t);b=bn(i,a,s),m=n==="left"?-$t:$t}return{titleX:v,titleY:b,maxWidth:g,rotation:m}}class al extends zr{constructor(t){super(),this.id=t.id,this.type=t.type,this.options=void 0,this.ctx=t.ctx,this.chart=t.chart,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.width=void 0,this.height=void 0,this._margins={left:0,right:0,top:0,bottom:0},this.maxWidth=void 0,this.maxHeight=void 0,this.paddingTop=void 0,this.paddingBottom=void 0,this.paddingLeft=void 0,this.paddingRight=void 0,this.axis=void 0,this.labelRotation=void 0,this.min=void 0,this.max=void 0,this._range=void 0,this.ticks=[],this._gridLineItems=null,this._labelItems=null,this._labelSizes=null,this._length=0,this._maxLength=0,this._longestTextCache={},this._startPixel=void 0,this._endPixel=void 0,this._reversePixels=!1,this._userMax=void 0,this._userMin=void 0,this._suggestedMax=void 0,this._suggestedMin=void 0,this._ticksLength=0,this._borderValue=0,this._cache={},this._dataLimitsCached=!1,this.$context=void 0}init(t){this.options=t.setContext(this.getContext()),this.axis=t.axis,this._userMin=this.parse(t.min),this._userMax=this.parse(t.max),this._suggestedMin=this.parse(t.suggestedMin),this._suggestedMax=this.parse(t.suggestedMax)}parse(t,n){return t}getUserBounds(){let{_userMin:t,_userMax:n,_suggestedMin:i,_suggestedMax:s}=this;return t=ii(t,Number.POSITIVE_INFINITY),n=ii(n,Number.NEGATIVE_INFINITY),i=ii(i,Number.POSITIVE_INFINITY),s=ii(s,Number.NEGATIVE_INFINITY),{min:ii(t,i),max:ii(n,s),minDefined:Vt(t),maxDefined:Vt(n)}}getMinMax(t){let{min:n,max:i,minDefined:s,maxDefined:r}=this.getUserBounds(),a;if(s&&r)return{min:n,max:i};const o=this.getMatchingVisibleMetas();for(let c=0,d=o.length;c<d;++c)a=o[c].controller.getMinMax(this,t),s||(n=Math.min(n,a.min)),r||(i=Math.max(i,a.max));return n=r&&n>i?i:n,i=s&&n>i?n:i,{min:ii(n,ii(i,n)),max:ii(i,ii(n,i))}}getPadding(){return{left:this.paddingLeft||0,top:this.paddingTop||0,right:this.paddingRight||0,bottom:this.paddingBottom||0}}getTicks(){return this.ticks}getLabels(){const t=this.chart.data;return this.options.labels||(this.isHorizontal()?t.xLabels:t.yLabels)||t.labels||[]}getLabelItems(t=this.chart.chartArea){return this._labelItems||(this._labelItems=this._computeLabelItems(t))}beforeLayout(){this._cache={},this._dataLimitsCached=!1}beforeUpdate(){xt(this.options.beforeUpdate,[this])}update(t,n,i){const{beginAtZero:s,grace:r,ticks:a}=this.options,o=a.sampleSize;this.beforeUpdate(),this.maxWidth=t,this.maxHeight=n,this._margins=i=Object.assign({left:0,right:0,top:0,bottom:0},i),this.ticks=null,this._labelSizes=null,this._gridLineItems=null,this._labelItems=null,this.beforeSetDimensions(),this.setDimensions(),this.afterSetDimensions(),this._maxLength=this.isHorizontal()?this.width+i.left+i.right:this.height+i.top+i.bottom,this._dataLimitsCached||(this.beforeDataLimits(),this.determineDataLimits(),this.afterDataLimits(),this._range=_U(this,r,s),this._dataLimitsCached=!0),this.beforeBuildTicks(),this.ticks=this.buildTicks()||[],this.afterBuildTicks();const c=o<this.ticks.length;this._convertTicksToLabels(c?E6(this.ticks,o):this.ticks),this.configure(),this.beforeCalculateLabelRotation(),this.calculateLabelRotation(),this.afterCalculateLabelRotation(),a.display&&(a.autoSkip||a.source==="auto")&&(this.ticks=QZ(this,this.ticks),this._labelSizes=null,this.afterAutoSkip()),c&&this._convertTicksToLabels(this.ticks),this.beforeFit(),this.fit(),this.afterFit(),this.afterUpdate()}configure(){let t=this.options.reverse,n,i;this.isHorizontal()?(n=this.left,i=this.right):(n=this.top,i=this.bottom,t=!t),this._startPixel=n,this._endPixel=i,this._reversePixels=t,this._length=i-n,this._alignToPixels=this.options.alignToPixels}afterUpdate(){xt(this.options.afterUpdate,[this])}beforeSetDimensions(){xt(this.options.beforeSetDimensions,[this])}setDimensions(){this.isHorizontal()?(this.width=this.maxWidth,this.left=0,this.right=this.width):(this.height=this.maxHeight,this.top=0,this.bottom=this.height),this.paddingLeft=0,this.paddingTop=0,this.paddingRight=0,this.paddingBottom=0}afterSetDimensions(){xt(this.options.afterSetDimensions,[this])}_callHooks(t){this.chart.notifyPlugins(t,this.getContext()),xt(this.options[t],[this])}beforeDataLimits(){this._callHooks("beforeDataLimits")}determineDataLimits(){}afterDataLimits(){this._callHooks("afterDataLimits")}beforeBuildTicks(){this._callHooks("beforeBuildTicks")}buildTicks(){return[]}afterBuildTicks(){this._callHooks("afterBuildTicks")}beforeTickToLabelConversion(){xt(this.options.beforeTickToLabelConversion,[this])}generateTickLabels(t){const n=this.options.ticks;let i,s,r;for(i=0,s=t.length;i<s;i++)r=t[i],r.label=xt(n.callback,[r.value,i,t],this)}afterTickToLabelConversion(){xt(this.options.afterTickToLabelConversion,[this])}beforeCalculateLabelRotation(){xt(this.options.beforeCalculateLabelRotation,[this])}calculateLabelRotation(){const t=this.options,n=t.ticks,i=k6(this.ticks.length,t.ticks.maxTicksLimit),s=n.minRotation||0,r=n.maxRotation;let a=s,o,c,d;if(!this._isVisible()||!n.display||s>=r||i<=1||!this.isHorizontal()){this.labelRotation=s;return}const h=this._getLabelSizes(),m=h.widest.width,g=h.highest.height,v=En(this.chart.width-m,0,this.maxWidth);o=t.offset?this.maxWidth/i:v/(i-1),m+6>o&&(o=v/(i-(t.offset?.5:1)),c=this.maxHeight-Gu(t.grid)-n.padding-A6(t.title,this.chart.options.font),d=Math.sqrt(m*m+g*g),a=Rb(Math.min(Math.asin(En((h.highest.height+6)/o,-1,1)),Math.asin(En(c/d,-1,1))-Math.asin(En(g/d,-1,1)))),a=Math.max(s,Math.min(r,a))),this.labelRotation=a}afterCalculateLabelRotation(){xt(this.options.afterCalculateLabelRotation,[this])}afterAutoSkip(){}beforeFit(){xt(this.options.beforeFit,[this])}fit(){const t={width:0,height:0},{chart:n,options:{ticks:i,title:s,grid:r}}=this,a=this._isVisible(),o=this.isHorizontal();if(a){const c=A6(s,n.options.font);if(o?(t.width=this.maxWidth,t.height=Gu(r)+c):(t.height=this.maxHeight,t.width=Gu(r)+c),i.display&&this.ticks.length){const{first:d,last:h,widest:m,highest:g}=this._getLabelSizes(),v=i.padding*2,b=Cs(this.labelRotation),w=Math.cos(b),M=Math.sin(b);if(o){const y=i.mirror?0:M*m.width+w*g.height;t.height=Math.min(this.maxHeight,t.height+y+v)}else{const y=i.mirror?0:w*m.width+M*g.height;t.width=Math.min(this.maxWidth,t.width+y+v)}this._calculatePadding(d,h,M,w)}}this._handleMargins(),o?(this.width=this._length=n.width-this._margins.left-this._margins.right,this.height=t.height):(this.width=t.width,this.height=this._length=n.height-this._margins.top-this._margins.bottom)}_calculatePadding(t,n,i,s){const{ticks:{align:r,padding:a},position:o}=this.options,c=this.labelRotation!==0,d=o!=="top"&&this.axis==="x";if(this.isHorizontal()){const h=this.getPixelForTick(0)-this.left,m=this.right-this.getPixelForTick(this.ticks.length-1);let g=0,v=0;c?d?(g=s*t.width,v=i*n.height):(g=i*t.height,v=s*n.width):r==="start"?v=n.width:r==="end"?g=t.width:r!=="inner"&&(g=t.width/2,v=n.width/2),this.paddingLeft=Math.max((g-h+a)*this.width/(this.width-h),0),this.paddingRight=Math.max((v-m+a)*this.width/(this.width-m),0)}else{let h=n.height/2,m=t.height/2;r==="start"?(h=0,m=t.height):r==="end"&&(h=n.height,m=0),this.paddingTop=h+a,this.paddingBottom=m+a}}_handleMargins(){this._margins&&(this._margins.left=Math.max(this.paddingLeft,this._margins.left),this._margins.top=Math.max(this.paddingTop,this._margins.top),this._margins.right=Math.max(this.paddingRight,this._margins.right),this._margins.bottom=Math.max(this.paddingBottom,this._margins.bottom))}afterFit(){xt(this.options.afterFit,[this])}isHorizontal(){const{axis:t,position:n}=this.options;return n==="top"||n==="bottom"||t==="x"}isFullSize(){return this.options.fullSize}_convertTicksToLabels(t){this.beforeTickToLabelConversion(),this.generateTickLabels(t);let n,i;for(n=0,i=t.length;n<i;n++)ct(t[n].label)&&(t.splice(n,1),i--,n--);this.afterTickToLabelConversion()}_getLabelSizes(){let t=this._labelSizes;if(!t){const n=this.options.ticks.sampleSize;let i=this.ticks;n<i.length&&(i=E6(i,n)),this._labelSizes=t=this._computeLabelSizes(i,i.length,this.options.ticks.maxTicksLimit)}return t}_computeLabelSizes(t,n,i){const{ctx:s,_longestTextCache:r}=this,a=[],o=[],c=Math.floor(n/k6(n,i));let d=0,h=0,m,g,v,b,w,M,y,S,T,N,k;for(m=0;m<n;m+=c){if(b=t[m].label,w=this._resolveTickFontOptions(m),s.font=M=w.string,y=r[M]=r[M]||{data:{},gc:[]},S=w.lineHeight,T=N=0,!ct(b)&&!Nt(b))T=Rg(s,y.data,y.gc,T,b),N=S;else if(Nt(b))for(g=0,v=b.length;g<v;++g)k=b[g],!ct(k)&&!Nt(k)&&(T=Rg(s,y.data,y.gc,T,k),N+=S);a.push(T),o.push(N),d=Math.max(T,d),h=Math.max(N,h)}a$(r,n);const E=a.indexOf(d),D=o.indexOf(h),O=I=>({width:a[I]||0,height:o[I]||0});return{first:O(0),last:O(n-1),widest:O(E),highest:O(D),widths:a,heights:o}}getLabelForValue(t){return t}getPixelForValue(t,n){return NaN}getValueForPixel(t){}getPixelForTick(t){const n=this.ticks;return t<0||t>n.length-1?null:this.getPixelForValue(n[t].value)}getPixelForDecimal(t){this._reversePixels&&(t=1-t);const n=this._startPixel+t*this._length;return GF(this._alignToPixels?io(this.chart,n,0):n)}getDecimalForPixel(t){const n=(t-this._startPixel)/this._length;return this._reversePixels?1-n:n}getBasePixel(){return this.getPixelForValue(this.getBaseValue())}getBaseValue(){const{min:t,max:n}=this;return t<0&&n<0?n:t>0&&n>0?t:0}getContext(t){const n=this.ticks||[];if(t>=0&&t<n.length){const i=n[t];return i.$context||(i.$context=l$(this.getContext(),t,i))}return this.$context||(this.$context=o$(this.chart.getContext(),this))}_tickSize(){const t=this.options.ticks,n=Cs(this.labelRotation),i=Math.abs(Math.cos(n)),s=Math.abs(Math.sin(n)),r=this._getLabelSizes(),a=t.autoSkipPadding||0,o=r?r.widest.width+a:0,c=r?r.highest.height+a:0;return this.isHorizontal()?c*i>o*s?o/i:c/s:c*s<o*i?c/i:o/s}_isVisible(){const t=this.options.display;return t!=="auto"?!!t:this.getMatchingVisibleMetas().length>0}_computeGridLineItems(t){const n=this.axis,i=this.chart,s=this.options,{grid:r,position:a,border:o}=s,c=r.offset,d=this.isHorizontal(),m=this.ticks.length+(c?1:0),g=Gu(r),v=[],b=o.setContext(this.getContext()),w=b.display?b.width:0,M=w/2,y=function(R){return io(i,R,w)};let S,T,N,k,E,D,O,I,P,H,V,J;if(a==="top")S=y(this.bottom),D=this.bottom-g,I=S-M,H=y(t.top)+M,J=t.bottom;else if(a==="bottom")S=y(this.top),H=t.top,J=y(t.bottom)-M,D=S+M,I=this.top+g;else if(a==="left")S=y(this.right),E=this.right-g,O=S-M,P=y(t.left)+M,V=t.right;else if(a==="right")S=y(this.left),P=t.left,V=y(t.right)-M,E=S+M,O=this.left+g;else if(n==="x"){if(a==="center")S=y((t.top+t.bottom)/2+.5);else if(Ge(a)){const R=Object.keys(a)[0],$=a[R];S=y(this.chart.scales[R].getPixelForValue($))}H=t.top,J=t.bottom,D=S+M,I=D+g}else if(n==="y"){if(a==="center")S=y((t.left+t.right)/2);else if(Ge(a)){const R=Object.keys(a)[0],$=a[R];S=y(this.chart.scales[R].getPixelForValue($))}E=S-M,O=E-g,P=t.left,V=t.right}const Q=Fe(s.ticks.maxTicksLimit,m),U=Math.max(1,Math.ceil(m/Q));for(T=0;T<m;T+=U){const R=this.getContext(T),$=r.setContext(R),B=o.setContext(R),W=$.lineWidth,G=$.color,ie=B.dash||[],se=B.dashOffset,Le=$.tickWidth,je=$.tickColor,be=$.tickBorderDash||[],we=$.tickBorderDashOffset;N=r$(this,T,c),N!==void 0&&(k=io(i,N,W),d?E=O=P=V=k:D=I=H=J=k,v.push({tx1:E,ty1:D,tx2:O,ty2:I,x1:P,y1:H,x2:V,y2:J,width:W,color:G,borderDash:ie,borderDashOffset:se,tickWidth:Le,tickColor:je,tickBorderDash:be,tickBorderDashOffset:we}))}return this._ticksLength=m,this._borderValue=S,v}_computeLabelItems(t){const n=this.axis,i=this.options,{position:s,ticks:r}=i,a=this.isHorizontal(),o=this.ticks,{align:c,crossAlign:d,padding:h,mirror:m}=r,g=Gu(i.grid),v=g+h,b=m?-h:v,w=-Cs(this.labelRotation),M=[];let y,S,T,N,k,E,D,O,I,P,H,V,J="middle";if(s==="top")E=this.bottom-b,D=this._getXAxisLabelAlignment();else if(s==="bottom")E=this.top+b,D=this._getXAxisLabelAlignment();else if(s==="left"){const U=this._getYAxisLabelAlignment(g);D=U.textAlign,k=U.x}else if(s==="right"){const U=this._getYAxisLabelAlignment(g);D=U.textAlign,k=U.x}else if(n==="x"){if(s==="center")E=(t.top+t.bottom)/2+v;else if(Ge(s)){const U=Object.keys(s)[0],R=s[U];E=this.chart.scales[U].getPixelForValue(R)+v}D=this._getXAxisLabelAlignment()}else if(n==="y"){if(s==="center")k=(t.left+t.right)/2-v;else if(Ge(s)){const U=Object.keys(s)[0],R=s[U];k=this.chart.scales[U].getPixelForValue(R)}D=this._getYAxisLabelAlignment(g).textAlign}n==="y"&&(c==="start"?J="top":c==="end"&&(J="bottom"));const Q=this._getLabelSizes();for(y=0,S=o.length;y<S;++y){T=o[y],N=T.label;const U=r.setContext(this.getContext(y));O=this.getPixelForTick(y)+r.labelOffset,I=this._resolveTickFontOptions(y),P=I.lineHeight,H=Nt(N)?N.length:1;const R=H/2,$=U.color,B=U.textStrokeColor,W=U.textStrokeWidth;let G=D;a?(k=O,D==="inner"&&(y===S-1?G=this.options.reverse?"left":"right":y===0?G=this.options.reverse?"right":"left":G="center"),s==="top"?d==="near"||w!==0?V=-H*P+P/2:d==="center"?V=-Q.highest.height/2-R*P+P:V=-Q.highest.height+P/2:d==="near"||w!==0?V=P/2:d==="center"?V=Q.highest.height/2-R*P:V=Q.highest.height-H*P,m&&(V*=-1),w!==0&&!U.showLabelBackdrop&&(k+=P/2*Math.sin(w))):(E=O,V=(1-H)*P/2);let ie;if(U.showLabelBackdrop){const se=Dn(U.backdropPadding),Le=Q.heights[y],je=Q.widths[y];let be=V-se.top,we=0-se.left;switch(J){case"middle":be-=Le/2;break;case"bottom":be-=Le;break}switch(D){case"center":we-=je/2;break;case"right":we-=je;break;case"inner":y===S-1?we-=je:y>0&&(we-=je/2);break}ie={left:we,top:be,width:je+se.width,height:Le+se.height,color:U.backdropColor}}M.push({label:N,font:I,textOffset:V,options:{rotation:w,color:$,strokeColor:B,strokeWidth:W,textAlign:G,textBaseline:J,translation:[k,E],backdrop:ie}})}return M}_getXAxisLabelAlignment(){const{position:t,ticks:n}=this.options;if(-Cs(this.labelRotation))return t==="top"?"left":"right";let s="center";return n.align==="start"?s="left":n.align==="end"?s="right":n.align==="inner"&&(s="inner"),s}_getYAxisLabelAlignment(t){const{position:n,ticks:{crossAlign:i,mirror:s,padding:r}}=this.options,a=this._getLabelSizes(),o=t+r,c=a.widest.width;let d,h;return n==="left"?s?(h=this.right+r,i==="near"?d="left":i==="center"?(d="center",h+=c/2):(d="right",h+=c)):(h=this.right-o,i==="near"?d="right":i==="center"?(d="center",h-=c/2):(d="left",h=this.left)):n==="right"?s?(h=this.left+r,i==="near"?d="right":i==="center"?(d="center",h-=c/2):(d="left",h-=c)):(h=this.left+o,i==="near"?d="left":i==="center"?(d="center",h+=c/2):(d="right",h=this.right)):d="right",{textAlign:d,x:h}}_computeLabelArea(){if(this.options.ticks.mirror)return;const t=this.chart,n=this.options.position;if(n==="left"||n==="right")return{top:0,left:this.left,bottom:t.height,right:this.right};if(n==="top"||n==="bottom")return{top:this.top,left:0,bottom:this.bottom,right:t.width}}drawBackground(){const{ctx:t,options:{backgroundColor:n},left:i,top:s,width:r,height:a}=this;n&&(t.save(),t.fillStyle=n,t.fillRect(i,s,r,a),t.restore())}getLineWidthForValue(t){const n=this.options.grid;if(!this._isVisible()||!n.display)return 0;const s=this.ticks.findIndex(r=>r.value===t);return s>=0?n.setContext(this.getContext(s)).lineWidth:0}drawGrid(t){const n=this.options.grid,i=this.ctx,s=this._gridLineItems||(this._gridLineItems=this._computeGridLineItems(t));let r,a;const o=(c,d,h)=>{!h.width||!h.color||(i.save(),i.lineWidth=h.width,i.strokeStyle=h.color,i.setLineDash(h.borderDash||[]),i.lineDashOffset=h.borderDashOffset,i.beginPath(),i.moveTo(c.x,c.y),i.lineTo(d.x,d.y),i.stroke(),i.restore())};if(n.display)for(r=0,a=s.length;r<a;++r){const c=s[r];n.drawOnChartArea&&o({x:c.x1,y:c.y1},{x:c.x2,y:c.y2},c),n.drawTicks&&o({x:c.tx1,y:c.ty1},{x:c.tx2,y:c.ty2},{color:c.tickColor,width:c.tickWidth,borderDash:c.tickBorderDash,borderDashOffset:c.tickBorderDashOffset})}}drawBorder(){const{chart:t,ctx:n,options:{border:i,grid:s}}=this,r=i.setContext(this.getContext()),a=i.display?r.width:0;if(!a)return;const o=s.setContext(this.getContext(0)).lineWidth,c=this._borderValue;let d,h,m,g;this.isHorizontal()?(d=io(t,this.left,a)-a/2,h=io(t,this.right,o)+o/2,m=g=c):(m=io(t,this.top,a)-a/2,g=io(t,this.bottom,o)+o/2,d=h=c),n.save(),n.lineWidth=r.width,n.strokeStyle=r.color,n.beginPath(),n.moveTo(d,m),n.lineTo(h,g),n.stroke(),n.restore()}drawLabels(t){if(!this.options.ticks.display)return;const i=this.ctx,s=this._computeLabelArea();s&&Kp(i,s);const r=this.getLabelItems(t);for(const a of r){const o=a.options,c=a.font,d=a.label,h=a.textOffset;Go(i,d,0,h,c,o)}s&&Qp(i)}drawTitle(){const{ctx:t,options:{position:n,title:i,reverse:s}}=this;if(!i.display)return;const r=en(i.font),a=Dn(i.padding),o=i.align;let c=r.lineHeight/2;n==="bottom"||n==="center"||Ge(n)?(c+=a.bottom,Nt(i.text)&&(c+=r.lineHeight*(i.text.length-1))):c+=a.top;const{titleX:d,titleY:h,maxWidth:m,rotation:g}=u$(this,c,n,o);Go(t,i.text,0,0,r,{color:i.color,maxWidth:m,rotation:g,textAlign:c$(o,n,s),textBaseline:"middle",translation:[d,h]})}draw(t){this._isVisible()&&(this.drawBackground(),this.drawGrid(t),this.drawBorder(),this.drawTitle(),this.drawLabels(t))}_layers(){const t=this.options,n=t.ticks&&t.ticks.z||0,i=Fe(t.grid&&t.grid.z,-1),s=Fe(t.border&&t.border.z,0);return!this._isVisible()||this.draw!==al.prototype.draw?[{z:n,draw:r=>{this.draw(r)}}]:[{z:i,draw:r=>{this.drawBackground(),this.drawGrid(r),this.drawTitle()}},{z:s,draw:()=>{this.drawBorder()}},{z:n,draw:r=>{this.drawLabels(r)}}]}getMatchingVisibleMetas(t){const n=this.chart.getSortedVisibleDatasetMetas(),i=this.axis+"AxisID",s=[];let r,a;for(r=0,a=n.length;r<a;++r){const o=n[r];o[i]===this.id&&(!t||o.type===t)&&s.push(o)}return s}_resolveTickFontOptions(t){const n=this.options.ticks.setContext(this.getContext(t));return en(n.font)}_maxDigits(){const t=this._resolveTickFontOptions(0).lineHeight;return(this.isHorizontal()?this.width:this.height)/t}}class Qh{constructor(t,n,i){this.type=t,this.scope=n,this.override=i,this.items=Object.create(null)}isForType(t){return Object.prototype.isPrototypeOf.call(this.type.prototype,t.prototype)}register(t){const n=Object.getPrototypeOf(t);let i;h$(n)&&(i=this.register(n));const s=this.items,r=t.id,a=this.scope+"."+r;if(!r)throw new Error("class does not have id: "+t);return r in s||(s[r]=t,d$(t,a,i),this.override&&Ht.override(t.id,t.overrides)),a}get(t){return this.items[t]}unregister(t){const n=this.items,i=t.id,s=this.scope;i in n&&delete n[i],s&&i in Ht[s]&&(delete Ht[s][i],this.override&&delete Wo[i])}}function d$(e,t,n){const i=uf(Object.create(null),[n?Ht.get(n):{},Ht.get(t),e.defaults]);Ht.set(t,i),e.defaultRoutes&&f$(t,e.defaultRoutes),e.descriptors&&Ht.describe(t,e.descriptors)}function f$(e,t){Object.keys(t).forEach(n=>{const i=n.split("."),s=i.pop(),r=[e].concat(i).join("."),a=t[n].split("."),o=a.pop(),c=a.join(".");Ht.route(r,s,c,o)})}function h$(e){return"id"in e&&"defaults"in e}class m${constructor(){this.controllers=new Qh(Io,"datasets",!0),this.elements=new Qh(zr,"elements"),this.plugins=new Qh(Object,"plugins"),this.scales=new Qh(al,"scales"),this._typedRegistries=[this.controllers,this.scales,this.elements]}add(...t){this._each("register",t)}remove(...t){this._each("unregister",t)}addControllers(...t){this._each("register",t,this.controllers)}addElements(...t){this._each("register",t,this.elements)}addPlugins(...t){this._each("register",t,this.plugins)}addScales(...t){this._each("register",t,this.scales)}getController(t){return this._get(t,this.controllers,"controller")}getElement(t){return this._get(t,this.elements,"element")}getPlugin(t){return this._get(t,this.plugins,"plugin")}getScale(t){return this._get(t,this.scales,"scale")}removeControllers(...t){this._each("unregister",t,this.controllers)}removeElements(...t){this._each("unregister",t,this.elements)}removePlugins(...t){this._each("unregister",t,this.plugins)}removeScales(...t){this._each("unregister",t,this.scales)}_each(t,n,i){[...n].forEach(s=>{const r=i||this._getRegistryForType(s);i||r.isForType(s)||r===this.plugins&&s.id?this._exec(t,r,s):lt(s,a=>{const o=i||this._getRegistryForType(a);this._exec(t,o,a)})})}_exec(t,n,i){const s=Pb(t);xt(i["before"+s],[],i),n[t](i),xt(i["after"+s],[],i)}_getRegistryForType(t){for(let n=0;n<this._typedRegistries.length;n++){const i=this._typedRegistries[n];if(i.isForType(t))return i}return this.plugins}_get(t,n,i){const s=n.get(t);if(s===void 0)throw new Error('"'+t+'" is not a registered '+i+".");return s}}var vs=new m$;class g${constructor(){this._init=[]}notify(t,n,i,s){n==="beforeInit"&&(this._init=this._createDescriptors(t,!0),this._notify(this._init,t,"install"));const r=s?this._descriptors(t).filter(s):this._descriptors(t),a=this._notify(r,t,n,i);return n==="afterDestroy"&&(this._notify(r,t,"stop"),this._notify(this._init,t,"uninstall")),a}_notify(t,n,i,s){s=s||{};for(const r of t){const a=r.plugin,o=a[i],c=[n,s,r.options];if(xt(o,c,a)===!1&&s.cancelable)return!1}return!0}invalidate(){ct(this._cache)||(this._oldCache=this._cache,this._cache=void 0)}_descriptors(t){if(this._cache)return this._cache;const n=this._cache=this._createDescriptors(t);return this._notifyStateChanges(t),n}_createDescriptors(t,n){const i=t&&t.config,s=Fe(i.options&&i.options.plugins,{}),r=p$(i);return s===!1&&!n?[]:x$(t,r,s,n)}_notifyStateChanges(t){const n=this._oldCache||[],i=this._cache,s=(r,a)=>r.filter(o=>!a.some(c=>o.plugin.id===c.plugin.id));this._notify(s(n,i),t,"stop"),this._notify(s(i,n),t,"start")}}function p$(e){const t={},n=[],i=Object.keys(vs.plugins.items);for(let r=0;r<i.length;r++)n.push(vs.getPlugin(i[r]));const s=e.plugins||[];for(let r=0;r<s.length;r++){const a=s[r];n.indexOf(a)===-1&&(n.push(a),t[a.id]=!0)}return{plugins:n,localIds:t}}function v$(e,t){return!t&&e===!1?null:e===!0?{}:e}function x$(e,{plugins:t,localIds:n},i,s){const r=[],a=e.getContext();for(const o of t){const c=o.id,d=v$(i[c],s);d!==null&&r.push({plugin:o,options:y$(e.config,{plugin:o,local:n[c]},d,a)})}return r}function y$(e,{plugin:t,local:n},i,s){const r=e.pluginScopeKeys(t),a=e.getOptionScopes(i,r);return n&&t.defaults&&a.push(t.defaults),e.createResolver(a,s,[""],{scriptable:!1,indexable:!1,allKeys:!0})}function dy(e,t){const n=Ht.datasets[e]||{};return((t.datasets||{})[e]||{}).indexAxis||t.indexAxis||n.indexAxis||"x"}function _$(e,t){let n=e;return e==="_index_"?n=t:e==="_value_"&&(n=t==="x"?"y":"x"),n}function b$(e,t){return e===t?"_index_":"_value_"}function O6(e){if(e==="x"||e==="y"||e==="r")return e}function w$(e){if(e==="top"||e==="bottom")return"x";if(e==="left"||e==="right")return"y"}function fy(e,...t){if(O6(e))return e;for(const n of t){const i=n.axis||w$(n.position)||e.length>1&&O6(e[0].toLowerCase());if(i)return i}throw new Error(`Cannot determine type of '${e}' axis. Please provide 'axis' or 'position' option.`)}function D6(e,t,n){if(n[t+"AxisID"]===e)return{axis:t}}function S$(e,t){if(t.data&&t.data.datasets){const n=t.data.datasets.filter(i=>i.xAxisID===e||i.yAxisID===e);if(n.length)return D6(e,"x",n[0])||D6(e,"y",n[0])}return{}}function C$(e,t){const n=Wo[e.type]||{scales:{}},i=t.scales||{},s=dy(e.type,t),r=Object.create(null);return Object.keys(i).forEach(a=>{const o=i[a];if(!Ge(o))return console.error(`Invalid scale configuration for scale: ${a}`);if(o._proxy)return console.warn(`Ignoring resolver passed as options for scale: ${a}`);const c=fy(a,o,S$(a,e),Ht.scales[o.type]),d=b$(c,s),h=n.scales||{};r[a]=Id(Object.create(null),[{axis:c},o,h[c],h[d]])}),e.data.datasets.forEach(a=>{const o=a.type||e.type,c=a.indexAxis||dy(o,t),h=(Wo[o]||{}).scales||{};Object.keys(h).forEach(m=>{const g=_$(m,c),v=a[g+"AxisID"]||g;r[v]=r[v]||Object.create(null),Id(r[v],[{axis:g},i[v],h[m]])})}),Object.keys(r).forEach(a=>{const o=r[a];Id(o,[Ht.scales[o.type],Ht.scale])}),r}function QN(e){const t=e.options||(e.options={});t.plugins=Fe(t.plugins,{}),t.scales=C$(e,t)}function JN(e){return e=e||{},e.datasets=e.datasets||[],e.labels=e.labels||[],e}function M$(e){return e=e||{},e.data=JN(e.data),QN(e),e}const P6=new Map,ek=new Set;function Jh(e,t){let n=P6.get(e);return n||(n=t(),P6.set(e,n),ek.add(n)),n}const Yu=(e,t,n)=>{const i=$o(t,n);i!==void 0&&e.add(i)};class T${constructor(t){this._config=M$(t),this._scopeCache=new Map,this._resolverCache=new Map}get platform(){return this._config.platform}get type(){return this._config.type}set type(t){this._config.type=t}get data(){return this._config.data}set data(t){this._config.data=JN(t)}get options(){return this._config.options}set options(t){this._config.options=t}get plugins(){return this._config.plugins}update(){const t=this._config;this.clearCache(),QN(t)}clearCache(){this._scopeCache.clear(),this._resolverCache.clear()}datasetScopeKeys(t){return Jh(t,()=>[[`datasets.${t}`,""]])}datasetAnimationScopeKeys(t,n){return Jh(`${t}.transition.${n}`,()=>[[`datasets.${t}.transitions.${n}`,`transitions.${n}`],[`datasets.${t}`,""]])}datasetElementScopeKeys(t,n){return Jh(`${t}-${n}`,()=>[[`datasets.${t}.elements.${n}`,`datasets.${t}`,`elements.${n}`,""]])}pluginScopeKeys(t){const n=t.id,i=this.type;return Jh(`${i}-plugin-${n}`,()=>[[`plugins.${n}`,...t.additionalOptionScopes||[]]])}_cachedScopes(t,n){const i=this._scopeCache;let s=i.get(t);return(!s||n)&&(s=new Map,i.set(t,s)),s}getOptionScopes(t,n,i){const{options:s,type:r}=this,a=this._cachedScopes(t,i),o=a.get(n);if(o)return o;const c=new Set;n.forEach(h=>{t&&(c.add(t),h.forEach(m=>Yu(c,t,m))),h.forEach(m=>Yu(c,s,m)),h.forEach(m=>Yu(c,Wo[r]||{},m)),h.forEach(m=>Yu(c,Ht,m)),h.forEach(m=>Yu(c,cy,m))});const d=Array.from(c);return d.length===0&&d.push(Object.create(null)),ek.has(n)&&a.set(n,d),d}chartOptionScopes(){const{options:t,type:n}=this;return[t,Wo[n]||{},Ht.datasets[n]||{},{type:n},Ht,cy]}resolveNamedOptions(t,n,i,s=[""]){const r={$shared:!0},{resolver:a,subPrefixes:o}=R6(this._resolverCache,t,s);let c=a;if(N$(a,n)){r.$shared=!1,i=za(i)?i():i;const d=this.createResolver(t,i,o);c=Uc(a,i,d)}for(const d of n)r[d]=c[d];return r}createResolver(t,n,i=[""],s){const{resolver:r}=R6(this._resolverCache,t,i);return Ge(n)?Uc(r,n,void 0,s):r}}function R6(e,t,n){let i=e.get(t);i||(i=new Map,e.set(t,i));const s=n.join();let r=i.get(s);return r||(r={resolver:Vb(t,n),subPrefixes:n.filter(o=>!o.toLowerCase().includes("hover"))},i.set(s,r)),r}const j$=e=>Ge(e)&&Object.getOwnPropertyNames(e).some(t=>za(e[t]));function N$(e,t){const{isScriptable:n,isIndexable:i}=PN(e);for(const s of t){const r=n(s),a=i(s),o=(a||r)&&e[s];if(r&&(za(o)||j$(o))||a&&Nt(o))return!0}return!1}var k$="4.4.3";const E$=["top","bottom","left","right","chartArea"];function L6(e,t){return e==="top"||e==="bottom"||E$.indexOf(e)===-1&&t==="x"}function z6(e,t){return function(n,i){return n[e]===i[e]?n[t]-i[t]:n[e]-i[e]}}function I6(e){const t=e.chart,n=t.options.animation;t.notifyPlugins("afterRender"),xt(n&&n.onComplete,[e],t)}function A$(e){const t=e.chart,n=t.options.animation;xt(n&&n.onProgress,[e],t)}function tk(e){return Ub()&&typeof e=="string"?e=document.getElementById(e):e&&e.length&&(e=e[0]),e&&e.canvas&&(e=e.canvas),e}const Bm={},B6=e=>{const t=tk(e);return Object.values(Bm).filter(n=>n.canvas===t).pop()};function O$(e,t,n){const i=Object.keys(e);for(const s of i){const r=+s;if(r>=t){const a=e[s];delete e[s],(n>0||r>t)&&(e[r+n]=a)}}}function D$(e,t,n,i){return!n||e.type==="mouseout"?null:i?t:e}function em(e,t,n){return e.options.clip?e[n]:t[n]}function P$(e,t){const{xScale:n,yScale:i}=e;return n&&i?{left:em(n,t,"left"),right:em(n,t,"right"),top:em(i,t,"top"),bottom:em(i,t,"bottom")}:t}var Gr;let ru=(Gr=class{static register(...t){vs.add(...t),V6()}static unregister(...t){vs.remove(...t),V6()}constructor(t,n){const i=this.config=new T$(n),s=tk(t),r=B6(s);if(r)throw new Error("Canvas is already in use. Chart with ID '"+r.id+"' must be destroyed before the canvas with ID '"+r.canvas.id+"' can be reused.");const a=i.createResolver(i.chartOptionScopes(),this.getContext());this.platform=new(i.platform||KZ(s)),this.platform.updateConfig(i);const o=this.platform.acquireContext(s,a.aspectRatio),c=o&&o.canvas,d=c&&c.height,h=c&&c.width;if(this.id=RF(),this.ctx=o,this.canvas=c,this.width=h,this.height=d,this._options=a,this._aspectRatio=this.aspectRatio,this._layers=[],this._metasets=[],this._stacks=void 0,this.boxes=[],this.currentDevicePixelRatio=void 0,this.chartArea=void 0,this._active=[],this._lastEvent=void 0,this._listeners={},this._responsiveListeners=void 0,this._sortedMetasets=[],this.scales={},this._plugins=new g$,this.$proxies={},this._hiddenIndices={},this.attached=!1,this._animationsDisabled=void 0,this.$context=void 0,this._doResize=KF(m=>this.update(m),a.resizeDelay||0),this._dataChanges=[],Bm[this.id]=this,!o||!c){console.error("Failed to create chart: can't acquire context from the given item");return}ar.listen(this,"complete",I6),ar.listen(this,"progress",A$),this._initialize(),this.attached&&this.update()}get aspectRatio(){const{options:{aspectRatio:t,maintainAspectRatio:n},width:i,height:s,_aspectRatio:r}=this;return ct(t)?n&&r?r:s?i/s:null:t}get data(){return this.config.data}set data(t){this.config.data=t}get options(){return this._options}set options(t){this.config.options=t}get registry(){return vs}_initialize(){return this.notifyPlugins("beforeInit"),this.options.responsive?this.resize():o6(this,this.options.devicePixelRatio),this.bindEvents(),this.notifyPlugins("afterInit"),this}clear(){return s6(this.canvas,this.ctx),this}stop(){return ar.stop(this),this}resize(t,n){ar.running(this)?this._resizeBeforeDraw={width:t,height:n}:this._resize(t,n)}_resize(t,n){const i=this.options,s=this.canvas,r=i.maintainAspectRatio&&this.aspectRatio,a=this.platform.getMaximumSize(s,t,n,r),o=i.devicePixelRatio||this.platform.getDevicePixelRatio(),c=this.width?"resize":"attach";this.width=a.width,this.height=a.height,this._aspectRatio=this.aspectRatio,o6(this,o,!0)&&(this.notifyPlugins("resize",{size:a}),xt(i.onResize,[this,a],this),this.attached&&this._doResize(c)&&this.render())}ensureScalesHaveIDs(){const n=this.options.scales||{};lt(n,(i,s)=>{i.id=s})}buildOrUpdateScales(){const t=this.options,n=t.scales,i=this.scales,s=Object.keys(i).reduce((a,o)=>(a[o]=!1,a),{});let r=[];n&&(r=r.concat(Object.keys(n).map(a=>{const o=n[a],c=fy(a,o),d=c==="r",h=c==="x";return{options:o,dposition:d?"chartArea":h?"bottom":"left",dtype:d?"radialLinear":h?"category":"linear"}}))),lt(r,a=>{const o=a.options,c=o.id,d=fy(c,o),h=Fe(o.type,a.dtype);(o.position===void 0||L6(o.position,d)!==L6(a.dposition))&&(o.position=a.dposition),s[c]=!0;let m=null;if(c in i&&i[c].type===h)m=i[c];else{const g=vs.getScale(h);m=new g({id:c,type:h,ctx:this.ctx,chart:this}),i[m.id]=m}m.init(o,t)}),lt(s,(a,o)=>{a||delete i[o]}),lt(i,a=>{Di.configure(this,a,a.options),Di.addBox(this,a)})}_updateMetasets(){const t=this._metasets,n=this.data.datasets.length,i=t.length;if(t.sort((s,r)=>s.index-r.index),i>n){for(let s=n;s<i;++s)this._destroyDatasetMeta(s);t.splice(n,i-n)}this._sortedMetasets=t.slice(0).sort(z6("order","index"))}_removeUnreferencedMetasets(){const{_metasets:t,data:{datasets:n}}=this;t.length>n.length&&delete this._stacks,t.forEach((i,s)=>{n.filter(r=>r===i._dataset).length===0&&this._destroyDatasetMeta(s)})}buildOrUpdateControllers(){const t=[],n=this.data.datasets;let i,s;for(this._removeUnreferencedMetasets(),i=0,s=n.length;i<s;i++){const r=n[i];let a=this.getDatasetMeta(i);const o=r.type||this.config.type;if(a.type&&a.type!==o&&(this._destroyDatasetMeta(i),a=this.getDatasetMeta(i)),a.type=o,a.indexAxis=r.indexAxis||dy(o,this.options),a.order=r.order||0,a.index=i,a.label=""+r.label,a.visible=this.isDatasetVisible(i),a.controller)a.controller.updateIndex(i),a.controller.linkScales();else{const c=vs.getController(o),{datasetElementType:d,dataElementType:h}=Ht.datasets[o];Object.assign(c,{dataElementType:vs.getElement(h),datasetElementType:d&&vs.getElement(d)}),a.controller=new c(this,i),t.push(a.controller)}}return this._updateMetasets(),t}_resetElements(){lt(this.data.datasets,(t,n)=>{this.getDatasetMeta(n).controller.reset()},this)}reset(){this._resetElements(),this.notifyPlugins("reset")}update(t){const n=this.config;n.update();const i=this._options=n.createResolver(n.chartOptionScopes(),this.getContext()),s=this._animationsDisabled=!i.animation;if(this._updateScales(),this._checkEventBindings(),this._updateHiddenIndices(),this._plugins.invalidate(),this.notifyPlugins("beforeUpdate",{mode:t,cancelable:!0})===!1)return;const r=this.buildOrUpdateControllers();this.notifyPlugins("beforeElementsUpdate");let a=0;for(let d=0,h=this.data.datasets.length;d<h;d++){const{controller:m}=this.getDatasetMeta(d),g=!s&&r.indexOf(m)===-1;m.buildOrUpdateElements(g),a=Math.max(+m.getMaxOverflow(),a)}a=this._minPadding=i.layout.autoPadding?a:0,this._updateLayout(a),s||lt(r,d=>{d.reset()}),this._updateDatasets(t),this.notifyPlugins("afterUpdate",{mode:t}),this._layers.sort(z6("z","_idx"));const{_active:o,_lastEvent:c}=this;c?this._eventHandler(c,!0):o.length&&this._updateHoverStyles(o,o,!0),this.render()}_updateScales(){lt(this.scales,t=>{Di.removeBox(this,t)}),this.ensureScalesHaveIDs(),this.buildOrUpdateScales()}_checkEventBindings(){const t=this.options,n=new Set(Object.keys(this._listeners)),i=new Set(t.events);(!qS(n,i)||!!this._responsiveListeners!==t.responsive)&&(this.unbindEvents(),this.bindEvents())}_updateHiddenIndices(){const{_hiddenIndices:t}=this,n=this._getUniformDataChanges()||[];for(const{method:i,start:s,count:r}of n){const a=i==="_removeElements"?-r:r;O$(t,s,a)}}_getUniformDataChanges(){const t=this._dataChanges;if(!t||!t.length)return;this._dataChanges=[];const n=this.data.datasets.length,i=r=>new Set(t.filter(a=>a[0]===r).map((a,o)=>o+","+a.splice(1).join(","))),s=i(0);for(let r=1;r<n;r++)if(!qS(s,i(r)))return;return Array.from(s).map(r=>r.split(",")).map(r=>({method:r[1],start:+r[2],count:+r[3]}))}_updateLayout(t){if(this.notifyPlugins("beforeLayout",{cancelable:!0})===!1)return;Di.update(this,this.width,this.height,t);const n=this.chartArea,i=n.width<=0||n.height<=0;this._layers=[],lt(this.boxes,s=>{i&&s.position==="chartArea"||(s.configure&&s.configure(),this._layers.push(...s._layers()))},this),this._layers.forEach((s,r)=>{s._idx=r}),this.notifyPlugins("afterLayout")}_updateDatasets(t){if(this.notifyPlugins("beforeDatasetsUpdate",{mode:t,cancelable:!0})!==!1){for(let n=0,i=this.data.datasets.length;n<i;++n)this.getDatasetMeta(n).controller.configure();for(let n=0,i=this.data.datasets.length;n<i;++n)this._updateDataset(n,za(t)?t({datasetIndex:n}):t);this.notifyPlugins("afterDatasetsUpdate",{mode:t})}}_updateDataset(t,n){const i=this.getDatasetMeta(t),s={meta:i,index:t,mode:n,cancelable:!0};this.notifyPlugins("beforeDatasetUpdate",s)!==!1&&(i.controller._update(n),s.cancelable=!1,this.notifyPlugins("afterDatasetUpdate",s))}render(){this.notifyPlugins("beforeRender",{cancelable:!0})!==!1&&(ar.has(this)?this.attached&&!ar.running(this)&&ar.start(this):(this.draw(),I6({chart:this})))}draw(){let t;if(this._resizeBeforeDraw){const{width:i,height:s}=this._resizeBeforeDraw;this._resize(i,s),this._resizeBeforeDraw=null}if(this.clear(),this.width<=0||this.height<=0||this.notifyPlugins("beforeDraw",{cancelable:!0})===!1)return;const n=this._layers;for(t=0;t<n.length&&n[t].z<=0;++t)n[t].draw(this.chartArea);for(this._drawDatasets();t<n.length;++t)n[t].draw(this.chartArea);this.notifyPlugins("afterDraw")}_getSortedDatasetMetas(t){const n=this._sortedMetasets,i=[];let s,r;for(s=0,r=n.length;s<r;++s){const a=n[s];(!t||a.visible)&&i.push(a)}return i}getSortedVisibleDatasetMetas(){return this._getSortedDatasetMetas(!0)}_drawDatasets(){if(this.notifyPlugins("beforeDatasetsDraw",{cancelable:!0})===!1)return;const t=this.getSortedVisibleDatasetMetas();for(let n=t.length-1;n>=0;--n)this._drawDataset(t[n]);this.notifyPlugins("afterDatasetsDraw")}_drawDataset(t){const n=this.ctx,i=t._clip,s=!i.disabled,r=P$(t,this.chartArea),a={meta:t,index:t.index,cancelable:!0};this.notifyPlugins("beforeDatasetDraw",a)!==!1&&(s&&Kp(n,{left:i.left===!1?0:r.left-i.left,right:i.right===!1?this.width:r.right+i.right,top:i.top===!1?0:r.top-i.top,bottom:i.bottom===!1?this.height:r.bottom+i.bottom}),t.controller.draw(),s&&Qp(n),a.cancelable=!1,this.notifyPlugins("afterDatasetDraw",a))}isPointInArea(t){return xr(t,this.chartArea,this._minPadding)}getElementsAtEventForMode(t,n,i,s){const r=EZ.modes[n];return typeof r=="function"?r(this,t,i,s):[]}getDatasetMeta(t){const n=this.data.datasets[t],i=this._metasets;let s=i.filter(r=>r&&r._dataset===n).pop();return s||(s={type:null,data:[],dataset:null,controller:null,hidden:null,xAxisID:null,yAxisID:null,order:n&&n.order||0,index:t,_dataset:n,_parsed:[],_sorted:!1},i.push(s)),s}getContext(){return this.$context||(this.$context=Za(null,{chart:this,type:"chart"}))}getVisibleDatasetCount(){return this.getSortedVisibleDatasetMetas().length}isDatasetVisible(t){const n=this.data.datasets[t];if(!n)return!1;const i=this.getDatasetMeta(t);return typeof i.hidden=="boolean"?!i.hidden:!n.hidden}setDatasetVisibility(t,n){const i=this.getDatasetMeta(t);i.hidden=!n}toggleDataVisibility(t){this._hiddenIndices[t]=!this._hiddenIndices[t]}getDataVisibility(t){return!this._hiddenIndices[t]}_updateVisibility(t,n,i){const s=i?"show":"hide",r=this.getDatasetMeta(t),a=r.controller._resolveAnimations(void 0,s);df(n)?(r.data[n].hidden=!i,this.update()):(this.setDatasetVisibility(t,i),a.update(r,{visible:i}),this.update(o=>o.datasetIndex===t?s:void 0))}hide(t,n){this._updateVisibility(t,n,!1)}show(t,n){this._updateVisibility(t,n,!0)}_destroyDatasetMeta(t){const n=this._metasets[t];n&&n.controller&&n.controller._destroy(),delete this._metasets[t]}_stop(){let t,n;for(this.stop(),ar.remove(this),t=0,n=this.data.datasets.length;t<n;++t)this._destroyDatasetMeta(t)}destroy(){this.notifyPlugins("beforeDestroy");const{canvas:t,ctx:n}=this;this._stop(),this.config.clearCache(),t&&(this.unbindEvents(),s6(t,n),this.platform.releaseContext(n),this.canvas=null,this.ctx=null),delete Bm[this.id],this.notifyPlugins("afterDestroy")}toBase64Image(...t){return this.canvas.toDataURL(...t)}bindEvents(){this.bindUserEvents(),this.options.responsive?this.bindResponsiveEvents():this.attached=!0}bindUserEvents(){const t=this._listeners,n=this.platform,i=(r,a)=>{n.addEventListener(this,r,a),t[r]=a},s=(r,a,o)=>{r.offsetX=a,r.offsetY=o,this._eventHandler(r)};lt(this.options.events,r=>i(r,s))}bindResponsiveEvents(){this._responsiveListeners||(this._responsiveListeners={});const t=this._responsiveListeners,n=this.platform,i=(c,d)=>{n.addEventListener(this,c,d),t[c]=d},s=(c,d)=>{t[c]&&(n.removeEventListener(this,c,d),delete t[c])},r=(c,d)=>{this.canvas&&this.resize(c,d)};let a;const o=()=>{s("attach",o),this.attached=!0,this.resize(),i("resize",r),i("detach",a)};a=()=>{this.attached=!1,s("resize",r),this._stop(),this._resize(0,0),i("attach",o)},n.isAttached(this.canvas)?o():a()}unbindEvents(){lt(this._listeners,(t,n)=>{this.platform.removeEventListener(this,n,t)}),this._listeners={},lt(this._responsiveListeners,(t,n)=>{this.platform.removeEventListener(this,n,t)}),this._responsiveListeners=void 0}updateHoverStyle(t,n,i){const s=i?"set":"remove";let r,a,o,c;for(n==="dataset"&&(r=this.getDatasetMeta(t[0].datasetIndex),r.controller["_"+s+"DatasetHoverStyle"]()),o=0,c=t.length;o<c;++o){a=t[o];const d=a&&this.getDatasetMeta(a.datasetIndex).controller;d&&d[s+"HoverStyle"](a.element,a.datasetIndex,a.index)}}getActiveElements(){return this._active||[]}setActiveElements(t){const n=this._active||[],i=t.map(({datasetIndex:r,index:a})=>{const o=this.getDatasetMeta(r);if(!o)throw new Error("No dataset found at index "+r);return{datasetIndex:r,element:o.data[a],index:a}});!Og(i,n)&&(this._active=i,this._lastEvent=null,this._updateHoverStyles(i,n))}notifyPlugins(t,n,i){return this._plugins.notify(this,t,n,i)}isPluginEnabled(t){return this._plugins._cache.filter(n=>n.plugin.id===t).length===1}_updateHoverStyles(t,n,i){const s=this.options.hover,r=(c,d)=>c.filter(h=>!d.some(m=>h.datasetIndex===m.datasetIndex&&h.index===m.index)),a=r(n,t),o=i?t:r(t,n);a.length&&this.updateHoverStyle(a,s.mode,!1),o.length&&s.mode&&this.updateHoverStyle(o,s.mode,!0)}_eventHandler(t,n){const i={event:t,replay:n,cancelable:!0,inChartArea:this.isPointInArea(t)},s=a=>(a.options.events||this.options.events).includes(t.native.type);if(this.notifyPlugins("beforeEvent",i,s)===!1)return;const r=this._handleEvent(t,n,i.inChartArea);return i.cancelable=!1,this.notifyPlugins("afterEvent",i,s),(r||i.changed)&&this.render(),this}_handleEvent(t,n,i){const{_active:s=[],options:r}=this,a=n,o=this._getActiveElements(t,s,i,a),c=HF(t),d=D$(t,this._lastEvent,i,c);i&&(this._lastEvent=null,xt(r.onHover,[t,o,this],this),c&&xt(r.onClick,[t,o,this],this));const h=!Og(o,s);return(h||n)&&(this._active=o,this._updateHoverStyles(o,s,n)),this._lastEvent=d,h}_getActiveElements(t,n,i,s){if(t.type==="mouseout")return[];if(!i)return n;const r=this.options.hover;return this.getElementsAtEventForMode(t,r.mode,r,s)}},ge(Gr,"defaults",Ht),ge(Gr,"instances",Bm),ge(Gr,"overrides",Wo),ge(Gr,"registry",vs),ge(Gr,"version",k$),ge(Gr,"getChart",B6),Gr);function V6(){return lt(ru.instances,e=>e._plugins.invalidate())}function R$(e,t,n){const{startAngle:i,pixelMargin:s,x:r,y:a,outerRadius:o,innerRadius:c}=t;let d=s/o;e.beginPath(),e.arc(r,a,o,i-d,n+d),c>s?(d=s/c,e.arc(r,a,c,n+d,i-d,!0)):e.arc(r,a,s,n+$t,i-$t),e.closePath(),e.clip()}function L$(e){return Bb(e,["outerStart","outerEnd","innerStart","innerEnd"])}function z$(e,t,n,i){const s=L$(e.options.borderRadius),r=(n-t)/2,a=Math.min(r,i*t/2),o=c=>{const d=(n-Math.min(r,c))*i/2;return En(c,0,Math.min(r,d))};return{outerStart:o(s.outerStart),outerEnd:o(s.outerEnd),innerStart:En(s.innerStart,0,a),innerEnd:En(s.innerEnd,0,a)}}function Nl(e,t,n,i){return{x:n+e*Math.cos(t),y:i+e*Math.sin(t)}}function Ig(e,t,n,i,s,r){const{x:a,y:o,startAngle:c,pixelMargin:d,innerRadius:h}=t,m=Math.max(t.outerRadius+i+n-d,0),g=h>0?h+i+n+d:0;let v=0;const b=s-c;if(i){const U=h>0?h-i:0,R=m>0?m-i:0,$=(U+R)/2,B=$!==0?b*$/($+i):b;v=(b-B)/2}const w=Math.max(.001,b*m-n/Et)/m,M=(b-w)/2,y=c+M+v,S=s-M-v,{outerStart:T,outerEnd:N,innerStart:k,innerEnd:E}=z$(t,g,m,S-y),D=m-T,O=m-N,I=y+T/D,P=S-N/O,H=g+k,V=g+E,J=y+k/H,Q=S-E/V;if(e.beginPath(),r){const U=(I+P)/2;if(e.arc(a,o,m,I,U),e.arc(a,o,m,U,P),N>0){const W=Nl(O,P,a,o);e.arc(W.x,W.y,N,P,S+$t)}const R=Nl(V,S,a,o);if(e.lineTo(R.x,R.y),E>0){const W=Nl(V,Q,a,o);e.arc(W.x,W.y,E,S+$t,Q+Math.PI)}const $=(S-E/g+(y+k/g))/2;if(e.arc(a,o,g,S-E/g,$,!0),e.arc(a,o,g,$,y+k/g,!0),k>0){const W=Nl(H,J,a,o);e.arc(W.x,W.y,k,J+Math.PI,y-$t)}const B=Nl(D,y,a,o);if(e.lineTo(B.x,B.y),T>0){const W=Nl(D,I,a,o);e.arc(W.x,W.y,T,y-$t,I)}}else{e.moveTo(a,o);const U=Math.cos(I)*m+a,R=Math.sin(I)*m+o;e.lineTo(U,R);const $=Math.cos(P)*m+a,B=Math.sin(P)*m+o;e.lineTo($,B)}e.closePath()}function I$(e,t,n,i,s){const{fullCircles:r,startAngle:a,circumference:o}=t;let c=t.endAngle;if(r){Ig(e,t,n,i,c,s);for(let d=0;d<r;++d)e.fill();isNaN(o)||(c=a+(o%bt||bt))}return Ig(e,t,n,i,c,s),e.fill(),c}function B$(e,t,n,i,s){const{fullCircles:r,startAngle:a,circumference:o,options:c}=t,{borderWidth:d,borderJoinStyle:h,borderDash:m,borderDashOffset:g}=c,v=c.borderAlign==="inner";if(!d)return;e.setLineDash(m||[]),e.lineDashOffset=g,v?(e.lineWidth=d*2,e.lineJoin=h||"round"):(e.lineWidth=d,e.lineJoin=h||"bevel");let b=t.endAngle;if(r){Ig(e,t,n,i,b,s);for(let w=0;w<r;++w)e.stroke();isNaN(o)||(b=a+(o%bt||bt))}v&&R$(e,t,b),r||(Ig(e,t,n,i,b,s),e.stroke())}class sc extends zr{constructor(n){super();ge(this,"circumference");ge(this,"endAngle");ge(this,"fullCircles");ge(this,"innerRadius");ge(this,"outerRadius");ge(this,"pixelMargin");ge(this,"startAngle");this.options=void 0,this.circumference=void 0,this.startAngle=void 0,this.endAngle=void 0,this.innerRadius=void 0,this.outerRadius=void 0,this.pixelMargin=0,this.fullCircles=0,n&&Object.assign(this,n)}inRange(n,i,s){const r=this.getProps(["x","y"],s),{angle:a,distance:o}=TN(r,{x:n,y:i}),{startAngle:c,endAngle:d,innerRadius:h,outerRadius:m,circumference:g}=this.getProps(["startAngle","endAngle","innerRadius","outerRadius","circumference"],s),v=(this.options.spacing+this.options.borderWidth)/2,w=Fe(g,d-c)>=bt||hf(a,c,d),M=vr(o,h+v,m+v);return w&&M}getCenterPoint(n){const{x:i,y:s,startAngle:r,endAngle:a,innerRadius:o,outerRadius:c}=this.getProps(["x","y","startAngle","endAngle","innerRadius","outerRadius"],n),{offset:d,spacing:h}=this.options,m=(r+a)/2,g=(o+c+h+d)/2;return{x:i+Math.cos(m)*g,y:s+Math.sin(m)*g}}tooltipPosition(n){return this.getCenterPoint(n)}draw(n){const{options:i,circumference:s}=this,r=(i.offset||0)/4,a=(i.spacing||0)/2,o=i.circular;if(this.pixelMargin=i.borderAlign==="inner"?.33:0,this.fullCircles=s>bt?Math.floor(s/bt):0,s===0||this.innerRadius<0||this.outerRadius<0)return;n.save();const c=(this.startAngle+this.endAngle)/2;n.translate(Math.cos(c)*r,Math.sin(c)*r);const d=1-Math.sin(Math.min(Et,s||0)),h=r*d;n.fillStyle=i.backgroundColor,n.strokeStyle=i.borderColor,I$(n,this,h,a,o),B$(n,this,h,a,o),n.restore()}}ge(sc,"id","arc"),ge(sc,"defaults",{borderAlign:"center",borderColor:"#fff",borderDash:[],borderDashOffset:0,borderJoinStyle:void 0,borderRadius:0,borderWidth:2,offset:0,spacing:0,angle:void 0,circular:!0}),ge(sc,"defaultRoutes",{backgroundColor:"backgroundColor"}),ge(sc,"descriptors",{_scriptable:!0,_indexable:n=>n!=="borderDash"});function nk(e,t,n=t){e.lineCap=Fe(n.borderCapStyle,t.borderCapStyle),e.setLineDash(Fe(n.borderDash,t.borderDash)),e.lineDashOffset=Fe(n.borderDashOffset,t.borderDashOffset),e.lineJoin=Fe(n.borderJoinStyle,t.borderJoinStyle),e.lineWidth=Fe(n.borderWidth,t.borderWidth),e.strokeStyle=Fe(n.borderColor,t.borderColor)}function V$(e,t,n){e.lineTo(n.x,n.y)}function H$(e){return e.stepped?dU:e.tension||e.cubicInterpolationMode==="monotone"?fU:V$}function ik(e,t,n={}){const i=e.length,{start:s=0,end:r=i-1}=n,{start:a,end:o}=t,c=Math.max(s,a),d=Math.min(r,o),h=s<a&&r<a||s>o&&r>o;return{count:i,start:c,loop:t.loop,ilen:d<c&&!h?i+d-c:d-c}}function F$(e,t,n,i){const{points:s,options:r}=t,{count:a,start:o,loop:c,ilen:d}=ik(s,n,i),h=H$(r);let{move:m=!0,reverse:g}=i||{},v,b,w;for(v=0;v<=d;++v)b=s[(o+(g?d-v:v))%a],!b.skip&&(m?(e.moveTo(b.x,b.y),m=!1):h(e,w,b,g,r.stepped),w=b);return c&&(b=s[(o+(g?d:0))%a],h(e,w,b,g,r.stepped)),!!c}function U$(e,t,n,i){const s=t.points,{count:r,start:a,ilen:o}=ik(s,n,i),{move:c=!0,reverse:d}=i||{};let h=0,m=0,g,v,b,w,M,y;const S=N=>(a+(d?o-N:N))%r,T=()=>{w!==M&&(e.lineTo(h,M),e.lineTo(h,w),e.lineTo(h,y))};for(c&&(v=s[S(0)],e.moveTo(v.x,v.y)),g=0;g<=o;++g){if(v=s[S(g)],v.skip)continue;const N=v.x,k=v.y,E=N|0;E===b?(k<w?w=k:k>M&&(M=k),h=(m*h+N)/++m):(T(),e.lineTo(N,k),b=E,m=0,w=M=k),y=k}T()}function hy(e){const t=e.options,n=t.borderDash&&t.borderDash.length;return!e._decimated&&!e._loop&&!t.tension&&t.cubicInterpolationMode!=="monotone"&&!t.stepped&&!n?U$:F$}function Z$(e){return e.stepped?ZU:e.tension||e.cubicInterpolationMode==="monotone"?$U:po}function $$(e,t,n,i){let s=t._path;s||(s=t._path=new Path2D,t.path(s,n,i)&&s.closePath()),nk(e,t.options),e.stroke(s)}function W$(e,t,n,i){const{segments:s,options:r}=t,a=hy(t);for(const o of s)nk(e,r,o.style),e.beginPath(),a(e,t,o,{start:n,end:n+i-1})&&e.closePath(),e.stroke()}const G$=typeof Path2D=="function";function Y$(e,t,n,i){G$&&!t.options.segment?$$(e,t,n,i):W$(e,t,n,i)}class pa extends zr{constructor(t){super(),this.animated=!0,this.options=void 0,this._chart=void 0,this._loop=void 0,this._fullLoop=void 0,this._path=void 0,this._points=void 0,this._segments=void 0,this._decimated=!1,this._pointsUpdated=!1,this._datasetIndex=void 0,t&&Object.assign(this,t)}updateControlPoints(t,n){const i=this.options;if((i.tension||i.cubicInterpolationMode==="monotone")&&!i.stepped&&!this._pointsUpdated){const s=i.spanGaps?this._loop:this._fullLoop;LU(this._points,i,t,s,n),this._pointsUpdated=!0}}set points(t){this._points=t,delete this._segments,delete this._path,this._pointsUpdated=!1}get points(){return this._points}get segments(){return this._segments||(this._segments=KU(this,this.options.segment))}first(){const t=this.segments,n=this.points;return t.length&&n[t[0].start]}last(){const t=this.segments,n=this.points,i=t.length;return i&&n[t[i-1].end]}interpolate(t,n){const i=this.options,s=t[n],r=this.points,a=UN(this,{property:n,start:s,end:s});if(!a.length)return;const o=[],c=Z$(i);let d,h;for(d=0,h=a.length;d<h;++d){const{start:m,end:g}=a[d],v=r[m],b=r[g];if(v===b){o.push(v);continue}const w=Math.abs((s-v[n])/(b[n]-v[n])),M=c(v,b,w,i.stepped);M[n]=t[n],o.push(M)}return o.length===1?o[0]:o}pathSegment(t,n,i){return hy(this)(t,this,n,i)}path(t,n,i){const s=this.segments,r=hy(this);let a=this._loop;n=n||0,i=i||this.points.length-n;for(const o of s)a&=r(t,this,o,{start:n,end:n+i-1});return!!a}draw(t,n,i,s){const r=this.options||{};(this.points||[]).length&&r.borderWidth&&(t.save(),Y$(t,this,i,s),t.restore()),this.animated&&(this._pointsUpdated=!1,this._path=void 0)}}ge(pa,"id","line"),ge(pa,"defaults",{borderCapStyle:"butt",borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",borderWidth:3,capBezierPoints:!0,cubicInterpolationMode:"default",fill:!1,spanGaps:!1,stepped:!1,tension:0}),ge(pa,"defaultRoutes",{backgroundColor:"backgroundColor",borderColor:"borderColor"}),ge(pa,"descriptors",{_scriptable:!0,_indexable:t=>t!=="borderDash"&&t!=="fill"});function H6(e,t,n,i){const s=e.options,{[n]:r}=e.getProps([n],i);return Math.abs(t-r)<s.radius+s.hitRadius}class Vm extends zr{constructor(n){super();ge(this,"parsed");ge(this,"skip");ge(this,"stop");this.options=void 0,this.parsed=void 0,this.skip=void 0,this.stop=void 0,n&&Object.assign(this,n)}inRange(n,i,s){const r=this.options,{x:a,y:o}=this.getProps(["x","y"],s);return Math.pow(n-a,2)+Math.pow(i-o,2)<Math.pow(r.hitRadius+r.radius,2)}inXRange(n,i){return H6(this,n,"x",i)}inYRange(n,i){return H6(this,n,"y",i)}getCenterPoint(n){const{x:i,y:s}=this.getProps(["x","y"],n);return{x:i,y:s}}size(n){n=n||this.options||{};let i=n.radius||0;i=Math.max(i,i&&n.hoverRadius||0);const s=i&&n.borderWidth||0;return(i+s)*2}draw(n,i){const s=this.options;this.skip||s.radius<.1||!xr(this,i,this.size(s)/2)||(n.strokeStyle=s.borderColor,n.lineWidth=s.borderWidth,n.fillStyle=s.backgroundColor,uy(n,s,this.x,this.y))}getRange(){const n=this.options||{};return n.radius+n.hitRadius}}ge(Vm,"id","point"),ge(Vm,"defaults",{borderWidth:1,hitRadius:1,hoverBorderWidth:1,hoverRadius:4,pointStyle:"circle",radius:3,rotation:0}),ge(Vm,"defaultRoutes",{backgroundColor:"backgroundColor",borderColor:"borderColor"});function sk(e,t){const{x:n,y:i,base:s,width:r,height:a}=e.getProps(["x","y","base","width","height"],t);let o,c,d,h,m;return e.horizontal?(m=a/2,o=Math.min(n,s),c=Math.max(n,s),d=i-m,h=i+m):(m=r/2,o=n-m,c=n+m,d=Math.min(i,s),h=Math.max(i,s)),{left:o,top:d,right:c,bottom:h}}function va(e,t,n,i){return e?0:En(t,n,i)}function q$(e,t,n){const i=e.options.borderWidth,s=e.borderSkipped,r=DN(i);return{t:va(s.top,r.top,0,n),r:va(s.right,r.right,0,t),b:va(s.bottom,r.bottom,0,n),l:va(s.left,r.left,0,t)}}function X$(e,t,n){const{enableBorderRadius:i}=e.getProps(["enableBorderRadius"]),s=e.options.borderRadius,r=Lo(s),a=Math.min(t,n),o=e.borderSkipped,c=i||Ge(s);return{topLeft:va(!c||o.top||o.left,r.topLeft,0,a),topRight:va(!c||o.top||o.right,r.topRight,0,a),bottomLeft:va(!c||o.bottom||o.left,r.bottomLeft,0,a),bottomRight:va(!c||o.bottom||o.right,r.bottomRight,0,a)}}function K$(e){const t=sk(e),n=t.right-t.left,i=t.bottom-t.top,s=q$(e,n/2,i/2),r=X$(e,n/2,i/2);return{outer:{x:t.left,y:t.top,w:n,h:i,radius:r},inner:{x:t.left+s.l,y:t.top+s.t,w:n-s.l-s.r,h:i-s.t-s.b,radius:{topLeft:Math.max(0,r.topLeft-Math.max(s.t,s.l)),topRight:Math.max(0,r.topRight-Math.max(s.t,s.r)),bottomLeft:Math.max(0,r.bottomLeft-Math.max(s.b,s.l)),bottomRight:Math.max(0,r.bottomRight-Math.max(s.b,s.r))}}}}function Mv(e,t,n,i){const s=t===null,r=n===null,o=e&&!(s&&r)&&sk(e,i);return o&&(s||vr(t,o.left,o.right))&&(r||vr(n,o.top,o.bottom))}function Q$(e){return e.topLeft||e.topRight||e.bottomLeft||e.bottomRight}function J$(e,t){e.rect(t.x,t.y,t.w,t.h)}function Tv(e,t,n={}){const i=e.x!==n.x?-t:0,s=e.y!==n.y?-t:0,r=(e.x+e.w!==n.x+n.w?t:0)-i,a=(e.y+e.h!==n.y+n.h?t:0)-s;return{x:e.x+i,y:e.y+s,w:e.w+r,h:e.h+a,radius:e.radius}}class Fd extends zr{constructor(t){super(),this.options=void 0,this.horizontal=void 0,this.base=void 0,this.width=void 0,this.height=void 0,this.inflateAmount=void 0,t&&Object.assign(this,t)}draw(t){const{inflateAmount:n,options:{borderColor:i,backgroundColor:s}}=this,{inner:r,outer:a}=K$(this),o=Q$(a.radius)?mf:J$;t.save(),(a.w!==r.w||a.h!==r.h)&&(t.beginPath(),o(t,Tv(a,n,r)),t.clip(),o(t,Tv(r,-n,a)),t.fillStyle=i,t.fill("evenodd")),t.beginPath(),o(t,Tv(r,n)),t.fillStyle=s,t.fill(),t.restore()}inRange(t,n,i){return Mv(this,t,n,i)}inXRange(t,n){return Mv(this,t,null,n)}inYRange(t,n){return Mv(this,null,t,n)}getCenterPoint(t){const{x:n,y:i,base:s,horizontal:r}=this.getProps(["x","y","base","horizontal"],t);return{x:r?(n+s)/2:n,y:r?i:(i+s)/2}}getRange(t){return t==="x"?this.width/2:this.height/2}}ge(Fd,"id","bar"),ge(Fd,"defaults",{borderSkipped:"start",borderWidth:0,borderRadius:0,inflateAmount:"auto",pointStyle:void 0}),ge(Fd,"defaultRoutes",{backgroundColor:"backgroundColor",borderColor:"borderColor"});function eW(e,t,n){const i=e.segments,s=e.points,r=t.points,a=[];for(const o of i){let{start:c,end:d}=o;d=Wb(c,d,s);const h=my(n,s[c],s[d],o.loop);if(!t.segments){a.push({source:o,target:h,start:s[c],end:s[d]});continue}const m=UN(t,h);for(const g of m){const v=my(n,r[g.start],r[g.end],g.loop),b=FN(o,s,v);for(const w of b)a.push({source:w,target:g,start:{[n]:F6(h,v,"start",Math.max)},end:{[n]:F6(h,v,"end",Math.min)}})}}return a}function my(e,t,n,i){if(i)return;let s=t[e],r=n[e];return e==="angle"&&(s=ri(s),r=ri(r)),{property:e,start:s,end:r}}function tW(e,t){const{x:n=null,y:i=null}=e||{},s=t.points,r=[];return t.segments.forEach(({start:a,end:o})=>{o=Wb(a,o,s);const c=s[a],d=s[o];i!==null?(r.push({x:c.x,y:i}),r.push({x:d.x,y:i})):n!==null&&(r.push({x:n,y:c.y}),r.push({x:n,y:d.y}))}),r}function Wb(e,t,n){for(;t>e;t--){const i=n[t];if(!isNaN(i.x)&&!isNaN(i.y))break}return t}function F6(e,t,n,i){return e&&t?i(e[n],t[n]):e?e[n]:t?t[n]:0}function rk(e,t){let n=[],i=!1;return Nt(e)?(i=!0,n=e):n=tW(e,t),n.length?new pa({points:n,options:{tension:0},_loop:i,_fullLoop:i}):null}function U6(e){return e&&e.fill!==!1}function nW(e,t,n){let s=e[t].fill;const r=[t];let a;if(!n)return s;for(;s!==!1&&r.indexOf(s)===-1;){if(!Vt(s))return s;if(a=e[s],!a)return!1;if(a.visible)return s;r.push(s),s=a.fill}return!1}function iW(e,t,n){const i=oW(e);if(Ge(i))return isNaN(i.value)?!1:i;let s=parseFloat(i);return Vt(s)&&Math.floor(s)===s?sW(i[0],t,s,n):["origin","start","end","stack","shape"].indexOf(i)>=0&&i}function sW(e,t,n,i){return(e==="-"||e==="+")&&(n=t+n),n===t||n<0||n>=i?!1:n}function rW(e,t){let n=null;return e==="start"?n=t.bottom:e==="end"?n=t.top:Ge(e)?n=t.getPixelForValue(e.value):t.getBasePixel&&(n=t.getBasePixel()),n}function aW(e,t,n){let i;return e==="start"?i=n:e==="end"?i=t.options.reverse?t.min:t.max:Ge(e)?i=e.value:i=t.getBaseValue(),i}function oW(e){const t=e.options,n=t.fill;let i=Fe(n&&n.target,n);return i===void 0&&(i=!!t.backgroundColor),i===!1||i===null?!1:i===!0?"origin":i}function lW(e){const{scale:t,index:n,line:i}=e,s=[],r=i.segments,a=i.points,o=cW(t,n);o.push(rk({x:null,y:t.bottom},i));for(let c=0;c<r.length;c++){const d=r[c];for(let h=d.start;h<=d.end;h++)uW(s,a[h],o)}return new pa({points:s,options:{}})}function cW(e,t){const n=[],i=e.getMatchingVisibleMetas("line");for(let s=0;s<i.length;s++){const r=i[s];if(r.index===t)break;r.hidden||n.unshift(r.dataset)}return n}function uW(e,t,n){const i=[];for(let s=0;s<n.length;s++){const r=n[s],{first:a,last:o,point:c}=dW(r,t,"x");if(!(!c||a&&o)){if(a)i.unshift(c);else if(e.push(c),!o)break}}e.push(...i)}function dW(e,t,n){const i=e.interpolate(t,n);if(!i)return{};const s=i[n],r=e.segments,a=e.points;let o=!1,c=!1;for(let d=0;d<r.length;d++){const h=r[d],m=a[h.start][n],g=a[h.end][n];if(vr(s,m,g)){o=s===m,c=s===g;break}}return{first:o,last:c,point:i}}class ak{constructor(t){this.x=t.x,this.y=t.y,this.radius=t.radius}pathSegment(t,n,i){const{x:s,y:r,radius:a}=this;return n=n||{start:0,end:bt},t.arc(s,r,a,n.end,n.start,!0),!i.bounds}interpolate(t){const{x:n,y:i,radius:s}=this,r=t.angle;return{x:n+Math.cos(r)*s,y:i+Math.sin(r)*s,angle:r}}}function fW(e){const{chart:t,fill:n,line:i}=e;if(Vt(n))return hW(t,n);if(n==="stack")return lW(e);if(n==="shape")return!0;const s=mW(e);return s instanceof ak?s:rk(s,i)}function hW(e,t){const n=e.getDatasetMeta(t);return n&&e.isDatasetVisible(t)?n.dataset:null}function mW(e){return(e.scale||{}).getPointPositionForValue?pW(e):gW(e)}function gW(e){const{scale:t={},fill:n}=e,i=rW(n,t);if(Vt(i)){const s=t.isHorizontal();return{x:s?i:null,y:s?null:i}}return null}function pW(e){const{scale:t,fill:n}=e,i=t.options,s=t.getLabels().length,r=i.reverse?t.max:t.min,a=aW(n,t,r),o=[];if(i.grid.circular){const c=t.getPointPositionForValue(0,r);return new ak({x:c.x,y:c.y,radius:t.getDistanceFromCenterForValue(a)})}for(let c=0;c<s;++c)o.push(t.getPointPositionForValue(c,a));return o}function jv(e,t,n){const i=fW(t),{line:s,scale:r,axis:a}=t,o=s.options,c=o.fill,d=o.backgroundColor,{above:h=d,below:m=d}=c||{};i&&s.points.length&&(Kp(e,n),vW(e,{line:s,target:i,above:h,below:m,area:n,scale:r,axis:a}),Qp(e))}function vW(e,t){const{line:n,target:i,above:s,below:r,area:a,scale:o}=t,c=n._loop?"angle":t.axis;e.save(),c==="x"&&r!==s&&(Z6(e,i,a.top),$6(e,{line:n,target:i,color:s,scale:o,property:c}),e.restore(),e.save(),Z6(e,i,a.bottom)),$6(e,{line:n,target:i,color:r,scale:o,property:c}),e.restore()}function Z6(e,t,n){const{segments:i,points:s}=t;let r=!0,a=!1;e.beginPath();for(const o of i){const{start:c,end:d}=o,h=s[c],m=s[Wb(c,d,s)];r?(e.moveTo(h.x,h.y),r=!1):(e.lineTo(h.x,n),e.lineTo(h.x,h.y)),a=!!t.pathSegment(e,o,{move:a}),a?e.closePath():e.lineTo(m.x,n)}e.lineTo(t.first().x,n),e.closePath(),e.clip()}function $6(e,t){const{line:n,target:i,property:s,color:r,scale:a}=t,o=eW(n,i,s);for(const{source:c,target:d,start:h,end:m}of o){const{style:{backgroundColor:g=r}={}}=c,v=i!==!0;e.save(),e.fillStyle=g,xW(e,a,v&&my(s,h,m)),e.beginPath();const b=!!n.pathSegment(e,c);let w;if(v){b?e.closePath():W6(e,i,m,s);const M=!!i.pathSegment(e,d,{move:b,reverse:!0});w=b&&M,w||W6(e,i,h,s)}e.closePath(),e.fill(w?"evenodd":"nonzero"),e.restore()}}function xW(e,t,n){const{top:i,bottom:s}=t.chart.chartArea,{property:r,start:a,end:o}=n||{};r==="x"&&(e.beginPath(),e.rect(a,i,o-a,s-i),e.clip())}function W6(e,t,n,i){const s=t.interpolate(n,i);s&&e.lineTo(s.x,s.y)}var Gb={id:"filler",afterDatasetsUpdate(e,t,n){const i=(e.data.datasets||[]).length,s=[];let r,a,o,c;for(a=0;a<i;++a)r=e.getDatasetMeta(a),o=r.dataset,c=null,o&&o.options&&o instanceof pa&&(c={visible:e.isDatasetVisible(a),index:a,fill:iW(o,a,i),chart:e,axis:r.controller.options.indexAxis,scale:r.vScale,line:o}),r.$filler=c,s.push(c);for(a=0;a<i;++a)c=s[a],!(!c||c.fill===!1)&&(c.fill=nW(s,a,n.propagate))},beforeDraw(e,t,n){const i=n.drawTime==="beforeDraw",s=e.getSortedVisibleDatasetMetas(),r=e.chartArea;for(let a=s.length-1;a>=0;--a){const o=s[a].$filler;o&&(o.line.updateControlPoints(r,o.axis),i&&o.fill&&jv(e.ctx,o,r))}},beforeDatasetsDraw(e,t,n){if(n.drawTime!=="beforeDatasetsDraw")return;const i=e.getSortedVisibleDatasetMetas();for(let s=i.length-1;s>=0;--s){const r=i[s].$filler;U6(r)&&jv(e.ctx,r,e.chartArea)}},beforeDatasetDraw(e,t,n){const i=t.meta.$filler;!U6(i)||n.drawTime!=="beforeDatasetDraw"||jv(e.ctx,i,e.chartArea)},defaults:{propagate:!0,drawTime:"beforeDatasetDraw"}};const G6=(e,t)=>{let{boxHeight:n=t,boxWidth:i=t}=e;return e.usePointStyle&&(n=Math.min(n,t),i=e.pointStyleWidth||Math.min(i,t)),{boxWidth:i,boxHeight:n,itemHeight:Math.max(t,n)}},yW=(e,t)=>e!==null&&t!==null&&e.datasetIndex===t.datasetIndex&&e.index===t.index;class Y6 extends zr{constructor(t){super(),this._added=!1,this.legendHitBoxes=[],this._hoveredItem=null,this.doughnutMode=!1,this.chart=t.chart,this.options=t.options,this.ctx=t.ctx,this.legendItems=void 0,this.columnSizes=void 0,this.lineWidths=void 0,this.maxHeight=void 0,this.maxWidth=void 0,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.height=void 0,this.width=void 0,this._margins=void 0,this.position=void 0,this.weight=void 0,this.fullSize=void 0}update(t,n,i){this.maxWidth=t,this.maxHeight=n,this._margins=i,this.setDimensions(),this.buildLabels(),this.fit()}setDimensions(){this.isHorizontal()?(this.width=this.maxWidth,this.left=this._margins.left,this.right=this.width):(this.height=this.maxHeight,this.top=this._margins.top,this.bottom=this.height)}buildLabels(){const t=this.options.labels||{};let n=xt(t.generateLabels,[this.chart],this)||[];t.filter&&(n=n.filter(i=>t.filter(i,this.chart.data))),t.sort&&(n=n.sort((i,s)=>t.sort(i,s,this.chart.data))),this.options.reverse&&n.reverse(),this.legendItems=n}fit(){const{options:t,ctx:n}=this;if(!t.display){this.width=this.height=0;return}const i=t.labels,s=en(i.font),r=s.size,a=this._computeTitleHeight(),{boxWidth:o,itemHeight:c}=G6(i,r);let d,h;n.font=s.string,this.isHorizontal()?(d=this.maxWidth,h=this._fitRows(a,r,o,c)+10):(h=this.maxHeight,d=this._fitCols(a,s,o,c)+10),this.width=Math.min(d,t.maxWidth||this.maxWidth),this.height=Math.min(h,t.maxHeight||this.maxHeight)}_fitRows(t,n,i,s){const{ctx:r,maxWidth:a,options:{labels:{padding:o}}}=this,c=this.legendHitBoxes=[],d=this.lineWidths=[0],h=s+o;let m=t;r.textAlign="left",r.textBaseline="middle";let g=-1,v=-h;return this.legendItems.forEach((b,w)=>{const M=i+n/2+r.measureText(b.text).width;(w===0||d[d.length-1]+M+2*o>a)&&(m+=h,d[d.length-(w>0?0:1)]=0,v+=h,g++),c[w]={left:0,top:v,row:g,width:M,height:s},d[d.length-1]+=M+o}),m}_fitCols(t,n,i,s){const{ctx:r,maxHeight:a,options:{labels:{padding:o}}}=this,c=this.legendHitBoxes=[],d=this.columnSizes=[],h=a-t;let m=o,g=0,v=0,b=0,w=0;return this.legendItems.forEach((M,y)=>{const{itemWidth:S,itemHeight:T}=_W(i,n,r,M,s);y>0&&v+T+2*o>h&&(m+=g+o,d.push({width:g,height:v}),b+=g+o,w++,g=v=0),c[y]={left:b,top:v,col:w,width:S,height:T},g=Math.max(g,S),v+=T+o}),m+=g,d.push({width:g,height:v}),m}adjustHitBoxes(){if(!this.options.display)return;const t=this._computeTitleHeight(),{legendHitBoxes:n,options:{align:i,labels:{padding:s},rtl:r}}=this,a=pc(r,this.left,this.width);if(this.isHorizontal()){let o=0,c=bn(i,this.left+s,this.right-this.lineWidths[o]);for(const d of n)o!==d.row&&(o=d.row,c=bn(i,this.left+s,this.right-this.lineWidths[o])),d.top+=this.top+t+s,d.left=a.leftForLtr(a.x(c),d.width),c+=d.width+s}else{let o=0,c=bn(i,this.top+t+s,this.bottom-this.columnSizes[o].height);for(const d of n)d.col!==o&&(o=d.col,c=bn(i,this.top+t+s,this.bottom-this.columnSizes[o].height)),d.top=c,d.left+=this.left+s,d.left=a.leftForLtr(a.x(d.left),d.width),c+=d.height+s}}isHorizontal(){return this.options.position==="top"||this.options.position==="bottom"}draw(){if(this.options.display){const t=this.ctx;Kp(t,this),this._draw(),Qp(t)}}_draw(){const{options:t,columnSizes:n,lineWidths:i,ctx:s}=this,{align:r,labels:a}=t,o=Ht.color,c=pc(t.rtl,this.left,this.width),d=en(a.font),{padding:h}=a,m=d.size,g=m/2;let v;this.drawTitle(),s.textAlign=c.textAlign("left"),s.textBaseline="middle",s.lineWidth=.5,s.font=d.string;const{boxWidth:b,boxHeight:w,itemHeight:M}=G6(a,m),y=function(E,D,O){if(isNaN(b)||b<=0||isNaN(w)||w<0)return;s.save();const I=Fe(O.lineWidth,1);if(s.fillStyle=Fe(O.fillStyle,o),s.lineCap=Fe(O.lineCap,"butt"),s.lineDashOffset=Fe(O.lineDashOffset,0),s.lineJoin=Fe(O.lineJoin,"miter"),s.lineWidth=I,s.strokeStyle=Fe(O.strokeStyle,o),s.setLineDash(Fe(O.lineDash,[])),a.usePointStyle){const P={radius:w*Math.SQRT2/2,pointStyle:O.pointStyle,rotation:O.rotation,borderWidth:I},H=c.xPlus(E,b/2),V=D+g;ON(s,P,H,V,a.pointStyleWidth&&b)}else{const P=D+Math.max((m-w)/2,0),H=c.leftForLtr(E,b),V=Lo(O.borderRadius);s.beginPath(),Object.values(V).some(J=>J!==0)?mf(s,{x:H,y:P,w:b,h:w,radius:V}):s.rect(H,P,b,w),s.fill(),I!==0&&s.stroke()}s.restore()},S=function(E,D,O){Go(s,O.text,E,D+M/2,d,{strikethrough:O.hidden,textAlign:c.textAlign(O.textAlign)})},T=this.isHorizontal(),N=this._computeTitleHeight();T?v={x:bn(r,this.left+h,this.right-i[0]),y:this.top+h+N,line:0}:v={x:this.left+h,y:bn(r,this.top+N+h,this.bottom-n[0].height),line:0},BN(this.ctx,t.textDirection);const k=M+h;this.legendItems.forEach((E,D)=>{s.strokeStyle=E.fontColor,s.fillStyle=E.fontColor;const O=s.measureText(E.text).width,I=c.textAlign(E.textAlign||(E.textAlign=a.textAlign)),P=b+g+O;let H=v.x,V=v.y;c.setWidth(this.width),T?D>0&&H+P+h>this.right&&(V=v.y+=k,v.line++,H=v.x=bn(r,this.left+h,this.right-i[v.line])):D>0&&V+k>this.bottom&&(H=v.x=H+n[v.line].width+h,v.line++,V=v.y=bn(r,this.top+N+h,this.bottom-n[v.line].height));const J=c.x(H);if(y(J,V,E),H=QF(I,H+b+g,T?H+P:this.right,t.rtl),S(c.x(H),V,E),T)v.x+=P+h;else if(typeof E.text!="string"){const Q=d.lineHeight;v.y+=ok(E,Q)+h}else v.y+=k}),VN(this.ctx,t.textDirection)}drawTitle(){const t=this.options,n=t.title,i=en(n.font),s=Dn(n.padding);if(!n.display)return;const r=pc(t.rtl,this.left,this.width),a=this.ctx,o=n.position,c=i.size/2,d=s.top+c;let h,m=this.left,g=this.width;if(this.isHorizontal())g=Math.max(...this.lineWidths),h=this.top+d,m=bn(t.align,m,this.right-g);else{const b=this.columnSizes.reduce((w,M)=>Math.max(w,M.height),0);h=d+bn(t.align,this.top,this.bottom-b-t.labels.padding-this._computeTitleHeight())}const v=bn(o,m,m+g);a.textAlign=r.textAlign(zb(o)),a.textBaseline="middle",a.strokeStyle=n.color,a.fillStyle=n.color,a.font=i.string,Go(a,n.text,v,h,i)}_computeTitleHeight(){const t=this.options.title,n=en(t.font),i=Dn(t.padding);return t.display?n.lineHeight+i.height:0}_getLegendItemAt(t,n){let i,s,r;if(vr(t,this.left,this.right)&&vr(n,this.top,this.bottom)){for(r=this.legendHitBoxes,i=0;i<r.length;++i)if(s=r[i],vr(t,s.left,s.left+s.width)&&vr(n,s.top,s.top+s.height))return this.legendItems[i]}return null}handleEvent(t){const n=this.options;if(!SW(t.type,n))return;const i=this._getLegendItemAt(t.x,t.y);if(t.type==="mousemove"||t.type==="mouseout"){const s=this._hoveredItem,r=yW(s,i);s&&!r&&xt(n.onLeave,[t,s,this],this),this._hoveredItem=i,i&&!r&&xt(n.onHover,[t,i,this],this)}else i&&xt(n.onClick,[t,i,this],this)}}function _W(e,t,n,i,s){const r=bW(i,e,t,n),a=wW(s,i,t.lineHeight);return{itemWidth:r,itemHeight:a}}function bW(e,t,n,i){let s=e.text;return s&&typeof s!="string"&&(s=s.reduce((r,a)=>r.length>a.length?r:a)),t+n.size/2+i.measureText(s).width}function wW(e,t,n){let i=e;return typeof t.text!="string"&&(i=ok(t,n)),i}function ok(e,t){const n=e.text?e.text.length:0;return t*n}function SW(e,t){return!!((e==="mousemove"||e==="mouseout")&&(t.onHover||t.onLeave)||t.onClick&&(e==="click"||e==="mouseup"))}var Yb={id:"legend",_element:Y6,start(e,t,n){const i=e.legend=new Y6({ctx:e.ctx,options:n,chart:e});Di.configure(e,i,n),Di.addBox(e,i)},stop(e){Di.removeBox(e,e.legend),delete e.legend},beforeUpdate(e,t,n){const i=e.legend;Di.configure(e,i,n),i.options=n},afterUpdate(e){const t=e.legend;t.buildLabels(),t.adjustHitBoxes()},afterEvent(e,t){t.replay||e.legend.handleEvent(t.event)},defaults:{display:!0,position:"top",align:"center",fullSize:!0,reverse:!1,weight:1e3,onClick(e,t,n){const i=t.datasetIndex,s=n.chart;s.isDatasetVisible(i)?(s.hide(i),t.hidden=!0):(s.show(i),t.hidden=!1)},onHover:null,onLeave:null,labels:{color:e=>e.chart.options.color,boxWidth:40,padding:10,generateLabels(e){const t=e.data.datasets,{labels:{usePointStyle:n,pointStyle:i,textAlign:s,color:r,useBorderRadius:a,borderRadius:o}}=e.legend.options;return e._getSortedDatasetMetas().map(c=>{const d=c.controller.getStyle(n?0:void 0),h=Dn(d.borderWidth);return{text:t[c.index].label,fillStyle:d.backgroundColor,fontColor:r,hidden:!c.visible,lineCap:d.borderCapStyle,lineDash:d.borderDash,lineDashOffset:d.borderDashOffset,lineJoin:d.borderJoinStyle,lineWidth:(h.width+h.height)/4,strokeStyle:d.borderColor,pointStyle:i||d.pointStyle,rotation:d.rotation,textAlign:s||d.textAlign,borderRadius:a&&(o||d.borderRadius),datasetIndex:c.index}},this)}},title:{color:e=>e.chart.options.color,display:!1,position:"center",text:""}},descriptors:{_scriptable:e=>!e.startsWith("on"),labels:{_scriptable:e=>!["generateLabels","filter","sort"].includes(e)}}};let lk=class extends zr{constructor(t){super(),this.chart=t.chart,this.options=t.options,this.ctx=t.ctx,this._padding=void 0,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.width=void 0,this.height=void 0,this.position=void 0,this.weight=void 0,this.fullSize=void 0}update(t,n){const i=this.options;if(this.left=0,this.top=0,!i.display){this.width=this.height=this.right=this.bottom=0;return}this.width=this.right=t,this.height=this.bottom=n;const s=Nt(i.text)?i.text.length:1;this._padding=Dn(i.padding);const r=s*en(i.font).lineHeight+this._padding.height;this.isHorizontal()?this.height=r:this.width=r}isHorizontal(){const t=this.options.position;return t==="top"||t==="bottom"}_drawArgs(t){const{top:n,left:i,bottom:s,right:r,options:a}=this,o=a.align;let c=0,d,h,m;return this.isHorizontal()?(h=bn(o,i,r),m=n+t,d=r-i):(a.position==="left"?(h=i+t,m=bn(o,s,n),c=Et*-.5):(h=r-t,m=bn(o,n,s),c=Et*.5),d=s-n),{titleX:h,titleY:m,maxWidth:d,rotation:c}}draw(){const t=this.ctx,n=this.options;if(!n.display)return;const i=en(n.font),r=i.lineHeight/2+this._padding.top,{titleX:a,titleY:o,maxWidth:c,rotation:d}=this._drawArgs(r);Go(t,n.text,0,0,i,{color:n.color,maxWidth:c,rotation:d,textAlign:zb(n.align),textBaseline:"middle",translation:[a,o]})}};function CW(e,t){const n=new lk({ctx:e.ctx,options:t,chart:e});Di.configure(e,n,t),Di.addBox(e,n),e.titleBlock=n}var ck={id:"title",_element:lk,start(e,t,n){CW(e,n)},stop(e){const t=e.titleBlock;Di.removeBox(e,t),delete e.titleBlock},beforeUpdate(e,t,n){const i=e.titleBlock;Di.configure(e,i,n),i.options=n},defaults:{align:"center",display:!1,font:{weight:"bold"},fullSize:!0,padding:10,position:"top",text:"",weight:2e3},defaultRoutes:{color:"color"},descriptors:{_scriptable:!0,_indexable:!1}};const dd={average(e){if(!e.length)return!1;let t,n,i=new Set,s=0,r=0;for(t=0,n=e.length;t<n;++t){const o=e[t].element;if(o&&o.hasValue()){const c=o.tooltipPosition();i.add(c.x),s+=c.y,++r}}return{x:[...i].reduce((o,c)=>o+c)/i.size,y:s/r}},nearest(e,t){if(!e.length)return!1;let n=t.x,i=t.y,s=Number.POSITIVE_INFINITY,r,a,o;for(r=0,a=e.length;r<a;++r){const c=e[r].element;if(c&&c.hasValue()){const d=c.getCenterPoint(),h=ly(t,d);h<s&&(s=h,o=c)}}if(o){const c=o.tooltipPosition();n=c.x,i=c.y}return{x:n,y:i}}};function ps(e,t){return t&&(Nt(t)?Array.prototype.push.apply(e,t):e.push(t)),e}function or(e){return(typeof e=="string"||e instanceof String)&&e.indexOf(`
`)>-1?e.split(`
`):e}function MW(e,t){const{element:n,datasetIndex:i,index:s}=t,r=e.getDatasetMeta(i).controller,{label:a,value:o}=r.getLabelAndValue(s);return{chart:e,label:a,parsed:r.getParsed(s),raw:e.data.datasets[i].data[s],formattedValue:o,dataset:r.getDataset(),dataIndex:s,datasetIndex:i,element:n}}function q6(e,t){const n=e.chart.ctx,{body:i,footer:s,title:r}=e,{boxWidth:a,boxHeight:o}=t,c=en(t.bodyFont),d=en(t.titleFont),h=en(t.footerFont),m=r.length,g=s.length,v=i.length,b=Dn(t.padding);let w=b.height,M=0,y=i.reduce((N,k)=>N+k.before.length+k.lines.length+k.after.length,0);if(y+=e.beforeBody.length+e.afterBody.length,m&&(w+=m*d.lineHeight+(m-1)*t.titleSpacing+t.titleMarginBottom),y){const N=t.displayColors?Math.max(o,c.lineHeight):c.lineHeight;w+=v*N+(y-v)*c.lineHeight+(y-1)*t.bodySpacing}g&&(w+=t.footerMarginTop+g*h.lineHeight+(g-1)*t.footerSpacing);let S=0;const T=function(N){M=Math.max(M,n.measureText(N).width+S)};return n.save(),n.font=d.string,lt(e.title,T),n.font=c.string,lt(e.beforeBody.concat(e.afterBody),T),S=t.displayColors?a+2+t.boxPadding:0,lt(i,N=>{lt(N.before,T),lt(N.lines,T),lt(N.after,T)}),S=0,n.font=h.string,lt(e.footer,T),n.restore(),M+=b.width,{width:M,height:w}}function TW(e,t){const{y:n,height:i}=t;return n<i/2?"top":n>e.height-i/2?"bottom":"center"}function jW(e,t,n,i){const{x:s,width:r}=i,a=n.caretSize+n.caretPadding;if(e==="left"&&s+r+a>t.width||e==="right"&&s-r-a<0)return!0}function NW(e,t,n,i){const{x:s,width:r}=n,{width:a,chartArea:{left:o,right:c}}=e;let d="center";return i==="center"?d=s<=(o+c)/2?"left":"right":s<=r/2?d="left":s>=a-r/2&&(d="right"),jW(d,e,t,n)&&(d="center"),d}function X6(e,t,n){const i=n.yAlign||t.yAlign||TW(e,n);return{xAlign:n.xAlign||t.xAlign||NW(e,t,n,i),yAlign:i}}function kW(e,t){let{x:n,width:i}=e;return t==="right"?n-=i:t==="center"&&(n-=i/2),n}function EW(e,t,n){let{y:i,height:s}=e;return t==="top"?i+=n:t==="bottom"?i-=s+n:i-=s/2,i}function K6(e,t,n,i){const{caretSize:s,caretPadding:r,cornerRadius:a}=e,{xAlign:o,yAlign:c}=n,d=s+r,{topLeft:h,topRight:m,bottomLeft:g,bottomRight:v}=Lo(a);let b=kW(t,o);const w=EW(t,c,d);return c==="center"?o==="left"?b+=d:o==="right"&&(b-=d):o==="left"?b-=Math.max(h,g)+s:o==="right"&&(b+=Math.max(m,v)+s),{x:En(b,0,i.width-t.width),y:En(w,0,i.height-t.height)}}function tm(e,t,n){const i=Dn(n.padding);return t==="center"?e.x+e.width/2:t==="right"?e.x+e.width-i.right:e.x+i.left}function Q6(e){return ps([],or(e))}function AW(e,t,n){return Za(e,{tooltip:t,tooltipItems:n,type:"tooltip"})}function J6(e,t){const n=t&&t.dataset&&t.dataset.tooltip&&t.dataset.tooltip.callbacks;return n?e.override(n):e}const uk={beforeTitle:ir,title(e){if(e.length>0){const t=e[0],n=t.chart.data.labels,i=n?n.length:0;if(this&&this.options&&this.options.mode==="dataset")return t.dataset.label||"";if(t.label)return t.label;if(i>0&&t.dataIndex<i)return n[t.dataIndex]}return""},afterTitle:ir,beforeBody:ir,beforeLabel:ir,label(e){if(this&&this.options&&this.options.mode==="dataset")return e.label+": "+e.formattedValue||e.formattedValue;let t=e.dataset.label||"";t&&(t+=": ");const n=e.formattedValue;return ct(n)||(t+=n),t},labelColor(e){const n=e.chart.getDatasetMeta(e.datasetIndex).controller.getStyle(e.dataIndex);return{borderColor:n.borderColor,backgroundColor:n.backgroundColor,borderWidth:n.borderWidth,borderDash:n.borderDash,borderDashOffset:n.borderDashOffset,borderRadius:0}},labelTextColor(){return this.options.bodyColor},labelPointStyle(e){const n=e.chart.getDatasetMeta(e.datasetIndex).controller.getStyle(e.dataIndex);return{pointStyle:n.pointStyle,rotation:n.rotation}},afterLabel:ir,afterBody:ir,beforeFooter:ir,footer:ir,afterFooter:ir};function Wn(e,t,n,i){const s=e[t].call(n,i);return typeof s>"u"?uk[t].call(n,i):s}var Xv;let eC=(Xv=class extends zr{constructor(t){super(),this.opacity=0,this._active=[],this._eventPosition=void 0,this._size=void 0,this._cachedAnimations=void 0,this._tooltipItems=[],this.$animations=void 0,this.$context=void 0,this.chart=t.chart,this.options=t.options,this.dataPoints=void 0,this.title=void 0,this.beforeBody=void 0,this.body=void 0,this.afterBody=void 0,this.footer=void 0,this.xAlign=void 0,this.yAlign=void 0,this.x=void 0,this.y=void 0,this.height=void 0,this.width=void 0,this.caretX=void 0,this.caretY=void 0,this.labelColors=void 0,this.labelPointStyles=void 0,this.labelTextColors=void 0}initialize(t){this.options=t,this._cachedAnimations=void 0,this.$context=void 0}_resolveAnimations(){const t=this._cachedAnimations;if(t)return t;const n=this.chart,i=this.options.setContext(this.getContext()),s=i.enabled&&n.options.animation&&i.animations,r=new ZN(this.chart,s);return s._cacheable&&(this._cachedAnimations=Object.freeze(r)),r}getContext(){return this.$context||(this.$context=AW(this.chart.getContext(),this,this._tooltipItems))}getTitle(t,n){const{callbacks:i}=n,s=Wn(i,"beforeTitle",this,t),r=Wn(i,"title",this,t),a=Wn(i,"afterTitle",this,t);let o=[];return o=ps(o,or(s)),o=ps(o,or(r)),o=ps(o,or(a)),o}getBeforeBody(t,n){return Q6(Wn(n.callbacks,"beforeBody",this,t))}getBody(t,n){const{callbacks:i}=n,s=[];return lt(t,r=>{const a={before:[],lines:[],after:[]},o=J6(i,r);ps(a.before,or(Wn(o,"beforeLabel",this,r))),ps(a.lines,Wn(o,"label",this,r)),ps(a.after,or(Wn(o,"afterLabel",this,r))),s.push(a)}),s}getAfterBody(t,n){return Q6(Wn(n.callbacks,"afterBody",this,t))}getFooter(t,n){const{callbacks:i}=n,s=Wn(i,"beforeFooter",this,t),r=Wn(i,"footer",this,t),a=Wn(i,"afterFooter",this,t);let o=[];return o=ps(o,or(s)),o=ps(o,or(r)),o=ps(o,or(a)),o}_createItems(t){const n=this._active,i=this.chart.data,s=[],r=[],a=[];let o=[],c,d;for(c=0,d=n.length;c<d;++c)o.push(MW(this.chart,n[c]));return t.filter&&(o=o.filter((h,m,g)=>t.filter(h,m,g,i))),t.itemSort&&(o=o.sort((h,m)=>t.itemSort(h,m,i))),lt(o,h=>{const m=J6(t.callbacks,h);s.push(Wn(m,"labelColor",this,h)),r.push(Wn(m,"labelPointStyle",this,h)),a.push(Wn(m,"labelTextColor",this,h))}),this.labelColors=s,this.labelPointStyles=r,this.labelTextColors=a,this.dataPoints=o,o}update(t,n){const i=this.options.setContext(this.getContext()),s=this._active;let r,a=[];if(!s.length)this.opacity!==0&&(r={opacity:0});else{const o=dd[i.position].call(this,s,this._eventPosition);a=this._createItems(i),this.title=this.getTitle(a,i),this.beforeBody=this.getBeforeBody(a,i),this.body=this.getBody(a,i),this.afterBody=this.getAfterBody(a,i),this.footer=this.getFooter(a,i);const c=this._size=q6(this,i),d=Object.assign({},o,c),h=X6(this.chart,i,d),m=K6(i,d,h,this.chart);this.xAlign=h.xAlign,this.yAlign=h.yAlign,r={opacity:1,x:m.x,y:m.y,width:c.width,height:c.height,caretX:o.x,caretY:o.y}}this._tooltipItems=a,this.$context=void 0,r&&this._resolveAnimations().update(this,r),t&&i.external&&i.external.call(this,{chart:this.chart,tooltip:this,replay:n})}drawCaret(t,n,i,s){const r=this.getCaretPosition(t,i,s);n.lineTo(r.x1,r.y1),n.lineTo(r.x2,r.y2),n.lineTo(r.x3,r.y3)}getCaretPosition(t,n,i){const{xAlign:s,yAlign:r}=this,{caretSize:a,cornerRadius:o}=i,{topLeft:c,topRight:d,bottomLeft:h,bottomRight:m}=Lo(o),{x:g,y:v}=t,{width:b,height:w}=n;let M,y,S,T,N,k;return r==="center"?(N=v+w/2,s==="left"?(M=g,y=M-a,T=N+a,k=N-a):(M=g+b,y=M+a,T=N-a,k=N+a),S=M):(s==="left"?y=g+Math.max(c,h)+a:s==="right"?y=g+b-Math.max(d,m)-a:y=this.caretX,r==="top"?(T=v,N=T-a,M=y-a,S=y+a):(T=v+w,N=T+a,M=y+a,S=y-a),k=T),{x1:M,x2:y,x3:S,y1:T,y2:N,y3:k}}drawTitle(t,n,i){const s=this.title,r=s.length;let a,o,c;if(r){const d=pc(i.rtl,this.x,this.width);for(t.x=tm(this,i.titleAlign,i),n.textAlign=d.textAlign(i.titleAlign),n.textBaseline="middle",a=en(i.titleFont),o=i.titleSpacing,n.fillStyle=i.titleColor,n.font=a.string,c=0;c<r;++c)n.fillText(s[c],d.x(t.x),t.y+a.lineHeight/2),t.y+=a.lineHeight+o,c+1===r&&(t.y+=i.titleMarginBottom-o)}}_drawColorBox(t,n,i,s,r){const a=this.labelColors[i],o=this.labelPointStyles[i],{boxHeight:c,boxWidth:d}=r,h=en(r.bodyFont),m=tm(this,"left",r),g=s.x(m),v=c<h.lineHeight?(h.lineHeight-c)/2:0,b=n.y+v;if(r.usePointStyle){const w={radius:Math.min(d,c)/2,pointStyle:o.pointStyle,rotation:o.rotation,borderWidth:1},M=s.leftForLtr(g,d)+d/2,y=b+c/2;t.strokeStyle=r.multiKeyBackground,t.fillStyle=r.multiKeyBackground,uy(t,w,M,y),t.strokeStyle=a.borderColor,t.fillStyle=a.backgroundColor,uy(t,w,M,y)}else{t.lineWidth=Ge(a.borderWidth)?Math.max(...Object.values(a.borderWidth)):a.borderWidth||1,t.strokeStyle=a.borderColor,t.setLineDash(a.borderDash||[]),t.lineDashOffset=a.borderDashOffset||0;const w=s.leftForLtr(g,d),M=s.leftForLtr(s.xPlus(g,1),d-2),y=Lo(a.borderRadius);Object.values(y).some(S=>S!==0)?(t.beginPath(),t.fillStyle=r.multiKeyBackground,mf(t,{x:w,y:b,w:d,h:c,radius:y}),t.fill(),t.stroke(),t.fillStyle=a.backgroundColor,t.beginPath(),mf(t,{x:M,y:b+1,w:d-2,h:c-2,radius:y}),t.fill()):(t.fillStyle=r.multiKeyBackground,t.fillRect(w,b,d,c),t.strokeRect(w,b,d,c),t.fillStyle=a.backgroundColor,t.fillRect(M,b+1,d-2,c-2))}t.fillStyle=this.labelTextColors[i]}drawBody(t,n,i){const{body:s}=this,{bodySpacing:r,bodyAlign:a,displayColors:o,boxHeight:c,boxWidth:d,boxPadding:h}=i,m=en(i.bodyFont);let g=m.lineHeight,v=0;const b=pc(i.rtl,this.x,this.width),w=function(O){n.fillText(O,b.x(t.x+v),t.y+g/2),t.y+=g+r},M=b.textAlign(a);let y,S,T,N,k,E,D;for(n.textAlign=a,n.textBaseline="middle",n.font=m.string,t.x=tm(this,M,i),n.fillStyle=i.bodyColor,lt(this.beforeBody,w),v=o&&M!=="right"?a==="center"?d/2+h:d+2+h:0,N=0,E=s.length;N<E;++N){for(y=s[N],S=this.labelTextColors[N],n.fillStyle=S,lt(y.before,w),T=y.lines,o&&T.length&&(this._drawColorBox(n,t,N,b,i),g=Math.max(m.lineHeight,c)),k=0,D=T.length;k<D;++k)w(T[k]),g=m.lineHeight;lt(y.after,w)}v=0,g=m.lineHeight,lt(this.afterBody,w),t.y-=r}drawFooter(t,n,i){const s=this.footer,r=s.length;let a,o;if(r){const c=pc(i.rtl,this.x,this.width);for(t.x=tm(this,i.footerAlign,i),t.y+=i.footerMarginTop,n.textAlign=c.textAlign(i.footerAlign),n.textBaseline="middle",a=en(i.footerFont),n.fillStyle=i.footerColor,n.font=a.string,o=0;o<r;++o)n.fillText(s[o],c.x(t.x),t.y+a.lineHeight/2),t.y+=a.lineHeight+i.footerSpacing}}drawBackground(t,n,i,s){const{xAlign:r,yAlign:a}=this,{x:o,y:c}=t,{width:d,height:h}=i,{topLeft:m,topRight:g,bottomLeft:v,bottomRight:b}=Lo(s.cornerRadius);n.fillStyle=s.backgroundColor,n.strokeStyle=s.borderColor,n.lineWidth=s.borderWidth,n.beginPath(),n.moveTo(o+m,c),a==="top"&&this.drawCaret(t,n,i,s),n.lineTo(o+d-g,c),n.quadraticCurveTo(o+d,c,o+d,c+g),a==="center"&&r==="right"&&this.drawCaret(t,n,i,s),n.lineTo(o+d,c+h-b),n.quadraticCurveTo(o+d,c+h,o+d-b,c+h),a==="bottom"&&this.drawCaret(t,n,i,s),n.lineTo(o+v,c+h),n.quadraticCurveTo(o,c+h,o,c+h-v),a==="center"&&r==="left"&&this.drawCaret(t,n,i,s),n.lineTo(o,c+m),n.quadraticCurveTo(o,c,o+m,c),n.closePath(),n.fill(),s.borderWidth>0&&n.stroke()}_updateAnimationTarget(t){const n=this.chart,i=this.$animations,s=i&&i.x,r=i&&i.y;if(s||r){const a=dd[t.position].call(this,this._active,this._eventPosition);if(!a)return;const o=this._size=q6(this,t),c=Object.assign({},a,this._size),d=X6(n,t,c),h=K6(t,c,d,n);(s._to!==h.x||r._to!==h.y)&&(this.xAlign=d.xAlign,this.yAlign=d.yAlign,this.width=o.width,this.height=o.height,this.caretX=a.x,this.caretY=a.y,this._resolveAnimations().update(this,h))}}_willRender(){return!!this.opacity}draw(t){const n=this.options.setContext(this.getContext());let i=this.opacity;if(!i)return;this._updateAnimationTarget(n);const s={width:this.width,height:this.height},r={x:this.x,y:this.y};i=Math.abs(i)<.001?0:i;const a=Dn(n.padding),o=this.title.length||this.beforeBody.length||this.body.length||this.afterBody.length||this.footer.length;n.enabled&&o&&(t.save(),t.globalAlpha=i,this.drawBackground(r,t,s,n),BN(t,n.textDirection),r.y+=a.top,this.drawTitle(r,t,n),this.drawBody(r,t,n),this.drawFooter(r,t,n),VN(t,n.textDirection),t.restore())}getActiveElements(){return this._active||[]}setActiveElements(t,n){const i=this._active,s=t.map(({datasetIndex:o,index:c})=>{const d=this.chart.getDatasetMeta(o);if(!d)throw new Error("Cannot find a dataset at index "+o);return{datasetIndex:o,element:d.data[c],index:c}}),r=!Og(i,s),a=this._positionChanged(s,n);(r||a)&&(this._active=s,this._eventPosition=n,this._ignoreReplayEvents=!0,this.update(!0))}handleEvent(t,n,i=!0){if(n&&this._ignoreReplayEvents)return!1;this._ignoreReplayEvents=!1;const s=this.options,r=this._active||[],a=this._getActiveElements(t,r,n,i),o=this._positionChanged(a,t),c=n||!Og(a,r)||o;return c&&(this._active=a,(s.enabled||s.external)&&(this._eventPosition={x:t.x,y:t.y},this.update(!0,n))),c}_getActiveElements(t,n,i,s){const r=this.options;if(t.type==="mouseout")return[];if(!s)return n.filter(o=>this.chart.data.datasets[o.datasetIndex]&&this.chart.getDatasetMeta(o.datasetIndex).controller.getParsed(o.index)!==void 0);const a=this.chart.getElementsAtEventForMode(t,r.mode,r,i);return r.reverse&&a.reverse(),a}_positionChanged(t,n){const{caretX:i,caretY:s,options:r}=this,a=dd[r.position].call(this,t,n);return a!==!1&&(i!==a.x||s!==a.y)}},ge(Xv,"positioners",dd),Xv);var qb={id:"tooltip",_element:eC,positioners:dd,afterInit(e,t,n){n&&(e.tooltip=new eC({chart:e,options:n}))},beforeUpdate(e,t,n){e.tooltip&&e.tooltip.initialize(n)},reset(e,t,n){e.tooltip&&e.tooltip.initialize(n)},afterDraw(e){const t=e.tooltip;if(t&&t._willRender()){const n={tooltip:t};if(e.notifyPlugins("beforeTooltipDraw",{...n,cancelable:!0})===!1)return;t.draw(e.ctx),e.notifyPlugins("afterTooltipDraw",n)}},afterEvent(e,t){if(e.tooltip){const n=t.replay;e.tooltip.handleEvent(t.event,n,t.inChartArea)&&(t.changed=!0)}},defaults:{enabled:!0,external:null,position:"average",backgroundColor:"rgba(0,0,0,0.8)",titleColor:"#fff",titleFont:{weight:"bold"},titleSpacing:2,titleMarginBottom:6,titleAlign:"left",bodyColor:"#fff",bodySpacing:2,bodyFont:{},bodyAlign:"left",footerColor:"#fff",footerSpacing:2,footerMarginTop:6,footerFont:{weight:"bold"},footerAlign:"left",padding:6,caretPadding:2,caretSize:5,cornerRadius:6,boxHeight:(e,t)=>t.bodyFont.size,boxWidth:(e,t)=>t.bodyFont.size,multiKeyBackground:"#fff",displayColors:!0,boxPadding:0,borderColor:"rgba(0,0,0,0)",borderWidth:0,animation:{duration:400,easing:"easeOutQuart"},animations:{numbers:{type:"number",properties:["x","y","width","height","caretX","caretY"]},opacity:{easing:"linear",duration:200}},callbacks:uk},defaultRoutes:{bodyFont:"font",footerFont:"font",titleFont:"font"},descriptors:{_scriptable:e=>e!=="filter"&&e!=="itemSort"&&e!=="external",_indexable:!1,callbacks:{_scriptable:!1,_indexable:!1},animation:{_fallback:!1},animations:{_fallback:"animation"}},additionalOptionScopes:["interaction"]};const OW=(e,t,n,i)=>(typeof t=="string"?(n=e.push(t)-1,i.unshift({index:n,label:t})):isNaN(t)&&(n=null),n);function DW(e,t,n,i){const s=e.indexOf(t);if(s===-1)return OW(e,t,n,i);const r=e.lastIndexOf(t);return s!==r?n:s}const PW=(e,t)=>e===null?null:En(Math.round(e),0,t);function tC(e){const t=this.getLabels();return e>=0&&e<t.length?t[e]:e}class pf extends al{constructor(t){super(t),this._startValue=void 0,this._valueRange=0,this._addedLabels=[]}init(t){const n=this._addedLabels;if(n.length){const i=this.getLabels();for(const{index:s,label:r}of n)i[s]===r&&i.splice(s,1);this._addedLabels=[]}super.init(t)}parse(t,n){if(ct(t))return null;const i=this.getLabels();return n=isFinite(n)&&i[n]===t?n:DW(i,t,Fe(n,t),this._addedLabels),PW(n,i.length-1)}determineDataLimits(){const{minDefined:t,maxDefined:n}=this.getUserBounds();let{min:i,max:s}=this.getMinMax(!0);this.options.bounds==="ticks"&&(t||(i=0),n||(s=this.getLabels().length-1)),this.min=i,this.max=s}buildTicks(){const t=this.min,n=this.max,i=this.options.offset,s=[];let r=this.getLabels();r=t===0&&n===r.length-1?r:r.slice(t,n+1),this._valueRange=Math.max(r.length-(i?0:1),1),this._startValue=this.min-(i?.5:0);for(let a=t;a<=n;a++)s.push({value:a});return s}getLabelForValue(t){return tC.call(this,t)}configure(){super.configure(),this.isHorizontal()||(this._reversePixels=!this._reversePixels)}getPixelForValue(t){return typeof t!="number"&&(t=this.parse(t)),t===null?NaN:this.getPixelForDecimal((t-this._startValue)/this._valueRange)}getPixelForTick(t){const n=this.ticks;return t<0||t>n.length-1?null:this.getPixelForValue(n[t].value)}getValueForPixel(t){return Math.round(this._startValue+this.getDecimalForPixel(t)*this._valueRange)}getBasePixel(){return this.bottom}}ge(pf,"id","category"),ge(pf,"defaults",{ticks:{callback:tC}});function RW(e,t){const n=[],{bounds:s,step:r,min:a,max:o,precision:c,count:d,maxTicks:h,maxDigits:m,includeBounds:g}=e,v=r||1,b=h-1,{min:w,max:M}=t,y=!ct(a),S=!ct(o),T=!ct(d),N=(M-w)/(m+1);let k=KS((M-w)/b/v)*v,E,D,O,I;if(k<1e-14&&!y&&!S)return[{value:w},{value:M}];I=Math.ceil(M/k)-Math.floor(w/k),I>b&&(k=KS(I*k/b/v)*v),ct(c)||(E=Math.pow(10,c),k=Math.ceil(k*E)/E),s==="ticks"?(D=Math.floor(w/k)*k,O=Math.ceil(M/k)*k):(D=w,O=M),y&&S&&r&&$F((o-a)/r,k/1e3)?(I=Math.round(Math.min((o-a)/k,h)),k=(o-a)/I,D=a,O=o):T?(D=y?a:D,O=S?o:O,I=d-1,k=(O-D)/I):(I=(O-D)/k,Bd(I,Math.round(I),k/1e3)?I=Math.round(I):I=Math.ceil(I));const P=Math.max(QS(k),QS(D));E=Math.pow(10,ct(c)?P:c),D=Math.round(D*E)/E,O=Math.round(O*E)/E;let H=0;for(y&&(g&&D!==a?(n.push({value:a}),D<a&&H++,Bd(Math.round((D+H*k)*E)/E,a,nC(a,N,e))&&H++):D<a&&H++);H<I;++H){const V=Math.round((D+H*k)*E)/E;if(S&&V>o)break;n.push({value:V})}return S&&g&&O!==o?n.length&&Bd(n[n.length-1].value,o,nC(o,N,e))?n[n.length-1].value=o:n.push({value:o}):(!S||O===o)&&n.push({value:O}),n}function nC(e,t,{horizontal:n,minRotation:i}){const s=Cs(i),r=(n?Math.sin(s):Math.cos(s))||.001,a=.75*t*(""+e).length;return Math.min(t/r,a)}class Bg extends al{constructor(t){super(t),this.start=void 0,this.end=void 0,this._startValue=void 0,this._endValue=void 0,this._valueRange=0}parse(t,n){return ct(t)||(typeof t=="number"||t instanceof Number)&&!isFinite(+t)?null:+t}handleTickRangeOptions(){const{beginAtZero:t}=this.options,{minDefined:n,maxDefined:i}=this.getUserBounds();let{min:s,max:r}=this;const a=c=>s=n?s:c,o=c=>r=i?r:c;if(t){const c=Es(s),d=Es(r);c<0&&d<0?o(0):c>0&&d>0&&a(0)}if(s===r){let c=r===0?1:Math.abs(r*.05);o(r+c),t||a(s-c)}this.min=s,this.max=r}getTickLimit(){const t=this.options.ticks;let{maxTicksLimit:n,stepSize:i}=t,s;return i?(s=Math.ceil(this.max/i)-Math.floor(this.min/i)+1,s>1e3&&(console.warn(`scales.${this.id}.ticks.stepSize: ${i} would result generating up to ${s} ticks. Limiting to 1000.`),s=1e3)):(s=this.computeTickLimit(),n=n||11),n&&(s=Math.min(n,s)),s}computeTickLimit(){return Number.POSITIVE_INFINITY}buildTicks(){const t=this.options,n=t.ticks;let i=this.getTickLimit();i=Math.max(2,i);const s={maxTicks:i,bounds:t.bounds,min:t.min,max:t.max,precision:n.precision,step:n.stepSize,count:n.count,maxDigits:this._maxDigits(),horizontal:this.isHorizontal(),minRotation:n.minRotation||0,includeBounds:n.includeBounds!==!1},r=this._range||this,a=RW(s,r);return t.bounds==="ticks"&&MN(a,this,"value"),t.reverse?(a.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),a}configure(){const t=this.ticks;let n=this.min,i=this.max;if(super.configure(),this.options.offset&&t.length){const s=(i-n)/Math.max(t.length-1,1)/2;n-=s,i+=s}this._startValue=n,this._endValue=i,this._valueRange=i-n}getLabelForValue(t){return qp(t,this.chart.options.locale,this.options.ticks.format)}}class Vg extends Bg{determineDataLimits(){const{min:t,max:n}=this.getMinMax(!0);this.min=Vt(t)?t:0,this.max=Vt(n)?n:1,this.handleTickRangeOptions()}computeTickLimit(){const t=this.isHorizontal(),n=t?this.width:this.height,i=Cs(this.options.ticks.minRotation),s=(t?Math.sin(i):Math.cos(i))||.001,r=this._resolveTickFontOptions(0);return Math.ceil(n/Math.min(40,r.lineHeight/s))}getPixelForValue(t){return t===null?NaN:this.getPixelForDecimal((t-this._startValue)/this._valueRange)}getValueForPixel(t){return this._startValue+this.getDecimalForPixel(t)*this._valueRange}}ge(Vg,"id","linear"),ge(Vg,"defaults",{ticks:{callback:Xp.formatters.numeric}});const vf=e=>Math.floor(ga(e)),ro=(e,t)=>Math.pow(10,vf(e)+t);function iC(e){return e/Math.pow(10,vf(e))===1}function sC(e,t,n){const i=Math.pow(10,n),s=Math.floor(e/i);return Math.ceil(t/i)-s}function LW(e,t){const n=t-e;let i=vf(n);for(;sC(e,t,i)>10;)i++;for(;sC(e,t,i)<10;)i--;return Math.min(i,vf(e))}function zW(e,{min:t,max:n}){t=ii(e.min,t);const i=[],s=vf(t);let r=LW(t,n),a=r<0?Math.pow(10,Math.abs(r)):1;const o=Math.pow(10,r),c=s>r?Math.pow(10,s):0,d=Math.round((t-c)*a)/a,h=Math.floor((t-c)/o/10)*o*10;let m=Math.floor((d-h)/Math.pow(10,r)),g=ii(e.min,Math.round((c+h+m*Math.pow(10,r))*a)/a);for(;g<n;)i.push({value:g,major:iC(g),significand:m}),m>=10?m=m<15?15:20:m++,m>=20&&(r++,m=2,a=r>=0?1:a),g=Math.round((c+h+m*Math.pow(10,r))*a)/a;const v=ii(e.max,g);return i.push({value:v,major:iC(v),significand:m}),i}class rC extends al{constructor(t){super(t),this.start=void 0,this.end=void 0,this._startValue=void 0,this._valueRange=0}parse(t,n){const i=Bg.prototype.parse.apply(this,[t,n]);if(i===0){this._zero=!0;return}return Vt(i)&&i>0?i:null}determineDataLimits(){const{min:t,max:n}=this.getMinMax(!0);this.min=Vt(t)?Math.max(0,t):null,this.max=Vt(n)?Math.max(0,n):null,this.options.beginAtZero&&(this._zero=!0),this._zero&&this.min!==this._suggestedMin&&!Vt(this._userMin)&&(this.min=t===ro(this.min,0)?ro(this.min,-1):ro(this.min,0)),this.handleTickRangeOptions()}handleTickRangeOptions(){const{minDefined:t,maxDefined:n}=this.getUserBounds();let i=this.min,s=this.max;const r=o=>i=t?i:o,a=o=>s=n?s:o;i===s&&(i<=0?(r(1),a(10)):(r(ro(i,-1)),a(ro(s,1)))),i<=0&&r(ro(s,-1)),s<=0&&a(ro(i,1)),this.min=i,this.max=s}buildTicks(){const t=this.options,n={min:this._userMin,max:this._userMax},i=zW(n,this);return t.bounds==="ticks"&&MN(i,this,"value"),t.reverse?(i.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),i}getLabelForValue(t){return t===void 0?"0":qp(t,this.chart.options.locale,this.options.ticks.format)}configure(){const t=this.min;super.configure(),this._startValue=ga(t),this._valueRange=ga(this.max)-ga(t)}getPixelForValue(t){return(t===void 0||t===0)&&(t=this.min),t===null||isNaN(t)?NaN:this.getPixelForDecimal(t===this.min?0:(ga(t)-this._startValue)/this._valueRange)}getValueForPixel(t){const n=this.getDecimalForPixel(t);return Math.pow(10,this._startValue+n*this._valueRange)}}ge(rC,"id","logarithmic"),ge(rC,"defaults",{ticks:{callback:Xp.formatters.logarithmic,major:{enabled:!0}}});function gy(e){const t=e.ticks;if(t.display&&e.display){const n=Dn(t.backdropPadding);return Fe(t.font&&t.font.size,Ht.font.size)+n.height}return 0}function IW(e,t,n){return n=Nt(n)?n:[n],{w:uU(e,t.string,n),h:n.length*t.lineHeight}}function aC(e,t,n,i,s){return e===i||e===s?{start:t-n/2,end:t+n/2}:e<i||e>s?{start:t-n,end:t}:{start:t,end:t+n}}function BW(e){const t={l:e.left+e._padding.left,r:e.right-e._padding.right,t:e.top+e._padding.top,b:e.bottom-e._padding.bottom},n=Object.assign({},t),i=[],s=[],r=e._pointLabels.length,a=e.options.pointLabels,o=a.centerPointLabels?Et/r:0;for(let c=0;c<r;c++){const d=a.setContext(e.getPointLabelContext(c));s[c]=d.padding;const h=e.getPointPosition(c,e.drawingArea+s[c],o),m=en(d.font),g=IW(e.ctx,m,e._pointLabels[c]);i[c]=g;const v=ri(e.getIndexAngle(c)+o),b=Math.round(Rb(v)),w=aC(b,h.x,g.w,0,180),M=aC(b,h.y,g.h,90,270);VW(n,t,v,w,M)}e.setCenterPoint(t.l-n.l,n.r-t.r,t.t-n.t,n.b-t.b),e._pointLabelItems=UW(e,i,s)}function VW(e,t,n,i,s){const r=Math.abs(Math.sin(n)),a=Math.abs(Math.cos(n));let o=0,c=0;i.start<t.l?(o=(t.l-i.start)/r,e.l=Math.min(e.l,t.l-o)):i.end>t.r&&(o=(i.end-t.r)/r,e.r=Math.max(e.r,t.r+o)),s.start<t.t?(c=(t.t-s.start)/a,e.t=Math.min(e.t,t.t-c)):s.end>t.b&&(c=(s.end-t.b)/a,e.b=Math.max(e.b,t.b+c))}function HW(e,t,n){const i=e.drawingArea,{extra:s,additionalAngle:r,padding:a,size:o}=n,c=e.getPointPosition(t,i+s+a,r),d=Math.round(Rb(ri(c.angle+$t))),h=WW(c.y,o.h,d),m=ZW(d),g=$W(c.x,o.w,m);return{visible:!0,x:c.x,y:h,textAlign:m,left:g,top:h,right:g+o.w,bottom:h+o.h}}function FW(e,t){if(!t)return!0;const{left:n,top:i,right:s,bottom:r}=e;return!(xr({x:n,y:i},t)||xr({x:n,y:r},t)||xr({x:s,y:i},t)||xr({x:s,y:r},t))}function UW(e,t,n){const i=[],s=e._pointLabels.length,r=e.options,{centerPointLabels:a,display:o}=r.pointLabels,c={extra:gy(r)/2,additionalAngle:a?Et/s:0};let d;for(let h=0;h<s;h++){c.padding=n[h],c.size=t[h];const m=HW(e,h,c);i.push(m),o==="auto"&&(m.visible=FW(m,d),m.visible&&(d=m))}return i}function ZW(e){return e===0||e===180?"center":e<180?"left":"right"}function $W(e,t,n){return n==="right"?e-=t:n==="center"&&(e-=t/2),e}function WW(e,t,n){return n===90||n===270?e-=t/2:(n>270||n<90)&&(e-=t),e}function GW(e,t,n){const{left:i,top:s,right:r,bottom:a}=n,{backdropColor:o}=t;if(!ct(o)){const c=Lo(t.borderRadius),d=Dn(t.backdropPadding);e.fillStyle=o;const h=i-d.left,m=s-d.top,g=r-i+d.width,v=a-s+d.height;Object.values(c).some(b=>b!==0)?(e.beginPath(),mf(e,{x:h,y:m,w:g,h:v,radius:c}),e.fill()):e.fillRect(h,m,g,v)}}function YW(e,t){const{ctx:n,options:{pointLabels:i}}=e;for(let s=t-1;s>=0;s--){const r=e._pointLabelItems[s];if(!r.visible)continue;const a=i.setContext(e.getPointLabelContext(s));GW(n,a,r);const o=en(a.font),{x:c,y:d,textAlign:h}=r;Go(n,e._pointLabels[s],c,d+o.lineHeight/2,o,{color:a.color,textAlign:h,textBaseline:"middle"})}}function dk(e,t,n,i){const{ctx:s}=e;if(n)s.arc(e.xCenter,e.yCenter,t,0,bt);else{let r=e.getPointPosition(0,t);s.moveTo(r.x,r.y);for(let a=1;a<i;a++)r=e.getPointPosition(a,t),s.lineTo(r.x,r.y)}}function qW(e,t,n,i,s){const r=e.ctx,a=t.circular,{color:o,lineWidth:c}=t;!a&&!i||!o||!c||n<0||(r.save(),r.strokeStyle=o,r.lineWidth=c,r.setLineDash(s.dash),r.lineDashOffset=s.dashOffset,r.beginPath(),dk(e,n,a,i),r.closePath(),r.stroke(),r.restore())}function XW(e,t,n){return Za(e,{label:n,index:t,type:"pointLabel"})}class nm extends Bg{constructor(t){super(t),this.xCenter=void 0,this.yCenter=void 0,this.drawingArea=void 0,this._pointLabels=[],this._pointLabelItems=[]}setDimensions(){const t=this._padding=Dn(gy(this.options)/2),n=this.width=this.maxWidth-t.width,i=this.height=this.maxHeight-t.height;this.xCenter=Math.floor(this.left+n/2+t.left),this.yCenter=Math.floor(this.top+i/2+t.top),this.drawingArea=Math.floor(Math.min(n,i)/2)}determineDataLimits(){const{min:t,max:n}=this.getMinMax(!1);this.min=Vt(t)&&!isNaN(t)?t:0,this.max=Vt(n)&&!isNaN(n)?n:0,this.handleTickRangeOptions()}computeTickLimit(){return Math.ceil(this.drawingArea/gy(this.options))}generateTickLabels(t){Bg.prototype.generateTickLabels.call(this,t),this._pointLabels=this.getLabels().map((n,i)=>{const s=xt(this.options.pointLabels.callback,[n,i],this);return s||s===0?s:""}).filter((n,i)=>this.chart.getDataVisibility(i))}fit(){const t=this.options;t.display&&t.pointLabels.display?BW(this):this.setCenterPoint(0,0,0,0)}setCenterPoint(t,n,i,s){this.xCenter+=Math.floor((t-n)/2),this.yCenter+=Math.floor((i-s)/2),this.drawingArea-=Math.min(this.drawingArea/2,Math.max(t,n,i,s))}getIndexAngle(t){const n=bt/(this._pointLabels.length||1),i=this.options.startAngle||0;return ri(t*n+Cs(i))}getDistanceFromCenterForValue(t){if(ct(t))return NaN;const n=this.drawingArea/(this.max-this.min);return this.options.reverse?(this.max-t)*n:(t-this.min)*n}getValueForDistanceFromCenter(t){if(ct(t))return NaN;const n=t/(this.drawingArea/(this.max-this.min));return this.options.reverse?this.max-n:this.min+n}getPointLabelContext(t){const n=this._pointLabels||[];if(t>=0&&t<n.length){const i=n[t];return XW(this.getContext(),t,i)}}getPointPosition(t,n,i=0){const s=this.getIndexAngle(t)-$t+i;return{x:Math.cos(s)*n+this.xCenter,y:Math.sin(s)*n+this.yCenter,angle:s}}getPointPositionForValue(t,n){return this.getPointPosition(t,this.getDistanceFromCenterForValue(n))}getBasePosition(t){return this.getPointPositionForValue(t||0,this.getBaseValue())}getPointLabelPosition(t){const{left:n,top:i,right:s,bottom:r}=this._pointLabelItems[t];return{left:n,top:i,right:s,bottom:r}}drawBackground(){const{backgroundColor:t,grid:{circular:n}}=this.options;if(t){const i=this.ctx;i.save(),i.beginPath(),dk(this,this.getDistanceFromCenterForValue(this._endValue),n,this._pointLabels.length),i.closePath(),i.fillStyle=t,i.fill(),i.restore()}}drawGrid(){const t=this.ctx,n=this.options,{angleLines:i,grid:s,border:r}=n,a=this._pointLabels.length;let o,c,d;if(n.pointLabels.display&&YW(this,a),s.display&&this.ticks.forEach((h,m)=>{if(m!==0||m===0&&this.min<0){c=this.getDistanceFromCenterForValue(h.value);const g=this.getContext(m),v=s.setContext(g),b=r.setContext(g);qW(this,v,c,a,b)}}),i.display){for(t.save(),o=a-1;o>=0;o--){const h=i.setContext(this.getPointLabelContext(o)),{color:m,lineWidth:g}=h;!g||!m||(t.lineWidth=g,t.strokeStyle=m,t.setLineDash(h.borderDash),t.lineDashOffset=h.borderDashOffset,c=this.getDistanceFromCenterForValue(n.ticks.reverse?this.min:this.max),d=this.getPointPosition(o,c),t.beginPath(),t.moveTo(this.xCenter,this.yCenter),t.lineTo(d.x,d.y),t.stroke())}t.restore()}}drawBorder(){}drawLabels(){const t=this.ctx,n=this.options,i=n.ticks;if(!i.display)return;const s=this.getIndexAngle(0);let r,a;t.save(),t.translate(this.xCenter,this.yCenter),t.rotate(s),t.textAlign="center",t.textBaseline="middle",this.ticks.forEach((o,c)=>{if(c===0&&this.min>=0&&!n.reverse)return;const d=i.setContext(this.getContext(c)),h=en(d.font);if(r=this.getDistanceFromCenterForValue(this.ticks[c].value),d.showLabelBackdrop){t.font=h.string,a=t.measureText(o.label).width,t.fillStyle=d.backdropColor;const m=Dn(d.backdropPadding);t.fillRect(-a/2-m.left,-r-h.size/2-m.top,a+m.width,h.size+m.height)}Go(t,o.label,0,-r,h,{color:d.color,strokeColor:d.textStrokeColor,strokeWidth:d.textStrokeWidth})}),t.restore()}drawTitle(){}}ge(nm,"id","radialLinear"),ge(nm,"defaults",{display:!0,animate:!0,position:"chartArea",angleLines:{display:!0,lineWidth:1,borderDash:[],borderDashOffset:0},grid:{circular:!1},startAngle:0,ticks:{showLabelBackdrop:!0,callback:Xp.formatters.numeric},pointLabels:{backdropColor:void 0,backdropPadding:2,display:!0,font:{size:10},callback(t){return t},padding:5,centerPointLabels:!1}}),ge(nm,"defaultRoutes",{"angleLines.color":"borderColor","pointLabels.color":"color","ticks.color":"color"}),ge(nm,"descriptors",{angleLines:{_fallback:"grid"}});const e0={millisecond:{common:!0,size:1,steps:1e3},second:{common:!0,size:1e3,steps:60},minute:{common:!0,size:6e4,steps:60},hour:{common:!0,size:36e5,steps:24},day:{common:!0,size:864e5,steps:30},week:{common:!1,size:6048e5,steps:4},month:{common:!0,size:2628e6,steps:12},quarter:{common:!1,size:7884e6,steps:4},year:{common:!0,size:3154e7}},Yn=Object.keys(e0);function oC(e,t){return e-t}function lC(e,t){if(ct(t))return null;const n=e._adapter,{parser:i,round:s,isoWeekday:r}=e._parseOpts;let a=t;return typeof i=="function"&&(a=i(a)),Vt(a)||(a=typeof i=="string"?n.parse(a,i):n.parse(a)),a===null?null:(s&&(a=s==="week"&&(ff(r)||r===!0)?n.startOf(a,"isoWeek",r):n.startOf(a,s)),+a)}function cC(e,t,n,i){const s=Yn.length;for(let r=Yn.indexOf(e);r<s-1;++r){const a=e0[Yn[r]],o=a.steps?a.steps:Number.MAX_SAFE_INTEGER;if(a.common&&Math.ceil((n-t)/(o*a.size))<=i)return Yn[r]}return Yn[s-1]}function KW(e,t,n,i,s){for(let r=Yn.length-1;r>=Yn.indexOf(n);r--){const a=Yn[r];if(e0[a].common&&e._adapter.diff(s,i,a)>=t-1)return a}return Yn[n?Yn.indexOf(n):0]}function QW(e){for(let t=Yn.indexOf(e)+1,n=Yn.length;t<n;++t)if(e0[Yn[t]].common)return Yn[t]}function uC(e,t,n){if(!n)e[t]=!0;else if(n.length){const{lo:i,hi:s}=Lb(n,t),r=n[i]>=t?n[i]:n[s];e[r]=!0}}function JW(e,t,n,i){const s=e._adapter,r=+s.startOf(t[0].value,i),a=t[t.length-1].value;let o,c;for(o=r;o<=a;o=+s.add(o,1,i))c=n[o],c>=0&&(t[c].major=!0);return t}function dC(e,t,n){const i=[],s={},r=t.length;let a,o;for(a=0;a<r;++a)o=t[a],s[o]=a,i.push({value:o,major:!1});return r===0||!n?i:JW(e,i,s,n)}class Hg extends al{constructor(t){super(t),this._cache={data:[],labels:[],all:[]},this._unit="day",this._majorUnit=void 0,this._offsets={},this._normalized=!1,this._parseOpts=void 0}init(t,n={}){const i=t.time||(t.time={}),s=this._adapter=new MZ._date(t.adapters.date);s.init(n),Id(i.displayFormats,s.formats()),this._parseOpts={parser:i.parser,round:i.round,isoWeekday:i.isoWeekday},super.init(t),this._normalized=n.normalized}parse(t,n){return t===void 0?null:lC(this,t)}beforeLayout(){super.beforeLayout(),this._cache={data:[],labels:[],all:[]}}determineDataLimits(){const t=this.options,n=this._adapter,i=t.time.unit||"day";let{min:s,max:r,minDefined:a,maxDefined:o}=this.getUserBounds();function c(d){!a&&!isNaN(d.min)&&(s=Math.min(s,d.min)),!o&&!isNaN(d.max)&&(r=Math.max(r,d.max))}(!a||!o)&&(c(this._getLabelBounds()),(t.bounds!=="ticks"||t.ticks.source!=="labels")&&c(this.getMinMax(!1))),s=Vt(s)&&!isNaN(s)?s:+n.startOf(Date.now(),i),r=Vt(r)&&!isNaN(r)?r:+n.endOf(Date.now(),i)+1,this.min=Math.min(s,r-1),this.max=Math.max(s+1,r)}_getLabelBounds(){const t=this.getLabelTimestamps();let n=Number.POSITIVE_INFINITY,i=Number.NEGATIVE_INFINITY;return t.length&&(n=t[0],i=t[t.length-1]),{min:n,max:i}}buildTicks(){const t=this.options,n=t.time,i=t.ticks,s=i.source==="labels"?this.getLabelTimestamps():this._generate();t.bounds==="ticks"&&s.length&&(this.min=this._userMin||s[0],this.max=this._userMax||s[s.length-1]);const r=this.min,a=this.max,o=qF(s,r,a);return this._unit=n.unit||(i.autoSkip?cC(n.minUnit,this.min,this.max,this._getLabelCapacity(r)):KW(this,o.length,n.minUnit,this.min,this.max)),this._majorUnit=!i.major.enabled||this._unit==="year"?void 0:QW(this._unit),this.initOffsets(s),t.reverse&&o.reverse(),dC(this,o,this._majorUnit)}afterAutoSkip(){this.options.offsetAfterAutoskip&&this.initOffsets(this.ticks.map(t=>+t.value))}initOffsets(t=[]){let n=0,i=0,s,r;this.options.offset&&t.length&&(s=this.getDecimalForValue(t[0]),t.length===1?n=1-s:n=(this.getDecimalForValue(t[1])-s)/2,r=this.getDecimalForValue(t[t.length-1]),t.length===1?i=r:i=(r-this.getDecimalForValue(t[t.length-2]))/2);const a=t.length<3?.5:.25;n=En(n,0,a),i=En(i,0,a),this._offsets={start:n,end:i,factor:1/(n+1+i)}}_generate(){const t=this._adapter,n=this.min,i=this.max,s=this.options,r=s.time,a=r.unit||cC(r.minUnit,n,i,this._getLabelCapacity(n)),o=Fe(s.ticks.stepSize,1),c=a==="week"?r.isoWeekday:!1,d=ff(c)||c===!0,h={};let m=n,g,v;if(d&&(m=+t.startOf(m,"isoWeek",c)),m=+t.startOf(m,d?"day":a),t.diff(i,n,a)>1e5*o)throw new Error(n+" and "+i+" are too far apart with stepSize of "+o+" "+a);const b=s.ticks.source==="data"&&this.getDataTimestamps();for(g=m,v=0;g<i;g=+t.add(g,o,a),v++)uC(h,g,b);return(g===i||s.bounds==="ticks"||v===1)&&uC(h,g,b),Object.keys(h).sort(oC).map(w=>+w)}getLabelForValue(t){const n=this._adapter,i=this.options.time;return i.tooltipFormat?n.format(t,i.tooltipFormat):n.format(t,i.displayFormats.datetime)}format(t,n){const s=this.options.time.displayFormats,r=this._unit,a=n||s[r];return this._adapter.format(t,a)}_tickFormatFunction(t,n,i,s){const r=this.options,a=r.ticks.callback;if(a)return xt(a,[t,n,i],this);const o=r.time.displayFormats,c=this._unit,d=this._majorUnit,h=c&&o[c],m=d&&o[d],g=i[n],v=d&&m&&g&&g.major;return this._adapter.format(t,s||(v?m:h))}generateTickLabels(t){let n,i,s;for(n=0,i=t.length;n<i;++n)s=t[n],s.label=this._tickFormatFunction(s.value,n,t)}getDecimalForValue(t){return t===null?NaN:(t-this.min)/(this.max-this.min)}getPixelForValue(t){const n=this._offsets,i=this.getDecimalForValue(t);return this.getPixelForDecimal((n.start+i)*n.factor)}getValueForPixel(t){const n=this._offsets,i=this.getDecimalForPixel(t)/n.factor-n.end;return this.min+i*(this.max-this.min)}_getLabelSize(t){const n=this.options.ticks,i=this.ctx.measureText(t).width,s=Cs(this.isHorizontal()?n.maxRotation:n.minRotation),r=Math.cos(s),a=Math.sin(s),o=this._resolveTickFontOptions(0).size;return{w:i*r+o*a,h:i*a+o*r}}_getLabelCapacity(t){const n=this.options.time,i=n.displayFormats,s=i[n.unit]||i.millisecond,r=this._tickFormatFunction(t,0,dC(this,[t],this._majorUnit),s),a=this._getLabelSize(r),o=Math.floor(this.isHorizontal()?this.width/a.w:this.height/a.h)-1;return o>0?o:1}getDataTimestamps(){let t=this._cache.data||[],n,i;if(t.length)return t;const s=this.getMatchingVisibleMetas();if(this._normalized&&s.length)return this._cache.data=s[0].controller.getAllParsedValues(this);for(n=0,i=s.length;n<i;++n)t=t.concat(s[n].controller.getAllParsedValues(this));return this._cache.data=this.normalize(t)}getLabelTimestamps(){const t=this._cache.labels||[];let n,i;if(t.length)return t;const s=this.getLabels();for(n=0,i=s.length;n<i;++n)t.push(lC(this,s[n]));return this._cache.labels=this._normalized?t:this.normalize(t)}normalize(t){return NN(t.sort(oC))}}ge(Hg,"id","time"),ge(Hg,"defaults",{bounds:"data",adapters:{},time:{parser:!1,unit:!1,round:!1,isoWeekday:!1,minUnit:"millisecond",displayFormats:{}},ticks:{source:"auto",callback:!1,major:{enabled:!1}}});function im(e,t,n){let i=0,s=e.length-1,r,a,o,c;n?(t>=e[i].pos&&t<=e[s].pos&&({lo:i,hi:s}=So(e,"pos",t)),{pos:r,time:o}=e[i],{pos:a,time:c}=e[s]):(t>=e[i].time&&t<=e[s].time&&({lo:i,hi:s}=So(e,"time",t)),{time:r,pos:o}=e[i],{time:a,pos:c}=e[s]);const d=a-r;return d?o+(c-o)*(t-r)/d:o}class fC extends Hg{constructor(t){super(t),this._table=[],this._minPos=void 0,this._tableRange=void 0}initOffsets(){const t=this._getTimestampsForTable(),n=this._table=this.buildLookupTable(t);this._minPos=im(n,this.min),this._tableRange=im(n,this.max)-this._minPos,super.initOffsets(t)}buildLookupTable(t){const{min:n,max:i}=this,s=[],r=[];let a,o,c,d,h;for(a=0,o=t.length;a<o;++a)d=t[a],d>=n&&d<=i&&s.push(d);if(s.length<2)return[{time:n,pos:0},{time:i,pos:1}];for(a=0,o=s.length;a<o;++a)h=s[a+1],c=s[a-1],d=s[a],Math.round((h+c)/2)!==d&&r.push({time:d,pos:a/(o-1)});return r}_generate(){const t=this.min,n=this.max;let i=super.getDataTimestamps();return(!i.includes(t)||!i.length)&&i.splice(0,0,t),(!i.includes(n)||i.length===1)&&i.push(n),i.sort((s,r)=>s-r)}_getTimestampsForTable(){let t=this._cache.all||[];if(t.length)return t;const n=this.getDataTimestamps(),i=this.getLabelTimestamps();return n.length&&i.length?t=this.normalize(n.concat(i)):t=n.length?n:i,t=this._cache.all=t,t}getDecimalForValue(t){return(im(this._table,t)-this._minPos)/this._tableRange}getValueForPixel(t){const n=this._offsets,i=this.getDecimalForPixel(t)/n.factor-n.end;return im(this._table,i*this._tableRange+this._minPos,!0)}}ge(fC,"id","timeseries"),ge(fC,"defaults",Hg.defaults);const fk="label";function hC(e,t){typeof e=="function"?e(t):e&&(e.current=t)}function eG(e,t){const n=e.options;n&&t&&Object.assign(n,t)}function hk(e,t){e.labels=t}function mk(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:fk;const i=[];e.datasets=t.map(s=>{const r=e.datasets.find(a=>a[n]===s[n]);return!r||!s.data||i.includes(r)?{...s}:(i.push(r),Object.assign(r,s),r)})}function tG(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:fk;const n={labels:[],datasets:[]};return hk(n,e.labels),mk(n,e.datasets,t),n}function nG(e,t){const{height:n=150,width:i=300,redraw:s=!1,datasetIdKey:r,type:a,data:o,options:c,plugins:d=[],fallbackContent:h,updateMode:m,...g}=e,v=x.useRef(null),b=x.useRef(),w=()=>{v.current&&(b.current=new ru(v.current,{type:a,data:tG(o,r),options:c&&{...c},plugins:d}),hC(t,b.current))},M=()=>{hC(t,null),b.current&&(b.current.destroy(),b.current=null)};return x.useEffect(()=>{!s&&b.current&&c&&eG(b.current,c)},[s,c]),x.useEffect(()=>{!s&&b.current&&hk(b.current.config.data,o.labels)},[s,o.labels]),x.useEffect(()=>{!s&&b.current&&o.datasets&&mk(b.current.config.data,o.datasets,r)},[s,o.datasets]),x.useEffect(()=>{b.current&&(s?(M(),setTimeout(w)):b.current.update(m))},[s,c,o.labels,o.datasets,m]),x.useEffect(()=>{b.current&&(M(),setTimeout(w))},[a]),x.useEffect(()=>(w(),()=>M()),[]),ae.createElement("canvas",Object.assign({ref:v,role:"img",height:n,width:i},g),h)}const iG=x.forwardRef(nG);function Xb(e,t){return ru.register(t),x.forwardRef((n,i)=>ae.createElement(iG,Object.assign({},n,{ref:i,type:e})))}const py=Xb("line",zm),vy=Xb("bar",Lm),gk=Xb("doughnut",cd);var pk={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},mC=ae.createContext&&ae.createContext(pk),sG=["attr","size","title"];function rG(e,t){if(e==null)return{};var n=aG(e,t),i,s;if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);for(s=0;s<r.length;s++)i=r[s],!(t.indexOf(i)>=0)&&Object.prototype.propertyIsEnumerable.call(e,i)&&(n[i]=e[i])}return n}function aG(e,t){if(e==null)return{};var n={};for(var i in e)if(Object.prototype.hasOwnProperty.call(e,i)){if(t.indexOf(i)>=0)continue;n[i]=e[i]}return n}function Fg(){return Fg=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},Fg.apply(this,arguments)}function gC(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),n.push.apply(n,i)}return n}function Ug(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?gC(Object(n),!0).forEach(function(i){oG(e,i,n[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):gC(Object(n)).forEach(function(i){Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(n,i))})}return e}function oG(e,t,n){return t=lG(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function lG(e){var t=cG(e,"string");return typeof t=="symbol"?t:t+""}function cG(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var i=n.call(e,t||"default");if(typeof i!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function vk(e){return e&&e.map((t,n)=>ae.createElement(t.tag,Ug({key:n},t.attr),vk(t.child)))}function oe(e){return t=>ae.createElement(uG,Fg({attr:Ug({},e.attr)},t),vk(e.child))}function uG(e){var t=n=>{var{attr:i,size:s,title:r}=e,a=rG(e,sG),o=s||n.size||"1em",c;return n.className&&(c=n.className),e.className&&(c=(c?c+" ":"")+e.className),ae.createElement("svg",Fg({stroke:"currentColor",fill:"currentColor",strokeWidth:"0"},n.attr,i,a,{className:c,style:Ug(Ug({color:e.color||n.color},n.style),e.style),height:o,width:o,xmlns:"http://www.w3.org/2000/svg"}),r&&ae.createElement("title",null,r),e.children)};return mC!==void 0?ae.createElement(mC.Consumer,null,n=>t(n)):t(pk)}function dG(e){return oe({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M256 48C141.31 48 48 141.31 48 256s93.31 208 208 208 208-93.31 208-208S370.69 48 256 48zm80 224h-64v64a16 16 0 0 1-32 0v-64h-64a16 16 0 0 1 0-32h64v-64a16 16 0 0 1 32 0v64h64a16 16 0 0 1 0 32z"},child:[]}]})(e)}function xy(e){return oe({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{fill:"none",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"32",d:"M256 112v288m144-144H112"},child:[]}]})(e)}function fG(e){return oe({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{fill:"none",strokeMiterlimit:"10",strokeWidth:"32",d:"M448 256c0-106-86-192-192-192S64 150 64 256s86 192 192 192 192-86 192-192z"},child:[]},{tag:"path",attr:{fill:"none",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"32",d:"M250.26 166.05 256 288l5.73-121.95a5.74 5.74 0 0 0-5.79-6h0a5.74 5.74 0 0 0-5.68 6z"},child:[]},{tag:"path",attr:{d:"M256 367.91a20 20 0 1 1 20-20 20 20 0 0 1-20 20z"},child:[]}]})(e)}function hG(e){return oe({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M256 48C141.31 48 48 141.31 48 256s93.31 208 208 208 208-93.31 208-208S370.69 48 256 48zm0 319.91a20 20 0 1 1 20-20 20 20 0 0 1-20 20zm21.72-201.15-5.74 122a16 16 0 0 1-32 0l-5.74-121.94v-.05a21.74 21.74 0 1 1 43.44 0z"},child:[]}]})(e)}function pC(e){return oe({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{fill:"none",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"48",d:"m112 268 144 144 144-144M256 392V100"},child:[]}]})(e)}function mG(e){return oe({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M448 440a16 16 0 0 1-12.61-6.15c-22.86-29.27-44.07-51.86-73.32-67C335 352.88 301 345.59 256 344.23V424a16 16 0 0 1-27 11.57l-176-168a16 16 0 0 1 0-23.14l176-168A16 16 0 0 1 256 88v80.36c74.14 3.41 129.38 30.91 164.35 81.87C449.32 292.44 464 350.9 464 424a16 16 0 0 1-16 16z"},child:[]}]})(e)}function vC(e){return oe({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{fill:"none",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"48",d:"m112 244 144-144 144 144M256 120v292"},child:[]}]})(e)}function gG(e){return oe({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{fill:"none",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"32",d:"M32 32v432a16 16 0 0 0 16 16h432"},child:[]},{tag:"rect",attr:{width:"80",height:"192",x:"96",y:"224",fill:"none",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"32",rx:"20",ry:"20"},child:[]},{tag:"rect",attr:{width:"80",height:"240",x:"240",y:"176",fill:"none",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"32",rx:"20",ry:"20"},child:[]},{tag:"rect",attr:{width:"80",height:"304",x:"383.64",y:"112",fill:"none",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"32",rx:"20",ry:"20"},child:[]}]})(e)}function pG(e){return oe({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M480 496H48a32 32 0 0 1-32-32V32a16 16 0 0 1 32 0v432h432a16 16 0 0 1 0 32z"},child:[]},{tag:"path",attr:{d:"M156 432h-40a36 36 0 0 1-36-36V244a36 36 0 0 1 36-36h40a36 36 0 0 1 36 36v152a36 36 0 0 1-36 36zm144 0h-40a36 36 0 0 1-36-36V196a36 36 0 0 1 36-36h40a36 36 0 0 1 36 36v200a36 36 0 0 1-36 36zm143.64 0h-40a36 36 0 0 1-36-36V132a36 36 0 0 1 36-36h40a36 36 0 0 1 36 36v264a36 36 0 0 1-36 36z"},child:[]}]})(e)}function vG(e){return oe({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"rect",attr:{width:"448",height:"320",x:"32",y:"128",fill:"none",strokeLinejoin:"round",strokeWidth:"32",rx:"48",ry:"48"},child:[]},{tag:"path",attr:{fill:"none",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"32",d:"M144 128V96a32 32 0 0 1 32-32h160a32 32 0 0 1 32 32v32m112 112H32m288 0v24a8 8 0 0 1-8 8H200a8 8 0 0 1-8-8v-24"},child:[]}]})(e)}function xG(e){return oe({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{fill:"none",d:"M336 80H176a16 16 0 0 0-16 16v16h192V96a16 16 0 0 0-16-16z"},child:[]},{tag:"path",attr:{d:"M496 176a64.07 64.07 0 0 0-64-64h-48V96a48.05 48.05 0 0 0-48-48H176a48.05 48.05 0 0 0-48 48v16H80a64.07 64.07 0 0 0-64 64v48h480zm-144-64H160V96a16 16 0 0 1 16-16h160a16 16 0 0 1 16 16zm-16 152a24 24 0 0 1-24 24H200a24 24 0 0 1-24-24v-4a4 4 0 0 0-4-4H16v144a64 64 0 0 0 64 64h352a64 64 0 0 0 64-64V256H340a4 4 0 0 0-4 4z"},child:[]}]})(e)}function yG(e){return oe({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{fill:"none",strokeLinecap:"round",strokeMiterlimit:"10",strokeWidth:"32",d:"M393.87 190a32.1 32.1 0 0 1-45.25 0l-26.57-26.57a32.09 32.09 0 0 1 0-45.26L382.19 58a1 1 0 0 0-.3-1.64c-38.82-16.64-89.15-8.16-121.11 23.57-30.58 30.35-32.32 76-21.12 115.84a31.93 31.93 0 0 1-9.06 32.08L64 380a48.17 48.17 0 1 0 68 68l153.86-167a31.93 31.93 0 0 1 31.6-9.13c39.54 10.59 84.54 8.6 114.72-21.19 32.49-32 39.5-88.56 23.75-120.93a1 1 0 0 0-1.6-.26z"},child:[]},{tag:"circle",attr:{cx:"96",cy:"416",r:"16"},child:[]}]})(e)}function _G(e){return oe({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M469.54 120.52a16 16 0 0 0-25.54-4L382.56 178a16.12 16.12 0 0 1-22.63 0l-26.56-26.6a16 16 0 0 1 0-22.63l61.18-61.19a16 16 0 0 0-4.78-25.92C343.56 21 285.88 31.78 249.51 67.88c-30.9 30.68-40.11 78.62-25.25 131.53a15.89 15.89 0 0 1-4.49 16L53.29 367.46a64.17 64.17 0 1 0 90.6 90.64l153.68-166.85a15.9 15.9 0 0 1 15.77-4.57 179.3 179.3 0 0 0 46.22 6.37c33.4 0 62.71-10.81 83.85-31.64 39.15-38.57 45.12-103.99 26.13-140.89zM99.48 447.15a32 32 0 1 1 28.34-28.35 32 32 0 0 1-28.34 28.35z"},child:[]}]})(e)}function bG(e){return oe({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"rect",attr:{width:"416",height:"384",x:"48",y:"80",fill:"none",strokeLinejoin:"round",strokeWidth:"32",rx:"48"},child:[]},{tag:"circle",attr:{cx:"296",cy:"232",r:"24"},child:[]},{tag:"circle",attr:{cx:"376",cy:"232",r:"24"},child:[]},{tag:"circle",attr:{cx:"296",cy:"312",r:"24"},child:[]},{tag:"circle",attr:{cx:"376",cy:"312",r:"24"},child:[]},{tag:"circle",attr:{cx:"136",cy:"312",r:"24"},child:[]},{tag:"circle",attr:{cx:"216",cy:"312",r:"24"},child:[]},{tag:"circle",attr:{cx:"136",cy:"392",r:"24"},child:[]},{tag:"circle",attr:{cx:"216",cy:"392",r:"24"},child:[]},{tag:"circle",attr:{cx:"296",cy:"392",r:"24"},child:[]},{tag:"path",attr:{fill:"none",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"32",d:"M128 48v32m256-32v32"},child:[]},{tag:"path",attr:{fill:"none",strokeLinejoin:"round",strokeWidth:"32",d:"M464 160H48"},child:[]}]})(e)}function wG(e){return oe({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M480 128a64 64 0 0 0-64-64h-16V48.45c0-8.61-6.62-16-15.23-16.43A16 16 0 0 0 368 48v16H144V48.45c0-8.61-6.62-16-15.23-16.43A16 16 0 0 0 112 48v16H96a64 64 0 0 0-64 64v12a4 4 0 0 0 4 4h440a4 4 0 0 0 4-4zM32 416a64 64 0 0 0 64 64h320a64 64 0 0 0 64-64V179a3 3 0 0 0-3-3H35a3 3 0 0 0-3 3zm344-208a24 24 0 1 1-24 24 24 24 0 0 1 24-24zm0 80a24 24 0 1 1-24 24 24 24 0 0 1 24-24zm-80-80a24 24 0 1 1-24 24 24 24 0 0 1 24-24zm0 80a24 24 0 1 1-24 24 24 24 0 0 1 24-24zm0 80a24 24 0 1 1-24 24 24 24 0 0 1 24-24zm-80-80a24 24 0 1 1-24 24 24 24 0 0 1 24-24zm0 80a24 24 0 1 1-24 24 24 24 0 0 1 24-24zm-80-80a24 24 0 1 1-24 24 24 24 0 0 1 24-24zm0 80a24 24 0 1 1-24 24 24 24 0 0 1 24-24z"},child:[]}]})(e)}function SG(e){return oe({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{fill:"none",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"32",d:"M469.71 234.6c-7.33-9.73-34.56-16.43-46.08-33.94s-20.95-55.43-50.27-70S288 112 256 112s-88 4-117.36 18.63-38.75 52.52-50.27 70-38.75 24.24-46.08 33.97S29.8 305.84 32.94 336s9 48 9 48h86c14.08 0 18.66-5.29 47.46-8 31.6-3 62.6-4 80.6-4s50 1 81.58 4c28.8 2.73 33.53 8 47.46 8h85s5.86-17.84 9-48-2.04-91.67-9.33-101.4zM400 384h56v16h-56zm-344 0h56v16H56z"},child:[]},{tag:"path",attr:{d:"M364.47 309.16c-5.91-6.83-25.17-12.53-50.67-16.35S279 288 256.2 288s-33.17 1.64-57.61 4.81-42.79 8.81-50.66 16.35C136.12 320.6 153.42 333.44 167 335c13.16 1.5 39.47.95 89.31.95s76.15.55 89.31-.95c13.56-1.65 29.62-13.6 18.85-25.84zm67.1-66.11a3.23 3.23 0 0 0-3.1-3c-11.81-.42-23.8.42-45.07 6.69a93.88 93.88 0 0 0-30.08 15.06c-2.28 1.78-1.47 6.59 1.39 7.1a455.32 455.32 0 0 0 52.82 3.1c10.59 0 21.52-3 23.55-12.44a52.41 52.41 0 0 0 .49-16.51zm-351.14 0a3.23 3.23 0 0 1 3.1-3c11.81-.42 23.8.42 45.07 6.69a93.88 93.88 0 0 1 30.08 15.06c2.28 1.78 1.47 6.59-1.39 7.1a455.32 455.32 0 0 1-52.82 3.1c-10.59 0-21.52-3-23.55-12.44a52.41 52.41 0 0 1-.49-16.51z"},child:[]},{tag:"path",attr:{fill:"none",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"32",d:"M432 192h16m-384 0h16m-2 19s46.35-12 178-12 178 12 178 12"},child:[]}]})(e)}function CG(e){return oe({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M494.26 276.22c-3.6-40.41-9.53-48.28-11.77-51.24-5.15-6.84-13.39-11.31-22.11-16a3.6 3.6 0 0 1-.91-5.68 15.93 15.93 0 0 0 4.53-12.53A16.27 16.27 0 0 0 447.65 176h-15.6a17 17 0 0 0-2 .13 8.5 8.5 0 0 0-1.41-.47c-9.24-19.53-21.89-46.27-48.11-59.32C341.64 97 270 96 256 96s-85.64 1-124.48 20.31c-26.22 13.05-38.87 39.79-48.11 59.32l-.08.16a6.52 6.52 0 0 0-1.35.34 17 17 0 0 0-2-.13H64.35A16.27 16.27 0 0 0 48 190.77a15.93 15.93 0 0 0 4.59 12.47 3.6 3.6 0 0 1-.91 5.68c-8.72 4.72-17 9.19-22.11 16-2.24 3-8.16 10.83-11.77 51.24-2 22.74-2.3 46.28-.73 61.44 3.29 31.5 9.46 50.54 9.72 51.33a16 16 0 0 0 13.2 10.87v.2a16 16 0 0 0 16 16h56a16 16 0 0 0 16-16c8.61 0 14.6-1.54 20.95-3.18a158.83 158.83 0 0 1 28-4.91C207.45 389 237.79 388 256 388c17.84 0 49.52 1 80.08 3.91a159.16 159.16 0 0 1 28.11 4.93c6.08 1.56 11.85 3 19.84 3.15a16 16 0 0 0 16 16h56a16 16 0 0 0 16-16v-.12A16 16 0 0 0 485.27 389c.26-.79 6.43-19.83 9.72-51.33 1.57-15.17 1.29-38.67-.73-61.45zm-381.93-86.91c8-17 17.15-36.24 33.44-44.35 23.54-11.72 72.33-17 110.23-17s86.69 5.24 110.23 17c16.29 8.11 25.4 27.36 33.44 44.35l1 2.17a8 8 0 0 1-7.44 11.42C360 202 290 199.12 256 199.12s-104 2.95-137.28 3.85a8 8 0 0 1-7.44-11.42c.35-.74.72-1.49 1.05-2.24zm11.93 79.63A427.17 427.17 0 0 1 72.42 272c-10.6 0-21.53-3-23.56-12.44-1.39-6.35-1.24-9.92-.49-13.51C49 243 50 240.78 55 240c13-2 20.27.51 41.55 6.78 14.11 4.15 24.29 9.68 30.09 14.06 2.91 2.16 1.36 7.8-2.38 8.1zm221.38 82c-13.16 1.5-39.48.95-89.34.95s-76.17.55-89.33-.95c-13.58-1.51-30.89-14.35-19.07-25.79 7.87-7.54 26.23-13.18 50.68-16.35s34.8-4.8 57.62-4.8 32.12 1 57.62 4.81 44.77 9.52 50.68 16.35c10.78 12.24-5.29 24.19-18.86 25.84zm117.5-91.39c-2 9.48-13 12.44-23.56 12.44a455.91 455.91 0 0 1-52.84-3.06c-3.06-.29-4.48-5.66-1.38-8.1 5.71-4.49 16-9.91 30.09-14.06 21.28-6.27 33.55-8.78 44.09-6.69 2.57.51 3.93 3.27 4.09 5a40.64 40.64 0 0 1-.49 14.48z"},child:[]}]})(e)}function MG(e){return oe({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"m98 190.06 139.78 163.12a24 24 0 0 0 36.44 0L414 190.06c13.34-15.57 2.28-39.62-18.22-39.62h-279.6c-20.5 0-31.56 24.05-18.18 39.62z"},child:[]}]})(e)}function TG(e){return oe({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M414 321.94 274.22 158.82a24 24 0 0 0-36.44 0L98 321.94c-13.34 15.57-2.28 39.62 18.22 39.62h279.6c20.5 0 31.56-24.05 18.18-39.62z"},child:[]}]})(e)}function Nv(e){return oe({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M256 48C141.31 48 48 141.31 48 256s93.31 208 208 208 208-93.31 208-208S370.69 48 256 48zm108.25 138.29-134.4 160a16 16 0 0 1-12 5.71h-.27a16 16 0 0 1-11.89-5.3l-57.6-64a16 16 0 1 1 23.78-21.4l45.29 50.32 122.59-145.91a16 16 0 0 1 24.5 20.58z"},child:[]}]})(e)}function jG(e){return oe({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{fill:"none",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"32",d:"M416 128 192 384l-96-96"},child:[]}]})(e)}function Kb(e){return oe({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{fill:"none",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"48",d:"M328 112 184 256l144 144"},child:[]}]})(e)}function Qb(e){return oe({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{fill:"none",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"48",d:"m184 112 144 144-144 144"},child:[]}]})(e)}function xC(e){return oe({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M256 48C141.31 48 48 141.31 48 256s93.31 208 208 208 208-93.31 208-208S370.69 48 256 48zm75.31 260.69a16 16 0 1 1-22.62 22.62L256 278.63l-52.69 52.68a16 16 0 0 1-22.62-22.62L233.37 256l-52.68-52.69a16 16 0 0 1 22.62-22.62L256 233.37l52.69-52.68a16 16 0 0 1 22.62 22.62L278.63 256z"},child:[]}]})(e)}function NG(e){return oe({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"m289.94 256 95-95A24 24 0 0 0 351 127l-95 95-95-95a24 24 0 0 0-34 34l95 95-95 95a24 24 0 1 0 34 34l95-95 95 95a24 24 0 0 0 34-34z"},child:[]}]})(e)}function kG(e){return oe({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"rect",attr:{width:"63.03",height:"378.2",x:"280.48",y:"122.9",fill:"none",strokeMiterlimit:"10",strokeWidth:"32",rx:"31.52",transform:"rotate(-45 312.002 311.994)"},child:[]},{tag:"path",attr:{d:"M178.38 178.38a31.64 31.64 0 0 0 0 44.75L223.25 268 268 223.25l-44.87-44.87a31.64 31.64 0 0 0-44.75 0z"},child:[]},{tag:"path",attr:{strokeLinecap:"round",strokeMiterlimit:"10",strokeWidth:"32",d:"M48 192h48M90.18 90.18l33.94 33.94M192 48v48m101.82-5.82-33.94 33.94M124.12 259.88l-33.94 33.94"},child:[]}]})(e)}function EG(e){return oe({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M96 208H48c-8.8 0-16-7.2-16-16s7.2-16 16-16h48c8.8 0 16 7.2 16 16s-7.2 16-16 16zm28.1-67.9c-4.2 0-8.3-1.7-11.3-4.7l-33.9-33.9c-6.2-6.2-6.2-16.4 0-22.6s16.4-6.2 22.6 0l33.9 33.9c6.3 6.2 6.3 16.4 0 22.6-3 3-7 4.7-11.3 4.7zM192 112c-8.8 0-16-7.2-16-16V48c0-8.8 7.2-16 16-16s16 7.2 16 16v48c0 8.8-7.2 16-16 16zm67.9 28.1c-8.8 0-16-7.2-16-16 0-4.2 1.7-8.3 4.7-11.3l33.9-33.9c6.2-6.2 16.4-6.2 22.6 0 6.2 6.2 6.2 16.4 0 22.6l-33.9 33.9c-3 3-7.1 4.7-11.3 4.7zM90.2 309.8c-8.8 0-16-7.2-16-16 0-4.2 1.7-8.3 4.7-11.3l33.9-33.9c6.2-6.2 16.4-6.2 22.6 0s6.2 16.4 0 22.6l-33.9 33.9c-3 3-7.1 4.7-11.3 4.7zm144-142.8c-18.4-18.7-48.5-19-67.2-.7s-19 48.5-.7 67.2l.7.7 39.5 39.5c3.1 3.1 8.2 3.1 11.3 0l55.9-55.9c3.1-3.1 3.1-8.2 0-11.3L234.2 167zM457 389.8 307.6 240.4c-3.1-3.1-8.2-3.1-11.3 0l-55.9 55.9c-3.1 3.1-3.1 8.2 0 11.3L389.8 457c18.4 18.7 48.5 19 67.2.7 18.7-18.4 19-48.5.7-67.2-.2-.2-.4-.5-.7-.7z"},child:[]}]})(e)}function AG(e){return oe({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M414.39 97.74A224 224 0 1 0 97.61 414.52 224 224 0 1 0 414.39 97.74zM64 256.13a191.63 191.63 0 0 1 6.7-50.31c7.34 15.8 18 29.45 25.25 45.66 9.37 20.84 34.53 15.06 45.64 33.32 9.86 16.21-.67 36.71 6.71 53.67 5.36 12.31 18 15 26.72 24 8.91 9.08 8.72 21.52 10.08 33.36a305.36 305.36 0 0 0 7.45 41.27c0 .1 0 .21.08.31C117.8 411.13 64 339.8 64 256.13zm192 192a193.12 193.12 0 0 1-32-2.68c.11-2.71.16-5.24.43-7 2.43-15.9 10.39-31.45 21.13-43.35 10.61-11.74 25.15-19.68 34.11-33 8.78-13 11.41-30.5 7.79-45.69-5.33-22.44-35.82-29.93-52.26-42.1-9.45-7-17.86-17.82-30.27-18.7-5.72-.4-10.51.83-16.18-.63-5.2-1.35-9.28-4.15-14.82-3.42-10.35 1.36-16.88 12.42-28 10.92-10.55-1.41-21.42-13.76-23.82-23.81-3.08-12.92 7.14-17.11 18.09-18.26 4.57-.48 9.7-1 14.09.68 5.78 2.14 8.51 7.8 13.7 10.66 9.73 5.34 11.7-3.19 10.21-11.83-2.23-12.94-4.83-18.21 6.71-27.12 8-6.14 14.84-10.58 13.56-21.61-.76-6.48-4.31-9.41-1-15.86 2.51-4.91 9.4-9.34 13.89-12.27 11.59-7.56 49.65-7 34.1-28.16-4.57-6.21-13-17.31-21-18.83-10-1.89-14.44 9.27-21.41 14.19-7.2 5.09-21.22 10.87-28.43 3-9.7-10.59 6.43-14.06 10-21.46 1.65-3.45 0-8.24-2.78-12.75q5.41-2.28 11-4.23a15.6 15.6 0 0 0 8 3c6.69.44 13-3.18 18.84 1.38 6.48 5 11.15 11.32 19.75 12.88 8.32 1.51 17.13-3.34 19.19-11.86 1.25-5.18 0-10.65-1.2-16a190.83 190.83 0 0 1 105 32.21c-2-.76-4.39-.67-7.34.7-6.07 2.82-14.67 10-15.38 17.12-.81 8.08 11.11 9.22 16.77 9.22 8.5 0 17.11-3.8 14.37-13.62-1.19-4.26-2.81-8.69-5.42-11.37a193.27 193.27 0 0 1 18 14.14c-.09.09-.18.17-.27.27-5.76 6-12.45 10.75-16.39 18.05-2.78 5.14-5.91 7.58-11.54 8.91-3.1.73-6.64 1-9.24 3.08-7.24 5.7-3.12 19.4 3.74 23.51 8.67 5.19 21.53 2.75 28.07-4.66 5.11-5.8 8.12-15.87 17.31-15.86a15.4 15.4 0 0 1 10.82 4.41c3.8 3.94 3.05 7.62 3.86 12.54 1.43 8.74 9.14 4 13.83-.41a192.12 192.12 0 0 1 9.24 18.77c-5.16 7.43-9.26 15.53-21.67 6.87-7.43-5.19-12-12.72-21.33-15.06-8.15-2-16.5.08-24.55 1.47-9.15 1.59-20 2.29-26.94 9.22-6.71 6.68-10.26 15.62-17.4 22.33-13.81 13-19.64 27.19-10.7 45.57 8.6 17.67 26.59 27.26 46 26 19.07-1.27 38.88-12.33 38.33 15.38-.2 9.81 1.85 16.6 4.86 25.71 2.79 8.4 2.6 16.54 3.24 25.21a158 158 0 0 0 4.74 30.07A191.75 191.75 0 0 1 256 448.13z"},child:[]}]})(e)}function OG(e){return oe({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"circle",attr:{cx:"256",cy:"256",r:"48"},child:[]},{tag:"circle",attr:{cx:"256",cy:"416",r:"48"},child:[]},{tag:"circle",attr:{cx:"256",cy:"96",r:"48"},child:[]}]})(e)}function xk(e){return oe({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M472 168H40a24 24 0 0 1 0-48h432a24 24 0 0 1 0 48zm-80 112H120a24 24 0 0 1 0-48h272a24 24 0 0 1 0 48zm-96 112h-80a24 24 0 0 1 0-48h80a24 24 0 0 1 0 48z"},child:[]}]})(e)}function DG(e){return oe({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{fill:"none",strokeLinecap:"round",strokeMiterlimit:"10",strokeWidth:"32",d:"M80 464V68.14a8 8 0 0 1 4-6.9C91.81 56.66 112.92 48 160 48c64 0 145 48 192 48a199.53 199.53 0 0 0 77.23-15.77 2 2 0 0 1 2.77 1.85v219.36a4 4 0 0 1-2.39 3.65C421.37 308.7 392.33 320 352 320c-48 0-128-32-192-32s-80 16-80 16"},child:[]}]})(e)}function PG(e){return oe({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M80 480a16 16 0 0 1-16-16V68.13a24 24 0 0 1 11.9-20.72C88 40.38 112.38 32 160 32c37.21 0 78.83 14.71 115.55 27.68C305.12 70.13 333.05 80 352 80a183.84 183.84 0 0 0 71-14.5 18 18 0 0 1 25 16.58v219.36a20 20 0 0 1-12 18.31c-8.71 3.81-40.51 16.25-84 16.25-24.14 0-54.38-7.14-86.39-14.71C229.63 312.79 192.43 304 160 304c-36.87 0-55.74 5.58-64 9.11V464a16 16 0 0 1-16 16z"},child:[]}]})(e)}function RG(e){return oe({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{fill:"none",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"32",d:"M64 192v-72a40 40 0 0 1 40-40h75.89a40 40 0 0 1 22.19 6.72l27.84 18.56a40 40 0 0 0 22.19 6.72H408a40 40 0 0 1 40 40v40"},child:[]},{tag:"path",attr:{fill:"none",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"32",d:"M479.9 226.55 463.68 392a40 40 0 0 1-39.93 40H88.25a40 40 0 0 1-39.93-40L32.1 226.55A32 32 0 0 1 64 192h384.1a32 32 0 0 1 31.8 34.55z"},child:[]}]})(e)}function LG(e){return oe({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M408 96H252.11a23.89 23.89 0 0 1-13.31-4L211 73.41A55.77 55.77 0 0 0 179.89 64H104a56.06 56.06 0 0 0-56 56v24h416c0-30.88-25.12-48-56-48zm15.75 352H88.25a56 56 0 0 1-55.93-55.15L16.18 228.11v-.28A48 48 0 0 1 64 176h384.1a48 48 0 0 1 47.8 51.83v.28l-16.22 164.74A56 56 0 0 1 423.75 448zm56.15-221.45z"},child:[]}]})(e)}function zG(e){return oe({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M256 448a32 32 0 0 1-18-5.57c-78.59-53.35-112.62-89.93-131.39-112.8-40-48.75-59.15-98.8-58.61-153C48.63 114.52 98.46 64 159.08 64c44.08 0 74.61 24.83 92.39 45.51a6 6 0 0 0 9.06 0C278.31 88.81 308.84 64 352.92 64c60.62 0 110.45 50.52 111.08 112.64.54 54.21-18.63 104.26-58.61 153-18.77 22.87-52.8 59.45-131.39 112.8a32 32 0 0 1-18 5.56z"},child:[]}]})(e)}function yy(e){return oe({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{fill:"none",d:"M288.55 150.84c-8.09-3.86-20-6-32.72-5.82-18 .22-33.13 5.2-45 14.78-23 18.48-24.55 40.37-24.77 42.8a61.69 61.69 0 0 0-.09 12 3 3 0 0 0 3 2.69h21.23a3 3 0 0 0 3-3A65.7 65.7 0 0 1 214 204c0-.11 1.14-11.7 14.36-22.34 7-5.64 16.11-8.44 27.83-8.59 9.32-.11 16.93 1.47 20.34 3.09C291 183 298 192.31 298 204.57c0 18-10.9 26.23-30.18 39.18C247.08 257.68 237 275.1 237 297v11a3 3 0 0 0 3 3h22a3 3 0 0 0 3-3v-11c0-9.16 2.23-19.13 18.44-30 19.95-13.41 42.56-28.6 42.56-62.43 0-23.14-13.3-42.23-37.45-53.73z"},child:[]},{tag:"path",attr:{d:"M256 64C150 64 64 150 64 256s86 192 192 192 192-86 192-192S362 64 256 64zm10.44 302h-30.21a2.57 2.57 0 0 1-2.56-2.57v-30.2a2.57 2.57 0 0 1 2.56-2.57h30.21a2.57 2.57 0 0 1 2.56 2.57v30.2a2.57 2.57 0 0 1-2.56 2.57zm17-99C267.23 277.88 265 287.85 265 297v11a3 3 0 0 1-3 3h-22a3 3 0 0 1-3-3v-11c0-21.91 10.08-39.33 30.82-53.26C287.1 230.8 298 222.6 298 204.57c0-12.26-7-21.57-21.49-28.46-3.41-1.62-11-3.2-20.34-3.09-11.72.15-20.82 2.95-27.83 8.59C215.12 192.25 214 203.84 214 204a65.7 65.7 0 0 0-.84 10.28 3 3 0 0 1-3 3h-21.25a3 3 0 0 1-3-2.69 61.69 61.69 0 0 1 .09-12c.22-2.43 1.8-24.32 24.77-42.8 11.91-9.58 27.06-14.56 45-14.78 12.7-.15 24.63 2 32.72 5.82 24.21 11.51 37.51 30.6 37.51 53.74 0 33.83-22.61 49.02-42.56 62.43z"},child:[]}]})(e)}function IG(e){return oe({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M256 64C150 64 64 150 64 256s86 192 192 192 192-86 192-192S362 64 256 64zm-6 304a20 20 0 1 1 20-20 20 20 0 0 1-20 20zm33.44-102C267.23 276.88 265 286.85 265 296a14 14 0 0 1-28 0c0-21.91 10.08-39.33 30.82-53.26C287.1 229.8 298 221.6 298 203.57c0-12.26-7-21.57-21.49-28.46-3.41-1.62-11-3.2-20.34-3.09-11.72.15-20.82 2.95-27.83 8.59C215.12 191.25 214 202.83 214 203a14 14 0 1 1-28-1.35c.11-2.43 1.8-24.32 24.77-42.8 11.91-9.58 27.06-14.56 45-14.78 12.7-.15 24.63 2 32.72 5.82C312.7 161.34 326 180.43 326 203.57c0 33.83-22.61 49.02-42.56 62.43z"},child:[]}]})(e)}function BG(e){return oe({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{fill:"none",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"32",d:"M80 212v236a16 16 0 0 0 16 16h96V328a24 24 0 0 1 24-24h80a24 24 0 0 1 24 24v136h96a16 16 0 0 0 16-16V212"},child:[]},{tag:"path",attr:{fill:"none",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"32",d:"M480 256 266.89 52c-5-5.28-16.69-5.34-21.78 0L32 256m368-77V64h-48v69"},child:[]}]})(e)}function VG(e){return oe({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M261.56 101.28a8 8 0 0 0-11.06 0L66.4 277.15a8 8 0 0 0-2.47 5.79L63.9 448a32 32 0 0 0 32 32H192a16 16 0 0 0 16-16V328a8 8 0 0 1 8-8h80a8 8 0 0 1 8 8v136a16 16 0 0 0 16 16h96.06a32 32 0 0 0 32-32V282.94a8 8 0 0 0-2.47-5.79z"},child:[]},{tag:"path",attr:{d:"m490.91 244.15-74.8-71.56V64a16 16 0 0 0-16-16h-48a16 16 0 0 0-16 16v32l-57.92-55.38C272.77 35.14 264.71 32 256 32c-8.68 0-16.72 3.14-22.14 8.63l-212.7 203.5c-6.22 6-7 15.87-1.34 22.37A16 16 0 0 0 43 267.56L250.5 69.28a8 8 0 0 1 11.06 0l207.52 198.28a16 16 0 0 0 22.59-.44c6.14-6.36 5.63-16.86-.76-22.97z"},child:[]}]})(e)}function t0(e){return oe({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M368 192h-16v-80a96 96 0 1 0-192 0v80h-16a64.07 64.07 0 0 0-64 64v176a64.07 64.07 0 0 0 64 64h224a64.07 64.07 0 0 0 64-64V256a64.07 64.07 0 0 0-64-64zm-48 0H192v-80a64 64 0 1 1 128 0z"},child:[]}]})(e)}function HG(e){return oe({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{fill:"none",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"32",d:"M313.27 124.64 198.73 51.36a32 32 0 0 0-29.28.35L56.51 127.49A16 16 0 0 0 48 141.63v295.8a16 16 0 0 0 23.49 14.14l97.82-63.79a32 32 0 0 1 29.5-.24l111.86 73a32 32 0 0 0 29.27-.11l115.43-75.94a16 16 0 0 0 8.63-14.2V74.57a16 16 0 0 0-23.49-14.14l-98 63.86a32 32 0 0 1-29.24.35zM328 128v336M184 48v336"},child:[]}]})(e)}function FG(e){return oe({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M48.17 113.34A32 32 0 0 0 32 141.24V438a32 32 0 0 0 47 28.37c.43-.23.85-.47 1.26-.74l84.14-55.05a8 8 0 0 0 3.63-6.72V46.45a8 8 0 0 0-12.51-6.63zm164.19-74.03A8 8 0 0 0 200 46v357.56a8 8 0 0 0 3.63 6.72l96 62.42A8 8 0 0 0 312 466V108.67a8 8 0 0 0-3.64-6.73zm252.17 7.16a31.64 31.64 0 0 0-31.5-.88 12.07 12.07 0 0 0-1.25.74l-84.15 55a8 8 0 0 0-3.63 6.72v357.46a8 8 0 0 0 12.52 6.63l107.07-73.46a32 32 0 0 0 16.41-28v-296a32.76 32.76 0 0 0-15.47-28.21z"},child:[]}]})(e)}function UG(e){return oe({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{fill:"none",strokeLinecap:"round",strokeMiterlimit:"10",strokeWidth:"48",d:"M88 152h336M88 256h336M88 360h336"},child:[]}]})(e)}function yC(e){return oe({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M473 39.05a24 24 0 0 0-25.5-5.46L47.47 185h-.08a24 24 0 0 0 1 45.16l.41.13 137.3 58.63a16 16 0 0 0 15.54-3.59L422 80a7.07 7.07 0 0 1 10 10L226.66 310.26a16 16 0 0 0-3.59 15.54l58.65 137.38c.06.2.12.38.19.57 3.2 9.27 11.3 15.81 21.09 16.25h1a24.63 24.63 0 0 0 23-15.46L478.39 64.62A24 24 0 0 0 473 39.05z"},child:[]}]})(e)}function ZG(e){return oe({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M208 432h-48a16 16 0 0 1-16-16V96a16 16 0 0 1 16-16h48a16 16 0 0 1 16 16v320a16 16 0 0 1-16 16zm144 0h-48a16 16 0 0 1-16-16V96a16 16 0 0 1 16-16h48a16 16 0 0 1 16 16v320a16 16 0 0 1-16 16z"},child:[]}]})(e)}function $G(e){return oe({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{fill:"none",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"32",d:"M402 168c-2.93 40.67-33.1 72-66 72s-63.12-31.32-66-72c-3-42.31 26.37-72 66-72s69 30.46 66 72z"},child:[]},{tag:"path",attr:{fill:"none",strokeMiterlimit:"10",strokeWidth:"32",d:"M336 304c-65.17 0-127.84 32.37-143.54 95.41-2.08 8.34 3.15 16.59 11.72 16.59h263.65c8.57 0 13.77-8.25 11.72-16.59C463.85 335.36 401.18 304 336 304z"},child:[]},{tag:"path",attr:{fill:"none",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"32",d:"M200 185.94c-2.34 32.48-26.72 58.06-53 58.06s-50.7-25.57-53-58.06C91.61 152.15 115.34 128 147 128s55.39 24.77 53 57.94z"},child:[]},{tag:"path",attr:{fill:"none",strokeLinecap:"round",strokeMiterlimit:"10",strokeWidth:"32",d:"M206 306c-18.05-8.27-37.93-11.45-59-11.45-52 0-102.1 25.85-114.65 76.2-1.65 6.66 2.53 13.25 9.37 13.25H154"},child:[]}]})(e)}function WG(e){return oe({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M336 256c-20.56 0-40.44-9.18-56-25.84-15.13-16.25-24.37-37.92-26-61-1.74-24.62 5.77-47.26 21.14-63.76S312 80 336 80c23.83 0 45.38 9.06 60.7 25.52 15.47 16.62 23 39.22 21.26 63.63-1.67 23.11-10.9 44.77-26 61C376.44 246.82 356.57 256 336 256zm66-88zm65.83 264H204.18a27.71 27.71 0 0 1-22-10.67 30.22 30.22 0 0 1-5.26-25.79c8.42-33.81 29.28-61.85 60.32-81.08C264.79 297.4 299.86 288 336 288c36.85 0 71 9 98.71 26.05 31.11 19.13 52 47.33 60.38 81.55a30.27 30.27 0 0 1-5.32 25.78A27.68 27.68 0 0 1 467.83 432zM147 260c-35.19 0-66.13-32.72-69-72.93-1.42-20.6 5-39.65 18-53.62 12.86-13.83 31-21.45 51-21.45s38 7.66 50.93 21.57c13.1 14.08 19.5 33.09 18 53.52-2.87 40.2-33.8 72.91-68.93 72.91zm65.66 31.45c-17.59-8.6-40.42-12.9-65.65-12.9-29.46 0-58.07 7.68-80.57 21.62-25.51 15.83-42.67 38.88-49.6 66.71a27.39 27.39 0 0 0 4.79 23.36A25.32 25.32 0 0 0 41.72 400h111a8 8 0 0 0 7.87-6.57c.11-.63.25-1.26.41-1.88 8.48-34.06 28.35-62.84 57.71-83.82a8 8 0 0 0-.63-13.39c-1.57-.92-3.37-1.89-5.42-2.89z"},child:[]}]})(e)}function GG(e){return oe({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M336 96a80 80 0 1 0-96 78.39v283.17a32.09 32.09 0 0 0 2.49 12.38l10.07 24a3.92 3.92 0 0 0 6.88 0l10.07-24a32.09 32.09 0 0 0 2.49-12.38V174.39A80.13 80.13 0 0 0 336 96zm-56 0a24 24 0 1 1 24-24 24 24 0 0 1-24 24z"},child:[]}]})(e)}function YG(e){return oe({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M256 48C141.31 48 48 141.31 48 256s93.31 208 208 208 208-93.31 208-208S370.69 48 256 48zm80 224H176a16 16 0 0 1 0-32h160a16 16 0 0 1 0 32z"},child:[]}]})(e)}function qG(e){return oe({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{fill:"none",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"32",d:"M262.29 192.31a64 64 0 1 0 57.4 57.4 64.13 64.13 0 0 0-57.4-57.4zM416.39 256a154.34 154.34 0 0 1-1.53 20.79l45.21 35.46a10.81 10.81 0 0 1 2.45 13.75l-42.77 74a10.81 10.81 0 0 1-13.14 4.59l-44.9-18.08a16.11 16.11 0 0 0-15.17 1.75A164.48 164.48 0 0 1 325 400.8a15.94 15.94 0 0 0-8.82 12.14l-6.73 47.89a11.08 11.08 0 0 1-10.68 9.17h-85.54a11.11 11.11 0 0 1-10.69-8.87l-6.72-47.82a16.07 16.07 0 0 0-9-12.22 155.3 155.3 0 0 1-21.46-12.57 16 16 0 0 0-15.11-1.71l-44.89 18.07a10.81 10.81 0 0 1-13.14-4.58l-42.77-74a10.8 10.8 0 0 1 2.45-13.75l38.21-30a16.05 16.05 0 0 0 6-14.08c-.36-4.17-.58-8.33-.58-12.5s.21-8.27.58-12.35a16 16 0 0 0-6.07-13.94l-38.19-30A10.81 10.81 0 0 1 49.48 186l42.77-74a10.81 10.81 0 0 1 13.14-4.59l44.9 18.08a16.11 16.11 0 0 0 15.17-1.75A164.48 164.48 0 0 1 187 111.2a15.94 15.94 0 0 0 8.82-12.14l6.73-47.89A11.08 11.08 0 0 1 213.23 42h85.54a11.11 11.11 0 0 1 10.69 8.87l6.72 47.82a16.07 16.07 0 0 0 9 12.22 155.3 155.3 0 0 1 21.46 12.57 16 16 0 0 0 15.11 1.71l44.89-18.07a10.81 10.81 0 0 1 13.14 4.58l42.77 74a10.8 10.8 0 0 1-2.45 13.75l-38.21 30a16.05 16.05 0 0 0-6.05 14.08c.33 4.14.55 8.3.55 12.47z"},child:[]}]})(e)}function XG(e){return oe({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"circle",attr:{cx:"256",cy:"256",r:"48"},child:[]},{tag:"path",attr:{d:"m470.39 300-.47-.38-31.56-24.75a16.11 16.11 0 0 1-6.1-13.33v-11.56a16 16 0 0 1 6.11-13.22L469.92 212l.47-.38a26.68 26.68 0 0 0 5.9-34.06l-42.71-73.9a1.59 1.59 0 0 1-.13-.22A26.86 26.86 0 0 0 401 92.14l-.35.13-37.1 14.93a15.94 15.94 0 0 1-14.47-1.29q-4.92-3.1-10-5.86a15.94 15.94 0 0 1-8.19-11.82l-5.59-39.59-.12-.72A27.22 27.22 0 0 0 298.76 26h-85.52a26.92 26.92 0 0 0-26.45 22.39l-.09.56-5.57 39.67a16 16 0 0 1-8.13 11.82 175.21 175.21 0 0 0-10 5.82 15.92 15.92 0 0 1-14.43 1.27l-37.13-15-.35-.14a26.87 26.87 0 0 0-32.48 11.34l-.13.22-42.77 73.95a26.71 26.71 0 0 0 5.9 34.1l.47.38 31.56 24.75a16.11 16.11 0 0 1 6.1 13.33v11.56a16 16 0 0 1-6.11 13.22L42.08 300l-.47.38a26.68 26.68 0 0 0-5.9 34.06l42.71 73.9a1.59 1.59 0 0 1 .13.22 26.86 26.86 0 0 0 32.45 11.3l.35-.13 37.07-14.93a15.94 15.94 0 0 1 14.47 1.29q4.92 3.11 10 5.86a15.94 15.94 0 0 1 8.19 11.82l5.56 39.59.12.72A27.22 27.22 0 0 0 213.24 486h85.52a26.92 26.92 0 0 0 26.45-22.39l.09-.56 5.57-39.67a16 16 0 0 1 8.18-11.82c3.42-1.84 6.76-3.79 10-5.82a15.92 15.92 0 0 1 14.43-1.27l37.13 14.95.35.14a26.85 26.85 0 0 0 32.48-11.34 2.53 2.53 0 0 1 .13-.22l42.71-73.89a26.7 26.7 0 0 0-5.89-34.11zm-134.48-40.24a80 80 0 1 1-83.66-83.67 80.21 80.21 0 0 1 83.66 83.67z"},child:[]}]})(e)}function _C(e){return oe({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M479.07 111.36a16 16 0 0 0-13.15-14.74c-86.5-15.52-122.61-26.74-203.33-63.2a16 16 0 0 0-13.18 0C168.69 69.88 132.58 81.1 46.08 96.62a16 16 0 0 0-13.15 14.74c-3.85 61.11 4.36 118.05 24.43 169.24A349.47 349.47 0 0 0 129 393.11c53.47 56.73 110.24 81.37 121.07 85.73a16 16 0 0 0 12 0c10.83-4.36 67.6-29 121.07-85.73a349.47 349.47 0 0 0 71.5-112.51c20.07-51.19 28.28-108.13 24.43-169.24zm-131 75.11-110.8 128a16 16 0 0 1-11.41 5.53h-.66a16 16 0 0 1-11.2-4.57l-49.2-48.2a16 16 0 1 1 22.4-22.86l37 36.29 99.7-115.13a16 16 0 0 1 24.2 20.94z"},child:[]}]})(e)}function KG(e){return oe({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M479.07 111.35a16 16 0 0 0-13.15-14.75C379.89 81.18 343.69 69.12 266 34.16c-7.76-2.89-12.57-2.84-20 0-77.69 35-113.89 47-199.92 62.44a16 16 0 0 0-13.15 14.75c-3.85 61.1 4.34 118 24.36 169.15a348.86 348.86 0 0 0 71.43 112.41c44.67 47.43 94.2 75.12 119.74 85.6a20 20 0 0 0 15.11 0c27-10.92 74.69-37.82 119.71-85.62a348.86 348.86 0 0 0 71.43-112.39c20.02-51.14 28.21-108.05 24.36-169.15z"},child:[]}]})(e)}function QG(e){return oe({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M402 76.94C362.61 37.63 310.78 16 256 16h-.37A208 208 0 0 0 48 224v100.67A79.62 79.62 0 0 0 98.29 399l23.71 9.42a15.92 15.92 0 0 1 9.75 11.72l10 50.13A32.09 32.09 0 0 0 173.12 496H184a8 8 0 0 0 8-8v-39.55c0-8.61 6.62-16 15.23-16.43A16 16 0 0 1 224 448v40a8 8 0 0 0 8 8 8 8 0 0 0 8-8v-39.55c0-8.61 6.62-16 15.23-16.43A16 16 0 0 1 272 448v40a8 8 0 0 0 8 8 8 8 0 0 0 8-8v-39.55c0-8.61 6.62-16 15.23-16.43A16 16 0 0 1 320 448v40a8 8 0 0 0 8 8h10.88a32.09 32.09 0 0 0 31.38-25.72l10-50.14a16 16 0 0 1 9.74-11.72l23.71-9.42A79.62 79.62 0 0 0 464 324.67v-99c0-56-22-108.81-62-148.73zM171.66 335.88a56 56 0 1 1 52.22-52.22 56 56 0 0 1-52.22 52.22zM281 397.25a16.37 16.37 0 0 1-9.3 2.75h-31.4a16.37 16.37 0 0 1-9.28-2.75 16 16 0 0 1-6.6-16.9l15.91-47.6C243 326 247.25 321 254 320.13c8.26-1 14 2.87 17.61 12.22l16 48a16 16 0 0 1-6.61 16.9zm66.68-61.37a56 56 0 1 1 52.22-52.22 56 56 0 0 1-52.24 52.22z"},child:[]}]})(e)}function JG(e){return oe({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"rect",attr:{width:"448",height:"80",x:"32",y:"48",rx:"32",ry:"32"},child:[]},{tag:"path",attr:{d:"M74.45 160a8 8 0 0 0-8 8.83l26.31 252.56a1.5 1.5 0 0 0 0 .22A48 48 0 0 0 140.45 464h231.09a48 48 0 0 0 47.67-42.39v-.21l26.27-252.57a8 8 0 0 0-8-8.83zm248.86 180.69a16 16 0 1 1-22.63 22.62L256 318.63l-44.69 44.68a16 16 0 0 1-22.63-22.62L233.37 296l-44.69-44.69a16 16 0 0 1 22.63-22.62L256 273.37l44.68-44.68a16 16 0 0 1 22.63 22.62L278.62 296z"},child:[]}]})(e)}function qu(e){return oe({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{fill:"none",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"32",d:"M352 368h112V256"},child:[]},{tag:"path",attr:{fill:"none",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"32",d:"m48 144 121.37 121.37a32 32 0 0 0 45.26 0l50.74-50.74a32 32 0 0 1 45.26 0L448 352"},child:[]}]})(e)}function Xu(e){return oe({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{fill:"none",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"32",d:"M352 144h112v112"},child:[]},{tag:"path",attr:{fill:"none",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"32",d:"m48 368 121.37-121.37a32 32 0 0 1 45.26 0l50.74 50.74a32 32 0 0 0 45.26 0L448 160"},child:[]}]})(e)}function eY(e){return oe({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{fill:"none",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"32",d:"M176 464h160m-80 0V336m128-112c0-50.64-.08-134.63-.12-160a16 16 0 0 0-16-16l-223.79.26a16 16 0 0 0-16 15.95c0 30.58-.13 129.17-.13 159.79 0 64.28 83 112 128 112S384 288.28 384 224z"},child:[]},{tag:"path",attr:{fill:"none",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"32",d:"M128 96H48v16c0 55.22 33.55 112 80 112M384 96h80v16c0 55.22-33.55 112-80 112"},child:[]}]})(e)}function tY(e){return oe({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M464 80h-60.1a4 4 0 0 1-4-4V63.92a32 32 0 0 0-32-31.92l-223.79.26a32 32 0 0 0-31.94 31.93V76a4 4 0 0 1-4 4H48a16 16 0 0 0-16 16v16c0 54.53 30 112.45 76.52 125.35a7.82 7.82 0 0 1 5.55 5.9c5.77 26.89 23.52 52.5 51.41 73.61 20.91 15.83 45.85 27.5 68.27 32.48a8 8 0 0 1 6.25 7.8V444a4 4 0 0 1-4 4h-59.55c-8.61 0-16 6.62-16.43 15.23A16 16 0 0 0 176 480h159.55c8.61 0 16-6.62 16.43-15.23A16 16 0 0 0 336 448h-60a4 4 0 0 1-4-4v-86.86a8 8 0 0 1 6.25-7.8c22.42-5 47.36-16.65 68.27-32.48 27.89-21.11 45.64-46.72 51.41-73.61a7.82 7.82 0 0 1 5.55-5.9C450 224.45 480 166.53 480 112V96a16 16 0 0 0-16-16zM112 198.22a4 4 0 0 1-6 3.45c-10.26-6.11-17.75-15.37-22.14-21.89-11.91-17.69-19-40.67-19.79-63.63a4 4 0 0 1 4-4.15h40a4 4 0 0 1 4 4c-.02 27.45-.07 58.87-.07 82.22zm316.13-18.44c-4.39 6.52-11.87 15.78-22.13 21.89a4 4 0 0 1-6-3.46c0-26.51 0-56.63-.05-82.21a4 4 0 0 1 4-4h40a4 4 0 0 1 4 4.15c-.79 22.96-7.9 45.94-19.81 63.63z"},child:[]}]})(e)}function nY(e){return oe({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"rect",attr:{width:"416",height:"288",x:"48",y:"144",fill:"none",strokeLinejoin:"round",strokeWidth:"32",rx:"48",ry:"48"},child:[]},{tag:"path",attr:{fill:"none",strokeLinejoin:"round",strokeWidth:"32",d:"M411.36 144v-30A50 50 0 0 0 352 64.9L88.64 109.85A50 50 0 0 0 48 159v49"},child:[]},{tag:"path",attr:{d:"M368 320a32 32 0 1 1 32-32 32 32 0 0 1-32 32z"},child:[]}]})(e)}function iY(e){return oe({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M95.5 104h320a87.73 87.73 0 0 1 11.18.71 66 66 0 0 0-77.51-55.56L86 94.08h-.3a66 66 0 0 0-41.07 26.13A87.57 87.57 0 0 1 95.5 104zm320 24h-320a64.07 64.07 0 0 0-64 64v192a64.07 64.07 0 0 0 64 64h320a64.07 64.07 0 0 0 64-64V192a64.07 64.07 0 0 0-64-64zM368 320a32 32 0 1 1 32-32 32 32 0 0 1-32 32z"},child:[]},{tag:"path",attr:{d:"M32 259.5V160c0-21.67 12-58 53.65-65.87C121 87.5 156 87.5 156 87.5s23 16 4 16-18.5 24.5 0 24.5 0 23.5 0 23.5L85.5 236z"},child:[]}]})(e)}let he={};const sY=e=>{he=e};function ol(e,t=!0){const i=new Date-e,s=Math.floor(i/(1e3*60)),r=Math.floor(i/(1e3*60*60)),a=Math.floor(r/24);return s<1?"just now":s<60?`${s} ${C("menu.minute")}${s>1?"s":""}`+(t?C("ago"):""):r<24?`${r} ${C("menu.hour")}${r>1?"s":""}`+(t?C("ago"):""):a<7?`${a} ${C("menu.day2")}${a>1?"s":""}`+(t?C("ago"):""):new Intl.DateTimeFormat(he.dateLanguage).format(e)}const xs=e=>{const n=e-new Date,i=Math.floor(n/(1e3*60)),s=Math.floor(n/(1e3*60*60)),r=Math.floor(s/24);return i<1?"less than one minute":i<60?`${i} ${C("menu.minute")}${i>1?"s":""}`:s<24?`${s} ${C("menu.hour")}${s>1?"s":""}`:r<7?`${r} ${C("menu.day2")}${r>1?"s":""}`:new Intl.DateTimeFormat(he.dateLanguage).format(e)},rY=e=>{var t=new Date(e);return t.getHours()+":"+(t.getMinutes()<10?"0":"")+t.getMinutes()},yk=e=>{const t=new Date(e),n={weekday:"long"};return t.toLocaleDateString(he.dateLanguage,n)},aY=e=>{const t=new Date(e),n={month:"long"};return t.toLocaleDateString(he.dateLanguage,n)};ru.register(pf,Vg,Fd,ck,qb,Yb,sc,Gb);let Zg,$g,Qi;const oY=(e,t,n)=>{const i=t.right-t.left,s=t.bottom-t.top,r=n?["#55DC5080","#55DC50","#0D5C0A80"]:["#DC505080","#DC5050","#5C0A0A80"];return(!Qi||Zg!==i||$g!==s)&&(Zg=i,$g=s,Qi=e.createLinearGradient(t.left,0,t.right,0),Qi.addColorStop(0,r[0]),Qi.addColorStop(.5,r[1]),Qi.addColorStop(1,r[2])),Qi},lY=(e,t,n)=>{const i=t.right-t.left,s=t.bottom-t.top,r=n?["#1fbea3cc","#1fbea300"]:["#DC5050cc","#5C0A0A00"];return(!Qi||Zg!==i||$g!==s)&&(Zg=i,$g=s,Qi=e.createLinearGradient(0,t.top,0,t.bottom),Qi.addColorStop(0,r[0]),Qi.addColorStop(1,r[1])),Qi},kl=(e,t)=>{if(!t||e===0)return 0;const n=(t-e)/e*100;return Math.round(n)},bC=(e,t,n,i)=>({labels:e,datasets:[{fill:i,data:t,borderColor:function(s){if(i)return n>0?"#1fbea3":"#DC5050";const r=s.chart,{ctx:a,chartArea:o}=r;if(o)return oY(a,o,n>0)},borderWidth:1,borderRadius:i?10:0,backgroundColor:function(s){if(i){const r=s.chart,{ctx:a,chartArea:o}=r;return o?lY(a,o,n>0):void 0}else return"transparent"},tension:.4}]}),wC=()=>{const e=x.useContext(Un),[t,n]=x.useState([]),[i,s]=x.useState([]),[r,a]=x.useState([]),[o,c]=x.useState([]),[d,h]=x.useState({cash:[],dirty_cash:[],total_cash:[],members:[],gangRep:[],tasks:[],zones:[],date_stamp:[]}),[m,g]=x.useState(!1),[v,b]=x.useState([]),w=Vl(0),M=Vl(0),y=Vl(0),S=Vl(0),T=Vl(0),N=Fu(y,G=>Math.round(G)),k=Fu(S,G=>Math.round(G)),E=Fu(w,G=>Math.round(G)),D=Fu(M,G=>Math.round(G)),O=Fu(T,G=>Math.round(G)),I=async()=>{const G=await K("get_transactions_homepage",{gangId:e.gangId});b(G)},P={cutout:"80%",animation:{},plugins:{legend:{display:!1},tooltip:{display:!1,enabled:!1}}},H={labels:[""],datasets:[{label:"",data:[e.xp,he.xpNeededForNextLevel-e.xp],borderWidth:0,borderRadius:10,rotation:180,backgroundColor:[li("gang_color"),"transparent"],hoverBackgroundColor:[li("gang_color"),"transparent"]}]},V=async()=>{const G=await K("get_weekly_data",{gangId:e.gangId});let ie={cash:[],dirty_cash:[],total_cash:[],members:[],gangRep:[],tasks:[],zones:[],date_stamp:[]};G.forEach(se=>{ie.cash.push(se.cash),ie.dirty_cash.push(se.dirty_cash),ie.total_cash.push(se.cash+se.dirty_cash),ie.members.push(se.members),ie.gangRep.push(se.gangRep),ie.tasks.push(se.tasks),ie.zones.push(se.zones),ie.date_stamp.push(yk(se.date_stamp))}),h(ie),s(ie.cash),a(ie.dirty_cash),c(ie.total_cash),n(ie.date_stamp),g(!0)};x.useEffect(()=>{e&&(V(),I(),Uu(w,e.cash||0,{duration:1}),Uu(M,e.dirtyCash||0,{duration:1}),Uu(y,e.totalMembers||0,{duration:1}),Uu(S,e.gangRep||0,{duration:1}),Uu(T,e.nbrZones||0,{duration:1}))},[e]);const J=x.useMemo(()=>{var G,ie,se;return{responsive:!0,maintainAspectRatio:!1,elements:{line:{tension:.4}},scales:{x:{display:!1,grid:{display:!1}},y:{display:!1,grid:{display:!1},ticks:{precision:0}}},plugins:{legend:{display:!1},tooltip:{backgroundColor:((G=li("bg3"))==null?void 0:G.value)||"rgba(55, 65, 81, 1)",bodyAlign:"center",titleColor:((ie=li("textColor"))==null?void 0:ie.value)||"#ffffff",bodyColor:((se=li("textColor"))==null?void 0:se.value)||"#ffffff",displayColors:!1}}}},[]),Q=d.cash.length>0?kl(d.cash[0],d.cash[d.cash.length-1]):0,U=d.dirty_cash.length>0?kl(d.dirty_cash[0],d.dirty_cash[d.dirty_cash.length-1]):0,R=d.total_cash.length>0?kl(d.total_cash[0],d.total_cash[d.total_cash.length-1]):0,$=d.members.length>0?kl(d.members[0],d.members[d.members.length-1]):0,B=d.gangRep.length>0?kl(d.gangRep[0],d.gangRep[d.gangRep.length-1]):0,W=d.zones.length>0?kl(d.zones[0],d.zones[d.zones.length-1]):0;return e?u.jsxs("div",{className:"flex flex-col gap-5 items-center justify-start pt-2 w-full h-full overflow-y-auto",children:[u.jsxs(de.div,{initial:{opacity:0,x:-10},animate:{opacity:1,x:0},transition:{duration:.2,delay:.3},className:"relative flex flex-row items-center gap-2 mt-2 text-2xl text-foreground self-start ml-[2.5%]",children:[(e==null?void 0:e.logo)&&u.jsx("img",{src:e==null?void 0:e.logo,alt:"logo",className:"w-12 h-12 aspect-square rounded-full"}),C("menu.welcome_back")+" ",u.jsx(de.span,{initial:{opacity:0,x:-20},animate:{opacity:1,x:0},transition:{duration:.2,delay:.5},className:"text-primary",children:e.playerName})]}),m&&u.jsxs(de.div,{className:"w-[95%] grid grid-cols-1 md:grid-cols-3 lg:grid-cols-5 gap-4",initial:{opacity:0,x:-30},animate:{opacity:1,x:0},transition:{duration:.3},children:[u.jsxs("div",{className:"w-full text-foreground rounded-lg p-3 bg-card border border-border flex flex-col gap-2",children:[u.jsx("div",{className:"text-xs text-muted-foreground flex items-center justify-between",children:C("menu.total_cash")}),u.jsxs("div",{className:"text-xl text-foreground",children:[u.jsx(de.span,{children:E})," ",u.jsx("span",{className:"text-muted-foreground text-sm",children:C("currency")})]}),u.jsxs("div",{className:"flex flex-row items-center justify-start text-xs",children:[u.jsxs("span",{className:`flex items-center gap-px ${Q>=0?"text-green-500":"text-red-500"}`,children:[Q>=0?u.jsx(Xu,{}):u.jsx(qu,{})," ",Q,"%"]}),u.jsx("span",{className:"ml-1 text-muted-foreground",children:C("menu.this_week")})]})]}),u.jsxs("div",{className:"w-full text-foreground rounded-lg p-3 bg-card border border-border flex flex-col gap-2",children:[u.jsx("div",{className:"text-xs text-muted-foreground flex items-center justify-between",children:C("menu.total_dirty_cash")}),u.jsxs("div",{className:"text-xl text-foreground",children:[u.jsx(de.span,{children:D})," ",u.jsx("span",{className:"text-muted-foreground text-sm",children:C("currency")})]}),u.jsxs("div",{className:"flex flex-row items-center justify-start text-xs",children:[u.jsxs("span",{className:`flex items-center gap-px ${U>=0?"text-green-500":"text-red-500"}`,children:[U>=0?u.jsx(Xu,{}):u.jsx(qu,{})," ",U,"%"]}),u.jsx("span",{className:"ml-1 text-muted-foreground",children:C("menu.this_week")})]})]}),u.jsxs("div",{className:"w-full text-foreground rounded-lg p-3 bg-card border border-border flex flex-col gap-2",children:[u.jsx("div",{className:"text-xs text-muted-foreground flex items-center justify-between",children:C("menu.total_members")}),u.jsxs("div",{className:"text-xl text-foreground",children:[u.jsx(de.span,{children:N})," ",u.jsx("span",{className:"text-muted-foreground text-sm",children:C("menu.members")})]}),u.jsxs("div",{className:"flex flex-row items-center justify-start text-xs",children:[u.jsxs("span",{className:`flex items-center gap-px ${$>=0?"text-green-500":"text-red-500"}`,children:[$>=0?u.jsx(Xu,{}):u.jsx(qu,{})," ",$,"%"]}),u.jsx("span",{className:"ml-1 text-muted-foreground",children:C("menu.this_week")})]})]}),u.jsxs("div",{className:"w-full text-foreground rounded-lg p-3 bg-card border border-border flex flex-col gap-2",children:[u.jsx("div",{className:"text-xs text-muted-foreground flex items-center justify-between",children:C("menu.total_gang_rep")}),u.jsxs("div",{className:"text-xl text-foreground",children:[u.jsx(de.span,{children:k})," ",u.jsx("span",{className:"text-muted-foreground text-sm",children:C("menu.gang_rep")})]}),u.jsxs("div",{className:"flex flex-row items-center justify-start text-xs",children:[u.jsxs("span",{className:`flex items-center gap-px ${B>=0?"text-green-500":"text-red-500"}`,children:[B>=0?u.jsx(Xu,{}):u.jsx(qu,{})," ",B,"%"]}),u.jsx("span",{className:"ml-1 text-muted-foreground",children:C("menu.this_week")})]})]}),u.jsxs("div",{className:"w-full text-foreground rounded-lg p-3 bg-card border border-border flex flex-col gap-2",children:[u.jsx("div",{className:"text-xs text-muted-foreground flex items-center justify-between",children:C("menu.total_zones")}),u.jsxs("div",{className:"text-xl text-foreground",children:[u.jsx(de.span,{children:O})," ",u.jsx("span",{className:"text-muted-foreground text-sm",children:C("menu.zones")})]}),u.jsxs("div",{className:"flex flex-row items-center justify-start text-xs",children:[u.jsxs("span",{className:`flex items-center gap-px ${W>=0?"text-green-500":"text-red-500"}`,children:[W>=0?u.jsx(Xu,{}):u.jsx(qu,{})," ",W,"%"]}),u.jsx("span",{className:"ml-1 text-muted-foreground",children:C("menu.this_week")})]})]})]}),m&&u.jsxs(de.div,{className:"w-[95%] grid grid-cols-1 md:grid-cols-5 gap-4",initial:{opacity:0,y:-30},animate:{opacity:1,y:0},transition:{duration:.3},children:[u.jsxs("div",{className:"md:col-span-3 h-52 p-3 rounded-lg border border-border bg-card flex flex-col gap-2",children:[u.jsx("div",{className:"text-xs text-muted-foreground",children:C("menu.total_cash_this_week")}),u.jsx("div",{className:"flex-grow",children:u.jsx(py,{data:bC(t,o,R,!0),options:J})})]}),u.jsxs("div",{className:"md:col-span-2 h-52 p-3 rounded-lg border border-border bg-card flex flex-col gap-2",children:[u.jsx("div",{className:"text-xs text-muted-foreground",children:C("menu.controlling_zones_this_week")}),u.jsx("div",{className:"flex-grow",children:u.jsx(vy,{data:bC(t,d.zones,W,!0),options:J})})]})]}),m&&u.jsxs(de.div,{className:"w-[95%] grid grid-cols-1 md:grid-cols-2 gap-4 ",initial:{opacity:0,y:30},animate:{opacity:1,y:0},transition:{duration:.3},children:[u.jsxs("div",{className:"relative h-40 p-4 border border-border bg-card rounded-lg flex flex-col gap-2",children:[u.jsx("div",{className:"text-xs text-muted-foreground",children:C("menu.current_level")}),u.jsxs("div",{className:"text-xl text-foreground",children:[C("menu.level")," ",e.level]}),u.jsx("span",{className:"w-3/5 text-muted-foreground text-xs",children:C("menu.level_up_desc")}),u.jsx("div",{className:"absolute flex flex-col items-end justify-center w-full h-4/5 right-4 p-2 bottom-0",children:u.jsxs("div",{className:"relative h-24 w-24 flex items-center justify-center",children:[" ",u.jsxs("div",{className:"absolute text-base text-foreground",children:[Math.round(e.xp/he.xpNeededForNextLevel*100),"%"]}),u.jsx(gk,{data:H,options:P})]})})]}),u.jsxs("div",{className:"relative h-40 p-4 border border-border bg-card rounded-lg flex flex-col gap-2",children:[u.jsx("div",{className:"text-xs text-muted-foreground",children:C("menu.recent_transfers")}),u.jsxs("div",{className:"relative flex flex-col self-center gap-1 w-full flex-grow overflow-hidden",children:[u.jsx("div",{className:"h-full overflow-y-auto pr-2",children:v.map((G,ie)=>u.jsxs(de.div,{initial:{opacity:0},animate:{opacity:1},transition:{duration:.2,delay:.025*ie},className:"grid grid-cols-[2fr_1.5fr_2fr] gap-1 items-center py-1 text-xs border-b border-border/50 last:border-b-0",children:[u.jsx("div",{className:"truncate",children:G.handled_by}),u.jsx("div",{className:`truncate text-center px-1.5 py-0.5 rounded-full text-xs ${G.type==="deposit"||G.type==="deposit_dirty"?"bg-green-500/20 text-green-700 dark:text-green-400":"bg-red-500/20 text-red-700 dark:text-red-400"}`,children:C("menu."+G.type)}),u.jsx("div",{className:"text-right truncate",children:G.amount+" "+C("currency")})]},G.id))}),u.jsx("div",{className:"absolute bottom-0 left-0 h-12 w-full bg-gradient-to-t from-card to-transparent pointer-events-none"})]})]})]})]}):null};function Wg(e){return oe({tag:"svg",attr:{viewBox:"0 0 256 256",fill:"currentColor"},child:[{tag:"path",attr:{d:"M126,30.49V128a6,6,0,0,1-12,0V30.49L92.24,52.24a6,6,0,0,1-8.48-8.48l32-32a6,6,0,0,1,8.48,0l32,32a6,6,0,1,1-8.48,8.48Zm64,94.2V96a14,14,0,0,0-14-14H160a6,6,0,0,0,0,12h16a2,2,0,0,1,2,2v86.14A26,26,0,0,0,133.49,209c0,.1.11.19.17.29l22.26,34a6,6,0,0,0,10-6.58L143.8,202.87A14,14,0,0,1,168.13,189a2.75,2.75,0,0,0,.17.29L179,205.59a6,6,0,0,0,11-3.28V139.57a76.83,76.83,0,0,1,28,59.08V240a6,6,0,0,0,12,0V198.65A88.88,88.88,0,0,0,190,124.69ZM80,82H64A14,14,0,0,0,50,96V200a6,6,0,0,0,12,0V96a2,2,0,0,1,2-2H80a6,6,0,0,0,0-12Z"},child:[]}]})(e)}function Gg(e){return oe({tag:"svg",attr:{viewBox:"0 0 256 256",fill:"currentColor"},child:[{tag:"path",attr:{d:"M230,198.65V240a6,6,0,0,1-12,0V198.65a76.83,76.83,0,0,0-28-59.08v62.74a6,6,0,0,1-11,3.28l-10.68-16.3a2.75,2.75,0,0,1-.17-.29,14,14,0,0,0-24.33,13.87L166,236.71a6,6,0,0,1-10,6.58l-22.26-34c-.06-.1-.12-.19-.17-.29A26,26,0,0,1,178,182.14V64a2,2,0,0,0-2-2H160a6,6,0,0,1,0-12h16a14,14,0,0,1,14,14v60.69A88.88,88.88,0,0,1,230,198.65ZM86,56a6,6,0,0,0-6-6H64A14,14,0,0,0,50,64V200a6,6,0,0,0,12,0V64a2,2,0,0,1,2-2H80A6,6,0,0,0,86,56Zm70.24,43.76a6,6,0,0,0-8.48,0L126,121.51V16a6,6,0,0,0-12,0V121.51L92.24,99.76a6,6,0,0,0-8.48,8.48l32,32a6,6,0,0,0,8.48,0l32-32A6,6,0,0,0,156.24,99.76Z"},child:[]}]})(e)}function SC(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function n0(...e){return t=>{let n=!1;const i=e.map(s=>{const r=SC(s,t);return!n&&typeof r=="function"&&(n=!0),r});if(n)return()=>{for(let s=0;s<i.length;s++){const r=i[s];typeof r=="function"?r():SC(e[s],null)}}}}function qe(...e){return x.useCallback(n0(...e),e)}function Yo(e){const t=uY(e),n=x.forwardRef((i,s)=>{const{children:r,...a}=i,o=x.Children.toArray(r),c=o.find(dY);if(c){const d=c.props.children,h=o.map(m=>m===c?x.Children.count(d)>1?x.Children.only(null):x.isValidElement(d)?d.props.children:null:m);return u.jsx(t,{...a,ref:s,children:x.isValidElement(d)?x.cloneElement(d,void 0,h):null})}return u.jsx(t,{...a,ref:s,children:r})});return n.displayName=`${e}.Slot`,n}var cY=Yo("Slot");function uY(e){const t=x.forwardRef((n,i)=>{const{children:s,...r}=n;if(x.isValidElement(s)){const a=hY(s),o=fY(r,s.props);return s.type!==x.Fragment&&(o.ref=i?n0(i,a):a),x.cloneElement(s,o)}return x.Children.count(s)>1?x.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var _k=Symbol("radix.slottable");function bk(e){const t=({children:n})=>u.jsx(u.Fragment,{children:n});return t.displayName=`${e}.Slottable`,t.__radixId=_k,t}function dY(e){return x.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===_k}function fY(e,t){const n={...t};for(const i in t){const s=e[i],r=t[i];/^on[A-Z]/.test(i)?s&&r?n[i]=(...o)=>{const c=r(...o);return s(...o),c}:s&&(n[i]=s):i==="style"?n[i]={...s,...r}:i==="className"&&(n[i]=[s,r].filter(Boolean).join(" "))}return{...e,...n}}function hY(e){var i,s;let t=(i=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:i.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(s=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:s.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function wk(e){var t,n,i="";if(typeof e=="string"||typeof e=="number")i+=e;else if(typeof e=="object")if(Array.isArray(e)){var s=e.length;for(t=0;t<s;t++)e[t]&&(n=wk(e[t]))&&(i&&(i+=" "),i+=n)}else for(n in e)e[n]&&(i&&(i+=" "),i+=n);return i}function Sk(){for(var e,t,n=0,i="",s=arguments.length;n<s;n++)(e=arguments[n])&&(t=wk(e))&&(i&&(i+=" "),i+=t);return i}const CC=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,MC=Sk,Jb=(e,t)=>n=>{var i;if((t==null?void 0:t.variants)==null)return MC(e,n==null?void 0:n.class,n==null?void 0:n.className);const{variants:s,defaultVariants:r}=t,a=Object.keys(s).map(d=>{const h=n==null?void 0:n[d],m=r==null?void 0:r[d];if(h===null)return null;const g=CC(h)||CC(m);return s[d][g]}),o=n&&Object.entries(n).reduce((d,h)=>{let[m,g]=h;return g===void 0||(d[m]=g),d},{}),c=t==null||(i=t.compoundVariants)===null||i===void 0?void 0:i.reduce((d,h)=>{let{class:m,className:g,...v}=h;return Object.entries(v).every(b=>{let[w,M]=b;return Array.isArray(M)?M.includes({...r,...o}[w]):{...r,...o}[w]===M})?[...d,m,g]:d},[]);return MC(e,a,c,n==null?void 0:n.class,n==null?void 0:n.className)},e2="-",mY=e=>{const t=pY(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:i}=e;return{getClassGroupId:a=>{const o=a.split(e2);return o[0]===""&&o.length!==1&&o.shift(),Ck(o,t)||gY(a)},getConflictingClassGroupIds:(a,o)=>{const c=n[a]||[];return o&&i[a]?[...c,...i[a]]:c}}},Ck=(e,t)=>{var a;if(e.length===0)return t.classGroupId;const n=e[0],i=t.nextPart.get(n),s=i?Ck(e.slice(1),i):void 0;if(s)return s;if(t.validators.length===0)return;const r=e.join(e2);return(a=t.validators.find(({validator:o})=>o(r)))==null?void 0:a.classGroupId},TC=/^\[(.+)\]$/,gY=e=>{if(TC.test(e)){const t=TC.exec(e)[1],n=t==null?void 0:t.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}},pY=e=>{const{theme:t,prefix:n}=e,i={nextPart:new Map,validators:[]};return xY(Object.entries(e.classGroups),n).forEach(([r,a])=>{_y(a,i,r,t)}),i},_y=(e,t,n,i)=>{e.forEach(s=>{if(typeof s=="string"){const r=s===""?t:jC(t,s);r.classGroupId=n;return}if(typeof s=="function"){if(vY(s)){_y(s(i),t,n,i);return}t.validators.push({validator:s,classGroupId:n});return}Object.entries(s).forEach(([r,a])=>{_y(a,jC(t,r),n,i)})})},jC=(e,t)=>{let n=e;return t.split(e2).forEach(i=>{n.nextPart.has(i)||n.nextPart.set(i,{nextPart:new Map,validators:[]}),n=n.nextPart.get(i)}),n},vY=e=>e.isThemeGetter,xY=(e,t)=>t?e.map(([n,i])=>{const s=i.map(r=>typeof r=="string"?t+r:typeof r=="object"?Object.fromEntries(Object.entries(r).map(([a,o])=>[t+a,o])):r);return[n,s]}):e,yY=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=new Map,i=new Map;const s=(r,a)=>{n.set(r,a),t++,t>e&&(t=0,i=n,n=new Map)};return{get(r){let a=n.get(r);if(a!==void 0)return a;if((a=i.get(r))!==void 0)return s(r,a),a},set(r,a){n.has(r)?n.set(r,a):s(r,a)}}},Mk="!",_Y=e=>{const{separator:t,experimentalParseClassName:n}=e,i=t.length===1,s=t[0],r=t.length,a=o=>{const c=[];let d=0,h=0,m;for(let M=0;M<o.length;M++){let y=o[M];if(d===0){if(y===s&&(i||o.slice(M,M+r)===t)){c.push(o.slice(h,M)),h=M+r;continue}if(y==="/"){m=M;continue}}y==="["?d++:y==="]"&&d--}const g=c.length===0?o:o.substring(h),v=g.startsWith(Mk),b=v?g.substring(1):g,w=m&&m>h?m-h:void 0;return{modifiers:c,hasImportantModifier:v,baseClassName:b,maybePostfixModifierPosition:w}};return n?o=>n({className:o,parseClassName:a}):a},bY=e=>{if(e.length<=1)return e;const t=[];let n=[];return e.forEach(i=>{i[0]==="["?(t.push(...n.sort(),i),n=[]):n.push(i)}),t.push(...n.sort()),t},wY=e=>({cache:yY(e.cacheSize),parseClassName:_Y(e),...mY(e)}),SY=/\s+/,CY=(e,t)=>{const{parseClassName:n,getClassGroupId:i,getConflictingClassGroupIds:s}=t,r=[],a=e.trim().split(SY);let o="";for(let c=a.length-1;c>=0;c-=1){const d=a[c],{modifiers:h,hasImportantModifier:m,baseClassName:g,maybePostfixModifierPosition:v}=n(d);let b=!!v,w=i(b?g.substring(0,v):g);if(!w){if(!b){o=d+(o.length>0?" "+o:o);continue}if(w=i(g),!w){o=d+(o.length>0?" "+o:o);continue}b=!1}const M=bY(h).join(":"),y=m?M+Mk:M,S=y+w;if(r.includes(S))continue;r.push(S);const T=s(w,b);for(let N=0;N<T.length;++N){const k=T[N];r.push(y+k)}o=d+(o.length>0?" "+o:o)}return o};function MY(){let e=0,t,n,i="";for(;e<arguments.length;)(t=arguments[e++])&&(n=Tk(t))&&(i&&(i+=" "),i+=n);return i}const Tk=e=>{if(typeof e=="string")return e;let t,n="";for(let i=0;i<e.length;i++)e[i]&&(t=Tk(e[i]))&&(n&&(n+=" "),n+=t);return n};function TY(e,...t){let n,i,s,r=a;function a(c){const d=t.reduce((h,m)=>m(h),e());return n=wY(d),i=n.cache.get,s=n.cache.set,r=o,o(c)}function o(c){const d=i(c);if(d)return d;const h=CY(c,n);return s(c,h),h}return function(){return r(MY.apply(null,arguments))}}const _t=e=>{const t=n=>n[e]||[];return t.isThemeGetter=!0,t},jk=/^\[(?:([a-z-]+):)?(.+)\]$/i,jY=/^\d+\/\d+$/,NY=new Set(["px","full","screen"]),kY=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,EY=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,AY=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,OY=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,DY=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,sr=e=>vc(e)||NY.has(e)||jY.test(e),Ur=e=>au(e,"length",HY),vc=e=>!!e&&!Number.isNaN(Number(e)),kv=e=>au(e,"number",vc),Ku=e=>!!e&&Number.isInteger(Number(e)),PY=e=>e.endsWith("%")&&vc(e.slice(0,-1)),Be=e=>jk.test(e),Zr=e=>kY.test(e),RY=new Set(["length","size","percentage"]),LY=e=>au(e,RY,Nk),zY=e=>au(e,"position",Nk),IY=new Set(["image","url"]),BY=e=>au(e,IY,UY),VY=e=>au(e,"",FY),Qu=()=>!0,au=(e,t,n)=>{const i=jk.exec(e);return i?i[1]?typeof t=="string"?i[1]===t:t.has(i[1]):n(i[2]):!1},HY=e=>EY.test(e)&&!AY.test(e),Nk=()=>!1,FY=e=>OY.test(e),UY=e=>DY.test(e),ZY=()=>{const e=_t("colors"),t=_t("spacing"),n=_t("blur"),i=_t("brightness"),s=_t("borderColor"),r=_t("borderRadius"),a=_t("borderSpacing"),o=_t("borderWidth"),c=_t("contrast"),d=_t("grayscale"),h=_t("hueRotate"),m=_t("invert"),g=_t("gap"),v=_t("gradientColorStops"),b=_t("gradientColorStopPositions"),w=_t("inset"),M=_t("margin"),y=_t("opacity"),S=_t("padding"),T=_t("saturate"),N=_t("scale"),k=_t("sepia"),E=_t("skew"),D=_t("space"),O=_t("translate"),I=()=>["auto","contain","none"],P=()=>["auto","hidden","clip","visible","scroll"],H=()=>["auto",Be,t],V=()=>[Be,t],J=()=>["",sr,Ur],Q=()=>["auto",vc,Be],U=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],R=()=>["solid","dashed","dotted","double","none"],$=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],B=()=>["start","end","center","between","around","evenly","stretch"],W=()=>["","0",Be],G=()=>["auto","avoid","all","avoid-page","page","left","right","column"],ie=()=>[vc,Be];return{cacheSize:500,separator:":",theme:{colors:[Qu],spacing:[sr,Ur],blur:["none","",Zr,Be],brightness:ie(),borderColor:[e],borderRadius:["none","","full",Zr,Be],borderSpacing:V(),borderWidth:J(),contrast:ie(),grayscale:W(),hueRotate:ie(),invert:W(),gap:V(),gradientColorStops:[e],gradientColorStopPositions:[PY,Ur],inset:H(),margin:H(),opacity:ie(),padding:V(),saturate:ie(),scale:ie(),sepia:W(),skew:ie(),space:V(),translate:V()},classGroups:{aspect:[{aspect:["auto","square","video",Be]}],container:["container"],columns:[{columns:[Zr]}],"break-after":[{"break-after":G()}],"break-before":[{"break-before":G()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...U(),Be]}],overflow:[{overflow:P()}],"overflow-x":[{"overflow-x":P()}],"overflow-y":[{"overflow-y":P()}],overscroll:[{overscroll:I()}],"overscroll-x":[{"overscroll-x":I()}],"overscroll-y":[{"overscroll-y":I()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[w]}],"inset-x":[{"inset-x":[w]}],"inset-y":[{"inset-y":[w]}],start:[{start:[w]}],end:[{end:[w]}],top:[{top:[w]}],right:[{right:[w]}],bottom:[{bottom:[w]}],left:[{left:[w]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",Ku,Be]}],basis:[{basis:H()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",Be]}],grow:[{grow:W()}],shrink:[{shrink:W()}],order:[{order:["first","last","none",Ku,Be]}],"grid-cols":[{"grid-cols":[Qu]}],"col-start-end":[{col:["auto",{span:["full",Ku,Be]},Be]}],"col-start":[{"col-start":Q()}],"col-end":[{"col-end":Q()}],"grid-rows":[{"grid-rows":[Qu]}],"row-start-end":[{row:["auto",{span:[Ku,Be]},Be]}],"row-start":[{"row-start":Q()}],"row-end":[{"row-end":Q()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",Be]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",Be]}],gap:[{gap:[g]}],"gap-x":[{"gap-x":[g]}],"gap-y":[{"gap-y":[g]}],"justify-content":[{justify:["normal",...B()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...B(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...B(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[S]}],px:[{px:[S]}],py:[{py:[S]}],ps:[{ps:[S]}],pe:[{pe:[S]}],pt:[{pt:[S]}],pr:[{pr:[S]}],pb:[{pb:[S]}],pl:[{pl:[S]}],m:[{m:[M]}],mx:[{mx:[M]}],my:[{my:[M]}],ms:[{ms:[M]}],me:[{me:[M]}],mt:[{mt:[M]}],mr:[{mr:[M]}],mb:[{mb:[M]}],ml:[{ml:[M]}],"space-x":[{"space-x":[D]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[D]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",Be,t]}],"min-w":[{"min-w":[Be,t,"min","max","fit"]}],"max-w":[{"max-w":[Be,t,"none","full","min","max","fit","prose",{screen:[Zr]},Zr]}],h:[{h:[Be,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[Be,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[Be,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[Be,t,"auto","min","max","fit"]}],"font-size":[{text:["base",Zr,Ur]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",kv]}],"font-family":[{font:[Qu]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",Be]}],"line-clamp":[{"line-clamp":["none",vc,kv]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",sr,Be]}],"list-image":[{"list-image":["none",Be]}],"list-style-type":[{list:["none","disc","decimal",Be]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[y]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[y]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...R(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",sr,Ur]}],"underline-offset":[{"underline-offset":["auto",sr,Be]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:V()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",Be]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",Be]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[y]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...U(),zY]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",LY]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},BY]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[b]}],"gradient-via-pos":[{via:[b]}],"gradient-to-pos":[{to:[b]}],"gradient-from":[{from:[v]}],"gradient-via":[{via:[v]}],"gradient-to":[{to:[v]}],rounded:[{rounded:[r]}],"rounded-s":[{"rounded-s":[r]}],"rounded-e":[{"rounded-e":[r]}],"rounded-t":[{"rounded-t":[r]}],"rounded-r":[{"rounded-r":[r]}],"rounded-b":[{"rounded-b":[r]}],"rounded-l":[{"rounded-l":[r]}],"rounded-ss":[{"rounded-ss":[r]}],"rounded-se":[{"rounded-se":[r]}],"rounded-ee":[{"rounded-ee":[r]}],"rounded-es":[{"rounded-es":[r]}],"rounded-tl":[{"rounded-tl":[r]}],"rounded-tr":[{"rounded-tr":[r]}],"rounded-br":[{"rounded-br":[r]}],"rounded-bl":[{"rounded-bl":[r]}],"border-w":[{border:[o]}],"border-w-x":[{"border-x":[o]}],"border-w-y":[{"border-y":[o]}],"border-w-s":[{"border-s":[o]}],"border-w-e":[{"border-e":[o]}],"border-w-t":[{"border-t":[o]}],"border-w-r":[{"border-r":[o]}],"border-w-b":[{"border-b":[o]}],"border-w-l":[{"border-l":[o]}],"border-opacity":[{"border-opacity":[y]}],"border-style":[{border:[...R(),"hidden"]}],"divide-x":[{"divide-x":[o]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[o]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[y]}],"divide-style":[{divide:R()}],"border-color":[{border:[s]}],"border-color-x":[{"border-x":[s]}],"border-color-y":[{"border-y":[s]}],"border-color-s":[{"border-s":[s]}],"border-color-e":[{"border-e":[s]}],"border-color-t":[{"border-t":[s]}],"border-color-r":[{"border-r":[s]}],"border-color-b":[{"border-b":[s]}],"border-color-l":[{"border-l":[s]}],"divide-color":[{divide:[s]}],"outline-style":[{outline:["",...R()]}],"outline-offset":[{"outline-offset":[sr,Be]}],"outline-w":[{outline:[sr,Ur]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:J()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[y]}],"ring-offset-w":[{"ring-offset":[sr,Ur]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",Zr,VY]}],"shadow-color":[{shadow:[Qu]}],opacity:[{opacity:[y]}],"mix-blend":[{"mix-blend":[...$(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":$()}],filter:[{filter:["","none"]}],blur:[{blur:[n]}],brightness:[{brightness:[i]}],contrast:[{contrast:[c]}],"drop-shadow":[{"drop-shadow":["","none",Zr,Be]}],grayscale:[{grayscale:[d]}],"hue-rotate":[{"hue-rotate":[h]}],invert:[{invert:[m]}],saturate:[{saturate:[T]}],sepia:[{sepia:[k]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[n]}],"backdrop-brightness":[{"backdrop-brightness":[i]}],"backdrop-contrast":[{"backdrop-contrast":[c]}],"backdrop-grayscale":[{"backdrop-grayscale":[d]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[h]}],"backdrop-invert":[{"backdrop-invert":[m]}],"backdrop-opacity":[{"backdrop-opacity":[y]}],"backdrop-saturate":[{"backdrop-saturate":[T]}],"backdrop-sepia":[{"backdrop-sepia":[k]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[a]}],"border-spacing-x":[{"border-spacing-x":[a]}],"border-spacing-y":[{"border-spacing-y":[a]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",Be]}],duration:[{duration:ie()}],ease:[{ease:["linear","in","out","in-out",Be]}],delay:[{delay:ie()}],animate:[{animate:["none","spin","ping","pulse","bounce",Be]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[N]}],"scale-x":[{"scale-x":[N]}],"scale-y":[{"scale-y":[N]}],rotate:[{rotate:[Ku,Be]}],"translate-x":[{"translate-x":[O]}],"translate-y":[{"translate-y":[O]}],"skew-x":[{"skew-x":[E]}],"skew-y":[{"skew-y":[E]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",Be]}],accent:[{accent:["auto",e]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",Be]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":V()}],"scroll-mx":[{"scroll-mx":V()}],"scroll-my":[{"scroll-my":V()}],"scroll-ms":[{"scroll-ms":V()}],"scroll-me":[{"scroll-me":V()}],"scroll-mt":[{"scroll-mt":V()}],"scroll-mr":[{"scroll-mr":V()}],"scroll-mb":[{"scroll-mb":V()}],"scroll-ml":[{"scroll-ml":V()}],"scroll-p":[{"scroll-p":V()}],"scroll-px":[{"scroll-px":V()}],"scroll-py":[{"scroll-py":V()}],"scroll-ps":[{"scroll-ps":V()}],"scroll-pe":[{"scroll-pe":V()}],"scroll-pt":[{"scroll-pt":V()}],"scroll-pr":[{"scroll-pr":V()}],"scroll-pb":[{"scroll-pb":V()}],"scroll-pl":[{"scroll-pl":V()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",Be]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[sr,Ur,kv]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}},$Y=TY(ZY);function ye(...e){return $Y(Sk(e))}const t2=Jb("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-xs font-medium transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",{variants:{variant:{default:"bg-primary text-primary-foreground shadow-xs hover:bg-primary/90",destructive:"bg-destructive text-white shadow-xs hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",outline:"border bg-background shadow-xs hover:bg-accent hover:text-accent-foreground dark:bg-input/30 dark:border-input dark:hover:bg-input/50",secondary:"bg-secondary text-secondary-foreground shadow-xs hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2 has-[>svg]:px-3",sm:"h-8 rounded-md gap-1.5 px-3 has-[>svg]:px-2.5",lg:"h-10 rounded-md px-6 has-[>svg]:px-4",icon:"size-9"}},defaultVariants:{variant:"default",size:"default"}});function ne({className:e,variant:t,size:n,asChild:i=!1,...s}){const r=i?cY:"button";return u.jsx(r,{"data-slot":"button",className:ye(t2({variant:t,size:n,className:e})),...s})}function pe(e,t,{checkForDefaultPrevented:n=!0}={}){return function(s){if(e==null||e(s),n===!1||!s.defaultPrevented)return t==null?void 0:t(s)}}function WY(e,t){const n=x.createContext(t),i=r=>{const{children:a,...o}=r,c=x.useMemo(()=>o,Object.values(o));return u.jsx(n.Provider,{value:c,children:a})};i.displayName=e+"Provider";function s(r){const a=x.useContext(n);if(a)return a;if(t!==void 0)return t;throw new Error(`\`${r}\` must be used within \`${e}\``)}return[i,s]}function vn(e,t=[]){let n=[];function i(r,a){const o=x.createContext(a),c=n.length;n=[...n,a];const d=m=>{var y;const{scope:g,children:v,...b}=m,w=((y=g==null?void 0:g[e])==null?void 0:y[c])||o,M=x.useMemo(()=>b,Object.values(b));return u.jsx(w.Provider,{value:M,children:v})};d.displayName=r+"Provider";function h(m,g){var w;const v=((w=g==null?void 0:g[e])==null?void 0:w[c])||o,b=x.useContext(v);if(b)return b;if(a!==void 0)return a;throw new Error(`\`${m}\` must be used within \`${r}\``)}return[d,h]}const s=()=>{const r=n.map(a=>x.createContext(a));return function(o){const c=(o==null?void 0:o[e])||r;return x.useMemo(()=>({[`__scope${e}`]:{...o,[e]:c}}),[o,c])}};return s.scopeName=e,[i,GY(s,...t)]}function GY(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const i=e.map(s=>({useScope:s(),scopeName:s.scopeName}));return function(r){const a=i.reduce((o,{useScope:c,scopeName:d})=>{const m=c(r)[`__scope${d}`];return{...o,...m}},{});return x.useMemo(()=>({[`__scope${t.scopeName}`]:a}),[a])}};return n.scopeName=t.scopeName,n}var Ls=globalThis!=null&&globalThis.document?x.useLayoutEffect:()=>{},YY=nM[" useId ".trim().toString()]||(()=>{}),qY=0;function ns(e){const[t,n]=x.useState(YY());return Ls(()=>{e||n(i=>i??String(qY++))},[e]),e||(t?`radix-${t}`:"")}var XY=nM[" useInsertionEffect ".trim().toString()]||Ls;function ti({prop:e,defaultProp:t,onChange:n=()=>{},caller:i}){const[s,r,a]=KY({defaultProp:t,onChange:n}),o=e!==void 0,c=o?e:s;{const h=x.useRef(e!==void 0);x.useEffect(()=>{const m=h.current;m!==o&&console.warn(`${i} is changing from ${m?"controlled":"uncontrolled"} to ${o?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),h.current=o},[o,i])}const d=x.useCallback(h=>{var m;if(o){const g=QY(h)?h(e):h;g!==e&&((m=a.current)==null||m.call(a,g))}else r(h)},[o,e,r,a]);return[c,d]}function KY({defaultProp:e,onChange:t}){const[n,i]=x.useState(e),s=x.useRef(n),r=x.useRef(t);return XY(()=>{r.current=t},[t]),x.useEffect(()=>{var a;s.current!==n&&((a=r.current)==null||a.call(r,n),s.current=n)},[n,s]),[n,i,r]}function QY(e){return typeof e=="function"}var JY=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Te=JY.reduce((e,t)=>{const n=Yo(`Primitive.${t}`),i=x.forwardRef((s,r)=>{const{asChild:a,...o}=s,c=a?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),u.jsx(c,{...o,ref:r})});return i.displayName=`Primitive.${t}`,{...e,[t]:i}},{});function kk(e,t){e&&Nf.flushSync(()=>e.dispatchEvent(t))}function Tn(e){const t=x.useRef(e);return x.useEffect(()=>{t.current=e}),x.useMemo(()=>(...n)=>{var i;return(i=t.current)==null?void 0:i.call(t,...n)},[])}function eq(e,t=globalThis==null?void 0:globalThis.document){const n=Tn(e);x.useEffect(()=>{const i=s=>{s.key==="Escape"&&n(s)};return t.addEventListener("keydown",i,{capture:!0}),()=>t.removeEventListener("keydown",i,{capture:!0})},[n,t])}var tq="DismissableLayer",by="dismissableLayer.update",nq="dismissableLayer.pointerDownOutside",iq="dismissableLayer.focusOutside",NC,Ek=x.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Zf=x.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:i,onPointerDownOutside:s,onFocusOutside:r,onInteractOutside:a,onDismiss:o,...c}=e,d=x.useContext(Ek),[h,m]=x.useState(null),g=(h==null?void 0:h.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,v]=x.useState({}),b=qe(t,D=>m(D)),w=Array.from(d.layers),[M]=[...d.layersWithOutsidePointerEventsDisabled].slice(-1),y=w.indexOf(M),S=h?w.indexOf(h):-1,T=d.layersWithOutsidePointerEventsDisabled.size>0,N=S>=y,k=aq(D=>{const O=D.target,I=[...d.branches].some(P=>P.contains(O));!N||I||(s==null||s(D),a==null||a(D),D.defaultPrevented||o==null||o())},g),E=oq(D=>{const O=D.target;[...d.branches].some(P=>P.contains(O))||(r==null||r(D),a==null||a(D),D.defaultPrevented||o==null||o())},g);return eq(D=>{S===d.layers.size-1&&(i==null||i(D),!D.defaultPrevented&&o&&(D.preventDefault(),o()))},g),x.useEffect(()=>{if(h)return n&&(d.layersWithOutsidePointerEventsDisabled.size===0&&(NC=g.body.style.pointerEvents,g.body.style.pointerEvents="none"),d.layersWithOutsidePointerEventsDisabled.add(h)),d.layers.add(h),kC(),()=>{n&&d.layersWithOutsidePointerEventsDisabled.size===1&&(g.body.style.pointerEvents=NC)}},[h,g,n,d]),x.useEffect(()=>()=>{h&&(d.layers.delete(h),d.layersWithOutsidePointerEventsDisabled.delete(h),kC())},[h,d]),x.useEffect(()=>{const D=()=>v({});return document.addEventListener(by,D),()=>document.removeEventListener(by,D)},[]),u.jsx(Te.div,{...c,ref:b,style:{pointerEvents:T?N?"auto":"none":void 0,...e.style},onFocusCapture:pe(e.onFocusCapture,E.onFocusCapture),onBlurCapture:pe(e.onBlurCapture,E.onBlurCapture),onPointerDownCapture:pe(e.onPointerDownCapture,k.onPointerDownCapture)})});Zf.displayName=tq;var sq="DismissableLayerBranch",rq=x.forwardRef((e,t)=>{const n=x.useContext(Ek),i=x.useRef(null),s=qe(t,i);return x.useEffect(()=>{const r=i.current;if(r)return n.branches.add(r),()=>{n.branches.delete(r)}},[n.branches]),u.jsx(Te.div,{...e,ref:s})});rq.displayName=sq;function aq(e,t=globalThis==null?void 0:globalThis.document){const n=Tn(e),i=x.useRef(!1),s=x.useRef(()=>{});return x.useEffect(()=>{const r=o=>{if(o.target&&!i.current){let c=function(){Ak(nq,n,d,{discrete:!0})};const d={originalEvent:o};o.pointerType==="touch"?(t.removeEventListener("click",s.current),s.current=c,t.addEventListener("click",s.current,{once:!0})):c()}else t.removeEventListener("click",s.current);i.current=!1},a=window.setTimeout(()=>{t.addEventListener("pointerdown",r)},0);return()=>{window.clearTimeout(a),t.removeEventListener("pointerdown",r),t.removeEventListener("click",s.current)}},[t,n]),{onPointerDownCapture:()=>i.current=!0}}function oq(e,t=globalThis==null?void 0:globalThis.document){const n=Tn(e),i=x.useRef(!1);return x.useEffect(()=>{const s=r=>{r.target&&!i.current&&Ak(iq,n,{originalEvent:r},{discrete:!1})};return t.addEventListener("focusin",s),()=>t.removeEventListener("focusin",s)},[t,n]),{onFocusCapture:()=>i.current=!0,onBlurCapture:()=>i.current=!1}}function kC(){const e=new CustomEvent(by);document.dispatchEvent(e)}function Ak(e,t,n,{discrete:i}){const s=n.originalEvent.target,r=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&s.addEventListener(e,t,{once:!0}),i?kk(s,r):s.dispatchEvent(r)}var Ev="focusScope.autoFocusOnMount",Av="focusScope.autoFocusOnUnmount",EC={bubbles:!1,cancelable:!0},lq="FocusScope",i0=x.forwardRef((e,t)=>{const{loop:n=!1,trapped:i=!1,onMountAutoFocus:s,onUnmountAutoFocus:r,...a}=e,[o,c]=x.useState(null),d=Tn(s),h=Tn(r),m=x.useRef(null),g=qe(t,w=>c(w)),v=x.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;x.useEffect(()=>{if(i){let w=function(T){if(v.paused||!o)return;const N=T.target;o.contains(N)?m.current=N:Xr(m.current,{select:!0})},M=function(T){if(v.paused||!o)return;const N=T.relatedTarget;N!==null&&(o.contains(N)||Xr(m.current,{select:!0}))},y=function(T){if(document.activeElement===document.body)for(const k of T)k.removedNodes.length>0&&Xr(o)};document.addEventListener("focusin",w),document.addEventListener("focusout",M);const S=new MutationObserver(y);return o&&S.observe(o,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",w),document.removeEventListener("focusout",M),S.disconnect()}}},[i,o,v.paused]),x.useEffect(()=>{if(o){OC.add(v);const w=document.activeElement;if(!o.contains(w)){const y=new CustomEvent(Ev,EC);o.addEventListener(Ev,d),o.dispatchEvent(y),y.defaultPrevented||(cq(mq(Ok(o)),{select:!0}),document.activeElement===w&&Xr(o))}return()=>{o.removeEventListener(Ev,d),setTimeout(()=>{const y=new CustomEvent(Av,EC);o.addEventListener(Av,h),o.dispatchEvent(y),y.defaultPrevented||Xr(w??document.body,{select:!0}),o.removeEventListener(Av,h),OC.remove(v)},0)}}},[o,d,h,v]);const b=x.useCallback(w=>{if(!n&&!i||v.paused)return;const M=w.key==="Tab"&&!w.altKey&&!w.ctrlKey&&!w.metaKey,y=document.activeElement;if(M&&y){const S=w.currentTarget,[T,N]=uq(S);T&&N?!w.shiftKey&&y===N?(w.preventDefault(),n&&Xr(T,{select:!0})):w.shiftKey&&y===T&&(w.preventDefault(),n&&Xr(N,{select:!0})):y===S&&w.preventDefault()}},[n,i,v.paused]);return u.jsx(Te.div,{tabIndex:-1,...a,ref:g,onKeyDown:b})});i0.displayName=lq;function cq(e,{select:t=!1}={}){const n=document.activeElement;for(const i of e)if(Xr(i,{select:t}),document.activeElement!==n)return}function uq(e){const t=Ok(e),n=AC(t,e),i=AC(t.reverse(),e);return[n,i]}function Ok(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:i=>{const s=i.tagName==="INPUT"&&i.type==="hidden";return i.disabled||i.hidden||s?NodeFilter.FILTER_SKIP:i.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function AC(e,t){for(const n of e)if(!dq(n,{upTo:t}))return n}function dq(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function fq(e){return e instanceof HTMLInputElement&&"select"in e}function Xr(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&fq(e)&&t&&e.select()}}var OC=hq();function hq(){let e=[];return{add(t){const n=e[0];t!==n&&(n==null||n.pause()),e=DC(e,t),e.unshift(t)},remove(t){var n;e=DC(e,t),(n=e[0])==null||n.resume()}}}function DC(e,t){const n=[...e],i=n.indexOf(t);return i!==-1&&n.splice(i,1),n}function mq(e){return e.filter(t=>t.tagName!=="A")}var gq="Portal",$f=x.forwardRef((e,t)=>{var o;const{container:n,...i}=e,[s,r]=x.useState(!1);Ls(()=>r(!0),[]);const a=n||s&&((o=globalThis==null?void 0:globalThis.document)==null?void 0:o.body);return a?JR.createPortal(u.jsx(Te.div,{...i,ref:t}),a):null});$f.displayName=gq;function pq(e,t){return x.useReducer((n,i)=>t[n][i]??n,e)}var nn=e=>{const{present:t,children:n}=e,i=vq(t),s=typeof n=="function"?n({present:i.isPresent}):x.Children.only(n),r=qe(i.ref,xq(s));return typeof n=="function"||i.isPresent?x.cloneElement(s,{ref:r}):null};nn.displayName="Presence";function vq(e){const[t,n]=x.useState(),i=x.useRef(null),s=x.useRef(e),r=x.useRef("none"),a=e?"mounted":"unmounted",[o,c]=pq(a,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return x.useEffect(()=>{const d=sm(i.current);r.current=o==="mounted"?d:"none"},[o]),Ls(()=>{const d=i.current,h=s.current;if(h!==e){const g=r.current,v=sm(d);e?c("MOUNT"):v==="none"||(d==null?void 0:d.display)==="none"?c("UNMOUNT"):c(h&&g!==v?"ANIMATION_OUT":"UNMOUNT"),s.current=e}},[e,c]),Ls(()=>{if(t){let d;const h=t.ownerDocument.defaultView??window,m=v=>{const w=sm(i.current).includes(v.animationName);if(v.target===t&&w&&(c("ANIMATION_END"),!s.current)){const M=t.style.animationFillMode;t.style.animationFillMode="forwards",d=h.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=M)})}},g=v=>{v.target===t&&(r.current=sm(i.current))};return t.addEventListener("animationstart",g),t.addEventListener("animationcancel",m),t.addEventListener("animationend",m),()=>{h.clearTimeout(d),t.removeEventListener("animationstart",g),t.removeEventListener("animationcancel",m),t.removeEventListener("animationend",m)}}else c("ANIMATION_END")},[t,c]),{isPresent:["mounted","unmountSuspended"].includes(o),ref:x.useCallback(d=>{i.current=d?getComputedStyle(d):null,n(d)},[])}}function sm(e){return(e==null?void 0:e.animationName)||"none"}function xq(e){var i,s;let t=(i=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:i.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(s=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:s.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var Ov=0;function n2(){x.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??PC()),document.body.insertAdjacentElement("beforeend",e[1]??PC()),Ov++,()=>{Ov===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),Ov--}},[])}function PC(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var bs=function(){return bs=Object.assign||function(t){for(var n,i=1,s=arguments.length;i<s;i++){n=arguments[i];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},bs.apply(this,arguments)};function Dk(e,t){var n={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(n[i]=e[i]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var s=0,i=Object.getOwnPropertySymbols(e);s<i.length;s++)t.indexOf(i[s])<0&&Object.prototype.propertyIsEnumerable.call(e,i[s])&&(n[i[s]]=e[i[s]]);return n}function yq(e,t,n){if(n||arguments.length===2)for(var i=0,s=t.length,r;i<s;i++)(r||!(i in t))&&(r||(r=Array.prototype.slice.call(t,0,i)),r[i]=t[i]);return e.concat(r||Array.prototype.slice.call(t))}var Hm="right-scroll-bar-position",Fm="width-before-scroll-bar",_q="with-scroll-bars-hidden",bq="--removed-body-scroll-bar-size";function Dv(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function wq(e,t){var n=x.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(i){var s=n.value;s!==i&&(n.value=i,n.callback(i,s))}}}})[0];return n.callback=t,n.facade}var Sq=typeof window<"u"?x.useLayoutEffect:x.useEffect,RC=new WeakMap;function Cq(e,t){var n=wq(null,function(i){return e.forEach(function(s){return Dv(s,i)})});return Sq(function(){var i=RC.get(n);if(i){var s=new Set(i),r=new Set(e),a=n.current;s.forEach(function(o){r.has(o)||Dv(o,null)}),r.forEach(function(o){s.has(o)||Dv(o,a)})}RC.set(n,e)},[e]),n}function Mq(e){return e}function Tq(e,t){t===void 0&&(t=Mq);var n=[],i=!1,s={read:function(){if(i)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(r){var a=t(r,i);return n.push(a),function(){n=n.filter(function(o){return o!==a})}},assignSyncMedium:function(r){for(i=!0;n.length;){var a=n;n=[],a.forEach(r)}n={push:function(o){return r(o)},filter:function(){return n}}},assignMedium:function(r){i=!0;var a=[];if(n.length){var o=n;n=[],o.forEach(r),a=n}var c=function(){var h=a;a=[],h.forEach(r)},d=function(){return Promise.resolve().then(c)};d(),n={push:function(h){a.push(h),d()},filter:function(h){return a=a.filter(h),n}}}};return s}function jq(e){e===void 0&&(e={});var t=Tq(null);return t.options=bs({async:!0,ssr:!1},e),t}var Pk=function(e){var t=e.sideCar,n=Dk(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var i=t.read();if(!i)throw new Error("Sidecar medium not found");return x.createElement(i,bs({},n))};Pk.isSideCarExport=!0;function Nq(e,t){return e.useMedium(t),Pk}var Rk=jq(),Pv=function(){},s0=x.forwardRef(function(e,t){var n=x.useRef(null),i=x.useState({onScrollCapture:Pv,onWheelCapture:Pv,onTouchMoveCapture:Pv}),s=i[0],r=i[1],a=e.forwardProps,o=e.children,c=e.className,d=e.removeScrollBar,h=e.enabled,m=e.shards,g=e.sideCar,v=e.noRelative,b=e.noIsolation,w=e.inert,M=e.allowPinchZoom,y=e.as,S=y===void 0?"div":y,T=e.gapMode,N=Dk(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),k=g,E=Cq([n,t]),D=bs(bs({},N),s);return x.createElement(x.Fragment,null,h&&x.createElement(k,{sideCar:Rk,removeScrollBar:d,shards:m,noRelative:v,noIsolation:b,inert:w,setCallbacks:r,allowPinchZoom:!!M,lockRef:n,gapMode:T}),a?x.cloneElement(x.Children.only(o),bs(bs({},D),{ref:E})):x.createElement(S,bs({},D,{className:c,ref:E}),o))});s0.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};s0.classNames={fullWidth:Fm,zeroRight:Hm};var kq=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function Eq(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=kq();return t&&e.setAttribute("nonce",t),e}function Aq(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function Oq(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var Dq=function(){var e=0,t=null;return{add:function(n){e==0&&(t=Eq())&&(Aq(t,n),Oq(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},Pq=function(){var e=Dq();return function(t,n){x.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},Lk=function(){var e=Pq(),t=function(n){var i=n.styles,s=n.dynamic;return e(i,s),null};return t},Rq={left:0,top:0,right:0,gap:0},Rv=function(e){return parseInt(e||"",10)||0},Lq=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],i=t[e==="padding"?"paddingTop":"marginTop"],s=t[e==="padding"?"paddingRight":"marginRight"];return[Rv(n),Rv(i),Rv(s)]},zq=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return Rq;var t=Lq(e),n=document.documentElement.clientWidth,i=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,i-n+t[2]-t[0])}},Iq=Lk(),xc="data-scroll-locked",Bq=function(e,t,n,i){var s=e.left,r=e.top,a=e.right,o=e.gap;return n===void 0&&(n="margin"),`
  .`.concat(_q,` {
   overflow: hidden `).concat(i,`;
   padding-right: `).concat(o,"px ").concat(i,`;
  }
  body[`).concat(xc,`] {
    overflow: hidden `).concat(i,`;
    overscroll-behavior: contain;
    `).concat([t&&"position: relative ".concat(i,";"),n==="margin"&&`
    padding-left: `.concat(s,`px;
    padding-top: `).concat(r,`px;
    padding-right: `).concat(a,`px;
    margin-left:0;
    margin-top:0;
    margin-right: `).concat(o,"px ").concat(i,`;
    `),n==="padding"&&"padding-right: ".concat(o,"px ").concat(i,";")].filter(Boolean).join(""),`
  }
  
  .`).concat(Hm,` {
    right: `).concat(o,"px ").concat(i,`;
  }
  
  .`).concat(Fm,` {
    margin-right: `).concat(o,"px ").concat(i,`;
  }
  
  .`).concat(Hm," .").concat(Hm,` {
    right: 0 `).concat(i,`;
  }
  
  .`).concat(Fm," .").concat(Fm,` {
    margin-right: 0 `).concat(i,`;
  }
  
  body[`).concat(xc,`] {
    `).concat(bq,": ").concat(o,`px;
  }
`)},LC=function(){var e=parseInt(document.body.getAttribute(xc)||"0",10);return isFinite(e)?e:0},Vq=function(){x.useEffect(function(){return document.body.setAttribute(xc,(LC()+1).toString()),function(){var e=LC()-1;e<=0?document.body.removeAttribute(xc):document.body.setAttribute(xc,e.toString())}},[])},Hq=function(e){var t=e.noRelative,n=e.noImportant,i=e.gapMode,s=i===void 0?"margin":i;Vq();var r=x.useMemo(function(){return zq(s)},[s]);return x.createElement(Iq,{styles:Bq(r,!t,s,n?"":"!important")})},wy=!1;if(typeof window<"u")try{var rm=Object.defineProperty({},"passive",{get:function(){return wy=!0,!0}});window.addEventListener("test",rm,rm),window.removeEventListener("test",rm,rm)}catch{wy=!1}var El=wy?{passive:!1}:!1,Fq=function(e){return e.tagName==="TEXTAREA"},zk=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!Fq(e)&&n[t]==="visible")},Uq=function(e){return zk(e,"overflowY")},Zq=function(e){return zk(e,"overflowX")},zC=function(e,t){var n=t.ownerDocument,i=t;do{typeof ShadowRoot<"u"&&i instanceof ShadowRoot&&(i=i.host);var s=Ik(e,i);if(s){var r=Bk(e,i),a=r[1],o=r[2];if(a>o)return!0}i=i.parentNode}while(i&&i!==n.body);return!1},$q=function(e){var t=e.scrollTop,n=e.scrollHeight,i=e.clientHeight;return[t,n,i]},Wq=function(e){var t=e.scrollLeft,n=e.scrollWidth,i=e.clientWidth;return[t,n,i]},Ik=function(e,t){return e==="v"?Uq(t):Zq(t)},Bk=function(e,t){return e==="v"?$q(t):Wq(t)},Gq=function(e,t){return e==="h"&&t==="rtl"?-1:1},Yq=function(e,t,n,i,s){var r=Gq(e,window.getComputedStyle(t).direction),a=r*i,o=n.target,c=t.contains(o),d=!1,h=a>0,m=0,g=0;do{var v=Bk(e,o),b=v[0],w=v[1],M=v[2],y=w-M-r*b;(b||y)&&Ik(e,o)&&(m+=y,g+=b),o=o.parentNode.host||o.parentNode}while(!c&&o!==document.body||c&&(t.contains(o)||t===o));return(h&&(Math.abs(m)<1||!s)||!h&&(Math.abs(g)<1||!s))&&(d=!0),d},am=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},IC=function(e){return[e.deltaX,e.deltaY]},BC=function(e){return e&&"current"in e?e.current:e},qq=function(e,t){return e[0]===t[0]&&e[1]===t[1]},Xq=function(e){return`
  .block-interactivity-`.concat(e,` {pointer-events: none;}
  .allow-interactivity-`).concat(e,` {pointer-events: all;}
`)},Kq=0,Al=[];function Qq(e){var t=x.useRef([]),n=x.useRef([0,0]),i=x.useRef(),s=x.useState(Kq++)[0],r=x.useState(Lk)[0],a=x.useRef(e);x.useEffect(function(){a.current=e},[e]),x.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(s));var w=yq([e.lockRef.current],(e.shards||[]).map(BC),!0).filter(Boolean);return w.forEach(function(M){return M.classList.add("allow-interactivity-".concat(s))}),function(){document.body.classList.remove("block-interactivity-".concat(s)),w.forEach(function(M){return M.classList.remove("allow-interactivity-".concat(s))})}}},[e.inert,e.lockRef.current,e.shards]);var o=x.useCallback(function(w,M){if("touches"in w&&w.touches.length===2||w.type==="wheel"&&w.ctrlKey)return!a.current.allowPinchZoom;var y=am(w),S=n.current,T="deltaX"in w?w.deltaX:S[0]-y[0],N="deltaY"in w?w.deltaY:S[1]-y[1],k,E=w.target,D=Math.abs(T)>Math.abs(N)?"h":"v";if("touches"in w&&D==="h"&&E.type==="range")return!1;var O=zC(D,E);if(!O)return!0;if(O?k=D:(k=D==="v"?"h":"v",O=zC(D,E)),!O)return!1;if(!i.current&&"changedTouches"in w&&(T||N)&&(i.current=k),!k)return!0;var I=i.current||k;return Yq(I,M,w,I==="h"?T:N,!0)},[]),c=x.useCallback(function(w){var M=w;if(!(!Al.length||Al[Al.length-1]!==r)){var y="deltaY"in M?IC(M):am(M),S=t.current.filter(function(k){return k.name===M.type&&(k.target===M.target||M.target===k.shadowParent)&&qq(k.delta,y)})[0];if(S&&S.should){M.cancelable&&M.preventDefault();return}if(!S){var T=(a.current.shards||[]).map(BC).filter(Boolean).filter(function(k){return k.contains(M.target)}),N=T.length>0?o(M,T[0]):!a.current.noIsolation;N&&M.cancelable&&M.preventDefault()}}},[]),d=x.useCallback(function(w,M,y,S){var T={name:w,delta:M,target:y,should:S,shadowParent:Jq(y)};t.current.push(T),setTimeout(function(){t.current=t.current.filter(function(N){return N!==T})},1)},[]),h=x.useCallback(function(w){n.current=am(w),i.current=void 0},[]),m=x.useCallback(function(w){d(w.type,IC(w),w.target,o(w,e.lockRef.current))},[]),g=x.useCallback(function(w){d(w.type,am(w),w.target,o(w,e.lockRef.current))},[]);x.useEffect(function(){return Al.push(r),e.setCallbacks({onScrollCapture:m,onWheelCapture:m,onTouchMoveCapture:g}),document.addEventListener("wheel",c,El),document.addEventListener("touchmove",c,El),document.addEventListener("touchstart",h,El),function(){Al=Al.filter(function(w){return w!==r}),document.removeEventListener("wheel",c,El),document.removeEventListener("touchmove",c,El),document.removeEventListener("touchstart",h,El)}},[]);var v=e.removeScrollBar,b=e.inert;return x.createElement(x.Fragment,null,b?x.createElement(r,{styles:Xq(s)}):null,v?x.createElement(Hq,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function Jq(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const eX=Nq(Rk,Qq);var r0=x.forwardRef(function(e,t){return x.createElement(s0,bs({},e,{ref:t,sideCar:eX}))});r0.classNames=s0.classNames;var tX=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},Ol=new WeakMap,om=new WeakMap,lm={},Lv=0,Vk=function(e){return e&&(e.host||Vk(e.parentNode))},nX=function(e,t){return t.map(function(n){if(e.contains(n))return n;var i=Vk(n);return i&&e.contains(i)?i:(console.error("aria-hidden",n,"in not contained inside",e,". Doing nothing"),null)}).filter(function(n){return!!n})},iX=function(e,t,n,i){var s=nX(t,Array.isArray(e)?e:[e]);lm[n]||(lm[n]=new WeakMap);var r=lm[n],a=[],o=new Set,c=new Set(s),d=function(m){!m||o.has(m)||(o.add(m),d(m.parentNode))};s.forEach(d);var h=function(m){!m||c.has(m)||Array.prototype.forEach.call(m.children,function(g){if(o.has(g))h(g);else try{var v=g.getAttribute(i),b=v!==null&&v!=="false",w=(Ol.get(g)||0)+1,M=(r.get(g)||0)+1;Ol.set(g,w),r.set(g,M),a.push(g),w===1&&b&&om.set(g,!0),M===1&&g.setAttribute(n,"true"),b||g.setAttribute(i,"true")}catch(y){console.error("aria-hidden: cannot operate on ",g,y)}})};return h(t),o.clear(),Lv++,function(){a.forEach(function(m){var g=Ol.get(m)-1,v=r.get(m)-1;Ol.set(m,g),r.set(m,v),g||(om.has(m)||m.removeAttribute(i),om.delete(m)),v||m.removeAttribute(n)}),Lv--,Lv||(Ol=new WeakMap,Ol=new WeakMap,om=new WeakMap,lm={})}},i2=function(e,t,n){n===void 0&&(n="data-aria-hidden");var i=Array.from(Array.isArray(e)?e:[e]),s=tX(e);return s?(i.push.apply(i,Array.from(s.querySelectorAll("[aria-live], script"))),iX(i,s,n,"aria-hidden")):function(){return null}},a0="Dialog",[Hk,Fk]=vn(a0),[sX,us]=Hk(a0),Uk=e=>{const{__scopeDialog:t,children:n,open:i,defaultOpen:s,onOpenChange:r,modal:a=!0}=e,o=x.useRef(null),c=x.useRef(null),[d,h]=ti({prop:i,defaultProp:s??!1,onChange:r,caller:a0});return u.jsx(sX,{scope:t,triggerRef:o,contentRef:c,contentId:ns(),titleId:ns(),descriptionId:ns(),open:d,onOpenChange:h,onOpenToggle:x.useCallback(()=>h(m=>!m),[h]),modal:a,children:n})};Uk.displayName=a0;var Zk="DialogTrigger",$k=x.forwardRef((e,t)=>{const{__scopeDialog:n,...i}=e,s=us(Zk,n),r=qe(t,s.triggerRef);return u.jsx(Te.button,{type:"button","aria-haspopup":"dialog","aria-expanded":s.open,"aria-controls":s.contentId,"data-state":a2(s.open),...i,ref:r,onClick:pe(e.onClick,s.onOpenToggle)})});$k.displayName=Zk;var s2="DialogPortal",[rX,Wk]=Hk(s2,{forceMount:void 0}),Gk=e=>{const{__scopeDialog:t,forceMount:n,children:i,container:s}=e,r=us(s2,t);return u.jsx(rX,{scope:t,forceMount:n,children:x.Children.map(i,a=>u.jsx(nn,{present:n||r.open,children:u.jsx($f,{asChild:!0,container:s,children:a})}))})};Gk.displayName=s2;var Yg="DialogOverlay",Yk=x.forwardRef((e,t)=>{const n=Wk(Yg,e.__scopeDialog),{forceMount:i=n.forceMount,...s}=e,r=us(Yg,e.__scopeDialog);return r.modal?u.jsx(nn,{present:i||r.open,children:u.jsx(oX,{...s,ref:t})}):null});Yk.displayName=Yg;var aX=Yo("DialogOverlay.RemoveScroll"),oX=x.forwardRef((e,t)=>{const{__scopeDialog:n,...i}=e,s=us(Yg,n);return u.jsx(r0,{as:aX,allowPinchZoom:!0,shards:[s.contentRef],children:u.jsx(Te.div,{"data-state":a2(s.open),...i,ref:t,style:{pointerEvents:"auto",...i.style}})})}),qo="DialogContent",qk=x.forwardRef((e,t)=>{const n=Wk(qo,e.__scopeDialog),{forceMount:i=n.forceMount,...s}=e,r=us(qo,e.__scopeDialog);return u.jsx(nn,{present:i||r.open,children:r.modal?u.jsx(lX,{...s,ref:t}):u.jsx(cX,{...s,ref:t})})});qk.displayName=qo;var lX=x.forwardRef((e,t)=>{const n=us(qo,e.__scopeDialog),i=x.useRef(null),s=qe(t,n.contentRef,i);return x.useEffect(()=>{const r=i.current;if(r)return i2(r)},[]),u.jsx(Xk,{...e,ref:s,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:pe(e.onCloseAutoFocus,r=>{var a;r.preventDefault(),(a=n.triggerRef.current)==null||a.focus()}),onPointerDownOutside:pe(e.onPointerDownOutside,r=>{const a=r.detail.originalEvent,o=a.button===0&&a.ctrlKey===!0;(a.button===2||o)&&r.preventDefault()}),onFocusOutside:pe(e.onFocusOutside,r=>r.preventDefault())})}),cX=x.forwardRef((e,t)=>{const n=us(qo,e.__scopeDialog),i=x.useRef(!1),s=x.useRef(!1);return u.jsx(Xk,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:r=>{var a,o;(a=e.onCloseAutoFocus)==null||a.call(e,r),r.defaultPrevented||(i.current||(o=n.triggerRef.current)==null||o.focus(),r.preventDefault()),i.current=!1,s.current=!1},onInteractOutside:r=>{var c,d;(c=e.onInteractOutside)==null||c.call(e,r),r.defaultPrevented||(i.current=!0,r.detail.originalEvent.type==="pointerdown"&&(s.current=!0));const a=r.target;((d=n.triggerRef.current)==null?void 0:d.contains(a))&&r.preventDefault(),r.detail.originalEvent.type==="focusin"&&s.current&&r.preventDefault()}})}),Xk=x.forwardRef((e,t)=>{const{__scopeDialog:n,trapFocus:i,onOpenAutoFocus:s,onCloseAutoFocus:r,...a}=e,o=us(qo,n),c=x.useRef(null),d=qe(t,c);return n2(),u.jsxs(u.Fragment,{children:[u.jsx(i0,{asChild:!0,loop:!0,trapped:i,onMountAutoFocus:s,onUnmountAutoFocus:r,children:u.jsx(Zf,{role:"dialog",id:o.contentId,"aria-describedby":o.descriptionId,"aria-labelledby":o.titleId,"data-state":a2(o.open),...a,ref:d,onDismiss:()=>o.onOpenChange(!1)})}),u.jsxs(u.Fragment,{children:[u.jsx(dX,{titleId:o.titleId}),u.jsx(hX,{contentRef:c,descriptionId:o.descriptionId})]})]})}),r2="DialogTitle",Kk=x.forwardRef((e,t)=>{const{__scopeDialog:n,...i}=e,s=us(r2,n);return u.jsx(Te.h2,{id:s.titleId,...i,ref:t})});Kk.displayName=r2;var Qk="DialogDescription",Jk=x.forwardRef((e,t)=>{const{__scopeDialog:n,...i}=e,s=us(Qk,n);return u.jsx(Te.p,{id:s.descriptionId,...i,ref:t})});Jk.displayName=Qk;var eE="DialogClose",tE=x.forwardRef((e,t)=>{const{__scopeDialog:n,...i}=e,s=us(eE,n);return u.jsx(Te.button,{type:"button",...i,ref:t,onClick:pe(e.onClick,()=>s.onOpenChange(!1))})});tE.displayName=eE;function a2(e){return e?"open":"closed"}var nE="DialogTitleWarning",[uX,iE]=WY(nE,{contentName:qo,titleName:r2,docsSlug:"dialog"}),dX=({titleId:e})=>{const t=iE(nE),n=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.

If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.

For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return x.useEffect(()=>{e&&(document.getElementById(e)||console.error(n))},[n,e]),null},fX="DialogDescriptionWarning",hX=({contentRef:e,descriptionId:t})=>{const i=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${iE(fX).contentName}}.`;return x.useEffect(()=>{var r;const s=(r=e.current)==null?void 0:r.getAttribute("aria-describedby");t&&s&&(document.getElementById(t)||console.warn(i))},[i,e,t]),null},sE=Uk,rE=$k,aE=Gk,oE=Yk,lE=qk,cE=Kk,uE=Jk,o0=tE;/**
 * @license lucide-react v0.511.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const mX=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),gX=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,n,i)=>i?i.toUpperCase():n.toLowerCase()),VC=e=>{const t=gX(e);return t.charAt(0).toUpperCase()+t.slice(1)},dE=(...e)=>e.filter((t,n,i)=>!!t&&t.trim()!==""&&i.indexOf(t)===n).join(" ").trim(),pX=e=>{for(const t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0};/**
 * @license lucide-react v0.511.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */var vX={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/**
 * @license lucide-react v0.511.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const xX=x.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:i,className:s="",children:r,iconNode:a,...o},c)=>x.createElement("svg",{ref:c,...vX,width:t,height:t,stroke:e,strokeWidth:i?Number(n)*24/Number(t):n,className:dE("lucide",s),...!r&&!pX(o)&&{"aria-hidden":"true"},...o},[...a.map(([d,h])=>x.createElement(d,h)),...Array.isArray(r)?r:[r]]));/**
 * @license lucide-react v0.511.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const ou=(e,t)=>{const n=x.forwardRef(({className:i,...s},r)=>x.createElement(xX,{ref:r,iconNode:t,className:dE(`lucide-${mX(VC(e))}`,`lucide-${e}`,i),...s}));return n.displayName=VC(e),n};/**
 * @license lucide-react v0.511.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const yX=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],fE=ou("check",yX);/**
 * @license lucide-react v0.511.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const _X=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],bX=ou("chevron-down",_X);/**
 * @license lucide-react v0.511.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const wX=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],SX=ou("chevron-right",wX);/**
 * @license lucide-react v0.511.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const CX=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]],o2=ou("circle-alert",CX);/**
 * @license lucide-react v0.511.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const MX=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],TX=ou("circle",MX);/**
 * @license lucide-react v0.511.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const jX=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],hE=ou("x",jX);function Mr({...e}){return u.jsx(sE,{"data-slot":"dialog",...e})}function Sy({...e}){return u.jsx(rE,{"data-slot":"dialog-trigger",...e})}function NX({...e}){return u.jsx(aE,{"data-slot":"dialog-portal",...e})}function mE({...e}){return u.jsx(o0,{"data-slot":"dialog-close",...e})}function kX({className:e,...t}){return u.jsx(oE,{"data-slot":"dialog-overlay",className:ye("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50",e),...t})}function Tr({className:e,children:t,...n}){return u.jsxs(NX,{"data-slot":"dialog-portal",children:[u.jsx(kX,{}),u.jsxs(lE,{"data-slot":"dialog-content",className:ye("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",e),...n,children:[t,u.jsxs(o0,{className:"ring-offset-background focus:ring-ring data-[state=open]:bg-accent data-[state=open]:text-muted-foreground absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",children:[u.jsx(hE,{}),u.jsx("span",{className:"sr-only",children:"Close"})]})]})]})}function jr({className:e,...t}){return u.jsx("div",{"data-slot":"dialog-header",className:ye("flex flex-col gap-2 text-center sm:text-left",e),...t})}function Na({className:e,...t}){return u.jsx("div",{"data-slot":"dialog-footer",className:ye("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end",e),...t})}function Nr({className:e,...t}){return u.jsx(cE,{"data-slot":"dialog-title",className:ye("text-lg leading-none font-semibold",e),...t})}function ka({className:e,...t}){return u.jsx(uE,{"data-slot":"dialog-description",className:ye("text-muted-foreground text-sm",e),...t})}function wt({className:e,type:t,...n}){return u.jsx("input",{type:t,"data-slot":"input",className:ye("file:text-foreground placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground dark:bg-input/30 border-input flex h-9 w-full min-w-0 rounded-md border bg-transparent px-3 py-1 text-base shadow-xs transition-[color,box-shadow] outline-none file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm","focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]","aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",e),...n})}function St({className:e,...t}){return u.jsx("div",{"data-slot":"card",className:ye("bg-card text-card-foreground flex flex-col gap-6 rounded-xl border py-6 shadow-sm",e),...t})}function Qn({className:e,...t}){return u.jsx("div",{"data-slot":"card-header",className:ye("@container/card-header grid auto-rows-min grid-rows-[auto_auto] items-start gap-1.5 px-6 has-data-[slot=card-action]:grid-cols-[1fr_auto] [.border-b]:pb-6",e),...t})}function Jn({className:e,...t}){return u.jsx("div",{"data-slot":"card-title",className:ye("leading-none font-semibold",e),...t})}function zv({className:e,...t}){return u.jsx("div",{"data-slot":"card-description",className:ye("text-muted-foreground text-sm",e),...t})}function pn({className:e,...t}){return u.jsx("div",{"data-slot":"card-content",className:ye("px-6",e),...t})}function gE({className:e,...t}){return u.jsx("div",{"data-slot":"card-footer",className:ye("flex items-center px-6 [.border-t]:pt-6",e),...t})}function pE({className:e,...t}){return u.jsx("div",{"data-slot":"table-container",className:"relative w-full overflow-x-auto",children:u.jsx("table",{"data-slot":"table",className:ye("w-full caption-bottom text-sm",e),...t})})}function vE({className:e,...t}){return u.jsx("thead",{"data-slot":"table-header",className:ye("[&_tr]:border-b",e),...t})}function xE({className:e,...t}){return u.jsx("tbody",{"data-slot":"table-body",className:ye("[&_tr:last-child]:border-0",e),...t})}function yc({className:e,...t}){return u.jsx("tr",{"data-slot":"table-row",className:ye("hover:bg-muted/50 data-[state=selected]:bg-muted border-b transition-colors",e),...t})}function ws({className:e,...t}){return u.jsx("th",{"data-slot":"table-head",className:ye("text-foreground h-10 px-2 text-left align-middle font-medium whitespace-nowrap [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",e),...t})}function Ni({className:e,...t}){return u.jsx("td",{"data-slot":"table-cell",className:ye("p-2 align-middle whitespace-nowrap [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",e),...t})}var EX=x.createContext(void 0);function lu(e){const t=x.useContext(EX);return e||t||"ltr"}function AX(e,[t,n]){return Math.min(n,Math.max(t,e))}function OX(e,t){return x.useReducer((n,i)=>t[n][i]??n,e)}var l2="ScrollArea",[yE,hae]=vn(l2),[DX,Vi]=yE(l2),_E=x.forwardRef((e,t)=>{const{__scopeScrollArea:n,type:i="hover",dir:s,scrollHideDelay:r=600,...a}=e,[o,c]=x.useState(null),[d,h]=x.useState(null),[m,g]=x.useState(null),[v,b]=x.useState(null),[w,M]=x.useState(null),[y,S]=x.useState(0),[T,N]=x.useState(0),[k,E]=x.useState(!1),[D,O]=x.useState(!1),I=qe(t,H=>c(H)),P=lu(s);return u.jsx(DX,{scope:n,type:i,dir:P,scrollHideDelay:r,scrollArea:o,viewport:d,onViewportChange:h,content:m,onContentChange:g,scrollbarX:v,onScrollbarXChange:b,scrollbarXEnabled:k,onScrollbarXEnabledChange:E,scrollbarY:w,onScrollbarYChange:M,scrollbarYEnabled:D,onScrollbarYEnabledChange:O,onCornerWidthChange:S,onCornerHeightChange:N,children:u.jsx(Te.div,{dir:P,...a,ref:I,style:{position:"relative","--radix-scroll-area-corner-width":y+"px","--radix-scroll-area-corner-height":T+"px",...e.style}})})});_E.displayName=l2;var bE="ScrollAreaViewport",wE=x.forwardRef((e,t)=>{const{__scopeScrollArea:n,children:i,nonce:s,...r}=e,a=Vi(bE,n),o=x.useRef(null),c=qe(t,o,a.onViewportChange);return u.jsxs(u.Fragment,{children:[u.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-scroll-area-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-scroll-area-viewport]::-webkit-scrollbar{display:none}"},nonce:s}),u.jsx(Te.div,{"data-radix-scroll-area-viewport":"",...r,ref:c,style:{overflowX:a.scrollbarXEnabled?"scroll":"hidden",overflowY:a.scrollbarYEnabled?"scroll":"hidden",...e.style},children:u.jsx("div",{ref:a.onContentChange,style:{minWidth:"100%",display:"table"},children:i})})]})});wE.displayName=bE;var Ws="ScrollAreaScrollbar",SE=x.forwardRef((e,t)=>{const{forceMount:n,...i}=e,s=Vi(Ws,e.__scopeScrollArea),{onScrollbarXEnabledChange:r,onScrollbarYEnabledChange:a}=s,o=e.orientation==="horizontal";return x.useEffect(()=>(o?r(!0):a(!0),()=>{o?r(!1):a(!1)}),[o,r,a]),s.type==="hover"?u.jsx(PX,{...i,ref:t,forceMount:n}):s.type==="scroll"?u.jsx(RX,{...i,ref:t,forceMount:n}):s.type==="auto"?u.jsx(CE,{...i,ref:t,forceMount:n}):s.type==="always"?u.jsx(c2,{...i,ref:t}):null});SE.displayName=Ws;var PX=x.forwardRef((e,t)=>{const{forceMount:n,...i}=e,s=Vi(Ws,e.__scopeScrollArea),[r,a]=x.useState(!1);return x.useEffect(()=>{const o=s.scrollArea;let c=0;if(o){const d=()=>{window.clearTimeout(c),a(!0)},h=()=>{c=window.setTimeout(()=>a(!1),s.scrollHideDelay)};return o.addEventListener("pointerenter",d),o.addEventListener("pointerleave",h),()=>{window.clearTimeout(c),o.removeEventListener("pointerenter",d),o.removeEventListener("pointerleave",h)}}},[s.scrollArea,s.scrollHideDelay]),u.jsx(nn,{present:n||r,children:u.jsx(CE,{"data-state":r?"visible":"hidden",...i,ref:t})})}),RX=x.forwardRef((e,t)=>{const{forceMount:n,...i}=e,s=Vi(Ws,e.__scopeScrollArea),r=e.orientation==="horizontal",a=c0(()=>c("SCROLL_END"),100),[o,c]=OX("hidden",{hidden:{SCROLL:"scrolling"},scrolling:{SCROLL_END:"idle",POINTER_ENTER:"interacting"},interacting:{SCROLL:"interacting",POINTER_LEAVE:"idle"},idle:{HIDE:"hidden",SCROLL:"scrolling",POINTER_ENTER:"interacting"}});return x.useEffect(()=>{if(o==="idle"){const d=window.setTimeout(()=>c("HIDE"),s.scrollHideDelay);return()=>window.clearTimeout(d)}},[o,s.scrollHideDelay,c]),x.useEffect(()=>{const d=s.viewport,h=r?"scrollLeft":"scrollTop";if(d){let m=d[h];const g=()=>{const v=d[h];m!==v&&(c("SCROLL"),a()),m=v};return d.addEventListener("scroll",g),()=>d.removeEventListener("scroll",g)}},[s.viewport,r,c,a]),u.jsx(nn,{present:n||o!=="hidden",children:u.jsx(c2,{"data-state":o==="hidden"?"hidden":"visible",...i,ref:t,onPointerEnter:pe(e.onPointerEnter,()=>c("POINTER_ENTER")),onPointerLeave:pe(e.onPointerLeave,()=>c("POINTER_LEAVE"))})})}),CE=x.forwardRef((e,t)=>{const n=Vi(Ws,e.__scopeScrollArea),{forceMount:i,...s}=e,[r,a]=x.useState(!1),o=e.orientation==="horizontal",c=c0(()=>{if(n.viewport){const d=n.viewport.offsetWidth<n.viewport.scrollWidth,h=n.viewport.offsetHeight<n.viewport.scrollHeight;a(o?d:h)}},10);return $c(n.viewport,c),$c(n.content,c),u.jsx(nn,{present:i||r,children:u.jsx(c2,{"data-state":r?"visible":"hidden",...s,ref:t})})}),c2=x.forwardRef((e,t)=>{const{orientation:n="vertical",...i}=e,s=Vi(Ws,e.__scopeScrollArea),r=x.useRef(null),a=x.useRef(0),[o,c]=x.useState({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),d=kE(o.viewport,o.content),h={...i,sizes:o,onSizesChange:c,hasThumb:d>0&&d<1,onThumbChange:g=>r.current=g,onThumbPointerUp:()=>a.current=0,onThumbPointerDown:g=>a.current=g};function m(g,v){return HX(g,a.current,o,v)}return n==="horizontal"?u.jsx(LX,{...h,ref:t,onThumbPositionChange:()=>{if(s.viewport&&r.current){const g=s.viewport.scrollLeft,v=HC(g,o,s.dir);r.current.style.transform=`translate3d(${v}px, 0, 0)`}},onWheelScroll:g=>{s.viewport&&(s.viewport.scrollLeft=g)},onDragScroll:g=>{s.viewport&&(s.viewport.scrollLeft=m(g,s.dir))}}):n==="vertical"?u.jsx(zX,{...h,ref:t,onThumbPositionChange:()=>{if(s.viewport&&r.current){const g=s.viewport.scrollTop,v=HC(g,o);r.current.style.transform=`translate3d(0, ${v}px, 0)`}},onWheelScroll:g=>{s.viewport&&(s.viewport.scrollTop=g)},onDragScroll:g=>{s.viewport&&(s.viewport.scrollTop=m(g))}}):null}),LX=x.forwardRef((e,t)=>{const{sizes:n,onSizesChange:i,...s}=e,r=Vi(Ws,e.__scopeScrollArea),[a,o]=x.useState(),c=x.useRef(null),d=qe(t,c,r.onScrollbarXChange);return x.useEffect(()=>{c.current&&o(getComputedStyle(c.current))},[c]),u.jsx(TE,{"data-orientation":"horizontal",...s,ref:d,sizes:n,style:{bottom:0,left:r.dir==="rtl"?"var(--radix-scroll-area-corner-width)":0,right:r.dir==="ltr"?"var(--radix-scroll-area-corner-width)":0,"--radix-scroll-area-thumb-width":l0(n)+"px",...e.style},onThumbPointerDown:h=>e.onThumbPointerDown(h.x),onDragScroll:h=>e.onDragScroll(h.x),onWheelScroll:(h,m)=>{if(r.viewport){const g=r.viewport.scrollLeft+h.deltaX;e.onWheelScroll(g),AE(g,m)&&h.preventDefault()}},onResize:()=>{c.current&&r.viewport&&a&&i({content:r.viewport.scrollWidth,viewport:r.viewport.offsetWidth,scrollbar:{size:c.current.clientWidth,paddingStart:Xg(a.paddingLeft),paddingEnd:Xg(a.paddingRight)}})}})}),zX=x.forwardRef((e,t)=>{const{sizes:n,onSizesChange:i,...s}=e,r=Vi(Ws,e.__scopeScrollArea),[a,o]=x.useState(),c=x.useRef(null),d=qe(t,c,r.onScrollbarYChange);return x.useEffect(()=>{c.current&&o(getComputedStyle(c.current))},[c]),u.jsx(TE,{"data-orientation":"vertical",...s,ref:d,sizes:n,style:{top:0,right:r.dir==="ltr"?0:void 0,left:r.dir==="rtl"?0:void 0,bottom:"var(--radix-scroll-area-corner-height)","--radix-scroll-area-thumb-height":l0(n)+"px",...e.style},onThumbPointerDown:h=>e.onThumbPointerDown(h.y),onDragScroll:h=>e.onDragScroll(h.y),onWheelScroll:(h,m)=>{if(r.viewport){const g=r.viewport.scrollTop+h.deltaY;e.onWheelScroll(g),AE(g,m)&&h.preventDefault()}},onResize:()=>{c.current&&r.viewport&&a&&i({content:r.viewport.scrollHeight,viewport:r.viewport.offsetHeight,scrollbar:{size:c.current.clientHeight,paddingStart:Xg(a.paddingTop),paddingEnd:Xg(a.paddingBottom)}})}})}),[IX,ME]=yE(Ws),TE=x.forwardRef((e,t)=>{const{__scopeScrollArea:n,sizes:i,hasThumb:s,onThumbChange:r,onThumbPointerUp:a,onThumbPointerDown:o,onThumbPositionChange:c,onDragScroll:d,onWheelScroll:h,onResize:m,...g}=e,v=Vi(Ws,n),[b,w]=x.useState(null),M=qe(t,I=>w(I)),y=x.useRef(null),S=x.useRef(""),T=v.viewport,N=i.content-i.viewport,k=Tn(h),E=Tn(c),D=c0(m,10);function O(I){if(y.current){const P=I.clientX-y.current.left,H=I.clientY-y.current.top;d({x:P,y:H})}}return x.useEffect(()=>{const I=P=>{const H=P.target;(b==null?void 0:b.contains(H))&&k(P,N)};return document.addEventListener("wheel",I,{passive:!1}),()=>document.removeEventListener("wheel",I,{passive:!1})},[T,b,N,k]),x.useEffect(E,[i,E]),$c(b,D),$c(v.content,D),u.jsx(IX,{scope:n,scrollbar:b,hasThumb:s,onThumbChange:Tn(r),onThumbPointerUp:Tn(a),onThumbPositionChange:E,onThumbPointerDown:Tn(o),children:u.jsx(Te.div,{...g,ref:M,style:{position:"absolute",...g.style},onPointerDown:pe(e.onPointerDown,I=>{I.button===0&&(I.target.setPointerCapture(I.pointerId),y.current=b.getBoundingClientRect(),S.current=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect="none",v.viewport&&(v.viewport.style.scrollBehavior="auto"),O(I))}),onPointerMove:pe(e.onPointerMove,O),onPointerUp:pe(e.onPointerUp,I=>{const P=I.target;P.hasPointerCapture(I.pointerId)&&P.releasePointerCapture(I.pointerId),document.body.style.webkitUserSelect=S.current,v.viewport&&(v.viewport.style.scrollBehavior=""),y.current=null})})})}),qg="ScrollAreaThumb",jE=x.forwardRef((e,t)=>{const{forceMount:n,...i}=e,s=ME(qg,e.__scopeScrollArea);return u.jsx(nn,{present:n||s.hasThumb,children:u.jsx(BX,{ref:t,...i})})}),BX=x.forwardRef((e,t)=>{const{__scopeScrollArea:n,style:i,...s}=e,r=Vi(qg,n),a=ME(qg,n),{onThumbPositionChange:o}=a,c=qe(t,m=>a.onThumbChange(m)),d=x.useRef(void 0),h=c0(()=>{d.current&&(d.current(),d.current=void 0)},100);return x.useEffect(()=>{const m=r.viewport;if(m){const g=()=>{if(h(),!d.current){const v=FX(m,o);d.current=v,o()}};return o(),m.addEventListener("scroll",g),()=>m.removeEventListener("scroll",g)}},[r.viewport,h,o]),u.jsx(Te.div,{"data-state":a.hasThumb?"visible":"hidden",...s,ref:c,style:{width:"var(--radix-scroll-area-thumb-width)",height:"var(--radix-scroll-area-thumb-height)",...i},onPointerDownCapture:pe(e.onPointerDownCapture,m=>{const v=m.target.getBoundingClientRect(),b=m.clientX-v.left,w=m.clientY-v.top;a.onThumbPointerDown({x:b,y:w})}),onPointerUp:pe(e.onPointerUp,a.onThumbPointerUp)})});jE.displayName=qg;var u2="ScrollAreaCorner",NE=x.forwardRef((e,t)=>{const n=Vi(u2,e.__scopeScrollArea),i=!!(n.scrollbarX&&n.scrollbarY);return n.type!=="scroll"&&i?u.jsx(VX,{...e,ref:t}):null});NE.displayName=u2;var VX=x.forwardRef((e,t)=>{const{__scopeScrollArea:n,...i}=e,s=Vi(u2,n),[r,a]=x.useState(0),[o,c]=x.useState(0),d=!!(r&&o);return $c(s.scrollbarX,()=>{var m;const h=((m=s.scrollbarX)==null?void 0:m.offsetHeight)||0;s.onCornerHeightChange(h),c(h)}),$c(s.scrollbarY,()=>{var m;const h=((m=s.scrollbarY)==null?void 0:m.offsetWidth)||0;s.onCornerWidthChange(h),a(h)}),d?u.jsx(Te.div,{...i,ref:t,style:{width:r,height:o,position:"absolute",right:s.dir==="ltr"?0:void 0,left:s.dir==="rtl"?0:void 0,bottom:0,...e.style}}):null});function Xg(e){return e?parseInt(e,10):0}function kE(e,t){const n=e/t;return isNaN(n)?0:n}function l0(e){const t=kE(e.viewport,e.content),n=e.scrollbar.paddingStart+e.scrollbar.paddingEnd,i=(e.scrollbar.size-n)*t;return Math.max(i,18)}function HX(e,t,n,i="ltr"){const s=l0(n),r=s/2,a=t||r,o=s-a,c=n.scrollbar.paddingStart+a,d=n.scrollbar.size-n.scrollbar.paddingEnd-o,h=n.content-n.viewport,m=i==="ltr"?[0,h]:[h*-1,0];return EE([c,d],m)(e)}function HC(e,t,n="ltr"){const i=l0(t),s=t.scrollbar.paddingStart+t.scrollbar.paddingEnd,r=t.scrollbar.size-s,a=t.content-t.viewport,o=r-i,c=n==="ltr"?[0,a]:[a*-1,0],d=AX(e,c);return EE([0,a],[0,o])(d)}function EE(e,t){return n=>{if(e[0]===e[1]||t[0]===t[1])return t[0];const i=(t[1]-t[0])/(e[1]-e[0]);return t[0]+i*(n-e[0])}}function AE(e,t){return e>0&&e<t}var FX=(e,t=()=>{})=>{let n={left:e.scrollLeft,top:e.scrollTop},i=0;return function s(){const r={left:e.scrollLeft,top:e.scrollTop},a=n.left!==r.left,o=n.top!==r.top;(a||o)&&t(),n=r,i=window.requestAnimationFrame(s)}(),()=>window.cancelAnimationFrame(i)};function c0(e,t){const n=Tn(e),i=x.useRef(0);return x.useEffect(()=>()=>window.clearTimeout(i.current),[]),x.useCallback(()=>{window.clearTimeout(i.current),i.current=window.setTimeout(n,t)},[n,t])}function $c(e,t){const n=Tn(t);Ls(()=>{let i=0;if(e){const s=new ResizeObserver(()=>{cancelAnimationFrame(i),i=window.requestAnimationFrame(n)});return s.observe(e),()=>{window.cancelAnimationFrame(i),s.unobserve(e)}}},[e,n])}var UX=_E,ZX=wE,$X=NE;function rs({className:e,children:t,...n}){return u.jsxs(UX,{"data-slot":"scroll-area",className:ye("relative",e),...n,children:[u.jsx(ZX,{"data-slot":"scroll-area-viewport",className:"focus-visible:ring-ring/50 size-full rounded-[inherit] transition-[color,box-shadow] outline-none focus-visible:ring-[3px] focus-visible:outline-1",children:t}),u.jsx(WX,{}),u.jsx($X,{})]})}function WX({className:e,orientation:t="vertical",...n}){return u.jsx(SE,{"data-slot":"scroll-area-scrollbar",orientation:t,className:ye("flex touch-none p-px transition-colors select-none",t==="vertical"&&"h-full w-1.5 border-l border-l-transparent",t==="horizontal"&&"h-1.5 flex-col border-t border-t-transparent",e),...n,children:u.jsx(jE,{"data-slot":"scroll-area-thumb",className:"bg-border relative flex-1 rounded-full"})})}const GX=()=>{const e=x.useContext(Un),[t,n]=x.useState([]),[i,s]=x.useState(1),[r,a]=x.useState(null),[o,c]=x.useState(""),d={deposit_dirty:{title:C("menu.deposit_dirty"),desc:C("menu.deposit_dirty_amount"),actionLabel:C("menu.deposit"),handler:"deposit_dirty"},withdraw_dirty:{title:C("menu.withdraw_dirty"),desc:C("menu.withdraw_dirty_amount"),actionLabel:C("menu.withdraw"),handler:"withdraw_dirty"},deposit:{title:C("menu.deposit"),desc:C("menu.deposit_amount"),actionLabel:C("menu.deposit"),handler:"deposit"},withdraw:{title:C("menu.withdraw"),desc:C("menu.withdraw_amount"),actionLabel:C("menu.withdraw"),handler:"withdraw"}},h=async y=>{const S=await K("get_transactions",{gangId:e.gangId,page:y});n(S||[])};x.useEffect(()=>{h(i)},[i,e.gangId]);const m=async y=>{if(y<1)return;const S=await K("get_transactions",{gangId:e.gangId,page:y});(S&&S.length>0||y===1&&(!S||S.length===0))&&s(y)},g=()=>{i>1&&m(i-1)},v=()=>{m(i+1)},b=y=>{const S=y.target.value;if(S==="")return;const T=parseInt(S);!isNaN(T)&&T>=1&&m(T)},w=async()=>{var S;if(!r||!o)return;const y=(S=d[r])==null?void 0:S.handler;y&&(await K(y,{gangId:e.gangId,amount:parseInt(o)}),h(i)),a(null),c("")},M=r?d[r]:null;return u.jsxs(u.Fragment,{children:[M&&u.jsx(Mr,{open:!!r,onOpenChange:()=>{a(null),c("")},children:u.jsxs(Tr,{children:[u.jsxs(jr,{children:[u.jsx(Nr,{children:M.title}),u.jsx(ka,{children:M.desc})]}),u.jsx(wt,{type:"number",placeholder:C("menu.amount"),value:o,onChange:y=>c(y.target.value),className:"my-4"}),u.jsxs(Na,{children:[u.jsx(ne,{variant:"outline",onClick:()=>{a(null),c("")},children:C("menu.cancel")}),u.jsx(ne,{onClick:w,children:M.actionLabel})]})]})}),u.jsxs("div",{className:"flex flex-col md:flex-row pt-[5%] w-11/12 mx-auto h-full gap-6 md:gap-12",children:[u.jsxs("div",{className:"flex flex-col w-full md:w-2/5 space-y-6",children:[" ",u.jsxs(de.div,{initial:{opacity:0,scale:.9},animate:{opacity:1,scale:1},transition:{duration:.2},className:"bg-card text-card-foreground border border-border rounded-lg p-6 shadow",children:[u.jsx("h3",{className:"text-xl text-muted-foreground mb-1",children:C("menu.total_balance")})," ",u.jsxs("div",{className:"text-3xl font-bold",children:[" ",e.cash," ",u.jsx("span",{className:"text-lg text-primary",children:C("currency")})," "]}),u.jsxs("div",{className:"text-2xl mt-1",children:[" ",Math.round(e.dirtyCash)," ",u.jsx("span",{className:"text-base text-amber-600",children:C("menu.dirty_cash")})," "]})]}),u.jsxs("div",{children:[u.jsx("h4",{className:"text-lg font-semibold mb-2",children:C("menu.clean_cash")})," ",u.jsxs(de.div,{initial:{opacity:0,scale:.9},animate:{opacity:1,scale:1},transition:{duration:.2},className:"grid grid-cols-2 gap-2",children:[u.jsxs(ne,{variant:"outline",className:"w-full py-4 text-base flex items-center gap-2 hover:bg-muted",onClick:()=>a("deposit"),children:[" ",u.jsx(Wg,{size:20})," ",C("menu.deposit")]}),u.jsxs(ne,{variant:"outline",className:"w-full py-4 text-base flex items-center gap-2 hover:bg-muted",onClick:()=>a("withdraw"),children:[" ",u.jsx(Gg,{size:20})," ",C("menu.withdraw")]})]})]}),u.jsxs("div",{children:[u.jsx("h4",{className:"text-lg font-semibold mb-2",children:C("menu.dirty_cash")})," ",u.jsxs(de.div,{initial:{opacity:0,scale:.9},animate:{opacity:1,scale:1},transition:{duration:.2},className:"grid grid-cols-2 gap-2",children:[u.jsxs(ne,{variant:"outline",className:"w-full py-4 text-base flex items-center gap-2 hover:bg-muted",onClick:()=>a("deposit_dirty"),children:[" ",u.jsx(Wg,{size:20})," ",C("menu.deposit")]}),u.jsxs(ne,{variant:"outline",className:"w-full py-4 text-base flex items-center gap-2 hover:bg-muted",onClick:()=>a("withdraw_dirty"),children:[" ",u.jsx(Gg,{size:20})," ",C("menu.withdraw")]})]})]})]}),u.jsxs(St,{className:"w-3/5 bg-card text-card-foreground border-border shadow flex flex-col p-2 h-[90%]",children:[u.jsx(Qn,{children:u.jsx(Jn,{className:"pt-2",children:C("menu.recent_transfers")})}),u.jsx(pn,{className:"flex-grow overflow-hidden",children:u.jsx(rs,{className:"h-[calc(100%-0px)] pr-3",children:u.jsxs(pE,{children:[u.jsx(vE,{children:u.jsxs(yc,{className:"border-b-border hover:bg-transparent",children:[u.jsx(ws,{className:"text-xs",children:C("menu.handled_by")}),u.jsx(ws,{className:"text-xs text-center",children:C("menu.type")}),u.jsx(ws,{className:"text-xs text-center",children:C("menu.id")}),u.jsx(ws,{className:"text-xs text-center",children:C("menu.amount")}),u.jsx(ws,{className:"text-xs text-right",children:C("menu.date")})]})}),u.jsxs(xE,{children:[t.map((y,S)=>u.jsxs(yc,{className:"border-b-border text-xs",children:[u.jsx(Ni,{children:y.handled_by}),u.jsx(Ni,{className:"text-center",children:u.jsx("span",{className:`px-2 py-0.5 rounded-full text-xs ${y.type==="deposit"||y.type==="deposit_dirty"?"bg-green-500/20 text-green-400":"bg-red-500/20 text-red-400"}`,children:C("menu."+y.type)})}),u.jsx(Ni,{className:"text-center",children:y.id}),u.jsxs(Ni,{className:"text-center",children:[y.amount," ",C("currency")]}),u.jsx(Ni,{className:"text-right",children:ol(y.date_stamp)})]},y.id+"-"+S)),t.length===0&&u.jsx(yc,{children:u.jsx(Ni,{colSpan:5,className:"text-center text-muted-foreground py-4",children:C("menu.no_transactions_found")})})]})]})})}),u.jsxs("div",{className:"flex items-center justify-center pt-2 border-t border-border",children:[u.jsx(ne,{variant:"ghost",size:"icon",onClick:g,disabled:i<=1,children:u.jsx(Kb,{className:"h-5 w-5"})}),u.jsx(wt,{type:"number",value:i,onChange:b,className:"w-10 text-center mx-2 !bg-transparent border-border focus-visible:ring-primary"}),u.jsx(ne,{variant:"ghost",size:"icon",onClick:v,disabled:t.length<10,children:u.jsx(Qb,{className:"h-5 w-5"})})]})]})]})]})},YX=()=>{const e=x.useContext(Un),[t,n]=x.useState([]),[i,s]=x.useState(1),r=async m=>await K("get_logs",{gangId:e.gangId,page:m});x.useEffect(()=>{e!=null&&e.gangId&&r(i).then(n)},[i,e==null?void 0:e.gangId]);const a=async m=>{if(m<1)return;const g=await r(m);g&&g.length===0&&m>1||(n(g),s(m))},o=()=>a(i+1),c=()=>a(i-1),d=m=>{const g=m.target.value;if(g===""){s("");return}const v=parseInt(g,12);!isNaN(v)&&v>=1?s(v):g===""&&t.length>0},h=()=>{let m=parseInt(i,10);(isNaN(m)||m<1)&&(m=1),a(m)};return u.jsxs("div",{className:"flex flex-col items-center relative w-[90%] left-[5%] mt-8 h-fit gap-2",children:[u.jsxs("div",{className:"w-full  flex-1 overflow-hidden rounded-lg border border-border bg-card p-2 flex flex-col",children:[u.jsxs(de.div,{className:"grid grid-cols-[1.5fr_3fr_1.5fr] items-center p-3 border-b border-border text-sm font-semibold text-muted-foreground sticky top-0 bg-card z-10",children:[u.jsx("div",{children:C("menu.event")}),u.jsx("div",{className:"px-2 text-center",children:C("menu.desc")}),u.jsx("div",{className:"text-right",children:C("menu.date")})]}),u.jsx("div",{className:"flex-grow overflow-y-auto",children:t.length>0?t.map((m,g)=>u.jsxs(de.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},transition:{duration:.2,delay:g*.025},className:"grid grid-cols-[1.5fr_3fr_1.5fr] items-center p-3 border-b border-border text-xs last:border-b-0 hover:bg-muted/25",children:[u.jsx("div",{className:"truncate",children:m.event}),u.jsx("div",{className:"truncate px-2 text-center",children:m.description}),u.jsx("div",{className:"text-right truncate",children:ol(m.date_stamp,!0)})]},m.id)):u.jsx("div",{className:"flex justify-center items-center h-full text-muted-foreground",children:C("menu.no_logs_found")})})]}),t.length>0||i>1?u.jsxs("div",{className:"flex items-center justify-center gap-2 p-2 text-xl text-foreground",children:[u.jsx(Kb,{onClick:c,className:"cursor-pointer hover:text-primary disabled:opacity-50",disabled:i<=1}),u.jsx("input",{value:i,onChange:d,onBlur:h,className:"w-12 bg-transparent outline-none border-none text-center text-foreground text-base appearance-none [-moz-appearance:textfield] [&::-webkit-outer-spin-button]:appearance-none [&::-webkit-inner-spin-button]:appearance-none",type:"number",min:"1"}),u.jsx(Qb,{onClick:o,className:"cursor-pointer hover:text-primary disabled:opacity-50",disabled:t.length===0&&i>1})]}):null]})};var qX={cm:!0,mm:!0,in:!0,px:!0,pt:!0,pc:!0,em:!0,ex:!0,ch:!0,rem:!0,vw:!0,vh:!0,vmin:!0,vmax:!0,"%":!0};function XX(e){if(typeof e=="number")return{value:e,unit:"px"};var t,n=(e.match(/^[0-9.]*/)||"").toString();n.includes(".")?t=parseFloat(n):t=parseInt(n,10);var i=(e.match(/[^0-9]*$/)||"").toString();return qX[i]?{value:t,unit:i}:(console.warn("React Spinners: ".concat(e," is not a valid css value. Defaulting to ").concat(t,"px.")),{value:t,unit:"px"})}function FC(e){var t=XX(e);return"".concat(t.value).concat(t.unit)}var KX=function(e,t,n){var i="react-spinners-".concat(e,"-").concat(n);if(typeof window>"u"||!window.document)return i;var s=document.createElement("style");document.head.appendChild(s);var r=s.sheet,a=`
    @keyframes `.concat(i,` {
      `).concat(t,`
    }
  `);return r&&r.insertRule(a,0),i},Kg=function(){return Kg=Object.assign||function(e){for(var t,n=1,i=arguments.length;n<i;n++){t=arguments[n];for(var s in t)Object.prototype.hasOwnProperty.call(t,s)&&(e[s]=t[s])}return e},Kg.apply(this,arguments)},QX=function(e,t){var n={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(n[i]=e[i]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var s=0,i=Object.getOwnPropertySymbols(e);s<i.length;s++)t.indexOf(i[s])<0&&Object.prototype.propertyIsEnumerable.call(e,i[s])&&(n[i[s]]=e[i[s]]);return n},JX=KX("ClipLoader","0% {transform: rotate(0deg) scale(1)} 50% {transform: rotate(180deg) scale(0.8)} 100% {transform: rotate(360deg) scale(1)}","clip");function eK(e){var t=e.loading,n=t===void 0?!0:t,i=e.color,s=i===void 0?"#000000":i,r=e.speedMultiplier,a=r===void 0?1:r,o=e.cssOverride,c=o===void 0?{}:o,d=e.size,h=d===void 0?35:d,m=QX(e,["loading","color","speedMultiplier","cssOverride","size"]),g=Kg({background:"transparent !important",width:FC(h),height:FC(h),borderRadius:"100%",border:"2px solid",borderTopColor:s,borderBottomColor:"transparent",borderLeftColor:s,borderRightColor:s,display:"inline-block",animation:"".concat(JX," ").concat(.75/a,"s 0s infinite linear"),animationFillMode:"both"},c);return n?x.createElement("span",Kg({style:g},m)):null}const xf=e=>{var d;const[t,n]=x.useState(e.players?e.players:[]),[i,s]=x.useState(!!e.players&&e.players.length>0),[r,a]=x.useState(0),o=(h,m)=>{e.actionClicked(h,m)},c=async()=>{let h=await K("get_online_players");n(h),h.length>0?a(0):a(-1),s(!0)};return x.useEffect(()=>{(!e.players||e.players.length===0)&&c()},[e.players]),u.jsx("div",{className:"fixed inset-0 w-screen h-screen flex flex-wrap justify-center items-center z-[999] overflow-hidden bg-black/80 p-4",children:u.jsxs(de.div,{initial:{opacity:0,scale:.9},animate:{opacity:1,scale:1},transition:{duration:.2},className:"relative flex flex-col items-center w-full sm:w-auto sm:min-w-[280px] md:w-1/4 lg:w-1/5 max-h-[70vh] gap-2 p-4 bg-card rounded-lg text-card-foreground shadow-lg border border-border",children:[u.jsx("div",{className:"w-full text-base text-card-foreground font-bold mb-2",children:C("select_player")}),u.jsx("div",{className:"overflow-y-auto overflow-x-hidden flex flex-col justify-start gap-2 w-full p-1 flex-grow",children:i?t.length>0?t.map((h,m)=>u.jsxs(de.div,{className:`flex flex-row items-center justify-center gap-2 w-full text-center text-xs text-card-foreground p-2.5 border rounded-lg transition-colors overflow-hidden cursor-pointer
                                    ${r===m?"bg-primary/20 border-primary text-primary":"bg-background border-border hover:bg-muted"}`,onClick:()=>a(m),initial:{opacity:0},animate:{opacity:1},transition:{duration:.2,delay:.03*m},children:[u.jsx("span",{children:h.name})," | ",u.jsxs("span",{children:["ID: ",h.id]})]},h.id||m)):u.jsx("div",{className:"text-muted-foreground text-sm text-center py-4",children:C("no_players_online")}):u.jsx("div",{className:"flex justify-center items-center py-4",children:u.jsx(eK,{color:((d=li("textColor"))==null?void 0:d.value)||"#ffffff",loading:!i,size:35})})}),u.jsxs("div",{className:"flex flex-row justify-end gap-2 w-full mt-3",children:[u.jsx("button",{type:"button",className:"px-3 py-1.5 text-xs rounded-md bg-secondary text-secondary-foreground border border-border hover:bg-secondary/80",onClick:()=>o("cancel"),children:C("cancel")}),u.jsx("button",{type:"button",className:"px-3 py-1.5 text-xs rounded-md bg-primary text-primary-foreground hover:bg-primary/80 disabled:opacity-50",onClick:()=>o("confirm",t[r]),disabled:t.length===0||r<0,children:C("confirm")})]})]})})},tK=e=>{var i,s;const t=x.useRef(null),n=(r,a)=>{e.actionClicked(r,a)};return e!=null&&e.input?u.jsx("div",{className:"dialogContainer",children:u.jsxs(de.div,{className:"dialog",initial:{opacity:0},animate:{opacity:1},transition:{duration:.2},children:[u.jsx("div",{className:"title",children:e==null?void 0:e.title}),u.jsx("div",{className:"desc",children:e==null?void 0:e.desc}),u.jsx("input",{className:"dialogInput",type:"text",ref:t,onBlur:e.onBlur,onFocus:e.onFocus,placeholder:e==null?void 0:e.input,onKeyDown:r=>{!e.allowText&&isNaN(Number(r.key))&&r.key!=="Backspace"&&r.key!=="Delete"&&r.key!=="ArrowLeft"&&r.key!=="ArrowRight"&&r.preventDefault()}}),u.jsx("div",{className:"buttonContainer",children:(i=e==null?void 0:e.buttons)==null?void 0:i.map((r,a)=>u.jsx("div",{className:(r.type?r.type:"")+" actionButton",onClick:()=>{var o;return n(r.action,(o=t==null?void 0:t.current)==null?void 0:o.value)},children:r.label},a))})]})}):u.jsx("div",{className:"dialogContainer",children:u.jsxs(de.div,{initial:{opacity:0},animate:{opacity:1},transition:{duration:.2},className:"dialog",children:[u.jsx("div",{className:"title",children:e==null?void 0:e.title}),u.jsx("div",{className:"desc",children:e==null?void 0:e.desc}),u.jsx("div",{className:"buttonContainer",children:(s=e==null?void 0:e.buttons)==null?void 0:s.map((r,a)=>u.jsx("div",{className:(r.type?r.type:"")+" actionButton",onClick:()=>n(r.action,null),children:r.label},a))})]})})},nK=["top","right","bottom","left"],Ia=Math.min,ai=Math.max,Qg=Math.round,cm=Math.floor,As=e=>({x:e,y:e}),iK={left:"right",right:"left",bottom:"top",top:"bottom"},sK={start:"end",end:"start"};function Cy(e,t,n){return ai(e,Ia(t,n))}function Pr(e,t){return typeof e=="function"?e(t):e}function Rr(e){return e.split("-")[0]}function cu(e){return e.split("-")[1]}function d2(e){return e==="x"?"y":"x"}function f2(e){return e==="y"?"height":"width"}function kr(e){return["top","bottom"].includes(Rr(e))?"y":"x"}function h2(e){return d2(kr(e))}function rK(e,t,n){n===void 0&&(n=!1);const i=cu(e),s=h2(e),r=f2(s);let a=s==="x"?i===(n?"end":"start")?"right":"left":i==="start"?"bottom":"top";return t.reference[r]>t.floating[r]&&(a=Jg(a)),[a,Jg(a)]}function aK(e){const t=Jg(e);return[My(e),t,My(t)]}function My(e){return e.replace(/start|end/g,t=>sK[t])}function oK(e,t,n){const i=["left","right"],s=["right","left"],r=["top","bottom"],a=["bottom","top"];switch(e){case"top":case"bottom":return n?t?s:i:t?i:s;case"left":case"right":return t?r:a;default:return[]}}function lK(e,t,n,i){const s=cu(e);let r=oK(Rr(e),n==="start",i);return s&&(r=r.map(a=>a+"-"+s),t&&(r=r.concat(r.map(My)))),r}function Jg(e){return e.replace(/left|right|bottom|top/g,t=>iK[t])}function cK(e){return{top:0,right:0,bottom:0,left:0,...e}}function OE(e){return typeof e!="number"?cK(e):{top:e,right:e,bottom:e,left:e}}function ep(e){const{x:t,y:n,width:i,height:s}=e;return{width:i,height:s,top:n,left:t,right:t+i,bottom:n+s,x:t,y:n}}function UC(e,t,n){let{reference:i,floating:s}=e;const r=kr(t),a=h2(t),o=f2(a),c=Rr(t),d=r==="y",h=i.x+i.width/2-s.width/2,m=i.y+i.height/2-s.height/2,g=i[o]/2-s[o]/2;let v;switch(c){case"top":v={x:h,y:i.y-s.height};break;case"bottom":v={x:h,y:i.y+i.height};break;case"right":v={x:i.x+i.width,y:m};break;case"left":v={x:i.x-s.width,y:m};break;default:v={x:i.x,y:i.y}}switch(cu(t)){case"start":v[a]-=g*(n&&d?-1:1);break;case"end":v[a]+=g*(n&&d?-1:1);break}return v}const uK=async(e,t,n)=>{const{placement:i="bottom",strategy:s="absolute",middleware:r=[],platform:a}=n,o=r.filter(Boolean),c=await(a.isRTL==null?void 0:a.isRTL(t));let d=await a.getElementRects({reference:e,floating:t,strategy:s}),{x:h,y:m}=UC(d,i,c),g=i,v={},b=0;for(let w=0;w<o.length;w++){const{name:M,fn:y}=o[w],{x:S,y:T,data:N,reset:k}=await y({x:h,y:m,initialPlacement:i,placement:g,strategy:s,middlewareData:v,rects:d,platform:a,elements:{reference:e,floating:t}});h=S??h,m=T??m,v={...v,[M]:{...v[M],...N}},k&&b<=50&&(b++,typeof k=="object"&&(k.placement&&(g=k.placement),k.rects&&(d=k.rects===!0?await a.getElementRects({reference:e,floating:t,strategy:s}):k.rects),{x:h,y:m}=UC(d,g,c)),w=-1)}return{x:h,y:m,placement:g,strategy:s,middlewareData:v}};async function yf(e,t){var n;t===void 0&&(t={});const{x:i,y:s,platform:r,rects:a,elements:o,strategy:c}=e,{boundary:d="clippingAncestors",rootBoundary:h="viewport",elementContext:m="floating",altBoundary:g=!1,padding:v=0}=Pr(t,e),b=OE(v),M=o[g?m==="floating"?"reference":"floating":m],y=ep(await r.getClippingRect({element:(n=await(r.isElement==null?void 0:r.isElement(M)))==null||n?M:M.contextElement||await(r.getDocumentElement==null?void 0:r.getDocumentElement(o.floating)),boundary:d,rootBoundary:h,strategy:c})),S=m==="floating"?{x:i,y:s,width:a.floating.width,height:a.floating.height}:a.reference,T=await(r.getOffsetParent==null?void 0:r.getOffsetParent(o.floating)),N=await(r.isElement==null?void 0:r.isElement(T))?await(r.getScale==null?void 0:r.getScale(T))||{x:1,y:1}:{x:1,y:1},k=ep(r.convertOffsetParentRelativeRectToViewportRelativeRect?await r.convertOffsetParentRelativeRectToViewportRelativeRect({elements:o,rect:S,offsetParent:T,strategy:c}):S);return{top:(y.top-k.top+b.top)/N.y,bottom:(k.bottom-y.bottom+b.bottom)/N.y,left:(y.left-k.left+b.left)/N.x,right:(k.right-y.right+b.right)/N.x}}const dK=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:i,placement:s,rects:r,platform:a,elements:o,middlewareData:c}=t,{element:d,padding:h=0}=Pr(e,t)||{};if(d==null)return{};const m=OE(h),g={x:n,y:i},v=h2(s),b=f2(v),w=await a.getDimensions(d),M=v==="y",y=M?"top":"left",S=M?"bottom":"right",T=M?"clientHeight":"clientWidth",N=r.reference[b]+r.reference[v]-g[v]-r.floating[b],k=g[v]-r.reference[v],E=await(a.getOffsetParent==null?void 0:a.getOffsetParent(d));let D=E?E[T]:0;(!D||!await(a.isElement==null?void 0:a.isElement(E)))&&(D=o.floating[T]||r.floating[b]);const O=N/2-k/2,I=D/2-w[b]/2-1,P=Ia(m[y],I),H=Ia(m[S],I),V=P,J=D-w[b]-H,Q=D/2-w[b]/2+O,U=Cy(V,Q,J),R=!c.arrow&&cu(s)!=null&&Q!==U&&r.reference[b]/2-(Q<V?P:H)-w[b]/2<0,$=R?Q<V?Q-V:Q-J:0;return{[v]:g[v]+$,data:{[v]:U,centerOffset:Q-U-$,...R&&{alignmentOffset:$}},reset:R}}}),fK=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,i;const{placement:s,middlewareData:r,rects:a,initialPlacement:o,platform:c,elements:d}=t,{mainAxis:h=!0,crossAxis:m=!0,fallbackPlacements:g,fallbackStrategy:v="bestFit",fallbackAxisSideDirection:b="none",flipAlignment:w=!0,...M}=Pr(e,t);if((n=r.arrow)!=null&&n.alignmentOffset)return{};const y=Rr(s),S=kr(o),T=Rr(o)===o,N=await(c.isRTL==null?void 0:c.isRTL(d.floating)),k=g||(T||!w?[Jg(o)]:aK(o)),E=b!=="none";!g&&E&&k.push(...lK(o,w,b,N));const D=[o,...k],O=await yf(t,M),I=[];let P=((i=r.flip)==null?void 0:i.overflows)||[];if(h&&I.push(O[y]),m){const U=rK(s,a,N);I.push(O[U[0]],O[U[1]])}if(P=[...P,{placement:s,overflows:I}],!I.every(U=>U<=0)){var H,V;const U=(((H=r.flip)==null?void 0:H.index)||0)+1,R=D[U];if(R){var J;const B=m==="alignment"?S!==kr(R):!1,W=((J=P[0])==null?void 0:J.overflows[0])>0;if(!B||W)return{data:{index:U,overflows:P},reset:{placement:R}}}let $=(V=P.filter(B=>B.overflows[0]<=0).sort((B,W)=>B.overflows[1]-W.overflows[1])[0])==null?void 0:V.placement;if(!$)switch(v){case"bestFit":{var Q;const B=(Q=P.filter(W=>{if(E){const G=kr(W.placement);return G===S||G==="y"}return!0}).map(W=>[W.placement,W.overflows.filter(G=>G>0).reduce((G,ie)=>G+ie,0)]).sort((W,G)=>W[1]-G[1])[0])==null?void 0:Q[0];B&&($=B);break}case"initialPlacement":$=o;break}if(s!==$)return{reset:{placement:$}}}return{}}}};function ZC(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function $C(e){return nK.some(t=>e[t]>=0)}const hK=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:i="referenceHidden",...s}=Pr(e,t);switch(i){case"referenceHidden":{const r=await yf(t,{...s,elementContext:"reference"}),a=ZC(r,n.reference);return{data:{referenceHiddenOffsets:a,referenceHidden:$C(a)}}}case"escaped":{const r=await yf(t,{...s,altBoundary:!0}),a=ZC(r,n.floating);return{data:{escapedOffsets:a,escaped:$C(a)}}}default:return{}}}}};async function mK(e,t){const{placement:n,platform:i,elements:s}=e,r=await(i.isRTL==null?void 0:i.isRTL(s.floating)),a=Rr(n),o=cu(n),c=kr(n)==="y",d=["left","top"].includes(a)?-1:1,h=r&&c?-1:1,m=Pr(t,e);let{mainAxis:g,crossAxis:v,alignmentAxis:b}=typeof m=="number"?{mainAxis:m,crossAxis:0,alignmentAxis:null}:{mainAxis:m.mainAxis||0,crossAxis:m.crossAxis||0,alignmentAxis:m.alignmentAxis};return o&&typeof b=="number"&&(v=o==="end"?b*-1:b),c?{x:v*h,y:g*d}:{x:g*d,y:v*h}}const gK=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,i;const{x:s,y:r,placement:a,middlewareData:o}=t,c=await mK(t,e);return a===((n=o.offset)==null?void 0:n.placement)&&(i=o.arrow)!=null&&i.alignmentOffset?{}:{x:s+c.x,y:r+c.y,data:{...c,placement:a}}}}},pK=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:i,placement:s}=t,{mainAxis:r=!0,crossAxis:a=!1,limiter:o={fn:M=>{let{x:y,y:S}=M;return{x:y,y:S}}},...c}=Pr(e,t),d={x:n,y:i},h=await yf(t,c),m=kr(Rr(s)),g=d2(m);let v=d[g],b=d[m];if(r){const M=g==="y"?"top":"left",y=g==="y"?"bottom":"right",S=v+h[M],T=v-h[y];v=Cy(S,v,T)}if(a){const M=m==="y"?"top":"left",y=m==="y"?"bottom":"right",S=b+h[M],T=b-h[y];b=Cy(S,b,T)}const w=o.fn({...t,[g]:v,[m]:b});return{...w,data:{x:w.x-n,y:w.y-i,enabled:{[g]:r,[m]:a}}}}}},vK=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:i,placement:s,rects:r,middlewareData:a}=t,{offset:o=0,mainAxis:c=!0,crossAxis:d=!0}=Pr(e,t),h={x:n,y:i},m=kr(s),g=d2(m);let v=h[g],b=h[m];const w=Pr(o,t),M=typeof w=="number"?{mainAxis:w,crossAxis:0}:{mainAxis:0,crossAxis:0,...w};if(c){const T=g==="y"?"height":"width",N=r.reference[g]-r.floating[T]+M.mainAxis,k=r.reference[g]+r.reference[T]-M.mainAxis;v<N?v=N:v>k&&(v=k)}if(d){var y,S;const T=g==="y"?"width":"height",N=["top","left"].includes(Rr(s)),k=r.reference[m]-r.floating[T]+(N&&((y=a.offset)==null?void 0:y[m])||0)+(N?0:M.crossAxis),E=r.reference[m]+r.reference[T]+(N?0:((S=a.offset)==null?void 0:S[m])||0)-(N?M.crossAxis:0);b<k?b=k:b>E&&(b=E)}return{[g]:v,[m]:b}}}},xK=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,i;const{placement:s,rects:r,platform:a,elements:o}=t,{apply:c=()=>{},...d}=Pr(e,t),h=await yf(t,d),m=Rr(s),g=cu(s),v=kr(s)==="y",{width:b,height:w}=r.floating;let M,y;m==="top"||m==="bottom"?(M=m,y=g===(await(a.isRTL==null?void 0:a.isRTL(o.floating))?"start":"end")?"left":"right"):(y=m,M=g==="end"?"top":"bottom");const S=w-h.top-h.bottom,T=b-h.left-h.right,N=Ia(w-h[M],S),k=Ia(b-h[y],T),E=!t.middlewareData.shift;let D=N,O=k;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(O=T),(i=t.middlewareData.shift)!=null&&i.enabled.y&&(D=S),E&&!g){const P=ai(h.left,0),H=ai(h.right,0),V=ai(h.top,0),J=ai(h.bottom,0);v?O=b-2*(P!==0||H!==0?P+H:ai(h.left,h.right)):D=w-2*(V!==0||J!==0?V+J:ai(h.top,h.bottom))}await c({...t,availableWidth:O,availableHeight:D});const I=await a.getDimensions(o.floating);return b!==I.width||w!==I.height?{reset:{rects:!0}}:{}}}};function u0(){return typeof window<"u"}function uu(e){return DE(e)?(e.nodeName||"").toLowerCase():"#document"}function di(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Gs(e){var t;return(t=(DE(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function DE(e){return u0()?e instanceof Node||e instanceof di(e).Node:!1}function as(e){return u0()?e instanceof Element||e instanceof di(e).Element:!1}function zs(e){return u0()?e instanceof HTMLElement||e instanceof di(e).HTMLElement:!1}function WC(e){return!u0()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof di(e).ShadowRoot}function Wf(e){const{overflow:t,overflowX:n,overflowY:i,display:s}=os(e);return/auto|scroll|overlay|hidden|clip/.test(t+i+n)&&!["inline","contents"].includes(s)}function yK(e){return["table","td","th"].includes(uu(e))}function d0(e){return[":popover-open",":modal"].some(t=>{try{return e.matches(t)}catch{return!1}})}function m2(e){const t=g2(),n=as(e)?os(e):e;return["transform","translate","scale","rotate","perspective"].some(i=>n[i]?n[i]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||["transform","translate","scale","rotate","perspective","filter"].some(i=>(n.willChange||"").includes(i))||["paint","layout","strict","content"].some(i=>(n.contain||"").includes(i))}function _K(e){let t=Ba(e);for(;zs(t)&&!Wc(t);){if(m2(t))return t;if(d0(t))return null;t=Ba(t)}return null}function g2(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function Wc(e){return["html","body","#document"].includes(uu(e))}function os(e){return di(e).getComputedStyle(e)}function f0(e){return as(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Ba(e){if(uu(e)==="html")return e;const t=e.assignedSlot||e.parentNode||WC(e)&&e.host||Gs(e);return WC(t)?t.host:t}function PE(e){const t=Ba(e);return Wc(t)?e.ownerDocument?e.ownerDocument.body:e.body:zs(t)&&Wf(t)?t:PE(t)}function _f(e,t,n){var i;t===void 0&&(t=[]),n===void 0&&(n=!0);const s=PE(e),r=s===((i=e.ownerDocument)==null?void 0:i.body),a=di(s);if(r){const o=Ty(a);return t.concat(a,a.visualViewport||[],Wf(s)?s:[],o&&n?_f(o):[])}return t.concat(s,_f(s,[],n))}function Ty(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function RE(e){const t=os(e);let n=parseFloat(t.width)||0,i=parseFloat(t.height)||0;const s=zs(e),r=s?e.offsetWidth:n,a=s?e.offsetHeight:i,o=Qg(n)!==r||Qg(i)!==a;return o&&(n=r,i=a),{width:n,height:i,$:o}}function p2(e){return as(e)?e:e.contextElement}function _c(e){const t=p2(e);if(!zs(t))return As(1);const n=t.getBoundingClientRect(),{width:i,height:s,$:r}=RE(t);let a=(r?Qg(n.width):n.width)/i,o=(r?Qg(n.height):n.height)/s;return(!a||!Number.isFinite(a))&&(a=1),(!o||!Number.isFinite(o))&&(o=1),{x:a,y:o}}const bK=As(0);function LE(e){const t=di(e);return!g2()||!t.visualViewport?bK:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function wK(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==di(e)?!1:t}function Xo(e,t,n,i){t===void 0&&(t=!1),n===void 0&&(n=!1);const s=e.getBoundingClientRect(),r=p2(e);let a=As(1);t&&(i?as(i)&&(a=_c(i)):a=_c(e));const o=wK(r,n,i)?LE(r):As(0);let c=(s.left+o.x)/a.x,d=(s.top+o.y)/a.y,h=s.width/a.x,m=s.height/a.y;if(r){const g=di(r),v=i&&as(i)?di(i):i;let b=g,w=Ty(b);for(;w&&i&&v!==b;){const M=_c(w),y=w.getBoundingClientRect(),S=os(w),T=y.left+(w.clientLeft+parseFloat(S.paddingLeft))*M.x,N=y.top+(w.clientTop+parseFloat(S.paddingTop))*M.y;c*=M.x,d*=M.y,h*=M.x,m*=M.y,c+=T,d+=N,b=di(w),w=Ty(b)}}return ep({width:h,height:m,x:c,y:d})}function v2(e,t){const n=f0(e).scrollLeft;return t?t.left+n:Xo(Gs(e)).left+n}function zE(e,t,n){n===void 0&&(n=!1);const i=e.getBoundingClientRect(),s=i.left+t.scrollLeft-(n?0:v2(e,i)),r=i.top+t.scrollTop;return{x:s,y:r}}function SK(e){let{elements:t,rect:n,offsetParent:i,strategy:s}=e;const r=s==="fixed",a=Gs(i),o=t?d0(t.floating):!1;if(i===a||o&&r)return n;let c={scrollLeft:0,scrollTop:0},d=As(1);const h=As(0),m=zs(i);if((m||!m&&!r)&&((uu(i)!=="body"||Wf(a))&&(c=f0(i)),zs(i))){const v=Xo(i);d=_c(i),h.x=v.x+i.clientLeft,h.y=v.y+i.clientTop}const g=a&&!m&&!r?zE(a,c,!0):As(0);return{width:n.width*d.x,height:n.height*d.y,x:n.x*d.x-c.scrollLeft*d.x+h.x+g.x,y:n.y*d.y-c.scrollTop*d.y+h.y+g.y}}function CK(e){return Array.from(e.getClientRects())}function MK(e){const t=Gs(e),n=f0(e),i=e.ownerDocument.body,s=ai(t.scrollWidth,t.clientWidth,i.scrollWidth,i.clientWidth),r=ai(t.scrollHeight,t.clientHeight,i.scrollHeight,i.clientHeight);let a=-n.scrollLeft+v2(e);const o=-n.scrollTop;return os(i).direction==="rtl"&&(a+=ai(t.clientWidth,i.clientWidth)-s),{width:s,height:r,x:a,y:o}}function TK(e,t){const n=di(e),i=Gs(e),s=n.visualViewport;let r=i.clientWidth,a=i.clientHeight,o=0,c=0;if(s){r=s.width,a=s.height;const d=g2();(!d||d&&t==="fixed")&&(o=s.offsetLeft,c=s.offsetTop)}return{width:r,height:a,x:o,y:c}}function jK(e,t){const n=Xo(e,!0,t==="fixed"),i=n.top+e.clientTop,s=n.left+e.clientLeft,r=zs(e)?_c(e):As(1),a=e.clientWidth*r.x,o=e.clientHeight*r.y,c=s*r.x,d=i*r.y;return{width:a,height:o,x:c,y:d}}function GC(e,t,n){let i;if(t==="viewport")i=TK(e,n);else if(t==="document")i=MK(Gs(e));else if(as(t))i=jK(t,n);else{const s=LE(e);i={x:t.x-s.x,y:t.y-s.y,width:t.width,height:t.height}}return ep(i)}function IE(e,t){const n=Ba(e);return n===t||!as(n)||Wc(n)?!1:os(n).position==="fixed"||IE(n,t)}function NK(e,t){const n=t.get(e);if(n)return n;let i=_f(e,[],!1).filter(o=>as(o)&&uu(o)!=="body"),s=null;const r=os(e).position==="fixed";let a=r?Ba(e):e;for(;as(a)&&!Wc(a);){const o=os(a),c=m2(a);!c&&o.position==="fixed"&&(s=null),(r?!c&&!s:!c&&o.position==="static"&&!!s&&["absolute","fixed"].includes(s.position)||Wf(a)&&!c&&IE(e,a))?i=i.filter(h=>h!==a):s=o,a=Ba(a)}return t.set(e,i),i}function kK(e){let{element:t,boundary:n,rootBoundary:i,strategy:s}=e;const a=[...n==="clippingAncestors"?d0(t)?[]:NK(t,this._c):[].concat(n),i],o=a[0],c=a.reduce((d,h)=>{const m=GC(t,h,s);return d.top=ai(m.top,d.top),d.right=Ia(m.right,d.right),d.bottom=Ia(m.bottom,d.bottom),d.left=ai(m.left,d.left),d},GC(t,o,s));return{width:c.right-c.left,height:c.bottom-c.top,x:c.left,y:c.top}}function EK(e){const{width:t,height:n}=RE(e);return{width:t,height:n}}function AK(e,t,n){const i=zs(t),s=Gs(t),r=n==="fixed",a=Xo(e,!0,r,t);let o={scrollLeft:0,scrollTop:0};const c=As(0);function d(){c.x=v2(s)}if(i||!i&&!r)if((uu(t)!=="body"||Wf(s))&&(o=f0(t)),i){const v=Xo(t,!0,r,t);c.x=v.x+t.clientLeft,c.y=v.y+t.clientTop}else s&&d();r&&!i&&s&&d();const h=s&&!i&&!r?zE(s,o):As(0),m=a.left+o.scrollLeft-c.x-h.x,g=a.top+o.scrollTop-c.y-h.y;return{x:m,y:g,width:a.width,height:a.height}}function Iv(e){return os(e).position==="static"}function YC(e,t){if(!zs(e)||os(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return Gs(e)===n&&(n=n.ownerDocument.body),n}function BE(e,t){const n=di(e);if(d0(e))return n;if(!zs(e)){let s=Ba(e);for(;s&&!Wc(s);){if(as(s)&&!Iv(s))return s;s=Ba(s)}return n}let i=YC(e,t);for(;i&&yK(i)&&Iv(i);)i=YC(i,t);return i&&Wc(i)&&Iv(i)&&!m2(i)?n:i||_K(e)||n}const OK=async function(e){const t=this.getOffsetParent||BE,n=this.getDimensions,i=await n(e.floating);return{reference:AK(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:i.width,height:i.height}}};function DK(e){return os(e).direction==="rtl"}const PK={convertOffsetParentRelativeRectToViewportRelativeRect:SK,getDocumentElement:Gs,getClippingRect:kK,getOffsetParent:BE,getElementRects:OK,getClientRects:CK,getDimensions:EK,getScale:_c,isElement:as,isRTL:DK};function VE(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function RK(e,t){let n=null,i;const s=Gs(e);function r(){var o;clearTimeout(i),(o=n)==null||o.disconnect(),n=null}function a(o,c){o===void 0&&(o=!1),c===void 0&&(c=1),r();const d=e.getBoundingClientRect(),{left:h,top:m,width:g,height:v}=d;if(o||t(),!g||!v)return;const b=cm(m),w=cm(s.clientWidth-(h+g)),M=cm(s.clientHeight-(m+v)),y=cm(h),T={rootMargin:-b+"px "+-w+"px "+-M+"px "+-y+"px",threshold:ai(0,Ia(1,c))||1};let N=!0;function k(E){const D=E[0].intersectionRatio;if(D!==c){if(!N)return a();D?a(!1,D):i=setTimeout(()=>{a(!1,1e-7)},1e3)}D===1&&!VE(d,e.getBoundingClientRect())&&a(),N=!1}try{n=new IntersectionObserver(k,{...T,root:s.ownerDocument})}catch{n=new IntersectionObserver(k,T)}n.observe(e)}return a(!0),r}function LK(e,t,n,i){i===void 0&&(i={});const{ancestorScroll:s=!0,ancestorResize:r=!0,elementResize:a=typeof ResizeObserver=="function",layoutShift:o=typeof IntersectionObserver=="function",animationFrame:c=!1}=i,d=p2(e),h=s||r?[...d?_f(d):[],..._f(t)]:[];h.forEach(y=>{s&&y.addEventListener("scroll",n,{passive:!0}),r&&y.addEventListener("resize",n)});const m=d&&o?RK(d,n):null;let g=-1,v=null;a&&(v=new ResizeObserver(y=>{let[S]=y;S&&S.target===d&&v&&(v.unobserve(t),cancelAnimationFrame(g),g=requestAnimationFrame(()=>{var T;(T=v)==null||T.observe(t)})),n()}),d&&!c&&v.observe(d),v.observe(t));let b,w=c?Xo(e):null;c&&M();function M(){const y=Xo(e);w&&!VE(w,y)&&n(),w=y,b=requestAnimationFrame(M)}return n(),()=>{var y;h.forEach(S=>{s&&S.removeEventListener("scroll",n),r&&S.removeEventListener("resize",n)}),m==null||m(),(y=v)==null||y.disconnect(),v=null,c&&cancelAnimationFrame(b)}}const zK=gK,IK=pK,BK=fK,VK=xK,HK=hK,qC=dK,FK=vK,UK=(e,t,n)=>{const i=new Map,s={platform:PK,...n},r={...s.platform,_c:i};return uK(e,t,{...s,platform:r})};var Um=typeof document<"u"?x.useLayoutEffect:x.useEffect;function tp(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,i,s;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(i=n;i--!==0;)if(!tp(e[i],t[i]))return!1;return!0}if(s=Object.keys(e),n=s.length,n!==Object.keys(t).length)return!1;for(i=n;i--!==0;)if(!{}.hasOwnProperty.call(t,s[i]))return!1;for(i=n;i--!==0;){const r=s[i];if(!(r==="_owner"&&e.$$typeof)&&!tp(e[r],t[r]))return!1}return!0}return e!==e&&t!==t}function HE(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function XC(e,t){const n=HE(e);return Math.round(t*n)/n}function Bv(e){const t=x.useRef(e);return Um(()=>{t.current=e}),t}function ZK(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:i=[],platform:s,elements:{reference:r,floating:a}={},transform:o=!0,whileElementsMounted:c,open:d}=e,[h,m]=x.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[g,v]=x.useState(i);tp(g,i)||v(i);const[b,w]=x.useState(null),[M,y]=x.useState(null),S=x.useCallback(B=>{B!==E.current&&(E.current=B,w(B))},[]),T=x.useCallback(B=>{B!==D.current&&(D.current=B,y(B))},[]),N=r||b,k=a||M,E=x.useRef(null),D=x.useRef(null),O=x.useRef(h),I=c!=null,P=Bv(c),H=Bv(s),V=Bv(d),J=x.useCallback(()=>{if(!E.current||!D.current)return;const B={placement:t,strategy:n,middleware:g};H.current&&(B.platform=H.current),UK(E.current,D.current,B).then(W=>{const G={...W,isPositioned:V.current!==!1};Q.current&&!tp(O.current,G)&&(O.current=G,Nf.flushSync(()=>{m(G)}))})},[g,t,n,H,V]);Um(()=>{d===!1&&O.current.isPositioned&&(O.current.isPositioned=!1,m(B=>({...B,isPositioned:!1})))},[d]);const Q=x.useRef(!1);Um(()=>(Q.current=!0,()=>{Q.current=!1}),[]),Um(()=>{if(N&&(E.current=N),k&&(D.current=k),N&&k){if(P.current)return P.current(N,k,J);J()}},[N,k,J,P,I]);const U=x.useMemo(()=>({reference:E,floating:D,setReference:S,setFloating:T}),[S,T]),R=x.useMemo(()=>({reference:N,floating:k}),[N,k]),$=x.useMemo(()=>{const B={position:n,left:0,top:0};if(!R.floating)return B;const W=XC(R.floating,h.x),G=XC(R.floating,h.y);return o?{...B,transform:"translate("+W+"px, "+G+"px)",...HE(R.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:W,top:G}},[n,o,R.floating,h.x,h.y]);return x.useMemo(()=>({...h,update:J,refs:U,elements:R,floatingStyles:$}),[h,J,U,R,$])}const $K=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:i,padding:s}=typeof e=="function"?e(n):e;return i&&t(i)?i.current!=null?qC({element:i.current,padding:s}).fn(n):{}:i?qC({element:i,padding:s}).fn(n):{}}}},WK=(e,t)=>({...zK(e),options:[e,t]}),GK=(e,t)=>({...IK(e),options:[e,t]}),YK=(e,t)=>({...FK(e),options:[e,t]}),qK=(e,t)=>({...BK(e),options:[e,t]}),XK=(e,t)=>({...VK(e),options:[e,t]}),KK=(e,t)=>({...HK(e),options:[e,t]}),QK=(e,t)=>({...$K(e),options:[e,t]});var JK="Arrow",FE=x.forwardRef((e,t)=>{const{children:n,width:i=10,height:s=5,...r}=e;return u.jsx(Te.svg,{...r,ref:t,width:i,height:s,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:u.jsx("polygon",{points:"0,0 30,0 15,10"})})});FE.displayName=JK;var eQ=FE;function x2(e){const[t,n]=x.useState(void 0);return Ls(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const i=new ResizeObserver(s=>{if(!Array.isArray(s)||!s.length)return;const r=s[0];let a,o;if("borderBoxSize"in r){const c=r.borderBoxSize,d=Array.isArray(c)?c[0]:c;a=d.inlineSize,o=d.blockSize}else a=e.offsetWidth,o=e.offsetHeight;n({width:a,height:o})});return i.observe(e,{box:"border-box"}),()=>i.unobserve(e)}else n(void 0)},[e]),t}var y2="Popper",[UE,du]=vn(y2),[tQ,ZE]=UE(y2),$E=e=>{const{__scopePopper:t,children:n}=e,[i,s]=x.useState(null);return u.jsx(tQ,{scope:t,anchor:i,onAnchorChange:s,children:n})};$E.displayName=y2;var WE="PopperAnchor",GE=x.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:i,...s}=e,r=ZE(WE,n),a=x.useRef(null),o=qe(t,a);return x.useEffect(()=>{r.onAnchorChange((i==null?void 0:i.current)||a.current)}),i?null:u.jsx(Te.div,{...s,ref:o})});GE.displayName=WE;var _2="PopperContent",[nQ,iQ]=UE(_2),YE=x.forwardRef((e,t)=>{var Tt,F,re,le,ve,Ae;const{__scopePopper:n,side:i="bottom",sideOffset:s=0,align:r="center",alignOffset:a=0,arrowPadding:o=0,avoidCollisions:c=!0,collisionBoundary:d=[],collisionPadding:h=0,sticky:m="partial",hideWhenDetached:g=!1,updatePositionStrategy:v="optimized",onPlaced:b,...w}=e,M=ZE(_2,n),[y,S]=x.useState(null),T=qe(t,Re=>S(Re)),[N,k]=x.useState(null),E=x2(N),D=(E==null?void 0:E.width)??0,O=(E==null?void 0:E.height)??0,I=i+(r!=="center"?"-"+r:""),P=typeof h=="number"?h:{top:0,right:0,bottom:0,left:0,...h},H=Array.isArray(d)?d:[d],V=H.length>0,J={padding:P,boundary:H.filter(rQ),altBoundary:V},{refs:Q,floatingStyles:U,placement:R,isPositioned:$,middlewareData:B}=ZK({strategy:"fixed",placement:I,whileElementsMounted:(...Re)=>LK(...Re,{animationFrame:v==="always"}),elements:{reference:M.anchor},middleware:[WK({mainAxis:s+O,alignmentAxis:a}),c&&GK({mainAxis:!0,crossAxis:!1,limiter:m==="partial"?YK():void 0,...J}),c&&qK({...J}),XK({...J,apply:({elements:Re,rects:at,availableWidth:At,availableHeight:xn})=>{const{width:Je,height:fe}=at.reference,Oe=Re.floating.style;Oe.setProperty("--radix-popper-available-width",`${At}px`),Oe.setProperty("--radix-popper-available-height",`${xn}px`),Oe.setProperty("--radix-popper-anchor-width",`${Je}px`),Oe.setProperty("--radix-popper-anchor-height",`${fe}px`)}}),N&&QK({element:N,padding:o}),aQ({arrowWidth:D,arrowHeight:O}),g&&KK({strategy:"referenceHidden",...J})]}),[W,G]=KE(R),ie=Tn(b);Ls(()=>{$&&(ie==null||ie())},[$,ie]);const se=(Tt=B.arrow)==null?void 0:Tt.x,Le=(F=B.arrow)==null?void 0:F.y,je=((re=B.arrow)==null?void 0:re.centerOffset)!==0,[be,we]=x.useState();return Ls(()=>{y&&we(window.getComputedStyle(y).zIndex)},[y]),u.jsx("div",{ref:Q.setFloating,"data-radix-popper-content-wrapper":"",style:{...U,transform:$?U.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:be,"--radix-popper-transform-origin":[(le=B.transformOrigin)==null?void 0:le.x,(ve=B.transformOrigin)==null?void 0:ve.y].join(" "),...((Ae=B.hide)==null?void 0:Ae.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:u.jsx(nQ,{scope:n,placedSide:W,onArrowChange:k,arrowX:se,arrowY:Le,shouldHideArrow:je,children:u.jsx(Te.div,{"data-side":W,"data-align":G,...w,ref:T,style:{...w.style,animation:$?void 0:"none"}})})})});YE.displayName=_2;var qE="PopperArrow",sQ={top:"bottom",right:"left",bottom:"top",left:"right"},XE=x.forwardRef(function(t,n){const{__scopePopper:i,...s}=t,r=iQ(qE,i),a=sQ[r.placedSide];return u.jsx("span",{ref:r.onArrowChange,style:{position:"absolute",left:r.arrowX,top:r.arrowY,[a]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[r.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[r.placedSide],visibility:r.shouldHideArrow?"hidden":void 0},children:u.jsx(eQ,{...s,ref:n,style:{...s.style,display:"block"}})})});XE.displayName=qE;function rQ(e){return e!==null}var aQ=e=>({name:"transformOrigin",options:e,fn(t){var M,y,S;const{placement:n,rects:i,middlewareData:s}=t,a=((M=s.arrow)==null?void 0:M.centerOffset)!==0,o=a?0:e.arrowWidth,c=a?0:e.arrowHeight,[d,h]=KE(n),m={start:"0%",center:"50%",end:"100%"}[h],g=(((y=s.arrow)==null?void 0:y.x)??0)+o/2,v=(((S=s.arrow)==null?void 0:S.y)??0)+c/2;let b="",w="";return d==="bottom"?(b=a?m:`${g}px`,w=`${-c}px`):d==="top"?(b=a?m:`${g}px`,w=`${i.floating.height+c}px`):d==="right"?(b=`${-c}px`,w=a?m:`${v}px`):d==="left"&&(b=`${i.floating.width+c}px`,w=a?m:`${v}px`),{data:{x:b,y:w}}}});function KE(e){const[t,n="center"]=e.split("-");return[t,n]}var b2=$E,h0=GE,w2=YE,S2=XE,m0="Popover",[QE,mae]=vn(m0,[du]),Gf=du(),[oQ,$a]=QE(m0),JE=e=>{const{__scopePopover:t,children:n,open:i,defaultOpen:s,onOpenChange:r,modal:a=!1}=e,o=Gf(t),c=x.useRef(null),[d,h]=x.useState(!1),[m,g]=ti({prop:i,defaultProp:s??!1,onChange:r,caller:m0});return u.jsx(b2,{...o,children:u.jsx(oQ,{scope:t,contentId:ns(),triggerRef:c,open:m,onOpenChange:g,onOpenToggle:x.useCallback(()=>g(v=>!v),[g]),hasCustomAnchor:d,onCustomAnchorAdd:x.useCallback(()=>h(!0),[]),onCustomAnchorRemove:x.useCallback(()=>h(!1),[]),modal:a,children:n})})};JE.displayName=m0;var eA="PopoverAnchor",lQ=x.forwardRef((e,t)=>{const{__scopePopover:n,...i}=e,s=$a(eA,n),r=Gf(n),{onCustomAnchorAdd:a,onCustomAnchorRemove:o}=s;return x.useEffect(()=>(a(),()=>o()),[a,o]),u.jsx(h0,{...r,...i,ref:t})});lQ.displayName=eA;var tA="PopoverTrigger",nA=x.forwardRef((e,t)=>{const{__scopePopover:n,...i}=e,s=$a(tA,n),r=Gf(n),a=qe(t,s.triggerRef),o=u.jsx(Te.button,{type:"button","aria-haspopup":"dialog","aria-expanded":s.open,"aria-controls":s.contentId,"data-state":oA(s.open),...i,ref:a,onClick:pe(e.onClick,s.onOpenToggle)});return s.hasCustomAnchor?o:u.jsx(h0,{asChild:!0,...r,children:o})});nA.displayName=tA;var C2="PopoverPortal",[cQ,uQ]=QE(C2,{forceMount:void 0}),iA=e=>{const{__scopePopover:t,forceMount:n,children:i,container:s}=e,r=$a(C2,t);return u.jsx(cQ,{scope:t,forceMount:n,children:u.jsx(nn,{present:n||r.open,children:u.jsx($f,{asChild:!0,container:s,children:i})})})};iA.displayName=C2;var Gc="PopoverContent",sA=x.forwardRef((e,t)=>{const n=uQ(Gc,e.__scopePopover),{forceMount:i=n.forceMount,...s}=e,r=$a(Gc,e.__scopePopover);return u.jsx(nn,{present:i||r.open,children:r.modal?u.jsx(fQ,{...s,ref:t}):u.jsx(hQ,{...s,ref:t})})});sA.displayName=Gc;var dQ=Yo("PopoverContent.RemoveScroll"),fQ=x.forwardRef((e,t)=>{const n=$a(Gc,e.__scopePopover),i=x.useRef(null),s=qe(t,i),r=x.useRef(!1);return x.useEffect(()=>{const a=i.current;if(a)return i2(a)},[]),u.jsx(r0,{as:dQ,allowPinchZoom:!0,children:u.jsx(rA,{...e,ref:s,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:pe(e.onCloseAutoFocus,a=>{var o;a.preventDefault(),r.current||(o=n.triggerRef.current)==null||o.focus()}),onPointerDownOutside:pe(e.onPointerDownOutside,a=>{const o=a.detail.originalEvent,c=o.button===0&&o.ctrlKey===!0,d=o.button===2||c;r.current=d},{checkForDefaultPrevented:!1}),onFocusOutside:pe(e.onFocusOutside,a=>a.preventDefault(),{checkForDefaultPrevented:!1})})})}),hQ=x.forwardRef((e,t)=>{const n=$a(Gc,e.__scopePopover),i=x.useRef(!1),s=x.useRef(!1);return u.jsx(rA,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:r=>{var a,o;(a=e.onCloseAutoFocus)==null||a.call(e,r),r.defaultPrevented||(i.current||(o=n.triggerRef.current)==null||o.focus(),r.preventDefault()),i.current=!1,s.current=!1},onInteractOutside:r=>{var c,d;(c=e.onInteractOutside)==null||c.call(e,r),r.defaultPrevented||(i.current=!0,r.detail.originalEvent.type==="pointerdown"&&(s.current=!0));const a=r.target;((d=n.triggerRef.current)==null?void 0:d.contains(a))&&r.preventDefault(),r.detail.originalEvent.type==="focusin"&&s.current&&r.preventDefault()}})}),rA=x.forwardRef((e,t)=>{const{__scopePopover:n,trapFocus:i,onOpenAutoFocus:s,onCloseAutoFocus:r,disableOutsidePointerEvents:a,onEscapeKeyDown:o,onPointerDownOutside:c,onFocusOutside:d,onInteractOutside:h,...m}=e,g=$a(Gc,n),v=Gf(n);return n2(),u.jsx(i0,{asChild:!0,loop:!0,trapped:i,onMountAutoFocus:s,onUnmountAutoFocus:r,children:u.jsx(Zf,{asChild:!0,disableOutsidePointerEvents:a,onInteractOutside:h,onEscapeKeyDown:o,onPointerDownOutside:c,onFocusOutside:d,onDismiss:()=>g.onOpenChange(!1),children:u.jsx(w2,{"data-state":oA(g.open),role:"dialog",id:g.contentId,...v,...m,ref:t,style:{...m.style,"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-popover-content-available-width":"var(--radix-popper-available-width)","--radix-popover-content-available-height":"var(--radix-popper-available-height)","--radix-popover-trigger-width":"var(--radix-popper-anchor-width)","--radix-popover-trigger-height":"var(--radix-popper-anchor-height)"}})})})}),aA="PopoverClose",mQ=x.forwardRef((e,t)=>{const{__scopePopover:n,...i}=e,s=$a(aA,n);return u.jsx(Te.button,{type:"button",...i,ref:t,onClick:pe(e.onClick,()=>s.onOpenChange(!1))})});mQ.displayName=aA;var gQ="PopoverArrow",pQ=x.forwardRef((e,t)=>{const{__scopePopover:n,...i}=e,s=Gf(n);return u.jsx(S2,{...s,...i,ref:t})});pQ.displayName=gQ;function oA(e){return e?"open":"closed"}var vQ=JE,xQ=nA,yQ=iA,_Q=sA;function M2({...e}){return u.jsx(vQ,{"data-slot":"popover",...e})}function T2({...e}){return u.jsx(xQ,{"data-slot":"popover-trigger",...e})}function j2({className:e,align:t="center",sideOffset:n=4,...i}){return u.jsx(yQ,{children:u.jsx(_Q,{"data-slot":"popover-content",align:t,sideOffset:n,className:ye("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-72 origin-(--radix-popover-content-transform-origin) rounded-md border p-4 shadow-md outline-hidden",e),...i})})}var lA="AlertDialog",[bQ,gae]=vn(lA,[Fk]),Ir=Fk(),cA=e=>{const{__scopeAlertDialog:t,...n}=e,i=Ir(t);return u.jsx(sE,{...i,...n,modal:!0})};cA.displayName=lA;var wQ="AlertDialogTrigger",uA=x.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...i}=e,s=Ir(n);return u.jsx(rE,{...s,...i,ref:t})});uA.displayName=wQ;var SQ="AlertDialogPortal",dA=e=>{const{__scopeAlertDialog:t,...n}=e,i=Ir(t);return u.jsx(aE,{...i,...n})};dA.displayName=SQ;var CQ="AlertDialogOverlay",fA=x.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...i}=e,s=Ir(n);return u.jsx(oE,{...s,...i,ref:t})});fA.displayName=CQ;var bc="AlertDialogContent",[MQ,TQ]=bQ(bc),jQ=bk("AlertDialogContent"),hA=x.forwardRef((e,t)=>{const{__scopeAlertDialog:n,children:i,...s}=e,r=Ir(n),a=x.useRef(null),o=qe(t,a),c=x.useRef(null);return u.jsx(uX,{contentName:bc,titleName:mA,docsSlug:"alert-dialog",children:u.jsx(MQ,{scope:n,cancelRef:c,children:u.jsxs(lE,{role:"alertdialog",...r,...s,ref:o,onOpenAutoFocus:pe(s.onOpenAutoFocus,d=>{var h;d.preventDefault(),(h=c.current)==null||h.focus({preventScroll:!0})}),onPointerDownOutside:d=>d.preventDefault(),onInteractOutside:d=>d.preventDefault(),children:[u.jsx(jQ,{children:i}),u.jsx(kQ,{contentRef:a})]})})})});hA.displayName=bc;var mA="AlertDialogTitle",gA=x.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...i}=e,s=Ir(n);return u.jsx(cE,{...s,...i,ref:t})});gA.displayName=mA;var pA="AlertDialogDescription",vA=x.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...i}=e,s=Ir(n);return u.jsx(uE,{...s,...i,ref:t})});vA.displayName=pA;var NQ="AlertDialogAction",xA=x.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...i}=e,s=Ir(n);return u.jsx(o0,{...s,...i,ref:t})});xA.displayName=NQ;var yA="AlertDialogCancel",_A=x.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...i}=e,{cancelRef:s}=TQ(yA,n),r=Ir(n),a=qe(t,s);return u.jsx(o0,{...r,...i,ref:a})});_A.displayName=yA;var kQ=({contentRef:e})=>{const t=`\`${bc}\` requires a description for the component to be accessible for screen reader users.

You can add a description to the \`${bc}\` by passing a \`${pA}\` component as a child, which also benefits sighted users by adding visible context to the dialog.

Alternatively, you can use your own component as a description by assigning it an \`id\` and passing the same value to the \`aria-describedby\` prop in \`${bc}\`. If the description is confusing or duplicative for sighted users, you can use the \`@radix-ui/react-visually-hidden\` primitive as a wrapper around your description component.

For more information, see https://radix-ui.com/primitives/docs/components/alert-dialog`;return x.useEffect(()=>{var i;document.getElementById((i=e.current)==null?void 0:i.getAttribute("aria-describedby"))||console.warn(t)},[t,e]),null},EQ=cA,AQ=uA,OQ=dA,DQ=fA,PQ=hA,RQ=xA,LQ=_A,zQ=gA,IQ=vA;function Is({...e}){return u.jsx(EQ,{"data-slot":"alert-dialog",...e})}function np({...e}){return u.jsx(AQ,{"data-slot":"alert-dialog-trigger",...e})}function BQ({...e}){return u.jsx(OQ,{"data-slot":"alert-dialog-portal",...e})}function VQ({className:e,...t}){return u.jsx(DQ,{"data-slot":"alert-dialog-overlay",className:ye("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t})}function Bs({className:e,...t}){return u.jsxs(BQ,{children:[u.jsx(VQ,{}),u.jsx(PQ,{"data-slot":"alert-dialog-content",className:ye("fixed left-[50%] top-[50%] z-50 grid w-fit max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",e),...t})]})}function Ko({className:e,...t}){return u.jsx("div",{"data-slot":"alert-dialog-header",className:ye("flex flex-col space-y-2 text-center sm:text-left",e),...t})}function Vs({className:e,...t}){return u.jsx("div",{"data-slot":"alert-dialog-footer",className:ye("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t})}function Hs({className:e,...t}){return u.jsx(zQ,{"data-slot":"alert-dialog-title",className:ye("text-lg font-semibold",e),...t})}function Fs({className:e,...t}){return u.jsx(IQ,{"data-slot":"alert-dialog-description",className:ye("text-muted-foreground text-xs",e),...t})}function Va({className:e,...t}){return u.jsx(RQ,{className:ye(t2(),e),...t})}function Us({className:e,...t}){return u.jsx(LQ,{className:ye(t2({variant:"outline"}),"mt-2 sm:mt-0",e),...t})}const HQ=()=>{var O,I;const e=x.useContext(Un),[t,n]=x.useState([]),[i,s]=x.useState(null),[r,a]=x.useState(!1),[o,c]=x.useState(null),[d,h]=x.useState([]),[m,g]=x.useState(null),v=async()=>{const P=await K("get_members",{gangId:e.gangId,page:1});return n(P),!0},b=async()=>{let P=await K("get_roles",{gangId:e.gangId});P=P.sort((H,V)=>H.grade-V.grade),h(P)},w=async()=>{let P=await K("get_my_role_id",{gangId:e.gangId});c(P)};x.useEffect(()=>{e!=null&&e.gangId&&(b(),v(),w())},[e==null?void 0:e.gangId]);const M=P=>d.find(H=>H.role_id===P),y=()=>o!==null?M(o):null,S=({member:P})=>{const H=y(),V=M(P.role_id);return u.jsx(de.div,{className:"fixed inset-0 flex items-center justify-center w-screen h-screen z-[999] bg-black/80",initial:{opacity:0},animate:{opacity:1},transition:{duration:.2},onClick:()=>s(null),children:u.jsxs("div",{className:"flex flex-col gap-2 border border-border bg-background rounded-lg p-3 z-[1000] max-h-60 w-64 overflow-y-auto",onClick:J=>J.stopPropagation(),children:[u.jsx("div",{className:"text-lg font-semibold text-foreground",children:C("menu.change_role")}),d.length>0?d.map(J=>{if(J.grade===0)return null;const Q=(H==null?void 0:H.grade)===0||H&&V&&H.grade<V.grade&&H.grade<J.grade;return J.grade===0&&(H==null?void 0:H.grade)!==0?null:u.jsxs("div",{className:`text-sm flex items-center justify-between rounded-md p-2 gap-1 border border-border transition-colors
                                        ${P.role_id===J.role_id?"bg-primary/20 text-primary border-primary":"bg-card hover:bg-muted"}
                                        ${Q?"cursor-pointer":"opacity-50 cursor-not-allowed"}`,onClick:()=>Q&&T(P,J),children:[u.jsxs("div",{className:"flex items-center gap-1",children:[P.role_id===J.role_id&&u.jsx(jG,{className:"text-primary"}),J.roleData.label]}),!Q&&u.jsx(t0,{className:"text-muted-foreground"})]},J.role_id)}):u.jsx("p",{className:"text-muted-foreground text-sm",children:C("menu.no_roles")})]})})},T=async(P,H)=>{if(!H)return;await K("change_role",{gangId:e.gangId,identifier:P.identifier,roleId:H.role_id})&&(v(),s(null))},N=P=>{(P==null?void 0:P.id)!==void 0&&K("recruit_player",{gangId:e.gangId,playerId:P.id})},k=async P=>{await K("fire_member",{gangId:e.gangId,identifier:P.identifier})&&v()},E=y(),D=((I=(O=E==null?void 0:E.roleData)==null?void 0:O.permissions)==null?void 0:I.recruit)||(E==null?void 0:E.grade)===0;return u.jsxs(u.Fragment,{children:[r&&u.jsx(xf,{actionClicked:(P,H)=>{P==="confirm"&&N(H),a(!1)}}),m&&u.jsx(Is,{open:!!m,onOpenChange:P=>!P&&g(null),children:u.jsxs(Bs,{children:[u.jsx(Hs,{children:C("menu.fire_member")}),u.jsx(Fs,{children:C("menu.fire_member_desc",[["name",m.name]])}),u.jsxs(Vs,{children:[u.jsx(Us,{onClick:()=>g(null),children:C("cancel")}),u.jsx(np,{children:u.jsx(ne,{variant:"destructive",onClick:()=>{k(m),g(null)},children:C("confirm")})})]})]})}),u.jsxs(de.div,{className:"relative top-[5vh] w-[90%] left-[5%] h-[calc(90%-2.5rem)] flex flex-col md:flex-row rounded-lg gap-4",initial:{opacity:0},animate:{opacity:1},transition:{duration:.2},children:[u.jsxs("div",{className:"w-full md:w-3/5 lg:w-2/3 rounded-lg flex flex-col items-center p-4 bg-card border border-border h-full",children:[u.jsxs(de.div,{className:"grid grid-cols-[auto_1fr_auto] md:grid-cols-3 items-center w-full p-2 text-sm font-semibold text-muted-foreground border-b border-border sticky top-0 bg-card z-10",children:[u.jsx("div",{children:C("menu.name")}),u.jsx("div",{className:"text-center hidden md:block",children:C("menu.role")}),u.jsx("div",{className:"text-right",children:C("menu.joined")})]}),u.jsx("div",{className:"h-full max-h-full w-full flex flex-col items-center overflow-y-auto",children:t.length>0?t.map((P,H)=>{const V=M(P.role_id),J=E&&V&&(E.grade===0||E.grade<V.grade)||!V;return u.jsxs(de.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},transition:{duration:.2,delay:.05*H},className:"grid grid-cols-3 items-center w-full p-3 text-sm border-b border-border/50 last:border-b-0",children:[u.jsxs("div",{className:"relative flex items-center gap-2 group",children:[P.name,P.role_id!==0&&J&&u.jsxs(M2,{children:[u.jsx(T2,{children:u.jsx(UG,{className:"text-lg cursor-pointer text-muted-foreground hover:text-foreground transition-colors"})}),u.jsxs(j2,{className:"w-fit flex flex-col gap-1 p-2",children:[u.jsx("div",{className:"text-xs font-semibold text-foreground",children:C("menu.actions")}),u.jsx(ne,{size:"sm",variant:"outline",className:"p-0 m-0",onClick:()=>s(H),children:C("menu.change_role")}),u.jsx(ne,{size:"sm",variant:"destructive",onClick:()=>g(P),children:C("menu.fire_member")})]})]})]}),u.jsx("div",{className:"hidden md:flex justify-center items-center text-xs px-2 py-1 rounded-full whitespace-nowrap",children:V?V.roleData.label:C("menu.no_role")}),u.jsx("div",{className:"text-right text-xs text-muted-foreground",children:P.role_id===0?C("menu.since_start"):ol(new Date(P.joined))})]},P.identifier||H)}):u.jsx(de.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},transition:{duration:.2},className:"flex justify-center items-center h-full text-muted-foreground",children:C("menu.no_members_found")})}),i!==null&&t[i]&&u.jsx(S,{member:t[i]})]}),u.jsx("div",{className:"w-full md:w-2/5 lg:w-1/3 h-auto md:h-full flex flex-col items-center gap-4",children:D&&u.jsx("button",{type:"button",className:"w-full md:w-3/4 p-3 text-sm bg-card border border-border rounded-lg text-center cursor-pointer transition-colors hover:bg-muted text-foreground",onClick:()=>a(!0),children:C("menu.recruit_new_member")})})]})]})};var FQ="Label",bA=x.forwardRef((e,t)=>u.jsx(Te.label,{...e,ref:t,onMouseDown:n=>{var s;n.target.closest("button, input, select, textarea")||((s=e.onMouseDown)==null||s.call(e,n),!n.defaultPrevented&&n.detail>1&&n.preventDefault())}}));bA.displayName=FQ;var UQ=bA;function g0({className:e,...t}){return u.jsx(UQ,{"data-slot":"label",className:ye("flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50",e),...t})}function wA(e){const t=x.useRef({value:e,previous:e});return x.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}var p0="Switch",[ZQ,pae]=vn(p0),[$Q,WQ]=ZQ(p0),SA=x.forwardRef((e,t)=>{const{__scopeSwitch:n,name:i,checked:s,defaultChecked:r,required:a,disabled:o,value:c="on",onCheckedChange:d,form:h,...m}=e,[g,v]=x.useState(null),b=qe(t,T=>v(T)),w=x.useRef(!1),M=g?h||!!g.closest("form"):!0,[y,S]=ti({prop:s,defaultProp:r??!1,onChange:d,caller:p0});return u.jsxs($Q,{scope:n,checked:y,disabled:o,children:[u.jsx(Te.button,{type:"button",role:"switch","aria-checked":y,"aria-required":a,"data-state":jA(y),"data-disabled":o?"":void 0,disabled:o,value:c,...m,ref:b,onClick:pe(e.onClick,T=>{S(N=>!N),M&&(w.current=T.isPropagationStopped(),w.current||T.stopPropagation())})}),M&&u.jsx(TA,{control:g,bubbles:!w.current,name:i,value:c,checked:y,required:a,disabled:o,form:h,style:{transform:"translateX(-100%)"}})]})});SA.displayName=p0;var CA="SwitchThumb",MA=x.forwardRef((e,t)=>{const{__scopeSwitch:n,...i}=e,s=WQ(CA,n);return u.jsx(Te.span,{"data-state":jA(s.checked),"data-disabled":s.disabled?"":void 0,...i,ref:t})});MA.displayName=CA;var GQ="SwitchBubbleInput",TA=x.forwardRef(({__scopeSwitch:e,control:t,checked:n,bubbles:i=!0,...s},r)=>{const a=x.useRef(null),o=qe(a,r),c=wA(n),d=x2(t);return x.useEffect(()=>{const h=a.current;if(!h)return;const m=window.HTMLInputElement.prototype,v=Object.getOwnPropertyDescriptor(m,"checked").set;if(c!==n&&v){const b=new Event("click",{bubbles:i});v.call(h,n),h.dispatchEvent(b)}},[c,n,i]),u.jsx("input",{type:"checkbox","aria-hidden":!0,defaultChecked:n,...s,tabIndex:-1,ref:o,style:{...s.style,...d,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});TA.displayName=GQ;function jA(e){return e?"checked":"unchecked"}var YQ=SA,qQ=MA;function NA({className:e,...t}){return u.jsx(YQ,{"data-slot":"switch",className:ye("peer data-[state=checked]:bg-primary data-[state=unchecked]:bg-input focus-visible:border-ring focus-visible:ring-ring/50 dark:data-[state=unchecked]:bg-input/80 inline-flex h-[1.15rem] w-8 shrink-0 items-center rounded-full border border-transparent shadow-xs transition-all outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50",e),...t,children:u.jsx(qQ,{"data-slot":"switch-thumb",className:ye("bg-background dark:data-[state=unchecked]:bg-foreground dark:data-[state=checked]:bg-primary-foreground pointer-events-none block size-4 rounded-full ring-0 transition-transform data-[state=checked]:translate-x-[calc(100%-2px)] data-[state=unchecked]:translate-x-0")})})}const xa=({className:e,label:t,checked:n,onChange:i,disabled:s=!1,switchId:r})=>{const a=r||`toggle-switch-${t.replace(/\s+/g,"-").toLowerCase()}`;return u.jsxs("div",{className:`flex items-center justify-between ${e}`,children:[" ",u.jsx(g0,{htmlFor:a,className:"text-sm text-foreground",children:C(t)}),u.jsx(NA,{id:a,checked:n,onCheckedChange:i,disabled:s})]})},XQ=()=>{const e=x.useContext(Un),[t,n]=x.useState(99),[i,s]=x.useState([]),[r,a]=x.useState(0),[o,c]=x.useState({recruit:!1,edit:!1,deposit:!1,withdraw:!1}),[d,h]=x.useState(""),m=async()=>{if(!(e!=null&&e.gangId))return;let E=await K("get_roles",{gangId:e.gangId});if(E.sort((D,O)=>D.grade-O.grade),s(E),E.length>0){const D=E[r];D?(c({recruit:D.roleData.permissions.recruit,edit:D.roleData.permissions.edit,deposit:D.roleData.permissions.deposit,withdraw:D.roleData.permissions.withdraw}),h(D.roleData.label)):a(0)}else a(-1),c({recruit:!1,edit:!1,deposit:!1,withdraw:!1}),h("")},g=async()=>{if(!(e!=null&&e.gangId))return;let E=await K("get_my_grade",{gangId:e.gangId});n(E)};x.useEffect(()=>{e!=null&&e.isOwner?n(0):g(),m()},[e==null?void 0:e.gangId,e==null?void 0:e.isOwner]),x.useEffect(()=>{if(i.length>0&&r>=0&&i[r]){const E=i[r];c({recruit:E.roleData.permissions.recruit,edit:E.roleData.permissions.edit,deposit:E.roleData.permissions.deposit,withdraw:E.roleData.permissions.withdraw}),h(E.roleData.label)}else(i.length===0||r<0)&&(c({recruit:!1,edit:!1,deposit:!1,withdraw:!1}),h(""))},[r,i]);const v=(E,D)=>{const O=i[r];(t===0||O&&t<O.grade)&&c(I=>({...I,[E]:D}))},b=E=>{const D=i[r];(t===0||D&&t<D.grade||D&&D.newRole)&&h(E.target.value)},w=async(E,D)=>{const O=i[D];t!==0&&(t>=O.grade||E==="promote"&&t>=O.grade-1||E==="demote"&&t>=O.grade+1)||(E==="promote"?await K("promote_role",{gangId:e.gangId,roleId:O.role_id}):E==="demote"&&await K("demote_role",{gangId:e.gangId,roleId:O.role_id}),m())},M=async()=>{const E=i[r];t!==0&&(t>=E.grade||E.grade===0)||(await K("delete_role",{gangId:e.gangId,roleId:E.role_id}),a(0),m())},y=E=>{var D;if((D=i[r])!=null&&D.newRole&&E!==r){const O=i.filter(I=>!I.newRole);s(O),E>=O.length&&O.length>0?a(O.length-1):O.length===0&&a(-1)}a(E)},S=x.useCallback(()=>{const E=i.filter(I=>!I.newRole),D=E.reduce((I,P)=>Math.max(I,P.grade),0),O={roleData:{label:C("menu.new_role")||"New Role",permissions:{recruit:!1,edit:!1,deposit:!1,withdraw:!1}},newRole:!0,grade:D+1};s([...E,O]),a(E.length)},[i,C]),T=async()=>{if(r<0||!i[r])return;const E=i[r];d.trim()&&(E.newRole?await K("create_new_role",{roleData:{label:d,permissions:o},gangId:e.gangId,grade:E.grade}):await K("save_role",{gangId:e.gangId,roleId:E.role_id,roleData:{label:d,permissions:o}}),m())},N=i[r],k=N&&(t===0||t<N.grade||N.newRole);return u.jsxs("div",{className:"flex flex-row items-start justify-center relative w-[80%] left-[10%] h-full text-foreground p-4 py-6 gap-0",children:[u.jsxs("div",{className:"w-1/3 h-full overflow-y-auto flex border-r flex-col p-2 pr-4 gap-2",children:[u.jsxs("div",{className:"w-full flex flex-row items-center justify-between text-base font-bold mb-2",children:[C("menu.roles"),t===0&&u.jsx(xy,{className:"cursor-pointer text-xl hover:text-primary",onClick:S})]}),i.map((E,D)=>{var O;return u.jsxs("div",{className:`w-full p-2.5 rounded-lg transition-all cursor-pointer flex flex-row items-center justify-between border border-border
                            ${r===D?"bg-muted ":" hover:bg-muted/35"}`,onClick:()=>y(D),children:[u.jsxs("span",{className:"flex items-center gap-1.5 text-sm",children:[t!==0&&t>=E.grade&&E.grade!==0&&u.jsx(t0,{className:"text-muted-foreground"}),E.roleData.label]}),E.grade>0&&t===0&&u.jsxs("span",{className:"flex items-center gap-0.5",children:[u.jsx("button",{type:"button",title:C("menu.promote_role"),className:"p-1 rounded hover:bg-muted/70 disabled:opacity-50",onClick:I=>{I.stopPropagation(),w("promote",D)},disabled:D===0||((O=i[D-1])==null?void 0:O.grade)===0,children:u.jsx(TG,{})}),u.jsx("button",{type:"button",title:C("menu.demote_role"),className:"p-1 rounded hover:bg-muted/70 disabled:opacity-50",onClick:I=>{I.stopPropagation(),w("demote",D)},disabled:D===i.length-1,children:u.jsx(MG,{})})]})]},E.role_id||`new-role-${D}`)}),i.length===0&&u.jsx("p",{className:"text-muted-foreground text-sm",children:C("menu.no_roles_setup")})]}),N&&u.jsxs("div",{className:"w-2/3 h-full flex flex-col gap-5 pt-0 pl-4",children:[u.jsxs("div",{className:"w-full md:w-3/4",children:[u.jsx("label",{htmlFor:"roleName",className:"block text-sm font-semibold text-foreground mb-1",children:C("menu.edit_name")}),u.jsx("input",{id:"roleName",className:"w-full border  bg-background rounded-md px-3 py-2 text-sm text-center outline-none text-foreground placeholder:text-muted-foreground disabled:opacity-50 disabled:cursor-not-allowed",onChange:b,value:d,disabled:!k||N.grade===0})]}),u.jsxs("div",{className:"w-full md:w-3/4",children:[u.jsx("div",{className:"text-sm font-semibold text-foreground mb-2",children:C("menu.permissions")}),u.jsxs("div",{className:"space-y-3",children:[u.jsx(xa,{className:"flex items-center justify-between",label:"menu.edit_roles",checked:o.edit,onChange:E=>v("edit",E),disabled:!k||N.grade===0}),u.jsx(xa,{className:"flex items-center justify-between",label:"menu.recruit_members",checked:o.recruit,onChange:E=>v("recruit",E),disabled:!k||N.grade===0}),u.jsx(xa,{className:"flex items-center justify-between",label:"menu.deposit_money",checked:o.deposit,onChange:E=>v("deposit",E),disabled:!k||N.grade===0}),u.jsx(xa,{className:"flex items-center justify-between",label:"menu.withdraw_money",checked:o.withdraw,onChange:E=>v("withdraw",E),disabled:!k||N.grade===0})]})]}),k&&u.jsxs("div",{className:"w-full md:w-3/4 flex flex-row gap-2 mt-4",children:[u.jsx(ne,{type:"button",className:"flex-1 px-3 py-2 text-sm rounded-md bg-destructive text-destructive-foreground hover:bg-destructive/80",onClick:M,disabled:N.grade!==0&&!N.newRole&&t===0&&!k||N.grade==0,children:C("menu.delete")}),u.jsx(ne,{disabled:!k||N.grade==0,type:"button",className:"flex-1 px-3 py-2 text-sm rounded-md bg-green-400/50 text-white hover:bg-green-400/75 duration-200",onClick:T,children:C("menu.save")})]})]}),!N&&i.length>0&&u.jsx("div",{className:"w-full md:w-2/3 flex justify-center items-center h-full text-muted-foreground",children:C("menu.select_role_to_edit")})]})};function kA(e,t){const n=x.useRef(t);x.useEffect(function(){t!==n.current&&e.attributionControl!=null&&(n.current!=null&&e.attributionControl.removeAttribution(n.current),t!=null&&e.attributionControl.addAttribution(t)),n.current=t},[e,t])}const KQ=1;function QQ(e){return Object.freeze({__version:KQ,map:e})}function N2(e,t){return Object.freeze({...e,...t})}const EA=x.createContext(null),AA=EA.Provider;function v0(){const e=x.useContext(EA);if(e==null)throw new Error("No context provided: useLeafletContext() can only be used in a descendant of <MapContainer>");return e}function OA(e){function t(n,i){const{instance:s,context:r}=e(n).current;return x.useImperativeHandle(i,()=>s),n.children==null?null:ae.createElement(AA,{value:r},n.children)}return x.forwardRef(t)}function JQ(e){function t(n,i){const[s,r]=x.useState(!1),{instance:a}=e(n,r).current;x.useImperativeHandle(i,()=>a),x.useEffect(function(){s&&a.update()},[a,s,n.children]);const o=a._contentNode;return o?Nf.createPortal(n.children,o):null}return x.forwardRef(t)}function k2(e,t){const n=x.useRef();x.useEffect(function(){return t!=null&&e.instance.on(t),n.current=t,function(){n.current!=null&&e.instance.off(n.current),n.current=null}},[e,t])}function E2(e,t){const n=e.pane??t.pane;return n?{...e,pane:n}:e}function eJ(e,t){return function(i,s){const r=v0(),a=e(E2(i,r),r);return kA(r.map,i.attribution),k2(a.current,i.eventHandlers),t(a.current,r,i,s),a}}var jy={exports:{}};/* @preserve
 * Leaflet 1.9.4, a JS library for interactive maps. https://leafletjs.com
 * (c) 2010-2023 Vladimir Agafonkin, (c) 2010-2011 CloudMade
 */(function(e,t){(function(n,i){i(t)})(In,function(n){var i="1.9.4";function s(l){var f,p,_,j;for(p=1,_=arguments.length;p<_;p++){j=arguments[p];for(f in j)l[f]=j[f]}return l}var r=Object.create||function(){function l(){}return function(f){return l.prototype=f,new l}}();function a(l,f){var p=Array.prototype.slice;if(l.bind)return l.bind.apply(l,p.call(arguments,1));var _=p.call(arguments,2);return function(){return l.apply(f,_.length?_.concat(p.call(arguments)):arguments)}}var o=0;function c(l){return"_leaflet_id"in l||(l._leaflet_id=++o),l._leaflet_id}function d(l,f,p){var _,j,A,z;return z=function(){_=!1,j&&(A.apply(p,j),j=!1)},A=function(){_?j=arguments:(l.apply(p,arguments),setTimeout(z,f),_=!0)},A}function h(l,f,p){var _=f[1],j=f[0],A=_-j;return l===_&&p?l:((l-j)%A+A)%A+j}function m(){return!1}function g(l,f){if(f===!1)return l;var p=Math.pow(10,f===void 0?6:f);return Math.round(l*p)/p}function v(l){return l.trim?l.trim():l.replace(/^\s+|\s+$/g,"")}function b(l){return v(l).split(/\s+/)}function w(l,f){Object.prototype.hasOwnProperty.call(l,"options")||(l.options=l.options?r(l.options):{});for(var p in f)l.options[p]=f[p];return l.options}function M(l,f,p){var _=[];for(var j in l)_.push(encodeURIComponent(p?j.toUpperCase():j)+"="+encodeURIComponent(l[j]));return(!f||f.indexOf("?")===-1?"?":"&")+_.join("&")}var y=/\{ *([\w_ -]+) *\}/g;function S(l,f){return l.replace(y,function(p,_){var j=f[_];if(j===void 0)throw new Error("No value provided for variable "+p);return typeof j=="function"&&(j=j(f)),j})}var T=Array.isArray||function(l){return Object.prototype.toString.call(l)==="[object Array]"};function N(l,f){for(var p=0;p<l.length;p++)if(l[p]===f)return p;return-1}var k="data:image/gif;base64,R0lGODlhAQABAAD/ACwAAAAAAQABAAACADs=";function E(l){return window["webkit"+l]||window["moz"+l]||window["ms"+l]}var D=0;function O(l){var f=+new Date,p=Math.max(0,16-(f-D));return D=f+p,window.setTimeout(l,p)}var I=window.requestAnimationFrame||E("RequestAnimationFrame")||O,P=window.cancelAnimationFrame||E("CancelAnimationFrame")||E("CancelRequestAnimationFrame")||function(l){window.clearTimeout(l)};function H(l,f,p){if(p&&I===O)l.call(f);else return I.call(window,a(l,f))}function V(l){l&&P.call(window,l)}var J={__proto__:null,extend:s,create:r,bind:a,get lastId(){return o},stamp:c,throttle:d,wrapNum:h,falseFn:m,formatNum:g,trim:v,splitWords:b,setOptions:w,getParamString:M,template:S,isArray:T,indexOf:N,emptyImageUrl:k,requestFn:I,cancelFn:P,requestAnimFrame:H,cancelAnimFrame:V};function Q(){}Q.extend=function(l){var f=function(){w(this),this.initialize&&this.initialize.apply(this,arguments),this.callInitHooks()},p=f.__super__=this.prototype,_=r(p);_.constructor=f,f.prototype=_;for(var j in this)Object.prototype.hasOwnProperty.call(this,j)&&j!=="prototype"&&j!=="__super__"&&(f[j]=this[j]);return l.statics&&s(f,l.statics),l.includes&&(U(l.includes),s.apply(null,[_].concat(l.includes))),s(_,l),delete _.statics,delete _.includes,_.options&&(_.options=p.options?r(p.options):{},s(_.options,l.options)),_._initHooks=[],_.callInitHooks=function(){if(!this._initHooksCalled){p.callInitHooks&&p.callInitHooks.call(this),this._initHooksCalled=!0;for(var A=0,z=_._initHooks.length;A<z;A++)_._initHooks[A].call(this)}},f},Q.include=function(l){var f=this.prototype.options;return s(this.prototype,l),l.options&&(this.prototype.options=f,this.mergeOptions(l.options)),this},Q.mergeOptions=function(l){return s(this.prototype.options,l),this},Q.addInitHook=function(l){var f=Array.prototype.slice.call(arguments,1),p=typeof l=="function"?l:function(){this[l].apply(this,f)};return this.prototype._initHooks=this.prototype._initHooks||[],this.prototype._initHooks.push(p),this};function U(l){if(!(typeof L>"u"||!L||!L.Mixin)){l=T(l)?l:[l];for(var f=0;f<l.length;f++)l[f]===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 R={on:function(l,f,p){if(typeof l=="object")for(var _ in l)this._on(_,l[_],f);else{l=b(l);for(var j=0,A=l.length;j<A;j++)this._on(l[j],f,p)}return this},off:function(l,f,p){if(!arguments.length)delete this._events;else if(typeof l=="object")for(var _ in l)this._off(_,l[_],f);else{l=b(l);for(var j=arguments.length===1,A=0,z=l.length;A<z;A++)j?this._off(l[A]):this._off(l[A],f,p)}return this},_on:function(l,f,p,_){if(typeof f!="function"){console.warn("wrong listener type: "+typeof f);return}if(this._listens(l,f,p)===!1){p===this&&(p=void 0);var j={fn:f,ctx:p};_&&(j.once=!0),this._events=this._events||{},this._events[l]=this._events[l]||[],this._events[l].push(j)}},_off:function(l,f,p){var _,j,A;if(this._events&&(_=this._events[l],!!_)){if(arguments.length===1){if(this._firingCount)for(j=0,A=_.length;j<A;j++)_[j].fn=m;delete this._events[l];return}if(typeof f!="function"){console.warn("wrong listener type: "+typeof f);return}var z=this._listens(l,f,p);if(z!==!1){var Z=_[z];this._firingCount&&(Z.fn=m,this._events[l]=_=_.slice()),_.splice(z,1)}}},fire:function(l,f,p){if(!this.listens(l,p))return this;var _=s({},f,{type:l,target:this,sourceTarget:f&&f.sourceTarget||this});if(this._events){var j=this._events[l];if(j){this._firingCount=this._firingCount+1||1;for(var A=0,z=j.length;A<z;A++){var Z=j[A],Y=Z.fn;Z.once&&this.off(l,Y,Z.ctx),Y.call(Z.ctx||this,_)}this._firingCount--}}return p&&this._propagateEvent(_),this},listens:function(l,f,p,_){typeof l!="string"&&console.warn('"string" type argument expected');var j=f;typeof f!="function"&&(_=!!f,j=void 0,p=void 0);var A=this._events&&this._events[l];if(A&&A.length&&this._listens(l,j,p)!==!1)return!0;if(_){for(var z in this._eventParents)if(this._eventParents[z].listens(l,f,p,_))return!0}return!1},_listens:function(l,f,p){if(!this._events)return!1;var _=this._events[l]||[];if(!f)return!!_.length;p===this&&(p=void 0);for(var j=0,A=_.length;j<A;j++)if(_[j].fn===f&&_[j].ctx===p)return j;return!1},once:function(l,f,p){if(typeof l=="object")for(var _ in l)this._on(_,l[_],f,!0);else{l=b(l);for(var j=0,A=l.length;j<A;j++)this._on(l[j],f,p,!0)}return this},addEventParent:function(l){return this._eventParents=this._eventParents||{},this._eventParents[c(l)]=l,this},removeEventParent:function(l){return this._eventParents&&delete this._eventParents[c(l)],this},_propagateEvent:function(l){for(var f in this._eventParents)this._eventParents[f].fire(l.type,s({layer:l.target,propagatedFrom:l.target},l),!0)}};R.addEventListener=R.on,R.removeEventListener=R.clearAllEventListeners=R.off,R.addOneTimeEventListener=R.once,R.fireEvent=R.fire,R.hasEventListeners=R.listens;var $=Q.extend(R);function B(l,f,p){this.x=p?Math.round(l):l,this.y=p?Math.round(f):f}var W=Math.trunc||function(l){return l>0?Math.floor(l):Math.ceil(l)};B.prototype={clone:function(){return new B(this.x,this.y)},add:function(l){return this.clone()._add(G(l))},_add:function(l){return this.x+=l.x,this.y+=l.y,this},subtract:function(l){return this.clone()._subtract(G(l))},_subtract:function(l){return this.x-=l.x,this.y-=l.y,this},divideBy:function(l){return this.clone()._divideBy(l)},_divideBy:function(l){return this.x/=l,this.y/=l,this},multiplyBy:function(l){return this.clone()._multiplyBy(l)},_multiplyBy:function(l){return this.x*=l,this.y*=l,this},scaleBy:function(l){return new B(this.x*l.x,this.y*l.y)},unscaleBy:function(l){return new B(this.x/l.x,this.y/l.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=W(this.x),this.y=W(this.y),this},distanceTo:function(l){l=G(l);var f=l.x-this.x,p=l.y-this.y;return Math.sqrt(f*f+p*p)},equals:function(l){return l=G(l),l.x===this.x&&l.y===this.y},contains:function(l){return l=G(l),Math.abs(l.x)<=Math.abs(this.x)&&Math.abs(l.y)<=Math.abs(this.y)},toString:function(){return"Point("+g(this.x)+", "+g(this.y)+")"}};function G(l,f,p){return l instanceof B?l:T(l)?new B(l[0],l[1]):l==null?l:typeof l=="object"&&"x"in l&&"y"in l?new B(l.x,l.y):new B(l,f,p)}function ie(l,f){if(l)for(var p=f?[l,f]:l,_=0,j=p.length;_<j;_++)this.extend(p[_])}ie.prototype={extend:function(l){var f,p;if(!l)return this;if(l instanceof B||typeof l[0]=="number"||"x"in l)f=p=G(l);else if(l=se(l),f=l.min,p=l.max,!f||!p)return this;return!this.min&&!this.max?(this.min=f.clone(),this.max=p.clone()):(this.min.x=Math.min(f.x,this.min.x),this.max.x=Math.max(p.x,this.max.x),this.min.y=Math.min(f.y,this.min.y),this.max.y=Math.max(p.y,this.max.y)),this},getCenter:function(l){return G((this.min.x+this.max.x)/2,(this.min.y+this.max.y)/2,l)},getBottomLeft:function(){return G(this.min.x,this.max.y)},getTopRight:function(){return G(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(l){var f,p;return typeof l[0]=="number"||l instanceof B?l=G(l):l=se(l),l instanceof ie?(f=l.min,p=l.max):f=p=l,f.x>=this.min.x&&p.x<=this.max.x&&f.y>=this.min.y&&p.y<=this.max.y},intersects:function(l){l=se(l);var f=this.min,p=this.max,_=l.min,j=l.max,A=j.x>=f.x&&_.x<=p.x,z=j.y>=f.y&&_.y<=p.y;return A&&z},overlaps:function(l){l=se(l);var f=this.min,p=this.max,_=l.min,j=l.max,A=j.x>f.x&&_.x<p.x,z=j.y>f.y&&_.y<p.y;return A&&z},isValid:function(){return!!(this.min&&this.max)},pad:function(l){var f=this.min,p=this.max,_=Math.abs(f.x-p.x)*l,j=Math.abs(f.y-p.y)*l;return se(G(f.x-_,f.y-j),G(p.x+_,p.y+j))},equals:function(l){return l?(l=se(l),this.min.equals(l.getTopLeft())&&this.max.equals(l.getBottomRight())):!1}};function se(l,f){return!l||l instanceof ie?l:new ie(l,f)}function Le(l,f){if(l)for(var p=f?[l,f]:l,_=0,j=p.length;_<j;_++)this.extend(p[_])}Le.prototype={extend:function(l){var f=this._southWest,p=this._northEast,_,j;if(l instanceof be)_=l,j=l;else if(l instanceof Le){if(_=l._southWest,j=l._northEast,!_||!j)return this}else return l?this.extend(we(l)||je(l)):this;return!f&&!p?(this._southWest=new be(_.lat,_.lng),this._northEast=new be(j.lat,j.lng)):(f.lat=Math.min(_.lat,f.lat),f.lng=Math.min(_.lng,f.lng),p.lat=Math.max(j.lat,p.lat),p.lng=Math.max(j.lng,p.lng)),this},pad:function(l){var f=this._southWest,p=this._northEast,_=Math.abs(f.lat-p.lat)*l,j=Math.abs(f.lng-p.lng)*l;return new Le(new be(f.lat-_,f.lng-j),new be(p.lat+_,p.lng+j))},getCenter:function(){return new be((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 be(this.getNorth(),this.getWest())},getSouthEast:function(){return new be(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(l){typeof l[0]=="number"||l instanceof be||"lat"in l?l=we(l):l=je(l);var f=this._southWest,p=this._northEast,_,j;return l instanceof Le?(_=l.getSouthWest(),j=l.getNorthEast()):_=j=l,_.lat>=f.lat&&j.lat<=p.lat&&_.lng>=f.lng&&j.lng<=p.lng},intersects:function(l){l=je(l);var f=this._southWest,p=this._northEast,_=l.getSouthWest(),j=l.getNorthEast(),A=j.lat>=f.lat&&_.lat<=p.lat,z=j.lng>=f.lng&&_.lng<=p.lng;return A&&z},overlaps:function(l){l=je(l);var f=this._southWest,p=this._northEast,_=l.getSouthWest(),j=l.getNorthEast(),A=j.lat>f.lat&&_.lat<p.lat,z=j.lng>f.lng&&_.lng<p.lng;return A&&z},toBBoxString:function(){return[this.getWest(),this.getSouth(),this.getEast(),this.getNorth()].join(",")},equals:function(l,f){return l?(l=je(l),this._southWest.equals(l.getSouthWest(),f)&&this._northEast.equals(l.getNorthEast(),f)):!1},isValid:function(){return!!(this._southWest&&this._northEast)}};function je(l,f){return l instanceof Le?l:new Le(l,f)}function be(l,f,p){if(isNaN(l)||isNaN(f))throw new Error("Invalid LatLng object: ("+l+", "+f+")");this.lat=+l,this.lng=+f,p!==void 0&&(this.alt=+p)}be.prototype={equals:function(l,f){if(!l)return!1;l=we(l);var p=Math.max(Math.abs(this.lat-l.lat),Math.abs(this.lng-l.lng));return p<=(f===void 0?1e-9:f)},toString:function(l){return"LatLng("+g(this.lat,l)+", "+g(this.lng,l)+")"},distanceTo:function(l){return F.distance(this,we(l))},wrap:function(){return F.wrapLatLng(this)},toBounds:function(l){var f=180*l/40075017,p=f/Math.cos(Math.PI/180*this.lat);return je([this.lat-f,this.lng-p],[this.lat+f,this.lng+p])},clone:function(){return new be(this.lat,this.lng,this.alt)}};function we(l,f,p){return l instanceof be?l:T(l)&&typeof l[0]!="object"?l.length===3?new be(l[0],l[1],l[2]):l.length===2?new be(l[0],l[1]):null:l==null?l:typeof l=="object"&&"lat"in l?new be(l.lat,"lng"in l?l.lng:l.lon,l.alt):f===void 0?null:new be(l,f,p)}var Tt={latLngToPoint:function(l,f){var p=this.projection.project(l),_=this.scale(f);return this.transformation._transform(p,_)},pointToLatLng:function(l,f){var p=this.scale(f),_=this.transformation.untransform(l,p);return this.projection.unproject(_)},project:function(l){return this.projection.project(l)},unproject:function(l){return this.projection.unproject(l)},scale:function(l){return 256*Math.pow(2,l)},zoom:function(l){return Math.log(l/256)/Math.LN2},getProjectedBounds:function(l){if(this.infinite)return null;var f=this.projection.bounds,p=this.scale(l),_=this.transformation.transform(f.min,p),j=this.transformation.transform(f.max,p);return new ie(_,j)},infinite:!1,wrapLatLng:function(l){var f=this.wrapLng?h(l.lng,this.wrapLng,!0):l.lng,p=this.wrapLat?h(l.lat,this.wrapLat,!0):l.lat,_=l.alt;return new be(p,f,_)},wrapLatLngBounds:function(l){var f=l.getCenter(),p=this.wrapLatLng(f),_=f.lat-p.lat,j=f.lng-p.lng;if(_===0&&j===0)return l;var A=l.getSouthWest(),z=l.getNorthEast(),Z=new be(A.lat-_,A.lng-j),Y=new be(z.lat-_,z.lng-j);return new Le(Z,Y)}},F=s({},Tt,{wrapLng:[-180,180],R:6371e3,distance:function(l,f){var p=Math.PI/180,_=l.lat*p,j=f.lat*p,A=Math.sin((f.lat-l.lat)*p/2),z=Math.sin((f.lng-l.lng)*p/2),Z=A*A+Math.cos(_)*Math.cos(j)*z*z,Y=2*Math.atan2(Math.sqrt(Z),Math.sqrt(1-Z));return this.R*Y}}),re=6378137,le={R:re,MAX_LATITUDE:85.0511287798,project:function(l){var f=Math.PI/180,p=this.MAX_LATITUDE,_=Math.max(Math.min(p,l.lat),-p),j=Math.sin(_*f);return new B(this.R*l.lng*f,this.R*Math.log((1+j)/(1-j))/2)},unproject:function(l){var f=180/Math.PI;return new be((2*Math.atan(Math.exp(l.y/this.R))-Math.PI/2)*f,l.x*f/this.R)},bounds:function(){var l=re*Math.PI;return new ie([-l,-l],[l,l])}()};function ve(l,f,p,_){if(T(l)){this._a=l[0],this._b=l[1],this._c=l[2],this._d=l[3];return}this._a=l,this._b=f,this._c=p,this._d=_}ve.prototype={transform:function(l,f){return this._transform(l.clone(),f)},_transform:function(l,f){return f=f||1,l.x=f*(this._a*l.x+this._b),l.y=f*(this._c*l.y+this._d),l},untransform:function(l,f){return f=f||1,new B((l.x/f-this._b)/this._a,(l.y/f-this._d)/this._c)}};function Ae(l,f,p,_){return new ve(l,f,p,_)}var Re=s({},F,{code:"EPSG:3857",projection:le,transformation:function(){var l=.5/(Math.PI*le.R);return Ae(l,.5,-l,.5)}()}),at=s({},Re,{code:"EPSG:900913"});function At(l){return document.createElementNS("http://www.w3.org/2000/svg",l)}function xn(l,f){var p="",_,j,A,z,Z,Y;for(_=0,A=l.length;_<A;_++){for(Z=l[_],j=0,z=Z.length;j<z;j++)Y=Z[j],p+=(j?"L":"M")+Y.x+" "+Y.y;p+=f?_e.svg?"z":"x":""}return p||"M0 0"}var Je=document.documentElement.style,fe="ActiveXObject"in window,Oe=fe&&!document.addEventListener,Xe="msLaunchUri"in navigator&&!("documentMode"in document),tt=fs("webkit"),q=fs("android"),xe=fs("android 2")||fs("android 3"),ke=parseInt(/WebKit\/([0-9]+)|$/.exec(navigator.userAgent)[1],10),Ce=q&&fs("Google")&&ke<537&&!("AudioNode"in window),$e=!!window.opera,Hi=!Xe&&fs("chrome"),Br=fs("gecko")&&!tt&&!$e&&!fe,Ga=!Hi&&fs("safari"),Ya=fs("phantom"),hl="OTransition"in Je,$0=navigator.platform.indexOf("Win")===0,yu=fe&&"transition"in Je,ml="WebKitCSSMatrix"in window&&"m11"in new window.WebKitCSSMatrix&&!xe,sh="MozPerspective"in Je,W0=!window.L_DISABLE_3D&&(yu||ml||sh)&&!hl&&!Ya,_u=typeof orientation<"u"||fs("mobile"),dP=_u&&tt,fP=_u&&ml,hw=!window.PointerEvent&&window.MSPointerEvent,mw=!!(window.PointerEvent||hw),gw="ontouchstart"in window||!!window.TouchEvent,hP=!window.L_NO_TOUCH&&(gw||mw),mP=_u&&$e,gP=_u&&Br,pP=(window.devicePixelRatio||window.screen.deviceXDPI/window.screen.logicalXDPI)>1,vP=function(){var l=!1;try{var f=Object.defineProperty({},"passive",{get:function(){l=!0}});window.addEventListener("testPassiveEventSupport",m,f),window.removeEventListener("testPassiveEventSupport",m,f)}catch{}return l}(),xP=function(){return!!document.createElement("canvas").getContext}(),G0=!!(document.createElementNS&&At("svg").createSVGRect),yP=!!G0&&function(){var l=document.createElement("div");return l.innerHTML="<svg/>",(l.firstChild&&l.firstChild.namespaceURI)==="http://www.w3.org/2000/svg"}(),_P=!G0&&function(){try{var l=document.createElement("div");l.innerHTML='<v:shape adj="1"/>';var f=l.firstChild;return f.style.behavior="url(#default#VML)",f&&typeof f.adj=="object"}catch{return!1}}(),bP=navigator.platform.indexOf("Mac")===0,wP=navigator.platform.indexOf("Linux")===0;function fs(l){return navigator.userAgent.toLowerCase().indexOf(l)>=0}var _e={ie:fe,ielt9:Oe,edge:Xe,webkit:tt,android:q,android23:xe,androidStock:Ce,opera:$e,chrome:Hi,gecko:Br,safari:Ga,phantom:Ya,opera12:hl,win:$0,ie3d:yu,webkit3d:ml,gecko3d:sh,any3d:W0,mobile:_u,mobileWebkit:dP,mobileWebkit3d:fP,msPointer:hw,pointer:mw,touch:hP,touchNative:gw,mobileOpera:mP,mobileGecko:gP,retina:pP,passiveEvents:vP,canvas:xP,svg:G0,vml:_P,inlineSvg:yP,mac:bP,linux:wP},pw=_e.msPointer?"MSPointerDown":"pointerdown",vw=_e.msPointer?"MSPointerMove":"pointermove",xw=_e.msPointer?"MSPointerUp":"pointerup",yw=_e.msPointer?"MSPointerCancel":"pointercancel",Y0={touchstart:pw,touchmove:vw,touchend:xw,touchcancel:yw},_w={touchstart:NP,touchmove:rh,touchend:rh,touchcancel:rh},gl={},bw=!1;function SP(l,f,p){return f==="touchstart"&&jP(),_w[f]?(p=_w[f].bind(this,p),l.addEventListener(Y0[f],p,!1),p):(console.warn("wrong event specified:",f),m)}function CP(l,f,p){if(!Y0[f]){console.warn("wrong event specified:",f);return}l.removeEventListener(Y0[f],p,!1)}function MP(l){gl[l.pointerId]=l}function TP(l){gl[l.pointerId]&&(gl[l.pointerId]=l)}function ww(l){delete gl[l.pointerId]}function jP(){bw||(document.addEventListener(pw,MP,!0),document.addEventListener(vw,TP,!0),document.addEventListener(xw,ww,!0),document.addEventListener(yw,ww,!0),bw=!0)}function rh(l,f){if(f.pointerType!==(f.MSPOINTER_TYPE_MOUSE||"mouse")){f.touches=[];for(var p in gl)f.touches.push(gl[p]);f.changedTouches=[f],l(f)}}function NP(l,f){f.MSPOINTER_TYPE_TOUCH&&f.pointerType===f.MSPOINTER_TYPE_TOUCH&&cn(f),rh(l,f)}function kP(l){var f={},p,_;for(_ in l)p=l[_],f[_]=p&&p.bind?p.bind(l):p;return l=f,f.type="dblclick",f.detail=2,f.isTrusted=!1,f._simulated=!0,f}var EP=200;function AP(l,f){l.addEventListener("dblclick",f);var p=0,_;function j(A){if(A.detail!==1){_=A.detail;return}if(!(A.pointerType==="mouse"||A.sourceCapabilities&&!A.sourceCapabilities.firesTouchEvents)){var z=jw(A);if(!(z.some(function(Y){return Y instanceof HTMLLabelElement&&Y.attributes.for})&&!z.some(function(Y){return Y instanceof HTMLInputElement||Y instanceof HTMLSelectElement}))){var Z=Date.now();Z-p<=EP?(_++,_===2&&f(kP(A))):_=1,p=Z}}}return l.addEventListener("click",j),{dblclick:f,simDblclick:j}}function OP(l,f){l.removeEventListener("dblclick",f.dblclick),l.removeEventListener("click",f.simDblclick)}var q0=lh(["transform","webkitTransform","OTransform","MozTransform","msTransform"]),bu=lh(["webkitTransition","transition","OTransition","MozTransition","msTransition"]),Sw=bu==="webkitTransition"||bu==="OTransition"?bu+"End":"transitionend";function Cw(l){return typeof l=="string"?document.getElementById(l):l}function wu(l,f){var p=l.style[f]||l.currentStyle&&l.currentStyle[f];if((!p||p==="auto")&&document.defaultView){var _=document.defaultView.getComputedStyle(l,null);p=_?_[f]:null}return p==="auto"?null:p}function et(l,f,p){var _=document.createElement(l);return _.className=f||"",p&&p.appendChild(_),_}function Ot(l){var f=l.parentNode;f&&f.removeChild(l)}function ah(l){for(;l.firstChild;)l.removeChild(l.firstChild)}function pl(l){var f=l.parentNode;f&&f.lastChild!==l&&f.appendChild(l)}function vl(l){var f=l.parentNode;f&&f.firstChild!==l&&f.insertBefore(l,f.firstChild)}function X0(l,f){if(l.classList!==void 0)return l.classList.contains(f);var p=oh(l);return p.length>0&&new RegExp("(^|\\s)"+f+"(\\s|$)").test(p)}function Ve(l,f){if(l.classList!==void 0)for(var p=b(f),_=0,j=p.length;_<j;_++)l.classList.add(p[_]);else if(!X0(l,f)){var A=oh(l);K0(l,(A?A+" ":"")+f)}}function Ft(l,f){l.classList!==void 0?l.classList.remove(f):K0(l,v((" "+oh(l)+" ").replace(" "+f+" "," ")))}function K0(l,f){l.className.baseVal===void 0?l.className=f:l.className.baseVal=f}function oh(l){return l.correspondingElement&&(l=l.correspondingElement),l.className.baseVal===void 0?l.className:l.className.baseVal}function mi(l,f){"opacity"in l.style?l.style.opacity=f:"filter"in l.style&&DP(l,f)}function DP(l,f){var p=!1,_="DXImageTransform.Microsoft.Alpha";try{p=l.filters.item(_)}catch{if(f===1)return}f=Math.round(f*100),p?(p.Enabled=f!==100,p.Opacity=f):l.style.filter+=" progid:"+_+"(opacity="+f+")"}function lh(l){for(var f=document.documentElement.style,p=0;p<l.length;p++)if(l[p]in f)return l[p];return!1}function qa(l,f,p){var _=f||new B(0,0);l.style[q0]=(_e.ie3d?"translate("+_.x+"px,"+_.y+"px)":"translate3d("+_.x+"px,"+_.y+"px,0)")+(p?" scale("+p+")":"")}function Wt(l,f){l._leaflet_pos=f,_e.any3d?qa(l,f):(l.style.left=f.x+"px",l.style.top=f.y+"px")}function Xa(l){return l._leaflet_pos||new B(0,0)}var Su,Cu,Q0;if("onselectstart"in document)Su=function(){ze(window,"selectstart",cn)},Cu=function(){pt(window,"selectstart",cn)};else{var Mu=lh(["userSelect","WebkitUserSelect","OUserSelect","MozUserSelect","msUserSelect"]);Su=function(){if(Mu){var l=document.documentElement.style;Q0=l[Mu],l[Mu]="none"}},Cu=function(){Mu&&(document.documentElement.style[Mu]=Q0,Q0=void 0)}}function J0(){ze(window,"dragstart",cn)}function e1(){pt(window,"dragstart",cn)}var ch,t1;function n1(l){for(;l.tabIndex===-1;)l=l.parentNode;l.style&&(uh(),ch=l,t1=l.style.outlineStyle,l.style.outlineStyle="none",ze(window,"keydown",uh))}function uh(){ch&&(ch.style.outlineStyle=t1,ch=void 0,t1=void 0,pt(window,"keydown",uh))}function Mw(l){do l=l.parentNode;while((!l.offsetWidth||!l.offsetHeight)&&l!==document.body);return l}function i1(l){var f=l.getBoundingClientRect();return{x:f.width/l.offsetWidth||1,y:f.height/l.offsetHeight||1,boundingClientRect:f}}var PP={__proto__:null,TRANSFORM:q0,TRANSITION:bu,TRANSITION_END:Sw,get:Cw,getStyle:wu,create:et,remove:Ot,empty:ah,toFront:pl,toBack:vl,hasClass:X0,addClass:Ve,removeClass:Ft,setClass:K0,getClass:oh,setOpacity:mi,testProp:lh,setTransform:qa,setPosition:Wt,getPosition:Xa,get disableTextSelection(){return Su},get enableTextSelection(){return Cu},disableImageDrag:J0,enableImageDrag:e1,preventOutline:n1,restoreOutline:uh,getSizedParentNode:Mw,getScale:i1};function ze(l,f,p,_){if(f&&typeof f=="object")for(var j in f)r1(l,j,f[j],p);else{f=b(f);for(var A=0,z=f.length;A<z;A++)r1(l,f[A],p,_)}return this}var hs="_leaflet_events";function pt(l,f,p,_){if(arguments.length===1)Tw(l),delete l[hs];else if(f&&typeof f=="object")for(var j in f)a1(l,j,f[j],p);else if(f=b(f),arguments.length===2)Tw(l,function(Z){return N(f,Z)!==-1});else for(var A=0,z=f.length;A<z;A++)a1(l,f[A],p,_);return this}function Tw(l,f){for(var p in l[hs]){var _=p.split(/\d/)[0];(!f||f(_))&&a1(l,_,null,null,p)}}var s1={mouseenter:"mouseover",mouseleave:"mouseout",wheel:!("onwheel"in window)&&"mousewheel"};function r1(l,f,p,_){var j=f+c(p)+(_?"_"+c(_):"");if(l[hs]&&l[hs][j])return this;var A=function(Z){return p.call(_||l,Z||window.event)},z=A;!_e.touchNative&&_e.pointer&&f.indexOf("touch")===0?A=SP(l,f,A):_e.touch&&f==="dblclick"?A=AP(l,A):"addEventListener"in l?f==="touchstart"||f==="touchmove"||f==="wheel"||f==="mousewheel"?l.addEventListener(s1[f]||f,A,_e.passiveEvents?{passive:!1}:!1):f==="mouseenter"||f==="mouseleave"?(A=function(Z){Z=Z||window.event,l1(l,Z)&&z(Z)},l.addEventListener(s1[f],A,!1)):l.addEventListener(f,z,!1):l.attachEvent("on"+f,A),l[hs]=l[hs]||{},l[hs][j]=A}function a1(l,f,p,_,j){j=j||f+c(p)+(_?"_"+c(_):"");var A=l[hs]&&l[hs][j];if(!A)return this;!_e.touchNative&&_e.pointer&&f.indexOf("touch")===0?CP(l,f,A):_e.touch&&f==="dblclick"?OP(l,A):"removeEventListener"in l?l.removeEventListener(s1[f]||f,A,!1):l.detachEvent("on"+f,A),l[hs][j]=null}function Ka(l){return l.stopPropagation?l.stopPropagation():l.originalEvent?l.originalEvent._stopped=!0:l.cancelBubble=!0,this}function o1(l){return r1(l,"wheel",Ka),this}function Tu(l){return ze(l,"mousedown touchstart dblclick contextmenu",Ka),l._leaflet_disable_click=!0,this}function cn(l){return l.preventDefault?l.preventDefault():l.returnValue=!1,this}function Qa(l){return cn(l),Ka(l),this}function jw(l){if(l.composedPath)return l.composedPath();for(var f=[],p=l.target;p;)f.push(p),p=p.parentNode;return f}function Nw(l,f){if(!f)return new B(l.clientX,l.clientY);var p=i1(f),_=p.boundingClientRect;return new B((l.clientX-_.left)/p.x-f.clientLeft,(l.clientY-_.top)/p.y-f.clientTop)}var RP=_e.linux&&_e.chrome?window.devicePixelRatio:_e.mac?window.devicePixelRatio*3:window.devicePixelRatio>0?2*window.devicePixelRatio:1;function kw(l){return _e.edge?l.wheelDeltaY/2:l.deltaY&&l.deltaMode===0?-l.deltaY/RP:l.deltaY&&l.deltaMode===1?-l.deltaY*20:l.deltaY&&l.deltaMode===2?-l.deltaY*60:l.deltaX||l.deltaZ?0:l.wheelDelta?(l.wheelDeltaY||l.wheelDelta)/2:l.detail&&Math.abs(l.detail)<32765?-l.detail*20:l.detail?l.detail/-32765*60:0}function l1(l,f){var p=f.relatedTarget;if(!p)return!0;try{for(;p&&p!==l;)p=p.parentNode}catch{return!1}return p!==l}var LP={__proto__:null,on:ze,off:pt,stopPropagation:Ka,disableScrollPropagation:o1,disableClickPropagation:Tu,preventDefault:cn,stop:Qa,getPropagationPath:jw,getMousePosition:Nw,getWheelDelta:kw,isExternalTarget:l1,addListener:ze,removeListener:pt},Ew=$.extend({run:function(l,f,p,_){this.stop(),this._el=l,this._inProgress=!0,this._duration=p||.25,this._easeOutPower=1/Math.max(_||.5,.2),this._startPos=Xa(l),this._offset=f.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=H(this._animate,this),this._step()},_step:function(l){var f=+new Date-this._startTime,p=this._duration*1e3;f<p?this._runFrame(this._easeOut(f/p),l):(this._runFrame(1),this._complete())},_runFrame:function(l,f){var p=this._startPos.add(this._offset.multiplyBy(l));f&&p._round(),Wt(this._el,p),this.fire("step")},_complete:function(){V(this._animId),this._inProgress=!1,this.fire("end")},_easeOut:function(l){return 1-Math.pow(1-l,this._easeOutPower)}}),Ke=$.extend({options:{crs:Re,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(l,f){f=w(this,f),this._handlers=[],this._layers={},this._zoomBoundLayers={},this._sizeChanged=!0,this._initContainer(l),this._initLayout(),this._onResize=a(this._onResize,this),this._initEvents(),f.maxBounds&&this.setMaxBounds(f.maxBounds),f.zoom!==void 0&&(this._zoom=this._limitZoom(f.zoom)),f.center&&f.zoom!==void 0&&this.setView(we(f.center),f.zoom,{reset:!0}),this.callInitHooks(),this._zoomAnimated=bu&&_e.any3d&&!_e.mobileOpera&&this.options.zoomAnimation,this._zoomAnimated&&(this._createAnimProxy(),ze(this._proxy,Sw,this._catchTransitionEnd,this)),this._addLayers(this.options.layers)},setView:function(l,f,p){if(f=f===void 0?this._zoom:this._limitZoom(f),l=this._limitCenter(we(l),f,this.options.maxBounds),p=p||{},this._stop(),this._loaded&&!p.reset&&p!==!0){p.animate!==void 0&&(p.zoom=s({animate:p.animate},p.zoom),p.pan=s({animate:p.animate,duration:p.duration},p.pan));var _=this._zoom!==f?this._tryAnimatedZoom&&this._tryAnimatedZoom(l,f,p.zoom):this._tryAnimatedPan(l,p.pan);if(_)return clearTimeout(this._sizeTimer),this}return this._resetView(l,f,p.pan&&p.pan.noMoveStart),this},setZoom:function(l,f){return this._loaded?this.setView(this.getCenter(),l,{zoom:f}):(this._zoom=l,this)},zoomIn:function(l,f){return l=l||(_e.any3d?this.options.zoomDelta:1),this.setZoom(this._zoom+l,f)},zoomOut:function(l,f){return l=l||(_e.any3d?this.options.zoomDelta:1),this.setZoom(this._zoom-l,f)},setZoomAround:function(l,f,p){var _=this.getZoomScale(f),j=this.getSize().divideBy(2),A=l instanceof B?l:this.latLngToContainerPoint(l),z=A.subtract(j).multiplyBy(1-1/_),Z=this.containerPointToLatLng(j.add(z));return this.setView(Z,f,{zoom:p})},_getBoundsCenterZoom:function(l,f){f=f||{},l=l.getBounds?l.getBounds():je(l);var p=G(f.paddingTopLeft||f.padding||[0,0]),_=G(f.paddingBottomRight||f.padding||[0,0]),j=this.getBoundsZoom(l,!1,p.add(_));if(j=typeof f.maxZoom=="number"?Math.min(f.maxZoom,j):j,j===1/0)return{center:l.getCenter(),zoom:j};var A=_.subtract(p).divideBy(2),z=this.project(l.getSouthWest(),j),Z=this.project(l.getNorthEast(),j),Y=this.unproject(z.add(Z).divideBy(2).add(A),j);return{center:Y,zoom:j}},fitBounds:function(l,f){if(l=je(l),!l.isValid())throw new Error("Bounds are not valid.");var p=this._getBoundsCenterZoom(l,f);return this.setView(p.center,p.zoom,f)},fitWorld:function(l){return this.fitBounds([[-90,-180],[90,180]],l)},panTo:function(l,f){return this.setView(l,this._zoom,{pan:f})},panBy:function(l,f){if(l=G(l).round(),f=f||{},!l.x&&!l.y)return this.fire("moveend");if(f.animate!==!0&&!this.getSize().contains(l))return this._resetView(this.unproject(this.project(this.getCenter()).add(l)),this.getZoom()),this;if(this._panAnim||(this._panAnim=new Ew,this._panAnim.on({step:this._onPanTransitionStep,end:this._onPanTransitionEnd},this)),f.noMoveStart||this.fire("movestart"),f.animate!==!1){Ve(this._mapPane,"leaflet-pan-anim");var p=this._getMapPanePos().subtract(l).round();this._panAnim.run(this._mapPane,p,f.duration||.25,f.easeLinearity)}else this._rawPanBy(l),this.fire("move").fire("moveend");return this},flyTo:function(l,f,p){if(p=p||{},p.animate===!1||!_e.any3d)return this.setView(l,f,p);this._stop();var _=this.project(this.getCenter()),j=this.project(l),A=this.getSize(),z=this._zoom;l=we(l),f=f===void 0?z:f;var Z=Math.max(A.x,A.y),Y=Z*this.getZoomScale(z,f),te=j.distanceTo(_)||1,me=1.42,Ne=me*me;function Ze(Gt){var wh=Gt?-1:1,CR=Gt?Y:Z,MR=Y*Y-Z*Z+wh*Ne*Ne*te*te,TR=2*CR*Ne*te,y1=MR/TR,u4=Math.sqrt(y1*y1+1)-y1,jR=u4<1e-9?-18:Math.log(u4);return jR}function Pn(Gt){return(Math.exp(Gt)-Math.exp(-Gt))/2}function sn(Gt){return(Math.exp(Gt)+Math.exp(-Gt))/2}function pi(Gt){return Pn(Gt)/sn(Gt)}var $n=Ze(0);function Sl(Gt){return Z*(sn($n)/sn($n+me*Gt))}function _R(Gt){return Z*(sn($n)*pi($n+me*Gt)-Pn($n))/Ne}function bR(Gt){return 1-Math.pow(1-Gt,1.5)}var wR=Date.now(),l4=(Ze(1)-$n)/me,SR=p.duration?1e3*p.duration:1e3*l4*.8;function c4(){var Gt=(Date.now()-wR)/SR,wh=bR(Gt)*l4;Gt<=1?(this._flyToFrame=H(c4,this),this._move(this.unproject(_.add(j.subtract(_).multiplyBy(_R(wh)/te)),z),this.getScaleZoom(Z/Sl(wh),z),{flyTo:!0})):this._move(l,f)._moveEnd(!0)}return this._moveStart(!0,p.noMoveStart),c4.call(this),this},flyToBounds:function(l,f){var p=this._getBoundsCenterZoom(l,f);return this.flyTo(p.center,p.zoom,f)},setMaxBounds:function(l){return l=je(l),this.listens("moveend",this._panInsideMaxBounds)&&this.off("moveend",this._panInsideMaxBounds),l.isValid()?(this.options.maxBounds=l,this._loaded&&this._panInsideMaxBounds(),this.on("moveend",this._panInsideMaxBounds)):(this.options.maxBounds=null,this)},setMinZoom:function(l){var f=this.options.minZoom;return this.options.minZoom=l,this._loaded&&f!==l&&(this.fire("zoomlevelschange"),this.getZoom()<this.options.minZoom)?this.setZoom(l):this},setMaxZoom:function(l){var f=this.options.maxZoom;return this.options.maxZoom=l,this._loaded&&f!==l&&(this.fire("zoomlevelschange"),this.getZoom()>this.options.maxZoom)?this.setZoom(l):this},panInsideBounds:function(l,f){this._enforcingBounds=!0;var p=this.getCenter(),_=this._limitCenter(p,this._zoom,je(l));return p.equals(_)||this.panTo(_,f),this._enforcingBounds=!1,this},panInside:function(l,f){f=f||{};var p=G(f.paddingTopLeft||f.padding||[0,0]),_=G(f.paddingBottomRight||f.padding||[0,0]),j=this.project(this.getCenter()),A=this.project(l),z=this.getPixelBounds(),Z=se([z.min.add(p),z.max.subtract(_)]),Y=Z.getSize();if(!Z.contains(A)){this._enforcingBounds=!0;var te=A.subtract(Z.getCenter()),me=Z.extend(A).getSize().subtract(Y);j.x+=te.x<0?-me.x:me.x,j.y+=te.y<0?-me.y:me.y,this.panTo(this.unproject(j),f),this._enforcingBounds=!1}return this},invalidateSize:function(l){if(!this._loaded)return this;l=s({animate:!1,pan:!0},l===!0?{animate:!0}:l);var f=this.getSize();this._sizeChanged=!0,this._lastCenter=null;var p=this.getSize(),_=f.divideBy(2).round(),j=p.divideBy(2).round(),A=_.subtract(j);return!A.x&&!A.y?this:(l.animate&&l.pan?this.panBy(A):(l.pan&&this._rawPanBy(A),this.fire("move"),l.debounceMoveend?(clearTimeout(this._sizeTimer),this._sizeTimer=setTimeout(a(this.fire,this,"moveend"),200)):this.fire("moveend")),this.fire("resize",{oldSize:f,newSize:p}))},stop:function(){return this.setZoom(this._limitZoom(this._zoom)),this.options.zoomSnap||this.fire("viewreset"),this._stop()},locate:function(l){if(l=this._locateOptions=s({timeout:1e4,watch:!1},l),!("geolocation"in navigator))return this._handleGeolocationError({code:0,message:"Geolocation not supported."}),this;var f=a(this._handleGeolocationResponse,this),p=a(this._handleGeolocationError,this);return l.watch?this._locationWatchId=navigator.geolocation.watchPosition(f,p,l):navigator.geolocation.getCurrentPosition(f,p,l),this},stopLocate:function(){return navigator.geolocation&&navigator.geolocation.clearWatch&&navigator.geolocation.clearWatch(this._locationWatchId),this._locateOptions&&(this._locateOptions.setView=!1),this},_handleGeolocationError:function(l){if(this._container._leaflet_id){var f=l.code,p=l.message||(f===1?"permission denied":f===2?"position unavailable":"timeout");this._locateOptions.setView&&!this._loaded&&this.fitWorld(),this.fire("locationerror",{code:f,message:"Geolocation error: "+p+"."})}},_handleGeolocationResponse:function(l){if(this._container._leaflet_id){var f=l.coords.latitude,p=l.coords.longitude,_=new be(f,p),j=_.toBounds(l.coords.accuracy*2),A=this._locateOptions;if(A.setView){var z=this.getBoundsZoom(j);this.setView(_,A.maxZoom?Math.min(z,A.maxZoom):z)}var Z={latlng:_,bounds:j,timestamp:l.timestamp};for(var Y in l.coords)typeof l.coords[Y]=="number"&&(Z[Y]=l.coords[Y]);this.fire("locationfound",Z)}},addHandler:function(l,f){if(!f)return this;var p=this[l]=new f(this);return this._handlers.push(p),this.options[l]&&p.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(),Ot(this._mapPane),this._clearControlPos&&this._clearControlPos(),this._resizeRequest&&(V(this._resizeRequest),this._resizeRequest=null),this._clearHandlers(),this._loaded&&this.fire("unload");var l;for(l in this._layers)this._layers[l].remove();for(l in this._panes)Ot(this._panes[l]);return this._layers=[],this._panes=[],delete this._mapPane,delete this._renderer,this},createPane:function(l,f){var p="leaflet-pane"+(l?" leaflet-"+l.replace("Pane","")+"-pane":""),_=et("div",p,f||this._mapPane);return l&&(this._panes[l]=_),_},getCenter:function(){return this._checkIfLoaded(),this._lastCenter&&!this._moved()?this._lastCenter.clone():this.layerPointToLatLng(this._getCenterLayerPoint())},getZoom:function(){return this._zoom},getBounds:function(){var l=this.getPixelBounds(),f=this.unproject(l.getBottomLeft()),p=this.unproject(l.getTopRight());return new Le(f,p)},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(l,f,p){l=je(l),p=G(p||[0,0]);var _=this.getZoom()||0,j=this.getMinZoom(),A=this.getMaxZoom(),z=l.getNorthWest(),Z=l.getSouthEast(),Y=this.getSize().subtract(p),te=se(this.project(Z,_),this.project(z,_)).getSize(),me=_e.any3d?this.options.zoomSnap:1,Ne=Y.x/te.x,Ze=Y.y/te.y,Pn=f?Math.max(Ne,Ze):Math.min(Ne,Ze);return _=this.getScaleZoom(Pn,_),me&&(_=Math.round(_/(me/100))*(me/100),_=f?Math.ceil(_/me)*me:Math.floor(_/me)*me),Math.max(j,Math.min(A,_))},getSize:function(){return(!this._size||this._sizeChanged)&&(this._size=new B(this._container.clientWidth||0,this._container.clientHeight||0),this._sizeChanged=!1),this._size.clone()},getPixelBounds:function(l,f){var p=this._getTopLeftPoint(l,f);return new ie(p,p.add(this.getSize()))},getPixelOrigin:function(){return this._checkIfLoaded(),this._pixelOrigin},getPixelWorldBounds:function(l){return this.options.crs.getProjectedBounds(l===void 0?this.getZoom():l)},getPane:function(l){return typeof l=="string"?this._panes[l]:l},getPanes:function(){return this._panes},getContainer:function(){return this._container},getZoomScale:function(l,f){var p=this.options.crs;return f=f===void 0?this._zoom:f,p.scale(l)/p.scale(f)},getScaleZoom:function(l,f){var p=this.options.crs;f=f===void 0?this._zoom:f;var _=p.zoom(l*p.scale(f));return isNaN(_)?1/0:_},project:function(l,f){return f=f===void 0?this._zoom:f,this.options.crs.latLngToPoint(we(l),f)},unproject:function(l,f){return f=f===void 0?this._zoom:f,this.options.crs.pointToLatLng(G(l),f)},layerPointToLatLng:function(l){var f=G(l).add(this.getPixelOrigin());return this.unproject(f)},latLngToLayerPoint:function(l){var f=this.project(we(l))._round();return f._subtract(this.getPixelOrigin())},wrapLatLng:function(l){return this.options.crs.wrapLatLng(we(l))},wrapLatLngBounds:function(l){return this.options.crs.wrapLatLngBounds(je(l))},distance:function(l,f){return this.options.crs.distance(we(l),we(f))},containerPointToLayerPoint:function(l){return G(l).subtract(this._getMapPanePos())},layerPointToContainerPoint:function(l){return G(l).add(this._getMapPanePos())},containerPointToLatLng:function(l){var f=this.containerPointToLayerPoint(G(l));return this.layerPointToLatLng(f)},latLngToContainerPoint:function(l){return this.layerPointToContainerPoint(this.latLngToLayerPoint(we(l)))},mouseEventToContainerPoint:function(l){return Nw(l,this._container)},mouseEventToLayerPoint:function(l){return this.containerPointToLayerPoint(this.mouseEventToContainerPoint(l))},mouseEventToLatLng:function(l){return this.layerPointToLatLng(this.mouseEventToLayerPoint(l))},_initContainer:function(l){var f=this._container=Cw(l);if(f){if(f._leaflet_id)throw new Error("Map container is already initialized.")}else throw new Error("Map container not found.");ze(f,"scroll",this._onScroll,this),this._containerId=c(f)},_initLayout:function(){var l=this._container;this._fadeAnimated=this.options.fadeAnimation&&_e.any3d,Ve(l,"leaflet-container"+(_e.touch?" leaflet-touch":"")+(_e.retina?" leaflet-retina":"")+(_e.ielt9?" leaflet-oldie":"")+(_e.safari?" leaflet-safari":"")+(this._fadeAnimated?" leaflet-fade-anim":""));var f=wu(l,"position");f!=="absolute"&&f!=="relative"&&f!=="fixed"&&f!=="sticky"&&(l.style.position="relative"),this._initPanes(),this._initControlPos&&this._initControlPos()},_initPanes:function(){var l=this._panes={};this._paneRenderers={},this._mapPane=this.createPane("mapPane",this._container),Wt(this._mapPane,new B(0,0)),this.createPane("tilePane"),this.createPane("overlayPane"),this.createPane("shadowPane"),this.createPane("markerPane"),this.createPane("tooltipPane"),this.createPane("popupPane"),this.options.markerZoomAnimation||(Ve(l.markerPane,"leaflet-zoom-hide"),Ve(l.shadowPane,"leaflet-zoom-hide"))},_resetView:function(l,f,p){Wt(this._mapPane,new B(0,0));var _=!this._loaded;this._loaded=!0,f=this._limitZoom(f),this.fire("viewprereset");var j=this._zoom!==f;this._moveStart(j,p)._move(l,f)._moveEnd(j),this.fire("viewreset"),_&&this.fire("load")},_moveStart:function(l,f){return l&&this.fire("zoomstart"),f||this.fire("movestart"),this},_move:function(l,f,p,_){f===void 0&&(f=this._zoom);var j=this._zoom!==f;return this._zoom=f,this._lastCenter=l,this._pixelOrigin=this._getNewPixelOrigin(l),_?p&&p.pinch&&this.fire("zoom",p):((j||p&&p.pinch)&&this.fire("zoom",p),this.fire("move",p)),this},_moveEnd:function(l){return l&&this.fire("zoomend"),this.fire("moveend")},_stop:function(){return V(this._flyToFrame),this._panAnim&&this._panAnim.stop(),this},_rawPanBy:function(l){Wt(this._mapPane,this._getMapPanePos().subtract(l))},_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(l){this._targets={},this._targets[c(this._container)]=this;var f=l?pt:ze;f(this._container,"click dblclick mousedown mouseup mouseover mouseout mousemove contextmenu keypress keydown keyup",this._handleDOMEvent,this),this.options.trackResize&&f(window,"resize",this._onResize,this),_e.any3d&&this.options.transform3DLimit&&(l?this.off:this.on).call(this,"moveend",this._onMoveEnd)},_onResize:function(){V(this._resizeRequest),this._resizeRequest=H(function(){this.invalidateSize({debounceMoveend:!0})},this)},_onScroll:function(){this._container.scrollTop=0,this._container.scrollLeft=0},_onMoveEnd:function(){var l=this._getMapPanePos();Math.max(Math.abs(l.x),Math.abs(l.y))>=this.options.transform3DLimit&&this._resetView(this.getCenter(),this.getZoom())},_findEventTargets:function(l,f){for(var p=[],_,j=f==="mouseout"||f==="mouseover",A=l.target||l.srcElement,z=!1;A;){if(_=this._targets[c(A)],_&&(f==="click"||f==="preclick")&&this._draggableMoved(_)){z=!0;break}if(_&&_.listens(f,!0)&&(j&&!l1(A,l)||(p.push(_),j))||A===this._container)break;A=A.parentNode}return!p.length&&!z&&!j&&this.listens(f,!0)&&(p=[this]),p},_isClickDisabled:function(l){for(;l&&l!==this._container;){if(l._leaflet_disable_click)return!0;l=l.parentNode}},_handleDOMEvent:function(l){var f=l.target||l.srcElement;if(!(!this._loaded||f._leaflet_disable_events||l.type==="click"&&this._isClickDisabled(f))){var p=l.type;p==="mousedown"&&n1(f),this._fireDOMEvent(l,p)}},_mouseEvents:["click","dblclick","mouseover","mouseout","contextmenu"],_fireDOMEvent:function(l,f,p){if(l.type==="click"){var _=s({},l);_.type="preclick",this._fireDOMEvent(_,_.type,p)}var j=this._findEventTargets(l,f);if(p){for(var A=[],z=0;z<p.length;z++)p[z].listens(f,!0)&&A.push(p[z]);j=A.concat(j)}if(j.length){f==="contextmenu"&&cn(l);var Z=j[0],Y={originalEvent:l};if(l.type!=="keypress"&&l.type!=="keydown"&&l.type!=="keyup"){var te=Z.getLatLng&&(!Z._radius||Z._radius<=10);Y.containerPoint=te?this.latLngToContainerPoint(Z.getLatLng()):this.mouseEventToContainerPoint(l),Y.layerPoint=this.containerPointToLayerPoint(Y.containerPoint),Y.latlng=te?Z.getLatLng():this.layerPointToLatLng(Y.layerPoint)}for(z=0;z<j.length;z++)if(j[z].fire(f,Y,!0),Y.originalEvent._stopped||j[z].options.bubblingMouseEvents===!1&&N(this._mouseEvents,f)!==-1)return}},_draggableMoved:function(l){return l=l.dragging&&l.dragging.enabled()?l:this,l.dragging&&l.dragging.moved()||this.boxZoom&&this.boxZoom.moved()},_clearHandlers:function(){for(var l=0,f=this._handlers.length;l<f;l++)this._handlers[l].disable()},whenReady:function(l,f){return this._loaded?l.call(f||this,{target:this}):this.on("load",l,f),this},_getMapPanePos:function(){return Xa(this._mapPane)||new B(0,0)},_moved:function(){var l=this._getMapPanePos();return l&&!l.equals([0,0])},_getTopLeftPoint:function(l,f){var p=l&&f!==void 0?this._getNewPixelOrigin(l,f):this.getPixelOrigin();return p.subtract(this._getMapPanePos())},_getNewPixelOrigin:function(l,f){var p=this.getSize()._divideBy(2);return this.project(l,f)._subtract(p)._add(this._getMapPanePos())._round()},_latLngToNewLayerPoint:function(l,f,p){var _=this._getNewPixelOrigin(p,f);return this.project(l,f)._subtract(_)},_latLngBoundsToNewLayerBounds:function(l,f,p){var _=this._getNewPixelOrigin(p,f);return se([this.project(l.getSouthWest(),f)._subtract(_),this.project(l.getNorthWest(),f)._subtract(_),this.project(l.getSouthEast(),f)._subtract(_),this.project(l.getNorthEast(),f)._subtract(_)])},_getCenterLayerPoint:function(){return this.containerPointToLayerPoint(this.getSize()._divideBy(2))},_getCenterOffset:function(l){return this.latLngToLayerPoint(l).subtract(this._getCenterLayerPoint())},_limitCenter:function(l,f,p){if(!p)return l;var _=this.project(l,f),j=this.getSize().divideBy(2),A=new ie(_.subtract(j),_.add(j)),z=this._getBoundsOffset(A,p,f);return Math.abs(z.x)<=1&&Math.abs(z.y)<=1?l:this.unproject(_.add(z),f)},_limitOffset:function(l,f){if(!f)return l;var p=this.getPixelBounds(),_=new ie(p.min.add(l),p.max.add(l));return l.add(this._getBoundsOffset(_,f))},_getBoundsOffset:function(l,f,p){var _=se(this.project(f.getNorthEast(),p),this.project(f.getSouthWest(),p)),j=_.min.subtract(l.min),A=_.max.subtract(l.max),z=this._rebound(j.x,-A.x),Z=this._rebound(j.y,-A.y);return new B(z,Z)},_rebound:function(l,f){return l+f>0?Math.round(l-f)/2:Math.max(0,Math.ceil(l))-Math.max(0,Math.floor(f))},_limitZoom:function(l){var f=this.getMinZoom(),p=this.getMaxZoom(),_=_e.any3d?this.options.zoomSnap:1;return _&&(l=Math.round(l/_)*_),Math.max(f,Math.min(p,l))},_onPanTransitionStep:function(){this.fire("move")},_onPanTransitionEnd:function(){Ft(this._mapPane,"leaflet-pan-anim"),this.fire("moveend")},_tryAnimatedPan:function(l,f){var p=this._getCenterOffset(l)._trunc();return(f&&f.animate)!==!0&&!this.getSize().contains(p)?!1:(this.panBy(p,f),!0)},_createAnimProxy:function(){var l=this._proxy=et("div","leaflet-proxy leaflet-zoom-animated");this._panes.mapPane.appendChild(l),this.on("zoomanim",function(f){var p=q0,_=this._proxy.style[p];qa(this._proxy,this.project(f.center,f.zoom),this.getZoomScale(f.zoom,1)),_===this._proxy.style[p]&&this._animatingZoom&&this._onZoomTransitionEnd()},this),this.on("load moveend",this._animMoveEnd,this),this._on("unload",this._destroyAnimProxy,this)},_destroyAnimProxy:function(){Ot(this._proxy),this.off("load moveend",this._animMoveEnd,this),delete this._proxy},_animMoveEnd:function(){var l=this.getCenter(),f=this.getZoom();qa(this._proxy,this.project(l,f),this.getZoomScale(f,1))},_catchTransitionEnd:function(l){this._animatingZoom&&l.propertyName.indexOf("transform")>=0&&this._onZoomTransitionEnd()},_nothingToAnimate:function(){return!this._container.getElementsByClassName("leaflet-zoom-animated").length},_tryAnimatedZoom:function(l,f,p){if(this._animatingZoom)return!0;if(p=p||{},!this._zoomAnimated||p.animate===!1||this._nothingToAnimate()||Math.abs(f-this._zoom)>this.options.zoomAnimationThreshold)return!1;var _=this.getZoomScale(f),j=this._getCenterOffset(l)._divideBy(1-1/_);return p.animate!==!0&&!this.getSize().contains(j)?!1:(H(function(){this._moveStart(!0,p.noMoveStart||!1)._animateZoom(l,f,!0)},this),!0)},_animateZoom:function(l,f,p,_){this._mapPane&&(p&&(this._animatingZoom=!0,this._animateToCenter=l,this._animateToZoom=f,Ve(this._mapPane,"leaflet-zoom-anim")),this.fire("zoomanim",{center:l,zoom:f,noUpdate:_}),this._tempFireZoomEvent||(this._tempFireZoomEvent=this._zoom!==this._animateToZoom),this._move(this._animateToCenter,this._animateToZoom,void 0,!0),setTimeout(a(this._onZoomTransitionEnd,this),250))},_onZoomTransitionEnd:function(){this._animatingZoom&&(this._mapPane&&Ft(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 zP(l,f){return new Ke(l,f)}var Fi=Q.extend({options:{position:"topright"},initialize:function(l){w(this,l)},getPosition:function(){return this.options.position},setPosition:function(l){var f=this._map;return f&&f.removeControl(this),this.options.position=l,f&&f.addControl(this),this},getContainer:function(){return this._container},addTo:function(l){this.remove(),this._map=l;var f=this._container=this.onAdd(l),p=this.getPosition(),_=l._controlCorners[p];return Ve(f,"leaflet-control"),p.indexOf("bottom")!==-1?_.insertBefore(f,_.firstChild):_.appendChild(f),this._map.on("unload",this.remove,this),this},remove:function(){return this._map?(Ot(this._container),this.onRemove&&this.onRemove(this._map),this._map.off("unload",this.remove,this),this._map=null,this):this},_refocusOnMap:function(l){this._map&&l&&l.screenX>0&&l.screenY>0&&this._map.getContainer().focus()}}),ju=function(l){return new Fi(l)};Ke.include({addControl:function(l){return l.addTo(this),this},removeControl:function(l){return l.remove(),this},_initControlPos:function(){var l=this._controlCorners={},f="leaflet-",p=this._controlContainer=et("div",f+"control-container",this._container);function _(j,A){var z=f+j+" "+f+A;l[j+A]=et("div",z,p)}_("top","left"),_("top","right"),_("bottom","left"),_("bottom","right")},_clearControlPos:function(){for(var l in this._controlCorners)Ot(this._controlCorners[l]);Ot(this._controlContainer),delete this._controlCorners,delete this._controlContainer}});var Aw=Fi.extend({options:{collapsed:!0,position:"topright",autoZIndex:!0,hideSingleBase:!1,sortLayers:!1,sortFunction:function(l,f,p,_){return p<_?-1:_<p?1:0}},initialize:function(l,f,p){w(this,p),this._layerControlInputs=[],this._layers=[],this._lastZIndex=0,this._handlingClick=!1,this._preventClick=!1;for(var _ in l)this._addLayer(l[_],_);for(_ in f)this._addLayer(f[_],_,!0)},onAdd:function(l){this._initLayout(),this._update(),this._map=l,l.on("zoomend",this._checkDisabledLayers,this);for(var f=0;f<this._layers.length;f++)this._layers[f].layer.on("add remove",this._onLayerChange,this);return this._container},addTo:function(l){return Fi.prototype.addTo.call(this,l),this._expandIfNotCollapsed()},onRemove:function(){this._map.off("zoomend",this._checkDisabledLayers,this);for(var l=0;l<this._layers.length;l++)this._layers[l].layer.off("add remove",this._onLayerChange,this)},addBaseLayer:function(l,f){return this._addLayer(l,f),this._map?this._update():this},addOverlay:function(l,f){return this._addLayer(l,f,!0),this._map?this._update():this},removeLayer:function(l){l.off("add remove",this._onLayerChange,this);var f=this._getLayer(c(l));return f&&this._layers.splice(this._layers.indexOf(f),1),this._map?this._update():this},expand:function(){Ve(this._container,"leaflet-control-layers-expanded"),this._section.style.height=null;var l=this._map.getSize().y-(this._container.offsetTop+50);return l<this._section.clientHeight?(Ve(this._section,"leaflet-control-layers-scrollbar"),this._section.style.height=l+"px"):Ft(this._section,"leaflet-control-layers-scrollbar"),this._checkDisabledLayers(),this},collapse:function(){return Ft(this._container,"leaflet-control-layers-expanded"),this},_initLayout:function(){var l="leaflet-control-layers",f=this._container=et("div",l),p=this.options.collapsed;f.setAttribute("aria-haspopup",!0),Tu(f),o1(f);var _=this._section=et("section",l+"-list");p&&(this._map.on("click",this.collapse,this),ze(f,{mouseenter:this._expandSafely,mouseleave:this.collapse},this));var j=this._layersLink=et("a",l+"-toggle",f);j.href="#",j.title="Layers",j.setAttribute("role","button"),ze(j,{keydown:function(A){A.keyCode===13&&this._expandSafely()},click:function(A){cn(A),this._expandSafely()}},this),p||this.expand(),this._baseLayersList=et("div",l+"-base",_),this._separator=et("div",l+"-separator",_),this._overlaysList=et("div",l+"-overlays",_),f.appendChild(_)},_getLayer:function(l){for(var f=0;f<this._layers.length;f++)if(this._layers[f]&&c(this._layers[f].layer)===l)return this._layers[f]},_addLayer:function(l,f,p){this._map&&l.on("add remove",this._onLayerChange,this),this._layers.push({layer:l,name:f,overlay:p}),this.options.sortLayers&&this._layers.sort(a(function(_,j){return this.options.sortFunction(_.layer,j.layer,_.name,j.name)},this)),this.options.autoZIndex&&l.setZIndex&&(this._lastZIndex++,l.setZIndex(this._lastZIndex)),this._expandIfNotCollapsed()},_update:function(){if(!this._container)return this;ah(this._baseLayersList),ah(this._overlaysList),this._layerControlInputs=[];var l,f,p,_,j=0;for(p=0;p<this._layers.length;p++)_=this._layers[p],this._addItem(_),f=f||_.overlay,l=l||!_.overlay,j+=_.overlay?0:1;return this.options.hideSingleBase&&(l=l&&j>1,this._baseLayersList.style.display=l?"":"none"),this._separator.style.display=f&&l?"":"none",this},_onLayerChange:function(l){this._handlingClick||this._update();var f=this._getLayer(c(l.target)),p=f.overlay?l.type==="add"?"overlayadd":"overlayremove":l.type==="add"?"baselayerchange":null;p&&this._map.fire(p,f)},_createRadioElement:function(l,f){var p='<input type="radio" class="leaflet-control-layers-selector" name="'+l+'"'+(f?' checked="checked"':"")+"/>",_=document.createElement("div");return _.innerHTML=p,_.firstChild},_addItem:function(l){var f=document.createElement("label"),p=this._map.hasLayer(l.layer),_;l.overlay?(_=document.createElement("input"),_.type="checkbox",_.className="leaflet-control-layers-selector",_.defaultChecked=p):_=this._createRadioElement("leaflet-base-layers_"+c(this),p),this._layerControlInputs.push(_),_.layerId=c(l.layer),ze(_,"click",this._onInputClick,this);var j=document.createElement("span");j.innerHTML=" "+l.name;var A=document.createElement("span");f.appendChild(A),A.appendChild(_),A.appendChild(j);var z=l.overlay?this._overlaysList:this._baseLayersList;return z.appendChild(f),this._checkDisabledLayers(),f},_onInputClick:function(){if(!this._preventClick){var l=this._layerControlInputs,f,p,_=[],j=[];this._handlingClick=!0;for(var A=l.length-1;A>=0;A--)f=l[A],p=this._getLayer(f.layerId).layer,f.checked?_.push(p):f.checked||j.push(p);for(A=0;A<j.length;A++)this._map.hasLayer(j[A])&&this._map.removeLayer(j[A]);for(A=0;A<_.length;A++)this._map.hasLayer(_[A])||this._map.addLayer(_[A]);this._handlingClick=!1,this._refocusOnMap()}},_checkDisabledLayers:function(){for(var l=this._layerControlInputs,f,p,_=this._map.getZoom(),j=l.length-1;j>=0;j--)f=l[j],p=this._getLayer(f.layerId).layer,f.disabled=p.options.minZoom!==void 0&&_<p.options.minZoom||p.options.maxZoom!==void 0&&_>p.options.maxZoom},_expandIfNotCollapsed:function(){return this._map&&!this.options.collapsed&&this.expand(),this},_expandSafely:function(){var l=this._section;this._preventClick=!0,ze(l,"click",cn),this.expand();var f=this;setTimeout(function(){pt(l,"click",cn),f._preventClick=!1})}}),IP=function(l,f,p){return new Aw(l,f,p)},c1=Fi.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(l){var f="leaflet-control-zoom",p=et("div",f+" leaflet-bar"),_=this.options;return this._zoomInButton=this._createButton(_.zoomInText,_.zoomInTitle,f+"-in",p,this._zoomIn),this._zoomOutButton=this._createButton(_.zoomOutText,_.zoomOutTitle,f+"-out",p,this._zoomOut),this._updateDisabled(),l.on("zoomend zoomlevelschange",this._updateDisabled,this),p},onRemove:function(l){l.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(l){!this._disabled&&this._map._zoom<this._map.getMaxZoom()&&this._map.zoomIn(this._map.options.zoomDelta*(l.shiftKey?3:1))},_zoomOut:function(l){!this._disabled&&this._map._zoom>this._map.getMinZoom()&&this._map.zoomOut(this._map.options.zoomDelta*(l.shiftKey?3:1))},_createButton:function(l,f,p,_,j){var A=et("a",p,_);return A.innerHTML=l,A.href="#",A.title=f,A.setAttribute("role","button"),A.setAttribute("aria-label",f),Tu(A),ze(A,"click",Qa),ze(A,"click",j,this),ze(A,"click",this._refocusOnMap,this),A},_updateDisabled:function(){var l=this._map,f="leaflet-disabled";Ft(this._zoomInButton,f),Ft(this._zoomOutButton,f),this._zoomInButton.setAttribute("aria-disabled","false"),this._zoomOutButton.setAttribute("aria-disabled","false"),(this._disabled||l._zoom===l.getMinZoom())&&(Ve(this._zoomOutButton,f),this._zoomOutButton.setAttribute("aria-disabled","true")),(this._disabled||l._zoom===l.getMaxZoom())&&(Ve(this._zoomInButton,f),this._zoomInButton.setAttribute("aria-disabled","true"))}});Ke.mergeOptions({zoomControl:!0}),Ke.addInitHook(function(){this.options.zoomControl&&(this.zoomControl=new c1,this.addControl(this.zoomControl))});var BP=function(l){return new c1(l)},Ow=Fi.extend({options:{position:"bottomleft",maxWidth:100,metric:!0,imperial:!0},onAdd:function(l){var f="leaflet-control-scale",p=et("div",f),_=this.options;return this._addScales(_,f+"-line",p),l.on(_.updateWhenIdle?"moveend":"move",this._update,this),l.whenReady(this._update,this),p},onRemove:function(l){l.off(this.options.updateWhenIdle?"moveend":"move",this._update,this)},_addScales:function(l,f,p){l.metric&&(this._mScale=et("div",f,p)),l.imperial&&(this._iScale=et("div",f,p))},_update:function(){var l=this._map,f=l.getSize().y/2,p=l.distance(l.containerPointToLatLng([0,f]),l.containerPointToLatLng([this.options.maxWidth,f]));this._updateScales(p)},_updateScales:function(l){this.options.metric&&l&&this._updateMetric(l),this.options.imperial&&l&&this._updateImperial(l)},_updateMetric:function(l){var f=this._getRoundNum(l),p=f<1e3?f+" m":f/1e3+" km";this._updateScale(this._mScale,p,f/l)},_updateImperial:function(l){var f=l*3.2808399,p,_,j;f>5280?(p=f/5280,_=this._getRoundNum(p),this._updateScale(this._iScale,_+" mi",_/p)):(j=this._getRoundNum(f),this._updateScale(this._iScale,j+" ft",j/f))},_updateScale:function(l,f,p){l.style.width=Math.round(this.options.maxWidth*p)+"px",l.innerHTML=f},_getRoundNum:function(l){var f=Math.pow(10,(Math.floor(l)+"").length-1),p=l/f;return p=p>=10?10:p>=5?5:p>=3?3:p>=2?2:1,f*p}}),VP=function(l){return new Ow(l)},HP='<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>',u1=Fi.extend({options:{position:"bottomright",prefix:'<a href="https://leafletjs.com" title="A JavaScript library for interactive maps">'+(_e.inlineSvg?HP+" ":"")+"Leaflet</a>"},initialize:function(l){w(this,l),this._attributions={}},onAdd:function(l){l.attributionControl=this,this._container=et("div","leaflet-control-attribution"),Tu(this._container);for(var f in l._layers)l._layers[f].getAttribution&&this.addAttribution(l._layers[f].getAttribution());return this._update(),l.on("layeradd",this._addAttribution,this),this._container},onRemove:function(l){l.off("layeradd",this._addAttribution,this)},_addAttribution:function(l){l.layer.getAttribution&&(this.addAttribution(l.layer.getAttribution()),l.layer.once("remove",function(){this.removeAttribution(l.layer.getAttribution())},this))},setPrefix:function(l){return this.options.prefix=l,this._update(),this},addAttribution:function(l){return l?(this._attributions[l]||(this._attributions[l]=0),this._attributions[l]++,this._update(),this):this},removeAttribution:function(l){return l?(this._attributions[l]&&(this._attributions[l]--,this._update()),this):this},_update:function(){if(this._map){var l=[];for(var f in this._attributions)this._attributions[f]&&l.push(f);var p=[];this.options.prefix&&p.push(this.options.prefix),l.length&&p.push(l.join(", ")),this._container.innerHTML=p.join(' <span aria-hidden="true">|</span> ')}}});Ke.mergeOptions({attributionControl:!0}),Ke.addInitHook(function(){this.options.attributionControl&&new u1().addTo(this)});var FP=function(l){return new u1(l)};Fi.Layers=Aw,Fi.Zoom=c1,Fi.Scale=Ow,Fi.Attribution=u1,ju.layers=IP,ju.zoom=BP,ju.scale=VP,ju.attribution=FP;var ms=Q.extend({initialize:function(l){this._map=l},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}});ms.addTo=function(l,f){return l.addHandler(f,this),this};var UP={Events:R},Dw=_e.touch?"touchstart mousedown":"mousedown",Vr=$.extend({options:{clickTolerance:3},initialize:function(l,f,p,_){w(this,_),this._element=l,this._dragStartTarget=f||l,this._preventOutline=p},enable:function(){this._enabled||(ze(this._dragStartTarget,Dw,this._onDown,this),this._enabled=!0)},disable:function(){this._enabled&&(Vr._dragging===this&&this.finishDrag(!0),pt(this._dragStartTarget,Dw,this._onDown,this),this._enabled=!1,this._moved=!1)},_onDown:function(l){if(this._enabled&&(this._moved=!1,!X0(this._element,"leaflet-zoom-anim"))){if(l.touches&&l.touches.length!==1){Vr._dragging===this&&this.finishDrag();return}if(!(Vr._dragging||l.shiftKey||l.which!==1&&l.button!==1&&!l.touches)&&(Vr._dragging=this,this._preventOutline&&n1(this._element),J0(),Su(),!this._moving)){this.fire("down");var f=l.touches?l.touches[0]:l,p=Mw(this._element);this._startPoint=new B(f.clientX,f.clientY),this._startPos=Xa(this._element),this._parentScale=i1(p);var _=l.type==="mousedown";ze(document,_?"mousemove":"touchmove",this._onMove,this),ze(document,_?"mouseup":"touchend touchcancel",this._onUp,this)}}},_onMove:function(l){if(this._enabled){if(l.touches&&l.touches.length>1){this._moved=!0;return}var f=l.touches&&l.touches.length===1?l.touches[0]:l,p=new B(f.clientX,f.clientY)._subtract(this._startPoint);!p.x&&!p.y||Math.abs(p.x)+Math.abs(p.y)<this.options.clickTolerance||(p.x/=this._parentScale.x,p.y/=this._parentScale.y,cn(l),this._moved||(this.fire("dragstart"),this._moved=!0,Ve(document.body,"leaflet-dragging"),this._lastTarget=l.target||l.srcElement,window.SVGElementInstance&&this._lastTarget instanceof window.SVGElementInstance&&(this._lastTarget=this._lastTarget.correspondingUseElement),Ve(this._lastTarget,"leaflet-drag-target")),this._newPos=this._startPos.add(p),this._moving=!0,this._lastEvent=l,this._updatePosition())}},_updatePosition:function(){var l={originalEvent:this._lastEvent};this.fire("predrag",l),Wt(this._element,this._newPos),this.fire("drag",l)},_onUp:function(){this._enabled&&this.finishDrag()},finishDrag:function(l){Ft(document.body,"leaflet-dragging"),this._lastTarget&&(Ft(this._lastTarget,"leaflet-drag-target"),this._lastTarget=null),pt(document,"mousemove touchmove",this._onMove,this),pt(document,"mouseup touchend touchcancel",this._onUp,this),e1(),Cu();var f=this._moved&&this._moving;this._moving=!1,Vr._dragging=!1,f&&this.fire("dragend",{noInertia:l,distance:this._newPos.distanceTo(this._startPos)})}});function Pw(l,f,p){var _,j=[1,4,2,8],A,z,Z,Y,te,me,Ne,Ze;for(A=0,me=l.length;A<me;A++)l[A]._code=Ja(l[A],f);for(Z=0;Z<4;Z++){for(Ne=j[Z],_=[],A=0,me=l.length,z=me-1;A<me;z=A++)Y=l[A],te=l[z],Y._code&Ne?te._code&Ne||(Ze=dh(te,Y,Ne,f,p),Ze._code=Ja(Ze,f),_.push(Ze)):(te._code&Ne&&(Ze=dh(te,Y,Ne,f,p),Ze._code=Ja(Ze,f),_.push(Ze)),_.push(Y));l=_}return l}function Rw(l,f){var p,_,j,A,z,Z,Y,te,me;if(!l||l.length===0)throw new Error("latlngs not passed");gi(l)||(console.warn("latlngs are not flat! Only the first ring will be used"),l=l[0]);var Ne=we([0,0]),Ze=je(l),Pn=Ze.getNorthWest().distanceTo(Ze.getSouthWest())*Ze.getNorthEast().distanceTo(Ze.getNorthWest());Pn<1700&&(Ne=d1(l));var sn=l.length,pi=[];for(p=0;p<sn;p++){var $n=we(l[p]);pi.push(f.project(we([$n.lat-Ne.lat,$n.lng-Ne.lng])))}for(Z=Y=te=0,p=0,_=sn-1;p<sn;_=p++)j=pi[p],A=pi[_],z=j.y*A.x-A.y*j.x,Y+=(j.x+A.x)*z,te+=(j.y+A.y)*z,Z+=z*3;Z===0?me=pi[0]:me=[Y/Z,te/Z];var Sl=f.unproject(G(me));return we([Sl.lat+Ne.lat,Sl.lng+Ne.lng])}function d1(l){for(var f=0,p=0,_=0,j=0;j<l.length;j++){var A=we(l[j]);f+=A.lat,p+=A.lng,_++}return we([f/_,p/_])}var ZP={__proto__:null,clipPolygon:Pw,polygonCenter:Rw,centroid:d1};function Lw(l,f){if(!f||!l.length)return l.slice();var p=f*f;return l=GP(l,p),l=WP(l,p),l}function zw(l,f,p){return Math.sqrt(Nu(l,f,p,!0))}function $P(l,f,p){return Nu(l,f,p)}function WP(l,f){var p=l.length,_=typeof Uint8Array<"u"?Uint8Array:Array,j=new _(p);j[0]=j[p-1]=1,f1(l,j,f,0,p-1);var A,z=[];for(A=0;A<p;A++)j[A]&&z.push(l[A]);return z}function f1(l,f,p,_,j){var A=0,z,Z,Y;for(Z=_+1;Z<=j-1;Z++)Y=Nu(l[Z],l[_],l[j],!0),Y>A&&(z=Z,A=Y);A>p&&(f[z]=1,f1(l,f,p,_,z),f1(l,f,p,z,j))}function GP(l,f){for(var p=[l[0]],_=1,j=0,A=l.length;_<A;_++)YP(l[_],l[j])>f&&(p.push(l[_]),j=_);return j<A-1&&p.push(l[A-1]),p}var Iw;function Bw(l,f,p,_,j){var A=_?Iw:Ja(l,p),z=Ja(f,p),Z,Y,te;for(Iw=z;;){if(!(A|z))return[l,f];if(A&z)return!1;Z=A||z,Y=dh(l,f,Z,p,j),te=Ja(Y,p),Z===A?(l=Y,A=te):(f=Y,z=te)}}function dh(l,f,p,_,j){var A=f.x-l.x,z=f.y-l.y,Z=_.min,Y=_.max,te,me;return p&8?(te=l.x+A*(Y.y-l.y)/z,me=Y.y):p&4?(te=l.x+A*(Z.y-l.y)/z,me=Z.y):p&2?(te=Y.x,me=l.y+z*(Y.x-l.x)/A):p&1&&(te=Z.x,me=l.y+z*(Z.x-l.x)/A),new B(te,me,j)}function Ja(l,f){var p=0;return l.x<f.min.x?p|=1:l.x>f.max.x&&(p|=2),l.y<f.min.y?p|=4:l.y>f.max.y&&(p|=8),p}function YP(l,f){var p=f.x-l.x,_=f.y-l.y;return p*p+_*_}function Nu(l,f,p,_){var j=f.x,A=f.y,z=p.x-j,Z=p.y-A,Y=z*z+Z*Z,te;return Y>0&&(te=((l.x-j)*z+(l.y-A)*Z)/Y,te>1?(j=p.x,A=p.y):te>0&&(j+=z*te,A+=Z*te)),z=l.x-j,Z=l.y-A,_?z*z+Z*Z:new B(j,A)}function gi(l){return!T(l[0])||typeof l[0][0]!="object"&&typeof l[0][0]<"u"}function Vw(l){return console.warn("Deprecated use of _flat, please use L.LineUtil.isFlat instead."),gi(l)}function Hw(l,f){var p,_,j,A,z,Z,Y,te;if(!l||l.length===0)throw new Error("latlngs not passed");gi(l)||(console.warn("latlngs are not flat! Only the first ring will be used"),l=l[0]);var me=we([0,0]),Ne=je(l),Ze=Ne.getNorthWest().distanceTo(Ne.getSouthWest())*Ne.getNorthEast().distanceTo(Ne.getNorthWest());Ze<1700&&(me=d1(l));var Pn=l.length,sn=[];for(p=0;p<Pn;p++){var pi=we(l[p]);sn.push(f.project(we([pi.lat-me.lat,pi.lng-me.lng])))}for(p=0,_=0;p<Pn-1;p++)_+=sn[p].distanceTo(sn[p+1])/2;if(_===0)te=sn[0];else for(p=0,A=0;p<Pn-1;p++)if(z=sn[p],Z=sn[p+1],j=z.distanceTo(Z),A+=j,A>_){Y=(A-_)/j,te=[Z.x-Y*(Z.x-z.x),Z.y-Y*(Z.y-z.y)];break}var $n=f.unproject(G(te));return we([$n.lat+me.lat,$n.lng+me.lng])}var qP={__proto__:null,simplify:Lw,pointToSegmentDistance:zw,closestPointOnSegment:$P,clipSegment:Bw,_getEdgeIntersection:dh,_getBitCode:Ja,_sqClosestPointOnSegment:Nu,isFlat:gi,_flat:Vw,polylineCenter:Hw},h1={project:function(l){return new B(l.lng,l.lat)},unproject:function(l){return new be(l.y,l.x)},bounds:new ie([-180,-90],[180,90])},m1={R:6378137,R_MINOR:6356752314245179e-9,bounds:new ie([-2003750834279e-5,-1549657073972e-5],[2003750834279e-5,1876465623138e-5]),project:function(l){var f=Math.PI/180,p=this.R,_=l.lat*f,j=this.R_MINOR/p,A=Math.sqrt(1-j*j),z=A*Math.sin(_),Z=Math.tan(Math.PI/4-_/2)/Math.pow((1-z)/(1+z),A/2);return _=-p*Math.log(Math.max(Z,1e-10)),new B(l.lng*f*p,_)},unproject:function(l){for(var f=180/Math.PI,p=this.R,_=this.R_MINOR/p,j=Math.sqrt(1-_*_),A=Math.exp(-l.y/p),z=Math.PI/2-2*Math.atan(A),Z=0,Y=.1,te;Z<15&&Math.abs(Y)>1e-7;Z++)te=j*Math.sin(z),te=Math.pow((1-te)/(1+te),j/2),Y=Math.PI/2-2*Math.atan(A*te)-z,z+=Y;return new be(z*f,l.x*f/p)}},XP={__proto__:null,LonLat:h1,Mercator:m1,SphericalMercator:le},KP=s({},F,{code:"EPSG:3395",projection:m1,transformation:function(){var l=.5/(Math.PI*m1.R);return Ae(l,.5,-l,.5)}()}),Fw=s({},F,{code:"EPSG:4326",projection:h1,transformation:Ae(1/180,1,-1/180,.5)}),QP=s({},Tt,{projection:h1,transformation:Ae(1,0,-1,0),scale:function(l){return Math.pow(2,l)},zoom:function(l){return Math.log(l)/Math.LN2},distance:function(l,f){var p=f.lng-l.lng,_=f.lat-l.lat;return Math.sqrt(p*p+_*_)},infinite:!0});Tt.Earth=F,Tt.EPSG3395=KP,Tt.EPSG3857=Re,Tt.EPSG900913=at,Tt.EPSG4326=Fw,Tt.Simple=QP;var Ui=$.extend({options:{pane:"overlayPane",attribution:null,bubblingMouseEvents:!0},addTo:function(l){return l.addLayer(this),this},remove:function(){return this.removeFrom(this._map||this._mapToAdd)},removeFrom:function(l){return l&&l.removeLayer(this),this},getPane:function(l){return this._map.getPane(l?this.options[l]||l:this.options.pane)},addInteractiveTarget:function(l){return this._map._targets[c(l)]=this,this},removeInteractiveTarget:function(l){return delete this._map._targets[c(l)],this},getAttribution:function(){return this.options.attribution},_layerAdd:function(l){var f=l.target;if(f.hasLayer(this)){if(this._map=f,this._zoomAnimated=f._zoomAnimated,this.getEvents){var p=this.getEvents();f.on(p,this),this.once("remove",function(){f.off(p,this)},this)}this.onAdd(f),this.fire("add"),f.fire("layeradd",{layer:this})}}});Ke.include({addLayer:function(l){if(!l._layerAdd)throw new Error("The provided object is not a Layer.");var f=c(l);return this._layers[f]?this:(this._layers[f]=l,l._mapToAdd=this,l.beforeAdd&&l.beforeAdd(this),this.whenReady(l._layerAdd,l),this)},removeLayer:function(l){var f=c(l);return this._layers[f]?(this._loaded&&l.onRemove(this),delete this._layers[f],this._loaded&&(this.fire("layerremove",{layer:l}),l.fire("remove")),l._map=l._mapToAdd=null,this):this},hasLayer:function(l){return c(l)in this._layers},eachLayer:function(l,f){for(var p in this._layers)l.call(f,this._layers[p]);return this},_addLayers:function(l){l=l?T(l)?l:[l]:[];for(var f=0,p=l.length;f<p;f++)this.addLayer(l[f])},_addZoomLimit:function(l){(!isNaN(l.options.maxZoom)||!isNaN(l.options.minZoom))&&(this._zoomBoundLayers[c(l)]=l,this._updateZoomLevels())},_removeZoomLimit:function(l){var f=c(l);this._zoomBoundLayers[f]&&(delete this._zoomBoundLayers[f],this._updateZoomLevels())},_updateZoomLevels:function(){var l=1/0,f=-1/0,p=this._getZoomSpan();for(var _ in this._zoomBoundLayers){var j=this._zoomBoundLayers[_].options;l=j.minZoom===void 0?l:Math.min(l,j.minZoom),f=j.maxZoom===void 0?f:Math.max(f,j.maxZoom)}this._layersMaxZoom=f===-1/0?void 0:f,this._layersMinZoom=l===1/0?void 0:l,p!==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 xl=Ui.extend({initialize:function(l,f){w(this,f),this._layers={};var p,_;if(l)for(p=0,_=l.length;p<_;p++)this.addLayer(l[p])},addLayer:function(l){var f=this.getLayerId(l);return this._layers[f]=l,this._map&&this._map.addLayer(l),this},removeLayer:function(l){var f=l in this._layers?l:this.getLayerId(l);return this._map&&this._layers[f]&&this._map.removeLayer(this._layers[f]),delete this._layers[f],this},hasLayer:function(l){var f=typeof l=="number"?l:this.getLayerId(l);return f in this._layers},clearLayers:function(){return this.eachLayer(this.removeLayer,this)},invoke:function(l){var f=Array.prototype.slice.call(arguments,1),p,_;for(p in this._layers)_=this._layers[p],_[l]&&_[l].apply(_,f);return this},onAdd:function(l){this.eachLayer(l.addLayer,l)},onRemove:function(l){this.eachLayer(l.removeLayer,l)},eachLayer:function(l,f){for(var p in this._layers)l.call(f,this._layers[p]);return this},getLayer:function(l){return this._layers[l]},getLayers:function(){var l=[];return this.eachLayer(l.push,l),l},setZIndex:function(l){return this.invoke("setZIndex",l)},getLayerId:function(l){return c(l)}}),JP=function(l,f){return new xl(l,f)},qs=xl.extend({addLayer:function(l){return this.hasLayer(l)?this:(l.addEventParent(this),xl.prototype.addLayer.call(this,l),this.fire("layeradd",{layer:l}))},removeLayer:function(l){return this.hasLayer(l)?(l in this._layers&&(l=this._layers[l]),l.removeEventParent(this),xl.prototype.removeLayer.call(this,l),this.fire("layerremove",{layer:l})):this},setStyle:function(l){return this.invoke("setStyle",l)},bringToFront:function(){return this.invoke("bringToFront")},bringToBack:function(){return this.invoke("bringToBack")},getBounds:function(){var l=new Le;for(var f in this._layers){var p=this._layers[f];l.extend(p.getBounds?p.getBounds():p.getLatLng())}return l}}),eR=function(l,f){return new qs(l,f)},yl=Q.extend({options:{popupAnchor:[0,0],tooltipAnchor:[0,0],crossOrigin:!1},initialize:function(l){w(this,l)},createIcon:function(l){return this._createIcon("icon",l)},createShadow:function(l){return this._createIcon("shadow",l)},_createIcon:function(l,f){var p=this._getIconUrl(l);if(!p){if(l==="icon")throw new Error("iconUrl not set in Icon options (see the docs).");return null}var _=this._createImg(p,f&&f.tagName==="IMG"?f:null);return this._setIconStyles(_,l),(this.options.crossOrigin||this.options.crossOrigin==="")&&(_.crossOrigin=this.options.crossOrigin===!0?"":this.options.crossOrigin),_},_setIconStyles:function(l,f){var p=this.options,_=p[f+"Size"];typeof _=="number"&&(_=[_,_]);var j=G(_),A=G(f==="shadow"&&p.shadowAnchor||p.iconAnchor||j&&j.divideBy(2,!0));l.className="leaflet-marker-"+f+" "+(p.className||""),A&&(l.style.marginLeft=-A.x+"px",l.style.marginTop=-A.y+"px"),j&&(l.style.width=j.x+"px",l.style.height=j.y+"px")},_createImg:function(l,f){return f=f||document.createElement("img"),f.src=l,f},_getIconUrl:function(l){return _e.retina&&this.options[l+"RetinaUrl"]||this.options[l+"Url"]}});function tR(l){return new yl(l)}var ku=yl.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(l){return typeof ku.imagePath!="string"&&(ku.imagePath=this._detectIconPath()),(this.options.imagePath||ku.imagePath)+yl.prototype._getIconUrl.call(this,l)},_stripUrl:function(l){var f=function(p,_,j){var A=_.exec(p);return A&&A[j]};return l=f(l,/^url\((['"])?(.+)\1\)$/,2),l&&f(l,/^(.*)marker-icon\.png$/,1)},_detectIconPath:function(){var l=et("div","leaflet-default-icon-path",document.body),f=wu(l,"background-image")||wu(l,"backgroundImage");if(document.body.removeChild(l),f=this._stripUrl(f),f)return f;var p=document.querySelector('link[href$="leaflet.css"]');return p?p.href.substring(0,p.href.length-11-1):""}}),Uw=ms.extend({initialize:function(l){this._marker=l},addHooks:function(){var l=this._marker._icon;this._draggable||(this._draggable=new Vr(l,l,!0)),this._draggable.on({dragstart:this._onDragStart,predrag:this._onPreDrag,drag:this._onDrag,dragend:this._onDragEnd},this).enable(),Ve(l,"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&&Ft(this._marker._icon,"leaflet-marker-draggable")},moved:function(){return this._draggable&&this._draggable._moved},_adjustPan:function(l){var f=this._marker,p=f._map,_=this._marker.options.autoPanSpeed,j=this._marker.options.autoPanPadding,A=Xa(f._icon),z=p.getPixelBounds(),Z=p.getPixelOrigin(),Y=se(z.min._subtract(Z).add(j),z.max._subtract(Z).subtract(j));if(!Y.contains(A)){var te=G((Math.max(Y.max.x,A.x)-Y.max.x)/(z.max.x-Y.max.x)-(Math.min(Y.min.x,A.x)-Y.min.x)/(z.min.x-Y.min.x),(Math.max(Y.max.y,A.y)-Y.max.y)/(z.max.y-Y.max.y)-(Math.min(Y.min.y,A.y)-Y.min.y)/(z.min.y-Y.min.y)).multiplyBy(_);p.panBy(te,{animate:!1}),this._draggable._newPos._add(te),this._draggable._startPos._add(te),Wt(f._icon,this._draggable._newPos),this._onDrag(l),this._panRequest=H(this._adjustPan.bind(this,l))}},_onDragStart:function(){this._oldLatLng=this._marker.getLatLng(),this._marker.closePopup&&this._marker.closePopup(),this._marker.fire("movestart").fire("dragstart")},_onPreDrag:function(l){this._marker.options.autoPan&&(V(this._panRequest),this._panRequest=H(this._adjustPan.bind(this,l)))},_onDrag:function(l){var f=this._marker,p=f._shadow,_=Xa(f._icon),j=f._map.layerPointToLatLng(_);p&&Wt(p,_),f._latlng=j,l.latlng=j,l.oldLatLng=this._oldLatLng,f.fire("move",l).fire("drag",l)},_onDragEnd:function(l){V(this._panRequest),delete this._oldLatLng,this._marker.fire("moveend").fire("dragend",l)}}),fh=Ui.extend({options:{icon:new ku,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(l,f){w(this,f),this._latlng=we(l)},onAdd:function(l){this._zoomAnimated=this._zoomAnimated&&l.options.markerZoomAnimation,this._zoomAnimated&&l.on("zoomanim",this._animateZoom,this),this._initIcon(),this.update()},onRemove:function(l){this.dragging&&this.dragging.enabled()&&(this.options.draggable=!0,this.dragging.removeHooks()),delete this.dragging,this._zoomAnimated&&l.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(l){var f=this._latlng;return this._latlng=we(l),this.update(),this.fire("move",{oldLatLng:f,latlng:this._latlng})},setZIndexOffset:function(l){return this.options.zIndexOffset=l,this.update()},getIcon:function(){return this.options.icon},setIcon:function(l){return this.options.icon=l,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 l=this._map.latLngToLayerPoint(this._latlng).round();this._setPos(l)}return this},_initIcon:function(){var l=this.options,f="leaflet-zoom-"+(this._zoomAnimated?"animated":"hide"),p=l.icon.createIcon(this._icon),_=!1;p!==this._icon&&(this._icon&&this._removeIcon(),_=!0,l.title&&(p.title=l.title),p.tagName==="IMG"&&(p.alt=l.alt||"")),Ve(p,f),l.keyboard&&(p.tabIndex="0",p.setAttribute("role","button")),this._icon=p,l.riseOnHover&&this.on({mouseover:this._bringToFront,mouseout:this._resetZIndex}),this.options.autoPanOnFocus&&ze(p,"focus",this._panOnFocus,this);var j=l.icon.createShadow(this._shadow),A=!1;j!==this._shadow&&(this._removeShadow(),A=!0),j&&(Ve(j,f),j.alt=""),this._shadow=j,l.opacity<1&&this._updateOpacity(),_&&this.getPane().appendChild(this._icon),this._initInteraction(),j&&A&&this.getPane(l.shadowPane).appendChild(this._shadow)},_removeIcon:function(){this.options.riseOnHover&&this.off({mouseover:this._bringToFront,mouseout:this._resetZIndex}),this.options.autoPanOnFocus&&pt(this._icon,"focus",this._panOnFocus,this),Ot(this._icon),this.removeInteractiveTarget(this._icon),this._icon=null},_removeShadow:function(){this._shadow&&Ot(this._shadow),this._shadow=null},_setPos:function(l){this._icon&&Wt(this._icon,l),this._shadow&&Wt(this._shadow,l),this._zIndex=l.y+this.options.zIndexOffset,this._resetZIndex()},_updateZIndex:function(l){this._icon&&(this._icon.style.zIndex=this._zIndex+l)},_animateZoom:function(l){var f=this._map._latLngToNewLayerPoint(this._latlng,l.zoom,l.center).round();this._setPos(f)},_initInteraction:function(){if(this.options.interactive&&(Ve(this._icon,"leaflet-interactive"),this.addInteractiveTarget(this._icon),Uw)){var l=this.options.draggable;this.dragging&&(l=this.dragging.enabled(),this.dragging.disable()),this.dragging=new Uw(this),l&&this.dragging.enable()}},setOpacity:function(l){return this.options.opacity=l,this._map&&this._updateOpacity(),this},_updateOpacity:function(){var l=this.options.opacity;this._icon&&mi(this._icon,l),this._shadow&&mi(this._shadow,l)},_bringToFront:function(){this._updateZIndex(this.options.riseOffset)},_resetZIndex:function(){this._updateZIndex(0)},_panOnFocus:function(){var l=this._map;if(l){var f=this.options.icon.options,p=f.iconSize?G(f.iconSize):G(0,0),_=f.iconAnchor?G(f.iconAnchor):G(0,0);l.panInside(this._latlng,{paddingTopLeft:_,paddingBottomRight:p.subtract(_)})}},_getPopupAnchor:function(){return this.options.icon.options.popupAnchor},_getTooltipAnchor:function(){return this.options.icon.options.tooltipAnchor}});function nR(l,f){return new fh(l,f)}var Hr=Ui.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(l){this._renderer=l.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(l){return w(this,l),this._renderer&&(this._renderer._updateStyle(this),this.options.stroke&&l&&Object.prototype.hasOwnProperty.call(l,"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)}}),hh=Hr.extend({options:{fill:!0,radius:10},initialize:function(l,f){w(this,f),this._latlng=we(l),this._radius=this.options.radius},setLatLng:function(l){var f=this._latlng;return this._latlng=we(l),this.redraw(),this.fire("move",{oldLatLng:f,latlng:this._latlng})},getLatLng:function(){return this._latlng},setRadius:function(l){return this.options.radius=this._radius=l,this.redraw()},getRadius:function(){return this._radius},setStyle:function(l){var f=l&&l.radius||this._radius;return Hr.prototype.setStyle.call(this,l),this.setRadius(f),this},_project:function(){this._point=this._map.latLngToLayerPoint(this._latlng),this._updateBounds()},_updateBounds:function(){var l=this._radius,f=this._radiusY||l,p=this._clickTolerance(),_=[l+p,f+p];this._pxBounds=new ie(this._point.subtract(_),this._point.add(_))},_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(l){return l.distanceTo(this._point)<=this._radius+this._clickTolerance()}});function iR(l,f){return new hh(l,f)}var g1=hh.extend({initialize:function(l,f,p){if(typeof f=="number"&&(f=s({},p,{radius:f})),w(this,f),this._latlng=we(l),isNaN(this.options.radius))throw new Error("Circle radius cannot be NaN");this._mRadius=this.options.radius},setRadius:function(l){return this._mRadius=l,this.redraw()},getRadius:function(){return this._mRadius},getBounds:function(){var l=[this._radius,this._radiusY||this._radius];return new Le(this._map.layerPointToLatLng(this._point.subtract(l)),this._map.layerPointToLatLng(this._point.add(l)))},setStyle:Hr.prototype.setStyle,_project:function(){var l=this._latlng.lng,f=this._latlng.lat,p=this._map,_=p.options.crs;if(_.distance===F.distance){var j=Math.PI/180,A=this._mRadius/F.R/j,z=p.project([f+A,l]),Z=p.project([f-A,l]),Y=z.add(Z).divideBy(2),te=p.unproject(Y).lat,me=Math.acos((Math.cos(A*j)-Math.sin(f*j)*Math.sin(te*j))/(Math.cos(f*j)*Math.cos(te*j)))/j;(isNaN(me)||me===0)&&(me=A/Math.cos(Math.PI/180*f)),this._point=Y.subtract(p.getPixelOrigin()),this._radius=isNaN(me)?0:Y.x-p.project([te,l-me]).x,this._radiusY=Y.y-z.y}else{var Ne=_.unproject(_.project(this._latlng).subtract([this._mRadius,0]));this._point=p.latLngToLayerPoint(this._latlng),this._radius=this._point.x-p.latLngToLayerPoint(Ne).x}this._updateBounds()}});function sR(l,f,p){return new g1(l,f,p)}var Xs=Hr.extend({options:{smoothFactor:1,noClip:!1},initialize:function(l,f){w(this,f),this._setLatLngs(l)},getLatLngs:function(){return this._latlngs},setLatLngs:function(l){return this._setLatLngs(l),this.redraw()},isEmpty:function(){return!this._latlngs.length},closestLayerPoint:function(l){for(var f=1/0,p=null,_=Nu,j,A,z=0,Z=this._parts.length;z<Z;z++)for(var Y=this._parts[z],te=1,me=Y.length;te<me;te++){j=Y[te-1],A=Y[te];var Ne=_(l,j,A,!0);Ne<f&&(f=Ne,p=_(l,j,A))}return p&&(p.distance=Math.sqrt(f)),p},getCenter:function(){if(!this._map)throw new Error("Must add layer to map before using getCenter()");return Hw(this._defaultShape(),this._map.options.crs)},getBounds:function(){return this._bounds},addLatLng:function(l,f){return f=f||this._defaultShape(),l=we(l),f.push(l),this._bounds.extend(l),this.redraw()},_setLatLngs:function(l){this._bounds=new Le,this._latlngs=this._convertLatLngs(l)},_defaultShape:function(){return gi(this._latlngs)?this._latlngs:this._latlngs[0]},_convertLatLngs:function(l){for(var f=[],p=gi(l),_=0,j=l.length;_<j;_++)p?(f[_]=we(l[_]),this._bounds.extend(f[_])):f[_]=this._convertLatLngs(l[_]);return f},_project:function(){var l=new ie;this._rings=[],this._projectLatlngs(this._latlngs,this._rings,l),this._bounds.isValid()&&l.isValid()&&(this._rawPxBounds=l,this._updateBounds())},_updateBounds:function(){var l=this._clickTolerance(),f=new B(l,l);this._rawPxBounds&&(this._pxBounds=new ie([this._rawPxBounds.min.subtract(f),this._rawPxBounds.max.add(f)]))},_projectLatlngs:function(l,f,p){var _=l[0]instanceof be,j=l.length,A,z;if(_){for(z=[],A=0;A<j;A++)z[A]=this._map.latLngToLayerPoint(l[A]),p.extend(z[A]);f.push(z)}else for(A=0;A<j;A++)this._projectLatlngs(l[A],f,p)},_clipPoints:function(){var l=this._renderer._bounds;if(this._parts=[],!(!this._pxBounds||!this._pxBounds.intersects(l))){if(this.options.noClip){this._parts=this._rings;return}var f=this._parts,p,_,j,A,z,Z,Y;for(p=0,j=0,A=this._rings.length;p<A;p++)for(Y=this._rings[p],_=0,z=Y.length;_<z-1;_++)Z=Bw(Y[_],Y[_+1],l,_,!0),Z&&(f[j]=f[j]||[],f[j].push(Z[0]),(Z[1]!==Y[_+1]||_===z-2)&&(f[j].push(Z[1]),j++))}},_simplifyPoints:function(){for(var l=this._parts,f=this.options.smoothFactor,p=0,_=l.length;p<_;p++)l[p]=Lw(l[p],f)},_update:function(){this._map&&(this._clipPoints(),this._simplifyPoints(),this._updatePath())},_updatePath:function(){this._renderer._updatePoly(this)},_containsPoint:function(l,f){var p,_,j,A,z,Z,Y=this._clickTolerance();if(!this._pxBounds||!this._pxBounds.contains(l))return!1;for(p=0,A=this._parts.length;p<A;p++)for(Z=this._parts[p],_=0,z=Z.length,j=z-1;_<z;j=_++)if(!(!f&&_===0)&&zw(l,Z[j],Z[_])<=Y)return!0;return!1}});function rR(l,f){return new Xs(l,f)}Xs._flat=Vw;var _l=Xs.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 Rw(this._defaultShape(),this._map.options.crs)},_convertLatLngs:function(l){var f=Xs.prototype._convertLatLngs.call(this,l),p=f.length;return p>=2&&f[0]instanceof be&&f[0].equals(f[p-1])&&f.pop(),f},_setLatLngs:function(l){Xs.prototype._setLatLngs.call(this,l),gi(this._latlngs)&&(this._latlngs=[this._latlngs])},_defaultShape:function(){return gi(this._latlngs[0])?this._latlngs[0]:this._latlngs[0][0]},_clipPoints:function(){var l=this._renderer._bounds,f=this.options.weight,p=new B(f,f);if(l=new ie(l.min.subtract(p),l.max.add(p)),this._parts=[],!(!this._pxBounds||!this._pxBounds.intersects(l))){if(this.options.noClip){this._parts=this._rings;return}for(var _=0,j=this._rings.length,A;_<j;_++)A=Pw(this._rings[_],l,!0),A.length&&this._parts.push(A)}},_updatePath:function(){this._renderer._updatePoly(this,!0)},_containsPoint:function(l){var f=!1,p,_,j,A,z,Z,Y,te;if(!this._pxBounds||!this._pxBounds.contains(l))return!1;for(A=0,Y=this._parts.length;A<Y;A++)for(p=this._parts[A],z=0,te=p.length,Z=te-1;z<te;Z=z++)_=p[z],j=p[Z],_.y>l.y!=j.y>l.y&&l.x<(j.x-_.x)*(l.y-_.y)/(j.y-_.y)+_.x&&(f=!f);return f||Xs.prototype._containsPoint.call(this,l,!0)}});function aR(l,f){return new _l(l,f)}var Ks=qs.extend({initialize:function(l,f){w(this,f),this._layers={},l&&this.addData(l)},addData:function(l){var f=T(l)?l:l.features,p,_,j;if(f){for(p=0,_=f.length;p<_;p++)j=f[p],(j.geometries||j.geometry||j.features||j.coordinates)&&this.addData(j);return this}var A=this.options;if(A.filter&&!A.filter(l))return this;var z=mh(l,A);return z?(z.feature=vh(l),z.defaultOptions=z.options,this.resetStyle(z),A.onEachFeature&&A.onEachFeature(l,z),this.addLayer(z)):this},resetStyle:function(l){return l===void 0?this.eachLayer(this.resetStyle,this):(l.options=s({},l.defaultOptions),this._setLayerStyle(l,this.options.style),this)},setStyle:function(l){return this.eachLayer(function(f){this._setLayerStyle(f,l)},this)},_setLayerStyle:function(l,f){l.setStyle&&(typeof f=="function"&&(f=f(l.feature)),l.setStyle(f))}});function mh(l,f){var p=l.type==="Feature"?l.geometry:l,_=p?p.coordinates:null,j=[],A=f&&f.pointToLayer,z=f&&f.coordsToLatLng||p1,Z,Y,te,me;if(!_&&!p)return null;switch(p.type){case"Point":return Z=z(_),Zw(A,l,Z,f);case"MultiPoint":for(te=0,me=_.length;te<me;te++)Z=z(_[te]),j.push(Zw(A,l,Z,f));return new qs(j);case"LineString":case"MultiLineString":return Y=gh(_,p.type==="LineString"?0:1,z),new Xs(Y,f);case"Polygon":case"MultiPolygon":return Y=gh(_,p.type==="Polygon"?1:2,z),new _l(Y,f);case"GeometryCollection":for(te=0,me=p.geometries.length;te<me;te++){var Ne=mh({geometry:p.geometries[te],type:"Feature",properties:l.properties},f);Ne&&j.push(Ne)}return new qs(j);case"FeatureCollection":for(te=0,me=p.features.length;te<me;te++){var Ze=mh(p.features[te],f);Ze&&j.push(Ze)}return new qs(j);default:throw new Error("Invalid GeoJSON object.")}}function Zw(l,f,p,_){return l?l(f,p):new fh(p,_&&_.markersInheritOptions&&_)}function p1(l){return new be(l[1],l[0],l[2])}function gh(l,f,p){for(var _=[],j=0,A=l.length,z;j<A;j++)z=f?gh(l[j],f-1,p):(p||p1)(l[j]),_.push(z);return _}function v1(l,f){return l=we(l),l.alt!==void 0?[g(l.lng,f),g(l.lat,f),g(l.alt,f)]:[g(l.lng,f),g(l.lat,f)]}function ph(l,f,p,_){for(var j=[],A=0,z=l.length;A<z;A++)j.push(f?ph(l[A],gi(l[A])?0:f-1,p,_):v1(l[A],_));return!f&&p&&j.length>0&&j.push(j[0].slice()),j}function bl(l,f){return l.feature?s({},l.feature,{geometry:f}):vh(f)}function vh(l){return l.type==="Feature"||l.type==="FeatureCollection"?l:{type:"Feature",properties:{},geometry:l}}var x1={toGeoJSON:function(l){return bl(this,{type:"Point",coordinates:v1(this.getLatLng(),l)})}};fh.include(x1),g1.include(x1),hh.include(x1),Xs.include({toGeoJSON:function(l){var f=!gi(this._latlngs),p=ph(this._latlngs,f?1:0,!1,l);return bl(this,{type:(f?"Multi":"")+"LineString",coordinates:p})}}),_l.include({toGeoJSON:function(l){var f=!gi(this._latlngs),p=f&&!gi(this._latlngs[0]),_=ph(this._latlngs,p?2:f?1:0,!0,l);return f||(_=[_]),bl(this,{type:(p?"Multi":"")+"Polygon",coordinates:_})}}),xl.include({toMultiPoint:function(l){var f=[];return this.eachLayer(function(p){f.push(p.toGeoJSON(l).geometry.coordinates)}),bl(this,{type:"MultiPoint",coordinates:f})},toGeoJSON:function(l){var f=this.feature&&this.feature.geometry&&this.feature.geometry.type;if(f==="MultiPoint")return this.toMultiPoint(l);var p=f==="GeometryCollection",_=[];return this.eachLayer(function(j){if(j.toGeoJSON){var A=j.toGeoJSON(l);if(p)_.push(A.geometry);else{var z=vh(A);z.type==="FeatureCollection"?_.push.apply(_,z.features):_.push(z)}}}),p?bl(this,{geometries:_,type:"GeometryCollection"}):{type:"FeatureCollection",features:_}}});function $w(l,f){return new Ks(l,f)}var oR=$w,xh=Ui.extend({options:{opacity:1,alt:"",interactive:!1,crossOrigin:!1,errorOverlayUrl:"",zIndex:1,className:""},initialize:function(l,f,p){this._url=l,this._bounds=je(f),w(this,p)},onAdd:function(){this._image||(this._initImage(),this.options.opacity<1&&this._updateOpacity()),this.options.interactive&&(Ve(this._image,"leaflet-interactive"),this.addInteractiveTarget(this._image)),this.getPane().appendChild(this._image),this._reset()},onRemove:function(){Ot(this._image),this.options.interactive&&this.removeInteractiveTarget(this._image)},setOpacity:function(l){return this.options.opacity=l,this._image&&this._updateOpacity(),this},setStyle:function(l){return l.opacity&&this.setOpacity(l.opacity),this},bringToFront:function(){return this._map&&pl(this._image),this},bringToBack:function(){return this._map&&vl(this._image),this},setUrl:function(l){return this._url=l,this._image&&(this._image.src=l),this},setBounds:function(l){return this._bounds=je(l),this._map&&this._reset(),this},getEvents:function(){var l={zoom:this._reset,viewreset:this._reset};return this._zoomAnimated&&(l.zoomanim=this._animateZoom),l},setZIndex:function(l){return this.options.zIndex=l,this._updateZIndex(),this},getBounds:function(){return this._bounds},getElement:function(){return this._image},_initImage:function(){var l=this._url.tagName==="IMG",f=this._image=l?this._url:et("img");if(Ve(f,"leaflet-image-layer"),this._zoomAnimated&&Ve(f,"leaflet-zoom-animated"),this.options.className&&Ve(f,this.options.className),f.onselectstart=m,f.onmousemove=m,f.onload=a(this.fire,this,"load"),f.onerror=a(this._overlayOnError,this,"error"),(this.options.crossOrigin||this.options.crossOrigin==="")&&(f.crossOrigin=this.options.crossOrigin===!0?"":this.options.crossOrigin),this.options.zIndex&&this._updateZIndex(),l){this._url=f.src;return}f.src=this._url,f.alt=this.options.alt},_animateZoom:function(l){var f=this._map.getZoomScale(l.zoom),p=this._map._latLngBoundsToNewLayerBounds(this._bounds,l.zoom,l.center).min;qa(this._image,p,f)},_reset:function(){var l=this._image,f=new ie(this._map.latLngToLayerPoint(this._bounds.getNorthWest()),this._map.latLngToLayerPoint(this._bounds.getSouthEast())),p=f.getSize();Wt(l,f.min),l.style.width=p.x+"px",l.style.height=p.y+"px"},_updateOpacity:function(){mi(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 l=this.options.errorOverlayUrl;l&&this._url!==l&&(this._url=l,this._image.src=l)},getCenter:function(){return this._bounds.getCenter()}}),lR=function(l,f,p){return new xh(l,f,p)},Ww=xh.extend({options:{autoplay:!0,loop:!0,keepAspectRatio:!0,muted:!1,playsInline:!0},_initImage:function(){var l=this._url.tagName==="VIDEO",f=this._image=l?this._url:et("video");if(Ve(f,"leaflet-image-layer"),this._zoomAnimated&&Ve(f,"leaflet-zoom-animated"),this.options.className&&Ve(f,this.options.className),f.onselectstart=m,f.onmousemove=m,f.onloadeddata=a(this.fire,this,"load"),l){for(var p=f.getElementsByTagName("source"),_=[],j=0;j<p.length;j++)_.push(p[j].src);this._url=p.length>0?_:[f.src];return}T(this._url)||(this._url=[this._url]),!this.options.keepAspectRatio&&Object.prototype.hasOwnProperty.call(f.style,"objectFit")&&(f.style.objectFit="fill"),f.autoplay=!!this.options.autoplay,f.loop=!!this.options.loop,f.muted=!!this.options.muted,f.playsInline=!!this.options.playsInline;for(var A=0;A<this._url.length;A++){var z=et("source");z.src=this._url[A],f.appendChild(z)}}});function cR(l,f,p){return new Ww(l,f,p)}var Gw=xh.extend({_initImage:function(){var l=this._image=this._url;Ve(l,"leaflet-image-layer"),this._zoomAnimated&&Ve(l,"leaflet-zoom-animated"),this.options.className&&Ve(l,this.options.className),l.onselectstart=m,l.onmousemove=m}});function uR(l,f,p){return new Gw(l,f,p)}var gs=Ui.extend({options:{interactive:!1,offset:[0,0],className:"",pane:void 0,content:""},initialize:function(l,f){l&&(l instanceof be||T(l))?(this._latlng=we(l),w(this,f)):(w(this,l),this._source=f),this.options.content&&(this._content=this.options.content)},openOn:function(l){return l=arguments.length?l:this._source._map,l.hasLayer(this)||l.addLayer(this),this},close:function(){return this._map&&this._map.removeLayer(this),this},toggle:function(l){return this._map?this.close():(arguments.length?this._source=l:l=this._source,this._prepareOpen(),this.openOn(l._map)),this},onAdd:function(l){this._zoomAnimated=l._zoomAnimated,this._container||this._initLayout(),l._fadeAnimated&&mi(this._container,0),clearTimeout(this._removeTimeout),this.getPane().appendChild(this._container),this.update(),l._fadeAnimated&&mi(this._container,1),this.bringToFront(),this.options.interactive&&(Ve(this._container,"leaflet-interactive"),this.addInteractiveTarget(this._container))},onRemove:function(l){l._fadeAnimated?(mi(this._container,0),this._removeTimeout=setTimeout(a(Ot,void 0,this._container),200)):Ot(this._container),this.options.interactive&&(Ft(this._container,"leaflet-interactive"),this.removeInteractiveTarget(this._container))},getLatLng:function(){return this._latlng},setLatLng:function(l){return this._latlng=we(l),this._map&&(this._updatePosition(),this._adjustPan()),this},getContent:function(){return this._content},setContent:function(l){return this._content=l,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 l={zoom:this._updatePosition,viewreset:this._updatePosition};return this._zoomAnimated&&(l.zoomanim=this._animateZoom),l},isOpen:function(){return!!this._map&&this._map.hasLayer(this)},bringToFront:function(){return this._map&&pl(this._container),this},bringToBack:function(){return this._map&&vl(this._container),this},_prepareOpen:function(l){var f=this._source;if(!f._map)return!1;if(f instanceof qs){f=null;var p=this._source._layers;for(var _ in p)if(p[_]._map){f=p[_];break}if(!f)return!1;this._source=f}if(!l)if(f.getCenter)l=f.getCenter();else if(f.getLatLng)l=f.getLatLng();else if(f.getBounds)l=f.getBounds().getCenter();else throw new Error("Unable to get source layer LatLng.");return this.setLatLng(l),this._map&&this.update(),!0},_updateContent:function(){if(this._content){var l=this._contentNode,f=typeof this._content=="function"?this._content(this._source||this):this._content;if(typeof f=="string")l.innerHTML=f;else{for(;l.hasChildNodes();)l.removeChild(l.firstChild);l.appendChild(f)}this.fire("contentupdate")}},_updatePosition:function(){if(this._map){var l=this._map.latLngToLayerPoint(this._latlng),f=G(this.options.offset),p=this._getAnchor();this._zoomAnimated?Wt(this._container,l.add(p)):f=f.add(l).add(p);var _=this._containerBottom=-f.y,j=this._containerLeft=-Math.round(this._containerWidth/2)+f.x;this._container.style.bottom=_+"px",this._container.style.left=j+"px"}},_getAnchor:function(){return[0,0]}});Ke.include({_initOverlay:function(l,f,p,_){var j=f;return j instanceof l||(j=new l(_).setContent(f)),p&&j.setLatLng(p),j}}),Ui.include({_initOverlay:function(l,f,p,_){var j=p;return j instanceof l?(w(j,_),j._source=this):(j=f&&!_?f:new l(_,this),j.setContent(p)),j}});var yh=gs.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(l){return l=arguments.length?l:this._source._map,!l.hasLayer(this)&&l._popup&&l._popup.options.autoClose&&l.removeLayer(l._popup),l._popup=this,gs.prototype.openOn.call(this,l)},onAdd:function(l){gs.prototype.onAdd.call(this,l),l.fire("popupopen",{popup:this}),this._source&&(this._source.fire("popupopen",{popup:this},!0),this._source instanceof Hr||this._source.on("preclick",Ka))},onRemove:function(l){gs.prototype.onRemove.call(this,l),l.fire("popupclose",{popup:this}),this._source&&(this._source.fire("popupclose",{popup:this},!0),this._source instanceof Hr||this._source.off("preclick",Ka))},getEvents:function(){var l=gs.prototype.getEvents.call(this);return(this.options.closeOnClick!==void 0?this.options.closeOnClick:this._map.options.closePopupOnClick)&&(l.preclick=this.close),this.options.keepInView&&(l.moveend=this._adjustPan),l},_initLayout:function(){var l="leaflet-popup",f=this._container=et("div",l+" "+(this.options.className||"")+" leaflet-zoom-animated"),p=this._wrapper=et("div",l+"-content-wrapper",f);if(this._contentNode=et("div",l+"-content",p),Tu(f),o1(this._contentNode),ze(f,"contextmenu",Ka),this._tipContainer=et("div",l+"-tip-container",f),this._tip=et("div",l+"-tip",this._tipContainer),this.options.closeButton){var _=this._closeButton=et("a",l+"-close-button",f);_.setAttribute("role","button"),_.setAttribute("aria-label","Close popup"),_.href="#close",_.innerHTML='<span aria-hidden="true">&#215;</span>',ze(_,"click",function(j){cn(j),this.close()},this)}},_updateLayout:function(){var l=this._contentNode,f=l.style;f.width="",f.whiteSpace="nowrap";var p=l.offsetWidth;p=Math.min(p,this.options.maxWidth),p=Math.max(p,this.options.minWidth),f.width=p+1+"px",f.whiteSpace="",f.height="";var _=l.offsetHeight,j=this.options.maxHeight,A="leaflet-popup-scrolled";j&&_>j?(f.height=j+"px",Ve(l,A)):Ft(l,A),this._containerWidth=this._container.offsetWidth},_animateZoom:function(l){var f=this._map._latLngToNewLayerPoint(this._latlng,l.zoom,l.center),p=this._getAnchor();Wt(this._container,f.add(p))},_adjustPan:function(){if(this.options.autoPan){if(this._map._panAnim&&this._map._panAnim.stop(),this._autopanning){this._autopanning=!1;return}var l=this._map,f=parseInt(wu(this._container,"marginBottom"),10)||0,p=this._container.offsetHeight+f,_=this._containerWidth,j=new B(this._containerLeft,-p-this._containerBottom);j._add(Xa(this._container));var A=l.layerPointToContainerPoint(j),z=G(this.options.autoPanPadding),Z=G(this.options.autoPanPaddingTopLeft||z),Y=G(this.options.autoPanPaddingBottomRight||z),te=l.getSize(),me=0,Ne=0;A.x+_+Y.x>te.x&&(me=A.x+_-te.x+Y.x),A.x-me-Z.x<0&&(me=A.x-Z.x),A.y+p+Y.y>te.y&&(Ne=A.y+p-te.y+Y.y),A.y-Ne-Z.y<0&&(Ne=A.y-Z.y),(me||Ne)&&(this.options.keepInView&&(this._autopanning=!0),l.fire("autopanstart").panBy([me,Ne]))}},_getAnchor:function(){return G(this._source&&this._source._getPopupAnchor?this._source._getPopupAnchor():[0,0])}}),dR=function(l,f){return new yh(l,f)};Ke.mergeOptions({closePopupOnClick:!0}),Ke.include({openPopup:function(l,f,p){return this._initOverlay(yh,l,f,p).openOn(this),this},closePopup:function(l){return l=arguments.length?l:this._popup,l&&l.close(),this}}),Ui.include({bindPopup:function(l,f){return this._popup=this._initOverlay(yh,this._popup,l,f),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(l){return this._popup&&(this instanceof qs||(this._popup._source=this),this._popup._prepareOpen(l||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(l){return this._popup&&this._popup.setContent(l),this},getPopup:function(){return this._popup},_openPopup:function(l){if(!(!this._popup||!this._map)){Qa(l);var f=l.layer||l.target;if(this._popup._source===f&&!(f instanceof Hr)){this._map.hasLayer(this._popup)?this.closePopup():this.openPopup(l.latlng);return}this._popup._source=f,this.openPopup(l.latlng)}},_movePopup:function(l){this._popup.setLatLng(l.latlng)},_onKeyPress:function(l){l.originalEvent.keyCode===13&&this._openPopup(l)}});var _h=gs.extend({options:{pane:"tooltipPane",offset:[0,0],direction:"auto",permanent:!1,sticky:!1,opacity:.9},onAdd:function(l){gs.prototype.onAdd.call(this,l),this.setOpacity(this.options.opacity),l.fire("tooltipopen",{tooltip:this}),this._source&&(this.addEventParent(this._source),this._source.fire("tooltipopen",{tooltip:this},!0))},onRemove:function(l){gs.prototype.onRemove.call(this,l),l.fire("tooltipclose",{tooltip:this}),this._source&&(this.removeEventParent(this._source),this._source.fire("tooltipclose",{tooltip:this},!0))},getEvents:function(){var l=gs.prototype.getEvents.call(this);return this.options.permanent||(l.preclick=this.close),l},_initLayout:function(){var l="leaflet-tooltip",f=l+" "+(this.options.className||"")+" leaflet-zoom-"+(this._zoomAnimated?"animated":"hide");this._contentNode=this._container=et("div",f),this._container.setAttribute("role","tooltip"),this._container.setAttribute("id","leaflet-tooltip-"+c(this))},_updateLayout:function(){},_adjustPan:function(){},_setPosition:function(l){var f,p,_=this._map,j=this._container,A=_.latLngToContainerPoint(_.getCenter()),z=_.layerPointToContainerPoint(l),Z=this.options.direction,Y=j.offsetWidth,te=j.offsetHeight,me=G(this.options.offset),Ne=this._getAnchor();Z==="top"?(f=Y/2,p=te):Z==="bottom"?(f=Y/2,p=0):Z==="center"?(f=Y/2,p=te/2):Z==="right"?(f=0,p=te/2):Z==="left"?(f=Y,p=te/2):z.x<A.x?(Z="right",f=0,p=te/2):(Z="left",f=Y+(me.x+Ne.x)*2,p=te/2),l=l.subtract(G(f,p,!0)).add(me).add(Ne),Ft(j,"leaflet-tooltip-right"),Ft(j,"leaflet-tooltip-left"),Ft(j,"leaflet-tooltip-top"),Ft(j,"leaflet-tooltip-bottom"),Ve(j,"leaflet-tooltip-"+Z),Wt(j,l)},_updatePosition:function(){var l=this._map.latLngToLayerPoint(this._latlng);this._setPosition(l)},setOpacity:function(l){this.options.opacity=l,this._container&&mi(this._container,l)},_animateZoom:function(l){var f=this._map._latLngToNewLayerPoint(this._latlng,l.zoom,l.center);this._setPosition(f)},_getAnchor:function(){return G(this._source&&this._source._getTooltipAnchor&&!this.options.sticky?this._source._getTooltipAnchor():[0,0])}}),fR=function(l,f){return new _h(l,f)};Ke.include({openTooltip:function(l,f,p){return this._initOverlay(_h,l,f,p).openOn(this),this},closeTooltip:function(l){return l.close(),this}}),Ui.include({bindTooltip:function(l,f){return this._tooltip&&this.isTooltipOpen()&&this.unbindTooltip(),this._tooltip=this._initOverlay(_h,this._tooltip,l,f),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(l){if(!(!l&&this._tooltipHandlersAdded)){var f=l?"off":"on",p={remove:this.closeTooltip,move:this._moveTooltip};this._tooltip.options.permanent?p.add=this._openTooltip:(p.mouseover=this._openTooltip,p.mouseout=this.closeTooltip,p.click=this._openTooltip,this._map?this._addFocusListeners():p.add=this._addFocusListeners),this._tooltip.options.sticky&&(p.mousemove=this._moveTooltip),this[f](p),this._tooltipHandlersAdded=!l}},openTooltip:function(l){return this._tooltip&&(this instanceof qs||(this._tooltip._source=this),this._tooltip._prepareOpen(l)&&(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(l){return this._tooltip&&this._tooltip.setContent(l),this},getTooltip:function(){return this._tooltip},_addFocusListeners:function(){this.getElement?this._addFocusListenersOnLayer(this):this.eachLayer&&this.eachLayer(this._addFocusListenersOnLayer,this)},_addFocusListenersOnLayer:function(l){var f=typeof l.getElement=="function"&&l.getElement();f&&(ze(f,"focus",function(){this._tooltip._source=l,this.openTooltip()},this),ze(f,"blur",this.closeTooltip,this))},_setAriaDescribedByOnLayer:function(l){var f=typeof l.getElement=="function"&&l.getElement();f&&f.setAttribute("aria-describedby",this._tooltip._container.id)},_openTooltip:function(l){if(!(!this._tooltip||!this._map)){if(this._map.dragging&&this._map.dragging.moving()&&!this._openOnceFlag){this._openOnceFlag=!0;var f=this;this._map.once("moveend",function(){f._openOnceFlag=!1,f._openTooltip(l)});return}this._tooltip._source=l.layer||l.target,this.openTooltip(this._tooltip.options.sticky?l.latlng:void 0)}},_moveTooltip:function(l){var f=l.latlng,p,_;this._tooltip.options.sticky&&l.originalEvent&&(p=this._map.mouseEventToContainerPoint(l.originalEvent),_=this._map.containerPointToLayerPoint(p),f=this._map.layerPointToLatLng(_)),this._tooltip.setLatLng(f)}});var Yw=yl.extend({options:{iconSize:[12,12],html:!1,bgPos:null,className:"leaflet-div-icon"},createIcon:function(l){var f=l&&l.tagName==="DIV"?l:document.createElement("div"),p=this.options;if(p.html instanceof Element?(ah(f),f.appendChild(p.html)):f.innerHTML=p.html!==!1?p.html:"",p.bgPos){var _=G(p.bgPos);f.style.backgroundPosition=-_.x+"px "+-_.y+"px"}return this._setIconStyles(f,"icon"),f},createShadow:function(){return null}});function hR(l){return new Yw(l)}yl.Default=ku;var Eu=Ui.extend({options:{tileSize:256,opacity:1,updateWhenIdle:_e.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(l){w(this,l)},onAdd:function(){this._initContainer(),this._levels={},this._tiles={},this._resetView()},beforeAdd:function(l){l._addZoomLimit(this)},onRemove:function(l){this._removeAllTiles(),Ot(this._container),l._removeZoomLimit(this),this._container=null,this._tileZoom=void 0},bringToFront:function(){return this._map&&(pl(this._container),this._setAutoZIndex(Math.max)),this},bringToBack:function(){return this._map&&(vl(this._container),this._setAutoZIndex(Math.min)),this},getContainer:function(){return this._container},setOpacity:function(l){return this.options.opacity=l,this._updateOpacity(),this},setZIndex:function(l){return this.options.zIndex=l,this._updateZIndex(),this},isLoading:function(){return this._loading},redraw:function(){if(this._map){this._removeAllTiles();var l=this._clampZoom(this._map.getZoom());l!==this._tileZoom&&(this._tileZoom=l,this._updateLevels()),this._update()}return this},getEvents:function(){var l={viewprereset:this._invalidateAll,viewreset:this._resetView,zoom:this._resetView,moveend:this._onMoveEnd};return this.options.updateWhenIdle||(this._onMove||(this._onMove=d(this._onMoveEnd,this.options.updateInterval,this)),l.move=this._onMove),this._zoomAnimated&&(l.zoomanim=this._animateZoom),l},createTile:function(){return document.createElement("div")},getTileSize:function(){var l=this.options.tileSize;return l instanceof B?l:new B(l,l)},_updateZIndex:function(){this._container&&this.options.zIndex!==void 0&&this.options.zIndex!==null&&(this._container.style.zIndex=this.options.zIndex)},_setAutoZIndex:function(l){for(var f=this.getPane().children,p=-l(-1/0,1/0),_=0,j=f.length,A;_<j;_++)A=f[_].style.zIndex,f[_]!==this._container&&A&&(p=l(p,+A));isFinite(p)&&(this.options.zIndex=p+l(-1,1),this._updateZIndex())},_updateOpacity:function(){if(this._map&&!_e.ielt9){mi(this._container,this.options.opacity);var l=+new Date,f=!1,p=!1;for(var _ in this._tiles){var j=this._tiles[_];if(!(!j.current||!j.loaded)){var A=Math.min(1,(l-j.loaded)/200);mi(j.el,A),A<1?f=!0:(j.active?p=!0:this._onOpaqueTile(j),j.active=!0)}}p&&!this._noPrune&&this._pruneTiles(),f&&(V(this._fadeFrame),this._fadeFrame=H(this._updateOpacity,this))}},_onOpaqueTile:m,_initContainer:function(){this._container||(this._container=et("div","leaflet-layer "+(this.options.className||"")),this._updateZIndex(),this.options.opacity<1&&this._updateOpacity(),this.getPane().appendChild(this._container))},_updateLevels:function(){var l=this._tileZoom,f=this.options.maxZoom;if(l!==void 0){for(var p in this._levels)p=Number(p),this._levels[p].el.children.length||p===l?(this._levels[p].el.style.zIndex=f-Math.abs(l-p),this._onUpdateLevel(p)):(Ot(this._levels[p].el),this._removeTilesAtZoom(p),this._onRemoveLevel(p),delete this._levels[p]);var _=this._levels[l],j=this._map;return _||(_=this._levels[l]={},_.el=et("div","leaflet-tile-container leaflet-zoom-animated",this._container),_.el.style.zIndex=f,_.origin=j.project(j.unproject(j.getPixelOrigin()),l).round(),_.zoom=l,this._setZoomTransform(_,j.getCenter(),j.getZoom()),m(_.el.offsetWidth),this._onCreateLevel(_)),this._level=_,_}},_onUpdateLevel:m,_onRemoveLevel:m,_onCreateLevel:m,_pruneTiles:function(){if(this._map){var l,f,p=this._map.getZoom();if(p>this.options.maxZoom||p<this.options.minZoom){this._removeAllTiles();return}for(l in this._tiles)f=this._tiles[l],f.retain=f.current;for(l in this._tiles)if(f=this._tiles[l],f.current&&!f.active){var _=f.coords;this._retainParent(_.x,_.y,_.z,_.z-5)||this._retainChildren(_.x,_.y,_.z,_.z+2)}for(l in this._tiles)this._tiles[l].retain||this._removeTile(l)}},_removeTilesAtZoom:function(l){for(var f in this._tiles)this._tiles[f].coords.z===l&&this._removeTile(f)},_removeAllTiles:function(){for(var l in this._tiles)this._removeTile(l)},_invalidateAll:function(){for(var l in this._levels)Ot(this._levels[l].el),this._onRemoveLevel(Number(l)),delete this._levels[l];this._removeAllTiles(),this._tileZoom=void 0},_retainParent:function(l,f,p,_){var j=Math.floor(l/2),A=Math.floor(f/2),z=p-1,Z=new B(+j,+A);Z.z=+z;var Y=this._tileCoordsToKey(Z),te=this._tiles[Y];return te&&te.active?(te.retain=!0,!0):(te&&te.loaded&&(te.retain=!0),z>_?this._retainParent(j,A,z,_):!1)},_retainChildren:function(l,f,p,_){for(var j=2*l;j<2*l+2;j++)for(var A=2*f;A<2*f+2;A++){var z=new B(j,A);z.z=p+1;var Z=this._tileCoordsToKey(z),Y=this._tiles[Z];if(Y&&Y.active){Y.retain=!0;continue}else Y&&Y.loaded&&(Y.retain=!0);p+1<_&&this._retainChildren(j,A,p+1,_)}},_resetView:function(l){var f=l&&(l.pinch||l.flyTo);this._setView(this._map.getCenter(),this._map.getZoom(),f,f)},_animateZoom:function(l){this._setView(l.center,l.zoom,!0,l.noUpdate)},_clampZoom:function(l){var f=this.options;return f.minNativeZoom!==void 0&&l<f.minNativeZoom?f.minNativeZoom:f.maxNativeZoom!==void 0&&f.maxNativeZoom<l?f.maxNativeZoom:l},_setView:function(l,f,p,_){var j=Math.round(f);this.options.maxZoom!==void 0&&j>this.options.maxZoom||this.options.minZoom!==void 0&&j<this.options.minZoom?j=void 0:j=this._clampZoom(j);var A=this.options.updateWhenZooming&&j!==this._tileZoom;(!_||A)&&(this._tileZoom=j,this._abortLoading&&this._abortLoading(),this._updateLevels(),this._resetGrid(),j!==void 0&&this._update(l),p||this._pruneTiles(),this._noPrune=!!p),this._setZoomTransforms(l,f)},_setZoomTransforms:function(l,f){for(var p in this._levels)this._setZoomTransform(this._levels[p],l,f)},_setZoomTransform:function(l,f,p){var _=this._map.getZoomScale(p,l.zoom),j=l.origin.multiplyBy(_).subtract(this._map._getNewPixelOrigin(f,p)).round();_e.any3d?qa(l.el,j,_):Wt(l.el,j)},_resetGrid:function(){var l=this._map,f=l.options.crs,p=this._tileSize=this.getTileSize(),_=this._tileZoom,j=this._map.getPixelWorldBounds(this._tileZoom);j&&(this._globalTileRange=this._pxBoundsToTileRange(j)),this._wrapX=f.wrapLng&&!this.options.noWrap&&[Math.floor(l.project([0,f.wrapLng[0]],_).x/p.x),Math.ceil(l.project([0,f.wrapLng[1]],_).x/p.y)],this._wrapY=f.wrapLat&&!this.options.noWrap&&[Math.floor(l.project([f.wrapLat[0],0],_).y/p.x),Math.ceil(l.project([f.wrapLat[1],0],_).y/p.y)]},_onMoveEnd:function(){!this._map||this._map._animatingZoom||this._update()},_getTiledPixelBounds:function(l){var f=this._map,p=f._animatingZoom?Math.max(f._animateToZoom,f.getZoom()):f.getZoom(),_=f.getZoomScale(p,this._tileZoom),j=f.project(l,this._tileZoom).floor(),A=f.getSize().divideBy(_*2);return new ie(j.subtract(A),j.add(A))},_update:function(l){var f=this._map;if(f){var p=this._clampZoom(f.getZoom());if(l===void 0&&(l=f.getCenter()),this._tileZoom!==void 0){var _=this._getTiledPixelBounds(l),j=this._pxBoundsToTileRange(_),A=j.getCenter(),z=[],Z=this.options.keepBuffer,Y=new ie(j.getBottomLeft().subtract([Z,-Z]),j.getTopRight().add([Z,-Z]));if(!(isFinite(j.min.x)&&isFinite(j.min.y)&&isFinite(j.max.x)&&isFinite(j.max.y)))throw new Error("Attempted to load an infinite number of tiles");for(var te in this._tiles){var me=this._tiles[te].coords;(me.z!==this._tileZoom||!Y.contains(new B(me.x,me.y)))&&(this._tiles[te].current=!1)}if(Math.abs(p-this._tileZoom)>1){this._setView(l,p);return}for(var Ne=j.min.y;Ne<=j.max.y;Ne++)for(var Ze=j.min.x;Ze<=j.max.x;Ze++){var Pn=new B(Ze,Ne);if(Pn.z=this._tileZoom,!!this._isValidTile(Pn)){var sn=this._tiles[this._tileCoordsToKey(Pn)];sn?sn.current=!0:z.push(Pn)}}if(z.sort(function($n,Sl){return $n.distanceTo(A)-Sl.distanceTo(A)}),z.length!==0){this._loading||(this._loading=!0,this.fire("loading"));var pi=document.createDocumentFragment();for(Ze=0;Ze<z.length;Ze++)this._addTile(z[Ze],pi);this._level.el.appendChild(pi)}}}},_isValidTile:function(l){var f=this._map.options.crs;if(!f.infinite){var p=this._globalTileRange;if(!f.wrapLng&&(l.x<p.min.x||l.x>p.max.x)||!f.wrapLat&&(l.y<p.min.y||l.y>p.max.y))return!1}if(!this.options.bounds)return!0;var _=this._tileCoordsToBounds(l);return je(this.options.bounds).overlaps(_)},_keyToBounds:function(l){return this._tileCoordsToBounds(this._keyToTileCoords(l))},_tileCoordsToNwSe:function(l){var f=this._map,p=this.getTileSize(),_=l.scaleBy(p),j=_.add(p),A=f.unproject(_,l.z),z=f.unproject(j,l.z);return[A,z]},_tileCoordsToBounds:function(l){var f=this._tileCoordsToNwSe(l),p=new Le(f[0],f[1]);return this.options.noWrap||(p=this._map.wrapLatLngBounds(p)),p},_tileCoordsToKey:function(l){return l.x+":"+l.y+":"+l.z},_keyToTileCoords:function(l){var f=l.split(":"),p=new B(+f[0],+f[1]);return p.z=+f[2],p},_removeTile:function(l){var f=this._tiles[l];f&&(Ot(f.el),delete this._tiles[l],this.fire("tileunload",{tile:f.el,coords:this._keyToTileCoords(l)}))},_initTile:function(l){Ve(l,"leaflet-tile");var f=this.getTileSize();l.style.width=f.x+"px",l.style.height=f.y+"px",l.onselectstart=m,l.onmousemove=m,_e.ielt9&&this.options.opacity<1&&mi(l,this.options.opacity)},_addTile:function(l,f){var p=this._getTilePos(l),_=this._tileCoordsToKey(l),j=this.createTile(this._wrapCoords(l),a(this._tileReady,this,l));this._initTile(j),this.createTile.length<2&&H(a(this._tileReady,this,l,null,j)),Wt(j,p),this._tiles[_]={el:j,coords:l,current:!0},f.appendChild(j),this.fire("tileloadstart",{tile:j,coords:l})},_tileReady:function(l,f,p){f&&this.fire("tileerror",{error:f,tile:p,coords:l});var _=this._tileCoordsToKey(l);p=this._tiles[_],p&&(p.loaded=+new Date,this._map._fadeAnimated?(mi(p.el,0),V(this._fadeFrame),this._fadeFrame=H(this._updateOpacity,this)):(p.active=!0,this._pruneTiles()),f||(Ve(p.el,"leaflet-tile-loaded"),this.fire("tileload",{tile:p.el,coords:l})),this._noTilesToLoad()&&(this._loading=!1,this.fire("load"),_e.ielt9||!this._map._fadeAnimated?H(this._pruneTiles,this):setTimeout(a(this._pruneTiles,this),250)))},_getTilePos:function(l){return l.scaleBy(this.getTileSize()).subtract(this._level.origin)},_wrapCoords:function(l){var f=new B(this._wrapX?h(l.x,this._wrapX):l.x,this._wrapY?h(l.y,this._wrapY):l.y);return f.z=l.z,f},_pxBoundsToTileRange:function(l){var f=this.getTileSize();return new ie(l.min.unscaleBy(f).floor(),l.max.unscaleBy(f).ceil().subtract([1,1]))},_noTilesToLoad:function(){for(var l in this._tiles)if(!this._tiles[l].loaded)return!1;return!0}});function mR(l){return new Eu(l)}var wl=Eu.extend({options:{minZoom:0,maxZoom:18,subdomains:"abc",errorTileUrl:"",zoomOffset:0,tms:!1,zoomReverse:!1,detectRetina:!1,crossOrigin:!1,referrerPolicy:!1},initialize:function(l,f){this._url=l,f=w(this,f),f.detectRetina&&_e.retina&&f.maxZoom>0?(f.tileSize=Math.floor(f.tileSize/2),f.zoomReverse?(f.zoomOffset--,f.minZoom=Math.min(f.maxZoom,f.minZoom+1)):(f.zoomOffset++,f.maxZoom=Math.max(f.minZoom,f.maxZoom-1)),f.minZoom=Math.max(0,f.minZoom)):f.zoomReverse?f.minZoom=Math.min(f.maxZoom,f.minZoom):f.maxZoom=Math.max(f.minZoom,f.maxZoom),typeof f.subdomains=="string"&&(f.subdomains=f.subdomains.split("")),this.on("tileunload",this._onTileRemove)},setUrl:function(l,f){return this._url===l&&f===void 0&&(f=!0),this._url=l,f||this.redraw(),this},createTile:function(l,f){var p=document.createElement("img");return ze(p,"load",a(this._tileOnLoad,this,f,p)),ze(p,"error",a(this._tileOnError,this,f,p)),(this.options.crossOrigin||this.options.crossOrigin==="")&&(p.crossOrigin=this.options.crossOrigin===!0?"":this.options.crossOrigin),typeof this.options.referrerPolicy=="string"&&(p.referrerPolicy=this.options.referrerPolicy),p.alt="",p.src=this.getTileUrl(l),p},getTileUrl:function(l){var f={r:_e.retina?"@2x":"",s:this._getSubdomain(l),x:l.x,y:l.y,z:this._getZoomForUrl()};if(this._map&&!this._map.options.crs.infinite){var p=this._globalTileRange.max.y-l.y;this.options.tms&&(f.y=p),f["-y"]=p}return S(this._url,s(f,this.options))},_tileOnLoad:function(l,f){_e.ielt9?setTimeout(a(l,this,null,f),0):l(null,f)},_tileOnError:function(l,f,p){var _=this.options.errorTileUrl;_&&f.getAttribute("src")!==_&&(f.src=_),l(p,f)},_onTileRemove:function(l){l.tile.onload=null},_getZoomForUrl:function(){var l=this._tileZoom,f=this.options.maxZoom,p=this.options.zoomReverse,_=this.options.zoomOffset;return p&&(l=f-l),l+_},_getSubdomain:function(l){var f=Math.abs(l.x+l.y)%this.options.subdomains.length;return this.options.subdomains[f]},_abortLoading:function(){var l,f;for(l in this._tiles)if(this._tiles[l].coords.z!==this._tileZoom&&(f=this._tiles[l].el,f.onload=m,f.onerror=m,!f.complete)){f.src=k;var p=this._tiles[l].coords;Ot(f),delete this._tiles[l],this.fire("tileabort",{tile:f,coords:p})}},_removeTile:function(l){var f=this._tiles[l];if(f)return f.el.setAttribute("src",k),Eu.prototype._removeTile.call(this,l)},_tileReady:function(l,f,p){if(!(!this._map||p&&p.getAttribute("src")===k))return Eu.prototype._tileReady.call(this,l,f,p)}});function qw(l,f){return new wl(l,f)}var Xw=wl.extend({defaultWmsParams:{service:"WMS",request:"GetMap",layers:"",styles:"",format:"image/jpeg",transparent:!1,version:"1.1.1"},options:{crs:null,uppercase:!1},initialize:function(l,f){this._url=l;var p=s({},this.defaultWmsParams);for(var _ in f)_ in this.options||(p[_]=f[_]);f=w(this,f);var j=f.detectRetina&&_e.retina?2:1,A=this.getTileSize();p.width=A.x*j,p.height=A.y*j,this.wmsParams=p},onAdd:function(l){this._crs=this.options.crs||l.options.crs,this._wmsVersion=parseFloat(this.wmsParams.version);var f=this._wmsVersion>=1.3?"crs":"srs";this.wmsParams[f]=this._crs.code,wl.prototype.onAdd.call(this,l)},getTileUrl:function(l){var f=this._tileCoordsToNwSe(l),p=this._crs,_=se(p.project(f[0]),p.project(f[1])),j=_.min,A=_.max,z=(this._wmsVersion>=1.3&&this._crs===Fw?[j.y,j.x,A.y,A.x]:[j.x,j.y,A.x,A.y]).join(","),Z=wl.prototype.getTileUrl.call(this,l);return Z+M(this.wmsParams,Z,this.options.uppercase)+(this.options.uppercase?"&BBOX=":"&bbox=")+z},setParams:function(l,f){return s(this.wmsParams,l),f||this.redraw(),this}});function gR(l,f){return new Xw(l,f)}wl.WMS=Xw,qw.wms=gR;var Qs=Ui.extend({options:{padding:.1},initialize:function(l){w(this,l),c(this),this._layers=this._layers||{}},onAdd:function(){this._container||(this._initContainer(),Ve(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 l={viewreset:this._reset,zoom:this._onZoom,moveend:this._update,zoomend:this._onZoomEnd};return this._zoomAnimated&&(l.zoomanim=this._onAnimZoom),l},_onAnimZoom:function(l){this._updateTransform(l.center,l.zoom)},_onZoom:function(){this._updateTransform(this._map.getCenter(),this._map.getZoom())},_updateTransform:function(l,f){var p=this._map.getZoomScale(f,this._zoom),_=this._map.getSize().multiplyBy(.5+this.options.padding),j=this._map.project(this._center,f),A=_.multiplyBy(-p).add(j).subtract(this._map._getNewPixelOrigin(l,f));_e.any3d?qa(this._container,A,p):Wt(this._container,A)},_reset:function(){this._update(),this._updateTransform(this._center,this._zoom);for(var l in this._layers)this._layers[l]._reset()},_onZoomEnd:function(){for(var l in this._layers)this._layers[l]._project()},_updatePaths:function(){for(var l in this._layers)this._layers[l]._update()},_update:function(){var l=this.options.padding,f=this._map.getSize(),p=this._map.containerPointToLayerPoint(f.multiplyBy(-l)).round();this._bounds=new ie(p,p.add(f.multiplyBy(1+l*2)).round()),this._center=this._map.getCenter(),this._zoom=this._map.getZoom()}}),Kw=Qs.extend({options:{tolerance:0},getEvents:function(){var l=Qs.prototype.getEvents.call(this);return l.viewprereset=this._onViewPreReset,l},_onViewPreReset:function(){this._postponeUpdatePaths=!0},onAdd:function(){Qs.prototype.onAdd.call(this),this._draw()},_initContainer:function(){var l=this._container=document.createElement("canvas");ze(l,"mousemove",this._onMouseMove,this),ze(l,"click dblclick mousedown mouseup contextmenu",this._onClick,this),ze(l,"mouseout",this._handleMouseOut,this),l._leaflet_disable_events=!0,this._ctx=l.getContext("2d")},_destroyContainer:function(){V(this._redrawRequest),delete this._ctx,Ot(this._container),pt(this._container),delete this._container},_updatePaths:function(){if(!this._postponeUpdatePaths){var l;this._redrawBounds=null;for(var f in this._layers)l=this._layers[f],l._update();this._redraw()}},_update:function(){if(!(this._map._animatingZoom&&this._bounds)){Qs.prototype._update.call(this);var l=this._bounds,f=this._container,p=l.getSize(),_=_e.retina?2:1;Wt(f,l.min),f.width=_*p.x,f.height=_*p.y,f.style.width=p.x+"px",f.style.height=p.y+"px",_e.retina&&this._ctx.scale(2,2),this._ctx.translate(-l.min.x,-l.min.y),this.fire("update")}},_reset:function(){Qs.prototype._reset.call(this),this._postponeUpdatePaths&&(this._postponeUpdatePaths=!1,this._updatePaths())},_initPath:function(l){this._updateDashArray(l),this._layers[c(l)]=l;var f=l._order={layer:l,prev:this._drawLast,next:null};this._drawLast&&(this._drawLast.next=f),this._drawLast=f,this._drawFirst=this._drawFirst||this._drawLast},_addPath:function(l){this._requestRedraw(l)},_removePath:function(l){var f=l._order,p=f.next,_=f.prev;p?p.prev=_:this._drawLast=_,_?_.next=p:this._drawFirst=p,delete l._order,delete this._layers[c(l)],this._requestRedraw(l)},_updatePath:function(l){this._extendRedrawBounds(l),l._project(),l._update(),this._requestRedraw(l)},_updateStyle:function(l){this._updateDashArray(l),this._requestRedraw(l)},_updateDashArray:function(l){if(typeof l.options.dashArray=="string"){var f=l.options.dashArray.split(/[, ]+/),p=[],_,j;for(j=0;j<f.length;j++){if(_=Number(f[j]),isNaN(_))return;p.push(_)}l.options._dashArray=p}else l.options._dashArray=l.options.dashArray},_requestRedraw:function(l){this._map&&(this._extendRedrawBounds(l),this._redrawRequest=this._redrawRequest||H(this._redraw,this))},_extendRedrawBounds:function(l){if(l._pxBounds){var f=(l.options.weight||0)+1;this._redrawBounds=this._redrawBounds||new ie,this._redrawBounds.extend(l._pxBounds.min.subtract([f,f])),this._redrawBounds.extend(l._pxBounds.max.add([f,f]))}},_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 l=this._redrawBounds;if(l){var f=l.getSize();this._ctx.clearRect(l.min.x,l.min.y,f.x,f.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 l,f=this._redrawBounds;if(this._ctx.save(),f){var p=f.getSize();this._ctx.beginPath(),this._ctx.rect(f.min.x,f.min.y,p.x,p.y),this._ctx.clip()}this._drawing=!0;for(var _=this._drawFirst;_;_=_.next)l=_.layer,(!f||l._pxBounds&&l._pxBounds.intersects(f))&&l._updatePath();this._drawing=!1,this._ctx.restore()},_updatePoly:function(l,f){if(this._drawing){var p,_,j,A,z=l._parts,Z=z.length,Y=this._ctx;if(Z){for(Y.beginPath(),p=0;p<Z;p++){for(_=0,j=z[p].length;_<j;_++)A=z[p][_],Y[_?"lineTo":"moveTo"](A.x,A.y);f&&Y.closePath()}this._fillStroke(Y,l)}}},_updateCircle:function(l){if(!(!this._drawing||l._empty())){var f=l._point,p=this._ctx,_=Math.max(Math.round(l._radius),1),j=(Math.max(Math.round(l._radiusY),1)||_)/_;j!==1&&(p.save(),p.scale(1,j)),p.beginPath(),p.arc(f.x,f.y/j,_,0,Math.PI*2,!1),j!==1&&p.restore(),this._fillStroke(p,l)}},_fillStroke:function(l,f){var p=f.options;p.fill&&(l.globalAlpha=p.fillOpacity,l.fillStyle=p.fillColor||p.color,l.fill(p.fillRule||"evenodd")),p.stroke&&p.weight!==0&&(l.setLineDash&&l.setLineDash(f.options&&f.options._dashArray||[]),l.globalAlpha=p.opacity,l.lineWidth=p.weight,l.strokeStyle=p.color,l.lineCap=p.lineCap,l.lineJoin=p.lineJoin,l.stroke())},_onClick:function(l){for(var f=this._map.mouseEventToLayerPoint(l),p,_,j=this._drawFirst;j;j=j.next)p=j.layer,p.options.interactive&&p._containsPoint(f)&&(!(l.type==="click"||l.type==="preclick")||!this._map._draggableMoved(p))&&(_=p);this._fireEvent(_?[_]:!1,l)},_onMouseMove:function(l){if(!(!this._map||this._map.dragging.moving()||this._map._animatingZoom)){var f=this._map.mouseEventToLayerPoint(l);this._handleMouseHover(l,f)}},_handleMouseOut:function(l){var f=this._hoveredLayer;f&&(Ft(this._container,"leaflet-interactive"),this._fireEvent([f],l,"mouseout"),this._hoveredLayer=null,this._mouseHoverThrottled=!1)},_handleMouseHover:function(l,f){if(!this._mouseHoverThrottled){for(var p,_,j=this._drawFirst;j;j=j.next)p=j.layer,p.options.interactive&&p._containsPoint(f)&&(_=p);_!==this._hoveredLayer&&(this._handleMouseOut(l),_&&(Ve(this._container,"leaflet-interactive"),this._fireEvent([_],l,"mouseover"),this._hoveredLayer=_)),this._fireEvent(this._hoveredLayer?[this._hoveredLayer]:!1,l),this._mouseHoverThrottled=!0,setTimeout(a(function(){this._mouseHoverThrottled=!1},this),32)}},_fireEvent:function(l,f,p){this._map._fireDOMEvent(f,p||f.type,l)},_bringToFront:function(l){var f=l._order;if(f){var p=f.next,_=f.prev;if(p)p.prev=_;else return;_?_.next=p:p&&(this._drawFirst=p),f.prev=this._drawLast,this._drawLast.next=f,f.next=null,this._drawLast=f,this._requestRedraw(l)}},_bringToBack:function(l){var f=l._order;if(f){var p=f.next,_=f.prev;if(_)_.next=p;else return;p?p.prev=_:_&&(this._drawLast=_),f.prev=null,f.next=this._drawFirst,this._drawFirst.prev=f,this._drawFirst=f,this._requestRedraw(l)}}});function Qw(l){return _e.canvas?new Kw(l):null}var Au=function(){try{return document.namespaces.add("lvml","urn:schemas-microsoft-com:vml"),function(l){return document.createElement("<lvml:"+l+' class="lvml">')}}catch{}return function(l){return document.createElement("<"+l+' xmlns="urn:schemas-microsoft.com:vml" class="lvml">')}}(),pR={_initContainer:function(){this._container=et("div","leaflet-vml-container")},_update:function(){this._map._animatingZoom||(Qs.prototype._update.call(this),this.fire("update"))},_initPath:function(l){var f=l._container=Au("shape");Ve(f,"leaflet-vml-shape "+(this.options.className||"")),f.coordsize="1 1",l._path=Au("path"),f.appendChild(l._path),this._updateStyle(l),this._layers[c(l)]=l},_addPath:function(l){var f=l._container;this._container.appendChild(f),l.options.interactive&&l.addInteractiveTarget(f)},_removePath:function(l){var f=l._container;Ot(f),l.removeInteractiveTarget(f),delete this._layers[c(l)]},_updateStyle:function(l){var f=l._stroke,p=l._fill,_=l.options,j=l._container;j.stroked=!!_.stroke,j.filled=!!_.fill,_.stroke?(f||(f=l._stroke=Au("stroke")),j.appendChild(f),f.weight=_.weight+"px",f.color=_.color,f.opacity=_.opacity,_.dashArray?f.dashStyle=T(_.dashArray)?_.dashArray.join(" "):_.dashArray.replace(/( *, *)/g," "):f.dashStyle="",f.endcap=_.lineCap.replace("butt","flat"),f.joinstyle=_.lineJoin):f&&(j.removeChild(f),l._stroke=null),_.fill?(p||(p=l._fill=Au("fill")),j.appendChild(p),p.color=_.fillColor||_.color,p.opacity=_.fillOpacity):p&&(j.removeChild(p),l._fill=null)},_updateCircle:function(l){var f=l._point.round(),p=Math.round(l._radius),_=Math.round(l._radiusY||p);this._setPath(l,l._empty()?"M0 0":"AL "+f.x+","+f.y+" "+p+","+_+" 0,"+65535*360)},_setPath:function(l,f){l._path.v=f},_bringToFront:function(l){pl(l._container)},_bringToBack:function(l){vl(l._container)}},bh=_e.vml?Au:At,Ou=Qs.extend({_initContainer:function(){this._container=bh("svg"),this._container.setAttribute("pointer-events","none"),this._rootGroup=bh("g"),this._container.appendChild(this._rootGroup)},_destroyContainer:function(){Ot(this._container),pt(this._container),delete this._container,delete this._rootGroup,delete this._svgSize},_update:function(){if(!(this._map._animatingZoom&&this._bounds)){Qs.prototype._update.call(this);var l=this._bounds,f=l.getSize(),p=this._container;(!this._svgSize||!this._svgSize.equals(f))&&(this._svgSize=f,p.setAttribute("width",f.x),p.setAttribute("height",f.y)),Wt(p,l.min),p.setAttribute("viewBox",[l.min.x,l.min.y,f.x,f.y].join(" ")),this.fire("update")}},_initPath:function(l){var f=l._path=bh("path");l.options.className&&Ve(f,l.options.className),l.options.interactive&&Ve(f,"leaflet-interactive"),this._updateStyle(l),this._layers[c(l)]=l},_addPath:function(l){this._rootGroup||this._initContainer(),this._rootGroup.appendChild(l._path),l.addInteractiveTarget(l._path)},_removePath:function(l){Ot(l._path),l.removeInteractiveTarget(l._path),delete this._layers[c(l)]},_updatePath:function(l){l._project(),l._update()},_updateStyle:function(l){var f=l._path,p=l.options;f&&(p.stroke?(f.setAttribute("stroke",p.color),f.setAttribute("stroke-opacity",p.opacity),f.setAttribute("stroke-width",p.weight),f.setAttribute("stroke-linecap",p.lineCap),f.setAttribute("stroke-linejoin",p.lineJoin),p.dashArray?f.setAttribute("stroke-dasharray",p.dashArray):f.removeAttribute("stroke-dasharray"),p.dashOffset?f.setAttribute("stroke-dashoffset",p.dashOffset):f.removeAttribute("stroke-dashoffset")):f.setAttribute("stroke","none"),p.fill?(f.setAttribute("fill",p.fillColor||p.color),f.setAttribute("fill-opacity",p.fillOpacity),f.setAttribute("fill-rule",p.fillRule||"evenodd")):f.setAttribute("fill","none"))},_updatePoly:function(l,f){this._setPath(l,xn(l._parts,f))},_updateCircle:function(l){var f=l._point,p=Math.max(Math.round(l._radius),1),_=Math.max(Math.round(l._radiusY),1)||p,j="a"+p+","+_+" 0 1,0 ",A=l._empty()?"M0 0":"M"+(f.x-p)+","+f.y+j+p*2+",0 "+j+-p*2+",0 ";this._setPath(l,A)},_setPath:function(l,f){l._path.setAttribute("d",f)},_bringToFront:function(l){pl(l._path)},_bringToBack:function(l){vl(l._path)}});_e.vml&&Ou.include(pR);function Jw(l){return _e.svg||_e.vml?new Ou(l):null}Ke.include({getRenderer:function(l){var f=l.options.renderer||this._getPaneRenderer(l.options.pane)||this.options.renderer||this._renderer;return f||(f=this._renderer=this._createRenderer()),this.hasLayer(f)||this.addLayer(f),f},_getPaneRenderer:function(l){if(l==="overlayPane"||l===void 0)return!1;var f=this._paneRenderers[l];return f===void 0&&(f=this._createRenderer({pane:l}),this._paneRenderers[l]=f),f},_createRenderer:function(l){return this.options.preferCanvas&&Qw(l)||Jw(l)}});var e4=_l.extend({initialize:function(l,f){_l.prototype.initialize.call(this,this._boundsToLatLngs(l),f)},setBounds:function(l){return this.setLatLngs(this._boundsToLatLngs(l))},_boundsToLatLngs:function(l){return l=je(l),[l.getSouthWest(),l.getNorthWest(),l.getNorthEast(),l.getSouthEast()]}});function vR(l,f){return new e4(l,f)}Ou.create=bh,Ou.pointsToPath=xn,Ks.geometryToLayer=mh,Ks.coordsToLatLng=p1,Ks.coordsToLatLngs=gh,Ks.latLngToCoords=v1,Ks.latLngsToCoords=ph,Ks.getFeature=bl,Ks.asFeature=vh,Ke.mergeOptions({boxZoom:!0});var t4=ms.extend({initialize:function(l){this._map=l,this._container=l._container,this._pane=l._panes.overlayPane,this._resetStateTimeout=0,l.on("unload",this._destroy,this)},addHooks:function(){ze(this._container,"mousedown",this._onMouseDown,this)},removeHooks:function(){pt(this._container,"mousedown",this._onMouseDown,this)},moved:function(){return this._moved},_destroy:function(){Ot(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(l){if(!l.shiftKey||l.which!==1&&l.button!==1)return!1;this._clearDeferredResetState(),this._resetState(),Su(),J0(),this._startPoint=this._map.mouseEventToContainerPoint(l),ze(document,{contextmenu:Qa,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseMove:function(l){this._moved||(this._moved=!0,this._box=et("div","leaflet-zoom-box",this._container),Ve(this._container,"leaflet-crosshair"),this._map.fire("boxzoomstart")),this._point=this._map.mouseEventToContainerPoint(l);var f=new ie(this._point,this._startPoint),p=f.getSize();Wt(this._box,f.min),this._box.style.width=p.x+"px",this._box.style.height=p.y+"px"},_finish:function(){this._moved&&(Ot(this._box),Ft(this._container,"leaflet-crosshair")),Cu(),e1(),pt(document,{contextmenu:Qa,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseUp:function(l){if(!(l.which!==1&&l.button!==1)&&(this._finish(),!!this._moved)){this._clearDeferredResetState(),this._resetStateTimeout=setTimeout(a(this._resetState,this),0);var f=new Le(this._map.containerPointToLatLng(this._startPoint),this._map.containerPointToLatLng(this._point));this._map.fitBounds(f).fire("boxzoomend",{boxZoomBounds:f})}},_onKeyDown:function(l){l.keyCode===27&&(this._finish(),this._clearDeferredResetState(),this._resetState())}});Ke.addInitHook("addHandler","boxZoom",t4),Ke.mergeOptions({doubleClickZoom:!0});var n4=ms.extend({addHooks:function(){this._map.on("dblclick",this._onDoubleClick,this)},removeHooks:function(){this._map.off("dblclick",this._onDoubleClick,this)},_onDoubleClick:function(l){var f=this._map,p=f.getZoom(),_=f.options.zoomDelta,j=l.originalEvent.shiftKey?p-_:p+_;f.options.doubleClickZoom==="center"?f.setZoom(j):f.setZoomAround(l.containerPoint,j)}});Ke.addInitHook("addHandler","doubleClickZoom",n4),Ke.mergeOptions({dragging:!0,inertia:!0,inertiaDeceleration:3400,inertiaMaxSpeed:1/0,easeLinearity:.2,worldCopyJump:!1,maxBoundsViscosity:0});var i4=ms.extend({addHooks:function(){if(!this._draggable){var l=this._map;this._draggable=new Vr(l._mapPane,l._container),this._draggable.on({dragstart:this._onDragStart,drag:this._onDrag,dragend:this._onDragEnd},this),this._draggable.on("predrag",this._onPreDragLimit,this),l.options.worldCopyJump&&(this._draggable.on("predrag",this._onPreDragWrap,this),l.on("zoomend",this._onZoomEnd,this),l.whenReady(this._onZoomEnd,this))}Ve(this._map._container,"leaflet-grab leaflet-touch-drag"),this._draggable.enable(),this._positions=[],this._times=[]},removeHooks:function(){Ft(this._map._container,"leaflet-grab"),Ft(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 l=this._map;if(l._stop(),this._map.options.maxBounds&&this._map.options.maxBoundsViscosity){var f=je(this._map.options.maxBounds);this._offsetLimit=se(this._map.latLngToContainerPoint(f.getNorthWest()).multiplyBy(-1),this._map.latLngToContainerPoint(f.getSouthEast()).multiplyBy(-1).add(this._map.getSize())),this._viscosity=Math.min(1,Math.max(0,this._map.options.maxBoundsViscosity))}else this._offsetLimit=null;l.fire("movestart").fire("dragstart"),l.options.inertia&&(this._positions=[],this._times=[])},_onDrag:function(l){if(this._map.options.inertia){var f=this._lastTime=+new Date,p=this._lastPos=this._draggable._absPos||this._draggable._newPos;this._positions.push(p),this._times.push(f),this._prunePositions(f)}this._map.fire("move",l).fire("drag",l)},_prunePositions:function(l){for(;this._positions.length>1&&l-this._times[0]>50;)this._positions.shift(),this._times.shift()},_onZoomEnd:function(){var l=this._map.getSize().divideBy(2),f=this._map.latLngToLayerPoint([0,0]);this._initialWorldOffset=f.subtract(l).x,this._worldWidth=this._map.getPixelWorldBounds().getSize().x},_viscousLimit:function(l,f){return l-(l-f)*this._viscosity},_onPreDragLimit:function(){if(!(!this._viscosity||!this._offsetLimit)){var l=this._draggable._newPos.subtract(this._draggable._startPos),f=this._offsetLimit;l.x<f.min.x&&(l.x=this._viscousLimit(l.x,f.min.x)),l.y<f.min.y&&(l.y=this._viscousLimit(l.y,f.min.y)),l.x>f.max.x&&(l.x=this._viscousLimit(l.x,f.max.x)),l.y>f.max.y&&(l.y=this._viscousLimit(l.y,f.max.y)),this._draggable._newPos=this._draggable._startPos.add(l)}},_onPreDragWrap:function(){var l=this._worldWidth,f=Math.round(l/2),p=this._initialWorldOffset,_=this._draggable._newPos.x,j=(_-f+p)%l+f-p,A=(_+f+p)%l-f-p,z=Math.abs(j+p)<Math.abs(A+p)?j:A;this._draggable._absPos=this._draggable._newPos.clone(),this._draggable._newPos.x=z},_onDragEnd:function(l){var f=this._map,p=f.options,_=!p.inertia||l.noInertia||this._times.length<2;if(f.fire("dragend",l),_)f.fire("moveend");else{this._prunePositions(+new Date);var j=this._lastPos.subtract(this._positions[0]),A=(this._lastTime-this._times[0])/1e3,z=p.easeLinearity,Z=j.multiplyBy(z/A),Y=Z.distanceTo([0,0]),te=Math.min(p.inertiaMaxSpeed,Y),me=Z.multiplyBy(te/Y),Ne=te/(p.inertiaDeceleration*z),Ze=me.multiplyBy(-Ne/2).round();!Ze.x&&!Ze.y?f.fire("moveend"):(Ze=f._limitOffset(Ze,f.options.maxBounds),H(function(){f.panBy(Ze,{duration:Ne,easeLinearity:z,noMoveStart:!0,animate:!0})}))}}});Ke.addInitHook("addHandler","dragging",i4),Ke.mergeOptions({keyboard:!0,keyboardPanDelta:80});var s4=ms.extend({keyCodes:{left:[37],right:[39],down:[40],up:[38],zoomIn:[187,107,61,171],zoomOut:[189,109,54,173]},initialize:function(l){this._map=l,this._setPanDelta(l.options.keyboardPanDelta),this._setZoomDelta(l.options.zoomDelta)},addHooks:function(){var l=this._map._container;l.tabIndex<=0&&(l.tabIndex="0"),ze(l,{focus:this._onFocus,blur:this._onBlur,mousedown:this._onMouseDown},this),this._map.on({focus:this._addHooks,blur:this._removeHooks},this)},removeHooks:function(){this._removeHooks(),pt(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 l=document.body,f=document.documentElement,p=l.scrollTop||f.scrollTop,_=l.scrollLeft||f.scrollLeft;this._map._container.focus(),window.scrollTo(_,p)}},_onFocus:function(){this._focused=!0,this._map.fire("focus")},_onBlur:function(){this._focused=!1,this._map.fire("blur")},_setPanDelta:function(l){var f=this._panKeys={},p=this.keyCodes,_,j;for(_=0,j=p.left.length;_<j;_++)f[p.left[_]]=[-1*l,0];for(_=0,j=p.right.length;_<j;_++)f[p.right[_]]=[l,0];for(_=0,j=p.down.length;_<j;_++)f[p.down[_]]=[0,l];for(_=0,j=p.up.length;_<j;_++)f[p.up[_]]=[0,-1*l]},_setZoomDelta:function(l){var f=this._zoomKeys={},p=this.keyCodes,_,j;for(_=0,j=p.zoomIn.length;_<j;_++)f[p.zoomIn[_]]=l;for(_=0,j=p.zoomOut.length;_<j;_++)f[p.zoomOut[_]]=-l},_addHooks:function(){ze(document,"keydown",this._onKeyDown,this)},_removeHooks:function(){pt(document,"keydown",this._onKeyDown,this)},_onKeyDown:function(l){if(!(l.altKey||l.ctrlKey||l.metaKey)){var f=l.keyCode,p=this._map,_;if(f in this._panKeys){if(!p._panAnim||!p._panAnim._inProgress)if(_=this._panKeys[f],l.shiftKey&&(_=G(_).multiplyBy(3)),p.options.maxBounds&&(_=p._limitOffset(G(_),p.options.maxBounds)),p.options.worldCopyJump){var j=p.wrapLatLng(p.unproject(p.project(p.getCenter()).add(_)));p.panTo(j)}else p.panBy(_)}else if(f in this._zoomKeys)p.setZoom(p.getZoom()+(l.shiftKey?3:1)*this._zoomKeys[f]);else if(f===27&&p._popup&&p._popup.options.closeOnEscapeKey)p.closePopup();else return;Qa(l)}}});Ke.addInitHook("addHandler","keyboard",s4),Ke.mergeOptions({scrollWheelZoom:!0,wheelDebounceTime:40,wheelPxPerZoomLevel:60});var r4=ms.extend({addHooks:function(){ze(this._map._container,"wheel",this._onWheelScroll,this),this._delta=0},removeHooks:function(){pt(this._map._container,"wheel",this._onWheelScroll,this)},_onWheelScroll:function(l){var f=kw(l),p=this._map.options.wheelDebounceTime;this._delta+=f,this._lastMousePos=this._map.mouseEventToContainerPoint(l),this._startTime||(this._startTime=+new Date);var _=Math.max(p-(+new Date-this._startTime),0);clearTimeout(this._timer),this._timer=setTimeout(a(this._performZoom,this),_),Qa(l)},_performZoom:function(){var l=this._map,f=l.getZoom(),p=this._map.options.zoomSnap||0;l._stop();var _=this._delta/(this._map.options.wheelPxPerZoomLevel*4),j=4*Math.log(2/(1+Math.exp(-Math.abs(_))))/Math.LN2,A=p?Math.ceil(j/p)*p:j,z=l._limitZoom(f+(this._delta>0?A:-A))-f;this._delta=0,this._startTime=null,z&&(l.options.scrollWheelZoom==="center"?l.setZoom(f+z):l.setZoomAround(this._lastMousePos,f+z))}});Ke.addInitHook("addHandler","scrollWheelZoom",r4);var xR=600;Ke.mergeOptions({tapHold:_e.touchNative&&_e.safari&&_e.mobile,tapTolerance:15});var a4=ms.extend({addHooks:function(){ze(this._map._container,"touchstart",this._onDown,this)},removeHooks:function(){pt(this._map._container,"touchstart",this._onDown,this)},_onDown:function(l){if(clearTimeout(this._holdTimeout),l.touches.length===1){var f=l.touches[0];this._startPos=this._newPos=new B(f.clientX,f.clientY),this._holdTimeout=setTimeout(a(function(){this._cancel(),this._isTapValid()&&(ze(document,"touchend",cn),ze(document,"touchend touchcancel",this._cancelClickPrevent),this._simulateEvent("contextmenu",f))},this),xR),ze(document,"touchend touchcancel contextmenu",this._cancel,this),ze(document,"touchmove",this._onMove,this)}},_cancelClickPrevent:function l(){pt(document,"touchend",cn),pt(document,"touchend touchcancel",l)},_cancel:function(){clearTimeout(this._holdTimeout),pt(document,"touchend touchcancel contextmenu",this._cancel,this),pt(document,"touchmove",this._onMove,this)},_onMove:function(l){var f=l.touches[0];this._newPos=new B(f.clientX,f.clientY)},_isTapValid:function(){return this._newPos.distanceTo(this._startPos)<=this._map.options.tapTolerance},_simulateEvent:function(l,f){var p=new MouseEvent(l,{bubbles:!0,cancelable:!0,view:window,screenX:f.screenX,screenY:f.screenY,clientX:f.clientX,clientY:f.clientY});p._simulated=!0,f.target.dispatchEvent(p)}});Ke.addInitHook("addHandler","tapHold",a4),Ke.mergeOptions({touchZoom:_e.touch,bounceAtZoomLimits:!0});var o4=ms.extend({addHooks:function(){Ve(this._map._container,"leaflet-touch-zoom"),ze(this._map._container,"touchstart",this._onTouchStart,this)},removeHooks:function(){Ft(this._map._container,"leaflet-touch-zoom"),pt(this._map._container,"touchstart",this._onTouchStart,this)},_onTouchStart:function(l){var f=this._map;if(!(!l.touches||l.touches.length!==2||f._animatingZoom||this._zooming)){var p=f.mouseEventToContainerPoint(l.touches[0]),_=f.mouseEventToContainerPoint(l.touches[1]);this._centerPoint=f.getSize()._divideBy(2),this._startLatLng=f.containerPointToLatLng(this._centerPoint),f.options.touchZoom!=="center"&&(this._pinchStartLatLng=f.containerPointToLatLng(p.add(_)._divideBy(2))),this._startDist=p.distanceTo(_),this._startZoom=f.getZoom(),this._moved=!1,this._zooming=!0,f._stop(),ze(document,"touchmove",this._onTouchMove,this),ze(document,"touchend touchcancel",this._onTouchEnd,this),cn(l)}},_onTouchMove:function(l){if(!(!l.touches||l.touches.length!==2||!this._zooming)){var f=this._map,p=f.mouseEventToContainerPoint(l.touches[0]),_=f.mouseEventToContainerPoint(l.touches[1]),j=p.distanceTo(_)/this._startDist;if(this._zoom=f.getScaleZoom(j,this._startZoom),!f.options.bounceAtZoomLimits&&(this._zoom<f.getMinZoom()&&j<1||this._zoom>f.getMaxZoom()&&j>1)&&(this._zoom=f._limitZoom(this._zoom)),f.options.touchZoom==="center"){if(this._center=this._startLatLng,j===1)return}else{var A=p._add(_)._divideBy(2)._subtract(this._centerPoint);if(j===1&&A.x===0&&A.y===0)return;this._center=f.unproject(f.project(this._pinchStartLatLng,this._zoom).subtract(A),this._zoom)}this._moved||(f._moveStart(!0,!1),this._moved=!0),V(this._animRequest);var z=a(f._move,f,this._center,this._zoom,{pinch:!0,round:!1},void 0);this._animRequest=H(z,this,!0),cn(l)}},_onTouchEnd:function(){if(!this._moved||!this._zooming){this._zooming=!1;return}this._zooming=!1,V(this._animRequest),pt(document,"touchmove",this._onTouchMove,this),pt(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))}});Ke.addInitHook("addHandler","touchZoom",o4),Ke.BoxZoom=t4,Ke.DoubleClickZoom=n4,Ke.Drag=i4,Ke.Keyboard=s4,Ke.ScrollWheelZoom=r4,Ke.TapHold=a4,Ke.TouchZoom=o4,n.Bounds=ie,n.Browser=_e,n.CRS=Tt,n.Canvas=Kw,n.Circle=g1,n.CircleMarker=hh,n.Class=Q,n.Control=Fi,n.DivIcon=Yw,n.DivOverlay=gs,n.DomEvent=LP,n.DomUtil=PP,n.Draggable=Vr,n.Evented=$,n.FeatureGroup=qs,n.GeoJSON=Ks,n.GridLayer=Eu,n.Handler=ms,n.Icon=yl,n.ImageOverlay=xh,n.LatLng=be,n.LatLngBounds=Le,n.Layer=Ui,n.LayerGroup=xl,n.LineUtil=qP,n.Map=Ke,n.Marker=fh,n.Mixin=UP,n.Path=Hr,n.Point=B,n.PolyUtil=ZP,n.Polygon=_l,n.Polyline=Xs,n.Popup=yh,n.PosAnimation=Ew,n.Projection=XP,n.Rectangle=e4,n.Renderer=Qs,n.SVG=Ou,n.SVGOverlay=Gw,n.TileLayer=wl,n.Tooltip=_h,n.Transformation=ve,n.Util=J,n.VideoOverlay=Ww,n.bind=a,n.bounds=se,n.canvas=Qw,n.circle=sR,n.circleMarker=iR,n.control=ju,n.divIcon=hR,n.extend=s,n.featureGroup=eR,n.geoJSON=$w,n.geoJson=oR,n.gridLayer=mR,n.icon=tR,n.imageOverlay=lR,n.latLng=we,n.latLngBounds=je,n.layerGroup=JP,n.map=zP,n.marker=nR,n.point=G,n.polygon=aR,n.polyline=rR,n.popup=dR,n.rectangle=vR,n.setOptions=w,n.stamp=c,n.svg=Jw,n.svgOverlay=uR,n.tileLayer=qw,n.tooltip=fR,n.transformation=Ae,n.version=i,n.videoOverlay=cR;var yR=window.L;n.noConflict=function(){return window.L=yR,this},window.L=n})})(jy,jy.exports);var ll=jy.exports;const It=yp(ll);function x0(e,t,n){return Object.freeze({instance:e,context:t,container:n})}function A2(e,t){return t==null?function(i,s){const r=x.useRef();return r.current||(r.current=e(i,s)),r}:function(i,s){const r=x.useRef();r.current||(r.current=e(i,s));const a=x.useRef(i),{instance:o}=r.current;return x.useEffect(function(){a.current!==i&&(t(o,i,a.current),a.current=i)},[o,i,s]),r}}function DA(e,t){x.useEffect(function(){return(t.layerContainer??t.map).addLayer(e.instance),function(){var r;(r=t.layerContainer)==null||r.removeLayer(e.instance),t.map.removeLayer(e.instance)}},[t,e])}function tJ(e){return function(n){const i=v0(),s=e(E2(n,i),i);return kA(i.map,n.attribution),k2(s.current,n.eventHandlers),DA(s.current,i),s}}function nJ(e,t){const n=x.useRef();x.useEffect(function(){if(t.pathOptions!==n.current){const s=t.pathOptions??{};e.instance.setStyle(s),n.current=s}},[e,t])}function iJ(e){return function(n){const i=v0(),s=e(E2(n,i),i);return k2(s.current,n.eventHandlers),DA(s.current,i),nJ(s.current,n),s}}function sJ(e,t){const n=A2(e,t),i=tJ(n);return OA(i)}function rJ(e,t){const n=A2(e),i=eJ(n,t);return JQ(i)}function PA(e,t){const n=A2(e,t),i=iJ(n);return OA(i)}function aJ(){return v0().map}function oJ(e){const t=aJ();return x.useEffect(function(){return t.on(e),function(){t.off(e)}},[t,e]),t}function Ny(){return Ny=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},Ny.apply(this,arguments)}function lJ({bounds:e,boundsOptions:t,center:n,children:i,className:s,id:r,placeholder:a,style:o,whenReady:c,zoom:d,...h},m){const[g]=x.useState({className:s,id:r,style:o}),[v,b]=x.useState(null);x.useImperativeHandle(m,()=>(v==null?void 0:v.map)??null,[v]);const w=x.useCallback(y=>{if(y!==null&&v===null){const S=new ll.Map(y,h);n!=null&&d!=null?S.setView(n,d):e!=null&&S.fitBounds(e,t),c!=null&&S.whenReady(c),b(QQ(S))}},[]);x.useEffect(()=>()=>{v==null||v.map.remove()},[v]);const M=v?ae.createElement(AA,{value:v},i):a??null;return ae.createElement("div",Ny({},g,{ref:w}),M)}const RA=x.forwardRef(lJ),cJ=sJ(function({position:t,...n},i){const s=new ll.Marker(t,n);return x0(s,N2(i,{overlayContainer:s}))},function(t,n,i){n.position!==i.position&&t.setLatLng(n.position),n.icon!=null&&n.icon!==i.icon&&t.setIcon(n.icon),n.zIndexOffset!=null&&n.zIndexOffset!==i.zIndexOffset&&t.setZIndexOffset(n.zIndexOffset),n.opacity!=null&&n.opacity!==i.opacity&&t.setOpacity(n.opacity),t.dragging!=null&&n.draggable!==i.draggable&&(n.draggable===!0?t.dragging.enable():t.dragging.disable())}),ky=PA(function({positions:t,...n},i){const s=new ll.Polygon(t,n);return x0(s,N2(i,{overlayContainer:s}))},function(t,n,i){n.positions!==i.positions&&t.setLatLngs(n.positions)}),LA=PA(function({positions:t,...n},i){const s=new ll.Polyline(t,n);return x0(s,N2(i,{overlayContainer:s}))},function(t,n,i){n.positions!==i.positions&&t.setLatLngs(n.positions)}),zA=rJ(function(t,n){const i=new ll.Popup(t,n.overlayContainer);return x0(i,n)},function(t,n,{position:i},s){x.useEffect(function(){const{instance:a}=t;function o(d){d.popup===a&&(a.update(),s(!0))}function c(d){d.popup===a&&s(!1)}return n.map.on({popupopen:o,popupclose:c}),n.overlayContainer==null?(i!=null&&a.setLatLng(i),a.openOn(n.map)):n.overlayContainer.bindPopup(a),function(){var h;n.map.off({popupopen:o,popupclose:c}),(h=n.overlayContainer)==null||h.unbindPopup(),n.map.removeLayer(a)}},[t,n,s,i])});function um(e){return oe({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M210.6 44.39l-7-4.39c-13.7-8.4-30.8-13.28-45.5-8.7-15.8 4.92-28.4 17.09-35 35.37l-9.4-4.84c-16.2-8.34-24.68-8.47-31.71-5.31-5.61 2.51-11.46 8.55-18.09 17.37l82.4 63.71c12.9 4.2 31.8 4.1 50.7-.8 19-4.9 37.9-14.5 51.7-27.4l31.1-76.9c-27.4-21.65-52.4-9.11-69.2 11.89zm53.1 76.51c-17 17.2-42.3 28.8-62 34-6.9 1.8-13.8 3.1-20.5 3.8-3.7 6.1-6.8 12.3-9.2 18.5 4.8 24.4 13.8 44.4 27.3 60.8l-14.4 12c-8.3-10-15.7-20.8-21.3-32.8-.9 23.2 4.3 47.2 12.8 72.2l-17.7 6c-15.6-45.6-20.9-92.3 1-136.3-7.4-.6-14.4-2-20.9-4.3l-.3-.1c-4.3 4.1-8.4 8.4-12.3 12.9-31.57 36.6-48.96 85.3-39.86 123.2 4.87 20.3 13.6 39.5 26.16 55.9 18.4-.4 35.8 0 51.6 6 7.5-.8 15.2-1.3 23.2-1.3 28.5 0 54.3 5.3 73.8 14.5 7.6 3.6 14.5 7.9 20 12.8 0-5.3.8-11 2.4-15.2-8.9-8.4-14.5-18.6-14.5-30.2 0-16.1 10.7-29.4 26.2-39 0-4.6.9-9 2.5-13.2-10.1-8.7-16.6-19.5-16.6-32.1 0-7.9 2.6-15.1 7-21.6-4.4-6.4-7-13.6-7-21.5 0-3.9.6-7.5 1.7-11-9.7-8.6-15.8-19.2-15.8-31.4 0-12.1 6-22.6 15.6-31.1-5.9-4.6-12.2-8.5-18.9-11.5zm111.4 2.3c-26 0-49.5 5.5-65.6 13.6-16.2 8.1-23.8 18.1-23.8 26.7 0 8.7 7.6 18.7 23.8 26.8 16.1 8.1 39.6 13.6 65.6 13.6 11.3 0 22-1.1 31.9-2.9v-17c13.9-2.1 25.4-5.9 32.8-10.8v17.6c12.5-3.6 24.5-16.9 24.8-27.3 0-8.6-7.6-18.6-23.8-26.7-16.2-8.1-39.6-13.6-65.7-13.6zm96.5 67.7c-3.3 3.5-7.2 6.8-11.6 9.8l.2 29c12.6-7.5 18.5-16.2 18.5-23.8 0-4.8-2.3-10-7.1-15zm-171.8 15.4c.3 8.6 7.9 18.3 23.8 26.3 16.2 8.2 39.6 13.6 65.7 13.6 16.3 0 31.6-2.2 44.7-5.8l.7-27.2c-17.2 6-37.6 9.3-59.6 9.3-28.5 0-54.4-5.7-74-15.5-.5-.2-.9-.5-1.3-.7zm2 34.8c-1.4 2.7-2 5.4-2 7.9 0 8.7 7.6 18.7 23.8 26.8 16.2 8.1 39.6 13.5 65.7 13.5 13.2 0 25.7-1.3 37-3.8v-24c-11.6 2.2-24 3.3-37 3.3-28.6 0-54.5-5.6-74.1-15.5-4.9-2.4-9.4-5.2-13.4-8.2zm174.9 0c-6.1 4.3-11.4 7.5-17.6 10.2v22.3c13.3-7.7 19.6-16.7 19.6-24.6 0-2.5-.6-5.2-2-7.9zm7.5 36.8c-2 2-4.2 3.9-6.6 5.8v32.4c10.3-7 15.3-14.7 15.3-21.7 0-5.3-2.9-11-8.7-16.5zm-170.1 14c-.1.9-.2 1.7-.2 2.5 0 8.7 7.6 18.6 23.8 26.7 16.2 8.2 39.7 13.6 65.7 13.6 14.9 0 29.1-1.8 41.4-4.8V300c-16.3 5.2-35.2 8-55.5 8-28.6 0-54.5-5.7-74.1-15.5-.4-.2-.7-.4-1.1-.6zm-13.6 21.4c-8.7 6.5-12.8 13.6-12.8 20 0 8.7 7.6 18.6 23.8 26.8 16.2 8.1 39.6 13.5 65.7 13.5 9.5 0 18.7-.7 27.3-2v-18.2h-1.1c-28.6 0-54.5-5.7-74.1-15.6-12.5-6.2-22.9-14.5-28.8-24.5zM463 343.9c-7.9 2.8-16.5 5.1-25.7 6.6v12.1c1.9-.8 3.8-1.6 5.6-2.5 9.8-5 16.4-10.6 20.1-16.2zm9.2 18.2c-3.8 3.8-8.2 7.2-13.1 10.3V401c13.3-7.6 19.6-16.6 19.6-24.5 0-4.6-2.1-9.6-6.5-14.4zm-348.7 2.8c-10.2.1-21.2 1.4-32.6 4.1-22.81 5.3-42.42 15-55.22 25.7-12.8 10.6-17.8 21.4-16.3 29.1 1.5 7.7 9.4 14.8 24.8 18.9 15.35 4 36.82 4.2 59.62-1.1 9.2-2.2 17.8-5 25.7-8.3v-20.7c14.6-6.5 25.5-14.3 30.4-21.9v24.4c12.1-10.4 16.8-20.8 15.4-28.4-1.4-7.7-9.4-14.8-24.8-18.8-7.7-2-16.9-3.1-27-3zm64.6 5.2c2.7 3.9 4.6 8.3 5.6 13.2 1.1 6 .6 11.8-1.2 17.5 9.9 2.6 18.9 6.1 26.7 10.5 4.4 2.4 8.5 5.3 12.1 8.3 9-2.1 16.6-5.1 22-8.7v20.6c16.1-7.6 23.5-16.9 23.5-24.3 0-7.5-7.4-16.8-23.6-24.4-16.1-7.5-39.3-12.6-65.1-12.7zm111.8 5c-.1.4-.1.9-.1 1.4 0 8.7 7.6 18.6 23.8 26.8 16.2 8.1 39.6 13.5 65.7 13.5 13.2 0 25.7-1.4 37-3.8v-26.9c-14.8 4-31.5 6.2-49.1 6.2-28.6 0-54.5-5.7-74.1-15.5-1.1-.6-2.2-1.2-3.2-1.7zm2.8 37.3c-2 3.3-2.9 6.5-2.9 9.6 0 8.7 7.6 18.6 23.8 26.8 16.2 8.1 39.6 13.5 65.7 13.5 13.2 0 25.7-1.4 37-3.8v-26.4c-11.6 2.2-24 3.4-37 3.4-28.6 0-54.5-5.7-74.1-15.6-4.5-2.2-8.7-4.7-12.5-7.5zm173.1 0c-5.8 3.9-10.9 7-16.7 9.5v24.6c13.3-7.6 19.6-16.6 19.6-24.5 0-3.1-.9-6.3-2.9-9.6zm-292.6 5.4c-3.5 4.4-7.6 8.6-12.2 12.4-15.6 13.1-37.6 23.7-63 29.6-9.06 2.1-18.06 3.4-26.7 4.1 3.2 5.3 8.83 10.5 17.07 15.1 13.63 7.7 33.63 12.9 55.83 12.9 10.1 0 19.7-1.1 28.5-3v-20.8c13.8-2.1 25.4-5.9 32.8-10.8v18.4c10-7 14.8-14.9 14.8-22.4 0-8.7-6.5-18-20.2-25.7-7.4-4.1-16.6-7.5-26.9-9.8z"},child:[]}]})(e)}function Vv(e){return oe({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M137.273 41c1.41 59.526 16.381 119.035 35.125 167.77 19.69 51.191 44.086 90.988 57.965 104.867l2.637 2.636V343h46v-26.727l2.637-2.636c13.879-13.88 38.275-53.676 57.965-104.867 18.744-48.735 33.715-108.244 35.125-167.77zm-50.605 68.295c-17.97 6.05-32.296 18.214-37.625 30.367-3.015 6.875-3.48 13.44-.988 20.129.285.766.62 1.54.996 2.318a119.032 119.032 0 0 1 8.504-4.812l6.277-3.215 4.621 5.326c5.137 5.92 9.61 12.37 13.422 19.125 2.573-3.06 5.207-7.864 7.05-14.037 4.491-15.034 4.322-36.95-2.257-55.201zm338.664 0c-6.58 18.25-6.748 40.167-2.258 55.201 1.844 6.173 4.478 10.977 7.051 14.037 3.813-6.756 8.285-13.205 13.422-19.125l4.621-5.326 6.277 3.215a119.033 119.033 0 0 1 8.504 4.812c.375-.779.71-1.552.996-2.318 2.492-6.689 2.027-13.254-.988-20.129-5.329-12.153-19.655-24.317-37.625-30.367zm-365.975 67.74c-20.251 12.486-34.121 31.475-36.746 47.973-1.447 9.1.09 17.224 5.323 24.545 1.66 2.324 3.743 4.594 6.304 6.76a116.606 116.606 0 0 1 11.44-14.977l4.72-5.24 6.217 3.33c7.91 4.236 15.262 9.424 21.94 15.252.973-3.633 1.619-7.892 1.773-12.616.636-19.438-6.762-45.536-20.97-65.027zm393.286 0c-14.21 19.49-21.607 45.59-20.971 65.027.154 4.724.8 8.983 1.773 12.616 6.678-5.828 14.03-11.016 21.94-15.252l6.217-3.33 4.72 5.24a116.606 116.606 0 0 1 11.44 14.976c2.56-2.165 4.643-4.435 6.304-6.76 5.233-7.32 6.77-15.444 5.323-24.544-2.625-16.498-16.495-35.487-36.746-47.973zM54.4 259.133c-14.394 18.806-20.496 41.413-17.004 57.748 1.928 9.014 6.298 16.078 13.844 21.078 4.944 3.276 11.48 5.7 19.94 6.645a120.631 120.631 0 0 1 7.101-17.852l3.125-6.338 6.9 1.535c4.095.911 8.133 2.046 12.094 3.377-.373-3.838-1.309-8.185-2.925-12.82-6.416-18.396-22.749-40.184-43.075-53.373zm403.2 0c-20.326 13.189-36.66 34.977-43.075 53.373-1.616 4.635-2.552 8.982-2.925 12.82a119.337 119.337 0 0 1 12.093-3.377l6.9-1.535 3.126 6.338a120.63 120.63 0 0 1 7.101 17.852c8.46-.944 14.996-3.37 19.94-6.645 7.546-5 11.916-12.065 13.844-21.078 3.492-16.335-2.61-38.942-17.004-57.748zM91.5 341.527c-9.285 23.14-9.027 47.85-.709 63.54 4.57 8.619 11.106 14.607 20.268 17.562 4.586 1.479 9.957 2.19 16.185 1.803-2.135-11.155-2.771-22.97-1.756-34.938l.602-7.074 7.02-1.065a129.43 129.43 0 0 1 13.458-1.312c.554-.025 1.107-.04 1.66-.059-12.419-15.776-33.883-31.43-56.728-38.457zm329 0c-22.845 7.027-44.31 22.68-56.729 38.457.554.019 1.107.034 1.66.059 4.5.206 8.995.637 13.46 1.312l7.02 1.065.6 7.074c1.016 11.967.38 23.783-1.755 34.938 6.228.386 11.6-.324 16.185-1.803 9.162-2.955 15.699-8.943 20.268-17.563 8.318-15.69 8.576-40.4-.709-63.539zM199.729 361c-1.943 7.383-6.045 14.043-11.366 19.363a46.544 46.544 0 0 1-3.484 3.125c14.804 3.295 28.659 8.692 40.404 15.46 2.384-5.36 5.376-10.345 9.408-14.534C239.96 378.942 247.51 375 256 375c8.491 0 16.041 3.942 21.309 9.414 4.032 4.19 7.024 9.175 9.408 14.533 11.815-6.808 25.766-12.23 40.67-15.52a48.107 48.107 0 0 1-3.739-3.413c-5.227-5.333-9.27-11.852-11.261-19.014zM256 393c-3.434 0-5.635 1.084-8.34 3.895-2.704 2.81-5.395 7.52-7.527 13.298-4.265 11.556-6.343 27-7.156 38.446-1.07 15.043 3 33.368 12.285 40.06 4.733 3.412 16.743 3.412 21.476 0 9.285-6.692 13.355-25.017 12.285-40.06-.813-11.446-2.891-26.89-7.156-38.446-2.132-5.777-4.823-10.488-7.527-13.298-2.705-2.81-4.906-3.895-8.34-3.895zm-103.521 4.979c-1.714-.008-3.424.022-5.127.09-1.405.055-2.77.281-4.164.39-.418 27.817 9.816 53.543 24.994 66.644 8.264 7.134 17.586 10.772 28.35 10.157 5.908-.338 12.394-2.03 19.374-5.52-1.27-7.665-1.377-15.42-.883-22.379.632-8.89 1.852-19.962 4.479-30.877-17.16-10.686-42.426-18.395-67.023-18.506zm207.042 0c-24.597.11-49.863 7.82-67.023 18.505 2.627 10.915 3.847 21.987 4.479 30.877.494 6.958.387 14.714-.883 22.38 6.98 3.49 13.466 5.181 19.375 5.519 10.763.615 20.085-3.023 28.35-10.156 15.177-13.102 25.411-38.828 24.993-66.645-1.393-.109-2.76-.335-4.164-.39a116.32 116.32 0 0 0-5.127-.09z"},child:[]}]})(e)}function uJ(e){return oe({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M287.586 15.297l3.504 110.963 31.537-110.963h-35.04zm-95.78.238l-1.75 236.047-170.533-43.33L130.486 377.69l-88.77-5.174 114.432 112.357-44.466-75.867L186.896 417l-51.748-109.94 110.114 79.956-12.635-185.23.002.003 75.212 170.57 75.816-89.95-6.62 154.582 60.173-39.978-20.388 79.486 75.756-142.787-75.924 1.94L487.32 155.87l-131.402 73.08-12.264-139.69-65.41 140.336-86.435-214.06h-.003zM45.503 44.095L39.355 75.94 154.285 218h.002l-77.6-166.836-31.185-7.07zm422.27 24.776l-31.184 7.07-43.738 107.37 81.068-82.59-6.147-31.85zM279.208 403.61c-40.176 0-72.708 32.537-72.708 72.71 0 5.725.636 10.706 1.887 16.05 7.25-32.545 36.097-56.655 70.82-56.655 34.82 0 63.673 23.97 70.82 56.656 1.218-5.277 1.888-10.404 1.888-16.05 0-40.175-32.536-72.71-72.71-72.71z"},child:[]}]})(e)}function KC(e){return oe({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M327.027 65.816L229.79 128.23l9.856 5.397 86.51-55.53 146.735 83.116-84.165 54.023 4.1 2.244v6.848l65.923-42.316 13.836 7.838-79.76 51.195v11.723l64.633-41.487 15.127 8.57-79.76 51.195v11.723l64.633-41.487 15.127 8.57-79.76 51.195v11.723l100.033-64.21-24.828-14.062 24.827-15.937-24.828-14.064 24.827-15.937-23.537-13.333 23.842-15.305-166.135-94.106zm31.067 44.74c-21.038 10.556-49.06 12.342-68.79 4.383l-38.57 24.757 126.903 69.47 36.582-23.48c-14.41-11.376-13.21-28.35 2.942-41.67l-59.068-33.46zM227.504 147.5l-70.688 46.094 135.61 78.066 1.33-.85c2.5-1.61 6.03-3.89 10.242-6.613 8.42-5.443 19.563-12.66 30.674-19.86 16.002-10.37 24.248-15.72 31.916-20.694L227.504 147.5zm115.467 1.17a8.583 14.437 82.068 0 1 .003 0 8.583 14.437 82.068 0 1 8.32 1.945 8.583 14.437 82.068 0 1-.87 12.282 8.583 14.437 82.068 0 1-20.273 1.29 8.583 14.437 82.068 0 1 .87-12.28 8.583 14.437 82.068 0 1 11.95-3.237zm-218.423 47.115L19.143 263.44l23.537 13.333-23.842 15.305 24.828 14.063-24.828 15.938 24.828 14.063-24.828 15.938 166.135 94.106L285.277 381.8V370.08l-99.433 63.824L39.11 350.787l14.255-9.15 131.608 74.547L285.277 351.8V340.08l-99.433 63.824L39.11 320.787l14.255-9.15 131.608 74.547L285.277 321.8V310.08l-99.433 63.824L39.11 290.787l13.27-8.52 132.9 75.28 99.997-64.188v-5.05l-5.48-3.154-93.65 60.11-146.73-83.116 94.76-60.824-9.63-5.543zm20.46 11.78l-46.92 30.115c14.41 11.374 13.21 28.348-2.942 41.67l59.068 33.46c21.037-10.557 49.057-12.342 68.787-4.384l45.965-29.504-123.96-71.358zm229.817 32.19c-8.044 5.217-15.138 9.822-30.363 19.688-11.112 7.203-22.258 14.42-30.69 19.873-4.217 2.725-7.755 5.01-10.278 6.632-.09.06-.127.08-.215.137v85.924l71.547-48.088v-84.166zm-200.99 17.48a8.583 14.437 82.068 0 1 8.32 1.947 8.583 14.437 82.068 0 1-.87 12.28 8.583 14.437 82.068 0 1-20.27 1.29 8.583 14.437 82.068 0 1 .87-12.28 8.583 14.437 82.068 0 1 11.95-3.236z"},child:[]}]})(e)}function QC(e){return oe({tag:"svg",attr:{viewBox:"0 0 1024 1024"},child:[{tag:"path",attr:{d:"M746 835.28L544.529 723.678c74.88-58.912 95.216-174.688 95.216-239.601v-135.12c0-89.472-118.88-189.12-238.288-189.12-119.376 0-241.408 99.664-241.408 189.12v135.12c0 59.024 24.975 178.433 100.624 239.089L54 835.278S0 859.342 0 889.342v81.088c0 29.84 24.223 54.064 54 54.064h692c29.807 0 54.031-24.224 54.031-54.064v-81.087c0-31.808-54.032-54.064-54.032-54.064zm-9.967 125.215H64.002V903.28c4.592-3.343 11.008-7.216 16.064-9.536 1.503-.688 3.007-1.408 4.431-2.224l206.688-112.096c18.848-10.224 31.344-29.184 33.248-50.528s-7.008-42.256-23.712-55.664c-53.664-43.024-76.656-138.32-76.656-189.152V348.96c0-45.968 86.656-125.12 177.408-125.12 92.432 0 174.288 78.065 174.288 125.12v135.12c0 50.128-15.568 145.84-70.784 189.28a64.098 64.098 0 0 0-24.224 55.664 64.104 64.104 0 0 0 33.12 50.849l201.472 111.6c1.777.975 4.033 2.031 5.905 2.848 4.72 2 10.527 5.343 14.783 8.288v57.887zM969.97 675.936L765.505 564.335c74.88-58.912 98.224-174.688 98.224-239.601v-135.12c0-89.472-121.872-190.128-241.28-190.128-77.6 0-156.943 42.192-203.12 96.225 26.337 1.631 55.377 1.664 80.465 9.664 33.711-26.256 76.368-41.872 122.656-41.872 92.431 0 177.278 79.055 177.278 126.128v135.12c0 50.127-18.56 145.84-73.775 189.28a64.098 64.098 0 0 0-24.224 55.664 64.104 64.104 0 0 0 33.12 50.848l204.465 111.6c1.776.976 4.032 2.032 5.904 2.848 4.72 2 10.527 5.344 14.783 8.288v56.912H830.817c19.504 14.72 25.408 35.776 32.977 64h106.192c29.807 0 54.03-24.224 54.03-54.064V730.03c-.015-31.84-54.047-54.096-54.047-54.096z"},child:[]}]})(e)}function JC(e){return oe({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M256 0c5.3 0 10.3 2.7 13.3 7.1c15.8 23.5 36.7 63.7 49.2 109c7.2 26.4 11.8 55.2 10.4 84c11.5-8.8 23.7-16.7 35.8-23.6c41-23.3 84.4-36.9 112.2-42.5c5.2-1 10.7 .6 14.4 4.4s5.4 9.2 4.4 14.5c-5.6 27.7-19.3 70.9-42.7 111.7c-9.1 15.9-19.9 31.7-32.4 46.3c27.8 6.6 52.4 17.3 67.2 25.5c5.1 2.8 8.2 8.2 8.2 14s-3.2 11.2-8.2 14c-15.2 8.4-40.9 19.5-69.8 26.1c-20.2 4.6-42.9 7.2-65.2 4.6l8.3 33.1c1.5 6.1-.6 12.4-5.5 16.4s-11.6 4.6-17.2 1.9L280 417.2V488c0 13.3-10.7 24-24 24s-24-10.7-24-24V417.2l-58.5 29.1c-5.6 2.8-12.3 2.1-17.2-1.9s-7-10.3-5.5-16.4l8.3-33.1c-22.2 2.6-45 0-65.2-4.6c-28.9-6.6-54.6-17.6-69.8-26.1c-5.1-2.8-8.2-8.2-8.2-14s3.2-11.2 8.2-14c14.8-8.2 39.4-18.8 67.2-25.5C78.9 296.3 68.1 280.5 59 264.6c-23.4-40.8-37.1-84-42.7-111.7c-1.1-5.2 .6-10.7 4.4-14.5s9.2-5.4 14.4-4.4c27.9 5.5 71.2 19.2 112.2 42.5c12.1 6.9 24.3 14.7 35.8 23.6c-1.4-28.7 3.1-57.6 10.4-84c12.5-45.3 33.4-85.5 49.2-109c3-4.4 8-7.1 13.3-7.1z"},child:[]}]})(e)}function e5(e){return oe({tag:"svg",attr:{viewBox:"0 0 576 512"},child:[{tag:"path",attr:{d:"M112 48a48 48 0 1 1 96 0 48 48 0 1 1 -96 0zm40 304V480c0 17.7-14.3 32-32 32s-32-14.3-32-32V256.9L59.4 304.5c-9.1 15.1-28.8 20-43.9 10.9s-20-28.8-10.9-43.9l58.3-97c17.4-28.9 48.6-46.6 82.3-46.6h29.7c33.7 0 64.9 17.7 82.3 46.6l44.9 74.7c-16.1 17.6-28.6 38.5-36.6 61.5c-1.9-1.8-3.5-3.9-4.9-6.3L232 256.9V480c0 17.7-14.3 32-32 32s-32-14.3-32-32V352H152zM432 224a144 144 0 1 1 0 288 144 144 0 1 1 0-288zm16 80c0-8.8-7.2-16-16-16s-16 7.2-16 16v48H368c-8.8 0-16 7.2-16 16s7.2 16 16 16h48v48c0 8.8 7.2 16 16 16s16-7.2 16-16V384h48c8.8 0 16-7.2 16-16s-7.2-16-16-16H448V304z"},child:[]}]})(e)}function dJ(e){return oe({tag:"svg",attr:{viewBox:"0 0 640 512"},child:[{tag:"path",attr:{d:"M0 488V171.3c0-26.2 15.9-49.7 40.2-59.4L308.1 4.8c7.6-3.1 16.1-3.1 23.8 0L599.8 111.9c24.3 9.7 40.2 33.3 40.2 59.4V488c0 13.3-10.7 24-24 24H568c-13.3 0-24-10.7-24-24V224c0-17.7-14.3-32-32-32H128c-17.7 0-32 14.3-32 32V488c0 13.3-10.7 24-24 24H24c-13.3 0-24-10.7-24-24zm488 24l-336 0c-13.3 0-24-10.7-24-24V432H512l0 56c0 13.3-10.7 24-24 24zM128 400V336H512v64H128zm0-96V224H512l0 80H128z"},child:[]}]})(e)}function fJ(e){return oe({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M294.1 256L167 129c-9.4-9.4-9.4-24.6 0-33.9s24.6-9.3 34 0L345 239c9.1 9.1 9.3 23.7.7 33.1L201.1 417c-4.7 4.7-10.9 7-17 7s-12.3-2.3-17-7c-9.4-9.4-9.4-24.6 0-33.9l127-127.1z"},child:[]}]})(e)}function hJ(e){return oe({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M380.5 163.3L256 32 131.5 163.3c-68.6 72.4-68.6 190 0 262.4C165.8 461.9 210.9 480 256 480s90.2-18.1 124.5-54.3c68.7-72.4 68.7-190 0-262.4z"},child:[]}]})(e)}const cl=()=>u.jsx("div",{className:"quitButton",onClick:()=>K("hideFrame"),children:u.jsx(NG,{})}),mJ=({children:e,className:t="",containerClassName:n={height:"auto",width:"100%",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",gap:"0.5rem"}})=>{const i=x.useRef(null),[s,r]=x.useState("auto");return x.useEffect(()=>{if(i.current){const a=new ResizeObserver(o=>{const c=o[0].contentRect.height;r(c)});return a.observe(i.current),()=>{a.disconnect()}}},[]),u.jsx("div",{className:t,style:{overflow:"hidden"},children:u.jsx(de.div,{style:{height:s},animate:{height:s},transition:{duration:.2},children:u.jsx("div",{style:{...n,boxSizing:"border-box",width:"100%",position:"relative"},ref:i,children:e})})})};function O2(e){const t=e+"CollectionProvider",[n,i]=vn(t),[s,r]=n(t,{collectionRef:{current:null},itemMap:new Map}),a=w=>{const{scope:M,children:y}=w,S=ae.useRef(null),T=ae.useRef(new Map).current;return u.jsx(s,{scope:M,itemMap:T,collectionRef:S,children:y})};a.displayName=t;const o=e+"CollectionSlot",c=Yo(o),d=ae.forwardRef((w,M)=>{const{scope:y,children:S}=w,T=r(o,y),N=qe(M,T.collectionRef);return u.jsx(c,{ref:N,children:S})});d.displayName=o;const h=e+"CollectionItemSlot",m="data-radix-collection-item",g=Yo(h),v=ae.forwardRef((w,M)=>{const{scope:y,children:S,...T}=w,N=ae.useRef(null),k=qe(M,N),E=r(h,y);return ae.useEffect(()=>(E.itemMap.set(N,{ref:N,...T}),()=>void E.itemMap.delete(N))),u.jsx(g,{[m]:"",ref:k,children:S})});v.displayName=h;function b(w){const M=r(e+"CollectionConsumer",w);return ae.useCallback(()=>{const S=M.collectionRef.current;if(!S)return[];const T=Array.from(S.querySelectorAll(`[${m}]`));return Array.from(M.itemMap.values()).sort((E,D)=>T.indexOf(E.ref.current)-T.indexOf(D.ref.current))},[M.collectionRef,M.itemMap])}return[{Provider:a,Slot:d,ItemSlot:v},b,i]}var Hv="rovingFocusGroup.onEntryFocus",gJ={bubbles:!1,cancelable:!0},Yf="RovingFocusGroup",[Ey,IA,pJ]=O2(Yf),[vJ,fu]=vn(Yf,[pJ]),[xJ,yJ]=vJ(Yf),BA=x.forwardRef((e,t)=>u.jsx(Ey.Provider,{scope:e.__scopeRovingFocusGroup,children:u.jsx(Ey.Slot,{scope:e.__scopeRovingFocusGroup,children:u.jsx(_J,{...e,ref:t})})}));BA.displayName=Yf;var _J=x.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:i,loop:s=!1,dir:r,currentTabStopId:a,defaultCurrentTabStopId:o,onCurrentTabStopIdChange:c,onEntryFocus:d,preventScrollOnEntryFocus:h=!1,...m}=e,g=x.useRef(null),v=qe(t,g),b=lu(r),[w,M]=ti({prop:a,defaultProp:o??null,onChange:c,caller:Yf}),[y,S]=x.useState(!1),T=Tn(d),N=IA(n),k=x.useRef(!1),[E,D]=x.useState(0);return x.useEffect(()=>{const O=g.current;if(O)return O.addEventListener(Hv,T),()=>O.removeEventListener(Hv,T)},[T]),u.jsx(xJ,{scope:n,orientation:i,dir:b,loop:s,currentTabStopId:w,onItemFocus:x.useCallback(O=>M(O),[M]),onItemShiftTab:x.useCallback(()=>S(!0),[]),onFocusableItemAdd:x.useCallback(()=>D(O=>O+1),[]),onFocusableItemRemove:x.useCallback(()=>D(O=>O-1),[]),children:u.jsx(Te.div,{tabIndex:y||E===0?-1:0,"data-orientation":i,...m,ref:v,style:{outline:"none",...e.style},onMouseDown:pe(e.onMouseDown,()=>{k.current=!0}),onFocus:pe(e.onFocus,O=>{const I=!k.current;if(O.target===O.currentTarget&&I&&!y){const P=new CustomEvent(Hv,gJ);if(O.currentTarget.dispatchEvent(P),!P.defaultPrevented){const H=N().filter(R=>R.focusable),V=H.find(R=>R.active),J=H.find(R=>R.id===w),U=[V,J,...H].filter(Boolean).map(R=>R.ref.current);FA(U,h)}}k.current=!1}),onBlur:pe(e.onBlur,()=>S(!1))})})}),VA="RovingFocusGroupItem",HA=x.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:i=!0,active:s=!1,tabStopId:r,children:a,...o}=e,c=ns(),d=r||c,h=yJ(VA,n),m=h.currentTabStopId===d,g=IA(n),{onFocusableItemAdd:v,onFocusableItemRemove:b,currentTabStopId:w}=h;return x.useEffect(()=>{if(i)return v(),()=>b()},[i,v,b]),u.jsx(Ey.ItemSlot,{scope:n,id:d,focusable:i,active:s,children:u.jsx(Te.span,{tabIndex:m?0:-1,"data-orientation":h.orientation,...o,ref:t,onMouseDown:pe(e.onMouseDown,M=>{i?h.onItemFocus(d):M.preventDefault()}),onFocus:pe(e.onFocus,()=>h.onItemFocus(d)),onKeyDown:pe(e.onKeyDown,M=>{if(M.key==="Tab"&&M.shiftKey){h.onItemShiftTab();return}if(M.target!==M.currentTarget)return;const y=SJ(M,h.orientation,h.dir);if(y!==void 0){if(M.metaKey||M.ctrlKey||M.altKey||M.shiftKey)return;M.preventDefault();let T=g().filter(N=>N.focusable).map(N=>N.ref.current);if(y==="last")T.reverse();else if(y==="prev"||y==="next"){y==="prev"&&T.reverse();const N=T.indexOf(M.currentTarget);T=h.loop?CJ(T,N+1):T.slice(N+1)}setTimeout(()=>FA(T))}}),children:typeof a=="function"?a({isCurrentTabStop:m,hasTabStop:w!=null}):a})})});HA.displayName=VA;var bJ={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function wJ(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function SJ(e,t,n){const i=wJ(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(i))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(i)))return bJ[i]}function FA(e,t=!1){const n=document.activeElement;for(const i of e)if(i===n||(i.focus({preventScroll:t}),document.activeElement!==n))return}function CJ(e,t){return e.map((n,i)=>e[(t+i)%e.length])}var D2=BA,P2=HA,y0="Tabs",[MJ,vae]=vn(y0,[fu]),UA=fu(),[TJ,R2]=MJ(y0),ZA=x.forwardRef((e,t)=>{const{__scopeTabs:n,value:i,onValueChange:s,defaultValue:r,orientation:a="horizontal",dir:o,activationMode:c="automatic",...d}=e,h=lu(o),[m,g]=ti({prop:i,onChange:s,defaultProp:r??"",caller:y0});return u.jsx(TJ,{scope:n,baseId:ns(),value:m,onValueChange:g,orientation:a,dir:h,activationMode:c,children:u.jsx(Te.div,{dir:h,"data-orientation":a,...d,ref:t})})});ZA.displayName=y0;var $A="TabsList",WA=x.forwardRef((e,t)=>{const{__scopeTabs:n,loop:i=!0,...s}=e,r=R2($A,n),a=UA(n);return u.jsx(D2,{asChild:!0,...a,orientation:r.orientation,dir:r.dir,loop:i,children:u.jsx(Te.div,{role:"tablist","aria-orientation":r.orientation,...s,ref:t})})});WA.displayName=$A;var GA="TabsTrigger",YA=x.forwardRef((e,t)=>{const{__scopeTabs:n,value:i,disabled:s=!1,...r}=e,a=R2(GA,n),o=UA(n),c=KA(a.baseId,i),d=QA(a.baseId,i),h=i===a.value;return u.jsx(P2,{asChild:!0,...o,focusable:!s,active:h,children:u.jsx(Te.button,{type:"button",role:"tab","aria-selected":h,"aria-controls":d,"data-state":h?"active":"inactive","data-disabled":s?"":void 0,disabled:s,id:c,...r,ref:t,onMouseDown:pe(e.onMouseDown,m=>{!s&&m.button===0&&m.ctrlKey===!1?a.onValueChange(i):m.preventDefault()}),onKeyDown:pe(e.onKeyDown,m=>{[" ","Enter"].includes(m.key)&&a.onValueChange(i)}),onFocus:pe(e.onFocus,()=>{const m=a.activationMode!=="manual";!h&&!s&&m&&a.onValueChange(i)})})})});YA.displayName=GA;var qA="TabsContent",XA=x.forwardRef((e,t)=>{const{__scopeTabs:n,value:i,forceMount:s,children:r,...a}=e,o=R2(qA,n),c=KA(o.baseId,i),d=QA(o.baseId,i),h=i===o.value,m=x.useRef(h);return x.useEffect(()=>{const g=requestAnimationFrame(()=>m.current=!1);return()=>cancelAnimationFrame(g)},[]),u.jsx(nn,{present:s||h,children:({present:g})=>u.jsx(Te.div,{"data-state":h?"active":"inactive","data-orientation":o.orientation,role:"tabpanel","aria-labelledby":c,hidden:!g,id:d,tabIndex:0,...a,ref:t,style:{...e.style,animationDuration:m.current?"0s":void 0},children:g&&r})})});XA.displayName=qA;function KA(e,t){return`${e}-trigger-${t}`}function QA(e,t){return`${e}-content-${t}`}var jJ=ZA,JA=WA,eO=YA,tO=XA;const _0=jJ,qf=x.forwardRef(({className:e,...t},n)=>u.jsx(JA,{ref:n,className:ye("inline-flex h-9 items-center justify-center rounded-lg bg-muted p-1 text-muted-foreground",e),...t}));qf.displayName=JA.displayName;const ci=x.forwardRef(({className:e,...t},n)=>u.jsx(eO,{ref:n,className:ye("inline-flex items-center justify-center whitespace-nowrap rounded-md px-3 py-1 text-sm font-medium ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow",e),...t}));ci.displayName=eO.displayName;const ip=x.forwardRef(({className:e,...t},n)=>u.jsx(tO,{ref:n,className:ye("mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",e),...t}));ip.displayName=tO.displayName;const NJ=({setData:e,data:t,allPoints:n})=>{const[i,s]=x.useState(t?t.moneyLaunderingMarker:null),[r,a]=x.useState(t?t.launderingCapacity:""),[o,c]=x.useState(!1),d=x.useRef(null),h=async g=>{const v=await K("set_marker",{type:g,points:n});s(v||null)};x.useEffect(()=>{d.current&&(d.current.value=r)},[]);const m=()=>{c(!0),i&&r&&parseInt(r,10)>0&&(e({tab:"moneyLaundering",data:{moneyLaunderingMarker:i,launderingCapacity:r}}),e({tab:"nextTab"}),c(!1))};return u.jsxs("div",{className:"flex flex-col items-center w-full max-w-2xl mx-auto space-y-6",children:[u.jsx(St,{className:"w-full p-6 space-y-6 bg-background/95 border-none",children:u.jsxs(de.div,{className:"grid grid-cols-1 md:grid-cols-2 gap-4",initial:{opacity:0},animate:{opacity:1},transition:{duration:.2},children:[u.jsxs("div",{className:"space-y-2",children:[u.jsxs("div",{className:"flex items-center justify-between",children:[u.jsx("span",{className:"text-sm font-medium",children:C(i?"manage_zones.money_laundering_marker_set":"manage_zones.no_money_laundering_marker_set")}),!i&&o&&u.jsx("span",{className:"text-destructive text-xs",children:C("required")})]}),u.jsx(ne,{variant:"secondary",size:"sm",className:"w-full",onClick:()=>h("moneyLaundering"),children:C("manage_zones.set_money_laundering_marker")})]}),u.jsxs("div",{className:"space-y-2",children:[u.jsxs("div",{className:"flex items-center justify-between",children:[u.jsx("span",{className:"text-sm font-medium",children:C("manage_zones.laundering_capacity")}),o&&(r===""||parseInt(r,10)<=0)&&u.jsx("span",{className:"text-destructive text-xs",children:C("required")})]}),u.jsx(wt,{type:"number",ref:d,min:1,defaultValue:r,className:o&&(r===""||parseInt(r,10)<=0)?"border-destructive":"",onInput:g=>a(g.target.value),placeholder:C("manage_zones.laundering_capacity")})]})]})}),u.jsx(ne,{onClick:m,className:"ml-auto",size:"lg",children:C("manage_zones.next")})]})};var kJ=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),EJ="VisuallyHidden",nO=x.forwardRef((e,t)=>u.jsx(Te.span,{...e,ref:t,style:{...kJ,...e.style}}));nO.displayName=EJ;var AJ=nO,[b0,xae]=vn("Tooltip",[du]),w0=du(),iO="TooltipProvider",OJ=700,Ay="tooltip.open",[DJ,L2]=b0(iO),sO=e=>{const{__scopeTooltip:t,delayDuration:n=OJ,skipDelayDuration:i=300,disableHoverableContent:s=!1,children:r}=e,a=x.useRef(!0),o=x.useRef(!1),c=x.useRef(0);return x.useEffect(()=>{const d=c.current;return()=>window.clearTimeout(d)},[]),u.jsx(DJ,{scope:t,isOpenDelayedRef:a,delayDuration:n,onOpen:x.useCallback(()=>{window.clearTimeout(c.current),a.current=!1},[]),onClose:x.useCallback(()=>{window.clearTimeout(c.current),c.current=window.setTimeout(()=>a.current=!0,i)},[i]),isPointerInTransitRef:o,onPointerInTransitChange:x.useCallback(d=>{o.current=d},[]),disableHoverableContent:s,children:r})};sO.displayName=iO;var bf="Tooltip",[PJ,Xf]=b0(bf),rO=e=>{const{__scopeTooltip:t,children:n,open:i,defaultOpen:s,onOpenChange:r,disableHoverableContent:a,delayDuration:o}=e,c=L2(bf,e.__scopeTooltip),d=w0(t),[h,m]=x.useState(null),g=ns(),v=x.useRef(0),b=a??c.disableHoverableContent,w=o??c.delayDuration,M=x.useRef(!1),[y,S]=ti({prop:i,defaultProp:s??!1,onChange:D=>{D?(c.onOpen(),document.dispatchEvent(new CustomEvent(Ay))):c.onClose(),r==null||r(D)},caller:bf}),T=x.useMemo(()=>y?M.current?"delayed-open":"instant-open":"closed",[y]),N=x.useCallback(()=>{window.clearTimeout(v.current),v.current=0,M.current=!1,S(!0)},[S]),k=x.useCallback(()=>{window.clearTimeout(v.current),v.current=0,S(!1)},[S]),E=x.useCallback(()=>{window.clearTimeout(v.current),v.current=window.setTimeout(()=>{M.current=!0,S(!0),v.current=0},w)},[w,S]);return x.useEffect(()=>()=>{v.current&&(window.clearTimeout(v.current),v.current=0)},[]),u.jsx(b2,{...d,children:u.jsx(PJ,{scope:t,contentId:g,open:y,stateAttribute:T,trigger:h,onTriggerChange:m,onTriggerEnter:x.useCallback(()=>{c.isOpenDelayedRef.current?E():N()},[c.isOpenDelayedRef,E,N]),onTriggerLeave:x.useCallback(()=>{b?k():(window.clearTimeout(v.current),v.current=0)},[k,b]),onOpen:N,onClose:k,disableHoverableContent:b,children:n})})};rO.displayName=bf;var Oy="TooltipTrigger",aO=x.forwardRef((e,t)=>{const{__scopeTooltip:n,...i}=e,s=Xf(Oy,n),r=L2(Oy,n),a=w0(n),o=x.useRef(null),c=qe(t,o,s.onTriggerChange),d=x.useRef(!1),h=x.useRef(!1),m=x.useCallback(()=>d.current=!1,[]);return x.useEffect(()=>()=>document.removeEventListener("pointerup",m),[m]),u.jsx(h0,{asChild:!0,...a,children:u.jsx(Te.button,{"aria-describedby":s.open?s.contentId:void 0,"data-state":s.stateAttribute,...i,ref:c,onPointerMove:pe(e.onPointerMove,g=>{g.pointerType!=="touch"&&!h.current&&!r.isPointerInTransitRef.current&&(s.onTriggerEnter(),h.current=!0)}),onPointerLeave:pe(e.onPointerLeave,()=>{s.onTriggerLeave(),h.current=!1}),onPointerDown:pe(e.onPointerDown,()=>{s.open&&s.onClose(),d.current=!0,document.addEventListener("pointerup",m,{once:!0})}),onFocus:pe(e.onFocus,()=>{d.current||s.onOpen()}),onBlur:pe(e.onBlur,s.onClose),onClick:pe(e.onClick,s.onClose)})})});aO.displayName=Oy;var z2="TooltipPortal",[RJ,LJ]=b0(z2,{forceMount:void 0}),oO=e=>{const{__scopeTooltip:t,forceMount:n,children:i,container:s}=e,r=Xf(z2,t);return u.jsx(RJ,{scope:t,forceMount:n,children:u.jsx(nn,{present:n||r.open,children:u.jsx($f,{asChild:!0,container:s,children:i})})})};oO.displayName=z2;var Yc="TooltipContent",lO=x.forwardRef((e,t)=>{const n=LJ(Yc,e.__scopeTooltip),{forceMount:i=n.forceMount,side:s="top",...r}=e,a=Xf(Yc,e.__scopeTooltip);return u.jsx(nn,{present:i||a.open,children:a.disableHoverableContent?u.jsx(cO,{side:s,...r,ref:t}):u.jsx(zJ,{side:s,...r,ref:t})})}),zJ=x.forwardRef((e,t)=>{const n=Xf(Yc,e.__scopeTooltip),i=L2(Yc,e.__scopeTooltip),s=x.useRef(null),r=qe(t,s),[a,o]=x.useState(null),{trigger:c,onClose:d}=n,h=s.current,{onPointerInTransitChange:m}=i,g=x.useCallback(()=>{o(null),m(!1)},[m]),v=x.useCallback((b,w)=>{const M=b.currentTarget,y={x:b.clientX,y:b.clientY},S=FJ(y,M.getBoundingClientRect()),T=UJ(y,S),N=ZJ(w.getBoundingClientRect()),k=WJ([...T,...N]);o(k),m(!0)},[m]);return x.useEffect(()=>()=>g(),[g]),x.useEffect(()=>{if(c&&h){const b=M=>v(M,h),w=M=>v(M,c);return c.addEventListener("pointerleave",b),h.addEventListener("pointerleave",w),()=>{c.removeEventListener("pointerleave",b),h.removeEventListener("pointerleave",w)}}},[c,h,v,g]),x.useEffect(()=>{if(a){const b=w=>{const M=w.target,y={x:w.clientX,y:w.clientY},S=(c==null?void 0:c.contains(M))||(h==null?void 0:h.contains(M)),T=!$J(y,a);S?g():T&&(g(),d())};return document.addEventListener("pointermove",b),()=>document.removeEventListener("pointermove",b)}},[c,h,a,d,g]),u.jsx(cO,{...e,ref:r})}),[IJ,BJ]=b0(bf,{isInside:!1}),VJ=bk("TooltipContent"),cO=x.forwardRef((e,t)=>{const{__scopeTooltip:n,children:i,"aria-label":s,onEscapeKeyDown:r,onPointerDownOutside:a,...o}=e,c=Xf(Yc,n),d=w0(n),{onClose:h}=c;return x.useEffect(()=>(document.addEventListener(Ay,h),()=>document.removeEventListener(Ay,h)),[h]),x.useEffect(()=>{if(c.trigger){const m=g=>{const v=g.target;v!=null&&v.contains(c.trigger)&&h()};return window.addEventListener("scroll",m,{capture:!0}),()=>window.removeEventListener("scroll",m,{capture:!0})}},[c.trigger,h]),u.jsx(Zf,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:r,onPointerDownOutside:a,onFocusOutside:m=>m.preventDefault(),onDismiss:h,children:u.jsxs(w2,{"data-state":c.stateAttribute,...d,...o,ref:t,style:{...o.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[u.jsx(VJ,{children:i}),u.jsx(IJ,{scope:n,isInside:!0,children:u.jsx(AJ,{id:c.contentId,role:"tooltip",children:s||i})})]})})});lO.displayName=Yc;var uO="TooltipArrow",HJ=x.forwardRef((e,t)=>{const{__scopeTooltip:n,...i}=e,s=w0(n);return BJ(uO,n).isInside?null:u.jsx(S2,{...s,...i,ref:t})});HJ.displayName=uO;function FJ(e,t){const n=Math.abs(t.top-e.y),i=Math.abs(t.bottom-e.y),s=Math.abs(t.right-e.x),r=Math.abs(t.left-e.x);switch(Math.min(n,i,s,r)){case r:return"left";case s:return"right";case n:return"top";case i:return"bottom";default:throw new Error("unreachable")}}function UJ(e,t,n=5){const i=[];switch(t){case"top":i.push({x:e.x-n,y:e.y+n},{x:e.x+n,y:e.y+n});break;case"bottom":i.push({x:e.x-n,y:e.y-n},{x:e.x+n,y:e.y-n});break;case"left":i.push({x:e.x+n,y:e.y-n},{x:e.x+n,y:e.y+n});break;case"right":i.push({x:e.x-n,y:e.y-n},{x:e.x-n,y:e.y+n});break}return i}function ZJ(e){const{top:t,right:n,bottom:i,left:s}=e;return[{x:s,y:t},{x:n,y:t},{x:n,y:i},{x:s,y:i}]}function $J(e,t){const{x:n,y:i}=e;let s=!1;for(let r=0,a=t.length-1;r<t.length;a=r++){const o=t[r],c=t[a],d=o.x,h=o.y,m=c.x,g=c.y;h>i!=g>i&&n<(m-d)*(i-h)/(g-h)+d&&(s=!s)}return s}function WJ(e){const t=e.slice();return t.sort((n,i)=>n.x<i.x?-1:n.x>i.x?1:n.y<i.y?-1:n.y>i.y?1:0),GJ(t)}function GJ(e){if(e.length<=1)return e.slice();const t=[];for(let i=0;i<e.length;i++){const s=e[i];for(;t.length>=2;){const r=t[t.length-1],a=t[t.length-2];if((r.x-a.x)*(s.y-a.y)>=(r.y-a.y)*(s.x-a.x))t.pop();else break}t.push(s)}t.pop();const n=[];for(let i=e.length-1;i>=0;i--){const s=e[i];for(;n.length>=2;){const r=n[n.length-1],a=n[n.length-2];if((r.x-a.x)*(s.y-a.y)>=(r.y-a.y)*(s.x-a.x))n.pop();else break}n.push(s)}return n.pop(),t.length===1&&n.length===1&&t[0].x===n[0].x&&t[0].y===n[0].y?t:t.concat(n)}var YJ=sO,qJ=rO,XJ=aO,KJ=oO,dO=lO;const wc=YJ,Sc=qJ,Cc=XJ,Bo=x.forwardRef(({className:e,sideOffset:t=4,...n},i)=>u.jsx(KJ,{children:u.jsx(dO,{ref:i,sideOffset:t,className:ye("z-50 overflow-hidden rounded-md bg-primary px-3 py-1.5 text-xs text-primary-foreground animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-[--radix-tooltip-content-transform-origin]",e),...n})}));Bo.displayName=dO.displayName;const ao=({className:e,label:t,type:n,checked:i,onChange:s,disabled:r=!1,switchId:a})=>{const o=a||`toggle-switch-${t.replace(/\s+/g,"-").toLowerCase()}`;return u.jsxs("div",{className:`flex items-center justify-between ${e}`,children:[" ",u.jsxs(g0,{htmlFor:o,className:"text-sm text-foreground",children:[C(t),u.jsx(wc,{delayDuration:0,children:u.jsxs(Sc,{children:[u.jsx(Cc,{className:"p-0 border-none bg-transparent",asChild:!0,children:u.jsx(IG,{className:"text-lg"})}),u.jsxs(Bo,{children:[" ",C(`manage_zones.${n}_desc`)]})]})})]}),u.jsx(NA,{id:o,checked:i,onCheckedChange:s,disabled:r})]})},QJ=({setData:e,data:t})=>{const[n,i]=x.useState(!1),[s,r]=x.useState(t||{safeHouse:!1,drugZone:!1,moneyLaundering:!1,drugSell:!1,recruiting:!1,cash:!1,warehouse:!1}),a=x.useContext(M0);x.useEffect(()=>{c(s)},[s]);const o=(m,g)=>{r(v=>({...v,[m]:g}))};x.useEffect(()=>{t&&r(t)},[]);const c=m=>{e({tab:"types:updateTabs",data:m})},d=()=>Object.values(s).some(m=>m),h=()=>{d()?(e({tab:"types",data:s}),e({tab:"nextTab"})):i(!0)};return u.jsxs("div",{className:"flex flex-col items-center w-full max-w-2xl mx-auto",children:[u.jsx(de.div,{className:"w-full",initial:{opacity:0},animate:{opacity:1},transition:{duration:.2},children:u.jsxs(St,{className:"bg-background/95 border-none",children:[u.jsxs("div",{className:"flex items-center justify-between",children:[u.jsx("h2",{className:"text-xl font-semibold ",children:C("manage_zones.select_types")}),n&&u.jsxs("div",{className:"flex items-center gap-2 text-destructive",children:[u.jsx(o2,{className:"h-4 w-4"}),u.jsx("span",{className:"text-sm",children:C("manage_zones.minimum_one_type")})]})]}),u.jsxs("div",{className:"space-y-2",children:[u.jsx(ao,{className:"p-4 rounded-lg bg-muted/50 hover:bg-muted transition-colors",label:"manage_zones.safe_house",type:"safeHouse",checked:s.safeHouse,onChange:m=>o("safeHouse",m)}),u.jsx(ao,{className:"p-4 rounded-lg bg-muted/50 hover:bg-muted transition-colors",label:"manage_zones.drug_plantation",type:"drugZone",checked:s.drugZone,onChange:m=>o("drugZone",m)}),u.jsx(ao,{className:"p-4 rounded-lg bg-muted/50 hover:bg-muted transition-colors",label:"manage_zones.money_laundering",type:"moneyLaundering",checked:s.moneyLaundering,onChange:m=>o("moneyLaundering",m)}),u.jsx(ao,{className:"p-4 rounded-lg bg-muted/50 hover:bg-muted transition-colors",label:"manage_zones.drug_sell",type:"drugSell",checked:s.drugSell,onChange:m=>o("drugSell",m)}),u.jsx(ao,{className:"p-4 rounded-lg bg-muted/50 hover:bg-muted transition-colors",label:"manage_zones.cash",type:"cash",checked:s.cash,onChange:m=>o("cash",m)}),u.jsx(ao,{className:"p-4 rounded-lg bg-muted/50 hover:bg-muted transition-colors",label:"manage_zones.warehouse",type:"warehouse",checked:s.warehouse,onChange:m=>o("warehouse",m)}),a.bodyguards&&u.jsx(ao,{className:"p-4 rounded-lg bg-muted/50 hover:bg-muted transition-colors",label:"manage_zones.recruiting",type:"recruiting",checked:s.recruiting,onChange:m=>o("recruiting",m)})]})]})}),u.jsx(ne,{onClick:h,className:"self-end ",size:"lg",children:C("manage_zones.next")})]})},JJ=({actionClicked:e})=>{const[t,n]=x.useState(null);return u.jsx("div",{className:"fixed inset-0 w-screen h-screen bg-black/80 flex justify-center items-center z-[999]",children:u.jsxs(de.div,{className:"bg-card text-card-foreground p-4 rounded-lg shadow-lg flex flex-col gap-2 w-full md:w-1/4 max-h-[60vh] overflow-y-auto",initial:{opacity:0,scale:.9},animate:{opacity:1,scale:1},transition:{duration:.2},children:[u.jsx("div",{className:"text-lg font-semibold mb-2 w-full",children:C("manage_zones.select_ipl")}),u.jsx(de.div,{className:`flex items-center justify-center p-3 rounded-md border text-sm cursor-pointer transition-colors
                        ${t===null?"bg-primary/20 border-primary text-primary":"bg-muted border-border hover:bg-muted/80"}`,onClick:()=>n(null),initial:{opacity:0},animate:{opacity:1},transition:{duration:.2,delay:.05},children:u.jsx("span",{children:C("disable_ipl")})}),he.safeHouseIpls.map((i,s)=>{const r=t&&t.id===i.id;return u.jsx(de.div,{className:`flex items-center justify-center p-3 rounded-md border text-sm cursor-pointer transition-colors
                                ${r?"bg-primary/20 border-primary text-primary":"bg-muted border-border hover:bg-muted/80"}`,onClick:()=>n(i),initial:{opacity:0},animate:{opacity:1},transition:{duration:.2,delay:.05*(s+1)},children:u.jsx("span",{children:i.name})},s)}),u.jsxs("div",{className:"flex justify-end gap-2 mt-4",children:[u.jsx("button",{type:"button",className:"px-3 py-1.5 text-xs rounded-md bg-secondary text-secondary-foreground border border-border hover:bg-secondary/80",onClick:()=>e("cancel"),children:C("cancel")}),u.jsx("button",{type:"button",className:"px-3 py-1.5 text-xs rounded-md bg-primary text-primary-foreground hover:bg-primary/80",onClick:()=>e("confirm",t),children:C("confirm")})]})]})})},eee=({doors:e,handleNewDoords:t})=>{const[n,i]=x.useState([...e]),[s,r]=x.useState(null),a=async()=>{const c=await K("create_door");r(c)},o=async c=>{c==="cancel"?r(null):c==="confirm"&&(i(d=>[...d,{...s}]),r(null))};return u.jsx("div",{className:"fixed inset-0 w-screen h-screen bg-black/80 flex justify-center items-center z-[999]",children:u.jsxs(de.div,{className:"bg-card text-card-foreground p-4 rounded-lg shadow-lg flex flex-col gap-2 w-full md:w-1/3 max-h-[70vh] overflow-y-auto",initial:{opacity:0,scale:.9},animate:{opacity:1,scale:1},transition:{duration:.2},children:[u.jsx("div",{className:"text-lg font-semibold mb-2 w-full",children:C("manage_zones.doors")}),s&&u.jsx(Is,{open:!0,onOpenChange:()=>r(null),children:u.jsx(Bs,{children:u.jsxs(Ko,{children:[u.jsx(Hs,{children:C("manage_zones.door_created")}),u.jsx(Fs,{children:C("manage_zones.new_door_name_desc")}),u.jsx(wt,{value:s.name,placeholder:C("manage_zones.new_door_name"),onChange:c=>r({...s,name:c.target.value})}),u.jsxs(Vs,{children:[u.jsx(Us,{onClick:()=>o("cancel"),children:C("cancel")}),u.jsx(Va,{onClick:()=>o("confirm"),children:C("confirm")})]})]})})}),n.length>0?n.map((c,d)=>u.jsxs(de.div,{className:"flex items-center justify-between p-3 bg-muted rounded-md border border-border text-sm",initial:{opacity:0},animate:{opacity:1},transition:{duration:.2,delay:.05*d},children:[u.jsx("span",{children:C("manage_zones.door_name",[["name",c.name]])}),u.jsx(YG,{className:"text-destructive hover:text-destructive/80 cursor-pointer text-xl",onClick:()=>{i(h=>h.filter((m,g)=>g!==d))}})]},d)):u.jsx("div",{className:"flex items-center justify-center p-3 rounded-md  text-sm",children:u.jsx("span",{children:C("manage_zones.no_doors_created")})}),u.jsxs("div",{className:"flex justify-end gap-2 mt-4",children:[u.jsx("button",{type:"button",className:"px-3 py-1.5 text-xs rounded-md bg-secondary text-secondary-foreground border border-border hover:bg-secondary/80",onClick:()=>t(),children:C("cancel")}),u.jsx("button",{type:"button",className:"px-3 py-1.5 text-xs rounded-md bg-primary text-primary-foreground hover:bg-primary/80",onClick:a,children:C("manage_zones.create_new_door")}),u.jsx("button",{type:"button",className:"px-3 py-1.5 text-xs rounded-md bg-green-600 text-white hover:bg-green-700",onClick:()=>t(n),children:C("manage_zones.save_doors")})]})]})})};var S0="Checkbox",[tee,yae]=vn(S0),[nee,I2]=tee(S0);function iee(e){const{__scopeCheckbox:t,checked:n,children:i,defaultChecked:s,disabled:r,form:a,name:o,onCheckedChange:c,required:d,value:h="on",internal_do_not_use_render:m}=e,[g,v]=ti({prop:n,defaultProp:s??!1,onChange:c,caller:S0}),[b,w]=x.useState(null),[M,y]=x.useState(null),S=x.useRef(!1),T=b?!!a||!!b.closest("form"):!0,N={checked:g,disabled:r,setChecked:v,control:b,setControl:w,name:o,form:a,value:h,hasConsumerStoppedPropagationRef:S,required:d,defaultChecked:Ea(s)?!1:s,isFormControl:T,bubbleInput:M,setBubbleInput:y};return u.jsx(nee,{scope:t,...N,children:see(m)?m(N):i})}var fO="CheckboxTrigger",hO=x.forwardRef(({__scopeCheckbox:e,onKeyDown:t,onClick:n,...i},s)=>{const{control:r,value:a,disabled:o,checked:c,required:d,setControl:h,setChecked:m,hasConsumerStoppedPropagationRef:g,isFormControl:v,bubbleInput:b}=I2(fO,e),w=qe(s,h),M=x.useRef(c);return x.useEffect(()=>{const y=r==null?void 0:r.form;if(y){const S=()=>m(M.current);return y.addEventListener("reset",S),()=>y.removeEventListener("reset",S)}},[r,m]),u.jsx(Te.button,{type:"button",role:"checkbox","aria-checked":Ea(c)?"mixed":c,"aria-required":d,"data-state":yO(c),"data-disabled":o?"":void 0,disabled:o,value:a,...i,ref:w,onKeyDown:pe(t,y=>{y.key==="Enter"&&y.preventDefault()}),onClick:pe(n,y=>{m(S=>Ea(S)?!0:!S),b&&v&&(g.current=y.isPropagationStopped(),g.current||y.stopPropagation())})})});hO.displayName=fO;var mO=x.forwardRef((e,t)=>{const{__scopeCheckbox:n,name:i,checked:s,defaultChecked:r,required:a,disabled:o,value:c,onCheckedChange:d,form:h,...m}=e;return u.jsx(iee,{__scopeCheckbox:n,checked:s,defaultChecked:r,disabled:o,required:a,onCheckedChange:d,name:i,form:h,value:c,internal_do_not_use_render:({isFormControl:g})=>u.jsxs(u.Fragment,{children:[u.jsx(hO,{...m,ref:t,__scopeCheckbox:n}),g&&u.jsx(xO,{__scopeCheckbox:n})]})})});mO.displayName=S0;var gO="CheckboxIndicator",pO=x.forwardRef((e,t)=>{const{__scopeCheckbox:n,forceMount:i,...s}=e,r=I2(gO,n);return u.jsx(nn,{present:i||Ea(r.checked)||r.checked===!0,children:u.jsx(Te.span,{"data-state":yO(r.checked),"data-disabled":r.disabled?"":void 0,...s,ref:t,style:{pointerEvents:"none",...e.style}})})});pO.displayName=gO;var vO="CheckboxBubbleInput",xO=x.forwardRef(({__scopeCheckbox:e,...t},n)=>{const{control:i,hasConsumerStoppedPropagationRef:s,checked:r,defaultChecked:a,required:o,disabled:c,name:d,value:h,form:m,bubbleInput:g,setBubbleInput:v}=I2(vO,e),b=qe(n,v),w=wA(r),M=x2(i);x.useEffect(()=>{const S=g;if(!S)return;const T=window.HTMLInputElement.prototype,k=Object.getOwnPropertyDescriptor(T,"checked").set,E=!s.current;if(w!==r&&k){const D=new Event("click",{bubbles:E});S.indeterminate=Ea(r),k.call(S,Ea(r)?!1:r),S.dispatchEvent(D)}},[g,w,r,s]);const y=x.useRef(Ea(r)?!1:r);return u.jsx(Te.input,{type:"checkbox","aria-hidden":!0,defaultChecked:a??y.current,required:o,disabled:c,name:d,value:h,form:m,...t,tabIndex:-1,ref:b,style:{...t.style,...M,position:"absolute",pointerEvents:"none",opacity:0,margin:0,transform:"translateX(-100%)"}})});xO.displayName=vO;function see(e){return typeof e=="function"}function Ea(e){return e==="indeterminate"}function yO(e){return Ea(e)?"indeterminate":e?"checked":"unchecked"}function C0({className:e,...t}){return u.jsx(mO,{"data-slot":"checkbox",className:ye("peer border-input dark:bg-input/30 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground dark:data-[state=checked]:bg-primary data-[state=checked]:border-primary focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive size-4 shrink-0 rounded-[4px] border shadow-xs transition-shadow outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50",e),...t,children:u.jsx(pO,{"data-slot":"checkbox-indicator",className:"flex items-center justify-center text-current transition-none",children:u.jsx(fE,{className:"size-3.5"})})})}const ree=({setData:e,data:t,allPoints:n})=>{const i=n,[s,r]=x.useState((t==null?void 0:t.safeHouseMarker)||null),[a,o]=x.useState(!!(t!=null&&t.cashSafe)),[c,d]=x.useState((t==null?void 0:t.cashSafe)||null),[h,m]=x.useState((t==null?void 0:t.weedProcessingMarker)||null),[g,v]=x.useState((t==null?void 0:t.garageMarker)||null),[b,w]=x.useState((t==null?void 0:t.vehicleSpawnPos)||null),[M,y]=x.useState((t==null?void 0:t.enterIplMarker)||null),[S,T]=x.useState((t==null?void 0:t.doors)||[]),[N,k]=x.useState(!1),[E,D]=x.useState(!1),[O,I]=x.useState((t==null?void 0:t.selectIpl)||null),[P,H]=x.useState(!1),V=async(B,W)=>{if(H(!1),B==="confirm")if(W){const G=await K("set_marker",{type:"enterIplMarker",points:i});G?(y(G),I(W.id)):(y(null),I(null))}else y(null),I(null)},J=B=>{k(!1),B&&T(B)},Q=async()=>{const B=await K("set_safe",{points:i});B&&d(B)},U=async B=>{let W;switch(B==="vehicle_spawn_point"?W=await K("vehicle_spawn_point"):W=await K("set_marker",{type:B,points:i}),W=W||null,B){case"safeHouse":r(W);break;case"weedProcessing":m(W);break;case"garage":v(W);break;case"vehicle_spawn_point":w(W);break}},R=()=>{D(!0);const B=O?M:!0;s&&(h||!he.weedProcessing.enable)&&(g||!he.garage.enablePersonalGarage&&!he.garage.enableGangGarage)&&(b||!he.garage.enablePersonalGarage&&!he.garage.enableGangGarage)&&B&&(e({tab:"safeHouse",data:{safeHouseMarker:s,weedProcessingMarker:h,garageMarker:g,vehicleSpawnPos:b,enterIplMarker:M,selectIpl:O,cashSafe:a?c:null,doors:S}}),e({tab:"nextTab"}),D(!1))},$=O?he.safeHouseIpls.find(B=>B.id===O):null;return u.jsxs("div",{className:"flex flex-col items-center w-full max-w-3xl mx-auto space-y-6",children:[P&&u.jsx(JJ,{actionClicked:V}),N&&u.jsx(eee,{doors:S,handleNewDoords:J}),u.jsx(St,{className:"w-full h-full p-6 bg-background/95 border-none",children:u.jsx(rs,{className:"h-full pr-4",children:u.jsxs(de.div,{className:"grid grid-cols-2 gap-4 items-start content-start",initial:{opacity:0},animate:{opacity:1},transition:{duration:.2},children:[u.jsxs("div",{className:"space-y-2",children:[u.jsxs("div",{className:"flex items-center justify-between",children:[u.jsx("span",{className:"text-sm font-medium",children:C(s?"manage_zones.safe_house_marker_set":"manage_zones.no_safe_house_marker_set")}),!s&&E&&u.jsx("span",{className:"text-destructive text-xs",children:C("required")})]}),u.jsx(ne,{variant:"secondary",size:"sm",className:"w-full",onClick:()=>U("safeHouse"),children:C("manage_zones.set_safe_house_marker")})]}),u.jsxs("div",{className:"space-y-2",children:[u.jsxs("div",{className:"flex items-center justify-between",children:[u.jsx("span",{className:"text-sm font-medium",children:$?C("manage_zones.ipl_enabled",[["name",$.name]]):C("manage_zones.ipl_disabled")}),E&&O&&!M&&u.jsx("span",{className:"text-destructive text-xs",children:C("manage_zones.ipl_entry_marker_required")})]}),u.jsx(ne,{variant:"secondary",size:"sm",className:"w-full",onClick:()=>H(!0),children:C("manage_zones.select_ipl")})]}),he.weedProcessing.enable&&u.jsxs("div",{className:"space-y-2",children:[u.jsxs("div",{className:"flex items-center justify-between",children:[u.jsx("span",{className:"text-sm font-medium",children:C(h?"manage_zones.weed_processing_marker_set":"manage_zones.no_weed_processing_marker_set")}),!h&&E&&u.jsx("span",{className:"text-destructive text-xs",children:C("required")})]}),u.jsx(ne,{variant:"secondary",size:"sm",className:"w-full",onClick:()=>U("weedProcessing"),children:C("manage_zones.set_weed_processing_marker")})]}),u.jsx("div",{className:"space-y-2",children:u.jsxs("div",{className:"flex flex-col h-fit gap-2",children:[u.jsxs("div",{className:"flex items-center justify-between",children:[u.jsxs("span",{className:"text-sm font-medium flex items-center gap-2 w-full",children:[C("manage_zones.use_cash_safe"),u.jsx(C0,{defaultChecked:a,onCheckedChange:()=>o(!a)}),u.jsx(wc,{skipDelayDuration:!0,delayDuration:0,className:"ml-auto fixed",children:u.jsxs(Sc,{className:"ml-auto w-full",children:[u.jsx(Cc,{className:"ml-auto",children:u.jsx(yy,{className:"h-5 w-5"})}),u.jsx(Bo,{children:u.jsx("p",{children:C("manage_zones.use_cash_safe_desc")})})]})})]}),a&&!c&&E&&u.jsx("span",{className:"text-destructive text-xs",children:C("required")})]}),a&&u.jsx("div",{className:"flex items-center justify-between",children:u.jsx(ne,{variant:"secondary",size:"sm",className:"w-full",onClick:Q,children:C("manage_zones.set_cash_safe_position")})})]})}),u.jsxs("div",{className:"space-y-2",children:[u.jsx("div",{className:"flex items-center justify-between",children:u.jsxs("span",{className:"text-sm font-medium",children:[C("manage_zones.manage_doors")," (",S.length," ",C("manage_zones.doors_configured"),")"]})}),u.jsx(ne,{variant:"secondary",size:"sm",className:"w-full",onClick:()=>k(!0),children:C("manage_zones.manage_doors")})]}),(he.garage.enableGangGarage||he.garage.enablePersonalGarage)&&u.jsxs("div",{className:"space-y-2",children:[u.jsxs("div",{className:"flex items-center justify-between",children:[u.jsx("span",{className:"text-sm font-medium",children:C(g?"manage_zones.garage_marker_set":"manage_zones.no_garage_marker_set")}),!g&&E&&u.jsx("span",{className:"text-destructive text-xs",children:C("required")})]}),u.jsx(ne,{variant:"secondary",size:"sm",className:"w-full",onClick:()=>U("garage"),children:C("manage_zones.set_garage_marker")})]}),(he.garage.enableGangGarage||he.garage.enablePersonalGarage)&&u.jsxs("div",{className:"space-y-2",children:[u.jsxs("div",{className:"flex items-center justify-between",children:[u.jsx("span",{className:"text-sm font-medium",children:C(b?"manage_zones.vehicle_spawn_set":"manage_zones.no_vehicle_spawn_set")}),!b&&E&&u.jsx("span",{className:"text-destructive text-xs",children:C("required")})]}),u.jsx(ne,{variant:"secondary",size:"sm",className:"w-full",onClick:()=>U("vehicle_spawn_point"),children:C("manage_zones.set_vehicle_spawn")})]})]})})}),u.jsx(ne,{onClick:R,className:"self-end",size:"lg",children:C("manage_zones.next")})]})},aee=({setData:e,data:t,allPoints:n,types:i})=>{const s=n,[r,a]=x.useState(t?t.zoneAttack:!1),[o,c]=x.useState(!!(t.progressTypes&&t.progressTypes.length>0)),[d,h]=x.useState(t.progressTypes||[]),[m,g]=x.useState(t?t.minProgress:"0"),v=x.useContext(M0),[b,w]=x.useState(t?t.drugCapture:!1),[M,y]=x.useState(t?t.captureMarker:null),[S,T]=x.useState(t?t.captureTime:"0"),[N,k]=x.useState(t?t.maxNpc:"0"),[E,D]=x.useState(t?t.minNpc:"0"),[O,I]=x.useState(!1),P=x.useRef(null),H=x.useRef(null),V=x.useRef(null),J=x.useRef(null),Q=async R=>{const $=await K("set_marker",{type:R,points:s});y($||null)};x.useEffect(()=>{P.current&&(P.current.value=S),V.current&&(V.current.value=N),J.current&&(J.current.value=E),H.current&&(H.current.value=m)},[r,b,S,H,N,E]);const U=()=>{if(r&&(!M||S===""||N===""||E==="")){I(!0);return}if(o&&(d.length===0||m===""||!m)){I(!0);return}if(!r&&!o){I(!0);return}e({tab:"capture",data:{zoneAttack:r,drugCapture:b,captureMarker:M,captureTime:S,progressTypes:d,minProgress:m,maxNpc:N,minNpc:E}}),e({tab:"nextTab"})};return u.jsxs("div",{className:"flex flex-col items-center w-full max-w-2xl gap-6",children:[u.jsxs(rs,{className:"w-full h-[35rem] space-y-6 bg-background/95 border-none",children:[!r&&!o&&O&&u.jsxs("div",{className:"flex items-center gap-2 text-destructive",children:[u.jsx(o2,{className:"h-4 w-4"}),u.jsx("p",{className:"text-sm",children:C("manage_zones.select_atleast_zone_capture_type")})]}),u.jsxs("div",{className:"space-y-4",children:[u.jsx(xa,{label:C("manage_zones.attack_zone_capturing"),className:"p-4 rounded-lg bg-muted/50 hover:bg-muted transition-colors",checked:r,onChange:()=>{T("0"),k("0"),D("0"),y(null),a(!r)}}),r&&u.jsxs(de.div,{className:"space-y-4",initial:{opacity:0},animate:{opacity:1},transition:{duration:.2},children:[u.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[u.jsxs("div",{className:"space-y-2",children:[u.jsxs("div",{className:"flex items-center justify-between",children:[u.jsx("span",{className:"text-sm font-medium",children:C(M?"manage_zones.capture_marker_set":"manage_zones.no_capture_marker_set")}),!M&&O&&u.jsx("span",{className:"text-destructive text-xs",children:C("required")})]}),u.jsx(ne,{variant:"secondary",className:"w-full",onClick:()=>Q("capture"),children:C("manage_zones.set_capture_marker")})]}),u.jsxs("div",{className:"space-y-2",children:[u.jsxs("div",{className:"flex items-center justify-between",children:[u.jsx("span",{className:"text-sm font-medium",children:C("manage_zones.capture_time")}),O&&(S===""||!S)&&u.jsx("span",{className:"text-destructive text-xs",children:C("required")})]}),u.jsx(wt,{type:"number",ref:P,min:1,className:O&&(S===""||!S)?"border-destructive":"",onInput:R=>T(R.target.value),placeholder:C("manage_zones.capture_time")})]})]}),u.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[u.jsxs("div",{className:"space-y-2",children:[u.jsxs("div",{className:"flex items-center justify-between",children:[u.jsx("span",{className:"text-sm font-medium",children:C("manage_zones.min_npc")}),O&&(E===""||!E)&&u.jsx("span",{className:"text-destructive text-xs",children:C("required")})]}),u.jsx(wt,{type:"number",min:1,ref:J,className:O&&(E===""||!E)?"border-destructive":"",onInput:R=>D(R.target.value),placeholder:C("manage_zones.min_npc")})]}),u.jsxs("div",{className:"space-y-2",children:[u.jsxs("div",{className:"flex items-center justify-between",children:[u.jsx("span",{className:"text-sm font-medium",children:C("manage_zones.max_npc")}),O&&(N===""||!N)&&u.jsx("span",{className:"text-destructive text-xs",children:C("required")})]}),u.jsx(wt,{type:"number",min:1,ref:V,className:O&&(N===""||!N)?"border-destructive":"",onInput:R=>k(R.target.value),placeholder:C("manage_zones.max_npc")})]})]})]}),u.jsxs("div",{className:"space-y-2",children:[u.jsx(xa,{label:C("manage_zones.progress_capturing"),disabled:!i.drugSell,className:"p-4 rounded-lg bg-muted/50 hover:bg-muted transition-colors",checked:o,onChange:R=>{c(!o)}}),!i.drugSell&&u.jsx("span",{className:"text-destructive text-xs",children:C("manage_zones.drug_sell_required")}),o&&u.jsxs(de.div,{className:"space-y-4 border p-4 rounded-lg ",initial:{opacity:0},animate:{opacity:1},transition:{duration:.2},children:[u.jsx("p",{className:"font-medium",children:C("manage_zones.progress_types")}),u.jsxs("div",{className:"grid grid-cols-2 gap-2",children:[u.jsxs("div",{className:"bg-secondary/25 border p-2 rounded-md",children:[u.jsx(xa,{label:C("manage_zones.all_types"),checked:d==null?void 0:d.includes("all"),onChange:()=>{h(R=>R!=null&&R.includes("all")?R.filter($=>$!=="all"):[...R,"all"])}}),u.jsx("p",{className:"text-[0.6rem] text-muted-foreground",children:C("manage_zones.all_types_desc")})]}),he.capturing.captureProgressTypes.map(R=>R.name=="graffiti"&&!v.graffiti?null:u.jsxs("div",{className:"bg-secondary/25 border p-2 rounded-md",children:[u.jsx(xa,{label:R.label,checked:d==null?void 0:d.includes(R.name),onChange:()=>{h($=>$!=null&&$.includes(R.name)?$.filter(B=>B!==R.name):[...$,R.name])}},R),u.jsx("p",{className:"text-[0.6rem] text-muted-foreground",children:R.description})]}))]}),r&&u.jsx("p",{className:"text-destructive text-sm",children:C("manage_zones.progress_dealing_capture_part_disabled")}),u.jsxs("div",{className:"space-y-2",children:[u.jsxs("div",{className:"flex items-center justify-between",children:[u.jsx("span",{className:"text-sm font-medium",children:C("manage_zones.min_amount_of_progress")}),O&&(m===""||!m)&&u.jsx("span",{className:"text-destructive text-xs",children:C("required")})]}),u.jsx(wt,{type:"number",ref:H,min:1,className:O&&(m===""||!m)?"border-destructive":"",onInput:R=>g(R.target.value),placeholder:C("manage_zones.minimum_progress")}),u.jsx("p",{className:"text-sm text-muted-foreground",children:C("manage_zones.progress_capturing_desc")})]})]})]})]})]}),u.jsx(ne,{onClick:U,className:"self-end",size:"lg",children:C("manage_zones.next")})]})},oee=({setData:e,data:t})=>{const[n,i]=x.useState(t?t.maxPlants:""),[s,r]=x.useState(!1),a=x.useRef(null);x.useEffect(()=>{a.current&&(a.current.value=n)},[]);const o=()=>{n&&parseInt(n,10)>0?(e({tab:"drugZone",data:{maxPlants:n}}),e({tab:"nextTab"})):r(!0)};return u.jsxs("div",{className:"flex flex-col items-center w-full max-w-2xl mx-auto space-y-6",children:[u.jsx(St,{className:"w-full space-y-6 bg-background/95 border-none",children:u.jsx(de.div,{className:"space-y-4",initial:{opacity:0},animate:{opacity:1},transition:{duration:.2},children:u.jsxs("div",{className:"space-y-2",children:[u.jsxs("div",{className:"flex items-center justify-between",children:[u.jsx("span",{className:"text-sm font-medium",children:C("manage_zones.max_planted_drugs")}),s&&(n===""||parseInt(n,10)<=0)&&u.jsx("span",{className:"text-destructive text-xs",children:C("required")})]}),u.jsx(wt,{type:"number",ref:a,min:1,defaultValue:n,className:s&&(n===""||parseInt(n,10)<=0)?"border-destructive":"",onInput:c=>i(c.target.value),placeholder:C("manage_zones.max_planted_drugs")})]})})}),u.jsx(ne,{onClick:o,className:"self-end",size:"lg",children:C("manage_zones.next")})]})},lee=({setData:e,data:t})=>{const[n,i]=x.useState(t?t.maxRecruits:""),[s,r]=x.useState(!1),a=x.useRef(null),o=()=>{r(!0),n&&parseInt(n,10)>0&&(e({tab:"recruiting",data:{maxRecruits:n}}),e({tab:"nextTab"}),r(!1))};return x.useEffect(()=>{a.current&&(a.current.value=n)},[]),u.jsxs("div",{className:"flex flex-col items-center w-full max-w-2xl mx-auto space-y-6",children:[u.jsx(St,{className:"w-full space-y-6 bg-background/95 border-none",children:u.jsx(de.div,{className:"space-y-4",initial:{opacity:0},animate:{opacity:1},transition:{duration:.2},children:u.jsxs("div",{className:"space-y-2",children:[u.jsxs("div",{className:"flex items-center justify-between",children:[u.jsx("span",{className:"text-sm font-medium",children:C("manage_zones.max_recruits")}),s&&(n===""||parseInt(n,10)<=0)&&u.jsx("span",{className:"text-destructive text-xs",children:C("required")})]}),u.jsx(wt,{type:"number",ref:a,min:1,defaultValue:n,className:s&&(n===""||parseInt(n,10)<=0)?"border-destructive":"",onInput:c=>i(c.target.value),placeholder:C("manage_zones.max_recruits")})]})})}),u.jsx(ne,{onClick:o,className:"self-end",size:"lg",children:C("manage_zones.next")})]})},cee=({setData:e,data:t})=>{const[n,i]=x.useState(t?t.maxCash:""),[s,r]=x.useState(t?t.minCash:""),[a,o]=x.useState(!1),c=x.useRef(null),d=x.useRef(null);x.useEffect(()=>{c.current&&(c.current.value=n),d.current&&(d.current.value=s)},[]);const h=()=>{n&&s?(e({tab:"cash",data:{minCash:s,maxCash:n}}),e({tab:"nextTab"})):o(!0)};return u.jsxs("div",{className:"flex flex-col items-center w-full max-w-2xl mx-auto space-y-6",children:[u.jsxs(St,{className:"w-full space-y-6 bg-background/95 border-none",children:[u.jsxs(de.div,{className:"space-y-2",initial:{opacity:0},animate:{opacity:1},transition:{duration:.2},children:[u.jsx("h2",{className:"text-2xl font-semibold tracking-tight",children:C("manage_zones.cash_title")}),u.jsx("p",{className:"text-sm text-muted-foreground",children:C("manage_zones.cash_subtitle")})]}),u.jsxs(de.div,{className:"space-y-4",initial:{opacity:0},animate:{opacity:1},transition:{duration:.2},children:[u.jsxs("div",{className:"space-y-2",children:[u.jsxs("div",{className:"flex items-center justify-between",children:[u.jsx("span",{className:"text-sm font-medium",children:C("manage_zones.min_cash")}),a&&(s===""||!s)&&u.jsx("span",{className:"text-destructive text-xs",children:C("required")})]}),u.jsx(wt,{type:"number",min:1,ref:d,defaultValue:s,className:a&&(s===""||!s)?"border-destructive":"",onInput:m=>r(m.target.value),placeholder:C("manage_zones.min_cash")})]}),u.jsxs("div",{className:"space-y-2",children:[u.jsxs("div",{className:"flex items-center justify-between",children:[u.jsx("span",{className:"text-sm font-medium",children:C("manage_zones.max_cash")}),a&&(n===""||!n)&&u.jsx("span",{className:"text-destructive text-xs",children:C("required")})]}),u.jsx(wt,{type:"number",min:1,ref:c,defaultValue:n,className:a&&(n===""||!n)?"border-destructive":"",onInput:m=>i(m.target.value),placeholder:C("manage_zones.max_cash")})]})]})]}),u.jsx(ne,{onClick:h,className:"self-end",size:"lg",children:C("manage_zones.next")})]})};var uee="Separator",t5="horizontal",dee=["horizontal","vertical"],_O=x.forwardRef((e,t)=>{const{decorative:n,orientation:i=t5,...s}=e,r=fee(i)?i:t5,o=n?{role:"none"}:{"aria-orientation":r==="vertical"?r:void 0,role:"separator"};return u.jsx(Te.div,{"data-orientation":r,...o,...s,ref:t})});_O.displayName=uee;function fee(e){return dee.includes(e)}var bO=_O;const B2=x.forwardRef(({className:e,orientation:t="horizontal",decorative:n=!0,...i},s)=>u.jsx(bO,{ref:s,decorative:n,orientation:t,className:ye("shrink-0 bg-border",t==="horizontal"?"h-[1px] w-full":"h-full w-[1px]",e),...i}));B2.displayName=bO.displayName;const hee=({data:e,editing:t})=>{var i,s,r,a,o,c,d,h,m,g,v,b,w,M,y,S,T,N,k;const n=async()=>{var B,W,G,ie;const{map:E,types:D,drugZone:O,recruiting:I,cash:P,capture:H,moneyLaundering:V,safeHouse:J,warehouse:Q}=e;let U={};if(!E||!E.data){console.error("Map data is missing.");return}const R=E.data.zoneId;U.id=parseInt(R),U.points=E.data.points,U.name=E.data.name,U.types=D!=null&&D.data?Object.keys(D.data).filter(se=>D.data[se]):[],(B=O==null?void 0:O.data)!=null&&B.maxPlants&&(U.max_plants=O.data.maxPlants),(W=I==null?void 0:I.data)!=null&&W.maxRecruits&&(U.max_recruits=I.data.maxRecruits),P!=null&&P.data&&(U.max_cash=P.data.maxCash,U.min_cash=P.data.minCash),Q!=null&&Q.data&&(U.warehouse=(G=Q==null?void 0:Q.data)==null?void 0:G.warehouseMarker,U.warehouse_crates_locations=((ie=Q==null?void 0:Q.data)==null?void 0:ie.warehouseCratesLocations)||[]),H!=null&&H.data&&(H.data.zoneAttack&&(U.zone_attack=H.data.zoneAttack),H.data.progressTypes&&(U.progress_types=H.data.progressTypes,U.min_progress=H.data.minProgress),U.capture=H.data.captureMarker,U.capture_time=H.data.captureTime,U.max_npc=H.data.maxNpc,U.min_npc=H.data.minNpc),V!=null&&V.data&&(U.laundering_menu=V.data.moneyLaunderingMarker,U.laundering_capacity=V.data.launderingCapacity),J!=null&&J.data&&(U.gang_menu=J.data.safeHouseMarker,U.weed_processing=J.data.weedProcessingMarker,U.garage=J.data.garageMarker,U.vehicle_spawn_pos=J.data.vehicleSpawnPos,U.ipl_marker=J.data.enterIplMarker,U.ipl_id=J.data.selectIpl,U.doors=J.data.doors||[],U.cash_safe=J.data.cashSafe);let $=await K("get_all_zones");if($.find(se=>se.id===U.id)?$=$.map(se=>se.id===U.id?U:se):$.push(U),t?await K("edit_zone",{zone:U}):await K("create_zone",{zone:U}),he.connectedZones.enable&&$.length>1){const se=$.filter(Le=>Le.points&&Le.points.length>=3);if(se.length>1){const Le=se.map(be=>sp(be.points)),je=wO(Le,he.connectedZones.minNumberOfConnectionBetweenZones,he.connectedZones.maxAngleBetweenConnectedZones);await K("update_connected_zones",{connections:je.map(be=>[se[be[0]].id,se[be[1]].id])})}}K("hideFrame")};return u.jsxs("div",{className:"flex flex-col items-center w-full max-w-2xl mx-auto space-y-6",children:[u.jsx(St,{className:"w-full space-y-6 bg-background/95 border-none",children:u.jsxs(de.div,{className:"space-y-6",initial:{opacity:0},animate:{opacity:1},transition:{duration:.2},children:[u.jsxs("div",{className:"space-y-4",children:[u.jsx("h2",{className:"text-lg font-semibold",children:C("manage_zones.zone_types")}),u.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[((i=e.types)==null?void 0:i.data)&&Object.entries(e.types.data).map(([E,D])=>D?u.jsxs("div",{className:"space-y-1",children:[u.jsx("div",{className:"text-sm font-medium",children:C("manage_zones."+E)}),u.jsx("div",{className:"text-xs text-muted-foreground",children:C("manage_zones."+E+"_desc")})]},E):null),((r=(s=e.capture)==null?void 0:s.data)==null?void 0:r.drugCapture)&&u.jsxs("div",{className:"space-y-1",children:[u.jsx("div",{className:"text-sm font-medium",children:C("manage_zones.drug_capture")}),u.jsx("div",{className:"text-xs text-muted-foreground",children:C("manage_zones.drug_capture_desc",[["amount",e.capture.data.minDrugCapture],["drug",C("drugs."+e.capture.data.drugCapture)]])})]})]})]}),u.jsx(B2,{}),u.jsxs("div",{className:"space-y-4",children:[u.jsx("h2",{className:"text-lg font-semibold",children:C("manage_zones.zone_data")}),u.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[((o=(a=e.drugZone)==null?void 0:a.data)==null?void 0:o.maxPlants)&&u.jsxs("div",{className:"space-y-1",children:[u.jsx("div",{className:"text-sm font-medium",children:C("manage_zones.drugZone")}),u.jsx("div",{className:"text-xs text-muted-foreground",children:C("manage_zones.max_drugs",[["amount",e.drugZone.data.maxPlants]])})]}),((d=(c=e.recruiting)==null?void 0:c.data)==null?void 0:d.maxRecruits)&&u.jsxs("div",{className:"space-y-1",children:[u.jsx("div",{className:"text-sm font-medium",children:C("manage_zones.recruiting")}),u.jsx("div",{className:"text-xs text-muted-foreground",children:C("manage_zones.max_recruits_amount",[["amount",e.recruiting.data.maxRecruits]])})]}),((m=(h=e.moneyLaundering)==null?void 0:h.data)==null?void 0:m.launderingCapacity)&&u.jsxs("div",{className:"space-y-1",children:[u.jsx("div",{className:"text-sm font-medium",children:C("manage_zones.money_laundering")}),u.jsx("div",{className:"text-xs text-muted-foreground",children:C("manage_zones.laundering_capacity_amount",[["amount",e.moneyLaundering.data.launderingCapacity],["currency",C("currency")]])})]}),((v=(g=e.capture)==null?void 0:g.data)==null?void 0:v.captureTime)&&u.jsxs("div",{className:"space-y-1",children:[u.jsx("div",{className:"text-sm font-medium",children:C("manage_zones.capture")}),u.jsx("div",{className:"text-xs text-muted-foreground",children:C("manage_zones.capturing_time",[["minutes",e.capture.data.captureTime]])})]}),(w=(b=e==null?void 0:e.capture)==null?void 0:b.data)!=null&&w.maxNpc&&((y=(M=e==null?void 0:e.capture)==null?void 0:M.data)!=null&&y.minNpc)?u.jsxs("div",{className:"space-y-1",children:[u.jsx("div",{className:"text-sm font-medium",children:C("manage_zones.npc_defenders")}),u.jsx("div",{className:"text-xs text-muted-foreground",children:C("manage_zones.defenders_desc",[["max",e.capture.data.maxNpc],["min",e.capture.data.minNpc]])})]}):null,(T=(S=e.cash)==null?void 0:S.data)!=null&&T.maxCash&&((k=(N=e.cash)==null?void 0:N.data)!=null&&k.minCash)?u.jsxs("div",{className:"space-y-1",children:[u.jsx("div",{className:"text-sm font-medium",children:C("manage_zones.cash")}),u.jsx("div",{className:"text-xs text-muted-foreground",children:C("manage_zones.cash_data_desc",[["max",e.cash.data.maxCash],["currency",C("currency")],["min",e.cash.data.minCash],["currency",C("currency")]])})]}):null]})]})]})}),u.jsx(ne,{onClick:n,className:"self-end",size:"lg",children:C("manage_zones.save")})]})};function mee({setData:e,data:t,allPoints:n}){t!=null&&t.warehouseCratesLocations&&(t==null?void 0:t.warehouseCratesLocations.length)<he.warehouse.crates.length&&(t.warehouseCratesLocations=Array(he.warehouse.crates.length).fill(null));const[i,s]=x.useState((t==null?void 0:t.warehouseMarker)&&!0||!1),[r,a]=x.useState((t==null?void 0:t.warehouseMarker)||null),[o,c]=x.useState((t==null?void 0:t.warehouseCratesLocations)||Array(he.warehouse.crates.length).fill(null)),[d,h]=x.useState(!1),m=()=>{h(!0),(r||o.every(b=>b)||!he.warehouse.enable)&&(e({tab:"warehouse",data:{warehouseMarker:r,warehouseCratesLocations:o}}),e({tab:"nextTab"}),h(!1))},g=async b=>{const w=await K("set_crate",{points:n});w&&c(M=>{const y=[...M];return y[b]=w,y})},v=async b=>{let w=await K("set_marker",{type:b,points:n});switch(w=w||null,b){case"warehouse":a(w);break}};return u.jsxs("div",{className:"flex flex-col items-center w-full max-w-3xl  mx-auto",children:[u.jsx(de.div,{className:"w-full",initial:{opacity:0},animate:{opacity:1},transition:{duration:.2},children:u.jsxs(St,{className:"bg-background/95 border-none",children:[u.jsxs("div",{className:"flex items-center justify-between",children:[u.jsx("h2",{className:"text-xl font-semibold ",children:C("manage_zones.warehouse")}),d&&u.jsxs("div",{className:"flex items-center gap-2 text-destructive",children:[u.jsx(o2,{className:"h-4 w-4"}),u.jsx("span",{className:"text-sm",children:C("manage_zones.select_one")})]})]}),he.warehouse.enable&&u.jsxs("div",{className:"space-y-2 ",children:[u.jsxs("span",{className:"text-sm font-medium flex items-center gap-2",children:[C("manage_zones.use_warehouse_ipl"),u.jsx(C0,{defaultChecked:i&&!0,onCheckedChange:()=>{s(!i),i?a(null):c(Array(he.warehouse.crates.length).fill(null))}})]}),i?u.jsxs(u.Fragment,{children:[u.jsxs("div",{className:"flex items-center justify-between",children:[u.jsx("span",{className:"text-sm font-medium",children:C(r?"manage_zones.warehouse_marker_set":"manage_zones.no_warehouse_marker_set")}),!r&&d&&u.jsx("span",{className:"text-destructive text-xs",children:C("required")})]}),u.jsx(ne,{variant:"secondary",size:"sm",className:"w-full",onClick:()=>v("warehouse"),children:C("manage_zones.set_warehouse_marker")})]}):u.jsxs(u.Fragment,{children:[u.jsxs("div",{className:"flex items-center justify-between",children:[u.jsx("span",{className:"text-sm font-medium",children:C("manage_zones.place_crates")}),!o.every(b=>b)&&d&&u.jsx("span",{className:"text-destructive text-xs",children:C("required")})]}),u.jsxs(Mr,{children:[u.jsx(Sy,{asChild:!0,children:u.jsx(ne,{variant:"secondary",size:"sm",className:"w-full",children:C("manage_zones.crates")})}),u.jsxs(Tr,{className:"w-fit",children:[u.jsx(jr,{children:u.jsx(Nr,{children:C("manage_zones.place_crates")})}),u.jsx("div",{className:"flex flex-col gap-2",children:o.map((b,w)=>u.jsxs("div",{className:"flex items-center justify-between gap-8 p-2 border rounded-md bg-secondary/25",children:[u.jsx("span",{className:"text-sm font-medium",children:C("manage_zones.crate_num",[["num",w+1]])}),u.jsxs("div",{className:"flex items-center gap-2",children:[b&&u.jsx("span",{className:"text-sm text-muted-foreground",children:C("manage_zones.crate_set")}),u.jsx(mE,{asChild:!0,children:u.jsx(ne,{size:"sm",onClick:()=>g(w),children:C(b?"manage_zones.change_crate":"manage_zones.set_crate")})})]})]},w))})]})]})]})]})]})}),u.jsx(ne,{onClick:m,className:"self-end",size:"lg",children:C("manage_zones.next")})]})}const M0=x.createContext(null),gee=()=>{var g,v,b,w;const[e,t]=x.useState({map:{show:!0,data:null},types:{show:!0,data:null},safeHouse:{show:!1,data:null},warehouse:{show:!1,data:null},capture:{show:!0,data:null},drugZone:{show:!1,data:null},moneyLaundering:{show:!1,data:null},recruiting:{show:!1,data:null},cash:{show:!1,data:null},save:{show:!0,data:null}}),[n,i]=x.useState({bodyguards:!1}),[s,r]=x.useState(null),[a,o]=x.useState("map"),c=async()=>{const M=await K("get_extensions");i(M)};x.useEffect(()=>{c()},[]);const d=M=>{if(M.tab==="types:updateTabs"){let y={...e};for(let S in M.data)S==="safeHouse"?(y.capture.show=!M.data[S],y.safeHouse.show=M.data[S]):y[S]&&(y[S].show=M.data[S]);t(y)}else if(M.tab==="nextTab")o(y=>{const S=Object.keys(e);let N=S.findIndex(k=>k===y)+1;for(;S[N]&&!e[S[N]].show;)N++;return S[N]||y});else if(M.tab=="editing")r(M.data);else{let y={...e};y[M.tab]&&(y[M.tab].data=M.data,t(y))}},h=Object.entries(e).filter(([M,y])=>y.show),m=h.findIndex(([M,y])=>M===a);return u.jsxs("div",{className:"fixed inset-0 flex items-center justify-center z-50 p-4",children:[" ",u.jsx(M0.Provider,{value:n,children:u.jsxs(mJ,{className:"relative bg-card text-card-foreground rounded-lg shadow-lg border border-border w-full max-w-3xl max-h-[97.5%] overflow-hidden p-4",children:[u.jsx(cl,{}),u.jsxs("div",{className:"flex flex-col w-full gap-0 justify-between ",children:[u.jsx("h1",{className:"text-2xl font-semibold",children:C("manage_zones.zone_creator")}),u.jsx("p",{className:"text-md text-muted-foreground",children:s?C("manage_zones.editing_zone_id",[["id",s]]):C("manage_zones.creating_new_zone")})]}),u.jsx("div",{className:"flex w-full items-center space-x-1 text-xs",children:h.map(([M,y],S)=>{const T=a===M,N=S<=m,k=S>m?"text-muted-foreground":"text-foreground",E=S+1>m?"text-muted-foreground":"text-foreground";return u.jsxs(ae.Fragment,{children:[u.jsx("button",{className:`px-3 py-1 rounded-md ${T?"bg-primary text-primary-foreground":k} ${N?"hover:bg-muted cursor-pointer":"cursor-default"}`,onClick:()=>{N&&o(M)},children:C("manage_zones."+M)}),S<h.length-1&&u.jsx(fJ,{className:`w-4 h-4 ${E}`})]},M)})}),a==="map"&&u.jsx(xee,{setData:d,data:e.map.data}),a==="types"&&u.jsx(QJ,{setData:d,data:e.types.data}),a==="safeHouse"&&u.jsx(ree,{setData:d,data:e.safeHouse.data,allPoints:(g=e.map.data)==null?void 0:g.points}),a==="capture"&&u.jsx(aee,{setData:d,data:e.capture.data,types:e.types.data,allPoints:(v=e.map.data)==null?void 0:v.points}),a==="warehouse"&&u.jsx(mee,{setData:d,data:e.warehouse.data,allPoints:(b=e.map.data)==null?void 0:b.points}),a==="drugZone"&&u.jsx(oee,{setData:d,data:e.drugZone.data}),a==="moneyLaundering"&&u.jsx(NJ,{setData:d,data:e.moneyLaundering.data,allPoints:(w=e.map.data)==null?void 0:w.points}),a==="recruiting"&&u.jsx(lee,{setData:d,data:e.recruiting.data}),a==="cash"&&u.jsx(cee,{setData:d,data:e.cash.data}),a==="save"&&u.jsx(hee,{data:e,editing:s})]})})]})},sp=e=>{var t=e[0],n=e[e.length-1];(t.x!=n.x||t.y!=n.y)&&e.push(t);for(var i=0,s=0,r=0,a=e.length,o,c,d,h=0,m=a-1;h<a;m=h++)o=e[h],c=e[m],d=o[0]*c[1]-c[0]*o[1],i+=d,s+=(o[0]+c[0])*d,r+=(o[1]+c[1])*d;return d=i*3,[s/d,r/d]};function pee(e,t){const n=e[0]-t[0],i=e[1]-t[1];return Math.sqrt(n*n+i*i)}function wO(e,t,n=15){const i=n*Math.PI/180,s=e.length,r=new Set;function a(c,d){const h=c<d?`${c}-${d}`:`${d}-${c}`;r.add(h)}for(let c=0;c<s;c++){const d=e[c],h=[];for(let v=0;v<s;v++){if(c===v)continue;const b=pee(d,e[v]),w=Math.atan2(e[v][1]-d[1],e[v][0]-d[0]);h.push({index:v,d:b,angle:w})}h.sort((v,b)=>v.d-b.d);let m=0,g=null;for(let v of h){if(m===0)a(c,v.index),m++,g=v.angle;else{let b=Math.abs(v.angle-g);b=Math.min(b,2*Math.PI-b),b>=i&&(a(c,v.index),m++,g=v.angle)}if(m>=t)break}}const o=[];return r.forEach(c=>{const d=c.split("-");o.push([parseInt(d[0],10),parseInt(d[1],10)])}),o}function vee(e,t){function n(d){const h=[];for(let m=0;m<d.length;m++){const g=d[m],v=d[(m+1)%d.length];h.push([v[0]-g[0],v[1]-g[1]])}return h}function i(d,h){let m=1/0,g=-1/0;for(const v of d){const b=(v[0]*h[0]+v[1]*h[1])/Math.sqrt(h[0]*h[0]+h[1]*h[1]);m=Math.min(m,b),g=Math.max(g,b)}return[m,g]}function s(d,h){return d[1]>=h[0]&&h[1]>=d[0]}function r(d){const h=Math.sqrt(d[0]*d[0]+d[1]*d[1]);return h===0?[0,0]:[d[0]/h,d[1]/h]}const a=n(e),o=n(t),c=a.concat(o);for(const d of c){const h=r([-d[1],d[0]]);if(h[0]===0&&h[1]===0)continue;const m=i(e,h),g=i(t,h);if(!s(m,g))return!1}return!0}function rp(e,t){const[n,i]=e;for(let s=0;s<t.length;s++){const r=t[s],a=t[(s+1)%t.length],o=(a[1]-r[1])*(i[0]-n[0])-(a[0]-r[0])*(i[1]-n[1]);if(o===0)continue;const c=((a[0]-r[0])*(n[1]-r[1])-(a[1]-r[1])*(n[0]-r[0]))/o,d=((i[0]-n[0])*(n[1]-r[1])-(i[1]-n[1])*(n[0]-r[0]))/o;if(c>=0&&c<=1&&d>=0&&d<=1)return[n[0]+c*(i[0]-n[0]),n[1]+c*(i[1]-n[1])]}return null}function xee({setData:e}){const t=x.useRef(null),n={gta5:{image:[16384,24576],topLeft:[-4140,8400],bottomRight:[4860,-5100],tileServer:"https://assets.loaf-scripts.com/map-tiles/gtav/main/{layer}/{z}/{x}/{y}.jpg"}};It.CRS.Game=It.extend({},It.CRS.Simple,{projection:It.Projection.LonLat,wrapLng:[n.gta5.topLeft[0],n.gta5.bottomRight[0]],wrapLat:[n.gta5.bottomRight[1],n.gta5.topLeft[1]],initialize:function(q){const xe=q.image,ke=q.topLeft,Ce=q.bottomRight,$e=256,Hi=Math.ceil(Math.log(Math.max(xe[0],xe[1])/$e)/Math.log(2)),Br=Ce[0]-ke[0],Ga=Ce[1]-ke[1];if(Br===0||Ga===0){this.transformation=new It.Transformation(1,0,-1,0),this.options={tileSize:$e},this._maxZoom=0;return}const Ya=Math.pow(2,Hi),hl=xe[0],$0=xe[1],yu=hl/(Br*Ya),ml=$0/(Ga*Ya),sh=-yu*ke[0],W0=-ml*ke[1];this.transformation=new It.Transformation(yu,sh,ml,W0),this.options={tileSize:$e},this._mapConfig=q,this._maxZoom=Hi},scale:function(q){return Math.pow(2,q)},zoom:function(q){return Math.log(q)/Math.LN2},distance:function(q,xe){var ke=xe.lng-q.lng,Ce=xe.lat-q.lat;return Math.sqrt(ke*ke+Ce*Ce)},getProjectedBounds:function(q){if(!this._mapConfig)return null;if(!this._projectedBounds){var xe=this.projection,ke=xe.project(It.latLng(this._mapConfig.topLeft[1],this._mapConfig.topLeft[0])),Ce=xe.project(It.latLng(this._mapConfig.bottomRight[1],this._mapConfig.bottomRight[0])),$e=It.point(Math.min(ke.x,Ce.x),Math.min(ke.y,Ce.y)),Hi=It.point(Math.max(ke.x,Ce.x),Math.max(ke.y,Ce.y));this._projectedBounds=new It.Bounds($e,Hi)}return this._projectedBounds},infinite:!1}),It.CRS.game=function(q){const xe=It.Util.create(It.CRS.Game);return xe.initialize(q),xe};const i=It.CRS.game(n.gta5),s=It.latLngBounds(It.latLng(n.gta5.bottomRight[1],n.gta5.topLeft[0]),It.latLng(n.gta5.topLeft[1],n.gta5.bottomRight[0])),r=7,a=7,o=It.tileLayer(n.gta5.tileServer,{minZoom:0,maxZoom:a,maxNativeZoom:r,noWrap:!0,bounds:s,tileSize:i.options.tileSize,layer:"render"}),c=It.tileLayer(n.gta5.tileServer,{minZoom:0,maxZoom:a,maxNativeZoom:r,noWrap:!0,bounds:s,tileSize:i.options.tileSize,layer:"game"}),d=It.tileLayer(n.gta5.tileServer,{minZoom:0,maxZoom:a,maxNativeZoom:r,noWrap:!0,bounds:s,tileSize:i.options.tileSize,layer:"print"}),[h,m]=x.useState([]),[g,v]=x.useState([]),[b,w]=x.useState(null),[M,y]=x.useState(""),[S,T]=x.useState(""),[N,k]=x.useState(!1),[E,D]=x.useState(!1),[O,I]=x.useState(!1),[P,H]=x.useState(!1),[V,J]=x.useState(!0),[Q,U]=x.useState(null),[R,$]=x.useState("#0d2b4f"),[B,W]=x.useState({safeHouses:!0,drugZones:!0,moneyLaundering:!0,drugSell:!0,cash:!0,recruit:!0,warehouse:!0}),[G,ie]=x.useState(!1),[se,Le]=x.useState(""),[je,be]=x.useState([]),[we,Tt]=x.useState(!1),F=x.useContext(M0),re=async()=>{let q=await K("get_all_zones"),xe=await K("get_connected_zones");const ke=await K("get_captured_zones");q=q.map(Ce=>{const $e=ke.find(Hi=>Hi.zone_id===Ce.id);return $e&&(Ce.gang_name=$e.gang_name,Ce.gang=$e.controlling_gang_id,Ce.color=$e.color),Ce.centroid=sp(Ce.points),Ce}),xe=xe.map(Ce=>[q.findIndex($e=>$e.id===Ce.connected_id_1),q.findIndex($e=>$e.id===Ce.connected_id_2)].filter($e=>$e!==-1)).filter(Ce=>Ce.length===2),m(q),be(xe),t.current.invalidateSize(),Tt(!0)};x.useEffect(()=>{re()},[]);const le=({id:q,labelKey:xe,checked:ke,onCheckedChange:Ce})=>u.jsxs("div",{className:"flex items-center space-x-2",children:[u.jsx(C0,{id:q,checked:ke,onCheckedChange:Ce}),u.jsx(g0,{htmlFor:q,className:"text-xs font-normal cursor-pointer",children:C(xe)})]}),ve=q=>{K("go_to",{zone:q})},Ae=()=>{e({tab:"map",data:{points:g,zoneId:M,name:S}}),e({tab:"nextTab"})},Re=()=>{e({tab:"map",data:{points:g,zoneId:M,name:S}}),e({tab:"capture",data:{captureMarker:null,captureTime:null,zoneAttack:!1,progressTypes:!1,minProgress:null,maxNpc:null,minNpc:null}}),e({tab:"safeHouse",data:{safeHouseMarker:null,weedProcessingMarker:null,garageMarker:null,vehicleSpawnPos:null,enterIplMarker:null,selectIpl:null,cashSafe:null,doors:[]}}),e({tab:"moneyLaundering",data:{moneyLaunderingMarker:null,launderingCapacity:null}}),e({tab:"drugZone",data:{maxPlants:null}}),F.bodyguards&&e({tab:"recruiting",data:{maxRecruits:null}}),e({tab:"cash",data:{maxCash:null,minCash:null}})},at=()=>{v(g.slice(0,-1)),Re()},At=()=>{v([]),Re()},xn=async q=>{if(q==="confirm"){const xe=b;await K("delete_zone",{id:xe});const ke=h.filter($e=>$e.id!==xe);let Ce=[];he.connectedZones.enable&&ke.length>1&&(Ce=wO(ke.map($e=>sp($e.points)),he.connectedZones.minNumberOfConnectionBetweenZones,he.connectedZones.maxAngleBetweenConnectedZones),await K("update_connected_zones",{connections:Ce.map($e=>[ke[$e[0]].id,ke[$e[1]].id])})),be(Ce),m(ke),Xe()}U(null)},Je=()=>{if(D(!0),!(M===""||!M)){if(!b&&h.find(xe=>xe.id.toString()===M.toString())){k(!0);return}k(!1),!(g.length<3)&&(D(!1),Ae())}},fe=q=>{e({tab:"editing",data:q.id}),e({tab:"map",data:{points:q.points,zoneId:q.id,name:q.name}});const xe=q.types||[],ke={safeHouse:!1,drugZone:!1,moneyLaundering:!1,drugSell:!1,recruiting:!1,cash:!1,warehouse:!1};xe.forEach(Ce=>{ke.hasOwnProperty(Ce)&&(ke[Ce]=!0)}),F.bodyguards&&(ke.bodyguards=xe.includes("bodyguards")),e({tab:"types",data:ke}),e({tab:"safeHouse",data:{safeHouseMarker:q.gangMenu,weedProcessingMarker:q.weedProcessing,garageMarker:q.garage,vehicleSpawnPos:q.vehicleSpawnPos,enterIplMarker:q.iplMarker,selectIpl:q.iplId,doors:q.doors||[],cashSafe:q==null?void 0:q.cashSafe}}),e({tab:"cash",data:{maxCash:q.maxCash,minCash:q.minCash}}),e({tab:"moneyLaundering",data:{moneyLaunderingMarker:q.launderingMenu,launderingCapacity:q.launderingCapacity}}),F.bodyguards&&e({tab:"recruiting",data:{maxRecruits:q.maxRecruits}}),e({tab:"drugZone",data:{maxPlants:q.maxPlants}}),e({tab:"capture",data:{captureMarker:q.capture,captureTime:q.captureTime,minNpc:q.minNpc,maxNpc:q.maxNpc,zoneAttack:q.zoneAttack,progressTypes:q.progressTypes,minProgress:q.minProgress}})},Oe=q=>{fe(q),w(q.id),v(q.points),y(q.id.toString()),T(q.name||"")},Xe=()=>{e({tab:"map",data:null}),e({tab:"types",data:{safeHouse:!1,drugZone:!1,moneyLaundering:!1,drugSell:!1,recruiting:!1,cash:!1}}),e({tab:"safeHouse",data:null}),e({tab:"capture",data:null}),e({tab:"drugZone",data:null}),e({tab:"moneyLaundering",data:null}),F.bodyguards&&e({tab:"recruiting",data:null}),e({tab:"cash",data:null}),e({tab:"editing",data:null}),w(!1),y(""),T(""),v([]),D(!1),k(!1)},tt=()=>(oJ({click:q=>{if(O&&b){I(!1);return}let xe=!1;if(!P&&g.length>=2){const ke=[...g,[parseFloat(q.latlng.lat.toFixed(2)),parseFloat(q.latlng.lng.toFixed(2))]];for(let Ce=0;Ce<h.length;Ce++)if((b&&b!==h[Ce].id||!b)&&vee(ke,h[Ce].points)){xe=!0;break}}xe||(v(ke=>[...ke,[parseFloat(q.latlng.lat.toFixed(2)),parseFloat(q.latlng.lng.toFixed(2))]]),Re())}}),null);return x.useEffect(()=>{const q=localStorage.getItem("mapStyle")||"satelite";if(t.current&&(q==="satelite"?(t.current.addLayer(o),$("#0d2b4f")):q==="game"?(t.current.addLayer(c),$("#384950")):q==="atlas"&&(t.current.addLayer(d),$("#4eb1d0")),he.ui.showCayoPericoMap)){const xe=[[-4193.72,3756.95],[-6121.93,5681.2]];It.imageOverlay("./cayo-perico-island.png",xe).addTo(t.current)}},[t.current]),u.jsxs("div",{className:"flex flex-col items-center w-full max-w-2xl mx-auto space-y-2",children:[Q&&u.jsx(tK,{title:Q.title,desc:Q.desc,actionClicked:xn,buttons:[{label:C("cancel"),action:"cancel"},{label:C("confirm"),action:"confirm",type:"destructive"}]}),u.jsxs("div",{className:"bg-background text-foreground text-xs rounded-lg flex flex-row items-center gap-4 w-full h-full",children:[u.jsxs(de.div,{className:"flex flex-col gap-2 w-full",initial:{opacity:0},animate:{opacity:1},transition:{duration:.2},children:[u.jsxs("div",{className:"text-xs font-medium flex justify-between items-center",children:[u.jsx("span",{children:C("manage_zones.input_new_zone_id")}),E&&(M===""||!M||N)&&u.jsx("span",{className:"text-destructive text-xs",children:C(N?"manage_zones.id_exists":"required")})]}),u.jsx(wt,{type:"number",min:1,disabled:!!b,onInput:q=>{b||y(q.target.value)},value:M,className:E&&(M===""||!M||N)&&"border-destructive",placeholder:C("manage_zones.zone_id")})]}),u.jsxs(de.div,{className:"flex flex-col gap-2 w-full",initial:{opacity:0},animate:{opacity:1},transition:{duration:.2},children:[u.jsxs("div",{className:"text-xs font-medium flex justify-between items-center",children:[u.jsx("span",{children:C("manage_zones.input_zone_name")}),E&&S===""&&u.jsx("span",{className:"text-destructive text-xs",children:C("required")})]}),u.jsx(wt,{min:1,onInput:q=>T(q.target.value),value:S,className:E&&S===""&&"border-destructive",placeholder:C("manage_zones.zone_name")})]})]}),u.jsxs("div",{className:"flex relative w-full h-[55vh] rounded-lg overflow-hidden shadow-md",children:[u.jsxs(M2,{open:G,onOpenChange:ie,children:[u.jsx(T2,{asChild:!0,children:u.jsx(ne,{variant:"outline",size:"icon",className:"absolute top-2 right-2 z-[1000] bg-card hover:bg-muted opacity-100",children:u.jsx(xk,{className:"h-5 w-5"})})}),u.jsxs(j2,{className:"w-64 p-0 mr-2 mt-1 z-[1000]",align:"end",children:[" ",u.jsxs("div",{className:"p-3 space-y-3",children:[u.jsx("h4",{className:"font-medium leading-none",children:C("menu.find_zone")}),u.jsx(wt,{type:"text",placeholder:C("menu.search_zone"),value:se,onChange:q=>Le(q.target.value),className:"h-8 text-xs"})]}),u.jsx("hr",{className:"border-border"}),u.jsxs("div",{className:"p-3 space-y-2",children:[u.jsx("h4",{className:"font-medium leading-none mb-1",children:C("menu.map_types")}),u.jsx(_0,{defaultValue:localStorage.getItem("mapStyle")||"satelite",className:"w-full",children:u.jsxs(qf,{className:"grid w-full h-fit grid-cols-2",children:[u.jsx(ci,{value:"atlas",className:"text-xs",onClick:()=>{t.current.eachLayer(function(q){q.options.layer&&t.current.removeLayer(q)}),t.current.addLayer(d),$("#4eb1d0"),localStorage.setItem("mapStyle","atlas")},children:C("menu.atlas")}),u.jsx(ci,{value:"game",className:"text-xs",onClick:()=>{t.current.eachLayer(function(q){q.options.layer&&t.current.removeLayer(q)}),t.current.addLayer(c),$("#384950"),localStorage.setItem("mapStyle","game")},children:C("menu.game_map")}),u.jsx(ci,{value:"satelite",className:"text-xs",onClick:()=>{t.current.eachLayer(function(q){q.options.layer&&t.current.removeLayer(q)}),t.current.addLayer(o),$("#0d2b4f"),localStorage.setItem("mapStyle","satelite")},children:C("menu.satellite")})]})})]}),u.jsx("hr",{className:"border-border"}),u.jsxs("div",{className:"p-3 space-y-2",children:[u.jsx("h4",{className:"font-medium leading-none mb-1",children:C("menu.filters")}),u.jsx(le,{id:"filterOwned",labelKey:"menu.owned_zones",checked:B.ownedZones,onCheckedChange:q=>W(xe=>({...xe,ownedZones:q}))}),u.jsx(le,{id:"filterSafeHouses",labelKey:"menu.safe_houses",checked:B.safeHouses,onCheckedChange:q=>W(xe=>({...xe,safeHouses:q}))}),u.jsx(le,{id:"filterDrugZones",labelKey:"menu.drug_zones",checked:B.drugZones,onCheckedChange:q=>W(xe=>({...xe,drugZones:q}))}),u.jsx(le,{id:"filterMoneyLaundering",labelKey:"menu.money_laundering_zone",checked:B.moneyLaundering,onCheckedChange:q=>W(xe=>({...xe,moneyLaundering:q}))}),u.jsx(le,{id:"filterDrugSell",labelKey:"menu.drug_sell_zone",checked:B.drugSell,onCheckedChange:q=>W(xe=>({...xe,drugSell:q}))}),u.jsx(le,{id:"filterCash",labelKey:"menu.cash_zone",checked:B.cash,onCheckedChange:q=>W(xe=>({...xe,cash:q}))}),u.jsx(le,{id:"filterWarehouse",labelKey:"menu.warehouse",checked:B.warehouse,onCheckedChange:q=>W(xe=>({...xe,warehouse:q}))}),F.bodyguards&&u.jsx(le,{id:"filterRecruit",labelKey:"menu.recruit_zone",checked:B.recruit,onCheckedChange:q=>W(xe=>({...xe,recruit:q}))})]})]})]}),u.jsx("div",{className:ye("relative w-full h-full flex items-center z-10"),style:{backgroundColor:R},children:u.jsxs(RA,{crs:i,minZoom:0,maxZoom:a,preferCanvas:!0,center:[0,0],zoom:2,bounds:s,className:ye("w-full h-full outline-none border-none bg-transparent cursor-crosshair"),attributionControl:!1,zoomControl:!1,ref:t,boxZoom:!1,children:[u.jsx(tt,{}),je.map((q,xe)=>{var Br,Ga;if(!h[q[0]]||!h[q[1]])return null;const ke=h[q[0]],Ce=h[q[1]];let $e="red",Hi=1;if(ke!=null&&ke.centroid&&(Ce!=null&&Ce.centroid)&&(se===""||(Br=ke.name)!=null&&Br.includes(se)||(Ga=Ce.name)!=null&&Ga.includes(se)||ke.id.toString().includes(se)||Ce.id.toString().includes(se))){const Ya=rp([ke.centroid,Ce.centroid],ke.points),hl=rp([ke.centroid,Ce.centroid],Ce.points);return u.jsx(LA,{pathOptions:{color:$e,opacity:V?Hi:0},positions:[Ya??ke.centroid,hl??Ce.centroid]},`graph-${xe}`)}return null}),h.map((q,xe)=>{var Ce;let ke=!1;for(const $e of q.types)if($e==="safeHouse"&&B.safeHouses||$e==="drugZone"&&B.drugZones||$e==="moneyLaundering"&&B.moneyLaundering||$e==="drugSell"&&B.drugSell||$e==="recruiting"&&B.recruit&&F.bodyguards||$e==="cash"&&B.cash||$e==="warehouse"&&B.warehouse){ke=!0;break}return se!==""&&(q.id.toString().includes(se)||(Ce=q.name)!=null&&Ce.toLowerCase().includes(se.toLowerCase()))&&(ke=!0),!ke||b&&q.id===b?null:u.jsx(ky,{pathOptions:{color:V?"red":"transparent"},positions:q.points,children:u.jsxs(zA,{className:"custom-leaflet-popup",children:[" ",u.jsxs("div",{className:"flex flex-col gap-1 p-1 text-xs w-28",children:[" ",u.jsxs("span",{className:"font-bold text-sm text-center",children:[q.name?q.name:C("menu.zone")," #",q.id]}),u.jsx(ne,{size:"sm",className:"bg-secondary text-secondary-foreground hover:bg-muted text-[0.6rem] px-2 py-0.5 rounded",onClick:()=>{I(!0),Oe(q)},children:C("manage_zones.edit")}),u.jsx(ne,{size:"sm",className:"bg-secondary text-secondary-foreground hover:bg-muted text-[0.6rem] px-2 py-0.5 rounded",onClick:()=>ve(q),children:C("manage_zones.goTo")})]})]})},`zone-${xe}`)}),g.length>0&&u.jsx(ky,{pathOptions:{color:"white"},positions:g})]})})]}),u.jsxs(de.div,{className:"w-full gap-2 flex items-center text-xs h-fit flex-row",initial:{opacity:0},animate:{opacity:1},transition:{duration:.2},children:[b&&u.jsxs(u.Fragment,{children:[u.jsx(ne,{size:"sm",variant:"destructive",onClick:()=>U({title:C("manage_zones.delete_zone"),desc:C("manage_zones.confirm_delete_zone")}),children:C("manage_zones.delete_zone")}),u.jsx(ne,{size:"sm",variant:"outline",onClick:Xe,children:C("manage_zones.stop_editing")})]}),u.jsx(ne,{size:"sm",onClick:At,variant:"outline",children:C("manage_zones.reset_points")}),u.jsx(ne,{size:"sm",onClick:at,variant:"outline",children:C("manage_zones.undo_point")}),u.jsx(ne,{size:"sm",className:P?"bg-green-600 hover:bg-green-700 text-white":"bg-amber-600 hover:bg-amber-700 text-white",onClick:()=>H(!P),children:C(P?"manage_zones.check_overlap":"manage_zones.ignore_overlap")})]}),u.jsx(ne,{className:"self-end",size:"lg",onClick:Je,children:C("manage_zones.next")}),u.jsx("style",{jsx:!0,global:!0,children:`
                .custom-leaflet-popup .leaflet-popup-content-wrapper {
                    background-color: hsl(var(--card));
                    color: hsl(var(--card-foreground));
                    border: 1px solid hsl(var(--border));
                    border-radius: 0.375rem; /* rounded-md */
                    padding: 0.25rem; /* Minimal padding, inner div has more */
                }
                .custom-leaflet-popup .leaflet-popup-content {
                    margin: 0;
                    width: auto !important; /* Override Leaflet's fixed width */
                }
                .custom-leaflet-popup .leaflet-popup-tip {
                    background-color: hsl(var(--card));
                }
            `})]})}var yee={},qn={},Kf={},T0={},SO={};Object.defineProperty(SO,"__esModule",{value:!0});var j0={},Ys={};Object.defineProperty(Ys,"__esModule",{value:!0});Ys.CronField=void 0;var jc,cr;const dw=class dw{constructor(t,n=!1){vt(this,jc,!1);vt(this,cr,[]);if(!Array.isArray(t))throw new Error(`${this.constructor.name} Validation error, values is not an array`);if(!(t.length>0))throw new Error(`${this.constructor.name} Validation error, values contains no values`);Se(this,cr,t.sort(dw.sorter)),Se(this,jc,n)}static get min(){throw new Error("min must be overridden")}static get max(){throw new Error("max must be overridden")}static get chars(){return Object.freeze([])}static get validChars(){return/^[,*\d/-]+$/}static get constraints(){return{min:this.min,max:this.max,chars:this.chars,validChars:this.validChars}}get min(){return this.constructor.min}get max(){return this.constructor.max}get chars(){return this.constructor.chars}get isWildcard(){return X(this,jc)}get values(){return X(this,cr)}static sorter(t,n){const i=typeof t=="number",s=typeof n=="number";return i&&s?t-n:!i&&!s?t.localeCompare(n):i?-1:1}serialize(){return{wildcard:X(this,jc),values:X(this,cr)}}validate(){let t;const n=this.chars.length>0?` or chars ${this.chars.join("")}`:"",i=o=>c=>new RegExp(`^\\d{0,2}${c}$`).test(o),s=o=>(t=o,typeof o=="number"?o>=this.min&&o<=this.max:this.chars.some(i(o)));if(!X(this,cr).every(s))throw new Error(`${this.constructor.name} Validation error, got value ${t} expected range ${this.min}-${this.max}${n}`);const a=X(this,cr).find((o,c)=>X(this,cr).indexOf(o)!==c);if(a)throw new Error(`${this.constructor.name} Validation error, duplicate values found: ${a}`)}};jc=new WeakMap,cr=new WeakMap;let Dy=dw;Ys.CronField=Dy;Object.defineProperty(j0,"__esModule",{value:!0});j0.CronDayOfMonth=void 0;const _ee=Ys,bee=1,wee=31,See=Object.freeze(["L"]);class Cee extends _ee.CronField{static get min(){return bee}static get max(){return wee}static get chars(){return See}static get validChars(){return/^[?,*\dL/-]+$/}constructor(t,n=!1){super(t,n),this.validate()}get values(){return super.values}}j0.CronDayOfMonth=Cee;var N0={};Object.defineProperty(N0,"__esModule",{value:!0});N0.CronDayOfWeek=void 0;const Mee=Ys,Tee=0,jee=7,Nee=Object.freeze(["L"]);class kee extends Mee.CronField{static get min(){return Tee}static get max(){return jee}static get chars(){return Nee}static get validChars(){return/^[?,*\dL#/-]+$/}constructor(t,n=!1){super(t,n),this.validate()}get values(){return super.values}}N0.CronDayOfWeek=kee;var k0={};Object.defineProperty(k0,"__esModule",{value:!0});k0.CronHour=void 0;const Eee=Ys,Aee=0,Oee=23,Dee=Object.freeze([]);class Pee extends Eee.CronField{static get min(){return Aee}static get max(){return Oee}static get chars(){return Dee}constructor(t,n=!1){super(t,n),this.validate()}get values(){return super.values}}k0.CronHour=Pee;var E0={};Object.defineProperty(E0,"__esModule",{value:!0});E0.CronMinute=void 0;const Ree=Ys,Lee=0,zee=59,Iee=Object.freeze([]);class Bee extends Ree.CronField{static get min(){return Lee}static get max(){return zee}static get chars(){return Iee}constructor(t,n=!1){super(t,n),this.validate()}get values(){return super.values}}E0.CronMinute=Bee;var A0={};Object.defineProperty(A0,"__esModule",{value:!0});A0.CronMonth=void 0;const Vee=Ys,Hee=1,Fee=12,Uee=Object.freeze([]),Zee=Object.freeze([31,29,31,30,31,30,31,31,30,31,30,31]);class $ee extends Vee.CronField{static get min(){return Hee}static get max(){return Fee}static get chars(){return Uee}static get daysInMonth(){return Zee}constructor(t,n=!1){super(t,n),this.validate()}get values(){return super.values}}A0.CronMonth=$ee;var O0={};Object.defineProperty(O0,"__esModule",{value:!0});O0.CronSecond=void 0;const Wee=Ys,Gee=0,Yee=59,qee=Object.freeze([]);class Xee extends Wee.CronField{static get min(){return Gee}static get max(){return Yee}static get chars(){return qee}constructor(t,n=!1){super(t,n),this.validate()}get values(){return super.values}}O0.CronSecond=Xee;(function(e){var t=In&&In.__createBinding||(Object.create?function(i,s,r,a){a===void 0&&(a=r);var o=Object.getOwnPropertyDescriptor(s,r);(!o||("get"in o?!s.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return s[r]}}),Object.defineProperty(i,a,o)}:function(i,s,r,a){a===void 0&&(a=r),i[a]=s[r]}),n=In&&In.__exportStar||function(i,s){for(var r in i)r!=="default"&&!Object.prototype.hasOwnProperty.call(s,r)&&t(s,i,r)};Object.defineProperty(e,"__esModule",{value:!0}),n(SO,e),n(j0,e),n(N0,e),n(Ys,e),n(k0,e),n(E0,e),n(A0,e),n(O0,e)})(T0);Object.defineProperty(Kf,"__esModule",{value:!0});Kf.CronFieldCollection=void 0;const Wi=T0;var Mo,To,jo,No,ur,ua,Xc,CO,MO;const yo=class yo{constructor({second:t,minute:n,hour:i,dayOfMonth:s,month:r,dayOfWeek:a}){vt(this,Mo);vt(this,To);vt(this,jo);vt(this,No);vt(this,ur);vt(this,ua);if(!t)throw new Error("Validation error, Field second is missing");if(!n)throw new Error("Validation error, Field minute is missing");if(!i)throw new Error("Validation error, Field hour is missing");if(!s)throw new Error("Validation error, Field dayOfMonth is missing");if(!r)throw new Error("Validation error, Field month is missing");if(!a)throw new Error("Validation error, Field dayOfWeek is missing");if(r.values.length===1&&!(parseInt(s.values[0],10)<=Wi.CronMonth.daysInMonth[r.values[0]-1]))throw new Error("Invalid explicit day of month definition");Se(this,Mo,t),Se(this,To,n),Se(this,jo,i),Se(this,ur,r),Se(this,ua,a),Se(this,No,s)}static from(t,n){return new yo({second:this.resolveField(Wi.CronSecond,t.second,n.second),minute:this.resolveField(Wi.CronMinute,t.minute,n.minute),hour:this.resolveField(Wi.CronHour,t.hour,n.hour),dayOfMonth:this.resolveField(Wi.CronDayOfMonth,t.dayOfMonth,n.dayOfMonth),month:this.resolveField(Wi.CronMonth,t.month,n.month),dayOfWeek:this.resolveField(Wi.CronDayOfWeek,t.dayOfWeek,n.dayOfWeek)})}static resolveField(t,n,i){return i?i instanceof Wi.CronField?i:new t(i):n}get second(){return X(this,Mo)}get minute(){return X(this,To)}get hour(){return X(this,jo)}get dayOfMonth(){return X(this,No)}get month(){return X(this,ur)}get dayOfWeek(){return X(this,ua)}static compactField(t){if(t.length===0)return[];const n=[];let i;return t.forEach((s,r,a)=>{if(i===void 0){i={start:s,count:1};return}const o=a[r-1]||i.start,c=a[r+1];if(s==="L"||s==="W"){n.push(i),n.push({start:s,count:1}),i=void 0;return}if(i.step===void 0&&c!==void 0){const d=s-o,h=c-s;if(d<=h){i={...i,count:2,end:s,step:d};return}i.step=1}s-(i.end??0)===i.step?(i.count++,i.end=s):(i.count===1?n.push({start:i.start,count:1}):i.count===2?(n.push({start:i.start,count:1}),n.push({start:i.end??o,count:1})):n.push(i),i={start:s,count:1})}),i&&n.push(i),n}stringifyField(t){var r;let n=t.max,i=t.values;if(t instanceof Wi.CronDayOfWeek){n=6;const a=X(this,ua).values;i=a[a.length-1]===7?a.slice(0,-1):a}t instanceof Wi.CronDayOfMonth&&(n=X(this,ur).values.length===1?Wi.CronMonth.daysInMonth[X(this,ur).values[0]-1]:t.max);const s=yo.compactField(i);if(s.length===1){const a=Ee(r=yo,Xc,CO).call(r,s[0],t.min,n);if(a)return a}return s.map(a=>{var o;return a.count===1?a.start.toString():Ee(o=yo,Xc,MO).call(o,a,n)}).join(",")}stringify(t=!1){const n=[];return t&&n.push(this.stringifyField(X(this,Mo))),n.push(this.stringifyField(X(this,To)),this.stringifyField(X(this,jo)),this.stringifyField(X(this,No)),this.stringifyField(X(this,ur)),this.stringifyField(X(this,ua))),n.join(" ")}serialize(){return{second:X(this,Mo).serialize(),minute:X(this,To).serialize(),hour:X(this,jo).serialize(),dayOfMonth:X(this,No).serialize(),month:X(this,ur).serialize(),dayOfWeek:X(this,ua).serialize()}}};Mo=new WeakMap,To=new WeakMap,jo=new WeakMap,No=new WeakMap,ur=new WeakMap,ua=new WeakMap,Xc=new WeakSet,CO=function(t,n,i){const s=t.step;return s?s===1&&t.start===n&&t.end&&t.end>=i?"*":s!==1&&t.start===n&&t.end&&t.end>=i-s+1?`*/${s}`:null:null},MO=function(t,n){const i=t.step;if(i===1)return`${t.start}-${t.end}`;const s=t.start===0?t.count-1:t.count;if(!i)throw new Error("Unexpected range step");if(!t.end)throw new Error("Unexpected range end");if(i*s>t.end){const r=(o,c)=>{if(typeof t.start!="number")throw new Error("Unexpected range start");return c%i===0?t.start+c:null};if(typeof t.start!="number")throw new Error("Unexpected range start");const a={length:t.end-t.start+1};return Array.from(a,r).filter(o=>o!==null).join(",")}return t.end===n-i+1?`${t.start}/${i}`:`${t.start}-${t.end}/${i}`},vt(yo,Xc);let Py=yo;Kf.CronFieldCollection=Py;var is={},ni={};Object.defineProperty(ni,"__esModule",{value:!0});class ul extends Error{}class Kee extends ul{constructor(t){super(`Invalid DateTime: ${t.toMessage()}`)}}class Qee extends ul{constructor(t){super(`Invalid Interval: ${t.toMessage()}`)}}class Jee extends ul{constructor(t){super(`Invalid Duration: ${t.toMessage()}`)}}class rc extends ul{}class TO extends ul{constructor(t){super(`Invalid unit ${t}`)}}class Cn extends ul{}class $r extends ul{constructor(){super("Zone is an abstract class")}}const ue="numeric",ls="short",fi="long",ap={year:ue,month:ue,day:ue},jO={year:ue,month:ls,day:ue},ete={year:ue,month:ls,day:ue,weekday:ls},NO={year:ue,month:fi,day:ue},kO={year:ue,month:fi,day:ue,weekday:fi},EO={hour:ue,minute:ue},AO={hour:ue,minute:ue,second:ue},OO={hour:ue,minute:ue,second:ue,timeZoneName:ls},DO={hour:ue,minute:ue,second:ue,timeZoneName:fi},PO={hour:ue,minute:ue,hourCycle:"h23"},RO={hour:ue,minute:ue,second:ue,hourCycle:"h23"},LO={hour:ue,minute:ue,second:ue,hourCycle:"h23",timeZoneName:ls},zO={hour:ue,minute:ue,second:ue,hourCycle:"h23",timeZoneName:fi},IO={year:ue,month:ue,day:ue,hour:ue,minute:ue},BO={year:ue,month:ue,day:ue,hour:ue,minute:ue,second:ue},VO={year:ue,month:ls,day:ue,hour:ue,minute:ue},HO={year:ue,month:ls,day:ue,hour:ue,minute:ue,second:ue},tte={year:ue,month:ls,day:ue,weekday:ls,hour:ue,minute:ue},FO={year:ue,month:fi,day:ue,hour:ue,minute:ue,timeZoneName:ls},UO={year:ue,month:fi,day:ue,hour:ue,minute:ue,second:ue,timeZoneName:ls},ZO={year:ue,month:fi,day:ue,weekday:fi,hour:ue,minute:ue,timeZoneName:fi},$O={year:ue,month:fi,day:ue,weekday:fi,hour:ue,minute:ue,second:ue,timeZoneName:fi};class hu{get type(){throw new $r}get name(){throw new $r}get ianaName(){return this.name}get isUniversal(){throw new $r}offsetName(t,n){throw new $r}formatOffset(t,n){throw new $r}offset(t){throw new $r}equals(t){throw new $r}get isValid(){throw new $r}}let Fv=null;class Qf extends hu{static get instance(){return Fv===null&&(Fv=new Qf),Fv}get type(){return"system"}get name(){return new Intl.DateTimeFormat().resolvedOptions().timeZone}get isUniversal(){return!1}offsetName(t,{format:n,locale:i}){return n7(t,n,i)}formatOffset(t,n){return Ud(this.offset(t),n)}offset(t){return-new Date(t).getTimezoneOffset()}equals(t){return t.type==="system"}get isValid(){return!0}}let Zm={};function nte(e){return Zm[e]||(Zm[e]=new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:e,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",era:"short"})),Zm[e]}const ite={year:0,month:1,day:2,era:3,hour:4,minute:5,second:6};function ste(e,t){const n=e.format(t).replace(/\u200E/g,""),i=/(\d+)\/(\d+)\/(\d+) (AD|BC),? (\d+):(\d+):(\d+)/.exec(n),[,s,r,a,o,c,d,h]=i;return[a,s,r,o,c,d,h]}function rte(e,t){const n=e.formatToParts(t),i=[];for(let s=0;s<n.length;s++){const{type:r,value:a}=n[s],o=ite[r];r==="era"?i[o]=a:Pe(o)||(i[o]=parseInt(a,10))}return i}let dm={};class Zs extends hu{static create(t){return dm[t]||(dm[t]=new Zs(t)),dm[t]}static resetCache(){dm={},Zm={}}static isValidSpecifier(t){return this.isValidZone(t)}static isValidZone(t){if(!t)return!1;try{return new Intl.DateTimeFormat("en-US",{timeZone:t}).format(),!0}catch{return!1}}constructor(t){super(),this.zoneName=t,this.valid=Zs.isValidZone(t)}get type(){return"iana"}get name(){return this.zoneName}get isUniversal(){return!1}offsetName(t,{format:n,locale:i}){return n7(t,n,i,this.name)}formatOffset(t,n){return Ud(this.offset(t),n)}offset(t){const n=new Date(t);if(isNaN(n))return NaN;const i=nte(this.name);let[s,r,a,o,c,d,h]=i.formatToParts?rte(i,n):ste(i,n);o==="BC"&&(s=-Math.abs(s)+1);const g=P0({year:s,month:r,day:a,hour:c===24?0:c,minute:d,second:h,millisecond:0});let v=+n;const b=v%1e3;return v-=b>=0?b:1e3+b,(g-v)/(60*1e3)}equals(t){return t.type==="iana"&&t.name===this.name}get isValid(){return this.valid}}let n5={};function ate(e,t={}){const n=JSON.stringify([e,t]);let i=n5[n];return i||(i=new Intl.ListFormat(e,t),n5[n]=i),i}let Ry={};function Ly(e,t={}){const n=JSON.stringify([e,t]);let i=Ry[n];return i||(i=new Intl.DateTimeFormat(e,t),Ry[n]=i),i}let zy={};function ote(e,t={}){const n=JSON.stringify([e,t]);let i=zy[n];return i||(i=new Intl.NumberFormat(e,t),zy[n]=i),i}let Iy={};function lte(e,t={}){const{base:n,...i}=t,s=JSON.stringify([e,i]);let r=Iy[s];return r||(r=new Intl.RelativeTimeFormat(e,t),Iy[s]=r),r}let fd=null;function cte(){return fd||(fd=new Intl.DateTimeFormat().resolvedOptions().locale,fd)}let $m={};function WO(e){return $m[e]||($m[e]=new Intl.DateTimeFormat(e).resolvedOptions()),$m[e]}let i5={};function ute(e){let t=i5[e];if(!t){const n=new Intl.Locale(e);t="getWeekInfo"in n?n.getWeekInfo():n.weekInfo,i5[e]=t}return t}function dte(e){const t=e.indexOf("-x-");t!==-1&&(e=e.substring(0,t));const n=e.indexOf("-u-");if(n===-1)return[e];{let i,s;try{i=Ly(e).resolvedOptions(),s=e}catch{const c=e.substring(0,n);i=Ly(c).resolvedOptions(),s=c}const{numberingSystem:r,calendar:a}=i;return[s,r,a]}}function fte(e,t,n){return(n||t)&&(e.includes("-u-")||(e+="-u"),n&&(e+=`-ca-${n}`),t&&(e+=`-nu-${t}`)),e}function hte(e){const t=[];for(let n=1;n<=12;n++){const i=De.utc(2009,n,1);t.push(e(i))}return t}function mte(e){const t=[];for(let n=1;n<=7;n++){const i=De.utc(2016,11,13+n);t.push(e(i))}return t}function fm(e,t,n,i){const s=e.listingMode();return s==="error"?null:s==="en"?n(t):i(t)}function gte(e){return e.numberingSystem&&e.numberingSystem!=="latn"?!1:e.numberingSystem==="latn"||!e.locale||e.locale.startsWith("en")||WO(e.locale).numberingSystem==="latn"}class pte{constructor(t,n,i){this.padTo=i.padTo||0,this.floor=i.floor||!1;const{padTo:s,floor:r,...a}=i;if(!n||Object.keys(a).length>0){const o={useGrouping:!1,...i};i.padTo>0&&(o.minimumIntegerDigits=i.padTo),this.inf=ote(t,o)}}format(t){if(this.inf){const n=this.floor?Math.floor(t):t;return this.inf.format(n)}else{const n=this.floor?Math.floor(t):Z2(t,3);return qt(n,this.padTo)}}}class vte{constructor(t,n,i){this.opts=i,this.originalZone=void 0;let s;if(this.opts.timeZone)this.dt=t;else if(t.zone.type==="fixed"){const a=-1*(t.offset/60),o=a>=0?`Etc/GMT+${a}`:`Etc/GMT${a}`;t.offset!==0&&Zs.create(o).valid?(s=o,this.dt=t):(s="UTC",this.dt=t.offset===0?t:t.setZone("UTC").plus({minutes:t.offset}),this.originalZone=t.zone)}else t.zone.type==="system"?this.dt=t:t.zone.type==="iana"?(this.dt=t,s=t.zone.name):(s="UTC",this.dt=t.setZone("UTC").plus({minutes:t.offset}),this.originalZone=t.zone);const r={...this.opts};r.timeZone=r.timeZone||s,this.dtf=Ly(n,r)}format(){return this.originalZone?this.formatToParts().map(({value:t})=>t).join(""):this.dtf.format(this.dt.toJSDate())}formatToParts(){const t=this.dtf.formatToParts(this.dt.toJSDate());return this.originalZone?t.map(n=>{if(n.type==="timeZoneName"){const i=this.originalZone.offsetName(this.dt.ts,{locale:this.dt.locale,format:this.opts.timeZoneName});return{...n,value:i}}else return n}):t}resolvedOptions(){return this.dtf.resolvedOptions()}}class xte{constructor(t,n,i){this.opts={style:"long",...i},!n&&e7()&&(this.rtf=lte(t,i))}format(t,n){return this.rtf?this.rtf.format(t,n):Vte(n,t,this.opts.numeric,this.opts.style!=="long")}formatToParts(t,n){return this.rtf?this.rtf.formatToParts(t,n):[]}}const yte={firstDay:1,minimalDays:4,weekend:[6,7]};class ot{static fromOpts(t){return ot.create(t.locale,t.numberingSystem,t.outputCalendar,t.weekSettings,t.defaultToEN)}static create(t,n,i,s,r=!1){const a=t||Lt.defaultLocale,o=a||(r?"en-US":cte()),c=n||Lt.defaultNumberingSystem,d=i||Lt.defaultOutputCalendar,h=By(s)||Lt.defaultWeekSettings;return new ot(o,c,d,h,a)}static resetCache(){fd=null,Ry={},zy={},Iy={},$m={}}static fromObject({locale:t,numberingSystem:n,outputCalendar:i,weekSettings:s}={}){return ot.create(t,n,i,s)}constructor(t,n,i,s,r){const[a,o,c]=dte(t);this.locale=a,this.numberingSystem=n||o||null,this.outputCalendar=i||c||null,this.weekSettings=s,this.intl=fte(this.locale,this.numberingSystem,this.outputCalendar),this.weekdaysCache={format:{},standalone:{}},this.monthsCache={format:{},standalone:{}},this.meridiemCache=null,this.eraCache={},this.specifiedLocale=r,this.fastNumbersCached=null}get fastNumbers(){return this.fastNumbersCached==null&&(this.fastNumbersCached=gte(this)),this.fastNumbersCached}listingMode(){const t=this.isEnglish(),n=(this.numberingSystem===null||this.numberingSystem==="latn")&&(this.outputCalendar===null||this.outputCalendar==="gregory");return t&&n?"en":"intl"}clone(t){return!t||Object.getOwnPropertyNames(t).length===0?this:ot.create(t.locale||this.specifiedLocale,t.numberingSystem||this.numberingSystem,t.outputCalendar||this.outputCalendar,By(t.weekSettings)||this.weekSettings,t.defaultToEN||!1)}redefaultToEN(t={}){return this.clone({...t,defaultToEN:!0})}redefaultToSystem(t={}){return this.clone({...t,defaultToEN:!1})}months(t,n=!1){return fm(this,t,r7,()=>{const i=n?{month:t,day:"numeric"}:{month:t},s=n?"format":"standalone";return this.monthsCache[s][t]||(this.monthsCache[s][t]=hte(r=>this.extract(r,i,"month"))),this.monthsCache[s][t]})}weekdays(t,n=!1){return fm(this,t,l7,()=>{const i=n?{weekday:t,year:"numeric",month:"long",day:"numeric"}:{weekday:t},s=n?"format":"standalone";return this.weekdaysCache[s][t]||(this.weekdaysCache[s][t]=mte(r=>this.extract(r,i,"weekday"))),this.weekdaysCache[s][t]})}meridiems(){return fm(this,void 0,()=>c7,()=>{if(!this.meridiemCache){const t={hour:"numeric",hourCycle:"h12"};this.meridiemCache=[De.utc(2016,11,13,9),De.utc(2016,11,13,19)].map(n=>this.extract(n,t,"dayperiod"))}return this.meridiemCache})}eras(t){return fm(this,t,u7,()=>{const n={era:t};return this.eraCache[t]||(this.eraCache[t]=[De.utc(-40,1,1),De.utc(2017,1,1)].map(i=>this.extract(i,n,"era"))),this.eraCache[t]})}extract(t,n,i){const s=this.dtFormatter(t,n),r=s.formatToParts(),a=r.find(o=>o.type.toLowerCase()===i);return a?a.value:null}numberFormatter(t={}){return new pte(this.intl,t.forceSimple||this.fastNumbers,t)}dtFormatter(t,n={}){return new vte(t,this.intl,n)}relFormatter(t={}){return new xte(this.intl,this.isEnglish(),t)}listFormatter(t={}){return ate(this.intl,t)}isEnglish(){return this.locale==="en"||this.locale.toLowerCase()==="en-us"||WO(this.intl).locale.startsWith("en-us")}getWeekSettings(){return this.weekSettings?this.weekSettings:t7()?ute(this.locale):yte}getStartOfWeek(){return this.getWeekSettings().firstDay}getMinDaysInFirstWeek(){return this.getWeekSettings().minimalDays}getWeekendDays(){return this.getWeekSettings().weekend}equals(t){return this.locale===t.locale&&this.numberingSystem===t.numberingSystem&&this.outputCalendar===t.outputCalendar}toString(){return`Locale(${this.locale}, ${this.numberingSystem}, ${this.outputCalendar})`}}let Uv=null;class An extends hu{static get utcInstance(){return Uv===null&&(Uv=new An(0)),Uv}static instance(t){return t===0?An.utcInstance:new An(t)}static parseSpecifier(t){if(t){const n=t.match(/^utc(?:([+-]\d{1,2})(?::(\d{2}))?)?$/i);if(n)return new An(R0(n[1],n[2]))}return null}constructor(t){super(),this.fixed=t}get type(){return"fixed"}get name(){return this.fixed===0?"UTC":`UTC${Ud(this.fixed,"narrow")}`}get ianaName(){return this.fixed===0?"Etc/UTC":`Etc/GMT${Ud(-this.fixed,"narrow")}`}offsetName(){return this.name}formatOffset(t,n){return Ud(this.fixed,n)}get isUniversal(){return!0}offset(){return this.fixed}equals(t){return t.type==="fixed"&&t.fixed===this.fixed}get isValid(){return!0}}class GO extends hu{constructor(t){super(),this.zoneName=t}get type(){return"invalid"}get name(){return this.zoneName}get isUniversal(){return!1}offsetName(){return null}formatOffset(){return""}offset(){return NaN}equals(){return!1}get isValid(){return!1}}function la(e,t){if(Pe(e)||e===null)return t;if(e instanceof hu)return e;if(Mte(e)){const n=e.toLowerCase();return n==="default"?t:n==="local"||n==="system"?Qf.instance:n==="utc"||n==="gmt"?An.utcInstance:An.parseSpecifier(n)||Zs.create(e)}else return Aa(e)?An.instance(e):typeof e=="object"&&"offset"in e&&typeof e.offset=="function"?e:new GO(e)}const V2={arab:"[٠-٩]",arabext:"[۰-۹]",bali:"[᭐-᭙]",beng:"[০-৯]",deva:"[०-९]",fullwide:"[０-９]",gujr:"[૦-૯]",hanidec:"[〇|一|二|三|四|五|六|七|八|九]",khmr:"[០-៩]",knda:"[೦-೯]",laoo:"[໐-໙]",limb:"[᥆-᥏]",mlym:"[൦-൯]",mong:"[᠐-᠙]",mymr:"[၀-၉]",orya:"[୦-୯]",tamldec:"[௦-௯]",telu:"[౦-౯]",thai:"[๐-๙]",tibt:"[༠-༩]",latn:"\\d"},s5={arab:[1632,1641],arabext:[1776,1785],bali:[6992,7001],beng:[2534,2543],deva:[2406,2415],fullwide:[65296,65303],gujr:[2790,2799],khmr:[6112,6121],knda:[3302,3311],laoo:[3792,3801],limb:[6470,6479],mlym:[3430,3439],mong:[6160,6169],mymr:[4160,4169],orya:[2918,2927],tamldec:[3046,3055],telu:[3174,3183],thai:[3664,3673],tibt:[3872,3881]},_te=V2.hanidec.replace(/[\[|\]]/g,"").split("");function bte(e){let t=parseInt(e,10);if(isNaN(t)){t="";for(let n=0;n<e.length;n++){const i=e.charCodeAt(n);if(e[n].search(V2.hanidec)!==-1)t+=_te.indexOf(e[n]);else for(const s in s5){const[r,a]=s5[s];i>=r&&i<=a&&(t+=i-r)}}return parseInt(t,10)}else return t}let Hl={};function wte(){Hl={}}function Gi({numberingSystem:e},t=""){const n=e||"latn";return Hl[n]||(Hl[n]={}),Hl[n][t]||(Hl[n][t]=new RegExp(`${V2[n]}${t}`)),Hl[n][t]}let r5=()=>Date.now(),a5="system",o5=null,l5=null,c5=null,u5=60,d5,f5=null,Lt=class{static get now(){return r5}static set now(t){r5=t}static set defaultZone(t){a5=t}static get defaultZone(){return la(a5,Qf.instance)}static get defaultLocale(){return o5}static set defaultLocale(t){o5=t}static get defaultNumberingSystem(){return l5}static set defaultNumberingSystem(t){l5=t}static get defaultOutputCalendar(){return c5}static set defaultOutputCalendar(t){c5=t}static get defaultWeekSettings(){return f5}static set defaultWeekSettings(t){f5=By(t)}static get twoDigitCutoffYear(){return u5}static set twoDigitCutoffYear(t){u5=t%100}static get throwOnInvalid(){return d5}static set throwOnInvalid(t){d5=t}static resetCaches(){ot.resetCache(),Zs.resetCache(),De.resetCache(),wte()}};class es{constructor(t,n){this.reason=t,this.explanation=n}toMessage(){return this.explanation?`${this.reason}: ${this.explanation}`:this.reason}}const YO=[0,31,59,90,120,151,181,212,243,273,304,334],qO=[0,31,60,91,121,152,182,213,244,274,305,335];function Pi(e,t){return new es("unit out of range",`you specified ${t} (of type ${typeof t}) as a ${e}, which is invalid`)}function H2(e,t,n){const i=new Date(Date.UTC(e,t-1,n));e<100&&e>=0&&i.setUTCFullYear(i.getUTCFullYear()-1900);const s=i.getUTCDay();return s===0?7:s}function XO(e,t,n){return n+(Jf(e)?qO:YO)[t-1]}function KO(e,t){const n=Jf(e)?qO:YO,i=n.findIndex(r=>r<t),s=t-n[i];return{month:i+1,day:s}}function F2(e,t){return(e-t+7)%7+1}function op(e,t=4,n=1){const{year:i,month:s,day:r}=e,a=XO(i,s,r),o=F2(H2(i,s,r),n);let c=Math.floor((a-o+14-t)/7),d;return c<1?(d=i-1,c=wf(d,t,n)):c>wf(i,t,n)?(d=i+1,c=1):d=i,{weekYear:d,weekNumber:c,weekday:o,...L0(e)}}function h5(e,t=4,n=1){const{weekYear:i,weekNumber:s,weekday:r}=e,a=F2(H2(i,1,t),n),o=Mc(i);let c=s*7+r-a-7+t,d;c<1?(d=i-1,c+=Mc(d)):c>o?(d=i+1,c-=Mc(i)):d=i;const{month:h,day:m}=KO(d,c);return{year:d,month:h,day:m,...L0(e)}}function Zv(e){const{year:t,month:n,day:i}=e,s=XO(t,n,i);return{year:t,ordinal:s,...L0(e)}}function m5(e){const{year:t,ordinal:n}=e,{month:i,day:s}=KO(t,n);return{year:t,month:i,day:s,...L0(e)}}function g5(e,t){if(!Pe(e.localWeekday)||!Pe(e.localWeekNumber)||!Pe(e.localWeekYear)){if(!Pe(e.weekday)||!Pe(e.weekNumber)||!Pe(e.weekYear))throw new rc("Cannot mix locale-based week fields with ISO-based week fields");return Pe(e.localWeekday)||(e.weekday=e.localWeekday),Pe(e.localWeekNumber)||(e.weekNumber=e.localWeekNumber),Pe(e.localWeekYear)||(e.weekYear=e.localWeekYear),delete e.localWeekday,delete e.localWeekNumber,delete e.localWeekYear,{minDaysInFirstWeek:t.getMinDaysInFirstWeek(),startOfWeek:t.getStartOfWeek()}}else return{minDaysInFirstWeek:4,startOfWeek:1}}function Ste(e,t=4,n=1){const i=D0(e.weekYear),s=Ri(e.weekNumber,1,wf(e.weekYear,t,n)),r=Ri(e.weekday,1,7);return i?s?r?!1:Pi("weekday",e.weekday):Pi("week",e.weekNumber):Pi("weekYear",e.weekYear)}function Cte(e){const t=D0(e.year),n=Ri(e.ordinal,1,Mc(e.year));return t?n?!1:Pi("ordinal",e.ordinal):Pi("year",e.year)}function QO(e){const t=D0(e.year),n=Ri(e.month,1,12),i=Ri(e.day,1,lp(e.year,e.month));return t?n?i?!1:Pi("day",e.day):Pi("month",e.month):Pi("year",e.year)}function JO(e){const{hour:t,minute:n,second:i,millisecond:s}=e,r=Ri(t,0,23)||t===24&&n===0&&i===0&&s===0,a=Ri(n,0,59),o=Ri(i,0,59),c=Ri(s,0,999);return r?a?o?c?!1:Pi("millisecond",s):Pi("second",i):Pi("minute",n):Pi("hour",t)}function Pe(e){return typeof e>"u"}function Aa(e){return typeof e=="number"}function D0(e){return typeof e=="number"&&e%1===0}function Mte(e){return typeof e=="string"}function Tte(e){return Object.prototype.toString.call(e)==="[object Date]"}function e7(){try{return typeof Intl<"u"&&!!Intl.RelativeTimeFormat}catch{return!1}}function t7(){try{return typeof Intl<"u"&&!!Intl.Locale&&("weekInfo"in Intl.Locale.prototype||"getWeekInfo"in Intl.Locale.prototype)}catch{return!1}}function jte(e){return Array.isArray(e)?e:[e]}function p5(e,t,n){if(e.length!==0)return e.reduce((i,s)=>{const r=[t(s),s];return i&&n(i[0],r[0])===i[0]?i:r},null)[1]}function Nte(e,t){return t.reduce((n,i)=>(n[i]=e[i],n),{})}function qc(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function By(e){if(e==null)return null;if(typeof e!="object")throw new Cn("Week settings must be an object");if(!Ri(e.firstDay,1,7)||!Ri(e.minimalDays,1,7)||!Array.isArray(e.weekend)||e.weekend.some(t=>!Ri(t,1,7)))throw new Cn("Invalid week settings");return{firstDay:e.firstDay,minimalDays:e.minimalDays,weekend:Array.from(e.weekend)}}function Ri(e,t,n){return D0(e)&&e>=t&&e<=n}function kte(e,t){return e-t*Math.floor(e/t)}function qt(e,t=2){const n=e<0;let i;return n?i="-"+(""+-e).padStart(t,"0"):i=(""+e).padStart(t,"0"),i}function na(e){if(!(Pe(e)||e===null||e===""))return parseInt(e,10)}function oo(e){if(!(Pe(e)||e===null||e===""))return parseFloat(e)}function U2(e){if(!(Pe(e)||e===null||e==="")){const t=parseFloat("0."+e)*1e3;return Math.floor(t)}}function Z2(e,t,n=!1){const i=10**t;return(n?Math.trunc:Math.round)(e*i)/i}function Jf(e){return e%4===0&&(e%100!==0||e%400===0)}function Mc(e){return Jf(e)?366:365}function lp(e,t){const n=kte(t-1,12)+1,i=e+(t-n)/12;return n===2?Jf(i)?29:28:[31,null,31,30,31,30,31,31,30,31,30,31][n-1]}function P0(e){let t=Date.UTC(e.year,e.month-1,e.day,e.hour,e.minute,e.second,e.millisecond);return e.year<100&&e.year>=0&&(t=new Date(t),t.setUTCFullYear(e.year,e.month-1,e.day)),+t}function v5(e,t,n){return-F2(H2(e,1,t),n)+t-1}function wf(e,t=4,n=1){const i=v5(e,t,n),s=v5(e+1,t,n);return(Mc(e)-i+s)/7}function Vy(e){return e>99?e:e>Lt.twoDigitCutoffYear?1900+e:2e3+e}function n7(e,t,n,i=null){const s=new Date(e),r={hourCycle:"h23",year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit"};i&&(r.timeZone=i);const a={timeZoneName:t,...r},o=new Intl.DateTimeFormat(n,a).formatToParts(s).find(c=>c.type.toLowerCase()==="timezonename");return o?o.value:null}function R0(e,t){let n=parseInt(e,10);Number.isNaN(n)&&(n=0);const i=parseInt(t,10)||0,s=n<0||Object.is(n,-0)?-i:i;return n*60+s}function i7(e){const t=Number(e);if(typeof e=="boolean"||e===""||Number.isNaN(t))throw new Cn(`Invalid unit value ${e}`);return t}function cp(e,t){const n={};for(const i in e)if(qc(e,i)){const s=e[i];if(s==null)continue;n[t(i)]=i7(s)}return n}function Ud(e,t){const n=Math.trunc(Math.abs(e/60)),i=Math.trunc(Math.abs(e%60)),s=e>=0?"+":"-";switch(t){case"short":return`${s}${qt(n,2)}:${qt(i,2)}`;case"narrow":return`${s}${n}${i>0?`:${i}`:""}`;case"techie":return`${s}${qt(n,2)}${qt(i,2)}`;default:throw new RangeError(`Value format ${t} is out of range for property format`)}}function L0(e){return Nte(e,["hour","minute","second","millisecond"])}const Ete=["January","February","March","April","May","June","July","August","September","October","November","December"],s7=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],Ate=["J","F","M","A","M","J","J","A","S","O","N","D"];function r7(e){switch(e){case"narrow":return[...Ate];case"short":return[...s7];case"long":return[...Ete];case"numeric":return["1","2","3","4","5","6","7","8","9","10","11","12"];case"2-digit":return["01","02","03","04","05","06","07","08","09","10","11","12"];default:return null}}const a7=["Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],o7=["Mon","Tue","Wed","Thu","Fri","Sat","Sun"],Ote=["M","T","W","T","F","S","S"];function l7(e){switch(e){case"narrow":return[...Ote];case"short":return[...o7];case"long":return[...a7];case"numeric":return["1","2","3","4","5","6","7"];default:return null}}const c7=["AM","PM"],Dte=["Before Christ","Anno Domini"],Pte=["BC","AD"],Rte=["B","A"];function u7(e){switch(e){case"narrow":return[...Rte];case"short":return[...Pte];case"long":return[...Dte];default:return null}}function Lte(e){return c7[e.hour<12?0:1]}function zte(e,t){return l7(t)[e.weekday-1]}function Ite(e,t){return r7(t)[e.month-1]}function Bte(e,t){return u7(t)[e.year<0?0:1]}function Vte(e,t,n="always",i=!1){const s={years:["year","yr."],quarters:["quarter","qtr."],months:["month","mo."],weeks:["week","wk."],days:["day","day","days"],hours:["hour","hr."],minutes:["minute","min."],seconds:["second","sec."]},r=["hours","minutes","seconds"].indexOf(e)===-1;if(n==="auto"&&r){const m=e==="days";switch(t){case 1:return m?"tomorrow":`next ${s[e][0]}`;case-1:return m?"yesterday":`last ${s[e][0]}`;case 0:return m?"today":`this ${s[e][0]}`}}const a=Object.is(t,-0)||t<0,o=Math.abs(t),c=o===1,d=s[e],h=i?c?d[1]:d[2]||d[1]:c?s[e][0]:e;return a?`${o} ${h} ago`:`in ${o} ${h}`}function x5(e,t){let n="";for(const i of e)i.literal?n+=i.val:n+=t(i.val);return n}const Hte={D:ap,DD:jO,DDD:NO,DDDD:kO,t:EO,tt:AO,ttt:OO,tttt:DO,T:PO,TT:RO,TTT:LO,TTTT:zO,f:IO,ff:VO,fff:FO,ffff:ZO,F:BO,FF:HO,FFF:UO,FFFF:$O};class jn{static create(t,n={}){return new jn(t,n)}static parseFormat(t){let n=null,i="",s=!1;const r=[];for(let a=0;a<t.length;a++){const o=t.charAt(a);o==="'"?(i.length>0&&r.push({literal:s||/^\s+$/.test(i),val:i}),n=null,i="",s=!s):s||o===n?i+=o:(i.length>0&&r.push({literal:/^\s+$/.test(i),val:i}),i=o,n=o)}return i.length>0&&r.push({literal:s||/^\s+$/.test(i),val:i}),r}static macroTokenToFormatOpts(t){return Hte[t]}constructor(t,n){this.opts=n,this.loc=t,this.systemLoc=null}formatWithSystemDefault(t,n){return this.systemLoc===null&&(this.systemLoc=this.loc.redefaultToSystem()),this.systemLoc.dtFormatter(t,{...this.opts,...n}).format()}dtFormatter(t,n={}){return this.loc.dtFormatter(t,{...this.opts,...n})}formatDateTime(t,n){return this.dtFormatter(t,n).format()}formatDateTimeParts(t,n){return this.dtFormatter(t,n).formatToParts()}formatInterval(t,n){return this.dtFormatter(t.start,n).dtf.formatRange(t.start.toJSDate(),t.end.toJSDate())}resolvedOptions(t,n){return this.dtFormatter(t,n).resolvedOptions()}num(t,n=0){if(this.opts.forceSimple)return qt(t,n);const i={...this.opts};return n>0&&(i.padTo=n),this.loc.numberFormatter(i).format(t)}formatDateTimeFromString(t,n){const i=this.loc.listingMode()==="en",s=this.loc.outputCalendar&&this.loc.outputCalendar!=="gregory",r=(v,b)=>this.loc.extract(t,v,b),a=v=>t.isOffsetFixed&&t.offset===0&&v.allowZ?"Z":t.isValid?t.zone.formatOffset(t.ts,v.format):"",o=()=>i?Lte(t):r({hour:"numeric",hourCycle:"h12"},"dayperiod"),c=(v,b)=>i?Ite(t,v):r(b?{month:v}:{month:v,day:"numeric"},"month"),d=(v,b)=>i?zte(t,v):r(b?{weekday:v}:{weekday:v,month:"long",day:"numeric"},"weekday"),h=v=>{const b=jn.macroTokenToFormatOpts(v);return b?this.formatWithSystemDefault(t,b):v},m=v=>i?Bte(t,v):r({era:v},"era"),g=v=>{switch(v){case"S":return this.num(t.millisecond);case"u":case"SSS":return this.num(t.millisecond,3);case"s":return this.num(t.second);case"ss":return this.num(t.second,2);case"uu":return this.num(Math.floor(t.millisecond/10),2);case"uuu":return this.num(Math.floor(t.millisecond/100));case"m":return this.num(t.minute);case"mm":return this.num(t.minute,2);case"h":return this.num(t.hour%12===0?12:t.hour%12);case"hh":return this.num(t.hour%12===0?12:t.hour%12,2);case"H":return this.num(t.hour);case"HH":return this.num(t.hour,2);case"Z":return a({format:"narrow",allowZ:this.opts.allowZ});case"ZZ":return a({format:"short",allowZ:this.opts.allowZ});case"ZZZ":return a({format:"techie",allowZ:this.opts.allowZ});case"ZZZZ":return t.zone.offsetName(t.ts,{format:"short",locale:this.loc.locale});case"ZZZZZ":return t.zone.offsetName(t.ts,{format:"long",locale:this.loc.locale});case"z":return t.zoneName;case"a":return o();case"d":return s?r({day:"numeric"},"day"):this.num(t.day);case"dd":return s?r({day:"2-digit"},"day"):this.num(t.day,2);case"c":return this.num(t.weekday);case"ccc":return d("short",!0);case"cccc":return d("long",!0);case"ccccc":return d("narrow",!0);case"E":return this.num(t.weekday);case"EEE":return d("short",!1);case"EEEE":return d("long",!1);case"EEEEE":return d("narrow",!1);case"L":return s?r({month:"numeric",day:"numeric"},"month"):this.num(t.month);case"LL":return s?r({month:"2-digit",day:"numeric"},"month"):this.num(t.month,2);case"LLL":return c("short",!0);case"LLLL":return c("long",!0);case"LLLLL":return c("narrow",!0);case"M":return s?r({month:"numeric"},"month"):this.num(t.month);case"MM":return s?r({month:"2-digit"},"month"):this.num(t.month,2);case"MMM":return c("short",!1);case"MMMM":return c("long",!1);case"MMMMM":return c("narrow",!1);case"y":return s?r({year:"numeric"},"year"):this.num(t.year);case"yy":return s?r({year:"2-digit"},"year"):this.num(t.year.toString().slice(-2),2);case"yyyy":return s?r({year:"numeric"},"year"):this.num(t.year,4);case"yyyyyy":return s?r({year:"numeric"},"year"):this.num(t.year,6);case"G":return m("short");case"GG":return m("long");case"GGGGG":return m("narrow");case"kk":return this.num(t.weekYear.toString().slice(-2),2);case"kkkk":return this.num(t.weekYear,4);case"W":return this.num(t.weekNumber);case"WW":return this.num(t.weekNumber,2);case"n":return this.num(t.localWeekNumber);case"nn":return this.num(t.localWeekNumber,2);case"ii":return this.num(t.localWeekYear.toString().slice(-2),2);case"iiii":return this.num(t.localWeekYear,4);case"o":return this.num(t.ordinal);case"ooo":return this.num(t.ordinal,3);case"q":return this.num(t.quarter);case"qq":return this.num(t.quarter,2);case"X":return this.num(Math.floor(t.ts/1e3));case"x":return this.num(t.ts);default:return h(v)}};return x5(jn.parseFormat(n),g)}formatDurationFromString(t,n){const i=c=>{switch(c[0]){case"S":return"millisecond";case"s":return"second";case"m":return"minute";case"h":return"hour";case"d":return"day";case"w":return"week";case"M":return"month";case"y":return"year";default:return null}},s=c=>d=>{const h=i(d);return h?this.num(c.get(h),d.length):d},r=jn.parseFormat(n),a=r.reduce((c,{literal:d,val:h})=>d?c:c.concat(h),[]),o=t.shiftTo(...a.map(i).filter(c=>c));return x5(r,s(o))}}const d7=/[A-Za-z_+-]{1,256}(?::?\/[A-Za-z0-9_+-]{1,256}(?:\/[A-Za-z0-9_+-]{1,256})?)?/;function mu(...e){const t=e.reduce((n,i)=>n+i.source,"");return RegExp(`^${t}$`)}function gu(...e){return t=>e.reduce(([n,i,s],r)=>{const[a,o,c]=r(t,s);return[{...n,...a},o||i,c]},[{},null,1]).slice(0,2)}function pu(e,...t){if(e==null)return[null,null];for(const[n,i]of t){const s=n.exec(e);if(s)return i(s)}return[null,null]}function f7(...e){return(t,n)=>{const i={};let s;for(s=0;s<e.length;s++)i[e[s]]=na(t[n+s]);return[i,null,n+s]}}const h7=/(?:(Z)|([+-]\d\d)(?::?(\d\d))?)/,Fte=`(?:${h7.source}?(?:\\[(${d7.source})\\])?)?`,$2=/(\d\d)(?::?(\d\d)(?::?(\d\d)(?:[.,](\d{1,30}))?)?)?/,m7=RegExp(`${$2.source}${Fte}`),W2=RegExp(`(?:T${m7.source})?`),Ute=/([+-]\d{6}|\d{4})(?:-?(\d\d)(?:-?(\d\d))?)?/,Zte=/(\d{4})-?W(\d\d)(?:-?(\d))?/,$te=/(\d{4})-?(\d{3})/,Wte=f7("weekYear","weekNumber","weekDay"),Gte=f7("year","ordinal"),Yte=/(\d{4})-(\d\d)-(\d\d)/,g7=RegExp(`${$2.source} ?(?:${h7.source}|(${d7.source}))?`),qte=RegExp(`(?: ${g7.source})?`);function Tc(e,t,n){const i=e[t];return Pe(i)?n:na(i)}function Xte(e,t){return[{year:Tc(e,t),month:Tc(e,t+1,1),day:Tc(e,t+2,1)},null,t+3]}function vu(e,t){return[{hours:Tc(e,t,0),minutes:Tc(e,t+1,0),seconds:Tc(e,t+2,0),milliseconds:U2(e[t+3])},null,t+4]}function eh(e,t){const n=!e[t]&&!e[t+1],i=R0(e[t+1],e[t+2]),s=n?null:An.instance(i);return[{},s,t+3]}function th(e,t){const n=e[t]?Zs.create(e[t]):null;return[{},n,t+1]}const Kte=RegExp(`^T?${$2.source}$`),Qte=/^-?P(?:(?:(-?\d{1,20}(?:\.\d{1,20})?)Y)?(?:(-?\d{1,20}(?:\.\d{1,20})?)M)?(?:(-?\d{1,20}(?:\.\d{1,20})?)W)?(?:(-?\d{1,20}(?:\.\d{1,20})?)D)?(?:T(?:(-?\d{1,20}(?:\.\d{1,20})?)H)?(?:(-?\d{1,20}(?:\.\d{1,20})?)M)?(?:(-?\d{1,20})(?:[.,](-?\d{1,20}))?S)?)?)$/;function Jte(e){const[t,n,i,s,r,a,o,c,d]=e,h=t[0]==="-",m=c&&c[0]==="-",g=(v,b=!1)=>v!==void 0&&(b||v&&h)?-v:v;return[{years:g(oo(n)),months:g(oo(i)),weeks:g(oo(s)),days:g(oo(r)),hours:g(oo(a)),minutes:g(oo(o)),seconds:g(oo(c),c==="-0"),milliseconds:g(U2(d),m)}]}const ene={GMT:0,EDT:-4*60,EST:-5*60,CDT:-5*60,CST:-6*60,MDT:-6*60,MST:-7*60,PDT:-7*60,PST:-8*60};function G2(e,t,n,i,s,r,a){const o={year:t.length===2?Vy(na(t)):na(t),month:s7.indexOf(n)+1,day:na(i),hour:na(s),minute:na(r)};return a&&(o.second=na(a)),e&&(o.weekday=e.length>3?a7.indexOf(e)+1:o7.indexOf(e)+1),o}const tne=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|(?:([+-]\d\d)(\d\d)))$/;function nne(e){const[,t,n,i,s,r,a,o,c,d,h,m]=e,g=G2(t,s,i,n,r,a,o);let v;return c?v=ene[c]:d?v=0:v=R0(h,m),[g,new An(v)]}function ine(e){return e.replace(/\([^()]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").trim()}const sne=/^(Mon|Tue|Wed|Thu|Fri|Sat|Sun), (\d\d) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) (\d{4}) (\d\d):(\d\d):(\d\d) GMT$/,rne=/^(Monday|Tuesday|Wednesday|Thursday|Friday|Saturday|Sunday), (\d\d)-(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)-(\d\d) (\d\d):(\d\d):(\d\d) GMT$/,ane=/^(Mon|Tue|Wed|Thu|Fri|Sat|Sun) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) ( \d|\d\d) (\d\d):(\d\d):(\d\d) (\d{4})$/;function y5(e){const[,t,n,i,s,r,a,o]=e;return[G2(t,s,i,n,r,a,o),An.utcInstance]}function one(e){const[,t,n,i,s,r,a,o]=e;return[G2(t,o,n,i,s,r,a),An.utcInstance]}const lne=mu(Ute,W2),cne=mu(Zte,W2),une=mu($te,W2),dne=mu(m7),p7=gu(Xte,vu,eh,th),fne=gu(Wte,vu,eh,th),hne=gu(Gte,vu,eh,th),mne=gu(vu,eh,th);function gne(e){return pu(e,[lne,p7],[cne,fne],[une,hne],[dne,mne])}function pne(e){return pu(ine(e),[tne,nne])}function vne(e){return pu(e,[sne,y5],[rne,y5],[ane,one])}function xne(e){return pu(e,[Qte,Jte])}const yne=gu(vu);function _ne(e){return pu(e,[Kte,yne])}const bne=mu(Yte,qte),wne=mu(g7),Sne=gu(vu,eh,th);function Cne(e){return pu(e,[bne,p7],[wne,Sne])}const _5="Invalid Duration",v7={weeks:{days:7,hours:7*24,minutes:7*24*60,seconds:7*24*60*60,milliseconds:7*24*60*60*1e3},days:{hours:24,minutes:24*60,seconds:24*60*60,milliseconds:24*60*60*1e3},hours:{minutes:60,seconds:60*60,milliseconds:60*60*1e3},minutes:{seconds:60,milliseconds:60*1e3},seconds:{milliseconds:1e3}},Mne={years:{quarters:4,months:12,weeks:52,days:365,hours:365*24,minutes:365*24*60,seconds:365*24*60*60,milliseconds:365*24*60*60*1e3},quarters:{months:3,weeks:13,days:91,hours:91*24,minutes:91*24*60,seconds:91*24*60*60,milliseconds:91*24*60*60*1e3},months:{weeks:4,days:30,hours:30*24,minutes:30*24*60,seconds:30*24*60*60,milliseconds:30*24*60*60*1e3},...v7},yi=146097/400,Dl=146097/4800,Tne={years:{quarters:4,months:12,weeks:yi/7,days:yi,hours:yi*24,minutes:yi*24*60,seconds:yi*24*60*60,milliseconds:yi*24*60*60*1e3},quarters:{months:3,weeks:yi/28,days:yi/4,hours:yi*24/4,minutes:yi*24*60/4,seconds:yi*24*60*60/4,milliseconds:yi*24*60*60*1e3/4},months:{weeks:Dl/7,days:Dl,hours:Dl*24,minutes:Dl*24*60,seconds:Dl*24*60*60,milliseconds:Dl*24*60*60*1e3},...v7},Co=["years","quarters","months","weeks","days","hours","minutes","seconds","milliseconds"],jne=Co.slice(0).reverse();function Wr(e,t,n=!1){const i={values:n?t.values:{...e.values,...t.values||{}},loc:e.loc.clone(t.loc),conversionAccuracy:t.conversionAccuracy||e.conversionAccuracy,matrix:t.matrix||e.matrix};return new Qe(i)}function x7(e,t){var n;let i=(n=t.milliseconds)!=null?n:0;for(const s of jne.slice(1))t[s]&&(i+=t[s]*e[s].milliseconds);return i}function b5(e,t){const n=x7(e,t)<0?-1:1;Co.reduceRight((i,s)=>{if(Pe(t[s]))return i;if(i){const r=t[i]*n,a=e[s][i],o=Math.floor(r/a);t[s]+=o*n,t[i]-=o*a*n}return s},null),Co.reduce((i,s)=>{if(Pe(t[s]))return i;if(i){const r=t[i]%1;t[i]-=r,t[s]+=r*e[i][s]}return s},null)}function Nne(e){const t={};for(const[n,i]of Object.entries(e))i!==0&&(t[n]=i);return t}class Qe{constructor(t){const n=t.conversionAccuracy==="longterm"||!1;let i=n?Tne:Mne;t.matrix&&(i=t.matrix),this.values=t.values,this.loc=t.loc||ot.create(),this.conversionAccuracy=n?"longterm":"casual",this.invalid=t.invalid||null,this.matrix=i,this.isLuxonDuration=!0}static fromMillis(t,n){return Qe.fromObject({milliseconds:t},n)}static fromObject(t,n={}){if(t==null||typeof t!="object")throw new Cn(`Duration.fromObject: argument expected to be an object, got ${t===null?"null":typeof t}`);return new Qe({values:cp(t,Qe.normalizeUnit),loc:ot.fromObject(n),conversionAccuracy:n.conversionAccuracy,matrix:n.matrix})}static fromDurationLike(t){if(Aa(t))return Qe.fromMillis(t);if(Qe.isDuration(t))return t;if(typeof t=="object")return Qe.fromObject(t);throw new Cn(`Unknown duration argument ${t} of type ${typeof t}`)}static fromISO(t,n){const[i]=xne(t);return i?Qe.fromObject(i,n):Qe.invalid("unparsable",`the input "${t}" can't be parsed as ISO 8601`)}static fromISOTime(t,n){const[i]=_ne(t);return i?Qe.fromObject(i,n):Qe.invalid("unparsable",`the input "${t}" can't be parsed as ISO 8601`)}static invalid(t,n=null){if(!t)throw new Cn("need to specify a reason the Duration is invalid");const i=t instanceof es?t:new es(t,n);if(Lt.throwOnInvalid)throw new Jee(i);return new Qe({invalid:i})}static normalizeUnit(t){const n={year:"years",years:"years",quarter:"quarters",quarters:"quarters",month:"months",months:"months",week:"weeks",weeks:"weeks",day:"days",days:"days",hour:"hours",hours:"hours",minute:"minutes",minutes:"minutes",second:"seconds",seconds:"seconds",millisecond:"milliseconds",milliseconds:"milliseconds"}[t&&t.toLowerCase()];if(!n)throw new TO(t);return n}static isDuration(t){return t&&t.isLuxonDuration||!1}get locale(){return this.isValid?this.loc.locale:null}get numberingSystem(){return this.isValid?this.loc.numberingSystem:null}toFormat(t,n={}){const i={...n,floor:n.round!==!1&&n.floor!==!1};return this.isValid?jn.create(this.loc,i).formatDurationFromString(this,t):_5}toHuman(t={}){if(!this.isValid)return _5;const n=Co.map(i=>{const s=this.values[i];return Pe(s)?null:this.loc.numberFormatter({style:"unit",unitDisplay:"long",...t,unit:i.slice(0,-1)}).format(s)}).filter(i=>i);return this.loc.listFormatter({type:"conjunction",style:t.listStyle||"narrow",...t}).format(n)}toObject(){return this.isValid?{...this.values}:{}}toISO(){if(!this.isValid)return null;let t="P";return this.years!==0&&(t+=this.years+"Y"),(this.months!==0||this.quarters!==0)&&(t+=this.months+this.quarters*3+"M"),this.weeks!==0&&(t+=this.weeks+"W"),this.days!==0&&(t+=this.days+"D"),(this.hours!==0||this.minutes!==0||this.seconds!==0||this.milliseconds!==0)&&(t+="T"),this.hours!==0&&(t+=this.hours+"H"),this.minutes!==0&&(t+=this.minutes+"M"),(this.seconds!==0||this.milliseconds!==0)&&(t+=Z2(this.seconds+this.milliseconds/1e3,3)+"S"),t==="P"&&(t+="T0S"),t}toISOTime(t={}){if(!this.isValid)return null;const n=this.toMillis();return n<0||n>=864e5?null:(t={suppressMilliseconds:!1,suppressSeconds:!1,includePrefix:!1,format:"extended",...t,includeOffset:!1},De.fromMillis(n,{zone:"UTC"}).toISOTime(t))}toJSON(){return this.toISO()}toString(){return this.toISO()}[Symbol.for("nodejs.util.inspect.custom")](){return this.isValid?`Duration { values: ${JSON.stringify(this.values)} }`:`Duration { Invalid, reason: ${this.invalidReason} }`}toMillis(){return this.isValid?x7(this.matrix,this.values):NaN}valueOf(){return this.toMillis()}plus(t){if(!this.isValid)return this;const n=Qe.fromDurationLike(t),i={};for(const s of Co)(qc(n.values,s)||qc(this.values,s))&&(i[s]=n.get(s)+this.get(s));return Wr(this,{values:i},!0)}minus(t){if(!this.isValid)return this;const n=Qe.fromDurationLike(t);return this.plus(n.negate())}mapUnits(t){if(!this.isValid)return this;const n={};for(const i of Object.keys(this.values))n[i]=i7(t(this.values[i],i));return Wr(this,{values:n},!0)}get(t){return this[Qe.normalizeUnit(t)]}set(t){if(!this.isValid)return this;const n={...this.values,...cp(t,Qe.normalizeUnit)};return Wr(this,{values:n})}reconfigure({locale:t,numberingSystem:n,conversionAccuracy:i,matrix:s}={}){const a={loc:this.loc.clone({locale:t,numberingSystem:n}),matrix:s,conversionAccuracy:i};return Wr(this,a)}as(t){return this.isValid?this.shiftTo(t).get(t):NaN}normalize(){if(!this.isValid)return this;const t=this.toObject();return b5(this.matrix,t),Wr(this,{values:t},!0)}rescale(){if(!this.isValid)return this;const t=Nne(this.normalize().shiftToAll().toObject());return Wr(this,{values:t},!0)}shiftTo(...t){if(!this.isValid)return this;if(t.length===0)return this;t=t.map(a=>Qe.normalizeUnit(a));const n={},i={},s=this.toObject();let r;for(const a of Co)if(t.indexOf(a)>=0){r=a;let o=0;for(const d in i)o+=this.matrix[d][a]*i[d],i[d]=0;Aa(s[a])&&(o+=s[a]);const c=Math.trunc(o);n[a]=c,i[a]=(o*1e3-c*1e3)/1e3}else Aa(s[a])&&(i[a]=s[a]);for(const a in i)i[a]!==0&&(n[r]+=a===r?i[a]:i[a]/this.matrix[r][a]);return b5(this.matrix,n),Wr(this,{values:n},!0)}shiftToAll(){return this.isValid?this.shiftTo("years","months","weeks","days","hours","minutes","seconds","milliseconds"):this}negate(){if(!this.isValid)return this;const t={};for(const n of Object.keys(this.values))t[n]=this.values[n]===0?0:-this.values[n];return Wr(this,{values:t},!0)}get years(){return this.isValid?this.values.years||0:NaN}get quarters(){return this.isValid?this.values.quarters||0:NaN}get months(){return this.isValid?this.values.months||0:NaN}get weeks(){return this.isValid?this.values.weeks||0:NaN}get days(){return this.isValid?this.values.days||0:NaN}get hours(){return this.isValid?this.values.hours||0:NaN}get minutes(){return this.isValid?this.values.minutes||0:NaN}get seconds(){return this.isValid?this.values.seconds||0:NaN}get milliseconds(){return this.isValid?this.values.milliseconds||0:NaN}get isValid(){return this.invalid===null}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}equals(t){if(!this.isValid||!t.isValid||!this.loc.equals(t.loc))return!1;function n(i,s){return i===void 0||i===0?s===void 0||s===0:i===s}for(const i of Co)if(!n(this.values[i],t.values[i]))return!1;return!0}}const Pl="Invalid Interval";function kne(e,t){return!e||!e.isValid?Pt.invalid("missing or invalid start"):!t||!t.isValid?Pt.invalid("missing or invalid end"):t<e?Pt.invalid("end before start",`The end of an interval must be after its start, but you had start=${e.toISO()} and end=${t.toISO()}`):null}class Pt{constructor(t){this.s=t.start,this.e=t.end,this.invalid=t.invalid||null,this.isLuxonInterval=!0}static invalid(t,n=null){if(!t)throw new Cn("need to specify a reason the Interval is invalid");const i=t instanceof es?t:new es(t,n);if(Lt.throwOnInvalid)throw new Qee(i);return new Pt({invalid:i})}static fromDateTimes(t,n){const i=Ju(t),s=Ju(n),r=kne(i,s);return r??new Pt({start:i,end:s})}static after(t,n){const i=Qe.fromDurationLike(n),s=Ju(t);return Pt.fromDateTimes(s,s.plus(i))}static before(t,n){const i=Qe.fromDurationLike(n),s=Ju(t);return Pt.fromDateTimes(s.minus(i),s)}static fromISO(t,n){const[i,s]=(t||"").split("/",2);if(i&&s){let r,a;try{r=De.fromISO(i,n),a=r.isValid}catch{a=!1}let o,c;try{o=De.fromISO(s,n),c=o.isValid}catch{c=!1}if(a&&c)return Pt.fromDateTimes(r,o);if(a){const d=Qe.fromISO(s,n);if(d.isValid)return Pt.after(r,d)}else if(c){const d=Qe.fromISO(i,n);if(d.isValid)return Pt.before(o,d)}}return Pt.invalid("unparsable",`the input "${t}" can't be parsed as ISO 8601`)}static isInterval(t){return t&&t.isLuxonInterval||!1}get start(){return this.isValid?this.s:null}get end(){return this.isValid?this.e:null}get lastDateTime(){return this.isValid&&this.e?this.e.minus(1):null}get isValid(){return this.invalidReason===null}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}length(t="milliseconds"){return this.isValid?this.toDuration(t).get(t):NaN}count(t="milliseconds",n){if(!this.isValid)return NaN;const i=this.start.startOf(t,n);let s;return n!=null&&n.useLocaleWeeks?s=this.end.reconfigure({locale:i.locale}):s=this.end,s=s.startOf(t,n),Math.floor(s.diff(i,t).get(t))+(s.valueOf()!==this.end.valueOf())}hasSame(t){return this.isValid?this.isEmpty()||this.e.minus(1).hasSame(this.s,t):!1}isEmpty(){return this.s.valueOf()===this.e.valueOf()}isAfter(t){return this.isValid?this.s>t:!1}isBefore(t){return this.isValid?this.e<=t:!1}contains(t){return this.isValid?this.s<=t&&this.e>t:!1}set({start:t,end:n}={}){return this.isValid?Pt.fromDateTimes(t||this.s,n||this.e):this}splitAt(...t){if(!this.isValid)return[];const n=t.map(Ju).filter(a=>this.contains(a)).sort((a,o)=>a.toMillis()-o.toMillis()),i=[];let{s}=this,r=0;for(;s<this.e;){const a=n[r]||this.e,o=+a>+this.e?this.e:a;i.push(Pt.fromDateTimes(s,o)),s=o,r+=1}return i}splitBy(t){const n=Qe.fromDurationLike(t);if(!this.isValid||!n.isValid||n.as("milliseconds")===0)return[];let{s:i}=this,s=1,r;const a=[];for(;i<this.e;){const o=this.start.plus(n.mapUnits(c=>c*s));r=+o>+this.e?this.e:o,a.push(Pt.fromDateTimes(i,r)),i=r,s+=1}return a}divideEqually(t){return this.isValid?this.splitBy(this.length()/t).slice(0,t):[]}overlaps(t){return this.e>t.s&&this.s<t.e}abutsStart(t){return this.isValid?+this.e==+t.s:!1}abutsEnd(t){return this.isValid?+t.e==+this.s:!1}engulfs(t){return this.isValid?this.s<=t.s&&this.e>=t.e:!1}equals(t){return!this.isValid||!t.isValid?!1:this.s.equals(t.s)&&this.e.equals(t.e)}intersection(t){if(!this.isValid)return this;const n=this.s>t.s?this.s:t.s,i=this.e<t.e?this.e:t.e;return n>=i?null:Pt.fromDateTimes(n,i)}union(t){if(!this.isValid)return this;const n=this.s<t.s?this.s:t.s,i=this.e>t.e?this.e:t.e;return Pt.fromDateTimes(n,i)}static merge(t){const[n,i]=t.sort((s,r)=>s.s-r.s).reduce(([s,r],a)=>r?r.overlaps(a)||r.abutsStart(a)?[s,r.union(a)]:[s.concat([r]),a]:[s,a],[[],null]);return i&&n.push(i),n}static xor(t){let n=null,i=0;const s=[],r=t.map(c=>[{time:c.s,type:"s"},{time:c.e,type:"e"}]),a=Array.prototype.concat(...r),o=a.sort((c,d)=>c.time-d.time);for(const c of o)i+=c.type==="s"?1:-1,i===1?n=c.time:(n&&+n!=+c.time&&s.push(Pt.fromDateTimes(n,c.time)),n=null);return Pt.merge(s)}difference(...t){return Pt.xor([this].concat(t)).map(n=>this.intersection(n)).filter(n=>n&&!n.isEmpty())}toString(){return this.isValid?`[${this.s.toISO()} – ${this.e.toISO()})`:Pl}[Symbol.for("nodejs.util.inspect.custom")](){return this.isValid?`Interval { start: ${this.s.toISO()}, end: ${this.e.toISO()} }`:`Interval { Invalid, reason: ${this.invalidReason} }`}toLocaleString(t=ap,n={}){return this.isValid?jn.create(this.s.loc.clone(n),t).formatInterval(this):Pl}toISO(t){return this.isValid?`${this.s.toISO(t)}/${this.e.toISO(t)}`:Pl}toISODate(){return this.isValid?`${this.s.toISODate()}/${this.e.toISODate()}`:Pl}toISOTime(t){return this.isValid?`${this.s.toISOTime(t)}/${this.e.toISOTime(t)}`:Pl}toFormat(t,{separator:n=" – "}={}){return this.isValid?`${this.s.toFormat(t)}${n}${this.e.toFormat(t)}`:Pl}toDuration(t,n){return this.isValid?this.e.diff(this.s,t,n):Qe.invalid(this.invalidReason)}mapEndpoints(t){return Pt.fromDateTimes(t(this.s),t(this.e))}}class hd{static hasDST(t=Lt.defaultZone){const n=De.now().setZone(t).set({month:12});return!t.isUniversal&&n.offset!==n.set({month:6}).offset}static isValidIANAZone(t){return Zs.isValidZone(t)}static normalizeZone(t){return la(t,Lt.defaultZone)}static getStartOfWeek({locale:t=null,locObj:n=null}={}){return(n||ot.create(t)).getStartOfWeek()}static getMinimumDaysInFirstWeek({locale:t=null,locObj:n=null}={}){return(n||ot.create(t)).getMinDaysInFirstWeek()}static getWeekendWeekdays({locale:t=null,locObj:n=null}={}){return(n||ot.create(t)).getWeekendDays().slice()}static months(t="long",{locale:n=null,numberingSystem:i=null,locObj:s=null,outputCalendar:r="gregory"}={}){return(s||ot.create(n,i,r)).months(t)}static monthsFormat(t="long",{locale:n=null,numberingSystem:i=null,locObj:s=null,outputCalendar:r="gregory"}={}){return(s||ot.create(n,i,r)).months(t,!0)}static weekdays(t="long",{locale:n=null,numberingSystem:i=null,locObj:s=null}={}){return(s||ot.create(n,i,null)).weekdays(t)}static weekdaysFormat(t="long",{locale:n=null,numberingSystem:i=null,locObj:s=null}={}){return(s||ot.create(n,i,null)).weekdays(t,!0)}static meridiems({locale:t=null}={}){return ot.create(t).meridiems()}static eras(t="short",{locale:n=null}={}){return ot.create(n,null,"gregory").eras(t)}static features(){return{relative:e7(),localeWeek:t7()}}}function w5(e,t){const n=s=>s.toUTC(0,{keepLocalTime:!0}).startOf("day").valueOf(),i=n(t)-n(e);return Math.floor(Qe.fromMillis(i).as("days"))}function Ene(e,t,n){const i=[["years",(c,d)=>d.year-c.year],["quarters",(c,d)=>d.quarter-c.quarter+(d.year-c.year)*4],["months",(c,d)=>d.month-c.month+(d.year-c.year)*12],["weeks",(c,d)=>{const h=w5(c,d);return(h-h%7)/7}],["days",w5]],s={},r=e;let a,o;for(const[c,d]of i)n.indexOf(c)>=0&&(a=c,s[c]=d(e,t),o=r.plus(s),o>t?(s[c]--,e=r.plus(s),e>t&&(o=e,s[c]--,e=r.plus(s))):e=o);return[e,s,o,a]}function Ane(e,t,n,i){let[s,r,a,o]=Ene(e,t,n);const c=t-s,d=n.filter(m=>["hours","minutes","seconds","milliseconds"].indexOf(m)>=0);d.length===0&&(a<t&&(a=s.plus({[o]:1})),a!==s&&(r[o]=(r[o]||0)+c/(a-s)));const h=Qe.fromObject(r,i);return d.length>0?Qe.fromMillis(c,i).shiftTo(...d).plus(h):h}const One="missing Intl.DateTimeFormat.formatToParts support";function nt(e,t=n=>n){return{regex:e,deser:([n])=>t(bte(n))}}const Dne=" ",y7=`[ ${Dne}]`,_7=new RegExp(y7,"g");function Pne(e){return e.replace(/\./g,"\\.?").replace(_7,y7)}function S5(e){return e.replace(/\./g,"").replace(_7," ").toLowerCase()}function Yi(e,t){return e===null?null:{regex:RegExp(e.map(Pne).join("|")),deser:([n])=>e.findIndex(i=>S5(n)===S5(i))+t}}function C5(e,t){return{regex:e,deser:([,n,i])=>R0(n,i),groups:t}}function hm(e){return{regex:e,deser:([t])=>t}}function Rne(e){return e.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")}function Lne(e,t){const n=Gi(t),i=Gi(t,"{2}"),s=Gi(t,"{3}"),r=Gi(t,"{4}"),a=Gi(t,"{6}"),o=Gi(t,"{1,2}"),c=Gi(t,"{1,3}"),d=Gi(t,"{1,6}"),h=Gi(t,"{1,9}"),m=Gi(t,"{2,4}"),g=Gi(t,"{4,6}"),v=M=>({regex:RegExp(Rne(M.val)),deser:([y])=>y,literal:!0}),w=(M=>{if(e.literal)return v(M);switch(M.val){case"G":return Yi(t.eras("short"),0);case"GG":return Yi(t.eras("long"),0);case"y":return nt(d);case"yy":return nt(m,Vy);case"yyyy":return nt(r);case"yyyyy":return nt(g);case"yyyyyy":return nt(a);case"M":return nt(o);case"MM":return nt(i);case"MMM":return Yi(t.months("short",!0),1);case"MMMM":return Yi(t.months("long",!0),1);case"L":return nt(o);case"LL":return nt(i);case"LLL":return Yi(t.months("short",!1),1);case"LLLL":return Yi(t.months("long",!1),1);case"d":return nt(o);case"dd":return nt(i);case"o":return nt(c);case"ooo":return nt(s);case"HH":return nt(i);case"H":return nt(o);case"hh":return nt(i);case"h":return nt(o);case"mm":return nt(i);case"m":return nt(o);case"q":return nt(o);case"qq":return nt(i);case"s":return nt(o);case"ss":return nt(i);case"S":return nt(c);case"SSS":return nt(s);case"u":return hm(h);case"uu":return hm(o);case"uuu":return nt(n);case"a":return Yi(t.meridiems(),0);case"kkkk":return nt(r);case"kk":return nt(m,Vy);case"W":return nt(o);case"WW":return nt(i);case"E":case"c":return nt(n);case"EEE":return Yi(t.weekdays("short",!1),1);case"EEEE":return Yi(t.weekdays("long",!1),1);case"ccc":return Yi(t.weekdays("short",!0),1);case"cccc":return Yi(t.weekdays("long",!0),1);case"Z":case"ZZ":return C5(new RegExp(`([+-]${o.source})(?::(${i.source}))?`),2);case"ZZZ":return C5(new RegExp(`([+-]${o.source})(${i.source})?`),2);case"z":return hm(/[a-z_+-/]{1,256}?/i);case" ":return hm(/[^\S\n\r]/);default:return v(M)}})(e)||{invalidReason:One};return w.token=e,w}const zne={year:{"2-digit":"yy",numeric:"yyyyy"},month:{numeric:"M","2-digit":"MM",short:"MMM",long:"MMMM"},day:{numeric:"d","2-digit":"dd"},weekday:{short:"EEE",long:"EEEE"},dayperiod:"a",dayPeriod:"a",hour12:{numeric:"h","2-digit":"hh"},hour24:{numeric:"H","2-digit":"HH"},minute:{numeric:"m","2-digit":"mm"},second:{numeric:"s","2-digit":"ss"},timeZoneName:{long:"ZZZZZ",short:"ZZZ"}};function Ine(e,t,n){const{type:i,value:s}=e;if(i==="literal"){const c=/^\s+$/.test(s);return{literal:!c,val:c?" ":s}}const r=t[i];let a=i;i==="hour"&&(t.hour12!=null?a=t.hour12?"hour12":"hour24":t.hourCycle!=null?t.hourCycle==="h11"||t.hourCycle==="h12"?a="hour12":a="hour24":a=n.hour12?"hour12":"hour24");let o=zne[a];if(typeof o=="object"&&(o=o[r]),o)return{literal:!1,val:o}}function Bne(e){return[`^${e.map(n=>n.regex).reduce((n,i)=>`${n}(${i.source})`,"")}$`,e]}function Vne(e,t,n){const i=e.match(t);if(i){const s={};let r=1;for(const a in n)if(qc(n,a)){const o=n[a],c=o.groups?o.groups+1:1;!o.literal&&o.token&&(s[o.token.val[0]]=o.deser(i.slice(r,r+c))),r+=c}return[i,s]}else return[i,{}]}function Hne(e){const t=r=>{switch(r){case"S":return"millisecond";case"s":return"second";case"m":return"minute";case"h":case"H":return"hour";case"d":return"day";case"o":return"ordinal";case"L":case"M":return"month";case"y":return"year";case"E":case"c":return"weekday";case"W":return"weekNumber";case"k":return"weekYear";case"q":return"quarter";default:return null}};let n=null,i;return Pe(e.z)||(n=Zs.create(e.z)),Pe(e.Z)||(n||(n=new An(e.Z)),i=e.Z),Pe(e.q)||(e.M=(e.q-1)*3+1),Pe(e.h)||(e.h<12&&e.a===1?e.h+=12:e.h===12&&e.a===0&&(e.h=0)),e.G===0&&e.y&&(e.y=-e.y),Pe(e.u)||(e.S=U2(e.u)),[Object.keys(e).reduce((r,a)=>{const o=t(a);return o&&(r[o]=e[a]),r},{}),n,i]}let $v=null;function Fne(){return $v||($v=De.fromMillis(1555555555555)),$v}function Une(e,t){if(e.literal)return e;const n=jn.macroTokenToFormatOpts(e.val),i=C7(n,t);return i==null||i.includes(void 0)?e:i}function b7(e,t){return Array.prototype.concat(...e.map(n=>Une(n,t)))}class w7{constructor(t,n){if(this.locale=t,this.format=n,this.tokens=b7(jn.parseFormat(n),t),this.units=this.tokens.map(i=>Lne(i,t)),this.disqualifyingUnit=this.units.find(i=>i.invalidReason),!this.disqualifyingUnit){const[i,s]=Bne(this.units);this.regex=RegExp(i,"i"),this.handlers=s}}explainFromTokens(t){if(this.isValid){const[n,i]=Vne(t,this.regex,this.handlers),[s,r,a]=i?Hne(i):[null,null,void 0];if(qc(i,"a")&&qc(i,"H"))throw new rc("Can't include meridiem when specifying 24-hour format");return{input:t,tokens:this.tokens,regex:this.regex,rawMatches:n,matches:i,result:s,zone:r,specificOffset:a}}else return{input:t,tokens:this.tokens,invalidReason:this.invalidReason}}get isValid(){return!this.disqualifyingUnit}get invalidReason(){return this.disqualifyingUnit?this.disqualifyingUnit.invalidReason:null}}function S7(e,t,n){return new w7(e,n).explainFromTokens(t)}function Zne(e,t,n){const{result:i,zone:s,specificOffset:r,invalidReason:a}=S7(e,t,n);return[i,s,r,a]}function C7(e,t){if(!e)return null;const i=jn.create(t,e).dtFormatter(Fne()),s=i.formatToParts(),r=i.resolvedOptions();return s.map(a=>Ine(a,e,r))}const Wv="Invalid DateTime",M5=864e13;function md(e){return new es("unsupported zone",`the zone "${e.name}" is not supported`)}function Gv(e){return e.weekData===null&&(e.weekData=op(e.c)),e.weekData}function Yv(e){return e.localWeekData===null&&(e.localWeekData=op(e.c,e.loc.getMinDaysInFirstWeek(),e.loc.getStartOfWeek())),e.localWeekData}function lo(e,t){const n={ts:e.ts,zone:e.zone,c:e.c,o:e.o,loc:e.loc,invalid:e.invalid};return new De({...n,...t,old:n})}function M7(e,t,n){let i=e-t*60*1e3;const s=n.offset(i);if(t===s)return[i,t];i-=(s-t)*60*1e3;const r=n.offset(i);return s===r?[i,s]:[e-Math.min(s,r)*60*1e3,Math.max(s,r)]}function mm(e,t){e+=t*60*1e3;const n=new Date(e);return{year:n.getUTCFullYear(),month:n.getUTCMonth()+1,day:n.getUTCDate(),hour:n.getUTCHours(),minute:n.getUTCMinutes(),second:n.getUTCSeconds(),millisecond:n.getUTCMilliseconds()}}function Wm(e,t,n){return M7(P0(e),t,n)}function T5(e,t){const n=e.o,i=e.c.year+Math.trunc(t.years),s=e.c.month+Math.trunc(t.months)+Math.trunc(t.quarters)*3,r={...e.c,year:i,month:s,day:Math.min(e.c.day,lp(i,s))+Math.trunc(t.days)+Math.trunc(t.weeks)*7},a=Qe.fromObject({years:t.years-Math.trunc(t.years),quarters:t.quarters-Math.trunc(t.quarters),months:t.months-Math.trunc(t.months),weeks:t.weeks-Math.trunc(t.weeks),days:t.days-Math.trunc(t.days),hours:t.hours,minutes:t.minutes,seconds:t.seconds,milliseconds:t.milliseconds}).as("milliseconds"),o=P0(r);let[c,d]=M7(o,n,e.zone);return a!==0&&(c+=a,d=e.zone.offset(c)),{ts:c,o:d}}function Rl(e,t,n,i,s,r){const{setZone:a,zone:o}=n;if(e&&Object.keys(e).length!==0||t){const c=t||o,d=De.fromObject(e,{...n,zone:c,specificOffset:r});return a?d:d.setZone(o)}else return De.invalid(new es("unparsable",`the input "${s}" can't be parsed as ${i}`))}function gm(e,t,n=!0){return e.isValid?jn.create(ot.create("en-US"),{allowZ:n,forceSimple:!0}).formatDateTimeFromString(e,t):null}function qv(e,t){const n=e.c.year>9999||e.c.year<0;let i="";return n&&e.c.year>=0&&(i+="+"),i+=qt(e.c.year,n?6:4),t?(i+="-",i+=qt(e.c.month),i+="-",i+=qt(e.c.day)):(i+=qt(e.c.month),i+=qt(e.c.day)),i}function j5(e,t,n,i,s,r){let a=qt(e.c.hour);return t?(a+=":",a+=qt(e.c.minute),(e.c.millisecond!==0||e.c.second!==0||!n)&&(a+=":")):a+=qt(e.c.minute),(e.c.millisecond!==0||e.c.second!==0||!n)&&(a+=qt(e.c.second),(e.c.millisecond!==0||!i)&&(a+=".",a+=qt(e.c.millisecond,3))),s&&(e.isOffsetFixed&&e.offset===0&&!r?a+="Z":e.o<0?(a+="-",a+=qt(Math.trunc(-e.o/60)),a+=":",a+=qt(Math.trunc(-e.o%60))):(a+="+",a+=qt(Math.trunc(e.o/60)),a+=":",a+=qt(Math.trunc(e.o%60)))),r&&(a+="["+e.zone.ianaName+"]"),a}const T7={month:1,day:1,hour:0,minute:0,second:0,millisecond:0},$ne={weekNumber:1,weekday:1,hour:0,minute:0,second:0,millisecond:0},Wne={ordinal:1,hour:0,minute:0,second:0,millisecond:0},j7=["year","month","day","hour","minute","second","millisecond"],Gne=["weekYear","weekNumber","weekday","hour","minute","second","millisecond"],Yne=["year","ordinal","hour","minute","second","millisecond"];function qne(e){const t={year:"year",years:"year",month:"month",months:"month",day:"day",days:"day",hour:"hour",hours:"hour",minute:"minute",minutes:"minute",quarter:"quarter",quarters:"quarter",second:"second",seconds:"second",millisecond:"millisecond",milliseconds:"millisecond",weekday:"weekday",weekdays:"weekday",weeknumber:"weekNumber",weeksnumber:"weekNumber",weeknumbers:"weekNumber",weekyear:"weekYear",weekyears:"weekYear",ordinal:"ordinal"}[e.toLowerCase()];if(!t)throw new TO(e);return t}function N5(e){switch(e.toLowerCase()){case"localweekday":case"localweekdays":return"localWeekday";case"localweeknumber":case"localweeknumbers":return"localWeekNumber";case"localweekyear":case"localweekyears":return"localWeekYear";default:return qne(e)}}function Xne(e){if(gd===void 0&&(gd=Lt.now()),e.type!=="iana")return e.offset(gd);const t=e.name;return Gm[t]||(Gm[t]=e.offset(gd)),Gm[t]}function k5(e,t){const n=la(t.zone,Lt.defaultZone);if(!n.isValid)return De.invalid(md(n));const i=ot.fromObject(t);let s,r;if(Pe(e.year))s=Lt.now();else{for(const c of j7)Pe(e[c])&&(e[c]=T7[c]);const a=QO(e)||JO(e);if(a)return De.invalid(a);const o=Xne(n);[s,r]=Wm(e,o,n)}return new De({ts:s,zone:n,loc:i,o:r})}function E5(e,t,n){const i=Pe(n.round)?!0:n.round,s=(a,o)=>(a=Z2(a,i||n.calendary?0:2,!0),t.loc.clone(n).relFormatter(n).format(a,o)),r=a=>n.calendary?t.hasSame(e,a)?0:t.startOf(a).diff(e.startOf(a),a).get(a):t.diff(e,a).get(a);if(n.unit)return s(r(n.unit),n.unit);for(const a of n.units){const o=r(a);if(Math.abs(o)>=1)return s(o,a)}return s(e>t?-0:0,n.units[n.units.length-1])}function A5(e){let t={},n;return e.length>0&&typeof e[e.length-1]=="object"?(t=e[e.length-1],n=Array.from(e).slice(0,e.length-1)):n=Array.from(e),[t,n]}let gd,Gm={};class De{constructor(t){const n=t.zone||Lt.defaultZone;let i=t.invalid||(Number.isNaN(t.ts)?new es("invalid input"):null)||(n.isValid?null:md(n));this.ts=Pe(t.ts)?Lt.now():t.ts;let s=null,r=null;if(!i)if(t.old&&t.old.ts===this.ts&&t.old.zone.equals(n))[s,r]=[t.old.c,t.old.o];else{const o=Aa(t.o)&&!t.old?t.o:n.offset(this.ts);s=mm(this.ts,o),i=Number.isNaN(s.year)?new es("invalid input"):null,s=i?null:s,r=i?null:o}this._zone=n,this.loc=t.loc||ot.create(),this.invalid=i,this.weekData=null,this.localWeekData=null,this.c=s,this.o=r,this.isLuxonDateTime=!0}static now(){return new De({})}static local(){const[t,n]=A5(arguments),[i,s,r,a,o,c,d]=n;return k5({year:i,month:s,day:r,hour:a,minute:o,second:c,millisecond:d},t)}static utc(){const[t,n]=A5(arguments),[i,s,r,a,o,c,d]=n;return t.zone=An.utcInstance,k5({year:i,month:s,day:r,hour:a,minute:o,second:c,millisecond:d},t)}static fromJSDate(t,n={}){const i=Tte(t)?t.valueOf():NaN;if(Number.isNaN(i))return De.invalid("invalid input");const s=la(n.zone,Lt.defaultZone);return s.isValid?new De({ts:i,zone:s,loc:ot.fromObject(n)}):De.invalid(md(s))}static fromMillis(t,n={}){if(Aa(t))return t<-M5||t>M5?De.invalid("Timestamp out of range"):new De({ts:t,zone:la(n.zone,Lt.defaultZone),loc:ot.fromObject(n)});throw new Cn(`fromMillis requires a numerical input, but received a ${typeof t} with value ${t}`)}static fromSeconds(t,n={}){if(Aa(t))return new De({ts:t*1e3,zone:la(n.zone,Lt.defaultZone),loc:ot.fromObject(n)});throw new Cn("fromSeconds requires a numerical input")}static fromObject(t,n={}){t=t||{};const i=la(n.zone,Lt.defaultZone);if(!i.isValid)return De.invalid(md(i));const s=ot.fromObject(n),r=cp(t,N5),{minDaysInFirstWeek:a,startOfWeek:o}=g5(r,s),c=Lt.now(),d=Pe(n.specificOffset)?i.offset(c):n.specificOffset,h=!Pe(r.ordinal),m=!Pe(r.year),g=!Pe(r.month)||!Pe(r.day),v=m||g,b=r.weekYear||r.weekNumber;if((v||h)&&b)throw new rc("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(g&&h)throw new rc("Can't mix ordinal dates with month/day");const w=b||r.weekday&&!v;let M,y,S=mm(c,d);w?(M=Gne,y=$ne,S=op(S,a,o)):h?(M=Yne,y=Wne,S=Zv(S)):(M=j7,y=T7);let T=!1;for(const P of M){const H=r[P];Pe(H)?T?r[P]=y[P]:r[P]=S[P]:T=!0}const N=w?Ste(r,a,o):h?Cte(r):QO(r),k=N||JO(r);if(k)return De.invalid(k);const E=w?h5(r,a,o):h?m5(r):r,[D,O]=Wm(E,d,i),I=new De({ts:D,zone:i,o:O,loc:s});return r.weekday&&v&&t.weekday!==I.weekday?De.invalid("mismatched weekday",`you can't specify both a weekday of ${r.weekday} and a date of ${I.toISO()}`):I.isValid?I:De.invalid(I.invalid)}static fromISO(t,n={}){const[i,s]=gne(t);return Rl(i,s,n,"ISO 8601",t)}static fromRFC2822(t,n={}){const[i,s]=pne(t);return Rl(i,s,n,"RFC 2822",t)}static fromHTTP(t,n={}){const[i,s]=vne(t);return Rl(i,s,n,"HTTP",n)}static fromFormat(t,n,i={}){if(Pe(t)||Pe(n))throw new Cn("fromFormat requires an input string and a format");const{locale:s=null,numberingSystem:r=null}=i,a=ot.fromOpts({locale:s,numberingSystem:r,defaultToEN:!0}),[o,c,d,h]=Zne(a,t,n);return h?De.invalid(h):Rl(o,c,i,`format ${n}`,t,d)}static fromString(t,n,i={}){return De.fromFormat(t,n,i)}static fromSQL(t,n={}){const[i,s]=Cne(t);return Rl(i,s,n,"SQL",t)}static invalid(t,n=null){if(!t)throw new Cn("need to specify a reason the DateTime is invalid");const i=t instanceof es?t:new es(t,n);if(Lt.throwOnInvalid)throw new Kee(i);return new De({invalid:i})}static isDateTime(t){return t&&t.isLuxonDateTime||!1}static parseFormatForOpts(t,n={}){const i=C7(t,ot.fromObject(n));return i?i.map(s=>s?s.val:null).join(""):null}static expandFormat(t,n={}){return b7(jn.parseFormat(t),ot.fromObject(n)).map(s=>s.val).join("")}static resetCache(){gd=void 0,Gm={}}get(t){return this[t]}get isValid(){return this.invalid===null}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}get locale(){return this.isValid?this.loc.locale:null}get numberingSystem(){return this.isValid?this.loc.numberingSystem:null}get outputCalendar(){return this.isValid?this.loc.outputCalendar:null}get zone(){return this._zone}get zoneName(){return this.isValid?this.zone.name:null}get year(){return this.isValid?this.c.year:NaN}get quarter(){return this.isValid?Math.ceil(this.c.month/3):NaN}get month(){return this.isValid?this.c.month:NaN}get day(){return this.isValid?this.c.day:NaN}get hour(){return this.isValid?this.c.hour:NaN}get minute(){return this.isValid?this.c.minute:NaN}get second(){return this.isValid?this.c.second:NaN}get millisecond(){return this.isValid?this.c.millisecond:NaN}get weekYear(){return this.isValid?Gv(this).weekYear:NaN}get weekNumber(){return this.isValid?Gv(this).weekNumber:NaN}get weekday(){return this.isValid?Gv(this).weekday:NaN}get isWeekend(){return this.isValid&&this.loc.getWeekendDays().includes(this.weekday)}get localWeekday(){return this.isValid?Yv(this).weekday:NaN}get localWeekNumber(){return this.isValid?Yv(this).weekNumber:NaN}get localWeekYear(){return this.isValid?Yv(this).weekYear:NaN}get ordinal(){return this.isValid?Zv(this.c).ordinal:NaN}get monthShort(){return this.isValid?hd.months("short",{locObj:this.loc})[this.month-1]:null}get monthLong(){return this.isValid?hd.months("long",{locObj:this.loc})[this.month-1]:null}get weekdayShort(){return this.isValid?hd.weekdays("short",{locObj:this.loc})[this.weekday-1]:null}get weekdayLong(){return this.isValid?hd.weekdays("long",{locObj:this.loc})[this.weekday-1]:null}get offset(){return this.isValid?+this.o:NaN}get offsetNameShort(){return this.isValid?this.zone.offsetName(this.ts,{format:"short",locale:this.locale}):null}get offsetNameLong(){return this.isValid?this.zone.offsetName(this.ts,{format:"long",locale:this.locale}):null}get isOffsetFixed(){return this.isValid?this.zone.isUniversal:null}get isInDST(){return this.isOffsetFixed?!1:this.offset>this.set({month:1,day:1}).offset||this.offset>this.set({month:5}).offset}getPossibleOffsets(){if(!this.isValid||this.isOffsetFixed)return[this];const t=864e5,n=6e4,i=P0(this.c),s=this.zone.offset(i-t),r=this.zone.offset(i+t),a=this.zone.offset(i-s*n),o=this.zone.offset(i-r*n);if(a===o)return[this];const c=i-a*n,d=i-o*n,h=mm(c,a),m=mm(d,o);return h.hour===m.hour&&h.minute===m.minute&&h.second===m.second&&h.millisecond===m.millisecond?[lo(this,{ts:c}),lo(this,{ts:d})]:[this]}get isInLeapYear(){return Jf(this.year)}get daysInMonth(){return lp(this.year,this.month)}get daysInYear(){return this.isValid?Mc(this.year):NaN}get weeksInWeekYear(){return this.isValid?wf(this.weekYear):NaN}get weeksInLocalWeekYear(){return this.isValid?wf(this.localWeekYear,this.loc.getMinDaysInFirstWeek(),this.loc.getStartOfWeek()):NaN}resolvedLocaleOptions(t={}){const{locale:n,numberingSystem:i,calendar:s}=jn.create(this.loc.clone(t),t).resolvedOptions(this);return{locale:n,numberingSystem:i,outputCalendar:s}}toUTC(t=0,n={}){return this.setZone(An.instance(t),n)}toLocal(){return this.setZone(Lt.defaultZone)}setZone(t,{keepLocalTime:n=!1,keepCalendarTime:i=!1}={}){if(t=la(t,Lt.defaultZone),t.equals(this.zone))return this;if(t.isValid){let s=this.ts;if(n||i){const r=t.offset(this.ts),a=this.toObject();[s]=Wm(a,r,t)}return lo(this,{ts:s,zone:t})}else return De.invalid(md(t))}reconfigure({locale:t,numberingSystem:n,outputCalendar:i}={}){const s=this.loc.clone({locale:t,numberingSystem:n,outputCalendar:i});return lo(this,{loc:s})}setLocale(t){return this.reconfigure({locale:t})}set(t){if(!this.isValid)return this;const n=cp(t,N5),{minDaysInFirstWeek:i,startOfWeek:s}=g5(n,this.loc),r=!Pe(n.weekYear)||!Pe(n.weekNumber)||!Pe(n.weekday),a=!Pe(n.ordinal),o=!Pe(n.year),c=!Pe(n.month)||!Pe(n.day),d=o||c,h=n.weekYear||n.weekNumber;if((d||a)&&h)throw new rc("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(c&&a)throw new rc("Can't mix ordinal dates with month/day");let m;r?m=h5({...op(this.c,i,s),...n},i,s):Pe(n.ordinal)?(m={...this.toObject(),...n},Pe(n.day)&&(m.day=Math.min(lp(m.year,m.month),m.day))):m=m5({...Zv(this.c),...n});const[g,v]=Wm(m,this.o,this.zone);return lo(this,{ts:g,o:v})}plus(t){if(!this.isValid)return this;const n=Qe.fromDurationLike(t);return lo(this,T5(this,n))}minus(t){if(!this.isValid)return this;const n=Qe.fromDurationLike(t).negate();return lo(this,T5(this,n))}startOf(t,{useLocaleWeeks:n=!1}={}){if(!this.isValid)return this;const i={},s=Qe.normalizeUnit(t);switch(s){case"years":i.month=1;case"quarters":case"months":i.day=1;case"weeks":case"days":i.hour=0;case"hours":i.minute=0;case"minutes":i.second=0;case"seconds":i.millisecond=0;break}if(s==="weeks")if(n){const r=this.loc.getStartOfWeek(),{weekday:a}=this;a<r&&(i.weekNumber=this.weekNumber-1),i.weekday=r}else i.weekday=1;if(s==="quarters"){const r=Math.ceil(this.month/3);i.month=(r-1)*3+1}return this.set(i)}endOf(t,n){return this.isValid?this.plus({[t]:1}).startOf(t,n).minus(1):this}toFormat(t,n={}){return this.isValid?jn.create(this.loc.redefaultToEN(n)).formatDateTimeFromString(this,t):Wv}toLocaleString(t=ap,n={}){return this.isValid?jn.create(this.loc.clone(n),t).formatDateTime(this):Wv}toLocaleParts(t={}){return this.isValid?jn.create(this.loc.clone(t),t).formatDateTimeParts(this):[]}toISO({format:t="extended",suppressSeconds:n=!1,suppressMilliseconds:i=!1,includeOffset:s=!0,extendedZone:r=!1}={}){if(!this.isValid)return null;const a=t==="extended";let o=qv(this,a);return o+="T",o+=j5(this,a,n,i,s,r),o}toISODate({format:t="extended"}={}){return this.isValid?qv(this,t==="extended"):null}toISOWeekDate(){return gm(this,"kkkk-'W'WW-c")}toISOTime({suppressMilliseconds:t=!1,suppressSeconds:n=!1,includeOffset:i=!0,includePrefix:s=!1,extendedZone:r=!1,format:a="extended"}={}){return this.isValid?(s?"T":"")+j5(this,a==="extended",n,t,i,r):null}toRFC2822(){return gm(this,"EEE, dd LLL yyyy HH:mm:ss ZZZ",!1)}toHTTP(){return gm(this.toUTC(),"EEE, dd LLL yyyy HH:mm:ss 'GMT'")}toSQLDate(){return this.isValid?qv(this,!0):null}toSQLTime({includeOffset:t=!0,includeZone:n=!1,includeOffsetSpace:i=!0}={}){let s="HH:mm:ss.SSS";return(n||t)&&(i&&(s+=" "),n?s+="z":t&&(s+="ZZ")),gm(this,s,!0)}toSQL(t={}){return this.isValid?`${this.toSQLDate()} ${this.toSQLTime(t)}`:null}toString(){return this.isValid?this.toISO():Wv}[Symbol.for("nodejs.util.inspect.custom")](){return this.isValid?`DateTime { ts: ${this.toISO()}, zone: ${this.zone.name}, locale: ${this.locale} }`:`DateTime { Invalid, reason: ${this.invalidReason} }`}valueOf(){return this.toMillis()}toMillis(){return this.isValid?this.ts:NaN}toSeconds(){return this.isValid?this.ts/1e3:NaN}toUnixInteger(){return this.isValid?Math.floor(this.ts/1e3):NaN}toJSON(){return this.toISO()}toBSON(){return this.toJSDate()}toObject(t={}){if(!this.isValid)return{};const n={...this.c};return t.includeConfig&&(n.outputCalendar=this.outputCalendar,n.numberingSystem=this.loc.numberingSystem,n.locale=this.loc.locale),n}toJSDate(){return new Date(this.isValid?this.ts:NaN)}diff(t,n="milliseconds",i={}){if(!this.isValid||!t.isValid)return Qe.invalid("created by diffing an invalid DateTime");const s={locale:this.locale,numberingSystem:this.numberingSystem,...i},r=jte(n).map(Qe.normalizeUnit),a=t.valueOf()>this.valueOf(),o=a?this:t,c=a?t:this,d=Ane(o,c,r,s);return a?d.negate():d}diffNow(t="milliseconds",n={}){return this.diff(De.now(),t,n)}until(t){return this.isValid?Pt.fromDateTimes(this,t):this}hasSame(t,n,i){if(!this.isValid)return!1;const s=t.valueOf(),r=this.setZone(t.zone,{keepLocalTime:!0});return r.startOf(n,i)<=s&&s<=r.endOf(n,i)}equals(t){return this.isValid&&t.isValid&&this.valueOf()===t.valueOf()&&this.zone.equals(t.zone)&&this.loc.equals(t.loc)}toRelative(t={}){if(!this.isValid)return null;const n=t.base||De.fromObject({},{zone:this.zone}),i=t.padding?this<n?-t.padding:t.padding:0;let s=["years","months","days","hours","minutes","seconds"],r=t.unit;return Array.isArray(t.unit)&&(s=t.unit,r=void 0),E5(n,this.plus(i),{...t,numeric:"always",units:s,unit:r})}toRelativeCalendar(t={}){return this.isValid?E5(t.base||De.fromObject({},{zone:this.zone}),this,{...t,numeric:"auto",units:["years","months","days"],calendary:!0}):null}static min(...t){if(!t.every(De.isDateTime))throw new Cn("min requires all arguments be DateTimes");return p5(t,n=>n.valueOf(),Math.min)}static max(...t){if(!t.every(De.isDateTime))throw new Cn("max requires all arguments be DateTimes");return p5(t,n=>n.valueOf(),Math.max)}static fromFormatExplain(t,n,i={}){const{locale:s=null,numberingSystem:r=null}=i,a=ot.fromOpts({locale:s,numberingSystem:r,defaultToEN:!0});return S7(a,t,n)}static fromStringExplain(t,n,i={}){return De.fromFormatExplain(t,n,i)}static buildFormatParser(t,n={}){const{locale:i=null,numberingSystem:s=null}=n,r=ot.fromOpts({locale:i,numberingSystem:s,defaultToEN:!0});return new w7(r,t)}static fromFormatParser(t,n,i={}){if(Pe(t)||Pe(n))throw new Cn("fromFormatParser requires an input string and a format parser");const{locale:s=null,numberingSystem:r=null}=i,a=ot.fromOpts({locale:s,numberingSystem:r,defaultToEN:!0});if(!a.equals(n.locale))throw new Cn(`fromFormatParser called with a locale of ${a}, but the format parser was created for ${n.locale}`);const{result:o,zone:c,specificOffset:d,invalidReason:h}=n.explainFromTokens(t);return h?De.invalid(h):Rl(o,c,i,`format ${n.format}`,t,d)}static get DATE_SHORT(){return ap}static get DATE_MED(){return jO}static get DATE_MED_WITH_WEEKDAY(){return ete}static get DATE_FULL(){return NO}static get DATE_HUGE(){return kO}static get TIME_SIMPLE(){return EO}static get TIME_WITH_SECONDS(){return AO}static get TIME_WITH_SHORT_OFFSET(){return OO}static get TIME_WITH_LONG_OFFSET(){return DO}static get TIME_24_SIMPLE(){return PO}static get TIME_24_WITH_SECONDS(){return RO}static get TIME_24_WITH_SHORT_OFFSET(){return LO}static get TIME_24_WITH_LONG_OFFSET(){return zO}static get DATETIME_SHORT(){return IO}static get DATETIME_SHORT_WITH_SECONDS(){return BO}static get DATETIME_MED(){return VO}static get DATETIME_MED_WITH_SECONDS(){return HO}static get DATETIME_MED_WITH_WEEKDAY(){return tte}static get DATETIME_FULL(){return FO}static get DATETIME_FULL_WITH_SECONDS(){return UO}static get DATETIME_HUGE(){return ZO}static get DATETIME_HUGE_WITH_SECONDS(){return $O}}function Ju(e){if(De.isDateTime(e))return e;if(e&&e.valueOf&&Aa(e.valueOf()))return De.fromJSDate(e);if(e&&typeof e=="object")return De.fromObject(e);throw new Cn(`Unknown datetime argument: ${e}, of type ${typeof e}`)}const Kne="3.6.0";ni.DateTime=De;ni.Duration=Qe;ni.FixedOffsetZone=An;ni.IANAZone=Zs;ni.Info=hd;ni.Interval=Pt;ni.InvalidZone=GO;ni.Settings=Lt;ni.SystemZone=Qf;ni.VERSION=Kne;ni.Zone=hu;Object.defineProperty(is,"__esModule",{value:!0});is.CronDate=is.DateMathOp=is.TimeUnit=void 0;const co=ni;var yn;(function(e){e.Second="Second",e.Minute="Minute",e.Hour="Hour",e.Day="Day",e.Month="Month",e.Year="Year"})(yn||(is.TimeUnit=yn={}));var up;(function(e){e.Add="Add",e.Subtract="Subtract"})(up||(is.DateMathOp=up={}));var ce,ko,Eo,Mf,ys,Kr;const fw=class fw{constructor(t,n){vt(this,ys);vt(this,ce);vt(this,ko,null);vt(this,Eo,null);vt(this,Mf,{add:{[yn.Year]:this.addYear.bind(this),[yn.Month]:this.addMonth.bind(this),[yn.Day]:this.addDay.bind(this),[yn.Hour]:this.addHour.bind(this),[yn.Minute]:this.addMinute.bind(this),[yn.Second]:this.addSecond.bind(this)},subtract:{[yn.Year]:this.subtractYear.bind(this),[yn.Month]:this.subtractMonth.bind(this),[yn.Day]:this.subtractDay.bind(this),[yn.Hour]:this.subtractHour.bind(this),[yn.Minute]:this.subtractMinute.bind(this),[yn.Second]:this.subtractSecond.bind(this)}});const i={zone:n};if(t?t instanceof fw?(Se(this,ce,X(t,ce)),Se(this,ko,X(t,ko)),Se(this,Eo,X(t,Eo))):t instanceof Date?Se(this,ce,co.DateTime.fromJSDate(t,i)):typeof t=="number"?Se(this,ce,co.DateTime.fromMillis(t,i)):(Se(this,ce,co.DateTime.fromISO(t,i)),X(this,ce).isValid||Se(this,ce,co.DateTime.fromRFC2822(t,i)),X(this,ce).isValid||Se(this,ce,co.DateTime.fromSQL(t,i)),X(this,ce).isValid||Se(this,ce,co.DateTime.fromFormat(t,"EEE, d MMM yyyy HH:mm:ss",i))):Se(this,ce,co.DateTime.local()),!X(this,ce).isValid)throw new Error(`CronDate: unhandled timestamp: ${t}`);n&&n!==X(this,ce).zoneName&&Se(this,ce,X(this,ce).setZone(n))}get dstStart(){return X(this,ko)}set dstStart(t){Se(this,ko,t)}get dstEnd(){return X(this,Eo)}set dstEnd(t){Se(this,Eo,t)}addYear(){Se(this,ce,X(this,ce).plus({years:1}))}addMonth(){Se(this,ce,X(this,ce).plus({months:1}).startOf("month"))}addDay(){Se(this,ce,X(this,ce).plus({days:1}).startOf("day"))}addHour(){Se(this,ce,X(this,ce).plus({hours:1}).startOf("hour"))}addMinute(){Se(this,ce,X(this,ce).plus({minutes:1}).startOf("minute"))}addSecond(){Se(this,ce,X(this,ce).plus({seconds:1}))}subtractYear(){Se(this,ce,X(this,ce).minus({years:1}))}subtractMonth(){Se(this,ce,X(this,ce).minus({months:1}).endOf("month").startOf("second"))}subtractDay(){Se(this,ce,X(this,ce).minus({days:1}).endOf("day").startOf("second"))}subtractHour(){Se(this,ce,X(this,ce).minus({hours:1}).endOf("hour").startOf("second"))}subtractMinute(){Se(this,ce,X(this,ce).minus({minutes:1}).endOf("minute").startOf("second"))}subtractSecond(){Se(this,ce,X(this,ce).minus({seconds:1}))}addUnit(t){X(this,Mf).add[t]()}subtractUnit(t){X(this,Mf).subtract[t]()}invokeDateOperation(t,n){if(t===up.Add){this.addUnit(n);return}if(t===up.Subtract){this.subtractUnit(n);return}throw new Error(`Invalid verb: ${t}`)}getDate(){return X(this,ce).day}getFullYear(){return X(this,ce).year}getDay(){const t=X(this,ce).weekday;return t===7?0:t}getMonth(){return X(this,ce).month-1}getHours(){return X(this,ce).hour}getMinutes(){return X(this,ce).minute}getSeconds(){return X(this,ce).second}getMilliseconds(){return X(this,ce).millisecond}getTime(){return X(this,ce).valueOf()}getUTCDate(){return Ee(this,ys,Kr).call(this).day}getUTCFullYear(){return Ee(this,ys,Kr).call(this).year}getUTCDay(){const t=Ee(this,ys,Kr).call(this).weekday;return t===7?0:t}getUTCMonth(){return Ee(this,ys,Kr).call(this).month-1}getUTCHours(){return Ee(this,ys,Kr).call(this).hour}getUTCMinutes(){return Ee(this,ys,Kr).call(this).minute}getUTCSeconds(){return Ee(this,ys,Kr).call(this).second}toISOString(){return X(this,ce).toUTC().toISO()}toJSON(){return X(this,ce).toJSON()}setDate(t){Se(this,ce,X(this,ce).set({day:t}))}setFullYear(t){Se(this,ce,X(this,ce).set({year:t}))}setDay(t){Se(this,ce,X(this,ce).set({weekday:t}))}setMonth(t){Se(this,ce,X(this,ce).set({month:t+1}))}setHours(t){Se(this,ce,X(this,ce).set({hour:t}))}setMinutes(t){Se(this,ce,X(this,ce).set({minute:t}))}setSeconds(t){Se(this,ce,X(this,ce).set({second:t}))}setMilliseconds(t){Se(this,ce,X(this,ce).set({millisecond:t}))}toString(){return this.toDate().toString()}toDate(){return X(this,ce).toJSDate()}isLastDayOfMonth(){const t=X(this,ce).plus({days:1}).startOf("day");return X(this,ce).month!==t.month}isLastWeekdayOfMonth(){const t=X(this,ce).plus({days:7}).startOf("day");return X(this,ce).month!==t.month}applyDateOperation(t,n,i){if(n===yn.Month||n===yn.Day){this.invokeDateOperation(t,n);return}const s=this.getHours();this.invokeDateOperation(t,n);const r=this.getHours(),a=r-s;a===2?i!==24&&(this.dstStart=r):a===0&&this.getMinutes()===0&&this.getSeconds()===0&&i!==24&&(this.dstEnd=r)}};ce=new WeakMap,ko=new WeakMap,Eo=new WeakMap,Mf=new WeakMap,ys=new WeakSet,Kr=function(){return X(this,ce).toUTC()};let dp=fw;is.CronDate=dp;is.default=dp;var xu={};Object.defineProperty(xu,"__esModule",{value:!0});xu.CronExpression=void 0;const Qne=ni,un=is,O5=1e4;var Nc,da,qi,Tf,jf,kc,gt,Mn,Qr,Ym,N7,Ai,k7,E7,Fl;const Rn=class Rn{constructor(t,n){vt(this,Ai);vt(this,Nc);vt(this,da);vt(this,qi);vt(this,Tf);vt(this,jf);vt(this,kc);vt(this,gt);Se(this,Nc,n),Se(this,da,n.tz),Se(this,qi,new un.CronDate(n.currentDate,X(this,da))),Se(this,Tf,n.startDate?new un.CronDate(n.startDate,X(this,da)):null),Se(this,jf,n.endDate?new un.CronDate(n.endDate,X(this,da)):null),Se(this,kc,n.nthDayOfWeek||0),Se(this,gt,t)}get fields(){return X(this,gt)}static fieldsToExpression(t,n){return new Rn(t,n||{})}next(){return Ee(this,Ai,Fl).call(this)}prev(){return Ee(this,Ai,Fl).call(this,!0)}hasNext(){const t=X(this,qi);try{return Ee(this,Ai,Fl).call(this),!0}catch{return!1}finally{Se(this,qi,t)}}hasPrev(){const t=X(this,qi);try{return Ee(this,Ai,Fl).call(this,!0),!0}catch{return!1}finally{Se(this,qi,t)}}take(t){const n=[];if(t>=0)for(let i=0;i<t;i++)try{n.push(this.next())}catch{return n}else for(let i=0;i>t;i--)try{n.push(this.prev())}catch{return n}return n}reset(t){Se(this,qi,new un.CronDate(t||X(this,Nc).currentDate))}stringify(t=!1){return X(this,gt).stringify(t)}includesDate(t){const{second:n,minute:i,hour:s,dayOfMonth:r,month:a,dayOfWeek:o}=X(this,gt),c=Qne.DateTime.fromISO(t.toISOString(),{zone:X(this,da)});return r.values.includes(c.day)&&o.values.includes(c.weekday)&&a.values.includes(c.month)&&s.values.includes(c.hour)&&i.values.includes(c.minute)&&n.values.includes(c.second)}toString(){return X(this,Nc).expression||this.stringify(!0)}[Symbol.iterator](){return{next:()=>({value:Ee(this,Ai,Fl).call(this),done:!this.hasNext()})}}};Nc=new WeakMap,da=new WeakMap,qi=new WeakMap,Tf=new WeakMap,jf=new WeakMap,kc=new WeakMap,gt=new WeakMap,Mn=new WeakSet,Qr=function(t,n){return n.some(i=>i===t)},Ym=function(t){return t.length>0&&t.some(n=>typeof n=="string"&&n.indexOf("L")>=0)},N7=function(t,n){return t.some(i=>{var r;if(!Ee(r=Rn,Mn,Ym).call(r,[i]))return!1;const s=parseInt(i.toString().charAt(0),10)%7;if(Number.isNaN(s))throw new Error(`Invalid last weekday of the month expression: ${i}`);return n.getDay()===s&&n.isLastWeekdayOfMonth()})},Ai=new WeakSet,k7=function(t){var c,d,h,m,g;const n=X(this,gt).dayOfMonth.isWildcard,i=!n,s=X(this,gt).dayOfWeek.isWildcard,r=!s,a=Ee(c=Rn,Mn,Qr).call(c,t.getDate(),X(this,gt).dayOfMonth.values)||Ee(d=Rn,Mn,Ym).call(d,X(this,gt).dayOfMonth.values)&&t.isLastDayOfMonth(),o=Ee(h=Rn,Mn,Qr).call(h,t.getDay(),X(this,gt).dayOfWeek.values)||Ee(m=Rn,Mn,Ym).call(m,X(this,gt).dayOfWeek.values)&&Ee(g=Rn,Mn,N7).call(g,X(this,gt).dayOfWeek.values,t);return!!(i&&r&&(a||o)||a&&!r||n&&!s&&o)},E7=function(t,n,i){var c,d;const s=t.getHours(),r=Ee(c=Rn,Mn,Qr).call(c,s,X(this,gt).hour.values),a=t.dstStart===s,o=t.dstEnd===s;return!r&&!a?(t.dstStart=null,t.applyDateOperation(n,un.TimeUnit.Hour,X(this,gt).hour.values.length),!1):a&&!Ee(d=Rn,Mn,Qr).call(d,s-1,X(this,gt).hour.values)?(t.invokeDateOperation(n,un.TimeUnit.Hour),!1):o&&!i?(t.dstEnd=null,t.applyDateOperation(un.DateMathOp.Add,un.TimeUnit.Hour,X(this,gt).hour.values.length),!1):!0},Fl=function(t=!1){var c,d,h;const n=t?un.DateMathOp.Subtract:un.DateMathOp.Add,i=new un.CronDate(X(this,qi)),s=X(this,Tf),r=X(this,jf),a=i.getTime();let o=0;for(;o++<O5;){if(o>O5)throw new Error("Invalid expression, loop limit exceeded");if(t&&s&&s.getTime()>i.getTime())throw new Error("Out of the timespan range");if(!t&&r&&i.getTime()>r.getTime())throw new Error("Out of the timespan range");if(!Ee(this,Ai,k7).call(this,i)){i.applyDateOperation(n,un.TimeUnit.Day,X(this,gt).hour.values.length);continue}if(!(X(this,kc)<=0||Math.ceil(i.getDate()/7)===X(this,kc))){i.applyDateOperation(n,un.TimeUnit.Day,X(this,gt).hour.values.length);continue}if(!Ee(c=Rn,Mn,Qr).call(c,i.getMonth()+1,X(this,gt).month.values)){i.applyDateOperation(n,un.TimeUnit.Month,X(this,gt).hour.values.length);continue}if(Ee(this,Ai,E7).call(this,i,n,t)){if(!Ee(d=Rn,Mn,Qr).call(d,i.getMinutes(),X(this,gt).minute.values)){i.applyDateOperation(n,un.TimeUnit.Minute,X(this,gt).hour.values.length);continue}if(!Ee(h=Rn,Mn,Qr).call(h,i.getSeconds(),X(this,gt).second.values)){i.applyDateOperation(n,un.TimeUnit.Second,X(this,gt).hour.values.length);continue}if(a===i.getTime()){(n==="Add"||i.getMilliseconds()===0)&&i.applyDateOperation(n,un.TimeUnit.Second,X(this,gt).hour.values.length);continue}break}}return i.getMilliseconds()!==0&&i.setMilliseconds(0),Se(this,qi,i),i},vt(Rn,Mn);let fp=Rn;xu.CronExpression=fp;xu.default=fp;Object.defineProperty(qn,"__esModule",{value:!0});qn.CronExpressionParser=qn.DayOfWeek=qn.Months=qn.CronUnit=qn.PredefinedExpressions=void 0;const Jne=Kf,eie=is,tie=xu,_i=T0;var Hy;(function(e){e["@yearly"]="0 0 0 1 1 *",e["@annually"]="0 0 0 1 1 *",e["@monthly"]="0 0 0 1 * *",e["@weekly"]="0 0 0 * * 0",e["@daily"]="0 0 0 * * *",e["@hourly"]="0 0 * * * *",e["@minutely"]="0 * * * * *",e["@secondly"]="* * * * * *",e["@weekdays"]="0 0 0 * * 1-5",e["@weekends"]="0 0 0 * * 0,6"})(Hy||(qn.PredefinedExpressions=Hy={}));var wi;(function(e){e.Second="Second",e.Minute="Minute",e.Hour="Hour",e.DayOfMonth="DayOfMonth",e.Month="Month",e.DayOfWeek="DayOfWeek"})(wi||(qn.CronUnit=wi={}));var Fy;(function(e){e[e.jan=1]="jan",e[e.feb=2]="feb",e[e.mar=3]="mar",e[e.apr=4]="apr",e[e.may=5]="may",e[e.jun=6]="jun",e[e.jul=7]="jul",e[e.aug=8]="aug",e[e.sep=9]="sep",e[e.oct=10]="oct",e[e.nov=11]="nov",e[e.dec=12]="dec"})(Fy||(qn.Months=Fy={}));var Uy;(function(e){e[e.sun=0]="sun",e[e.mon=1]="mon",e[e.tue=2]="tue",e[e.wed=3]="wed",e[e.thu=4]="thu",e[e.fri=5]="fri",e[e.sat=6]="sat"})(Uy||(qn.DayOfWeek=Uy={}));var ht,A7,vo,O7,D7,P7,R7,L7,$y,z7,I7;const _n=class _n{static parse(t,n={}){var w,M,y,S,T,N,k,E;const{strict:i=!1}=n,s=n.currentDate||new eie.CronDate;t=Hy[t]||t;const r=Ee(w=_n,ht,A7).call(w,t,i);if(!(r.dayOfMonth==="*"||r.dayOfWeek==="*"||!i))throw new Error("Cannot use both dayOfMonth and dayOfWeek together in strict mode!");const a=Ee(M=_n,ht,vo).call(M,wi.Second,r.second,_i.CronSecond.constraints),o=Ee(y=_n,ht,vo).call(y,wi.Minute,r.minute,_i.CronMinute.constraints),c=Ee(S=_n,ht,vo).call(S,wi.Hour,r.hour,_i.CronHour.constraints),d=Ee(T=_n,ht,vo).call(T,wi.Month,r.month,_i.CronMonth.constraints),h=Ee(N=_n,ht,vo).call(N,wi.DayOfMonth,r.dayOfMonth,_i.CronDayOfMonth.constraints),{dayOfWeek:m,nthDayOfWeek:g}=Ee(k=_n,ht,z7).call(k,r.dayOfWeek),v=Ee(E=_n,ht,vo).call(E,wi.DayOfWeek,m,_i.CronDayOfWeek.constraints),b=new Jne.CronFieldCollection({second:new _i.CronSecond(a,["*","?"].includes(r.second)),minute:new _i.CronMinute(o,["*","?"].includes(r.minute)),hour:new _i.CronHour(c,["*","?"].includes(r.hour)),dayOfMonth:new _i.CronDayOfMonth(h,["*","?"].includes(r.dayOfMonth)),month:new _i.CronMonth(d,["*","?"].includes(r.month)),dayOfWeek:new _i.CronDayOfWeek(v,["*","?"].includes(r.dayOfWeek))});return new tie.CronExpression(b,{...n,expression:t,currentDate:s,nthDayOfWeek:g})}};ht=new WeakSet,A7=function(t,n){if(n&&!t.length)throw new Error("Invalid cron expression");t=t||"0 * * * * *";const i=t.trim().split(/\s+/);if(n&&i.length<6)throw new Error("Invalid cron expression, expected 6 fields");if(i.length>6)throw new Error("Invalid cron expression, too many fields");const s=["*","*","*","*","*","0"];i.length<s.length&&i.unshift(...s.slice(i.length));const[r,a,o,c,d,h]=i;return{second:r,minute:a,hour:o,dayOfMonth:c,month:d,dayOfWeek:h}},vo=function(t,n,i){var s;if((t===wi.Month||t===wi.DayOfWeek)&&(n=n.replace(/[a-z]{3}/gi,r=>{r=r.toLowerCase();const a=Fy[r]||Uy[r];if(a===void 0)throw new Error(`Validation error, cannot resolve alias "${r}"`);return a.toString()})),!i.validChars.test(n))throw new Error(`Invalid characters, got value: ${n}`);return n=n.replace(/[*?]/g,i.min+"-"+i.max),Ee(s=_n,ht,O7).call(s,t,n,i)},O7=function(t,n,i){const s=[];function r(o,c){var d;if(Array.isArray(o))s.push(...o);else if(Ee(d=_n,ht,I7).call(d,c,o))s.push(o);else{const h=parseInt(o.toString(),10);if(!(h>=c.min&&h<=c.max))throw new Error(`Constraint error, got value ${o} expected range ${c.min}-${c.max}`);s.push(t===wi.DayOfWeek?h%7:o)}}return n.split(",").forEach(o=>{var c;if(!(o.length>0))throw new Error("Invalid list value format");r(Ee(c=_n,ht,D7).call(c,t,o,i),i)}),s},D7=function(t,n,i){var r,a;const s=n.split("/");if(s.length>2)throw new Error(`Invalid repeat: ${n}`);return s.length===2?(isNaN(parseInt(s[0],10))||(s[0]=`${s[0]}-${i.max}`),Ee(r=_n,ht,$y).call(r,t,s[0],parseInt(s[1],10),i)):Ee(a=_n,ht,$y).call(a,t,n,1,i)},P7=function(t,n,i){if(!(!isNaN(t)&&!isNaN(n)&&t>=i.min&&n<=i.max))throw new Error(`Constraint error, got range ${t}-${n} expected range ${i.min}-${i.max}`);if(t>n)throw new Error(`Invalid range: ${t}-${n}, min(${t}) > max(${n})`)},R7=function(t){if(!(!isNaN(t)&&t>0))throw new Error(`Constraint error, cannot repeat at every ${t} time.`)},L7=function(t,n,i,s){const r=[];t===wi.DayOfWeek&&i%7===0&&r.push(0);for(let a=n;a<=i;a+=s)r.indexOf(a)===-1&&r.push(a);return r},$y=function(t,n,i,s){const r=n.split("-");if(r.length<=1)return isNaN(+n)?n:+n;const[a,o]=r.map(c=>parseInt(c,10));return Ee(this,ht,P7).call(this,a,o,s),Ee(this,ht,R7).call(this,i),Ee(this,ht,L7).call(this,t,a,o,i)},z7=function(t){const n=t.split("#");if(n.length<=1)return{dayOfWeek:n[0]};const i=+n[n.length-1],s=t.match(/([,-/])/);if(s!==null)throw new Error(`Constraint error, invalid dayOfWeek \`#\` and \`${s==null?void 0:s[0]}\` special characters are incompatible`);if(!(n.length<=2&&!isNaN(i)&&i>=1&&i<=5))throw new Error("Constraint error, invalid dayOfWeek occurrence number (#)");return{dayOfWeek:n[0],nthDayOfWeek:i}},I7=function(t,n){return t.chars.some(i=>n.toString().includes(i))},vt(_n,ht);let Zy=_n;qn.CronExpressionParser=Zy;var z0={};const nie={},iie=Object.freeze(Object.defineProperty({__proto__:null,default:nie},Symbol.toStringTag,{value:"Module"})),D5=AR(iie);var sie=In&&In.__createBinding||(Object.create?function(e,t,n,i){i===void 0&&(i=n);var s=Object.getOwnPropertyDescriptor(t,n);(!s||("get"in s?!t.__esModule:s.writable||s.configurable))&&(s={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,s)}:function(e,t,n,i){i===void 0&&(i=n),e[i]=t[n]}),rie=In&&In.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),aie=In&&In.__importStar||function(){var e=function(t){return e=Object.getOwnPropertyNames||function(n){var i=[];for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(i[i.length]=s);return i},e(t)};return function(t){if(t&&t.__esModule)return t;var n={};if(t!=null)for(var i=e(t),s=0;s<i.length;s++)i[s]!=="default"&&sie(n,t,i[s]);return rie(n,t),n}}();Object.defineProperty(z0,"__esModule",{value:!0});z0.CronFileParser=void 0;const oie=qn;var Qo,Gy,B7;const ac=class ac{static async parseFile(t){var s;const{readFile:n}=await Promise.resolve().then(()=>aie(D5)),i=await n(t,"utf8");return Ee(s=ac,Qo,Gy).call(s,i)}static parseFileSync(t){var s;const{readFileSync:n}=D5,i=n(t,"utf8");return Ee(s=ac,Qo,Gy).call(s,i)}};Qo=new WeakSet,Gy=function(t){var s;const n=t.split(`
`),i={variables:{},expressions:[],errors:{}};for(const r of n){const a=r.trim();if(a.length===0||a.startsWith("#"))continue;const o=a.match(/^(.*)=(.*)$/);if(o){const[,c,d]=o;i.variables[c]=d.replace(/["']/g,"");continue}try{const c=Ee(s=ac,Qo,B7).call(s,a);i.expressions.push(c.interval)}catch(c){i.errors[a]=c}}return i},B7=function(t){const n=t.split(" ");return{interval:oie.CronExpressionParser.parse(n.slice(0,5).join(" ")),command:n.slice(5,n.length)}},vt(ac,Qo);let Wy=ac;z0.CronFileParser=Wy;(function(e){var t=In&&In.__createBinding||(Object.create?function(d,h,m,g){g===void 0&&(g=m);var v=Object.getOwnPropertyDescriptor(h,m);(!v||("get"in v?!h.__esModule:v.writable||v.configurable))&&(v={enumerable:!0,get:function(){return h[m]}}),Object.defineProperty(d,g,v)}:function(d,h,m,g){g===void 0&&(g=m),d[g]=h[m]}),n=In&&In.__exportStar||function(d,h){for(var m in d)m!=="default"&&!Object.prototype.hasOwnProperty.call(h,m)&&t(h,d,m)};Object.defineProperty(e,"__esModule",{value:!0}),e.CronFileParser=e.CronExpressionParser=e.CronExpression=e.CronFieldCollection=e.CronDate=void 0;const i=qn;var s=is;Object.defineProperty(e,"CronDate",{enumerable:!0,get:function(){return s.CronDate}});var r=Kf;Object.defineProperty(e,"CronFieldCollection",{enumerable:!0,get:function(){return r.CronFieldCollection}});var a=xu;Object.defineProperty(e,"CronExpression",{enumerable:!0,get:function(){return a.CronExpression}});var o=qn;Object.defineProperty(e,"CronExpressionParser",{enumerable:!0,get:function(){return o.CronExpressionParser}});var c=z0;Object.defineProperty(e,"CronFileParser",{enumerable:!0,get:function(){return c.CronFileParser}}),n(T0,e),e.default=i.CronExpressionParser})(yee);var I0="Collapsible",[lie,V7]=vn(I0),[cie,Y2]=lie(I0),H7=x.forwardRef((e,t)=>{const{__scopeCollapsible:n,open:i,defaultOpen:s,disabled:r,onOpenChange:a,...o}=e,[c,d]=ti({prop:i,defaultProp:s??!1,onChange:a,caller:I0});return u.jsx(cie,{scope:n,disabled:r,contentId:ns(),open:c,onOpenToggle:x.useCallback(()=>d(h=>!h),[d]),children:u.jsx(Te.div,{"data-state":X2(c),"data-disabled":r?"":void 0,...o,ref:t})})});H7.displayName=I0;var F7="CollapsibleTrigger",U7=x.forwardRef((e,t)=>{const{__scopeCollapsible:n,...i}=e,s=Y2(F7,n);return u.jsx(Te.button,{type:"button","aria-controls":s.contentId,"aria-expanded":s.open||!1,"data-state":X2(s.open),"data-disabled":s.disabled?"":void 0,disabled:s.disabled,...i,ref:t,onClick:pe(e.onClick,s.onOpenToggle)})});U7.displayName=F7;var q2="CollapsibleContent",Z7=x.forwardRef((e,t)=>{const{forceMount:n,...i}=e,s=Y2(q2,e.__scopeCollapsible);return u.jsx(nn,{present:n||s.open,children:({present:r})=>u.jsx(uie,{...i,ref:t,present:r})})});Z7.displayName=q2;var uie=x.forwardRef((e,t)=>{const{__scopeCollapsible:n,present:i,children:s,...r}=e,a=Y2(q2,n),[o,c]=x.useState(i),d=x.useRef(null),h=qe(t,d),m=x.useRef(0),g=m.current,v=x.useRef(0),b=v.current,w=a.open||o,M=x.useRef(w),y=x.useRef(void 0);return x.useEffect(()=>{const S=requestAnimationFrame(()=>M.current=!1);return()=>cancelAnimationFrame(S)},[]),Ls(()=>{const S=d.current;if(S){y.current=y.current||{transitionDuration:S.style.transitionDuration,animationName:S.style.animationName},S.style.transitionDuration="0s",S.style.animationName="none";const T=S.getBoundingClientRect();m.current=T.height,v.current=T.width,M.current||(S.style.transitionDuration=y.current.transitionDuration,S.style.animationName=y.current.animationName),c(i)}},[a.open,i]),u.jsx(Te.div,{"data-state":X2(a.open),"data-disabled":a.disabled?"":void 0,id:a.contentId,hidden:!w,...r,ref:h,style:{"--radix-collapsible-content-height":g?`${g}px`:void 0,"--radix-collapsible-content-width":b?`${b}px`:void 0,...e.style},children:w&&s})});function X2(e){return e?"open":"closed"}var die=H7,fie=U7,hie=Z7,ds="Accordion",mie=["Home","End","ArrowDown","ArrowUp","ArrowLeft","ArrowRight"],[K2,gie,pie]=O2(ds),[B0,bae]=vn(ds,[pie,V7]),Q2=V7(),$7=ae.forwardRef((e,t)=>{const{type:n,...i}=e,s=i,r=i;return u.jsx(K2.Provider,{scope:e.__scopeAccordion,children:n==="multiple"?u.jsx(_ie,{...r,ref:t}):u.jsx(yie,{...s,ref:t})})});$7.displayName=ds;var[W7,vie]=B0(ds),[G7,xie]=B0(ds,{collapsible:!1}),yie=ae.forwardRef((e,t)=>{const{value:n,defaultValue:i,onValueChange:s=()=>{},collapsible:r=!1,...a}=e,[o,c]=ti({prop:n,defaultProp:i??"",onChange:s,caller:ds});return u.jsx(W7,{scope:e.__scopeAccordion,value:ae.useMemo(()=>o?[o]:[],[o]),onItemOpen:c,onItemClose:ae.useCallback(()=>r&&c(""),[r,c]),children:u.jsx(G7,{scope:e.__scopeAccordion,collapsible:r,children:u.jsx(Y7,{...a,ref:t})})})}),_ie=ae.forwardRef((e,t)=>{const{value:n,defaultValue:i,onValueChange:s=()=>{},...r}=e,[a,o]=ti({prop:n,defaultProp:i??[],onChange:s,caller:ds}),c=ae.useCallback(h=>o((m=[])=>[...m,h]),[o]),d=ae.useCallback(h=>o((m=[])=>m.filter(g=>g!==h)),[o]);return u.jsx(W7,{scope:e.__scopeAccordion,value:a,onItemOpen:c,onItemClose:d,children:u.jsx(G7,{scope:e.__scopeAccordion,collapsible:!0,children:u.jsx(Y7,{...r,ref:t})})})}),[bie,V0]=B0(ds),Y7=ae.forwardRef((e,t)=>{const{__scopeAccordion:n,disabled:i,dir:s,orientation:r="vertical",...a}=e,o=ae.useRef(null),c=qe(o,t),d=gie(n),m=lu(s)==="ltr",g=pe(e.onKeyDown,v=>{var O;if(!mie.includes(v.key))return;const b=v.target,w=d().filter(I=>{var P;return!((P=I.ref.current)!=null&&P.disabled)}),M=w.findIndex(I=>I.ref.current===b),y=w.length;if(M===-1)return;v.preventDefault();let S=M;const T=0,N=y-1,k=()=>{S=M+1,S>N&&(S=T)},E=()=>{S=M-1,S<T&&(S=N)};switch(v.key){case"Home":S=T;break;case"End":S=N;break;case"ArrowRight":r==="horizontal"&&(m?k():E());break;case"ArrowDown":r==="vertical"&&k();break;case"ArrowLeft":r==="horizontal"&&(m?E():k());break;case"ArrowUp":r==="vertical"&&E();break}const D=S%y;(O=w[D].ref.current)==null||O.focus()});return u.jsx(bie,{scope:n,disabled:i,direction:s,orientation:r,children:u.jsx(K2.Slot,{scope:n,children:u.jsx(Te.div,{...a,"data-orientation":r,ref:c,onKeyDown:i?void 0:g})})})}),hp="AccordionItem",[wie,J2]=B0(hp),q7=ae.forwardRef((e,t)=>{const{__scopeAccordion:n,value:i,...s}=e,r=V0(hp,n),a=vie(hp,n),o=Q2(n),c=ns(),d=i&&a.value.includes(i)||!1,h=r.disabled||e.disabled;return u.jsx(wie,{scope:n,open:d,disabled:h,triggerId:c,children:u.jsx(die,{"data-orientation":r.orientation,"data-state":tD(d),...o,...s,ref:t,disabled:h,open:d,onOpenChange:m=>{m?a.onItemOpen(i):a.onItemClose(i)}})})});q7.displayName=hp;var X7="AccordionHeader",K7=ae.forwardRef((e,t)=>{const{__scopeAccordion:n,...i}=e,s=V0(ds,n),r=J2(X7,n);return u.jsx(Te.h3,{"data-orientation":s.orientation,"data-state":tD(r.open),"data-disabled":r.disabled?"":void 0,...i,ref:t})});K7.displayName=X7;var Yy="AccordionTrigger",Q7=ae.forwardRef((e,t)=>{const{__scopeAccordion:n,...i}=e,s=V0(ds,n),r=J2(Yy,n),a=xie(Yy,n),o=Q2(n);return u.jsx(K2.ItemSlot,{scope:n,children:u.jsx(fie,{"aria-disabled":r.open&&!a.collapsible||void 0,"data-orientation":s.orientation,id:r.triggerId,...o,...i,ref:t})})});Q7.displayName=Yy;var J7="AccordionContent",eD=ae.forwardRef((e,t)=>{const{__scopeAccordion:n,...i}=e,s=V0(ds,n),r=J2(J7,n),a=Q2(n);return u.jsx(hie,{role:"region","aria-labelledby":r.triggerId,"data-orientation":s.orientation,...a,...i,ref:t,style:{"--radix-accordion-content-height":"var(--radix-collapsible-content-height)","--radix-accordion-content-width":"var(--radix-collapsible-content-width)",...e.style}})});eD.displayName=J7;function tD(e){return e?"open":"closed"}var Sie=$7,Cie=q7,Mie=K7,Tie=Q7,jie=eD;function Nie({...e}){return u.jsx(Sie,{"data-slot":"accordion",...e})}function kie({className:e,...t}){return u.jsx(Cie,{"data-slot":"accordion-item",className:ye("border-b last:border-b-0",e),...t})}function Eie({className:e,children:t,...n}){return u.jsx(Mie,{className:"flex",children:u.jsxs(Tie,{"data-slot":"accordion-trigger",className:ye("focus-visible:border-ring focus-visible:ring-ring/50 flex flex-1 items-start justify-between gap-4 rounded-md py-4 text-left text-sm font-medium transition-all outline-none hover:underline focus-visible:ring-[3px] disabled:pointer-events-none disabled:opacity-50 [&[data-state=open]>svg]:rotate-180",e),...n,children:[t,u.jsx(bX,{className:"text-muted-foreground pointer-events-none size-4 shrink-0 translate-y-0.5 transition-transform duration-200"})]})})}function Aie({className:e,children:t,...n}){return u.jsx(jie,{"data-slot":"accordion-content",className:"data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down overflow-hidden text-sm",...n,children:u.jsx("div",{className:ye("pt-0 pb-4",e),children:t})})}function P5(e){if(!e)return 0;const n=(Date.now()-new Date(e).getTime())/(1e3*60*60*24);return Math.min(100,Math.floor(n*he.zones.respect.gain))}let pm={};const Oie=()=>{var G,ie,se,Le,je,be,we,Tt;const e=x.useContext(Un),t=x.useRef(null),n={gta5:{image:[16384,24576],topLeft:[-4140,8400],bottomRight:[4860,-5100],tileServer:"https://assets.loaf-scripts.com/map-tiles/gtav/main/{layer}/{z}/{x}/{y}.jpg"}};L.CRS.Game=L.extend({},L.CRS.Simple,{projection:L.Projection.LonLat,wrapLng:[n.gta5.topLeft[0],n.gta5.bottomRight[0]],wrapLat:[n.gta5.bottomRight[1],n.gta5.topLeft[1]],initialize:function(F){const re=F.image,le=F.topLeft,ve=F.bottomRight,Ae=256,Re=Math.ceil(Math.log(Math.max(re[0],re[1])/Ae)/Math.log(2)),at=ve[0]-le[0],At=ve[1]-le[1];if(at===0||At===0){console.error("Invalid map config: gameWidth or gameHeight_CRS is zero.",F),this.transformation=new L.Transformation(1,0,-1,0),this.options={tileSize:Ae},this._maxZoom=0;return}const xn=Math.pow(2,Re),Je=re[0],fe=re[1],Oe=Je/(at*xn),Xe=fe/(At*xn),tt=-Oe*le[0],q=-Xe*le[1];this.transformation=new L.Transformation(Oe,tt,Xe,q),this.options={tileSize:Ae},this._mapConfig=F,this._maxZoom=Re},scale:function(F){return Math.pow(2,F)},zoom:function(F){return Math.log(F)/Math.LN2},distance:function(F,re){var le=re.lng-F.lng,ve=re.lat-F.lat;return Math.sqrt(le*le+ve*ve)},getProjectedBounds:function(F){if(!this._mapConfig)return null;if(!this._projectedBounds){var re=this.projection,le=re.project(L.latLng(this._mapConfig.topLeft[1],this._mapConfig.topLeft[0])),ve=re.project(L.latLng(this._mapConfig.bottomRight[1],this._mapConfig.bottomRight[0])),Ae=L.point(Math.min(le.x,ve.x),Math.min(le.y,ve.y)),Re=L.point(Math.max(le.x,ve.x),Math.max(le.y,ve.y));this._projectedBounds=new L.Bounds(Ae,Re)}return this._projectedBounds},infinite:!1}),L.CRS.game=function(F){const re=L.Util.create(L.CRS.Game);return re.initialize(F),re};const i=L.CRS.game(n.gta5),s=L.latLngBounds(L.latLng(n.gta5.bottomRight[1],n.gta5.topLeft[0]),L.latLng(n.gta5.topLeft[1],n.gta5.bottomRight[0])),r=7,a=7,o=L.tileLayer(n.gta5.tileServer,{minZoom:0,maxZoom:a,maxNativeZoom:r,noWrap:!0,bounds:s,tileSize:i.options.tileSize,layer:"render"}),c=L.tileLayer(n.gta5.tileServer,{minZoom:0,maxZoom:a,maxNativeZoom:r,noWrap:!0,bounds:s,tileSize:i.options.tileSize,layer:"game"}),d=L.tileLayer(n.gta5.tileServer,{minZoom:0,maxZoom:a,maxNativeZoom:r,noWrap:!0,bounds:s,tileSize:i.options.tileSize,layer:"print"}),[h,m]=x.useState([]),[g,v]=x.useState([]),[b,w]=x.useState(!1),[M,y]=x.useState({ownedZones:!0,safeHouses:!0,drugZones:!0,moneyLaundering:!0,drugSell:!0,recruit:!0,cash:!0,warehouse:!0}),[S,T]=x.useState({bodyguards:!1,graffiti:!1}),[N,k]=x.useState([]),[E,D]=x.useState(""),[O,I]=x.useState(null),[P,H]=x.useState(null),[V,J]=x.useState([]),[Q,U]=x.useState("#0d2b4f"),[R,$]=x.useState(!1),B=async()=>{let[F,re,le,ve,Ae,Re]=await Promise.all([K("get_extensions"),K("get_all_zones"),K("get_captured_zones"),K("get_connected_zones"),K("get_drug_captures"),K("get_zones_activity",{gangId:e.gangId})]);T(F||{bodyguards:!1,graffiti:!1});let at=(le||[]).filter(Je=>e.gangId===Je.controlling_gang_id).map(Je=>{const fe=(re||[]).find(Oe=>Oe.id===Je.zone_id);return{...Je,types:(fe==null?void 0:fe.types)||[]}});const At=(re||[]).map(Je=>{const fe=(le||[]).find(tt=>tt.zone_id===Je.id),Oe=(Ae||[]).filter(tt=>tt.zone_id===Je.id);let Xe={...Je,centroid:sp(Je.points),progressData:Oe,totalProgress:Oe.reduce((tt,q)=>tt+q.progress,0)};return fe&&(Xe={...Xe,gang_name:fe.gang_name,gang:fe.controlling_gang_id,color:fe.color},fe.logo&&he.showLogoOnMap&&!pm[fe.controlling_gang_id]&&(pm[fe.controlling_gang_id]=new ll.Icon({iconUrl:fe.logo,iconSize:[25,25]}))),Xe});let xn=(ve||[]).map(Je=>[At.findIndex(fe=>fe.id===Je.connected_id_1),At.findIndex(fe=>fe.id===Je.connected_id_2)]).filter(Je=>Je[0]!==-1&&Je[1]!==-1);if(he.connectedZones.enable&&he.connectedZones.onlyShowConnectedZones){const Je=new Set;at.forEach(fe=>Je.add(fe.zone_id)),xn.forEach(fe=>{const Oe=At[fe[0]],Xe=At[fe[1]];Oe&&at.some(tt=>tt.zone_id===Oe.id)&&Je.add(Xe==null?void 0:Xe.id),Xe&&at.some(tt=>tt.zone_id===Xe.id)&&Je.add(Oe==null?void 0:Oe.id)}),At.forEach(fe=>{fe.connected=at.some(Oe=>Oe.zone_id===fe.id)||xn.some(Oe=>{var Xe,tt;return((Xe=At[Oe[0]])==null?void 0:Xe.id)===fe.id&&at.some(q=>{var xe;return q.zone_id===((xe=At[Oe[1]])==null?void 0:xe.id)})||((tt=At[Oe[1]])==null?void 0:tt.id)===fe.id&&at.some(q=>{var xe;return q.zone_id===((xe=At[Oe[0]])==null?void 0:xe.id)})})})}m(At),J(xn),v(at),k(Re)};ss("state:zones",F=>{(F==null?void 0:F.gangId)===e.gangId&&$(!R)}),x.useEffect(()=>{B()},[e.gangId,R]),x.useEffect(()=>{const F=localStorage.getItem("mapStyle")||"satelite";if(t.current&&(F==="satelite"?(t.current.addLayer(o),U("#0d2b4f")):F==="game"?(t.current.addLayer(c),U("#384950")):F==="atlas"&&(t.current.addLayer(d),U("#4eb1d0")),he.ui.showCayoPericoMap)){const re=[[-4193.72,3756.95],[-6121.93,5681.2]];L.imageOverlay("./cayo-perico-island.png",re).addTo(t.current)}},[t.current]),x.useEffect(()=>{(async()=>{var re;if(O){const le=(re=h.find(Ae=>Ae.id===O))==null?void 0:re.gang;if(!le){H(!0);return}const ve=await K("in_war_with",{gang:le});H(ve)}else H(null)})()},[O,h]);const W=({id:F,labelKey:re,checked:le,onCheckedChange:ve})=>u.jsxs("div",{className:"flex items-center space-x-2",children:[u.jsx(C0,{id:F,checked:le,onCheckedChange:ve}),u.jsx(g0,{htmlFor:F,className:"text-xs font-normal cursor-pointer",children:C(re)})]});return u.jsxs("div",{className:"flex h-full w-full bg-background text-foreground overflow-hidden",children:[" ",O&&P!==null&&u.jsx(Is,{open:!!O,onOpenChange:()=>I(null),children:u.jsxs(Bs,{children:[u.jsxs(Ko,{children:[u.jsx(Hs,{children:C(P?"menu.attack_zone":"menu.not_in_war")}),u.jsx(Fs,{children:C(P?"menu.attack_zone_desc":"menu.not_in_war_desc")})]}),u.jsxs(Vs,{children:[u.jsx(Us,{onClick:()=>I(null),children:C(P?"menu.cancel":"menu.okay")}),P&&u.jsx(Va,{className:"bg-red-500 hover:bg-red-600",onClick:()=>{K("attack_zone",{zoneId:O}),I(null)},children:C("menu.attack")})]})]})}),u.jsxs("div",{className:ye("relative w-full h-full flex items-center z-10"),style:{backgroundColor:Q},children:[u.jsxs(RA,{crs:i,minZoom:0,maxZoom:a,preferCanvas:!0,center:[0,0],zoom:2,bounds:s,className:ye("w-full h-full outline-none border-none bg-transparent"),attributionControl:!1,zoomControl:!1,ref:t,boxZoom:!1,children:[he.connectedZones.enable&&he.connectedZones.onlyShowConnectedZones&&V.map((F,re)=>{const le=h[F[0]],ve=h[F[1]];if(!le||!ve||!le.centroid||!ve.centroid||!ve.connected||!le.connected)return null;let Ae=le.color||ve.color||"white";(e.gangId===ve.gang||e.gangId===le.gang)&&(Ae=li("gang_color")||"#00a6ff");const Re=rp([le.centroid,ve.centroid],le.points),at=rp([le.centroid,ve.centroid],ve.points);return u.jsx(LA,{pathOptions:{color:Ae,opacity:.85,weight:3},positions:[Re||le.centroid,at||ve.centroid]},`conn-${re}`)}),h.map(F=>{var Ae,Re,at,At,xn,Je;let re=!1;if(F.types){for(const fe of F.types)if(fe==="safeHouse"&&M.safeHouses||fe==="drugZone"&&M.drugZones||fe==="moneyLaundering"&&M.moneyLaundering||fe==="drugSell"&&M.drugSell||fe==="recruiting"&&M.recruit&&S.bodyguards||fe==="cash"&&M.cash||fe==="warehouse"&&M.warehouse){re=!0;break}}if(F.gang===e.gangId&&M.ownedZones&&(re=!0),E&&(F.id.toString().includes(E)||(Ae=F.name)!=null&&Ae.toLowerCase().includes(E.toLowerCase()))?re=!0:E&&!F.id.toString().includes(E)&&!((Re=F.name)!=null&&Re.toLowerCase().includes(E.toLowerCase()))&&(re=!1),he.connectedZones.enable&&he.connectedZones.onlyShowConnectedZones&&!F.connected&&(re=!1),!re)return null;const le=F.color||(F.gang===e.gangId?li("gang_color")||"blue":"white"),ve=((At=(at=he==null?void 0:he.capturing)==null?void 0:at.captureProgressTypes)==null?void 0:At.filter(fe=>{var Oe;return(Oe=F==null?void 0:F.progressTypes)==null?void 0:Oe.includes(fe.name)}))||[];return u.jsxs(ae.Fragment,{children:[pm[F==null?void 0:F.gang]&&u.jsx(cJ,{position:F.centroid,icon:pm[F==null?void 0:F.gang]}),u.jsx(ky,{pathOptions:{color:le,fillColor:le,fillOpacity:.4,weight:3},positions:F.points,children:u.jsxs(zA,{className:"bg-card border-border !rounded-lg  text-xs !p-0 !m-0 [&>.leaflet-popup-content-wrapper]:!p-2 [&>.leaflet-popup-content-wrapper]:!bg-card [&>.leaflet-popup-content-wrapper]:!border-border [&>.leaflet-popup-tip]:!bg-card [&>.leaflet-popup-tip]:!shadow-none",children:[" ",u.jsxs("div",{className:"flex flex-col gap-2 max-w-sm text-card-foreground",children:[" ",u.jsx("h4",{className:"font-bold text-lg",children:F.name?`${F.name} #${F.id}`:`${C("menu.zone")} #${F.id}`}),(F.gang_name&&F.progressTypes&&F.progressTypes.length>0&&!F.zoneAttack||!F.gang_name&&F.progressTypes&&F.progressTypes.length>0)&&u.jsxs("div",{className:"flex flex-col",children:[u.jsxs("p",{className:"text-xs font-medium flex items-center gap-1",children:[C("menu.controlling_dist"),u.jsx(wc,{skipDelayDuration:!0,delayDuration:0,children:u.jsxs(Sc,{children:[u.jsx(Cc,{children:u.jsx(yy,{className:"text-lg cursor-pointer"})}),u.jsx(Bo,{className:"max-w-sm",children:ve.map(fe=>fe.description).join(" ")})]})})]}),u.jsx("div",{className:"relative flex w-full h-7 rounded-lg border border-border overflow-hidden",children:F.progressData.map((fe,Oe)=>{var tt,q;const Xe=F.totalProgress>F.minProgress?fe.progress/F.totalProgress*100:fe.progress/(F.minProgress||1)*100;return u.jsx(wc,{skipDelayDuration:!0,delayDuration:0,className:"h-full w-full",children:u.jsxs(Sc,{className:"h-full w-full",children:[u.jsx(Cc,{className:"w-full",style:{backgroundColor:((tt=fe==null?void 0:fe.gang)==null?void 0:tt.color)||li("gang_color"),width:`${Math.max(0,Math.min(100,Xe))}%`},children:u.jsx("div",{className:"h-full w-full",children:u.jsx("span",{className:"w-full h-full"})},Oe)}),u.jsxs(Bo,{children:[(q=fe==null?void 0:fe.gang)==null?void 0:q.name," - ",Math.floor(Xe),"%"]})]})},Oe)})})]}),u.jsx("div",{className:"text-xs text-muted-foreground",children:F.gang_name?C("menu.zone_controlling",[["gangName",F.gang_name]]):C("menu.noone_controlling")}),F.capture&&u.jsxs("div",{className:"text-xs",children:[u.jsxs("span",{className:"flex items-center gap-1",children:[u.jsx(e5,{className:"text-lg"})," ",C("menu.respect")]}),u.jsx("p",{className:"text-muted-foreground text-xs",children:C("menu.current_respect",[["respect",P5((xn=g.find(fe=>fe.zone_id===F.id))==null?void 0:xn.captured)]])})]}),(Je=F.types)==null?void 0:Je.map(fe=>{let Oe,Xe,tt;return fe==="safeHouse"?(Oe=_C,Xe=C("menu.safe_house"),tt=C("menu.total_amount_recruits",[["max",F.maxRecruits]])):fe==="drugZone"?(Oe=JC,Xe=C("menu.drug_plantation"),tt=C("menu.total_amount_weed_plants",[["max",F.maxPlants]])):fe==="moneyLaundering"?(Oe=um,Xe=C("menu.money_laundering")):fe==="drugSell"?(Oe=KC,Xe=C("menu.drug_dealing")):fe==="recruiting"&&S.bodyguards?(Oe=QC,Xe=C("menu.recruiting"),tt=C("menu.total_amount_recruits",[["max",F.maxRecruits]])):fe==="cash"?(Oe=um,Xe=C("menu.cash_zone"),tt=C("manage_zones.cash_data_desc",[["max",F.maxCash],["min",F.minCash],["currency",C("currency")],["currency",C("currency")]])):fe==="warehouse"?(Oe=dJ,Xe=C("menu.warehouse"),tt=C("menu.warehouse_desc")):fe!=="capture"&&(Oe=QG,Xe=C("menu.unknown_zone_type")),!Oe||fe==="recruiting"&&!S.bodyguards?null:u.jsxs("div",{className:"text-sm space-y-0.5",children:[u.jsxs("span",{className:"flex items-center gap-1",children:[u.jsx(Oe,{className:"text-lg"})," ",Xe]}),tt&&u.jsx("p",{className:"text-muted-foreground text-xs ",children:tt})]},fe)}),((F==null?void 0:F.zoneAttack)||F.gangMenu)&&u.jsx("div",{className:"flex w-full items-center justify-center",children:u.jsxs(Is,{children:[u.jsx(np,{asChild:!0,children:u.jsxs(ne,{variant:"destructive",className:"w-full flex items-center justify-center gap-2",children:[F.gangMenu?C("menu.raid"):C("menu.capture"),u.jsx(wc,{skipDelayDuration:!0,delayDuration:0,children:u.jsxs(Sc,{className:"h-full mb-1",children:[u.jsx(Cc,{children:u.jsx(yy,{className:"h-full w-full cursor-pointer"})}),u.jsx(Bo,{className:"max-w-sm",children:F.gangMenu?C("menu.raid_desc"):C("menu.capture_desc")})]})})]})}),u.jsxs(Bs,{children:[u.jsxs(Ko,{children:[u.jsx(Hs,{children:C("menu.attack_zone")}),u.jsx(Fs,{children:C("menu.attack_zone_desc",[["zoneId",F.id]])})]}),u.jsxs(Vs,{children:[u.jsx(Us,{onClick:()=>I(null),children:C("menu.cancel")}),u.jsx(Va,{asChild:!0,onClick:()=>{K("attack_zone",{zoneId:F.id})},children:u.jsx(ne,{variant:"destructive",children:C("menu.attack")})})]})]})]})})]})]})})]},F.id)})]}),u.jsxs(M2,{open:b,onOpenChange:w,children:[u.jsx(T2,{asChild:!0,children:u.jsx(ne,{variant:"outline",size:"icon",className:"absolute top-8 right-4 z-[1000] bg-card hover:bg-muted opacity-100",children:u.jsx(xk,{className:"h-5 w-5"})})}),u.jsxs(j2,{className:"w-64 p-0 mr-2 mt-1 z-[1000]",align:"end",children:[" ",u.jsxs("div",{className:"p-3 space-y-3",children:[u.jsx("h4",{className:"font-medium leading-none",children:C("menu.find_zone")}),u.jsx(wt,{type:"text",placeholder:C("menu.search_zone"),value:E,onChange:F=>D(F.target.value),className:"h-8 text-xs"})]}),u.jsx("hr",{className:"border-border"}),u.jsxs("div",{className:"p-3 space-y-2",children:[u.jsx("h4",{className:"font-medium leading-none mb-1",children:C("menu.map_types")}),u.jsx(_0,{defaultValue:localStorage.getItem("mapStyle")||"satelite",className:"w-full",children:u.jsxs(qf,{className:"grid w-full h-fit grid-cols-2",children:[u.jsx(ci,{value:"atlas",className:"text-xs",onClick:()=>{t.current.eachLayer(function(F){F.options.layer&&t.current.removeLayer(F)}),t.current.addLayer(d),U("#4eb1d0"),localStorage.setItem("mapStyle","atlas")},children:C("menu.atlas")}),u.jsx(ci,{value:"game",className:"text-xs",onClick:()=>{t.current.eachLayer(function(F){F.options.layer&&t.current.removeLayer(F)}),t.current.addLayer(c),U("#384950"),localStorage.setItem("mapStyle","game")},children:C("menu.game_map")}),u.jsx(ci,{value:"satelite",className:"text-xs",onClick:()=>{t.current.eachLayer(function(F){F.options.layer&&t.current.removeLayer(F)}),t.current.addLayer(o),U("#0d2b4f"),localStorage.setItem("mapStyle","satelite")},children:C("menu.satellite")})]})})]}),u.jsx("hr",{className:"border-border"}),u.jsxs("div",{className:"p-3 space-y-2",children:[u.jsx("h4",{className:"font-medium leading-none mb-1",children:C("menu.filters")}),u.jsx(W,{id:"filterOwned",labelKey:"menu.owned_zones",checked:M.ownedZones,onCheckedChange:F=>y(re=>({...re,ownedZones:F}))}),u.jsx(W,{id:"filterSafeHouses",labelKey:"menu.safe_houses",checked:M.safeHouses,onCheckedChange:F=>y(re=>({...re,safeHouses:F}))}),u.jsx(W,{id:"filterDrugZones",labelKey:"menu.drug_zones",checked:M.drugZones,onCheckedChange:F=>y(re=>({...re,drugZones:F}))}),u.jsx(W,{id:"filterMoneyLaundering",labelKey:"menu.money_laundering_zone",checked:M.moneyLaundering,onCheckedChange:F=>y(re=>({...re,moneyLaundering:F}))}),u.jsx(W,{id:"filterDrugSell",labelKey:"menu.drug_sell_zone",checked:M.drugSell,onCheckedChange:F=>y(re=>({...re,drugSell:F}))}),u.jsx(W,{id:"filterCash",labelKey:"menu.cash_zone",checked:M.cash,onCheckedChange:F=>y(re=>({...re,cash:F}))}),u.jsx(W,{id:"filterWarehouse",labelKey:"menu.warehouse",checked:M.warehouse,onCheckedChange:F=>y(re=>({...re,warehouse:F}))}),S.bodyguards&&u.jsx(W,{id:"filterRecruit",labelKey:"menu.recruit_zone",checked:M.recruit,onCheckedChange:F=>y(re=>({...re,recruit:F}))})]})]})]})]}),u.jsx(oa,{children:u.jsxs("div",{className:"w-80 h-full bg-card border-l border-border flex flex-col p-3 space-y-3 overflow-hidden",children:[u.jsx("h3",{className:"text-lg font-semibold  shrink-0",children:C("menu.owned_zones")}),u.jsx(rs,{className:"flex-grow h-48",children:g.length>0?u.jsx(u.Fragment,{children:u.jsx(Nie,{type:"single",collapsible:!0,className:"w-full flex flex-col gap-1 border-none",children:g.map(F=>{var re;return u.jsxs(kie,{value:`owned-${F.zone_id}`,className:"border-none bg-secondary/25 rounded-md",children:[u.jsx(Eie,{className:"text-xs hover:no-underline p-2 justify-between border-none bg-muted/30 hover:bg-muted/60 rounded data-[state=open]:bg-muted/60",children:u.jsxs("span",{className:"flex items-center gap-1",children:[C("menu.zone_id"),u.jsxs("span",{className:"font-semibold text-primary",children:["#",F.zone_id]})]})}),u.jsxs(Aie,{className:"p-2 text-xs space-y-1.5",children:[" ",F.captured&&u.jsx("p",{className:"text-[0.7rem] text-muted-foreground",children:C("menu.time_controlling",[["time",ol(F.captured)]])}),F.captured&&u.jsxs("div",{className:"p-1.5 rounded border border-border space-y-0.5",children:[" ",u.jsxs("span",{className:"flex items-center gap-1 text-xs",children:[u.jsx(e5,{})," ",C("menu.respect")]}),u.jsx("p",{className:"text-[0.7rem] text-muted-foreground whitespace-pre-line",children:C("menu.respect_desc",[["respect",P5(F.captured)]])})]}),(re=F.types)==null?void 0:re.map(le=>{let ve,Ae,Re;return le==="safeHouse"?(ve=_C,Ae=C("menu.safe_house"),Re=C("menu.safe_house_desc")):le==="drugZone"?(ve=JC,Ae=C("menu.drug_plantation"),Re=C("menu.drugZone_desc")):le==="moneyLaundering"?(ve=um,Ae=C("menu.money_laundering"),Re=C("menu.moneyLaundering_desc")):le==="drugSell"?(ve=KC,Ae=C("menu.drug_dealing"),Re=C("menu.drugSell_desc")):le==="recruiting"&&S.bodyguards?(ve=QC,Ae=C("menu.recruiting"),Re=C("menu.recruiting_desc")):le==="cash"&&(ve=um,Ae=C("menu.cash_zone"),Re=C("menu.cash_zone_desc",[["max",F.maxCash],["min",F.minCash],["currency",C("currency")],["currency",C("currency")]])),ve?u.jsxs("div",{className:"p-1.5 rounded border border-border space-y-0.5",children:[u.jsxs("span",{className:"flex items-center gap-1 text-xs",children:[u.jsx(ve,{})," ",Ae]}),u.jsx("p",{className:"text-[0.7rem] text-muted-foreground",children:Re})]},le):null})]})]},`owned-${F.zone_id}`)})})}):u.jsx("p",{className:"text-xs text-muted-foreground text-center py-4",children:C("menu.no_owned_zones")})}),u.jsx("h3",{className:"text-lg font-semibold shrink-0 pt-2 border-t border-border",children:C("menu.zone_activity")}),u.jsx(rs,{className:"flex-grow h-48",children:u.jsxs("div",{className:"flex flex-col gap-1",children:[((G=N==null?void 0:N.defendingRaids)==null?void 0:G.length)===0&&((ie=N==null?void 0:N.defendingZones)==null?void 0:ie.length)===0&&((se=N==null?void 0:N.attackingRaids)==null?void 0:se.length)===0&&((Le=N==null?void 0:N.attackingZones)==null?void 0:Le.length)===0&&u.jsxs("p",{className:"text-xs text-muted-foreground",children:[C("menu.no_zone_activity")," "]}),(je=N==null?void 0:N.defendingRaids)==null?void 0:je.map((F,re)=>{const le=F.activation_time+he.attacks.preperationTime*3600*1e3,ve=le>new Date().getTime(),Ae=le+he.attacks.durationTime*60*1e3,Re=Ae>new Date().getTime()&&!ve;return!Re&&!ve?null:u.jsxs("div",{className:"w-full p-2 rounded border border-border bg-muted/30 text-xs flex flex-col gap-1",children:[u.jsxs("h3",{className:"font-semibold text-xs flex items-center gap-1",children:[C("menu.zone_raid_defense"),u.jsxs("span",{className:"text-blue-400 text-xs hover:underline cursor-pointer",onClick:()=>{t.current.flyTo(h.find(at=>at.id==F.zone_id).centroid,7)},children:["#",F.zone_id]})]}),ve&&u.jsx("span",{className:"text-xs text-muted-foreground",children:C("menu.raid_starts_in",[["time",xs(le)]])}),Re&&u.jsx("span",{className:"text-xs text-red-500",children:C("menu.raid_active_ends_in",[["time",xs(Ae)]])})]},`raid-${F.zone_id}-${re}`)}),(be=N==null?void 0:N.defendingZones)==null?void 0:be.map((F,re)=>{const le=F.activation_time+he.attacks.preperationTime*3600*1e3,ve=le>new Date().getTime(),Ae=le+he.attacks.durationTime*60*1e3,Re=Ae>new Date().getTime()&&!ve;return!Re&&!ve?null:u.jsxs("div",{className:"w-full p-2 rounded border border-border bg-muted/30 text-xs flex flex-col gap-1",children:[u.jsxs("h3",{className:"font-semibold text-xs flex items-center gap-1",children:[C("menu.zone_defense"),u.jsxs("span",{className:"text-blue-400 hover:underline cursor-pointer",onClick:()=>{t.current.flyTo(h.find(at=>at.id==F.zone_id).centroid,7)},children:["#",F.zone_id]})]}),ve&&u.jsx("span",{className:"text-xs text-muted-foreground",children:C("menu.defend_starts_in",[["time",xs(le)]])}),Re&&u.jsx("span",{className:"text-xs text-red-500",children:C("menu.defend_active_ends_in",[["time",xs(Ae)]])})]},`defending-${F.zone_id}-${re}`)}),(we=N==null?void 0:N.attackingRaids)==null?void 0:we.map((F,re)=>{const le=F.activation_time+he.attacks.preperationTime*3600*1e3,ve=le>new Date().getTime(),Ae=le+he.attacks.durationTime*60*1e3,Re=Ae>new Date().getTime()&&!ve;return!Re&&!ve?null:u.jsxs("div",{className:"w-full p-2 rounded border border-border bg-muted/30 text-xs flex flex-col gap-1",children:[u.jsxs("h3",{className:"font-semibold text-xs flex items-center gap-1",children:[C("menu.zone_raid_attack"),u.jsxs("span",{className:"text-blue-400 hover:underline cursor-pointer",onClick:()=>{t.current.flyTo(h.find(at=>at.id==F.zone_id).centroid,7)},children:["#",F.zone_id]})]}),ve&&u.jsx("span",{className:"text-xs text-muted-foreground",children:C("menu.raid_starts_in",[["time",xs(le)]])}),Re&&u.jsx("span",{className:"text-xs text-green-400",children:C("menu.raid_active_ends_in",[["time",xs(Ae)]])})]},`attacking-raid-${F.zone_id}-${re}`)}),(Tt=N==null?void 0:N.attackingZones)==null?void 0:Tt.map((F,re)=>{const le=F.activation_time+he.attacks.preperationTime*3600*1e3,ve=le>new Date().getTime(),Ae=le+he.attacks.durationTime*60*1e3,Re=Ae>new Date().getTime()&&!ve;return!Re&&!ve?null:u.jsxs("div",{className:"w-full p-2 rounded border border-border bg-muted/30 text-xs flex flex-col gap-1",children:[u.jsxs("h3",{className:"font-semibold text-xs flex items-center gap-1",children:[C("menu.zone_attack"),u.jsxs("span",{className:"text-blue-400 hover:underline cursor-pointer",onClick:()=>{t.current.flyTo(h.find(at=>at.id==F.zone_id).centroid,7)},children:["#",F.zone_id]})]}),ve&&u.jsx("span",{className:"text-xs text-muted-foreground",children:C("menu.attack_starts_in",[["time",xs(le)]])}),Re&&u.jsx("span",{className:"text-xs text-green-400",children:C("menu.attack_active_ends_in",[["time",xs(Ae)]])})]},`attacking-${F.zone_id}-${re}`)})]})})]})})]})};function ca(e,t){return Array.isArray(e)?e.includes(t):e}var Die=e=>{let t=e.getBoundingClientRect();return{width:t.width,height:t.height}};function H0(){let e=x.useRef(null),[t,n]=x.useState({width:1,height:1});x.useLayoutEffect(()=>{let s=()=>{e.current&&n(Die(e.current))},r=([{contentBoxSize:o}])=>{n({height:o[0].blockSize,width:o[0].inlineSize})};window.addEventListener("resize",s,!1);let a=new ResizeObserver(r);return e.current&&a.observe(e.current),()=>{window.removeEventListener("resize",s,!1),a.disconnect()}},[]);let i=x.useCallback(()=>{var c;let{left:s=1,right:r=1,top:a=1,bottom:o=1}=((c=e.current)==null?void 0:c.getBoundingClientRect())??{};return{left:s,right:r,top:a,bottom:o}},[]);return[e,t,i]}function mp(e,t,n){return e<t?t:e>n?n:e}var Pie=class{convert(e,t){let n=this.toHex("#000000"),i=this.hex2rgb(n),s=this.rgb2hsv(i);if(e==="hex"){let r=t;n=this.toHex(r),i=this.hex2rgb(n),n.startsWith("rgba")&&(i=this.toRgb(n),n=this.rgb2hex(i)),s=this.rgb2hsv(i)}else e==="rgb"?(i=t,n=this.rgb2hex(i),s=this.rgb2hsv(i)):e==="hsv"&&(s=t,i=this.hsv2rgb(s),n=this.rgb2hex(i));return{hex:n,rgb:i,hsv:s}}toHex(e){if(e.startsWith("#")){if(e.length===4||e.length===5)return e=e.split("").map((t,n)=>n?n<4?t+t:t==="f"?void 0:t+t:"#").join(""),e;if(e.length===7)return e;if(e.length===9)return e.endsWith("ff")?e.slice(0,7):e}else{let t=document.createElement("canvas").getContext("2d");if(!t)throw new Error("2d context not supported or canvas already initialized");return t.fillStyle=e,t.fillStyle}return"#000000"}toRgb(e){let t=e.match(/\d+(\.\d+)?/gu)??[],[n,i,s,r]=Array.from({length:4}).map((a,o)=>mp(+(t[o]??(o<3?0:1)),0,o<3?255:1));return{r:n,g:i,b:s,a:r}}toHsv(e){let t=e.match(/\d+(\.\d+)?/gu)??[],[n,i,s,r]=Array.from({length:4}).map((a,o)=>mp(+(t[o]??(o<3?0:1)),0,o?o<3?100:1:360));return{h:n,s:i,v:s,a:r}}hex2rgb(e){e=e.slice(1);let[t,n,i,s]=Array.from({length:4}).map((r,a)=>parseInt(e.slice(a*2,a*2+2),16));return s=Number.isNaN(s)?1:s/255,{r:t,g:n,b:i,a:s}}rgb2hsv({r:e,g:t,b:n,a:i}){e/=255,t/=255,n/=255;let s=Math.max(e,t,n),r=s-Math.min(e,t,n),a=r?(s===e?(t-n)/r+(t<n?6:0):s===t?2+(n-e)/r:4+(e-t)/r)*60:0,o=s?r/s*100:0,c=s*100;return{h:a,s:o,v:c,a:i}}hsv2rgb({h:e,s:t,v:n,a:i}){t/=100,n/=100;let s=~~(e/60),r=e/60-s,a=n*(1-t),o=n*(1-t*r),c=n*(1-t*(1-r)),d=s%6,h=[n,o,a,a,c,n][d]*255,m=[c,n,n,o,a,a][d]*255,g=[a,a,c,n,n,o][d]*255;return{r:h,g:m,b:g,a:i}}rgb2hex({r:e,g:t,b:n,a:i}){let[s,r,a,o]=[e,t,n,i].map((c,d)=>Math.round(d<3?c:c*255).toString(16).padStart(2,"0"));return["#",s,r,a,o==="ff"?void 0:o].join("")}},Ln=new Pie,ew=x.memo(({onCoordinateChange:e,children:t})=>{let[n,{width:i,height:s},r]=H0(),a=x.useCallback((c,d=!1)=>{let{left:h,top:m}=r(),g=mp(c.clientX-h,0,i),v=mp(c.clientY-m,0,s);e(d,g,v)},[i,s,r,e]),o=x.useCallback(c=>{if(c.button!==0)return;a(c);let d=m=>{a(m)},h=m=>{a(m,!0),document.removeEventListener("pointermove",d,!1),document.removeEventListener("pointerup",h,!1)};document.addEventListener("pointermove",d,!1),document.addEventListener("pointerup",h,!1)},[a]);return ae.createElement("div",{ref:n,className:"rcp-interactive",onPointerDown:o},t)}),Rie=x.memo(({color:e,onChange:t,onChangeComplete:n})=>{let[i,{width:s}]=H0(),r=x.useMemo(()=>({x:e.hsv.a*s}),[e.hsv.a,s]),a=x.useCallback((d,h)=>{let m=Ln.convert("hsv",{...e.hsv,a:h/s});t(m),d&&(n==null||n(m))},[e.hsv,s,t,n]),o=x.useMemo(()=>[e.rgb.r,e.rgb.g,e.rgb.b].join(" "),[e.rgb.r,e.rgb.g,e.rgb.b]),c=x.useMemo(()=>[o,e.rgb.a].join(" / "),[o,e.rgb.a]);return ae.createElement(ew,{onCoordinateChange:a},ae.createElement("div",{ref:i,style:{background:`linear-gradient(to right, rgb(${o} / 0), rgb(${o} / 1)) top left / auto auto,
                      conic-gradient(#666 0.25turn, #999 0.25turn 0.5turn, #666 0.5turn 0.75turn, #999 0.75turn) top left / 12px 12px
                      repeat`},className:"rcp-alpha"},ae.createElement("div",{style:{left:r.x,background:`linear-gradient(to right, rgb(${c}), rgb(${c})) top left / auto auto,
                        conic-gradient(#666 0.25turn, #999 0.25turn 0.5turn, #666 0.5turn 0.75turn, #999 0.75turn) ${-r.x-4}px 2px / 12px 12px
                        repeat`},className:"rcp-alpha-cursor"})))});function nD(e,t){return Math.round(e*10**t)/10**t}function R5({r:e,g:t,b:n,a:i}){let s=[Math.round(e),Math.round(t),Math.round(n)],r=nD(i,3);return r<1&&s.push(r),s.join(", ")}function L5({h:e,s:t,v:n,a:i}){let s=[`${Math.round(e)}°`,`${Math.round(t)}%`,`${Math.round(n)}%`],r=nD(i,3);return r<1&&s.push(r),s.join(", ")}var Lie=x.memo(({hideInput:e,color:t,onChange:n,onChangeComplete:i})=>{let[s,r]=x.useState({hex:{value:t.hex,inputted:!1},rgb:{value:R5(t.rgb),inputted:!1},hsv:{value:L5(t.hsv),inputted:!1}});x.useEffect(()=>{s.hex.inputted||r(d=>({...d,hex:{...d.hex,value:t.hex}}))},[s.hex.inputted,t.hex]),x.useEffect(()=>{s.rgb.inputted||r(d=>({...d,rgb:{...d.rgb,value:R5(t.rgb)}}))},[s.rgb.inputted,t.rgb]),x.useEffect(()=>{s.hsv.inputted||r(d=>({...d,hsv:{...d.hsv,value:L5(t.hsv)}}))},[s.hsv.inputted,t.hsv]);let a=x.useCallback(d=>h=>{let{value:m}=h.target;r(g=>({...g,[d]:{...g[d],value:m}})),n(d==="hsv"?Ln.convert("hsv",Ln.toHsv(m)):d==="rgb"?Ln.convert("rgb",Ln.toRgb(m)):Ln.convert("hex",m))},[n]),o=x.useCallback(d=>()=>{r(h=>({...h,[d]:{...h[d],inputted:!0}}))},[]),c=x.useCallback(d=>h=>{let{value:m}=h.target;r(g=>({...g,[d]:{...g[d],inputted:!1}})),i==null||i(d==="hsv"?Ln.convert("hsv",Ln.toHsv(m)):d==="rgb"?Ln.convert("rgb",Ln.toRgb(m)):Ln.convert("hex",m))},[i]);return ae.createElement("div",{className:"rcp-fields"},!ca(e,"hex")&&ae.createElement("div",{className:"rcp-fields-floor"},ae.createElement("div",{className:"rcp-field"},ae.createElement("input",{id:"hex",className:"rcp-field-input",value:s.hex.value,onChange:a("hex"),onFocus:o("hex"),onBlur:c("hex")}),ae.createElement("label",{htmlFor:"hex",className:"rcp-field-label"},"HEX"))),(!ca(e,"rgb")||!ca(e,"hsv"))&&ae.createElement("div",{className:"rcp-fields-floor"},!ca(e,"rgb")&&ae.createElement("div",{className:"rcp-field"},ae.createElement("input",{id:"rgb",className:"rcp-field-input",value:s.rgb.value,onChange:a("rgb"),onFocus:o("rgb"),onBlur:c("rgb")}),ae.createElement("label",{htmlFor:"rgb",className:"rcp-field-label"},"RGB")),!ca(e,"hsv")&&ae.createElement("div",{className:"rcp-field"},ae.createElement("input",{id:"hsv",className:"rcp-field-input",value:s.hsv.value,onChange:a("hsv"),onFocus:o("hsv"),onBlur:c("hsv")}),ae.createElement("label",{htmlFor:"hsv",className:"rcp-field-label"},"HSV"))))}),zie=x.memo(({color:e,onChange:t,onChangeComplete:n})=>{let[i,{width:s}]=H0(),r=x.useMemo(()=>({x:e.hsv.h/360*s}),[e.hsv.h,s]),a=x.useCallback((c,d)=>{let h=Ln.convert("hsv",{...e.hsv,h:d/s*360});t(h),c&&(n==null||n(h))},[e.hsv,s,t,n]),o=x.useMemo(()=>[e.hsv.h,"100%","50%"].join(" "),[e.hsv.h]);return ae.createElement(ew,{onCoordinateChange:a},ae.createElement("div",{ref:i,className:"rcp-hue"},ae.createElement("div",{style:{left:r.x,backgroundColor:`hsl(${o})`},className:"rcp-hue-cursor"})))}),Iie=x.memo(({height:e,color:t,onChange:n,onChangeComplete:i})=>{let[s,{width:r}]=H0(),a=x.useMemo(()=>{let h=t.hsv.s/100*r,m=(100-t.hsv.v)/100*e;return{x:h,y:m}},[t.hsv.s,t.hsv.v,r,e]),o=x.useCallback((h,m,g)=>{let v=Ln.convert("hsv",{...t.hsv,s:m/r*100,v:100-g/e*100});n(v),h&&(i==null||i(v))},[t.hsv,r,e,n,i]),c=x.useMemo(()=>[t.hsv.h,"100%","50%"].join(" "),[t.hsv.h]),d=x.useMemo(()=>[t.rgb.r,t.rgb.g,t.rgb.b].join(" "),[t.rgb.r,t.rgb.g,t.rgb.b]);return ae.createElement(ew,{onCoordinateChange:o},ae.createElement("div",{ref:s,style:{height:e,backgroundColor:`hsl(${c})`},className:"rcp-saturation"},ae.createElement("div",{style:{left:a.x,top:a.y,backgroundColor:`rgb(${d})`},className:"rcp-saturation-cursor"})))}),Bie=x.memo(({height:e=200,hideAlpha:t=!1,hideInput:n=!1,color:i,onChange:s,onChangeComplete:r})=>ae.createElement("div",{className:"rcp-root rcp"},ae.createElement(Iie,{height:e,color:i,onChange:s,onChangeComplete:r}),ae.createElement("div",{className:"rcp-body"},ae.createElement("section",{className:"rcp-section"},ae.createElement(zie,{color:i,onChange:s,onChangeComplete:r}),!t&&ae.createElement(Rie,{color:i,onChange:s,onChangeComplete:r})),(!ca(n,"hex")||!ca(n,"rgb")||!ca(n,"hsv"))&&ae.createElement("section",{className:"rcp-section"},ae.createElement(Lie,{hideInput:n,color:i,onChange:s,onChangeComplete:r})))));function Vie(e){let[t,n]=x.useState(Ln.convert("hex",e));return x.useEffect(()=>{n(Ln.convert("hex",e))},[e]),[t,n]}function Hie(e){let t=parseInt(e.slice(1),16),n=t>>16&255,i=t>>8&255,s=t&255;return{r:n,g:i,b:s}}function Fie(e){if(!/^#([0-9A-F]{3}){1,2}$/i.test(e))return console.log("Invalid color format"),!1;const{r:n,g:i,b:s}=Hie(e),r=(o,c,d)=>o>200&&c>200&&d>200,a=(o,c,d)=>o<50&&c<50&&d<50;return!(r(n,i,s)||a(n,i,s))}const iD=({handleNewColor:e})=>{const[t,n]=Vie("#89CFF0"),[i,s]=x.useState(!0),r=()=>{if(!Fie(t.hex)){s(!1);return}s(!0),e(t)};return u.jsxs("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/80",children:[" ",u.jsxs(St,{className:"bg-card text-card-foreground p-4 border border-border shadow-xl w-auto",children:[" ",u.jsx("h2",{className:"text-xl font-bold text-center mb-4",children:C("menu.change_gang_color")})," ",u.jsxs(de.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0,height:0},transition:{duration:.2},className:"flex flex-col gap-4 items-center justify-center",children:[u.jsx(Bie,{width:256,height:128,hideInput:["hsv"],hideAlpha:!0,color:t,onChange:n}),!i&&u.jsx("div",{className:"text-red-500 text-sm",children:C("menu.color_not_allowed")})," ",u.jsxs("div",{className:"flex flex-row gap-2 self-end w-full justify-end",children:[" ",u.jsxs(ne,{variant:"outline",onClick:()=>e(),children:[" ",C("menu.cancel")]}),u.jsxs(ne,{onClick:r,children:[" ",C("menu.save")]})]})]})]})]})},Uie=()=>{const e=x.useContext(Un),[t,n]=x.useState(!1),[i,s]=x.useState(!1),[r,a]=x.useState(""),[o,c]=x.useState(!1),[d,h]=x.useState(null),[m,g]=x.useState(""),v=async y=>{y&&y.hex&&await K("set_gang_color",{gangId:e.gangId,color:y.hex})&&Ag([{name:"gang_color",value:y.hex}]),n(!1)},b=()=>{r.trim()!==""&&K("set_gang_name",{gangId:e.gangId,name:r}),s(!1),a("")},w=()=>{d&&d.id&&K("set_gang_owner",{gangId:e.gangId,playerId:d.id}),c(!1),h(null)},M=y=>{K("start_change_password",{gangId:e.gangId,doorId:y})};return u.jsxs(u.Fragment,{children:[u.jsx(de.div,{className:"text-2xl font-semibold mb-6 mt-8 text-center",initial:{opacity:0},animate:{opacity:1},transition:{duration:.2},children:C("menu.settings")}),u.jsx(oa,{children:t&&u.jsx(iD,{handleNewColor:y=>{v(y)}})}),u.jsx(Mr,{open:i,onOpenChange:s,children:u.jsxs(Tr,{className:"w-fit",children:[u.jsxs(jr,{children:[u.jsx(Nr,{children:C("menu.change_name")}),u.jsx(ka,{children:C("menu.change_name_desc")})]}),u.jsx(wt,{placeholder:C("menu.new_name"),value:r,onChange:y=>a(y.target.value),className:"my-4"}),u.jsxs(Na,{children:[u.jsx(ne,{variant:"outline",onClick:()=>{s(!1),a("")},children:C("cancel")}),u.jsx(ne,{onClick:b,children:C("confirm")})]})]})}),o&&u.jsx(xf,{actionClicked:(y,S)=>{if(y==="cancel"){c(!1);return}h(S),w()}}),u.jsxs("div",{className:"flex flex-col items-center w-4/5 mx-auto space-y-4",children:[" ",he.ui.menuSettings.changeColor&&u.jsxs(ne,{variant:"outline",className:"w-full max-w-sm text-sm p-3",onClick:()=>n(!0),children:[" ",C("menu.change_gang_color")]}),he.ui.menuSettings.changeName&&u.jsx(ne,{variant:"outline",className:"w-full max-w-sm text-sm p-1",onClick:()=>s(!0),children:C("menu.change_gang_name")}),he.ui.menuSettings.transferOwnership&&u.jsx(ne,{variant:"outline",className:"w-full max-w-sm text-sm p-3",onClick:()=>c(!0),children:C("menu.transfer_ownership")}),u.jsx(ne,{variant:"outline",className:"w-full max-w-sm text-sm p-3",onClick:()=>M("warehouse"),children:C("menu.change_warehouse_password")}),u.jsx(ne,{variant:"outline",className:"w-full max-w-sm text-sm p-3",onClick:()=>M("weed_processing"),children:C("menu.change_weed_processing_password")}),u.jsx(ne,{variant:"outline",className:"w-full max-w-sm text-sm p-3",onClick:()=>M("money_laundering"),children:C("menu.change_money_laundering_password")}),u.jsxs(Mr,{children:[u.jsx(Sy,{asChild:!0,children:u.jsx(ne,{variant:"outline",className:"w-full max-w-sm text-sm p-3",children:C("menu.change_safe_password")})}),u.jsxs(Tr,{children:[u.jsxs(jr,{children:[u.jsx(Nr,{children:C("menu.change_safe_password")}),u.jsx(ka,{children:C("menu.change_safe_password_desc")})]}),u.jsx(wt,{onChange:y=>{!isNaN(y.target.value)&&y.target.value.length<=6&&g(y.target.value)},value:m,type:"password",placeholder:C("menu.new_password"),className:"my-4"}),u.jsxs(Na,{children:[u.jsx(mE,{asChild:!0,children:u.jsx(ne,{variant:"outline",children:C("cancel")})}),u.jsx(Sy,{asChild:!0,children:u.jsx(ne,{onClick:()=>{m.length===6&&(K("set_safe_password",{gangId:e.gangId,password:m}),g(""))},disabled:m.length!==6,children:C("confirm")})})]})]})]})]})]})};var tw="Progress",nw=100,[Zie,wae]=vn(tw),[$ie,Wie]=Zie(tw),sD=x.forwardRef((e,t)=>{const{__scopeProgress:n,value:i=null,max:s,getValueLabel:r=Gie,...a}=e;(s||s===0)&&!z5(s)&&console.error(Yie(`${s}`,"Progress"));const o=z5(s)?s:nw;i!==null&&!I5(i,o)&&console.error(qie(`${i}`,"Progress"));const c=I5(i,o)?i:null,d=gp(c)?r(c,o):void 0;return u.jsx($ie,{scope:n,value:c,max:o,children:u.jsx(Te.div,{"aria-valuemax":o,"aria-valuemin":0,"aria-valuenow":gp(c)?c:void 0,"aria-valuetext":d,role:"progressbar","data-state":oD(c,o),"data-value":c??void 0,"data-max":o,...a,ref:t})})});sD.displayName=tw;var rD="ProgressIndicator",aD=x.forwardRef((e,t)=>{const{__scopeProgress:n,...i}=e,s=Wie(rD,n);return u.jsx(Te.div,{"data-state":oD(s.value,s.max),"data-value":s.value??void 0,"data-max":s.max,...i,ref:t})});aD.displayName=rD;function Gie(e,t){return`${Math.round(e/t*100)}%`}function oD(e,t){return e==null?"indeterminate":e===t?"complete":"loading"}function gp(e){return typeof e=="number"}function z5(e){return gp(e)&&!isNaN(e)&&e>0}function I5(e,t){return gp(e)&&!isNaN(e)&&e<=t&&e>=0}function Yie(e,t){return`Invalid prop \`max\` of value \`${e}\` supplied to \`${t}\`. Only numbers greater than 0 are valid max values. Defaulting to \`${nw}\`.`}function qie(e,t){return`Invalid prop \`value\` of value \`${e}\` supplied to \`${t}\`. The \`value\` prop must be:
  - a positive number
  - less than the value passed to \`max\` (or ${nw} if no \`max\` prop is set)
  - \`null\` or \`undefined\` if the progress is indeterminate.

Defaulting to \`null\`.`}var Xie=sD,Kie=aD;function Oa({className:e,value:t,...n}){return u.jsx(Xie,{"data-slot":"progress",className:ye("bg-primary/20 relative h-2 w-full overflow-hidden rounded-full",e),...n,children:u.jsx(Kie,{"data-slot":"progress-indicator",className:"bg-primary h-full w-full flex-1 transition-all",style:{transform:`translateX(-${100-(t||0)}%)`}})})}const Qie=()=>{const e=x.useContext(Un),[t,n]=x.useState({name:"baseTask",amount:0}),[i,s]=x.useState({name:"weeklyTask",amount:0}),[r,a]=x.useState(0),[o,c]=x.useState(0),[d,h]=x.useState([]),[m,g]=x.useState(!1),v=async()=>{const w=await K("get_task_data",{gangId:e.gangId});w&&(n(he.tasks.base[w.baseTask.task_stage-1]||{name:"baseTask",amount:0}),s(he.tasks.weekly[w.weeklyTask.task-1]||{name:"weeklyTask",amount:0}),a(w.baseTask.progress||0),c(w.weeklyTask.progress||0),h(w.otherTasks||[]),g(!0))};x.useEffect(()=>{v()},[e.gangId]);const b=w=>Math.min(100,Math.floor(w*100));return u.jsx(u.Fragment,{children:m?u.jsxs(de.div,{className:"pt-[5%] w-4/5 mx-auto flex flex-col items-center justify-start gap-6",initial:{opacity:0},animate:{opacity:1},transition:{duration:.2},children:[u.jsxs("div",{className:"w-full grid grid-cols-2 gap-6",children:[u.jsxs(St,{className:"w-full bg-card text-card-foreground border-border p-4",children:[" ",u.jsxs(Qn,{children:[" ",u.jsx(Jn,{className:"text-2xl",children:C("menu.weekly_tasks")})," ",u.jsx(zv,{className:"text-xs",children:C("menu.weekly_tasks_desc")})," "]}),u.jsxs(pn,{className:"space-y-2",children:[u.jsx("div",{className:"text-base font-semibold",children:C("menu."+i.name)})," ",u.jsxs("div",{className:"text-xs text-muted-foreground",children:[" ",C("menu."+i.name+"_desc",[["amount",i.amount]])]}),u.jsxs("div",{className:"text-center text-xs font-medium pt-3",children:[" ",b(o),"%"]}),u.jsx(Oa,{value:b(o),className:"h-4 bg-muted"})," "]})]}),u.jsxs(St,{className:"w-full bg-card text-card-foreground border-border p-4",children:[" ",u.jsxs(Qn,{children:[" ",u.jsx(Jn,{className:"text-2xl",children:C("menu.base_tasks")})," ",u.jsx(zv,{className:"text-xs",children:C("menu.base_tasks_desc")})," "]}),u.jsxs(pn,{className:"space-y-2",children:[u.jsx("div",{className:"text-base font-semibold",children:C("menu."+t.name)})," ",u.jsxs("div",{className:"text-xs text-muted-foreground",children:[" ",C("menu."+t.name+"_desc",[["amount",t.amount]])]}),u.jsxs("div",{className:"text-center text-xs font-medium pt-3",children:[" ",b(r),"%"]}),u.jsx(Oa,{value:b(r),className:"h-4 bg-muted"})," "]})]})]}),(d==null?void 0:d.length)>0&&u.jsxs(St,{className:"w-full bg-card text-card-foreground border-border p-4 h-full mb-6",children:[u.jsxs(Qn,{children:[u.jsx(Jn,{className:"text-2xl",children:C("menu.other_tasks")}),u.jsx(zv,{className:"text-xs",children:C("menu.other_tasks_desc")})]}),u.jsx(pn,{className:"space-y-2",children:u.jsx(rs,{className:" h-60",children:u.jsx("div",{className:"h-full flex flex-col gap-2",children:d.map((w,M)=>!w.should_remove&&b(w.progress/w.goal_progress)>=100?null:u.jsxs("div",{className:" border p-4 rounded-md space-y-2",children:[u.jsxs("div",{className:"flex items-center justify-between",children:[u.jsxs("div",{className:"flex flex-col",children:[u.jsx("div",{className:"text-base font-semibold",children:w.label}),u.jsx("div",{className:"text-xs text-muted-foreground",children:w.description})]}),u.jsx("div",{className:"text-xs text-muted-foreground",children:C("menu.task_reward",[["reward",w.reward]])})]}),u.jsxs("div",{className:"text-center text-xs font-medium pt-3",children:[b(w.progress/w.goal_progress),"%"]}),u.jsx(Oa,{value:b(w.progress/w.goal_progress),className:"h-4 bg-muted"})]},M))})})})]})]}):u.jsx("div",{className:"flex items-center justify-center h-full text-muted-foreground",children:"Loading tasks..."})})},Jie=()=>{const e=x.useContext(Un),t=e.level,[n,i]=x.useState(null),[s,r]=x.useState(null),a=async()=>{let d=await K("get_upgrades",{gangId:e.gangId});i(d)},o=async d=>{await K("upgrade_item",{gangId:e.gangId,item:d})&&a()};x.useEffect(()=>{a()},[e.gangId]);const c=()=>{s&&(o(s.item),r(null))};return n?u.jsxs(u.Fragment,{children:[s&&u.jsx(Is,{open:!!s,onOpenChange:()=>r(null),children:u.jsxs(Bs,{children:[u.jsxs(Ko,{children:[u.jsx(Hs,{children:s.title}),u.jsx(Fs,{children:s.desc})]}),u.jsxs(Vs,{children:[u.jsx(Us,{children:C("cancel")}),u.jsx(Va,{onClick:c,className:"bg-green-600 hover:bg-green-700 text-white",children:C("confirm")})]})]})}),u.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6 p-4 pt-[5%] w-11/12 mx-auto max-h-[calc(90vh-4rem)] overflow-y-auto",children:he.upgrades.map((d,h)=>{if(!n||typeof n[d.type]>"u")return null;const m=n[d.type]-1,g=d.upgrades[m],v=d.upgrades[m+1],b=m+1>=d.upgrades.length,w=!!v,M=v?t<v.requiresLevel:!1;return d.type==="vehicle"?null:u.jsx(de.div,{initial:{opacity:0,scale:.9},animate:{opacity:1,scale:1},transition:{duration:.2,delay:h*.05},children:u.jsxs(St,{className:"bg-card text-card-foreground border-border h-full flex flex-col justify-between shadow-md",children:[" ",u.jsxs(Qn,{className:"text-center",children:[u.jsxs(Jn,{className:"text-xl flex items-center justify-center gap-2",children:[(b||M)&&u.jsx(t0,{className:"text-muted-foreground"}),C("menu."+d.type)]}),u.jsx("p",{className:"text-muted-foreground text-xs",children:d.desc})]}),u.jsxs(pn,{className:"text-center text-xs space-y-2 flex-grow",children:[" ",u.jsx("p",{children:b?C("menu.max_upgrade"):C("menu.requires_level",[["level",(v==null?void 0:v.requiresLevel)||"N/A"]])}),u.jsx("p",{children:C("menu.current_upgrade_level",[["current",m+1+"/"+d.upgrades.length]])}),g&&u.jsx("p",{className:"font-semibold",children:C("menu."+d.type+"_upgrade",[["data",g.percentage==null?g.amount:(1+g.percentage)*100+"%"]])})]}),u.jsx(gE,{children:u.jsx(ne,{className:"w-full text-sm",onClick:()=>{b||M||r({title:C("menu."+d.type),desc:C("menu.upgrade_item",[["cost",(v==null?void 0:v.price)||"N/A"],["currency",C("currency")]]),item:d.type})},disabled:b||M||!w,children:b?C("menu.max_upgrade"):M?C("menu.level_too_low"):C("menu.upgrade_item",[["cost",(v==null?void 0:v.price)||"N/A"],["currency",C("currency")]])})})]})},d.type+h)})})]}):u.jsx("div",{className:"flex justify-center items-center h-full",children:u.jsx("p",{className:"text-muted-foreground",children:"Loading upgrades..."})})},ese=()=>{const[e,t]=x.useState(null),n=async()=>{const s=await K("get_scoreboard");t(s)};x.useEffect(()=>{n()},[]);const i=s=>s===0?u.jsx(Vv,{className:"text-2xl text-yellow-400"}):s===1?u.jsx(Vv,{className:"text-2xl text-gray-400"}):s===2?u.jsx(Vv,{className:"text-2xl text-yellow-600"}):u.jsxs("span",{className:"text-lg font-semibold",children:["#",s+1]});return u.jsx(u.Fragment,{children:u.jsxs("div",{className:"flex flex-col items-center gap-4 pt-[5%] w-2/5 h-[90vh] mx-auto",children:[" ",e&&e.map((s,r)=>u.jsx(de.div,{className:"w-full p-3 bg-card border border-border rounded-lg text-xl shadow-md",initial:{opacity:0,y:10},animate:{opacity:1,y:0},transition:{duration:.2,delay:r*.1},children:u.jsxs("div",{className:"grid grid-cols-3 items-center justify-center",children:[" ",u.jsxs("div",{className:"flex items-center justify-start",children:[" ",i(r)]}),u.jsxs("div",{className:"text-center font-bold text-foreground",children:[" ",s.name]}),u.jsxs("div",{className:"flex items-center justify-end gap-2 text-lg",children:[" ",u.jsx(uJ,{className:"text-red-500"}),u.jsx("div",{className:"text-foreground",children:s.gang_rep})," "]})]})},r))]})})},tse=()=>{const e=x.useContext(Un),[t,n]=x.useState([]),[i,s]=x.useState(null),[r,a]=x.useState({current:0,max:0}),[o,c]=x.useState(!1),d=async v=>{await K("purchase_vehicle",{gangId:e.gangId,model:v}),h(),m()},h=async()=>{const v=await K("get_avaliable_vehicles",{gangId:e.gangId});n(v||[])},m=async()=>{const v=await K("get_garage_status",{gangId:e.gangId});a(v||{current:0,max:0}),c(!0)};x.useEffect(()=>{h(),m()},[e.gangId]);const g=()=>{i&&i.model&&d(i.model),s(null)};return o?o&&u.jsxs(u.Fragment,{children:[u.jsxs("div",{className:"p-4 text-center text-lg text-foreground",children:[" ",C("menu.current_garage_storage",[["current",r.current],["max",r.max]])]}),i&&u.jsx(Is,{open:!!i,onOpenChange:()=>s(null),children:u.jsxs(Bs,{children:[u.jsxs(Ko,{children:[u.jsx(Hs,{children:i.title}),u.jsx(Fs,{children:i.desc})]}),u.jsxs(Vs,{children:[u.jsx(Us,{children:C("cancel")}),u.jsx(Va,{onClick:g,className:"bg-green-600 hover:bg-green-700 text-white",children:C("confirm")})]})]})}),u.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6 p-4 pt-0 w-11/12 mx-auto max-h-[calc(90vh-8rem)] overflow-y-auto",children:[" ",t.map((v,b)=>{const w=v.requiresLevel<=e.level&&r.current<r.max,M=v.requiresLevel>e.level,y=r.current>=r.max;return u.jsx(de.div,{initial:{opacity:0,scale:.9},animate:{opacity:1,scale:1},transition:{duration:.2,delay:b*.05},children:u.jsxs(St,{className:"bg-card text-card-foreground border-border h-full flex flex-col justify-between shadow-md",children:[" ",u.jsxs(Qn,{className:"text-center pb-2",children:[u.jsxs(Jn,{className:"text-xl flex items-center justify-center gap-2",children:[M&&u.jsx(t0,{className:"text-muted-foreground"}),v.title]}),u.jsx("p",{className:"text-muted-foreground text-xs",children:v.description})]}),u.jsxs(pn,{className:"text-center text-xs space-y-1 flex-grow",children:[" ",u.jsx("p",{children:C("menu.requires_level",[["level",v.requiresLevel]])})]}),u.jsx(gE,{children:u.jsx(ne,{className:"w-full text-sm",onClick:()=>s({title:v.title,desc:C("menu.buy_vehicle",[["cost",v.price],["currency",C("currency")]]),model:v.model}),disabled:!w,children:M?C("menu.level_too_low"):y?C("menu.garage_full"):C("menu.purchase",[["cost",v.price],["currency",C("currency")]])})})]})},v.model+b)}),t.length===0&&u.jsx("p",{className:"col-span-full text-center text-muted-foreground py-10",children:C("menu.no_vehicles_available")})]})]}):u.jsx("div",{className:"flex justify-center items-center h-full",children:u.jsx("p",{className:"text-muted-foreground",children:"Loading vehicles..."})})},nse=()=>{const e=x.useContext(Un),[t,n]=x.useState([{event:"harbourContainers",active:!1,nextTime:0,nextEnd:0},{event:"boatCrates",active:!1,nextTime:0,nextEnd:0}]),[i,s]=x.useState(!1),r=async()=>{const a=await K("get_event_data",{gangId:e.gangId});a&&(n(a.events||[]),s(!0))};return x.useEffect(()=>{r()},[e.gangId]),u.jsx(u.Fragment,{children:i?u.jsx(de.div,{className:"pt-[5%] w-4/5 mx-auto h-full flex flex-col items-center justify-start gap-6",initial:{opacity:0},animate:{opacity:1},transition:{duration:.2},children:u.jsxs(St,{className:"w-full bg-card text-card-foreground border-border p-4",children:[" ",u.jsxs(Qn,{children:[u.jsx(Jn,{className:"text-2xl",children:C("menu.events")})," "]}),u.jsx(pn,{className:"space-y-2",children:t.map((a,o)=>u.jsxs("div",{children:[u.jsxs("div",{className:`text-sm flex items-center ${a.active?"text-green-400":"text-foreground"}`,children:[" ",a.active?C("menu.active_event",[["event",C("menu."+a.event)],["time",xs(a.nextEnd*1e3)]]):C("menu.next_event",[["event",C("menu."+a.event)],["time",xs(a.nextTime*1e3)]]),u.jsx(wc,{delayDuration:0,children:u.jsxs(Sc,{className:"p-1",children:[u.jsx(Cc,{className:"ml-2 cursor-pointer text-lg ",children:u.jsx(GG,{className:"text-lg ",onClick:()=>{K("set_event_waypoint",{event:a.event})}})}),u.jsx(Bo,{children:C("menu.set_waypoint")})]})})]}),u.jsx(de.div,{className:"text-xs text-muted-foreground mt-1",initial:{opacity:0},animate:{opacity:1},transition:{duration:.2},children:C("menu."+a.event+"_desc")})]},o))})]})}):u.jsx("div",{className:"flex items-center justify-center h-full text-muted-foreground",children:"Loading tasks..."})})},ise=Jb("inline-flex items-center rounded-md border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground shadow hover:bg-primary/80",secondary:"border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80",destructive:"border-transparent bg-destructive text-destructive-foreground shadow hover:bg-destructive/80",outline:"text-foreground"}},defaultVariants:{variant:"default"}});function B5({className:e,variant:t,...n}){return u.jsx("div",{className:ye(ise({variant:t}),e),...n})}function sse(e){return oe({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M4 10m0 2a2 2 0 0 1 2 -2h4a2 2 0 0 1 2 2v7a2 2 0 0 1 -2 2h-4a2 2 0 0 1 -2 -2z"},child:[]},{tag:"path",attr:{d:"M6 10v-4a1 1 0 0 1 1 -1h2a1 1 0 0 1 1 1v4"},child:[]},{tag:"path",attr:{d:"M15 7h.01"},child:[]},{tag:"path",attr:{d:"M18 9h.01"},child:[]},{tag:"path",attr:{d:"M18 5h.01"},child:[]},{tag:"path",attr:{d:"M21 3h.01"},child:[]},{tag:"path",attr:{d:"M21 7h.01"},child:[]},{tag:"path",attr:{d:"M21 11h.01"},child:[]},{tag:"path",attr:{d:"M10 7h1"},child:[]}]})(e)}function vm(e){return oe({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M21 3v5l-11 9l-4 4l-3 -3l4 -4l9 -11z"},child:[]},{tag:"path",attr:{d:"M5 13l6 6"},child:[]},{tag:"path",attr:{d:"M14.32 17.32l3.68 3.68l3 -3l-3.365 -3.365"},child:[]},{tag:"path",attr:{d:"M10 5.5l-2 -2.5h-5v5l3 2.5"},child:[]}]})(e)}function rse(){const t=x.useContext(Un).gangId,[n,i]=x.useState([]),[s,r]=x.useState(!1),[a,o]=x.useState(null),c=async()=>{const g=await K("get_wars");i(g||[])};x.useEffect(()=>{c()},[]);const d=async(g,v,b)=>{await K("update_peace",{gang_id_1:g,gang_id_2:v,peace:b})&&c(),o(null)},h=()=>{const[g,v]=x.useState([]),[b,w]=x.useState(null);x.useEffect(()=>{(async()=>{const S=await K("get_gangs"),T=S?S.filter(N=>N.gang_id!==t):[];v(T)})()},[t]);const M=async()=>{b&&(await K("start_war",{selectedGang:b})&&c(),r(!1),w(null))};return u.jsx(Mr,{open:s,onOpenChange:r,children:u.jsxs(Tr,{className:"sm:max-w-[500px]",children:[u.jsxs(jr,{className:"space-y-2",children:[u.jsxs(Nr,{className:"text-xl font-bold flex items-center gap-2",children:[u.jsx(vm,{className:"text-red-500"}),C("start_new_war")]}),u.jsx(ka,{children:C("menu.select_gang_desc")})]}),u.jsxs("div",{className:"py-4",children:[u.jsx("h4",{className:"text-sm font-medium text-muted-foreground mb-3",children:C("menu.available_gangs")}),u.jsx(rs,{className:"space-y-2 max-h-64 flex flex-col",children:g.map(y=>u.jsx("div",{className:`cursor-pointer border border-border rounded-md transition-all duration-200 hover:shadow-md my-1 ${b===y.gang_id?"border border-border border-red-500":"hover:bg-muted/50"}`,onClick:()=>w(y.gang_id),children:u.jsx(pn,{className:"p-4",children:u.jsxs("div",{className:"flex items-center justify-between",children:[u.jsx("span",{className:"font-medium",children:y.name}),b===y.gang_id&&u.jsx(Nv,{className:"text-red-500 text-lg"})]})})},y.gang_id))}),g.length===0&&u.jsx("div",{className:"text-center py-8",children:u.jsx("p",{className:"text-muted-foreground",children:C("menu.no_gangs_to_war")})})]}),u.jsxs(Na,{className:"gap-2",children:[u.jsx(ne,{variant:"outline",onClick:()=>r(!1),children:C("cancel")}),u.jsxs(ne,{onClick:M,disabled:!b,className:"bg-red-600 hover:bg-red-700 text-white",children:[u.jsx(vm,{className:"mr-2 h-4 w-4"}),C("start_war")]})]})]})})},m=({war:g})=>{const{gang_id_1:v,gang_id_2:b,peace_1:w,peace_2:M}=g,y=t===v?g.gang_2_name:g.gang_1_name;let S,T,N,k,E,D;t===v&&M===1||t===b&&w===1?(S="accept_peace",T=Nv,N=C("accept_peace"),k="success",E=C("accept_peace"),D=C("accept_peace_desc",[["gangName",y]])):t===v&&w===0||t===b&&M===0?(S="request_peace",T=yC,N=C("request_peace"),k="outline",E=C("request_peace"),D=C("request_peace_desc",[["gangName",y]])):(S="cancel_peace_request",T=xC,N=C("cancel_peace"),k="destructive",E=C("cancel_peace"),D=C("cancel_peace_desc",[["gangName",y]]));const O=()=>{switch(k){case"success":return"bg-green-600 hover:bg-green-700 text-white border-green-600";case"destructive":return"bg-red-600 hover:bg-red-700 text-white border-red-600";default:return"border-muted-foreground/30 hover:bg-muted/50"}};return u.jsxs(ne,{variant:"outline",size:"sm",className:`flex items-center gap-2 ${O()}`,onClick:()=>o({type:S,gangName:y,gang_id_1:v,gang_id_2:b,title:E,desc:D}),children:[u.jsx(T,{className:"h-4 w-4"}),N]})};return u.jsxs("div",{className:"container mx-auto px-2 py-4 max-w-2xl",children:[u.jsxs("div",{className:"mb-8",children:[u.jsxs("div",{className:"flex flex-col sm:flex-row items-start sm:items-center justify-between gap-4",children:[u.jsxs("div",{children:[u.jsxs("h1",{className:"text-3xl font-bold tracking-tight flex items-center gap-3",children:[u.jsx(vm,{className:"text-red-500"}),C("current_wars")]}),u.jsx("p",{className:"text-muted-foreground mt-1",children:"Manage active conflicts and peace negotiations"})]}),u.jsxs(ne,{onClick:()=>r(!0),className:"bg-red-500 hover:bg-red-600 text-white shadow-lg",children:[u.jsx(xy,{className:"mr-2 h-4 w-4"}),C("start_new_war")]})]}),u.jsx(B2,{className:"mt-6"})]}),s&&u.jsx(h,{}),a&&u.jsx(Is,{open:!!a,onOpenChange:()=>o(null),children:u.jsxs(Bs,{children:[u.jsxs(Ko,{children:[u.jsxs(Hs,{className:"flex items-center gap-2",children:[a.type==="accept_peace"&&u.jsx(Nv,{className:"text-green-500"}),a.type==="request_peace"&&u.jsx(yC,{className:"text-blue-500"}),a.type==="cancel_peace_request"&&u.jsx(xC,{className:"text-red-500"}),a.title]}),u.jsx(Fs,{className:"text-xs",children:a.desc})]}),u.jsxs(Vs,{children:[u.jsx(Us,{children:C("cancel")}),u.jsx(Va,{className:a.type.includes("cancel")?"bg-red-600 hover:bg-red-700":"bg-green-600 hover:bg-green-700",onClick:()=>{const g=a.type==="cancel_peace_request"?0:1;d(a.gang_id_1,a.gang_id_2,g)},children:C("confirm")})]})]})}),n.length>0?u.jsx("div",{className:"space-y-4",children:n.map(g=>u.jsx("div",{className:"overflow-hidden shadow-sm hover:shadow-md transition-shadow border border-border rounded-md",children:u.jsx(pn,{className:"p-6",children:u.jsxs("div",{className:"flex flex-col lg:flex-row items-center justify-between gap-6",children:[u.jsx("div",{className:"flex items-center gap-4 flex-1",children:u.jsxs("div",{className:"flex items-center gap-4",children:[u.jsx(B5,{variant:"outline",className:"text-base font-bold px-4 py-2 border-2",style:{backgroundColor:`${g.color1}15`,borderColor:g.color1,color:g.color1},children:g.gang_1_name}),u.jsxs("div",{className:"flex items-center gap-2",children:[u.jsx("div",{className:"h-px bg-muted-foreground/30 w-8"}),u.jsx("span",{className:"font-bold text-muted-foreground text-sm bg-muted px-2 py-1 rounded",children:"VS"}),u.jsx("div",{className:"h-px bg-muted-foreground/30 w-8"})]}),u.jsx(B5,{variant:"outline",className:"text-base font-bold px-4 py-2 border-2",style:{backgroundColor:`${g.color2}15`,borderColor:g.color2,color:g.color2},children:g.gang_2_name})]})}),u.jsxs("div",{className:"flex items-center gap-4",children:[u.jsx("div",{className:"text-right",children:u.jsxs("p",{className:"text-xs text-muted-foreground",children:[C("started")," ",ol(g.started)]})}),u.jsx(m,{war:g})]})]})})},`${g.gang_id_1}-${g.gang_id_2}`))}):u.jsx(St,{className:"border-dashed",children:u.jsxs(pn,{className:"flex flex-col items-center justify-center py-16",children:[u.jsx(vm,{className:"h-12 w-12 text-muted-foreground/50 mb-4"}),u.jsx("h3",{className:"text-lg font-medium text-muted-foreground mb-2",children:"No Active Wars"}),u.jsx("p",{className:"text-sm text-muted-foreground text-center max-w-sm",children:C("menu.no_current_wars")}),u.jsxs(ne,{onClick:()=>r(!0),variant:"outline",className:"mt-4",children:[u.jsx(xy,{className:"mr-2 h-4 w-4"}),C("start_new_war")]})]})})]})}var lD="Toggle",cD=x.forwardRef((e,t)=>{const{pressed:n,defaultPressed:i,onPressedChange:s,...r}=e,[a,o]=ti({prop:n,onChange:s,defaultProp:i??!1,caller:lD});return u.jsx(Te.button,{type:"button","aria-pressed":a,"data-state":a?"on":"off","data-disabled":e.disabled?"":void 0,...r,ref:t,onClick:pe(e.onClick,()=>{e.disabled||o(!a)})})});cD.displayName=lD;var Wa="ToggleGroup",[uD,Sae]=vn(Wa,[fu]),dD=fu(),iw=ae.forwardRef((e,t)=>{const{type:n,...i}=e;if(n==="single"){const s=i;return u.jsx(ase,{...s,ref:t})}if(n==="multiple"){const s=i;return u.jsx(ose,{...s,ref:t})}throw new Error(`Missing prop \`type\` expected on \`${Wa}\``)});iw.displayName=Wa;var[fD,hD]=uD(Wa),ase=ae.forwardRef((e,t)=>{const{value:n,defaultValue:i,onValueChange:s=()=>{},...r}=e,[a,o]=ti({prop:n,defaultProp:i??"",onChange:s,caller:Wa});return u.jsx(fD,{scope:e.__scopeToggleGroup,type:"single",value:ae.useMemo(()=>a?[a]:[],[a]),onItemActivate:o,onItemDeactivate:ae.useCallback(()=>o(""),[o]),children:u.jsx(mD,{...r,ref:t})})}),ose=ae.forwardRef((e,t)=>{const{value:n,defaultValue:i,onValueChange:s=()=>{},...r}=e,[a,o]=ti({prop:n,defaultProp:i??[],onChange:s,caller:Wa}),c=ae.useCallback(h=>o((m=[])=>[...m,h]),[o]),d=ae.useCallback(h=>o((m=[])=>m.filter(g=>g!==h)),[o]);return u.jsx(fD,{scope:e.__scopeToggleGroup,type:"multiple",value:a,onItemActivate:c,onItemDeactivate:d,children:u.jsx(mD,{...r,ref:t})})});iw.displayName=Wa;var[lse,cse]=uD(Wa),mD=ae.forwardRef((e,t)=>{const{__scopeToggleGroup:n,disabled:i=!1,rovingFocus:s=!0,orientation:r,dir:a,loop:o=!0,...c}=e,d=dD(n),h=lu(a),m={role:"group",dir:h,...c};return u.jsx(lse,{scope:n,rovingFocus:s,disabled:i,children:s?u.jsx(D2,{asChild:!0,...d,orientation:r,dir:h,loop:o,children:u.jsx(Te.div,{...m,ref:t})}):u.jsx(Te.div,{...m,ref:t})})}),pp="ToggleGroupItem",gD=ae.forwardRef((e,t)=>{const n=hD(pp,e.__scopeToggleGroup),i=cse(pp,e.__scopeToggleGroup),s=dD(e.__scopeToggleGroup),r=n.value.includes(e.value),a=i.disabled||e.disabled,o={...e,pressed:r,disabled:a},c=ae.useRef(null);return i.rovingFocus?u.jsx(P2,{asChild:!0,...s,focusable:!a,active:r,ref:c,children:u.jsx(V5,{...o,ref:t})}):u.jsx(V5,{...o,ref:t})});gD.displayName=pp;var V5=ae.forwardRef((e,t)=>{const{__scopeToggleGroup:n,value:i,...s}=e,r=hD(pp,n),a={role:"radio","aria-checked":e.pressed,"aria-pressed":void 0},o=r.type==="single"?a:void 0;return u.jsx(cD,{...o,...s,ref:t,onPressedChange:c=>{c?r.onItemActivate(i):r.onItemDeactivate(i)}})}),use=iw,dse=gD;const fse=Jb("inline-flex items-center justify-center gap-2 rounded-md text-sm font-medium hover:bg-muted hover:text-muted-foreground disabled:pointer-events-none disabled:opacity-50 data-[state=on]:bg-accent data-[state=on]:text-accent-foreground [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 [&_svg]:shrink-0 focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] outline-none transition-[color,box-shadow] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive whitespace-nowrap",{variants:{variant:{default:"bg-transparent",outline:"border border-input bg-transparent shadow-xs hover:bg-accent hover:text-accent-foreground"},size:{default:"h-9 px-2 min-w-9",sm:"h-8 px-1.5 min-w-8",lg:"h-10 px-2.5 min-w-10"}},defaultVariants:{variant:"default",size:"default"}}),pD=x.createContext({size:"default",variant:"default"});function hse({className:e,variant:t,size:n,children:i,...s}){return u.jsx(use,{"data-slot":"toggle-group","data-variant":t,"data-size":n,className:ye("group/toggle-group flex w-fit items-center rounded-md data-[variant=outline]:shadow-xs",e),...s,children:u.jsx(pD.Provider,{value:{variant:t,size:n},children:i})})}function mse({className:e,children:t,variant:n,size:i,...s}){const r=x.useContext(pD);return u.jsx(dse,{"data-slot":"toggle-group-item","data-variant":r.variant||n,"data-size":r.size||i,className:ye(fse({variant:r.variant||n,size:r.size||i}),"min-w-0 flex-1 shrink-0 rounded-none shadow-none first:rounded-l-md last:rounded-r-md focus:z-10 focus-visible:z-10 data-[variant=outline]:border-l-0 data-[variant=outline]:first:border-l",e),...s,children:t})}ru.register(pf,Vg,Vm,pa,Fd,ck,qb,Gb,Yb);function gse(e){if(typeof document>"u")return!0;const n=document.createElement("canvas").getContext("2d"),i=n.fillStyle;return n.fillStyle=e,n.fillStyle!==i}const pse=()=>{var I;const e=x.useContext(Un),t=["day","week","month"],[n,i]=x.useState("day"),[s,r]=x.useState(null),[a,o]=x.useState(null),[c,d]=x.useState(null),[h,m]=x.useState(null),g=((I=li("gang_color"))==null?void 0:I.toUpperCase())||"#2AAA8A",v=li("foreground")||"#e5e7eb",b=li("muted-foreground")||"#9ca3af",w=li("secondary")||"rgba(55, 65, 81, 0.9)",M=g+"80",y=g+"40",S=g+"00",T=x.useMemo(()=>({responsive:!0,maintainAspectRatio:!1,elements:{line:{tension:.4}},scales:{x:{border:{display:!1},grid:{display:!1},ticks:{color:b}},y:{border:{display:!1},grid:{display:!1,color:g+"20"},ticks:{precision:0,color:b}}},plugins:{legend:{display:!1},tooltip:{backgroundColor:w,bodyAlign:"center",titleColor:v,bodyColor:v,displayColors:!1}}}),[g,v,b,w]),N=(P,H)=>{if(!H)return null;const V=P.createLinearGradient(0,H.bottom,0,H.top);return gse(M)?(V.addColorStop(0,S),V.addColorStop(.65,y),V.addColorStop(1,M)):(V.addColorStop(0,"#fffffa"),V.addColorStop(1,"#fffff6")),V};x.useEffect(()=>{n==="day"?E():n==="week"?D():n==="month"&&O()},[n,e.gangId]);const k=(P,H)=>{if(!P||P.length===0){const V={labels:[],datasets:[{data:[]}]};r(V),o(V),d(V),m(V);return}r({labels:P.map(V=>H(V.date_stamp)),datasets:[{label:"Cash",data:P.map(V=>V.cash),borderColor:g,borderWidth:2,pointBackgroundColor:g,tension:.3,fill:!1},{label:"Dirty Cash",data:P.map(V=>V.dirty_cash),borderColor:b,borderWidth:2,pointBackgroundColor:b,tension:.3,fill:!1}]}),o({labels:P.map(V=>H(V.date_stamp)),datasets:[{label:"Members",data:P.map(V=>V.members),backgroundColor:V=>{const J=V.chart,{ctx:Q,chartArea:U}=J;return U?N(Q,U):null},borderColor:g,borderWidth:1,borderRadius:5,fill:!0}]}),d({labels:P.map(V=>H(V.date_stamp)),datasets:[{label:"Zones",data:P.map(V=>V.zones),backgroundColor:V=>{const J=V.chart,{ctx:Q,chartArea:U}=J;return U?N(Q,U):null},borderColor:g,borderWidth:1,borderRadius:5,fill:!0}]}),m({labels:P.map(V=>H(V.date_stamp)),datasets:[{label:"Reputation",data:P.map(V=>V.gang_rep),backgroundColor:V=>{const J=V.chart,{ctx:Q,chartArea:U}=J;return U?N(Q,U):null},borderColor:g,borderWidth:2,pointBackgroundColor:g,fill:!0,tension:.3}]})},E=async()=>K("get_daily_data",{gangId:e.gangId}).then(P=>k(P,rY)),D=async()=>K("get_weekly_data",{gangId:e.gangId}).then(P=>k(P,yk)),O=async()=>K("get_monthly_data",{gangId:e.gangId}).then(P=>k(P,aY));return u.jsxs(u.Fragment,{children:[u.jsxs("div",{className:"flex flex-col items-center gap-2 pt-[2%] text-foreground",children:[" ",u.jsx("div",{className:"text-lg font-semibold",children:C("menu.choose_time_range")}),u.jsx(hse,{type:"single",defaultValue:"day",value:n,onValueChange:P=>{P&&i(P)},className:"border gap-1 border-border bg-secondary/25 rounded-lg p-1",children:t.map(P=>u.jsx(mse,{value:P,className:"px-5 py-2 text-sm data-[state=on]:bg-primary data-[state=on]:text-primary-foreground rounded-sm",children:C("menu."+P)},P))})]}),s&&a&&c&&h&&u.jsxs("div",{className:"p-2.5 mt-[2%] w-full",children:[" ",u.jsxs("div",{className:"grid grid-cols-2 gap-3 w-full ",children:[" ",u.jsxs(St,{className:"bg-card text-card-foreground border-border w-full gap-4",children:[" ",u.jsx(Qn,{children:u.jsx(Jn,{className:"text-lg",children:C("menu.balance")})}),u.jsx(pn,{className:"h-32",children:u.jsx(py,{data:s,options:T})})]}),u.jsxs(St,{className:"bg-card text-card-foreground border-border gap-4",children:[" ",u.jsx(Qn,{children:u.jsx(Jn,{className:"text-lg",children:C("menu.members")})}),u.jsx(pn,{className:"h-32",children:u.jsx(vy,{data:a,options:T})})]}),u.jsxs(St,{className:"bg-card text-card-foreground border-border gap-4",children:[" ",u.jsx(Qn,{children:u.jsx(Jn,{className:"text-lg",children:C("menu.zones")})}),u.jsx(pn,{className:"h-32",children:u.jsx(vy,{data:c,options:T})})]}),u.jsxs(St,{className:"bg-card text-card-foreground border-border gap-4",children:[" ",u.jsx(Qn,{children:u.jsx(Jn,{className:"text-lg",children:C("menu.gang_rep")})}),u.jsx(pn,{className:"h-32",children:u.jsx(py,{data:h,options:T})})]})]})]})]})};var qy=["Enter"," "],vse=["ArrowDown","PageUp","Home"],vD=["ArrowUp","PageDown","End"],xse=[...vse,...vD],yse={ltr:[...qy,"ArrowRight"],rtl:[...qy,"ArrowLeft"]},_se={ltr:["ArrowLeft"],rtl:["ArrowRight"]},nh="Menu",[Sf,bse,wse]=O2(nh),[dl,xD]=vn(nh,[wse,du,fu]),F0=du(),yD=fu(),[Sse,fl]=dl(nh),[Cse,ih]=dl(nh),_D=e=>{const{__scopeMenu:t,open:n=!1,children:i,dir:s,onOpenChange:r,modal:a=!0}=e,o=F0(t),[c,d]=x.useState(null),h=x.useRef(!1),m=Tn(r),g=lu(s);return x.useEffect(()=>{const v=()=>{h.current=!0,document.addEventListener("pointerdown",b,{capture:!0,once:!0}),document.addEventListener("pointermove",b,{capture:!0,once:!0})},b=()=>h.current=!1;return document.addEventListener("keydown",v,{capture:!0}),()=>{document.removeEventListener("keydown",v,{capture:!0}),document.removeEventListener("pointerdown",b,{capture:!0}),document.removeEventListener("pointermove",b,{capture:!0})}},[]),u.jsx(b2,{...o,children:u.jsx(Sse,{scope:t,open:n,onOpenChange:m,content:c,onContentChange:d,children:u.jsx(Cse,{scope:t,onClose:x.useCallback(()=>m(!1),[m]),isUsingKeyboardRef:h,dir:g,modal:a,children:i})})})};_D.displayName=nh;var Mse="MenuAnchor",sw=x.forwardRef((e,t)=>{const{__scopeMenu:n,...i}=e,s=F0(n);return u.jsx(h0,{...s,...i,ref:t})});sw.displayName=Mse;var rw="MenuPortal",[Tse,bD]=dl(rw,{forceMount:void 0}),wD=e=>{const{__scopeMenu:t,forceMount:n,children:i,container:s}=e,r=fl(rw,t);return u.jsx(Tse,{scope:t,forceMount:n,children:u.jsx(nn,{present:n||r.open,children:u.jsx($f,{asChild:!0,container:s,children:i})})})};wD.displayName=rw;var zi="MenuContent",[jse,aw]=dl(zi),SD=x.forwardRef((e,t)=>{const n=bD(zi,e.__scopeMenu),{forceMount:i=n.forceMount,...s}=e,r=fl(zi,e.__scopeMenu),a=ih(zi,e.__scopeMenu);return u.jsx(Sf.Provider,{scope:e.__scopeMenu,children:u.jsx(nn,{present:i||r.open,children:u.jsx(Sf.Slot,{scope:e.__scopeMenu,children:a.modal?u.jsx(Nse,{...s,ref:t}):u.jsx(kse,{...s,ref:t})})})})}),Nse=x.forwardRef((e,t)=>{const n=fl(zi,e.__scopeMenu),i=x.useRef(null),s=qe(t,i);return x.useEffect(()=>{const r=i.current;if(r)return i2(r)},[]),u.jsx(ow,{...e,ref:s,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:pe(e.onFocusOutside,r=>r.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)})}),kse=x.forwardRef((e,t)=>{const n=fl(zi,e.__scopeMenu);return u.jsx(ow,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)})}),Ese=Yo("MenuContent.ScrollLock"),ow=x.forwardRef((e,t)=>{const{__scopeMenu:n,loop:i=!1,trapFocus:s,onOpenAutoFocus:r,onCloseAutoFocus:a,disableOutsidePointerEvents:o,onEntryFocus:c,onEscapeKeyDown:d,onPointerDownOutside:h,onFocusOutside:m,onInteractOutside:g,onDismiss:v,disableOutsideScroll:b,...w}=e,M=fl(zi,n),y=ih(zi,n),S=F0(n),T=yD(n),N=bse(n),[k,E]=x.useState(null),D=x.useRef(null),O=qe(t,D,M.onContentChange),I=x.useRef(0),P=x.useRef(""),H=x.useRef(0),V=x.useRef(null),J=x.useRef("right"),Q=x.useRef(0),U=b?r0:x.Fragment,R=b?{as:Ese,allowPinchZoom:!0}:void 0,$=W=>{var Tt,F;const G=P.current+W,ie=N().filter(re=>!re.disabled),se=document.activeElement,Le=(Tt=ie.find(re=>re.ref.current===se))==null?void 0:Tt.textValue,je=ie.map(re=>re.textValue),be=Fse(je,G,Le),we=(F=ie.find(re=>re.textValue===be))==null?void 0:F.ref.current;(function re(le){P.current=le,window.clearTimeout(I.current),le!==""&&(I.current=window.setTimeout(()=>re(""),1e3))})(G),we&&setTimeout(()=>we.focus())};x.useEffect(()=>()=>window.clearTimeout(I.current),[]),n2();const B=x.useCallback(W=>{var ie,se;return J.current===((ie=V.current)==null?void 0:ie.side)&&Zse(W,(se=V.current)==null?void 0:se.area)},[]);return u.jsx(jse,{scope:n,searchRef:P,onItemEnter:x.useCallback(W=>{B(W)&&W.preventDefault()},[B]),onItemLeave:x.useCallback(W=>{var G;B(W)||((G=D.current)==null||G.focus(),E(null))},[B]),onTriggerLeave:x.useCallback(W=>{B(W)&&W.preventDefault()},[B]),pointerGraceTimerRef:H,onPointerGraceIntentChange:x.useCallback(W=>{V.current=W},[]),children:u.jsx(U,{...R,children:u.jsx(i0,{asChild:!0,trapped:s,onMountAutoFocus:pe(r,W=>{var G;W.preventDefault(),(G=D.current)==null||G.focus({preventScroll:!0})}),onUnmountAutoFocus:a,children:u.jsx(Zf,{asChild:!0,disableOutsidePointerEvents:o,onEscapeKeyDown:d,onPointerDownOutside:h,onFocusOutside:m,onInteractOutside:g,onDismiss:v,children:u.jsx(D2,{asChild:!0,...T,dir:y.dir,orientation:"vertical",loop:i,currentTabStopId:k,onCurrentTabStopIdChange:E,onEntryFocus:pe(c,W=>{y.isUsingKeyboardRef.current||W.preventDefault()}),preventScrollOnEntryFocus:!0,children:u.jsx(w2,{role:"menu","aria-orientation":"vertical","data-state":BD(M.open),"data-radix-menu-content":"",dir:y.dir,...S,...w,ref:O,style:{outline:"none",...w.style},onKeyDown:pe(w.onKeyDown,W=>{const ie=W.target.closest("[data-radix-menu-content]")===W.currentTarget,se=W.ctrlKey||W.altKey||W.metaKey,Le=W.key.length===1;ie&&(W.key==="Tab"&&W.preventDefault(),!se&&Le&&$(W.key));const je=D.current;if(W.target!==je||!xse.includes(W.key))return;W.preventDefault();const we=N().filter(Tt=>!Tt.disabled).map(Tt=>Tt.ref.current);vD.includes(W.key)&&we.reverse(),Vse(we)}),onBlur:pe(e.onBlur,W=>{W.currentTarget.contains(W.target)||(window.clearTimeout(I.current),P.current="")}),onPointerMove:pe(e.onPointerMove,Cf(W=>{const G=W.target,ie=Q.current!==W.clientX;if(W.currentTarget.contains(G)&&ie){const se=W.clientX>Q.current?"right":"left";J.current=se,Q.current=W.clientX}}))})})})})})})});SD.displayName=zi;var Ase="MenuGroup",lw=x.forwardRef((e,t)=>{const{__scopeMenu:n,...i}=e;return u.jsx(Te.div,{role:"group",...i,ref:t})});lw.displayName=Ase;var Ose="MenuLabel",CD=x.forwardRef((e,t)=>{const{__scopeMenu:n,...i}=e;return u.jsx(Te.div,{...i,ref:t})});CD.displayName=Ose;var vp="MenuItem",H5="menu.itemSelect",U0=x.forwardRef((e,t)=>{const{disabled:n=!1,onSelect:i,...s}=e,r=x.useRef(null),a=ih(vp,e.__scopeMenu),o=aw(vp,e.__scopeMenu),c=qe(t,r),d=x.useRef(!1),h=()=>{const m=r.current;if(!n&&m){const g=new CustomEvent(H5,{bubbles:!0,cancelable:!0});m.addEventListener(H5,v=>i==null?void 0:i(v),{once:!0}),kk(m,g),g.defaultPrevented?d.current=!1:a.onClose()}};return u.jsx(MD,{...s,ref:c,disabled:n,onClick:pe(e.onClick,h),onPointerDown:m=>{var g;(g=e.onPointerDown)==null||g.call(e,m),d.current=!0},onPointerUp:pe(e.onPointerUp,m=>{var g;d.current||(g=m.currentTarget)==null||g.click()}),onKeyDown:pe(e.onKeyDown,m=>{const g=o.searchRef.current!=="";n||g&&m.key===" "||qy.includes(m.key)&&(m.currentTarget.click(),m.preventDefault())})})});U0.displayName=vp;var MD=x.forwardRef((e,t)=>{const{__scopeMenu:n,disabled:i=!1,textValue:s,...r}=e,a=aw(vp,n),o=yD(n),c=x.useRef(null),d=qe(t,c),[h,m]=x.useState(!1),[g,v]=x.useState("");return x.useEffect(()=>{const b=c.current;b&&v((b.textContent??"").trim())},[r.children]),u.jsx(Sf.ItemSlot,{scope:n,disabled:i,textValue:s??g,children:u.jsx(P2,{asChild:!0,...o,focusable:!i,children:u.jsx(Te.div,{role:"menuitem","data-highlighted":h?"":void 0,"aria-disabled":i||void 0,"data-disabled":i?"":void 0,...r,ref:d,onPointerMove:pe(e.onPointerMove,Cf(b=>{i?a.onItemLeave(b):(a.onItemEnter(b),b.defaultPrevented||b.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:pe(e.onPointerLeave,Cf(b=>a.onItemLeave(b))),onFocus:pe(e.onFocus,()=>m(!0)),onBlur:pe(e.onBlur,()=>m(!1))})})})}),Dse="MenuCheckboxItem",TD=x.forwardRef((e,t)=>{const{checked:n=!1,onCheckedChange:i,...s}=e;return u.jsx(AD,{scope:e.__scopeMenu,checked:n,children:u.jsx(U0,{role:"menuitemcheckbox","aria-checked":xp(n)?"mixed":n,...s,ref:t,"data-state":uw(n),onSelect:pe(s.onSelect,()=>i==null?void 0:i(xp(n)?!0:!n),{checkForDefaultPrevented:!1})})})});TD.displayName=Dse;var jD="MenuRadioGroup",[Pse,Rse]=dl(jD,{value:void 0,onValueChange:()=>{}}),ND=x.forwardRef((e,t)=>{const{value:n,onValueChange:i,...s}=e,r=Tn(i);return u.jsx(Pse,{scope:e.__scopeMenu,value:n,onValueChange:r,children:u.jsx(lw,{...s,ref:t})})});ND.displayName=jD;var kD="MenuRadioItem",ED=x.forwardRef((e,t)=>{const{value:n,...i}=e,s=Rse(kD,e.__scopeMenu),r=n===s.value;return u.jsx(AD,{scope:e.__scopeMenu,checked:r,children:u.jsx(U0,{role:"menuitemradio","aria-checked":r,...i,ref:t,"data-state":uw(r),onSelect:pe(i.onSelect,()=>{var a;return(a=s.onValueChange)==null?void 0:a.call(s,n)},{checkForDefaultPrevented:!1})})})});ED.displayName=kD;var cw="MenuItemIndicator",[AD,Lse]=dl(cw,{checked:!1}),OD=x.forwardRef((e,t)=>{const{__scopeMenu:n,forceMount:i,...s}=e,r=Lse(cw,n);return u.jsx(nn,{present:i||xp(r.checked)||r.checked===!0,children:u.jsx(Te.span,{...s,ref:t,"data-state":uw(r.checked)})})});OD.displayName=cw;var zse="MenuSeparator",DD=x.forwardRef((e,t)=>{const{__scopeMenu:n,...i}=e;return u.jsx(Te.div,{role:"separator","aria-orientation":"horizontal",...i,ref:t})});DD.displayName=zse;var Ise="MenuArrow",PD=x.forwardRef((e,t)=>{const{__scopeMenu:n,...i}=e,s=F0(n);return u.jsx(S2,{...s,...i,ref:t})});PD.displayName=Ise;var Bse="MenuSub",[Cae,RD]=dl(Bse),pd="MenuSubTrigger",LD=x.forwardRef((e,t)=>{const n=fl(pd,e.__scopeMenu),i=ih(pd,e.__scopeMenu),s=RD(pd,e.__scopeMenu),r=aw(pd,e.__scopeMenu),a=x.useRef(null),{pointerGraceTimerRef:o,onPointerGraceIntentChange:c}=r,d={__scopeMenu:e.__scopeMenu},h=x.useCallback(()=>{a.current&&window.clearTimeout(a.current),a.current=null},[]);return x.useEffect(()=>h,[h]),x.useEffect(()=>{const m=o.current;return()=>{window.clearTimeout(m),c(null)}},[o,c]),u.jsx(sw,{asChild:!0,...d,children:u.jsx(MD,{id:s.triggerId,"aria-haspopup":"menu","aria-expanded":n.open,"aria-controls":s.contentId,"data-state":BD(n.open),...e,ref:n0(t,s.onTriggerChange),onClick:m=>{var g;(g=e.onClick)==null||g.call(e,m),!(e.disabled||m.defaultPrevented)&&(m.currentTarget.focus(),n.open||n.onOpenChange(!0))},onPointerMove:pe(e.onPointerMove,Cf(m=>{r.onItemEnter(m),!m.defaultPrevented&&!e.disabled&&!n.open&&!a.current&&(r.onPointerGraceIntentChange(null),a.current=window.setTimeout(()=>{n.onOpenChange(!0),h()},100))})),onPointerLeave:pe(e.onPointerLeave,Cf(m=>{var v,b;h();const g=(v=n.content)==null?void 0:v.getBoundingClientRect();if(g){const w=(b=n.content)==null?void 0:b.dataset.side,M=w==="right",y=M?-5:5,S=g[M?"left":"right"],T=g[M?"right":"left"];r.onPointerGraceIntentChange({area:[{x:m.clientX+y,y:m.clientY},{x:S,y:g.top},{x:T,y:g.top},{x:T,y:g.bottom},{x:S,y:g.bottom}],side:w}),window.clearTimeout(o.current),o.current=window.setTimeout(()=>r.onPointerGraceIntentChange(null),300)}else{if(r.onTriggerLeave(m),m.defaultPrevented)return;r.onPointerGraceIntentChange(null)}})),onKeyDown:pe(e.onKeyDown,m=>{var v;const g=r.searchRef.current!=="";e.disabled||g&&m.key===" "||yse[i.dir].includes(m.key)&&(n.onOpenChange(!0),(v=n.content)==null||v.focus(),m.preventDefault())})})})});LD.displayName=pd;var zD="MenuSubContent",ID=x.forwardRef((e,t)=>{const n=bD(zi,e.__scopeMenu),{forceMount:i=n.forceMount,...s}=e,r=fl(zi,e.__scopeMenu),a=ih(zi,e.__scopeMenu),o=RD(zD,e.__scopeMenu),c=x.useRef(null),d=qe(t,c);return u.jsx(Sf.Provider,{scope:e.__scopeMenu,children:u.jsx(nn,{present:i||r.open,children:u.jsx(Sf.Slot,{scope:e.__scopeMenu,children:u.jsx(ow,{id:o.contentId,"aria-labelledby":o.triggerId,...s,ref:d,align:"start",side:a.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:h=>{var m;a.isUsingKeyboardRef.current&&((m=c.current)==null||m.focus()),h.preventDefault()},onCloseAutoFocus:h=>h.preventDefault(),onFocusOutside:pe(e.onFocusOutside,h=>{h.target!==o.trigger&&r.onOpenChange(!1)}),onEscapeKeyDown:pe(e.onEscapeKeyDown,h=>{a.onClose(),h.preventDefault()}),onKeyDown:pe(e.onKeyDown,h=>{var v;const m=h.currentTarget.contains(h.target),g=_se[a.dir].includes(h.key);m&&g&&(r.onOpenChange(!1),(v=o.trigger)==null||v.focus(),h.preventDefault())})})})})})});ID.displayName=zD;function BD(e){return e?"open":"closed"}function xp(e){return e==="indeterminate"}function uw(e){return xp(e)?"indeterminate":e?"checked":"unchecked"}function Vse(e){const t=document.activeElement;for(const n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function Hse(e,t){return e.map((n,i)=>e[(t+i)%e.length])}function Fse(e,t,n){const s=t.length>1&&Array.from(t).every(d=>d===t[0])?t[0]:t,r=n?e.indexOf(n):-1;let a=Hse(e,Math.max(r,0));s.length===1&&(a=a.filter(d=>d!==n));const c=a.find(d=>d.toLowerCase().startsWith(s.toLowerCase()));return c!==n?c:void 0}function Use(e,t){const{x:n,y:i}=e;let s=!1;for(let r=0,a=t.length-1;r<t.length;a=r++){const o=t[r],c=t[a],d=o.x,h=o.y,m=c.x,g=c.y;h>i!=g>i&&n<(m-d)*(i-h)/(g-h)+d&&(s=!s)}return s}function Zse(e,t){if(!t)return!1;const n={x:e.clientX,y:e.clientY};return Use(n,t)}function Cf(e){return t=>t.pointerType==="mouse"?e(t):void 0}var $se=_D,Wse=sw,Gse=wD,Yse=SD,qse=lw,Xse=CD,Kse=U0,Qse=TD,Jse=ND,ere=ED,tre=OD,nre=DD,ire=PD,sre=LD,rre=ID,Z0="DropdownMenu",[are,Mae]=vn(Z0,[xD]),Zn=xD(),[ore,VD]=are(Z0),HD=e=>{const{__scopeDropdownMenu:t,children:n,dir:i,open:s,defaultOpen:r,onOpenChange:a,modal:o=!0}=e,c=Zn(t),d=x.useRef(null),[h,m]=ti({prop:s,defaultProp:r??!1,onChange:a,caller:Z0});return u.jsx(ore,{scope:t,triggerId:ns(),triggerRef:d,contentId:ns(),open:h,onOpenChange:m,onOpenToggle:x.useCallback(()=>m(g=>!g),[m]),modal:o,children:u.jsx($se,{...c,open:h,onOpenChange:m,dir:i,modal:o,children:n})})};HD.displayName=Z0;var FD="DropdownMenuTrigger",UD=x.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,disabled:i=!1,...s}=e,r=VD(FD,n),a=Zn(n);return u.jsx(Wse,{asChild:!0,...a,children:u.jsx(Te.button,{type:"button",id:r.triggerId,"aria-haspopup":"menu","aria-expanded":r.open,"aria-controls":r.open?r.contentId:void 0,"data-state":r.open?"open":"closed","data-disabled":i?"":void 0,disabled:i,...s,ref:n0(t,r.triggerRef),onPointerDown:pe(e.onPointerDown,o=>{!i&&o.button===0&&o.ctrlKey===!1&&(r.onOpenToggle(),r.open||o.preventDefault())}),onKeyDown:pe(e.onKeyDown,o=>{i||(["Enter"," "].includes(o.key)&&r.onOpenToggle(),o.key==="ArrowDown"&&r.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(o.key)&&o.preventDefault())})})})});UD.displayName=FD;var lre="DropdownMenuPortal",ZD=e=>{const{__scopeDropdownMenu:t,...n}=e,i=Zn(t);return u.jsx(Gse,{...i,...n})};ZD.displayName=lre;var $D="DropdownMenuContent",WD=x.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...i}=e,s=VD($D,n),r=Zn(n),a=x.useRef(!1);return u.jsx(Yse,{id:s.contentId,"aria-labelledby":s.triggerId,...r,...i,ref:t,onCloseAutoFocus:pe(e.onCloseAutoFocus,o=>{var c;a.current||(c=s.triggerRef.current)==null||c.focus(),a.current=!1,o.preventDefault()}),onInteractOutside:pe(e.onInteractOutside,o=>{const c=o.detail.originalEvent,d=c.button===0&&c.ctrlKey===!0,h=c.button===2||d;(!s.modal||h)&&(a.current=!0)}),style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});WD.displayName=$D;var cre="DropdownMenuGroup",ure=x.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...i}=e,s=Zn(n);return u.jsx(qse,{...s,...i,ref:t})});ure.displayName=cre;var dre="DropdownMenuLabel",GD=x.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...i}=e,s=Zn(n);return u.jsx(Xse,{...s,...i,ref:t})});GD.displayName=dre;var fre="DropdownMenuItem",YD=x.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...i}=e,s=Zn(n);return u.jsx(Kse,{...s,...i,ref:t})});YD.displayName=fre;var hre="DropdownMenuCheckboxItem",qD=x.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...i}=e,s=Zn(n);return u.jsx(Qse,{...s,...i,ref:t})});qD.displayName=hre;var mre="DropdownMenuRadioGroup",gre=x.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...i}=e,s=Zn(n);return u.jsx(Jse,{...s,...i,ref:t})});gre.displayName=mre;var pre="DropdownMenuRadioItem",XD=x.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...i}=e,s=Zn(n);return u.jsx(ere,{...s,...i,ref:t})});XD.displayName=pre;var vre="DropdownMenuItemIndicator",KD=x.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...i}=e,s=Zn(n);return u.jsx(tre,{...s,...i,ref:t})});KD.displayName=vre;var xre="DropdownMenuSeparator",QD=x.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...i}=e,s=Zn(n);return u.jsx(nre,{...s,...i,ref:t})});QD.displayName=xre;var yre="DropdownMenuArrow",_re=x.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...i}=e,s=Zn(n);return u.jsx(ire,{...s,...i,ref:t})});_re.displayName=yre;var bre="DropdownMenuSubTrigger",JD=x.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...i}=e,s=Zn(n);return u.jsx(sre,{...s,...i,ref:t})});JD.displayName=bre;var wre="DropdownMenuSubContent",eP=x.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...i}=e,s=Zn(n);return u.jsx(rre,{...s,...i,ref:t,style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});eP.displayName=wre;var Sre=HD,Cre=UD,Mre=ZD,tP=WD,nP=GD,iP=YD,sP=qD,rP=XD,aP=KD,oP=QD,lP=JD,cP=eP;const Tre=Sre,jre=Cre,Nre=x.forwardRef(({className:e,inset:t,children:n,...i},s)=>u.jsxs(lP,{ref:s,className:ye("flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent data-[state=open]:bg-accent [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",t&&"pl-8",e),...i,children:[n,u.jsx(SX,{className:"ml-auto"})]}));Nre.displayName=lP.displayName;const kre=x.forwardRef(({className:e,...t},n)=>u.jsx(cP,{ref:n,className:ye("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-[--radix-dropdown-menu-content-transform-origin]",e),...t}));kre.displayName=cP.displayName;const uP=x.forwardRef(({className:e,sideOffset:t=4,...n},i)=>u.jsx(Mre,{children:u.jsx(tP,{ref:i,sideOffset:t,className:ye("z-50 max-h-[var(--radix-dropdown-menu-content-available-height)] min-w-[8rem] overflow-y-auto overflow-x-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md","data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-[--radix-dropdown-menu-content-transform-origin]",e),...n})}));uP.displayName=tP.displayName;const Xy=x.forwardRef(({className:e,inset:t,...n},i)=>u.jsx(iP,{ref:i,className:ye("relative flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&>svg]:size-4 [&>svg]:shrink-0",t&&"pl-8",e),...n}));Xy.displayName=iP.displayName;const Ere=x.forwardRef(({className:e,children:t,checked:n,...i},s)=>u.jsxs(sP,{ref:s,className:ye("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),checked:n,...i,children:[u.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:u.jsx(aP,{children:u.jsx(fE,{className:"h-4 w-4"})})}),t]}));Ere.displayName=sP.displayName;const Are=x.forwardRef(({className:e,children:t,...n},i)=>u.jsxs(rP,{ref:i,className:ye("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...n,children:[u.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:u.jsx(aP,{children:u.jsx(TX,{className:"h-2 w-2 fill-current"})})}),t]}));Are.displayName=rP.displayName;const Ore=x.forwardRef(({className:e,inset:t,...n},i)=>u.jsx(nP,{ref:i,className:ye("px-2 py-1.5 text-sm font-semibold",t&&"pl-8",e),...n}));Ore.displayName=nP.displayName;const Dre=x.forwardRef(({className:e,...t},n)=>u.jsx(oP,{ref:n,className:ye("-mx-1 my-1 h-px bg-muted",e),...t}));Dre.displayName=oP.displayName;function Pre(){const e=x.useContext(Un),[t,n]=x.useState([]),[i,s]=x.useState(!1),r=async()=>{const o=await K("get_alerts",{gangId:e.gangId});n(o||[])},a=async o=>{const c=await K("toggle_display_area_on_map",{alert:o});o.displayed=c,n(d=>d.map(h=>h.id===o.id?o:h))};return ss("state:alerts",()=>{(data==null?void 0:data.gangId)===e.gangId&&s(!i)}),x.useEffect(()=>{r()},[i]),u.jsx(de.div,{className:"mt-[5%] w-4/5 mx-auto h-[85%] flex flex-col items-center justify-start gap-6",initial:{opacity:0},animate:{opacity:1},transition:{duration:.2},children:u.jsxs(St,{className:"w-full bg-card text-card-foreground border-border p-4 h-full",children:[u.jsx(Qn,{children:u.jsx(Jn,{className:"text-2xl",children:C("menu.alerts")})}),u.jsx(pn,{className:"h-[85%]",children:u.jsx(rs,{className:"h-full ",children:u.jsx("div",{className:"px-0 grid grid-cols-2 gap-2 h-full",children:t.length>0?t.map((o,c)=>u.jsxs("div",{className:"flex flex-col border p-3 rounded-lg w-full",children:[u.jsxs("div",{className:"flex items-center justify-between",children:[u.jsxs("h2",{className:"text-lg font-semibold",children:[o.label," "]}),u.jsxs(Tre,{modal:!1,children:[u.jsx(jre,{asChild:!0,children:u.jsx(OG,{className:"bg-background "})}),u.jsxs(uP,{children:[u.jsxs(Xy,{className:"text-xs",onClick:()=>a(o),children:[u.jsx(AG,{}),C("menu.toggle_area")]}),u.jsxs(Xy,{className:"text-xs",onClick:()=>{K("delete_alert",{alertId:o.id}),n(d=>d.filter(h=>h.id!==o.id))},children:[u.jsx(JG,{}),C("menu.delete_alert")]})]})]})]}),u.jsxs("span",{className:"text-xs text-muted-foreground",children:[C("menu.alert_id",[["id",o.id]])," - "+new Date(o.timestamp).toLocaleString()]}),u.jsx("p",{className:"text-xs text-muted-foreground max-w-full break-words mt-3",children:o.message}),u.jsx("div",{className:"flex items-center justify-between ml-auto"})]},c)):u.jsx("div",{className:"text-sm text-muted-foreground",children:C("menu.no_alerts")})})})})]})})}const F5=({gangData2:e,tablet:t=!1})=>{const[n,i]=x.useState(null),[s,r]=x.useState("home"),[a,o]=x.useState(!1),[c,d]=x.useState(!1),h=[{value:"home",label:C("menu.home"),icon:u.jsx(BG,{}),activeIcon:u.jsx(VG,{})},{value:"tasks",label:C("menu.tasks"),icon:u.jsx(vG,{}),activeIcon:u.jsx(xG,{})},{value:"events",label:C("menu.events"),icon:u.jsx(bG,{}),activeIcon:u.jsx(wG,{})},{value:"members",label:C("menu.members"),icon:u.jsx($G,{}),activeIcon:u.jsx(WG,{})},{value:"roles",label:C("menu.roles"),icon:u.jsx(yG,{}),activeIcon:u.jsx(_G,{})},{value:"zones",label:C("menu.zones"),icon:u.jsx(HG,{}),activeIcon:u.jsx(FG,{})},{value:"wars",label:C("menu.wars"),icon:u.jsx(DG,{}),activeIcon:u.jsx(PG,{})},{value:"transfers",label:C("menu.transfers"),icon:u.jsx(nY,{}),activeIcon:u.jsx(iY,{})},{value:"upgrades",label:C("menu.upgrades"),icon:u.jsx(kG,{}),activeIcon:u.jsx(EG,{})},{value:"vehicles",label:C("menu.vehicles"),icon:u.jsx(SG,{}),activeIcon:u.jsx(CG,{})},{value:"alerts",label:C("menu.alerts"),icon:u.jsx(fG,{}),activeIcon:u.jsx(hG,{})},{value:"logs",label:C("menu.logs"),icon:u.jsx(RG,{}),activeIcon:u.jsx(LG,{})},{value:"statistics",label:C("menu.statistics"),icon:u.jsx(gG,{}),activeIcon:u.jsx(pG,{})},{value:"scoreboard",label:C("menu.scoreboard"),icon:u.jsx(eY,{}),activeIcon:u.jsx(tY,{})},{value:"settings",label:C("menu.settings"),icon:u.jsx(qG,{}),activeIcon:u.jsx(XG,{})}];ss("update_gang_data",g=>{var v;i(g.gangData),(v=g.gangData)!=null&&v.color&&Ag([{name:"gang_color",value:g.gangData.color}])}),x.useEffect(()=>{e&&(i(e),Ag([{name:"gang_color",value:e.color}]))},[e]);const m=()=>{switch(s){case"home":return u.jsx(wC,{setPage:r});case"transfers":return u.jsx(GX,{});case"logs":return u.jsx(YX,{});case"statistics":return u.jsx(pse,{});case"settings":return u.jsx(Uie,{});case"tasks":return u.jsx(Qie,{});case"members":return u.jsx(HQ,{});case"roles":return u.jsx(XQ,{});case"zones":return u.jsx(Oie,{});case"wars":return u.jsx(rse,{});case"upgrades":return u.jsx(Jie,{});case"vehicles":return u.jsx(tse,{});case"scoreboard":return u.jsx(ese,{});case"events":return u.jsx(nse,{});case"alerts":return u.jsx(Pre,{});default:return u.jsx(wC,{setPage:r})}};return n?u.jsx(Un.Provider,{value:n,children:u.jsx("div",{className:`flex flex-col items-center justify-center h-screen w-screen overflow-hidden text-foreground ${t?"bg-background":""}`,children:u.jsxs("div",{className:`relative overflow-hidden flex flex-row items-center bg-background border border-border shadow-lg
                        ${t?"w-full h-full rounded-none":"w-[75%] h-[85%] rounded-xl"}
                        transition-opacity duration-300 ${c&&!t?"opacity-75":"opacity-100"}`,onMouseLeave:()=>{t||d(!0)},onMouseEnter:()=>{t||d(!1)},children:[u.jsx("div",{onMouseEnter:()=>o(!0),onMouseLeave:()=>o(!1),className:`absolute left-0 h-full z-30 transition-all duration-300 ease-in-out border-r border-border ${t?"bg-background":"bg-card"} ${a?"w-40":"w-12"}`,children:u.jsx("div",{className:"flex flex-col justify-between hfull p-1.5",children:u.jsx("div",{className:"flex flex-col h-full gap-1",children:h.map(g=>{var b;if((g.value==="settings"||g.value==="upgrades"||g.value==="vehicles")&&!n.isOwner||(b=he==null?void 0:he.ui)!=null&&b.toggleSidebars&&!he.ui.toggleSidebars[g.value])return null;const v=s===g.value;return u.jsxs("div",{className:`p-2 cursor-pointer rounded-lg transition-colors flex items-center gap-3
                                                relative
                                                ${v?"bg-primary text-primary-foreground":"text-muted-foreground hover:bg-muted hover:text-foreground"}`,onClick:()=>r(g.value),children:[u.jsx("span",{className:"text-lg flex justify-center items-center",children:v?g.activeIcon:g.icon}),a&&u.jsx(de.span,{initial:{opacity:0,x:-10},animate:{opacity:1,x:0},exit:{opacity:0,x:-10},transition:{duration:.2},className:"text-xs absolute ml-8",children:g.label})]},g.value)})})})}),u.jsxs("div",{className:"relative opacity-0.8 flex flex-col items-center w-full h-full overflow-y-auto pl-12 transition-all duration-300 ease-in-out ",children:[a&&!t&&u.jsx(de.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{duration:.2},className:"absolute inset-0 z-20 bg-black/30 backdrop-blur-sm md:hidden",onClick:()=>o(!1)}),u.jsxs("div",{className:"w-full h-full p-0",children:[" ",m()]})]}),!t&&u.jsx(cl,{})," "]})})}):null},Rre=()=>{const[e,t]=x.useState(0),[n,i]=x.useState(!1),[s,r]=x.useState(""),[a,o]=x.useState(!1),[c,d]=x.useState(""),[h,m]=x.useState(!1),[g,v]=x.useState(""),[b,w]=x.useState(0),[M,y]=x.useState(0),S=async()=>{const E=await K("get_money_laundering_load");y(E.capacity),t(E.load),w(E.washed)};x.useEffect(()=>{S();const E=setInterval(()=>{S()},5e3);return()=>clearInterval(E)},[]);const T=()=>{s&&K("wash_money",{amount:parseInt(s)}),i(!1),r("")},N=()=>{c&&K("withdraw_dirty_cash",{amount:parseInt(c)}),o(!1),d("")},k=()=>{g&&K("withdraw_clean_cash",{amount:parseInt(g)}),m(!1),v("")};return u.jsxs("div",{className:"fixed inset-0 flex items-center justify-center bg-black/50 z-50 p-4",children:[u.jsx(Mr,{open:n,onOpenChange:i,children:u.jsxs(Tr,{children:[u.jsxs(jr,{children:[u.jsx(Nr,{children:C("money_laundery.wash_money")}),u.jsx(ka,{children:C("money_laundery.wash_money_desc")})]}),u.jsx(wt,{type:"number",placeholder:C("money_laundery.amount"),value:s,onChange:E=>r(E.target.value),className:"mt-2"}),u.jsxs(Na,{children:[u.jsx(ne,{variant:"outline",onClick:()=>i(!1),children:C("cancel")}),u.jsx(ne,{onClick:T,children:C("confirm")})]})]})}),u.jsx(Mr,{open:a,onOpenChange:o,children:u.jsxs(Tr,{children:[u.jsxs(jr,{children:[u.jsx(Nr,{children:C("money_laundery.withdraw_dirty_cash")}),u.jsx(ka,{children:C("money_laundery.withdraw_dirty_cash_desc")})]}),u.jsx(wt,{type:"number",placeholder:C("money_laundery.amount"),value:c,onChange:E=>d(E.target.value),className:"mt-2"}),u.jsxs(Na,{children:[u.jsx(ne,{variant:"outline",onClick:()=>o(!1),children:C("cancel")}),u.jsx(ne,{onClick:N,children:C("confirm")})]})]})}),u.jsx(Mr,{open:h,onOpenChange:m,children:u.jsxs(Tr,{children:[u.jsxs(jr,{children:[u.jsx(Nr,{children:C("money_laundery.withdraw_clean_cash")}),u.jsx(ka,{children:C("money_laundery.withdraw_clean_cash_desc")})]}),u.jsx(wt,{type:"number",placeholder:C("money_laundery.amount"),value:g,onChange:E=>v(E.target.value),className:"mt-2"}),u.jsxs(Na,{children:[u.jsx(ne,{variant:"outline",onClick:()=>m(!1),children:C("cancel")}),u.jsx(ne,{onClick:k,children:C("confirm")})]})]})}),u.jsxs(de.div,{className:"relative bg-card text-card-foreground rounded-lg p-6 space-y-4 border border-border shadow-lg w-full max-w-md",initial:{opacity:0,scale:.9},animate:{opacity:1,scale:1},transition:{duration:.2},children:[u.jsx(cl,{})," ",u.jsx("div",{className:"text-xl font-bold text-center",children:C("money_laundery.money_laundering")}),u.jsxs("div",{className:"space-y-2",children:[u.jsxs("div",{className:"flex flex-col items-center text-base",children:[C("money_laundery.current_dirty_cash_load"),u.jsxs("span",{className:"text-sm text-muted-foreground",children:[e,"/",M]})]}),u.jsx(Oa,{value:M>0?e/M*100:0,className:"w-full h-4"}),u.jsx("div",{className:"w-full h-px bg-border my-2"}),u.jsxs("div",{className:"flex flex-col items-center text-base",children:[C("money_laundery.washed_money"),u.jsxs("span",{className:"text-sm text-muted-foreground",children:[b," ",C("currency")]})]}),u.jsx("div",{className:"w-full h-px bg-border my-2"}),u.jsx(ne,{className:"w-full text-sm py-2 hover:bg-muted",variant:"outline",onClick:()=>o(!0),children:C("money_laundery.withdraw_dirty_cash")}),u.jsx(ne,{className:"w-full text-sm py-2 hover:bg-muted",variant:"outline",onClick:()=>m(!0),children:C("money_laundery.withdraw_clean_cash")}),u.jsx(ne,{className:"w-full text-sm py-2 hover:bg-muted",variant:"outline",onClick:()=>i(!0),children:C("money_laundery.wash_money")})]})]})]})},rr=({label:e,value:t,onChange:n,placeholder:i,type:s="text",errorCondition:r,errorMsg:a=C("required")})=>u.jsxs("div",{className:"flex flex-col gap-1.5 w-full",children:[u.jsxs("div",{className:"text-sm font-medium text-foreground flex justify-between items-center",children:[u.jsx("span",{children:e}),r&&u.jsx("span",{className:"text-xs text-destructive",children:a})]}),u.jsx(wt,{value:t,onChange:n,type:s,placeholder:i,className:r?"border-destructive":"border-input"})]}),Lre=()=>{const[e,t]=x.useState(!0),[n,i]=x.useState(!1),[s,r]=x.useState(null),[a,o]=x.useState(""),[c,d]=x.useState(""),[h,m]=x.useState(3),[g,v]=x.useState([]),[b,w]=x.useState(null),[M,y]=x.useState(null),[S,T]=x.useState(!1),[N,k]=x.useState(null),[E,D]=x.useState(!1),O=async(R,$)=>{if(R==="confirm"){const B=await K("get_identifier",{id:$.id}),W=await K("get_identifier_name",{identifier:B});$.name=W,r($)}else r(null)};x.useEffect(()=>{P()},[]);const I=R=>{for(let $=0;$<R.types.length;$++)if(R.types[$]==="safeHouse")return!0;return!1},P=async()=>{const R=await K("get_gangs");v(R)},H=async()=>{if(i(!0),a===""||s===null||c==="")return;const R=parseInt(c);if(isNaN(R)){m(0);return}let B=(await K("get_all_zones")).find(se=>se.id==R),W=!1;if(B)W=I(B);else{m(0);return}if(!W){m(1);return}if((await K("get_gangs")).some(se=>se.safe_house_zone===R)){m(2);return}m(3),i(!1),K("create_gang",{name:a,safeHouseZoneId:c,owner:s.id}),o(""),d(""),r(null),P()},V=async R=>{K("remove_gang",{gangId:b.gang_id}),w(null),y(null),P(),k(null)},J=async R=>{if(i(!0),!M.name||!M.safe_house_zone||M.cash===void 0||M.cash.toString()===""||M.dirty_cash===void 0||M.dirty_cash.toString()===""||M.gang_rep===void 0||M.gang_rep.toString()===""||M.level===void 0||M.level.toString()===""){k(null);return}else K("update_gang",{gang:M}),w(null),y(null),P();k(null),i(!1)},Q=async R=>{const $=await K("get_identifier_name",{identifier:R.owner}),B={...R,owner_name:$};y(B),w(B),i(!1)},U=async(R,$)=>{if(R==="confirm"){const B=await K("get_identifier",{id:$.id}),W=await K("get_identifier_name",{identifier:B});y(G=>({...G,owner_name:W,owner:B}))}T(!1)};return u.jsxs("div",{className:"flex justify-center items-center min-h-screen p-4",children:[u.jsxs(oa,{children:[S&&u.jsx(xf,{actionClicked:U}),s==="show"&&u.jsx(xf,{actionClicked:O})]}),u.jsx(oa,{children:N==="remove_gang"&&u.jsx(Is,{open:!0,onOpenChange:()=>k(null),children:u.jsxs(Bs,{children:[u.jsx(Hs,{children:C("manage_gangs.remove_gang")}),u.jsx(Fs,{children:C("manage_gangs.remove_gang_text")}),u.jsxs(Vs,{children:[u.jsx(Us,{children:C("cancel")}),u.jsx(Va,{onClick:()=>V(),className:"bg-destructive hover:bg-destructive/90",children:C("confirm")})]})]})})}),u.jsx(oa,{children:N==="update_gang"&&u.jsx(Is,{open:!0,onOpenChange:()=>k(null),children:u.jsxs(Bs,{children:[u.jsx(Hs,{children:C("manage_gangs.update_gang")}),u.jsx(Fs,{children:C("manage_gangs.update_gang_text")}),u.jsxs(Vs,{children:[u.jsx(Us,{children:C("cancel")}),u.jsx(Va,{onClick:()=>J(),className:"bg-primary hover:bg-primary/90",children:C("confirm")})]})]})})}),u.jsx(oa,{children:b&&M&&u.jsx(de.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{duration:.2},className:"fixed z-10 inset-0 w-screen h-screen flex justify-center items-center p-4",children:u.jsxs(de.div,{initial:{opacity:0,scale:.95},animate:{opacity:1,scale:1},exit:{opacity:0,scale:.95},transition:{duration:.2},className:"z-20 flex flex-col items-center gap-4 w-1/2 p-6 rounded-lg bg-card text-card-foreground border border-border shadow-lg max-h-[90vh]",children:[u.jsxs("div",{className:"flex justify-between items-center w-full",children:[u.jsx("div",{className:"text-xl font-bold",children:C("manage_gangs.editing_gang_id",[["id",b.gang_id]])}),u.jsx(ne,{variant:"ghost",size:"icon",onClick:()=>{w(null),y(null)},children:u.jsx(hE,{className:"h-4 w-4"})})]}),u.jsx(rs,{className:"h-[60vh] w-full pr-4",children:u.jsxs("div",{className:"flex flex-col gap-4",children:[u.jsx(rr,{label:C("manage_gangs.edit_gang_name"),value:M.name,onChange:R=>y($=>({...$,name:R.target.value})),placeholder:C("manage_gangs.gang_name"),errorCondition:n&&!M.name}),u.jsx(rr,{label:C("manage_gangs.edit_safe_house_id"),value:M.safe_house_zone,onChange:R=>y($=>({...$,safe_house_zone:R.target.value})),type:"number",placeholder:C("manage_gangs.safe_house_zone_id"),errorCondition:n&&!M.safe_house_zone}),u.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[u.jsx(rr,{label:C("manage_gangs.edit_clean_cash"),value:M.cash,onChange:R=>y($=>({...$,cash:R.target.value})),type:"number",placeholder:C("manage_gangs.clean_cash"),errorCondition:n&&(M.cash===void 0||M.cash.toString()==="")}),u.jsx(rr,{label:C("manage_gangs.edit_dirty_cash"),value:M.dirty_cash,onChange:R=>y($=>({...$,dirty_cash:R.target.value})),type:"number",placeholder:C("manage_gangs.edit_dirty_cash"),errorCondition:n&&(M.dirty_cash===void 0||M.dirty_cash.toString()==="")})]}),u.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[u.jsx(rr,{label:C("manage_gangs.edit_gang_rep"),value:M.gang_rep,onChange:R=>y($=>({...$,gang_rep:R.target.value})),type:"number",placeholder:C("manage_gangs.edit_gang_rep"),errorCondition:n&&(M.gang_rep===void 0||M.gang_rep.toString()==="")}),u.jsx(rr,{label:C("manage_gangs.edit_level"),value:M.level,onChange:R=>y($=>({...$,level:R.target.value})),type:"number",placeholder:C("manage_gangs.gang_level"),errorCondition:n&&(M.level===void 0||M.level.toString()==="")})]}),u.jsxs("div",{className:"flex flex-col gap-1.5 w-full",children:[u.jsxs("div",{className:"text-sm font-medium text-foreground flex justify-start items-center gap-2",children:[u.jsx("div",{style:{backgroundColor:M.color,width:"1rem",height:"1rem",borderRadius:"50%",border:"1px solid hsl(var(--border))"}}),u.jsx("span",{children:C("manage_gangs.edit_gang_color")})]}),u.jsx(ne,{variant:"outline",className:"w-full",onClick:()=>D(!0),children:C("manage_gangs.select_gang_color")})]}),u.jsx(oa,{children:E&&u.jsx(de.div,{initial:{opacity:0,height:0},animate:{opacity:1,height:"auto"},exit:{opacity:0,height:0},transition:{duration:.2},children:u.jsx(iD,{handleNewColor:R=>{R&&y({...M,color:R.hex}),D(!1)}})})}),u.jsx(rr,{label:C("manage_gangs.edit_gang_logo"),value:M.logo||"",onChange:R=>y($=>({...$,logo:R.target.value})),placeholder:C("manage_gangs.logo_url")}),u.jsxs("div",{className:"flex flex-col gap-1.5 w-full",children:[u.jsx("div",{className:"text-sm font-medium text-foreground flex justify-between items-center",children:u.jsx("span",{children:C("manage_gangs.current_gang_owner",[["owner",M.owner_name]])})}),u.jsx(ne,{variant:"outline",className:"w-full",onClick:()=>T(!0),children:C("manage_gangs.select_owner")})]})]})}),u.jsxs("div",{className:"grid grid-cols-2 w-full items-center gap-2 mt-4",children:[u.jsx(ne,{variant:"outline",onClick:()=>y(b),children:C("reset")}),u.jsx(ne,{variant:"destructive",onClick:()=>k("remove_gang"),children:C("manage_gangs.remove_gang")}),u.jsx(ne,{variant:"outline",onClick:()=>{w(null),y(null)},children:C("cancel")}),u.jsx(ne,{onClick:()=>k("update_gang"),children:C("manage_gangs.update_gang")})]})]})})}),u.jsxs(St,{className:"w-1/3 p-6",children:[u.jsx(cl,{}),u.jsx("div",{className:"text-2xl font-bold w-full mb-6 text-center",children:C("manage_gangs.manage_gangs")}),u.jsxs(_0,{defaultValue:e?"edit":"create",className:"w-full",onValueChange:R=>t(R==="edit"),children:[u.jsxs(qf,{className:"grid w-full grid-cols-2",children:[u.jsx(ci,{value:"edit",children:C("manage_gangs.edit_gang")}),u.jsx(ci,{value:"create",children:C("manage_gangs.create_new_gang")})]}),u.jsx(ip,{value:"edit",className:"mt-6",children:u.jsxs("div",{className:"w-full flex flex-col justify-center items-center gap-2",children:[u.jsx("div",{className:"w-full font-bold text-xl mb-2",children:C("manage_gangs.gangs")}),g.length>0?u.jsx("div",{className:"grid gap-2 w-full",children:g.map((R,$)=>u.jsxs(de.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.2,delay:$*.05},className:"flex flex-row items-center p-2 rounded-lg w-full gap-2 justify-between bg-background border border-border hover:bg-accent/50 transition-colors",children:[u.jsxs("div",{className:"text-base",children:[R.name," #",R.gang_id]}),u.jsx(ne,{variant:"ghost",onClick:()=>Q(R),children:C("manage_gangs.edit")})]},$))}):u.jsx("p",{className:"text-muted-foreground",children:C("manage_gangs.no_gangs_found")})]})}),u.jsx(ip,{value:"create",className:"mt-6",children:u.jsxs("div",{className:"w-full flex flex-col justify-center items-center gap-4",children:[u.jsx("div",{className:"w-full font-bold text-xl mb-2",children:C("manage_gangs.create_new_gang")}),u.jsx(rr,{label:C("input_gang_name"),value:a,onChange:R=>o(R.target.value),placeholder:C("gang_name"),errorCondition:n&&a===""}),u.jsx(rr,{label:C("manage_gangs.input_safe_house_id"),value:c,onChange:R=>d(R.target.value),type:"number",placeholder:C("manage_gangs.safe_house_zone_id"),errorCondition:n&&(c===""||h!==3),errorMsg:n&&c===""?C("required"):n&&h===0?C("manage_gangs.zone_does_not_exist"):n&&h===1?C("manage_gangs.zone_not_safe_house"):n&&h===2?C("manage_gangs.safe_house_claimed"):""}),u.jsxs("div",{className:"flex flex-col gap-1.5 w-full",children:[u.jsxs("div",{className:"text-sm font-medium text-foreground flex justify-between items-center",children:[u.jsx("span",{children:C("manage_gangs.current_gang_owner",[["owner",s?s.name:C("not_selected")]])}),n&&s==null&&u.jsx("span",{className:"text-xs text-destructive",children:C("required")})]}),u.jsx(ne,{variant:"outline",className:"w-full",onClick:()=>r("show"),children:C("manage_gangs.select_owner")})]}),u.jsx(ne,{className:"w-full mt-4",onClick:H,children:C("manage_gangs.create_gang")})]})})]})]})]})};/*! *****************************************************************************
Copyright (c) Microsoft Corporation. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
this file except in compliance with the License. You may obtain a copy of the
License at http://www.apache.org/licenses/LICENSE-2.0

THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
MERCHANTABLITY OR NON-INFRINGEMENT.

See the Apache Version 2.0 License for specific language governing permissions
and limitations under the License.
***************************************************************************** */var Ky=function(e,t){return Ky=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var s in i)i.hasOwnProperty(s)&&(n[s]=i[s])},Ky(e,t)};function zre(e,t){Ky(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}var Ire=100,Bre=100,U5=50,Qy=50,Jy=50;function Z5(e){var t=e.className,n=e.counterClockwise,i=e.dashRatio,s=e.pathRadius,r=e.strokeWidth,a=e.style;return x.createElement("path",{className:t,style:Object.assign({},a,Hre({pathRadius:s,dashRatio:i,counterClockwise:n})),d:Vre({pathRadius:s,counterClockwise:n}),strokeWidth:r,fillOpacity:0})}function Vre(e){var t=e.pathRadius,n=e.counterClockwise,i=t,s=n?1:0;return`
      M `+Qy+","+Jy+`
      m 0,-`+i+`
      a `+i+","+i+" "+s+" 1 1 0,"+2*i+`
      a `+i+","+i+" "+s+" 1 1 0,-"+2*i+`
    `}function Hre(e){var t=e.counterClockwise,n=e.dashRatio,i=e.pathRadius,s=Math.PI*2*i,r=(1-n)*s;return{strokeDasharray:s+"px "+s+"px",strokeDashoffset:(t?-r:r)+"px"}}var Fre=function(e){zre(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.getBackgroundPadding=function(){return this.props.background?this.props.backgroundPadding:0},t.prototype.getPathRadius=function(){return U5-this.props.strokeWidth/2-this.getBackgroundPadding()},t.prototype.getPathRatio=function(){var n=this.props,i=n.value,s=n.minValue,r=n.maxValue,a=Math.min(Math.max(i,s),r);return(a-s)/(r-s)},t.prototype.render=function(){var n=this.props,i=n.circleRatio,s=n.className,r=n.classes,a=n.counterClockwise,o=n.styles,c=n.strokeWidth,d=n.text,h=this.getPathRadius(),m=this.getPathRatio();return x.createElement("svg",{className:r.root+" "+s,style:o.root,viewBox:"0 0 "+Ire+" "+Bre,"data-test-id":"CircularProgressbar"},this.props.background?x.createElement("circle",{className:r.background,style:o.background,cx:Qy,cy:Jy,r:U5}):null,x.createElement(Z5,{className:r.trail,counterClockwise:a,dashRatio:i,pathRadius:h,strokeWidth:c,style:o.trail}),x.createElement(Z5,{className:r.path,counterClockwise:a,dashRatio:m*i,pathRadius:h,strokeWidth:c,style:o.path}),d?x.createElement("text",{className:r.text,style:o.text,x:Qy,y:Jy},d):null)},t.defaultProps={background:!1,backgroundPadding:0,circleRatio:1,classes:{root:"CircularProgressbar",trail:"CircularProgressbar-trail",path:"CircularProgressbar-path",text:"CircularProgressbar-text",background:"CircularProgressbar-background"},counterClockwise:!1,className:"",maxValue:100,minValue:0,strokeWidth:8,styles:{root:{},trail:{},path:{},text:{},background:{}},text:""},t}(x.Component);function Ure(e){var t=e.rotation,n=e.strokeLinecap,i=e.textColor,s=e.textSize,r=e.pathColor,a=e.pathTransition,o=e.pathTransitionDuration,c=e.trailColor,d=e.backgroundColor,h=t==null?void 0:"rotate("+t+"turn)",m=t==null?void 0:"center center";return{root:{},path:xm({stroke:r,strokeLinecap:n,transform:h,transformOrigin:m,transition:a,transitionDuration:o==null?void 0:o+"s"}),trail:xm({stroke:c,strokeLinecap:n,transform:h,transformOrigin:m}),text:xm({fill:i,fontSize:s}),background:xm({fill:d})}}function xm(e){return Object.keys(e).forEach(function(t){e[t]==null&&delete e[t]}),e}function Zre(){const[e,t]=x.useState(null),[n,i]=x.useState(null),[s,r]=x.useState(!1),[a,o]=x.useState(!1);return ss("syncCapturing",c=>{t(c.capture),i(c.capture.capturingGangs),r(c.capture.paused),o(c.capture.defending)}),u.jsxs("div",{className:"wrapper-for-capturing-positioning",children:[" ",e&&n&&u.jsx(de.div,{className:"m-4 self-start p-0.5 rounded-full flex flex-col text-center items-center justify-center text-foreground",initial:{opacity:0,scale:.9},animate:{opacity:1,scale:1},exit:{opacity:0,scale:.9},transition:{duration:.2},children:u.jsxs("div",{className:"relative flex justify-center items-center text-xs text-foreground",children:[u.jsxs("div",{className:"absolute flex flex-row w-60 rounded-lg justify-between bg-background border border-border p-1 opacity-95",children:[u.jsxs("span",{className:"text-center w-[calc(50%-0.75rem)] text-[0.65rem] font-bold flex flex-col justify-center items-center gap-0 leading-tight",children:[C("capturing"),u.jsx("div",{className:"text-xs font-normal text-foreground max-w-12 overflow-hidden text-ellipsis whitespace-nowrap",children:n[0].gangName})]}),u.jsxs("span",{className:"text-center w-[calc(50%-0.75rem)] text-[0.65rem] font-bold flex flex-col justify-center items-center gap-0 leading-tight",children:[C(a?"actively_defending":"controlling"),u.jsx("div",{className:"text-xs font-normal text-foreground max-w-12 overflow-hidden text-ellipsis whitespace-nowrap",children:e.capturing.ownerName})]})]}),u.jsx("div",{className:"relative w-12 h-12 rounded-full bg-background border border-border",children:s||a?u.jsx("div",{className:"w-full h-full flex justify-center items-center p-0 m-0",children:a?u.jsx(KG,{className:"text-foreground text-xl absolute m-0 p-0"}):u.jsx(ZG,{className:"text-foreground text-xl absolute m-0 p-0"})}):u.jsx(Fre,{value:(e.capturing.totalTime-e.capturing.time)/e.capturing.totalTime*100,text:`${Math.round((e.capturing.totalTime-e.capturing.time)/e.capturing.totalTime*100)}%`,background:!1,backgroundPadding:0,strokeWidth:5,styles:Ure({trailColor:" transparent",textColor:"hsl(var(--foreground))",textSize:"1.2rem",pathColor:"var(--gang_color)"})})})]})})]})}function $re(e){return oe({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M503.47 360.25c-1.56-.82-32.39-16.89-76.78-25.81 64.25-75.12 84.05-161.67 84.93-165.64 1.18-5.33-.44-10.9-4.3-14.77-3.03-3.04-7.12-4.7-11.32-4.7-1.14 0-2.29.12-3.44.38-3.88.85-86.54 19.59-160.58 79.76.01-1.46.01-2.93.01-4.4 0-118.79-59.98-213.72-62.53-217.7A15.973 15.973 0 0 0 256 0c-5.45 0-10.53 2.78-13.47 7.37-2.55 3.98-62.53 98.91-62.53 217.7 0 1.47.01 2.94.01 4.4-74.03-60.16-156.69-78.9-160.58-79.76-1.14-.25-2.29-.38-3.44-.38-4.2 0-8.29 1.66-11.32 4.7A15.986 15.986 0 0 0 .38 168.8c.88 3.97 20.68 90.52 84.93 165.64-44.39 8.92-75.21 24.99-76.78 25.81a16.003 16.003 0 0 0-.02 28.29c2.45 1.29 60.76 31.72 133.49 31.72 6.14 0 11.96-.1 17.5-.31-11.37 22.23-16.52 38.31-16.81 39.22-1.8 5.68-.29 11.89 3.91 16.11a16.019 16.019 0 0 0 16.1 3.99c1.83-.57 37.72-11.99 77.3-39.29V504c0 4.42 3.58 8 8 8h16c4.42 0 8-3.58 8-8v-64.01c39.58 27.3 75.47 38.71 77.3 39.29a16.019 16.019 0 0 0 16.1-3.99c4.2-4.22 5.71-10.43 3.91-16.11-.29-.91-5.45-16.99-16.81-39.22 5.54.21 11.37.31 17.5.31 72.72 0 131.04-30.43 133.49-31.72 5.24-2.78 8.52-8.22 8.51-14.15-.01-5.94-3.29-11.39-8.53-14.15z"},child:[]}]})(e)}function $5(e){return oe({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M256 8C119 8 8 119 8 256s111 248 248 248 248-111 248-248S393 8 256 8zm144 276c0 6.6-5.4 12-12 12h-92v92c0 6.6-5.4 12-12 12h-56c-6.6 0-12-5.4-12-12v-92h-92c-6.6 0-12-5.4-12-12v-56c0-6.6 5.4-12 12-12h92v-92c0-6.6 5.4-12 12-12h56c6.6 0 12 5.4 12 12v92h92c6.6 0 12 5.4 12 12v56z"},child:[]}]})(e)}ru.register(pf,sc,qb,Gb,Yb);const Wre=({plant:e})=>{const[t,n]=x.useState(0),[i,s]=x.useState(0),[r,a]=x.useState(0),[o,c]=x.useState(0);x.useEffect(()=>{e&&(n(e.growth),s(e.health),a(e.water),c(e.fertilizer))},[e]);const d={cutout:"80%",animation:{duration:1e3,easing:"easeOutQuart"},plugins:{legend:{display:!1},tooltip:{enabled:!1}}},h={labels:["Weed"],datasets:[{label:"Weed",data:[100-t,t],borderWidth:0,rotation:180,backgroundColor:["transparent","#5eb577"],hoverBackgroundColor:["transparent","#5eb577"]}]};return u.jsx("div",{className:"fixed inset-0 flex items-start justify-start p-4 pointer-events-none",children:u.jsx(de.div,{initial:{opacity:0,x:-20},animate:{opacity:1,x:0},exit:{opacity:0,x:-20},transition:{duration:.2},className:"relative w-full max-w-xs pointer-events-auto",children:u.jsxs(St,{className:"relative",children:[u.jsx(cl,{}),u.jsxs(Qn,{className:"text-center pb-2",children:[u.jsx(Jn,{className:"text-2xl font-bold",children:C("weed_inspection")}),u.jsx("p",{className:"text-sm text-muted-foreground",children:C("weed_subtitle")})]}),u.jsxs(pn,{className:"space-y-4",children:[u.jsxs("div",{className:"relative w-40 aspect-square mx-auto bg-muted rounded-full border border-border p-2 flex items-center justify-center",children:[u.jsx(gk,{data:h,options:d}),u.jsx("div",{className:"absolute text-5xl text-green-500",children:u.jsx($re,{})})]}),u.jsxs("div",{className:"space-y-3",children:[u.jsxs("div",{className:"space-y-2",children:[u.jsxs("div",{className:"flex items-center justify-between",children:[u.jsxs("div",{className:"flex items-center gap-2",children:[u.jsx(zG,{className:"text-xl text-muted-foreground"}),u.jsx("span",{className:"text-sm font-medium",children:C("health")})]}),u.jsxs("span",{className:"text-sm text-muted-foreground",children:[i,"%"]})]}),u.jsx(Oa,{value:i,className:"h-2"})]}),u.jsxs("div",{className:"space-y-2",children:[u.jsxs("div",{className:"flex items-center justify-between",children:[u.jsxs("div",{className:"flex items-center gap-2",children:[u.jsx(hJ,{className:"text-xl text-muted-foreground"}),u.jsx("span",{className:"text-sm font-medium",children:C("water")})]}),u.jsx(ne,{variant:"ghost",size:"icon",className:"h-6 w-6 text-lg",onClick:()=>K("water_plant",e),children:u.jsx($5,{})})]}),u.jsx(Oa,{value:r,className:"h-2"})]}),u.jsxs("div",{className:"space-y-2",children:[u.jsxs("div",{className:"flex items-center justify-between",children:[u.jsxs("div",{className:"flex items-center gap-2",children:[u.jsx(sse,{className:"text-xl text-muted-foreground"}),u.jsx("span",{className:"text-sm font-medium",children:C("fertilizer")})]}),u.jsx(ne,{variant:"ghost",size:"icon",className:"h-6 w-6 text-lg",onClick:()=>K("fertilize_plant",e),children:u.jsx($5,{})})]}),u.jsx(Oa,{value:o,className:"h-2"})]})]}),u.jsx(oa,{children:t>=100&&u.jsx(de.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},exit:{opacity:0,y:10},children:u.jsx(ne,{className:"w-full",onClick:()=>K("harvest_plant",e),children:C("weed.harvest")})})})]})]})})})},Gre=({rack:e})=>{const t=async r=>{await K("add_weed_drying",{rackId:r})},n=(r,a)=>{K("collect_dried_weed",{rackId:r,weedIndex:a})},s=e.rackData.length>=5?5:e.rackData.length+(e.rackData.length<he.weedProcessing.maxDryingSlots?1:0);return u.jsxs("div",{className:"fixed inset-0 flex items-center justify-center bg-black/50 z-50 p-4",children:[" ",u.jsxs(de.div,{initial:{opacity:0,scale:.9},animate:{opacity:1,scale:1},transition:{duration:.2},className:"relative bg-card text-card-foreground rounded-lg p-3 space-y-2 border border-border shadow-lg max-w-fit",children:[u.jsxs("div",{className:"text-center",children:[u.jsx("div",{className:"text-2xl font-bold",children:C("weed.weed_drying")})," ",u.jsx("div",{className:"text-xs text-muted-foreground",children:C("weed.weed_drying_subtitle")})," "]}),u.jsxs("div",{className:"grid gap-2 justify-center items-center",style:{gridTemplateColumns:`repeat(${s>0?s:1}, minmax(0, 1fr))`},children:[e.rackData.map((r,a)=>u.jsxs("div",{className:"w-32 h-32 flex flex-col items-center justify-center gap-2 bg-muted/50 border border-border rounded-md p-1",children:[" ",u.jsx("img",{src:"./items/weed_dry.png",alt:"weed",className:"w-4/5 h-4/5 object-cover filter drop-shadow-sm"})," ",r.progress<100?u.jsxs("div",{className:"w-full bg-border rounded-md h-2",children:[" ",u.jsx(Oa,{value:r.progress,className:"h-2 [&>div]:bg-primary"})," "]}):u.jsx(ne,{variant:"link",className:"text-xs text-muted-foreground hover:text-foreground h-auto p-0",onClick:()=>n(r.rack_id,r.weed_index),children:C("weed.collect")})]},a)),e.rackData.length<he.weedProcessing.maxDryingSlots&&u.jsxs("div",{className:"w-32 h-32 flex flex-col items-center justify-center gap-2 bg-muted/50 border border-border rounded-md p-1",children:[" ",u.jsx(ne,{variant:"ghost",className:"text-3xl text-muted-foreground hover:text-foreground",onClick:()=>t(e.rackId),children:u.jsx(dG,{})})]})]})]})]})},W5=({lock:e,changePass:t})=>{const[n,i]=x.useState(""),s=o=>{n.length>=10||(o.key>="0"&&o.key<="9"&&o.key!==" "?i(c=>c+o.key.toString()):o.key==="Backspace"?i(c=>c.slice(0,-1)):o.key==="Enter"&&r())};x.useEffect(()=>(window.addEventListener("keydown",s),()=>{window.removeEventListener("keydown",s)}),[n]);const r=()=>{t?K("change_password",{lock:e,password:n}):K("check_password",{lock:e,password:n})},a=o=>{n.length<10&&i(n+o)};return u.jsx("div",{className:"flex justify-center items-center min-h-screen bg-black/50",children:u.jsxs("div",{className:"flex justify-center items-center flex-col w-full sm:w-72 md:w-80 p-4 rounded-xl gap-4 bg-gradient-to-t from-background to-card shadow-lg",children:[u.jsx("div",{className:"text-xl font-semibold w-full py-2 flex justify-center items-center text-foreground bg-card/50 rounded-t-lg",children:C("door.enter_password")}),u.jsxs("div",{className:"h-10 w-[90%] overflow-hidden text-2xl flex justify-center items-center text-foreground text-center tracking-[.2em] bg-input rounded p-2 border border-border",children:[n.split("").map((o,c)=>u.jsx("div",{className:"font-mono",children:"•"},c)),n.length===0&&u.jsx("span",{className:"text-muted-foreground opacity-50 text-2xl",children:"----"})]}),u.jsxs("div",{className:"grid grid-cols-3 items-center justify-center gap-3 w-[90%]",children:[[1,2,3,4,5,6,7,8,9].map(o=>u.jsx("button",{type:"button",className:"justify-self-center text-2xl w-full flex justify-center items-center text-foreground aspect-square rounded-lg bg-card border border-border transition-colors cursor-pointer hover:bg-muted focus:outline-none focus:ring-2 focus:ring-ring",onClick:()=>a(o.toString()),children:o},o)),u.jsx("button",{type:"button",className:"justify-self-center text-2xl w-full flex justify-center items-center text-foreground aspect-square rounded-lg bg-card border border-border transition-colors cursor-pointer hover:bg-muted focus:outline-none focus:ring-2 focus:ring-ring",onClick:()=>i(n.slice(0,-1)),children:u.jsx(mG,{})}),u.jsx("button",{type:"button",className:"justify-self-center text-2xl w-full flex justify-center items-center text-foreground aspect-square rounded-lg bg-card border border-border transition-colors cursor-pointer hover:bg-muted focus:outline-none focus:ring-2 focus:ring-ring",onClick:()=>a("0"),children:"0"}),u.jsx("button",{type:"button",className:"justify-self-center text-2xl w-full flex justify-center items-center text-destructive aspect-square rounded-lg bg-card border border-border transition-colors cursor-pointer hover:bg-muted focus:outline-none focus:ring-2 focus:ring-ring",onClick:()=>i(""),children:"C"})]}),u.jsxs("div",{className:"flex flex-row gap-3 w-[90%]",children:[u.jsx("button",{type:"button",className:"text-base px-4 py-3 w-full flex justify-center items-center text-foreground rounded-lg bg-secondary text-secondary-foreground border border-border transition-colors cursor-pointer hover:bg-secondary/80 focus:outline-none focus:ring-2 focus:ring-ring",onClick:()=>K("hideFrame"),children:C("cancel")}),u.jsx("button",{type:"button",className:"text-base px-4 py-3 w-full flex justify-center items-center text-foreground rounded-lg bg-primary text-primary-foreground border border-transparent transition-colors cursor-pointer hover:bg-primary/80 focus:outline-none focus:ring-2 focus:ring-ring",onClick:r,children:C("confirm")})]})]})})},Yre=()=>{const e={type:"end",npcChoice:[{percent:1,value:"textVariants"}],textVariants:C("dialog.end_variants"),choices:[]},t={type:"success",npcChoice:[{percent:1,value:"textVariants"}],textVariants:C("dialog.success_variants"),choices:[]},n={type:"sell",npcChoice:he.drugs.drugSellDialog.sell,interested:C("dialog.sell_variants"),callingCops:C("dialog.calling_cops_variants"),gangControl:C("dialog.gang_control_variants"),no:C("dialog.no_variants"),choices:[{text:C("dialog.here_you_go"),nextMessage:t},{text:C("dialog.nevermind"),nextMessage:e}]},i={type:"howMuch",npcChoice:he.drugs.drugSellDialog.amount,yes:C("dialog.amount_variants"),highPrice:C("dialog.high_price_variants"),choices:[{text:C("dialog.i_have_amount"),nextMessage:n},{text:C("dialog.nevermind"),nextMessage:e}]},s={type:"priceCheck",npcChoice:he.drugs.drugSellDialog.priceCheck,notInterestedVariants:C("dialog.not_interested_variants"),callingCopsVariants:C("dialog.calling_cops_variants"),gangControlVariants:C("dialog.gang_control_variants"),interested:C("dialog.price_check_interested"),choices:[{text:C("dialog.offer"),nextMessage:i},{text:C("dialog.nevermind"),nextMessage:e}]},r={type:"start",npcChoice:[{percent:1,value:"textVariants"}],textVariants:C("dialog.start_message_variants"),choices:[{text:C("dialog.looking_to_buy"),nextMessage:s},{text:C("dialog.nevermind"),nextMessage:e}]},[a,o]=x.useState(!0),[c,d]=x.useState([]),[h,m]=x.useState(r),[g,v]=x.useState("1"),[b,w]=x.useState("1"),[M,y]=x.useState(!1),[S,T]=x.useState(),[N,k]=x.useState(null),E=async()=>{const P=await K("get_drugs");P&&P.drugs&&P.drugs.length>0&&(T(P.drugs),k(P.drugs[0]))},D=async()=>{h.type==="end"?setTimeout(()=>{K("end_drug_sell")},2e3):h.type==="success"&&setTimeout(()=>{K("drug_sell",{selectedDrug:N,price:parseInt(g),amount:parseInt(b)})},2e3);let P=null;h.type==="howMuch"&&(await K("drug_sell_check_price",{selectedDrug:N,price:parseInt(g)})||(P="highPrice"));let H=Math.random(),V=0,J=null;for(let U=0;U<h.npcChoice.length;U++)if(P){if(h.npcChoice[U].value!==P)continue;J=h.npcChoice[U];break}else if(V+=h.npcChoice[U].percent,H<=V){J=h.npcChoice[U];break}if(J||(J=h.npcChoice[h.npcChoice.length-1]||{value:"textVariants",exit:h.type!=="start"}),h.type==="sell"){if(J.value==="callingCops")K("calling_cops");else if(J.value==="gangControl")K("alerting_gang");else if(J.value==="no"){m(e);return}}if(J.exit){let U=h[J.value]||C("dialog.end_variants");typeof U=="object"&&Array.isArray(U)&&(U=U[Math.floor(Math.random()*U.length)]),typeof U=="string"&&U.includes("{drug}")&&(U=U.replace(/{drug}/g,N.label)),d(R=>[...R,U]),setTimeout(()=>{m(e),K("end_drug_sell")},J.value==="textVariants"?0:2e3);return}let Q=h[J.value];typeof Q=="object"&&Array.isArray(Q)&&(Q=Q[Math.floor(Math.random()*Q.length)]),typeof Q=="string"&&Q.includes("{drug}")&&(Q=Q.replace(/{drug}/g,N.label)),d(U=>[...U,Q]),o(!0)};x.useEffect(()=>{E()},[]),x.useEffect(()=>{h&&D()},[h]);const O=(P,H)=>{if(!a)return;o(!1);let V=P.text;H==="priceCheck"?V=V.replace("{input}",g).replace("{currency}",C("currency")):H==="howMuch"&&(V=V.replace("{input}",b)),V.includes("{drug}")&&(V=V.replace(/{drug}/g,N.label)),d(J=>[...J,V]),setTimeout(()=>{m(P.nextMessage)},1e3)},I=(P,H)=>{P===""||/^\d+$/.test(P)&&parseInt(P)>=1?(H==="priceCheck"?v(P):w(P),y(!1)):y(!0)};return u.jsx("div",{className:"flex justify-center h-screen overflow-hidden p-6",children:u.jsxs("div",{className:"relative w-[90%] h-full flex flex-col",children:[u.jsx(rs,{className:"w-1/2 h-[85%]",children:u.jsx("div",{className:"flex-grow overflow-y-auto p-4 flex flex-col items-start gap-3 w-full",children:c.map((P,H)=>u.jsx(de.div,{initial:{opacity:0,scale:.8,y:10},animate:{opacity:1,scale:1,y:0},transition:{duration:.3,ease:"easeOut"},className:`w-fit max-w-[80%] px-4 py-2.5 text-sm rounded-2xl shadow
                                ${H%2===0?"mr-auto bg-card text-card-foreground rounded-bl-none":"ml-auto bg-primary text-primary-foreground rounded-br-none"}`,children:P},H))})}),u.jsxs("div",{className:"p-4 flex flex-col items-center justify-center gap-4 border-t border-transparent",children:[(h.type==="priceCheck"||h.type==="howMuch")&&a&&u.jsxs("div",{className:`text-foreground bg-card border ${M?"border-destructive":"border-border"} flex flex-row items-center justify-center rounded-lg p-2 text-sm gap-2 shadow`,children:[u.jsx("span",{children:h.type==="priceCheck"?C("dialog.price"):C("dialog.amount")}),u.jsx("input",{type:"number",className:"w-20 text-sm border-none rounded-md text-foreground bg-card text-center outline-none appearance-none [-moz-appearance:textfield] [&::-webkit-outer-spin-button]:appearance-none [&::-webkit-inner-spin-button]:appearance-none",min:1,placeholder:h.type==="priceCheck"?C("dialog.price"):C("dialog.amount"),value:h.type==="priceCheck"?g:b,onChange:P=>I(P.target.value,h.type)})]}),h.type==="start"&&a&&u.jsx("div",{className:"flex flex-wrap items-center justify-center gap-2 mb-2",children:S==null?void 0:S.map((P,H)=>u.jsx(de.button,{type:"button",initial:{opacity:0},animate:{opacity:1},className:`px-3 py-1.5 border rounded-md text-xs shadow transition-colors
                                        ${N.item===P.item?"bg-primary/80 text-primary-foreground border-primary":"bg-card text-card-foreground border-border hover:bg-muted"}`,onClick:()=>k(P),children:P.label},H))}),u.jsx("div",{className:"flex flex-wrap items-center justify-center gap-3 w-full",children:S&&h.choices.map((P,H)=>{if(!a)return null;let V=P.text;return H===0&&h.type==="priceCheck"?V=V.replace("{input}",g).replace("{currency}",C("currency")):H===0&&h.type==="howMuch"&&(V=V.replace("{input}",b)),V.includes("{drug}")&&(V=V.replace(/{drug}/g,N.label)),u.jsx(de.button,{type:"button",initial:{opacity:0},animate:{opacity:1},className:"px-4 py-2 border border-border bg-card text-foreground text-sm rounded-lg cursor-pointer transition-colors hover:bg-muted shadow min-w-[100px]",onClick:()=>O(P,h.type),disabled:!a,children:V},H)})})]})]})})};function qre(){const[e,t]=x.useState(!1);return ss("openHeadBag",()=>{t(!0)}),ss("closeHeadBag",()=>{t(!1)}),e?u.jsx("div",{className:"fixed inset-0 w-screen h-screen bg-cover bg-center bg-black",style:{backgroundImage:"url('/bag.png')"}}):null}const Xre=({children:e,color:t="#ffffff",pulseSpeed:n=1,borderWidth:i=2,minOpacity:s=.25,maxOpacity:r=1})=>{const a=`pulse-border-${t.replace("#","")}`,o=(c,d)=>{const h=parseInt(c.slice(1,3),16),m=parseInt(c.slice(3,5),16),g=parseInt(c.slice(5,7),16);return`rgba(${h}, ${m}, ${g}, ${d})`};return x.useEffect(()=>{if(!document.getElementById(a)){const d=document.createElement("style");d.id=a;const h=`
              @keyframes ${a} {
                0% { box-shadow: 0 0 0 ${i}px ${o(t,s)}; }
                50% { box-shadow: 0 0 0 ${i*1.5}px ${o(t,r)}; } /* Slightly larger shadow for more pronounced pulse */
                100% { box-shadow: 0 0 0 ${i}px ${o(t,s)}; }
              }`;d.textContent=h,document.head.appendChild(d)}return()=>{document.getElementById(a)}},[a,t,i,s,r,n]),u.jsx(de.div,{initial:{opacity:0},animate:{opacity:1},transition:{duration:.25},className:"relative flex flex-col justify-center items-center gap-1 m-4 bg-background text-foreground rounded-lg p-2 text-center",style:{animation:`${a} ${n}s infinite ease-in-out`},children:e})};function Kre(){const[e,t]=x.useState(!1),[n,i]=x.useState("#ffffff"),[s,r]=x.useState(""),[a,o]=x.useState(null),[c,d]=x.useState(null),h={topLeft:"items-start justify-start",topRight:"items-start justify-end",bottomLeft:"items-end justify-start",bottomRight:"items-end justify-end",centerTop:"items-start justify-center",centerBottom:"items-end justify-center"};return ss("leftZone",m=>{m.id===c&&t(!1)}),ss("enteredZone",m=>{t(!0),i(m.color||"#ffffff"),r(m.name||""),o(m.zoneName||null),d(m.id),he.ui.enterZone.duration!==-1&&setTimeout(()=>{t(!1)},he.ui.enterZone.duration||5e3)}),e?u.jsx("div",{className:`fixed inset-0 flex p-4 pointer-events-none z-[0] ${h[he.ui.enterZone.popupPosition||"topLeft"]}`,children:u.jsxs(Xre,{color:n,pulseSpeed:1.5,borderWidth:2,children:[u.jsxs("div",{className:"text-xs text-muted-foreground",children:[" ",(a||C("zone_owner"))+(c?` #${c}`:"")]}),u.jsxs("div",{className:"text-base text-foreground font-semibold",children:[" ",s]})]})}):null}const Qre={theme:"system",setTheme:()=>null},Jre=x.createContext(Qre);function eae({children:e,defaultTheme:t="system",storageKey:n="vite-ui-theme",...i}){const[s,r]=x.useState(()=>localStorage.getItem(n)||t),a={theme:s,setTheme:o=>{localStorage.setItem(n,o),r(o)}};return u.jsx(Jre.Provider,{...i,value:a,children:e})}const tae=({gangData:e})=>{const[t,n]=x.useState([]),[i,s]=x.useState(1),[r,a]=x.useState(null),[o,c]=x.useState(""),d={deposit_dirty:{title:C("menu.deposit_dirty"),desc:C("menu.deposit_dirty_amount"),actionLabel:C("menu.deposit"),handler:"deposit_dirty"},withdraw_dirty:{title:C("menu.withdraw_dirty"),desc:C("menu.withdraw_dirty_amount"),actionLabel:C("menu.withdraw"),handler:"withdraw_dirty"},deposit:{title:C("menu.deposit"),desc:C("menu.deposit_amount"),actionLabel:C("menu.deposit"),handler:"deposit"},withdraw:{title:C("menu.withdraw"),desc:C("menu.withdraw_amount"),actionLabel:C("menu.withdraw"),handler:"withdraw"}},h=async y=>{const S=await K("get_transactions",{gangId:e.gangId,page:y});n(S||[])};x.useEffect(()=>{h(i)},[i,e.gangId]);const m=async y=>{if(y<1)return;const S=await K("get_transactions",{gangId:e.gangId,page:y});(S&&S.length>0||y===1&&(!S||S.length===0))&&s(y)},g=()=>{i>1&&m(i-1)},v=()=>{m(i+1)},b=y=>{const S=y.target.value;if(S==="")return;const T=parseInt(S);!isNaN(T)&&T>=1&&m(T)},w=async()=>{var S;if(!r||!o)return;const y=(S=d[r])==null?void 0:S.handler;y&&(await K(y,{gangId:e.gangId,amount:parseInt(o)}),h(i)),a(null),c("")},M=r?d[r]:null;return u.jsx("div",{className:"flex flex-col items-center w-full max-w-3xl mx-auto space-y-6",children:u.jsxs("div",{className:"bg-background border border-border rounded-lg p-6 shadow w-full h-full",children:[u.jsx(cl,{}),M&&u.jsx(Mr,{open:!!r,onOpenChange:()=>{a(null),c("")},children:u.jsxs(Tr,{children:[u.jsxs(jr,{children:[u.jsx(Nr,{children:M.title}),u.jsx(ka,{children:M.desc})]}),u.jsx(wt,{type:"number",placeholder:C("menu.amount"),value:o,onChange:y=>c(y.target.value),className:"my-4"}),u.jsxs(Na,{children:[u.jsx(ne,{variant:"outline",onClick:()=>{a(null),c("")},children:C("menu.cancel")}),u.jsx(ne,{onClick:w,children:M.actionLabel})]})]})}),u.jsxs("div",{className:"flex flex-col md:flex-row pt-[5%] w-11/12 mx-auto h-full gap-6 md:gap-12",children:[u.jsxs("div",{className:"flex flex-col w-full md:w-2/5 space-y-6",children:[" ",u.jsxs(de.div,{initial:{opacity:0,scale:.9},animate:{opacity:1,scale:1},transition:{duration:.2},className:"bg-card text-card-foreground border border-border rounded-lg p-6 shadow",children:[u.jsx("h3",{className:"text-xl text-muted-foreground mb-1",children:C("menu.total_balance")})," ",u.jsxs("div",{className:"text-3xl font-bold",children:[" ",e.cash," ",u.jsx("span",{className:"text-lg text-primary",children:C("currency")})," "]}),u.jsxs("div",{className:"text-2xl mt-1",children:[" ",Math.round(e.dirtyCash)," ",u.jsx("span",{className:"text-base text-amber-600",children:C("menu.dirty_cash")})," "]})]}),u.jsxs("div",{children:[u.jsx("h4",{className:"text-lg font-semibold mb-2",children:C("menu.clean_cash")})," ",u.jsxs(de.div,{initial:{opacity:0,scale:.9},animate:{opacity:1,scale:1},transition:{duration:.2},className:"grid grid-cols-2 gap-2",children:[u.jsxs(ne,{variant:"outline",className:"w-full py-4 text-base flex items-center gap-2 hover:bg-muted",onClick:()=>a("deposit"),children:[" ",u.jsx(Wg,{size:20})," ",C("menu.deposit")]}),u.jsxs(ne,{variant:"outline",className:"w-full py-4 text-base flex items-center gap-2 hover:bg-muted",onClick:()=>a("withdraw"),children:[" ",u.jsx(Gg,{size:20})," ",C("menu.withdraw")]})]})]}),u.jsxs("div",{children:[u.jsx("h4",{className:"text-lg font-semibold mb-2",children:C("menu.dirty_cash")})," ",u.jsxs(de.div,{initial:{opacity:0,scale:.9},animate:{opacity:1,scale:1},transition:{duration:.2},className:"grid grid-cols-2 gap-2",children:[u.jsxs(ne,{variant:"outline",className:"w-full py-4 text-base flex items-center gap-2 hover:bg-muted",onClick:()=>a("deposit_dirty"),children:[" ",u.jsx(Wg,{size:20})," ",C("menu.deposit")]}),u.jsxs(ne,{variant:"outline",className:"w-full py-4 text-base flex items-center gap-2 hover:bg-muted",onClick:()=>a("withdraw_dirty"),children:[" ",u.jsx(Gg,{size:20})," ",C("menu.withdraw")]})]})]})]}),u.jsxs(St,{className:"w-3/5 bg-card text-card-foreground border-border shadow flex flex-col p-2 h-[90%]",children:[u.jsx(Qn,{children:u.jsx(Jn,{className:"pt-2",children:C("menu.recent_transfers")})}),u.jsx(pn,{className:"flex-grow overflow-hidden",children:u.jsx(rs,{className:"h-[calc(100%-0px)] pr-3",children:u.jsxs(pE,{children:[u.jsx(vE,{children:u.jsxs(yc,{className:"border-b-border hover:bg-transparent",children:[u.jsx(ws,{className:"text-xs",children:C("menu.handled_by")}),u.jsx(ws,{className:"text-xs text-center",children:C("menu.type")}),u.jsx(ws,{className:"text-xs text-center",children:C("menu.id")}),u.jsx(ws,{className:"text-xs text-center",children:C("menu.amount")}),u.jsx(ws,{className:"text-xs text-right",children:C("menu.date")})]})}),u.jsxs(xE,{children:[t.map((y,S)=>u.jsxs(yc,{className:"border-b-border text-xs",children:[u.jsx(Ni,{children:y.handled_by}),u.jsx(Ni,{className:"text-center",children:u.jsx("span",{className:`px-2 py-0.5 rounded-full text-xs ${y.type==="deposit"||y.type==="deposit_dirty"?"bg-green-500/20 text-green-400":"bg-red-500/20 text-red-400"}`,children:C("menu."+y.type)})}),u.jsx(Ni,{className:"text-center",children:y.id}),u.jsxs(Ni,{className:"text-center",children:[y.amount," ",C("currency")]}),u.jsx(Ni,{className:"text-right",children:ol(y.date_stamp)})]},y.id+"-"+S)),t.length===0&&u.jsx(yc,{children:u.jsx(Ni,{colSpan:5,className:"text-center text-muted-foreground py-4",children:C("menu.no_transactions_found")})})]})]})})}),u.jsxs("div",{className:"flex items-center justify-center pt-2 border-t border-border",children:[u.jsx(ne,{variant:"ghost",size:"icon",onClick:g,disabled:i<=1,children:u.jsx(Kb,{className:"h-5 w-5"})}),u.jsx(wt,{type:"number",value:i,onChange:b,className:"w-10 text-center mx-2 !bg-transparent border-border focus-visible:ring-primary"}),u.jsx(ne,{variant:"ghost",size:"icon",onClick:v,disabled:t.length<10,children:u.jsx(Qb,{className:"h-5 w-5"})})]})]})]})]})})};function nae({gangId:e}){const[t,n]=x.useState([]),[i,s]=x.useState(1),[r,a]=x.useState(!1),[o,c]=x.useState(0),[d,h]=x.useState(0),[m,g]=x.useState(0),v=async N=>{const k=await K("get_transactions",{gangId:e,page:N});n(k||[])},b=async()=>{const N=await K("get_safe_data",{gangId:e});N&&(c(N.cash||0),h(N.dirtyCash||0))},w=async N=>{if(N<1)return;const k=await K("get_transactions",{gangId:e,page:N});(k&&k.length>0||N===1&&(!k||k.length===0))&&s(N)},M=async(N,k)=>{k>=0&&K(N,{gangId:e,amount:k})};ss("state:safe",N=>{N.gangId===e&&a(!r)}),x.useEffect(()=>{v(i),b()},[i,r,e]);const y=()=>{i>1&&w(i-1)},S=()=>{w(i+1)},T=[{value:"deposit",label:C("safe.deposit"),description:C("safe.deposit_desc")},{value:"withdraw",label:C("safe.withdraw"),description:C("safe.withdraw_desc")},{value:"deposit_dirty",label:C("safe.deposit_dirty"),description:C("safe.deposit_dirty_desc")},{value:"withdraw_dirty",label:C("safe.withdraw_dirty"),description:C("safe.withdraw_dirty_desc")}];return u.jsx("div",{className:"w-screen h-screen flex flex-col items-center justify-center",children:u.jsxs("div",{className:"max-w-4xl flex flex-col relative w-full h-[95%] bg-background rounded-xl p-6 gap-4",children:[u.jsx(cl,{}),u.jsxs("div",{className:"flex flex-col",children:[u.jsx("h1",{className:"text-xl font-bold",children:C("safe.transactions")}),u.jsx("p",{className:"text-foreground/50",children:C("safe.transactions_desc")})]}),u.jsx("div",{className:"flex gap-4 justify-center h-1/4 ",children:u.jsxs("div",{className:"w-full flex justify-center rounded-lg gap-4",children:[u.jsxs("div",{className:"w-full rounded-md flex flex-col justify-center bg-gradient-to-br from-primary/50 to-primary p-6 ",children:[u.jsx("h2",{className:"text-sm text-foreground/75",children:C("safe.current_balance")}),u.jsxs("p",{className:"text-lg font-bold font-mono",children:[new Intl.NumberFormat().format(o),C("currency")]})]}),u.jsxs("div",{className:"w-full rounded-md flex flex-col justify-center bg-gradient-to-br from-primary to-primary/50 p-6 ",children:[u.jsx("h2",{className:"text-sm text-foreground/75",children:C("safe.current_dirty_balance")}),u.jsxs("p",{className:"text-lg font-bold font-mono",children:[new Intl.NumberFormat().format(d),C("currency")]})]})]})}),u.jsxs("div",{className:"flex h-full gap-4 justify-between items-center",children:[u.jsxs(_0,{defaultValue:"deposit",className:"w-[50%] p-6 h-full border rounded-lg flex flex-col gap-8",children:[u.jsx("h2",{className:"text-lg",children:C("safe.transaction_actions")}),u.jsxs(qf,{defaultValue:"deposit",className:"grid grid-cols-2 h-fit w-full",children:[u.jsx(ci,{className:"text-xs",value:"deposit",children:C("safe.deposit")}),u.jsx(ci,{className:"text-xs",value:"withdraw",children:C("safe.withdraw")}),u.jsx(ci,{className:"text-xs",value:"deposit_dirty",children:C("safe.deposit_dirty")}),u.jsx(ci,{className:"text-xs",value:"withdraw_dirty",children:C("safe.withdraw_dirty")})]}),T.map(N=>u.jsx(ip,{value:N.value,children:u.jsxs("div",{className:"flex flex-col gap-4 ",children:[u.jsxs("div",{className:"flex flex-col gap-0",children:[u.jsx("h2",{className:"text-sm text-foreground",children:N.label}),u.jsx("p",{className:"text-sm text-foreground/50",children:N.description})]}),u.jsx("p",{className:"",children:C("safe.amount")}),u.jsx(wt,{type:"number",onChange:k=>{const E=parseFloat(k.target.value);g(E)},value:m,placeholder:"0",className:"input input-bordered w-full"}),u.jsxs(Is,{children:[u.jsx(np,{asChild:!0,children:u.jsx(ne,{children:N.label})}),u.jsxs(Bs,{children:[u.jsx(Ko,{children:u.jsxs(Hs,{children:[C("safe.confirm")," ",N.label]})}),u.jsx(Fs,{children:C("safe.are_you_sure",[["action",N.label.toLowerCase()]])}),u.jsxs(Vs,{children:[u.jsx(Us,{asChild:!0,children:u.jsx(ne,{variant:"outline",children:C("safe.cancel")})}),u.jsx(np,{asChild:!0,children:u.jsx(ne,{onClick:()=>{M(N.value,m),g(0)},children:C("safe.confirm")})})]})]})]})]})},N.value))]}),u.jsx("div",{className:"w-[50%] h-full border rounded-lg p-6",children:t.length>0?u.jsxs("div",{className:"flex flex-col gap-6 h-full",children:[u.jsx("h2",{className:"text-lg text-foreground",children:C("safe.transaction_history")}),u.jsx("div",{className:"flex flex-col gap-2 ",children:t.map((N,k)=>u.jsxs("div",{className:"flex gap-4 items-center p-3 px-5 border rounded-lg w-full bg-secondary/25",children:[u.jsxs("div",{className:ye("flex items-center p-1 rounded-full",N.type.includes("deposit")?"bg-green-400/25":"bg-red-400/25"),children:[N.type==="deposit_dirty"&&u.jsx(pC,{className:"text-green-400 "}),N.type==="withdraw_dirty"&&u.jsx(vC,{className:"text-red-400 "}),N.type==="deposit"&&u.jsx(pC,{className:"text-green-400 "}),N.type==="withdraw"&&u.jsx(vC,{className:"text-red-400 "})]}),u.jsxs("div",{className:"flex flex-col gap-0",children:[u.jsxs("p",{className:"text-sm font-bold flex items-center gap-2",children:[N.handledBy," ",N.type.includes("dirty")&&u.jsx("p",{className:"text-xs font-mono  text-red-500 bg-text-red-600 border border-red-500 px-2 rounded-full bg-red-500/20",children:"Dirty"})]}),u.jsx("p",{className:"text-xs text-foreground/50",children:ol(N.date_stamp)})]}),u.jsxs("p",{className:ye("text-sm ml-auto font-mono",N.type.includes("withdraw")?"text-red-400":"text-green-400"),children:[N.type.includes("deposit")?"+":"-",new Intl.NumberFormat().format(N.amount),"€"]})]},k))}),u.jsxs("div",{className:"flex justify-end gap-2 items-center  mt-auto",children:[u.jsx(ne,{variant:"outline",onClick:()=>y(),disabled:i===1,children:C("safe.previous")}),u.jsx(ne,{variant:"outline",onClick:()=>S(),children:C("safe.next")})]})]}):u.jsx("p",{className:"text-foreground/50",children:C("safe.no_transactions_found")})})]})]})})}class iae extends ae.Component{constructor(){super(...arguments);ge(this,"state",{hasError:!1})}static getDerivedStateFromError(n){return{hasError:!0}}componentDidCatch(n,i){this.props.enabled&&this.logError(n,i)}logError(n,i){console.error("Crashed:",JSON.stringify(n),JSON.stringify(i))}render(){return this.props.enabled?(this.state.hasError,this.props.children):this.props.children}}const sae=()=>{const[e,t]=x.useState(!1),[n,i]=x.useState(""),[s,r]=x.useState(null),[a,o]=x.useState(!1),[c,d]=x.useState(null),[h,m]=x.useState(null),[g,v]=x.useState(null),[b,w]=x.useState(null);ss("updateComponent",S=>{const T=S.component;switch(T){case"gangMenu":o(S.inTablet),r(S.gangData),i("gangMenu");break;case"transactions":i("transactions");break;case"playerSelect":i("playerSelect");break;case"zoneCreator":i("zoneCreator");break;case"moneyLaundering":i("moneyLaundering");break;case"gangCreator":i("gangCreator");break;case"capturing":i("capturing");break;case"weed":d(S.plant),i("weed");break;case"weedDrying":m(S.rack),i("weedDrying");break;case"lock":v({gangId:S.data.gangId,doorId:S.data.doorId}),i("lock");break;case"changePass":v({gangId:S.data.gangId,doorId:S.data.doorId}),i("changePass");break;case"npcDialog":i("npcDialog");break;case"safe":w(S.gangId),i("safe");break}i(T)});const M=()=>{switch(n){case"gangMenu":return u.jsx(F5,{gangData2:s,tablet:a});case"playerSelect":return u.jsx(xf,{});case"zoneCreator":return u.jsx(gee,{});case"moneyLaundering":return u.jsx(Rre,{});case"gangCreator":return u.jsx(Lre,{});case"capturing":return u.jsx(Zre,{});case"weed":return u.jsx(Wre,{plant:c});case"weedDrying":return u.jsx(Gre,{rack:h});case"lock":return u.jsx(W5,{changePass:!1,lock:g});case"changePass":return u.jsx(W5,{changePass:!0,lock:g});case"npcDialog":return u.jsx(Yre,{});case"transactions":return u.jsx(tae,{gangData:s});case"safe":return u.jsx(nae,{gangId:b});default:return u.jsx(F5,{gangData2:s})}};x.useEffect(()=>{y()},[]);const y=async()=>{const S=await K("load_utils");sY(S.config),fF(S.locale),Ag(S.theme),t(!0),await K("loadedUtils")};return u.jsx("div",{children:e?M():u.jsx("div",{children:"Loading..."})})},rae=({children:e})=>{const t=()=>{const{innerWidth:n,innerHeight:i}=window,s=n/i;9/16<s?document.documentElement.style.fontSize="2vh":document.documentElement.style.fontSize="1vw"};return x.useEffect(()=>(window.addEventListener("resize",t),()=>{window.removeEventListener("resize",t)}),[]),t(),u.jsx(u.Fragment,{children:e})};Ez.createRoot(document.getElementById("root")).render(u.jsxs(iae,{enabled:!0,children:[u.jsx(qre,{}),u.jsxs(eae,{defaultTheme:"dark",storageKey:"vite-ui-theme",children:[u.jsx(Dz,{children:u.jsx(rae,{children:u.jsx(sae,{})})}),u.jsx(Kre,{})]})]}));
