@dartcom/ui-kit 10.3.3 → 10.3.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.esm.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import*as e from"react";import t,{forwardRef as n,useRef as i,useCallback as r,useEffect as s,createElement as o,cloneElement as a,useMemo as l,useLayoutEffect as u,Component as c,useContext as h,isValidElement as d,memo as f,useState as p,createContext as m,useReducer as _,use as g,useImperativeHandle as y}from"react";import v,{createPortal as b,unstable_batchedUpdates as x}from"react-dom";import{jsx as w,jsxs as E}from"react/jsx-runtime";import A from"axios";import{LocalizationProvider as T}from"@mui/x-date-pickers";import{AdapterDateFns as S}from"@mui/x-date-pickers/AdapterDateFns";import{CircularProgress as k,Typography as O,Box as P,Accordion as C,AccordionSummary as R,AccordionDetails as M,Button as N,Tooltip as z,IconButton as D,Slide as I,Dialog as F,DialogTitle as j,DialogContent as B,DialogContentText as U,DialogActions as V,styled as G,Divider as $,useTheme as Z,TextField as q,List as W,ListItem as H,Portal as K,Autocomplete as Y,Tab as X}from"@mui/material";import{createTheme as J,ThemeProvider as Q,styled as ee}from"@mui/material/styles";import te from"@mui/icons-material/ArrowDownward";import ne from"@mui/material/IconButton";import ie from"@mui/icons-material/Delete";import re from"@mui/icons-material/Edit";import se from"@mui/icons-material/Moving";import oe from"@mui/icons-material/RestartAlt";import ae from"@mui/icons-material/Save";import le from"@mui/icons-material/CloudUpload";import ue from"@mui/material/Checkbox";import ce from"@mui/material/FormControlLabel";import he from"@mui/material/Typography";import{DateField as de}from"@mui/x-date-pickers/DateField";import fe from"@mui/material/Box";import pe from"@mui/material/Modal";import{TabContext as me,TabList as _e,TabPanel as ge}from"@mui/lab";function ye(e,t){return t.forEach(function(t){t&&"string"!=typeof t&&!Array.isArray(t)&&Object.keys(t).forEach(function(n){if("default"!==n&&!(n in e)){var i=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(e,n,i.get?i:{enumerable:!0,get:function(){return t[n]}})}})}),Object.freeze(e)}var ve;!function(e){e.CREATE="create",e.UPDATE="update",e.DELETE="delete"}(ve||(ve={}));const be={valid:"18c38ab326d12f428e90be50a5141fc8949de497df7f7e0c1796d58e99d006f3",dateExpired:"8cbc5e15e61e649daf57c3a08422ae372c101afb4759036a3864a9fa588ef717",off:"b1520018920b33a4c1f8100c4f3bb3eb93661db829faa99c9cd75537f6300ba9",invalid:"abcdefghijklmnopqrstuvwxyz0123456789"};function xe(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var we,Ee;var Ae,Te=(Ee||(Ee=1,we=function(){const e=["a","b","c","d","e","f","0","1","2","3","4","5","6","7","8","9"];let t=[];for(let n=0;n<36;n++)t[n]=8===n||13===n||18===n||23===n?"-":e[Math.ceil(Math.random()*e.length-1)];return t.join("")}),we),Se=xe(Te),ke={exports:{}};function Oe(){return Ae||(Ae=1,function(e){var t="1.9.4";function n(e){var t,n,i,r;for(n=1,i=arguments.length;n<i;n++)for(t in r=arguments[n])e[t]=r[t];return e}var i=Object.create||function(){function e(){}return function(t){return e.prototype=t,new e}}();function r(e,t){var n=Array.prototype.slice;if(e.bind)return e.bind.apply(e,n.call(arguments,1));var i=n.call(arguments,2);return function(){return e.apply(t,i.length?i.concat(n.call(arguments)):arguments)}}var s=0;function o(e){return"_leaflet_id"in e||(e._leaflet_id=++s),e._leaflet_id}function a(e,t,n){var i,r,s,o;return o=function(){i=!1,r&&(s.apply(n,r),r=!1)},s=function(){i?r=arguments:(e.apply(n,arguments),setTimeout(o,t),i=!0)},s}function l(e,t,n){var i=t[1],r=t[0],s=i-r;return e===i&&n?e:((e-r)%s+s)%s+r}function u(){return!1}function c(e,t){if(!1===t)return e;var n=Math.pow(10,void 0===t?6:t);return Math.round(e*n)/n}function h(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}function d(e){return h(e).split(/\s+/)}function f(e,t){for(var n in Object.prototype.hasOwnProperty.call(e,"options")||(e.options=e.options?i(e.options):{}),t)e.options[n]=t[n];return e.options}function p(e,t,n){var i=[];for(var r in e)i.push(encodeURIComponent(n?r.toUpperCase():r)+"="+encodeURIComponent(e[r]));return(t&&-1!==t.indexOf("?")?"&":"?")+i.join("&")}var m=/\{ *([\w_ -]+) *\}/g;function _(e,t){return e.replace(m,function(e,n){var i=t[n];if(void 0===i)throw new Error("No value provided for variable "+e);return"function"==typeof i&&(i=i(t)),i})}var g=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)};function y(e,t){for(var n=0;n<e.length;n++)if(e[n]===t)return n;return-1}var v="data:image/gif;base64,R0lGODlhAQABAAD/ACwAAAAAAQABAAACADs=";function b(e){return window["webkit"+e]||window["moz"+e]||window["ms"+e]}var x=0;function w(e){var t=+new Date,n=Math.max(0,16-(t-x));return x=t+n,window.setTimeout(e,n)}var E=window.requestAnimationFrame||b("RequestAnimationFrame")||w,A=window.cancelAnimationFrame||b("CancelAnimationFrame")||b("CancelRequestAnimationFrame")||function(e){window.clearTimeout(e)};function T(e,t,n){if(!n||E!==w)return E.call(window,r(e,t));e.call(t)}function S(e){e&&A.call(window,e)}var k={__proto__:null,extend:n,create:i,bind:r,get lastId(){return s},stamp:o,throttle:a,wrapNum:l,falseFn:u,formatNum:c,trim:h,splitWords:d,setOptions:f,getParamString:p,template:_,isArray:g,indexOf:y,emptyImageUrl:v,requestFn:E,cancelFn:A,requestAnimFrame:T,cancelAnimFrame:S};function O(){}function P(e){if("undefined"!=typeof L&&L&&L.Mixin){e=g(e)?e:[e];for(var t=0;t<e.length;t++)e[t]===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)}}O.extend=function(e){var t=function(){f(this),this.initialize&&this.initialize.apply(this,arguments),this.callInitHooks()},r=t.__super__=this.prototype,s=i(r);for(var o in s.constructor=t,t.prototype=s,this)Object.prototype.hasOwnProperty.call(this,o)&&"prototype"!==o&&"__super__"!==o&&(t[o]=this[o]);return e.statics&&n(t,e.statics),e.includes&&(P(e.includes),n.apply(null,[s].concat(e.includes))),n(s,e),delete s.statics,delete s.includes,s.options&&(s.options=r.options?i(r.options):{},n(s.options,e.options)),s._initHooks=[],s.callInitHooks=function(){if(!this._initHooksCalled){r.callInitHooks&&r.callInitHooks.call(this),this._initHooksCalled=!0;for(var e=0,t=s._initHooks.length;e<t;e++)s._initHooks[e].call(this)}},t},O.include=function(e){var t=this.prototype.options;return n(this.prototype,e),e.options&&(this.prototype.options=t,this.mergeOptions(e.options)),this},O.mergeOptions=function(e){return n(this.prototype.options,e),this},O.addInitHook=function(e){var t=Array.prototype.slice.call(arguments,1),n="function"==typeof e?e:function(){this[e].apply(this,t)};return this.prototype._initHooks=this.prototype._initHooks||[],this.prototype._initHooks.push(n),this};var C={on:function(e,t,n){if("object"==typeof e)for(var i in e)this._on(i,e[i],t);else for(var r=0,s=(e=d(e)).length;r<s;r++)this._on(e[r],t,n);return this},off:function(e,t,n){if(arguments.length)if("object"==typeof e)for(var i in e)this._off(i,e[i],t);else{e=d(e);for(var r=1===arguments.length,s=0,o=e.length;s<o;s++)r?this._off(e[s]):this._off(e[s],t,n)}else delete this._events;return this},_on:function(e,t,n,i){if("function"==typeof t){if(!1===this._listens(e,t,n)){n===this&&(n=void 0);var r={fn:t,ctx:n};i&&(r.once=!0),this._events=this._events||{},this._events[e]=this._events[e]||[],this._events[e].push(r)}}else console.warn("wrong listener type: "+typeof t)},_off:function(e,t,n){var i,r,s;if(this._events&&(i=this._events[e]))if(1!==arguments.length)if("function"==typeof t){var o=this._listens(e,t,n);if(!1!==o){var a=i[o];this._firingCount&&(a.fn=u,this._events[e]=i=i.slice()),i.splice(o,1)}}else console.warn("wrong listener type: "+typeof t);else{if(this._firingCount)for(r=0,s=i.length;r<s;r++)i[r].fn=u;delete this._events[e]}},fire:function(e,t,i){if(!this.listens(e,i))return this;var r=n({},t,{type:e,target:this,sourceTarget:t&&t.sourceTarget||this});if(this._events){var s=this._events[e];if(s){this._firingCount=this._firingCount+1||1;for(var o=0,a=s.length;o<a;o++){var l=s[o],u=l.fn;l.once&&this.off(e,u,l.ctx),u.call(l.ctx||this,r)}this._firingCount--}}return i&&this._propagateEvent(r),this},listens:function(e,t,n,i){"string"!=typeof e&&console.warn('"string" type argument expected');var r=t;"function"!=typeof t&&(i=!!t,r=void 0,n=void 0);var s=this._events&&this._events[e];if(s&&s.length&&!1!==this._listens(e,r,n))return!0;if(i)for(var o in this._eventParents)if(this._eventParents[o].listens(e,t,n,i))return!0;return!1},_listens:function(e,t,n){if(!this._events)return!1;var i=this._events[e]||[];if(!t)return!!i.length;n===this&&(n=void 0);for(var r=0,s=i.length;r<s;r++)if(i[r].fn===t&&i[r].ctx===n)return r;return!1},once:function(e,t,n){if("object"==typeof e)for(var i in e)this._on(i,e[i],t,!0);else for(var r=0,s=(e=d(e)).length;r<s;r++)this._on(e[r],t,n,!0);return this},addEventParent:function(e){return this._eventParents=this._eventParents||{},this._eventParents[o(e)]=e,this},removeEventParent:function(e){return this._eventParents&&delete this._eventParents[o(e)],this},_propagateEvent:function(e){for(var t in this._eventParents)this._eventParents[t].fire(e.type,n({layer:e.target,propagatedFrom:e.target},e),!0)}};C.addEventListener=C.on,C.removeEventListener=C.clearAllEventListeners=C.off,C.addOneTimeEventListener=C.once,C.fireEvent=C.fire,C.hasEventListeners=C.listens;var R=O.extend(C);function M(e,t,n){this.x=n?Math.round(e):e,this.y=n?Math.round(t):t}var N=Math.trunc||function(e){return e>0?Math.floor(e):Math.ceil(e)};function z(e,t,n){return e instanceof M?e:g(e)?new M(e[0],e[1]):null==e?e:"object"==typeof e&&"x"in e&&"y"in e?new M(e.x,e.y):new M(e,t,n)}function D(e,t){if(e)for(var n=t?[e,t]:e,i=0,r=n.length;i<r;i++)this.extend(n[i])}function I(e,t){return!e||e instanceof D?e:new D(e,t)}function F(e,t){if(e)for(var n=t?[e,t]:e,i=0,r=n.length;i<r;i++)this.extend(n[i])}function j(e,t){return e instanceof F?e:new F(e,t)}function B(e,t,n){if(isNaN(e)||isNaN(t))throw new Error("Invalid LatLng object: ("+e+", "+t+")");this.lat=+e,this.lng=+t,void 0!==n&&(this.alt=+n)}function U(e,t,n){return e instanceof B?e:g(e)&&"object"!=typeof e[0]?3===e.length?new B(e[0],e[1],e[2]):2===e.length?new B(e[0],e[1]):null:null==e?e:"object"==typeof e&&"lat"in e?new B(e.lat,"lng"in e?e.lng:e.lon,e.alt):void 0===t?null:new B(e,t,n)}M.prototype={clone:function(){return new M(this.x,this.y)},add:function(e){return this.clone()._add(z(e))},_add:function(e){return this.x+=e.x,this.y+=e.y,this},subtract:function(e){return this.clone()._subtract(z(e))},_subtract:function(e){return this.x-=e.x,this.y-=e.y,this},divideBy:function(e){return this.clone()._divideBy(e)},_divideBy:function(e){return this.x/=e,this.y/=e,this},multiplyBy:function(e){return this.clone()._multiplyBy(e)},_multiplyBy:function(e){return this.x*=e,this.y*=e,this},scaleBy:function(e){return new M(this.x*e.x,this.y*e.y)},unscaleBy:function(e){return new M(this.x/e.x,this.y/e.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=N(this.x),this.y=N(this.y),this},distanceTo:function(e){var t=(e=z(e)).x-this.x,n=e.y-this.y;return Math.sqrt(t*t+n*n)},equals:function(e){return(e=z(e)).x===this.x&&e.y===this.y},contains:function(e){return e=z(e),Math.abs(e.x)<=Math.abs(this.x)&&Math.abs(e.y)<=Math.abs(this.y)},toString:function(){return"Point("+c(this.x)+", "+c(this.y)+")"}},D.prototype={extend:function(e){var t,n;if(!e)return this;if(e instanceof M||"number"==typeof e[0]||"x"in e)t=n=z(e);else if(t=(e=I(e)).min,n=e.max,!t||!n)return this;return this.min||this.max?(this.min.x=Math.min(t.x,this.min.x),this.max.x=Math.max(n.x,this.max.x),this.min.y=Math.min(t.y,this.min.y),this.max.y=Math.max(n.y,this.max.y)):(this.min=t.clone(),this.max=n.clone()),this},getCenter:function(e){return z((this.min.x+this.max.x)/2,(this.min.y+this.max.y)/2,e)},getBottomLeft:function(){return z(this.min.x,this.max.y)},getTopRight:function(){return z(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(e){var t,n;return(e="number"==typeof e[0]||e instanceof M?z(e):I(e))instanceof D?(t=e.min,n=e.max):t=n=e,t.x>=this.min.x&&n.x<=this.max.x&&t.y>=this.min.y&&n.y<=this.max.y},intersects:function(e){e=I(e);var t=this.min,n=this.max,i=e.min,r=e.max,s=r.x>=t.x&&i.x<=n.x,o=r.y>=t.y&&i.y<=n.y;return s&&o},overlaps:function(e){e=I(e);var t=this.min,n=this.max,i=e.min,r=e.max,s=r.x>t.x&&i.x<n.x,o=r.y>t.y&&i.y<n.y;return s&&o},isValid:function(){return!(!this.min||!this.max)},pad:function(e){var t=this.min,n=this.max,i=Math.abs(t.x-n.x)*e,r=Math.abs(t.y-n.y)*e;return I(z(t.x-i,t.y-r),z(n.x+i,n.y+r))},equals:function(e){return!!e&&(e=I(e),this.min.equals(e.getTopLeft())&&this.max.equals(e.getBottomRight()))}},F.prototype={extend:function(e){var t,n,i=this._southWest,r=this._northEast;if(e instanceof B)t=e,n=e;else{if(!(e instanceof F))return e?this.extend(U(e)||j(e)):this;if(t=e._southWest,n=e._northEast,!t||!n)return this}return i||r?(i.lat=Math.min(t.lat,i.lat),i.lng=Math.min(t.lng,i.lng),r.lat=Math.max(n.lat,r.lat),r.lng=Math.max(n.lng,r.lng)):(this._southWest=new B(t.lat,t.lng),this._northEast=new B(n.lat,n.lng)),this},pad:function(e){var t=this._southWest,n=this._northEast,i=Math.abs(t.lat-n.lat)*e,r=Math.abs(t.lng-n.lng)*e;return new F(new B(t.lat-i,t.lng-r),new B(n.lat+i,n.lng+r))},getCenter:function(){return new B((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 B(this.getNorth(),this.getWest())},getSouthEast:function(){return new B(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(e){e="number"==typeof e[0]||e instanceof B||"lat"in e?U(e):j(e);var t,n,i=this._southWest,r=this._northEast;return e instanceof F?(t=e.getSouthWest(),n=e.getNorthEast()):t=n=e,t.lat>=i.lat&&n.lat<=r.lat&&t.lng>=i.lng&&n.lng<=r.lng},intersects:function(e){e=j(e);var t=this._southWest,n=this._northEast,i=e.getSouthWest(),r=e.getNorthEast(),s=r.lat>=t.lat&&i.lat<=n.lat,o=r.lng>=t.lng&&i.lng<=n.lng;return s&&o},overlaps:function(e){e=j(e);var t=this._southWest,n=this._northEast,i=e.getSouthWest(),r=e.getNorthEast(),s=r.lat>t.lat&&i.lat<n.lat,o=r.lng>t.lng&&i.lng<n.lng;return s&&o},toBBoxString:function(){return[this.getWest(),this.getSouth(),this.getEast(),this.getNorth()].join(",")},equals:function(e,t){return!!e&&(e=j(e),this._southWest.equals(e.getSouthWest(),t)&&this._northEast.equals(e.getNorthEast(),t))},isValid:function(){return!(!this._southWest||!this._northEast)}},B.prototype={equals:function(e,t){return!!e&&(e=U(e),Math.max(Math.abs(this.lat-e.lat),Math.abs(this.lng-e.lng))<=(void 0===t?1e-9:t))},toString:function(e){return"LatLng("+c(this.lat,e)+", "+c(this.lng,e)+")"},distanceTo:function(e){return $.distance(this,U(e))},wrap:function(){return $.wrapLatLng(this)},toBounds:function(e){var t=180*e/40075017,n=t/Math.cos(Math.PI/180*this.lat);return j([this.lat-t,this.lng-n],[this.lat+t,this.lng+n])},clone:function(){return new B(this.lat,this.lng,this.alt)}};var V,G={latLngToPoint:function(e,t){var n=this.projection.project(e),i=this.scale(t);return this.transformation._transform(n,i)},pointToLatLng:function(e,t){var n=this.scale(t),i=this.transformation.untransform(e,n);return this.projection.unproject(i)},project:function(e){return this.projection.project(e)},unproject:function(e){return this.projection.unproject(e)},scale:function(e){return 256*Math.pow(2,e)},zoom:function(e){return Math.log(e/256)/Math.LN2},getProjectedBounds:function(e){if(this.infinite)return null;var t=this.projection.bounds,n=this.scale(e);return new D(this.transformation.transform(t.min,n),this.transformation.transform(t.max,n))},infinite:!1,wrapLatLng:function(e){var t=this.wrapLng?l(e.lng,this.wrapLng,!0):e.lng;return new B(this.wrapLat?l(e.lat,this.wrapLat,!0):e.lat,t,e.alt)},wrapLatLngBounds:function(e){var t=e.getCenter(),n=this.wrapLatLng(t),i=t.lat-n.lat,r=t.lng-n.lng;if(0===i&&0===r)return e;var s=e.getSouthWest(),o=e.getNorthEast();return new F(new B(s.lat-i,s.lng-r),new B(o.lat-i,o.lng-r))}},$=n({},G,{wrapLng:[-180,180],R:6371e3,distance:function(e,t){var n=Math.PI/180,i=e.lat*n,r=t.lat*n,s=Math.sin((t.lat-e.lat)*n/2),o=Math.sin((t.lng-e.lng)*n/2),a=s*s+Math.cos(i)*Math.cos(r)*o*o,l=2*Math.atan2(Math.sqrt(a),Math.sqrt(1-a));return this.R*l}}),Z=6378137,q={R:Z,MAX_LATITUDE:85.0511287798,project:function(e){var t=Math.PI/180,n=this.MAX_LATITUDE,i=Math.max(Math.min(n,e.lat),-n),r=Math.sin(i*t);return new M(this.R*e.lng*t,this.R*Math.log((1+r)/(1-r))/2)},unproject:function(e){var t=180/Math.PI;return new B((2*Math.atan(Math.exp(e.y/this.R))-Math.PI/2)*t,e.x*t/this.R)},bounds:(V=Z*Math.PI,new D([-V,-V],[V,V]))};function W(e,t,n,i){if(g(e))return this._a=e[0],this._b=e[1],this._c=e[2],void(this._d=e[3]);this._a=e,this._b=t,this._c=n,this._d=i}function H(e,t,n,i){return new W(e,t,n,i)}W.prototype={transform:function(e,t){return this._transform(e.clone(),t)},_transform:function(e,t){return t=t||1,e.x=t*(this._a*e.x+this._b),e.y=t*(this._c*e.y+this._d),e},untransform:function(e,t){return t=t||1,new M((e.x/t-this._b)/this._a,(e.y/t-this._d)/this._c)}};var K=n({},$,{code:"EPSG:3857",projection:q,transformation:function(){var e=.5/(Math.PI*q.R);return H(e,.5,-e,.5)}()}),Y=n({},K,{code:"EPSG:900913"});function X(e){return document.createElementNS("http://www.w3.org/2000/svg",e)}function J(e,t){var n,i,r,s,o,a,l="";for(n=0,r=e.length;n<r;n++){for(i=0,s=(o=e[n]).length;i<s;i++)l+=(i?"L":"M")+(a=o[i]).x+" "+a.y;l+=t?Fe.svg?"z":"x":""}return l||"M0 0"}var Q,ee=document.documentElement.style,te="ActiveXObject"in window,ne=te&&!document.addEventListener,ie="msLaunchUri"in navigator&&!("documentMode"in document),re=Ie("webkit"),se=Ie("android"),oe=Ie("android 2")||Ie("android 3"),ae=parseInt(/WebKit\/([0-9]+)|$/.exec(navigator.userAgent)[1],10),le=se&&Ie("Google")&&ae<537&&!("AudioNode"in window),ue=!!window.opera,ce=!ie&&Ie("chrome"),he=Ie("gecko")&&!re&&!ue&&!te,de=!ce&&Ie("safari"),fe=Ie("phantom"),pe="OTransition"in ee,me=0===navigator.platform.indexOf("Win"),_e=te&&"transition"in ee,ge="WebKitCSSMatrix"in window&&"m11"in new window.WebKitCSSMatrix&&!oe,ye="MozPerspective"in ee,ve=!window.L_DISABLE_3D&&(_e||ge||ye)&&!pe&&!fe,be="undefined"!=typeof orientation||Ie("mobile"),xe=be&&re,we=be&&ge,Ee=!window.PointerEvent&&window.MSPointerEvent,Ae=!(!window.PointerEvent&&!Ee),Te="ontouchstart"in window||!!window.TouchEvent,Se=!window.L_NO_TOUCH&&(Te||Ae),ke=be&&ue,Oe=be&&he,Pe=(window.devicePixelRatio||window.screen.deviceXDPI/window.screen.logicalXDPI)>1,Ce=function(){var e=!1;try{var t=Object.defineProperty({},"passive",{get:function(){e=!0}});window.addEventListener("testPassiveEventSupport",u,t),window.removeEventListener("testPassiveEventSupport",u,t)}catch(e){}return e}(),Re=!!document.createElement("canvas").getContext,Me=!(!document.createElementNS||!X("svg").createSVGRect),Le=!!Me&&((Q=document.createElement("div")).innerHTML="<svg/>","http://www.w3.org/2000/svg"===(Q.firstChild&&Q.firstChild.namespaceURI)),Ne=!Me&&function(){try{var e=document.createElement("div");e.innerHTML='<v:shape adj="1"/>';var t=e.firstChild;return t.style.behavior="url(#default#VML)",t&&"object"==typeof t.adj}catch(e){return!1}}(),ze=0===navigator.platform.indexOf("Mac"),De=0===navigator.platform.indexOf("Linux");function Ie(e){return navigator.userAgent.toLowerCase().indexOf(e)>=0}var Fe={ie:te,ielt9:ne,edge:ie,webkit:re,android:se,android23:oe,androidStock:le,opera:ue,chrome:ce,gecko:he,safari:de,phantom:fe,opera12:pe,win:me,ie3d:_e,webkit3d:ge,gecko3d:ye,any3d:ve,mobile:be,mobileWebkit:xe,mobileWebkit3d:we,msPointer:Ee,pointer:Ae,touch:Se,touchNative:Te,mobileOpera:ke,mobileGecko:Oe,retina:Pe,passiveEvents:Ce,canvas:Re,svg:Me,vml:Ne,inlineSvg:Le,mac:ze,linux:De},je=Fe.msPointer?"MSPointerDown":"pointerdown",Be=Fe.msPointer?"MSPointerMove":"pointermove",Ue=Fe.msPointer?"MSPointerUp":"pointerup",Ve=Fe.msPointer?"MSPointerCancel":"pointercancel",Ge={touchstart:je,touchmove:Be,touchend:Ue,touchcancel:Ve},$e={touchstart:et,touchmove:Qe,touchend:Qe,touchcancel:Qe},Ze={},qe=!1;function We(e,t,n){return"touchstart"===t&&Je(),$e[t]?(n=$e[t].bind(this,n),e.addEventListener(Ge[t],n,!1),n):(console.warn("wrong event specified:",t),u)}function He(e,t,n){Ge[t]?e.removeEventListener(Ge[t],n,!1):console.warn("wrong event specified:",t)}function Ke(e){Ze[e.pointerId]=e}function Ye(e){Ze[e.pointerId]&&(Ze[e.pointerId]=e)}function Xe(e){delete Ze[e.pointerId]}function Je(){qe||(document.addEventListener(je,Ke,!0),document.addEventListener(Be,Ye,!0),document.addEventListener(Ue,Xe,!0),document.addEventListener(Ve,Xe,!0),qe=!0)}function Qe(e,t){if(t.pointerType!==(t.MSPOINTER_TYPE_MOUSE||"mouse")){for(var n in t.touches=[],Ze)t.touches.push(Ze[n]);t.changedTouches=[t],e(t)}}function et(e,t){t.MSPOINTER_TYPE_TOUCH&&t.pointerType===t.MSPOINTER_TYPE_TOUCH&&Kt(t),Qe(e,t)}function tt(e){var t,n,i={};for(n in e)t=e[n],i[n]=t&&t.bind?t.bind(e):t;return e=i,i.type="dblclick",i.detail=2,i.isTrusted=!1,i._simulated=!0,i}var nt=200;function it(e,t){e.addEventListener("dblclick",t);var n,i=0;function r(e){if(1===e.detail){if("mouse"!==e.pointerType&&(!e.sourceCapabilities||e.sourceCapabilities.firesTouchEvents)){var r=Xt(e);if(!r.some(function(e){return e instanceof HTMLLabelElement&&e.attributes.for})||r.some(function(e){return e instanceof HTMLInputElement||e instanceof HTMLSelectElement})){var s=Date.now();s-i<=nt?2===++n&&t(tt(e)):n=1,i=s}}}else n=e.detail}return e.addEventListener("click",r),{dblclick:t,simDblclick:r}}function rt(e,t){e.removeEventListener("dblclick",t.dblclick),e.removeEventListener("click",t.simDblclick)}var st,ot,at,lt,ut,ct=kt(["transform","webkitTransform","OTransform","MozTransform","msTransform"]),ht=kt(["webkitTransition","transition","OTransition","MozTransition","msTransition"]),dt="webkitTransition"===ht||"OTransition"===ht?ht+"End":"transitionend";function ft(e){return"string"==typeof e?document.getElementById(e):e}function pt(e,t){var n=e.style[t]||e.currentStyle&&e.currentStyle[t];if((!n||"auto"===n)&&document.defaultView){var i=document.defaultView.getComputedStyle(e,null);n=i?i[t]:null}return"auto"===n?null:n}function mt(e,t,n){var i=document.createElement(e);return i.className=t||"",n&&n.appendChild(i),i}function _t(e){var t=e.parentNode;t&&t.removeChild(e)}function gt(e){for(;e.firstChild;)e.removeChild(e.firstChild)}function yt(e){var t=e.parentNode;t&&t.lastChild!==e&&t.appendChild(e)}function vt(e){var t=e.parentNode;t&&t.firstChild!==e&&t.insertBefore(e,t.firstChild)}function bt(e,t){if(void 0!==e.classList)return e.classList.contains(t);var n=At(e);return n.length>0&&new RegExp("(^|\\s)"+t+"(\\s|$)").test(n)}function xt(e,t){if(void 0!==e.classList)for(var n=d(t),i=0,r=n.length;i<r;i++)e.classList.add(n[i]);else if(!bt(e,t)){var s=At(e);Et(e,(s?s+" ":"")+t)}}function wt(e,t){void 0!==e.classList?e.classList.remove(t):Et(e,h((" "+At(e)+" ").replace(" "+t+" "," ")))}function Et(e,t){void 0===e.className.baseVal?e.className=t:e.className.baseVal=t}function At(e){return e.correspondingElement&&(e=e.correspondingElement),void 0===e.className.baseVal?e.className:e.className.baseVal}function Tt(e,t){"opacity"in e.style?e.style.opacity=t:"filter"in e.style&&St(e,t)}function St(e,t){var n=!1,i="DXImageTransform.Microsoft.Alpha";try{n=e.filters.item(i)}catch(e){if(1===t)return}t=Math.round(100*t),n?(n.Enabled=100!==t,n.Opacity=t):e.style.filter+=" progid:"+i+"(opacity="+t+")"}function kt(e){for(var t=document.documentElement.style,n=0;n<e.length;n++)if(e[n]in t)return e[n];return!1}function Ot(e,t,n){var i=t||new M(0,0);e.style[ct]=(Fe.ie3d?"translate("+i.x+"px,"+i.y+"px)":"translate3d("+i.x+"px,"+i.y+"px,0)")+(n?" scale("+n+")":"")}function Pt(e,t){e._leaflet_pos=t,Fe.any3d?Ot(e,t):(e.style.left=t.x+"px",e.style.top=t.y+"px")}function Ct(e){return e._leaflet_pos||new M(0,0)}if("onselectstart"in document)st=function(){jt(window,"selectstart",Kt)},ot=function(){Ut(window,"selectstart",Kt)};else{var Rt=kt(["userSelect","WebkitUserSelect","OUserSelect","MozUserSelect","msUserSelect"]);st=function(){if(Rt){var e=document.documentElement.style;at=e[Rt],e[Rt]="none"}},ot=function(){Rt&&(document.documentElement.style[Rt]=at,at=void 0)}}function Mt(){jt(window,"dragstart",Kt)}function Lt(){Ut(window,"dragstart",Kt)}function Nt(e){for(;-1===e.tabIndex;)e=e.parentNode;e.style&&(zt(),lt=e,ut=e.style.outlineStyle,e.style.outlineStyle="none",jt(window,"keydown",zt))}function zt(){lt&&(lt.style.outlineStyle=ut,lt=void 0,ut=void 0,Ut(window,"keydown",zt))}function Dt(e){do{e=e.parentNode}while(!(e.offsetWidth&&e.offsetHeight||e===document.body));return e}function It(e){var t=e.getBoundingClientRect();return{x:t.width/e.offsetWidth||1,y:t.height/e.offsetHeight||1,boundingClientRect:t}}var Ft={__proto__:null,TRANSFORM:ct,TRANSITION:ht,TRANSITION_END:dt,get:ft,getStyle:pt,create:mt,remove:_t,empty:gt,toFront:yt,toBack:vt,hasClass:bt,addClass:xt,removeClass:wt,setClass:Et,getClass:At,setOpacity:Tt,testProp:kt,setTransform:Ot,setPosition:Pt,getPosition:Ct,get disableTextSelection(){return st},get enableTextSelection(){return ot},disableImageDrag:Mt,enableImageDrag:Lt,preventOutline:Nt,restoreOutline:zt,getSizedParentNode:Dt,getScale:It};function jt(e,t,n,i){if(t&&"object"==typeof t)for(var r in t)$t(e,r,t[r],n);else for(var s=0,o=(t=d(t)).length;s<o;s++)$t(e,t[s],n,i);return this}var Bt="_leaflet_events";function Ut(e,t,n,i){if(1===arguments.length)Vt(e),delete e[Bt];else if(t&&"object"==typeof t)for(var r in t)Zt(e,r,t[r],n);else if(t=d(t),2===arguments.length)Vt(e,function(e){return-1!==y(t,e)});else for(var s=0,o=t.length;s<o;s++)Zt(e,t[s],n,i);return this}function Vt(e,t){for(var n in e[Bt]){var i=n.split(/\d/)[0];t&&!t(i)||Zt(e,i,null,null,n)}}var Gt={mouseenter:"mouseover",mouseleave:"mouseout",wheel:!("onwheel"in window)&&"mousewheel"};function $t(e,t,n,i){var r=t+o(n)+(i?"_"+o(i):"");if(e[Bt]&&e[Bt][r])return this;var s=function(t){return n.call(i||e,t||window.event)},a=s;!Fe.touchNative&&Fe.pointer&&0===t.indexOf("touch")?s=We(e,t,s):Fe.touch&&"dblclick"===t?s=it(e,s):"addEventListener"in e?"touchstart"===t||"touchmove"===t||"wheel"===t||"mousewheel"===t?e.addEventListener(Gt[t]||t,s,!!Fe.passiveEvents&&{passive:!1}):"mouseenter"===t||"mouseleave"===t?(s=function(t){t=t||window.event,tn(e,t)&&a(t)},e.addEventListener(Gt[t],s,!1)):e.addEventListener(t,a,!1):e.attachEvent("on"+t,s),e[Bt]=e[Bt]||{},e[Bt][r]=s}function Zt(e,t,n,i,r){r=r||t+o(n)+(i?"_"+o(i):"");var s=e[Bt]&&e[Bt][r];if(!s)return this;!Fe.touchNative&&Fe.pointer&&0===t.indexOf("touch")?He(e,t,s):Fe.touch&&"dblclick"===t?rt(e,s):"removeEventListener"in e?e.removeEventListener(Gt[t]||t,s,!1):e.detachEvent("on"+t,s),e[Bt][r]=null}function qt(e){return e.stopPropagation?e.stopPropagation():e.originalEvent?e.originalEvent._stopped=!0:e.cancelBubble=!0,this}function Wt(e){return $t(e,"wheel",qt),this}function Ht(e){return jt(e,"mousedown touchstart dblclick contextmenu",qt),e._leaflet_disable_click=!0,this}function Kt(e){return e.preventDefault?e.preventDefault():e.returnValue=!1,this}function Yt(e){return Kt(e),qt(e),this}function Xt(e){if(e.composedPath)return e.composedPath();for(var t=[],n=e.target;n;)t.push(n),n=n.parentNode;return t}function Jt(e,t){if(!t)return new M(e.clientX,e.clientY);var n=It(t),i=n.boundingClientRect;return new M((e.clientX-i.left)/n.x-t.clientLeft,(e.clientY-i.top)/n.y-t.clientTop)}var Qt=Fe.linux&&Fe.chrome?window.devicePixelRatio:Fe.mac?3*window.devicePixelRatio:window.devicePixelRatio>0?2*window.devicePixelRatio:1;function en(e){return Fe.edge?e.wheelDeltaY/2:e.deltaY&&0===e.deltaMode?-e.deltaY/Qt:e.deltaY&&1===e.deltaMode?20*-e.deltaY:e.deltaY&&2===e.deltaMode?60*-e.deltaY:e.deltaX||e.deltaZ?0:e.wheelDelta?(e.wheelDeltaY||e.wheelDelta)/2:e.detail&&Math.abs(e.detail)<32765?20*-e.detail:e.detail?e.detail/-32765*60:0}function tn(e,t){var n=t.relatedTarget;if(!n)return!0;try{for(;n&&n!==e;)n=n.parentNode}catch(e){return!1}return n!==e}var nn={__proto__:null,on:jt,off:Ut,stopPropagation:qt,disableScrollPropagation:Wt,disableClickPropagation:Ht,preventDefault:Kt,stop:Yt,getPropagationPath:Xt,getMousePosition:Jt,getWheelDelta:en,isExternalTarget:tn,addListener:jt,removeListener:Ut},rn=R.extend({run:function(e,t,n,i){this.stop(),this._el=e,this._inProgress=!0,this._duration=n||.25,this._easeOutPower=1/Math.max(i||.5,.2),this._startPos=Ct(e),this._offset=t.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=T(this._animate,this),this._step()},_step:function(e){var t=+new Date-this._startTime,n=1e3*this._duration;t<n?this._runFrame(this._easeOut(t/n),e):(this._runFrame(1),this._complete())},_runFrame:function(e,t){var n=this._startPos.add(this._offset.multiplyBy(e));t&&n._round(),Pt(this._el,n),this.fire("step")},_complete:function(){S(this._animId),this._inProgress=!1,this.fire("end")},_easeOut:function(e){return 1-Math.pow(1-e,this._easeOutPower)}}),sn=R.extend({options:{crs:K,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(e,t){t=f(this,t),this._handlers=[],this._layers={},this._zoomBoundLayers={},this._sizeChanged=!0,this._initContainer(e),this._initLayout(),this._onResize=r(this._onResize,this),this._initEvents(),t.maxBounds&&this.setMaxBounds(t.maxBounds),void 0!==t.zoom&&(this._zoom=this._limitZoom(t.zoom)),t.center&&void 0!==t.zoom&&this.setView(U(t.center),t.zoom,{reset:!0}),this.callInitHooks(),this._zoomAnimated=ht&&Fe.any3d&&!Fe.mobileOpera&&this.options.zoomAnimation,this._zoomAnimated&&(this._createAnimProxy(),jt(this._proxy,dt,this._catchTransitionEnd,this)),this._addLayers(this.options.layers)},setView:function(e,t,i){return t=void 0===t?this._zoom:this._limitZoom(t),e=this._limitCenter(U(e),t,this.options.maxBounds),i=i||{},this._stop(),this._loaded&&!i.reset&&!0!==i&&(void 0!==i.animate&&(i.zoom=n({animate:i.animate},i.zoom),i.pan=n({animate:i.animate,duration:i.duration},i.pan)),this._zoom!==t?this._tryAnimatedZoom&&this._tryAnimatedZoom(e,t,i.zoom):this._tryAnimatedPan(e,i.pan))?(clearTimeout(this._sizeTimer),this):(this._resetView(e,t,i.pan&&i.pan.noMoveStart),this)},setZoom:function(e,t){return this._loaded?this.setView(this.getCenter(),e,{zoom:t}):(this._zoom=e,this)},zoomIn:function(e,t){return e=e||(Fe.any3d?this.options.zoomDelta:1),this.setZoom(this._zoom+e,t)},zoomOut:function(e,t){return e=e||(Fe.any3d?this.options.zoomDelta:1),this.setZoom(this._zoom-e,t)},setZoomAround:function(e,t,n){var i=this.getZoomScale(t),r=this.getSize().divideBy(2),s=(e instanceof M?e:this.latLngToContainerPoint(e)).subtract(r).multiplyBy(1-1/i),o=this.containerPointToLatLng(r.add(s));return this.setView(o,t,{zoom:n})},_getBoundsCenterZoom:function(e,t){t=t||{},e=e.getBounds?e.getBounds():j(e);var n=z(t.paddingTopLeft||t.padding||[0,0]),i=z(t.paddingBottomRight||t.padding||[0,0]),r=this.getBoundsZoom(e,!1,n.add(i));if((r="number"==typeof t.maxZoom?Math.min(t.maxZoom,r):r)===1/0)return{center:e.getCenter(),zoom:r};var s=i.subtract(n).divideBy(2),o=this.project(e.getSouthWest(),r),a=this.project(e.getNorthEast(),r);return{center:this.unproject(o.add(a).divideBy(2).add(s),r),zoom:r}},fitBounds:function(e,t){if(!(e=j(e)).isValid())throw new Error("Bounds are not valid.");var n=this._getBoundsCenterZoom(e,t);return this.setView(n.center,n.zoom,t)},fitWorld:function(e){return this.fitBounds([[-90,-180],[90,180]],e)},panTo:function(e,t){return this.setView(e,this._zoom,{pan:t})},panBy:function(e,t){if(t=t||{},!(e=z(e).round()).x&&!e.y)return this.fire("moveend");if(!0!==t.animate&&!this.getSize().contains(e))return this._resetView(this.unproject(this.project(this.getCenter()).add(e)),this.getZoom()),this;if(this._panAnim||(this._panAnim=new rn,this._panAnim.on({step:this._onPanTransitionStep,end:this._onPanTransitionEnd},this)),t.noMoveStart||this.fire("movestart"),!1!==t.animate){xt(this._mapPane,"leaflet-pan-anim");var n=this._getMapPanePos().subtract(e).round();this._panAnim.run(this._mapPane,n,t.duration||.25,t.easeLinearity)}else this._rawPanBy(e),this.fire("move").fire("moveend");return this},flyTo:function(e,t,n){if(!1===(n=n||{}).animate||!Fe.any3d)return this.setView(e,t,n);this._stop();var i=this.project(this.getCenter()),r=this.project(e),s=this.getSize(),o=this._zoom;e=U(e),t=void 0===t?o:t;var a=Math.max(s.x,s.y),l=a*this.getZoomScale(o,t),u=r.distanceTo(i)||1,c=1.42,h=c*c;function d(e){var t=(l*l-a*a+(e?-1:1)*h*h*u*u)/(2*(e?l:a)*h*u),n=Math.sqrt(t*t+1)-t;return n<1e-9?-18:Math.log(n)}function f(e){return(Math.exp(e)-Math.exp(-e))/2}function p(e){return(Math.exp(e)+Math.exp(-e))/2}function m(e){return f(e)/p(e)}var _=d(0);function g(e){return a*(p(_)/p(_+c*e))}function y(e){return a*(p(_)*m(_+c*e)-f(_))/h}function v(e){return 1-Math.pow(1-e,1.5)}var b=Date.now(),x=(d(1)-_)/c,w=n.duration?1e3*n.duration:1e3*x*.8;function E(){var n=(Date.now()-b)/w,s=v(n)*x;n<=1?(this._flyToFrame=T(E,this),this._move(this.unproject(i.add(r.subtract(i).multiplyBy(y(s)/u)),o),this.getScaleZoom(a/g(s),o),{flyTo:!0})):this._move(e,t)._moveEnd(!0)}return this._moveStart(!0,n.noMoveStart),E.call(this),this},flyToBounds:function(e,t){var n=this._getBoundsCenterZoom(e,t);return this.flyTo(n.center,n.zoom,t)},setMaxBounds:function(e){return e=j(e),this.listens("moveend",this._panInsideMaxBounds)&&this.off("moveend",this._panInsideMaxBounds),e.isValid()?(this.options.maxBounds=e,this._loaded&&this._panInsideMaxBounds(),this.on("moveend",this._panInsideMaxBounds)):(this.options.maxBounds=null,this)},setMinZoom:function(e){var t=this.options.minZoom;return this.options.minZoom=e,this._loaded&&t!==e&&(this.fire("zoomlevelschange"),this.getZoom()<this.options.minZoom)?this.setZoom(e):this},setMaxZoom:function(e){var t=this.options.maxZoom;return this.options.maxZoom=e,this._loaded&&t!==e&&(this.fire("zoomlevelschange"),this.getZoom()>this.options.maxZoom)?this.setZoom(e):this},panInsideBounds:function(e,t){this._enforcingBounds=!0;var n=this.getCenter(),i=this._limitCenter(n,this._zoom,j(e));return n.equals(i)||this.panTo(i,t),this._enforcingBounds=!1,this},panInside:function(e,t){var n=z((t=t||{}).paddingTopLeft||t.padding||[0,0]),i=z(t.paddingBottomRight||t.padding||[0,0]),r=this.project(this.getCenter()),s=this.project(e),o=this.getPixelBounds(),a=I([o.min.add(n),o.max.subtract(i)]),l=a.getSize();if(!a.contains(s)){this._enforcingBounds=!0;var u=s.subtract(a.getCenter()),c=a.extend(s).getSize().subtract(l);r.x+=u.x<0?-c.x:c.x,r.y+=u.y<0?-c.y:c.y,this.panTo(this.unproject(r),t),this._enforcingBounds=!1}return this},invalidateSize:function(e){if(!this._loaded)return this;e=n({animate:!1,pan:!0},!0===e?{animate:!0}:e);var t=this.getSize();this._sizeChanged=!0,this._lastCenter=null;var i=this.getSize(),s=t.divideBy(2).round(),o=i.divideBy(2).round(),a=s.subtract(o);return a.x||a.y?(e.animate&&e.pan?this.panBy(a):(e.pan&&this._rawPanBy(a),this.fire("move"),e.debounceMoveend?(clearTimeout(this._sizeTimer),this._sizeTimer=setTimeout(r(this.fire,this,"moveend"),200)):this.fire("moveend")),this.fire("resize",{oldSize:t,newSize:i})):this},stop:function(){return this.setZoom(this._limitZoom(this._zoom)),this.options.zoomSnap||this.fire("viewreset"),this._stop()},locate:function(e){if(e=this._locateOptions=n({timeout:1e4,watch:!1},e),!("geolocation"in navigator))return this._handleGeolocationError({code:0,message:"Geolocation not supported."}),this;var t=r(this._handleGeolocationResponse,this),i=r(this._handleGeolocationError,this);return e.watch?this._locationWatchId=navigator.geolocation.watchPosition(t,i,e):navigator.geolocation.getCurrentPosition(t,i,e),this},stopLocate:function(){return navigator.geolocation&&navigator.geolocation.clearWatch&&navigator.geolocation.clearWatch(this._locationWatchId),this._locateOptions&&(this._locateOptions.setView=!1),this},_handleGeolocationError:function(e){if(this._container._leaflet_id){var t=e.code,n=e.message||(1===t?"permission denied":2===t?"position unavailable":"timeout");this._locateOptions.setView&&!this._loaded&&this.fitWorld(),this.fire("locationerror",{code:t,message:"Geolocation error: "+n+"."})}},_handleGeolocationResponse:function(e){if(this._container._leaflet_id){var t=new B(e.coords.latitude,e.coords.longitude),n=t.toBounds(2*e.coords.accuracy),i=this._locateOptions;if(i.setView){var r=this.getBoundsZoom(n);this.setView(t,i.maxZoom?Math.min(r,i.maxZoom):r)}var s={latlng:t,bounds:n,timestamp:e.timestamp};for(var o in e.coords)"number"==typeof e.coords[o]&&(s[o]=e.coords[o]);this.fire("locationfound",s)}},addHandler:function(e,t){if(!t)return this;var n=this[e]=new t(this);return this._handlers.push(n),this.options[e]&&n.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(e){this._container._leaflet_id=void 0,this._containerId=void 0}var e;for(e in void 0!==this._locationWatchId&&this.stopLocate(),this._stop(),_t(this._mapPane),this._clearControlPos&&this._clearControlPos(),this._resizeRequest&&(S(this._resizeRequest),this._resizeRequest=null),this._clearHandlers(),this._loaded&&this.fire("unload"),this._layers)this._layers[e].remove();for(e in this._panes)_t(this._panes[e]);return this._layers=[],this._panes=[],delete this._mapPane,delete this._renderer,this},createPane:function(e,t){var n=mt("div","leaflet-pane"+(e?" leaflet-"+e.replace("Pane","")+"-pane":""),t||this._mapPane);return e&&(this._panes[e]=n),n},getCenter:function(){return this._checkIfLoaded(),this._lastCenter&&!this._moved()?this._lastCenter.clone():this.layerPointToLatLng(this._getCenterLayerPoint())},getZoom:function(){return this._zoom},getBounds:function(){var e=this.getPixelBounds();return new F(this.unproject(e.getBottomLeft()),this.unproject(e.getTopRight()))},getMinZoom:function(){return void 0===this.options.minZoom?this._layersMinZoom||0:this.options.minZoom},getMaxZoom:function(){return void 0===this.options.maxZoom?void 0===this._layersMaxZoom?1/0:this._layersMaxZoom:this.options.maxZoom},getBoundsZoom:function(e,t,n){e=j(e),n=z(n||[0,0]);var i=this.getZoom()||0,r=this.getMinZoom(),s=this.getMaxZoom(),o=e.getNorthWest(),a=e.getSouthEast(),l=this.getSize().subtract(n),u=I(this.project(a,i),this.project(o,i)).getSize(),c=Fe.any3d?this.options.zoomSnap:1,h=l.x/u.x,d=l.y/u.y,f=t?Math.max(h,d):Math.min(h,d);return i=this.getScaleZoom(f,i),c&&(i=Math.round(i/(c/100))*(c/100),i=t?Math.ceil(i/c)*c:Math.floor(i/c)*c),Math.max(r,Math.min(s,i))},getSize:function(){return this._size&&!this._sizeChanged||(this._size=new M(this._container.clientWidth||0,this._container.clientHeight||0),this._sizeChanged=!1),this._size.clone()},getPixelBounds:function(e,t){var n=this._getTopLeftPoint(e,t);return new D(n,n.add(this.getSize()))},getPixelOrigin:function(){return this._checkIfLoaded(),this._pixelOrigin},getPixelWorldBounds:function(e){return this.options.crs.getProjectedBounds(void 0===e?this.getZoom():e)},getPane:function(e){return"string"==typeof e?this._panes[e]:e},getPanes:function(){return this._panes},getContainer:function(){return this._container},getZoomScale:function(e,t){var n=this.options.crs;return t=void 0===t?this._zoom:t,n.scale(e)/n.scale(t)},getScaleZoom:function(e,t){var n=this.options.crs;t=void 0===t?this._zoom:t;var i=n.zoom(e*n.scale(t));return isNaN(i)?1/0:i},project:function(e,t){return t=void 0===t?this._zoom:t,this.options.crs.latLngToPoint(U(e),t)},unproject:function(e,t){return t=void 0===t?this._zoom:t,this.options.crs.pointToLatLng(z(e),t)},layerPointToLatLng:function(e){var t=z(e).add(this.getPixelOrigin());return this.unproject(t)},latLngToLayerPoint:function(e){return this.project(U(e))._round()._subtract(this.getPixelOrigin())},wrapLatLng:function(e){return this.options.crs.wrapLatLng(U(e))},wrapLatLngBounds:function(e){return this.options.crs.wrapLatLngBounds(j(e))},distance:function(e,t){return this.options.crs.distance(U(e),U(t))},containerPointToLayerPoint:function(e){return z(e).subtract(this._getMapPanePos())},layerPointToContainerPoint:function(e){return z(e).add(this._getMapPanePos())},containerPointToLatLng:function(e){var t=this.containerPointToLayerPoint(z(e));return this.layerPointToLatLng(t)},latLngToContainerPoint:function(e){return this.layerPointToContainerPoint(this.latLngToLayerPoint(U(e)))},mouseEventToContainerPoint:function(e){return Jt(e,this._container)},mouseEventToLayerPoint:function(e){return this.containerPointToLayerPoint(this.mouseEventToContainerPoint(e))},mouseEventToLatLng:function(e){return this.layerPointToLatLng(this.mouseEventToLayerPoint(e))},_initContainer:function(e){var t=this._container=ft(e);if(!t)throw new Error("Map container not found.");if(t._leaflet_id)throw new Error("Map container is already initialized.");jt(t,"scroll",this._onScroll,this),this._containerId=o(t)},_initLayout:function(){var e=this._container;this._fadeAnimated=this.options.fadeAnimation&&Fe.any3d,xt(e,"leaflet-container"+(Fe.touch?" leaflet-touch":"")+(Fe.retina?" leaflet-retina":"")+(Fe.ielt9?" leaflet-oldie":"")+(Fe.safari?" leaflet-safari":"")+(this._fadeAnimated?" leaflet-fade-anim":""));var t=pt(e,"position");"absolute"!==t&&"relative"!==t&&"fixed"!==t&&"sticky"!==t&&(e.style.position="relative"),this._initPanes(),this._initControlPos&&this._initControlPos()},_initPanes:function(){var e=this._panes={};this._paneRenderers={},this._mapPane=this.createPane("mapPane",this._container),Pt(this._mapPane,new M(0,0)),this.createPane("tilePane"),this.createPane("overlayPane"),this.createPane("shadowPane"),this.createPane("markerPane"),this.createPane("tooltipPane"),this.createPane("popupPane"),this.options.markerZoomAnimation||(xt(e.markerPane,"leaflet-zoom-hide"),xt(e.shadowPane,"leaflet-zoom-hide"))},_resetView:function(e,t,n){Pt(this._mapPane,new M(0,0));var i=!this._loaded;this._loaded=!0,t=this._limitZoom(t),this.fire("viewprereset");var r=this._zoom!==t;this._moveStart(r,n)._move(e,t)._moveEnd(r),this.fire("viewreset"),i&&this.fire("load")},_moveStart:function(e,t){return e&&this.fire("zoomstart"),t||this.fire("movestart"),this},_move:function(e,t,n,i){void 0===t&&(t=this._zoom);var r=this._zoom!==t;return this._zoom=t,this._lastCenter=e,this._pixelOrigin=this._getNewPixelOrigin(e),i?n&&n.pinch&&this.fire("zoom",n):((r||n&&n.pinch)&&this.fire("zoom",n),this.fire("move",n)),this},_moveEnd:function(e){return e&&this.fire("zoomend"),this.fire("moveend")},_stop:function(){return S(this._flyToFrame),this._panAnim&&this._panAnim.stop(),this},_rawPanBy:function(e){Pt(this._mapPane,this._getMapPanePos().subtract(e))},_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(e){this._targets={},this._targets[o(this._container)]=this;var t=e?Ut:jt;t(this._container,"click dblclick mousedown mouseup mouseover mouseout mousemove contextmenu keypress keydown keyup",this._handleDOMEvent,this),this.options.trackResize&&t(window,"resize",this._onResize,this),Fe.any3d&&this.options.transform3DLimit&&(e?this.off:this.on).call(this,"moveend",this._onMoveEnd)},_onResize:function(){S(this._resizeRequest),this._resizeRequest=T(function(){this.invalidateSize({debounceMoveend:!0})},this)},_onScroll:function(){this._container.scrollTop=0,this._container.scrollLeft=0},_onMoveEnd:function(){var e=this._getMapPanePos();Math.max(Math.abs(e.x),Math.abs(e.y))>=this.options.transform3DLimit&&this._resetView(this.getCenter(),this.getZoom())},_findEventTargets:function(e,t){for(var n,i=[],r="mouseout"===t||"mouseover"===t,s=e.target||e.srcElement,a=!1;s;){if((n=this._targets[o(s)])&&("click"===t||"preclick"===t)&&this._draggableMoved(n)){a=!0;break}if(n&&n.listens(t,!0)){if(r&&!tn(s,e))break;if(i.push(n),r)break}if(s===this._container)break;s=s.parentNode}return i.length||a||r||!this.listens(t,!0)||(i=[this]),i},_isClickDisabled:function(e){for(;e&&e!==this._container;){if(e._leaflet_disable_click)return!0;e=e.parentNode}},_handleDOMEvent:function(e){var t=e.target||e.srcElement;if(!(!this._loaded||t._leaflet_disable_events||"click"===e.type&&this._isClickDisabled(t))){var n=e.type;"mousedown"===n&&Nt(t),this._fireDOMEvent(e,n)}},_mouseEvents:["click","dblclick","mouseover","mouseout","contextmenu"],_fireDOMEvent:function(e,t,i){if("click"===e.type){var r=n({},e);r.type="preclick",this._fireDOMEvent(r,r.type,i)}var s=this._findEventTargets(e,t);if(i){for(var o=[],a=0;a<i.length;a++)i[a].listens(t,!0)&&o.push(i[a]);s=o.concat(s)}if(s.length){"contextmenu"===t&&Kt(e);var l=s[0],u={originalEvent:e};if("keypress"!==e.type&&"keydown"!==e.type&&"keyup"!==e.type){var c=l.getLatLng&&(!l._radius||l._radius<=10);u.containerPoint=c?this.latLngToContainerPoint(l.getLatLng()):this.mouseEventToContainerPoint(e),u.layerPoint=this.containerPointToLayerPoint(u.containerPoint),u.latlng=c?l.getLatLng():this.layerPointToLatLng(u.layerPoint)}for(a=0;a<s.length;a++)if(s[a].fire(t,u,!0),u.originalEvent._stopped||!1===s[a].options.bubblingMouseEvents&&-1!==y(this._mouseEvents,t))return}},_draggableMoved:function(e){return(e=e.dragging&&e.dragging.enabled()?e:this).dragging&&e.dragging.moved()||this.boxZoom&&this.boxZoom.moved()},_clearHandlers:function(){for(var e=0,t=this._handlers.length;e<t;e++)this._handlers[e].disable()},whenReady:function(e,t){return this._loaded?e.call(t||this,{target:this}):this.on("load",e,t),this},_getMapPanePos:function(){return Ct(this._mapPane)||new M(0,0)},_moved:function(){var e=this._getMapPanePos();return e&&!e.equals([0,0])},_getTopLeftPoint:function(e,t){return(e&&void 0!==t?this._getNewPixelOrigin(e,t):this.getPixelOrigin()).subtract(this._getMapPanePos())},_getNewPixelOrigin:function(e,t){var n=this.getSize()._divideBy(2);return this.project(e,t)._subtract(n)._add(this._getMapPanePos())._round()},_latLngToNewLayerPoint:function(e,t,n){var i=this._getNewPixelOrigin(n,t);return this.project(e,t)._subtract(i)},_latLngBoundsToNewLayerBounds:function(e,t,n){var i=this._getNewPixelOrigin(n,t);return I([this.project(e.getSouthWest(),t)._subtract(i),this.project(e.getNorthWest(),t)._subtract(i),this.project(e.getSouthEast(),t)._subtract(i),this.project(e.getNorthEast(),t)._subtract(i)])},_getCenterLayerPoint:function(){return this.containerPointToLayerPoint(this.getSize()._divideBy(2))},_getCenterOffset:function(e){return this.latLngToLayerPoint(e).subtract(this._getCenterLayerPoint())},_limitCenter:function(e,t,n){if(!n)return e;var i=this.project(e,t),r=this.getSize().divideBy(2),s=new D(i.subtract(r),i.add(r)),o=this._getBoundsOffset(s,n,t);return Math.abs(o.x)<=1&&Math.abs(o.y)<=1?e:this.unproject(i.add(o),t)},_limitOffset:function(e,t){if(!t)return e;var n=this.getPixelBounds(),i=new D(n.min.add(e),n.max.add(e));return e.add(this._getBoundsOffset(i,t))},_getBoundsOffset:function(e,t,n){var i=I(this.project(t.getNorthEast(),n),this.project(t.getSouthWest(),n)),r=i.min.subtract(e.min),s=i.max.subtract(e.max);return new M(this._rebound(r.x,-s.x),this._rebound(r.y,-s.y))},_rebound:function(e,t){return e+t>0?Math.round(e-t)/2:Math.max(0,Math.ceil(e))-Math.max(0,Math.floor(t))},_limitZoom:function(e){var t=this.getMinZoom(),n=this.getMaxZoom(),i=Fe.any3d?this.options.zoomSnap:1;return i&&(e=Math.round(e/i)*i),Math.max(t,Math.min(n,e))},_onPanTransitionStep:function(){this.fire("move")},_onPanTransitionEnd:function(){wt(this._mapPane,"leaflet-pan-anim"),this.fire("moveend")},_tryAnimatedPan:function(e,t){var n=this._getCenterOffset(e)._trunc();return!(!0!==(t&&t.animate)&&!this.getSize().contains(n)||(this.panBy(n,t),0))},_createAnimProxy:function(){var e=this._proxy=mt("div","leaflet-proxy leaflet-zoom-animated");this._panes.mapPane.appendChild(e),this.on("zoomanim",function(e){var t=ct,n=this._proxy.style[t];Ot(this._proxy,this.project(e.center,e.zoom),this.getZoomScale(e.zoom,1)),n===this._proxy.style[t]&&this._animatingZoom&&this._onZoomTransitionEnd()},this),this.on("load moveend",this._animMoveEnd,this),this._on("unload",this._destroyAnimProxy,this)},_destroyAnimProxy:function(){_t(this._proxy),this.off("load moveend",this._animMoveEnd,this),delete this._proxy},_animMoveEnd:function(){var e=this.getCenter(),t=this.getZoom();Ot(this._proxy,this.project(e,t),this.getZoomScale(t,1))},_catchTransitionEnd:function(e){this._animatingZoom&&e.propertyName.indexOf("transform")>=0&&this._onZoomTransitionEnd()},_nothingToAnimate:function(){return!this._container.getElementsByClassName("leaflet-zoom-animated").length},_tryAnimatedZoom:function(e,t,n){if(this._animatingZoom)return!0;if(n=n||{},!this._zoomAnimated||!1===n.animate||this._nothingToAnimate()||Math.abs(t-this._zoom)>this.options.zoomAnimationThreshold)return!1;var i=this.getZoomScale(t),r=this._getCenterOffset(e)._divideBy(1-1/i);return!(!0!==n.animate&&!this.getSize().contains(r)||(T(function(){this._moveStart(!0,n.noMoveStart||!1)._animateZoom(e,t,!0)},this),0))},_animateZoom:function(e,t,n,i){this._mapPane&&(n&&(this._animatingZoom=!0,this._animateToCenter=e,this._animateToZoom=t,xt(this._mapPane,"leaflet-zoom-anim")),this.fire("zoomanim",{center:e,zoom:t,noUpdate:i}),this._tempFireZoomEvent||(this._tempFireZoomEvent=this._zoom!==this._animateToZoom),this._move(this._animateToCenter,this._animateToZoom,void 0,!0),setTimeout(r(this._onZoomTransitionEnd,this),250))},_onZoomTransitionEnd:function(){this._animatingZoom&&(this._mapPane&&wt(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 on(e,t){return new sn(e,t)}var an=O.extend({options:{position:"topright"},initialize:function(e){f(this,e)},getPosition:function(){return this.options.position},setPosition:function(e){var t=this._map;return t&&t.removeControl(this),this.options.position=e,t&&t.addControl(this),this},getContainer:function(){return this._container},addTo:function(e){this.remove(),this._map=e;var t=this._container=this.onAdd(e),n=this.getPosition(),i=e._controlCorners[n];return xt(t,"leaflet-control"),-1!==n.indexOf("bottom")?i.insertBefore(t,i.firstChild):i.appendChild(t),this._map.on("unload",this.remove,this),this},remove:function(){return this._map?(_t(this._container),this.onRemove&&this.onRemove(this._map),this._map.off("unload",this.remove,this),this._map=null,this):this},_refocusOnMap:function(e){this._map&&e&&e.screenX>0&&e.screenY>0&&this._map.getContainer().focus()}}),ln=function(e){return new an(e)};sn.include({addControl:function(e){return e.addTo(this),this},removeControl:function(e){return e.remove(),this},_initControlPos:function(){var e=this._controlCorners={},t="leaflet-",n=this._controlContainer=mt("div",t+"control-container",this._container);function i(i,r){var s=t+i+" "+t+r;e[i+r]=mt("div",s,n)}i("top","left"),i("top","right"),i("bottom","left"),i("bottom","right")},_clearControlPos:function(){for(var e in this._controlCorners)_t(this._controlCorners[e]);_t(this._controlContainer),delete this._controlCorners,delete this._controlContainer}});var un=an.extend({options:{collapsed:!0,position:"topright",autoZIndex:!0,hideSingleBase:!1,sortLayers:!1,sortFunction:function(e,t,n,i){return n<i?-1:i<n?1:0}},initialize:function(e,t,n){for(var i in f(this,n),this._layerControlInputs=[],this._layers=[],this._lastZIndex=0,this._handlingClick=!1,this._preventClick=!1,e)this._addLayer(e[i],i);for(i in t)this._addLayer(t[i],i,!0)},onAdd:function(e){this._initLayout(),this._update(),this._map=e,e.on("zoomend",this._checkDisabledLayers,this);for(var t=0;t<this._layers.length;t++)this._layers[t].layer.on("add remove",this._onLayerChange,this);return this._container},addTo:function(e){return an.prototype.addTo.call(this,e),this._expandIfNotCollapsed()},onRemove:function(){this._map.off("zoomend",this._checkDisabledLayers,this);for(var e=0;e<this._layers.length;e++)this._layers[e].layer.off("add remove",this._onLayerChange,this)},addBaseLayer:function(e,t){return this._addLayer(e,t),this._map?this._update():this},addOverlay:function(e,t){return this._addLayer(e,t,!0),this._map?this._update():this},removeLayer:function(e){e.off("add remove",this._onLayerChange,this);var t=this._getLayer(o(e));return t&&this._layers.splice(this._layers.indexOf(t),1),this._map?this._update():this},expand:function(){xt(this._container,"leaflet-control-layers-expanded"),this._section.style.height=null;var e=this._map.getSize().y-(this._container.offsetTop+50);return e<this._section.clientHeight?(xt(this._section,"leaflet-control-layers-scrollbar"),this._section.style.height=e+"px"):wt(this._section,"leaflet-control-layers-scrollbar"),this._checkDisabledLayers(),this},collapse:function(){return wt(this._container,"leaflet-control-layers-expanded"),this},_initLayout:function(){var e="leaflet-control-layers",t=this._container=mt("div",e),n=this.options.collapsed;t.setAttribute("aria-haspopup",!0),Ht(t),Wt(t);var i=this._section=mt("section",e+"-list");n&&(this._map.on("click",this.collapse,this),jt(t,{mouseenter:this._expandSafely,mouseleave:this.collapse},this));var r=this._layersLink=mt("a",e+"-toggle",t);r.href="#",r.title="Layers",r.setAttribute("role","button"),jt(r,{keydown:function(e){13===e.keyCode&&this._expandSafely()},click:function(e){Kt(e),this._expandSafely()}},this),n||this.expand(),this._baseLayersList=mt("div",e+"-base",i),this._separator=mt("div",e+"-separator",i),this._overlaysList=mt("div",e+"-overlays",i),t.appendChild(i)},_getLayer:function(e){for(var t=0;t<this._layers.length;t++)if(this._layers[t]&&o(this._layers[t].layer)===e)return this._layers[t]},_addLayer:function(e,t,n){this._map&&e.on("add remove",this._onLayerChange,this),this._layers.push({layer:e,name:t,overlay:n}),this.options.sortLayers&&this._layers.sort(r(function(e,t){return this.options.sortFunction(e.layer,t.layer,e.name,t.name)},this)),this.options.autoZIndex&&e.setZIndex&&(this._lastZIndex++,e.setZIndex(this._lastZIndex)),this._expandIfNotCollapsed()},_update:function(){if(!this._container)return this;gt(this._baseLayersList),gt(this._overlaysList),this._layerControlInputs=[];var e,t,n,i,r=0;for(n=0;n<this._layers.length;n++)i=this._layers[n],this._addItem(i),t=t||i.overlay,e=e||!i.overlay,r+=i.overlay?0:1;return this.options.hideSingleBase&&(e=e&&r>1,this._baseLayersList.style.display=e?"":"none"),this._separator.style.display=t&&e?"":"none",this},_onLayerChange:function(e){this._handlingClick||this._update();var t=this._getLayer(o(e.target)),n=t.overlay?"add"===e.type?"overlayadd":"overlayremove":"add"===e.type?"baselayerchange":null;n&&this._map.fire(n,t)},_createRadioElement:function(e,t){var n='<input type="radio" class="leaflet-control-layers-selector" name="'+e+'"'+(t?' checked="checked"':"")+"/>",i=document.createElement("div");return i.innerHTML=n,i.firstChild},_addItem:function(e){var t,n=document.createElement("label"),i=this._map.hasLayer(e.layer);e.overlay?((t=document.createElement("input")).type="checkbox",t.className="leaflet-control-layers-selector",t.defaultChecked=i):t=this._createRadioElement("leaflet-base-layers_"+o(this),i),this._layerControlInputs.push(t),t.layerId=o(e.layer),jt(t,"click",this._onInputClick,this);var r=document.createElement("span");r.innerHTML=" "+e.name;var s=document.createElement("span");return n.appendChild(s),s.appendChild(t),s.appendChild(r),(e.overlay?this._overlaysList:this._baseLayersList).appendChild(n),this._checkDisabledLayers(),n},_onInputClick:function(){if(!this._preventClick){var e,t,n=this._layerControlInputs,i=[],r=[];this._handlingClick=!0;for(var s=n.length-1;s>=0;s--)e=n[s],t=this._getLayer(e.layerId).layer,e.checked?i.push(t):e.checked||r.push(t);for(s=0;s<r.length;s++)this._map.hasLayer(r[s])&&this._map.removeLayer(r[s]);for(s=0;s<i.length;s++)this._map.hasLayer(i[s])||this._map.addLayer(i[s]);this._handlingClick=!1,this._refocusOnMap()}},_checkDisabledLayers:function(){for(var e,t,n=this._layerControlInputs,i=this._map.getZoom(),r=n.length-1;r>=0;r--)e=n[r],t=this._getLayer(e.layerId).layer,e.disabled=void 0!==t.options.minZoom&&i<t.options.minZoom||void 0!==t.options.maxZoom&&i>t.options.maxZoom},_expandIfNotCollapsed:function(){return this._map&&!this.options.collapsed&&this.expand(),this},_expandSafely:function(){var e=this._section;this._preventClick=!0,jt(e,"click",Kt),this.expand();var t=this;setTimeout(function(){Ut(e,"click",Kt),t._preventClick=!1})}}),cn=function(e,t,n){return new un(e,t,n)},hn=an.extend({options:{position:"topleft",zoomInText:'<span aria-hidden="true">+</span>',zoomInTitle:"Zoom in",zoomOutText:'<span aria-hidden="true">−</span>',zoomOutTitle:"Zoom out"},onAdd:function(e){var t="leaflet-control-zoom",n=mt("div",t+" leaflet-bar"),i=this.options;return this._zoomInButton=this._createButton(i.zoomInText,i.zoomInTitle,t+"-in",n,this._zoomIn),this._zoomOutButton=this._createButton(i.zoomOutText,i.zoomOutTitle,t+"-out",n,this._zoomOut),this._updateDisabled(),e.on("zoomend zoomlevelschange",this._updateDisabled,this),n},onRemove:function(e){e.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(e){!this._disabled&&this._map._zoom<this._map.getMaxZoom()&&this._map.zoomIn(this._map.options.zoomDelta*(e.shiftKey?3:1))},_zoomOut:function(e){!this._disabled&&this._map._zoom>this._map.getMinZoom()&&this._map.zoomOut(this._map.options.zoomDelta*(e.shiftKey?3:1))},_createButton:function(e,t,n,i,r){var s=mt("a",n,i);return s.innerHTML=e,s.href="#",s.title=t,s.setAttribute("role","button"),s.setAttribute("aria-label",t),Ht(s),jt(s,"click",Yt),jt(s,"click",r,this),jt(s,"click",this._refocusOnMap,this),s},_updateDisabled:function(){var e=this._map,t="leaflet-disabled";wt(this._zoomInButton,t),wt(this._zoomOutButton,t),this._zoomInButton.setAttribute("aria-disabled","false"),this._zoomOutButton.setAttribute("aria-disabled","false"),(this._disabled||e._zoom===e.getMinZoom())&&(xt(this._zoomOutButton,t),this._zoomOutButton.setAttribute("aria-disabled","true")),(this._disabled||e._zoom===e.getMaxZoom())&&(xt(this._zoomInButton,t),this._zoomInButton.setAttribute("aria-disabled","true"))}});sn.mergeOptions({zoomControl:!0}),sn.addInitHook(function(){this.options.zoomControl&&(this.zoomControl=new hn,this.addControl(this.zoomControl))});var dn=function(e){return new hn(e)},fn=an.extend({options:{position:"bottomleft",maxWidth:100,metric:!0,imperial:!0},onAdd:function(e){var t="leaflet-control-scale",n=mt("div",t),i=this.options;return this._addScales(i,t+"-line",n),e.on(i.updateWhenIdle?"moveend":"move",this._update,this),e.whenReady(this._update,this),n},onRemove:function(e){e.off(this.options.updateWhenIdle?"moveend":"move",this._update,this)},_addScales:function(e,t,n){e.metric&&(this._mScale=mt("div",t,n)),e.imperial&&(this._iScale=mt("div",t,n))},_update:function(){var e=this._map,t=e.getSize().y/2,n=e.distance(e.containerPointToLatLng([0,t]),e.containerPointToLatLng([this.options.maxWidth,t]));this._updateScales(n)},_updateScales:function(e){this.options.metric&&e&&this._updateMetric(e),this.options.imperial&&e&&this._updateImperial(e)},_updateMetric:function(e){var t=this._getRoundNum(e),n=t<1e3?t+" m":t/1e3+" km";this._updateScale(this._mScale,n,t/e)},_updateImperial:function(e){var t,n,i,r=3.2808399*e;r>5280?(t=r/5280,n=this._getRoundNum(t),this._updateScale(this._iScale,n+" mi",n/t)):(i=this._getRoundNum(r),this._updateScale(this._iScale,i+" ft",i/r))},_updateScale:function(e,t,n){e.style.width=Math.round(this.options.maxWidth*n)+"px",e.innerHTML=t},_getRoundNum:function(e){var t=Math.pow(10,(Math.floor(e)+"").length-1),n=e/t;return t*(n=n>=10?10:n>=5?5:n>=3?3:n>=2?2:1)}}),pn=function(e){return new fn(e)},mn='<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>',_n=an.extend({options:{position:"bottomright",prefix:'<a href="https://leafletjs.com" title="A JavaScript library for interactive maps">'+(Fe.inlineSvg?mn+" ":"")+"Leaflet</a>"},initialize:function(e){f(this,e),this._attributions={}},onAdd:function(e){for(var t in e.attributionControl=this,this._container=mt("div","leaflet-control-attribution"),Ht(this._container),e._layers)e._layers[t].getAttribution&&this.addAttribution(e._layers[t].getAttribution());return this._update(),e.on("layeradd",this._addAttribution,this),this._container},onRemove:function(e){e.off("layeradd",this._addAttribution,this)},_addAttribution:function(e){e.layer.getAttribution&&(this.addAttribution(e.layer.getAttribution()),e.layer.once("remove",function(){this.removeAttribution(e.layer.getAttribution())},this))},setPrefix:function(e){return this.options.prefix=e,this._update(),this},addAttribution:function(e){return e?(this._attributions[e]||(this._attributions[e]=0),this._attributions[e]++,this._update(),this):this},removeAttribution:function(e){return e?(this._attributions[e]&&(this._attributions[e]--,this._update()),this):this},_update:function(){if(this._map){var e=[];for(var t in this._attributions)this._attributions[t]&&e.push(t);var n=[];this.options.prefix&&n.push(this.options.prefix),e.length&&n.push(e.join(", ")),this._container.innerHTML=n.join(' <span aria-hidden="true">|</span> ')}}});sn.mergeOptions({attributionControl:!0}),sn.addInitHook(function(){this.options.attributionControl&&(new _n).addTo(this)});var gn=function(e){return new _n(e)};an.Layers=un,an.Zoom=hn,an.Scale=fn,an.Attribution=_n,ln.layers=cn,ln.zoom=dn,ln.scale=pn,ln.attribution=gn;var yn=O.extend({initialize:function(e){this._map=e},enable:function(){return this._enabled||(this._enabled=!0,this.addHooks()),this},disable:function(){return this._enabled?(this._enabled=!1,this.removeHooks(),this):this},enabled:function(){return!!this._enabled}});yn.addTo=function(e,t){return e.addHandler(t,this),this};var vn={Events:C},bn=Fe.touch?"touchstart mousedown":"mousedown",xn=R.extend({options:{clickTolerance:3},initialize:function(e,t,n,i){f(this,i),this._element=e,this._dragStartTarget=t||e,this._preventOutline=n},enable:function(){this._enabled||(jt(this._dragStartTarget,bn,this._onDown,this),this._enabled=!0)},disable:function(){this._enabled&&(xn._dragging===this&&this.finishDrag(!0),Ut(this._dragStartTarget,bn,this._onDown,this),this._enabled=!1,this._moved=!1)},_onDown:function(e){if(this._enabled&&(this._moved=!1,!bt(this._element,"leaflet-zoom-anim")))if(e.touches&&1!==e.touches.length)xn._dragging===this&&this.finishDrag();else if(!(xn._dragging||e.shiftKey||1!==e.which&&1!==e.button&&!e.touches||(xn._dragging=this,this._preventOutline&&Nt(this._element),Mt(),st(),this._moving))){this.fire("down");var t=e.touches?e.touches[0]:e,n=Dt(this._element);this._startPoint=new M(t.clientX,t.clientY),this._startPos=Ct(this._element),this._parentScale=It(n);var i="mousedown"===e.type;jt(document,i?"mousemove":"touchmove",this._onMove,this),jt(document,i?"mouseup":"touchend touchcancel",this._onUp,this)}},_onMove:function(e){if(this._enabled)if(e.touches&&e.touches.length>1)this._moved=!0;else{var t=e.touches&&1===e.touches.length?e.touches[0]:e,n=new M(t.clientX,t.clientY)._subtract(this._startPoint);(n.x||n.y)&&(Math.abs(n.x)+Math.abs(n.y)<this.options.clickTolerance||(n.x/=this._parentScale.x,n.y/=this._parentScale.y,Kt(e),this._moved||(this.fire("dragstart"),this._moved=!0,xt(document.body,"leaflet-dragging"),this._lastTarget=e.target||e.srcElement,window.SVGElementInstance&&this._lastTarget instanceof window.SVGElementInstance&&(this._lastTarget=this._lastTarget.correspondingUseElement),xt(this._lastTarget,"leaflet-drag-target")),this._newPos=this._startPos.add(n),this._moving=!0,this._lastEvent=e,this._updatePosition()))}},_updatePosition:function(){var e={originalEvent:this._lastEvent};this.fire("predrag",e),Pt(this._element,this._newPos),this.fire("drag",e)},_onUp:function(){this._enabled&&this.finishDrag()},finishDrag:function(e){wt(document.body,"leaflet-dragging"),this._lastTarget&&(wt(this._lastTarget,"leaflet-drag-target"),this._lastTarget=null),Ut(document,"mousemove touchmove",this._onMove,this),Ut(document,"mouseup touchend touchcancel",this._onUp,this),Lt(),ot();var t=this._moved&&this._moving;this._moving=!1,xn._dragging=!1,t&&this.fire("dragend",{noInertia:e,distance:this._newPos.distanceTo(this._startPos)})}});function wn(e,t,n){var i,r,s,o,a,l,u,c,h,d=[1,4,2,8];for(r=0,u=e.length;r<u;r++)e[r]._code=zn(e[r],t);for(o=0;o<4;o++){for(c=d[o],i=[],r=0,s=(u=e.length)-1;r<u;s=r++)a=e[r],l=e[s],a._code&c?l._code&c||((h=Nn(l,a,c,t,n))._code=zn(h,t),i.push(h)):(l._code&c&&((h=Nn(l,a,c,t,n))._code=zn(h,t),i.push(h)),i.push(a));e=i}return e}function En(e,t){var n,i,r,s,o,a,l,u,c;if(!e||0===e.length)throw new Error("latlngs not passed");Fn(e)||(console.warn("latlngs are not flat! Only the first ring will be used"),e=e[0]);var h=U([0,0]),d=j(e);d.getNorthWest().distanceTo(d.getSouthWest())*d.getNorthEast().distanceTo(d.getNorthWest())<1700&&(h=An(e));var f=e.length,p=[];for(n=0;n<f;n++){var m=U(e[n]);p.push(t.project(U([m.lat-h.lat,m.lng-h.lng])))}for(a=l=u=0,n=0,i=f-1;n<f;i=n++)r=p[n],s=p[i],o=r.y*s.x-s.y*r.x,l+=(r.x+s.x)*o,u+=(r.y+s.y)*o,a+=3*o;c=0===a?p[0]:[l/a,u/a];var _=t.unproject(z(c));return U([_.lat+h.lat,_.lng+h.lng])}function An(e){for(var t=0,n=0,i=0,r=0;r<e.length;r++){var s=U(e[r]);t+=s.lat,n+=s.lng,i++}return U([t/i,n/i])}var Tn,Sn={__proto__:null,clipPolygon:wn,polygonCenter:En,centroid:An};function kn(e,t){if(!t||!e.length)return e.slice();var n=t*t;return e=Cn(e=Mn(e,n),n)}function On(e,t,n){return Math.sqrt(In(e,t,n,!0))}function Pn(e,t,n){return In(e,t,n)}function Cn(e,t){var n=e.length,i=new(typeof Uint8Array!=void 0+""?Uint8Array:Array)(n);i[0]=i[n-1]=1,Rn(e,i,t,0,n-1);var r,s=[];for(r=0;r<n;r++)i[r]&&s.push(e[r]);return s}function Rn(e,t,n,i,r){var s,o,a,l=0;for(o=i+1;o<=r-1;o++)(a=In(e[o],e[i],e[r],!0))>l&&(s=o,l=a);l>n&&(t[s]=1,Rn(e,t,n,i,s),Rn(e,t,n,s,r))}function Mn(e,t){for(var n=[e[0]],i=1,r=0,s=e.length;i<s;i++)Dn(e[i],e[r])>t&&(n.push(e[i]),r=i);return r<s-1&&n.push(e[s-1]),n}function Ln(e,t,n,i,r){var s,o,a,l=i?Tn:zn(e,n),u=zn(t,n);for(Tn=u;;){if(!(l|u))return[e,t];if(l&u)return!1;a=zn(o=Nn(e,t,s=l||u,n,r),n),s===l?(e=o,l=a):(t=o,u=a)}}function Nn(e,t,n,i,r){var s,o,a=t.x-e.x,l=t.y-e.y,u=i.min,c=i.max;return 8&n?(s=e.x+a*(c.y-e.y)/l,o=c.y):4&n?(s=e.x+a*(u.y-e.y)/l,o=u.y):2&n?(s=c.x,o=e.y+l*(c.x-e.x)/a):1&n&&(s=u.x,o=e.y+l*(u.x-e.x)/a),new M(s,o,r)}function zn(e,t){var n=0;return e.x<t.min.x?n|=1:e.x>t.max.x&&(n|=2),e.y<t.min.y?n|=4:e.y>t.max.y&&(n|=8),n}function Dn(e,t){var n=t.x-e.x,i=t.y-e.y;return n*n+i*i}function In(e,t,n,i){var r,s=t.x,o=t.y,a=n.x-s,l=n.y-o,u=a*a+l*l;return u>0&&((r=((e.x-s)*a+(e.y-o)*l)/u)>1?(s=n.x,o=n.y):r>0&&(s+=a*r,o+=l*r)),a=e.x-s,l=e.y-o,i?a*a+l*l:new M(s,o)}function Fn(e){return!g(e[0])||"object"!=typeof e[0][0]&&void 0!==e[0][0]}function jn(e){return console.warn("Deprecated use of _flat, please use L.LineUtil.isFlat instead."),Fn(e)}function Bn(e,t){var n,i,r,s,o,a,l,u;if(!e||0===e.length)throw new Error("latlngs not passed");Fn(e)||(console.warn("latlngs are not flat! Only the first ring will be used"),e=e[0]);var c=U([0,0]),h=j(e);h.getNorthWest().distanceTo(h.getSouthWest())*h.getNorthEast().distanceTo(h.getNorthWest())<1700&&(c=An(e));var d=e.length,f=[];for(n=0;n<d;n++){var p=U(e[n]);f.push(t.project(U([p.lat-c.lat,p.lng-c.lng])))}for(n=0,i=0;n<d-1;n++)i+=f[n].distanceTo(f[n+1])/2;if(0===i)u=f[0];else for(n=0,s=0;n<d-1;n++)if(o=f[n],a=f[n+1],(s+=r=o.distanceTo(a))>i){l=(s-i)/r,u=[a.x-l*(a.x-o.x),a.y-l*(a.y-o.y)];break}var m=t.unproject(z(u));return U([m.lat+c.lat,m.lng+c.lng])}var Un={__proto__:null,simplify:kn,pointToSegmentDistance:On,closestPointOnSegment:Pn,clipSegment:Ln,_getEdgeIntersection:Nn,_getBitCode:zn,_sqClosestPointOnSegment:In,isFlat:Fn,_flat:jn,polylineCenter:Bn},Vn={project:function(e){return new M(e.lng,e.lat)},unproject:function(e){return new B(e.y,e.x)},bounds:new D([-180,-90],[180,90])},Gn={R:6378137,R_MINOR:6356752.314245179,bounds:new D([-20037508.34279,-15496570.73972],[20037508.34279,18764656.23138]),project:function(e){var t=Math.PI/180,n=this.R,i=e.lat*t,r=this.R_MINOR/n,s=Math.sqrt(1-r*r),o=s*Math.sin(i),a=Math.tan(Math.PI/4-i/2)/Math.pow((1-o)/(1+o),s/2);return i=-n*Math.log(Math.max(a,1e-10)),new M(e.lng*t*n,i)},unproject:function(e){for(var t,n=180/Math.PI,i=this.R,r=this.R_MINOR/i,s=Math.sqrt(1-r*r),o=Math.exp(-e.y/i),a=Math.PI/2-2*Math.atan(o),l=0,u=.1;l<15&&Math.abs(u)>1e-7;l++)t=s*Math.sin(a),t=Math.pow((1-t)/(1+t),s/2),a+=u=Math.PI/2-2*Math.atan(o*t)-a;return new B(a*n,e.x*n/i)}},$n={__proto__:null,LonLat:Vn,Mercator:Gn,SphericalMercator:q},Zn=n({},$,{code:"EPSG:3395",projection:Gn,transformation:function(){var e=.5/(Math.PI*Gn.R);return H(e,.5,-e,.5)}()}),qn=n({},$,{code:"EPSG:4326",projection:Vn,transformation:H(1/180,1,-1/180,.5)}),Wn=n({},G,{projection:Vn,transformation:H(1,0,-1,0),scale:function(e){return Math.pow(2,e)},zoom:function(e){return Math.log(e)/Math.LN2},distance:function(e,t){var n=t.lng-e.lng,i=t.lat-e.lat;return Math.sqrt(n*n+i*i)},infinite:!0});G.Earth=$,G.EPSG3395=Zn,G.EPSG3857=K,G.EPSG900913=Y,G.EPSG4326=qn,G.Simple=Wn;var Hn=R.extend({options:{pane:"overlayPane",attribution:null,bubblingMouseEvents:!0},addTo:function(e){return e.addLayer(this),this},remove:function(){return this.removeFrom(this._map||this._mapToAdd)},removeFrom:function(e){return e&&e.removeLayer(this),this},getPane:function(e){return this._map.getPane(e?this.options[e]||e:this.options.pane)},addInteractiveTarget:function(e){return this._map._targets[o(e)]=this,this},removeInteractiveTarget:function(e){return delete this._map._targets[o(e)],this},getAttribution:function(){return this.options.attribution},_layerAdd:function(e){var t=e.target;if(t.hasLayer(this)){if(this._map=t,this._zoomAnimated=t._zoomAnimated,this.getEvents){var n=this.getEvents();t.on(n,this),this.once("remove",function(){t.off(n,this)},this)}this.onAdd(t),this.fire("add"),t.fire("layeradd",{layer:this})}}});sn.include({addLayer:function(e){if(!e._layerAdd)throw new Error("The provided object is not a Layer.");var t=o(e);return this._layers[t]||(this._layers[t]=e,e._mapToAdd=this,e.beforeAdd&&e.beforeAdd(this),this.whenReady(e._layerAdd,e)),this},removeLayer:function(e){var t=o(e);return this._layers[t]?(this._loaded&&e.onRemove(this),delete this._layers[t],this._loaded&&(this.fire("layerremove",{layer:e}),e.fire("remove")),e._map=e._mapToAdd=null,this):this},hasLayer:function(e){return o(e)in this._layers},eachLayer:function(e,t){for(var n in this._layers)e.call(t,this._layers[n]);return this},_addLayers:function(e){for(var t=0,n=(e=e?g(e)?e:[e]:[]).length;t<n;t++)this.addLayer(e[t])},_addZoomLimit:function(e){isNaN(e.options.maxZoom)&&isNaN(e.options.minZoom)||(this._zoomBoundLayers[o(e)]=e,this._updateZoomLevels())},_removeZoomLimit:function(e){var t=o(e);this._zoomBoundLayers[t]&&(delete this._zoomBoundLayers[t],this._updateZoomLevels())},_updateZoomLevels:function(){var e=1/0,t=-1/0,n=this._getZoomSpan();for(var i in this._zoomBoundLayers){var r=this._zoomBoundLayers[i].options;e=void 0===r.minZoom?e:Math.min(e,r.minZoom),t=void 0===r.maxZoom?t:Math.max(t,r.maxZoom)}this._layersMaxZoom=t===-1/0?void 0:t,this._layersMinZoom=e===1/0?void 0:e,n!==this._getZoomSpan()&&this.fire("zoomlevelschange"),void 0===this.options.maxZoom&&this._layersMaxZoom&&this.getZoom()>this._layersMaxZoom&&this.setZoom(this._layersMaxZoom),void 0===this.options.minZoom&&this._layersMinZoom&&this.getZoom()<this._layersMinZoom&&this.setZoom(this._layersMinZoom)}});var Kn=Hn.extend({initialize:function(e,t){var n,i;if(f(this,t),this._layers={},e)for(n=0,i=e.length;n<i;n++)this.addLayer(e[n])},addLayer:function(e){var t=this.getLayerId(e);return this._layers[t]=e,this._map&&this._map.addLayer(e),this},removeLayer:function(e){var t=e in this._layers?e:this.getLayerId(e);return this._map&&this._layers[t]&&this._map.removeLayer(this._layers[t]),delete this._layers[t],this},hasLayer:function(e){return("number"==typeof e?e:this.getLayerId(e))in this._layers},clearLayers:function(){return this.eachLayer(this.removeLayer,this)},invoke:function(e){var t,n,i=Array.prototype.slice.call(arguments,1);for(t in this._layers)(n=this._layers[t])[e]&&n[e].apply(n,i);return this},onAdd:function(e){this.eachLayer(e.addLayer,e)},onRemove:function(e){this.eachLayer(e.removeLayer,e)},eachLayer:function(e,t){for(var n in this._layers)e.call(t,this._layers[n]);return this},getLayer:function(e){return this._layers[e]},getLayers:function(){var e=[];return this.eachLayer(e.push,e),e},setZIndex:function(e){return this.invoke("setZIndex",e)},getLayerId:function(e){return o(e)}}),Yn=function(e,t){return new Kn(e,t)},Xn=Kn.extend({addLayer:function(e){return this.hasLayer(e)?this:(e.addEventParent(this),Kn.prototype.addLayer.call(this,e),this.fire("layeradd",{layer:e}))},removeLayer:function(e){return this.hasLayer(e)?(e in this._layers&&(e=this._layers[e]),e.removeEventParent(this),Kn.prototype.removeLayer.call(this,e),this.fire("layerremove",{layer:e})):this},setStyle:function(e){return this.invoke("setStyle",e)},bringToFront:function(){return this.invoke("bringToFront")},bringToBack:function(){return this.invoke("bringToBack")},getBounds:function(){var e=new F;for(var t in this._layers){var n=this._layers[t];e.extend(n.getBounds?n.getBounds():n.getLatLng())}return e}}),Jn=function(e,t){return new Xn(e,t)},Qn=O.extend({options:{popupAnchor:[0,0],tooltipAnchor:[0,0],crossOrigin:!1},initialize:function(e){f(this,e)},createIcon:function(e){return this._createIcon("icon",e)},createShadow:function(e){return this._createIcon("shadow",e)},_createIcon:function(e,t){var n=this._getIconUrl(e);if(!n){if("icon"===e)throw new Error("iconUrl not set in Icon options (see the docs).");return null}var i=this._createImg(n,t&&"IMG"===t.tagName?t:null);return this._setIconStyles(i,e),(this.options.crossOrigin||""===this.options.crossOrigin)&&(i.crossOrigin=!0===this.options.crossOrigin?"":this.options.crossOrigin),i},_setIconStyles:function(e,t){var n=this.options,i=n[t+"Size"];"number"==typeof i&&(i=[i,i]);var r=z(i),s=z("shadow"===t&&n.shadowAnchor||n.iconAnchor||r&&r.divideBy(2,!0));e.className="leaflet-marker-"+t+" "+(n.className||""),s&&(e.style.marginLeft=-s.x+"px",e.style.marginTop=-s.y+"px"),r&&(e.style.width=r.x+"px",e.style.height=r.y+"px")},_createImg:function(e,t){return(t=t||document.createElement("img")).src=e,t},_getIconUrl:function(e){return Fe.retina&&this.options[e+"RetinaUrl"]||this.options[e+"Url"]}});function ei(e){return new Qn(e)}var ti=Qn.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(e){return"string"!=typeof ti.imagePath&&(ti.imagePath=this._detectIconPath()),(this.options.imagePath||ti.imagePath)+Qn.prototype._getIconUrl.call(this,e)},_stripUrl:function(e){var t=function(e,t,n){var i=t.exec(e);return i&&i[n]};return(e=t(e,/^url\((['"])?(.+)\1\)$/,2))&&t(e,/^(.*)marker-icon\.png$/,1)},_detectIconPath:function(){var e=mt("div","leaflet-default-icon-path",document.body),t=pt(e,"background-image")||pt(e,"backgroundImage");if(document.body.removeChild(e),t=this._stripUrl(t))return t;var n=document.querySelector('link[href$="leaflet.css"]');return n?n.href.substring(0,n.href.length-11-1):""}}),ni=yn.extend({initialize:function(e){this._marker=e},addHooks:function(){var e=this._marker._icon;this._draggable||(this._draggable=new xn(e,e,!0)),this._draggable.on({dragstart:this._onDragStart,predrag:this._onPreDrag,drag:this._onDrag,dragend:this._onDragEnd},this).enable(),xt(e,"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&&wt(this._marker._icon,"leaflet-marker-draggable")},moved:function(){return this._draggable&&this._draggable._moved},_adjustPan:function(e){var t=this._marker,n=t._map,i=this._marker.options.autoPanSpeed,r=this._marker.options.autoPanPadding,s=Ct(t._icon),o=n.getPixelBounds(),a=n.getPixelOrigin(),l=I(o.min._subtract(a).add(r),o.max._subtract(a).subtract(r));if(!l.contains(s)){var u=z((Math.max(l.max.x,s.x)-l.max.x)/(o.max.x-l.max.x)-(Math.min(l.min.x,s.x)-l.min.x)/(o.min.x-l.min.x),(Math.max(l.max.y,s.y)-l.max.y)/(o.max.y-l.max.y)-(Math.min(l.min.y,s.y)-l.min.y)/(o.min.y-l.min.y)).multiplyBy(i);n.panBy(u,{animate:!1}),this._draggable._newPos._add(u),this._draggable._startPos._add(u),Pt(t._icon,this._draggable._newPos),this._onDrag(e),this._panRequest=T(this._adjustPan.bind(this,e))}},_onDragStart:function(){this._oldLatLng=this._marker.getLatLng(),this._marker.closePopup&&this._marker.closePopup(),this._marker.fire("movestart").fire("dragstart")},_onPreDrag:function(e){this._marker.options.autoPan&&(S(this._panRequest),this._panRequest=T(this._adjustPan.bind(this,e)))},_onDrag:function(e){var t=this._marker,n=t._shadow,i=Ct(t._icon),r=t._map.layerPointToLatLng(i);n&&Pt(n,i),t._latlng=r,e.latlng=r,e.oldLatLng=this._oldLatLng,t.fire("move",e).fire("drag",e)},_onDragEnd:function(e){S(this._panRequest),delete this._oldLatLng,this._marker.fire("moveend").fire("dragend",e)}}),ii=Hn.extend({options:{icon:new ti,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(e,t){f(this,t),this._latlng=U(e)},onAdd:function(e){this._zoomAnimated=this._zoomAnimated&&e.options.markerZoomAnimation,this._zoomAnimated&&e.on("zoomanim",this._animateZoom,this),this._initIcon(),this.update()},onRemove:function(e){this.dragging&&this.dragging.enabled()&&(this.options.draggable=!0,this.dragging.removeHooks()),delete this.dragging,this._zoomAnimated&&e.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(e){var t=this._latlng;return this._latlng=U(e),this.update(),this.fire("move",{oldLatLng:t,latlng:this._latlng})},setZIndexOffset:function(e){return this.options.zIndexOffset=e,this.update()},getIcon:function(){return this.options.icon},setIcon:function(e){return this.options.icon=e,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 e=this._map.latLngToLayerPoint(this._latlng).round();this._setPos(e)}return this},_initIcon:function(){var e=this.options,t="leaflet-zoom-"+(this._zoomAnimated?"animated":"hide"),n=e.icon.createIcon(this._icon),i=!1;n!==this._icon&&(this._icon&&this._removeIcon(),i=!0,e.title&&(n.title=e.title),"IMG"===n.tagName&&(n.alt=e.alt||"")),xt(n,t),e.keyboard&&(n.tabIndex="0",n.setAttribute("role","button")),this._icon=n,e.riseOnHover&&this.on({mouseover:this._bringToFront,mouseout:this._resetZIndex}),this.options.autoPanOnFocus&&jt(n,"focus",this._panOnFocus,this);var r=e.icon.createShadow(this._shadow),s=!1;r!==this._shadow&&(this._removeShadow(),s=!0),r&&(xt(r,t),r.alt=""),this._shadow=r,e.opacity<1&&this._updateOpacity(),i&&this.getPane().appendChild(this._icon),this._initInteraction(),r&&s&&this.getPane(e.shadowPane).appendChild(this._shadow)},_removeIcon:function(){this.options.riseOnHover&&this.off({mouseover:this._bringToFront,mouseout:this._resetZIndex}),this.options.autoPanOnFocus&&Ut(this._icon,"focus",this._panOnFocus,this),_t(this._icon),this.removeInteractiveTarget(this._icon),this._icon=null},_removeShadow:function(){this._shadow&&_t(this._shadow),this._shadow=null},_setPos:function(e){this._icon&&Pt(this._icon,e),this._shadow&&Pt(this._shadow,e),this._zIndex=e.y+this.options.zIndexOffset,this._resetZIndex()},_updateZIndex:function(e){this._icon&&(this._icon.style.zIndex=this._zIndex+e)},_animateZoom:function(e){var t=this._map._latLngToNewLayerPoint(this._latlng,e.zoom,e.center).round();this._setPos(t)},_initInteraction:function(){if(this.options.interactive&&(xt(this._icon,"leaflet-interactive"),this.addInteractiveTarget(this._icon),ni)){var e=this.options.draggable;this.dragging&&(e=this.dragging.enabled(),this.dragging.disable()),this.dragging=new ni(this),e&&this.dragging.enable()}},setOpacity:function(e){return this.options.opacity=e,this._map&&this._updateOpacity(),this},_updateOpacity:function(){var e=this.options.opacity;this._icon&&Tt(this._icon,e),this._shadow&&Tt(this._shadow,e)},_bringToFront:function(){this._updateZIndex(this.options.riseOffset)},_resetZIndex:function(){this._updateZIndex(0)},_panOnFocus:function(){var e=this._map;if(e){var t=this.options.icon.options,n=t.iconSize?z(t.iconSize):z(0,0),i=t.iconAnchor?z(t.iconAnchor):z(0,0);e.panInside(this._latlng,{paddingTopLeft:i,paddingBottomRight:n.subtract(i)})}},_getPopupAnchor:function(){return this.options.icon.options.popupAnchor},_getTooltipAnchor:function(){return this.options.icon.options.tooltipAnchor}});function ri(e,t){return new ii(e,t)}var si=Hn.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(e){this._renderer=e.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(e){return f(this,e),this._renderer&&(this._renderer._updateStyle(this),this.options.stroke&&e&&Object.prototype.hasOwnProperty.call(e,"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)}}),oi=si.extend({options:{fill:!0,radius:10},initialize:function(e,t){f(this,t),this._latlng=U(e),this._radius=this.options.radius},setLatLng:function(e){var t=this._latlng;return this._latlng=U(e),this.redraw(),this.fire("move",{oldLatLng:t,latlng:this._latlng})},getLatLng:function(){return this._latlng},setRadius:function(e){return this.options.radius=this._radius=e,this.redraw()},getRadius:function(){return this._radius},setStyle:function(e){var t=e&&e.radius||this._radius;return si.prototype.setStyle.call(this,e),this.setRadius(t),this},_project:function(){this._point=this._map.latLngToLayerPoint(this._latlng),this._updateBounds()},_updateBounds:function(){var e=this._radius,t=this._radiusY||e,n=this._clickTolerance(),i=[e+n,t+n];this._pxBounds=new D(this._point.subtract(i),this._point.add(i))},_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(e){return e.distanceTo(this._point)<=this._radius+this._clickTolerance()}});function ai(e,t){return new oi(e,t)}var li=oi.extend({initialize:function(e,t,i){if("number"==typeof t&&(t=n({},i,{radius:t})),f(this,t),this._latlng=U(e),isNaN(this.options.radius))throw new Error("Circle radius cannot be NaN");this._mRadius=this.options.radius},setRadius:function(e){return this._mRadius=e,this.redraw()},getRadius:function(){return this._mRadius},getBounds:function(){var e=[this._radius,this._radiusY||this._radius];return new F(this._map.layerPointToLatLng(this._point.subtract(e)),this._map.layerPointToLatLng(this._point.add(e)))},setStyle:si.prototype.setStyle,_project:function(){var e=this._latlng.lng,t=this._latlng.lat,n=this._map,i=n.options.crs;if(i.distance===$.distance){var r=Math.PI/180,s=this._mRadius/$.R/r,o=n.project([t+s,e]),a=n.project([t-s,e]),l=o.add(a).divideBy(2),u=n.unproject(l).lat,c=Math.acos((Math.cos(s*r)-Math.sin(t*r)*Math.sin(u*r))/(Math.cos(t*r)*Math.cos(u*r)))/r;(isNaN(c)||0===c)&&(c=s/Math.cos(Math.PI/180*t)),this._point=l.subtract(n.getPixelOrigin()),this._radius=isNaN(c)?0:l.x-n.project([u,e-c]).x,this._radiusY=l.y-o.y}else{var h=i.unproject(i.project(this._latlng).subtract([this._mRadius,0]));this._point=n.latLngToLayerPoint(this._latlng),this._radius=this._point.x-n.latLngToLayerPoint(h).x}this._updateBounds()}});function ui(e,t,n){return new li(e,t,n)}var ci=si.extend({options:{smoothFactor:1,noClip:!1},initialize:function(e,t){f(this,t),this._setLatLngs(e)},getLatLngs:function(){return this._latlngs},setLatLngs:function(e){return this._setLatLngs(e),this.redraw()},isEmpty:function(){return!this._latlngs.length},closestLayerPoint:function(e){for(var t,n,i=1/0,r=null,s=In,o=0,a=this._parts.length;o<a;o++)for(var l=this._parts[o],u=1,c=l.length;u<c;u++){var h=s(e,t=l[u-1],n=l[u],!0);h<i&&(i=h,r=s(e,t,n))}return r&&(r.distance=Math.sqrt(i)),r},getCenter:function(){if(!this._map)throw new Error("Must add layer to map before using getCenter()");return Bn(this._defaultShape(),this._map.options.crs)},getBounds:function(){return this._bounds},addLatLng:function(e,t){return t=t||this._defaultShape(),e=U(e),t.push(e),this._bounds.extend(e),this.redraw()},_setLatLngs:function(e){this._bounds=new F,this._latlngs=this._convertLatLngs(e)},_defaultShape:function(){return Fn(this._latlngs)?this._latlngs:this._latlngs[0]},_convertLatLngs:function(e){for(var t=[],n=Fn(e),i=0,r=e.length;i<r;i++)n?(t[i]=U(e[i]),this._bounds.extend(t[i])):t[i]=this._convertLatLngs(e[i]);return t},_project:function(){var e=new D;this._rings=[],this._projectLatlngs(this._latlngs,this._rings,e),this._bounds.isValid()&&e.isValid()&&(this._rawPxBounds=e,this._updateBounds())},_updateBounds:function(){var e=this._clickTolerance(),t=new M(e,e);this._rawPxBounds&&(this._pxBounds=new D([this._rawPxBounds.min.subtract(t),this._rawPxBounds.max.add(t)]))},_projectLatlngs:function(e,t,n){var i,r,s=e[0]instanceof B,o=e.length;if(s){for(r=[],i=0;i<o;i++)r[i]=this._map.latLngToLayerPoint(e[i]),n.extend(r[i]);t.push(r)}else for(i=0;i<o;i++)this._projectLatlngs(e[i],t,n)},_clipPoints:function(){var e=this._renderer._bounds;if(this._parts=[],this._pxBounds&&this._pxBounds.intersects(e))if(this.options.noClip)this._parts=this._rings;else{var t,n,i,r,s,o,a,l=this._parts;for(t=0,i=0,r=this._rings.length;t<r;t++)for(n=0,s=(a=this._rings[t]).length;n<s-1;n++)(o=Ln(a[n],a[n+1],e,n,!0))&&(l[i]=l[i]||[],l[i].push(o[0]),o[1]===a[n+1]&&n!==s-2||(l[i].push(o[1]),i++))}},_simplifyPoints:function(){for(var e=this._parts,t=this.options.smoothFactor,n=0,i=e.length;n<i;n++)e[n]=kn(e[n],t)},_update:function(){this._map&&(this._clipPoints(),this._simplifyPoints(),this._updatePath())},_updatePath:function(){this._renderer._updatePoly(this)},_containsPoint:function(e,t){var n,i,r,s,o,a,l=this._clickTolerance();if(!this._pxBounds||!this._pxBounds.contains(e))return!1;for(n=0,s=this._parts.length;n<s;n++)for(i=0,r=(o=(a=this._parts[n]).length)-1;i<o;r=i++)if((t||0!==i)&&On(e,a[r],a[i])<=l)return!0;return!1}});function hi(e,t){return new ci(e,t)}ci._flat=jn;var di=ci.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 En(this._defaultShape(),this._map.options.crs)},_convertLatLngs:function(e){var t=ci.prototype._convertLatLngs.call(this,e),n=t.length;return n>=2&&t[0]instanceof B&&t[0].equals(t[n-1])&&t.pop(),t},_setLatLngs:function(e){ci.prototype._setLatLngs.call(this,e),Fn(this._latlngs)&&(this._latlngs=[this._latlngs])},_defaultShape:function(){return Fn(this._latlngs[0])?this._latlngs[0]:this._latlngs[0][0]},_clipPoints:function(){var e=this._renderer._bounds,t=this.options.weight,n=new M(t,t);if(e=new D(e.min.subtract(n),e.max.add(n)),this._parts=[],this._pxBounds&&this._pxBounds.intersects(e))if(this.options.noClip)this._parts=this._rings;else for(var i,r=0,s=this._rings.length;r<s;r++)(i=wn(this._rings[r],e,!0)).length&&this._parts.push(i)},_updatePath:function(){this._renderer._updatePoly(this,!0)},_containsPoint:function(e){var t,n,i,r,s,o,a,l,u=!1;if(!this._pxBounds||!this._pxBounds.contains(e))return!1;for(r=0,a=this._parts.length;r<a;r++)for(s=0,o=(l=(t=this._parts[r]).length)-1;s<l;o=s++)n=t[s],i=t[o],n.y>e.y!=i.y>e.y&&e.x<(i.x-n.x)*(e.y-n.y)/(i.y-n.y)+n.x&&(u=!u);return u||ci.prototype._containsPoint.call(this,e,!0)}});function fi(e,t){return new di(e,t)}var pi=Xn.extend({initialize:function(e,t){f(this,t),this._layers={},e&&this.addData(e)},addData:function(e){var t,n,i,r=g(e)?e:e.features;if(r){for(t=0,n=r.length;t<n;t++)((i=r[t]).geometries||i.geometry||i.features||i.coordinates)&&this.addData(i);return this}var s=this.options;if(s.filter&&!s.filter(e))return this;var o=mi(e,s);return o?(o.feature=wi(e),o.defaultOptions=o.options,this.resetStyle(o),s.onEachFeature&&s.onEachFeature(e,o),this.addLayer(o)):this},resetStyle:function(e){return void 0===e?this.eachLayer(this.resetStyle,this):(e.options=n({},e.defaultOptions),this._setLayerStyle(e,this.options.style),this)},setStyle:function(e){return this.eachLayer(function(t){this._setLayerStyle(t,e)},this)},_setLayerStyle:function(e,t){e.setStyle&&("function"==typeof t&&(t=t(e.feature)),e.setStyle(t))}});function mi(e,t){var n,i,r,s,o="Feature"===e.type?e.geometry:e,a=o?o.coordinates:null,l=[],u=t&&t.pointToLayer,c=t&&t.coordsToLatLng||gi;if(!a&&!o)return null;switch(o.type){case"Point":return _i(u,e,n=c(a),t);case"MultiPoint":for(r=0,s=a.length;r<s;r++)n=c(a[r]),l.push(_i(u,e,n,t));return new Xn(l);case"LineString":case"MultiLineString":return i=yi(a,"LineString"===o.type?0:1,c),new ci(i,t);case"Polygon":case"MultiPolygon":return i=yi(a,"Polygon"===o.type?1:2,c),new di(i,t);case"GeometryCollection":for(r=0,s=o.geometries.length;r<s;r++){var h=mi({geometry:o.geometries[r],type:"Feature",properties:e.properties},t);h&&l.push(h)}return new Xn(l);case"FeatureCollection":for(r=0,s=o.features.length;r<s;r++){var d=mi(o.features[r],t);d&&l.push(d)}return new Xn(l);default:throw new Error("Invalid GeoJSON object.")}}function _i(e,t,n,i){return e?e(t,n):new ii(n,i&&i.markersInheritOptions&&i)}function gi(e){return new B(e[1],e[0],e[2])}function yi(e,t,n){for(var i,r=[],s=0,o=e.length;s<o;s++)i=t?yi(e[s],t-1,n):(n||gi)(e[s]),r.push(i);return r}function vi(e,t){return void 0!==(e=U(e)).alt?[c(e.lng,t),c(e.lat,t),c(e.alt,t)]:[c(e.lng,t),c(e.lat,t)]}function bi(e,t,n,i){for(var r=[],s=0,o=e.length;s<o;s++)r.push(t?bi(e[s],Fn(e[s])?0:t-1,n,i):vi(e[s],i));return!t&&n&&r.length>0&&r.push(r[0].slice()),r}function xi(e,t){return e.feature?n({},e.feature,{geometry:t}):wi(t)}function wi(e){return"Feature"===e.type||"FeatureCollection"===e.type?e:{type:"Feature",properties:{},geometry:e}}var Ei={toGeoJSON:function(e){return xi(this,{type:"Point",coordinates:vi(this.getLatLng(),e)})}};function Ai(e,t){return new pi(e,t)}ii.include(Ei),li.include(Ei),oi.include(Ei),ci.include({toGeoJSON:function(e){var t=!Fn(this._latlngs);return xi(this,{type:(t?"Multi":"")+"LineString",coordinates:bi(this._latlngs,t?1:0,!1,e)})}}),di.include({toGeoJSON:function(e){var t=!Fn(this._latlngs),n=t&&!Fn(this._latlngs[0]),i=bi(this._latlngs,n?2:t?1:0,!0,e);return t||(i=[i]),xi(this,{type:(n?"Multi":"")+"Polygon",coordinates:i})}}),Kn.include({toMultiPoint:function(e){var t=[];return this.eachLayer(function(n){t.push(n.toGeoJSON(e).geometry.coordinates)}),xi(this,{type:"MultiPoint",coordinates:t})},toGeoJSON:function(e){var t=this.feature&&this.feature.geometry&&this.feature.geometry.type;if("MultiPoint"===t)return this.toMultiPoint(e);var n="GeometryCollection"===t,i=[];return this.eachLayer(function(t){if(t.toGeoJSON){var r=t.toGeoJSON(e);if(n)i.push(r.geometry);else{var s=wi(r);"FeatureCollection"===s.type?i.push.apply(i,s.features):i.push(s)}}}),n?xi(this,{geometries:i,type:"GeometryCollection"}):{type:"FeatureCollection",features:i}}});var Ti=Ai,Si=Hn.extend({options:{opacity:1,alt:"",interactive:!1,crossOrigin:!1,errorOverlayUrl:"",zIndex:1,className:""},initialize:function(e,t,n){this._url=e,this._bounds=j(t),f(this,n)},onAdd:function(){this._image||(this._initImage(),this.options.opacity<1&&this._updateOpacity()),this.options.interactive&&(xt(this._image,"leaflet-interactive"),this.addInteractiveTarget(this._image)),this.getPane().appendChild(this._image),this._reset()},onRemove:function(){_t(this._image),this.options.interactive&&this.removeInteractiveTarget(this._image)},setOpacity:function(e){return this.options.opacity=e,this._image&&this._updateOpacity(),this},setStyle:function(e){return e.opacity&&this.setOpacity(e.opacity),this},bringToFront:function(){return this._map&&yt(this._image),this},bringToBack:function(){return this._map&&vt(this._image),this},setUrl:function(e){return this._url=e,this._image&&(this._image.src=e),this},setBounds:function(e){return this._bounds=j(e),this._map&&this._reset(),this},getEvents:function(){var e={zoom:this._reset,viewreset:this._reset};return this._zoomAnimated&&(e.zoomanim=this._animateZoom),e},setZIndex:function(e){return this.options.zIndex=e,this._updateZIndex(),this},getBounds:function(){return this._bounds},getElement:function(){return this._image},_initImage:function(){var e="IMG"===this._url.tagName,t=this._image=e?this._url:mt("img");xt(t,"leaflet-image-layer"),this._zoomAnimated&&xt(t,"leaflet-zoom-animated"),this.options.className&&xt(t,this.options.className),t.onselectstart=u,t.onmousemove=u,t.onload=r(this.fire,this,"load"),t.onerror=r(this._overlayOnError,this,"error"),(this.options.crossOrigin||""===this.options.crossOrigin)&&(t.crossOrigin=!0===this.options.crossOrigin?"":this.options.crossOrigin),this.options.zIndex&&this._updateZIndex(),e?this._url=t.src:(t.src=this._url,t.alt=this.options.alt)},_animateZoom:function(e){var t=this._map.getZoomScale(e.zoom),n=this._map._latLngBoundsToNewLayerBounds(this._bounds,e.zoom,e.center).min;Ot(this._image,n,t)},_reset:function(){var e=this._image,t=new D(this._map.latLngToLayerPoint(this._bounds.getNorthWest()),this._map.latLngToLayerPoint(this._bounds.getSouthEast())),n=t.getSize();Pt(e,t.min),e.style.width=n.x+"px",e.style.height=n.y+"px"},_updateOpacity:function(){Tt(this._image,this.options.opacity)},_updateZIndex:function(){this._image&&void 0!==this.options.zIndex&&null!==this.options.zIndex&&(this._image.style.zIndex=this.options.zIndex)},_overlayOnError:function(){this.fire("error");var e=this.options.errorOverlayUrl;e&&this._url!==e&&(this._url=e,this._image.src=e)},getCenter:function(){return this._bounds.getCenter()}}),ki=function(e,t,n){return new Si(e,t,n)},Oi=Si.extend({options:{autoplay:!0,loop:!0,keepAspectRatio:!0,muted:!1,playsInline:!0},_initImage:function(){var e="VIDEO"===this._url.tagName,t=this._image=e?this._url:mt("video");if(xt(t,"leaflet-image-layer"),this._zoomAnimated&&xt(t,"leaflet-zoom-animated"),this.options.className&&xt(t,this.options.className),t.onselectstart=u,t.onmousemove=u,t.onloadeddata=r(this.fire,this,"load"),e){for(var n=t.getElementsByTagName("source"),i=[],s=0;s<n.length;s++)i.push(n[s].src);this._url=n.length>0?i:[t.src]}else{g(this._url)||(this._url=[this._url]),!this.options.keepAspectRatio&&Object.prototype.hasOwnProperty.call(t.style,"objectFit")&&(t.style.objectFit="fill"),t.autoplay=!!this.options.autoplay,t.loop=!!this.options.loop,t.muted=!!this.options.muted,t.playsInline=!!this.options.playsInline;for(var o=0;o<this._url.length;o++){var a=mt("source");a.src=this._url[o],t.appendChild(a)}}}});function Pi(e,t,n){return new Oi(e,t,n)}var Ci=Si.extend({_initImage:function(){var e=this._image=this._url;xt(e,"leaflet-image-layer"),this._zoomAnimated&&xt(e,"leaflet-zoom-animated"),this.options.className&&xt(e,this.options.className),e.onselectstart=u,e.onmousemove=u}});function Ri(e,t,n){return new Ci(e,t,n)}var Mi=Hn.extend({options:{interactive:!1,offset:[0,0],className:"",pane:void 0,content:""},initialize:function(e,t){e&&(e instanceof B||g(e))?(this._latlng=U(e),f(this,t)):(f(this,e),this._source=t),this.options.content&&(this._content=this.options.content)},openOn:function(e){return(e=arguments.length?e:this._source._map).hasLayer(this)||e.addLayer(this),this},close:function(){return this._map&&this._map.removeLayer(this),this},toggle:function(e){return this._map?this.close():(arguments.length?this._source=e:e=this._source,this._prepareOpen(),this.openOn(e._map)),this},onAdd:function(e){this._zoomAnimated=e._zoomAnimated,this._container||this._initLayout(),e._fadeAnimated&&Tt(this._container,0),clearTimeout(this._removeTimeout),this.getPane().appendChild(this._container),this.update(),e._fadeAnimated&&Tt(this._container,1),this.bringToFront(),this.options.interactive&&(xt(this._container,"leaflet-interactive"),this.addInteractiveTarget(this._container))},onRemove:function(e){e._fadeAnimated?(Tt(this._container,0),this._removeTimeout=setTimeout(r(_t,void 0,this._container),200)):_t(this._container),this.options.interactive&&(wt(this._container,"leaflet-interactive"),this.removeInteractiveTarget(this._container))},getLatLng:function(){return this._latlng},setLatLng:function(e){return this._latlng=U(e),this._map&&(this._updatePosition(),this._adjustPan()),this},getContent:function(){return this._content},setContent:function(e){return this._content=e,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 e={zoom:this._updatePosition,viewreset:this._updatePosition};return this._zoomAnimated&&(e.zoomanim=this._animateZoom),e},isOpen:function(){return!!this._map&&this._map.hasLayer(this)},bringToFront:function(){return this._map&&yt(this._container),this},bringToBack:function(){return this._map&&vt(this._container),this},_prepareOpen:function(e){var t=this._source;if(!t._map)return!1;if(t instanceof Xn){t=null;var n=this._source._layers;for(var i in n)if(n[i]._map){t=n[i];break}if(!t)return!1;this._source=t}if(!e)if(t.getCenter)e=t.getCenter();else if(t.getLatLng)e=t.getLatLng();else{if(!t.getBounds)throw new Error("Unable to get source layer LatLng.");e=t.getBounds().getCenter()}return this.setLatLng(e),this._map&&this.update(),!0},_updateContent:function(){if(this._content){var e=this._contentNode,t="function"==typeof this._content?this._content(this._source||this):this._content;if("string"==typeof t)e.innerHTML=t;else{for(;e.hasChildNodes();)e.removeChild(e.firstChild);e.appendChild(t)}this.fire("contentupdate")}},_updatePosition:function(){if(this._map){var e=this._map.latLngToLayerPoint(this._latlng),t=z(this.options.offset),n=this._getAnchor();this._zoomAnimated?Pt(this._container,e.add(n)):t=t.add(e).add(n);var i=this._containerBottom=-t.y,r=this._containerLeft=-Math.round(this._containerWidth/2)+t.x;this._container.style.bottom=i+"px",this._container.style.left=r+"px"}},_getAnchor:function(){return[0,0]}});sn.include({_initOverlay:function(e,t,n,i){var r=t;return r instanceof e||(r=new e(i).setContent(t)),n&&r.setLatLng(n),r}}),Hn.include({_initOverlay:function(e,t,n,i){var r=n;return r instanceof e?(f(r,i),r._source=this):(r=t&&!i?t:new e(i,this)).setContent(n),r}});var Li=Mi.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(e){return!(e=arguments.length?e:this._source._map).hasLayer(this)&&e._popup&&e._popup.options.autoClose&&e.removeLayer(e._popup),e._popup=this,Mi.prototype.openOn.call(this,e)},onAdd:function(e){Mi.prototype.onAdd.call(this,e),e.fire("popupopen",{popup:this}),this._source&&(this._source.fire("popupopen",{popup:this},!0),this._source instanceof si||this._source.on("preclick",qt))},onRemove:function(e){Mi.prototype.onRemove.call(this,e),e.fire("popupclose",{popup:this}),this._source&&(this._source.fire("popupclose",{popup:this},!0),this._source instanceof si||this._source.off("preclick",qt))},getEvents:function(){var e=Mi.prototype.getEvents.call(this);return(void 0!==this.options.closeOnClick?this.options.closeOnClick:this._map.options.closePopupOnClick)&&(e.preclick=this.close),this.options.keepInView&&(e.moveend=this._adjustPan),e},_initLayout:function(){var e="leaflet-popup",t=this._container=mt("div",e+" "+(this.options.className||"")+" leaflet-zoom-animated"),n=this._wrapper=mt("div",e+"-content-wrapper",t);if(this._contentNode=mt("div",e+"-content",n),Ht(t),Wt(this._contentNode),jt(t,"contextmenu",qt),this._tipContainer=mt("div",e+"-tip-container",t),this._tip=mt("div",e+"-tip",this._tipContainer),this.options.closeButton){var i=this._closeButton=mt("a",e+"-close-button",t);i.setAttribute("role","button"),i.setAttribute("aria-label","Close popup"),i.href="#close",i.innerHTML='<span aria-hidden="true">×</span>',jt(i,"click",function(e){Kt(e),this.close()},this)}},_updateLayout:function(){var e=this._contentNode,t=e.style;t.width="",t.whiteSpace="nowrap";var n=e.offsetWidth;n=Math.min(n,this.options.maxWidth),n=Math.max(n,this.options.minWidth),t.width=n+1+"px",t.whiteSpace="",t.height="";var i=e.offsetHeight,r=this.options.maxHeight,s="leaflet-popup-scrolled";r&&i>r?(t.height=r+"px",xt(e,s)):wt(e,s),this._containerWidth=this._container.offsetWidth},_animateZoom:function(e){var t=this._map._latLngToNewLayerPoint(this._latlng,e.zoom,e.center),n=this._getAnchor();Pt(this._container,t.add(n))},_adjustPan:function(){if(this.options.autoPan)if(this._map._panAnim&&this._map._panAnim.stop(),this._autopanning)this._autopanning=!1;else{var e=this._map,t=parseInt(pt(this._container,"marginBottom"),10)||0,n=this._container.offsetHeight+t,i=this._containerWidth,r=new M(this._containerLeft,-n-this._containerBottom);r._add(Ct(this._container));var s=e.layerPointToContainerPoint(r),o=z(this.options.autoPanPadding),a=z(this.options.autoPanPaddingTopLeft||o),l=z(this.options.autoPanPaddingBottomRight||o),u=e.getSize(),c=0,h=0;s.x+i+l.x>u.x&&(c=s.x+i-u.x+l.x),s.x-c-a.x<0&&(c=s.x-a.x),s.y+n+l.y>u.y&&(h=s.y+n-u.y+l.y),s.y-h-a.y<0&&(h=s.y-a.y),(c||h)&&(this.options.keepInView&&(this._autopanning=!0),e.fire("autopanstart").panBy([c,h]))}},_getAnchor:function(){return z(this._source&&this._source._getPopupAnchor?this._source._getPopupAnchor():[0,0])}}),Ni=function(e,t){return new Li(e,t)};sn.mergeOptions({closePopupOnClick:!0}),sn.include({openPopup:function(e,t,n){return this._initOverlay(Li,e,t,n).openOn(this),this},closePopup:function(e){return(e=arguments.length?e:this._popup)&&e.close(),this}}),Hn.include({bindPopup:function(e,t){return this._popup=this._initOverlay(Li,this._popup,e,t),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(e){return this._popup&&(this instanceof Xn||(this._popup._source=this),this._popup._prepareOpen(e||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()},setPopupContent:function(e){return this._popup&&this._popup.setContent(e),this},getPopup:function(){return this._popup},_openPopup:function(e){if(this._popup&&this._map){Yt(e);var t=e.layer||e.target;this._popup._source!==t||t instanceof si?(this._popup._source=t,this.openPopup(e.latlng)):this._map.hasLayer(this._popup)?this.closePopup():this.openPopup(e.latlng)}},_movePopup:function(e){this._popup.setLatLng(e.latlng)},_onKeyPress:function(e){13===e.originalEvent.keyCode&&this._openPopup(e)}});var zi=Mi.extend({options:{pane:"tooltipPane",offset:[0,0],direction:"auto",permanent:!1,sticky:!1,opacity:.9},onAdd:function(e){Mi.prototype.onAdd.call(this,e),this.setOpacity(this.options.opacity),e.fire("tooltipopen",{tooltip:this}),this._source&&(this.addEventParent(this._source),this._source.fire("tooltipopen",{tooltip:this},!0))},onRemove:function(e){Mi.prototype.onRemove.call(this,e),e.fire("tooltipclose",{tooltip:this}),this._source&&(this.removeEventParent(this._source),this._source.fire("tooltipclose",{tooltip:this},!0))},getEvents:function(){var e=Mi.prototype.getEvents.call(this);return this.options.permanent||(e.preclick=this.close),e},_initLayout:function(){var e="leaflet-tooltip "+(this.options.className||"")+" leaflet-zoom-"+(this._zoomAnimated?"animated":"hide");this._contentNode=this._container=mt("div",e),this._container.setAttribute("role","tooltip"),this._container.setAttribute("id","leaflet-tooltip-"+o(this))},_updateLayout:function(){},_adjustPan:function(){},_setPosition:function(e){var t,n,i=this._map,r=this._container,s=i.latLngToContainerPoint(i.getCenter()),o=i.layerPointToContainerPoint(e),a=this.options.direction,l=r.offsetWidth,u=r.offsetHeight,c=z(this.options.offset),h=this._getAnchor();"top"===a?(t=l/2,n=u):"bottom"===a?(t=l/2,n=0):"center"===a?(t=l/2,n=u/2):"right"===a?(t=0,n=u/2):"left"===a?(t=l,n=u/2):o.x<s.x?(a="right",t=0,n=u/2):(a="left",t=l+2*(c.x+h.x),n=u/2),e=e.subtract(z(t,n,!0)).add(c).add(h),wt(r,"leaflet-tooltip-right"),wt(r,"leaflet-tooltip-left"),wt(r,"leaflet-tooltip-top"),wt(r,"leaflet-tooltip-bottom"),xt(r,"leaflet-tooltip-"+a),Pt(r,e)},_updatePosition:function(){var e=this._map.latLngToLayerPoint(this._latlng);this._setPosition(e)},setOpacity:function(e){this.options.opacity=e,this._container&&Tt(this._container,e)},_animateZoom:function(e){var t=this._map._latLngToNewLayerPoint(this._latlng,e.zoom,e.center);this._setPosition(t)},_getAnchor:function(){return z(this._source&&this._source._getTooltipAnchor&&!this.options.sticky?this._source._getTooltipAnchor():[0,0])}}),Di=function(e,t){return new zi(e,t)};sn.include({openTooltip:function(e,t,n){return this._initOverlay(zi,e,t,n).openOn(this),this},closeTooltip:function(e){return e.close(),this}}),Hn.include({bindTooltip:function(e,t){return this._tooltip&&this.isTooltipOpen()&&this.unbindTooltip(),this._tooltip=this._initOverlay(zi,this._tooltip,e,t),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(e){if(e||!this._tooltipHandlersAdded){var t=e?"off":"on",n={remove:this.closeTooltip,move:this._moveTooltip};this._tooltip.options.permanent?n.add=this._openTooltip:(n.mouseover=this._openTooltip,n.mouseout=this.closeTooltip,n.click=this._openTooltip,this._map?this._addFocusListeners():n.add=this._addFocusListeners),this._tooltip.options.sticky&&(n.mousemove=this._moveTooltip),this[t](n),this._tooltipHandlersAdded=!e}},openTooltip:function(e){return this._tooltip&&(this instanceof Xn||(this._tooltip._source=this),this._tooltip._prepareOpen(e)&&(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(e){return this._tooltip&&this._tooltip.setContent(e),this},getTooltip:function(){return this._tooltip},_addFocusListeners:function(){this.getElement?this._addFocusListenersOnLayer(this):this.eachLayer&&this.eachLayer(this._addFocusListenersOnLayer,this)},_addFocusListenersOnLayer:function(e){var t="function"==typeof e.getElement&&e.getElement();t&&(jt(t,"focus",function(){this._tooltip._source=e,this.openTooltip()},this),jt(t,"blur",this.closeTooltip,this))},_setAriaDescribedByOnLayer:function(e){var t="function"==typeof e.getElement&&e.getElement();t&&t.setAttribute("aria-describedby",this._tooltip._container.id)},_openTooltip:function(e){if(this._tooltip&&this._map)if(this._map.dragging&&this._map.dragging.moving()&&!this._openOnceFlag){this._openOnceFlag=!0;var t=this;this._map.once("moveend",function(){t._openOnceFlag=!1,t._openTooltip(e)})}else this._tooltip._source=e.layer||e.target,this.openTooltip(this._tooltip.options.sticky?e.latlng:void 0)},_moveTooltip:function(e){var t,n,i=e.latlng;this._tooltip.options.sticky&&e.originalEvent&&(t=this._map.mouseEventToContainerPoint(e.originalEvent),n=this._map.containerPointToLayerPoint(t),i=this._map.layerPointToLatLng(n)),this._tooltip.setLatLng(i)}});var Ii=Qn.extend({options:{iconSize:[12,12],html:!1,bgPos:null,className:"leaflet-div-icon"},createIcon:function(e){var t=e&&"DIV"===e.tagName?e:document.createElement("div"),n=this.options;if(n.html instanceof Element?(gt(t),t.appendChild(n.html)):t.innerHTML=!1!==n.html?n.html:"",n.bgPos){var i=z(n.bgPos);t.style.backgroundPosition=-i.x+"px "+-i.y+"px"}return this._setIconStyles(t,"icon"),t},createShadow:function(){return null}});function Fi(e){return new Ii(e)}Qn.Default=ti;var ji=Hn.extend({options:{tileSize:256,opacity:1,updateWhenIdle:Fe.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(e){f(this,e)},onAdd:function(){this._initContainer(),this._levels={},this._tiles={},this._resetView()},beforeAdd:function(e){e._addZoomLimit(this)},onRemove:function(e){this._removeAllTiles(),_t(this._container),e._removeZoomLimit(this),this._container=null,this._tileZoom=void 0},bringToFront:function(){return this._map&&(yt(this._container),this._setAutoZIndex(Math.max)),this},bringToBack:function(){return this._map&&(vt(this._container),this._setAutoZIndex(Math.min)),this},getContainer:function(){return this._container},setOpacity:function(e){return this.options.opacity=e,this._updateOpacity(),this},setZIndex:function(e){return this.options.zIndex=e,this._updateZIndex(),this},isLoading:function(){return this._loading},redraw:function(){if(this._map){this._removeAllTiles();var e=this._clampZoom(this._map.getZoom());e!==this._tileZoom&&(this._tileZoom=e,this._updateLevels()),this._update()}return this},getEvents:function(){var e={viewprereset:this._invalidateAll,viewreset:this._resetView,zoom:this._resetView,moveend:this._onMoveEnd};return this.options.updateWhenIdle||(this._onMove||(this._onMove=a(this._onMoveEnd,this.options.updateInterval,this)),e.move=this._onMove),this._zoomAnimated&&(e.zoomanim=this._animateZoom),e},createTile:function(){return document.createElement("div")},getTileSize:function(){var e=this.options.tileSize;return e instanceof M?e:new M(e,e)},_updateZIndex:function(){this._container&&void 0!==this.options.zIndex&&null!==this.options.zIndex&&(this._container.style.zIndex=this.options.zIndex)},_setAutoZIndex:function(e){for(var t,n=this.getPane().children,i=-e(-1/0,1/0),r=0,s=n.length;r<s;r++)t=n[r].style.zIndex,n[r]!==this._container&&t&&(i=e(i,+t));isFinite(i)&&(this.options.zIndex=i+e(-1,1),this._updateZIndex())},_updateOpacity:function(){if(this._map&&!Fe.ielt9){Tt(this._container,this.options.opacity);var e=+new Date,t=!1,n=!1;for(var i in this._tiles){var r=this._tiles[i];if(r.current&&r.loaded){var s=Math.min(1,(e-r.loaded)/200);Tt(r.el,s),s<1?t=!0:(r.active?n=!0:this._onOpaqueTile(r),r.active=!0)}}n&&!this._noPrune&&this._pruneTiles(),t&&(S(this._fadeFrame),this._fadeFrame=T(this._updateOpacity,this))}},_onOpaqueTile:u,_initContainer:function(){this._container||(this._container=mt("div","leaflet-layer "+(this.options.className||"")),this._updateZIndex(),this.options.opacity<1&&this._updateOpacity(),this.getPane().appendChild(this._container))},_updateLevels:function(){var e=this._tileZoom,t=this.options.maxZoom;if(void 0!==e){for(var n in this._levels)n=Number(n),this._levels[n].el.children.length||n===e?(this._levels[n].el.style.zIndex=t-Math.abs(e-n),this._onUpdateLevel(n)):(_t(this._levels[n].el),this._removeTilesAtZoom(n),this._onRemoveLevel(n),delete this._levels[n]);var i=this._levels[e],r=this._map;return i||((i=this._levels[e]={}).el=mt("div","leaflet-tile-container leaflet-zoom-animated",this._container),i.el.style.zIndex=t,i.origin=r.project(r.unproject(r.getPixelOrigin()),e).round(),i.zoom=e,this._setZoomTransform(i,r.getCenter(),r.getZoom()),u(i.el.offsetWidth),this._onCreateLevel(i)),this._level=i,i}},_onUpdateLevel:u,_onRemoveLevel:u,_onCreateLevel:u,_pruneTiles:function(){if(this._map){var e,t,n=this._map.getZoom();if(n>this.options.maxZoom||n<this.options.minZoom)this._removeAllTiles();else{for(e in this._tiles)(t=this._tiles[e]).retain=t.current;for(e in this._tiles)if((t=this._tiles[e]).current&&!t.active){var i=t.coords;this._retainParent(i.x,i.y,i.z,i.z-5)||this._retainChildren(i.x,i.y,i.z,i.z+2)}for(e in this._tiles)this._tiles[e].retain||this._removeTile(e)}}},_removeTilesAtZoom:function(e){for(var t in this._tiles)this._tiles[t].coords.z===e&&this._removeTile(t)},_removeAllTiles:function(){for(var e in this._tiles)this._removeTile(e)},_invalidateAll:function(){for(var e in this._levels)_t(this._levels[e].el),this._onRemoveLevel(Number(e)),delete this._levels[e];this._removeAllTiles(),this._tileZoom=void 0},_retainParent:function(e,t,n,i){var r=Math.floor(e/2),s=Math.floor(t/2),o=n-1,a=new M(+r,+s);a.z=+o;var l=this._tileCoordsToKey(a),u=this._tiles[l];return u&&u.active?(u.retain=!0,!0):(u&&u.loaded&&(u.retain=!0),o>i&&this._retainParent(r,s,o,i))},_retainChildren:function(e,t,n,i){for(var r=2*e;r<2*e+2;r++)for(var s=2*t;s<2*t+2;s++){var o=new M(r,s);o.z=n+1;var a=this._tileCoordsToKey(o),l=this._tiles[a];l&&l.active?l.retain=!0:(l&&l.loaded&&(l.retain=!0),n+1<i&&this._retainChildren(r,s,n+1,i))}},_resetView:function(e){var t=e&&(e.pinch||e.flyTo);this._setView(this._map.getCenter(),this._map.getZoom(),t,t)},_animateZoom:function(e){this._setView(e.center,e.zoom,!0,e.noUpdate)},_clampZoom:function(e){var t=this.options;return void 0!==t.minNativeZoom&&e<t.minNativeZoom?t.minNativeZoom:void 0!==t.maxNativeZoom&&t.maxNativeZoom<e?t.maxNativeZoom:e},_setView:function(e,t,n,i){var r=Math.round(t);r=void 0!==this.options.maxZoom&&r>this.options.maxZoom||void 0!==this.options.minZoom&&r<this.options.minZoom?void 0:this._clampZoom(r);var s=this.options.updateWhenZooming&&r!==this._tileZoom;i&&!s||(this._tileZoom=r,this._abortLoading&&this._abortLoading(),this._updateLevels(),this._resetGrid(),void 0!==r&&this._update(e),n||this._pruneTiles(),this._noPrune=!!n),this._setZoomTransforms(e,t)},_setZoomTransforms:function(e,t){for(var n in this._levels)this._setZoomTransform(this._levels[n],e,t)},_setZoomTransform:function(e,t,n){var i=this._map.getZoomScale(n,e.zoom),r=e.origin.multiplyBy(i).subtract(this._map._getNewPixelOrigin(t,n)).round();Fe.any3d?Ot(e.el,r,i):Pt(e.el,r)},_resetGrid:function(){var e=this._map,t=e.options.crs,n=this._tileSize=this.getTileSize(),i=this._tileZoom,r=this._map.getPixelWorldBounds(this._tileZoom);r&&(this._globalTileRange=this._pxBoundsToTileRange(r)),this._wrapX=t.wrapLng&&!this.options.noWrap&&[Math.floor(e.project([0,t.wrapLng[0]],i).x/n.x),Math.ceil(e.project([0,t.wrapLng[1]],i).x/n.y)],this._wrapY=t.wrapLat&&!this.options.noWrap&&[Math.floor(e.project([t.wrapLat[0],0],i).y/n.x),Math.ceil(e.project([t.wrapLat[1],0],i).y/n.y)]},_onMoveEnd:function(){this._map&&!this._map._animatingZoom&&this._update()},_getTiledPixelBounds:function(e){var t=this._map,n=t._animatingZoom?Math.max(t._animateToZoom,t.getZoom()):t.getZoom(),i=t.getZoomScale(n,this._tileZoom),r=t.project(e,this._tileZoom).floor(),s=t.getSize().divideBy(2*i);return new D(r.subtract(s),r.add(s))},_update:function(e){var t=this._map;if(t){var n=this._clampZoom(t.getZoom());if(void 0===e&&(e=t.getCenter()),void 0!==this._tileZoom){var i=this._getTiledPixelBounds(e),r=this._pxBoundsToTileRange(i),s=r.getCenter(),o=[],a=this.options.keepBuffer,l=new D(r.getBottomLeft().subtract([a,-a]),r.getTopRight().add([a,-a]));if(!(isFinite(r.min.x)&&isFinite(r.min.y)&&isFinite(r.max.x)&&isFinite(r.max.y)))throw new Error("Attempted to load an infinite number of tiles");for(var u in this._tiles){var c=this._tiles[u].coords;c.z===this._tileZoom&&l.contains(new M(c.x,c.y))||(this._tiles[u].current=!1)}if(Math.abs(n-this._tileZoom)>1)this._setView(e,n);else{for(var h=r.min.y;h<=r.max.y;h++)for(var d=r.min.x;d<=r.max.x;d++){var f=new M(d,h);if(f.z=this._tileZoom,this._isValidTile(f)){var p=this._tiles[this._tileCoordsToKey(f)];p?p.current=!0:o.push(f)}}if(o.sort(function(e,t){return e.distanceTo(s)-t.distanceTo(s)}),0!==o.length){this._loading||(this._loading=!0,this.fire("loading"));var m=document.createDocumentFragment();for(d=0;d<o.length;d++)this._addTile(o[d],m);this._level.el.appendChild(m)}}}}},_isValidTile:function(e){var t=this._map.options.crs;if(!t.infinite){var n=this._globalTileRange;if(!t.wrapLng&&(e.x<n.min.x||e.x>n.max.x)||!t.wrapLat&&(e.y<n.min.y||e.y>n.max.y))return!1}if(!this.options.bounds)return!0;var i=this._tileCoordsToBounds(e);return j(this.options.bounds).overlaps(i)},_keyToBounds:function(e){return this._tileCoordsToBounds(this._keyToTileCoords(e))},_tileCoordsToNwSe:function(e){var t=this._map,n=this.getTileSize(),i=e.scaleBy(n),r=i.add(n);return[t.unproject(i,e.z),t.unproject(r,e.z)]},_tileCoordsToBounds:function(e){var t=this._tileCoordsToNwSe(e),n=new F(t[0],t[1]);return this.options.noWrap||(n=this._map.wrapLatLngBounds(n)),n},_tileCoordsToKey:function(e){return e.x+":"+e.y+":"+e.z},_keyToTileCoords:function(e){var t=e.split(":"),n=new M(+t[0],+t[1]);return n.z=+t[2],n},_removeTile:function(e){var t=this._tiles[e];t&&(_t(t.el),delete this._tiles[e],this.fire("tileunload",{tile:t.el,coords:this._keyToTileCoords(e)}))},_initTile:function(e){xt(e,"leaflet-tile");var t=this.getTileSize();e.style.width=t.x+"px",e.style.height=t.y+"px",e.onselectstart=u,e.onmousemove=u,Fe.ielt9&&this.options.opacity<1&&Tt(e,this.options.opacity)},_addTile:function(e,t){var n=this._getTilePos(e),i=this._tileCoordsToKey(e),s=this.createTile(this._wrapCoords(e),r(this._tileReady,this,e));this._initTile(s),this.createTile.length<2&&T(r(this._tileReady,this,e,null,s)),Pt(s,n),this._tiles[i]={el:s,coords:e,current:!0},t.appendChild(s),this.fire("tileloadstart",{tile:s,coords:e})},_tileReady:function(e,t,n){t&&this.fire("tileerror",{error:t,tile:n,coords:e});var i=this._tileCoordsToKey(e);(n=this._tiles[i])&&(n.loaded=+new Date,this._map._fadeAnimated?(Tt(n.el,0),S(this._fadeFrame),this._fadeFrame=T(this._updateOpacity,this)):(n.active=!0,this._pruneTiles()),t||(xt(n.el,"leaflet-tile-loaded"),this.fire("tileload",{tile:n.el,coords:e})),this._noTilesToLoad()&&(this._loading=!1,this.fire("load"),Fe.ielt9||!this._map._fadeAnimated?T(this._pruneTiles,this):setTimeout(r(this._pruneTiles,this),250)))},_getTilePos:function(e){return e.scaleBy(this.getTileSize()).subtract(this._level.origin)},_wrapCoords:function(e){var t=new M(this._wrapX?l(e.x,this._wrapX):e.x,this._wrapY?l(e.y,this._wrapY):e.y);return t.z=e.z,t},_pxBoundsToTileRange:function(e){var t=this.getTileSize();return new D(e.min.unscaleBy(t).floor(),e.max.unscaleBy(t).ceil().subtract([1,1]))},_noTilesToLoad:function(){for(var e in this._tiles)if(!this._tiles[e].loaded)return!1;return!0}});function Bi(e){return new ji(e)}var Ui=ji.extend({options:{minZoom:0,maxZoom:18,subdomains:"abc",errorTileUrl:"",zoomOffset:0,tms:!1,zoomReverse:!1,detectRetina:!1,crossOrigin:!1,referrerPolicy:!1},initialize:function(e,t){this._url=e,(t=f(this,t)).detectRetina&&Fe.retina&&t.maxZoom>0?(t.tileSize=Math.floor(t.tileSize/2),t.zoomReverse?(t.zoomOffset--,t.minZoom=Math.min(t.maxZoom,t.minZoom+1)):(t.zoomOffset++,t.maxZoom=Math.max(t.minZoom,t.maxZoom-1)),t.minZoom=Math.max(0,t.minZoom)):t.zoomReverse?t.minZoom=Math.min(t.maxZoom,t.minZoom):t.maxZoom=Math.max(t.minZoom,t.maxZoom),"string"==typeof t.subdomains&&(t.subdomains=t.subdomains.split("")),this.on("tileunload",this._onTileRemove)},setUrl:function(e,t){return this._url===e&&void 0===t&&(t=!0),this._url=e,t||this.redraw(),this},createTile:function(e,t){var n=document.createElement("img");return jt(n,"load",r(this._tileOnLoad,this,t,n)),jt(n,"error",r(this._tileOnError,this,t,n)),(this.options.crossOrigin||""===this.options.crossOrigin)&&(n.crossOrigin=!0===this.options.crossOrigin?"":this.options.crossOrigin),"string"==typeof this.options.referrerPolicy&&(n.referrerPolicy=this.options.referrerPolicy),n.alt="",n.src=this.getTileUrl(e),n},getTileUrl:function(e){var t={r:Fe.retina?"@2x":"",s:this._getSubdomain(e),x:e.x,y:e.y,z:this._getZoomForUrl()};if(this._map&&!this._map.options.crs.infinite){var i=this._globalTileRange.max.y-e.y;this.options.tms&&(t.y=i),t["-y"]=i}return _(this._url,n(t,this.options))},_tileOnLoad:function(e,t){Fe.ielt9?setTimeout(r(e,this,null,t),0):e(null,t)},_tileOnError:function(e,t,n){var i=this.options.errorTileUrl;i&&t.getAttribute("src")!==i&&(t.src=i),e(n,t)},_onTileRemove:function(e){e.tile.onload=null},_getZoomForUrl:function(){var e=this._tileZoom,t=this.options.maxZoom;return this.options.zoomReverse&&(e=t-e),e+this.options.zoomOffset},_getSubdomain:function(e){var t=Math.abs(e.x+e.y)%this.options.subdomains.length;return this.options.subdomains[t]},_abortLoading:function(){var e,t;for(e in this._tiles)if(this._tiles[e].coords.z!==this._tileZoom&&((t=this._tiles[e].el).onload=u,t.onerror=u,!t.complete)){t.src=v;var n=this._tiles[e].coords;_t(t),delete this._tiles[e],this.fire("tileabort",{tile:t,coords:n})}},_removeTile:function(e){var t=this._tiles[e];if(t)return t.el.setAttribute("src",v),ji.prototype._removeTile.call(this,e)},_tileReady:function(e,t,n){if(this._map&&(!n||n.getAttribute("src")!==v))return ji.prototype._tileReady.call(this,e,t,n)}});function Vi(e,t){return new Ui(e,t)}var Gi=Ui.extend({defaultWmsParams:{service:"WMS",request:"GetMap",layers:"",styles:"",format:"image/jpeg",transparent:!1,version:"1.1.1"},options:{crs:null,uppercase:!1},initialize:function(e,t){this._url=e;var i=n({},this.defaultWmsParams);for(var r in t)r in this.options||(i[r]=t[r]);var s=(t=f(this,t)).detectRetina&&Fe.retina?2:1,o=this.getTileSize();i.width=o.x*s,i.height=o.y*s,this.wmsParams=i},onAdd:function(e){this._crs=this.options.crs||e.options.crs,this._wmsVersion=parseFloat(this.wmsParams.version);var t=this._wmsVersion>=1.3?"crs":"srs";this.wmsParams[t]=this._crs.code,Ui.prototype.onAdd.call(this,e)},getTileUrl:function(e){var t=this._tileCoordsToNwSe(e),n=this._crs,i=I(n.project(t[0]),n.project(t[1])),r=i.min,s=i.max,o=(this._wmsVersion>=1.3&&this._crs===qn?[r.y,r.x,s.y,s.x]:[r.x,r.y,s.x,s.y]).join(","),a=Ui.prototype.getTileUrl.call(this,e);return a+p(this.wmsParams,a,this.options.uppercase)+(this.options.uppercase?"&BBOX=":"&bbox=")+o},setParams:function(e,t){return n(this.wmsParams,e),t||this.redraw(),this}});function $i(e,t){return new Gi(e,t)}Ui.WMS=Gi,Vi.wms=$i;var Zi=Hn.extend({options:{padding:.1},initialize:function(e){f(this,e),o(this),this._layers=this._layers||{}},onAdd:function(){this._container||(this._initContainer(),xt(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 e={viewreset:this._reset,zoom:this._onZoom,moveend:this._update,zoomend:this._onZoomEnd};return this._zoomAnimated&&(e.zoomanim=this._onAnimZoom),e},_onAnimZoom:function(e){this._updateTransform(e.center,e.zoom)},_onZoom:function(){this._updateTransform(this._map.getCenter(),this._map.getZoom())},_updateTransform:function(e,t){var n=this._map.getZoomScale(t,this._zoom),i=this._map.getSize().multiplyBy(.5+this.options.padding),r=this._map.project(this._center,t),s=i.multiplyBy(-n).add(r).subtract(this._map._getNewPixelOrigin(e,t));Fe.any3d?Ot(this._container,s,n):Pt(this._container,s)},_reset:function(){for(var e in this._update(),this._updateTransform(this._center,this._zoom),this._layers)this._layers[e]._reset()},_onZoomEnd:function(){for(var e in this._layers)this._layers[e]._project()},_updatePaths:function(){for(var e in this._layers)this._layers[e]._update()},_update:function(){var e=this.options.padding,t=this._map.getSize(),n=this._map.containerPointToLayerPoint(t.multiplyBy(-e)).round();this._bounds=new D(n,n.add(t.multiplyBy(1+2*e)).round()),this._center=this._map.getCenter(),this._zoom=this._map.getZoom()}}),qi=Zi.extend({options:{tolerance:0},getEvents:function(){var e=Zi.prototype.getEvents.call(this);return e.viewprereset=this._onViewPreReset,e},_onViewPreReset:function(){this._postponeUpdatePaths=!0},onAdd:function(){Zi.prototype.onAdd.call(this),this._draw()},_initContainer:function(){var e=this._container=document.createElement("canvas");jt(e,"mousemove",this._onMouseMove,this),jt(e,"click dblclick mousedown mouseup contextmenu",this._onClick,this),jt(e,"mouseout",this._handleMouseOut,this),e._leaflet_disable_events=!0,this._ctx=e.getContext("2d")},_destroyContainer:function(){S(this._redrawRequest),delete this._ctx,_t(this._container),Ut(this._container),delete this._container},_updatePaths:function(){if(!this._postponeUpdatePaths){for(var e in this._redrawBounds=null,this._layers)this._layers[e]._update();this._redraw()}},_update:function(){if(!this._map._animatingZoom||!this._bounds){Zi.prototype._update.call(this);var e=this._bounds,t=this._container,n=e.getSize(),i=Fe.retina?2:1;Pt(t,e.min),t.width=i*n.x,t.height=i*n.y,t.style.width=n.x+"px",t.style.height=n.y+"px",Fe.retina&&this._ctx.scale(2,2),this._ctx.translate(-e.min.x,-e.min.y),this.fire("update")}},_reset:function(){Zi.prototype._reset.call(this),this._postponeUpdatePaths&&(this._postponeUpdatePaths=!1,this._updatePaths())},_initPath:function(e){this._updateDashArray(e),this._layers[o(e)]=e;var t=e._order={layer:e,prev:this._drawLast,next:null};this._drawLast&&(this._drawLast.next=t),this._drawLast=t,this._drawFirst=this._drawFirst||this._drawLast},_addPath:function(e){this._requestRedraw(e)},_removePath:function(e){var t=e._order,n=t.next,i=t.prev;n?n.prev=i:this._drawLast=i,i?i.next=n:this._drawFirst=n,delete e._order,delete this._layers[o(e)],this._requestRedraw(e)},_updatePath:function(e){this._extendRedrawBounds(e),e._project(),e._update(),this._requestRedraw(e)},_updateStyle:function(e){this._updateDashArray(e),this._requestRedraw(e)},_updateDashArray:function(e){if("string"==typeof e.options.dashArray){var t,n,i=e.options.dashArray.split(/[, ]+/),r=[];for(n=0;n<i.length;n++){if(t=Number(i[n]),isNaN(t))return;r.push(t)}e.options._dashArray=r}else e.options._dashArray=e.options.dashArray},_requestRedraw:function(e){this._map&&(this._extendRedrawBounds(e),this._redrawRequest=this._redrawRequest||T(this._redraw,this))},_extendRedrawBounds:function(e){if(e._pxBounds){var t=(e.options.weight||0)+1;this._redrawBounds=this._redrawBounds||new D,this._redrawBounds.extend(e._pxBounds.min.subtract([t,t])),this._redrawBounds.extend(e._pxBounds.max.add([t,t]))}},_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 e=this._redrawBounds;if(e){var t=e.getSize();this._ctx.clearRect(e.min.x,e.min.y,t.x,t.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 e,t=this._redrawBounds;if(this._ctx.save(),t){var n=t.getSize();this._ctx.beginPath(),this._ctx.rect(t.min.x,t.min.y,n.x,n.y),this._ctx.clip()}this._drawing=!0;for(var i=this._drawFirst;i;i=i.next)e=i.layer,(!t||e._pxBounds&&e._pxBounds.intersects(t))&&e._updatePath();this._drawing=!1,this._ctx.restore()},_updatePoly:function(e,t){if(this._drawing){var n,i,r,s,o=e._parts,a=o.length,l=this._ctx;if(a){for(l.beginPath(),n=0;n<a;n++){for(i=0,r=o[n].length;i<r;i++)s=o[n][i],l[i?"lineTo":"moveTo"](s.x,s.y);t&&l.closePath()}this._fillStroke(l,e)}}},_updateCircle:function(e){if(this._drawing&&!e._empty()){var t=e._point,n=this._ctx,i=Math.max(Math.round(e._radius),1),r=(Math.max(Math.round(e._radiusY),1)||i)/i;1!==r&&(n.save(),n.scale(1,r)),n.beginPath(),n.arc(t.x,t.y/r,i,0,2*Math.PI,!1),1!==r&&n.restore(),this._fillStroke(n,e)}},_fillStroke:function(e,t){var n=t.options;n.fill&&(e.globalAlpha=n.fillOpacity,e.fillStyle=n.fillColor||n.color,e.fill(n.fillRule||"evenodd")),n.stroke&&0!==n.weight&&(e.setLineDash&&e.setLineDash(t.options&&t.options._dashArray||[]),e.globalAlpha=n.opacity,e.lineWidth=n.weight,e.strokeStyle=n.color,e.lineCap=n.lineCap,e.lineJoin=n.lineJoin,e.stroke())},_onClick:function(e){for(var t,n,i=this._map.mouseEventToLayerPoint(e),r=this._drawFirst;r;r=r.next)(t=r.layer).options.interactive&&t._containsPoint(i)&&("click"!==e.type&&"preclick"!==e.type||!this._map._draggableMoved(t))&&(n=t);this._fireEvent(!!n&&[n],e)},_onMouseMove:function(e){if(this._map&&!this._map.dragging.moving()&&!this._map._animatingZoom){var t=this._map.mouseEventToLayerPoint(e);this._handleMouseHover(e,t)}},_handleMouseOut:function(e){var t=this._hoveredLayer;t&&(wt(this._container,"leaflet-interactive"),this._fireEvent([t],e,"mouseout"),this._hoveredLayer=null,this._mouseHoverThrottled=!1)},_handleMouseHover:function(e,t){if(!this._mouseHoverThrottled){for(var n,i,s=this._drawFirst;s;s=s.next)(n=s.layer).options.interactive&&n._containsPoint(t)&&(i=n);i!==this._hoveredLayer&&(this._handleMouseOut(e),i&&(xt(this._container,"leaflet-interactive"),this._fireEvent([i],e,"mouseover"),this._hoveredLayer=i)),this._fireEvent(!!this._hoveredLayer&&[this._hoveredLayer],e),this._mouseHoverThrottled=!0,setTimeout(r(function(){this._mouseHoverThrottled=!1},this),32)}},_fireEvent:function(e,t,n){this._map._fireDOMEvent(t,n||t.type,e)},_bringToFront:function(e){var t=e._order;if(t){var n=t.next,i=t.prev;n&&(n.prev=i,i?i.next=n:n&&(this._drawFirst=n),t.prev=this._drawLast,this._drawLast.next=t,t.next=null,this._drawLast=t,this._requestRedraw(e))}},_bringToBack:function(e){var t=e._order;if(t){var n=t.next,i=t.prev;i&&(i.next=n,n?n.prev=i:i&&(this._drawLast=i),t.prev=null,t.next=this._drawFirst,this._drawFirst.prev=t,this._drawFirst=t,this._requestRedraw(e))}}});function Wi(e){return Fe.canvas?new qi(e):null}var Hi=function(){try{return document.namespaces.add("lvml","urn:schemas-microsoft-com:vml"),function(e){return document.createElement("<lvml:"+e+' class="lvml">')}}catch(e){}return function(e){return document.createElement("<"+e+' xmlns="urn:schemas-microsoft.com:vml" class="lvml">')}}(),Ki={_initContainer:function(){this._container=mt("div","leaflet-vml-container")},_update:function(){this._map._animatingZoom||(Zi.prototype._update.call(this),this.fire("update"))},_initPath:function(e){var t=e._container=Hi("shape");xt(t,"leaflet-vml-shape "+(this.options.className||"")),t.coordsize="1 1",e._path=Hi("path"),t.appendChild(e._path),this._updateStyle(e),this._layers[o(e)]=e},_addPath:function(e){var t=e._container;this._container.appendChild(t),e.options.interactive&&e.addInteractiveTarget(t)},_removePath:function(e){var t=e._container;_t(t),e.removeInteractiveTarget(t),delete this._layers[o(e)]},_updateStyle:function(e){var t=e._stroke,n=e._fill,i=e.options,r=e._container;r.stroked=!!i.stroke,r.filled=!!i.fill,i.stroke?(t||(t=e._stroke=Hi("stroke")),r.appendChild(t),t.weight=i.weight+"px",t.color=i.color,t.opacity=i.opacity,i.dashArray?t.dashStyle=g(i.dashArray)?i.dashArray.join(" "):i.dashArray.replace(/( *, *)/g," "):t.dashStyle="",t.endcap=i.lineCap.replace("butt","flat"),t.joinstyle=i.lineJoin):t&&(r.removeChild(t),e._stroke=null),i.fill?(n||(n=e._fill=Hi("fill")),r.appendChild(n),n.color=i.fillColor||i.color,n.opacity=i.fillOpacity):n&&(r.removeChild(n),e._fill=null)},_updateCircle:function(e){var t=e._point.round(),n=Math.round(e._radius),i=Math.round(e._radiusY||n);this._setPath(e,e._empty()?"M0 0":"AL "+t.x+","+t.y+" "+n+","+i+" 0,23592600")},_setPath:function(e,t){e._path.v=t},_bringToFront:function(e){yt(e._container)},_bringToBack:function(e){vt(e._container)}},Yi=Fe.vml?Hi:X,Xi=Zi.extend({_initContainer:function(){this._container=Yi("svg"),this._container.setAttribute("pointer-events","none"),this._rootGroup=Yi("g"),this._container.appendChild(this._rootGroup)},_destroyContainer:function(){_t(this._container),Ut(this._container),delete this._container,delete this._rootGroup,delete this._svgSize},_update:function(){if(!this._map._animatingZoom||!this._bounds){Zi.prototype._update.call(this);var e=this._bounds,t=e.getSize(),n=this._container;this._svgSize&&this._svgSize.equals(t)||(this._svgSize=t,n.setAttribute("width",t.x),n.setAttribute("height",t.y)),Pt(n,e.min),n.setAttribute("viewBox",[e.min.x,e.min.y,t.x,t.y].join(" ")),this.fire("update")}},_initPath:function(e){var t=e._path=Yi("path");e.options.className&&xt(t,e.options.className),e.options.interactive&&xt(t,"leaflet-interactive"),this._updateStyle(e),this._layers[o(e)]=e},_addPath:function(e){this._rootGroup||this._initContainer(),this._rootGroup.appendChild(e._path),e.addInteractiveTarget(e._path)},_removePath:function(e){_t(e._path),e.removeInteractiveTarget(e._path),delete this._layers[o(e)]},_updatePath:function(e){e._project(),e._update()},_updateStyle:function(e){var t=e._path,n=e.options;t&&(n.stroke?(t.setAttribute("stroke",n.color),t.setAttribute("stroke-opacity",n.opacity),t.setAttribute("stroke-width",n.weight),t.setAttribute("stroke-linecap",n.lineCap),t.setAttribute("stroke-linejoin",n.lineJoin),n.dashArray?t.setAttribute("stroke-dasharray",n.dashArray):t.removeAttribute("stroke-dasharray"),n.dashOffset?t.setAttribute("stroke-dashoffset",n.dashOffset):t.removeAttribute("stroke-dashoffset")):t.setAttribute("stroke","none"),n.fill?(t.setAttribute("fill",n.fillColor||n.color),t.setAttribute("fill-opacity",n.fillOpacity),t.setAttribute("fill-rule",n.fillRule||"evenodd")):t.setAttribute("fill","none"))},_updatePoly:function(e,t){this._setPath(e,J(e._parts,t))},_updateCircle:function(e){var t=e._point,n=Math.max(Math.round(e._radius),1),i="a"+n+","+(Math.max(Math.round(e._radiusY),1)||n)+" 0 1,0 ",r=e._empty()?"M0 0":"M"+(t.x-n)+","+t.y+i+2*n+",0 "+i+2*-n+",0 ";this._setPath(e,r)},_setPath:function(e,t){e._path.setAttribute("d",t)},_bringToFront:function(e){yt(e._path)},_bringToBack:function(e){vt(e._path)}});function Ji(e){return Fe.svg||Fe.vml?new Xi(e):null}Fe.vml&&Xi.include(Ki),sn.include({getRenderer:function(e){var t=e.options.renderer||this._getPaneRenderer(e.options.pane)||this.options.renderer||this._renderer;return t||(t=this._renderer=this._createRenderer()),this.hasLayer(t)||this.addLayer(t),t},_getPaneRenderer:function(e){if("overlayPane"===e||void 0===e)return!1;var t=this._paneRenderers[e];return void 0===t&&(t=this._createRenderer({pane:e}),this._paneRenderers[e]=t),t},_createRenderer:function(e){return this.options.preferCanvas&&Wi(e)||Ji(e)}});var Qi=di.extend({initialize:function(e,t){di.prototype.initialize.call(this,this._boundsToLatLngs(e),t)},setBounds:function(e){return this.setLatLngs(this._boundsToLatLngs(e))},_boundsToLatLngs:function(e){return[(e=j(e)).getSouthWest(),e.getNorthWest(),e.getNorthEast(),e.getSouthEast()]}});function er(e,t){return new Qi(e,t)}Xi.create=Yi,Xi.pointsToPath=J,pi.geometryToLayer=mi,pi.coordsToLatLng=gi,pi.coordsToLatLngs=yi,pi.latLngToCoords=vi,pi.latLngsToCoords=bi,pi.getFeature=xi,pi.asFeature=wi,sn.mergeOptions({boxZoom:!0});var tr=yn.extend({initialize:function(e){this._map=e,this._container=e._container,this._pane=e._panes.overlayPane,this._resetStateTimeout=0,e.on("unload",this._destroy,this)},addHooks:function(){jt(this._container,"mousedown",this._onMouseDown,this)},removeHooks:function(){Ut(this._container,"mousedown",this._onMouseDown,this)},moved:function(){return this._moved},_destroy:function(){_t(this._pane),delete this._pane},_resetState:function(){this._resetStateTimeout=0,this._moved=!1},_clearDeferredResetState:function(){0!==this._resetStateTimeout&&(clearTimeout(this._resetStateTimeout),this._resetStateTimeout=0)},_onMouseDown:function(e){if(!e.shiftKey||1!==e.which&&1!==e.button)return!1;this._clearDeferredResetState(),this._resetState(),st(),Mt(),this._startPoint=this._map.mouseEventToContainerPoint(e),jt(document,{contextmenu:Yt,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseMove:function(e){this._moved||(this._moved=!0,this._box=mt("div","leaflet-zoom-box",this._container),xt(this._container,"leaflet-crosshair"),this._map.fire("boxzoomstart")),this._point=this._map.mouseEventToContainerPoint(e);var t=new D(this._point,this._startPoint),n=t.getSize();Pt(this._box,t.min),this._box.style.width=n.x+"px",this._box.style.height=n.y+"px"},_finish:function(){this._moved&&(_t(this._box),wt(this._container,"leaflet-crosshair")),ot(),Lt(),Ut(document,{contextmenu:Yt,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseUp:function(e){if((1===e.which||1===e.button)&&(this._finish(),this._moved)){this._clearDeferredResetState(),this._resetStateTimeout=setTimeout(r(this._resetState,this),0);var t=new F(this._map.containerPointToLatLng(this._startPoint),this._map.containerPointToLatLng(this._point));this._map.fitBounds(t).fire("boxzoomend",{boxZoomBounds:t})}},_onKeyDown:function(e){27===e.keyCode&&(this._finish(),this._clearDeferredResetState(),this._resetState())}});sn.addInitHook("addHandler","boxZoom",tr),sn.mergeOptions({doubleClickZoom:!0});var nr=yn.extend({addHooks:function(){this._map.on("dblclick",this._onDoubleClick,this)},removeHooks:function(){this._map.off("dblclick",this._onDoubleClick,this)},_onDoubleClick:function(e){var t=this._map,n=t.getZoom(),i=t.options.zoomDelta,r=e.originalEvent.shiftKey?n-i:n+i;"center"===t.options.doubleClickZoom?t.setZoom(r):t.setZoomAround(e.containerPoint,r)}});sn.addInitHook("addHandler","doubleClickZoom",nr),sn.mergeOptions({dragging:!0,inertia:!0,inertiaDeceleration:3400,inertiaMaxSpeed:1/0,easeLinearity:.2,worldCopyJump:!1,maxBoundsViscosity:0});var ir=yn.extend({addHooks:function(){if(!this._draggable){var e=this._map;this._draggable=new xn(e._mapPane,e._container),this._draggable.on({dragstart:this._onDragStart,drag:this._onDrag,dragend:this._onDragEnd},this),this._draggable.on("predrag",this._onPreDragLimit,this),e.options.worldCopyJump&&(this._draggable.on("predrag",this._onPreDragWrap,this),e.on("zoomend",this._onZoomEnd,this),e.whenReady(this._onZoomEnd,this))}xt(this._map._container,"leaflet-grab leaflet-touch-drag"),this._draggable.enable(),this._positions=[],this._times=[]},removeHooks:function(){wt(this._map._container,"leaflet-grab"),wt(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 e=this._map;if(e._stop(),this._map.options.maxBounds&&this._map.options.maxBoundsViscosity){var t=j(this._map.options.maxBounds);this._offsetLimit=I(this._map.latLngToContainerPoint(t.getNorthWest()).multiplyBy(-1),this._map.latLngToContainerPoint(t.getSouthEast()).multiplyBy(-1).add(this._map.getSize())),this._viscosity=Math.min(1,Math.max(0,this._map.options.maxBoundsViscosity))}else this._offsetLimit=null;e.fire("movestart").fire("dragstart"),e.options.inertia&&(this._positions=[],this._times=[])},_onDrag:function(e){if(this._map.options.inertia){var t=this._lastTime=+new Date,n=this._lastPos=this._draggable._absPos||this._draggable._newPos;this._positions.push(n),this._times.push(t),this._prunePositions(t)}this._map.fire("move",e).fire("drag",e)},_prunePositions:function(e){for(;this._positions.length>1&&e-this._times[0]>50;)this._positions.shift(),this._times.shift()},_onZoomEnd:function(){var e=this._map.getSize().divideBy(2),t=this._map.latLngToLayerPoint([0,0]);this._initialWorldOffset=t.subtract(e).x,this._worldWidth=this._map.getPixelWorldBounds().getSize().x},_viscousLimit:function(e,t){return e-(e-t)*this._viscosity},_onPreDragLimit:function(){if(this._viscosity&&this._offsetLimit){var e=this._draggable._newPos.subtract(this._draggable._startPos),t=this._offsetLimit;e.x<t.min.x&&(e.x=this._viscousLimit(e.x,t.min.x)),e.y<t.min.y&&(e.y=this._viscousLimit(e.y,t.min.y)),e.x>t.max.x&&(e.x=this._viscousLimit(e.x,t.max.x)),e.y>t.max.y&&(e.y=this._viscousLimit(e.y,t.max.y)),this._draggable._newPos=this._draggable._startPos.add(e)}},_onPreDragWrap:function(){var e=this._worldWidth,t=Math.round(e/2),n=this._initialWorldOffset,i=this._draggable._newPos.x,r=(i-t+n)%e+t-n,s=(i+t+n)%e-t-n,o=Math.abs(r+n)<Math.abs(s+n)?r:s;this._draggable._absPos=this._draggable._newPos.clone(),this._draggable._newPos.x=o},_onDragEnd:function(e){var t=this._map,n=t.options,i=!n.inertia||e.noInertia||this._times.length<2;if(t.fire("dragend",e),i)t.fire("moveend");else{this._prunePositions(+new Date);var r=this._lastPos.subtract(this._positions[0]),s=(this._lastTime-this._times[0])/1e3,o=n.easeLinearity,a=r.multiplyBy(o/s),l=a.distanceTo([0,0]),u=Math.min(n.inertiaMaxSpeed,l),c=a.multiplyBy(u/l),h=u/(n.inertiaDeceleration*o),d=c.multiplyBy(-h/2).round();d.x||d.y?(d=t._limitOffset(d,t.options.maxBounds),T(function(){t.panBy(d,{duration:h,easeLinearity:o,noMoveStart:!0,animate:!0})})):t.fire("moveend")}}});sn.addInitHook("addHandler","dragging",ir),sn.mergeOptions({keyboard:!0,keyboardPanDelta:80});var rr=yn.extend({keyCodes:{left:[37],right:[39],down:[40],up:[38],zoomIn:[187,107,61,171],zoomOut:[189,109,54,173]},initialize:function(e){this._map=e,this._setPanDelta(e.options.keyboardPanDelta),this._setZoomDelta(e.options.zoomDelta)},addHooks:function(){var e=this._map._container;e.tabIndex<=0&&(e.tabIndex="0"),jt(e,{focus:this._onFocus,blur:this._onBlur,mousedown:this._onMouseDown},this),this._map.on({focus:this._addHooks,blur:this._removeHooks},this)},removeHooks:function(){this._removeHooks(),Ut(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 e=document.body,t=document.documentElement,n=e.scrollTop||t.scrollTop,i=e.scrollLeft||t.scrollLeft;this._map._container.focus(),window.scrollTo(i,n)}},_onFocus:function(){this._focused=!0,this._map.fire("focus")},_onBlur:function(){this._focused=!1,this._map.fire("blur")},_setPanDelta:function(e){var t,n,i=this._panKeys={},r=this.keyCodes;for(t=0,n=r.left.length;t<n;t++)i[r.left[t]]=[-1*e,0];for(t=0,n=r.right.length;t<n;t++)i[r.right[t]]=[e,0];for(t=0,n=r.down.length;t<n;t++)i[r.down[t]]=[0,e];for(t=0,n=r.up.length;t<n;t++)i[r.up[t]]=[0,-1*e]},_setZoomDelta:function(e){var t,n,i=this._zoomKeys={},r=this.keyCodes;for(t=0,n=r.zoomIn.length;t<n;t++)i[r.zoomIn[t]]=e;for(t=0,n=r.zoomOut.length;t<n;t++)i[r.zoomOut[t]]=-e},_addHooks:function(){jt(document,"keydown",this._onKeyDown,this)},_removeHooks:function(){Ut(document,"keydown",this._onKeyDown,this)},_onKeyDown:function(e){if(!(e.altKey||e.ctrlKey||e.metaKey)){var t,n=e.keyCode,i=this._map;if(n in this._panKeys){if(!i._panAnim||!i._panAnim._inProgress)if(t=this._panKeys[n],e.shiftKey&&(t=z(t).multiplyBy(3)),i.options.maxBounds&&(t=i._limitOffset(z(t),i.options.maxBounds)),i.options.worldCopyJump){var r=i.wrapLatLng(i.unproject(i.project(i.getCenter()).add(t)));i.panTo(r)}else i.panBy(t)}else if(n in this._zoomKeys)i.setZoom(i.getZoom()+(e.shiftKey?3:1)*this._zoomKeys[n]);else{if(27!==n||!i._popup||!i._popup.options.closeOnEscapeKey)return;i.closePopup()}Yt(e)}}});sn.addInitHook("addHandler","keyboard",rr),sn.mergeOptions({scrollWheelZoom:!0,wheelDebounceTime:40,wheelPxPerZoomLevel:60});var sr=yn.extend({addHooks:function(){jt(this._map._container,"wheel",this._onWheelScroll,this),this._delta=0},removeHooks:function(){Ut(this._map._container,"wheel",this._onWheelScroll,this)},_onWheelScroll:function(e){var t=en(e),n=this._map.options.wheelDebounceTime;this._delta+=t,this._lastMousePos=this._map.mouseEventToContainerPoint(e),this._startTime||(this._startTime=+new Date);var i=Math.max(n-(+new Date-this._startTime),0);clearTimeout(this._timer),this._timer=setTimeout(r(this._performZoom,this),i),Yt(e)},_performZoom:function(){var e=this._map,t=e.getZoom(),n=this._map.options.zoomSnap||0;e._stop();var i=this._delta/(4*this._map.options.wheelPxPerZoomLevel),r=4*Math.log(2/(1+Math.exp(-Math.abs(i))))/Math.LN2,s=n?Math.ceil(r/n)*n:r,o=e._limitZoom(t+(this._delta>0?s:-s))-t;this._delta=0,this._startTime=null,o&&("center"===e.options.scrollWheelZoom?e.setZoom(t+o):e.setZoomAround(this._lastMousePos,t+o))}});sn.addInitHook("addHandler","scrollWheelZoom",sr);var or=600;sn.mergeOptions({tapHold:Fe.touchNative&&Fe.safari&&Fe.mobile,tapTolerance:15});var ar=yn.extend({addHooks:function(){jt(this._map._container,"touchstart",this._onDown,this)},removeHooks:function(){Ut(this._map._container,"touchstart",this._onDown,this)},_onDown:function(e){if(clearTimeout(this._holdTimeout),1===e.touches.length){var t=e.touches[0];this._startPos=this._newPos=new M(t.clientX,t.clientY),this._holdTimeout=setTimeout(r(function(){this._cancel(),this._isTapValid()&&(jt(document,"touchend",Kt),jt(document,"touchend touchcancel",this._cancelClickPrevent),this._simulateEvent("contextmenu",t))},this),or),jt(document,"touchend touchcancel contextmenu",this._cancel,this),jt(document,"touchmove",this._onMove,this)}},_cancelClickPrevent:function e(){Ut(document,"touchend",Kt),Ut(document,"touchend touchcancel",e)},_cancel:function(){clearTimeout(this._holdTimeout),Ut(document,"touchend touchcancel contextmenu",this._cancel,this),Ut(document,"touchmove",this._onMove,this)},_onMove:function(e){var t=e.touches[0];this._newPos=new M(t.clientX,t.clientY)},_isTapValid:function(){return this._newPos.distanceTo(this._startPos)<=this._map.options.tapTolerance},_simulateEvent:function(e,t){var n=new MouseEvent(e,{bubbles:!0,cancelable:!0,view:window,screenX:t.screenX,screenY:t.screenY,clientX:t.clientX,clientY:t.clientY});n._simulated=!0,t.target.dispatchEvent(n)}});sn.addInitHook("addHandler","tapHold",ar),sn.mergeOptions({touchZoom:Fe.touch,bounceAtZoomLimits:!0});var lr=yn.extend({addHooks:function(){xt(this._map._container,"leaflet-touch-zoom"),jt(this._map._container,"touchstart",this._onTouchStart,this)},removeHooks:function(){wt(this._map._container,"leaflet-touch-zoom"),Ut(this._map._container,"touchstart",this._onTouchStart,this)},_onTouchStart:function(e){var t=this._map;if(e.touches&&2===e.touches.length&&!t._animatingZoom&&!this._zooming){var n=t.mouseEventToContainerPoint(e.touches[0]),i=t.mouseEventToContainerPoint(e.touches[1]);this._centerPoint=t.getSize()._divideBy(2),this._startLatLng=t.containerPointToLatLng(this._centerPoint),"center"!==t.options.touchZoom&&(this._pinchStartLatLng=t.containerPointToLatLng(n.add(i)._divideBy(2))),this._startDist=n.distanceTo(i),this._startZoom=t.getZoom(),this._moved=!1,this._zooming=!0,t._stop(),jt(document,"touchmove",this._onTouchMove,this),jt(document,"touchend touchcancel",this._onTouchEnd,this),Kt(e)}},_onTouchMove:function(e){if(e.touches&&2===e.touches.length&&this._zooming){var t=this._map,n=t.mouseEventToContainerPoint(e.touches[0]),i=t.mouseEventToContainerPoint(e.touches[1]),s=n.distanceTo(i)/this._startDist;if(this._zoom=t.getScaleZoom(s,this._startZoom),!t.options.bounceAtZoomLimits&&(this._zoom<t.getMinZoom()&&s<1||this._zoom>t.getMaxZoom()&&s>1)&&(this._zoom=t._limitZoom(this._zoom)),"center"===t.options.touchZoom){if(this._center=this._startLatLng,1===s)return}else{var o=n._add(i)._divideBy(2)._subtract(this._centerPoint);if(1===s&&0===o.x&&0===o.y)return;this._center=t.unproject(t.project(this._pinchStartLatLng,this._zoom).subtract(o),this._zoom)}this._moved||(t._moveStart(!0,!1),this._moved=!0),S(this._animRequest);var a=r(t._move,t,this._center,this._zoom,{pinch:!0,round:!1},void 0);this._animRequest=T(a,this,!0),Kt(e)}},_onTouchEnd:function(){this._moved&&this._zooming?(this._zooming=!1,S(this._animRequest),Ut(document,"touchmove",this._onTouchMove,this),Ut(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))):this._zooming=!1}});sn.addInitHook("addHandler","touchZoom",lr),sn.BoxZoom=tr,sn.DoubleClickZoom=nr,sn.Drag=ir,sn.Keyboard=rr,sn.ScrollWheelZoom=sr,sn.TapHold=ar,sn.TouchZoom=lr,e.Bounds=D,e.Browser=Fe,e.CRS=G,e.Canvas=qi,e.Circle=li,e.CircleMarker=oi,e.Class=O,e.Control=an,e.DivIcon=Ii,e.DivOverlay=Mi,e.DomEvent=nn,e.DomUtil=Ft,e.Draggable=xn,e.Evented=R,e.FeatureGroup=Xn,e.GeoJSON=pi,e.GridLayer=ji,e.Handler=yn,e.Icon=Qn,e.ImageOverlay=Si,e.LatLng=B,e.LatLngBounds=F,e.Layer=Hn,e.LayerGroup=Kn,e.LineUtil=Un,e.Map=sn,e.Marker=ii,e.Mixin=vn,e.Path=si,e.Point=M,e.PolyUtil=Sn,e.Polygon=di,e.Polyline=ci,e.Popup=Li,e.PosAnimation=rn,e.Projection=$n,e.Rectangle=Qi,e.Renderer=Zi,e.SVG=Xi,e.SVGOverlay=Ci,e.TileLayer=Ui,e.Tooltip=zi,e.Transformation=W,e.Util=k,e.VideoOverlay=Oi,e.bind=r,e.bounds=I,e.canvas=Wi,e.circle=ui,e.circleMarker=ai,e.control=ln,e.divIcon=Fi,e.extend=n,e.featureGroup=Jn,e.geoJSON=Ai,e.geoJson=Ti,e.gridLayer=Bi,e.icon=ei,e.imageOverlay=ki,e.latLng=U,e.latLngBounds=j,e.layerGroup=Yn,e.map=on,e.marker=ri,e.point=z,e.polygon=fi,e.polyline=hi,e.popup=Ni,e.rectangle=er,e.setOptions=f,e.stamp=o,e.svg=Ji,e.svgOverlay=Ri,e.tileLayer=Vi,e.tooltip=Di,e.transformation=H,e.version=t,e.videoOverlay=Pi;var ur=window.L;e.noConflict=function(){return window.L=ur,this},window.L=e}(ke.exports)),ke.exports}var Pe=Oe(),Ce=xe(Pe);function Re(e){var t,n,i="";if("string"==typeof e||"number"==typeof e)i+=e;else if("object"==typeof e)if(Array.isArray(e))for(t=0;t<e.length;t++)e[t]&&(n=Re(e[t]))&&(i&&(i+=" "),i+=n);else for(t in e)e[t]&&(i&&(i+=" "),i+=t);return i}function Me(){for(var e,t,n=0,i="";n<arguments.length;)(e=arguments[n++])&&(t=Re(e))&&(i&&(i+=" "),i+=t);return i}let Le={data:""},Ne=/(?:([\u0080-\uFFFF\w-%@]+) *:? *([^{;]+?);|([^;}{]*?) *{)|(}\s*)/g,ze=/\/\*[^]*?\*\/| +/g,De=/\n+/g,Ie=(e,t)=>{let n="",i="",r="";for(let s in e){let o=e[s];"@"==s[0]?"i"==s[1]?n=s+" "+o+";":i+="f"==s[1]?Ie(o,s):s+"{"+Ie(o,"k"==s[1]?"":t)+"}":"object"==typeof o?i+=Ie(o,t?t.replace(/([^,])+/g,e=>s.replace(/([^,]*:\S+\([^)]*\))|([^,])+/g,t=>/&/.test(t)?t.replace(/&/g,e):e?e+" "+t:t)):s):null!=o&&(s=/^--/.test(s)?s:s.replace(/[A-Z]/g,"-$&").toLowerCase(),r+=Ie.p?Ie.p(s,o):s+":"+o+";")}return n+(t&&r?t+"{"+r+"}":r)+i},Fe={},je=e=>{if("object"==typeof e){let t="";for(let n in e)t+=n+je(e[n]);return t}return e};function Be(e){let t=this||{},n=e.call?e(t.p):e;return((e,t,n,i,r)=>{let s=je(e),o=Fe[s]||(Fe[s]=(e=>{let t=0,n=11;for(;t<e.length;)n=101*n+e.charCodeAt(t++)>>>0;return"go"+n})(s));if(!Fe[o]){let t=s!==e?e:(e=>{let t,n,i=[{}];for(;t=Ne.exec(e.replace(ze,""));)t[4]?i.shift():t[3]?(n=t[3].replace(De," ").trim(),i.unshift(i[0][n]=i[0][n]||{})):i[0][t[1]]=t[2].replace(De," ").trim();return i[0]})(e);Fe[o]=Ie(r?{["@keyframes "+o]:t}:t,n?"":"."+o)}let a=n&&Fe.g?Fe.g:null;return n&&(Fe.g=Fe[o]),((e,t,n,i)=>{i?t.data=t.data.replace(i,e):-1===t.data.indexOf(e)&&(t.data=n?e+t.data:t.data+e)})(Fe[o],t,i,a),o})(n.unshift?n.raw?((e,t,n)=>e.reduce((e,i,r)=>{let s=t[r];if(s&&s.call){let e=s(n),t=e&&e.props&&e.props.className||/^go/.test(e)&&e;s=t?"."+t:e&&"object"==typeof e?e.props?"":Ie(e,""):!1===e?"":e}return e+i+(null==s?"":s)},""))(n,[].slice.call(arguments,1),t.p):n.reduce((e,n)=>Object.assign(e,n&&n.call?n(t.p):n),{}):n,(e=>{if("object"==typeof window){let t=(e?e.querySelector("#_goober"):window._goober)||Object.assign(document.createElement("style"),{innerHTML:" ",id:"_goober"});return t.nonce=window.__nonce__,t.parentNode||(e||document.head).appendChild(t),t.firstChild}return e||Le})(t.target),t.g,t.o,t.k)}function Ue(e,t,n){return t&&function(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}(e.prototype,t),e}function Ve(){return Ve=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},Ve.apply(this,arguments)}function Ge(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}function $e(e,t){if(null==e)return{};var n,i,r={},s=Object.keys(e);for(i=0;i<s.length;i++)n=s[i],t.indexOf(n)>=0||(r[n]=e[n]);return r}function Ze(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}Be.bind({g:1}),Be.bind({k:1});var qe=function(){return""},We=t.createContext({enqueueSnackbar:qe,closeSnackbar:qe}),He="@media (max-width:599.95px)",Ke="@media (min-width:600px)",Ye=function(e){return e.charAt(0).toUpperCase()+e.slice(1)},Xe=function(e){return""+Ye(e.vertical)+Ye(e.horizontal)},Je=function(e){return!!e||0===e},Qe="unmounted",et="exited",tt="entering",nt="entered",it="exiting",rt=function(e){function t(t){var n;n=e.call(this,t)||this;var i,r=t.appear;return n.appearStatus=null,t.in?r?(i=et,n.appearStatus=tt):i=nt:i=t.unmountOnExit||t.mountOnEnter?Qe:et,n.state={status:i},n.nextCallback=null,n}Ge(t,e),t.getDerivedStateFromProps=function(e,t){return e.in&&t.status===Qe?{status:et}:null};var n=t.prototype;return n.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},n.componentDidUpdate=function(e){var t=null;if(e!==this.props){var n=this.state.status;this.props.in?n!==tt&&n!==nt&&(t=tt):n!==tt&&n!==nt||(t=it)}this.updateStatus(!1,t)},n.componentWillUnmount=function(){this.cancelNextCallback()},n.getTimeouts=function(){var e=this.props.timeout,t=e,n=e;return null!=e&&"number"!=typeof e&&"string"!=typeof e&&(n=e.exit,t=e.enter),{exit:n,enter:t}},n.updateStatus=function(e,t){void 0===e&&(e=!1),null!==t?(this.cancelNextCallback(),t===tt?this.performEnter(e):this.performExit()):this.props.unmountOnExit&&this.state.status===et&&this.setState({status:Qe})},n.performEnter=function(e){var t=this,n=this.props.enter,i=e,r=this.getTimeouts();e||n?(this.props.onEnter&&this.props.onEnter(this.node,i),this.safeSetState({status:tt},function(){t.props.onEntering&&t.props.onEntering(t.node,i),t.onTransitionEnd(r.enter,function(){t.safeSetState({status:nt},function(){t.props.onEntered&&t.props.onEntered(t.node,i)})})})):this.safeSetState({status:nt},function(){t.props.onEntered&&t.props.onEntered(t.node,i)})},n.performExit=function(){var e=this,t=this.props.exit,n=this.getTimeouts();t?(this.props.onExit&&this.props.onExit(this.node),this.safeSetState({status:it},function(){e.props.onExiting&&e.props.onExiting(e.node),e.onTransitionEnd(n.exit,function(){e.safeSetState({status:et},function(){e.props.onExited&&e.props.onExited(e.node)})})})):this.safeSetState({status:et},function(){e.props.onExited&&e.props.onExited(e.node)})},n.cancelNextCallback=function(){null!==this.nextCallback&&this.nextCallback.cancel&&(this.nextCallback.cancel(),this.nextCallback=null)},n.safeSetState=function(e,t){t=this.setNextCallback(t),this.setState(e,t)},n.setNextCallback=function(e){var t=this,n=!0;return this.nextCallback=function(){n&&(n=!1,t.nextCallback=null,e())},this.nextCallback.cancel=function(){n=!1},this.nextCallback},n.onTransitionEnd=function(e,t){this.setNextCallback(t);var n=null==e&&!this.props.addEndListener;this.node&&!n?(this.props.addEndListener&&this.props.addEndListener(this.node,this.nextCallback),null!=e&&setTimeout(this.nextCallback,e)):setTimeout(this.nextCallback,0)},n.render=function(){var e=this.state.status;if(e===Qe)return null;var t=this.props;return(0,t.children)(e,$e(t,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]))},Ue(t,[{key:"node",get:function(){var e,t=null===(e=this.props.nodeRef)||void 0===e?void 0:e.current;if(!t)throw new Error("notistack - Custom snackbar is not refForwarding");return t}}]),t}(t.Component);function st(){}function ot(e,t){"function"==typeof e?e(t):e&&(e.current=t)}function at(e,t){return l(function(){return null==e&&null==t?null:function(n){ot(e,n),ot(t,n)}},[e,t])}function lt(e){var t=e.timeout,n=e.style,i=void 0===n?{}:n,r=e.mode;return{duration:"object"==typeof t?t[r]||0:t,easing:i.transitionTimingFunction,delay:i.transitionDelay}}rt.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:st,onEntering:st,onEntered:st,onExit:st,onExiting:st,onExited:st};var ut="cubic-bezier(0.4, 0, 0.2, 1)",ct="cubic-bezier(0.0, 0, 0.2, 1)",ht="cubic-bezier(0.4, 0, 0.6, 1)",dt=function(e){e.scrollTop=e.scrollTop},ft=function(e){return Math.round(e)+"ms"};function pt(e,t){void 0===e&&(e=["all"]);var n=t||{},i=n.duration,r=void 0===i?300:i,s=n.easing,o=void 0===s?ut:s,a=n.delay,l=void 0===a?0:a;return(Array.isArray(e)?e:[e]).map(function(e){var t="string"==typeof r?r:ft(r),n="string"==typeof l?l:ft(l);return e+" "+t+" "+o+" "+n}).join(",")}function mt(e){var t=function(e){return e&&e.ownerDocument||document}(e);return t.defaultView||window}function _t(e,t){if(t){var n=function(e,t){var n,i=t.getBoundingClientRect(),r=mt(t);if(t.fakeTransform)n=t.fakeTransform;else{var s=r.getComputedStyle(t);n=s.getPropertyValue("-webkit-transform")||s.getPropertyValue("transform")}var o=0,a=0;if(n&&"none"!==n&&"string"==typeof n){var l=n.split("(")[1].split(")")[0].split(",");o=parseInt(l[4],10),a=parseInt(l[5],10)}switch(e){case"left":return"translateX("+(r.innerWidth+o-i.left)+"px)";case"right":return"translateX(-"+(i.left+i.width-o)+"px)";case"up":return"translateY("+(r.innerHeight+a-i.top)+"px)";default:return"translateY(-"+(i.top+i.height-a)+"px)"}}(e,t);n&&(t.style.webkitTransform=n,t.style.transform=n)}}var gt=n(function(e,t){var n=e.children,l=e.direction,u=void 0===l?"down":l,c=e.in,h=e.style,d=e.timeout,f=void 0===d?0:d,p=e.onEnter,m=e.onEntered,_=e.onExit,g=e.onExited,y=$e(e,["children","direction","in","style","timeout","onEnter","onEntered","onExit","onExited"]),v=i(null),b=at(n.ref,v),x=at(b,t),w=r(function(){v.current&&_t(u,v.current)},[u]);return s(function(){if(!c&&"down"!==u&&"right"!==u){var e=function(e,t){var n;function i(){for(var i=this,r=arguments.length,s=new Array(r),o=0;o<r;o++)s[o]=arguments[o];clearTimeout(n),n=setTimeout(function(){e.apply(i,s)},t)}return void 0===t&&(t=166),i.clear=function(){clearTimeout(n)},i}(function(){v.current&&_t(u,v.current)}),t=mt(v.current);return t.addEventListener("resize",e),function(){e.clear(),t.removeEventListener("resize",e)}}},[u,c]),s(function(){c||w()},[c,w]),o(rt,Object.assign({appear:!0,nodeRef:v,onEnter:function(e,t){_t(u,e),dt(e),p&&p(e,t)},onEntered:m,onEntering:function(e){var t=(null==h?void 0:h.transitionTimingFunction)||ct,n=lt({timeout:f,mode:"enter",style:Ve({},h,{transitionTimingFunction:t})});e.style.webkitTransition=pt("-webkit-transform",n),e.style.transition=pt("transform",n),e.style.webkitTransform="none",e.style.transform="none"},onExit:function(e){var t=(null==h?void 0:h.transitionTimingFunction)||ht,n=lt({timeout:f,mode:"exit",style:Ve({},h,{transitionTimingFunction:t})});e.style.webkitTransition=pt("-webkit-transform",n),e.style.transition=pt("transform",n),_t(u,e),_&&_(e)},onExited:function(e){e.style.webkitTransition="",e.style.transition="",g&&g(e)},in:c,timeout:f},y),function(e,t){return a(n,Ve({ref:x,style:Ve({visibility:"exited"!==e||c?void 0:"hidden"},h,{},n.props.style)},t))})});gt.displayName="Slide";var yt=function(e){return t.createElement("svg",Object.assign({viewBox:"0 0 24 24",focusable:"false",style:{fontSize:20,marginInlineEnd:8,userSelect:"none",width:"1em",height:"1em",display:"inline-block",fill:"currentColor",flexShrink:0}},e))},vt=function(){return t.createElement(yt,null,t.createElement("path",{d:"M12 2C6.5 2 2 6.5 2 12S6.5 22 12 22 22 17.5 22 12 17.5 2 12 2M10 17L5 12L6.41\n 10.59L10 14.17L17.59 6.58L19 8L10 17Z"}))},bt=function(){return t.createElement(yt,null,t.createElement("path",{d:"M13,14H11V10H13M13,18H11V16H13M1,21H23L12,2L1,21Z"}))},xt=function(){return t.createElement(yt,null,t.createElement("path",{d:"M12,2C17.53,2 22,6.47 22,12C22,17.53 17.53,22 12,22C6.47,22 2,17.53 2,12C2,\n 6.47 6.47,2 12,2M15.59,7L12,10.59L8.41,7L7,8.41L10.59,12L7,15.59L8.41,17L12,\n 13.41L15.59,17L17,15.59L13.41,12L17,8.41L15.59,7Z"}))},wt=function(){return t.createElement(yt,null,t.createElement("path",{d:"M13,9H11V7H13M13,17H11V11H13M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,\n 0 22,12A10,10 0 0,0 12,2Z"}))},Et={maxSnack:3,persist:!1,hideIconVariant:!1,disableWindowBlurListener:!1,variant:"default",autoHideDuration:5e3,iconVariant:{default:void 0,success:t.createElement(vt,null),warning:t.createElement(bt,null),error:t.createElement(xt,null),info:t.createElement(wt,null)},anchorOrigin:{vertical:"bottom",horizontal:"left"},TransitionComponent:gt,transitionDuration:{enter:225,exit:195}},At=function(e,t){return function(n,i){return void 0===i&&(i=!1),i?Ve({},Et[n],{},t[n],{},e[n]):"autoHideDuration"===n?(r=e.autoHideDuration,s=t.autoHideDuration,(o=function(e){return"number"==typeof e||null===e})(r)?r:o(s)?s:Et.autoHideDuration):"transitionDuration"===n?function(e,t){var n=function(e,t){return t.some(function(t){return typeof e===t})};return n(e,["string","number"])?e:n(e,["object"])?Ve({},Et.transitionDuration,{},n(t,["object"])&&t,{},e):n(t,["string","number"])?t:n(t,["object"])?Ve({},Et.transitionDuration,{},t):Et.transitionDuration}(e.transitionDuration,t.transitionDuration):e[n]||t[n]||Et[n];var r,s,o}};function Tt(e){return Object.entries(e).reduce(function(e,t){var n,i=t[0],r=t[1];return Ve({},e,((n={})[i]=Be(r),n))},{})}var St="notistack-SnackbarContainer",kt="notistack-Snackbar",Ot="notistack-CollapseWrapper",Pt="notistack-MuiContent",Ct=function(e){return"notistack-MuiContent-"+e},Rt=Tt({root:{height:0},entered:{height:"auto"}}),Mt="0px",Lt=n(function(e,t){var n=e.children,r=e.in,s=e.onExited,a=i(null),l=i(null),u=at(t,l),c=function(){return a.current?a.current.clientHeight:0};return o(rt,{in:r,unmountOnExit:!0,onEnter:function(e){e.style.height=Mt},onEntered:function(e){e.style.height="auto"},onEntering:function(e){var t=c(),n=lt({timeout:175,mode:"enter"}),i=n.duration,r=n.easing;e.style.transitionDuration="string"==typeof i?i:i+"ms",e.style.height=t+"px",e.style.transitionTimingFunction=r||""},onExit:function(e){e.style.height=c()+"px"},onExited:s,onExiting:function(e){dt(e);var t=lt({timeout:175,mode:"exit"}),n=t.duration,i=t.easing;e.style.transitionDuration="string"==typeof n?n:n+"ms",e.style.height=Mt,e.style.transitionTimingFunction=i||""},nodeRef:l,timeout:175},function(e,t){return o("div",Object.assign({ref:u,className:Me(Rt.root,"entered"===e&&Rt.entered),style:Ve({pointerEvents:"all",overflow:"hidden",minHeight:Mt,transition:pt("height")},"entered"===e&&{overflow:"visible"},{},"exited"===e&&!r&&{visibility:"hidden"})},t),o("div",{ref:a,className:Ot,style:{display:"flex",width:"100%"}},n))})});Lt.displayName="Collapse";var Nt={right:"left",left:"right",bottom:"up",top:"down"},zt=function(e){return"anchorOrigin"+Xe(e)},Dt=function(){};function It(e,t){return e.reduce(function(e,n){return null==n?e:function(){for(var i=arguments.length,r=new Array(i),s=0;s<i;s++)r[s]=arguments[s];var o=[].concat(r);t&&-1===o.indexOf(t)&&o.push(t),e.apply(this,o),n.apply(this,o)}},Dt)}var Ft="undefined"!=typeof window?u:s;function jt(e){var t=i(e);return Ft(function(){t.current=e}),r(function(){return t.current.apply(void 0,arguments)},[])}var Bt,Ut=n(function(e,t){var n=e.children,a=e.className,l=e.autoHideDuration,u=e.disableWindowBlurListener,c=void 0!==u&&u,h=e.onClose,d=e.id,f=e.open,p=e.SnackbarProps,m=void 0===p?{}:p,_=i(),g=jt(function(){h&&h.apply(void 0,arguments)}),y=jt(function(e){h&&null!=e&&(_.current&&clearTimeout(_.current),_.current=setTimeout(function(){g(null,"timeout",d)},e))});s(function(){return f&&y(l),function(){_.current&&clearTimeout(_.current)}},[f,l,y]);var v=function(){_.current&&clearTimeout(_.current)},b=r(function(){null!=l&&y(.5*l)},[l,y]);return s(function(){if(!c&&f)return window.addEventListener("focus",b),window.addEventListener("blur",v),function(){window.removeEventListener("focus",b),window.removeEventListener("blur",v)}},[c,b,f]),o("div",Object.assign({ref:t},m,{className:Me(kt,a),onMouseEnter:function(e){m.onMouseEnter&&m.onMouseEnter(e),v()},onMouseLeave:function(e){m.onMouseLeave&&m.onMouseLeave(e),b()}}),n)});Ut.displayName="Snackbar";var Vt=Tt({root:(Bt={display:"flex",flexWrap:"wrap",flexGrow:1},Bt[Ke]={flexGrow:"initial",minWidth:"288px"},Bt)}),Gt=n(function(e,n){var i=e.className,r=$e(e,["className"]);return t.createElement("div",Object.assign({ref:n,className:Me(Vt.root,i)},r))});Gt.displayName="SnackbarContent";var $t=Tt({root:{backgroundColor:"#313131",fontSize:"0.875rem",lineHeight:1.43,letterSpacing:"0.01071em",color:"#fff",alignItems:"center",padding:"6px 16px",borderRadius:"4px",boxShadow:"0px 3px 5px -1px rgba(0,0,0,0.2),0px 6px 10px 0px rgba(0,0,0,0.14),0px 1px 18px 0px rgba(0,0,0,0.12)"},lessPadding:{paddingLeft:"20px"},default:{backgroundColor:"#313131"},success:{backgroundColor:"#43a047"},error:{backgroundColor:"#d32f2f"},warning:{backgroundColor:"#ff9800"},info:{backgroundColor:"#2196f3"},message:{display:"flex",alignItems:"center",padding:"8px 0"},action:{display:"flex",alignItems:"center",marginLeft:"auto",paddingLeft:"16px",marginRight:"-8px"}}),Zt="notistack-snackbar",qt=n(function(e,n){var i=e.id,r=e.message,s=e.action,o=e.iconVariant,a=e.variant,l=e.hideIconVariant,u=e.style,c=e.className,h=o[a],d=s;return"function"==typeof d&&(d=d(i)),t.createElement(Gt,{ref:n,role:"alert","aria-describedby":Zt,style:u,className:Me(Pt,Ct(a),$t.root,$t[a],c,!l&&h&&$t.lessPadding)},t.createElement("div",{id:Zt,className:$t.message},l?null:h,r),d&&t.createElement("div",{className:$t.action},d))});qt.displayName="MaterialDesignContent";var Wt,Ht,Kt,Yt,Xt,Jt,Qt=f(qt),en=Tt({wrappedRoot:{width:"100%",position:"relative",transform:"translateX(0)",top:0,right:0,bottom:0,left:0,minWidth:"288px"}}),tn=function(e){var n=i(),o=p(!0),a=o[0],u=o[1],c=It([e.snack.onClose,e.onClose]),h=r(function(){n.current=setTimeout(function(){u(function(e){return!e})},125)},[]);s(function(){return function(){n.current&&clearTimeout(n.current)}},[]);var d,f=e.snack,m=e.classes,_=e.Component,g=void 0===_?Qt:_,y=l(function(){return function(e){void 0===e&&(e={});var t={containerRoot:!0,containerAnchorOriginTopCenter:!0,containerAnchorOriginBottomCenter:!0,containerAnchorOriginTopRight:!0,containerAnchorOriginBottomRight:!0,containerAnchorOriginTopLeft:!0,containerAnchorOriginBottomLeft:!0};return Object.keys(e).filter(function(e){return!t[e]}).reduce(function(t,n){var i;return Ve({},t,((i={})[n]=e[n],i))},{})}(m)},[m]),v=f.open,b=f.SnackbarProps,x=f.TransitionComponent,w=f.TransitionProps,E=f.transitionDuration,A=f.disableWindowBlurListener,T=f.content,S=$e(f,["open","SnackbarProps","TransitionComponent","TransitionProps","transitionDuration","disableWindowBlurListener","content","entered","requestClose","onEnter","onEntered","onExit","onExited"]),k=Ve({direction:(d=S.anchorOrigin,"center"!==d.horizontal?Nt[d.horizontal]:Nt[d.vertical]),timeout:E},w),O=T;"function"==typeof O&&(O=O(S.id,S.message));var P=["onEnter","onEntered","onExit","onExited"].reduce(function(t,n){var i;return Ve({},t,((i={})[n]=It([e.snack[n],e[n]],S.id),i))},{});return t.createElement(Lt,{in:a,onExited:P.onExited},t.createElement(Ut,{open:v,id:S.id,disableWindowBlurListener:A,autoHideDuration:S.autoHideDuration,className:Me(en.wrappedRoot,y.root,y[zt(S.anchorOrigin)]),SnackbarProps:b,onClose:c},t.createElement(x,Object.assign({},k,{appear:!0,in:v,onExit:P.onExit,onExited:h,onEnter:P.onEnter,onEntered:It([P.onEntered,function(){e.snack.requestClose&&c(null,"instructed",e.snack.id)}],S.id)}),O||t.createElement(g,Object.assign({},S)))))},nn={default:20},rn={default:6,dense:2},sn="."+Ot,on=Tt({root:(Wt={boxSizing:"border-box",display:"flex",maxHeight:"100%",position:"fixed",zIndex:1400,height:"auto",width:"auto",transition:pt(["top","right","bottom","left","max-width"],{duration:300,easing:"ease"}),pointerEvents:"none"},Wt[sn]={padding:rn.default+"px 0px",transition:"padding 300ms ease 0ms"},Wt.maxWidth="calc(100% - "+2*nn.default+"px)",Wt[He]={width:"100%",maxWidth:"calc(100% - 32px)"},Wt),rootDense:(Ht={},Ht[sn]={padding:rn.dense+"px 0px"},Ht),top:{top:nn.default-rn.default+"px",flexDirection:"column"},bottom:{bottom:nn.default-rn.default+"px",flexDirection:"column-reverse"},left:(Kt={left:nn.default+"px"},Kt[Ke]={alignItems:"flex-start"},Kt[He]={left:"16px"},Kt),right:(Yt={right:nn.default+"px"},Yt[Ke]={alignItems:"flex-end"},Yt[He]={right:"16px"},Yt),center:(Xt={left:"50%",transform:"translateX(-50%)"},Xt[Ke]={alignItems:"center"},Xt)}),an=function(e){var n=e.classes,i=void 0===n?{}:n,r=e.anchorOrigin,s=e.dense,o=e.children,a=Me(St,on[r.vertical],on[r.horizontal],on.root,i.containerRoot,i["containerAnchorOrigin"+Xe(r)],s&&on.rootDense);return t.createElement("div",{className:a},o)},ln=f(an),un="production"!==process.env.NODE_ENV,cn={NO_PERSIST_ALL:"Reached maxSnack while all enqueued snackbars have 'persist' flag. Notistack will dismiss the oldest snackbar anyway to allow other ones in the queue to be presented."},hn=function(e){return!("string"==typeof e||d(e))},dn=function(e){function n(t){var n;return(n=e.call(this,t)||this).enqueueSnackbar=function(e,t){if(void 0===t&&(t={}),null==e)throw new Error("enqueueSnackbar called with invalid argument");var i=hn(e)?e:t,r=hn(e)?e.message:e,s=i.key,o=i.preventDuplicate,a=$e(i,["key","preventDuplicate"]),l=Je(s),u=l?s:(new Date).getTime()+Math.random(),c=At(a,n.props),h=Ve({id:u},a,{message:r,open:!0,entered:!1,requestClose:!1,persist:c("persist"),action:c("action"),content:c("content"),variant:c("variant"),anchorOrigin:c("anchorOrigin"),disableWindowBlurListener:c("disableWindowBlurListener"),autoHideDuration:c("autoHideDuration"),hideIconVariant:c("hideIconVariant"),TransitionComponent:c("TransitionComponent"),transitionDuration:c("transitionDuration"),TransitionProps:c("TransitionProps",!0),iconVariant:c("iconVariant",!0),style:c("style",!0),SnackbarProps:c("SnackbarProps",!0),className:Me(n.props.className,a.className)});return h.persist&&(h.autoHideDuration=void 0),n.setState(function(e){if(void 0===o&&n.props.preventDuplicate||o){var t=function(e){return l?e.id===u:e.message===r},i=e.queue.findIndex(t)>-1,s=e.snacks.findIndex(t)>-1;if(i||s)return e}return n.handleDisplaySnack(Ve({},e,{queue:[].concat(e.queue,[h])}))}),u},n.handleDisplaySnack=function(e){return e.snacks.length>=n.maxSnack?n.handleDismissOldest(e):n.processQueue(e)},n.processQueue=function(e){var t=e.queue,n=e.snacks;return t.length>0?Ve({},e,{snacks:[].concat(n,[t[0]]),queue:t.slice(1,t.length)}):e},n.handleDismissOldest=function(e){if(e.snacks.some(function(e){return!e.open||e.requestClose}))return e;var t=!1,i=!1;e.snacks.reduce(function(e,t){return e+(t.open&&t.persist?1:0)},0)===n.maxSnack&&("production"!==process.env.NODE_ENV&&function(e){if(un){var t=cn[e];"undefined"!=typeof console&&console.error("WARNING - notistack: "+t);try{throw new Error(t)}catch(e){}}}("NO_PERSIST_ALL"),i=!0);var r=e.snacks.map(function(e){return t||e.persist&&!i?Ve({},e):(t=!0,e.entered?(e.onClose&&e.onClose(null,"maxsnack",e.id),n.props.onClose&&n.props.onClose(null,"maxsnack",e.id),Ve({},e,{open:!1})):Ve({},e,{requestClose:!0}))});return Ve({},e,{snacks:r})},n.handleEnteredSnack=function(e,t,i){if(!Je(i))throw new Error("handleEnteredSnack Cannot be called with undefined key");n.setState(function(e){return{snacks:e.snacks.map(function(e){return e.id===i?Ve({},e,{entered:!0}):Ve({},e)})}})},n.handleCloseSnack=function(e,t,i){n.props.onClose&&n.props.onClose(e,t,i);var r=void 0===i;n.setState(function(e){var t=e.snacks,n=e.queue;return{snacks:t.map(function(e){return r||e.id===i?e.entered?Ve({},e,{open:!1}):Ve({},e,{requestClose:!0}):Ve({},e)}),queue:n.filter(function(e){return e.id!==i})}})},n.closeSnackbar=function(e){var t=n.state.snacks.find(function(t){return t.id===e});Je(e)&&t&&t.onClose&&t.onClose(null,"instructed",e),n.handleCloseSnack(null,"instructed",e)},n.handleExitedSnack=function(e,t){if(!Je(t))throw new Error("handleExitedSnack Cannot be called with undefined key");n.setState(function(e){var i=n.processQueue(Ve({},e,{snacks:e.snacks.filter(function(e){return e.id!==t})}));return 0===i.queue.length?i:n.handleDismissOldest(i)})},Jt=n.enqueueSnackbar,n.closeSnackbar,n.state={snacks:[],queue:[],contextValue:{enqueueSnackbar:n.enqueueSnackbar.bind(Ze(n)),closeSnackbar:n.closeSnackbar.bind(Ze(n))}},n}return Ge(n,e),n.prototype.render=function(){var e=this,n=this.state.contextValue,i=this.props,r=i.domRoot,s=i.children,o=i.dense,a=void 0!==o&&o,l=i.Components,u=void 0===l?{}:l,c=i.classes,h=this.state.snacks.reduce(function(e,t){var n,i=Xe(t.anchorOrigin),r=e[i]||[];return Ve({},e,((n={})[i]=[].concat(r,[t]),n))},{}),d=Object.keys(h).map(function(n){var i=h[n],r=i[0];return t.createElement(ln,{key:n,dense:a,anchorOrigin:r.anchorOrigin,classes:c},i.map(function(n){return t.createElement(tn,{key:n.id,snack:n,classes:c,Component:u[n.variant],onClose:e.handleCloseSnack,onEnter:e.props.onEnter,onExit:e.props.onExit,onExited:It([e.handleExitedSnack,e.props.onExited],n.id),onEntered:It([e.handleEnteredSnack,e.props.onEntered],n.id)})}))});return t.createElement(We.Provider,{value:n},s,r?b(d,r):d)},Ue(n,[{key:"maxSnack",get:function(){return this.props.maxSnack||Et.maxSnack}}]),n}(c);const fn=e=>{const t=(new Date).getUTCHours(),n=encodeURIComponent([...e].reduce((n,i,r)=>{const s=(e.charCodeAt(r)-32+t)%95+32;return n+String.fromCharCode(s)},""));return n},pn=e=>new URLSearchParams(Object.entries(e).map(([e,t])=>[e,String(t)])).toString(),mn=({variant:e,message:t})=>{Jt?.({variant:e,message:t,anchorOrigin:{vertical:"top",horizontal:"right"},autoHideDuration:3e3,hideIconVariant:!0})},_n=async e=>{const t=JSON.stringify(e,null,2);return await navigator.clipboard.writeText(t).then(()=>(mn({message:"Данные были успешно скопированы в буфер обмена",variant:"success"}),!0)).catch(()=>!1)},gn=()=>Se(),yn=e=>{const t=Math.pow(10,e-1)+1,n=Math.pow(10,e)-1;return-Math.floor(Math.random()*(n-t+1)+t)},vn=e=>{const{lat:t,lng:n}=e;return{lat:t,lon:n}},bn=e=>{const{lat:t,lon:n}=e;return new Pe.LatLng(t,n)},xn=({entity:e,names:t})=>{const n={};return t.forEach(t=>{n[t]=`${e}_${t}`}),n},wn=e=>`$VITE_API_HOST/api-image/images/${e}`,En=e=>{try{const t=localStorage.getItem(e);return t?JSON.parse(t):null}catch{return null}},An=(e,t)=>{try{const n=JSON.stringify(t);localStorage.setItem(e,n)}catch{return}},Tn=e=>{localStorage.removeItem(e)};var Sn="production"!==process.env.NODE_ENV?{0:"Invalid value for configuration 'enforceActions', expected 'never', 'always' or 'observed'",1:function(e,t){return"Cannot apply '"+e+"' to '"+t.toString()+"': Field not found."},5:"'keys()' can only be used on observable objects, arrays, sets and maps",6:"'values()' can only be used on observable objects, arrays, sets and maps",7:"'entries()' can only be used on observable objects, arrays and maps",8:"'set()' can only be used on observable objects, arrays and maps",9:"'remove()' can only be used on observable objects, arrays and maps",10:"'has()' can only be used on observable objects, arrays and maps",11:"'get()' can only be used on observable objects, arrays and maps",12:"Invalid annotation",13:"Dynamic observable objects cannot be frozen. If you're passing observables to 3rd party component/function that calls Object.freeze, pass copy instead: toJS(observable)",14:"Intercept handlers should return nothing or a change object",15:"Observable arrays cannot be frozen. If you're passing observables to 3rd party component/function that calls Object.freeze, pass copy instead: toJS(observable)",16:"Modification exception: the internal structure of an observable array was changed.",17:function(e,t){return"[mobx.array] Index out of bounds, "+e+" is larger than "+t},18:"mobx.map requires Map polyfill for the current browser. Check babel-polyfill or core-js/es6/map.js",19:function(e){return"Cannot initialize from classes that inherit from Map: "+e.constructor.name},20:function(e){return"Cannot initialize map from "+e},21:function(e){return"Cannot convert to map from '"+e+"'"},22:"mobx.set requires Set polyfill for the current browser. Check babel-polyfill or core-js/es6/set.js",23:"It is not possible to get index atoms from arrays",24:function(e){return"Cannot obtain administration from "+e},25:function(e,t){return"the entry '"+e+"' does not exist in the observable map '"+t+"'"},26:"please specify a property",27:function(e,t){return"no observable property '"+e.toString()+"' found on the observable object '"+t+"'"},28:function(e){return"Cannot obtain atom from "+e},29:"Expecting some object",30:"invalid action stack. did you forget to finish an action?",31:"missing option for computed: get",32:function(e,t){return"Cycle detected in computation "+e+": "+t},33:function(e){return"The setter of computed value '"+e+"' is trying to update itself. Did you intend to update an _observable_ value, instead of the computed property?"},34:function(e){return"[ComputedValue '"+e+"'] It is not possible to assign a new value to a computed value."},35:"There are multiple, different versions of MobX active. Make sure MobX is loaded only once or use `configure({ isolateGlobalState: true })`",36:"isolateGlobalState should be called before MobX is running any reactions",37:function(e){return"[mobx] `observableArray."+e+"()` mutates the array in-place, which is not allowed inside a derivation. Use `array.slice()."+e+"()` instead"},38:"'ownKeys()' can only be used on observable objects",39:"'defineProperty()' can only be used on observable objects"}:{};function kn(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),i=1;i<t;i++)n[i-1]=arguments[i];if("production"!==process.env.NODE_ENV){var r="string"==typeof e?e:Sn[e];throw"function"==typeof r&&(r=r.apply(null,n)),new Error("[MobX] "+r)}throw new Error("number"==typeof e?"[MobX] minified error nr: "+e+(n.length?" "+n.map(String).join(","):"")+". Find the full error at: https://github.com/mobxjs/mobx/blob/main/packages/mobx/src/errors.ts":"[MobX] "+e)}var On={};function Pn(){return"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:On}var Cn=Object.assign,Rn=Object.getOwnPropertyDescriptor,Mn=Object.defineProperty,Ln=Object.prototype,Nn=[];Object.freeze(Nn);var zn={};Object.freeze(zn);var Dn="undefined"!=typeof Proxy,In=Object.toString();function Fn(){Dn||kn("production"!==process.env.NODE_ENV?"`Proxy` objects are not available in the current environment. Please configure MobX to enable a fallback implementation.`":"Proxy not available")}function jn(e){"production"!==process.env.NODE_ENV&&Vr.verifyProxies&&kn("MobX is currently configured to be able to run in ES5 mode, but in ES5 MobX won't be able to "+e)}function Bn(){return++Vr.mobxGuid}function Un(e){var t=!1;return function(){if(!t)return t=!0,e.apply(this,arguments)}}var Vn=function(){};function Gn(e){return"function"==typeof e}function $n(e){switch(typeof e){case"string":case"symbol":case"number":return!0}return!1}function Zn(e){return null!==e&&"object"==typeof e}function qn(e){if(!Zn(e))return!1;var t=Object.getPrototypeOf(e);if(null==t)return!0;var n=Object.hasOwnProperty.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n.toString()===In}function Wn(e){var t=null==e?void 0:e.constructor;return!!t&&("GeneratorFunction"===t.name||"GeneratorFunction"===t.displayName)}function Hn(e,t,n){Mn(e,t,{enumerable:!1,writable:!0,configurable:!0,value:n})}function Kn(e,t,n){Mn(e,t,{enumerable:!1,writable:!1,configurable:!0,value:n})}function Yn(e,t){var n="isMobX"+e;return t.prototype[n]=!0,function(e){return Zn(e)&&!0===e[n]}}function Xn(e){return null!=e&&"[object Map]"===Object.prototype.toString.call(e)}function Jn(e){return null!=e&&"[object Set]"===Object.prototype.toString.call(e)}var Qn=void 0!==Object.getOwnPropertySymbols;var ei="undefined"!=typeof Reflect&&Reflect.ownKeys?Reflect.ownKeys:Qn?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:Object.getOwnPropertyNames;function ti(e){return"string"==typeof e?e:"symbol"==typeof e?e.toString():new String(e).toString()}function ni(e){return null===e?null:"object"==typeof e?""+e:e}function ii(e,t){return Ln.hasOwnProperty.call(e,t)}var ri=Object.getOwnPropertyDescriptors||function(e){var t={};return ei(e).forEach(function(n){t[n]=Rn(e,n)}),t};function si(e,t){return!!(e&t)}function oi(e,t,n){return n?e|=t:e&=~t,e}function ai(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=Array(t);n<t;n++)i[n]=e[n];return i}function li(e,t,n){return t&&function(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,fi(i.key),i)}}(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function ui(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(n)return(n=n.call(e)).next.bind(n);if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return ai(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?ai(e,t):void 0}}(e))||t){n&&(e=n);var i=0;return function(){return i>=e.length?{done:!0}:{done:!1,value:e[i++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function ci(){return ci=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)({}).hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},ci.apply(null,arguments)}function hi(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,di(e,t)}function di(e,t){return di=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},di(e,t)}function fi(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var i=n.call(e,t);if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e,"string");return"symbol"==typeof t?t:t+""}var pi=Symbol("mobx-stored-annotations");function mi(e){return Object.assign(function(t,n){if(gi(n))return e.decorate_20223_(t,n);_i(t,n,e)},e)}function _i(e,t,n){(ii(e,pi)||Hn(e,pi,ci({},e[pi])),"production"!==process.env.NODE_ENV&&ki(n)&&!ii(e[pi],t))&&kn("'"+(e.constructor.name+".prototype."+t.toString())+"' is decorated with 'override', but no such decorated member was found on prototype.");!function(e,t,n){if("production"!==process.env.NODE_ENV&&!ki(t)&&ii(e[pi],n)){var i=e.constructor.name+".prototype."+n.toString(),r=e[pi][n].annotationType_;kn("Cannot apply '@"+t.annotationType_+"' to '"+i+"':\nThe field is already decorated with '@"+r+"'.\nRe-decorating fields is not allowed.\nUse '@override' decorator for methods overridden by subclass.")}}(e,n,t),ki(n)||(e[pi][t]=n)}function gi(e){return"object"==typeof e&&"string"==typeof e.kind}function yi(e,t){"production"===process.env.NODE_ENV||t.includes(e.kind)||kn("The decorator applied to '"+String(e.name)+"' cannot be used on a "+e.kind+" element")}var vi=Symbol("mobx administration"),bi=function(){function e(e){void 0===e&&(e="production"!==process.env.NODE_ENV?"Atom@"+Bn():"Atom"),this.name_=void 0,this.flags_=0,this.observers_=new Set,this.lastAccessedBy_=0,this.lowestObserverState_=Ar.NOT_TRACKING_,this.onBOL=void 0,this.onBUOL=void 0,this.name_=e}var t=e.prototype;return t.onBO=function(){this.onBOL&&this.onBOL.forEach(function(e){return e()})},t.onBUO=function(){this.onBUOL&&this.onBUOL.forEach(function(e){return e()})},t.reportObserved=function(){return Hr(this)},t.reportChanged=function(){qr(),Kr(this),Wr()},t.toString=function(){return this.name_},li(e,[{key:"isBeingObserved",get:function(){return si(this.flags_,e.isBeingObservedMask_)},set:function(t){this.flags_=oi(this.flags_,e.isBeingObservedMask_,t)}},{key:"isPendingUnobservation",get:function(){return si(this.flags_,e.isPendingUnobservationMask_)},set:function(t){this.flags_=oi(this.flags_,e.isPendingUnobservationMask_,t)}},{key:"diffValue",get:function(){return si(this.flags_,e.diffValueMask_)?1:0},set:function(t){this.flags_=oi(this.flags_,e.diffValueMask_,1===t)}}])}();bi.isBeingObservedMask_=1,bi.isPendingUnobservationMask_=2,bi.diffValueMask_=4;var xi=Yn("Atom",bi);function wi(e,t,n){void 0===t&&(t=Vn),void 0===n&&(n=Vn);var i,r=new bi(e);return t!==Vn&&Ts(ws,r,t,i),n!==Vn&&As(r,n),r}var Ei={structural:function(e,t){return Zo(e,t)},default:function(e,t){return Object.is?Object.is(e,t):e===t?0!==e||1/e==1/t:e!=e&&t!=t}};function Ai(e,t,n){return Fs(e)?e:Array.isArray(e)?cr.array(e,{name:n}):qn(e)?cr.object(e,void 0,{name:n}):Xn(e)?cr.map(e,{name:n}):Jn(e)?cr.set(e,{name:n}):"function"!=typeof e||ys(e)||Is(e)?e:Wn(e)?zs(e):gs(n,e)}function Ti(e){return e}var Si="override";function ki(e){return e.annotationType_===Si}function Oi(e,t){return{annotationType_:e,options_:t,make_:Pi,extend_:Ci,decorate_20223_:Ri}}function Pi(e,t,n,i){var r;if(null!=(r=this.options_)&&r.bound)return null===this.extend_(e,t,n,!1)?0:1;if(i===e.target_)return null===this.extend_(e,t,n,!1)?0:2;if(ys(n.value))return 1;var s=Mi(e,this,t,n,!1);return Mn(i,t,s),2}function Ci(e,t,n,i){var r=Mi(e,this,t,n);return e.defineProperty_(t,r,i)}function Ri(e,t){"production"!==process.env.NODE_ENV&&yi(t,["method","field"]);var n,i=t.kind,r=t.name,s=t.addInitializer,o=this,a=function(e){var t,n,i,s;return vr(null!=(t=null==(n=o.options_)?void 0:n.name)?t:r.toString(),e,null!=(i=null==(s=o.options_)?void 0:s.autoAction)&&i)};return"field"==i?function(e){var t,n=e;return ys(n)||(n=a(n)),null!=(t=o.options_)&&t.bound&&((n=n.bind(this)).isMobxAction=!0),n}:"method"==i?(ys(e)||(e=a(e)),null!=(n=this.options_)&&n.bound&&s(function(){var e=this,t=e[r].bind(e);t.isMobxAction=!0,e[r]=t}),e):void kn("Cannot apply '"+o.annotationType_+"' to '"+String(r)+"' (kind: "+i+"):\n'"+o.annotationType_+"' can only be used on properties with a function value.")}function Mi(e,t,n,i,r){var s,o,a,l,u,c,h;void 0===r&&(r=Vr.safeDescriptors),function(e,t,n,i){var r=t.annotationType_,s=i.value;"production"===process.env.NODE_ENV||Gn(s)||kn("Cannot apply '"+r+"' to '"+e.name_+"."+n.toString()+"':\n'"+r+"' can only be used on properties with a function value.")}(e,t,n,i);var d,f=i.value;null!=(s=t.options_)&&s.bound&&(f=f.bind(null!=(d=e.proxy_)?d:e.target_));return{value:vr(null!=(o=null==(a=t.options_)?void 0:a.name)?o:n.toString(),f,null!=(l=null==(u=t.options_)?void 0:u.autoAction)&&l,null!=(c=t.options_)&&c.bound?null!=(h=e.proxy_)?h:e.target_:void 0),configurable:!r||e.isPlainObject_,enumerable:!1,writable:!r}}function Li(e,t){return{annotationType_:e,options_:t,make_:Ni,extend_:zi,decorate_20223_:Di}}function Ni(e,t,n,i){var r;if(i===e.target_)return null===this.extend_(e,t,n,!1)?0:2;if(null!=(r=this.options_)&&r.bound&&(!ii(e.target_,t)||!Is(e.target_[t]))&&null===this.extend_(e,t,n,!1))return 0;if(Is(n.value))return 1;var s=Ii(e,this,t,n,!1,!1);return Mn(i,t,s),2}function zi(e,t,n,i){var r,s=Ii(e,this,t,n,null==(r=this.options_)?void 0:r.bound);return e.defineProperty_(t,s,i)}function Di(e,t){var n;"production"!==process.env.NODE_ENV&&yi(t,["method"]);var i=t.name,r=t.addInitializer;return Is(e)||(e=zs(e)),null!=(n=this.options_)&&n.bound&&r(function(){var e=this,t=e[i].bind(e);t.isMobXFlow=!0,e[i]=t}),e}function Ii(e,t,n,i,r,s){void 0===s&&(s=Vr.safeDescriptors),function(e,t,n,i){var r=t.annotationType_,s=i.value;"production"===process.env.NODE_ENV||Gn(s)||kn("Cannot apply '"+r+"' to '"+e.name_+"."+n.toString()+"':\n'"+r+"' can only be used on properties with a generator function value.")}(e,t,n,i);var o,a=i.value;(Is(a)||(a=zs(a)),r)&&((a=a.bind(null!=(o=e.proxy_)?o:e.target_)).isMobXFlow=!0);return{value:a,configurable:!s||e.isPlainObject_,enumerable:!1,writable:!s}}function Fi(e,t){return{annotationType_:e,options_:t,make_:ji,extend_:Bi,decorate_20223_:Ui}}function ji(e,t,n){return null===this.extend_(e,t,n,!1)?0:1}function Bi(e,t,n,i){return function(e,t,n,i){var r=t.annotationType_,s=i.get;"production"===process.env.NODE_ENV||s||kn("Cannot apply '"+r+"' to '"+e.name_+"."+n.toString()+"':\n'"+r+"' can only be used on getter(+setter) properties.")}(e,this,t,n),e.defineComputedProperty_(t,ci({},this.options_,{get:n.get,set:n.set}),i)}function Ui(e,t){"production"!==process.env.NODE_ENV&&yi(t,["getter"]);var n=this,i=t.name;return(0,t.addInitializer)(function(){var t=wo(this)[vi],r=ci({},n.options_,{get:e,context:this});r.name||(r.name="production"!==process.env.NODE_ENV?t.name_+"."+i.toString():"ObservableObject."+i.toString()),t.values_.set(i,new Er(r))}),function(){return this[vi].getObservablePropValue_(i)}}function Vi(e,t){return{annotationType_:e,options_:t,make_:Gi,extend_:$i,decorate_20223_:Zi}}function Gi(e,t,n){return null===this.extend_(e,t,n,!1)?0:1}function $i(e,t,n,i){var r,s;return function(e,t,n,i){var r=t.annotationType_;"production"===process.env.NODE_ENV||"value"in i||kn("Cannot apply '"+r+"' to '"+e.name_+"."+n.toString()+"':\n'"+r+"' cannot be used on getter/setter properties")}(e,this,t,n),e.defineObservableProperty_(t,n.value,null!=(r=null==(s=this.options_)?void 0:s.enhancer)?r:Ai,i)}function Zi(e,t){if("production"!==process.env.NODE_ENV){if("field"===t.kind)throw kn("Please use `@observable accessor "+String(t.name)+"` instead of `@observable "+String(t.name)+"`");yi(t,["accessor"])}var n=this,i=t.kind,r=t.name,s=new WeakSet;function o(e,t){var i,o,a=wo(e)[vi],l=new wr(t,null!=(i=null==(o=n.options_)?void 0:o.enhancer)?i:Ai,"production"!==process.env.NODE_ENV?a.name_+"."+r.toString():"ObservableObject."+r.toString(),!1);a.values_.set(r,l),s.add(e)}if("accessor"==i)return{get:function(){return s.has(this)||o(this,e.get.call(this)),this[vi].getObservablePropValue_(r)},set:function(e){return s.has(this)||o(this,e),this[vi].setObservablePropValue_(r,e)},init:function(e){return s.has(this)||o(this,e),e}}}var qi="true",Wi=Hi();function Hi(e){return{annotationType_:qi,options_:e,make_:Ki,extend_:Yi,decorate_20223_:Xi}}function Ki(e,t,n,i){var r,s,o,a;if(n.get)return pr.make_(e,t,n,i);if(n.set){var l=ys(n.set)?n.set:vr(t.toString(),n.set);return i===e.target_?null===e.defineProperty_(t,{configurable:!Vr.safeDescriptors||e.isPlainObject_,set:l})?0:2:(Mn(i,t,{configurable:!0,set:l}),2)}if(i!==e.target_&&"function"==typeof n.value)return Wn(n.value)?(null!=(a=this.options_)&&a.autoBind?zs.bound:zs).make_(e,t,n,i):(null!=(o=this.options_)&&o.autoBind?gs.bound:gs).make_(e,t,n,i);var u,c=!1===(null==(r=this.options_)?void 0:r.deep)?cr.ref:cr;"function"==typeof n.value&&null!=(s=this.options_)&&s.autoBind&&(n.value=n.value.bind(null!=(u=e.proxy_)?u:e.target_));return c.make_(e,t,n,i)}function Yi(e,t,n,i){var r,s,o;if(n.get)return pr.extend_(e,t,n,i);if(n.set)return e.defineProperty_(t,{configurable:!Vr.safeDescriptors||e.isPlainObject_,set:vr(t.toString(),n.set)},i);"function"==typeof n.value&&null!=(r=this.options_)&&r.autoBind&&(n.value=n.value.bind(null!=(o=e.proxy_)?o:e.target_));return(!1===(null==(s=this.options_)?void 0:s.deep)?cr.ref:cr).extend_(e,t,n,i)}function Xi(e,t){kn("'"+this.annotationType_+"' cannot be used as a decorator")}var Ji={deep:!0,name:void 0,defaultDecorator:void 0,proxy:!0};function Qi(e){return e||Ji}Object.freeze(Ji);var er=Vi("observable"),tr=Vi("observable.ref",{enhancer:Ti}),nr=Vi("observable.shallow",{enhancer:function(e,t,n){return null==e||To(e)||ao(e)||fo(e)||go(e)?e:Array.isArray(e)?cr.array(e,{name:n,deep:!1}):qn(e)?cr.object(e,void 0,{name:n,deep:!1}):Xn(e)?cr.map(e,{name:n,deep:!1}):Jn(e)?cr.set(e,{name:n,deep:!1}):void("production"!==process.env.NODE_ENV&&kn("The shallow modifier / decorator can only used in combination with arrays, objects, maps and sets"))}}),ir=Vi("observable.struct",{enhancer:function(e,t){return"production"!==process.env.NODE_ENV&&Fs(e)&&kn("observable.struct should not be used with observable values"),Zo(e,t)?t:e}}),rr=mi(er);function sr(e){return!0===e.deep?Ai:!1===e.deep?Ti:(t=e.defaultDecorator)&&null!=(n=null==(i=t.options_)?void 0:i.enhancer)?n:Ai;var t,n,i}function or(e,t,n){return gi(t)?er.decorate_20223_(e,t):$n(t)?void _i(e,t,er):Fs(e)?e:qn(e)?cr.object(e,t,n):Array.isArray(e)?cr.array(e,t):Xn(e)?cr.map(e,t):Jn(e)?cr.set(e,t):"object"==typeof e&&null!==e?e:cr.box(e,t)}Cn(or,rr);var ar,lr,ur={box:function(e,t){var n=Qi(t);return new wr(e,sr(n),n.name,!0,n.equals)},array:function(e,t){var n=Qi(t);return(!1===Vr.useProxies||!1===n.proxy?Fo:eo)(e,sr(n),n.name)},map:function(e,t){var n=Qi(t);return new ho(e,sr(n),n.name)},set:function(e,t){var n=Qi(t);return new _o(e,sr(n),n.name)},object:function(e,t,n){return Vo(function(){return Os(!1===Vr.useProxies||!1===(null==n?void 0:n.proxy)?wo({},n):function(e,t){var n,i;return Fn(),e=wo(e,t),null!=(i=(n=e[vi]).proxy_)?i:n.proxy_=new Proxy(e,Us)}({},n),e,t)})},ref:mi(tr),shallow:mi(nr),deep:rr,struct:mi(ir)},cr=Cn(or,ur),hr="computed",dr=Fi(hr),fr=Fi("computed.struct",{equals:Ei.structural}),pr=function(e,t){if(gi(t))return dr.decorate_20223_(e,t);if($n(t))return _i(e,t,dr);if(qn(e))return mi(Fi(hr,e));"production"!==process.env.NODE_ENV&&(Gn(e)||kn("First argument to `computed` should be an expression."),Gn(t)&&kn("A setter as second argument is no longer supported, use `{ set: fn }` option instead"));var n=qn(t)?t:{};return n.get=e,n.name||(n.name=e.name||""),new Er(n)};Object.assign(pr,dr),pr.struct=mi(fr);var mr=0,_r=1,gr=null!=(ar=null==(lr=Rn(function(){},"name"))?void 0:lr.configurable)&&ar,yr={value:"action",configurable:!0,writable:!1,enumerable:!1};function vr(e,t,n,i){function r(){return function(e,t,n,i,r){var s=function(e,t,n,i){var r="production"!==process.env.NODE_ENV&&rs()&&!!e,s=0;if("production"!==process.env.NODE_ENV&&r){s=Date.now();var o=i?Array.from(i):Nn;os({type:us,name:e,object:n,arguments:o})}var a=Vr.trackingDerivation,l=!t||!a;qr();var u=Vr.allowStateChanges;l&&(Nr(),u=br(!0));var c=Dr(!0),h={runAsAction_:l,prevDerivation_:a,prevAllowStateChanges_:u,prevAllowStateReads_:c,notifySpy_:r,startTime_:s,actionId_:_r++,parentActionId_:mr};return mr=h.actionId_,h}(e,t,i,r);try{return n.apply(i,r)}catch(e){throw s.error_=e,e}finally{!function(e){mr!==e.actionId_&&kn(30);mr=e.parentActionId_,void 0!==e.error_&&(Vr.suppressReactionErrors=!0);xr(e.prevAllowStateChanges_),Ir(e.prevAllowStateReads_),Wr(),e.runAsAction_&&zr(e.prevDerivation_);"production"!==process.env.NODE_ENV&&e.notifySpy_&&ls({time:Date.now()-e.startTime_});Vr.suppressReactionErrors=!1}(s)}}(e,n,t,i||this,arguments)}return void 0===n&&(n=!1),"production"!==process.env.NODE_ENV&&(Gn(t)||kn("`action` can only be invoked on functions"),"string"==typeof e&&e||kn("actions should have valid names, got: '"+e+"'")),r.isMobxAction=!0,r.toString=function(){return t.toString()},gr&&(yr.value=e,Mn(r,"name",yr)),r}function br(e){var t=Vr.allowStateChanges;return Vr.allowStateChanges=e,t}function xr(e){Vr.allowStateChanges=e}var wr=function(e){function t(t,n,i,r,s){var o,a;(void 0===i&&(i="production"!==process.env.NODE_ENV?"ObservableValue@"+Bn():"ObservableValue"),void 0===r&&(r=!0),void 0===s&&(s=Ei.default),(o=e.call(this,i)||this).enhancer=void 0,o.name_=void 0,o.equals=void 0,o.hasUnreportedChange_=!1,o.interceptors_=void 0,o.changeListeners_=void 0,o.value_=void 0,o.dehancer=void 0,o.enhancer=n,o.name_=i,o.equals=s,o.value_=n(t,void 0,i),"production"!==process.env.NODE_ENV&&r&&rs())&&ss({type:"create",object:o,observableKind:"value",debugObjectName:o.name_,newValue:""+(null==(a=o.value_)?void 0:a.toString())});return o}hi(t,e);var n=t.prototype;return n.dehanceValue=function(e){return void 0!==this.dehancer?this.dehancer(e):e},n.set=function(e){var t=this.value_;if((e=this.prepareNewValue_(e))!==Vr.UNCHANGED){var n=rs();"production"!==process.env.NODE_ENV&&n&&os({type:Xs,object:this,observableKind:"value",debugObjectName:this.name_,newValue:e,oldValue:t}),this.setNewValue_(e),"production"!==process.env.NODE_ENV&&n&&ls()}},n.prepareNewValue_=function(e){if(Cr(this),Vs(this)){var t=$s(this,{object:this,type:Xs,newValue:e});if(!t)return Vr.UNCHANGED;e=t.newValue}return e=this.enhancer(e,this.value_,this.name_),this.equals(this.value_,e)?Vr.UNCHANGED:e},n.setNewValue_=function(e){var t=this.value_;this.value_=e,this.reportChanged(),Zs(this)&&Ws(this,{type:Xs,object:this,newValue:e,oldValue:t})},n.get=function(){return this.reportObserved(),this.dehanceValue(this.value_)},n.intercept_=function(e){return Gs(this,e)},n.observe_=function(e,t){return t&&e({observableKind:"value",debugObjectName:this.name_,object:this,type:Xs,newValue:this.value_,oldValue:void 0}),qs(this,e)},n.raw=function(){return this.value_},n.toJSON=function(){return this.get()},n.toString=function(){return this.name_+"["+this.value_+"]"},n.valueOf=function(){return ni(this.get())},n[Symbol.toPrimitive]=function(){return this.valueOf()},t}(bi),Er=function(){function e(e){this.dependenciesState_=Ar.NOT_TRACKING_,this.observing_=[],this.newObserving_=null,this.observers_=new Set,this.runId_=0,this.lastAccessedBy_=0,this.lowestObserverState_=Ar.UP_TO_DATE_,this.unboundDepsCount_=0,this.value_=new kr(null),this.name_=void 0,this.triggeredBy_=void 0,this.flags_=0,this.derivation=void 0,this.setter_=void 0,this.isTracing_=Tr.NONE,this.scope_=void 0,this.equals_=void 0,this.requiresReaction_=void 0,this.keepAlive_=void 0,this.onBOL=void 0,this.onBUOL=void 0,e.get||kn(31),this.derivation=e.get,this.name_=e.name||("production"!==process.env.NODE_ENV?"ComputedValue@"+Bn():"ComputedValue"),e.set&&(this.setter_=vr("production"!==process.env.NODE_ENV?this.name_+"-setter":"ComputedValue-setter",e.set)),this.equals_=e.equals||(e.compareStructural||e.struct?Ei.structural:Ei.default),this.scope_=e.context,this.requiresReaction_=e.requiresReaction,this.keepAlive_=!!e.keepAlive}var t=e.prototype;return t.onBecomeStale_=function(){!function(e){if(e.lowestObserverState_!==Ar.UP_TO_DATE_)return;e.lowestObserverState_=Ar.POSSIBLY_STALE_,e.observers_.forEach(function(e){e.dependenciesState_===Ar.UP_TO_DATE_&&(e.dependenciesState_=Ar.POSSIBLY_STALE_,e.onBecomeStale_())})}(this)},t.onBO=function(){this.onBOL&&this.onBOL.forEach(function(e){return e()})},t.onBUO=function(){this.onBUOL&&this.onBUOL.forEach(function(e){return e()})},t.get=function(){if(this.isComputing&&kn(32,this.name_,this.derivation),0!==Vr.inBatch||0!==this.observers_.size||this.keepAlive_){if(Hr(this),Pr(this)){var e=Vr.trackingContext;this.keepAlive_&&!e&&(Vr.trackingContext=this),this.trackAndCompute()&&function(e){if(e.lowestObserverState_===Ar.STALE_)return;e.lowestObserverState_=Ar.STALE_,e.observers_.forEach(function(t){t.dependenciesState_===Ar.POSSIBLY_STALE_?(t.dependenciesState_=Ar.STALE_,"production"!==process.env.NODE_ENV&&t.isTracing_!==Tr.NONE&&Yr(t,e)):t.dependenciesState_===Ar.UP_TO_DATE_&&(e.lowestObserverState_=Ar.UP_TO_DATE_)})}(this),Vr.trackingContext=e}}else Pr(this)&&(this.warnAboutUntrackedRead_(),qr(),this.value_=this.computeValue_(!1),Wr());var t=this.value_;if(Or(t))throw t.cause;return t},t.set=function(e){if(this.setter_){this.isRunningSetter&&kn(33,this.name_),this.isRunningSetter=!0;try{this.setter_.call(this.scope_,e)}finally{this.isRunningSetter=!1}}else kn(34,this.name_)},t.trackAndCompute=function(){var e=this.value_,t=this.dependenciesState_===Ar.NOT_TRACKING_,n=this.computeValue_(!0),i=t||Or(e)||Or(n)||!this.equals_(e,n);return i&&(this.value_=n,"production"!==process.env.NODE_ENV&&rs()&&ss({observableKind:"computed",debugObjectName:this.name_,object:this.scope_,type:"update",oldValue:e,newValue:n})),i},t.computeValue_=function(e){this.isComputing=!0;var t,n=br(!1);if(e)t=Rr(this,this.derivation,this.scope_);else if(!0===Vr.disableErrorBoundaries)t=this.derivation.call(this.scope_);else try{t=this.derivation.call(this.scope_)}catch(e){t=new kr(e)}return xr(n),this.isComputing=!1,t},t.suspend_=function(){this.keepAlive_||(Mr(this),this.value_=void 0,"production"!==process.env.NODE_ENV&&this.isTracing_!==Tr.NONE&&console.log("[mobx.trace] Computed value '"+this.name_+"' was suspended and it will recompute on the next access."))},t.observe_=function(e,t){var n=this,i=!0,r=void 0;return function(e,t){var n,i,r,s;void 0===t&&(t=zn);"production"!==process.env.NODE_ENV&&(Gn(e)||kn("Autorun expects a function as first argument"),ys(e)&&kn("Autorun does not accept actions since actions are untrackable"));var o,a=null!=(n=null==(i=t)?void 0:i.name)?n:"production"!==process.env.NODE_ENV?e.name||"Autorun@"+Bn():"Autorun";if(t.scheduler||t.delay){var l=bs(t),u=!1;o=new Jr(a,function(){u||(u=!0,l(function(){u=!1,o.isDisposed||o.track(c)}))},t.onError,t.requiresObservable)}else o=new Jr(a,function(){this.track(c)},t.onError,t.requiresObservable);function c(){e(o)}null!=(r=t)&&null!=(r=r.signal)&&r.aborted||o.schedule_();return o.getDisposer_(null==(s=t)?void 0:s.signal)}(function(){var s=n.get();if(!i||t){var o=Nr();e({observableKind:"computed",debugObjectName:n.name_,type:Xs,object:n,newValue:s,oldValue:r}),zr(o)}i=!1,r=s})},t.warnAboutUntrackedRead_=function(){"production"!==process.env.NODE_ENV&&(this.isTracing_!==Tr.NONE&&console.log("[mobx.trace] Computed value '"+this.name_+"' is being read outside a reactive context. Doing a full recompute."),("boolean"==typeof this.requiresReaction_?this.requiresReaction_:Vr.computedRequiresReaction)&&console.warn("[mobx] Computed value '"+this.name_+"' is being read outside a reactive context. Doing a full recompute."))},t.toString=function(){return this.name_+"["+this.derivation.toString()+"]"},t.valueOf=function(){return ni(this.get())},t[Symbol.toPrimitive]=function(){return this.valueOf()},li(e,[{key:"isComputing",get:function(){return si(this.flags_,e.isComputingMask_)},set:function(t){this.flags_=oi(this.flags_,e.isComputingMask_,t)}},{key:"isRunningSetter",get:function(){return si(this.flags_,e.isRunningSetterMask_)},set:function(t){this.flags_=oi(this.flags_,e.isRunningSetterMask_,t)}},{key:"isBeingObserved",get:function(){return si(this.flags_,e.isBeingObservedMask_)},set:function(t){this.flags_=oi(this.flags_,e.isBeingObservedMask_,t)}},{key:"isPendingUnobservation",get:function(){return si(this.flags_,e.isPendingUnobservationMask_)},set:function(t){this.flags_=oi(this.flags_,e.isPendingUnobservationMask_,t)}},{key:"diffValue",get:function(){return si(this.flags_,e.diffValueMask_)?1:0},set:function(t){this.flags_=oi(this.flags_,e.diffValueMask_,1===t)}}])}();Er.isComputingMask_=1,Er.isRunningSetterMask_=2,Er.isBeingObservedMask_=4,Er.isPendingUnobservationMask_=8,Er.diffValueMask_=16;var Ar,Tr,Sr=Yn("ComputedValue",Er);!function(e){e[e.NOT_TRACKING_=-1]="NOT_TRACKING_",e[e.UP_TO_DATE_=0]="UP_TO_DATE_",e[e.POSSIBLY_STALE_=1]="POSSIBLY_STALE_",e[e.STALE_=2]="STALE_"}(Ar||(Ar={})),function(e){e[e.NONE=0]="NONE",e[e.LOG=1]="LOG",e[e.BREAK=2]="BREAK"}(Tr||(Tr={}));var kr=function(e){this.cause=void 0,this.cause=e};function Or(e){return e instanceof kr}function Pr(e){switch(e.dependenciesState_){case Ar.UP_TO_DATE_:return!1;case Ar.NOT_TRACKING_:case Ar.STALE_:return!0;case Ar.POSSIBLY_STALE_:for(var t=Dr(!0),n=Nr(),i=e.observing_,r=i.length,s=0;s<r;s++){var o=i[s];if(Sr(o)){if(Vr.disableErrorBoundaries)o.get();else try{o.get()}catch(e){return zr(n),Ir(t),!0}if(e.dependenciesState_===Ar.STALE_)return zr(n),Ir(t),!0}}return Fr(e),zr(n),Ir(t),!1}}function Cr(e){if("production"!==process.env.NODE_ENV){var t=e.observers_.size>0;Vr.allowStateChanges||!t&&"always"!==Vr.enforceActions||console.warn("[MobX] "+(Vr.enforceActions?"Since strict-mode is enabled, changing (observed) observable values without using an action is not allowed. Tried to modify: ":"Side effects like changing state are not allowed at this point. Are you trying to modify state from, for example, a computed value or the render function of a React component? You can wrap side effects in 'runInAction' (or decorate functions with 'action') if needed. Tried to modify: ")+e.name_)}}function Rr(e,t,n){var i=Dr(!0);Fr(e),e.newObserving_=new Array(0===e.runId_?100:e.observing_.length),e.unboundDepsCount_=0,e.runId_=++Vr.runId;var r,s=Vr.trackingDerivation;if(Vr.trackingDerivation=e,Vr.inBatch++,!0===Vr.disableErrorBoundaries)r=t.call(n);else try{r=t.call(n)}catch(e){r=new kr(e)}return Vr.inBatch--,Vr.trackingDerivation=s,function(e){for(var t=e.observing_,n=e.observing_=e.newObserving_,i=Ar.UP_TO_DATE_,r=0,s=e.unboundDepsCount_,o=0;o<s;o++){var a=n[o];0===a.diffValue&&(a.diffValue=1,r!==o&&(n[r]=a),r++),a.dependenciesState_>i&&(i=a.dependenciesState_)}n.length=r,e.newObserving_=null,s=t.length;for(;s--;){var l=t[s];0===l.diffValue&&$r(l,e),l.diffValue=0}for(;r--;){var u=n[r];1===u.diffValue&&(u.diffValue=0,Gr(u,e))}i!==Ar.UP_TO_DATE_&&(e.dependenciesState_=i,e.onBecomeStale_())}(e),function(e){if("production"===process.env.NODE_ENV)return;if(0!==e.observing_.length)return;("boolean"==typeof e.requiresObservable_?e.requiresObservable_:Vr.reactionRequiresObservable)&&console.warn("[mobx] Derivation '"+e.name_+"' is created/updated without reading any observable value.")}(e),Ir(i),r}function Mr(e){var t=e.observing_;e.observing_=[];for(var n=t.length;n--;)$r(t[n],e);e.dependenciesState_=Ar.NOT_TRACKING_}function Lr(e){var t=Nr();try{return e()}finally{zr(t)}}function Nr(){var e=Vr.trackingDerivation;return Vr.trackingDerivation=null,e}function zr(e){Vr.trackingDerivation=e}function Dr(e){var t=Vr.allowStateReads;return Vr.allowStateReads=e,t}function Ir(e){Vr.allowStateReads=e}function Fr(e){if(e.dependenciesState_!==Ar.UP_TO_DATE_){e.dependenciesState_=Ar.UP_TO_DATE_;for(var t=e.observing_,n=t.length;n--;)t[n].lowestObserverState_=Ar.UP_TO_DATE_}}var jr=function(){this.version=6,this.UNCHANGED={},this.trackingDerivation=null,this.trackingContext=null,this.runId=0,this.mobxGuid=0,this.inBatch=0,this.pendingUnobservations=[],this.pendingReactions=[],this.isRunningReactions=!1,this.allowStateChanges=!1,this.allowStateReads=!0,this.enforceActions=!0,this.spyListeners=[],this.globalReactionErrorHandlers=[],this.computedRequiresReaction=!1,this.reactionRequiresObservable=!1,this.observableRequiresReaction=!1,this.disableErrorBoundaries=!1,this.suppressReactionErrors=!1,this.useProxies=!0,this.verifyProxies=!1,this.safeDescriptors=!0},Br=!0,Ur=!1,Vr=function(){var e=Pn();return e.__mobxInstanceCount>0&&!e.__mobxGlobals&&(Br=!1),e.__mobxGlobals&&e.__mobxGlobals.version!==(new jr).version&&(Br=!1),Br?e.__mobxGlobals?(e.__mobxInstanceCount+=1,e.__mobxGlobals.UNCHANGED||(e.__mobxGlobals.UNCHANGED={}),e.__mobxGlobals):(e.__mobxInstanceCount=1,e.__mobxGlobals=new jr):(setTimeout(function(){Ur||kn(35)},1),new jr)}();function Gr(e,t){e.observers_.add(t),e.lowestObserverState_>t.dependenciesState_&&(e.lowestObserverState_=t.dependenciesState_)}function $r(e,t){e.observers_.delete(t),0===e.observers_.size&&Zr(e)}function Zr(e){!1===e.isPendingUnobservation&&(e.isPendingUnobservation=!0,Vr.pendingUnobservations.push(e))}function qr(){Vr.inBatch++}function Wr(){if(0===--Vr.inBatch){ts();for(var e=Vr.pendingUnobservations,t=0;t<e.length;t++){var n=e[t];n.isPendingUnobservation=!1,0===n.observers_.size&&(n.isBeingObserved&&(n.isBeingObserved=!1,n.onBUO()),n instanceof Er&&n.suspend_())}Vr.pendingUnobservations=[]}}function Hr(e){!function(e){"production"!==process.env.NODE_ENV&&!Vr.allowStateReads&&Vr.observableRequiresReaction&&console.warn("[mobx] Observable '"+e.name_+"' being read outside a reactive context.")}(e);var t=Vr.trackingDerivation;return null!==t?(t.runId_!==e.lastAccessedBy_&&(e.lastAccessedBy_=t.runId_,t.newObserving_[t.unboundDepsCount_++]=e,!e.isBeingObserved&&Vr.trackingContext&&(e.isBeingObserved=!0,e.onBO())),e.isBeingObserved):(0===e.observers_.size&&Vr.inBatch>0&&Zr(e),!1)}function Kr(e){e.lowestObserverState_!==Ar.STALE_&&(e.lowestObserverState_=Ar.STALE_,e.observers_.forEach(function(t){t.dependenciesState_===Ar.UP_TO_DATE_&&("production"!==process.env.NODE_ENV&&t.isTracing_!==Tr.NONE&&Yr(t,e),t.onBecomeStale_()),t.dependenciesState_=Ar.STALE_}))}function Yr(e,t){if(console.log("[mobx.trace] '"+e.name_+"' is invalidated due to a change in: '"+t.name_+"'"),e.isTracing_===Tr.BREAK){var n=[];Xr(Ps(e),n,1),new Function("debugger;\n/*\nTracing '"+e.name_+"'\n\nYou are entering this break point because derivation '"+e.name_+"' is being traced and '"+t.name_+"' is now forcing it to update.\nJust follow the stacktrace you should now see in the devtools to see precisely what piece of your code is causing this update\nThe stackframe you are looking for is at least ~6-8 stack-frames up.\n\n"+(e instanceof Er?e.derivation.toString().replace(/[*]\//g,"/"):"")+"\n\nThe dependencies for this derivation are:\n\n"+n.join("\n")+"\n*/\n ")()}}function Xr(e,t,n){t.length>=1e3?t.push("(and many more)"):(t.push(""+"\t".repeat(n-1)+e.name),e.dependencies&&e.dependencies.forEach(function(e){return Xr(e,t,n+1)}))}var Jr=function(){function e(e,t,n,i){void 0===e&&(e="production"!==process.env.NODE_ENV?"Reaction@"+Bn():"Reaction"),this.name_=void 0,this.onInvalidate_=void 0,this.errorHandler_=void 0,this.requiresObservable_=void 0,this.observing_=[],this.newObserving_=[],this.dependenciesState_=Ar.NOT_TRACKING_,this.runId_=0,this.unboundDepsCount_=0,this.flags_=0,this.isTracing_=Tr.NONE,this.name_=e,this.onInvalidate_=t,this.errorHandler_=n,this.requiresObservable_=i}var t=e.prototype;return t.onBecomeStale_=function(){this.schedule_()},t.schedule_=function(){this.isScheduled||(this.isScheduled=!0,Vr.pendingReactions.push(this),ts())},t.runReaction_=function(){if(!this.isDisposed){qr(),this.isScheduled=!1;var e=Vr.trackingContext;if(Vr.trackingContext=this,Pr(this)){this.isTrackPending=!0;try{this.onInvalidate_(),"production"!==process.env.NODE_ENV&&this.isTrackPending&&rs()&&ss({name:this.name_,type:"scheduled-reaction"})}catch(e){this.reportExceptionInDerivation_(e)}}Vr.trackingContext=e,Wr()}},t.track=function(e){if(!this.isDisposed){qr();var t,n=rs();"production"!==process.env.NODE_ENV&&n&&(t=Date.now(),os({name:this.name_,type:"reaction"})),this.isRunning=!0;var i=Vr.trackingContext;Vr.trackingContext=this;var r=Rr(this,e,void 0);Vr.trackingContext=i,this.isRunning=!1,this.isTrackPending=!1,this.isDisposed&&Mr(this),Or(r)&&this.reportExceptionInDerivation_(r.cause),"production"!==process.env.NODE_ENV&&n&&ls({time:Date.now()-t}),Wr()}},t.reportExceptionInDerivation_=function(e){var t=this;if(this.errorHandler_)this.errorHandler_(e,this);else{if(Vr.disableErrorBoundaries)throw e;var n="production"!==process.env.NODE_ENV?"[mobx] Encountered an uncaught exception that was thrown by a reaction or observer component, in: '"+this+"'":"[mobx] uncaught error in '"+this+"'";Vr.suppressReactionErrors?"production"!==process.env.NODE_ENV&&console.warn("[mobx] (error in reaction '"+this.name_+"' suppressed, fix error of causing action below)"):console.error(n,e),"production"!==process.env.NODE_ENV&&rs()&&ss({type:"error",name:this.name_,message:n,error:""+e}),Vr.globalReactionErrorHandlers.forEach(function(n){return n(e,t)})}},t.dispose=function(){this.isDisposed||(this.isDisposed=!0,this.isRunning||(qr(),Mr(this),Wr()))},t.getDisposer_=function(e){var t=this,n=function n(){t.dispose(),null==e||null==e.removeEventListener||e.removeEventListener("abort",n)};return null==e||null==e.addEventListener||e.addEventListener("abort",n),n[vi]=this,"dispose"in Symbol&&"symbol"==typeof Symbol.dispose&&(n[Symbol.dispose]=n),n},t.toString=function(){return"Reaction["+this.name_+"]"},t.trace=function(e){void 0===e&&(e=!1),function(){if("production"===process.env.NODE_ENV)return;for(var e=!1,t=arguments.length,n=new Array(t),i=0;i<t;i++)n[i]=arguments[i];"boolean"==typeof n[n.length-1]&&(e=n.pop());var r=function(e){switch(e.length){case 0:return Vr.trackingDerivation;case 1:return jo(e[0]);case 2:return jo(e[0],e[1])}}(n);if(!r)return kn("'trace(break?)' can only be used inside a tracked computed value or a Reaction. Consider passing in the computed value or reaction explicitly");r.isTracing_===Tr.NONE&&console.log("[mobx.trace] '"+r.name_+"' tracing enabled");r.isTracing_=e?Tr.BREAK:Tr.LOG}(this,e)},li(e,[{key:"isDisposed",get:function(){return si(this.flags_,e.isDisposedMask_)},set:function(t){this.flags_=oi(this.flags_,e.isDisposedMask_,t)}},{key:"isScheduled",get:function(){return si(this.flags_,e.isScheduledMask_)},set:function(t){this.flags_=oi(this.flags_,e.isScheduledMask_,t)}},{key:"isTrackPending",get:function(){return si(this.flags_,e.isTrackPendingMask_)},set:function(t){this.flags_=oi(this.flags_,e.isTrackPendingMask_,t)}},{key:"isRunning",get:function(){return si(this.flags_,e.isRunningMask_)},set:function(t){this.flags_=oi(this.flags_,e.isRunningMask_,t)}},{key:"diffValue",get:function(){return si(this.flags_,e.diffValueMask_)?1:0},set:function(t){this.flags_=oi(this.flags_,e.diffValueMask_,1===t)}}])}();Jr.isDisposedMask_=1,Jr.isScheduledMask_=2,Jr.isTrackPendingMask_=4,Jr.isRunningMask_=8,Jr.diffValueMask_=16;var Qr=100,es=function(e){return e()};function ts(){Vr.inBatch>0||Vr.isRunningReactions||es(ns)}function ns(){Vr.isRunningReactions=!0;for(var e=Vr.pendingReactions,t=0;e.length>0;){++t===Qr&&(console.error("production"!==process.env.NODE_ENV?"Reaction doesn't converge to a stable state after "+Qr+" iterations. Probably there is a cycle in the reactive function: "+e[0]:"[mobx] cycle in reaction: "+e[0]),e.splice(0));for(var n=e.splice(0),i=0,r=n.length;i<r;i++)n[i].runReaction_()}Vr.isRunningReactions=!1}var is=Yn("Reaction",Jr);function rs(){return"production"!==process.env.NODE_ENV&&!!Vr.spyListeners.length}function ss(e){if("production"!==process.env.NODE_ENV&&Vr.spyListeners.length)for(var t=Vr.spyListeners,n=0,i=t.length;n<i;n++)t[n](e)}function os(e){"production"!==process.env.NODE_ENV&&ss(ci({},e,{spyReportStart:!0}))}var as={type:"report-end",spyReportEnd:!0};function ls(e){"production"!==process.env.NODE_ENV&&ss(e?ci({},e,{type:"report-end",spyReportEnd:!0}):as)}var us="action",cs="autoAction",hs=Oi(us),ds=Oi("action.bound",{bound:!0}),fs=Oi(cs,{autoAction:!0}),ps=Oi("autoAction.bound",{autoAction:!0,bound:!0});function ms(e){return function(t,n){return Gn(t)?vr(t.name||"<unnamed action>",t,e):Gn(n)?vr(t,n,e):gi(n)?(e?fs:hs).decorate_20223_(t,n):$n(n)?_i(t,n,e?fs:hs):$n(t)?mi(Oi(e?cs:us,{name:t,autoAction:e})):void("production"!==process.env.NODE_ENV&&kn("Invalid arguments for `action`"))}}var _s=ms(!1);Object.assign(_s,hs);var gs=ms(!0);function ys(e){return Gn(e)&&!0===e.isMobxAction}Object.assign(gs,fs),_s.bound=mi(ds),gs.bound=mi(ps);var vs=function(e){return e()};function bs(e){return e.scheduler?e.scheduler:e.delay?function(t){return setTimeout(t,e.delay)}:vs}function xs(e,t,n){var i,r,s;void 0===n&&(n=zn),"production"!==process.env.NODE_ENV&&(Gn(e)&&Gn(t)||kn("First and second argument to reaction should be functions"),qn(n)||kn("Third argument of reactions should be an object"));var o,a,l,u=null!=(i=n.name)?i:"production"!==process.env.NODE_ENV?"Reaction@"+Bn():"Reaction",c=_s(u,n.onError?(o=n.onError,a=t,function(){try{return a.apply(this,arguments)}catch(e){o.call(this,e)}}):t),h=!n.scheduler&&!n.delay,d=bs(n),f=!0,p=!1,m=n.compareStructural?Ei.structural:n.equals||Ei.default,_=new Jr(u,function(){f||h?g():p||(p=!0,d(g))},n.onError,n.requiresObservable);function g(){if(p=!1,!_.isDisposed){var t=!1,i=l;_.track(function(){var n=function(e,t){var n=br(e);try{return t()}finally{xr(n)}}(!1,function(){return e(_)});t=f||!m(l,n),l=n}),(f&&n.fireImmediately||!f&&t)&&c(l,i,_),f=!1}}return null!=(r=n)&&null!=(r=r.signal)&&r.aborted||_.schedule_(),_.getDisposer_(null==(s=n)?void 0:s.signal)}var ws="onBO",Es="onBUO";function As(e,t,n){return Ts(Es,e,t,n)}function Ts(e,t,n,i){var r=jo(t),s=Gn(i)?i:n,o=e+"L";return r[o]?r[o].add(s):r[o]=new Set([s]),function(){var e=r[o];e&&(e.delete(s),0===e.size&&delete r[o])}}var Ss="always";function ks(e){!0===e.isolateGlobalState&&function(){if((Vr.pendingReactions.length||Vr.inBatch||Vr.isRunningReactions)&&kn(36),Ur=!0,Br){var e=Pn();0===--e.__mobxInstanceCount&&(e.__mobxGlobals=void 0),Vr=new jr}}();var t,n,i=e.useProxies,r=e.enforceActions;if(void 0!==i&&(Vr.useProxies=i===Ss||"never"!==i&&"undefined"!=typeof Proxy),"ifavailable"===i&&(Vr.verifyProxies=!0),void 0!==r){var s=r===Ss?Ss:"observed"===r;Vr.enforceActions=s,Vr.allowStateChanges=!0!==s&&s!==Ss}["computedRequiresReaction","reactionRequiresObservable","observableRequiresReaction","disableErrorBoundaries","safeDescriptors"].forEach(function(t){t in e&&(Vr[t]=!!e[t])}),Vr.allowStateReads=!Vr.observableRequiresReaction,"production"!==process.env.NODE_ENV&&!0===Vr.disableErrorBoundaries&&console.warn("WARNING: Debug feature only. MobX will NOT recover from errors when `disableErrorBoundaries` is enabled."),e.reactionScheduler&&(t=e.reactionScheduler,n=es,es=function(e){return t(function(){return n(e)})})}function Os(e,t,n,i){"production"!==process.env.NODE_ENV&&(arguments.length>4&&kn("'extendObservable' expected 2-4 arguments"),"object"!=typeof e&&kn("'extendObservable' expects an object as first argument"),fo(e)&&kn("'extendObservable' should not be used on maps, use map.merge instead"),qn(t)||kn("'extendObservable' only accepts plain objects as second argument"),(Fs(t)||Fs(n))&&kn("Extending an object with another observable (object) is not supported"));var r=ri(t);return Vo(function(){var t=wo(e,i)[vi];ei(r).forEach(function(e){t.extend_(e,r[e],!n||(!(e in n)||n[e]))})}),e}function Ps(e,t){return Cs(jo(e,t))}function Cs(e){var t,n={name:e.name_};return e.observing_&&e.observing_.length>0&&(n.dependencies=(t=e.observing_,Array.from(new Set(t))).map(Cs)),n}var Rs=0;function Ms(){this.message="FLOW_CANCELLED"}Ms.prototype=Object.create(Error.prototype);var Ls=Li("flow"),Ns=Li("flow.bound",{bound:!0}),zs=Object.assign(function(e,t){if(gi(t))return Ls.decorate_20223_(e,t);if($n(t))return _i(e,t,Ls);"production"!==process.env.NODE_ENV&&1!==arguments.length&&kn("Flow expects single argument with generator function");var n=e,i=n.name||"<unnamed flow>",r=function(){var e,t=arguments,r=++Rs,s=_s(i+" - runid: "+r+" - init",n).apply(this,t),o=void 0,a=new Promise(function(t,n){var a=0;function l(e){var t;o=void 0;try{t=_s(i+" - runid: "+r+" - yield "+a++,s.next).call(s,e)}catch(e){return n(e)}c(t)}function u(e){var t;o=void 0;try{t=_s(i+" - runid: "+r+" - yield "+a++,s.throw).call(s,e)}catch(e){return n(e)}c(t)}function c(e){if(!Gn(null==e?void 0:e.then))return e.done?t(e.value):(o=Promise.resolve(e.value)).then(l,u);e.then(c,n)}e=n,l(void 0)});return a.cancel=_s(i+" - runid: "+r+" - cancel",function(){try{o&&Ds(o);var t=s.return(void 0),n=Promise.resolve(t.value);n.then(Vn,Vn),Ds(n),e(new Ms)}catch(t){e(t)}}),a};return r.isMobXFlow=!0,r},Ls);function Ds(e){Gn(e.cancel)&&e.cancel()}function Is(e){return!0===(null==e?void 0:e.isMobXFlow)}function Fs(e){return"production"!==process.env.NODE_ENV&&1!==arguments.length&&kn("isObservable expects only 1 argument. Use isObservableProp to inspect the observability of a property"),function(e){return!!e&&(To(e)||!!e[vi]||xi(e)||is(e)||Sr(e))}(e)}function js(e,t){void 0===t&&(t=void 0),qr();try{return e.apply(t)}finally{Wr()}}function Bs(e){return e[vi]}zs.bound=mi(Ns);var Us={has:function(e,t){return"production"!==process.env.NODE_ENV&&Vr.trackingDerivation&&jn("detect new properties using the 'in' operator. Use 'has' from 'mobx' instead."),Bs(e).has_(t)},get:function(e,t){return Bs(e).get_(t)},set:function(e,t,n){var i;return!!$n(t)&&("production"===process.env.NODE_ENV||Bs(e).values_.has(t)||jn("add a new observable property through direct assignment. Use 'set' from 'mobx' instead."),null==(i=Bs(e).set_(t,n,!0))||i)},deleteProperty:function(e,t){var n;return"production"!==process.env.NODE_ENV&&jn("delete properties from an observable object. Use 'remove' from 'mobx' instead."),!!$n(t)&&(null==(n=Bs(e).delete_(t,!0))||n)},defineProperty:function(e,t,n){var i;return"production"!==process.env.NODE_ENV&&jn("define property on an observable object. Use 'defineProperty' from 'mobx' instead."),null==(i=Bs(e).defineProperty_(t,n))||i},ownKeys:function(e){return"production"!==process.env.NODE_ENV&&Vr.trackingDerivation&&jn("iterate keys to detect added / removed properties. Use 'keys' from 'mobx' instead."),Bs(e).ownKeys_()},preventExtensions:function(e){kn(13)}};function Vs(e){return void 0!==e.interceptors_&&e.interceptors_.length>0}function Gs(e,t){var n=e.interceptors_||(e.interceptors_=[]);return n.push(t),Un(function(){var e=n.indexOf(t);-1!==e&&n.splice(e,1)})}function $s(e,t){var n=Nr();try{for(var i=[].concat(e.interceptors_||[]),r=0,s=i.length;r<s&&((t=i[r](t))&&!t.type&&kn(14),t);r++);return t}finally{zr(n)}}function Zs(e){return void 0!==e.changeListeners_&&e.changeListeners_.length>0}function qs(e,t){var n=e.changeListeners_||(e.changeListeners_=[]);return n.push(t),Un(function(){var e=n.indexOf(t);-1!==e&&n.splice(e,1)})}function Ws(e,t){var n=Nr(),i=e.changeListeners_;if(i){for(var r=0,s=(i=i.slice()).length;r<s;r++)i[r](t);zr(n)}}var Hs=Symbol("mobx-keys");function Ks(e,t,n){return"production"!==process.env.NODE_ENV&&(qn(e)||qn(Object.getPrototypeOf(e))||kn("'makeAutoObservable' can only be used for classes that don't have a superclass"),To(e)&&kn("makeAutoObservable can only be used on objects not already made observable")),qn(e)?Os(e,e,t,n):(Vo(function(){var i=wo(e,n)[vi];if(!e[Hs]){var r=Object.getPrototypeOf(e),s=new Set([].concat(ei(e),ei(r)));s.delete("constructor"),s.delete(vi),Hn(r,Hs,s)}e[Hs].forEach(function(e){return i.make_(e,!t||(!(e in t)||t[e]))})}),e)}var Ys="splice",Xs="update",Js={get:function(e,t){var n=e[vi];return t===vi?n:"length"===t?n.getArrayLength_():"string"!=typeof t||isNaN(t)?ii(to,t)?to[t]:e[t]:n.get_(parseInt(t))},set:function(e,t,n){var i=e[vi];return"length"===t&&i.setArrayLength_(n),"symbol"==typeof t||isNaN(t)?e[t]=n:i.set_(parseInt(t),n),!0},preventExtensions:function(){kn(15)}},Qs=function(){function e(e,t,n,i){void 0===e&&(e="production"!==process.env.NODE_ENV?"ObservableArray@"+Bn():"ObservableArray"),this.owned_=void 0,this.legacyMode_=void 0,this.atom_=void 0,this.values_=[],this.interceptors_=void 0,this.changeListeners_=void 0,this.enhancer_=void 0,this.dehancer=void 0,this.proxy_=void 0,this.lastKnownLength_=0,this.owned_=n,this.legacyMode_=i,this.atom_=new bi(e),this.enhancer_=function(n,i){return t(n,i,"production"!==process.env.NODE_ENV?e+"[..]":"ObservableArray[..]")}}var t=e.prototype;return t.dehanceValue_=function(e){return void 0!==this.dehancer?this.dehancer(e):e},t.dehanceValues_=function(e){return void 0!==this.dehancer&&e.length>0?e.map(this.dehancer):e},t.intercept_=function(e){return Gs(this,e)},t.observe_=function(e,t){return void 0===t&&(t=!1),t&&e({observableKind:"array",object:this.proxy_,debugObjectName:this.atom_.name_,type:"splice",index:0,added:this.values_.slice(),addedCount:this.values_.length,removed:[],removedCount:0}),qs(this,e)},t.getArrayLength_=function(){return this.atom_.reportObserved(),this.values_.length},t.setArrayLength_=function(e){("number"!=typeof e||isNaN(e)||e<0)&&kn("Out of range: "+e);var t=this.values_.length;if(e!==t)if(e>t){for(var n=new Array(e-t),i=0;i<e-t;i++)n[i]=void 0;this.spliceWithArray_(t,0,n)}else this.spliceWithArray_(e,t-e)},t.updateArrayLength_=function(e,t){e!==this.lastKnownLength_&&kn(16),this.lastKnownLength_+=t,this.legacyMode_&&t>0&&Io(e+t+1)},t.spliceWithArray_=function(e,t,n){var i=this;Cr(this.atom_);var r=this.values_.length;if(void 0===e?e=0:e>r?e=r:e<0&&(e=Math.max(0,r+e)),t=1===arguments.length?r-e:null==t?0:Math.max(0,Math.min(t,r-e)),void 0===n&&(n=Nn),Vs(this)){var s=$s(this,{object:this.proxy_,type:Ys,index:e,removedCount:t,added:n});if(!s)return Nn;t=s.removedCount,n=s.added}if(n=0===n.length?n:n.map(function(e){return i.enhancer_(e,void 0)}),this.legacyMode_||"production"!==process.env.NODE_ENV){var o=n.length-t;this.updateArrayLength_(r,o)}var a=this.spliceItemsIntoValues_(e,t,n);return 0===t&&0===n.length||this.notifyArraySplice_(e,n,a),this.dehanceValues_(a)},t.spliceItemsIntoValues_=function(e,t,n){var i;if(n.length<1e4)return(i=this.values_).splice.apply(i,[e,t].concat(n));var r=this.values_.slice(e,e+t),s=this.values_.slice(e+t);this.values_.length+=n.length-t;for(var o=0;o<n.length;o++)this.values_[e+o]=n[o];for(var a=0;a<s.length;a++)this.values_[e+n.length+a]=s[a];return r},t.notifyArrayChildUpdate_=function(e,t,n){var i=!this.owned_&&rs(),r=Zs(this),s=r||i?{observableKind:"array",object:this.proxy_,type:Xs,debugObjectName:this.atom_.name_,index:e,newValue:t,oldValue:n}:null;"production"!==process.env.NODE_ENV&&i&&os(s),this.atom_.reportChanged(),r&&Ws(this,s),"production"!==process.env.NODE_ENV&&i&&ls()},t.notifyArraySplice_=function(e,t,n){var i=!this.owned_&&rs(),r=Zs(this),s=r||i?{observableKind:"array",object:this.proxy_,debugObjectName:this.atom_.name_,type:Ys,index:e,removed:n,added:t,removedCount:n.length,addedCount:t.length}:null;"production"!==process.env.NODE_ENV&&i&&os(s),this.atom_.reportChanged(),r&&Ws(this,s),"production"!==process.env.NODE_ENV&&i&&ls()},t.get_=function(e){if(!(this.legacyMode_&&e>=this.values_.length))return this.atom_.reportObserved(),this.dehanceValue_(this.values_[e]);console.warn("production"!==process.env.NODE_ENV?"[mobx.array] Attempt to read an array index ("+e+") that is out of bounds ("+this.values_.length+"). Please check length first. Out of bound indices will not be tracked by MobX":"[mobx] Out of bounds read: "+e)},t.set_=function(e,t){var n=this.values_;if(this.legacyMode_&&e>n.length&&kn(17,e,n.length),e<n.length){Cr(this.atom_);var i=n[e];if(Vs(this)){var r=$s(this,{type:Xs,object:this.proxy_,index:e,newValue:t});if(!r)return;t=r.newValue}(t=this.enhancer_(t,i))!==i&&(n[e]=t,this.notifyArrayChildUpdate_(e,t,i))}else{for(var s=new Array(e+1-n.length),o=0;o<s.length-1;o++)s[o]=void 0;s[s.length-1]=t,this.spliceWithArray_(n.length,0,s)}},e}();function eo(e,t,n,i){return void 0===n&&(n="production"!==process.env.NODE_ENV?"ObservableArray@"+Bn():"ObservableArray"),void 0===i&&(i=!1),Fn(),Vo(function(){var r=new Qs(n,t,i,!1);Kn(r.values_,vi,r);var s=new Proxy(r.values_,Js);return r.proxy_=s,e&&e.length&&r.spliceWithArray_(0,0,e),s})}var to={clear:function(){return this.splice(0)},replace:function(e){var t=this[vi];return t.spliceWithArray_(0,t.values_.length,e)},toJSON:function(){return this.slice()},splice:function(e,t){for(var n=arguments.length,i=new Array(n>2?n-2:0),r=2;r<n;r++)i[r-2]=arguments[r];var s=this[vi];switch(arguments.length){case 0:return[];case 1:return s.spliceWithArray_(e);case 2:return s.spliceWithArray_(e,t)}return s.spliceWithArray_(e,t,i)},spliceWithArray:function(e,t,n){return this[vi].spliceWithArray_(e,t,n)},push:function(){for(var e=this[vi],t=arguments.length,n=new Array(t),i=0;i<t;i++)n[i]=arguments[i];return e.spliceWithArray_(e.values_.length,0,n),e.values_.length},pop:function(){return this.splice(Math.max(this[vi].values_.length-1,0),1)[0]},shift:function(){return this.splice(0,1)[0]},unshift:function(){for(var e=this[vi],t=arguments.length,n=new Array(t),i=0;i<t;i++)n[i]=arguments[i];return e.spliceWithArray_(0,0,n),e.values_.length},reverse:function(){return Vr.trackingDerivation&&kn(37,"reverse"),this.replace(this.slice().reverse()),this},sort:function(){Vr.trackingDerivation&&kn(37,"sort");var e=this.slice();return e.sort.apply(e,arguments),this.replace(e),this},remove:function(e){var t=this[vi],n=t.dehanceValues_(t.values_).indexOf(e);return n>-1&&(this.splice(n,1),!0)}};function no(e,t){"function"==typeof Array.prototype[e]&&(to[e]=t(e))}function io(e){return function(){var t=this[vi];t.atom_.reportObserved();var n=t.dehanceValues_(t.values_);return n[e].apply(n,arguments)}}function ro(e){return function(t,n){var i=this,r=this[vi];return r.atom_.reportObserved(),r.dehanceValues_(r.values_)[e](function(e,r){return t.call(n,e,r,i)})}}function so(e){return function(){var t=this,n=this[vi];n.atom_.reportObserved();var i=n.dehanceValues_(n.values_),r=arguments[0];return arguments[0]=function(e,n,i){return r(e,n,i,t)},i[e].apply(i,arguments)}}no("at",io),no("concat",io),no("flat",io),no("includes",io),no("indexOf",io),no("join",io),no("lastIndexOf",io),no("slice",io),no("toString",io),no("toLocaleString",io),no("toSorted",io),no("toSpliced",io),no("with",io),no("every",ro),no("filter",ro),no("find",ro),no("findIndex",ro),no("findLast",ro),no("findLastIndex",ro),no("flatMap",ro),no("forEach",ro),no("map",ro),no("some",ro),no("toReversed",ro),no("reduce",so),no("reduceRight",so);var oo=Yn("ObservableArrayAdministration",Qs);function ao(e){return Zn(e)&&oo(e[vi])}var lo={},uo="add",co="delete",ho=function(){function e(e,t,n){var i=this;void 0===t&&(t=Ai),void 0===n&&(n="production"!==process.env.NODE_ENV?"ObservableMap@"+Bn():"ObservableMap"),this.enhancer_=void 0,this.name_=void 0,this[vi]=lo,this.data_=void 0,this.hasMap_=void 0,this.keysAtom_=void 0,this.interceptors_=void 0,this.changeListeners_=void 0,this.dehancer=void 0,this.enhancer_=t,this.name_=n,Gn(Map)||kn(18),Vo(function(){i.keysAtom_=wi("production"!==process.env.NODE_ENV?i.name_+".keys()":"ObservableMap.keys()"),i.data_=new Map,i.hasMap_=new Map,e&&i.merge(e)})}var t=e.prototype;return t.has_=function(e){return this.data_.has(e)},t.has=function(e){var t=this;if(!Vr.trackingDerivation)return this.has_(e);var n=this.hasMap_.get(e);if(!n){var i=n=new wr(this.has_(e),Ti,"production"!==process.env.NODE_ENV?this.name_+"."+ti(e)+"?":"ObservableMap.key?",!1);this.hasMap_.set(e,i),As(i,function(){return t.hasMap_.delete(e)})}return n.get()},t.set=function(e,t){var n=this.has_(e);if(Vs(this)){var i=$s(this,{type:n?Xs:uo,object:this,newValue:t,name:e});if(!i)return this;t=i.newValue}return n?this.updateValue_(e,t):this.addValue_(e,t),this},t.delete=function(e){var t=this;if((Cr(this.keysAtom_),Vs(this))&&!$s(this,{type:co,object:this,name:e}))return!1;if(this.has_(e)){var n=rs(),i=Zs(this),r=i||n?{observableKind:"map",debugObjectName:this.name_,type:co,object:this,oldValue:this.data_.get(e).value_,name:e}:null;return"production"!==process.env.NODE_ENV&&n&&os(r),js(function(){var n;t.keysAtom_.reportChanged(),null==(n=t.hasMap_.get(e))||n.setNewValue_(!1),t.data_.get(e).setNewValue_(void 0),t.data_.delete(e)}),i&&Ws(this,r),"production"!==process.env.NODE_ENV&&n&&ls(),!0}return!1},t.updateValue_=function(e,t){var n=this.data_.get(e);if((t=n.prepareNewValue_(t))!==Vr.UNCHANGED){var i=rs(),r=Zs(this),s=r||i?{observableKind:"map",debugObjectName:this.name_,type:Xs,object:this,oldValue:n.value_,name:e,newValue:t}:null;"production"!==process.env.NODE_ENV&&i&&os(s),n.setNewValue_(t),r&&Ws(this,s),"production"!==process.env.NODE_ENV&&i&&ls()}},t.addValue_=function(e,t){var n=this;Cr(this.keysAtom_),js(function(){var i,r=new wr(t,n.enhancer_,"production"!==process.env.NODE_ENV?n.name_+"."+ti(e):"ObservableMap.key",!1);n.data_.set(e,r),t=r.value_,null==(i=n.hasMap_.get(e))||i.setNewValue_(!0),n.keysAtom_.reportChanged()});var i=rs(),r=Zs(this),s=r||i?{observableKind:"map",debugObjectName:this.name_,type:uo,object:this,name:e,newValue:t}:null;"production"!==process.env.NODE_ENV&&i&&os(s),r&&Ws(this,s),"production"!==process.env.NODE_ENV&&i&&ls()},t.get=function(e){return this.has(e)?this.dehanceValue_(this.data_.get(e).get()):this.dehanceValue_(void 0)},t.dehanceValue_=function(e){return void 0!==this.dehancer?this.dehancer(e):e},t.keys=function(){return this.keysAtom_.reportObserved(),this.data_.keys()},t.values=function(){var e=this,t=this.keys();return po({next:function(){var n=t.next(),i=n.done,r=n.value;return{done:i,value:i?void 0:e.get(r)}}})},t.entries=function(){var e=this,t=this.keys();return po({next:function(){var n=t.next(),i=n.done,r=n.value;return{done:i,value:i?void 0:[r,e.get(r)]}}})},t[Symbol.iterator]=function(){return this.entries()},t.forEach=function(e,t){for(var n,i=ui(this);!(n=i()).done;){var r=n.value,s=r[0],o=r[1];e.call(t,o,s,this)}},t.merge=function(e){var t=this;return fo(e)&&(e=new Map(e)),js(function(){var n,i,r;qn(e)?function(e){var t=Object.keys(e);if(!Qn)return t;var n=Object.getOwnPropertySymbols(e);return n.length?[].concat(t,n.filter(function(t){return Ln.propertyIsEnumerable.call(e,t)})):t}(e).forEach(function(n){return t.set(n,e[n])}):Array.isArray(e)?e.forEach(function(e){var n=e[0],i=e[1];return t.set(n,i)}):Xn(e)?(n=e,i=Object.getPrototypeOf(n),r=Object.getPrototypeOf(i),null!==Object.getPrototypeOf(r)&&kn(19,e),e.forEach(function(e,n){return t.set(n,e)})):null!=e&&kn(20,e)}),this},t.clear=function(){var e=this;js(function(){Lr(function(){for(var t,n=ui(e.keys());!(t=n()).done;){var i=t.value;e.delete(i)}})})},t.replace=function(e){var t=this;return js(function(){for(var n,i=function(e){if(Xn(e)||fo(e))return e;if(Array.isArray(e))return new Map(e);if(qn(e)){var t=new Map;for(var n in e)t.set(n,e[n]);return t}return kn(21,e)}(e),r=new Map,s=!1,o=ui(t.data_.keys());!(n=o()).done;){var a=n.value;if(!i.has(a))if(t.delete(a))s=!0;else{var l=t.data_.get(a);r.set(a,l)}}for(var u,c=ui(i.entries());!(u=c()).done;){var h=u.value,d=h[0],f=h[1],p=t.data_.has(d);if(t.set(d,f),t.data_.has(d)){var m=t.data_.get(d);r.set(d,m),p||(s=!0)}}if(!s)if(t.data_.size!==r.size)t.keysAtom_.reportChanged();else for(var _=t.data_.keys(),g=r.keys(),y=_.next(),v=g.next();!y.done;){if(y.value!==v.value){t.keysAtom_.reportChanged();break}y=_.next(),v=g.next()}t.data_=r}),this},t.toString=function(){return"[object ObservableMap]"},t.toJSON=function(){return Array.from(this)},t.observe_=function(e,t){return"production"!==process.env.NODE_ENV&&!0===t&&kn("`observe` doesn't support fireImmediately=true in combination with maps."),qs(this,e)},t.intercept_=function(e){return Gs(this,e)},li(e,[{key:"size",get:function(){return this.keysAtom_.reportObserved(),this.data_.size}},{key:Symbol.toStringTag,get:function(){return"Map"}}])}(),fo=Yn("ObservableMap",ho);function po(e){return e[Symbol.toStringTag]="MapIterator",Ko(e)}var mo={},_o=function(){function e(e,t,n){var i=this;void 0===t&&(t=Ai),void 0===n&&(n="production"!==process.env.NODE_ENV?"ObservableSet@"+Bn():"ObservableSet"),this.name_=void 0,this[vi]=mo,this.data_=new Set,this.atom_=void 0,this.changeListeners_=void 0,this.interceptors_=void 0,this.dehancer=void 0,this.enhancer_=void 0,this.name_=n,Gn(Set)||kn(22),this.enhancer_=function(e,i){return t(e,i,n)},Vo(function(){i.atom_=wi(i.name_),e&&i.replace(e)})}var t=e.prototype;return t.dehanceValue_=function(e){return void 0!==this.dehancer?this.dehancer(e):e},t.clear=function(){var e=this;js(function(){Lr(function(){for(var t,n=ui(e.data_.values());!(t=n()).done;){var i=t.value;e.delete(i)}})})},t.forEach=function(e,t){for(var n,i=ui(this);!(n=i()).done;){var r=n.value;e.call(t,r,r,this)}},t.add=function(e){var t=this;if(Cr(this.atom_),Vs(this)){var n=$s(this,{type:uo,object:this,newValue:e});if(!n)return this;e=n.newValue}if(!this.has(e)){js(function(){t.data_.add(t.enhancer_(e,void 0)),t.atom_.reportChanged()});var i="production"!==process.env.NODE_ENV&&rs(),r=Zs(this),s=r||i?{observableKind:"set",debugObjectName:this.name_,type:uo,object:this,newValue:e}:null;i&&"production"!==process.env.NODE_ENV&&os(s),r&&Ws(this,s),i&&"production"!==process.env.NODE_ENV&&ls()}return this},t.delete=function(e){var t=this;if(Vs(this)&&!$s(this,{type:co,object:this,oldValue:e}))return!1;if(this.has(e)){var n="production"!==process.env.NODE_ENV&&rs(),i=Zs(this),r=i||n?{observableKind:"set",debugObjectName:this.name_,type:co,object:this,oldValue:e}:null;return n&&"production"!==process.env.NODE_ENV&&os(r),js(function(){t.atom_.reportChanged(),t.data_.delete(e)}),i&&Ws(this,r),n&&"production"!==process.env.NODE_ENV&&ls(),!0}return!1},t.has=function(e){return this.atom_.reportObserved(),this.data_.has(this.dehanceValue_(e))},t.entries=function(){var e=this.values();return yo({next:function(){var t=e.next(),n=t.value,i=t.done;return i?{value:void 0,done:i}:{value:[n,n],done:i}}})},t.keys=function(){return this.values()},t.values=function(){this.atom_.reportObserved();var e=this,t=this.data_.values();return yo({next:function(){var n=t.next(),i=n.value,r=n.done;return r?{value:void 0,done:r}:{value:e.dehanceValue_(i),done:r}}})},t.intersection=function(e){return Jn(e)&&!go(e)?e.intersection(this):new Set(this).intersection(e)},t.union=function(e){return Jn(e)&&!go(e)?e.union(this):new Set(this).union(e)},t.difference=function(e){return new Set(this).difference(e)},t.symmetricDifference=function(e){return Jn(e)&&!go(e)?e.symmetricDifference(this):new Set(this).symmetricDifference(e)},t.isSubsetOf=function(e){return new Set(this).isSubsetOf(e)},t.isSupersetOf=function(e){return new Set(this).isSupersetOf(e)},t.isDisjointFrom=function(e){return Jn(e)&&!go(e)?e.isDisjointFrom(this):new Set(this).isDisjointFrom(e)},t.replace=function(e){var t=this;return go(e)&&(e=new Set(e)),js(function(){Array.isArray(e)||Jn(e)?(t.clear(),e.forEach(function(e){return t.add(e)})):null!=e&&kn("Cannot initialize set from "+e)}),this},t.observe_=function(e,t){return"production"!==process.env.NODE_ENV&&!0===t&&kn("`observe` doesn't support fireImmediately=true in combination with sets."),qs(this,e)},t.intercept_=function(e){return Gs(this,e)},t.toJSON=function(){return Array.from(this)},t.toString=function(){return"[object ObservableSet]"},t[Symbol.iterator]=function(){return this.values()},li(e,[{key:"size",get:function(){return this.atom_.reportObserved(),this.data_.size}},{key:Symbol.toStringTag,get:function(){return"Set"}}])}(),go=Yn("ObservableSet",_o);function yo(e){return e[Symbol.toStringTag]="SetIterator",Ko(e)}var vo=Object.create(null),bo="remove",xo=function(){function e(e,t,n,i){void 0===t&&(t=new Map),void 0===i&&(i=Wi),this.target_=void 0,this.values_=void 0,this.name_=void 0,this.defaultAnnotation_=void 0,this.keysAtom_=void 0,this.changeListeners_=void 0,this.interceptors_=void 0,this.proxy_=void 0,this.isPlainObject_=void 0,this.appliedAnnotations_=void 0,this.pendingKeys_=void 0,this.target_=e,this.values_=t,this.name_=n,this.defaultAnnotation_=i,this.keysAtom_=new bi("production"!==process.env.NODE_ENV?this.name_+".keys":"ObservableObject.keys"),this.isPlainObject_=qn(this.target_),"production"===process.env.NODE_ENV||Xo(this.defaultAnnotation_)||kn("defaultAnnotation must be valid annotation"),"production"!==process.env.NODE_ENV&&(this.appliedAnnotations_={})}var t=e.prototype;return t.getObservablePropValue_=function(e){return this.values_.get(e).get()},t.setObservablePropValue_=function(e,t){var n=this.values_.get(e);if(n instanceof Er)return n.set(t),!0;if(Vs(this)){var i=$s(this,{type:Xs,object:this.proxy_||this.target_,name:e,newValue:t});if(!i)return null;t=i.newValue}if((t=n.prepareNewValue_(t))!==Vr.UNCHANGED){var r=Zs(this),s="production"!==process.env.NODE_ENV&&rs(),o=r||s?{type:Xs,observableKind:"object",debugObjectName:this.name_,object:this.proxy_||this.target_,oldValue:n.value_,name:e,newValue:t}:null;"production"!==process.env.NODE_ENV&&s&&os(o),n.setNewValue_(t),r&&Ws(this,o),"production"!==process.env.NODE_ENV&&s&&ls()}return!0},t.get_=function(e){return Vr.trackingDerivation&&!ii(this.target_,e)&&this.has_(e),this.target_[e]},t.set_=function(e,t,n){return void 0===n&&(n=!1),ii(this.target_,e)?this.values_.has(e)?this.setObservablePropValue_(e,t):n?Reflect.set(this.target_,e,t):(this.target_[e]=t,!0):this.extend_(e,{value:t,enumerable:!0,writable:!0,configurable:!0},this.defaultAnnotation_,n)},t.has_=function(e){if(!Vr.trackingDerivation)return e in this.target_;this.pendingKeys_||(this.pendingKeys_=new Map);var t=this.pendingKeys_.get(e);return t||(t=new wr(e in this.target_,Ti,"production"!==process.env.NODE_ENV?this.name_+"."+ti(e)+"?":"ObservableObject.key?",!1),this.pendingKeys_.set(e,t)),t.get()},t.make_=function(e,t){if(!0===t&&(t=this.defaultAnnotation_),!1!==t){if(ko(this,t,e),!(e in this.target_)){var n;if(null!=(n=this.target_[pi])&&n[e])return;kn(1,t.annotationType_,this.name_+"."+e.toString())}for(var i=this.target_;i&&i!==Ln;){var r=Rn(i,e);if(r){var s=t.make_(this,e,r,i);if(0===s)return;if(1===s)break}i=Object.getPrototypeOf(i)}So(this,t,e)}},t.extend_=function(e,t,n,i){if(void 0===i&&(i=!1),!0===n&&(n=this.defaultAnnotation_),!1===n)return this.defineProperty_(e,t,i);ko(this,n,e);var r=n.extend_(this,e,t,i);return r&&So(this,n,e),r},t.defineProperty_=function(e,t,n){void 0===n&&(n=!1),Cr(this.keysAtom_);try{qr();var i=this.delete_(e);if(!i)return i;if(Vs(this)){var r=$s(this,{object:this.proxy_||this.target_,name:e,type:uo,newValue:t.value});if(!r)return null;var s=r.newValue;t.value!==s&&(t=ci({},t,{value:s}))}if(n){if(!Reflect.defineProperty(this.target_,e,t))return!1}else Mn(this.target_,e,t);this.notifyPropertyAddition_(e,t.value)}finally{Wr()}return!0},t.defineObservableProperty_=function(e,t,n,i){void 0===i&&(i=!1),Cr(this.keysAtom_);try{qr();var r=this.delete_(e);if(!r)return r;if(Vs(this)){var s=$s(this,{object:this.proxy_||this.target_,name:e,type:uo,newValue:t});if(!s)return null;t=s.newValue}var o=Ao(e),a={configurable:!Vr.safeDescriptors||this.isPlainObject_,enumerable:!0,get:o.get,set:o.set};if(i){if(!Reflect.defineProperty(this.target_,e,a))return!1}else Mn(this.target_,e,a);var l=new wr(t,n,"production"!==process.env.NODE_ENV?this.name_+"."+e.toString():"ObservableObject.key",!1);this.values_.set(e,l),this.notifyPropertyAddition_(e,l.value_)}finally{Wr()}return!0},t.defineComputedProperty_=function(e,t,n){void 0===n&&(n=!1),Cr(this.keysAtom_);try{qr();var i=this.delete_(e);if(!i)return i;if(Vs(this))if(!$s(this,{object:this.proxy_||this.target_,name:e,type:uo,newValue:void 0}))return null;t.name||(t.name="production"!==process.env.NODE_ENV?this.name_+"."+e.toString():"ObservableObject.key"),t.context=this.proxy_||this.target_;var r=Ao(e),s={configurable:!Vr.safeDescriptors||this.isPlainObject_,enumerable:!1,get:r.get,set:r.set};if(n){if(!Reflect.defineProperty(this.target_,e,s))return!1}else Mn(this.target_,e,s);this.values_.set(e,new Er(t)),this.notifyPropertyAddition_(e,void 0)}finally{Wr()}return!0},t.delete_=function(e,t){if(void 0===t&&(t=!1),Cr(this.keysAtom_),!ii(this.target_,e))return!0;if(Vs(this)&&!$s(this,{object:this.proxy_||this.target_,name:e,type:bo}))return null;try{var n;qr();var i,r=Zs(this),s="production"!==process.env.NODE_ENV&&rs(),o=this.values_.get(e),a=void 0;if(!o&&(r||s))a=null==(i=Rn(this.target_,e))?void 0:i.value;if(t){if(!Reflect.deleteProperty(this.target_,e))return!1}else delete this.target_[e];if("production"!==process.env.NODE_ENV&&delete this.appliedAnnotations_[e],o&&(this.values_.delete(e),o instanceof wr&&(a=o.value_),Kr(o)),this.keysAtom_.reportChanged(),null==(n=this.pendingKeys_)||null==(n=n.get(e))||n.set(e in this.target_),r||s){var l={type:bo,observableKind:"object",object:this.proxy_||this.target_,debugObjectName:this.name_,oldValue:a,name:e};"production"!==process.env.NODE_ENV&&s&&os(l),r&&Ws(this,l),"production"!==process.env.NODE_ENV&&s&&ls()}}finally{Wr()}return!0},t.observe_=function(e,t){return"production"!==process.env.NODE_ENV&&!0===t&&kn("`observe` doesn't support the fire immediately property for observable objects."),qs(this,e)},t.intercept_=function(e){return Gs(this,e)},t.notifyPropertyAddition_=function(e,t){var n,i=Zs(this),r="production"!==process.env.NODE_ENV&&rs();if(i||r){var s=i||r?{type:uo,observableKind:"object",debugObjectName:this.name_,object:this.proxy_||this.target_,name:e,newValue:t}:null;"production"!==process.env.NODE_ENV&&r&&os(s),i&&Ws(this,s),"production"!==process.env.NODE_ENV&&r&&ls()}null==(n=this.pendingKeys_)||null==(n=n.get(e))||n.set(!0),this.keysAtom_.reportChanged()},t.ownKeys_=function(){return this.keysAtom_.reportObserved(),ei(this.target_)},t.keys_=function(){return this.keysAtom_.reportObserved(),Object.keys(this.target_)},e}();function wo(e,t){var n;if("production"!==process.env.NODE_ENV&&t&&To(e)&&kn("Options can't be provided for already observable objects."),ii(e,vi))return"production"===process.env.NODE_ENV||Bo(e)instanceof xo||kn("Cannot convert '"+Uo(e)+"' into observable object:\nThe target is already observable of different type.\nExtending builtins is not supported."),e;"production"===process.env.NODE_ENV||Object.isExtensible(e)||kn("Cannot make the designated object observable; it is not extensible");var i=null!=(n=null==t?void 0:t.name)?n:"production"!==process.env.NODE_ENV?(qn(e)?"ObservableObject":e.constructor.name)+"@"+Bn():"ObservableObject",r=new xo(e,new Map,String(i),function(e){var t;return e?null!=(t=e.defaultDecorator)?t:Hi(e):void 0}(t));return Hn(e,vi,r),e}var Eo=Yn("ObservableObjectAdministration",xo);function Ao(e){return vo[e]||(vo[e]={get:function(){return this[vi].getObservablePropValue_(e)},set:function(t){return this[vi].setObservablePropValue_(e,t)}})}function To(e){return!!Zn(e)&&Eo(e[vi])}function So(e,t,n){var i;"production"!==process.env.NODE_ENV&&(e.appliedAnnotations_[n]=t),null==(i=e.target_[pi])||delete i[n]}function ko(e,t,n){if("production"===process.env.NODE_ENV||Xo(t)||kn("Cannot annotate '"+e.name_+"."+n.toString()+"': Invalid annotation."),"production"!==process.env.NODE_ENV&&!ki(t)&&ii(e.appliedAnnotations_,n)){var i=e.name_+"."+n.toString(),r=e.appliedAnnotations_[n].annotationType_;kn("Cannot apply '"+t.annotationType_+"' to '"+i+"':\nThe field is already annotated with '"+r+"'.\nRe-annotating fields is not allowed.\nUse 'override' annotation for methods overridden by subclass.")}}var Oo,Po,Co=zo(0),Ro=function(){var e=!1,t={};return Object.defineProperty(t,"0",{set:function(){e=!0}}),Object.create(t)[0]=1,!1===e}(),Mo=0,Lo=function(){};Oo=Lo,Po=Array.prototype,Object.setPrototypeOf?Object.setPrototypeOf(Oo.prototype,Po):void 0!==Oo.prototype.__proto__?Oo.prototype.__proto__=Po:Oo.prototype=Po;var No=function(e){function t(t,n,i,r){var s;return void 0===i&&(i="production"!==process.env.NODE_ENV?"ObservableArray@"+Bn():"ObservableArray"),void 0===r&&(r=!1),s=e.call(this)||this,Vo(function(){var e=new Qs(i,n,r,!0);e.proxy_=s,Kn(s,vi,e),t&&t.length&&s.spliceWithArray(0,0,t),Ro&&Object.defineProperty(s,"0",Co)}),s}hi(t,e);var n=t.prototype;return n.concat=function(){this[vi].atom_.reportObserved();for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return Array.prototype.concat.apply(this.slice(),t.map(function(e){return ao(e)?e.slice():e}))},n[Symbol.iterator]=function(){var e=this,t=0;return Ko({next:function(){return t<e.length?{value:e[t++],done:!1}:{done:!0,value:void 0}}})},li(t,[{key:"length",get:function(){return this[vi].getArrayLength_()},set:function(e){this[vi].setArrayLength_(e)}},{key:Symbol.toStringTag,get:function(){return"Array"}}])}(Lo);function zo(e){return{enumerable:!1,configurable:!0,get:function(){return this[vi].get_(e)},set:function(t){this[vi].set_(e,t)}}}function Do(e){Mn(No.prototype,""+e,zo(e))}function Io(e){if(e>Mo){for(var t=Mo;t<e+100;t++)Do(t);Mo=e}}function Fo(e,t,n){return new No(e,t,n)}function jo(e,t){if("object"==typeof e&&null!==e){if(ao(e))return void 0!==t&&kn(23),e[vi].atom_;if(go(e))return e.atom_;if(fo(e)){if(void 0===t)return e.keysAtom_;var n=e.data_.get(t)||e.hasMap_.get(t);return n||kn(25,t,Uo(e)),n}if(To(e)){if(!t)return kn(26);var i=e[vi].values_.get(t);return i||kn(27,t,Uo(e)),i}if(xi(e)||Sr(e)||is(e))return e}else if(Gn(e)&&is(e[vi]))return e[vi];kn(28)}function Bo(e,t){return e||kn(29),xi(e)||Sr(e)||is(e)||fo(e)||go(e)?e:e[vi]?e[vi]:void kn(24,e)}function Uo(e,t){var n;if(void 0!==t)n=jo(e,t);else{if(ys(e))return e.name;n=To(e)||fo(e)||go(e)?Bo(e):jo(e)}return n.name_}function Vo(e){var t=Nr(),n=br(!0);qr();try{return e()}finally{Wr(),xr(n),zr(t)}}Object.entries(to).forEach(function(e){var t=e[0],n=e[1];"concat"!==t&&Hn(No.prototype,t,n)}),Io(1e3);var Go,$o=Ln.toString;function Zo(e,t,n){return void 0===n&&(n=-1),qo(e,t,n)}function qo(e,t,n,i,r){if(e===t)return 0!==e||1/e==1/t;if(null==e||null==t)return!1;if(e!=e)return t!=t;var s=typeof e;if("function"!==s&&"object"!==s&&"object"!=typeof t)return!1;var o=$o.call(e);if(o!==$o.call(t))return!1;switch(o){case"[object RegExp]":case"[object String]":return""+e==""+t;case"[object Number]":return+e!=+e?+t!=+t:0===+e?1/+e==1/t:+e===+t;case"[object Date]":case"[object Boolean]":return+e===+t;case"[object Symbol]":return"undefined"!=typeof Symbol&&Symbol.valueOf.call(e)===Symbol.valueOf.call(t);case"[object Map]":case"[object Set]":n>=0&&n++}e=Wo(e),t=Wo(t);var a="[object Array]"===o;if(!a){if("object"!=typeof e||"object"!=typeof t)return!1;var l=e.constructor,u=t.constructor;if(l!==u&&!(Gn(l)&&l instanceof l&&Gn(u)&&u instanceof u)&&"constructor"in e&&"constructor"in t)return!1}if(0===n)return!1;n<0&&(n=-1),r=r||[];for(var c=(i=i||[]).length;c--;)if(i[c]===e)return r[c]===t;if(i.push(e),r.push(t),a){if((c=e.length)!==t.length)return!1;for(;c--;)if(!qo(e[c],t[c],n-1,i,r))return!1}else{var h=Object.keys(e),d=h.length;if(Object.keys(t).length!==d)return!1;for(var f=0;f<d;f++){var p=h[f];if(!ii(t,p)||!qo(e[p],t[p],n-1,i,r))return!1}}return i.pop(),r.pop(),!0}function Wo(e){return ao(e)?e.slice():Xn(e)||fo(e)||Jn(e)||go(e)?Array.from(e.entries()):e}var Ho=(null==(Go=Pn().Iterator)?void 0:Go.prototype)||{};function Ko(e){return e[Symbol.iterator]=Yo,Object.assign(Object.create(Ho),e)}function Yo(){return this}function Xo(e){return e instanceof Object&&"string"==typeof e.annotationType_&&Gn(e.make_)&&Gn(e.extend_)}["Symbol","Map","Set"].forEach(function(e){void 0===Pn()[e]&&kn("MobX requires global '"+e+"' to be available or polyfilled")}),"object"==typeof __MOBX_DEVTOOLS_GLOBAL_HOOK__&&__MOBX_DEVTOOLS_GLOBAL_HOOK__.injectMobx({spy:function(e){return"production"===process.env.NODE_ENV?(console.warn("[mobx.spy] Is a no-op in production builds"),function(){}):(Vr.spyListeners.push(e),Un(function(){Vr.spyListeners=Vr.spyListeners.filter(function(t){return t!==e})}))},extras:{getDebugName:Uo},$mobx:vi});class Jo{constructor(){Ks(this)}_visible=cr.map();getIsOpen(e){return this._visible.get(e)??!1}_setVisible({name:e,value:t}){this._visible.set(e,t)}open(e){this._setVisible({name:e,value:!0})}close(e){this._setVisible({name:e,value:!1})}closeAll(){this._visible.clear()}}const Qo=new Jo;class ea{constructor(){Ks(this),xs(()=>this.isUnauthorized,e=>{e&&(Tn("access_token"),Tn("token_type"))})}_isUnauthorized=!1;get isUnauthorized(){return this._isUnauthorized}set isUnauthorized(e){this._isUnauthorized=e}}const ta=new ea;class na{constructor(){Ks(this)}_visible=cr.map();getIsOpen(e){return this._visible.get(e)??!1}_setVisible({name:e,value:t}){this._visible.set(e,t)}open(e){this._setVisible({name:e,value:!0})}close(e){this._setVisible({name:e,value:!1})}closeAll(){this._visible.clear()}}const ia=new na;class ra{authStore=ta;modalStore=ia;alertStore=Qo}const sa=new ra,oa=e.createContext(sa),aa=({children:e})=>w(oa.Provider,{value:sa,children:e});class la{config;client;constructor(e){this.config=e,this.client=A.create({baseURL:e?.baseURL,withCredentials:e?.withCredentials,timeout:1e4,headers:{"Content-Type":"application/json"}}),this.setupInterceptors()}setupInterceptors(){this.client.interceptors.request.use(e=>{sa.authStore.isUnauthorized=!1;const t=this.config?.getHeaders?.(),n=En("access_token"),i=En("token_type");return n&&i&&(e.headers.Authorization=`${i} ${n}`),t&&Object.entries(t).forEach(([t,n])=>{e.headers[t]=n}),e},e=>(mn({message:e.message,variant:"error"}),Promise.reject(e))),this.client.interceptors.response.use(e=>e,e=>(mn({message:e.message,variant:"error"}),401===e.status&&(sa.authStore.isUnauthorized=!0),Promise.reject(e)))}async get({url:e,config:t}){return(await this.client.get(e,t)).data}async post({url:e,body:t,config:n}){return(await this.client.post(e,t,n)).data}async put({url:e,body:t,config:n}){return(await this.client.put(e,t,n)).data}async patch({url:e,body:t,config:n}){return(await this.client.patch(e,t,n)).data}async delete({url:e,config:t}){return(await this.client.delete(e,t)).data}}class ua{configOptions;_private_key;_apiService;static _instance=null;static get instance(){if(!ua._instance)throw new Error("Dartcom Config не инициализирован с приватным ключом. Вызовите Config.initialize(...) первым, чтобы иметь возможность пользоваться компонентами нашей библиотеки");return ua._instance}static initialize(e){ua._instance||(ua._instance=new ua(e))}static deactivate(){this._instance=null}constructor(e){this.configOptions=e;const{private_key:t,apiConfig:n}=e;this._private_key=t;const i=new la(n);this._apiService=i,this._getCheckKeyData().then(t=>{if(t){const{valid:n}=t;e.onCheck?.(t),this._isValidApiKey=n}})}get apiService(){return this._apiService}_isValidApiKey=!1;get isValidApiKey(){return this._isValidApiKey}async _getCheckKeyData(){const e=await this.apiService.get({url:"check_tile_token",config:{params:{tile_token:this._private_key}}}).then(e=>e).catch(e=>{const{response:t,message:n}=e;if(this.configOptions.onError?.(e),t){const{data:{detail:e}}=t;return e}return{reason:n,valid:!1}});return e}}var ca=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},ha={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},da=new class{#e=ha;#t=!1;setTimeoutProvider(e){"production"!==process.env.NODE_ENV&&this.#t&&e!==this.#e&&console.error("[timeoutManager]: Switching provider after calls to previous provider might result in unexpected behavior.",{previous:this.#e,provider:e}),this.#e=e,"production"!==process.env.NODE_ENV&&(this.#t=!1)}setTimeout(e,t){return"production"!==process.env.NODE_ENV&&(this.#t=!0),this.#e.setTimeout(e,t)}clearTimeout(e){this.#e.clearTimeout(e)}setInterval(e,t){return"production"!==process.env.NODE_ENV&&(this.#t=!0),this.#e.setInterval(e,t)}clearInterval(e){this.#e.clearInterval(e)}};var fa="undefined"==typeof window||"Deno"in globalThis;function pa(){}function ma(e){return"number"==typeof e&&e>=0&&e!==1/0}function _a(e,t){return Math.max(e+(t||0)-Date.now(),0)}function ga(e,t){return"function"==typeof e?e(t):e}function ya(e,t){return"function"==typeof e?e(t):e}function va(e,t){const{type:n="all",exact:i,fetchStatus:r,predicate:s,queryKey:o,stale:a}=e;if(o)if(i){if(t.queryHash!==xa(o,t.options))return!1}else if(!Ea(t.queryKey,o))return!1;if("all"!==n){const e=t.isActive();if("active"===n&&!e)return!1;if("inactive"===n&&e)return!1}return("boolean"!=typeof a||t.isStale()===a)&&((!r||r===t.state.fetchStatus)&&!(s&&!s(t)))}function ba(e,t){const{exact:n,status:i,predicate:r,mutationKey:s}=e;if(s){if(!t.options.mutationKey)return!1;if(n){if(wa(t.options.mutationKey)!==wa(s))return!1}else if(!Ea(t.options.mutationKey,s))return!1}return(!i||t.state.status===i)&&!(r&&!r(t))}function xa(e,t){return(t?.queryKeyHashFn||wa)(e)}function wa(e){return JSON.stringify(e,(e,t)=>Oa(t)?Object.keys(t).sort().reduce((e,n)=>(e[n]=t[n],e),{}):t)}function Ea(e,t){return e===t||typeof e==typeof t&&(!(!e||!t||"object"!=typeof e||"object"!=typeof t)&&Object.keys(t).every(n=>Ea(e[n],t[n])))}var Aa=Object.prototype.hasOwnProperty;function Ta(e,t,n=0){if(e===t)return e;if(n>500)return t;const i=ka(e)&&ka(t);if(!(i||Oa(e)&&Oa(t)))return t;const r=(i?e:Object.keys(e)).length,s=i?t:Object.keys(t),o=s.length,a=i?new Array(o):{};let l=0;for(let u=0;u<o;u++){const o=i?u:s[u],c=e[o],h=t[o];if(c===h){a[o]=c,(i?u<r:Aa.call(e,o))&&l++;continue}if(null===c||null===h||"object"!=typeof c||"object"!=typeof h){a[o]=h;continue}const d=Ta(c,h,n+1);a[o]=d,d===c&&l++}return r===o&&l===r?e:a}function Sa(e,t){if(!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(const n in e)if(e[n]!==t[n])return!1;return!0}function ka(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function Oa(e){if(!Pa(e))return!1;const t=e.constructor;if(void 0===t)return!0;const n=t.prototype;return!!Pa(n)&&(!!n.hasOwnProperty("isPrototypeOf")&&Object.getPrototypeOf(e)===Object.prototype)}function Pa(e){return"[object Object]"===Object.prototype.toString.call(e)}function Ca(e,t,n){if("function"==typeof n.structuralSharing)return n.structuralSharing(e,t);if(!1!==n.structuralSharing){if("production"!==process.env.NODE_ENV)try{return Ta(e,t)}catch(e){throw console.error(`Structural sharing requires data to be JSON serializable. To fix this, turn off structuralSharing or return JSON-serializable data from your queryFn. [${n.queryHash}]: ${e}`),e}return Ta(e,t)}return t}function Ra(e,t,n=0){const i=[...e,t];return n&&i.length>n?i.slice(1):i}function Ma(e,t,n=0){const i=[t,...e];return n&&i.length>n?i.slice(0,-1):i}var La=Symbol();function Na(e,t){return"production"!==process.env.NODE_ENV&&e.queryFn===La&&console.error(`Attempted to invoke queryFn when set to skipToken. This is likely a configuration error. Query hash: '${e.queryHash}'`),!e.queryFn&&t?.initialPromise?()=>t.initialPromise:e.queryFn&&e.queryFn!==La?e.queryFn:()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`))}function za(e,t){return"function"==typeof e?e(...t):!!e}var Da=new class extends ca{#n;#i;#r;constructor(){super(),this.#r=e=>{if(!fa&&window.addEventListener){const t=()=>e();return window.addEventListener("visibilitychange",t,!1),()=>{window.removeEventListener("visibilitychange",t)}}}}onSubscribe(){this.#i||this.setEventListener(this.#r)}onUnsubscribe(){this.hasListeners()||(this.#i?.(),this.#i=void 0)}setEventListener(e){this.#r=e,this.#i?.(),this.#i=e(e=>{"boolean"==typeof e?this.setFocused(e):this.onFocus()})}setFocused(e){this.#n!==e&&(this.#n=e,this.onFocus())}onFocus(){const e=this.isFocused();this.listeners.forEach(t=>{t(e)})}isFocused(){return"boolean"==typeof this.#n?this.#n:"hidden"!==globalThis.document?.visibilityState}};function Ia(){let e,t;const n=new Promise((n,i)=>{e=n,t=i});function i(e){Object.assign(n,e),delete n.resolve,delete n.reject}return n.status="pending",n.catch(()=>{}),n.resolve=t=>{i({status:"fulfilled",value:t}),e(t)},n.reject=e=>{i({status:"rejected",reason:e}),t(e)},n}var Fa=function(e){setTimeout(e,0)};var ja=function(){let e=[],t=0,n=e=>{e()},i=e=>{e()},r=Fa;const s=i=>{t?e.push(i):r(()=>{n(i)})};return{batch:s=>{let o;t++;try{o=s()}finally{t--,t||(()=>{const t=e;e=[],t.length&&r(()=>{i(()=>{t.forEach(e=>{n(e)})})})})()}return o},batchCalls:e=>(...t)=>{s(()=>{e(...t)})},schedule:s,setNotifyFunction:e=>{n=e},setBatchNotifyFunction:e=>{i=e},setScheduler:e=>{r=e}}}(),Ba=new class extends ca{#s=!0;#i;#r;constructor(){super(),this.#r=e=>{if(!fa&&window.addEventListener){const t=()=>e(!0),n=()=>e(!1);return window.addEventListener("online",t,!1),window.addEventListener("offline",n,!1),()=>{window.removeEventListener("online",t),window.removeEventListener("offline",n)}}}}onSubscribe(){this.#i||this.setEventListener(this.#r)}onUnsubscribe(){this.hasListeners()||(this.#i?.(),this.#i=void 0)}setEventListener(e){this.#r=e,this.#i?.(),this.#i=e(this.setOnline.bind(this))}setOnline(e){this.#s!==e&&(this.#s=e,this.listeners.forEach(t=>{t(e)}))}isOnline(){return this.#s}};function Ua(e){return Math.min(1e3*2**e,3e4)}function Va(e){return"online"!==(e??"online")||Ba.isOnline()}var Ga=class extends Error{constructor(e){super("CancelledError"),this.revert=e?.revert,this.silent=e?.silent}};function $a(e){let t,n=!1,i=0;const r=Ia(),s=()=>"pending"!==r.status,o=()=>Da.isFocused()&&("always"===e.networkMode||Ba.isOnline())&&e.canRun(),a=()=>Va(e.networkMode)&&e.canRun(),l=e=>{s()||(t?.(),r.resolve(e))},u=e=>{s()||(t?.(),r.reject(e))},c=()=>new Promise(n=>{t=e=>{(s()||o())&&n(e)},e.onPause?.()}).then(()=>{t=void 0,s()||e.onContinue?.()}),h=()=>{if(s())return;let t;const r=0===i?e.initialPromise:void 0;try{t=r??e.fn()}catch(e){t=Promise.reject(e)}Promise.resolve(t).then(l).catch(t=>{if(s())return;const r=e.retry??(fa?0:3),a=e.retryDelay??Ua,l="function"==typeof a?a(i,t):a,d=!0===r||"number"==typeof r&&i<r||"function"==typeof r&&r(i,t);!n&&d?(i++,e.onFail?.(i,t),function(e){return new Promise(t=>{da.setTimeout(t,e)})}(l).then(()=>o()?void 0:c()).then(()=>{n?u(t):h()})):u(t)})};return{promise:r,status:()=>r.status,cancel:t=>{if(!s()){const n=new Ga(t);u(n),e.onCancel?.(n)}},continue:()=>(t?.(),r),cancelRetry:()=>{n=!0},continueRetry:()=>{n=!1},canStart:a,start:()=>(a()?h():c().then(h),r)}}var Za=class{#o;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),ma(this.gcTime)&&(this.#o=da.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(fa?1/0:3e5))}clearGcTimeout(){this.#o&&(da.clearTimeout(this.#o),this.#o=void 0)}},qa=class extends Za{#a;#l;#u;#c;#h;#d;#f;constructor(e){super(),this.#f=!1,this.#d=e.defaultOptions,this.setOptions(e.options),this.observers=[],this.#c=e.client,this.#u=this.#c.getQueryCache(),this.queryKey=e.queryKey,this.queryHash=e.queryHash,this.#a=Ka(this.options),this.state=e.state??this.#a,this.scheduleGc()}get meta(){return this.options.meta}get promise(){return this.#h?.promise}setOptions(e){if(this.options={...this.#d,...e},this.updateGcTime(this.options.gcTime),this.state&&void 0===this.state.data){const e=Ka(this.options);void 0!==e.data&&(this.setState(Ha(e.data,e.dataUpdatedAt)),this.#a=e)}}optionalRemove(){this.observers.length||"idle"!==this.state.fetchStatus||this.#u.remove(this)}setData(e,t){const n=Ca(this.state.data,e,this.options);return this.#p({data:n,type:"success",dataUpdatedAt:t?.updatedAt,manual:t?.manual}),n}setState(e,t){this.#p({type:"setState",state:e,setStateOptions:t})}cancel(e){const t=this.#h?.promise;return this.#h?.cancel(e),t?t.then(pa).catch(pa):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(this.#a)}isActive(){return this.observers.some(e=>!1!==ya(e.options.enabled,this))}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===La||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStatic(){return this.getObserversCount()>0&&this.observers.some(e=>"static"===ga(e.options.staleTime,this))}isStale(){return this.getObserversCount()>0?this.observers.some(e=>e.getCurrentResult().isStale):void 0===this.state.data||this.state.isInvalidated}isStaleByTime(e=0){return void 0===this.state.data||"static"!==e&&(!!this.state.isInvalidated||!_a(this.state.dataUpdatedAt,e))}onFocus(){const e=this.observers.find(e=>e.shouldFetchOnWindowFocus());e?.refetch({cancelRefetch:!1}),this.#h?.continue()}onOnline(){const e=this.observers.find(e=>e.shouldFetchOnReconnect());e?.refetch({cancelRefetch:!1}),this.#h?.continue()}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),this.#u.notify({type:"observerAdded",query:this,observer:e}))}removeObserver(e){this.observers.includes(e)&&(this.observers=this.observers.filter(t=>t!==e),this.observers.length||(this.#h&&(this.#f?this.#h.cancel({revert:!0}):this.#h.cancelRetry()),this.scheduleGc()),this.#u.notify({type:"observerRemoved",query:this,observer:e}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||this.#p({type:"invalidate"})}async fetch(e,t){if("idle"!==this.state.fetchStatus&&"rejected"!==this.#h?.status())if(void 0!==this.state.data&&t?.cancelRefetch)this.cancel({silent:!0});else if(this.#h)return this.#h.continueRetry(),this.#h.promise;if(e&&this.setOptions(e),!this.options.queryFn){const e=this.observers.find(e=>e.options.queryFn);e&&this.setOptions(e.options)}"production"!==process.env.NODE_ENV&&(Array.isArray(this.options.queryKey)||console.error("As of v4, queryKey needs to be an Array. If you are using a string like 'repoData', please change it to an Array, e.g. ['repoData']"));const n=new AbortController,i=e=>{Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(this.#f=!0,n.signal)})},r=()=>{const e=Na(this.options,t),n=(()=>{const e={client:this.#c,queryKey:this.queryKey,meta:this.meta};return i(e),e})();return this.#f=!1,this.options.persister?this.options.persister(e,n,this):e(n)},s=(()=>{const e={fetchOptions:t,options:this.options,queryKey:this.queryKey,client:this.#c,state:this.state,fetchFn:r};return i(e),e})();this.options.behavior?.onFetch(s,this),this.#l=this.state,"idle"!==this.state.fetchStatus&&this.state.fetchMeta===s.fetchOptions?.meta||this.#p({type:"fetch",meta:s.fetchOptions?.meta}),this.#h=$a({initialPromise:t?.initialPromise,fn:s.fetchFn,onCancel:e=>{e instanceof Ga&&e.revert&&this.setState({...this.#l,fetchStatus:"idle"}),n.abort()},onFail:(e,t)=>{this.#p({type:"failed",failureCount:e,error:t})},onPause:()=>{this.#p({type:"pause"})},onContinue:()=>{this.#p({type:"continue"})},retry:s.options.retry,retryDelay:s.options.retryDelay,networkMode:s.options.networkMode,canRun:()=>!0});try{const e=await this.#h.start();if(void 0===e)throw"production"!==process.env.NODE_ENV&&console.error(`Query data cannot be undefined. Please make sure to return a value other than undefined from your query function. Affected query key: ${this.queryHash}`),new Error(`${this.queryHash} data is undefined`);return this.setData(e),this.#u.config.onSuccess?.(e,this),this.#u.config.onSettled?.(e,this.state.error,this),e}catch(e){if(e instanceof Ga){if(e.silent)return this.#h.promise;if(e.revert){if(void 0===this.state.data)throw e;return this.state.data}}throw this.#p({type:"error",error:e}),this.#u.config.onError?.(e,this),this.#u.config.onSettled?.(this.state.data,e,this),e}finally{this.scheduleGc()}}#p(e){this.state=(t=>{switch(e.type){case"failed":return{...t,fetchFailureCount:e.failureCount,fetchFailureReason:e.error};case"pause":return{...t,fetchStatus:"paused"};case"continue":return{...t,fetchStatus:"fetching"};case"fetch":return{...t,...Wa(t.data,this.options),fetchMeta:e.meta??null};case"success":const n={...t,...Ha(e.data,e.dataUpdatedAt),dataUpdateCount:t.dataUpdateCount+1,...!e.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return this.#l=e.manual?n:void 0,n;case"error":const i=e.error;return{...t,error:i,errorUpdateCount:t.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:t.fetchFailureCount+1,fetchFailureReason:i,fetchStatus:"idle",status:"error",isInvalidated:!0};case"invalidate":return{...t,isInvalidated:!0};case"setState":return{...t,...e.state}}})(this.state),ja.batch(()=>{this.observers.forEach(e=>{e.onQueryUpdate()}),this.#u.notify({query:this,type:"updated",action:e})})}};function Wa(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:Va(t.networkMode)?"fetching":"paused",...void 0===e&&{error:null,status:"pending"}}}function Ha(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:"success"}}function Ka(e){const t="function"==typeof e.initialData?e.initialData():e.initialData,n=void 0!==t,i=n?"function"==typeof e.initialDataUpdatedAt?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:n?i??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?"success":"pending",fetchStatus:"idle"}}var Ya=class extends ca{constructor(e,t){super(),this.options=t,this.#c=e,this.#m=null,this.#_=Ia(),this.bindMethods(),this.setOptions(t)}#c;#g=void 0;#y=void 0;#v=void 0;#b;#x;#_;#m;#w;#E;#A;#T;#S;#k;#O=new Set;bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){1===this.listeners.size&&(this.#g.addObserver(this),Xa(this.#g,this.options)?this.#P():this.updateResult(),this.#C())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return Ja(this.#g,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return Ja(this.#g,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.#R(),this.#M(),this.#g.removeObserver(this)}setOptions(e){const t=this.options,n=this.#g;if(this.options=this.#c.defaultQueryOptions(e),void 0!==this.options.enabled&&"boolean"!=typeof this.options.enabled&&"function"!=typeof this.options.enabled&&"boolean"!=typeof ya(this.options.enabled,this.#g))throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");this.#L(),this.#g.setOptions(this.options),t._defaulted&&!Sa(this.options,t)&&this.#c.getQueryCache().notify({type:"observerOptionsUpdated",query:this.#g,observer:this});const i=this.hasListeners();i&&Qa(this.#g,n,this.options,t)&&this.#P(),this.updateResult(),!i||this.#g===n&&ya(this.options.enabled,this.#g)===ya(t.enabled,this.#g)&&ga(this.options.staleTime,this.#g)===ga(t.staleTime,this.#g)||this.#N();const r=this.#z();!i||this.#g===n&&ya(this.options.enabled,this.#g)===ya(t.enabled,this.#g)&&r===this.#k||this.#D(r)}getOptimisticResult(e){const t=this.#c.getQueryCache().build(this.#c,e),n=this.createResult(t,e);return function(e,t){if(!Sa(e.getCurrentResult(),t))return!0;return!1}(this,n)&&(this.#v=n,this.#x=this.options,this.#b=this.#g.state),n}getCurrentResult(){return this.#v}trackResult(e,t){return new Proxy(e,{get:(e,n)=>(this.trackProp(n),t?.(n),"promise"===n&&(this.trackProp("data"),this.options.experimental_prefetchInRender||"pending"!==this.#_.status||this.#_.reject(new Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(e,n))})}trackProp(e){this.#O.add(e)}getCurrentQuery(){return this.#g}refetch({...e}={}){return this.fetch({...e})}fetchOptimistic(e){const t=this.#c.defaultQueryOptions(e),n=this.#c.getQueryCache().build(this.#c,t);return n.fetch().then(()=>this.createResult(n,t))}fetch(e){return this.#P({...e,cancelRefetch:e.cancelRefetch??!0}).then(()=>(this.updateResult(),this.#v))}#P(e){this.#L();let t=this.#g.fetch(this.options,e);return e?.throwOnError||(t=t.catch(pa)),t}#N(){this.#R();const e=ga(this.options.staleTime,this.#g);if(fa||this.#v.isStale||!ma(e))return;const t=_a(this.#v.dataUpdatedAt,e)+1;this.#T=da.setTimeout(()=>{this.#v.isStale||this.updateResult()},t)}#z(){return("function"==typeof this.options.refetchInterval?this.options.refetchInterval(this.#g):this.options.refetchInterval)??!1}#D(e){this.#M(),this.#k=e,!fa&&!1!==ya(this.options.enabled,this.#g)&&ma(this.#k)&&0!==this.#k&&(this.#S=da.setInterval(()=>{(this.options.refetchIntervalInBackground||Da.isFocused())&&this.#P()},this.#k))}#C(){this.#N(),this.#D(this.#z())}#R(){this.#T&&(da.clearTimeout(this.#T),this.#T=void 0)}#M(){this.#S&&(da.clearInterval(this.#S),this.#S=void 0)}createResult(e,t){const n=this.#g,i=this.options,r=this.#v,s=this.#b,o=this.#x,a=e!==n?e.state:this.#y,{state:l}=e;let u,c={...l},h=!1;if(t._optimisticResults){const r=this.hasListeners(),s=!r&&Xa(e,t),o=r&&Qa(e,n,t,i);(s||o)&&(c={...c,...Wa(l.data,e.options)}),"isRestoring"===t._optimisticResults&&(c.fetchStatus="idle")}let{error:d,errorUpdatedAt:f,status:p}=c;u=c.data;let m=!1;if(void 0!==t.placeholderData&&void 0===u&&"pending"===p){let e;r?.isPlaceholderData&&t.placeholderData===o?.placeholderData?(e=r.data,m=!0):e="function"==typeof t.placeholderData?t.placeholderData(this.#A?.state.data,this.#A):t.placeholderData,void 0!==e&&(p="success",u=Ca(r?.data,e,t),h=!0)}if(t.select&&void 0!==u&&!m)if(r&&u===s?.data&&t.select===this.#w)u=this.#E;else try{this.#w=t.select,u=t.select(u),u=Ca(r?.data,u,t),this.#E=u,this.#m=null}catch(e){this.#m=e}this.#m&&(d=this.#m,u=this.#E,f=Date.now(),p="error");const _="fetching"===c.fetchStatus,g="pending"===p,y="error"===p,v=g&&_,b=void 0!==u,x={status:p,fetchStatus:c.fetchStatus,isPending:g,isSuccess:"success"===p,isError:y,isInitialLoading:v,isLoading:v,data:u,dataUpdatedAt:c.dataUpdatedAt,error:d,errorUpdatedAt:f,failureCount:c.fetchFailureCount,failureReason:c.fetchFailureReason,errorUpdateCount:c.errorUpdateCount,isFetched:c.dataUpdateCount>0||c.errorUpdateCount>0,isFetchedAfterMount:c.dataUpdateCount>a.dataUpdateCount||c.errorUpdateCount>a.errorUpdateCount,isFetching:_,isRefetching:_&&!g,isLoadingError:y&&!b,isPaused:"paused"===c.fetchStatus,isPlaceholderData:h,isRefetchError:y&&b,isStale:el(e,t),refetch:this.refetch,promise:this.#_,isEnabled:!1!==ya(t.enabled,e)};if(this.options.experimental_prefetchInRender){const t=void 0!==x.data,i="error"===x.status&&!t,r=e=>{i?e.reject(x.error):t&&e.resolve(x.data)},s=()=>{const e=this.#_=x.promise=Ia();r(e)},o=this.#_;switch(o.status){case"pending":e.queryHash===n.queryHash&&r(o);break;case"fulfilled":(i||x.data!==o.value)&&s();break;case"rejected":i&&x.error===o.reason||s()}}return x}updateResult(){const e=this.#v,t=this.createResult(this.#g,this.options);if(this.#b=this.#g.state,this.#x=this.options,void 0!==this.#b.data&&(this.#A=this.#g),Sa(t,e))return;this.#v=t;this.#I({listeners:(()=>{if(!e)return!0;const{notifyOnChangeProps:t}=this.options,n="function"==typeof t?t():t;if("all"===n||!n&&!this.#O.size)return!0;const i=new Set(n??this.#O);return this.options.throwOnError&&i.add("error"),Object.keys(this.#v).some(t=>{const n=t;return this.#v[n]!==e[n]&&i.has(n)})})()})}#L(){const e=this.#c.getQueryCache().build(this.#c,this.options);if(e===this.#g)return;const t=this.#g;this.#g=e,this.#y=e.state,this.hasListeners()&&(t?.removeObserver(this),e.addObserver(this))}onQueryUpdate(){this.updateResult(),this.hasListeners()&&this.#C()}#I(e){ja.batch(()=>{e.listeners&&this.listeners.forEach(e=>{e(this.#v)}),this.#c.getQueryCache().notify({query:this.#g,type:"observerResultsUpdated"})})}};function Xa(e,t){return function(e,t){return!1!==ya(t.enabled,e)&&void 0===e.state.data&&!("error"===e.state.status&&!1===t.retryOnMount)}(e,t)||void 0!==e.state.data&&Ja(e,t,t.refetchOnMount)}function Ja(e,t,n){if(!1!==ya(t.enabled,e)&&"static"!==ga(t.staleTime,e)){const i="function"==typeof n?n(e):n;return"always"===i||!1!==i&&el(e,t)}return!1}function Qa(e,t,n,i){return(e!==t||!1===ya(i.enabled,e))&&(!n.suspense||"error"!==e.state.status)&&el(e,n)}function el(e,t){return!1!==ya(t.enabled,e)&&e.isStaleByTime(ga(t.staleTime,e))}function tl(e){return{onFetch:(t,n)=>{const i=t.options,r=t.fetchOptions?.meta?.fetchMore?.direction,s=t.state.data?.pages||[],o=t.state.data?.pageParams||[];let a={pages:[],pageParams:[]},l=0;const u=async()=>{let n=!1;const u=e=>{!function(e,t,n){let i,r=!1;Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(i??=t(),r||(r=!0,i.aborted?n():i.addEventListener("abort",n,{once:!0})),i)})}(e,()=>t.signal,()=>n=!0)},c=Na(t.options,t.fetchOptions),h=async(e,i,r)=>{if(n)return Promise.reject();if(null==i&&e.pages.length)return Promise.resolve(e);const s=(()=>{const e={client:t.client,queryKey:t.queryKey,pageParam:i,direction:r?"backward":"forward",meta:t.options.meta};return u(e),e})(),o=await c(s),{maxPages:a}=t.options,l=r?Ma:Ra;return{pages:l(e.pages,o,a),pageParams:l(e.pageParams,i,a)}};if(r&&s.length){const e="backward"===r,t={pages:s,pageParams:o},n=(e?il:nl)(i,t);a=await h(t,n,e)}else{const t=e??s.length;do{const e=0===l?o[0]??i.initialPageParam:nl(i,a);if(l>0&&null==e)break;a=await h(a,e),l++}while(l<t)}return a};t.options.persister?t.fetchFn=()=>t.options.persister?.(u,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n):t.fetchFn=u}}}function nl(e,{pages:t,pageParams:n}){const i=t.length-1;return t.length>0?e.getNextPageParam(t[i],t,n[i],n):void 0}function il(e,{pages:t,pageParams:n}){return t.length>0?e.getPreviousPageParam?.(t[0],t,n[0],n):void 0}var rl=class extends Za{#c;#F;#j;#h;constructor(e){super(),this.#c=e.client,this.mutationId=e.mutationId,this.#j=e.mutationCache,this.#F=[],this.state=e.state||{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0},this.setOptions(e.options),this.scheduleGc()}setOptions(e){this.options=e,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(e){this.#F.includes(e)||(this.#F.push(e),this.clearGcTimeout(),this.#j.notify({type:"observerAdded",mutation:this,observer:e}))}removeObserver(e){this.#F=this.#F.filter(t=>t!==e),this.scheduleGc(),this.#j.notify({type:"observerRemoved",mutation:this,observer:e})}optionalRemove(){this.#F.length||("pending"===this.state.status?this.scheduleGc():this.#j.remove(this))}continue(){return this.#h?.continue()??this.execute(this.state.variables)}async execute(e){const t=()=>{this.#p({type:"continue"})},n={client:this.#c,meta:this.options.meta,mutationKey:this.options.mutationKey};this.#h=$a({fn:()=>this.options.mutationFn?this.options.mutationFn(e,n):Promise.reject(new Error("No mutationFn found")),onFail:(e,t)=>{this.#p({type:"failed",failureCount:e,error:t})},onPause:()=>{this.#p({type:"pause"})},onContinue:t,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>this.#j.canRun(this)});const i="pending"===this.state.status,r=!this.#h.canStart();try{if(i)t();else{this.#p({type:"pending",variables:e,isPaused:r}),this.#j.config.onMutate&&await this.#j.config.onMutate(e,this,n);const t=await(this.options.onMutate?.(e,n));t!==this.state.context&&this.#p({type:"pending",context:t,variables:e,isPaused:r})}const s=await this.#h.start();return await(this.#j.config.onSuccess?.(s,e,this.state.context,this,n)),await(this.options.onSuccess?.(s,e,this.state.context,n)),await(this.#j.config.onSettled?.(s,null,this.state.variables,this.state.context,this,n)),await(this.options.onSettled?.(s,null,e,this.state.context,n)),this.#p({type:"success",data:s}),s}catch(t){try{await(this.#j.config.onError?.(t,e,this.state.context,this,n))}catch(e){Promise.reject(e)}try{await(this.options.onError?.(t,e,this.state.context,n))}catch(e){Promise.reject(e)}try{await(this.#j.config.onSettled?.(void 0,t,this.state.variables,this.state.context,this,n))}catch(e){Promise.reject(e)}try{await(this.options.onSettled?.(void 0,t,e,this.state.context,n))}catch(e){Promise.reject(e)}throw this.#p({type:"error",error:t}),t}finally{this.#j.runNext(this)}}#p(e){this.state=(t=>{switch(e.type){case"failed":return{...t,failureCount:e.failureCount,failureReason:e.error};case"pause":return{...t,isPaused:!0};case"continue":return{...t,isPaused:!1};case"pending":return{...t,context:e.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:e.isPaused,status:"pending",variables:e.variables,submittedAt:Date.now()};case"success":return{...t,data:e.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...t,data:void 0,error:e.error,failureCount:t.failureCount+1,failureReason:e.error,isPaused:!1,status:"error"}}})(this.state),ja.batch(()=>{this.#F.forEach(t=>{t.onMutationUpdate(e)}),this.#j.notify({mutation:this,type:"updated",action:e})})}};var sl=class extends ca{constructor(e={}){super(),this.config=e,this.#B=new Set,this.#U=new Map,this.#V=0}#B;#U;#V;build(e,t,n){const i=new rl({client:e,mutationCache:this,mutationId:++this.#V,options:e.defaultMutationOptions(t),state:n});return this.add(i),i}add(e){this.#B.add(e);const t=ol(e);if("string"==typeof t){const n=this.#U.get(t);n?n.push(e):this.#U.set(t,[e])}this.notify({type:"added",mutation:e})}remove(e){if(this.#B.delete(e)){const t=ol(e);if("string"==typeof t){const n=this.#U.get(t);if(n)if(n.length>1){const t=n.indexOf(e);-1!==t&&n.splice(t,1)}else n[0]===e&&this.#U.delete(t)}}this.notify({type:"removed",mutation:e})}canRun(e){const t=ol(e);if("string"==typeof t){const n=this.#U.get(t),i=n?.find(e=>"pending"===e.state.status);return!i||i===e}return!0}runNext(e){const t=ol(e);if("string"==typeof t){const n=this.#U.get(t)?.find(t=>t!==e&&t.state.isPaused);return n?.continue()??Promise.resolve()}return Promise.resolve()}clear(){ja.batch(()=>{this.#B.forEach(e=>{this.notify({type:"removed",mutation:e})}),this.#B.clear(),this.#U.clear()})}getAll(){return Array.from(this.#B)}find(e){const t={exact:!0,...e};return this.getAll().find(e=>ba(t,e))}findAll(e={}){return this.getAll().filter(t=>ba(e,t))}notify(e){ja.batch(()=>{this.listeners.forEach(t=>{t(e)})})}resumePausedMutations(){const e=this.getAll().filter(e=>e.state.isPaused);return ja.batch(()=>Promise.all(e.map(e=>e.continue().catch(pa))))}};function ol(e){return e.options.scope?.id}var al=class extends ca{#c;#v=void 0;#G;#$;constructor(e,t){super(),this.#c=e,this.setOptions(t),this.bindMethods(),this.#Z()}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(e){const t=this.options;this.options=this.#c.defaultMutationOptions(e),Sa(this.options,t)||this.#c.getMutationCache().notify({type:"observerOptionsUpdated",mutation:this.#G,observer:this}),t?.mutationKey&&this.options.mutationKey&&wa(t.mutationKey)!==wa(this.options.mutationKey)?this.reset():"pending"===this.#G?.state.status&&this.#G.setOptions(this.options)}onUnsubscribe(){this.hasListeners()||this.#G?.removeObserver(this)}onMutationUpdate(e){this.#Z(),this.#I(e)}getCurrentResult(){return this.#v}reset(){this.#G?.removeObserver(this),this.#G=void 0,this.#Z(),this.#I()}mutate(e,t){return this.#$=t,this.#G?.removeObserver(this),this.#G=this.#c.getMutationCache().build(this.#c,this.options),this.#G.addObserver(this),this.#G.execute(e)}#Z(){const e=this.#G?.state??{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0};this.#v={...e,isPending:"pending"===e.status,isSuccess:"success"===e.status,isError:"error"===e.status,isIdle:"idle"===e.status,mutate:this.mutate,reset:this.reset}}#I(e){ja.batch(()=>{if(this.#$&&this.hasListeners()){const t=this.#v.variables,n=this.#v.context,i={client:this.#c,meta:this.options.meta,mutationKey:this.options.mutationKey};if("success"===e?.type){try{this.#$.onSuccess?.(e.data,t,n,i)}catch(e){Promise.reject(e)}try{this.#$.onSettled?.(e.data,null,t,n,i)}catch(e){Promise.reject(e)}}else if("error"===e?.type){try{this.#$.onError?.(e.error,t,n,i)}catch(e){Promise.reject(e)}try{this.#$.onSettled?.(void 0,e.error,t,n,i)}catch(e){Promise.reject(e)}}}this.listeners.forEach(e=>{e(this.#v)})})}},ll=class extends ca{constructor(e={}){super(),this.config=e,this.#q=new Map}#q;build(e,t,n){const i=t.queryKey,r=t.queryHash??xa(i,t);let s=this.get(r);return s||(s=new qa({client:e,queryKey:i,queryHash:r,options:e.defaultQueryOptions(t),state:n,defaultOptions:e.getQueryDefaults(i)}),this.add(s)),s}add(e){this.#q.has(e.queryHash)||(this.#q.set(e.queryHash,e),this.notify({type:"added",query:e}))}remove(e){const t=this.#q.get(e.queryHash);t&&(e.destroy(),t===e&&this.#q.delete(e.queryHash),this.notify({type:"removed",query:e}))}clear(){ja.batch(()=>{this.getAll().forEach(e=>{this.remove(e)})})}get(e){return this.#q.get(e)}getAll(){return[...this.#q.values()]}find(e){const t={exact:!0,...e};return this.getAll().find(e=>va(t,e))}findAll(e={}){const t=this.getAll();return Object.keys(e).length>0?t.filter(t=>va(e,t)):t}notify(e){ja.batch(()=>{this.listeners.forEach(t=>{t(e)})})}onFocus(){ja.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){ja.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}},ul=e.createContext(void 0),cl=t=>{const n=e.useContext(ul);if(!n)throw new Error("No QueryClient set, use QueryClientProvider to set one");return n},hl=({client:t,children:n})=>(e.useEffect(()=>(t.mount(),()=>{t.unmount()}),[t]),w(ul.Provider,{value:t,children:n})),dl=e.createContext(!1);dl.Provider;var fl=e.createContext(function(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}()),pl=(e,t,n)=>t.fetchOptimistic(e).catch(()=>{n.clearReset()});function ml(t,n,i){if("production"!==process.env.NODE_ENV&&("object"!=typeof t||Array.isArray(t)))throw new Error('Bad argument type. Starting with v5, only the "Object" form is allowed when calling query related functions. Please use the error stack to find the culprit call. More info here: https://tanstack.com/query/latest/docs/react/guides/migrating-to-v5#supports-a-single-signature-one-object');const r=e.useContext(dl),s=e.useContext(fl),o=cl(),a=o.defaultQueryOptions(t);o.getDefaultOptions().queries?._experimental_beforeQuery?.(a);const l=o.getQueryCache().get(a.queryHash);"production"!==process.env.NODE_ENV&&(a.queryFn||console.error(`[${a.queryHash}]: No queryFn was passed as an option, and no default queryFn was found. The queryFn parameter is only optional when using a default queryFn. More info here: https://tanstack.com/query/latest/docs/framework/react/guides/default-query-function`)),a._optimisticResults=r?"isRestoring":"optimistic",(e=>{if(e.suspense){const t=1e3,n=e=>"static"===e?e:Math.max(e??t,t),i=e.staleTime;e.staleTime="function"==typeof i?(...e)=>n(i(...e)):n(i),"number"==typeof e.gcTime&&(e.gcTime=Math.max(e.gcTime,t))}})(a),((e,t,n)=>{const i=n?.state.error&&"function"==typeof e.throwOnError?za(e.throwOnError,[n.state.error,n]):e.throwOnError;(e.suspense||e.experimental_prefetchInRender||i)&&(t.isReset()||(e.retryOnMount=!1))})(a,s,l),(t=>{e.useEffect(()=>{t.clearReset()},[t])})(s);const u=!o.getQueryCache().get(a.queryHash),[c]=e.useState(()=>new n(o,a)),h=c.getOptimisticResult(a),d=!r&&!1!==t.subscribed;if(e.useSyncExternalStore(e.useCallback(e=>{const t=d?c.subscribe(ja.batchCalls(e)):pa;return c.updateResult(),t},[c,d]),()=>c.getCurrentResult(),()=>c.getCurrentResult()),e.useEffect(()=>{c.setOptions(a)},[a,c]),((e,t)=>e?.suspense&&t.isPending)(a,h))throw pl(a,c,s);if((({result:e,errorResetBoundary:t,throwOnError:n,query:i,suspense:r})=>e.isError&&!t.isReset()&&!e.isFetching&&i&&(r&&void 0===e.data||za(n,[e.error,i])))({result:h,errorResetBoundary:s,throwOnError:a.throwOnError,query:l,suspense:a.suspense}))throw h.error;if(o.getDefaultOptions().queries?._experimental_afterQuery?.(a,h),a.experimental_prefetchInRender&&!fa&&((e,t)=>e.isLoading&&e.isFetching&&!t)(h,r)){const e=u?pl(a,c,s):l?.promise;e?.catch(pa).finally(()=>{c.updateResult()})}return a.notifyOnChangeProps?h:c.trackResult(h)}function _l(t,n){const i=cl(),[r]=e.useState(()=>new al(i,t));e.useEffect(()=>{r.setOptions(t)},[r,t]);const s=e.useSyncExternalStore(e.useCallback(e=>r.subscribe(ja.batchCalls(e)),[r]),()=>r.getCurrentResult(),()=>r.getCurrentResult()),o=e.useCallback((e,t)=>{r.mutate(e,t).catch(pa)},[r]);if(s.error&&za(r.options.throwOnError,[s.error]))throw s.error;return{...s,mutate:o,mutateAsync:s.mutate}}const gl=()=>ml({queryKey:["user"],queryFn:async()=>await ua.instance.apiService.get({url:"user/"})},Ya),yl=()=>_l({mutationKey:["user"],mutationFn:async()=>await ua.instance.apiService.get({url:"user/"})}),vl=()=>{const{enqueueSnackbar:e}=h(We);return({variant:t,message:n})=>{e({variant:t,message:n,anchorOrigin:{vertical:"top",horizontal:"right"},autoHideDuration:3e3,hideIconVariant:!0})}},bl=()=>{const e=vl();return t=>{const{response:n}=t;if(n){const{data:t}=n;if(t){const{detail:n}=t;n&&n.forEach(t=>{e({variant:"error",message:t})})}}}},xl=()=>_l({mutationKey:["sign-in-mutation"],mutationFn:async({body:{username:e,password:t}})=>{const n=pn({username:e,password:fn(t)});return await ua.instance.apiService.post({url:"token",body:n,config:{headers:{"Content-Type":"application/x-www-form-urlencoded"}}})},onSuccess:({access_token:e,token_type:t})=>{An("access_token",e),An("token_type",t)}});if(!p)throw new Error("mobx-react-lite requires React with Hooks support");if(!function(e,t,n){return Vo(function(){var i=wo(e,n)[vi];"production"!==process.env.NODE_ENV&&t&&e[pi]&&kn("makeObservable second arg must be nullish when using decorators. Mixing @decorator syntax with annotations is not supported."),null!=t||(t=function(e){return ii(e,pi)||Hn(e,pi,ci({},e[pi])),e[pi]}(e)),ei(t).forEach(function(e){return i.make_(e,t[e])})}),e})throw new Error("mobx-react-lite@3 requires mobx at least version 6 to be available");function wl(e){e()}function El(e){return Ps(e)}var Al,Tl=function(){function e(e){var t=this;Object.defineProperty(this,"finalize",{enumerable:!0,configurable:!0,writable:!0,value:e}),Object.defineProperty(this,"registrations",{enumerable:!0,configurable:!0,writable:!0,value:new Map}),Object.defineProperty(this,"sweepTimeout",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"sweep",{enumerable:!0,configurable:!0,writable:!0,value:function(e){void 0===e&&(e=1e4),clearTimeout(t.sweepTimeout),t.sweepTimeout=void 0;var n=Date.now();t.registrations.forEach(function(i,r){n-i.registeredAt>=e&&(t.finalize(i.value),t.registrations.delete(r))}),t.registrations.size>0&&t.scheduleSweep()}}),Object.defineProperty(this,"finalizeAllImmediately",{enumerable:!0,configurable:!0,writable:!0,value:function(){t.sweep(0)}})}return Object.defineProperty(e.prototype,"register",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t,n){this.registrations.set(n,{value:t,registeredAt:Date.now()}),this.scheduleSweep()}}),Object.defineProperty(e.prototype,"unregister",{enumerable:!1,configurable:!0,writable:!0,value:function(e){this.registrations.delete(e)}}),Object.defineProperty(e.prototype,"scheduleSweep",{enumerable:!1,configurable:!0,writable:!0,value:function(){void 0===this.sweepTimeout&&(this.sweepTimeout=setTimeout(this.sweep,1e4))}}),e}(),Sl=new("undefined"!=typeof FinalizationRegistry?FinalizationRegistry:Tl)(function(e){var t;null===(t=e.reaction)||void 0===t||t.dispose(),e.reaction=null}),kl={exports:{}},Ol={};var Pl,Cl,Rl={};
|
|
1
|
+
import*as e from"react";import t,{forwardRef as n,useRef as i,useCallback as r,useEffect as s,createElement as o,cloneElement as a,useMemo as l,useLayoutEffect as u,Component as c,useContext as h,isValidElement as d,memo as f,useState as p,createContext as m,useReducer as _,use as g,useImperativeHandle as y}from"react";import v,{createPortal as b,unstable_batchedUpdates as x}from"react-dom";import{jsx as w,jsxs as E}from"react/jsx-runtime";import A from"axios";import{LocalizationProvider as T}from"@mui/x-date-pickers";import{AdapterDateFns as S}from"@mui/x-date-pickers/AdapterDateFns";import{CircularProgress as k,Typography as O,Box as P,Accordion as C,AccordionSummary as R,AccordionDetails as M,Button as N,Tooltip as z,IconButton as D,Slide as I,Dialog as F,DialogTitle as j,DialogContent as B,DialogContentText as U,DialogActions as V,styled as G,Divider as $,useTheme as Z,TextField as q,List as W,ListItem as H,Portal as K,Autocomplete as Y,Tab as X}from"@mui/material";import{createTheme as J,ThemeProvider as Q,styled as ee}from"@mui/material/styles";import te from"@mui/icons-material/ArrowDownward";import ne from"@mui/material/IconButton";import ie from"@mui/icons-material/Delete";import re from"@mui/icons-material/Edit";import se from"@mui/icons-material/Moving";import oe from"@mui/icons-material/RestartAlt";import ae from"@mui/icons-material/Save";import le from"@mui/icons-material/CloudUpload";import ue from"@mui/material/Checkbox";import ce from"@mui/material/FormControlLabel";import he from"@mui/material/Typography";import{DateField as de}from"@mui/x-date-pickers/DateField";import fe from"@mui/material/Box";import pe from"@mui/material/Modal";import{TabContext as me,TabList as _e,TabPanel as ge}from"@mui/lab";function ye(e,t){return t.forEach(function(t){t&&"string"!=typeof t&&!Array.isArray(t)&&Object.keys(t).forEach(function(n){if("default"!==n&&!(n in e)){var i=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(e,n,i.get?i:{enumerable:!0,get:function(){return t[n]}})}})}),Object.freeze(e)}var ve;!function(e){e.CREATE="create",e.UPDATE="update",e.DELETE="delete"}(ve||(ve={}));const be={valid:"18c38ab326d12f428e90be50a5141fc8949de497df7f7e0c1796d58e99d006f3",dateExpired:"8cbc5e15e61e649daf57c3a08422ae372c101afb4759036a3864a9fa588ef717",off:"b1520018920b33a4c1f8100c4f3bb3eb93661db829faa99c9cd75537f6300ba9",invalid:"abcdefghijklmnopqrstuvwxyz0123456789"};function xe(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var we,Ee;var Ae,Te=(Ee||(Ee=1,we=function(){const e=["a","b","c","d","e","f","0","1","2","3","4","5","6","7","8","9"];let t=[];for(let n=0;n<36;n++)t[n]=8===n||13===n||18===n||23===n?"-":e[Math.ceil(Math.random()*e.length-1)];return t.join("")}),we),Se=xe(Te),ke={exports:{}};function Oe(){return Ae||(Ae=1,function(e){var t="1.9.4";function n(e){var t,n,i,r;for(n=1,i=arguments.length;n<i;n++)for(t in r=arguments[n])e[t]=r[t];return e}var i=Object.create||function(){function e(){}return function(t){return e.prototype=t,new e}}();function r(e,t){var n=Array.prototype.slice;if(e.bind)return e.bind.apply(e,n.call(arguments,1));var i=n.call(arguments,2);return function(){return e.apply(t,i.length?i.concat(n.call(arguments)):arguments)}}var s=0;function o(e){return"_leaflet_id"in e||(e._leaflet_id=++s),e._leaflet_id}function a(e,t,n){var i,r,s,o;return o=function(){i=!1,r&&(s.apply(n,r),r=!1)},s=function(){i?r=arguments:(e.apply(n,arguments),setTimeout(o,t),i=!0)},s}function l(e,t,n){var i=t[1],r=t[0],s=i-r;return e===i&&n?e:((e-r)%s+s)%s+r}function u(){return!1}function c(e,t){if(!1===t)return e;var n=Math.pow(10,void 0===t?6:t);return Math.round(e*n)/n}function h(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}function d(e){return h(e).split(/\s+/)}function f(e,t){for(var n in Object.prototype.hasOwnProperty.call(e,"options")||(e.options=e.options?i(e.options):{}),t)e.options[n]=t[n];return e.options}function p(e,t,n){var i=[];for(var r in e)i.push(encodeURIComponent(n?r.toUpperCase():r)+"="+encodeURIComponent(e[r]));return(t&&-1!==t.indexOf("?")?"&":"?")+i.join("&")}var m=/\{ *([\w_ -]+) *\}/g;function _(e,t){return e.replace(m,function(e,n){var i=t[n];if(void 0===i)throw new Error("No value provided for variable "+e);return"function"==typeof i&&(i=i(t)),i})}var g=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)};function y(e,t){for(var n=0;n<e.length;n++)if(e[n]===t)return n;return-1}var v="data:image/gif;base64,R0lGODlhAQABAAD/ACwAAAAAAQABAAACADs=";function b(e){return window["webkit"+e]||window["moz"+e]||window["ms"+e]}var x=0;function w(e){var t=+new Date,n=Math.max(0,16-(t-x));return x=t+n,window.setTimeout(e,n)}var E=window.requestAnimationFrame||b("RequestAnimationFrame")||w,A=window.cancelAnimationFrame||b("CancelAnimationFrame")||b("CancelRequestAnimationFrame")||function(e){window.clearTimeout(e)};function T(e,t,n){if(!n||E!==w)return E.call(window,r(e,t));e.call(t)}function S(e){e&&A.call(window,e)}var k={__proto__:null,extend:n,create:i,bind:r,get lastId(){return s},stamp:o,throttle:a,wrapNum:l,falseFn:u,formatNum:c,trim:h,splitWords:d,setOptions:f,getParamString:p,template:_,isArray:g,indexOf:y,emptyImageUrl:v,requestFn:E,cancelFn:A,requestAnimFrame:T,cancelAnimFrame:S};function O(){}function P(e){if("undefined"!=typeof L&&L&&L.Mixin){e=g(e)?e:[e];for(var t=0;t<e.length;t++)e[t]===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)}}O.extend=function(e){var t=function(){f(this),this.initialize&&this.initialize.apply(this,arguments),this.callInitHooks()},r=t.__super__=this.prototype,s=i(r);for(var o in s.constructor=t,t.prototype=s,this)Object.prototype.hasOwnProperty.call(this,o)&&"prototype"!==o&&"__super__"!==o&&(t[o]=this[o]);return e.statics&&n(t,e.statics),e.includes&&(P(e.includes),n.apply(null,[s].concat(e.includes))),n(s,e),delete s.statics,delete s.includes,s.options&&(s.options=r.options?i(r.options):{},n(s.options,e.options)),s._initHooks=[],s.callInitHooks=function(){if(!this._initHooksCalled){r.callInitHooks&&r.callInitHooks.call(this),this._initHooksCalled=!0;for(var e=0,t=s._initHooks.length;e<t;e++)s._initHooks[e].call(this)}},t},O.include=function(e){var t=this.prototype.options;return n(this.prototype,e),e.options&&(this.prototype.options=t,this.mergeOptions(e.options)),this},O.mergeOptions=function(e){return n(this.prototype.options,e),this},O.addInitHook=function(e){var t=Array.prototype.slice.call(arguments,1),n="function"==typeof e?e:function(){this[e].apply(this,t)};return this.prototype._initHooks=this.prototype._initHooks||[],this.prototype._initHooks.push(n),this};var C={on:function(e,t,n){if("object"==typeof e)for(var i in e)this._on(i,e[i],t);else for(var r=0,s=(e=d(e)).length;r<s;r++)this._on(e[r],t,n);return this},off:function(e,t,n){if(arguments.length)if("object"==typeof e)for(var i in e)this._off(i,e[i],t);else{e=d(e);for(var r=1===arguments.length,s=0,o=e.length;s<o;s++)r?this._off(e[s]):this._off(e[s],t,n)}else delete this._events;return this},_on:function(e,t,n,i){if("function"==typeof t){if(!1===this._listens(e,t,n)){n===this&&(n=void 0);var r={fn:t,ctx:n};i&&(r.once=!0),this._events=this._events||{},this._events[e]=this._events[e]||[],this._events[e].push(r)}}else console.warn("wrong listener type: "+typeof t)},_off:function(e,t,n){var i,r,s;if(this._events&&(i=this._events[e]))if(1!==arguments.length)if("function"==typeof t){var o=this._listens(e,t,n);if(!1!==o){var a=i[o];this._firingCount&&(a.fn=u,this._events[e]=i=i.slice()),i.splice(o,1)}}else console.warn("wrong listener type: "+typeof t);else{if(this._firingCount)for(r=0,s=i.length;r<s;r++)i[r].fn=u;delete this._events[e]}},fire:function(e,t,i){if(!this.listens(e,i))return this;var r=n({},t,{type:e,target:this,sourceTarget:t&&t.sourceTarget||this});if(this._events){var s=this._events[e];if(s){this._firingCount=this._firingCount+1||1;for(var o=0,a=s.length;o<a;o++){var l=s[o],u=l.fn;l.once&&this.off(e,u,l.ctx),u.call(l.ctx||this,r)}this._firingCount--}}return i&&this._propagateEvent(r),this},listens:function(e,t,n,i){"string"!=typeof e&&console.warn('"string" type argument expected');var r=t;"function"!=typeof t&&(i=!!t,r=void 0,n=void 0);var s=this._events&&this._events[e];if(s&&s.length&&!1!==this._listens(e,r,n))return!0;if(i)for(var o in this._eventParents)if(this._eventParents[o].listens(e,t,n,i))return!0;return!1},_listens:function(e,t,n){if(!this._events)return!1;var i=this._events[e]||[];if(!t)return!!i.length;n===this&&(n=void 0);for(var r=0,s=i.length;r<s;r++)if(i[r].fn===t&&i[r].ctx===n)return r;return!1},once:function(e,t,n){if("object"==typeof e)for(var i in e)this._on(i,e[i],t,!0);else for(var r=0,s=(e=d(e)).length;r<s;r++)this._on(e[r],t,n,!0);return this},addEventParent:function(e){return this._eventParents=this._eventParents||{},this._eventParents[o(e)]=e,this},removeEventParent:function(e){return this._eventParents&&delete this._eventParents[o(e)],this},_propagateEvent:function(e){for(var t in this._eventParents)this._eventParents[t].fire(e.type,n({layer:e.target,propagatedFrom:e.target},e),!0)}};C.addEventListener=C.on,C.removeEventListener=C.clearAllEventListeners=C.off,C.addOneTimeEventListener=C.once,C.fireEvent=C.fire,C.hasEventListeners=C.listens;var R=O.extend(C);function M(e,t,n){this.x=n?Math.round(e):e,this.y=n?Math.round(t):t}var N=Math.trunc||function(e){return e>0?Math.floor(e):Math.ceil(e)};function z(e,t,n){return e instanceof M?e:g(e)?new M(e[0],e[1]):null==e?e:"object"==typeof e&&"x"in e&&"y"in e?new M(e.x,e.y):new M(e,t,n)}function D(e,t){if(e)for(var n=t?[e,t]:e,i=0,r=n.length;i<r;i++)this.extend(n[i])}function I(e,t){return!e||e instanceof D?e:new D(e,t)}function F(e,t){if(e)for(var n=t?[e,t]:e,i=0,r=n.length;i<r;i++)this.extend(n[i])}function j(e,t){return e instanceof F?e:new F(e,t)}function B(e,t,n){if(isNaN(e)||isNaN(t))throw new Error("Invalid LatLng object: ("+e+", "+t+")");this.lat=+e,this.lng=+t,void 0!==n&&(this.alt=+n)}function U(e,t,n){return e instanceof B?e:g(e)&&"object"!=typeof e[0]?3===e.length?new B(e[0],e[1],e[2]):2===e.length?new B(e[0],e[1]):null:null==e?e:"object"==typeof e&&"lat"in e?new B(e.lat,"lng"in e?e.lng:e.lon,e.alt):void 0===t?null:new B(e,t,n)}M.prototype={clone:function(){return new M(this.x,this.y)},add:function(e){return this.clone()._add(z(e))},_add:function(e){return this.x+=e.x,this.y+=e.y,this},subtract:function(e){return this.clone()._subtract(z(e))},_subtract:function(e){return this.x-=e.x,this.y-=e.y,this},divideBy:function(e){return this.clone()._divideBy(e)},_divideBy:function(e){return this.x/=e,this.y/=e,this},multiplyBy:function(e){return this.clone()._multiplyBy(e)},_multiplyBy:function(e){return this.x*=e,this.y*=e,this},scaleBy:function(e){return new M(this.x*e.x,this.y*e.y)},unscaleBy:function(e){return new M(this.x/e.x,this.y/e.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=N(this.x),this.y=N(this.y),this},distanceTo:function(e){var t=(e=z(e)).x-this.x,n=e.y-this.y;return Math.sqrt(t*t+n*n)},equals:function(e){return(e=z(e)).x===this.x&&e.y===this.y},contains:function(e){return e=z(e),Math.abs(e.x)<=Math.abs(this.x)&&Math.abs(e.y)<=Math.abs(this.y)},toString:function(){return"Point("+c(this.x)+", "+c(this.y)+")"}},D.prototype={extend:function(e){var t,n;if(!e)return this;if(e instanceof M||"number"==typeof e[0]||"x"in e)t=n=z(e);else if(t=(e=I(e)).min,n=e.max,!t||!n)return this;return this.min||this.max?(this.min.x=Math.min(t.x,this.min.x),this.max.x=Math.max(n.x,this.max.x),this.min.y=Math.min(t.y,this.min.y),this.max.y=Math.max(n.y,this.max.y)):(this.min=t.clone(),this.max=n.clone()),this},getCenter:function(e){return z((this.min.x+this.max.x)/2,(this.min.y+this.max.y)/2,e)},getBottomLeft:function(){return z(this.min.x,this.max.y)},getTopRight:function(){return z(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(e){var t,n;return(e="number"==typeof e[0]||e instanceof M?z(e):I(e))instanceof D?(t=e.min,n=e.max):t=n=e,t.x>=this.min.x&&n.x<=this.max.x&&t.y>=this.min.y&&n.y<=this.max.y},intersects:function(e){e=I(e);var t=this.min,n=this.max,i=e.min,r=e.max,s=r.x>=t.x&&i.x<=n.x,o=r.y>=t.y&&i.y<=n.y;return s&&o},overlaps:function(e){e=I(e);var t=this.min,n=this.max,i=e.min,r=e.max,s=r.x>t.x&&i.x<n.x,o=r.y>t.y&&i.y<n.y;return s&&o},isValid:function(){return!(!this.min||!this.max)},pad:function(e){var t=this.min,n=this.max,i=Math.abs(t.x-n.x)*e,r=Math.abs(t.y-n.y)*e;return I(z(t.x-i,t.y-r),z(n.x+i,n.y+r))},equals:function(e){return!!e&&(e=I(e),this.min.equals(e.getTopLeft())&&this.max.equals(e.getBottomRight()))}},F.prototype={extend:function(e){var t,n,i=this._southWest,r=this._northEast;if(e instanceof B)t=e,n=e;else{if(!(e instanceof F))return e?this.extend(U(e)||j(e)):this;if(t=e._southWest,n=e._northEast,!t||!n)return this}return i||r?(i.lat=Math.min(t.lat,i.lat),i.lng=Math.min(t.lng,i.lng),r.lat=Math.max(n.lat,r.lat),r.lng=Math.max(n.lng,r.lng)):(this._southWest=new B(t.lat,t.lng),this._northEast=new B(n.lat,n.lng)),this},pad:function(e){var t=this._southWest,n=this._northEast,i=Math.abs(t.lat-n.lat)*e,r=Math.abs(t.lng-n.lng)*e;return new F(new B(t.lat-i,t.lng-r),new B(n.lat+i,n.lng+r))},getCenter:function(){return new B((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 B(this.getNorth(),this.getWest())},getSouthEast:function(){return new B(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(e){e="number"==typeof e[0]||e instanceof B||"lat"in e?U(e):j(e);var t,n,i=this._southWest,r=this._northEast;return e instanceof F?(t=e.getSouthWest(),n=e.getNorthEast()):t=n=e,t.lat>=i.lat&&n.lat<=r.lat&&t.lng>=i.lng&&n.lng<=r.lng},intersects:function(e){e=j(e);var t=this._southWest,n=this._northEast,i=e.getSouthWest(),r=e.getNorthEast(),s=r.lat>=t.lat&&i.lat<=n.lat,o=r.lng>=t.lng&&i.lng<=n.lng;return s&&o},overlaps:function(e){e=j(e);var t=this._southWest,n=this._northEast,i=e.getSouthWest(),r=e.getNorthEast(),s=r.lat>t.lat&&i.lat<n.lat,o=r.lng>t.lng&&i.lng<n.lng;return s&&o},toBBoxString:function(){return[this.getWest(),this.getSouth(),this.getEast(),this.getNorth()].join(",")},equals:function(e,t){return!!e&&(e=j(e),this._southWest.equals(e.getSouthWest(),t)&&this._northEast.equals(e.getNorthEast(),t))},isValid:function(){return!(!this._southWest||!this._northEast)}},B.prototype={equals:function(e,t){return!!e&&(e=U(e),Math.max(Math.abs(this.lat-e.lat),Math.abs(this.lng-e.lng))<=(void 0===t?1e-9:t))},toString:function(e){return"LatLng("+c(this.lat,e)+", "+c(this.lng,e)+")"},distanceTo:function(e){return $.distance(this,U(e))},wrap:function(){return $.wrapLatLng(this)},toBounds:function(e){var t=180*e/40075017,n=t/Math.cos(Math.PI/180*this.lat);return j([this.lat-t,this.lng-n],[this.lat+t,this.lng+n])},clone:function(){return new B(this.lat,this.lng,this.alt)}};var V,G={latLngToPoint:function(e,t){var n=this.projection.project(e),i=this.scale(t);return this.transformation._transform(n,i)},pointToLatLng:function(e,t){var n=this.scale(t),i=this.transformation.untransform(e,n);return this.projection.unproject(i)},project:function(e){return this.projection.project(e)},unproject:function(e){return this.projection.unproject(e)},scale:function(e){return 256*Math.pow(2,e)},zoom:function(e){return Math.log(e/256)/Math.LN2},getProjectedBounds:function(e){if(this.infinite)return null;var t=this.projection.bounds,n=this.scale(e);return new D(this.transformation.transform(t.min,n),this.transformation.transform(t.max,n))},infinite:!1,wrapLatLng:function(e){var t=this.wrapLng?l(e.lng,this.wrapLng,!0):e.lng;return new B(this.wrapLat?l(e.lat,this.wrapLat,!0):e.lat,t,e.alt)},wrapLatLngBounds:function(e){var t=e.getCenter(),n=this.wrapLatLng(t),i=t.lat-n.lat,r=t.lng-n.lng;if(0===i&&0===r)return e;var s=e.getSouthWest(),o=e.getNorthEast();return new F(new B(s.lat-i,s.lng-r),new B(o.lat-i,o.lng-r))}},$=n({},G,{wrapLng:[-180,180],R:6371e3,distance:function(e,t){var n=Math.PI/180,i=e.lat*n,r=t.lat*n,s=Math.sin((t.lat-e.lat)*n/2),o=Math.sin((t.lng-e.lng)*n/2),a=s*s+Math.cos(i)*Math.cos(r)*o*o,l=2*Math.atan2(Math.sqrt(a),Math.sqrt(1-a));return this.R*l}}),Z=6378137,q={R:Z,MAX_LATITUDE:85.0511287798,project:function(e){var t=Math.PI/180,n=this.MAX_LATITUDE,i=Math.max(Math.min(n,e.lat),-n),r=Math.sin(i*t);return new M(this.R*e.lng*t,this.R*Math.log((1+r)/(1-r))/2)},unproject:function(e){var t=180/Math.PI;return new B((2*Math.atan(Math.exp(e.y/this.R))-Math.PI/2)*t,e.x*t/this.R)},bounds:(V=Z*Math.PI,new D([-V,-V],[V,V]))};function W(e,t,n,i){if(g(e))return this._a=e[0],this._b=e[1],this._c=e[2],void(this._d=e[3]);this._a=e,this._b=t,this._c=n,this._d=i}function H(e,t,n,i){return new W(e,t,n,i)}W.prototype={transform:function(e,t){return this._transform(e.clone(),t)},_transform:function(e,t){return t=t||1,e.x=t*(this._a*e.x+this._b),e.y=t*(this._c*e.y+this._d),e},untransform:function(e,t){return t=t||1,new M((e.x/t-this._b)/this._a,(e.y/t-this._d)/this._c)}};var K=n({},$,{code:"EPSG:3857",projection:q,transformation:function(){var e=.5/(Math.PI*q.R);return H(e,.5,-e,.5)}()}),Y=n({},K,{code:"EPSG:900913"});function X(e){return document.createElementNS("http://www.w3.org/2000/svg",e)}function J(e,t){var n,i,r,s,o,a,l="";for(n=0,r=e.length;n<r;n++){for(i=0,s=(o=e[n]).length;i<s;i++)l+=(i?"L":"M")+(a=o[i]).x+" "+a.y;l+=t?Fe.svg?"z":"x":""}return l||"M0 0"}var Q,ee=document.documentElement.style,te="ActiveXObject"in window,ne=te&&!document.addEventListener,ie="msLaunchUri"in navigator&&!("documentMode"in document),re=Ie("webkit"),se=Ie("android"),oe=Ie("android 2")||Ie("android 3"),ae=parseInt(/WebKit\/([0-9]+)|$/.exec(navigator.userAgent)[1],10),le=se&&Ie("Google")&&ae<537&&!("AudioNode"in window),ue=!!window.opera,ce=!ie&&Ie("chrome"),he=Ie("gecko")&&!re&&!ue&&!te,de=!ce&&Ie("safari"),fe=Ie("phantom"),pe="OTransition"in ee,me=0===navigator.platform.indexOf("Win"),_e=te&&"transition"in ee,ge="WebKitCSSMatrix"in window&&"m11"in new window.WebKitCSSMatrix&&!oe,ye="MozPerspective"in ee,ve=!window.L_DISABLE_3D&&(_e||ge||ye)&&!pe&&!fe,be="undefined"!=typeof orientation||Ie("mobile"),xe=be&&re,we=be&&ge,Ee=!window.PointerEvent&&window.MSPointerEvent,Ae=!(!window.PointerEvent&&!Ee),Te="ontouchstart"in window||!!window.TouchEvent,Se=!window.L_NO_TOUCH&&(Te||Ae),ke=be&&ue,Oe=be&&he,Pe=(window.devicePixelRatio||window.screen.deviceXDPI/window.screen.logicalXDPI)>1,Ce=function(){var e=!1;try{var t=Object.defineProperty({},"passive",{get:function(){e=!0}});window.addEventListener("testPassiveEventSupport",u,t),window.removeEventListener("testPassiveEventSupport",u,t)}catch(e){}return e}(),Re=!!document.createElement("canvas").getContext,Me=!(!document.createElementNS||!X("svg").createSVGRect),Le=!!Me&&((Q=document.createElement("div")).innerHTML="<svg/>","http://www.w3.org/2000/svg"===(Q.firstChild&&Q.firstChild.namespaceURI)),Ne=!Me&&function(){try{var e=document.createElement("div");e.innerHTML='<v:shape adj="1"/>';var t=e.firstChild;return t.style.behavior="url(#default#VML)",t&&"object"==typeof t.adj}catch(e){return!1}}(),ze=0===navigator.platform.indexOf("Mac"),De=0===navigator.platform.indexOf("Linux");function Ie(e){return navigator.userAgent.toLowerCase().indexOf(e)>=0}var Fe={ie:te,ielt9:ne,edge:ie,webkit:re,android:se,android23:oe,androidStock:le,opera:ue,chrome:ce,gecko:he,safari:de,phantom:fe,opera12:pe,win:me,ie3d:_e,webkit3d:ge,gecko3d:ye,any3d:ve,mobile:be,mobileWebkit:xe,mobileWebkit3d:we,msPointer:Ee,pointer:Ae,touch:Se,touchNative:Te,mobileOpera:ke,mobileGecko:Oe,retina:Pe,passiveEvents:Ce,canvas:Re,svg:Me,vml:Ne,inlineSvg:Le,mac:ze,linux:De},je=Fe.msPointer?"MSPointerDown":"pointerdown",Be=Fe.msPointer?"MSPointerMove":"pointermove",Ue=Fe.msPointer?"MSPointerUp":"pointerup",Ve=Fe.msPointer?"MSPointerCancel":"pointercancel",Ge={touchstart:je,touchmove:Be,touchend:Ue,touchcancel:Ve},$e={touchstart:et,touchmove:Qe,touchend:Qe,touchcancel:Qe},Ze={},qe=!1;function We(e,t,n){return"touchstart"===t&&Je(),$e[t]?(n=$e[t].bind(this,n),e.addEventListener(Ge[t],n,!1),n):(console.warn("wrong event specified:",t),u)}function He(e,t,n){Ge[t]?e.removeEventListener(Ge[t],n,!1):console.warn("wrong event specified:",t)}function Ke(e){Ze[e.pointerId]=e}function Ye(e){Ze[e.pointerId]&&(Ze[e.pointerId]=e)}function Xe(e){delete Ze[e.pointerId]}function Je(){qe||(document.addEventListener(je,Ke,!0),document.addEventListener(Be,Ye,!0),document.addEventListener(Ue,Xe,!0),document.addEventListener(Ve,Xe,!0),qe=!0)}function Qe(e,t){if(t.pointerType!==(t.MSPOINTER_TYPE_MOUSE||"mouse")){for(var n in t.touches=[],Ze)t.touches.push(Ze[n]);t.changedTouches=[t],e(t)}}function et(e,t){t.MSPOINTER_TYPE_TOUCH&&t.pointerType===t.MSPOINTER_TYPE_TOUCH&&Kt(t),Qe(e,t)}function tt(e){var t,n,i={};for(n in e)t=e[n],i[n]=t&&t.bind?t.bind(e):t;return e=i,i.type="dblclick",i.detail=2,i.isTrusted=!1,i._simulated=!0,i}var nt=200;function it(e,t){e.addEventListener("dblclick",t);var n,i=0;function r(e){if(1===e.detail){if("mouse"!==e.pointerType&&(!e.sourceCapabilities||e.sourceCapabilities.firesTouchEvents)){var r=Xt(e);if(!r.some(function(e){return e instanceof HTMLLabelElement&&e.attributes.for})||r.some(function(e){return e instanceof HTMLInputElement||e instanceof HTMLSelectElement})){var s=Date.now();s-i<=nt?2===++n&&t(tt(e)):n=1,i=s}}}else n=e.detail}return e.addEventListener("click",r),{dblclick:t,simDblclick:r}}function rt(e,t){e.removeEventListener("dblclick",t.dblclick),e.removeEventListener("click",t.simDblclick)}var st,ot,at,lt,ut,ct=kt(["transform","webkitTransform","OTransform","MozTransform","msTransform"]),ht=kt(["webkitTransition","transition","OTransition","MozTransition","msTransition"]),dt="webkitTransition"===ht||"OTransition"===ht?ht+"End":"transitionend";function ft(e){return"string"==typeof e?document.getElementById(e):e}function pt(e,t){var n=e.style[t]||e.currentStyle&&e.currentStyle[t];if((!n||"auto"===n)&&document.defaultView){var i=document.defaultView.getComputedStyle(e,null);n=i?i[t]:null}return"auto"===n?null:n}function mt(e,t,n){var i=document.createElement(e);return i.className=t||"",n&&n.appendChild(i),i}function _t(e){var t=e.parentNode;t&&t.removeChild(e)}function gt(e){for(;e.firstChild;)e.removeChild(e.firstChild)}function yt(e){var t=e.parentNode;t&&t.lastChild!==e&&t.appendChild(e)}function vt(e){var t=e.parentNode;t&&t.firstChild!==e&&t.insertBefore(e,t.firstChild)}function bt(e,t){if(void 0!==e.classList)return e.classList.contains(t);var n=At(e);return n.length>0&&new RegExp("(^|\\s)"+t+"(\\s|$)").test(n)}function xt(e,t){if(void 0!==e.classList)for(var n=d(t),i=0,r=n.length;i<r;i++)e.classList.add(n[i]);else if(!bt(e,t)){var s=At(e);Et(e,(s?s+" ":"")+t)}}function wt(e,t){void 0!==e.classList?e.classList.remove(t):Et(e,h((" "+At(e)+" ").replace(" "+t+" "," ")))}function Et(e,t){void 0===e.className.baseVal?e.className=t:e.className.baseVal=t}function At(e){return e.correspondingElement&&(e=e.correspondingElement),void 0===e.className.baseVal?e.className:e.className.baseVal}function Tt(e,t){"opacity"in e.style?e.style.opacity=t:"filter"in e.style&&St(e,t)}function St(e,t){var n=!1,i="DXImageTransform.Microsoft.Alpha";try{n=e.filters.item(i)}catch(e){if(1===t)return}t=Math.round(100*t),n?(n.Enabled=100!==t,n.Opacity=t):e.style.filter+=" progid:"+i+"(opacity="+t+")"}function kt(e){for(var t=document.documentElement.style,n=0;n<e.length;n++)if(e[n]in t)return e[n];return!1}function Ot(e,t,n){var i=t||new M(0,0);e.style[ct]=(Fe.ie3d?"translate("+i.x+"px,"+i.y+"px)":"translate3d("+i.x+"px,"+i.y+"px,0)")+(n?" scale("+n+")":"")}function Pt(e,t){e._leaflet_pos=t,Fe.any3d?Ot(e,t):(e.style.left=t.x+"px",e.style.top=t.y+"px")}function Ct(e){return e._leaflet_pos||new M(0,0)}if("onselectstart"in document)st=function(){jt(window,"selectstart",Kt)},ot=function(){Ut(window,"selectstart",Kt)};else{var Rt=kt(["userSelect","WebkitUserSelect","OUserSelect","MozUserSelect","msUserSelect"]);st=function(){if(Rt){var e=document.documentElement.style;at=e[Rt],e[Rt]="none"}},ot=function(){Rt&&(document.documentElement.style[Rt]=at,at=void 0)}}function Mt(){jt(window,"dragstart",Kt)}function Lt(){Ut(window,"dragstart",Kt)}function Nt(e){for(;-1===e.tabIndex;)e=e.parentNode;e.style&&(zt(),lt=e,ut=e.style.outlineStyle,e.style.outlineStyle="none",jt(window,"keydown",zt))}function zt(){lt&&(lt.style.outlineStyle=ut,lt=void 0,ut=void 0,Ut(window,"keydown",zt))}function Dt(e){do{e=e.parentNode}while(!(e.offsetWidth&&e.offsetHeight||e===document.body));return e}function It(e){var t=e.getBoundingClientRect();return{x:t.width/e.offsetWidth||1,y:t.height/e.offsetHeight||1,boundingClientRect:t}}var Ft={__proto__:null,TRANSFORM:ct,TRANSITION:ht,TRANSITION_END:dt,get:ft,getStyle:pt,create:mt,remove:_t,empty:gt,toFront:yt,toBack:vt,hasClass:bt,addClass:xt,removeClass:wt,setClass:Et,getClass:At,setOpacity:Tt,testProp:kt,setTransform:Ot,setPosition:Pt,getPosition:Ct,get disableTextSelection(){return st},get enableTextSelection(){return ot},disableImageDrag:Mt,enableImageDrag:Lt,preventOutline:Nt,restoreOutline:zt,getSizedParentNode:Dt,getScale:It};function jt(e,t,n,i){if(t&&"object"==typeof t)for(var r in t)$t(e,r,t[r],n);else for(var s=0,o=(t=d(t)).length;s<o;s++)$t(e,t[s],n,i);return this}var Bt="_leaflet_events";function Ut(e,t,n,i){if(1===arguments.length)Vt(e),delete e[Bt];else if(t&&"object"==typeof t)for(var r in t)Zt(e,r,t[r],n);else if(t=d(t),2===arguments.length)Vt(e,function(e){return-1!==y(t,e)});else for(var s=0,o=t.length;s<o;s++)Zt(e,t[s],n,i);return this}function Vt(e,t){for(var n in e[Bt]){var i=n.split(/\d/)[0];t&&!t(i)||Zt(e,i,null,null,n)}}var Gt={mouseenter:"mouseover",mouseleave:"mouseout",wheel:!("onwheel"in window)&&"mousewheel"};function $t(e,t,n,i){var r=t+o(n)+(i?"_"+o(i):"");if(e[Bt]&&e[Bt][r])return this;var s=function(t){return n.call(i||e,t||window.event)},a=s;!Fe.touchNative&&Fe.pointer&&0===t.indexOf("touch")?s=We(e,t,s):Fe.touch&&"dblclick"===t?s=it(e,s):"addEventListener"in e?"touchstart"===t||"touchmove"===t||"wheel"===t||"mousewheel"===t?e.addEventListener(Gt[t]||t,s,!!Fe.passiveEvents&&{passive:!1}):"mouseenter"===t||"mouseleave"===t?(s=function(t){t=t||window.event,tn(e,t)&&a(t)},e.addEventListener(Gt[t],s,!1)):e.addEventListener(t,a,!1):e.attachEvent("on"+t,s),e[Bt]=e[Bt]||{},e[Bt][r]=s}function Zt(e,t,n,i,r){r=r||t+o(n)+(i?"_"+o(i):"");var s=e[Bt]&&e[Bt][r];if(!s)return this;!Fe.touchNative&&Fe.pointer&&0===t.indexOf("touch")?He(e,t,s):Fe.touch&&"dblclick"===t?rt(e,s):"removeEventListener"in e?e.removeEventListener(Gt[t]||t,s,!1):e.detachEvent("on"+t,s),e[Bt][r]=null}function qt(e){return e.stopPropagation?e.stopPropagation():e.originalEvent?e.originalEvent._stopped=!0:e.cancelBubble=!0,this}function Wt(e){return $t(e,"wheel",qt),this}function Ht(e){return jt(e,"mousedown touchstart dblclick contextmenu",qt),e._leaflet_disable_click=!0,this}function Kt(e){return e.preventDefault?e.preventDefault():e.returnValue=!1,this}function Yt(e){return Kt(e),qt(e),this}function Xt(e){if(e.composedPath)return e.composedPath();for(var t=[],n=e.target;n;)t.push(n),n=n.parentNode;return t}function Jt(e,t){if(!t)return new M(e.clientX,e.clientY);var n=It(t),i=n.boundingClientRect;return new M((e.clientX-i.left)/n.x-t.clientLeft,(e.clientY-i.top)/n.y-t.clientTop)}var Qt=Fe.linux&&Fe.chrome?window.devicePixelRatio:Fe.mac?3*window.devicePixelRatio:window.devicePixelRatio>0?2*window.devicePixelRatio:1;function en(e){return Fe.edge?e.wheelDeltaY/2:e.deltaY&&0===e.deltaMode?-e.deltaY/Qt:e.deltaY&&1===e.deltaMode?20*-e.deltaY:e.deltaY&&2===e.deltaMode?60*-e.deltaY:e.deltaX||e.deltaZ?0:e.wheelDelta?(e.wheelDeltaY||e.wheelDelta)/2:e.detail&&Math.abs(e.detail)<32765?20*-e.detail:e.detail?e.detail/-32765*60:0}function tn(e,t){var n=t.relatedTarget;if(!n)return!0;try{for(;n&&n!==e;)n=n.parentNode}catch(e){return!1}return n!==e}var nn={__proto__:null,on:jt,off:Ut,stopPropagation:qt,disableScrollPropagation:Wt,disableClickPropagation:Ht,preventDefault:Kt,stop:Yt,getPropagationPath:Xt,getMousePosition:Jt,getWheelDelta:en,isExternalTarget:tn,addListener:jt,removeListener:Ut},rn=R.extend({run:function(e,t,n,i){this.stop(),this._el=e,this._inProgress=!0,this._duration=n||.25,this._easeOutPower=1/Math.max(i||.5,.2),this._startPos=Ct(e),this._offset=t.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=T(this._animate,this),this._step()},_step:function(e){var t=+new Date-this._startTime,n=1e3*this._duration;t<n?this._runFrame(this._easeOut(t/n),e):(this._runFrame(1),this._complete())},_runFrame:function(e,t){var n=this._startPos.add(this._offset.multiplyBy(e));t&&n._round(),Pt(this._el,n),this.fire("step")},_complete:function(){S(this._animId),this._inProgress=!1,this.fire("end")},_easeOut:function(e){return 1-Math.pow(1-e,this._easeOutPower)}}),sn=R.extend({options:{crs:K,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(e,t){t=f(this,t),this._handlers=[],this._layers={},this._zoomBoundLayers={},this._sizeChanged=!0,this._initContainer(e),this._initLayout(),this._onResize=r(this._onResize,this),this._initEvents(),t.maxBounds&&this.setMaxBounds(t.maxBounds),void 0!==t.zoom&&(this._zoom=this._limitZoom(t.zoom)),t.center&&void 0!==t.zoom&&this.setView(U(t.center),t.zoom,{reset:!0}),this.callInitHooks(),this._zoomAnimated=ht&&Fe.any3d&&!Fe.mobileOpera&&this.options.zoomAnimation,this._zoomAnimated&&(this._createAnimProxy(),jt(this._proxy,dt,this._catchTransitionEnd,this)),this._addLayers(this.options.layers)},setView:function(e,t,i){return t=void 0===t?this._zoom:this._limitZoom(t),e=this._limitCenter(U(e),t,this.options.maxBounds),i=i||{},this._stop(),this._loaded&&!i.reset&&!0!==i&&(void 0!==i.animate&&(i.zoom=n({animate:i.animate},i.zoom),i.pan=n({animate:i.animate,duration:i.duration},i.pan)),this._zoom!==t?this._tryAnimatedZoom&&this._tryAnimatedZoom(e,t,i.zoom):this._tryAnimatedPan(e,i.pan))?(clearTimeout(this._sizeTimer),this):(this._resetView(e,t,i.pan&&i.pan.noMoveStart),this)},setZoom:function(e,t){return this._loaded?this.setView(this.getCenter(),e,{zoom:t}):(this._zoom=e,this)},zoomIn:function(e,t){return e=e||(Fe.any3d?this.options.zoomDelta:1),this.setZoom(this._zoom+e,t)},zoomOut:function(e,t){return e=e||(Fe.any3d?this.options.zoomDelta:1),this.setZoom(this._zoom-e,t)},setZoomAround:function(e,t,n){var i=this.getZoomScale(t),r=this.getSize().divideBy(2),s=(e instanceof M?e:this.latLngToContainerPoint(e)).subtract(r).multiplyBy(1-1/i),o=this.containerPointToLatLng(r.add(s));return this.setView(o,t,{zoom:n})},_getBoundsCenterZoom:function(e,t){t=t||{},e=e.getBounds?e.getBounds():j(e);var n=z(t.paddingTopLeft||t.padding||[0,0]),i=z(t.paddingBottomRight||t.padding||[0,0]),r=this.getBoundsZoom(e,!1,n.add(i));if((r="number"==typeof t.maxZoom?Math.min(t.maxZoom,r):r)===1/0)return{center:e.getCenter(),zoom:r};var s=i.subtract(n).divideBy(2),o=this.project(e.getSouthWest(),r),a=this.project(e.getNorthEast(),r);return{center:this.unproject(o.add(a).divideBy(2).add(s),r),zoom:r}},fitBounds:function(e,t){if(!(e=j(e)).isValid())throw new Error("Bounds are not valid.");var n=this._getBoundsCenterZoom(e,t);return this.setView(n.center,n.zoom,t)},fitWorld:function(e){return this.fitBounds([[-90,-180],[90,180]],e)},panTo:function(e,t){return this.setView(e,this._zoom,{pan:t})},panBy:function(e,t){if(t=t||{},!(e=z(e).round()).x&&!e.y)return this.fire("moveend");if(!0!==t.animate&&!this.getSize().contains(e))return this._resetView(this.unproject(this.project(this.getCenter()).add(e)),this.getZoom()),this;if(this._panAnim||(this._panAnim=new rn,this._panAnim.on({step:this._onPanTransitionStep,end:this._onPanTransitionEnd},this)),t.noMoveStart||this.fire("movestart"),!1!==t.animate){xt(this._mapPane,"leaflet-pan-anim");var n=this._getMapPanePos().subtract(e).round();this._panAnim.run(this._mapPane,n,t.duration||.25,t.easeLinearity)}else this._rawPanBy(e),this.fire("move").fire("moveend");return this},flyTo:function(e,t,n){if(!1===(n=n||{}).animate||!Fe.any3d)return this.setView(e,t,n);this._stop();var i=this.project(this.getCenter()),r=this.project(e),s=this.getSize(),o=this._zoom;e=U(e),t=void 0===t?o:t;var a=Math.max(s.x,s.y),l=a*this.getZoomScale(o,t),u=r.distanceTo(i)||1,c=1.42,h=c*c;function d(e){var t=(l*l-a*a+(e?-1:1)*h*h*u*u)/(2*(e?l:a)*h*u),n=Math.sqrt(t*t+1)-t;return n<1e-9?-18:Math.log(n)}function f(e){return(Math.exp(e)-Math.exp(-e))/2}function p(e){return(Math.exp(e)+Math.exp(-e))/2}function m(e){return f(e)/p(e)}var _=d(0);function g(e){return a*(p(_)/p(_+c*e))}function y(e){return a*(p(_)*m(_+c*e)-f(_))/h}function v(e){return 1-Math.pow(1-e,1.5)}var b=Date.now(),x=(d(1)-_)/c,w=n.duration?1e3*n.duration:1e3*x*.8;function E(){var n=(Date.now()-b)/w,s=v(n)*x;n<=1?(this._flyToFrame=T(E,this),this._move(this.unproject(i.add(r.subtract(i).multiplyBy(y(s)/u)),o),this.getScaleZoom(a/g(s),o),{flyTo:!0})):this._move(e,t)._moveEnd(!0)}return this._moveStart(!0,n.noMoveStart),E.call(this),this},flyToBounds:function(e,t){var n=this._getBoundsCenterZoom(e,t);return this.flyTo(n.center,n.zoom,t)},setMaxBounds:function(e){return e=j(e),this.listens("moveend",this._panInsideMaxBounds)&&this.off("moveend",this._panInsideMaxBounds),e.isValid()?(this.options.maxBounds=e,this._loaded&&this._panInsideMaxBounds(),this.on("moveend",this._panInsideMaxBounds)):(this.options.maxBounds=null,this)},setMinZoom:function(e){var t=this.options.minZoom;return this.options.minZoom=e,this._loaded&&t!==e&&(this.fire("zoomlevelschange"),this.getZoom()<this.options.minZoom)?this.setZoom(e):this},setMaxZoom:function(e){var t=this.options.maxZoom;return this.options.maxZoom=e,this._loaded&&t!==e&&(this.fire("zoomlevelschange"),this.getZoom()>this.options.maxZoom)?this.setZoom(e):this},panInsideBounds:function(e,t){this._enforcingBounds=!0;var n=this.getCenter(),i=this._limitCenter(n,this._zoom,j(e));return n.equals(i)||this.panTo(i,t),this._enforcingBounds=!1,this},panInside:function(e,t){var n=z((t=t||{}).paddingTopLeft||t.padding||[0,0]),i=z(t.paddingBottomRight||t.padding||[0,0]),r=this.project(this.getCenter()),s=this.project(e),o=this.getPixelBounds(),a=I([o.min.add(n),o.max.subtract(i)]),l=a.getSize();if(!a.contains(s)){this._enforcingBounds=!0;var u=s.subtract(a.getCenter()),c=a.extend(s).getSize().subtract(l);r.x+=u.x<0?-c.x:c.x,r.y+=u.y<0?-c.y:c.y,this.panTo(this.unproject(r),t),this._enforcingBounds=!1}return this},invalidateSize:function(e){if(!this._loaded)return this;e=n({animate:!1,pan:!0},!0===e?{animate:!0}:e);var t=this.getSize();this._sizeChanged=!0,this._lastCenter=null;var i=this.getSize(),s=t.divideBy(2).round(),o=i.divideBy(2).round(),a=s.subtract(o);return a.x||a.y?(e.animate&&e.pan?this.panBy(a):(e.pan&&this._rawPanBy(a),this.fire("move"),e.debounceMoveend?(clearTimeout(this._sizeTimer),this._sizeTimer=setTimeout(r(this.fire,this,"moveend"),200)):this.fire("moveend")),this.fire("resize",{oldSize:t,newSize:i})):this},stop:function(){return this.setZoom(this._limitZoom(this._zoom)),this.options.zoomSnap||this.fire("viewreset"),this._stop()},locate:function(e){if(e=this._locateOptions=n({timeout:1e4,watch:!1},e),!("geolocation"in navigator))return this._handleGeolocationError({code:0,message:"Geolocation not supported."}),this;var t=r(this._handleGeolocationResponse,this),i=r(this._handleGeolocationError,this);return e.watch?this._locationWatchId=navigator.geolocation.watchPosition(t,i,e):navigator.geolocation.getCurrentPosition(t,i,e),this},stopLocate:function(){return navigator.geolocation&&navigator.geolocation.clearWatch&&navigator.geolocation.clearWatch(this._locationWatchId),this._locateOptions&&(this._locateOptions.setView=!1),this},_handleGeolocationError:function(e){if(this._container._leaflet_id){var t=e.code,n=e.message||(1===t?"permission denied":2===t?"position unavailable":"timeout");this._locateOptions.setView&&!this._loaded&&this.fitWorld(),this.fire("locationerror",{code:t,message:"Geolocation error: "+n+"."})}},_handleGeolocationResponse:function(e){if(this._container._leaflet_id){var t=new B(e.coords.latitude,e.coords.longitude),n=t.toBounds(2*e.coords.accuracy),i=this._locateOptions;if(i.setView){var r=this.getBoundsZoom(n);this.setView(t,i.maxZoom?Math.min(r,i.maxZoom):r)}var s={latlng:t,bounds:n,timestamp:e.timestamp};for(var o in e.coords)"number"==typeof e.coords[o]&&(s[o]=e.coords[o]);this.fire("locationfound",s)}},addHandler:function(e,t){if(!t)return this;var n=this[e]=new t(this);return this._handlers.push(n),this.options[e]&&n.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(e){this._container._leaflet_id=void 0,this._containerId=void 0}var e;for(e in void 0!==this._locationWatchId&&this.stopLocate(),this._stop(),_t(this._mapPane),this._clearControlPos&&this._clearControlPos(),this._resizeRequest&&(S(this._resizeRequest),this._resizeRequest=null),this._clearHandlers(),this._loaded&&this.fire("unload"),this._layers)this._layers[e].remove();for(e in this._panes)_t(this._panes[e]);return this._layers=[],this._panes=[],delete this._mapPane,delete this._renderer,this},createPane:function(e,t){var n=mt("div","leaflet-pane"+(e?" leaflet-"+e.replace("Pane","")+"-pane":""),t||this._mapPane);return e&&(this._panes[e]=n),n},getCenter:function(){return this._checkIfLoaded(),this._lastCenter&&!this._moved()?this._lastCenter.clone():this.layerPointToLatLng(this._getCenterLayerPoint())},getZoom:function(){return this._zoom},getBounds:function(){var e=this.getPixelBounds();return new F(this.unproject(e.getBottomLeft()),this.unproject(e.getTopRight()))},getMinZoom:function(){return void 0===this.options.minZoom?this._layersMinZoom||0:this.options.minZoom},getMaxZoom:function(){return void 0===this.options.maxZoom?void 0===this._layersMaxZoom?1/0:this._layersMaxZoom:this.options.maxZoom},getBoundsZoom:function(e,t,n){e=j(e),n=z(n||[0,0]);var i=this.getZoom()||0,r=this.getMinZoom(),s=this.getMaxZoom(),o=e.getNorthWest(),a=e.getSouthEast(),l=this.getSize().subtract(n),u=I(this.project(a,i),this.project(o,i)).getSize(),c=Fe.any3d?this.options.zoomSnap:1,h=l.x/u.x,d=l.y/u.y,f=t?Math.max(h,d):Math.min(h,d);return i=this.getScaleZoom(f,i),c&&(i=Math.round(i/(c/100))*(c/100),i=t?Math.ceil(i/c)*c:Math.floor(i/c)*c),Math.max(r,Math.min(s,i))},getSize:function(){return this._size&&!this._sizeChanged||(this._size=new M(this._container.clientWidth||0,this._container.clientHeight||0),this._sizeChanged=!1),this._size.clone()},getPixelBounds:function(e,t){var n=this._getTopLeftPoint(e,t);return new D(n,n.add(this.getSize()))},getPixelOrigin:function(){return this._checkIfLoaded(),this._pixelOrigin},getPixelWorldBounds:function(e){return this.options.crs.getProjectedBounds(void 0===e?this.getZoom():e)},getPane:function(e){return"string"==typeof e?this._panes[e]:e},getPanes:function(){return this._panes},getContainer:function(){return this._container},getZoomScale:function(e,t){var n=this.options.crs;return t=void 0===t?this._zoom:t,n.scale(e)/n.scale(t)},getScaleZoom:function(e,t){var n=this.options.crs;t=void 0===t?this._zoom:t;var i=n.zoom(e*n.scale(t));return isNaN(i)?1/0:i},project:function(e,t){return t=void 0===t?this._zoom:t,this.options.crs.latLngToPoint(U(e),t)},unproject:function(e,t){return t=void 0===t?this._zoom:t,this.options.crs.pointToLatLng(z(e),t)},layerPointToLatLng:function(e){var t=z(e).add(this.getPixelOrigin());return this.unproject(t)},latLngToLayerPoint:function(e){return this.project(U(e))._round()._subtract(this.getPixelOrigin())},wrapLatLng:function(e){return this.options.crs.wrapLatLng(U(e))},wrapLatLngBounds:function(e){return this.options.crs.wrapLatLngBounds(j(e))},distance:function(e,t){return this.options.crs.distance(U(e),U(t))},containerPointToLayerPoint:function(e){return z(e).subtract(this._getMapPanePos())},layerPointToContainerPoint:function(e){return z(e).add(this._getMapPanePos())},containerPointToLatLng:function(e){var t=this.containerPointToLayerPoint(z(e));return this.layerPointToLatLng(t)},latLngToContainerPoint:function(e){return this.layerPointToContainerPoint(this.latLngToLayerPoint(U(e)))},mouseEventToContainerPoint:function(e){return Jt(e,this._container)},mouseEventToLayerPoint:function(e){return this.containerPointToLayerPoint(this.mouseEventToContainerPoint(e))},mouseEventToLatLng:function(e){return this.layerPointToLatLng(this.mouseEventToLayerPoint(e))},_initContainer:function(e){var t=this._container=ft(e);if(!t)throw new Error("Map container not found.");if(t._leaflet_id)throw new Error("Map container is already initialized.");jt(t,"scroll",this._onScroll,this),this._containerId=o(t)},_initLayout:function(){var e=this._container;this._fadeAnimated=this.options.fadeAnimation&&Fe.any3d,xt(e,"leaflet-container"+(Fe.touch?" leaflet-touch":"")+(Fe.retina?" leaflet-retina":"")+(Fe.ielt9?" leaflet-oldie":"")+(Fe.safari?" leaflet-safari":"")+(this._fadeAnimated?" leaflet-fade-anim":""));var t=pt(e,"position");"absolute"!==t&&"relative"!==t&&"fixed"!==t&&"sticky"!==t&&(e.style.position="relative"),this._initPanes(),this._initControlPos&&this._initControlPos()},_initPanes:function(){var e=this._panes={};this._paneRenderers={},this._mapPane=this.createPane("mapPane",this._container),Pt(this._mapPane,new M(0,0)),this.createPane("tilePane"),this.createPane("overlayPane"),this.createPane("shadowPane"),this.createPane("markerPane"),this.createPane("tooltipPane"),this.createPane("popupPane"),this.options.markerZoomAnimation||(xt(e.markerPane,"leaflet-zoom-hide"),xt(e.shadowPane,"leaflet-zoom-hide"))},_resetView:function(e,t,n){Pt(this._mapPane,new M(0,0));var i=!this._loaded;this._loaded=!0,t=this._limitZoom(t),this.fire("viewprereset");var r=this._zoom!==t;this._moveStart(r,n)._move(e,t)._moveEnd(r),this.fire("viewreset"),i&&this.fire("load")},_moveStart:function(e,t){return e&&this.fire("zoomstart"),t||this.fire("movestart"),this},_move:function(e,t,n,i){void 0===t&&(t=this._zoom);var r=this._zoom!==t;return this._zoom=t,this._lastCenter=e,this._pixelOrigin=this._getNewPixelOrigin(e),i?n&&n.pinch&&this.fire("zoom",n):((r||n&&n.pinch)&&this.fire("zoom",n),this.fire("move",n)),this},_moveEnd:function(e){return e&&this.fire("zoomend"),this.fire("moveend")},_stop:function(){return S(this._flyToFrame),this._panAnim&&this._panAnim.stop(),this},_rawPanBy:function(e){Pt(this._mapPane,this._getMapPanePos().subtract(e))},_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(e){this._targets={},this._targets[o(this._container)]=this;var t=e?Ut:jt;t(this._container,"click dblclick mousedown mouseup mouseover mouseout mousemove contextmenu keypress keydown keyup",this._handleDOMEvent,this),this.options.trackResize&&t(window,"resize",this._onResize,this),Fe.any3d&&this.options.transform3DLimit&&(e?this.off:this.on).call(this,"moveend",this._onMoveEnd)},_onResize:function(){S(this._resizeRequest),this._resizeRequest=T(function(){this.invalidateSize({debounceMoveend:!0})},this)},_onScroll:function(){this._container.scrollTop=0,this._container.scrollLeft=0},_onMoveEnd:function(){var e=this._getMapPanePos();Math.max(Math.abs(e.x),Math.abs(e.y))>=this.options.transform3DLimit&&this._resetView(this.getCenter(),this.getZoom())},_findEventTargets:function(e,t){for(var n,i=[],r="mouseout"===t||"mouseover"===t,s=e.target||e.srcElement,a=!1;s;){if((n=this._targets[o(s)])&&("click"===t||"preclick"===t)&&this._draggableMoved(n)){a=!0;break}if(n&&n.listens(t,!0)){if(r&&!tn(s,e))break;if(i.push(n),r)break}if(s===this._container)break;s=s.parentNode}return i.length||a||r||!this.listens(t,!0)||(i=[this]),i},_isClickDisabled:function(e){for(;e&&e!==this._container;){if(e._leaflet_disable_click)return!0;e=e.parentNode}},_handleDOMEvent:function(e){var t=e.target||e.srcElement;if(!(!this._loaded||t._leaflet_disable_events||"click"===e.type&&this._isClickDisabled(t))){var n=e.type;"mousedown"===n&&Nt(t),this._fireDOMEvent(e,n)}},_mouseEvents:["click","dblclick","mouseover","mouseout","contextmenu"],_fireDOMEvent:function(e,t,i){if("click"===e.type){var r=n({},e);r.type="preclick",this._fireDOMEvent(r,r.type,i)}var s=this._findEventTargets(e,t);if(i){for(var o=[],a=0;a<i.length;a++)i[a].listens(t,!0)&&o.push(i[a]);s=o.concat(s)}if(s.length){"contextmenu"===t&&Kt(e);var l=s[0],u={originalEvent:e};if("keypress"!==e.type&&"keydown"!==e.type&&"keyup"!==e.type){var c=l.getLatLng&&(!l._radius||l._radius<=10);u.containerPoint=c?this.latLngToContainerPoint(l.getLatLng()):this.mouseEventToContainerPoint(e),u.layerPoint=this.containerPointToLayerPoint(u.containerPoint),u.latlng=c?l.getLatLng():this.layerPointToLatLng(u.layerPoint)}for(a=0;a<s.length;a++)if(s[a].fire(t,u,!0),u.originalEvent._stopped||!1===s[a].options.bubblingMouseEvents&&-1!==y(this._mouseEvents,t))return}},_draggableMoved:function(e){return(e=e.dragging&&e.dragging.enabled()?e:this).dragging&&e.dragging.moved()||this.boxZoom&&this.boxZoom.moved()},_clearHandlers:function(){for(var e=0,t=this._handlers.length;e<t;e++)this._handlers[e].disable()},whenReady:function(e,t){return this._loaded?e.call(t||this,{target:this}):this.on("load",e,t),this},_getMapPanePos:function(){return Ct(this._mapPane)||new M(0,0)},_moved:function(){var e=this._getMapPanePos();return e&&!e.equals([0,0])},_getTopLeftPoint:function(e,t){return(e&&void 0!==t?this._getNewPixelOrigin(e,t):this.getPixelOrigin()).subtract(this._getMapPanePos())},_getNewPixelOrigin:function(e,t){var n=this.getSize()._divideBy(2);return this.project(e,t)._subtract(n)._add(this._getMapPanePos())._round()},_latLngToNewLayerPoint:function(e,t,n){var i=this._getNewPixelOrigin(n,t);return this.project(e,t)._subtract(i)},_latLngBoundsToNewLayerBounds:function(e,t,n){var i=this._getNewPixelOrigin(n,t);return I([this.project(e.getSouthWest(),t)._subtract(i),this.project(e.getNorthWest(),t)._subtract(i),this.project(e.getSouthEast(),t)._subtract(i),this.project(e.getNorthEast(),t)._subtract(i)])},_getCenterLayerPoint:function(){return this.containerPointToLayerPoint(this.getSize()._divideBy(2))},_getCenterOffset:function(e){return this.latLngToLayerPoint(e).subtract(this._getCenterLayerPoint())},_limitCenter:function(e,t,n){if(!n)return e;var i=this.project(e,t),r=this.getSize().divideBy(2),s=new D(i.subtract(r),i.add(r)),o=this._getBoundsOffset(s,n,t);return Math.abs(o.x)<=1&&Math.abs(o.y)<=1?e:this.unproject(i.add(o),t)},_limitOffset:function(e,t){if(!t)return e;var n=this.getPixelBounds(),i=new D(n.min.add(e),n.max.add(e));return e.add(this._getBoundsOffset(i,t))},_getBoundsOffset:function(e,t,n){var i=I(this.project(t.getNorthEast(),n),this.project(t.getSouthWest(),n)),r=i.min.subtract(e.min),s=i.max.subtract(e.max);return new M(this._rebound(r.x,-s.x),this._rebound(r.y,-s.y))},_rebound:function(e,t){return e+t>0?Math.round(e-t)/2:Math.max(0,Math.ceil(e))-Math.max(0,Math.floor(t))},_limitZoom:function(e){var t=this.getMinZoom(),n=this.getMaxZoom(),i=Fe.any3d?this.options.zoomSnap:1;return i&&(e=Math.round(e/i)*i),Math.max(t,Math.min(n,e))},_onPanTransitionStep:function(){this.fire("move")},_onPanTransitionEnd:function(){wt(this._mapPane,"leaflet-pan-anim"),this.fire("moveend")},_tryAnimatedPan:function(e,t){var n=this._getCenterOffset(e)._trunc();return!(!0!==(t&&t.animate)&&!this.getSize().contains(n)||(this.panBy(n,t),0))},_createAnimProxy:function(){var e=this._proxy=mt("div","leaflet-proxy leaflet-zoom-animated");this._panes.mapPane.appendChild(e),this.on("zoomanim",function(e){var t=ct,n=this._proxy.style[t];Ot(this._proxy,this.project(e.center,e.zoom),this.getZoomScale(e.zoom,1)),n===this._proxy.style[t]&&this._animatingZoom&&this._onZoomTransitionEnd()},this),this.on("load moveend",this._animMoveEnd,this),this._on("unload",this._destroyAnimProxy,this)},_destroyAnimProxy:function(){_t(this._proxy),this.off("load moveend",this._animMoveEnd,this),delete this._proxy},_animMoveEnd:function(){var e=this.getCenter(),t=this.getZoom();Ot(this._proxy,this.project(e,t),this.getZoomScale(t,1))},_catchTransitionEnd:function(e){this._animatingZoom&&e.propertyName.indexOf("transform")>=0&&this._onZoomTransitionEnd()},_nothingToAnimate:function(){return!this._container.getElementsByClassName("leaflet-zoom-animated").length},_tryAnimatedZoom:function(e,t,n){if(this._animatingZoom)return!0;if(n=n||{},!this._zoomAnimated||!1===n.animate||this._nothingToAnimate()||Math.abs(t-this._zoom)>this.options.zoomAnimationThreshold)return!1;var i=this.getZoomScale(t),r=this._getCenterOffset(e)._divideBy(1-1/i);return!(!0!==n.animate&&!this.getSize().contains(r)||(T(function(){this._moveStart(!0,n.noMoveStart||!1)._animateZoom(e,t,!0)},this),0))},_animateZoom:function(e,t,n,i){this._mapPane&&(n&&(this._animatingZoom=!0,this._animateToCenter=e,this._animateToZoom=t,xt(this._mapPane,"leaflet-zoom-anim")),this.fire("zoomanim",{center:e,zoom:t,noUpdate:i}),this._tempFireZoomEvent||(this._tempFireZoomEvent=this._zoom!==this._animateToZoom),this._move(this._animateToCenter,this._animateToZoom,void 0,!0),setTimeout(r(this._onZoomTransitionEnd,this),250))},_onZoomTransitionEnd:function(){this._animatingZoom&&(this._mapPane&&wt(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 on(e,t){return new sn(e,t)}var an=O.extend({options:{position:"topright"},initialize:function(e){f(this,e)},getPosition:function(){return this.options.position},setPosition:function(e){var t=this._map;return t&&t.removeControl(this),this.options.position=e,t&&t.addControl(this),this},getContainer:function(){return this._container},addTo:function(e){this.remove(),this._map=e;var t=this._container=this.onAdd(e),n=this.getPosition(),i=e._controlCorners[n];return xt(t,"leaflet-control"),-1!==n.indexOf("bottom")?i.insertBefore(t,i.firstChild):i.appendChild(t),this._map.on("unload",this.remove,this),this},remove:function(){return this._map?(_t(this._container),this.onRemove&&this.onRemove(this._map),this._map.off("unload",this.remove,this),this._map=null,this):this},_refocusOnMap:function(e){this._map&&e&&e.screenX>0&&e.screenY>0&&this._map.getContainer().focus()}}),ln=function(e){return new an(e)};sn.include({addControl:function(e){return e.addTo(this),this},removeControl:function(e){return e.remove(),this},_initControlPos:function(){var e=this._controlCorners={},t="leaflet-",n=this._controlContainer=mt("div",t+"control-container",this._container);function i(i,r){var s=t+i+" "+t+r;e[i+r]=mt("div",s,n)}i("top","left"),i("top","right"),i("bottom","left"),i("bottom","right")},_clearControlPos:function(){for(var e in this._controlCorners)_t(this._controlCorners[e]);_t(this._controlContainer),delete this._controlCorners,delete this._controlContainer}});var un=an.extend({options:{collapsed:!0,position:"topright",autoZIndex:!0,hideSingleBase:!1,sortLayers:!1,sortFunction:function(e,t,n,i){return n<i?-1:i<n?1:0}},initialize:function(e,t,n){for(var i in f(this,n),this._layerControlInputs=[],this._layers=[],this._lastZIndex=0,this._handlingClick=!1,this._preventClick=!1,e)this._addLayer(e[i],i);for(i in t)this._addLayer(t[i],i,!0)},onAdd:function(e){this._initLayout(),this._update(),this._map=e,e.on("zoomend",this._checkDisabledLayers,this);for(var t=0;t<this._layers.length;t++)this._layers[t].layer.on("add remove",this._onLayerChange,this);return this._container},addTo:function(e){return an.prototype.addTo.call(this,e),this._expandIfNotCollapsed()},onRemove:function(){this._map.off("zoomend",this._checkDisabledLayers,this);for(var e=0;e<this._layers.length;e++)this._layers[e].layer.off("add remove",this._onLayerChange,this)},addBaseLayer:function(e,t){return this._addLayer(e,t),this._map?this._update():this},addOverlay:function(e,t){return this._addLayer(e,t,!0),this._map?this._update():this},removeLayer:function(e){e.off("add remove",this._onLayerChange,this);var t=this._getLayer(o(e));return t&&this._layers.splice(this._layers.indexOf(t),1),this._map?this._update():this},expand:function(){xt(this._container,"leaflet-control-layers-expanded"),this._section.style.height=null;var e=this._map.getSize().y-(this._container.offsetTop+50);return e<this._section.clientHeight?(xt(this._section,"leaflet-control-layers-scrollbar"),this._section.style.height=e+"px"):wt(this._section,"leaflet-control-layers-scrollbar"),this._checkDisabledLayers(),this},collapse:function(){return wt(this._container,"leaflet-control-layers-expanded"),this},_initLayout:function(){var e="leaflet-control-layers",t=this._container=mt("div",e),n=this.options.collapsed;t.setAttribute("aria-haspopup",!0),Ht(t),Wt(t);var i=this._section=mt("section",e+"-list");n&&(this._map.on("click",this.collapse,this),jt(t,{mouseenter:this._expandSafely,mouseleave:this.collapse},this));var r=this._layersLink=mt("a",e+"-toggle",t);r.href="#",r.title="Layers",r.setAttribute("role","button"),jt(r,{keydown:function(e){13===e.keyCode&&this._expandSafely()},click:function(e){Kt(e),this._expandSafely()}},this),n||this.expand(),this._baseLayersList=mt("div",e+"-base",i),this._separator=mt("div",e+"-separator",i),this._overlaysList=mt("div",e+"-overlays",i),t.appendChild(i)},_getLayer:function(e){for(var t=0;t<this._layers.length;t++)if(this._layers[t]&&o(this._layers[t].layer)===e)return this._layers[t]},_addLayer:function(e,t,n){this._map&&e.on("add remove",this._onLayerChange,this),this._layers.push({layer:e,name:t,overlay:n}),this.options.sortLayers&&this._layers.sort(r(function(e,t){return this.options.sortFunction(e.layer,t.layer,e.name,t.name)},this)),this.options.autoZIndex&&e.setZIndex&&(this._lastZIndex++,e.setZIndex(this._lastZIndex)),this._expandIfNotCollapsed()},_update:function(){if(!this._container)return this;gt(this._baseLayersList),gt(this._overlaysList),this._layerControlInputs=[];var e,t,n,i,r=0;for(n=0;n<this._layers.length;n++)i=this._layers[n],this._addItem(i),t=t||i.overlay,e=e||!i.overlay,r+=i.overlay?0:1;return this.options.hideSingleBase&&(e=e&&r>1,this._baseLayersList.style.display=e?"":"none"),this._separator.style.display=t&&e?"":"none",this},_onLayerChange:function(e){this._handlingClick||this._update();var t=this._getLayer(o(e.target)),n=t.overlay?"add"===e.type?"overlayadd":"overlayremove":"add"===e.type?"baselayerchange":null;n&&this._map.fire(n,t)},_createRadioElement:function(e,t){var n='<input type="radio" class="leaflet-control-layers-selector" name="'+e+'"'+(t?' checked="checked"':"")+"/>",i=document.createElement("div");return i.innerHTML=n,i.firstChild},_addItem:function(e){var t,n=document.createElement("label"),i=this._map.hasLayer(e.layer);e.overlay?((t=document.createElement("input")).type="checkbox",t.className="leaflet-control-layers-selector",t.defaultChecked=i):t=this._createRadioElement("leaflet-base-layers_"+o(this),i),this._layerControlInputs.push(t),t.layerId=o(e.layer),jt(t,"click",this._onInputClick,this);var r=document.createElement("span");r.innerHTML=" "+e.name;var s=document.createElement("span");return n.appendChild(s),s.appendChild(t),s.appendChild(r),(e.overlay?this._overlaysList:this._baseLayersList).appendChild(n),this._checkDisabledLayers(),n},_onInputClick:function(){if(!this._preventClick){var e,t,n=this._layerControlInputs,i=[],r=[];this._handlingClick=!0;for(var s=n.length-1;s>=0;s--)e=n[s],t=this._getLayer(e.layerId).layer,e.checked?i.push(t):e.checked||r.push(t);for(s=0;s<r.length;s++)this._map.hasLayer(r[s])&&this._map.removeLayer(r[s]);for(s=0;s<i.length;s++)this._map.hasLayer(i[s])||this._map.addLayer(i[s]);this._handlingClick=!1,this._refocusOnMap()}},_checkDisabledLayers:function(){for(var e,t,n=this._layerControlInputs,i=this._map.getZoom(),r=n.length-1;r>=0;r--)e=n[r],t=this._getLayer(e.layerId).layer,e.disabled=void 0!==t.options.minZoom&&i<t.options.minZoom||void 0!==t.options.maxZoom&&i>t.options.maxZoom},_expandIfNotCollapsed:function(){return this._map&&!this.options.collapsed&&this.expand(),this},_expandSafely:function(){var e=this._section;this._preventClick=!0,jt(e,"click",Kt),this.expand();var t=this;setTimeout(function(){Ut(e,"click",Kt),t._preventClick=!1})}}),cn=function(e,t,n){return new un(e,t,n)},hn=an.extend({options:{position:"topleft",zoomInText:'<span aria-hidden="true">+</span>',zoomInTitle:"Zoom in",zoomOutText:'<span aria-hidden="true">−</span>',zoomOutTitle:"Zoom out"},onAdd:function(e){var t="leaflet-control-zoom",n=mt("div",t+" leaflet-bar"),i=this.options;return this._zoomInButton=this._createButton(i.zoomInText,i.zoomInTitle,t+"-in",n,this._zoomIn),this._zoomOutButton=this._createButton(i.zoomOutText,i.zoomOutTitle,t+"-out",n,this._zoomOut),this._updateDisabled(),e.on("zoomend zoomlevelschange",this._updateDisabled,this),n},onRemove:function(e){e.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(e){!this._disabled&&this._map._zoom<this._map.getMaxZoom()&&this._map.zoomIn(this._map.options.zoomDelta*(e.shiftKey?3:1))},_zoomOut:function(e){!this._disabled&&this._map._zoom>this._map.getMinZoom()&&this._map.zoomOut(this._map.options.zoomDelta*(e.shiftKey?3:1))},_createButton:function(e,t,n,i,r){var s=mt("a",n,i);return s.innerHTML=e,s.href="#",s.title=t,s.setAttribute("role","button"),s.setAttribute("aria-label",t),Ht(s),jt(s,"click",Yt),jt(s,"click",r,this),jt(s,"click",this._refocusOnMap,this),s},_updateDisabled:function(){var e=this._map,t="leaflet-disabled";wt(this._zoomInButton,t),wt(this._zoomOutButton,t),this._zoomInButton.setAttribute("aria-disabled","false"),this._zoomOutButton.setAttribute("aria-disabled","false"),(this._disabled||e._zoom===e.getMinZoom())&&(xt(this._zoomOutButton,t),this._zoomOutButton.setAttribute("aria-disabled","true")),(this._disabled||e._zoom===e.getMaxZoom())&&(xt(this._zoomInButton,t),this._zoomInButton.setAttribute("aria-disabled","true"))}});sn.mergeOptions({zoomControl:!0}),sn.addInitHook(function(){this.options.zoomControl&&(this.zoomControl=new hn,this.addControl(this.zoomControl))});var dn=function(e){return new hn(e)},fn=an.extend({options:{position:"bottomleft",maxWidth:100,metric:!0,imperial:!0},onAdd:function(e){var t="leaflet-control-scale",n=mt("div",t),i=this.options;return this._addScales(i,t+"-line",n),e.on(i.updateWhenIdle?"moveend":"move",this._update,this),e.whenReady(this._update,this),n},onRemove:function(e){e.off(this.options.updateWhenIdle?"moveend":"move",this._update,this)},_addScales:function(e,t,n){e.metric&&(this._mScale=mt("div",t,n)),e.imperial&&(this._iScale=mt("div",t,n))},_update:function(){var e=this._map,t=e.getSize().y/2,n=e.distance(e.containerPointToLatLng([0,t]),e.containerPointToLatLng([this.options.maxWidth,t]));this._updateScales(n)},_updateScales:function(e){this.options.metric&&e&&this._updateMetric(e),this.options.imperial&&e&&this._updateImperial(e)},_updateMetric:function(e){var t=this._getRoundNum(e),n=t<1e3?t+" m":t/1e3+" km";this._updateScale(this._mScale,n,t/e)},_updateImperial:function(e){var t,n,i,r=3.2808399*e;r>5280?(t=r/5280,n=this._getRoundNum(t),this._updateScale(this._iScale,n+" mi",n/t)):(i=this._getRoundNum(r),this._updateScale(this._iScale,i+" ft",i/r))},_updateScale:function(e,t,n){e.style.width=Math.round(this.options.maxWidth*n)+"px",e.innerHTML=t},_getRoundNum:function(e){var t=Math.pow(10,(Math.floor(e)+"").length-1),n=e/t;return t*(n=n>=10?10:n>=5?5:n>=3?3:n>=2?2:1)}}),pn=function(e){return new fn(e)},mn='<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>',_n=an.extend({options:{position:"bottomright",prefix:'<a href="https://leafletjs.com" title="A JavaScript library for interactive maps">'+(Fe.inlineSvg?mn+" ":"")+"Leaflet</a>"},initialize:function(e){f(this,e),this._attributions={}},onAdd:function(e){for(var t in e.attributionControl=this,this._container=mt("div","leaflet-control-attribution"),Ht(this._container),e._layers)e._layers[t].getAttribution&&this.addAttribution(e._layers[t].getAttribution());return this._update(),e.on("layeradd",this._addAttribution,this),this._container},onRemove:function(e){e.off("layeradd",this._addAttribution,this)},_addAttribution:function(e){e.layer.getAttribution&&(this.addAttribution(e.layer.getAttribution()),e.layer.once("remove",function(){this.removeAttribution(e.layer.getAttribution())},this))},setPrefix:function(e){return this.options.prefix=e,this._update(),this},addAttribution:function(e){return e?(this._attributions[e]||(this._attributions[e]=0),this._attributions[e]++,this._update(),this):this},removeAttribution:function(e){return e?(this._attributions[e]&&(this._attributions[e]--,this._update()),this):this},_update:function(){if(this._map){var e=[];for(var t in this._attributions)this._attributions[t]&&e.push(t);var n=[];this.options.prefix&&n.push(this.options.prefix),e.length&&n.push(e.join(", ")),this._container.innerHTML=n.join(' <span aria-hidden="true">|</span> ')}}});sn.mergeOptions({attributionControl:!0}),sn.addInitHook(function(){this.options.attributionControl&&(new _n).addTo(this)});var gn=function(e){return new _n(e)};an.Layers=un,an.Zoom=hn,an.Scale=fn,an.Attribution=_n,ln.layers=cn,ln.zoom=dn,ln.scale=pn,ln.attribution=gn;var yn=O.extend({initialize:function(e){this._map=e},enable:function(){return this._enabled||(this._enabled=!0,this.addHooks()),this},disable:function(){return this._enabled?(this._enabled=!1,this.removeHooks(),this):this},enabled:function(){return!!this._enabled}});yn.addTo=function(e,t){return e.addHandler(t,this),this};var vn={Events:C},bn=Fe.touch?"touchstart mousedown":"mousedown",xn=R.extend({options:{clickTolerance:3},initialize:function(e,t,n,i){f(this,i),this._element=e,this._dragStartTarget=t||e,this._preventOutline=n},enable:function(){this._enabled||(jt(this._dragStartTarget,bn,this._onDown,this),this._enabled=!0)},disable:function(){this._enabled&&(xn._dragging===this&&this.finishDrag(!0),Ut(this._dragStartTarget,bn,this._onDown,this),this._enabled=!1,this._moved=!1)},_onDown:function(e){if(this._enabled&&(this._moved=!1,!bt(this._element,"leaflet-zoom-anim")))if(e.touches&&1!==e.touches.length)xn._dragging===this&&this.finishDrag();else if(!(xn._dragging||e.shiftKey||1!==e.which&&1!==e.button&&!e.touches||(xn._dragging=this,this._preventOutline&&Nt(this._element),Mt(),st(),this._moving))){this.fire("down");var t=e.touches?e.touches[0]:e,n=Dt(this._element);this._startPoint=new M(t.clientX,t.clientY),this._startPos=Ct(this._element),this._parentScale=It(n);var i="mousedown"===e.type;jt(document,i?"mousemove":"touchmove",this._onMove,this),jt(document,i?"mouseup":"touchend touchcancel",this._onUp,this)}},_onMove:function(e){if(this._enabled)if(e.touches&&e.touches.length>1)this._moved=!0;else{var t=e.touches&&1===e.touches.length?e.touches[0]:e,n=new M(t.clientX,t.clientY)._subtract(this._startPoint);(n.x||n.y)&&(Math.abs(n.x)+Math.abs(n.y)<this.options.clickTolerance||(n.x/=this._parentScale.x,n.y/=this._parentScale.y,Kt(e),this._moved||(this.fire("dragstart"),this._moved=!0,xt(document.body,"leaflet-dragging"),this._lastTarget=e.target||e.srcElement,window.SVGElementInstance&&this._lastTarget instanceof window.SVGElementInstance&&(this._lastTarget=this._lastTarget.correspondingUseElement),xt(this._lastTarget,"leaflet-drag-target")),this._newPos=this._startPos.add(n),this._moving=!0,this._lastEvent=e,this._updatePosition()))}},_updatePosition:function(){var e={originalEvent:this._lastEvent};this.fire("predrag",e),Pt(this._element,this._newPos),this.fire("drag",e)},_onUp:function(){this._enabled&&this.finishDrag()},finishDrag:function(e){wt(document.body,"leaflet-dragging"),this._lastTarget&&(wt(this._lastTarget,"leaflet-drag-target"),this._lastTarget=null),Ut(document,"mousemove touchmove",this._onMove,this),Ut(document,"mouseup touchend touchcancel",this._onUp,this),Lt(),ot();var t=this._moved&&this._moving;this._moving=!1,xn._dragging=!1,t&&this.fire("dragend",{noInertia:e,distance:this._newPos.distanceTo(this._startPos)})}});function wn(e,t,n){var i,r,s,o,a,l,u,c,h,d=[1,4,2,8];for(r=0,u=e.length;r<u;r++)e[r]._code=zn(e[r],t);for(o=0;o<4;o++){for(c=d[o],i=[],r=0,s=(u=e.length)-1;r<u;s=r++)a=e[r],l=e[s],a._code&c?l._code&c||((h=Nn(l,a,c,t,n))._code=zn(h,t),i.push(h)):(l._code&c&&((h=Nn(l,a,c,t,n))._code=zn(h,t),i.push(h)),i.push(a));e=i}return e}function En(e,t){var n,i,r,s,o,a,l,u,c;if(!e||0===e.length)throw new Error("latlngs not passed");Fn(e)||(console.warn("latlngs are not flat! Only the first ring will be used"),e=e[0]);var h=U([0,0]),d=j(e);d.getNorthWest().distanceTo(d.getSouthWest())*d.getNorthEast().distanceTo(d.getNorthWest())<1700&&(h=An(e));var f=e.length,p=[];for(n=0;n<f;n++){var m=U(e[n]);p.push(t.project(U([m.lat-h.lat,m.lng-h.lng])))}for(a=l=u=0,n=0,i=f-1;n<f;i=n++)r=p[n],s=p[i],o=r.y*s.x-s.y*r.x,l+=(r.x+s.x)*o,u+=(r.y+s.y)*o,a+=3*o;c=0===a?p[0]:[l/a,u/a];var _=t.unproject(z(c));return U([_.lat+h.lat,_.lng+h.lng])}function An(e){for(var t=0,n=0,i=0,r=0;r<e.length;r++){var s=U(e[r]);t+=s.lat,n+=s.lng,i++}return U([t/i,n/i])}var Tn,Sn={__proto__:null,clipPolygon:wn,polygonCenter:En,centroid:An};function kn(e,t){if(!t||!e.length)return e.slice();var n=t*t;return e=Cn(e=Mn(e,n),n)}function On(e,t,n){return Math.sqrt(In(e,t,n,!0))}function Pn(e,t,n){return In(e,t,n)}function Cn(e,t){var n=e.length,i=new(typeof Uint8Array!=void 0+""?Uint8Array:Array)(n);i[0]=i[n-1]=1,Rn(e,i,t,0,n-1);var r,s=[];for(r=0;r<n;r++)i[r]&&s.push(e[r]);return s}function Rn(e,t,n,i,r){var s,o,a,l=0;for(o=i+1;o<=r-1;o++)(a=In(e[o],e[i],e[r],!0))>l&&(s=o,l=a);l>n&&(t[s]=1,Rn(e,t,n,i,s),Rn(e,t,n,s,r))}function Mn(e,t){for(var n=[e[0]],i=1,r=0,s=e.length;i<s;i++)Dn(e[i],e[r])>t&&(n.push(e[i]),r=i);return r<s-1&&n.push(e[s-1]),n}function Ln(e,t,n,i,r){var s,o,a,l=i?Tn:zn(e,n),u=zn(t,n);for(Tn=u;;){if(!(l|u))return[e,t];if(l&u)return!1;a=zn(o=Nn(e,t,s=l||u,n,r),n),s===l?(e=o,l=a):(t=o,u=a)}}function Nn(e,t,n,i,r){var s,o,a=t.x-e.x,l=t.y-e.y,u=i.min,c=i.max;return 8&n?(s=e.x+a*(c.y-e.y)/l,o=c.y):4&n?(s=e.x+a*(u.y-e.y)/l,o=u.y):2&n?(s=c.x,o=e.y+l*(c.x-e.x)/a):1&n&&(s=u.x,o=e.y+l*(u.x-e.x)/a),new M(s,o,r)}function zn(e,t){var n=0;return e.x<t.min.x?n|=1:e.x>t.max.x&&(n|=2),e.y<t.min.y?n|=4:e.y>t.max.y&&(n|=8),n}function Dn(e,t){var n=t.x-e.x,i=t.y-e.y;return n*n+i*i}function In(e,t,n,i){var r,s=t.x,o=t.y,a=n.x-s,l=n.y-o,u=a*a+l*l;return u>0&&((r=((e.x-s)*a+(e.y-o)*l)/u)>1?(s=n.x,o=n.y):r>0&&(s+=a*r,o+=l*r)),a=e.x-s,l=e.y-o,i?a*a+l*l:new M(s,o)}function Fn(e){return!g(e[0])||"object"!=typeof e[0][0]&&void 0!==e[0][0]}function jn(e){return console.warn("Deprecated use of _flat, please use L.LineUtil.isFlat instead."),Fn(e)}function Bn(e,t){var n,i,r,s,o,a,l,u;if(!e||0===e.length)throw new Error("latlngs not passed");Fn(e)||(console.warn("latlngs are not flat! Only the first ring will be used"),e=e[0]);var c=U([0,0]),h=j(e);h.getNorthWest().distanceTo(h.getSouthWest())*h.getNorthEast().distanceTo(h.getNorthWest())<1700&&(c=An(e));var d=e.length,f=[];for(n=0;n<d;n++){var p=U(e[n]);f.push(t.project(U([p.lat-c.lat,p.lng-c.lng])))}for(n=0,i=0;n<d-1;n++)i+=f[n].distanceTo(f[n+1])/2;if(0===i)u=f[0];else for(n=0,s=0;n<d-1;n++)if(o=f[n],a=f[n+1],(s+=r=o.distanceTo(a))>i){l=(s-i)/r,u=[a.x-l*(a.x-o.x),a.y-l*(a.y-o.y)];break}var m=t.unproject(z(u));return U([m.lat+c.lat,m.lng+c.lng])}var Un={__proto__:null,simplify:kn,pointToSegmentDistance:On,closestPointOnSegment:Pn,clipSegment:Ln,_getEdgeIntersection:Nn,_getBitCode:zn,_sqClosestPointOnSegment:In,isFlat:Fn,_flat:jn,polylineCenter:Bn},Vn={project:function(e){return new M(e.lng,e.lat)},unproject:function(e){return new B(e.y,e.x)},bounds:new D([-180,-90],[180,90])},Gn={R:6378137,R_MINOR:6356752.314245179,bounds:new D([-20037508.34279,-15496570.73972],[20037508.34279,18764656.23138]),project:function(e){var t=Math.PI/180,n=this.R,i=e.lat*t,r=this.R_MINOR/n,s=Math.sqrt(1-r*r),o=s*Math.sin(i),a=Math.tan(Math.PI/4-i/2)/Math.pow((1-o)/(1+o),s/2);return i=-n*Math.log(Math.max(a,1e-10)),new M(e.lng*t*n,i)},unproject:function(e){for(var t,n=180/Math.PI,i=this.R,r=this.R_MINOR/i,s=Math.sqrt(1-r*r),o=Math.exp(-e.y/i),a=Math.PI/2-2*Math.atan(o),l=0,u=.1;l<15&&Math.abs(u)>1e-7;l++)t=s*Math.sin(a),t=Math.pow((1-t)/(1+t),s/2),a+=u=Math.PI/2-2*Math.atan(o*t)-a;return new B(a*n,e.x*n/i)}},$n={__proto__:null,LonLat:Vn,Mercator:Gn,SphericalMercator:q},Zn=n({},$,{code:"EPSG:3395",projection:Gn,transformation:function(){var e=.5/(Math.PI*Gn.R);return H(e,.5,-e,.5)}()}),qn=n({},$,{code:"EPSG:4326",projection:Vn,transformation:H(1/180,1,-1/180,.5)}),Wn=n({},G,{projection:Vn,transformation:H(1,0,-1,0),scale:function(e){return Math.pow(2,e)},zoom:function(e){return Math.log(e)/Math.LN2},distance:function(e,t){var n=t.lng-e.lng,i=t.lat-e.lat;return Math.sqrt(n*n+i*i)},infinite:!0});G.Earth=$,G.EPSG3395=Zn,G.EPSG3857=K,G.EPSG900913=Y,G.EPSG4326=qn,G.Simple=Wn;var Hn=R.extend({options:{pane:"overlayPane",attribution:null,bubblingMouseEvents:!0},addTo:function(e){return e.addLayer(this),this},remove:function(){return this.removeFrom(this._map||this._mapToAdd)},removeFrom:function(e){return e&&e.removeLayer(this),this},getPane:function(e){return this._map.getPane(e?this.options[e]||e:this.options.pane)},addInteractiveTarget:function(e){return this._map._targets[o(e)]=this,this},removeInteractiveTarget:function(e){return delete this._map._targets[o(e)],this},getAttribution:function(){return this.options.attribution},_layerAdd:function(e){var t=e.target;if(t.hasLayer(this)){if(this._map=t,this._zoomAnimated=t._zoomAnimated,this.getEvents){var n=this.getEvents();t.on(n,this),this.once("remove",function(){t.off(n,this)},this)}this.onAdd(t),this.fire("add"),t.fire("layeradd",{layer:this})}}});sn.include({addLayer:function(e){if(!e._layerAdd)throw new Error("The provided object is not a Layer.");var t=o(e);return this._layers[t]||(this._layers[t]=e,e._mapToAdd=this,e.beforeAdd&&e.beforeAdd(this),this.whenReady(e._layerAdd,e)),this},removeLayer:function(e){var t=o(e);return this._layers[t]?(this._loaded&&e.onRemove(this),delete this._layers[t],this._loaded&&(this.fire("layerremove",{layer:e}),e.fire("remove")),e._map=e._mapToAdd=null,this):this},hasLayer:function(e){return o(e)in this._layers},eachLayer:function(e,t){for(var n in this._layers)e.call(t,this._layers[n]);return this},_addLayers:function(e){for(var t=0,n=(e=e?g(e)?e:[e]:[]).length;t<n;t++)this.addLayer(e[t])},_addZoomLimit:function(e){isNaN(e.options.maxZoom)&&isNaN(e.options.minZoom)||(this._zoomBoundLayers[o(e)]=e,this._updateZoomLevels())},_removeZoomLimit:function(e){var t=o(e);this._zoomBoundLayers[t]&&(delete this._zoomBoundLayers[t],this._updateZoomLevels())},_updateZoomLevels:function(){var e=1/0,t=-1/0,n=this._getZoomSpan();for(var i in this._zoomBoundLayers){var r=this._zoomBoundLayers[i].options;e=void 0===r.minZoom?e:Math.min(e,r.minZoom),t=void 0===r.maxZoom?t:Math.max(t,r.maxZoom)}this._layersMaxZoom=t===-1/0?void 0:t,this._layersMinZoom=e===1/0?void 0:e,n!==this._getZoomSpan()&&this.fire("zoomlevelschange"),void 0===this.options.maxZoom&&this._layersMaxZoom&&this.getZoom()>this._layersMaxZoom&&this.setZoom(this._layersMaxZoom),void 0===this.options.minZoom&&this._layersMinZoom&&this.getZoom()<this._layersMinZoom&&this.setZoom(this._layersMinZoom)}});var Kn=Hn.extend({initialize:function(e,t){var n,i;if(f(this,t),this._layers={},e)for(n=0,i=e.length;n<i;n++)this.addLayer(e[n])},addLayer:function(e){var t=this.getLayerId(e);return this._layers[t]=e,this._map&&this._map.addLayer(e),this},removeLayer:function(e){var t=e in this._layers?e:this.getLayerId(e);return this._map&&this._layers[t]&&this._map.removeLayer(this._layers[t]),delete this._layers[t],this},hasLayer:function(e){return("number"==typeof e?e:this.getLayerId(e))in this._layers},clearLayers:function(){return this.eachLayer(this.removeLayer,this)},invoke:function(e){var t,n,i=Array.prototype.slice.call(arguments,1);for(t in this._layers)(n=this._layers[t])[e]&&n[e].apply(n,i);return this},onAdd:function(e){this.eachLayer(e.addLayer,e)},onRemove:function(e){this.eachLayer(e.removeLayer,e)},eachLayer:function(e,t){for(var n in this._layers)e.call(t,this._layers[n]);return this},getLayer:function(e){return this._layers[e]},getLayers:function(){var e=[];return this.eachLayer(e.push,e),e},setZIndex:function(e){return this.invoke("setZIndex",e)},getLayerId:function(e){return o(e)}}),Yn=function(e,t){return new Kn(e,t)},Xn=Kn.extend({addLayer:function(e){return this.hasLayer(e)?this:(e.addEventParent(this),Kn.prototype.addLayer.call(this,e),this.fire("layeradd",{layer:e}))},removeLayer:function(e){return this.hasLayer(e)?(e in this._layers&&(e=this._layers[e]),e.removeEventParent(this),Kn.prototype.removeLayer.call(this,e),this.fire("layerremove",{layer:e})):this},setStyle:function(e){return this.invoke("setStyle",e)},bringToFront:function(){return this.invoke("bringToFront")},bringToBack:function(){return this.invoke("bringToBack")},getBounds:function(){var e=new F;for(var t in this._layers){var n=this._layers[t];e.extend(n.getBounds?n.getBounds():n.getLatLng())}return e}}),Jn=function(e,t){return new Xn(e,t)},Qn=O.extend({options:{popupAnchor:[0,0],tooltipAnchor:[0,0],crossOrigin:!1},initialize:function(e){f(this,e)},createIcon:function(e){return this._createIcon("icon",e)},createShadow:function(e){return this._createIcon("shadow",e)},_createIcon:function(e,t){var n=this._getIconUrl(e);if(!n){if("icon"===e)throw new Error("iconUrl not set in Icon options (see the docs).");return null}var i=this._createImg(n,t&&"IMG"===t.tagName?t:null);return this._setIconStyles(i,e),(this.options.crossOrigin||""===this.options.crossOrigin)&&(i.crossOrigin=!0===this.options.crossOrigin?"":this.options.crossOrigin),i},_setIconStyles:function(e,t){var n=this.options,i=n[t+"Size"];"number"==typeof i&&(i=[i,i]);var r=z(i),s=z("shadow"===t&&n.shadowAnchor||n.iconAnchor||r&&r.divideBy(2,!0));e.className="leaflet-marker-"+t+" "+(n.className||""),s&&(e.style.marginLeft=-s.x+"px",e.style.marginTop=-s.y+"px"),r&&(e.style.width=r.x+"px",e.style.height=r.y+"px")},_createImg:function(e,t){return(t=t||document.createElement("img")).src=e,t},_getIconUrl:function(e){return Fe.retina&&this.options[e+"RetinaUrl"]||this.options[e+"Url"]}});function ei(e){return new Qn(e)}var ti=Qn.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(e){return"string"!=typeof ti.imagePath&&(ti.imagePath=this._detectIconPath()),(this.options.imagePath||ti.imagePath)+Qn.prototype._getIconUrl.call(this,e)},_stripUrl:function(e){var t=function(e,t,n){var i=t.exec(e);return i&&i[n]};return(e=t(e,/^url\((['"])?(.+)\1\)$/,2))&&t(e,/^(.*)marker-icon\.png$/,1)},_detectIconPath:function(){var e=mt("div","leaflet-default-icon-path",document.body),t=pt(e,"background-image")||pt(e,"backgroundImage");if(document.body.removeChild(e),t=this._stripUrl(t))return t;var n=document.querySelector('link[href$="leaflet.css"]');return n?n.href.substring(0,n.href.length-11-1):""}}),ni=yn.extend({initialize:function(e){this._marker=e},addHooks:function(){var e=this._marker._icon;this._draggable||(this._draggable=new xn(e,e,!0)),this._draggable.on({dragstart:this._onDragStart,predrag:this._onPreDrag,drag:this._onDrag,dragend:this._onDragEnd},this).enable(),xt(e,"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&&wt(this._marker._icon,"leaflet-marker-draggable")},moved:function(){return this._draggable&&this._draggable._moved},_adjustPan:function(e){var t=this._marker,n=t._map,i=this._marker.options.autoPanSpeed,r=this._marker.options.autoPanPadding,s=Ct(t._icon),o=n.getPixelBounds(),a=n.getPixelOrigin(),l=I(o.min._subtract(a).add(r),o.max._subtract(a).subtract(r));if(!l.contains(s)){var u=z((Math.max(l.max.x,s.x)-l.max.x)/(o.max.x-l.max.x)-(Math.min(l.min.x,s.x)-l.min.x)/(o.min.x-l.min.x),(Math.max(l.max.y,s.y)-l.max.y)/(o.max.y-l.max.y)-(Math.min(l.min.y,s.y)-l.min.y)/(o.min.y-l.min.y)).multiplyBy(i);n.panBy(u,{animate:!1}),this._draggable._newPos._add(u),this._draggable._startPos._add(u),Pt(t._icon,this._draggable._newPos),this._onDrag(e),this._panRequest=T(this._adjustPan.bind(this,e))}},_onDragStart:function(){this._oldLatLng=this._marker.getLatLng(),this._marker.closePopup&&this._marker.closePopup(),this._marker.fire("movestart").fire("dragstart")},_onPreDrag:function(e){this._marker.options.autoPan&&(S(this._panRequest),this._panRequest=T(this._adjustPan.bind(this,e)))},_onDrag:function(e){var t=this._marker,n=t._shadow,i=Ct(t._icon),r=t._map.layerPointToLatLng(i);n&&Pt(n,i),t._latlng=r,e.latlng=r,e.oldLatLng=this._oldLatLng,t.fire("move",e).fire("drag",e)},_onDragEnd:function(e){S(this._panRequest),delete this._oldLatLng,this._marker.fire("moveend").fire("dragend",e)}}),ii=Hn.extend({options:{icon:new ti,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(e,t){f(this,t),this._latlng=U(e)},onAdd:function(e){this._zoomAnimated=this._zoomAnimated&&e.options.markerZoomAnimation,this._zoomAnimated&&e.on("zoomanim",this._animateZoom,this),this._initIcon(),this.update()},onRemove:function(e){this.dragging&&this.dragging.enabled()&&(this.options.draggable=!0,this.dragging.removeHooks()),delete this.dragging,this._zoomAnimated&&e.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(e){var t=this._latlng;return this._latlng=U(e),this.update(),this.fire("move",{oldLatLng:t,latlng:this._latlng})},setZIndexOffset:function(e){return this.options.zIndexOffset=e,this.update()},getIcon:function(){return this.options.icon},setIcon:function(e){return this.options.icon=e,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 e=this._map.latLngToLayerPoint(this._latlng).round();this._setPos(e)}return this},_initIcon:function(){var e=this.options,t="leaflet-zoom-"+(this._zoomAnimated?"animated":"hide"),n=e.icon.createIcon(this._icon),i=!1;n!==this._icon&&(this._icon&&this._removeIcon(),i=!0,e.title&&(n.title=e.title),"IMG"===n.tagName&&(n.alt=e.alt||"")),xt(n,t),e.keyboard&&(n.tabIndex="0",n.setAttribute("role","button")),this._icon=n,e.riseOnHover&&this.on({mouseover:this._bringToFront,mouseout:this._resetZIndex}),this.options.autoPanOnFocus&&jt(n,"focus",this._panOnFocus,this);var r=e.icon.createShadow(this._shadow),s=!1;r!==this._shadow&&(this._removeShadow(),s=!0),r&&(xt(r,t),r.alt=""),this._shadow=r,e.opacity<1&&this._updateOpacity(),i&&this.getPane().appendChild(this._icon),this._initInteraction(),r&&s&&this.getPane(e.shadowPane).appendChild(this._shadow)},_removeIcon:function(){this.options.riseOnHover&&this.off({mouseover:this._bringToFront,mouseout:this._resetZIndex}),this.options.autoPanOnFocus&&Ut(this._icon,"focus",this._panOnFocus,this),_t(this._icon),this.removeInteractiveTarget(this._icon),this._icon=null},_removeShadow:function(){this._shadow&&_t(this._shadow),this._shadow=null},_setPos:function(e){this._icon&&Pt(this._icon,e),this._shadow&&Pt(this._shadow,e),this._zIndex=e.y+this.options.zIndexOffset,this._resetZIndex()},_updateZIndex:function(e){this._icon&&(this._icon.style.zIndex=this._zIndex+e)},_animateZoom:function(e){var t=this._map._latLngToNewLayerPoint(this._latlng,e.zoom,e.center).round();this._setPos(t)},_initInteraction:function(){if(this.options.interactive&&(xt(this._icon,"leaflet-interactive"),this.addInteractiveTarget(this._icon),ni)){var e=this.options.draggable;this.dragging&&(e=this.dragging.enabled(),this.dragging.disable()),this.dragging=new ni(this),e&&this.dragging.enable()}},setOpacity:function(e){return this.options.opacity=e,this._map&&this._updateOpacity(),this},_updateOpacity:function(){var e=this.options.opacity;this._icon&&Tt(this._icon,e),this._shadow&&Tt(this._shadow,e)},_bringToFront:function(){this._updateZIndex(this.options.riseOffset)},_resetZIndex:function(){this._updateZIndex(0)},_panOnFocus:function(){var e=this._map;if(e){var t=this.options.icon.options,n=t.iconSize?z(t.iconSize):z(0,0),i=t.iconAnchor?z(t.iconAnchor):z(0,0);e.panInside(this._latlng,{paddingTopLeft:i,paddingBottomRight:n.subtract(i)})}},_getPopupAnchor:function(){return this.options.icon.options.popupAnchor},_getTooltipAnchor:function(){return this.options.icon.options.tooltipAnchor}});function ri(e,t){return new ii(e,t)}var si=Hn.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(e){this._renderer=e.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(e){return f(this,e),this._renderer&&(this._renderer._updateStyle(this),this.options.stroke&&e&&Object.prototype.hasOwnProperty.call(e,"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)}}),oi=si.extend({options:{fill:!0,radius:10},initialize:function(e,t){f(this,t),this._latlng=U(e),this._radius=this.options.radius},setLatLng:function(e){var t=this._latlng;return this._latlng=U(e),this.redraw(),this.fire("move",{oldLatLng:t,latlng:this._latlng})},getLatLng:function(){return this._latlng},setRadius:function(e){return this.options.radius=this._radius=e,this.redraw()},getRadius:function(){return this._radius},setStyle:function(e){var t=e&&e.radius||this._radius;return si.prototype.setStyle.call(this,e),this.setRadius(t),this},_project:function(){this._point=this._map.latLngToLayerPoint(this._latlng),this._updateBounds()},_updateBounds:function(){var e=this._radius,t=this._radiusY||e,n=this._clickTolerance(),i=[e+n,t+n];this._pxBounds=new D(this._point.subtract(i),this._point.add(i))},_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(e){return e.distanceTo(this._point)<=this._radius+this._clickTolerance()}});function ai(e,t){return new oi(e,t)}var li=oi.extend({initialize:function(e,t,i){if("number"==typeof t&&(t=n({},i,{radius:t})),f(this,t),this._latlng=U(e),isNaN(this.options.radius))throw new Error("Circle radius cannot be NaN");this._mRadius=this.options.radius},setRadius:function(e){return this._mRadius=e,this.redraw()},getRadius:function(){return this._mRadius},getBounds:function(){var e=[this._radius,this._radiusY||this._radius];return new F(this._map.layerPointToLatLng(this._point.subtract(e)),this._map.layerPointToLatLng(this._point.add(e)))},setStyle:si.prototype.setStyle,_project:function(){var e=this._latlng.lng,t=this._latlng.lat,n=this._map,i=n.options.crs;if(i.distance===$.distance){var r=Math.PI/180,s=this._mRadius/$.R/r,o=n.project([t+s,e]),a=n.project([t-s,e]),l=o.add(a).divideBy(2),u=n.unproject(l).lat,c=Math.acos((Math.cos(s*r)-Math.sin(t*r)*Math.sin(u*r))/(Math.cos(t*r)*Math.cos(u*r)))/r;(isNaN(c)||0===c)&&(c=s/Math.cos(Math.PI/180*t)),this._point=l.subtract(n.getPixelOrigin()),this._radius=isNaN(c)?0:l.x-n.project([u,e-c]).x,this._radiusY=l.y-o.y}else{var h=i.unproject(i.project(this._latlng).subtract([this._mRadius,0]));this._point=n.latLngToLayerPoint(this._latlng),this._radius=this._point.x-n.latLngToLayerPoint(h).x}this._updateBounds()}});function ui(e,t,n){return new li(e,t,n)}var ci=si.extend({options:{smoothFactor:1,noClip:!1},initialize:function(e,t){f(this,t),this._setLatLngs(e)},getLatLngs:function(){return this._latlngs},setLatLngs:function(e){return this._setLatLngs(e),this.redraw()},isEmpty:function(){return!this._latlngs.length},closestLayerPoint:function(e){for(var t,n,i=1/0,r=null,s=In,o=0,a=this._parts.length;o<a;o++)for(var l=this._parts[o],u=1,c=l.length;u<c;u++){var h=s(e,t=l[u-1],n=l[u],!0);h<i&&(i=h,r=s(e,t,n))}return r&&(r.distance=Math.sqrt(i)),r},getCenter:function(){if(!this._map)throw new Error("Must add layer to map before using getCenter()");return Bn(this._defaultShape(),this._map.options.crs)},getBounds:function(){return this._bounds},addLatLng:function(e,t){return t=t||this._defaultShape(),e=U(e),t.push(e),this._bounds.extend(e),this.redraw()},_setLatLngs:function(e){this._bounds=new F,this._latlngs=this._convertLatLngs(e)},_defaultShape:function(){return Fn(this._latlngs)?this._latlngs:this._latlngs[0]},_convertLatLngs:function(e){for(var t=[],n=Fn(e),i=0,r=e.length;i<r;i++)n?(t[i]=U(e[i]),this._bounds.extend(t[i])):t[i]=this._convertLatLngs(e[i]);return t},_project:function(){var e=new D;this._rings=[],this._projectLatlngs(this._latlngs,this._rings,e),this._bounds.isValid()&&e.isValid()&&(this._rawPxBounds=e,this._updateBounds())},_updateBounds:function(){var e=this._clickTolerance(),t=new M(e,e);this._rawPxBounds&&(this._pxBounds=new D([this._rawPxBounds.min.subtract(t),this._rawPxBounds.max.add(t)]))},_projectLatlngs:function(e,t,n){var i,r,s=e[0]instanceof B,o=e.length;if(s){for(r=[],i=0;i<o;i++)r[i]=this._map.latLngToLayerPoint(e[i]),n.extend(r[i]);t.push(r)}else for(i=0;i<o;i++)this._projectLatlngs(e[i],t,n)},_clipPoints:function(){var e=this._renderer._bounds;if(this._parts=[],this._pxBounds&&this._pxBounds.intersects(e))if(this.options.noClip)this._parts=this._rings;else{var t,n,i,r,s,o,a,l=this._parts;for(t=0,i=0,r=this._rings.length;t<r;t++)for(n=0,s=(a=this._rings[t]).length;n<s-1;n++)(o=Ln(a[n],a[n+1],e,n,!0))&&(l[i]=l[i]||[],l[i].push(o[0]),o[1]===a[n+1]&&n!==s-2||(l[i].push(o[1]),i++))}},_simplifyPoints:function(){for(var e=this._parts,t=this.options.smoothFactor,n=0,i=e.length;n<i;n++)e[n]=kn(e[n],t)},_update:function(){this._map&&(this._clipPoints(),this._simplifyPoints(),this._updatePath())},_updatePath:function(){this._renderer._updatePoly(this)},_containsPoint:function(e,t){var n,i,r,s,o,a,l=this._clickTolerance();if(!this._pxBounds||!this._pxBounds.contains(e))return!1;for(n=0,s=this._parts.length;n<s;n++)for(i=0,r=(o=(a=this._parts[n]).length)-1;i<o;r=i++)if((t||0!==i)&&On(e,a[r],a[i])<=l)return!0;return!1}});function hi(e,t){return new ci(e,t)}ci._flat=jn;var di=ci.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 En(this._defaultShape(),this._map.options.crs)},_convertLatLngs:function(e){var t=ci.prototype._convertLatLngs.call(this,e),n=t.length;return n>=2&&t[0]instanceof B&&t[0].equals(t[n-1])&&t.pop(),t},_setLatLngs:function(e){ci.prototype._setLatLngs.call(this,e),Fn(this._latlngs)&&(this._latlngs=[this._latlngs])},_defaultShape:function(){return Fn(this._latlngs[0])?this._latlngs[0]:this._latlngs[0][0]},_clipPoints:function(){var e=this._renderer._bounds,t=this.options.weight,n=new M(t,t);if(e=new D(e.min.subtract(n),e.max.add(n)),this._parts=[],this._pxBounds&&this._pxBounds.intersects(e))if(this.options.noClip)this._parts=this._rings;else for(var i,r=0,s=this._rings.length;r<s;r++)(i=wn(this._rings[r],e,!0)).length&&this._parts.push(i)},_updatePath:function(){this._renderer._updatePoly(this,!0)},_containsPoint:function(e){var t,n,i,r,s,o,a,l,u=!1;if(!this._pxBounds||!this._pxBounds.contains(e))return!1;for(r=0,a=this._parts.length;r<a;r++)for(s=0,o=(l=(t=this._parts[r]).length)-1;s<l;o=s++)n=t[s],i=t[o],n.y>e.y!=i.y>e.y&&e.x<(i.x-n.x)*(e.y-n.y)/(i.y-n.y)+n.x&&(u=!u);return u||ci.prototype._containsPoint.call(this,e,!0)}});function fi(e,t){return new di(e,t)}var pi=Xn.extend({initialize:function(e,t){f(this,t),this._layers={},e&&this.addData(e)},addData:function(e){var t,n,i,r=g(e)?e:e.features;if(r){for(t=0,n=r.length;t<n;t++)((i=r[t]).geometries||i.geometry||i.features||i.coordinates)&&this.addData(i);return this}var s=this.options;if(s.filter&&!s.filter(e))return this;var o=mi(e,s);return o?(o.feature=wi(e),o.defaultOptions=o.options,this.resetStyle(o),s.onEachFeature&&s.onEachFeature(e,o),this.addLayer(o)):this},resetStyle:function(e){return void 0===e?this.eachLayer(this.resetStyle,this):(e.options=n({},e.defaultOptions),this._setLayerStyle(e,this.options.style),this)},setStyle:function(e){return this.eachLayer(function(t){this._setLayerStyle(t,e)},this)},_setLayerStyle:function(e,t){e.setStyle&&("function"==typeof t&&(t=t(e.feature)),e.setStyle(t))}});function mi(e,t){var n,i,r,s,o="Feature"===e.type?e.geometry:e,a=o?o.coordinates:null,l=[],u=t&&t.pointToLayer,c=t&&t.coordsToLatLng||gi;if(!a&&!o)return null;switch(o.type){case"Point":return _i(u,e,n=c(a),t);case"MultiPoint":for(r=0,s=a.length;r<s;r++)n=c(a[r]),l.push(_i(u,e,n,t));return new Xn(l);case"LineString":case"MultiLineString":return i=yi(a,"LineString"===o.type?0:1,c),new ci(i,t);case"Polygon":case"MultiPolygon":return i=yi(a,"Polygon"===o.type?1:2,c),new di(i,t);case"GeometryCollection":for(r=0,s=o.geometries.length;r<s;r++){var h=mi({geometry:o.geometries[r],type:"Feature",properties:e.properties},t);h&&l.push(h)}return new Xn(l);case"FeatureCollection":for(r=0,s=o.features.length;r<s;r++){var d=mi(o.features[r],t);d&&l.push(d)}return new Xn(l);default:throw new Error("Invalid GeoJSON object.")}}function _i(e,t,n,i){return e?e(t,n):new ii(n,i&&i.markersInheritOptions&&i)}function gi(e){return new B(e[1],e[0],e[2])}function yi(e,t,n){for(var i,r=[],s=0,o=e.length;s<o;s++)i=t?yi(e[s],t-1,n):(n||gi)(e[s]),r.push(i);return r}function vi(e,t){return void 0!==(e=U(e)).alt?[c(e.lng,t),c(e.lat,t),c(e.alt,t)]:[c(e.lng,t),c(e.lat,t)]}function bi(e,t,n,i){for(var r=[],s=0,o=e.length;s<o;s++)r.push(t?bi(e[s],Fn(e[s])?0:t-1,n,i):vi(e[s],i));return!t&&n&&r.length>0&&r.push(r[0].slice()),r}function xi(e,t){return e.feature?n({},e.feature,{geometry:t}):wi(t)}function wi(e){return"Feature"===e.type||"FeatureCollection"===e.type?e:{type:"Feature",properties:{},geometry:e}}var Ei={toGeoJSON:function(e){return xi(this,{type:"Point",coordinates:vi(this.getLatLng(),e)})}};function Ai(e,t){return new pi(e,t)}ii.include(Ei),li.include(Ei),oi.include(Ei),ci.include({toGeoJSON:function(e){var t=!Fn(this._latlngs);return xi(this,{type:(t?"Multi":"")+"LineString",coordinates:bi(this._latlngs,t?1:0,!1,e)})}}),di.include({toGeoJSON:function(e){var t=!Fn(this._latlngs),n=t&&!Fn(this._latlngs[0]),i=bi(this._latlngs,n?2:t?1:0,!0,e);return t||(i=[i]),xi(this,{type:(n?"Multi":"")+"Polygon",coordinates:i})}}),Kn.include({toMultiPoint:function(e){var t=[];return this.eachLayer(function(n){t.push(n.toGeoJSON(e).geometry.coordinates)}),xi(this,{type:"MultiPoint",coordinates:t})},toGeoJSON:function(e){var t=this.feature&&this.feature.geometry&&this.feature.geometry.type;if("MultiPoint"===t)return this.toMultiPoint(e);var n="GeometryCollection"===t,i=[];return this.eachLayer(function(t){if(t.toGeoJSON){var r=t.toGeoJSON(e);if(n)i.push(r.geometry);else{var s=wi(r);"FeatureCollection"===s.type?i.push.apply(i,s.features):i.push(s)}}}),n?xi(this,{geometries:i,type:"GeometryCollection"}):{type:"FeatureCollection",features:i}}});var Ti=Ai,Si=Hn.extend({options:{opacity:1,alt:"",interactive:!1,crossOrigin:!1,errorOverlayUrl:"",zIndex:1,className:""},initialize:function(e,t,n){this._url=e,this._bounds=j(t),f(this,n)},onAdd:function(){this._image||(this._initImage(),this.options.opacity<1&&this._updateOpacity()),this.options.interactive&&(xt(this._image,"leaflet-interactive"),this.addInteractiveTarget(this._image)),this.getPane().appendChild(this._image),this._reset()},onRemove:function(){_t(this._image),this.options.interactive&&this.removeInteractiveTarget(this._image)},setOpacity:function(e){return this.options.opacity=e,this._image&&this._updateOpacity(),this},setStyle:function(e){return e.opacity&&this.setOpacity(e.opacity),this},bringToFront:function(){return this._map&&yt(this._image),this},bringToBack:function(){return this._map&&vt(this._image),this},setUrl:function(e){return this._url=e,this._image&&(this._image.src=e),this},setBounds:function(e){return this._bounds=j(e),this._map&&this._reset(),this},getEvents:function(){var e={zoom:this._reset,viewreset:this._reset};return this._zoomAnimated&&(e.zoomanim=this._animateZoom),e},setZIndex:function(e){return this.options.zIndex=e,this._updateZIndex(),this},getBounds:function(){return this._bounds},getElement:function(){return this._image},_initImage:function(){var e="IMG"===this._url.tagName,t=this._image=e?this._url:mt("img");xt(t,"leaflet-image-layer"),this._zoomAnimated&&xt(t,"leaflet-zoom-animated"),this.options.className&&xt(t,this.options.className),t.onselectstart=u,t.onmousemove=u,t.onload=r(this.fire,this,"load"),t.onerror=r(this._overlayOnError,this,"error"),(this.options.crossOrigin||""===this.options.crossOrigin)&&(t.crossOrigin=!0===this.options.crossOrigin?"":this.options.crossOrigin),this.options.zIndex&&this._updateZIndex(),e?this._url=t.src:(t.src=this._url,t.alt=this.options.alt)},_animateZoom:function(e){var t=this._map.getZoomScale(e.zoom),n=this._map._latLngBoundsToNewLayerBounds(this._bounds,e.zoom,e.center).min;Ot(this._image,n,t)},_reset:function(){var e=this._image,t=new D(this._map.latLngToLayerPoint(this._bounds.getNorthWest()),this._map.latLngToLayerPoint(this._bounds.getSouthEast())),n=t.getSize();Pt(e,t.min),e.style.width=n.x+"px",e.style.height=n.y+"px"},_updateOpacity:function(){Tt(this._image,this.options.opacity)},_updateZIndex:function(){this._image&&void 0!==this.options.zIndex&&null!==this.options.zIndex&&(this._image.style.zIndex=this.options.zIndex)},_overlayOnError:function(){this.fire("error");var e=this.options.errorOverlayUrl;e&&this._url!==e&&(this._url=e,this._image.src=e)},getCenter:function(){return this._bounds.getCenter()}}),ki=function(e,t,n){return new Si(e,t,n)},Oi=Si.extend({options:{autoplay:!0,loop:!0,keepAspectRatio:!0,muted:!1,playsInline:!0},_initImage:function(){var e="VIDEO"===this._url.tagName,t=this._image=e?this._url:mt("video");if(xt(t,"leaflet-image-layer"),this._zoomAnimated&&xt(t,"leaflet-zoom-animated"),this.options.className&&xt(t,this.options.className),t.onselectstart=u,t.onmousemove=u,t.onloadeddata=r(this.fire,this,"load"),e){for(var n=t.getElementsByTagName("source"),i=[],s=0;s<n.length;s++)i.push(n[s].src);this._url=n.length>0?i:[t.src]}else{g(this._url)||(this._url=[this._url]),!this.options.keepAspectRatio&&Object.prototype.hasOwnProperty.call(t.style,"objectFit")&&(t.style.objectFit="fill"),t.autoplay=!!this.options.autoplay,t.loop=!!this.options.loop,t.muted=!!this.options.muted,t.playsInline=!!this.options.playsInline;for(var o=0;o<this._url.length;o++){var a=mt("source");a.src=this._url[o],t.appendChild(a)}}}});function Pi(e,t,n){return new Oi(e,t,n)}var Ci=Si.extend({_initImage:function(){var e=this._image=this._url;xt(e,"leaflet-image-layer"),this._zoomAnimated&&xt(e,"leaflet-zoom-animated"),this.options.className&&xt(e,this.options.className),e.onselectstart=u,e.onmousemove=u}});function Ri(e,t,n){return new Ci(e,t,n)}var Mi=Hn.extend({options:{interactive:!1,offset:[0,0],className:"",pane:void 0,content:""},initialize:function(e,t){e&&(e instanceof B||g(e))?(this._latlng=U(e),f(this,t)):(f(this,e),this._source=t),this.options.content&&(this._content=this.options.content)},openOn:function(e){return(e=arguments.length?e:this._source._map).hasLayer(this)||e.addLayer(this),this},close:function(){return this._map&&this._map.removeLayer(this),this},toggle:function(e){return this._map?this.close():(arguments.length?this._source=e:e=this._source,this._prepareOpen(),this.openOn(e._map)),this},onAdd:function(e){this._zoomAnimated=e._zoomAnimated,this._container||this._initLayout(),e._fadeAnimated&&Tt(this._container,0),clearTimeout(this._removeTimeout),this.getPane().appendChild(this._container),this.update(),e._fadeAnimated&&Tt(this._container,1),this.bringToFront(),this.options.interactive&&(xt(this._container,"leaflet-interactive"),this.addInteractiveTarget(this._container))},onRemove:function(e){e._fadeAnimated?(Tt(this._container,0),this._removeTimeout=setTimeout(r(_t,void 0,this._container),200)):_t(this._container),this.options.interactive&&(wt(this._container,"leaflet-interactive"),this.removeInteractiveTarget(this._container))},getLatLng:function(){return this._latlng},setLatLng:function(e){return this._latlng=U(e),this._map&&(this._updatePosition(),this._adjustPan()),this},getContent:function(){return this._content},setContent:function(e){return this._content=e,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 e={zoom:this._updatePosition,viewreset:this._updatePosition};return this._zoomAnimated&&(e.zoomanim=this._animateZoom),e},isOpen:function(){return!!this._map&&this._map.hasLayer(this)},bringToFront:function(){return this._map&&yt(this._container),this},bringToBack:function(){return this._map&&vt(this._container),this},_prepareOpen:function(e){var t=this._source;if(!t._map)return!1;if(t instanceof Xn){t=null;var n=this._source._layers;for(var i in n)if(n[i]._map){t=n[i];break}if(!t)return!1;this._source=t}if(!e)if(t.getCenter)e=t.getCenter();else if(t.getLatLng)e=t.getLatLng();else{if(!t.getBounds)throw new Error("Unable to get source layer LatLng.");e=t.getBounds().getCenter()}return this.setLatLng(e),this._map&&this.update(),!0},_updateContent:function(){if(this._content){var e=this._contentNode,t="function"==typeof this._content?this._content(this._source||this):this._content;if("string"==typeof t)e.innerHTML=t;else{for(;e.hasChildNodes();)e.removeChild(e.firstChild);e.appendChild(t)}this.fire("contentupdate")}},_updatePosition:function(){if(this._map){var e=this._map.latLngToLayerPoint(this._latlng),t=z(this.options.offset),n=this._getAnchor();this._zoomAnimated?Pt(this._container,e.add(n)):t=t.add(e).add(n);var i=this._containerBottom=-t.y,r=this._containerLeft=-Math.round(this._containerWidth/2)+t.x;this._container.style.bottom=i+"px",this._container.style.left=r+"px"}},_getAnchor:function(){return[0,0]}});sn.include({_initOverlay:function(e,t,n,i){var r=t;return r instanceof e||(r=new e(i).setContent(t)),n&&r.setLatLng(n),r}}),Hn.include({_initOverlay:function(e,t,n,i){var r=n;return r instanceof e?(f(r,i),r._source=this):(r=t&&!i?t:new e(i,this)).setContent(n),r}});var Li=Mi.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(e){return!(e=arguments.length?e:this._source._map).hasLayer(this)&&e._popup&&e._popup.options.autoClose&&e.removeLayer(e._popup),e._popup=this,Mi.prototype.openOn.call(this,e)},onAdd:function(e){Mi.prototype.onAdd.call(this,e),e.fire("popupopen",{popup:this}),this._source&&(this._source.fire("popupopen",{popup:this},!0),this._source instanceof si||this._source.on("preclick",qt))},onRemove:function(e){Mi.prototype.onRemove.call(this,e),e.fire("popupclose",{popup:this}),this._source&&(this._source.fire("popupclose",{popup:this},!0),this._source instanceof si||this._source.off("preclick",qt))},getEvents:function(){var e=Mi.prototype.getEvents.call(this);return(void 0!==this.options.closeOnClick?this.options.closeOnClick:this._map.options.closePopupOnClick)&&(e.preclick=this.close),this.options.keepInView&&(e.moveend=this._adjustPan),e},_initLayout:function(){var e="leaflet-popup",t=this._container=mt("div",e+" "+(this.options.className||"")+" leaflet-zoom-animated"),n=this._wrapper=mt("div",e+"-content-wrapper",t);if(this._contentNode=mt("div",e+"-content",n),Ht(t),Wt(this._contentNode),jt(t,"contextmenu",qt),this._tipContainer=mt("div",e+"-tip-container",t),this._tip=mt("div",e+"-tip",this._tipContainer),this.options.closeButton){var i=this._closeButton=mt("a",e+"-close-button",t);i.setAttribute("role","button"),i.setAttribute("aria-label","Close popup"),i.href="#close",i.innerHTML='<span aria-hidden="true">×</span>',jt(i,"click",function(e){Kt(e),this.close()},this)}},_updateLayout:function(){var e=this._contentNode,t=e.style;t.width="",t.whiteSpace="nowrap";var n=e.offsetWidth;n=Math.min(n,this.options.maxWidth),n=Math.max(n,this.options.minWidth),t.width=n+1+"px",t.whiteSpace="",t.height="";var i=e.offsetHeight,r=this.options.maxHeight,s="leaflet-popup-scrolled";r&&i>r?(t.height=r+"px",xt(e,s)):wt(e,s),this._containerWidth=this._container.offsetWidth},_animateZoom:function(e){var t=this._map._latLngToNewLayerPoint(this._latlng,e.zoom,e.center),n=this._getAnchor();Pt(this._container,t.add(n))},_adjustPan:function(){if(this.options.autoPan)if(this._map._panAnim&&this._map._panAnim.stop(),this._autopanning)this._autopanning=!1;else{var e=this._map,t=parseInt(pt(this._container,"marginBottom"),10)||0,n=this._container.offsetHeight+t,i=this._containerWidth,r=new M(this._containerLeft,-n-this._containerBottom);r._add(Ct(this._container));var s=e.layerPointToContainerPoint(r),o=z(this.options.autoPanPadding),a=z(this.options.autoPanPaddingTopLeft||o),l=z(this.options.autoPanPaddingBottomRight||o),u=e.getSize(),c=0,h=0;s.x+i+l.x>u.x&&(c=s.x+i-u.x+l.x),s.x-c-a.x<0&&(c=s.x-a.x),s.y+n+l.y>u.y&&(h=s.y+n-u.y+l.y),s.y-h-a.y<0&&(h=s.y-a.y),(c||h)&&(this.options.keepInView&&(this._autopanning=!0),e.fire("autopanstart").panBy([c,h]))}},_getAnchor:function(){return z(this._source&&this._source._getPopupAnchor?this._source._getPopupAnchor():[0,0])}}),Ni=function(e,t){return new Li(e,t)};sn.mergeOptions({closePopupOnClick:!0}),sn.include({openPopup:function(e,t,n){return this._initOverlay(Li,e,t,n).openOn(this),this},closePopup:function(e){return(e=arguments.length?e:this._popup)&&e.close(),this}}),Hn.include({bindPopup:function(e,t){return this._popup=this._initOverlay(Li,this._popup,e,t),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(e){return this._popup&&(this instanceof Xn||(this._popup._source=this),this._popup._prepareOpen(e||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()},setPopupContent:function(e){return this._popup&&this._popup.setContent(e),this},getPopup:function(){return this._popup},_openPopup:function(e){if(this._popup&&this._map){Yt(e);var t=e.layer||e.target;this._popup._source!==t||t instanceof si?(this._popup._source=t,this.openPopup(e.latlng)):this._map.hasLayer(this._popup)?this.closePopup():this.openPopup(e.latlng)}},_movePopup:function(e){this._popup.setLatLng(e.latlng)},_onKeyPress:function(e){13===e.originalEvent.keyCode&&this._openPopup(e)}});var zi=Mi.extend({options:{pane:"tooltipPane",offset:[0,0],direction:"auto",permanent:!1,sticky:!1,opacity:.9},onAdd:function(e){Mi.prototype.onAdd.call(this,e),this.setOpacity(this.options.opacity),e.fire("tooltipopen",{tooltip:this}),this._source&&(this.addEventParent(this._source),this._source.fire("tooltipopen",{tooltip:this},!0))},onRemove:function(e){Mi.prototype.onRemove.call(this,e),e.fire("tooltipclose",{tooltip:this}),this._source&&(this.removeEventParent(this._source),this._source.fire("tooltipclose",{tooltip:this},!0))},getEvents:function(){var e=Mi.prototype.getEvents.call(this);return this.options.permanent||(e.preclick=this.close),e},_initLayout:function(){var e="leaflet-tooltip "+(this.options.className||"")+" leaflet-zoom-"+(this._zoomAnimated?"animated":"hide");this._contentNode=this._container=mt("div",e),this._container.setAttribute("role","tooltip"),this._container.setAttribute("id","leaflet-tooltip-"+o(this))},_updateLayout:function(){},_adjustPan:function(){},_setPosition:function(e){var t,n,i=this._map,r=this._container,s=i.latLngToContainerPoint(i.getCenter()),o=i.layerPointToContainerPoint(e),a=this.options.direction,l=r.offsetWidth,u=r.offsetHeight,c=z(this.options.offset),h=this._getAnchor();"top"===a?(t=l/2,n=u):"bottom"===a?(t=l/2,n=0):"center"===a?(t=l/2,n=u/2):"right"===a?(t=0,n=u/2):"left"===a?(t=l,n=u/2):o.x<s.x?(a="right",t=0,n=u/2):(a="left",t=l+2*(c.x+h.x),n=u/2),e=e.subtract(z(t,n,!0)).add(c).add(h),wt(r,"leaflet-tooltip-right"),wt(r,"leaflet-tooltip-left"),wt(r,"leaflet-tooltip-top"),wt(r,"leaflet-tooltip-bottom"),xt(r,"leaflet-tooltip-"+a),Pt(r,e)},_updatePosition:function(){var e=this._map.latLngToLayerPoint(this._latlng);this._setPosition(e)},setOpacity:function(e){this.options.opacity=e,this._container&&Tt(this._container,e)},_animateZoom:function(e){var t=this._map._latLngToNewLayerPoint(this._latlng,e.zoom,e.center);this._setPosition(t)},_getAnchor:function(){return z(this._source&&this._source._getTooltipAnchor&&!this.options.sticky?this._source._getTooltipAnchor():[0,0])}}),Di=function(e,t){return new zi(e,t)};sn.include({openTooltip:function(e,t,n){return this._initOverlay(zi,e,t,n).openOn(this),this},closeTooltip:function(e){return e.close(),this}}),Hn.include({bindTooltip:function(e,t){return this._tooltip&&this.isTooltipOpen()&&this.unbindTooltip(),this._tooltip=this._initOverlay(zi,this._tooltip,e,t),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(e){if(e||!this._tooltipHandlersAdded){var t=e?"off":"on",n={remove:this.closeTooltip,move:this._moveTooltip};this._tooltip.options.permanent?n.add=this._openTooltip:(n.mouseover=this._openTooltip,n.mouseout=this.closeTooltip,n.click=this._openTooltip,this._map?this._addFocusListeners():n.add=this._addFocusListeners),this._tooltip.options.sticky&&(n.mousemove=this._moveTooltip),this[t](n),this._tooltipHandlersAdded=!e}},openTooltip:function(e){return this._tooltip&&(this instanceof Xn||(this._tooltip._source=this),this._tooltip._prepareOpen(e)&&(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(e){return this._tooltip&&this._tooltip.setContent(e),this},getTooltip:function(){return this._tooltip},_addFocusListeners:function(){this.getElement?this._addFocusListenersOnLayer(this):this.eachLayer&&this.eachLayer(this._addFocusListenersOnLayer,this)},_addFocusListenersOnLayer:function(e){var t="function"==typeof e.getElement&&e.getElement();t&&(jt(t,"focus",function(){this._tooltip._source=e,this.openTooltip()},this),jt(t,"blur",this.closeTooltip,this))},_setAriaDescribedByOnLayer:function(e){var t="function"==typeof e.getElement&&e.getElement();t&&t.setAttribute("aria-describedby",this._tooltip._container.id)},_openTooltip:function(e){if(this._tooltip&&this._map)if(this._map.dragging&&this._map.dragging.moving()&&!this._openOnceFlag){this._openOnceFlag=!0;var t=this;this._map.once("moveend",function(){t._openOnceFlag=!1,t._openTooltip(e)})}else this._tooltip._source=e.layer||e.target,this.openTooltip(this._tooltip.options.sticky?e.latlng:void 0)},_moveTooltip:function(e){var t,n,i=e.latlng;this._tooltip.options.sticky&&e.originalEvent&&(t=this._map.mouseEventToContainerPoint(e.originalEvent),n=this._map.containerPointToLayerPoint(t),i=this._map.layerPointToLatLng(n)),this._tooltip.setLatLng(i)}});var Ii=Qn.extend({options:{iconSize:[12,12],html:!1,bgPos:null,className:"leaflet-div-icon"},createIcon:function(e){var t=e&&"DIV"===e.tagName?e:document.createElement("div"),n=this.options;if(n.html instanceof Element?(gt(t),t.appendChild(n.html)):t.innerHTML=!1!==n.html?n.html:"",n.bgPos){var i=z(n.bgPos);t.style.backgroundPosition=-i.x+"px "+-i.y+"px"}return this._setIconStyles(t,"icon"),t},createShadow:function(){return null}});function Fi(e){return new Ii(e)}Qn.Default=ti;var ji=Hn.extend({options:{tileSize:256,opacity:1,updateWhenIdle:Fe.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(e){f(this,e)},onAdd:function(){this._initContainer(),this._levels={},this._tiles={},this._resetView()},beforeAdd:function(e){e._addZoomLimit(this)},onRemove:function(e){this._removeAllTiles(),_t(this._container),e._removeZoomLimit(this),this._container=null,this._tileZoom=void 0},bringToFront:function(){return this._map&&(yt(this._container),this._setAutoZIndex(Math.max)),this},bringToBack:function(){return this._map&&(vt(this._container),this._setAutoZIndex(Math.min)),this},getContainer:function(){return this._container},setOpacity:function(e){return this.options.opacity=e,this._updateOpacity(),this},setZIndex:function(e){return this.options.zIndex=e,this._updateZIndex(),this},isLoading:function(){return this._loading},redraw:function(){if(this._map){this._removeAllTiles();var e=this._clampZoom(this._map.getZoom());e!==this._tileZoom&&(this._tileZoom=e,this._updateLevels()),this._update()}return this},getEvents:function(){var e={viewprereset:this._invalidateAll,viewreset:this._resetView,zoom:this._resetView,moveend:this._onMoveEnd};return this.options.updateWhenIdle||(this._onMove||(this._onMove=a(this._onMoveEnd,this.options.updateInterval,this)),e.move=this._onMove),this._zoomAnimated&&(e.zoomanim=this._animateZoom),e},createTile:function(){return document.createElement("div")},getTileSize:function(){var e=this.options.tileSize;return e instanceof M?e:new M(e,e)},_updateZIndex:function(){this._container&&void 0!==this.options.zIndex&&null!==this.options.zIndex&&(this._container.style.zIndex=this.options.zIndex)},_setAutoZIndex:function(e){for(var t,n=this.getPane().children,i=-e(-1/0,1/0),r=0,s=n.length;r<s;r++)t=n[r].style.zIndex,n[r]!==this._container&&t&&(i=e(i,+t));isFinite(i)&&(this.options.zIndex=i+e(-1,1),this._updateZIndex())},_updateOpacity:function(){if(this._map&&!Fe.ielt9){Tt(this._container,this.options.opacity);var e=+new Date,t=!1,n=!1;for(var i in this._tiles){var r=this._tiles[i];if(r.current&&r.loaded){var s=Math.min(1,(e-r.loaded)/200);Tt(r.el,s),s<1?t=!0:(r.active?n=!0:this._onOpaqueTile(r),r.active=!0)}}n&&!this._noPrune&&this._pruneTiles(),t&&(S(this._fadeFrame),this._fadeFrame=T(this._updateOpacity,this))}},_onOpaqueTile:u,_initContainer:function(){this._container||(this._container=mt("div","leaflet-layer "+(this.options.className||"")),this._updateZIndex(),this.options.opacity<1&&this._updateOpacity(),this.getPane().appendChild(this._container))},_updateLevels:function(){var e=this._tileZoom,t=this.options.maxZoom;if(void 0!==e){for(var n in this._levels)n=Number(n),this._levels[n].el.children.length||n===e?(this._levels[n].el.style.zIndex=t-Math.abs(e-n),this._onUpdateLevel(n)):(_t(this._levels[n].el),this._removeTilesAtZoom(n),this._onRemoveLevel(n),delete this._levels[n]);var i=this._levels[e],r=this._map;return i||((i=this._levels[e]={}).el=mt("div","leaflet-tile-container leaflet-zoom-animated",this._container),i.el.style.zIndex=t,i.origin=r.project(r.unproject(r.getPixelOrigin()),e).round(),i.zoom=e,this._setZoomTransform(i,r.getCenter(),r.getZoom()),u(i.el.offsetWidth),this._onCreateLevel(i)),this._level=i,i}},_onUpdateLevel:u,_onRemoveLevel:u,_onCreateLevel:u,_pruneTiles:function(){if(this._map){var e,t,n=this._map.getZoom();if(n>this.options.maxZoom||n<this.options.minZoom)this._removeAllTiles();else{for(e in this._tiles)(t=this._tiles[e]).retain=t.current;for(e in this._tiles)if((t=this._tiles[e]).current&&!t.active){var i=t.coords;this._retainParent(i.x,i.y,i.z,i.z-5)||this._retainChildren(i.x,i.y,i.z,i.z+2)}for(e in this._tiles)this._tiles[e].retain||this._removeTile(e)}}},_removeTilesAtZoom:function(e){for(var t in this._tiles)this._tiles[t].coords.z===e&&this._removeTile(t)},_removeAllTiles:function(){for(var e in this._tiles)this._removeTile(e)},_invalidateAll:function(){for(var e in this._levels)_t(this._levels[e].el),this._onRemoveLevel(Number(e)),delete this._levels[e];this._removeAllTiles(),this._tileZoom=void 0},_retainParent:function(e,t,n,i){var r=Math.floor(e/2),s=Math.floor(t/2),o=n-1,a=new M(+r,+s);a.z=+o;var l=this._tileCoordsToKey(a),u=this._tiles[l];return u&&u.active?(u.retain=!0,!0):(u&&u.loaded&&(u.retain=!0),o>i&&this._retainParent(r,s,o,i))},_retainChildren:function(e,t,n,i){for(var r=2*e;r<2*e+2;r++)for(var s=2*t;s<2*t+2;s++){var o=new M(r,s);o.z=n+1;var a=this._tileCoordsToKey(o),l=this._tiles[a];l&&l.active?l.retain=!0:(l&&l.loaded&&(l.retain=!0),n+1<i&&this._retainChildren(r,s,n+1,i))}},_resetView:function(e){var t=e&&(e.pinch||e.flyTo);this._setView(this._map.getCenter(),this._map.getZoom(),t,t)},_animateZoom:function(e){this._setView(e.center,e.zoom,!0,e.noUpdate)},_clampZoom:function(e){var t=this.options;return void 0!==t.minNativeZoom&&e<t.minNativeZoom?t.minNativeZoom:void 0!==t.maxNativeZoom&&t.maxNativeZoom<e?t.maxNativeZoom:e},_setView:function(e,t,n,i){var r=Math.round(t);r=void 0!==this.options.maxZoom&&r>this.options.maxZoom||void 0!==this.options.minZoom&&r<this.options.minZoom?void 0:this._clampZoom(r);var s=this.options.updateWhenZooming&&r!==this._tileZoom;i&&!s||(this._tileZoom=r,this._abortLoading&&this._abortLoading(),this._updateLevels(),this._resetGrid(),void 0!==r&&this._update(e),n||this._pruneTiles(),this._noPrune=!!n),this._setZoomTransforms(e,t)},_setZoomTransforms:function(e,t){for(var n in this._levels)this._setZoomTransform(this._levels[n],e,t)},_setZoomTransform:function(e,t,n){var i=this._map.getZoomScale(n,e.zoom),r=e.origin.multiplyBy(i).subtract(this._map._getNewPixelOrigin(t,n)).round();Fe.any3d?Ot(e.el,r,i):Pt(e.el,r)},_resetGrid:function(){var e=this._map,t=e.options.crs,n=this._tileSize=this.getTileSize(),i=this._tileZoom,r=this._map.getPixelWorldBounds(this._tileZoom);r&&(this._globalTileRange=this._pxBoundsToTileRange(r)),this._wrapX=t.wrapLng&&!this.options.noWrap&&[Math.floor(e.project([0,t.wrapLng[0]],i).x/n.x),Math.ceil(e.project([0,t.wrapLng[1]],i).x/n.y)],this._wrapY=t.wrapLat&&!this.options.noWrap&&[Math.floor(e.project([t.wrapLat[0],0],i).y/n.x),Math.ceil(e.project([t.wrapLat[1],0],i).y/n.y)]},_onMoveEnd:function(){this._map&&!this._map._animatingZoom&&this._update()},_getTiledPixelBounds:function(e){var t=this._map,n=t._animatingZoom?Math.max(t._animateToZoom,t.getZoom()):t.getZoom(),i=t.getZoomScale(n,this._tileZoom),r=t.project(e,this._tileZoom).floor(),s=t.getSize().divideBy(2*i);return new D(r.subtract(s),r.add(s))},_update:function(e){var t=this._map;if(t){var n=this._clampZoom(t.getZoom());if(void 0===e&&(e=t.getCenter()),void 0!==this._tileZoom){var i=this._getTiledPixelBounds(e),r=this._pxBoundsToTileRange(i),s=r.getCenter(),o=[],a=this.options.keepBuffer,l=new D(r.getBottomLeft().subtract([a,-a]),r.getTopRight().add([a,-a]));if(!(isFinite(r.min.x)&&isFinite(r.min.y)&&isFinite(r.max.x)&&isFinite(r.max.y)))throw new Error("Attempted to load an infinite number of tiles");for(var u in this._tiles){var c=this._tiles[u].coords;c.z===this._tileZoom&&l.contains(new M(c.x,c.y))||(this._tiles[u].current=!1)}if(Math.abs(n-this._tileZoom)>1)this._setView(e,n);else{for(var h=r.min.y;h<=r.max.y;h++)for(var d=r.min.x;d<=r.max.x;d++){var f=new M(d,h);if(f.z=this._tileZoom,this._isValidTile(f)){var p=this._tiles[this._tileCoordsToKey(f)];p?p.current=!0:o.push(f)}}if(o.sort(function(e,t){return e.distanceTo(s)-t.distanceTo(s)}),0!==o.length){this._loading||(this._loading=!0,this.fire("loading"));var m=document.createDocumentFragment();for(d=0;d<o.length;d++)this._addTile(o[d],m);this._level.el.appendChild(m)}}}}},_isValidTile:function(e){var t=this._map.options.crs;if(!t.infinite){var n=this._globalTileRange;if(!t.wrapLng&&(e.x<n.min.x||e.x>n.max.x)||!t.wrapLat&&(e.y<n.min.y||e.y>n.max.y))return!1}if(!this.options.bounds)return!0;var i=this._tileCoordsToBounds(e);return j(this.options.bounds).overlaps(i)},_keyToBounds:function(e){return this._tileCoordsToBounds(this._keyToTileCoords(e))},_tileCoordsToNwSe:function(e){var t=this._map,n=this.getTileSize(),i=e.scaleBy(n),r=i.add(n);return[t.unproject(i,e.z),t.unproject(r,e.z)]},_tileCoordsToBounds:function(e){var t=this._tileCoordsToNwSe(e),n=new F(t[0],t[1]);return this.options.noWrap||(n=this._map.wrapLatLngBounds(n)),n},_tileCoordsToKey:function(e){return e.x+":"+e.y+":"+e.z},_keyToTileCoords:function(e){var t=e.split(":"),n=new M(+t[0],+t[1]);return n.z=+t[2],n},_removeTile:function(e){var t=this._tiles[e];t&&(_t(t.el),delete this._tiles[e],this.fire("tileunload",{tile:t.el,coords:this._keyToTileCoords(e)}))},_initTile:function(e){xt(e,"leaflet-tile");var t=this.getTileSize();e.style.width=t.x+"px",e.style.height=t.y+"px",e.onselectstart=u,e.onmousemove=u,Fe.ielt9&&this.options.opacity<1&&Tt(e,this.options.opacity)},_addTile:function(e,t){var n=this._getTilePos(e),i=this._tileCoordsToKey(e),s=this.createTile(this._wrapCoords(e),r(this._tileReady,this,e));this._initTile(s),this.createTile.length<2&&T(r(this._tileReady,this,e,null,s)),Pt(s,n),this._tiles[i]={el:s,coords:e,current:!0},t.appendChild(s),this.fire("tileloadstart",{tile:s,coords:e})},_tileReady:function(e,t,n){t&&this.fire("tileerror",{error:t,tile:n,coords:e});var i=this._tileCoordsToKey(e);(n=this._tiles[i])&&(n.loaded=+new Date,this._map._fadeAnimated?(Tt(n.el,0),S(this._fadeFrame),this._fadeFrame=T(this._updateOpacity,this)):(n.active=!0,this._pruneTiles()),t||(xt(n.el,"leaflet-tile-loaded"),this.fire("tileload",{tile:n.el,coords:e})),this._noTilesToLoad()&&(this._loading=!1,this.fire("load"),Fe.ielt9||!this._map._fadeAnimated?T(this._pruneTiles,this):setTimeout(r(this._pruneTiles,this),250)))},_getTilePos:function(e){return e.scaleBy(this.getTileSize()).subtract(this._level.origin)},_wrapCoords:function(e){var t=new M(this._wrapX?l(e.x,this._wrapX):e.x,this._wrapY?l(e.y,this._wrapY):e.y);return t.z=e.z,t},_pxBoundsToTileRange:function(e){var t=this.getTileSize();return new D(e.min.unscaleBy(t).floor(),e.max.unscaleBy(t).ceil().subtract([1,1]))},_noTilesToLoad:function(){for(var e in this._tiles)if(!this._tiles[e].loaded)return!1;return!0}});function Bi(e){return new ji(e)}var Ui=ji.extend({options:{minZoom:0,maxZoom:18,subdomains:"abc",errorTileUrl:"",zoomOffset:0,tms:!1,zoomReverse:!1,detectRetina:!1,crossOrigin:!1,referrerPolicy:!1},initialize:function(e,t){this._url=e,(t=f(this,t)).detectRetina&&Fe.retina&&t.maxZoom>0?(t.tileSize=Math.floor(t.tileSize/2),t.zoomReverse?(t.zoomOffset--,t.minZoom=Math.min(t.maxZoom,t.minZoom+1)):(t.zoomOffset++,t.maxZoom=Math.max(t.minZoom,t.maxZoom-1)),t.minZoom=Math.max(0,t.minZoom)):t.zoomReverse?t.minZoom=Math.min(t.maxZoom,t.minZoom):t.maxZoom=Math.max(t.minZoom,t.maxZoom),"string"==typeof t.subdomains&&(t.subdomains=t.subdomains.split("")),this.on("tileunload",this._onTileRemove)},setUrl:function(e,t){return this._url===e&&void 0===t&&(t=!0),this._url=e,t||this.redraw(),this},createTile:function(e,t){var n=document.createElement("img");return jt(n,"load",r(this._tileOnLoad,this,t,n)),jt(n,"error",r(this._tileOnError,this,t,n)),(this.options.crossOrigin||""===this.options.crossOrigin)&&(n.crossOrigin=!0===this.options.crossOrigin?"":this.options.crossOrigin),"string"==typeof this.options.referrerPolicy&&(n.referrerPolicy=this.options.referrerPolicy),n.alt="",n.src=this.getTileUrl(e),n},getTileUrl:function(e){var t={r:Fe.retina?"@2x":"",s:this._getSubdomain(e),x:e.x,y:e.y,z:this._getZoomForUrl()};if(this._map&&!this._map.options.crs.infinite){var i=this._globalTileRange.max.y-e.y;this.options.tms&&(t.y=i),t["-y"]=i}return _(this._url,n(t,this.options))},_tileOnLoad:function(e,t){Fe.ielt9?setTimeout(r(e,this,null,t),0):e(null,t)},_tileOnError:function(e,t,n){var i=this.options.errorTileUrl;i&&t.getAttribute("src")!==i&&(t.src=i),e(n,t)},_onTileRemove:function(e){e.tile.onload=null},_getZoomForUrl:function(){var e=this._tileZoom,t=this.options.maxZoom;return this.options.zoomReverse&&(e=t-e),e+this.options.zoomOffset},_getSubdomain:function(e){var t=Math.abs(e.x+e.y)%this.options.subdomains.length;return this.options.subdomains[t]},_abortLoading:function(){var e,t;for(e in this._tiles)if(this._tiles[e].coords.z!==this._tileZoom&&((t=this._tiles[e].el).onload=u,t.onerror=u,!t.complete)){t.src=v;var n=this._tiles[e].coords;_t(t),delete this._tiles[e],this.fire("tileabort",{tile:t,coords:n})}},_removeTile:function(e){var t=this._tiles[e];if(t)return t.el.setAttribute("src",v),ji.prototype._removeTile.call(this,e)},_tileReady:function(e,t,n){if(this._map&&(!n||n.getAttribute("src")!==v))return ji.prototype._tileReady.call(this,e,t,n)}});function Vi(e,t){return new Ui(e,t)}var Gi=Ui.extend({defaultWmsParams:{service:"WMS",request:"GetMap",layers:"",styles:"",format:"image/jpeg",transparent:!1,version:"1.1.1"},options:{crs:null,uppercase:!1},initialize:function(e,t){this._url=e;var i=n({},this.defaultWmsParams);for(var r in t)r in this.options||(i[r]=t[r]);var s=(t=f(this,t)).detectRetina&&Fe.retina?2:1,o=this.getTileSize();i.width=o.x*s,i.height=o.y*s,this.wmsParams=i},onAdd:function(e){this._crs=this.options.crs||e.options.crs,this._wmsVersion=parseFloat(this.wmsParams.version);var t=this._wmsVersion>=1.3?"crs":"srs";this.wmsParams[t]=this._crs.code,Ui.prototype.onAdd.call(this,e)},getTileUrl:function(e){var t=this._tileCoordsToNwSe(e),n=this._crs,i=I(n.project(t[0]),n.project(t[1])),r=i.min,s=i.max,o=(this._wmsVersion>=1.3&&this._crs===qn?[r.y,r.x,s.y,s.x]:[r.x,r.y,s.x,s.y]).join(","),a=Ui.prototype.getTileUrl.call(this,e);return a+p(this.wmsParams,a,this.options.uppercase)+(this.options.uppercase?"&BBOX=":"&bbox=")+o},setParams:function(e,t){return n(this.wmsParams,e),t||this.redraw(),this}});function $i(e,t){return new Gi(e,t)}Ui.WMS=Gi,Vi.wms=$i;var Zi=Hn.extend({options:{padding:.1},initialize:function(e){f(this,e),o(this),this._layers=this._layers||{}},onAdd:function(){this._container||(this._initContainer(),xt(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 e={viewreset:this._reset,zoom:this._onZoom,moveend:this._update,zoomend:this._onZoomEnd};return this._zoomAnimated&&(e.zoomanim=this._onAnimZoom),e},_onAnimZoom:function(e){this._updateTransform(e.center,e.zoom)},_onZoom:function(){this._updateTransform(this._map.getCenter(),this._map.getZoom())},_updateTransform:function(e,t){var n=this._map.getZoomScale(t,this._zoom),i=this._map.getSize().multiplyBy(.5+this.options.padding),r=this._map.project(this._center,t),s=i.multiplyBy(-n).add(r).subtract(this._map._getNewPixelOrigin(e,t));Fe.any3d?Ot(this._container,s,n):Pt(this._container,s)},_reset:function(){for(var e in this._update(),this._updateTransform(this._center,this._zoom),this._layers)this._layers[e]._reset()},_onZoomEnd:function(){for(var e in this._layers)this._layers[e]._project()},_updatePaths:function(){for(var e in this._layers)this._layers[e]._update()},_update:function(){var e=this.options.padding,t=this._map.getSize(),n=this._map.containerPointToLayerPoint(t.multiplyBy(-e)).round();this._bounds=new D(n,n.add(t.multiplyBy(1+2*e)).round()),this._center=this._map.getCenter(),this._zoom=this._map.getZoom()}}),qi=Zi.extend({options:{tolerance:0},getEvents:function(){var e=Zi.prototype.getEvents.call(this);return e.viewprereset=this._onViewPreReset,e},_onViewPreReset:function(){this._postponeUpdatePaths=!0},onAdd:function(){Zi.prototype.onAdd.call(this),this._draw()},_initContainer:function(){var e=this._container=document.createElement("canvas");jt(e,"mousemove",this._onMouseMove,this),jt(e,"click dblclick mousedown mouseup contextmenu",this._onClick,this),jt(e,"mouseout",this._handleMouseOut,this),e._leaflet_disable_events=!0,this._ctx=e.getContext("2d")},_destroyContainer:function(){S(this._redrawRequest),delete this._ctx,_t(this._container),Ut(this._container),delete this._container},_updatePaths:function(){if(!this._postponeUpdatePaths){for(var e in this._redrawBounds=null,this._layers)this._layers[e]._update();this._redraw()}},_update:function(){if(!this._map._animatingZoom||!this._bounds){Zi.prototype._update.call(this);var e=this._bounds,t=this._container,n=e.getSize(),i=Fe.retina?2:1;Pt(t,e.min),t.width=i*n.x,t.height=i*n.y,t.style.width=n.x+"px",t.style.height=n.y+"px",Fe.retina&&this._ctx.scale(2,2),this._ctx.translate(-e.min.x,-e.min.y),this.fire("update")}},_reset:function(){Zi.prototype._reset.call(this),this._postponeUpdatePaths&&(this._postponeUpdatePaths=!1,this._updatePaths())},_initPath:function(e){this._updateDashArray(e),this._layers[o(e)]=e;var t=e._order={layer:e,prev:this._drawLast,next:null};this._drawLast&&(this._drawLast.next=t),this._drawLast=t,this._drawFirst=this._drawFirst||this._drawLast},_addPath:function(e){this._requestRedraw(e)},_removePath:function(e){var t=e._order,n=t.next,i=t.prev;n?n.prev=i:this._drawLast=i,i?i.next=n:this._drawFirst=n,delete e._order,delete this._layers[o(e)],this._requestRedraw(e)},_updatePath:function(e){this._extendRedrawBounds(e),e._project(),e._update(),this._requestRedraw(e)},_updateStyle:function(e){this._updateDashArray(e),this._requestRedraw(e)},_updateDashArray:function(e){if("string"==typeof e.options.dashArray){var t,n,i=e.options.dashArray.split(/[, ]+/),r=[];for(n=0;n<i.length;n++){if(t=Number(i[n]),isNaN(t))return;r.push(t)}e.options._dashArray=r}else e.options._dashArray=e.options.dashArray},_requestRedraw:function(e){this._map&&(this._extendRedrawBounds(e),this._redrawRequest=this._redrawRequest||T(this._redraw,this))},_extendRedrawBounds:function(e){if(e._pxBounds){var t=(e.options.weight||0)+1;this._redrawBounds=this._redrawBounds||new D,this._redrawBounds.extend(e._pxBounds.min.subtract([t,t])),this._redrawBounds.extend(e._pxBounds.max.add([t,t]))}},_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 e=this._redrawBounds;if(e){var t=e.getSize();this._ctx.clearRect(e.min.x,e.min.y,t.x,t.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 e,t=this._redrawBounds;if(this._ctx.save(),t){var n=t.getSize();this._ctx.beginPath(),this._ctx.rect(t.min.x,t.min.y,n.x,n.y),this._ctx.clip()}this._drawing=!0;for(var i=this._drawFirst;i;i=i.next)e=i.layer,(!t||e._pxBounds&&e._pxBounds.intersects(t))&&e._updatePath();this._drawing=!1,this._ctx.restore()},_updatePoly:function(e,t){if(this._drawing){var n,i,r,s,o=e._parts,a=o.length,l=this._ctx;if(a){for(l.beginPath(),n=0;n<a;n++){for(i=0,r=o[n].length;i<r;i++)s=o[n][i],l[i?"lineTo":"moveTo"](s.x,s.y);t&&l.closePath()}this._fillStroke(l,e)}}},_updateCircle:function(e){if(this._drawing&&!e._empty()){var t=e._point,n=this._ctx,i=Math.max(Math.round(e._radius),1),r=(Math.max(Math.round(e._radiusY),1)||i)/i;1!==r&&(n.save(),n.scale(1,r)),n.beginPath(),n.arc(t.x,t.y/r,i,0,2*Math.PI,!1),1!==r&&n.restore(),this._fillStroke(n,e)}},_fillStroke:function(e,t){var n=t.options;n.fill&&(e.globalAlpha=n.fillOpacity,e.fillStyle=n.fillColor||n.color,e.fill(n.fillRule||"evenodd")),n.stroke&&0!==n.weight&&(e.setLineDash&&e.setLineDash(t.options&&t.options._dashArray||[]),e.globalAlpha=n.opacity,e.lineWidth=n.weight,e.strokeStyle=n.color,e.lineCap=n.lineCap,e.lineJoin=n.lineJoin,e.stroke())},_onClick:function(e){for(var t,n,i=this._map.mouseEventToLayerPoint(e),r=this._drawFirst;r;r=r.next)(t=r.layer).options.interactive&&t._containsPoint(i)&&("click"!==e.type&&"preclick"!==e.type||!this._map._draggableMoved(t))&&(n=t);this._fireEvent(!!n&&[n],e)},_onMouseMove:function(e){if(this._map&&!this._map.dragging.moving()&&!this._map._animatingZoom){var t=this._map.mouseEventToLayerPoint(e);this._handleMouseHover(e,t)}},_handleMouseOut:function(e){var t=this._hoveredLayer;t&&(wt(this._container,"leaflet-interactive"),this._fireEvent([t],e,"mouseout"),this._hoveredLayer=null,this._mouseHoverThrottled=!1)},_handleMouseHover:function(e,t){if(!this._mouseHoverThrottled){for(var n,i,s=this._drawFirst;s;s=s.next)(n=s.layer).options.interactive&&n._containsPoint(t)&&(i=n);i!==this._hoveredLayer&&(this._handleMouseOut(e),i&&(xt(this._container,"leaflet-interactive"),this._fireEvent([i],e,"mouseover"),this._hoveredLayer=i)),this._fireEvent(!!this._hoveredLayer&&[this._hoveredLayer],e),this._mouseHoverThrottled=!0,setTimeout(r(function(){this._mouseHoverThrottled=!1},this),32)}},_fireEvent:function(e,t,n){this._map._fireDOMEvent(t,n||t.type,e)},_bringToFront:function(e){var t=e._order;if(t){var n=t.next,i=t.prev;n&&(n.prev=i,i?i.next=n:n&&(this._drawFirst=n),t.prev=this._drawLast,this._drawLast.next=t,t.next=null,this._drawLast=t,this._requestRedraw(e))}},_bringToBack:function(e){var t=e._order;if(t){var n=t.next,i=t.prev;i&&(i.next=n,n?n.prev=i:i&&(this._drawLast=i),t.prev=null,t.next=this._drawFirst,this._drawFirst.prev=t,this._drawFirst=t,this._requestRedraw(e))}}});function Wi(e){return Fe.canvas?new qi(e):null}var Hi=function(){try{return document.namespaces.add("lvml","urn:schemas-microsoft-com:vml"),function(e){return document.createElement("<lvml:"+e+' class="lvml">')}}catch(e){}return function(e){return document.createElement("<"+e+' xmlns="urn:schemas-microsoft.com:vml" class="lvml">')}}(),Ki={_initContainer:function(){this._container=mt("div","leaflet-vml-container")},_update:function(){this._map._animatingZoom||(Zi.prototype._update.call(this),this.fire("update"))},_initPath:function(e){var t=e._container=Hi("shape");xt(t,"leaflet-vml-shape "+(this.options.className||"")),t.coordsize="1 1",e._path=Hi("path"),t.appendChild(e._path),this._updateStyle(e),this._layers[o(e)]=e},_addPath:function(e){var t=e._container;this._container.appendChild(t),e.options.interactive&&e.addInteractiveTarget(t)},_removePath:function(e){var t=e._container;_t(t),e.removeInteractiveTarget(t),delete this._layers[o(e)]},_updateStyle:function(e){var t=e._stroke,n=e._fill,i=e.options,r=e._container;r.stroked=!!i.stroke,r.filled=!!i.fill,i.stroke?(t||(t=e._stroke=Hi("stroke")),r.appendChild(t),t.weight=i.weight+"px",t.color=i.color,t.opacity=i.opacity,i.dashArray?t.dashStyle=g(i.dashArray)?i.dashArray.join(" "):i.dashArray.replace(/( *, *)/g," "):t.dashStyle="",t.endcap=i.lineCap.replace("butt","flat"),t.joinstyle=i.lineJoin):t&&(r.removeChild(t),e._stroke=null),i.fill?(n||(n=e._fill=Hi("fill")),r.appendChild(n),n.color=i.fillColor||i.color,n.opacity=i.fillOpacity):n&&(r.removeChild(n),e._fill=null)},_updateCircle:function(e){var t=e._point.round(),n=Math.round(e._radius),i=Math.round(e._radiusY||n);this._setPath(e,e._empty()?"M0 0":"AL "+t.x+","+t.y+" "+n+","+i+" 0,23592600")},_setPath:function(e,t){e._path.v=t},_bringToFront:function(e){yt(e._container)},_bringToBack:function(e){vt(e._container)}},Yi=Fe.vml?Hi:X,Xi=Zi.extend({_initContainer:function(){this._container=Yi("svg"),this._container.setAttribute("pointer-events","none"),this._rootGroup=Yi("g"),this._container.appendChild(this._rootGroup)},_destroyContainer:function(){_t(this._container),Ut(this._container),delete this._container,delete this._rootGroup,delete this._svgSize},_update:function(){if(!this._map._animatingZoom||!this._bounds){Zi.prototype._update.call(this);var e=this._bounds,t=e.getSize(),n=this._container;this._svgSize&&this._svgSize.equals(t)||(this._svgSize=t,n.setAttribute("width",t.x),n.setAttribute("height",t.y)),Pt(n,e.min),n.setAttribute("viewBox",[e.min.x,e.min.y,t.x,t.y].join(" ")),this.fire("update")}},_initPath:function(e){var t=e._path=Yi("path");e.options.className&&xt(t,e.options.className),e.options.interactive&&xt(t,"leaflet-interactive"),this._updateStyle(e),this._layers[o(e)]=e},_addPath:function(e){this._rootGroup||this._initContainer(),this._rootGroup.appendChild(e._path),e.addInteractiveTarget(e._path)},_removePath:function(e){_t(e._path),e.removeInteractiveTarget(e._path),delete this._layers[o(e)]},_updatePath:function(e){e._project(),e._update()},_updateStyle:function(e){var t=e._path,n=e.options;t&&(n.stroke?(t.setAttribute("stroke",n.color),t.setAttribute("stroke-opacity",n.opacity),t.setAttribute("stroke-width",n.weight),t.setAttribute("stroke-linecap",n.lineCap),t.setAttribute("stroke-linejoin",n.lineJoin),n.dashArray?t.setAttribute("stroke-dasharray",n.dashArray):t.removeAttribute("stroke-dasharray"),n.dashOffset?t.setAttribute("stroke-dashoffset",n.dashOffset):t.removeAttribute("stroke-dashoffset")):t.setAttribute("stroke","none"),n.fill?(t.setAttribute("fill",n.fillColor||n.color),t.setAttribute("fill-opacity",n.fillOpacity),t.setAttribute("fill-rule",n.fillRule||"evenodd")):t.setAttribute("fill","none"))},_updatePoly:function(e,t){this._setPath(e,J(e._parts,t))},_updateCircle:function(e){var t=e._point,n=Math.max(Math.round(e._radius),1),i="a"+n+","+(Math.max(Math.round(e._radiusY),1)||n)+" 0 1,0 ",r=e._empty()?"M0 0":"M"+(t.x-n)+","+t.y+i+2*n+",0 "+i+2*-n+",0 ";this._setPath(e,r)},_setPath:function(e,t){e._path.setAttribute("d",t)},_bringToFront:function(e){yt(e._path)},_bringToBack:function(e){vt(e._path)}});function Ji(e){return Fe.svg||Fe.vml?new Xi(e):null}Fe.vml&&Xi.include(Ki),sn.include({getRenderer:function(e){var t=e.options.renderer||this._getPaneRenderer(e.options.pane)||this.options.renderer||this._renderer;return t||(t=this._renderer=this._createRenderer()),this.hasLayer(t)||this.addLayer(t),t},_getPaneRenderer:function(e){if("overlayPane"===e||void 0===e)return!1;var t=this._paneRenderers[e];return void 0===t&&(t=this._createRenderer({pane:e}),this._paneRenderers[e]=t),t},_createRenderer:function(e){return this.options.preferCanvas&&Wi(e)||Ji(e)}});var Qi=di.extend({initialize:function(e,t){di.prototype.initialize.call(this,this._boundsToLatLngs(e),t)},setBounds:function(e){return this.setLatLngs(this._boundsToLatLngs(e))},_boundsToLatLngs:function(e){return[(e=j(e)).getSouthWest(),e.getNorthWest(),e.getNorthEast(),e.getSouthEast()]}});function er(e,t){return new Qi(e,t)}Xi.create=Yi,Xi.pointsToPath=J,pi.geometryToLayer=mi,pi.coordsToLatLng=gi,pi.coordsToLatLngs=yi,pi.latLngToCoords=vi,pi.latLngsToCoords=bi,pi.getFeature=xi,pi.asFeature=wi,sn.mergeOptions({boxZoom:!0});var tr=yn.extend({initialize:function(e){this._map=e,this._container=e._container,this._pane=e._panes.overlayPane,this._resetStateTimeout=0,e.on("unload",this._destroy,this)},addHooks:function(){jt(this._container,"mousedown",this._onMouseDown,this)},removeHooks:function(){Ut(this._container,"mousedown",this._onMouseDown,this)},moved:function(){return this._moved},_destroy:function(){_t(this._pane),delete this._pane},_resetState:function(){this._resetStateTimeout=0,this._moved=!1},_clearDeferredResetState:function(){0!==this._resetStateTimeout&&(clearTimeout(this._resetStateTimeout),this._resetStateTimeout=0)},_onMouseDown:function(e){if(!e.shiftKey||1!==e.which&&1!==e.button)return!1;this._clearDeferredResetState(),this._resetState(),st(),Mt(),this._startPoint=this._map.mouseEventToContainerPoint(e),jt(document,{contextmenu:Yt,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseMove:function(e){this._moved||(this._moved=!0,this._box=mt("div","leaflet-zoom-box",this._container),xt(this._container,"leaflet-crosshair"),this._map.fire("boxzoomstart")),this._point=this._map.mouseEventToContainerPoint(e);var t=new D(this._point,this._startPoint),n=t.getSize();Pt(this._box,t.min),this._box.style.width=n.x+"px",this._box.style.height=n.y+"px"},_finish:function(){this._moved&&(_t(this._box),wt(this._container,"leaflet-crosshair")),ot(),Lt(),Ut(document,{contextmenu:Yt,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseUp:function(e){if((1===e.which||1===e.button)&&(this._finish(),this._moved)){this._clearDeferredResetState(),this._resetStateTimeout=setTimeout(r(this._resetState,this),0);var t=new F(this._map.containerPointToLatLng(this._startPoint),this._map.containerPointToLatLng(this._point));this._map.fitBounds(t).fire("boxzoomend",{boxZoomBounds:t})}},_onKeyDown:function(e){27===e.keyCode&&(this._finish(),this._clearDeferredResetState(),this._resetState())}});sn.addInitHook("addHandler","boxZoom",tr),sn.mergeOptions({doubleClickZoom:!0});var nr=yn.extend({addHooks:function(){this._map.on("dblclick",this._onDoubleClick,this)},removeHooks:function(){this._map.off("dblclick",this._onDoubleClick,this)},_onDoubleClick:function(e){var t=this._map,n=t.getZoom(),i=t.options.zoomDelta,r=e.originalEvent.shiftKey?n-i:n+i;"center"===t.options.doubleClickZoom?t.setZoom(r):t.setZoomAround(e.containerPoint,r)}});sn.addInitHook("addHandler","doubleClickZoom",nr),sn.mergeOptions({dragging:!0,inertia:!0,inertiaDeceleration:3400,inertiaMaxSpeed:1/0,easeLinearity:.2,worldCopyJump:!1,maxBoundsViscosity:0});var ir=yn.extend({addHooks:function(){if(!this._draggable){var e=this._map;this._draggable=new xn(e._mapPane,e._container),this._draggable.on({dragstart:this._onDragStart,drag:this._onDrag,dragend:this._onDragEnd},this),this._draggable.on("predrag",this._onPreDragLimit,this),e.options.worldCopyJump&&(this._draggable.on("predrag",this._onPreDragWrap,this),e.on("zoomend",this._onZoomEnd,this),e.whenReady(this._onZoomEnd,this))}xt(this._map._container,"leaflet-grab leaflet-touch-drag"),this._draggable.enable(),this._positions=[],this._times=[]},removeHooks:function(){wt(this._map._container,"leaflet-grab"),wt(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 e=this._map;if(e._stop(),this._map.options.maxBounds&&this._map.options.maxBoundsViscosity){var t=j(this._map.options.maxBounds);this._offsetLimit=I(this._map.latLngToContainerPoint(t.getNorthWest()).multiplyBy(-1),this._map.latLngToContainerPoint(t.getSouthEast()).multiplyBy(-1).add(this._map.getSize())),this._viscosity=Math.min(1,Math.max(0,this._map.options.maxBoundsViscosity))}else this._offsetLimit=null;e.fire("movestart").fire("dragstart"),e.options.inertia&&(this._positions=[],this._times=[])},_onDrag:function(e){if(this._map.options.inertia){var t=this._lastTime=+new Date,n=this._lastPos=this._draggable._absPos||this._draggable._newPos;this._positions.push(n),this._times.push(t),this._prunePositions(t)}this._map.fire("move",e).fire("drag",e)},_prunePositions:function(e){for(;this._positions.length>1&&e-this._times[0]>50;)this._positions.shift(),this._times.shift()},_onZoomEnd:function(){var e=this._map.getSize().divideBy(2),t=this._map.latLngToLayerPoint([0,0]);this._initialWorldOffset=t.subtract(e).x,this._worldWidth=this._map.getPixelWorldBounds().getSize().x},_viscousLimit:function(e,t){return e-(e-t)*this._viscosity},_onPreDragLimit:function(){if(this._viscosity&&this._offsetLimit){var e=this._draggable._newPos.subtract(this._draggable._startPos),t=this._offsetLimit;e.x<t.min.x&&(e.x=this._viscousLimit(e.x,t.min.x)),e.y<t.min.y&&(e.y=this._viscousLimit(e.y,t.min.y)),e.x>t.max.x&&(e.x=this._viscousLimit(e.x,t.max.x)),e.y>t.max.y&&(e.y=this._viscousLimit(e.y,t.max.y)),this._draggable._newPos=this._draggable._startPos.add(e)}},_onPreDragWrap:function(){var e=this._worldWidth,t=Math.round(e/2),n=this._initialWorldOffset,i=this._draggable._newPos.x,r=(i-t+n)%e+t-n,s=(i+t+n)%e-t-n,o=Math.abs(r+n)<Math.abs(s+n)?r:s;this._draggable._absPos=this._draggable._newPos.clone(),this._draggable._newPos.x=o},_onDragEnd:function(e){var t=this._map,n=t.options,i=!n.inertia||e.noInertia||this._times.length<2;if(t.fire("dragend",e),i)t.fire("moveend");else{this._prunePositions(+new Date);var r=this._lastPos.subtract(this._positions[0]),s=(this._lastTime-this._times[0])/1e3,o=n.easeLinearity,a=r.multiplyBy(o/s),l=a.distanceTo([0,0]),u=Math.min(n.inertiaMaxSpeed,l),c=a.multiplyBy(u/l),h=u/(n.inertiaDeceleration*o),d=c.multiplyBy(-h/2).round();d.x||d.y?(d=t._limitOffset(d,t.options.maxBounds),T(function(){t.panBy(d,{duration:h,easeLinearity:o,noMoveStart:!0,animate:!0})})):t.fire("moveend")}}});sn.addInitHook("addHandler","dragging",ir),sn.mergeOptions({keyboard:!0,keyboardPanDelta:80});var rr=yn.extend({keyCodes:{left:[37],right:[39],down:[40],up:[38],zoomIn:[187,107,61,171],zoomOut:[189,109,54,173]},initialize:function(e){this._map=e,this._setPanDelta(e.options.keyboardPanDelta),this._setZoomDelta(e.options.zoomDelta)},addHooks:function(){var e=this._map._container;e.tabIndex<=0&&(e.tabIndex="0"),jt(e,{focus:this._onFocus,blur:this._onBlur,mousedown:this._onMouseDown},this),this._map.on({focus:this._addHooks,blur:this._removeHooks},this)},removeHooks:function(){this._removeHooks(),Ut(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 e=document.body,t=document.documentElement,n=e.scrollTop||t.scrollTop,i=e.scrollLeft||t.scrollLeft;this._map._container.focus(),window.scrollTo(i,n)}},_onFocus:function(){this._focused=!0,this._map.fire("focus")},_onBlur:function(){this._focused=!1,this._map.fire("blur")},_setPanDelta:function(e){var t,n,i=this._panKeys={},r=this.keyCodes;for(t=0,n=r.left.length;t<n;t++)i[r.left[t]]=[-1*e,0];for(t=0,n=r.right.length;t<n;t++)i[r.right[t]]=[e,0];for(t=0,n=r.down.length;t<n;t++)i[r.down[t]]=[0,e];for(t=0,n=r.up.length;t<n;t++)i[r.up[t]]=[0,-1*e]},_setZoomDelta:function(e){var t,n,i=this._zoomKeys={},r=this.keyCodes;for(t=0,n=r.zoomIn.length;t<n;t++)i[r.zoomIn[t]]=e;for(t=0,n=r.zoomOut.length;t<n;t++)i[r.zoomOut[t]]=-e},_addHooks:function(){jt(document,"keydown",this._onKeyDown,this)},_removeHooks:function(){Ut(document,"keydown",this._onKeyDown,this)},_onKeyDown:function(e){if(!(e.altKey||e.ctrlKey||e.metaKey)){var t,n=e.keyCode,i=this._map;if(n in this._panKeys){if(!i._panAnim||!i._panAnim._inProgress)if(t=this._panKeys[n],e.shiftKey&&(t=z(t).multiplyBy(3)),i.options.maxBounds&&(t=i._limitOffset(z(t),i.options.maxBounds)),i.options.worldCopyJump){var r=i.wrapLatLng(i.unproject(i.project(i.getCenter()).add(t)));i.panTo(r)}else i.panBy(t)}else if(n in this._zoomKeys)i.setZoom(i.getZoom()+(e.shiftKey?3:1)*this._zoomKeys[n]);else{if(27!==n||!i._popup||!i._popup.options.closeOnEscapeKey)return;i.closePopup()}Yt(e)}}});sn.addInitHook("addHandler","keyboard",rr),sn.mergeOptions({scrollWheelZoom:!0,wheelDebounceTime:40,wheelPxPerZoomLevel:60});var sr=yn.extend({addHooks:function(){jt(this._map._container,"wheel",this._onWheelScroll,this),this._delta=0},removeHooks:function(){Ut(this._map._container,"wheel",this._onWheelScroll,this)},_onWheelScroll:function(e){var t=en(e),n=this._map.options.wheelDebounceTime;this._delta+=t,this._lastMousePos=this._map.mouseEventToContainerPoint(e),this._startTime||(this._startTime=+new Date);var i=Math.max(n-(+new Date-this._startTime),0);clearTimeout(this._timer),this._timer=setTimeout(r(this._performZoom,this),i),Yt(e)},_performZoom:function(){var e=this._map,t=e.getZoom(),n=this._map.options.zoomSnap||0;e._stop();var i=this._delta/(4*this._map.options.wheelPxPerZoomLevel),r=4*Math.log(2/(1+Math.exp(-Math.abs(i))))/Math.LN2,s=n?Math.ceil(r/n)*n:r,o=e._limitZoom(t+(this._delta>0?s:-s))-t;this._delta=0,this._startTime=null,o&&("center"===e.options.scrollWheelZoom?e.setZoom(t+o):e.setZoomAround(this._lastMousePos,t+o))}});sn.addInitHook("addHandler","scrollWheelZoom",sr);var or=600;sn.mergeOptions({tapHold:Fe.touchNative&&Fe.safari&&Fe.mobile,tapTolerance:15});var ar=yn.extend({addHooks:function(){jt(this._map._container,"touchstart",this._onDown,this)},removeHooks:function(){Ut(this._map._container,"touchstart",this._onDown,this)},_onDown:function(e){if(clearTimeout(this._holdTimeout),1===e.touches.length){var t=e.touches[0];this._startPos=this._newPos=new M(t.clientX,t.clientY),this._holdTimeout=setTimeout(r(function(){this._cancel(),this._isTapValid()&&(jt(document,"touchend",Kt),jt(document,"touchend touchcancel",this._cancelClickPrevent),this._simulateEvent("contextmenu",t))},this),or),jt(document,"touchend touchcancel contextmenu",this._cancel,this),jt(document,"touchmove",this._onMove,this)}},_cancelClickPrevent:function e(){Ut(document,"touchend",Kt),Ut(document,"touchend touchcancel",e)},_cancel:function(){clearTimeout(this._holdTimeout),Ut(document,"touchend touchcancel contextmenu",this._cancel,this),Ut(document,"touchmove",this._onMove,this)},_onMove:function(e){var t=e.touches[0];this._newPos=new M(t.clientX,t.clientY)},_isTapValid:function(){return this._newPos.distanceTo(this._startPos)<=this._map.options.tapTolerance},_simulateEvent:function(e,t){var n=new MouseEvent(e,{bubbles:!0,cancelable:!0,view:window,screenX:t.screenX,screenY:t.screenY,clientX:t.clientX,clientY:t.clientY});n._simulated=!0,t.target.dispatchEvent(n)}});sn.addInitHook("addHandler","tapHold",ar),sn.mergeOptions({touchZoom:Fe.touch,bounceAtZoomLimits:!0});var lr=yn.extend({addHooks:function(){xt(this._map._container,"leaflet-touch-zoom"),jt(this._map._container,"touchstart",this._onTouchStart,this)},removeHooks:function(){wt(this._map._container,"leaflet-touch-zoom"),Ut(this._map._container,"touchstart",this._onTouchStart,this)},_onTouchStart:function(e){var t=this._map;if(e.touches&&2===e.touches.length&&!t._animatingZoom&&!this._zooming){var n=t.mouseEventToContainerPoint(e.touches[0]),i=t.mouseEventToContainerPoint(e.touches[1]);this._centerPoint=t.getSize()._divideBy(2),this._startLatLng=t.containerPointToLatLng(this._centerPoint),"center"!==t.options.touchZoom&&(this._pinchStartLatLng=t.containerPointToLatLng(n.add(i)._divideBy(2))),this._startDist=n.distanceTo(i),this._startZoom=t.getZoom(),this._moved=!1,this._zooming=!0,t._stop(),jt(document,"touchmove",this._onTouchMove,this),jt(document,"touchend touchcancel",this._onTouchEnd,this),Kt(e)}},_onTouchMove:function(e){if(e.touches&&2===e.touches.length&&this._zooming){var t=this._map,n=t.mouseEventToContainerPoint(e.touches[0]),i=t.mouseEventToContainerPoint(e.touches[1]),s=n.distanceTo(i)/this._startDist;if(this._zoom=t.getScaleZoom(s,this._startZoom),!t.options.bounceAtZoomLimits&&(this._zoom<t.getMinZoom()&&s<1||this._zoom>t.getMaxZoom()&&s>1)&&(this._zoom=t._limitZoom(this._zoom)),"center"===t.options.touchZoom){if(this._center=this._startLatLng,1===s)return}else{var o=n._add(i)._divideBy(2)._subtract(this._centerPoint);if(1===s&&0===o.x&&0===o.y)return;this._center=t.unproject(t.project(this._pinchStartLatLng,this._zoom).subtract(o),this._zoom)}this._moved||(t._moveStart(!0,!1),this._moved=!0),S(this._animRequest);var a=r(t._move,t,this._center,this._zoom,{pinch:!0,round:!1},void 0);this._animRequest=T(a,this,!0),Kt(e)}},_onTouchEnd:function(){this._moved&&this._zooming?(this._zooming=!1,S(this._animRequest),Ut(document,"touchmove",this._onTouchMove,this),Ut(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))):this._zooming=!1}});sn.addInitHook("addHandler","touchZoom",lr),sn.BoxZoom=tr,sn.DoubleClickZoom=nr,sn.Drag=ir,sn.Keyboard=rr,sn.ScrollWheelZoom=sr,sn.TapHold=ar,sn.TouchZoom=lr,e.Bounds=D,e.Browser=Fe,e.CRS=G,e.Canvas=qi,e.Circle=li,e.CircleMarker=oi,e.Class=O,e.Control=an,e.DivIcon=Ii,e.DivOverlay=Mi,e.DomEvent=nn,e.DomUtil=Ft,e.Draggable=xn,e.Evented=R,e.FeatureGroup=Xn,e.GeoJSON=pi,e.GridLayer=ji,e.Handler=yn,e.Icon=Qn,e.ImageOverlay=Si,e.LatLng=B,e.LatLngBounds=F,e.Layer=Hn,e.LayerGroup=Kn,e.LineUtil=Un,e.Map=sn,e.Marker=ii,e.Mixin=vn,e.Path=si,e.Point=M,e.PolyUtil=Sn,e.Polygon=di,e.Polyline=ci,e.Popup=Li,e.PosAnimation=rn,e.Projection=$n,e.Rectangle=Qi,e.Renderer=Zi,e.SVG=Xi,e.SVGOverlay=Ci,e.TileLayer=Ui,e.Tooltip=zi,e.Transformation=W,e.Util=k,e.VideoOverlay=Oi,e.bind=r,e.bounds=I,e.canvas=Wi,e.circle=ui,e.circleMarker=ai,e.control=ln,e.divIcon=Fi,e.extend=n,e.featureGroup=Jn,e.geoJSON=Ai,e.geoJson=Ti,e.gridLayer=Bi,e.icon=ei,e.imageOverlay=ki,e.latLng=U,e.latLngBounds=j,e.layerGroup=Yn,e.map=on,e.marker=ri,e.point=z,e.polygon=fi,e.polyline=hi,e.popup=Ni,e.rectangle=er,e.setOptions=f,e.stamp=o,e.svg=Ji,e.svgOverlay=Ri,e.tileLayer=Vi,e.tooltip=Di,e.transformation=H,e.version=t,e.videoOverlay=Pi;var ur=window.L;e.noConflict=function(){return window.L=ur,this},window.L=e}(ke.exports)),ke.exports}var Pe=Oe(),Ce=xe(Pe);function Re(e){var t,n,i="";if("string"==typeof e||"number"==typeof e)i+=e;else if("object"==typeof e)if(Array.isArray(e))for(t=0;t<e.length;t++)e[t]&&(n=Re(e[t]))&&(i&&(i+=" "),i+=n);else for(t in e)e[t]&&(i&&(i+=" "),i+=t);return i}function Me(){for(var e,t,n=0,i="";n<arguments.length;)(e=arguments[n++])&&(t=Re(e))&&(i&&(i+=" "),i+=t);return i}let Le={data:""},Ne=/(?:([\u0080-\uFFFF\w-%@]+) *:? *([^{;]+?);|([^;}{]*?) *{)|(}\s*)/g,ze=/\/\*[^]*?\*\/| +/g,De=/\n+/g,Ie=(e,t)=>{let n="",i="",r="";for(let s in e){let o=e[s];"@"==s[0]?"i"==s[1]?n=s+" "+o+";":i+="f"==s[1]?Ie(o,s):s+"{"+Ie(o,"k"==s[1]?"":t)+"}":"object"==typeof o?i+=Ie(o,t?t.replace(/([^,])+/g,e=>s.replace(/([^,]*:\S+\([^)]*\))|([^,])+/g,t=>/&/.test(t)?t.replace(/&/g,e):e?e+" "+t:t)):s):null!=o&&(s=/^--/.test(s)?s:s.replace(/[A-Z]/g,"-$&").toLowerCase(),r+=Ie.p?Ie.p(s,o):s+":"+o+";")}return n+(t&&r?t+"{"+r+"}":r)+i},Fe={},je=e=>{if("object"==typeof e){let t="";for(let n in e)t+=n+je(e[n]);return t}return e};function Be(e){let t=this||{},n=e.call?e(t.p):e;return((e,t,n,i,r)=>{let s=je(e),o=Fe[s]||(Fe[s]=(e=>{let t=0,n=11;for(;t<e.length;)n=101*n+e.charCodeAt(t++)>>>0;return"go"+n})(s));if(!Fe[o]){let t=s!==e?e:(e=>{let t,n,i=[{}];for(;t=Ne.exec(e.replace(ze,""));)t[4]?i.shift():t[3]?(n=t[3].replace(De," ").trim(),i.unshift(i[0][n]=i[0][n]||{})):i[0][t[1]]=t[2].replace(De," ").trim();return i[0]})(e);Fe[o]=Ie(r?{["@keyframes "+o]:t}:t,n?"":"."+o)}let a=n&&Fe.g?Fe.g:null;return n&&(Fe.g=Fe[o]),((e,t,n,i)=>{i?t.data=t.data.replace(i,e):-1===t.data.indexOf(e)&&(t.data=n?e+t.data:t.data+e)})(Fe[o],t,i,a),o})(n.unshift?n.raw?((e,t,n)=>e.reduce((e,i,r)=>{let s=t[r];if(s&&s.call){let e=s(n),t=e&&e.props&&e.props.className||/^go/.test(e)&&e;s=t?"."+t:e&&"object"==typeof e?e.props?"":Ie(e,""):!1===e?"":e}return e+i+(null==s?"":s)},""))(n,[].slice.call(arguments,1),t.p):n.reduce((e,n)=>Object.assign(e,n&&n.call?n(t.p):n),{}):n,(e=>{if("object"==typeof window){let t=(e?e.querySelector("#_goober"):window._goober)||Object.assign(document.createElement("style"),{innerHTML:" ",id:"_goober"});return t.nonce=window.__nonce__,t.parentNode||(e||document.head).appendChild(t),t.firstChild}return e||Le})(t.target),t.g,t.o,t.k)}function Ue(e,t,n){return t&&function(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}(e.prototype,t),e}function Ve(){return Ve=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},Ve.apply(this,arguments)}function Ge(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}function $e(e,t){if(null==e)return{};var n,i,r={},s=Object.keys(e);for(i=0;i<s.length;i++)n=s[i],t.indexOf(n)>=0||(r[n]=e[n]);return r}function Ze(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}Be.bind({g:1}),Be.bind({k:1});var qe=function(){return""},We=t.createContext({enqueueSnackbar:qe,closeSnackbar:qe}),He="@media (max-width:599.95px)",Ke="@media (min-width:600px)",Ye=function(e){return e.charAt(0).toUpperCase()+e.slice(1)},Xe=function(e){return""+Ye(e.vertical)+Ye(e.horizontal)},Je=function(e){return!!e||0===e},Qe="unmounted",et="exited",tt="entering",nt="entered",it="exiting",rt=function(e){function t(t){var n;n=e.call(this,t)||this;var i,r=t.appear;return n.appearStatus=null,t.in?r?(i=et,n.appearStatus=tt):i=nt:i=t.unmountOnExit||t.mountOnEnter?Qe:et,n.state={status:i},n.nextCallback=null,n}Ge(t,e),t.getDerivedStateFromProps=function(e,t){return e.in&&t.status===Qe?{status:et}:null};var n=t.prototype;return n.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},n.componentDidUpdate=function(e){var t=null;if(e!==this.props){var n=this.state.status;this.props.in?n!==tt&&n!==nt&&(t=tt):n!==tt&&n!==nt||(t=it)}this.updateStatus(!1,t)},n.componentWillUnmount=function(){this.cancelNextCallback()},n.getTimeouts=function(){var e=this.props.timeout,t=e,n=e;return null!=e&&"number"!=typeof e&&"string"!=typeof e&&(n=e.exit,t=e.enter),{exit:n,enter:t}},n.updateStatus=function(e,t){void 0===e&&(e=!1),null!==t?(this.cancelNextCallback(),t===tt?this.performEnter(e):this.performExit()):this.props.unmountOnExit&&this.state.status===et&&this.setState({status:Qe})},n.performEnter=function(e){var t=this,n=this.props.enter,i=e,r=this.getTimeouts();e||n?(this.props.onEnter&&this.props.onEnter(this.node,i),this.safeSetState({status:tt},function(){t.props.onEntering&&t.props.onEntering(t.node,i),t.onTransitionEnd(r.enter,function(){t.safeSetState({status:nt},function(){t.props.onEntered&&t.props.onEntered(t.node,i)})})})):this.safeSetState({status:nt},function(){t.props.onEntered&&t.props.onEntered(t.node,i)})},n.performExit=function(){var e=this,t=this.props.exit,n=this.getTimeouts();t?(this.props.onExit&&this.props.onExit(this.node),this.safeSetState({status:it},function(){e.props.onExiting&&e.props.onExiting(e.node),e.onTransitionEnd(n.exit,function(){e.safeSetState({status:et},function(){e.props.onExited&&e.props.onExited(e.node)})})})):this.safeSetState({status:et},function(){e.props.onExited&&e.props.onExited(e.node)})},n.cancelNextCallback=function(){null!==this.nextCallback&&this.nextCallback.cancel&&(this.nextCallback.cancel(),this.nextCallback=null)},n.safeSetState=function(e,t){t=this.setNextCallback(t),this.setState(e,t)},n.setNextCallback=function(e){var t=this,n=!0;return this.nextCallback=function(){n&&(n=!1,t.nextCallback=null,e())},this.nextCallback.cancel=function(){n=!1},this.nextCallback},n.onTransitionEnd=function(e,t){this.setNextCallback(t);var n=null==e&&!this.props.addEndListener;this.node&&!n?(this.props.addEndListener&&this.props.addEndListener(this.node,this.nextCallback),null!=e&&setTimeout(this.nextCallback,e)):setTimeout(this.nextCallback,0)},n.render=function(){var e=this.state.status;if(e===Qe)return null;var t=this.props;return(0,t.children)(e,$e(t,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]))},Ue(t,[{key:"node",get:function(){var e,t=null===(e=this.props.nodeRef)||void 0===e?void 0:e.current;if(!t)throw new Error("notistack - Custom snackbar is not refForwarding");return t}}]),t}(t.Component);function st(){}function ot(e,t){"function"==typeof e?e(t):e&&(e.current=t)}function at(e,t){return l(function(){return null==e&&null==t?null:function(n){ot(e,n),ot(t,n)}},[e,t])}function lt(e){var t=e.timeout,n=e.style,i=void 0===n?{}:n,r=e.mode;return{duration:"object"==typeof t?t[r]||0:t,easing:i.transitionTimingFunction,delay:i.transitionDelay}}rt.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:st,onEntering:st,onEntered:st,onExit:st,onExiting:st,onExited:st};var ut="cubic-bezier(0.4, 0, 0.2, 1)",ct="cubic-bezier(0.0, 0, 0.2, 1)",ht="cubic-bezier(0.4, 0, 0.6, 1)",dt=function(e){e.scrollTop=e.scrollTop},ft=function(e){return Math.round(e)+"ms"};function pt(e,t){void 0===e&&(e=["all"]);var n=t||{},i=n.duration,r=void 0===i?300:i,s=n.easing,o=void 0===s?ut:s,a=n.delay,l=void 0===a?0:a;return(Array.isArray(e)?e:[e]).map(function(e){var t="string"==typeof r?r:ft(r),n="string"==typeof l?l:ft(l);return e+" "+t+" "+o+" "+n}).join(",")}function mt(e){var t=function(e){return e&&e.ownerDocument||document}(e);return t.defaultView||window}function _t(e,t){if(t){var n=function(e,t){var n,i=t.getBoundingClientRect(),r=mt(t);if(t.fakeTransform)n=t.fakeTransform;else{var s=r.getComputedStyle(t);n=s.getPropertyValue("-webkit-transform")||s.getPropertyValue("transform")}var o=0,a=0;if(n&&"none"!==n&&"string"==typeof n){var l=n.split("(")[1].split(")")[0].split(",");o=parseInt(l[4],10),a=parseInt(l[5],10)}switch(e){case"left":return"translateX("+(r.innerWidth+o-i.left)+"px)";case"right":return"translateX(-"+(i.left+i.width-o)+"px)";case"up":return"translateY("+(r.innerHeight+a-i.top)+"px)";default:return"translateY(-"+(i.top+i.height-a)+"px)"}}(e,t);n&&(t.style.webkitTransform=n,t.style.transform=n)}}var gt=n(function(e,t){var n=e.children,l=e.direction,u=void 0===l?"down":l,c=e.in,h=e.style,d=e.timeout,f=void 0===d?0:d,p=e.onEnter,m=e.onEntered,_=e.onExit,g=e.onExited,y=$e(e,["children","direction","in","style","timeout","onEnter","onEntered","onExit","onExited"]),v=i(null),b=at(n.ref,v),x=at(b,t),w=r(function(){v.current&&_t(u,v.current)},[u]);return s(function(){if(!c&&"down"!==u&&"right"!==u){var e=function(e,t){var n;function i(){for(var i=this,r=arguments.length,s=new Array(r),o=0;o<r;o++)s[o]=arguments[o];clearTimeout(n),n=setTimeout(function(){e.apply(i,s)},t)}return void 0===t&&(t=166),i.clear=function(){clearTimeout(n)},i}(function(){v.current&&_t(u,v.current)}),t=mt(v.current);return t.addEventListener("resize",e),function(){e.clear(),t.removeEventListener("resize",e)}}},[u,c]),s(function(){c||w()},[c,w]),o(rt,Object.assign({appear:!0,nodeRef:v,onEnter:function(e,t){_t(u,e),dt(e),p&&p(e,t)},onEntered:m,onEntering:function(e){var t=(null==h?void 0:h.transitionTimingFunction)||ct,n=lt({timeout:f,mode:"enter",style:Ve({},h,{transitionTimingFunction:t})});e.style.webkitTransition=pt("-webkit-transform",n),e.style.transition=pt("transform",n),e.style.webkitTransform="none",e.style.transform="none"},onExit:function(e){var t=(null==h?void 0:h.transitionTimingFunction)||ht,n=lt({timeout:f,mode:"exit",style:Ve({},h,{transitionTimingFunction:t})});e.style.webkitTransition=pt("-webkit-transform",n),e.style.transition=pt("transform",n),_t(u,e),_&&_(e)},onExited:function(e){e.style.webkitTransition="",e.style.transition="",g&&g(e)},in:c,timeout:f},y),function(e,t){return a(n,Ve({ref:x,style:Ve({visibility:"exited"!==e||c?void 0:"hidden"},h,{},n.props.style)},t))})});gt.displayName="Slide";var yt=function(e){return t.createElement("svg",Object.assign({viewBox:"0 0 24 24",focusable:"false",style:{fontSize:20,marginInlineEnd:8,userSelect:"none",width:"1em",height:"1em",display:"inline-block",fill:"currentColor",flexShrink:0}},e))},vt=function(){return t.createElement(yt,null,t.createElement("path",{d:"M12 2C6.5 2 2 6.5 2 12S6.5 22 12 22 22 17.5 22 12 17.5 2 12 2M10 17L5 12L6.41\n 10.59L10 14.17L17.59 6.58L19 8L10 17Z"}))},bt=function(){return t.createElement(yt,null,t.createElement("path",{d:"M13,14H11V10H13M13,18H11V16H13M1,21H23L12,2L1,21Z"}))},xt=function(){return t.createElement(yt,null,t.createElement("path",{d:"M12,2C17.53,2 22,6.47 22,12C22,17.53 17.53,22 12,22C6.47,22 2,17.53 2,12C2,\n 6.47 6.47,2 12,2M15.59,7L12,10.59L8.41,7L7,8.41L10.59,12L7,15.59L8.41,17L12,\n 13.41L15.59,17L17,15.59L13.41,12L17,8.41L15.59,7Z"}))},wt=function(){return t.createElement(yt,null,t.createElement("path",{d:"M13,9H11V7H13M13,17H11V11H13M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,\n 0 22,12A10,10 0 0,0 12,2Z"}))},Et={maxSnack:3,persist:!1,hideIconVariant:!1,disableWindowBlurListener:!1,variant:"default",autoHideDuration:5e3,iconVariant:{default:void 0,success:t.createElement(vt,null),warning:t.createElement(bt,null),error:t.createElement(xt,null),info:t.createElement(wt,null)},anchorOrigin:{vertical:"bottom",horizontal:"left"},TransitionComponent:gt,transitionDuration:{enter:225,exit:195}},At=function(e,t){return function(n,i){return void 0===i&&(i=!1),i?Ve({},Et[n],{},t[n],{},e[n]):"autoHideDuration"===n?(r=e.autoHideDuration,s=t.autoHideDuration,(o=function(e){return"number"==typeof e||null===e})(r)?r:o(s)?s:Et.autoHideDuration):"transitionDuration"===n?function(e,t){var n=function(e,t){return t.some(function(t){return typeof e===t})};return n(e,["string","number"])?e:n(e,["object"])?Ve({},Et.transitionDuration,{},n(t,["object"])&&t,{},e):n(t,["string","number"])?t:n(t,["object"])?Ve({},Et.transitionDuration,{},t):Et.transitionDuration}(e.transitionDuration,t.transitionDuration):e[n]||t[n]||Et[n];var r,s,o}};function Tt(e){return Object.entries(e).reduce(function(e,t){var n,i=t[0],r=t[1];return Ve({},e,((n={})[i]=Be(r),n))},{})}var St="notistack-SnackbarContainer",kt="notistack-Snackbar",Ot="notistack-CollapseWrapper",Pt="notistack-MuiContent",Ct=function(e){return"notistack-MuiContent-"+e},Rt=Tt({root:{height:0},entered:{height:"auto"}}),Mt="0px",Lt=n(function(e,t){var n=e.children,r=e.in,s=e.onExited,a=i(null),l=i(null),u=at(t,l),c=function(){return a.current?a.current.clientHeight:0};return o(rt,{in:r,unmountOnExit:!0,onEnter:function(e){e.style.height=Mt},onEntered:function(e){e.style.height="auto"},onEntering:function(e){var t=c(),n=lt({timeout:175,mode:"enter"}),i=n.duration,r=n.easing;e.style.transitionDuration="string"==typeof i?i:i+"ms",e.style.height=t+"px",e.style.transitionTimingFunction=r||""},onExit:function(e){e.style.height=c()+"px"},onExited:s,onExiting:function(e){dt(e);var t=lt({timeout:175,mode:"exit"}),n=t.duration,i=t.easing;e.style.transitionDuration="string"==typeof n?n:n+"ms",e.style.height=Mt,e.style.transitionTimingFunction=i||""},nodeRef:l,timeout:175},function(e,t){return o("div",Object.assign({ref:u,className:Me(Rt.root,"entered"===e&&Rt.entered),style:Ve({pointerEvents:"all",overflow:"hidden",minHeight:Mt,transition:pt("height")},"entered"===e&&{overflow:"visible"},{},"exited"===e&&!r&&{visibility:"hidden"})},t),o("div",{ref:a,className:Ot,style:{display:"flex",width:"100%"}},n))})});Lt.displayName="Collapse";var Nt={right:"left",left:"right",bottom:"up",top:"down"},zt=function(e){return"anchorOrigin"+Xe(e)},Dt=function(){};function It(e,t){return e.reduce(function(e,n){return null==n?e:function(){for(var i=arguments.length,r=new Array(i),s=0;s<i;s++)r[s]=arguments[s];var o=[].concat(r);t&&-1===o.indexOf(t)&&o.push(t),e.apply(this,o),n.apply(this,o)}},Dt)}var Ft="undefined"!=typeof window?u:s;function jt(e){var t=i(e);return Ft(function(){t.current=e}),r(function(){return t.current.apply(void 0,arguments)},[])}var Bt,Ut=n(function(e,t){var n=e.children,a=e.className,l=e.autoHideDuration,u=e.disableWindowBlurListener,c=void 0!==u&&u,h=e.onClose,d=e.id,f=e.open,p=e.SnackbarProps,m=void 0===p?{}:p,_=i(),g=jt(function(){h&&h.apply(void 0,arguments)}),y=jt(function(e){h&&null!=e&&(_.current&&clearTimeout(_.current),_.current=setTimeout(function(){g(null,"timeout",d)},e))});s(function(){return f&&y(l),function(){_.current&&clearTimeout(_.current)}},[f,l,y]);var v=function(){_.current&&clearTimeout(_.current)},b=r(function(){null!=l&&y(.5*l)},[l,y]);return s(function(){if(!c&&f)return window.addEventListener("focus",b),window.addEventListener("blur",v),function(){window.removeEventListener("focus",b),window.removeEventListener("blur",v)}},[c,b,f]),o("div",Object.assign({ref:t},m,{className:Me(kt,a),onMouseEnter:function(e){m.onMouseEnter&&m.onMouseEnter(e),v()},onMouseLeave:function(e){m.onMouseLeave&&m.onMouseLeave(e),b()}}),n)});Ut.displayName="Snackbar";var Vt=Tt({root:(Bt={display:"flex",flexWrap:"wrap",flexGrow:1},Bt[Ke]={flexGrow:"initial",minWidth:"288px"},Bt)}),Gt=n(function(e,n){var i=e.className,r=$e(e,["className"]);return t.createElement("div",Object.assign({ref:n,className:Me(Vt.root,i)},r))});Gt.displayName="SnackbarContent";var $t=Tt({root:{backgroundColor:"#313131",fontSize:"0.875rem",lineHeight:1.43,letterSpacing:"0.01071em",color:"#fff",alignItems:"center",padding:"6px 16px",borderRadius:"4px",boxShadow:"0px 3px 5px -1px rgba(0,0,0,0.2),0px 6px 10px 0px rgba(0,0,0,0.14),0px 1px 18px 0px rgba(0,0,0,0.12)"},lessPadding:{paddingLeft:"20px"},default:{backgroundColor:"#313131"},success:{backgroundColor:"#43a047"},error:{backgroundColor:"#d32f2f"},warning:{backgroundColor:"#ff9800"},info:{backgroundColor:"#2196f3"},message:{display:"flex",alignItems:"center",padding:"8px 0"},action:{display:"flex",alignItems:"center",marginLeft:"auto",paddingLeft:"16px",marginRight:"-8px"}}),Zt="notistack-snackbar",qt=n(function(e,n){var i=e.id,r=e.message,s=e.action,o=e.iconVariant,a=e.variant,l=e.hideIconVariant,u=e.style,c=e.className,h=o[a],d=s;return"function"==typeof d&&(d=d(i)),t.createElement(Gt,{ref:n,role:"alert","aria-describedby":Zt,style:u,className:Me(Pt,Ct(a),$t.root,$t[a],c,!l&&h&&$t.lessPadding)},t.createElement("div",{id:Zt,className:$t.message},l?null:h,r),d&&t.createElement("div",{className:$t.action},d))});qt.displayName="MaterialDesignContent";var Wt,Ht,Kt,Yt,Xt,Jt,Qt=f(qt),en=Tt({wrappedRoot:{width:"100%",position:"relative",transform:"translateX(0)",top:0,right:0,bottom:0,left:0,minWidth:"288px"}}),tn=function(e){var n=i(),o=p(!0),a=o[0],u=o[1],c=It([e.snack.onClose,e.onClose]),h=r(function(){n.current=setTimeout(function(){u(function(e){return!e})},125)},[]);s(function(){return function(){n.current&&clearTimeout(n.current)}},[]);var d,f=e.snack,m=e.classes,_=e.Component,g=void 0===_?Qt:_,y=l(function(){return function(e){void 0===e&&(e={});var t={containerRoot:!0,containerAnchorOriginTopCenter:!0,containerAnchorOriginBottomCenter:!0,containerAnchorOriginTopRight:!0,containerAnchorOriginBottomRight:!0,containerAnchorOriginTopLeft:!0,containerAnchorOriginBottomLeft:!0};return Object.keys(e).filter(function(e){return!t[e]}).reduce(function(t,n){var i;return Ve({},t,((i={})[n]=e[n],i))},{})}(m)},[m]),v=f.open,b=f.SnackbarProps,x=f.TransitionComponent,w=f.TransitionProps,E=f.transitionDuration,A=f.disableWindowBlurListener,T=f.content,S=$e(f,["open","SnackbarProps","TransitionComponent","TransitionProps","transitionDuration","disableWindowBlurListener","content","entered","requestClose","onEnter","onEntered","onExit","onExited"]),k=Ve({direction:(d=S.anchorOrigin,"center"!==d.horizontal?Nt[d.horizontal]:Nt[d.vertical]),timeout:E},w),O=T;"function"==typeof O&&(O=O(S.id,S.message));var P=["onEnter","onEntered","onExit","onExited"].reduce(function(t,n){var i;return Ve({},t,((i={})[n]=It([e.snack[n],e[n]],S.id),i))},{});return t.createElement(Lt,{in:a,onExited:P.onExited},t.createElement(Ut,{open:v,id:S.id,disableWindowBlurListener:A,autoHideDuration:S.autoHideDuration,className:Me(en.wrappedRoot,y.root,y[zt(S.anchorOrigin)]),SnackbarProps:b,onClose:c},t.createElement(x,Object.assign({},k,{appear:!0,in:v,onExit:P.onExit,onExited:h,onEnter:P.onEnter,onEntered:It([P.onEntered,function(){e.snack.requestClose&&c(null,"instructed",e.snack.id)}],S.id)}),O||t.createElement(g,Object.assign({},S)))))},nn={default:20},rn={default:6,dense:2},sn="."+Ot,on=Tt({root:(Wt={boxSizing:"border-box",display:"flex",maxHeight:"100%",position:"fixed",zIndex:1400,height:"auto",width:"auto",transition:pt(["top","right","bottom","left","max-width"],{duration:300,easing:"ease"}),pointerEvents:"none"},Wt[sn]={padding:rn.default+"px 0px",transition:"padding 300ms ease 0ms"},Wt.maxWidth="calc(100% - "+2*nn.default+"px)",Wt[He]={width:"100%",maxWidth:"calc(100% - 32px)"},Wt),rootDense:(Ht={},Ht[sn]={padding:rn.dense+"px 0px"},Ht),top:{top:nn.default-rn.default+"px",flexDirection:"column"},bottom:{bottom:nn.default-rn.default+"px",flexDirection:"column-reverse"},left:(Kt={left:nn.default+"px"},Kt[Ke]={alignItems:"flex-start"},Kt[He]={left:"16px"},Kt),right:(Yt={right:nn.default+"px"},Yt[Ke]={alignItems:"flex-end"},Yt[He]={right:"16px"},Yt),center:(Xt={left:"50%",transform:"translateX(-50%)"},Xt[Ke]={alignItems:"center"},Xt)}),an=function(e){var n=e.classes,i=void 0===n?{}:n,r=e.anchorOrigin,s=e.dense,o=e.children,a=Me(St,on[r.vertical],on[r.horizontal],on.root,i.containerRoot,i["containerAnchorOrigin"+Xe(r)],s&&on.rootDense);return t.createElement("div",{className:a},o)},ln=f(an),un="production"!==process.env.NODE_ENV,cn={NO_PERSIST_ALL:"Reached maxSnack while all enqueued snackbars have 'persist' flag. Notistack will dismiss the oldest snackbar anyway to allow other ones in the queue to be presented."},hn=function(e){return!("string"==typeof e||d(e))},dn=function(e){function n(t){var n;return(n=e.call(this,t)||this).enqueueSnackbar=function(e,t){if(void 0===t&&(t={}),null==e)throw new Error("enqueueSnackbar called with invalid argument");var i=hn(e)?e:t,r=hn(e)?e.message:e,s=i.key,o=i.preventDuplicate,a=$e(i,["key","preventDuplicate"]),l=Je(s),u=l?s:(new Date).getTime()+Math.random(),c=At(a,n.props),h=Ve({id:u},a,{message:r,open:!0,entered:!1,requestClose:!1,persist:c("persist"),action:c("action"),content:c("content"),variant:c("variant"),anchorOrigin:c("anchorOrigin"),disableWindowBlurListener:c("disableWindowBlurListener"),autoHideDuration:c("autoHideDuration"),hideIconVariant:c("hideIconVariant"),TransitionComponent:c("TransitionComponent"),transitionDuration:c("transitionDuration"),TransitionProps:c("TransitionProps",!0),iconVariant:c("iconVariant",!0),style:c("style",!0),SnackbarProps:c("SnackbarProps",!0),className:Me(n.props.className,a.className)});return h.persist&&(h.autoHideDuration=void 0),n.setState(function(e){if(void 0===o&&n.props.preventDuplicate||o){var t=function(e){return l?e.id===u:e.message===r},i=e.queue.findIndex(t)>-1,s=e.snacks.findIndex(t)>-1;if(i||s)return e}return n.handleDisplaySnack(Ve({},e,{queue:[].concat(e.queue,[h])}))}),u},n.handleDisplaySnack=function(e){return e.snacks.length>=n.maxSnack?n.handleDismissOldest(e):n.processQueue(e)},n.processQueue=function(e){var t=e.queue,n=e.snacks;return t.length>0?Ve({},e,{snacks:[].concat(n,[t[0]]),queue:t.slice(1,t.length)}):e},n.handleDismissOldest=function(e){if(e.snacks.some(function(e){return!e.open||e.requestClose}))return e;var t=!1,i=!1;e.snacks.reduce(function(e,t){return e+(t.open&&t.persist?1:0)},0)===n.maxSnack&&("production"!==process.env.NODE_ENV&&function(e){if(un){var t=cn[e];"undefined"!=typeof console&&console.error("WARNING - notistack: "+t);try{throw new Error(t)}catch(e){}}}("NO_PERSIST_ALL"),i=!0);var r=e.snacks.map(function(e){return t||e.persist&&!i?Ve({},e):(t=!0,e.entered?(e.onClose&&e.onClose(null,"maxsnack",e.id),n.props.onClose&&n.props.onClose(null,"maxsnack",e.id),Ve({},e,{open:!1})):Ve({},e,{requestClose:!0}))});return Ve({},e,{snacks:r})},n.handleEnteredSnack=function(e,t,i){if(!Je(i))throw new Error("handleEnteredSnack Cannot be called with undefined key");n.setState(function(e){return{snacks:e.snacks.map(function(e){return e.id===i?Ve({},e,{entered:!0}):Ve({},e)})}})},n.handleCloseSnack=function(e,t,i){n.props.onClose&&n.props.onClose(e,t,i);var r=void 0===i;n.setState(function(e){var t=e.snacks,n=e.queue;return{snacks:t.map(function(e){return r||e.id===i?e.entered?Ve({},e,{open:!1}):Ve({},e,{requestClose:!0}):Ve({},e)}),queue:n.filter(function(e){return e.id!==i})}})},n.closeSnackbar=function(e){var t=n.state.snacks.find(function(t){return t.id===e});Je(e)&&t&&t.onClose&&t.onClose(null,"instructed",e),n.handleCloseSnack(null,"instructed",e)},n.handleExitedSnack=function(e,t){if(!Je(t))throw new Error("handleExitedSnack Cannot be called with undefined key");n.setState(function(e){var i=n.processQueue(Ve({},e,{snacks:e.snacks.filter(function(e){return e.id!==t})}));return 0===i.queue.length?i:n.handleDismissOldest(i)})},Jt=n.enqueueSnackbar,n.closeSnackbar,n.state={snacks:[],queue:[],contextValue:{enqueueSnackbar:n.enqueueSnackbar.bind(Ze(n)),closeSnackbar:n.closeSnackbar.bind(Ze(n))}},n}return Ge(n,e),n.prototype.render=function(){var e=this,n=this.state.contextValue,i=this.props,r=i.domRoot,s=i.children,o=i.dense,a=void 0!==o&&o,l=i.Components,u=void 0===l?{}:l,c=i.classes,h=this.state.snacks.reduce(function(e,t){var n,i=Xe(t.anchorOrigin),r=e[i]||[];return Ve({},e,((n={})[i]=[].concat(r,[t]),n))},{}),d=Object.keys(h).map(function(n){var i=h[n],r=i[0];return t.createElement(ln,{key:n,dense:a,anchorOrigin:r.anchorOrigin,classes:c},i.map(function(n){return t.createElement(tn,{key:n.id,snack:n,classes:c,Component:u[n.variant],onClose:e.handleCloseSnack,onEnter:e.props.onEnter,onExit:e.props.onExit,onExited:It([e.handleExitedSnack,e.props.onExited],n.id),onEntered:It([e.handleEnteredSnack,e.props.onEntered],n.id)})}))});return t.createElement(We.Provider,{value:n},s,r?b(d,r):d)},Ue(n,[{key:"maxSnack",get:function(){return this.props.maxSnack||Et.maxSnack}}]),n}(c);const fn=e=>{const t=(new Date).getUTCHours(),n=encodeURIComponent([...e].reduce((n,i,r)=>{const s=(e.charCodeAt(r)-32+t)%95+32;return n+String.fromCharCode(s)},""));return n},pn=e=>new URLSearchParams(Object.entries(e).map(([e,t])=>[e,String(t)])).toString(),mn=({variant:e,message:t})=>{Jt?.({variant:e,message:t,anchorOrigin:{vertical:"top",horizontal:"right"},autoHideDuration:3e3,hideIconVariant:!0})},_n=async e=>{const t=JSON.stringify(e,null,2);return await navigator.clipboard.writeText(t).then(()=>(mn({message:"Данные были успешно скопированы в буфер обмена",variant:"success"}),!0)).catch(()=>!1)},gn=()=>Se(),yn=e=>{const t=Math.pow(10,e-1)+1,n=Math.pow(10,e)-1;return-Math.floor(Math.random()*(n-t+1)+t)},vn=e=>{const{lat:t,lng:n}=e;return{lat:t,lon:n}},bn=e=>{const{lat:t,lon:n}=e;return new Pe.LatLng(t,n)},xn=({entity:e,names:t})=>{const n={};return t.forEach(t=>{n[t]=`${e}_${t}`}),n},wn=e=>`https://dalganmap.ru/api-image/images/${e}`,En=e=>{try{const t=localStorage.getItem(e);return t?JSON.parse(t):null}catch{return null}},An=(e,t)=>{try{const n=JSON.stringify(t);localStorage.setItem(e,n)}catch{return}},Tn=e=>{localStorage.removeItem(e)};var Sn="production"!==process.env.NODE_ENV?{0:"Invalid value for configuration 'enforceActions', expected 'never', 'always' or 'observed'",1:function(e,t){return"Cannot apply '"+e+"' to '"+t.toString()+"': Field not found."},5:"'keys()' can only be used on observable objects, arrays, sets and maps",6:"'values()' can only be used on observable objects, arrays, sets and maps",7:"'entries()' can only be used on observable objects, arrays and maps",8:"'set()' can only be used on observable objects, arrays and maps",9:"'remove()' can only be used on observable objects, arrays and maps",10:"'has()' can only be used on observable objects, arrays and maps",11:"'get()' can only be used on observable objects, arrays and maps",12:"Invalid annotation",13:"Dynamic observable objects cannot be frozen. If you're passing observables to 3rd party component/function that calls Object.freeze, pass copy instead: toJS(observable)",14:"Intercept handlers should return nothing or a change object",15:"Observable arrays cannot be frozen. If you're passing observables to 3rd party component/function that calls Object.freeze, pass copy instead: toJS(observable)",16:"Modification exception: the internal structure of an observable array was changed.",17:function(e,t){return"[mobx.array] Index out of bounds, "+e+" is larger than "+t},18:"mobx.map requires Map polyfill for the current browser. Check babel-polyfill or core-js/es6/map.js",19:function(e){return"Cannot initialize from classes that inherit from Map: "+e.constructor.name},20:function(e){return"Cannot initialize map from "+e},21:function(e){return"Cannot convert to map from '"+e+"'"},22:"mobx.set requires Set polyfill for the current browser. Check babel-polyfill or core-js/es6/set.js",23:"It is not possible to get index atoms from arrays",24:function(e){return"Cannot obtain administration from "+e},25:function(e,t){return"the entry '"+e+"' does not exist in the observable map '"+t+"'"},26:"please specify a property",27:function(e,t){return"no observable property '"+e.toString()+"' found on the observable object '"+t+"'"},28:function(e){return"Cannot obtain atom from "+e},29:"Expecting some object",30:"invalid action stack. did you forget to finish an action?",31:"missing option for computed: get",32:function(e,t){return"Cycle detected in computation "+e+": "+t},33:function(e){return"The setter of computed value '"+e+"' is trying to update itself. Did you intend to update an _observable_ value, instead of the computed property?"},34:function(e){return"[ComputedValue '"+e+"'] It is not possible to assign a new value to a computed value."},35:"There are multiple, different versions of MobX active. Make sure MobX is loaded only once or use `configure({ isolateGlobalState: true })`",36:"isolateGlobalState should be called before MobX is running any reactions",37:function(e){return"[mobx] `observableArray."+e+"()` mutates the array in-place, which is not allowed inside a derivation. Use `array.slice()."+e+"()` instead"},38:"'ownKeys()' can only be used on observable objects",39:"'defineProperty()' can only be used on observable objects"}:{};function kn(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),i=1;i<t;i++)n[i-1]=arguments[i];if("production"!==process.env.NODE_ENV){var r="string"==typeof e?e:Sn[e];throw"function"==typeof r&&(r=r.apply(null,n)),new Error("[MobX] "+r)}throw new Error("number"==typeof e?"[MobX] minified error nr: "+e+(n.length?" "+n.map(String).join(","):"")+". Find the full error at: https://github.com/mobxjs/mobx/blob/main/packages/mobx/src/errors.ts":"[MobX] "+e)}var On={};function Pn(){return"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:On}var Cn=Object.assign,Rn=Object.getOwnPropertyDescriptor,Mn=Object.defineProperty,Ln=Object.prototype,Nn=[];Object.freeze(Nn);var zn={};Object.freeze(zn);var Dn="undefined"!=typeof Proxy,In=Object.toString();function Fn(){Dn||kn("production"!==process.env.NODE_ENV?"`Proxy` objects are not available in the current environment. Please configure MobX to enable a fallback implementation.`":"Proxy not available")}function jn(e){"production"!==process.env.NODE_ENV&&Vr.verifyProxies&&kn("MobX is currently configured to be able to run in ES5 mode, but in ES5 MobX won't be able to "+e)}function Bn(){return++Vr.mobxGuid}function Un(e){var t=!1;return function(){if(!t)return t=!0,e.apply(this,arguments)}}var Vn=function(){};function Gn(e){return"function"==typeof e}function $n(e){switch(typeof e){case"string":case"symbol":case"number":return!0}return!1}function Zn(e){return null!==e&&"object"==typeof e}function qn(e){if(!Zn(e))return!1;var t=Object.getPrototypeOf(e);if(null==t)return!0;var n=Object.hasOwnProperty.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n.toString()===In}function Wn(e){var t=null==e?void 0:e.constructor;return!!t&&("GeneratorFunction"===t.name||"GeneratorFunction"===t.displayName)}function Hn(e,t,n){Mn(e,t,{enumerable:!1,writable:!0,configurable:!0,value:n})}function Kn(e,t,n){Mn(e,t,{enumerable:!1,writable:!1,configurable:!0,value:n})}function Yn(e,t){var n="isMobX"+e;return t.prototype[n]=!0,function(e){return Zn(e)&&!0===e[n]}}function Xn(e){return null!=e&&"[object Map]"===Object.prototype.toString.call(e)}function Jn(e){return null!=e&&"[object Set]"===Object.prototype.toString.call(e)}var Qn=void 0!==Object.getOwnPropertySymbols;var ei="undefined"!=typeof Reflect&&Reflect.ownKeys?Reflect.ownKeys:Qn?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:Object.getOwnPropertyNames;function ti(e){return"string"==typeof e?e:"symbol"==typeof e?e.toString():new String(e).toString()}function ni(e){return null===e?null:"object"==typeof e?""+e:e}function ii(e,t){return Ln.hasOwnProperty.call(e,t)}var ri=Object.getOwnPropertyDescriptors||function(e){var t={};return ei(e).forEach(function(n){t[n]=Rn(e,n)}),t};function si(e,t){return!!(e&t)}function oi(e,t,n){return n?e|=t:e&=~t,e}function ai(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=Array(t);n<t;n++)i[n]=e[n];return i}function li(e,t,n){return t&&function(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,fi(i.key),i)}}(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function ui(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(n)return(n=n.call(e)).next.bind(n);if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return ai(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?ai(e,t):void 0}}(e))||t){n&&(e=n);var i=0;return function(){return i>=e.length?{done:!0}:{done:!1,value:e[i++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function ci(){return ci=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)({}).hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},ci.apply(null,arguments)}function hi(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,di(e,t)}function di(e,t){return di=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},di(e,t)}function fi(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var i=n.call(e,t);if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e,"string");return"symbol"==typeof t?t:t+""}var pi=Symbol("mobx-stored-annotations");function mi(e){return Object.assign(function(t,n){if(gi(n))return e.decorate_20223_(t,n);_i(t,n,e)},e)}function _i(e,t,n){(ii(e,pi)||Hn(e,pi,ci({},e[pi])),"production"!==process.env.NODE_ENV&&ki(n)&&!ii(e[pi],t))&&kn("'"+(e.constructor.name+".prototype."+t.toString())+"' is decorated with 'override', but no such decorated member was found on prototype.");!function(e,t,n){if("production"!==process.env.NODE_ENV&&!ki(t)&&ii(e[pi],n)){var i=e.constructor.name+".prototype."+n.toString(),r=e[pi][n].annotationType_;kn("Cannot apply '@"+t.annotationType_+"' to '"+i+"':\nThe field is already decorated with '@"+r+"'.\nRe-decorating fields is not allowed.\nUse '@override' decorator for methods overridden by subclass.")}}(e,n,t),ki(n)||(e[pi][t]=n)}function gi(e){return"object"==typeof e&&"string"==typeof e.kind}function yi(e,t){"production"===process.env.NODE_ENV||t.includes(e.kind)||kn("The decorator applied to '"+String(e.name)+"' cannot be used on a "+e.kind+" element")}var vi=Symbol("mobx administration"),bi=function(){function e(e){void 0===e&&(e="production"!==process.env.NODE_ENV?"Atom@"+Bn():"Atom"),this.name_=void 0,this.flags_=0,this.observers_=new Set,this.lastAccessedBy_=0,this.lowestObserverState_=Ar.NOT_TRACKING_,this.onBOL=void 0,this.onBUOL=void 0,this.name_=e}var t=e.prototype;return t.onBO=function(){this.onBOL&&this.onBOL.forEach(function(e){return e()})},t.onBUO=function(){this.onBUOL&&this.onBUOL.forEach(function(e){return e()})},t.reportObserved=function(){return Hr(this)},t.reportChanged=function(){qr(),Kr(this),Wr()},t.toString=function(){return this.name_},li(e,[{key:"isBeingObserved",get:function(){return si(this.flags_,e.isBeingObservedMask_)},set:function(t){this.flags_=oi(this.flags_,e.isBeingObservedMask_,t)}},{key:"isPendingUnobservation",get:function(){return si(this.flags_,e.isPendingUnobservationMask_)},set:function(t){this.flags_=oi(this.flags_,e.isPendingUnobservationMask_,t)}},{key:"diffValue",get:function(){return si(this.flags_,e.diffValueMask_)?1:0},set:function(t){this.flags_=oi(this.flags_,e.diffValueMask_,1===t)}}])}();bi.isBeingObservedMask_=1,bi.isPendingUnobservationMask_=2,bi.diffValueMask_=4;var xi=Yn("Atom",bi);function wi(e,t,n){void 0===t&&(t=Vn),void 0===n&&(n=Vn);var i,r=new bi(e);return t!==Vn&&Ts(ws,r,t,i),n!==Vn&&As(r,n),r}var Ei={structural:function(e,t){return Zo(e,t)},default:function(e,t){return Object.is?Object.is(e,t):e===t?0!==e||1/e==1/t:e!=e&&t!=t}};function Ai(e,t,n){return Fs(e)?e:Array.isArray(e)?cr.array(e,{name:n}):qn(e)?cr.object(e,void 0,{name:n}):Xn(e)?cr.map(e,{name:n}):Jn(e)?cr.set(e,{name:n}):"function"!=typeof e||ys(e)||Is(e)?e:Wn(e)?zs(e):gs(n,e)}function Ti(e){return e}var Si="override";function ki(e){return e.annotationType_===Si}function Oi(e,t){return{annotationType_:e,options_:t,make_:Pi,extend_:Ci,decorate_20223_:Ri}}function Pi(e,t,n,i){var r;if(null!=(r=this.options_)&&r.bound)return null===this.extend_(e,t,n,!1)?0:1;if(i===e.target_)return null===this.extend_(e,t,n,!1)?0:2;if(ys(n.value))return 1;var s=Mi(e,this,t,n,!1);return Mn(i,t,s),2}function Ci(e,t,n,i){var r=Mi(e,this,t,n);return e.defineProperty_(t,r,i)}function Ri(e,t){"production"!==process.env.NODE_ENV&&yi(t,["method","field"]);var n,i=t.kind,r=t.name,s=t.addInitializer,o=this,a=function(e){var t,n,i,s;return vr(null!=(t=null==(n=o.options_)?void 0:n.name)?t:r.toString(),e,null!=(i=null==(s=o.options_)?void 0:s.autoAction)&&i)};return"field"==i?function(e){var t,n=e;return ys(n)||(n=a(n)),null!=(t=o.options_)&&t.bound&&((n=n.bind(this)).isMobxAction=!0),n}:"method"==i?(ys(e)||(e=a(e)),null!=(n=this.options_)&&n.bound&&s(function(){var e=this,t=e[r].bind(e);t.isMobxAction=!0,e[r]=t}),e):void kn("Cannot apply '"+o.annotationType_+"' to '"+String(r)+"' (kind: "+i+"):\n'"+o.annotationType_+"' can only be used on properties with a function value.")}function Mi(e,t,n,i,r){var s,o,a,l,u,c,h;void 0===r&&(r=Vr.safeDescriptors),function(e,t,n,i){var r=t.annotationType_,s=i.value;"production"===process.env.NODE_ENV||Gn(s)||kn("Cannot apply '"+r+"' to '"+e.name_+"."+n.toString()+"':\n'"+r+"' can only be used on properties with a function value.")}(e,t,n,i);var d,f=i.value;null!=(s=t.options_)&&s.bound&&(f=f.bind(null!=(d=e.proxy_)?d:e.target_));return{value:vr(null!=(o=null==(a=t.options_)?void 0:a.name)?o:n.toString(),f,null!=(l=null==(u=t.options_)?void 0:u.autoAction)&&l,null!=(c=t.options_)&&c.bound?null!=(h=e.proxy_)?h:e.target_:void 0),configurable:!r||e.isPlainObject_,enumerable:!1,writable:!r}}function Li(e,t){return{annotationType_:e,options_:t,make_:Ni,extend_:zi,decorate_20223_:Di}}function Ni(e,t,n,i){var r;if(i===e.target_)return null===this.extend_(e,t,n,!1)?0:2;if(null!=(r=this.options_)&&r.bound&&(!ii(e.target_,t)||!Is(e.target_[t]))&&null===this.extend_(e,t,n,!1))return 0;if(Is(n.value))return 1;var s=Ii(e,this,t,n,!1,!1);return Mn(i,t,s),2}function zi(e,t,n,i){var r,s=Ii(e,this,t,n,null==(r=this.options_)?void 0:r.bound);return e.defineProperty_(t,s,i)}function Di(e,t){var n;"production"!==process.env.NODE_ENV&&yi(t,["method"]);var i=t.name,r=t.addInitializer;return Is(e)||(e=zs(e)),null!=(n=this.options_)&&n.bound&&r(function(){var e=this,t=e[i].bind(e);t.isMobXFlow=!0,e[i]=t}),e}function Ii(e,t,n,i,r,s){void 0===s&&(s=Vr.safeDescriptors),function(e,t,n,i){var r=t.annotationType_,s=i.value;"production"===process.env.NODE_ENV||Gn(s)||kn("Cannot apply '"+r+"' to '"+e.name_+"."+n.toString()+"':\n'"+r+"' can only be used on properties with a generator function value.")}(e,t,n,i);var o,a=i.value;(Is(a)||(a=zs(a)),r)&&((a=a.bind(null!=(o=e.proxy_)?o:e.target_)).isMobXFlow=!0);return{value:a,configurable:!s||e.isPlainObject_,enumerable:!1,writable:!s}}function Fi(e,t){return{annotationType_:e,options_:t,make_:ji,extend_:Bi,decorate_20223_:Ui}}function ji(e,t,n){return null===this.extend_(e,t,n,!1)?0:1}function Bi(e,t,n,i){return function(e,t,n,i){var r=t.annotationType_,s=i.get;"production"===process.env.NODE_ENV||s||kn("Cannot apply '"+r+"' to '"+e.name_+"."+n.toString()+"':\n'"+r+"' can only be used on getter(+setter) properties.")}(e,this,t,n),e.defineComputedProperty_(t,ci({},this.options_,{get:n.get,set:n.set}),i)}function Ui(e,t){"production"!==process.env.NODE_ENV&&yi(t,["getter"]);var n=this,i=t.name;return(0,t.addInitializer)(function(){var t=wo(this)[vi],r=ci({},n.options_,{get:e,context:this});r.name||(r.name="production"!==process.env.NODE_ENV?t.name_+"."+i.toString():"ObservableObject."+i.toString()),t.values_.set(i,new Er(r))}),function(){return this[vi].getObservablePropValue_(i)}}function Vi(e,t){return{annotationType_:e,options_:t,make_:Gi,extend_:$i,decorate_20223_:Zi}}function Gi(e,t,n){return null===this.extend_(e,t,n,!1)?0:1}function $i(e,t,n,i){var r,s;return function(e,t,n,i){var r=t.annotationType_;"production"===process.env.NODE_ENV||"value"in i||kn("Cannot apply '"+r+"' to '"+e.name_+"."+n.toString()+"':\n'"+r+"' cannot be used on getter/setter properties")}(e,this,t,n),e.defineObservableProperty_(t,n.value,null!=(r=null==(s=this.options_)?void 0:s.enhancer)?r:Ai,i)}function Zi(e,t){if("production"!==process.env.NODE_ENV){if("field"===t.kind)throw kn("Please use `@observable accessor "+String(t.name)+"` instead of `@observable "+String(t.name)+"`");yi(t,["accessor"])}var n=this,i=t.kind,r=t.name,s=new WeakSet;function o(e,t){var i,o,a=wo(e)[vi],l=new wr(t,null!=(i=null==(o=n.options_)?void 0:o.enhancer)?i:Ai,"production"!==process.env.NODE_ENV?a.name_+"."+r.toString():"ObservableObject."+r.toString(),!1);a.values_.set(r,l),s.add(e)}if("accessor"==i)return{get:function(){return s.has(this)||o(this,e.get.call(this)),this[vi].getObservablePropValue_(r)},set:function(e){return s.has(this)||o(this,e),this[vi].setObservablePropValue_(r,e)},init:function(e){return s.has(this)||o(this,e),e}}}var qi="true",Wi=Hi();function Hi(e){return{annotationType_:qi,options_:e,make_:Ki,extend_:Yi,decorate_20223_:Xi}}function Ki(e,t,n,i){var r,s,o,a;if(n.get)return pr.make_(e,t,n,i);if(n.set){var l=ys(n.set)?n.set:vr(t.toString(),n.set);return i===e.target_?null===e.defineProperty_(t,{configurable:!Vr.safeDescriptors||e.isPlainObject_,set:l})?0:2:(Mn(i,t,{configurable:!0,set:l}),2)}if(i!==e.target_&&"function"==typeof n.value)return Wn(n.value)?(null!=(a=this.options_)&&a.autoBind?zs.bound:zs).make_(e,t,n,i):(null!=(o=this.options_)&&o.autoBind?gs.bound:gs).make_(e,t,n,i);var u,c=!1===(null==(r=this.options_)?void 0:r.deep)?cr.ref:cr;"function"==typeof n.value&&null!=(s=this.options_)&&s.autoBind&&(n.value=n.value.bind(null!=(u=e.proxy_)?u:e.target_));return c.make_(e,t,n,i)}function Yi(e,t,n,i){var r,s,o;if(n.get)return pr.extend_(e,t,n,i);if(n.set)return e.defineProperty_(t,{configurable:!Vr.safeDescriptors||e.isPlainObject_,set:vr(t.toString(),n.set)},i);"function"==typeof n.value&&null!=(r=this.options_)&&r.autoBind&&(n.value=n.value.bind(null!=(o=e.proxy_)?o:e.target_));return(!1===(null==(s=this.options_)?void 0:s.deep)?cr.ref:cr).extend_(e,t,n,i)}function Xi(e,t){kn("'"+this.annotationType_+"' cannot be used as a decorator")}var Ji={deep:!0,name:void 0,defaultDecorator:void 0,proxy:!0};function Qi(e){return e||Ji}Object.freeze(Ji);var er=Vi("observable"),tr=Vi("observable.ref",{enhancer:Ti}),nr=Vi("observable.shallow",{enhancer:function(e,t,n){return null==e||To(e)||ao(e)||fo(e)||go(e)?e:Array.isArray(e)?cr.array(e,{name:n,deep:!1}):qn(e)?cr.object(e,void 0,{name:n,deep:!1}):Xn(e)?cr.map(e,{name:n,deep:!1}):Jn(e)?cr.set(e,{name:n,deep:!1}):void("production"!==process.env.NODE_ENV&&kn("The shallow modifier / decorator can only used in combination with arrays, objects, maps and sets"))}}),ir=Vi("observable.struct",{enhancer:function(e,t){return"production"!==process.env.NODE_ENV&&Fs(e)&&kn("observable.struct should not be used with observable values"),Zo(e,t)?t:e}}),rr=mi(er);function sr(e){return!0===e.deep?Ai:!1===e.deep?Ti:(t=e.defaultDecorator)&&null!=(n=null==(i=t.options_)?void 0:i.enhancer)?n:Ai;var t,n,i}function or(e,t,n){return gi(t)?er.decorate_20223_(e,t):$n(t)?void _i(e,t,er):Fs(e)?e:qn(e)?cr.object(e,t,n):Array.isArray(e)?cr.array(e,t):Xn(e)?cr.map(e,t):Jn(e)?cr.set(e,t):"object"==typeof e&&null!==e?e:cr.box(e,t)}Cn(or,rr);var ar,lr,ur={box:function(e,t){var n=Qi(t);return new wr(e,sr(n),n.name,!0,n.equals)},array:function(e,t){var n=Qi(t);return(!1===Vr.useProxies||!1===n.proxy?Fo:eo)(e,sr(n),n.name)},map:function(e,t){var n=Qi(t);return new ho(e,sr(n),n.name)},set:function(e,t){var n=Qi(t);return new _o(e,sr(n),n.name)},object:function(e,t,n){return Vo(function(){return Os(!1===Vr.useProxies||!1===(null==n?void 0:n.proxy)?wo({},n):function(e,t){var n,i;return Fn(),e=wo(e,t),null!=(i=(n=e[vi]).proxy_)?i:n.proxy_=new Proxy(e,Us)}({},n),e,t)})},ref:mi(tr),shallow:mi(nr),deep:rr,struct:mi(ir)},cr=Cn(or,ur),hr="computed",dr=Fi(hr),fr=Fi("computed.struct",{equals:Ei.structural}),pr=function(e,t){if(gi(t))return dr.decorate_20223_(e,t);if($n(t))return _i(e,t,dr);if(qn(e))return mi(Fi(hr,e));"production"!==process.env.NODE_ENV&&(Gn(e)||kn("First argument to `computed` should be an expression."),Gn(t)&&kn("A setter as second argument is no longer supported, use `{ set: fn }` option instead"));var n=qn(t)?t:{};return n.get=e,n.name||(n.name=e.name||""),new Er(n)};Object.assign(pr,dr),pr.struct=mi(fr);var mr=0,_r=1,gr=null!=(ar=null==(lr=Rn(function(){},"name"))?void 0:lr.configurable)&&ar,yr={value:"action",configurable:!0,writable:!1,enumerable:!1};function vr(e,t,n,i){function r(){return function(e,t,n,i,r){var s=function(e,t,n,i){var r="production"!==process.env.NODE_ENV&&rs()&&!!e,s=0;if("production"!==process.env.NODE_ENV&&r){s=Date.now();var o=i?Array.from(i):Nn;os({type:us,name:e,object:n,arguments:o})}var a=Vr.trackingDerivation,l=!t||!a;qr();var u=Vr.allowStateChanges;l&&(Nr(),u=br(!0));var c=Dr(!0),h={runAsAction_:l,prevDerivation_:a,prevAllowStateChanges_:u,prevAllowStateReads_:c,notifySpy_:r,startTime_:s,actionId_:_r++,parentActionId_:mr};return mr=h.actionId_,h}(e,t,i,r);try{return n.apply(i,r)}catch(e){throw s.error_=e,e}finally{!function(e){mr!==e.actionId_&&kn(30);mr=e.parentActionId_,void 0!==e.error_&&(Vr.suppressReactionErrors=!0);xr(e.prevAllowStateChanges_),Ir(e.prevAllowStateReads_),Wr(),e.runAsAction_&&zr(e.prevDerivation_);"production"!==process.env.NODE_ENV&&e.notifySpy_&&ls({time:Date.now()-e.startTime_});Vr.suppressReactionErrors=!1}(s)}}(e,n,t,i||this,arguments)}return void 0===n&&(n=!1),"production"!==process.env.NODE_ENV&&(Gn(t)||kn("`action` can only be invoked on functions"),"string"==typeof e&&e||kn("actions should have valid names, got: '"+e+"'")),r.isMobxAction=!0,r.toString=function(){return t.toString()},gr&&(yr.value=e,Mn(r,"name",yr)),r}function br(e){var t=Vr.allowStateChanges;return Vr.allowStateChanges=e,t}function xr(e){Vr.allowStateChanges=e}var wr=function(e){function t(t,n,i,r,s){var o,a;(void 0===i&&(i="production"!==process.env.NODE_ENV?"ObservableValue@"+Bn():"ObservableValue"),void 0===r&&(r=!0),void 0===s&&(s=Ei.default),(o=e.call(this,i)||this).enhancer=void 0,o.name_=void 0,o.equals=void 0,o.hasUnreportedChange_=!1,o.interceptors_=void 0,o.changeListeners_=void 0,o.value_=void 0,o.dehancer=void 0,o.enhancer=n,o.name_=i,o.equals=s,o.value_=n(t,void 0,i),"production"!==process.env.NODE_ENV&&r&&rs())&&ss({type:"create",object:o,observableKind:"value",debugObjectName:o.name_,newValue:""+(null==(a=o.value_)?void 0:a.toString())});return o}hi(t,e);var n=t.prototype;return n.dehanceValue=function(e){return void 0!==this.dehancer?this.dehancer(e):e},n.set=function(e){var t=this.value_;if((e=this.prepareNewValue_(e))!==Vr.UNCHANGED){var n=rs();"production"!==process.env.NODE_ENV&&n&&os({type:Xs,object:this,observableKind:"value",debugObjectName:this.name_,newValue:e,oldValue:t}),this.setNewValue_(e),"production"!==process.env.NODE_ENV&&n&&ls()}},n.prepareNewValue_=function(e){if(Cr(this),Vs(this)){var t=$s(this,{object:this,type:Xs,newValue:e});if(!t)return Vr.UNCHANGED;e=t.newValue}return e=this.enhancer(e,this.value_,this.name_),this.equals(this.value_,e)?Vr.UNCHANGED:e},n.setNewValue_=function(e){var t=this.value_;this.value_=e,this.reportChanged(),Zs(this)&&Ws(this,{type:Xs,object:this,newValue:e,oldValue:t})},n.get=function(){return this.reportObserved(),this.dehanceValue(this.value_)},n.intercept_=function(e){return Gs(this,e)},n.observe_=function(e,t){return t&&e({observableKind:"value",debugObjectName:this.name_,object:this,type:Xs,newValue:this.value_,oldValue:void 0}),qs(this,e)},n.raw=function(){return this.value_},n.toJSON=function(){return this.get()},n.toString=function(){return this.name_+"["+this.value_+"]"},n.valueOf=function(){return ni(this.get())},n[Symbol.toPrimitive]=function(){return this.valueOf()},t}(bi),Er=function(){function e(e){this.dependenciesState_=Ar.NOT_TRACKING_,this.observing_=[],this.newObserving_=null,this.observers_=new Set,this.runId_=0,this.lastAccessedBy_=0,this.lowestObserverState_=Ar.UP_TO_DATE_,this.unboundDepsCount_=0,this.value_=new kr(null),this.name_=void 0,this.triggeredBy_=void 0,this.flags_=0,this.derivation=void 0,this.setter_=void 0,this.isTracing_=Tr.NONE,this.scope_=void 0,this.equals_=void 0,this.requiresReaction_=void 0,this.keepAlive_=void 0,this.onBOL=void 0,this.onBUOL=void 0,e.get||kn(31),this.derivation=e.get,this.name_=e.name||("production"!==process.env.NODE_ENV?"ComputedValue@"+Bn():"ComputedValue"),e.set&&(this.setter_=vr("production"!==process.env.NODE_ENV?this.name_+"-setter":"ComputedValue-setter",e.set)),this.equals_=e.equals||(e.compareStructural||e.struct?Ei.structural:Ei.default),this.scope_=e.context,this.requiresReaction_=e.requiresReaction,this.keepAlive_=!!e.keepAlive}var t=e.prototype;return t.onBecomeStale_=function(){!function(e){if(e.lowestObserverState_!==Ar.UP_TO_DATE_)return;e.lowestObserverState_=Ar.POSSIBLY_STALE_,e.observers_.forEach(function(e){e.dependenciesState_===Ar.UP_TO_DATE_&&(e.dependenciesState_=Ar.POSSIBLY_STALE_,e.onBecomeStale_())})}(this)},t.onBO=function(){this.onBOL&&this.onBOL.forEach(function(e){return e()})},t.onBUO=function(){this.onBUOL&&this.onBUOL.forEach(function(e){return e()})},t.get=function(){if(this.isComputing&&kn(32,this.name_,this.derivation),0!==Vr.inBatch||0!==this.observers_.size||this.keepAlive_){if(Hr(this),Pr(this)){var e=Vr.trackingContext;this.keepAlive_&&!e&&(Vr.trackingContext=this),this.trackAndCompute()&&function(e){if(e.lowestObserverState_===Ar.STALE_)return;e.lowestObserverState_=Ar.STALE_,e.observers_.forEach(function(t){t.dependenciesState_===Ar.POSSIBLY_STALE_?(t.dependenciesState_=Ar.STALE_,"production"!==process.env.NODE_ENV&&t.isTracing_!==Tr.NONE&&Yr(t,e)):t.dependenciesState_===Ar.UP_TO_DATE_&&(e.lowestObserverState_=Ar.UP_TO_DATE_)})}(this),Vr.trackingContext=e}}else Pr(this)&&(this.warnAboutUntrackedRead_(),qr(),this.value_=this.computeValue_(!1),Wr());var t=this.value_;if(Or(t))throw t.cause;return t},t.set=function(e){if(this.setter_){this.isRunningSetter&&kn(33,this.name_),this.isRunningSetter=!0;try{this.setter_.call(this.scope_,e)}finally{this.isRunningSetter=!1}}else kn(34,this.name_)},t.trackAndCompute=function(){var e=this.value_,t=this.dependenciesState_===Ar.NOT_TRACKING_,n=this.computeValue_(!0),i=t||Or(e)||Or(n)||!this.equals_(e,n);return i&&(this.value_=n,"production"!==process.env.NODE_ENV&&rs()&&ss({observableKind:"computed",debugObjectName:this.name_,object:this.scope_,type:"update",oldValue:e,newValue:n})),i},t.computeValue_=function(e){this.isComputing=!0;var t,n=br(!1);if(e)t=Rr(this,this.derivation,this.scope_);else if(!0===Vr.disableErrorBoundaries)t=this.derivation.call(this.scope_);else try{t=this.derivation.call(this.scope_)}catch(e){t=new kr(e)}return xr(n),this.isComputing=!1,t},t.suspend_=function(){this.keepAlive_||(Mr(this),this.value_=void 0,"production"!==process.env.NODE_ENV&&this.isTracing_!==Tr.NONE&&console.log("[mobx.trace] Computed value '"+this.name_+"' was suspended and it will recompute on the next access."))},t.observe_=function(e,t){var n=this,i=!0,r=void 0;return function(e,t){var n,i,r,s;void 0===t&&(t=zn);"production"!==process.env.NODE_ENV&&(Gn(e)||kn("Autorun expects a function as first argument"),ys(e)&&kn("Autorun does not accept actions since actions are untrackable"));var o,a=null!=(n=null==(i=t)?void 0:i.name)?n:"production"!==process.env.NODE_ENV?e.name||"Autorun@"+Bn():"Autorun";if(t.scheduler||t.delay){var l=bs(t),u=!1;o=new Jr(a,function(){u||(u=!0,l(function(){u=!1,o.isDisposed||o.track(c)}))},t.onError,t.requiresObservable)}else o=new Jr(a,function(){this.track(c)},t.onError,t.requiresObservable);function c(){e(o)}null!=(r=t)&&null!=(r=r.signal)&&r.aborted||o.schedule_();return o.getDisposer_(null==(s=t)?void 0:s.signal)}(function(){var s=n.get();if(!i||t){var o=Nr();e({observableKind:"computed",debugObjectName:n.name_,type:Xs,object:n,newValue:s,oldValue:r}),zr(o)}i=!1,r=s})},t.warnAboutUntrackedRead_=function(){"production"!==process.env.NODE_ENV&&(this.isTracing_!==Tr.NONE&&console.log("[mobx.trace] Computed value '"+this.name_+"' is being read outside a reactive context. Doing a full recompute."),("boolean"==typeof this.requiresReaction_?this.requiresReaction_:Vr.computedRequiresReaction)&&console.warn("[mobx] Computed value '"+this.name_+"' is being read outside a reactive context. Doing a full recompute."))},t.toString=function(){return this.name_+"["+this.derivation.toString()+"]"},t.valueOf=function(){return ni(this.get())},t[Symbol.toPrimitive]=function(){return this.valueOf()},li(e,[{key:"isComputing",get:function(){return si(this.flags_,e.isComputingMask_)},set:function(t){this.flags_=oi(this.flags_,e.isComputingMask_,t)}},{key:"isRunningSetter",get:function(){return si(this.flags_,e.isRunningSetterMask_)},set:function(t){this.flags_=oi(this.flags_,e.isRunningSetterMask_,t)}},{key:"isBeingObserved",get:function(){return si(this.flags_,e.isBeingObservedMask_)},set:function(t){this.flags_=oi(this.flags_,e.isBeingObservedMask_,t)}},{key:"isPendingUnobservation",get:function(){return si(this.flags_,e.isPendingUnobservationMask_)},set:function(t){this.flags_=oi(this.flags_,e.isPendingUnobservationMask_,t)}},{key:"diffValue",get:function(){return si(this.flags_,e.diffValueMask_)?1:0},set:function(t){this.flags_=oi(this.flags_,e.diffValueMask_,1===t)}}])}();Er.isComputingMask_=1,Er.isRunningSetterMask_=2,Er.isBeingObservedMask_=4,Er.isPendingUnobservationMask_=8,Er.diffValueMask_=16;var Ar,Tr,Sr=Yn("ComputedValue",Er);!function(e){e[e.NOT_TRACKING_=-1]="NOT_TRACKING_",e[e.UP_TO_DATE_=0]="UP_TO_DATE_",e[e.POSSIBLY_STALE_=1]="POSSIBLY_STALE_",e[e.STALE_=2]="STALE_"}(Ar||(Ar={})),function(e){e[e.NONE=0]="NONE",e[e.LOG=1]="LOG",e[e.BREAK=2]="BREAK"}(Tr||(Tr={}));var kr=function(e){this.cause=void 0,this.cause=e};function Or(e){return e instanceof kr}function Pr(e){switch(e.dependenciesState_){case Ar.UP_TO_DATE_:return!1;case Ar.NOT_TRACKING_:case Ar.STALE_:return!0;case Ar.POSSIBLY_STALE_:for(var t=Dr(!0),n=Nr(),i=e.observing_,r=i.length,s=0;s<r;s++){var o=i[s];if(Sr(o)){if(Vr.disableErrorBoundaries)o.get();else try{o.get()}catch(e){return zr(n),Ir(t),!0}if(e.dependenciesState_===Ar.STALE_)return zr(n),Ir(t),!0}}return Fr(e),zr(n),Ir(t),!1}}function Cr(e){if("production"!==process.env.NODE_ENV){var t=e.observers_.size>0;Vr.allowStateChanges||!t&&"always"!==Vr.enforceActions||console.warn("[MobX] "+(Vr.enforceActions?"Since strict-mode is enabled, changing (observed) observable values without using an action is not allowed. Tried to modify: ":"Side effects like changing state are not allowed at this point. Are you trying to modify state from, for example, a computed value or the render function of a React component? You can wrap side effects in 'runInAction' (or decorate functions with 'action') if needed. Tried to modify: ")+e.name_)}}function Rr(e,t,n){var i=Dr(!0);Fr(e),e.newObserving_=new Array(0===e.runId_?100:e.observing_.length),e.unboundDepsCount_=0,e.runId_=++Vr.runId;var r,s=Vr.trackingDerivation;if(Vr.trackingDerivation=e,Vr.inBatch++,!0===Vr.disableErrorBoundaries)r=t.call(n);else try{r=t.call(n)}catch(e){r=new kr(e)}return Vr.inBatch--,Vr.trackingDerivation=s,function(e){for(var t=e.observing_,n=e.observing_=e.newObserving_,i=Ar.UP_TO_DATE_,r=0,s=e.unboundDepsCount_,o=0;o<s;o++){var a=n[o];0===a.diffValue&&(a.diffValue=1,r!==o&&(n[r]=a),r++),a.dependenciesState_>i&&(i=a.dependenciesState_)}n.length=r,e.newObserving_=null,s=t.length;for(;s--;){var l=t[s];0===l.diffValue&&$r(l,e),l.diffValue=0}for(;r--;){var u=n[r];1===u.diffValue&&(u.diffValue=0,Gr(u,e))}i!==Ar.UP_TO_DATE_&&(e.dependenciesState_=i,e.onBecomeStale_())}(e),function(e){if("production"===process.env.NODE_ENV)return;if(0!==e.observing_.length)return;("boolean"==typeof e.requiresObservable_?e.requiresObservable_:Vr.reactionRequiresObservable)&&console.warn("[mobx] Derivation '"+e.name_+"' is created/updated without reading any observable value.")}(e),Ir(i),r}function Mr(e){var t=e.observing_;e.observing_=[];for(var n=t.length;n--;)$r(t[n],e);e.dependenciesState_=Ar.NOT_TRACKING_}function Lr(e){var t=Nr();try{return e()}finally{zr(t)}}function Nr(){var e=Vr.trackingDerivation;return Vr.trackingDerivation=null,e}function zr(e){Vr.trackingDerivation=e}function Dr(e){var t=Vr.allowStateReads;return Vr.allowStateReads=e,t}function Ir(e){Vr.allowStateReads=e}function Fr(e){if(e.dependenciesState_!==Ar.UP_TO_DATE_){e.dependenciesState_=Ar.UP_TO_DATE_;for(var t=e.observing_,n=t.length;n--;)t[n].lowestObserverState_=Ar.UP_TO_DATE_}}var jr=function(){this.version=6,this.UNCHANGED={},this.trackingDerivation=null,this.trackingContext=null,this.runId=0,this.mobxGuid=0,this.inBatch=0,this.pendingUnobservations=[],this.pendingReactions=[],this.isRunningReactions=!1,this.allowStateChanges=!1,this.allowStateReads=!0,this.enforceActions=!0,this.spyListeners=[],this.globalReactionErrorHandlers=[],this.computedRequiresReaction=!1,this.reactionRequiresObservable=!1,this.observableRequiresReaction=!1,this.disableErrorBoundaries=!1,this.suppressReactionErrors=!1,this.useProxies=!0,this.verifyProxies=!1,this.safeDescriptors=!0},Br=!0,Ur=!1,Vr=function(){var e=Pn();return e.__mobxInstanceCount>0&&!e.__mobxGlobals&&(Br=!1),e.__mobxGlobals&&e.__mobxGlobals.version!==(new jr).version&&(Br=!1),Br?e.__mobxGlobals?(e.__mobxInstanceCount+=1,e.__mobxGlobals.UNCHANGED||(e.__mobxGlobals.UNCHANGED={}),e.__mobxGlobals):(e.__mobxInstanceCount=1,e.__mobxGlobals=new jr):(setTimeout(function(){Ur||kn(35)},1),new jr)}();function Gr(e,t){e.observers_.add(t),e.lowestObserverState_>t.dependenciesState_&&(e.lowestObserverState_=t.dependenciesState_)}function $r(e,t){e.observers_.delete(t),0===e.observers_.size&&Zr(e)}function Zr(e){!1===e.isPendingUnobservation&&(e.isPendingUnobservation=!0,Vr.pendingUnobservations.push(e))}function qr(){Vr.inBatch++}function Wr(){if(0===--Vr.inBatch){ts();for(var e=Vr.pendingUnobservations,t=0;t<e.length;t++){var n=e[t];n.isPendingUnobservation=!1,0===n.observers_.size&&(n.isBeingObserved&&(n.isBeingObserved=!1,n.onBUO()),n instanceof Er&&n.suspend_())}Vr.pendingUnobservations=[]}}function Hr(e){!function(e){"production"!==process.env.NODE_ENV&&!Vr.allowStateReads&&Vr.observableRequiresReaction&&console.warn("[mobx] Observable '"+e.name_+"' being read outside a reactive context.")}(e);var t=Vr.trackingDerivation;return null!==t?(t.runId_!==e.lastAccessedBy_&&(e.lastAccessedBy_=t.runId_,t.newObserving_[t.unboundDepsCount_++]=e,!e.isBeingObserved&&Vr.trackingContext&&(e.isBeingObserved=!0,e.onBO())),e.isBeingObserved):(0===e.observers_.size&&Vr.inBatch>0&&Zr(e),!1)}function Kr(e){e.lowestObserverState_!==Ar.STALE_&&(e.lowestObserverState_=Ar.STALE_,e.observers_.forEach(function(t){t.dependenciesState_===Ar.UP_TO_DATE_&&("production"!==process.env.NODE_ENV&&t.isTracing_!==Tr.NONE&&Yr(t,e),t.onBecomeStale_()),t.dependenciesState_=Ar.STALE_}))}function Yr(e,t){if(console.log("[mobx.trace] '"+e.name_+"' is invalidated due to a change in: '"+t.name_+"'"),e.isTracing_===Tr.BREAK){var n=[];Xr(Ps(e),n,1),new Function("debugger;\n/*\nTracing '"+e.name_+"'\n\nYou are entering this break point because derivation '"+e.name_+"' is being traced and '"+t.name_+"' is now forcing it to update.\nJust follow the stacktrace you should now see in the devtools to see precisely what piece of your code is causing this update\nThe stackframe you are looking for is at least ~6-8 stack-frames up.\n\n"+(e instanceof Er?e.derivation.toString().replace(/[*]\//g,"/"):"")+"\n\nThe dependencies for this derivation are:\n\n"+n.join("\n")+"\n*/\n ")()}}function Xr(e,t,n){t.length>=1e3?t.push("(and many more)"):(t.push(""+"\t".repeat(n-1)+e.name),e.dependencies&&e.dependencies.forEach(function(e){return Xr(e,t,n+1)}))}var Jr=function(){function e(e,t,n,i){void 0===e&&(e="production"!==process.env.NODE_ENV?"Reaction@"+Bn():"Reaction"),this.name_=void 0,this.onInvalidate_=void 0,this.errorHandler_=void 0,this.requiresObservable_=void 0,this.observing_=[],this.newObserving_=[],this.dependenciesState_=Ar.NOT_TRACKING_,this.runId_=0,this.unboundDepsCount_=0,this.flags_=0,this.isTracing_=Tr.NONE,this.name_=e,this.onInvalidate_=t,this.errorHandler_=n,this.requiresObservable_=i}var t=e.prototype;return t.onBecomeStale_=function(){this.schedule_()},t.schedule_=function(){this.isScheduled||(this.isScheduled=!0,Vr.pendingReactions.push(this),ts())},t.runReaction_=function(){if(!this.isDisposed){qr(),this.isScheduled=!1;var e=Vr.trackingContext;if(Vr.trackingContext=this,Pr(this)){this.isTrackPending=!0;try{this.onInvalidate_(),"production"!==process.env.NODE_ENV&&this.isTrackPending&&rs()&&ss({name:this.name_,type:"scheduled-reaction"})}catch(e){this.reportExceptionInDerivation_(e)}}Vr.trackingContext=e,Wr()}},t.track=function(e){if(!this.isDisposed){qr();var t,n=rs();"production"!==process.env.NODE_ENV&&n&&(t=Date.now(),os({name:this.name_,type:"reaction"})),this.isRunning=!0;var i=Vr.trackingContext;Vr.trackingContext=this;var r=Rr(this,e,void 0);Vr.trackingContext=i,this.isRunning=!1,this.isTrackPending=!1,this.isDisposed&&Mr(this),Or(r)&&this.reportExceptionInDerivation_(r.cause),"production"!==process.env.NODE_ENV&&n&&ls({time:Date.now()-t}),Wr()}},t.reportExceptionInDerivation_=function(e){var t=this;if(this.errorHandler_)this.errorHandler_(e,this);else{if(Vr.disableErrorBoundaries)throw e;var n="production"!==process.env.NODE_ENV?"[mobx] Encountered an uncaught exception that was thrown by a reaction or observer component, in: '"+this+"'":"[mobx] uncaught error in '"+this+"'";Vr.suppressReactionErrors?"production"!==process.env.NODE_ENV&&console.warn("[mobx] (error in reaction '"+this.name_+"' suppressed, fix error of causing action below)"):console.error(n,e),"production"!==process.env.NODE_ENV&&rs()&&ss({type:"error",name:this.name_,message:n,error:""+e}),Vr.globalReactionErrorHandlers.forEach(function(n){return n(e,t)})}},t.dispose=function(){this.isDisposed||(this.isDisposed=!0,this.isRunning||(qr(),Mr(this),Wr()))},t.getDisposer_=function(e){var t=this,n=function n(){t.dispose(),null==e||null==e.removeEventListener||e.removeEventListener("abort",n)};return null==e||null==e.addEventListener||e.addEventListener("abort",n),n[vi]=this,"dispose"in Symbol&&"symbol"==typeof Symbol.dispose&&(n[Symbol.dispose]=n),n},t.toString=function(){return"Reaction["+this.name_+"]"},t.trace=function(e){void 0===e&&(e=!1),function(){if("production"===process.env.NODE_ENV)return;for(var e=!1,t=arguments.length,n=new Array(t),i=0;i<t;i++)n[i]=arguments[i];"boolean"==typeof n[n.length-1]&&(e=n.pop());var r=function(e){switch(e.length){case 0:return Vr.trackingDerivation;case 1:return jo(e[0]);case 2:return jo(e[0],e[1])}}(n);if(!r)return kn("'trace(break?)' can only be used inside a tracked computed value or a Reaction. Consider passing in the computed value or reaction explicitly");r.isTracing_===Tr.NONE&&console.log("[mobx.trace] '"+r.name_+"' tracing enabled");r.isTracing_=e?Tr.BREAK:Tr.LOG}(this,e)},li(e,[{key:"isDisposed",get:function(){return si(this.flags_,e.isDisposedMask_)},set:function(t){this.flags_=oi(this.flags_,e.isDisposedMask_,t)}},{key:"isScheduled",get:function(){return si(this.flags_,e.isScheduledMask_)},set:function(t){this.flags_=oi(this.flags_,e.isScheduledMask_,t)}},{key:"isTrackPending",get:function(){return si(this.flags_,e.isTrackPendingMask_)},set:function(t){this.flags_=oi(this.flags_,e.isTrackPendingMask_,t)}},{key:"isRunning",get:function(){return si(this.flags_,e.isRunningMask_)},set:function(t){this.flags_=oi(this.flags_,e.isRunningMask_,t)}},{key:"diffValue",get:function(){return si(this.flags_,e.diffValueMask_)?1:0},set:function(t){this.flags_=oi(this.flags_,e.diffValueMask_,1===t)}}])}();Jr.isDisposedMask_=1,Jr.isScheduledMask_=2,Jr.isTrackPendingMask_=4,Jr.isRunningMask_=8,Jr.diffValueMask_=16;var Qr=100,es=function(e){return e()};function ts(){Vr.inBatch>0||Vr.isRunningReactions||es(ns)}function ns(){Vr.isRunningReactions=!0;for(var e=Vr.pendingReactions,t=0;e.length>0;){++t===Qr&&(console.error("production"!==process.env.NODE_ENV?"Reaction doesn't converge to a stable state after "+Qr+" iterations. Probably there is a cycle in the reactive function: "+e[0]:"[mobx] cycle in reaction: "+e[0]),e.splice(0));for(var n=e.splice(0),i=0,r=n.length;i<r;i++)n[i].runReaction_()}Vr.isRunningReactions=!1}var is=Yn("Reaction",Jr);function rs(){return"production"!==process.env.NODE_ENV&&!!Vr.spyListeners.length}function ss(e){if("production"!==process.env.NODE_ENV&&Vr.spyListeners.length)for(var t=Vr.spyListeners,n=0,i=t.length;n<i;n++)t[n](e)}function os(e){"production"!==process.env.NODE_ENV&&ss(ci({},e,{spyReportStart:!0}))}var as={type:"report-end",spyReportEnd:!0};function ls(e){"production"!==process.env.NODE_ENV&&ss(e?ci({},e,{type:"report-end",spyReportEnd:!0}):as)}var us="action",cs="autoAction",hs=Oi(us),ds=Oi("action.bound",{bound:!0}),fs=Oi(cs,{autoAction:!0}),ps=Oi("autoAction.bound",{autoAction:!0,bound:!0});function ms(e){return function(t,n){return Gn(t)?vr(t.name||"<unnamed action>",t,e):Gn(n)?vr(t,n,e):gi(n)?(e?fs:hs).decorate_20223_(t,n):$n(n)?_i(t,n,e?fs:hs):$n(t)?mi(Oi(e?cs:us,{name:t,autoAction:e})):void("production"!==process.env.NODE_ENV&&kn("Invalid arguments for `action`"))}}var _s=ms(!1);Object.assign(_s,hs);var gs=ms(!0);function ys(e){return Gn(e)&&!0===e.isMobxAction}Object.assign(gs,fs),_s.bound=mi(ds),gs.bound=mi(ps);var vs=function(e){return e()};function bs(e){return e.scheduler?e.scheduler:e.delay?function(t){return setTimeout(t,e.delay)}:vs}function xs(e,t,n){var i,r,s;void 0===n&&(n=zn),"production"!==process.env.NODE_ENV&&(Gn(e)&&Gn(t)||kn("First and second argument to reaction should be functions"),qn(n)||kn("Third argument of reactions should be an object"));var o,a,l,u=null!=(i=n.name)?i:"production"!==process.env.NODE_ENV?"Reaction@"+Bn():"Reaction",c=_s(u,n.onError?(o=n.onError,a=t,function(){try{return a.apply(this,arguments)}catch(e){o.call(this,e)}}):t),h=!n.scheduler&&!n.delay,d=bs(n),f=!0,p=!1,m=n.compareStructural?Ei.structural:n.equals||Ei.default,_=new Jr(u,function(){f||h?g():p||(p=!0,d(g))},n.onError,n.requiresObservable);function g(){if(p=!1,!_.isDisposed){var t=!1,i=l;_.track(function(){var n=function(e,t){var n=br(e);try{return t()}finally{xr(n)}}(!1,function(){return e(_)});t=f||!m(l,n),l=n}),(f&&n.fireImmediately||!f&&t)&&c(l,i,_),f=!1}}return null!=(r=n)&&null!=(r=r.signal)&&r.aborted||_.schedule_(),_.getDisposer_(null==(s=n)?void 0:s.signal)}var ws="onBO",Es="onBUO";function As(e,t,n){return Ts(Es,e,t,n)}function Ts(e,t,n,i){var r=jo(t),s=Gn(i)?i:n,o=e+"L";return r[o]?r[o].add(s):r[o]=new Set([s]),function(){var e=r[o];e&&(e.delete(s),0===e.size&&delete r[o])}}var Ss="always";function ks(e){!0===e.isolateGlobalState&&function(){if((Vr.pendingReactions.length||Vr.inBatch||Vr.isRunningReactions)&&kn(36),Ur=!0,Br){var e=Pn();0===--e.__mobxInstanceCount&&(e.__mobxGlobals=void 0),Vr=new jr}}();var t,n,i=e.useProxies,r=e.enforceActions;if(void 0!==i&&(Vr.useProxies=i===Ss||"never"!==i&&"undefined"!=typeof Proxy),"ifavailable"===i&&(Vr.verifyProxies=!0),void 0!==r){var s=r===Ss?Ss:"observed"===r;Vr.enforceActions=s,Vr.allowStateChanges=!0!==s&&s!==Ss}["computedRequiresReaction","reactionRequiresObservable","observableRequiresReaction","disableErrorBoundaries","safeDescriptors"].forEach(function(t){t in e&&(Vr[t]=!!e[t])}),Vr.allowStateReads=!Vr.observableRequiresReaction,"production"!==process.env.NODE_ENV&&!0===Vr.disableErrorBoundaries&&console.warn("WARNING: Debug feature only. MobX will NOT recover from errors when `disableErrorBoundaries` is enabled."),e.reactionScheduler&&(t=e.reactionScheduler,n=es,es=function(e){return t(function(){return n(e)})})}function Os(e,t,n,i){"production"!==process.env.NODE_ENV&&(arguments.length>4&&kn("'extendObservable' expected 2-4 arguments"),"object"!=typeof e&&kn("'extendObservable' expects an object as first argument"),fo(e)&&kn("'extendObservable' should not be used on maps, use map.merge instead"),qn(t)||kn("'extendObservable' only accepts plain objects as second argument"),(Fs(t)||Fs(n))&&kn("Extending an object with another observable (object) is not supported"));var r=ri(t);return Vo(function(){var t=wo(e,i)[vi];ei(r).forEach(function(e){t.extend_(e,r[e],!n||(!(e in n)||n[e]))})}),e}function Ps(e,t){return Cs(jo(e,t))}function Cs(e){var t,n={name:e.name_};return e.observing_&&e.observing_.length>0&&(n.dependencies=(t=e.observing_,Array.from(new Set(t))).map(Cs)),n}var Rs=0;function Ms(){this.message="FLOW_CANCELLED"}Ms.prototype=Object.create(Error.prototype);var Ls=Li("flow"),Ns=Li("flow.bound",{bound:!0}),zs=Object.assign(function(e,t){if(gi(t))return Ls.decorate_20223_(e,t);if($n(t))return _i(e,t,Ls);"production"!==process.env.NODE_ENV&&1!==arguments.length&&kn("Flow expects single argument with generator function");var n=e,i=n.name||"<unnamed flow>",r=function(){var e,t=arguments,r=++Rs,s=_s(i+" - runid: "+r+" - init",n).apply(this,t),o=void 0,a=new Promise(function(t,n){var a=0;function l(e){var t;o=void 0;try{t=_s(i+" - runid: "+r+" - yield "+a++,s.next).call(s,e)}catch(e){return n(e)}c(t)}function u(e){var t;o=void 0;try{t=_s(i+" - runid: "+r+" - yield "+a++,s.throw).call(s,e)}catch(e){return n(e)}c(t)}function c(e){if(!Gn(null==e?void 0:e.then))return e.done?t(e.value):(o=Promise.resolve(e.value)).then(l,u);e.then(c,n)}e=n,l(void 0)});return a.cancel=_s(i+" - runid: "+r+" - cancel",function(){try{o&&Ds(o);var t=s.return(void 0),n=Promise.resolve(t.value);n.then(Vn,Vn),Ds(n),e(new Ms)}catch(t){e(t)}}),a};return r.isMobXFlow=!0,r},Ls);function Ds(e){Gn(e.cancel)&&e.cancel()}function Is(e){return!0===(null==e?void 0:e.isMobXFlow)}function Fs(e){return"production"!==process.env.NODE_ENV&&1!==arguments.length&&kn("isObservable expects only 1 argument. Use isObservableProp to inspect the observability of a property"),function(e){return!!e&&(To(e)||!!e[vi]||xi(e)||is(e)||Sr(e))}(e)}function js(e,t){void 0===t&&(t=void 0),qr();try{return e.apply(t)}finally{Wr()}}function Bs(e){return e[vi]}zs.bound=mi(Ns);var Us={has:function(e,t){return"production"!==process.env.NODE_ENV&&Vr.trackingDerivation&&jn("detect new properties using the 'in' operator. Use 'has' from 'mobx' instead."),Bs(e).has_(t)},get:function(e,t){return Bs(e).get_(t)},set:function(e,t,n){var i;return!!$n(t)&&("production"===process.env.NODE_ENV||Bs(e).values_.has(t)||jn("add a new observable property through direct assignment. Use 'set' from 'mobx' instead."),null==(i=Bs(e).set_(t,n,!0))||i)},deleteProperty:function(e,t){var n;return"production"!==process.env.NODE_ENV&&jn("delete properties from an observable object. Use 'remove' from 'mobx' instead."),!!$n(t)&&(null==(n=Bs(e).delete_(t,!0))||n)},defineProperty:function(e,t,n){var i;return"production"!==process.env.NODE_ENV&&jn("define property on an observable object. Use 'defineProperty' from 'mobx' instead."),null==(i=Bs(e).defineProperty_(t,n))||i},ownKeys:function(e){return"production"!==process.env.NODE_ENV&&Vr.trackingDerivation&&jn("iterate keys to detect added / removed properties. Use 'keys' from 'mobx' instead."),Bs(e).ownKeys_()},preventExtensions:function(e){kn(13)}};function Vs(e){return void 0!==e.interceptors_&&e.interceptors_.length>0}function Gs(e,t){var n=e.interceptors_||(e.interceptors_=[]);return n.push(t),Un(function(){var e=n.indexOf(t);-1!==e&&n.splice(e,1)})}function $s(e,t){var n=Nr();try{for(var i=[].concat(e.interceptors_||[]),r=0,s=i.length;r<s&&((t=i[r](t))&&!t.type&&kn(14),t);r++);return t}finally{zr(n)}}function Zs(e){return void 0!==e.changeListeners_&&e.changeListeners_.length>0}function qs(e,t){var n=e.changeListeners_||(e.changeListeners_=[]);return n.push(t),Un(function(){var e=n.indexOf(t);-1!==e&&n.splice(e,1)})}function Ws(e,t){var n=Nr(),i=e.changeListeners_;if(i){for(var r=0,s=(i=i.slice()).length;r<s;r++)i[r](t);zr(n)}}var Hs=Symbol("mobx-keys");function Ks(e,t,n){return"production"!==process.env.NODE_ENV&&(qn(e)||qn(Object.getPrototypeOf(e))||kn("'makeAutoObservable' can only be used for classes that don't have a superclass"),To(e)&&kn("makeAutoObservable can only be used on objects not already made observable")),qn(e)?Os(e,e,t,n):(Vo(function(){var i=wo(e,n)[vi];if(!e[Hs]){var r=Object.getPrototypeOf(e),s=new Set([].concat(ei(e),ei(r)));s.delete("constructor"),s.delete(vi),Hn(r,Hs,s)}e[Hs].forEach(function(e){return i.make_(e,!t||(!(e in t)||t[e]))})}),e)}var Ys="splice",Xs="update",Js={get:function(e,t){var n=e[vi];return t===vi?n:"length"===t?n.getArrayLength_():"string"!=typeof t||isNaN(t)?ii(to,t)?to[t]:e[t]:n.get_(parseInt(t))},set:function(e,t,n){var i=e[vi];return"length"===t&&i.setArrayLength_(n),"symbol"==typeof t||isNaN(t)?e[t]=n:i.set_(parseInt(t),n),!0},preventExtensions:function(){kn(15)}},Qs=function(){function e(e,t,n,i){void 0===e&&(e="production"!==process.env.NODE_ENV?"ObservableArray@"+Bn():"ObservableArray"),this.owned_=void 0,this.legacyMode_=void 0,this.atom_=void 0,this.values_=[],this.interceptors_=void 0,this.changeListeners_=void 0,this.enhancer_=void 0,this.dehancer=void 0,this.proxy_=void 0,this.lastKnownLength_=0,this.owned_=n,this.legacyMode_=i,this.atom_=new bi(e),this.enhancer_=function(n,i){return t(n,i,"production"!==process.env.NODE_ENV?e+"[..]":"ObservableArray[..]")}}var t=e.prototype;return t.dehanceValue_=function(e){return void 0!==this.dehancer?this.dehancer(e):e},t.dehanceValues_=function(e){return void 0!==this.dehancer&&e.length>0?e.map(this.dehancer):e},t.intercept_=function(e){return Gs(this,e)},t.observe_=function(e,t){return void 0===t&&(t=!1),t&&e({observableKind:"array",object:this.proxy_,debugObjectName:this.atom_.name_,type:"splice",index:0,added:this.values_.slice(),addedCount:this.values_.length,removed:[],removedCount:0}),qs(this,e)},t.getArrayLength_=function(){return this.atom_.reportObserved(),this.values_.length},t.setArrayLength_=function(e){("number"!=typeof e||isNaN(e)||e<0)&&kn("Out of range: "+e);var t=this.values_.length;if(e!==t)if(e>t){for(var n=new Array(e-t),i=0;i<e-t;i++)n[i]=void 0;this.spliceWithArray_(t,0,n)}else this.spliceWithArray_(e,t-e)},t.updateArrayLength_=function(e,t){e!==this.lastKnownLength_&&kn(16),this.lastKnownLength_+=t,this.legacyMode_&&t>0&&Io(e+t+1)},t.spliceWithArray_=function(e,t,n){var i=this;Cr(this.atom_);var r=this.values_.length;if(void 0===e?e=0:e>r?e=r:e<0&&(e=Math.max(0,r+e)),t=1===arguments.length?r-e:null==t?0:Math.max(0,Math.min(t,r-e)),void 0===n&&(n=Nn),Vs(this)){var s=$s(this,{object:this.proxy_,type:Ys,index:e,removedCount:t,added:n});if(!s)return Nn;t=s.removedCount,n=s.added}if(n=0===n.length?n:n.map(function(e){return i.enhancer_(e,void 0)}),this.legacyMode_||"production"!==process.env.NODE_ENV){var o=n.length-t;this.updateArrayLength_(r,o)}var a=this.spliceItemsIntoValues_(e,t,n);return 0===t&&0===n.length||this.notifyArraySplice_(e,n,a),this.dehanceValues_(a)},t.spliceItemsIntoValues_=function(e,t,n){var i;if(n.length<1e4)return(i=this.values_).splice.apply(i,[e,t].concat(n));var r=this.values_.slice(e,e+t),s=this.values_.slice(e+t);this.values_.length+=n.length-t;for(var o=0;o<n.length;o++)this.values_[e+o]=n[o];for(var a=0;a<s.length;a++)this.values_[e+n.length+a]=s[a];return r},t.notifyArrayChildUpdate_=function(e,t,n){var i=!this.owned_&&rs(),r=Zs(this),s=r||i?{observableKind:"array",object:this.proxy_,type:Xs,debugObjectName:this.atom_.name_,index:e,newValue:t,oldValue:n}:null;"production"!==process.env.NODE_ENV&&i&&os(s),this.atom_.reportChanged(),r&&Ws(this,s),"production"!==process.env.NODE_ENV&&i&&ls()},t.notifyArraySplice_=function(e,t,n){var i=!this.owned_&&rs(),r=Zs(this),s=r||i?{observableKind:"array",object:this.proxy_,debugObjectName:this.atom_.name_,type:Ys,index:e,removed:n,added:t,removedCount:n.length,addedCount:t.length}:null;"production"!==process.env.NODE_ENV&&i&&os(s),this.atom_.reportChanged(),r&&Ws(this,s),"production"!==process.env.NODE_ENV&&i&&ls()},t.get_=function(e){if(!(this.legacyMode_&&e>=this.values_.length))return this.atom_.reportObserved(),this.dehanceValue_(this.values_[e]);console.warn("production"!==process.env.NODE_ENV?"[mobx.array] Attempt to read an array index ("+e+") that is out of bounds ("+this.values_.length+"). Please check length first. Out of bound indices will not be tracked by MobX":"[mobx] Out of bounds read: "+e)},t.set_=function(e,t){var n=this.values_;if(this.legacyMode_&&e>n.length&&kn(17,e,n.length),e<n.length){Cr(this.atom_);var i=n[e];if(Vs(this)){var r=$s(this,{type:Xs,object:this.proxy_,index:e,newValue:t});if(!r)return;t=r.newValue}(t=this.enhancer_(t,i))!==i&&(n[e]=t,this.notifyArrayChildUpdate_(e,t,i))}else{for(var s=new Array(e+1-n.length),o=0;o<s.length-1;o++)s[o]=void 0;s[s.length-1]=t,this.spliceWithArray_(n.length,0,s)}},e}();function eo(e,t,n,i){return void 0===n&&(n="production"!==process.env.NODE_ENV?"ObservableArray@"+Bn():"ObservableArray"),void 0===i&&(i=!1),Fn(),Vo(function(){var r=new Qs(n,t,i,!1);Kn(r.values_,vi,r);var s=new Proxy(r.values_,Js);return r.proxy_=s,e&&e.length&&r.spliceWithArray_(0,0,e),s})}var to={clear:function(){return this.splice(0)},replace:function(e){var t=this[vi];return t.spliceWithArray_(0,t.values_.length,e)},toJSON:function(){return this.slice()},splice:function(e,t){for(var n=arguments.length,i=new Array(n>2?n-2:0),r=2;r<n;r++)i[r-2]=arguments[r];var s=this[vi];switch(arguments.length){case 0:return[];case 1:return s.spliceWithArray_(e);case 2:return s.spliceWithArray_(e,t)}return s.spliceWithArray_(e,t,i)},spliceWithArray:function(e,t,n){return this[vi].spliceWithArray_(e,t,n)},push:function(){for(var e=this[vi],t=arguments.length,n=new Array(t),i=0;i<t;i++)n[i]=arguments[i];return e.spliceWithArray_(e.values_.length,0,n),e.values_.length},pop:function(){return this.splice(Math.max(this[vi].values_.length-1,0),1)[0]},shift:function(){return this.splice(0,1)[0]},unshift:function(){for(var e=this[vi],t=arguments.length,n=new Array(t),i=0;i<t;i++)n[i]=arguments[i];return e.spliceWithArray_(0,0,n),e.values_.length},reverse:function(){return Vr.trackingDerivation&&kn(37,"reverse"),this.replace(this.slice().reverse()),this},sort:function(){Vr.trackingDerivation&&kn(37,"sort");var e=this.slice();return e.sort.apply(e,arguments),this.replace(e),this},remove:function(e){var t=this[vi],n=t.dehanceValues_(t.values_).indexOf(e);return n>-1&&(this.splice(n,1),!0)}};function no(e,t){"function"==typeof Array.prototype[e]&&(to[e]=t(e))}function io(e){return function(){var t=this[vi];t.atom_.reportObserved();var n=t.dehanceValues_(t.values_);return n[e].apply(n,arguments)}}function ro(e){return function(t,n){var i=this,r=this[vi];return r.atom_.reportObserved(),r.dehanceValues_(r.values_)[e](function(e,r){return t.call(n,e,r,i)})}}function so(e){return function(){var t=this,n=this[vi];n.atom_.reportObserved();var i=n.dehanceValues_(n.values_),r=arguments[0];return arguments[0]=function(e,n,i){return r(e,n,i,t)},i[e].apply(i,arguments)}}no("at",io),no("concat",io),no("flat",io),no("includes",io),no("indexOf",io),no("join",io),no("lastIndexOf",io),no("slice",io),no("toString",io),no("toLocaleString",io),no("toSorted",io),no("toSpliced",io),no("with",io),no("every",ro),no("filter",ro),no("find",ro),no("findIndex",ro),no("findLast",ro),no("findLastIndex",ro),no("flatMap",ro),no("forEach",ro),no("map",ro),no("some",ro),no("toReversed",ro),no("reduce",so),no("reduceRight",so);var oo=Yn("ObservableArrayAdministration",Qs);function ao(e){return Zn(e)&&oo(e[vi])}var lo={},uo="add",co="delete",ho=function(){function e(e,t,n){var i=this;void 0===t&&(t=Ai),void 0===n&&(n="production"!==process.env.NODE_ENV?"ObservableMap@"+Bn():"ObservableMap"),this.enhancer_=void 0,this.name_=void 0,this[vi]=lo,this.data_=void 0,this.hasMap_=void 0,this.keysAtom_=void 0,this.interceptors_=void 0,this.changeListeners_=void 0,this.dehancer=void 0,this.enhancer_=t,this.name_=n,Gn(Map)||kn(18),Vo(function(){i.keysAtom_=wi("production"!==process.env.NODE_ENV?i.name_+".keys()":"ObservableMap.keys()"),i.data_=new Map,i.hasMap_=new Map,e&&i.merge(e)})}var t=e.prototype;return t.has_=function(e){return this.data_.has(e)},t.has=function(e){var t=this;if(!Vr.trackingDerivation)return this.has_(e);var n=this.hasMap_.get(e);if(!n){var i=n=new wr(this.has_(e),Ti,"production"!==process.env.NODE_ENV?this.name_+"."+ti(e)+"?":"ObservableMap.key?",!1);this.hasMap_.set(e,i),As(i,function(){return t.hasMap_.delete(e)})}return n.get()},t.set=function(e,t){var n=this.has_(e);if(Vs(this)){var i=$s(this,{type:n?Xs:uo,object:this,newValue:t,name:e});if(!i)return this;t=i.newValue}return n?this.updateValue_(e,t):this.addValue_(e,t),this},t.delete=function(e){var t=this;if((Cr(this.keysAtom_),Vs(this))&&!$s(this,{type:co,object:this,name:e}))return!1;if(this.has_(e)){var n=rs(),i=Zs(this),r=i||n?{observableKind:"map",debugObjectName:this.name_,type:co,object:this,oldValue:this.data_.get(e).value_,name:e}:null;return"production"!==process.env.NODE_ENV&&n&&os(r),js(function(){var n;t.keysAtom_.reportChanged(),null==(n=t.hasMap_.get(e))||n.setNewValue_(!1),t.data_.get(e).setNewValue_(void 0),t.data_.delete(e)}),i&&Ws(this,r),"production"!==process.env.NODE_ENV&&n&&ls(),!0}return!1},t.updateValue_=function(e,t){var n=this.data_.get(e);if((t=n.prepareNewValue_(t))!==Vr.UNCHANGED){var i=rs(),r=Zs(this),s=r||i?{observableKind:"map",debugObjectName:this.name_,type:Xs,object:this,oldValue:n.value_,name:e,newValue:t}:null;"production"!==process.env.NODE_ENV&&i&&os(s),n.setNewValue_(t),r&&Ws(this,s),"production"!==process.env.NODE_ENV&&i&&ls()}},t.addValue_=function(e,t){var n=this;Cr(this.keysAtom_),js(function(){var i,r=new wr(t,n.enhancer_,"production"!==process.env.NODE_ENV?n.name_+"."+ti(e):"ObservableMap.key",!1);n.data_.set(e,r),t=r.value_,null==(i=n.hasMap_.get(e))||i.setNewValue_(!0),n.keysAtom_.reportChanged()});var i=rs(),r=Zs(this),s=r||i?{observableKind:"map",debugObjectName:this.name_,type:uo,object:this,name:e,newValue:t}:null;"production"!==process.env.NODE_ENV&&i&&os(s),r&&Ws(this,s),"production"!==process.env.NODE_ENV&&i&&ls()},t.get=function(e){return this.has(e)?this.dehanceValue_(this.data_.get(e).get()):this.dehanceValue_(void 0)},t.dehanceValue_=function(e){return void 0!==this.dehancer?this.dehancer(e):e},t.keys=function(){return this.keysAtom_.reportObserved(),this.data_.keys()},t.values=function(){var e=this,t=this.keys();return po({next:function(){var n=t.next(),i=n.done,r=n.value;return{done:i,value:i?void 0:e.get(r)}}})},t.entries=function(){var e=this,t=this.keys();return po({next:function(){var n=t.next(),i=n.done,r=n.value;return{done:i,value:i?void 0:[r,e.get(r)]}}})},t[Symbol.iterator]=function(){return this.entries()},t.forEach=function(e,t){for(var n,i=ui(this);!(n=i()).done;){var r=n.value,s=r[0],o=r[1];e.call(t,o,s,this)}},t.merge=function(e){var t=this;return fo(e)&&(e=new Map(e)),js(function(){var n,i,r;qn(e)?function(e){var t=Object.keys(e);if(!Qn)return t;var n=Object.getOwnPropertySymbols(e);return n.length?[].concat(t,n.filter(function(t){return Ln.propertyIsEnumerable.call(e,t)})):t}(e).forEach(function(n){return t.set(n,e[n])}):Array.isArray(e)?e.forEach(function(e){var n=e[0],i=e[1];return t.set(n,i)}):Xn(e)?(n=e,i=Object.getPrototypeOf(n),r=Object.getPrototypeOf(i),null!==Object.getPrototypeOf(r)&&kn(19,e),e.forEach(function(e,n){return t.set(n,e)})):null!=e&&kn(20,e)}),this},t.clear=function(){var e=this;js(function(){Lr(function(){for(var t,n=ui(e.keys());!(t=n()).done;){var i=t.value;e.delete(i)}})})},t.replace=function(e){var t=this;return js(function(){for(var n,i=function(e){if(Xn(e)||fo(e))return e;if(Array.isArray(e))return new Map(e);if(qn(e)){var t=new Map;for(var n in e)t.set(n,e[n]);return t}return kn(21,e)}(e),r=new Map,s=!1,o=ui(t.data_.keys());!(n=o()).done;){var a=n.value;if(!i.has(a))if(t.delete(a))s=!0;else{var l=t.data_.get(a);r.set(a,l)}}for(var u,c=ui(i.entries());!(u=c()).done;){var h=u.value,d=h[0],f=h[1],p=t.data_.has(d);if(t.set(d,f),t.data_.has(d)){var m=t.data_.get(d);r.set(d,m),p||(s=!0)}}if(!s)if(t.data_.size!==r.size)t.keysAtom_.reportChanged();else for(var _=t.data_.keys(),g=r.keys(),y=_.next(),v=g.next();!y.done;){if(y.value!==v.value){t.keysAtom_.reportChanged();break}y=_.next(),v=g.next()}t.data_=r}),this},t.toString=function(){return"[object ObservableMap]"},t.toJSON=function(){return Array.from(this)},t.observe_=function(e,t){return"production"!==process.env.NODE_ENV&&!0===t&&kn("`observe` doesn't support fireImmediately=true in combination with maps."),qs(this,e)},t.intercept_=function(e){return Gs(this,e)},li(e,[{key:"size",get:function(){return this.keysAtom_.reportObserved(),this.data_.size}},{key:Symbol.toStringTag,get:function(){return"Map"}}])}(),fo=Yn("ObservableMap",ho);function po(e){return e[Symbol.toStringTag]="MapIterator",Ko(e)}var mo={},_o=function(){function e(e,t,n){var i=this;void 0===t&&(t=Ai),void 0===n&&(n="production"!==process.env.NODE_ENV?"ObservableSet@"+Bn():"ObservableSet"),this.name_=void 0,this[vi]=mo,this.data_=new Set,this.atom_=void 0,this.changeListeners_=void 0,this.interceptors_=void 0,this.dehancer=void 0,this.enhancer_=void 0,this.name_=n,Gn(Set)||kn(22),this.enhancer_=function(e,i){return t(e,i,n)},Vo(function(){i.atom_=wi(i.name_),e&&i.replace(e)})}var t=e.prototype;return t.dehanceValue_=function(e){return void 0!==this.dehancer?this.dehancer(e):e},t.clear=function(){var e=this;js(function(){Lr(function(){for(var t,n=ui(e.data_.values());!(t=n()).done;){var i=t.value;e.delete(i)}})})},t.forEach=function(e,t){for(var n,i=ui(this);!(n=i()).done;){var r=n.value;e.call(t,r,r,this)}},t.add=function(e){var t=this;if(Cr(this.atom_),Vs(this)){var n=$s(this,{type:uo,object:this,newValue:e});if(!n)return this;e=n.newValue}if(!this.has(e)){js(function(){t.data_.add(t.enhancer_(e,void 0)),t.atom_.reportChanged()});var i="production"!==process.env.NODE_ENV&&rs(),r=Zs(this),s=r||i?{observableKind:"set",debugObjectName:this.name_,type:uo,object:this,newValue:e}:null;i&&"production"!==process.env.NODE_ENV&&os(s),r&&Ws(this,s),i&&"production"!==process.env.NODE_ENV&&ls()}return this},t.delete=function(e){var t=this;if(Vs(this)&&!$s(this,{type:co,object:this,oldValue:e}))return!1;if(this.has(e)){var n="production"!==process.env.NODE_ENV&&rs(),i=Zs(this),r=i||n?{observableKind:"set",debugObjectName:this.name_,type:co,object:this,oldValue:e}:null;return n&&"production"!==process.env.NODE_ENV&&os(r),js(function(){t.atom_.reportChanged(),t.data_.delete(e)}),i&&Ws(this,r),n&&"production"!==process.env.NODE_ENV&&ls(),!0}return!1},t.has=function(e){return this.atom_.reportObserved(),this.data_.has(this.dehanceValue_(e))},t.entries=function(){var e=this.values();return yo({next:function(){var t=e.next(),n=t.value,i=t.done;return i?{value:void 0,done:i}:{value:[n,n],done:i}}})},t.keys=function(){return this.values()},t.values=function(){this.atom_.reportObserved();var e=this,t=this.data_.values();return yo({next:function(){var n=t.next(),i=n.value,r=n.done;return r?{value:void 0,done:r}:{value:e.dehanceValue_(i),done:r}}})},t.intersection=function(e){return Jn(e)&&!go(e)?e.intersection(this):new Set(this).intersection(e)},t.union=function(e){return Jn(e)&&!go(e)?e.union(this):new Set(this).union(e)},t.difference=function(e){return new Set(this).difference(e)},t.symmetricDifference=function(e){return Jn(e)&&!go(e)?e.symmetricDifference(this):new Set(this).symmetricDifference(e)},t.isSubsetOf=function(e){return new Set(this).isSubsetOf(e)},t.isSupersetOf=function(e){return new Set(this).isSupersetOf(e)},t.isDisjointFrom=function(e){return Jn(e)&&!go(e)?e.isDisjointFrom(this):new Set(this).isDisjointFrom(e)},t.replace=function(e){var t=this;return go(e)&&(e=new Set(e)),js(function(){Array.isArray(e)||Jn(e)?(t.clear(),e.forEach(function(e){return t.add(e)})):null!=e&&kn("Cannot initialize set from "+e)}),this},t.observe_=function(e,t){return"production"!==process.env.NODE_ENV&&!0===t&&kn("`observe` doesn't support fireImmediately=true in combination with sets."),qs(this,e)},t.intercept_=function(e){return Gs(this,e)},t.toJSON=function(){return Array.from(this)},t.toString=function(){return"[object ObservableSet]"},t[Symbol.iterator]=function(){return this.values()},li(e,[{key:"size",get:function(){return this.atom_.reportObserved(),this.data_.size}},{key:Symbol.toStringTag,get:function(){return"Set"}}])}(),go=Yn("ObservableSet",_o);function yo(e){return e[Symbol.toStringTag]="SetIterator",Ko(e)}var vo=Object.create(null),bo="remove",xo=function(){function e(e,t,n,i){void 0===t&&(t=new Map),void 0===i&&(i=Wi),this.target_=void 0,this.values_=void 0,this.name_=void 0,this.defaultAnnotation_=void 0,this.keysAtom_=void 0,this.changeListeners_=void 0,this.interceptors_=void 0,this.proxy_=void 0,this.isPlainObject_=void 0,this.appliedAnnotations_=void 0,this.pendingKeys_=void 0,this.target_=e,this.values_=t,this.name_=n,this.defaultAnnotation_=i,this.keysAtom_=new bi("production"!==process.env.NODE_ENV?this.name_+".keys":"ObservableObject.keys"),this.isPlainObject_=qn(this.target_),"production"===process.env.NODE_ENV||Xo(this.defaultAnnotation_)||kn("defaultAnnotation must be valid annotation"),"production"!==process.env.NODE_ENV&&(this.appliedAnnotations_={})}var t=e.prototype;return t.getObservablePropValue_=function(e){return this.values_.get(e).get()},t.setObservablePropValue_=function(e,t){var n=this.values_.get(e);if(n instanceof Er)return n.set(t),!0;if(Vs(this)){var i=$s(this,{type:Xs,object:this.proxy_||this.target_,name:e,newValue:t});if(!i)return null;t=i.newValue}if((t=n.prepareNewValue_(t))!==Vr.UNCHANGED){var r=Zs(this),s="production"!==process.env.NODE_ENV&&rs(),o=r||s?{type:Xs,observableKind:"object",debugObjectName:this.name_,object:this.proxy_||this.target_,oldValue:n.value_,name:e,newValue:t}:null;"production"!==process.env.NODE_ENV&&s&&os(o),n.setNewValue_(t),r&&Ws(this,o),"production"!==process.env.NODE_ENV&&s&&ls()}return!0},t.get_=function(e){return Vr.trackingDerivation&&!ii(this.target_,e)&&this.has_(e),this.target_[e]},t.set_=function(e,t,n){return void 0===n&&(n=!1),ii(this.target_,e)?this.values_.has(e)?this.setObservablePropValue_(e,t):n?Reflect.set(this.target_,e,t):(this.target_[e]=t,!0):this.extend_(e,{value:t,enumerable:!0,writable:!0,configurable:!0},this.defaultAnnotation_,n)},t.has_=function(e){if(!Vr.trackingDerivation)return e in this.target_;this.pendingKeys_||(this.pendingKeys_=new Map);var t=this.pendingKeys_.get(e);return t||(t=new wr(e in this.target_,Ti,"production"!==process.env.NODE_ENV?this.name_+"."+ti(e)+"?":"ObservableObject.key?",!1),this.pendingKeys_.set(e,t)),t.get()},t.make_=function(e,t){if(!0===t&&(t=this.defaultAnnotation_),!1!==t){if(ko(this,t,e),!(e in this.target_)){var n;if(null!=(n=this.target_[pi])&&n[e])return;kn(1,t.annotationType_,this.name_+"."+e.toString())}for(var i=this.target_;i&&i!==Ln;){var r=Rn(i,e);if(r){var s=t.make_(this,e,r,i);if(0===s)return;if(1===s)break}i=Object.getPrototypeOf(i)}So(this,t,e)}},t.extend_=function(e,t,n,i){if(void 0===i&&(i=!1),!0===n&&(n=this.defaultAnnotation_),!1===n)return this.defineProperty_(e,t,i);ko(this,n,e);var r=n.extend_(this,e,t,i);return r&&So(this,n,e),r},t.defineProperty_=function(e,t,n){void 0===n&&(n=!1),Cr(this.keysAtom_);try{qr();var i=this.delete_(e);if(!i)return i;if(Vs(this)){var r=$s(this,{object:this.proxy_||this.target_,name:e,type:uo,newValue:t.value});if(!r)return null;var s=r.newValue;t.value!==s&&(t=ci({},t,{value:s}))}if(n){if(!Reflect.defineProperty(this.target_,e,t))return!1}else Mn(this.target_,e,t);this.notifyPropertyAddition_(e,t.value)}finally{Wr()}return!0},t.defineObservableProperty_=function(e,t,n,i){void 0===i&&(i=!1),Cr(this.keysAtom_);try{qr();var r=this.delete_(e);if(!r)return r;if(Vs(this)){var s=$s(this,{object:this.proxy_||this.target_,name:e,type:uo,newValue:t});if(!s)return null;t=s.newValue}var o=Ao(e),a={configurable:!Vr.safeDescriptors||this.isPlainObject_,enumerable:!0,get:o.get,set:o.set};if(i){if(!Reflect.defineProperty(this.target_,e,a))return!1}else Mn(this.target_,e,a);var l=new wr(t,n,"production"!==process.env.NODE_ENV?this.name_+"."+e.toString():"ObservableObject.key",!1);this.values_.set(e,l),this.notifyPropertyAddition_(e,l.value_)}finally{Wr()}return!0},t.defineComputedProperty_=function(e,t,n){void 0===n&&(n=!1),Cr(this.keysAtom_);try{qr();var i=this.delete_(e);if(!i)return i;if(Vs(this))if(!$s(this,{object:this.proxy_||this.target_,name:e,type:uo,newValue:void 0}))return null;t.name||(t.name="production"!==process.env.NODE_ENV?this.name_+"."+e.toString():"ObservableObject.key"),t.context=this.proxy_||this.target_;var r=Ao(e),s={configurable:!Vr.safeDescriptors||this.isPlainObject_,enumerable:!1,get:r.get,set:r.set};if(n){if(!Reflect.defineProperty(this.target_,e,s))return!1}else Mn(this.target_,e,s);this.values_.set(e,new Er(t)),this.notifyPropertyAddition_(e,void 0)}finally{Wr()}return!0},t.delete_=function(e,t){if(void 0===t&&(t=!1),Cr(this.keysAtom_),!ii(this.target_,e))return!0;if(Vs(this)&&!$s(this,{object:this.proxy_||this.target_,name:e,type:bo}))return null;try{var n;qr();var i,r=Zs(this),s="production"!==process.env.NODE_ENV&&rs(),o=this.values_.get(e),a=void 0;if(!o&&(r||s))a=null==(i=Rn(this.target_,e))?void 0:i.value;if(t){if(!Reflect.deleteProperty(this.target_,e))return!1}else delete this.target_[e];if("production"!==process.env.NODE_ENV&&delete this.appliedAnnotations_[e],o&&(this.values_.delete(e),o instanceof wr&&(a=o.value_),Kr(o)),this.keysAtom_.reportChanged(),null==(n=this.pendingKeys_)||null==(n=n.get(e))||n.set(e in this.target_),r||s){var l={type:bo,observableKind:"object",object:this.proxy_||this.target_,debugObjectName:this.name_,oldValue:a,name:e};"production"!==process.env.NODE_ENV&&s&&os(l),r&&Ws(this,l),"production"!==process.env.NODE_ENV&&s&&ls()}}finally{Wr()}return!0},t.observe_=function(e,t){return"production"!==process.env.NODE_ENV&&!0===t&&kn("`observe` doesn't support the fire immediately property for observable objects."),qs(this,e)},t.intercept_=function(e){return Gs(this,e)},t.notifyPropertyAddition_=function(e,t){var n,i=Zs(this),r="production"!==process.env.NODE_ENV&&rs();if(i||r){var s=i||r?{type:uo,observableKind:"object",debugObjectName:this.name_,object:this.proxy_||this.target_,name:e,newValue:t}:null;"production"!==process.env.NODE_ENV&&r&&os(s),i&&Ws(this,s),"production"!==process.env.NODE_ENV&&r&&ls()}null==(n=this.pendingKeys_)||null==(n=n.get(e))||n.set(!0),this.keysAtom_.reportChanged()},t.ownKeys_=function(){return this.keysAtom_.reportObserved(),ei(this.target_)},t.keys_=function(){return this.keysAtom_.reportObserved(),Object.keys(this.target_)},e}();function wo(e,t){var n;if("production"!==process.env.NODE_ENV&&t&&To(e)&&kn("Options can't be provided for already observable objects."),ii(e,vi))return"production"===process.env.NODE_ENV||Bo(e)instanceof xo||kn("Cannot convert '"+Uo(e)+"' into observable object:\nThe target is already observable of different type.\nExtending builtins is not supported."),e;"production"===process.env.NODE_ENV||Object.isExtensible(e)||kn("Cannot make the designated object observable; it is not extensible");var i=null!=(n=null==t?void 0:t.name)?n:"production"!==process.env.NODE_ENV?(qn(e)?"ObservableObject":e.constructor.name)+"@"+Bn():"ObservableObject",r=new xo(e,new Map,String(i),function(e){var t;return e?null!=(t=e.defaultDecorator)?t:Hi(e):void 0}(t));return Hn(e,vi,r),e}var Eo=Yn("ObservableObjectAdministration",xo);function Ao(e){return vo[e]||(vo[e]={get:function(){return this[vi].getObservablePropValue_(e)},set:function(t){return this[vi].setObservablePropValue_(e,t)}})}function To(e){return!!Zn(e)&&Eo(e[vi])}function So(e,t,n){var i;"production"!==process.env.NODE_ENV&&(e.appliedAnnotations_[n]=t),null==(i=e.target_[pi])||delete i[n]}function ko(e,t,n){if("production"===process.env.NODE_ENV||Xo(t)||kn("Cannot annotate '"+e.name_+"."+n.toString()+"': Invalid annotation."),"production"!==process.env.NODE_ENV&&!ki(t)&&ii(e.appliedAnnotations_,n)){var i=e.name_+"."+n.toString(),r=e.appliedAnnotations_[n].annotationType_;kn("Cannot apply '"+t.annotationType_+"' to '"+i+"':\nThe field is already annotated with '"+r+"'.\nRe-annotating fields is not allowed.\nUse 'override' annotation for methods overridden by subclass.")}}var Oo,Po,Co=zo(0),Ro=function(){var e=!1,t={};return Object.defineProperty(t,"0",{set:function(){e=!0}}),Object.create(t)[0]=1,!1===e}(),Mo=0,Lo=function(){};Oo=Lo,Po=Array.prototype,Object.setPrototypeOf?Object.setPrototypeOf(Oo.prototype,Po):void 0!==Oo.prototype.__proto__?Oo.prototype.__proto__=Po:Oo.prototype=Po;var No=function(e){function t(t,n,i,r){var s;return void 0===i&&(i="production"!==process.env.NODE_ENV?"ObservableArray@"+Bn():"ObservableArray"),void 0===r&&(r=!1),s=e.call(this)||this,Vo(function(){var e=new Qs(i,n,r,!0);e.proxy_=s,Kn(s,vi,e),t&&t.length&&s.spliceWithArray(0,0,t),Ro&&Object.defineProperty(s,"0",Co)}),s}hi(t,e);var n=t.prototype;return n.concat=function(){this[vi].atom_.reportObserved();for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return Array.prototype.concat.apply(this.slice(),t.map(function(e){return ao(e)?e.slice():e}))},n[Symbol.iterator]=function(){var e=this,t=0;return Ko({next:function(){return t<e.length?{value:e[t++],done:!1}:{done:!0,value:void 0}}})},li(t,[{key:"length",get:function(){return this[vi].getArrayLength_()},set:function(e){this[vi].setArrayLength_(e)}},{key:Symbol.toStringTag,get:function(){return"Array"}}])}(Lo);function zo(e){return{enumerable:!1,configurable:!0,get:function(){return this[vi].get_(e)},set:function(t){this[vi].set_(e,t)}}}function Do(e){Mn(No.prototype,""+e,zo(e))}function Io(e){if(e>Mo){for(var t=Mo;t<e+100;t++)Do(t);Mo=e}}function Fo(e,t,n){return new No(e,t,n)}function jo(e,t){if("object"==typeof e&&null!==e){if(ao(e))return void 0!==t&&kn(23),e[vi].atom_;if(go(e))return e.atom_;if(fo(e)){if(void 0===t)return e.keysAtom_;var n=e.data_.get(t)||e.hasMap_.get(t);return n||kn(25,t,Uo(e)),n}if(To(e)){if(!t)return kn(26);var i=e[vi].values_.get(t);return i||kn(27,t,Uo(e)),i}if(xi(e)||Sr(e)||is(e))return e}else if(Gn(e)&&is(e[vi]))return e[vi];kn(28)}function Bo(e,t){return e||kn(29),xi(e)||Sr(e)||is(e)||fo(e)||go(e)?e:e[vi]?e[vi]:void kn(24,e)}function Uo(e,t){var n;if(void 0!==t)n=jo(e,t);else{if(ys(e))return e.name;n=To(e)||fo(e)||go(e)?Bo(e):jo(e)}return n.name_}function Vo(e){var t=Nr(),n=br(!0);qr();try{return e()}finally{Wr(),xr(n),zr(t)}}Object.entries(to).forEach(function(e){var t=e[0],n=e[1];"concat"!==t&&Hn(No.prototype,t,n)}),Io(1e3);var Go,$o=Ln.toString;function Zo(e,t,n){return void 0===n&&(n=-1),qo(e,t,n)}function qo(e,t,n,i,r){if(e===t)return 0!==e||1/e==1/t;if(null==e||null==t)return!1;if(e!=e)return t!=t;var s=typeof e;if("function"!==s&&"object"!==s&&"object"!=typeof t)return!1;var o=$o.call(e);if(o!==$o.call(t))return!1;switch(o){case"[object RegExp]":case"[object String]":return""+e==""+t;case"[object Number]":return+e!=+e?+t!=+t:0===+e?1/+e==1/t:+e===+t;case"[object Date]":case"[object Boolean]":return+e===+t;case"[object Symbol]":return"undefined"!=typeof Symbol&&Symbol.valueOf.call(e)===Symbol.valueOf.call(t);case"[object Map]":case"[object Set]":n>=0&&n++}e=Wo(e),t=Wo(t);var a="[object Array]"===o;if(!a){if("object"!=typeof e||"object"!=typeof t)return!1;var l=e.constructor,u=t.constructor;if(l!==u&&!(Gn(l)&&l instanceof l&&Gn(u)&&u instanceof u)&&"constructor"in e&&"constructor"in t)return!1}if(0===n)return!1;n<0&&(n=-1),r=r||[];for(var c=(i=i||[]).length;c--;)if(i[c]===e)return r[c]===t;if(i.push(e),r.push(t),a){if((c=e.length)!==t.length)return!1;for(;c--;)if(!qo(e[c],t[c],n-1,i,r))return!1}else{var h=Object.keys(e),d=h.length;if(Object.keys(t).length!==d)return!1;for(var f=0;f<d;f++){var p=h[f];if(!ii(t,p)||!qo(e[p],t[p],n-1,i,r))return!1}}return i.pop(),r.pop(),!0}function Wo(e){return ao(e)?e.slice():Xn(e)||fo(e)||Jn(e)||go(e)?Array.from(e.entries()):e}var Ho=(null==(Go=Pn().Iterator)?void 0:Go.prototype)||{};function Ko(e){return e[Symbol.iterator]=Yo,Object.assign(Object.create(Ho),e)}function Yo(){return this}function Xo(e){return e instanceof Object&&"string"==typeof e.annotationType_&&Gn(e.make_)&&Gn(e.extend_)}["Symbol","Map","Set"].forEach(function(e){void 0===Pn()[e]&&kn("MobX requires global '"+e+"' to be available or polyfilled")}),"object"==typeof __MOBX_DEVTOOLS_GLOBAL_HOOK__&&__MOBX_DEVTOOLS_GLOBAL_HOOK__.injectMobx({spy:function(e){return"production"===process.env.NODE_ENV?(console.warn("[mobx.spy] Is a no-op in production builds"),function(){}):(Vr.spyListeners.push(e),Un(function(){Vr.spyListeners=Vr.spyListeners.filter(function(t){return t!==e})}))},extras:{getDebugName:Uo},$mobx:vi});class Jo{constructor(){Ks(this)}_visible=cr.map();getIsOpen(e){return this._visible.get(e)??!1}_setVisible({name:e,value:t}){this._visible.set(e,t)}open(e){this._setVisible({name:e,value:!0})}close(e){this._setVisible({name:e,value:!1})}closeAll(){this._visible.clear()}}const Qo=new Jo;class ea{constructor(){Ks(this),xs(()=>this.isUnauthorized,e=>{e&&(Tn("access_token"),Tn("token_type"))})}_isUnauthorized=!1;get isUnauthorized(){return this._isUnauthorized}set isUnauthorized(e){this._isUnauthorized=e}}const ta=new ea;class na{constructor(){Ks(this)}_visible=cr.map();getIsOpen(e){return this._visible.get(e)??!1}_setVisible({name:e,value:t}){this._visible.set(e,t)}open(e){this._setVisible({name:e,value:!0})}close(e){this._setVisible({name:e,value:!1})}closeAll(){this._visible.clear()}}const ia=new na;class ra{authStore=ta;modalStore=ia;alertStore=Qo}const sa=new ra,oa=e.createContext(sa),aa=({children:e})=>w(oa.Provider,{value:sa,children:e});class la{config;client;constructor(e){this.config=e,this.client=A.create({baseURL:e?.baseURL,withCredentials:e?.withCredentials,timeout:1e4,headers:{"Content-Type":"application/json"}}),this.setupInterceptors()}setupInterceptors(){this.client.interceptors.request.use(e=>{sa.authStore.isUnauthorized=!1;const t=this.config?.getHeaders?.(),n=En("access_token"),i=En("token_type");return n&&i&&(e.headers.Authorization=`${i} ${n}`),t&&Object.entries(t).forEach(([t,n])=>{e.headers[t]=n}),e},e=>(mn({message:e.message,variant:"error"}),Promise.reject(e))),this.client.interceptors.response.use(e=>e,e=>(mn({message:e.message,variant:"error"}),401===e.status&&(sa.authStore.isUnauthorized=!0),Promise.reject(e)))}async get({url:e,config:t}){return(await this.client.get(e,t)).data}async post({url:e,body:t,config:n}){return(await this.client.post(e,t,n)).data}async put({url:e,body:t,config:n}){return(await this.client.put(e,t,n)).data}async patch({url:e,body:t,config:n}){return(await this.client.patch(e,t,n)).data}async delete({url:e,config:t}){return(await this.client.delete(e,t)).data}}class ua{configOptions;_private_key;_apiService;static _instance=null;static get instance(){if(!ua._instance)throw new Error("Dartcom Config не инициализирован с приватным ключом. Вызовите Config.initialize(...) первым, чтобы иметь возможность пользоваться компонентами нашей библиотеки");return ua._instance}static initialize(e){ua._instance||(ua._instance=new ua(e))}static deactivate(){this._instance=null}constructor(e){this.configOptions=e;const{private_key:t,apiConfig:n}=e;this._private_key=t;const i=new la(n);this._apiService=i,this._getCheckKeyData().then(t=>{if(t){const{valid:n}=t;e.onCheck?.(t),this._isValidApiKey=n}})}get apiService(){return this._apiService}_isValidApiKey=!1;get isValidApiKey(){return this._isValidApiKey}async _getCheckKeyData(){const e=await this.apiService.get({url:"check_tile_token",config:{params:{tile_token:this._private_key}}}).then(e=>e).catch(e=>{const{response:t,message:n}=e;if(this.configOptions.onError?.(e),t){const{data:{detail:e}}=t;return e}return{reason:n,valid:!1}});return e}}var ca=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},ha={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},da=new class{#e=ha;#t=!1;setTimeoutProvider(e){"production"!==process.env.NODE_ENV&&this.#t&&e!==this.#e&&console.error("[timeoutManager]: Switching provider after calls to previous provider might result in unexpected behavior.",{previous:this.#e,provider:e}),this.#e=e,"production"!==process.env.NODE_ENV&&(this.#t=!1)}setTimeout(e,t){return"production"!==process.env.NODE_ENV&&(this.#t=!0),this.#e.setTimeout(e,t)}clearTimeout(e){this.#e.clearTimeout(e)}setInterval(e,t){return"production"!==process.env.NODE_ENV&&(this.#t=!0),this.#e.setInterval(e,t)}clearInterval(e){this.#e.clearInterval(e)}};var fa="undefined"==typeof window||"Deno"in globalThis;function pa(){}function ma(e){return"number"==typeof e&&e>=0&&e!==1/0}function _a(e,t){return Math.max(e+(t||0)-Date.now(),0)}function ga(e,t){return"function"==typeof e?e(t):e}function ya(e,t){return"function"==typeof e?e(t):e}function va(e,t){const{type:n="all",exact:i,fetchStatus:r,predicate:s,queryKey:o,stale:a}=e;if(o)if(i){if(t.queryHash!==xa(o,t.options))return!1}else if(!Ea(t.queryKey,o))return!1;if("all"!==n){const e=t.isActive();if("active"===n&&!e)return!1;if("inactive"===n&&e)return!1}return("boolean"!=typeof a||t.isStale()===a)&&((!r||r===t.state.fetchStatus)&&!(s&&!s(t)))}function ba(e,t){const{exact:n,status:i,predicate:r,mutationKey:s}=e;if(s){if(!t.options.mutationKey)return!1;if(n){if(wa(t.options.mutationKey)!==wa(s))return!1}else if(!Ea(t.options.mutationKey,s))return!1}return(!i||t.state.status===i)&&!(r&&!r(t))}function xa(e,t){return(t?.queryKeyHashFn||wa)(e)}function wa(e){return JSON.stringify(e,(e,t)=>Oa(t)?Object.keys(t).sort().reduce((e,n)=>(e[n]=t[n],e),{}):t)}function Ea(e,t){return e===t||typeof e==typeof t&&(!(!e||!t||"object"!=typeof e||"object"!=typeof t)&&Object.keys(t).every(n=>Ea(e[n],t[n])))}var Aa=Object.prototype.hasOwnProperty;function Ta(e,t,n=0){if(e===t)return e;if(n>500)return t;const i=ka(e)&&ka(t);if(!(i||Oa(e)&&Oa(t)))return t;const r=(i?e:Object.keys(e)).length,s=i?t:Object.keys(t),o=s.length,a=i?new Array(o):{};let l=0;for(let u=0;u<o;u++){const o=i?u:s[u],c=e[o],h=t[o];if(c===h){a[o]=c,(i?u<r:Aa.call(e,o))&&l++;continue}if(null===c||null===h||"object"!=typeof c||"object"!=typeof h){a[o]=h;continue}const d=Ta(c,h,n+1);a[o]=d,d===c&&l++}return r===o&&l===r?e:a}function Sa(e,t){if(!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(const n in e)if(e[n]!==t[n])return!1;return!0}function ka(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function Oa(e){if(!Pa(e))return!1;const t=e.constructor;if(void 0===t)return!0;const n=t.prototype;return!!Pa(n)&&(!!n.hasOwnProperty("isPrototypeOf")&&Object.getPrototypeOf(e)===Object.prototype)}function Pa(e){return"[object Object]"===Object.prototype.toString.call(e)}function Ca(e,t,n){if("function"==typeof n.structuralSharing)return n.structuralSharing(e,t);if(!1!==n.structuralSharing){if("production"!==process.env.NODE_ENV)try{return Ta(e,t)}catch(e){throw console.error(`Structural sharing requires data to be JSON serializable. To fix this, turn off structuralSharing or return JSON-serializable data from your queryFn. [${n.queryHash}]: ${e}`),e}return Ta(e,t)}return t}function Ra(e,t,n=0){const i=[...e,t];return n&&i.length>n?i.slice(1):i}function Ma(e,t,n=0){const i=[t,...e];return n&&i.length>n?i.slice(0,-1):i}var La=Symbol();function Na(e,t){return"production"!==process.env.NODE_ENV&&e.queryFn===La&&console.error(`Attempted to invoke queryFn when set to skipToken. This is likely a configuration error. Query hash: '${e.queryHash}'`),!e.queryFn&&t?.initialPromise?()=>t.initialPromise:e.queryFn&&e.queryFn!==La?e.queryFn:()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`))}function za(e,t){return"function"==typeof e?e(...t):!!e}var Da=new class extends ca{#n;#i;#r;constructor(){super(),this.#r=e=>{if(!fa&&window.addEventListener){const t=()=>e();return window.addEventListener("visibilitychange",t,!1),()=>{window.removeEventListener("visibilitychange",t)}}}}onSubscribe(){this.#i||this.setEventListener(this.#r)}onUnsubscribe(){this.hasListeners()||(this.#i?.(),this.#i=void 0)}setEventListener(e){this.#r=e,this.#i?.(),this.#i=e(e=>{"boolean"==typeof e?this.setFocused(e):this.onFocus()})}setFocused(e){this.#n!==e&&(this.#n=e,this.onFocus())}onFocus(){const e=this.isFocused();this.listeners.forEach(t=>{t(e)})}isFocused(){return"boolean"==typeof this.#n?this.#n:"hidden"!==globalThis.document?.visibilityState}};function Ia(){let e,t;const n=new Promise((n,i)=>{e=n,t=i});function i(e){Object.assign(n,e),delete n.resolve,delete n.reject}return n.status="pending",n.catch(()=>{}),n.resolve=t=>{i({status:"fulfilled",value:t}),e(t)},n.reject=e=>{i({status:"rejected",reason:e}),t(e)},n}var Fa=function(e){setTimeout(e,0)};var ja=function(){let e=[],t=0,n=e=>{e()},i=e=>{e()},r=Fa;const s=i=>{t?e.push(i):r(()=>{n(i)})};return{batch:s=>{let o;t++;try{o=s()}finally{t--,t||(()=>{const t=e;e=[],t.length&&r(()=>{i(()=>{t.forEach(e=>{n(e)})})})})()}return o},batchCalls:e=>(...t)=>{s(()=>{e(...t)})},schedule:s,setNotifyFunction:e=>{n=e},setBatchNotifyFunction:e=>{i=e},setScheduler:e=>{r=e}}}(),Ba=new class extends ca{#s=!0;#i;#r;constructor(){super(),this.#r=e=>{if(!fa&&window.addEventListener){const t=()=>e(!0),n=()=>e(!1);return window.addEventListener("online",t,!1),window.addEventListener("offline",n,!1),()=>{window.removeEventListener("online",t),window.removeEventListener("offline",n)}}}}onSubscribe(){this.#i||this.setEventListener(this.#r)}onUnsubscribe(){this.hasListeners()||(this.#i?.(),this.#i=void 0)}setEventListener(e){this.#r=e,this.#i?.(),this.#i=e(this.setOnline.bind(this))}setOnline(e){this.#s!==e&&(this.#s=e,this.listeners.forEach(t=>{t(e)}))}isOnline(){return this.#s}};function Ua(e){return Math.min(1e3*2**e,3e4)}function Va(e){return"online"!==(e??"online")||Ba.isOnline()}var Ga=class extends Error{constructor(e){super("CancelledError"),this.revert=e?.revert,this.silent=e?.silent}};function $a(e){let t,n=!1,i=0;const r=Ia(),s=()=>"pending"!==r.status,o=()=>Da.isFocused()&&("always"===e.networkMode||Ba.isOnline())&&e.canRun(),a=()=>Va(e.networkMode)&&e.canRun(),l=e=>{s()||(t?.(),r.resolve(e))},u=e=>{s()||(t?.(),r.reject(e))},c=()=>new Promise(n=>{t=e=>{(s()||o())&&n(e)},e.onPause?.()}).then(()=>{t=void 0,s()||e.onContinue?.()}),h=()=>{if(s())return;let t;const r=0===i?e.initialPromise:void 0;try{t=r??e.fn()}catch(e){t=Promise.reject(e)}Promise.resolve(t).then(l).catch(t=>{if(s())return;const r=e.retry??(fa?0:3),a=e.retryDelay??Ua,l="function"==typeof a?a(i,t):a,d=!0===r||"number"==typeof r&&i<r||"function"==typeof r&&r(i,t);!n&&d?(i++,e.onFail?.(i,t),function(e){return new Promise(t=>{da.setTimeout(t,e)})}(l).then(()=>o()?void 0:c()).then(()=>{n?u(t):h()})):u(t)})};return{promise:r,status:()=>r.status,cancel:t=>{if(!s()){const n=new Ga(t);u(n),e.onCancel?.(n)}},continue:()=>(t?.(),r),cancelRetry:()=>{n=!0},continueRetry:()=>{n=!1},canStart:a,start:()=>(a()?h():c().then(h),r)}}var Za=class{#o;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),ma(this.gcTime)&&(this.#o=da.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(fa?1/0:3e5))}clearGcTimeout(){this.#o&&(da.clearTimeout(this.#o),this.#o=void 0)}},qa=class extends Za{#a;#l;#u;#c;#h;#d;#f;constructor(e){super(),this.#f=!1,this.#d=e.defaultOptions,this.setOptions(e.options),this.observers=[],this.#c=e.client,this.#u=this.#c.getQueryCache(),this.queryKey=e.queryKey,this.queryHash=e.queryHash,this.#a=Ka(this.options),this.state=e.state??this.#a,this.scheduleGc()}get meta(){return this.options.meta}get promise(){return this.#h?.promise}setOptions(e){if(this.options={...this.#d,...e},this.updateGcTime(this.options.gcTime),this.state&&void 0===this.state.data){const e=Ka(this.options);void 0!==e.data&&(this.setState(Ha(e.data,e.dataUpdatedAt)),this.#a=e)}}optionalRemove(){this.observers.length||"idle"!==this.state.fetchStatus||this.#u.remove(this)}setData(e,t){const n=Ca(this.state.data,e,this.options);return this.#p({data:n,type:"success",dataUpdatedAt:t?.updatedAt,manual:t?.manual}),n}setState(e,t){this.#p({type:"setState",state:e,setStateOptions:t})}cancel(e){const t=this.#h?.promise;return this.#h?.cancel(e),t?t.then(pa).catch(pa):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(this.#a)}isActive(){return this.observers.some(e=>!1!==ya(e.options.enabled,this))}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===La||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStatic(){return this.getObserversCount()>0&&this.observers.some(e=>"static"===ga(e.options.staleTime,this))}isStale(){return this.getObserversCount()>0?this.observers.some(e=>e.getCurrentResult().isStale):void 0===this.state.data||this.state.isInvalidated}isStaleByTime(e=0){return void 0===this.state.data||"static"!==e&&(!!this.state.isInvalidated||!_a(this.state.dataUpdatedAt,e))}onFocus(){const e=this.observers.find(e=>e.shouldFetchOnWindowFocus());e?.refetch({cancelRefetch:!1}),this.#h?.continue()}onOnline(){const e=this.observers.find(e=>e.shouldFetchOnReconnect());e?.refetch({cancelRefetch:!1}),this.#h?.continue()}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),this.#u.notify({type:"observerAdded",query:this,observer:e}))}removeObserver(e){this.observers.includes(e)&&(this.observers=this.observers.filter(t=>t!==e),this.observers.length||(this.#h&&(this.#f?this.#h.cancel({revert:!0}):this.#h.cancelRetry()),this.scheduleGc()),this.#u.notify({type:"observerRemoved",query:this,observer:e}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||this.#p({type:"invalidate"})}async fetch(e,t){if("idle"!==this.state.fetchStatus&&"rejected"!==this.#h?.status())if(void 0!==this.state.data&&t?.cancelRefetch)this.cancel({silent:!0});else if(this.#h)return this.#h.continueRetry(),this.#h.promise;if(e&&this.setOptions(e),!this.options.queryFn){const e=this.observers.find(e=>e.options.queryFn);e&&this.setOptions(e.options)}"production"!==process.env.NODE_ENV&&(Array.isArray(this.options.queryKey)||console.error("As of v4, queryKey needs to be an Array. If you are using a string like 'repoData', please change it to an Array, e.g. ['repoData']"));const n=new AbortController,i=e=>{Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(this.#f=!0,n.signal)})},r=()=>{const e=Na(this.options,t),n=(()=>{const e={client:this.#c,queryKey:this.queryKey,meta:this.meta};return i(e),e})();return this.#f=!1,this.options.persister?this.options.persister(e,n,this):e(n)},s=(()=>{const e={fetchOptions:t,options:this.options,queryKey:this.queryKey,client:this.#c,state:this.state,fetchFn:r};return i(e),e})();this.options.behavior?.onFetch(s,this),this.#l=this.state,"idle"!==this.state.fetchStatus&&this.state.fetchMeta===s.fetchOptions?.meta||this.#p({type:"fetch",meta:s.fetchOptions?.meta}),this.#h=$a({initialPromise:t?.initialPromise,fn:s.fetchFn,onCancel:e=>{e instanceof Ga&&e.revert&&this.setState({...this.#l,fetchStatus:"idle"}),n.abort()},onFail:(e,t)=>{this.#p({type:"failed",failureCount:e,error:t})},onPause:()=>{this.#p({type:"pause"})},onContinue:()=>{this.#p({type:"continue"})},retry:s.options.retry,retryDelay:s.options.retryDelay,networkMode:s.options.networkMode,canRun:()=>!0});try{const e=await this.#h.start();if(void 0===e)throw"production"!==process.env.NODE_ENV&&console.error(`Query data cannot be undefined. Please make sure to return a value other than undefined from your query function. Affected query key: ${this.queryHash}`),new Error(`${this.queryHash} data is undefined`);return this.setData(e),this.#u.config.onSuccess?.(e,this),this.#u.config.onSettled?.(e,this.state.error,this),e}catch(e){if(e instanceof Ga){if(e.silent)return this.#h.promise;if(e.revert){if(void 0===this.state.data)throw e;return this.state.data}}throw this.#p({type:"error",error:e}),this.#u.config.onError?.(e,this),this.#u.config.onSettled?.(this.state.data,e,this),e}finally{this.scheduleGc()}}#p(e){this.state=(t=>{switch(e.type){case"failed":return{...t,fetchFailureCount:e.failureCount,fetchFailureReason:e.error};case"pause":return{...t,fetchStatus:"paused"};case"continue":return{...t,fetchStatus:"fetching"};case"fetch":return{...t,...Wa(t.data,this.options),fetchMeta:e.meta??null};case"success":const n={...t,...Ha(e.data,e.dataUpdatedAt),dataUpdateCount:t.dataUpdateCount+1,...!e.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return this.#l=e.manual?n:void 0,n;case"error":const i=e.error;return{...t,error:i,errorUpdateCount:t.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:t.fetchFailureCount+1,fetchFailureReason:i,fetchStatus:"idle",status:"error",isInvalidated:!0};case"invalidate":return{...t,isInvalidated:!0};case"setState":return{...t,...e.state}}})(this.state),ja.batch(()=>{this.observers.forEach(e=>{e.onQueryUpdate()}),this.#u.notify({query:this,type:"updated",action:e})})}};function Wa(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:Va(t.networkMode)?"fetching":"paused",...void 0===e&&{error:null,status:"pending"}}}function Ha(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:"success"}}function Ka(e){const t="function"==typeof e.initialData?e.initialData():e.initialData,n=void 0!==t,i=n?"function"==typeof e.initialDataUpdatedAt?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:n?i??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?"success":"pending",fetchStatus:"idle"}}var Ya=class extends ca{constructor(e,t){super(),this.options=t,this.#c=e,this.#m=null,this.#_=Ia(),this.bindMethods(),this.setOptions(t)}#c;#g=void 0;#y=void 0;#v=void 0;#b;#x;#_;#m;#w;#E;#A;#T;#S;#k;#O=new Set;bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){1===this.listeners.size&&(this.#g.addObserver(this),Xa(this.#g,this.options)?this.#P():this.updateResult(),this.#C())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return Ja(this.#g,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return Ja(this.#g,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.#R(),this.#M(),this.#g.removeObserver(this)}setOptions(e){const t=this.options,n=this.#g;if(this.options=this.#c.defaultQueryOptions(e),void 0!==this.options.enabled&&"boolean"!=typeof this.options.enabled&&"function"!=typeof this.options.enabled&&"boolean"!=typeof ya(this.options.enabled,this.#g))throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");this.#L(),this.#g.setOptions(this.options),t._defaulted&&!Sa(this.options,t)&&this.#c.getQueryCache().notify({type:"observerOptionsUpdated",query:this.#g,observer:this});const i=this.hasListeners();i&&Qa(this.#g,n,this.options,t)&&this.#P(),this.updateResult(),!i||this.#g===n&&ya(this.options.enabled,this.#g)===ya(t.enabled,this.#g)&&ga(this.options.staleTime,this.#g)===ga(t.staleTime,this.#g)||this.#N();const r=this.#z();!i||this.#g===n&&ya(this.options.enabled,this.#g)===ya(t.enabled,this.#g)&&r===this.#k||this.#D(r)}getOptimisticResult(e){const t=this.#c.getQueryCache().build(this.#c,e),n=this.createResult(t,e);return function(e,t){if(!Sa(e.getCurrentResult(),t))return!0;return!1}(this,n)&&(this.#v=n,this.#x=this.options,this.#b=this.#g.state),n}getCurrentResult(){return this.#v}trackResult(e,t){return new Proxy(e,{get:(e,n)=>(this.trackProp(n),t?.(n),"promise"===n&&(this.trackProp("data"),this.options.experimental_prefetchInRender||"pending"!==this.#_.status||this.#_.reject(new Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(e,n))})}trackProp(e){this.#O.add(e)}getCurrentQuery(){return this.#g}refetch({...e}={}){return this.fetch({...e})}fetchOptimistic(e){const t=this.#c.defaultQueryOptions(e),n=this.#c.getQueryCache().build(this.#c,t);return n.fetch().then(()=>this.createResult(n,t))}fetch(e){return this.#P({...e,cancelRefetch:e.cancelRefetch??!0}).then(()=>(this.updateResult(),this.#v))}#P(e){this.#L();let t=this.#g.fetch(this.options,e);return e?.throwOnError||(t=t.catch(pa)),t}#N(){this.#R();const e=ga(this.options.staleTime,this.#g);if(fa||this.#v.isStale||!ma(e))return;const t=_a(this.#v.dataUpdatedAt,e)+1;this.#T=da.setTimeout(()=>{this.#v.isStale||this.updateResult()},t)}#z(){return("function"==typeof this.options.refetchInterval?this.options.refetchInterval(this.#g):this.options.refetchInterval)??!1}#D(e){this.#M(),this.#k=e,!fa&&!1!==ya(this.options.enabled,this.#g)&&ma(this.#k)&&0!==this.#k&&(this.#S=da.setInterval(()=>{(this.options.refetchIntervalInBackground||Da.isFocused())&&this.#P()},this.#k))}#C(){this.#N(),this.#D(this.#z())}#R(){this.#T&&(da.clearTimeout(this.#T),this.#T=void 0)}#M(){this.#S&&(da.clearInterval(this.#S),this.#S=void 0)}createResult(e,t){const n=this.#g,i=this.options,r=this.#v,s=this.#b,o=this.#x,a=e!==n?e.state:this.#y,{state:l}=e;let u,c={...l},h=!1;if(t._optimisticResults){const r=this.hasListeners(),s=!r&&Xa(e,t),o=r&&Qa(e,n,t,i);(s||o)&&(c={...c,...Wa(l.data,e.options)}),"isRestoring"===t._optimisticResults&&(c.fetchStatus="idle")}let{error:d,errorUpdatedAt:f,status:p}=c;u=c.data;let m=!1;if(void 0!==t.placeholderData&&void 0===u&&"pending"===p){let e;r?.isPlaceholderData&&t.placeholderData===o?.placeholderData?(e=r.data,m=!0):e="function"==typeof t.placeholderData?t.placeholderData(this.#A?.state.data,this.#A):t.placeholderData,void 0!==e&&(p="success",u=Ca(r?.data,e,t),h=!0)}if(t.select&&void 0!==u&&!m)if(r&&u===s?.data&&t.select===this.#w)u=this.#E;else try{this.#w=t.select,u=t.select(u),u=Ca(r?.data,u,t),this.#E=u,this.#m=null}catch(e){this.#m=e}this.#m&&(d=this.#m,u=this.#E,f=Date.now(),p="error");const _="fetching"===c.fetchStatus,g="pending"===p,y="error"===p,v=g&&_,b=void 0!==u,x={status:p,fetchStatus:c.fetchStatus,isPending:g,isSuccess:"success"===p,isError:y,isInitialLoading:v,isLoading:v,data:u,dataUpdatedAt:c.dataUpdatedAt,error:d,errorUpdatedAt:f,failureCount:c.fetchFailureCount,failureReason:c.fetchFailureReason,errorUpdateCount:c.errorUpdateCount,isFetched:c.dataUpdateCount>0||c.errorUpdateCount>0,isFetchedAfterMount:c.dataUpdateCount>a.dataUpdateCount||c.errorUpdateCount>a.errorUpdateCount,isFetching:_,isRefetching:_&&!g,isLoadingError:y&&!b,isPaused:"paused"===c.fetchStatus,isPlaceholderData:h,isRefetchError:y&&b,isStale:el(e,t),refetch:this.refetch,promise:this.#_,isEnabled:!1!==ya(t.enabled,e)};if(this.options.experimental_prefetchInRender){const t=void 0!==x.data,i="error"===x.status&&!t,r=e=>{i?e.reject(x.error):t&&e.resolve(x.data)},s=()=>{const e=this.#_=x.promise=Ia();r(e)},o=this.#_;switch(o.status){case"pending":e.queryHash===n.queryHash&&r(o);break;case"fulfilled":(i||x.data!==o.value)&&s();break;case"rejected":i&&x.error===o.reason||s()}}return x}updateResult(){const e=this.#v,t=this.createResult(this.#g,this.options);if(this.#b=this.#g.state,this.#x=this.options,void 0!==this.#b.data&&(this.#A=this.#g),Sa(t,e))return;this.#v=t;this.#I({listeners:(()=>{if(!e)return!0;const{notifyOnChangeProps:t}=this.options,n="function"==typeof t?t():t;if("all"===n||!n&&!this.#O.size)return!0;const i=new Set(n??this.#O);return this.options.throwOnError&&i.add("error"),Object.keys(this.#v).some(t=>{const n=t;return this.#v[n]!==e[n]&&i.has(n)})})()})}#L(){const e=this.#c.getQueryCache().build(this.#c,this.options);if(e===this.#g)return;const t=this.#g;this.#g=e,this.#y=e.state,this.hasListeners()&&(t?.removeObserver(this),e.addObserver(this))}onQueryUpdate(){this.updateResult(),this.hasListeners()&&this.#C()}#I(e){ja.batch(()=>{e.listeners&&this.listeners.forEach(e=>{e(this.#v)}),this.#c.getQueryCache().notify({query:this.#g,type:"observerResultsUpdated"})})}};function Xa(e,t){return function(e,t){return!1!==ya(t.enabled,e)&&void 0===e.state.data&&!("error"===e.state.status&&!1===t.retryOnMount)}(e,t)||void 0!==e.state.data&&Ja(e,t,t.refetchOnMount)}function Ja(e,t,n){if(!1!==ya(t.enabled,e)&&"static"!==ga(t.staleTime,e)){const i="function"==typeof n?n(e):n;return"always"===i||!1!==i&&el(e,t)}return!1}function Qa(e,t,n,i){return(e!==t||!1===ya(i.enabled,e))&&(!n.suspense||"error"!==e.state.status)&&el(e,n)}function el(e,t){return!1!==ya(t.enabled,e)&&e.isStaleByTime(ga(t.staleTime,e))}function tl(e){return{onFetch:(t,n)=>{const i=t.options,r=t.fetchOptions?.meta?.fetchMore?.direction,s=t.state.data?.pages||[],o=t.state.data?.pageParams||[];let a={pages:[],pageParams:[]},l=0;const u=async()=>{let n=!1;const u=e=>{!function(e,t,n){let i,r=!1;Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(i??=t(),r||(r=!0,i.aborted?n():i.addEventListener("abort",n,{once:!0})),i)})}(e,()=>t.signal,()=>n=!0)},c=Na(t.options,t.fetchOptions),h=async(e,i,r)=>{if(n)return Promise.reject();if(null==i&&e.pages.length)return Promise.resolve(e);const s=(()=>{const e={client:t.client,queryKey:t.queryKey,pageParam:i,direction:r?"backward":"forward",meta:t.options.meta};return u(e),e})(),o=await c(s),{maxPages:a}=t.options,l=r?Ma:Ra;return{pages:l(e.pages,o,a),pageParams:l(e.pageParams,i,a)}};if(r&&s.length){const e="backward"===r,t={pages:s,pageParams:o},n=(e?il:nl)(i,t);a=await h(t,n,e)}else{const t=e??s.length;do{const e=0===l?o[0]??i.initialPageParam:nl(i,a);if(l>0&&null==e)break;a=await h(a,e),l++}while(l<t)}return a};t.options.persister?t.fetchFn=()=>t.options.persister?.(u,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n):t.fetchFn=u}}}function nl(e,{pages:t,pageParams:n}){const i=t.length-1;return t.length>0?e.getNextPageParam(t[i],t,n[i],n):void 0}function il(e,{pages:t,pageParams:n}){return t.length>0?e.getPreviousPageParam?.(t[0],t,n[0],n):void 0}var rl=class extends Za{#c;#F;#j;#h;constructor(e){super(),this.#c=e.client,this.mutationId=e.mutationId,this.#j=e.mutationCache,this.#F=[],this.state=e.state||{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0},this.setOptions(e.options),this.scheduleGc()}setOptions(e){this.options=e,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(e){this.#F.includes(e)||(this.#F.push(e),this.clearGcTimeout(),this.#j.notify({type:"observerAdded",mutation:this,observer:e}))}removeObserver(e){this.#F=this.#F.filter(t=>t!==e),this.scheduleGc(),this.#j.notify({type:"observerRemoved",mutation:this,observer:e})}optionalRemove(){this.#F.length||("pending"===this.state.status?this.scheduleGc():this.#j.remove(this))}continue(){return this.#h?.continue()??this.execute(this.state.variables)}async execute(e){const t=()=>{this.#p({type:"continue"})},n={client:this.#c,meta:this.options.meta,mutationKey:this.options.mutationKey};this.#h=$a({fn:()=>this.options.mutationFn?this.options.mutationFn(e,n):Promise.reject(new Error("No mutationFn found")),onFail:(e,t)=>{this.#p({type:"failed",failureCount:e,error:t})},onPause:()=>{this.#p({type:"pause"})},onContinue:t,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>this.#j.canRun(this)});const i="pending"===this.state.status,r=!this.#h.canStart();try{if(i)t();else{this.#p({type:"pending",variables:e,isPaused:r}),this.#j.config.onMutate&&await this.#j.config.onMutate(e,this,n);const t=await(this.options.onMutate?.(e,n));t!==this.state.context&&this.#p({type:"pending",context:t,variables:e,isPaused:r})}const s=await this.#h.start();return await(this.#j.config.onSuccess?.(s,e,this.state.context,this,n)),await(this.options.onSuccess?.(s,e,this.state.context,n)),await(this.#j.config.onSettled?.(s,null,this.state.variables,this.state.context,this,n)),await(this.options.onSettled?.(s,null,e,this.state.context,n)),this.#p({type:"success",data:s}),s}catch(t){try{await(this.#j.config.onError?.(t,e,this.state.context,this,n))}catch(e){Promise.reject(e)}try{await(this.options.onError?.(t,e,this.state.context,n))}catch(e){Promise.reject(e)}try{await(this.#j.config.onSettled?.(void 0,t,this.state.variables,this.state.context,this,n))}catch(e){Promise.reject(e)}try{await(this.options.onSettled?.(void 0,t,e,this.state.context,n))}catch(e){Promise.reject(e)}throw this.#p({type:"error",error:t}),t}finally{this.#j.runNext(this)}}#p(e){this.state=(t=>{switch(e.type){case"failed":return{...t,failureCount:e.failureCount,failureReason:e.error};case"pause":return{...t,isPaused:!0};case"continue":return{...t,isPaused:!1};case"pending":return{...t,context:e.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:e.isPaused,status:"pending",variables:e.variables,submittedAt:Date.now()};case"success":return{...t,data:e.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...t,data:void 0,error:e.error,failureCount:t.failureCount+1,failureReason:e.error,isPaused:!1,status:"error"}}})(this.state),ja.batch(()=>{this.#F.forEach(t=>{t.onMutationUpdate(e)}),this.#j.notify({mutation:this,type:"updated",action:e})})}};var sl=class extends ca{constructor(e={}){super(),this.config=e,this.#B=new Set,this.#U=new Map,this.#V=0}#B;#U;#V;build(e,t,n){const i=new rl({client:e,mutationCache:this,mutationId:++this.#V,options:e.defaultMutationOptions(t),state:n});return this.add(i),i}add(e){this.#B.add(e);const t=ol(e);if("string"==typeof t){const n=this.#U.get(t);n?n.push(e):this.#U.set(t,[e])}this.notify({type:"added",mutation:e})}remove(e){if(this.#B.delete(e)){const t=ol(e);if("string"==typeof t){const n=this.#U.get(t);if(n)if(n.length>1){const t=n.indexOf(e);-1!==t&&n.splice(t,1)}else n[0]===e&&this.#U.delete(t)}}this.notify({type:"removed",mutation:e})}canRun(e){const t=ol(e);if("string"==typeof t){const n=this.#U.get(t),i=n?.find(e=>"pending"===e.state.status);return!i||i===e}return!0}runNext(e){const t=ol(e);if("string"==typeof t){const n=this.#U.get(t)?.find(t=>t!==e&&t.state.isPaused);return n?.continue()??Promise.resolve()}return Promise.resolve()}clear(){ja.batch(()=>{this.#B.forEach(e=>{this.notify({type:"removed",mutation:e})}),this.#B.clear(),this.#U.clear()})}getAll(){return Array.from(this.#B)}find(e){const t={exact:!0,...e};return this.getAll().find(e=>ba(t,e))}findAll(e={}){return this.getAll().filter(t=>ba(e,t))}notify(e){ja.batch(()=>{this.listeners.forEach(t=>{t(e)})})}resumePausedMutations(){const e=this.getAll().filter(e=>e.state.isPaused);return ja.batch(()=>Promise.all(e.map(e=>e.continue().catch(pa))))}};function ol(e){return e.options.scope?.id}var al=class extends ca{#c;#v=void 0;#G;#$;constructor(e,t){super(),this.#c=e,this.setOptions(t),this.bindMethods(),this.#Z()}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(e){const t=this.options;this.options=this.#c.defaultMutationOptions(e),Sa(this.options,t)||this.#c.getMutationCache().notify({type:"observerOptionsUpdated",mutation:this.#G,observer:this}),t?.mutationKey&&this.options.mutationKey&&wa(t.mutationKey)!==wa(this.options.mutationKey)?this.reset():"pending"===this.#G?.state.status&&this.#G.setOptions(this.options)}onUnsubscribe(){this.hasListeners()||this.#G?.removeObserver(this)}onMutationUpdate(e){this.#Z(),this.#I(e)}getCurrentResult(){return this.#v}reset(){this.#G?.removeObserver(this),this.#G=void 0,this.#Z(),this.#I()}mutate(e,t){return this.#$=t,this.#G?.removeObserver(this),this.#G=this.#c.getMutationCache().build(this.#c,this.options),this.#G.addObserver(this),this.#G.execute(e)}#Z(){const e=this.#G?.state??{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0};this.#v={...e,isPending:"pending"===e.status,isSuccess:"success"===e.status,isError:"error"===e.status,isIdle:"idle"===e.status,mutate:this.mutate,reset:this.reset}}#I(e){ja.batch(()=>{if(this.#$&&this.hasListeners()){const t=this.#v.variables,n=this.#v.context,i={client:this.#c,meta:this.options.meta,mutationKey:this.options.mutationKey};if("success"===e?.type){try{this.#$.onSuccess?.(e.data,t,n,i)}catch(e){Promise.reject(e)}try{this.#$.onSettled?.(e.data,null,t,n,i)}catch(e){Promise.reject(e)}}else if("error"===e?.type){try{this.#$.onError?.(e.error,t,n,i)}catch(e){Promise.reject(e)}try{this.#$.onSettled?.(void 0,e.error,t,n,i)}catch(e){Promise.reject(e)}}}this.listeners.forEach(e=>{e(this.#v)})})}},ll=class extends ca{constructor(e={}){super(),this.config=e,this.#q=new Map}#q;build(e,t,n){const i=t.queryKey,r=t.queryHash??xa(i,t);let s=this.get(r);return s||(s=new qa({client:e,queryKey:i,queryHash:r,options:e.defaultQueryOptions(t),state:n,defaultOptions:e.getQueryDefaults(i)}),this.add(s)),s}add(e){this.#q.has(e.queryHash)||(this.#q.set(e.queryHash,e),this.notify({type:"added",query:e}))}remove(e){const t=this.#q.get(e.queryHash);t&&(e.destroy(),t===e&&this.#q.delete(e.queryHash),this.notify({type:"removed",query:e}))}clear(){ja.batch(()=>{this.getAll().forEach(e=>{this.remove(e)})})}get(e){return this.#q.get(e)}getAll(){return[...this.#q.values()]}find(e){const t={exact:!0,...e};return this.getAll().find(e=>va(t,e))}findAll(e={}){const t=this.getAll();return Object.keys(e).length>0?t.filter(t=>va(e,t)):t}notify(e){ja.batch(()=>{this.listeners.forEach(t=>{t(e)})})}onFocus(){ja.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){ja.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}},ul=e.createContext(void 0),cl=t=>{const n=e.useContext(ul);if(!n)throw new Error("No QueryClient set, use QueryClientProvider to set one");return n},hl=({client:t,children:n})=>(e.useEffect(()=>(t.mount(),()=>{t.unmount()}),[t]),w(ul.Provider,{value:t,children:n})),dl=e.createContext(!1);dl.Provider;var fl=e.createContext(function(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}()),pl=(e,t,n)=>t.fetchOptimistic(e).catch(()=>{n.clearReset()});function ml(t,n,i){if("production"!==process.env.NODE_ENV&&("object"!=typeof t||Array.isArray(t)))throw new Error('Bad argument type. Starting with v5, only the "Object" form is allowed when calling query related functions. Please use the error stack to find the culprit call. More info here: https://tanstack.com/query/latest/docs/react/guides/migrating-to-v5#supports-a-single-signature-one-object');const r=e.useContext(dl),s=e.useContext(fl),o=cl(),a=o.defaultQueryOptions(t);o.getDefaultOptions().queries?._experimental_beforeQuery?.(a);const l=o.getQueryCache().get(a.queryHash);"production"!==process.env.NODE_ENV&&(a.queryFn||console.error(`[${a.queryHash}]: No queryFn was passed as an option, and no default queryFn was found. The queryFn parameter is only optional when using a default queryFn. More info here: https://tanstack.com/query/latest/docs/framework/react/guides/default-query-function`)),a._optimisticResults=r?"isRestoring":"optimistic",(e=>{if(e.suspense){const t=1e3,n=e=>"static"===e?e:Math.max(e??t,t),i=e.staleTime;e.staleTime="function"==typeof i?(...e)=>n(i(...e)):n(i),"number"==typeof e.gcTime&&(e.gcTime=Math.max(e.gcTime,t))}})(a),((e,t,n)=>{const i=n?.state.error&&"function"==typeof e.throwOnError?za(e.throwOnError,[n.state.error,n]):e.throwOnError;(e.suspense||e.experimental_prefetchInRender||i)&&(t.isReset()||(e.retryOnMount=!1))})(a,s,l),(t=>{e.useEffect(()=>{t.clearReset()},[t])})(s);const u=!o.getQueryCache().get(a.queryHash),[c]=e.useState(()=>new n(o,a)),h=c.getOptimisticResult(a),d=!r&&!1!==t.subscribed;if(e.useSyncExternalStore(e.useCallback(e=>{const t=d?c.subscribe(ja.batchCalls(e)):pa;return c.updateResult(),t},[c,d]),()=>c.getCurrentResult(),()=>c.getCurrentResult()),e.useEffect(()=>{c.setOptions(a)},[a,c]),((e,t)=>e?.suspense&&t.isPending)(a,h))throw pl(a,c,s);if((({result:e,errorResetBoundary:t,throwOnError:n,query:i,suspense:r})=>e.isError&&!t.isReset()&&!e.isFetching&&i&&(r&&void 0===e.data||za(n,[e.error,i])))({result:h,errorResetBoundary:s,throwOnError:a.throwOnError,query:l,suspense:a.suspense}))throw h.error;if(o.getDefaultOptions().queries?._experimental_afterQuery?.(a,h),a.experimental_prefetchInRender&&!fa&&((e,t)=>e.isLoading&&e.isFetching&&!t)(h,r)){const e=u?pl(a,c,s):l?.promise;e?.catch(pa).finally(()=>{c.updateResult()})}return a.notifyOnChangeProps?h:c.trackResult(h)}function _l(t,n){const i=cl(),[r]=e.useState(()=>new al(i,t));e.useEffect(()=>{r.setOptions(t)},[r,t]);const s=e.useSyncExternalStore(e.useCallback(e=>r.subscribe(ja.batchCalls(e)),[r]),()=>r.getCurrentResult(),()=>r.getCurrentResult()),o=e.useCallback((e,t)=>{r.mutate(e,t).catch(pa)},[r]);if(s.error&&za(r.options.throwOnError,[s.error]))throw s.error;return{...s,mutate:o,mutateAsync:s.mutate}}const gl=()=>ml({queryKey:["user"],queryFn:async()=>await ua.instance.apiService.get({url:"user/"})},Ya),yl=()=>_l({mutationKey:["user"],mutationFn:async()=>await ua.instance.apiService.get({url:"user/"})}),vl=()=>{const{enqueueSnackbar:e}=h(We);return({variant:t,message:n})=>{e({variant:t,message:n,anchorOrigin:{vertical:"top",horizontal:"right"},autoHideDuration:3e3,hideIconVariant:!0})}},bl=()=>{const e=vl();return t=>{const{response:n}=t;if(n){const{data:t}=n;if(t){const{detail:n}=t;n&&n.forEach(t=>{e({variant:"error",message:t})})}}}},xl=()=>_l({mutationKey:["sign-in-mutation"],mutationFn:async({body:{username:e,password:t}})=>{const n=pn({username:e,password:fn(t)});return await ua.instance.apiService.post({url:"token",body:n,config:{headers:{"Content-Type":"application/x-www-form-urlencoded"}}})},onSuccess:({access_token:e,token_type:t})=>{An("access_token",e),An("token_type",t)}});if(!p)throw new Error("mobx-react-lite requires React with Hooks support");if(!function(e,t,n){return Vo(function(){var i=wo(e,n)[vi];"production"!==process.env.NODE_ENV&&t&&e[pi]&&kn("makeObservable second arg must be nullish when using decorators. Mixing @decorator syntax with annotations is not supported."),null!=t||(t=function(e){return ii(e,pi)||Hn(e,pi,ci({},e[pi])),e[pi]}(e)),ei(t).forEach(function(e){return i.make_(e,t[e])})}),e})throw new Error("mobx-react-lite@3 requires mobx at least version 6 to be available");function wl(e){e()}function El(e){return Ps(e)}var Al,Tl=function(){function e(e){var t=this;Object.defineProperty(this,"finalize",{enumerable:!0,configurable:!0,writable:!0,value:e}),Object.defineProperty(this,"registrations",{enumerable:!0,configurable:!0,writable:!0,value:new Map}),Object.defineProperty(this,"sweepTimeout",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"sweep",{enumerable:!0,configurable:!0,writable:!0,value:function(e){void 0===e&&(e=1e4),clearTimeout(t.sweepTimeout),t.sweepTimeout=void 0;var n=Date.now();t.registrations.forEach(function(i,r){n-i.registeredAt>=e&&(t.finalize(i.value),t.registrations.delete(r))}),t.registrations.size>0&&t.scheduleSweep()}}),Object.defineProperty(this,"finalizeAllImmediately",{enumerable:!0,configurable:!0,writable:!0,value:function(){t.sweep(0)}})}return Object.defineProperty(e.prototype,"register",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t,n){this.registrations.set(n,{value:t,registeredAt:Date.now()}),this.scheduleSweep()}}),Object.defineProperty(e.prototype,"unregister",{enumerable:!1,configurable:!0,writable:!0,value:function(e){this.registrations.delete(e)}}),Object.defineProperty(e.prototype,"scheduleSweep",{enumerable:!1,configurable:!0,writable:!0,value:function(){void 0===this.sweepTimeout&&(this.sweepTimeout=setTimeout(this.sweep,1e4))}}),e}(),Sl=new("undefined"!=typeof FinalizationRegistry?FinalizationRegistry:Tl)(function(e){var t;null===(t=e.reaction)||void 0===t||t.dispose(),e.reaction=null}),kl={exports:{}},Ol={};var Pl,Cl,Rl={};
|
|
2
2
|
/**
|
|
3
3
|
* @license React
|
|
4
4
|
* use-sync-external-store-shim.development.js
|
|
@@ -20,7 +20,7 @@ import*as e from"react";import t,{forwardRef as n,useRef as i,useCallback as r,u
|
|
|
20
20
|
object-assign
|
|
21
21
|
(c) Sindre Sorhus
|
|
22
22
|
@license MIT
|
|
23
|
-
*/function Mm(){if(ym)return gm;ym=1;var e=Object.getOwnPropertySymbols,t=Object.prototype.hasOwnProperty,n=Object.prototype.propertyIsEnumerable;return gm=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},n=0;n<10;n++)t["_"+String.fromCharCode(n)]=n;var i=Object.getOwnPropertyNames(t).map(function(e){return t[e]});if("0123456789"!==i.join(""))return!1;var r={};return"abcdefghijklmnopqrst".split("").forEach(function(e){r[e]=e}),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},r)).join("")}catch(e){return!1}}()?Object.assign:function(i,r){for(var s,o,a=function(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}(i),l=1;l<arguments.length;l++){for(var u in s=Object(arguments[l]))t.call(s,u)&&(a[u]=s[u]);if(e){o=e(s);for(var c=0;c<o.length;c++)n.call(s,o[c])&&(a[o[c]]=s[o[c]])}}return a},gm}function Lm(){if(bm)return vm;bm=1;return vm="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"}function Nm(){return wm?xm:(wm=1,xm=Function.call.bind(Object.prototype.hasOwnProperty))}function zm(){if(Am)return Em;Am=1;var e=function(){};if("production"!==process.env.NODE_ENV){var t=Lm(),n={},i=Nm();e=function(e){var t="Warning: "+e;"undefined"!=typeof console&&console.error(t);try{throw new Error(t)}catch(e){}}}function r(r,s,o,a,l){if("production"!==process.env.NODE_ENV)for(var u in r)if(i(r,u)){var c;try{if("function"!=typeof r[u]){var h=Error((a||"React class")+": "+o+" type `"+u+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof r[u]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw h.name="Invariant Violation",h}c=r[u](s,u,a,o,null,t)}catch(e){c=e}if(!c||c instanceof Error||e((a||"React class")+": type specification of "+o+" `"+u+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof c+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),c instanceof Error&&!(c.message in n)){n[c.message]=!0;var d=l?l():"";e("Failed "+o+" type: "+c.message+(null!=d?d:""))}}}return r.resetWarningCache=function(){"production"!==process.env.NODE_ENV&&(n={})},Em=r}function Dm(){if(Sm)return Tm;Sm=1;var e=Rm(),t=Mm(),n=Lm(),i=Nm(),r=zm(),s=function(){};function o(){return null}return"production"!==process.env.NODE_ENV&&(s=function(e){var t="Warning: "+e;"undefined"!=typeof console&&console.error(t);try{throw new Error(t)}catch(e){}}),Tm=function(a,l){var u="function"==typeof Symbol&&Symbol.iterator;var c="<<anonymous>>",h={array:m("array"),bigint:m("bigint"),bool:m("boolean"),func:m("function"),number:m("number"),object:m("object"),string:m("string"),symbol:m("symbol"),any:p(o),arrayOf:function(e){return p(function(t,i,r,s,o){if("function"!=typeof e)return new f("Property `"+o+"` of component `"+r+"` has invalid PropType notation inside arrayOf.");var a=t[i];if(!Array.isArray(a))return new f("Invalid "+s+" `"+o+"` of type `"+y(a)+"` supplied to `"+r+"`, expected an array.");for(var l=0;l<a.length;l++){var u=e(a,l,r,s,o+"["+l+"]",n);if(u instanceof Error)return u}return null})},element:p(function(e,t,n,i,r){var s=e[t];return a(s)?null:new f("Invalid "+i+" `"+r+"` of type `"+y(s)+"` supplied to `"+n+"`, expected a single ReactElement.")}),elementType:p(function(t,n,i,r,s){var o=t[n];return e.isValidElementType(o)?null:new f("Invalid "+r+" `"+s+"` of type `"+y(o)+"` supplied to `"+i+"`, expected a single ReactElement type.")}),instanceOf:function(e){return p(function(t,n,i,r,s){if(!(t[n]instanceof e)){var o=e.name||c;return new f("Invalid "+r+" `"+s+"` of type `"+(((a=t[n]).constructor&&a.constructor.name?a.constructor.name:c)+"` supplied to `")+i+"`, expected instance of `"+o+"`.")}var a;return null})},node:p(function(e,t,n,i,r){return g(e[t])?null:new f("Invalid "+i+" `"+r+"` supplied to `"+n+"`, expected a ReactNode.")}),objectOf:function(e){return p(function(t,r,s,o,a){if("function"!=typeof e)return new f("Property `"+a+"` of component `"+s+"` has invalid PropType notation inside objectOf.");var l=t[r],u=y(l);if("object"!==u)return new f("Invalid "+o+" `"+a+"` of type `"+u+"` supplied to `"+s+"`, expected an object.");for(var c in l)if(i(l,c)){var h=e(l,c,s,o,a+"."+c,n);if(h instanceof Error)return h}return null})},oneOf:function(e){if(!Array.isArray(e))return"production"!==process.env.NODE_ENV&&s(arguments.length>1?"Invalid arguments supplied to oneOf, expected an array, got "+arguments.length+" arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z]).":"Invalid argument supplied to oneOf, expected an array."),o;return p(function(t,n,i,r,s){for(var o=t[n],a=0;a<e.length;a++)if(d(o,e[a]))return null;var l=JSON.stringify(e,function(e,t){return"symbol"===v(t)?String(t):t});return new f("Invalid "+r+" `"+s+"` of value `"+String(o)+"` supplied to `"+i+"`, expected one of "+l+".")})},oneOfType:function(e){if(!Array.isArray(e))return"production"!==process.env.NODE_ENV&&s("Invalid argument supplied to oneOfType, expected an instance of array."),o;for(var t=0;t<e.length;t++){var r=e[t];if("function"!=typeof r)return s("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+b(r)+" at index "+t+"."),o}return p(function(t,r,s,o,a){for(var l=[],u=0;u<e.length;u++){var c=(0,e[u])(t,r,s,o,a,n);if(null==c)return null;c.data&&i(c.data,"expectedType")&&l.push(c.data.expectedType)}return new f("Invalid "+o+" `"+a+"` supplied to `"+s+"`"+(l.length>0?", expected one of type ["+l.join(", ")+"]":"")+".")})},shape:function(e){return p(function(t,i,r,s,o){var a=t[i],l=y(a);if("object"!==l)return new f("Invalid "+s+" `"+o+"` of type `"+l+"` supplied to `"+r+"`, expected `object`.");for(var u in e){var c=e[u];if("function"!=typeof c)return _(r,s,o,u,v(c));var h=c(a,u,r,s,o+"."+u,n);if(h)return h}return null})},exact:function(e){return p(function(r,s,o,a,l){var u=r[s],c=y(u);if("object"!==c)return new f("Invalid "+a+" `"+l+"` of type `"+c+"` supplied to `"+o+"`, expected `object`.");var h=t({},r[s],e);for(var d in h){var p=e[d];if(i(e,d)&&"function"!=typeof p)return _(o,a,l,d,v(p));if(!p)return new f("Invalid "+a+" `"+l+"` key `"+d+"` supplied to `"+o+"`.\nBad object: "+JSON.stringify(r[s],null," ")+"\nValid keys: "+JSON.stringify(Object.keys(e),null," "));var m=p(u,d,o,a,l+"."+d,n);if(m)return m}return null})}};function d(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t}function f(e,t){this.message=e,this.data=t&&"object"==typeof t?t:{},this.stack=""}function p(e){if("production"!==process.env.NODE_ENV)var t={},i=0;function r(r,o,a,u,h,d,p){if(u=u||c,d=d||a,p!==n){if(l){var m=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types");throw m.name="Invariant Violation",m}if("production"!==process.env.NODE_ENV&&"undefined"!=typeof console){var _=u+":"+a;!t[_]&&i<3&&(s("You are manually calling a React.PropTypes validation function for the `"+d+"` prop on `"+u+"`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."),t[_]=!0,i++)}}return null==o[a]?r?null===o[a]?new f("The "+h+" `"+d+"` is marked as required in `"+u+"`, but its value is `null`."):new f("The "+h+" `"+d+"` is marked as required in `"+u+"`, but its value is `undefined`."):null:e(o,a,u,h,d)}var o=r.bind(null,!1);return o.isRequired=r.bind(null,!0),o}function m(e){return p(function(t,n,i,r,s,o){var a=t[n];return y(a)!==e?new f("Invalid "+r+" `"+s+"` of type `"+v(a)+"` supplied to `"+i+"`, expected `"+e+"`.",{expectedType:e}):null})}function _(e,t,n,i,r){return new f((e||"React class")+": "+t+" type `"+n+"."+i+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+r+"`.")}function g(e){switch(typeof e){case"number":case"string":case"undefined":return!0;case"boolean":return!e;case"object":if(Array.isArray(e))return e.every(g);if(null===e||a(e))return!0;var t=function(e){var t=e&&(u&&e[u]||e["@@iterator"]);if("function"==typeof t)return t}(e);if(!t)return!1;var n,i=t.call(e);if(t!==e.entries){for(;!(n=i.next()).done;)if(!g(n.value))return!1}else for(;!(n=i.next()).done;){var r=n.value;if(r&&!g(r[1]))return!1}return!0;default:return!1}}function y(e){var t=typeof e;return Array.isArray(e)?"array":e instanceof RegExp?"object":function(e,t){return"symbol"===e||!!t&&("Symbol"===t["@@toStringTag"]||"function"==typeof Symbol&&t instanceof Symbol)}(t,e)?"symbol":t}function v(e){if(null==e)return""+e;var t=y(e);if("object"===t){if(e instanceof Date)return"date";if(e instanceof RegExp)return"regexp"}return t}function b(e){var t=v(e);switch(t){case"array":case"object":return"an "+t;case"boolean":case"date":case"regexp":return"a "+t;default:return t}}return f.prototype=Error.prototype,h.checkPropTypes=r,h.resetWarningCache=r.resetWarningCache,h.PropTypes=h,h},Tm}function Im(){if(Om)return km;Om=1;var e=Lm();function t(){}function n(){}return n.resetWarningCache=t,km=function(){function i(t,n,i,r,s,o){if(o!==e){var a=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw a.name="Invariant Violation",a}}function r(){return i}i.isRequired=i;var s={array:i,bigint:i,bool:i,func:i,number:i,object:i,string:i,symbol:i,any:i,arrayOf:r,element:i,elementType:i,instanceOf:r,node:i,objectOf:r,oneOf:r,oneOfType:r,shape:r,exact:r,checkPropTypes:n,resetWarningCache:t};return s.PropTypes=s,s},km}function Fm(){if(Pm)return dm.exports;if(Pm=1,"production"!==process.env.NODE_ENV){var e=Rm();dm.exports=Dm()(e.isElement,true)}else dm.exports=Im()();return dm.exports}var jm,Bm={exports:{}};var Um,Vm={},Gm={};function $m(){if(Um)return Gm;return Um=1,Object.defineProperty(Gm,"__esModule",{value:!0}),Gm.dontSetMe=function(e,t,n){if(e[t])return new Error(`Invalid prop ${t} passed to ${n} - do not set this, set it on the child.`)},Gm.findInArray=function(e,t){for(let n=0,i=e.length;n<i;n++)if(t.apply(t,[e[n],n,e]))return e[n]},Gm.int=function(e){return parseInt(e,10)},Gm.isFunction=function(e){return"function"==typeof e||"[object Function]"===Object.prototype.toString.call(e)},Gm.isNum=function(e){return"number"==typeof e&&!isNaN(e)},Gm}var Zm,qm,Wm={};function Hm(){if(qm)return Vm;qm=1,Object.defineProperty(Vm,"__esModule",{value:!0}),Vm.addClassName=o,Vm.addEvent=function(e,t,n,i){if(!e)return;const r={capture:!0,...i};e.addEventListener?e.addEventListener(t,n,r):e.attachEvent?e.attachEvent("on"+t,n):e["on"+t]=n},Vm.addUserSelectStyles=function(e){if(!e)return;let t=e.getElementById("react-draggable-style-el");t||(t=e.createElement("style"),t.type="text/css",t.id="react-draggable-style-el",t.innerHTML=".react-draggable-transparent-selection *::-moz-selection {all: inherit;}\n",t.innerHTML+=".react-draggable-transparent-selection *::selection {all: inherit;}\n",e.getElementsByTagName("head")[0].appendChild(t));e.body&&o(e.body,"react-draggable-transparent-selection")},Vm.createCSSTransform=function(e,n){const i=r(e,n,"px");return{[(0,t.browserPrefixToKey)("transform",t.default)]:i}},Vm.createSVGTransform=function(e,t){return r(e,t,"")},Vm.getTouch=function(t,n){return t.targetTouches&&(0,e.findInArray)(t.targetTouches,e=>n===e.identifier)||t.changedTouches&&(0,e.findInArray)(t.changedTouches,e=>n===e.identifier)},Vm.getTouchIdentifier=function(e){if(e.targetTouches&&e.targetTouches[0])return e.targetTouches[0].identifier;if(e.changedTouches&&e.changedTouches[0])return e.changedTouches[0].identifier},Vm.getTranslation=r,Vm.innerHeight=function(t){let n=t.clientHeight;const i=t.ownerDocument.defaultView.getComputedStyle(t);return n-=(0,e.int)(i.paddingTop),n-=(0,e.int)(i.paddingBottom),n},Vm.innerWidth=function(t){let n=t.clientWidth;const i=t.ownerDocument.defaultView.getComputedStyle(t);return n-=(0,e.int)(i.paddingLeft),n-=(0,e.int)(i.paddingRight),n},Vm.matchesSelector=i,Vm.matchesSelectorAndParentsTo=function(e,t,n){let r=e;do{if(i(r,t))return!0;if(r===n)return!1;r=r.parentNode}while(r);return!1},Vm.offsetXYFromParent=function(e,t,n){const i=t===t.ownerDocument.body?{left:0,top:0}:t.getBoundingClientRect(),r=(e.clientX+t.scrollLeft-i.left)/n,s=(e.clientY+t.scrollTop-i.top)/n;return{x:r,y:s}},Vm.outerHeight=function(t){let n=t.clientHeight;const i=t.ownerDocument.defaultView.getComputedStyle(t);return n+=(0,e.int)(i.borderTopWidth),n+=(0,e.int)(i.borderBottomWidth),n},Vm.outerWidth=function(t){let n=t.clientWidth;const i=t.ownerDocument.defaultView.getComputedStyle(t);return n+=(0,e.int)(i.borderLeftWidth),n+=(0,e.int)(i.borderRightWidth),n},Vm.removeClassName=a,Vm.removeEvent=function(e,t,n,i){if(!e)return;const r={capture:!0,...i};e.removeEventListener?e.removeEventListener(t,n,r):e.detachEvent?e.detachEvent("on"+t,n):e["on"+t]=null},Vm.scheduleRemoveUserSelectStyles=function(e){window.requestAnimationFrame?window.requestAnimationFrame(()=>{s(e)}):s(e)};var e=$m(),t=function(e,t){if("function"==typeof WeakMap)var n=new WeakMap,i=new WeakMap;return function(e,t){if(!t&&e&&e.__esModule)return e;var r,s,o={__proto__:null,default:e};if(null===e||"object"!=typeof e&&"function"!=typeof e)return o;if(r=t?i:n){if(r.has(e))return r.get(e);r.set(e,o)}for(const t in e)"default"!==t&&{}.hasOwnProperty.call(e,t)&&((s=(r=Object.defineProperty)&&Object.getOwnPropertyDescriptor(e,t))&&(s.get||s.set)?r(o,t,s):o[t]=e[t]);return o}(e,t)}(function(){if(Zm)return Wm;Zm=1,Object.defineProperty(Wm,"__esModule",{value:!0}),Wm.browserPrefixToKey=n,Wm.browserPrefixToStyle=function(e,t){return t?`-${t.toLowerCase()}-${e}`:e},Wm.default=void 0,Wm.getPrefix=t;const e=["Moz","Webkit","O","ms"];function t(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"transform";if("undefined"==typeof window)return"";const i=window.document?.documentElement?.style;if(!i)return"";if(t in i)return"";for(let r=0;r<e.length;r++)if(n(t,e[r])in i)return e[r];return""}function n(e,t){return t?`${t}${function(e){let t="",n=!0;for(let i=0;i<e.length;i++)n?(t+=e[i].toUpperCase(),n=!1):"-"===e[i]?n=!0:t+=e[i];return t}(e)}`:e}return Wm.default=t(),Wm}());let n="";function i(t,i){return n||(n=(0,e.findInArray)(["matches","webkitMatchesSelector","mozMatchesSelector","msMatchesSelector","oMatchesSelector"],function(n){return(0,e.isFunction)(t[n])})),!!(0,e.isFunction)(t[n])&&t[n](i)}function r(e,t,n){let{x:i,y:r}=e,s=`translate(${i}${n},${r}${n})`;if(t){s=`translate(${`${"string"==typeof t.x?t.x:t.x+n}`}, ${`${"string"==typeof t.y?t.y:t.y+n}`})`+s}return s}function s(e){if(e)try{if(e.body&&a(e.body,"react-draggable-transparent-selection"),e.selection)e.selection.empty();else{const t=(e.defaultView||window).getSelection();t&&"Caret"!==t.type&&t.removeAllRanges()}}catch(e){}}function o(e,t){e.classList?e.classList.add(t):e.className.match(new RegExp(`(?:^|\\s)${t}(?!\\S)`))||(e.className+=` ${t}`)}function a(e,t){e.classList?e.classList.remove(t):e.className=e.className.replace(new RegExp(`(?:^|\\s)${t}(?!\\S)`,"g"),"")}return Vm}var Km,Ym={};function Xm(){if(Km)return Ym;Km=1,Object.defineProperty(Ym,"__esModule",{value:!0}),Ym.canDragX=function(e){return"both"===e.props.axis||"x"===e.props.axis},Ym.canDragY=function(e){return"both"===e.props.axis||"y"===e.props.axis},Ym.createCoreData=function(t,i,r){const s=!(0,e.isNum)(t.lastX),o=n(t);return s?{node:o,deltaX:0,deltaY:0,lastX:i,lastY:r,x:i,y:r}:{node:o,deltaX:i-t.lastX,deltaY:r-t.lastY,lastX:t.lastX,lastY:t.lastY,x:i,y:r}},Ym.createDraggableData=function(e,t){const n=e.props.scale;return{node:t.node,x:e.state.x+t.deltaX/n,y:e.state.y+t.deltaY/n,deltaX:t.deltaX/n,deltaY:t.deltaY/n,lastX:e.state.x,lastY:e.state.y}},Ym.getBoundPosition=function(i,r,s){if(!i.props.bounds)return[r,s];let{bounds:o}=i.props;o="string"==typeof o?o:function(e){return{left:e.left,top:e.top,right:e.right,bottom:e.bottom}}(o);const a=n(i);if("string"==typeof o){const{ownerDocument:n}=a,i=n.defaultView;let r;if("parent"===o)r=a.parentNode;else{r=a.getRootNode().querySelector(o)}if(!(r instanceof i.HTMLElement))throw new Error('Bounds selector "'+o+'" could not find an element.');const s=r,l=i.getComputedStyle(a),u=i.getComputedStyle(s);o={left:-a.offsetLeft+(0,e.int)(u.paddingLeft)+(0,e.int)(l.marginLeft),top:-a.offsetTop+(0,e.int)(u.paddingTop)+(0,e.int)(l.marginTop),right:(0,t.innerWidth)(s)-(0,t.outerWidth)(a)-a.offsetLeft+(0,e.int)(u.paddingRight)-(0,e.int)(l.marginRight),bottom:(0,t.innerHeight)(s)-(0,t.outerHeight)(a)-a.offsetTop+(0,e.int)(u.paddingBottom)-(0,e.int)(l.marginBottom)}}(0,e.isNum)(o.right)&&(r=Math.min(r,o.right));(0,e.isNum)(o.bottom)&&(s=Math.min(s,o.bottom));(0,e.isNum)(o.left)&&(r=Math.max(r,o.left));(0,e.isNum)(o.top)&&(s=Math.max(s,o.top));return[r,s]},Ym.getControlPosition=function(e,i,r){const s="number"==typeof i?(0,t.getTouch)(e,i):null;if("number"==typeof i&&!s)return null;const o=n(r),a=r.props.offsetParent||o.offsetParent||o.ownerDocument.body;return(0,t.offsetXYFromParent)(s||e,a,r.props.scale)},Ym.snapToGrid=function(e,t,n){const i=Math.round(t/e[0])*e[0],r=Math.round(n/e[1])*e[1];return[i,r]};var e=$m(),t=Hm();function n(e){const t=e.findDOMNode();if(!t)throw new Error("<DraggableCore>: Unmounted during event!");return t}return Ym}var Jm,Qm,e_,t_,n_={},i_={};function r_(){if(Jm)return i_;return Jm=1,Object.defineProperty(i_,"__esModule",{value:!0}),i_.default=function(){},i_}function s_(){if(Qm)return n_;Qm=1,Object.defineProperty(n_,"__esModule",{value:!0}),n_.default=void 0;var e=function(e,t){if("function"==typeof WeakMap)var n=new WeakMap,i=new WeakMap;return function(e,t){if(!t&&e&&e.__esModule)return e;var r,s,o={__proto__:null,default:e};if(null===e||"object"!=typeof e&&"function"!=typeof e)return o;if(r=t?i:n){if(r.has(e))return r.get(e);r.set(e,o)}for(const t in e)"default"!==t&&{}.hasOwnProperty.call(e,t)&&((s=(r=Object.defineProperty)&&Object.getOwnPropertyDescriptor(e,t))&&(s.get||s.set)?r(o,t,s):o[t]=e[t]);return o}(e,t)}(t),n=l(Fm()),i=l(v),r=Hm(),s=Xm(),o=$m(),a=l(r_());function l(e){return e&&e.__esModule?e:{default:e}}function u(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var i=n.call(e,t);if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const c={start:"touchstart",move:"touchmove",stop:"touchend"},h={start:"mousedown",move:"mousemove",stop:"mouseup"};let d=h,f=class extends e.Component{constructor(){super(...arguments),u(this,"dragging",!1),u(this,"lastX",NaN),u(this,"lastY",NaN),u(this,"touchIdentifier",null),u(this,"mounted",!1),u(this,"handleDragStart",e=>{if(this.props.onMouseDown(e),!this.props.allowAnyClick&&"number"==typeof e.button&&0!==e.button)return!1;const t=this.findDOMNode();if(!t||!t.ownerDocument||!t.ownerDocument.body)throw new Error("<DraggableCore> not mounted on DragStart!");const{ownerDocument:n}=t;if(this.props.disabled||!(e.target instanceof n.defaultView.Node)||this.props.handle&&!(0,r.matchesSelectorAndParentsTo)(e.target,this.props.handle,t)||this.props.cancel&&(0,r.matchesSelectorAndParentsTo)(e.target,this.props.cancel,t))return;"touchstart"!==e.type||this.props.allowMobileScroll||e.preventDefault();const i=(0,r.getTouchIdentifier)(e);this.touchIdentifier=i;const o=(0,s.getControlPosition)(e,i,this);if(null==o)return;const{x:l,y:u}=o,c=(0,s.createCoreData)(this,l,u);(0,a.default)("DraggableCore: handleDragStart: %j",c),(0,a.default)("calling",this.props.onStart);!1!==this.props.onStart(e,c)&&!1!==this.mounted&&(this.props.enableUserSelectHack&&(0,r.addUserSelectStyles)(n),this.dragging=!0,this.lastX=l,this.lastY=u,(0,r.addEvent)(n,d.move,this.handleDrag),(0,r.addEvent)(n,d.stop,this.handleDragStop))}),u(this,"handleDrag",e=>{const t=(0,s.getControlPosition)(e,this.touchIdentifier,this);if(null==t)return;let{x:n,y:i}=t;if(Array.isArray(this.props.grid)){let e=n-this.lastX,t=i-this.lastY;if([e,t]=(0,s.snapToGrid)(this.props.grid,e,t),!e&&!t)return;n=this.lastX+e,i=this.lastY+t}const r=(0,s.createCoreData)(this,n,i);(0,a.default)("DraggableCore: handleDrag: %j",r);if(!1!==this.props.onDrag(e,r)&&!1!==this.mounted)this.lastX=n,this.lastY=i;else try{this.handleDragStop(new MouseEvent("mouseup"))}catch(e){const t=document.createEvent("MouseEvents");t.initMouseEvent("mouseup",!0,!0,window,0,0,0,0,0,!1,!1,!1,!1,0,null),this.handleDragStop(t)}}),u(this,"handleDragStop",e=>{if(!this.dragging)return;const t=(0,s.getControlPosition)(e,this.touchIdentifier,this);if(null==t)return;let{x:n,y:i}=t;if(Array.isArray(this.props.grid)){let e=n-this.lastX||0,t=i-this.lastY||0;[e,t]=(0,s.snapToGrid)(this.props.grid,e,t),n=this.lastX+e,i=this.lastY+t}const o=(0,s.createCoreData)(this,n,i);if(!1===this.props.onStop(e,o)||!1===this.mounted)return!1;const l=this.findDOMNode();l&&this.props.enableUserSelectHack&&(0,r.scheduleRemoveUserSelectStyles)(l.ownerDocument),(0,a.default)("DraggableCore: handleDragStop: %j",o),this.dragging=!1,this.lastX=NaN,this.lastY=NaN,l&&((0,a.default)("DraggableCore: Removing handlers"),(0,r.removeEvent)(l.ownerDocument,d.move,this.handleDrag),(0,r.removeEvent)(l.ownerDocument,d.stop,this.handleDragStop))}),u(this,"onMouseDown",e=>(d=h,this.handleDragStart(e))),u(this,"onMouseUp",e=>(d=h,this.handleDragStop(e))),u(this,"onTouchStart",e=>(d=c,this.handleDragStart(e))),u(this,"onTouchEnd",e=>(d=c,this.handleDragStop(e)))}componentDidMount(){this.mounted=!0;const e=this.findDOMNode();e&&(0,r.addEvent)(e,c.start,this.onTouchStart,{passive:!1})}componentWillUnmount(){this.mounted=!1;const e=this.findDOMNode();if(e){const{ownerDocument:t}=e;(0,r.removeEvent)(t,h.move,this.handleDrag),(0,r.removeEvent)(t,c.move,this.handleDrag),(0,r.removeEvent)(t,h.stop,this.handleDragStop),(0,r.removeEvent)(t,c.stop,this.handleDragStop),(0,r.removeEvent)(e,c.start,this.onTouchStart,{passive:!1}),this.props.enableUserSelectHack&&(0,r.scheduleRemoveUserSelectStyles)(t)}}findDOMNode(){return this.props?.nodeRef?this.props?.nodeRef?.current:i.default.findDOMNode(this)}render(){return e.cloneElement(e.Children.only(this.props.children),{onMouseDown:this.onMouseDown,onMouseUp:this.onMouseUp,onTouchEnd:this.onTouchEnd})}};return n_.default=f,u(f,"displayName","DraggableCore"),u(f,"propTypes",{allowAnyClick:n.default.bool,allowMobileScroll:n.default.bool,children:n.default.node.isRequired,disabled:n.default.bool,enableUserSelectHack:n.default.bool,offsetParent:function(e,t){if(e[t]&&1!==e[t].nodeType)throw new Error("Draggable's offsetParent must be a DOM Node.")},grid:n.default.arrayOf(n.default.number),handle:n.default.string,cancel:n.default.string,nodeRef:n.default.object,onStart:n.default.func,onDrag:n.default.func,onStop:n.default.func,onMouseDown:n.default.func,scale:n.default.number,className:o.dontSetMe,style:o.dontSetMe,transform:o.dontSetMe}),u(f,"defaultProps",{allowAnyClick:!1,allowMobileScroll:!1,disabled:!1,enableUserSelectHack:!0,onStart:function(){},onDrag:function(){},onStop:function(){},onMouseDown:function(){},scale:1}),n_}function o_(){return e_||(e_=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"DraggableCore",{enumerable:!0,get:function(){return u.default}}),e.default=void 0;var n=function(e,t){if("function"==typeof WeakMap)var n=new WeakMap,i=new WeakMap;return function(e,t){if(!t&&e&&e.__esModule)return e;var r,s,o={__proto__:null,default:e};if(null===e||"object"!=typeof e&&"function"!=typeof e)return o;if(r=t?i:n){if(r.has(e))return r.get(e);r.set(e,o)}for(const t in e)"default"!==t&&{}.hasOwnProperty.call(e,t)&&((s=(r=Object.defineProperty)&&Object.getOwnPropertyDescriptor(e,t))&&(s.get||s.set)?r(o,t,s):o[t]=e[t]);return o}(e,t)}(t),i=h(Fm()),r=h(v),s=function(){if(jm)return Bm.exports;function e(t){var n,i,r="";if("string"==typeof t||"number"==typeof t)r+=t;else if("object"==typeof t)if(Array.isArray(t)){var s=t.length;for(n=0;n<s;n++)t[n]&&(i=e(t[n]))&&(r&&(r+=" "),r+=i)}else for(i in t)t[i]&&(r&&(r+=" "),r+=i);return r}function t(){for(var t,n,i=0,r="",s=arguments.length;i<s;i++)(t=arguments[i])&&(n=e(t))&&(r&&(r+=" "),r+=n);return r}return jm=1,Bm.exports=t,Bm.exports.clsx=t,Bm.exports}(),o=Hm(),a=Xm(),l=$m(),u=h(s_()),c=h(r_());function h(e){return e&&e.__esModule?e:{default:e}}function d(){return d=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)({}).hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},d.apply(null,arguments)}function f(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var i=n.call(e,t);if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}class p extends n.Component{static getDerivedStateFromProps(e,t){let{position:n}=e,{prevPropsPosition:i}=t;return!n||i&&n.x===i.x&&n.y===i.y?null:((0,c.default)("Draggable: getDerivedStateFromProps %j",{position:n,prevPropsPosition:i}),{x:n.x,y:n.y,prevPropsPosition:{...n}})}constructor(e){super(e),f(this,"onDragStart",(e,t)=>{(0,c.default)("Draggable: onDragStart: %j",t);if(!1===this.props.onStart(e,(0,a.createDraggableData)(this,t)))return!1;this.setState({dragging:!0,dragged:!0})}),f(this,"onDrag",(e,t)=>{if(!this.state.dragging)return!1;(0,c.default)("Draggable: onDrag: %j",t);const n=(0,a.createDraggableData)(this,t),i={x:n.x,y:n.y,slackX:0,slackY:0};if(this.props.bounds){const{x:e,y:t}=i;i.x+=this.state.slackX,i.y+=this.state.slackY;const[r,s]=(0,a.getBoundPosition)(this,i.x,i.y);i.x=r,i.y=s,i.slackX=this.state.slackX+(e-i.x),i.slackY=this.state.slackY+(t-i.y),n.x=i.x,n.y=i.y,n.deltaX=i.x-this.state.x,n.deltaY=i.y-this.state.y}if(!1===this.props.onDrag(e,n))return!1;this.setState(i)}),f(this,"onDragStop",(e,t)=>{if(!this.state.dragging)return!1;if(!1===this.props.onStop(e,(0,a.createDraggableData)(this,t)))return!1;(0,c.default)("Draggable: onDragStop: %j",t);const n={dragging:!1,slackX:0,slackY:0};if(Boolean(this.props.position)){const{x:e,y:t}=this.props.position;n.x=e,n.y=t}this.setState(n)}),this.state={dragging:!1,dragged:!1,x:e.position?e.position.x:e.defaultPosition.x,y:e.position?e.position.y:e.defaultPosition.y,prevPropsPosition:{...e.position},slackX:0,slackY:0,isElementSVG:!1},!e.position||e.onDrag||e.onStop||console.warn("A `position` was applied to this <Draggable>, without drag handlers. This will make this component effectively undraggable. Please attach `onDrag` or `onStop` handlers so you can adjust the `position` of this element.")}componentDidMount(){void 0!==window.SVGElement&&this.findDOMNode()instanceof window.SVGElement&&this.setState({isElementSVG:!0})}componentWillUnmount(){this.state.dragging&&this.setState({dragging:!1})}findDOMNode(){return this.props?.nodeRef?.current??r.default.findDOMNode(this)}render(){const{axis:e,bounds:t,children:i,defaultPosition:r,defaultClassName:l,defaultClassNameDragging:c,defaultClassNameDragged:h,position:f,positionOffset:p,scale:m,..._}=this.props;let g={},y=null;const v=!Boolean(f)||this.state.dragging,b=f||r,x={x:(0,a.canDragX)(this)&&v?this.state.x:b.x,y:(0,a.canDragY)(this)&&v?this.state.y:b.y};this.state.isElementSVG?y=(0,o.createSVGTransform)(x,p):g=(0,o.createCSSTransform)(x,p);const w=(0,s.clsx)(i.props.className||"",l,{[c]:this.state.dragging,[h]:this.state.dragged});return n.createElement(u.default,d({},_,{onStart:this.onDragStart,onDrag:this.onDrag,onStop:this.onDragStop}),n.cloneElement(n.Children.only(i),{className:w,style:{...i.props.style,...g},transform:y}))}}e.default=p,f(p,"displayName","Draggable"),f(p,"propTypes",{...u.default.propTypes,axis:i.default.oneOf(["both","x","y","none"]),bounds:i.default.oneOfType([i.default.shape({left:i.default.number,right:i.default.number,top:i.default.number,bottom:i.default.number}),i.default.string,i.default.oneOf([!1])]),defaultClassName:i.default.string,defaultClassNameDragging:i.default.string,defaultClassNameDragged:i.default.string,defaultPosition:i.default.shape({x:i.default.number,y:i.default.number}),positionOffset:i.default.shape({x:i.default.oneOfType([i.default.number,i.default.string]),y:i.default.oneOfType([i.default.number,i.default.string])}),position:i.default.shape({x:i.default.number,y:i.default.number}),className:l.dontSetMe,style:l.dontSetMe,transform:l.dontSetMe}),f(p,"defaultProps",{...u.default.defaultProps,axis:"both",bounds:!1,defaultClassName:"react-draggable",defaultClassNameDragging:"react-draggable-dragging",defaultClassNameDragged:"react-draggable-dragged",defaultPosition:{x:0,y:0},scale:1})}(hm)),hm}var a_=function(){if(t_)return cm.exports;t_=1;const{default:e,DraggableCore:t}=o_();return cm.exports=e,cm.exports.default=e,cm.exports.DraggableCore=t,cm.exports}(),l_=xe(a_);const u_=({zIndex:t,width:n,bottom:i,right:r,left:s,top:o,sx:a,children:l})=>{const u=e.useId(),c=e.useRef(null);return w(K,{children:w(l_,{nodeRef:c,children:w(P,{id:u,ref:c,sx:()=>({position:"absolute",top:o,left:s,bottom:i,right:r,width:n,zIndex:t,backgroundColor:"white"}),children:w(nh,{sx:a,children:l})})})})},c_=m(null),h_={didCatch:!1,error:null};class d_ extends c{constructor(e){super(e),this.resetErrorBoundary=this.resetErrorBoundary.bind(this),this.state=h_}static getDerivedStateFromError(e){return{didCatch:!0,error:e}}resetErrorBoundary(...e){const{error:t}=this.state;null!==t&&(this.props.onReset?.({args:e,reason:"imperative-api"}),this.setState(h_))}componentDidCatch(e,t){this.props.onError?.(e,t)}componentDidUpdate(e,t){const{didCatch:n}=this.state,{resetKeys:i}=this.props;n&&null!==t.error&&function(e=[],t=[]){return e.length!==t.length||e.some((e,n)=>!Object.is(e,t[n]))}(e.resetKeys,i)&&(this.props.onReset?.({next:i,prev:e.resetKeys,reason:"keys"}),this.setState(h_))}render(){const{children:e,fallbackRender:t,FallbackComponent:n,fallback:i}=this.props,{didCatch:r,error:s}=this.state;let a=e;if(r){const e={error:s,resetErrorBoundary:this.resetErrorBoundary};if("function"==typeof t)a=t(e);else if(n)a=o(n,e);else{if(void 0===i)throw s;a=i}}return o(c_.Provider,{value:{didCatch:r,error:s,resetErrorBoundary:this.resetErrorBoundary}},a)}}const f_=({error:e,resetErrorBoundary:t})=>E(P,{role:"alert",sx:{padding:"20px",background:"#fee"},children:[w(O,{variant:"h2",children:"Ошибка приложения"}),w(O,{variant:"body1",color:"error",children:e.message}),w(Hc,{onClick:t,children:"Попробовать снова"})]}),p_=({children:e,FallbackComponent:t=f_})=>w(d_,{FallbackComponent:t,children:e});function m_(t){const{name:n,type:i}=t,r=e.useId(),{control:s}=qh();return w($h,{name:n,control:s,render:({field:e})=>E(P,{sx:({spacing:e})=>({display:"grid",width:"100%",gap:e(1)}),children:[w(Dd,{id:r,size:"small",...t,...e,onChange:t=>{const{target:n}=t,{value:r}=n;if("number"===i)""===r?e.onChange():e.onChange(Number(r));else e.onChange(t)}}),w(Ld,{name:n})]})})}var __,g_;!function(e){e.ONE_WAY='"OneWay"',e.POINT_ADDRESS='"PointAddress"',e.BUILDING_AREA='"MapBuildingECArea"',e.BUILTUP_AREA='"MapAdminBuiltupArea"',e.ADMIN_AREA='"MapAdminArea"',e.OCEAN_AREA='"MapOceanArea"',e.OCEAN_AREA_LABEL='"MapOceanAreaLabel"',e.FACILITY_AREA='"MapFacilityArea"',e.FACILITY_AREA_LABEL='"MapFacilityAreaLabel"',e.LANDUSE_AREA='"MapLanduseArea"',e.LANDUSE_AREA_LABEL='"MapLanduseAreaLabel"',e.NATURE_FIELD='"MapNatureField"',e.NATURE_FOREST='"MapNatureForest"',e.LINK='"Link"',e.RAILROAD_LINK='"MapRailroadLink"',e.WATER_LINK='"MapWaterLink"',e.WATER_AREA='"MapWaterArea"',e.WATER_AREA_LABEL='"MapWaterAreaLabel"',e.WATER_LAKE_LABEL='"MapWaterLakeLabel"',e.POI='"POI"',e.CITY_POI='"CityPOI"',e.CONDITIONS='"Conditions"',e.ROAD_POLY='"RoadPoly"',e.PARKING_LINE='"ParkingLine"',e.LANE_MARKING_LINE='"LaneMarkingLine"',e.LANE_MARKING_POLY='"LaneMarkingPoly"',e.LANE_MARKING_ARROW='"LaneMarkingArrow"',e.TRAFFIC_SIGN='"TrafficSign"',e.TRAFFIC_SIGNAL='"TrafficSignal"',e.CAMERA='"Camera"',e.PILLAR='"Pillar"'}(__||(__={})),function(e){e.TILE="tile",e.NATURE_TILE="nature_tile",e.MSK="msk"}(g_||(g_={}));const y_=e=>{const t=[],n={source:e,layer:__.BUILDING_AREA,minzoom:15},i={id:gn(),data:n,extruded:{draw:{polygons:{style:"buildings",extrude:"function() {\n return $zoom >= 17;\n }"}}},draw:{polygons:{color:"#DDB07B",height:{property:"height"}},lines:{color:"#DB933F",width:"2px",cap:"round",join:"round"}}};return t.push(i),t},v_=e=>{const t=[],n={source:e,layer:__.BUILTUP_AREA},i={id:gn(),data:n,draw:{polygons:{color:"#CFC8C8"}}};return t.push(i),t},b_=e=>{const t=[],n={source:e,layer:__.ADMIN_AREA},i={id:gn(),data:n,draw:{polygons:{color:"#D3D2CF"}}},r={id:gn(),data:n,filter:"function() {\n const { type } = feature;\n\n const isFilter = type === 'R';\n\n return isFilter;\n }",draw:{lines:{color:"#696969",width:"1px",cap:"round",join:"round"}}},s={id:gn(),data:n,filter:"function() {\n const { type } = feature;\n\n const isFilter = type === 'D' && $zoom >= 12;\n\n return isFilter;\n }",draw:{lines:{color:"#696969",dash:[4,7],width:"1px",cap:"round",join:"round"}}};return t.push(i,r,s),t},x_={size:20,extension:"png"},w_=e=>{const t=[],n={source:e,layer:__.CAMERA},i={},r="camera";i[r]={url:wn(`msk/${r}/${r}_${x_.size}.${x_.extension}`),filtering:"mipmap",sprites:{base:[0,0,x_.size,x_.size]}};const s={id:gn(),data:n,draw:{points:{collide:!1,texture:r,size:x_.size,sprite:"base",placement:"midpoint"}},textures:i,sublayers:{}};return t.push(s),t},E_=e=>{const t=[],n={source:e,layer:__.CITY_POI},i={id:gn(),data:n,filter:"function() {\n const { capital_order8, capital_order2, capital_order1, poi_name, priority } = feature;\n\n if ($zoom >= 9 && $zoom < 13) {\n return priority < 8;\n }\n\n if ($zoom <= 11) {\n return capital_order8 === 'Y';\n }\n\n if ($zoom >= 15) {\n return capital_order2 !== 'Y';\n }\n\n return true;\n }\n ",draw:{text:{text_source:"poi_name",priority:"function () {\n const { priority } = feature;\n\n if ($zoom <= 15) {\n return priority;\n }\n\n return 1;\n }\n ",font:{fill:"black",size:"function() {\n const { capital_order8 } = feature;\n\n if (capital_order8 === 'Y') {\n return '16px';\n }\n\n return '12px';\n }",weight:"function() {\n const { capital_order2 } = feature;\n\n if (capital_order2 === 'Y') {\n return 'bold';\n }\n\n return 'normal';\n }",stroke:{color:"white",width:"2px"}}}}};return t.push(i),t};var A_;!function(e){e.traffic_signal="traffic_signal",e.pedestrian_crossing="pedestrian_crossing",e.physical="physical",e.gate="gate"}(A_||(A_={}));const T_=e=>{const t=[],n={},i={source:e,layer:__.CONDITIONS},r={id:gn(),data:i};return Object.values(A_).forEach(e=>{n[`_${e}`]={filter:`function() {\n const { type } = feature;\n\n const isShow = type === '${e}';\n\n return isShow;\n }`,draw:{points:{texture:e,sprite:"base",placement:"midpoint"}}}}),r.sublayers=n,t.push(r),t},S_=e=>{const t=[],n={id:gn(),data:{source:e,layer:__.FACILITY_AREA},draw:{polygons:{color:"function() {\n const { feature_type } = feature;\n\n switch (feature_type) {\n case '2000408': {\n return '#DBBAC4';\n }\n\n case '1900403': {\n return '#B6C3C7';\n }\n\n case '1907403': {\n return '#A3B9C0';\n }\n\n case '2000123': {\n return '#E4BA7D';\n }\n\n case '2000124': {\n return '#BFE6E3';\n }\n\n case '2000200': {\n return '#A0A9A8';\n }\n\n case '2000403': {\n return '#AF7136';\n }\n\n case '2000420': {\n return '#89AC76';\n }\n\n case '2000457': {\n return '#9494C0';\n }\n\n default: {\n return '#E1D4D4';\n }\n }\n }",order:"function() {\n const { feature_type } = feature;\n\n switch (feature_type) {\n case '1907403': {\n return 301;\n }\n\n default: {\n return 300;\n }\n }\n }"},lines:{color:"#857F7F",width:"2px",cap:"round",join:"round"}}},i={id:gn(),data:{source:e,layer:__.FACILITY_AREA_LABEL},draw:{text:{text_source:"name",font:{fill:"function() {\n const { feature_type } = feature;\n\n switch(feature_type) {\n case '1900403':\n case '1907403': {\n return '#256D7B';\n }\n\n case '2000420':\n case '2000460':\n case '2000123': {\n return '#00541F';\n }\n\n case '2000408': {\n return '#5E2129';\n }\n\n case '2000124': {\n return '#3E5F8A';\n }\n\n case '2000200': {\n return '#464451';\n }\n\n case '2000403': {\n return '#B03F35';\n }\n\n case '2000457': {\n return '#6A5ACD';\n }\n\n case '1700215':\n case '900159':\n case '900158': {\n return '#474A51';\n }\n\n default: {\n return black;\n }\n }\n }",size:"12px",stroke:{color:"white",width:"3px"}}}}};return t.push(n,i),t},k_=e=>{const t=[],n={id:gn(),data:{source:e,layer:__.LANDUSE_AREA},draw:{polygons:{color:"function() {\n const { feature_type } = feature;\n\n switch (feature_type) {\n case '509998': {\n return '#ECD175';\n }\n\n case '600102':\n case '900140': {\n return '#3E9A8C';\n }\n\n case '900202':\n case '900130':\n case '900150':\n case '900103': {\n return '#96BE7D';\n }\n\n case '9997010': {\n return null;\n }\n }\n }",order:"function() {\n const { feature_type } = feature;\n\n switch(feature_type) {\n case '900150':\n case '900130':\n case '509998': {\n return 300;\n }\n\n default: {\n return 299;\n }\n }\n }"}}},i={id:gn(),data:{source:e,layer:__.LANDUSE_AREA_LABEL},filter:"function() {\n return $zoom >= 15;\n }",draw:{text:{text_source:"name",font:{size:"13px",fill:"function() {\n const { feature_type } = feature;\n\n switch(feature_type) {\n case '509998': {\n return '#CD7F32';\n }\n\n default: {\n return '#00541F';\n }\n }\n }",stroke:{color:"white",width:"3px"}}}}};return t.push(n,i),t},O_=e=>{const t=[],n={source:e,layer:__.LANE_MARKING_ARROW},i={id:gn(),data:n,draw:{polygons:{color:"white"}}};return t.push(i),t},P_=["-1.0","-0.5","-0.3","0.0","0.3","0.5","0.7","1.0","1.5","2.0"],C_=[[5],[4,3],[2,1]],R_="function() {\n const { functional_class, tunnel, tollway } = feature;\n\n const alpha = tunnel ? 0.89 : 1;\n\n const getRGB = (hex, alpha) => {\n const r = +(parseInt(hex.slice(1, 3), 16) / 255).toFixed(2);\n const g = +(parseInt(hex.slice(3, 5), 16) / 255).toFixed(2);\n const b = +(parseInt(hex.slice(5, 7), 16) / 255).toFixed(2);\n\n return [r, g, b, alpha];\n }\n\n if (tollway) {\n return '#D72740';\n }\n\n switch (functional_class) {\n case 1:\n case 2: {\n const color = getRGB('#D1747F', alpha);\n\n return color;\n }\n\n case 3:\n case 4: {\n const color = getRGB('#B1A7AA', alpha);\n\n return color;\n }\n\n case 5: {\n const color = getRGB('#D5CEC3', alpha);\n\n return color;\n }\n }\n}",M_="function() {\n const { functional_class, road_number } = feature;\n\n const getScale = () => {\n if ($zoom <= 15 && $zoom >= 14) { return 7; }\n\n if ($zoom <= 13 && $zoom >= 12) { return 9; }\n\n if ($zoom <= 5) { return 400; }\n\n if ($zoom <= 7) { return 200; }\n\n if ($zoom < 12) { return 50; }\n\n return 1;\n }\n\n const scale = getScale();\n\n switch(functional_class) {\n case 1:\n case 2: {\n return 8 * scale;\n }\n\n case 3:\n case 4: {\n return 7 * scale;\n }\n\n case 5: {\n if (Boolean(road_number)) {\n return 7 * scale;\n }\n\n return 6;\n }\n }\n}",L_={text_source:"street_name",font:{fill:"black",size:"14px",stroke:{color:"white",width:"3px"}}},N_={text:{text_source:"road_number",font:{fill:"#181bff",size:"16px",weight:"bold",underline:!0,background:{color:"black"}}}},z_={text:L_,lines:{color:R_,width:M_,cap:"round",join:"round"}},D_={lines:{color:R_,width:M_,outline:{color:"function() {\n const { functional_class, access_id, tollway } = feature;\n\n if (tollway) {\n return '#B9263B';\n }\n\n switch(functional_class) {\n case 5: {\n return '#989898';\n }\n\n case 3:\n case 4: {\n return '#8F6E78';\n }\n\n case 1:\n case 2: {\n return '#9A414B';\n }\n }\n}",width:"function() {\n const { functional_class, access_id } = feature;\n\n switch(functional_class) {\n case 5: {\n switch (access_id) {\n case 32: {\n return 0;\n }\n\n default: {\n return 1;\n }\n }\n }\n\n default: {\n return 1;\n }\n }\n}"}}},I_={text:L_,lines:{color:"#BABCC2",width:10,cap:"round",join:"round"}},F_={filter:"function() {\n return global.links.getIsLowMobility(feature);\n }",draw:{lines:{width:4}}},j_={filter:"function() {\n return global.links.getIsConstruction(feature);\n }",draw:{lines:{width:3,color:"#9AA096",dash:[2,1]}}},B_={filter:"function() {\n return global.links.getIsFunctionalClass(feature);\n }",draw:{lines:{width:2,color:"#9AA096",dash:[2,1]}}},U_=e=>{const t=[],n={source:e,layer:__.LINK},i={id:gn(),data:n,draw:N_};return t.push(i),P_.forEach(i=>{const r=[],s=[];C_.forEach(t=>{const o=[],a=[];t.forEach(t=>{const r=(({source:e,zLvl:t,functionClass:n})=>e===g_.MSK?{base:{default:`function() {\n const { functional_class, z_lvl = '0.0', tollway } = feature;\n\n const isFilter = $zoom <= 16 && z_lvl === '${t}' && +functional_class === ${n} && tollway === false;\n\n return isFilter;\n }`,tollway:`function() {\n const { functional_class, z_lvl = '0.0', tollway } = feature;\n\n const isFilter = $zoom <= 16 && z_lvl === '${t}' && +functional_class === ${n} && tollway === true;\n\n return isFilter;\n }`},border:{default:`function() {\n const { functional_class, z_lvl = '0.0', tollway } = feature;\n\n const isFilter = $zoom <= 16 && tollway === false && z_lvl === '${t}' && +functional_class === ${n} && !global.links.getIsConstruction(feature) && !global.links.getIsFunctionalClass(feature);\n\n return isFilter;\n }`,tollway:`function() {\n const { functional_class, z_lvl = '0.0', tollway } = feature;\n\n const isFilter = $zoom <= 16 && tollway === true && z_lvl === '${t}' && +functional_class === ${n} && !global.links.getIsConstruction(feature) && !global.links.getIsFunctionalClass(feature);\n\n return isFilter;\n }`}}:{base:{default:`function() {\n const { functional_class, z_lvl = '0.0', tollway } = feature;\n\n const isFilter = z_lvl === '${t}' && +functional_class === ${n} && tollway === false;\n\n return isFilter;\n }`,tollway:`function() {\n const { functional_class, z_lvl = '0.0', tollway } = feature;\n\n const isFilter = z_lvl === '${t}' && +functional_class === ${n} && tollway === true;\n\n return isFilter;\n }`},border:{default:`function() {\n const { functional_class, z_lvl = '0.0', tollway } = feature;\n\n const isFilter = tollway === false && z_lvl === '${t}' && +functional_class === ${n} && !global.links.getIsConstruction(feature) && !global.links.getIsFunctionalClass(feature);\n\n return isFilter;\n }`,tollway:`function() {\n const { functional_class, z_lvl = '0.0', tollway } = feature;\n\n const isFilter = tollway === true && z_lvl === '${t}' && +functional_class === ${n} && !global.links.getIsConstruction(feature) && !global.links.getIsFunctionalClass(feature);\n\n return isFilter;\n }`}})({source:e,zLvl:i,functionClass:t}),s=(({zLvl:e,functionClass:t})=>`function() {\n const { functional_class, z_lvl = '0.0', tollway } = feature;\n\n const isFilter = $zoom > 16 && z_lvl === '${e}' && +functional_class === ${t};\n\n return isFilter;\n }`)({zLvl:i,functionClass:t}),l={id:gn(),data:n,filter:r.base.default,draw:z_,sublayers:{construction:{...j_},functionalClassAccessId32:{...B_},lowMobility:{...F_}}},u={id:gn(),data:n,filter:r.base.tollway,draw:z_,sublayers:{construction:{...j_},functionalClassAccessId32:{...B_},lowMobility:{...F_}}},c={id:gn(),data:n,filter:s,draw:I_,sublayers:{functionalClassAccessId32:{...B_}}},h={id:gn(),data:n,filter:r.border.default,draw:D_,sublayers:{lowMobility:{...F_}}},d={id:gn(),data:n,filter:r.border.tollway,draw:D_,sublayers:{lowMobility:{...F_}}};if(e===g_.MSK)o.push(c);o.push(l,u),a.push(h,d)}),r.push(...o),s.push(...a)}),t.push(...s,...r)}),t},V_=()=>{const e=[],t={source:g_.NATURE_TILE,layer:__.NATURE_FIELD},n={id:gn(),data:t,draw:{polygons:{color:"#EBEEC7"}}};return e.push(n),e},G_=()=>{const e=[],t={source:g_.NATURE_TILE,layer:__.NATURE_FOREST},n={id:gn(),data:t,draw:{polygons:{color:"function() {\n const { feature_type } = feature;\n\n switch (feature_type) {\n case '900202': {\n return '#96BE7D';\n }\n\n default : {\n return null;\n }\n }\n }"}}};return e.push(n),e},$_=e=>{const t=[],n={id:gn(),data:{source:e,layer:__.OCEAN_AREA},draw:{polygons:{color:"#7DBEE4"}}},i={id:gn(),data:{source:e,layer:__.OCEAN_AREA_LABEL},draw:{text:{text_source:"name",font:{fill:"#0A80C4",size:"18px",stroke:{color:"white",width:"3px"}}}}};return t.push(n,i),t},Z_=e=>{const t=[],n={id:gn(),data:{source:e,layer:__.ONE_WAY},draw:{points:{texture:"arrow",sprite:"base",angle:"function() {\n const { bearing } = feature;\n \n return bearing;\n }\n "}}};return t.push(n),t},q_={size:20,extension:"png"},W_=e=>{const t=[],n={source:e,layer:__.PILLAR},i={},r="pillar";i[r]={url:wn(`msk/${r}/${r}_${q_.size}.${q_.extension}`),filtering:"mipmap",sprites:{base:[0,0,q_.size,q_.size]}};const s={id:gn(),data:n,draw:{points:{collide:!1,texture:r,size:q_.size,sprite:"base",placement:"midpoint"}},textures:i,sublayers:{}};return t.push(s),t},H_='function() {\n const { poi_name, cat_id } = feature;\n\n switch (+cat_id) {\n case 4100: {\n const text = poi_name.replaceAll(/(Метро-|Станция-|МЦД-)/g, "");\n\n return text;\n }\n\n default: {\n return poi_name;\n }\n }\n}',K_=[3578,4013,4100,5400,5511,5512,5540,5541,5800,5813,5999,6e3,7011,7389,7832,7929,7990,8060,8410,9517,9530,9565,9583,9718,9992],Y_=e=>{const t={};switch(e){case 4100:t[`_${e}-metro`]={filter:`function() {\n const { poi_name, cat_id } = feature;\n\n const isMetro = poi_name.startsWith('Метро-');\n const isStation = poi_name.startsWith('Станция-');\n\n const isCatId = +cat_id === ${e};\n\n const isFilter = isCatId && (isMetro || isStation);\n\n return isFilter;\n }`,draw:{points:X_({texture:`POI_${e}(metro)`})}},t[`_${e}-diameter`]={filter:`function() {\n const { cat_id, poi_name } = feature;\n\n const isDiameter = poi_name.startsWith('МЦД-');\n\n const isCatId = +cat_id === ${e};\n\n const isFilter = isCatId && isDiameter;\n\n return isFilter;\n }`,draw:{points:X_({texture:`POI_${e}(diameter)`,size:[41,15]})}};break;case 9530:t[`_${e}-mail`]={filter:`function() {\n const { cat_id, poi_name = '' } = feature;\n\n const isCatId = +cat_id === ${e};\n\n const isMail = poi_name.startsWith('Почта');\n\n const isFilter = isCatId && isMail;\n\n return isFilter;\n }`,draw:{points:X_({texture:`POI_${e}(Mail)`})}},t[`_${e}-delivery`]={filter:`function() {\n const { cat_id, poi_name = '' } = feature;\n\n const isCatId = +cat_id === ${e};\n \n const isMail = poi_name.startsWith('Почта');\n\n const isFilter = isCatId && !isMail;\n\n return isFilter;\n }`,draw:{points:X_({texture:`POI_${e}(Delivery)`})}};break;case 9992:{const n={mosque:1,church:2,temple:3,davidStar:4,mortar:6};Object.entries(n).forEach(([n,i])=>{t[`_${e}-${n}`]={filter:`function() {\n const { cat_id, subcat_id } = feature;\n\n const isCatId = +cat_id === ${e};\n const isSubcatId = +subcat_id === ${i};\n\n const isFilter = isCatId && isSubcatId;\n\n return isFilter;\n }`,draw:{points:X_({texture:`POI_${e}(${n})`})}}});break}default:t[`_${e}`]={filter:`function() {\n const { cat_id } = feature;\n\n const isFilter = +cat_id === ${e};\n\n return isFilter;\n }`,draw:{points:X_({texture:`POI_${e}`})}}}return t},X_=({texture:e,size:t=20})=>({texture:e,size:t,sprite:"base",placement:"midpoint"}),J_=K_.reduce((e,t)=>({...e,...Y_(t)}),{}),Q_=e=>{const t=[],n={id:gn(),data:{source:e,layer:__.POI},draw:{points:{text:{text_source:H_,font:{fill:"#464544",size:"12px"}}}},sublayers:J_};return t.push(n),t},eg=e=>{const t=[],n={source:e,layer:__.POINT_ADDRESS,minzoom:15},i={id:gn(),data:n,draw:{text:{text_source:"address",font:{fill:"black",size:"12px"}}}};return t.push(i),t},tg=e=>{const t=[],n={source:e,layer:__.RAILROAD_LINK},i={id:gn(),data:n,draw:{lines:{color:"#A3A8A",width:5,dash:[1,2],dash_background_color:[0,0,0],join:"round"}}};return t.push(i),t},ng={fileName:"traffic-sign",extension:"svg",dopsCount:2,widths:{map:20,preview:40}},ig={1.1:{title:"Железнодорожный переезд со шлагбаумом",height:20,type:"Предупреждающие знаки"},1.2:{title:"Железнодорожный переезд без шлагбаума",height:20,type:"Предупреждающие знаки"},"1.3.1":{title:"Однопутная железная дорога",height:20,type:"Предупреждающие знаки"},"1.3.2":{title:"Многопутная железная дорога",height:20,type:"Предупреждающие знаки"},"1.4.1":{title:"Приближение к железнодорожному переезду",height:40,type:"Предупреждающие знаки"},"1.4.2":{title:"Приближение к железнодорожному переезду",height:40,type:"Предупреждающие знаки"},"1.4.3":{title:"Приближение к железнодорожному переезду",height:40,type:"Предупреждающие знаки"},"1.4.4":{title:"Приближение к железнодорожному переезду",height:40,type:"Предупреждающие знаки"},"1.4.5":{title:"Приближение к железнодорожному переезду",height:40,type:"Предупреждающие знаки"},"1.4.6":{title:"Приближение к железнодорожному переезду",height:40,type:"Предупреждающие знаки"},1.5:{title:"Пересечение с трамвайной линией",height:20,type:"Предупреждающие знаки"},1.6:{title:"Пересечение равнозначных дорог",height:20,type:"Предупреждающие знаки"},1.7:{title:"Пересечение с круговым движением",height:20,type:"Предупреждающие знаки"},1.8:{title:"Светофорное регулирование",height:20,type:"Предупреждающие знаки"},1.9:{title:"Разводной мост",height:20,type:"Предупреждающие знаки"},"1.10":{title:"Выезд на набережную",height:20,type:"Предупреждающие знаки"},"1.11.1":{title:"Опасный поворот (правый)",height:20,type:"Предупреждающие знаки"},"1.11.2":{title:"Опасный поворот (левый)",height:20,type:"Предупреждающие знаки"},"1.12.1":{title:"Опасные повороты",height:20,type:"Предупреждающие знаки"},"1.12.2":{title:"Опасные повороты",height:20,type:"Предупреждающие знаки"},1.13:{title:"Крутой спуск",height:20,type:"Предупреждающие знаки"},1.14:{title:"Крутой подъём",height:20,type:"Предупреждающие знаки"},1.15:{title:"Скользкая дорога",height:20,type:"Предупреждающие знаки"},1.16:{title:"Неровная дорога",height:20,type:"Предупреждающие знаки"},1.17:{title:"Искусственная неровность",height:20,type:"Предупреждающие знаки"},1.18:{title:"Выброс гравия",height:20,type:"Предупреждающие знаки"},1.19:{title:"Опасная обочина",height:20,type:"Предупреждающие знаки"},"1.20.1":{title:"Сужение дороги",height:20,type:"Предупреждающие знаки"},"1.20.2":{title:"Сужение дороги",height:20,type:"Предупреждающие знаки"},"1.20.3":{title:"Сужение дороги",height:20,type:"Предупреждающие знаки"},1.21:{title:"Двустороннее движение",height:20,type:"Предупреждающие знаки"},1.22:{title:"Пешеходный переход",height:20,type:"Предупреждающие знаки"},1.23:{title:"Дети",height:20,type:"Предупреждающие знаки"},1.24:{title:"Пересечение с велосипедной дорожкой или велопешеходной дорожкой",height:20,type:"Предупреждающие знаки"},1.25:{title:"Дорожные работы",height:20,type:"Предупреждающие знаки"},1.26:{title:"Перегон скота",height:20,type:"Предупреждающие знаки"},1.27:{title:"Дикие животные",height:20,type:"Предупреждающие знаки"},1.28:{title:"Падение камней",height:20,type:"Предупреждающие знаки"},1.29:{title:"Боковой ветер",height:20,type:"Предупреждающие знаки"},"1.30":{title:"Низколетящие самолёты",height:20,type:"Предупреждающие знаки"},1.31:{title:"Тоннель",height:20,type:"Предупреждающие знаки"},1.32:{title:"Затор",height:20,type:"Предупреждающие знаки"},1.33:{title:"Прочие опасности",height:20,type:"Предупреждающие знаки"},"1.34.1 A":{title:"Направление поворота",height:20,type:"Предупреждающие знаки"},"1.34.1 B":{title:"Направление поворота",height:20,type:"Предупреждающие знаки"},"1.34.1 C":{title:"Направление поворота",height:20,type:"Предупреждающие знаки"},"1.34.2 A":{title:"Направление поворота",height:20,type:"Предупреждающие знаки"},"1.34.2 B":{title:"Направление поворота",height:20,type:"Предупреждающие знаки"},"1.34.2 C":{title:"Направление поворота",height:20,type:"Предупреждающие знаки"},"1.34.3 A":{title:"Направление поворота",height:20,type:"Предупреждающие знаки"},"1.34.3 B":{title:"Направление поворота",height:20,type:"Предупреждающие знаки"},1.35:{title:"Участок перекрёстка",height:20,type:"Предупреждающие знаки"},2.1:{title:"Главная дорога",height:20,type:"Знаки приоритета"},2.2:{title:"Конец главной дороги",height:20,type:"Знаки приоритета"},"2.3.1":{title:"Пересечение со второстепенной дорогой",height:20,type:"Знаки приоритета"},"2.3.2":{title:"Примыкание второстепенной дороги",height:20,type:"Знаки приоритета"},"2.3.3":{title:"Примыкание второстепенной дороги",height:20,type:"Знаки приоритета"},"2.3.4":{title:"Примыкание второстепенной дороги",height:20,type:"Знаки приоритета"},"2.3.5":{title:"Примыкание второстепенной дороги",height:20,type:"Знаки приоритета"},"2.3.6":{title:"Примыкание второстепенной дороги",height:20,type:"Знаки приоритета"},"2.3.7":{title:"Примыкание второстепенной дороги",height:20,type:"Знаки приоритета"},2.4:{title:"Уступите дорогу",height:20,type:"Знаки приоритета"},2.5:{title:"Движение без остановки запрещено",height:20,type:"Знаки приоритета"},2.6:{title:"Преимущество встречного движения",height:20,type:"Знаки приоритета"},2.7:{title:"Преимущество перед встречным движением",height:20,type:"Знаки приоритета"},3.1:{title:"Въезд запрещён",height:20,type:"Запрещающие знаки"},3.2:{title:"Движение запрещено",height:20,type:"Запрещающие знаки"},3.3:{title:"Движение механических транспортных средств запрещено",height:20,type:"Запрещающие знаки"},3.4:{title:"Движение грузовых автомобилей запрещено",height:20,type:"Запрещающие знаки"},3.5:{title:"Движение мотоциклов запрещено",height:20,type:"Запрещающие знаки"},3.6:{title:"Движение тракторов запрещено",height:20,type:"Запрещающие знаки"},3.7:{title:"Движение с прицепом запрещено",height:20,type:"Запрещающие знаки"},3.8:{title:"Движение гужевых повозок запрещено",height:20,type:"Запрещающие знаки"},3.9:{title:"Движение на велосипедах запрещено",height:20,type:"Запрещающие знаки"},"3.10":{title:"Движение пешеходов запрещено",height:20,type:"Запрещающие знаки"},3.11:{title:"Ограничение массы",height:20,type:"Запрещающие знаки"},3.12:{title:"Ограничение массы, приходящейся на ось транспортного средства",height:20,type:"Запрещающие знаки"},3.13:{title:"Ограничение высоты",height:20,type:"Запрещающие знаки"},3.14:{title:"Ограничение ширины",height:20,type:"Запрещающие знаки"},3.15:{title:"Ограничение длины",height:20,type:"Запрещающие знаки"},3.16:{title:"Ограничение минимальной дистанции",height:20,type:"Запрещающие знаки"},"3.17.1":{title:"Таможня",height:20,type:"Запрещающие знаки"},"3.17.2":{title:"Опасность",height:20,type:"Запрещающие знаки"},"3.17.3":{title:"Контроль",height:20,type:"Запрещающие знаки"},"3.18.1":{title:"Поворот направо запрещён",height:20,type:"Запрещающие знаки"},"3.18.2":{title:"Поворот налево запрещён",height:20,type:"Запрещающие знаки"},3.19:{title:"Разворот запрещён",height:20,type:"Запрещающие знаки"},"3.20":{title:"Обгон запрещён",height:20,type:"Запрещающие знаки"},3.21:{title:"Конец зоны запрещения обгона",height:20,type:"Запрещающие знаки"},3.22:{title:"Обгон грузовым автомобилям запрещён",height:20,type:"Запрещающие знаки"},3.23:{title:"Конец зоны запрещения обгона грузовым автомобилям",height:20,type:"Запрещающие знаки"},"3.24-50":{title:"Ограничение максимальной скорости",height:20,type:"Запрещающие знаки"},"3.25-50":{title:"Конец зоны ограничения максимальной скорости",height:20,type:"Запрещающие знаки"},3.26:{title:"Подача звукового сигнала запрещена",height:20,type:"Запрещающие знаки"},3.27:{title:"Остановка запрещена",height:20,type:"Запрещающие знаки"},3.28:{title:"Стоянка запрещена",height:20,type:"Запрещающие знаки"},3.29:{title:"Стоянка запрещена по нечётным числам месяца.",height:20,type:"Запрещающие знаки"},"3.30":{title:"Стоянка запрещена по чётным числам месяца",height:20,type:"Запрещающие знаки"},3.31:{title:"Конец зоны всех ограничений",height:20,type:"Запрещающие знаки"},3.32:{title:"Движение транспортных средств с опасными грузами запрещено",height:20,type:"Запрещающие знаки"},3.33:{title:"Движение транспортных средств с взрывчатыми и легковоспламеняющимися грузами запрещено",height:20,type:"Запрещающие знаки"},3.34:{title:"Движение автобусов запрещено",height:20,type:"Запрещающие знаки"},3.35:{title:"Движение на средствах индивидуальной мобильности запрещено",height:20,type:"Запрещающие знаки"},"4.1.1":{title:"Движение прямо",height:20,type:"Предписывающие знаки"},"4.1.2":{title:"Движение направо",height:20,type:"Предписывающие знаки"},"4.1.3":{title:"Движение налево",height:20,type:"Предписывающие знаки"},"4.1.4":{title:"Движение прямо или направо",height:20,type:"Предписывающие знаки"},"4.1.5":{title:"Движение прямо или налево",height:20,type:"Предписывающие знаки"},"4.1.6":{title:"Движение направо или налево",height:20,type:"Предписывающие знаки"},"4.2.1":{title:"Объезд препятствия справа",height:20,type:"Предписывающие знаки"},"4.2.2":{title:"Объезд препятствия слева",height:20,type:"Предписывающие знаки"},"4.2.3":{title:"Объезд препятствия справа или слева",height:20,type:"Предписывающие знаки"},4.3:{title:"Круговое движение",height:20,type:"Предписывающие знаки"},"4.4.1":{title:"Велосипедная дорожка",height:20,type:"Предписывающие знаки"},"4.4.2":{title:"Конец велосипедной дорожки",height:20,type:"Предписывающие знаки"},"4.5.1":{title:"Пешеходная дорожка",height:20,type:"Предписывающие знаки"},"4.5.2":{title:"Пешеходная и велосипедная дорожка с совмещённым движением",height:20,type:"Предписывающие знаки"},"4.5.3":{title:"Конец пешеходной и велосипедной дорожки с совмещённым движением",height:20,type:"Предписывающие знаки"},"4.5.4":{title:"Пешеходная и велосипедная дорожка с разделением движения",height:20,type:"Предписывающие знаки"},"4.5.5":{title:"Пешеходная и велосипедная дорожка с разделением движения",height:20,type:"Предписывающие знаки"},"4.5.6":{title:"Конец пешеходной и велосипедной дорожки с разделением движения",height:20,type:"Предписывающие знаки"},"4.5.7":{title:"Конец пешеходной и велосипедной дорожки с разделением движения",height:20,type:"Предписывающие знаки"},"4.6-50":{title:"Ограничение минимальной скорости",height:20,type:"Предписывающие знаки"},"4.7-50":{title:"Конец зоны ограничения минимальной скорости",height:20,type:"Предписывающие знаки"},"4.8.1":{title:"Направление движения транспортных средств с опасными грузами",height:30,type:"Предписывающие знаки"},"4.8.2":{title:"Направление движения транспортных средств с опасными грузами",height:30,type:"Предписывающие знаки"},"4.8.3":{title:"Направление движения транспортных средств с опасными грузами",height:30,type:"Предписывающие знаки"},5.1:{title:"Автомагистраль",height:30,type:"Знаки особых предписаний"},5.2:{title:"Конец автомагистрали",height:30,type:"Знаки особых предписаний"},5.3:{title:"Дорога для автомобилей",height:30,type:"Знаки особых предписаний"},5.4:{title:"Конец дороги для автомобилей",height:30,type:"Знаки особых предписаний"},5.5:{title:"Дорога с односторонним движением",height:20,type:"Знаки особых предписаний"},5.6:{title:"Конец дороги с односторонним движением",height:20,type:"Знаки особых предписаний"},"5.7.1":{title:"Выезд на дорогу с односторонним движением",height:20,type:"Знаки особых предписаний"},"5.7.2":{title:"Выезд на дорогу с односторонним движением",height:20,type:"Знаки особых предписаний"},5.8:{title:"Реверсивное движение",height:20,type:"Знаки особых предписаний"},5.9:{title:"Конец реверсивного движения",height:20,type:"Знаки особых предписаний"},"5.10":{title:"Выезд на дорогу с реверсивным движением",height:20,type:"Знаки особых предписаний"},"5.11.1":{title:"Дорога с полосой для маршрутных транспортных средств",height:20,type:"Знаки особых предписаний"},"5.11.2":{title:"Дорога с полосой для велосипедистов",height:20,type:"Знаки особых предписаний"},"5.12.1":{title:"Конец дороги с полосой для маршрутных транспортных средств",height:20,type:"Знаки особых предписаний"},"5.12.2":{title:"Конец дороги с полосой для велосипедистов",height:20,type:"Знаки особых предписаний"},"5.13.1":{title:"Выезд на дорогу с полосой для маршрутных транспортных средств",height:20,type:"Знаки особых предписаний"},"5.13.2":{title:"Выезд на дорогу с полосой для маршрутных транспортных средств",height:20,type:"Знаки особых предписаний"},"5.13.3":{title:"Выезд на дорогу с полосой для велосипедистов",height:20,type:"Знаки особых предписаний"},"5.13.4":{title:"Выезд на дорогу с полосой для велосипедистов",height:20,type:"Знаки особых предписаний"},"5.14.1":{title:"Полоса для маршрутных транспортных средств",height:20,type:"Знаки особых предписаний"},"5.14.2":{title:"Полоса для велосипедистов",height:20,type:"Знаки особых предписаний"},"5.14.3":{title:"Конец полосы для маршрутных транспортных средств",height:20,type:"Знаки особых предписаний"},"5.14.4":{title:"Конец полосы для велосипедистов",height:20,type:"Знаки особых предписаний"},"5.15.1":{title:"Направления движения по полосам",height:20,type:"Знаки особых предписаний"},"5.15.2 A":{title:"Направления движения по полосе",height:20,type:"Знаки особых предписаний"},"5.15.2 B":{title:"Направления движения по полосе",height:20,type:"Знаки особых предписаний"},"5.15.2 C":{title:"Направления движения по полосе",height:20,type:"Знаки особых предписаний"},"5.15.2 D":{title:"Направления движения по полосе",height:20,type:"Знаки особых предписаний"},"5.15.2 E":{title:"Направления движения по полосе",height:20,type:"Знаки особых предписаний"},"5.15.2 F":{title:"Направления движения по полосе",height:20,type:"Знаки особых предписаний"},"5.15.2 G":{title:"Направления движения по полосе",height:20,type:"Знаки особых предписаний"},"5.15.2 H":{title:"Направления движения по полосе",height:20,type:"Знаки особых предписаний"},"5.15.2 I":{title:"Направления движения по полосе",height:20,type:"Знаки особых предписаний"},"5.15.2 K":{title:"Направления движения по полосе",height:20,type:"Знаки особых предписаний"},"5.15.3 A":{title:"Начало полосы",height:20,type:"Знаки особых предписаний"},"5.15.3 B":{title:"Начало полосы",height:20,type:"Знаки особых предписаний"},"5.15.3 C":{title:"Начало полосы",height:20,type:"Знаки особых предписаний"},"5.15.4 A":{title:"Начало полосы",height:20,type:"Знаки особых предписаний"},"5.15.4 B":{title:"Начало полосы",height:20,type:"Знаки особых предписаний"},"5.15.5":{title:"Конец полосы",height:20,type:"Знаки особых предписаний"},"5.15.6":{title:"Конец полосы",height:20,type:"Знаки особых предписаний"},"5.15.7 A":{title:"Направление движения по полосам",height:20,type:"Знаки особых предписаний"},"5.15.7 B":{title:"Направление движения по полосам",height:20,type:"Знаки особых предписаний"},"5.15.7 C":{title:"Направление движения по полосам",height:20,type:"Знаки особых предписаний"},"5.15.8":{title:"Число полос",height:20,type:"Знаки особых предписаний"},5.16:{title:"Место остановки автобуса и (или) троллейбуса",height:30,type:"Знаки особых предписаний"},5.17:{title:"Место остановки трамвая",height:30,type:"Знаки особых предписаний"},5.18:{title:"Место стоянки легковых такси",height:30,type:"Знаки особых предписаний"},"5.19.1":{title:"Пешеходный переход",height:20,type:"Знаки особых предписаний"},"5.19.2":{title:"Пешеходный переход",height:20,type:"Знаки особых предписаний"},"5.19.3":{title:"Диагональный пешеходный переход",height:20,type:"Знаки особых предписаний"},"5.19.4 A":{title:"Диагональный пешеходный переход",height:20,type:"Знаки особых предписаний"},"5.19.4 B":{title:"Диагональный пешеходный переход",height:20,type:"Знаки особых предписаний"},"5.20":{title:"Искусственная неровность",height:20,type:"Знаки особых предписаний"},5.21:{title:"Жилая зона",height:30,type:"Знаки особых предписаний"},5.22:{title:"Конец жилой зоны",height:30,type:"Знаки особых предписаний"},"5.23.1":{title:"Начало населённого пункта",height:20,type:"Знаки особых предписаний"},"5.23.2":{title:"Начало населённого пункта",height:20,type:"Знаки особых предписаний"},"5.24.1":{title:"Конец населённого пункта",height:20,type:"Знаки особых предписаний"},"5.24.2":{title:"Конец населённого пункта",height:20,type:"Знаки особых предписаний"},5.25:{title:"Начало населённого пункта",height:20,type:"Знаки особых предписаний"},5.26:{title:"Конец населённого пункта",height:20,type:"Знаки особых предписаний"},5.27:{title:"Зона с ограничением стоянки",height:30,type:"Знаки особых предписаний"},5.28:{title:"Конец зоны с ограничением стоянки",height:30,type:"Знаки особых предписаний"},5.29:{title:"Зона регулируемой стоянки",height:30,type:"Знаки особых предписаний"},"5.30":{title:"Конец зоны регулируемой стоянки",height:30,type:"Знаки особых предписаний"},5.31:{title:"Зона с ограничением максимальной скорости",height:30,type:"Знаки особых предписаний"},5.32:{title:"Конец зоны с ограничением максимальной скорости",height:30,type:"Знаки особых предписаний"},5.33:{title:"Пешеходная зона",height:30,type:"Знаки особых предписаний"},5.34:{title:"Конец пешеходной зоны",height:30,type:"Знаки особых предписаний"},5.35:{title:"Зона с ограничением экологического класса механических транспортных средств",height:30,type:"Знаки особых предписаний"},5.36:{title:"Конец зоны с ограничением экологического класса механических транспортных средств",height:30,type:"Знаки особых предписаний"},"5.37 A":{title:"Зона с ограничением экологического класса по видам транспортных средств",height:30,type:"Знаки особых предписаний"},"5.37 B":{title:"Зона с ограничением экологического класса по видам транспортных средств",height:30,type:"Знаки особых предписаний"},"5.38 A":{title:"Конец зоны с ограничением экологического класса по видам транспортных средств",height:30,type:"Знаки особых предписаний"},"5.38 B":{title:"Конец зоны с ограничением экологического класса по видам транспортных средств",height:30,type:"Знаки особых предписаний"},5.39:{title:"Велосипедная зона",height:30,type:"Знаки особых предписаний"},"5.40":{title:"Конец велосипедной зоны",height:30,type:"Знаки особых предписаний"},6.1:{title:"Общие ограничения максимальной скорости",height:30,type:"Информационные знаки"},"6.2-50":{title:"Рекомендуемая скорость",height:20,type:"Информационные знаки"},"6.3.1":{title:"Место для разворота",height:20,type:"Информационные знаки"},"6.3.2":{title:"Зона для разворота",height:20,type:"Информационные знаки"},"6.4 A":{title:"Парковка (парковочное место)",height:20,type:"Информационные знаки"},"6.4 B":{title:"Парковка (платные услуги)",height:20,type:"Информационные знаки"},"6.4 C":{title:"Парковка (только для инвалидов)",height:20,type:"Информационные знаки"},6.5:{title:"Полоса аварийной остановки",height:20,type:"Информационные знаки"},6.6:{title:"Подземный пешеходный переход",height:20,type:"Информационные знаки"},6.7:{title:"Надземный пешеходный переход",height:20,type:"Информационные знаки"},"6.8.1":{title:"Тупик",height:20,type:"Информационные знаки"},"6.8.2":{title:"Тупик",height:20,type:"Информационные знаки"},"6.8.3":{title:"Тупик",height:20,type:"Информационные знаки"},"6.9.1 A":{title:"Предварительный указатель направлений",height:20,type:"Информационные знаки"},"6.9.1 B":{title:"Предварительный указатель направлений",height:20,type:"Информационные знаки"},"6.9.1 C":{title:"Предварительный указатель направлений",height:20,type:"Информационные знаки"},"6.9.1 D":{title:"Предварительный указатель направлений",height:20,type:"Информационные знаки"},"6.9.1 E":{title:"Предварительный указатель направлений",height:20,type:"Информационные знаки"},"6.9.1 F":{title:"Предварительный указатель направлений",height:20,type:"Информационные знаки"},"6.9.2 A":{title:"Предварительный указатель направления",height:20,type:"Информационные знаки"},"6.9.2 B":{title:"Предварительный указатель направления",height:20,type:"Информационные знаки"},"6.9.2 C":{title:"Предварительный указатель направления",height:20,type:"Информационные знаки"},"6.9.3":{title:"Схема движения",height:20,type:"Информационные знаки"},"6.10.1 A":{title:"Указатель направлений",height:20,type:"Информационные знаки"},"6.10.1 B":{title:"Указатель направлений",height:20,type:"Информационные знаки"},"6.10.1 C":{title:"Указатель направлений",height:20,type:"Информационные знаки"},"6.10.1 D":{title:"Указатель направлений",height:20,type:"Информационные знаки"},"6.10.1 E":{title:"Указатель направлений",height:20,type:"Информационные знаки"},"6.10.1 F":{title:"Указатель направлений",height:20,type:"Информационные знаки"},"6.10.1 G":{title:"Указатель направлений",height:20,type:"Информационные знаки"},"6.10.2 A":{title:"Указатель направления",height:20,type:"Информационные знаки"},"6.10.2 B":{title:"Указатель направления",height:20,type:"Информационные знаки"},"6.11 A":{title:"Наименование объекта",height:20,type:"Информационные знаки"},"6.11 B":{title:"Наименование объекта",height:20,type:"Информационные знаки"},"6.11 C":{title:"Наименование объекта",height:20,type:"Информационные знаки"},"6.11 D":{title:"Наименование объекта",height:20,type:"Информационные знаки"},"6.12 A":{title:"Указатель расстояний",height:20,type:"Информационные знаки"},"6.12 B":{title:"Указатель расстояний",height:20,type:"Информационные знаки"},"6.12 C":{title:"Указатель расстояний",height:20,type:"Информационные знаки"},"6.13 A":{title:"Километровый знак",height:20,type:"Информационные знаки"},"6.13 B":{title:"Километровый знак",height:20,type:"Информационные знаки"},"6.13 C":{title:"Километровый знак",height:20,type:"Информационные знаки"},"6.13 D":{title:"Километровый знак",height:20,type:"Информационные знаки"},"6.13 E":{title:"Километровый знак",height:20,type:"Информационные знаки"},"6.14.1 A":{title:"Номер маршрута",height:20,type:"Информационные знаки"},"6.14.1 B":{title:"Номер маршрута",height:20,type:"Информационные знаки"},"6.14.1 C":{title:"Номер маршрута",height:20,type:"Информационные знаки"},"6.14.1 D":{title:"Номер маршрута",height:20,type:"Информационные знаки"},"6.14.2 A":{title:"Номер маршрута",height:20,type:"Информационные знаки"},"6.14.2 B":{title:"Номер маршрута",height:20,type:"Информационные знаки"},"6.14.2 C":{title:"Номер маршрута",height:20,type:"Информационные знаки"},"6.15.1":{title:"Направление движения для грузовых автомобилей",height:20,type:"Информационные знаки"},"6.15.2":{title:"Направление движения для грузовых автомобилей",height:20,type:"Информационные знаки"},"6.15.3":{title:"Направление движения для грузовых автомобилей",height:20,type:"Информационные знаки"},6.16:{title:"Стоп-линия",height:20,type:"Информационные знаки"},6.17:{title:"Схема объезда",height:25,type:"Информационные знаки"},"6.18.1":{title:"Направление объезда",height:20,type:"Информационные знаки"},"6.18.2":{title:"Направление объезда",height:20,type:"Информационные знаки"},"6.18.3":{title:"Направление объезда",height:20,type:"Информационные знаки"},"6.19.1":{title:"Предварительный указатель перестроения на другую проезжую часть",height:25,type:"Информационные знаки"},"6.19.2":{title:"Предварительный указатель перестроения на другую проезжую часть",height:25,type:"Информационные знаки"},"6.20.1":{title:"Аварийный выход",height:20,type:"Информационные знаки"},"6.20.2":{title:"Аварийный выход",height:20,type:"Информационные знаки"},"6.21.1":{title:"Направление движения к аварийному выходу",height:20,type:"Информационные знаки"},"6.21.2":{title:"Направление движения к аварийному выходу",height:20,type:"Информационные знаки"},6.22:{title:"Фотовидеофиксация",height:20,type:"Информационные знаки"},7.1:{title:"Пункт медицинской помощи",height:30,type:"Знаки сервиса"},7.2:{title:"Больница",height:30,type:"Знаки сервиса"},7.3:{title:"Автозаправочная станция",height:30,type:"Знаки сервиса"},7.4:{title:"Техническое обслуживание автомобилей",height:30,type:"Знаки сервиса"},7.5:{title:"Мойка автомобилей",height:30,type:"Знаки сервиса"},7.6:{title:"Телефон",height:30,type:"Знаки сервиса"},7.7:{title:"Пункт питания",height:30,type:"Знаки сервиса"},7.8:{title:"Питьевая вода",height:30,type:"Знаки сервиса"},7.9:{title:"Гостиница или мотель",height:30,type:"Знаки сервиса"},"7.10":{title:"Кемпинг",height:30,type:"Знаки сервиса"},7.11:{title:"Место отдыха",height:30,type:"Знаки сервиса"},7.12:{title:"Пост ДПС",height:30,type:"Знаки сервиса"},7.13:{title:"Полиция",height:30,type:"Знаки сервиса"},"7.14.1":{title:"Пункт таможенного контроля",height:30,type:"Знаки сервиса"},"7.14.2":{title:"Пункт транспортного контроля",height:30,type:"Знаки сервиса"},7.15:{title:"Зона приёма радиостанции, передающей информацию о дорожном движении",height:30,type:"Знаки сервиса"},7.16:{title:"Зона радиосвязи с аварийными службами",height:30,type:"Знаки сервиса"},7.17:{title:"Бассейн или пляж",height:30,type:"Знаки сервиса"},7.18:{title:"Туалет",height:30,type:"Знаки сервиса"},7.19:{title:"Телефон экстренной связи",height:30,type:"Знаки сервиса"},"7.20":{title:"Огнетушитель",height:30,type:"Знаки сервиса"},7.21:{title:"Автозаправочная станция с возможностью зарядки электромобилей",height:30,type:"Знаки сервиса"}},rg={"8.1.1":{title:"Расстояние до объекта",height:20,type:"Знаки дополнительной информации"},"8.1.2":{title:"Расстояние до объекта",height:20,type:"Знаки дополнительной информации"},"8.1.3":{title:"Расстояние до объекта",height:20,type:"Знаки дополнительной информации"},"8.1.4":{title:"Расстояние до объекта",height:20,type:"Знаки дополнительной информации"},"8.2.1":{title:"Зона действия",height:20,type:"Знаки дополнительной информации"},"8.2.2":{title:"Зона действия",height:40,type:"Знаки дополнительной информации"},"8.2.3":{title:"Зона действия",height:40,type:"Знаки дополнительной информации"},"8.2.4":{title:"Зона действия",height:40,type:"Знаки дополнительной информации"},"8.2.5":{title:"Зона действия",height:20,type:"Знаки дополнительной информации"},"8.2.6":{title:"Зона действия",height:20,type:"Знаки дополнительной информации"},"8.3.1":{title:"Направления действия",height:20,type:"Знаки дополнительной информации"},"8.3.2":{title:"Направления действия",height:20,type:"Знаки дополнительной информации"},"8.3.3":{title:"Направления действия",height:20,type:"Знаки дополнительной информации"},"8.4.1":{title:"Вид транспортного средства",height:20,type:"Знаки дополнительной информации"},"8.4.2":{title:"Вид транспортного средства",height:20,type:"Знаки дополнительной информации"},"8.4.3.1":{title:"Вид транспортного средства",height:20,type:"Знаки дополнительной информации"},"8.4.3.2":{title:"Вид транспортного средства",height:20,type:"Знаки дополнительной информации"},"8.4.4":{title:"Вид транспортного средства",height:20,type:"Знаки дополнительной информации"},"8.4.5":{title:"Вид транспортного средства",height:20,type:"Знаки дополнительной информации"},"8.4.6":{title:"Вид транспортного средства",height:20,type:"Знаки дополнительной информации"},"8.4.7.1":{title:"Вид транспортного средства",height:20,type:"Знаки дополнительной информации"},"8.4.7.2":{title:"Вид транспортного средства",height:20,type:"Знаки дополнительной информации"},"8.4.8":{title:"Вид транспортного средства",height:20,type:"Знаки дополнительной информации"},"8.4.9":{title:"Кроме вида транспортного средства",height:20,type:"Знаки дополнительной информации"},"8.4.10":{title:"Кроме вида транспортного средства",height:20,type:"Знаки дополнительной информации"},"8.4.11":{title:"Кроме вида транспортного средства",height:20,type:"Знаки дополнительной информации"},"8.4.12":{title:"Кроме вида транспортного средства",height:20,type:"Знаки дополнительной информации"},"8.4.13":{title:"Кроме вида транспортного средства",height:20,type:"Знаки дополнительной информации"},"8.4.14":{title:"Кроме вида транспортного средства",height:20,type:"Знаки дополнительной информации"},"8.4.15":{title:"Кроме вида транспортного средства",height:20,type:"Знаки дополнительной информации"},"8.5.1":{title:"Субботние, воскресные и праздничные дни",height:20,type:"Знаки дополнительной информации"},"8.5.2":{title:"Рабочие дни",height:20,type:"Знаки дополнительной информации"},"8.5.3":{title:"Дни недели",height:20,type:"Знаки дополнительной информации"},"8.5.4":{title:"Время действия",height:20,type:"Знаки дополнительной информации"},"8.5.5":{title:"Время действия",height:20,type:"Знаки дополнительной информации"},"8.5.6":{title:"Время действия",height:20,type:"Знаки дополнительной информации"},"8.5.7":{title:"Время действия",height:20,type:"Знаки дополнительной информации"},"8.6.1":{title:"Способ постановки транспортного средства на стоянку",height:20,type:"Знаки дополнительной информации"},"8.6.2":{title:"Способ постановки транспортного средства на стоянку",height:20,type:"Знаки дополнительной информации"},"8.6.3":{title:"Способ постановки транспортного средства на стоянку",height:20,type:"Знаки дополнительной информации"},"8.6.4":{title:"Способ постановки транспортного средства на стоянку",height:20,type:"Знаки дополнительной информации"},"8.6.5":{title:"Способ постановки транспортного средства на стоянку",height:20,type:"Знаки дополнительной информации"},"8.6.6":{title:"Способ постановки транспортного средства на стоянку",height:20,type:"Знаки дополнительной информации"},"8.6.7":{title:"Способ постановки транспортного средства на стоянку",height:20,type:"Знаки дополнительной информации"},"8.6.8":{title:"Способ постановки транспортного средства на стоянку",height:20,type:"Знаки дополнительной информации"},"8.6.9":{title:"Способ постановки транспортного средства на стоянку",height:20,type:"Знаки дополнительной информации"},8.7:{title:"Стоянка с неработающим двигателем",height:20,type:"Знаки дополнительной информации"},8.8:{title:"Платные услуги",height:20,type:"Знаки дополнительной информации"},"8.9.1":{title:"Ограничение продолжительности стоянки",height:20,type:"Знаки дополнительной информации"},"8.9.2":{title:"Стоянка только для владельцев парковочных разрешений",height:20,type:"Знаки дополнительной информации"},"8.9.3":{title:"Стоянка только транспортных средств дипломатического корпуса",height:20,type:"Знаки дополнительной информации"},"8.10":{title:"Место для осмотра автомобилей",height:20,type:"Знаки дополнительной информации"},8.11:{title:"Ограничение разрешённой максимальной массы",height:20,type:"Знаки дополнительной информации"},8.12:{title:"Опасная обочина",height:20,type:"Знаки дополнительной информации"},8.13:{title:"Направление главной дороги",height:20,type:"Знаки дополнительной информации"},"8.13 B":{title:"Направление главной дороги",height:20,type:"Знаки дополнительной информации"},8.14:{title:"Полоса движения",height:20,type:"Знаки дополнительной информации"},8.15:{title:"Слепые пешеходы",height:20,type:"Знаки дополнительной информации"},8.16:{title:"Влажное покрытие",height:20,type:"Знаки дополнительной информации"},8.17:{title:"Инвалиды",height:20,type:"Знаки дополнительной информации"},8.18:{title:"Кроме инвалидов",height:20,type:"Знаки дополнительной информации"},8.19:{title:"Класс опасного груза",height:20,type:"Знаки дополнительной информации"},"8.20.1":{title:"Тип тележки транспортного средства",height:20,type:"Знаки дополнительной информации"},"8.20.2":{title:"Тип тележки транспортного средства",height:20,type:"Знаки дополнительной информации"},"8.21.1":{title:"Вид маршрутного транспортного средства",height:20,type:"Знаки дополнительной информации"},"8.21.2":{title:"Вид маршрутного транспортного средства",height:20,type:"Знаки дополнительной информации"},"8.21.3":{title:"Вид маршрутного транспортного средства",height:20,type:"Знаки дополнительной информации"},"8.22.1":{title:"Препятствие",height:68,type:"Знаки дополнительной информации"},"8.22.2":{title:"Препятствие",height:68,type:"Знаки дополнительной информации"},"8.22.3":{title:"Препятствие",height:68,type:"Знаки дополнительной информации"},8.24:{title:"Работает эвакуатор",height:20,type:"Знаки дополнительной информации"},8.25:{title:"Экологический класс транспортного средства",height:20,type:"Знаки дополнительной информации"},8.26:{title:"Зарядка электромобилей",height:20,type:"Знаки дополнительной информации"}},sg={...ig,...rg},og=e=>{const t=[],n={source:e,layer:__.TRAFFIC_SIGN},i={},r={};Object.keys(ig).forEach(e=>{const t=`${ng.fileName}-${e}`,{height:n}=ig[e],s=ag({type:"map",number:e});i[t]={url:s,filtering:"mipmap",sprites:{base:[0,0,ng.widths.map,n]}},r[t]={filter:`function() {\n const { traffic_sign_number } = feature;\n\n const isFilter = traffic_sign_number === '${e}';\n\n return isFilter;\n }`,draw:{points:{collide:!1,texture:t,size:[ng.widths.map,n],sprite:"base",placement:"midpoint"}}}});const s={id:gn(),data:n,textures:i,sublayers:r};return t.push(s),t},ag=({type:e,number:t})=>{const n=ng.widths[e];return wn(`msk/${ng.fileName}_${n}/${t}.${ng.extension}`)},lg=e=>{const t={};e.forEach(({traffic_sign_number:e,traffic_sign_title:n,traffic_sign_type:i,height:r})=>{t[e]={title:n,height:Number(r),type:i}}),_n(t)},ug={size:20,extension:"svg"},cg=e=>{const t=[],n={source:e,layer:__.TRAFFIC_SIGNAL},i={},r="traffic_signal";i[r]={url:wn(`msk/${r}/${r}_${ug.size}.${ug.extension}`),filtering:"mipmap",sprites:{base:[0,0,ug.size,ug.size]}};const s={id:gn(),data:n,draw:{points:{collide:!1,texture:r,size:ug.size,sprite:"base",placement:"midpoint"}},textures:i,sublayers:{}};return t.push(s),t},hg=e=>{const t=[],n={id:gn(),data:{source:e,layer:__.WATER_AREA},draw:{polygons:{color:"#7DBEE4"},lines:{color:"#7DBEE4",width:20,cap:"round",join:"round"}}},i={id:gn(),data:{source:e,layer:__.WATER_AREA_LABEL},filter:"function() {\n const { display_class } = feature;\n\n if ($zoom >= 14) {\n return true;\n } else {\n return display_class <= 4;\n }\n }",draw:{text:{text_source:"name",font:{fill:"#0A80C4",size:"14px",stroke:{color:"white",width:"3px"}}}}},r={id:gn(),data:{source:e,layer:__.WATER_LAKE_LABEL},filter:"function() {\n const { display_class } = feature;\n\n if ($zoom >= 14) {\n return true;\n } else {\n return display_class <= 4;\n }\n }",draw:{text:{text_source:"name",font:{fill:"#0A80C4",size:"14px",stroke:{color:"white",width:"3px"}}}}};return t.push(n,i,r),t},dg=e=>{const t=[],n={},i={source:e,layer:__.WATER_LINK},r={id:gn(),data:i};return n.geometry={draw:{lines:{color:"#7DBEE4",width:5,cap:"round",join:"round"}}},n.text={filter:"function() {\n return $zoom >= 10;\n }",draw:{text:{text_source:"name",font:{fill:"#0A80C4",size:"14px",stroke:{color:"white",width:"3px"}}}}},r.sublayers=n,t.push(r),t},fg="white",pg=.5,mg={1.1:{color:fg,width:pg},1.2:{color:fg,width:pg},1.5:{color:fg,width:pg,dash:[4,10]},1.6:{color:fg,width:pg,dash:[5,5]},1.7:{color:fg,width:pg,dash:[4,10]},"1.7-blue":{color:"blue",width:pg,dash:[4,10]},1.8:{color:fg,width:pg},1.12:{color:fg,width:1.5},"1.14.3":{color:fg,width:pg,dash:[3,8]},"1.16.1":{color:fg,width:pg},"1.16.2":{color:fg,width:pg},"1.16.3":{color:fg,width:pg},"1.16.x":{color:fg,width:pg},"1.17.1":{color:"yellow",width:pg},1.26:{color:"yellow",width:pg}};var _g;!function(e){e.ROAD="Road",e.TUNNEL="Tunnel",e.TRAM="Tram",e.CURB="Curb",e.BRIDGE="Bridge"}(_g||(_g={}));const gg={[_g.ROAD]:"#BABCC2",[_g.TUNNEL]:"#EAEBEE",[_g.TRAM]:"#ADA8A8",[_g.CURB]:"#D2D9E6",[_g.BRIDGE]:"#E1DFDD"},yg=({id:e,data:{source:t,layer:n}})=>`${e}-${t}-${n}`,vg=({layer:e,order:t,eventHandlers:n})=>{const i=structuredClone(e),{draw:r,sublayers:s}=i,o=Boolean(n?.[e.data.layer]);if(r){const{points:e,lines:n,polygons:s,text:a,styles:l}=r;e&&(r.points={...structuredClone(e),order:t,interactive:o}),n&&(r.lines={...structuredClone(n),order:t,interactive:o}),s&&(r.polygons={...structuredClone(s),order:t,interactive:o}),a&&(r.text={...structuredClone(a),order:t,interactive:o}),l&&(r.styles=Object.entries(l).reduce((e,[n,i])=>({...e,[n]:{...structuredClone(i),order:t}}),{})),i.draw=structuredClone(r)}return s&&(Object.entries(s).forEach(([e,n])=>{if(n){const{draw:i}=n;if(i){const{points:e,lines:r,polygons:s,text:a}=i;a&&(i.text={...structuredClone(a),order:t,interactive:o}),e&&(i.points={...structuredClone(e),order:t,interactive:o}),r&&(i.lines={...structuredClone(r),order:t,interactive:o}),s&&(i.polygons={...structuredClone(s),order:t,interactive:o}),n.draw=structuredClone(i)}s[e]=structuredClone(n)}}),i.sublayers=structuredClone(s)),i},bg=e=>{const t=b_(e),n=V_(),i=G_(),r=v_(e),s=S_(e),o=k_(e),a=hg(e),l=$_(e),u=[];if(e===g_.MSK)u.push(...t,...r,...s,...o,...a,...l);else u.push(...t,...r,...s,...n,...i,...o,...a,...l);return u},xg=e=>{const t=U_(e),n=tg(e),i=dg(e),r=Z_(e),s=T_(e),o=[...i,...n,...t];if(e===g_.MSK);else o.push(...r,...s);return o},wg=e=>{const t=Q_(e),n=E_(e);return[...t,...eg(e),...n,...og(e),...cg(e),...w_(e),...W_(e)]},Eg=e=>{const t=[],n=y_(e),i=bg(e),r=xg(e),s=wg(e),o=(e=>{const t=[],n={source:e,layer:__.ROAD_POLY};return Object.values(_g).forEach(e=>{const i={id:gn(),data:n,filter:`function() {\n const { type } = feature;\n\n const isFilter = type === '${e}';\n\n return isFilter;\n }`,draw:{polygons:{color:gg[e]}}};t.push(i)}),t})(e),a=(e=>{const t=[],n={source:e,layer:__.LANE_MARKING_POLY},i={id:gn(),data:n,filter:"function() {\n const { poly_number } = feature;\n\n const isFilter = poly_number === '1.14.1';\n\n return isFilter;\n }",draw:{styles:{zebra_crossing:{attributes:{a_angle:"function() {\n return feature.angle;\n }"}}}}};return t.push(i),t})(e),l=(e=>{const t=[],n={source:e,layer:__.LANE_MARKING_LINE},i=Object.entries(mg).reduce((e,[t,n])=>{const i={filter:`function () {\n const { lane_number } = feature;\n\n const isFilter = lane_number === '${t}';\n\n return isFilter;\n }`,draw:{lines:n}};return{...e,[t]:i}},{}),r={id:gn(),data:n,sublayers:i},s={"1.3-left":{id:gn(),data:n,filter:"function() {\n const { lane_number } = feature;\n\n const isFilter = lane_number === '1.3';\n\n return isFilter;\n }",draw:{lines:{color:fg,width:pg,offset:-.5}}},"1.3-right":{id:gn(),data:n,filter:"function() {\n const { lane_number } = feature;\n\n const isFilter = lane_number === '1.3';\n\n return isFilter;\n }",draw:{lines:{color:fg,width:pg,offset:pg}}},"1.11r-left":{id:gn(),data:n,filter:"function() {\n const { lane_number } = feature;\n\n const isFilter = lane_number === '1.11r';\n\n return isFilter;\n }",draw:{lines:{color:fg,width:pg,offset:-.5}}},"1.11r-right":{id:gn(),data:n,filter:"function() {\n const { lane_number } = feature;\n\n const isFilter = lane_number === '1.11r';\n\n return isFilter;\n }",draw:{lines:{color:fg,width:pg,offset:pg,dash:[5,5]}}},"1.11l-left":{id:gn(),data:n,filter:"function() {\n const { lane_number } = feature;\n\n const isFilter = lane_number === '1.11l';\n\n return isFilter;\n }",draw:{lines:{color:fg,width:pg,offset:-.5,dash:[5,5]}}},"1.11l-right":{id:gn(),data:n,filter:"function() {\n const { lane_number } = feature;\n\n const isFilter = lane_number === '1.11l';\n\n return isFilter;\n }",draw:{lines:{color:fg,width:pg,offset:pg}}},"1.25-left":{id:gn(),data:n,filter:"function() {\n const { lane_number } = feature;\n\n const isFilter = lane_number === '1.25';\n\n return isFilter;\n }",draw:{lines:{color:fg,width:1,offset:-.5,dash:[1,1],dash_background_color:[0,0,0,0]}}},"1.25-right":{id:gn(),data:n,filter:"function() {\n const { lane_number } = feature;\n\n const isFilter = lane_number === '1.25';\n\n return isFilter;\n }",draw:{lines:{color:"rgba(0,0,0,0)",width:1,offset:.5,dash:[1,1],dash_background_color:[1,1,1]}}}};return t.push(r,...Object.values(s)),t})(e),u=O_(e),c=(e=>{const t=[],n={source:e,layer:__.PARKING_LINE},i={id:gn(),data:n,draw:{lines:{color:"white",width:1}}};return t.push(i),t})(e);if(e===g_.MSK)t.push(...i,...r,...o,...a,...u,...l,...c,...n,...s);else t.push(...i,...r,...n,...s);return t},Ag=e=>`${e.getFullYear()}-${`${e.getUTCMonth()+1}`.padStart(2,"0")}-${`${e.getUTCDate()}`.padStart(2,"0")}`,Tg=e=>{const t={[ve.CREATE]:"",[ve.UPDATE]:"",[ve.DELETE]:""};return Object.values(ve).forEach(n=>{t[n]=`${e}-${n}`}),t},Sg=256,kg={[g_.TILE]:"$VITE_API_HOST/api/tiles/get_tile/{z}/{x}/{y}.mvt",[g_.NATURE_TILE]:"$VITE_API_HOST/api/tiles/get_nature_tile/{z}/{x}/{y}.mvt",[g_.MSK]:"$VITE_API_HOST/api/tiles/get_tile/{z}/{x}/{y}.mvt"};function Og(e,t){return Object.freeze({...e,...t})}const Pg=m(null);function Cg(){const e=g(Pg);if(null==e)throw new Error("No context provided: useLeafletContext() can only be used in a descendant of <MapContainer>");return e}const Rg=function(e,t){return null==t?function(t,n){const r=i(void 0);return r.current||(r.current=e(t,n)),r}:function(n,r){const o=i(void 0);o.current||(o.current=e(n,r));const a=i(n),{instance:l}=o.current;return s(function(){a.current!==n&&(t(l,n,a.current),a.current=n)},[l,n,t]),o}}(function({children:e,...t},n){const i=new Pe.Control.Layers(void 0,void 0,t);return r=i,s=Og(n,{layersControl:i}),Object.freeze({instance:r,context:s,container:o});var r,s,o},function(e,t,n){t.collapsed!==n.collapsed&&(!0===t.collapsed?e.collapse():e.expand())});var Mg;const Lg=function(e){function i(n,i){const{instance:r,context:s}=e(n).current;y(i,()=>r);const{children:o}=n;return null==o?null:t.createElement(Pg,{value:s},o)}return n(i)}((Mg=Rg,function(e){const t=Cg(),n=Mg(e,t),{instance:r}=n.current,o=i(e.position),{position:a}=e;return s(function(){return r.addTo(t.map),function(){r.remove()}},[t.map,r]),s(function(){null!=a&&a!==o.current&&(r.setPosition(a),o.current=a)},[r,a]),n}));function Ng(e){return function(n){const o=Cg(),a=i(n),[u,c]=p(null),{layersControl:h,map:d}=o,f=r(t=>{null!=h&&(a.current.checked&&d.addLayer(t),e(h,t,a.current.name),c(t))},[e,h,d]),m=r(e=>{h?.removeLayer(e),c(null)},[h]),_=l(()=>Og(o,{layerContainer:{addLayer:f,removeLayer:m}}),[o,f,m]);return s(()=>{null!==u&&a.current!==n&&(!0!==n.checked||null!=a.current.checked&&!1!==a.current.checked?!0!==a.current.checked||null!=n.checked&&!1!==n.checked||d.removeLayer(u):d.addLayer(u),a.current=n)}),n.children?t.createElement(Pg,{value:_},n.children):null}}Lg.BaseLayer=Ng(function(e,t,n){e.addBaseLayer(t,n)}),Lg.Overlay=Ng(function(e,t,n){e.addOverlay(t,n)});var zg={global:{links:{getIsConstruction:"function (feature) {\n const { construction } = feature;\n\n return construction;\n}\n",getIsFunctionalClass:"function (feature) {\n const { functional_class, access_id } = feature;\n\n return functional_class === 5 && access_id === 32;\n}\n",getIsLowMobility:"function (feature) {\n const { functional_class, low_mobility } = feature;\n\n return functional_class === 5 && low_mobility === 1;\n}\n"}},cameras:{camera1:{type:"perspective",vanishing_point:[0,-500]}},textures:{arrow:{url:"https://dalganmap.ru/api-image/images/arrow-20.png",sprites:{base:[0,0,20,20]}},"traffic-signal":{url:"https://dalganmap.ru/api-image/images/conditions/traffic-signal.png",filtering:"mipmap",sprites:{base:[0,0,20,20]}},pedestrian_crossing:{url:"https://dalganmap.ru/api-image/images/conditions/pedestrian_crossing.png",filtering:"mipmap",sprites:{base:[0,0,20,20]}},physical:{url:"https://dalganmap.ru/api-image/images/conditions/physical.png",filtering:"mipmap",sprites:{base:[0,0,20,20]}},gate:{url:"https://dalganmap.ru/api-image/images/conditions/gate.png",filtering:"mipmap",sprites:{base:[0,0,20,20]}},POI_3578:{url:"https://dalganmap.ru/api-image/images/POI/3578.png",filtering:"mipmap",sprites:{base:[0,0,20,20]}},POI_5813:{url:"https://dalganmap.ru/api-image/images/POI/5813.png",filtering:"mipmap",sprites:{base:[0,0,20,20]}},POI_5541:{url:"https://dalganmap.ru/api-image/images/POI/5541.png",filtering:"mipmap",sprites:{base:[0,0,20,20]}},POI_5540:{url:"https://dalganmap.ru/api-image/images/POI/5540.png",filtering:"mipmap",sprites:{base:[0,0,20,20]}},"POI_9530(Mail)":{url:"https://dalganmap.ru/api-image/images/POI/mail.png",filtering:"mipmap",sprites:{base:[0,0,20,20]}},"POI_9530(Delivery)":{url:"https://dalganmap.ru/api-image/images/POI/delivery.png",filtering:"mipmap",sprites:{base:[0,0,20,20]}},POI_5400:{url:"https://dalganmap.ru/api-image/images/POI/5400.png",filtering:"mipmap",sprites:{base:[0,0,20,20]}},POI_6000:{url:"https://dalganmap.ru/api-image/images/POI/6000.png",filtering:"mipmap",sprites:{base:[0,0,20,20]}},POI_9565:{url:"https://dalganmap.ru/api-image/images/POI/9565.png",filtering:"mipmap",sprites:{base:[0,0,20,20]}},POI_9583:{url:"https://dalganmap.ru/api-image/images/POI/9583.png",filtering:"mipmap",sprites:{base:[0,0,20,20]}},POI_8060:{url:"https://dalganmap.ru/api-image/images/POI/8060.png",filtering:"mipmap",sprites:{base:[0,0,20,20]}},POI_5511:{url:"https://dalganmap.ru/api-image/images/POI/5511.png",filtering:"mipmap",sprites:{base:[0,0,20,20]}},POI_5512:{url:"https://dalganmap.ru/api-image/images/POI/5512.png",filtering:"mipmap",sprites:{base:[0,0,20,20]}},POI_5800:{url:"https://dalganmap.ru/api-image/images/POI/5800.png",filtering:"mipmap",sprites:{base:[0,0,20,20]}},POI_5999:{url:"https://dalganmap.ru/api-image/images/POI/5999.png",filtering:"mipmap",sprites:{base:[0,0,20,20]}},POI_7011:{url:"https://dalganmap.ru/api-image/images/POI/7011.png",filtering:"mipmap",sprites:{base:[0,0,20,20]}},POI_7389:{url:"https://dalganmap.ru/api-image/images/POI/7389.png",filtering:"mipmap",sprites:{base:[0,0,20,20]}},POI_7832:{url:"https://dalganmap.ru/api-image/images/POI/7832.png",filtering:"mipmap",sprites:{base:[0,0,20,20]}},POI_7929:{url:"https://dalganmap.ru/api-image/images/POI/7929.png",filtering:"mipmap",sprites:{base:[0,0,20,20]}},POI_7990:{url:"https://dalganmap.ru/api-image/images/POI/7990.png",filtering:"mipmap",sprites:{base:[0,0,20,20]}},POI_7999:{url:"https://dalganmap.ru/api-image/images/POI/7999.png",filtering:"mipmap",sprites:{base:[0,0,20,20]}},POI_8410:{url:"https://dalganmap.ru/api-image/images/POI/8410.png",filtering:"mipmap",sprites:{base:[0,0,20,20]}},POI_9517:{url:"https://dalganmap.ru/api-image/images/POI/9517.png",filtering:"mipmap",sprites:{base:[0,0,20,20]}},POI_9718:{url:"https://dalganmap.ru/api-image/images/POI/9718.png",filtering:"mipmap",sprites:{base:[0,0,20,20]}},"POI_9992(mosque)":{url:"https://dalganmap.ru/api-image/images/POI/9992_mosque.png",filtering:"mipmap",sprites:{base:[0,0,20,20]}},"POI_9992(church)":{url:"https://dalganmap.ru/api-image/images/POI/9992_church.png",filtering:"mipmap",sprites:{base:[0,0,20,20]}},"POI_9992(temple)":{url:"https://dalganmap.ru/api-image/images/POI/9992_temple.png",filtering:"mipmap",sprites:{base:[0,0,20,20]}},"POI_9992(davidStar)":{url:"https://dalganmap.ru/api-image/images/POI/9992_davidStar.png",filtering:"mipmap",sprites:{base:[0,0,20,20]}},"POI_9992(mortar)":{url:"https://dalganmap.ru/api-image/images/POI/9992_mortar.png",filtering:"mipmap",sprites:{base:[0,0,20,20]}},"POI_4100(metro)":{url:"https://dalganmap.ru/api-image/images/POI/4100_metro.png",filtering:"mipmap",sprites:{base:[0,0,20,20]}},"POI_4100(diameter)":{url:"https://dalganmap.ru/api-image/images/POI/4100_diameter.png",filtering:"mipmap",sprites:{base:[0,0,41,15]}},POI_4013:{url:"https://dalganmap.ru/api-image/images/POI/4013.png",filtering:"mipmap",sprites:{base:[0,0,20,20]}}},layers:null,styles:{buildings:{base:"polygons",shaders:{blocks:{color:"color.rgb;\n"}}}},lights:{light1:{type:"directional",direction:[.1,.5,-1],diffuse:.7,ambient:.5}},sources:null};class Dg{props;constructor(e){this.props=e,this._initLayer()}_initLayer(){if(ua.instance.isValidApiKey){const e=this._createLayer();if(e){const{scene:t}=e;t.subscribe({load:({config:e})=>{this.config=e,this.isReady=!0,this._init()}}),this.layer=e,this.props.onCreate?.({layer:e}),this._addHandlers(e)}}}_createLayer(){if(window.Tangram){return window.Tangram.leafletLayer({scene:zg})}}_addHandlers(e){e.addEventListener("load",({sourceTarget:t})=>{this.props.onLoad?.({layer:e});const n=t._map;e.setSelectionEvents({click:({feature:e,leaflet_event:t})=>{if(e){const{source_layer:n,properties:i}=e;this.props.eventHandlers?.[n]?.click?.({leaflet_event:t,properties:i})}},hover:({feature:e,leaflet_event:t})=>{const i=n.getContainer();if(e){const{source_layer:n,properties:r}=e;i.style.cursor="pointer",this.props.eventHandlers?.[n]?.hover?.({leaflet_event:t,properties:r})}else i.style.cursor="default"}})},this),e.addEventListener("add",()=>{this.props.onAdd?.({layer:e})},this),e.addEventListener("remove",()=>{this.props.onRemove?.({layer:e})},this)}destroy(){this.layer&&(this.props.onDestroy?.({layer:this.layer}),this.layer.clearAllEventListeners(),this.layer.remove()),this.layer=null}_init(){this.addStyle({name:"zebra_crossing",style:{base:"polygons",lighting:!1,shaders:{attributes:{a_angle:{type:"float",default:0}},uniforms:{u_stripe_width:1},blocks:{filter:"\n vec3 pos = worldPosition().xyz;\n\n float ang = radians(a_angle);\n\n vec2 dir = vec2(sin(ang), cos(ang));\n\n float positionAlongLine = dot(pos.xy, dir);\n\n float stripe = step(1.0, mod(positionAlongLine / u_stripe_width, 2.0));\n\n color.rgb = mix(vec3(1.0, 1.0, 1.0), vec3(1.0, 0.8, 0.0), stripe);\n \n color.a = 1.0;\n "}}}});(this.props.defaultLayers??[]).forEach(e=>{this.addLayer(e)}),Object.values(g_).forEach(e=>{this.addSource(e)})}_layer=null;get layer(){return this._layer}set layer(e){this._layer=e}_config=null;get config(){return this._config}set config(e){this._config=e}_isReady=!1;get isReady(){return this._isReady}set isReady(e){this._isReady=e}get scene(){if(null===this.layer)return null;const{scene:e}=this.layer;return e}addStyle({name:e,style:t}){this.config&&this.scene&&(this.config.styles[e]=structuredClone(t),this.scene.updateConfig({rebuild:!0}))}addSource(e){if(this.config&&this.scene){const t=kg[e];this.config.sources[e]={tile_size:256,url:t,type:"MVT"},this.scene.updateConfig({rebuild:!0})}}deleteSource(e){this.config&&this.scene&&(delete this.config.sources[e],this.scene.updateConfig({rebuild:!0}))}getSource(e){let t=null;return this.config&&(t=structuredClone(this.config.sources[e])),t}updateSource(e,t){this.config&&this.scene&&(this.config.sources[e].url=t,this.scene.updateConfig({rebuild:!0}))}reloadSource(e){this.deleteSource(e),this.addSource(e)}addLayer(e){if(this.config&&this.scene){const t=this.getLayers().length+1,n=vg({layer:e,order:t,eventHandlers:this.props.eventHandlers}),i=yg(n),{sublayers:r,draw:s,textures:o}=n;if(s){const{styles:e={}}=s;e&&(n.draw={...structuredClone(n.draw),...structuredClone(e)})}this.config.layers[i]={...structuredClone(n),...structuredClone(r)},this.config.textures={...structuredClone(this.config.textures),...structuredClone(o)},this.scene.updateConfig({rebuild:!0})}}deleteLayers(){if(this.config){const{layers:e}=this.config;Object.values(e).forEach(e=>{this.deleteLayer(e)})}}deleteLayer(e){const t=yg(e);this.config&&this.scene&&(delete this.config.layers[t],this.scene.updateConfig({rebuild:!0}))}getLayers(){const e=[];return this.config&&e.push(...Object.keys(this.config.layers)),e}getLayerVisibility(e){let t=!0;const n=yg(e);if(this.config){const{visible:e=!0}=this.config.layers[n];t=e}return t}toggleLayerVisibility({layer:e,visible:t}){const n=yg(e);this.config&&this.scene&&(this.config.layers[n].visible=t,this.scene.updateConfig({rebuild:!0}))}}const Ig=({layers:t})=>{const n=e.useRef(null),i=Cg().map;return e.useEffect(()=>{const{current:e}=n,r=Pe.tileLayer("http://{s}.google.com/vt/lyrs=s&x={x}&y={y}&z={z}",{minZoom:2,maxZoom:25,maxNativeZoom:19,subdomains:["mt0","mt1","mt2","mt3"]});e&&e.addBaseLayer(r,"Google Satellite"),new Dg({defaultLayers:t,onCreate:({layer:t})=>{e&&(e.addBaseLayer(t,"Dartcom"),t.addTo(i))},onDestroy:({layer:t})=>{e&&(e.removeLayer(t),i.removeLayer(t))}})},[]),w(Lg,{ref:n,position:"bottomleft"})},Fg={position:"absolute",top:"50%",left:"50%",transform:"translate(-50%, -50%)",bgcolor:"background.paper",border:"2px solid #000",boxShadow:24,p:4,maxHeight:"90vh",overflowX:"auto",overflowY:"auto"};var jg=Ul(({name:t,children:n,onClose:i,onOpen:r})=>{const s=e.useId(),o=ia.getIsOpen(t);return e.useEffect(()=>{o?r?.({name:t}):i?.({name:t})},[o]),w(pe,{open:o,onClose:()=>{ia.close(t)},"aria-labelledby":`modal-${s}-title`,"aria-describedby":`modal-${s}-description`,children:w(fe,{sx:({breakpoints:e})=>({...Fg,[e.up("sm")]:{minWidth:400},[e.down("sm")]:{minWidth:"80vw"}}),children:n})})});function Bg({name:t,items:n,label:i,sx:r,getLabel:s,getValue:o,getKey:a}){const{watch:l,resetField:u,setValue:c}=qh(),h=l(t),d=e.useId(),f=n.find(e=>o(e)===h)??null;return w(Y,{value:f,options:n,id:d,getOptionLabel:e=>s(e),getOptionKey:e=>a(e),sx:{minWidth:150,...r},size:"small",onChange:(e,n)=>{n?c(t,o(n)):u(t)},renderInput:e=>w(Dd,{...e,label:i})})}const Ug=({items:t,initialValue:n,onChange:i})=>{const[r,s]=e.useState(()=>n??t[0].value),o=e.useId();return e.useEffect(()=>{n&&s(n)},[n]),E(me,{value:r,children:[w(P,{sx:{borderBottom:1,borderColor:"divider"},children:w(_e,{"aria-label":`tabs-${o}`,onChange:(e,t)=>{s(t),i?.(t)},children:t.map(({label:e,value:t})=>w(X,{label:e,value:t,sx:{textTransform:"none"}},`${o}-tab-${t}`))})}),t.map(({content:e,value:t})=>w(ge,{value:t,children:e},`${o}-tab-panel-${t}`))]})};var Vg,Gg={exports:{}};
|
|
23
|
+
*/function Mm(){if(ym)return gm;ym=1;var e=Object.getOwnPropertySymbols,t=Object.prototype.hasOwnProperty,n=Object.prototype.propertyIsEnumerable;return gm=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},n=0;n<10;n++)t["_"+String.fromCharCode(n)]=n;var i=Object.getOwnPropertyNames(t).map(function(e){return t[e]});if("0123456789"!==i.join(""))return!1;var r={};return"abcdefghijklmnopqrst".split("").forEach(function(e){r[e]=e}),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},r)).join("")}catch(e){return!1}}()?Object.assign:function(i,r){for(var s,o,a=function(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}(i),l=1;l<arguments.length;l++){for(var u in s=Object(arguments[l]))t.call(s,u)&&(a[u]=s[u]);if(e){o=e(s);for(var c=0;c<o.length;c++)n.call(s,o[c])&&(a[o[c]]=s[o[c]])}}return a},gm}function Lm(){if(bm)return vm;bm=1;return vm="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"}function Nm(){return wm?xm:(wm=1,xm=Function.call.bind(Object.prototype.hasOwnProperty))}function zm(){if(Am)return Em;Am=1;var e=function(){};if("production"!==process.env.NODE_ENV){var t=Lm(),n={},i=Nm();e=function(e){var t="Warning: "+e;"undefined"!=typeof console&&console.error(t);try{throw new Error(t)}catch(e){}}}function r(r,s,o,a,l){if("production"!==process.env.NODE_ENV)for(var u in r)if(i(r,u)){var c;try{if("function"!=typeof r[u]){var h=Error((a||"React class")+": "+o+" type `"+u+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof r[u]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw h.name="Invariant Violation",h}c=r[u](s,u,a,o,null,t)}catch(e){c=e}if(!c||c instanceof Error||e((a||"React class")+": type specification of "+o+" `"+u+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof c+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),c instanceof Error&&!(c.message in n)){n[c.message]=!0;var d=l?l():"";e("Failed "+o+" type: "+c.message+(null!=d?d:""))}}}return r.resetWarningCache=function(){"production"!==process.env.NODE_ENV&&(n={})},Em=r}function Dm(){if(Sm)return Tm;Sm=1;var e=Rm(),t=Mm(),n=Lm(),i=Nm(),r=zm(),s=function(){};function o(){return null}return"production"!==process.env.NODE_ENV&&(s=function(e){var t="Warning: "+e;"undefined"!=typeof console&&console.error(t);try{throw new Error(t)}catch(e){}}),Tm=function(a,l){var u="function"==typeof Symbol&&Symbol.iterator;var c="<<anonymous>>",h={array:m("array"),bigint:m("bigint"),bool:m("boolean"),func:m("function"),number:m("number"),object:m("object"),string:m("string"),symbol:m("symbol"),any:p(o),arrayOf:function(e){return p(function(t,i,r,s,o){if("function"!=typeof e)return new f("Property `"+o+"` of component `"+r+"` has invalid PropType notation inside arrayOf.");var a=t[i];if(!Array.isArray(a))return new f("Invalid "+s+" `"+o+"` of type `"+y(a)+"` supplied to `"+r+"`, expected an array.");for(var l=0;l<a.length;l++){var u=e(a,l,r,s,o+"["+l+"]",n);if(u instanceof Error)return u}return null})},element:p(function(e,t,n,i,r){var s=e[t];return a(s)?null:new f("Invalid "+i+" `"+r+"` of type `"+y(s)+"` supplied to `"+n+"`, expected a single ReactElement.")}),elementType:p(function(t,n,i,r,s){var o=t[n];return e.isValidElementType(o)?null:new f("Invalid "+r+" `"+s+"` of type `"+y(o)+"` supplied to `"+i+"`, expected a single ReactElement type.")}),instanceOf:function(e){return p(function(t,n,i,r,s){if(!(t[n]instanceof e)){var o=e.name||c;return new f("Invalid "+r+" `"+s+"` of type `"+(((a=t[n]).constructor&&a.constructor.name?a.constructor.name:c)+"` supplied to `")+i+"`, expected instance of `"+o+"`.")}var a;return null})},node:p(function(e,t,n,i,r){return g(e[t])?null:new f("Invalid "+i+" `"+r+"` supplied to `"+n+"`, expected a ReactNode.")}),objectOf:function(e){return p(function(t,r,s,o,a){if("function"!=typeof e)return new f("Property `"+a+"` of component `"+s+"` has invalid PropType notation inside objectOf.");var l=t[r],u=y(l);if("object"!==u)return new f("Invalid "+o+" `"+a+"` of type `"+u+"` supplied to `"+s+"`, expected an object.");for(var c in l)if(i(l,c)){var h=e(l,c,s,o,a+"."+c,n);if(h instanceof Error)return h}return null})},oneOf:function(e){if(!Array.isArray(e))return"production"!==process.env.NODE_ENV&&s(arguments.length>1?"Invalid arguments supplied to oneOf, expected an array, got "+arguments.length+" arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z]).":"Invalid argument supplied to oneOf, expected an array."),o;return p(function(t,n,i,r,s){for(var o=t[n],a=0;a<e.length;a++)if(d(o,e[a]))return null;var l=JSON.stringify(e,function(e,t){return"symbol"===v(t)?String(t):t});return new f("Invalid "+r+" `"+s+"` of value `"+String(o)+"` supplied to `"+i+"`, expected one of "+l+".")})},oneOfType:function(e){if(!Array.isArray(e))return"production"!==process.env.NODE_ENV&&s("Invalid argument supplied to oneOfType, expected an instance of array."),o;for(var t=0;t<e.length;t++){var r=e[t];if("function"!=typeof r)return s("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+b(r)+" at index "+t+"."),o}return p(function(t,r,s,o,a){for(var l=[],u=0;u<e.length;u++){var c=(0,e[u])(t,r,s,o,a,n);if(null==c)return null;c.data&&i(c.data,"expectedType")&&l.push(c.data.expectedType)}return new f("Invalid "+o+" `"+a+"` supplied to `"+s+"`"+(l.length>0?", expected one of type ["+l.join(", ")+"]":"")+".")})},shape:function(e){return p(function(t,i,r,s,o){var a=t[i],l=y(a);if("object"!==l)return new f("Invalid "+s+" `"+o+"` of type `"+l+"` supplied to `"+r+"`, expected `object`.");for(var u in e){var c=e[u];if("function"!=typeof c)return _(r,s,o,u,v(c));var h=c(a,u,r,s,o+"."+u,n);if(h)return h}return null})},exact:function(e){return p(function(r,s,o,a,l){var u=r[s],c=y(u);if("object"!==c)return new f("Invalid "+a+" `"+l+"` of type `"+c+"` supplied to `"+o+"`, expected `object`.");var h=t({},r[s],e);for(var d in h){var p=e[d];if(i(e,d)&&"function"!=typeof p)return _(o,a,l,d,v(p));if(!p)return new f("Invalid "+a+" `"+l+"` key `"+d+"` supplied to `"+o+"`.\nBad object: "+JSON.stringify(r[s],null," ")+"\nValid keys: "+JSON.stringify(Object.keys(e),null," "));var m=p(u,d,o,a,l+"."+d,n);if(m)return m}return null})}};function d(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t}function f(e,t){this.message=e,this.data=t&&"object"==typeof t?t:{},this.stack=""}function p(e){if("production"!==process.env.NODE_ENV)var t={},i=0;function r(r,o,a,u,h,d,p){if(u=u||c,d=d||a,p!==n){if(l){var m=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types");throw m.name="Invariant Violation",m}if("production"!==process.env.NODE_ENV&&"undefined"!=typeof console){var _=u+":"+a;!t[_]&&i<3&&(s("You are manually calling a React.PropTypes validation function for the `"+d+"` prop on `"+u+"`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."),t[_]=!0,i++)}}return null==o[a]?r?null===o[a]?new f("The "+h+" `"+d+"` is marked as required in `"+u+"`, but its value is `null`."):new f("The "+h+" `"+d+"` is marked as required in `"+u+"`, but its value is `undefined`."):null:e(o,a,u,h,d)}var o=r.bind(null,!1);return o.isRequired=r.bind(null,!0),o}function m(e){return p(function(t,n,i,r,s,o){var a=t[n];return y(a)!==e?new f("Invalid "+r+" `"+s+"` of type `"+v(a)+"` supplied to `"+i+"`, expected `"+e+"`.",{expectedType:e}):null})}function _(e,t,n,i,r){return new f((e||"React class")+": "+t+" type `"+n+"."+i+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+r+"`.")}function g(e){switch(typeof e){case"number":case"string":case"undefined":return!0;case"boolean":return!e;case"object":if(Array.isArray(e))return e.every(g);if(null===e||a(e))return!0;var t=function(e){var t=e&&(u&&e[u]||e["@@iterator"]);if("function"==typeof t)return t}(e);if(!t)return!1;var n,i=t.call(e);if(t!==e.entries){for(;!(n=i.next()).done;)if(!g(n.value))return!1}else for(;!(n=i.next()).done;){var r=n.value;if(r&&!g(r[1]))return!1}return!0;default:return!1}}function y(e){var t=typeof e;return Array.isArray(e)?"array":e instanceof RegExp?"object":function(e,t){return"symbol"===e||!!t&&("Symbol"===t["@@toStringTag"]||"function"==typeof Symbol&&t instanceof Symbol)}(t,e)?"symbol":t}function v(e){if(null==e)return""+e;var t=y(e);if("object"===t){if(e instanceof Date)return"date";if(e instanceof RegExp)return"regexp"}return t}function b(e){var t=v(e);switch(t){case"array":case"object":return"an "+t;case"boolean":case"date":case"regexp":return"a "+t;default:return t}}return f.prototype=Error.prototype,h.checkPropTypes=r,h.resetWarningCache=r.resetWarningCache,h.PropTypes=h,h},Tm}function Im(){if(Om)return km;Om=1;var e=Lm();function t(){}function n(){}return n.resetWarningCache=t,km=function(){function i(t,n,i,r,s,o){if(o!==e){var a=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw a.name="Invariant Violation",a}}function r(){return i}i.isRequired=i;var s={array:i,bigint:i,bool:i,func:i,number:i,object:i,string:i,symbol:i,any:i,arrayOf:r,element:i,elementType:i,instanceOf:r,node:i,objectOf:r,oneOf:r,oneOfType:r,shape:r,exact:r,checkPropTypes:n,resetWarningCache:t};return s.PropTypes=s,s},km}function Fm(){if(Pm)return dm.exports;if(Pm=1,"production"!==process.env.NODE_ENV){var e=Rm();dm.exports=Dm()(e.isElement,true)}else dm.exports=Im()();return dm.exports}var jm,Bm={exports:{}};var Um,Vm={},Gm={};function $m(){if(Um)return Gm;return Um=1,Object.defineProperty(Gm,"__esModule",{value:!0}),Gm.dontSetMe=function(e,t,n){if(e[t])return new Error(`Invalid prop ${t} passed to ${n} - do not set this, set it on the child.`)},Gm.findInArray=function(e,t){for(let n=0,i=e.length;n<i;n++)if(t.apply(t,[e[n],n,e]))return e[n]},Gm.int=function(e){return parseInt(e,10)},Gm.isFunction=function(e){return"function"==typeof e||"[object Function]"===Object.prototype.toString.call(e)},Gm.isNum=function(e){return"number"==typeof e&&!isNaN(e)},Gm}var Zm,qm,Wm={};function Hm(){if(qm)return Vm;qm=1,Object.defineProperty(Vm,"__esModule",{value:!0}),Vm.addClassName=o,Vm.addEvent=function(e,t,n,i){if(!e)return;const r={capture:!0,...i};e.addEventListener?e.addEventListener(t,n,r):e.attachEvent?e.attachEvent("on"+t,n):e["on"+t]=n},Vm.addUserSelectStyles=function(e){if(!e)return;let t=e.getElementById("react-draggable-style-el");t||(t=e.createElement("style"),t.type="text/css",t.id="react-draggable-style-el",t.innerHTML=".react-draggable-transparent-selection *::-moz-selection {all: inherit;}\n",t.innerHTML+=".react-draggable-transparent-selection *::selection {all: inherit;}\n",e.getElementsByTagName("head")[0].appendChild(t));e.body&&o(e.body,"react-draggable-transparent-selection")},Vm.createCSSTransform=function(e,n){const i=r(e,n,"px");return{[(0,t.browserPrefixToKey)("transform",t.default)]:i}},Vm.createSVGTransform=function(e,t){return r(e,t,"")},Vm.getTouch=function(t,n){return t.targetTouches&&(0,e.findInArray)(t.targetTouches,e=>n===e.identifier)||t.changedTouches&&(0,e.findInArray)(t.changedTouches,e=>n===e.identifier)},Vm.getTouchIdentifier=function(e){if(e.targetTouches&&e.targetTouches[0])return e.targetTouches[0].identifier;if(e.changedTouches&&e.changedTouches[0])return e.changedTouches[0].identifier},Vm.getTranslation=r,Vm.innerHeight=function(t){let n=t.clientHeight;const i=t.ownerDocument.defaultView.getComputedStyle(t);return n-=(0,e.int)(i.paddingTop),n-=(0,e.int)(i.paddingBottom),n},Vm.innerWidth=function(t){let n=t.clientWidth;const i=t.ownerDocument.defaultView.getComputedStyle(t);return n-=(0,e.int)(i.paddingLeft),n-=(0,e.int)(i.paddingRight),n},Vm.matchesSelector=i,Vm.matchesSelectorAndParentsTo=function(e,t,n){let r=e;do{if(i(r,t))return!0;if(r===n)return!1;r=r.parentNode}while(r);return!1},Vm.offsetXYFromParent=function(e,t,n){const i=t===t.ownerDocument.body?{left:0,top:0}:t.getBoundingClientRect(),r=(e.clientX+t.scrollLeft-i.left)/n,s=(e.clientY+t.scrollTop-i.top)/n;return{x:r,y:s}},Vm.outerHeight=function(t){let n=t.clientHeight;const i=t.ownerDocument.defaultView.getComputedStyle(t);return n+=(0,e.int)(i.borderTopWidth),n+=(0,e.int)(i.borderBottomWidth),n},Vm.outerWidth=function(t){let n=t.clientWidth;const i=t.ownerDocument.defaultView.getComputedStyle(t);return n+=(0,e.int)(i.borderLeftWidth),n+=(0,e.int)(i.borderRightWidth),n},Vm.removeClassName=a,Vm.removeEvent=function(e,t,n,i){if(!e)return;const r={capture:!0,...i};e.removeEventListener?e.removeEventListener(t,n,r):e.detachEvent?e.detachEvent("on"+t,n):e["on"+t]=null},Vm.scheduleRemoveUserSelectStyles=function(e){window.requestAnimationFrame?window.requestAnimationFrame(()=>{s(e)}):s(e)};var e=$m(),t=function(e,t){if("function"==typeof WeakMap)var n=new WeakMap,i=new WeakMap;return function(e,t){if(!t&&e&&e.__esModule)return e;var r,s,o={__proto__:null,default:e};if(null===e||"object"!=typeof e&&"function"!=typeof e)return o;if(r=t?i:n){if(r.has(e))return r.get(e);r.set(e,o)}for(const t in e)"default"!==t&&{}.hasOwnProperty.call(e,t)&&((s=(r=Object.defineProperty)&&Object.getOwnPropertyDescriptor(e,t))&&(s.get||s.set)?r(o,t,s):o[t]=e[t]);return o}(e,t)}(function(){if(Zm)return Wm;Zm=1,Object.defineProperty(Wm,"__esModule",{value:!0}),Wm.browserPrefixToKey=n,Wm.browserPrefixToStyle=function(e,t){return t?`-${t.toLowerCase()}-${e}`:e},Wm.default=void 0,Wm.getPrefix=t;const e=["Moz","Webkit","O","ms"];function t(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"transform";if("undefined"==typeof window)return"";const i=window.document?.documentElement?.style;if(!i)return"";if(t in i)return"";for(let r=0;r<e.length;r++)if(n(t,e[r])in i)return e[r];return""}function n(e,t){return t?`${t}${function(e){let t="",n=!0;for(let i=0;i<e.length;i++)n?(t+=e[i].toUpperCase(),n=!1):"-"===e[i]?n=!0:t+=e[i];return t}(e)}`:e}return Wm.default=t(),Wm}());let n="";function i(t,i){return n||(n=(0,e.findInArray)(["matches","webkitMatchesSelector","mozMatchesSelector","msMatchesSelector","oMatchesSelector"],function(n){return(0,e.isFunction)(t[n])})),!!(0,e.isFunction)(t[n])&&t[n](i)}function r(e,t,n){let{x:i,y:r}=e,s=`translate(${i}${n},${r}${n})`;if(t){s=`translate(${`${"string"==typeof t.x?t.x:t.x+n}`}, ${`${"string"==typeof t.y?t.y:t.y+n}`})`+s}return s}function s(e){if(e)try{if(e.body&&a(e.body,"react-draggable-transparent-selection"),e.selection)e.selection.empty();else{const t=(e.defaultView||window).getSelection();t&&"Caret"!==t.type&&t.removeAllRanges()}}catch(e){}}function o(e,t){e.classList?e.classList.add(t):e.className.match(new RegExp(`(?:^|\\s)${t}(?!\\S)`))||(e.className+=` ${t}`)}function a(e,t){e.classList?e.classList.remove(t):e.className=e.className.replace(new RegExp(`(?:^|\\s)${t}(?!\\S)`,"g"),"")}return Vm}var Km,Ym={};function Xm(){if(Km)return Ym;Km=1,Object.defineProperty(Ym,"__esModule",{value:!0}),Ym.canDragX=function(e){return"both"===e.props.axis||"x"===e.props.axis},Ym.canDragY=function(e){return"both"===e.props.axis||"y"===e.props.axis},Ym.createCoreData=function(t,i,r){const s=!(0,e.isNum)(t.lastX),o=n(t);return s?{node:o,deltaX:0,deltaY:0,lastX:i,lastY:r,x:i,y:r}:{node:o,deltaX:i-t.lastX,deltaY:r-t.lastY,lastX:t.lastX,lastY:t.lastY,x:i,y:r}},Ym.createDraggableData=function(e,t){const n=e.props.scale;return{node:t.node,x:e.state.x+t.deltaX/n,y:e.state.y+t.deltaY/n,deltaX:t.deltaX/n,deltaY:t.deltaY/n,lastX:e.state.x,lastY:e.state.y}},Ym.getBoundPosition=function(i,r,s){if(!i.props.bounds)return[r,s];let{bounds:o}=i.props;o="string"==typeof o?o:function(e){return{left:e.left,top:e.top,right:e.right,bottom:e.bottom}}(o);const a=n(i);if("string"==typeof o){const{ownerDocument:n}=a,i=n.defaultView;let r;if("parent"===o)r=a.parentNode;else{r=a.getRootNode().querySelector(o)}if(!(r instanceof i.HTMLElement))throw new Error('Bounds selector "'+o+'" could not find an element.');const s=r,l=i.getComputedStyle(a),u=i.getComputedStyle(s);o={left:-a.offsetLeft+(0,e.int)(u.paddingLeft)+(0,e.int)(l.marginLeft),top:-a.offsetTop+(0,e.int)(u.paddingTop)+(0,e.int)(l.marginTop),right:(0,t.innerWidth)(s)-(0,t.outerWidth)(a)-a.offsetLeft+(0,e.int)(u.paddingRight)-(0,e.int)(l.marginRight),bottom:(0,t.innerHeight)(s)-(0,t.outerHeight)(a)-a.offsetTop+(0,e.int)(u.paddingBottom)-(0,e.int)(l.marginBottom)}}(0,e.isNum)(o.right)&&(r=Math.min(r,o.right));(0,e.isNum)(o.bottom)&&(s=Math.min(s,o.bottom));(0,e.isNum)(o.left)&&(r=Math.max(r,o.left));(0,e.isNum)(o.top)&&(s=Math.max(s,o.top));return[r,s]},Ym.getControlPosition=function(e,i,r){const s="number"==typeof i?(0,t.getTouch)(e,i):null;if("number"==typeof i&&!s)return null;const o=n(r),a=r.props.offsetParent||o.offsetParent||o.ownerDocument.body;return(0,t.offsetXYFromParent)(s||e,a,r.props.scale)},Ym.snapToGrid=function(e,t,n){const i=Math.round(t/e[0])*e[0],r=Math.round(n/e[1])*e[1];return[i,r]};var e=$m(),t=Hm();function n(e){const t=e.findDOMNode();if(!t)throw new Error("<DraggableCore>: Unmounted during event!");return t}return Ym}var Jm,Qm,e_,t_,n_={},i_={};function r_(){if(Jm)return i_;return Jm=1,Object.defineProperty(i_,"__esModule",{value:!0}),i_.default=function(){},i_}function s_(){if(Qm)return n_;Qm=1,Object.defineProperty(n_,"__esModule",{value:!0}),n_.default=void 0;var e=function(e,t){if("function"==typeof WeakMap)var n=new WeakMap,i=new WeakMap;return function(e,t){if(!t&&e&&e.__esModule)return e;var r,s,o={__proto__:null,default:e};if(null===e||"object"!=typeof e&&"function"!=typeof e)return o;if(r=t?i:n){if(r.has(e))return r.get(e);r.set(e,o)}for(const t in e)"default"!==t&&{}.hasOwnProperty.call(e,t)&&((s=(r=Object.defineProperty)&&Object.getOwnPropertyDescriptor(e,t))&&(s.get||s.set)?r(o,t,s):o[t]=e[t]);return o}(e,t)}(t),n=l(Fm()),i=l(v),r=Hm(),s=Xm(),o=$m(),a=l(r_());function l(e){return e&&e.__esModule?e:{default:e}}function u(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var i=n.call(e,t);if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const c={start:"touchstart",move:"touchmove",stop:"touchend"},h={start:"mousedown",move:"mousemove",stop:"mouseup"};let d=h,f=class extends e.Component{constructor(){super(...arguments),u(this,"dragging",!1),u(this,"lastX",NaN),u(this,"lastY",NaN),u(this,"touchIdentifier",null),u(this,"mounted",!1),u(this,"handleDragStart",e=>{if(this.props.onMouseDown(e),!this.props.allowAnyClick&&"number"==typeof e.button&&0!==e.button)return!1;const t=this.findDOMNode();if(!t||!t.ownerDocument||!t.ownerDocument.body)throw new Error("<DraggableCore> not mounted on DragStart!");const{ownerDocument:n}=t;if(this.props.disabled||!(e.target instanceof n.defaultView.Node)||this.props.handle&&!(0,r.matchesSelectorAndParentsTo)(e.target,this.props.handle,t)||this.props.cancel&&(0,r.matchesSelectorAndParentsTo)(e.target,this.props.cancel,t))return;"touchstart"!==e.type||this.props.allowMobileScroll||e.preventDefault();const i=(0,r.getTouchIdentifier)(e);this.touchIdentifier=i;const o=(0,s.getControlPosition)(e,i,this);if(null==o)return;const{x:l,y:u}=o,c=(0,s.createCoreData)(this,l,u);(0,a.default)("DraggableCore: handleDragStart: %j",c),(0,a.default)("calling",this.props.onStart);!1!==this.props.onStart(e,c)&&!1!==this.mounted&&(this.props.enableUserSelectHack&&(0,r.addUserSelectStyles)(n),this.dragging=!0,this.lastX=l,this.lastY=u,(0,r.addEvent)(n,d.move,this.handleDrag),(0,r.addEvent)(n,d.stop,this.handleDragStop))}),u(this,"handleDrag",e=>{const t=(0,s.getControlPosition)(e,this.touchIdentifier,this);if(null==t)return;let{x:n,y:i}=t;if(Array.isArray(this.props.grid)){let e=n-this.lastX,t=i-this.lastY;if([e,t]=(0,s.snapToGrid)(this.props.grid,e,t),!e&&!t)return;n=this.lastX+e,i=this.lastY+t}const r=(0,s.createCoreData)(this,n,i);(0,a.default)("DraggableCore: handleDrag: %j",r);if(!1!==this.props.onDrag(e,r)&&!1!==this.mounted)this.lastX=n,this.lastY=i;else try{this.handleDragStop(new MouseEvent("mouseup"))}catch(e){const t=document.createEvent("MouseEvents");t.initMouseEvent("mouseup",!0,!0,window,0,0,0,0,0,!1,!1,!1,!1,0,null),this.handleDragStop(t)}}),u(this,"handleDragStop",e=>{if(!this.dragging)return;const t=(0,s.getControlPosition)(e,this.touchIdentifier,this);if(null==t)return;let{x:n,y:i}=t;if(Array.isArray(this.props.grid)){let e=n-this.lastX||0,t=i-this.lastY||0;[e,t]=(0,s.snapToGrid)(this.props.grid,e,t),n=this.lastX+e,i=this.lastY+t}const o=(0,s.createCoreData)(this,n,i);if(!1===this.props.onStop(e,o)||!1===this.mounted)return!1;const l=this.findDOMNode();l&&this.props.enableUserSelectHack&&(0,r.scheduleRemoveUserSelectStyles)(l.ownerDocument),(0,a.default)("DraggableCore: handleDragStop: %j",o),this.dragging=!1,this.lastX=NaN,this.lastY=NaN,l&&((0,a.default)("DraggableCore: Removing handlers"),(0,r.removeEvent)(l.ownerDocument,d.move,this.handleDrag),(0,r.removeEvent)(l.ownerDocument,d.stop,this.handleDragStop))}),u(this,"onMouseDown",e=>(d=h,this.handleDragStart(e))),u(this,"onMouseUp",e=>(d=h,this.handleDragStop(e))),u(this,"onTouchStart",e=>(d=c,this.handleDragStart(e))),u(this,"onTouchEnd",e=>(d=c,this.handleDragStop(e)))}componentDidMount(){this.mounted=!0;const e=this.findDOMNode();e&&(0,r.addEvent)(e,c.start,this.onTouchStart,{passive:!1})}componentWillUnmount(){this.mounted=!1;const e=this.findDOMNode();if(e){const{ownerDocument:t}=e;(0,r.removeEvent)(t,h.move,this.handleDrag),(0,r.removeEvent)(t,c.move,this.handleDrag),(0,r.removeEvent)(t,h.stop,this.handleDragStop),(0,r.removeEvent)(t,c.stop,this.handleDragStop),(0,r.removeEvent)(e,c.start,this.onTouchStart,{passive:!1}),this.props.enableUserSelectHack&&(0,r.scheduleRemoveUserSelectStyles)(t)}}findDOMNode(){return this.props?.nodeRef?this.props?.nodeRef?.current:i.default.findDOMNode(this)}render(){return e.cloneElement(e.Children.only(this.props.children),{onMouseDown:this.onMouseDown,onMouseUp:this.onMouseUp,onTouchEnd:this.onTouchEnd})}};return n_.default=f,u(f,"displayName","DraggableCore"),u(f,"propTypes",{allowAnyClick:n.default.bool,allowMobileScroll:n.default.bool,children:n.default.node.isRequired,disabled:n.default.bool,enableUserSelectHack:n.default.bool,offsetParent:function(e,t){if(e[t]&&1!==e[t].nodeType)throw new Error("Draggable's offsetParent must be a DOM Node.")},grid:n.default.arrayOf(n.default.number),handle:n.default.string,cancel:n.default.string,nodeRef:n.default.object,onStart:n.default.func,onDrag:n.default.func,onStop:n.default.func,onMouseDown:n.default.func,scale:n.default.number,className:o.dontSetMe,style:o.dontSetMe,transform:o.dontSetMe}),u(f,"defaultProps",{allowAnyClick:!1,allowMobileScroll:!1,disabled:!1,enableUserSelectHack:!0,onStart:function(){},onDrag:function(){},onStop:function(){},onMouseDown:function(){},scale:1}),n_}function o_(){return e_||(e_=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"DraggableCore",{enumerable:!0,get:function(){return u.default}}),e.default=void 0;var n=function(e,t){if("function"==typeof WeakMap)var n=new WeakMap,i=new WeakMap;return function(e,t){if(!t&&e&&e.__esModule)return e;var r,s,o={__proto__:null,default:e};if(null===e||"object"!=typeof e&&"function"!=typeof e)return o;if(r=t?i:n){if(r.has(e))return r.get(e);r.set(e,o)}for(const t in e)"default"!==t&&{}.hasOwnProperty.call(e,t)&&((s=(r=Object.defineProperty)&&Object.getOwnPropertyDescriptor(e,t))&&(s.get||s.set)?r(o,t,s):o[t]=e[t]);return o}(e,t)}(t),i=h(Fm()),r=h(v),s=function(){if(jm)return Bm.exports;function e(t){var n,i,r="";if("string"==typeof t||"number"==typeof t)r+=t;else if("object"==typeof t)if(Array.isArray(t)){var s=t.length;for(n=0;n<s;n++)t[n]&&(i=e(t[n]))&&(r&&(r+=" "),r+=i)}else for(i in t)t[i]&&(r&&(r+=" "),r+=i);return r}function t(){for(var t,n,i=0,r="",s=arguments.length;i<s;i++)(t=arguments[i])&&(n=e(t))&&(r&&(r+=" "),r+=n);return r}return jm=1,Bm.exports=t,Bm.exports.clsx=t,Bm.exports}(),o=Hm(),a=Xm(),l=$m(),u=h(s_()),c=h(r_());function h(e){return e&&e.__esModule?e:{default:e}}function d(){return d=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)({}).hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},d.apply(null,arguments)}function f(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var i=n.call(e,t);if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}class p extends n.Component{static getDerivedStateFromProps(e,t){let{position:n}=e,{prevPropsPosition:i}=t;return!n||i&&n.x===i.x&&n.y===i.y?null:((0,c.default)("Draggable: getDerivedStateFromProps %j",{position:n,prevPropsPosition:i}),{x:n.x,y:n.y,prevPropsPosition:{...n}})}constructor(e){super(e),f(this,"onDragStart",(e,t)=>{(0,c.default)("Draggable: onDragStart: %j",t);if(!1===this.props.onStart(e,(0,a.createDraggableData)(this,t)))return!1;this.setState({dragging:!0,dragged:!0})}),f(this,"onDrag",(e,t)=>{if(!this.state.dragging)return!1;(0,c.default)("Draggable: onDrag: %j",t);const n=(0,a.createDraggableData)(this,t),i={x:n.x,y:n.y,slackX:0,slackY:0};if(this.props.bounds){const{x:e,y:t}=i;i.x+=this.state.slackX,i.y+=this.state.slackY;const[r,s]=(0,a.getBoundPosition)(this,i.x,i.y);i.x=r,i.y=s,i.slackX=this.state.slackX+(e-i.x),i.slackY=this.state.slackY+(t-i.y),n.x=i.x,n.y=i.y,n.deltaX=i.x-this.state.x,n.deltaY=i.y-this.state.y}if(!1===this.props.onDrag(e,n))return!1;this.setState(i)}),f(this,"onDragStop",(e,t)=>{if(!this.state.dragging)return!1;if(!1===this.props.onStop(e,(0,a.createDraggableData)(this,t)))return!1;(0,c.default)("Draggable: onDragStop: %j",t);const n={dragging:!1,slackX:0,slackY:0};if(Boolean(this.props.position)){const{x:e,y:t}=this.props.position;n.x=e,n.y=t}this.setState(n)}),this.state={dragging:!1,dragged:!1,x:e.position?e.position.x:e.defaultPosition.x,y:e.position?e.position.y:e.defaultPosition.y,prevPropsPosition:{...e.position},slackX:0,slackY:0,isElementSVG:!1},!e.position||e.onDrag||e.onStop||console.warn("A `position` was applied to this <Draggable>, without drag handlers. This will make this component effectively undraggable. Please attach `onDrag` or `onStop` handlers so you can adjust the `position` of this element.")}componentDidMount(){void 0!==window.SVGElement&&this.findDOMNode()instanceof window.SVGElement&&this.setState({isElementSVG:!0})}componentWillUnmount(){this.state.dragging&&this.setState({dragging:!1})}findDOMNode(){return this.props?.nodeRef?.current??r.default.findDOMNode(this)}render(){const{axis:e,bounds:t,children:i,defaultPosition:r,defaultClassName:l,defaultClassNameDragging:c,defaultClassNameDragged:h,position:f,positionOffset:p,scale:m,..._}=this.props;let g={},y=null;const v=!Boolean(f)||this.state.dragging,b=f||r,x={x:(0,a.canDragX)(this)&&v?this.state.x:b.x,y:(0,a.canDragY)(this)&&v?this.state.y:b.y};this.state.isElementSVG?y=(0,o.createSVGTransform)(x,p):g=(0,o.createCSSTransform)(x,p);const w=(0,s.clsx)(i.props.className||"",l,{[c]:this.state.dragging,[h]:this.state.dragged});return n.createElement(u.default,d({},_,{onStart:this.onDragStart,onDrag:this.onDrag,onStop:this.onDragStop}),n.cloneElement(n.Children.only(i),{className:w,style:{...i.props.style,...g},transform:y}))}}e.default=p,f(p,"displayName","Draggable"),f(p,"propTypes",{...u.default.propTypes,axis:i.default.oneOf(["both","x","y","none"]),bounds:i.default.oneOfType([i.default.shape({left:i.default.number,right:i.default.number,top:i.default.number,bottom:i.default.number}),i.default.string,i.default.oneOf([!1])]),defaultClassName:i.default.string,defaultClassNameDragging:i.default.string,defaultClassNameDragged:i.default.string,defaultPosition:i.default.shape({x:i.default.number,y:i.default.number}),positionOffset:i.default.shape({x:i.default.oneOfType([i.default.number,i.default.string]),y:i.default.oneOfType([i.default.number,i.default.string])}),position:i.default.shape({x:i.default.number,y:i.default.number}),className:l.dontSetMe,style:l.dontSetMe,transform:l.dontSetMe}),f(p,"defaultProps",{...u.default.defaultProps,axis:"both",bounds:!1,defaultClassName:"react-draggable",defaultClassNameDragging:"react-draggable-dragging",defaultClassNameDragged:"react-draggable-dragged",defaultPosition:{x:0,y:0},scale:1})}(hm)),hm}var a_=function(){if(t_)return cm.exports;t_=1;const{default:e,DraggableCore:t}=o_();return cm.exports=e,cm.exports.default=e,cm.exports.DraggableCore=t,cm.exports}(),l_=xe(a_);const u_=({zIndex:t,width:n,bottom:i,right:r,left:s,top:o,sx:a,children:l})=>{const u=e.useId(),c=e.useRef(null);return w(K,{children:w(l_,{nodeRef:c,children:w(P,{id:u,ref:c,sx:()=>({position:"absolute",top:o,left:s,bottom:i,right:r,width:n,zIndex:t,backgroundColor:"white"}),children:w(nh,{sx:a,children:l})})})})},c_=m(null),h_={didCatch:!1,error:null};class d_ extends c{constructor(e){super(e),this.resetErrorBoundary=this.resetErrorBoundary.bind(this),this.state=h_}static getDerivedStateFromError(e){return{didCatch:!0,error:e}}resetErrorBoundary(...e){const{error:t}=this.state;null!==t&&(this.props.onReset?.({args:e,reason:"imperative-api"}),this.setState(h_))}componentDidCatch(e,t){this.props.onError?.(e,t)}componentDidUpdate(e,t){const{didCatch:n}=this.state,{resetKeys:i}=this.props;n&&null!==t.error&&function(e=[],t=[]){return e.length!==t.length||e.some((e,n)=>!Object.is(e,t[n]))}(e.resetKeys,i)&&(this.props.onReset?.({next:i,prev:e.resetKeys,reason:"keys"}),this.setState(h_))}render(){const{children:e,fallbackRender:t,FallbackComponent:n,fallback:i}=this.props,{didCatch:r,error:s}=this.state;let a=e;if(r){const e={error:s,resetErrorBoundary:this.resetErrorBoundary};if("function"==typeof t)a=t(e);else if(n)a=o(n,e);else{if(void 0===i)throw s;a=i}}return o(c_.Provider,{value:{didCatch:r,error:s,resetErrorBoundary:this.resetErrorBoundary}},a)}}const f_=({error:e,resetErrorBoundary:t})=>E(P,{role:"alert",sx:{padding:"20px",background:"#fee"},children:[w(O,{variant:"h2",children:"Ошибка приложения"}),w(O,{variant:"body1",color:"error",children:e.message}),w(Hc,{onClick:t,children:"Попробовать снова"})]}),p_=({children:e,FallbackComponent:t=f_})=>w(d_,{FallbackComponent:t,children:e});function m_(t){const{name:n,type:i}=t,r=e.useId(),{control:s}=qh();return w($h,{name:n,control:s,render:({field:e})=>E(P,{sx:({spacing:e})=>({display:"grid",width:"100%",gap:e(1)}),children:[w(Dd,{id:r,size:"small",...t,...e,onChange:t=>{const{target:n}=t,{value:r}=n;if("number"===i)""===r?e.onChange():e.onChange(Number(r));else e.onChange(t)}}),w(Ld,{name:n})]})})}var __,g_;!function(e){e.ONE_WAY='"OneWay"',e.POINT_ADDRESS='"PointAddress"',e.BUILDING_AREA='"MapBuildingECArea"',e.BUILTUP_AREA='"MapAdminBuiltupArea"',e.ADMIN_AREA='"MapAdminArea"',e.OCEAN_AREA='"MapOceanArea"',e.OCEAN_AREA_LABEL='"MapOceanAreaLabel"',e.FACILITY_AREA='"MapFacilityArea"',e.FACILITY_AREA_LABEL='"MapFacilityAreaLabel"',e.LANDUSE_AREA='"MapLanduseArea"',e.LANDUSE_AREA_LABEL='"MapLanduseAreaLabel"',e.NATURE_FIELD='"MapNatureField"',e.NATURE_FOREST='"MapNatureForest"',e.LINK='"Link"',e.RAILROAD_LINK='"MapRailroadLink"',e.WATER_LINK='"MapWaterLink"',e.WATER_AREA='"MapWaterArea"',e.WATER_AREA_LABEL='"MapWaterAreaLabel"',e.WATER_LAKE_LABEL='"MapWaterLakeLabel"',e.POI='"POI"',e.CITY_POI='"CityPOI"',e.CONDITIONS='"Conditions"',e.ROAD_POLY='"RoadPoly"',e.PARKING_LINE='"ParkingLine"',e.LANE_MARKING_LINE='"LaneMarkingLine"',e.LANE_MARKING_POLY='"LaneMarkingPoly"',e.LANE_MARKING_ARROW='"LaneMarkingArrow"',e.TRAFFIC_SIGN='"TrafficSign"',e.TRAFFIC_SIGNAL='"TrafficSignal"',e.CAMERA='"Camera"',e.PILLAR='"Pillar"'}(__||(__={})),function(e){e.TILE="tile",e.NATURE_TILE="nature_tile",e.MSK="msk"}(g_||(g_={}));const y_=e=>{const t=[],n={source:e,layer:__.BUILDING_AREA,minzoom:15},i={id:gn(),data:n,extruded:{draw:{polygons:{style:"buildings",extrude:"function() {\n return $zoom >= 17;\n }"}}},draw:{polygons:{color:"#DDB07B",height:{property:"height"}},lines:{color:"#DB933F",width:"2px",cap:"round",join:"round"}}};return t.push(i),t},v_=e=>{const t=[],n={source:e,layer:__.BUILTUP_AREA},i={id:gn(),data:n,draw:{polygons:{color:"#CFC8C8"}}};return t.push(i),t},b_=e=>{const t=[],n={source:e,layer:__.ADMIN_AREA},i={id:gn(),data:n,draw:{polygons:{color:"#D3D2CF"}}},r={id:gn(),data:n,filter:"function() {\n const { type } = feature;\n\n const isFilter = type === 'R';\n\n return isFilter;\n }",draw:{lines:{color:"#696969",width:"1px",cap:"round",join:"round"}}},s={id:gn(),data:n,filter:"function() {\n const { type } = feature;\n\n const isFilter = type === 'D' && $zoom >= 12;\n\n return isFilter;\n }",draw:{lines:{color:"#696969",dash:[4,7],width:"1px",cap:"round",join:"round"}}};return t.push(i,r,s),t},x_={size:20,extension:"png"},w_=e=>{const t=[],n={source:e,layer:__.CAMERA},i={},r="camera";i[r]={url:wn(`msk/${r}/${r}_${x_.size}.${x_.extension}`),filtering:"mipmap",sprites:{base:[0,0,x_.size,x_.size]}};const s={id:gn(),data:n,draw:{points:{collide:!1,texture:r,size:x_.size,sprite:"base",placement:"midpoint"}},textures:i,sublayers:{}};return t.push(s),t},E_=e=>{const t=[],n={source:e,layer:__.CITY_POI},i={id:gn(),data:n,filter:"function() {\n const { capital_order8, capital_order2, capital_order1, poi_name, priority } = feature;\n\n if ($zoom >= 9 && $zoom < 13) {\n return priority < 8;\n }\n\n if ($zoom <= 11) {\n return capital_order8 === 'Y';\n }\n\n if ($zoom >= 15) {\n return capital_order2 !== 'Y';\n }\n\n return true;\n }\n ",draw:{text:{text_source:"poi_name",priority:"function () {\n const { priority } = feature;\n\n if ($zoom <= 15) {\n return priority;\n }\n\n return 1;\n }\n ",font:{fill:"black",size:"function() {\n const { capital_order8 } = feature;\n\n if (capital_order8 === 'Y') {\n return '16px';\n }\n\n return '12px';\n }",weight:"function() {\n const { capital_order2 } = feature;\n\n if (capital_order2 === 'Y') {\n return 'bold';\n }\n\n return 'normal';\n }",stroke:{color:"white",width:"2px"}}}}};return t.push(i),t};var A_;!function(e){e.traffic_signal="traffic_signal",e.pedestrian_crossing="pedestrian_crossing",e.physical="physical",e.gate="gate"}(A_||(A_={}));const T_=e=>{const t=[],n={source:e,layer:__.CONDITIONS};return Object.values(A_).forEach(e=>{const i={id:gn(),filter:`function() {\n const { type } = feature;\n\n const isType = type === '${e}';\n\n switch(type) {\n case '${A_.gate}': {\n return $zoom >= 18 && isType;\n }\n\n default: {\n return isType;\n }\n }\n }`,data:n,draw:{points:{texture:e,sprite:"base",placement:"midpoint"}}};t.push(i)}),t},S_=e=>{const t=[],n={id:gn(),data:{source:e,layer:__.FACILITY_AREA},draw:{polygons:{color:"function() {\n const { feature_type } = feature;\n\n switch (feature_type) {\n case '2000408': {\n return '#DBBAC4';\n }\n\n case '1900403': {\n return '#B6C3C7';\n }\n\n case '1907403': {\n return '#A3B9C0';\n }\n\n case '2000123': {\n return '#E4BA7D';\n }\n\n case '2000124': {\n return '#BFE6E3';\n }\n\n case '2000200': {\n return '#A0A9A8';\n }\n\n case '2000403': {\n return '#AF7136';\n }\n\n case '2000420': {\n return '#89AC76';\n }\n\n case '2000457': {\n return '#9494C0';\n }\n\n default: {\n return '#E1D4D4';\n }\n }\n }",order:"function() {\n const { feature_type } = feature;\n\n switch (feature_type) {\n case '1907403': {\n return 301;\n }\n\n default: {\n return 300;\n }\n }\n }"},lines:{color:"#857F7F",width:"2px",cap:"round",join:"round"}}},i={id:gn(),data:{source:e,layer:__.FACILITY_AREA_LABEL},draw:{text:{text_source:"name",font:{fill:"function() {\n const { feature_type } = feature;\n\n switch(feature_type) {\n case '1900403':\n case '1907403': {\n return '#256D7B';\n }\n\n case '2000420':\n case '2000460':\n case '2000123': {\n return '#00541F';\n }\n\n case '2000408': {\n return '#5E2129';\n }\n\n case '2000124': {\n return '#3E5F8A';\n }\n\n case '2000200': {\n return '#464451';\n }\n\n case '2000403': {\n return '#B03F35';\n }\n\n case '2000457': {\n return '#6A5ACD';\n }\n\n case '1700215':\n case '900159':\n case '900158': {\n return '#474A51';\n }\n\n default: {\n return black;\n }\n }\n }",size:"12px",stroke:{color:"white",width:"3px"}}}}};return t.push(n,i),t},k_=e=>{const t=[],n={id:gn(),data:{source:e,layer:__.LANDUSE_AREA},draw:{polygons:{color:"function() {\n const { feature_type } = feature;\n\n switch (feature_type) {\n case '509998': {\n return '#ECD175';\n }\n\n case '600102':\n case '900140': {\n return '#3E9A8C';\n }\n\n case '900202':\n case '900130':\n case '900150':\n case '900103': {\n return '#96BE7D';\n }\n\n case '9997010': {\n return null;\n }\n }\n }",order:"function() {\n const { feature_type } = feature;\n\n switch(feature_type) {\n case '900150':\n case '900130':\n case '509998': {\n return 300;\n }\n\n default: {\n return 299;\n }\n }\n }"}}},i={id:gn(),data:{source:e,layer:__.LANDUSE_AREA_LABEL},filter:"function() {\n return $zoom >= 15;\n }",draw:{text:{text_source:"name",font:{size:"13px",fill:"function() {\n const { feature_type } = feature;\n\n switch(feature_type) {\n case '509998': {\n return '#CD7F32';\n }\n\n default: {\n return '#00541F';\n }\n }\n }",stroke:{color:"white",width:"3px"}}}}};return t.push(n,i),t},O_=e=>{const t=[],n={source:e,layer:__.LANE_MARKING_ARROW},i={id:gn(),data:n,draw:{polygons:{color:"white"}}};return t.push(i),t},P_=["-1.0","-0.5","-0.3","0.0","0.3","0.5","0.7","1.0","1.5","2.0"],C_=[[5],[4,3],[2,1]],R_="function() {\n const { functional_class, tunnel, tollway } = feature;\n\n const alpha = tunnel ? 0.89 : 1;\n\n const getRGB = (hex, alpha) => {\n const r = +(parseInt(hex.slice(1, 3), 16) / 255).toFixed(2);\n const g = +(parseInt(hex.slice(3, 5), 16) / 255).toFixed(2);\n const b = +(parseInt(hex.slice(5, 7), 16) / 255).toFixed(2);\n\n return [r, g, b, alpha];\n }\n\n if (tollway) {\n return '#D72740';\n }\n\n switch (functional_class) {\n case 1:\n case 2: {\n const color = getRGB('#D1747F', alpha);\n\n return color;\n }\n\n case 3:\n case 4: {\n const color = getRGB('#B1A7AA', alpha);\n\n return color;\n }\n\n case 5: {\n const color = getRGB('#D5CEC3', alpha);\n\n return color;\n }\n }\n}",M_="function() {\n const { functional_class, road_number } = feature;\n\n const getScale = () => {\n if ($zoom <= 15 && $zoom >= 14) { return 7; }\n\n if ($zoom <= 13 && $zoom >= 12) { return 9; }\n\n if ($zoom <= 5) { return 400; }\n\n if ($zoom <= 7) { return 200; }\n\n if ($zoom < 12) { return 50; }\n\n return 1;\n }\n\n const scale = getScale();\n\n switch(functional_class) {\n case 1:\n case 2: {\n return 8 * scale;\n }\n\n case 3:\n case 4: {\n return 7 * scale;\n }\n\n case 5: {\n if (Boolean(road_number)) {\n return 7 * scale;\n }\n\n return 6;\n }\n }\n}",L_={text_source:"street_name",font:{fill:"black",size:"14px",stroke:{color:"white",width:"3px"}}},N_={text:{text_source:"road_number",font:{fill:"#181bff",size:"16px",weight:"bold",underline:!0,background:{color:"black"}}}},z_={text:L_,lines:{color:R_,width:M_,cap:"round",join:"round"}},D_={lines:{color:R_,width:M_,outline:{color:"function() {\n const { functional_class, access_id, tollway } = feature;\n\n if (tollway) {\n return '#B9263B';\n }\n\n switch(functional_class) {\n case 5: {\n return '#989898';\n }\n\n case 3:\n case 4: {\n return '#8F6E78';\n }\n\n case 1:\n case 2: {\n return '#9A414B';\n }\n }\n}",width:"function() {\n const { functional_class, access_id } = feature;\n\n switch(functional_class) {\n case 5: {\n switch (access_id) {\n case 32: {\n return 0;\n }\n\n default: {\n return 1;\n }\n }\n }\n\n default: {\n return 1;\n }\n }\n}"}}},I_={text:L_,lines:{color:"#BABCC2",width:10,cap:"round",join:"round"}},F_={filter:"function() {\n return global.links.getIsLowMobility(feature);\n }",draw:{lines:{width:4}}},j_={filter:"function() {\n return global.links.getIsConstruction(feature);\n }",draw:{lines:{width:3,color:"#9AA096",dash:[2,1]}}},B_={filter:"function() {\n return global.links.getIsFunctionalClass(feature);\n }",draw:{lines:{width:2,color:"#9AA096",dash:[2,1]}}},U_=e=>{const t=[],n={source:e,layer:__.LINK},i={id:gn(),data:n,draw:N_};return t.push(i),P_.forEach(i=>{const r=[],s=[];C_.forEach(t=>{const o=[],a=[];t.forEach(t=>{const r=(({source:e,zLvl:t,functionClass:n})=>e===g_.MSK?{base:{default:`function() {\n const { functional_class, z_lvl = '0.0', tollway } = feature;\n\n const isFilter = $zoom <= 16 && z_lvl === '${t}' && +functional_class === ${n} && tollway === false;\n\n return isFilter;\n }`,tollway:`function() {\n const { functional_class, z_lvl = '0.0', tollway } = feature;\n\n const isFilter = $zoom <= 16 && z_lvl === '${t}' && +functional_class === ${n} && tollway === true;\n\n return isFilter;\n }`},border:{default:`function() {\n const { functional_class, z_lvl = '0.0', tollway } = feature;\n\n const isFilter = $zoom <= 16 && tollway === false && z_lvl === '${t}' && +functional_class === ${n} && !global.links.getIsConstruction(feature) && !global.links.getIsFunctionalClass(feature);\n\n return isFilter;\n }`,tollway:`function() {\n const { functional_class, z_lvl = '0.0', tollway } = feature;\n\n const isFilter = $zoom <= 16 && tollway === true && z_lvl === '${t}' && +functional_class === ${n} && !global.links.getIsConstruction(feature) && !global.links.getIsFunctionalClass(feature);\n\n return isFilter;\n }`}}:{base:{default:`function() {\n const { functional_class, z_lvl = '0.0', tollway } = feature;\n\n const isFilter = z_lvl === '${t}' && +functional_class === ${n} && tollway === false;\n\n return isFilter;\n }`,tollway:`function() {\n const { functional_class, z_lvl = '0.0', tollway } = feature;\n\n const isFilter = z_lvl === '${t}' && +functional_class === ${n} && tollway === true;\n\n return isFilter;\n }`},border:{default:`function() {\n const { functional_class, z_lvl = '0.0', tollway } = feature;\n\n const isFilter = tollway === false && z_lvl === '${t}' && +functional_class === ${n} && !global.links.getIsConstruction(feature) && !global.links.getIsFunctionalClass(feature);\n\n return isFilter;\n }`,tollway:`function() {\n const { functional_class, z_lvl = '0.0', tollway } = feature;\n\n const isFilter = tollway === true && z_lvl === '${t}' && +functional_class === ${n} && !global.links.getIsConstruction(feature) && !global.links.getIsFunctionalClass(feature);\n\n return isFilter;\n }`}})({source:e,zLvl:i,functionClass:t}),s=(({zLvl:e,functionClass:t})=>`function() {\n const { functional_class, z_lvl = '0.0', tollway } = feature;\n\n const isFilter = $zoom > 16 && z_lvl === '${e}' && +functional_class === ${t};\n\n return isFilter;\n }`)({zLvl:i,functionClass:t}),l={id:gn(),data:n,filter:r.base.default,draw:z_,sublayers:{construction:{...j_},functionalClassAccessId32:{...B_},lowMobility:{...F_}}},u={id:gn(),data:n,filter:r.base.tollway,draw:z_,sublayers:{construction:{...j_},functionalClassAccessId32:{...B_},lowMobility:{...F_}}},c={id:gn(),data:n,filter:s,draw:I_,sublayers:{functionalClassAccessId32:{...B_}}},h={id:gn(),data:n,filter:r.border.default,draw:D_,sublayers:{lowMobility:{...F_}}},d={id:gn(),data:n,filter:r.border.tollway,draw:D_,sublayers:{lowMobility:{...F_}}};if(e===g_.MSK)o.push(c);o.push(l,u),a.push(h,d)}),r.push(...o),s.push(...a)}),t.push(...s,...r)}),t},V_=()=>{const e=[],t={source:g_.NATURE_TILE,layer:__.NATURE_FIELD},n={id:gn(),data:t,draw:{polygons:{color:"#EBEEC7"}}};return e.push(n),e},G_=()=>{const e=[],t={source:g_.NATURE_TILE,layer:__.NATURE_FOREST},n={id:gn(),data:t,draw:{polygons:{color:"function() {\n const { feature_type } = feature;\n\n switch (feature_type) {\n case '900202': {\n return '#96BE7D';\n }\n\n default : {\n return null;\n }\n }\n }"}}};return e.push(n),e},$_=e=>{const t=[],n={id:gn(),data:{source:e,layer:__.OCEAN_AREA},draw:{polygons:{color:"#7DBEE4"}}},i={id:gn(),data:{source:e,layer:__.OCEAN_AREA_LABEL},draw:{text:{text_source:"name",font:{fill:"#0A80C4",size:"18px",stroke:{color:"white",width:"3px"}}}}};return t.push(n,i),t},Z_=e=>{const t=[],n={id:gn(),data:{source:e,layer:__.ONE_WAY},draw:{points:{texture:"arrow",sprite:"base",angle:"function() {\n const { bearing } = feature;\n \n return bearing;\n }\n "}}};return t.push(n),t},q_={size:20,extension:"png"},W_=e=>{const t=[],n={source:e,layer:__.PILLAR},i={},r="pillar";i[r]={url:wn(`msk/${r}/${r}_${q_.size}.${q_.extension}`),filtering:"mipmap",sprites:{base:[0,0,q_.size,q_.size]}};const s={id:gn(),data:n,draw:{points:{collide:!1,texture:r,size:q_.size,sprite:"base",placement:"midpoint"}},textures:i,sublayers:{}};return t.push(s),t},H_='function() {\n const { poi_name, cat_id } = feature;\n\n switch (+cat_id) {\n case 4100: {\n const text = poi_name.replaceAll(/(Метро-|Станция-|МЦД-)/g, "");\n\n return text;\n }\n\n default: {\n return poi_name;\n }\n }\n}',K_=[3578,4013,4100,5400,5511,5512,5540,5541,5800,5813,5999,6e3,7011,7389,7832,7929,7990,8060,8410,9517,9530,9565,9583,9718,9992],Y_=e=>{const t={};switch(e){case 4100:t[`_${e}-metro`]={filter:`function() {\n const { poi_name, cat_id } = feature;\n\n const isMetro = poi_name.startsWith('Метро-');\n const isStation = poi_name.startsWith('Станция-');\n\n const isCatId = +cat_id === ${e};\n\n const isFilter = isCatId && (isMetro || isStation);\n\n return isFilter;\n }`,draw:{points:X_({texture:`POI_${e}(metro)`})}},t[`_${e}-diameter`]={filter:`function() {\n const { cat_id, poi_name } = feature;\n\n const isDiameter = poi_name.startsWith('МЦД-');\n\n const isCatId = +cat_id === ${e};\n\n const isFilter = isCatId && isDiameter;\n\n return isFilter;\n }`,draw:{points:X_({texture:`POI_${e}(diameter)`,size:[41,15]})}};break;case 9530:t[`_${e}-mail`]={filter:`function() {\n const { cat_id, poi_name = '' } = feature;\n\n const isCatId = +cat_id === ${e};\n\n const isMail = poi_name.startsWith('Почта');\n\n const isFilter = isCatId && isMail;\n\n return isFilter;\n }`,draw:{points:X_({texture:`POI_${e}(Mail)`})}},t[`_${e}-delivery`]={filter:`function() {\n const { cat_id, poi_name = '' } = feature;\n\n const isCatId = +cat_id === ${e};\n \n const isMail = poi_name.startsWith('Почта');\n\n const isFilter = isCatId && !isMail;\n\n return isFilter;\n }`,draw:{points:X_({texture:`POI_${e}(Delivery)`})}};break;case 9992:{const n={mosque:1,church:2,temple:3,davidStar:4,mortar:6};Object.entries(n).forEach(([n,i])=>{t[`_${e}-${n}`]={filter:`function() {\n const { cat_id, subcat_id } = feature;\n\n const isCatId = +cat_id === ${e};\n const isSubcatId = +subcat_id === ${i};\n\n const isFilter = isCatId && isSubcatId;\n\n return isFilter;\n }`,draw:{points:X_({texture:`POI_${e}(${n})`})}}});break}default:t[`_${e}`]={filter:`function() {\n const { cat_id } = feature;\n\n const isFilter = +cat_id === ${e};\n\n return isFilter;\n }`,draw:{points:X_({texture:`POI_${e}`})}}}return t},X_=({texture:e,size:t=20})=>({texture:e,size:t,sprite:"base",placement:"midpoint"}),J_=K_.reduce((e,t)=>({...e,...Y_(t)}),{}),Q_=e=>{const t=[],n={id:gn(),data:{source:e,layer:__.POI},draw:{points:{text:{text_source:H_,font:{fill:"#464544",size:"12px"}}}},sublayers:J_};return t.push(n),t},eg=e=>{const t=[],n={source:e,layer:__.POINT_ADDRESS,minzoom:15},i={id:gn(),data:n,draw:{text:{text_source:"address",font:{fill:"black",size:"12px"}}}};return t.push(i),t},tg=e=>{const t=[],n={source:e,layer:__.RAILROAD_LINK},i={id:gn(),data:n,draw:{lines:{color:"#A3A8A",width:5,dash:[1,2],dash_background_color:[0,0,0],join:"round"}}};return t.push(i),t},ng={fileName:"traffic-sign",extension:"svg",dopsCount:2,widths:{map:20,preview:40}},ig={1.1:{title:"Железнодорожный переезд со шлагбаумом",height:20,type:"Предупреждающие знаки"},1.2:{title:"Железнодорожный переезд без шлагбаума",height:20,type:"Предупреждающие знаки"},"1.3.1":{title:"Однопутная железная дорога",height:20,type:"Предупреждающие знаки"},"1.3.2":{title:"Многопутная железная дорога",height:20,type:"Предупреждающие знаки"},"1.4.1":{title:"Приближение к железнодорожному переезду",height:40,type:"Предупреждающие знаки"},"1.4.2":{title:"Приближение к железнодорожному переезду",height:40,type:"Предупреждающие знаки"},"1.4.3":{title:"Приближение к железнодорожному переезду",height:40,type:"Предупреждающие знаки"},"1.4.4":{title:"Приближение к железнодорожному переезду",height:40,type:"Предупреждающие знаки"},"1.4.5":{title:"Приближение к железнодорожному переезду",height:40,type:"Предупреждающие знаки"},"1.4.6":{title:"Приближение к железнодорожному переезду",height:40,type:"Предупреждающие знаки"},1.5:{title:"Пересечение с трамвайной линией",height:20,type:"Предупреждающие знаки"},1.6:{title:"Пересечение равнозначных дорог",height:20,type:"Предупреждающие знаки"},1.7:{title:"Пересечение с круговым движением",height:20,type:"Предупреждающие знаки"},1.8:{title:"Светофорное регулирование",height:20,type:"Предупреждающие знаки"},1.9:{title:"Разводной мост",height:20,type:"Предупреждающие знаки"},"1.10":{title:"Выезд на набережную",height:20,type:"Предупреждающие знаки"},"1.11.1":{title:"Опасный поворот (правый)",height:20,type:"Предупреждающие знаки"},"1.11.2":{title:"Опасный поворот (левый)",height:20,type:"Предупреждающие знаки"},"1.12.1":{title:"Опасные повороты",height:20,type:"Предупреждающие знаки"},"1.12.2":{title:"Опасные повороты",height:20,type:"Предупреждающие знаки"},1.13:{title:"Крутой спуск",height:20,type:"Предупреждающие знаки"},1.14:{title:"Крутой подъём",height:20,type:"Предупреждающие знаки"},1.15:{title:"Скользкая дорога",height:20,type:"Предупреждающие знаки"},1.16:{title:"Неровная дорога",height:20,type:"Предупреждающие знаки"},1.17:{title:"Искусственная неровность",height:20,type:"Предупреждающие знаки"},1.18:{title:"Выброс гравия",height:20,type:"Предупреждающие знаки"},1.19:{title:"Опасная обочина",height:20,type:"Предупреждающие знаки"},"1.20.1":{title:"Сужение дороги",height:20,type:"Предупреждающие знаки"},"1.20.2":{title:"Сужение дороги",height:20,type:"Предупреждающие знаки"},"1.20.3":{title:"Сужение дороги",height:20,type:"Предупреждающие знаки"},1.21:{title:"Двустороннее движение",height:20,type:"Предупреждающие знаки"},1.22:{title:"Пешеходный переход",height:20,type:"Предупреждающие знаки"},1.23:{title:"Дети",height:20,type:"Предупреждающие знаки"},1.24:{title:"Пересечение с велосипедной дорожкой или велопешеходной дорожкой",height:20,type:"Предупреждающие знаки"},1.25:{title:"Дорожные работы",height:20,type:"Предупреждающие знаки"},1.26:{title:"Перегон скота",height:20,type:"Предупреждающие знаки"},1.27:{title:"Дикие животные",height:20,type:"Предупреждающие знаки"},1.28:{title:"Падение камней",height:20,type:"Предупреждающие знаки"},1.29:{title:"Боковой ветер",height:20,type:"Предупреждающие знаки"},"1.30":{title:"Низколетящие самолёты",height:20,type:"Предупреждающие знаки"},1.31:{title:"Тоннель",height:20,type:"Предупреждающие знаки"},1.32:{title:"Затор",height:20,type:"Предупреждающие знаки"},1.33:{title:"Прочие опасности",height:20,type:"Предупреждающие знаки"},"1.34.1 A":{title:"Направление поворота",height:20,type:"Предупреждающие знаки"},"1.34.1 B":{title:"Направление поворота",height:20,type:"Предупреждающие знаки"},"1.34.1 C":{title:"Направление поворота",height:20,type:"Предупреждающие знаки"},"1.34.2 A":{title:"Направление поворота",height:20,type:"Предупреждающие знаки"},"1.34.2 B":{title:"Направление поворота",height:20,type:"Предупреждающие знаки"},"1.34.2 C":{title:"Направление поворота",height:20,type:"Предупреждающие знаки"},"1.34.3 A":{title:"Направление поворота",height:20,type:"Предупреждающие знаки"},"1.34.3 B":{title:"Направление поворота",height:20,type:"Предупреждающие знаки"},1.35:{title:"Участок перекрёстка",height:20,type:"Предупреждающие знаки"},2.1:{title:"Главная дорога",height:20,type:"Знаки приоритета"},2.2:{title:"Конец главной дороги",height:20,type:"Знаки приоритета"},"2.3.1":{title:"Пересечение со второстепенной дорогой",height:20,type:"Знаки приоритета"},"2.3.2":{title:"Примыкание второстепенной дороги",height:20,type:"Знаки приоритета"},"2.3.3":{title:"Примыкание второстепенной дороги",height:20,type:"Знаки приоритета"},"2.3.4":{title:"Примыкание второстепенной дороги",height:20,type:"Знаки приоритета"},"2.3.5":{title:"Примыкание второстепенной дороги",height:20,type:"Знаки приоритета"},"2.3.6":{title:"Примыкание второстепенной дороги",height:20,type:"Знаки приоритета"},"2.3.7":{title:"Примыкание второстепенной дороги",height:20,type:"Знаки приоритета"},2.4:{title:"Уступите дорогу",height:20,type:"Знаки приоритета"},2.5:{title:"Движение без остановки запрещено",height:20,type:"Знаки приоритета"},2.6:{title:"Преимущество встречного движения",height:20,type:"Знаки приоритета"},2.7:{title:"Преимущество перед встречным движением",height:20,type:"Знаки приоритета"},3.1:{title:"Въезд запрещён",height:20,type:"Запрещающие знаки"},3.2:{title:"Движение запрещено",height:20,type:"Запрещающие знаки"},3.3:{title:"Движение механических транспортных средств запрещено",height:20,type:"Запрещающие знаки"},3.4:{title:"Движение грузовых автомобилей запрещено",height:20,type:"Запрещающие знаки"},3.5:{title:"Движение мотоциклов запрещено",height:20,type:"Запрещающие знаки"},3.6:{title:"Движение тракторов запрещено",height:20,type:"Запрещающие знаки"},3.7:{title:"Движение с прицепом запрещено",height:20,type:"Запрещающие знаки"},3.8:{title:"Движение гужевых повозок запрещено",height:20,type:"Запрещающие знаки"},3.9:{title:"Движение на велосипедах запрещено",height:20,type:"Запрещающие знаки"},"3.10":{title:"Движение пешеходов запрещено",height:20,type:"Запрещающие знаки"},3.11:{title:"Ограничение массы",height:20,type:"Запрещающие знаки"},3.12:{title:"Ограничение массы, приходящейся на ось транспортного средства",height:20,type:"Запрещающие знаки"},3.13:{title:"Ограничение высоты",height:20,type:"Запрещающие знаки"},3.14:{title:"Ограничение ширины",height:20,type:"Запрещающие знаки"},3.15:{title:"Ограничение длины",height:20,type:"Запрещающие знаки"},3.16:{title:"Ограничение минимальной дистанции",height:20,type:"Запрещающие знаки"},"3.17.1":{title:"Таможня",height:20,type:"Запрещающие знаки"},"3.17.2":{title:"Опасность",height:20,type:"Запрещающие знаки"},"3.17.3":{title:"Контроль",height:20,type:"Запрещающие знаки"},"3.18.1":{title:"Поворот направо запрещён",height:20,type:"Запрещающие знаки"},"3.18.2":{title:"Поворот налево запрещён",height:20,type:"Запрещающие знаки"},3.19:{title:"Разворот запрещён",height:20,type:"Запрещающие знаки"},"3.20":{title:"Обгон запрещён",height:20,type:"Запрещающие знаки"},3.21:{title:"Конец зоны запрещения обгона",height:20,type:"Запрещающие знаки"},3.22:{title:"Обгон грузовым автомобилям запрещён",height:20,type:"Запрещающие знаки"},3.23:{title:"Конец зоны запрещения обгона грузовым автомобилям",height:20,type:"Запрещающие знаки"},"3.24-50":{title:"Ограничение максимальной скорости",height:20,type:"Запрещающие знаки"},"3.25-50":{title:"Конец зоны ограничения максимальной скорости",height:20,type:"Запрещающие знаки"},3.26:{title:"Подача звукового сигнала запрещена",height:20,type:"Запрещающие знаки"},3.27:{title:"Остановка запрещена",height:20,type:"Запрещающие знаки"},3.28:{title:"Стоянка запрещена",height:20,type:"Запрещающие знаки"},3.29:{title:"Стоянка запрещена по нечётным числам месяца.",height:20,type:"Запрещающие знаки"},"3.30":{title:"Стоянка запрещена по чётным числам месяца",height:20,type:"Запрещающие знаки"},3.31:{title:"Конец зоны всех ограничений",height:20,type:"Запрещающие знаки"},3.32:{title:"Движение транспортных средств с опасными грузами запрещено",height:20,type:"Запрещающие знаки"},3.33:{title:"Движение транспортных средств с взрывчатыми и легковоспламеняющимися грузами запрещено",height:20,type:"Запрещающие знаки"},3.34:{title:"Движение автобусов запрещено",height:20,type:"Запрещающие знаки"},3.35:{title:"Движение на средствах индивидуальной мобильности запрещено",height:20,type:"Запрещающие знаки"},"4.1.1":{title:"Движение прямо",height:20,type:"Предписывающие знаки"},"4.1.2":{title:"Движение направо",height:20,type:"Предписывающие знаки"},"4.1.3":{title:"Движение налево",height:20,type:"Предписывающие знаки"},"4.1.4":{title:"Движение прямо или направо",height:20,type:"Предписывающие знаки"},"4.1.5":{title:"Движение прямо или налево",height:20,type:"Предписывающие знаки"},"4.1.6":{title:"Движение направо или налево",height:20,type:"Предписывающие знаки"},"4.2.1":{title:"Объезд препятствия справа",height:20,type:"Предписывающие знаки"},"4.2.2":{title:"Объезд препятствия слева",height:20,type:"Предписывающие знаки"},"4.2.3":{title:"Объезд препятствия справа или слева",height:20,type:"Предписывающие знаки"},4.3:{title:"Круговое движение",height:20,type:"Предписывающие знаки"},"4.4.1":{title:"Велосипедная дорожка",height:20,type:"Предписывающие знаки"},"4.4.2":{title:"Конец велосипедной дорожки",height:20,type:"Предписывающие знаки"},"4.5.1":{title:"Пешеходная дорожка",height:20,type:"Предписывающие знаки"},"4.5.2":{title:"Пешеходная и велосипедная дорожка с совмещённым движением",height:20,type:"Предписывающие знаки"},"4.5.3":{title:"Конец пешеходной и велосипедной дорожки с совмещённым движением",height:20,type:"Предписывающие знаки"},"4.5.4":{title:"Пешеходная и велосипедная дорожка с разделением движения",height:20,type:"Предписывающие знаки"},"4.5.5":{title:"Пешеходная и велосипедная дорожка с разделением движения",height:20,type:"Предписывающие знаки"},"4.5.6":{title:"Конец пешеходной и велосипедной дорожки с разделением движения",height:20,type:"Предписывающие знаки"},"4.5.7":{title:"Конец пешеходной и велосипедной дорожки с разделением движения",height:20,type:"Предписывающие знаки"},"4.6-50":{title:"Ограничение минимальной скорости",height:20,type:"Предписывающие знаки"},"4.7-50":{title:"Конец зоны ограничения минимальной скорости",height:20,type:"Предписывающие знаки"},"4.8.1":{title:"Направление движения транспортных средств с опасными грузами",height:30,type:"Предписывающие знаки"},"4.8.2":{title:"Направление движения транспортных средств с опасными грузами",height:30,type:"Предписывающие знаки"},"4.8.3":{title:"Направление движения транспортных средств с опасными грузами",height:30,type:"Предписывающие знаки"},5.1:{title:"Автомагистраль",height:30,type:"Знаки особых предписаний"},5.2:{title:"Конец автомагистрали",height:30,type:"Знаки особых предписаний"},5.3:{title:"Дорога для автомобилей",height:30,type:"Знаки особых предписаний"},5.4:{title:"Конец дороги для автомобилей",height:30,type:"Знаки особых предписаний"},5.5:{title:"Дорога с односторонним движением",height:20,type:"Знаки особых предписаний"},5.6:{title:"Конец дороги с односторонним движением",height:20,type:"Знаки особых предписаний"},"5.7.1":{title:"Выезд на дорогу с односторонним движением",height:20,type:"Знаки особых предписаний"},"5.7.2":{title:"Выезд на дорогу с односторонним движением",height:20,type:"Знаки особых предписаний"},5.8:{title:"Реверсивное движение",height:20,type:"Знаки особых предписаний"},5.9:{title:"Конец реверсивного движения",height:20,type:"Знаки особых предписаний"},"5.10":{title:"Выезд на дорогу с реверсивным движением",height:20,type:"Знаки особых предписаний"},"5.11.1":{title:"Дорога с полосой для маршрутных транспортных средств",height:20,type:"Знаки особых предписаний"},"5.11.2":{title:"Дорога с полосой для велосипедистов",height:20,type:"Знаки особых предписаний"},"5.12.1":{title:"Конец дороги с полосой для маршрутных транспортных средств",height:20,type:"Знаки особых предписаний"},"5.12.2":{title:"Конец дороги с полосой для велосипедистов",height:20,type:"Знаки особых предписаний"},"5.13.1":{title:"Выезд на дорогу с полосой для маршрутных транспортных средств",height:20,type:"Знаки особых предписаний"},"5.13.2":{title:"Выезд на дорогу с полосой для маршрутных транспортных средств",height:20,type:"Знаки особых предписаний"},"5.13.3":{title:"Выезд на дорогу с полосой для велосипедистов",height:20,type:"Знаки особых предписаний"},"5.13.4":{title:"Выезд на дорогу с полосой для велосипедистов",height:20,type:"Знаки особых предписаний"},"5.14.1":{title:"Полоса для маршрутных транспортных средств",height:20,type:"Знаки особых предписаний"},"5.14.2":{title:"Полоса для велосипедистов",height:20,type:"Знаки особых предписаний"},"5.14.3":{title:"Конец полосы для маршрутных транспортных средств",height:20,type:"Знаки особых предписаний"},"5.14.4":{title:"Конец полосы для велосипедистов",height:20,type:"Знаки особых предписаний"},"5.15.1":{title:"Направления движения по полосам",height:20,type:"Знаки особых предписаний"},"5.15.2 A":{title:"Направления движения по полосе",height:20,type:"Знаки особых предписаний"},"5.15.2 B":{title:"Направления движения по полосе",height:20,type:"Знаки особых предписаний"},"5.15.2 C":{title:"Направления движения по полосе",height:20,type:"Знаки особых предписаний"},"5.15.2 D":{title:"Направления движения по полосе",height:20,type:"Знаки особых предписаний"},"5.15.2 E":{title:"Направления движения по полосе",height:20,type:"Знаки особых предписаний"},"5.15.2 F":{title:"Направления движения по полосе",height:20,type:"Знаки особых предписаний"},"5.15.2 G":{title:"Направления движения по полосе",height:20,type:"Знаки особых предписаний"},"5.15.2 H":{title:"Направления движения по полосе",height:20,type:"Знаки особых предписаний"},"5.15.2 I":{title:"Направления движения по полосе",height:20,type:"Знаки особых предписаний"},"5.15.2 K":{title:"Направления движения по полосе",height:20,type:"Знаки особых предписаний"},"5.15.3 A":{title:"Начало полосы",height:20,type:"Знаки особых предписаний"},"5.15.3 B":{title:"Начало полосы",height:20,type:"Знаки особых предписаний"},"5.15.3 C":{title:"Начало полосы",height:20,type:"Знаки особых предписаний"},"5.15.4 A":{title:"Начало полосы",height:20,type:"Знаки особых предписаний"},"5.15.4 B":{title:"Начало полосы",height:20,type:"Знаки особых предписаний"},"5.15.5":{title:"Конец полосы",height:20,type:"Знаки особых предписаний"},"5.15.6":{title:"Конец полосы",height:20,type:"Знаки особых предписаний"},"5.15.7 A":{title:"Направление движения по полосам",height:20,type:"Знаки особых предписаний"},"5.15.7 B":{title:"Направление движения по полосам",height:20,type:"Знаки особых предписаний"},"5.15.7 C":{title:"Направление движения по полосам",height:20,type:"Знаки особых предписаний"},"5.15.8":{title:"Число полос",height:20,type:"Знаки особых предписаний"},5.16:{title:"Место остановки автобуса и (или) троллейбуса",height:30,type:"Знаки особых предписаний"},5.17:{title:"Место остановки трамвая",height:30,type:"Знаки особых предписаний"},5.18:{title:"Место стоянки легковых такси",height:30,type:"Знаки особых предписаний"},"5.19.1":{title:"Пешеходный переход",height:20,type:"Знаки особых предписаний"},"5.19.2":{title:"Пешеходный переход",height:20,type:"Знаки особых предписаний"},"5.19.3":{title:"Диагональный пешеходный переход",height:20,type:"Знаки особых предписаний"},"5.19.4 A":{title:"Диагональный пешеходный переход",height:20,type:"Знаки особых предписаний"},"5.19.4 B":{title:"Диагональный пешеходный переход",height:20,type:"Знаки особых предписаний"},"5.20":{title:"Искусственная неровность",height:20,type:"Знаки особых предписаний"},5.21:{title:"Жилая зона",height:30,type:"Знаки особых предписаний"},5.22:{title:"Конец жилой зоны",height:30,type:"Знаки особых предписаний"},"5.23.1":{title:"Начало населённого пункта",height:20,type:"Знаки особых предписаний"},"5.23.2":{title:"Начало населённого пункта",height:20,type:"Знаки особых предписаний"},"5.24.1":{title:"Конец населённого пункта",height:20,type:"Знаки особых предписаний"},"5.24.2":{title:"Конец населённого пункта",height:20,type:"Знаки особых предписаний"},5.25:{title:"Начало населённого пункта",height:20,type:"Знаки особых предписаний"},5.26:{title:"Конец населённого пункта",height:20,type:"Знаки особых предписаний"},5.27:{title:"Зона с ограничением стоянки",height:30,type:"Знаки особых предписаний"},5.28:{title:"Конец зоны с ограничением стоянки",height:30,type:"Знаки особых предписаний"},5.29:{title:"Зона регулируемой стоянки",height:30,type:"Знаки особых предписаний"},"5.30":{title:"Конец зоны регулируемой стоянки",height:30,type:"Знаки особых предписаний"},5.31:{title:"Зона с ограничением максимальной скорости",height:30,type:"Знаки особых предписаний"},5.32:{title:"Конец зоны с ограничением максимальной скорости",height:30,type:"Знаки особых предписаний"},5.33:{title:"Пешеходная зона",height:30,type:"Знаки особых предписаний"},5.34:{title:"Конец пешеходной зоны",height:30,type:"Знаки особых предписаний"},5.35:{title:"Зона с ограничением экологического класса механических транспортных средств",height:30,type:"Знаки особых предписаний"},5.36:{title:"Конец зоны с ограничением экологического класса механических транспортных средств",height:30,type:"Знаки особых предписаний"},"5.37 A":{title:"Зона с ограничением экологического класса по видам транспортных средств",height:30,type:"Знаки особых предписаний"},"5.37 B":{title:"Зона с ограничением экологического класса по видам транспортных средств",height:30,type:"Знаки особых предписаний"},"5.38 A":{title:"Конец зоны с ограничением экологического класса по видам транспортных средств",height:30,type:"Знаки особых предписаний"},"5.38 B":{title:"Конец зоны с ограничением экологического класса по видам транспортных средств",height:30,type:"Знаки особых предписаний"},5.39:{title:"Велосипедная зона",height:30,type:"Знаки особых предписаний"},"5.40":{title:"Конец велосипедной зоны",height:30,type:"Знаки особых предписаний"},6.1:{title:"Общие ограничения максимальной скорости",height:30,type:"Информационные знаки"},"6.2-50":{title:"Рекомендуемая скорость",height:20,type:"Информационные знаки"},"6.3.1":{title:"Место для разворота",height:20,type:"Информационные знаки"},"6.3.2":{title:"Зона для разворота",height:20,type:"Информационные знаки"},"6.4 A":{title:"Парковка (парковочное место)",height:20,type:"Информационные знаки"},"6.4 B":{title:"Парковка (платные услуги)",height:20,type:"Информационные знаки"},"6.4 C":{title:"Парковка (только для инвалидов)",height:20,type:"Информационные знаки"},6.5:{title:"Полоса аварийной остановки",height:20,type:"Информационные знаки"},6.6:{title:"Подземный пешеходный переход",height:20,type:"Информационные знаки"},6.7:{title:"Надземный пешеходный переход",height:20,type:"Информационные знаки"},"6.8.1":{title:"Тупик",height:20,type:"Информационные знаки"},"6.8.2":{title:"Тупик",height:20,type:"Информационные знаки"},"6.8.3":{title:"Тупик",height:20,type:"Информационные знаки"},"6.9.1 A":{title:"Предварительный указатель направлений",height:20,type:"Информационные знаки"},"6.9.1 B":{title:"Предварительный указатель направлений",height:20,type:"Информационные знаки"},"6.9.1 C":{title:"Предварительный указатель направлений",height:20,type:"Информационные знаки"},"6.9.1 D":{title:"Предварительный указатель направлений",height:20,type:"Информационные знаки"},"6.9.1 E":{title:"Предварительный указатель направлений",height:20,type:"Информационные знаки"},"6.9.1 F":{title:"Предварительный указатель направлений",height:20,type:"Информационные знаки"},"6.9.2 A":{title:"Предварительный указатель направления",height:20,type:"Информационные знаки"},"6.9.2 B":{title:"Предварительный указатель направления",height:20,type:"Информационные знаки"},"6.9.2 C":{title:"Предварительный указатель направления",height:20,type:"Информационные знаки"},"6.9.3":{title:"Схема движения",height:20,type:"Информационные знаки"},"6.10.1 A":{title:"Указатель направлений",height:20,type:"Информационные знаки"},"6.10.1 B":{title:"Указатель направлений",height:20,type:"Информационные знаки"},"6.10.1 C":{title:"Указатель направлений",height:20,type:"Информационные знаки"},"6.10.1 D":{title:"Указатель направлений",height:20,type:"Информационные знаки"},"6.10.1 E":{title:"Указатель направлений",height:20,type:"Информационные знаки"},"6.10.1 F":{title:"Указатель направлений",height:20,type:"Информационные знаки"},"6.10.1 G":{title:"Указатель направлений",height:20,type:"Информационные знаки"},"6.10.2 A":{title:"Указатель направления",height:20,type:"Информационные знаки"},"6.10.2 B":{title:"Указатель направления",height:20,type:"Информационные знаки"},"6.11 A":{title:"Наименование объекта",height:20,type:"Информационные знаки"},"6.11 B":{title:"Наименование объекта",height:20,type:"Информационные знаки"},"6.11 C":{title:"Наименование объекта",height:20,type:"Информационные знаки"},"6.11 D":{title:"Наименование объекта",height:20,type:"Информационные знаки"},"6.12 A":{title:"Указатель расстояний",height:20,type:"Информационные знаки"},"6.12 B":{title:"Указатель расстояний",height:20,type:"Информационные знаки"},"6.12 C":{title:"Указатель расстояний",height:20,type:"Информационные знаки"},"6.13 A":{title:"Километровый знак",height:20,type:"Информационные знаки"},"6.13 B":{title:"Километровый знак",height:20,type:"Информационные знаки"},"6.13 C":{title:"Километровый знак",height:20,type:"Информационные знаки"},"6.13 D":{title:"Километровый знак",height:20,type:"Информационные знаки"},"6.13 E":{title:"Километровый знак",height:20,type:"Информационные знаки"},"6.14.1 A":{title:"Номер маршрута",height:20,type:"Информационные знаки"},"6.14.1 B":{title:"Номер маршрута",height:20,type:"Информационные знаки"},"6.14.1 C":{title:"Номер маршрута",height:20,type:"Информационные знаки"},"6.14.1 D":{title:"Номер маршрута",height:20,type:"Информационные знаки"},"6.14.2 A":{title:"Номер маршрута",height:20,type:"Информационные знаки"},"6.14.2 B":{title:"Номер маршрута",height:20,type:"Информационные знаки"},"6.14.2 C":{title:"Номер маршрута",height:20,type:"Информационные знаки"},"6.15.1":{title:"Направление движения для грузовых автомобилей",height:20,type:"Информационные знаки"},"6.15.2":{title:"Направление движения для грузовых автомобилей",height:20,type:"Информационные знаки"},"6.15.3":{title:"Направление движения для грузовых автомобилей",height:20,type:"Информационные знаки"},6.16:{title:"Стоп-линия",height:20,type:"Информационные знаки"},6.17:{title:"Схема объезда",height:25,type:"Информационные знаки"},"6.18.1":{title:"Направление объезда",height:20,type:"Информационные знаки"},"6.18.2":{title:"Направление объезда",height:20,type:"Информационные знаки"},"6.18.3":{title:"Направление объезда",height:20,type:"Информационные знаки"},"6.19.1":{title:"Предварительный указатель перестроения на другую проезжую часть",height:25,type:"Информационные знаки"},"6.19.2":{title:"Предварительный указатель перестроения на другую проезжую часть",height:25,type:"Информационные знаки"},"6.20.1":{title:"Аварийный выход",height:20,type:"Информационные знаки"},"6.20.2":{title:"Аварийный выход",height:20,type:"Информационные знаки"},"6.21.1":{title:"Направление движения к аварийному выходу",height:20,type:"Информационные знаки"},"6.21.2":{title:"Направление движения к аварийному выходу",height:20,type:"Информационные знаки"},6.22:{title:"Фотовидеофиксация",height:20,type:"Информационные знаки"},7.1:{title:"Пункт медицинской помощи",height:30,type:"Знаки сервиса"},7.2:{title:"Больница",height:30,type:"Знаки сервиса"},7.3:{title:"Автозаправочная станция",height:30,type:"Знаки сервиса"},7.4:{title:"Техническое обслуживание автомобилей",height:30,type:"Знаки сервиса"},7.5:{title:"Мойка автомобилей",height:30,type:"Знаки сервиса"},7.6:{title:"Телефон",height:30,type:"Знаки сервиса"},7.7:{title:"Пункт питания",height:30,type:"Знаки сервиса"},7.8:{title:"Питьевая вода",height:30,type:"Знаки сервиса"},7.9:{title:"Гостиница или мотель",height:30,type:"Знаки сервиса"},"7.10":{title:"Кемпинг",height:30,type:"Знаки сервиса"},7.11:{title:"Место отдыха",height:30,type:"Знаки сервиса"},7.12:{title:"Пост ДПС",height:30,type:"Знаки сервиса"},7.13:{title:"Полиция",height:30,type:"Знаки сервиса"},"7.14.1":{title:"Пункт таможенного контроля",height:30,type:"Знаки сервиса"},"7.14.2":{title:"Пункт транспортного контроля",height:30,type:"Знаки сервиса"},7.15:{title:"Зона приёма радиостанции, передающей информацию о дорожном движении",height:30,type:"Знаки сервиса"},7.16:{title:"Зона радиосвязи с аварийными службами",height:30,type:"Знаки сервиса"},7.17:{title:"Бассейн или пляж",height:30,type:"Знаки сервиса"},7.18:{title:"Туалет",height:30,type:"Знаки сервиса"},7.19:{title:"Телефон экстренной связи",height:30,type:"Знаки сервиса"},"7.20":{title:"Огнетушитель",height:30,type:"Знаки сервиса"},7.21:{title:"Автозаправочная станция с возможностью зарядки электромобилей",height:30,type:"Знаки сервиса"}},rg={"8.1.1":{title:"Расстояние до объекта",height:20,type:"Знаки дополнительной информации"},"8.1.2":{title:"Расстояние до объекта",height:20,type:"Знаки дополнительной информации"},"8.1.3":{title:"Расстояние до объекта",height:20,type:"Знаки дополнительной информации"},"8.1.4":{title:"Расстояние до объекта",height:20,type:"Знаки дополнительной информации"},"8.2.1":{title:"Зона действия",height:20,type:"Знаки дополнительной информации"},"8.2.2":{title:"Зона действия",height:40,type:"Знаки дополнительной информации"},"8.2.3":{title:"Зона действия",height:40,type:"Знаки дополнительной информации"},"8.2.4":{title:"Зона действия",height:40,type:"Знаки дополнительной информации"},"8.2.5":{title:"Зона действия",height:20,type:"Знаки дополнительной информации"},"8.2.6":{title:"Зона действия",height:20,type:"Знаки дополнительной информации"},"8.3.1":{title:"Направления действия",height:20,type:"Знаки дополнительной информации"},"8.3.2":{title:"Направления действия",height:20,type:"Знаки дополнительной информации"},"8.3.3":{title:"Направления действия",height:20,type:"Знаки дополнительной информации"},"8.4.1":{title:"Вид транспортного средства",height:20,type:"Знаки дополнительной информации"},"8.4.2":{title:"Вид транспортного средства",height:20,type:"Знаки дополнительной информации"},"8.4.3.1":{title:"Вид транспортного средства",height:20,type:"Знаки дополнительной информации"},"8.4.3.2":{title:"Вид транспортного средства",height:20,type:"Знаки дополнительной информации"},"8.4.4":{title:"Вид транспортного средства",height:20,type:"Знаки дополнительной информации"},"8.4.5":{title:"Вид транспортного средства",height:20,type:"Знаки дополнительной информации"},"8.4.6":{title:"Вид транспортного средства",height:20,type:"Знаки дополнительной информации"},"8.4.7.1":{title:"Вид транспортного средства",height:20,type:"Знаки дополнительной информации"},"8.4.7.2":{title:"Вид транспортного средства",height:20,type:"Знаки дополнительной информации"},"8.4.8":{title:"Вид транспортного средства",height:20,type:"Знаки дополнительной информации"},"8.4.9":{title:"Кроме вида транспортного средства",height:20,type:"Знаки дополнительной информации"},"8.4.10":{title:"Кроме вида транспортного средства",height:20,type:"Знаки дополнительной информации"},"8.4.11":{title:"Кроме вида транспортного средства",height:20,type:"Знаки дополнительной информации"},"8.4.12":{title:"Кроме вида транспортного средства",height:20,type:"Знаки дополнительной информации"},"8.4.13":{title:"Кроме вида транспортного средства",height:20,type:"Знаки дополнительной информации"},"8.4.14":{title:"Кроме вида транспортного средства",height:20,type:"Знаки дополнительной информации"},"8.4.15":{title:"Кроме вида транспортного средства",height:20,type:"Знаки дополнительной информации"},"8.5.1":{title:"Субботние, воскресные и праздничные дни",height:20,type:"Знаки дополнительной информации"},"8.5.2":{title:"Рабочие дни",height:20,type:"Знаки дополнительной информации"},"8.5.3":{title:"Дни недели",height:20,type:"Знаки дополнительной информации"},"8.5.4":{title:"Время действия",height:20,type:"Знаки дополнительной информации"},"8.5.5":{title:"Время действия",height:20,type:"Знаки дополнительной информации"},"8.5.6":{title:"Время действия",height:20,type:"Знаки дополнительной информации"},"8.5.7":{title:"Время действия",height:20,type:"Знаки дополнительной информации"},"8.6.1":{title:"Способ постановки транспортного средства на стоянку",height:20,type:"Знаки дополнительной информации"},"8.6.2":{title:"Способ постановки транспортного средства на стоянку",height:20,type:"Знаки дополнительной информации"},"8.6.3":{title:"Способ постановки транспортного средства на стоянку",height:20,type:"Знаки дополнительной информации"},"8.6.4":{title:"Способ постановки транспортного средства на стоянку",height:20,type:"Знаки дополнительной информации"},"8.6.5":{title:"Способ постановки транспортного средства на стоянку",height:20,type:"Знаки дополнительной информации"},"8.6.6":{title:"Способ постановки транспортного средства на стоянку",height:20,type:"Знаки дополнительной информации"},"8.6.7":{title:"Способ постановки транспортного средства на стоянку",height:20,type:"Знаки дополнительной информации"},"8.6.8":{title:"Способ постановки транспортного средства на стоянку",height:20,type:"Знаки дополнительной информации"},"8.6.9":{title:"Способ постановки транспортного средства на стоянку",height:20,type:"Знаки дополнительной информации"},8.7:{title:"Стоянка с неработающим двигателем",height:20,type:"Знаки дополнительной информации"},8.8:{title:"Платные услуги",height:20,type:"Знаки дополнительной информации"},"8.9.1":{title:"Ограничение продолжительности стоянки",height:20,type:"Знаки дополнительной информации"},"8.9.2":{title:"Стоянка только для владельцев парковочных разрешений",height:20,type:"Знаки дополнительной информации"},"8.9.3":{title:"Стоянка только транспортных средств дипломатического корпуса",height:20,type:"Знаки дополнительной информации"},"8.10":{title:"Место для осмотра автомобилей",height:20,type:"Знаки дополнительной информации"},8.11:{title:"Ограничение разрешённой максимальной массы",height:20,type:"Знаки дополнительной информации"},8.12:{title:"Опасная обочина",height:20,type:"Знаки дополнительной информации"},8.13:{title:"Направление главной дороги",height:20,type:"Знаки дополнительной информации"},"8.13 B":{title:"Направление главной дороги",height:20,type:"Знаки дополнительной информации"},8.14:{title:"Полоса движения",height:20,type:"Знаки дополнительной информации"},8.15:{title:"Слепые пешеходы",height:20,type:"Знаки дополнительной информации"},8.16:{title:"Влажное покрытие",height:20,type:"Знаки дополнительной информации"},8.17:{title:"Инвалиды",height:20,type:"Знаки дополнительной информации"},8.18:{title:"Кроме инвалидов",height:20,type:"Знаки дополнительной информации"},8.19:{title:"Класс опасного груза",height:20,type:"Знаки дополнительной информации"},"8.20.1":{title:"Тип тележки транспортного средства",height:20,type:"Знаки дополнительной информации"},"8.20.2":{title:"Тип тележки транспортного средства",height:20,type:"Знаки дополнительной информации"},"8.21.1":{title:"Вид маршрутного транспортного средства",height:20,type:"Знаки дополнительной информации"},"8.21.2":{title:"Вид маршрутного транспортного средства",height:20,type:"Знаки дополнительной информации"},"8.21.3":{title:"Вид маршрутного транспортного средства",height:20,type:"Знаки дополнительной информации"},"8.22.1":{title:"Препятствие",height:68,type:"Знаки дополнительной информации"},"8.22.2":{title:"Препятствие",height:68,type:"Знаки дополнительной информации"},"8.22.3":{title:"Препятствие",height:68,type:"Знаки дополнительной информации"},8.24:{title:"Работает эвакуатор",height:20,type:"Знаки дополнительной информации"},8.25:{title:"Экологический класс транспортного средства",height:20,type:"Знаки дополнительной информации"},8.26:{title:"Зарядка электромобилей",height:20,type:"Знаки дополнительной информации"}},sg={...ig,...rg},og=e=>{const t=[],n={source:e,layer:__.TRAFFIC_SIGN},i={},r={};Object.keys(ig).forEach(e=>{const t=`${ng.fileName}-${e}`,{height:n}=ig[e],s=ag({type:"map",number:e});i[t]={url:s,filtering:"mipmap",sprites:{base:[0,0,ng.widths.map,n]}},r[t]={filter:`function() {\n const { traffic_sign_number } = feature;\n\n const isFilter = traffic_sign_number === '${e}';\n\n return isFilter;\n }`,draw:{points:{collide:!1,texture:t,size:[ng.widths.map,n],sprite:"base",placement:"midpoint"}}}});const s={id:gn(),data:n,textures:i,sublayers:r};return t.push(s),t},ag=({type:e,number:t})=>{const n=ng.widths[e];return wn(`msk/${ng.fileName}_${n}/${t}.${ng.extension}`)},lg=e=>{const t={};e.forEach(({traffic_sign_number:e,traffic_sign_title:n,traffic_sign_type:i,height:r})=>{t[e]={title:n,height:Number(r),type:i}}),_n(t)},ug={size:20,extension:"svg"},cg=e=>{const t=[],n={source:e,layer:__.TRAFFIC_SIGNAL},i={},r="traffic_signal";i[r]={url:wn(`msk/${r}/${r}_${ug.size}.${ug.extension}`),filtering:"mipmap",sprites:{base:[0,0,ug.size,ug.size]}};const s={id:gn(),data:n,draw:{points:{collide:!1,texture:r,size:ug.size,sprite:"base",placement:"midpoint"}},textures:i,sublayers:{}};return t.push(s),t},hg=e=>{const t=[],n={id:gn(),data:{source:e,layer:__.WATER_AREA},draw:{polygons:{color:"#7DBEE4"},lines:{color:"#7DBEE4",width:20,cap:"round",join:"round"}}},i={id:gn(),data:{source:e,layer:__.WATER_AREA_LABEL},filter:"function() {\n const { display_class } = feature;\n\n if ($zoom >= 14) {\n return true;\n } else {\n return display_class <= 4;\n }\n }",draw:{text:{text_source:"name",font:{fill:"#0A80C4",size:"14px",stroke:{color:"white",width:"3px"}}}}},r={id:gn(),data:{source:e,layer:__.WATER_LAKE_LABEL},filter:"function() {\n const { display_class } = feature;\n\n if ($zoom >= 14) {\n return true;\n } else {\n return display_class <= 4;\n }\n }",draw:{text:{text_source:"name",font:{fill:"#0A80C4",size:"14px",stroke:{color:"white",width:"3px"}}}}};return t.push(n,i,r),t},dg=e=>{const t=[],n={},i={source:e,layer:__.WATER_LINK},r={id:gn(),data:i};return n.geometry={draw:{lines:{color:"#7DBEE4",width:5,cap:"round",join:"round"}}},n.text={filter:"function() {\n return $zoom >= 10;\n }",draw:{text:{text_source:"name",font:{fill:"#0A80C4",size:"14px",stroke:{color:"white",width:"3px"}}}}},r.sublayers=n,t.push(r),t},fg="white",pg=.5,mg={1.1:{color:fg,width:pg},1.2:{color:fg,width:pg},1.5:{color:fg,width:pg,dash:[4,10]},1.6:{color:fg,width:pg,dash:[5,5]},1.7:{color:fg,width:pg,dash:[4,10]},"1.7-blue":{color:"blue",width:pg,dash:[4,10]},1.8:{color:fg,width:pg},1.12:{color:fg,width:1.5},"1.14.3":{color:fg,width:pg,dash:[3,8]},"1.16.1":{color:fg,width:pg},"1.16.2":{color:fg,width:pg},"1.16.3":{color:fg,width:pg},"1.16.x":{color:fg,width:pg},"1.17.1":{color:"yellow",width:pg},1.26:{color:"yellow",width:pg}};var _g;!function(e){e.ROAD="Road",e.TUNNEL="Tunnel",e.TRAM="Tram",e.CURB="Curb",e.BRIDGE="Bridge"}(_g||(_g={}));const gg={[_g.ROAD]:"#BABCC2",[_g.TUNNEL]:"#EAEBEE",[_g.TRAM]:"#ADA8A8",[_g.CURB]:"#D2D9E6",[_g.BRIDGE]:"#E1DFDD"},yg=({id:e,data:{source:t,layer:n}})=>`${e}-${t}-${n}`,vg=({layer:e,order:t,eventHandlers:n})=>{const i=structuredClone(e),{draw:r,sublayers:s}=i,o=Boolean(n?.[e.data.layer]);if(r){const{points:e,lines:n,polygons:s,text:a,styles:l}=r;e&&(r.points={...structuredClone(e),order:t,interactive:o}),n&&(r.lines={...structuredClone(n),order:t,interactive:o}),s&&(r.polygons={...structuredClone(s),order:t,interactive:o}),a&&(r.text={...structuredClone(a),order:t,interactive:o}),l&&(r.styles=Object.entries(l).reduce((e,[n,i])=>({...e,[n]:{...structuredClone(i),order:t}}),{})),i.draw=structuredClone(r)}return s&&(Object.entries(s).forEach(([e,n])=>{if(n){const{draw:i}=n;if(i){const{points:e,lines:r,polygons:s,text:a}=i;a&&(i.text={...structuredClone(a),order:t,interactive:o}),e&&(i.points={...structuredClone(e),order:t,interactive:o}),r&&(i.lines={...structuredClone(r),order:t,interactive:o}),s&&(i.polygons={...structuredClone(s),order:t,interactive:o}),n.draw=structuredClone(i)}s[e]=structuredClone(n)}}),i.sublayers=structuredClone(s)),i},bg=e=>{const t=b_(e),n=V_(),i=G_(),r=v_(e),s=S_(e),o=k_(e),a=hg(e),l=$_(e),u=[];if(e===g_.MSK)u.push(...t,...r,...s,...o,...a,...l);else u.push(...t,...r,...s,...n,...i,...o,...a,...l);return u},xg=e=>{const t=U_(e),n=tg(e),i=dg(e),r=Z_(e),s=T_(e),o=[...i,...n,...t];if(e===g_.MSK);else o.push(...r,...s);return o},wg=e=>{const t=Q_(e),n=E_(e);return[...t,...eg(e),...n,...og(e),...cg(e),...w_(e),...W_(e)]},Eg=e=>{const t=[],n=y_(e),i=bg(e),r=xg(e),s=wg(e),o=(e=>{const t=[],n={source:e,layer:__.ROAD_POLY};return Object.values(_g).forEach(e=>{const i={id:gn(),data:n,filter:`function() {\n const { type } = feature;\n\n const isFilter = type === '${e}';\n\n return isFilter;\n }`,draw:{polygons:{color:gg[e]}}};t.push(i)}),t})(e),a=(e=>{const t=[],n={source:e,layer:__.LANE_MARKING_POLY},i={id:gn(),data:n,filter:"function() {\n const { poly_number } = feature;\n\n const isFilter = poly_number === '1.14.1';\n\n return isFilter;\n }",draw:{styles:{zebra_crossing:{attributes:{a_angle:"function() {\n return feature.angle;\n }"}}}}};return t.push(i),t})(e),l=(e=>{const t=[],n={source:e,layer:__.LANE_MARKING_LINE},i=Object.entries(mg).reduce((e,[t,n])=>{const i={filter:`function () {\n const { lane_number } = feature;\n\n const isFilter = lane_number === '${t}';\n\n return isFilter;\n }`,draw:{lines:n}};return{...e,[t]:i}},{}),r={id:gn(),data:n,sublayers:i},s={"1.3-left":{id:gn(),data:n,filter:"function() {\n const { lane_number } = feature;\n\n const isFilter = lane_number === '1.3';\n\n return isFilter;\n }",draw:{lines:{color:fg,width:pg,offset:-.5}}},"1.3-right":{id:gn(),data:n,filter:"function() {\n const { lane_number } = feature;\n\n const isFilter = lane_number === '1.3';\n\n return isFilter;\n }",draw:{lines:{color:fg,width:pg,offset:pg}}},"1.11r-left":{id:gn(),data:n,filter:"function() {\n const { lane_number } = feature;\n\n const isFilter = lane_number === '1.11r';\n\n return isFilter;\n }",draw:{lines:{color:fg,width:pg,offset:-.5}}},"1.11r-right":{id:gn(),data:n,filter:"function() {\n const { lane_number } = feature;\n\n const isFilter = lane_number === '1.11r';\n\n return isFilter;\n }",draw:{lines:{color:fg,width:pg,offset:pg,dash:[5,5]}}},"1.11l-left":{id:gn(),data:n,filter:"function() {\n const { lane_number } = feature;\n\n const isFilter = lane_number === '1.11l';\n\n return isFilter;\n }",draw:{lines:{color:fg,width:pg,offset:-.5,dash:[5,5]}}},"1.11l-right":{id:gn(),data:n,filter:"function() {\n const { lane_number } = feature;\n\n const isFilter = lane_number === '1.11l';\n\n return isFilter;\n }",draw:{lines:{color:fg,width:pg,offset:pg}}},"1.25-left":{id:gn(),data:n,filter:"function() {\n const { lane_number } = feature;\n\n const isFilter = lane_number === '1.25';\n\n return isFilter;\n }",draw:{lines:{color:fg,width:1,offset:-.5,dash:[1,1],dash_background_color:[0,0,0,0]}}},"1.25-right":{id:gn(),data:n,filter:"function() {\n const { lane_number } = feature;\n\n const isFilter = lane_number === '1.25';\n\n return isFilter;\n }",draw:{lines:{color:"rgba(0,0,0,0)",width:1,offset:.5,dash:[1,1],dash_background_color:[1,1,1]}}}};return t.push(r,...Object.values(s)),t})(e),u=O_(e),c=(e=>{const t=[],n={source:e,layer:__.PARKING_LINE},i={id:gn(),data:n,draw:{lines:{color:"white",width:1}}};return t.push(i),t})(e);if(e===g_.MSK)t.push(...i,...r,...o,...a,...u,...l,...c,...n,...s);else t.push(...i,...r,...n,...s);return t},Ag=e=>`${e.getFullYear()}-${`${e.getUTCMonth()+1}`.padStart(2,"0")}-${`${e.getUTCDate()}`.padStart(2,"0")}`,Tg=e=>{const t={[ve.CREATE]:"",[ve.UPDATE]:"",[ve.DELETE]:""};return Object.values(ve).forEach(n=>{t[n]=`${e}-${n}`}),t},Sg=256,kg={[g_.TILE]:"https://dalganmap.ru/api/tiles/get_tile/{z}/{x}/{y}.mvt",[g_.NATURE_TILE]:"https://dalganmap.ru/api/tiles/get_nature_tile/{z}/{x}/{y}.mvt",[g_.MSK]:"https://dalganmap.ru/api/tiles/get_tile/{z}/{x}/{y}.mvt"};function Og(e,t){return Object.freeze({...e,...t})}const Pg=m(null);function Cg(){const e=g(Pg);if(null==e)throw new Error("No context provided: useLeafletContext() can only be used in a descendant of <MapContainer>");return e}const Rg=function(e,t){return null==t?function(t,n){const r=i(void 0);return r.current||(r.current=e(t,n)),r}:function(n,r){const o=i(void 0);o.current||(o.current=e(n,r));const a=i(n),{instance:l}=o.current;return s(function(){a.current!==n&&(t(l,n,a.current),a.current=n)},[l,n,t]),o}}(function({children:e,...t},n){const i=new Pe.Control.Layers(void 0,void 0,t);return r=i,s=Og(n,{layersControl:i}),Object.freeze({instance:r,context:s,container:o});var r,s,o},function(e,t,n){t.collapsed!==n.collapsed&&(!0===t.collapsed?e.collapse():e.expand())});var Mg;const Lg=function(e){function i(n,i){const{instance:r,context:s}=e(n).current;y(i,()=>r);const{children:o}=n;return null==o?null:t.createElement(Pg,{value:s},o)}return n(i)}((Mg=Rg,function(e){const t=Cg(),n=Mg(e,t),{instance:r}=n.current,o=i(e.position),{position:a}=e;return s(function(){return r.addTo(t.map),function(){r.remove()}},[t.map,r]),s(function(){null!=a&&a!==o.current&&(r.setPosition(a),o.current=a)},[r,a]),n}));function Ng(e){return function(n){const o=Cg(),a=i(n),[u,c]=p(null),{layersControl:h,map:d}=o,f=r(t=>{null!=h&&(a.current.checked&&d.addLayer(t),e(h,t,a.current.name),c(t))},[e,h,d]),m=r(e=>{h?.removeLayer(e),c(null)},[h]),_=l(()=>Og(o,{layerContainer:{addLayer:f,removeLayer:m}}),[o,f,m]);return s(()=>{null!==u&&a.current!==n&&(!0!==n.checked||null!=a.current.checked&&!1!==a.current.checked?!0!==a.current.checked||null!=n.checked&&!1!==n.checked||d.removeLayer(u):d.addLayer(u),a.current=n)}),n.children?t.createElement(Pg,{value:_},n.children):null}}Lg.BaseLayer=Ng(function(e,t,n){e.addBaseLayer(t,n)}),Lg.Overlay=Ng(function(e,t,n){e.addOverlay(t,n)});var zg={global:{links:{getIsConstruction:"function (feature) {\n const { construction } = feature;\n\n return construction;\n}\n",getIsFunctionalClass:"function (feature) {\n const { functional_class, access_id } = feature;\n\n return functional_class === 5 && access_id === 32;\n}\n",getIsLowMobility:"function (feature) {\n const { functional_class, low_mobility } = feature;\n\n return functional_class === 5 && low_mobility === 1;\n}\n"}},cameras:{camera1:{type:"perspective",vanishing_point:[0,-500]}},textures:{arrow:{url:"https://dalganmap.ru/api-image/images/arrow-20.png",sprites:{base:[0,0,20,20]}},"traffic-signal":{url:"https://dalganmap.ru/api-image/images/conditions/traffic-signal.png",filtering:"mipmap",sprites:{base:[0,0,20,20]}},pedestrian_crossing:{url:"https://dalganmap.ru/api-image/images/conditions/pedestrian_crossing.png",filtering:"mipmap",sprites:{base:[0,0,20,20]}},physical:{url:"https://dalganmap.ru/api-image/images/conditions/physical.png",filtering:"mipmap",sprites:{base:[0,0,20,20]}},gate:{url:"https://dalganmap.ru/api-image/images/conditions/gate.png",filtering:"mipmap",sprites:{base:[0,0,20,20]}},POI_3578:{url:"https://dalganmap.ru/api-image/images/POI/3578.png",filtering:"mipmap",sprites:{base:[0,0,20,20]}},POI_5813:{url:"https://dalganmap.ru/api-image/images/POI/5813.png",filtering:"mipmap",sprites:{base:[0,0,20,20]}},POI_5541:{url:"https://dalganmap.ru/api-image/images/POI/5541.png",filtering:"mipmap",sprites:{base:[0,0,20,20]}},POI_5540:{url:"https://dalganmap.ru/api-image/images/POI/5540.png",filtering:"mipmap",sprites:{base:[0,0,20,20]}},"POI_9530(Mail)":{url:"https://dalganmap.ru/api-image/images/POI/mail.png",filtering:"mipmap",sprites:{base:[0,0,20,20]}},"POI_9530(Delivery)":{url:"https://dalganmap.ru/api-image/images/POI/delivery.png",filtering:"mipmap",sprites:{base:[0,0,20,20]}},POI_5400:{url:"https://dalganmap.ru/api-image/images/POI/5400.png",filtering:"mipmap",sprites:{base:[0,0,20,20]}},POI_6000:{url:"https://dalganmap.ru/api-image/images/POI/6000.png",filtering:"mipmap",sprites:{base:[0,0,20,20]}},POI_9565:{url:"https://dalganmap.ru/api-image/images/POI/9565.png",filtering:"mipmap",sprites:{base:[0,0,20,20]}},POI_9583:{url:"https://dalganmap.ru/api-image/images/POI/9583.png",filtering:"mipmap",sprites:{base:[0,0,20,20]}},POI_8060:{url:"https://dalganmap.ru/api-image/images/POI/8060.png",filtering:"mipmap",sprites:{base:[0,0,20,20]}},POI_5511:{url:"https://dalganmap.ru/api-image/images/POI/5511.png",filtering:"mipmap",sprites:{base:[0,0,20,20]}},POI_5512:{url:"https://dalganmap.ru/api-image/images/POI/5512.png",filtering:"mipmap",sprites:{base:[0,0,20,20]}},POI_5800:{url:"https://dalganmap.ru/api-image/images/POI/5800.png",filtering:"mipmap",sprites:{base:[0,0,20,20]}},POI_5999:{url:"https://dalganmap.ru/api-image/images/POI/5999.png",filtering:"mipmap",sprites:{base:[0,0,20,20]}},POI_7011:{url:"https://dalganmap.ru/api-image/images/POI/7011.png",filtering:"mipmap",sprites:{base:[0,0,20,20]}},POI_7389:{url:"https://dalganmap.ru/api-image/images/POI/7389.png",filtering:"mipmap",sprites:{base:[0,0,20,20]}},POI_7832:{url:"https://dalganmap.ru/api-image/images/POI/7832.png",filtering:"mipmap",sprites:{base:[0,0,20,20]}},POI_7929:{url:"https://dalganmap.ru/api-image/images/POI/7929.png",filtering:"mipmap",sprites:{base:[0,0,20,20]}},POI_7990:{url:"https://dalganmap.ru/api-image/images/POI/7990.png",filtering:"mipmap",sprites:{base:[0,0,20,20]}},POI_7999:{url:"https://dalganmap.ru/api-image/images/POI/7999.png",filtering:"mipmap",sprites:{base:[0,0,20,20]}},POI_8410:{url:"https://dalganmap.ru/api-image/images/POI/8410.png",filtering:"mipmap",sprites:{base:[0,0,20,20]}},POI_9517:{url:"https://dalganmap.ru/api-image/images/POI/9517.png",filtering:"mipmap",sprites:{base:[0,0,20,20]}},POI_9718:{url:"https://dalganmap.ru/api-image/images/POI/9718.png",filtering:"mipmap",sprites:{base:[0,0,20,20]}},"POI_9992(mosque)":{url:"https://dalganmap.ru/api-image/images/POI/9992_mosque.png",filtering:"mipmap",sprites:{base:[0,0,20,20]}},"POI_9992(church)":{url:"https://dalganmap.ru/api-image/images/POI/9992_church.png",filtering:"mipmap",sprites:{base:[0,0,20,20]}},"POI_9992(temple)":{url:"https://dalganmap.ru/api-image/images/POI/9992_temple.png",filtering:"mipmap",sprites:{base:[0,0,20,20]}},"POI_9992(davidStar)":{url:"https://dalganmap.ru/api-image/images/POI/9992_davidStar.png",filtering:"mipmap",sprites:{base:[0,0,20,20]}},"POI_9992(mortar)":{url:"https://dalganmap.ru/api-image/images/POI/9992_mortar.png",filtering:"mipmap",sprites:{base:[0,0,20,20]}},"POI_4100(metro)":{url:"https://dalganmap.ru/api-image/images/POI/4100_metro.png",filtering:"mipmap",sprites:{base:[0,0,20,20]}},"POI_4100(diameter)":{url:"https://dalganmap.ru/api-image/images/POI/4100_diameter.png",filtering:"mipmap",sprites:{base:[0,0,41,15]}},POI_4013:{url:"https://dalganmap.ru/api-image/images/POI/4013.png",filtering:"mipmap",sprites:{base:[0,0,20,20]}}},layers:null,styles:{buildings:{base:"polygons",shaders:{blocks:{color:"color.rgb;\n"}}}},lights:{light1:{type:"directional",direction:[.1,.5,-1],diffuse:.7,ambient:.5}},sources:null};class Dg{props;constructor(e){this.props=e,this._initLayer()}_initLayer(){if(ua.instance.isValidApiKey){const e=this._createLayer();if(e){const{scene:t}=e;t.subscribe({load:({config:e})=>{this.config=e,this.isReady=!0,this._init()}}),this.layer=e,this.props.onCreate?.({layer:e}),this._addHandlers(e)}}}_createLayer(){if(window.Tangram){return window.Tangram.leafletLayer({scene:zg})}}_addHandlers(e){e.addEventListener("load",({sourceTarget:t})=>{this.props.onLoad?.({layer:e});const n=t._map;e.setSelectionEvents({click:({feature:e,leaflet_event:t})=>{if(e){const{source_layer:n,properties:i}=e;this.props.eventHandlers?.[n]?.click?.({leaflet_event:t,properties:i})}},hover:({feature:e,leaflet_event:t})=>{const i=n.getContainer();if(e){const{source_layer:n,properties:r}=e;i.style.cursor="pointer",this.props.eventHandlers?.[n]?.hover?.({leaflet_event:t,properties:r})}else i.style.cursor="default"}})},this),e.addEventListener("add",()=>{this.props.onAdd?.({layer:e})},this),e.addEventListener("remove",()=>{this.props.onRemove?.({layer:e})},this)}destroy(){this.layer&&(this.props.onDestroy?.({layer:this.layer}),this.layer.clearAllEventListeners(),this.layer.remove()),this.layer=null}_init(){this.addStyle({name:"zebra_crossing",style:{base:"polygons",lighting:!1,shaders:{attributes:{a_angle:{type:"float",default:0}},uniforms:{u_stripe_width:1},blocks:{filter:"\n vec3 pos = worldPosition().xyz;\n\n float ang = radians(a_angle);\n\n vec2 dir = vec2(sin(ang), cos(ang));\n\n float positionAlongLine = dot(pos.xy, dir);\n\n float stripe = step(1.0, mod(positionAlongLine / u_stripe_width, 2.0));\n\n color.rgb = mix(vec3(1.0, 1.0, 1.0), vec3(1.0, 0.8, 0.0), stripe);\n \n color.a = 1.0;\n "}}}});(this.props.defaultLayers??[]).forEach(e=>{this.addLayer(e)}),Object.values(g_).forEach(e=>{this.addSource(e)})}_layer=null;get layer(){return this._layer}set layer(e){this._layer=e}_config=null;get config(){return this._config}set config(e){this._config=e}_isReady=!1;get isReady(){return this._isReady}set isReady(e){this._isReady=e}get scene(){if(null===this.layer)return null;const{scene:e}=this.layer;return e}addStyle({name:e,style:t}){this.config&&this.scene&&(this.config.styles[e]=structuredClone(t),this.scene.updateConfig({rebuild:!0}))}addSource(e){if(this.config&&this.scene){const t=kg[e];this.config.sources[e]={tile_size:256,url:t,type:"MVT"},this.scene.updateConfig({rebuild:!0})}}deleteSource(e){this.config&&this.scene&&(delete this.config.sources[e],this.scene.updateConfig({rebuild:!0}))}getSource(e){let t=null;return this.config&&(t=structuredClone(this.config.sources[e])),t}updateSource(e,t){this.config&&this.scene&&(this.config.sources[e].url=t,this.scene.updateConfig({rebuild:!0}))}reloadSource(e){this.deleteSource(e),this.addSource(e)}addLayer(e){if(this.config&&this.scene){const t=this.getLayers().length+1,n=vg({layer:e,order:t,eventHandlers:this.props.eventHandlers}),i=yg(n),{sublayers:r,draw:s,textures:o}=n;if(s){const{styles:e={}}=s;e&&(n.draw={...structuredClone(n.draw),...structuredClone(e)})}this.config.layers[i]={...structuredClone(n),...structuredClone(r)},this.config.textures={...structuredClone(this.config.textures),...structuredClone(o)},this.scene.updateConfig({rebuild:!0})}}deleteLayers(){if(this.config){const{layers:e}=this.config;Object.values(e).forEach(e=>{this.deleteLayer(e)})}}deleteLayer(e){const t=yg(e);this.config&&this.scene&&(delete this.config.layers[t],this.scene.updateConfig({rebuild:!0}))}getLayers(){const e=[];return this.config&&e.push(...Object.keys(this.config.layers)),e}getLayerVisibility(e){let t=!0;const n=yg(e);if(this.config){const{visible:e=!0}=this.config.layers[n];t=e}return t}toggleLayerVisibility({layer:e,visible:t}){const n=yg(e);this.config&&this.scene&&(this.config.layers[n].visible=t,this.scene.updateConfig({rebuild:!0}))}}const Ig=({layers:t})=>{const n=e.useRef(null),i=Cg().map;return e.useEffect(()=>{const{current:e}=n,r=Pe.tileLayer("http://{s}.google.com/vt/lyrs=s&x={x}&y={y}&z={z}",{minZoom:2,maxZoom:25,maxNativeZoom:19,subdomains:["mt0","mt1","mt2","mt3"]});e&&e.addBaseLayer(r,"Google Satellite"),new Dg({defaultLayers:t,onCreate:({layer:t})=>{e&&(e.addBaseLayer(t,"Dartcom"),t.addTo(i))},onDestroy:({layer:t})=>{e&&(e.removeLayer(t),i.removeLayer(t))}})},[]),w(Lg,{ref:n,position:"bottomleft"})},Fg={position:"absolute",top:"50%",left:"50%",transform:"translate(-50%, -50%)",bgcolor:"background.paper",border:"2px solid #000",boxShadow:24,p:4,maxHeight:"90vh",overflowX:"auto",overflowY:"auto"};var jg=Ul(({name:t,children:n,onClose:i,onOpen:r})=>{const s=e.useId(),o=ia.getIsOpen(t);return e.useEffect(()=>{o?r?.({name:t}):i?.({name:t})},[o]),w(pe,{open:o,onClose:()=>{ia.close(t)},"aria-labelledby":`modal-${s}-title`,"aria-describedby":`modal-${s}-description`,children:w(fe,{sx:({breakpoints:e})=>({...Fg,[e.up("sm")]:{minWidth:400},[e.down("sm")]:{minWidth:"80vw"}}),children:n})})});function Bg({name:t,items:n,label:i,sx:r,getLabel:s,getValue:o,getKey:a}){const{watch:l,resetField:u,setValue:c}=qh(),h=l(t),d=e.useId(),f=n.find(e=>o(e)===h)??null;return w(Y,{value:f,options:n,id:d,getOptionLabel:e=>s(e),getOptionKey:e=>a(e),sx:{minWidth:150,...r},size:"small",onChange:(e,n)=>{n?c(t,o(n)):u(t)},renderInput:e=>w(Dd,{...e,label:i})})}const Ug=({items:t,initialValue:n,onChange:i})=>{const[r,s]=e.useState(()=>n??t[0].value),o=e.useId();return e.useEffect(()=>{n&&s(n)},[n]),E(me,{value:r,children:[w(P,{sx:{borderBottom:1,borderColor:"divider"},children:w(_e,{"aria-label":`tabs-${o}`,onChange:(e,t)=>{s(t),i?.(t)},children:t.map(({label:e,value:t})=>w(X,{label:e,value:t,sx:{textTransform:"none"}},`${o}-tab-${t}`))})}),t.map(({content:e,value:t})=>w(ge,{value:t,children:e},`${o}-tab-panel-${t}`))]})};var Vg,Gg={exports:{}};
|
|
24
24
|
/* @license
|
|
25
25
|
Papa Parse
|
|
26
26
|
v5.5.3
|