aprs.me/priv/static/assets/vendor.js
Graham McIntire c4fc59dc1e
Add pre-bundled vendor assets for Docker build
Force add vendor.js and vendor.css files that were gitignored
These files are needed during Docker build since npm isn't available

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-21 12:56:49 -05:00

51 lines
445 KiB
JavaScript

"use strict";(()=>{var Qf=Object.create;var Er=Object.defineProperty,Jf=Object.defineProperties,tp=Object.getOwnPropertyDescriptor,ep=Object.getOwnPropertyDescriptors,ip=Object.getOwnPropertyNames,sh=Object.getOwnPropertySymbols,np=Object.getPrototypeOf,oh=Object.prototype.hasOwnProperty,sp=Object.prototype.propertyIsEnumerable;var Ar=(n,t,e)=>t in n?Er(n,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):n[t]=e,Mi=(n,t)=>{for(var e in t||(t={}))oh.call(t,e)&&Ar(n,e,t[e]);if(sh)for(var e of sh(t))sp.call(t,e)&&Ar(n,e,t[e]);return n},Li=(n,t)=>Jf(n,ep(t));var zr=(n,t)=>()=>(t||n((t={exports:{}}).exports,t),t.exports);var op=(n,t,e,i)=>{if(t&&typeof t=="object"||typeof t=="function")for(let s of ip(t))!oh.call(n,s)&&s!==e&&Er(n,s,{get:()=>t[s],enumerable:!(i=tp(t,s))||i.enumerable});return n};var Rr=(n,t,e)=>(e=n!=null?Qf(np(n)):{},op(t||!n||!n.__esModule?Er(e,"default",{value:n,enumerable:!0}):e,n));var k=(n,t,e)=>Ar(n,typeof t!="symbol"?t+"":t,e);var ah=zr((fs,rh)=>{(function(n,t){typeof fs=="object"&&typeof rh!="undefined"?t(fs):typeof define=="function"&&define.amd?define(["exports"],t):(n=typeof globalThis!="undefined"?globalThis:n||self,t(n.leaflet={}))})(fs,function(n){"use strict";var t="1.9.4";function e(o){var l,u,p,g;for(u=1,p=arguments.length;u<p;u++){g=arguments[u];for(l in g)o[l]=g[l]}return o}var i=Object.create||function(){function o(){}return function(l){return o.prototype=l,new o}}();function s(o,l){var u=Array.prototype.slice;if(o.bind)return o.bind.apply(o,u.call(arguments,1));var p=u.call(arguments,2);return function(){return o.apply(l,p.length?p.concat(u.call(arguments)):arguments)}}var r=0;function a(o){return"_leaflet_id"in o||(o._leaflet_id=++r),o._leaflet_id}function h(o,l,u){var p,g,v,M;return M=function(){p=!1,g&&(v.apply(u,g),g=!1)},v=function(){p?g=arguments:(o.apply(u,arguments),setTimeout(M,l),p=!0)},v}function c(o,l,u){var p=l[1],g=l[0],v=p-g;return o===p&&u?o:((o-g)%v+v)%v+g}function d(){return!1}function f(o,l){if(l===!1)return o;var u=Math.pow(10,l===void 0?6:l);return Math.round(o*u)/u}function m(o){return o.trim?o.trim():o.replace(/^\s+|\s+$/g,"")}function _(o){return m(o).split(/\s+/)}function y(o,l){Object.prototype.hasOwnProperty.call(o,"options")||(o.options=o.options?i(o.options):{});for(var u in l)o.options[u]=l[u];return o.options}function x(o,l,u){var p=[];for(var g in o)p.push(encodeURIComponent(u?g.toUpperCase():g)+"="+encodeURIComponent(o[g]));return(!l||l.indexOf("?")===-1?"?":"&")+p.join("&")}var b=/\{ *([\w_ -]+) *\}/g;function w(o,l){return o.replace(b,function(u,p){var g=l[p];if(g===void 0)throw new Error("No value provided for variable "+u);return typeof g=="function"&&(g=g(l)),g})}var P=Array.isArray||function(o){return Object.prototype.toString.call(o)==="[object Array]"};function C(o,l){for(var u=0;u<o.length;u++)if(o[u]===l)return u;return-1}var O="data:image/gif;base64,R0lGODlhAQABAAD/ACwAAAAAAQABAAACADs=";function I(o){return window["webkit"+o]||window["moz"+o]||window["ms"+o]}var D=0;function z(o){var l=+new Date,u=Math.max(0,16-(l-D));return D=l+u,window.setTimeout(o,u)}var R=window.requestAnimationFrame||I("RequestAnimationFrame")||z,B=window.cancelAnimationFrame||I("CancelAnimationFrame")||I("CancelRequestAnimationFrame")||function(o){window.clearTimeout(o)};function N(o,l,u){if(u&&R===z)o.call(l);else return R.call(window,s(o,l))}function j(o){o&&B.call(window,o)}var q={__proto__:null,extend:e,create:i,bind:s,get lastId(){return r},stamp:a,throttle:h,wrapNum:c,falseFn:d,formatNum:f,trim:m,splitWords:_,setOptions:y,getParamString:x,template:w,isArray:P,indexOf:C,emptyImageUrl:O,requestFn:R,cancelFn:B,requestAnimFrame:N,cancelAnimFrame:j};function Y(){}Y.extend=function(o){var l=function(){y(this),this.initialize&&this.initialize.apply(this,arguments),this.callInitHooks()},u=l.__super__=this.prototype,p=i(u);p.constructor=l,l.prototype=p;for(var g in this)Object.prototype.hasOwnProperty.call(this,g)&&g!=="prototype"&&g!=="__super__"&&(l[g]=this[g]);return o.statics&&e(l,o.statics),o.includes&&(nt(o.includes),e.apply(null,[p].concat(o.includes))),e(p,o),delete p.statics,delete p.includes,p.options&&(p.options=u.options?i(u.options):{},e(p.options,o.options)),p._initHooks=[],p.callInitHooks=function(){if(!this._initHooksCalled){u.callInitHooks&&u.callInitHooks.call(this),this._initHooksCalled=!0;for(var v=0,M=p._initHooks.length;v<M;v++)p._initHooks[v].call(this)}},l},Y.include=function(o){var l=this.prototype.options;return e(this.prototype,o),o.options&&(this.prototype.options=l,this.mergeOptions(o.options)),this},Y.mergeOptions=function(o){return e(this.prototype.options,o),this},Y.addInitHook=function(o){var l=Array.prototype.slice.call(arguments,1),u=typeof o=="function"?o:function(){this[o].apply(this,l)};return this.prototype._initHooks=this.prototype._initHooks||[],this.prototype._initHooks.push(u),this};function nt(o){if(!(typeof L=="undefined"||!L||!L.Mixin)){o=P(o)?o:[o];for(var l=0;l<o.length;l++)o[l]===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 lt={on:function(o,l,u){if(typeof o=="object")for(var p in o)this._on(p,o[p],l);else{o=_(o);for(var g=0,v=o.length;g<v;g++)this._on(o[g],l,u)}return this},off:function(o,l,u){if(!arguments.length)delete this._events;else if(typeof o=="object")for(var p in o)this._off(p,o[p],l);else{o=_(o);for(var g=arguments.length===1,v=0,M=o.length;v<M;v++)g?this._off(o[v]):this._off(o[v],l,u)}return this},_on:function(o,l,u,p){if(typeof l!="function"){console.warn("wrong listener type: "+typeof l);return}if(this._listens(o,l,u)===!1){u===this&&(u=void 0);var g={fn:l,ctx:u};p&&(g.once=!0),this._events=this._events||{},this._events[o]=this._events[o]||[],this._events[o].push(g)}},_off:function(o,l,u){var p,g,v;if(this._events&&(p=this._events[o],!!p)){if(arguments.length===1){if(this._firingCount)for(g=0,v=p.length;g<v;g++)p[g].fn=d;delete this._events[o];return}if(typeof l!="function"){console.warn("wrong listener type: "+typeof l);return}var M=this._listens(o,l,u);if(M!==!1){var T=p[M];this._firingCount&&(T.fn=d,this._events[o]=p=p.slice()),p.splice(M,1)}}},fire:function(o,l,u){if(!this.listens(o,u))return this;var p=e({},l,{type:o,target:this,sourceTarget:l&&l.sourceTarget||this});if(this._events){var g=this._events[o];if(g){this._firingCount=this._firingCount+1||1;for(var v=0,M=g.length;v<M;v++){var T=g[v],S=T.fn;T.once&&this.off(o,S,T.ctx),S.call(T.ctx||this,p)}this._firingCount--}}return u&&this._propagateEvent(p),this},listens:function(o,l,u,p){typeof o!="string"&&console.warn('"string" type argument expected');var g=l;typeof l!="function"&&(p=!!l,g=void 0,u=void 0);var v=this._events&&this._events[o];if(v&&v.length&&this._listens(o,g,u)!==!1)return!0;if(p){for(var M in this._eventParents)if(this._eventParents[M].listens(o,l,u,p))return!0}return!1},_listens:function(o,l,u){if(!this._events)return!1;var p=this._events[o]||[];if(!l)return!!p.length;u===this&&(u=void 0);for(var g=0,v=p.length;g<v;g++)if(p[g].fn===l&&p[g].ctx===u)return g;return!1},once:function(o,l,u){if(typeof o=="object")for(var p in o)this._on(p,o[p],l,!0);else{o=_(o);for(var g=0,v=o.length;g<v;g++)this._on(o[g],l,u,!0)}return this},addEventParent:function(o){return this._eventParents=this._eventParents||{},this._eventParents[a(o)]=o,this},removeEventParent:function(o){return this._eventParents&&delete this._eventParents[a(o)],this},_propagateEvent:function(o){for(var l in this._eventParents)this._eventParents[l].fire(o.type,e({layer:o.target,propagatedFrom:o.target},o),!0)}};lt.addEventListener=lt.on,lt.removeEventListener=lt.clearAllEventListeners=lt.off,lt.addOneTimeEventListener=lt.once,lt.fireEvent=lt.fire,lt.hasEventListeners=lt.listens;var st=Y.extend(lt);function W(o,l,u){this.x=u?Math.round(o):o,this.y=u?Math.round(l):l}var yt=Math.trunc||function(o){return o>0?Math.floor(o):Math.ceil(o)};W.prototype={clone:function(){return new W(this.x,this.y)},add:function(o){return this.clone()._add(E(o))},_add:function(o){return this.x+=o.x,this.y+=o.y,this},subtract:function(o){return this.clone()._subtract(E(o))},_subtract:function(o){return this.x-=o.x,this.y-=o.y,this},divideBy:function(o){return this.clone()._divideBy(o)},_divideBy:function(o){return this.x/=o,this.y/=o,this},multiplyBy:function(o){return this.clone()._multiplyBy(o)},_multiplyBy:function(o){return this.x*=o,this.y*=o,this},scaleBy:function(o){return new W(this.x*o.x,this.y*o.y)},unscaleBy:function(o){return new W(this.x/o.x,this.y/o.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=yt(this.x),this.y=yt(this.y),this},distanceTo:function(o){o=E(o);var l=o.x-this.x,u=o.y-this.y;return Math.sqrt(l*l+u*u)},equals:function(o){return o=E(o),o.x===this.x&&o.y===this.y},contains:function(o){return o=E(o),Math.abs(o.x)<=Math.abs(this.x)&&Math.abs(o.y)<=Math.abs(this.y)},toString:function(){return"Point("+f(this.x)+", "+f(this.y)+")"}};function E(o,l,u){return o instanceof W?o:P(o)?new W(o[0],o[1]):o==null?o:typeof o=="object"&&"x"in o&&"y"in o?new W(o.x,o.y):new W(o,l,u)}function V(o,l){if(o)for(var u=l?[o,l]:o,p=0,g=u.length;p<g;p++)this.extend(u[p])}V.prototype={extend:function(o){var l,u;if(!o)return this;if(o instanceof W||typeof o[0]=="number"||"x"in o)l=u=E(o);else if(o=dt(o),l=o.min,u=o.max,!l||!u)return this;return!this.min&&!this.max?(this.min=l.clone(),this.max=u.clone()):(this.min.x=Math.min(l.x,this.min.x),this.max.x=Math.max(u.x,this.max.x),this.min.y=Math.min(l.y,this.min.y),this.max.y=Math.max(u.y,this.max.y)),this},getCenter:function(o){return E((this.min.x+this.max.x)/2,(this.min.y+this.max.y)/2,o)},getBottomLeft:function(){return E(this.min.x,this.max.y)},getTopRight:function(){return E(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(o){var l,u;return typeof o[0]=="number"||o instanceof W?o=E(o):o=dt(o),o instanceof V?(l=o.min,u=o.max):l=u=o,l.x>=this.min.x&&u.x<=this.max.x&&l.y>=this.min.y&&u.y<=this.max.y},intersects:function(o){o=dt(o);var l=this.min,u=this.max,p=o.min,g=o.max,v=g.x>=l.x&&p.x<=u.x,M=g.y>=l.y&&p.y<=u.y;return v&&M},overlaps:function(o){o=dt(o);var l=this.min,u=this.max,p=o.min,g=o.max,v=g.x>l.x&&p.x<u.x,M=g.y>l.y&&p.y<u.y;return v&&M},isValid:function(){return!!(this.min&&this.max)},pad:function(o){var l=this.min,u=this.max,p=Math.abs(l.x-u.x)*o,g=Math.abs(l.y-u.y)*o;return dt(E(l.x-p,l.y-g),E(u.x+p,u.y+g))},equals:function(o){return o?(o=dt(o),this.min.equals(o.getTopLeft())&&this.max.equals(o.getBottomRight())):!1}};function dt(o,l){return!o||o instanceof V?o:new V(o,l)}function kt(o,l){if(o)for(var u=l?[o,l]:o,p=0,g=u.length;p<g;p++)this.extend(u[p])}kt.prototype={extend:function(o){var l=this._southWest,u=this._northEast,p,g;if(o instanceof ot)p=o,g=o;else if(o instanceof kt){if(p=o._southWest,g=o._northEast,!p||!g)return this}else return o?this.extend(X(o)||pt(o)):this;return!l&&!u?(this._southWest=new ot(p.lat,p.lng),this._northEast=new ot(g.lat,g.lng)):(l.lat=Math.min(p.lat,l.lat),l.lng=Math.min(p.lng,l.lng),u.lat=Math.max(g.lat,u.lat),u.lng=Math.max(g.lng,u.lng)),this},pad:function(o){var l=this._southWest,u=this._northEast,p=Math.abs(l.lat-u.lat)*o,g=Math.abs(l.lng-u.lng)*o;return new kt(new ot(l.lat-p,l.lng-g),new ot(u.lat+p,u.lng+g))},getCenter:function(){return new ot((this._southWest.lat+this._northEast.lat)/2,(this._southWest.lng+this._northEast.lng)/2)},getSouthWest:function(){return this._southWest},getNorthEast:function(){return this._northEast},getNorthWest:function(){return new ot(this.getNorth(),this.getWest())},getSouthEast:function(){return new ot(this.getSouth(),this.getEast())},getWest:function(){return this._southWest.lng},getSouth:function(){return this._southWest.lat},getEast:function(){return this._northEast.lng},getNorth:function(){return this._northEast.lat},contains:function(o){typeof o[0]=="number"||o instanceof ot||"lat"in o?o=X(o):o=pt(o);var l=this._southWest,u=this._northEast,p,g;return o instanceof kt?(p=o.getSouthWest(),g=o.getNorthEast()):p=g=o,p.lat>=l.lat&&g.lat<=u.lat&&p.lng>=l.lng&&g.lng<=u.lng},intersects:function(o){o=pt(o);var l=this._southWest,u=this._northEast,p=o.getSouthWest(),g=o.getNorthEast(),v=g.lat>=l.lat&&p.lat<=u.lat,M=g.lng>=l.lng&&p.lng<=u.lng;return v&&M},overlaps:function(o){o=pt(o);var l=this._southWest,u=this._northEast,p=o.getSouthWest(),g=o.getNorthEast(),v=g.lat>l.lat&&p.lat<u.lat,M=g.lng>l.lng&&p.lng<u.lng;return v&&M},toBBoxString:function(){return[this.getWest(),this.getSouth(),this.getEast(),this.getNorth()].join(",")},equals:function(o,l){return o?(o=pt(o),this._southWest.equals(o.getSouthWest(),l)&&this._northEast.equals(o.getNorthEast(),l)):!1},isValid:function(){return!!(this._southWest&&this._northEast)}};function pt(o,l){return o instanceof kt?o:new kt(o,l)}function ot(o,l,u){if(isNaN(o)||isNaN(l))throw new Error("Invalid LatLng object: ("+o+", "+l+")");this.lat=+o,this.lng=+l,u!==void 0&&(this.alt=+u)}ot.prototype={equals:function(o,l){if(!o)return!1;o=X(o);var u=Math.max(Math.abs(this.lat-o.lat),Math.abs(this.lng-o.lng));return u<=(l===void 0?1e-9:l)},toString:function(o){return"LatLng("+f(this.lat,o)+", "+f(this.lng,o)+")"},distanceTo:function(o){return Nt.distance(this,X(o))},wrap:function(){return Nt.wrapLatLng(this)},toBounds:function(o){var l=180*o/40075017,u=l/Math.cos(Math.PI/180*this.lat);return pt([this.lat-l,this.lng-u],[this.lat+l,this.lng+u])},clone:function(){return new ot(this.lat,this.lng,this.alt)}};function X(o,l,u){return o instanceof ot?o:P(o)&&typeof o[0]!="object"?o.length===3?new ot(o[0],o[1],o[2]):o.length===2?new ot(o[0],o[1]):null:o==null?o:typeof o=="object"&&"lat"in o?new ot(o.lat,"lng"in o?o.lng:o.lon,o.alt):l===void 0?null:new ot(o,l,u)}var Ht={latLngToPoint:function(o,l){var u=this.projection.project(o),p=this.scale(l);return this.transformation._transform(u,p)},pointToLatLng:function(o,l){var u=this.scale(l),p=this.transformation.untransform(o,u);return this.projection.unproject(p)},project:function(o){return this.projection.project(o)},unproject:function(o){return this.projection.unproject(o)},scale:function(o){return 256*Math.pow(2,o)},zoom:function(o){return Math.log(o/256)/Math.LN2},getProjectedBounds:function(o){if(this.infinite)return null;var l=this.projection.bounds,u=this.scale(o),p=this.transformation.transform(l.min,u),g=this.transformation.transform(l.max,u);return new V(p,g)},infinite:!1,wrapLatLng:function(o){var l=this.wrapLng?c(o.lng,this.wrapLng,!0):o.lng,u=this.wrapLat?c(o.lat,this.wrapLat,!0):o.lat,p=o.alt;return new ot(u,l,p)},wrapLatLngBounds:function(o){var l=o.getCenter(),u=this.wrapLatLng(l),p=l.lat-u.lat,g=l.lng-u.lng;if(p===0&&g===0)return o;var v=o.getSouthWest(),M=o.getNorthEast(),T=new ot(v.lat-p,v.lng-g),S=new ot(M.lat-p,M.lng-g);return new kt(T,S)}},Nt=e({},Ht,{wrapLng:[-180,180],R:6371e3,distance:function(o,l){var u=Math.PI/180,p=o.lat*u,g=l.lat*u,v=Math.sin((l.lat-o.lat)*u/2),M=Math.sin((l.lng-o.lng)*u/2),T=v*v+Math.cos(p)*Math.cos(g)*M*M,S=2*Math.atan2(Math.sqrt(T),Math.sqrt(1-T));return this.R*S}}),qa=6378137,Jo={R:qa,MAX_LATITUDE:85.0511287798,project:function(o){var l=Math.PI/180,u=this.MAX_LATITUDE,p=Math.max(Math.min(u,o.lat),-u),g=Math.sin(p*l);return new W(this.R*o.lng*l,this.R*Math.log((1+g)/(1-g))/2)},unproject:function(o){var l=180/Math.PI;return new ot((2*Math.atan(Math.exp(o.y/this.R))-Math.PI/2)*l,o.x*l/this.R)},bounds:function(){var o=qa*Math.PI;return new V([-o,-o],[o,o])}()};function tr(o,l,u,p){if(P(o)){this._a=o[0],this._b=o[1],this._c=o[2],this._d=o[3];return}this._a=o,this._b=l,this._c=u,this._d=p}tr.prototype={transform:function(o,l){return this._transform(o.clone(),l)},_transform:function(o,l){return l=l||1,o.x=l*(this._a*o.x+this._b),o.y=l*(this._c*o.y+this._d),o},untransform:function(o,l){return l=l||1,new W((o.x/l-this._b)/this._a,(o.y/l-this._d)/this._c)}};function nn(o,l,u,p){return new tr(o,l,u,p)}var er=e({},Nt,{code:"EPSG:3857",projection:Jo,transformation:function(){var o=.5/(Math.PI*Jo.R);return nn(o,.5,-o,.5)}()}),Td=e({},er,{code:"EPSG:900913"});function Xa(o){return document.createElementNS("http://www.w3.org/2000/svg",o)}function $a(o,l){var u="",p,g,v,M,T,S;for(p=0,v=o.length;p<v;p++){for(T=o[p],g=0,M=T.length;g<M;g++)S=T[g],u+=(g?"L":"M")+S.x+" "+S.y;u+=l?U.svg?"z":"x":""}return u||"M0 0"}var ir=document.documentElement.style,qn="ActiveXObject"in window,Cd=qn&&!document.addEventListener,Ka="msLaunchUri"in navigator&&!("documentMode"in document),nr=he("webkit"),Qa=he("android"),Ja=he("android 2")||he("android 3"),Sd=parseInt(/WebKit\/([0-9]+)|$/.exec(navigator.userAgent)[1],10),Od=Qa&&he("Google")&&Sd<537&&!("AudioNode"in window),sr=!!window.opera,tl=!Ka&&he("chrome"),el=he("gecko")&&!nr&&!sr&&!qn,Dd=!tl&&he("safari"),il=he("phantom"),nl="OTransition"in ir,Id=navigator.platform.indexOf("Win")===0,sl=qn&&"transition"in ir,or="WebKitCSSMatrix"in window&&"m11"in new window.WebKitCSSMatrix&&!Ja,ol="MozPerspective"in ir,Ad=!window.L_DISABLE_3D&&(sl||or||ol)&&!nl&&!il,sn=typeof orientation!="undefined"||he("mobile"),Ed=sn&&nr,zd=sn&&or,rl=!window.PointerEvent&&window.MSPointerEvent,al=!!(window.PointerEvent||rl),ll="ontouchstart"in window||!!window.TouchEvent,Rd=!window.L_NO_TOUCH&&(ll||al),Bd=sn&&sr,Fd=sn&&el,Nd=(window.devicePixelRatio||window.screen.deviceXDPI/window.screen.logicalXDPI)>1,Wd=function(){var o=!1;try{var l=Object.defineProperty({},"passive",{get:function(){o=!0}});window.addEventListener("testPassiveEventSupport",d,l),window.removeEventListener("testPassiveEventSupport",d,l)}catch(u){}return o}(),Hd=function(){return!!document.createElement("canvas").getContext}(),rr=!!(document.createElementNS&&Xa("svg").createSVGRect),Zd=!!rr&&function(){var o=document.createElement("div");return o.innerHTML="<svg/>",(o.firstChild&&o.firstChild.namespaceURI)==="http://www.w3.org/2000/svg"}(),Vd=!rr&&function(){try{var o=document.createElement("div");o.innerHTML='<v:shape adj="1"/>';var l=o.firstChild;return l.style.behavior="url(#default#VML)",l&&typeof l.adj=="object"}catch(u){return!1}}(),Yd=navigator.platform.indexOf("Mac")===0,jd=navigator.platform.indexOf("Linux")===0;function he(o){return navigator.userAgent.toLowerCase().indexOf(o)>=0}var U={ie:qn,ielt9:Cd,edge:Ka,webkit:nr,android:Qa,android23:Ja,androidStock:Od,opera:sr,chrome:tl,gecko:el,safari:Dd,phantom:il,opera12:nl,win:Id,ie3d:sl,webkit3d:or,gecko3d:ol,any3d:Ad,mobile:sn,mobileWebkit:Ed,mobileWebkit3d:zd,msPointer:rl,pointer:al,touch:Rd,touchNative:ll,mobileOpera:Bd,mobileGecko:Fd,retina:Nd,passiveEvents:Wd,canvas:Hd,svg:rr,vml:Vd,inlineSvg:Zd,mac:Yd,linux:jd},hl=U.msPointer?"MSPointerDown":"pointerdown",cl=U.msPointer?"MSPointerMove":"pointermove",ul=U.msPointer?"MSPointerUp":"pointerup",dl=U.msPointer?"MSPointerCancel":"pointercancel",ar={touchstart:hl,touchmove:cl,touchend:ul,touchcancel:dl},fl={touchstart:Kd,touchmove:Xn,touchend:Xn,touchcancel:Xn},pi={},pl=!1;function Ud(o,l,u){return l==="touchstart"&&$d(),fl[l]?(u=fl[l].bind(this,u),o.addEventListener(ar[l],u,!1),u):(console.warn("wrong event specified:",l),d)}function Gd(o,l,u){if(!ar[l]){console.warn("wrong event specified:",l);return}o.removeEventListener(ar[l],u,!1)}function qd(o){pi[o.pointerId]=o}function Xd(o){pi[o.pointerId]&&(pi[o.pointerId]=o)}function ml(o){delete pi[o.pointerId]}function $d(){pl||(document.addEventListener(hl,qd,!0),document.addEventListener(cl,Xd,!0),document.addEventListener(ul,ml,!0),document.addEventListener(dl,ml,!0),pl=!0)}function Xn(o,l){if(l.pointerType!==(l.MSPOINTER_TYPE_MOUSE||"mouse")){l.touches=[];for(var u in pi)l.touches.push(pi[u]);l.changedTouches=[l],o(l)}}function Kd(o,l){l.MSPOINTER_TYPE_TOUCH&&l.pointerType===l.MSPOINTER_TYPE_TOUCH&&Et(l),Xn(o,l)}function Qd(o){var l={},u,p;for(p in o)u=o[p],l[p]=u&&u.bind?u.bind(o):u;return o=l,l.type="dblclick",l.detail=2,l.isTrusted=!1,l._simulated=!0,l}var Jd=200;function tf(o,l){o.addEventListener("dblclick",l);var u=0,p;function g(v){if(v.detail!==1){p=v.detail;return}if(!(v.pointerType==="mouse"||v.sourceCapabilities&&!v.sourceCapabilities.firesTouchEvents)){var M=xl(v);if(!(M.some(function(S){return S instanceof HTMLLabelElement&&S.attributes.for})&&!M.some(function(S){return S instanceof HTMLInputElement||S instanceof HTMLSelectElement}))){var T=Date.now();T-u<=Jd?(p++,p===2&&l(Qd(v))):p=1,u=T}}}return o.addEventListener("click",g),{dblclick:l,simDblclick:g}}function ef(o,l){o.removeEventListener("dblclick",l.dblclick),o.removeEventListener("click",l.simDblclick)}var lr=Qn(["transform","webkitTransform","OTransform","MozTransform","msTransform"]),on=Qn(["webkitTransition","transition","OTransition","MozTransition","msTransition"]),gl=on==="webkitTransition"||on==="OTransition"?on+"End":"transitionend";function _l(o){return typeof o=="string"?document.getElementById(o):o}function rn(o,l){var u=o.style[l]||o.currentStyle&&o.currentStyle[l];if((!u||u==="auto")&&document.defaultView){var p=document.defaultView.getComputedStyle(o,null);u=p?p[l]:null}return u==="auto"?null:u}function ft(o,l,u){var p=document.createElement(o);return p.className=l||"",u&&u.appendChild(p),p}function Lt(o){var l=o.parentNode;l&&l.removeChild(o)}function $n(o){for(;o.firstChild;)o.removeChild(o.firstChild)}function mi(o){var l=o.parentNode;l&&l.lastChild!==o&&l.appendChild(o)}function gi(o){var l=o.parentNode;l&&l.firstChild!==o&&l.insertBefore(o,l.firstChild)}function hr(o,l){if(o.classList!==void 0)return o.classList.contains(l);var u=Kn(o);return u.length>0&&new RegExp("(^|\\s)"+l+"(\\s|$)").test(u)}function J(o,l){if(o.classList!==void 0)for(var u=_(l),p=0,g=u.length;p<g;p++)o.classList.add(u[p]);else if(!hr(o,l)){var v=Kn(o);cr(o,(v?v+" ":"")+l)}}function Ct(o,l){o.classList!==void 0?o.classList.remove(l):cr(o,m((" "+Kn(o)+" ").replace(" "+l+" "," ")))}function cr(o,l){o.className.baseVal===void 0?o.className=l:o.className.baseVal=l}function Kn(o){return o.correspondingElement&&(o=o.correspondingElement),o.className.baseVal===void 0?o.className:o.className.baseVal}function Kt(o,l){"opacity"in o.style?o.style.opacity=l:"filter"in o.style&&nf(o,l)}function nf(o,l){var u=!1,p="DXImageTransform.Microsoft.Alpha";try{u=o.filters.item(p)}catch(g){if(l===1)return}l=Math.round(l*100),u?(u.Enabled=l!==100,u.Opacity=l):o.style.filter+=" progid:"+p+"(opacity="+l+")"}function Qn(o){for(var l=document.documentElement.style,u=0;u<o.length;u++)if(o[u]in l)return o[u];return!1}function qe(o,l,u){var p=l||new W(0,0);o.style[lr]=(U.ie3d?"translate("+p.x+"px,"+p.y+"px)":"translate3d("+p.x+"px,"+p.y+"px,0)")+(u?" scale("+u+")":"")}function St(o,l){o._leaflet_pos=l,U.any3d?qe(o,l):(o.style.left=l.x+"px",o.style.top=l.y+"px")}function Xe(o){return o._leaflet_pos||new W(0,0)}var an,ln,ur;if("onselectstart"in document)an=function(){K(window,"selectstart",Et)},ln=function(){xt(window,"selectstart",Et)};else{var hn=Qn(["userSelect","WebkitUserSelect","OUserSelect","MozUserSelect","msUserSelect"]);an=function(){if(hn){var o=document.documentElement.style;ur=o[hn],o[hn]="none"}},ln=function(){hn&&(document.documentElement.style[hn]=ur,ur=void 0)}}function dr(){K(window,"dragstart",Et)}function fr(){xt(window,"dragstart",Et)}var Jn,pr;function mr(o){for(;o.tabIndex===-1;)o=o.parentNode;o.style&&(ts(),Jn=o,pr=o.style.outlineStyle,o.style.outlineStyle="none",K(window,"keydown",ts))}function ts(){Jn&&(Jn.style.outlineStyle=pr,Jn=void 0,pr=void 0,xt(window,"keydown",ts))}function yl(o){do o=o.parentNode;while((!o.offsetWidth||!o.offsetHeight)&&o!==document.body);return o}function gr(o){var l=o.getBoundingClientRect();return{x:l.width/o.offsetWidth||1,y:l.height/o.offsetHeight||1,boundingClientRect:l}}var sf={__proto__:null,TRANSFORM:lr,TRANSITION:on,TRANSITION_END:gl,get:_l,getStyle:rn,create:ft,remove:Lt,empty:$n,toFront:mi,toBack:gi,hasClass:hr,addClass:J,removeClass:Ct,setClass:cr,getClass:Kn,setOpacity:Kt,testProp:Qn,setTransform:qe,setPosition:St,getPosition:Xe,get disableTextSelection(){return an},get enableTextSelection(){return ln},disableImageDrag:dr,enableImageDrag:fr,preventOutline:mr,restoreOutline:ts,getSizedParentNode:yl,getScale:gr};function K(o,l,u,p){if(l&&typeof l=="object")for(var g in l)yr(o,g,l[g],u);else{l=_(l);for(var v=0,M=l.length;v<M;v++)yr(o,l[v],u,p)}return this}var ce="_leaflet_events";function xt(o,l,u,p){if(arguments.length===1)vl(o),delete o[ce];else if(l&&typeof l=="object")for(var g in l)vr(o,g,l[g],u);else if(l=_(l),arguments.length===2)vl(o,function(T){return C(l,T)!==-1});else for(var v=0,M=l.length;v<M;v++)vr(o,l[v],u,p);return this}function vl(o,l){for(var u in o[ce]){var p=u.split(/\d/)[0];(!l||l(p))&&vr(o,p,null,null,u)}}var _r={mouseenter:"mouseover",mouseleave:"mouseout",wheel:!("onwheel"in window)&&"mousewheel"};function yr(o,l,u,p){var g=l+a(u)+(p?"_"+a(p):"");if(o[ce]&&o[ce][g])return this;var v=function(T){return u.call(p||o,T||window.event)},M=v;!U.touchNative&&U.pointer&&l.indexOf("touch")===0?v=Ud(o,l,v):U.touch&&l==="dblclick"?v=tf(o,v):"addEventListener"in o?l==="touchstart"||l==="touchmove"||l==="wheel"||l==="mousewheel"?o.addEventListener(_r[l]||l,v,U.passiveEvents?{passive:!1}:!1):l==="mouseenter"||l==="mouseleave"?(v=function(T){T=T||window.event,br(o,T)&&M(T)},o.addEventListener(_r[l],v,!1)):o.addEventListener(l,M,!1):o.attachEvent("on"+l,v),o[ce]=o[ce]||{},o[ce][g]=v}function vr(o,l,u,p,g){g=g||l+a(u)+(p?"_"+a(p):"");var v=o[ce]&&o[ce][g];if(!v)return this;!U.touchNative&&U.pointer&&l.indexOf("touch")===0?Gd(o,l,v):U.touch&&l==="dblclick"?ef(o,v):"removeEventListener"in o?o.removeEventListener(_r[l]||l,v,!1):o.detachEvent("on"+l,v),o[ce][g]=null}function $e(o){return o.stopPropagation?o.stopPropagation():o.originalEvent?o.originalEvent._stopped=!0:o.cancelBubble=!0,this}function xr(o){return yr(o,"wheel",$e),this}function cn(o){return K(o,"mousedown touchstart dblclick contextmenu",$e),o._leaflet_disable_click=!0,this}function Et(o){return o.preventDefault?o.preventDefault():o.returnValue=!1,this}function Ke(o){return Et(o),$e(o),this}function xl(o){if(o.composedPath)return o.composedPath();for(var l=[],u=o.target;u;)l.push(u),u=u.parentNode;return l}function bl(o,l){if(!l)return new W(o.clientX,o.clientY);var u=gr(l),p=u.boundingClientRect;return new W((o.clientX-p.left)/u.x-l.clientLeft,(o.clientY-p.top)/u.y-l.clientTop)}var of=U.linux&&U.chrome?window.devicePixelRatio:U.mac?window.devicePixelRatio*3:window.devicePixelRatio>0?2*window.devicePixelRatio:1;function wl(o){return U.edge?o.wheelDeltaY/2:o.deltaY&&o.deltaMode===0?-o.deltaY/of:o.deltaY&&o.deltaMode===1?-o.deltaY*20:o.deltaY&&o.deltaMode===2?-o.deltaY*60:o.deltaX||o.deltaZ?0:o.wheelDelta?(o.wheelDeltaY||o.wheelDelta)/2:o.detail&&Math.abs(o.detail)<32765?-o.detail*20:o.detail?o.detail/-32765*60:0}function br(o,l){var u=l.relatedTarget;if(!u)return!0;try{for(;u&&u!==o;)u=u.parentNode}catch(p){return!1}return u!==o}var rf={__proto__:null,on:K,off:xt,stopPropagation:$e,disableScrollPropagation:xr,disableClickPropagation:cn,preventDefault:Et,stop:Ke,getPropagationPath:xl,getMousePosition:bl,getWheelDelta:wl,isExternalTarget:br,addListener:K,removeListener:xt},Ml=st.extend({run:function(o,l,u,p){this.stop(),this._el=o,this._inProgress=!0,this._duration=u||.25,this._easeOutPower=1/Math.max(p||.5,.2),this._startPos=Xe(o),this._offset=l.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=N(this._animate,this),this._step()},_step:function(o){var l=+new Date-this._startTime,u=this._duration*1e3;l<u?this._runFrame(this._easeOut(l/u),o):(this._runFrame(1),this._complete())},_runFrame:function(o,l){var u=this._startPos.add(this._offset.multiplyBy(o));l&&u._round(),St(this._el,u),this.fire("step")},_complete:function(){j(this._animId),this._inProgress=!1,this.fire("end")},_easeOut:function(o){return 1-Math.pow(1-o,this._easeOutPower)}}),ht=st.extend({options:{crs:er,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(o,l){l=y(this,l),this._handlers=[],this._layers={},this._zoomBoundLayers={},this._sizeChanged=!0,this._initContainer(o),this._initLayout(),this._onResize=s(this._onResize,this),this._initEvents(),l.maxBounds&&this.setMaxBounds(l.maxBounds),l.zoom!==void 0&&(this._zoom=this._limitZoom(l.zoom)),l.center&&l.zoom!==void 0&&this.setView(X(l.center),l.zoom,{reset:!0}),this.callInitHooks(),this._zoomAnimated=on&&U.any3d&&!U.mobileOpera&&this.options.zoomAnimation,this._zoomAnimated&&(this._createAnimProxy(),K(this._proxy,gl,this._catchTransitionEnd,this)),this._addLayers(this.options.layers)},setView:function(o,l,u){if(l=l===void 0?this._zoom:this._limitZoom(l),o=this._limitCenter(X(o),l,this.options.maxBounds),u=u||{},this._stop(),this._loaded&&!u.reset&&u!==!0){u.animate!==void 0&&(u.zoom=e({animate:u.animate},u.zoom),u.pan=e({animate:u.animate,duration:u.duration},u.pan));var p=this._zoom!==l?this._tryAnimatedZoom&&this._tryAnimatedZoom(o,l,u.zoom):this._tryAnimatedPan(o,u.pan);if(p)return clearTimeout(this._sizeTimer),this}return this._resetView(o,l,u.pan&&u.pan.noMoveStart),this},setZoom:function(o,l){return this._loaded?this.setView(this.getCenter(),o,{zoom:l}):(this._zoom=o,this)},zoomIn:function(o,l){return o=o||(U.any3d?this.options.zoomDelta:1),this.setZoom(this._zoom+o,l)},zoomOut:function(o,l){return o=o||(U.any3d?this.options.zoomDelta:1),this.setZoom(this._zoom-o,l)},setZoomAround:function(o,l,u){var p=this.getZoomScale(l),g=this.getSize().divideBy(2),v=o instanceof W?o:this.latLngToContainerPoint(o),M=v.subtract(g).multiplyBy(1-1/p),T=this.containerPointToLatLng(g.add(M));return this.setView(T,l,{zoom:u})},_getBoundsCenterZoom:function(o,l){l=l||{},o=o.getBounds?o.getBounds():pt(o);var u=E(l.paddingTopLeft||l.padding||[0,0]),p=E(l.paddingBottomRight||l.padding||[0,0]),g=this.getBoundsZoom(o,!1,u.add(p));if(g=typeof l.maxZoom=="number"?Math.min(l.maxZoom,g):g,g===1/0)return{center:o.getCenter(),zoom:g};var v=p.subtract(u).divideBy(2),M=this.project(o.getSouthWest(),g),T=this.project(o.getNorthEast(),g),S=this.unproject(M.add(T).divideBy(2).add(v),g);return{center:S,zoom:g}},fitBounds:function(o,l){if(o=pt(o),!o.isValid())throw new Error("Bounds are not valid.");var u=this._getBoundsCenterZoom(o,l);return this.setView(u.center,u.zoom,l)},fitWorld:function(o){return this.fitBounds([[-90,-180],[90,180]],o)},panTo:function(o,l){return this.setView(o,this._zoom,{pan:l})},panBy:function(o,l){if(o=E(o).round(),l=l||{},!o.x&&!o.y)return this.fire("moveend");if(l.animate!==!0&&!this.getSize().contains(o))return this._resetView(this.unproject(this.project(this.getCenter()).add(o)),this.getZoom()),this;if(this._panAnim||(this._panAnim=new Ml,this._panAnim.on({step:this._onPanTransitionStep,end:this._onPanTransitionEnd},this)),l.noMoveStart||this.fire("movestart"),l.animate!==!1){J(this._mapPane,"leaflet-pan-anim");var u=this._getMapPanePos().subtract(o).round();this._panAnim.run(this._mapPane,u,l.duration||.25,l.easeLinearity)}else this._rawPanBy(o),this.fire("move").fire("moveend");return this},flyTo:function(o,l,u){if(u=u||{},u.animate===!1||!U.any3d)return this.setView(o,l,u);this._stop();var p=this.project(this.getCenter()),g=this.project(o),v=this.getSize(),M=this._zoom;o=X(o),l=l===void 0?M:l;var T=Math.max(v.x,v.y),S=T*this.getZoomScale(M,l),A=g.distanceTo(p)||1,H=1.42,G=H*H;function et(Ot){var ds=Ot?-1:1,qf=Ot?S:T,Xf=S*S-T*T+ds*G*G*A*A,$f=2*qf*G*A,Ir=Xf/$f,nh=Math.sqrt(Ir*Ir+1)-Ir,Kf=nh<1e-9?-18:Math.log(nh);return Kf}function Zt(Ot){return(Math.exp(Ot)-Math.exp(-Ot))/2}function At(Ot){return(Math.exp(Ot)+Math.exp(-Ot))/2}function Jt(Ot){return Zt(Ot)/At(Ot)}var Vt=et(0);function wi(Ot){return T*(At(Vt)/At(Vt+H*Ot))}function Yf(Ot){return T*(At(Vt)*Jt(Vt+H*Ot)-Zt(Vt))/G}function jf(Ot){return 1-Math.pow(1-Ot,1.5)}var Uf=Date.now(),eh=(et(1)-Vt)/H,Gf=u.duration?1e3*u.duration:1e3*eh*.8;function ih(){var Ot=(Date.now()-Uf)/Gf,ds=jf(Ot)*eh;Ot<=1?(this._flyToFrame=N(ih,this),this._move(this.unproject(p.add(g.subtract(p).multiplyBy(Yf(ds)/A)),M),this.getScaleZoom(T/wi(ds),M),{flyTo:!0})):this._move(o,l)._moveEnd(!0)}return this._moveStart(!0,u.noMoveStart),ih.call(this),this},flyToBounds:function(o,l){var u=this._getBoundsCenterZoom(o,l);return this.flyTo(u.center,u.zoom,l)},setMaxBounds:function(o){return o=pt(o),this.listens("moveend",this._panInsideMaxBounds)&&this.off("moveend",this._panInsideMaxBounds),o.isValid()?(this.options.maxBounds=o,this._loaded&&this._panInsideMaxBounds(),this.on("moveend",this._panInsideMaxBounds)):(this.options.maxBounds=null,this)},setMinZoom:function(o){var l=this.options.minZoom;return this.options.minZoom=o,this._loaded&&l!==o&&(this.fire("zoomlevelschange"),this.getZoom()<this.options.minZoom)?this.setZoom(o):this},setMaxZoom:function(o){var l=this.options.maxZoom;return this.options.maxZoom=o,this._loaded&&l!==o&&(this.fire("zoomlevelschange"),this.getZoom()>this.options.maxZoom)?this.setZoom(o):this},panInsideBounds:function(o,l){this._enforcingBounds=!0;var u=this.getCenter(),p=this._limitCenter(u,this._zoom,pt(o));return u.equals(p)||this.panTo(p,l),this._enforcingBounds=!1,this},panInside:function(o,l){l=l||{};var u=E(l.paddingTopLeft||l.padding||[0,0]),p=E(l.paddingBottomRight||l.padding||[0,0]),g=this.project(this.getCenter()),v=this.project(o),M=this.getPixelBounds(),T=dt([M.min.add(u),M.max.subtract(p)]),S=T.getSize();if(!T.contains(v)){this._enforcingBounds=!0;var A=v.subtract(T.getCenter()),H=T.extend(v).getSize().subtract(S);g.x+=A.x<0?-H.x:H.x,g.y+=A.y<0?-H.y:H.y,this.panTo(this.unproject(g),l),this._enforcingBounds=!1}return this},invalidateSize:function(o){if(!this._loaded)return this;o=e({animate:!1,pan:!0},o===!0?{animate:!0}:o);var l=this.getSize();this._sizeChanged=!0,this._lastCenter=null;var u=this.getSize(),p=l.divideBy(2).round(),g=u.divideBy(2).round(),v=p.subtract(g);return!v.x&&!v.y?this:(o.animate&&o.pan?this.panBy(v):(o.pan&&this._rawPanBy(v),this.fire("move"),o.debounceMoveend?(clearTimeout(this._sizeTimer),this._sizeTimer=setTimeout(s(this.fire,this,"moveend"),200)):this.fire("moveend")),this.fire("resize",{oldSize:l,newSize:u}))},stop:function(){return this.setZoom(this._limitZoom(this._zoom)),this.options.zoomSnap||this.fire("viewreset"),this._stop()},locate:function(o){if(o=this._locateOptions=e({timeout:1e4,watch:!1},o),!("geolocation"in navigator))return this._handleGeolocationError({code:0,message:"Geolocation not supported."}),this;var l=s(this._handleGeolocationResponse,this),u=s(this._handleGeolocationError,this);return o.watch?this._locationWatchId=navigator.geolocation.watchPosition(l,u,o):navigator.geolocation.getCurrentPosition(l,u,o),this},stopLocate:function(){return navigator.geolocation&&navigator.geolocation.clearWatch&&navigator.geolocation.clearWatch(this._locationWatchId),this._locateOptions&&(this._locateOptions.setView=!1),this},_handleGeolocationError:function(o){if(this._container._leaflet_id){var l=o.code,u=o.message||(l===1?"permission denied":l===2?"position unavailable":"timeout");this._locateOptions.setView&&!this._loaded&&this.fitWorld(),this.fire("locationerror",{code:l,message:"Geolocation error: "+u+"."})}},_handleGeolocationResponse:function(o){if(this._container._leaflet_id){var l=o.coords.latitude,u=o.coords.longitude,p=new ot(l,u),g=p.toBounds(o.coords.accuracy*2),v=this._locateOptions;if(v.setView){var M=this.getBoundsZoom(g);this.setView(p,v.maxZoom?Math.min(M,v.maxZoom):M)}var T={latlng:p,bounds:g,timestamp:o.timestamp};for(var S in o.coords)typeof o.coords[S]=="number"&&(T[S]=o.coords[S]);this.fire("locationfound",T)}},addHandler:function(o,l){if(!l)return this;var u=this[o]=new l(this);return this._handlers.push(u),this.options[o]&&u.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(l){this._container._leaflet_id=void 0,this._containerId=void 0}this._locationWatchId!==void 0&&this.stopLocate(),this._stop(),Lt(this._mapPane),this._clearControlPos&&this._clearControlPos(),this._resizeRequest&&(j(this._resizeRequest),this._resizeRequest=null),this._clearHandlers(),this._loaded&&this.fire("unload");var o;for(o in this._layers)this._layers[o].remove();for(o in this._panes)Lt(this._panes[o]);return this._layers=[],this._panes=[],delete this._mapPane,delete this._renderer,this},createPane:function(o,l){var u="leaflet-pane"+(o?" leaflet-"+o.replace("Pane","")+"-pane":""),p=ft("div",u,l||this._mapPane);return o&&(this._panes[o]=p),p},getCenter:function(){return this._checkIfLoaded(),this._lastCenter&&!this._moved()?this._lastCenter.clone():this.layerPointToLatLng(this._getCenterLayerPoint())},getZoom:function(){return this._zoom},getBounds:function(){var o=this.getPixelBounds(),l=this.unproject(o.getBottomLeft()),u=this.unproject(o.getTopRight());return new kt(l,u)},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(o,l,u){o=pt(o),u=E(u||[0,0]);var p=this.getZoom()||0,g=this.getMinZoom(),v=this.getMaxZoom(),M=o.getNorthWest(),T=o.getSouthEast(),S=this.getSize().subtract(u),A=dt(this.project(T,p),this.project(M,p)).getSize(),H=U.any3d?this.options.zoomSnap:1,G=S.x/A.x,et=S.y/A.y,Zt=l?Math.max(G,et):Math.min(G,et);return p=this.getScaleZoom(Zt,p),H&&(p=Math.round(p/(H/100))*(H/100),p=l?Math.ceil(p/H)*H:Math.floor(p/H)*H),Math.max(g,Math.min(v,p))},getSize:function(){return(!this._size||this._sizeChanged)&&(this._size=new W(this._container.clientWidth||0,this._container.clientHeight||0),this._sizeChanged=!1),this._size.clone()},getPixelBounds:function(o,l){var u=this._getTopLeftPoint(o,l);return new V(u,u.add(this.getSize()))},getPixelOrigin:function(){return this._checkIfLoaded(),this._pixelOrigin},getPixelWorldBounds:function(o){return this.options.crs.getProjectedBounds(o===void 0?this.getZoom():o)},getPane:function(o){return typeof o=="string"?this._panes[o]:o},getPanes:function(){return this._panes},getContainer:function(){return this._container},getZoomScale:function(o,l){var u=this.options.crs;return l=l===void 0?this._zoom:l,u.scale(o)/u.scale(l)},getScaleZoom:function(o,l){var u=this.options.crs;l=l===void 0?this._zoom:l;var p=u.zoom(o*u.scale(l));return isNaN(p)?1/0:p},project:function(o,l){return l=l===void 0?this._zoom:l,this.options.crs.latLngToPoint(X(o),l)},unproject:function(o,l){return l=l===void 0?this._zoom:l,this.options.crs.pointToLatLng(E(o),l)},layerPointToLatLng:function(o){var l=E(o).add(this.getPixelOrigin());return this.unproject(l)},latLngToLayerPoint:function(o){var l=this.project(X(o))._round();return l._subtract(this.getPixelOrigin())},wrapLatLng:function(o){return this.options.crs.wrapLatLng(X(o))},wrapLatLngBounds:function(o){return this.options.crs.wrapLatLngBounds(pt(o))},distance:function(o,l){return this.options.crs.distance(X(o),X(l))},containerPointToLayerPoint:function(o){return E(o).subtract(this._getMapPanePos())},layerPointToContainerPoint:function(o){return E(o).add(this._getMapPanePos())},containerPointToLatLng:function(o){var l=this.containerPointToLayerPoint(E(o));return this.layerPointToLatLng(l)},latLngToContainerPoint:function(o){return this.layerPointToContainerPoint(this.latLngToLayerPoint(X(o)))},mouseEventToContainerPoint:function(o){return bl(o,this._container)},mouseEventToLayerPoint:function(o){return this.containerPointToLayerPoint(this.mouseEventToContainerPoint(o))},mouseEventToLatLng:function(o){return this.layerPointToLatLng(this.mouseEventToLayerPoint(o))},_initContainer:function(o){var l=this._container=_l(o);if(l){if(l._leaflet_id)throw new Error("Map container is already initialized.")}else throw new Error("Map container not found.");K(l,"scroll",this._onScroll,this),this._containerId=a(l)},_initLayout:function(){var o=this._container;this._fadeAnimated=this.options.fadeAnimation&&U.any3d,J(o,"leaflet-container"+(U.touch?" leaflet-touch":"")+(U.retina?" leaflet-retina":"")+(U.ielt9?" leaflet-oldie":"")+(U.safari?" leaflet-safari":"")+(this._fadeAnimated?" leaflet-fade-anim":""));var l=rn(o,"position");l!=="absolute"&&l!=="relative"&&l!=="fixed"&&l!=="sticky"&&(o.style.position="relative"),this._initPanes(),this._initControlPos&&this._initControlPos()},_initPanes:function(){var o=this._panes={};this._paneRenderers={},this._mapPane=this.createPane("mapPane",this._container),St(this._mapPane,new W(0,0)),this.createPane("tilePane"),this.createPane("overlayPane"),this.createPane("shadowPane"),this.createPane("markerPane"),this.createPane("tooltipPane"),this.createPane("popupPane"),this.options.markerZoomAnimation||(J(o.markerPane,"leaflet-zoom-hide"),J(o.shadowPane,"leaflet-zoom-hide"))},_resetView:function(o,l,u){St(this._mapPane,new W(0,0));var p=!this._loaded;this._loaded=!0,l=this._limitZoom(l),this.fire("viewprereset");var g=this._zoom!==l;this._moveStart(g,u)._move(o,l)._moveEnd(g),this.fire("viewreset"),p&&this.fire("load")},_moveStart:function(o,l){return o&&this.fire("zoomstart"),l||this.fire("movestart"),this},_move:function(o,l,u,p){l===void 0&&(l=this._zoom);var g=this._zoom!==l;return this._zoom=l,this._lastCenter=o,this._pixelOrigin=this._getNewPixelOrigin(o),p?u&&u.pinch&&this.fire("zoom",u):((g||u&&u.pinch)&&this.fire("zoom",u),this.fire("move",u)),this},_moveEnd:function(o){return o&&this.fire("zoomend"),this.fire("moveend")},_stop:function(){return j(this._flyToFrame),this._panAnim&&this._panAnim.stop(),this},_rawPanBy:function(o){St(this._mapPane,this._getMapPanePos().subtract(o))},_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(o){this._targets={},this._targets[a(this._container)]=this;var l=o?xt:K;l(this._container,"click dblclick mousedown mouseup mouseover mouseout mousemove contextmenu keypress keydown keyup",this._handleDOMEvent,this),this.options.trackResize&&l(window,"resize",this._onResize,this),U.any3d&&this.options.transform3DLimit&&(o?this.off:this.on).call(this,"moveend",this._onMoveEnd)},_onResize:function(){j(this._resizeRequest),this._resizeRequest=N(function(){this.invalidateSize({debounceMoveend:!0})},this)},_onScroll:function(){this._container.scrollTop=0,this._container.scrollLeft=0},_onMoveEnd:function(){var o=this._getMapPanePos();Math.max(Math.abs(o.x),Math.abs(o.y))>=this.options.transform3DLimit&&this._resetView(this.getCenter(),this.getZoom())},_findEventTargets:function(o,l){for(var u=[],p,g=l==="mouseout"||l==="mouseover",v=o.target||o.srcElement,M=!1;v;){if(p=this._targets[a(v)],p&&(l==="click"||l==="preclick")&&this._draggableMoved(p)){M=!0;break}if(p&&p.listens(l,!0)&&(g&&!br(v,o)||(u.push(p),g))||v===this._container)break;v=v.parentNode}return!u.length&&!M&&!g&&this.listens(l,!0)&&(u=[this]),u},_isClickDisabled:function(o){for(;o&&o!==this._container;){if(o._leaflet_disable_click)return!0;o=o.parentNode}},_handleDOMEvent:function(o){var l=o.target||o.srcElement;if(!(!this._loaded||l._leaflet_disable_events||o.type==="click"&&this._isClickDisabled(l))){var u=o.type;u==="mousedown"&&mr(l),this._fireDOMEvent(o,u)}},_mouseEvents:["click","dblclick","mouseover","mouseout","contextmenu"],_fireDOMEvent:function(o,l,u){if(o.type==="click"){var p=e({},o);p.type="preclick",this._fireDOMEvent(p,p.type,u)}var g=this._findEventTargets(o,l);if(u){for(var v=[],M=0;M<u.length;M++)u[M].listens(l,!0)&&v.push(u[M]);g=v.concat(g)}if(g.length){l==="contextmenu"&&Et(o);var T=g[0],S={originalEvent:o};if(o.type!=="keypress"&&o.type!=="keydown"&&o.type!=="keyup"){var A=T.getLatLng&&(!T._radius||T._radius<=10);S.containerPoint=A?this.latLngToContainerPoint(T.getLatLng()):this.mouseEventToContainerPoint(o),S.layerPoint=this.containerPointToLayerPoint(S.containerPoint),S.latlng=A?T.getLatLng():this.layerPointToLatLng(S.layerPoint)}for(M=0;M<g.length;M++)if(g[M].fire(l,S,!0),S.originalEvent._stopped||g[M].options.bubblingMouseEvents===!1&&C(this._mouseEvents,l)!==-1)return}},_draggableMoved:function(o){return o=o.dragging&&o.dragging.enabled()?o:this,o.dragging&&o.dragging.moved()||this.boxZoom&&this.boxZoom.moved()},_clearHandlers:function(){for(var o=0,l=this._handlers.length;o<l;o++)this._handlers[o].disable()},whenReady:function(o,l){return this._loaded?o.call(l||this,{target:this}):this.on("load",o,l),this},_getMapPanePos:function(){return Xe(this._mapPane)||new W(0,0)},_moved:function(){var o=this._getMapPanePos();return o&&!o.equals([0,0])},_getTopLeftPoint:function(o,l){var u=o&&l!==void 0?this._getNewPixelOrigin(o,l):this.getPixelOrigin();return u.subtract(this._getMapPanePos())},_getNewPixelOrigin:function(o,l){var u=this.getSize()._divideBy(2);return this.project(o,l)._subtract(u)._add(this._getMapPanePos())._round()},_latLngToNewLayerPoint:function(o,l,u){var p=this._getNewPixelOrigin(u,l);return this.project(o,l)._subtract(p)},_latLngBoundsToNewLayerBounds:function(o,l,u){var p=this._getNewPixelOrigin(u,l);return dt([this.project(o.getSouthWest(),l)._subtract(p),this.project(o.getNorthWest(),l)._subtract(p),this.project(o.getSouthEast(),l)._subtract(p),this.project(o.getNorthEast(),l)._subtract(p)])},_getCenterLayerPoint:function(){return this.containerPointToLayerPoint(this.getSize()._divideBy(2))},_getCenterOffset:function(o){return this.latLngToLayerPoint(o).subtract(this._getCenterLayerPoint())},_limitCenter:function(o,l,u){if(!u)return o;var p=this.project(o,l),g=this.getSize().divideBy(2),v=new V(p.subtract(g),p.add(g)),M=this._getBoundsOffset(v,u,l);return Math.abs(M.x)<=1&&Math.abs(M.y)<=1?o:this.unproject(p.add(M),l)},_limitOffset:function(o,l){if(!l)return o;var u=this.getPixelBounds(),p=new V(u.min.add(o),u.max.add(o));return o.add(this._getBoundsOffset(p,l))},_getBoundsOffset:function(o,l,u){var p=dt(this.project(l.getNorthEast(),u),this.project(l.getSouthWest(),u)),g=p.min.subtract(o.min),v=p.max.subtract(o.max),M=this._rebound(g.x,-v.x),T=this._rebound(g.y,-v.y);return new W(M,T)},_rebound:function(o,l){return o+l>0?Math.round(o-l)/2:Math.max(0,Math.ceil(o))-Math.max(0,Math.floor(l))},_limitZoom:function(o){var l=this.getMinZoom(),u=this.getMaxZoom(),p=U.any3d?this.options.zoomSnap:1;return p&&(o=Math.round(o/p)*p),Math.max(l,Math.min(u,o))},_onPanTransitionStep:function(){this.fire("move")},_onPanTransitionEnd:function(){Ct(this._mapPane,"leaflet-pan-anim"),this.fire("moveend")},_tryAnimatedPan:function(o,l){var u=this._getCenterOffset(o)._trunc();return(l&&l.animate)!==!0&&!this.getSize().contains(u)?!1:(this.panBy(u,l),!0)},_createAnimProxy:function(){var o=this._proxy=ft("div","leaflet-proxy leaflet-zoom-animated");this._panes.mapPane.appendChild(o),this.on("zoomanim",function(l){var u=lr,p=this._proxy.style[u];qe(this._proxy,this.project(l.center,l.zoom),this.getZoomScale(l.zoom,1)),p===this._proxy.style[u]&&this._animatingZoom&&this._onZoomTransitionEnd()},this),this.on("load moveend",this._animMoveEnd,this),this._on("unload",this._destroyAnimProxy,this)},_destroyAnimProxy:function(){Lt(this._proxy),this.off("load moveend",this._animMoveEnd,this),delete this._proxy},_animMoveEnd:function(){var o=this.getCenter(),l=this.getZoom();qe(this._proxy,this.project(o,l),this.getZoomScale(l,1))},_catchTransitionEnd:function(o){this._animatingZoom&&o.propertyName.indexOf("transform")>=0&&this._onZoomTransitionEnd()},_nothingToAnimate:function(){return!this._container.getElementsByClassName("leaflet-zoom-animated").length},_tryAnimatedZoom:function(o,l,u){if(this._animatingZoom)return!0;if(u=u||{},!this._zoomAnimated||u.animate===!1||this._nothingToAnimate()||Math.abs(l-this._zoom)>this.options.zoomAnimationThreshold)return!1;var p=this.getZoomScale(l),g=this._getCenterOffset(o)._divideBy(1-1/p);return u.animate!==!0&&!this.getSize().contains(g)?!1:(N(function(){this._moveStart(!0,u.noMoveStart||!1)._animateZoom(o,l,!0)},this),!0)},_animateZoom:function(o,l,u,p){this._mapPane&&(u&&(this._animatingZoom=!0,this._animateToCenter=o,this._animateToZoom=l,J(this._mapPane,"leaflet-zoom-anim")),this.fire("zoomanim",{center:o,zoom:l,noUpdate:p}),this._tempFireZoomEvent||(this._tempFireZoomEvent=this._zoom!==this._animateToZoom),this._move(this._animateToCenter,this._animateToZoom,void 0,!0),setTimeout(s(this._onZoomTransitionEnd,this),250))},_onZoomTransitionEnd:function(){this._animatingZoom&&(this._mapPane&&Ct(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 af(o,l){return new ht(o,l)}var oe=Y.extend({options:{position:"topright"},initialize:function(o){y(this,o)},getPosition:function(){return this.options.position},setPosition:function(o){var l=this._map;return l&&l.removeControl(this),this.options.position=o,l&&l.addControl(this),this},getContainer:function(){return this._container},addTo:function(o){this.remove(),this._map=o;var l=this._container=this.onAdd(o),u=this.getPosition(),p=o._controlCorners[u];return J(l,"leaflet-control"),u.indexOf("bottom")!==-1?p.insertBefore(l,p.firstChild):p.appendChild(l),this._map.on("unload",this.remove,this),this},remove:function(){return this._map?(Lt(this._container),this.onRemove&&this.onRemove(this._map),this._map.off("unload",this.remove,this),this._map=null,this):this},_refocusOnMap:function(o){this._map&&o&&o.screenX>0&&o.screenY>0&&this._map.getContainer().focus()}}),un=function(o){return new oe(o)};ht.include({addControl:function(o){return o.addTo(this),this},removeControl:function(o){return o.remove(),this},_initControlPos:function(){var o=this._controlCorners={},l="leaflet-",u=this._controlContainer=ft("div",l+"control-container",this._container);function p(g,v){var M=l+g+" "+l+v;o[g+v]=ft("div",M,u)}p("top","left"),p("top","right"),p("bottom","left"),p("bottom","right")},_clearControlPos:function(){for(var o in this._controlCorners)Lt(this._controlCorners[o]);Lt(this._controlContainer),delete this._controlCorners,delete this._controlContainer}});var Ll=oe.extend({options:{collapsed:!0,position:"topright",autoZIndex:!0,hideSingleBase:!1,sortLayers:!1,sortFunction:function(o,l,u,p){return u<p?-1:p<u?1:0}},initialize:function(o,l,u){y(this,u),this._layerControlInputs=[],this._layers=[],this._lastZIndex=0,this._handlingClick=!1,this._preventClick=!1;for(var p in o)this._addLayer(o[p],p);for(p in l)this._addLayer(l[p],p,!0)},onAdd:function(o){this._initLayout(),this._update(),this._map=o,o.on("zoomend",this._checkDisabledLayers,this);for(var l=0;l<this._layers.length;l++)this._layers[l].layer.on("add remove",this._onLayerChange,this);return this._container},addTo:function(o){return oe.prototype.addTo.call(this,o),this._expandIfNotCollapsed()},onRemove:function(){this._map.off("zoomend",this._checkDisabledLayers,this);for(var o=0;o<this._layers.length;o++)this._layers[o].layer.off("add remove",this._onLayerChange,this)},addBaseLayer:function(o,l){return this._addLayer(o,l),this._map?this._update():this},addOverlay:function(o,l){return this._addLayer(o,l,!0),this._map?this._update():this},removeLayer:function(o){o.off("add remove",this._onLayerChange,this);var l=this._getLayer(a(o));return l&&this._layers.splice(this._layers.indexOf(l),1),this._map?this._update():this},expand:function(){J(this._container,"leaflet-control-layers-expanded"),this._section.style.height=null;var o=this._map.getSize().y-(this._container.offsetTop+50);return o<this._section.clientHeight?(J(this._section,"leaflet-control-layers-scrollbar"),this._section.style.height=o+"px"):Ct(this._section,"leaflet-control-layers-scrollbar"),this._checkDisabledLayers(),this},collapse:function(){return Ct(this._container,"leaflet-control-layers-expanded"),this},_initLayout:function(){var o="leaflet-control-layers",l=this._container=ft("div",o),u=this.options.collapsed;l.setAttribute("aria-haspopup",!0),cn(l),xr(l);var p=this._section=ft("section",o+"-list");u&&(this._map.on("click",this.collapse,this),K(l,{mouseenter:this._expandSafely,mouseleave:this.collapse},this));var g=this._layersLink=ft("a",o+"-toggle",l);g.href="#",g.title="Layers",g.setAttribute("role","button"),K(g,{keydown:function(v){v.keyCode===13&&this._expandSafely()},click:function(v){Et(v),this._expandSafely()}},this),u||this.expand(),this._baseLayersList=ft("div",o+"-base",p),this._separator=ft("div",o+"-separator",p),this._overlaysList=ft("div",o+"-overlays",p),l.appendChild(p)},_getLayer:function(o){for(var l=0;l<this._layers.length;l++)if(this._layers[l]&&a(this._layers[l].layer)===o)return this._layers[l]},_addLayer:function(o,l,u){this._map&&o.on("add remove",this._onLayerChange,this),this._layers.push({layer:o,name:l,overlay:u}),this.options.sortLayers&&this._layers.sort(s(function(p,g){return this.options.sortFunction(p.layer,g.layer,p.name,g.name)},this)),this.options.autoZIndex&&o.setZIndex&&(this._lastZIndex++,o.setZIndex(this._lastZIndex)),this._expandIfNotCollapsed()},_update:function(){if(!this._container)return this;$n(this._baseLayersList),$n(this._overlaysList),this._layerControlInputs=[];var o,l,u,p,g=0;for(u=0;u<this._layers.length;u++)p=this._layers[u],this._addItem(p),l=l||p.overlay,o=o||!p.overlay,g+=p.overlay?0:1;return this.options.hideSingleBase&&(o=o&&g>1,this._baseLayersList.style.display=o?"":"none"),this._separator.style.display=l&&o?"":"none",this},_onLayerChange:function(o){this._handlingClick||this._update();var l=this._getLayer(a(o.target)),u=l.overlay?o.type==="add"?"overlayadd":"overlayremove":o.type==="add"?"baselayerchange":null;u&&this._map.fire(u,l)},_createRadioElement:function(o,l){var u='<input type="radio" class="leaflet-control-layers-selector" name="'+o+'"'+(l?' checked="checked"':"")+"/>",p=document.createElement("div");return p.innerHTML=u,p.firstChild},_addItem:function(o){var l=document.createElement("label"),u=this._map.hasLayer(o.layer),p;o.overlay?(p=document.createElement("input"),p.type="checkbox",p.className="leaflet-control-layers-selector",p.defaultChecked=u):p=this._createRadioElement("leaflet-base-layers_"+a(this),u),this._layerControlInputs.push(p),p.layerId=a(o.layer),K(p,"click",this._onInputClick,this);var g=document.createElement("span");g.innerHTML=" "+o.name;var v=document.createElement("span");l.appendChild(v),v.appendChild(p),v.appendChild(g);var M=o.overlay?this._overlaysList:this._baseLayersList;return M.appendChild(l),this._checkDisabledLayers(),l},_onInputClick:function(){if(!this._preventClick){var o=this._layerControlInputs,l,u,p=[],g=[];this._handlingClick=!0;for(var v=o.length-1;v>=0;v--)l=o[v],u=this._getLayer(l.layerId).layer,l.checked?p.push(u):l.checked||g.push(u);for(v=0;v<g.length;v++)this._map.hasLayer(g[v])&&this._map.removeLayer(g[v]);for(v=0;v<p.length;v++)this._map.hasLayer(p[v])||this._map.addLayer(p[v]);this._handlingClick=!1,this._refocusOnMap()}},_checkDisabledLayers:function(){for(var o=this._layerControlInputs,l,u,p=this._map.getZoom(),g=o.length-1;g>=0;g--)l=o[g],u=this._getLayer(l.layerId).layer,l.disabled=u.options.minZoom!==void 0&&p<u.options.minZoom||u.options.maxZoom!==void 0&&p>u.options.maxZoom},_expandIfNotCollapsed:function(){return this._map&&!this.options.collapsed&&this.expand(),this},_expandSafely:function(){var o=this._section;this._preventClick=!0,K(o,"click",Et),this.expand();var l=this;setTimeout(function(){xt(o,"click",Et),l._preventClick=!1})}}),lf=function(o,l,u){return new Ll(o,l,u)},wr=oe.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(o){var l="leaflet-control-zoom",u=ft("div",l+" leaflet-bar"),p=this.options;return this._zoomInButton=this._createButton(p.zoomInText,p.zoomInTitle,l+"-in",u,this._zoomIn),this._zoomOutButton=this._createButton(p.zoomOutText,p.zoomOutTitle,l+"-out",u,this._zoomOut),this._updateDisabled(),o.on("zoomend zoomlevelschange",this._updateDisabled,this),u},onRemove:function(o){o.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(o){!this._disabled&&this._map._zoom<this._map.getMaxZoom()&&this._map.zoomIn(this._map.options.zoomDelta*(o.shiftKey?3:1))},_zoomOut:function(o){!this._disabled&&this._map._zoom>this._map.getMinZoom()&&this._map.zoomOut(this._map.options.zoomDelta*(o.shiftKey?3:1))},_createButton:function(o,l,u,p,g){var v=ft("a",u,p);return v.innerHTML=o,v.href="#",v.title=l,v.setAttribute("role","button"),v.setAttribute("aria-label",l),cn(v),K(v,"click",Ke),K(v,"click",g,this),K(v,"click",this._refocusOnMap,this),v},_updateDisabled:function(){var o=this._map,l="leaflet-disabled";Ct(this._zoomInButton,l),Ct(this._zoomOutButton,l),this._zoomInButton.setAttribute("aria-disabled","false"),this._zoomOutButton.setAttribute("aria-disabled","false"),(this._disabled||o._zoom===o.getMinZoom())&&(J(this._zoomOutButton,l),this._zoomOutButton.setAttribute("aria-disabled","true")),(this._disabled||o._zoom===o.getMaxZoom())&&(J(this._zoomInButton,l),this._zoomInButton.setAttribute("aria-disabled","true"))}});ht.mergeOptions({zoomControl:!0}),ht.addInitHook(function(){this.options.zoomControl&&(this.zoomControl=new wr,this.addControl(this.zoomControl))});var hf=function(o){return new wr(o)},Pl=oe.extend({options:{position:"bottomleft",maxWidth:100,metric:!0,imperial:!0},onAdd:function(o){var l="leaflet-control-scale",u=ft("div",l),p=this.options;return this._addScales(p,l+"-line",u),o.on(p.updateWhenIdle?"moveend":"move",this._update,this),o.whenReady(this._update,this),u},onRemove:function(o){o.off(this.options.updateWhenIdle?"moveend":"move",this._update,this)},_addScales:function(o,l,u){o.metric&&(this._mScale=ft("div",l,u)),o.imperial&&(this._iScale=ft("div",l,u))},_update:function(){var o=this._map,l=o.getSize().y/2,u=o.distance(o.containerPointToLatLng([0,l]),o.containerPointToLatLng([this.options.maxWidth,l]));this._updateScales(u)},_updateScales:function(o){this.options.metric&&o&&this._updateMetric(o),this.options.imperial&&o&&this._updateImperial(o)},_updateMetric:function(o){var l=this._getRoundNum(o),u=l<1e3?l+" m":l/1e3+" km";this._updateScale(this._mScale,u,l/o)},_updateImperial:function(o){var l=o*3.2808399,u,p,g;l>5280?(u=l/5280,p=this._getRoundNum(u),this._updateScale(this._iScale,p+" mi",p/u)):(g=this._getRoundNum(l),this._updateScale(this._iScale,g+" ft",g/l))},_updateScale:function(o,l,u){o.style.width=Math.round(this.options.maxWidth*u)+"px",o.innerHTML=l},_getRoundNum:function(o){var l=Math.pow(10,(Math.floor(o)+"").length-1),u=o/l;return u=u>=10?10:u>=5?5:u>=3?3:u>=2?2:1,l*u}}),cf=function(o){return new Pl(o)},uf='<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>',Mr=oe.extend({options:{position:"bottomright",prefix:'<a href="https://leafletjs.com" title="A JavaScript library for interactive maps">'+(U.inlineSvg?uf+" ":"")+"Leaflet</a>"},initialize:function(o){y(this,o),this._attributions={}},onAdd:function(o){o.attributionControl=this,this._container=ft("div","leaflet-control-attribution"),cn(this._container);for(var l in o._layers)o._layers[l].getAttribution&&this.addAttribution(o._layers[l].getAttribution());return this._update(),o.on("layeradd",this._addAttribution,this),this._container},onRemove:function(o){o.off("layeradd",this._addAttribution,this)},_addAttribution:function(o){o.layer.getAttribution&&(this.addAttribution(o.layer.getAttribution()),o.layer.once("remove",function(){this.removeAttribution(o.layer.getAttribution())},this))},setPrefix:function(o){return this.options.prefix=o,this._update(),this},addAttribution:function(o){return o?(this._attributions[o]||(this._attributions[o]=0),this._attributions[o]++,this._update(),this):this},removeAttribution:function(o){return o?(this._attributions[o]&&(this._attributions[o]--,this._update()),this):this},_update:function(){if(this._map){var o=[];for(var l in this._attributions)this._attributions[l]&&o.push(l);var u=[];this.options.prefix&&u.push(this.options.prefix),o.length&&u.push(o.join(", ")),this._container.innerHTML=u.join(' <span aria-hidden="true">|</span> ')}}});ht.mergeOptions({attributionControl:!0}),ht.addInitHook(function(){this.options.attributionControl&&new Mr().addTo(this)});var df=function(o){return new Mr(o)};oe.Layers=Ll,oe.Zoom=wr,oe.Scale=Pl,oe.Attribution=Mr,un.layers=lf,un.zoom=hf,un.scale=cf,un.attribution=df;var ue=Y.extend({initialize:function(o){this._map=o},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}});ue.addTo=function(o,l){return o.addHandler(l,this),this};var ff={Events:lt},kl=U.touch?"touchstart mousedown":"mousedown",Re=st.extend({options:{clickTolerance:3},initialize:function(o,l,u,p){y(this,p),this._element=o,this._dragStartTarget=l||o,this._preventOutline=u},enable:function(){this._enabled||(K(this._dragStartTarget,kl,this._onDown,this),this._enabled=!0)},disable:function(){this._enabled&&(Re._dragging===this&&this.finishDrag(!0),xt(this._dragStartTarget,kl,this._onDown,this),this._enabled=!1,this._moved=!1)},_onDown:function(o){if(this._enabled&&(this._moved=!1,!hr(this._element,"leaflet-zoom-anim"))){if(o.touches&&o.touches.length!==1){Re._dragging===this&&this.finishDrag();return}if(!(Re._dragging||o.shiftKey||o.which!==1&&o.button!==1&&!o.touches)&&(Re._dragging=this,this._preventOutline&&mr(this._element),dr(),an(),!this._moving)){this.fire("down");var l=o.touches?o.touches[0]:o,u=yl(this._element);this._startPoint=new W(l.clientX,l.clientY),this._startPos=Xe(this._element),this._parentScale=gr(u);var p=o.type==="mousedown";K(document,p?"mousemove":"touchmove",this._onMove,this),K(document,p?"mouseup":"touchend touchcancel",this._onUp,this)}}},_onMove:function(o){if(this._enabled){if(o.touches&&o.touches.length>1){this._moved=!0;return}var l=o.touches&&o.touches.length===1?o.touches[0]:o,u=new W(l.clientX,l.clientY)._subtract(this._startPoint);!u.x&&!u.y||Math.abs(u.x)+Math.abs(u.y)<this.options.clickTolerance||(u.x/=this._parentScale.x,u.y/=this._parentScale.y,Et(o),this._moved||(this.fire("dragstart"),this._moved=!0,J(document.body,"leaflet-dragging"),this._lastTarget=o.target||o.srcElement,window.SVGElementInstance&&this._lastTarget instanceof window.SVGElementInstance&&(this._lastTarget=this._lastTarget.correspondingUseElement),J(this._lastTarget,"leaflet-drag-target")),this._newPos=this._startPos.add(u),this._moving=!0,this._lastEvent=o,this._updatePosition())}},_updatePosition:function(){var o={originalEvent:this._lastEvent};this.fire("predrag",o),St(this._element,this._newPos),this.fire("drag",o)},_onUp:function(){this._enabled&&this.finishDrag()},finishDrag:function(o){Ct(document.body,"leaflet-dragging"),this._lastTarget&&(Ct(this._lastTarget,"leaflet-drag-target"),this._lastTarget=null),xt(document,"mousemove touchmove",this._onMove,this),xt(document,"mouseup touchend touchcancel",this._onUp,this),fr(),ln();var l=this._moved&&this._moving;this._moving=!1,Re._dragging=!1,l&&this.fire("dragend",{noInertia:o,distance:this._newPos.distanceTo(this._startPos)})}});function Tl(o,l,u){var p,g=[1,4,2,8],v,M,T,S,A,H,G,et;for(v=0,H=o.length;v<H;v++)o[v]._code=Qe(o[v],l);for(T=0;T<4;T++){for(G=g[T],p=[],v=0,H=o.length,M=H-1;v<H;M=v++)S=o[v],A=o[M],S._code&G?A._code&G||(et=es(A,S,G,l,u),et._code=Qe(et,l),p.push(et)):(A._code&G&&(et=es(A,S,G,l,u),et._code=Qe(et,l),p.push(et)),p.push(S));o=p}return o}function Cl(o,l){var u,p,g,v,M,T,S,A,H;if(!o||o.length===0)throw new Error("latlngs not passed");Qt(o)||(console.warn("latlngs are not flat! Only the first ring will be used"),o=o[0]);var G=X([0,0]),et=pt(o),Zt=et.getNorthWest().distanceTo(et.getSouthWest())*et.getNorthEast().distanceTo(et.getNorthWest());Zt<1700&&(G=Lr(o));var At=o.length,Jt=[];for(u=0;u<At;u++){var Vt=X(o[u]);Jt.push(l.project(X([Vt.lat-G.lat,Vt.lng-G.lng])))}for(T=S=A=0,u=0,p=At-1;u<At;p=u++)g=Jt[u],v=Jt[p],M=g.y*v.x-v.y*g.x,S+=(g.x+v.x)*M,A+=(g.y+v.y)*M,T+=M*3;T===0?H=Jt[0]:H=[S/T,A/T];var wi=l.unproject(E(H));return X([wi.lat+G.lat,wi.lng+G.lng])}function Lr(o){for(var l=0,u=0,p=0,g=0;g<o.length;g++){var v=X(o[g]);l+=v.lat,u+=v.lng,p++}return X([l/p,u/p])}var pf={__proto__:null,clipPolygon:Tl,polygonCenter:Cl,centroid:Lr};function Sl(o,l){if(!l||!o.length)return o.slice();var u=l*l;return o=_f(o,u),o=gf(o,u),o}function Ol(o,l,u){return Math.sqrt(dn(o,l,u,!0))}function mf(o,l,u){return dn(o,l,u)}function gf(o,l){var u=o.length,p=typeof Uint8Array!="undefined"?Uint8Array:Array,g=new p(u);g[0]=g[u-1]=1,Pr(o,g,l,0,u-1);var v,M=[];for(v=0;v<u;v++)g[v]&&M.push(o[v]);return M}function Pr(o,l,u,p,g){var v=0,M,T,S;for(T=p+1;T<=g-1;T++)S=dn(o[T],o[p],o[g],!0),S>v&&(M=T,v=S);v>u&&(l[M]=1,Pr(o,l,u,p,M),Pr(o,l,u,M,g))}function _f(o,l){for(var u=[o[0]],p=1,g=0,v=o.length;p<v;p++)yf(o[p],o[g])>l&&(u.push(o[p]),g=p);return g<v-1&&u.push(o[v-1]),u}var Dl;function Il(o,l,u,p,g){var v=p?Dl:Qe(o,u),M=Qe(l,u),T,S,A;for(Dl=M;;){if(!(v|M))return[o,l];if(v&M)return!1;T=v||M,S=es(o,l,T,u,g),A=Qe(S,u),T===v?(o=S,v=A):(l=S,M=A)}}function es(o,l,u,p,g){var v=l.x-o.x,M=l.y-o.y,T=p.min,S=p.max,A,H;return u&8?(A=o.x+v*(S.y-o.y)/M,H=S.y):u&4?(A=o.x+v*(T.y-o.y)/M,H=T.y):u&2?(A=S.x,H=o.y+M*(S.x-o.x)/v):u&1&&(A=T.x,H=o.y+M*(T.x-o.x)/v),new W(A,H,g)}function Qe(o,l){var u=0;return o.x<l.min.x?u|=1:o.x>l.max.x&&(u|=2),o.y<l.min.y?u|=4:o.y>l.max.y&&(u|=8),u}function yf(o,l){var u=l.x-o.x,p=l.y-o.y;return u*u+p*p}function dn(o,l,u,p){var g=l.x,v=l.y,M=u.x-g,T=u.y-v,S=M*M+T*T,A;return S>0&&(A=((o.x-g)*M+(o.y-v)*T)/S,A>1?(g=u.x,v=u.y):A>0&&(g+=M*A,v+=T*A)),M=o.x-g,T=o.y-v,p?M*M+T*T:new W(g,v)}function Qt(o){return!P(o[0])||typeof o[0][0]!="object"&&typeof o[0][0]!="undefined"}function Al(o){return console.warn("Deprecated use of _flat, please use L.LineUtil.isFlat instead."),Qt(o)}function El(o,l){var u,p,g,v,M,T,S,A;if(!o||o.length===0)throw new Error("latlngs not passed");Qt(o)||(console.warn("latlngs are not flat! Only the first ring will be used"),o=o[0]);var H=X([0,0]),G=pt(o),et=G.getNorthWest().distanceTo(G.getSouthWest())*G.getNorthEast().distanceTo(G.getNorthWest());et<1700&&(H=Lr(o));var Zt=o.length,At=[];for(u=0;u<Zt;u++){var Jt=X(o[u]);At.push(l.project(X([Jt.lat-H.lat,Jt.lng-H.lng])))}for(u=0,p=0;u<Zt-1;u++)p+=At[u].distanceTo(At[u+1])/2;if(p===0)A=At[0];else for(u=0,v=0;u<Zt-1;u++)if(M=At[u],T=At[u+1],g=M.distanceTo(T),v+=g,v>p){S=(v-p)/g,A=[T.x-S*(T.x-M.x),T.y-S*(T.y-M.y)];break}var Vt=l.unproject(E(A));return X([Vt.lat+H.lat,Vt.lng+H.lng])}var vf={__proto__:null,simplify:Sl,pointToSegmentDistance:Ol,closestPointOnSegment:mf,clipSegment:Il,_getEdgeIntersection:es,_getBitCode:Qe,_sqClosestPointOnSegment:dn,isFlat:Qt,_flat:Al,polylineCenter:El},kr={project:function(o){return new W(o.lng,o.lat)},unproject:function(o){return new ot(o.y,o.x)},bounds:new V([-180,-90],[180,90])},Tr={R:6378137,R_MINOR:6356752314245179e-9,bounds:new V([-2003750834279e-5,-1549657073972e-5],[2003750834279e-5,1876465623138e-5]),project:function(o){var l=Math.PI/180,u=this.R,p=o.lat*l,g=this.R_MINOR/u,v=Math.sqrt(1-g*g),M=v*Math.sin(p),T=Math.tan(Math.PI/4-p/2)/Math.pow((1-M)/(1+M),v/2);return p=-u*Math.log(Math.max(T,1e-10)),new W(o.lng*l*u,p)},unproject:function(o){for(var l=180/Math.PI,u=this.R,p=this.R_MINOR/u,g=Math.sqrt(1-p*p),v=Math.exp(-o.y/u),M=Math.PI/2-2*Math.atan(v),T=0,S=.1,A;T<15&&Math.abs(S)>1e-7;T++)A=g*Math.sin(M),A=Math.pow((1-A)/(1+A),g/2),S=Math.PI/2-2*Math.atan(v*A)-M,M+=S;return new ot(M*l,o.x*l/u)}},xf={__proto__:null,LonLat:kr,Mercator:Tr,SphericalMercator:Jo},bf=e({},Nt,{code:"EPSG:3395",projection:Tr,transformation:function(){var o=.5/(Math.PI*Tr.R);return nn(o,.5,-o,.5)}()}),zl=e({},Nt,{code:"EPSG:4326",projection:kr,transformation:nn(1/180,1,-1/180,.5)}),wf=e({},Ht,{projection:kr,transformation:nn(1,0,-1,0),scale:function(o){return Math.pow(2,o)},zoom:function(o){return Math.log(o)/Math.LN2},distance:function(o,l){var u=l.lng-o.lng,p=l.lat-o.lat;return Math.sqrt(u*u+p*p)},infinite:!0});Ht.Earth=Nt,Ht.EPSG3395=bf,Ht.EPSG3857=er,Ht.EPSG900913=Td,Ht.EPSG4326=zl,Ht.Simple=wf;var re=st.extend({options:{pane:"overlayPane",attribution:null,bubblingMouseEvents:!0},addTo:function(o){return o.addLayer(this),this},remove:function(){return this.removeFrom(this._map||this._mapToAdd)},removeFrom:function(o){return o&&o.removeLayer(this),this},getPane:function(o){return this._map.getPane(o?this.options[o]||o:this.options.pane)},addInteractiveTarget:function(o){return this._map._targets[a(o)]=this,this},removeInteractiveTarget:function(o){return delete this._map._targets[a(o)],this},getAttribution:function(){return this.options.attribution},_layerAdd:function(o){var l=o.target;if(l.hasLayer(this)){if(this._map=l,this._zoomAnimated=l._zoomAnimated,this.getEvents){var u=this.getEvents();l.on(u,this),this.once("remove",function(){l.off(u,this)},this)}this.onAdd(l),this.fire("add"),l.fire("layeradd",{layer:this})}}});ht.include({addLayer:function(o){if(!o._layerAdd)throw new Error("The provided object is not a Layer.");var l=a(o);return this._layers[l]?this:(this._layers[l]=o,o._mapToAdd=this,o.beforeAdd&&o.beforeAdd(this),this.whenReady(o._layerAdd,o),this)},removeLayer:function(o){var l=a(o);return this._layers[l]?(this._loaded&&o.onRemove(this),delete this._layers[l],this._loaded&&(this.fire("layerremove",{layer:o}),o.fire("remove")),o._map=o._mapToAdd=null,this):this},hasLayer:function(o){return a(o)in this._layers},eachLayer:function(o,l){for(var u in this._layers)o.call(l,this._layers[u]);return this},_addLayers:function(o){o=o?P(o)?o:[o]:[];for(var l=0,u=o.length;l<u;l++)this.addLayer(o[l])},_addZoomLimit:function(o){(!isNaN(o.options.maxZoom)||!isNaN(o.options.minZoom))&&(this._zoomBoundLayers[a(o)]=o,this._updateZoomLevels())},_removeZoomLimit:function(o){var l=a(o);this._zoomBoundLayers[l]&&(delete this._zoomBoundLayers[l],this._updateZoomLevels())},_updateZoomLevels:function(){var o=1/0,l=-1/0,u=this._getZoomSpan();for(var p in this._zoomBoundLayers){var g=this._zoomBoundLayers[p].options;o=g.minZoom===void 0?o:Math.min(o,g.minZoom),l=g.maxZoom===void 0?l:Math.max(l,g.maxZoom)}this._layersMaxZoom=l===-1/0?void 0:l,this._layersMinZoom=o===1/0?void 0:o,u!==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 _i=re.extend({initialize:function(o,l){y(this,l),this._layers={};var u,p;if(o)for(u=0,p=o.length;u<p;u++)this.addLayer(o[u])},addLayer:function(o){var l=this.getLayerId(o);return this._layers[l]=o,this._map&&this._map.addLayer(o),this},removeLayer:function(o){var l=o in this._layers?o:this.getLayerId(o);return this._map&&this._layers[l]&&this._map.removeLayer(this._layers[l]),delete this._layers[l],this},hasLayer:function(o){var l=typeof o=="number"?o:this.getLayerId(o);return l in this._layers},clearLayers:function(){return this.eachLayer(this.removeLayer,this)},invoke:function(o){var l=Array.prototype.slice.call(arguments,1),u,p;for(u in this._layers)p=this._layers[u],p[o]&&p[o].apply(p,l);return this},onAdd:function(o){this.eachLayer(o.addLayer,o)},onRemove:function(o){this.eachLayer(o.removeLayer,o)},eachLayer:function(o,l){for(var u in this._layers)o.call(l,this._layers[u]);return this},getLayer:function(o){return this._layers[o]},getLayers:function(){var o=[];return this.eachLayer(o.push,o),o},setZIndex:function(o){return this.invoke("setZIndex",o)},getLayerId:function(o){return a(o)}}),Mf=function(o,l){return new _i(o,l)},be=_i.extend({addLayer:function(o){return this.hasLayer(o)?this:(o.addEventParent(this),_i.prototype.addLayer.call(this,o),this.fire("layeradd",{layer:o}))},removeLayer:function(o){return this.hasLayer(o)?(o in this._layers&&(o=this._layers[o]),o.removeEventParent(this),_i.prototype.removeLayer.call(this,o),this.fire("layerremove",{layer:o})):this},setStyle:function(o){return this.invoke("setStyle",o)},bringToFront:function(){return this.invoke("bringToFront")},bringToBack:function(){return this.invoke("bringToBack")},getBounds:function(){var o=new kt;for(var l in this._layers){var u=this._layers[l];o.extend(u.getBounds?u.getBounds():u.getLatLng())}return o}}),Lf=function(o,l){return new be(o,l)},yi=Y.extend({options:{popupAnchor:[0,0],tooltipAnchor:[0,0],crossOrigin:!1},initialize:function(o){y(this,o)},createIcon:function(o){return this._createIcon("icon",o)},createShadow:function(o){return this._createIcon("shadow",o)},_createIcon:function(o,l){var u=this._getIconUrl(o);if(!u){if(o==="icon")throw new Error("iconUrl not set in Icon options (see the docs).");return null}var p=this._createImg(u,l&&l.tagName==="IMG"?l:null);return this._setIconStyles(p,o),(this.options.crossOrigin||this.options.crossOrigin==="")&&(p.crossOrigin=this.options.crossOrigin===!0?"":this.options.crossOrigin),p},_setIconStyles:function(o,l){var u=this.options,p=u[l+"Size"];typeof p=="number"&&(p=[p,p]);var g=E(p),v=E(l==="shadow"&&u.shadowAnchor||u.iconAnchor||g&&g.divideBy(2,!0));o.className="leaflet-marker-"+l+" "+(u.className||""),v&&(o.style.marginLeft=-v.x+"px",o.style.marginTop=-v.y+"px"),g&&(o.style.width=g.x+"px",o.style.height=g.y+"px")},_createImg:function(o,l){return l=l||document.createElement("img"),l.src=o,l},_getIconUrl:function(o){return U.retina&&this.options[o+"RetinaUrl"]||this.options[o+"Url"]}});function Pf(o){return new yi(o)}var fn=yi.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(o){return typeof fn.imagePath!="string"&&(fn.imagePath=this._detectIconPath()),(this.options.imagePath||fn.imagePath)+yi.prototype._getIconUrl.call(this,o)},_stripUrl:function(o){var l=function(u,p,g){var v=p.exec(u);return v&&v[g]};return o=l(o,/^url\((['"])?(.+)\1\)$/,2),o&&l(o,/^(.*)marker-icon\.png$/,1)},_detectIconPath:function(){var o=ft("div","leaflet-default-icon-path",document.body),l=rn(o,"background-image")||rn(o,"backgroundImage");if(document.body.removeChild(o),l=this._stripUrl(l),l)return l;var u=document.querySelector('link[href$="leaflet.css"]');return u?u.href.substring(0,u.href.length-11-1):""}}),Rl=ue.extend({initialize:function(o){this._marker=o},addHooks:function(){var o=this._marker._icon;this._draggable||(this._draggable=new Re(o,o,!0)),this._draggable.on({dragstart:this._onDragStart,predrag:this._onPreDrag,drag:this._onDrag,dragend:this._onDragEnd},this).enable(),J(o,"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&&Ct(this._marker._icon,"leaflet-marker-draggable")},moved:function(){return this._draggable&&this._draggable._moved},_adjustPan:function(o){var l=this._marker,u=l._map,p=this._marker.options.autoPanSpeed,g=this._marker.options.autoPanPadding,v=Xe(l._icon),M=u.getPixelBounds(),T=u.getPixelOrigin(),S=dt(M.min._subtract(T).add(g),M.max._subtract(T).subtract(g));if(!S.contains(v)){var A=E((Math.max(S.max.x,v.x)-S.max.x)/(M.max.x-S.max.x)-(Math.min(S.min.x,v.x)-S.min.x)/(M.min.x-S.min.x),(Math.max(S.max.y,v.y)-S.max.y)/(M.max.y-S.max.y)-(Math.min(S.min.y,v.y)-S.min.y)/(M.min.y-S.min.y)).multiplyBy(p);u.panBy(A,{animate:!1}),this._draggable._newPos._add(A),this._draggable._startPos._add(A),St(l._icon,this._draggable._newPos),this._onDrag(o),this._panRequest=N(this._adjustPan.bind(this,o))}},_onDragStart:function(){this._oldLatLng=this._marker.getLatLng(),this._marker.closePopup&&this._marker.closePopup(),this._marker.fire("movestart").fire("dragstart")},_onPreDrag:function(o){this._marker.options.autoPan&&(j(this._panRequest),this._panRequest=N(this._adjustPan.bind(this,o)))},_onDrag:function(o){var l=this._marker,u=l._shadow,p=Xe(l._icon),g=l._map.layerPointToLatLng(p);u&&St(u,p),l._latlng=g,o.latlng=g,o.oldLatLng=this._oldLatLng,l.fire("move",o).fire("drag",o)},_onDragEnd:function(o){j(this._panRequest),delete this._oldLatLng,this._marker.fire("moveend").fire("dragend",o)}}),is=re.extend({options:{icon:new fn,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(o,l){y(this,l),this._latlng=X(o)},onAdd:function(o){this._zoomAnimated=this._zoomAnimated&&o.options.markerZoomAnimation,this._zoomAnimated&&o.on("zoomanim",this._animateZoom,this),this._initIcon(),this.update()},onRemove:function(o){this.dragging&&this.dragging.enabled()&&(this.options.draggable=!0,this.dragging.removeHooks()),delete this.dragging,this._zoomAnimated&&o.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(o){var l=this._latlng;return this._latlng=X(o),this.update(),this.fire("move",{oldLatLng:l,latlng:this._latlng})},setZIndexOffset:function(o){return this.options.zIndexOffset=o,this.update()},getIcon:function(){return this.options.icon},setIcon:function(o){return this.options.icon=o,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 o=this._map.latLngToLayerPoint(this._latlng).round();this._setPos(o)}return this},_initIcon:function(){var o=this.options,l="leaflet-zoom-"+(this._zoomAnimated?"animated":"hide"),u=o.icon.createIcon(this._icon),p=!1;u!==this._icon&&(this._icon&&this._removeIcon(),p=!0,o.title&&(u.title=o.title),u.tagName==="IMG"&&(u.alt=o.alt||"")),J(u,l),o.keyboard&&(u.tabIndex="0",u.setAttribute("role","button")),this._icon=u,o.riseOnHover&&this.on({mouseover:this._bringToFront,mouseout:this._resetZIndex}),this.options.autoPanOnFocus&&K(u,"focus",this._panOnFocus,this);var g=o.icon.createShadow(this._shadow),v=!1;g!==this._shadow&&(this._removeShadow(),v=!0),g&&(J(g,l),g.alt=""),this._shadow=g,o.opacity<1&&this._updateOpacity(),p&&this.getPane().appendChild(this._icon),this._initInteraction(),g&&v&&this.getPane(o.shadowPane).appendChild(this._shadow)},_removeIcon:function(){this.options.riseOnHover&&this.off({mouseover:this._bringToFront,mouseout:this._resetZIndex}),this.options.autoPanOnFocus&&xt(this._icon,"focus",this._panOnFocus,this),Lt(this._icon),this.removeInteractiveTarget(this._icon),this._icon=null},_removeShadow:function(){this._shadow&&Lt(this._shadow),this._shadow=null},_setPos:function(o){this._icon&&St(this._icon,o),this._shadow&&St(this._shadow,o),this._zIndex=o.y+this.options.zIndexOffset,this._resetZIndex()},_updateZIndex:function(o){this._icon&&(this._icon.style.zIndex=this._zIndex+o)},_animateZoom:function(o){var l=this._map._latLngToNewLayerPoint(this._latlng,o.zoom,o.center).round();this._setPos(l)},_initInteraction:function(){if(this.options.interactive&&(J(this._icon,"leaflet-interactive"),this.addInteractiveTarget(this._icon),Rl)){var o=this.options.draggable;this.dragging&&(o=this.dragging.enabled(),this.dragging.disable()),this.dragging=new Rl(this),o&&this.dragging.enable()}},setOpacity:function(o){return this.options.opacity=o,this._map&&this._updateOpacity(),this},_updateOpacity:function(){var o=this.options.opacity;this._icon&&Kt(this._icon,o),this._shadow&&Kt(this._shadow,o)},_bringToFront:function(){this._updateZIndex(this.options.riseOffset)},_resetZIndex:function(){this._updateZIndex(0)},_panOnFocus:function(){var o=this._map;if(o){var l=this.options.icon.options,u=l.iconSize?E(l.iconSize):E(0,0),p=l.iconAnchor?E(l.iconAnchor):E(0,0);o.panInside(this._latlng,{paddingTopLeft:p,paddingBottomRight:u.subtract(p)})}},_getPopupAnchor:function(){return this.options.icon.options.popupAnchor},_getTooltipAnchor:function(){return this.options.icon.options.tooltipAnchor}});function kf(o,l){return new is(o,l)}var Be=re.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(o){this._renderer=o.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(o){return y(this,o),this._renderer&&(this._renderer._updateStyle(this),this.options.stroke&&o&&Object.prototype.hasOwnProperty.call(o,"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)}}),ns=Be.extend({options:{fill:!0,radius:10},initialize:function(o,l){y(this,l),this._latlng=X(o),this._radius=this.options.radius},setLatLng:function(o){var l=this._latlng;return this._latlng=X(o),this.redraw(),this.fire("move",{oldLatLng:l,latlng:this._latlng})},getLatLng:function(){return this._latlng},setRadius:function(o){return this.options.radius=this._radius=o,this.redraw()},getRadius:function(){return this._radius},setStyle:function(o){var l=o&&o.radius||this._radius;return Be.prototype.setStyle.call(this,o),this.setRadius(l),this},_project:function(){this._point=this._map.latLngToLayerPoint(this._latlng),this._updateBounds()},_updateBounds:function(){var o=this._radius,l=this._radiusY||o,u=this._clickTolerance(),p=[o+u,l+u];this._pxBounds=new V(this._point.subtract(p),this._point.add(p))},_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(o){return o.distanceTo(this._point)<=this._radius+this._clickTolerance()}});function Tf(o,l){return new ns(o,l)}var Cr=ns.extend({initialize:function(o,l,u){if(typeof l=="number"&&(l=e({},u,{radius:l})),y(this,l),this._latlng=X(o),isNaN(this.options.radius))throw new Error("Circle radius cannot be NaN");this._mRadius=this.options.radius},setRadius:function(o){return this._mRadius=o,this.redraw()},getRadius:function(){return this._mRadius},getBounds:function(){var o=[this._radius,this._radiusY||this._radius];return new kt(this._map.layerPointToLatLng(this._point.subtract(o)),this._map.layerPointToLatLng(this._point.add(o)))},setStyle:Be.prototype.setStyle,_project:function(){var o=this._latlng.lng,l=this._latlng.lat,u=this._map,p=u.options.crs;if(p.distance===Nt.distance){var g=Math.PI/180,v=this._mRadius/Nt.R/g,M=u.project([l+v,o]),T=u.project([l-v,o]),S=M.add(T).divideBy(2),A=u.unproject(S).lat,H=Math.acos((Math.cos(v*g)-Math.sin(l*g)*Math.sin(A*g))/(Math.cos(l*g)*Math.cos(A*g)))/g;(isNaN(H)||H===0)&&(H=v/Math.cos(Math.PI/180*l)),this._point=S.subtract(u.getPixelOrigin()),this._radius=isNaN(H)?0:S.x-u.project([A,o-H]).x,this._radiusY=S.y-M.y}else{var G=p.unproject(p.project(this._latlng).subtract([this._mRadius,0]));this._point=u.latLngToLayerPoint(this._latlng),this._radius=this._point.x-u.latLngToLayerPoint(G).x}this._updateBounds()}});function Cf(o,l,u){return new Cr(o,l,u)}var we=Be.extend({options:{smoothFactor:1,noClip:!1},initialize:function(o,l){y(this,l),this._setLatLngs(o)},getLatLngs:function(){return this._latlngs},setLatLngs:function(o){return this._setLatLngs(o),this.redraw()},isEmpty:function(){return!this._latlngs.length},closestLayerPoint:function(o){for(var l=1/0,u=null,p=dn,g,v,M=0,T=this._parts.length;M<T;M++)for(var S=this._parts[M],A=1,H=S.length;A<H;A++){g=S[A-1],v=S[A];var G=p(o,g,v,!0);G<l&&(l=G,u=p(o,g,v))}return u&&(u.distance=Math.sqrt(l)),u},getCenter:function(){if(!this._map)throw new Error("Must add layer to map before using getCenter()");return El(this._defaultShape(),this._map.options.crs)},getBounds:function(){return this._bounds},addLatLng:function(o,l){return l=l||this._defaultShape(),o=X(o),l.push(o),this._bounds.extend(o),this.redraw()},_setLatLngs:function(o){this._bounds=new kt,this._latlngs=this._convertLatLngs(o)},_defaultShape:function(){return Qt(this._latlngs)?this._latlngs:this._latlngs[0]},_convertLatLngs:function(o){for(var l=[],u=Qt(o),p=0,g=o.length;p<g;p++)u?(l[p]=X(o[p]),this._bounds.extend(l[p])):l[p]=this._convertLatLngs(o[p]);return l},_project:function(){var o=new V;this._rings=[],this._projectLatlngs(this._latlngs,this._rings,o),this._bounds.isValid()&&o.isValid()&&(this._rawPxBounds=o,this._updateBounds())},_updateBounds:function(){var o=this._clickTolerance(),l=new W(o,o);this._rawPxBounds&&(this._pxBounds=new V([this._rawPxBounds.min.subtract(l),this._rawPxBounds.max.add(l)]))},_projectLatlngs:function(o,l,u){var p=o[0]instanceof ot,g=o.length,v,M;if(p){for(M=[],v=0;v<g;v++)M[v]=this._map.latLngToLayerPoint(o[v]),u.extend(M[v]);l.push(M)}else for(v=0;v<g;v++)this._projectLatlngs(o[v],l,u)},_clipPoints:function(){var o=this._renderer._bounds;if(this._parts=[],!(!this._pxBounds||!this._pxBounds.intersects(o))){if(this.options.noClip){this._parts=this._rings;return}var l=this._parts,u,p,g,v,M,T,S;for(u=0,g=0,v=this._rings.length;u<v;u++)for(S=this._rings[u],p=0,M=S.length;p<M-1;p++)T=Il(S[p],S[p+1],o,p,!0),T&&(l[g]=l[g]||[],l[g].push(T[0]),(T[1]!==S[p+1]||p===M-2)&&(l[g].push(T[1]),g++))}},_simplifyPoints:function(){for(var o=this._parts,l=this.options.smoothFactor,u=0,p=o.length;u<p;u++)o[u]=Sl(o[u],l)},_update:function(){this._map&&(this._clipPoints(),this._simplifyPoints(),this._updatePath())},_updatePath:function(){this._renderer._updatePoly(this)},_containsPoint:function(o,l){var u,p,g,v,M,T,S=this._clickTolerance();if(!this._pxBounds||!this._pxBounds.contains(o))return!1;for(u=0,v=this._parts.length;u<v;u++)for(T=this._parts[u],p=0,M=T.length,g=M-1;p<M;g=p++)if(!(!l&&p===0)&&Ol(o,T[g],T[p])<=S)return!0;return!1}});function Sf(o,l){return new we(o,l)}we._flat=Al;var vi=we.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 Cl(this._defaultShape(),this._map.options.crs)},_convertLatLngs:function(o){var l=we.prototype._convertLatLngs.call(this,o),u=l.length;return u>=2&&l[0]instanceof ot&&l[0].equals(l[u-1])&&l.pop(),l},_setLatLngs:function(o){we.prototype._setLatLngs.call(this,o),Qt(this._latlngs)&&(this._latlngs=[this._latlngs])},_defaultShape:function(){return Qt(this._latlngs[0])?this._latlngs[0]:this._latlngs[0][0]},_clipPoints:function(){var o=this._renderer._bounds,l=this.options.weight,u=new W(l,l);if(o=new V(o.min.subtract(u),o.max.add(u)),this._parts=[],!(!this._pxBounds||!this._pxBounds.intersects(o))){if(this.options.noClip){this._parts=this._rings;return}for(var p=0,g=this._rings.length,v;p<g;p++)v=Tl(this._rings[p],o,!0),v.length&&this._parts.push(v)}},_updatePath:function(){this._renderer._updatePoly(this,!0)},_containsPoint:function(o){var l=!1,u,p,g,v,M,T,S,A;if(!this._pxBounds||!this._pxBounds.contains(o))return!1;for(v=0,S=this._parts.length;v<S;v++)for(u=this._parts[v],M=0,A=u.length,T=A-1;M<A;T=M++)p=u[M],g=u[T],p.y>o.y!=g.y>o.y&&o.x<(g.x-p.x)*(o.y-p.y)/(g.y-p.y)+p.x&&(l=!l);return l||we.prototype._containsPoint.call(this,o,!0)}});function Of(o,l){return new vi(o,l)}var Me=be.extend({initialize:function(o,l){y(this,l),this._layers={},o&&this.addData(o)},addData:function(o){var l=P(o)?o:o.features,u,p,g;if(l){for(u=0,p=l.length;u<p;u++)g=l[u],(g.geometries||g.geometry||g.features||g.coordinates)&&this.addData(g);return this}var v=this.options;if(v.filter&&!v.filter(o))return this;var M=ss(o,v);return M?(M.feature=as(o),M.defaultOptions=M.options,this.resetStyle(M),v.onEachFeature&&v.onEachFeature(o,M),this.addLayer(M)):this},resetStyle:function(o){return o===void 0?this.eachLayer(this.resetStyle,this):(o.options=e({},o.defaultOptions),this._setLayerStyle(o,this.options.style),this)},setStyle:function(o){return this.eachLayer(function(l){this._setLayerStyle(l,o)},this)},_setLayerStyle:function(o,l){o.setStyle&&(typeof l=="function"&&(l=l(o.feature)),o.setStyle(l))}});function ss(o,l){var u=o.type==="Feature"?o.geometry:o,p=u?u.coordinates:null,g=[],v=l&&l.pointToLayer,M=l&&l.coordsToLatLng||Sr,T,S,A,H;if(!p&&!u)return null;switch(u.type){case"Point":return T=M(p),Bl(v,o,T,l);case"MultiPoint":for(A=0,H=p.length;A<H;A++)T=M(p[A]),g.push(Bl(v,o,T,l));return new be(g);case"LineString":case"MultiLineString":return S=os(p,u.type==="LineString"?0:1,M),new we(S,l);case"Polygon":case"MultiPolygon":return S=os(p,u.type==="Polygon"?1:2,M),new vi(S,l);case"GeometryCollection":for(A=0,H=u.geometries.length;A<H;A++){var G=ss({geometry:u.geometries[A],type:"Feature",properties:o.properties},l);G&&g.push(G)}return new be(g);case"FeatureCollection":for(A=0,H=u.features.length;A<H;A++){var et=ss(u.features[A],l);et&&g.push(et)}return new be(g);default:throw new Error("Invalid GeoJSON object.")}}function Bl(o,l,u,p){return o?o(l,u):new is(u,p&&p.markersInheritOptions&&p)}function Sr(o){return new ot(o[1],o[0],o[2])}function os(o,l,u){for(var p=[],g=0,v=o.length,M;g<v;g++)M=l?os(o[g],l-1,u):(u||Sr)(o[g]),p.push(M);return p}function Or(o,l){return o=X(o),o.alt!==void 0?[f(o.lng,l),f(o.lat,l),f(o.alt,l)]:[f(o.lng,l),f(o.lat,l)]}function rs(o,l,u,p){for(var g=[],v=0,M=o.length;v<M;v++)g.push(l?rs(o[v],Qt(o[v])?0:l-1,u,p):Or(o[v],p));return!l&&u&&g.length>0&&g.push(g[0].slice()),g}function xi(o,l){return o.feature?e({},o.feature,{geometry:l}):as(l)}function as(o){return o.type==="Feature"||o.type==="FeatureCollection"?o:{type:"Feature",properties:{},geometry:o}}var Dr={toGeoJSON:function(o){return xi(this,{type:"Point",coordinates:Or(this.getLatLng(),o)})}};is.include(Dr),Cr.include(Dr),ns.include(Dr),we.include({toGeoJSON:function(o){var l=!Qt(this._latlngs),u=rs(this._latlngs,l?1:0,!1,o);return xi(this,{type:(l?"Multi":"")+"LineString",coordinates:u})}}),vi.include({toGeoJSON:function(o){var l=!Qt(this._latlngs),u=l&&!Qt(this._latlngs[0]),p=rs(this._latlngs,u?2:l?1:0,!0,o);return l||(p=[p]),xi(this,{type:(u?"Multi":"")+"Polygon",coordinates:p})}}),_i.include({toMultiPoint:function(o){var l=[];return this.eachLayer(function(u){l.push(u.toGeoJSON(o).geometry.coordinates)}),xi(this,{type:"MultiPoint",coordinates:l})},toGeoJSON:function(o){var l=this.feature&&this.feature.geometry&&this.feature.geometry.type;if(l==="MultiPoint")return this.toMultiPoint(o);var u=l==="GeometryCollection",p=[];return this.eachLayer(function(g){if(g.toGeoJSON){var v=g.toGeoJSON(o);if(u)p.push(v.geometry);else{var M=as(v);M.type==="FeatureCollection"?p.push.apply(p,M.features):p.push(M)}}}),u?xi(this,{geometries:p,type:"GeometryCollection"}):{type:"FeatureCollection",features:p}}});function Fl(o,l){return new Me(o,l)}var Df=Fl,ls=re.extend({options:{opacity:1,alt:"",interactive:!1,crossOrigin:!1,errorOverlayUrl:"",zIndex:1,className:""},initialize:function(o,l,u){this._url=o,this._bounds=pt(l),y(this,u)},onAdd:function(){this._image||(this._initImage(),this.options.opacity<1&&this._updateOpacity()),this.options.interactive&&(J(this._image,"leaflet-interactive"),this.addInteractiveTarget(this._image)),this.getPane().appendChild(this._image),this._reset()},onRemove:function(){Lt(this._image),this.options.interactive&&this.removeInteractiveTarget(this._image)},setOpacity:function(o){return this.options.opacity=o,this._image&&this._updateOpacity(),this},setStyle:function(o){return o.opacity&&this.setOpacity(o.opacity),this},bringToFront:function(){return this._map&&mi(this._image),this},bringToBack:function(){return this._map&&gi(this._image),this},setUrl:function(o){return this._url=o,this._image&&(this._image.src=o),this},setBounds:function(o){return this._bounds=pt(o),this._map&&this._reset(),this},getEvents:function(){var o={zoom:this._reset,viewreset:this._reset};return this._zoomAnimated&&(o.zoomanim=this._animateZoom),o},setZIndex:function(o){return this.options.zIndex=o,this._updateZIndex(),this},getBounds:function(){return this._bounds},getElement:function(){return this._image},_initImage:function(){var o=this._url.tagName==="IMG",l=this._image=o?this._url:ft("img");if(J(l,"leaflet-image-layer"),this._zoomAnimated&&J(l,"leaflet-zoom-animated"),this.options.className&&J(l,this.options.className),l.onselectstart=d,l.onmousemove=d,l.onload=s(this.fire,this,"load"),l.onerror=s(this._overlayOnError,this,"error"),(this.options.crossOrigin||this.options.crossOrigin==="")&&(l.crossOrigin=this.options.crossOrigin===!0?"":this.options.crossOrigin),this.options.zIndex&&this._updateZIndex(),o){this._url=l.src;return}l.src=this._url,l.alt=this.options.alt},_animateZoom:function(o){var l=this._map.getZoomScale(o.zoom),u=this._map._latLngBoundsToNewLayerBounds(this._bounds,o.zoom,o.center).min;qe(this._image,u,l)},_reset:function(){var o=this._image,l=new V(this._map.latLngToLayerPoint(this._bounds.getNorthWest()),this._map.latLngToLayerPoint(this._bounds.getSouthEast())),u=l.getSize();St(o,l.min),o.style.width=u.x+"px",o.style.height=u.y+"px"},_updateOpacity:function(){Kt(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 o=this.options.errorOverlayUrl;o&&this._url!==o&&(this._url=o,this._image.src=o)},getCenter:function(){return this._bounds.getCenter()}}),If=function(o,l,u){return new ls(o,l,u)},Nl=ls.extend({options:{autoplay:!0,loop:!0,keepAspectRatio:!0,muted:!1,playsInline:!0},_initImage:function(){var o=this._url.tagName==="VIDEO",l=this._image=o?this._url:ft("video");if(J(l,"leaflet-image-layer"),this._zoomAnimated&&J(l,"leaflet-zoom-animated"),this.options.className&&J(l,this.options.className),l.onselectstart=d,l.onmousemove=d,l.onloadeddata=s(this.fire,this,"load"),o){for(var u=l.getElementsByTagName("source"),p=[],g=0;g<u.length;g++)p.push(u[g].src);this._url=u.length>0?p:[l.src];return}P(this._url)||(this._url=[this._url]),!this.options.keepAspectRatio&&Object.prototype.hasOwnProperty.call(l.style,"objectFit")&&(l.style.objectFit="fill"),l.autoplay=!!this.options.autoplay,l.loop=!!this.options.loop,l.muted=!!this.options.muted,l.playsInline=!!this.options.playsInline;for(var v=0;v<this._url.length;v++){var M=ft("source");M.src=this._url[v],l.appendChild(M)}}});function Af(o,l,u){return new Nl(o,l,u)}var Wl=ls.extend({_initImage:function(){var o=this._image=this._url;J(o,"leaflet-image-layer"),this._zoomAnimated&&J(o,"leaflet-zoom-animated"),this.options.className&&J(o,this.options.className),o.onselectstart=d,o.onmousemove=d}});function Ef(o,l,u){return new Wl(o,l,u)}var de=re.extend({options:{interactive:!1,offset:[0,0],className:"",pane:void 0,content:""},initialize:function(o,l){o&&(o instanceof ot||P(o))?(this._latlng=X(o),y(this,l)):(y(this,o),this._source=l),this.options.content&&(this._content=this.options.content)},openOn:function(o){return o=arguments.length?o:this._source._map,o.hasLayer(this)||o.addLayer(this),this},close:function(){return this._map&&this._map.removeLayer(this),this},toggle:function(o){return this._map?this.close():(arguments.length?this._source=o:o=this._source,this._prepareOpen(),this.openOn(o._map)),this},onAdd:function(o){this._zoomAnimated=o._zoomAnimated,this._container||this._initLayout(),o._fadeAnimated&&Kt(this._container,0),clearTimeout(this._removeTimeout),this.getPane().appendChild(this._container),this.update(),o._fadeAnimated&&Kt(this._container,1),this.bringToFront(),this.options.interactive&&(J(this._container,"leaflet-interactive"),this.addInteractiveTarget(this._container))},onRemove:function(o){o._fadeAnimated?(Kt(this._container,0),this._removeTimeout=setTimeout(s(Lt,void 0,this._container),200)):Lt(this._container),this.options.interactive&&(Ct(this._container,"leaflet-interactive"),this.removeInteractiveTarget(this._container))},getLatLng:function(){return this._latlng},setLatLng:function(o){return this._latlng=X(o),this._map&&(this._updatePosition(),this._adjustPan()),this},getContent:function(){return this._content},setContent:function(o){return this._content=o,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 o={zoom:this._updatePosition,viewreset:this._updatePosition};return this._zoomAnimated&&(o.zoomanim=this._animateZoom),o},isOpen:function(){return!!this._map&&this._map.hasLayer(this)},bringToFront:function(){return this._map&&mi(this._container),this},bringToBack:function(){return this._map&&gi(this._container),this},_prepareOpen:function(o){var l=this._source;if(!l._map)return!1;if(l instanceof be){l=null;var u=this._source._layers;for(var p in u)if(u[p]._map){l=u[p];break}if(!l)return!1;this._source=l}if(!o)if(l.getCenter)o=l.getCenter();else if(l.getLatLng)o=l.getLatLng();else if(l.getBounds)o=l.getBounds().getCenter();else throw new Error("Unable to get source layer LatLng.");return this.setLatLng(o),this._map&&this.update(),!0},_updateContent:function(){if(this._content){var o=this._contentNode,l=typeof this._content=="function"?this._content(this._source||this):this._content;if(typeof l=="string")o.innerHTML=l;else{for(;o.hasChildNodes();)o.removeChild(o.firstChild);o.appendChild(l)}this.fire("contentupdate")}},_updatePosition:function(){if(this._map){var o=this._map.latLngToLayerPoint(this._latlng),l=E(this.options.offset),u=this._getAnchor();this._zoomAnimated?St(this._container,o.add(u)):l=l.add(o).add(u);var p=this._containerBottom=-l.y,g=this._containerLeft=-Math.round(this._containerWidth/2)+l.x;this._container.style.bottom=p+"px",this._container.style.left=g+"px"}},_getAnchor:function(){return[0,0]}});ht.include({_initOverlay:function(o,l,u,p){var g=l;return g instanceof o||(g=new o(p).setContent(l)),u&&g.setLatLng(u),g}}),re.include({_initOverlay:function(o,l,u,p){var g=u;return g instanceof o?(y(g,p),g._source=this):(g=l&&!p?l:new o(p,this),g.setContent(u)),g}});var hs=de.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(o){return o=arguments.length?o:this._source._map,!o.hasLayer(this)&&o._popup&&o._popup.options.autoClose&&o.removeLayer(o._popup),o._popup=this,de.prototype.openOn.call(this,o)},onAdd:function(o){de.prototype.onAdd.call(this,o),o.fire("popupopen",{popup:this}),this._source&&(this._source.fire("popupopen",{popup:this},!0),this._source instanceof Be||this._source.on("preclick",$e))},onRemove:function(o){de.prototype.onRemove.call(this,o),o.fire("popupclose",{popup:this}),this._source&&(this._source.fire("popupclose",{popup:this},!0),this._source instanceof Be||this._source.off("preclick",$e))},getEvents:function(){var o=de.prototype.getEvents.call(this);return(this.options.closeOnClick!==void 0?this.options.closeOnClick:this._map.options.closePopupOnClick)&&(o.preclick=this.close),this.options.keepInView&&(o.moveend=this._adjustPan),o},_initLayout:function(){var o="leaflet-popup",l=this._container=ft("div",o+" "+(this.options.className||"")+" leaflet-zoom-animated"),u=this._wrapper=ft("div",o+"-content-wrapper",l);if(this._contentNode=ft("div",o+"-content",u),cn(l),xr(this._contentNode),K(l,"contextmenu",$e),this._tipContainer=ft("div",o+"-tip-container",l),this._tip=ft("div",o+"-tip",this._tipContainer),this.options.closeButton){var p=this._closeButton=ft("a",o+"-close-button",l);p.setAttribute("role","button"),p.setAttribute("aria-label","Close popup"),p.href="#close",p.innerHTML='<span aria-hidden="true">&#215;</span>',K(p,"click",function(g){Et(g),this.close()},this)}},_updateLayout:function(){var o=this._contentNode,l=o.style;l.width="",l.whiteSpace="nowrap";var u=o.offsetWidth;u=Math.min(u,this.options.maxWidth),u=Math.max(u,this.options.minWidth),l.width=u+1+"px",l.whiteSpace="",l.height="";var p=o.offsetHeight,g=this.options.maxHeight,v="leaflet-popup-scrolled";g&&p>g?(l.height=g+"px",J(o,v)):Ct(o,v),this._containerWidth=this._container.offsetWidth},_animateZoom:function(o){var l=this._map._latLngToNewLayerPoint(this._latlng,o.zoom,o.center),u=this._getAnchor();St(this._container,l.add(u))},_adjustPan:function(){if(this.options.autoPan){if(this._map._panAnim&&this._map._panAnim.stop(),this._autopanning){this._autopanning=!1;return}var o=this._map,l=parseInt(rn(this._container,"marginBottom"),10)||0,u=this._container.offsetHeight+l,p=this._containerWidth,g=new W(this._containerLeft,-u-this._containerBottom);g._add(Xe(this._container));var v=o.layerPointToContainerPoint(g),M=E(this.options.autoPanPadding),T=E(this.options.autoPanPaddingTopLeft||M),S=E(this.options.autoPanPaddingBottomRight||M),A=o.getSize(),H=0,G=0;v.x+p+S.x>A.x&&(H=v.x+p-A.x+S.x),v.x-H-T.x<0&&(H=v.x-T.x),v.y+u+S.y>A.y&&(G=v.y+u-A.y+S.y),v.y-G-T.y<0&&(G=v.y-T.y),(H||G)&&(this.options.keepInView&&(this._autopanning=!0),o.fire("autopanstart").panBy([H,G]))}},_getAnchor:function(){return E(this._source&&this._source._getPopupAnchor?this._source._getPopupAnchor():[0,0])}}),zf=function(o,l){return new hs(o,l)};ht.mergeOptions({closePopupOnClick:!0}),ht.include({openPopup:function(o,l,u){return this._initOverlay(hs,o,l,u).openOn(this),this},closePopup:function(o){return o=arguments.length?o:this._popup,o&&o.close(),this}}),re.include({bindPopup:function(o,l){return this._popup=this._initOverlay(hs,this._popup,o,l),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(o){return this._popup&&(this instanceof be||(this._popup._source=this),this._popup._prepareOpen(o||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(o){return this._popup&&this._popup.setContent(o),this},getPopup:function(){return this._popup},_openPopup:function(o){if(!(!this._popup||!this._map)){Ke(o);var l=o.layer||o.target;if(this._popup._source===l&&!(l instanceof Be)){this._map.hasLayer(this._popup)?this.closePopup():this.openPopup(o.latlng);return}this._popup._source=l,this.openPopup(o.latlng)}},_movePopup:function(o){this._popup.setLatLng(o.latlng)},_onKeyPress:function(o){o.originalEvent.keyCode===13&&this._openPopup(o)}});var cs=de.extend({options:{pane:"tooltipPane",offset:[0,0],direction:"auto",permanent:!1,sticky:!1,opacity:.9},onAdd:function(o){de.prototype.onAdd.call(this,o),this.setOpacity(this.options.opacity),o.fire("tooltipopen",{tooltip:this}),this._source&&(this.addEventParent(this._source),this._source.fire("tooltipopen",{tooltip:this},!0))},onRemove:function(o){de.prototype.onRemove.call(this,o),o.fire("tooltipclose",{tooltip:this}),this._source&&(this.removeEventParent(this._source),this._source.fire("tooltipclose",{tooltip:this},!0))},getEvents:function(){var o=de.prototype.getEvents.call(this);return this.options.permanent||(o.preclick=this.close),o},_initLayout:function(){var o="leaflet-tooltip",l=o+" "+(this.options.className||"")+" leaflet-zoom-"+(this._zoomAnimated?"animated":"hide");this._contentNode=this._container=ft("div",l),this._container.setAttribute("role","tooltip"),this._container.setAttribute("id","leaflet-tooltip-"+a(this))},_updateLayout:function(){},_adjustPan:function(){},_setPosition:function(o){var l,u,p=this._map,g=this._container,v=p.latLngToContainerPoint(p.getCenter()),M=p.layerPointToContainerPoint(o),T=this.options.direction,S=g.offsetWidth,A=g.offsetHeight,H=E(this.options.offset),G=this._getAnchor();T==="top"?(l=S/2,u=A):T==="bottom"?(l=S/2,u=0):T==="center"?(l=S/2,u=A/2):T==="right"?(l=0,u=A/2):T==="left"?(l=S,u=A/2):M.x<v.x?(T="right",l=0,u=A/2):(T="left",l=S+(H.x+G.x)*2,u=A/2),o=o.subtract(E(l,u,!0)).add(H).add(G),Ct(g,"leaflet-tooltip-right"),Ct(g,"leaflet-tooltip-left"),Ct(g,"leaflet-tooltip-top"),Ct(g,"leaflet-tooltip-bottom"),J(g,"leaflet-tooltip-"+T),St(g,o)},_updatePosition:function(){var o=this._map.latLngToLayerPoint(this._latlng);this._setPosition(o)},setOpacity:function(o){this.options.opacity=o,this._container&&Kt(this._container,o)},_animateZoom:function(o){var l=this._map._latLngToNewLayerPoint(this._latlng,o.zoom,o.center);this._setPosition(l)},_getAnchor:function(){return E(this._source&&this._source._getTooltipAnchor&&!this.options.sticky?this._source._getTooltipAnchor():[0,0])}}),Rf=function(o,l){return new cs(o,l)};ht.include({openTooltip:function(o,l,u){return this._initOverlay(cs,o,l,u).openOn(this),this},closeTooltip:function(o){return o.close(),this}}),re.include({bindTooltip:function(o,l){return this._tooltip&&this.isTooltipOpen()&&this.unbindTooltip(),this._tooltip=this._initOverlay(cs,this._tooltip,o,l),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(o){if(!(!o&&this._tooltipHandlersAdded)){var l=o?"off":"on",u={remove:this.closeTooltip,move:this._moveTooltip};this._tooltip.options.permanent?u.add=this._openTooltip:(u.mouseover=this._openTooltip,u.mouseout=this.closeTooltip,u.click=this._openTooltip,this._map?this._addFocusListeners():u.add=this._addFocusListeners),this._tooltip.options.sticky&&(u.mousemove=this._moveTooltip),this[l](u),this._tooltipHandlersAdded=!o}},openTooltip:function(o){return this._tooltip&&(this instanceof be||(this._tooltip._source=this),this._tooltip._prepareOpen(o)&&(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(o){return this._tooltip&&this._tooltip.setContent(o),this},getTooltip:function(){return this._tooltip},_addFocusListeners:function(){this.getElement?this._addFocusListenersOnLayer(this):this.eachLayer&&this.eachLayer(this._addFocusListenersOnLayer,this)},_addFocusListenersOnLayer:function(o){var l=typeof o.getElement=="function"&&o.getElement();l&&(K(l,"focus",function(){this._tooltip._source=o,this.openTooltip()},this),K(l,"blur",this.closeTooltip,this))},_setAriaDescribedByOnLayer:function(o){var l=typeof o.getElement=="function"&&o.getElement();l&&l.setAttribute("aria-describedby",this._tooltip._container.id)},_openTooltip:function(o){if(!(!this._tooltip||!this._map)){if(this._map.dragging&&this._map.dragging.moving()&&!this._openOnceFlag){this._openOnceFlag=!0;var l=this;this._map.once("moveend",function(){l._openOnceFlag=!1,l._openTooltip(o)});return}this._tooltip._source=o.layer||o.target,this.openTooltip(this._tooltip.options.sticky?o.latlng:void 0)}},_moveTooltip:function(o){var l=o.latlng,u,p;this._tooltip.options.sticky&&o.originalEvent&&(u=this._map.mouseEventToContainerPoint(o.originalEvent),p=this._map.containerPointToLayerPoint(u),l=this._map.layerPointToLatLng(p)),this._tooltip.setLatLng(l)}});var Hl=yi.extend({options:{iconSize:[12,12],html:!1,bgPos:null,className:"leaflet-div-icon"},createIcon:function(o){var l=o&&o.tagName==="DIV"?o:document.createElement("div"),u=this.options;if(u.html instanceof Element?($n(l),l.appendChild(u.html)):l.innerHTML=u.html!==!1?u.html:"",u.bgPos){var p=E(u.bgPos);l.style.backgroundPosition=-p.x+"px "+-p.y+"px"}return this._setIconStyles(l,"icon"),l},createShadow:function(){return null}});function Bf(o){return new Hl(o)}yi.Default=fn;var pn=re.extend({options:{tileSize:256,opacity:1,updateWhenIdle:U.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(o){y(this,o)},onAdd:function(){this._initContainer(),this._levels={},this._tiles={},this._resetView()},beforeAdd:function(o){o._addZoomLimit(this)},onRemove:function(o){this._removeAllTiles(),Lt(this._container),o._removeZoomLimit(this),this._container=null,this._tileZoom=void 0},bringToFront:function(){return this._map&&(mi(this._container),this._setAutoZIndex(Math.max)),this},bringToBack:function(){return this._map&&(gi(this._container),this._setAutoZIndex(Math.min)),this},getContainer:function(){return this._container},setOpacity:function(o){return this.options.opacity=o,this._updateOpacity(),this},setZIndex:function(o){return this.options.zIndex=o,this._updateZIndex(),this},isLoading:function(){return this._loading},redraw:function(){if(this._map){this._removeAllTiles();var o=this._clampZoom(this._map.getZoom());o!==this._tileZoom&&(this._tileZoom=o,this._updateLevels()),this._update()}return this},getEvents:function(){var o={viewprereset:this._invalidateAll,viewreset:this._resetView,zoom:this._resetView,moveend:this._onMoveEnd};return this.options.updateWhenIdle||(this._onMove||(this._onMove=h(this._onMoveEnd,this.options.updateInterval,this)),o.move=this._onMove),this._zoomAnimated&&(o.zoomanim=this._animateZoom),o},createTile:function(){return document.createElement("div")},getTileSize:function(){var o=this.options.tileSize;return o instanceof W?o:new W(o,o)},_updateZIndex:function(){this._container&&this.options.zIndex!==void 0&&this.options.zIndex!==null&&(this._container.style.zIndex=this.options.zIndex)},_setAutoZIndex:function(o){for(var l=this.getPane().children,u=-o(-1/0,1/0),p=0,g=l.length,v;p<g;p++)v=l[p].style.zIndex,l[p]!==this._container&&v&&(u=o(u,+v));isFinite(u)&&(this.options.zIndex=u+o(-1,1),this._updateZIndex())},_updateOpacity:function(){if(this._map&&!U.ielt9){Kt(this._container,this.options.opacity);var o=+new Date,l=!1,u=!1;for(var p in this._tiles){var g=this._tiles[p];if(!(!g.current||!g.loaded)){var v=Math.min(1,(o-g.loaded)/200);Kt(g.el,v),v<1?l=!0:(g.active?u=!0:this._onOpaqueTile(g),g.active=!0)}}u&&!this._noPrune&&this._pruneTiles(),l&&(j(this._fadeFrame),this._fadeFrame=N(this._updateOpacity,this))}},_onOpaqueTile:d,_initContainer:function(){this._container||(this._container=ft("div","leaflet-layer "+(this.options.className||"")),this._updateZIndex(),this.options.opacity<1&&this._updateOpacity(),this.getPane().appendChild(this._container))},_updateLevels:function(){var o=this._tileZoom,l=this.options.maxZoom;if(o!==void 0){for(var u in this._levels)u=Number(u),this._levels[u].el.children.length||u===o?(this._levels[u].el.style.zIndex=l-Math.abs(o-u),this._onUpdateLevel(u)):(Lt(this._levels[u].el),this._removeTilesAtZoom(u),this._onRemoveLevel(u),delete this._levels[u]);var p=this._levels[o],g=this._map;return p||(p=this._levels[o]={},p.el=ft("div","leaflet-tile-container leaflet-zoom-animated",this._container),p.el.style.zIndex=l,p.origin=g.project(g.unproject(g.getPixelOrigin()),o).round(),p.zoom=o,this._setZoomTransform(p,g.getCenter(),g.getZoom()),d(p.el.offsetWidth),this._onCreateLevel(p)),this._level=p,p}},_onUpdateLevel:d,_onRemoveLevel:d,_onCreateLevel:d,_pruneTiles:function(){if(this._map){var o,l,u=this._map.getZoom();if(u>this.options.maxZoom||u<this.options.minZoom){this._removeAllTiles();return}for(o in this._tiles)l=this._tiles[o],l.retain=l.current;for(o in this._tiles)if(l=this._tiles[o],l.current&&!l.active){var p=l.coords;this._retainParent(p.x,p.y,p.z,p.z-5)||this._retainChildren(p.x,p.y,p.z,p.z+2)}for(o in this._tiles)this._tiles[o].retain||this._removeTile(o)}},_removeTilesAtZoom:function(o){for(var l in this._tiles)this._tiles[l].coords.z===o&&this._removeTile(l)},_removeAllTiles:function(){for(var o in this._tiles)this._removeTile(o)},_invalidateAll:function(){for(var o in this._levels)Lt(this._levels[o].el),this._onRemoveLevel(Number(o)),delete this._levels[o];this._removeAllTiles(),this._tileZoom=void 0},_retainParent:function(o,l,u,p){var g=Math.floor(o/2),v=Math.floor(l/2),M=u-1,T=new W(+g,+v);T.z=+M;var S=this._tileCoordsToKey(T),A=this._tiles[S];return A&&A.active?(A.retain=!0,!0):(A&&A.loaded&&(A.retain=!0),M>p?this._retainParent(g,v,M,p):!1)},_retainChildren:function(o,l,u,p){for(var g=2*o;g<2*o+2;g++)for(var v=2*l;v<2*l+2;v++){var M=new W(g,v);M.z=u+1;var T=this._tileCoordsToKey(M),S=this._tiles[T];if(S&&S.active){S.retain=!0;continue}else S&&S.loaded&&(S.retain=!0);u+1<p&&this._retainChildren(g,v,u+1,p)}},_resetView:function(o){var l=o&&(o.pinch||o.flyTo);this._setView(this._map.getCenter(),this._map.getZoom(),l,l)},_animateZoom:function(o){this._setView(o.center,o.zoom,!0,o.noUpdate)},_clampZoom:function(o){var l=this.options;return l.minNativeZoom!==void 0&&o<l.minNativeZoom?l.minNativeZoom:l.maxNativeZoom!==void 0&&l.maxNativeZoom<o?l.maxNativeZoom:o},_setView:function(o,l,u,p){var g=Math.round(l);this.options.maxZoom!==void 0&&g>this.options.maxZoom||this.options.minZoom!==void 0&&g<this.options.minZoom?g=void 0:g=this._clampZoom(g);var v=this.options.updateWhenZooming&&g!==this._tileZoom;(!p||v)&&(this._tileZoom=g,this._abortLoading&&this._abortLoading(),this._updateLevels(),this._resetGrid(),g!==void 0&&this._update(o),u||this._pruneTiles(),this._noPrune=!!u),this._setZoomTransforms(o,l)},_setZoomTransforms:function(o,l){for(var u in this._levels)this._setZoomTransform(this._levels[u],o,l)},_setZoomTransform:function(o,l,u){var p=this._map.getZoomScale(u,o.zoom),g=o.origin.multiplyBy(p).subtract(this._map._getNewPixelOrigin(l,u)).round();U.any3d?qe(o.el,g,p):St(o.el,g)},_resetGrid:function(){var o=this._map,l=o.options.crs,u=this._tileSize=this.getTileSize(),p=this._tileZoom,g=this._map.getPixelWorldBounds(this._tileZoom);g&&(this._globalTileRange=this._pxBoundsToTileRange(g)),this._wrapX=l.wrapLng&&!this.options.noWrap&&[Math.floor(o.project([0,l.wrapLng[0]],p).x/u.x),Math.ceil(o.project([0,l.wrapLng[1]],p).x/u.y)],this._wrapY=l.wrapLat&&!this.options.noWrap&&[Math.floor(o.project([l.wrapLat[0],0],p).y/u.x),Math.ceil(o.project([l.wrapLat[1],0],p).y/u.y)]},_onMoveEnd:function(){!this._map||this._map._animatingZoom||this._update()},_getTiledPixelBounds:function(o){var l=this._map,u=l._animatingZoom?Math.max(l._animateToZoom,l.getZoom()):l.getZoom(),p=l.getZoomScale(u,this._tileZoom),g=l.project(o,this._tileZoom).floor(),v=l.getSize().divideBy(p*2);return new V(g.subtract(v),g.add(v))},_update:function(o){var l=this._map;if(l){var u=this._clampZoom(l.getZoom());if(o===void 0&&(o=l.getCenter()),this._tileZoom!==void 0){var p=this._getTiledPixelBounds(o),g=this._pxBoundsToTileRange(p),v=g.getCenter(),M=[],T=this.options.keepBuffer,S=new V(g.getBottomLeft().subtract([T,-T]),g.getTopRight().add([T,-T]));if(!(isFinite(g.min.x)&&isFinite(g.min.y)&&isFinite(g.max.x)&&isFinite(g.max.y)))throw new Error("Attempted to load an infinite number of tiles");for(var A in this._tiles){var H=this._tiles[A].coords;(H.z!==this._tileZoom||!S.contains(new W(H.x,H.y)))&&(this._tiles[A].current=!1)}if(Math.abs(u-this._tileZoom)>1){this._setView(o,u);return}for(var G=g.min.y;G<=g.max.y;G++)for(var et=g.min.x;et<=g.max.x;et++){var Zt=new W(et,G);if(Zt.z=this._tileZoom,!!this._isValidTile(Zt)){var At=this._tiles[this._tileCoordsToKey(Zt)];At?At.current=!0:M.push(Zt)}}if(M.sort(function(Vt,wi){return Vt.distanceTo(v)-wi.distanceTo(v)}),M.length!==0){this._loading||(this._loading=!0,this.fire("loading"));var Jt=document.createDocumentFragment();for(et=0;et<M.length;et++)this._addTile(M[et],Jt);this._level.el.appendChild(Jt)}}}},_isValidTile:function(o){var l=this._map.options.crs;if(!l.infinite){var u=this._globalTileRange;if(!l.wrapLng&&(o.x<u.min.x||o.x>u.max.x)||!l.wrapLat&&(o.y<u.min.y||o.y>u.max.y))return!1}if(!this.options.bounds)return!0;var p=this._tileCoordsToBounds(o);return pt(this.options.bounds).overlaps(p)},_keyToBounds:function(o){return this._tileCoordsToBounds(this._keyToTileCoords(o))},_tileCoordsToNwSe:function(o){var l=this._map,u=this.getTileSize(),p=o.scaleBy(u),g=p.add(u),v=l.unproject(p,o.z),M=l.unproject(g,o.z);return[v,M]},_tileCoordsToBounds:function(o){var l=this._tileCoordsToNwSe(o),u=new kt(l[0],l[1]);return this.options.noWrap||(u=this._map.wrapLatLngBounds(u)),u},_tileCoordsToKey:function(o){return o.x+":"+o.y+":"+o.z},_keyToTileCoords:function(o){var l=o.split(":"),u=new W(+l[0],+l[1]);return u.z=+l[2],u},_removeTile:function(o){var l=this._tiles[o];l&&(Lt(l.el),delete this._tiles[o],this.fire("tileunload",{tile:l.el,coords:this._keyToTileCoords(o)}))},_initTile:function(o){J(o,"leaflet-tile");var l=this.getTileSize();o.style.width=l.x+"px",o.style.height=l.y+"px",o.onselectstart=d,o.onmousemove=d,U.ielt9&&this.options.opacity<1&&Kt(o,this.options.opacity)},_addTile:function(o,l){var u=this._getTilePos(o),p=this._tileCoordsToKey(o),g=this.createTile(this._wrapCoords(o),s(this._tileReady,this,o));this._initTile(g),this.createTile.length<2&&N(s(this._tileReady,this,o,null,g)),St(g,u),this._tiles[p]={el:g,coords:o,current:!0},l.appendChild(g),this.fire("tileloadstart",{tile:g,coords:o})},_tileReady:function(o,l,u){l&&this.fire("tileerror",{error:l,tile:u,coords:o});var p=this._tileCoordsToKey(o);u=this._tiles[p],u&&(u.loaded=+new Date,this._map._fadeAnimated?(Kt(u.el,0),j(this._fadeFrame),this._fadeFrame=N(this._updateOpacity,this)):(u.active=!0,this._pruneTiles()),l||(J(u.el,"leaflet-tile-loaded"),this.fire("tileload",{tile:u.el,coords:o})),this._noTilesToLoad()&&(this._loading=!1,this.fire("load"),U.ielt9||!this._map._fadeAnimated?N(this._pruneTiles,this):setTimeout(s(this._pruneTiles,this),250)))},_getTilePos:function(o){return o.scaleBy(this.getTileSize()).subtract(this._level.origin)},_wrapCoords:function(o){var l=new W(this._wrapX?c(o.x,this._wrapX):o.x,this._wrapY?c(o.y,this._wrapY):o.y);return l.z=o.z,l},_pxBoundsToTileRange:function(o){var l=this.getTileSize();return new V(o.min.unscaleBy(l).floor(),o.max.unscaleBy(l).ceil().subtract([1,1]))},_noTilesToLoad:function(){for(var o in this._tiles)if(!this._tiles[o].loaded)return!1;return!0}});function Ff(o){return new pn(o)}var bi=pn.extend({options:{minZoom:0,maxZoom:18,subdomains:"abc",errorTileUrl:"",zoomOffset:0,tms:!1,zoomReverse:!1,detectRetina:!1,crossOrigin:!1,referrerPolicy:!1},initialize:function(o,l){this._url=o,l=y(this,l),l.detectRetina&&U.retina&&l.maxZoom>0?(l.tileSize=Math.floor(l.tileSize/2),l.zoomReverse?(l.zoomOffset--,l.minZoom=Math.min(l.maxZoom,l.minZoom+1)):(l.zoomOffset++,l.maxZoom=Math.max(l.minZoom,l.maxZoom-1)),l.minZoom=Math.max(0,l.minZoom)):l.zoomReverse?l.minZoom=Math.min(l.maxZoom,l.minZoom):l.maxZoom=Math.max(l.minZoom,l.maxZoom),typeof l.subdomains=="string"&&(l.subdomains=l.subdomains.split("")),this.on("tileunload",this._onTileRemove)},setUrl:function(o,l){return this._url===o&&l===void 0&&(l=!0),this._url=o,l||this.redraw(),this},createTile:function(o,l){var u=document.createElement("img");return K(u,"load",s(this._tileOnLoad,this,l,u)),K(u,"error",s(this._tileOnError,this,l,u)),(this.options.crossOrigin||this.options.crossOrigin==="")&&(u.crossOrigin=this.options.crossOrigin===!0?"":this.options.crossOrigin),typeof this.options.referrerPolicy=="string"&&(u.referrerPolicy=this.options.referrerPolicy),u.alt="",u.src=this.getTileUrl(o),u},getTileUrl:function(o){var l={r:U.retina?"@2x":"",s:this._getSubdomain(o),x:o.x,y:o.y,z:this._getZoomForUrl()};if(this._map&&!this._map.options.crs.infinite){var u=this._globalTileRange.max.y-o.y;this.options.tms&&(l.y=u),l["-y"]=u}return w(this._url,e(l,this.options))},_tileOnLoad:function(o,l){U.ielt9?setTimeout(s(o,this,null,l),0):o(null,l)},_tileOnError:function(o,l,u){var p=this.options.errorTileUrl;p&&l.getAttribute("src")!==p&&(l.src=p),o(u,l)},_onTileRemove:function(o){o.tile.onload=null},_getZoomForUrl:function(){var o=this._tileZoom,l=this.options.maxZoom,u=this.options.zoomReverse,p=this.options.zoomOffset;return u&&(o=l-o),o+p},_getSubdomain:function(o){var l=Math.abs(o.x+o.y)%this.options.subdomains.length;return this.options.subdomains[l]},_abortLoading:function(){var o,l;for(o in this._tiles)if(this._tiles[o].coords.z!==this._tileZoom&&(l=this._tiles[o].el,l.onload=d,l.onerror=d,!l.complete)){l.src=O;var u=this._tiles[o].coords;Lt(l),delete this._tiles[o],this.fire("tileabort",{tile:l,coords:u})}},_removeTile:function(o){var l=this._tiles[o];if(l)return l.el.setAttribute("src",O),pn.prototype._removeTile.call(this,o)},_tileReady:function(o,l,u){if(!(!this._map||u&&u.getAttribute("src")===O))return pn.prototype._tileReady.call(this,o,l,u)}});function Zl(o,l){return new bi(o,l)}var Vl=bi.extend({defaultWmsParams:{service:"WMS",request:"GetMap",layers:"",styles:"",format:"image/jpeg",transparent:!1,version:"1.1.1"},options:{crs:null,uppercase:!1},initialize:function(o,l){this._url=o;var u=e({},this.defaultWmsParams);for(var p in l)p in this.options||(u[p]=l[p]);l=y(this,l);var g=l.detectRetina&&U.retina?2:1,v=this.getTileSize();u.width=v.x*g,u.height=v.y*g,this.wmsParams=u},onAdd:function(o){this._crs=this.options.crs||o.options.crs,this._wmsVersion=parseFloat(this.wmsParams.version);var l=this._wmsVersion>=1.3?"crs":"srs";this.wmsParams[l]=this._crs.code,bi.prototype.onAdd.call(this,o)},getTileUrl:function(o){var l=this._tileCoordsToNwSe(o),u=this._crs,p=dt(u.project(l[0]),u.project(l[1])),g=p.min,v=p.max,M=(this._wmsVersion>=1.3&&this._crs===zl?[g.y,g.x,v.y,v.x]:[g.x,g.y,v.x,v.y]).join(","),T=bi.prototype.getTileUrl.call(this,o);return T+x(this.wmsParams,T,this.options.uppercase)+(this.options.uppercase?"&BBOX=":"&bbox=")+M},setParams:function(o,l){return e(this.wmsParams,o),l||this.redraw(),this}});function Nf(o,l){return new Vl(o,l)}bi.WMS=Vl,Zl.wms=Nf;var Le=re.extend({options:{padding:.1},initialize:function(o){y(this,o),a(this),this._layers=this._layers||{}},onAdd:function(){this._container||(this._initContainer(),J(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 o={viewreset:this._reset,zoom:this._onZoom,moveend:this._update,zoomend:this._onZoomEnd};return this._zoomAnimated&&(o.zoomanim=this._onAnimZoom),o},_onAnimZoom:function(o){this._updateTransform(o.center,o.zoom)},_onZoom:function(){this._updateTransform(this._map.getCenter(),this._map.getZoom())},_updateTransform:function(o,l){var u=this._map.getZoomScale(l,this._zoom),p=this._map.getSize().multiplyBy(.5+this.options.padding),g=this._map.project(this._center,l),v=p.multiplyBy(-u).add(g).subtract(this._map._getNewPixelOrigin(o,l));U.any3d?qe(this._container,v,u):St(this._container,v)},_reset:function(){this._update(),this._updateTransform(this._center,this._zoom);for(var o in this._layers)this._layers[o]._reset()},_onZoomEnd:function(){for(var o in this._layers)this._layers[o]._project()},_updatePaths:function(){for(var o in this._layers)this._layers[o]._update()},_update:function(){var o=this.options.padding,l=this._map.getSize(),u=this._map.containerPointToLayerPoint(l.multiplyBy(-o)).round();this._bounds=new V(u,u.add(l.multiplyBy(1+o*2)).round()),this._center=this._map.getCenter(),this._zoom=this._map.getZoom()}}),Yl=Le.extend({options:{tolerance:0},getEvents:function(){var o=Le.prototype.getEvents.call(this);return o.viewprereset=this._onViewPreReset,o},_onViewPreReset:function(){this._postponeUpdatePaths=!0},onAdd:function(){Le.prototype.onAdd.call(this),this._draw()},_initContainer:function(){var o=this._container=document.createElement("canvas");K(o,"mousemove",this._onMouseMove,this),K(o,"click dblclick mousedown mouseup contextmenu",this._onClick,this),K(o,"mouseout",this._handleMouseOut,this),o._leaflet_disable_events=!0,this._ctx=o.getContext("2d")},_destroyContainer:function(){j(this._redrawRequest),delete this._ctx,Lt(this._container),xt(this._container),delete this._container},_updatePaths:function(){if(!this._postponeUpdatePaths){var o;this._redrawBounds=null;for(var l in this._layers)o=this._layers[l],o._update();this._redraw()}},_update:function(){if(!(this._map._animatingZoom&&this._bounds)){Le.prototype._update.call(this);var o=this._bounds,l=this._container,u=o.getSize(),p=U.retina?2:1;St(l,o.min),l.width=p*u.x,l.height=p*u.y,l.style.width=u.x+"px",l.style.height=u.y+"px",U.retina&&this._ctx.scale(2,2),this._ctx.translate(-o.min.x,-o.min.y),this.fire("update")}},_reset:function(){Le.prototype._reset.call(this),this._postponeUpdatePaths&&(this._postponeUpdatePaths=!1,this._updatePaths())},_initPath:function(o){this._updateDashArray(o),this._layers[a(o)]=o;var l=o._order={layer:o,prev:this._drawLast,next:null};this._drawLast&&(this._drawLast.next=l),this._drawLast=l,this._drawFirst=this._drawFirst||this._drawLast},_addPath:function(o){this._requestRedraw(o)},_removePath:function(o){var l=o._order,u=l.next,p=l.prev;u?u.prev=p:this._drawLast=p,p?p.next=u:this._drawFirst=u,delete o._order,delete this._layers[a(o)],this._requestRedraw(o)},_updatePath:function(o){this._extendRedrawBounds(o),o._project(),o._update(),this._requestRedraw(o)},_updateStyle:function(o){this._updateDashArray(o),this._requestRedraw(o)},_updateDashArray:function(o){if(typeof o.options.dashArray=="string"){var l=o.options.dashArray.split(/[, ]+/),u=[],p,g;for(g=0;g<l.length;g++){if(p=Number(l[g]),isNaN(p))return;u.push(p)}o.options._dashArray=u}else o.options._dashArray=o.options.dashArray},_requestRedraw:function(o){this._map&&(this._extendRedrawBounds(o),this._redrawRequest=this._redrawRequest||N(this._redraw,this))},_extendRedrawBounds:function(o){if(o._pxBounds){var l=(o.options.weight||0)+1;this._redrawBounds=this._redrawBounds||new V,this._redrawBounds.extend(o._pxBounds.min.subtract([l,l])),this._redrawBounds.extend(o._pxBounds.max.add([l,l]))}},_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 o=this._redrawBounds;if(o){var l=o.getSize();this._ctx.clearRect(o.min.x,o.min.y,l.x,l.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 o,l=this._redrawBounds;if(this._ctx.save(),l){var u=l.getSize();this._ctx.beginPath(),this._ctx.rect(l.min.x,l.min.y,u.x,u.y),this._ctx.clip()}this._drawing=!0;for(var p=this._drawFirst;p;p=p.next)o=p.layer,(!l||o._pxBounds&&o._pxBounds.intersects(l))&&o._updatePath();this._drawing=!1,this._ctx.restore()},_updatePoly:function(o,l){if(this._drawing){var u,p,g,v,M=o._parts,T=M.length,S=this._ctx;if(T){for(S.beginPath(),u=0;u<T;u++){for(p=0,g=M[u].length;p<g;p++)v=M[u][p],S[p?"lineTo":"moveTo"](v.x,v.y);l&&S.closePath()}this._fillStroke(S,o)}}},_updateCircle:function(o){if(!(!this._drawing||o._empty())){var l=o._point,u=this._ctx,p=Math.max(Math.round(o._radius),1),g=(Math.max(Math.round(o._radiusY),1)||p)/p;g!==1&&(u.save(),u.scale(1,g)),u.beginPath(),u.arc(l.x,l.y/g,p,0,Math.PI*2,!1),g!==1&&u.restore(),this._fillStroke(u,o)}},_fillStroke:function(o,l){var u=l.options;u.fill&&(o.globalAlpha=u.fillOpacity,o.fillStyle=u.fillColor||u.color,o.fill(u.fillRule||"evenodd")),u.stroke&&u.weight!==0&&(o.setLineDash&&o.setLineDash(l.options&&l.options._dashArray||[]),o.globalAlpha=u.opacity,o.lineWidth=u.weight,o.strokeStyle=u.color,o.lineCap=u.lineCap,o.lineJoin=u.lineJoin,o.stroke())},_onClick:function(o){for(var l=this._map.mouseEventToLayerPoint(o),u,p,g=this._drawFirst;g;g=g.next)u=g.layer,u.options.interactive&&u._containsPoint(l)&&(!(o.type==="click"||o.type==="preclick")||!this._map._draggableMoved(u))&&(p=u);this._fireEvent(p?[p]:!1,o)},_onMouseMove:function(o){if(!(!this._map||this._map.dragging.moving()||this._map._animatingZoom)){var l=this._map.mouseEventToLayerPoint(o);this._handleMouseHover(o,l)}},_handleMouseOut:function(o){var l=this._hoveredLayer;l&&(Ct(this._container,"leaflet-interactive"),this._fireEvent([l],o,"mouseout"),this._hoveredLayer=null,this._mouseHoverThrottled=!1)},_handleMouseHover:function(o,l){if(!this._mouseHoverThrottled){for(var u,p,g=this._drawFirst;g;g=g.next)u=g.layer,u.options.interactive&&u._containsPoint(l)&&(p=u);p!==this._hoveredLayer&&(this._handleMouseOut(o),p&&(J(this._container,"leaflet-interactive"),this._fireEvent([p],o,"mouseover"),this._hoveredLayer=p)),this._fireEvent(this._hoveredLayer?[this._hoveredLayer]:!1,o),this._mouseHoverThrottled=!0,setTimeout(s(function(){this._mouseHoverThrottled=!1},this),32)}},_fireEvent:function(o,l,u){this._map._fireDOMEvent(l,u||l.type,o)},_bringToFront:function(o){var l=o._order;if(l){var u=l.next,p=l.prev;if(u)u.prev=p;else return;p?p.next=u:u&&(this._drawFirst=u),l.prev=this._drawLast,this._drawLast.next=l,l.next=null,this._drawLast=l,this._requestRedraw(o)}},_bringToBack:function(o){var l=o._order;if(l){var u=l.next,p=l.prev;if(p)p.next=u;else return;u?u.prev=p:p&&(this._drawLast=p),l.prev=null,l.next=this._drawFirst,this._drawFirst.prev=l,this._drawFirst=l,this._requestRedraw(o)}}});function jl(o){return U.canvas?new Yl(o):null}var mn=function(){try{return document.namespaces.add("lvml","urn:schemas-microsoft-com:vml"),function(o){return document.createElement("<lvml:"+o+' class="lvml">')}}catch(o){}return function(o){return document.createElement("<"+o+' xmlns="urn:schemas-microsoft.com:vml" class="lvml">')}}(),Wf={_initContainer:function(){this._container=ft("div","leaflet-vml-container")},_update:function(){this._map._animatingZoom||(Le.prototype._update.call(this),this.fire("update"))},_initPath:function(o){var l=o._container=mn("shape");J(l,"leaflet-vml-shape "+(this.options.className||"")),l.coordsize="1 1",o._path=mn("path"),l.appendChild(o._path),this._updateStyle(o),this._layers[a(o)]=o},_addPath:function(o){var l=o._container;this._container.appendChild(l),o.options.interactive&&o.addInteractiveTarget(l)},_removePath:function(o){var l=o._container;Lt(l),o.removeInteractiveTarget(l),delete this._layers[a(o)]},_updateStyle:function(o){var l=o._stroke,u=o._fill,p=o.options,g=o._container;g.stroked=!!p.stroke,g.filled=!!p.fill,p.stroke?(l||(l=o._stroke=mn("stroke")),g.appendChild(l),l.weight=p.weight+"px",l.color=p.color,l.opacity=p.opacity,p.dashArray?l.dashStyle=P(p.dashArray)?p.dashArray.join(" "):p.dashArray.replace(/( *, *)/g," "):l.dashStyle="",l.endcap=p.lineCap.replace("butt","flat"),l.joinstyle=p.lineJoin):l&&(g.removeChild(l),o._stroke=null),p.fill?(u||(u=o._fill=mn("fill")),g.appendChild(u),u.color=p.fillColor||p.color,u.opacity=p.fillOpacity):u&&(g.removeChild(u),o._fill=null)},_updateCircle:function(o){var l=o._point.round(),u=Math.round(o._radius),p=Math.round(o._radiusY||u);this._setPath(o,o._empty()?"M0 0":"AL "+l.x+","+l.y+" "+u+","+p+" 0,"+65535*360)},_setPath:function(o,l){o._path.v=l},_bringToFront:function(o){mi(o._container)},_bringToBack:function(o){gi(o._container)}},us=U.vml?mn:Xa,gn=Le.extend({_initContainer:function(){this._container=us("svg"),this._container.setAttribute("pointer-events","none"),this._rootGroup=us("g"),this._container.appendChild(this._rootGroup)},_destroyContainer:function(){Lt(this._container),xt(this._container),delete this._container,delete this._rootGroup,delete this._svgSize},_update:function(){if(!(this._map._animatingZoom&&this._bounds)){Le.prototype._update.call(this);var o=this._bounds,l=o.getSize(),u=this._container;(!this._svgSize||!this._svgSize.equals(l))&&(this._svgSize=l,u.setAttribute("width",l.x),u.setAttribute("height",l.y)),St(u,o.min),u.setAttribute("viewBox",[o.min.x,o.min.y,l.x,l.y].join(" ")),this.fire("update")}},_initPath:function(o){var l=o._path=us("path");o.options.className&&J(l,o.options.className),o.options.interactive&&J(l,"leaflet-interactive"),this._updateStyle(o),this._layers[a(o)]=o},_addPath:function(o){this._rootGroup||this._initContainer(),this._rootGroup.appendChild(o._path),o.addInteractiveTarget(o._path)},_removePath:function(o){Lt(o._path),o.removeInteractiveTarget(o._path),delete this._layers[a(o)]},_updatePath:function(o){o._project(),o._update()},_updateStyle:function(o){var l=o._path,u=o.options;l&&(u.stroke?(l.setAttribute("stroke",u.color),l.setAttribute("stroke-opacity",u.opacity),l.setAttribute("stroke-width",u.weight),l.setAttribute("stroke-linecap",u.lineCap),l.setAttribute("stroke-linejoin",u.lineJoin),u.dashArray?l.setAttribute("stroke-dasharray",u.dashArray):l.removeAttribute("stroke-dasharray"),u.dashOffset?l.setAttribute("stroke-dashoffset",u.dashOffset):l.removeAttribute("stroke-dashoffset")):l.setAttribute("stroke","none"),u.fill?(l.setAttribute("fill",u.fillColor||u.color),l.setAttribute("fill-opacity",u.fillOpacity),l.setAttribute("fill-rule",u.fillRule||"evenodd")):l.setAttribute("fill","none"))},_updatePoly:function(o,l){this._setPath(o,$a(o._parts,l))},_updateCircle:function(o){var l=o._point,u=Math.max(Math.round(o._radius),1),p=Math.max(Math.round(o._radiusY),1)||u,g="a"+u+","+p+" 0 1,0 ",v=o._empty()?"M0 0":"M"+(l.x-u)+","+l.y+g+u*2+",0 "+g+-u*2+",0 ";this._setPath(o,v)},_setPath:function(o,l){o._path.setAttribute("d",l)},_bringToFront:function(o){mi(o._path)},_bringToBack:function(o){gi(o._path)}});U.vml&&gn.include(Wf);function Ul(o){return U.svg||U.vml?new gn(o):null}ht.include({getRenderer:function(o){var l=o.options.renderer||this._getPaneRenderer(o.options.pane)||this.options.renderer||this._renderer;return l||(l=this._renderer=this._createRenderer()),this.hasLayer(l)||this.addLayer(l),l},_getPaneRenderer:function(o){if(o==="overlayPane"||o===void 0)return!1;var l=this._paneRenderers[o];return l===void 0&&(l=this._createRenderer({pane:o}),this._paneRenderers[o]=l),l},_createRenderer:function(o){return this.options.preferCanvas&&jl(o)||Ul(o)}});var Gl=vi.extend({initialize:function(o,l){vi.prototype.initialize.call(this,this._boundsToLatLngs(o),l)},setBounds:function(o){return this.setLatLngs(this._boundsToLatLngs(o))},_boundsToLatLngs:function(o){return o=pt(o),[o.getSouthWest(),o.getNorthWest(),o.getNorthEast(),o.getSouthEast()]}});function Hf(o,l){return new Gl(o,l)}gn.create=us,gn.pointsToPath=$a,Me.geometryToLayer=ss,Me.coordsToLatLng=Sr,Me.coordsToLatLngs=os,Me.latLngToCoords=Or,Me.latLngsToCoords=rs,Me.getFeature=xi,Me.asFeature=as,ht.mergeOptions({boxZoom:!0});var ql=ue.extend({initialize:function(o){this._map=o,this._container=o._container,this._pane=o._panes.overlayPane,this._resetStateTimeout=0,o.on("unload",this._destroy,this)},addHooks:function(){K(this._container,"mousedown",this._onMouseDown,this)},removeHooks:function(){xt(this._container,"mousedown",this._onMouseDown,this)},moved:function(){return this._moved},_destroy:function(){Lt(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(o){if(!o.shiftKey||o.which!==1&&o.button!==1)return!1;this._clearDeferredResetState(),this._resetState(),an(),dr(),this._startPoint=this._map.mouseEventToContainerPoint(o),K(document,{contextmenu:Ke,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseMove:function(o){this._moved||(this._moved=!0,this._box=ft("div","leaflet-zoom-box",this._container),J(this._container,"leaflet-crosshair"),this._map.fire("boxzoomstart")),this._point=this._map.mouseEventToContainerPoint(o);var l=new V(this._point,this._startPoint),u=l.getSize();St(this._box,l.min),this._box.style.width=u.x+"px",this._box.style.height=u.y+"px"},_finish:function(){this._moved&&(Lt(this._box),Ct(this._container,"leaflet-crosshair")),ln(),fr(),xt(document,{contextmenu:Ke,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseUp:function(o){if(!(o.which!==1&&o.button!==1)&&(this._finish(),!!this._moved)){this._clearDeferredResetState(),this._resetStateTimeout=setTimeout(s(this._resetState,this),0);var l=new kt(this._map.containerPointToLatLng(this._startPoint),this._map.containerPointToLatLng(this._point));this._map.fitBounds(l).fire("boxzoomend",{boxZoomBounds:l})}},_onKeyDown:function(o){o.keyCode===27&&(this._finish(),this._clearDeferredResetState(),this._resetState())}});ht.addInitHook("addHandler","boxZoom",ql),ht.mergeOptions({doubleClickZoom:!0});var Xl=ue.extend({addHooks:function(){this._map.on("dblclick",this._onDoubleClick,this)},removeHooks:function(){this._map.off("dblclick",this._onDoubleClick,this)},_onDoubleClick:function(o){var l=this._map,u=l.getZoom(),p=l.options.zoomDelta,g=o.originalEvent.shiftKey?u-p:u+p;l.options.doubleClickZoom==="center"?l.setZoom(g):l.setZoomAround(o.containerPoint,g)}});ht.addInitHook("addHandler","doubleClickZoom",Xl),ht.mergeOptions({dragging:!0,inertia:!0,inertiaDeceleration:3400,inertiaMaxSpeed:1/0,easeLinearity:.2,worldCopyJump:!1,maxBoundsViscosity:0});var $l=ue.extend({addHooks:function(){if(!this._draggable){var o=this._map;this._draggable=new Re(o._mapPane,o._container),this._draggable.on({dragstart:this._onDragStart,drag:this._onDrag,dragend:this._onDragEnd},this),this._draggable.on("predrag",this._onPreDragLimit,this),o.options.worldCopyJump&&(this._draggable.on("predrag",this._onPreDragWrap,this),o.on("zoomend",this._onZoomEnd,this),o.whenReady(this._onZoomEnd,this))}J(this._map._container,"leaflet-grab leaflet-touch-drag"),this._draggable.enable(),this._positions=[],this._times=[]},removeHooks:function(){Ct(this._map._container,"leaflet-grab"),Ct(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 o=this._map;if(o._stop(),this._map.options.maxBounds&&this._map.options.maxBoundsViscosity){var l=pt(this._map.options.maxBounds);this._offsetLimit=dt(this._map.latLngToContainerPoint(l.getNorthWest()).multiplyBy(-1),this._map.latLngToContainerPoint(l.getSouthEast()).multiplyBy(-1).add(this._map.getSize())),this._viscosity=Math.min(1,Math.max(0,this._map.options.maxBoundsViscosity))}else this._offsetLimit=null;o.fire("movestart").fire("dragstart"),o.options.inertia&&(this._positions=[],this._times=[])},_onDrag:function(o){if(this._map.options.inertia){var l=this._lastTime=+new Date,u=this._lastPos=this._draggable._absPos||this._draggable._newPos;this._positions.push(u),this._times.push(l),this._prunePositions(l)}this._map.fire("move",o).fire("drag",o)},_prunePositions:function(o){for(;this._positions.length>1&&o-this._times[0]>50;)this._positions.shift(),this._times.shift()},_onZoomEnd:function(){var o=this._map.getSize().divideBy(2),l=this._map.latLngToLayerPoint([0,0]);this._initialWorldOffset=l.subtract(o).x,this._worldWidth=this._map.getPixelWorldBounds().getSize().x},_viscousLimit:function(o,l){return o-(o-l)*this._viscosity},_onPreDragLimit:function(){if(!(!this._viscosity||!this._offsetLimit)){var o=this._draggable._newPos.subtract(this._draggable._startPos),l=this._offsetLimit;o.x<l.min.x&&(o.x=this._viscousLimit(o.x,l.min.x)),o.y<l.min.y&&(o.y=this._viscousLimit(o.y,l.min.y)),o.x>l.max.x&&(o.x=this._viscousLimit(o.x,l.max.x)),o.y>l.max.y&&(o.y=this._viscousLimit(o.y,l.max.y)),this._draggable._newPos=this._draggable._startPos.add(o)}},_onPreDragWrap:function(){var o=this._worldWidth,l=Math.round(o/2),u=this._initialWorldOffset,p=this._draggable._newPos.x,g=(p-l+u)%o+l-u,v=(p+l+u)%o-l-u,M=Math.abs(g+u)<Math.abs(v+u)?g:v;this._draggable._absPos=this._draggable._newPos.clone(),this._draggable._newPos.x=M},_onDragEnd:function(o){var l=this._map,u=l.options,p=!u.inertia||o.noInertia||this._times.length<2;if(l.fire("dragend",o),p)l.fire("moveend");else{this._prunePositions(+new Date);var g=this._lastPos.subtract(this._positions[0]),v=(this._lastTime-this._times[0])/1e3,M=u.easeLinearity,T=g.multiplyBy(M/v),S=T.distanceTo([0,0]),A=Math.min(u.inertiaMaxSpeed,S),H=T.multiplyBy(A/S),G=A/(u.inertiaDeceleration*M),et=H.multiplyBy(-G/2).round();!et.x&&!et.y?l.fire("moveend"):(et=l._limitOffset(et,l.options.maxBounds),N(function(){l.panBy(et,{duration:G,easeLinearity:M,noMoveStart:!0,animate:!0})}))}}});ht.addInitHook("addHandler","dragging",$l),ht.mergeOptions({keyboard:!0,keyboardPanDelta:80});var Kl=ue.extend({keyCodes:{left:[37],right:[39],down:[40],up:[38],zoomIn:[187,107,61,171],zoomOut:[189,109,54,173]},initialize:function(o){this._map=o,this._setPanDelta(o.options.keyboardPanDelta),this._setZoomDelta(o.options.zoomDelta)},addHooks:function(){var o=this._map._container;o.tabIndex<=0&&(o.tabIndex="0"),K(o,{focus:this._onFocus,blur:this._onBlur,mousedown:this._onMouseDown},this),this._map.on({focus:this._addHooks,blur:this._removeHooks},this)},removeHooks:function(){this._removeHooks(),xt(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 o=document.body,l=document.documentElement,u=o.scrollTop||l.scrollTop,p=o.scrollLeft||l.scrollLeft;this._map._container.focus(),window.scrollTo(p,u)}},_onFocus:function(){this._focused=!0,this._map.fire("focus")},_onBlur:function(){this._focused=!1,this._map.fire("blur")},_setPanDelta:function(o){var l=this._panKeys={},u=this.keyCodes,p,g;for(p=0,g=u.left.length;p<g;p++)l[u.left[p]]=[-1*o,0];for(p=0,g=u.right.length;p<g;p++)l[u.right[p]]=[o,0];for(p=0,g=u.down.length;p<g;p++)l[u.down[p]]=[0,o];for(p=0,g=u.up.length;p<g;p++)l[u.up[p]]=[0,-1*o]},_setZoomDelta:function(o){var l=this._zoomKeys={},u=this.keyCodes,p,g;for(p=0,g=u.zoomIn.length;p<g;p++)l[u.zoomIn[p]]=o;for(p=0,g=u.zoomOut.length;p<g;p++)l[u.zoomOut[p]]=-o},_addHooks:function(){K(document,"keydown",this._onKeyDown,this)},_removeHooks:function(){xt(document,"keydown",this._onKeyDown,this)},_onKeyDown:function(o){if(!(o.altKey||o.ctrlKey||o.metaKey)){var l=o.keyCode,u=this._map,p;if(l in this._panKeys){if(!u._panAnim||!u._panAnim._inProgress)if(p=this._panKeys[l],o.shiftKey&&(p=E(p).multiplyBy(3)),u.options.maxBounds&&(p=u._limitOffset(E(p),u.options.maxBounds)),u.options.worldCopyJump){var g=u.wrapLatLng(u.unproject(u.project(u.getCenter()).add(p)));u.panTo(g)}else u.panBy(p)}else if(l in this._zoomKeys)u.setZoom(u.getZoom()+(o.shiftKey?3:1)*this._zoomKeys[l]);else if(l===27&&u._popup&&u._popup.options.closeOnEscapeKey)u.closePopup();else return;Ke(o)}}});ht.addInitHook("addHandler","keyboard",Kl),ht.mergeOptions({scrollWheelZoom:!0,wheelDebounceTime:40,wheelPxPerZoomLevel:60});var Ql=ue.extend({addHooks:function(){K(this._map._container,"wheel",this._onWheelScroll,this),this._delta=0},removeHooks:function(){xt(this._map._container,"wheel",this._onWheelScroll,this)},_onWheelScroll:function(o){var l=wl(o),u=this._map.options.wheelDebounceTime;this._delta+=l,this._lastMousePos=this._map.mouseEventToContainerPoint(o),this._startTime||(this._startTime=+new Date);var p=Math.max(u-(+new Date-this._startTime),0);clearTimeout(this._timer),this._timer=setTimeout(s(this._performZoom,this),p),Ke(o)},_performZoom:function(){var o=this._map,l=o.getZoom(),u=this._map.options.zoomSnap||0;o._stop();var p=this._delta/(this._map.options.wheelPxPerZoomLevel*4),g=4*Math.log(2/(1+Math.exp(-Math.abs(p))))/Math.LN2,v=u?Math.ceil(g/u)*u:g,M=o._limitZoom(l+(this._delta>0?v:-v))-l;this._delta=0,this._startTime=null,M&&(o.options.scrollWheelZoom==="center"?o.setZoom(l+M):o.setZoomAround(this._lastMousePos,l+M))}});ht.addInitHook("addHandler","scrollWheelZoom",Ql);var Zf=600;ht.mergeOptions({tapHold:U.touchNative&&U.safari&&U.mobile,tapTolerance:15});var Jl=ue.extend({addHooks:function(){K(this._map._container,"touchstart",this._onDown,this)},removeHooks:function(){xt(this._map._container,"touchstart",this._onDown,this)},_onDown:function(o){if(clearTimeout(this._holdTimeout),o.touches.length===1){var l=o.touches[0];this._startPos=this._newPos=new W(l.clientX,l.clientY),this._holdTimeout=setTimeout(s(function(){this._cancel(),this._isTapValid()&&(K(document,"touchend",Et),K(document,"touchend touchcancel",this._cancelClickPrevent),this._simulateEvent("contextmenu",l))},this),Zf),K(document,"touchend touchcancel contextmenu",this._cancel,this),K(document,"touchmove",this._onMove,this)}},_cancelClickPrevent:function o(){xt(document,"touchend",Et),xt(document,"touchend touchcancel",o)},_cancel:function(){clearTimeout(this._holdTimeout),xt(document,"touchend touchcancel contextmenu",this._cancel,this),xt(document,"touchmove",this._onMove,this)},_onMove:function(o){var l=o.touches[0];this._newPos=new W(l.clientX,l.clientY)},_isTapValid:function(){return this._newPos.distanceTo(this._startPos)<=this._map.options.tapTolerance},_simulateEvent:function(o,l){var u=new MouseEvent(o,{bubbles:!0,cancelable:!0,view:window,screenX:l.screenX,screenY:l.screenY,clientX:l.clientX,clientY:l.clientY});u._simulated=!0,l.target.dispatchEvent(u)}});ht.addInitHook("addHandler","tapHold",Jl),ht.mergeOptions({touchZoom:U.touch,bounceAtZoomLimits:!0});var th=ue.extend({addHooks:function(){J(this._map._container,"leaflet-touch-zoom"),K(this._map._container,"touchstart",this._onTouchStart,this)},removeHooks:function(){Ct(this._map._container,"leaflet-touch-zoom"),xt(this._map._container,"touchstart",this._onTouchStart,this)},_onTouchStart:function(o){var l=this._map;if(!(!o.touches||o.touches.length!==2||l._animatingZoom||this._zooming)){var u=l.mouseEventToContainerPoint(o.touches[0]),p=l.mouseEventToContainerPoint(o.touches[1]);this._centerPoint=l.getSize()._divideBy(2),this._startLatLng=l.containerPointToLatLng(this._centerPoint),l.options.touchZoom!=="center"&&(this._pinchStartLatLng=l.containerPointToLatLng(u.add(p)._divideBy(2))),this._startDist=u.distanceTo(p),this._startZoom=l.getZoom(),this._moved=!1,this._zooming=!0,l._stop(),K(document,"touchmove",this._onTouchMove,this),K(document,"touchend touchcancel",this._onTouchEnd,this),Et(o)}},_onTouchMove:function(o){if(!(!o.touches||o.touches.length!==2||!this._zooming)){var l=this._map,u=l.mouseEventToContainerPoint(o.touches[0]),p=l.mouseEventToContainerPoint(o.touches[1]),g=u.distanceTo(p)/this._startDist;if(this._zoom=l.getScaleZoom(g,this._startZoom),!l.options.bounceAtZoomLimits&&(this._zoom<l.getMinZoom()&&g<1||this._zoom>l.getMaxZoom()&&g>1)&&(this._zoom=l._limitZoom(this._zoom)),l.options.touchZoom==="center"){if(this._center=this._startLatLng,g===1)return}else{var v=u._add(p)._divideBy(2)._subtract(this._centerPoint);if(g===1&&v.x===0&&v.y===0)return;this._center=l.unproject(l.project(this._pinchStartLatLng,this._zoom).subtract(v),this._zoom)}this._moved||(l._moveStart(!0,!1),this._moved=!0),j(this._animRequest);var M=s(l._move,l,this._center,this._zoom,{pinch:!0,round:!1},void 0);this._animRequest=N(M,this,!0),Et(o)}},_onTouchEnd:function(){if(!this._moved||!this._zooming){this._zooming=!1;return}this._zooming=!1,j(this._animRequest),xt(document,"touchmove",this._onTouchMove,this),xt(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))}});ht.addInitHook("addHandler","touchZoom",th),ht.BoxZoom=ql,ht.DoubleClickZoom=Xl,ht.Drag=$l,ht.Keyboard=Kl,ht.ScrollWheelZoom=Ql,ht.TapHold=Jl,ht.TouchZoom=th,n.Bounds=V,n.Browser=U,n.CRS=Ht,n.Canvas=Yl,n.Circle=Cr,n.CircleMarker=ns,n.Class=Y,n.Control=oe,n.DivIcon=Hl,n.DivOverlay=de,n.DomEvent=rf,n.DomUtil=sf,n.Draggable=Re,n.Evented=st,n.FeatureGroup=be,n.GeoJSON=Me,n.GridLayer=pn,n.Handler=ue,n.Icon=yi,n.ImageOverlay=ls,n.LatLng=ot,n.LatLngBounds=kt,n.Layer=re,n.LayerGroup=_i,n.LineUtil=vf,n.Map=ht,n.Marker=is,n.Mixin=ff,n.Path=Be,n.Point=W,n.PolyUtil=pf,n.Polygon=vi,n.Polyline=we,n.Popup=hs,n.PosAnimation=Ml,n.Projection=xf,n.Rectangle=Gl,n.Renderer=Le,n.SVG=gn,n.SVGOverlay=Wl,n.TileLayer=bi,n.Tooltip=cs,n.Transformation=tr,n.Util=q,n.VideoOverlay=Nl,n.bind=s,n.bounds=dt,n.canvas=jl,n.circle=Cf,n.circleMarker=Tf,n.control=un,n.divIcon=Bf,n.extend=e,n.featureGroup=Lf,n.geoJSON=Fl,n.geoJson=Df,n.gridLayer=Ff,n.icon=Pf,n.imageOverlay=If,n.latLng=X,n.latLngBounds=pt,n.layerGroup=Mf,n.map=af,n.marker=kf,n.point=E,n.polygon=Of,n.polyline=Sf,n.popup=zf,n.rectangle=Hf,n.setOptions=y,n.stamp=a,n.svg=Ul,n.svgOverlay=Ef,n.tileLayer=Zl,n.tooltip=Rf,n.transformation=nn,n.version=t,n.videoOverlay=Af;var Vf=window.L;n.noConflict=function(){return window.L=Vf,this},window.L=n})});var hh=zr((ps,lh)=>{(function(n,t){typeof ps=="object"&&typeof lh!="undefined"?t(ps):typeof define=="function"&&define.amd?define(["exports"],t):(n=n||self,t((n.Leaflet=n.Leaflet||{},n.Leaflet.markercluster={})))})(ps,function(n){"use strict";var t=L.MarkerClusterGroup=L.FeatureGroup.extend({options:{maxClusterRadius:80,iconCreateFunction:null,clusterPane:L.Marker.prototype.options.pane,spiderfyOnEveryZoom:!1,spiderfyOnMaxZoom:!0,showCoverageOnHover:!0,zoomToBoundsOnClick:!0,singleMarkerMode:!1,disableClusteringAtZoom:null,removeOutsideVisibleBounds:!0,animate:!0,animateAddingMarkers:!1,spiderfyShapePositions:null,spiderfyDistanceMultiplier:1,spiderLegPolylineOptions:{weight:1.5,color:"#222",opacity:.5},chunkedLoading:!1,chunkInterval:200,chunkDelay:50,chunkProgress:null,polygonOptions:{}},initialize:function(i){L.Util.setOptions(this,i),this.options.iconCreateFunction||(this.options.iconCreateFunction=this._defaultIconCreateFunction),this._featureGroup=L.featureGroup(),this._featureGroup.addEventParent(this),this._nonPointGroup=L.featureGroup(),this._nonPointGroup.addEventParent(this),this._inZoomAnimation=0,this._needsClustering=[],this._needsRemoving=[],this._currentShownBounds=null,this._queue=[],this._childMarkerEventHandlers={dragstart:this._childMarkerDragStart,move:this._childMarkerMoved,dragend:this._childMarkerDragEnd};var s=L.DomUtil.TRANSITION&&this.options.animate;L.extend(this,s?this._withAnimation:this._noAnimation),this._markerCluster=s?L.MarkerCluster:L.MarkerClusterNonAnimated},addLayer:function(i){if(i instanceof L.LayerGroup)return this.addLayers([i]);if(!i.getLatLng)return this._nonPointGroup.addLayer(i),this.fire("layeradd",{layer:i}),this;if(!this._map)return this._needsClustering.push(i),this.fire("layeradd",{layer:i}),this;if(this.hasLayer(i))return this;this._unspiderfy&&this._unspiderfy(),this._addLayer(i,this._maxZoom),this.fire("layeradd",{layer:i}),this._topClusterLevel._recalculateBounds(),this._refreshClustersIcons();var s=i,r=this._zoom;if(i.__parent)for(;s.__parent._zoom>=r;)s=s.__parent;return this._currentShownBounds.contains(s.getLatLng())&&(this.options.animateAddingMarkers?this._animationAddLayer(i,s):this._animationAddLayerNonAnimated(i,s)),this},removeLayer:function(i){return i instanceof L.LayerGroup?this.removeLayers([i]):i.getLatLng?this._map?i.__parent?(this._unspiderfy&&(this._unspiderfy(),this._unspiderfyLayer(i)),this._removeLayer(i,!0),this.fire("layerremove",{layer:i}),this._topClusterLevel._recalculateBounds(),this._refreshClustersIcons(),i.off(this._childMarkerEventHandlers,this),this._featureGroup.hasLayer(i)&&(this._featureGroup.removeLayer(i),i.clusterShow&&i.clusterShow()),this):this:(!this._arraySplice(this._needsClustering,i)&&this.hasLayer(i)&&this._needsRemoving.push({layer:i,latlng:i._latlng}),this.fire("layerremove",{layer:i}),this):(this._nonPointGroup.removeLayer(i),this.fire("layerremove",{layer:i}),this)},addLayers:function(i,s){if(!L.Util.isArray(i))return this.addLayer(i);var r=this._featureGroup,a=this._nonPointGroup,h=this.options.chunkedLoading,c=this.options.chunkInterval,d=this.options.chunkProgress,f=i.length,m=0,_=!0,y;if(this._map){var x=new Date().getTime(),b=L.bind(function(){var P=new Date().getTime();for(this._map&&this._unspiderfy&&this._unspiderfy();m<f;m++){if(h&&m%200===0){var C=new Date().getTime()-P;if(C>c)break}if(y=i[m],y instanceof L.LayerGroup){_&&(i=i.slice(),_=!1),this._extractNonGroupLayers(y,i),f=i.length;continue}if(!y.getLatLng){a.addLayer(y),s||this.fire("layeradd",{layer:y});continue}if(!this.hasLayer(y)&&(this._addLayer(y,this._maxZoom),s||this.fire("layeradd",{layer:y}),y.__parent&&y.__parent.getChildCount()===2)){var O=y.__parent.getAllChildMarkers(),I=O[0]===y?O[1]:O[0];r.removeLayer(I)}}d&&d(m,f,new Date().getTime()-x),m===f?(this._topClusterLevel._recalculateBounds(),this._refreshClustersIcons(),this._topClusterLevel._recursivelyAddChildrenToMap(null,this._zoom,this._currentShownBounds)):setTimeout(b,this.options.chunkDelay)},this);b()}else for(var w=this._needsClustering;m<f;m++){if(y=i[m],y instanceof L.LayerGroup){_&&(i=i.slice(),_=!1),this._extractNonGroupLayers(y,i),f=i.length;continue}if(!y.getLatLng){a.addLayer(y);continue}this.hasLayer(y)||w.push(y)}return this},removeLayers:function(i){var s,r,a=i.length,h=this._featureGroup,c=this._nonPointGroup,d=!0;if(!this._map){for(s=0;s<a;s++){if(r=i[s],r instanceof L.LayerGroup){d&&(i=i.slice(),d=!1),this._extractNonGroupLayers(r,i),a=i.length;continue}this._arraySplice(this._needsClustering,r),c.removeLayer(r),this.hasLayer(r)&&this._needsRemoving.push({layer:r,latlng:r._latlng}),this.fire("layerremove",{layer:r})}return this}if(this._unspiderfy){this._unspiderfy();var f=i.slice(),m=a;for(s=0;s<m;s++){if(r=f[s],r instanceof L.LayerGroup){this._extractNonGroupLayers(r,f),m=f.length;continue}this._unspiderfyLayer(r)}}for(s=0;s<a;s++){if(r=i[s],r instanceof L.LayerGroup){d&&(i=i.slice(),d=!1),this._extractNonGroupLayers(r,i),a=i.length;continue}if(!r.__parent){c.removeLayer(r),this.fire("layerremove",{layer:r});continue}this._removeLayer(r,!0,!0),this.fire("layerremove",{layer:r}),h.hasLayer(r)&&(h.removeLayer(r),r.clusterShow&&r.clusterShow())}return this._topClusterLevel._recalculateBounds(),this._refreshClustersIcons(),this._topClusterLevel._recursivelyAddChildrenToMap(null,this._zoom,this._currentShownBounds),this},clearLayers:function(){return this._map||(this._needsClustering=[],this._needsRemoving=[],delete this._gridClusters,delete this._gridUnclustered),this._noanimationUnspiderfy&&this._noanimationUnspiderfy(),this._featureGroup.clearLayers(),this._nonPointGroup.clearLayers(),this.eachLayer(function(i){i.off(this._childMarkerEventHandlers,this),delete i.__parent},this),this._map&&this._generateInitialClusters(),this},getBounds:function(){var i=new L.LatLngBounds;this._topClusterLevel&&i.extend(this._topClusterLevel._bounds);for(var s=this._needsClustering.length-1;s>=0;s--)i.extend(this._needsClustering[s].getLatLng());return i.extend(this._nonPointGroup.getBounds()),i},eachLayer:function(i,s){var r=this._needsClustering.slice(),a=this._needsRemoving,h,c,d;for(this._topClusterLevel&&this._topClusterLevel.getAllChildMarkers(r),c=r.length-1;c>=0;c--){for(h=!0,d=a.length-1;d>=0;d--)if(a[d].layer===r[c]){h=!1;break}h&&i.call(s,r[c])}this._nonPointGroup.eachLayer(i,s)},getLayers:function(){var i=[];return this.eachLayer(function(s){i.push(s)}),i},getLayer:function(i){var s=null;return i=parseInt(i,10),this.eachLayer(function(r){L.stamp(r)===i&&(s=r)}),s},hasLayer:function(i){if(!i)return!1;var s,r=this._needsClustering;for(s=r.length-1;s>=0;s--)if(r[s]===i)return!0;for(r=this._needsRemoving,s=r.length-1;s>=0;s--)if(r[s].layer===i)return!1;return!!(i.__parent&&i.__parent._group===this)||this._nonPointGroup.hasLayer(i)},zoomToShowLayer:function(i,s){var r=this._map;typeof s!="function"&&(s=function(){});var a=function(){(r.hasLayer(i)||r.hasLayer(i.__parent))&&!this._inZoomAnimation&&(this._map.off("moveend",a,this),this.off("animationend",a,this),r.hasLayer(i)?s():i.__parent._icon&&(this.once("spiderfied",s,this),i.__parent.spiderfy()))};i._icon&&this._map.getBounds().contains(i.getLatLng())?s():i.__parent._zoom<Math.round(this._map._zoom)?(this._map.on("moveend",a,this),this._map.panTo(i.getLatLng())):(this._map.on("moveend",a,this),this.on("animationend",a,this),i.__parent.zoomToBounds())},onAdd:function(i){this._map=i;var s,r,a;if(!isFinite(this._map.getMaxZoom()))throw"Map has no maxZoom specified";for(this._featureGroup.addTo(i),this._nonPointGroup.addTo(i),this._gridClusters||this._generateInitialClusters(),this._maxLat=i.options.crs.projection.MAX_LATITUDE,s=0,r=this._needsRemoving.length;s<r;s++)a=this._needsRemoving[s],a.newlatlng=a.layer._latlng,a.layer._latlng=a.latlng;for(s=0,r=this._needsRemoving.length;s<r;s++)a=this._needsRemoving[s],this._removeLayer(a.layer,!0),a.layer._latlng=a.newlatlng;this._needsRemoving=[],this._zoom=Math.round(this._map._zoom),this._currentShownBounds=this._getExpandedVisibleBounds(),this._map.on("zoomend",this._zoomEnd,this),this._map.on("moveend",this._moveEnd,this),this._spiderfierOnAdd&&this._spiderfierOnAdd(),this._bindEvents(),r=this._needsClustering,this._needsClustering=[],this.addLayers(r,!0)},onRemove:function(i){i.off("zoomend",this._zoomEnd,this),i.off("moveend",this._moveEnd,this),this._unbindEvents(),this._map._mapPane.className=this._map._mapPane.className.replace(" leaflet-cluster-anim",""),this._spiderfierOnRemove&&this._spiderfierOnRemove(),delete this._maxLat,this._hideCoverage(),this._featureGroup.remove(),this._nonPointGroup.remove(),this._featureGroup.clearLayers(),this._map=null},getVisibleParent:function(i){for(var s=i;s&&!s._icon;)s=s.__parent;return s||null},_arraySplice:function(i,s){for(var r=i.length-1;r>=0;r--)if(i[r]===s)return i.splice(r,1),!0},_removeFromGridUnclustered:function(i,s){for(var r=this._map,a=this._gridUnclustered,h=Math.floor(this._map.getMinZoom());s>=h&&a[s].removeObject(i,r.project(i.getLatLng(),s));s--);},_childMarkerDragStart:function(i){i.target.__dragStart=i.target._latlng},_childMarkerMoved:function(i){if(!this._ignoreMove&&!i.target.__dragStart){var s=i.target._popup&&i.target._popup.isOpen();this._moveChild(i.target,i.oldLatLng,i.latlng),s&&i.target.openPopup()}},_moveChild:function(i,s,r){i._latlng=s,this.removeLayer(i),i._latlng=r,this.addLayer(i)},_childMarkerDragEnd:function(i){var s=i.target.__dragStart;delete i.target.__dragStart,s&&this._moveChild(i.target,s,i.target._latlng)},_removeLayer:function(i,s,r){var a=this._gridClusters,h=this._gridUnclustered,c=this._featureGroup,d=this._map,f=Math.floor(this._map.getMinZoom());s&&this._removeFromGridUnclustered(i,this._maxZoom);var m=i.__parent,_=m._markers,y;for(this._arraySplice(_,i);m&&(m._childCount--,m._boundsNeedUpdate=!0,!(m._zoom<f));)s&&m._childCount<=1?(y=m._markers[0]===i?m._markers[1]:m._markers[0],a[m._zoom].removeObject(m,d.project(m._cLatLng,m._zoom)),h[m._zoom].addObject(y,d.project(y.getLatLng(),m._zoom)),this._arraySplice(m.__parent._childClusters,m),m.__parent._markers.push(y),y.__parent=m.__parent,m._icon&&(c.removeLayer(m),r||c.addLayer(y))):m._iconNeedsUpdate=!0,m=m.__parent;delete i.__parent},_isOrIsParent:function(i,s){for(;s;){if(i===s)return!0;s=s.parentNode}return!1},fire:function(i,s,r){if(s&&s.layer instanceof L.MarkerCluster){if(s.originalEvent&&this._isOrIsParent(s.layer._icon,s.originalEvent.relatedTarget))return;i="cluster"+i}L.FeatureGroup.prototype.fire.call(this,i,s,r)},listens:function(i,s){return L.FeatureGroup.prototype.listens.call(this,i,s)||L.FeatureGroup.prototype.listens.call(this,"cluster"+i,s)},_defaultIconCreateFunction:function(i){var s=i.getChildCount(),r=" marker-cluster-";return s<10?r+="small":s<100?r+="medium":r+="large",new L.DivIcon({html:"<div><span>"+s+"</span></div>",className:"marker-cluster"+r,iconSize:new L.Point(40,40)})},_bindEvents:function(){var i=this._map,s=this.options.spiderfyOnMaxZoom,r=this.options.showCoverageOnHover,a=this.options.zoomToBoundsOnClick,h=this.options.spiderfyOnEveryZoom;(s||a||h)&&this.on("clusterclick clusterkeypress",this._zoomOrSpiderfy,this),r&&(this.on("clustermouseover",this._showCoverage,this),this.on("clustermouseout",this._hideCoverage,this),i.on("zoomend",this._hideCoverage,this))},_zoomOrSpiderfy:function(i){var s=i.layer,r=s;if(!(i.type==="clusterkeypress"&&i.originalEvent&&i.originalEvent.keyCode!==13)){for(;r._childClusters.length===1;)r=r._childClusters[0];r._zoom===this._maxZoom&&r._childCount===s._childCount&&this.options.spiderfyOnMaxZoom?s.spiderfy():this.options.zoomToBoundsOnClick&&s.zoomToBounds(),this.options.spiderfyOnEveryZoom&&s.spiderfy(),i.originalEvent&&i.originalEvent.keyCode===13&&this._map._container.focus()}},_showCoverage:function(i){var s=this._map;this._inZoomAnimation||(this._shownPolygon&&s.removeLayer(this._shownPolygon),i.layer.getChildCount()>2&&i.layer!==this._spiderfied&&(this._shownPolygon=new L.Polygon(i.layer.getConvexHull(),this.options.polygonOptions),s.addLayer(this._shownPolygon)))},_hideCoverage:function(){this._shownPolygon&&(this._map.removeLayer(this._shownPolygon),this._shownPolygon=null)},_unbindEvents:function(){var i=this.options.spiderfyOnMaxZoom,s=this.options.showCoverageOnHover,r=this.options.zoomToBoundsOnClick,a=this.options.spiderfyOnEveryZoom,h=this._map;(i||r||a)&&this.off("clusterclick clusterkeypress",this._zoomOrSpiderfy,this),s&&(this.off("clustermouseover",this._showCoverage,this),this.off("clustermouseout",this._hideCoverage,this),h.off("zoomend",this._hideCoverage,this))},_zoomEnd:function(){this._map&&(this._mergeSplitClusters(),this._zoom=Math.round(this._map._zoom),this._currentShownBounds=this._getExpandedVisibleBounds())},_moveEnd:function(){if(!this._inZoomAnimation){var i=this._getExpandedVisibleBounds();this._topClusterLevel._recursivelyRemoveChildrenFromMap(this._currentShownBounds,Math.floor(this._map.getMinZoom()),this._zoom,i),this._topClusterLevel._recursivelyAddChildrenToMap(null,Math.round(this._map._zoom),i),this._currentShownBounds=i}},_generateInitialClusters:function(){var i=Math.ceil(this._map.getMaxZoom()),s=Math.floor(this._map.getMinZoom()),r=this.options.maxClusterRadius,a=r;typeof r!="function"&&(a=function(){return r}),this.options.disableClusteringAtZoom!==null&&(i=this.options.disableClusteringAtZoom-1),this._maxZoom=i,this._gridClusters={},this._gridUnclustered={};for(var h=i;h>=s;h--)this._gridClusters[h]=new L.DistanceGrid(a(h)),this._gridUnclustered[h]=new L.DistanceGrid(a(h));this._topClusterLevel=new this._markerCluster(this,s-1)},_addLayer:function(i,s){var r=this._gridClusters,a=this._gridUnclustered,h=Math.floor(this._map.getMinZoom()),c,d;for(this.options.singleMarkerMode&&this._overrideMarkerIcon(i),i.on(this._childMarkerEventHandlers,this);s>=h;s--){c=this._map.project(i.getLatLng(),s);var f=r[s].getNearObject(c);if(f){f._addChild(i),i.__parent=f;return}if(f=a[s].getNearObject(c),f){var m=f.__parent;m&&this._removeLayer(f,!1);var _=new this._markerCluster(this,s,f,i);r[s].addObject(_,this._map.project(_._cLatLng,s)),f.__parent=_,i.__parent=_;var y=_;for(d=s-1;d>m._zoom;d--)y=new this._markerCluster(this,d,y),r[d].addObject(y,this._map.project(f.getLatLng(),d));m._addChild(y),this._removeFromGridUnclustered(f,s);return}a[s].addObject(i,c)}this._topClusterLevel._addChild(i),i.__parent=this._topClusterLevel},_refreshClustersIcons:function(){this._featureGroup.eachLayer(function(i){i instanceof L.MarkerCluster&&i._iconNeedsUpdate&&i._updateIcon()})},_enqueue:function(i){this._queue.push(i),this._queueTimeout||(this._queueTimeout=setTimeout(L.bind(this._processQueue,this),300))},_processQueue:function(){for(var i=0;i<this._queue.length;i++)this._queue[i].call(this);this._queue.length=0,clearTimeout(this._queueTimeout),this._queueTimeout=null},_mergeSplitClusters:function(){var i=Math.round(this._map._zoom);this._processQueue(),this._zoom<i&&this._currentShownBounds.intersects(this._getExpandedVisibleBounds())?(this._animationStart(),this._topClusterLevel._recursivelyRemoveChildrenFromMap(this._currentShownBounds,Math.floor(this._map.getMinZoom()),this._zoom,this._getExpandedVisibleBounds()),this._animationZoomIn(this._zoom,i)):this._zoom>i?(this._animationStart(),this._animationZoomOut(this._zoom,i)):this._moveEnd()},_getExpandedVisibleBounds:function(){if(this.options.removeOutsideVisibleBounds){if(L.Browser.mobile)return this._checkBoundsMaxLat(this._map.getBounds())}else return this._mapBoundsInfinite;return this._checkBoundsMaxLat(this._map.getBounds().pad(1))},_checkBoundsMaxLat:function(i){var s=this._maxLat;return s!==void 0&&(i.getNorth()>=s&&(i._northEast.lat=1/0),i.getSouth()<=-s&&(i._southWest.lat=-1/0)),i},_animationAddLayerNonAnimated:function(i,s){if(s===i)this._featureGroup.addLayer(i);else if(s._childCount===2){s._addToMap();var r=s.getAllChildMarkers();this._featureGroup.removeLayer(r[0]),this._featureGroup.removeLayer(r[1])}else s._updateIcon()},_extractNonGroupLayers:function(i,s){var r=i.getLayers(),a=0,h;for(s=s||[];a<r.length;a++){if(h=r[a],h instanceof L.LayerGroup){this._extractNonGroupLayers(h,s);continue}s.push(h)}return s},_overrideMarkerIcon:function(i){var s=i.options.icon=this.options.iconCreateFunction({getChildCount:function(){return 1},getAllChildMarkers:function(){return[i]}});return s}});L.MarkerClusterGroup.include({_mapBoundsInfinite:new L.LatLngBounds(new L.LatLng(-1/0,-1/0),new L.LatLng(1/0,1/0))}),L.MarkerClusterGroup.include({_noAnimation:{_animationStart:function(){},_animationZoomIn:function(i,s){this._topClusterLevel._recursivelyRemoveChildrenFromMap(this._currentShownBounds,Math.floor(this._map.getMinZoom()),i),this._topClusterLevel._recursivelyAddChildrenToMap(null,s,this._getExpandedVisibleBounds()),this.fire("animationend")},_animationZoomOut:function(i,s){this._topClusterLevel._recursivelyRemoveChildrenFromMap(this._currentShownBounds,Math.floor(this._map.getMinZoom()),i),this._topClusterLevel._recursivelyAddChildrenToMap(null,s,this._getExpandedVisibleBounds()),this.fire("animationend")},_animationAddLayer:function(i,s){this._animationAddLayerNonAnimated(i,s)}},_withAnimation:{_animationStart:function(){this._map._mapPane.className+=" leaflet-cluster-anim",this._inZoomAnimation++},_animationZoomIn:function(i,s){var r=this._getExpandedVisibleBounds(),a=this._featureGroup,h=Math.floor(this._map.getMinZoom()),c;this._ignoreMove=!0,this._topClusterLevel._recursively(r,i,h,function(d){var f=d._latlng,m=d._markers,_;for(r.contains(f)||(f=null),d._isSingleParent()&&i+1===s?(a.removeLayer(d),d._recursivelyAddChildrenToMap(null,s,r)):(d.clusterHide(),d._recursivelyAddChildrenToMap(f,s,r)),c=m.length-1;c>=0;c--)_=m[c],r.contains(_._latlng)||a.removeLayer(_)}),this._forceLayout(),this._topClusterLevel._recursivelyBecomeVisible(r,s),a.eachLayer(function(d){!(d instanceof L.MarkerCluster)&&d._icon&&d.clusterShow()}),this._topClusterLevel._recursively(r,i,s,function(d){d._recursivelyRestoreChildPositions(s)}),this._ignoreMove=!1,this._enqueue(function(){this._topClusterLevel._recursively(r,i,h,function(d){a.removeLayer(d),d.clusterShow()}),this._animationEnd()})},_animationZoomOut:function(i,s){this._animationZoomOutSingle(this._topClusterLevel,i-1,s),this._topClusterLevel._recursivelyAddChildrenToMap(null,s,this._getExpandedVisibleBounds()),this._topClusterLevel._recursivelyRemoveChildrenFromMap(this._currentShownBounds,Math.floor(this._map.getMinZoom()),i,this._getExpandedVisibleBounds())},_animationAddLayer:function(i,s){var r=this,a=this._featureGroup;a.addLayer(i),s!==i&&(s._childCount>2?(s._updateIcon(),this._forceLayout(),this._animationStart(),i._setPos(this._map.latLngToLayerPoint(s.getLatLng())),i.clusterHide(),this._enqueue(function(){a.removeLayer(i),i.clusterShow(),r._animationEnd()})):(this._forceLayout(),r._animationStart(),r._animationZoomOutSingle(s,this._map.getMaxZoom(),this._zoom)))}},_animationZoomOutSingle:function(i,s,r){var a=this._getExpandedVisibleBounds(),h=Math.floor(this._map.getMinZoom());i._recursivelyAnimateChildrenInAndAddSelfToMap(a,h,s+1,r);var c=this;this._forceLayout(),i._recursivelyBecomeVisible(a,r),this._enqueue(function(){if(i._childCount===1){var d=i._markers[0];this._ignoreMove=!0,d.setLatLng(d.getLatLng()),this._ignoreMove=!1,d.clusterShow&&d.clusterShow()}else i._recursively(a,r,h,function(f){f._recursivelyRemoveChildrenFromMap(a,h,s+1)});c._animationEnd()})},_animationEnd:function(){this._map&&(this._map._mapPane.className=this._map._mapPane.className.replace(" leaflet-cluster-anim","")),this._inZoomAnimation--,this.fire("animationend")},_forceLayout:function(){L.Util.falseFn(document.body.offsetWidth)}}),L.markerClusterGroup=function(i){return new L.MarkerClusterGroup(i)};var e=L.MarkerCluster=L.Marker.extend({options:L.Icon.prototype.options,initialize:function(i,s,r,a){L.Marker.prototype.initialize.call(this,r?r._cLatLng||r.getLatLng():new L.LatLng(0,0),{icon:this,pane:i.options.clusterPane}),this._group=i,this._zoom=s,this._markers=[],this._childClusters=[],this._childCount=0,this._iconNeedsUpdate=!0,this._boundsNeedUpdate=!0,this._bounds=new L.LatLngBounds,r&&this._addChild(r),a&&this._addChild(a)},getAllChildMarkers:function(i,s){i=i||[];for(var r=this._childClusters.length-1;r>=0;r--)this._childClusters[r].getAllChildMarkers(i,s);for(var a=this._markers.length-1;a>=0;a--)s&&this._markers[a].__dragStart||i.push(this._markers[a]);return i},getChildCount:function(){return this._childCount},zoomToBounds:function(i){for(var s=this._childClusters.slice(),r=this._group._map,a=r.getBoundsZoom(this._bounds),h=this._zoom+1,c=r.getZoom(),d;s.length>0&&a>h;){h++;var f=[];for(d=0;d<s.length;d++)f=f.concat(s[d]._childClusters);s=f}a>h?this._group._map.setView(this._latlng,h):a<=c?this._group._map.setView(this._latlng,c+1):this._group._map.fitBounds(this._bounds,i)},getBounds:function(){var i=new L.LatLngBounds;return i.extend(this._bounds),i},_updateIcon:function(){this._iconNeedsUpdate=!0,this._icon&&this.setIcon(this)},createIcon:function(){return this._iconNeedsUpdate&&(this._iconObj=this._group.options.iconCreateFunction(this),this._iconNeedsUpdate=!1),this._iconObj.createIcon()},createShadow:function(){return this._iconObj.createShadow()},_addChild:function(i,s){this._iconNeedsUpdate=!0,this._boundsNeedUpdate=!0,this._setClusterCenter(i),i instanceof L.MarkerCluster?(s||(this._childClusters.push(i),i.__parent=this),this._childCount+=i._childCount):(s||this._markers.push(i),this._childCount++),this.__parent&&this.__parent._addChild(i,!0)},_setClusterCenter:function(i){this._cLatLng||(this._cLatLng=i._cLatLng||i._latlng)},_resetBounds:function(){var i=this._bounds;i._southWest&&(i._southWest.lat=1/0,i._southWest.lng=1/0),i._northEast&&(i._northEast.lat=-1/0,i._northEast.lng=-1/0)},_recalculateBounds:function(){var i=this._markers,s=this._childClusters,r=0,a=0,h=this._childCount,c,d,f,m;if(h!==0){for(this._resetBounds(),c=0;c<i.length;c++)f=i[c]._latlng,this._bounds.extend(f),r+=f.lat,a+=f.lng;for(c=0;c<s.length;c++)d=s[c],d._boundsNeedUpdate&&d._recalculateBounds(),this._bounds.extend(d._bounds),f=d._wLatLng,m=d._childCount,r+=f.lat*m,a+=f.lng*m;this._latlng=this._wLatLng=new L.LatLng(r/h,a/h),this._boundsNeedUpdate=!1}},_addToMap:function(i){i&&(this._backupLatlng=this._latlng,this.setLatLng(i)),this._group._featureGroup.addLayer(this)},_recursivelyAnimateChildrenIn:function(i,s,r){this._recursively(i,this._group._map.getMinZoom(),r-1,function(a){var h=a._markers,c,d;for(c=h.length-1;c>=0;c--)d=h[c],d._icon&&(d._setPos(s),d.clusterHide())},function(a){var h=a._childClusters,c,d;for(c=h.length-1;c>=0;c--)d=h[c],d._icon&&(d._setPos(s),d.clusterHide())})},_recursivelyAnimateChildrenInAndAddSelfToMap:function(i,s,r,a){this._recursively(i,a,s,function(h){h._recursivelyAnimateChildrenIn(i,h._group._map.latLngToLayerPoint(h.getLatLng()).round(),r),h._isSingleParent()&&r-1===a?(h.clusterShow(),h._recursivelyRemoveChildrenFromMap(i,s,r)):h.clusterHide(),h._addToMap()})},_recursivelyBecomeVisible:function(i,s){this._recursively(i,this._group._map.getMinZoom(),s,null,function(r){r.clusterShow()})},_recursivelyAddChildrenToMap:function(i,s,r){this._recursively(r,this._group._map.getMinZoom()-1,s,function(a){if(s!==a._zoom)for(var h=a._markers.length-1;h>=0;h--){var c=a._markers[h];r.contains(c._latlng)&&(i&&(c._backupLatlng=c.getLatLng(),c.setLatLng(i),c.clusterHide&&c.clusterHide()),a._group._featureGroup.addLayer(c))}},function(a){a._addToMap(i)})},_recursivelyRestoreChildPositions:function(i){for(var s=this._markers.length-1;s>=0;s--){var r=this._markers[s];r._backupLatlng&&(r.setLatLng(r._backupLatlng),delete r._backupLatlng)}if(i-1===this._zoom)for(var a=this._childClusters.length-1;a>=0;a--)this._childClusters[a]._restorePosition();else for(var h=this._childClusters.length-1;h>=0;h--)this._childClusters[h]._recursivelyRestoreChildPositions(i)},_restorePosition:function(){this._backupLatlng&&(this.setLatLng(this._backupLatlng),delete this._backupLatlng)},_recursivelyRemoveChildrenFromMap:function(i,s,r,a){var h,c;this._recursively(i,s-1,r-1,function(d){for(c=d._markers.length-1;c>=0;c--)h=d._markers[c],(!a||!a.contains(h._latlng))&&(d._group._featureGroup.removeLayer(h),h.clusterShow&&h.clusterShow())},function(d){for(c=d._childClusters.length-1;c>=0;c--)h=d._childClusters[c],(!a||!a.contains(h._latlng))&&(d._group._featureGroup.removeLayer(h),h.clusterShow&&h.clusterShow())})},_recursively:function(i,s,r,a,h){var c=this._childClusters,d=this._zoom,f,m;if(s<=d&&(a&&a(this),h&&d===r&&h(this)),d<s||d<r)for(f=c.length-1;f>=0;f--)m=c[f],m._boundsNeedUpdate&&m._recalculateBounds(),i.intersects(m._bounds)&&m._recursively(i,s,r,a,h)},_isSingleParent:function(){return this._childClusters.length>0&&this._childClusters[0]._childCount===this._childCount}});L.Marker.include({clusterHide:function(){var i=this.options.opacity;return this.setOpacity(0),this.options.opacity=i,this},clusterShow:function(){return this.setOpacity(this.options.opacity)}}),L.DistanceGrid=function(i){this._cellSize=i,this._sqCellSize=i*i,this._grid={},this._objectPoint={}},L.DistanceGrid.prototype={addObject:function(i,s){var r=this._getCoord(s.x),a=this._getCoord(s.y),h=this._grid,c=h[a]=h[a]||{},d=c[r]=c[r]||[],f=L.Util.stamp(i);this._objectPoint[f]=s,d.push(i)},updateObject:function(i,s){this.removeObject(i),this.addObject(i,s)},removeObject:function(i,s){var r=this._getCoord(s.x),a=this._getCoord(s.y),h=this._grid,c=h[a]=h[a]||{},d=c[r]=c[r]||[],f,m;for(delete this._objectPoint[L.Util.stamp(i)],f=0,m=d.length;f<m;f++)if(d[f]===i)return d.splice(f,1),m===1&&delete c[r],!0},eachObject:function(i,s){var r,a,h,c,d,f,m,_=this._grid;for(r in _){d=_[r];for(a in d)for(f=d[a],h=0,c=f.length;h<c;h++)m=i.call(s,f[h]),m&&(h--,c--)}},getNearObject:function(i){var s=this._getCoord(i.x),r=this._getCoord(i.y),a,h,c,d,f,m,_,y,x=this._objectPoint,b=this._sqCellSize,w=null;for(a=r-1;a<=r+1;a++)if(d=this._grid[a],d){for(h=s-1;h<=s+1;h++)if(f=d[h],f)for(c=0,m=f.length;c<m;c++)_=f[c],y=this._sqDist(x[L.Util.stamp(_)],i),(y<b||y<=b&&w===null)&&(b=y,w=_)}return w},_getCoord:function(i){var s=Math.floor(i/this._cellSize);return isFinite(s)?s:i},_sqDist:function(i,s){var r=s.x-i.x,a=s.y-i.y;return r*r+a*a}},function(){L.QuickHull={getDistant:function(i,s){var r=s[1].lat-s[0].lat,a=s[0].lng-s[1].lng;return a*(i.lat-s[0].lat)+r*(i.lng-s[0].lng)},findMostDistantPointFromBaseLine:function(i,s){var r=0,a=null,h=[],c,d,f;for(c=s.length-1;c>=0;c--){if(d=s[c],f=this.getDistant(d,i),f>0)h.push(d);else continue;f>r&&(r=f,a=d)}return{maxPoint:a,newPoints:h}},buildConvexHull:function(i,s){var r=[],a=this.findMostDistantPointFromBaseLine(i,s);return a.maxPoint?(r=r.concat(this.buildConvexHull([i[0],a.maxPoint],a.newPoints)),r=r.concat(this.buildConvexHull([a.maxPoint,i[1]],a.newPoints)),r):[i[0]]},getConvexHull:function(i){var s=!1,r=!1,a=!1,h=!1,c=null,d=null,f=null,m=null,_=null,y=null,x;for(x=i.length-1;x>=0;x--){var b=i[x];(s===!1||b.lat>s)&&(c=b,s=b.lat),(r===!1||b.lat<r)&&(d=b,r=b.lat),(a===!1||b.lng>a)&&(f=b,a=b.lng),(h===!1||b.lng<h)&&(m=b,h=b.lng)}r!==s?(y=d,_=c):(y=m,_=f);var w=[].concat(this.buildConvexHull([y,_],i),this.buildConvexHull([_,y],i));return w}}}(),L.MarkerCluster.include({getConvexHull:function(){var i=this.getAllChildMarkers(),s=[],r,a;for(a=i.length-1;a>=0;a--)r=i[a].getLatLng(),s.push(r);return L.QuickHull.getConvexHull(s)}}),L.MarkerCluster.include({_2PI:Math.PI*2,_circleFootSeparation:25,_circleStartAngle:0,_spiralFootSeparation:28,_spiralLengthStart:11,_spiralLengthFactor:5,_circleSpiralSwitchover:9,spiderfy:function(){if(!(this._group._spiderfied===this||this._group._inZoomAnimation)){var i=this.getAllChildMarkers(null,!0),s=this._group,r=s._map,a=r.latLngToLayerPoint(this._latlng),h;this._group._unspiderfy(),this._group._spiderfied=this,this._group.options.spiderfyShapePositions?h=this._group.options.spiderfyShapePositions(i.length,a):i.length>=this._circleSpiralSwitchover?h=this._generatePointsSpiral(i.length,a):(a.y+=10,h=this._generatePointsCircle(i.length,a)),this._animationSpiderfy(i,h)}},unspiderfy:function(i){this._group._inZoomAnimation||(this._animationUnspiderfy(i),this._group._spiderfied=null)},_generatePointsCircle:function(i,s){var r=this._group.options.spiderfyDistanceMultiplier*this._circleFootSeparation*(2+i),a=r/this._2PI,h=this._2PI/i,c=[],d,f;for(a=Math.max(a,35),c.length=i,d=0;d<i;d++)f=this._circleStartAngle+d*h,c[d]=new L.Point(s.x+a*Math.cos(f),s.y+a*Math.sin(f))._round();return c},_generatePointsSpiral:function(i,s){var r=this._group.options.spiderfyDistanceMultiplier,a=r*this._spiralLengthStart,h=r*this._spiralFootSeparation,c=r*this._spiralLengthFactor*this._2PI,d=0,f=[],m;for(f.length=i,m=i;m>=0;m--)m<i&&(f[m]=new L.Point(s.x+a*Math.cos(d),s.y+a*Math.sin(d))._round()),d+=h/a+m*5e-4,a+=c/d;return f},_noanimationUnspiderfy:function(){var i=this._group,s=i._map,r=i._featureGroup,a=this.getAllChildMarkers(null,!0),h,c;for(i._ignoreMove=!0,this.setOpacity(1),c=a.length-1;c>=0;c--)h=a[c],r.removeLayer(h),h._preSpiderfyLatlng&&(h.setLatLng(h._preSpiderfyLatlng),delete h._preSpiderfyLatlng),h.setZIndexOffset&&h.setZIndexOffset(0),h._spiderLeg&&(s.removeLayer(h._spiderLeg),delete h._spiderLeg);i.fire("unspiderfied",{cluster:this,markers:a}),i._ignoreMove=!1,i._spiderfied=null}}),L.MarkerClusterNonAnimated=L.MarkerCluster.extend({_animationSpiderfy:function(i,s){var r=this._group,a=r._map,h=r._featureGroup,c=this._group.options.spiderLegPolylineOptions,d,f,m,_;for(r._ignoreMove=!0,d=0;d<i.length;d++)_=a.layerPointToLatLng(s[d]),f=i[d],m=new L.Polyline([this._latlng,_],c),a.addLayer(m),f._spiderLeg=m,f._preSpiderfyLatlng=f._latlng,f.setLatLng(_),f.setZIndexOffset&&f.setZIndexOffset(1e6),h.addLayer(f);this.setOpacity(.3),r._ignoreMove=!1,r.fire("spiderfied",{cluster:this,markers:i})},_animationUnspiderfy:function(){this._noanimationUnspiderfy()}}),L.MarkerCluster.include({_animationSpiderfy:function(i,s){var r=this,a=this._group,h=a._map,c=a._featureGroup,d=this._latlng,f=h.latLngToLayerPoint(d),m=L.Path.SVG,_=L.extend({},this._group.options.spiderLegPolylineOptions),y=_.opacity,x,b,w,P,C,O;for(y===void 0&&(y=L.MarkerClusterGroup.prototype.options.spiderLegPolylineOptions.opacity),m?(_.opacity=0,_.className=(_.className||"")+" leaflet-cluster-spider-leg"):_.opacity=y,a._ignoreMove=!0,x=0;x<i.length;x++)b=i[x],O=h.layerPointToLatLng(s[x]),w=new L.Polyline([d,O],_),h.addLayer(w),b._spiderLeg=w,m&&(P=w._path,C=P.getTotalLength()+.1,P.style.strokeDasharray=C,P.style.strokeDashoffset=C),b.setZIndexOffset&&b.setZIndexOffset(1e6),b.clusterHide&&b.clusterHide(),c.addLayer(b),b._setPos&&b._setPos(f);for(a._forceLayout(),a._animationStart(),x=i.length-1;x>=0;x--)O=h.layerPointToLatLng(s[x]),b=i[x],b._preSpiderfyLatlng=b._latlng,b.setLatLng(O),b.clusterShow&&b.clusterShow(),m&&(w=b._spiderLeg,P=w._path,P.style.strokeDashoffset=0,w.setStyle({opacity:y}));this.setOpacity(.3),a._ignoreMove=!1,setTimeout(function(){a._animationEnd(),a.fire("spiderfied",{cluster:r,markers:i})},200)},_animationUnspiderfy:function(i){var s=this,r=this._group,a=r._map,h=r._featureGroup,c=i?a._latLngToNewLayerPoint(this._latlng,i.zoom,i.center):a.latLngToLayerPoint(this._latlng),d=this.getAllChildMarkers(null,!0),f=L.Path.SVG,m,_,y,x,b,w;for(r._ignoreMove=!0,r._animationStart(),this.setOpacity(1),_=d.length-1;_>=0;_--)m=d[_],m._preSpiderfyLatlng&&(m.closePopup(),m.setLatLng(m._preSpiderfyLatlng),delete m._preSpiderfyLatlng,w=!0,m._setPos&&(m._setPos(c),w=!1),m.clusterHide&&(m.clusterHide(),w=!1),w&&h.removeLayer(m),f&&(y=m._spiderLeg,x=y._path,b=x.getTotalLength()+.1,x.style.strokeDashoffset=b,y.setStyle({opacity:0})));r._ignoreMove=!1,setTimeout(function(){var P=0;for(_=d.length-1;_>=0;_--)m=d[_],m._spiderLeg&&P++;for(_=d.length-1;_>=0;_--)m=d[_],m._spiderLeg&&(m.clusterShow&&m.clusterShow(),m.setZIndexOffset&&m.setZIndexOffset(0),P>1&&h.removeLayer(m),a.removeLayer(m._spiderLeg),delete m._spiderLeg);r._animationEnd(),r.fire("unspiderfied",{cluster:s,markers:d})},200)}}),L.MarkerClusterGroup.include({_spiderfied:null,unspiderfy:function(){this._unspiderfy.apply(this,arguments)},_spiderfierOnAdd:function(){this._map.on("click",this._unspiderfyWrapper,this),this._map.options.zoomAnimation&&this._map.on("zoomstart",this._unspiderfyZoomStart,this),this._map.on("zoomend",this._noanimationUnspiderfy,this),L.Browser.touch||this._map.getRenderer(this)},_spiderfierOnRemove:function(){this._map.off("click",this._unspiderfyWrapper,this),this._map.off("zoomstart",this._unspiderfyZoomStart,this),this._map.off("zoomanim",this._unspiderfyZoomAnim,this),this._map.off("zoomend",this._noanimationUnspiderfy,this),this._noanimationUnspiderfy()},_unspiderfyZoomStart:function(){this._map&&this._map.on("zoomanim",this._unspiderfyZoomAnim,this)},_unspiderfyZoomAnim:function(i){L.DomUtil.hasClass(this._map._mapPane,"leaflet-touching")||(this._map.off("zoomanim",this._unspiderfyZoomAnim,this),this._unspiderfy(i))},_unspiderfyWrapper:function(){this._unspiderfy()},_unspiderfy:function(i){this._spiderfied&&this._spiderfied.unspiderfy(i)},_noanimationUnspiderfy:function(){this._spiderfied&&this._spiderfied._noanimationUnspiderfy()},_unspiderfyLayer:function(i){i._spiderLeg&&(this._featureGroup.removeLayer(i),i.clusterShow&&i.clusterShow(),i.setZIndexOffset&&i.setZIndexOffset(0),this._map.removeLayer(i._spiderLeg),delete i._spiderLeg)}}),L.MarkerClusterGroup.include({refreshClusters:function(i){return i?i instanceof L.MarkerClusterGroup?i=i._topClusterLevel.getAllChildMarkers():i instanceof L.LayerGroup?i=i._layers:i instanceof L.MarkerCluster?i=i.getAllChildMarkers():i instanceof L.Marker&&(i=[i]):i=this._topClusterLevel.getAllChildMarkers(),this._flagParentsIconsNeedUpdate(i),this._refreshClustersIcons(),this.options.singleMarkerMode&&this._refreshSingleMarkerModeMarkers(i),this},_flagParentsIconsNeedUpdate:function(i){var s,r;for(s in i)for(r=i[s].__parent;r;)r._iconNeedsUpdate=!0,r=r.__parent},_refreshSingleMarkerModeMarkers:function(i){var s,r;for(s in i)r=i[s],this.hasLayer(r)&&r.setIcon(this._overrideMarkerIcon(r))}}),L.Marker.include({refreshIconOptions:function(i,s){var r=this.options.icon;return L.setOptions(r,i),this.setIcon(r),s&&this.__parent&&this.__parent._group.refreshClusters(this),this}}),n.MarkerClusterGroup=t,n.MarkerCluster=e,Object.defineProperty(n,"__esModule",{value:!0})})});var Pd=zr((Ld,Qo)=>{(function(n,t){"use strict";function e(){i.width=n.innerWidth,i.height=5*d.barThickness;var m=i.getContext("2d");m.shadowBlur=d.shadowBlur,m.shadowColor=d.shadowColor;var _,y=m.createLinearGradient(0,0,i.width,0);for(_ in d.barColors)y.addColorStop(_,d.barColors[_]);m.lineWidth=d.barThickness,m.beginPath(),m.moveTo(0,d.barThickness/2),m.lineTo(Math.ceil(s*i.width),d.barThickness/2),m.strokeStyle=y,m.stroke()}var i,s,r,a=null,h=null,c=null,d={autoRun:!0,barThickness:3,barColors:{0:"rgba(26, 188, 156, .9)",".25":"rgba(52, 152, 219, .9)",".50":"rgba(241, 196, 15, .9)",".75":"rgba(230, 126, 34, .9)","1.0":"rgba(211, 84, 0, .9)"},shadowBlur:10,shadowColor:"rgba(0, 0, 0, .6)",className:null},f={config:function(m){for(var _ in m)d.hasOwnProperty(_)&&(d[_]=m[_])},show:function(m){var _,y;r||(m?c=c||setTimeout(()=>f.show(),m):(r=!0,h!==null&&n.cancelAnimationFrame(h),i||((y=(i=t.createElement("canvas")).style).position="fixed",y.top=y.left=y.right=y.margin=y.padding=0,y.zIndex=100001,y.display="none",d.className&&i.classList.add(d.className),_="resize",m=e,(y=n).addEventListener?y.addEventListener(_,m,!1):y.attachEvent?y.attachEvent("on"+_,m):y["on"+_]=m),i.parentElement||t.body.appendChild(i),i.style.opacity=1,i.style.display="block",f.progress(0),d.autoRun&&function x(){a=n.requestAnimationFrame(x),f.progress("+"+.05*Math.pow(1-Math.sqrt(s),2))}()))},progress:function(m){return m===void 0||(typeof m=="string"&&(m=(0<=m.indexOf("+")||0<=m.indexOf("-")?s:0)+parseFloat(m)),s=1<m?1:m,e()),s},hide:function(){clearTimeout(c),c=null,r&&(r=!1,a!=null&&(n.cancelAnimationFrame(a),a=null),function m(){return 1<=f.progress("+.1")&&(i.style.opacity-=.05,i.style.opacity<=.05)?(i.style.display="none",void(h=null)):void(h=n.requestAnimationFrame(m))}())}};typeof Qo=="object"&&typeof Qo.exports=="object"?Qo.exports=f:typeof define=="function"&&define.amd?define(function(){return f}):this.topbar=f}).call(Ld,window,document)});var Qv=Rr(ah());(function(){"use strict";function n(t){return this instanceof n?(this._canvas=t=typeof t=="string"?document.getElementById(t):t,this._ctx=t.getContext("2d"),this._width=t.width,this._height=t.height,this._max=1,void this.clear()):new n(t)}n.prototype={defaultRadius:25,defaultGradient:{.4:"blue",.6:"cyan",.7:"lime",.8:"yellow",1:"red"},data:function(t,e){return this._data=t,this},max:function(t){return this._max=t,this},add:function(t){return this._data.push(t),this},clear:function(){return this._data=[],this},radius:function(t,e){e=e||15;var i=this._circle=document.createElement("canvas"),s=i.getContext("2d"),r=this._r=t+e;return i.width=i.height=2*r,s.shadowOffsetX=s.shadowOffsetY=200,s.shadowBlur=e,s.shadowColor="black",s.beginPath(),s.arc(r-200,r-200,t,0,2*Math.PI,!0),s.closePath(),s.fill(),this},gradient:function(t){var e=document.createElement("canvas"),i=e.getContext("2d"),s=i.createLinearGradient(0,0,0,256);e.width=1,e.height=256;for(var r in t)s.addColorStop(r,t[r]);return i.fillStyle=s,i.fillRect(0,0,1,256),this._grad=i.getImageData(0,0,1,256).data,this},draw:function(t){this._circle||this.radius(this.defaultRadius),this._grad||this.gradient(this.defaultGradient);var e=this._ctx;e.clearRect(0,0,this._width,this._height);for(var i,s=0,r=this._data.length;r>s;s++)i=this._data[s],e.globalAlpha=Math.max(i[2]/this._max,t||.05),e.drawImage(this._circle,i[0]-this._r,i[1]-this._r);var a=e.getImageData(0,0,this._width,this._height);return this._colorize(a.data,this._grad),e.putImageData(a,0,0),this},_colorize:function(t,e){for(var i,s=3,r=t.length;r>s;s+=4)i=4*t[s],i&&(t[s-3]=e[i],t[s-2]=e[i+1],t[s-1]=e[i+2])}},window.simpleheat=n})(),L.HeatLayer=(L.Layer?L.Layer:L.Class).extend({initialize:function(n,t){this._latlngs=n,L.setOptions(this,t)},setLatLngs:function(n){return this._latlngs=n,this.redraw()},addLatLng:function(n){return this._latlngs.push(n),this.redraw()},setOptions:function(n){return L.setOptions(this,n),this._heat&&this._updateOptions(),this.redraw()},redraw:function(){return!this._heat||this._frame||this._map._animating||(this._frame=L.Util.requestAnimFrame(this._redraw,this)),this},onAdd:function(n){this._map=n,this._canvas||this._initCanvas(),n._panes.overlayPane.appendChild(this._canvas),n.on("moveend",this._reset,this),n.options.zoomAnimation&&L.Browser.any3d&&n.on("zoomanim",this._animateZoom,this),this._reset()},onRemove:function(n){n.getPanes().overlayPane.removeChild(this._canvas),n.off("moveend",this._reset,this),n.options.zoomAnimation&&n.off("zoomanim",this._animateZoom,this)},addTo:function(n){return n.addLayer(this),this},_initCanvas:function(){var n=this._canvas=L.DomUtil.create("canvas","leaflet-heatmap-layer leaflet-layer"),t=L.DomUtil.testProp(["transformOrigin","WebkitTransformOrigin","msTransformOrigin"]);n.style[t]="50% 50%";var e=this._map.getSize();n.width=e.x,n.height=e.y;var i=this._map.options.zoomAnimation&&L.Browser.any3d;L.DomUtil.addClass(n,"leaflet-zoom-"+(i?"animated":"hide")),this._heat=simpleheat(n),this._updateOptions()},_updateOptions:function(){this._heat.radius(this.options.radius||this._heat.defaultRadius,this.options.blur),this.options.gradient&&this._heat.gradient(this.options.gradient),this.options.max&&this._heat.max(this.options.max)},_reset:function(){var n=this._map.containerPointToLayerPoint([0,0]);L.DomUtil.setPosition(this._canvas,n);var t=this._map.getSize();this._heat._width!==t.x&&(this._canvas.width=this._heat._width=t.x),this._heat._height!==t.y&&(this._canvas.height=this._heat._height=t.y),this._redraw()},_redraw:function(){var n,t,e,i,s,r,a,h,c,d=[],f=this._heat._r,m=this._map.getSize(),_=new L.Bounds(L.point([-f,-f]),m.add([f,f])),y=this.options.max===void 0?1:this.options.max,x=this.options.maxZoom===void 0?this._map.getMaxZoom():this.options.maxZoom,b=1/Math.pow(2,Math.max(0,Math.min(x-this._map.getZoom(),12))),w=f/2,P=[],C=this._map._getMapPanePos(),O=C.x%w,I=C.y%w;for(n=0,t=this._latlngs.length;t>n;n++)if(e=this._map.latLngToContainerPoint(this._latlngs[n]),_.contains(e)){s=Math.floor((e.x-O)/w)+2,r=Math.floor((e.y-I)/w)+2;var D=this._latlngs[n].alt!==void 0?this._latlngs[n].alt:this._latlngs[n][2]!==void 0?+this._latlngs[n][2]:1;c=D*b,P[r]=P[r]||[],i=P[r][s],i?(i[0]=(i[0]*i[2]+e.x*c)/(i[2]+c),i[1]=(i[1]*i[2]+e.y*c)/(i[2]+c),i[2]+=c):P[r][s]=[e.x,e.y,c]}for(n=0,t=P.length;t>n;n++)if(P[n])for(a=0,h=P[n].length;h>a;a++)i=P[n][a],i&&d.push([Math.round(i[0]),Math.round(i[1]),Math.min(i[2],y)]);this._heat.data(d).draw(this.options.minOpacity),this._frame=null},_animateZoom:function(n){var t=this._map.getZoomScale(n.zoom),e=this._map._getCenterOffset(n.center)._multiplyBy(-t).subtract(this._map._getMapPanePos());L.DomUtil.setTransform?L.DomUtil.setTransform(this._canvas,e,t):this._canvas.style[L.DomUtil.TRANSFORM]=L.DomUtil.getTranslateString(e)+" scale("+t+")"}}),L.heatLayer=function(n,t){return new L.HeatLayer(n,t)};var g1=Rr(hh());(function(){"use strict";var n={}.hasOwnProperty,t=[].slice;(function(){var e,i;if(this.L!=null)return this.OverlappingMarkerSpiderfier=((e=s.prototype).VERSION="0.2.6",i=2*Math.PI,e.keepSpiderfied=!1,e.nearbyDistance=20,e.circleSpiralSwitchover=9,e.circleFootSeparation=25,e.circleStartAngle=i/12,e.spiralFootSeparation=28,e.spiralLengthStart=11,e.spiralLengthFactor=5,e.legWeight=1.5,e.legColors={usual:"#222",highlighted:"#f00"},e.initMarkerArrays=function(){return this.markers=[],this.markerListeners=[]},e.addMarker=function(r){var a,h;return r._oms!=null||(r._oms=!0,h=this,a=function(){return h.spiderListener(r)},r.addEventListener("click",a),this.markerListeners.push(a),this.markers.push(r)),this},e.getMarkers=function(){return this.markers.slice(0)},e.removeMarker=function(r){var a,h;return r._omsData!=null&&this.unspiderfy(),(a=this.arrIndexOf(this.markers,r))<0||(h=this.markerListeners.splice(a,1)[0],r.removeEventListener("click",h),delete r._oms,this.markers.splice(a,1)),this},e.clearMarkers=function(){var r,a,h,c,d,f;for(this.unspiderfy(),r=a=0,h=(f=this.markers).length;a<h;r=++a)c=f[r],d=this.markerListeners[r],c.removeEventListener("click",d),delete c._oms;return this.initMarkerArrays(),this},e.addListener=function(r,a){var h;return((h=this.listeners)[r]!=null?h[r]:h[r]=[]).push(a),this},e.removeListener=function(r,a){var h;return(h=this.arrIndexOf(this.listeners[r],a))<0||this.listeners[r].splice(h,1),this},e.clearListeners=function(r){return this.listeners[r]=[],this},e.trigger=function(){var r,a,h,c,d,f,m,_;for(a=arguments[0],r=2<=arguments.length?t.call(arguments,1):[],_=[],c=0,d=(m=(f=this.listeners[a])!=null?f:[]).length;c<d;c++)h=m[c],_.push(h.apply(null,r));return _},e.generatePtsCircle=function(r,a){var h,c,d,f,m,_,y;for(m=this.circleFootSeparation*(2+r)/i,c=i/r,y=[],d=f=0,_=r;0<=_?f<_:_<f;d=0<=_?++f:--f)h=this.circleStartAngle+d*c,y.push(new L.Point(a.x+m*Math.cos(h),a.y+m*Math.sin(h)));return y},e.generatePtsSpiral=function(r,a){var h,c,d,f,m,_,y;for(f=this.spiralLengthStart,y=[],c=d=h=0,_=r;0<=_?d<_:_<d;c=0<=_?++d:--d)h+=this.spiralFootSeparation/f+5e-4*c,m=new L.Point(a.x+f*Math.cos(h),a.y+f*Math.sin(h)),f+=i*this.spiralLengthFactor/h,y.push(m);return y},e.spiderListener=function(r){var a,h,c,d,f,m,_,y,x,b;if((m=r._omsData!=null)&&this.keepSpiderfied||this.unspiderfy(),m)return this.trigger("click",r);for(_=[],y=[],x=this.nearbyDistance*this.nearbyDistance,f=this.map.latLngToLayerPoint(r.getLatLng()),a=0,h=(b=this.markers).length;a<h;a++)c=b[a],this.map.hasLayer(c)&&(d=this.map.latLngToLayerPoint(c.getLatLng()),this.ptDistanceSq(d,f)<x?_.push({marker:c,markerPt:d}):y.push(c));return _.length===1?this.trigger("click",r):this.spiderfy(_,y)},e.makeHighlightListeners=function(r){return{highlight:(h=this,function(){return r._omsData.leg.setStyle({color:h.legColors.highlighted})}),unhighlight:(a=this,function(){return r._omsData.leg.setStyle({color:a.legColors.usual})})};var a,h},e.spiderfy=function(r,a){var h,c,d,f,m,_,y,x,b,w,P;return this.spiderfying=!0,w=r.length,h=this.ptAverage(function(){var C,O,I;for(I=[],C=0,O=r.length;C<O;C++)y=r[C],I.push(y.markerPt);return I}()),f=w>=this.circleSpiralSwitchover?this.generatePtsSpiral(w,h).reverse():this.generatePtsCircle(w,h),P=function(){var C,O,I;for(I=[],C=0,O=f.length;C<O;C++)d=f[C],c=this.map.layerPointToLatLng(d),b=this.minExtract(r,function(D){return function(z){return D.ptDistanceSq(z.markerPt,d)}}(this)),_=b.marker,m=new L.Polyline([_.getLatLng(),c],{color:this.legColors.usual,weight:this.legWeight,clickable:!1}),this.map.addLayer(m),_._omsData={usualPosition:_.getLatLng(),leg:m},this.legColors.highlighted!==this.legColors.usual&&(x=this.makeHighlightListeners(_),_._omsData.highlightListeners=x,_.addEventListener("mouseover",x.highlight),_.addEventListener("mouseout",x.unhighlight)),_.setLatLng(c),_.setZIndexOffset(_.options.zIndexOffset+1e6),I.push(_);return I}.call(this),delete this.spiderfying,this.spiderfied=!0,this.trigger("spiderfy",P,a)},e.unspiderfy=function(r){var a,h,c,d,f,m,_;if(r==null&&(r=null),this.spiderfied==null)return this;for(this.unspiderfying=!0,_=[],f=[],a=0,h=(m=this.markers).length;a<h;a++)(c=m[a])._omsData!=null?(this.map.removeLayer(c._omsData.leg),c!==r&&c.setLatLng(c._omsData.usualPosition),c.setZIndexOffset(c.options.zIndexOffset-1e6),(d=c._omsData.highlightListeners)!=null&&(c.removeEventListener("mouseover",d.highlight),c.removeEventListener("mouseout",d.unhighlight)),delete c._omsData,_.push(c)):f.push(c);return delete this.unspiderfying,delete this.spiderfied,this.trigger("unspiderfy",_,f),this},e.ptDistanceSq=function(r,a){var h,c;return(h=r.x-a.x)*h+(c=r.y-a.y)*c},e.ptAverage=function(r){var a,h,c,d,f,m;for(f=m=0,a=0,h=r.length;a<h;a++)f+=(d=r[a]).x,m+=d.y;return c=r.length,new L.Point(f/c,m/c)},e.minExtract=function(r,a){var h,c,d,f,m,_;for(d=f=0,m=r.length;f<m;d=++f)_=a(r[d]),(h==null||_<c)&&(c=_,h=d);return r.splice(h,1)[0]},e.arrIndexOf=function(r,a){var h,c,d;if(r.indexOf!=null)return r.indexOf(a);for(h=c=0,d=r.length;c<d;h=++c)if(r[h]===a)return h;return-1},s);function s(r,a){var h,c,d,f,m,_;for(d in this.map=r,a==null&&(a={}),a)n.call(a,d)&&(_=a[d],this[d]=_);for(this.initMarkerArrays(),this.listeners={},c=0,f=(m=["click","zoomend"]).length;c<f;c++)h=m[c],this.map.addEventListener(h,function(y){return function(){return y.unspiderfy()}}(this))}}).call(window)})();function vn(n){return n+.5|0}var Fe=(n,t,e)=>Math.max(Math.min(n,e),t);function _n(n){return Fe(vn(n*2.55),0,255)}function Ne(n){return Fe(vn(n*255),0,255)}function Pe(n){return Fe(vn(n/2.55)/100,0,1)}function ch(n){return Fe(vn(n*100),0,100)}var te={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},Fr=[..."0123456789ABCDEF"],rp=n=>Fr[n&15],ap=n=>Fr[(n&240)>>4]+Fr[n&15],ms=n=>(n&240)>>4===(n&15),lp=n=>ms(n.r)&&ms(n.g)&&ms(n.b)&&ms(n.a);function hp(n){var t=n.length,e;return n[0]==="#"&&(t===4||t===5?e={r:255&te[n[1]]*17,g:255&te[n[2]]*17,b:255&te[n[3]]*17,a:t===5?te[n[4]]*17:255}:(t===7||t===9)&&(e={r:te[n[1]]<<4|te[n[2]],g:te[n[3]]<<4|te[n[4]],b:te[n[5]]<<4|te[n[6]],a:t===9?te[n[7]]<<4|te[n[8]]:255})),e}var cp=(n,t)=>n<255?t(n):"";function up(n){var t=lp(n)?rp:ap;return n?"#"+t(n.r)+t(n.g)+t(n.b)+cp(n.a,t):void 0}var dp=/^(hsla?|hwb|hsv)\(\s*([-+.e\d]+)(?:deg)?[\s,]+([-+.e\d]+)%[\s,]+([-+.e\d]+)%(?:[\s,]+([-+.e\d]+)(%)?)?\s*\)$/;function ph(n,t,e){let i=t*Math.min(e,1-e),s=(r,a=(r+n/30)%12)=>e-i*Math.max(Math.min(a-3,9-a,1),-1);return[s(0),s(8),s(4)]}function fp(n,t,e){let i=(s,r=(s+n/60)%6)=>e-e*t*Math.max(Math.min(r,4-r,1),0);return[i(5),i(3),i(1)]}function pp(n,t,e){let i=ph(n,1,.5),s;for(t+e>1&&(s=1/(t+e),t*=s,e*=s),s=0;s<3;s++)i[s]*=1-t-e,i[s]+=t;return i}function mp(n,t,e,i,s){return n===s?(t-e)/i+(t<e?6:0):t===s?(e-n)/i+2:(n-t)/i+4}function Nr(n){let e=n.r/255,i=n.g/255,s=n.b/255,r=Math.max(e,i,s),a=Math.min(e,i,s),h=(r+a)/2,c,d,f;return r!==a&&(f=r-a,d=h>.5?f/(2-r-a):f/(r+a),c=mp(e,i,s,f,r),c=c*60+.5),[c|0,d||0,h]}function Wr(n,t,e,i){return(Array.isArray(t)?n(t[0],t[1],t[2]):n(t,e,i)).map(Ne)}function Hr(n,t,e){return Wr(ph,n,t,e)}function gp(n,t,e){return Wr(pp,n,t,e)}function _p(n,t,e){return Wr(fp,n,t,e)}function mh(n){return(n%360+360)%360}function yp(n){let t=dp.exec(n),e=255,i;if(!t)return;t[5]!==i&&(e=t[6]?_n(+t[5]):Ne(+t[5]));let s=mh(+t[2]),r=+t[3]/100,a=+t[4]/100;return t[1]==="hwb"?i=gp(s,r,a):t[1]==="hsv"?i=_p(s,r,a):i=Hr(s,r,a),{r:i[0],g:i[1],b:i[2],a:e}}function vp(n,t){var e=Nr(n);e[0]=mh(e[0]+t),e=Hr(e),n.r=e[0],n.g=e[1],n.b=e[2]}function xp(n){if(!n)return;let t=Nr(n),e=t[0],i=ch(t[1]),s=ch(t[2]);return n.a<255?`hsla(${e}, ${i}%, ${s}%, ${Pe(n.a)})`:`hsl(${e}, ${i}%, ${s}%)`}var uh={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"},dh={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 bp(){let n={},t=Object.keys(dh),e=Object.keys(uh),i,s,r,a,h;for(i=0;i<t.length;i++){for(a=h=t[i],s=0;s<e.length;s++)r=e[s],h=h.replace(r,uh[r]);r=parseInt(dh[a],16),n[h]=[r>>16&255,r>>8&255,r&255]}return n}var gs;function wp(n){gs||(gs=bp(),gs.transparent=[0,0,0,0]);let t=gs[n.toLowerCase()];return t&&{r:t[0],g:t[1],b:t[2],a:t.length===4?t[3]:255}}var Mp=/^rgba?\(\s*([-+.\d]+)(%)?[\s,]+([-+.e\d]+)(%)?[\s,]+([-+.e\d]+)(%)?(?:[\s,/]+([-+.e\d]+)(%)?)?\s*\)$/;function Lp(n){let t=Mp.exec(n),e=255,i,s,r;if(t){if(t[7]!==i){let a=+t[7];e=t[8]?_n(a):Fe(a*255,0,255)}return i=+t[1],s=+t[3],r=+t[5],i=255&(t[2]?_n(i):Fe(i,0,255)),s=255&(t[4]?_n(s):Fe(s,0,255)),r=255&(t[6]?_n(r):Fe(r,0,255)),{r:i,g:s,b:r,a:e}}}function Pp(n){return n&&(n.a<255?`rgba(${n.r}, ${n.g}, ${n.b}, ${Pe(n.a)})`:`rgb(${n.r}, ${n.g}, ${n.b})`)}var Br=n=>n<=.0031308?n*12.92:Math.pow(n,1/2.4)*1.055-.055,Pi=n=>n<=.04045?n/12.92:Math.pow((n+.055)/1.055,2.4);function kp(n,t,e){let i=Pi(Pe(n.r)),s=Pi(Pe(n.g)),r=Pi(Pe(n.b));return{r:Ne(Br(i+e*(Pi(Pe(t.r))-i))),g:Ne(Br(s+e*(Pi(Pe(t.g))-s))),b:Ne(Br(r+e*(Pi(Pe(t.b))-r))),a:n.a+e*(t.a-n.a)}}function _s(n,t,e){if(n){let i=Nr(n);i[t]=Math.max(0,Math.min(i[t]+i[t]*e,t===0?360:1)),i=Hr(i),n.r=i[0],n.g=i[1],n.b=i[2]}}function gh(n,t){return n&&Object.assign(t||{},n)}function fh(n){var t={r:0,g:0,b:0,a:255};return Array.isArray(n)?n.length>=3&&(t={r:n[0],g:n[1],b:n[2],a:255},n.length>3&&(t.a=Ne(n[3]))):(t=gh(n,{r:0,g:0,b:0,a:1}),t.a=Ne(t.a)),t}function Tp(n){return n.charAt(0)==="r"?Lp(n):yp(n)}var yn=class n{constructor(t){if(t instanceof n)return t;let e=typeof t,i;e==="object"?i=fh(t):e==="string"&&(i=hp(t)||wp(t)||Tp(t)),this._rgb=i,this._valid=!!i}get valid(){return this._valid}get rgb(){var t=gh(this._rgb);return t&&(t.a=Pe(t.a)),t}set rgb(t){this._rgb=fh(t)}rgbString(){return this._valid?Pp(this._rgb):void 0}hexString(){return this._valid?up(this._rgb):void 0}hslString(){return this._valid?xp(this._rgb):void 0}mix(t,e){if(t){let i=this.rgb,s=t.rgb,r,a=e===r?.5:e,h=2*a-1,c=i.a-s.a,d=((h*c===-1?h:(h+c)/(1+h*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,e){return t&&(this._rgb=kp(this._rgb,t._rgb,e)),this}clone(){return new n(this.rgb)}alpha(t){return this._rgb.a=Ne(t),this}clearer(t){let e=this._rgb;return e.a*=1-t,this}greyscale(){let t=this._rgb,e=vn(t.r*.3+t.g*.59+t.b*.11);return t.r=t.g=t.b=e,this}opaquer(t){let e=this._rgb;return e.a*=1+t,this}negate(){let t=this._rgb;return t.r=255-t.r,t.g=255-t.g,t.b=255-t.b,this}lighten(t){return _s(this._rgb,2,t),this}darken(t){return _s(this._rgb,2,-t),this}saturate(t){return _s(this._rgb,1,t),this}desaturate(t){return _s(this._rgb,1,-t),this}rotate(t){return vp(this._rgb,t),this}};function me(){}var Th=(()=>{let n=0;return()=>n++})();function it(n){return n==null}function bt(n){if(Array.isArray&&Array.isArray(n))return!0;let t=Object.prototype.toString.call(n);return t.slice(0,7)==="[object"&&t.slice(-6)==="Array]"}function rt(n){return n!==null&&Object.prototype.toString.call(n)==="[object Object]"}function Pt(n){return(typeof n=="number"||n instanceof Number)&&isFinite(+n)}function Yt(n,t){return Pt(n)?n:t}function $(n,t){return typeof n=="undefined"?t:n}var Ch=(n,t)=>typeof n=="string"&&n.endsWith("%")?parseFloat(n)/100:+n/t,jr=(n,t)=>typeof n=="string"&&n.endsWith("%")?parseFloat(n)/100*t:+n;function vt(n,t,e){if(n&&typeof n.call=="function")return n.apply(e,t)}function gt(n,t,e,i){let s,r,a;if(bt(n))if(r=n.length,i)for(s=r-1;s>=0;s--)t.call(e,n[s],s);else for(s=0;s<r;s++)t.call(e,n[s],s);else if(rt(n))for(a=Object.keys(n),r=a.length,s=0;s<r;s++)t.call(e,n[a[s]],a[s])}function wn(n,t){let e,i,s,r;if(!n||!t||n.length!==t.length)return!1;for(e=0,i=n.length;e<i;++e)if(s=n[e],r=t[e],s.datasetIndex!==r.datasetIndex||s.index!==r.index)return!1;return!0}function ws(n){if(bt(n))return n.map(ws);if(rt(n)){let t=Object.create(null),e=Object.keys(n),i=e.length,s=0;for(;s<i;++s)t[e[s]]=ws(n[e[s]]);return t}return n}function Sh(n){return["__proto__","prototype","constructor"].indexOf(n)===-1}function Cp(n,t,e,i){if(!Sh(n))return;let s=t[n],r=e[n];rt(s)&&rt(r)?Ti(s,r,i):t[n]=ws(r)}function Ti(n,t,e){let i=bt(t)?t:[t],s=i.length;if(!rt(n))return n;e=e||{};let r=e.merger||Cp,a;for(let h=0;h<s;++h){if(a=i[h],!rt(a))continue;let c=Object.keys(a);for(let d=0,f=c.length;d<f;++d)r(c[d],n,a,e)}return n}function Si(n,t){return Ti(n,t,{merger:Sp})}function Sp(n,t,e){if(!Sh(n))return;let i=t[n],s=e[n];rt(i)&&rt(s)?Si(i,s):Object.prototype.hasOwnProperty.call(t,n)||(t[n]=ws(s))}var _h={"":n=>n,x:n=>n.x,y:n=>n.y};function Op(n){let t=n.split("."),e=[],i="";for(let s of t)i+=s,i.endsWith("\\")?i=i.slice(0,-1)+".":(e.push(i),i="");return e}function Dp(n){let t=Op(n);return e=>{for(let i of t){if(i==="")break;e=e&&e[i]}return e}}function Ce(n,t){return(_h[t]||(_h[t]=Dp(t)))(n)}function ks(n){return n.charAt(0).toUpperCase()+n.slice(1)}var Oi=n=>typeof n!="undefined",ke=n=>typeof n=="function",Ur=(n,t)=>{if(n.size!==t.size)return!1;for(let e of n)if(!t.has(e))return!1;return!0};function Oh(n){return n.type==="mouseup"||n.type==="click"||n.type==="contextmenu"}var ut=Math.PI,wt=2*ut,Ip=wt+ut,Ms=Number.POSITIVE_INFINITY,Ap=ut/180,Tt=ut/2,Je=ut/4,yh=ut*2/3,Te=Math.log10,ae=Math.sign;function Di(n,t,e){return Math.abs(n-t)<e}function Gr(n){let t=Math.round(n);n=Di(n,t,n/1e3)?t:n;let e=Math.pow(10,Math.floor(Te(n))),i=n/e;return(i<=1?1:i<=2?2:i<=5?5:10)*e}function Dh(n){let t=[],e=Math.sqrt(n),i;for(i=1;i<e;i++)n%i===0&&(t.push(i),t.push(n/i));return e===(e|0)&&t.push(e),t.sort((s,r)=>s-r).pop(),t}function Ep(n){return typeof n=="symbol"||typeof n=="object"&&n!==null&&!(Symbol.toPrimitive in n||"toString"in n||"valueOf"in n)}function ii(n){return!Ep(n)&&!isNaN(parseFloat(n))&&isFinite(n)}function Ih(n,t){let e=Math.round(n);return e-t<=n&&e+t>=n}function qr(n,t,e){let i,s,r;for(i=0,s=n.length;i<s;i++)r=n[i][e],isNaN(r)||(t.min=Math.min(t.min,r),t.max=Math.max(t.max,r))}function ee(n){return n*(ut/180)}function Ts(n){return n*(180/ut)}function Xr(n){if(!Pt(n))return;let t=1,e=0;for(;Math.round(n*t)/t!==n;)t*=10,e++;return e}function $r(n,t){let e=t.x-n.x,i=t.y-n.y,s=Math.sqrt(e*e+i*i),r=Math.atan2(i,e);return r<-.5*ut&&(r+=wt),{angle:r,distance:s}}function Ls(n,t){return Math.sqrt(Math.pow(t.x-n.x,2)+Math.pow(t.y-n.y,2))}function zp(n,t){return(n-t+Ip)%wt-ut}function zt(n){return(n%wt+wt)%wt}function Ii(n,t,e,i){let s=zt(n),r=zt(t),a=zt(e),h=zt(r-s),c=zt(a-s),d=zt(s-r),f=zt(s-a);return s===r||s===a||i&&r===a||h>c&&d<f}function It(n,t,e){return Math.max(t,Math.min(e,n))}function Ah(n){return It(n,-32768,32767)}function ge(n,t,e,i=1e-6){return n>=Math.min(t,e)-i&&n<=Math.max(t,e)+i}function Cs(n,t,e){e=e||(a=>n[a]<t);let i=n.length-1,s=0,r;for(;i-s>1;)r=s+i>>1,e(r)?s=r:i=r;return{lo:s,hi:i}}var fe=(n,t,e,i)=>Cs(n,e,i?s=>{let r=n[s][t];return r<e||r===e&&n[s+1][t]===e}:s=>n[s][t]<e),Eh=(n,t,e)=>Cs(n,e,i=>n[i][t]>=e);function zh(n,t,e){let i=0,s=n.length;for(;i<s&&n[i]<t;)i++;for(;s>i&&n[s-1]>e;)s--;return i>0||s<n.length?n.slice(i,s):n}var Rh=["push","pop","shift","splice","unshift"];function Bh(n,t){if(n._chartjs){n._chartjs.listeners.push(t);return}Object.defineProperty(n,"_chartjs",{configurable:!0,enumerable:!1,value:{listeners:[t]}}),Rh.forEach(e=>{let i="_onData"+ks(e),s=n[e];Object.defineProperty(n,e,{configurable:!0,enumerable:!1,value(...r){let a=s.apply(this,r);return n._chartjs.listeners.forEach(h=>{typeof h[i]=="function"&&h[i](...r)}),a}})})}function Kr(n,t){let e=n._chartjs;if(!e)return;let i=e.listeners,s=i.indexOf(t);s!==-1&&i.splice(s,1),!(i.length>0)&&(Rh.forEach(r=>{delete n[r]}),delete n._chartjs)}function Qr(n){let t=new Set(n);return t.size===n.length?n:Array.from(t)}var Jr=function(){return typeof window=="undefined"?function(n){return n()}:window.requestAnimationFrame}();function ta(n,t){let e=[],i=!1;return function(...s){e=s,i||(i=!0,Jr.call(window,()=>{i=!1,n.apply(t,e)}))}}function Fh(n,t){let e;return function(...i){return t?(clearTimeout(e),e=setTimeout(n,t,i)):n.apply(this,i),t}}var Ss=n=>n==="start"?"left":n==="end"?"right":"center",Rt=(n,t,e)=>n==="start"?t:n==="end"?e:(t+e)/2,Nh=(n,t,e,i)=>n===(i?"left":"right")?e:n==="center"?(t+e)/2:t;function ea(n,t,e){let i=t.length,s=0,r=i;if(n._sorted){let{iScale:a,vScale:h,_parsed:c}=n,d=n.dataset&&n.dataset.options?n.dataset.options.spanGaps:null,f=a.axis,{min:m,max:_,minDefined:y,maxDefined:x}=a.getUserBounds();if(y){if(s=Math.min(fe(c,f,m).lo,e?i:fe(t,f,a.getPixelForValue(m)).lo),d){let b=c.slice(0,s+1).reverse().findIndex(w=>!it(w[h.axis]));s-=Math.max(0,b)}s=It(s,0,i-1)}if(x){let b=Math.max(fe(c,a.axis,_,!0).hi+1,e?0:fe(t,f,a.getPixelForValue(_),!0).hi+1);if(d){let w=c.slice(b-1).findIndex(P=>!it(P[h.axis]));b+=Math.max(0,w)}r=It(b,s,i)-s}else r=i-s}return{start:s,count:r}}function ia(n){let{xScale:t,yScale:e,_scaleRanges:i}=n,s={xmin:t.min,xmax:t.max,ymin:e.min,ymax:e.max};if(!i)return n._scaleRanges=s,!0;let r=i.xmin!==t.min||i.xmax!==t.max||i.ymin!==e.min||i.ymax!==e.max;return Object.assign(i,s),r}var ys=n=>n===0||n===1,vh=(n,t,e)=>-(Math.pow(2,10*(n-=1))*Math.sin((n-t)*wt/e)),xh=(n,t,e)=>Math.pow(2,-10*n)*Math.sin((n-t)*wt/e)+1,ki={linear:n=>n,easeInQuad:n=>n*n,easeOutQuad:n=>-n*(n-2),easeInOutQuad:n=>(n/=.5)<1?.5*n*n:-.5*(--n*(n-2)-1),easeInCubic:n=>n*n*n,easeOutCubic:n=>(n-=1)*n*n+1,easeInOutCubic:n=>(n/=.5)<1?.5*n*n*n:.5*((n-=2)*n*n+2),easeInQuart:n=>n*n*n*n,easeOutQuart:n=>-((n-=1)*n*n*n-1),easeInOutQuart:n=>(n/=.5)<1?.5*n*n*n*n:-.5*((n-=2)*n*n*n-2),easeInQuint:n=>n*n*n*n*n,easeOutQuint:n=>(n-=1)*n*n*n*n+1,easeInOutQuint:n=>(n/=.5)<1?.5*n*n*n*n*n:.5*((n-=2)*n*n*n*n+2),easeInSine:n=>-Math.cos(n*Tt)+1,easeOutSine:n=>Math.sin(n*Tt),easeInOutSine:n=>-.5*(Math.cos(ut*n)-1),easeInExpo:n=>n===0?0:Math.pow(2,10*(n-1)),easeOutExpo:n=>n===1?1:-Math.pow(2,-10*n)+1,easeInOutExpo:n=>ys(n)?n:n<.5?.5*Math.pow(2,10*(n*2-1)):.5*(-Math.pow(2,-10*(n*2-1))+2),easeInCirc:n=>n>=1?n:-(Math.sqrt(1-n*n)-1),easeOutCirc:n=>Math.sqrt(1-(n-=1)*n),easeInOutCirc:n=>(n/=.5)<1?-.5*(Math.sqrt(1-n*n)-1):.5*(Math.sqrt(1-(n-=2)*n)+1),easeInElastic:n=>ys(n)?n:vh(n,.075,.3),easeOutElastic:n=>ys(n)?n:xh(n,.075,.3),easeInOutElastic(n){return ys(n)?n:n<.5?.5*vh(n*2,.1125,.45):.5+.5*xh(n*2-1,.1125,.45)},easeInBack(n){return n*n*((1.70158+1)*n-1.70158)},easeOutBack(n){return(n-=1)*n*((1.70158+1)*n+1.70158)+1},easeInOutBack(n){let t=1.70158;return(n/=.5)<1?.5*(n*n*(((t*=1.525)+1)*n-t)):.5*((n-=2)*n*(((t*=1.525)+1)*n+t)+2)},easeInBounce:n=>1-ki.easeOutBounce(1-n),easeOutBounce(n){return n<1/2.75?7.5625*n*n:n<2/2.75?7.5625*(n-=1.5/2.75)*n+.75:n<2.5/2.75?7.5625*(n-=2.25/2.75)*n+.9375:7.5625*(n-=2.625/2.75)*n+.984375},easeInOutBounce:n=>n<.5?ki.easeInBounce(n*2)*.5:ki.easeOutBounce(n*2-1)*.5+.5};function na(n){if(n&&typeof n=="object"){let t=n.toString();return t==="[object CanvasPattern]"||t==="[object CanvasGradient]"}return!1}function sa(n){return na(n)?n:new yn(n)}function Zr(n){return na(n)?n:new yn(n).saturate(.5).darken(.1).hexString()}var Rp=["x","y","borderWidth","radius","tension"],Bp=["color","borderColor","backgroundColor"];function Fp(n){n.set("animation",{delay:void 0,duration:1e3,easing:"easeOutQuart",fn:void 0,from:void 0,loop:void 0,to:void 0,type:void 0}),n.describe("animation",{_fallback:!1,_indexable:!1,_scriptable:t=>t!=="onProgress"&&t!=="onComplete"&&t!=="fn"}),n.set("animations",{colors:{type:"color",properties:Bp},numbers:{type:"number",properties:Rp}}),n.describe("animations",{_fallback:"animation"}),n.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 Np(n){n.set("layout",{autoPadding:!0,padding:{top:0,right:0,bottom:0,left:0}})}var bh=new Map;function Wp(n,t){t=t||{};let e=n+JSON.stringify(t),i=bh.get(e);return i||(i=new Intl.NumberFormat(n,t),bh.set(e,i)),i}function Ai(n,t,e){return Wp(t,e).format(n)}var Wh={values(n){return bt(n)?n:""+n},numeric(n,t,e){if(n===0)return"0";let i=this.chart.options.locale,s,r=n;if(e.length>1){let d=Math.max(Math.abs(e[0].value),Math.abs(e[e.length-1].value));(d<1e-4||d>1e15)&&(s="scientific"),r=Hp(n,e)}let a=Te(Math.abs(r)),h=isNaN(a)?1:Math.max(Math.min(-1*Math.floor(a),20),0),c={notation:s,minimumFractionDigits:h,maximumFractionDigits:h};return Object.assign(c,this.options.ticks.format),Ai(n,i,c)},logarithmic(n,t,e){if(n===0)return"0";let i=e[t].significand||n/Math.pow(10,Math.floor(Te(n)));return[1,2,3,5,10,15].includes(i)||t>.8*e.length?Wh.numeric.call(this,n,t,e):""}};function Hp(n,t){let e=t.length>3?t[2].value-t[1].value:t[1].value-t[0].value;return Math.abs(e)>=1&&n!==Math.floor(n)&&(e=n-Math.floor(n)),e}var Mn={formatters:Wh};function Zp(n){n.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,e)=>e.lineWidth,tickColor:(t,e)=>e.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:Mn.formatters.values,minor:{},major:{},align:"center",crossAlign:"near",showLabelBackdrop:!1,backdropColor:"rgba(255, 255, 255, 0.75)",backdropPadding:2}}),n.route("scale.ticks","color","","color"),n.route("scale.grid","color","","borderColor"),n.route("scale.border","color","","borderColor"),n.route("scale.title","color","","color"),n.describe("scale",{_fallback:!1,_scriptable:t=>!t.startsWith("before")&&!t.startsWith("after")&&t!=="callback"&&t!=="parser",_indexable:t=>t!=="borderDash"&&t!=="tickBorderDash"&&t!=="dash"}),n.describe("scales",{_fallback:"scale"}),n.describe("scale.ticks",{_scriptable:t=>t!=="backdropPadding"&&t!=="callback",_indexable:t=>t!=="backdropPadding"})}var He=Object.create(null),Os=Object.create(null);function xn(n,t){if(!t)return n;let e=t.split(".");for(let i=0,s=e.length;i<s;++i){let r=e[i];n=n[r]||(n[r]=Object.create(null))}return n}function Vr(n,t,e){return typeof t=="string"?Ti(xn(n,t),e):Ti(xn(n,""),t)}var Yr=class{constructor(t,e){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)=>Zr(s.backgroundColor),this.hoverBorderColor=(i,s)=>Zr(s.borderColor),this.hoverColor=(i,s)=>Zr(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(e)}set(t,e){return Vr(this,t,e)}get(t){return xn(this,t)}describe(t,e){return Vr(Os,t,e)}override(t,e){return Vr(He,t,e)}route(t,e,i,s){let r=xn(this,t),a=xn(this,i),h="_"+e;Object.defineProperties(r,{[h]:{value:r[e],writable:!0},[e]:{enumerable:!0,get(){let c=this[h],d=a[s];return rt(c)?Object.assign({},d,c):$(c,d)},set(c){this[h]=c}}})}apply(t){t.forEach(e=>e(this))}},Mt=new Yr({_scriptable:n=>!n.startsWith("on"),_indexable:n=>n!=="events",hover:{_fallback:"interaction"},interaction:{_scriptable:!1,_indexable:!1}},[Fp,Np,Zp]);function Vp(n){return!n||it(n.size)||it(n.family)?null:(n.style?n.style+" ":"")+(n.weight?n.weight+" ":"")+n.size+"px "+n.family}function bn(n,t,e,i,s){let r=t[s];return r||(r=t[s]=n.measureText(s).width,e.push(s)),r>i&&(i=r),i}function Hh(n,t,e,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),n.save(),n.font=t;let a=0,h=e.length,c,d,f,m,_;for(c=0;c<h;c++)if(m=e[c],m!=null&&!bt(m))a=bn(n,s,r,a,m);else if(bt(m))for(d=0,f=m.length;d<f;d++)_=m[d],_!=null&&!bt(_)&&(a=bn(n,s,r,a,_));n.restore();let y=r.length/2;if(y>e.length){for(c=0;c<y;c++)delete s[r[c]];r.splice(0,y)}return a}function Ze(n,t,e){let i=n.currentDevicePixelRatio,s=e!==0?Math.max(e/2,.5):0;return Math.round((t-s)*i)/i+s}function oa(n,t){!t&&!n||(t=t||n.getContext("2d"),t.save(),t.resetTransform(),t.clearRect(0,0,n.width,n.height),t.restore())}function Ds(n,t,e,i){ra(n,t,e,i,null)}function ra(n,t,e,i,s){let r,a,h,c,d,f,m,_,y=t.pointStyle,x=t.rotation,b=t.radius,w=(x||0)*Ap;if(y&&typeof y=="object"&&(r=y.toString(),r==="[object HTMLImageElement]"||r==="[object HTMLCanvasElement]")){n.save(),n.translate(e,i),n.rotate(w),n.drawImage(y,-y.width/2,-y.height/2,y.width,y.height),n.restore();return}if(!(isNaN(b)||b<=0)){switch(n.beginPath(),y){default:s?n.ellipse(e,i,s/2,b,0,0,wt):n.arc(e,i,b,0,wt),n.closePath();break;case"triangle":f=s?s/2:b,n.moveTo(e+Math.sin(w)*f,i-Math.cos(w)*b),w+=yh,n.lineTo(e+Math.sin(w)*f,i-Math.cos(w)*b),w+=yh,n.lineTo(e+Math.sin(w)*f,i-Math.cos(w)*b),n.closePath();break;case"rectRounded":d=b*.516,c=b-d,a=Math.cos(w+Je)*c,m=Math.cos(w+Je)*(s?s/2-d:c),h=Math.sin(w+Je)*c,_=Math.sin(w+Je)*(s?s/2-d:c),n.arc(e-m,i-h,d,w-ut,w-Tt),n.arc(e+_,i-a,d,w-Tt,w),n.arc(e+m,i+h,d,w,w+Tt),n.arc(e-_,i+a,d,w+Tt,w+ut),n.closePath();break;case"rect":if(!x){c=Math.SQRT1_2*b,f=s?s/2:c,n.rect(e-f,i-c,2*f,2*c);break}w+=Je;case"rectRot":m=Math.cos(w)*(s?s/2:b),a=Math.cos(w)*b,h=Math.sin(w)*b,_=Math.sin(w)*(s?s/2:b),n.moveTo(e-m,i-h),n.lineTo(e+_,i-a),n.lineTo(e+m,i+h),n.lineTo(e-_,i+a),n.closePath();break;case"crossRot":w+=Je;case"cross":m=Math.cos(w)*(s?s/2:b),a=Math.cos(w)*b,h=Math.sin(w)*b,_=Math.sin(w)*(s?s/2:b),n.moveTo(e-m,i-h),n.lineTo(e+m,i+h),n.moveTo(e+_,i-a),n.lineTo(e-_,i+a);break;case"star":m=Math.cos(w)*(s?s/2:b),a=Math.cos(w)*b,h=Math.sin(w)*b,_=Math.sin(w)*(s?s/2:b),n.moveTo(e-m,i-h),n.lineTo(e+m,i+h),n.moveTo(e+_,i-a),n.lineTo(e-_,i+a),w+=Je,m=Math.cos(w)*(s?s/2:b),a=Math.cos(w)*b,h=Math.sin(w)*b,_=Math.sin(w)*(s?s/2:b),n.moveTo(e-m,i-h),n.lineTo(e+m,i+h),n.moveTo(e+_,i-a),n.lineTo(e-_,i+a);break;case"line":a=s?s/2:Math.cos(w)*b,h=Math.sin(w)*b,n.moveTo(e-a,i-h),n.lineTo(e+a,i+h);break;case"dash":n.moveTo(e,i),n.lineTo(e+Math.cos(w)*(s?s/2:b),i+Math.sin(w)*b);break;case!1:n.closePath();break}n.fill(),t.borderWidth>0&&n.stroke()}}function pe(n,t,e){return e=e||.5,!t||n&&n.x>t.left-e&&n.x<t.right+e&&n.y>t.top-e&&n.y<t.bottom+e}function Ln(n,t){n.save(),n.beginPath(),n.rect(t.left,t.top,t.right-t.left,t.bottom-t.top),n.clip()}function Pn(n){n.restore()}function Zh(n,t,e,i,s){if(!t)return n.lineTo(e.x,e.y);if(s==="middle"){let r=(t.x+e.x)/2;n.lineTo(r,t.y),n.lineTo(r,e.y)}else s==="after"!=!!i?n.lineTo(t.x,e.y):n.lineTo(e.x,t.y);n.lineTo(e.x,e.y)}function Vh(n,t,e,i){if(!t)return n.lineTo(e.x,e.y);n.bezierCurveTo(i?t.cp1x:t.cp2x,i?t.cp1y:t.cp2y,i?e.cp2x:e.cp1x,i?e.cp2y:e.cp1y,e.x,e.y)}function Yp(n,t){t.translation&&n.translate(t.translation[0],t.translation[1]),it(t.rotation)||n.rotate(t.rotation),t.color&&(n.fillStyle=t.color),t.textAlign&&(n.textAlign=t.textAlign),t.textBaseline&&(n.textBaseline=t.textBaseline)}function jp(n,t,e,i,s){if(s.strikethrough||s.underline){let r=n.measureText(i),a=t-r.actualBoundingBoxLeft,h=t+r.actualBoundingBoxRight,c=e-r.actualBoundingBoxAscent,d=e+r.actualBoundingBoxDescent,f=s.strikethrough?(c+d)/2:d;n.strokeStyle=n.fillStyle,n.beginPath(),n.lineWidth=s.decorationWidth||2,n.moveTo(a,f),n.lineTo(h,f),n.stroke()}}function Up(n,t){let e=n.fillStyle;n.fillStyle=t.color,n.fillRect(t.left,t.top,t.width,t.height),n.fillStyle=e}function Ve(n,t,e,i,s,r={}){let a=bt(t)?t:[t],h=r.strokeWidth>0&&r.strokeColor!=="",c,d;for(n.save(),n.font=s.string,Yp(n,r),c=0;c<a.length;++c)d=a[c],r.backdrop&&Up(n,r.backdrop),h&&(r.strokeColor&&(n.strokeStyle=r.strokeColor),it(r.strokeWidth)||(n.lineWidth=r.strokeWidth),n.strokeText(d,e,i,r.maxWidth)),n.fillText(d,e,i,r.maxWidth),jp(n,e,i,d,r),i+=Number(s.lineHeight);n.restore()}function Ei(n,t){let{x:e,y:i,w:s,h:r,radius:a}=t;n.arc(e+a.topLeft,i+a.topLeft,a.topLeft,1.5*ut,ut,!0),n.lineTo(e,i+r-a.bottomLeft),n.arc(e+a.bottomLeft,i+r-a.bottomLeft,a.bottomLeft,ut,Tt,!0),n.lineTo(e+s-a.bottomRight,i+r),n.arc(e+s-a.bottomRight,i+r-a.bottomRight,a.bottomRight,Tt,0,!0),n.lineTo(e+s,i+a.topRight),n.arc(e+s-a.topRight,i+a.topRight,a.topRight,0,-Tt,!0),n.lineTo(e+a.topLeft,i)}var Gp=/^(normal|(\d+(?:\.\d+)?)(px|em|%)?)$/,qp=/^(normal|italic|initial|inherit|unset|(oblique( -?[0-9]?[0-9]deg)?))$/;function Xp(n,t){let e=(""+n).match(Gp);if(!e||e[1]==="normal")return t*1.2;switch(n=+e[2],e[3]){case"px":return n;case"%":n/=100;break}return t*n}var $p=n=>+n||0;function Is(n,t){let e={},i=rt(t),s=i?Object.keys(t):t,r=rt(n)?i?a=>$(n[a],n[t[a]]):a=>n[a]:()=>n;for(let a of s)e[a]=$p(r(a));return e}function aa(n){return Is(n,{top:"y",right:"x",bottom:"y",left:"x"})}function Ye(n){return Is(n,["topLeft","topRight","bottomLeft","bottomRight"])}function Bt(n){let t=aa(n);return t.width=t.left+t.right,t.height=t.top+t.bottom,t}function Dt(n,t){n=n||{},t=t||Mt.font;let e=$(n.size,t.size);typeof e=="string"&&(e=parseInt(e,10));let i=$(n.style,t.style);i&&!(""+i).match(qp)&&(console.warn('Invalid font style specified: "'+i+'"'),i=void 0);let s={family:$(n.family,t.family),lineHeight:Xp($(n.lineHeight,t.lineHeight),e),size:e,style:i,weight:$(n.weight,t.weight),string:""};return s.string=Vp(s),s}function zi(n,t,e,i){let s=!0,r,a,h;for(r=0,a=n.length;r<a;++r)if(h=n[r],h!==void 0&&(t!==void 0&&typeof h=="function"&&(h=h(t),s=!1),e!==void 0&&bt(h)&&(h=h[e%h.length],s=!1),h!==void 0))return i&&!s&&(i.cacheable=!1),h}function Yh(n,t,e){let{min:i,max:s}=n,r=jr(t,(s-i)/2),a=(h,c)=>e&&h===0?0:h+c;return{min:a(i,-Math.abs(r)),max:a(s,r)}}function Se(n,t){return Object.assign(Object.create(n),t)}function As(n,t=[""],e,i,s=()=>n[0]){let r=e||n;typeof i=="undefined"&&(i=Gh("_fallback",n));let a={[Symbol.toStringTag]:"Object",_cacheable:!0,_scopes:n,_rootScopes:r,_fallback:i,_getTarget:s,override:h=>As([h,...n],t,r,i)};return new Proxy(a,{deleteProperty(h,c){return delete h[c],delete h._keys,delete n[0][c],!0},get(h,c){return jh(h,c,()=>sm(c,t,n,h))},getOwnPropertyDescriptor(h,c){return Reflect.getOwnPropertyDescriptor(h._scopes[0],c)},getPrototypeOf(){return Reflect.getPrototypeOf(n[0])},has(h,c){return Mh(h).includes(c)},ownKeys(h){return Mh(h)},set(h,c,d){let f=h._storage||(h._storage=s());return h[c]=f[c]=d,delete h._keys,!0}})}function ei(n,t,e,i){let s={_cacheable:!1,_proxy:n,_context:t,_subProxy:e,_stack:new Set,_descriptors:la(n,i),setContext:r=>ei(n,r,e,i),override:r=>ei(n.override(r),t,e,i)};return new Proxy(s,{deleteProperty(r,a){return delete r[a],delete n[a],!0},get(r,a,h){return jh(r,a,()=>Qp(r,a,h))},getOwnPropertyDescriptor(r,a){return r._descriptors.allKeys?Reflect.has(n,a)?{enumerable:!0,configurable:!0}:void 0:Reflect.getOwnPropertyDescriptor(n,a)},getPrototypeOf(){return Reflect.getPrototypeOf(n)},has(r,a){return Reflect.has(n,a)},ownKeys(){return Reflect.ownKeys(n)},set(r,a,h){return n[a]=h,delete r[a],!0}})}function la(n,t={scriptable:!0,indexable:!0}){let{_scriptable:e=t.scriptable,_indexable:i=t.indexable,_allKeys:s=t.allKeys}=n;return{allKeys:s,scriptable:e,indexable:i,isScriptable:ke(e)?e:()=>e,isIndexable:ke(i)?i:()=>i}}var Kp=(n,t)=>n?n+ks(t):t,ha=(n,t)=>rt(t)&&n!=="adapters"&&(Object.getPrototypeOf(t)===null||t.constructor===Object);function jh(n,t,e){if(Object.prototype.hasOwnProperty.call(n,t)||t==="constructor")return n[t];let i=e();return n[t]=i,i}function Qp(n,t,e){let{_proxy:i,_context:s,_subProxy:r,_descriptors:a}=n,h=i[t];return ke(h)&&a.isScriptable(t)&&(h=Jp(t,h,n,e)),bt(h)&&h.length&&(h=tm(t,h,n,a.isIndexable)),ha(t,h)&&(h=ei(h,s,r&&r[t],a)),h}function Jp(n,t,e,i){let{_proxy:s,_context:r,_subProxy:a,_stack:h}=e;if(h.has(n))throw new Error("Recursion detected: "+Array.from(h).join("->")+"->"+n);h.add(n);let c=t(r,a||i);return h.delete(n),ha(n,c)&&(c=ca(s._scopes,s,n,c)),c}function tm(n,t,e,i){let{_proxy:s,_context:r,_subProxy:a,_descriptors:h}=e;if(typeof r.index!="undefined"&&i(n))return t[r.index%t.length];if(rt(t[0])){let c=t,d=s._scopes.filter(f=>f!==c);t=[];for(let f of c){let m=ca(d,s,n,f);t.push(ei(m,r,a&&a[n],h))}}return t}function Uh(n,t,e){return ke(n)?n(t,e):n}var em=(n,t)=>n===!0?t:typeof n=="string"?Ce(t,n):void 0;function im(n,t,e,i,s){for(let r of t){let a=em(e,r);if(a){n.add(a);let h=Uh(a._fallback,e,s);if(typeof h!="undefined"&&h!==e&&h!==i)return h}else if(a===!1&&typeof i!="undefined"&&e!==i)return null}return!1}function ca(n,t,e,i){let s=t._rootScopes,r=Uh(t._fallback,e,i),a=[...n,...s],h=new Set;h.add(i);let c=wh(h,a,e,r||e,i);return c===null||typeof r!="undefined"&&r!==e&&(c=wh(h,a,r,c,i),c===null)?!1:As(Array.from(h),[""],s,r,()=>nm(t,e,i))}function wh(n,t,e,i,s){for(;e;)e=im(n,t,e,i,s);return e}function nm(n,t,e){let i=n._getTarget();t in i||(i[t]={});let s=i[t];return bt(s)&&rt(e)?e:s||{}}function sm(n,t,e,i){let s;for(let r of t)if(s=Gh(Kp(r,n),e),typeof s!="undefined")return ha(n,s)?ca(e,i,n,s):s}function Gh(n,t){for(let e of t){if(!e)continue;let i=e[n];if(typeof i!="undefined")return i}}function Mh(n){let t=n._keys;return t||(t=n._keys=om(n._scopes)),t}function om(n){let t=new Set;for(let e of n)for(let i of Object.keys(e).filter(s=>!s.startsWith("_")))t.add(i);return Array.from(t)}function ua(n,t,e,i){let{iScale:s}=n,{key:r="r"}=this._parsing,a=new Array(i),h,c,d,f;for(h=0,c=i;h<c;++h)d=h+e,f=t[d],a[h]={r:s.parse(Ce(f,r),d)};return a}var rm=Number.EPSILON||1e-14,Ci=(n,t)=>t<n.length&&!n[t].skip&&n[t],qh=n=>n==="x"?"y":"x";function am(n,t,e,i){let s=n.skip?t:n,r=t,a=e.skip?t:e,h=Ls(r,s),c=Ls(a,r),d=h/(h+c),f=c/(h+c);d=isNaN(d)?0:d,f=isNaN(f)?0:f;let m=i*d,_=i*f;return{previous:{x:r.x-m*(a.x-s.x),y:r.y-m*(a.y-s.y)},next:{x:r.x+_*(a.x-s.x),y:r.y+_*(a.y-s.y)}}}function lm(n,t,e){let i=n.length,s,r,a,h,c,d=Ci(n,0);for(let f=0;f<i-1;++f)if(c=d,d=Ci(n,f+1),!(!c||!d)){if(Di(t[f],0,rm)){e[f]=e[f+1]=0;continue}s=e[f]/t[f],r=e[f+1]/t[f],h=Math.pow(s,2)+Math.pow(r,2),!(h<=9)&&(a=3/Math.sqrt(h),e[f]=s*a*t[f],e[f+1]=r*a*t[f])}}function hm(n,t,e="x"){let i=qh(e),s=n.length,r,a,h,c=Ci(n,0);for(let d=0;d<s;++d){if(a=h,h=c,c=Ci(n,d+1),!h)continue;let f=h[e],m=h[i];a&&(r=(f-a[e])/3,h[`cp1${e}`]=f-r,h[`cp1${i}`]=m-r*t[d]),c&&(r=(c[e]-f)/3,h[`cp2${e}`]=f+r,h[`cp2${i}`]=m+r*t[d])}}function cm(n,t="x"){let e=qh(t),i=n.length,s=Array(i).fill(0),r=Array(i),a,h,c,d=Ci(n,0);for(a=0;a<i;++a)if(h=c,c=d,d=Ci(n,a+1),!!c){if(d){let f=d[t]-c[t];s[a]=f!==0?(d[e]-c[e])/f:0}r[a]=h?d?ae(s[a-1])!==ae(s[a])?0:(s[a-1]+s[a])/2:s[a-1]:s[a]}lm(n,s,r),hm(n,r,t)}function vs(n,t,e){return Math.max(Math.min(n,e),t)}function um(n,t){let e,i,s,r,a,h=pe(n[0],t);for(e=0,i=n.length;e<i;++e)a=r,r=h,h=e<i-1&&pe(n[e+1],t),r&&(s=n[e],a&&(s.cp1x=vs(s.cp1x,t.left,t.right),s.cp1y=vs(s.cp1y,t.top,t.bottom)),h&&(s.cp2x=vs(s.cp2x,t.left,t.right),s.cp2y=vs(s.cp2y,t.top,t.bottom)))}function Xh(n,t,e,i,s){let r,a,h,c;if(t.spanGaps&&(n=n.filter(d=>!d.skip)),t.cubicInterpolationMode==="monotone")cm(n,s);else{let d=i?n[n.length-1]:n[0];for(r=0,a=n.length;r<a;++r)h=n[r],c=am(d,h,n[Math.min(r+1,a-(i?0:1))%a],t.tension),h.cp1x=c.previous.x,h.cp1y=c.previous.y,h.cp2x=c.next.x,h.cp2y=c.next.y,d=h}t.capBezierPoints&&um(n,e)}function Es(){return typeof window!="undefined"&&typeof document!="undefined"}function zs(n){let t=n.parentNode;return t&&t.toString()==="[object ShadowRoot]"&&(t=t.host),t}function Ps(n,t,e){let i;return typeof n=="string"?(i=parseInt(n,10),n.indexOf("%")!==-1&&(i=i/100*t.parentNode[e])):i=n,i}var Rs=n=>n.ownerDocument.defaultView.getComputedStyle(n,null);function dm(n,t){return Rs(n).getPropertyValue(t)}var fm=["top","right","bottom","left"];function ti(n,t,e){let i={};e=e?"-"+e:"";for(let s=0;s<4;s++){let r=fm[s];i[r]=parseFloat(n[t+"-"+r+e])||0}return i.width=i.left+i.right,i.height=i.top+i.bottom,i}var pm=(n,t,e)=>(n>0||t>0)&&(!e||!e.shadowRoot);function mm(n,t){let e=n.touches,i=e&&e.length?e[0]:n,{offsetX:s,offsetY:r}=i,a=!1,h,c;if(pm(s,r,n.target))h=s,c=r;else{let d=t.getBoundingClientRect();h=i.clientX-d.left,c=i.clientY-d.top,a=!0}return{x:h,y:c,box:a}}function je(n,t){if("native"in n)return n;let{canvas:e,currentDevicePixelRatio:i}=t,s=Rs(e),r=s.boxSizing==="border-box",a=ti(s,"padding"),h=ti(s,"border","width"),{x:c,y:d,box:f}=mm(n,e),m=a.left+(f&&h.left),_=a.top+(f&&h.top),{width:y,height:x}=t;return r&&(y-=a.width+h.width,x-=a.height+h.height),{x:Math.round((c-m)/y*e.width/i),y:Math.round((d-_)/x*e.height/i)}}function gm(n,t,e){let i,s;if(t===void 0||e===void 0){let r=n&&zs(n);if(!r)t=n.clientWidth,e=n.clientHeight;else{let a=r.getBoundingClientRect(),h=Rs(r),c=ti(h,"border","width"),d=ti(h,"padding");t=a.width-d.width-c.width,e=a.height-d.height-c.height,i=Ps(h.maxWidth,r,"clientWidth"),s=Ps(h.maxHeight,r,"clientHeight")}}return{width:t,height:e,maxWidth:i||Ms,maxHeight:s||Ms}}var xs=n=>Math.round(n*10)/10;function $h(n,t,e,i){let s=Rs(n),r=ti(s,"margin"),a=Ps(s.maxWidth,n,"clientWidth")||Ms,h=Ps(s.maxHeight,n,"clientHeight")||Ms,c=gm(n,t,e),{width:d,height:f}=c;if(s.boxSizing==="content-box"){let _=ti(s,"border","width"),y=ti(s,"padding");d-=y.width+_.width,f-=y.height+_.height}return d=Math.max(0,d-r.width),f=Math.max(0,i?d/i:f-r.height),d=xs(Math.min(d,a,c.maxWidth)),f=xs(Math.min(f,h,c.maxHeight)),d&&!f&&(f=xs(d/2)),(t!==void 0||e!==void 0)&&i&&c.height&&f>c.height&&(f=c.height,d=xs(Math.floor(f*i))),{width:d,height:f}}function da(n,t,e){let i=t||1,s=Math.floor(n.height*i),r=Math.floor(n.width*i);n.height=Math.floor(n.height),n.width=Math.floor(n.width);let a=n.canvas;return a.style&&(e||!a.style.height&&!a.style.width)&&(a.style.height=`${n.height}px`,a.style.width=`${n.width}px`),n.currentDevicePixelRatio!==i||a.height!==s||a.width!==r?(n.currentDevicePixelRatio=i,a.height=s,a.width=r,n.ctx.setTransform(i,0,0,i,0,0),!0):!1}var Kh=function(){let n=!1;try{let t={get passive(){return n=!0,!1}};Es()&&(window.addEventListener("test",null,t),window.removeEventListener("test",null,t))}catch(t){}return n}();function fa(n,t){let e=dm(n,t),i=e&&e.match(/^(\d+)(\.\d+)?px$/);return i?+i[1]:void 0}function We(n,t,e,i){return{x:n.x+e*(t.x-n.x),y:n.y+e*(t.y-n.y)}}function Qh(n,t,e,i){return{x:n.x+e*(t.x-n.x),y:i==="middle"?e<.5?n.y:t.y:i==="after"?e<1?n.y:t.y:e>0?t.y:n.y}}function Jh(n,t,e,i){let s={x:n.cp2x,y:n.cp2y},r={x:t.cp1x,y:t.cp1y},a=We(n,s,e),h=We(s,r,e),c=We(r,t,e),d=We(a,h,e),f=We(h,c,e);return We(d,f,e)}var _m=function(n,t){return{x(e){return n+n+t-e},setWidth(e){t=e},textAlign(e){return e==="center"?e:e==="right"?"left":"right"},xPlus(e,i){return e-i},leftForLtr(e,i){return e-i}}},ym=function(){return{x(n){return n},setWidth(n){},textAlign(n){return n},xPlus(n,t){return n+t},leftForLtr(n,t){return n}}};function ni(n,t,e){return n?_m(t,e):ym()}function pa(n,t){let e,i;(t==="ltr"||t==="rtl")&&(e=n.canvas.style,i=[e.getPropertyValue("direction"),e.getPropertyPriority("direction")],e.setProperty("direction",t,"important"),n.prevTextDirection=i)}function ma(n,t){t!==void 0&&(delete n.prevTextDirection,n.canvas.style.setProperty("direction",t[0],t[1]))}function tc(n){return n==="angle"?{between:Ii,compare:zp,normalize:zt}:{between:ge,compare:(t,e)=>t-e,normalize:t=>t}}function Lh({start:n,end:t,count:e,loop:i,style:s}){return{start:n%e,end:t%e,loop:i&&(t-n+1)%e===0,style:s}}function vm(n,t,e){let{property:i,start:s,end:r}=e,{between:a,normalize:h}=tc(i),c=t.length,{start:d,end:f,loop:m}=n,_,y;if(m){for(d+=c,f+=c,_=0,y=c;_<y&&a(h(t[d%c][i]),s,r);++_)d--,f--;d%=c,f%=c}return f<d&&(f+=c),{start:d,end:f,loop:m,style:n.style}}function ga(n,t,e){if(!e)return[n];let{property:i,start:s,end:r}=e,a=t.length,{compare:h,between:c,normalize:d}=tc(i),{start:f,end:m,loop:_,style:y}=vm(n,t,e),x=[],b=!1,w=null,P,C,O,I=()=>c(s,O,P)&&h(s,O)!==0,D=()=>h(r,P)===0||c(r,O,P),z=()=>b||I(),R=()=>!b||D();for(let B=f,N=f;B<=m;++B)C=t[B%a],!C.skip&&(P=d(C[i]),P!==O&&(b=c(P,s,r),w===null&&z()&&(w=h(P,s)===0?B:N),w!==null&&R()&&(x.push(Lh({start:w,end:B,loop:_,count:a,style:y})),w=null),N=B,O=P));return w!==null&&x.push(Lh({start:w,end:m,loop:_,count:a,style:y})),x}function _a(n,t){let e=[],i=n.segments;for(let s=0;s<i.length;s++){let r=ga(i[s],n.points,t);r.length&&e.push(...r)}return e}function xm(n,t,e,i){let s=0,r=t-1;if(e&&!i)for(;s<t&&!n[s].skip;)s++;for(;s<t&&n[s].skip;)s++;for(s%=t,e&&(r+=s);r>s&&n[r%t].skip;)r--;return r%=t,{start:s,end:r}}function bm(n,t,e,i){let s=n.length,r=[],a=t,h=n[t],c;for(c=t+1;c<=e;++c){let d=n[c%s];d.skip||d.stop?h.skip||(i=!1,r.push({start:t%s,end:(c-1)%s,loop:i}),t=a=d.stop?c:null):(a=c,h.skip&&(t=c)),h=d}return a!==null&&r.push({start:t%s,end:a%s,loop:i}),r}function ec(n,t){let e=n.points,i=n.options.spanGaps,s=e.length;if(!s)return[];let r=!!n._loop,{start:a,end:h}=xm(e,s,r,i);if(i===!0)return Ph(n,[{start:a,end:h,loop:r}],e,t);let c=h<a?h+s:h,d=!!n._fullLoop&&a===0&&h===s-1;return Ph(n,bm(e,a,c,d),e,t)}function Ph(n,t,e,i){return!i||!i.setContext||!e?t:wm(n,t,e,i)}function wm(n,t,e,i){let s=n._chart.getContext(),r=kh(n.options),{_datasetIndex:a,options:{spanGaps:h}}=n,c=e.length,d=[],f=r,m=t[0].start,_=m;function y(x,b,w,P){let C=h?-1:1;if(x!==b){for(x+=c;e[x%c].skip;)x-=C;for(;e[b%c].skip;)b+=C;x%c!==b%c&&(d.push({start:x%c,end:b%c,loop:w,style:P}),f=P,m=b%c)}}for(let x of t){m=h?m:x.start;let b=e[m%c],w;for(_=m+1;_<=x.end;_++){let P=e[_%c];w=kh(i.setContext(Se(s,{type:"segment",p0:b,p1:P,p0DataIndex:(_-1)%c,p1DataIndex:_%c,datasetIndex:a}))),Mm(w,f)&&y(m,_-1,x.loop,f),b=P,f=w}m<_-1&&y(m,_-1,x.loop,f)}return d}function kh(n){return{backgroundColor:n.backgroundColor,borderCapStyle:n.borderCapStyle,borderDash:n.borderDash,borderDashOffset:n.borderDashOffset,borderJoinStyle:n.borderJoinStyle,borderWidth:n.borderWidth,borderColor:n.borderColor}}function Mm(n,t){if(!t)return!1;let e=[],i=function(s,r){return na(r)?(e.includes(r)||e.push(r),e.indexOf(r)):r};return JSON.stringify(n,i)!==JSON.stringify(t,i)}function bs(n,t,e){return n.options.clip?n[e]:t[e]}function Lm(n,t){let{xScale:e,yScale:i}=n;return e&&i?{left:bs(e,t,"left"),right:bs(e,t,"right"),top:bs(i,t,"top"),bottom:bs(i,t,"bottom")}:t}function ya(n,t){let e=t._clip;if(e.disabled)return!1;let i=Lm(t,n.chartArea);return{left:e.left===!1?0:i.left-(e.left===!0?0:e.left),right:e.right===!1?n.width:i.right+(e.right===!0?0:e.right),top:e.top===!1?0:i.top-(e.top===!0?0:e.top),bottom:e.bottom===!1?n.height:i.bottom+(e.bottom===!0?0:e.bottom)}}var Oa=class{constructor(){this._request=null,this._charts=new Map,this._running=!1,this._lastDate=void 0}_notify(t,e,i,s){let r=e.listeners[s],a=e.duration;r.forEach(h=>h({chart:t,initial:e.initial,numSteps:a,currentStep:Math.min(i-e.start,a)}))}_refresh(){this._request||(this._running=!0,this._request=Jr.call(window,()=>{this._update(),this._request=null,this._running&&this._refresh()}))}_update(t=Date.now()){let e=0;this._charts.forEach((i,s)=>{if(!i.running||!i.items.length)return;let r=i.items,a=r.length-1,h=!1,c;for(;a>=0;--a)c=r[a],c._active?(c._total>i.duration&&(i.duration=c._total),c.tick(t),h=!0):(r[a]=r[r.length-1],r.pop());h&&(s.draw(),this._notify(s,i,t,"progress")),r.length||(i.running=!1,this._notify(s,i,t,"complete"),i.initial=!1),e+=r.length}),this._lastDate=t,e===0&&(this._running=!1)}_getAnims(t){let e=this._charts,i=e.get(t);return i||(i={running:!1,initial:!0,items:[],listeners:{complete:[],progress:[]}},e.set(t,i)),i}listen(t,e,i){this._getAnims(t).listeners[e].push(i)}add(t,e){!e||!e.length||this._getAnims(t).items.push(...e)}has(t){return this._getAnims(t).items.length>0}start(t){let e=this._charts.get(t);e&&(e.running=!0,e.start=Date.now(),e.duration=e.items.reduce((i,s)=>Math.max(i,s._duration),0),this._refresh())}running(t){if(!this._running)return!1;let e=this._charts.get(t);return!(!e||!e.running||!e.items.length)}stop(t){let e=this._charts.get(t);if(!e||!e.items.length)return;let i=e.items,s=i.length-1;for(;s>=0;--s)i[s].cancel();e.items=[],this._notify(t,e,Date.now(),"complete")}remove(t){return this._charts.delete(t)}},Oe=new Oa,ic="transparent",Pm={boolean(n,t,e){return e>.5?t:n},color(n,t,e){let i=sa(n||ic),s=i.valid&&sa(t||ic);return s&&s.valid?s.mix(i,e).hexString():t},number(n,t,e){return n+(t-n)*e}},Da=class{constructor(t,e,i,s){let r=e[i];s=zi([t.to,s,r,t.from]);let a=zi([t.from,r,s]);this._active=!0,this._fn=t.fn||Pm[t.type||typeof a],this._easing=ki[t.easing]||ki.linear,this._start=Math.floor(Date.now()+(t.delay||0)),this._duration=this._total=Math.floor(t.duration),this._loop=!!t.loop,this._target=e,this._prop=i,this._from=a,this._to=s,this._promises=void 0}active(){return this._active}update(t,e,i){if(this._active){this._notify(!1);let 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=zi([t.to,e,s,t.from]),this._from=zi([t.from,s,e])}}cancel(){this._active&&(this.tick(Date.now()),this._active=!1,this._notify(!1))}tick(t){let e=t-this._start,i=this._duration,s=this._prop,r=this._from,a=this._loop,h=this._to,c;if(this._active=r!==h&&(a||e<i),!this._active){this._target[s]=h,this._notify(!0);return}if(e<0){this._target[s]=r;return}c=e/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,h,c)}wait(){let t=this._promises||(this._promises=[]);return new Promise((e,i)=>{t.push({res:e,rej:i})})}_notify(t){let e=t?"res":"rej",i=this._promises||[];for(let s=0;s<i.length;s++)i[s][e]()}},js=class{constructor(t,e){this._chart=t,this._properties=new Map,this.configure(e)}configure(t){if(!rt(t))return;let e=Object.keys(Mt.animation),i=this._properties;Object.getOwnPropertyNames(t).forEach(s=>{let r=t[s];if(!rt(r))return;let a={};for(let h of e)a[h]=r[h];(bt(r.properties)&&r.properties||[s]).forEach(h=>{(h===s||!i.has(h))&&i.set(h,a)})})}_animateOptions(t,e){let i=e.options,s=Tm(t,i);if(!s)return[];let r=this._createAnimations(s,i);return i.$shared&&km(t.options.$animations,i).then(()=>{t.options=i},()=>{}),r}_createAnimations(t,e){let i=this._properties,s=[],r=t.$animations||(t.$animations={}),a=Object.keys(e),h=Date.now(),c;for(c=a.length-1;c>=0;--c){let d=a[c];if(d.charAt(0)==="$")continue;if(d==="options"){s.push(...this._animateOptions(t,e));continue}let f=e[d],m=r[d],_=i.get(d);if(m)if(_&&m.active()){m.update(_,f,h);continue}else m.cancel();if(!_||!_.duration){t[d]=f;continue}r[d]=m=new Da(_,t,d,f),s.push(m)}return s}update(t,e){if(this._properties.size===0){Object.assign(t,e);return}let i=this._createAnimations(t,e);if(i.length)return Oe.add(this._chart,i),!0}};function km(n,t){let e=[],i=Object.keys(t);for(let s=0;s<i.length;s++){let r=n[i[s]];r&&r.active()&&e.push(r.wait())}return Promise.all(e)}function Tm(n,t){if(!t)return;let e=n.options;if(!e){n.options=t;return}return e.$shared&&(n.options=e=Object.assign({},e,{$shared:!1,$animations:{}})),e}function nc(n,t){let e=n&&n.options||{},i=e.reverse,s=e.min===void 0?t:0,r=e.max===void 0?t:0;return{start:i?r:s,end:i?s:r}}function Cm(n,t,e){if(e===!1)return!1;let i=nc(n,e),s=nc(t,e);return{top:s.end,right:i.end,bottom:s.start,left:i.start}}function Sm(n){let t,e,i,s;return rt(n)?(t=n.top,e=n.right,i=n.bottom,s=n.left):t=e=i=s=n,{top:t,right:e,bottom:i,left:s,disabled:n===!1}}function eu(n,t){let e=[],i=n._getSortedDatasetMetas(t),s,r;for(s=0,r=i.length;s<r;++s)e.push(i[s].index);return e}function sc(n,t,e,i={}){let s=n.keys,r=i.mode==="single",a,h,c,d;if(t===null)return;let f=!1;for(a=0,h=s.length;a<h;++a){if(c=+s[a],c===e){if(f=!0,i.all)continue;break}d=n.values[c],Pt(d)&&(r||t===0||ae(t)===ae(d))&&(t+=d)}return!f&&!i.all?0:t}function Om(n,t){let{iScale:e,vScale:i}=t,s=e.axis==="x"?"x":"y",r=i.axis==="x"?"x":"y",a=Object.keys(n),h=new Array(a.length),c,d,f;for(c=0,d=a.length;c<d;++c)f=a[c],h[c]={[s]:f,[r]:n[f]};return h}function va(n,t){let e=n&&n.options.stacked;return e||e===void 0&&t.stack!==void 0}function Dm(n,t,e){return`${n.id}.${t.id}.${e.stack||e.type}`}function Im(n){let{min:t,max:e,minDefined:i,maxDefined:s}=n.getUserBounds();return{min:i?t:Number.NEGATIVE_INFINITY,max:s?e:Number.POSITIVE_INFINITY}}function Am(n,t,e){let i=n[t]||(n[t]={});return i[e]||(i[e]={})}function oc(n,t,e,i){for(let s of t.getMatchingVisibleMetas(i).reverse()){let r=n[s.index];if(e&&r>0||!e&&r<0)return s.index}return null}function rc(n,t){let{chart:e,_cachedMeta:i}=n,s=e._stacks||(e._stacks={}),{iScale:r,vScale:a,index:h}=i,c=r.axis,d=a.axis,f=Dm(r,a,i),m=t.length,_;for(let y=0;y<m;++y){let x=t[y],{[c]:b,[d]:w}=x,P=x._stacks||(x._stacks={});_=P[d]=Am(s,f,b),_[h]=w,_._top=oc(_,a,!0,i.type),_._bottom=oc(_,a,!1,i.type);let C=_._visualValues||(_._visualValues={});C[h]=w}}function xa(n,t){let e=n.scales;return Object.keys(e).filter(i=>e[i].axis===t).shift()}function Em(n,t){return Se(n,{active:!1,dataset:void 0,datasetIndex:t,index:t,mode:"default",type:"dataset"})}function zm(n,t,e){return Se(n,{active:!1,dataIndex:t,parsed:void 0,raw:void 0,element:e,index:t,mode:"default",type:"data"})}function kn(n,t){let e=n.controller.index,i=n.vScale&&n.vScale.axis;if(i){t=t||n._parsed;for(let s of t){let r=s._stacks;if(!r||r[i]===void 0||r[i][e]===void 0)return;delete r[i][e],r[i]._visualValues!==void 0&&r[i]._visualValues[e]!==void 0&&delete r[i]._visualValues[e]}}}var ba=n=>n==="reset"||n==="none",ac=(n,t)=>t?n:Object.assign({},n),Rm=(n,t,e)=>n&&!t.hidden&&t._stacked&&{keys:eu(e,!0),values:null},Xt=class{constructor(t,e){this.chart=t,this._ctx=t.ctx,this.index=e,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(){let t=this._cachedMeta;this.configure(),this.linkScales(),t._stacked=va(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&&kn(this._cachedMeta),this.index=t}linkScales(){let t=this.chart,e=this._cachedMeta,i=this.getDataset(),s=(m,_,y,x)=>m==="x"?_:m==="r"?x:y,r=e.xAxisID=$(i.xAxisID,xa(t,"x")),a=e.yAxisID=$(i.yAxisID,xa(t,"y")),h=e.rAxisID=$(i.rAxisID,xa(t,"r")),c=e.indexAxis,d=e.iAxisID=s(c,r,a,h),f=e.vAxisID=s(c,a,r,h);e.xScale=this.getScaleForId(r),e.yScale=this.getScaleForId(a),e.rScale=this.getScaleForId(h),e.iScale=this.getScaleForId(d),e.vScale=this.getScaleForId(f)}getDataset(){return this.chart.data.datasets[this.index]}getMeta(){return this.chart.getDatasetMeta(this.index)}getScaleForId(t){return this.chart.scales[t]}_getOtherScale(t){let e=this._cachedMeta;return t===e.iScale?e.vScale:e.iScale}reset(){this._update("reset")}_destroy(){let t=this._cachedMeta;this._data&&Kr(this._data,this),t._stacked&&kn(t)}_dataCheck(){let t=this.getDataset(),e=t.data||(t.data=[]),i=this._data;if(rt(e)){let s=this._cachedMeta;this._data=Om(e,s)}else if(i!==e){if(i){Kr(i,this);let s=this._cachedMeta;kn(s),s._parsed=[]}e&&Object.isExtensible(e)&&Bh(e,this),this._syncList=[],this._data=e}}addElements(){let t=this._cachedMeta;this._dataCheck(),this.datasetElementType&&(t.dataset=new this.datasetElementType)}buildOrUpdateElements(t){let e=this._cachedMeta,i=this.getDataset(),s=!1;this._dataCheck();let r=e._stacked;e._stacked=va(e.vScale,e),e.stack!==i.stack&&(s=!0,kn(e),e.stack=i.stack),this._resyncElements(t),(s||r!==e._stacked)&&(rc(this,e._parsed),e._stacked=va(e.vScale,e))}configure(){let t=this.chart.config,e=t.datasetScopeKeys(this._type),i=t.getOptionScopes(this.getDataset(),e,!0);this.options=t.createResolver(i,this.getContext()),this._parsing=this.options.parsing,this._cachedDataOpts={}}parse(t,e){let{_cachedMeta:i,_data:s}=this,{iScale:r,_stacked:a}=i,h=r.axis,c=t===0&&e===s.length?!0:i._sorted,d=t>0&&i._parsed[t-1],f,m,_;if(this._parsing===!1)i._parsed=s,i._sorted=!0,_=s;else{bt(s[t])?_=this.parseArrayData(i,s,t,e):rt(s[t])?_=this.parseObjectData(i,s,t,e):_=this.parsePrimitiveData(i,s,t,e);let y=()=>m[h]===null||d&&m[h]<d[h];for(f=0;f<e;++f)i._parsed[f+t]=m=_[f],c&&(y()&&(c=!1),d=m);i._sorted=c}a&&rc(this,_)}parsePrimitiveData(t,e,i,s){let{iScale:r,vScale:a}=t,h=r.axis,c=a.axis,d=r.getLabels(),f=r===a,m=new Array(s),_,y,x;for(_=0,y=s;_<y;++_)x=_+i,m[_]={[h]:f||r.parse(d[x],x),[c]:a.parse(e[x],x)};return m}parseArrayData(t,e,i,s){let{xScale:r,yScale:a}=t,h=new Array(s),c,d,f,m;for(c=0,d=s;c<d;++c)f=c+i,m=e[f],h[c]={x:r.parse(m[0],f),y:a.parse(m[1],f)};return h}parseObjectData(t,e,i,s){let{xScale:r,yScale:a}=t,{xAxisKey:h="x",yAxisKey:c="y"}=this._parsing,d=new Array(s),f,m,_,y;for(f=0,m=s;f<m;++f)_=f+i,y=e[_],d[f]={x:r.parse(Ce(y,h),_),y:a.parse(Ce(y,c),_)};return d}getParsed(t){return this._cachedMeta._parsed[t]}getDataElement(t){return this._cachedMeta.data[t]}applyStack(t,e,i){let s=this.chart,r=this._cachedMeta,a=e[t.axis],h={keys:eu(s,!0),values:e._stacks[t.axis]._visualValues};return sc(h,a,r.index,{mode:i})}updateRangeFromParsed(t,e,i,s){let r=i[e.axis],a=r===null?NaN:r,h=s&&i._stacks[e.axis];s&&h&&(s.values=h,a=sc(s,r,this._cachedMeta.index)),t.min=Math.min(t.min,a),t.max=Math.max(t.max,a)}getMinMax(t,e){let i=this._cachedMeta,s=i._parsed,r=i._sorted&&t===i.iScale,a=s.length,h=this._getOtherScale(t),c=Rm(e,i,this.chart),d={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY},{min:f,max:m}=Im(h),_,y;function x(){y=s[_];let b=y[h.axis];return!Pt(y[t.axis])||f>b||m<b}for(_=0;_<a&&!(!x()&&(this.updateRangeFromParsed(d,t,y,c),r));++_);if(r){for(_=a-1;_>=0;--_)if(!x()){this.updateRangeFromParsed(d,t,y,c);break}}return d}getAllParsedValues(t){let e=this._cachedMeta._parsed,i=[],s,r,a;for(s=0,r=e.length;s<r;++s)a=e[s][t.axis],Pt(a)&&i.push(a);return i}getMaxOverflow(){return!1}getLabelAndValue(t){let e=this._cachedMeta,i=e.iScale,s=e.vScale,r=this.getParsed(t);return{label:i?""+i.getLabelForValue(r[i.axis]):"",value:s?""+s.getLabelForValue(r[s.axis]):""}}_update(t){let e=this._cachedMeta;this.update(t||"default"),e._clip=Sm($(this.options.clip,Cm(e.xScale,e.yScale,this.getMaxOverflow())))}update(t){}draw(){let t=this._ctx,e=this.chart,i=this._cachedMeta,s=i.data||[],r=e.chartArea,a=[],h=this._drawStart||0,c=this._drawCount||s.length-h,d=this.options.drawActiveElementsOnTop,f;for(i.dataset&&i.dataset.draw(t,r,h,c),f=h;f<h+c;++f){let m=s[f];m.hidden||(m.active&&d?a.push(m):m.draw(t,r))}for(f=0;f<a.length;++f)a[f].draw(t,r)}getStyle(t,e){let i=e?"active":"default";return t===void 0&&this._cachedMeta.dataset?this.resolveDatasetElementOptions(i):this.resolveDataElementOptions(t||0,i)}getContext(t,e,i){let s=this.getDataset(),r;if(t>=0&&t<this._cachedMeta.data.length){let a=this._cachedMeta.data[t];r=a.$context||(a.$context=zm(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=Em(this.chart.getContext(),this.index)),r.dataset=s,r.index=r.datasetIndex=this.index;return r.active=!!e,r.mode=i,r}resolveDatasetElementOptions(t){return this._resolveElementOptions(this.datasetElementType.id,t)}resolveDataElementOptions(t,e){return this._resolveElementOptions(this.dataElementType.id,e,t)}_resolveElementOptions(t,e="default",i){let s=e==="active",r=this._cachedDataOpts,a=t+"-"+e,h=r[a],c=this.enableOptionSharing&&Oi(i);if(h)return ac(h,c);let d=this.chart.config,f=d.datasetElementScopeKeys(this._type,t),m=s?[`${t}Hover`,"hover",t,""]:[t,""],_=d.getOptionScopes(this.getDataset(),f),y=Object.keys(Mt.elements[t]),x=()=>this.getContext(i,s,e),b=d.resolveNamedOptions(_,y,x,m);return b.$shared&&(b.$shared=c,r[a]=Object.freeze(ac(b,c))),b}_resolveAnimations(t,e,i){let s=this.chart,r=this._cachedDataOpts,a=`animation-${e}`,h=r[a];if(h)return h;let c;if(s.options.animation!==!1){let f=this.chart.config,m=f.datasetAnimationScopeKeys(this._type,e),_=f.getOptionScopes(this.getDataset(),m);c=f.createResolver(_,this.getContext(t,i,e))}let d=new js(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,e){return!e||ba(t)||this.chart._animationsDisabled}_getSharedOptions(t,e){let i=this.resolveDataElementOptions(t,e),s=this._sharedOptions,r=this.getSharedOptions(i),a=this.includeOptions(e,r)||r!==s;return this.updateSharedOptions(r,e,i),{sharedOptions:r,includeOptions:a}}updateElement(t,e,i,s){ba(s)?Object.assign(t,i):this._resolveAnimations(e,s).update(t,i)}updateSharedOptions(t,e,i){t&&!ba(e)&&this._resolveAnimations(void 0,e).update(t,i)}_setStyle(t,e,i,s){t.active=s;let r=this.getStyle(e,s);this._resolveAnimations(e,i,s).update(t,{options:!s&&this.getSharedOptions(r)||r})}removeHoverStyle(t,e,i){this._setStyle(t,i,"active",!1)}setHoverStyle(t,e,i){this._setStyle(t,i,"active",!0)}_removeDatasetHoverStyle(){let t=this._cachedMeta.dataset;t&&this._setStyle(t,void 0,"active",!1)}_setDatasetHoverStyle(){let t=this._cachedMeta.dataset;t&&this._setStyle(t,void 0,"active",!0)}_resyncElements(t){let e=this._data,i=this._cachedMeta.data;for(let[h,c,d]of this._syncList)this[h](c,d);this._syncList=[];let s=i.length,r=e.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,e,i=!0){let s=this._cachedMeta,r=s.data,a=t+e,h,c=d=>{for(d.length+=e,h=d.length-1;h>=a;h--)d[h]=d[h-e]};for(c(r),h=t;h<a;++h)r[h]=new this.dataElementType;this._parsing&&c(s._parsed),this.parse(t,e),i&&this.updateElements(r,t,e,"reset")}updateElements(t,e,i,s){}_removeElements(t,e){let i=this._cachedMeta;if(this._parsing){let s=i._parsed.splice(t,e);i._stacked&&kn(i,s)}i.data.splice(t,e)}_sync(t){if(this._parsing)this._syncList.push(t);else{let[e,i,s]=t;this[e](i,s)}this.chart._dataChanges.push([this.index,...t])}_onDataPush(){let 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,e){e&&this._sync(["_removeElements",t,e]);let i=arguments.length-2;i&&this._sync(["_insertElements",t,i])}_onDataUnshift(){this._sync(["_insertElements",0,arguments.length])}};k(Xt,"defaults",{}),k(Xt,"datasetElementType",null),k(Xt,"dataElementType",null);function Bm(n,t){if(!n._cache.$bar){let e=n.getMatchingVisibleMetas(t),i=[];for(let s=0,r=e.length;s<r;s++)i=i.concat(e[s].controller.getAllParsedValues(n));n._cache.$bar=Qr(i.sort((s,r)=>s-r))}return n._cache.$bar}function Fm(n){let t=n.iScale,e=Bm(t,n.type),i=t._length,s,r,a,h,c=()=>{a===32767||a===-32768||(Oi(h)&&(i=Math.min(i,Math.abs(a-h)||i)),h=a)};for(s=0,r=e.length;s<r;++s)a=t.getPixelForValue(e[s]),c();for(h=void 0,s=0,r=t.ticks.length;s<r;++s)a=t.getPixelForTick(s),c();return i}function Nm(n,t,e,i){let s=e.barThickness,r,a;return it(s)?(r=t.min*e.categoryPercentage,a=e.barPercentage):(r=s*i,a=1),{chunk:r/i,ratio:a,start:t.pixels[n]-r/2}}function Wm(n,t,e,i){let s=t.pixels,r=s[n],a=n>0?s[n-1]:null,h=n<s.length-1?s[n+1]:null,c=e.categoryPercentage;a===null&&(a=r-(h===null?t.end-t.start:h-r)),h===null&&(h=r+r-a);let d=r-(r-Math.min(a,h))/2*c;return{chunk:Math.abs(h-a)/2*c/i,ratio:e.barPercentage,start:d}}function Hm(n,t,e,i){let s=e.parse(n[0],i),r=e.parse(n[1],i),a=Math.min(s,r),h=Math.max(s,r),c=a,d=h;Math.abs(a)>Math.abs(h)&&(c=h,d=a),t[e.axis]=d,t._custom={barStart:c,barEnd:d,start:s,end:r,min:a,max:h}}function iu(n,t,e,i){return bt(n)?Hm(n,t,e,i):t[e.axis]=e.parse(n,i),t}function lc(n,t,e,i){let s=n.iScale,r=n.vScale,a=s.getLabels(),h=s===r,c=[],d,f,m,_;for(d=e,f=e+i;d<f;++d)_=t[d],m={},m[s.axis]=h||s.parse(a[d],d),c.push(iu(_,m,r,d));return c}function wa(n){return n&&n.barStart!==void 0&&n.barEnd!==void 0}function Zm(n,t,e){return n!==0?ae(n):(t.isHorizontal()?1:-1)*(t.min>=e?1:-1)}function Vm(n){let t,e,i,s,r;return n.horizontal?(t=n.base>n.x,e="left",i="right"):(t=n.base<n.y,e="bottom",i="top"),t?(s="end",r="start"):(s="start",r="end"),{start:e,end:i,reverse:t,top:s,bottom:r}}function Ym(n,t,e,i){let s=t.borderSkipped,r={};if(!s){n.borderSkipped=r;return}if(s===!0){n.borderSkipped={top:!0,right:!0,bottom:!0,left:!0};return}let{start:a,end:h,reverse:c,top:d,bottom:f}=Vm(n);s==="middle"&&e&&(n.enableBorderRadius=!0,(e._top||0)===i?s=d:(e._bottom||0)===i?s=f:(r[hc(f,a,h,c)]=!0,s=d)),r[hc(s,a,h,c)]=!0,n.borderSkipped=r}function hc(n,t,e,i){return i?(n=jm(n,t,e),n=cc(n,e,t)):n=cc(n,t,e),n}function jm(n,t,e){return n===t?e:n===e?t:n}function cc(n,t,e){return n==="start"?t:n==="end"?e:n}function Um(n,{inflateAmount:t},e){n.inflateAmount=t==="auto"?e===1?.33:0:t}var Bi=class extends Xt{parsePrimitiveData(t,e,i,s){return lc(t,e,i,s)}parseArrayData(t,e,i,s){return lc(t,e,i,s)}parseObjectData(t,e,i,s){let{iScale:r,vScale:a}=t,{xAxisKey:h="x",yAxisKey:c="y"}=this._parsing,d=r.axis==="x"?h:c,f=a.axis==="x"?h:c,m=[],_,y,x,b;for(_=i,y=i+s;_<y;++_)b=e[_],x={},x[r.axis]=r.parse(Ce(b,d),_),m.push(iu(Ce(b,f),x,a,_));return m}updateRangeFromParsed(t,e,i,s){super.updateRangeFromParsed(t,e,i,s);let r=i._custom;r&&e===this._cachedMeta.vScale&&(t.min=Math.min(t.min,r.min),t.max=Math.max(t.max,r.max))}getMaxOverflow(){return 0}getLabelAndValue(t){let e=this._cachedMeta,{iScale:i,vScale:s}=e,r=this.getParsed(t),a=r._custom,h=wa(a)?"["+a.start+", "+a.end+"]":""+s.getLabelForValue(r[s.axis]);return{label:""+i.getLabelForValue(r[i.axis]),value:h}}initialize(){this.enableOptionSharing=!0,super.initialize();let t=this._cachedMeta;t.stack=this.getDataset().stack}update(t){let e=this._cachedMeta;this.updateElements(e.data,0,e.data.length,t)}updateElements(t,e,i,s){let r=s==="reset",{index:a,_cachedMeta:{vScale:h}}=this,c=h.getBasePixel(),d=h.isHorizontal(),f=this._getRuler(),{sharedOptions:m,includeOptions:_}=this._getSharedOptions(e,s);for(let y=e;y<e+i;y++){let x=this.getParsed(y),b=r||it(x[h.axis])?{base:c,head:c}:this._calculateBarValuePixels(y),w=this._calculateBarIndexPixels(y,f),P=(x._stacks||{})[h.axis],C={horizontal:d,base:b.base,enableBorderRadius:!P||wa(x._custom)||a===P._top||a===P._bottom,x:d?b.head:w.center,y:d?w.center:b.head,height:d?w.size:Math.abs(b.size),width:d?Math.abs(b.size):w.size};_&&(C.options=m||this.resolveDataElementOptions(y,t[y].active?"active":s));let O=C.options||t[y].options;Ym(C,O,P,a),Um(C,O,f.ratio),this.updateElement(t[y],y,C,s)}}_getStacks(t,e){let{iScale:i}=this._cachedMeta,s=i.getMatchingVisibleMetas(this._type).filter(f=>f.controller.options.grouped),r=i.options.stacked,a=[],h=this._cachedMeta.controller.getParsed(e),c=h&&h[i.axis],d=f=>{let m=f._parsed.find(y=>y[i.axis]===c),_=m&&m[f.vScale.axis];if(it(_)||isNaN(_))return!0};for(let f of s)if(!(e!==void 0&&d(f))&&((r===!1||a.indexOf(f.stack)===-1||r===void 0&&f.stack===void 0)&&a.push(f.stack),f.index===t))break;return a.length||a.push(void 0),a}_getStackCount(t){return this._getStacks(void 0,t).length}_getAxisCount(){return this._getAxis().length}getFirstScaleIdForIndexAxis(){let t=this.chart.scales,e=this.chart.options.indexAxis;return Object.keys(t).filter(i=>t[i].axis===e).shift()}_getAxis(){let t={},e=this.getFirstScaleIdForIndexAxis();for(let i of this.chart.data.datasets)t[$(this.chart.options.indexAxis==="x"?i.xAxisID:i.yAxisID,e)]=!0;return Object.keys(t)}_getStackIndex(t,e,i){let s=this._getStacks(t,i),r=e!==void 0?s.indexOf(e):-1;return r===-1?s.length-1:r}_getRuler(){let t=this.options,e=this._cachedMeta,i=e.iScale,s=[],r,a;for(r=0,a=e.data.length;r<a;++r)s.push(i.getPixelForValue(this.getParsed(r)[i.axis],r));let h=t.barThickness;return{min:h||Fm(e),pixels:s,start:i._startPixel,end:i._endPixel,stackCount:this._getStackCount(),scale:i,grouped:t.grouped,ratio:h?1:t.categoryPercentage*t.barPercentage}}_calculateBarValuePixels(t){let{_cachedMeta:{vScale:e,_stacked:i,index:s},options:{base:r,minBarLength:a}}=this,h=r||0,c=this.getParsed(t),d=c._custom,f=wa(d),m=c[e.axis],_=0,y=i?this.applyStack(e,c,i):m,x,b;y!==m&&(_=y-m,y=m),f&&(m=d.barStart,y=d.barEnd-d.barStart,m!==0&&ae(m)!==ae(d.barEnd)&&(_=0),_+=m);let w=!it(r)&&!f?r:_,P=e.getPixelForValue(w);if(this.chart.getDataVisibility(t)?x=e.getPixelForValue(_+y):x=P,b=x-P,Math.abs(b)<a){b=Zm(b,e,h)*a,m===h&&(P-=b/2);let C=e.getPixelForDecimal(0),O=e.getPixelForDecimal(1),I=Math.min(C,O),D=Math.max(C,O);P=Math.max(Math.min(P,D),I),x=P+b,i&&!f&&(c._stacks[e.axis]._visualValues[s]=e.getValueForPixel(x)-e.getValueForPixel(P))}if(P===e.getPixelForValue(h)){let C=ae(b)*e.getLineWidthForValue(h)/2;P+=C,b-=C}return{size:b,base:P,head:x,center:x+b/2}}_calculateBarIndexPixels(t,e){let i=e.scale,s=this.options,r=s.skipNull,a=$(s.maxBarThickness,1/0),h,c,d=this._getAxisCount();if(e.grouped){let f=r?this._getStackCount(t):e.stackCount,m=s.barThickness==="flex"?Wm(t,e,s,f*d):Nm(t,e,s,f*d),_=this.chart.options.indexAxis==="x"?this.getDataset().xAxisID:this.getDataset().yAxisID,y=this._getAxis().indexOf($(_,this.getFirstScaleIdForIndexAxis())),x=this._getStackIndex(this.index,this._cachedMeta.stack,r?t:void 0)+y;h=m.start+m.chunk*x+m.chunk/2,c=Math.min(a,m.chunk*m.ratio)}else h=i.getPixelForValue(this.getParsed(t)[i.axis],t),c=Math.min(a,e.min*e.ratio);return{base:h-c/2,head:h+c/2,center:h,size:c}}draw(){let t=this._cachedMeta,e=t.vScale,i=t.data,s=i.length,r=0;for(;r<s;++r)this.getParsed(r)[e.axis]!==null&&!i[r].hidden&&i[r].draw(this._ctx)}};k(Bi,"id","bar"),k(Bi,"defaults",{datasetElementType:!1,dataElementType:"bar",categoryPercentage:.8,barPercentage:.9,grouped:!0,animations:{numbers:{type:"number",properties:["x","y","base","width","height"]}}}),k(Bi,"overrides",{scales:{_index_:{type:"category",offset:!0,grid:{offset:!0}},_value_:{type:"linear",beginAtZero:!0}}});var Fi=class extends Xt{initialize(){this.enableOptionSharing=!0,super.initialize()}parsePrimitiveData(t,e,i,s){let r=super.parsePrimitiveData(t,e,i,s);for(let a=0;a<r.length;a++)r[a]._custom=this.resolveDataElementOptions(a+i).radius;return r}parseArrayData(t,e,i,s){let r=super.parseArrayData(t,e,i,s);for(let a=0;a<r.length;a++){let h=e[i+a];r[a]._custom=$(h[2],this.resolveDataElementOptions(a+i).radius)}return r}parseObjectData(t,e,i,s){let r=super.parseObjectData(t,e,i,s);for(let a=0;a<r.length;a++){let h=e[i+a];r[a]._custom=$(h&&h.r&&+h.r,this.resolveDataElementOptions(a+i).radius)}return r}getMaxOverflow(){let t=this._cachedMeta.data,e=0;for(let i=t.length-1;i>=0;--i)e=Math.max(e,t[i].size(this.resolveDataElementOptions(i))/2);return e>0&&e}getLabelAndValue(t){let e=this._cachedMeta,i=this.chart.data.labels||[],{xScale:s,yScale:r}=e,a=this.getParsed(t),h=s.getLabelForValue(a.x),c=r.getLabelForValue(a.y),d=a._custom;return{label:i[t]||"",value:"("+h+", "+c+(d?", "+d:"")+")"}}update(t){let e=this._cachedMeta.data;this.updateElements(e,0,e.length,t)}updateElements(t,e,i,s){let r=s==="reset",{iScale:a,vScale:h}=this._cachedMeta,{sharedOptions:c,includeOptions:d}=this._getSharedOptions(e,s),f=a.axis,m=h.axis;for(let _=e;_<e+i;_++){let y=t[_],x=!r&&this.getParsed(_),b={},w=b[f]=r?a.getPixelForDecimal(.5):a.getPixelForValue(x[f]),P=b[m]=r?h.getBasePixel():h.getPixelForValue(x[m]);b.skip=isNaN(w)||isNaN(P),d&&(b.options=c||this.resolveDataElementOptions(_,y.active?"active":s),r&&(b.options.radius=0)),this.updateElement(y,_,b,s)}}resolveDataElementOptions(t,e){let i=this.getParsed(t),s=super.resolveDataElementOptions(t,e);s.$shared&&(s=Object.assign({},s,{$shared:!1}));let r=s.radius;return e!=="active"&&(s.radius=0),s.radius+=$(i&&i._custom,r),s}};k(Fi,"id","bubble"),k(Fi,"defaults",{datasetElementType:!1,dataElementType:"point",animations:{numbers:{type:"number",properties:["x","y","borderWidth","radius"]}}}),k(Fi,"overrides",{scales:{x:{type:"linear"},y:{type:"linear"}}});function Gm(n,t,e){let i=1,s=1,r=0,a=0;if(t<wt){let h=n,c=h+t,d=Math.cos(h),f=Math.sin(h),m=Math.cos(c),_=Math.sin(c),y=(O,I,D)=>Ii(O,h,c,!0)?1:Math.max(I,I*e,D,D*e),x=(O,I,D)=>Ii(O,h,c,!0)?-1:Math.min(I,I*e,D,D*e),b=y(0,d,m),w=y(Tt,f,_),P=x(ut,d,m),C=x(ut+Tt,f,_);i=(b-P)/2,s=(w-C)/2,r=-(b+P)/2,a=-(w+C)/2}return{ratioX:i,ratioY:s,offsetX:r,offsetY:a}}var Ie=class extends Xt{constructor(t,e){super(t,e),this.enableOptionSharing=!0,this.innerRadius=void 0,this.outerRadius=void 0,this.offsetX=void 0,this.offsetY=void 0}linkScales(){}parse(t,e){let i=this.getDataset().data,s=this._cachedMeta;if(this._parsing===!1)s._parsed=i;else{let r=c=>+i[c];if(rt(i[t])){let{key:c="value"}=this._parsing;r=d=>+Ce(i[d],c)}let a,h;for(a=t,h=t+e;a<h;++a)s._parsed[a]=r(a)}}_getRotation(){return ee(this.options.rotation-90)}_getCircumference(){return ee(this.options.circumference)}_getRotationExtents(){let t=wt,e=-wt;for(let i=0;i<this.chart.data.datasets.length;++i)if(this.chart.isDatasetVisible(i)&&this.chart.getDatasetMeta(i).type===this._type){let s=this.chart.getDatasetMeta(i).controller,r=s._getRotation(),a=s._getCircumference();t=Math.min(t,r),e=Math.max(e,r+a)}return{rotation:t,circumference:e-t}}update(t){let e=this.chart,{chartArea:i}=e,s=this._cachedMeta,r=s.data,a=this.getMaxBorderWidth()+this.getMaxOffset(r)+this.options.spacing,h=Math.max((Math.min(i.width,i.height)-a)/2,0),c=Math.min(Ch(this.options.cutout,h),1),d=this._getRingWeight(this.index),{circumference:f,rotation:m}=this._getRotationExtents(),{ratioX:_,ratioY:y,offsetX:x,offsetY:b}=Gm(m,f,c),w=(i.width-a)/_,P=(i.height-a)/y,C=Math.max(Math.min(w,P)/2,0),O=jr(this.options.radius,C),I=Math.max(O*c,0),D=(O-I)/this._getVisibleDatasetWeightTotal();this.offsetX=x*O,this.offsetY=b*O,s.total=this.calculateTotal(),this.outerRadius=O-D*this._getRingWeightOffset(this.index),this.innerRadius=Math.max(this.outerRadius-D*d,0),this.updateElements(r,0,r.length,t)}_circumference(t,e){let i=this.options,s=this._cachedMeta,r=this._getCircumference();return e&&i.animation.animateRotate||!this.chart.getDataVisibility(t)||s._parsed[t]===null||s.data[t].hidden?0:this.calculateCircumference(s._parsed[t]*r/wt)}updateElements(t,e,i,s){let r=s==="reset",a=this.chart,h=a.chartArea,d=a.options.animation,f=(h.left+h.right)/2,m=(h.top+h.bottom)/2,_=r&&d.animateScale,y=_?0:this.innerRadius,x=_?0:this.outerRadius,{sharedOptions:b,includeOptions:w}=this._getSharedOptions(e,s),P=this._getRotation(),C;for(C=0;C<e;++C)P+=this._circumference(C,r);for(C=e;C<e+i;++C){let O=this._circumference(C,r),I=t[C],D={x:f+this.offsetX,y:m+this.offsetY,startAngle:P,endAngle:P+O,circumference:O,outerRadius:x,innerRadius:y};w&&(D.options=b||this.resolveDataElementOptions(C,I.active?"active":s)),P+=O,this.updateElement(I,C,D,s)}}calculateTotal(){let t=this._cachedMeta,e=t.data,i=0,s;for(s=0;s<e.length;s++){let r=t._parsed[s];r!==null&&!isNaN(r)&&this.chart.getDataVisibility(s)&&!e[s].hidden&&(i+=Math.abs(r))}return i}calculateCircumference(t){let e=this._cachedMeta.total;return e>0&&!isNaN(t)?wt*(Math.abs(t)/e):0}getLabelAndValue(t){let e=this._cachedMeta,i=this.chart,s=i.data.labels||[],r=Ai(e._parsed[t],i.options.locale);return{label:s[t]||"",value:r}}getMaxBorderWidth(t){let e=0,i=this.chart,s,r,a,h,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,h=a.controller;break}}if(!t)return 0;for(s=0,r=t.length;s<r;++s)c=h.resolveDataElementOptions(s),c.borderAlign!=="inner"&&(e=Math.max(e,c.borderWidth||0,c.hoverBorderWidth||0));return e}getMaxOffset(t){let e=0;for(let i=0,s=t.length;i<s;++i){let r=this.resolveDataElementOptions(i);e=Math.max(e,r.offset||0,r.hoverOffset||0)}return e}_getRingWeightOffset(t){let e=0;for(let i=0;i<t;++i)this.chart.isDatasetVisible(i)&&(e+=this._getRingWeight(i));return e}_getRingWeight(t){return Math.max($(this.chart.data.datasets[t].weight,1),0)}_getVisibleDatasetWeightTotal(){return this._getRingWeightOffset(this.chart.data.datasets.length)||1}};k(Ie,"id","doughnut"),k(Ie,"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"}),k(Ie,"descriptors",{_scriptable:t=>t!=="spacing",_indexable:t=>t!=="spacing"&&!t.startsWith("borderDash")&&!t.startsWith("hoverBorderDash")}),k(Ie,"overrides",{aspectRatio:1,plugins:{legend:{labels:{generateLabels(t){let e=t.data;if(e.labels.length&&e.datasets.length){let{labels:{pointStyle:i,color:s}}=t.legend.options;return e.labels.map((r,a)=>{let 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,e,i){i.chart.toggleDataVisibility(e.index),i.chart.update()}}}});var Ni=class extends Xt{initialize(){this.enableOptionSharing=!0,this.supportsDecimation=!0,super.initialize()}update(t){let e=this._cachedMeta,{dataset:i,data:s=[],_dataset:r}=e,a=this.chart._animationsDisabled,{start:h,count:c}=ea(e,s,a);this._drawStart=h,this._drawCount=c,ia(e)&&(h=0,c=s.length),i._chart=this.chart,i._datasetIndex=this.index,i._decimated=!!r._decimated,i.points=s;let 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,h,c,t)}updateElements(t,e,i,s){let r=s==="reset",{iScale:a,vScale:h,_stacked:c,_dataset:d}=this._cachedMeta,{sharedOptions:f,includeOptions:m}=this._getSharedOptions(e,s),_=a.axis,y=h.axis,{spanGaps:x,segment:b}=this.options,w=ii(x)?x:Number.POSITIVE_INFINITY,P=this.chart._animationsDisabled||r||s==="none",C=e+i,O=t.length,I=e>0&&this.getParsed(e-1);for(let D=0;D<O;++D){let z=t[D],R=P?z:{};if(D<e||D>=C){R.skip=!0;continue}let B=this.getParsed(D),N=it(B[y]),j=R[_]=a.getPixelForValue(B[_],D),q=R[y]=r||N?h.getBasePixel():h.getPixelForValue(c?this.applyStack(h,B,c):B[y],D);R.skip=isNaN(j)||isNaN(q)||N,R.stop=D>0&&Math.abs(B[_]-I[_])>w,b&&(R.parsed=B,R.raw=d.data[D]),m&&(R.options=f||this.resolveDataElementOptions(D,z.active?"active":s)),P||this.updateElement(z,D,R,s),I=B}}getMaxOverflow(){let t=this._cachedMeta,e=t.dataset,i=e.options&&e.options.borderWidth||0,s=t.data||[];if(!s.length)return i;let 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(){let t=this._cachedMeta;t.dataset.updateControlPoints(this.chart.chartArea,t.iScale.axis),super.draw()}};k(Ni,"id","line"),k(Ni,"defaults",{datasetElementType:"line",dataElementType:"point",showLine:!0,spanGaps:!1}),k(Ni,"overrides",{scales:{_index_:{type:"category"},_value_:{type:"linear"}}});var li=class extends Xt{constructor(t,e){super(t,e),this.innerRadius=void 0,this.outerRadius=void 0}getLabelAndValue(t){let e=this._cachedMeta,i=this.chart,s=i.data.labels||[],r=Ai(e._parsed[t].r,i.options.locale);return{label:s[t]||"",value:r}}parseObjectData(t,e,i,s){return ua.bind(this)(t,e,i,s)}update(t){let e=this._cachedMeta.data;this._updateRadius(),this.updateElements(e,0,e.length,t)}getMinMax(){let t=this._cachedMeta,e={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY};return t.data.forEach((i,s)=>{let r=this.getParsed(s).r;!isNaN(r)&&this.chart.getDataVisibility(s)&&(r<e.min&&(e.min=r),r>e.max&&(e.max=r))}),e}_updateRadius(){let t=this.chart,e=t.chartArea,i=t.options,s=Math.min(e.right-e.left,e.bottom-e.top),r=Math.max(s/2,0),a=Math.max(i.cutoutPercentage?r/100*i.cutoutPercentage:1,0),h=(r-a)/t.getVisibleDatasetCount();this.outerRadius=r-h*this.index,this.innerRadius=this.outerRadius-h}updateElements(t,e,i,s){let r=s==="reset",a=this.chart,c=a.options.animation,d=this._cachedMeta.rScale,f=d.xCenter,m=d.yCenter,_=d.getIndexAngle(0)-.5*ut,y=_,x,b=360/this.countVisibleElements();for(x=0;x<e;++x)y+=this._computeAngle(x,s,b);for(x=e;x<e+i;x++){let w=t[x],P=y,C=y+this._computeAngle(x,s,b),O=a.getDataVisibility(x)?d.getDistanceFromCenterForValue(this.getParsed(x).r):0;y=C,r&&(c.animateScale&&(O=0),c.animateRotate&&(P=C=_));let I={x:f,y:m,innerRadius:0,outerRadius:O,startAngle:P,endAngle:C,options:this.resolveDataElementOptions(x,w.active?"active":s)};this.updateElement(w,x,I,s)}}countVisibleElements(){let t=this._cachedMeta,e=0;return t.data.forEach((i,s)=>{!isNaN(this.getParsed(s).r)&&this.chart.getDataVisibility(s)&&e++}),e}_computeAngle(t,e,i){return this.chart.getDataVisibility(t)?ee(this.resolveDataElementOptions(t,e).angle||i):0}};k(li,"id","polarArea"),k(li,"defaults",{dataElementType:"arc",animation:{animateRotate:!0,animateScale:!0},animations:{numbers:{type:"number",properties:["x","y","startAngle","endAngle","innerRadius","outerRadius"]}},indexAxis:"r",startAngle:0}),k(li,"overrides",{aspectRatio:1,plugins:{legend:{labels:{generateLabels(t){let e=t.data;if(e.labels.length&&e.datasets.length){let{labels:{pointStyle:i,color:s}}=t.legend.options;return e.labels.map((r,a)=>{let 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,e,i){i.chart.toggleDataVisibility(e.index),i.chart.update()}}},scales:{r:{type:"radialLinear",angleLines:{display:!1},beginAtZero:!0,grid:{circular:!0},pointLabels:{display:!1},startAngle:0}}});var Dn=class extends Ie{};k(Dn,"id","pie"),k(Dn,"defaults",{cutout:0,rotation:0,circumference:360,radius:"100%"});var Wi=class extends Xt{getLabelAndValue(t){let e=this._cachedMeta.vScale,i=this.getParsed(t);return{label:e.getLabels()[t],value:""+e.getLabelForValue(i[e.axis])}}parseObjectData(t,e,i,s){return ua.bind(this)(t,e,i,s)}update(t){let e=this._cachedMeta,i=e.dataset,s=e.data||[],r=e.iScale.getLabels();if(i.points=s,t!=="resize"){let a=this.resolveDatasetElementOptions(t);this.options.showLine||(a.borderWidth=0);let h={_loop:!0,_fullLoop:r.length===s.length,options:a};this.updateElement(i,void 0,h,t)}this.updateElements(s,0,s.length,t)}updateElements(t,e,i,s){let r=this._cachedMeta.rScale,a=s==="reset";for(let h=e;h<e+i;h++){let c=t[h],d=this.resolveDataElementOptions(h,c.active?"active":s),f=r.getPointPositionForValue(h,this.getParsed(h).r),m=a?r.xCenter:f.x,_=a?r.yCenter:f.y,y={x:m,y:_,angle:f.angle,skip:isNaN(m)||isNaN(_),options:d};this.updateElement(c,h,y,s)}}};k(Wi,"id","radar"),k(Wi,"defaults",{datasetElementType:"line",dataElementType:"point",indexAxis:"r",showLine:!0,elements:{line:{fill:"start"}}}),k(Wi,"overrides",{aspectRatio:1,scales:{r:{type:"radialLinear"}}});var Hi=class extends Xt{getLabelAndValue(t){let e=this._cachedMeta,i=this.chart.data.labels||[],{xScale:s,yScale:r}=e,a=this.getParsed(t),h=s.getLabelForValue(a.x),c=r.getLabelForValue(a.y);return{label:i[t]||"",value:"("+h+", "+c+")"}}update(t){let e=this._cachedMeta,{data:i=[]}=e,s=this.chart._animationsDisabled,{start:r,count:a}=ea(e,i,s);if(this._drawStart=r,this._drawCount=a,ia(e)&&(r=0,a=i.length),this.options.showLine){this.datasetElementType||this.addElements();let{dataset:h,_dataset:c}=e;h._chart=this.chart,h._datasetIndex=this.index,h._decimated=!!c._decimated,h.points=i;let d=this.resolveDatasetElementOptions(t);d.segment=this.options.segment,this.updateElement(h,void 0,{animated:!s,options:d},t)}else this.datasetElementType&&(delete e.dataset,this.datasetElementType=!1);this.updateElements(i,r,a,t)}addElements(){let{showLine:t}=this.options;!this.datasetElementType&&t&&(this.datasetElementType=this.chart.registry.getElement("line")),super.addElements()}updateElements(t,e,i,s){let r=s==="reset",{iScale:a,vScale:h,_stacked:c,_dataset:d}=this._cachedMeta,f=this.resolveDataElementOptions(e,s),m=this.getSharedOptions(f),_=this.includeOptions(s,m),y=a.axis,x=h.axis,{spanGaps:b,segment:w}=this.options,P=ii(b)?b:Number.POSITIVE_INFINITY,C=this.chart._animationsDisabled||r||s==="none",O=e>0&&this.getParsed(e-1);for(let I=e;I<e+i;++I){let D=t[I],z=this.getParsed(I),R=C?D:{},B=it(z[x]),N=R[y]=a.getPixelForValue(z[y],I),j=R[x]=r||B?h.getBasePixel():h.getPixelForValue(c?this.applyStack(h,z,c):z[x],I);R.skip=isNaN(N)||isNaN(j)||B,R.stop=I>0&&Math.abs(z[y]-O[y])>P,w&&(R.parsed=z,R.raw=d.data[I]),_&&(R.options=m||this.resolveDataElementOptions(I,D.active?"active":s)),C||this.updateElement(D,I,R,s),O=z}this.updateSharedOptions(m,s,f)}getMaxOverflow(){let t=this._cachedMeta,e=t.data||[];if(!this.options.showLine){let h=0;for(let c=e.length-1;c>=0;--c)h=Math.max(h,e[c].size(this.resolveDataElementOptions(c))/2);return h>0&&h}let i=t.dataset,s=i.options&&i.options.borderWidth||0;if(!e.length)return s;let r=e[0].size(this.resolveDataElementOptions(0)),a=e[e.length-1].size(this.resolveDataElementOptions(e.length-1));return Math.max(s,r,a)/2}};k(Hi,"id","scatter"),k(Hi,"defaults",{datasetElementType:!1,dataElementType:"point",showLine:!1,fill:!1}),k(Hi,"overrides",{interaction:{mode:"point"},scales:{x:{type:"linear"},y:{type:"linear"}}});var qm=Object.freeze({__proto__:null,BarController:Bi,BubbleController:Fi,DoughnutController:Ie,LineController:Ni,PieController:Dn,PolarAreaController:li,RadarController:Wi,ScatterController:Hi});function si(){throw new Error("This method is not implemented: Check that a complete date adapter is provided.")}var Ia=class n{constructor(t){k(this,"options");this.options=t||{}}static override(t){Object.assign(n.prototype,t)}init(){}formats(){return si()}parse(){return si()}format(){return si()}add(){return si()}diff(){return si()}startOf(){return si()}endOf(){return si()}},Ya={_date:Ia};function Xm(n,t,e,i){let{controller:s,data:r,_sorted:a}=n,h=s._cachedMeta.iScale,c=n.dataset&&n.dataset.options?n.dataset.options.spanGaps:null;if(h&&t===h.axis&&t!=="r"&&a&&r.length){let d=h._reversePixels?Eh:fe;if(i){if(s._sharedOptions){let f=r[0],m=typeof f.getRange=="function"&&f.getRange(t);if(m){let _=d(r,t,e-m),y=d(r,t,e+m);return{lo:_.lo,hi:y.hi}}}}else{let f=d(r,t,e);if(c){let{vScale:m}=s._cachedMeta,{_parsed:_}=n,y=_.slice(0,f.lo+1).reverse().findIndex(b=>!it(b[m.axis]));f.lo-=Math.max(0,y);let x=_.slice(f.hi).findIndex(b=>!it(b[m.axis]));f.hi+=Math.max(0,x)}return f}}return{lo:0,hi:r.length-1}}function Zn(n,t,e,i,s){let r=n.getSortedVisibleDatasetMetas(),a=e[t];for(let h=0,c=r.length;h<c;++h){let{index:d,data:f}=r[h],{lo:m,hi:_}=Xm(r[h],t,a,s);for(let y=m;y<=_;++y){let x=f[y];x.skip||i(x,d,y)}}}function $m(n){let t=n.indexOf("x")!==-1,e=n.indexOf("y")!==-1;return function(i,s){let r=t?Math.abs(i.x-s.x):0,a=e?Math.abs(i.y-s.y):0;return Math.sqrt(Math.pow(r,2)+Math.pow(a,2))}}function Ma(n,t,e,i,s){let r=[];return!s&&!n.isPointInArea(t)||Zn(n,e,t,function(h,c,d){!s&&!pe(h,n.chartArea,0)||h.inRange(t.x,t.y,i)&&r.push({element:h,datasetIndex:c,index:d})},!0),r}function Km(n,t,e,i){let s=[];function r(a,h,c){let{startAngle:d,endAngle:f}=a.getProps(["startAngle","endAngle"],i),{angle:m}=$r(a,{x:t.x,y:t.y});Ii(m,d,f)&&s.push({element:a,datasetIndex:h,index:c})}return Zn(n,e,t,r),s}function Qm(n,t,e,i,s,r){let a=[],h=$m(e),c=Number.POSITIVE_INFINITY;function d(f,m,_){let y=f.inRange(t.x,t.y,s);if(i&&!y)return;let x=f.getCenterPoint(s);if(!(!!r||n.isPointInArea(x))&&!y)return;let w=h(t,x);w<c?(a=[{element:f,datasetIndex:m,index:_}],c=w):w===c&&a.push({element:f,datasetIndex:m,index:_})}return Zn(n,e,t,d),a}function La(n,t,e,i,s,r){return!r&&!n.isPointInArea(t)?[]:e==="r"&&!i?Km(n,t,e,s):Qm(n,t,e,i,s,r)}function uc(n,t,e,i,s){let r=[],a=e==="x"?"inXRange":"inYRange",h=!1;return Zn(n,e,t,(c,d,f)=>{c[a]&&c[a](t[e],s)&&(r.push({element:c,datasetIndex:d,index:f}),h=h||c.inRange(t.x,t.y,s))}),i&&!h?[]:r}var Jm={evaluateInteractionItems:Zn,modes:{index(n,t,e,i){let s=je(t,n),r=e.axis||"x",a=e.includeInvisible||!1,h=e.intersect?Ma(n,s,r,i,a):La(n,s,r,!1,i,a),c=[];return h.length?(n.getSortedVisibleDatasetMetas().forEach(d=>{let f=h[0].index,m=d.data[f];m&&!m.skip&&c.push({element:m,datasetIndex:d.index,index:f})}),c):[]},dataset(n,t,e,i){let s=je(t,n),r=e.axis||"xy",a=e.includeInvisible||!1,h=e.intersect?Ma(n,s,r,i,a):La(n,s,r,!1,i,a);if(h.length>0){let c=h[0].datasetIndex,d=n.getDatasetMeta(c).data;h=[];for(let f=0;f<d.length;++f)h.push({element:d[f],datasetIndex:c,index:f})}return h},point(n,t,e,i){let s=je(t,n),r=e.axis||"xy",a=e.includeInvisible||!1;return Ma(n,s,r,i,a)},nearest(n,t,e,i){let s=je(t,n),r=e.axis||"xy",a=e.includeInvisible||!1;return La(n,s,r,e.intersect,i,a)},x(n,t,e,i){let s=je(t,n);return uc(n,s,"x",e.intersect,i)},y(n,t,e,i){let s=je(t,n);return uc(n,s,"y",e.intersect,i)}}},nu=["left","top","right","bottom"];function Tn(n,t){return n.filter(e=>e.pos===t)}function dc(n,t){return n.filter(e=>nu.indexOf(e.pos)===-1&&e.box.axis===t)}function Cn(n,t){return n.sort((e,i)=>{let s=t?i:e,r=t?e:i;return s.weight===r.weight?s.index-r.index:s.weight-r.weight})}function tg(n){let t=[],e,i,s,r,a,h;for(e=0,i=(n||[]).length;e<i;++e)s=n[e],{position:r,options:{stack:a,stackWeight:h=1}}=s,t.push({index:e,box:s,pos:r,horizontal:s.isHorizontal(),weight:s.weight,stack:a&&r+a,stackWeight:h});return t}function eg(n){let t={};for(let e of n){let{stack:i,pos:s,stackWeight:r}=e;if(!i||!nu.includes(s))continue;let a=t[i]||(t[i]={count:0,placed:0,weight:0,size:0});a.count++,a.weight+=r}return t}function ig(n,t){let e=eg(n),{vBoxMaxWidth:i,hBoxMaxHeight:s}=t,r,a,h;for(r=0,a=n.length;r<a;++r){h=n[r];let{fullSize:c}=h.box,d=e[h.stack],f=d&&h.stackWeight/d.weight;h.horizontal?(h.width=f?f*i:c&&t.availableWidth,h.height=s):(h.width=i,h.height=f?f*s:c&&t.availableHeight)}return e}function ng(n){let t=tg(n),e=Cn(t.filter(d=>d.box.fullSize),!0),i=Cn(Tn(t,"left"),!0),s=Cn(Tn(t,"right")),r=Cn(Tn(t,"top"),!0),a=Cn(Tn(t,"bottom")),h=dc(t,"x"),c=dc(t,"y");return{fullSize:e,leftAndTop:i.concat(r),rightAndBottom:s.concat(c).concat(a).concat(h),chartArea:Tn(t,"chartArea"),vertical:i.concat(s).concat(c),horizontal:r.concat(a).concat(h)}}function fc(n,t,e,i){return Math.max(n[e],t[e])+Math.max(n[i],t[i])}function su(n,t){n.top=Math.max(n.top,t.top),n.left=Math.max(n.left,t.left),n.bottom=Math.max(n.bottom,t.bottom),n.right=Math.max(n.right,t.right)}function sg(n,t,e,i){let{pos:s,box:r}=e,a=n.maxPadding;if(!rt(s)){e.size&&(n[s]-=e.size);let m=i[e.stack]||{size:0,count:1};m.size=Math.max(m.size,e.horizontal?r.height:r.width),e.size=m.size/m.count,n[s]+=e.size}r.getPadding&&su(a,r.getPadding());let h=Math.max(0,t.outerWidth-fc(a,n,"left","right")),c=Math.max(0,t.outerHeight-fc(a,n,"top","bottom")),d=h!==n.w,f=c!==n.h;return n.w=h,n.h=c,e.horizontal?{same:d,other:f}:{same:f,other:d}}function og(n){let t=n.maxPadding;function e(i){let s=Math.max(t[i]-n[i],0);return n[i]+=s,s}n.y+=e("top"),n.x+=e("left"),e("right"),e("bottom")}function rg(n,t){let e=t.maxPadding;function i(s){let r={left:0,top:0,right:0,bottom:0};return s.forEach(a=>{r[a]=Math.max(t[a],e[a])}),r}return i(n?["left","right"]:["top","bottom"])}function In(n,t,e,i){let s=[],r,a,h,c,d,f;for(r=0,a=n.length,d=0;r<a;++r){h=n[r],c=h.box,c.update(h.width||t.w,h.height||t.h,rg(h.horizontal,t));let{same:m,other:_}=sg(t,e,h,i);d|=m&&s.length,f=f||_,c.fullSize||s.push(h)}return d&&In(s,t,e,i)||f}function Bs(n,t,e,i,s){n.top=e,n.left=t,n.right=t+i,n.bottom=e+s,n.width=i,n.height=s}function pc(n,t,e,i){let s=e.padding,{x:r,y:a}=t;for(let h of n){let c=h.box,d=i[h.stack]||{count:1,placed:0,weight:1},f=h.stackWeight/d.weight||1;if(h.horizontal){let m=t.w*f,_=d.size||c.height;Oi(d.start)&&(a=d.start),c.fullSize?Bs(c,s.left,a,e.outerWidth-s.right-s.left,_):Bs(c,t.left+d.placed,a,m,_),d.start=a,d.placed+=m,a=c.bottom}else{let m=t.h*f,_=d.size||c.width;Oi(d.start)&&(r=d.start),c.fullSize?Bs(c,r,s.top,_,e.outerHeight-s.bottom-s.top):Bs(c,r,t.top+d.placed,_,m),d.start=r,d.placed+=m,r=c.right}}t.x=r,t.y=a}var Wt={addBox(n,t){n.boxes||(n.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(e){t.draw(e)}}]},n.boxes.push(t)},removeBox(n,t){let e=n.boxes?n.boxes.indexOf(t):-1;e!==-1&&n.boxes.splice(e,1)},configure(n,t,e){t.fullSize=e.fullSize,t.position=e.position,t.weight=e.weight},update(n,t,e,i){if(!n)return;let s=Bt(n.options.layout.padding),r=Math.max(t-s.width,0),a=Math.max(e-s.height,0),h=ng(n.boxes),c=h.vertical,d=h.horizontal;gt(n.boxes,b=>{typeof b.beforeLayout=="function"&&b.beforeLayout()});let f=c.reduce((b,w)=>w.box.options&&w.box.options.display===!1?b:b+1,0)||1,m=Object.freeze({outerWidth:t,outerHeight:e,padding:s,availableWidth:r,availableHeight:a,vBoxMaxWidth:r/2/f,hBoxMaxHeight:a/2}),_=Object.assign({},s);su(_,Bt(i));let y=Object.assign({maxPadding:_,w:r,h:a,x:s.left,y:s.top},s),x=ig(c.concat(d),m);In(h.fullSize,y,m,x),In(c,y,m,x),In(d,y,m,x)&&In(c,y,m,x),og(y),pc(h.leftAndTop,y,m,x),y.x+=y.w,y.y+=y.h,pc(h.rightAndBottom,y,m,x),n.chartArea={left:y.left,top:y.top,right:y.left+y.w,bottom:y.top+y.h,height:y.h,width:y.w},gt(h.chartArea,b=>{let w=b.box;Object.assign(w,n.chartArea),w.update(y.w,y.h,{left:0,top:0,right:0,bottom:0})})}},Us=class{acquireContext(t,e){}releaseContext(t){return!1}addEventListener(t,e,i){}removeEventListener(t,e,i){}getDevicePixelRatio(){return 1}getMaximumSize(t,e,i,s){return e=Math.max(0,e||t.width),i=i||t.height,{width:e,height:Math.max(0,s?Math.floor(e/s):i)}}isAttached(t){return!0}updateConfig(t){}},Aa=class extends Us{acquireContext(t){return t&&t.getContext&&t.getContext("2d")||null}updateConfig(t){t.options.animation=!1}},Vs="$chartjs",ag={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"},mc=n=>n===null||n==="";function lg(n,t){let e=n.style,i=n.getAttribute("height"),s=n.getAttribute("width");if(n[Vs]={initial:{height:i,width:s,style:{display:e.display,height:e.height,width:e.width}}},e.display=e.display||"block",e.boxSizing=e.boxSizing||"border-box",mc(s)){let r=fa(n,"width");r!==void 0&&(n.width=r)}if(mc(i))if(n.style.height==="")n.height=n.width/(t||2);else{let r=fa(n,"height");r!==void 0&&(n.height=r)}return n}var ou=Kh?{passive:!0}:!1;function hg(n,t,e){n&&n.addEventListener(t,e,ou)}function cg(n,t,e){n&&n.canvas&&n.canvas.removeEventListener(t,e,ou)}function ug(n,t){let e=ag[n.type]||n.type,{x:i,y:s}=je(n,t);return{type:e,chart:t,native:n,x:i!==void 0?i:null,y:s!==void 0?s:null}}function Gs(n,t){for(let e of n)if(e===t||e.contains(t))return!0}function dg(n,t,e){let i=n.canvas,s=new MutationObserver(r=>{let a=!1;for(let h of r)a=a||Gs(h.addedNodes,i),a=a&&!Gs(h.removedNodes,i);a&&e()});return s.observe(document,{childList:!0,subtree:!0}),s}function fg(n,t,e){let i=n.canvas,s=new MutationObserver(r=>{let a=!1;for(let h of r)a=a||Gs(h.removedNodes,i),a=a&&!Gs(h.addedNodes,i);a&&e()});return s.observe(document,{childList:!0,subtree:!0}),s}var Nn=new Map,gc=0;function ru(){let n=window.devicePixelRatio;n!==gc&&(gc=n,Nn.forEach((t,e)=>{e.currentDevicePixelRatio!==n&&t()}))}function pg(n,t){Nn.size||window.addEventListener("resize",ru),Nn.set(n,t)}function mg(n){Nn.delete(n),Nn.size||window.removeEventListener("resize",ru)}function gg(n,t,e){let i=n.canvas,s=i&&zs(i);if(!s)return;let r=ta((h,c)=>{let d=s.clientWidth;e(h,c),d<s.clientWidth&&e()},window),a=new ResizeObserver(h=>{let c=h[0],d=c.contentRect.width,f=c.contentRect.height;d===0&&f===0||r(d,f)});return a.observe(s),pg(n,r),a}function Pa(n,t,e){e&&e.disconnect(),t==="resize"&&mg(n)}function _g(n,t,e){let i=n.canvas,s=ta(r=>{n.ctx!==null&&e(ug(r,n))},n);return hg(i,t,s),s}var Ea=class extends Us{acquireContext(t,e){let i=t&&t.getContext&&t.getContext("2d");return i&&i.canvas===t?(lg(t,e),i):null}releaseContext(t){let e=t.canvas;if(!e[Vs])return!1;let i=e[Vs].initial;["height","width"].forEach(r=>{let a=i[r];it(a)?e.removeAttribute(r):e.setAttribute(r,a)});let s=i.style||{};return Object.keys(s).forEach(r=>{e.style[r]=s[r]}),e.width=e.width,delete e[Vs],!0}addEventListener(t,e,i){this.removeEventListener(t,e);let s=t.$proxies||(t.$proxies={}),a={attach:dg,detach:fg,resize:gg}[e]||_g;s[e]=a(t,e,i)}removeEventListener(t,e){let i=t.$proxies||(t.$proxies={}),s=i[e];if(!s)return;({attach:Pa,detach:Pa,resize:Pa}[e]||cg)(t,e,s),i[e]=void 0}getDevicePixelRatio(){return window.devicePixelRatio}getMaximumSize(t,e,i,s){return $h(t,e,i,s)}isAttached(t){let e=t&&zs(t);return!!(e&&e.isConnected)}};function yg(n){return!Es()||typeof OffscreenCanvas!="undefined"&&n instanceof OffscreenCanvas?Aa:Ea}var $t=class{constructor(){k(this,"x");k(this,"y");k(this,"active",!1);k(this,"options");k(this,"$animations")}tooltipPosition(t){let{x:e,y:i}=this.getProps(["x","y"],t);return{x:e,y:i}}hasValue(){return ii(this.x)&&ii(this.y)}getProps(t,e){let i=this.$animations;if(!e||!i)return this;let s={};return t.forEach(r=>{s[r]=i[r]&&i[r].active()?i[r]._to:this[r]}),s}};k($t,"defaults",{}),k($t,"defaultRoutes");function vg(n,t){let e=n.options.ticks,i=xg(n),s=Math.min(e.maxTicksLimit||i,i),r=e.major.enabled?wg(t):[],a=r.length,h=r[0],c=r[a-1],d=[];if(a>s)return Mg(t,d,r,a/s),d;let f=bg(r,t,s);if(a>0){let m,_,y=a>1?Math.round((c-h)/(a-1)):null;for(Fs(t,d,f,it(y)?0:h-y,h),m=0,_=a-1;m<_;m++)Fs(t,d,f,r[m],r[m+1]);return Fs(t,d,f,c,it(y)?t.length:c+y),d}return Fs(t,d,f),d}function xg(n){let t=n.options.offset,e=n._tickSize(),i=n._length/e+(t?0:1),s=n._maxLength/e;return Math.floor(Math.min(i,s))}function bg(n,t,e){let i=Lg(n),s=t.length/e;if(!i)return Math.max(s,1);let r=Dh(i);for(let a=0,h=r.length-1;a<h;a++){let c=r[a];if(c>s)return c}return Math.max(s,1)}function wg(n){let t=[],e,i;for(e=0,i=n.length;e<i;e++)n[e].major&&t.push(e);return t}function Mg(n,t,e,i){let s=0,r=e[0],a;for(i=Math.ceil(i),a=0;a<n.length;a++)a===r&&(t.push(n[a]),s++,r=e[s*i])}function Fs(n,t,e,i,s){let r=$(i,0),a=Math.min($(s,n.length),n.length),h=0,c,d,f;for(e=Math.ceil(e),s&&(c=s-i,e=c/Math.floor(c/e)),f=r;f<0;)h++,f=Math.round(r+h*e);for(d=Math.max(r,0);d<a;d++)d===f&&(t.push(n[d]),h++,f=Math.round(r+h*e))}function Lg(n){let t=n.length,e,i;if(t<2)return!1;for(i=n[0],e=1;e<t;++e)if(n[e]-n[e-1]!==i)return!1;return i}var Pg=n=>n==="left"?"right":n==="right"?"left":n,_c=(n,t,e)=>t==="top"||t==="left"?n[t]+e:n[t]-e,yc=(n,t)=>Math.min(t||n,n);function vc(n,t){let e=[],i=n.length/t,s=n.length,r=0;for(;r<s;r+=i)e.push(n[Math.floor(r)]);return e}function kg(n,t,e){let i=n.ticks.length,s=Math.min(t,i-1),r=n._startPixel,a=n._endPixel,h=1e-6,c=n.getPixelForTick(s),d;if(!(e&&(i===1?d=Math.max(c-r,a-c):t===0?d=(n.getPixelForTick(1)-c)/2:d=(c-n.getPixelForTick(s-1))/2,c+=s<t?d:-d,c<r-h||c>a+h)))return c}function Tg(n,t){gt(n,e=>{let i=e.gc,s=i.length/2,r;if(s>t){for(r=0;r<s;++r)delete e.data[i[r]];i.splice(0,s)}})}function Sn(n){return n.drawTicks?n.tickLength:0}function xc(n,t){if(!n.display)return 0;let e=Dt(n.font,t),i=Bt(n.padding);return(bt(n.text)?n.text.length:1)*e.lineHeight+i.height}function Cg(n,t){return Se(n,{scale:t,type:"scale"})}function Sg(n,t,e){return Se(n,{tick:e,index:t,type:"tick"})}function Og(n,t,e){let i=Ss(n);return(e&&t!=="right"||!e&&t==="right")&&(i=Pg(i)),i}function Dg(n,t,e,i){let{top:s,left:r,bottom:a,right:h,chart:c}=n,{chartArea:d,scales:f}=c,m=0,_,y,x,b=a-s,w=h-r;if(n.isHorizontal()){if(y=Rt(i,r,h),rt(e)){let P=Object.keys(e)[0],C=e[P];x=f[P].getPixelForValue(C)+b-t}else e==="center"?x=(d.bottom+d.top)/2+b-t:x=_c(n,e,t);_=h-r}else{if(rt(e)){let P=Object.keys(e)[0],C=e[P];y=f[P].getPixelForValue(C)-w+t}else e==="center"?y=(d.left+d.right)/2-w+t:y=_c(n,e,t);x=Rt(i,a,s),m=e==="left"?-Tt:Tt}return{titleX:y,titleY:x,maxWidth:_,rotation:m}}var ci=class n extends $t{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,e){return t}getUserBounds(){let{_userMin:t,_userMax:e,_suggestedMin:i,_suggestedMax:s}=this;return t=Yt(t,Number.POSITIVE_INFINITY),e=Yt(e,Number.NEGATIVE_INFINITY),i=Yt(i,Number.POSITIVE_INFINITY),s=Yt(s,Number.NEGATIVE_INFINITY),{min:Yt(t,i),max:Yt(e,s),minDefined:Pt(t),maxDefined:Pt(e)}}getMinMax(t){let{min:e,max:i,minDefined:s,maxDefined:r}=this.getUserBounds(),a;if(s&&r)return{min:e,max:i};let h=this.getMatchingVisibleMetas();for(let c=0,d=h.length;c<d;++c)a=h[c].controller.getMinMax(this,t),s||(e=Math.min(e,a.min)),r||(i=Math.max(i,a.max));return e=r&&e>i?i:e,i=s&&e>i?e:i,{min:Yt(e,Yt(i,e)),max:Yt(i,Yt(e,i))}}getPadding(){return{left:this.paddingLeft||0,top:this.paddingTop||0,right:this.paddingRight||0,bottom:this.paddingBottom||0}}getTicks(){return this.ticks}getLabels(){let 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(){vt(this.options.beforeUpdate,[this])}update(t,e,i){let{beginAtZero:s,grace:r,ticks:a}=this.options,h=a.sampleSize;this.beforeUpdate(),this.maxWidth=t,this.maxHeight=e,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=Yh(this,r,s),this._dataLimitsCached=!0),this.beforeBuildTicks(),this.ticks=this.buildTicks()||[],this.afterBuildTicks();let c=h<this.ticks.length;this._convertTicksToLabels(c?vc(this.ticks,h):this.ticks),this.configure(),this.beforeCalculateLabelRotation(),this.calculateLabelRotation(),this.afterCalculateLabelRotation(),a.display&&(a.autoSkip||a.source==="auto")&&(this.ticks=vg(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,e,i;this.isHorizontal()?(e=this.left,i=this.right):(e=this.top,i=this.bottom,t=!t),this._startPixel=e,this._endPixel=i,this._reversePixels=t,this._length=i-e,this._alignToPixels=this.options.alignToPixels}afterUpdate(){vt(this.options.afterUpdate,[this])}beforeSetDimensions(){vt(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(){vt(this.options.afterSetDimensions,[this])}_callHooks(t){this.chart.notifyPlugins(t,this.getContext()),vt(this.options[t],[this])}beforeDataLimits(){this._callHooks("beforeDataLimits")}determineDataLimits(){}afterDataLimits(){this._callHooks("afterDataLimits")}beforeBuildTicks(){this._callHooks("beforeBuildTicks")}buildTicks(){return[]}afterBuildTicks(){this._callHooks("afterBuildTicks")}beforeTickToLabelConversion(){vt(this.options.beforeTickToLabelConversion,[this])}generateTickLabels(t){let e=this.options.ticks,i,s,r;for(i=0,s=t.length;i<s;i++)r=t[i],r.label=vt(e.callback,[r.value,i,t],this)}afterTickToLabelConversion(){vt(this.options.afterTickToLabelConversion,[this])}beforeCalculateLabelRotation(){vt(this.options.beforeCalculateLabelRotation,[this])}calculateLabelRotation(){let t=this.options,e=t.ticks,i=yc(this.ticks.length,t.ticks.maxTicksLimit),s=e.minRotation||0,r=e.maxRotation,a=s,h,c,d;if(!this._isVisible()||!e.display||s>=r||i<=1||!this.isHorizontal()){this.labelRotation=s;return}let f=this._getLabelSizes(),m=f.widest.width,_=f.highest.height,y=It(this.chart.width-m,0,this.maxWidth);h=t.offset?this.maxWidth/i:y/(i-1),m+6>h&&(h=y/(i-(t.offset?.5:1)),c=this.maxHeight-Sn(t.grid)-e.padding-xc(t.title,this.chart.options.font),d=Math.sqrt(m*m+_*_),a=Ts(Math.min(Math.asin(It((f.highest.height+6)/h,-1,1)),Math.asin(It(c/d,-1,1))-Math.asin(It(_/d,-1,1)))),a=Math.max(s,Math.min(r,a))),this.labelRotation=a}afterCalculateLabelRotation(){vt(this.options.afterCalculateLabelRotation,[this])}afterAutoSkip(){}beforeFit(){vt(this.options.beforeFit,[this])}fit(){let t={width:0,height:0},{chart:e,options:{ticks:i,title:s,grid:r}}=this,a=this._isVisible(),h=this.isHorizontal();if(a){let c=xc(s,e.options.font);if(h?(t.width=this.maxWidth,t.height=Sn(r)+c):(t.height=this.maxHeight,t.width=Sn(r)+c),i.display&&this.ticks.length){let{first:d,last:f,widest:m,highest:_}=this._getLabelSizes(),y=i.padding*2,x=ee(this.labelRotation),b=Math.cos(x),w=Math.sin(x);if(h){let P=i.mirror?0:w*m.width+b*_.height;t.height=Math.min(this.maxHeight,t.height+P+y)}else{let P=i.mirror?0:b*m.width+w*_.height;t.width=Math.min(this.maxWidth,t.width+P+y)}this._calculatePadding(d,f,w,b)}}this._handleMargins(),h?(this.width=this._length=e.width-this._margins.left-this._margins.right,this.height=t.height):(this.width=t.width,this.height=this._length=e.height-this._margins.top-this._margins.bottom)}_calculatePadding(t,e,i,s){let{ticks:{align:r,padding:a},position:h}=this.options,c=this.labelRotation!==0,d=h!=="top"&&this.axis==="x";if(this.isHorizontal()){let f=this.getPixelForTick(0)-this.left,m=this.right-this.getPixelForTick(this.ticks.length-1),_=0,y=0;c?d?(_=s*t.width,y=i*e.height):(_=i*t.height,y=s*e.width):r==="start"?y=e.width:r==="end"?_=t.width:r!=="inner"&&(_=t.width/2,y=e.width/2),this.paddingLeft=Math.max((_-f+a)*this.width/(this.width-f),0),this.paddingRight=Math.max((y-m+a)*this.width/(this.width-m),0)}else{let f=e.height/2,m=t.height/2;r==="start"?(f=0,m=t.height):r==="end"&&(f=e.height,m=0),this.paddingTop=f+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(){vt(this.options.afterFit,[this])}isHorizontal(){let{axis:t,position:e}=this.options;return e==="top"||e==="bottom"||t==="x"}isFullSize(){return this.options.fullSize}_convertTicksToLabels(t){this.beforeTickToLabelConversion(),this.generateTickLabels(t);let e,i;for(e=0,i=t.length;e<i;e++)it(t[e].label)&&(t.splice(e,1),i--,e--);this.afterTickToLabelConversion()}_getLabelSizes(){let t=this._labelSizes;if(!t){let e=this.options.ticks.sampleSize,i=this.ticks;e<i.length&&(i=vc(i,e)),this._labelSizes=t=this._computeLabelSizes(i,i.length,this.options.ticks.maxTicksLimit)}return t}_computeLabelSizes(t,e,i){let{ctx:s,_longestTextCache:r}=this,a=[],h=[],c=Math.floor(e/yc(e,i)),d=0,f=0,m,_,y,x,b,w,P,C,O,I,D;for(m=0;m<e;m+=c){if(x=t[m].label,b=this._resolveTickFontOptions(m),s.font=w=b.string,P=r[w]=r[w]||{data:{},gc:[]},C=b.lineHeight,O=I=0,!it(x)&&!bt(x))O=bn(s,P.data,P.gc,O,x),I=C;else if(bt(x))for(_=0,y=x.length;_<y;++_)D=x[_],!it(D)&&!bt(D)&&(O=bn(s,P.data,P.gc,O,D),I+=C);a.push(O),h.push(I),d=Math.max(O,d),f=Math.max(I,f)}Tg(r,e);let z=a.indexOf(d),R=h.indexOf(f),B=N=>({width:a[N]||0,height:h[N]||0});return{first:B(0),last:B(e-1),widest:B(z),highest:B(R),widths:a,heights:h}}getLabelForValue(t){return t}getPixelForValue(t,e){return NaN}getValueForPixel(t){}getPixelForTick(t){let e=this.ticks;return t<0||t>e.length-1?null:this.getPixelForValue(e[t].value)}getPixelForDecimal(t){this._reversePixels&&(t=1-t);let e=this._startPixel+t*this._length;return Ah(this._alignToPixels?Ze(this.chart,e,0):e)}getDecimalForPixel(t){let e=(t-this._startPixel)/this._length;return this._reversePixels?1-e:e}getBasePixel(){return this.getPixelForValue(this.getBaseValue())}getBaseValue(){let{min:t,max:e}=this;return t<0&&e<0?e:t>0&&e>0?t:0}getContext(t){let e=this.ticks||[];if(t>=0&&t<e.length){let i=e[t];return i.$context||(i.$context=Sg(this.getContext(),t,i))}return this.$context||(this.$context=Cg(this.chart.getContext(),this))}_tickSize(){let t=this.options.ticks,e=ee(this.labelRotation),i=Math.abs(Math.cos(e)),s=Math.abs(Math.sin(e)),r=this._getLabelSizes(),a=t.autoSkipPadding||0,h=r?r.widest.width+a:0,c=r?r.highest.height+a:0;return this.isHorizontal()?c*i>h*s?h/i:c/s:c*s<h*i?c/i:h/s}_isVisible(){let t=this.options.display;return t!=="auto"?!!t:this.getMatchingVisibleMetas().length>0}_computeGridLineItems(t){let e=this.axis,i=this.chart,s=this.options,{grid:r,position:a,border:h}=s,c=r.offset,d=this.isHorizontal(),m=this.ticks.length+(c?1:0),_=Sn(r),y=[],x=h.setContext(this.getContext()),b=x.display?x.width:0,w=b/2,P=function(W){return Ze(i,W,b)},C,O,I,D,z,R,B,N,j,q,Y,nt;if(a==="top")C=P(this.bottom),R=this.bottom-_,N=C-w,q=P(t.top)+w,nt=t.bottom;else if(a==="bottom")C=P(this.top),q=t.top,nt=P(t.bottom)-w,R=C+w,N=this.top+_;else if(a==="left")C=P(this.right),z=this.right-_,B=C-w,j=P(t.left)+w,Y=t.right;else if(a==="right")C=P(this.left),j=t.left,Y=P(t.right)-w,z=C+w,B=this.left+_;else if(e==="x"){if(a==="center")C=P((t.top+t.bottom)/2+.5);else if(rt(a)){let W=Object.keys(a)[0],yt=a[W];C=P(this.chart.scales[W].getPixelForValue(yt))}q=t.top,nt=t.bottom,R=C+w,N=R+_}else if(e==="y"){if(a==="center")C=P((t.left+t.right)/2);else if(rt(a)){let W=Object.keys(a)[0],yt=a[W];C=P(this.chart.scales[W].getPixelForValue(yt))}z=C-w,B=z-_,j=t.left,Y=t.right}let lt=$(s.ticks.maxTicksLimit,m),st=Math.max(1,Math.ceil(m/lt));for(O=0;O<m;O+=st){let W=this.getContext(O),yt=r.setContext(W),E=h.setContext(W),V=yt.lineWidth,dt=yt.color,kt=E.dash||[],pt=E.dashOffset,ot=yt.tickWidth,X=yt.tickColor,Ht=yt.tickBorderDash||[],Nt=yt.tickBorderDashOffset;I=kg(this,O,c),I!==void 0&&(D=Ze(i,I,V),d?z=B=j=Y=D:R=N=q=nt=D,y.push({tx1:z,ty1:R,tx2:B,ty2:N,x1:j,y1:q,x2:Y,y2:nt,width:V,color:dt,borderDash:kt,borderDashOffset:pt,tickWidth:ot,tickColor:X,tickBorderDash:Ht,tickBorderDashOffset:Nt}))}return this._ticksLength=m,this._borderValue=C,y}_computeLabelItems(t){let e=this.axis,i=this.options,{position:s,ticks:r}=i,a=this.isHorizontal(),h=this.ticks,{align:c,crossAlign:d,padding:f,mirror:m}=r,_=Sn(i.grid),y=_+f,x=m?-f:y,b=-ee(this.labelRotation),w=[],P,C,O,I,D,z,R,B,N,j,q,Y,nt="middle";if(s==="top")z=this.bottom-x,R=this._getXAxisLabelAlignment();else if(s==="bottom")z=this.top+x,R=this._getXAxisLabelAlignment();else if(s==="left"){let st=this._getYAxisLabelAlignment(_);R=st.textAlign,D=st.x}else if(s==="right"){let st=this._getYAxisLabelAlignment(_);R=st.textAlign,D=st.x}else if(e==="x"){if(s==="center")z=(t.top+t.bottom)/2+y;else if(rt(s)){let st=Object.keys(s)[0],W=s[st];z=this.chart.scales[st].getPixelForValue(W)+y}R=this._getXAxisLabelAlignment()}else if(e==="y"){if(s==="center")D=(t.left+t.right)/2-y;else if(rt(s)){let st=Object.keys(s)[0],W=s[st];D=this.chart.scales[st].getPixelForValue(W)}R=this._getYAxisLabelAlignment(_).textAlign}e==="y"&&(c==="start"?nt="top":c==="end"&&(nt="bottom"));let lt=this._getLabelSizes();for(P=0,C=h.length;P<C;++P){O=h[P],I=O.label;let st=r.setContext(this.getContext(P));B=this.getPixelForTick(P)+r.labelOffset,N=this._resolveTickFontOptions(P),j=N.lineHeight,q=bt(I)?I.length:1;let W=q/2,yt=st.color,E=st.textStrokeColor,V=st.textStrokeWidth,dt=R;a?(D=B,R==="inner"&&(P===C-1?dt=this.options.reverse?"left":"right":P===0?dt=this.options.reverse?"right":"left":dt="center"),s==="top"?d==="near"||b!==0?Y=-q*j+j/2:d==="center"?Y=-lt.highest.height/2-W*j+j:Y=-lt.highest.height+j/2:d==="near"||b!==0?Y=j/2:d==="center"?Y=lt.highest.height/2-W*j:Y=lt.highest.height-q*j,m&&(Y*=-1),b!==0&&!st.showLabelBackdrop&&(D+=j/2*Math.sin(b))):(z=B,Y=(1-q)*j/2);let kt;if(st.showLabelBackdrop){let pt=Bt(st.backdropPadding),ot=lt.heights[P],X=lt.widths[P],Ht=Y-pt.top,Nt=0-pt.left;switch(nt){case"middle":Ht-=ot/2;break;case"bottom":Ht-=ot;break}switch(R){case"center":Nt-=X/2;break;case"right":Nt-=X;break;case"inner":P===C-1?Nt-=X:P>0&&(Nt-=X/2);break}kt={left:Nt,top:Ht,width:X+pt.width,height:ot+pt.height,color:st.backdropColor}}w.push({label:I,font:N,textOffset:Y,options:{rotation:b,color:yt,strokeColor:E,strokeWidth:V,textAlign:dt,textBaseline:nt,translation:[D,z],backdrop:kt}})}return w}_getXAxisLabelAlignment(){let{position:t,ticks:e}=this.options;if(-ee(this.labelRotation))return t==="top"?"left":"right";let s="center";return e.align==="start"?s="left":e.align==="end"?s="right":e.align==="inner"&&(s="inner"),s}_getYAxisLabelAlignment(t){let{position:e,ticks:{crossAlign:i,mirror:s,padding:r}}=this.options,a=this._getLabelSizes(),h=t+r,c=a.widest.width,d,f;return e==="left"?s?(f=this.right+r,i==="near"?d="left":i==="center"?(d="center",f+=c/2):(d="right",f+=c)):(f=this.right-h,i==="near"?d="right":i==="center"?(d="center",f-=c/2):(d="left",f=this.left)):e==="right"?s?(f=this.left+r,i==="near"?d="right":i==="center"?(d="center",f-=c/2):(d="left",f-=c)):(f=this.left+h,i==="near"?d="left":i==="center"?(d="center",f+=c/2):(d="right",f=this.right)):d="right",{textAlign:d,x:f}}_computeLabelArea(){if(this.options.ticks.mirror)return;let t=this.chart,e=this.options.position;if(e==="left"||e==="right")return{top:0,left:this.left,bottom:t.height,right:this.right};if(e==="top"||e==="bottom")return{top:this.top,left:0,bottom:this.bottom,right:t.width}}drawBackground(){let{ctx:t,options:{backgroundColor:e},left:i,top:s,width:r,height:a}=this;e&&(t.save(),t.fillStyle=e,t.fillRect(i,s,r,a),t.restore())}getLineWidthForValue(t){let e=this.options.grid;if(!this._isVisible()||!e.display)return 0;let s=this.ticks.findIndex(r=>r.value===t);return s>=0?e.setContext(this.getContext(s)).lineWidth:0}drawGrid(t){let e=this.options.grid,i=this.ctx,s=this._gridLineItems||(this._gridLineItems=this._computeGridLineItems(t)),r,a,h=(c,d,f)=>{!f.width||!f.color||(i.save(),i.lineWidth=f.width,i.strokeStyle=f.color,i.setLineDash(f.borderDash||[]),i.lineDashOffset=f.borderDashOffset,i.beginPath(),i.moveTo(c.x,c.y),i.lineTo(d.x,d.y),i.stroke(),i.restore())};if(e.display)for(r=0,a=s.length;r<a;++r){let c=s[r];e.drawOnChartArea&&h({x:c.x1,y:c.y1},{x:c.x2,y:c.y2},c),e.drawTicks&&h({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(){let{chart:t,ctx:e,options:{border:i,grid:s}}=this,r=i.setContext(this.getContext()),a=i.display?r.width:0;if(!a)return;let h=s.setContext(this.getContext(0)).lineWidth,c=this._borderValue,d,f,m,_;this.isHorizontal()?(d=Ze(t,this.left,a)-a/2,f=Ze(t,this.right,h)+h/2,m=_=c):(m=Ze(t,this.top,a)-a/2,_=Ze(t,this.bottom,h)+h/2,d=f=c),e.save(),e.lineWidth=r.width,e.strokeStyle=r.color,e.beginPath(),e.moveTo(d,m),e.lineTo(f,_),e.stroke(),e.restore()}drawLabels(t){if(!this.options.ticks.display)return;let i=this.ctx,s=this._computeLabelArea();s&&Ln(i,s);let r=this.getLabelItems(t);for(let a of r){let h=a.options,c=a.font,d=a.label,f=a.textOffset;Ve(i,d,0,f,c,h)}s&&Pn(i)}drawTitle(){let{ctx:t,options:{position:e,title:i,reverse:s}}=this;if(!i.display)return;let r=Dt(i.font),a=Bt(i.padding),h=i.align,c=r.lineHeight/2;e==="bottom"||e==="center"||rt(e)?(c+=a.bottom,bt(i.text)&&(c+=r.lineHeight*(i.text.length-1))):c+=a.top;let{titleX:d,titleY:f,maxWidth:m,rotation:_}=Dg(this,c,e,h);Ve(t,i.text,0,0,r,{color:i.color,maxWidth:m,rotation:_,textAlign:Og(h,e,s),textBaseline:"middle",translation:[d,f]})}draw(t){this._isVisible()&&(this.drawBackground(),this.drawGrid(t),this.drawBorder(),this.drawTitle(),this.drawLabels(t))}_layers(){let t=this.options,e=t.ticks&&t.ticks.z||0,i=$(t.grid&&t.grid.z,-1),s=$(t.border&&t.border.z,0);return!this._isVisible()||this.draw!==n.prototype.draw?[{z:e,draw:r=>{this.draw(r)}}]:[{z:i,draw:r=>{this.drawBackground(),this.drawGrid(r),this.drawTitle()}},{z:s,draw:()=>{this.drawBorder()}},{z:e,draw:r=>{this.drawLabels(r)}}]}getMatchingVisibleMetas(t){let e=this.chart.getSortedVisibleDatasetMetas(),i=this.axis+"AxisID",s=[],r,a;for(r=0,a=e.length;r<a;++r){let h=e[r];h[i]===this.id&&(!t||h.type===t)&&s.push(h)}return s}_resolveTickFontOptions(t){let e=this.options.ticks.setContext(this.getContext(t));return Dt(e.font)}_maxDigits(){let t=this._resolveTickFontOptions(0).lineHeight;return(this.isHorizontal()?this.width:this.height)/t}},Yi=class{constructor(t,e,i){this.type=t,this.scope=e,this.override=i,this.items=Object.create(null)}isForType(t){return Object.prototype.isPrototypeOf.call(this.type.prototype,t.prototype)}register(t){let e=Object.getPrototypeOf(t),i;Eg(e)&&(i=this.register(e));let 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,Ig(t,a,i),this.override&&Mt.override(t.id,t.overrides)),a}get(t){return this.items[t]}unregister(t){let e=this.items,i=t.id,s=this.scope;i in e&&delete e[i],s&&i in Mt[s]&&(delete Mt[s][i],this.override&&delete He[i])}};function Ig(n,t,e){let i=Ti(Object.create(null),[e?Mt.get(e):{},Mt.get(t),n.defaults]);Mt.set(t,i),n.defaultRoutes&&Ag(t,n.defaultRoutes),n.descriptors&&Mt.describe(t,n.descriptors)}function Ag(n,t){Object.keys(t).forEach(e=>{let i=e.split("."),s=i.pop(),r=[n].concat(i).join("."),a=t[e].split("."),h=a.pop(),c=a.join(".");Mt.route(r,s,c,h)})}function Eg(n){return"id"in n&&"defaults"in n}var za=class{constructor(){this.controllers=new Yi(Xt,"datasets",!0),this.elements=new Yi($t,"elements"),this.plugins=new Yi(Object,"plugins"),this.scales=new Yi(ci,"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,e,i){[...e].forEach(s=>{let r=i||this._getRegistryForType(s);i||r.isForType(s)||r===this.plugins&&s.id?this._exec(t,r,s):gt(s,a=>{let h=i||this._getRegistryForType(a);this._exec(t,h,a)})})}_exec(t,e,i){let s=ks(t);vt(i["before"+s],[],i),e[t](i),vt(i["after"+s],[],i)}_getRegistryForType(t){for(let e=0;e<this._typedRegistries.length;e++){let i=this._typedRegistries[e];if(i.isForType(t))return i}return this.plugins}_get(t,e,i){let s=e.get(t);if(s===void 0)throw new Error('"'+t+'" is not a registered '+i+".");return s}},ye=new za,Ra=class{constructor(){this._init=[]}notify(t,e,i,s){e==="beforeInit"&&(this._init=this._createDescriptors(t,!0),this._notify(this._init,t,"install"));let r=s?this._descriptors(t).filter(s):this._descriptors(t),a=this._notify(r,t,e,i);return e==="afterDestroy"&&(this._notify(r,t,"stop"),this._notify(this._init,t,"uninstall")),a}_notify(t,e,i,s){s=s||{};for(let r of t){let a=r.plugin,h=a[i],c=[e,s,r.options];if(vt(h,c,a)===!1&&s.cancelable)return!1}return!0}invalidate(){it(this._cache)||(this._oldCache=this._cache,this._cache=void 0)}_descriptors(t){if(this._cache)return this._cache;let e=this._cache=this._createDescriptors(t);return this._notifyStateChanges(t),e}_createDescriptors(t,e){let i=t&&t.config,s=$(i.options&&i.options.plugins,{}),r=zg(i);return s===!1&&!e?[]:Bg(t,r,s,e)}_notifyStateChanges(t){let e=this._oldCache||[],i=this._cache,s=(r,a)=>r.filter(h=>!a.some(c=>h.plugin.id===c.plugin.id));this._notify(s(e,i),t,"stop"),this._notify(s(i,e),t,"start")}};function zg(n){let t={},e=[],i=Object.keys(ye.plugins.items);for(let r=0;r<i.length;r++)e.push(ye.getPlugin(i[r]));let s=n.plugins||[];for(let r=0;r<s.length;r++){let a=s[r];e.indexOf(a)===-1&&(e.push(a),t[a.id]=!0)}return{plugins:e,localIds:t}}function Rg(n,t){return!t&&n===!1?null:n===!0?{}:n}function Bg(n,{plugins:t,localIds:e},i,s){let r=[],a=n.getContext();for(let h of t){let c=h.id,d=Rg(i[c],s);d!==null&&r.push({plugin:h,options:Fg(n.config,{plugin:h,local:e[c]},d,a)})}return r}function Fg(n,{plugin:t,local:e},i,s){let r=n.pluginScopeKeys(t),a=n.getOptionScopes(i,r);return e&&t.defaults&&a.push(t.defaults),n.createResolver(a,s,[""],{scriptable:!1,indexable:!1,allKeys:!0})}function Ba(n,t){let e=Mt.datasets[n]||{};return((t.datasets||{})[n]||{}).indexAxis||t.indexAxis||e.indexAxis||"x"}function Ng(n,t){let e=n;return n==="_index_"?e=t:n==="_value_"&&(e=t==="x"?"y":"x"),e}function Wg(n,t){return n===t?"_index_":"_value_"}function bc(n){if(n==="x"||n==="y"||n==="r")return n}function Hg(n){if(n==="top"||n==="bottom")return"x";if(n==="left"||n==="right")return"y"}function Fa(n,...t){if(bc(n))return n;for(let e of t){let i=e.axis||Hg(e.position)||n.length>1&&bc(n[0].toLowerCase());if(i)return i}throw new Error(`Cannot determine type of '${n}' axis. Please provide 'axis' or 'position' option.`)}function wc(n,t,e){if(e[t+"AxisID"]===n)return{axis:t}}function Zg(n,t){if(t.data&&t.data.datasets){let e=t.data.datasets.filter(i=>i.xAxisID===n||i.yAxisID===n);if(e.length)return wc(n,"x",e[0])||wc(n,"y",e[0])}return{}}function Vg(n,t){let e=He[n.type]||{scales:{}},i=t.scales||{},s=Ba(n.type,t),r=Object.create(null);return Object.keys(i).forEach(a=>{let h=i[a];if(!rt(h))return console.error(`Invalid scale configuration for scale: ${a}`);if(h._proxy)return console.warn(`Ignoring resolver passed as options for scale: ${a}`);let c=Fa(a,h,Zg(a,n),Mt.scales[h.type]),d=Wg(c,s),f=e.scales||{};r[a]=Si(Object.create(null),[{axis:c},h,f[c],f[d]])}),n.data.datasets.forEach(a=>{let h=a.type||n.type,c=a.indexAxis||Ba(h,t),f=(He[h]||{}).scales||{};Object.keys(f).forEach(m=>{let _=Ng(m,c),y=a[_+"AxisID"]||_;r[y]=r[y]||Object.create(null),Si(r[y],[{axis:_},i[y],f[m]])})}),Object.keys(r).forEach(a=>{let h=r[a];Si(h,[Mt.scales[h.type],Mt.scale])}),r}function au(n){let t=n.options||(n.options={});t.plugins=$(t.plugins,{}),t.scales=Vg(n,t)}function lu(n){return n=n||{},n.datasets=n.datasets||[],n.labels=n.labels||[],n}function Yg(n){return n=n||{},n.data=lu(n.data),au(n),n}var Mc=new Map,hu=new Set;function Ns(n,t){let e=Mc.get(n);return e||(e=t(),Mc.set(n,e),hu.add(e)),e}var On=(n,t,e)=>{let i=Ce(t,e);i!==void 0&&n.add(i)},Na=class{constructor(t){this._config=Yg(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=lu(t)}get options(){return this._config.options}set options(t){this._config.options=t}get plugins(){return this._config.plugins}update(){let t=this._config;this.clearCache(),au(t)}clearCache(){this._scopeCache.clear(),this._resolverCache.clear()}datasetScopeKeys(t){return Ns(t,()=>[[`datasets.${t}`,""]])}datasetAnimationScopeKeys(t,e){return Ns(`${t}.transition.${e}`,()=>[[`datasets.${t}.transitions.${e}`,`transitions.${e}`],[`datasets.${t}`,""]])}datasetElementScopeKeys(t,e){return Ns(`${t}-${e}`,()=>[[`datasets.${t}.elements.${e}`,`datasets.${t}`,`elements.${e}`,""]])}pluginScopeKeys(t){let e=t.id,i=this.type;return Ns(`${i}-plugin-${e}`,()=>[[`plugins.${e}`,...t.additionalOptionScopes||[]]])}_cachedScopes(t,e){let i=this._scopeCache,s=i.get(t);return(!s||e)&&(s=new Map,i.set(t,s)),s}getOptionScopes(t,e,i){let{options:s,type:r}=this,a=this._cachedScopes(t,i),h=a.get(e);if(h)return h;let c=new Set;e.forEach(f=>{t&&(c.add(t),f.forEach(m=>On(c,t,m))),f.forEach(m=>On(c,s,m)),f.forEach(m=>On(c,He[r]||{},m)),f.forEach(m=>On(c,Mt,m)),f.forEach(m=>On(c,Os,m))});let d=Array.from(c);return d.length===0&&d.push(Object.create(null)),hu.has(e)&&a.set(e,d),d}chartOptionScopes(){let{options:t,type:e}=this;return[t,He[e]||{},Mt.datasets[e]||{},{type:e},Mt,Os]}resolveNamedOptions(t,e,i,s=[""]){let r={$shared:!0},{resolver:a,subPrefixes:h}=Lc(this._resolverCache,t,s),c=a;if(Ug(a,e)){r.$shared=!1,i=ke(i)?i():i;let d=this.createResolver(t,i,h);c=ei(a,i,d)}for(let d of e)r[d]=c[d];return r}createResolver(t,e,i=[""],s){let{resolver:r}=Lc(this._resolverCache,t,i);return rt(e)?ei(r,e,void 0,s):r}};function Lc(n,t,e){let i=n.get(t);i||(i=new Map,n.set(t,i));let s=e.join(),r=i.get(s);return r||(r={resolver:As(t,e),subPrefixes:e.filter(h=>!h.toLowerCase().includes("hover"))},i.set(s,r)),r}var jg=n=>rt(n)&&Object.getOwnPropertyNames(n).some(t=>ke(n[t]));function Ug(n,t){let{isScriptable:e,isIndexable:i}=la(n);for(let s of t){let r=e(s),a=i(s),h=(a||r)&&n[s];if(r&&(ke(h)||jg(h))||a&&bt(h))return!0}return!1}var Gg="4.5.0",qg=["top","bottom","left","right","chartArea"];function Pc(n,t){return n==="top"||n==="bottom"||qg.indexOf(n)===-1&&t==="x"}function kc(n,t){return function(e,i){return e[n]===i[n]?e[t]-i[t]:e[n]-i[n]}}function Tc(n){let t=n.chart,e=t.options.animation;t.notifyPlugins("afterRender"),vt(e&&e.onComplete,[n],t)}function Xg(n){let t=n.chart,e=t.options.animation;vt(e&&e.onProgress,[n],t)}function cu(n){return Es()&&typeof n=="string"?n=document.getElementById(n):n&&n.length&&(n=n[0]),n&&n.canvas&&(n=n.canvas),n}var Ys={},Cc=n=>{let t=cu(n);return Object.values(Ys).filter(e=>e.canvas===t).pop()};function $g(n,t,e){let i=Object.keys(n);for(let s of i){let r=+s;if(r>=t){let a=n[s];delete n[s],(e>0||r>t)&&(n[r+e]=a)}}}function Kg(n,t,e,i){return!e||n.type==="mouseout"?null:i?t:n}var ie=class{static register(...t){ye.add(...t),Sc()}static unregister(...t){ye.remove(...t),Sc()}constructor(t,e){let i=this.config=new Na(e),s=cu(t),r=Cc(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.");let a=i.createResolver(i.chartOptionScopes(),this.getContext());this.platform=new(i.platform||yg(s)),this.platform.updateConfig(i);let h=this.platform.acquireContext(s,a.aspectRatio),c=h&&h.canvas,d=c&&c.height,f=c&&c.width;if(this.id=Th(),this.ctx=h,this.canvas=c,this.width=f,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 Ra,this.$proxies={},this._hiddenIndices={},this.attached=!1,this._animationsDisabled=void 0,this.$context=void 0,this._doResize=Fh(m=>this.update(m),a.resizeDelay||0),this._dataChanges=[],Ys[this.id]=this,!h||!c){console.error("Failed to create chart: can't acquire context from the given item");return}Oe.listen(this,"complete",Tc),Oe.listen(this,"progress",Xg),this._initialize(),this.attached&&this.update()}get aspectRatio(){let{options:{aspectRatio:t,maintainAspectRatio:e},width:i,height:s,_aspectRatio:r}=this;return it(t)?e&&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 ye}_initialize(){return this.notifyPlugins("beforeInit"),this.options.responsive?this.resize():da(this,this.options.devicePixelRatio),this.bindEvents(),this.notifyPlugins("afterInit"),this}clear(){return oa(this.canvas,this.ctx),this}stop(){return Oe.stop(this),this}resize(t,e){Oe.running(this)?this._resizeBeforeDraw={width:t,height:e}:this._resize(t,e)}_resize(t,e){let i=this.options,s=this.canvas,r=i.maintainAspectRatio&&this.aspectRatio,a=this.platform.getMaximumSize(s,t,e,r),h=i.devicePixelRatio||this.platform.getDevicePixelRatio(),c=this.width?"resize":"attach";this.width=a.width,this.height=a.height,this._aspectRatio=this.aspectRatio,da(this,h,!0)&&(this.notifyPlugins("resize",{size:a}),vt(i.onResize,[this,a],this),this.attached&&this._doResize(c)&&this.render())}ensureScalesHaveIDs(){let e=this.options.scales||{};gt(e,(i,s)=>{i.id=s})}buildOrUpdateScales(){let t=this.options,e=t.scales,i=this.scales,s=Object.keys(i).reduce((a,h)=>(a[h]=!1,a),{}),r=[];e&&(r=r.concat(Object.keys(e).map(a=>{let h=e[a],c=Fa(a,h),d=c==="r",f=c==="x";return{options:h,dposition:d?"chartArea":f?"bottom":"left",dtype:d?"radialLinear":f?"category":"linear"}}))),gt(r,a=>{let h=a.options,c=h.id,d=Fa(c,h),f=$(h.type,a.dtype);(h.position===void 0||Pc(h.position,d)!==Pc(a.dposition))&&(h.position=a.dposition),s[c]=!0;let m=null;if(c in i&&i[c].type===f)m=i[c];else{let _=ye.getScale(f);m=new _({id:c,type:f,ctx:this.ctx,chart:this}),i[m.id]=m}m.init(h,t)}),gt(s,(a,h)=>{a||delete i[h]}),gt(i,a=>{Wt.configure(this,a,a.options),Wt.addBox(this,a)})}_updateMetasets(){let t=this._metasets,e=this.data.datasets.length,i=t.length;if(t.sort((s,r)=>s.index-r.index),i>e){for(let s=e;s<i;++s)this._destroyDatasetMeta(s);t.splice(e,i-e)}this._sortedMetasets=t.slice(0).sort(kc("order","index"))}_removeUnreferencedMetasets(){let{_metasets:t,data:{datasets:e}}=this;t.length>e.length&&delete this._stacks,t.forEach((i,s)=>{e.filter(r=>r===i._dataset).length===0&&this._destroyDatasetMeta(s)})}buildOrUpdateControllers(){let t=[],e=this.data.datasets,i,s;for(this._removeUnreferencedMetasets(),i=0,s=e.length;i<s;i++){let r=e[i],a=this.getDatasetMeta(i),h=r.type||this.config.type;if(a.type&&a.type!==h&&(this._destroyDatasetMeta(i),a=this.getDatasetMeta(i)),a.type=h,a.indexAxis=r.indexAxis||Ba(h,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{let c=ye.getController(h),{datasetElementType:d,dataElementType:f}=Mt.datasets[h];Object.assign(c,{dataElementType:ye.getElement(f),datasetElementType:d&&ye.getElement(d)}),a.controller=new c(this,i),t.push(a.controller)}}return this._updateMetasets(),t}_resetElements(){gt(this.data.datasets,(t,e)=>{this.getDatasetMeta(e).controller.reset()},this)}reset(){this._resetElements(),this.notifyPlugins("reset")}update(t){let e=this.config;e.update();let i=this._options=e.createResolver(e.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;let r=this.buildOrUpdateControllers();this.notifyPlugins("beforeElementsUpdate");let a=0;for(let d=0,f=this.data.datasets.length;d<f;d++){let{controller:m}=this.getDatasetMeta(d),_=!s&&r.indexOf(m)===-1;m.buildOrUpdateElements(_),a=Math.max(+m.getMaxOverflow(),a)}a=this._minPadding=i.layout.autoPadding?a:0,this._updateLayout(a),s||gt(r,d=>{d.reset()}),this._updateDatasets(t),this.notifyPlugins("afterUpdate",{mode:t}),this._layers.sort(kc("z","_idx"));let{_active:h,_lastEvent:c}=this;c?this._eventHandler(c,!0):h.length&&this._updateHoverStyles(h,h,!0),this.render()}_updateScales(){gt(this.scales,t=>{Wt.removeBox(this,t)}),this.ensureScalesHaveIDs(),this.buildOrUpdateScales()}_checkEventBindings(){let t=this.options,e=new Set(Object.keys(this._listeners)),i=new Set(t.events);(!Ur(e,i)||!!this._responsiveListeners!==t.responsive)&&(this.unbindEvents(),this.bindEvents())}_updateHiddenIndices(){let{_hiddenIndices:t}=this,e=this._getUniformDataChanges()||[];for(let{method:i,start:s,count:r}of e){let a=i==="_removeElements"?-r:r;$g(t,s,a)}}_getUniformDataChanges(){let t=this._dataChanges;if(!t||!t.length)return;this._dataChanges=[];let e=this.data.datasets.length,i=r=>new Set(t.filter(a=>a[0]===r).map((a,h)=>h+","+a.splice(1).join(","))),s=i(0);for(let r=1;r<e;r++)if(!Ur(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;Wt.update(this,this.width,this.height,t);let e=this.chartArea,i=e.width<=0||e.height<=0;this._layers=[],gt(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 e=0,i=this.data.datasets.length;e<i;++e)this.getDatasetMeta(e).controller.configure();for(let e=0,i=this.data.datasets.length;e<i;++e)this._updateDataset(e,ke(t)?t({datasetIndex:e}):t);this.notifyPlugins("afterDatasetsUpdate",{mode:t})}}_updateDataset(t,e){let i=this.getDatasetMeta(t),s={meta:i,index:t,mode:e,cancelable:!0};this.notifyPlugins("beforeDatasetUpdate",s)!==!1&&(i.controller._update(e),s.cancelable=!1,this.notifyPlugins("afterDatasetUpdate",s))}render(){this.notifyPlugins("beforeRender",{cancelable:!0})!==!1&&(Oe.has(this)?this.attached&&!Oe.running(this)&&Oe.start(this):(this.draw(),Tc({chart:this})))}draw(){let t;if(this._resizeBeforeDraw){let{width:i,height:s}=this._resizeBeforeDraw;this._resizeBeforeDraw=null,this._resize(i,s)}if(this.clear(),this.width<=0||this.height<=0||this.notifyPlugins("beforeDraw",{cancelable:!0})===!1)return;let e=this._layers;for(t=0;t<e.length&&e[t].z<=0;++t)e[t].draw(this.chartArea);for(this._drawDatasets();t<e.length;++t)e[t].draw(this.chartArea);this.notifyPlugins("afterDraw")}_getSortedDatasetMetas(t){let e=this._sortedMetasets,i=[],s,r;for(s=0,r=e.length;s<r;++s){let a=e[s];(!t||a.visible)&&i.push(a)}return i}getSortedVisibleDatasetMetas(){return this._getSortedDatasetMetas(!0)}_drawDatasets(){if(this.notifyPlugins("beforeDatasetsDraw",{cancelable:!0})===!1)return;let t=this.getSortedVisibleDatasetMetas();for(let e=t.length-1;e>=0;--e)this._drawDataset(t[e]);this.notifyPlugins("afterDatasetsDraw")}_drawDataset(t){let e=this.ctx,i={meta:t,index:t.index,cancelable:!0},s=ya(this,t);this.notifyPlugins("beforeDatasetDraw",i)!==!1&&(s&&Ln(e,s),t.controller.draw(),s&&Pn(e),i.cancelable=!1,this.notifyPlugins("afterDatasetDraw",i))}isPointInArea(t){return pe(t,this.chartArea,this._minPadding)}getElementsAtEventForMode(t,e,i,s){let r=Jm.modes[e];return typeof r=="function"?r(this,t,i,s):[]}getDatasetMeta(t){let e=this.data.datasets[t],i=this._metasets,s=i.filter(r=>r&&r._dataset===e).pop();return s||(s={type:null,data:[],dataset:null,controller:null,hidden:null,xAxisID:null,yAxisID:null,order:e&&e.order||0,index:t,_dataset:e,_parsed:[],_sorted:!1},i.push(s)),s}getContext(){return this.$context||(this.$context=Se(null,{chart:this,type:"chart"}))}getVisibleDatasetCount(){return this.getSortedVisibleDatasetMetas().length}isDatasetVisible(t){let e=this.data.datasets[t];if(!e)return!1;let i=this.getDatasetMeta(t);return typeof i.hidden=="boolean"?!i.hidden:!e.hidden}setDatasetVisibility(t,e){let i=this.getDatasetMeta(t);i.hidden=!e}toggleDataVisibility(t){this._hiddenIndices[t]=!this._hiddenIndices[t]}getDataVisibility(t){return!this._hiddenIndices[t]}_updateVisibility(t,e,i){let s=i?"show":"hide",r=this.getDatasetMeta(t),a=r.controller._resolveAnimations(void 0,s);Oi(e)?(r.data[e].hidden=!i,this.update()):(this.setDatasetVisibility(t,i),a.update(r,{visible:i}),this.update(h=>h.datasetIndex===t?s:void 0))}hide(t,e){this._updateVisibility(t,e,!1)}show(t,e){this._updateVisibility(t,e,!0)}_destroyDatasetMeta(t){let e=this._metasets[t];e&&e.controller&&e.controller._destroy(),delete this._metasets[t]}_stop(){let t,e;for(this.stop(),Oe.remove(this),t=0,e=this.data.datasets.length;t<e;++t)this._destroyDatasetMeta(t)}destroy(){this.notifyPlugins("beforeDestroy");let{canvas:t,ctx:e}=this;this._stop(),this.config.clearCache(),t&&(this.unbindEvents(),oa(t,e),this.platform.releaseContext(e),this.canvas=null,this.ctx=null),delete Ys[this.id],this.notifyPlugins("afterDestroy")}toBase64Image(...t){return this.canvas.toDataURL(...t)}bindEvents(){this.bindUserEvents(),this.options.responsive?this.bindResponsiveEvents():this.attached=!0}bindUserEvents(){let t=this._listeners,e=this.platform,i=(r,a)=>{e.addEventListener(this,r,a),t[r]=a},s=(r,a,h)=>{r.offsetX=a,r.offsetY=h,this._eventHandler(r)};gt(this.options.events,r=>i(r,s))}bindResponsiveEvents(){this._responsiveListeners||(this._responsiveListeners={});let t=this._responsiveListeners,e=this.platform,i=(c,d)=>{e.addEventListener(this,c,d),t[c]=d},s=(c,d)=>{t[c]&&(e.removeEventListener(this,c,d),delete t[c])},r=(c,d)=>{this.canvas&&this.resize(c,d)},a,h=()=>{s("attach",h),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",h)},e.isAttached(this.canvas)?h():a()}unbindEvents(){gt(this._listeners,(t,e)=>{this.platform.removeEventListener(this,e,t)}),this._listeners={},gt(this._responsiveListeners,(t,e)=>{this.platform.removeEventListener(this,e,t)}),this._responsiveListeners=void 0}updateHoverStyle(t,e,i){let s=i?"set":"remove",r,a,h,c;for(e==="dataset"&&(r=this.getDatasetMeta(t[0].datasetIndex),r.controller["_"+s+"DatasetHoverStyle"]()),h=0,c=t.length;h<c;++h){a=t[h];let d=a&&this.getDatasetMeta(a.datasetIndex).controller;d&&d[s+"HoverStyle"](a.element,a.datasetIndex,a.index)}}getActiveElements(){return this._active||[]}setActiveElements(t){let e=this._active||[],i=t.map(({datasetIndex:r,index:a})=>{let h=this.getDatasetMeta(r);if(!h)throw new Error("No dataset found at index "+r);return{datasetIndex:r,element:h.data[a],index:a}});!wn(i,e)&&(this._active=i,this._lastEvent=null,this._updateHoverStyles(i,e))}notifyPlugins(t,e,i){return this._plugins.notify(this,t,e,i)}isPluginEnabled(t){return this._plugins._cache.filter(e=>e.plugin.id===t).length===1}_updateHoverStyles(t,e,i){let s=this.options.hover,r=(c,d)=>c.filter(f=>!d.some(m=>f.datasetIndex===m.datasetIndex&&f.index===m.index)),a=r(e,t),h=i?t:r(t,e);a.length&&this.updateHoverStyle(a,s.mode,!1),h.length&&s.mode&&this.updateHoverStyle(h,s.mode,!0)}_eventHandler(t,e){let i={event:t,replay:e,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;let r=this._handleEvent(t,e,i.inChartArea);return i.cancelable=!1,this.notifyPlugins("afterEvent",i,s),(r||i.changed)&&this.render(),this}_handleEvent(t,e,i){let{_active:s=[],options:r}=this,a=e,h=this._getActiveElements(t,s,i,a),c=Oh(t),d=Kg(t,this._lastEvent,i,c);i&&(this._lastEvent=null,vt(r.onHover,[t,h,this],this),c&&vt(r.onClick,[t,h,this],this));let f=!wn(h,s);return(f||e)&&(this._active=h,this._updateHoverStyles(h,s,e)),this._lastEvent=d,f}_getActiveElements(t,e,i,s){if(t.type==="mouseout")return[];if(!i)return e;let r=this.options.hover;return this.getElementsAtEventForMode(t,r.mode,r,s)}};k(ie,"defaults",Mt),k(ie,"instances",Ys),k(ie,"overrides",He),k(ie,"registry",ye),k(ie,"version",Gg),k(ie,"getChart",Cc);function Sc(){return gt(ie.instances,n=>n._plugins.invalidate())}function Qg(n,t,e){let{startAngle:i,x:s,y:r,outerRadius:a,innerRadius:h,options:c}=t,{borderWidth:d,borderJoinStyle:f}=c,m=Math.min(d/a,zt(i-e));if(n.beginPath(),n.arc(s,r,a-d/2,i+m/2,e-m/2),h>0){let _=Math.min(d/h,zt(i-e));n.arc(s,r,h+d/2,e-_/2,i+_/2,!0)}else{let _=Math.min(d/2,a*zt(i-e));if(f==="round")n.arc(s,r,_,e-ut/2,i+ut/2,!0);else if(f==="bevel"){let y=2*_*_,x=-y*Math.cos(e+ut/2)+s,b=-y*Math.sin(e+ut/2)+r,w=y*Math.cos(i+ut/2)+s,P=y*Math.sin(i+ut/2)+r;n.lineTo(x,b),n.lineTo(w,P)}}n.closePath(),n.moveTo(0,0),n.rect(0,0,n.canvas.width,n.canvas.height),n.clip("evenodd")}function Jg(n,t,e){let{startAngle:i,pixelMargin:s,x:r,y:a,outerRadius:h,innerRadius:c}=t,d=s/h;n.beginPath(),n.arc(r,a,h,i-d,e+d),c>s?(d=s/c,n.arc(r,a,c,e+d,i-d,!0)):n.arc(r,a,s,e+Tt,i-Tt),n.closePath(),n.clip()}function t_(n){return Is(n,["outerStart","outerEnd","innerStart","innerEnd"])}function e_(n,t,e,i){let s=t_(n.options.borderRadius),r=(e-t)/2,a=Math.min(r,i*t/2),h=c=>{let d=(e-Math.min(r,c))*i/2;return It(c,0,Math.min(r,d))};return{outerStart:h(s.outerStart),outerEnd:h(s.outerEnd),innerStart:It(s.innerStart,0,a),innerEnd:It(s.innerEnd,0,a)}}function Ri(n,t,e,i){return{x:e+n*Math.cos(t),y:i+n*Math.sin(t)}}function qs(n,t,e,i,s,r){let{x:a,y:h,startAngle:c,pixelMargin:d,innerRadius:f}=t,m=Math.max(t.outerRadius+i+e-d,0),_=f>0?f+i+e+d:0,y=0,x=s-c;if(i){let st=f>0?f-i:0,W=m>0?m-i:0,yt=(st+W)/2,E=yt!==0?x*yt/(yt+i):x;y=(x-E)/2}let b=Math.max(.001,x*m-e/ut)/m,w=(x-b)/2,P=c+w+y,C=s-w-y,{outerStart:O,outerEnd:I,innerStart:D,innerEnd:z}=e_(t,_,m,C-P),R=m-O,B=m-I,N=P+O/R,j=C-I/B,q=_+D,Y=_+z,nt=P+D/q,lt=C-z/Y;if(n.beginPath(),r){let st=(N+j)/2;if(n.arc(a,h,m,N,st),n.arc(a,h,m,st,j),I>0){let V=Ri(B,j,a,h);n.arc(V.x,V.y,I,j,C+Tt)}let W=Ri(Y,C,a,h);if(n.lineTo(W.x,W.y),z>0){let V=Ri(Y,lt,a,h);n.arc(V.x,V.y,z,C+Tt,lt+Math.PI)}let yt=(C-z/_+(P+D/_))/2;if(n.arc(a,h,_,C-z/_,yt,!0),n.arc(a,h,_,yt,P+D/_,!0),D>0){let V=Ri(q,nt,a,h);n.arc(V.x,V.y,D,nt+Math.PI,P-Tt)}let E=Ri(R,P,a,h);if(n.lineTo(E.x,E.y),O>0){let V=Ri(R,N,a,h);n.arc(V.x,V.y,O,P-Tt,N)}}else{n.moveTo(a,h);let st=Math.cos(N)*m+a,W=Math.sin(N)*m+h;n.lineTo(st,W);let yt=Math.cos(j)*m+a,E=Math.sin(j)*m+h;n.lineTo(yt,E)}n.closePath()}function i_(n,t,e,i,s){let{fullCircles:r,startAngle:a,circumference:h}=t,c=t.endAngle;if(r){qs(n,t,e,i,c,s);for(let d=0;d<r;++d)n.fill();isNaN(h)||(c=a+(h%wt||wt))}return qs(n,t,e,i,c,s),n.fill(),c}function n_(n,t,e,i,s){let{fullCircles:r,startAngle:a,circumference:h,options:c}=t,{borderWidth:d,borderJoinStyle:f,borderDash:m,borderDashOffset:_,borderRadius:y}=c,x=c.borderAlign==="inner";if(!d)return;n.setLineDash(m||[]),n.lineDashOffset=_,x?(n.lineWidth=d*2,n.lineJoin=f||"round"):(n.lineWidth=d,n.lineJoin=f||"bevel");let b=t.endAngle;if(r){qs(n,t,e,i,b,s);for(let w=0;w<r;++w)n.stroke();isNaN(h)||(b=a+(h%wt||wt))}x&&Jg(n,t,b),c.selfJoin&&b-a>=ut&&y===0&&f!=="miter"&&Qg(n,t,b),r||(qs(n,t,e,i,b,s),n.stroke())}var ri=class extends $t{constructor(e){super();k(this,"circumference");k(this,"endAngle");k(this,"fullCircles");k(this,"innerRadius");k(this,"outerRadius");k(this,"pixelMargin");k(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,e&&Object.assign(this,e)}inRange(e,i,s){let r=this.getProps(["x","y"],s),{angle:a,distance:h}=$r(r,{x:e,y:i}),{startAngle:c,endAngle:d,innerRadius:f,outerRadius:m,circumference:_}=this.getProps(["startAngle","endAngle","innerRadius","outerRadius","circumference"],s),y=(this.options.spacing+this.options.borderWidth)/2,x=$(_,d-c),b=Ii(a,c,d)&&c!==d,w=x>=wt||b,P=ge(h,f+y,m+y);return w&&P}getCenterPoint(e){let{x:i,y:s,startAngle:r,endAngle:a,innerRadius:h,outerRadius:c}=this.getProps(["x","y","startAngle","endAngle","innerRadius","outerRadius"],e),{offset:d,spacing:f}=this.options,m=(r+a)/2,_=(h+c+f+d)/2;return{x:i+Math.cos(m)*_,y:s+Math.sin(m)*_}}tooltipPosition(e){return this.getCenterPoint(e)}draw(e){let{options:i,circumference:s}=this,r=(i.offset||0)/4,a=(i.spacing||0)/2,h=i.circular;if(this.pixelMargin=i.borderAlign==="inner"?.33:0,this.fullCircles=s>wt?Math.floor(s/wt):0,s===0||this.innerRadius<0||this.outerRadius<0)return;e.save();let c=(this.startAngle+this.endAngle)/2;e.translate(Math.cos(c)*r,Math.sin(c)*r);let d=1-Math.sin(Math.min(ut,s||0)),f=r*d;e.fillStyle=i.backgroundColor,e.strokeStyle=i.borderColor,i_(e,this,f,a,h),n_(e,this,f,a,h),e.restore()}};k(ri,"id","arc"),k(ri,"defaults",{borderAlign:"center",borderColor:"#fff",borderDash:[],borderDashOffset:0,borderJoinStyle:void 0,borderRadius:0,borderWidth:2,offset:0,spacing:0,angle:void 0,circular:!0,selfJoin:!1}),k(ri,"defaultRoutes",{backgroundColor:"backgroundColor"}),k(ri,"descriptors",{_scriptable:!0,_indexable:e=>e!=="borderDash"});function uu(n,t,e=t){n.lineCap=$(e.borderCapStyle,t.borderCapStyle),n.setLineDash($(e.borderDash,t.borderDash)),n.lineDashOffset=$(e.borderDashOffset,t.borderDashOffset),n.lineJoin=$(e.borderJoinStyle,t.borderJoinStyle),n.lineWidth=$(e.borderWidth,t.borderWidth),n.strokeStyle=$(e.borderColor,t.borderColor)}function s_(n,t,e){n.lineTo(e.x,e.y)}function o_(n){return n.stepped?Zh:n.tension||n.cubicInterpolationMode==="monotone"?Vh:s_}function du(n,t,e={}){let i=n.length,{start:s=0,end:r=i-1}=e,{start:a,end:h}=t,c=Math.max(s,a),d=Math.min(r,h),f=s<a&&r<a||s>h&&r>h;return{count:i,start:c,loop:t.loop,ilen:d<c&&!f?i+d-c:d-c}}function r_(n,t,e,i){let{points:s,options:r}=t,{count:a,start:h,loop:c,ilen:d}=du(s,e,i),f=o_(r),{move:m=!0,reverse:_}=i||{},y,x,b;for(y=0;y<=d;++y)x=s[(h+(_?d-y:y))%a],!x.skip&&(m?(n.moveTo(x.x,x.y),m=!1):f(n,b,x,_,r.stepped),b=x);return c&&(x=s[(h+(_?d:0))%a],f(n,b,x,_,r.stepped)),!!c}function a_(n,t,e,i){let s=t.points,{count:r,start:a,ilen:h}=du(s,e,i),{move:c=!0,reverse:d}=i||{},f=0,m=0,_,y,x,b,w,P,C=I=>(a+(d?h-I:I))%r,O=()=>{b!==w&&(n.lineTo(f,w),n.lineTo(f,b),n.lineTo(f,P))};for(c&&(y=s[C(0)],n.moveTo(y.x,y.y)),_=0;_<=h;++_){if(y=s[C(_)],y.skip)continue;let I=y.x,D=y.y,z=I|0;z===x?(D<b?b=D:D>w&&(w=D),f=(m*f+I)/++m):(O(),n.lineTo(I,D),x=z,m=0,b=w=D),P=D}O()}function Wa(n){let t=n.options,e=t.borderDash&&t.borderDash.length;return!n._decimated&&!n._loop&&!t.tension&&t.cubicInterpolationMode!=="monotone"&&!t.stepped&&!e?a_:r_}function l_(n){return n.stepped?Qh:n.tension||n.cubicInterpolationMode==="monotone"?Jh:We}function h_(n,t,e,i){let s=t._path;s||(s=t._path=new Path2D,t.path(s,e,i)&&s.closePath()),uu(n,t.options),n.stroke(s)}function c_(n,t,e,i){let{segments:s,options:r}=t,a=Wa(t);for(let h of s)uu(n,r,h.style),n.beginPath(),a(n,t,h,{start:e,end:e+i-1})&&n.closePath(),n.stroke()}var u_=typeof Path2D=="function";function d_(n,t,e,i){u_&&!t.options.segment?h_(n,t,e,i):c_(n,t,e,i)}var ve=class extends $t{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,e){let i=this.options;if((i.tension||i.cubicInterpolationMode==="monotone")&&!i.stepped&&!this._pointsUpdated){let s=i.spanGaps?this._loop:this._fullLoop;Xh(this._points,i,t,s,e),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=ec(this,this.options.segment))}first(){let t=this.segments,e=this.points;return t.length&&e[t[0].start]}last(){let t=this.segments,e=this.points,i=t.length;return i&&e[t[i-1].end]}interpolate(t,e){let i=this.options,s=t[e],r=this.points,a=_a(this,{property:e,start:s,end:s});if(!a.length)return;let h=[],c=l_(i),d,f;for(d=0,f=a.length;d<f;++d){let{start:m,end:_}=a[d],y=r[m],x=r[_];if(y===x){h.push(y);continue}let b=Math.abs((s-y[e])/(x[e]-y[e])),w=c(y,x,b,i.stepped);w[e]=t[e],h.push(w)}return h.length===1?h[0]:h}pathSegment(t,e,i){return Wa(this)(t,this,e,i)}path(t,e,i){let s=this.segments,r=Wa(this),a=this._loop;e=e||0,i=i||this.points.length-e;for(let h of s)a&=r(t,this,h,{start:e,end:e+i-1});return!!a}draw(t,e,i,s){let r=this.options||{};(this.points||[]).length&&r.borderWidth&&(t.save(),d_(t,this,i,s),t.restore()),this.animated&&(this._pointsUpdated=!1,this._path=void 0)}};k(ve,"id","line"),k(ve,"defaults",{borderCapStyle:"butt",borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",borderWidth:3,capBezierPoints:!0,cubicInterpolationMode:"default",fill:!1,spanGaps:!1,stepped:!1,tension:0}),k(ve,"defaultRoutes",{backgroundColor:"backgroundColor",borderColor:"borderColor"}),k(ve,"descriptors",{_scriptable:!0,_indexable:t=>t!=="borderDash"&&t!=="fill"});function Oc(n,t,e,i){let s=n.options,{[e]:r}=n.getProps([e],i);return Math.abs(t-r)<s.radius+s.hitRadius}var Zi=class extends $t{constructor(e){super();k(this,"parsed");k(this,"skip");k(this,"stop");this.options=void 0,this.parsed=void 0,this.skip=void 0,this.stop=void 0,e&&Object.assign(this,e)}inRange(e,i,s){let r=this.options,{x:a,y:h}=this.getProps(["x","y"],s);return Math.pow(e-a,2)+Math.pow(i-h,2)<Math.pow(r.hitRadius+r.radius,2)}inXRange(e,i){return Oc(this,e,"x",i)}inYRange(e,i){return Oc(this,e,"y",i)}getCenterPoint(e){let{x:i,y:s}=this.getProps(["x","y"],e);return{x:i,y:s}}size(e){e=e||this.options||{};let i=e.radius||0;i=Math.max(i,i&&e.hoverRadius||0);let s=i&&e.borderWidth||0;return(i+s)*2}draw(e,i){let s=this.options;this.skip||s.radius<.1||!pe(this,i,this.size(s)/2)||(e.strokeStyle=s.borderColor,e.lineWidth=s.borderWidth,e.fillStyle=s.backgroundColor,Ds(e,s,this.x,this.y))}getRange(){let e=this.options||{};return e.radius+e.hitRadius}};k(Zi,"id","point"),k(Zi,"defaults",{borderWidth:1,hitRadius:1,hoverBorderWidth:1,hoverRadius:4,pointStyle:"circle",radius:3,rotation:0}),k(Zi,"defaultRoutes",{backgroundColor:"backgroundColor",borderColor:"borderColor"});function fu(n,t){let{x:e,y:i,base:s,width:r,height:a}=n.getProps(["x","y","base","width","height"],t),h,c,d,f,m;return n.horizontal?(m=a/2,h=Math.min(e,s),c=Math.max(e,s),d=i-m,f=i+m):(m=r/2,h=e-m,c=e+m,d=Math.min(i,s),f=Math.max(i,s)),{left:h,top:d,right:c,bottom:f}}function Ue(n,t,e,i){return n?0:It(t,e,i)}function f_(n,t,e){let i=n.options.borderWidth,s=n.borderSkipped,r=aa(i);return{t:Ue(s.top,r.top,0,e),r:Ue(s.right,r.right,0,t),b:Ue(s.bottom,r.bottom,0,e),l:Ue(s.left,r.left,0,t)}}function p_(n,t,e){let{enableBorderRadius:i}=n.getProps(["enableBorderRadius"]),s=n.options.borderRadius,r=Ye(s),a=Math.min(t,e),h=n.borderSkipped,c=i||rt(s);return{topLeft:Ue(!c||h.top||h.left,r.topLeft,0,a),topRight:Ue(!c||h.top||h.right,r.topRight,0,a),bottomLeft:Ue(!c||h.bottom||h.left,r.bottomLeft,0,a),bottomRight:Ue(!c||h.bottom||h.right,r.bottomRight,0,a)}}function m_(n){let t=fu(n),e=t.right-t.left,i=t.bottom-t.top,s=f_(n,e/2,i/2),r=p_(n,e/2,i/2);return{outer:{x:t.left,y:t.top,w:e,h:i,radius:r},inner:{x:t.left+s.l,y:t.top+s.t,w:e-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 ka(n,t,e,i){let s=t===null,r=e===null,h=n&&!(s&&r)&&fu(n,i);return h&&(s||ge(t,h.left,h.right))&&(r||ge(e,h.top,h.bottom))}function g_(n){return n.topLeft||n.topRight||n.bottomLeft||n.bottomRight}function __(n,t){n.rect(t.x,t.y,t.w,t.h)}function Ta(n,t,e={}){let i=n.x!==e.x?-t:0,s=n.y!==e.y?-t:0,r=(n.x+n.w!==e.x+e.w?t:0)-i,a=(n.y+n.h!==e.y+e.h?t:0)-s;return{x:n.x+i,y:n.y+s,w:n.w+r,h:n.h+a,radius:n.radius}}var Vi=class extends $t{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){let{inflateAmount:e,options:{borderColor:i,backgroundColor:s}}=this,{inner:r,outer:a}=m_(this),h=g_(a.radius)?Ei:__;t.save(),(a.w!==r.w||a.h!==r.h)&&(t.beginPath(),h(t,Ta(a,e,r)),t.clip(),h(t,Ta(r,-e,a)),t.fillStyle=i,t.fill("evenodd")),t.beginPath(),h(t,Ta(r,e)),t.fillStyle=s,t.fill(),t.restore()}inRange(t,e,i){return ka(this,t,e,i)}inXRange(t,e){return ka(this,t,null,e)}inYRange(t,e){return ka(this,null,t,e)}getCenterPoint(t){let{x:e,y:i,base:s,horizontal:r}=this.getProps(["x","y","base","horizontal"],t);return{x:r?(e+s)/2:e,y:r?i:(i+s)/2}}getRange(t){return t==="x"?this.width/2:this.height/2}};k(Vi,"id","bar"),k(Vi,"defaults",{borderSkipped:"start",borderWidth:0,borderRadius:0,inflateAmount:"auto",pointStyle:void 0}),k(Vi,"defaultRoutes",{backgroundColor:"backgroundColor",borderColor:"borderColor"});var y_=Object.freeze({__proto__:null,ArcElement:ri,BarElement:Vi,LineElement:ve,PointElement:Zi}),Ha=["rgb(54, 162, 235)","rgb(255, 99, 132)","rgb(255, 159, 64)","rgb(255, 205, 86)","rgb(75, 192, 192)","rgb(153, 102, 255)","rgb(201, 203, 207)"],Dc=Ha.map(n=>n.replace("rgb(","rgba(").replace(")",", 0.5)"));function pu(n){return Ha[n%Ha.length]}function mu(n){return Dc[n%Dc.length]}function v_(n,t){return n.borderColor=pu(t),n.backgroundColor=mu(t),++t}function x_(n,t){return n.backgroundColor=n.data.map(()=>pu(t++)),t}function b_(n,t){return n.backgroundColor=n.data.map(()=>mu(t++)),t}function w_(n){let t=0;return(e,i)=>{let s=n.getDatasetMeta(i).controller;s instanceof Ie?t=x_(e,t):s instanceof li?t=b_(e,t):s&&(t=v_(e,t))}}function Ic(n){let t;for(t in n)if(n[t].borderColor||n[t].backgroundColor)return!0;return!1}function M_(n){return n&&(n.borderColor||n.backgroundColor)}function L_(){return Mt.borderColor!=="rgba(0,0,0,0.1)"||Mt.backgroundColor!=="rgba(0,0,0,0.1)"}var P_={id:"colors",defaults:{enabled:!0,forceOverride:!1},beforeLayout(n,t,e){if(!e.enabled)return;let{data:{datasets:i},options:s}=n.config,{elements:r}=s,a=Ic(i)||M_(s)||r&&Ic(r)||L_();if(!e.forceOverride&&a)return;let h=w_(n);i.forEach(h)}};function k_(n,t,e,i,s){let r=s.samples||i;if(r>=e)return n.slice(t,t+e);let a=[],h=(e-2)/(r-2),c=0,d=t+e-1,f=t,m,_,y,x,b;for(a[c++]=n[f],m=0;m<r-2;m++){let w=0,P=0,C,O=Math.floor((m+1)*h)+1+t,I=Math.min(Math.floor((m+2)*h)+1,e)+t,D=I-O;for(C=O;C<I;C++)w+=n[C].x,P+=n[C].y;w/=D,P/=D;let z=Math.floor(m*h)+1+t,R=Math.min(Math.floor((m+1)*h)+1,e)+t,{x:B,y:N}=n[f];for(y=x=-1,C=z;C<R;C++)x=.5*Math.abs((B-w)*(n[C].y-N)-(B-n[C].x)*(P-N)),x>y&&(y=x,_=n[C],b=C);a[c++]=_,f=b}return a[c++]=n[d],a}function T_(n,t,e,i){let s=0,r=0,a,h,c,d,f,m,_,y,x,b,w=[],P=t+e-1,C=n[t].x,I=n[P].x-C;for(a=t;a<t+e;++a){h=n[a],c=(h.x-C)/I*i,d=h.y;let D=c|0;if(D===f)d<x?(x=d,m=a):d>b&&(b=d,_=a),s=(r*s+h.x)/++r;else{let z=a-1;if(!it(m)&&!it(_)){let R=Math.min(m,_),B=Math.max(m,_);R!==y&&R!==z&&w.push(Li(Mi({},n[R]),{x:s})),B!==y&&B!==z&&w.push(Li(Mi({},n[B]),{x:s}))}a>0&&z!==y&&w.push(n[z]),w.push(h),f=D,r=0,x=b=d,m=_=y=a}}return w}function gu(n){if(n._decimated){let t=n._data;delete n._decimated,delete n._data,Object.defineProperty(n,"data",{configurable:!0,enumerable:!0,writable:!0,value:t})}}function Ac(n){n.data.datasets.forEach(t=>{gu(t)})}function C_(n,t){let e=t.length,i=0,s,{iScale:r}=n,{min:a,max:h,minDefined:c,maxDefined:d}=r.getUserBounds();return c&&(i=It(fe(t,r.axis,a).lo,0,e-1)),d?s=It(fe(t,r.axis,h).hi+1,i,e)-i:s=e-i,{start:i,count:s}}var S_={id:"decimation",defaults:{algorithm:"min-max",enabled:!1},beforeElementsUpdate:(n,t,e)=>{if(!e.enabled){Ac(n);return}let i=n.width;n.data.datasets.forEach((s,r)=>{let{_data:a,indexAxis:h}=s,c=n.getDatasetMeta(r),d=a||s.data;if(zi([h,n.options.indexAxis])==="y"||!c.controller.supportsDecimation)return;let f=n.scales[c.xAxisID];if(f.type!=="linear"&&f.type!=="time"||n.options.parsing)return;let{start:m,count:_}=C_(c,d),y=e.threshold||4*i;if(_<=y){gu(s);return}it(a)&&(s._data=d,delete s.data,Object.defineProperty(s,"data",{configurable:!0,enumerable:!0,get:function(){return this._decimated},set:function(b){this._data=b}}));let x;switch(e.algorithm){case"lttb":x=k_(d,m,_,i,e);break;case"min-max":x=T_(d,m,_,i);break;default:throw new Error(`Unsupported decimation algorithm '${e.algorithm}'`)}s._decimated=x})},destroy(n){Ac(n)}};function O_(n,t,e){let i=n.segments,s=n.points,r=t.points,a=[];for(let h of i){let{start:c,end:d}=h;d=Ks(c,d,s);let f=Za(e,s[c],s[d],h.loop);if(!t.segments){a.push({source:h,target:f,start:s[c],end:s[d]});continue}let m=_a(t,f);for(let _ of m){let y=Za(e,r[_.start],r[_.end],_.loop),x=ga(h,s,y);for(let b of x)a.push({source:b,target:_,start:{[e]:Ec(f,y,"start",Math.max)},end:{[e]:Ec(f,y,"end",Math.min)}})}}return a}function Za(n,t,e,i){if(i)return;let s=t[n],r=e[n];return n==="angle"&&(s=zt(s),r=zt(r)),{property:n,start:s,end:r}}function D_(n,t){let{x:e=null,y:i=null}=n||{},s=t.points,r=[];return t.segments.forEach(({start:a,end:h})=>{h=Ks(a,h,s);let c=s[a],d=s[h];i!==null?(r.push({x:c.x,y:i}),r.push({x:d.x,y:i})):e!==null&&(r.push({x:e,y:c.y}),r.push({x:e,y:d.y}))}),r}function Ks(n,t,e){for(;t>n;t--){let i=e[t];if(!isNaN(i.x)&&!isNaN(i.y))break}return t}function Ec(n,t,e,i){return n&&t?i(n[e],t[e]):n?n[e]:t?t[e]:0}function _u(n,t){let e=[],i=!1;return bt(n)?(i=!0,e=n):e=D_(n,t),e.length?new ve({points:e,options:{tension:0},_loop:i,_fullLoop:i}):null}function zc(n){return n&&n.fill!==!1}function I_(n,t,e){let s=n[t].fill,r=[t],a;if(!e)return s;for(;s!==!1&&r.indexOf(s)===-1;){if(!Pt(s))return s;if(a=n[s],!a)return!1;if(a.visible)return s;r.push(s),s=a.fill}return!1}function A_(n,t,e){let i=B_(n);if(rt(i))return isNaN(i.value)?!1:i;let s=parseFloat(i);return Pt(s)&&Math.floor(s)===s?E_(i[0],t,s,e):["origin","start","end","stack","shape"].indexOf(i)>=0&&i}function E_(n,t,e,i){return(n==="-"||n==="+")&&(e=t+e),e===t||e<0||e>=i?!1:e}function z_(n,t){let e=null;return n==="start"?e=t.bottom:n==="end"?e=t.top:rt(n)?e=t.getPixelForValue(n.value):t.getBasePixel&&(e=t.getBasePixel()),e}function R_(n,t,e){let i;return n==="start"?i=e:n==="end"?i=t.options.reverse?t.min:t.max:rt(n)?i=n.value:i=t.getBaseValue(),i}function B_(n){let t=n.options,e=t.fill,i=$(e&&e.target,e);return i===void 0&&(i=!!t.backgroundColor),i===!1||i===null?!1:i===!0?"origin":i}function F_(n){let{scale:t,index:e,line:i}=n,s=[],r=i.segments,a=i.points,h=N_(t,e);h.push(_u({x:null,y:t.bottom},i));for(let c=0;c<r.length;c++){let d=r[c];for(let f=d.start;f<=d.end;f++)W_(s,a[f],h)}return new ve({points:s,options:{}})}function N_(n,t){let e=[],i=n.getMatchingVisibleMetas("line");for(let s=0;s<i.length;s++){let r=i[s];if(r.index===t)break;r.hidden||e.unshift(r.dataset)}return e}function W_(n,t,e){let i=[];for(let s=0;s<e.length;s++){let r=e[s],{first:a,last:h,point:c}=H_(r,t,"x");if(!(!c||a&&h)){if(a)i.unshift(c);else if(n.push(c),!h)break}}n.push(...i)}function H_(n,t,e){let i=n.interpolate(t,e);if(!i)return{};let s=i[e],r=n.segments,a=n.points,h=!1,c=!1;for(let d=0;d<r.length;d++){let f=r[d],m=a[f.start][e],_=a[f.end][e];if(ge(s,m,_)){h=s===m,c=s===_;break}}return{first:h,last:c,point:i}}var Xs=class{constructor(t){this.x=t.x,this.y=t.y,this.radius=t.radius}pathSegment(t,e,i){let{x:s,y:r,radius:a}=this;return e=e||{start:0,end:wt},t.arc(s,r,a,e.end,e.start,!0),!i.bounds}interpolate(t){let{x:e,y:i,radius:s}=this,r=t.angle;return{x:e+Math.cos(r)*s,y:i+Math.sin(r)*s,angle:r}}};function Z_(n){let{chart:t,fill:e,line:i}=n;if(Pt(e))return V_(t,e);if(e==="stack")return F_(n);if(e==="shape")return!0;let s=Y_(n);return s instanceof Xs?s:_u(s,i)}function V_(n,t){let e=n.getDatasetMeta(t);return e&&n.isDatasetVisible(t)?e.dataset:null}function Y_(n){return(n.scale||{}).getPointPositionForValue?U_(n):j_(n)}function j_(n){let{scale:t={},fill:e}=n,i=z_(e,t);if(Pt(i)){let s=t.isHorizontal();return{x:s?i:null,y:s?null:i}}return null}function U_(n){let{scale:t,fill:e}=n,i=t.options,s=t.getLabels().length,r=i.reverse?t.max:t.min,a=R_(e,t,r),h=[];if(i.grid.circular){let c=t.getPointPositionForValue(0,r);return new Xs({x:c.x,y:c.y,radius:t.getDistanceFromCenterForValue(a)})}for(let c=0;c<s;++c)h.push(t.getPointPositionForValue(c,a));return h}function Ca(n,t,e){let i=Z_(t),{chart:s,index:r,line:a,scale:h,axis:c}=t,d=a.options,f=d.fill,m=d.backgroundColor,{above:_=m,below:y=m}=f||{},x=s.getDatasetMeta(r),b=ya(s,x);i&&a.points.length&&(Ln(n,e),G_(n,{line:a,target:i,above:_,below:y,area:e,scale:h,axis:c,clip:b}),Pn(n))}function G_(n,t){let{line:e,target:i,above:s,below:r,area:a,scale:h,clip:c}=t,d=e._loop?"angle":t.axis;n.save();let f=r;r!==s&&(d==="x"?(Rc(n,i,a.top),Sa(n,{line:e,target:i,color:s,scale:h,property:d,clip:c}),n.restore(),n.save(),Rc(n,i,a.bottom)):d==="y"&&(Bc(n,i,a.left),Sa(n,{line:e,target:i,color:r,scale:h,property:d,clip:c}),n.restore(),n.save(),Bc(n,i,a.right),f=s)),Sa(n,{line:e,target:i,color:f,scale:h,property:d,clip:c}),n.restore()}function Rc(n,t,e){let{segments:i,points:s}=t,r=!0,a=!1;n.beginPath();for(let h of i){let{start:c,end:d}=h,f=s[c],m=s[Ks(c,d,s)];r?(n.moveTo(f.x,f.y),r=!1):(n.lineTo(f.x,e),n.lineTo(f.x,f.y)),a=!!t.pathSegment(n,h,{move:a}),a?n.closePath():n.lineTo(m.x,e)}n.lineTo(t.first().x,e),n.closePath(),n.clip()}function Bc(n,t,e){let{segments:i,points:s}=t,r=!0,a=!1;n.beginPath();for(let h of i){let{start:c,end:d}=h,f=s[c],m=s[Ks(c,d,s)];r?(n.moveTo(f.x,f.y),r=!1):(n.lineTo(e,f.y),n.lineTo(f.x,f.y)),a=!!t.pathSegment(n,h,{move:a}),a?n.closePath():n.lineTo(e,m.y)}n.lineTo(e,t.first().y),n.closePath(),n.clip()}function Sa(n,t){let{line:e,target:i,property:s,color:r,scale:a,clip:h}=t,c=O_(e,i,s);for(let{source:d,target:f,start:m,end:_}of c){let{style:{backgroundColor:y=r}={}}=d,x=i!==!0;n.save(),n.fillStyle=y,q_(n,a,h,x&&Za(s,m,_)),n.beginPath();let b=!!e.pathSegment(n,d),w;if(x){b?n.closePath():Fc(n,i,_,s);let P=!!i.pathSegment(n,f,{move:b,reverse:!0});w=b&&P,w||Fc(n,i,m,s)}n.closePath(),n.fill(w?"evenodd":"nonzero"),n.restore()}}function q_(n,t,e,i){let s=t.chart.chartArea,{property:r,start:a,end:h}=i||{};if(r==="x"||r==="y"){let c,d,f,m;r==="x"?(c=a,d=s.top,f=h,m=s.bottom):(c=s.left,d=a,f=s.right,m=h),n.beginPath(),e&&(c=Math.max(c,e.left),f=Math.min(f,e.right),d=Math.max(d,e.top),m=Math.min(m,e.bottom)),n.rect(c,d,f-c,m-d),n.clip()}}function Fc(n,t,e,i){let s=t.interpolate(e,i);s&&n.lineTo(s.x,s.y)}var X_={id:"filler",afterDatasetsUpdate(n,t,e){let i=(n.data.datasets||[]).length,s=[],r,a,h,c;for(a=0;a<i;++a)r=n.getDatasetMeta(a),h=r.dataset,c=null,h&&h.options&&h instanceof ve&&(c={visible:n.isDatasetVisible(a),index:a,fill:A_(h,a,i),chart:n,axis:r.controller.options.indexAxis,scale:r.vScale,line:h}),r.$filler=c,s.push(c);for(a=0;a<i;++a)c=s[a],!(!c||c.fill===!1)&&(c.fill=I_(s,a,e.propagate))},beforeDraw(n,t,e){let i=e.drawTime==="beforeDraw",s=n.getSortedVisibleDatasetMetas(),r=n.chartArea;for(let a=s.length-1;a>=0;--a){let h=s[a].$filler;h&&(h.line.updateControlPoints(r,h.axis),i&&h.fill&&Ca(n.ctx,h,r))}},beforeDatasetsDraw(n,t,e){if(e.drawTime!=="beforeDatasetsDraw")return;let i=n.getSortedVisibleDatasetMetas();for(let s=i.length-1;s>=0;--s){let r=i[s].$filler;zc(r)&&Ca(n.ctx,r,n.chartArea)}},beforeDatasetDraw(n,t,e){let i=t.meta.$filler;!zc(i)||e.drawTime!=="beforeDatasetDraw"||Ca(n.ctx,i,n.chartArea)},defaults:{propagate:!0,drawTime:"beforeDatasetDraw"}},Nc=(n,t)=>{let{boxHeight:e=t,boxWidth:i=t}=n;return n.usePointStyle&&(e=Math.min(e,t),i=n.pointStyleWidth||Math.min(i,t)),{boxWidth:i,boxHeight:e,itemHeight:Math.max(t,e)}},$_=(n,t)=>n!==null&&t!==null&&n.datasetIndex===t.datasetIndex&&n.index===t.index,$s=class extends $t{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,e,i){this.maxWidth=t,this.maxHeight=e,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(){let t=this.options.labels||{},e=vt(t.generateLabels,[this.chart],this)||[];t.filter&&(e=e.filter(i=>t.filter(i,this.chart.data))),t.sort&&(e=e.sort((i,s)=>t.sort(i,s,this.chart.data))),this.options.reverse&&e.reverse(),this.legendItems=e}fit(){let{options:t,ctx:e}=this;if(!t.display){this.width=this.height=0;return}let i=t.labels,s=Dt(i.font),r=s.size,a=this._computeTitleHeight(),{boxWidth:h,itemHeight:c}=Nc(i,r),d,f;e.font=s.string,this.isHorizontal()?(d=this.maxWidth,f=this._fitRows(a,r,h,c)+10):(f=this.maxHeight,d=this._fitCols(a,s,h,c)+10),this.width=Math.min(d,t.maxWidth||this.maxWidth),this.height=Math.min(f,t.maxHeight||this.maxHeight)}_fitRows(t,e,i,s){let{ctx:r,maxWidth:a,options:{labels:{padding:h}}}=this,c=this.legendHitBoxes=[],d=this.lineWidths=[0],f=s+h,m=t;r.textAlign="left",r.textBaseline="middle";let _=-1,y=-f;return this.legendItems.forEach((x,b)=>{let w=i+e/2+r.measureText(x.text).width;(b===0||d[d.length-1]+w+2*h>a)&&(m+=f,d[d.length-(b>0?0:1)]=0,y+=f,_++),c[b]={left:0,top:y,row:_,width:w,height:s},d[d.length-1]+=w+h}),m}_fitCols(t,e,i,s){let{ctx:r,maxHeight:a,options:{labels:{padding:h}}}=this,c=this.legendHitBoxes=[],d=this.columnSizes=[],f=a-t,m=h,_=0,y=0,x=0,b=0;return this.legendItems.forEach((w,P)=>{let{itemWidth:C,itemHeight:O}=K_(i,e,r,w,s);P>0&&y+O+2*h>f&&(m+=_+h,d.push({width:_,height:y}),x+=_+h,b++,_=y=0),c[P]={left:x,top:y,col:b,width:C,height:O},_=Math.max(_,C),y+=O+h}),m+=_,d.push({width:_,height:y}),m}adjustHitBoxes(){if(!this.options.display)return;let t=this._computeTitleHeight(),{legendHitBoxes:e,options:{align:i,labels:{padding:s},rtl:r}}=this,a=ni(r,this.left,this.width);if(this.isHorizontal()){let h=0,c=Rt(i,this.left+s,this.right-this.lineWidths[h]);for(let d of e)h!==d.row&&(h=d.row,c=Rt(i,this.left+s,this.right-this.lineWidths[h])),d.top+=this.top+t+s,d.left=a.leftForLtr(a.x(c),d.width),c+=d.width+s}else{let h=0,c=Rt(i,this.top+t+s,this.bottom-this.columnSizes[h].height);for(let d of e)d.col!==h&&(h=d.col,c=Rt(i,this.top+t+s,this.bottom-this.columnSizes[h].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){let t=this.ctx;Ln(t,this),this._draw(),Pn(t)}}_draw(){let{options:t,columnSizes:e,lineWidths:i,ctx:s}=this,{align:r,labels:a}=t,h=Mt.color,c=ni(t.rtl,this.left,this.width),d=Dt(a.font),{padding:f}=a,m=d.size,_=m/2,y;this.drawTitle(),s.textAlign=c.textAlign("left"),s.textBaseline="middle",s.lineWidth=.5,s.font=d.string;let{boxWidth:x,boxHeight:b,itemHeight:w}=Nc(a,m),P=function(z,R,B){if(isNaN(x)||x<=0||isNaN(b)||b<0)return;s.save();let N=$(B.lineWidth,1);if(s.fillStyle=$(B.fillStyle,h),s.lineCap=$(B.lineCap,"butt"),s.lineDashOffset=$(B.lineDashOffset,0),s.lineJoin=$(B.lineJoin,"miter"),s.lineWidth=N,s.strokeStyle=$(B.strokeStyle,h),s.setLineDash($(B.lineDash,[])),a.usePointStyle){let j={radius:b*Math.SQRT2/2,pointStyle:B.pointStyle,rotation:B.rotation,borderWidth:N},q=c.xPlus(z,x/2),Y=R+_;ra(s,j,q,Y,a.pointStyleWidth&&x)}else{let j=R+Math.max((m-b)/2,0),q=c.leftForLtr(z,x),Y=Ye(B.borderRadius);s.beginPath(),Object.values(Y).some(nt=>nt!==0)?Ei(s,{x:q,y:j,w:x,h:b,radius:Y}):s.rect(q,j,x,b),s.fill(),N!==0&&s.stroke()}s.restore()},C=function(z,R,B){Ve(s,B.text,z,R+w/2,d,{strikethrough:B.hidden,textAlign:c.textAlign(B.textAlign)})},O=this.isHorizontal(),I=this._computeTitleHeight();O?y={x:Rt(r,this.left+f,this.right-i[0]),y:this.top+f+I,line:0}:y={x:this.left+f,y:Rt(r,this.top+I+f,this.bottom-e[0].height),line:0},pa(this.ctx,t.textDirection);let D=w+f;this.legendItems.forEach((z,R)=>{s.strokeStyle=z.fontColor,s.fillStyle=z.fontColor;let B=s.measureText(z.text).width,N=c.textAlign(z.textAlign||(z.textAlign=a.textAlign)),j=x+_+B,q=y.x,Y=y.y;c.setWidth(this.width),O?R>0&&q+j+f>this.right&&(Y=y.y+=D,y.line++,q=y.x=Rt(r,this.left+f,this.right-i[y.line])):R>0&&Y+D>this.bottom&&(q=y.x=q+e[y.line].width+f,y.line++,Y=y.y=Rt(r,this.top+I+f,this.bottom-e[y.line].height));let nt=c.x(q);if(P(nt,Y,z),q=Nh(N,q+x+_,O?q+j:this.right,t.rtl),C(c.x(q),Y,z),O)y.x+=j+f;else if(typeof z.text!="string"){let lt=d.lineHeight;y.y+=yu(z,lt)+f}else y.y+=D}),ma(this.ctx,t.textDirection)}drawTitle(){let t=this.options,e=t.title,i=Dt(e.font),s=Bt(e.padding);if(!e.display)return;let r=ni(t.rtl,this.left,this.width),a=this.ctx,h=e.position,c=i.size/2,d=s.top+c,f,m=this.left,_=this.width;if(this.isHorizontal())_=Math.max(...this.lineWidths),f=this.top+d,m=Rt(t.align,m,this.right-_);else{let x=this.columnSizes.reduce((b,w)=>Math.max(b,w.height),0);f=d+Rt(t.align,this.top,this.bottom-x-t.labels.padding-this._computeTitleHeight())}let y=Rt(h,m,m+_);a.textAlign=r.textAlign(Ss(h)),a.textBaseline="middle",a.strokeStyle=e.color,a.fillStyle=e.color,a.font=i.string,Ve(a,e.text,y,f,i)}_computeTitleHeight(){let t=this.options.title,e=Dt(t.font),i=Bt(t.padding);return t.display?e.lineHeight+i.height:0}_getLegendItemAt(t,e){let i,s,r;if(ge(t,this.left,this.right)&&ge(e,this.top,this.bottom)){for(r=this.legendHitBoxes,i=0;i<r.length;++i)if(s=r[i],ge(t,s.left,s.left+s.width)&&ge(e,s.top,s.top+s.height))return this.legendItems[i]}return null}handleEvent(t){let e=this.options;if(!ty(t.type,e))return;let i=this._getLegendItemAt(t.x,t.y);if(t.type==="mousemove"||t.type==="mouseout"){let s=this._hoveredItem,r=$_(s,i);s&&!r&&vt(e.onLeave,[t,s,this],this),this._hoveredItem=i,i&&!r&&vt(e.onHover,[t,i,this],this)}else i&&vt(e.onClick,[t,i,this],this)}};function K_(n,t,e,i,s){let r=Q_(i,n,t,e),a=J_(s,i,t.lineHeight);return{itemWidth:r,itemHeight:a}}function Q_(n,t,e,i){let s=n.text;return s&&typeof s!="string"&&(s=s.reduce((r,a)=>r.length>a.length?r:a)),t+e.size/2+i.measureText(s).width}function J_(n,t,e){let i=n;return typeof t.text!="string"&&(i=yu(t,e)),i}function yu(n,t){let e=n.text?n.text.length:0;return t*e}function ty(n,t){return!!((n==="mousemove"||n==="mouseout")&&(t.onHover||t.onLeave)||t.onClick&&(n==="click"||n==="mouseup"))}var ey={id:"legend",_element:$s,start(n,t,e){let i=n.legend=new $s({ctx:n.ctx,options:e,chart:n});Wt.configure(n,i,e),Wt.addBox(n,i)},stop(n){Wt.removeBox(n,n.legend),delete n.legend},beforeUpdate(n,t,e){let i=n.legend;Wt.configure(n,i,e),i.options=e},afterUpdate(n){let t=n.legend;t.buildLabels(),t.adjustHitBoxes()},afterEvent(n,t){t.replay||n.legend.handleEvent(t.event)},defaults:{display:!0,position:"top",align:"center",fullSize:!0,reverse:!1,weight:1e3,onClick(n,t,e){let i=t.datasetIndex,s=e.chart;s.isDatasetVisible(i)?(s.hide(i),t.hidden=!0):(s.show(i),t.hidden=!1)},onHover:null,onLeave:null,labels:{color:n=>n.chart.options.color,boxWidth:40,padding:10,generateLabels(n){let t=n.data.datasets,{labels:{usePointStyle:e,pointStyle:i,textAlign:s,color:r,useBorderRadius:a,borderRadius:h}}=n.legend.options;return n._getSortedDatasetMetas().map(c=>{let d=c.controller.getStyle(e?0:void 0),f=Bt(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:(f.width+f.height)/4,strokeStyle:d.borderColor,pointStyle:i||d.pointStyle,rotation:d.rotation,textAlign:s||d.textAlign,borderRadius:a&&(h||d.borderRadius),datasetIndex:c.index}},this)}},title:{color:n=>n.chart.options.color,display:!1,position:"center",text:""}},descriptors:{_scriptable:n=>!n.startsWith("on"),labels:{_scriptable:n=>!["generateLabels","filter","sort"].includes(n)}}},Wn=class extends $t{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,e){let 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=e;let s=bt(i.text)?i.text.length:1;this._padding=Bt(i.padding);let r=s*Dt(i.font).lineHeight+this._padding.height;this.isHorizontal()?this.height=r:this.width=r}isHorizontal(){let t=this.options.position;return t==="top"||t==="bottom"}_drawArgs(t){let{top:e,left:i,bottom:s,right:r,options:a}=this,h=a.align,c=0,d,f,m;return this.isHorizontal()?(f=Rt(h,i,r),m=e+t,d=r-i):(a.position==="left"?(f=i+t,m=Rt(h,s,e),c=ut*-.5):(f=r-t,m=Rt(h,e,s),c=ut*.5),d=s-e),{titleX:f,titleY:m,maxWidth:d,rotation:c}}draw(){let t=this.ctx,e=this.options;if(!e.display)return;let i=Dt(e.font),r=i.lineHeight/2+this._padding.top,{titleX:a,titleY:h,maxWidth:c,rotation:d}=this._drawArgs(r);Ve(t,e.text,0,0,i,{color:e.color,maxWidth:c,rotation:d,textAlign:Ss(e.align),textBaseline:"middle",translation:[a,h]})}};function iy(n,t){let e=new Wn({ctx:n.ctx,options:t,chart:n});Wt.configure(n,e,t),Wt.addBox(n,e),n.titleBlock=e}var ny={id:"title",_element:Wn,start(n,t,e){iy(n,e)},stop(n){let t=n.titleBlock;Wt.removeBox(n,t),delete n.titleBlock},beforeUpdate(n,t,e){let i=n.titleBlock;Wt.configure(n,i,e),i.options=e},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}},Ws=new WeakMap,sy={id:"subtitle",start(n,t,e){let i=new Wn({ctx:n.ctx,options:e,chart:n});Wt.configure(n,i,e),Wt.addBox(n,i),Ws.set(n,i)},stop(n){Wt.removeBox(n,Ws.get(n)),Ws.delete(n)},beforeUpdate(n,t,e){let i=Ws.get(n);Wt.configure(n,i,e),i.options=e},defaults:{align:"center",display:!1,font:{weight:"normal"},fullSize:!0,padding:0,position:"top",text:"",weight:1500},defaultRoutes:{color:"color"},descriptors:{_scriptable:!0,_indexable:!1}},An={average(n){if(!n.length)return!1;let t,e,i=new Set,s=0,r=0;for(t=0,e=n.length;t<e;++t){let h=n[t].element;if(h&&h.hasValue()){let c=h.tooltipPosition();i.add(c.x),s+=c.y,++r}}return r===0||i.size===0?!1:{x:[...i].reduce((h,c)=>h+c)/i.size,y:s/r}},nearest(n,t){if(!n.length)return!1;let e=t.x,i=t.y,s=Number.POSITIVE_INFINITY,r,a,h;for(r=0,a=n.length;r<a;++r){let c=n[r].element;if(c&&c.hasValue()){let d=c.getCenterPoint(),f=Ls(t,d);f<s&&(s=f,h=c)}}if(h){let c=h.tooltipPosition();e=c.x,i=c.y}return{x:e,y:i}}};function _e(n,t){return t&&(bt(t)?Array.prototype.push.apply(n,t):n.push(t)),n}function De(n){return(typeof n=="string"||n instanceof String)&&n.indexOf(`
`)>-1?n.split(`
`):n}function oy(n,t){let{element:e,datasetIndex:i,index:s}=t,r=n.getDatasetMeta(i).controller,{label:a,value:h}=r.getLabelAndValue(s);return{chart:n,label:a,parsed:r.getParsed(s),raw:n.data.datasets[i].data[s],formattedValue:h,dataset:r.getDataset(),dataIndex:s,datasetIndex:i,element:e}}function Wc(n,t){let e=n.chart.ctx,{body:i,footer:s,title:r}=n,{boxWidth:a,boxHeight:h}=t,c=Dt(t.bodyFont),d=Dt(t.titleFont),f=Dt(t.footerFont),m=r.length,_=s.length,y=i.length,x=Bt(t.padding),b=x.height,w=0,P=i.reduce((I,D)=>I+D.before.length+D.lines.length+D.after.length,0);if(P+=n.beforeBody.length+n.afterBody.length,m&&(b+=m*d.lineHeight+(m-1)*t.titleSpacing+t.titleMarginBottom),P){let I=t.displayColors?Math.max(h,c.lineHeight):c.lineHeight;b+=y*I+(P-y)*c.lineHeight+(P-1)*t.bodySpacing}_&&(b+=t.footerMarginTop+_*f.lineHeight+(_-1)*t.footerSpacing);let C=0,O=function(I){w=Math.max(w,e.measureText(I).width+C)};return e.save(),e.font=d.string,gt(n.title,O),e.font=c.string,gt(n.beforeBody.concat(n.afterBody),O),C=t.displayColors?a+2+t.boxPadding:0,gt(i,I=>{gt(I.before,O),gt(I.lines,O),gt(I.after,O)}),C=0,e.font=f.string,gt(n.footer,O),e.restore(),w+=x.width,{width:w,height:b}}function ry(n,t){let{y:e,height:i}=t;return e<i/2?"top":e>n.height-i/2?"bottom":"center"}function ay(n,t,e,i){let{x:s,width:r}=i,a=e.caretSize+e.caretPadding;if(n==="left"&&s+r+a>t.width||n==="right"&&s-r-a<0)return!0}function ly(n,t,e,i){let{x:s,width:r}=e,{width:a,chartArea:{left:h,right:c}}=n,d="center";return i==="center"?d=s<=(h+c)/2?"left":"right":s<=r/2?d="left":s>=a-r/2&&(d="right"),ay(d,n,t,e)&&(d="center"),d}function Hc(n,t,e){let i=e.yAlign||t.yAlign||ry(n,e);return{xAlign:e.xAlign||t.xAlign||ly(n,t,e,i),yAlign:i}}function hy(n,t){let{x:e,width:i}=n;return t==="right"?e-=i:t==="center"&&(e-=i/2),e}function cy(n,t,e){let{y:i,height:s}=n;return t==="top"?i+=e:t==="bottom"?i-=s+e:i-=s/2,i}function Zc(n,t,e,i){let{caretSize:s,caretPadding:r,cornerRadius:a}=n,{xAlign:h,yAlign:c}=e,d=s+r,{topLeft:f,topRight:m,bottomLeft:_,bottomRight:y}=Ye(a),x=hy(t,h),b=cy(t,c,d);return c==="center"?h==="left"?x+=d:h==="right"&&(x-=d):h==="left"?x-=Math.max(f,_)+s:h==="right"&&(x+=Math.max(m,y)+s),{x:It(x,0,i.width-t.width),y:It(b,0,i.height-t.height)}}function Hs(n,t,e){let i=Bt(e.padding);return t==="center"?n.x+n.width/2:t==="right"?n.x+n.width-i.right:n.x+i.left}function Vc(n){return _e([],De(n))}function uy(n,t,e){return Se(n,{tooltip:t,tooltipItems:e,type:"tooltip"})}function Yc(n,t){let e=t&&t.dataset&&t.dataset.tooltip&&t.dataset.tooltip.callbacks;return e?n.override(e):n}var vu={beforeTitle:me,title(n){if(n.length>0){let t=n[0],e=t.chart.data.labels,i=e?e.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 e[t.dataIndex]}return""},afterTitle:me,beforeBody:me,beforeLabel:me,label(n){if(this&&this.options&&this.options.mode==="dataset")return n.label+": "+n.formattedValue||n.formattedValue;let t=n.dataset.label||"";t&&(t+=": ");let e=n.formattedValue;return it(e)||(t+=e),t},labelColor(n){let e=n.chart.getDatasetMeta(n.datasetIndex).controller.getStyle(n.dataIndex);return{borderColor:e.borderColor,backgroundColor:e.backgroundColor,borderWidth:e.borderWidth,borderDash:e.borderDash,borderDashOffset:e.borderDashOffset,borderRadius:0}},labelTextColor(){return this.options.bodyColor},labelPointStyle(n){let e=n.chart.getDatasetMeta(n.datasetIndex).controller.getStyle(n.dataIndex);return{pointStyle:e.pointStyle,rotation:e.rotation}},afterLabel:me,afterBody:me,beforeFooter:me,footer:me,afterFooter:me};function jt(n,t,e,i){let s=n[t].call(e,i);return typeof s=="undefined"?vu[t].call(e,i):s}var Fn=class extends $t{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(){let t=this._cachedAnimations;if(t)return t;let e=this.chart,i=this.options.setContext(this.getContext()),s=i.enabled&&e.options.animation&&i.animations,r=new js(this.chart,s);return s._cacheable&&(this._cachedAnimations=Object.freeze(r)),r}getContext(){return this.$context||(this.$context=uy(this.chart.getContext(),this,this._tooltipItems))}getTitle(t,e){let{callbacks:i}=e,s=jt(i,"beforeTitle",this,t),r=jt(i,"title",this,t),a=jt(i,"afterTitle",this,t),h=[];return h=_e(h,De(s)),h=_e(h,De(r)),h=_e(h,De(a)),h}getBeforeBody(t,e){return Vc(jt(e.callbacks,"beforeBody",this,t))}getBody(t,e){let{callbacks:i}=e,s=[];return gt(t,r=>{let a={before:[],lines:[],after:[]},h=Yc(i,r);_e(a.before,De(jt(h,"beforeLabel",this,r))),_e(a.lines,jt(h,"label",this,r)),_e(a.after,De(jt(h,"afterLabel",this,r))),s.push(a)}),s}getAfterBody(t,e){return Vc(jt(e.callbacks,"afterBody",this,t))}getFooter(t,e){let{callbacks:i}=e,s=jt(i,"beforeFooter",this,t),r=jt(i,"footer",this,t),a=jt(i,"afterFooter",this,t),h=[];return h=_e(h,De(s)),h=_e(h,De(r)),h=_e(h,De(a)),h}_createItems(t){let e=this._active,i=this.chart.data,s=[],r=[],a=[],h=[],c,d;for(c=0,d=e.length;c<d;++c)h.push(oy(this.chart,e[c]));return t.filter&&(h=h.filter((f,m,_)=>t.filter(f,m,_,i))),t.itemSort&&(h=h.sort((f,m)=>t.itemSort(f,m,i))),gt(h,f=>{let m=Yc(t.callbacks,f);s.push(jt(m,"labelColor",this,f)),r.push(jt(m,"labelPointStyle",this,f)),a.push(jt(m,"labelTextColor",this,f))}),this.labelColors=s,this.labelPointStyles=r,this.labelTextColors=a,this.dataPoints=h,h}update(t,e){let i=this.options.setContext(this.getContext()),s=this._active,r,a=[];if(!s.length)this.opacity!==0&&(r={opacity:0});else{let h=An[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);let c=this._size=Wc(this,i),d=Object.assign({},h,c),f=Hc(this.chart,i,d),m=Zc(i,d,f,this.chart);this.xAlign=f.xAlign,this.yAlign=f.yAlign,r={opacity:1,x:m.x,y:m.y,width:c.width,height:c.height,caretX:h.x,caretY:h.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:e})}drawCaret(t,e,i,s){let r=this.getCaretPosition(t,i,s);e.lineTo(r.x1,r.y1),e.lineTo(r.x2,r.y2),e.lineTo(r.x3,r.y3)}getCaretPosition(t,e,i){let{xAlign:s,yAlign:r}=this,{caretSize:a,cornerRadius:h}=i,{topLeft:c,topRight:d,bottomLeft:f,bottomRight:m}=Ye(h),{x:_,y}=t,{width:x,height:b}=e,w,P,C,O,I,D;return r==="center"?(I=y+b/2,s==="left"?(w=_,P=w-a,O=I+a,D=I-a):(w=_+x,P=w+a,O=I-a,D=I+a),C=w):(s==="left"?P=_+Math.max(c,f)+a:s==="right"?P=_+x-Math.max(d,m)-a:P=this.caretX,r==="top"?(O=y,I=O-a,w=P-a,C=P+a):(O=y+b,I=O+a,w=P+a,C=P-a),D=O),{x1:w,x2:P,x3:C,y1:O,y2:I,y3:D}}drawTitle(t,e,i){let s=this.title,r=s.length,a,h,c;if(r){let d=ni(i.rtl,this.x,this.width);for(t.x=Hs(this,i.titleAlign,i),e.textAlign=d.textAlign(i.titleAlign),e.textBaseline="middle",a=Dt(i.titleFont),h=i.titleSpacing,e.fillStyle=i.titleColor,e.font=a.string,c=0;c<r;++c)e.fillText(s[c],d.x(t.x),t.y+a.lineHeight/2),t.y+=a.lineHeight+h,c+1===r&&(t.y+=i.titleMarginBottom-h)}}_drawColorBox(t,e,i,s,r){let a=this.labelColors[i],h=this.labelPointStyles[i],{boxHeight:c,boxWidth:d}=r,f=Dt(r.bodyFont),m=Hs(this,"left",r),_=s.x(m),y=c<f.lineHeight?(f.lineHeight-c)/2:0,x=e.y+y;if(r.usePointStyle){let b={radius:Math.min(d,c)/2,pointStyle:h.pointStyle,rotation:h.rotation,borderWidth:1},w=s.leftForLtr(_,d)+d/2,P=x+c/2;t.strokeStyle=r.multiKeyBackground,t.fillStyle=r.multiKeyBackground,Ds(t,b,w,P),t.strokeStyle=a.borderColor,t.fillStyle=a.backgroundColor,Ds(t,b,w,P)}else{t.lineWidth=rt(a.borderWidth)?Math.max(...Object.values(a.borderWidth)):a.borderWidth||1,t.strokeStyle=a.borderColor,t.setLineDash(a.borderDash||[]),t.lineDashOffset=a.borderDashOffset||0;let b=s.leftForLtr(_,d),w=s.leftForLtr(s.xPlus(_,1),d-2),P=Ye(a.borderRadius);Object.values(P).some(C=>C!==0)?(t.beginPath(),t.fillStyle=r.multiKeyBackground,Ei(t,{x:b,y:x,w:d,h:c,radius:P}),t.fill(),t.stroke(),t.fillStyle=a.backgroundColor,t.beginPath(),Ei(t,{x:w,y:x+1,w:d-2,h:c-2,radius:P}),t.fill()):(t.fillStyle=r.multiKeyBackground,t.fillRect(b,x,d,c),t.strokeRect(b,x,d,c),t.fillStyle=a.backgroundColor,t.fillRect(w,x+1,d-2,c-2))}t.fillStyle=this.labelTextColors[i]}drawBody(t,e,i){let{body:s}=this,{bodySpacing:r,bodyAlign:a,displayColors:h,boxHeight:c,boxWidth:d,boxPadding:f}=i,m=Dt(i.bodyFont),_=m.lineHeight,y=0,x=ni(i.rtl,this.x,this.width),b=function(B){e.fillText(B,x.x(t.x+y),t.y+_/2),t.y+=_+r},w=x.textAlign(a),P,C,O,I,D,z,R;for(e.textAlign=a,e.textBaseline="middle",e.font=m.string,t.x=Hs(this,w,i),e.fillStyle=i.bodyColor,gt(this.beforeBody,b),y=h&&w!=="right"?a==="center"?d/2+f:d+2+f:0,I=0,z=s.length;I<z;++I){for(P=s[I],C=this.labelTextColors[I],e.fillStyle=C,gt(P.before,b),O=P.lines,h&&O.length&&(this._drawColorBox(e,t,I,x,i),_=Math.max(m.lineHeight,c)),D=0,R=O.length;D<R;++D)b(O[D]),_=m.lineHeight;gt(P.after,b)}y=0,_=m.lineHeight,gt(this.afterBody,b),t.y-=r}drawFooter(t,e,i){let s=this.footer,r=s.length,a,h;if(r){let c=ni(i.rtl,this.x,this.width);for(t.x=Hs(this,i.footerAlign,i),t.y+=i.footerMarginTop,e.textAlign=c.textAlign(i.footerAlign),e.textBaseline="middle",a=Dt(i.footerFont),e.fillStyle=i.footerColor,e.font=a.string,h=0;h<r;++h)e.fillText(s[h],c.x(t.x),t.y+a.lineHeight/2),t.y+=a.lineHeight+i.footerSpacing}}drawBackground(t,e,i,s){let{xAlign:r,yAlign:a}=this,{x:h,y:c}=t,{width:d,height:f}=i,{topLeft:m,topRight:_,bottomLeft:y,bottomRight:x}=Ye(s.cornerRadius);e.fillStyle=s.backgroundColor,e.strokeStyle=s.borderColor,e.lineWidth=s.borderWidth,e.beginPath(),e.moveTo(h+m,c),a==="top"&&this.drawCaret(t,e,i,s),e.lineTo(h+d-_,c),e.quadraticCurveTo(h+d,c,h+d,c+_),a==="center"&&r==="right"&&this.drawCaret(t,e,i,s),e.lineTo(h+d,c+f-x),e.quadraticCurveTo(h+d,c+f,h+d-x,c+f),a==="bottom"&&this.drawCaret(t,e,i,s),e.lineTo(h+y,c+f),e.quadraticCurveTo(h,c+f,h,c+f-y),a==="center"&&r==="left"&&this.drawCaret(t,e,i,s),e.lineTo(h,c+m),e.quadraticCurveTo(h,c,h+m,c),e.closePath(),e.fill(),s.borderWidth>0&&e.stroke()}_updateAnimationTarget(t){let e=this.chart,i=this.$animations,s=i&&i.x,r=i&&i.y;if(s||r){let a=An[t.position].call(this,this._active,this._eventPosition);if(!a)return;let h=this._size=Wc(this,t),c=Object.assign({},a,this._size),d=Hc(e,t,c),f=Zc(t,c,d,e);(s._to!==f.x||r._to!==f.y)&&(this.xAlign=d.xAlign,this.yAlign=d.yAlign,this.width=h.width,this.height=h.height,this.caretX=a.x,this.caretY=a.y,this._resolveAnimations().update(this,f))}}_willRender(){return!!this.opacity}draw(t){let e=this.options.setContext(this.getContext()),i=this.opacity;if(!i)return;this._updateAnimationTarget(e);let s={width:this.width,height:this.height},r={x:this.x,y:this.y};i=Math.abs(i)<.001?0:i;let a=Bt(e.padding),h=this.title.length||this.beforeBody.length||this.body.length||this.afterBody.length||this.footer.length;e.enabled&&h&&(t.save(),t.globalAlpha=i,this.drawBackground(r,t,s,e),pa(t,e.textDirection),r.y+=a.top,this.drawTitle(r,t,e),this.drawBody(r,t,e),this.drawFooter(r,t,e),ma(t,e.textDirection),t.restore())}getActiveElements(){return this._active||[]}setActiveElements(t,e){let i=this._active,s=t.map(({datasetIndex:h,index:c})=>{let d=this.chart.getDatasetMeta(h);if(!d)throw new Error("Cannot find a dataset at index "+h);return{datasetIndex:h,element:d.data[c],index:c}}),r=!wn(i,s),a=this._positionChanged(s,e);(r||a)&&(this._active=s,this._eventPosition=e,this._ignoreReplayEvents=!0,this.update(!0))}handleEvent(t,e,i=!0){if(e&&this._ignoreReplayEvents)return!1;this._ignoreReplayEvents=!1;let s=this.options,r=this._active||[],a=this._getActiveElements(t,r,e,i),h=this._positionChanged(a,t),c=e||!wn(a,r)||h;return c&&(this._active=a,(s.enabled||s.external)&&(this._eventPosition={x:t.x,y:t.y},this.update(!0,e))),c}_getActiveElements(t,e,i,s){let r=this.options;if(t.type==="mouseout")return[];if(!s)return e.filter(h=>this.chart.data.datasets[h.datasetIndex]&&this.chart.getDatasetMeta(h.datasetIndex).controller.getParsed(h.index)!==void 0);let a=this.chart.getElementsAtEventForMode(t,r.mode,r,i);return r.reverse&&a.reverse(),a}_positionChanged(t,e){let{caretX:i,caretY:s,options:r}=this,a=An[r.position].call(this,t,e);return a!==!1&&(i!==a.x||s!==a.y)}};k(Fn,"positioners",An);var dy={id:"tooltip",_element:Fn,positioners:An,afterInit(n,t,e){e&&(n.tooltip=new Fn({chart:n,options:e}))},beforeUpdate(n,t,e){n.tooltip&&n.tooltip.initialize(e)},reset(n,t,e){n.tooltip&&n.tooltip.initialize(e)},afterDraw(n){let t=n.tooltip;if(t&&t._willRender()){let e={tooltip:t};if(n.notifyPlugins("beforeTooltipDraw",Li(Mi({},e),{cancelable:!0}))===!1)return;t.draw(n.ctx),n.notifyPlugins("afterTooltipDraw",e)}},afterEvent(n,t){if(n.tooltip){let e=t.replay;n.tooltip.handleEvent(t.event,e,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:(n,t)=>t.bodyFont.size,boxWidth:(n,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:vu},defaultRoutes:{bodyFont:"font",footerFont:"font",titleFont:"font"},descriptors:{_scriptable:n=>n!=="filter"&&n!=="itemSort"&&n!=="external",_indexable:!1,callbacks:{_scriptable:!1,_indexable:!1},animation:{_fallback:!1},animations:{_fallback:"animation"}},additionalOptionScopes:["interaction"]},fy=Object.freeze({__proto__:null,Colors:P_,Decimation:S_,Filler:X_,Legend:ey,SubTitle:sy,Title:ny,Tooltip:dy}),py=(n,t,e,i)=>(typeof t=="string"?(e=n.push(t)-1,i.unshift({index:e,label:t})):isNaN(t)&&(e=null),e);function my(n,t,e,i){let s=n.indexOf(t);if(s===-1)return py(n,t,e,i);let r=n.lastIndexOf(t);return s!==r?e:s}var gy=(n,t)=>n===null?null:It(Math.round(n),0,t);function jc(n){let t=this.getLabels();return n>=0&&n<t.length?t[n]:n}var En=class extends ci{constructor(t){super(t),this._startValue=void 0,this._valueRange=0,this._addedLabels=[]}init(t){let e=this._addedLabels;if(e.length){let i=this.getLabels();for(let{index:s,label:r}of e)i[s]===r&&i.splice(s,1);this._addedLabels=[]}super.init(t)}parse(t,e){if(it(t))return null;let i=this.getLabels();return e=isFinite(e)&&i[e]===t?e:my(i,t,$(e,t),this._addedLabels),gy(e,i.length-1)}determineDataLimits(){let{minDefined:t,maxDefined:e}=this.getUserBounds(),{min:i,max:s}=this.getMinMax(!0);this.options.bounds==="ticks"&&(t||(i=0),e||(s=this.getLabels().length-1)),this.min=i,this.max=s}buildTicks(){let t=this.min,e=this.max,i=this.options.offset,s=[],r=this.getLabels();r=t===0&&e===r.length-1?r:r.slice(t,e+1),this._valueRange=Math.max(r.length-(i?0:1),1),this._startValue=this.min-(i?.5:0);for(let a=t;a<=e;a++)s.push({value:a});return s}getLabelForValue(t){return jc.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){let e=this.ticks;return t<0||t>e.length-1?null:this.getPixelForValue(e[t].value)}getValueForPixel(t){return Math.round(this._startValue+this.getDecimalForPixel(t)*this._valueRange)}getBasePixel(){return this.bottom}};k(En,"id","category"),k(En,"defaults",{ticks:{callback:jc}});function _y(n,t){let e=[],{bounds:s,step:r,min:a,max:h,precision:c,count:d,maxTicks:f,maxDigits:m,includeBounds:_}=n,y=r||1,x=f-1,{min:b,max:w}=t,P=!it(a),C=!it(h),O=!it(d),I=(w-b)/(m+1),D=Gr((w-b)/x/y)*y,z,R,B,N;if(D<1e-14&&!P&&!C)return[{value:b},{value:w}];N=Math.ceil(w/D)-Math.floor(b/D),N>x&&(D=Gr(N*D/x/y)*y),it(c)||(z=Math.pow(10,c),D=Math.ceil(D*z)/z),s==="ticks"?(R=Math.floor(b/D)*D,B=Math.ceil(w/D)*D):(R=b,B=w),P&&C&&r&&Ih((h-a)/r,D/1e3)?(N=Math.round(Math.min((h-a)/D,f)),D=(h-a)/N,R=a,B=h):O?(R=P?a:R,B=C?h:B,N=d-1,D=(B-R)/N):(N=(B-R)/D,Di(N,Math.round(N),D/1e3)?N=Math.round(N):N=Math.ceil(N));let j=Math.max(Xr(D),Xr(R));z=Math.pow(10,it(c)?j:c),R=Math.round(R*z)/z,B=Math.round(B*z)/z;let q=0;for(P&&(_&&R!==a?(e.push({value:a}),R<a&&q++,Di(Math.round((R+q*D)*z)/z,a,Uc(a,I,n))&&q++):R<a&&q++);q<N;++q){let Y=Math.round((R+q*D)*z)/z;if(C&&Y>h)break;e.push({value:Y})}return C&&_&&B!==h?e.length&&Di(e[e.length-1].value,h,Uc(h,I,n))?e[e.length-1].value=h:e.push({value:h}):(!C||B===h)&&e.push({value:B}),e}function Uc(n,t,{horizontal:e,minRotation:i}){let s=ee(i),r=(e?Math.sin(s):Math.cos(s))||.001,a=.75*t*(""+n).length;return Math.min(t/r,a)}var ji=class extends ci{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,e){return it(t)||(typeof t=="number"||t instanceof Number)&&!isFinite(+t)?null:+t}handleTickRangeOptions(){let{beginAtZero:t}=this.options,{minDefined:e,maxDefined:i}=this.getUserBounds(),{min:s,max:r}=this,a=c=>s=e?s:c,h=c=>r=i?r:c;if(t){let c=ae(s),d=ae(r);c<0&&d<0?h(0):c>0&&d>0&&a(0)}if(s===r){let c=r===0?1:Math.abs(r*.05);h(r+c),t||a(s-c)}this.min=s,this.max=r}getTickLimit(){let t=this.options.ticks,{maxTicksLimit:e,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(),e=e||11),e&&(s=Math.min(e,s)),s}computeTickLimit(){return Number.POSITIVE_INFINITY}buildTicks(){let t=this.options,e=t.ticks,i=this.getTickLimit();i=Math.max(2,i);let s={maxTicks:i,bounds:t.bounds,min:t.min,max:t.max,precision:e.precision,step:e.stepSize,count:e.count,maxDigits:this._maxDigits(),horizontal:this.isHorizontal(),minRotation:e.minRotation||0,includeBounds:e.includeBounds!==!1},r=this._range||this,a=_y(s,r);return t.bounds==="ticks"&&qr(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(){let t=this.ticks,e=this.min,i=this.max;if(super.configure(),this.options.offset&&t.length){let s=(i-e)/Math.max(t.length-1,1)/2;e-=s,i+=s}this._startValue=e,this._endValue=i,this._valueRange=i-e}getLabelForValue(t){return Ai(t,this.chart.options.locale,this.options.ticks.format)}},zn=class extends ji{determineDataLimits(){let{min:t,max:e}=this.getMinMax(!0);this.min=Pt(t)?t:0,this.max=Pt(e)?e:1,this.handleTickRangeOptions()}computeTickLimit(){let t=this.isHorizontal(),e=t?this.width:this.height,i=ee(this.options.ticks.minRotation),s=(t?Math.sin(i):Math.cos(i))||.001,r=this._resolveTickFontOptions(0);return Math.ceil(e/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}};k(zn,"id","linear"),k(zn,"defaults",{ticks:{callback:Mn.formatters.numeric}});var Hn=n=>Math.floor(Te(n)),oi=(n,t)=>Math.pow(10,Hn(n)+t);function Gc(n){return n/Math.pow(10,Hn(n))===1}function qc(n,t,e){let i=Math.pow(10,e),s=Math.floor(n/i);return Math.ceil(t/i)-s}function yy(n,t){let e=t-n,i=Hn(e);for(;qc(n,t,i)>10;)i++;for(;qc(n,t,i)<10;)i--;return Math.min(i,Hn(n))}function vy(n,{min:t,max:e}){t=Yt(n.min,t);let i=[],s=Hn(t),r=yy(t,e),a=r<0?Math.pow(10,Math.abs(r)):1,h=Math.pow(10,r),c=s>r?Math.pow(10,s):0,d=Math.round((t-c)*a)/a,f=Math.floor((t-c)/h/10)*h*10,m=Math.floor((d-f)/Math.pow(10,r)),_=Yt(n.min,Math.round((c+f+m*Math.pow(10,r))*a)/a);for(;_<e;)i.push({value:_,major:Gc(_),significand:m}),m>=10?m=m<15?15:20:m++,m>=20&&(r++,m=2,a=r>=0?1:a),_=Math.round((c+f+m*Math.pow(10,r))*a)/a;let y=Yt(n.max,_);return i.push({value:y,major:Gc(y),significand:m}),i}var Rn=class extends ci{constructor(t){super(t),this.start=void 0,this.end=void 0,this._startValue=void 0,this._valueRange=0}parse(t,e){let i=ji.prototype.parse.apply(this,[t,e]);if(i===0){this._zero=!0;return}return Pt(i)&&i>0?i:null}determineDataLimits(){let{min:t,max:e}=this.getMinMax(!0);this.min=Pt(t)?Math.max(0,t):null,this.max=Pt(e)?Math.max(0,e):null,this.options.beginAtZero&&(this._zero=!0),this._zero&&this.min!==this._suggestedMin&&!Pt(this._userMin)&&(this.min=t===oi(this.min,0)?oi(this.min,-1):oi(this.min,0)),this.handleTickRangeOptions()}handleTickRangeOptions(){let{minDefined:t,maxDefined:e}=this.getUserBounds(),i=this.min,s=this.max,r=h=>i=t?i:h,a=h=>s=e?s:h;i===s&&(i<=0?(r(1),a(10)):(r(oi(i,-1)),a(oi(s,1)))),i<=0&&r(oi(s,-1)),s<=0&&a(oi(i,1)),this.min=i,this.max=s}buildTicks(){let t=this.options,e={min:this._userMin,max:this._userMax},i=vy(e,this);return t.bounds==="ticks"&&qr(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":Ai(t,this.chart.options.locale,this.options.ticks.format)}configure(){let t=this.min;super.configure(),this._startValue=Te(t),this._valueRange=Te(this.max)-Te(t)}getPixelForValue(t){return(t===void 0||t===0)&&(t=this.min),t===null||isNaN(t)?NaN:this.getPixelForDecimal(t===this.min?0:(Te(t)-this._startValue)/this._valueRange)}getValueForPixel(t){let e=this.getDecimalForPixel(t);return Math.pow(10,this._startValue+e*this._valueRange)}};k(Rn,"id","logarithmic"),k(Rn,"defaults",{ticks:{callback:Mn.formatters.logarithmic,major:{enabled:!0}}});function Va(n){let t=n.ticks;if(t.display&&n.display){let e=Bt(t.backdropPadding);return $(t.font&&t.font.size,Mt.font.size)+e.height}return 0}function xy(n,t,e){return e=bt(e)?e:[e],{w:Hh(n,t.string,e),h:e.length*t.lineHeight}}function Xc(n,t,e,i,s){return n===i||n===s?{start:t-e/2,end:t+e/2}:n<i||n>s?{start:t-e,end:t}:{start:t,end:t+e}}function by(n){let t={l:n.left+n._padding.left,r:n.right-n._padding.right,t:n.top+n._padding.top,b:n.bottom-n._padding.bottom},e=Object.assign({},t),i=[],s=[],r=n._pointLabels.length,a=n.options.pointLabels,h=a.centerPointLabels?ut/r:0;for(let c=0;c<r;c++){let d=a.setContext(n.getPointLabelContext(c));s[c]=d.padding;let f=n.getPointPosition(c,n.drawingArea+s[c],h),m=Dt(d.font),_=xy(n.ctx,m,n._pointLabels[c]);i[c]=_;let y=zt(n.getIndexAngle(c)+h),x=Math.round(Ts(y)),b=Xc(x,f.x,_.w,0,180),w=Xc(x,f.y,_.h,90,270);wy(e,t,y,b,w)}n.setCenterPoint(t.l-e.l,e.r-t.r,t.t-e.t,e.b-t.b),n._pointLabelItems=Py(n,i,s)}function wy(n,t,e,i,s){let r=Math.abs(Math.sin(e)),a=Math.abs(Math.cos(e)),h=0,c=0;i.start<t.l?(h=(t.l-i.start)/r,n.l=Math.min(n.l,t.l-h)):i.end>t.r&&(h=(i.end-t.r)/r,n.r=Math.max(n.r,t.r+h)),s.start<t.t?(c=(t.t-s.start)/a,n.t=Math.min(n.t,t.t-c)):s.end>t.b&&(c=(s.end-t.b)/a,n.b=Math.max(n.b,t.b+c))}function My(n,t,e){let i=n.drawingArea,{extra:s,additionalAngle:r,padding:a,size:h}=e,c=n.getPointPosition(t,i+s+a,r),d=Math.round(Ts(zt(c.angle+Tt))),f=Cy(c.y,h.h,d),m=ky(d),_=Ty(c.x,h.w,m);return{visible:!0,x:c.x,y:f,textAlign:m,left:_,top:f,right:_+h.w,bottom:f+h.h}}function Ly(n,t){if(!t)return!0;let{left:e,top:i,right:s,bottom:r}=n;return!(pe({x:e,y:i},t)||pe({x:e,y:r},t)||pe({x:s,y:i},t)||pe({x:s,y:r},t))}function Py(n,t,e){let i=[],s=n._pointLabels.length,r=n.options,{centerPointLabels:a,display:h}=r.pointLabels,c={extra:Va(r)/2,additionalAngle:a?ut/s:0},d;for(let f=0;f<s;f++){c.padding=e[f],c.size=t[f];let m=My(n,f,c);i.push(m),h==="auto"&&(m.visible=Ly(m,d),m.visible&&(d=m))}return i}function ky(n){return n===0||n===180?"center":n<180?"left":"right"}function Ty(n,t,e){return e==="right"?n-=t:e==="center"&&(n-=t/2),n}function Cy(n,t,e){return e===90||e===270?n-=t/2:(e>270||e<90)&&(n-=t),n}function Sy(n,t,e){let{left:i,top:s,right:r,bottom:a}=e,{backdropColor:h}=t;if(!it(h)){let c=Ye(t.borderRadius),d=Bt(t.backdropPadding);n.fillStyle=h;let f=i-d.left,m=s-d.top,_=r-i+d.width,y=a-s+d.height;Object.values(c).some(x=>x!==0)?(n.beginPath(),Ei(n,{x:f,y:m,w:_,h:y,radius:c}),n.fill()):n.fillRect(f,m,_,y)}}function Oy(n,t){let{ctx:e,options:{pointLabels:i}}=n;for(let s=t-1;s>=0;s--){let r=n._pointLabelItems[s];if(!r.visible)continue;let a=i.setContext(n.getPointLabelContext(s));Sy(e,a,r);let h=Dt(a.font),{x:c,y:d,textAlign:f}=r;Ve(e,n._pointLabels[s],c,d+h.lineHeight/2,h,{color:a.color,textAlign:f,textBaseline:"middle"})}}function xu(n,t,e,i){let{ctx:s}=n;if(e)s.arc(n.xCenter,n.yCenter,t,0,wt);else{let r=n.getPointPosition(0,t);s.moveTo(r.x,r.y);for(let a=1;a<i;a++)r=n.getPointPosition(a,t),s.lineTo(r.x,r.y)}}function Dy(n,t,e,i,s){let r=n.ctx,a=t.circular,{color:h,lineWidth:c}=t;!a&&!i||!h||!c||e<0||(r.save(),r.strokeStyle=h,r.lineWidth=c,r.setLineDash(s.dash||[]),r.lineDashOffset=s.dashOffset,r.beginPath(),xu(n,e,a,i),r.closePath(),r.stroke(),r.restore())}function Iy(n,t,e){return Se(n,{label:e,index:t,type:"pointLabel"})}var ai=class extends ji{constructor(t){super(t),this.xCenter=void 0,this.yCenter=void 0,this.drawingArea=void 0,this._pointLabels=[],this._pointLabelItems=[]}setDimensions(){let t=this._padding=Bt(Va(this.options)/2),e=this.width=this.maxWidth-t.width,i=this.height=this.maxHeight-t.height;this.xCenter=Math.floor(this.left+e/2+t.left),this.yCenter=Math.floor(this.top+i/2+t.top),this.drawingArea=Math.floor(Math.min(e,i)/2)}determineDataLimits(){let{min:t,max:e}=this.getMinMax(!1);this.min=Pt(t)&&!isNaN(t)?t:0,this.max=Pt(e)&&!isNaN(e)?e:0,this.handleTickRangeOptions()}computeTickLimit(){return Math.ceil(this.drawingArea/Va(this.options))}generateTickLabels(t){ji.prototype.generateTickLabels.call(this,t),this._pointLabels=this.getLabels().map((e,i)=>{let s=vt(this.options.pointLabels.callback,[e,i],this);return s||s===0?s:""}).filter((e,i)=>this.chart.getDataVisibility(i))}fit(){let t=this.options;t.display&&t.pointLabels.display?by(this):this.setCenterPoint(0,0,0,0)}setCenterPoint(t,e,i,s){this.xCenter+=Math.floor((t-e)/2),this.yCenter+=Math.floor((i-s)/2),this.drawingArea-=Math.min(this.drawingArea/2,Math.max(t,e,i,s))}getIndexAngle(t){let e=wt/(this._pointLabels.length||1),i=this.options.startAngle||0;return zt(t*e+ee(i))}getDistanceFromCenterForValue(t){if(it(t))return NaN;let e=this.drawingArea/(this.max-this.min);return this.options.reverse?(this.max-t)*e:(t-this.min)*e}getValueForDistanceFromCenter(t){if(it(t))return NaN;let e=t/(this.drawingArea/(this.max-this.min));return this.options.reverse?this.max-e:this.min+e}getPointLabelContext(t){let e=this._pointLabels||[];if(t>=0&&t<e.length){let i=e[t];return Iy(this.getContext(),t,i)}}getPointPosition(t,e,i=0){let s=this.getIndexAngle(t)-Tt+i;return{x:Math.cos(s)*e+this.xCenter,y:Math.sin(s)*e+this.yCenter,angle:s}}getPointPositionForValue(t,e){return this.getPointPosition(t,this.getDistanceFromCenterForValue(e))}getBasePosition(t){return this.getPointPositionForValue(t||0,this.getBaseValue())}getPointLabelPosition(t){let{left:e,top:i,right:s,bottom:r}=this._pointLabelItems[t];return{left:e,top:i,right:s,bottom:r}}drawBackground(){let{backgroundColor:t,grid:{circular:e}}=this.options;if(t){let i=this.ctx;i.save(),i.beginPath(),xu(this,this.getDistanceFromCenterForValue(this._endValue),e,this._pointLabels.length),i.closePath(),i.fillStyle=t,i.fill(),i.restore()}}drawGrid(){let t=this.ctx,e=this.options,{angleLines:i,grid:s,border:r}=e,a=this._pointLabels.length,h,c,d;if(e.pointLabels.display&&Oy(this,a),s.display&&this.ticks.forEach((f,m)=>{if(m!==0||m===0&&this.min<0){c=this.getDistanceFromCenterForValue(f.value);let _=this.getContext(m),y=s.setContext(_),x=r.setContext(_);Dy(this,y,c,a,x)}}),i.display){for(t.save(),h=a-1;h>=0;h--){let f=i.setContext(this.getPointLabelContext(h)),{color:m,lineWidth:_}=f;!_||!m||(t.lineWidth=_,t.strokeStyle=m,t.setLineDash(f.borderDash),t.lineDashOffset=f.borderDashOffset,c=this.getDistanceFromCenterForValue(e.reverse?this.min:this.max),d=this.getPointPosition(h,c),t.beginPath(),t.moveTo(this.xCenter,this.yCenter),t.lineTo(d.x,d.y),t.stroke())}t.restore()}}drawBorder(){}drawLabels(){let t=this.ctx,e=this.options,i=e.ticks;if(!i.display)return;let s=this.getIndexAngle(0),r,a;t.save(),t.translate(this.xCenter,this.yCenter),t.rotate(s),t.textAlign="center",t.textBaseline="middle",this.ticks.forEach((h,c)=>{if(c===0&&this.min>=0&&!e.reverse)return;let d=i.setContext(this.getContext(c)),f=Dt(d.font);if(r=this.getDistanceFromCenterForValue(this.ticks[c].value),d.showLabelBackdrop){t.font=f.string,a=t.measureText(h.label).width,t.fillStyle=d.backdropColor;let m=Bt(d.backdropPadding);t.fillRect(-a/2-m.left,-r-f.size/2-m.top,a+m.width,f.size+m.height)}Ve(t,h.label,0,-r,f,{color:d.color,strokeColor:d.textStrokeColor,strokeWidth:d.textStrokeWidth})}),t.restore()}drawTitle(){}};k(ai,"id","radialLinear"),k(ai,"defaults",{display:!0,animate:!0,position:"chartArea",angleLines:{display:!0,lineWidth:1,borderDash:[],borderDashOffset:0},grid:{circular:!1},startAngle:0,ticks:{showLabelBackdrop:!0,callback:Mn.formatters.numeric},pointLabels:{backdropColor:void 0,backdropPadding:2,display:!0,font:{size:10},callback(t){return t},padding:5,centerPointLabels:!1}}),k(ai,"defaultRoutes",{"angleLines.color":"borderColor","pointLabels.color":"color","ticks.color":"color"}),k(ai,"descriptors",{angleLines:{_fallback:"grid"}});var Qs={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}},Ut=Object.keys(Qs);function $c(n,t){return n-t}function Kc(n,t){if(it(t))return null;let e=n._adapter,{parser:i,round:s,isoWeekday:r}=n._parseOpts,a=t;return typeof i=="function"&&(a=i(a)),Pt(a)||(a=typeof i=="string"?e.parse(a,i):e.parse(a)),a===null?null:(s&&(a=s==="week"&&(ii(r)||r===!0)?e.startOf(a,"isoWeek",r):e.startOf(a,s)),+a)}function Qc(n,t,e,i){let s=Ut.length;for(let r=Ut.indexOf(n);r<s-1;++r){let a=Qs[Ut[r]],h=a.steps?a.steps:Number.MAX_SAFE_INTEGER;if(a.common&&Math.ceil((e-t)/(h*a.size))<=i)return Ut[r]}return Ut[s-1]}function Ay(n,t,e,i,s){for(let r=Ut.length-1;r>=Ut.indexOf(e);r--){let a=Ut[r];if(Qs[a].common&&n._adapter.diff(s,i,a)>=t-1)return a}return Ut[e?Ut.indexOf(e):0]}function Ey(n){for(let t=Ut.indexOf(n)+1,e=Ut.length;t<e;++t)if(Qs[Ut[t]].common)return Ut[t]}function Jc(n,t,e){if(!e)n[t]=!0;else if(e.length){let{lo:i,hi:s}=Cs(e,t),r=e[i]>=t?e[i]:e[s];n[r]=!0}}function zy(n,t,e,i){let s=n._adapter,r=+s.startOf(t[0].value,i),a=t[t.length-1].value,h,c;for(h=r;h<=a;h=+s.add(h,1,i))c=e[h],c>=0&&(t[c].major=!0);return t}function tu(n,t,e){let i=[],s={},r=t.length,a,h;for(a=0;a<r;++a)h=t[a],s[h]=a,i.push({value:h,major:!1});return r===0||!e?i:zy(n,i,s,e)}var hi=class extends ci{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,e={}){let i=t.time||(t.time={}),s=this._adapter=new Ya._date(t.adapters.date);s.init(e),Si(i.displayFormats,s.formats()),this._parseOpts={parser:i.parser,round:i.round,isoWeekday:i.isoWeekday},super.init(t),this._normalized=e.normalized}parse(t,e){return t===void 0?null:Kc(this,t)}beforeLayout(){super.beforeLayout(),this._cache={data:[],labels:[],all:[]}}determineDataLimits(){let t=this.options,e=this._adapter,i=t.time.unit||"day",{min:s,max:r,minDefined:a,maxDefined:h}=this.getUserBounds();function c(d){!a&&!isNaN(d.min)&&(s=Math.min(s,d.min)),!h&&!isNaN(d.max)&&(r=Math.max(r,d.max))}(!a||!h)&&(c(this._getLabelBounds()),(t.bounds!=="ticks"||t.ticks.source!=="labels")&&c(this.getMinMax(!1))),s=Pt(s)&&!isNaN(s)?s:+e.startOf(Date.now(),i),r=Pt(r)&&!isNaN(r)?r:+e.endOf(Date.now(),i)+1,this.min=Math.min(s,r-1),this.max=Math.max(s+1,r)}_getLabelBounds(){let t=this.getLabelTimestamps(),e=Number.POSITIVE_INFINITY,i=Number.NEGATIVE_INFINITY;return t.length&&(e=t[0],i=t[t.length-1]),{min:e,max:i}}buildTicks(){let t=this.options,e=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]);let r=this.min,a=this.max,h=zh(s,r,a);return this._unit=e.unit||(i.autoSkip?Qc(e.minUnit,this.min,this.max,this._getLabelCapacity(r)):Ay(this,h.length,e.minUnit,this.min,this.max)),this._majorUnit=!i.major.enabled||this._unit==="year"?void 0:Ey(this._unit),this.initOffsets(s),t.reverse&&h.reverse(),tu(this,h,this._majorUnit)}afterAutoSkip(){this.options.offsetAfterAutoskip&&this.initOffsets(this.ticks.map(t=>+t.value))}initOffsets(t=[]){let e=0,i=0,s,r;this.options.offset&&t.length&&(s=this.getDecimalForValue(t[0]),t.length===1?e=1-s:e=(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);let a=t.length<3?.5:.25;e=It(e,0,a),i=It(i,0,a),this._offsets={start:e,end:i,factor:1/(e+1+i)}}_generate(){let t=this._adapter,e=this.min,i=this.max,s=this.options,r=s.time,a=r.unit||Qc(r.minUnit,e,i,this._getLabelCapacity(e)),h=$(s.ticks.stepSize,1),c=a==="week"?r.isoWeekday:!1,d=ii(c)||c===!0,f={},m=e,_,y;if(d&&(m=+t.startOf(m,"isoWeek",c)),m=+t.startOf(m,d?"day":a),t.diff(i,e,a)>1e5*h)throw new Error(e+" and "+i+" are too far apart with stepSize of "+h+" "+a);let x=s.ticks.source==="data"&&this.getDataTimestamps();for(_=m,y=0;_<i;_=+t.add(_,h,a),y++)Jc(f,_,x);return(_===i||s.bounds==="ticks"||y===1)&&Jc(f,_,x),Object.keys(f).sort($c).map(b=>+b)}getLabelForValue(t){let e=this._adapter,i=this.options.time;return i.tooltipFormat?e.format(t,i.tooltipFormat):e.format(t,i.displayFormats.datetime)}format(t,e){let s=this.options.time.displayFormats,r=this._unit,a=e||s[r];return this._adapter.format(t,a)}_tickFormatFunction(t,e,i,s){let r=this.options,a=r.ticks.callback;if(a)return vt(a,[t,e,i],this);let h=r.time.displayFormats,c=this._unit,d=this._majorUnit,f=c&&h[c],m=d&&h[d],_=i[e],y=d&&m&&_&&_.major;return this._adapter.format(t,s||(y?m:f))}generateTickLabels(t){let e,i,s;for(e=0,i=t.length;e<i;++e)s=t[e],s.label=this._tickFormatFunction(s.value,e,t)}getDecimalForValue(t){return t===null?NaN:(t-this.min)/(this.max-this.min)}getPixelForValue(t){let e=this._offsets,i=this.getDecimalForValue(t);return this.getPixelForDecimal((e.start+i)*e.factor)}getValueForPixel(t){let e=this._offsets,i=this.getDecimalForPixel(t)/e.factor-e.end;return this.min+i*(this.max-this.min)}_getLabelSize(t){let e=this.options.ticks,i=this.ctx.measureText(t).width,s=ee(this.isHorizontal()?e.maxRotation:e.minRotation),r=Math.cos(s),a=Math.sin(s),h=this._resolveTickFontOptions(0).size;return{w:i*r+h*a,h:i*a+h*r}}_getLabelCapacity(t){let e=this.options.time,i=e.displayFormats,s=i[e.unit]||i.millisecond,r=this._tickFormatFunction(t,0,tu(this,[t],this._majorUnit),s),a=this._getLabelSize(r),h=Math.floor(this.isHorizontal()?this.width/a.w:this.height/a.h)-1;return h>0?h:1}getDataTimestamps(){let t=this._cache.data||[],e,i;if(t.length)return t;let s=this.getMatchingVisibleMetas();if(this._normalized&&s.length)return this._cache.data=s[0].controller.getAllParsedValues(this);for(e=0,i=s.length;e<i;++e)t=t.concat(s[e].controller.getAllParsedValues(this));return this._cache.data=this.normalize(t)}getLabelTimestamps(){let t=this._cache.labels||[],e,i;if(t.length)return t;let s=this.getLabels();for(e=0,i=s.length;e<i;++e)t.push(Kc(this,s[e]));return this._cache.labels=this._normalized?t:this.normalize(t)}normalize(t){return Qr(t.sort($c))}};k(hi,"id","time"),k(hi,"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 Zs(n,t,e){let i=0,s=n.length-1,r,a,h,c;e?(t>=n[i].pos&&t<=n[s].pos&&({lo:i,hi:s}=fe(n,"pos",t)),{pos:r,time:h}=n[i],{pos:a,time:c}=n[s]):(t>=n[i].time&&t<=n[s].time&&({lo:i,hi:s}=fe(n,"time",t)),{time:r,pos:h}=n[i],{time:a,pos:c}=n[s]);let d=a-r;return d?h+(c-h)*(t-r)/d:h}var Bn=class extends hi{constructor(t){super(t),this._table=[],this._minPos=void 0,this._tableRange=void 0}initOffsets(){let t=this._getTimestampsForTable(),e=this._table=this.buildLookupTable(t);this._minPos=Zs(e,this.min),this._tableRange=Zs(e,this.max)-this._minPos,super.initOffsets(t)}buildLookupTable(t){let{min:e,max:i}=this,s=[],r=[],a,h,c,d,f;for(a=0,h=t.length;a<h;++a)d=t[a],d>=e&&d<=i&&s.push(d);if(s.length<2)return[{time:e,pos:0},{time:i,pos:1}];for(a=0,h=s.length;a<h;++a)f=s[a+1],c=s[a-1],d=s[a],Math.round((f+c)/2)!==d&&r.push({time:d,pos:a/(h-1)});return r}_generate(){let t=this.min,e=this.max,i=super.getDataTimestamps();return(!i.includes(t)||!i.length)&&i.splice(0,0,t),(!i.includes(e)||i.length===1)&&i.push(e),i.sort((s,r)=>s-r)}_getTimestampsForTable(){let t=this._cache.all||[];if(t.length)return t;let e=this.getDataTimestamps(),i=this.getLabelTimestamps();return e.length&&i.length?t=this.normalize(e.concat(i)):t=e.length?e:i,t=this._cache.all=t,t}getDecimalForValue(t){return(Zs(this._table,t)-this._minPos)/this._tableRange}getValueForPixel(t){let e=this._offsets,i=this.getDecimalForPixel(t)/e.factor-e.end;return Zs(this._table,i*this._tableRange+this._minPos,!0)}};k(Bn,"id","timeseries"),k(Bn,"defaults",hi.defaults);var Ry=Object.freeze({__proto__:null,CategoryScale:En,LinearScale:zn,LogarithmicScale:Rn,RadialLinearScale:ai,TimeScale:hi,TimeSeriesScale:Bn}),bu=[qm,y_,fy,Ry];ie.register(...bu);var wu=ie;var By=Math.pow(10,8)*24*60*60*1e3,mx=-By,Js=6048e5,Mu=864e5,Ae=6e4,Ee=36e5,Lu=1e3;var Fy=3600;var Pu=Fy*24,gx=Pu*7,Ny=Pu*365.2425,Wy=Ny/12,_x=Wy*3,ja=Symbol.for("constructDateFrom");function tt(n,t){return typeof n=="function"?n(t):n&&typeof n=="object"&&ja in n?n[ja](t):n instanceof Date?new n.constructor(t):new Date(t)}function F(n,t){return tt(t||n,n)}function Ge(n,t,e){let i=F(n,e==null?void 0:e.in);return isNaN(t)?tt((e==null?void 0:e.in)||n,NaN):(t&&i.setDate(i.getDate()+t),i)}function Ui(n,t,e){let i=F(n,e==null?void 0:e.in);if(isNaN(t))return tt((e==null?void 0:e.in)||n,NaN);if(!t)return i;let s=i.getDate(),r=tt((e==null?void 0:e.in)||n,i.getTime());r.setMonth(i.getMonth()+t+1,0);let a=r.getDate();return s>=a?r:(i.setFullYear(r.getFullYear(),r.getMonth(),s),i)}function Gi(n,t,e){return tt((e==null?void 0:e.in)||n,+F(n)+t)}function ku(n,t,e){return Gi(n,t*Ee,e)}var Hy={};function Gt(){return Hy}function Ft(n,t){var h,c,d,f,m,_,y,x;let e=Gt(),i=(x=(y=(f=(d=t==null?void 0:t.weekStartsOn)!=null?d:(c=(h=t==null?void 0:t.locale)==null?void 0:h.options)==null?void 0:c.weekStartsOn)!=null?f:e.weekStartsOn)!=null?y:(_=(m=e.locale)==null?void 0:m.options)==null?void 0:_.weekStartsOn)!=null?x:0,s=F(n,t==null?void 0:t.in),r=s.getDay(),a=(r<i?7:0)+r-i;return s.setDate(s.getDate()-a),s.setHours(0,0,0,0),s}function le(n,t){return Ft(n,Li(Mi({},t),{weekStartsOn:1}))}function to(n,t){let e=F(n,t==null?void 0:t.in),i=e.getFullYear(),s=tt(e,0);s.setFullYear(i+1,0,4),s.setHours(0,0,0,0);let r=le(s),a=tt(e,0);a.setFullYear(i,0,4),a.setHours(0,0,0,0);let h=le(a);return e.getTime()>=r.getTime()?i+1:e.getTime()>=h.getTime()?i:i-1}function ui(n){let t=F(n),e=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return e.setUTCFullYear(t.getFullYear()),+n-+e}function qt(n,...t){let e=tt.bind(null,n||t.find(i=>typeof i=="object"));return t.map(e)}function Vn(n,t){let e=F(n,t==null?void 0:t.in);return e.setHours(0,0,0,0),e}function eo(n,t,e){let[i,s]=qt(e==null?void 0:e.in,n,t),r=Vn(i),a=Vn(s),h=+r-ui(r),c=+a-ui(a);return Math.round((h-c)/Mu)}function Tu(n,t){let e=to(n,t),i=tt((t==null?void 0:t.in)||n,0);return i.setFullYear(e,0,4),i.setHours(0,0,0,0),le(i)}function Cu(n,t,e){let i=F(n,e==null?void 0:e.in);return i.setTime(i.getTime()+t*Ae),i}function Su(n,t,e){return Ui(n,t*3,e)}function Ou(n,t,e){return Gi(n,t*1e3,e)}function Du(n,t,e){return Ge(n,t*7,e)}function Iu(n,t,e){return Ui(n,t*12,e)}function di(n,t){let e=+F(n)-+F(t);return e<0?-1:e>0?1:e}function Au(n){return n instanceof Date||typeof n=="object"&&Object.prototype.toString.call(n)==="[object Date]"}function io(n){return!(!Au(n)&&typeof n!="number"||isNaN(+F(n)))}function Eu(n,t,e){let[i,s]=qt(e==null?void 0:e.in,n,t),r=i.getFullYear()-s.getFullYear(),a=i.getMonth()-s.getMonth();return r*12+a}function zu(n,t,e){let[i,s]=qt(e==null?void 0:e.in,n,t);return i.getFullYear()-s.getFullYear()}function no(n,t,e){let[i,s]=qt(e==null?void 0:e.in,n,t),r=Ru(i,s),a=Math.abs(eo(i,s));i.setDate(i.getDate()-r*a);let h=+(Ru(i,s)===-r),c=r*(a-h);return c===0?0:c}function Ru(n,t){let e=n.getFullYear()-t.getFullYear()||n.getMonth()-t.getMonth()||n.getDate()-t.getDate()||n.getHours()-t.getHours()||n.getMinutes()-t.getMinutes()||n.getSeconds()-t.getSeconds()||n.getMilliseconds()-t.getMilliseconds();return e<0?-1:e>0?1:e}function xe(n){return t=>{let i=(n?Math[n]:Math.trunc)(t);return i===0?0:i}}function Bu(n,t,e){let[i,s]=qt(e==null?void 0:e.in,n,t),r=(+i-+s)/Ee;return xe(e==null?void 0:e.roundingMethod)(r)}function qi(n,t){return+F(n)-+F(t)}function Fu(n,t,e){let i=qi(n,t)/Ae;return xe(e==null?void 0:e.roundingMethod)(i)}function so(n,t){let e=F(n,t==null?void 0:t.in);return e.setHours(23,59,59,999),e}function oo(n,t){let e=F(n,t==null?void 0:t.in),i=e.getMonth();return e.setFullYear(e.getFullYear(),i+1,0),e.setHours(23,59,59,999),e}function Nu(n,t){let e=F(n,t==null?void 0:t.in);return+so(e,t)==+oo(e,t)}function ro(n,t,e){let[i,s,r]=qt(e==null?void 0:e.in,n,n,t),a=di(s,r),h=Math.abs(Eu(s,r));if(h<1)return 0;s.getMonth()===1&&s.getDate()>27&&s.setDate(30),s.setMonth(s.getMonth()-a*h);let c=di(s,r)===-a;Nu(i)&&h===1&&di(i,r)===1&&(c=!1);let d=a*(h-+c);return d===0?0:d}function Wu(n,t,e){let i=ro(n,t,e)/3;return xe(e==null?void 0:e.roundingMethod)(i)}function Hu(n,t,e){let i=qi(n,t)/1e3;return xe(e==null?void 0:e.roundingMethod)(i)}function Zu(n,t,e){let i=no(n,t,e)/7;return xe(e==null?void 0:e.roundingMethod)(i)}function Vu(n,t,e){let[i,s]=qt(e==null?void 0:e.in,n,t),r=di(i,s),a=Math.abs(zu(i,s));i.setFullYear(1584),s.setFullYear(1584);let h=di(i,s)===-r,c=r*(a-+h);return c===0?0:c}function Yu(n,t){let e=F(n,t==null?void 0:t.in),i=e.getMonth(),s=i-i%3;return e.setMonth(s,1),e.setHours(0,0,0,0),e}function ju(n,t){let e=F(n,t==null?void 0:t.in);return e.setDate(1),e.setHours(0,0,0,0),e}function Uu(n,t){let e=F(n,t==null?void 0:t.in),i=e.getFullYear();return e.setFullYear(i+1,0,0),e.setHours(23,59,59,999),e}function ao(n,t){let e=F(n,t==null?void 0:t.in);return e.setFullYear(e.getFullYear(),0,1),e.setHours(0,0,0,0),e}function Gu(n,t){let e=F(n,t==null?void 0:t.in);return e.setMinutes(59,59,999),e}function qu(n,t){var h,c,d,f,m,_,y,x;let e=Gt(),i=(x=(y=(f=(d=t==null?void 0:t.weekStartsOn)!=null?d:(c=(h=t==null?void 0:t.locale)==null?void 0:h.options)==null?void 0:c.weekStartsOn)!=null?f:e.weekStartsOn)!=null?y:(_=(m=e.locale)==null?void 0:m.options)==null?void 0:_.weekStartsOn)!=null?x:0,s=F(n,t==null?void 0:t.in),r=s.getDay(),a=(r<i?-7:0)+6-(r-i);return s.setDate(s.getDate()+a),s.setHours(23,59,59,999),s}function Xu(n,t){let e=F(n,t==null?void 0:t.in);return e.setSeconds(59,999),e}function $u(n,t){let e=F(n,t==null?void 0:t.in),i=e.getMonth(),s=i-i%3+3;return e.setMonth(s,0),e.setHours(23,59,59,999),e}function Ku(n,t){let e=F(n,t==null?void 0:t.in);return e.setMilliseconds(999),e}var Zy={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},Qu=(n,t,e)=>{let i,s=Zy[n];return typeof s=="string"?i=s:t===1?i=s.one:i=s.other.replace("{{count}}",t.toString()),e!=null&&e.addSuffix?e.comparison&&e.comparison>0?"in "+i:i+" ago":i};function lo(n){return(t={})=>{let e=t.width?String(t.width):n.defaultWidth;return n.formats[e]||n.formats[n.defaultWidth]}}var Vy={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},Yy={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},jy={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},Ju={date:lo({formats:Vy,defaultWidth:"full"}),time:lo({formats:Yy,defaultWidth:"full"}),dateTime:lo({formats:jy,defaultWidth:"full"})};var Uy={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},td=(n,t,e,i)=>Uy[n];function Xi(n){return(t,e)=>{let i=e!=null&&e.context?String(e.context):"standalone",s;if(i==="formatting"&&n.formattingValues){let a=n.defaultFormattingWidth||n.defaultWidth,h=e!=null&&e.width?String(e.width):a;s=n.formattingValues[h]||n.formattingValues[a]}else{let a=n.defaultWidth,h=e!=null&&e.width?String(e.width):n.defaultWidth;s=n.values[h]||n.values[a]}let r=n.argumentCallback?n.argumentCallback(t):t;return s[r]}}var Gy={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},qy={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},Xy={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},$y={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},Ky={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},Qy={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},Jy=(n,t)=>{let e=Number(n),i=e%100;if(i>20||i<10)switch(i%10){case 1:return e+"st";case 2:return e+"nd";case 3:return e+"rd"}return e+"th"},ed={ordinalNumber:Jy,era:Xi({values:Gy,defaultWidth:"wide"}),quarter:Xi({values:qy,defaultWidth:"wide",argumentCallback:n=>n-1}),month:Xi({values:Xy,defaultWidth:"wide"}),day:Xi({values:$y,defaultWidth:"wide"}),dayPeriod:Xi({values:Ky,defaultWidth:"wide",formattingValues:Qy,defaultFormattingWidth:"wide"})};function $i(n){return(t,e={})=>{let i=e.width,s=i&&n.matchPatterns[i]||n.matchPatterns[n.defaultMatchWidth],r=t.match(s);if(!r)return null;let a=r[0],h=i&&n.parsePatterns[i]||n.parsePatterns[n.defaultParseWidth],c=Array.isArray(h)?ev(h,m=>m.test(a)):tv(h,m=>m.test(a)),d;d=n.valueCallback?n.valueCallback(c):c,d=e.valueCallback?e.valueCallback(d):d;let f=t.slice(a.length);return{value:d,rest:f}}}function tv(n,t){for(let e in n)if(Object.prototype.hasOwnProperty.call(n,e)&&t(n[e]))return e}function ev(n,t){for(let e=0;e<n.length;e++)if(t(n[e]))return e}function id(n){return(t,e={})=>{let i=t.match(n.matchPattern);if(!i)return null;let s=i[0],r=t.match(n.parsePattern);if(!r)return null;let a=n.valueCallback?n.valueCallback(r[0]):r[0];a=e.valueCallback?e.valueCallback(a):a;let h=t.slice(s.length);return{value:a,rest:h}}}var iv=/^(\d+)(th|st|nd|rd)?/i,nv=/\d+/i,sv={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},ov={any:[/^b/i,/^(a|c)/i]},rv={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},av={any:[/1/i,/2/i,/3/i,/4/i]},lv={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},hv={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},cv={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},uv={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},dv={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},fv={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},nd={ordinalNumber:id({matchPattern:iv,parsePattern:nv,valueCallback:n=>parseInt(n,10)}),era:$i({matchPatterns:sv,defaultMatchWidth:"wide",parsePatterns:ov,defaultParseWidth:"any"}),quarter:$i({matchPatterns:rv,defaultMatchWidth:"wide",parsePatterns:av,defaultParseWidth:"any",valueCallback:n=>n+1}),month:$i({matchPatterns:lv,defaultMatchWidth:"wide",parsePatterns:hv,defaultParseWidth:"any"}),day:$i({matchPatterns:cv,defaultMatchWidth:"wide",parsePatterns:uv,defaultParseWidth:"any"}),dayPeriod:$i({matchPatterns:dv,defaultMatchWidth:"any",parsePatterns:fv,defaultParseWidth:"any"})};var Yn={code:"en-US",formatDistance:Qu,formatLong:Ju,formatRelative:td,localize:ed,match:nd,options:{weekStartsOn:0,firstWeekContainsDate:1}};function sd(n,t){let e=F(n,t==null?void 0:t.in);return eo(e,ao(e))+1}function ho(n,t){let e=F(n,t==null?void 0:t.in),i=+le(e)-+Tu(e);return Math.round(i/Js)+1}function Ki(n,t){var f,m,_,y,x,b,w,P;let e=F(n,t==null?void 0:t.in),i=e.getFullYear(),s=Gt(),r=(P=(w=(y=(_=t==null?void 0:t.firstWeekContainsDate)!=null?_:(m=(f=t==null?void 0:t.locale)==null?void 0:f.options)==null?void 0:m.firstWeekContainsDate)!=null?y:s.firstWeekContainsDate)!=null?w:(b=(x=s.locale)==null?void 0:x.options)==null?void 0:b.firstWeekContainsDate)!=null?P:1,a=tt((t==null?void 0:t.in)||n,0);a.setFullYear(i+1,0,r),a.setHours(0,0,0,0);let h=Ft(a,t),c=tt((t==null?void 0:t.in)||n,0);c.setFullYear(i,0,r),c.setHours(0,0,0,0);let d=Ft(c,t);return+e>=+h?i+1:+e>=+d?i:i-1}function od(n,t){var h,c,d,f,m,_,y,x;let e=Gt(),i=(x=(y=(f=(d=t==null?void 0:t.firstWeekContainsDate)!=null?d:(c=(h=t==null?void 0:t.locale)==null?void 0:h.options)==null?void 0:c.firstWeekContainsDate)!=null?f:e.firstWeekContainsDate)!=null?y:(_=(m=e.locale)==null?void 0:m.options)==null?void 0:_.firstWeekContainsDate)!=null?x:1,s=Ki(n,t),r=tt((t==null?void 0:t.in)||n,0);return r.setFullYear(s,0,i),r.setHours(0,0,0,0),Ft(r,t)}function co(n,t){let e=F(n,t==null?void 0:t.in),i=+Ft(e,t)-+od(e,t);return Math.round(i/Js)+1}function mt(n,t){let e=n<0?"-":"",i=Math.abs(n).toString().padStart(t,"0");return e+i}var ze={y(n,t){let e=n.getFullYear(),i=e>0?e:1-e;return mt(t==="yy"?i%100:i,t.length)},M(n,t){let e=n.getMonth();return t==="M"?String(e+1):mt(e+1,2)},d(n,t){return mt(n.getDate(),t.length)},a(n,t){let e=n.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return e.toUpperCase();case"aaa":return e;case"aaaaa":return e[0];case"aaaa":default:return e==="am"?"a.m.":"p.m."}},h(n,t){return mt(n.getHours()%12||12,t.length)},H(n,t){return mt(n.getHours(),t.length)},m(n,t){return mt(n.getMinutes(),t.length)},s(n,t){return mt(n.getSeconds(),t.length)},S(n,t){let e=t.length,i=n.getMilliseconds(),s=Math.trunc(i*Math.pow(10,e-3));return mt(s,t.length)}};var Qi={am:"am",pm:"pm",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},Ua={G:function(n,t,e){let i=n.getFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return e.era(i,{width:"abbreviated"});case"GGGGG":return e.era(i,{width:"narrow"});case"GGGG":default:return e.era(i,{width:"wide"})}},y:function(n,t,e){if(t==="yo"){let i=n.getFullYear(),s=i>0?i:1-i;return e.ordinalNumber(s,{unit:"year"})}return ze.y(n,t)},Y:function(n,t,e,i){let s=Ki(n,i),r=s>0?s:1-s;if(t==="YY"){let a=r%100;return mt(a,2)}return t==="Yo"?e.ordinalNumber(r,{unit:"year"}):mt(r,t.length)},R:function(n,t){let e=to(n);return mt(e,t.length)},u:function(n,t){let e=n.getFullYear();return mt(e,t.length)},Q:function(n,t,e){let i=Math.ceil((n.getMonth()+1)/3);switch(t){case"Q":return String(i);case"QQ":return mt(i,2);case"Qo":return e.ordinalNumber(i,{unit:"quarter"});case"QQQ":return e.quarter(i,{width:"abbreviated",context:"formatting"});case"QQQQQ":return e.quarter(i,{width:"narrow",context:"formatting"});case"QQQQ":default:return e.quarter(i,{width:"wide",context:"formatting"})}},q:function(n,t,e){let i=Math.ceil((n.getMonth()+1)/3);switch(t){case"q":return String(i);case"qq":return mt(i,2);case"qo":return e.ordinalNumber(i,{unit:"quarter"});case"qqq":return e.quarter(i,{width:"abbreviated",context:"standalone"});case"qqqqq":return e.quarter(i,{width:"narrow",context:"standalone"});case"qqqq":default:return e.quarter(i,{width:"wide",context:"standalone"})}},M:function(n,t,e){let i=n.getMonth();switch(t){case"M":case"MM":return ze.M(n,t);case"Mo":return e.ordinalNumber(i+1,{unit:"month"});case"MMM":return e.month(i,{width:"abbreviated",context:"formatting"});case"MMMMM":return e.month(i,{width:"narrow",context:"formatting"});case"MMMM":default:return e.month(i,{width:"wide",context:"formatting"})}},L:function(n,t,e){let i=n.getMonth();switch(t){case"L":return String(i+1);case"LL":return mt(i+1,2);case"Lo":return e.ordinalNumber(i+1,{unit:"month"});case"LLL":return e.month(i,{width:"abbreviated",context:"standalone"});case"LLLLL":return e.month(i,{width:"narrow",context:"standalone"});case"LLLL":default:return e.month(i,{width:"wide",context:"standalone"})}},w:function(n,t,e,i){let s=co(n,i);return t==="wo"?e.ordinalNumber(s,{unit:"week"}):mt(s,t.length)},I:function(n,t,e){let i=ho(n);return t==="Io"?e.ordinalNumber(i,{unit:"week"}):mt(i,t.length)},d:function(n,t,e){return t==="do"?e.ordinalNumber(n.getDate(),{unit:"date"}):ze.d(n,t)},D:function(n,t,e){let i=sd(n);return t==="Do"?e.ordinalNumber(i,{unit:"dayOfYear"}):mt(i,t.length)},E:function(n,t,e){let i=n.getDay();switch(t){case"E":case"EE":case"EEE":return e.day(i,{width:"abbreviated",context:"formatting"});case"EEEEE":return e.day(i,{width:"narrow",context:"formatting"});case"EEEEEE":return e.day(i,{width:"short",context:"formatting"});case"EEEE":default:return e.day(i,{width:"wide",context:"formatting"})}},e:function(n,t,e,i){let s=n.getDay(),r=(s-i.weekStartsOn+8)%7||7;switch(t){case"e":return String(r);case"ee":return mt(r,2);case"eo":return e.ordinalNumber(r,{unit:"day"});case"eee":return e.day(s,{width:"abbreviated",context:"formatting"});case"eeeee":return e.day(s,{width:"narrow",context:"formatting"});case"eeeeee":return e.day(s,{width:"short",context:"formatting"});case"eeee":default:return e.day(s,{width:"wide",context:"formatting"})}},c:function(n,t,e,i){let s=n.getDay(),r=(s-i.weekStartsOn+8)%7||7;switch(t){case"c":return String(r);case"cc":return mt(r,t.length);case"co":return e.ordinalNumber(r,{unit:"day"});case"ccc":return e.day(s,{width:"abbreviated",context:"standalone"});case"ccccc":return e.day(s,{width:"narrow",context:"standalone"});case"cccccc":return e.day(s,{width:"short",context:"standalone"});case"cccc":default:return e.day(s,{width:"wide",context:"standalone"})}},i:function(n,t,e){let i=n.getDay(),s=i===0?7:i;switch(t){case"i":return String(s);case"ii":return mt(s,t.length);case"io":return e.ordinalNumber(s,{unit:"day"});case"iii":return e.day(i,{width:"abbreviated",context:"formatting"});case"iiiii":return e.day(i,{width:"narrow",context:"formatting"});case"iiiiii":return e.day(i,{width:"short",context:"formatting"});case"iiii":default:return e.day(i,{width:"wide",context:"formatting"})}},a:function(n,t,e){let s=n.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return e.dayPeriod(s,{width:"abbreviated",context:"formatting"});case"aaa":return e.dayPeriod(s,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return e.dayPeriod(s,{width:"narrow",context:"formatting"});case"aaaa":default:return e.dayPeriod(s,{width:"wide",context:"formatting"})}},b:function(n,t,e){let i=n.getHours(),s;switch(i===12?s=Qi.noon:i===0?s=Qi.midnight:s=i/12>=1?"pm":"am",t){case"b":case"bb":return e.dayPeriod(s,{width:"abbreviated",context:"formatting"});case"bbb":return e.dayPeriod(s,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return e.dayPeriod(s,{width:"narrow",context:"formatting"});case"bbbb":default:return e.dayPeriod(s,{width:"wide",context:"formatting"})}},B:function(n,t,e){let i=n.getHours(),s;switch(i>=17?s=Qi.evening:i>=12?s=Qi.afternoon:i>=4?s=Qi.morning:s=Qi.night,t){case"B":case"BB":case"BBB":return e.dayPeriod(s,{width:"abbreviated",context:"formatting"});case"BBBBB":return e.dayPeriod(s,{width:"narrow",context:"formatting"});case"BBBB":default:return e.dayPeriod(s,{width:"wide",context:"formatting"})}},h:function(n,t,e){if(t==="ho"){let i=n.getHours()%12;return i===0&&(i=12),e.ordinalNumber(i,{unit:"hour"})}return ze.h(n,t)},H:function(n,t,e){return t==="Ho"?e.ordinalNumber(n.getHours(),{unit:"hour"}):ze.H(n,t)},K:function(n,t,e){let i=n.getHours()%12;return t==="Ko"?e.ordinalNumber(i,{unit:"hour"}):mt(i,t.length)},k:function(n,t,e){let i=n.getHours();return i===0&&(i=24),t==="ko"?e.ordinalNumber(i,{unit:"hour"}):mt(i,t.length)},m:function(n,t,e){return t==="mo"?e.ordinalNumber(n.getMinutes(),{unit:"minute"}):ze.m(n,t)},s:function(n,t,e){return t==="so"?e.ordinalNumber(n.getSeconds(),{unit:"second"}):ze.s(n,t)},S:function(n,t){return ze.S(n,t)},X:function(n,t,e){let i=n.getTimezoneOffset();if(i===0)return"Z";switch(t){case"X":return ad(i);case"XXXX":case"XX":return fi(i);case"XXXXX":case"XXX":default:return fi(i,":")}},x:function(n,t,e){let i=n.getTimezoneOffset();switch(t){case"x":return ad(i);case"xxxx":case"xx":return fi(i);case"xxxxx":case"xxx":default:return fi(i,":")}},O:function(n,t,e){let i=n.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+rd(i,":");case"OOOO":default:return"GMT"+fi(i,":")}},z:function(n,t,e){let i=n.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+rd(i,":");case"zzzz":default:return"GMT"+fi(i,":")}},t:function(n,t,e){let i=Math.trunc(+n/1e3);return mt(i,t.length)},T:function(n,t,e){return mt(+n,t.length)}};function rd(n,t=""){let e=n>0?"-":"+",i=Math.abs(n),s=Math.trunc(i/60),r=i%60;return r===0?e+String(s):e+String(s)+t+mt(r,2)}function ad(n,t){return n%60===0?(n>0?"-":"+")+mt(Math.abs(n)/60,2):fi(n,t)}function fi(n,t=""){let e=n>0?"-":"+",i=Math.abs(n),s=mt(Math.trunc(i/60),2),r=mt(i%60,2);return e+s+t+r}var ld=(n,t)=>{switch(n){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});case"PPPP":default:return t.date({width:"full"})}},hd=(n,t)=>{switch(n){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});case"pppp":default:return t.time({width:"full"})}},pv=(n,t)=>{let e=n.match(/(P+)(p+)?/)||[],i=e[1],s=e[2];if(!s)return ld(n,t);let r;switch(i){case"P":r=t.dateTime({width:"short"});break;case"PP":r=t.dateTime({width:"medium"});break;case"PPP":r=t.dateTime({width:"long"});break;case"PPPP":default:r=t.dateTime({width:"full"});break}return r.replace("{{date}}",ld(i,t)).replace("{{time}}",hd(s,t))},jn={p:hd,P:pv};var mv=/^D+$/,gv=/^Y+$/,_v=["D","DD","YY","YYYY"];function uo(n){return mv.test(n)}function fo(n){return gv.test(n)}function Un(n,t,e){let i=yv(n,t,e);if(console.warn(i),_v.includes(n))throw new RangeError(i)}function yv(n,t,e){let i=n[0]==="Y"?"years":"days of the month";return`Use \`${n.toLowerCase()}\` instead of \`${n}\` (in \`${t}\`) for formatting ${i} to the input \`${e}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}var vv=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,xv=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,bv=/^'([^]*?)'?$/,wv=/''/g,Mv=/[a-zA-Z]/;function cd(n,t,e){var f,m,_,y,x,b,w,P,C,O,I,D,z,R,B,N,j,q;let i=Gt(),s=(m=(f=e==null?void 0:e.locale)!=null?f:i.locale)!=null?m:Yn,r=(O=(C=(b=(x=e==null?void 0:e.firstWeekContainsDate)!=null?x:(y=(_=e==null?void 0:e.locale)==null?void 0:_.options)==null?void 0:y.firstWeekContainsDate)!=null?b:i.firstWeekContainsDate)!=null?C:(P=(w=i.locale)==null?void 0:w.options)==null?void 0:P.firstWeekContainsDate)!=null?O:1,a=(q=(j=(R=(z=e==null?void 0:e.weekStartsOn)!=null?z:(D=(I=e==null?void 0:e.locale)==null?void 0:I.options)==null?void 0:D.weekStartsOn)!=null?R:i.weekStartsOn)!=null?j:(N=(B=i.locale)==null?void 0:B.options)==null?void 0:N.weekStartsOn)!=null?q:0,h=F(n,e==null?void 0:e.in);if(!io(h))throw new RangeError("Invalid time value");let c=t.match(xv).map(Y=>{let nt=Y[0];if(nt==="p"||nt==="P"){let lt=jn[nt];return lt(Y,s.formatLong)}return Y}).join("").match(vv).map(Y=>{if(Y==="''")return{isToken:!1,value:"'"};let nt=Y[0];if(nt==="'")return{isToken:!1,value:Lv(Y)};if(Ua[nt])return{isToken:!0,value:Y};if(nt.match(Mv))throw new RangeError("Format string contains an unescaped latin alphabet character `"+nt+"`");return{isToken:!1,value:Y}});s.localize.preprocessor&&(c=s.localize.preprocessor(h,c));let d={firstWeekContainsDate:r,weekStartsOn:a,locale:s};return c.map(Y=>{if(!Y.isToken)return Y.value;let nt=Y.value;(!(e!=null&&e.useAdditionalWeekYearTokens)&&fo(nt)||!(e!=null&&e.useAdditionalDayOfYearTokens)&&uo(nt))&&Un(nt,t,String(n));let lt=Ua[nt[0]];return lt(h,nt,s.localize,d)}).join("")}function Lv(n){let t=n.match(bv);return t?t[1].replace(wv,"'"):n}function ud(){return Object.assign({},Gt())}function dd(n,t){let e=F(n,t==null?void 0:t.in).getDay();return e===0?7:e}function fd(n,t){let e=Pv(t)?new t(0):tt(t,0);return e.setFullYear(n.getFullYear(),n.getMonth(),n.getDate()),e.setHours(n.getHours(),n.getMinutes(),n.getSeconds(),n.getMilliseconds()),e}function Pv(n){var t;return typeof n=="function"&&((t=n.prototype)==null?void 0:t.constructor)===n}var kv=10,po=class{constructor(){k(this,"subPriority",0)}validate(t,e){return!0}},mo=class extends po{constructor(t,e,i,s,r){super(),this.value=t,this.validateValue=e,this.setValue=i,this.priority=s,r&&(this.subPriority=r)}validate(t,e){return this.validateValue(t,this.value,e)}set(t,e,i){return this.setValue(t,e,this.value,i)}},go=class extends po{constructor(e,i){super();k(this,"priority",kv);k(this,"subPriority",-1);this.context=e||(s=>tt(i,s))}set(e,i){return i.timestampIsSet?e:tt(e,fd(e,this.context))}};var Z=class{run(t,e,i,s){let r=this.parse(t,e,i,s);return r?{setter:new mo(r.value,this.validate,this.set,this.priority,this.subPriority),rest:r.rest}:null}validate(t,e,i){return!0}};var _o=class extends Z{constructor(){super(...arguments);k(this,"priority",140);k(this,"incompatibleTokens",["R","u","t","T"])}parse(e,i,s){switch(i){case"G":case"GG":case"GGG":return s.era(e,{width:"abbreviated"})||s.era(e,{width:"narrow"});case"GGGGG":return s.era(e,{width:"narrow"});case"GGGG":default:return s.era(e,{width:"wide"})||s.era(e,{width:"abbreviated"})||s.era(e,{width:"narrow"})}}set(e,i,s){return i.era=s,e.setFullYear(s,0,1),e.setHours(0,0,0,0),e}};var ct={month:/^(1[0-2]|0?\d)/,date:/^(3[0-1]|[0-2]?\d)/,dayOfYear:/^(36[0-6]|3[0-5]\d|[0-2]?\d?\d)/,week:/^(5[0-3]|[0-4]?\d)/,hour23h:/^(2[0-3]|[0-1]?\d)/,hour24h:/^(2[0-4]|[0-1]?\d)/,hour11h:/^(1[0-1]|0?\d)/,hour12h:/^(1[0-2]|0?\d)/,minute:/^[0-5]?\d/,second:/^[0-5]?\d/,singleDigit:/^\d/,twoDigits:/^\d{1,2}/,threeDigits:/^\d{1,3}/,fourDigits:/^\d{1,4}/,anyDigitsSigned:/^-?\d+/,singleDigitSigned:/^-?\d/,twoDigitsSigned:/^-?\d{1,2}/,threeDigitsSigned:/^-?\d{1,3}/,fourDigitsSigned:/^-?\d{1,4}/},ne={basicOptionalMinutes:/^([+-])(\d{2})(\d{2})?|Z/,basic:/^([+-])(\d{2})(\d{2})|Z/,basicOptionalSeconds:/^([+-])(\d{2})(\d{2})((\d{2}))?|Z/,extended:/^([+-])(\d{2}):(\d{2})|Z/,extendedOptionalSeconds:/^([+-])(\d{2}):(\d{2})(:(\d{2}))?|Z/};function _t(n,t){return n&&{value:t(n.value),rest:n.rest}}function at(n,t){let e=t.match(n);return e?{value:parseInt(e[0],10),rest:t.slice(e[0].length)}:null}function se(n,t){let e=t.match(n);if(!e)return null;if(e[0]==="Z")return{value:0,rest:t.slice(1)};let i=e[1]==="+"?1:-1,s=e[2]?parseInt(e[2],10):0,r=e[3]?parseInt(e[3],10):0,a=e[5]?parseInt(e[5],10):0;return{value:i*(s*Ee+r*Ae+a*Lu),rest:t.slice(e[0].length)}}function yo(n){return at(ct.anyDigitsSigned,n)}function Q(n,t){switch(n){case 1:return at(ct.singleDigit,t);case 2:return at(ct.twoDigits,t);case 3:return at(ct.threeDigits,t);case 4:return at(ct.fourDigits,t);default:return at(new RegExp("^\\d{1,"+n+"}"),t)}}function Ji(n,t){switch(n){case 1:return at(ct.singleDigitSigned,t);case 2:return at(ct.twoDigitsSigned,t);case 3:return at(ct.threeDigitsSigned,t);case 4:return at(ct.fourDigitsSigned,t);default:return at(new RegExp("^-?\\d{1,"+n+"}"),t)}}function tn(n){switch(n){case"morning":return 4;case"evening":return 17;case"pm":case"noon":case"afternoon":return 12;case"am":case"midnight":case"night":default:return 0}}function vo(n,t){let e=t>0,i=e?t:1-t,s;if(i<=50)s=n||100;else{let r=i+50,a=Math.trunc(r/100)*100,h=n>=r%100;s=n+a-(h?100:0)}return e?s:1-s}function xo(n){return n%400===0||n%4===0&&n%100!==0}var bo=class extends Z{constructor(){super(...arguments);k(this,"priority",130);k(this,"incompatibleTokens",["Y","R","u","w","I","i","e","c","t","T"])}parse(e,i,s){let r=a=>({year:a,isTwoDigitYear:i==="yy"});switch(i){case"y":return _t(Q(4,e),r);case"yo":return _t(s.ordinalNumber(e,{unit:"year"}),r);default:return _t(Q(i.length,e),r)}}validate(e,i){return i.isTwoDigitYear||i.year>0}set(e,i,s){let r=e.getFullYear();if(s.isTwoDigitYear){let h=vo(s.year,r);return e.setFullYear(h,0,1),e.setHours(0,0,0,0),e}let a=!("era"in i)||i.era===1?s.year:1-s.year;return e.setFullYear(a,0,1),e.setHours(0,0,0,0),e}};var wo=class extends Z{constructor(){super(...arguments);k(this,"priority",130);k(this,"incompatibleTokens",["y","R","u","Q","q","M","L","I","d","D","i","t","T"])}parse(e,i,s){let r=a=>({year:a,isTwoDigitYear:i==="YY"});switch(i){case"Y":return _t(Q(4,e),r);case"Yo":return _t(s.ordinalNumber(e,{unit:"year"}),r);default:return _t(Q(i.length,e),r)}}validate(e,i){return i.isTwoDigitYear||i.year>0}set(e,i,s,r){let a=Ki(e,r);if(s.isTwoDigitYear){let c=vo(s.year,a);return e.setFullYear(c,0,r.firstWeekContainsDate),e.setHours(0,0,0,0),Ft(e,r)}let h=!("era"in i)||i.era===1?s.year:1-s.year;return e.setFullYear(h,0,r.firstWeekContainsDate),e.setHours(0,0,0,0),Ft(e,r)}};var Mo=class extends Z{constructor(){super(...arguments);k(this,"priority",130);k(this,"incompatibleTokens",["G","y","Y","u","Q","q","M","L","w","d","D","e","c","t","T"])}parse(e,i){return i==="R"?Ji(4,e):Ji(i.length,e)}set(e,i,s){let r=tt(e,0);return r.setFullYear(s,0,4),r.setHours(0,0,0,0),le(r)}};var Lo=class extends Z{constructor(){super(...arguments);k(this,"priority",130);k(this,"incompatibleTokens",["G","y","Y","R","w","I","i","e","c","t","T"])}parse(e,i){return i==="u"?Ji(4,e):Ji(i.length,e)}set(e,i,s){return e.setFullYear(s,0,1),e.setHours(0,0,0,0),e}};var Po=class extends Z{constructor(){super(...arguments);k(this,"priority",120);k(this,"incompatibleTokens",["Y","R","q","M","L","w","I","d","D","i","e","c","t","T"])}parse(e,i,s){switch(i){case"Q":case"QQ":return Q(i.length,e);case"Qo":return s.ordinalNumber(e,{unit:"quarter"});case"QQQ":return s.quarter(e,{width:"abbreviated",context:"formatting"})||s.quarter(e,{width:"narrow",context:"formatting"});case"QQQQQ":return s.quarter(e,{width:"narrow",context:"formatting"});case"QQQQ":default:return s.quarter(e,{width:"wide",context:"formatting"})||s.quarter(e,{width:"abbreviated",context:"formatting"})||s.quarter(e,{width:"narrow",context:"formatting"})}}validate(e,i){return i>=1&&i<=4}set(e,i,s){return e.setMonth((s-1)*3,1),e.setHours(0,0,0,0),e}};var ko=class extends Z{constructor(){super(...arguments);k(this,"priority",120);k(this,"incompatibleTokens",["Y","R","Q","M","L","w","I","d","D","i","e","c","t","T"])}parse(e,i,s){switch(i){case"q":case"qq":return Q(i.length,e);case"qo":return s.ordinalNumber(e,{unit:"quarter"});case"qqq":return s.quarter(e,{width:"abbreviated",context:"standalone"})||s.quarter(e,{width:"narrow",context:"standalone"});case"qqqqq":return s.quarter(e,{width:"narrow",context:"standalone"});case"qqqq":default:return s.quarter(e,{width:"wide",context:"standalone"})||s.quarter(e,{width:"abbreviated",context:"standalone"})||s.quarter(e,{width:"narrow",context:"standalone"})}}validate(e,i){return i>=1&&i<=4}set(e,i,s){return e.setMonth((s-1)*3,1),e.setHours(0,0,0,0),e}};var To=class extends Z{constructor(){super(...arguments);k(this,"incompatibleTokens",["Y","R","q","Q","L","w","I","D","i","e","c","t","T"]);k(this,"priority",110)}parse(e,i,s){let r=a=>a-1;switch(i){case"M":return _t(at(ct.month,e),r);case"MM":return _t(Q(2,e),r);case"Mo":return _t(s.ordinalNumber(e,{unit:"month"}),r);case"MMM":return s.month(e,{width:"abbreviated",context:"formatting"})||s.month(e,{width:"narrow",context:"formatting"});case"MMMMM":return s.month(e,{width:"narrow",context:"formatting"});case"MMMM":default:return s.month(e,{width:"wide",context:"formatting"})||s.month(e,{width:"abbreviated",context:"formatting"})||s.month(e,{width:"narrow",context:"formatting"})}}validate(e,i){return i>=0&&i<=11}set(e,i,s){return e.setMonth(s,1),e.setHours(0,0,0,0),e}};var Co=class extends Z{constructor(){super(...arguments);k(this,"priority",110);k(this,"incompatibleTokens",["Y","R","q","Q","M","w","I","D","i","e","c","t","T"])}parse(e,i,s){let r=a=>a-1;switch(i){case"L":return _t(at(ct.month,e),r);case"LL":return _t(Q(2,e),r);case"Lo":return _t(s.ordinalNumber(e,{unit:"month"}),r);case"LLL":return s.month(e,{width:"abbreviated",context:"standalone"})||s.month(e,{width:"narrow",context:"standalone"});case"LLLLL":return s.month(e,{width:"narrow",context:"standalone"});case"LLLL":default:return s.month(e,{width:"wide",context:"standalone"})||s.month(e,{width:"abbreviated",context:"standalone"})||s.month(e,{width:"narrow",context:"standalone"})}}validate(e,i){return i>=0&&i<=11}set(e,i,s){return e.setMonth(s,1),e.setHours(0,0,0,0),e}};function pd(n,t,e){let i=F(n,e==null?void 0:e.in),s=co(i,e)-t;return i.setDate(i.getDate()-s*7),F(i,e==null?void 0:e.in)}var So=class extends Z{constructor(){super(...arguments);k(this,"priority",100);k(this,"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","i","t","T"])}parse(e,i,s){switch(i){case"w":return at(ct.week,e);case"wo":return s.ordinalNumber(e,{unit:"week"});default:return Q(i.length,e)}}validate(e,i){return i>=1&&i<=53}set(e,i,s,r){return Ft(pd(e,s,r),r)}};function md(n,t,e){let i=F(n,e==null?void 0:e.in),s=ho(i,e)-t;return i.setDate(i.getDate()-s*7),i}var Oo=class extends Z{constructor(){super(...arguments);k(this,"priority",100);k(this,"incompatibleTokens",["y","Y","u","q","Q","M","L","w","d","D","e","c","t","T"])}parse(e,i,s){switch(i){case"I":return at(ct.week,e);case"Io":return s.ordinalNumber(e,{unit:"week"});default:return Q(i.length,e)}}validate(e,i){return i>=1&&i<=53}set(e,i,s){return le(md(e,s))}};var Tv=[31,28,31,30,31,30,31,31,30,31,30,31],Cv=[31,29,31,30,31,30,31,31,30,31,30,31],Do=class extends Z{constructor(){super(...arguments);k(this,"priority",90);k(this,"subPriority",1);k(this,"incompatibleTokens",["Y","R","q","Q","w","I","D","i","e","c","t","T"])}parse(e,i,s){switch(i){case"d":return at(ct.date,e);case"do":return s.ordinalNumber(e,{unit:"date"});default:return Q(i.length,e)}}validate(e,i){let s=e.getFullYear(),r=xo(s),a=e.getMonth();return r?i>=1&&i<=Cv[a]:i>=1&&i<=Tv[a]}set(e,i,s){return e.setDate(s),e.setHours(0,0,0,0),e}};var Io=class extends Z{constructor(){super(...arguments);k(this,"priority",90);k(this,"subpriority",1);k(this,"incompatibleTokens",["Y","R","q","Q","M","L","w","I","d","E","i","e","c","t","T"])}parse(e,i,s){switch(i){case"D":case"DD":return at(ct.dayOfYear,e);case"Do":return s.ordinalNumber(e,{unit:"date"});default:return Q(i.length,e)}}validate(e,i){let s=e.getFullYear();return xo(s)?i>=1&&i<=366:i>=1&&i<=365}set(e,i,s){return e.setMonth(0,s),e.setHours(0,0,0,0),e}};function en(n,t,e){var m,_,y,x,b,w,P,C;let i=Gt(),s=(C=(P=(x=(y=e==null?void 0:e.weekStartsOn)!=null?y:(_=(m=e==null?void 0:e.locale)==null?void 0:m.options)==null?void 0:_.weekStartsOn)!=null?x:i.weekStartsOn)!=null?P:(w=(b=i.locale)==null?void 0:b.options)==null?void 0:w.weekStartsOn)!=null?C:0,r=F(n,e==null?void 0:e.in),a=r.getDay(),c=(t%7+7)%7,d=7-s,f=t<0||t>6?t-(a+d)%7:(c+d)%7-(a+d)%7;return Ge(r,f,e)}var Ao=class extends Z{constructor(){super(...arguments);k(this,"priority",90);k(this,"incompatibleTokens",["D","i","e","c","t","T"])}parse(e,i,s){switch(i){case"E":case"EE":case"EEE":return s.day(e,{width:"abbreviated",context:"formatting"})||s.day(e,{width:"short",context:"formatting"})||s.day(e,{width:"narrow",context:"formatting"});case"EEEEE":return s.day(e,{width:"narrow",context:"formatting"});case"EEEEEE":return s.day(e,{width:"short",context:"formatting"})||s.day(e,{width:"narrow",context:"formatting"});case"EEEE":default:return s.day(e,{width:"wide",context:"formatting"})||s.day(e,{width:"abbreviated",context:"formatting"})||s.day(e,{width:"short",context:"formatting"})||s.day(e,{width:"narrow",context:"formatting"})}}validate(e,i){return i>=0&&i<=6}set(e,i,s,r){return e=en(e,s,r),e.setHours(0,0,0,0),e}};var Eo=class extends Z{constructor(){super(...arguments);k(this,"priority",90);k(this,"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","E","i","c","t","T"])}parse(e,i,s,r){let a=h=>{let c=Math.floor((h-1)/7)*7;return(h+r.weekStartsOn+6)%7+c};switch(i){case"e":case"ee":return _t(Q(i.length,e),a);case"eo":return _t(s.ordinalNumber(e,{unit:"day"}),a);case"eee":return s.day(e,{width:"abbreviated",context:"formatting"})||s.day(e,{width:"short",context:"formatting"})||s.day(e,{width:"narrow",context:"formatting"});case"eeeee":return s.day(e,{width:"narrow",context:"formatting"});case"eeeeee":return s.day(e,{width:"short",context:"formatting"})||s.day(e,{width:"narrow",context:"formatting"});case"eeee":default:return s.day(e,{width:"wide",context:"formatting"})||s.day(e,{width:"abbreviated",context:"formatting"})||s.day(e,{width:"short",context:"formatting"})||s.day(e,{width:"narrow",context:"formatting"})}}validate(e,i){return i>=0&&i<=6}set(e,i,s,r){return e=en(e,s,r),e.setHours(0,0,0,0),e}};var zo=class extends Z{constructor(){super(...arguments);k(this,"priority",90);k(this,"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","E","i","e","t","T"])}parse(e,i,s,r){let a=h=>{let c=Math.floor((h-1)/7)*7;return(h+r.weekStartsOn+6)%7+c};switch(i){case"c":case"cc":return _t(Q(i.length,e),a);case"co":return _t(s.ordinalNumber(e,{unit:"day"}),a);case"ccc":return s.day(e,{width:"abbreviated",context:"standalone"})||s.day(e,{width:"short",context:"standalone"})||s.day(e,{width:"narrow",context:"standalone"});case"ccccc":return s.day(e,{width:"narrow",context:"standalone"});case"cccccc":return s.day(e,{width:"short",context:"standalone"})||s.day(e,{width:"narrow",context:"standalone"});case"cccc":default:return s.day(e,{width:"wide",context:"standalone"})||s.day(e,{width:"abbreviated",context:"standalone"})||s.day(e,{width:"short",context:"standalone"})||s.day(e,{width:"narrow",context:"standalone"})}}validate(e,i){return i>=0&&i<=6}set(e,i,s,r){return e=en(e,s,r),e.setHours(0,0,0,0),e}};function gd(n,t,e){let i=F(n,e==null?void 0:e.in),s=dd(i,e),r=t-s;return Ge(i,r,e)}var Ro=class extends Z{constructor(){super(...arguments);k(this,"priority",90);k(this,"incompatibleTokens",["y","Y","u","q","Q","M","L","w","d","D","E","e","c","t","T"])}parse(e,i,s){let r=a=>a===0?7:a;switch(i){case"i":case"ii":return Q(i.length,e);case"io":return s.ordinalNumber(e,{unit:"day"});case"iii":return _t(s.day(e,{width:"abbreviated",context:"formatting"})||s.day(e,{width:"short",context:"formatting"})||s.day(e,{width:"narrow",context:"formatting"}),r);case"iiiii":return _t(s.day(e,{width:"narrow",context:"formatting"}),r);case"iiiiii":return _t(s.day(e,{width:"short",context:"formatting"})||s.day(e,{width:"narrow",context:"formatting"}),r);case"iiii":default:return _t(s.day(e,{width:"wide",context:"formatting"})||s.day(e,{width:"abbreviated",context:"formatting"})||s.day(e,{width:"short",context:"formatting"})||s.day(e,{width:"narrow",context:"formatting"}),r)}}validate(e,i){return i>=1&&i<=7}set(e,i,s){return e=gd(e,s),e.setHours(0,0,0,0),e}};var Bo=class extends Z{constructor(){super(...arguments);k(this,"priority",80);k(this,"incompatibleTokens",["b","B","H","k","t","T"])}parse(e,i,s){switch(i){case"a":case"aa":case"aaa":return s.dayPeriod(e,{width:"abbreviated",context:"formatting"})||s.dayPeriod(e,{width:"narrow",context:"formatting"});case"aaaaa":return s.dayPeriod(e,{width:"narrow",context:"formatting"});case"aaaa":default:return s.dayPeriod(e,{width:"wide",context:"formatting"})||s.dayPeriod(e,{width:"abbreviated",context:"formatting"})||s.dayPeriod(e,{width:"narrow",context:"formatting"})}}set(e,i,s){return e.setHours(tn(s),0,0,0),e}};var Fo=class extends Z{constructor(){super(...arguments);k(this,"priority",80);k(this,"incompatibleTokens",["a","B","H","k","t","T"])}parse(e,i,s){switch(i){case"b":case"bb":case"bbb":return s.dayPeriod(e,{width:"abbreviated",context:"formatting"})||s.dayPeriod(e,{width:"narrow",context:"formatting"});case"bbbbb":return s.dayPeriod(e,{width:"narrow",context:"formatting"});case"bbbb":default:return s.dayPeriod(e,{width:"wide",context:"formatting"})||s.dayPeriod(e,{width:"abbreviated",context:"formatting"})||s.dayPeriod(e,{width:"narrow",context:"formatting"})}}set(e,i,s){return e.setHours(tn(s),0,0,0),e}};var No=class extends Z{constructor(){super(...arguments);k(this,"priority",80);k(this,"incompatibleTokens",["a","b","t","T"])}parse(e,i,s){switch(i){case"B":case"BB":case"BBB":return s.dayPeriod(e,{width:"abbreviated",context:"formatting"})||s.dayPeriod(e,{width:"narrow",context:"formatting"});case"BBBBB":return s.dayPeriod(e,{width:"narrow",context:"formatting"});case"BBBB":default:return s.dayPeriod(e,{width:"wide",context:"formatting"})||s.dayPeriod(e,{width:"abbreviated",context:"formatting"})||s.dayPeriod(e,{width:"narrow",context:"formatting"})}}set(e,i,s){return e.setHours(tn(s),0,0,0),e}};var Wo=class extends Z{constructor(){super(...arguments);k(this,"priority",70);k(this,"incompatibleTokens",["H","K","k","t","T"])}parse(e,i,s){switch(i){case"h":return at(ct.hour12h,e);case"ho":return s.ordinalNumber(e,{unit:"hour"});default:return Q(i.length,e)}}validate(e,i){return i>=1&&i<=12}set(e,i,s){let r=e.getHours()>=12;return r&&s<12?e.setHours(s+12,0,0,0):!r&&s===12?e.setHours(0,0,0,0):e.setHours(s,0,0,0),e}};var Ho=class extends Z{constructor(){super(...arguments);k(this,"priority",70);k(this,"incompatibleTokens",["a","b","h","K","k","t","T"])}parse(e,i,s){switch(i){case"H":return at(ct.hour23h,e);case"Ho":return s.ordinalNumber(e,{unit:"hour"});default:return Q(i.length,e)}}validate(e,i){return i>=0&&i<=23}set(e,i,s){return e.setHours(s,0,0,0),e}};var Zo=class extends Z{constructor(){super(...arguments);k(this,"priority",70);k(this,"incompatibleTokens",["h","H","k","t","T"])}parse(e,i,s){switch(i){case"K":return at(ct.hour11h,e);case"Ko":return s.ordinalNumber(e,{unit:"hour"});default:return Q(i.length,e)}}validate(e,i){return i>=0&&i<=11}set(e,i,s){return e.getHours()>=12&&s<12?e.setHours(s+12,0,0,0):e.setHours(s,0,0,0),e}};var Vo=class extends Z{constructor(){super(...arguments);k(this,"priority",70);k(this,"incompatibleTokens",["a","b","h","H","K","t","T"])}parse(e,i,s){switch(i){case"k":return at(ct.hour24h,e);case"ko":return s.ordinalNumber(e,{unit:"hour"});default:return Q(i.length,e)}}validate(e,i){return i>=1&&i<=24}set(e,i,s){let r=s<=24?s%24:s;return e.setHours(r,0,0,0),e}};var Yo=class extends Z{constructor(){super(...arguments);k(this,"priority",60);k(this,"incompatibleTokens",["t","T"])}parse(e,i,s){switch(i){case"m":return at(ct.minute,e);case"mo":return s.ordinalNumber(e,{unit:"minute"});default:return Q(i.length,e)}}validate(e,i){return i>=0&&i<=59}set(e,i,s){return e.setMinutes(s,0,0),e}};var jo=class extends Z{constructor(){super(...arguments);k(this,"priority",50);k(this,"incompatibleTokens",["t","T"])}parse(e,i,s){switch(i){case"s":return at(ct.second,e);case"so":return s.ordinalNumber(e,{unit:"second"});default:return Q(i.length,e)}}validate(e,i){return i>=0&&i<=59}set(e,i,s){return e.setSeconds(s,0),e}};var Uo=class extends Z{constructor(){super(...arguments);k(this,"priority",30);k(this,"incompatibleTokens",["t","T"])}parse(e,i){let s=r=>Math.trunc(r*Math.pow(10,-i.length+3));return _t(Q(i.length,e),s)}set(e,i,s){return e.setMilliseconds(s),e}};var Go=class extends Z{constructor(){super(...arguments);k(this,"priority",10);k(this,"incompatibleTokens",["t","T","x"])}parse(e,i){switch(i){case"X":return se(ne.basicOptionalMinutes,e);case"XX":return se(ne.basic,e);case"XXXX":return se(ne.basicOptionalSeconds,e);case"XXXXX":return se(ne.extendedOptionalSeconds,e);case"XXX":default:return se(ne.extended,e)}}set(e,i,s){return i.timestampIsSet?e:tt(e,e.getTime()-ui(e)-s)}};var qo=class extends Z{constructor(){super(...arguments);k(this,"priority",10);k(this,"incompatibleTokens",["t","T","X"])}parse(e,i){switch(i){case"x":return se(ne.basicOptionalMinutes,e);case"xx":return se(ne.basic,e);case"xxxx":return se(ne.basicOptionalSeconds,e);case"xxxxx":return se(ne.extendedOptionalSeconds,e);case"xxx":default:return se(ne.extended,e)}}set(e,i,s){return i.timestampIsSet?e:tt(e,e.getTime()-ui(e)-s)}};var Xo=class extends Z{constructor(){super(...arguments);k(this,"priority",40);k(this,"incompatibleTokens","*")}parse(e){return yo(e)}set(e,i,s){return[tt(e,s*1e3),{timestampIsSet:!0}]}};var $o=class extends Z{constructor(){super(...arguments);k(this,"priority",20);k(this,"incompatibleTokens","*")}parse(e){return yo(e)}set(e,i,s){return[tt(e,s),{timestampIsSet:!0}]}};var _d={G:new _o,y:new bo,Y:new wo,R:new Mo,u:new Lo,Q:new Po,q:new ko,M:new To,L:new Co,w:new So,I:new Oo,d:new Do,D:new Io,E:new Ao,e:new Eo,c:new zo,i:new Ro,a:new Bo,b:new Fo,B:new No,h:new Wo,H:new Ho,K:new Zo,k:new Vo,m:new Yo,s:new jo,S:new Uo,X:new Go,x:new qo,t:new Xo,T:new $o};var Sv=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,Ov=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,Dv=/^'([^]*?)'?$/,Iv=/''/g,Av=/\S/,Ev=/[a-zA-Z]/;function yd(n,t,e,i){var w,P,C,O,I,D,z,R,B,N,j,q,Y,nt,lt,st,W,yt;let s=()=>tt((i==null?void 0:i.in)||e,NaN),r=ud(),a=(P=(w=i==null?void 0:i.locale)!=null?w:r.locale)!=null?P:Yn,h=(N=(B=(D=(I=i==null?void 0:i.firstWeekContainsDate)!=null?I:(O=(C=i==null?void 0:i.locale)==null?void 0:C.options)==null?void 0:O.firstWeekContainsDate)!=null?D:r.firstWeekContainsDate)!=null?B:(R=(z=r.locale)==null?void 0:z.options)==null?void 0:R.firstWeekContainsDate)!=null?N:1,c=(yt=(W=(nt=(Y=i==null?void 0:i.weekStartsOn)!=null?Y:(q=(j=i==null?void 0:i.locale)==null?void 0:j.options)==null?void 0:q.weekStartsOn)!=null?nt:r.weekStartsOn)!=null?W:(st=(lt=r.locale)==null?void 0:lt.options)==null?void 0:st.weekStartsOn)!=null?yt:0;if(!t)return n?s():F(e,i==null?void 0:i.in);let d={firstWeekContainsDate:h,weekStartsOn:c,locale:a},f=[new go(i==null?void 0:i.in,e)],m=t.match(Ov).map(E=>{let V=E[0];if(V in jn){let dt=jn[V];return dt(E,a.formatLong)}return E}).join("").match(Sv),_=[];for(let E of m){!(i!=null&&i.useAdditionalWeekYearTokens)&&fo(E)&&Un(E,t,n),!(i!=null&&i.useAdditionalDayOfYearTokens)&&uo(E)&&Un(E,t,n);let V=E[0],dt=_d[V];if(dt){let{incompatibleTokens:kt}=dt;if(Array.isArray(kt)){let ot=_.find(X=>kt.includes(X.token)||X.token===V);if(ot)throw new RangeError(`The format string mustn't contain \`${ot.fullToken}\` and \`${E}\` at the same time`)}else if(dt.incompatibleTokens==="*"&&_.length>0)throw new RangeError(`The format string mustn't contain \`${E}\` and any other token at the same time`);_.push({token:V,fullToken:E});let pt=dt.run(n,E,a.match,d);if(!pt)return s();f.push(pt.setter),n=pt.rest}else{if(V.match(Ev))throw new RangeError("Format string contains an unescaped latin alphabet character `"+V+"`");if(E==="''"?E="'":V==="'"&&(E=zv(E)),n.indexOf(E)===0)n=n.slice(E.length);else return s()}}if(n.length>0&&Av.test(n))return s();let y=f.map(E=>E.priority).sort((E,V)=>V-E).filter((E,V,dt)=>dt.indexOf(E)===V).map(E=>f.filter(V=>V.priority===E).sort((V,dt)=>dt.subPriority-V.subPriority)).map(E=>E[0]),x=F(e,i==null?void 0:i.in);if(isNaN(+x))return s();let b={};for(let E of y){if(!E.validate(x,d))return s();let V=E.set(x,b,d);Array.isArray(V)?(x=V[0],Object.assign(b,V[1])):x=V}return x}function zv(n){return n.match(Dv)[1].replace(Iv,"'")}function vd(n,t){let e=F(n,t==null?void 0:t.in);return e.setMinutes(0,0,0),e}function xd(n,t){let e=F(n,t==null?void 0:t.in);return e.setSeconds(0,0),e}function bd(n,t){let e=F(n,t==null?void 0:t.in);return e.setMilliseconds(0),e}function wd(n,t){var d;let e=()=>tt(t==null?void 0:t.in,NaN),i=(d=t==null?void 0:t.additionalDigits)!=null?d:2,s=Nv(n),r;if(s.date){let f=Wv(s.date,i);r=Hv(f.restDateString,f.year)}if(!r||isNaN(+r))return e();let a=+r,h=0,c;if(s.time&&(h=Zv(s.time),isNaN(h)))return e();if(s.timezone){if(c=Vv(s.timezone),isNaN(c))return e()}else{let f=new Date(a+h),m=F(0,t==null?void 0:t.in);return m.setFullYear(f.getUTCFullYear(),f.getUTCMonth(),f.getUTCDate()),m.setHours(f.getUTCHours(),f.getUTCMinutes(),f.getUTCSeconds(),f.getUTCMilliseconds()),m}return F(a+h+c,t==null?void 0:t.in)}var Ko={dateTimeDelimiter:/[T ]/,timeZoneDelimiter:/[Z ]/i,timezone:/([Z+-].*)$/},Rv=/^-?(?:(\d{3})|(\d{2})(?:-?(\d{2}))?|W(\d{2})(?:-?(\d{1}))?|)$/,Bv=/^(\d{2}(?:[.,]\d*)?)(?::?(\d{2}(?:[.,]\d*)?))?(?::?(\d{2}(?:[.,]\d*)?))?$/,Fv=/^([+-])(\d{2})(?::?(\d{2}))?$/;function Nv(n){let t={},e=n.split(Ko.dateTimeDelimiter),i;if(e.length>2)return t;if(/:/.test(e[0])?i=e[0]:(t.date=e[0],i=e[1],Ko.timeZoneDelimiter.test(t.date)&&(t.date=n.split(Ko.timeZoneDelimiter)[0],i=n.substr(t.date.length,n.length))),i){let s=Ko.timezone.exec(i);s?(t.time=i.replace(s[1],""),t.timezone=s[1]):t.time=i}return t}function Wv(n,t){let e=new RegExp("^(?:(\\d{4}|[+-]\\d{"+(4+t)+"})|(\\d{2}|[+-]\\d{"+(2+t)+"})$)"),i=n.match(e);if(!i)return{year:NaN,restDateString:""};let s=i[1]?parseInt(i[1]):null,r=i[2]?parseInt(i[2]):null;return{year:r===null?s:r*100,restDateString:n.slice((i[1]||i[2]).length)}}function Hv(n,t){if(t===null)return new Date(NaN);let e=n.match(Rv);if(!e)return new Date(NaN);let i=!!e[4],s=Gn(e[1]),r=Gn(e[2])-1,a=Gn(e[3]),h=Gn(e[4]),c=Gn(e[5])-1;if(i)return qv(t,h,c)?Yv(t,h,c):new Date(NaN);{let d=new Date(0);return!Uv(t,r,a)||!Gv(t,s)?new Date(NaN):(d.setUTCFullYear(t,r,Math.max(s,a)),d)}}function Gn(n){return n?parseInt(n):1}function Zv(n){let t=n.match(Bv);if(!t)return NaN;let e=Ga(t[1]),i=Ga(t[2]),s=Ga(t[3]);return Xv(e,i,s)?e*Ee+i*Ae+s*1e3:NaN}function Ga(n){return n&&parseFloat(n.replace(",","."))||0}function Vv(n){if(n==="Z")return 0;let t=n.match(Fv);if(!t)return 0;let e=t[1]==="+"?-1:1,i=parseInt(t[2]),s=t[3]&&parseInt(t[3])||0;return $v(i,s)?e*(i*Ee+s*Ae):NaN}function Yv(n,t,e){let i=new Date(0);i.setUTCFullYear(n,0,4);let s=i.getUTCDay()||7,r=(t-1)*7+e+1-s;return i.setUTCDate(i.getUTCDate()+r),i}var jv=[31,null,31,30,31,30,31,31,30,31,30,31];function Md(n){return n%400===0||n%4===0&&n%100!==0}function Uv(n,t,e){return t>=0&&t<=11&&e>=1&&e<=(jv[t]||(Md(n)?29:28))}function Gv(n,t){return t>=1&&t<=(Md(n)?366:365)}function qv(n,t,e){return t>=1&&t<=53&&e>=0&&e<=6}function Xv(n,t,e){return n===24?t===0&&e===0:e>=0&&e<60&&t>=0&&t<60&&n>=0&&n<25}function $v(n,t){return t>=0&&t<=59}var Kv={datetime:"MMM d, yyyy, h:mm:ss aaaa",millisecond:"h:mm:ss.SSS aaaa",second:"h:mm:ss aaaa",minute:"h:mm aaaa",hour:"ha",day:"MMM d",week:"PP",month:"MMM yyyy",quarter:"qqq - yyyy",year:"yyyy"};Ya._date.override({_id:"date-fns",formats:function(){return Kv},parse:function(n,t){if(n===null||typeof n=="undefined")return null;let e=typeof n;return e==="number"||n instanceof Date?n=F(n):e==="string"&&(typeof t=="string"?n=yd(n,t,new Date,this.options):n=wd(n,this.options)),io(n)?n.getTime():null},format:function(n,t){return cd(n,t,this.options)},add:function(n,t,e){switch(e){case"millisecond":return Gi(n,t);case"second":return Ou(n,t);case"minute":return Cu(n,t);case"hour":return ku(n,t);case"day":return Ge(n,t);case"week":return Du(n,t);case"month":return Ui(n,t);case"quarter":return Su(n,t);case"year":return Iu(n,t);default:return n}},diff:function(n,t,e){switch(e){case"millisecond":return qi(n,t);case"second":return Hu(n,t);case"minute":return Fu(n,t);case"hour":return Bu(n,t);case"day":return no(n,t);case"week":return Zu(n,t);case"month":return ro(n,t);case"quarter":return Wu(n,t);case"year":return Vu(n,t);default:return 0}},startOf:function(n,t,e){switch(t){case"second":return bd(n);case"minute":return xd(n);case"hour":return vd(n);case"day":return Vn(n);case"week":return Ft(n);case"isoWeek":return Ft(n,{weekStartsOn:+e});case"month":return ju(n);case"quarter":return Yu(n);case"year":return ao(n);default:return n}},endOf:function(n,t){switch(t){case"second":return Ku(n);case"minute":return Xu(n);case"hour":return Gu(n);case"day":return so(n);case"week":return qu(n);case"month":return oo(n);case"quarter":return $u(n);case"year":return Uu(n);default:return n}}});var kd=Rr(Pd());window.L=Qv;window.Chart=wu;window.topbar=kd.default;})();
/*! Bundled license information:
leaflet/dist/leaflet-src.js:
(* @preserve
* Leaflet 1.9.4, a JS library for interactive maps. https://leafletjs.com
* (c) 2010-2023 Vladimir Agafonkin, (c) 2010-2011 CloudMade
*)
topbar/topbar.min.js:
(**
* @license MIT
* topbar 3.0.0
* http://buunguyen.github.io/topbar
* Copyright (c) 2024 Buu Nguyen
*)
@kurkle/color/dist/color.esm.js:
(*!
* @kurkle/color v0.3.4
* https://github.com/kurkle/color#readme
* (c) 2024 Jukka Kurkela
* Released under the MIT License
*)
chart.js/dist/chunks/helpers.dataset.js:
(*!
* Chart.js v4.5.0
* https://www.chartjs.org
* (c) 2025 Chart.js Contributors
* Released under the MIT License
*)
chart.js/dist/chart.js:
(*!
* Chart.js v4.5.0
* https://www.chartjs.org
* (c) 2025 Chart.js Contributors
* Released under the MIT License
*)
chartjs-adapter-date-fns/dist/chartjs-adapter-date-fns.esm.js:
(*!
* chartjs-adapter-date-fns v3.0.0
* https://www.chartjs.org
* (c) 2022 chartjs-adapter-date-fns Contributors
* Released under the MIT license
*)
*/