ry-vue-map 2.0.0 → 2.0.1

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.
@@ -1 +1 @@
1
- (function(t,e){"object"===typeof exports&&"object"===typeof module?module.exports=e(require("ry-mapts")):"function"===typeof define&&define.amd?define(["ry-mapts"],e):"object"===typeof exports?exports["ryui"]=e(require("ry-mapts")):t["ryui"]=e(t["ry-mapts"])})("undefined"!==typeof self?self:this,(function(t){return function(t){var e={};function i(n){if(e[n])return e[n].exports;var s=e[n]={i:n,l:!1,exports:{}};return t[n].call(s.exports,s,s.exports,i),s.l=!0,s.exports}return i.m=t,i.c=e,i.d=function(t,e,n){i.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},i.r=function(t){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},i.t=function(t,e){if(1&e&&(t=i(t)),8&e)return t;if(4&e&&"object"===typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(i.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var s in t)i.d(n,s,function(e){return t[e]}.bind(null,s));return n},i.n=function(t){var e=t&&t.__esModule?function(){return t["default"]}:function(){return t};return i.d(e,"a",e),e},i.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},i.p="",i(i.s="fb15")}({"00ee":function(t,e,i){var n=i("b622"),s=n("toStringTag"),r={};r[s]="z",t.exports="[object z]"===String(r)},"0366":function(t,e,i){var n=i("1c0b");t.exports=function(t,e,i){if(n(t),void 0===e)return t;switch(i){case 0:return function(){return t.call(e)};case 1:return function(i){return t.call(e,i)};case 2:return function(i,n){return t.call(e,i,n)};case 3:return function(i,n,s){return t.call(e,i,n,s)}}return function(){return t.apply(e,arguments)}}},"0643":function(t,e,i){"use strict";var n=i("23e7"),s=i("da84"),r=i("19aa"),o=i("9112"),a=i("d039"),l=i("5135"),h=i("b622"),c=i("ae93").IteratorPrototype,u=i("c430"),d=h("iterator"),p=h("toStringTag"),g=s.Iterator,f=u||"function"!=typeof g||g.prototype!==c||!a((function(){g({})})),m=function(){r(this,m)};u&&(c={},o(c,d,(function(){return this}))),l(c,p)||o(c,p,"Iterator"),!f&&l(c,"constructor")&&c.constructor!==Object||o(c,"constructor",m),m.prototype=c,n({global:!0,forced:f},{Iterator:m})},"06cf":function(t,e,i){var n=i("83ab"),s=i("d1e7"),r=i("5c6c"),o=i("fc6a"),a=i("c04e"),l=i("5135"),h=i("0cfb"),c=Object.getOwnPropertyDescriptor;e.f=n?c:function(t,e){if(t=o(t),e=a(e,!0),h)try{return c(t,e)}catch(i){}if(l(t,e))return r(!s.f.call(t,e),t[e])}},"0cfb":function(t,e,i){var n=i("83ab"),s=i("d039"),r=i("cc12");t.exports=!n&&!s((function(){return 7!=Object.defineProperty(r("div"),"a",{get:function(){return 7}}).a}))},"13d5":function(t,e,i){"use strict";var n=i("23e7"),s=i("d58f").left,r=i("a640"),o=i("2d00"),a=i("605d"),l=r("reduce"),h=!a&&o>79&&o<83;n({target:"Array",proto:!0,forced:!l||h},{reduce:function(t){return s(this,t,arguments.length,arguments.length>1?arguments[1]:void 0)}})},"19aa":function(t,e){t.exports=function(t,e,i){if(!(t instanceof e))throw TypeError("Incorrect "+(i?i+" ":"")+"invocation");return t}},"1be4":function(t,e,i){var n=i("d066");t.exports=n("document","documentElement")},"1c0b":function(t,e){t.exports=function(t){if("function"!=typeof t)throw TypeError(String(t)+" is not a function");return t}},"1d80":function(t,e){t.exports=function(t){if(void 0==t)throw TypeError("Can't call method on "+t);return t}},"1fa7":function(t,e,i){},"1fe2":function(t,e,i){"use strict";i("802e")},2266:function(t,e,i){var n=i("825a"),s=i("e95a"),r=i("50c4"),o=i("0366"),a=i("35a1"),l=i("2a62"),h=function(t,e){this.stopped=t,this.result=e};t.exports=function(t,e,i){var c,u,d,p,g,f,m,y=i&&i.that,_=!(!i||!i.AS_ENTRIES),v=!(!i||!i.IS_ITERATOR),w=!(!i||!i.INTERRUPTED),x=o(e,y,1+_+w),b=function(t){return c&&l(c),new h(!0,t)},M=function(t){return _?(n(t),w?x(t[0],t[1],b):x(t[0],t[1])):w?x(t,b):x(t)};if(v)c=t;else{if(u=a(t),"function"!=typeof u)throw TypeError("Target is not iterable");if(s(u)){for(d=0,p=r(t.length);p>d;d++)if(g=M(t[d]),g&&g instanceof h)return g;return new h(!1)}c=u.call(t)}f=c.next;while(!(m=f.call(c)).done){try{g=M(m.value)}catch(E){throw l(c),E}if("object"==typeof g&&g&&g instanceof h)return g}return new h(!1)}},2382:function(t,e,i){"use strict";var n=i("23e7"),s=i("1c0b"),r=i("825a"),o=i("c5cc"),a=i("9bdd"),l=o((function(t){var e,i,n,s=this.iterator,o=this.filterer,l=this.next;while(1){if(e=r(l.call(s,t)),i=this.done=!!e.done,i)return;if(n=e.value,a(s,o,n))return n}}));n({target:"Iterator",proto:!0,real:!0},{filter:function(t){return new l({iterator:r(this),filterer:s(t)})}})},"23cb":function(t,e,i){var n=i("a691"),s=Math.max,r=Math.min;t.exports=function(t,e){var i=n(t);return i<0?s(i+e,0):r(i,e)}},"23e7":function(t,e,i){var n=i("da84"),s=i("06cf").f,r=i("9112"),o=i("6eeb"),a=i("ce4e"),l=i("e893"),h=i("94ca");t.exports=function(t,e){var i,c,u,d,p,g,f=t.target,m=t.global,y=t.stat;if(c=m?n:y?n[f]||a(f,{}):(n[f]||{}).prototype,c)for(u in e){if(p=e[u],t.noTargetGet?(g=s(c,u),d=g&&g.value):d=c[u],i=h(m?u:f+(y?".":"#")+u,t.forced),!i&&void 0!==d){if(typeof p===typeof d)continue;l(p,d)}(t.sham||d&&d.sham)&&r(p,"sham",!0),o(c,u,p,t)}}},"241c":function(t,e,i){var n=i("ca84"),s=i("7839"),r=s.concat("length","prototype");e.f=Object.getOwnPropertyNames||function(t){return n(t,r)}},"2a62":function(t,e,i){var n=i("825a");t.exports=function(t){var e=t["return"];if(void 0!==e)return n(e.call(t)).value}},"2d00":function(t,e,i){var n,s,r=i("da84"),o=i("342f"),a=r.process,l=a&&a.versions,h=l&&l.v8;h?(n=h.split("."),s=n[0]<4?1:n[0]+n[1]):o&&(n=o.match(/Edge\/(\d+)/),(!n||n[1]>=74)&&(n=o.match(/Chrome\/(\d+)/),n&&(s=n[1]))),t.exports=s&&+s},"342f":function(t,e,i){var n=i("d066");t.exports=n("navigator","userAgent")||""},"35a1":function(t,e,i){var n=i("f5df"),s=i("3f8c"),r=i("b622"),o=r("iterator");t.exports=function(t){if(void 0!=t)return t[o]||t["@@iterator"]||s[n(t)]}},"37e8":function(t,e,i){var n=i("83ab"),s=i("9bf2"),r=i("825a"),o=i("df75");t.exports=n?Object.defineProperties:function(t,e){r(t);var i,n=o(e),a=n.length,l=0;while(a>l)s.f(t,i=n[l++],e[i]);return t}},"3e8f":function(t,e){},"3f75":function(t,e,i){"use strict";i("8a61")},"3f8c":function(t,e){t.exports={}},"428f":function(t,e,i){var n=i("da84");t.exports=n},"44ad":function(t,e,i){var n=i("d039"),s=i("c6b6"),r="".split;t.exports=n((function(){return!Object("z").propertyIsEnumerable(0)}))?function(t){return"String"==s(t)?r.call(t,""):Object(t)}:Object},"44d2":function(t,e,i){var n=i("b622"),s=i("7c73"),r=i("9bf2"),o=n("unscopables"),a=Array.prototype;void 0==a[o]&&r.f(a,o,{configurable:!0,value:s(null)}),t.exports=function(t){a[o][t]=!0}},4930:function(t,e,i){var n=i("2d00"),s=i("d039");t.exports=!!Object.getOwnPropertySymbols&&!s((function(){var t=Symbol();return!String(t)||!(Object(t)instanceof Symbol)||!Symbol.sham&&n&&n<41}))},"4d64":function(t,e,i){var n=i("fc6a"),s=i("50c4"),r=i("23cb"),o=function(t){return function(e,i,o){var a,l=n(e),h=s(l.length),c=r(o,h);if(t&&i!=i){while(h>c)if(a=l[c++],a!=a)return!0}else for(;h>c;c++)if((t||c in l)&&l[c]===i)return t||c||0;return!t&&-1}};t.exports={includes:o(!0),indexOf:o(!1)}},"4e3e":function(t,e,i){"use strict";var n=i("23e7"),s=i("2266"),r=i("825a");n({target:"Iterator",proto:!0,real:!0},{forEach:function(t){s(r(this),t,{IS_ITERATOR:!0})}})},"4ea7":function(t,e,i){"use strict";i("de76")},"50c4":function(t,e,i){var n=i("a691"),s=Math.min;t.exports=function(t){return t>0?s(n(t),9007199254740991):0}},5135:function(t,e,i){var n=i("7b0b"),s={}.hasOwnProperty;t.exports=Object.hasOwn||function(t,e){return s.call(n(t),e)}},"55be":function(t,e,i){"use strict";i("1fa7")},5692:function(t,e,i){var n=i("c430"),s=i("c6cd");(t.exports=function(t,e){return s[t]||(s[t]=void 0!==e?e:{})})("versions",[]).push({version:"3.15.2",mode:n?"pure":"global",copyright:"© 2021 Denis Pushkarev (zloirock.ru)"})},"56ef":function(t,e,i){var n=i("d066"),s=i("241c"),r=i("7418"),o=i("825a");t.exports=n("Reflect","ownKeys")||function(t){var e=s.f(o(t)),i=r.f;return i?e.concat(i(t)):e}},"5bc0":function(t,e,i){},"5c6c":function(t,e){t.exports=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}}},"5cff":function(t,e,i){},"605d":function(t,e,i){var n=i("c6b6"),s=i("da84");t.exports="process"==n(s.process)},"69f3":function(t,e,i){var n,s,r,o=i("7f9a"),a=i("da84"),l=i("861d"),h=i("9112"),c=i("5135"),u=i("c6cd"),d=i("f772"),p=i("d012"),g="Object already initialized",f=a.WeakMap,m=function(t){return r(t)?s(t):n(t,{})},y=function(t){return function(e){var i;if(!l(e)||(i=s(e)).type!==t)throw TypeError("Incompatible receiver, "+t+" required");return i}};if(o||u.state){var _=u.state||(u.state=new f),v=_.get,w=_.has,x=_.set;n=function(t,e){if(w.call(_,t))throw new TypeError(g);return e.facade=t,x.call(_,t,e),e},s=function(t){return v.call(_,t)||{}},r=function(t){return w.call(_,t)}}else{var b=d("state");p[b]=!0,n=function(t,e){if(c(t,b))throw new TypeError(g);return e.facade=t,h(t,b,e),e},s=function(t){return c(t,b)?t[b]:{}},r=function(t){return c(t,b)}}t.exports={set:n,get:s,has:r,enforce:m,getterFor:y}},"6eeb":function(t,e,i){var n=i("da84"),s=i("9112"),r=i("5135"),o=i("ce4e"),a=i("8925"),l=i("69f3"),h=l.get,c=l.enforce,u=String(String).split("String");(t.exports=function(t,e,i,a){var l,h=!!a&&!!a.unsafe,d=!!a&&!!a.enumerable,p=!!a&&!!a.noTargetGet;"function"==typeof i&&("string"!=typeof e||r(i,"name")||s(i,"name",e),l=c(i),l.source||(l.source=u.join("string"==typeof e?e:""))),t!==n?(h?!p&&t[e]&&(d=!0):delete t[e],d?t[e]=i:s(t,e,i)):d?t[e]=i:o(e,i)})(Function.prototype,"toString",(function(){return"function"==typeof this&&h(this).source||a(this)}))},7418:function(t,e){e.f=Object.getOwnPropertySymbols},"76d6":function(t,e,i){"use strict";var n=i("23e7"),s=i("2266"),r=i("1c0b"),o=i("825a");n({target:"Iterator",proto:!0,real:!0},{every:function(t){return o(this),r(t),!s(this,(function(e,i){if(!t(e))return i()}),{IS_ITERATOR:!0,INTERRUPTED:!0}).stopped}})},7839:function(t,e){t.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},"7b0b":function(t,e,i){var n=i("1d80");t.exports=function(t){return Object(n(t))}},"7c73":function(t,e,i){var n,s=i("825a"),r=i("37e8"),o=i("7839"),a=i("d012"),l=i("1be4"),h=i("cc12"),c=i("f772"),u=">",d="<",p="prototype",g="script",f=c("IE_PROTO"),m=function(){},y=function(t){return d+g+u+t+d+"/"+g+u},_=function(t){t.write(y("")),t.close();var e=t.parentWindow.Object;return t=null,e},v=function(){var t,e=h("iframe"),i="java"+g+":";return e.style.display="none",l.appendChild(e),e.src=String(i),t=e.contentWindow.document,t.open(),t.write(y("document.F=Object")),t.close(),t.F},w=function(){try{n=document.domain&&new ActiveXObject("htmlfile")}catch(e){}w=n?_(n):v();var t=o.length;while(t--)delete w[p][o[t]];return w()};a[f]=!0,t.exports=Object.create||function(t,e){var i;return null!==t?(m[p]=s(t),i=new m,m[p]=null,i[f]=t):i=w(),void 0===e?i:r(i,e)}},"7f9a":function(t,e,i){var n=i("da84"),s=i("8925"),r=n.WeakMap;t.exports="function"===typeof r&&/native code/.test(s(r))},"802e":function(t,e,i){},"825a":function(t,e,i){var n=i("861d");t.exports=function(t){if(!n(t))throw TypeError(String(t)+" is not an object");return t}},"83ab":function(t,e,i){var n=i("d039");t.exports=!n((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]}))},"861d":function(t,e){t.exports=function(t){return"object"===typeof t?null!==t:"function"===typeof t}},8915:function(t,e,i){},8925:function(t,e,i){var n=i("c6cd"),s=Function.toString;"function"!=typeof n.inspectSource&&(n.inspectSource=function(t){return s.call(t)}),t.exports=n.inspectSource},"8a61":function(t,e,i){},"90e3":function(t,e){var i=0,n=Math.random();t.exports=function(t){return"Symbol("+String(void 0===t?"":t)+")_"+(++i+n).toString(36)}},9112:function(t,e,i){var n=i("83ab"),s=i("9bf2"),r=i("5c6c");t.exports=n?function(t,e,i){return s.f(t,e,r(1,i))}:function(t,e,i){return t[e]=i,t}},"94ca":function(t,e,i){var n=i("d039"),s=/#|\.prototype\./,r=function(t,e){var i=a[o(t)];return i==h||i!=l&&("function"==typeof e?n(e):!!e)},o=r.normalize=function(t){return String(t).replace(s,".").toLowerCase()},a=r.data={},l=r.NATIVE="N",h=r.POLYFILL="P";t.exports=r},"96f4":function(e,i){e.exports=t},"9a9a":function(t,e,i){"use strict";var n=i("23e7"),s=i("2266"),r=i("1c0b"),o=i("825a");n({target:"Iterator",proto:!0,real:!0},{some:function(t){return o(this),r(t),s(this,(function(e,i){if(t(e))return i()}),{IS_ITERATOR:!0,INTERRUPTED:!0}).stopped}})},"9bdd":function(t,e,i){var n=i("825a"),s=i("2a62");t.exports=function(t,e,i,r){try{return r?e(n(i)[0],i[1]):e(i)}catch(o){throw s(t),o}}},"9bf2":function(t,e,i){var n=i("83ab"),s=i("0cfb"),r=i("825a"),o=i("c04e"),a=Object.defineProperty;e.f=n?a:function(t,e,i){if(r(t),e=o(e,!0),r(i),s)try{return a(t,e,i)}catch(n){}if("get"in i||"set"in i)throw TypeError("Accessors not supported");return"value"in i&&(t[e]=i.value),t}},"9d4a":function(t,e,i){"use strict";var n=i("23e7"),s=i("2266"),r=i("1c0b"),o=i("825a");n({target:"Iterator",proto:!0,real:!0},{reduce:function(t){o(this),r(t);var e=arguments.length<2,i=e?void 0:arguments[1];if(s(this,(function(n){e?(e=!1,i=n):i=t(i,n)}),{IS_ITERATOR:!0}),e)throw TypeError("Reduce of empty iterator with no initial value");return i}})},"9e82":function(t,e,i){!function(e,i){t.exports=i()}(0,(function(){"use strict";function t(n,s,r=0,o=n.length-1,a=i){for(;o>r;){if(o-r>600){const e=o-r+1,i=s-r+1,l=Math.log(e),h=.5*Math.exp(2*l/3),c=.5*Math.sqrt(l*h*(e-h)/e)*(i-e/2<0?-1:1);t(n,s,Math.max(r,Math.floor(s-i*h/e+c)),Math.min(o,Math.floor(s+(e-i)*h/e+c)),a)}const i=n[s];let l=r,h=o;for(e(n,r,s),a(n[o],i)>0&&e(n,r,o);l<h;){for(e(n,l,h),l++,h--;a(n[l],i)<0;)l++;for(;a(n[h],i)>0;)h--}0===a(n[r],i)?e(n,r,h):(h++,e(n,h,o)),h<=s&&(r=h+1),s<=h&&(o=h-1)}}function e(t,e,i){const n=t[e];t[e]=t[i],t[i]=n}function i(t,e){return t<e?-1:t>e?1:0}function n(t,e,i){if(!i)return e.indexOf(t);for(let n=0;n<e.length;n++)if(i(t,e[n]))return n;return-1}function s(t,e){r(t,0,t.children.length,e,t)}function r(t,e,i,n,s){s||(s=g(null)),s.minX=1/0,s.minY=1/0,s.maxX=-1/0,s.maxY=-1/0;for(let r=e;r<i;r++){const e=t.children[r];o(s,t.leaf?n(e):e)}return s}function o(t,e){return t.minX=Math.min(t.minX,e.minX),t.minY=Math.min(t.minY,e.minY),t.maxX=Math.max(t.maxX,e.maxX),t.maxY=Math.max(t.maxY,e.maxY),t}function a(t,e){return t.minX-e.minX}function l(t,e){return t.minY-e.minY}function h(t){return(t.maxX-t.minX)*(t.maxY-t.minY)}function c(t){return t.maxX-t.minX+(t.maxY-t.minY)}function u(t,e){const i=Math.max(t.minX,e.minX),n=Math.max(t.minY,e.minY),s=Math.min(t.maxX,e.maxX),r=Math.min(t.maxY,e.maxY);return Math.max(0,s-i)*Math.max(0,r-n)}function d(t,e){return t.minX<=e.minX&&t.minY<=e.minY&&e.maxX<=t.maxX&&e.maxY<=t.maxY}function p(t,e){return e.minX<=t.maxX&&e.minY<=t.maxY&&e.maxX>=t.minX&&e.maxY>=t.minY}function g(t){return{children:t,height:1,leaf:!0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}}function f(e,i,n,s,r){const o=[i,n];for(;o.length;){if((n=o.pop())-(i=o.pop())<=s)continue;const a=i+Math.ceil((n-i)/s/2)*s;t(e,a,i,n,r),o.push(i,a,a,n)}}return class{constructor(t=9){this._maxEntries=Math.max(4,t),this._minEntries=Math.max(2,Math.ceil(.4*this._maxEntries)),this.clear()}all(){return this._all(this.data,[])}search(t){let e=this.data;const i=[];if(!p(t,e))return i;const n=this.toBBox,s=[];for(;e;){for(let r=0;r<e.children.length;r++){const o=e.children[r],a=e.leaf?n(o):o;p(t,a)&&(e.leaf?i.push(o):d(t,a)?this._all(o,i):s.push(o))}e=s.pop()}return i}collides(t){let e=this.data;if(!p(t,e))return!1;const i=[];for(;e;){for(let n=0;n<e.children.length;n++){const s=e.children[n],r=e.leaf?this.toBBox(s):s;if(p(t,r)){if(e.leaf||d(t,r))return!0;i.push(s)}}e=i.pop()}return!1}load(t){if(!t||!t.length)return this;if(t.length<this._minEntries){for(let e=0;e<t.length;e++)this.insert(t[e]);return this}let e=this._build(t.slice(),0,t.length-1,0);if(this.data.children.length)if(this.data.height===e.height)this._splitRoot(this.data,e);else{if(this.data.height<e.height){const t=this.data;this.data=e,e=t}this._insert(e,this.data.height-e.height-1,!0)}else this.data=e;return this}insert(t){return t&&this._insert(t,this.data.height-1),this}clear(){return this.data=g([]),this}remove(t,e){if(!t)return this;let i=this.data;const s=this.toBBox(t),r=[],o=[];let a,l,h;for(;i||r.length;){if(i||(i=r.pop(),l=r[r.length-1],a=o.pop(),h=!0),i.leaf){const s=n(t,i.children,e);if(-1!==s)return i.children.splice(s,1),r.push(i),this._condense(r),this}h||i.leaf||!d(i,s)?l?(a++,i=l.children[a],h=!1):i=null:(r.push(i),o.push(a),a=0,l=i,i=i.children[0])}return this}toBBox(t){return t}compareMinX(t,e){return t.minX-e.minX}compareMinY(t,e){return t.minY-e.minY}toJSON(){return this.data}fromJSON(t){return this.data=t,this}_all(t,e){const i=[];for(;t;)t.leaf?e.push(...t.children):i.push(...t.children),t=i.pop();return e}_build(t,e,i,n){const r=i-e+1;let o,a=this._maxEntries;if(r<=a)return o=g(t.slice(e,i+1)),s(o,this.toBBox),o;n||(n=Math.ceil(Math.log(r)/Math.log(a)),a=Math.ceil(r/Math.pow(a,n-1))),o=g([]),o.leaf=!1,o.height=n;const l=Math.ceil(r/a),h=l*Math.ceil(Math.sqrt(a));f(t,e,i,h,this.compareMinX);for(let s=e;s<=i;s+=h){const e=Math.min(s+h-1,i);f(t,s,e,l,this.compareMinY);for(let i=s;i<=e;i+=l){const s=Math.min(i+l-1,e);o.children.push(this._build(t,i,s,n-1))}}return s(o,this.toBBox),o}_chooseSubtree(t,e,i,n){for(;n.push(e),!e.leaf&&n.length-1!==i;){let i,n=1/0,o=1/0;for(let a=0;a<e.children.length;a++){const l=e.children[a],c=h(l),u=(s=t,r=l,(Math.max(r.maxX,s.maxX)-Math.min(r.minX,s.minX))*(Math.max(r.maxY,s.maxY)-Math.min(r.minY,s.minY))-c);u<o?(o=u,n=c<n?c:n,i=l):u===o&&c<n&&(n=c,i=l)}e=i||e.children[0]}var s,r;return e}_insert(t,e,i){const n=i?t:this.toBBox(t),s=[],r=this._chooseSubtree(n,this.data,e,s);for(r.children.push(t),o(r,n);e>=0&&s[e].children.length>this._maxEntries;)this._split(s,e),e--;this._adjustParentBBoxes(n,s,e)}_split(t,e){const i=t[e],n=i.children.length,r=this._minEntries;this._chooseSplitAxis(i,r,n);const o=this._chooseSplitIndex(i,r,n),a=g(i.children.splice(o,i.children.length-o));a.height=i.height,a.leaf=i.leaf,s(i,this.toBBox),s(a,this.toBBox),e?t[e-1].children.push(a):this._splitRoot(i,a)}_splitRoot(t,e){this.data=g([t,e]),this.data.height=t.height+1,this.data.leaf=!1,s(this.data,this.toBBox)}_chooseSplitIndex(t,e,i){let n,s=1/0,o=1/0;for(let a=e;a<=i-e;a++){const e=r(t,0,a,this.toBBox),l=r(t,a,i,this.toBBox),c=u(e,l),d=h(e)+h(l);c<s?(s=c,n=a,o=d<o?d:o):c===s&&d<o&&(o=d,n=a)}return n||i-e}_chooseSplitAxis(t,e,i){const n=t.leaf?this.compareMinX:a,s=t.leaf?this.compareMinY:l;this._allDistMargin(t,e,i,n)<this._allDistMargin(t,e,i,s)&&t.children.sort(n)}_allDistMargin(t,e,i,n){t.children.sort(n);const s=this.toBBox,a=r(t,0,e,s),l=r(t,i-e,i,s);let h=c(a)+c(l);for(let r=e;r<i-e;r++){const e=t.children[r];o(a,t.leaf?s(e):e),h+=c(a)}for(let r=i-e-1;r>=e;r--){const e=t.children[r];o(l,t.leaf?s(e):e),h+=c(l)}return h}_adjustParentBBoxes(t,e,i){for(let n=i;n>=0;n--)o(e[n],t)}_condense(t){for(let e,i=t.length-1;i>=0;i--)0===t[i].children.length?i>0?(e=t[i-1].children,e.splice(e.indexOf(t[i]),1)):this.clear():s(t[i],this.toBBox)}}}))},a573:function(t,e,i){"use strict";var n=i("23e7"),s=i("1c0b"),r=i("825a"),o=i("c5cc"),a=i("9bdd"),l=o((function(t){var e=this.iterator,i=r(this.next.call(e,t)),n=this.done=!!i.done;if(!n)return a(e,this.mapper,i.value)}));n({target:"Iterator",proto:!0,real:!0},{map:function(t){return new l({iterator:r(this),mapper:s(t)})}})},a640:function(t,e,i){"use strict";var n=i("d039");t.exports=function(t,e){var i=[][t];return!!i&&n((function(){i.call(null,e||function(){throw 1},1)}))}},a691:function(t,e){var i=Math.ceil,n=Math.floor;t.exports=function(t){return isNaN(t=+t)?0:(t>0?n:i)(t)}},ae93:function(t,e,i){"use strict";var n,s,r,o=i("d039"),a=i("e163"),l=i("9112"),h=i("5135"),c=i("b622"),u=i("c430"),d=c("iterator"),p=!1,g=function(){return this};[].keys&&(r=[].keys(),"next"in r?(s=a(a(r)),s!==Object.prototype&&(n=s)):p=!0);var f=void 0==n||o((function(){var t={};return n[d].call(t)!==t}));f&&(n={}),u&&!f||h(n,d)||l(n,d,g),t.exports={IteratorPrototype:n,BUGGY_SAFARI_ITERATORS:p}},b622:function(t,e,i){var n=i("da84"),s=i("5692"),r=i("5135"),o=i("90e3"),a=i("4930"),l=i("fdbf"),h=s("wks"),c=n.Symbol,u=l?c:c&&c.withoutSetter||o;t.exports=function(t){return r(h,t)&&(a||"string"==typeof h[t])||(a&&r(c,t)?h[t]=c[t]:h[t]=u("Symbol."+t)),h[t]}},b776:function(t,e,i){},bf6e:function(t,e,i){"use strict";i("8915")},c04e:function(t,e,i){var n=i("861d");t.exports=function(t,e){if(!n(t))return t;var i,s;if(e&&"function"==typeof(i=t.toString)&&!n(s=i.call(t)))return s;if("function"==typeof(i=t.valueOf)&&!n(s=i.call(t)))return s;if(!e&&"function"==typeof(i=t.toString)&&!n(s=i.call(t)))return s;throw TypeError("Can't convert object to primitive value")}},c126:function(t,e,i){"use strict";i("5cff")},c369:function(t,e,i){"use strict";i("b776")},c430:function(t,e){t.exports=!1},c5cc:function(t,e,i){"use strict";var n=i("428f"),s=i("1c0b"),r=i("825a"),o=i("7c73"),a=i("9112"),l=i("e2cc"),h=i("b622"),c=i("69f3"),u=c.set,d=c.get,p=h("toStringTag"),g=function(t){var e=d(this).iterator,i=e["return"];return void 0===i?{done:!0,value:t}:r(i.call(e,t))},f=function(t){var e=d(this).iterator,i=e["throw"];if(void 0===i)throw t;return i.call(e,t)};t.exports=function(t,e){var i=function(t){t.next=s(t.iterator.next),t.done=!1,u(this,t)};return i.prototype=l(o(n.Iterator.prototype),{next:function(){var e=d(this),i=e.done?void 0:t.apply(e,arguments);return{done:e.done,value:i}},return:g,throw:f}),e||a(i.prototype,p,"Generator"),i}},c6b6:function(t,e){var i={}.toString;t.exports=function(t){return i.call(t).slice(8,-1)}},c6cd:function(t,e,i){var n=i("da84"),s=i("ce4e"),r="__core-js_shared__",o=n[r]||s(r,{});t.exports=o},c8ba:function(t,e){var i;i=function(){return this}();try{i=i||new Function("return this")()}catch(n){"object"===typeof window&&(i=window)}t.exports=i},ca84:function(t,e,i){var n=i("5135"),s=i("fc6a"),r=i("4d64").indexOf,o=i("d012");t.exports=function(t,e){var i,a=s(t),l=0,h=[];for(i in a)!n(o,i)&&n(a,i)&&h.push(i);while(e.length>l)n(a,i=e[l++])&&(~r(h,i)||h.push(i));return h}},caad:function(t,e,i){"use strict";var n=i("23e7"),s=i("4d64").includes,r=i("44d2");n({target:"Array",proto:!0},{includes:function(t){return s(this,t,arguments.length>1?arguments[1]:void 0)}}),r("includes")},cc12:function(t,e,i){var n=i("da84"),s=i("861d"),r=n.document,o=s(r)&&s(r.createElement);t.exports=function(t){return o?r.createElement(t):{}}},cd1a:function(t,e,i){"use strict";var n=i("23e7"),s=i("1c0b"),r=i("825a"),o=i("35a1"),a=i("c5cc"),l=i("2a62"),h=a((function(t){var e,i,n,a,h=this.iterator,c=this.mapper;while(1)try{if(a=this.innerIterator){if(e=r(this.innerNext.call(a)),!e.done)return e.value;this.innerIterator=this.innerNext=null}if(e=r(this.next.call(h,t)),this.done=!!e.done)return;if(i=c(e.value),n=o(i),void 0===n)throw TypeError(".flatMap callback should return an iterable object");this.innerIterator=a=r(n.call(i)),this.innerNext=s(a.next)}catch(u){throw l(h),u}}));n({target:"Iterator",proto:!0,real:!0},{flatMap:function(t){return new h({iterator:r(this),mapper:s(t),innerIterator:null,innerNext:null})}})},ce4e:function(t,e,i){var n=i("da84"),s=i("9112");t.exports=function(t,e){try{s(n,t,e)}catch(i){n[t]=e}return e}},d012:function(t,e){t.exports={}},d039:function(t,e){t.exports=function(t){try{return!!t()}catch(e){return!0}}},d066:function(t,e,i){var n=i("428f"),s=i("da84"),r=function(t){return"function"==typeof t?t:void 0};t.exports=function(t,e){return arguments.length<2?r(n[t])||r(s[t]):n[t]&&n[t][e]||s[t]&&s[t][e]}},d1e7:function(t,e,i){"use strict";var n={}.propertyIsEnumerable,s=Object.getOwnPropertyDescriptor,r=s&&!n.call({1:2},1);e.f=r?function(t){var e=s(this,t);return!!e&&e.enumerable}:n},d58f:function(t,e,i){var n=i("1c0b"),s=i("7b0b"),r=i("44ad"),o=i("50c4"),a=function(t){return function(e,i,a,l){n(i);var h=s(e),c=r(h),u=o(h.length),d=t?u-1:0,p=t?-1:1;if(a<2)while(1){if(d in c){l=c[d],d+=p;break}if(d+=p,t?d<0:u<=d)throw TypeError("Reduce of empty array with no initial value")}for(;t?d>=0:u>d;d+=p)d in c&&(l=i(l,c[d],d,h));return l}};t.exports={left:a(!1),right:a(!0)}},da84:function(t,e,i){(function(e){var i=function(t){return t&&t.Math==Math&&t};t.exports=i("object"==typeof globalThis&&globalThis)||i("object"==typeof window&&window)||i("object"==typeof self&&self)||i("object"==typeof e&&e)||function(){return this}()||Function("return this")()}).call(this,i("c8ba"))},daf2:function(t,e,i){var n=i("23e7"),s=i("5135");n({target:"Object",stat:!0},{hasOwn:s})},de76:function(t,e,i){},df75:function(t,e,i){var n=i("ca84"),s=i("7839");t.exports=Object.keys||function(t){return n(t,s)}},e163:function(t,e,i){var n=i("5135"),s=i("7b0b"),r=i("f772"),o=i("e177"),a=r("IE_PROTO"),l=Object.prototype;t.exports=o?Object.getPrototypeOf:function(t){return t=s(t),n(t,a)?t[a]:"function"==typeof t.constructor&&t instanceof t.constructor?t.constructor.prototype:t instanceof Object?l:null}},e177:function(t,e,i){var n=i("d039");t.exports=!n((function(){function t(){}return t.prototype.constructor=null,Object.getPrototypeOf(new t)!==t.prototype}))},e2cc:function(t,e,i){var n=i("6eeb");t.exports=function(t,e,i){for(var s in e)n(t,s,e[s],i);return t}},e893:function(t,e,i){var n=i("5135"),s=i("56ef"),r=i("06cf"),o=i("9bf2");t.exports=function(t,e){for(var i=s(e),a=o.f,l=r.f,h=0;h<i.length;h++){var c=i[h];n(t,c)||a(t,c,l(e,c))}}},e95a:function(t,e,i){var n=i("b622"),s=i("3f8c"),r=n("iterator"),o=Array.prototype;t.exports=function(t){return void 0!==t&&(s.Array===t||o[r]===t)}},e9c4:function(t,e,i){var n=i("23e7"),s=i("d066"),r=i("d039"),o=s("JSON","stringify"),a=/[\uD800-\uDFFF]/g,l=/^[\uD800-\uDBFF]$/,h=/^[\uDC00-\uDFFF]$/,c=function(t,e,i){var n=i.charAt(e-1),s=i.charAt(e+1);return l.test(t)&&!h.test(s)||h.test(t)&&!l.test(n)?"\\u"+t.charCodeAt(0).toString(16):t},u=r((function(){return'"\\udf06\\ud834"'!==o("\udf06\ud834")||'"\\udead"'!==o("\udead")}));o&&n({target:"JSON",stat:!0,forced:u},{stringify:function(t,e,i){var n=o.apply(null,arguments);return"string"==typeof n?n.replace(a,c):n}})},f5df:function(t,e,i){var n=i("00ee"),s=i("c6b6"),r=i("b622"),o=r("toStringTag"),a="Arguments"==s(function(){return arguments}()),l=function(t,e){try{return t[e]}catch(i){}};t.exports=n?s:function(t){var e,i,n;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(i=l(e=Object(t),o))?i:a?s(e):"Object"==(n=s(e))&&"function"==typeof e.callee?"Arguments":n}},f772:function(t,e,i){var n=i("5692"),s=i("90e3"),r=n("keys");t.exports=function(t){return r[t]||(r[t]=s(t))}},fb15:function(t,e,i){"use strict";if(i.r(e),"undefined"!==typeof window){var n=window.document.currentScript,s=n&&n.src.match(/(.+\/)[^/]+\.js(\?.*)?$/);s&&(i.p=s[1])}i("0643"),i("a573");var r=function(){var t=this,e=t._self._c;return e("div",{staticClass:"map-box"},[e("div",{directives:[{name:"lmap",rawName:"v-lmap:loadMap",arg:"loadMap"}],staticClass:"map-style"}),t.lMap.map&&t.isRyMapTool?e("RyMapTool",{staticClass:"ry-mapts-tool",class:{left:!t.isRight,right:t.isRight},attrs:{lMap:t.lMap,isShowRangingTool:t.isShowRangingTool,initModifyPolygon:t.initModifyPolygon,isShowDrawTool:t.isShowDrawTool,isRight:t.isRight,isCrossHair:t.isCrossHair,hideAdd:t.hideAdd,hidePoint:t.hidePoint,hideCancel:t.hideCancel,hideDelete:t.hideDelete,hideSave:t.hideSave,hideLine:t.hideLine,hideArea:t.hideArea,isSwitchMap:t.isSwitchMap,isSwitchMapRight:t.isSwitchMapRight,gpsType:t.lastMapType},on:{crossHairClick:function(e){return t.crossHairClick(e)},loadDrawPolygonEvent:function(e){return t.loadDrawPolygonEvent(e)},success:function(e){return t.drawSuccess(e)},drawPolygonEvent:function(e){return t.drawPolygonEvent(e)},drawLineEvent:function(e){return t.drawLineEvent(e)},error:function(e){return t.drawError(e)}}},[[t._t("maptool")]],2):t._e(),t.map?[t._t("polygon",null,{mapDto:{map:t.map,lMap:t.lMap}}),t._t("marker",null,{mapDto:{map:t.map,lMap:t.lMap}})]:t._e(),t.isSwitchMapTool&&t.isShowSwitchMap?e("SwitchMap",{staticClass:"move-box",style:{top:t.switchMapPosTop+"px",right:t.isSwitchMapRight?t.switchMapPosLeftOrRight+"px":"none",left:t.isSwitchMapRight?"none":t.switchMapPosLeftOrRight+"px"},attrs:{height:t.switchMapHeight,switchMapDefaultTypeOrLayer:t.switchMapDefaultTypeOrLayer,mapTypeAndLayer:t.mapTypeAndLayer,"bottom-right":t.isSwitchMapRight,isDisabled:t.isDisabledSwitchMapTabEvent},on:{changeSwitchMap:t.changeSwitchMap}}):t._e()],2)},o=[],a=(i("e9c4"),i("4e3e"),i("5bc0"),{ADD:"add",REMOVE:"remove"}),l={PROPERTYCHANGE:"propertychange"},h={CHANGE:"change",ERROR:"error",BLUR:"blur",CLEAR:"clear",CONTEXTMENU:"contextmenu",CLICK:"click",DBLCLICK:"dblclick",DRAGENTER:"dragenter",DRAGOVER:"dragover",DROP:"drop",FOCUS:"focus",KEYDOWN:"keydown",KEYPRESS:"keypress",LOAD:"load",RESIZE:"resize",TOUCHMOVE:"touchmove",WHEEL:"wheel"};i("caad");class c{constructor(){this.disposed=!1}dispose(){this.disposed||(this.disposed=!0,this.disposeInternal())}disposeInternal(){}}var u=c;i("76d6");function d(t,e){return t>e?1:t<e?-1:0}function p(t,e,i){if(t[0]<=e)return 0;const n=t.length;if(e<=t[n-1])return n-1;if("function"===typeof i){for(let s=1;s<n;++s){const n=t[s];if(n===e)return s;if(n<e)return i(e,t[s-1],n)>0?s-1:s}return n-1}if(i>0){for(let i=1;i<n;++i)if(t[i]<e)return i-1;return n-1}if(i<0){for(let i=1;i<n;++i)if(t[i]<=e)return i;return n-1}for(let s=1;s<n;++s){if(t[s]==e)return s;if(t[s]<e)return t[s-1]-e<e-t[s]?s-1:s}return n-1}function g(t,e){const i=Array.isArray(e)?e:[e],n=i.length;for(let s=0;s<n;s++)t[t.length]=i[s]}function f(t,e){const i=t.length;if(i!==e.length)return!1;for(let n=0;n<i;n++)if(t[n]!==e[n])return!1;return!0}function m(){return!0}function y(){return!1}function _(){}function v(t){let e,i,n;return function(){const s=Array.prototype.slice.call(arguments);return i&&this===n&&f(s,i)||(n=this,i=s,e=t.apply(this,arguments)),e}}function w(t){function e(){let e;try{e=t()}catch(i){return Promise.reject(i)}return e instanceof Promise?e:Promise.resolve(e)}return e()}function x(t){for(const e in t)delete t[e]}function b(t){let e;for(e in t)return!1;return!e}class M{constructor(t){this.propagationStopped,this.defaultPrevented,this.type=t,this.target=null}preventDefault(){this.defaultPrevented=!0}stopPropagation(){this.propagationStopped=!0}}var E=M;class C extends u{constructor(t){super(),this.eventTarget_=t,this.pendingRemovals_=null,this.dispatching_=null,this.listeners_=null}addEventListener(t,e){if(!t||!e)return;const i=this.listeners_||(this.listeners_={}),n=i[t]||(i[t]=[]);n.includes(e)||n.push(e)}dispatchEvent(t){const e="string"===typeof t,i=e?t:t.type,n=this.listeners_&&this.listeners_[i];if(!n)return;const s=e?new E(t):t;s.target||(s.target=this.eventTarget_||this);const r=this.dispatching_||(this.dispatching_={}),o=this.pendingRemovals_||(this.pendingRemovals_={});let a;i in r||(r[i]=0,o[i]=0),++r[i];for(let l=0,h=n.length;l<h;++l)if(a="handleEvent"in n[l]?n[l].handleEvent(s):n[l].call(this,s),!1===a||s.propagationStopped){a=!1;break}if(0===--r[i]){let t=o[i];delete o[i];while(t--)this.removeEventListener(i,_);delete r[i]}return a}disposeInternal(){this.listeners_&&x(this.listeners_)}getListeners(t){return this.listeners_&&this.listeners_[t]||void 0}hasListener(t){return!!this.listeners_&&(t?t in this.listeners_:Object.keys(this.listeners_).length>0)}removeEventListener(t,e){if(!this.listeners_)return;const i=this.listeners_[t];if(!i)return;const n=i.indexOf(e);-1!==n&&(this.pendingRemovals_&&t in this.pendingRemovals_?(i[n]=_,++this.pendingRemovals_[t]):(i.splice(n,1),0===i.length&&delete this.listeners_[t]))}}var P=C;function A(t,e,i,n,s){if(s){const s=i;i=function(r){return t.removeEventListener(e,i),s.call(null!==n&&void 0!==n?n:this,r)}}else n&&n!==t&&(i=i.bind(n));const r={target:t,type:e,listener:i};return t.addEventListener(e,i),r}function S(t,e,i,n){return A(t,e,i,n,!0)}function T(t){t&&t.target&&(t.target.removeEventListener(t.type,t.listener),x(t))}class R extends P{constructor(){super(),this.on=this.onInternal,this.once=this.onceInternal,this.un=this.unInternal,this.revision_=0}changed(){++this.revision_,this.dispatchEvent(h.CHANGE)}getRevision(){return this.revision_}onInternal(t,e){if(Array.isArray(t)){const i=t.length,n=new Array(i);for(let s=0;s<i;++s)n[s]=A(this,t[s],e);return n}return A(this,t,e)}onceInternal(t,e){let i;if(Array.isArray(t)){const n=t.length;i=new Array(n);for(let s=0;s<n;++s)i[s]=S(this,t[s],e)}else i=S(this,t,e);return e.ol_key=i,i}unInternal(t,e){const i=e.ol_key;if(i)I(i);else if(Array.isArray(t))for(let n=0,s=t.length;n<s;++n)this.removeEventListener(t[n],e);else this.removeEventListener(t,e)}}function I(t){if(Array.isArray(t))for(let e=0,i=t.length;e<i;++e)T(t[e]);else T(t)}R.prototype.on,R.prototype.once,R.prototype.un;var L=R;function O(){throw new Error("Unimplemented abstract method.")}let k=0;function D(t){return t.ol_uid||(t.ol_uid=String(++k))}class N extends E{constructor(t,e,i){super(t),this.key=e,this.oldValue=i}}class G extends L{constructor(t){super(),this.on,this.once,this.un,D(this),this.values_=null,void 0!==t&&this.setProperties(t)}get(t){let e;return this.values_&&this.values_.hasOwnProperty(t)&&(e=this.values_[t]),e}getKeys(){return this.values_&&Object.keys(this.values_)||[]}getProperties(){return this.values_&&Object.assign({},this.values_)||{}}getPropertiesInternal(){return this.values_}hasProperties(){return!!this.values_}notify(t,e){let i;i="change:"+t,this.hasListener(i)&&this.dispatchEvent(new N(i,t,e)),i=l.PROPERTYCHANGE,this.hasListener(i)&&this.dispatchEvent(new N(i,t,e))}addChangeListener(t,e){this.addEventListener("change:"+t,e)}removeChangeListener(t,e){this.removeEventListener("change:"+t,e)}set(t,e,i){const n=this.values_||(this.values_={});if(i)n[t]=e;else{const i=n[t];n[t]=e,i!==e&&this.notify(t,i)}}setProperties(t,e){for(const i in t)this.set(i,t[i],e)}applyProperties(t){t.values_&&Object.assign(this.values_||(this.values_={}),t.values_)}unset(t,e){if(this.values_&&t in this.values_){const i=this.values_[t];delete this.values_[t],b(this.values_)&&(this.values_=null),e||this.notify(t,i)}}}var j=G;const F={LENGTH:"length"};class B extends E{constructor(t,e,i){super(t),this.element=e,this.index=i}}class z extends j{constructor(t,e){if(super(),this.on,this.once,this.un,e=e||{},this.unique_=!!e.unique,this.array_=null!==t&&void 0!==t?t:[],this.unique_)for(let i=1,n=this.array_.length;i<n;++i)this.assertUnique_(this.array_[i],i);this.updateLength_()}clear(){while(this.getLength()>0)this.pop()}extend(t){for(let e=0,i=t.length;e<i;++e)this.push(t[e]);return this}forEach(t){const e=this.array_;for(let i=0,n=e.length;i<n;++i)t(e[i],i,e)}getArray(){return this.array_}item(t){return this.array_[t]}getLength(){return this.get(F.LENGTH)}insertAt(t,e){if(t<0||t>this.getLength())throw new Error("Index out of bounds: "+t);this.unique_&&this.assertUnique_(e),this.array_.splice(t,0,e),this.updateLength_(),this.dispatchEvent(new B(a.ADD,e,t))}pop(){return this.removeAt(this.getLength()-1)}push(t){const e=this.getLength();return this.insertAt(e,t),this.getLength()}remove(t){const e=this.array_;for(let i=0,n=e.length;i<n;++i)if(e[i]===t)return this.removeAt(i)}removeAt(t){if(t<0||t>=this.getLength())return;const e=this.array_[t];return this.array_.splice(t,1),this.updateLength_(),this.dispatchEvent(new B(a.REMOVE,e,t)),e}setAt(t,e){const i=this.getLength();if(t>=i)return void this.insertAt(t,e);if(t<0)throw new Error("Index out of bounds: "+t);this.unique_&&this.assertUnique_(e,t);const n=this.array_[t];this.array_[t]=e,this.dispatchEvent(new B(a.REMOVE,n,t)),this.dispatchEvent(new B(a.ADD,e,t))}updateLength_(){this.set(F.LENGTH,this.array_.length)}assertUnique_(t,e){const i=this.array_;for(let n=0,s=i.length;n<s;++n)if(i[n]===t&&n!==e)throw new Error("Duplicate item added to a unique collection")}}var V=z;class Z extends E{constructor(t,e,i){super(t),this.map=e,this.frameState=void 0!==i?i:null}}var H=Z;class X extends H{constructor(t,e,i,n,s,r){super(t,e,s),this.originalEvent=i,this.pixel_=null,this.coordinate_=null,this.dragging=void 0!==n&&n,this.activePointers=r}get pixel(){return this.pixel_||(this.pixel_=this.map.getEventPixel(this.originalEvent)),this.pixel_}set pixel(t){this.pixel_=t}get coordinate(){return this.coordinate_||(this.coordinate_=this.map.getCoordinateFromPixel(this.pixel)),this.coordinate_}set coordinate(t){this.coordinate_=t}preventDefault(){super.preventDefault(),"preventDefault"in this.originalEvent&&this.originalEvent.preventDefault()}stopPropagation(){super.stopPropagation(),"stopPropagation"in this.originalEvent&&this.originalEvent.stopPropagation()}}var K=X,W={SINGLECLICK:"singleclick",CLICK:h.CLICK,DBLCLICK:h.DBLCLICK,POINTERDRAG:"pointerdrag",POINTERMOVE:"pointermove",POINTERDOWN:"pointerdown",POINTERUP:"pointerup",POINTEROVER:"pointerover",POINTEROUT:"pointerout",POINTERENTER:"pointerenter",POINTERLEAVE:"pointerleave",POINTERCANCEL:"pointercancel"};const Y="undefined"!==typeof navigator&&"undefined"!==typeof navigator.userAgent?navigator.userAgent.toLowerCase():"",U=Y.includes("safari")&&!Y.includes("chrom"),J=(U&&(Y.includes("version/15.4")||/cpu (os|iphone os) 15_4 like mac os x/.test(Y)),Y.includes("webkit")&&!Y.includes("edge")),$=Y.includes("macintosh"),q="undefined"!==typeof devicePixelRatio?devicePixelRatio:1,Q="undefined"!==typeof WorkerGlobalScope&&"undefined"!==typeof OffscreenCanvas&&self instanceof WorkerGlobalScope,tt="undefined"!==typeof Image&&Image.prototype.decode,et="function"===typeof createImageBitmap,it=function(){let t=!1;try{const e=Object.defineProperty({},"passive",{get:function(){t=!0}});window.addEventListener("_",null,e),window.removeEventListener("_",null,e)}catch{}return t}();var nt={POINTERMOVE:"pointermove",POINTERDOWN:"pointerdown",POINTERUP:"pointerup",POINTEROVER:"pointerover",POINTEROUT:"pointerout",POINTERENTER:"pointerenter",POINTERLEAVE:"pointerleave",POINTERCANCEL:"pointercancel"};class st extends P{constructor(t,e){super(t),this.map_=t,this.clickTimeoutId_,this.emulateClicks_=!1,this.dragging_=!1,this.dragListenerKeys_=[],this.moveTolerance_=void 0===e?1:e,this.down_=null;const i=this.map_.getViewport();this.activePointers_=[],this.trackedTouches_={},this.element_=i,this.pointerdownListenerKey_=A(i,nt.POINTERDOWN,this.handlePointerDown_,this),this.originalPointerMoveEvent_,this.relayedListenerKey_=A(i,nt.POINTERMOVE,this.relayMoveEvent_,this),this.boundHandleTouchMove_=this.handleTouchMove_.bind(this),this.element_.addEventListener(h.TOUCHMOVE,this.boundHandleTouchMove_,!!it&&{passive:!1})}emulateClick_(t){let e=new K(W.CLICK,this.map_,t);this.dispatchEvent(e),void 0!==this.clickTimeoutId_?(clearTimeout(this.clickTimeoutId_),this.clickTimeoutId_=void 0,e=new K(W.DBLCLICK,this.map_,t),this.dispatchEvent(e)):this.clickTimeoutId_=setTimeout(()=>{this.clickTimeoutId_=void 0;const e=new K(W.SINGLECLICK,this.map_,t);this.dispatchEvent(e)},250)}updateActivePointers_(t){const e=t,i=e.pointerId;if(e.type==W.POINTERUP||e.type==W.POINTERCANCEL){delete this.trackedTouches_[i];for(const t in this.trackedTouches_)if(this.trackedTouches_[t].target!==e.target){delete this.trackedTouches_[t];break}}else e.type!=W.POINTERDOWN&&e.type!=W.POINTERMOVE||(this.trackedTouches_[i]=e);this.activePointers_=Object.values(this.trackedTouches_)}handlePointerUp_(t){this.updateActivePointers_(t);const e=new K(W.POINTERUP,this.map_,t,void 0,void 0,this.activePointers_);this.dispatchEvent(e),this.emulateClicks_&&!e.defaultPrevented&&!this.dragging_&&this.isMouseActionButton_(t)&&this.emulateClick_(this.down_),0===this.activePointers_.length&&(this.dragListenerKeys_.forEach(T),this.dragListenerKeys_.length=0,this.dragging_=!1,this.down_=null)}isMouseActionButton_(t){return 0===t.button}handlePointerDown_(t){this.emulateClicks_=0===this.activePointers_.length,this.updateActivePointers_(t);const e=new K(W.POINTERDOWN,this.map_,t,void 0,void 0,this.activePointers_);if(this.dispatchEvent(e),this.down_=new PointerEvent(t.type,t),Object.defineProperty(this.down_,"target",{writable:!1,value:t.target}),0===this.dragListenerKeys_.length){const t=this.map_.getOwnerDocument();this.dragListenerKeys_.push(A(t,W.POINTERMOVE,this.handlePointerMove_,this),A(t,W.POINTERUP,this.handlePointerUp_,this),A(this.element_,W.POINTERCANCEL,this.handlePointerUp_,this)),this.element_.getRootNode&&this.element_.getRootNode()!==t&&this.dragListenerKeys_.push(A(this.element_.getRootNode(),W.POINTERUP,this.handlePointerUp_,this))}}handlePointerMove_(t){if(this.isMoving_(t)){this.updateActivePointers_(t),this.dragging_=!0;const e=new K(W.POINTERDRAG,this.map_,t,this.dragging_,void 0,this.activePointers_);this.dispatchEvent(e)}}relayMoveEvent_(t){this.originalPointerMoveEvent_=t;const e=!(!this.down_||!this.isMoving_(t));this.dispatchEvent(new K(W.POINTERMOVE,this.map_,t,e))}handleTouchMove_(t){const e=this.originalPointerMoveEvent_;e&&!e.defaultPrevented||"boolean"===typeof t.cancelable&&!0!==t.cancelable||t.preventDefault()}isMoving_(t){return this.dragging_||Math.abs(t.clientX-this.down_.clientX)>this.moveTolerance_||Math.abs(t.clientY-this.down_.clientY)>this.moveTolerance_}disposeInternal(){this.relayedListenerKey_&&(T(this.relayedListenerKey_),this.relayedListenerKey_=null),this.element_.removeEventListener(h.TOUCHMOVE,this.boundHandleTouchMove_),this.pointerdownListenerKey_&&(T(this.pointerdownListenerKey_),this.pointerdownListenerKey_=null),this.dragListenerKeys_.forEach(T),this.dragListenerKeys_.length=0,this.element_=null,super.disposeInternal()}}var rt=st,ot={POSTRENDER:"postrender",MOVESTART:"movestart",MOVEEND:"moveend",LOADSTART:"loadstart",LOADEND:"loadend"},at={LAYERGROUP:"layergroup",SIZE:"size",TARGET:"target",VIEW:"view"},lt={IDLE:0,LOADING:1,LOADED:2,ERROR:3,EMPTY:4};function ht(t,e){if(!t)throw new Error(e)}const ct=1/0;class ut{constructor(t,e){this.priorityFunction_=t,this.keyFunction_=e,this.elements_=[],this.priorities_=[],this.queuedElements_={}}clear(){this.elements_.length=0,this.priorities_.length=0,x(this.queuedElements_)}dequeue(){const t=this.elements_,e=this.priorities_,i=t[0];1==t.length?(t.length=0,e.length=0):(t[0]=t.pop(),e[0]=e.pop(),this.siftUp_(0));const n=this.keyFunction_(i);return delete this.queuedElements_[n],i}enqueue(t){ht(!(this.keyFunction_(t)in this.queuedElements_),"Tried to enqueue an `element` that was already added to the queue");const e=this.priorityFunction_(t);return e!=ct&&(this.elements_.push(t),this.priorities_.push(e),this.queuedElements_[this.keyFunction_(t)]=!0,this.siftDown_(0,this.elements_.length-1),!0)}getCount(){return this.elements_.length}getLeftChildIndex_(t){return 2*t+1}getRightChildIndex_(t){return 2*t+2}getParentIndex_(t){return t-1>>1}heapify_(){let t;for(t=(this.elements_.length>>1)-1;t>=0;t--)this.siftUp_(t)}isEmpty(){return 0===this.elements_.length}isKeyQueued(t){return t in this.queuedElements_}isQueued(t){return this.isKeyQueued(this.keyFunction_(t))}siftUp_(t){const e=this.elements_,i=this.priorities_,n=e.length,s=e[t],r=i[t],o=t;while(t<n>>1){const s=this.getLeftChildIndex_(t),r=this.getRightChildIndex_(t),o=r<n&&i[r]<i[s]?r:s;e[t]=e[o],i[t]=i[o],t=o}e[t]=s,i[t]=r,this.siftDown_(o,t)}siftDown_(t,e){const i=this.elements_,n=this.priorities_,s=i[e],r=n[e];while(e>t){const t=this.getParentIndex_(e);if(!(n[t]>r))break;i[e]=i[t],n[e]=n[t],e=t}i[e]=s,n[e]=r}reprioritize(){const t=this.priorityFunction_,e=this.elements_,i=this.priorities_;let n=0;const s=e.length;let r,o,a;for(o=0;o<s;++o)r=e[o],a=t(r),a==ct?delete this.queuedElements_[this.keyFunction_(r)]:(i[n]=a,e[n++]=r);e.length=n,i.length=n,this.heapify_()}}var dt=ut;class pt extends dt{constructor(t,e){super(e=>t.apply(null,e),t=>t[0].getKey()),this.boundHandleTileChange_=this.handleTileChange.bind(this),this.tileChangeCallback_=e,this.tilesLoading_=0,this.tilesLoadingKeys_={}}enqueue(t){const e=super.enqueue(t);if(e){const e=t[0];e.addEventListener(h.CHANGE,this.boundHandleTileChange_)}return e}getTilesLoading(){return this.tilesLoading_}handleTileChange(t){const e=t.target,i=e.getState();if(i===lt.LOADED||i===lt.ERROR||i===lt.EMPTY){i!==lt.ERROR&&e.removeEventListener(h.CHANGE,this.boundHandleTileChange_);const t=e.getKey();t in this.tilesLoadingKeys_&&(delete this.tilesLoadingKeys_[t],--this.tilesLoading_),this.tileChangeCallback_()}}loadMoreTiles(t,e){let i=0;while(this.tilesLoading_<t&&i<e&&this.getCount()>0){const t=this.dequeue()[0],e=t.getKey(),n=t.getState();n!==lt.IDLE||e in this.tilesLoadingKeys_||(this.tilesLoadingKeys_[e]=!0,++this.tilesLoading_,++i,t.load())}}}var gt=pt;function ft(t,e,i,n,s){if(!t||!(i in t.wantedTiles))return ct;if(!t.wantedTiles[i][e.getKey()])return ct;const r=t.viewState.center,o=n[0]-r[0],a=n[1]-r[1];return 65536*Math.log(s)+Math.sqrt(o*o+a*a)/s}i("2382");var mt={ANIMATING:0,INTERACTING:1},yt={CENTER:"center",RESOLUTION:"resolution",ROTATION:"rotation"};function _t(t,e,i){return Math.min(Math.max(t,e),i)}function vt(t,e,i,n,s,r){const o=s-i,a=r-n;if(0!==o||0!==a){const l=((t-i)*o+(e-n)*a)/(o*o+a*a);l>1?(i=s,n=r):l>0&&(i+=o*l,n+=a*l)}return wt(t,e,i,n)}function wt(t,e,i,n){const s=i-t,r=n-e;return s*s+r*r}function xt(t){const e=t.length;for(let n=0;n<e;n++){let i=n,s=Math.abs(t[n][n]);for(let o=n+1;o<e;o++){const e=Math.abs(t[o][n]);e>s&&(s=e,i=o)}if(0===s)return null;const r=t[i];t[i]=t[n],t[n]=r;for(let o=n+1;o<e;o++){const i=-t[o][n]/t[n][n];for(let s=n;s<e+1;s++)n==s?t[o][s]=0:t[o][s]+=i*t[n][s]}}const i=new Array(e);for(let n=e-1;n>=0;n--){i[n]=t[n][e]/t[n][n];for(let s=n-1;s>=0;s--)t[s][e]-=t[s][n]*i[n]}return i}function bt(t){return 180*t/Math.PI}function Mt(t){return t*Math.PI/180}function Et(t,e){const i=t%e;return i*e<0?i+e:i}function Ct(t,e,i){return t+i*(e-t)}function Pt(t,e){const i=Math.pow(10,e);return Math.round(t*i)/i}function At(t,e){return Math.ceil(Pt(t,e))}function St(t,e,i){if(t>=e&&t<i)return t;const n=i-e;return((t-e)%n+n)%n+e}function Tt(t,e,i){return function(n,s,r,o,a){if(!n)return;if(!s&&!e)return n;const l=e?0:r[0]*s,h=e?0:r[1]*s,c=a?a[0]:0,u=a?a[1]:0;let d=t[0]+l/2+c,p=t[2]-l/2+c,g=t[1]+h/2+u,f=t[3]-h/2+u;d>p&&(d=(p+d)/2,p=d),g>f&&(g=(f+g)/2,f=g);let m=_t(n[0],d,p),y=_t(n[1],g,f);if(o&&i&&s){const t=30*s;m+=-t*Math.log(1+Math.max(0,d-n[0])/t)+t*Math.log(1+Math.max(0,n[0]-p)/t),y+=-t*Math.log(1+Math.max(0,g-n[1])/t)+t*Math.log(1+Math.max(0,n[1]-f)/t)}return[m,y]}}function Rt(t){return t}var It={UNKNOWN:0,INTERSECTING:1,ABOVE:2,RIGHT:4,BELOW:8,LEFT:16};function Lt(t){const e=Bt();for(let i=0,n=t.length;i<n;++i)Wt(e,t[i]);return e}function Ot(t,e,i){const n=Math.min.apply(null,t),s=Math.min.apply(null,e),r=Math.max.apply(null,t),o=Math.max.apply(null,e);return zt(n,s,r,o,i)}function kt(t,e){return e?(e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e):t.slice()}function Dt(t,e,i){let n,s;return n=e<t[0]?t[0]-e:t[2]<e?e-t[2]:0,s=i<t[1]?t[1]-i:t[3]<i?i-t[3]:0,n*n+s*s}function Nt(t,e){return jt(t,e[0],e[1])}function Gt(t,e){return t[0]<=e[0]&&e[2]<=t[2]&&t[1]<=e[1]&&e[3]<=t[3]}function jt(t,e,i){return t[0]<=e&&e<=t[2]&&t[1]<=i&&i<=t[3]}function Ft(t,e){const i=t[0],n=t[1],s=t[2],r=t[3],o=e[0],a=e[1];let l=It.UNKNOWN;return o<i?l|=It.LEFT:o>s&&(l|=It.RIGHT),a<n?l|=It.BELOW:a>r&&(l|=It.ABOVE),l===It.UNKNOWN&&(l=It.INTERSECTING),l}function Bt(){return[1/0,1/0,-1/0,-1/0]}function zt(t,e,i,n,s){return s?(s[0]=t,s[1]=e,s[2]=i,s[3]=n,s):[t,e,i,n]}function Vt(t){return zt(1/0,1/0,-1/0,-1/0,t)}function Zt(t,e){const i=t[0],n=t[1];return zt(i,n,i,n,e)}function Ht(t,e,i,n,s){const r=Vt(s);return Yt(r,t,e,i,n)}function Xt(t,e){return t[0]==e[0]&&t[2]==e[2]&&t[1]==e[1]&&t[3]==e[3]}function Kt(t,e){return e[0]<t[0]&&(t[0]=e[0]),e[2]>t[2]&&(t[2]=e[2]),e[1]<t[1]&&(t[1]=e[1]),e[3]>t[3]&&(t[3]=e[3]),t}function Wt(t,e){e[0]<t[0]&&(t[0]=e[0]),e[0]>t[2]&&(t[2]=e[0]),e[1]<t[1]&&(t[1]=e[1]),e[1]>t[3]&&(t[3]=e[1])}function Yt(t,e,i,n,s){for(;i<n;i+=s)Ut(t,e[i],e[i+1]);return t}function Ut(t,e,i){t[0]=Math.min(t[0],e),t[1]=Math.min(t[1],i),t[2]=Math.max(t[2],e),t[3]=Math.max(t[3],i)}function Jt(t,e){let i;return i=e(qt(t)),i||(i=e(Qt(t)),i||(i=e(oe(t)),i||(i=e(re(t)),i||!1)))}function $t(t){let e=0;return he(t)||(e=ae(t)*ne(t)),e}function qt(t){return[t[0],t[1]]}function Qt(t){return[t[2],t[1]]}function te(t){return[(t[0]+t[2])/2,(t[1]+t[3])/2]}function ee(t,e,i,n,s){const[r,o,a,l,h,c,u,d]=ie(t,e,i,n);return zt(Math.min(r,a,h,u),Math.min(o,l,c,d),Math.max(r,a,h,u),Math.max(o,l,c,d),s)}function ie(t,e,i,n){const s=e*n[0]/2,r=e*n[1]/2,o=Math.cos(i),a=Math.sin(i),l=s*o,h=s*a,c=r*o,u=r*a,d=t[0],p=t[1];return[d-l+u,p-h-c,d-l-u,p-h+c,d+l-u,p+h+c,d+l+u,p+h-c,d-l+u,p-h-c]}function ne(t){return t[3]-t[1]}function se(t,e,i){const n=i||Bt();return le(t,e)?(t[0]>e[0]?n[0]=t[0]:n[0]=e[0],t[1]>e[1]?n[1]=t[1]:n[1]=e[1],t[2]<e[2]?n[2]=t[2]:n[2]=e[2],t[3]<e[3]?n[3]=t[3]:n[3]=e[3]):Vt(n),n}function re(t){return[t[0],t[3]]}function oe(t){return[t[2],t[3]]}function ae(t){return t[2]-t[0]}function le(t,e){return t[0]<=e[2]&&t[2]>=e[0]&&t[1]<=e[3]&&t[3]>=e[1]}function he(t){return t[2]<t[0]||t[3]<t[1]}function ce(t,e){return e?(e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e):t}function ue(t,e,i){let n=!1;const s=Ft(t,e),r=Ft(t,i);if(s===It.INTERSECTING||r===It.INTERSECTING)n=!0;else{const o=t[0],a=t[1],l=t[2],h=t[3],c=e[0],u=e[1],d=i[0],p=i[1],g=(p-u)/(d-c);let f,m;r&It.ABOVE&&!(s&It.ABOVE)&&(f=d-(p-h)/g,n=f>=o&&f<=l),n||!(r&It.RIGHT)||s&It.RIGHT||(m=p-(d-l)*g,n=m>=a&&m<=h),n||!(r&It.BELOW)||s&It.BELOW||(f=d-(p-a)/g,n=f>=o&&f<=l),n||!(r&It.LEFT)||s&It.LEFT||(m=p-(d-o)*g,n=m>=a&&m<=h)}return n}function de(t,e,i,n){if(he(t))return Vt(i);let s=[];if(n>1){const e=t[2]-t[0],i=t[3]-t[1];for(let r=0;r<n;++r)s.push(t[0]+e*r/n,t[1],t[2],t[1]+i*r/n,t[2]-e*r/n,t[3],t[0],t[3]-i*r/n)}else s=[t[0],t[1],t[2],t[1],t[2],t[3],t[0],t[3]];e(s,s,2);const r=[],o=[];for(let a=0,l=s.length;a<l;a+=2)r.push(s[a]),o.push(s[a+1]);return Ot(r,o,i)}function pe(t,e){return t[0]+=+e[0],t[1]+=+e[1],t}function ge(t,e){let i=!0;for(let n=t.length-1;n>=0;--n)if(t[n]!=e[n]){i=!1;break}return i}function fe(t,e){const i=Math.cos(e),n=Math.sin(e),s=t[0]*i-t[1]*n,r=t[1]*i+t[0]*n;return t[0]=s,t[1]=r,t}function me(t,e){return t[0]*=e,t[1]*=e,t}function ye(t,e){if(e.canWrapX()){const i=ae(e.getExtent()),n=_e(t,e,i);n&&(t[0]-=n*i)}return t}function _e(t,e,i){const n=e.getExtent();let s=0;return e.canWrapX()&&(t[0]<n[0]||t[0]>n[2])&&(i=i||ae(n),s=Math.floor((t[0]-n[0])/i)),s}function ve(t){return Math.pow(t,3)}function we(t){return 1-ve(1-t)}function xe(t){return 3*t*t-2*t*t*t}function be(t){return t}const Me=6371008.8;function Ee(t,e,i){i=i||Me;const n=Mt(t[1]),s=Mt(e[1]),r=(s-n)/2,o=Mt(e[0]-t[0])/2,a=Math.sin(r)*Math.sin(r)+Math.sin(o)*Math.sin(o)*Math.cos(n)*Math.cos(s);return 2*i*Math.atan2(Math.sqrt(a),Math.sqrt(1-a))}const Ce={info:1,warn:2,error:3,none:4};let Pe=Ce.info;function Ae(...t){Pe>Ce.warn||console.warn(...t)}const Se={radians:6370997/(2*Math.PI),degrees:2*Math.PI*6370997/360,ft:.3048,m:1,"us-ft":1200/3937};class Te{constructor(t){this.code_=t.code,this.units_=t.units,this.extent_=void 0!==t.extent?t.extent:null,this.worldExtent_=void 0!==t.worldExtent?t.worldExtent:null,this.axisOrientation_=void 0!==t.axisOrientation?t.axisOrientation:"enu",this.global_=void 0!==t.global&&t.global,this.canWrapX_=!(!this.global_||!this.extent_),this.getPointResolutionFunc_=t.getPointResolution,this.defaultTileGrid_=null,this.metersPerUnit_=t.metersPerUnit}canWrapX(){return this.canWrapX_}getCode(){return this.code_}getExtent(){return this.extent_}getUnits(){return this.units_}getMetersPerUnit(){return this.metersPerUnit_||Se[this.units_]}getWorldExtent(){return this.worldExtent_}getAxisOrientation(){return this.axisOrientation_}isGlobal(){return this.global_}setGlobal(t){this.global_=t,this.canWrapX_=!(!t||!this.extent_)}getDefaultTileGrid(){return this.defaultTileGrid_}setDefaultTileGrid(t){this.defaultTileGrid_=t}setExtent(t){this.extent_=t,this.canWrapX_=!(!this.global_||!t)}setWorldExtent(t){this.worldExtent_=t}setGetPointResolution(t){this.getPointResolutionFunc_=t}getPointResolutionFunc(){return this.getPointResolutionFunc_}}var Re=Te;const Ie=6378137,Le=Math.PI*Ie,Oe=[-Le,-Le,Le,Le],ke=[-180,-85,180,85],De=Ie*Math.log(Math.tan(Math.PI/2));class Ne extends Re{constructor(t){super({code:t,units:"m",extent:Oe,global:!0,worldExtent:ke,getPointResolution:function(t,e){return t/Math.cosh(e[1]/Ie)}})}}const Ge=[new Ne("EPSG:3857"),new Ne("EPSG:102100"),new Ne("EPSG:102113"),new Ne("EPSG:900913"),new Ne("http://www.opengis.net/def/crs/EPSG/0/3857"),new Ne("http://www.opengis.net/gml/srs/epsg.xml#3857")];function je(t,e,i,n){const s=t.length;i=i>1?i:2,n=null!==n&&void 0!==n?n:i,void 0===e&&(e=i>2?t.slice():new Array(s));for(let r=0;r<s;r+=n){e[r]=Le*t[r]/180;let i=Ie*Math.log(Math.tan(Math.PI*(+t[r+1]+90)/360));i>De?i=De:i<-De&&(i=-De),e[r+1]=i}return e}function Fe(t,e,i,n){const s=t.length;i=i>1?i:2,n=null!==n&&void 0!==n?n:i,void 0===e&&(e=i>2?t.slice():new Array(s));for(let r=0;r<s;r+=n)e[r]=180*t[r]/Le,e[r+1]=360*Math.atan(Math.exp(t[r+1]/Ie))/Math.PI-90;return e}const Be=6378137,ze=[-180,-90,180,90],Ve=Math.PI*Be/180;class Ze extends Re{constructor(t,e){super({code:t,units:"degrees",extent:ze,axisOrientation:e,global:!0,metersPerUnit:Ve,worldExtent:ze})}}const He=[new Ze("CRS:84"),new Ze("EPSG:4326","neu"),new Ze("urn:ogc:def:crs:OGC:1.3:CRS84"),new Ze("urn:ogc:def:crs:OGC:2:84"),new Ze("http://www.opengis.net/def/crs/OGC/1.3/CRS84"),new Ze("http://www.opengis.net/gml/srs/epsg.xml#4326","neu"),new Ze("http://www.opengis.net/def/crs/EPSG/0/4326","neu")];let Xe={};function Ke(t){return Xe[t]||Xe[t.replace(/urn:(x-)?ogc:def:crs:EPSG:(.*:)?(\w+)$/,"EPSG:$3")]||null}function We(t,e){Xe[t]=e}let Ye={};function Ue(t,e,i){const n=t.getCode(),s=e.getCode();n in Ye||(Ye[n]={}),Ye[n][s]=i}function Je(t,e){return t in Ye&&e in Ye[t]?Ye[t][e]:null}const $e=.9996,qe=.00669438,Qe=qe*qe,ti=Qe*qe,ei=qe/(1-qe),ii=Math.sqrt(1-qe),ni=(1-ii)/(1+ii),si=ni*ni,ri=si*ni,oi=ri*ni,ai=oi*ni,li=1-qe/4-3*Qe/64-5*ti/256,hi=3*qe/8+3*Qe/32+45*ti/1024,ci=15*Qe/256+45*ti/1024,ui=35*ti/3072,di=1.5*ni-27/32*ri+269/512*ai,pi=21/16*si-55/32*oi,gi=151/96*ri-417/128*ai,fi=1097/512*oi,mi=6378137;function yi(t,e,i){const n=t-5e5,s=i.north?e:e-1e7,r=s/$e,o=r/(mi*li),a=o+di*Math.sin(2*o)+pi*Math.sin(4*o)+gi*Math.sin(6*o)+fi*Math.sin(8*o),l=Math.sin(a),h=l*l,c=Math.cos(a),u=l/c,d=u*u,p=d*d,g=1-qe*h,f=Math.sqrt(1-qe*h),m=mi/f,y=(1-qe)/g,_=ei*c**2,v=_*_,w=n/(m*$e),x=w*w,b=x*w,M=b*w,E=M*w,C=E*w,P=a-u/y*(x/2-M/24*(5+3*d+10*_-4*v-9*ei))+C/720*(61+90*d+298*_+45*p-252*ei-3*v);let A=(w-b/6*(1+2*d+_)+E/120*(5-2*_+28*d-3*v+8*ei+24*p))/c;return A=St(A+Mt(Mi(i.number)),-Math.PI,Math.PI),[bt(A),bt(P)]}const _i=-80,vi=84,wi=-180,xi=180;function bi(t,e,i){t=St(t,wi,xi),e<_i?e=_i:e>vi&&(e=vi);const n=Mt(e),s=Math.sin(n),r=Math.cos(n),o=s/r,a=o*o,l=a*a,h=Mt(t),c=Mi(i.number),u=Mt(c),d=mi/Math.sqrt(1-qe*s**2),p=ei*r**2,g=r*St(h-u,-Math.PI,Math.PI),f=g*g,m=f*g,y=m*g,_=y*g,v=_*g,w=mi*(li*n-hi*Math.sin(2*n)+ci*Math.sin(4*n)-ui*Math.sin(6*n)),x=$e*d*(g+m/6*(1-a+p)+_/120*(5-18*a+l+72*p-58*ei))+5e5;let b=$e*(w+d*o*(f/2+y/24*(5-a+9*p+4*p**2)+v/720*(61-58*a+l+600*p-330*ei)));return i.north||(b+=1e7),[x,b]}function Mi(t){return 6*(t-1)-180+3}const Ei=[/^EPSG:(\d+)$/,/^urn:ogc:def:crs:EPSG::(\d+)$/,/^http:\/\/www\.opengis\.net\/def\/crs\/EPSG\/0\/(\d+)$/];function Ci(t){let e=0;for(const s of Ei){const i=t.match(s);if(i){e=parseInt(i[1]);break}}if(!e)return null;let i=0,n=!1;return e>32700&&e<32761?i=e-32700:e>32600&&e<32661&&(n=!0,i=e-32600),i?{number:i,north:n}:null}function Pi(t,e){return function(i,n,s,r){const o=i.length;s=s>1?s:2,r=null!==r&&void 0!==r?r:s,n||(n=s>2?i.slice():new Array(o));for(let a=0;a<o;a+=r){const s=i[a],r=i[a+1],o=t(s,r,e);n[a]=o[0],n[a+1]=o[1]}return n}}function Ai(t){const e=Ci(t);return e?new Re({code:t,units:"m"}):null}function Si(t){const e=Ci(t.getCode());return e?{forward:Pi(bi,e),inverse:Pi(yi,e)}:null}const Ti=[Si],Ri=[Ai];let Ii=!0;function Li(t){const e=void 0===t||t;Ii=!e}function Oi(t,e){if(void 0!==e){for(let i=0,n=t.length;i<n;++i)e[i]=t[i];e=e}else e=t.slice();return e}function ki(t){We(t.getCode(),t),Ue(t,t,Oi)}function Di(t){t.forEach(ki)}function Ni(t){if("string"!==typeof t)return t;const e=Ke(t);if(e)return e;for(const i of Ri){const e=i(t);if(e)return e}return null}function Gi(t,e,i,n){let s;t=Ni(t);const r=t.getPointResolutionFunc();if(r){if(s=r(e,i),n&&n!==t.getUnits()){const e=t.getMetersPerUnit();e&&(s=s*e/Se[n])}}else{const r=t.getUnits();if("degrees"==r&&!n||"degrees"==n)s=e;else{const o=Zi(t,Ni("EPSG:4326"));if(o||"degrees"===r){let t=[i[0]-e/2,i[1],i[0]+e/2,i[1],i[0],i[1]-e/2,i[0],i[1]+e/2];t=o(t,t,2);const n=Ee(t.slice(0,2),t.slice(2,4)),r=Ee(t.slice(4,6),t.slice(6,8));s=(n+r)/2}else s=e*t.getMetersPerUnit();const a=n?Se[n]:t.getMetersPerUnit();void 0!==a&&(s/=a)}}return s}function ji(t){Di(t),t.forEach((function(e){t.forEach((function(t){e!==t&&Ue(e,t,Oi)}))}))}function Fi(t,e,i,n){t.forEach((function(t){e.forEach((function(e){Ue(t,e,i),Ue(e,t,n)}))}))}function Bi(t,e){return t?"string"===typeof t?Ni(t):t:Ni(e)}function zi(t){return function(e,i,n,s){const r=e.length;n=void 0!==n?n:2,s=null!==s&&void 0!==s?s:n,i=void 0!==i?i:new Array(r);for(let o=0;o<r;o+=s){const r=t(e.slice(o,o+n)),a=r.length;for(let t=0,n=s;t<n;++t)i[o+t]=t>=a?e[o+t]:r[t]}return i}}function Vi(t,e){if(t===e)return!0;const i=t.getUnits()===e.getUnits();if(t.getCode()===e.getCode())return i;const n=Zi(t,e);return n===Oi&&i}function Zi(t,e){const i=t.getCode(),n=e.getCode();let s=Je(i,n);if(s)return s;let r=null,o=null;for(const l of Ti)r||(r=l(t)),o||(o=l(e));if(!r&&!o)return null;const a="EPSG:4326";if(o)if(r)s=Hi(r.inverse,o.forward);else{const t=Je(i,a);t&&(s=Hi(t,o.forward))}else{const t=Je(a,n);t&&(s=Hi(r.inverse,t))}return s&&(ki(t),ki(e),Ue(t,e,s)),s}function Hi(t,e){return function(i,n,s,r){return n=t(i,n,s,r),e(n,n,s,r)}}function Xi(t,e){const i=Ni(t),n=Ni(e);return Zi(i,n)}function Ki(t,e,i){const n=Xi(e,i);if(!n){const t=Ni(e).getCode(),n=Ni(i).getCode();throw new Error(`No transform available between ${t} and ${n}`)}return n(t,void 0,t.length)}function Wi(t,e,i,n){const s=Xi(e,i);return de(t,s,void 0,n)}let Yi=null;function Ui(){return Yi}function Ji(t,e){return Yi?Ki(t,e,Yi):t}function $i(t,e){return Yi?Ki(t,Yi,e):(Ii&&!ge(t,[0,0])&&t[0]>=-180&&t[0]<=180&&t[1]>=-90&&t[1]<=90&&(Ii=!1,Ae("Call useGeographic() from ol/proj once to work with [longitude, latitude] coordinates.")),t)}function qi(t,e){return Yi?Wi(t,e,Yi):t}function Qi(t,e){return Yi?Wi(t,Yi,e):t}function tn(){ji(Ge),ji(He),Fi(He,Ge,je,Fe)}tn();new Array(6);function en(){return[1,0,0,1,0,0]}function nn(t,e){const i=e[0],n=e[1];return e[0]=t[0]*i+t[2]*n+t[4],e[1]=t[1]*i+t[3]*n+t[5],e}function sn(t,e,i,n,s,r,o,a){const l=Math.sin(r),h=Math.cos(r);return t[0]=n*h,t[1]=s*l,t[2]=-n*l,t[3]=s*h,t[4]=o*n*h-a*n*l+e,t[5]=o*s*l+a*s*h+i,t}function rn(t,e){const i=on(e);ht(0!==i,"Transformation matrix cannot be inverted");const n=e[0],s=e[1],r=e[2],o=e[3],a=e[4],l=e[5];return t[0]=o/i,t[1]=-s/i,t[2]=-r/i,t[3]=n/i,t[4]=(r*l-o*a)/i,t[5]=-(n*l-s*a)/i,t}function on(t){return t[0]*t[3]-t[1]*t[2]}const an=[1e5,1e5,1e5,1e5,2,2];function ln(t){const e="matrix("+t.join(", ")+")";return e}function hn(t){const e=t.substring(7,t.length-1).split(",");return e.map(parseFloat)}function cn(t,e){const i=hn(t),n=hn(e);for(let s=0;s<6;++s)if(0!==Math.round((i[s]-n[s])*an[s]))return!1;return!0}function un(t,e,i,n,s,r,o){r=r||[],o=o||2;let a=0;for(let l=e;l<i;l+=n){const e=t[l],i=t[l+1];r[a++]=s[0]*e+s[2]*i+s[4],r[a++]=s[1]*e+s[3]*i+s[5];for(let n=2;n<o;n++)r[a++]=t[l+n]}return r&&r.length!=a&&(r.length=a),r}function dn(t,e,i,n,s,r,o){o=o||[];const a=Math.cos(s),l=Math.sin(s),h=r[0],c=r[1];let u=0;for(let d=e;d<i;d+=n){const e=t[d]-h,i=t[d+1]-c;o[u++]=h+e*a-i*l,o[u++]=c+e*l+i*a;for(let s=d+2;s<d+n;++s)o[u++]=t[s]}return o&&o.length!=u&&(o.length=u),o}function pn(t,e,i,n,s,r,o,a){a=a||[];const l=o[0],h=o[1];let c=0;for(let u=e;u<i;u+=n){const e=t[u]-l,i=t[u+1]-h;a[c++]=l+s*e,a[c++]=h+r*i;for(let s=u+2;s<u+n;++s)a[c++]=t[s]}return a&&a.length!=c&&(a.length=c),a}function gn(t,e,i,n,s,r,o){o=o||[];let a=0;for(let l=e;l<i;l+=n){o[a++]=t[l]+s,o[a++]=t[l+1]+r;for(let e=l+2;e<l+n;++e)o[a++]=t[e]}return o&&o.length!=a&&(o.length=a),o}const fn=en(),mn=[NaN,NaN];class yn extends j{constructor(){super(),this.extent_=Bt(),this.extentRevision_=-1,this.simplifiedGeometryMaxMinSquaredTolerance=0,this.simplifiedGeometryRevision=0,this.simplifyTransformedInternal=v((t,e,i)=>{if(!i)return this.getSimplifiedGeometry(e);const n=this.clone();return n.applyTransform(i),n.getSimplifiedGeometry(e)})}simplifyTransformed(t,e){return this.simplifyTransformedInternal(this.getRevision(),t,e)}clone(){return O()}closestPointXY(t,e,i,n){return O()}containsXY(t,e){return 0===this.closestPointXY(t,e,mn,Number.MIN_VALUE)}getClosestPoint(t,e){return e=e||[NaN,NaN],this.closestPointXY(t[0],t[1],e,1/0),e}intersectsCoordinate(t){return this.containsXY(t[0],t[1])}computeExtent(t){return O()}getExtent(t){if(this.extentRevision_!=this.getRevision()){const t=this.computeExtent(this.extent_);(isNaN(t[0])||isNaN(t[1]))&&Vt(t),this.extentRevision_=this.getRevision()}return ce(this.extent_,t)}rotate(t,e){O()}scale(t,e,i){O()}simplify(t){return this.getSimplifiedGeometry(t*t)}getSimplifiedGeometry(t){return O()}getType(){return O()}applyTransform(t){O()}intersectsExtent(t){return O()}translate(t,e){O()}transform(t,e){const i=Ni(t),n="tile-pixels"==i.getUnits()?function(t,n,s){const r=i.getExtent(),o=i.getWorldExtent(),a=ne(o)/ne(r);sn(fn,o[0],o[3],a,-a,0,0,0);const l=un(t,0,t.length,s,fn,n),h=Xi(i,e);return h?h(l,l,s):l}:Xi(i,e);return this.applyTransform(n),this}}var _n=yn;class vn extends _n{constructor(){super(),this.layout="XY",this.stride=2,this.flatCoordinates}computeExtent(t){return Ht(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,t)}getCoordinates(){return O()}getFirstCoordinate(){return this.flatCoordinates.slice(0,this.stride)}getFlatCoordinates(){return this.flatCoordinates}getLastCoordinate(){return this.flatCoordinates.slice(this.flatCoordinates.length-this.stride)}getLayout(){return this.layout}getSimplifiedGeometry(t){if(this.simplifiedGeometryRevision!==this.getRevision()&&(this.simplifiedGeometryMaxMinSquaredTolerance=0,this.simplifiedGeometryRevision=this.getRevision()),t<0||0!==this.simplifiedGeometryMaxMinSquaredTolerance&&t<=this.simplifiedGeometryMaxMinSquaredTolerance)return this;const e=this.getSimplifiedGeometryInternal(t),i=e.getFlatCoordinates();return i.length<this.flatCoordinates.length?e:(this.simplifiedGeometryMaxMinSquaredTolerance=t,this)}getSimplifiedGeometryInternal(t){return this}getStride(){return this.stride}setFlatCoordinates(t,e){this.stride=xn(t),this.layout=t,this.flatCoordinates=e}setCoordinates(t,e){O()}setLayout(t,e,i){let n;if(t)n=xn(t);else{for(let t=0;t<i;++t){if(0===e.length)return this.layout="XY",void(this.stride=2);e=e[0]}n=e.length,t=wn(n)}this.layout=t,this.stride=n}applyTransform(t){this.flatCoordinates&&(t(this.flatCoordinates,this.flatCoordinates,this.layout.startsWith("XYZ")?3:2,this.stride),this.changed())}rotate(t,e){const i=this.getFlatCoordinates();if(i){const n=this.getStride();dn(i,0,i.length,n,t,e,i),this.changed()}}scale(t,e,i){void 0===e&&(e=t),i||(i=te(this.getExtent()));const n=this.getFlatCoordinates();if(n){const s=this.getStride();pn(n,0,n.length,s,t,e,i,n),this.changed()}}translate(t,e){const i=this.getFlatCoordinates();if(i){const n=this.getStride();gn(i,0,i.length,n,t,e,i),this.changed()}}}function wn(t){let e;return 2==t?e="XY":3==t?e="XYZ":4==t&&(e="XYZM"),e}function xn(t){let e;return"XY"==t?e=2:"XYZ"==t||"XYM"==t?e=3:"XYZM"==t&&(e=4),e}var bn=vn;function Mn(t,e,i,n){let s=0;const r=t[i-n],o=t[i-n+1];let a=0,l=0;for(;e<i;e+=n){const i=t[e]-r,n=t[e+1]-o;s+=l*i-a*n,a=i,l=n}return s/2}function En(t,e,i,n){let s=0;for(let r=0,o=i.length;r<o;++r){const o=i[r];s+=Mn(t,e,o,n),e=o}return s}function Cn(t,e,i,n,s,r,o){const a=t[e],l=t[e+1],h=t[i]-a,c=t[i+1]-l;let u;if(0===h&&0===c)u=e;else{const d=((s-a)*h+(r-l)*c)/(h*h+c*c);if(d>1)u=i;else{if(d>0){for(let s=0;s<n;++s)o[s]=Ct(t[e+s],t[i+s],d);return void(o.length=n)}u=e}}for(let d=0;d<n;++d)o[d]=t[u+d];o.length=n}function Pn(t,e,i,n,s){let r=t[e],o=t[e+1];for(e+=n;e<i;e+=n){const i=t[e],n=t[e+1],a=wt(r,o,i,n);a>s&&(s=a),r=i,o=n}return s}function An(t,e,i,n,s){for(let r=0,o=i.length;r<o;++r){const o=i[r];s=Pn(t,e,o,n,s),e=o}return s}function Sn(t,e,i,n,s,r,o,a,l,h,c){if(e==i)return h;let u,d;if(0===s){if(d=wt(o,a,t[e],t[e+1]),d<h){for(u=0;u<n;++u)l[u]=t[e+u];return l.length=n,d}return h}c=c||[NaN,NaN];let p=e+n;while(p<i)if(Cn(t,p-n,p,n,o,a,c),d=wt(o,a,c[0],c[1]),d<h){for(h=d,u=0;u<n;++u)l[u]=c[u];l.length=n,p+=n}else p+=n*Math.max((Math.sqrt(d)-Math.sqrt(h))/s|0,1);if(r&&(Cn(t,i-n,e,n,o,a,c),d=wt(o,a,c[0],c[1]),d<h)){for(h=d,u=0;u<n;++u)l[u]=c[u];l.length=n}return h}function Tn(t,e,i,n,s,r,o,a,l,h,c){c=c||[NaN,NaN];for(let u=0,d=i.length;u<d;++u){const d=i[u];h=Sn(t,e,d,n,s,r,o,a,l,h,c),e=d}return h}function Rn(t,e,i,n){for(let s=0,r=i.length;s<r;++s)t[e++]=i[s];return e}function In(t,e,i,n){for(let s=0,r=i.length;s<r;++s){const r=i[s];for(let i=0;i<n;++i)t[e++]=r[i]}return e}function Ln(t,e,i,n,s){s=s||[];let r=0;for(let o=0,a=i.length;o<a;++o){const a=In(t,e,i[o],n);s[r++]=a,e=a}return s.length=r,s}function On(t,e,i,n,s){s=void 0!==s?s:[];let r=0;for(let o=e;o<i;o+=n)s[r++]=t.slice(o,o+n);return s.length=r,s}function kn(t,e,i,n,s){s=void 0!==s?s:[];let r=0;for(let o=0,a=i.length;o<a;++o){const a=i[o];s[r++]=On(t,e,a,n,s[r]),e=a}return s.length=r,s}function Dn(t,e,i,n,s,r,o){const a=(i-e)/n;if(a<3){for(;e<i;e+=n)r[o++]=t[e],r[o++]=t[e+1];return o}const l=new Array(a);l[0]=1,l[a-1]=1;const h=[e,i-n];let c=0;while(h.length>0){const i=h.pop(),r=h.pop();let o=0;const a=t[r],u=t[r+1],d=t[i],p=t[i+1];for(let e=r+n;e<i;e+=n){const i=t[e],n=t[e+1],s=vt(i,n,a,u,d,p);s>o&&(c=e,o=s)}o>s&&(l[(c-e)/n]=1,r+n<c&&h.push(r,c),c+n<i&&h.push(c,i))}for(let u=0;u<a;++u)l[u]&&(r[o++]=t[e+u*n],r[o++]=t[e+u*n+1]);return o}function Nn(t,e){return e*Math.round(t/e)}function Gn(t,e,i,n,s,r,o){if(e==i)return o;let a,l,h=Nn(t[e],s),c=Nn(t[e+1],s);e+=n,r[o++]=h,r[o++]=c;do{if(a=Nn(t[e],s),l=Nn(t[e+1],s),e+=n,e==i)return r[o++]=a,r[o++]=l,o}while(a==h&&l==c);while(e<i){const i=Nn(t[e],s),u=Nn(t[e+1],s);if(e+=n,i==a&&u==l)continue;const d=a-h,p=l-c,g=i-h,f=u-c;d*f==p*g&&(d<0&&g<d||d==g||d>0&&g>d)&&(p<0&&f<p||p==f||p>0&&f>p)?(a=i,l=u):(r[o++]=a,r[o++]=l,h=a,c=l,a=i,l=u)}return r[o++]=a,r[o++]=l,o}function jn(t,e,i,n,s,r,o,a){for(let l=0,h=i.length;l<h;++l){const h=i[l];o=Gn(t,e,h,n,s,r,o),a.push(o),e=h}return o}class Fn extends bn{constructor(t,e){super(),this.maxDelta_=-1,this.maxDeltaRevision_=-1,void 0===e||Array.isArray(t[0])?this.setCoordinates(t,e):this.setFlatCoordinates(e,t)}clone(){return new Fn(this.flatCoordinates.slice(),this.layout)}closestPointXY(t,e,i,n){return n<Dt(this.getExtent(),t,e)?n:(this.maxDeltaRevision_!=this.getRevision()&&(this.maxDelta_=Math.sqrt(Pn(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,0)),this.maxDeltaRevision_=this.getRevision()),Sn(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,this.maxDelta_,!0,t,e,i,n))}getArea(){return Mn(this.flatCoordinates,0,this.flatCoordinates.length,this.stride)}getCoordinates(){return On(this.flatCoordinates,0,this.flatCoordinates.length,this.stride)}getSimplifiedGeometryInternal(t){const e=[];return e.length=Dn(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,t,e,0),new Fn(e,"XY")}getType(){return"LinearRing"}intersectsExtent(t){return!1}setCoordinates(t,e){this.setLayout(e,t,1),this.flatCoordinates||(this.flatCoordinates=[]),this.flatCoordinates.length=In(this.flatCoordinates,0,t,this.stride),this.changed()}}var Bn=Fn;class zn extends bn{constructor(t,e){super(),this.setCoordinates(t,e)}clone(){const t=new zn(this.flatCoordinates.slice(),this.layout);return t.applyProperties(this),t}closestPointXY(t,e,i,n){const s=this.flatCoordinates,r=wt(t,e,s[0],s[1]);if(r<n){const t=this.stride;for(let e=0;e<t;++e)i[e]=s[e];return i.length=t,r}return n}getCoordinates(){return this.flatCoordinates.slice()}computeExtent(t){return Zt(this.flatCoordinates,t)}getType(){return"Point"}intersectsExtent(t){return jt(t,this.flatCoordinates[0],this.flatCoordinates[1])}setCoordinates(t,e){this.setLayout(e,t,0),this.flatCoordinates||(this.flatCoordinates=[]),this.flatCoordinates.length=Rn(this.flatCoordinates,0,t,this.stride),this.changed()}}var Vn=zn;function Zn(t,e,i,n,s){const r=Jt(s,(function(s){return!Hn(t,e,i,n,s[0],s[1])}));return!r}function Hn(t,e,i,n,s,r){let o=0,a=t[i-n],l=t[i-n+1];for(;e<i;e+=n){const i=t[e],n=t[e+1];l<=r?n>r&&(i-a)*(r-l)-(s-a)*(n-l)>0&&o++:n<=r&&(i-a)*(r-l)-(s-a)*(n-l)<0&&o--,a=i,l=n}return 0!==o}function Xn(t,e,i,n,s,r){if(0===i.length)return!1;if(!Hn(t,e,i[0],n,s,r))return!1;for(let o=1,a=i.length;o<a;++o)if(Hn(t,i[o-1],i[o],n,s,r))return!1;return!0}function Kn(t,e,i,n,s,r,o){let a,l,h,c,u,p,g;const f=s[r+1],m=[];for(let d=0,v=i.length;d<v;++d){const s=i[d];for(c=t[s-n],p=t[s-n+1],a=e;a<s;a+=n)u=t[a],g=t[a+1],(f<=p&&g<=f||p<=f&&f<=g)&&(h=(f-p)/(g-p)*(u-c)+c,m.push(h)),c=u,p=g}let y=NaN,_=-1/0;for(m.sort(d),c=m[0],a=1,l=m.length;a<l;++a){u=m[a];const s=Math.abs(u-c);s>_&&(h=(c+u)/2,Xn(t,e,i,n,h,f)&&(y=h,_=s)),c=u}return isNaN(y)&&(y=s[r]),o?(o.push(y,f,_),o):[y,f,_]}function Wn(t,e,i,n,s){let r;for(e+=n;e<i;e+=n)if(r=s(t.slice(e-n,e),t.slice(e,e+n)),r)return r;return!1}function Yn(t,e,i,n,s,r){return r=null!==r&&void 0!==r?r:Yt(Bt(),t,e,i,n),!!le(s,r)&&(r[0]>=s[0]&&r[2]<=s[2]||r[1]>=s[1]&&r[3]<=s[3]||Wn(t,e,i,n,(function(t,e){return ue(s,t,e)})))}function Un(t,e,i,n,s){return!!Yn(t,e,i,n,s)||(!!Hn(t,e,i,n,s[0],s[1])||(!!Hn(t,e,i,n,s[0],s[3])||(!!Hn(t,e,i,n,s[2],s[1])||!!Hn(t,e,i,n,s[2],s[3]))))}function Jn(t,e,i,n,s){if(!Un(t,e,i[0],n,s))return!1;if(1===i.length)return!0;for(let r=1,o=i.length;r<o;++r)if(Zn(t,i[r-1],i[r],n,s)&&!Yn(t,i[r-1],i[r],n,s))return!1;return!0}function $n(t,e,i,n){while(e<i-n){for(let s=0;s<n;++s){const r=t[e+s];t[e+s]=t[i-n+s],t[i-n+s]=r}e+=n,i-=n}}function qn(t,e,i,n){let s=0,r=t[i-n],o=t[i-n+1];for(;e<i;e+=n){const i=t[e],n=t[e+1];s+=(i-r)*(n+o),r=i,o=n}return 0===s?void 0:s>0}function Qn(t,e,i,n,s){s=void 0!==s&&s;for(let r=0,o=i.length;r<o;++r){const o=i[r],a=qn(t,e,o,n);if(0===r){if(s&&a||!s&&!a)return!1}else if(s&&!a||!s&&a)return!1;e=o}return!0}function ts(t,e,i,n,s){s=void 0!==s&&s;for(let r=0,o=i.length;r<o;++r){const o=i[r],a=qn(t,e,o,n),l=0===r?s&&a||!s&&!a:s&&!a||!s&&a;l&&$n(t,e,o,n),e=o}return e}class es extends bn{constructor(t,e,i){super(),this.ends_=[],this.flatInteriorPointRevision_=-1,this.flatInteriorPoint_=null,this.maxDelta_=-1,this.maxDeltaRevision_=-1,this.orientedRevision_=-1,this.orientedFlatCoordinates_=null,void 0!==e&&i?(this.setFlatCoordinates(e,t),this.ends_=i):this.setCoordinates(t,e)}appendLinearRing(t){this.flatCoordinates?g(this.flatCoordinates,t.getFlatCoordinates()):this.flatCoordinates=t.getFlatCoordinates().slice(),this.ends_.push(this.flatCoordinates.length),this.changed()}clone(){const t=new es(this.flatCoordinates.slice(),this.layout,this.ends_.slice());return t.applyProperties(this),t}closestPointXY(t,e,i,n){return n<Dt(this.getExtent(),t,e)?n:(this.maxDeltaRevision_!=this.getRevision()&&(this.maxDelta_=Math.sqrt(An(this.flatCoordinates,0,this.ends_,this.stride,0)),this.maxDeltaRevision_=this.getRevision()),Tn(this.flatCoordinates,0,this.ends_,this.stride,this.maxDelta_,!0,t,e,i,n))}containsXY(t,e){return Xn(this.getOrientedFlatCoordinates(),0,this.ends_,this.stride,t,e)}getArea(){return En(this.getOrientedFlatCoordinates(),0,this.ends_,this.stride)}getCoordinates(t){let e;return void 0!==t?(e=this.getOrientedFlatCoordinates().slice(),ts(e,0,this.ends_,this.stride,t)):e=this.flatCoordinates,kn(e,0,this.ends_,this.stride)}getEnds(){return this.ends_}getFlatInteriorPoint(){if(this.flatInteriorPointRevision_!=this.getRevision()){const t=te(this.getExtent());this.flatInteriorPoint_=Kn(this.getOrientedFlatCoordinates(),0,this.ends_,this.stride,t,0),this.flatInteriorPointRevision_=this.getRevision()}return this.flatInteriorPoint_}getInteriorPoint(){return new Vn(this.getFlatInteriorPoint(),"XYM")}getLinearRingCount(){return this.ends_.length}getLinearRing(t){return t<0||this.ends_.length<=t?null:new Bn(this.flatCoordinates.slice(0===t?0:this.ends_[t-1],this.ends_[t]),this.layout)}getLinearRings(){const t=this.layout,e=this.flatCoordinates,i=this.ends_,n=[];let s=0;for(let r=0,o=i.length;r<o;++r){const o=i[r],a=new Bn(e.slice(s,o),t);n.push(a),s=o}return n}getOrientedFlatCoordinates(){if(this.orientedRevision_!=this.getRevision()){const t=this.flatCoordinates;Qn(t,0,this.ends_,this.stride)?this.orientedFlatCoordinates_=t:(this.orientedFlatCoordinates_=t.slice(),this.orientedFlatCoordinates_.length=ts(this.orientedFlatCoordinates_,0,this.ends_,this.stride)),this.orientedRevision_=this.getRevision()}return this.orientedFlatCoordinates_}getSimplifiedGeometryInternal(t){const e=[],i=[];return e.length=jn(this.flatCoordinates,0,this.ends_,this.stride,Math.sqrt(t),e,0,i),new es(e,"XY",i)}getType(){return"Polygon"}intersectsExtent(t){return Jn(this.getOrientedFlatCoordinates(),0,this.ends_,this.stride,t)}setCoordinates(t,e){this.setLayout(e,t,2),this.flatCoordinates||(this.flatCoordinates=[]);const i=Ln(this.flatCoordinates,0,t,this.stride,this.ends_);this.flatCoordinates.length=0===i.length?0:i[i.length-1],this.changed()}}var is=es;function ns(t){if(he(t))throw new Error("Cannot create polygon from empty extent");const e=t[0],i=t[1],n=t[2],s=t[3],r=[e,i,e,s,n,s,n,i,e,i];return new es(r,"XY",[r.length])}function ss(t,e,i,n){const s=ae(e)/i[0],r=ne(e)/i[1];return n?Math.min(t,Math.max(s,r)):Math.min(t,Math.min(s,r))}function rs(t,e,i){let n=Math.min(t,e);const s=50;return n*=Math.log(1+s*Math.max(0,t/e-1))/s+1,i&&(n=Math.max(n,i),n/=Math.log(1+s*Math.max(0,i/t-1))/s+1),_t(n,i/2,2*e)}function os(t,e,i,n){return e=void 0===e||e,function(s,r,o,a){if(void 0!==s){const l=t[0],h=t[t.length-1],c=i?ss(l,i,o,n):l;if(a)return e?rs(s,c,h):_t(s,h,c);const u=Math.min(c,s),d=Math.floor(p(t,u,r));return t[d]>c&&d<t.length-1?t[d+1]:t[d]}}}function as(t,e,i,n,s,r){return n=void 0===n||n,i=void 0!==i?i:0,function(o,a,l,h){if(void 0!==o){const c=s?ss(e,s,l,r):e;if(h)return n?rs(o,c,i):_t(o,i,c);const u=1e-9,d=Math.ceil(Math.log(e/c)/Math.log(t)-u),p=-a*(.5-u)+.5,g=Math.min(c,o),f=Math.floor(Math.log(e/g)/Math.log(t)+p),m=Math.max(d,f),y=e/Math.pow(t,m);return _t(y,i,c)}}}function ls(t,e,i,n,s){return i=void 0===i||i,function(r,o,a,l){if(void 0!==r){const o=n?ss(t,n,a,s):t;return i&&l?rs(r,o,e):_t(r,e,o)}}}function hs(t){if(void 0!==t)return 0}function cs(t){if(void 0!==t)return t}function us(t){const e=2*Math.PI/t;return function(t,i){return i?t:void 0!==t?(t=Math.floor(t/e+.5)*e,t):void 0}}function ds(t){const e=void 0===t?Mt(5):t;return function(t,i){return i||void 0===t?t:Math.abs(t)<=e?0:t}}const ps=256,gs=0;class fs extends j{constructor(t){super(),this.on,this.once,this.un,t=Object.assign({},t),this.hints_=[0,0],this.animations_=[],this.updateAnimationKey_,this.projection_=Bi(t.projection,"EPSG:3857"),this.viewportSize_=[100,100],this.targetCenter_=null,this.targetResolution_,this.targetRotation_,this.nextCenter_=null,this.nextResolution_,this.nextRotation_,this.cancelAnchor_=void 0,t.projection&&Li(),t.center&&(t.center=$i(t.center,this.projection_)),t.extent&&(t.extent=Qi(t.extent,this.projection_)),this.applyOptions_(t)}applyOptions_(t){const e=Object.assign({},t);for(const o in yt)delete e[o];this.setProperties(e,!0);const i=_s(t);this.maxResolution_=i.maxResolution,this.minResolution_=i.minResolution,this.zoomFactor_=i.zoomFactor,this.resolutions_=t.resolutions,this.padding_=t.padding,this.minZoom_=i.minZoom;const n=ys(t),s=i.constraint,r=vs(t);this.constraints_={center:n,resolution:s,rotation:r},this.setRotation(void 0!==t.rotation?t.rotation:0),this.setCenterInternal(void 0!==t.center?t.center:null),void 0!==t.resolution?this.setResolution(t.resolution):void 0!==t.zoom&&this.setZoom(t.zoom)}get padding(){return this.padding_}set padding(t){let e=this.padding_;this.padding_=t;const i=this.getCenterInternal();if(i){const n=t||[0,0,0,0];e=e||[0,0,0,0];const s=this.getResolution(),r=s/2*(n[3]-e[3]+e[1]-n[1]),o=s/2*(n[0]-e[0]+e[2]-n[2]);this.setCenterInternal([i[0]+r,i[1]-o])}}getUpdatedOptions_(t){const e=this.getProperties();return void 0!==e.resolution?e.resolution=this.getResolution():e.zoom=this.getZoom(),e.center=this.getCenterInternal(),e.rotation=this.getRotation(),Object.assign({},e,t)}animate(t){this.isDef()&&!this.getAnimating()&&this.resolveConstraints(0);const e=new Array(arguments.length);for(let i=0;i<e.length;++i){let t=arguments[i];t.center&&(t=Object.assign({},t),t.center=$i(t.center,this.getProjection())),t.anchor&&(t=Object.assign({},t),t.anchor=$i(t.anchor,this.getProjection())),e[i]=t}this.animateInternal.apply(this,e)}animateInternal(t){let e,i=arguments.length;i>1&&"function"===typeof arguments[i-1]&&(e=arguments[i-1],--i);let n=0;for(;n<i&&!this.isDef();++n){const t=arguments[n];t.center&&this.setCenterInternal(t.center),void 0!==t.zoom?this.setZoom(t.zoom):t.resolution&&this.setResolution(t.resolution),void 0!==t.rotation&&this.setRotation(t.rotation)}if(n===i)return void(e&&ms(e,!0));let s=Date.now(),r=this.targetCenter_.slice(),o=this.targetResolution_,a=this.targetRotation_;const l=[];for(;n<i;++n){const t=arguments[n],i={start:s,complete:!1,anchor:t.anchor,duration:void 0!==t.duration?t.duration:1e3,easing:t.easing||xe,callback:e};if(t.center&&(i.sourceCenter=r,i.targetCenter=t.center.slice(),r=i.targetCenter),void 0!==t.zoom?(i.sourceResolution=o,i.targetResolution=this.getResolutionForZoom(t.zoom),o=i.targetResolution):t.resolution&&(i.sourceResolution=o,i.targetResolution=t.resolution,o=i.targetResolution),void 0!==t.rotation){i.sourceRotation=a;const e=Et(t.rotation-a+Math.PI,2*Math.PI)-Math.PI;i.targetRotation=a+e,a=i.targetRotation}ws(i)?i.complete=!0:s+=i.duration,l.push(i)}this.animations_.push(l),this.setHint(mt.ANIMATING,1),this.updateAnimations_()}getAnimating(){return this.hints_[mt.ANIMATING]>0}getInteracting(){return this.hints_[mt.INTERACTING]>0}cancelAnimations(){let t;this.setHint(mt.ANIMATING,-this.hints_[mt.ANIMATING]);for(let e=0,i=this.animations_.length;e<i;++e){const i=this.animations_[e];if(i[0].callback&&ms(i[0].callback,!1),!t)for(let e=0,n=i.length;e<n;++e){const n=i[e];if(!n.complete){t=n.anchor;break}}}this.animations_.length=0,this.cancelAnchor_=t,this.nextCenter_=null,this.nextResolution_=NaN,this.nextRotation_=NaN}updateAnimations_(){if(void 0!==this.updateAnimationKey_&&(cancelAnimationFrame(this.updateAnimationKey_),this.updateAnimationKey_=void 0),!this.getAnimating())return;const t=Date.now();let e=!1;for(let i=this.animations_.length-1;i>=0;--i){const n=this.animations_[i];let s=!0;for(let i=0,r=n.length;i<r;++i){const r=n[i];if(r.complete)continue;const o=t-r.start;let a=r.duration>0?o/r.duration:1;a>=1?(r.complete=!0,a=1):s=!1;const l=r.easing(a);if(r.sourceCenter){const t=r.sourceCenter[0],e=r.sourceCenter[1],i=r.targetCenter[0],n=r.targetCenter[1];this.nextCenter_=r.targetCenter;const s=t+l*(i-t),o=e+l*(n-e);this.targetCenter_=[s,o]}if(r.sourceResolution&&r.targetResolution){const t=1===l?r.targetResolution:r.sourceResolution+l*(r.targetResolution-r.sourceResolution);if(r.anchor){const e=this.getViewportSize_(this.getRotation()),i=this.constraints_.resolution(t,0,e,!0);this.targetCenter_=this.calculateCenterZoom(i,r.anchor)}this.nextResolution_=r.targetResolution,this.targetResolution_=t,this.applyTargetState_(!0)}if(void 0!==r.sourceRotation&&void 0!==r.targetRotation){const t=1===l?Et(r.targetRotation+Math.PI,2*Math.PI)-Math.PI:r.sourceRotation+l*(r.targetRotation-r.sourceRotation);if(r.anchor){const e=this.constraints_.rotation(t,!0);this.targetCenter_=this.calculateCenterRotate(e,r.anchor)}this.nextRotation_=r.targetRotation,this.targetRotation_=t}if(this.applyTargetState_(!0),e=!0,!r.complete)break}if(s){this.animations_[i]=null,this.setHint(mt.ANIMATING,-1),this.nextCenter_=null,this.nextResolution_=NaN,this.nextRotation_=NaN;const t=n[0].callback;t&&ms(t,!0)}}this.animations_=this.animations_.filter(Boolean),e&&void 0===this.updateAnimationKey_&&(this.updateAnimationKey_=requestAnimationFrame(this.updateAnimations_.bind(this)))}calculateCenterRotate(t,e){let i;const n=this.getCenterInternal();return void 0!==n&&(i=[n[0]-e[0],n[1]-e[1]],fe(i,t-this.getRotation()),pe(i,e)),i}calculateCenterZoom(t,e){let i;const n=this.getCenterInternal(),s=this.getResolution();if(void 0!==n&&void 0!==s){const r=e[0]-t*(e[0]-n[0])/s,o=e[1]-t*(e[1]-n[1])/s;i=[r,o]}return i}getViewportSize_(t){const e=this.viewportSize_;if(t){const i=e[0],n=e[1];return[Math.abs(i*Math.cos(t))+Math.abs(n*Math.sin(t)),Math.abs(i*Math.sin(t))+Math.abs(n*Math.cos(t))]}return e}setViewportSize(t){this.viewportSize_=Array.isArray(t)?t.slice():[100,100],this.getAnimating()||this.resolveConstraints(0)}getCenter(){const t=this.getCenterInternal();return t?Ji(t,this.getProjection()):t}getCenterInternal(){return this.get(yt.CENTER)}getConstraints(){return this.constraints_}getConstrainResolution(){return this.get("constrainResolution")}getHints(t){return void 0!==t?(t[0]=this.hints_[0],t[1]=this.hints_[1],t):this.hints_.slice()}calculateExtent(t){const e=this.calculateExtentInternal(t);return qi(e,this.getProjection())}calculateExtentInternal(t){t=t||this.getViewportSizeMinusPadding_();const e=this.getCenterInternal();ht(e,"The view center is not defined");const i=this.getResolution();ht(void 0!==i,"The view resolution is not defined");const n=this.getRotation();return ht(void 0!==n,"The view rotation is not defined"),ee(e,i,n,t)}getMaxResolution(){return this.maxResolution_}getMinResolution(){return this.minResolution_}getMaxZoom(){return this.getZoomForResolution(this.minResolution_)}setMaxZoom(t){this.applyOptions_(this.getUpdatedOptions_({maxZoom:t}))}getMinZoom(){return this.getZoomForResolution(this.maxResolution_)}setMinZoom(t){this.applyOptions_(this.getUpdatedOptions_({minZoom:t}))}setConstrainResolution(t){this.applyOptions_(this.getUpdatedOptions_({constrainResolution:t}))}getProjection(){return this.projection_}getResolution(){return this.get(yt.RESOLUTION)}getResolutions(){return this.resolutions_}getResolutionForExtent(t,e){return this.getResolutionForExtentInternal(Qi(t,this.getProjection()),e)}getResolutionForExtentInternal(t,e){e=e||this.getViewportSizeMinusPadding_();const i=ae(t)/e[0],n=ne(t)/e[1];return Math.max(i,n)}getResolutionForValueFunction(t){t=t||2;const e=this.getConstrainedResolution(this.maxResolution_),i=this.minResolution_,n=Math.log(e/i)/Math.log(t);return function(i){const s=e/Math.pow(t,i*n);return s}}getRotation(){return this.get(yt.ROTATION)}getValueForResolutionFunction(t){const e=Math.log(t||2),i=this.getConstrainedResolution(this.maxResolution_),n=this.minResolution_,s=Math.log(i/n)/e;return function(t){const n=Math.log(i/t)/e/s;return n}}getViewportSizeMinusPadding_(t){let e=this.getViewportSize_(t);const i=this.padding_;return i&&(e=[e[0]-i[1]-i[3],e[1]-i[0]-i[2]]),e}getState(){const t=this.getProjection(),e=this.getResolution(),i=this.getRotation();let n=this.getCenterInternal();const s=this.padding_;if(s){const t=this.getViewportSizeMinusPadding_();n=xs(n,this.getViewportSize_(),[t[0]/2+s[3],t[1]/2+s[0]],e,i)}return{center:n.slice(0),projection:void 0!==t?t:null,resolution:e,nextCenter:this.nextCenter_,nextResolution:this.nextResolution_,nextRotation:this.nextRotation_,rotation:i,zoom:this.getZoom()}}getViewStateAndExtent(){return{viewState:this.getState(),extent:this.calculateExtent()}}getZoom(){let t;const e=this.getResolution();return void 0!==e&&(t=this.getZoomForResolution(e)),t}getZoomForResolution(t){let e,i,n=this.minZoom_||0;if(this.resolutions_){const s=p(this.resolutions_,t,1);n=s,e=this.resolutions_[s],i=s==this.resolutions_.length-1?2:e/this.resolutions_[s+1]}else e=this.maxResolution_,i=this.zoomFactor_;return n+Math.log(e/t)/Math.log(i)}getResolutionForZoom(t){var e;if(null!==(e=this.resolutions_)&&void 0!==e&&e.length){if(1===this.resolutions_.length)return this.resolutions_[0];const e=_t(Math.floor(t),0,this.resolutions_.length-2),i=this.resolutions_[e]/this.resolutions_[e+1];return this.resolutions_[e]/Math.pow(i,_t(t-e,0,1))}return this.maxResolution_/Math.pow(this.zoomFactor_,t-this.minZoom_)}fit(t,e){let i;if(ht(Array.isArray(t)||"function"===typeof t.getSimplifiedGeometry,"Invalid extent or geometry provided as `geometry`"),Array.isArray(t)){ht(!he(t),"Cannot fit empty extent provided as `geometry`");const e=Qi(t,this.getProjection());i=ns(e)}else if("Circle"===t.getType()){const e=Qi(t.getExtent(),this.getProjection());i=ns(e),i.rotate(this.getRotation(),te(e))}else{const e=Ui();i=e?t.clone().transform(e,this.getProjection()):t}this.fitInternal(i,e)}rotatedExtentForGeometry(t){const e=this.getRotation(),i=Math.cos(e),n=Math.sin(-e),s=t.getFlatCoordinates(),r=t.getStride();let o=1/0,a=1/0,l=-1/0,h=-1/0;for(let c=0,u=s.length;c<u;c+=r){const t=s[c]*i-s[c+1]*n,e=s[c]*n+s[c+1]*i;o=Math.min(o,t),a=Math.min(a,e),l=Math.max(l,t),h=Math.max(h,e)}return[o,a,l,h]}fitInternal(t,e){e=e||{};let i=e.size;i||(i=this.getViewportSizeMinusPadding_());const n=void 0!==e.padding?e.padding:[0,0,0,0],s=void 0!==e.nearest&&e.nearest;let r;r=void 0!==e.minResolution?e.minResolution:void 0!==e.maxZoom?this.getResolutionForZoom(e.maxZoom):0;const o=this.rotatedExtentForGeometry(t);let a=this.getResolutionForExtentInternal(o,[i[0]-n[1]-n[3],i[1]-n[0]-n[2]]);a=isNaN(a)?r:Math.max(a,r),a=this.getConstrainedResolution(a,s?0:1);const l=this.getRotation(),h=Math.sin(l),c=Math.cos(l),u=te(o);u[0]+=(n[1]-n[3])/2*a,u[1]+=(n[0]-n[2])/2*a;const d=u[0]*c-u[1]*h,p=u[1]*c+u[0]*h,g=this.getConstrainedCenter([d,p],a),f=e.callback?e.callback:_;void 0!==e.duration?this.animateInternal({resolution:a,center:g,duration:e.duration,easing:e.easing},f):(this.targetResolution_=a,this.targetCenter_=g,this.applyTargetState_(!1,!0),ms(f,!0))}centerOn(t,e,i){this.centerOnInternal($i(t,this.getProjection()),e,i)}centerOnInternal(t,e,i){this.setCenterInternal(xs(t,e,i,this.getResolution(),this.getRotation()))}calculateCenterShift(t,e,i,n){let s;const r=this.padding_;if(r&&t){const o=this.getViewportSizeMinusPadding_(-i),a=xs(t,n,[o[0]/2+r[3],o[1]/2+r[0]],e,i);s=[t[0]-a[0],t[1]-a[1]]}return s}isDef(){return!!this.getCenterInternal()&&void 0!==this.getResolution()}adjustCenter(t){const e=Ji(this.targetCenter_,this.getProjection());this.setCenter([e[0]+t[0],e[1]+t[1]])}adjustCenterInternal(t){const e=this.targetCenter_;this.setCenterInternal([e[0]+t[0],e[1]+t[1]])}adjustResolution(t,e){e=e&&$i(e,this.getProjection()),this.adjustResolutionInternal(t,e)}adjustResolutionInternal(t,e){const i=this.getAnimating()||this.getInteracting(),n=this.getViewportSize_(this.getRotation()),s=this.constraints_.resolution(this.targetResolution_*t,0,n,i);e&&(this.targetCenter_=this.calculateCenterZoom(s,e)),this.targetResolution_*=t,this.applyTargetState_()}adjustZoom(t,e){this.adjustResolution(Math.pow(this.zoomFactor_,-t),e)}adjustRotation(t,e){e&&(e=$i(e,this.getProjection())),this.adjustRotationInternal(t,e)}adjustRotationInternal(t,e){const i=this.getAnimating()||this.getInteracting(),n=this.constraints_.rotation(this.targetRotation_+t,i);e&&(this.targetCenter_=this.calculateCenterRotate(n,e)),this.targetRotation_+=t,this.applyTargetState_()}setCenter(t){this.setCenterInternal(t?$i(t,this.getProjection()):t)}setCenterInternal(t){this.targetCenter_=t,this.applyTargetState_()}setHint(t,e){return this.hints_[t]+=e,this.changed(),this.hints_[t]}setResolution(t){this.targetResolution_=t,this.applyTargetState_()}setRotation(t){this.targetRotation_=t,this.applyTargetState_()}setZoom(t){this.setResolution(this.getResolutionForZoom(t))}applyTargetState_(t,e){const i=this.getAnimating()||this.getInteracting()||e,n=this.constraints_.rotation(this.targetRotation_,i),s=this.getViewportSize_(n),r=this.constraints_.resolution(this.targetResolution_,0,s,i),o=this.constraints_.center(this.targetCenter_,r,s,i,this.calculateCenterShift(this.targetCenter_,r,n,s));this.get(yt.ROTATION)!==n&&this.set(yt.ROTATION,n),this.get(yt.RESOLUTION)!==r&&(this.set(yt.RESOLUTION,r),this.set("zoom",this.getZoom(),!0)),o&&this.get(yt.CENTER)&&ge(this.get(yt.CENTER),o)||this.set(yt.CENTER,o),this.getAnimating()&&!t&&this.cancelAnimations(),this.cancelAnchor_=void 0}resolveConstraints(t,e,i){t=void 0!==t?t:200;const n=e||0,s=this.constraints_.rotation(this.targetRotation_),r=this.getViewportSize_(s),o=this.constraints_.resolution(this.targetResolution_,n,r),a=this.constraints_.center(this.targetCenter_,o,r,!1,this.calculateCenterShift(this.targetCenter_,o,s,r));if(0===t&&!this.cancelAnchor_)return this.targetResolution_=o,this.targetRotation_=s,this.targetCenter_=a,void this.applyTargetState_();i=i||(0===t?this.cancelAnchor_:void 0),this.cancelAnchor_=void 0,this.getResolution()===o&&this.getRotation()===s&&this.getCenterInternal()&&ge(this.getCenterInternal(),a)||(this.getAnimating()&&this.cancelAnimations(),this.animateInternal({rotation:s,center:a,resolution:o,duration:t,easing:we,anchor:i}))}beginInteraction(){this.resolveConstraints(0),this.setHint(mt.INTERACTING,1)}endInteraction(t,e,i){i=i&&$i(i,this.getProjection()),this.endInteractionInternal(t,e,i)}endInteractionInternal(t,e,i){this.getInteracting()&&(this.setHint(mt.INTERACTING,-1),this.resolveConstraints(t,e,i))}getConstrainedCenter(t,e){const i=this.getViewportSize_(this.getRotation());return this.constraints_.center(t,e||this.getResolution(),i)}getConstrainedZoom(t,e){const i=this.getResolutionForZoom(t);return this.getZoomForResolution(this.getConstrainedResolution(i,e))}getConstrainedResolution(t,e){e=e||0;const i=this.getViewportSize_(this.getRotation());return this.constraints_.resolution(t,e,i)}}function ms(t,e){setTimeout((function(){t(e)}),0)}function ys(t){if(void 0!==t.extent){const e=void 0===t.smoothExtentConstraint||t.smoothExtentConstraint;return Tt(t.extent,t.constrainOnlyCenter,e)}const e=Bi(t.projection,"EPSG:3857");if(!0!==t.multiWorld&&e.isGlobal()){const t=e.getExtent().slice();return t[0]=-1/0,t[2]=1/0,Tt(t,!1,!1)}return Rt}function _s(t){let e,i,n;const s=28,r=2;let o=void 0!==t.minZoom?t.minZoom:gs,a=void 0!==t.maxZoom?t.maxZoom:s;const l=void 0!==t.zoomFactor?t.zoomFactor:r,h=void 0!==t.multiWorld&&t.multiWorld,c=void 0===t.smoothResolutionConstraint||t.smoothResolutionConstraint,u=void 0!==t.showFullExtent&&t.showFullExtent,d=Bi(t.projection,"EPSG:3857"),p=d.getExtent();let g=t.constrainOnlyCenter,f=t.extent;if(h||f||!d.isGlobal()||(g=!1,f=p),void 0!==t.resolutions){const s=t.resolutions;i=s[o],n=void 0!==s[a]?s[a]:s[s.length-1],e=t.constrainResolution?os(s,c,!g&&f,u):ls(i,n,c,!g&&f,u)}else{const h=p?Math.max(ae(p),ne(p)):360*Se.degrees/d.getMetersPerUnit(),m=h/ps/Math.pow(r,gs),y=m/Math.pow(r,s-gs);i=t.maxResolution,void 0!==i?o=0:i=m/Math.pow(l,o),n=t.minResolution,void 0===n&&(n=void 0!==t.maxZoom?void 0!==t.maxResolution?i/Math.pow(l,a):m/Math.pow(l,a):y),a=o+Math.floor(Math.log(i/n)/Math.log(l)),n=i/Math.pow(l,a-o),e=t.constrainResolution?as(l,i,n,c,!g&&f,u):ls(i,n,c,!g&&f,u)}return{constraint:e,maxResolution:i,minResolution:n,minZoom:o,zoomFactor:l}}function vs(t){const e=void 0===t.enableRotation||t.enableRotation;if(e){const e=t.constrainRotation;return void 0===e||!0===e?ds():!1===e?cs:"number"===typeof e?us(e):cs}return hs}function ws(t){return!(t.sourceCenter&&t.targetCenter&&!ge(t.sourceCenter,t.targetCenter))&&(t.sourceResolution===t.targetResolution&&t.sourceRotation===t.targetRotation)}function xs(t,e,i,n,s){const r=Math.cos(-s);let o=Math.sin(-s),a=t[0]*r-t[1]*o,l=t[1]*r+t[0]*o;a+=(e[0]/2-i[0])*n,l+=(i[1]-e[1]/2)*n,o=-o;const h=a*r-l*o,c=l*r+a*o;return[h,c]}var bs=fs;i("cd1a"),i("9a9a");const Ms="ol-hidden",Es="ol-unselectable",Cs="ol-control",Ps="ol-collapsed",As=new RegExp(["^\\s*(?=(?:(?:[-a-z]+\\s*){0,2}(italic|oblique))?)","(?=(?:(?:[-a-z]+\\s*){0,2}(small-caps))?)","(?=(?:(?:[-a-z]+\\s*){0,2}(bold(?:er)?|lighter|[1-9]00 ))?)","(?:(?:normal|\\1|\\2|\\3)\\s*){0,3}((?:xx?-)?","(?:small|large)|medium|smaller|larger|[\\.\\d]+(?:\\%|in|[cem]m|ex|p[ctx]))","(?:\\s*\\/\\s*(normal|[\\.\\d]+(?:\\%|in|[cem]m|ex|p[ctx])?))","?\\s*([-,\\\"\\'\\sa-z0-9]+?)\\s*$"].join(""),"i"),Ss=["style","variant","weight","size","lineHeight","family"],Ts={normal:400,bold:700},Rs=function(t){const e=t.match(As);if(!e)return null;const i={lineHeight:"normal",size:"1.2em",style:"normal",weight:"400",variant:"normal"};for(let n=0,s=Ss.length;n<s;++n){const t=e[n+1];void 0!==t&&(i[Ss[n]]="string"===typeof t?t.trim():t)}return isNaN(Number(i.weight))&&i.weight in Ts&&(i.weight=Ts[i.weight]),i.families=i.family.split(/,\s?/).map(t=>t.trim().replace(/^['"]|['"]$/g,"")),i};function Is(t){return Is="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Is(t)}function Ls(t,e){if("object"!=Is(t)||!t)return t;var i=t[Symbol.toPrimitive];if(void 0!==i){var n=i.call(t,e||"default");if("object"!=Is(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}function Os(t){var e=Ls(t,"string");return"symbol"==Is(e)?e:e+""}function ks(t,e,i){return(e=Os(e))in t?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i,t}function Ds(t,e,i,n){let s;return s=i&&i.length?i.shift():Q?new class extends OffscreenCanvas{constructor(...t){super(...t),ks(this,"style",{})}}(null!==t&&void 0!==t?t:300,null!==e&&void 0!==e?e:150):document.createElement("canvas"),t&&(s.width=t),e&&(s.height=e),s.getContext("2d",n)}let Ns;function Gs(){return Ns||(Ns=Ds(1,1)),Ns}function js(t){const e=t.canvas;e.width=1,e.height=1,t.clearRect(0,0,1,1)}function Fs(t,e){const i=e.parentNode;i&&i.replaceChild(t,e)}function Bs(t){while(t.lastChild)t.lastChild.remove()}function zs(t,e){const i=t.childNodes;for(let n=0;1;++n){const s=i[n],r=e[n];if(!s&&!r)break;s!==r&&(s?r?t.insertBefore(r,s):(t.removeChild(s),--n):t.appendChild(r))}}function Vs(){const t=new Proxy({childNodes:[],appendChild:function(t){return this.childNodes.push(t),t},remove:function(){},removeChild:function(t){const e=this.childNodes.indexOf(t);if(-1===e)throw new Error("Node to remove was not found");return this.childNodes.splice(e,1),t},insertBefore:function(t,e){const i=this.childNodes.indexOf(e);if(-1===i)throw new Error("Reference node not found");return this.childNodes.splice(i,0,t),t},style:{}},{get(t,e,i){return"firstElementChild"===e?t.childNodes.length>0?t.childNodes[0]:null:Reflect.get(t,e,i)}});return t}function Zs(t){return"undefined"!==typeof HTMLCanvasElement&&t instanceof HTMLCanvasElement||"undefined"!==typeof OffscreenCanvas&&t instanceof OffscreenCanvas}class Hs extends j{constructor(t){super();const e=t.element;!e||t.target||e.style.pointerEvents||(e.style.pointerEvents="auto"),this.element=e||null,this.target_=null,this.map_=null,this.listenerKeys=[],t.render&&(this.render=t.render),t.target&&this.setTarget(t.target)}disposeInternal(){var t;null===(t=this.element)||void 0===t||t.remove(),super.disposeInternal()}getMap(){return this.map_}setMap(t){var e;this.map_&&(null===(e=this.element)||void 0===e||e.remove());for(let n=0,s=this.listenerKeys.length;n<s;++n)T(this.listenerKeys[n]);if(this.listenerKeys.length=0,this.map_=t,t){var i;const e=null!==(i=this.target_)&&void 0!==i?i:t.getOverlayContainerStopEvent();this.element&&e.appendChild(this.element),this.render!==_&&this.listenerKeys.push(A(t,ot.POSTRENDER,this.render,this)),t.render()}}render(t){}setTarget(t){this.target_="string"===typeof t?document.getElementById(t):t}}var Xs=Hs;class Ks extends Xs{constructor(t){t=t||{},super({element:document.createElement("div"),render:t.render,target:t.target}),this.ulElement_=document.createElement("ul"),this.collapsed_=void 0===t.collapsed||t.collapsed,this.userCollapsed_=this.collapsed_,this.overrideCollapsible_=void 0!==t.collapsible,this.collapsible_=void 0===t.collapsible||t.collapsible,this.collapsible_||(this.collapsed_=!1),this.attributions_=t.attributions;const e=void 0!==t.className?t.className:"ol-attribution",i=void 0!==t.tipLabel?t.tipLabel:"Attributions",n=void 0!==t.expandClassName?t.expandClassName:e+"-expand",s=void 0!==t.collapseLabel?t.collapseLabel:"›",r=void 0!==t.collapseClassName?t.collapseClassName:e+"-collapse";"string"===typeof s?(this.collapseLabel_=document.createElement("span"),this.collapseLabel_.textContent=s,this.collapseLabel_.className=r):this.collapseLabel_=s;const o=void 0!==t.label?t.label:"i";"string"===typeof o?(this.label_=document.createElement("span"),this.label_.textContent=o,this.label_.className=n):this.label_=o;const a=this.collapsible_&&!this.collapsed_?this.collapseLabel_:this.label_;this.toggleButton_=document.createElement("button"),this.toggleButton_.setAttribute("type","button"),this.toggleButton_.setAttribute("aria-expanded",String(!this.collapsed_)),this.toggleButton_.title=i,this.toggleButton_.appendChild(a),this.toggleButton_.addEventListener(h.CLICK,this.handleClick_.bind(this),!1);const l=e+" "+Es+" "+Cs+(this.collapsed_&&this.collapsible_?" "+Ps:"")+(this.collapsible_?"":" ol-uncollapsible"),c=this.element;c.className=l,c.appendChild(this.toggleButton_),c.appendChild(this.ulElement_),this.renderedAttributions_=[],this.renderedVisible_=!0}collectSourceAttributions_(t){const e=this.getMap().getAllLayers(),i=new Set(e.flatMap(e=>e.getAttributions(t)));if(void 0!==this.attributions_&&(Array.isArray(this.attributions_)?this.attributions_.forEach(t=>i.add(t)):i.add(this.attributions_)),!this.overrideCollapsible_){const t=!e.some(t=>{var e;return!1===(null===(e=t.getSource())||void 0===e?void 0:e.getAttributionsCollapsible())});this.setCollapsible(t)}return Array.from(i)}async updateElement_(t){if(!t)return void(this.renderedVisible_&&(this.element.style.display="none",this.renderedVisible_=!1));const e=await Promise.all(this.collectSourceAttributions_(t).map(t=>w(()=>t))),i=e.length>0;if(this.renderedVisible_!=i&&(this.element.style.display=i?"":"none",this.renderedVisible_=i),!f(e,this.renderedAttributions_)){Bs(this.ulElement_);for(let t=0,i=e.length;t<i;++t){const i=document.createElement("li");i.innerHTML=e[t],this.ulElement_.appendChild(i)}this.renderedAttributions_=e}}handleClick_(t){t.preventDefault(),this.handleToggle_(),this.userCollapsed_=this.collapsed_}handleToggle_(){this.element.classList.toggle(Ps),this.collapsed_?Fs(this.collapseLabel_,this.label_):Fs(this.label_,this.collapseLabel_),this.collapsed_=!this.collapsed_,this.toggleButton_.setAttribute("aria-expanded",String(!this.collapsed_))}getCollapsible(){return this.collapsible_}setCollapsible(t){this.collapsible_!==t&&(this.collapsible_=t,this.element.classList.toggle("ol-uncollapsible"),this.userCollapsed_&&this.handleToggle_())}setCollapsed(t){this.userCollapsed_=t,this.collapsible_&&this.collapsed_!==t&&this.handleToggle_()}getCollapsed(){return this.collapsed_}render(t){this.updateElement_(t.frameState)}}var Ws=Ks;class Ys extends Xs{constructor(t){t=t||{},super({element:document.createElement("div"),render:t.render,target:t.target});const e=void 0!==t.className?t.className:"ol-rotate",i=void 0!==t.label?t.label:"⇧",n=void 0!==t.compassClassName?t.compassClassName:"ol-compass";this.label_=null,"string"===typeof i?(this.label_=document.createElement("span"),this.label_.className=n,this.label_.textContent=i):(this.label_=i,this.label_.classList.add(n));const s=t.tipLabel?t.tipLabel:"Reset rotation",r=document.createElement("button");r.className=e+"-reset",r.setAttribute("type","button"),r.title=s,r.appendChild(this.label_),r.addEventListener(h.CLICK,this.handleClick_.bind(this),!1);const o=e+" "+Es+" "+Cs,a=this.element;a.className=o,a.appendChild(r),this.callResetNorth_=t.resetNorth?t.resetNorth:void 0,this.duration_=void 0!==t.duration?t.duration:250,this.autoHide_=void 0===t.autoHide||t.autoHide,this.rotation_=void 0,this.autoHide_&&this.element.classList.add(Ms)}handleClick_(t){t.preventDefault(),void 0!==this.callResetNorth_?this.callResetNorth_():this.resetNorth_()}resetNorth_(){const t=this.getMap(),e=t.getView();if(!e)return;const i=e.getRotation();void 0!==i&&(this.duration_>0&&i%(2*Math.PI)!==0?e.animate({rotation:0,duration:this.duration_,easing:we}):e.setRotation(0))}render(t){const e=t.frameState;if(!e)return;const i=e.viewState.rotation;if(i!=this.rotation_){const t="rotate("+i+"rad)";if(this.autoHide_){const t=this.element.classList.contains(Ms);t||0!==i?t&&0!==i&&this.element.classList.remove(Ms):this.element.classList.add(Ms)}this.label_.style.transform=t}this.rotation_=i}}var Us=Ys;class Js extends Xs{constructor(t){t=t||{},super({element:document.createElement("div"),target:t.target});const e=void 0!==t.className?t.className:"ol-zoom",i=void 0!==t.delta?t.delta:1,n=void 0!==t.zoomInClassName?t.zoomInClassName:e+"-in",s=void 0!==t.zoomOutClassName?t.zoomOutClassName:e+"-out",r=void 0!==t.zoomInLabel?t.zoomInLabel:"+",o=void 0!==t.zoomOutLabel?t.zoomOutLabel:"–",a=void 0!==t.zoomInTipLabel?t.zoomInTipLabel:"Zoom in",l=void 0!==t.zoomOutTipLabel?t.zoomOutTipLabel:"Zoom out",c=document.createElement("button");c.className=n,c.setAttribute("type","button"),c.title=a,c.appendChild("string"===typeof r?document.createTextNode(r):r),c.addEventListener(h.CLICK,this.handleClick_.bind(this,i),!1);const u=document.createElement("button");u.className=s,u.setAttribute("type","button"),u.title=l,u.appendChild("string"===typeof o?document.createTextNode(o):o),u.addEventListener(h.CLICK,this.handleClick_.bind(this,-i),!1);const d=e+" "+Es+" "+Cs,p=this.element;p.className=d,p.appendChild(c),p.appendChild(u),this.duration_=void 0!==t.duration?t.duration:250}handleClick_(t,e){e.preventDefault(),this.zoomByDelta_(t)}zoomByDelta_(t){const e=this.getMap(),i=e.getView();if(!i)return;const n=i.getZoom();if(void 0!==n){const e=i.getConstrainedZoom(n+t);this.duration_>0?(i.getAnimating()&&i.cancelAnimations(),i.animate({zoom:e,duration:this.duration_,easing:we})):i.setZoom(e)}}}var $s=Js;function qs(t){t=t||{};const e=new V,i=void 0===t.zoom||t.zoom;i&&e.push(new $s(t.zoomOptions));const n=void 0===t.rotate||t.rotate;n&&e.push(new Us(t.rotateOptions));const s=void 0===t.attribution||t.attribution;return s&&e.push(new Ws(t.attributionOptions)),e}class Qs{constructor(t,e,i){this.decay_=t,this.minVelocity_=e,this.delay_=i,this.points_=[],this.angle_=0,this.initialVelocity_=0}begin(){this.points_.length=0,this.angle_=0,this.initialVelocity_=0}update(t,e){this.points_.push(t,e,Date.now())}end(){if(this.points_.length<6)return!1;const t=Date.now()-this.delay_,e=this.points_.length-3;if(this.points_[e+2]<t)return!1;let i=e-3;while(i>0&&this.points_[i+2]>t)i-=3;const n=this.points_[e+2]-this.points_[i+2];if(n<1e3/60)return!1;const s=this.points_[e]-this.points_[i],r=this.points_[e+1]-this.points_[i+1];return this.angle_=Math.atan2(r,s),this.initialVelocity_=Math.sqrt(s*s+r*r)/n,this.initialVelocity_>this.minVelocity_}getDistance(){return(this.minVelocity_-this.initialVelocity_)/this.decay_}getAngle(){return this.angle_}}var tr=Qs,er={ACTIVE:"active"};class ir extends j{constructor(t){super(),this.on,this.once,this.un,t&&t.handleEvent&&(this.handleEvent=t.handleEvent),this.map_=null,this.setActive(!0)}getActive(){return this.get(er.ACTIVE)}getMap(){return this.map_}handleEvent(t){return!0}setActive(t){this.set(er.ACTIVE,t)}setMap(t){this.map_=t}}function nr(t,e,i){const n=t.getCenterInternal();if(n){const s=[n[0]+e[0],n[1]+e[1]];t.animateInternal({duration:void 0!==i?i:250,easing:be,center:t.getConstrainedCenter(s)})}}function sr(t,e,i,n){const s=t.getZoom();if(void 0===s)return;const r=t.getConstrainedZoom(s+e),o=t.getResolutionForZoom(r);t.getAnimating()&&t.cancelAnimations(),t.animate({resolution:o,anchor:i,duration:void 0!==n?n:250,easing:we})}var rr=ir;class or extends rr{constructor(t){super(),t=t||{},this.delta_=t.delta?t.delta:1,this.duration_=void 0!==t.duration?t.duration:250}handleEvent(t){let e=!1;if(t.type==W.DBLCLICK){const i=t.originalEvent,n=t.map,s=t.coordinate,r=i.shiftKey?-this.delta_:this.delta_,o=n.getView();sr(o,r,s,this.duration_),i.preventDefault(),e=!0}return!e}}var ar=or;function lr(t){const e=arguments;return function(t){let i=!0;for(let n=0,s=e.length;n<s;++n)if(i=i&&e[n](t),!i)break;return i}}const hr=function(t){const e=t.originalEvent;return e.altKey&&!(e.metaKey||e.ctrlKey)&&e.shiftKey},cr=function(t){const e=t.map.getTargetElement(),i=e.getRootNode(),n=t.map.getOwnerDocument().activeElement;return i instanceof ShadowRoot?i.host.contains(n):e.contains(n)},ur=function(t){const e=t.map.getTargetElement(),i=e.getRootNode(),n=i instanceof ShadowRoot?i.host:e;return!n.hasAttribute("tabindex")||cr(t)},dr=m,pr=function(t){const e=t.originalEvent;return"pointerId"in e&&0==e.button&&!(J&&$&&e.ctrlKey)},gr=function(t){const e=t.originalEvent;return!e.altKey&&!(e.metaKey||e.ctrlKey)&&!e.shiftKey},fr=function(t){const e=t.originalEvent;return $?e.metaKey:e.ctrlKey},mr=function(t){const e=t.originalEvent;return!e.altKey&&!(e.metaKey||e.ctrlKey)&&e.shiftKey},yr=function(t){const e=t.originalEvent,i=e.target.tagName;return"INPUT"!==i&&"SELECT"!==i&&"TEXTAREA"!==i&&!e.target.isContentEditable},_r=function(t){const e=t.originalEvent;return"pointerId"in e&&"mouse"==e.pointerType},vr=function(t){const e=t.originalEvent;return"pointerId"in e&&e.isPrimary&&0===e.button};class wr extends rr{constructor(t){t=t||{},super(t),t.handleDownEvent&&(this.handleDownEvent=t.handleDownEvent),t.handleDragEvent&&(this.handleDragEvent=t.handleDragEvent),t.handleMoveEvent&&(this.handleMoveEvent=t.handleMoveEvent),t.handleUpEvent&&(this.handleUpEvent=t.handleUpEvent),t.stopDown&&(this.stopDown=t.stopDown),this.handlingDownUpSequence=!1,this.targetPointers=[]}getPointerCount(){return this.targetPointers.length}handleDownEvent(t){return!1}handleDragEvent(t){}handleEvent(t){if(!t.originalEvent)return!0;let e=!1;if(this.updateTrackedPointers_(t),this.handlingDownUpSequence){if(t.type==W.POINTERDRAG)this.handleDragEvent(t),t.originalEvent.preventDefault();else if(t.type==W.POINTERUP){const e=this.handleUpEvent(t);this.handlingDownUpSequence=e&&this.targetPointers.length>0}}else if(t.type==W.POINTERDOWN){const i=this.handleDownEvent(t);this.handlingDownUpSequence=i,e=this.stopDown(i)}else t.type==W.POINTERMOVE&&this.handleMoveEvent(t);return!e}handleMoveEvent(t){}handleUpEvent(t){return!1}stopDown(t){return t}updateTrackedPointers_(t){t.activePointers&&(this.targetPointers=t.activePointers)}}function xr(t){const e=t.length;let i=0,n=0;for(let s=0;s<e;s++)i+=t[s].clientX,n+=t[s].clientY;return{clientX:i/e,clientY:n/e}}var br=wr;class Mr extends br{constructor(t){super({stopDown:y}),t=t||{},this.kinetic_=t.kinetic,this.lastCentroid=null,this.lastPointersCount_,this.panning_=!1;const e=t.condition?t.condition:lr(gr,vr);this.condition_=t.onFocusOnly?lr(ur,e):e,this.noKinetic_=!1}handleDragEvent(t){const e=t.map;this.panning_||(this.panning_=!0,e.getView().beginInteraction());const i=this.targetPointers,n=e.getEventPixel(xr(i));if(i.length==this.lastPointersCount_){if(this.kinetic_&&this.kinetic_.update(n[0],n[1]),this.lastCentroid){const e=[this.lastCentroid[0]-n[0],n[1]-this.lastCentroid[1]],i=t.map,s=i.getView();me(e,s.getResolution()),fe(e,s.getRotation()),s.adjustCenterInternal(e)}}else this.kinetic_&&this.kinetic_.begin();this.lastCentroid=n,this.lastPointersCount_=i.length,t.originalEvent.preventDefault()}handleUpEvent(t){const e=t.map,i=e.getView();if(0===this.targetPointers.length){if(!this.noKinetic_&&this.kinetic_&&this.kinetic_.end()){const t=this.kinetic_.getDistance(),n=this.kinetic_.getAngle(),s=i.getCenterInternal(),r=e.getPixelFromCoordinateInternal(s),o=e.getCoordinateFromPixelInternal([r[0]-t*Math.cos(n),r[1]-t*Math.sin(n)]);i.animateInternal({center:i.getConstrainedCenter(o),duration:500,easing:we})}return this.panning_&&(this.panning_=!1,i.endInteraction()),!1}return this.kinetic_&&this.kinetic_.begin(),this.lastCentroid=null,!0}handleDownEvent(t){if(this.targetPointers.length>0&&this.condition_(t)){const e=t.map,i=e.getView();return this.lastCentroid=null,i.getAnimating()&&i.cancelAnimations(),this.kinetic_&&this.kinetic_.begin(),this.noKinetic_=this.targetPointers.length>1,!0}return!1}}var Er=Mr;class Cr extends br{constructor(t){t=t||{},super({stopDown:y}),this.condition_=t.condition?t.condition:hr,this.lastAngle_=void 0,this.duration_=void 0!==t.duration?t.duration:250}handleDragEvent(t){if(!_r(t))return;const e=t.map,i=e.getView();if(i.getConstraints().rotation===hs)return;const n=e.getSize(),s=t.pixel,r=Math.atan2(n[1]/2-s[1],s[0]-n[0]/2);if(void 0!==this.lastAngle_){const t=r-this.lastAngle_;i.adjustRotationInternal(-t)}this.lastAngle_=r}handleUpEvent(t){if(!_r(t))return!0;const e=t.map,i=e.getView();return i.endInteraction(this.duration_),!1}handleDownEvent(t){if(!_r(t))return!1;if(pr(t)&&this.condition_(t)){const e=t.map;return e.getView().beginInteraction(),this.lastAngle_=void 0,!0}return!1}}var Pr=Cr;class Ar extends u{constructor(t){super(),this.geometry_=null,this.element_=document.createElement("div"),this.element_.style.position="absolute",this.element_.style.pointerEvents="auto",this.element_.className="ol-box "+t,this.map_=null,this.startPixel_=null,this.endPixel_=null}disposeInternal(){this.setMap(null)}render_(){const t=this.startPixel_,e=this.endPixel_,i="px",n=this.element_.style;n.left=Math.min(t[0],e[0])+i,n.top=Math.min(t[1],e[1])+i,n.width=Math.abs(e[0]-t[0])+i,n.height=Math.abs(e[1]-t[1])+i}setMap(t){if(this.map_){this.map_.getOverlayContainer().removeChild(this.element_);const t=this.element_.style;t.left="inherit",t.top="inherit",t.width="inherit",t.height="inherit"}this.map_=t,this.map_&&this.map_.getOverlayContainer().appendChild(this.element_)}setPixels(t,e){this.startPixel_=t,this.endPixel_=e,this.createOrUpdateGeometry(),this.render_()}createOrUpdateGeometry(){if(!this.map_)return;const t=this.startPixel_,e=this.endPixel_,i=[t,[t[0],e[1]],e,[e[0],t[1]]],n=i.map(this.map_.getCoordinateFromPixelInternal,this.map_);n[4]=n[0].slice(),this.geometry_?this.geometry_.setCoordinates([n]):this.geometry_=new is([n])}getGeometry(){return this.geometry_}}var Sr=Ar;const Tr={BOXSTART:"boxstart",BOXDRAG:"boxdrag",BOXEND:"boxend",BOXCANCEL:"boxcancel"};class Rr extends E{constructor(t,e,i){super(t),this.coordinate=e,this.mapBrowserEvent=i}}class Ir extends br{constructor(t){var e,i,n;super(),this.on,this.once,this.un,t=null!==t&&void 0!==t?t:{},this.box_=new Sr(t.className||"ol-dragbox"),this.minArea_=null!==(e=t.minArea)&&void 0!==e?e:64,t.onBoxEnd&&(this.onBoxEnd=t.onBoxEnd),this.startPixel_=null,this.condition_=null!==(i=t.condition)&&void 0!==i?i:pr,this.boxEndCondition_=null!==(n=t.boxEndCondition)&&void 0!==n?n:this.defaultBoxEndCondition}defaultBoxEndCondition(t,e,i){const n=i[0]-e[0],s=i[1]-e[1];return n*n+s*s>=this.minArea_}getGeometry(){return this.box_.getGeometry()}handleDragEvent(t){this.startPixel_&&(this.box_.setPixels(this.startPixel_,t.pixel),this.dispatchEvent(new Rr(Tr.BOXDRAG,t.coordinate,t)))}handleUpEvent(t){if(!this.startPixel_)return!1;const e=this.boxEndCondition_(t,this.startPixel_,t.pixel);return e&&this.onBoxEnd(t),this.dispatchEvent(new Rr(e?Tr.BOXEND:Tr.BOXCANCEL,t.coordinate,t)),this.box_.setMap(null),this.startPixel_=null,!1}handleDownEvent(t){return!!this.condition_(t)&&(this.startPixel_=t.pixel,this.box_.setMap(t.map),this.box_.setPixels(this.startPixel_,this.startPixel_),this.dispatchEvent(new Rr(Tr.BOXSTART,t.coordinate,t)),!0)}onBoxEnd(t){}setActive(t){t||(this.box_.setMap(null),this.startPixel_&&(this.dispatchEvent(new Rr(Tr.BOXCANCEL,this.startPixel_,null)),this.startPixel_=null)),super.setActive(t)}setMap(t){const e=this.getMap();e&&(this.box_.setMap(null),this.startPixel_&&(this.dispatchEvent(new Rr(Tr.BOXCANCEL,this.startPixel_,null)),this.startPixel_=null)),super.setMap(t)}}var Lr=Ir;class Or extends Lr{constructor(t){t=t||{};const e=t.condition?t.condition:mr;super({condition:e,className:t.className||"ol-dragzoom",minArea:t.minArea}),this.duration_=void 0!==t.duration?t.duration:200,this.out_=void 0!==t.out&&t.out}onBoxEnd(t){const e=this.getMap(),i=e.getView();let n=this.getGeometry();if(this.out_){const t=i.rotatedExtentForGeometry(n),e=i.getResolutionForExtentInternal(t),s=i.getResolution()/e;n=n.clone(),n.scale(s*s)}i.fitInternal(n,{duration:this.duration_,easing:we})}}var kr=Or,Dr={LEFT:"ArrowLeft",UP:"ArrowUp",RIGHT:"ArrowRight",DOWN:"ArrowDown"};class Nr extends rr{constructor(t){super(),t=t||{},this.defaultCondition_=function(t){return gr(t)&&yr(t)},this.condition_=void 0!==t.condition?t.condition:this.defaultCondition_,this.duration_=void 0!==t.duration?t.duration:100,this.pixelDelta_=void 0!==t.pixelDelta?t.pixelDelta:128}handleEvent(t){let e=!1;if(t.type==h.KEYDOWN){const i=t.originalEvent,n=i.key;if(this.condition_(t)&&(n==Dr.DOWN||n==Dr.LEFT||n==Dr.RIGHT||n==Dr.UP)){const s=t.map,r=s.getView(),o=r.getResolution()*this.pixelDelta_;let a=0,l=0;n==Dr.DOWN?l=-o:n==Dr.LEFT?a=-o:n==Dr.RIGHT?a=o:l=o;const h=[a,l];fe(h,r.getRotation()),nr(r,h,this.duration_),i.preventDefault(),e=!0}}return!e}}var Gr=Nr;class jr extends rr{constructor(t){super(),t=t||{},this.condition_=t.condition?t.condition:function(t){return!fr(t)&&yr(t)},this.delta_=t.delta?t.delta:1,this.duration_=void 0!==t.duration?t.duration:100}handleEvent(t){let e=!1;if(t.type==h.KEYDOWN||t.type==h.KEYPRESS){const i=t.originalEvent,n=i.key;if(this.condition_(t)&&("+"===n||"-"===n)){const s=t.map,r="+"===n?this.delta_:-this.delta_,o=s.getView();sr(o,r,void 0,this.duration_),i.preventDefault(),e=!0}}return!e}}var Fr=jr;const Br=40,zr=300;class Vr extends rr{constructor(t){t=t||{},super(t),this.totalDelta_=0,this.lastDelta_=0,this.maxDelta_=void 0!==t.maxDelta?t.maxDelta:1,this.duration_=void 0!==t.duration?t.duration:250,this.timeout_=void 0!==t.timeout?t.timeout:80,this.useAnchor_=void 0===t.useAnchor||t.useAnchor,this.constrainResolution_=void 0!==t.constrainResolution&&t.constrainResolution;const e=t.condition?t.condition:dr;this.condition_=t.onFocusOnly?lr(ur,e):e,this.lastAnchor_=null,this.startTime_=void 0,this.timeoutId_,this.mode_=void 0,this.trackpadEventGap_=400,this.trackpadTimeoutId_,this.deltaPerZoom_=300}endInteraction_(){this.trackpadTimeoutId_=void 0;const t=this.getMap();if(!t)return;const e=t.getView();e.endInteraction(void 0,this.lastDelta_?this.lastDelta_>0?1:-1:0,this.lastAnchor_?t.getCoordinateFromPixel(this.lastAnchor_):null)}handleEvent(t){if(!this.condition_(t))return!0;const e=t.type;if(e!==h.WHEEL)return!0;const i=t.map,n=t.originalEvent;n.preventDefault(),this.useAnchor_&&(this.lastAnchor_=t.pixel);let s=n.deltaY;switch(n.deltaMode){case WheelEvent.DOM_DELTA_LINE:s*=Br;break;case WheelEvent.DOM_DELTA_PAGE:s*=zr;break;default:}if(0===s)return!1;this.lastDelta_=s;const r=Date.now();void 0===this.startTime_&&(this.startTime_=r),(!this.mode_||r-this.startTime_>this.trackpadEventGap_)&&(this.mode_=Math.abs(s)<4?"trackpad":"wheel");const o=i.getView();if("trackpad"===this.mode_&&!o.getConstrainResolution()&&!this.constrainResolution_)return this.trackpadTimeoutId_?clearTimeout(this.trackpadTimeoutId_):(o.getAnimating()&&o.cancelAnimations(),o.beginInteraction()),this.trackpadTimeoutId_=setTimeout(this.endInteraction_.bind(this),this.timeout_),o.adjustZoom(-s/this.deltaPerZoom_,this.lastAnchor_?i.getCoordinateFromPixel(this.lastAnchor_):null),this.startTime_=r,!1;this.totalDelta_+=s;const a=Math.max(this.timeout_-(r-this.startTime_),0);return clearTimeout(this.timeoutId_),this.timeoutId_=setTimeout(this.handleWheelZoom_.bind(this,i),a),!1}handleWheelZoom_(t){const e=t.getView();e.getAnimating()&&e.cancelAnimations();let i=-_t(this.totalDelta_,-this.maxDelta_*this.deltaPerZoom_,this.maxDelta_*this.deltaPerZoom_)/this.deltaPerZoom_;(e.getConstrainResolution()||this.constrainResolution_)&&(i=i?i>0?1:-1:0),sr(e,i,this.lastAnchor_?t.getCoordinateFromPixel(this.lastAnchor_):null,this.duration_),this.mode_=void 0,this.totalDelta_=0,this.lastAnchor_=null,this.startTime_=void 0,this.timeoutId_=void 0}setMouseAnchor(t){this.useAnchor_=t,t||(this.lastAnchor_=null)}}var Zr=Vr;class Hr extends br{constructor(t){t=t||{};const e=t;e.stopDown||(e.stopDown=y),super(e),this.anchor_=null,this.lastAngle_=void 0,this.rotating_=!1,this.rotationDelta_=0,this.threshold_=void 0!==t.threshold?t.threshold:.3,this.duration_=void 0!==t.duration?t.duration:250}handleDragEvent(t){let e=0;const i=this.targetPointers[0],n=this.targetPointers[1],s=Math.atan2(n.clientY-i.clientY,n.clientX-i.clientX);if(void 0!==this.lastAngle_){const t=s-this.lastAngle_;this.rotationDelta_+=t,!this.rotating_&&Math.abs(this.rotationDelta_)>this.threshold_&&(this.rotating_=!0),e=t}this.lastAngle_=s;const r=t.map,o=r.getView();o.getConstraints().rotation!==hs&&(this.anchor_=r.getCoordinateFromPixelInternal(r.getEventPixel(xr(this.targetPointers))),this.rotating_&&(r.render(),o.adjustRotationInternal(e,this.anchor_)))}handleUpEvent(t){if(this.targetPointers.length<2){const e=t.map,i=e.getView();return i.endInteraction(this.duration_),!1}return!0}handleDownEvent(t){if(this.targetPointers.length>=2){const e=t.map;return this.anchor_=null,this.lastAngle_=void 0,this.rotating_=!1,this.rotationDelta_=0,this.handlingDownUpSequence||e.getView().beginInteraction(),!0}return!1}}var Xr=Hr;class Kr extends br{constructor(t){t=t||{};const e=t;e.stopDown||(e.stopDown=y),super(e),this.anchor_=null,this.duration_=void 0!==t.duration?t.duration:400,this.lastDistance_=void 0,this.lastScaleDelta_=1}handleDragEvent(t){let e=1;const i=this.targetPointers[0],n=this.targetPointers[1],s=i.clientX-n.clientX,r=i.clientY-n.clientY,o=Math.sqrt(s*s+r*r);void 0!==this.lastDistance_&&(e=this.lastDistance_/o),this.lastDistance_=o;const a=t.map,l=a.getView();1!=e&&(this.lastScaleDelta_=e),this.anchor_=a.getCoordinateFromPixelInternal(a.getEventPixel(xr(this.targetPointers))),a.render(),l.adjustResolutionInternal(e,this.anchor_)}handleUpEvent(t){if(this.targetPointers.length<2){const e=t.map,i=e.getView(),n=this.lastScaleDelta_>1?1:-1;return i.endInteraction(this.duration_,n),!1}return!0}handleDownEvent(t){if(this.targetPointers.length>=2){const e=t.map;return this.anchor_=null,this.lastDistance_=void 0,this.lastScaleDelta_=1,this.handlingDownUpSequence||e.getView().beginInteraction(),!0}return!1}}var Wr=Kr;function Yr(t){t=t||{};const e=new V,i=new tr(-.005,.05,100),n=void 0===t.altShiftDragRotate||t.altShiftDragRotate;n&&e.push(new Pr);const s=void 0===t.doubleClickZoom||t.doubleClickZoom;s&&e.push(new ar({delta:t.zoomDelta,duration:t.zoomDuration}));const r=void 0===t.dragPan||t.dragPan;r&&e.push(new Er({onFocusOnly:t.onFocusOnly,kinetic:i}));const o=void 0===t.pinchRotate||t.pinchRotate;o&&e.push(new Xr);const a=void 0===t.pinchZoom||t.pinchZoom;a&&e.push(new Wr({duration:t.zoomDuration}));const l=void 0===t.keyboard||t.keyboard;l&&(e.push(new Gr),e.push(new Fr({delta:t.zoomDelta,duration:t.zoomDuration})));const h=void 0===t.mouseWheelZoom||t.mouseWheelZoom;h&&e.push(new Zr({onFocusOnly:t.onFocusOnly,duration:t.zoomDuration}));const c=void 0===t.shiftDragZoom||t.shiftDragZoom;return c&&e.push(new kr({duration:t.zoomDuration})),e}var Ur={OPACITY:"opacity",VISIBLE:"visible",EXTENT:"extent",Z_INDEX:"zIndex",MAX_RESOLUTION:"maxResolution",MIN_RESOLUTION:"minResolution",MAX_ZOOM:"maxZoom",MIN_ZOOM:"minZoom",SOURCE:"source",MAP:"map"};class Jr extends j{constructor(t){super(),this.on,this.once,this.un,this.background_=t.background;const e=Object.assign({},t);"object"===typeof t.properties&&(delete e.properties,Object.assign(e,t.properties)),e[Ur.OPACITY]=void 0!==t.opacity?t.opacity:1,ht("number"===typeof e[Ur.OPACITY],"Layer opacity must be a number"),e[Ur.VISIBLE]=void 0===t.visible||t.visible,e[Ur.Z_INDEX]=t.zIndex,e[Ur.MAX_RESOLUTION]=void 0!==t.maxResolution?t.maxResolution:1/0,e[Ur.MIN_RESOLUTION]=void 0!==t.minResolution?t.minResolution:0,e[Ur.MIN_ZOOM]=void 0!==t.minZoom?t.minZoom:-1/0,e[Ur.MAX_ZOOM]=void 0!==t.maxZoom?t.maxZoom:1/0,this.className_=void 0!==e.className?e.className:"ol-layer",delete e.className,this.setProperties(e),this.state_=null}getBackground(){return this.background_}getClassName(){return this.className_}getLayerState(t){const e=this.state_||{layer:this,managed:void 0===t||t},i=this.getZIndex();return e.opacity=_t(Math.round(100*this.getOpacity())/100,0,1),e.visible=this.getVisible(),e.extent=this.getExtent(),e.zIndex=void 0!==i||e.managed?i:1/0,e.maxResolution=this.getMaxResolution(),e.minResolution=Math.max(this.getMinResolution(),0),e.minZoom=this.getMinZoom(),e.maxZoom=this.getMaxZoom(),this.state_=e,e}getLayersArray(t){return O()}getLayerStatesArray(t){return O()}getExtent(){return this.get(Ur.EXTENT)}getMaxResolution(){return this.get(Ur.MAX_RESOLUTION)}getMinResolution(){return this.get(Ur.MIN_RESOLUTION)}getMinZoom(){return this.get(Ur.MIN_ZOOM)}getMaxZoom(){return this.get(Ur.MAX_ZOOM)}getOpacity(){return this.get(Ur.OPACITY)}getSourceState(){return O()}getVisible(){return this.get(Ur.VISIBLE)}getZIndex(){return this.get(Ur.Z_INDEX)}setBackground(t){this.background_=t,this.changed()}setExtent(t){this.set(Ur.EXTENT,t)}setMaxResolution(t){this.set(Ur.MAX_RESOLUTION,t)}setMinResolution(t){this.set(Ur.MIN_RESOLUTION,t)}setMaxZoom(t){this.set(Ur.MAX_ZOOM,t)}setMinZoom(t){this.set(Ur.MIN_ZOOM,t)}setOpacity(t){ht("number"===typeof t,"Layer opacity must be a number"),this.set(Ur.OPACITY,t)}setVisible(t){this.set(Ur.VISIBLE,t)}setZIndex(t){this.set(Ur.Z_INDEX,t)}disposeInternal(){this.state_&&(this.state_.layer=null,this.state_=null),super.disposeInternal()}}var $r=Jr;const qr={ADDLAYER:"addlayer",REMOVELAYER:"removelayer"};class Qr extends E{constructor(t,e){super(t),this.layer=e}}const to={LAYERS:"layers"};class eo extends $r{constructor(t){t=t||{};const e=Object.assign({},t);delete e.layers;let i=t.layers;super(e),this.on,this.once,this.un,this.layersListenerKeys_=[],this.listenerKeys_={},this.addChangeListener(to.LAYERS,this.handleLayersChanged_),i?Array.isArray(i)?i=new V(i.slice(),{unique:!0}):ht("function"===typeof i.getArray,"Expected `layers` to be an array or a `Collection`"):i=new V(void 0,{unique:!0}),this.setLayers(i)}handleLayerChange_(){this.changed()}handleLayersChanged_(){this.layersListenerKeys_.forEach(T),this.layersListenerKeys_.length=0;const t=this.getLayers();this.layersListenerKeys_.push(A(t,a.ADD,this.handleLayersAdd_,this),A(t,a.REMOVE,this.handleLayersRemove_,this));for(const i in this.listenerKeys_)this.listenerKeys_[i].forEach(T);x(this.listenerKeys_);const e=t.getArray();for(let i=0,n=e.length;i<n;i++){const t=e[i];this.registerLayerListeners_(t),this.dispatchEvent(new Qr(qr.ADDLAYER,t))}this.changed()}registerLayerListeners_(t){const e=[A(t,l.PROPERTYCHANGE,this.handleLayerChange_,this),A(t,h.CHANGE,this.handleLayerChange_,this)];t instanceof eo&&e.push(A(t,qr.ADDLAYER,this.handleLayerGroupAdd_,this),A(t,qr.REMOVELAYER,this.handleLayerGroupRemove_,this)),this.listenerKeys_[D(t)]=e}handleLayerGroupAdd_(t){this.dispatchEvent(new Qr(qr.ADDLAYER,t.layer))}handleLayerGroupRemove_(t){this.dispatchEvent(new Qr(qr.REMOVELAYER,t.layer))}handleLayersAdd_(t){const e=t.element;this.registerLayerListeners_(e),this.dispatchEvent(new Qr(qr.ADDLAYER,e)),this.changed()}handleLayersRemove_(t){const e=t.element,i=D(e);this.listenerKeys_[i].forEach(T),delete this.listenerKeys_[i],this.dispatchEvent(new Qr(qr.REMOVELAYER,e)),this.changed()}getLayers(){return this.get(to.LAYERS)}setLayers(t){const e=this.getLayers();if(e){const t=e.getArray();for(let e=0,i=t.length;e<i;++e)this.dispatchEvent(new Qr(qr.REMOVELAYER,t[e]))}this.set(to.LAYERS,t)}getLayersArray(t){return t=void 0!==t?t:[],this.getLayers().forEach((function(e){e.getLayersArray(t)})),t}getLayerStatesArray(t){const e=void 0!==t?t:[],i=e.length;this.getLayers().forEach((function(t){t.getLayerStatesArray(e)}));const n=this.getLayerState();let s=n.zIndex;t||void 0!==n.zIndex||(s=0);for(let r=i,o=e.length;r<o;r++){const t=e[r];t.opacity*=n.opacity,t.visible=t.visible&&n.visible,t.maxResolution=Math.min(t.maxResolution,n.maxResolution),t.minResolution=Math.max(t.minResolution,n.minResolution),t.minZoom=Math.max(t.minZoom,n.minZoom),t.maxZoom=Math.min(t.maxZoom,n.maxZoom),void 0!==n.extent&&(void 0!==t.extent?t.extent=se(t.extent,n.extent):t.extent=n.extent),void 0===t.zIndex&&(t.zIndex=s)}return e}getSourceState(){return"ready"}}var io=eo,no=(i("fffc"),{PRERENDER:"prerender",POSTRENDER:"postrender",PRECOMPOSE:"precompose",POSTCOMPOSE:"postcompose",RENDERCOMPLETE:"rendercomplete"});class so extends $r{constructor(t){const e=Object.assign({},t);delete e.source,super(e),this.on,this.once,this.un,this.mapPrecomposeKey_=null,this.mapRenderKey_=null,this.sourceChangeKey_=null,this.renderer_=null,this.sourceReady_=!1,this.rendered=!1,t.render&&(this.render=t.render),t.map&&this.setMap(t.map),this.addChangeListener(Ur.SOURCE,this.handleSourcePropertyChange_);const i=t.source?t.source:null;this.setSource(i)}getLayersArray(t){return t=t||[],t.push(this),t}getLayerStatesArray(t){return t=t||[],t.push(this.getLayerState()),t}getSource(){return this.get(Ur.SOURCE)||null}getRenderSource(){return this.getSource()}getSourceState(){const t=this.getSource();return t?t.getState():"undefined"}handleSourceChange_(){this.changed(),this.sourceReady_||"ready"!==this.getSource().getState()||(this.sourceReady_=!0,this.dispatchEvent("sourceready"))}handleSourcePropertyChange_(){this.sourceChangeKey_&&(T(this.sourceChangeKey_),this.sourceChangeKey_=null),this.sourceReady_=!1;const t=this.getSource();t&&(this.sourceChangeKey_=A(t,h.CHANGE,this.handleSourceChange_,this),"ready"===t.getState()&&(this.sourceReady_=!0,setTimeout(()=>{this.dispatchEvent("sourceready")},0))),this.changed()}getFeatures(t){return this.renderer_?this.renderer_.getFeatures(t):Promise.resolve([])}getData(t){return this.renderer_&&this.rendered?this.renderer_.getData(t):null}isVisible(t){let e;const i=this.getMapInternal();let n;if(!t&&i&&(t=i.getView()),e=t instanceof bs?{viewState:t.getState(),extent:t.calculateExtent()}:t,!e.layerStatesArray&&i&&(e.layerStatesArray=i.getLayerGroup().getLayerStatesArray()),e.layerStatesArray){if(n=e.layerStatesArray.find(t=>t.layer===this),!n)return!1}else n=this.getLayerState();const s=this.getExtent();return ro(n,e.viewState)&&(!s||le(s,e.extent))}getAttributions(t){var e;if(!this.isVisible(t))return[];const i=null===(e=this.getSource())||void 0===e?void 0:e.getAttributions();if(!i)return[];const n=t instanceof bs?t.getViewStateAndExtent():t;let s=i(n);return Array.isArray(s)||(s=[s]),s}render(t,e){const i=this.getRenderer();return i.prepareFrame(t)?(this.rendered=!0,i.renderFrame(t,e)):null}unrender(){this.rendered=!1}getDeclutter(){}renderDeclutter(t,e){}renderDeferred(t){const e=this.getRenderer();e&&e.renderDeferred(t)}setMapInternal(t){t||this.unrender(),this.set(Ur.MAP,t)}getMapInternal(){return this.get(Ur.MAP)}setMap(t){this.mapPrecomposeKey_&&(T(this.mapPrecomposeKey_),this.mapPrecomposeKey_=null),t||this.changed(),this.mapRenderKey_&&(T(this.mapRenderKey_),this.mapRenderKey_=null),t&&(this.mapPrecomposeKey_=A(t,no.PRECOMPOSE,this.handlePrecompose_,this),this.mapRenderKey_=A(this,h.CHANGE,t.render,t),this.changed())}handlePrecompose_(t){const e=t.frameState.layerStatesArray,i=this.getLayerState(!1);ht(!e.some(t=>t.layer===i.layer),"A layer can only be added to the map once. Use either `layer.setMap()` or `map.addLayer()`, not both."),e.push(i)}setSource(t){this.set(Ur.SOURCE,t)}getRenderer(){return this.renderer_||(this.renderer_=this.createRenderer()),this.renderer_}hasRenderer(){return!!this.renderer_}createRenderer(){return null}clearRenderer(){this.renderer_&&(this.renderer_.dispose(),delete this.renderer_)}disposeInternal(){this.clearRenderer(),this.setSource(null),super.disposeInternal()}}function ro(t,e){if(!t.visible)return!1;const i=e.resolution;if(i<t.minResolution||i>=t.maxResolution)return!1;const n=e.zoom;return n>t.minZoom&&n<=t.maxZoom}var oo=so,ao=i("9e82"),lo=i.n(ao);const ho=[NaN,NaN,NaN,0];let co;function uo(){return co||(co=Ds(1,1,void 0,{willReadFrequently:!0,desynchronized:!0})),co}const po=/^rgba?\(\s*(\d+%?)\s+(\d+%?)\s+(\d+%?)(?:\s*\/\s*(\d+%|\d*\.\d+|[01]))?\s*\)$/i,go=/^rgba?\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)(?:\s*,\s*(\d+%|\d*\.\d+|[01]))?\s*\)$/i,fo=/^rgba?\(\s*(\d+%)\s*,\s*(\d+%)\s*,\s*(\d+%)(?:\s*,\s*(\d+%|\d*\.\d+|[01]))?\s*\)$/i,mo=/^#([\da-f]{3,4}|[\da-f]{6}|[\da-f]{8})$/i;function yo(t,e){return t.endsWith("%")?Number(t.substring(0,t.length-1))/e:Number(t)}function _o(t){throw new Error('failed to parse "'+t+'" as color')}function vo(t){if(t.toLowerCase().startsWith("rgb")){const e=t.match(go)||t.match(po)||t.match(fo);if(e){const t=e[4],i=100/255;return[_t(yo(e[1],i)+.5|0,0,255),_t(yo(e[2],i)+.5|0,0,255),_t(yo(e[3],i)+.5|0,0,255),void 0!==t?_t(yo(t,100),0,1):1]}_o(t)}if(t.startsWith("#")){if(mo.test(t)){const e=t.substring(1),i=e.length<=4?1:2,n=[0,0,0,255];for(let t=0,s=e.length;t<s;t+=i){let s=parseInt(e.substring(t,t+i),16);1===i&&(s+=s<<4),n[t/i]=s}return n[3]=n[3]/255,n}_o(t)}const e=uo();e.fillStyle="#abcdef";let i=e.fillStyle;e.fillStyle=t,e.fillStyle===i&&(e.fillStyle="#fedcba",i=e.fillStyle,e.fillStyle=t,e.fillStyle===i&&_o(t));const n=e.fillStyle;if(n.startsWith("#")||n.startsWith("rgba"))return vo(n);e.clearRect(0,0,1,1),e.fillRect(0,0,1,1);const s=Array.from(e.getImageData(0,0,1,1).data);return s[3]=Pt(s[3]/255,3),s}function wo(t){return"string"===typeof t?t:Oo(t)}const xo=1024,bo={};let Mo=0;function Eo(t){if(4===t.length)return t;const e=t.slice();return e[3]=1,e}function Co(t){return t>.0031308?269.025*Math.pow(t,1/2.4)-14.025:3294.6*t}function Po(t){return t>.2068965?Math.pow(t,3):108/841*(t-4/29)}function Ao(t){return t>10.314724?Math.pow((t+14.025)/269.025,2.4):t/3294.6}function So(t){return t>.0088564?Math.pow(t,1/3):t/(108/841)+4/29}function To(t){const e=Ao(t[0]),i=Ao(t[1]),n=Ao(t[2]),s=So(.222488403*e+.716873169*i+.06060791*n),r=500*(So(.452247074*e+.399439023*i+.148375274*n)-s),o=200*(s-So(.016863605*e+.117638439*i+.865350722*n)),a=Math.atan2(o,r)*(180/Math.PI);return[116*s-16,Math.sqrt(r*r+o*o),a<0?a+360:a,t[3]]}function Ro(t){const e=(t[0]+16)/116,i=t[1],n=t[2]*Math.PI/180,s=Po(e),r=Po(e+i/500*Math.cos(n)),o=Po(e-i/200*Math.sin(n)),a=Co(3.021973625*r-1.617392459*s-.404875592*o),l=Co(-.943766287*r+1.916279586*s+.027607165*o),h=Co(.069407491*r-.22898585*s+1.159737864*o);return[_t(a+.5|0,0,255),_t(l+.5|0,0,255),_t(h+.5|0,0,255),t[3]]}function Io(t){if("none"===t)return ho;if(bo.hasOwnProperty(t))return bo[t];if(Mo>=xo){let t=0;for(const e in bo)0===(3&t++)&&(delete bo[e],--Mo)}const e=vo(t);4!==e.length&&_o(t);for(const i of e)isNaN(i)&&_o(t);return bo[t]=e,++Mo,e}function Lo(t){return Array.isArray(t)?t:Io(t)}function Oo(t){let e=t[0];e!=(0|e)&&(e=e+.5|0);let i=t[1];i!=(0|i)&&(i=i+.5|0);let n=t[2];n!=(0|n)&&(n=n+.5|0);const s=void 0===t[3]?1:Math.round(1e3*t[3])/1e3;return"rgba("+e+","+i+","+n+","+s+")"}i("daf2");function ko(t){return t[0]>0&&t[1]>0}function Do(t,e){return Array.isArray(t)?t:(void 0===e?e=[t,t]:(e[0]=t,e[1]=t),e)}let No=0;const Go=1<<No++,jo=1<<No++,Fo=1<<No++,Bo=1<<No++,zo=1<<No++,Vo=1<<No++,Zo=Math.pow(2,No)-1,Ho={[Go]:"boolean",[jo]:"number",[Fo]:"string",[Bo]:"color",[zo]:"number[]",[Vo]:"size"},Xo=Object.keys(Ho).map(Number).sort(d);function Ko(t){return t in Ho}function Wo(t){const e=[];for(const i of Xo)Yo(t,i)&&e.push(Ho[i]);return 0===e.length?"untyped":e.length<3?e.join(" or "):e.slice(0,-1).join(", ")+", or "+e[e.length-1]}function Yo(t,e){return(t&e)===e}function Uo(t,e){return t===e}class Jo{constructor(t,e){if(!Ko(t))throw new Error("literal expressions must have a specific type, got "+Wo(t));this.type=t,this.value=e}}class $o{constructor(t,e,...i){this.type=t,this.operator=e,this.args=i}}function qo(){return{variables:new Set,properties:new Set,featureId:!1,geometryType:!1,mapState:!1}}function Qo(t,e,i){switch(typeof t){case"boolean":if(Uo(e,Fo))return new Jo(Fo,t?"true":"false");if(!Yo(e,Go))throw new Error("got a boolean, but expected "+Wo(e));return new Jo(Go,t);case"number":if(Uo(e,Vo))return new Jo(Vo,Do(t));if(Uo(e,Go))return new Jo(Go,!!t);if(Uo(e,Fo))return new Jo(Fo,t.toString());if(!Yo(e,jo))throw new Error("got a number, but expected "+Wo(e));return new Jo(jo,t);case"string":if(Uo(e,Bo))return new Jo(Bo,Io(t));if(Uo(e,Go))return new Jo(Go,!!t);if(!Yo(e,Fo))throw new Error("got a string, but expected "+Wo(e));return new Jo(Fo,t);default:}if(!Array.isArray(t))throw new Error("expression must be an array or a primitive value");if(0===t.length)throw new Error("empty expression");if("string"===typeof t[0])return va(t,e,i);for(const n of t)if("number"!==typeof n)throw new Error("expected an array of numbers");if(Uo(e,Vo)){if(2!==t.length)throw new Error("expected an array of two values for a size, got "+t.length);return new Jo(Vo,t)}if(Uo(e,Bo)){if(3===t.length)return new Jo(Bo,[...t,1]);if(4===t.length)return new Jo(Bo,t);throw new Error("expected an array of 3 or 4 values for a color, got "+t.length)}if(!Yo(e,zo))throw new Error("got an array of numbers, but expected "+Wo(e));return new Jo(zo,t)}const ta={Get:"get",Var:"var",Concat:"concat",GeometryType:"geometry-type",LineMetric:"line-metric",Any:"any",All:"all",Not:"!",Resolution:"resolution",Zoom:"zoom",Time:"time",Equal:"==",NotEqual:"!=",GreaterThan:">",GreaterThanOrEqualTo:">=",LessThan:"<",LessThanOrEqualTo:"<=",Multiply:"*",Divide:"/",Add:"+",Subtract:"-",Clamp:"clamp",Mod:"%",Pow:"^",Abs:"abs",Floor:"floor",Ceil:"ceil",Round:"round",Sin:"sin",Cos:"cos",Atan:"atan",Sqrt:"sqrt",Match:"match",Between:"between",Interpolate:"interpolate",Coalesce:"coalesce",Case:"case",In:"in",Number:"number",String:"string",Array:"array",Color:"color",Id:"id",Band:"band",Palette:"palette",ToString:"to-string",Has:"has"},ea={[ta.Get]:_a(la(1,1/0),ia),[ta.Var]:_a(la(1,1),na),[ta.Has]:_a(la(1,1/0),ia),[ta.Id]:_a(sa,aa),[ta.Concat]:_a(la(2,1/0),ca(Fo)),[ta.GeometryType]:_a(ra,aa),[ta.LineMetric]:_a(aa),[ta.Resolution]:_a(oa,aa),[ta.Zoom]:_a(oa,aa),[ta.Time]:_a(oa,aa),[ta.Any]:_a(la(2,1/0),ca(Go)),[ta.All]:_a(la(2,1/0),ca(Go)),[ta.Not]:_a(la(1,1),ca(Go)),[ta.Equal]:_a(la(2,2),ca(Zo)),[ta.NotEqual]:_a(la(2,2),ca(Zo)),[ta.GreaterThan]:_a(la(2,2),ca(jo)),[ta.GreaterThanOrEqualTo]:_a(la(2,2),ca(jo)),[ta.LessThan]:_a(la(2,2),ca(jo)),[ta.LessThanOrEqualTo]:_a(la(2,2),ca(jo)),[ta.Multiply]:_a(la(2,1/0),ha),[ta.Coalesce]:_a(la(2,1/0),ha),[ta.Divide]:_a(la(2,2),ca(jo)),[ta.Add]:_a(la(2,1/0),ca(jo)),[ta.Subtract]:_a(la(2,2),ca(jo)),[ta.Clamp]:_a(la(3,3),ca(jo)),[ta.Mod]:_a(la(2,2),ca(jo)),[ta.Pow]:_a(la(2,2),ca(jo)),[ta.Abs]:_a(la(1,1),ca(jo)),[ta.Floor]:_a(la(1,1),ca(jo)),[ta.Ceil]:_a(la(1,1),ca(jo)),[ta.Round]:_a(la(1,1),ca(jo)),[ta.Sin]:_a(la(1,1),ca(jo)),[ta.Cos]:_a(la(1,1),ca(jo)),[ta.Atan]:_a(la(1,2),ca(jo)),[ta.Sqrt]:_a(la(1,1),ca(jo)),[ta.Match]:_a(la(4,1/0),da,pa),[ta.Between]:_a(la(3,3),ca(jo)),[ta.Interpolate]:_a(la(6,1/0),da,ga),[ta.Case]:_a(la(3,1/0),ua,fa),[ta.In]:_a(la(2,2),ma),[ta.Number]:_a(la(1,1/0),ca(Zo)),[ta.String]:_a(la(1,1/0),ca(Zo)),[ta.Array]:_a(la(1,1/0),ca(jo)),[ta.Color]:_a(la(1,4),ca(jo)),[ta.Band]:_a(la(1,3),ca(jo)),[ta.Palette]:_a(la(2,2),ya),[ta.ToString]:_a(la(1,1),ca(Go|jo|Fo|Bo))};function ia(t,e,i){const n=t.length-1,s=new Array(n);for(let r=0;r<n;++r){const e=t[r+1];switch(typeof e){case"number":s[r]=new Jo(jo,e);break;case"string":s[r]=new Jo(Fo,e);break;default:throw new Error("expected a string key or numeric array index for a get operation, got "+e)}0===r&&i.properties.add(String(e))}return s}function na(t,e,i){const n=t[1];if("string"!==typeof n)throw new Error("expected a string argument for var operation");return i.variables.add(n),[new Jo(Fo,n)]}function sa(t,e,i){i.featureId=!0}function ra(t,e,i){i.geometryType=!0}function oa(t,e,i){i.mapState=!0}function aa(t,e,i){const n=t[0];if(1!==t.length)throw new Error(`expected no arguments for ${n} operation`);return[]}function la(t,e){return function(i,n,s){const r=i[0],o=i.length-1;if(t===e){if(o!==t){const e=1===t?"":"s";throw new Error(`expected ${t} argument${e} for ${r}, got ${o}`)}}else if(o<t||o>e){const i=e===1/0?t+" or more":`${t} to ${e}`;throw new Error(`expected ${i} arguments for ${r}, got ${o}`)}}}function ha(t,e,i){const n=t.length-1,s=new Array(n);for(let r=0;r<n;++r){const n=Qo(t[r+1],e,i);s[r]=n}return s}function ca(t){return function(e,i,n){const s=e.length-1,r=new Array(s);for(let o=0;o<s;++o){const i=Qo(e[o+1],t,n);r[o]=i}return r}}function ua(t,e,i){const n=t[0],s=t.length-1;if(s%2===0)throw new Error(`expected an odd number of arguments for ${n}, got ${s} instead`)}function da(t,e,i){const n=t[0],s=t.length-1;if(s%2===1)throw new Error(`expected an even number of arguments for operation ${n}, got ${s} instead`)}function pa(t,e,i){const n=t.length-1,s=Fo|jo|Go,r=Qo(t[1],s,i),o=Qo(t[t.length-1],e,i),a=new Array(n-2);for(let h=0;h<n-2;h+=2){try{const e=Qo(t[h+2],r.type,i);a[h]=e}catch(l){throw new Error(`failed to parse argument ${h+1} of match expression: ${l.message}`)}try{const e=Qo(t[h+3],o.type,i);a[h+1]=e}catch(l){throw new Error(`failed to parse argument ${h+2} of match expression: ${l.message}`)}}return[r,...a,o]}function ga(t,e,i){const n=t[1];let s;switch(n[0]){case"linear":s=1;break;case"exponential":const t=n[1];if("number"!==typeof t||t<=0)throw new Error(`expected a number base for exponential interpolation, got ${JSON.stringify(t)} instead`);s=t;break;default:throw new Error("invalid interpolation type: "+JSON.stringify(n))}const r=new Jo(jo,s);let o;try{o=Qo(t[2],jo,i)}catch(l){throw new Error("failed to parse argument 1 in interpolate expression: "+l.message)}const a=new Array(t.length-3);for(let h=0;h<a.length;h+=2){try{const e=Qo(t[h+3],jo,i);a[h]=e}catch(l){throw new Error(`failed to parse argument ${h+2} for interpolate expression: ${l.message}`)}try{const n=Qo(t[h+4],e,i);a[h+1]=n}catch(l){throw new Error(`failed to parse argument ${h+3} for interpolate expression: ${l.message}`)}}return[r,o,...a]}function fa(t,e,i){const n=Qo(t[t.length-1],e,i),s=new Array(t.length-1);for(let o=0;o<s.length-1;o+=2){try{const e=Qo(t[o+1],Go,i);s[o]=e}catch(r){throw new Error(`failed to parse argument ${o} of case expression: ${r.message}`)}try{const e=Qo(t[o+2],n.type,i);s[o+1]=e}catch(r){throw new Error(`failed to parse argument ${o+1} of case expression: ${r.message}`)}}return s[s.length-1]=n,s}function ma(t,e,i){let n,s=t[2];if(!Array.isArray(s))throw new Error('the second argument for the "in" operator must be an array');if("string"===typeof s[0]){if("literal"!==s[0])throw new Error('for the "in" operator, a string array should be wrapped in a "literal" operator to disambiguate from expressions');if(!Array.isArray(s[1]))throw new Error('failed to parse "in" expression: the literal operator must be followed by an array');s=s[1],n=Fo}else n=jo;const r=new Array(s.length);for(let l=0;l<r.length;l++)try{const t=Qo(s[l],n,i);r[l]=t}catch(a){throw new Error(`failed to parse haystack item ${l} for "in" expression: ${a.message}`)}const o=Qo(t[1],n,i);return[o,...r]}function ya(t,e,i){let n;try{n=Qo(t[1],jo,i)}catch(o){throw new Error("failed to parse first argument in palette expression: "+o.message)}const s=t[2];if(!Array.isArray(s))throw new Error("the second argument of palette must be an array");const r=new Array(s.length);for(let a=0;a<r.length;a++){let t;try{t=Qo(s[a],Bo,i)}catch(o){throw new Error(`failed to parse color at index ${a} in palette expression: ${o.message}`)}if(!(t instanceof Jo))throw new Error(`the palette color at index ${a} must be a literal value`);r[a]=t}return[n,...r]}function _a(...t){return function(e,i,n){const s=e[0];let r;for(let o=0;o<t.length;o++){const s=t[o](e,i,n);if(o==t.length-1){if(!s)throw new Error("expected last argument validator to return the parsed args");r=s}}return new $o(i,s,...r)}}function va(t,e,i){const n=t[0],s=ea[n];if(!s)throw new Error("unknown operator: "+n);return s(t,e,i)}function wa(t){if(!t)return"";const e=t.getType();switch(e){case"Point":case"LineString":case"Polygon":return e;case"MultiPoint":case"MultiLineString":case"MultiPolygon":return e.substring(5);case"Circle":return"Polygon";case"GeometryCollection":return wa(t.getGeometries()[0]);default:return""}}function xa(){return{variables:{},properties:{},resolution:NaN,featureId:null,geometryType:""}}function ba(t,e,i){const n=Qo(t,e,i);return Ma(n,i)}function Ma(t,e){if(t instanceof Jo){if(t.type===Bo&&"string"===typeof t.value){const e=Io(t.value);return function(){return e}}return function(){return t.value}}const i=t.operator;switch(i){case ta.Number:case ta.String:case ta.Coalesce:return Ea(t,e);case ta.Get:case ta.Var:case ta.Has:return Ca(t,e);case ta.Id:return t=>t.featureId;case ta.GeometryType:return t=>t.geometryType;case ta.Concat:{const i=t.args.map(t=>Ma(t,e));return t=>"".concat(...i.map(e=>e(t).toString()))}case ta.Resolution:return t=>t.resolution;case ta.Any:case ta.All:case ta.Between:case ta.In:case ta.Not:return Aa(t,e);case ta.Equal:case ta.NotEqual:case ta.LessThan:case ta.LessThanOrEqualTo:case ta.GreaterThan:case ta.GreaterThanOrEqualTo:return Pa(t,e);case ta.Multiply:case ta.Divide:case ta.Add:case ta.Subtract:case ta.Clamp:case ta.Mod:case ta.Pow:case ta.Abs:case ta.Floor:case ta.Ceil:case ta.Round:case ta.Sin:case ta.Cos:case ta.Atan:case ta.Sqrt:return Sa(t,e);case ta.Case:return Ta(t,e);case ta.Match:return Ra(t,e);case ta.Interpolate:return Ia(t,e);case ta.ToString:return La(t,e);default:throw new Error("Unsupported operator "+i)}}function Ea(t,e){const i=t.operator,n=t.args.length,s=new Array(n);for(let r=0;r<n;++r)s[r]=Ma(t.args[r],e);switch(i){case ta.Coalesce:return t=>{for(let e=0;e<n;++e){const i=s[e](t);if("undefined"!==typeof i&&null!==i)return i}throw new Error("Expected one of the values to be non-null")};case ta.Number:case ta.String:return t=>{for(let e=0;e<n;++e){const n=s[e](t);if(typeof n===i)return n}throw new Error("Expected one of the values to be a "+i)};default:throw new Error("Unsupported assertion operator "+i)}}function Ca(t,e){const i=t.args[0],n=i.value;switch(t.operator){case ta.Get:return e=>{const i=t.args;let s=e.properties[n];for(let t=1,n=i.length;t<n;++t){const e=i[t],n=e.value;s=s[n]}return s};case ta.Var:return t=>t.variables[n];case ta.Has:return e=>{const i=t.args;if(!(n in e.properties))return!1;let s=e.properties[n];for(let t=1,n=i.length;t<n;++t){const e=i[t],n=e.value;if(!s||!Object.hasOwn(s,n))return!1;s=s[n]}return!0};default:throw new Error("Unsupported accessor operator "+t.operator)}}function Pa(t,e){const i=t.operator,n=Ma(t.args[0],e),s=Ma(t.args[1],e);switch(i){case ta.Equal:return t=>n(t)===s(t);case ta.NotEqual:return t=>n(t)!==s(t);case ta.LessThan:return t=>n(t)<s(t);case ta.LessThanOrEqualTo:return t=>n(t)<=s(t);case ta.GreaterThan:return t=>n(t)>s(t);case ta.GreaterThanOrEqualTo:return t=>n(t)>=s(t);default:throw new Error("Unsupported comparison operator "+i)}}function Aa(t,e){const i=t.operator,n=t.args.length,s=new Array(n);for(let r=0;r<n;++r)s[r]=Ma(t.args[r],e);switch(i){case ta.Any:return t=>{for(let e=0;e<n;++e)if(s[e](t))return!0;return!1};case ta.All:return t=>{for(let e=0;e<n;++e)if(!s[e](t))return!1;return!0};case ta.Between:return t=>{const e=s[0](t),i=s[1](t),n=s[2](t);return e>=i&&e<=n};case ta.In:return t=>{const e=s[0](t);for(let i=1;i<n;++i)if(e===s[i](t))return!0;return!1};case ta.Not:return t=>!s[0](t);default:throw new Error("Unsupported logical operator "+i)}}function Sa(t,e){const i=t.operator,n=t.args.length,s=new Array(n);for(let r=0;r<n;++r)s[r]=Ma(t.args[r],e);switch(i){case ta.Multiply:return t=>{let e=1;for(let i=0;i<n;++i)e*=s[i](t);return e};case ta.Divide:return t=>s[0](t)/s[1](t);case ta.Add:return t=>{let e=0;for(let i=0;i<n;++i)e+=s[i](t);return e};case ta.Subtract:return t=>s[0](t)-s[1](t);case ta.Clamp:return t=>{const e=s[0](t),i=s[1](t);if(e<i)return i;const n=s[2](t);return e>n?n:e};case ta.Mod:return t=>s[0](t)%s[1](t);case ta.Pow:return t=>Math.pow(s[0](t),s[1](t));case ta.Abs:return t=>Math.abs(s[0](t));case ta.Floor:return t=>Math.floor(s[0](t));case ta.Ceil:return t=>Math.ceil(s[0](t));case ta.Round:return t=>Math.round(s[0](t));case ta.Sin:return t=>Math.sin(s[0](t));case ta.Cos:return t=>Math.cos(s[0](t));case ta.Atan:return 2===n?t=>Math.atan2(s[0](t),s[1](t)):t=>Math.atan(s[0](t));case ta.Sqrt:return t=>Math.sqrt(s[0](t));default:throw new Error("Unsupported numeric operator "+i)}}function Ta(t,e){const i=t.args.length,n=new Array(i);for(let s=0;s<i;++s)n[s]=Ma(t.args[s],e);return t=>{for(let e=0;e<i-1;e+=2){const i=n[e](t);if(i)return n[e+1](t)}return n[i-1](t)}}function Ra(t,e){const i=t.args.length,n=new Array(i);for(let s=0;s<i;++s)n[s]=Ma(t.args[s],e);return t=>{const e=n[0](t);for(let s=1;s<i-1;s+=2)if(e===n[s](t))return n[s+1](t);return n[i-1](t)}}function Ia(t,e){const i=t.args.length,n=new Array(i);for(let s=0;s<i;++s)n[s]=Ma(t.args[s],e);return t=>{const e=n[0](t),s=n[1](t);let r,o;for(let a=2;a<i;a+=2){const i=n[a](t);let l=n[a+1](t);const h=Array.isArray(l);if(h&&(l=Eo(l)),i>=s)return 2===a?l:h?ka(e,s,r,o,i,l):Oa(e,s,r,o,i,l);r=i,o=l}return o}}function La(t,e){const i=t.operator,n=t.args.length,s=new Array(n);for(let r=0;r<n;++r)s[r]=Ma(t.args[r],e);switch(i){case ta.ToString:return e=>{const i=s[0](e);return t.args[0].type===Bo?Oo(i):i.toString()};default:throw new Error("Unsupported convert operator "+i)}}function Oa(t,e,i,n,s,r){const o=s-i;if(0===o)return n;const a=e-i,l=1===t?a/o:(Math.pow(t,a)-1)/(Math.pow(t,o)-1);return n+l*(r-n)}function ka(t,e,i,n,s,r){const o=s-i;if(0===o)return n;const a=To(n),l=To(r);let h=l[2]-a[2];h>180?h-=360:h<-180&&(h+=360);const c=[Oa(t,e,i,a[0],s,l[0]),Oa(t,e,i,a[1],s,l[1]),a[2]+Oa(t,e,i,0,s,h),Oa(t,e,i,n[3],s,r[3])];return Ro(c)}var Da={IDLE:0,LOADING:1,LOADED:2,ERROR:3,EMPTY:4};class Na extends P{constructor(t,e,i,n){super(),this.extent=t,this.pixelRatio_=i,this.resolution=e,this.state="function"===typeof n?Da.IDLE:n,this.image_=null,this.loader="function"===typeof n?n:null}changed(){this.dispatchEvent(h.CHANGE)}getExtent(){return this.extent}getImage(){return this.image_}getPixelRatio(){return this.pixelRatio_}getResolution(){return this.resolution}getState(){return this.state}load(){if(this.state==Da.IDLE&&this.loader){this.state=Da.LOADING,this.changed();const t=this.getResolution(),e=Array.isArray(t)?t[0]:t;w(()=>this.loader(this.getExtent(),e,this.getPixelRatio())).then(t=>{"image"in t&&(this.image_=t.image),"extent"in t&&(this.extent=t.extent),"resolution"in t&&(this.resolution=t.resolution),"pixelRatio"in t&&(this.pixelRatio_=t.pixelRatio),(t instanceof HTMLImageElement||et&&t instanceof ImageBitmap||t instanceof HTMLCanvasElement||t instanceof HTMLVideoElement)&&(this.image_=t),this.state=Da.LOADED}).catch(t=>{this.state=Da.ERROR,console.error(t)}).finally(()=>this.changed())}}setImage(t){this.image_=t}setResolution(t){this.resolution=t}}function Ga(t,e){return new Promise((i,n)=>{function s(){o(),i(t)}function r(){o(),n(new Error("Image load error"))}function o(){t.removeEventListener("load",s),t.removeEventListener("error",r)}t.addEventListener("load",s),t.addEventListener("error",r),e&&(t.src=e)})}function ja(t,e){return e&&(t.src=e),t.src&&tt?new Promise((e,i)=>t.decode().then(()=>e(t)).catch(n=>t.complete&&t.width?e(t):i(n))):Ga(t)}function Fa(t,e){return e&&(t.src=e),t.src&&tt&&et?t.decode().then(()=>createImageBitmap(t)).catch(e=>{if(t.complete&&t.width)return t;throw e}):ja(t)}var Ba=Na;class za{constructor(){this.cache_={},this.patternCache_={},this.cacheSize_=0,this.maxCacheSize_=1024}clear(){this.cache_={},this.patternCache_={},this.cacheSize_=0}canExpireCache(){return this.cacheSize_>this.maxCacheSize_}expire(){if(this.canExpireCache()){let t=0;for(const e in this.cache_){const i=this.cache_[e];0!==(3&t++)||i.hasListener()||(delete this.cache_[e],delete this.patternCache_[e],--this.cacheSize_)}}}get(t,e){const i=Va(t,e),n=i in this.cache_?this.cache_[i]:null;return n}getPattern(t,e){const i=Va(t,e);return i in this.patternCache_?this.patternCache_[i]:null}set(t,e,i,n){const s=Va(t,e),r=s in this.cache_;this.cache_[s]=i,n&&(i.getImageState()===Da.IDLE&&i.load(),i.getImageState()===Da.LOADING?i.ready().then(()=>{this.patternCache_[s]=Gs().createPattern(i.getImage(1),"repeat")}):this.patternCache_[s]=Gs().createPattern(i.getImage(1),"repeat")),r||++this.cacheSize_}setSize(t){this.maxCacheSize_=t,this.expire()}}function Va(t,e){const i=e?Lo(e):"null";return t+":"+i}const Za=new za;let Ha=null;class Xa extends P{constructor(t,e,i,n,s){super(),this.hitDetectionImage_=null,this.image_=t,this.crossOrigin_=null===i||void 0===i?void 0:i.crossOrigin,this.referrerPolicy_=null===i||void 0===i?void 0:i.referrerPolicy,this.canvas_={},this.color_=s,this.imageState_=void 0===n?Da.IDLE:n,this.size_=t&&t.width&&t.height?[t.width,t.height]:null,this.src_=e,this.tainted_,this.ready_=null}initializeImage_(){this.image_=new Image,null!==this.crossOrigin_&&(this.image_.crossOrigin=this.crossOrigin_),void 0!==this.referrerPolicy_&&(this.image_.referrerPolicy=this.referrerPolicy_)}isTainted_(){if(void 0===this.tainted_&&this.imageState_===Da.LOADED){Ha||(Ha=Ds(1,1,void 0,{willReadFrequently:!0})),Ha.drawImage(this.image_,0,0);try{Ha.getImageData(0,0,1,1),this.tainted_=!1}catch{Ha=null,this.tainted_=!0}}return!0===this.tainted_}dispatchChangeEvent_(){this.dispatchEvent(h.CHANGE)}handleImageError_(){this.imageState_=Da.ERROR,this.dispatchChangeEvent_()}handleImageLoad_(){this.imageState_=Da.LOADED,this.size_=[this.image_.width,this.image_.height],this.dispatchChangeEvent_()}getImage(t){return this.image_||this.initializeImage_(),this.replaceColor_(t),this.canvas_[t]?this.canvas_[t]:this.image_}setImage(t){this.image_=t}getPixelRatio(t){return this.replaceColor_(t),this.canvas_[t]?t:1}getImageState(){return this.imageState_}getHitDetectionImage(){if(this.image_||this.initializeImage_(),!this.hitDetectionImage_)if(this.isTainted_()){const t=this.size_[0],e=this.size_[1],i=Ds(t,e);i.fillRect(0,0,t,e),this.hitDetectionImage_=i.canvas}else this.hitDetectionImage_=this.image_;return this.hitDetectionImage_}getSize(){return this.size_}getSrc(){return this.src_}load(){if(this.imageState_===Da.IDLE){this.image_||this.initializeImage_(),this.imageState_=Da.LOADING;try{void 0!==this.src_&&(this.image_.src=this.src_)}catch{this.handleImageError_()}this.image_ instanceof HTMLImageElement&&ja(this.image_,this.src_).then(t=>{this.image_=t,this.handleImageLoad_()}).catch(this.handleImageError_.bind(this))}}replaceColor_(t){if(!this.color_||this.canvas_[t]||this.imageState_!==Da.LOADED)return;const e=this.image_,i=Ds(Math.ceil(e.width*t),Math.ceil(e.height*t)),n=i.canvas;i.scale(t,t),i.drawImage(e,0,0),i.globalCompositeOperation="multiply",i.fillStyle=wo(this.color_),i.fillRect(0,0,n.width/t,n.height/t),i.globalCompositeOperation="destination-in",i.drawImage(e,0,0),this.canvas_[t]=n}ready(){return this.ready_||(this.ready_=new Promise(t=>{if(this.imageState_===Da.LOADED||this.imageState_===Da.ERROR)t();else{const e=()=>{this.imageState_!==Da.LOADED&&this.imageState_!==Da.ERROR||(this.removeEventListener(h.CHANGE,e),t())};this.addEventListener(h.CHANGE,e)}})),this.ready_}}function Ka(t,e,i,n,s,r){let o=void 0===e?void 0:Za.get(e,s);return o||(o=new Xa(t,t&&"src"in t?t.src||void 0:e,i,n,s),Za.set(e,s,o,r)),r&&o&&!Za.getPattern(e,s)&&Za.set(e,s,o,r),o}var Wa=Xa;function Ya(t){return t?Array.isArray(t)?Oo(t):"object"===typeof t&&"src"in t?Ua(t):t:null}function Ua(t){if(!t.offset||!t.size)return Za.getPattern(t.src,t.color);const e=t.src+":"+t.offset,i=Za.getPattern(e,t.color);if(i)return i;const n=Za.get(t.src,null);if(n.getImageState()!==Da.LOADED)return null;const s=Ds(t.size[0],t.size[1]);return s.drawImage(n.getImage(1),t.offset[0],t.offset[1],t.size[0],t.size[1],0,0,t.size[0],t.size[1]),Ka(s.canvas,e,void 0,Da.LOADED,t.color,!0),Za.getPattern(e,t.color)}i("13d5"),i("9d4a");const Ja="#000",$a="round",qa="round",Qa=10,tl="#000",el=1,il=new j;let nl,sl=null;const rl={},ol=new Set(["serif","sans-serif","monospace","cursive","fantasy","system-ui","ui-serif","ui-sans-serif","ui-monospace","ui-rounded","emoji","math","fangsong"]);function al(t,e,i){return`${t} ${e} 16px "${i}"`}(function(){const t=100;let e,i;async function n(t){await i.ready;const e=await i.load(t);if(0===e.length)return!1;const n=Rs(t),s=n.families[0].toLowerCase(),r=n.weight;return e.some(t=>{const e=t.family.replace(/^['"]|['"]$/g,"").toLowerCase(),i=Ts[t.weight]||t.weight;return e===s&&t.style===n.style&&i==r})}async function s(){await i.ready;let e=!0;const r=il.getProperties(),o=Object.keys(r).filter(e=>r[e]<t);for(let i=o.length-1;i>=0;--i){const e=o[i];let s=r[e];s<t&&(await n(e)?(x(rl),il.set(e,t)):(10,il.set(e,s,!0),s<t&&!1))}void 0,e||setTimeout(s,100)}})(),function(){let t}();function ll(t,e){return sl||Ds(1,1),t!=nl&&(sl.font=t,sl.font),sl.measureText(e)}class hl{constructor(t){this.opacity_=t.opacity,this.rotateWithView_=t.rotateWithView,this.rotation_=t.rotation,this.scale_=t.scale,this.scaleArray_=Do(t.scale),this.displacement_=t.displacement,this.declutterMode_=t.declutterMode}clone(){const t=this.getScale();return new hl({opacity:this.getOpacity(),scale:Array.isArray(t)?t.slice():t,rotation:this.getRotation(),rotateWithView:this.getRotateWithView(),displacement:this.getDisplacement().slice(),declutterMode:this.getDeclutterMode()})}getOpacity(){return this.opacity_}getRotateWithView(){return this.rotateWithView_}getRotation(){return this.rotation_}getScale(){return this.scale_}getScaleArray(){return this.scaleArray_}getDisplacement(){return this.displacement_}getDeclutterMode(){return this.declutterMode_}getAnchor(){return O()}getImage(t){return O()}getHitDetectionImage(){return O()}getPixelRatio(t){return 1}getImageState(){return O()}getImageSize(){return O()}getOrigin(){return O()}getSize(){return O()}setDisplacement(t){this.displacement_=t}setOpacity(t){this.opacity_=t}setRotateWithView(t){this.rotateWithView_=t}setRotation(t){this.rotation_=t}setScale(t){this.scale_=t,this.scaleArray_=Do(t)}listenImageChange(t){O()}load(){O()}unlistenImageChange(t){O()}ready(){return Promise.resolve()}}var cl=hl;class ul extends cl{constructor(t){super({opacity:1,rotateWithView:void 0!==t.rotateWithView&&t.rotateWithView,rotation:void 0!==t.rotation?t.rotation:0,scale:void 0!==t.scale?t.scale:1,displacement:void 0!==t.displacement?t.displacement:[0,0],declutterMode:t.declutterMode}),this.hitDetectionCanvas_=null,this.fill_=void 0!==t.fill?t.fill:null,this.origin_=[0,0],this.points_=t.points,this.radius=t.radius,this.radius2_=t.radius2,this.angle_=void 0!==t.angle?t.angle:0,this.stroke_=void 0!==t.stroke?t.stroke:null,this.size_,this.renderOptions_,this.imageState_=this.fill_&&this.fill_.loading()?Da.LOADING:Da.LOADED,this.imageState_===Da.LOADING&&this.ready().then(()=>this.imageState_=Da.LOADED),this.render()}clone(){const t=this.getScale(),e=new ul({fill:this.getFill()?this.getFill().clone():void 0,points:this.getPoints(),radius:this.getRadius(),radius2:this.getRadius2(),angle:this.getAngle(),stroke:this.getStroke()?this.getStroke().clone():void 0,rotation:this.getRotation(),rotateWithView:this.getRotateWithView(),scale:Array.isArray(t)?t.slice():t,displacement:this.getDisplacement().slice(),declutterMode:this.getDeclutterMode()});return e.setOpacity(this.getOpacity()),e}getAnchor(){const t=this.size_,e=this.getDisplacement(),i=this.getScaleArray();return[t[0]/2-e[0]/i[0],t[1]/2+e[1]/i[1]]}getAngle(){return this.angle_}getFill(){return this.fill_}setFill(t){this.fill_=t,this.render()}getHitDetectionImage(){return this.hitDetectionCanvas_||(this.hitDetectionCanvas_=this.createHitDetectionCanvas_(this.renderOptions_)),this.hitDetectionCanvas_}getImage(t){var e,i;const n=null===(e=this.fill_)||void 0===e?void 0:e.getKey(),s=`${t},${this.angle_},${this.radius},${this.radius2_},${this.points_},${n}`+Object.values(this.renderOptions_).join(",");let r=null===(i=Za.get(s,null))||void 0===i?void 0:i.getImage(1);if(!r){const e=this.renderOptions_,i=Math.ceil(e.size*t),n=Ds(i,i);this.draw_(e,n,t),r=n.canvas;const o=new Wa(r,void 0,null,Da.LOADED,null);Za.set(s,null,o),createImageBitmap(r).then(t=>{o.setImage(t)})}return r}getPixelRatio(t){return t}getImageSize(){return this.size_}getImageState(){return this.imageState_}getOrigin(){return this.origin_}getPoints(){return this.points_}getRadius(){return this.radius}setRadius(t){this.radius!==t&&(this.radius=t,this.render())}getRadius2(){return this.radius2_}setRadius2(t){this.radius2_!==t&&(this.radius2_=t,this.render())}getSize(){return this.size_}getStroke(){return this.stroke_}setStroke(t){this.stroke_=t,this.render()}listenImageChange(t){}load(){}unlistenImageChange(t){}calculateLineJoinSize_(t,e,i){if(0===e||this.points_===1/0||"bevel"!==t&&"miter"!==t)return e;let n=this.radius,s=void 0===this.radius2_?n:this.radius2_;if(n<s){const t=n;n=s,s=t}const r=void 0===this.radius2_?this.points_:2*this.points_,o=2*Math.PI/r,a=s*Math.sin(o),l=Math.sqrt(s*s-a*a),h=n-l,c=Math.sqrt(a*a+h*h),u=c/a;if("miter"===t&&u<=i)return u*e;const d=e/2/u,p=e/2*(h/c),g=Math.sqrt((n+d)*(n+d)+p*p),f=g-n;if(void 0===this.radius2_||"bevel"===t)return 2*f;const m=n*Math.sin(o),y=Math.sqrt(n*n-m*m),_=s-y,v=Math.sqrt(m*m+_*_),w=v/m;if(w<=i){const t=w*e/2-s-n;return 2*Math.max(f,t)}return 2*f}createRenderOptions(){let t,e=$a,i=qa,n=0,s=null,r=0,o=0;var a,l,h,c,u,d;this.stroke_&&(t=Ya(null!==(a=this.stroke_.getColor())&&void 0!==a?a:tl),o=null!==(l=this.stroke_.getWidth())&&void 0!==l?l:el,s=this.stroke_.getLineDash(),r=null!==(h=this.stroke_.getLineDashOffset())&&void 0!==h?h:0,i=null!==(c=this.stroke_.getLineJoin())&&void 0!==c?c:qa,e=null!==(u=this.stroke_.getLineCap())&&void 0!==u?u:$a,n=null!==(d=this.stroke_.getMiterLimit())&&void 0!==d?d:Qa);const p=this.calculateLineJoinSize_(i,o,n),g=Math.max(this.radius,this.radius2_||0),f=Math.ceil(2*g+p);return{strokeStyle:t,strokeWidth:o,size:f,lineCap:e,lineDash:s,lineDashOffset:r,lineJoin:i,miterLimit:n}}render(){this.renderOptions_=this.createRenderOptions();const t=this.renderOptions_.size;this.hitDetectionCanvas_=null,this.size_=[t,t]}draw_(t,e,i){if(e.scale(i,i),e.translate(t.size/2,t.size/2),this.createPath_(e),this.fill_){let t=this.fill_.getColor();null===t&&(t=Ja),e.fillStyle=Ya(t),e.fill()}t.strokeStyle&&(e.strokeStyle=t.strokeStyle,e.lineWidth=t.strokeWidth,t.lineDash&&(e.setLineDash(t.lineDash),e.lineDashOffset=t.lineDashOffset),e.lineCap=t.lineCap,e.lineJoin=t.lineJoin,e.miterLimit=t.miterLimit,e.stroke())}createHitDetectionCanvas_(t){let e;if(this.fill_){let i=this.fill_.getColor(),n=0;"string"===typeof i&&(i=Lo(i)),null===i?n=1:Array.isArray(i)&&(n=4===i.length?i[3]:1),0===n&&(e=Ds(t.size,t.size),this.drawHitDetectionCanvas_(t,e))}return e?e.canvas:this.getImage(1)}createPath_(t){let e=this.points_;const i=this.radius;if(e===1/0)t.arc(0,0,i,0,2*Math.PI);else{const n=void 0===this.radius2_?i:this.radius2_;void 0!==this.radius2_&&(e*=2);const s=this.angle_-Math.PI/2,r=2*Math.PI/e;for(let o=0;o<e;o++){const e=s+o*r,a=o%2===0?i:n;t.lineTo(a*Math.cos(e),a*Math.sin(e))}t.closePath()}}drawHitDetectionCanvas_(t,e){e.translate(t.size/2,t.size/2),this.createPath_(e),e.fillStyle=Ja,e.fill(),t.strokeStyle&&(e.strokeStyle=t.strokeStyle,e.lineWidth=t.strokeWidth,t.lineDash&&(e.setLineDash(t.lineDash),e.lineDashOffset=t.lineDashOffset),e.lineJoin=t.lineJoin,e.miterLimit=t.miterLimit,e.stroke())}ready(){return this.fill_?this.fill_.ready():Promise.resolve()}}var dl=ul;class pl extends dl{constructor(t){t=t||{radius:5},super({points:1/0,fill:t.fill,radius:t.radius,stroke:t.stroke,scale:void 0!==t.scale?t.scale:1,rotation:void 0!==t.rotation?t.rotation:0,rotateWithView:void 0!==t.rotateWithView&&t.rotateWithView,displacement:void 0!==t.displacement?t.displacement:[0,0],declutterMode:t.declutterMode})}clone(){const t=this.getScale(),e=new pl({fill:this.getFill()?this.getFill().clone():void 0,stroke:this.getStroke()?this.getStroke().clone():void 0,radius:this.getRadius(),scale:Array.isArray(t)?t.slice():t,rotation:this.getRotation(),rotateWithView:this.getRotateWithView(),displacement:this.getDisplacement().slice(),declutterMode:this.getDeclutterMode()});return e.setOpacity(this.getOpacity()),e}}var gl=pl;class fl{constructor(t){t=t||{},this.patternImage_=null,this.color_=null,void 0!==t.color&&this.setColor(t.color)}clone(){const t=this.getColor();return new fl({color:Array.isArray(t)?t.slice():t||void 0})}getColor(){return this.color_}setColor(t){if(null!==t&&"object"===typeof t&&"src"in t){const e=Ka(null,t.src,{crossOrigin:"anonymous"},void 0,t.offset?null:t.color?t.color:null,!(t.offset&&t.size));e.ready().then(()=>{this.patternImage_=null}),e.getImageState()===Da.IDLE&&e.load(),e.getImageState()===Da.LOADING&&(this.patternImage_=e)}this.color_=t}getKey(){const t=this.getColor();return t?t instanceof CanvasPattern||t instanceof CanvasGradient?D(t):"object"===typeof t&&"src"in t?t.src+":"+t.offset:Lo(t).toString():""}loading(){return!!this.patternImage_}ready(){return this.patternImage_?this.patternImage_.ready():Promise.resolve()}}var ml=fl;function yl(t,e,i,n){return void 0!==i&&void 0!==n?[i/t,n/e]:void 0!==i?i/t:void 0!==n?n/e:1}class _l extends cl{constructor(t){t=t||{};const e=void 0!==t.opacity?t.opacity:1,i=void 0!==t.rotation?t.rotation:0,n=void 0!==t.scale?t.scale:1,s=void 0!==t.rotateWithView&&t.rotateWithView;super({opacity:e,rotation:i,scale:n,displacement:void 0!==t.displacement?t.displacement:[0,0],rotateWithView:s,declutterMode:t.declutterMode}),this.anchor_=void 0!==t.anchor?t.anchor:[.5,.5],this.normalizedAnchor_=null,this.anchorOrigin_=void 0!==t.anchorOrigin?t.anchorOrigin:"top-left",this.anchorXUnits_=void 0!==t.anchorXUnits?t.anchorXUnits:"fraction",this.anchorYUnits_=void 0!==t.anchorYUnits?t.anchorYUnits:"fraction",this.crossOrigin_=void 0!==t.crossOrigin?t.crossOrigin:null,this.referrerPolicy_=t.referrerPolicy;const r=void 0!==t.img?t.img:null;let o,a=t.src;if(ht(!(void 0!==a&&r),"`image` and `src` cannot be provided at the same time"),void 0!==a&&0!==a.length||!r||(a=r.src||D(r)),ht(void 0!==a&&a.length>0,"A defined and non-empty `src` or `image` must be provided"),ht(!((void 0!==t.width||void 0!==t.height)&&void 0!==t.scale),"`width` or `height` cannot be provided together with `scale`"),void 0!==t.src?o=Da.IDLE:void 0!==r&&(o="complete"in r?r.complete?r.src?Da.LOADED:Da.IDLE:Da.LOADING:Da.LOADED),this.color_=void 0!==t.color?Lo(t.color):null,this.iconImage_=Ka(r,a,{crossOrigin:this.crossOrigin_,referrerPolicy:this.referrerPolicy_},o,this.color_),this.offset_=void 0!==t.offset?t.offset:[0,0],this.offsetOrigin_=void 0!==t.offsetOrigin?t.offsetOrigin:"top-left",this.origin_=null,this.size_=void 0!==t.size?t.size:null,this.initialOptions_,void 0!==t.width||void 0!==t.height){let e,i;if(t.size)[e,i]=t.size;else{const n=this.getImage(1);if(n.width&&n.height)e=n.width,i=n.height;else if(n instanceof HTMLImageElement){this.initialOptions_=t;const e=()=>{if(this.unlistenImageChange(e),!this.initialOptions_)return;const i=this.iconImage_.getSize();this.setScale(yl(i[0],i[1],t.width,t.height))};return void this.listenImageChange(e)}}void 0!==e&&this.setScale(yl(e,i,t.width,t.height))}}clone(){let t,e,i;return this.initialOptions_?(e=this.initialOptions_.width,i=this.initialOptions_.height):(t=this.getScale(),t=Array.isArray(t)?t.slice():t),new _l({anchor:this.anchor_.slice(),anchorOrigin:this.anchorOrigin_,anchorXUnits:this.anchorXUnits_,anchorYUnits:this.anchorYUnits_,color:this.color_&&this.color_.slice?this.color_.slice():this.color_||void 0,crossOrigin:this.crossOrigin_,referrerPolicy:this.referrerPolicy_,offset:this.offset_.slice(),offsetOrigin:this.offsetOrigin_,opacity:this.getOpacity(),rotateWithView:this.getRotateWithView(),rotation:this.getRotation(),scale:t,width:e,height:i,size:null!==this.size_?this.size_.slice():void 0,src:this.getSrc(),displacement:this.getDisplacement().slice(),declutterMode:this.getDeclutterMode()})}getAnchor(){let t=this.normalizedAnchor_;if(!t){t=this.anchor_;const e=this.getSize();if("fraction"==this.anchorXUnits_||"fraction"==this.anchorYUnits_){if(!e)return null;t=this.anchor_.slice(),"fraction"==this.anchorXUnits_&&(t[0]*=e[0]),"fraction"==this.anchorYUnits_&&(t[1]*=e[1])}if("top-left"!=this.anchorOrigin_){if(!e)return null;t===this.anchor_&&(t=this.anchor_.slice()),"top-right"!=this.anchorOrigin_&&"bottom-right"!=this.anchorOrigin_||(t[0]=-t[0]+e[0]),"bottom-left"!=this.anchorOrigin_&&"bottom-right"!=this.anchorOrigin_||(t[1]=-t[1]+e[1])}this.normalizedAnchor_=t}const e=this.getDisplacement(),i=this.getScaleArray();return[t[0]-e[0]/i[0],t[1]+e[1]/i[1]]}setAnchor(t){this.anchor_=t,this.normalizedAnchor_=null}getColor(){return this.color_}setColor(t){const e=t?Lo(t):null;if(this.color_===e||this.color_&&e&&this.color_.length===e.length&&this.color_.every((t,i)=>t===e[i]))return;this.color_=e;const i=this.getSrc(),n=void 0!==i?null:this.getHitDetectionImage(),s=void 0!==i?Da.IDLE:this.iconImage_.getImageState();this.iconImage_=Ka(n,i,{crossOrigin:this.crossOrigin_,referrerPolicy:this.referrerPolicy_},s,this.color_)}getImage(t){return this.iconImage_.getImage(t)}getPixelRatio(t){return this.iconImage_.getPixelRatio(t)}getImageSize(){return this.iconImage_.getSize()}getImageState(){return this.iconImage_.getImageState()}getHitDetectionImage(){return this.iconImage_.getHitDetectionImage()}getOrigin(){if(this.origin_)return this.origin_;let t=this.offset_;if("top-left"!=this.offsetOrigin_){const e=this.getSize(),i=this.iconImage_.getSize();if(!e||!i)return null;t=t.slice(),"top-right"!=this.offsetOrigin_&&"bottom-right"!=this.offsetOrigin_||(t[0]=i[0]-e[0]-t[0]),"bottom-left"!=this.offsetOrigin_&&"bottom-right"!=this.offsetOrigin_||(t[1]=i[1]-e[1]-t[1])}return this.origin_=t,this.origin_}getSrc(){return this.iconImage_.getSrc()}setSrc(t){this.iconImage_=Ka(null,t,{crossOrigin:this.crossOrigin_,referrerPolicy:this.referrerPolicy_},Da.IDLE,this.color_)}getSize(){return this.size_?this.size_:this.iconImage_.getSize()}getWidth(){const t=this.getScaleArray();return this.size_?this.size_[0]*t[0]:this.iconImage_.getImageState()==Da.LOADED?this.iconImage_.getSize()[0]*t[0]:void 0}getHeight(){const t=this.getScaleArray();return this.size_?this.size_[1]*t[1]:this.iconImage_.getImageState()==Da.LOADED?this.iconImage_.getSize()[1]*t[1]:void 0}setScale(t){delete this.initialOptions_,super.setScale(t)}listenImageChange(t){this.iconImage_.addEventListener(h.CHANGE,t)}load(){this.iconImage_.load()}unlistenImageChange(t){this.iconImage_.removeEventListener(h.CHANGE,t)}ready(){return this.iconImage_.ready()}}var vl=_l;class wl{constructor(t){t=t||{},this.color_=void 0!==t.color?t.color:null,this.lineCap_=t.lineCap,this.lineDash_=void 0!==t.lineDash?t.lineDash:null,this.lineDashOffset_=t.lineDashOffset,this.lineJoin_=t.lineJoin,this.miterLimit_=t.miterLimit,this.offset_=t.offset,this.width_=t.width}clone(){const t=this.getColor();return new wl({color:Array.isArray(t)?t.slice():t||void 0,lineCap:this.getLineCap(),lineDash:this.getLineDash()?this.getLineDash().slice():void 0,lineDashOffset:this.getLineDashOffset(),lineJoin:this.getLineJoin(),miterLimit:this.getMiterLimit(),offset:this.getOffset(),width:this.getWidth()})}getColor(){return this.color_}getLineCap(){return this.lineCap_}getLineDash(){return this.lineDash_}getLineDashOffset(){return this.lineDashOffset_}getLineJoin(){return this.lineJoin_}getMiterLimit(){return this.miterLimit_}getOffset(){return this.offset_}getWidth(){return this.width_}setColor(t){this.color_=t}setLineCap(t){this.lineCap_=t}setLineDash(t){this.lineDash_=t}setLineDashOffset(t){this.lineDashOffset_=t}setLineJoin(t){this.lineJoin_=t}setMiterLimit(t){this.miterLimit_=t}setOffset(t){this.offset_=t}setWidth(t){this.width_=t}}var xl=wl;class bl{constructor(t){t=t||{},this.geometry_=null,this.geometryFunction_=Pl,void 0!==t.geometry&&this.setGeometry(t.geometry),this.fill_=void 0!==t.fill?t.fill:null,this.image_=void 0!==t.image?t.image:null,this.renderer_=void 0!==t.renderer?t.renderer:null,this.hitDetectionRenderer_=void 0!==t.hitDetectionRenderer?t.hitDetectionRenderer:null,this.stroke_=void 0!==t.stroke?t.stroke:null,this.text_=void 0!==t.text?t.text:null,this.zIndex_=t.zIndex}clone(){var t;let e=this.getGeometry();return e&&"object"===typeof e&&(e=e.clone()),new bl({geometry:null!==e&&void 0!==e?e:void 0,fill:this.getFill()?this.getFill().clone():void 0,image:this.getImage()?this.getImage().clone():void 0,renderer:null!==(t=this.getRenderer())&&void 0!==t?t:void 0,stroke:this.getStroke()?this.getStroke().clone():void 0,text:this.getText()?this.getText().clone():void 0,zIndex:this.getZIndex()})}getRenderer(){return this.renderer_}setRenderer(t){this.renderer_=t}setHitDetectionRenderer(t){this.hitDetectionRenderer_=t}getHitDetectionRenderer(){return this.hitDetectionRenderer_}getGeometry(){return this.geometry_}getGeometryFunction(){return this.geometryFunction_}getFill(){return this.fill_}setFill(t){this.fill_=t}getImage(){return this.image_}setImage(t){this.image_=t}getStroke(){return this.stroke_}setStroke(t){this.stroke_=t}getText(){return this.text_}setText(t){this.text_=t}getZIndex(){return this.zIndex_}setGeometry(t){"function"===typeof t?this.geometryFunction_=t:"string"===typeof t?this.geometryFunction_=function(e){return e.get(t)}:t?void 0!==t&&(this.geometryFunction_=function(){return t}):this.geometryFunction_=Pl,this.geometry_=t}setZIndex(t){this.zIndex_=t}}function Ml(t){let e;if("function"===typeof t)e=t;else{let i;if(Array.isArray(t))i=t;else{ht("function"===typeof t.getZIndex,"Expected an `Style` or an array of `Style`");const e=t;i=[e]}e=function(){return i}}return e}let El=null;function Cl(t,e){if(!El){const t=new ml({color:"rgba(255,255,255,0.4)"}),e=new xl({color:"#3399CC",width:1.25});El=[new bl({image:new gl({fill:t,stroke:e,radius:5}),fill:t,stroke:e})]}return El}function Pl(t){return t.getGeometry()}var Al=bl;const Sl="#333";class Tl{constructor(t){t=t||{},this.font_=t.font,this.rotation_=t.rotation,this.rotateWithView_=t.rotateWithView,this.keepUpright_=t.keepUpright,this.scale_=t.scale,this.scaleArray_=Do(void 0!==t.scale?t.scale:1),this.text_=t.text,this.textAlign_=t.textAlign,this.justify_=t.justify,this.repeat_=t.repeat,this.textBaseline_=t.textBaseline,this.fill_=void 0!==t.fill?t.fill:new ml({color:Sl}),this.maxAngle_=void 0!==t.maxAngle?t.maxAngle:Math.PI/4,this.placement_=void 0!==t.placement?t.placement:"point",this.overflow_=!!t.overflow,this.stroke_=void 0!==t.stroke?t.stroke:null,this.offsetX_=void 0!==t.offsetX?t.offsetX:0,this.offsetY_=void 0!==t.offsetY?t.offsetY:0,this.backgroundFill_=t.backgroundFill?t.backgroundFill:null,this.backgroundStroke_=t.backgroundStroke?t.backgroundStroke:null,this.padding_=void 0===t.padding?null:t.padding,this.declutterMode_=t.declutterMode}clone(){const t=this.getScale();return new Tl({font:this.getFont(),placement:this.getPlacement(),repeat:this.getRepeat(),maxAngle:this.getMaxAngle(),overflow:this.getOverflow(),rotation:this.getRotation(),rotateWithView:this.getRotateWithView(),keepUpright:this.getKeepUpright(),scale:Array.isArray(t)?t.slice():t,text:this.getText(),textAlign:this.getTextAlign(),justify:this.getJustify(),textBaseline:this.getTextBaseline(),fill:this.getFill()instanceof ml?this.getFill().clone():this.getFill(),stroke:this.getStroke()?this.getStroke().clone():void 0,offsetX:this.getOffsetX(),offsetY:this.getOffsetY(),backgroundFill:this.getBackgroundFill()?this.getBackgroundFill().clone():void 0,backgroundStroke:this.getBackgroundStroke()?this.getBackgroundStroke().clone():void 0,padding:this.getPadding()||void 0,declutterMode:this.getDeclutterMode()})}getOverflow(){return this.overflow_}getFont(){return this.font_}getMaxAngle(){return this.maxAngle_}getPlacement(){return this.placement_}getRepeat(){return this.repeat_}getOffsetX(){return this.offsetX_}getOffsetY(){return this.offsetY_}getFill(){return this.fill_}getRotateWithView(){return this.rotateWithView_}getKeepUpright(){return this.keepUpright_}getRotation(){return this.rotation_}getScale(){return this.scale_}getScaleArray(){return this.scaleArray_}getStroke(){return this.stroke_}getText(){return this.text_}getTextAlign(){return this.textAlign_}getJustify(){return this.justify_}getTextBaseline(){return this.textBaseline_}getBackgroundFill(){return this.backgroundFill_}getBackgroundStroke(){return this.backgroundStroke_}getPadding(){return this.padding_}getDeclutterMode(){return this.declutterMode_}setOverflow(t){this.overflow_=t}setFont(t){this.font_=t}setMaxAngle(t){this.maxAngle_=t}setOffsetX(t){this.offsetX_=t}setOffsetY(t){this.offsetY_=t}setPlacement(t){this.placement_=t}setRepeat(t){this.repeat_=t}setRotateWithView(t){this.rotateWithView_=t}setKeepUpright(t){this.keepUpright_=t}setFill(t){this.fill_=t}setRotation(t){this.rotation_=t}setScale(t){this.scale_=t,this.scaleArray_=Do(void 0!==t?t:1)}setStroke(t){this.stroke_=t}setText(t){this.text_=t}setTextAlign(t){this.textAlign_=t}setJustify(t){this.justify_=t}setTextBaseline(t){this.textBaseline_=t}setBackgroundFill(t){this.backgroundFill_=t}setBackgroundStroke(t){this.backgroundStroke_=t}setPadding(t){this.padding_=t}}var Rl=Tl;function Il(t){return!0}function Ll(t){const e=qo(),i=kl(t,e),n=xa();return function(t,s){if(n.properties=t.getPropertiesInternal(),n.resolution=s,e.featureId){const e=t.getId();n.featureId=void 0!==e?e:null}return e.geometryType&&(n.geometryType=wa(t.getGeometry())),i(n)}}function Ol(t){const e=qo(),i=t.length,n=new Array(i);for(let o=0;o<i;++o)n[o]=Dl(t[o],e);const s=xa(),r=new Array(i);return function(t,o){if(s.properties=t.getPropertiesInternal(),s.resolution=o,e.featureId){const e=t.getId();s.featureId=void 0!==e?e:null}let a=0;for(let e=0;e<i;++e){const t=n[e](s);t&&(r[a]=t,a+=1)}return r.length=a,r}}function kl(t,e){const i=t.length,n=new Array(i);for(let s=0;s<i;++s){const i=t[s],r="filter"in i?ba(i.filter,Go,e):Il;let o;if(Array.isArray(i.style)){const t=i.style.length;o=new Array(t);for(let n=0;n<t;++n)o[n]=Dl(i.style[n],e)}else o=[Dl(i.style,e)];n[s]={filter:r,styles:o}}return function(e){const s=[];let r=!1;for(let o=0;o<i;++o){const i=n[o].filter;if(i(e)&&(!t[o].else||!r)){r=!0;for(const t of n[o].styles){const i=t(e);i&&s.push(i)}}}return s}}function Dl(t,e){const i=Nl(t,"",e),n=Gl(t,"",e),s=jl(t,e),r=Fl(t,e),o=Hl(t,"z-index",e);if(!i&&!n&&!s&&!r&&!b(t))throw new Error("No fill, stroke, point, or text symbolizer properties in style: "+JSON.stringify(t));const a=new Al;return function(t){let e=!0;if(i){const n=i(t);n&&(e=!1),a.setFill(n)}if(n){const i=n(t);i&&(e=!1),a.setStroke(i)}if(s){const i=s(t);i&&(e=!1),a.setText(i)}if(r){const i=r(t);i&&(e=!1),a.setImage(i)}return o&&a.setZIndex(o(t)),e?null:a}}function Nl(t,e,i){let n;if(e+"fill-pattern-src"in t)n=Kl(t,e+"fill-",i);else{if("none"===t[e+"fill-color"])return t=>null;n=Yl(t,e+"fill-color",i)}if(!n)return null;const s=new ml;return function(t){const e=n(t);return e===ho?null:(s.setColor(e),s)}}function Gl(t,e,i){const n=Hl(t,e+"stroke-width",i),s=Yl(t,e+"stroke-color",i);if(!n&&!s)return null;const r=Xl(t,e+"stroke-line-cap",i),o=Xl(t,e+"stroke-line-join",i),a=Ul(t,e+"stroke-line-dash",i),l=Hl(t,e+"stroke-line-dash-offset",i),h=Hl(t,e+"stroke-miter-limit",i),c=Hl(t,e+"stroke-offset",i),u=new xl;return function(t){if(s){const e=s(t);if(e===ho)return null;u.setColor(e)}if(n&&u.setWidth(n(t)),r){const e=r(t);if("butt"!==e&&"round"!==e&&"square"!==e)throw new Error("Expected butt, round, or square line cap");u.setLineCap(e)}if(o){const e=o(t);if("bevel"!==e&&"round"!==e&&"miter"!==e)throw new Error("Expected bevel, round, or miter line join");u.setLineJoin(e)}return a&&u.setLineDash(a(t)),l&&u.setLineDashOffset(l(t)),h&&u.setMiterLimit(h(t)),c&&u.setOffset(c(t)),u}}function jl(t,e){const i="text-",n=Xl(t,i+"value",e);if(!n)return null;const s=Nl(t,i,e),r=Nl(t,i+"background-",e),o=Gl(t,i,e),a=Gl(t,i+"background-",e),l=Xl(t,i+"font",e),h=Hl(t,i+"max-angle",e),c=Hl(t,i+"offset-x",e),u=Hl(t,i+"offset-y",e),d=Wl(t,i+"overflow",e),p=Xl(t,i+"placement",e),g=Hl(t,i+"repeat",e),f=ql(t,i+"scale",e),m=Wl(t,i+"rotate-with-view",e),y=Hl(t,i+"rotation",e),_=Xl(t,i+"align",e),v=Xl(t,i+"justify",e),w=Xl(t,i+"baseline",e),x=Wl(t,i+"keep-upright",e),b=Ul(t,i+"padding",e),M=rh(t,i+"declutter-mode"),E=new Rl({declutterMode:M});return function(t){if(E.setText(n(t)),s&&E.setFill(s(t)),r&&E.setBackgroundFill(r(t)),o&&E.setStroke(o(t)),a&&E.setBackgroundStroke(a(t)),l&&E.setFont(l(t)),h&&E.setMaxAngle(h(t)),c&&E.setOffsetX(c(t)),u&&E.setOffsetY(u(t)),d&&E.setOverflow(d(t)),p){const e=p(t);if("point"!==e&&"line"!==e)throw new Error("Expected point or line for text-placement");E.setPlacement(e)}if(g&&E.setRepeat(g(t)),f&&E.setScale(f(t)),m&&E.setRotateWithView(m(t)),y&&E.setRotation(y(t)),_){const e=_(t);if("left"!==e&&"center"!==e&&"right"!==e&&"end"!==e&&"start"!==e)throw new Error("Expected left, right, center, start, or end for text-align");E.setTextAlign(e)}if(v){const e=v(t);if("left"!==e&&"right"!==e&&"center"!==e)throw new Error("Expected left, right, or center for text-justify");E.setJustify(e)}if(w){const e=w(t);if("bottom"!==e&&"top"!==e&&"middle"!==e&&"alphabetic"!==e&&"hanging"!==e)throw new Error("Expected bottom, top, middle, alphabetic, or hanging for text-baseline");E.setTextBaseline(e)}return b&&E.setPadding(b(t)),x&&E.setKeepUpright(x(t)),E}}function Fl(t,e){return"icon-src"in t?Bl(t,e):"shape-points"in t?zl(t,e):"circle-radius"in t?Vl(t,e):null}function Bl(t,e){const i="icon-",n=i+"src",s=ah(t[n],n),r=Jl(t,i+"anchor",e),o=ql(t,i+"scale",e),a=Hl(t,i+"opacity",e),l=Jl(t,i+"displacement",e),h=Hl(t,i+"rotation",e),c=Wl(t,i+"rotate-with-view",e),u=ih(t,i+"anchor-origin"),d=nh(t,i+"anchor-x-units"),p=nh(t,i+"anchor-y-units"),g=Zl(t,i+"color");let f,m=null;if(void 0!==g){const n=Array.isArray(g)&&g.length>0&&"string"===typeof g[0];n?m=Yl(t,i+"color",e):f=hh(g,i+"color")}const y=eh(t,i+"cross-origin"),_=sh(t,i+"offset"),v=ih(t,i+"offset-origin"),w=Ql(t,i+"width"),x=Ql(t,i+"height"),b=th(t,i+"size"),M=rh(t,i+"declutter-mode"),E={src:s,anchorOrigin:u,anchorXUnits:d,anchorYUnits:p,crossOrigin:y,offset:_,offsetOrigin:v,height:x,width:w,size:b,declutterMode:M};let C=null;return function(t){if(C)m&&C.setColor(m(t));else{const e=m?m(t):f;C=new vl(void 0!==e?Object.assign({},E,{color:e}):Object.assign({},E))}return a&&C.setOpacity(a(t)),l&&C.setDisplacement(l(t)),h&&C.setRotation(h(t)),c&&C.setRotateWithView(c(t)),o&&C.setScale(o(t)),r&&C.setAnchor(r(t)),C}}function zl(t,e){const i="shape-",n=i+"points",s=i+"radius",r=lh(t[n],n);if(!(s in t))throw new Error("Expected a number for "+s);const o=Hl(t,s,e),a="number"===typeof t[s]?t[s]:5,l=i+"radius2",h=Hl(t,l,e),c="number"===typeof t[l]?t[l]:void 0,u=Nl(t,i,e),d=Gl(t,i,e),p=ql(t,i+"scale",e),g=Jl(t,i+"displacement",e),f=Hl(t,i+"rotation",e),m=Wl(t,i+"rotate-with-view",e),y=Ql(t,i+"angle"),_=rh(t,i+"declutter-mode"),v=new dl({points:r,radius:a,radius2:c,angle:y,declutterMode:_});return function(t){return o&&v.setRadius(o(t)),h&&v.setRadius2(h(t)),u&&v.setFill(u(t)),d&&v.setStroke(d(t)),g&&v.setDisplacement(g(t)),f&&v.setRotation(f(t)),m&&v.setRotateWithView(m(t)),p&&v.setScale(p(t)),v}}function Vl(t,e){const i="circle-",n=Nl(t,i,e),s=Gl(t,i,e),r=Hl(t,i+"radius",e),o=ql(t,i+"scale",e),a=Jl(t,i+"displacement",e),l=Hl(t,i+"rotation",e),h=Wl(t,i+"rotate-with-view",e),c=rh(t,i+"declutter-mode"),u=new gl({radius:5,declutterMode:c});return function(t){return r&&u.setRadius(r(t)),n&&u.setFill(n(t)),s&&u.setStroke(s(t)),a&&u.setDisplacement(a(t)),l&&u.setRotation(l(t)),h&&u.setRotateWithView(h(t)),o&&u.setScale(o(t)),u}}function Zl(t,e){if(!(e in t))return;const i=t[e];return void 0===i?void 0:i}function Hl(t,e,i){const n=Zl(t,e);if(void 0===n)return;const s=ba(n,jo,i);return function(t){return lh(s(t),e)}}function Xl(t,e,i){const n=Zl(t,e);if(void 0===n)return null;const s=ba(n,Fo,i);return function(t){return ah(s(t),e)}}function Kl(t,e,i){const n=Xl(t,e+"pattern-src",i),s=$l(t,e+"pattern-offset",i),r=$l(t,e+"pattern-size",i),o=Yl(t,e+"color",i);return function(t){return{src:n(t),offset:s&&s(t),size:r&&r(t),color:o&&o(t)}}}function Wl(t,e,i){const n=Zl(t,e);if(void 0===n)return null;const s=ba(n,Go,i);return function(t){const i=s(t);if("boolean"!==typeof i)throw new Error("Expected a boolean for "+e);return i}}function Yl(t,e,i){const n=Zl(t,e);if(void 0===n)return null;const s=ba(n,Bo,i);return function(t){return hh(s(t),e)}}function Ul(t,e,i){const n=Zl(t,e);if(void 0===n)return null;if(Array.isArray(n)&&(0===n.length||"string"!==typeof n[0])){const t=n.map((t,n)=>{if("number"===typeof t)return()=>t;const s=ba(t,jo,i);return function(t){return lh(s(t),`${e}[${n}]`)}});return function(e){const i=new Array(t.length);for(let n=0;n<t.length;++n)i[n]=t[n](e);return i}}const s=ba(n,zo,i);return function(t){return oh(s(t),e)}}function Jl(t,e,i){const n=Zl(t,e);if(void 0===n)return null;const s=ba(n,zo,i);return function(t){const i=oh(s(t),e);if(2!==i.length)throw new Error("Expected two numbers for "+e);return i}}function $l(t,e,i){const n=Zl(t,e);if(void 0===n)return null;const s=ba(n,zo,i);return function(t){return ch(s(t),e)}}function ql(t,e,i){const n=Zl(t,e);if(void 0===n)return null;const s=ba(n,zo|jo,i);return function(t){return uh(s(t),e)}}function Ql(t,e){const i=t[e];if(void 0!==i){if("number"!==typeof i)throw new Error("Expected a number for "+e);return i}}function th(t,e){const i=t[e];if(void 0!==i){if("number"===typeof i)return Do(i);if(!Array.isArray(i))throw new Error("Expected a number or size array for "+e);if(2!==i.length||"number"!==typeof i[0]||"number"!==typeof i[1])throw new Error("Expected a number or size array for "+e);return i}}function eh(t,e){const i=t[e];if(void 0!==i){if("string"!==typeof i)throw new Error("Expected a string for "+e);return i}}function ih(t,e){const i=t[e];if(void 0!==i){if("bottom-left"!==i&&"bottom-right"!==i&&"top-left"!==i&&"top-right"!==i)throw new Error("Expected bottom-left, bottom-right, top-left, or top-right for "+e);return i}}function nh(t,e){const i=t[e];if(void 0!==i){if("pixels"!==i&&"fraction"!==i)throw new Error("Expected pixels or fraction for "+e);return i}}function sh(t,e){const i=t[e];if(void 0!==i)return oh(i,e)}function rh(t,e){const i=t[e];if(void 0!==i){if("string"!==typeof i)throw new Error("Expected a string for "+e);if("declutter"!==i&&"obstacle"!==i&&"none"!==i)throw new Error("Expected declutter, obstacle, or none for "+e);return i}}function oh(t,e){if(!Array.isArray(t))throw new Error("Expected an array for "+e);const i=t.length;for(let n=0;n<i;++n)if("number"!==typeof t[n])throw new Error("Expected an array of numbers for "+e);return t}function ah(t,e){if("string"!==typeof t)throw new Error("Expected a string for "+e);return t}function lh(t,e){if("number"!==typeof t)throw new Error("Expected a number for "+e);return t}function hh(t,e){if("string"===typeof t)return t;const i=oh(t,e),n=i.length;if(n<3||n>4)throw new Error("Expected a color with 3 or 4 values for "+e);return i}function ch(t,e){const i=oh(t,e);if(2!==i.length)throw new Error("Expected an array of two numbers for "+e);return i}function uh(t,e){return"number"===typeof t?t:ch(t,e)}const dh={RENDER_ORDER:"renderOrder"};class ph extends oo{constructor(t){t=t||{};const e=Object.assign({},t);delete e.style,delete e.renderBuffer,delete e.updateWhileAnimating,delete e.updateWhileInteracting,super(e),this.declutter_=t.declutter?String(t.declutter):void 0,this.renderBuffer_=void 0!==t.renderBuffer?t.renderBuffer:100,this.style_=null,this.styleFunction_=void 0,this.setStyle(t.style),this.updateWhileAnimating_=void 0!==t.updateWhileAnimating&&t.updateWhileAnimating,this.updateWhileInteracting_=void 0!==t.updateWhileInteracting&&t.updateWhileInteracting}getDeclutter(){return this.declutter_}getFeatures(t){return super.getFeatures(t)}getRenderBuffer(){return this.renderBuffer_}getRenderOrder(){return this.get(dh.RENDER_ORDER)}getStyle(){return this.style_}getStyleFunction(){return this.styleFunction_}getUpdateWhileAnimating(){return this.updateWhileAnimating_}getUpdateWhileInteracting(){return this.updateWhileInteracting_}renderDeclutter(t,e){const i=this.getDeclutter();i in t.declutter===!1&&(t.declutter[i]=new lo.a(9)),this.getRenderer().renderDeclutter(t,e)}setRenderOrder(t){this.set(dh.RENDER_ORDER,t)}setStyle(t){this.style_=void 0===t?Cl:t;const e=gh(t);this.styleFunction_=null===t?void 0:Ml(e),this.changed()}setDeclutter(t){this.declutter_=t?String(t):void 0,this.changed()}}function gh(t){if(void 0===t)return Cl;if(!t)return null;if("function"===typeof t)return t;if(t instanceof Al)return t;if(!Array.isArray(t))return Ol([t]);if(0===t.length)return[];const e=t.length,i=t[0];if(i instanceof Al){const i=new Array(e);for(let n=0;n<e;++n){const e=t[n];if(!(e instanceof Al))throw new Error("Expected a list of style instances");i[n]=e}return i}if("style"in i){const i=new Array(e);for(let n=0;n<e;++n){const e=t[n];if(!("style"in e))throw new Error("Expected a list of rules with a style property");i[n]=e}return Ll(i)}const n=t;return Ol(n)}var fh=ph;class mh extends E{constructor(t,e,i,n){super(t),this.inversePixelTransform=e,this.frameState=i,this.context=n}}var yh=mh;class _h extends u{constructor(t){super(),this.map_=t}dispatchRenderEvent(t,e){O()}calculateMatrices2D(t){const e=t.viewState,i=t.coordinateToPixelTransform,n=t.pixelToCoordinateTransform;sn(i,t.size[0]/2,t.size[1]/2,1/e.resolution,-1/e.resolution,-e.rotation,-e.center[0],-e.center[1]),rn(n,i)}forEachFeatureAtCoordinate(t,e,i,n,s,r,o,a){let l;const h=e.viewState;function c(t,e,i,n){return s.call(r,e,t?i:null,n)}const u=h.projection,d=ye(t.slice(),u),p=[[0,0]];if(u.canWrapX()&&n){const t=u.getExtent(),e=ae(t);p.push([-e,0],[e,0])}const g=e.layerStatesArray,f=g.length,m=[],y=[];for(let v=0;v<p.length;v++)for(let n=f-1;n>=0;--n){const s=g[n],r=s.layer;if(r.hasRenderer()&&ro(s,h)&&o.call(a,r)){const n=r.getRenderer(),o=r.getSource();if(n&&o){const r=o.getWrapX()?d:t,a=c.bind(null,s.managed);y[0]=r[0]+p[v][0],y[1]=r[1]+p[v][1],l=n.forEachFeatureAtCoordinate(y,e,i,a,m)}if(l)return l}}if(0===m.length)return;const _=1/m.length;return m.forEach((t,e)=>t.distanceSq+=e*_),m.sort((t,e)=>t.distanceSq-e.distanceSq),m.some(t=>l=t.callback(t.feature,t.layer,t.geometry)),l}hasFeatureAtCoordinate(t,e,i,n,s,r){const o=this.forEachFeatureAtCoordinate(t,e,i,n,m,this,s,r);return void 0!==o}getMap(){return this.map_}renderFrame(t){O()}scheduleExpireIconCache(t){Za.canExpireCache()&&t.postRenderFunctions.push(vh)}}function vh(t,e){Za.expire()}var wh=_h;class xh extends wh{constructor(t){super(t),this.fontChangeListenerKey_=A(il,l.PROPERTYCHANGE,t.redrawText,t),this.element_=Q?Vs():document.createElement("div");const e=this.element_.style;e.position="absolute",e.width="100%",e.height="100%",e.zIndex="0",this.element_.className=Es+" ol-layers";const i=t.getViewport();i&&i.insertBefore(this.element_,i.firstChild||null),this.children_=[],this.renderedVisible_=!0}dispatchRenderEvent(t,e){const i=this.getMap();if(i.hasListener(t)){const n=new yh(t,void 0,e);i.dispatchEvent(n)}}disposeInternal(){T(this.fontChangeListenerKey_),this.element_.remove(),super.disposeInternal()}renderFrame(t){if(!t)return void(this.renderedVisible_&&(this.element_.style.display="none",this.renderedVisible_=!1));this.calculateMatrices2D(t),this.dispatchRenderEvent(no.PRECOMPOSE,t);const e=t.layerStatesArray.sort((t,e)=>t.zIndex-e.zIndex),i=e.some(t=>t.layer instanceof fh&&t.layer.getDeclutter());i&&(t.declutter={});const n=t.viewState;this.children_.length=0;const s=[];let r=null;for(let l=0,h=e.length;l<h;++l){const i=e[l];t.layerIndex=l;const o=i.layer,a=o.getSourceState();if(!ro(i,n)||"ready"!=a&&"undefined"!=a){o.unrender();continue}const h=o.render(t,r);h&&(h!==r&&(this.children_.push(h),r=h),s.push(i))}this.declutter(t,s),zs(this.element_,this.children_);const o=this.getMap(),a=o.getTargetElement();if(Zs(a)){const t=a.getContext("2d");for(const e of this.children_){const i=e.firstElementChild||e,n=e.style.backgroundColor;if(n&&(!Zs(i)||i.width>0)&&(t.fillStyle=n,t.fillRect(0,0,a.width,a.height)),Zs(i)&&i.width>0){t.save();const n=e.style.opacity||i.style.opacity;t.globalAlpha=""===n?1:Number(n);const s=i.style.transform;if(s)t.transform(...hn(s));else{const e=parseFloat(i.style.width)/i.width,n=parseFloat(i.style.height)/i.height;t.transform(e,0,0,n,0,0)}t.drawImage(i,0,0),t.restore()}}}this.dispatchRenderEvent(no.POSTCOMPOSE,t),this.renderedVisible_||(this.element_.style.display="",this.renderedVisible_=!0),this.scheduleExpireIconCache(t)}declutter(t,e){if(t.declutter){for(let i=e.length-1;i>=0;--i){const n=e[i],s=n.layer;s.getDeclutter()&&s.renderDeclutter(t,n)}e.forEach(e=>e.layer.renderDeferred(t))}}}var bh=xh;function Mh(t){t instanceof oo?t.setMapInternal(null):t instanceof io&&t.getLayers().forEach(Mh)}function Eh(t,e){if(t instanceof oo)t.setMapInternal(e);else if(t instanceof io){const i=t.getLayers().getArray();for(let t=0,n=i.length;t<n;++t)Eh(i[t],e)}}class Ch extends j{constructor(t){super(),t=t||{},this.on,this.once,this.un;const e=Ph(t);this.renderComplete_=!1,this.loaded_=!0,this.boundHandleBrowserEvent_=this.handleBrowserEvent.bind(this),this.maxTilesLoading_=void 0!==t.maxTilesLoading?t.maxTilesLoading:16,this.pixelRatio_=void 0!==t.pixelRatio?t.pixelRatio:q,this.postRenderTimeoutHandle_,this.animationDelayKey_,this.animationDelay_=this.animationDelay_.bind(this),this.coordinateToPixelTransform_=en(),this.pixelToCoordinateTransform_=en(),this.frameIndex_=0,this.frameState_=null,this.previousExtent_=null,this.viewPropertyListenerKey_=null,this.viewChangeListenerKey_=null,this.layerGroupPropertyListenerKeys_=null,Q||(this.viewport_=document.createElement("div"),this.viewport_.className="ol-viewport"+("ontouchstart"in window?" ol-touch":""),this.viewport_.style.position="relative",this.viewport_.style.overflow="hidden",this.viewport_.style.width="100%",this.viewport_.style.height="100%",this.overlayContainer_=document.createElement("div"),this.overlayContainer_.style.position="absolute",this.overlayContainer_.style.zIndex="0",this.overlayContainer_.style.width="100%",this.overlayContainer_.style.height="100%",this.overlayContainer_.style.pointerEvents="none",this.overlayContainer_.className="ol-overlaycontainer",this.viewport_.appendChild(this.overlayContainer_),this.overlayContainerStopEvent_=document.createElement("div"),this.overlayContainerStopEvent_.style.position="absolute",this.overlayContainerStopEvent_.style.zIndex="0",this.overlayContainerStopEvent_.style.width="100%",this.overlayContainerStopEvent_.style.height="100%",this.overlayContainerStopEvent_.style.pointerEvents="none",this.overlayContainerStopEvent_.className="ol-overlaycontainer-stopevent",this.viewport_.appendChild(this.overlayContainerStopEvent_)),this.mapBrowserEventHandler_=null,this.moveTolerance_=t.moveTolerance,this.keyboardEventTarget_=e.keyboardEventTarget,this.targetChangeHandlerKeys_=null,this.targetElement_=null,Q||(this.resizeObserver_=new ResizeObserver(()=>this.updateSize())),this.controls=e.controls||(Q?new V:qs()),this.interactions=e.interactions||(Q?new V:Yr({onFocusOnly:!0})),this.overlays_=e.overlays,this.overlayIdIndex_={},this.renderer_=null,this.postRenderFunctions_=[],this.tileQueue_=new gt(this.getTilePriority.bind(this),this.handleTileChange_.bind(this)),this.addChangeListener(at.LAYERGROUP,this.handleLayerGroupChanged_),this.addChangeListener(at.VIEW,this.handleViewChanged_),this.addChangeListener(at.SIZE,this.handleSizeChanged_),this.addChangeListener(at.TARGET,this.handleTargetChanged_),this.setProperties(e.values);const i=this;!t.view||t.view instanceof bs||t.view.then((function(t){i.setView(new bs(t))})),this.controls.addEventListener(a.ADD,t=>{t.element.setMap(this)}),this.controls.addEventListener(a.REMOVE,t=>{t.element.setMap(null)}),this.interactions.addEventListener(a.ADD,t=>{t.element.setMap(this)}),this.interactions.addEventListener(a.REMOVE,t=>{t.element.setMap(null)}),this.overlays_.addEventListener(a.ADD,t=>{this.addOverlayInternal_(t.element)}),this.overlays_.addEventListener(a.REMOVE,t=>{const e=t.element.getId();void 0!==e&&delete this.overlayIdIndex_[e.toString()],t.element.setMap(null)}),this.controls.forEach(t=>{t.setMap(this)}),this.interactions.forEach(t=>{t.setMap(this)}),this.overlays_.forEach(this.addOverlayInternal_.bind(this))}addControl(t){this.getControls().push(t)}addInteraction(t){this.getInteractions().push(t)}addLayer(t){const e=this.getLayerGroup().getLayers();e.push(t)}handleLayerAdd_(t){Eh(t.layer,this)}addOverlay(t){this.getOverlays().push(t)}addOverlayInternal_(t){const e=t.getId();void 0!==e&&(this.overlayIdIndex_[e.toString()]=t),t.setMap(this)}disposeInternal(){var t;this.controls.clear(),this.interactions.clear(),this.overlays_.clear(),null===(t=this.resizeObserver_)||void 0===t||t.disconnect(),this.setTarget(null),super.disposeInternal()}forEachFeatureAtPixel(t,e,i){if(!this.frameState_||!this.renderer_)return;const n=this.getCoordinateFromPixelInternal(t);i=void 0!==i?i:{};const s=void 0!==i.hitTolerance?i.hitTolerance:0,r=void 0!==i.layerFilter?i.layerFilter:m,o=!1!==i.checkWrapped;return this.renderer_.forEachFeatureAtCoordinate(n,this.frameState_,s,o,e,null,r,null)}getFeaturesAtPixel(t,e){const i=[];return this.forEachFeatureAtPixel(t,(function(t){i.push(t)}),e),i}getAllLayers(){const t=[];function e(i){i.forEach((function(i){i instanceof io?e(i.getLayers()):t.push(i)}))}return e(this.getLayers()),t}hasFeatureAtPixel(t,e){if(!this.frameState_||!this.renderer_)return!1;const i=this.getCoordinateFromPixelInternal(t);e=void 0!==e?e:{};const n=void 0!==e.layerFilter?e.layerFilter:m,s=void 0!==e.hitTolerance?e.hitTolerance:0,r=!1!==e.checkWrapped;return this.renderer_.hasFeatureAtCoordinate(i,this.frameState_,s,r,n,null)}getEventCoordinate(t){return this.getCoordinateFromPixel(this.getEventPixel(t))}getEventCoordinateInternal(t){return this.getCoordinateFromPixelInternal(this.getEventPixel(t))}getEventPixel(t){const e=this.viewport_,i=e.getBoundingClientRect(),n=this.getSize(),s=i.width/n[0],r=i.height/n[1],o="changedTouches"in t?t.changedTouches[0]:t;return[(o.clientX-i.left)/s,(o.clientY-i.top)/r]}getTarget(){return this.get(at.TARGET)}getTargetElement(){return this.targetElement_}getCoordinateFromPixel(t){return Ji(this.getCoordinateFromPixelInternal(t),this.getView().getProjection())}getCoordinateFromPixelInternal(t){const e=this.frameState_;return e?nn(e.pixelToCoordinateTransform,t.slice()):null}getControls(){return this.controls}getOverlays(){return this.overlays_}getOverlayById(t){const e=this.overlayIdIndex_[t.toString()];return void 0!==e?e:null}getInteractions(){return this.interactions}getLayerGroup(){return this.get(at.LAYERGROUP)}setLayers(t){const e=this.getLayerGroup();if(t instanceof V)return void e.setLayers(t);const i=e.getLayers();i.clear(),i.extend(t)}getLayers(){const t=this.getLayerGroup().getLayers();return t}getLoadingOrNotReady(){const t=this.getLayerGroup().getLayerStatesArray();for(let e=0,i=t.length;e<i;++e){const i=t[e];if(!i.visible)continue;const n=i.layer.getRenderer();if(n&&!n.ready)return!0;const s=i.layer.getSource();if(s&&s.loading)return!0}return!1}getPixelFromCoordinate(t){const e=$i(t,this.getView().getProjection());return this.getPixelFromCoordinateInternal(e)}getPixelFromCoordinateInternal(t){const e=this.frameState_;return e?nn(e.coordinateToPixelTransform,t.slice(0,2)):null}getPixelRatio(){return this.pixelRatio_}setPixelRatio(t){this.pixelRatio_!==t&&(this.pixelRatio_=t,this.render())}getRenderer(){return this.renderer_}getSize(){return this.get(at.SIZE)}getView(){return this.get(at.VIEW)}getViewport(){return this.viewport_}getOverlayContainer(){return this.overlayContainer_}getOverlayContainerStopEvent(){return this.overlayContainerStopEvent_}getOwnerDocument(){const t=this.getTargetElement();return t?t.ownerDocument:document}getTilePriority(t,e,i,n){return ft(this.frameState_,t,e,i,n)}handleBrowserEvent(t,e){e=e||t.type;const i=new K(e,this,t);this.handleMapBrowserEvent(i)}handleMapBrowserEvent(t){if(!this.frameState_)return;const e=t.originalEvent,i=e.type;if(i===nt.POINTERDOWN||i===h.WHEEL||i===h.KEYDOWN){const t=this.getOwnerDocument(),i=this.viewport_.getRootNode?this.viewport_.getRootNode():t,n=e.target,s=i instanceof ShadowRoot?i.host===n?i.host.ownerDocument:i:i===t?t.documentElement:i;if(this.overlayContainerStopEvent_.contains(n)||!s.contains(n))return}if(t.frameState=this.frameState_,!1!==this.dispatchEvent(t)){const e=this.getInteractions().getArray().slice();for(let i=e.length-1;i>=0;i--){const n=e[i];if(n.getMap()!==this||!n.getActive()||!this.getTargetElement())continue;const s=n.handleEvent(t);if(!s||t.propagationStopped)break}}}handlePostRender(){const t=this.frameState_,e=this.tileQueue_;if(!e.isEmpty()){let i=this.maxTilesLoading_,n=i;if(t){const e=t.viewHints;if(e[mt.ANIMATING]||e[mt.INTERACTING]){const e=Date.now()-t.time>8;i=e?0:8,n=e?0:2}}e.getTilesLoading()<i&&(e.reprioritize(),e.loadMoreTiles(i,n))}t&&this.renderer_&&!t.animate&&(this.renderComplete_?(this.hasListener(no.RENDERCOMPLETE)&&this.renderer_.dispatchRenderEvent(no.RENDERCOMPLETE,t),!1===this.loaded_&&(this.loaded_=!0,this.dispatchEvent(new H(ot.LOADEND,this,t)))):!0===this.loaded_&&(this.loaded_=!1,this.dispatchEvent(new H(ot.LOADSTART,this,t))));const i=this.postRenderFunctions_;if(t)for(let n=0,s=i.length;n<s;++n)i[n](this,t);i.length=0}handleSizeChanged_(){this.getView()&&!this.getView().getAnimating()&&this.getView().resolveConstraints(0),this.render()}handleTargetChanged_(){if(this.mapBrowserEventHandler_){for(let t=0,e=this.targetChangeHandlerKeys_.length;t<e;++t)T(this.targetChangeHandlerKeys_[t]);this.targetChangeHandlerKeys_=null,this.viewport_.removeEventListener(h.CONTEXTMENU,this.boundHandleBrowserEvent_),this.viewport_.removeEventListener(h.WHEEL,this.boundHandleBrowserEvent_),this.mapBrowserEventHandler_.dispose(),this.mapBrowserEventHandler_=null,this.viewport_.remove()}if(this.targetElement_&&!Zs(this.targetElement_)){var t;null===(t=this.resizeObserver_)||void 0===t||t.unobserve(this.targetElement_);const e=this.targetElement_.getRootNode();e instanceof ShadowRoot&&this.resizeObserver_.unobserve(e.host),this.setSize(void 0)}const e=this.getTarget(),i="string"===typeof e?document.getElementById(e):e;if(this.targetElement_=i,i){if(Zs(i)||i.appendChild(this.viewport_),this.renderer_||(this.renderer_=new bh(this)),!Zs(i)){this.mapBrowserEventHandler_=new rt(this,this.moveTolerance_);for(const e in W)this.mapBrowserEventHandler_.addEventListener(W[e],this.handleMapBrowserEvent.bind(this));let t;if(this.viewport_.addEventListener(h.CONTEXTMENU,this.boundHandleBrowserEvent_,!1),this.viewport_.addEventListener(h.WHEEL,this.boundHandleBrowserEvent_,!!it&&{passive:!1}),this.keyboardEventTarget_)t=this.keyboardEventTarget_;else{const e=i.getRootNode(),n=e instanceof ShadowRoot?e.host:i;t=n}if(this.targetChangeHandlerKeys_=[A(t,h.KEYDOWN,this.handleBrowserEvent,this),A(t,h.KEYPRESS,this.handleBrowserEvent,this)],i instanceof HTMLElement){var n;const t=i.getRootNode();t instanceof ShadowRoot&&this.resizeObserver_.observe(t.host),null===(n=this.resizeObserver_)||void 0===n||n.observe(i)}}this.updateSize()}else this.renderer_&&(clearTimeout(this.postRenderTimeoutHandle_),this.postRenderTimeoutHandle_=void 0,this.postRenderFunctions_.length=0,this.renderer_.dispose(),this.renderer_=null),this.animationDelayKey_&&(cancelAnimationFrame(this.animationDelayKey_),this.animationDelayKey_=void 0)}handleTileChange_(){this.render()}handleViewPropertyChanged_(){this.render()}handleViewChanged_(){this.viewPropertyListenerKey_&&(T(this.viewPropertyListenerKey_),this.viewPropertyListenerKey_=null),this.viewChangeListenerKey_&&(T(this.viewChangeListenerKey_),this.viewChangeListenerKey_=null);const t=this.getView();t&&(this.updateViewportSize_(this.getSize()),this.viewPropertyListenerKey_=A(t,l.PROPERTYCHANGE,this.handleViewPropertyChanged_,this),this.viewChangeListenerKey_=A(t,h.CHANGE,this.handleViewPropertyChanged_,this),t.resolveConstraints(0)),this.render()}handleLayerGroupChanged_(){this.layerGroupPropertyListenerKeys_&&(this.layerGroupPropertyListenerKeys_.forEach(T),this.layerGroupPropertyListenerKeys_=null);const t=this.getLayerGroup();t&&(this.handleLayerAdd_(new Qr("addlayer",t)),this.layerGroupPropertyListenerKeys_=[A(t,l.PROPERTYCHANGE,this.render,this),A(t,h.CHANGE,this.render,this),A(t,"addlayer",this.handleLayerAdd_,this),A(t,"removelayer",this.handleLayerRemove_,this)]),this.render()}isRendered(){return!!this.frameState_}animationDelay_(){this.animationDelayKey_=void 0,this.renderFrame_(Date.now())}renderSync(){this.animationDelayKey_&&cancelAnimationFrame(this.animationDelayKey_),this.animationDelay_()}redrawText(){if(!this.frameState_)return;const t=this.frameState_.layerStatesArray;for(let e=0,i=t.length;e<i;++e){const i=t[e].layer;i.hasRenderer()&&i.getRenderer().handleFontsChanged()}}render(){this.renderer_&&void 0===this.animationDelayKey_&&(this.animationDelayKey_=requestAnimationFrame(this.animationDelay_))}removeControl(t){return this.getControls().remove(t)}removeInteraction(t){return this.getInteractions().remove(t)}removeLayer(t){const e=this.getLayerGroup().getLayers();return e.remove(t)}handleLayerRemove_(t){Mh(t.layer)}removeOverlay(t){return this.getOverlays().remove(t)}renderFrame_(t){const e=this.getSize(),i=this.getView(),n=this.frameState_;let s=null;if(void 0!==e&&ko(e)&&i&&i.isDef()){const n=i.getHints(this.frameState_?this.frameState_.viewHints:void 0),r=i.getState();if(s={animate:!1,coordinateToPixelTransform:this.coordinateToPixelTransform_,declutter:null,extent:ee(r.center,r.resolution,r.rotation,e),index:this.frameIndex_++,layerIndex:0,layerStatesArray:this.getLayerGroup().getLayerStatesArray(),pixelRatio:this.pixelRatio_,pixelToCoordinateTransform:this.pixelToCoordinateTransform_,postRenderFunctions:[],size:e,tileQueue:this.tileQueue_,time:t,usedTiles:{},viewState:r,viewHints:n,wantedTiles:{},mapId:D(this),renderTargets:{}},r.nextCenter&&r.nextResolution){const t=isNaN(r.nextRotation)?r.rotation:r.nextRotation;s.nextExtent=ee(r.nextCenter,r.nextResolution,t,e)}}if(this.frameState_=s,this.renderer_.renderFrame(s),s){if(s.animate&&this.render(),Array.prototype.push.apply(this.postRenderFunctions_,s.postRenderFunctions),n){const t=!this.previousExtent_||!he(this.previousExtent_)&&!Xt(s.extent,this.previousExtent_);t&&(this.dispatchEvent(new H(ot.MOVESTART,this,n)),this.previousExtent_=Vt(this.previousExtent_))}const t=this.previousExtent_&&!s.viewHints[mt.ANIMATING]&&!s.viewHints[mt.INTERACTING]&&!Xt(s.extent,this.previousExtent_);t&&(this.dispatchEvent(new H(ot.MOVEEND,this,s)),kt(s.extent,this.previousExtent_))}this.dispatchEvent(new H(ot.POSTRENDER,this,s)),this.renderComplete_=(this.hasListener(ot.LOADSTART)||this.hasListener(ot.LOADEND)||this.hasListener(no.RENDERCOMPLETE))&&!this.tileQueue_.getTilesLoading()&&!this.tileQueue_.getCount()&&!this.getLoadingOrNotReady(),this.postRenderTimeoutHandle_||(this.postRenderTimeoutHandle_=setTimeout(()=>{this.postRenderTimeoutHandle_=void 0,this.handlePostRender()},0))}setLayerGroup(t){const e=this.getLayerGroup();e&&this.handleLayerRemove_(new Qr("removelayer",e)),this.set(at.LAYERGROUP,t)}setSize(t){this.set(at.SIZE,t)}setTarget(t){this.set(at.TARGET,t)}setView(t){if(!t||t instanceof bs)return void this.set(at.VIEW,t);this.set(at.VIEW,new bs);const e=this;t.then((function(t){e.setView(new bs(t))}))}updateSize(){const t=this.getTargetElement();let e=void 0;if(t){let i,n;if(Zs(t)){const e=t.getContext("2d").getTransform();i=t.width/e.a,n=t.height/e.d}else{const e=getComputedStyle(t);i=t.offsetWidth-parseFloat(e["borderLeftWidth"])-parseFloat(e["paddingLeft"])-parseFloat(e["paddingRight"])-parseFloat(e["borderRightWidth"]),n=t.offsetHeight-parseFloat(e["borderTopWidth"])-parseFloat(e["paddingTop"])-parseFloat(e["paddingBottom"])-parseFloat(e["borderBottomWidth"])}isNaN(i)||isNaN(n)||(e=[Math.max(0,i),Math.max(0,n)],!ko(e)&&(t.offsetWidth||t.offsetHeight||t.getClientRects().length)&&Ae("No map visible because the map container's width or height are 0."))}const i=this.getSize();!e||i&&f(e,i)||(this.setSize(e),this.updateViewportSize_(e))}updateViewportSize_(t){const e=this.getView();e&&e.setViewportSize(t)}}function Ph(t){let e=null;void 0!==t.keyboardEventTarget&&(e="string"===typeof t.keyboardEventTarget?document.getElementById(t.keyboardEventTarget):t.keyboardEventTarget);const i={},n=t.layers&&"function"===typeof t.layers.getLayers?t.layers:new io({layers:t.layers});let s,r,o;return i[at.LAYERGROUP]=n,i[at.TARGET]=t.target,i[at.VIEW]=t.view instanceof bs?t.view:new bs,void 0!==t.controls&&(Array.isArray(t.controls)?s=new V(t.controls.slice()):(ht("function"===typeof t.controls.getArray,"Expected `controls` to be an array or an `ol/Collection.js`"),s=t.controls)),void 0!==t.interactions&&(Array.isArray(t.interactions)?r=new V(t.interactions.slice()):(ht("function"===typeof t.interactions.getArray,"Expected `interactions` to be an array or an `ol/Collection.js`"),r=t.interactions)),void 0!==t.overlays?Array.isArray(t.overlays)?o=new V(t.overlays.slice()):(ht("function"===typeof t.overlays.getArray,"Expected `overlays` to be an array or an `ol/Collection.js`"),o=t.overlays):o=new V,{controls:s,interactions:r,keyboardEventTarget:e,overlays:o,values:i}}var Ah=Ch,Sh=i("96f4");class Th{constructor(){this.map=null,this._lPolygon=null,this._measureTooltip=null,this.currentLayer=[!1,!1,!0],this.polygonGeojsonArr=[],this.polygonGeojson=null,this.lModifyEventArr=[],this.lmap=null,this.lMEvent=null,this.am=new Sh["AM"],this.type=2,this.lPolygonNewArr=new Array,this.polygonGeojsonMap=new Ah,this.drawPolygonArr=new Set,this.drawLineArr=new Set,this._lRectangle=null,this.layers=null,this.drawZIndex=1}init(t){const{el:e,type:i,callback:n,viewOptions:s,layerType:r,mapType:o}=t;this.initMap({el:e,callback:n,viewOptions:s,type:i,layerType:r})}initMap({el:t,callback:e,type:i,viewOptions:n,layerType:s}){this.lmap||(this.lmap=new Sh["LMap"]({controls:Sh["MapConfig"].Defaults,interactions:Yr({pinchRotate:!1})})),setTimeout(()=>{const r=async()=>{this.map&&(this.map=null);const{map:r,layers:o}=await this.lmap.onLoad(t,i,s);this.map=r,this.layers=o,Sh["MapConfig"].View=n,this.map.setView(Sh["MapConfig"].View),e&&e(this.map,o)};r()},100)}get getMapTypeLength(){return this.lmap.getMapTypeLength}get getLayeTypeLength(){return this.lmap.getLayeTypeLength}selectMapLayer(t,e){return this.lmap?this.lmap.selectLayers(t,e):0}initBingMap(t,e,i){this.lmap||(this.lmap=new Sh["LMap"]({controls:Sh["MapConfig"].Defaults})),setTimeout(()=>{const n=async()=>{this.map&&(this.map=null);const{map:n,layers:s}=await this.lmap.onLoad(t,2,2);this.map=n,this.layers=s,Sh["MapConfig"].View=i,this.map.setView(Sh["MapConfig"].View),e&&e(this.map,s)};n()},100)}initBingMapNew(t,e,i){this.lmap||(this.lmap=new Sh["LMap"]({controls:Sh["MapConfig"].Defaults})),setTimeout(()=>{const n=async()=>{this.map&&(this.map=null);const{map:n,layers:s}=await this.lmap.onLoad(t,0,2);this.map=n,this.layers=s,Sh["MapConfig"].View=i,this.map.setView(Sh["MapConfig"].View),e&&e(this.map,s)};n()},100)}async initVectorMap(t){const{el:e,isAnalysisBBOX:i,isAnalysisCenter:n,callback:s,delaytime:r,isDrag:o}=t,a=new Sh["VectorMap"]({isAnalysisBBOX:i,isAnalysisCenter:n,isDrag:o,callback:t=>{s&&s(t)}});return new Promise(t=>{setTimeout(async()=>{const i=await a.onLoad(e);t({map:i,vmap:a})},r||100)})}async initStaticMap(t,e){return await new Promise((i,n)=>{setTimeout(s=>{const r=new Ah({target:t,view:e.view,layers:[e.layer]});this.map=r,this.layers=[e.layer],r?i(r):n(null)},30)})}getVectorLayerView(){return Sh["MapConfig"].getVectorLayerView}onSetLayers(t){this.type=t,this.currentLayer=this.currentLayer.map(t=>!1),this.currentLayer[t]=!0,this.removeLayers(t),this.addLayers(t)}removeLayers(t){Sh["MapConfig"].TMapLayerArr[t].forEach((t,e)=>{this.map.removeLayer(t)})}addLayers(t){Sh["MapConfig"].TMapLayerArr[t].forEach((t,e)=>{this.map.addLayer(t)})}onCreatePolygon(t,e=!1){this.polygonGeojson&&this.map.removeLayer(this.polygonGeojson),this._lPolygon&&this.clearlPolygon();return this._lPolygon=new Sh["LPolygon"](this.map,{strokeColor:"rgba(255,201,14, 1)",fillColor:"rgba(255,201,14, 0.4)"},e),this._lPolygon}skipCurrentDraw(){this._lPolygon&&this._lPolygon.skipCurrentDraw()}onCancel(){this._lPolygon&&this._lPolygon.removeLastPoint()}onDelete(t){this._lPolygon&&(this._lPolygon.remove(),this._lPolygon=null,this._removeMeasureTooltip(),t&&t())}getGeoJson(){if(this._lPolygon){const[t,e]=this._lPolygon.getCenterPoint(),i=Object(Sh["createGeoJson"])(this._lPolygon.getCoordinates(),{ruleId:"",centerlon:t,centerlat:e});return i}return null}getGeoJsonNew(t){if(this.polygonGeojson){const t=this.polygonGeojson,e=Object(Sh["createGeoJson"])(t.getSource().getFeatures()[0].getGeometry().getCoordinates(),{ruleId:"",centerlon:0,centerlat:0});return e}return null}getPolygonGeoJson(){return this._lPolygon?this._lPolygon.getGeoJson():null}onCreateLine(t){if(this.map){let e=new Sh["LDraw"]("LineString",t||(()=>{}),this.map,this.drawZIndex);return this.drawLineArr.add(e),e}return null}onCreateArea(t){if(this.map){let e=new Sh["LDraw"]("Polygon",t||(()=>{}),this.map,this.drawZIndex);return this.drawPolygonArr.add(e),e}return null}removeDrawArr(){this.drawLineArr.forEach(t=>{if(t)try{t.clear()}catch(e){}}),this.drawLineArr.clear(),this.drawPolygonArr.forEach(t=>{if(t)try{t.clear()}catch(e){}}),this.drawPolygonArr.clear()}clearlPolygon(){this.map&&this._lPolygon&&(this._lPolygon.remove(),this._lPolygon=null)}_createMeasureTooltip(){const t=new Sh["MeasureTooltip"];return t.setOffset([0,-30]),this._measureTooltip=t,t}_removeMeasureTooltip(){this.map&&this._measureTooltip&&this.map.removeOverlay(this._measureTooltip.getMarker())}createPolygonGeojson(t,e="rgba(255, 255, 255, 0.3)",i="rgba(00, 131, 241, 1)",n,s=!1,r=[]){if(this.map){const o=Object(Sh["createPolygonGeojson"])(t,e,i,n,s,r);this.polygonGeojsonArr.push(o),this.polygonGeojson=null,this.map.addLayer(o)}}createPolygonGeojsonNew(t,e="rgba(255, 255, 255, 0.3)",i="rgba(00, 131, 241, 1)",n,s=!1){if(this.polygonGeojson&&(this.polygonGeojson=null),this.map){const r=Object(Sh["createPolygonGeojson"])(t,e,i,n,s);this.polygonGeojson=r,this.map.addLayer(r)}}removePolygonGeojsons(){if(!this.polygonGeojsonArr.length)return;let t=null;while(t=this.polygonGeojsonArr.shift())this.map.removeLayer(t),t=null}removePolygonGeojsonNew(){this.polygonGeojson&&(this.map.removeLayer(this.polygonGeojson),this.polygonGeojson=null)}clear(){this.map&&(this.am&&(this.am=null,this.am=new Sh["AM"]),this.removeOverlays(),this.removeLModifyEventArr(),this.removePolygonGeojsons(),this.clearlPolygon(),this.removeLModifyEvent(),this.removePolygonGeojsonNew(),this.removeMapsLayers())}clearNew(){this.removeOverlays(),this.removeLModifyEventArr(),this.removePolygonGeojsons(),this.clearlPolygon(),this.removeLModifyEvent(),this.removePolygonGeojsonNew()}getMap(){return this.map}setCenter([t,e],i){if(!this.map)return;const n=this.map.getView();n.setCenter([t,e]),i>0&&n.setZoom(i)}setZoom(t){if(!this.map)return;const e=this.map.getView();e.setZoom(t)}setMaxZoom(t){if(!this.map)return;const e=this.map.getView();e.setMaxZoom(t)}setMinZoom(){if(!this.map)return;const t=this.map.getView();t.setMinZoom(zoom)}get getZoom(){if(!this.map)return 0;const t=this.map.getView();return t.getZoom()}getCenter(){if(!this.map)return;const t=this.map.getView();let[e,i]=t.getCenter();return[e,i]}fit(t){Object(Sh["fitNew"])(this.map,t)}createMarker(t,e=15,i=15){return new Sh["LMarker"](t,e,i)}removeMarker(t){this.map.removeOverlay(t.getMarker())}lModifyEventArr(){this.lModifyEventArr.length=0,this.polygonGeojsonArr.forEach((t,e)=>{const i=new Sh["LModifyEvent"](t,this.map);i.setActive(),this.lModifyEventArr.push(i)})}removeLModifyEventArr(){if(!this.lModifyEventArr.length)return;let t=null;while(t=this.lModifyEventArr.shift())t.setActive(!1),t.remove(),t=null}lModifyEvent(){if(this.map&&this.polygonGeojson){const t=new Sh["LModifyEvent"](this.polygonGeojson,this.map);t.setActive(),this.lMEvent=t}}removeLModifyEvent(){this.lMEvent&&(this.lMEvent.setActive(!1),this.lMEvent.remove())}convertWGS84GeoJSONgcj_encrypt(t){const{bbox:e,geometry:i,properties:n}=t,s=[];for(let a=0;a<e.length;a+=2){const{lon:t,lat:i}=Sh["GPS"].gcj_encrypt(e[a],e[a+1]);s.push(t),s.push(i)}t.bbox=s;const r=i.coordinates,o=new Array;for(let a=0;a<r.length;a++){o.push(r[a]);for(let t=0;t<r[a].length;t++){const e=r[a][t],{lon:i,lat:n}=Sh["GPS"].gcj_encrypt(e[0],e[1]);o[a][t]=[i,n]}}if(i.coordinates=o,n&&n.center){const[e,i]=n.center,[s,r]=Sh["GPS"].gcj_encrypt(e,i);t.properties.center=[s,r]}return t}gcj_encryptConvertWGS84GeoJSON(t){const{bbox:e,geometry:i,properties:n}=t,s=[];for(let a=0;a<e.length;a+=2){const{lon:t,lat:i}=Sh["GPS"].gcj_decrypt(e[a],e[a+1]);s.push(t),s.push(i)}t.bbox=s;const r=i.coordinates,o=new Array;for(let a=0;a<r.length;a++){o.push(r[a]);for(let t=0;t<r[a].length;t++){const e=r[a][t],{lon:i,lat:n}=Sh["GPS"].gcj_decrypt(e[0],e[1]);o[a][t]=[i,n]}}if(i.coordinates=o,n&&n.center){const[e,i]=n.center,[s,r]=Sh["GPS"].gcj_decrypt(e,i);t.properties.center=[s,r]}return t}gcj_encrypt(t,e){return Sh["GPS"].gcj_encrypt(t,e)}gcj_decrypt(t,e){return Sh["GPS"].gcj_decrypt(t,e)}formatArea(){return this._lPolygon&&this._lPolygon.getGeometry()?Object(Sh["formatArea"])(this._lPolygon.getGeometry()):0}formatLength(){return this._lPolygon&&this._lPolygon.getGeometry()?Object(Sh["formatLength"])(this._lPolygon.getGeometry()):0}createPolylinePointList(t,e=!1,i=!0,n=null,s=0){let r=new Array;const o=Object(Sh["createPolylinePoints"])(t,e);r=Object(Sh["addPolylinePoint"])(o,this.map);const a=Object(Sh["createGPSPoints"])(t,e,this.am);if(null!=a){let t=this.am.getLngLats();s&&(t=this.am.getLngLatGCJ02()),Object(Sh["fitNew"])(this.map,[[t[0],t[1]],[t[2],t[3]]])}return r}async setAreaCenterPoint(){let t="3301";if(window.localStorage.getItem("user")){const e=JSON.parse(window.localStorage.getItem("user"));t=e["areaCode"]}const{data:e}=await getAreaCenter(t),{areaCode:i,areaName:n,centerLongitude:s,centerLatitude:r}=e;window.localStorage.setItem("createPointData",JSON.stringify(e))}async getAreaCenterPoint(t=!1){return obj}removeAreaCenterPoint(){window.localStorage.removeItem("createPointData")}polygonStyle(){return Sh["polygonStyle"]}removeMapsLayers(){const t=this.map.getLayers().getArray();for(let e=t.length;0<=e;e--)this.map.removeLayer(t[e])}removeOverlays(){if(!this.map)return;const t=this.map.getOverlays().getArray();for(let e=t.length;0<=e;e--)this.map.removeOverlay(t[e])}resetAM(){this.am=null,this.am=new Sh["AM"]}createPolygonBoundary(t,e){const i=Object(Sh["createPolygonBoundary"])(t,e);this.polygonGeojsonArr.push(i),this.map.addLayer(i)}createPolylinePointListNew(t,e,i={isGCJ02Point:!1,isFit:!1}){let n=new Array;const s=Object(Sh["createPolylinePoints"])(t,!1);n=Object(Sh["addPolylinePointNew"])(s,this.map,e);const r=Object(Sh["createGPSPoints"])(t,!1,this.am);if(null!=r&&i.isFit){let t=this.am.getLngLats();e.type&&(t=this.am.getLngLatGCJ02()),Object(Sh["fitNew"])(this.map,[[t[0],t[1]],[t[2],t[3]]])}return n}createLPolygonNew(t,e){this.lPolygonNewArr.push(new Sh["LPolygonNew"](t,e))}setPolygonColor(t,e=["rgba(255,201,14, 0.4)","rgba(255,201,14, 1)"]){this.lPolygonNewArr.forEach(i=>{i.Id!=t||i.setPolygonColor(e)})}setPolygonColorAll(t=["rgba(184, 233, 134, 0.56)","rgba(23, 168, 162, 0.56)"]){this.lPolygonNewArr.forEach(e=>{e.setPolygonColor(t)})}removePolygonNew(){this.lPolygonNewArr.forEach(t=>{t.removePolygon(),t=null}),this.lPolygonNewArr=[]}caculateLL(t,e,i,n){return Object(Sh["caculateLL"])(t,e,i,n)}get LPolygonNewArr(){return this.lPolygonNewArr}get isTruePolygon(){return!!this._lPolygon&&this._lPolygon.isTruePolygon}onCreateRectangle(t){this._lRectangle&&this.clearRectangle();return this._lRectangle=new Sh["LRectangle"]("Circle",this.map,t=>{}),this._lRectangle}getRectangleData(){if(!this._lRectangle)return[];const t=this._lRectangle.getCoordinates(),e=t[0];if(e.length){const t=[];return t.push([e[0][0],e[1][1]]),t.push([e[1][0],e[2][1]]),t}return[]}getRectangleDataNew(){if(!this._lRectangle)return[];const t=this._lRectangle.getCoordinates(),e=t[0];if(e.length){const t=[];return t.push([e[0][0],e[1][1]]),t.push([e[1][0],e[2][1]]),t}return[]}clearRectangle(){if(this.map&&this._lRectangle){this._lRectangle.getCoordinates();this._lRectangle.remove(),this._lRectangle=null}}async initOfflineMap(t,e){const{el:i,urls:n,callback:s}=e;this.lmap=new Sh["OfflineMap"],setTimeout(async t=>{const{map:e,layers:r}=await this.lmap.onLoad(i,n);this.map=e,this.layers=r,s({map:e,lMap:this.lmap})},50)}set DrawZIndex(t){this.drawZIndex=t}get DrawZIndex(){return this.drawZIndex}}class Rh{constructor(){ks(this,"isShowSwitchMap",{type:Boolean,default:!0}),ks(this,"resolution",{type:Boolean,default:!1}),ks(this,"zoomedIn",{type:Number,default:17}),this.mapType={type:Number,default:0},this.layerType={type:Number,default:2},this.isSwitchMapTool={type:Boolean,default:!0},this.isRyMapTool={type:Boolean,default:!1},this.isRight={type:Boolean,default:!1},this.bindMapClick={type:Boolean,default:!1},this.bindContextmenu={type:Boolean,default:!1},this.binddblClick={type:Boolean,default:!1},this.bindMapMoveend={type:Boolean,default:!1},this.isDisabledSwitchMapTabEvent={type:Boolean,default:!1},this.initModifyPolygon={type:[String,Object],default:()=>null},this.m={type:Number,default:()=>3e3},this.switchMapDefaultTypeOrLayer={type:Array,default:()=>null},this.mapTypeAndLayer={type:Array,default:()=>[{id:0,icon:"el-icon--tianditu",activeIcon:"el-icon--tianditu-copy",name:"天地图",layer:[{id:0,name:"地图"},{id:1,name:"卫星"},{id:2,name:"卫星组合"}]},{id:1,icon:"el-icon--gaode",activeIcon:"el-icon--gaode-copy",name:"高德地图",layer:[{id:0,name:"地图"},{id:1,name:"卫星"},{id:2,name:"卫星组合"}]},{id:2,icon:"el-icon--Bing",activeIcon:"el-icon--Bing-copy",name:"Bing地图",layer:[{id:1,name:"卫星"},{id:2,name:"卫星组合"}]}]}}}class Ih{constructor(t){this.zoom={type:Number,default:10},this.maxZoom={type:Number,default:18},this.minZoom={type:Number,default:1},this.center={type:Array,default:()=>[116.40769,39.89945]},this.projection={type:String,default:"EPSG:4326"},this.bbox={type:Array,default:()=>[]}}}class Lh{constructor(){ks(this,"isHideAreaAndKM",{type:Boolean,default:!1}),ks(this,"switchMapPosTop",{type:Number,default:50}),ks(this,"switchMapPosLeftOrRight",{type:Number,default:20}),ks(this,"isSwitchMapRight",{type:Boolean,default:!0}),ks(this,"switchMapHeight",{type:Number,default:40}),ks(this,"isShowRangingTool",{type:Boolean,default:!0}),ks(this,"isShowDrawTool",{type:Boolean,default:!1}),ks(this,"isRight",{type:Boolean,default:!0}),ks(this,"isCrossHair",{type:Boolean,default:!1}),ks(this,"initModifyPolygon",{type:[String,Object],default:()=>null}),ks(this,"hideAdd",{type:Boolean,default:!1}),ks(this,"hidePoint",{type:Boolean,default:!1}),ks(this,"hideCancel",{type:Boolean,default:!1}),ks(this,"hideDelete",{type:Boolean,default:!1}),ks(this,"hideSave",{type:Boolean,default:!1}),ks(this,"hideLine",{type:Boolean,default:!1}),ks(this,"hideArea",{type:Boolean,default:!1}),ks(this,"isSwitchMap",{type:Boolean,default:!0}),ks(this,"gpsType",{type:Number,default:0}),ks(this,"drawZIndex",{type:Number,default:1})}}var Oh=function(){var t=this,e=t._self._c;return e("div",{staticClass:"draw-tool-box"},[t.isRight?[t.isShowRangingTool?e("aside",{staticClass:"map-control",staticStyle:{"margin-right":"60px"}},[t.hideLine?t._e():e("el-button",{staticClass:"ele-text-primary el-icon--changdu",on:{click:function(e){return e.stopPropagation(),t.onCreateLine()}}}),t.hideArea?t._e():e("el-button",{staticClass:"ele-text-primary el-icon--mianji",on:{click:function(e){return e.stopPropagation(),t.onCreateArea()}}})],1):t._e(),t.isShowDrawTool?e("aside",{staticClass:"map-button-box"},[t.hideAdd?t._e():e("el-button",{staticClass:"ele-text-primary el-icon--add",on:{click:function(e){return e.stopPropagation(),t.onCreatePolygon()}}}),t.hidePoint?t._e():e("el-button",{staticClass:"ele-text-primary el-icon--dadian",on:{click:function(e){return e.stopPropagation(),t.onPointEvent()}}}),t.hideCancel?t._e():e("el-button",{staticClass:"ele-text-primary el-icon--back",on:{click:function(e){return e.stopPropagation(),t.lMap.onCancel()}}}),t.hideDelete?t._e():e("el-button",{staticClass:"ele-text-primary el-icon--ashbin",on:{click:function(e){return e.stopPropagation(),t.onDelete()}}}),t.hideSave?t._e():e("el-button",{staticClass:"ele-text-primary el-icon--duihao",on:{click:function(e){return e.stopPropagation(),t.onSave()}}}),t._t("default")],2):t._e()]:[t.isShowDrawTool?e("aside",{staticClass:"map-button-box"},[t.hideAdd?t._e():e("el-button",{staticClass:"ele-text-primary el-icon--add",on:{click:function(e){return e.stopPropagation(),t.onCreatePolygon()}}}),t.hidePoint?t._e():e("el-button",{staticClass:"ele-text-primary el-icon--dadian",on:{click:function(e){return e.stopPropagation(),t.onPointEvent()}}}),t.hideCancel?t._e():e("el-button",{staticClass:"ele-text-primary el-icon--back",on:{click:function(e){return e.stopPropagation(),t.lMap.onCancel()}}}),t.hideDelete?t._e():e("el-button",{staticClass:"ele-text-primary el-icon--ashbin",on:{click:function(e){return e.stopPropagation(),t.onDelete()}}}),t.hideSave?t._e():e("el-button",{staticClass:"ele-text-primary el-icon--duihao",on:{click:function(e){return e.stopPropagation(),t.onSave()}}}),t._t("default")],2):t._e(),t.isShowRangingTool?e("aside",{staticClass:"map-control",staticStyle:{"margin-left":"60px"}},[t.hideLine?t._e():e("el-button",{staticClass:"ele-text-primary el-icon--changdu",on:{click:function(e){return e.stopPropagation(),t.onCreateLine()}}}),t.hideArea?t._e():e("el-button",{staticClass:"ele-text-primary el-icon--mianji",on:{click:function(e){return e.stopPropagation(),t.onCreateArea()}}})],1):t._e()],t.lMap?e("ry-cross-hair",{attrs:{isHide:t.isCrossHair,map:t.lMap.map},on:{click:function(e){return t.onClick(e)}}}):t._e()],2)},kh=[],Dh=function(){var t=this,e=t._self._c;return e("div")},Nh=[],Gh=(i("3e8f"),{name:"RyCrossHair",props:{map:{type:Object,default:()=>null},isHide:{type:Boolean,default:!1}},created(){this.isHide&&!this.crossHair&&this.createCrossHair()},watch:{isHide(t){!t||this.crossHair?this.removeControl():this.createCrossHair()}},data(){return{crossHair:null}},methods:{getCenter(){if(!this.map)return;const t=this.map.getView();let[e,i]=t.getCenter();return[e,i]},createCrossHair(){this.crossHair=new Sh["CrossHair"](()=>{this.$emit("click",this.getCenter())}),this.map.addControl(this.crossHair)},removeControl(){this.map&&this.crossHair&&(this.map.removeControl(this.crossHair),this.crossHair=null)}}}),jh=Gh;function Fh(t,e,i,n,s,r,o,a){var l,h="function"===typeof t?t.options:t;if(e&&(h.render=e,h.staticRenderFns=i,h._compiled=!0),n&&(h.functional=!0),r&&(h._scopeId="data-v-"+r),o?(l=function(t){t=t||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext,t||"undefined"===typeof __VUE_SSR_CONTEXT__||(t=__VUE_SSR_CONTEXT__),s&&s.call(this,t),t&&t._registeredComponents&&t._registeredComponents.add(o)},h._ssrRegister=l):s&&(l=a?function(){s.call(this,(h.functional?this.parent:this).$root.$options.shadowRoot)}:s),l)if(h.functional){h._injectStyles=l;var c=h.render;h.render=function(t,e){return l.call(e),c(t,e)}}else{var u=h.beforeCreate;h.beforeCreate=u?[].concat(u,l):[l]}return{exports:t,options:h}}var Bh=Fh(jh,Dh,Nh,!1,null,null,null),zh=Bh.exports,Vh={name:"RyMapTool",components:{RyCrossHair:zh},props:{lMap:{type:Object,default:()=>null},...new Lh},watch:{initModifyPolygon(t){this.initModifyPolygon=t,this._initPolygon()},isShowRangingTool(t){this.isShowRangingTool=t},isShowDrawTool(t){this.isShowDrawTool=t,this.isCrossHair=t},isRight(t){this.isShowDrawTool=t},isCrossHair(t){this.isCrossHair=t},gpsType(t){this.lastType!=t&&(this.gpsType=t,this.lastType=t,this.drawPolygon&&(this.drawPolygon.type=t),this.selectGPSAll(this.gpsType))}},data(){return{drawPolygon:null,isEdit:!0,lastType:-1}},created(){this._initPolygon()},methods:{_initPolygon(){if(!this.lMap||!this.initModifyPolygon||!this.isShowDrawTool)return;const{coordinates:t,bbox:e}=this._serializeGeoJson();if(this.onDelete(),this.drawPolygon=this.lMap.onCreatePolygon(()=>{},this.isHideAreaAndKM),this.lastType=this.gpsType,this.drawPolygon.type=this.gpsType,this.drawPolygon.initCoordinates(t),this.isEdit=!0,this.$emit("loadDrawPolygonEvent",this),e){const t=[e[0],e[3],e[2],e[1]],i=[e[2],e[1],e[0],e[3]];this.lMap.fit([t,i])}},_serializeGeoJson(){let t=null;if(this.initModifyPolygon instanceof Object)t=this.initModifyPolygon;else{if("string"!==typeof this.initModifyPolygon)return t;t=JSON.parse(this.initModifyPolygon)}const{geometry:e,bbox:i}=t;return{coordinates:e.coordinates,bbox:i}},setFit(t){t&&t.length&&this.lMap&&Object(Sh["fitNew"])(this.lMap.map,[t])},onCreatePolygon(){this.lMap&&(this.drawPolygon=this.lMap.onCreatePolygon(()=>{},this.isHideAreaAndKM),this.lastType=this.gpsType,this.drawPolygon.type=this.gpsType,this.$emit("loadDrawPolygonEvent",this))},onDelete(){this.lMap&&this.drawPolygon&&(this.lMap.onDelete(),this.drawPolygon=null)},onPointEvent(){if(this.drawPolygon){const t=this.lMap.getCenter();if(this.x==t[0]&&this.y==t[1])return;this.x=t[0],this.y=t[1];let e=t;if(this.gpsType){let{lon:i,lat:n}=Sh["GPS"].gcj_decrypt(t[0],t[1]);e=[i,n]}return this.drawPolygon.setCoordinates(e,this.gpsType),void this.$emit("crossHairClick",{pointArr:t,delete:this.onDelete})}this.$message.error("请绘制地块后在进行操作!")},onSave(){const t=this.lMap.getPolygonGeoJson();t?this.lMap.isTruePolygon?t&&this.$emit("success",{geoJson:t,delete:this.onDelete}):this.error(t,1):this.error(t)},error(t,e=0){this.$emit("error",{geoJson:t,delete:this.onDelete,type:e})},onClick(t){if(this.drawPolygon){const t=this.lMap.getCenter();if(this.x==t[0]&&this.y==t[1])return;this.x=t[0],this.y=t[1];let e=t;if(this.gpsType){let{lon:i,lat:n}=Sh["GPS"].gcj_decrypt(t[0],t[1]);e=[i,n]}return this.drawPolygon.setCoordinates(e,this.gpsType),void this.$emit("crossHairClick",{pointArr:t,delete:this.onDelete})}this.$message.error("请绘制地块后在进行操作!")},getGeoJson(){if(this.lMap)return this.lMap.getPolygonGeoJson()},onCancel(){this.lMap&&this.lMap.onCancel()},onCreateLine(){let t=this.lMap.onCreateLine(({id:e,type:i})=>{this.$emit("drawLineEvent",{draw:t,id:e,type:i})});t.Id=Object(Sh["generateGuid"])()},onCreateArea(){let t=this.lMap.onCreateArea(({id:e,type:i})=>{this.$emit("drawPolygonEvent",{draw:t,id:e,type:i})});t.Id=Object(Sh["generateGuid"])()},selectGPSAll(t){this.lMap.removeDrawArr(),this.drawPolygon&&this.drawPolygon.selectGPS(t,!0)}}},Zh=Vh,Hh=(i("55be"),Fh(Zh,Oh,kh,!1,null,"32117d0c",null)),Xh=Hh.exports,Kh=function(){var t=this,e=t._self._c;return t.mapTypeAndLayer&&t.mapTypeAndLayer.length>0?e("div",{staticClass:"switch-map"},[e("div",{staticClass:"top",style:{height:t.height+"px"}},[t.isDisabled?e("p",{staticStyle:{width:"10px"}}):[e("p",{class:t.bottomRight?t.isExpand?"el-icon-arrow-left":"el-icon-arrow-right":t.isExpand?"el-icon-arrow-right":"el-icon-arrow-left",on:{click:t.changeExpand}})],e("ul",t._l(t.mapTypeCopy,(function(i,n){return e("li",{key:n,class:{color:!!t.isExpand||t.mapTypeActive===i.id},on:{click:function(e){return t.mapTypeClick(i)}}},[e("i",{class:t.isExpand||t.mapTypeActive===i.id?i.activeIcon:i.icon}),t._v(" "+t._s(i.name)+" ")])})),0)],2),e("ul",{class:{bottom:!0,marginLeft:t.bottomRight}},t._l(t.mapStyleCopy,(function(i,n){return e("li",{key:n,class:{color:!!t.isTop||t.mapStyleActive===i.id},style:{height:t.height+"px",lineHeight:t.height+"px"}},[e("span",{on:{click:function(e){return t.mapStyleClick(i)}}},[t._v(" "+t._s(i.name)+" ")]),e("i",{directives:[{name:"show",rawName:"v-show",value:0===n,expression:"index===0"}],class:t.isTop?"el-icon-arrow-down":"el-icon-arrow-up",on:{click:t.changeDirectionArrow}})])})),0)]):t._e()},Wh=[];class Yh{constructor(){ks(this,"switchMapDefaultTypeOrLayer",{type:Array,default:()=>null}),ks(this,"height",{type:Number,default:40}),ks(this,"isSwitchMapRight",{type:Boolean,default:!0}),ks(this,"bottomRight",{type:Boolean,default:!0}),ks(this,"isDisabled",{type:Boolean,default:!1}),ks(this,"mapTypeAndLayer",{type:Array,default:()=>null}),ks(this,"mapType",{type:Array,default:()=>[{icon:"el-icon--tianditu",activeIcon:"el-icon--tianditu-copy",name:"天地图"},{icon:"el-icon--gaode",activeIcon:"el-icon--gaode-copy",name:"高德地图"}]}),ks(this,"mapStyle",{type:Array,default:()=>["地图","卫星","卫星组合"]})}}var Uh={name:"SwitchMap",props:{...new Yh},data(){return{isExpand:!0,mapTypeActive:1,mapStyleActive:2,isTop:!0,mapTypeCopy:[],mapStyleCopy:[]}},watch:{switchMapDefaultTypeOrLayer(t){if(!t)return;const e=this.formatToJudge(t);if(!e)return;const i=this.mapStyleActive,n=e||0===e?t[0]:1,s=e||1===e?i:2;setTimeout(()=>{this.$emit("changeSwitchMap",{mapType:n,layerType:s})},100)},mapTypeAndLayer:{handler(t){Array.isArray(t)&&t[1]&&t.forEach((t,e)=>{1!==e||this.switchMapDefaultTypeOrLayer||(this.mapStyleCopy=[t.layer[2]],this.mapTypeCopy=[t])})},immediate:!0}},created(){},mounted(){this._switchMapDefaultTypeOrLayer(this.switchMapDefaultTypeOrLayer),this.switchMapDefaultTypeOrLayer||setTimeout(()=>{this.$emit("changeSwitchMap",{mapType:1,layerType:2})},100)},methods:{formatToJudge(t){var e;const i=[1,2],n=Array.isArray(t),s=i.includes(t.length),r=t[0]>=0&&t[0]<=this.mapTypeAndLayer.length-1,o=t[1]>=0&&t[1]<=(null===(e=this.mapTypeAndLayer[t[0]])||void 0===e?void 0:e.layer.length)-1;if(!n||!s)return!1;if(!r||!o){var a,l;const t=this.mapTypeActive,e=this.mapStyleActive;return this.mapTypeCopy=[this.mapTypeAndLayer[t]],this.mapStyleCopy=[null===(a=this.mapTypeAndLayer[t])||void 0===a?void 0:a.layer[e]],this.mapStyleActive=null===(l=this.mapStyleCopy[0])||void 0===l?void 0:l.id,!1}return r&&!o?(this.mapTypeActive=t[0],this.mapTypeCopy=[this.mapTypeAndLayer[t[0]]],0):o&&!r?(this.mapStyleCopy=[null===(h=this.mapTypeAndLayer[t[0]])||void 0===h?void 0:h.layer[t[1]]],this.mapStyleActive=this.mapStyleCopy[0].id,1):!(!r||!o)&&(this.mapTypeActive=t[0],this.mapTypeCopy=[this.mapTypeAndLayer[t[0]]],this.mapStyleCopy=[null===(c=this.mapTypeAndLayer[t[0]])||void 0===c?void 0:c.layer[t[1]]],this.mapStyleActive=null===(u=this.mapStyleCopy[0])||void 0===u?void 0:u.id,!0);var h,c,u},changeExpand(){if(!this.isDisabled){if(this.isExpand=!this.isExpand,this.isExpand)return this.mapTypeCopy=this.mapTypeAndLayer.filter((t,e)=>this.mapTypeActive===e),void(this.isTop||(this.isTop=!0,this.mapStyleCopy=this.mapTypeAndLayer[this.mapTypeActive].layer.filter(t=>this.mapStyleActive===t.id)));this.mapTypeCopy=[...this.mapTypeAndLayer]}},changeDirectionArrow(){this.isTop=!this.isTop;const t=this.mapTypeActive,e=this.mapTypeAndLayer[t].layer;this.isTop?this.mapStyleCopy=e.filter(e=>t===e.id):this.mapStyleCopy=[...e]},mapTypeClick({id:t}){if(this.mapTypeActive===t||this.isExpand)return;const e=this.mapTypeAndLayer[t].layer;this.mapTypeActive=t,this.mapStyleActive=e[e.length-1].id,this.isTop?this.mapStyleCopy=e.filter(t=>this.mapStyleActive===t.id):this.mapStyleCopy=e,this.$emit("changeSwitchMap",{mapType:this.mapTypeActive,layerType:this.mapStyleActive,cisDisabled:!1})},mapStyleClick({id:t}){this.mapStyleActive===t||this.isTop||(this.mapStyleActive=t,this.$emit("changeSwitchMap",{mapType:this.mapTypeActive,layerType:this.mapStyleActive}))},_switchMapDefaultTypeOrLayer(t){if(!t)return;const e=this.formatToJudge(t);if(!e)return;const i=this.mapStyleActive,n=e||0===e?t[0]:1,s=e||1===e?i:2;setTimeout(()=>{this.$emit("changeSwitchMap",{mapType:n,layerType:s})},100)}}},Jh=Uh,$h=(i("c369"),Fh(Jh,Kh,Wh,!1,null,"10ed49d6",null)),qh=$h.exports,Qh={name:"RyMap",components:{RyMapTool:Xh,SwitchMap:qh},props:{...new Rh,...new Ih,...new Lh},created(){},watch:{center(t){this.setCenter(t)},bbox(t){this.setFit(t)},maxZoom(t){this.lMap.setMaxZoom(t)},zoom(t){this.lMap.setZoom(t)},minZoom(t){this.lMap.setMinZoom(t)},bindMapClick(t){this._bingMapEvent()},bindContextmenu(t){this._bindContextmenu()},binddblClick(t){this._binddblClick()},bindMapMoveend(t){this._bingMapMoveend()},resolution(t){this._bingResolution()},m(t){this.m=t}},data(){return{lMap:new Th,drawPolygon:null,mapClick:null,map:null,moveend:null,lastX:0,lastY:0,lastMapType:0,isFirstLoad:!1,contextmenu:null,dblClick:null,resolutionFun:null}},methods:{changeSwitchMap({mapType:t,layerType:e}){this.lMap.selectMapLayer(t,e),this._setMaxZoom(t,e);let i=t;if(t>1&&(i=0),this.lastMapType==i)return;this.lastMapType=i;const n=this.lMap.getCenter();if(n&&n.length)if(0==i){const{lon:t,lat:e}=Sh["GPS"].gcj_decrypt(n[0],n[1]);this.lMap.setCenter([t,e])}else{const{lon:t,lat:e}=Sh["GPS"].gcj_encrypt(n[0],n[1]);this.lMap.setCenter([t,e])}this.$emit("changeSwitchMap",{mapType:i,layerType:e,type:t})},_setMaxZoom(t,e){2==t||0==e?this.setMaxZoom(28):this.setMaxZoom(18)},loadMap(t){this.lMap.DrawZIndex=this.drawZIndex,this.lMap.init({el:t,type:this.mapType,layerType:this.layerType,viewOptions:this.getViewOptions(),callback:(t,e)=>{this.map=t,this.bbox.length>0&&this.setFit(this.bbox);try{const[t,e]=this.lMap.getCenter();this.lastX=t,this.lastY=e}catch(i){}this._bingMapEvent(),this._bingMapMoveend(),this._bingResolution(),this._bindContextmenu(),this._binddblClick(),this.$emit("load",{map:t,mapServices:this.lMap,layers:e,ryMapTool:this.$refs.mapTool}),this.isShowSwitchMap||(this.lastMapType=this.mapType>2?0:this.mapType)}})},_bingMapEvent(){this.bindMapClick?this._mapClickOnce():this._mapClickOnce(!0)},_bingMapMoveend(){this.bindMapMoveend?this._mapMoveend():this._mapMoveend(!0)},_bingResolution(){this.resolution?this.bingResolutionEvent():this.bingResolutionEvent(!0)},_bindContextmenu(){this.bindContextmenu?this._contextmenu():this._contextmenu(!0)},_binddblClick(){this.binddblClick?this._dblClick():this._dblClick(!0)},getViewOptions(){return{projection:this.projection,center:this.center,zoom:this.zoom,minZoom:this.minZoom,maxZoom:this.maxZoom}},setMaxZoom(t){this.lMap.setMaxZoom(t)},setMinZoom(t){this.lMap.setMinZoom(t)},setZoom(t){this.lMap.setZoom(t)},crossHairClick(t){this.$emit("crossHairClick",t)},setCenter(t){this.lMap.setCenter(t,15)},setFit(t){t.length&&this.map&&Object(Sh["fitNew"])(this.map,[t])},drawSuccess(t){this.$emit("drawSuccess",t)},drawError(t){this.$emit("drawError",t)},drawPolygonEvent(t){this.$emit("drawPolygonEvent",t)},drawLineEvent(t){this.$emit("drawLineEvent",t)},_mapClickOnce(t=!1){this.mapClick||(this.mapClick=t=>{if(t.dragging)return;const e=this.map.getEventPixel(t.originalEvent),i=this.map.hasFeatureAtPixel(e);if(i){const e=this.map.forEachFeatureAtPixel(t.pixel,t=>t);this.$emit("mapClick2",e);const i=e.getId();if(void 0===i)return;this.$emit("mapClick",i)}}),t?(this.map.un("singleclick",this.mapClick),this.mapClick=null):this.map.on("singleclick",this.mapClick)},_getLayersId(t,e="dblclick"){if(t.dragging)return;const i=this.map.getEventPixel(t.originalEvent),n=this.map.hasFeatureAtPixel(i);if(n){const i=this.map.forEachFeatureAtPixel(t.pixel,t=>t),n=i.getId();if(void 0===n)return;this.$emit(e,n)}t.preventDefault()},_contextmenu(t){this.contextmenu||(this.contextmenu=t=>{this._getLayersId(t,"contextmenuClick")}),t?(this.map.un("contextmenu",this.contextmenu),this.contextmenu=null):this.map.on("contextmenu",this.contextmenu)},_dblClick(t){this.dblClick||(this.dblClick=t=>{this._getLayersId(t,"doubleClickEvent")}),t?(this.map.un("dblclick",this.dblClick),this.dblClick=null):this.map.on("dblclick",this.dblClick)},_mapMoveend(t=!1){this.moveend=t=>{const[e,i]=this.lMap.getCenter();let n=0;if(this.lastX!==e&&this.lastY!==i)return n=Object(Sh["caculateLL"])(this.lastY,this.lastX,i,e),this.$emit("mapMoveend",{m:n,oversteSetValue:n>=this.m,x:e,y:i,e:t}),void(n>=this.m&&(this.lastX=e,this.lastY=i));this.$emit("mapMoveend",{m:n,oversteSetValue:!1,x:e,y:i,e:t})},t?this.map.un("moveend",this.moveend):this.map.on("moveend",this.moveend)},loadDrawPolygonEvent(t){this.$emit("loadDrawPolygonEvent",t)},bingResolutionEvent(t=!1){const e=this.map.getView(),i=this.zoomedIn;let n=e.getZoom()>i;this.resolutionFun=()=>{const t=e.getZoom();t>i&&!n?(n=!0,this.$emit("resolutionEvent",{zoom:t,status:n})):t<=i&&n&&(n=!1,this.$emit("resolutionEvent",{zoom:t,status:n}))},t?e.un("change:resolution",this.resolutionFun):e.on("change:resolution",this.resolutionFun)}}},tc=Qh,ec=(i("3f75"),Fh(tc,r,o,!1,null,"a42b2f5e",null)),ic=ec.exports;ic.install=t=>{t.install(ic.name,ic)};var nc=ic;zh.install=t=>{t.install(zh.name,zh)};var sc=zh;Xh.install=t=>{t.install(Xh.name,Xh)};var rc=Xh,oc=function(){var t=this,e=t._self._c;return e("div")},ac=[];class lc{constructor(){ks(this,"map",{type:Object,default:()=>null}),ks(this,"gpsType",{type:Number,default:0})}}class hc extends lc{constructor(...t){super(...t),ks(this,"model",{type:Object,default:()=>null}),ks(this,"isShow",{type:Boolean,default:!0}),ks(this,"clear",{type:Boolean,default:!1}),ks(this,"isCheckPointHide",{type:Boolean,default:!1}),ks(this,"polygonColor",{type:Array,default:()=>[]}),ks(this,"text",{type:String,default:null}),ks(this,"isFit",{type:Boolean,default:!0})}}var cc={name:"RyPolygon",props:{...new hc},data(){return{polygon:null,checkPoint:null,bbox:[],bboxGCJ02:[],lastType:-1}},watch:{isShow(t){this.polygon&&(t?this.show():this.hide())},clear(t){t&&this.remove()},model(t){this.remove(),this.model=t,this.init()},isCheckPointHide(t){t?this.hideCheckPoint():this.showCheckPoint()},polygonColor(t){t.length&&this.setPolygonColor(t)},isFit(t){this.isFit=t,t&&this.setFit()},gpsType(t){this.lastType!=t&&(this.gpsType=t,this.lastType=t,this.selectGPSAll(this.gpsType))}},created(){this.init()},methods:{initPolygonText(t,e){const{text:i,center:n,isShow:s}=e;t.setShowText(s),t.setText(i),t.setCenter(n)},init(){if(this.lastType=this.gpsType,!this.model||!this.model.geo&&!this.model.coordinates)return;let t=[];if(this.model.geo){const{coordinates:e,center:i,bbox:n}=this._serializeGeoJson();this.model.coordinates=e,this.bbox=n,this.bboxGCJ02=this.convertBBoxGCJ02(n),t=i}else this.bbox=Object(Sh["getLngAndLatMaxMin"])(this.model.coordinates),this.bboxGCJ02=this.convertBBoxGCJ02(this.bbox);this.polygon=new Sh["LPolygonNew"]({...this.model,type:this.gpsType},this.map),this.isFit&&this.setFit(1==this.gpsType?this.bboxGCJ02:this.bbox),this.isCheckPointHide?this.initPolygonText(this.polygon,{text:this.model.text,center:t,isShow:!1}):this.initPolygonText(this.polygon,{text:this.model.text,center:t,isShow:!0}),this.polygon.isShowPolygon=!0,this.isShow?this.show():this.hide(),this.clear&&this.remove(),this.$emit("onLoad",{polygon:this.polygon,checkPoint:this.checkPoint})},setFit(t){if(!t.length||!this.map)return;const e=[t[0],t[3],t[2],t[1]],i=[t[2],t[1],t[0],t[3]];Object(Sh["fitNew"])(this.map,[e,i])},_serializeGeoJson(){let t=null;if(this.model.geo instanceof Object)t=this.model.geo;else{if("string"!==typeof this.model.geo)return t;t=JSON.parse(this.model.geo)}const{bbox:e,geometry:i,properties:n}=t;let s=[];return n&&n.center&&(s=n.center),{bbox:e,coordinates:i.coordinates,center:s.length?s:Object(Sh["getCenterPoint"])(i.coordinates)}},convertBBoxGCJ02(t){const e=[],{lat:i,lon:n}=Sh["GPS"].gcj_encrypt(t[0],t[1]),{lon:s,lat:r}=Sh["GPS"].gcj_encrypt(t[2],t[3]);return e.push(n),e.push(i),e.push(s),e.push(r),e},getBBOX(){if(!this.model.geo)return Object(Sh["getLngAndLatMaxMin"])(this.model.coordinates)},createCheckPoint(t,e){const i=new Sh["CheckPoint"](t,12,"#fff");return i.setOffset([0,-5]),i.setPosition(e,this.gpsType),this.map.addOverlay(i.getMarker()),i},show(){this.polygon.show()},hide(){this.polygon.hide()},remove(){this.polygon&&(this.polygon.removePolygon(),this.polygon=null),this.bbox=[],this.bboxGCJ02=[]},setPolygonColor(t){if(this.polygon){this.polygon.setPolygonColor(t);const e=this.map.getView().getZoom();this.map.getView().setZoom(e+1e-5),this.map.getView().setZoom(e-1e-4)}},getId(){return this.polygon._id},showCheckPoint(){this.polygon&&this.polygon.setTextVisible(!0)},hideCheckPoint(){this.polygon&&this.polygon.setTextVisible(!1)},setText(t){this.polygon.setText(t)},selectGPSAll(t){this.polygon&&this.polygon.selectGPS(t)}}},uc=cc,dc=Fh(uc,oc,ac,!1,null,null,null),pc=dc.exports;pc.install=t=>{t.install(pc.name,pc)};var gc=pc,fc=function(){var t=this,e=t._self._c;return e("div")},mc=[];class yc extends lc{constructor(...t){super(...t),ks(this,"modelArr",{type:Array,default:()=>[]}),ks(this,"insert",{type:Object,default:()=>null}),ks(this,"inserts",{type:Array,default:()=>[]}),ks(this,"isShowAll",{type:Boolean,default:!0}),ks(this,"isShowPolygon",{type:Object,default:()=>null}),ks(this,"isShowPolygons",{type:Array,default:()=>[]}),ks(this,"clear",{type:Boolean,default:!1}),ks(this,"isCheckPointHideAll",{type:Boolean,default:!1}),ks(this,"isCheckPointHide",{type:Object,default:()=>null}),ks(this,"isCheckPointHides",{type:Array,default:()=>[]}),ks(this,"polygonColor",{type:Object,default:()=>null}),ks(this,"polygonColors",{type:Array,default:()=>[]}),ks(this,"text",{type:Object,default:()=>null}),ks(this,"isFit",{type:Boolean,default:!0}),ks(this,"remove",{type:[String,Number,Object],default:()=>null}),ks(this,"removes",{type:Array,default:()=>[]}),ks(this,"ranges",{type:Array,default:()=>[]}),ks(this,"range",{type:[String,Number,Object],default:()=>null}),ks(this,"restFit",{type:Boolean,default:!1})}}var _c={name:"RyPolygons",props:{...new yc},data(){return{bbox:[],bboxMap:new Map,bboxGCJ02:[],bboxMapGCJ02:new Map,polygonMap:new Map,checkPointMap:new Map,isCreate:!0,lastType:-1}},watch:{modelArr(t){this._remove(),t.length&&(this.modelArr=t,this.init())},isShowAll(t){t?this.showAll():this.hideAll()},isShowPolygon(t){this.isShowPolygon=t,t&&this._isShowPolygon(t)},isShowPolygons(t){this.isShowPolygons=t,(t||t.length)&&this._isShowPolygons(t)},clear(t){t&&this._remove()},isCheckPointHideAll(t){t?this.hideCheckPointAll():this.showCheckPointAll()},isCheckPointHide(t){this.isCheckPointHide=t,t&&this._isCheckPointHide(t)},isCheckPointHides(t){this.isCheckPointHides=t,(t||t.length)&&this._isCheckPointHides(t)},polygonColor(t){t&&this.setPolygonColor(t.id,t.colorArr)},polygonColors(t){t&&this.setPolygonColors(t)},isFit(t){this.isFit=t,t&&this.setFit()},remove(t){this.remove=t,this.removePolygonAndCheckPoint(t)},removes(t){this.removes=t,this.removePolygonsAndCheckPoints(t)},ranges(t){this.ranges=t,this._ranges(t)},range(t){this.range=t,this._range(t)},insert(t){this.insert=t,this._insert(t)},inserts(t){this.inserts=t,this._inserts(t)},restFit(t){this.restFit=t},text(t){t&&t.id&&t.text&&this.setText(t.id,t.text)},gpsType(t){this.lastType!=t&&(this.gpsType=t,this.lastType=t,this.selectGPSAll(this.gpsType))}},created(){this.init()},methods:{init(){(this.modelArr||this.modelArr.length)&&(this.modelArr.forEach(t=>{this._insert(t)}),this.polygonColor&&this.setPolygonColor(this.polygonColor),this.setPolygonColors(this.polygonColors),this.removePolygonAndCheckPoint(this.remove),this.removePolygonsAndCheckPoints(this.removes),this._ranges(this.ranges),this._range(this.range),this._insert(this.insert),this._inserts(this.inserts),this.isFit&&this.setFit(),this.isShowAll||this.hideAll(),this.isCheckPointHideAll&&this.hideCheckPointAll(),this.isShowPolygon&&this._isShowPolygon(this.isShowPolygon),this._isShowPolygons(this.isShowPolygons),this.isCheckPointHide&&this._isCheckPointHide(this.isCheckPointHide),this._isCheckPointHides(this.isCheckPointHides),this._onLoad())},initPolygon(t,e){if(!this.polygonMap.has(t.id)){const i=new Sh["LPolygonNew"]({...t,type:this.gpsType},this.map);i.isShowPolygon=!0,this.polygonMap.set(t.id,i);const n=t.text;this.isCheckPointHideAll?this.isCheckPointHideAll||void 0===t.isShowText||null===t.isShowText||NaN===t.isShowText?this.initPolygonText(i,{text:n,center:e,isShow:!1}):this.initPolygonText(i,{text:n,center:e,isShow:t.isShowText}):this.initPolygonText(i,{text:n,center:e,isShow:!0})}},initPolygonText(t,e){const{text:i,center:n,isShow:s}=e;t.setShowText(s),t.setText(i),t.setCenter(n)},selectGPSAll(t){this.polygonMap.forEach(e=>{e.selectGPS(t)})},setBBOXArr(t,e){if(this.bboxMap.has(t)||(this.bbox.push(e),this.bboxMap.set(t,e)),!this.bboxMapGCJ02.has(t)){const i=this.convertBBoxGCJ02(e);this.bboxGCJ02.push(i),this.bboxMapGCJ02.set(t,i)}},setFit(){this.bbox.length&&this.map&&(this.bbox.length>1?Object(Sh["fitNew"])(this.map,1==this.gpsType?this.bboxGCJ02:this.bbox):this.setFitFist(1==this.gpsType?this.bboxGCJ02[0]:this.bbox[0]))},setFitFist(t){const e=[t[0],t[3],t[2],t[1]],i=[t[2],t[1],t[0],t[3]];Object(Sh["fitNew"])(this.map,[e,i])},_serializeGeoJson(t){let e=null;try{t instanceof Object?e=t:"string"===typeof t&&(e=JSON.parse(t))}catch(o){return null}const{bbox:i,geometry:n,properties:s}=e;let r=[];return s&&s.center&&(r=s.center),{bbox:i,coordinates:n.coordinates,center:r.length?r:Object(Sh["getCenterPoint"])(n.coordinates)}},getBBOX(){if(!this.model.geo)return Object(Sh["getLngAndLatMaxMin"])(this.model.coordinates)},showAll(){this.polygonMap.forEach(t=>t.show()),this.restFit&&this._restFit()},hideAll(){this.polygonMap.forEach(t=>t.hide())},_remove(){this.polygonMap.forEach(t=>{t.removePolygon(),t=null}),this.checkPointMap.clear(),this.polygonMap.clear(),this.bboxMap.clear(),this.bbox=[],this.bboxGCJ02=[],this.bboxMapGCJ02.clear()},setPolygonColor(t,e,i=!0){if(this.polygonMap.has(t)){const n=this.polygonMap.get(t);n.setPolygonColor(e),i&&this._setZoom()}},_setZoom(){const t=this.map.getView().getZoom();this.map.getView().setZoom(t+1e-5),this.map.getView().setZoom(t-1e-4)},setPolygonColors(t){t.forEach(t=>{this.setPolygonColor(t.id,t.colorArr,!1)}),t.length&&this._setZoom()},showCheckPointAll(){this.map&&this.polygonMap.forEach(t=>t.setTextVisible(!0))},_isShowPolygon(t){const e=t.id;if(this.polygonMap.has(e)){const i=this.polygonMap.get(e);if(t.isShow)return void i.show();i.hide()}},_isShowPolygons(t){t.forEach(t=>{this._isShowPolygon(t)}),this.restFit&&this._restFit()},hideCheckPointAll(){this.polygonMap.forEach(t=>t.setTextVisible(!1))},_isCheckPointHide(t){const e=t.id;if(this.polygonMap.has(e)){this.polygonMap.get(e).setTextVisible(t.isShow)}},_isCheckPointHides(t){t.forEach(t=>{this._isCheckPointHide(t)})},setText(t,e){if(this.polygonMap.has(t)){const i=this.polygonMap.get(t);i.setText(e)}},restBBOXArr(){this.bbox=[],this.bboxGCJ02=[],this.bboxMap.forEach(t=>{this.bbox.push(t)}),this.bboxMapGCJ02.forEach(t=>{this.bboxGCJ02.push(t)})},removePolygonsAndCheckPoints(t){t.forEach((t,e)=>{this.removePolygonAndCheckPoint(t)}),t.length&&this.restBBOXArr()},removePolygonAndCheckPoint(t,e=!0){if(this.checkPointMap.has(t)){const i=this.checkPointMap.get(t);this.map.removeOverlay(i.getMarker()),this.checkPointMap.delete(t),e&&this.restBBOXArr()}if(this.polygonMap.has(t)){const e=this.polygonMap.get(t);e.removePolygon(),this.polygonMap.delete(t)}this.bboxMap.has(t)&&this.bboxMap.delete(t),this.bboxMapGCJ02.has(t)&&this.bboxMapGCJ02.delete(t)},_ranges(t){const e=[];t.forEach(t=>{if(this.bboxMap.has(t)&&1!=this.gpsType){const i=this.bboxMap.get(t);e.push(i)}else if(this.bboxMapGCJ02.has(t)&&1==this.gpsType){const i=this.bboxMapGCJ02.get(t);e.push(i)}}),e.length&&Object(Sh["fitNew"])(this.map,e)},_range(t){if(this.bboxMap.has(t)&&1!=this.gpsType){const e=this.bboxMap.get(t);Object(Sh["fitNew"])(this.map,[e])}else if(this.bboxMapGCJ02.has(t)&&1==this.gpsType){const e=this.bboxMapGCJ02.get(t);Object(Sh["fitNew"])(this.map,[e])}},_insert(t,e){if(!t)return;let i=[],n=[];if(!t.coordinates){const{coordinates:e,center:n,bbox:s}=this._serializeGeoJson(t.geo);t.coordinates=e,i=n}this.initPolygon(t,i),this.setBBOXArr(t.id,n.length?n:Object(Sh["getLngAndLatMaxMin"])(t.coordinates)),e&&this._onLoad()},_inserts(t){this.lastType=this.gpsType,t.forEach(t=>{this._insert(t,!1)}),t.length&&this._onLoad()},_onLoad(){this.$emit("onLoad",{polygonMap:this.polygonMap,checkPointMap:this.checkPointMap,bboxMap:this.bboxMap,bboxMapGCJ02:this.bboxMapGCJ02})},_restFit(){let t=[];1!=this.gpsType?this.bboxMap.forEach((e,i)=>{-1===this.isShowPolygons.findIndex(t=>t.id==i)&&t.push(this.bboxMap.get(i))}):1==this.gpsType&&this.bboxMapGCJ02.forEach((e,i)=>{-1===this.isShowPolygons.findIndex(t=>t.id==i)&&t.push(this.bboxMapGCJ02.get(i))}),t.length&&(t.length>1?Object(Sh["fitNew"])(this.map,t):this.setFitFist(t[0]))},convertBBoxGCJ02(t){const e=[],{lat:i,lon:n}=Sh["GPS"].gcj_encrypt(t[0],t[1]),{lon:s,lat:r}=Sh["GPS"].gcj_encrypt(t[2],t[3]);return e.push(n),e.push(i),e.push(s),e.push(r),e}}},vc=_c,wc=Fh(vc,fc,mc,!1,null,null,null),xc=wc.exports;xc.install=t=>{t.install(xc.name,xc)};var bc=xc,Mc=function(){var t=this,e=t._self._c;return e("div")},Ec=[];const Cc={fillColor:"rgba(184, 233, 134, 0.56)",stroke:"rgba(23, 168, 162, 0.56)",width:3,text:"块"};var Pc={name:"RyClusters",props:{modelArr:{type:Array,default:()=>[]},clusterPolygonModel:{type:Object,default:()=>Cc},map:{type:Object,default:()=>null},gpsType:{type:Number,default:0},color:{type:String,default:"#fff"},fontSize:{type:Number,default:14},offsetX:{type:Number,default:0},offsetY:{type:Number,default:0},distance:{type:Number,default:30}},data(){return{checkPointArr:new Map,currentArr:Array(),fpModelArr:[],featurePolygon:null,multiPolygonMap:new Map,scan:new Sh["GrahamScan"],polygonSet:new Set}},beforeDestroy(){this.clear()},watch:{modelArr(t){this.map&&(this.clear(),this.init())},gpsType(t){this.gpsType=t,this.selectGPSAll(t)}},created(){this.featurePolygon=new Sh["FeaturePolygon"](this.gpsType),this.clear(),this.init()},methods:{mergeGeoJson(t){let e=[],i=new Set;t.forEach(t=>{if(t){const n=t.getId();if(this.multiPolygonMap.has(n)){const t=this.multiPolygonMap.get(n);i.add(n),t.forEach(t=>{e.push(t)})}}}),this.scan.setPoints(e),this.scan.getHull(),i.forEach(t=>{this.removeAggregation(t)});const n={...this.clusterPolygonModel,coordinates:[this.scan.getHull()],ids:i};this.polygonSet.add(new Sh["LPolygonNew"]({...n,gpsType:this.gpsType},this.map))},removeAggregation(t){let e=[];0!==this.polygonSet.size&&(this.polygonSet.forEach(i=>{i.Ids.has(t)&&(i.removePolygon(),e.push(i))}),e.forEach(t=>{this.polygonSet.has(t)&&this.polygonSet.delete(t)}))},removePolygonNew(){this.lPolygonNewArr.forEach(t=>{t.removePolygon(),t=null}),this.lPolygonNewArr.length=0},clear(){},createFeaturePolygonModel(t,e){return new Sh["FeaturePolygonModel"](e,t)},async init(){this.initPolygon(),this.initCluster()},_serializeGeoJson(t){let e=null;try{t instanceof Object?e=t:"string"===typeof t&&(e=JSON.parse(t))}catch(o){return null}const{bbox:i,geometry:n,properties:s}=e;let r=[];return s&&s.center&&(r=s.center),{bbox:i,coordinates:n.coordinates,center:r.length?r:Object(Sh["getCenterPoint"])(n.coordinates)}},initPolygon(){this.modelArr.forEach(t=>{t.geo;const{coordinates:e,center:i,bbox:n}=this._serializeGeoJson(t.geo),s=this.createFeaturePolygonModel(t.id,i);this.fpModelArr.push(s)})},initCluster(){const t=new Sh["LCluster"]((t,e,i)=>{const n=t.getId();if(i)return this.$emit("callback",{id:n,isShow:!0}),void(this.multiPolygonMap.has(n)&&this.multiPolygonMap.delete(n));if(!this.multiPolygonMap.has(n)){var s;const t=null===(s=this.modelArr.find(t=>t.id==n))||void 0===s?void 0:s.geo;if(t){const{coordinates:e}=this._serializeGeoJson(t);this.multiPolygonMap.set(n,e[0])}}this.$emit("callback",{id:n,isShow:!1})},{text:this.clusterPolygonModel.text,offsetX:this.offsetX,offsetY:this.offsetY,fontSize:this.fontSize,color:this.fontColor,aggregationCallback:t=>{this.mergeGeoJson(t)},removeAggregationCallback:t=>{const e=t.getId();e&&this.removeAggregation(e)}}),e=this.featurePolygon.getVectorSource(this.fpModelArr),i=t.getVectorLayer(e,this.distance);this.map.addLayer(i)},selectGPSAll(t){this.polygonSet.forEach(e=>{e.selectGPS(t)}),this.featurePolygon&&this.featurePolygon.selectGPSAll(t)}}},Ac=Pc,Sc=Fh(Ac,Mc,Ec,!1,null,"15bef170",null),Tc=Sc.exports;Tc.install=t=>{t.install(Tc.name,Tc)};var Rc=Tc,Ic=function(){var t=this,e=t._self._c;return e("div")},Lc=[];var Oc={name:"RyClustersMarker",props:{modelArr:{type:Array,default:()=>[]},text:{type:String,default:()=>"台"},map:{type:Object,default:()=>null},gpsType:{type:Number,default:0},distance:{type:Number,default:200},fontColor:{type:String,default:"#fff"},src:{type:String,default:()=>null},fontSize:{type:Number,default:14},offsetX:{type:Number,default:0},offsetY:{type:Number,default:0}},data(){return{fpModelArr:[],featurePolygon:new Sh["FeaturePolygon"](this.gpsType),scan:new Sh["GrahamScan"],polygonSet:new Set}},beforeDestroy(){this.clear()},watch:{modelArr(t){this.map&&(this.clear(),this.init())},gpsType(t){this.gpsType=t,this.selectGPSAll(t)}},created(){this.clear(),this.init()},methods:{clear(){},createFeaturePolygonModel(t,e){return new Sh["FeaturePolygonModel"](e,t)},async init(){this.initFeature(),this.initCluster()},initFeature(){this.modelArr.forEach(t=>{const e=this.createFeaturePolygonModel(t.id,[t.x,t.y]);this.fpModelArr.push(e)})},initCluster(){const t=new Sh["LClusterMarker"]((t,e,i)=>{const n=t.getId();i?this.$emit("callback",{id:n,isShow:!0}):this.$emit("callback",{id:n,isShow:!1})},{text:this.text,offsetX:this.offsetX,offsetY:this.offsetY,fontSize:this.fontSize,color:this.fontColor,src:this.src,aggregationCallback:t=>{},removeAggregationCallback:t=>{}}),e=this.featurePolygon.getVectorSource(this.fpModelArr),i=t.getVectorLayer(e,this.distance);this.map.addLayer(i)},selectGPSAll(t){this.featurePolygon&&this.featurePolygon.selectGPSAll(t)}}},kc=Oc,Dc=Fh(kc,Ic,Lc,!1,null,"dcd24b66",null),Nc=Dc.exports;Nc.install=t=>{t.install(Nc.name,Nc)};var Gc=Nc,jc=function(){var t=this,e=t._self._c;return e("div")},Fc=[];class Bc extends lc{constructor(...t){super(...t),ks(this,"model",{type:Object,default:()=>null}),ks(this,"isShow",{type:Boolean,default:!0}),ks(this,"clear",{type:Boolean,default:!1}),ks(this,"isFit",{type:Boolean,default:!0}),ks(this,"isStandardGeo",{type:Boolean,default:!1})}}var zc={name:"RyPolygonGeo",props:{...new Bc},data(){return{polygon:null,bbox:[],bboxGCJ02:[],lastType:-1}},watch:{isShow(t){this.polygon&&(t?this.show():this.hide())},clear(t){t&&this.remove()},model(t){this.remove(),this.isStandardGeo?this.initNew():this.init()},isFit(t){this.isFit=t,t&&this.setFit()},gpsType(t){this.lastType!=t&&(this.gpsType=t,this.lastType=t,this.selectGPSAll(this.gpsType))}},created(){this.isStandardGeo?this.initNew():this.init()},methods:{init(){if(this.lastType=this.gpsType,!this.model||!this.model.geo)return;let t=[];if(this.model.geo){const{coordinates:e,center:i,bbox:n}=this._serializeGeoJson();this.bbox=n,this.bboxGCJ02=this.convertBBoxGCJ02(n),t=i}else this.bbox=Object(Sh["getLngAndLatMaxMin"])(this.model.coordinates),this.bboxGCJ02=this.convertBBoxGCJ02(this.bbox);this.polygon=Object(Sh["createPolygonBoundary"])(this.model.geo,this.model),this.map.addLayer(this.polygon),this.isFit&&this.setFit(1==this.gpsType?this.bboxGCJ02:this.bbox),this.polygon.isShowPolygon=!0,this.isShow?this.show():this.hide(),this.clear&&this.remove(),this.$emit("onLoad",{polygon:this.polygon})},initNew(){if(this.lastType=this.gpsType,this.model&&this.model.geo){if(this.model.geo){const{bbox:t}=this.model.geo;this.bbox=t,this.bboxGCJ02=this.convertBBoxGCJ02(t)}this.polygon=Object(Sh["createPolygonBoundary"])(this.model.geo,this.model),this.map.addLayer(this.polygon),this.isFit&&this.setFit(1==this.gpsType?this.bboxGCJ02:this.bbox),this.polygon.isShowPolygon=!0,this.isShow?this.show():this.hide(),this.clear&&this.remove(),this.$emit("onLoad",{polygon:this.polygon})}},setFit(t){if(!t.length||!this.map)return;const e=[t[0],t[3],t[2],t[1]],i=[t[2],t[1],t[0],t[3]];Object(Sh["fitNew"])(this.map,[e,i])},_serializeGeoJson(){let t=null;if(this.model.geo instanceof Object)t=this.model.geo;else{if("string"!==typeof this.model.geo)return t;t=JSON.parse(this.model.geo)}const{bbox:e,geometry:i,properties:n}=t;let s=[];return n&&n.center&&(s=n.center),{bbox:e,coordinates:i.coordinates,center:s.length?s:Object(Sh["getCenterPoint"])(i.coordinates)}},convertBBoxGCJ02(t){const e=[],{lat:i,lon:n}=Sh["GPS"].gcj_encrypt(t[0],t[1]),{lon:s,lat:r}=Sh["GPS"].gcj_encrypt(t[2],t[3]);return e.push(n),e.push(i),e.push(s),e.push(r),e},getBBOX(){if(!this.model.geo)return Object(Sh["getLngAndLatMaxMin"])(this.model.coordinates)},show(){},hide(){},selectGPSAll(t){},remove(){this.map&&this.polygon&&(this.map.removeLayer(this.polygon),this.polygon=null)},getId(){return this.id}}},Vc=zc,Zc=Fh(Vc,jc,Fc,!1,null,null,null),Hc=Zc.exports;Hc.install=t=>{t.install(Hc.name,Hc)};var Xc=Hc,Kc=function(){var t=this,e=t._self._c;return e("div",{directives:[{name:"lmap",rawName:"v-lmap:loadMap",arg:"loadMap"}],staticClass:"vector-map"},[t._t("polygon",null,{mapDto:{map:t.map,lMap:t.lMap}})],2)},Wc=[],Yc={name:"RyVectorMap",props:{isAnalysisBBOX:{type:Boolean,default:!0},isAnalysisCenter:{type:Boolean,default:!0},modelArr:{type:Array,default:()=>[]},delayTime:{type:Number,default:()=>50},bindMapClick:{type:Boolean,default:!1},isDrag:{type:Boolean,default:!0}},data(){return{lMap:new Th,drawPolygon:null,mapClick:null,map:null,vmap:null,lastX:0,lastY:0,moveend:null,polygonMap:null}},watch:{modelArr(t){this.initLayers(t)},bindMapClick(t){this.bindMapClick!==t&&(this.bindMapClick=t,this._bingMapEvent())},polygonColor(t){t&&this.setPolygonColor(t.id,t.colorArr)}},mounted(){},methods:{async loadMap(t){const{map:e,vmap:i}=await this.lMap.initVectorMap({el:t,isAnalysisBBOX:this.isAnalysisBBOX,isAnalysisCenter:this.isAnalysisCenter,delayTime:this.delayTime,isDrag:this.isDrag,callback:t=>this.$emit("initLayersEvent",t)});this.map=e,this.vmap=i,this.polygonMap=i.getLayerMap,this._bingMapEvent(),this.$emit("load",{map:e,vmap:i}),this.modelArr.length&&this.initLayers(val)},initLayers(t){this.vmap&&this.vmap.initLayers(t)},_mapClickOnce(t=!1){this.mapClick||(this.mapClick=t=>{if(t.dragging)return;const e=this.map.getEventPixel(t.originalEvent),i=this.map.hasFeatureAtPixel(e);if(i){const e=this.map.forEachFeatureAtPixel(t.pixel,t=>t),i=e.getProperties(),n=this.map.getView(),[s,r]=n.getCenter(),o=e.getId();i&&this.$emit("mapClick",{...i,id:o||null,currentX:s,currentY:r})}}),t?(this.map.un("click",this.mapClick),this.mapClick=null):this.map.on("click",this.mapClick)},_bingMapEvent(){this.bindMapClick?this._mapClickOnce():this._mapClickOnce(!0)},setPolygonColor(t,e,i=!0){if(this.polygonMap.has(t)){const n=this.polygonMap.get(t);n.setPolygonColor(e),i&&this._setZoom()}},_setZoom(){const t=this.map.getView().getZoom();this.map.getView().setZoom(t+1e-5),this.map.getView().setZoom(t-1e-4)}}},Uc=Yc,Jc=(i("4ea7"),Fh(Uc,Kc,Wc,!1,null,"007eb38f",null)),$c=Jc.exports;$c.install=t=>{t.install($c.name,$c)};var qc=$c,Qc=function(){var t=this,e=t._self._c;return e("div",[t.isShowPlayback?e("div",{staticClass:"el-slider-box"},[e("el-row",{attrs:{type:"flex",justify:"center"}},[e("el-col",{attrs:{span:1}},[t.index&&t.isStop?e("button",{staticClass:"button-stop",on:{click:function(e){return e.stopPropagation(),t.onStopTrajectory()}}}):e("button",{staticClass:"button-paly",on:{click:function(e){return e.stopPropagation(),t.onPlayTrajectory()}}})]),e("el-col",{staticStyle:{"margin-left":"30px"},attrs:{xs:13,sm:19,md:19,lg:19,xl:23}},[e("el-slider",{attrs:{marks:t.marks,"show-tooltip":"",step:1,min:0,max:t.cacheArr.length-1,"format-tooltip":t.formatTooltip},on:{change:t.sliderChange},model:{value:t.index,callback:function(e){t.index=e},expression:"index"}})],1)],1),e("el-row",{attrs:{type:"flex",justify:"end"}},[e("el-col",[e("section",{staticClass:"control-panel"},[e("span",[t._v("播放倍速:")]),e("span",{class:{active:t.selectActive[0]},on:{click:function(e){return e.stopPropagation(),t.onPlaySpeed(0,200)}}},[t._v("0.5x")]),e("span",{class:{active:t.selectActive[1]},on:{click:function(e){return e.stopPropagation(),t.onPlaySpeed(1,100)}}},[t._v("正常")]),e("span",{class:{active:t.selectActive[2]},on:{click:function(e){return e.stopPropagation(),t.onPlaySpeed(2,50)}}},[t._v("1.5x")]),e("span",{class:{active:t.selectActive[3]},on:{click:function(e){return e.stopPropagation(),t.onPlaySpeed(3,5)}}},[t._v("2.0x")])])])],1)],1):t._e()])},tu=[];const eu={color:"red",width:2,zIndex:1};class iu extends lc{constructor(...t){super(...t),ks(this,"model",{type:Object,default:()=>null}),ks(this,"linenIsert",{type:Object,default:()=>null}),ks(this,"isLineFit",{type:Boolean,default:!0}),ks(this,"isShowPlayback",{type:Boolean,default:!1}),ks(this,"lineAppend",{type:Array,default:()=>[]}),ks(this,"startMarkerDto",{type:Object,default:()=>null}),ks(this,"endMarkerDto",{type:Object,default:()=>null}),ks(this,"moveMarkerDto",{type:Object,default:()=>null}),ks(this,"clearLiens",{type:Boolean,default:!1}),ks(this,"endMarkerPoint",{type:Array,default:()=>[]}),ks(this,"lineDto",{type:Object,default:()=>eu}),ks(this,"isShowAll",{type:Boolean,default:!0}),ks(this,"isConneLine",{type:Boolean,default:!0}),ks(this,"isPlaybackTrackPoints",{type:Boolean,default:!1}),ks(this,"playbackSpeed",{type:Number,default:10}),ks(this,"pepeatPlayback",{type:Boolean,default:!1})}}var nu={name:"RyLines",props:{...new iu},data(){return{lines:null,checkPoint:null,bbox:[],bboxGCJ02:[],lastType:-1,lastLinesDto:null,moveMarker:null,endMarker:null,startMarker:null,pineArr:[],lastLineX:0,lastLineY:0,lastLineX2:0,lastLineY2:0,cacheArr:new Array,cacheModelArr:new Map,cacheColors:new Map,cacheLenArr:new Array,cacheLines:new Array,cacheLineMaps:new Map,cacheScales:new Array,isFist:!0,lastColor:null,len:0,am:new Sh["AM"],index:0,intervalId:null,selectActive:[!1,!0,!1,!1],marks:{},marks2:{},isPlayback:!1,isStop:!1,playSpeed:100}},watch:{model(t){this.init(),t&&this.insertCache(t.pointArr)},linenIsert(t){this.map&&t&&(this.insertCache(t),this._insertLineAndMarker(t))},gpsType(t){this.selectGPSAll(t)},clearLiens(t){t&&this.clearLine()},lineAppend(t){t.length>0&&this.map&&(this.appendCoordinate(t),this.setMarkerPoint(this.endMarker,t))},isShowPlayback(t){if(!t)return this.endPlaybackLines(),this.index=0,void this.resetPyalPanel();delete this.marks2[this.len],this.marks=this.marks2},isShowAll(t){if(!t)return this.hideAll(),void this.hideMarker();this.showAll(),this.showMarker()},isPlaybackTrackPoints(t){t&&this.playbackTrackNew()}},created(){this.init()},methods:{init(){this.map&&(this.clearLine(),(this.model||this.linenIsert)&&(this.lastType=this.gpsType,this.model&&(this.insertCache(this.model),this._insertLineAndMarker(this.model),this.isPlaybackTrackPoints&&this.playbackTrackNew()),this.linenIsert&&(this.insertCache(this.linenIsert),this._insertLineAndMarker(this.linenIsert))))},insertCache(t){if(t){const{playbackColor:e,pointArr:i}=t;if(!i)return;const n=i.length;if(!i.length)return;this.len+=n,this.cacheArr.push(...t.pointArr),this.cacheColors.set(this.len,e),this.cacheLenArr.push(n),this.marks2[this.len]="",this.cacheScales.push(this.len),this.cacheModelArr.set(this.len,t)}},_insertLineAndMarker(t){const e=t.pointArr;if(this.isLineFit&&this.calculateLineBBOX(e),this.initMarker(e[0]),!t.isAppend){this._insertPoint(t,[this.lastLineX,this.lastLineY]);const i=this.createPolyline(t),n=e.length-1;this.setMarkerPoint(this.endMarker,e[n]);const{x:s,y:r}=this.restLastData(e);return this.lastLineX=s,this.lastLineY=r,void this.pineArr.push(i)}e.forEach(t=>{this.appendCoordinate(t)});const i=e.length-1;this.setMarkerPoint(this.endMarker,e[i]),this.restLastData(e)},_insertLineAndMarker2(t){this._insertPoint(t,[this.lastLineX2,this.lastLineY2]);const e=t.pointArr,i=this.createPolyline(t),{x:n,y:s}=this.restLastData(e);this.lastLineX2=n,this.lastLineY2=s,this.cacheLines.push(i)},async calculateLineBBOX(t){return await new Promise(e=>{t.forEach(t=>{this.am.getLngAndLatMaxMin({X:t[0],Y:t[1]})});let i=[];i=this.gpsType?this.am.getLngLatGCJ02():this.am.getLngLats(),Object(Sh["fitNew"])(this.map,[[i[0],i[1]],[i[2],i[3]]]),e()})},initMarker(t){(this.startMarkerDto||this.endMarkerDto)&&(this.startMarker||this.endMarker||(this.startMarker=this.createStartMarker(this.startMarkerDto,t),this.endMarker=this.createStartMarker(this.endMarkerDto)))},setMarkerPoint(t,e){t&&e.length>1&&t.setPosition(e,this.gpsType)},restLastData(t){if(t.length>0){const[e,i]=t[t.length-1];return{x:e,y:i}}},_insertPoint(t,e){if(!this.isConneLine)return;const[i,n]=e;i>0&&n>0&&t&&t.pointArr.unshift(e)},createPolyline(t={color:"rgb(0,0,255)",width:2,pointArr:[],zIndex:1}){return new Sh["Polyline"]({...t,type:this.gpsType},this.map)},createStartMarker({offset:t,url:e,width:i,height:n},s=[]){const r=new Sh["LMarker"](e,i,n);return r.setOffset(t),s.length&&r.setPosition(s,this.gpsType),this.map.addOverlay(r.getMarker()),r},getLngLatGCJ02(t){const e=[];return t.forEach(t=>{const{lon:i,lat:n}=Sh["GPS"].gcj_encrypt(t[0],t[1]);e.push([i,n])}),e},removeLines(){this.pineArr.forEach(t=>{t.removePolyline()}),this.pineArr=[]},showAll(){this.pineArr.forEach(t=>{t.show()})},hideAll(){this.pineArr.forEach(t=>{t.hide()})},showMarker(){this.endMarker&&this.endMarker.show(),this.startMarker&&this.startMarker.show(),this.moveMarker&&this.moveMarker.show()},hideMarker(){this.endMarker&&this.endMarker.hide(),this.startMarker&&this.startMarker.hide(),this.moveMarker&&this.moveMarker.hide()},removeLineMarker(){this.map&&(this.endMarker&&this.map.removeOverlay(this.endMarker.getMarker()),this.startMarker&&this.map.removeOverlay(this.startMarker.getMarker()),this.moveMarker&&this.map.removeOverlay(this.moveMarker.getMarker()),this.moveMarker=null,this.endMarker=null,this.startMarker=null)},clearLine(){this.resetPyalPanel(),this.removeLines(),this.removeLineMarker(),this.cacheArr=[],this.lastColor=null,this.lastLineX=0,this.lastLineY=0,this.am=null,this.am=new Sh["AM"],this.marks={},this.marks2={},this._clearInterval(),this.clearCacheLines()},_clearInterval(){this.intervalId&&clearInterval(this.intervalId)},clearCacheLines(){this.endPlaybackLines(),this.cacheLenArr=[],this.cacheArr=[],this.cacheColors.clear(),this.cacheModelArr.clear(),this.len=0,this.cacheScales=[],this.index=0},endPlaybackLines(){this._clearInterval(),this.cacheLines.forEach(t=>{t.removePolyline()}),this.moveMarker&&this.map.removeOverlay(this.moveMarker.getMarker()),this.isPlayback=!1,this.isStop=!1,this.cacheLines=[],this.cacheLineMaps.clear(),this.moveMarker=null,this.lastLineX2=0,this.lastLineY2=0},stopPlaybackLines(t){this.isPlayback=!1,this.isStop=!1,t?this._clearInterval():this.trackPlayback()},createTrackLineAndMarker(t=0,e=0){const i=t,{playbackColor:n,width:s,zIndex:r}=this.cacheModelArr.get(i),o=this.createPolyline({color:n,isAppend:!1,width:s,pointArr:[],zIndex:r},this.gpsType);this.lastColor=n,this.cacheLines.push(o),this.moveMarkerDto&&!this.moveMarker&&(this.moveMarker=this.createStartMarker(this.moveMarkerDto,this.cacheArr[e]))},trackPlayback(){this.cacheLines.length||this.createTrackLineAndMarker(this.cacheScales[0],0),this.intervalId=setInterval(t=>{if(this.index>=this.len-1||!this.isPlayback){const t=this.cacheLines[this.cacheLines.length-1],e=this.cacheArr[this.index];return this.setMarkerPoint(this.moveMarker,e),t.appendCoordinate(e,this.gpsType),this.$emit("trackPlayEvent",{index:this.index,points:e}),this._clearInterval(),this.index=0,this.isStop=!1,void this.$emit("trackPlayEvent",{index:this.index,points:this.cacheArr[0]})}const e=this.getKey(this.index);if(this.cacheColors.has(e)&&!this.cacheLineMaps.has(e)&&!this.cacheLineMaps.has(e)){this.createTrackLineAndMarker(e,this.index);const t=this.cacheLines[this.cacheLines.length-1];this.cacheLineMaps.set(e,t);const i=this.index-1==-1?0:this.index-1;t.appendCoordinate(this.cacheArr[i],this.gpsType)}const i=this.cacheLines[this.cacheLines.length-1],n=this.cacheArr[this.index];this.setMarkerPoint(this.moveMarker,n),i.appendCoordinate(n,this.gpsType),this.$emit("trackPlayEvent",{index:this.index,points:n}),this.index+=1},this.playSpeed)},appendCoordinate(t=[]){if(!t.length)return;this.pineArr.length||this._insertLineAndMarker({...this.lineDto,pointArr:[t],isAppend:!1});const e=this.pineArr[this.pineArr.length-1];e.appendCoordinate(t,this.gpsType)},formatTooltip(t){return t/100},getKeys(t){const e=[];for(let i=0;i<this.cacheScales.length;i++){if(!(t>=this.cacheScales[i])){e.push(this.cacheScales[i]);break}e.push(this.cacheScales[i])}return e},getKey(t){for(let e=0;e<this.cacheScales.length;e++){const i=this.cacheScales[e];if(t<=i)return i}return 0},createLineModels(t,e,i){const n=[],s=[...e];if(t.length<=1){const e=t[0],{width:r,zIndex:o}=this.cacheModelArr.get(e);return n.push({isAppend:!1,color:this.cacheColors.get(e),width:r,zIndex:o,pointArr:s.splice(0,i+1)}),n}for(let r=0;r<t.length;r++){const e=t[r],{width:i,zIndex:o}=this.cacheModelArr.get(e),a=s.splice(0,this.cacheLenArr[r]);if(a.length){const t={color:this.cacheColors.get(e),width:i,zIndex:o,pointArr:a};n.push(t)}}return n},sliderChange(t){if(this.endPlaybackLines(),0===t)return void this.$emit("trackPlayEvent",{index:t,points:this.cacheArr[0]});const e=this.cacheArr.slice(0,t+1),i=this.createLineModels(this.getKeys(t),e,t);i.forEach(t=>this._insertLineAndMarker2(t,!1)),e.length&&this.$emit("trackPlayEvent",{index:t,points:e[e.length-1]}),this.moveMarkerDto&&!this.moveMarker&&e.length&&(this.moveMarker=this.createStartMarker(this.moveMarkerDto,e[e.length-1]))},onPlayTrajectory(){this.isStop||0==this.index&&this.endPlaybackLines(),this.isPlayback=!0,this.isStop=!0,this.trackPlayback()},onStopTrajectory(){this.isStop=!1,this._clearInterval()},onPlaySpeed(t,e){this.selectActive=this.selectActive.map(t=>!1),this.selectActive[t]=!0,this.playSpeed=e,this.isStop=!1,this._clearInterval()},resetPyalPanel(){this.selectActive=[!1,!0,!1,!1,!1],this.playSpeed=100},selectGPSAll(t){this.pineArr.forEach(e=>{e.selectGPS(t)}),this.endPlaybackLines(),this.index=0,this.startMarker&&this.startMarker.selectGPS(t),this.endMarker&&this.endMarker.selectGPS(t),this.moveMarker&&this.moveMarker.selectGPS(t)},playbackTrackNew(){this.cacheLines.length||this.createTrackLineAndMarker(this.cacheScales[0],0),this.intervalId=setInterval(t=>{if(this.index>=this.len-1||!this.isPlaybackTrackPoints){const t=this.cacheArr[this.index];if(this.setMarkerPoint(this.moveMarker,t),this.index=0,!this.pepeatPlayback||!this.isPlaybackTrackPoints)return this._clearInterval(),this.moveMarker.hide(),void this.playbackTrack("playbackTrackEndEvent")}const e=this.cacheArr[this.index];this.setMarkerPoint(this.moveMarker,e),this.moveMarker&&0==this.index&&this.moveMarker.show(),this.index+=1},this.playbackSpeed)}}},su=nu,ru=(i("c126"),Fh(su,Qc,tu,!1,null,"52b1e7ce",null)),ou=ru.exports;ou.install=t=>{t.install(ou.name,ou)};var au=ou,lu=function(){var t=this,e=t._self._c;return e("div",{staticClass:"map-box"},[e("div",{directives:[{name:"lmap",rawName:"v-lmap:loadMap",arg:"loadMap"}],staticClass:"map-style"}),t.lMap.map&&t.isRyMapTool?e("RyMapTool",{staticClass:"ry-mapts-tool",class:{left:!t.isRight,right:t.isRight},attrs:{lMap:t.lMap,isShowRangingTool:t.isShowRangingTool,initModifyPolygon:t.initModifyPolygon,isShowDrawTool:t.isShowDrawTool,isRight:t.isRight,isCrossHair:t.isCrossHair,hideAdd:t.hideAdd,hidePoint:t.hidePoint,hideCancel:t.hideCancel,hideDelete:t.hideDelete,hideSave:t.hideSave,hideLine:t.hideLine,hideArea:t.hideArea,isSwitchMap:t.isSwitchMap,isSwitchMapRight:t.isSwitchMapRight,isHideAreaAndKM:t.isHideAreaAndKM},on:{crossHairClick:function(e){return t.crossHairClick(e)},loadDrawPolygonEvent:function(e){return t.loadDrawPolygonEvent(e)},success:function(e){return t.drawSuccess(e)},error:function(e){return t.drawError(e)}}},[[t._t("maptool")]],2):t._e(),t.map?[t._t("polygon",null,{mapDto:{map:t.map,lMap:t.lMap}}),t._t("marker",null,{mapDto:{map:t.map,lMap:t.lMap}})]:t._e()],2)},hu=[];class cu{constructor(){this.isSwitchMapTool={type:Boolean,default:!0},this.isRyMapTool={type:Boolean,default:!1},this.isRight={type:Boolean,default:!1},this.bindMapClick={type:Boolean,default:!1},this.initModifyPolygon={type:[String,Object],default:()=>null}}}class uu{constructor(t){this.zoom={type:Number,default:10},this.maxZoom={type:Number,default:28},this.minZoom={type:Number,default:1},this.center={type:Array,default:()=>[2575,1450]},this.bbox={type:Array,default:()=>[]},this.url={type:String,default:()=>null},this.imageSize={type:Array,default:()=>[0,0,7247,3562]},this.imageExtent={type:Array,default:()=>[500,400,5e3,2700]}}}class du{constructor(){ks(this,"pushMethodArgs_",(...t)=>(this.push_(t),this)),this.instructions_=[],this.zIndex=0,this.offset_=0,this.context_=new Proxy(Gs(),{get:(t,e)=>{if("function"===typeof Gs()[e])return this.push_(e),this.pushMethodArgs_},set:(t,e,i)=>(this.push_(e,i),!0)})}push_(...t){const e=this.instructions_,i=this.zIndex+this.offset_;e[i]||(e[i]=[]),e[i].push(...t)}pushFunction(t){this.push_(t)}getContext(){return this.context_}draw(t){this.instructions_.forEach(e=>{for(let i=0,n=e.length;i<n;++i){const n=e[i];if("function"===typeof n){n(t);continue}const s=e[++i];if("function"===typeof t[n])t[n](...s);else{if("function"===typeof s){t[n]=s(t);continue}t[n]=s}}})}clear(){this.instructions_.length=0,this.zIndex=0,this.offset_=0}offset(){this.offset_=this.instructions_.length,this.zIndex=0}}var pu=du;const gu=5;class fu extends L{constructor(t){super(),this.ready=!0,this.boundHandleImageChange_=this.handleImageChange_.bind(this),this.layer_=t,this.staleKeys_=new Array,this.maxStaleKeys=gu}getStaleKeys(){return this.staleKeys_}prependStaleKey(t){this.staleKeys_.unshift(t),this.staleKeys_.length>this.maxStaleKeys&&(this.staleKeys_.length=this.maxStaleKeys)}getFeatures(t){return O()}getData(t){return null}prepareFrame(t){return O()}renderFrame(t,e){return O()}forEachFeatureAtCoordinate(t,e,i,n,s){}getLayer(){return this.layer_}handleFontsChanged(){}handleImageChange_(t){const e=t.target;e.getState()!==Da.LOADED&&e.getState()!==Da.ERROR||this.renderIfReadyAndVisible()}loadImage(t){let e=t.getState();return e!=Da.LOADED&&e!=Da.ERROR&&t.addEventListener(h.CHANGE,this.boundHandleImageChange_),e==Da.IDLE&&(t.load(),e=t.getState()),e==Da.LOADED}renderIfReadyAndVisible(){const t=this.getLayer();t&&t.getVisible()&&"ready"===t.getSourceState()&&t.changed()}renderDeferred(t){}disposeInternal(){delete this.layer_,super.disposeInternal()}}var mu=fu;let yu=null;function _u(){yu=Ds(1,1,void 0,{willReadFrequently:!0})}class vu extends mu{constructor(t){super(t),this.container=null,this.renderedResolution,this.tempTransform=en(),this.pixelTransform=en(),this.inversePixelTransform=en(),this.context=null,this.deferredContext_=null,this.containerReused=!1,this.frameState=null}getImageData(t,e,i){let n;yu||_u(),yu.clearRect(0,0,1,1);try{yu.drawImage(t,e,i,1,1,0,0,1,1),n=yu.getImageData(0,0,1,1).data}catch{return yu=null,null}return n}getBackground(t){const e=this.getLayer();let i=e.getBackground();return"function"===typeof i&&(i=i(t.viewState.resolution)),i||void 0}useContainer(t,e,i){const n=this.getLayer().getClassName();let s,r;if(t&&t.className===n&&(!i||t&&t.style.backgroundColor&&f(Lo(t.style.backgroundColor),Lo(i)))){const e=t.firstElementChild;Zs(e)&&(r=e.getContext("2d"))}if(r&&cn(r.canvas.style.transform,e)?(this.container=t,this.context=r,this.containerReused=!0):this.containerReused?(this.container=null,this.context=null,this.containerReused=!1):this.container&&(this.container.style.backgroundColor=null),!this.container){s=Q?Vs():document.createElement("div"),s.className=n;let t=s.style;t.position="absolute",t.width="100%",t.height="100%",r=Ds();const e=r.canvas;s.appendChild(e),t=e.style,t.position="absolute",t.left="0",t.transformOrigin="top left",this.container=s,this.context=r}this.containerReused||!i||this.container.style.backgroundColor||(this.container.style.backgroundColor=i)}clipUnrotated(t,e,i){const n=re(i),s=oe(i),r=Qt(i),o=qt(i);nn(e.coordinateToPixelTransform,n),nn(e.coordinateToPixelTransform,s),nn(e.coordinateToPixelTransform,r),nn(e.coordinateToPixelTransform,o);const a=this.inversePixelTransform;nn(a,n),nn(a,s),nn(a,r),nn(a,o),t.save(),t.beginPath(),t.moveTo(Math.round(n[0]),Math.round(n[1])),t.lineTo(Math.round(s[0]),Math.round(s[1])),t.lineTo(Math.round(r[0]),Math.round(r[1])),t.lineTo(Math.round(o[0]),Math.round(o[1])),t.clip()}prepareContainer(t,e){const i=t.extent,n=t.viewState.resolution,s=t.viewState.rotation,r=t.pixelRatio,o=Math.round(ae(i)/n*r),a=Math.round(ne(i)/n*r);sn(this.pixelTransform,t.size[0]/2,t.size[1]/2,1/r,1/r,s,-o/2,-a/2),rn(this.inversePixelTransform,this.pixelTransform);const l=ln(this.pixelTransform);if(this.useContainer(e,l,this.getBackground(t)),!this.containerReused){const t=this.context.canvas;t.width!=o||t.height!=a?(t.width=o,t.height=a):this.context.clearRect(0,0,o,a),l!==t.style.transform&&(t.style.transform=l)}}dispatchRenderEvent_(t,e,i){const n=this.getLayer();if(n.hasListener(t)){const s=new yh(t,this.inversePixelTransform,i,e);n.dispatchEvent(s)}}preRender(t,e){this.frameState=e,e.declutter||this.dispatchRenderEvent_(no.PRERENDER,t,e)}postRender(t,e){e.declutter||this.dispatchRenderEvent_(no.POSTRENDER,t,e)}renderDeferredInternal(t){}getRenderContext(t){return t.declutter&&!this.deferredContext_&&(this.deferredContext_=new pu),t.declutter?this.deferredContext_.getContext():this.context}renderDeferred(t){t.declutter&&(this.dispatchRenderEvent_(no.PRERENDER,this.context,t),t.declutter&&this.deferredContext_&&(this.deferredContext_.draw(this.context),this.deferredContext_.clear()),this.renderDeferredInternal(t),this.dispatchRenderEvent_(no.POSTRENDER,this.context,t))}getRenderTransform(t,e,i,n,s,r,o){const a=s/2,l=r/2,h=n/e,c=-h,u=-t[0]+o,d=-t[1];return sn(this.tempTransform,a,l,h,c,-i,u,d)}disposeInternal(){delete this.frameState,super.disposeInternal()}}var wu=vu;class xu extends wu{constructor(t){super(t),this.image=null,this.renderedSourceRevision_=0}getImage(){return this.image?this.image.getImage():null}prepareFrame(t){const e=t.layerStatesArray[t.layerIndex],i=t.pixelRatio,n=t.viewState,s=n.resolution,r=this.getLayer().getSource(),o=t.viewHints;let a=t.extent;if(void 0!==e.extent&&(a=se(a,Qi(e.extent,n.projection))),!o[mt.ANIMATING]&&!o[mt.INTERACTING]&&!he(a))if(r){this.getLayer().rendered||this.renderedSourceRevision_===r.getRevision()||(this.image=null),this.renderedSourceRevision_=r.getRevision();const t=n.projection,e=r.getImage(a,s,i,t);e&&(this.loadImage(e)?this.image=e:e.getState()===Da.EMPTY&&(this.image=null))}else this.image=null;return!!this.image}getData(t){const e=this.frameState;if(!e)return null;const i=this.getLayer(),n=nn(e.pixelToCoordinateTransform,t.slice()),s=i.getExtent();if(s&&!Nt(s,n))return null;const r=this.image.getExtent(),o=this.image.getImage(),a=ae(r),l=Math.floor(o.width*((n[0]-r[0])/a));if(l<0||l>=o.width)return null;const h=ne(r),c=Math.floor(o.height*((r[3]-n[1])/h));return c<0||c>=o.height?null:this.getImageData(o,l,c)}renderFrame(t,e){const i=this.image,n=i.getExtent(),s=i.getResolution(),[r,o]=Array.isArray(s)?s:[s,s],a=i.getPixelRatio(),l=t.layerStatesArray[t.layerIndex],h=t.pixelRatio,c=t.viewState,u=c.center,d=c.resolution,p=h*r/(d*a),g=h*o/(d*a);this.prepareContainer(t,e);const f=this.context.canvas.width,m=this.context.canvas.height,y=this.getRenderContext(t);let _=!1,v=!0;if(l.extent){const e=Qi(l.extent,c.projection);v=le(e,t.extent),_=v&&!Gt(e,t.extent),_&&this.clipUnrotated(y,t,e)}const w=i.getImage(),x=sn(this.tempTransform,f/2,m/2,p,g,0,a*(n[0]-u[0])/r,a*(u[1]-n[3])/o);this.renderedResolution=o*h/a;const b=w.width*x[0],M=w.height*x[3];if(this.getLayer().getSource().getInterpolate()||(y.imageSmoothingEnabled=!1),this.preRender(y,t),v&&b>=.5&&M>=.5){const t=x[4],e=x[5],i=l.opacity;1!==i&&(y.save(),y.globalAlpha=i),y.drawImage(w,0,0,+w.width,+w.height,t,e,b,M),1!==i&&y.restore()}return this.postRender(this.context,t),_&&y.restore(),y.imageSmoothingEnabled=!0,this.container}}var bu=xu;class Mu extends oo{constructor(t){t=t||{},super(t)}}var Eu=Mu;class Cu extends Eu{constructor(t){super(t)}createRenderer(){return new bu(this)}getData(t){return super.getData(t)}}var Pu=Cu;let Au;const Su=[];function Tu(t,e,i,n,s){t.beginPath(),t.moveTo(0,0),t.lineTo(e,i),t.lineTo(n,s),t.closePath(),t.save(),t.clip(),t.fillRect(0,0,Math.max(e,n)+1,Math.max(i,s)),t.restore()}function Ru(t,e){return Math.abs(t[4*e]-210)>2||Math.abs(t[4*e+3]-191.25)>2}function Iu(){if(void 0===Au){const t=Ds(6,6,Su);t.globalCompositeOperation="lighter",t.fillStyle="rgba(210, 0, 0, 0.75)",Tu(t,4,5,4,0),Tu(t,4,5,0,5);const e=t.getImageData(0,0,3,3).data;Au=Ru(e,0)||Ru(e,4)||Ru(e,8),js(t),Su.push(t.canvas)}return Au}function Lu(t,e,i,n){const s=Ki(i,e,t);let r=Gi(e,n,i);const o=e.getMetersPerUnit();void 0!==o&&(r*=o);const a=t.getMetersPerUnit();void 0!==a&&(r/=a);const l=t.getExtent();if(!l||Nt(l,s)){const e=Gi(t,r,s)/r;isFinite(e)&&e>0&&(r/=e)}return r}function Ou(t,e,i,n,s,r,o,a,l,h,c,u,d,p){const g=Ds(Math.round(i*t),Math.round(i*e),Su);if(u||(g.imageSmoothingEnabled=!1),0===l.length)return g.canvas;function f(t){return Math.round(t*i)/i}g.scale(i,i),g.globalCompositeOperation="lighter";const m=Bt();let y;l.forEach((function(t,e,i){Kt(m,t.extent)}));const _=i/n,v=(u?1:1+Math.pow(2,-24))/_;if(!d||1!==l.length||0!==h){if(y=Ds(Math.round(ae(m)*_),Math.round(ne(m)*_),Su),u||(y.imageSmoothingEnabled=!1),s&&p){const t=(s[0]-m[0])*_,e=-(s[3]-m[3])*_,i=ae(s)*_,n=ne(s)*_;y.rect(t,e,i,n),y.clip()}l.forEach((function(t,e,i){if(t.image.width>0&&t.image.height>0){if(t.clipExtent){y.save();const e=(t.clipExtent[0]-m[0])*_,i=-(t.clipExtent[3]-m[3])*_,n=ae(t.clipExtent)*_,s=ne(t.clipExtent)*_;y.rect(u?e:Math.round(e),u?i:Math.round(i),u?n:Math.round(e+n)-Math.round(e),u?s:Math.round(i+s)-Math.round(i)),y.clip()}const e=(t.extent[0]-m[0])*_,i=-(t.extent[3]-m[3])*_,n=ae(t.extent)*_,s=ne(t.extent)*_;y.drawImage(t.image,h,h,t.image.width-2*h,t.image.height-2*h,u?e:Math.round(e),u?i:Math.round(i),u?n:Math.round(e+n)-Math.round(e),u?s:Math.round(i+s)-Math.round(i)),t.clipExtent&&y.restore()}}))}const w=re(o);return a.getTriangles().forEach((function(t,e,i){const n=t.source,s=t.target;let o=n[0][0],a=n[0][1],h=n[1][0],c=n[1][1],d=n[2][0],p=n[2][1];const _=f((s[0][0]-w[0])/r),x=f(-(s[0][1]-w[1])/r),b=f((s[1][0]-w[0])/r),M=f(-(s[1][1]-w[1])/r),E=f((s[2][0]-w[0])/r),C=f(-(s[2][1]-w[1])/r),P=o,A=a;o=0,a=0,h-=P,c-=A,d-=P,p-=A;const S=[[h,c,0,0,b-_],[d,p,0,0,E-_],[0,0,h,c,M-x],[0,0,d,p,C-x]],T=xt(S);if(!T)return;if(g.save(),g.beginPath(),Iu()||!u){g.moveTo(b,M);const t=4,e=_-b,i=x-M;for(let n=0;n<t;n++)g.lineTo(b+f((n+1)*e/t),M+f(n*i/(t-1))),n!=t-1&&g.lineTo(b+f((n+1)*e/t),M+f((n+1)*i/(t-1)));g.lineTo(E,C)}else g.moveTo(b,M),g.lineTo(_,x),g.lineTo(E,C);let R;if(g.clip(),g.transform(T[0],T[2],T[1],T[3],_,x),g.translate(m[0]-P,m[3]-A),y)R=y.canvas,g.scale(v,-v);else{const t=l[0],e=t.extent;R=t.image,g.scale(ae(e)/R.width,-ne(e)/R.height)}g.drawImage(R,0,0),g.restore()})),y&&(js(y),Su.push(y.canvas)),c&&(g.save(),g.globalCompositeOperation="source-over",g.strokeStyle="black",g.lineWidth=1,a.getTriangles().forEach((function(t,e,i){const n=t.target,s=(n[0][0]-w[0])/r,o=-(n[0][1]-w[1])/r,a=(n[1][0]-w[0])/r,l=-(n[1][1]-w[1])/r,h=(n[2][0]-w[0])/r,c=-(n[2][1]-w[1])/r;g.beginPath(),g.moveTo(a,l),g.lineTo(s,o),g.lineTo(h,c),g.closePath(),g.stroke()})),g.restore()),g.canvas}function ku(t){return Array.isArray(t)?Math.min(...t):t}const Du=10,Nu=.25;class Gu{constructor(t,e,i,n,s,r,o){this.sourceProj_=t,this.targetProj_=e;let a={};const l=o?zi(t=>nn(o,Ki(t,this.targetProj_,this.sourceProj_))):Xi(this.targetProj_,this.sourceProj_);this.transformInv_=function(t){const e=t[0]+"/"+t[1];return a[e]||(a[e]=l(t)),a[e]},this.maxSourceExtent_=n,this.errorThresholdSquared_=s*s,this.triangles_=[],this.wrapsXInSource_=!1,this.canWrapXInSource_=this.sourceProj_.canWrapX()&&!!n&&!!this.sourceProj_.getExtent()&&ae(n)>=ae(this.sourceProj_.getExtent()),this.sourceWorldWidth_=this.sourceProj_.getExtent()?ae(this.sourceProj_.getExtent()):null,this.targetWorldWidth_=this.targetProj_.getExtent()?ae(this.targetProj_.getExtent()):null;const h=re(i),c=oe(i),u=Qt(i),d=qt(i),p=this.transformInv_(h),g=this.transformInv_(c),f=this.transformInv_(u),m=this.transformInv_(d),y=Du+(r?Math.max(0,Math.ceil(Math.log2($t(i)/(r*r*256*256)))):0);if(this.addQuad_(h,c,u,d,p,g,f,m,y),this.wrapsXInSource_){let t=1/0;this.triangles_.forEach((function(e,i,n){t=Math.min(t,e.source[0][0],e.source[1][0],e.source[2][0])})),this.triangles_.forEach(e=>{if(Math.max(e.source[0][0],e.source[1][0],e.source[2][0])-t>this.sourceWorldWidth_/2){const i=[[e.source[0][0],e.source[0][1]],[e.source[1][0],e.source[1][1]],[e.source[2][0],e.source[2][1]]];i[0][0]-t>this.sourceWorldWidth_/2&&(i[0][0]-=this.sourceWorldWidth_),i[1][0]-t>this.sourceWorldWidth_/2&&(i[1][0]-=this.sourceWorldWidth_),i[2][0]-t>this.sourceWorldWidth_/2&&(i[2][0]-=this.sourceWorldWidth_);const n=Math.min(i[0][0],i[1][0],i[2][0]),s=Math.max(i[0][0],i[1][0],i[2][0]);s-n<this.sourceWorldWidth_/2&&(e.source=i)}})}a={}}addTriangle_(t,e,i,n,s,r){this.triangles_.push({source:[n,s,r],target:[t,e,i]})}addQuad_(t,e,i,n,s,r,o,a,l){const h=Lt([s,r,o,a]),c=this.sourceWorldWidth_?ae(h)/this.sourceWorldWidth_:null,u=this.sourceWorldWidth_,d=this.sourceProj_.canWrapX()&&c>.5&&c<1;let p=!1;if(l>0){if(this.targetProj_.isGlobal()&&this.targetWorldWidth_){const s=Lt([t,e,i,n]),r=ae(s)/this.targetWorldWidth_;p=r>Nu||p}!d&&this.sourceProj_.isGlobal()&&c&&(p=c>Nu||p)}if(!p&&this.maxSourceExtent_&&isFinite(h[0])&&isFinite(h[1])&&isFinite(h[2])&&isFinite(h[3])&&!le(h,this.maxSourceExtent_))return;let g=0;if(!p&&(!isFinite(s[0])||!isFinite(s[1])||!isFinite(r[0])||!isFinite(r[1])||!isFinite(o[0])||!isFinite(o[1])||!isFinite(a[0])||!isFinite(a[1])))if(l>0)p=!0;else if(g=(isFinite(s[0])&&isFinite(s[1])?0:8)+(isFinite(r[0])&&isFinite(r[1])?0:4)+(isFinite(o[0])&&isFinite(o[1])?0:2)+(isFinite(a[0])&&isFinite(a[1])?0:1),1!=g&&2!=g&&4!=g&&8!=g)return;if(l>0){if(!p){const e=[(t[0]+i[0])/2,(t[1]+i[1])/2],n=this.transformInv_(e);let r;if(d){const t=(Et(s[0],u)+Et(o[0],u))/2;r=t-Et(n[0],u)}else r=(s[0]+o[0])/2-n[0];const a=(s[1]+o[1])/2-n[1],l=r*r+a*a;p=l>this.errorThresholdSquared_}if(p){if(Math.abs(t[0]-i[0])<=Math.abs(t[1]-i[1])){const h=[(e[0]+i[0])/2,(e[1]+i[1])/2],c=this.transformInv_(h),u=[(n[0]+t[0])/2,(n[1]+t[1])/2],d=this.transformInv_(u);this.addQuad_(t,e,h,u,s,r,c,d,l-1),this.addQuad_(u,h,i,n,d,c,o,a,l-1)}else{const h=[(t[0]+e[0])/2,(t[1]+e[1])/2],c=this.transformInv_(h),u=[(i[0]+n[0])/2,(i[1]+n[1])/2],d=this.transformInv_(u);this.addQuad_(t,h,u,n,s,c,d,a,l-1),this.addQuad_(h,e,i,u,c,r,o,d,l-1)}return}}if(d){if(!this.canWrapXInSource_)return;this.wrapsXInSource_=!0}0==(11&g)&&this.addTriangle_(t,i,n,s,o,a),0==(14&g)&&this.addTriangle_(t,i,e,s,o,r),g&&(0==(13&g)&&this.addTriangle_(e,n,t,r,a,s),0==(7&g)&&this.addTriangle_(e,n,i,r,a,o))}calculateSourceExtent(){const t=Bt();return this.triangles_.forEach((function(e,i,n){const s=e.source;Wt(t,s[0]),Wt(t,s[1]),Wt(t,s[2])})),t}getTriangles(){return this.triangles_}}var ju=Gu;const Fu=.5;class Bu extends Ba{constructor(t,e,i,n,s,r,o){let a=t.getExtent();a&&t.canWrapX()&&(a=a.slice(),a[0]=-1/0,a[2]=1/0);let l=e.getExtent();l&&e.canWrapX()&&(l=l.slice(),l[0]=-1/0,l[2]=1/0);const h=l?se(i,l):i,c=te(h),u=Lu(t,e,c,n),d=Fu,p=new ju(t,e,h,a,u*d,n),g=p.calculateSourceExtent(),f=he(g)?null:r(g,u,s),m=f?Da.IDLE:Da.EMPTY,y=f?f.getPixelRatio():1;super(i,n,y,m),this.targetProj_=e,this.maxSourceExtent_=a,this.triangulation_=p,this.targetResolution_=n,this.targetExtent_=i,this.sourceImage_=f,this.sourcePixelRatio_=y,this.interpolate_=o,this.canvas_=null,this.sourceListenerKey_=null}disposeInternal(){this.state==Da.LOADING&&this.unlistenSource_(),super.disposeInternal()}getImage(){return this.canvas_}getProjection(){return this.targetProj_}reproject_(){const t=this.sourceImage_.getState();if(t==Da.LOADED){const t=ae(this.targetExtent_)/this.targetResolution_,e=ne(this.targetExtent_)/this.targetResolution_;this.canvas_=Ou(t,e,this.sourcePixelRatio_,ku(this.sourceImage_.getResolution()),this.maxSourceExtent_,this.targetResolution_,this.targetExtent_,this.triangulation_,[{extent:this.sourceImage_.getExtent(),image:this.sourceImage_.getImage()}],0,void 0,this.interpolate_,!0)}this.state=t,this.changed()}load(){if(this.state==Da.IDLE){this.state=Da.LOADING,this.changed();const t=this.sourceImage_.getState();t==Da.LOADED||t==Da.ERROR?this.reproject_():(this.sourceListenerKey_=A(this.sourceImage_,h.CHANGE,t=>{const e=this.sourceImage_.getState();e!=Da.LOADED&&e!=Da.ERROR||(this.unlistenSource_(),this.reproject_())}),this.sourceImage_.load())}}unlistenSource_(){T(this.sourceListenerKey_),this.sourceListenerKey_=null}}var zu=Bu;class Vu extends j{constructor(t){var e;super(),this.projection=Ni(t.projection),this.attributions_=Zu(t.attributions),this.attributionsCollapsible_=null===(e=t.attributionsCollapsible)||void 0===e||e,this.loading=!1,this.state_=void 0!==t.state?t.state:"ready",this.wrapX_=void 0!==t.wrapX&&t.wrapX,this.interpolate_=!!t.interpolate,this.viewResolver=null,this.viewRejector=null;const i=this;this.viewPromise_=new Promise((function(t,e){i.viewResolver=t,i.viewRejector=e}))}getAttributions(){return this.attributions_}getAttributionsCollapsible(){return this.attributionsCollapsible_}getProjection(){return this.projection}getResolutions(t){return null}getView(){return this.viewPromise_}getState(){return this.state_}getWrapX(){return this.wrapX_}getInterpolate(){return this.interpolate_}refresh(){this.changed()}setAttributions(t){this.attributions_=Zu(t),this.changed()}setState(t){this.state_=t,this.changed()}}function Zu(t){return t?"function"===typeof t?t:(Array.isArray(t)||(t=[t]),e=>t):null}var Hu=Vu;const Xu=4,Ku={IMAGELOADSTART:"imageloadstart",IMAGELOADEND:"imageloadend",IMAGELOADERROR:"imageloaderror"};class Wu extends E{constructor(t,e){super(t),this.image=e}}class Yu extends Hu{constructor(t){super({attributions:t.attributions,projection:t.projection,state:t.state,interpolate:void 0===t.interpolate||t.interpolate}),this.on,this.once,this.un,this.loader=t.loader||null,this.resolutions_=void 0!==t.resolutions?t.resolutions:null,this.reprojectedImage_=null,this.reprojectedRevision_=0,this.image=null,this.wantedExtent_,this.wantedResolution_,this.static_=!!t.loader&&0===t.loader.length,this.wantedProjection_=null}getResolutions(){return this.resolutions_}setResolutions(t){this.resolutions_=t}findNearestResolution(t){const e=this.getResolutions();if(e){const i=p(e,t,0);t=e[i]}return t}getImage(t,e,i,n){const s=this.getProjection();if(!s||!n||Vi(s,n))return s&&(n=s),this.getImageInternal(t,e,i,n);if(this.reprojectedImage_){if(this.reprojectedRevision_==this.getRevision()&&Vi(this.reprojectedImage_.getProjection(),n)&&this.reprojectedImage_.getResolution()==e&&Xt(this.reprojectedImage_.getExtent(),t))return this.reprojectedImage_;this.reprojectedImage_.dispose(),this.reprojectedImage_=null}return this.reprojectedImage_=new zu(s,n,t,e,i,(t,e,i)=>this.getImageInternal(t,e,i,s),this.getInterpolate()),this.reprojectedRevision_=this.getRevision(),this.reprojectedImage_}getImageInternal(t,e,i,n){if(this.loader){const s=Ju(t,e,i,1),r=this.findNearestResolution(e);if(this.image&&(this.static_||this.wantedProjection_===n&&(this.wantedExtent_&&Gt(this.wantedExtent_,s)||Gt(this.image.getExtent(),s))&&(this.wantedResolution_&&ku(this.wantedResolution_)===r||ku(this.image.getResolution())===r)))return this.image;this.wantedProjection_=n,this.wantedExtent_=s,this.wantedResolution_=r,this.image=new Ba(s,r,i,this.loader),this.image.addEventListener(h.CHANGE,this.handleImageChange.bind(this))}return this.image}handleImageChange(t){const e=t.target;let i;switch(e.getState()){case Da.LOADING:this.loading=!0,i=Ku.IMAGELOADSTART;break;case Da.LOADED:this.loading=!1,i=Ku.IMAGELOADEND;break;case Da.ERROR:this.loading=!1,i=Ku.IMAGELOADERROR;break;default:return}this.hasListener(i)&&this.dispatchEvent(new Wu(i,e))}}function Uu(t,e){t.getImage().src=e}function Ju(t,e,i,n){const s=e/i,r=te(t),o=At(ae(t)/s,Xu),a=At(ne(t)/s,Xu),l=At((n-1)*o/2,Xu),h=o+2*l,c=At((n-1)*a/2,Xu),u=a+2*c;return ee(r,s,0,[h,u])}var $u=Yu;function qu(t){var e;const i=t.load||Fa,n=t.imageExtent,s=null!==(e=t.crossOrigin)&&void 0!==e?e:null;return()=>{const e=new Image;return e.crossOrigin=s,void 0!==t.referrerPolicy&&(e.referrerPolicy=t.referrerPolicy),i(e,t.url).then(t=>{const e=ae(n)/t.width,i=ne(n)/t.height,s=e!==i?[e,i]:i;return{image:t,extent:n,resolution:s,pixelRatio:1}})}}class Qu extends $u{constructor(t){const e=void 0!==t.crossOrigin?t.crossOrigin:null,i=void 0!==t.imageLoadFunction?t.imageLoadFunction:Uu;super({attributions:t.attributions,interpolate:t.interpolate,projection:Ni(t.projection)}),this.url_=t.url,this.imageExtent_=t.imageExtent,this.image=null,this.image=new Ba(this.imageExtent_,void 0,1,qu({url:t.url,imageExtent:t.imageExtent,crossOrigin:e,referrerPolicy:t.referrerPolicy,load:(t,e)=>(this.image.setImage(t),i(this.image,e),Fa(t))})),this.image.addEventListener(h.CHANGE,this.handleImageChange.bind(this))}getImageExtent(){return this.imageExtent_}getImageInternal(t,e,i,n){return le(t,this.image.getExtent())?this.image:null}getUrl(){return this.url_}}var td=Qu,ed={name:"RyStaticMap",components:{RyMapTool:Xh},props:{...new cu,...new uu,...new Lh},created(){},watch:{center(t){this.setCenter(t)},bbox(t){this.setFit(t)},maxZoom(t){this.lMap.setMaxZoom(t)},zoom(t){this.lMap.setZoom(t)},minZoom(t){this.lMap.setMinZoom(t)},bindMapClick(t){this.bindMapClick!==t&&(this.bindMapClick=t,this._bingMapEvent())},url(t){this.map&&(this.selectLayer(),this.setCenter())}},data(){return{lMap:new Th,drawPolygon:null,mapClick:null,map:null,moveend:null,lastX:0,lastY:0,layer:null}},methods:{getImageLayer(){return new Pu({source:new td({crossOrigin:"anonymous",imageSize:this.imageSize,imageExtent:this.imageExtent,url:this.url})})},getProjection(){return new Re({code:3875,extent:this.imageExtent,units:"m"})},getView(){return new bs({projection:"EPSG:3857",center:this.center,Projection:this.getProjection(),zoom:this.zoom,minZoom:this.minZoom,maxZoom:this.maxZoom})},async loadMap(t){this.layer=this.getImageLayer();const e=await this.lMap.initStaticMap(t,{view:this.getView(),layer:this.layer});this.map=e,this.$emit("load",{map:e,mapServices:this.lMap,ryMapTool:this.$refs.mapTool})},_bingMapEvent(){this.bindMapClick?this._mapClickOnce():this._mapClickOnce(!0)},setMaxZoom(t){this.lMap.setMaxZoom(t)},setMinZoom(t){this.lMap.setMinZoom(t)},setZoom(t){this.lMap.setZoom(t)},crossHairClick(t){this.$emit("crossHairClick",t)},setCenter(t){this.lMap.setCenter(t,15)},setFit(t){t.length&&this.map&&Object(Sh["fitNew"])(this.map,[t])},drawSuccess(t){this.$emit("drawSuccess",t)},drawError(t){this.$emit("drawError",t)},_mapClickOnce(t=!1){this.mapClick||(this.mapClick=t=>{if(t.dragging)return;const e=this.map.getEventPixel(t.originalEvent),i=this.map.hasFeatureAtPixel(e);if(i){const e=this.map.forEachFeatureAtPixel(t.pixel,t=>t),i=e.getId();if(void 0===i)return;this.$emit("mapClick",i)}}),t?(this.map.un("click",this.mapClick),this.mapClick=null):this.map.on("click",this.mapClick)},removeLayer(){this.map&&this.layer&&this.map.removeLayer(this.layer)},selectLayer(){this.removeLayer(),this.map&&(this.layer=this.getImageLayer(),this.map.addLayer(this.layer),this.$emit("selectMapEvent"))},loadDrawPolygonEvent(t){this.$emit("loadDrawPolygonEvent",t)}}},id=ed,nd=(i("1fe2"),Fh(id,lu,hu,!1,null,"45c25cdc",null)),sd=nd.exports;sd.install=t=>{t.install(sd.name,sd)};var rd=sd,od=function(){var t=this,e=t._self._c;return e("div",{staticClass:"map-box"},[e("div",{directives:[{name:"lmap",rawName:"v-lmap:loadMap",arg:"loadMap"}],staticClass:"map-style"}),t.lMap.map&&t.isRyMapTool?e("RyMapTool",{staticClass:"ry-mapts-tool",class:{left:!t.isRight,right:t.isRight},attrs:{lMap:t.lMap,isShowRangingTool:t.isShowRangingTool,initModifyPolygon:t.initModifyPolygon,isShowDrawTool:t.isShowDrawTool,isRight:t.isRight,isCrossHair:t.isCrossHair,hideAdd:t.hideAdd,hidePoint:t.hidePoint,hideCancel:t.hideCancel,hideDelete:t.hideDelete,hideSave:t.hideSave,hideLine:t.hideLine,hideArea:t.hideArea,isSwitchMap:t.isSwitchMap,isSwitchMapRight:t.isSwitchMapRight,gpsType:t.lastMapType},on:{crossHairClick:function(e){return t.crossHairClick(e)},loadDrawPolygonEvent:function(e){return t.loadDrawPolygonEvent(e)},success:function(e){return t.drawSuccess(e)},error:function(e){return t.drawError(e)}}},[[t._t("maptool")]],2):t._e(),t.map?[t._t("polygon",null,{mapDto:{map:t.map,lMap:t.lMap}}),t._t("marker",null,{mapDto:{map:t.map,lMap:t.lMap}})]:t._e()],2)},ad=[];class ld{constructor(){ks(this,"isShowSwitchMap",{type:Boolean,default:!0}),ks(this,"urls",{type:Array,default:()=>[]}),ks(this,"boundaryModel",{type:Object,default:()=>null}),ks(this,"slicingZoom",{type:Number,default:13}),this.mapType={type:Number,default:0},this.layerType={type:Number,default:2},this.isSwitchMapTool={type:Boolean,default:!0},this.isRyMapTool={type:Boolean,default:!1},this.isRight={type:Boolean,default:!1},this.bindMapClick={type:Boolean,default:!1},this.bindMapMoveend={type:Boolean,default:!1},this.isDisabledSwitchMapTabEvent={type:Boolean,default:!1},this.initModifyPolygon={type:[String,Object],default:()=>null},this.m={type:Number,default:()=>3e3},this.switchMapDefaultTypeOrLayer={type:Array,default:()=>null},this.mapTypeAndLayer={type:Array,default:()=>[{id:0,icon:"el-icon--tianditu",activeIcon:"el-icon--tianditu-copy",name:"天地图",layer:[{id:0,name:"地图"},{id:1,name:"卫星"},{id:2,name:"卫星组合"}]},{id:1,icon:"el-icon--gaode",activeIcon:"el-icon--gaode-copy",name:"高德地图",layer:[{id:0,name:"地图"},{id:1,name:"卫星"},{id:2,name:"卫星组合"}]},{id:2,icon:"el-icon--Bing",activeIcon:"el-icon--Bing-copy",name:"Bing地图",layer:[{id:1,name:"卫星"},{id:2,name:"卫星组合"}]}]}}}var hd={name:"RyOfflineMap",components:{RyMapTool:Xh},props:{...new ld,...new Ih,...new Lh},created(){},watch:{center(t){this.setCenter(t)},bbox(t){this.setFit(t)},maxZoom(t){this.lMap.setMaxZoom(t)},zoom(t){this.lMap.setZoom(t)},minZoom(t){this.lMap.setMinZoom(t)},bindMapClick(t){this.bindMapClick!==t&&(this.bindMapClick=t,this._bingMapEvent())},bindMapMoveend(t){this.bindMapMoveend!==t&&(this.bindMapMoveend=t,this._bingMapMoveend())},m(t){this.m=t},boundaryModel(t){this.map}},data(){return{lMap:new Th,drawPolygon:null,mapClick:null,map:null,moveend:null,lastX:0,lastY:0,lastMapType:0,isFirstLoad:!1}},methods:{_setMaxZoom(t,e){this.setMaxZoom(18)},async loadMap(t){this.lMap.initOfflineMap(100,{el:t,urls:this.urls,callback:({map:t,lMap:e})=>{e.setView(this.center,this.bbox);const i=e.getView();i.fit(this.bbox,[50,50,50,50]),i.setMaxZoom(this.minZoom),i.setMaxZoom(this.maxZoom),this.map=t;const{geo:n,width:s,color:r,lineDash:o}=this.boundaryModel;e.SlicingZoom=this.slicingZoom,e.initMapMaskEvent(t.getLayers(),n,{width:s,color:r,lineDash:o}),this._bingMapEvent(),this._bingMapMoveend(),this.$emit("load",{map:t,mapServices:this.lMap,ryMapTool:this.$refs.mapTool})}})},_bingMapEvent(){this.bindMapClick?this._mapClickOnce():this._mapClickOnce(!0)},_bingMapMoveend(){this.bindMapMoveend?this._mapMoveend():this._mapMoveend(!0)},getViewOptions(){return{projection:this.projection,center:this.center,zoom:this.zoom,minZoom:this.minZoom,maxZoom:this.maxZoom}},setMaxZoom(t){this.lMap.setMaxZoom(t)},setMinZoom(t){this.lMap.setMinZoom(t)},setZoom(t){this.lMap.setZoom(t)},crossHairClick(t){this.$emit("crossHairClick",t)},setCenter(t){this.lMap.setCenter(t,15)},setFit(t){t.length&&this.map&&Object(Sh["fitNew"])(this.map,[t])},drawSuccess(t){this.$emit("drawSuccess",t)},drawError(t){this.$emit("drawError",t)},_mapClickOnce(t=!1){this.mapClick||(this.mapClick=t=>{if(t.dragging)return;const e=this.map.getEventPixel(t.originalEvent),i=this.map.hasFeatureAtPixel(e);if(i){const e=this.map.forEachFeatureAtPixel(t.pixel,t=>t),i=e.getId();if(void 0===i)return;this.$emit("mapClick",i)}}),t?(this.map.un("click",this.mapClick),this.mapClick=null):this.map.on("click",this.mapClick)},_mapMoveend(t=!1){this.moveend=t=>{const[e,i]=this.lMap.getCenter();let n=0;if(this.lastX!==e&&this.lastY!==i)return n=Object(Sh["caculateLL"])(this.lastY,this.lastX,i,e),this.$emit("mapMoveend",{m:n,oversteSetValue:n>=this.m,x:e,y:i,e:t}),void(n>=this.m&&(this.lastX=e,this.lastY=i));this.$emit("mapMoveend",{m:n,oversteSetValue:!1,x:e,y:i,e:t})},t?this.map.un("moveend",this.moveend):this.map.on("moveend",this.moveend)},loadDrawPolygonEvent(t){this.$emit("loadDrawPolygonEvent",t)}}},cd=hd,ud=(i("bf6e"),Fh(cd,od,ad,!1,null,"4913cecd",null)),dd=ud.exports;dd.install=t=>{t.install(RyMap.name,dd)};var pd=dd,gd=function(){var t=this,e=t._self._c;return e("div")},fd=[];class md extends lc{constructor(...t){super(...t),ks(this,"modelArr",{type:Array,default:()=>[]}),ks(this,"insert",{type:Object,default:()=>null}),ks(this,"inserts",{type:Array,default:()=>[]}),ks(this,"isShowAll",{type:Boolean,default:!0}),ks(this,"clear",{type:Boolean,default:!1}),ks(this,"isFit",{type:Boolean,default:!0}),ks(this,"setColor",{type:Object,default:()=>null}),ks(this,"time",{type:Number,default:100})}}var yd={name:"RyKMLs",props:{...new md},data(){return{bbox:[],bboxMap:new Map,bboxGCJ02:[],bboxMapGCJ02:new Map,kmlMap:new Map,isCreate:!0,lastType:-1,urls:new Map,gcj02Urls:new Map,lastColor:null,lastId:0}},watch:{modelArr(t){this._remove(),t.length&&(this.modelArr=t,this.init(t))},gpsType(t){this.lastType!=t&&(this.gpsType=t,this.lastType=t,this.selectGPSAll(this.gpsType))},async insert(t){this.isFit&&this.$emit("loadingEvent",!0),await this._insert(t),this.isFit&&(this.setFit(),this.$emit("loadingEvent",!1))},inserts(t){this._inserts(t)},clear(t){t&&this._remove()},isShowAll(t){t?this.showAll():this.hideAll()},setColor(t){t&&this._setColor(t)}},async created(){this.lastType=this.gpsType,this.modelArr.length?await this.init(this.modelArr):this.inserts.length&&await this.init(this.inserts)},methods:{async init(t){if(this.isFit&&this.$emit("loadingEvent",!0),t&&t.length){for(let e=0;e<t.length;e++)await this._insert(t[e]);this.isFit&&(this.setFit(),this.$emit("loadingEvent",!1))}},async _inserts(t){this.lastType=this.gpsType,this.isFit&&this.$emit("loadingEvent",!0);for(let e=0;e<t.length;e++)await this._insert(t[e]);this.isFit&&(this.setFit(),this.$emit("loadingEvent",!1))},async _insert(t){const{id:e,url:i,bbox:n,isShow:s,stroke:r,fillColor:o,zIndex:a,width:l,extractStyles:h,gcj02Url:c}=t;if(!this.kmlMap.has(e)){const u=new Sh["LKML"]({id:e,url:1==this.gpsType?c:i,bbox:n,isShow:s,stroke:r,fillColor:o,zIndex:a,width:l},this.map,h);await u.init(this.time),e&&u.setId(e),this.kmlMap.set(e,u),this.urls.set(e,i),c&&this.gcj02Urls.set(e,c),this.setBBOXArr(t.id,u.getExtent())}},_setZoom(){const t=this.map.getView().getZoom();this.map.getView().setZoom(t+1e-5),this.map.getView().setZoom(t-1e-4)},setBBOXArr(t,e){if(this.bboxMap.has(t)||(this.bbox.push(e),this.bboxMap.set(t,e)),!this.bboxMapGCJ02.has(t)){const i=this.convertBBoxGCJ02(e);this.bboxGCJ02.push(i),this.bboxMapGCJ02.set(t,i)}},setUrl(t,e){this.kmlMap.has(t)&&this.kmlMap.get(t).setUrl(e)},setFit(){this.bbox.length&&this.map&&(this.bbox.length>1?Object(Sh["fitNew"])(this.map,1==this.gpsType?this.bboxGCJ02:this.bbox):this.setFitFist(1==this.gpsType?this.bboxGCJ02[0]:this.bbox[0]))},setFitFist(t){const e=[t[0],t[3],t[2],t[1]],i=[t[2],t[1],t[0],t[3]];Object(Sh["fitNew"])(this.map,[e,i])},convertBBoxGCJ02(t){const e=[],{lat:i,lon:n}=Sh["GPS"].gcj_encrypt(t[0],t[1]),{lon:s,lat:r}=Sh["GPS"].gcj_encrypt(t[2],t[3]);return e.push(n),e.push(i),e.push(s),e.push(r),e},_remove(){this.kmlMap.forEach(t=>{t.removeKML(),t=null}),this.kmlMap.clear(),this.bboxMap.clear(),this.bbox=[],this.bboxGCJ02=[],this.bboxMapGCJ02.clear(),this.urls.clear(),this.gcj02Urls.clear(),this.lastColor=null,this.lastId=0},selectGPSAll(t){const e=1==t?this.gcj02Urls:this.urls;e.forEach((t,e)=>{this.setUrl(e,t)})},_setColor(t){const{color:e,id:i}=t;if(this.kmlMap.has(i)){const t=this.kmlMap.get(i);t.setPolygonColor([e,e])}this._setZoom()},setCenter(t){if(this.bboxMapGCJ02.has(t)){const e=1==this.gpsType?this.bboxMapGCJ02.get(t):this.bboxMap.get(t);this.setFitFist(e)}},showAll(){this.kmlMap.forEach(t=>t.show()),this.restFit&&this._restFit()},hideAll(){this.kmlMap.forEach(t=>t.hide())}}},_d=yd,vd=Fh(_d,gd,fd,!1,null,null,null),wd=vd.exports;wd.install=t=>{t.install(wd.name,wd)};var xd=wd,bd=function(){var t=this,e=t._self._c;return e("div")},Md=[];class Ed extends lc{constructor(...t){super(...t),ks(this,"model",{type:Object,default:()=>null}),ks(this,"isShow",{type:Boolean,default:!0}),ks(this,"clear",{type:Boolean,default:!1}),ks(this,"isFit",{type:Boolean,default:!0}),ks(this,"time",{type:Number,default:100})}}var Cd={name:"RyKML",props:{...new Ed},data(){return{bbox:[],bboxGCJ02:[],kml:null,lastType:-1,url:null,gcj02Url:null}},watch:{model(t){this._remove(),t&&(this.model=t,this.init(t))},clear(t){t&&this._remove()},isShow(t){t?this.showAll():this.hideAll()},gpsType(t){this.lastType!=t&&(this.gpsType=t,this.lastType=t,this.selectGPSAll(this.gpsType))}},created(){this.lastType=this.gpsType,this.model&&this.init(this.model)},methods:{async init(t){this.isFit&&this.$emit("loadingEvent",!0),await this._insert(t),this.isFit&&(this.setFit(),this.$emit("loadingEvent",!1))},async _insert(t){const{id:e,url:i,bbox:n,is:s,stroke:r,fillColor:o,zIndex:a,width:l,extractStyles:h,gcj02Url:c}=t,u=new Sh["LKML"]({id:e,url:1==this.gpsType?c:i,bbox:n,is:s,stroke:r,fillColor:o,zIndex:a,width:l},this.map,h);this.kml=u,this.url=i,this.gcj02Url=c,await u.init(this.time),e&&u.setId(e),this.setBBOXArr(u.getExtent())},setBBOXArr(t){this.bbox=t;const e=this.convertBBoxGCJ02(t);this.bboxGCJ02=e},setUrl(t){this.kml&&this.kml.setUrl(t)},setFit(){this.bbox.length&&this.map&&this.setFitFist(1==this.gpsType?this.bboxGCJ02:this.bbox)},setFitFist(t){const e=[t[0],t[3],t[2],t[1]],i=[t[2],t[1],t[0],t[3]];Object(Sh["fitNew"])(this.map,[e,i])},convertBBoxGCJ02(t){const e=[],{lat:i,lon:n}=Sh["GPS"].gcj_encrypt(t[0],t[1]),{lon:s,lat:r}=Sh["GPS"].gcj_encrypt(t[2],t[3]);return e.push(n),e.push(i),e.push(s),e.push(r),e},_remove(){this.kml&&(this.kml.removeKML(),this.bbox=[],this.bboxGCJ02=[],this.url=null,this.gcj02Url=null)},selectGPSAll(t){const e=1==t?this.gcj02Url:this.url;this.setUrl(e)},show(){this.kml&&(this.kml.show(),this.isFit&&setTimeout(()=>{this.setFit()},50))},hide(){this.kml&&this.kml.hide()}}},Pd=Cd,Ad=Fh(Pd,bd,Md,!1,null,null,null),Sd=Ad.exports;Sd.install=t=>{t.install(Sd.name,Sd)};var Td=Sd,Rd=function(){var t=this,e=t._self._c;return e("div")},Id=[];class Ld extends lc{constructor(...t){super(...t),ks(this,"modelArr",{type:Array,default:()=>[]}),ks(this,"insert",{type:Object,default:()=>null}),ks(this,"inserts",{type:Array,default:()=>[]}),ks(this,"isShowAll",{type:Boolean,default:!0}),ks(this,"isShow",{type:Object,default:()=>null}),ks(this,"clear",{type:Boolean,default:!1}),ks(this,"isFit",{type:Boolean,default:!0})}}var Od={name:"RyStaticLayers",props:{...new Ld},data(){return{bbox:[],bboxMap:new Map,bboxGCJ02:[],bboxMapGCJ02:new Map,staticMap:new Map,isCreate:!0,lastType:-1}},watch:{modelArr(t){this._remove(),t.length&&(this.modelArr=t,this.init(t))},gpsType(t){this.lastType!=t&&(this.gpsType=t,this.lastType=t,this.selectGPSAll(this.gpsType))},insert(t){this.insert=t,this._insert(t),this.isFit&&setTimeout(()=>{this.setFit()},50)},inserts(t){this.inserts=t,this._inserts(t)},clear(t){t&&this._remove()},isShowAll(t){t?this.showAll():this.hideAll()},isShow(t){t&&this._isShow(t)}},created(){this.lastType=this.gpsType,this.init(this.modelArr)},methods:{init(t){t&&t.length&&(t.forEach(t=>{this._insert(t)}),this.isFit&&setTimeout(()=>{this.setFit()},50))},_inserts(t){this.lastType=this.gpsType,t.forEach(t=>{this._insert(t,!1)}),this.isFit&&setTimeout(()=>{this.setFit()},50)},_insert(t){const{id:e,url:i,bbox:n,zIndex:s,projection:r}=t;if(!this.staticMap.has(e)){const t=new Sh["staticImage"]({id:e,url:i,imageExtent:n,zIndex:s,type:this.gpsType,projection:r},this.map);this.staticMap.set(e,t)}this.setBBOXArr(t.id,n)},setBBOXArr(t,e){if(this.bboxMap.has(t)||(this.bbox.push(e),this.bboxMap.set(t,e)),!this.bboxMapGCJ02.has(t)){const i=this.convertBBoxGCJ02(e);this.bboxGCJ02.push(i),this.bboxMapGCJ02.set(t,i)}},setFit(){this.bbox.length&&this.map&&(this.bbox.length>1?Object(Sh["fitNew"])(this.map,1==this.gpsType?this.bboxGCJ02:this.bbox):this.setFitFist(1==this.gpsType?this.bboxGCJ02[0]:this.bbox[0]))},setFitFist(t){const e=[t[0],t[3],t[2],t[1]],i=[t[2],t[1],t[0],t[3]];Object(Sh["fitNew"])(this.map,[e,i])},convertBBoxGCJ02(t){const e=[],{lat:i,lon:n}=Sh["GPS"].gcj_encrypt(t[0],t[1]),{lon:s,lat:r}=Sh["GPS"].gcj_encrypt(t[2],t[3]);return e.push(n),e.push(i),e.push(s),e.push(r),e},_remove(){this.staticMap.forEach(t=>{t.removeImageLayer(),t=null}),this.staticMap.clear(),this.bboxMap.clear(),this.bbox=[],this.bboxGCJ02=[],this.bboxMapGCJ02.clear()},selectGPSAll(t){this.staticMap.forEach(e=>{e.selectGPS(t)})},showAll(){this.staticMap.forEach(t=>t.show()),this.restFit&&this._restFit()},hideAll(){this.staticMap.forEach(t=>t.hide())},_isShow(t){const e=t.id;if(this.staticMap.has(e)){const i=this.staticMap.get(e);if(t.show)return void i.show();i.hide()}}}},kd=Od,Dd=Fh(kd,Rd,Id,!1,null,null,null),Nd=Dd.exports;Nd.install=t=>{t.install(Nd.name,Nd)};var Gd=Nd,jd=function(){var t=this,e=t._self._c;return e("div")},Fd=[];class Bd extends lc{constructor(...t){super(...t),ks(this,"model",{type:Object,default:()=>null}),ks(this,"isShow",{type:Boolean,default:!0}),ks(this,"clear",{type:Boolean,default:!1}),ks(this,"isFit",{type:Boolean,default:!0})}}var zd={name:"RyStaticLayer",props:{...new Bd},data(){return{bbox:[],bboxGCJ02:[],staticImg:null,lastType:-1}},watch:{model(t){this._remove(),t&&this.init(t)},gpsType(t){this.lastType!=t&&(this.gpsType=t,this.lastType=t,this.selectGPSAll(this.gpsType))},clear(t){t&&this._remove()},isShow(t){this._isShow(t)}},created(){this.lastType=this.gpsType,this.init(this.model)},methods:{init(t){t&&(this._insert(t),this.isFit&&setTimeout(()=>{this.setFit()},50))},_insert(t){const{id:e,url:i,bbox:n,zIndex:s,projection:r}=t;let o="EPSG:4326";r instanceof Object&&(o=r);const a=new Sh["staticImage"]({id:e,url:i,imageExtent:n,zIndex:s,type:this.gpsType,projection:o},this.map);this.staticImg=a,this.setBBOXArr(n)},setBBOXArr(t){this.bbox.push(t);const e=this.convertBBoxGCJ02(t);this.bboxGCJ02.push(e)},setFit(){this.bbox.length&&this.map&&(this.bbox.length>1?Object(Sh["fitNew"])(this.map,1==this.gpsType?this.bboxGCJ02:this.bbox):this.setFitFist(1==this.gpsType?this.bboxGCJ02[0]:this.bbox[0]))},setFitFist(t){const e=[t[0],t[3],t[2],t[1]],i=[t[2],t[1],t[0],t[3]];Object(Sh["fitNew"])(this.map,[e,i])},convertBBoxGCJ02(t){const e=[],{lat:i,lon:n}=Sh["GPS"].gcj_encrypt(t[0],t[1]),{lon:s,lat:r}=Sh["GPS"].gcj_encrypt(t[2],t[3]);return e.push(n),e.push(i),e.push(s),e.push(r),e},_remove(){this.staticImg&&this.staticImg.removeImageLayer(),this.staticImg=null,this.bbox=[],this.bboxGCJ02=[]},selectGPSAll(t){this.staticImg&&this.staticImg.selectGPS(t)},_isShow(t){if(this.staticImg){const e=this.staticImg;if(t)return void e.show();e.hide()}}}},Vd=zd,Zd=Fh(Vd,jd,Fd,!1,null,null,null),Hd=Zd.exports;Hd.install=t=>{t.install(Hd.name,Hd)};var Xd=Hd,Kd=function(){var t=this,e=t._self._c;return e("div")},Wd=[];class Yd extends lc{constructor(...t){super(...t),ks(this,"modelArr",{type:Array,default:()=>[]}),ks(this,"insert",{type:Object,default:()=>null}),ks(this,"inserts",{type:Array,default:()=>[]}),ks(this,"isShowAll",{type:Boolean,default:!0}),ks(this,"isShow",{type:Object,default:()=>null}),ks(this,"clear",{type:Boolean,default:!1})}}var Ud={name:"RyWMSs",props:{...new Yd},data(){return{wmsMap:new Map,isCreate:!0}},watch:{modelArr(t){this._remove()},insert(t){this._insert(t)},inserts(t){this._inserts(t)},clear(t){t&&this._remove()},isShowAll(t){t?this.showAll():this.hideAll()},isShow(t){t&&this._isShow(t)}},created(){this.modelArr.length?this.init(this.modelArr):this.inserts.length&&this.init(this.inserts)},methods:{init(t){t&&t.length&&t.forEach(t=>{this._insert(t)})},_inserts(t){t.forEach(t=>{this._insert(t,!1)})},_insert(t){if(!this.wmsMap.has(t.id)){const e=new Sh["LWMS"]({map:this.map,...t});this.wmsMap.set(t.id,e)}},_remove(){this.wmsMap.forEach(t=>t.removeLayer())},showAll(){this.wmsMap.forEach(t=>t.show())},hideAll(){this.wmsMap.forEach(t=>t.hide())},_isShow(t){const e=t.id;if(this.wmsMap.has(e)){const i=this.wmsMap.get(e);if(t.isShow)return void i.show();i.hide()}}}},Jd=Ud,$d=Fh(Jd,Kd,Wd,!1,null,null,null),qd=$d.exports;qd.install=t=>{t.install(qd.name,qd)};var Qd=qd,tp=function(){var t=this,e=t._self._c;return e("div")},ep=[];class ip extends lc{constructor(...t){super(...t),ks(this,"modelArr",{type:Array,default:()=>[]}),ks(this,"insert",{type:Object,default:()=>null}),ks(this,"inserts",{type:Array,default:()=>[]}),ks(this,"isShowAll",{type:Boolean,default:!0}),ks(this,"clear",{type:Boolean,default:!1}),ks(this,"isShow",{type:Object,default:()=>null})}}var np={name:"RyWMTSs",props:{...new ip},data(){return{wmtsMap:new Map,isCreate:!0}},watch:{modelArr(t){this._remove()},insert(t){this._insert(t)},inserts(t){this._inserts(t)},clear(t){t&&this._remove()},isShowAll(t){t?this.showAll():this.hideAll()},isShow(t){t&&this._isShow(t)}},created(){this.modelArr.length?this.init(this.modelArr):this.inserts.length&&this.init(this.inserts)},methods:{init(t){t&&t.length&&t.forEach(t=>{this._insert(t)})},_inserts(t){t.forEach(t=>{this._insert(t,!1)})},_insert(t){if(!this.wmtsMap.has(t.id)){console.log(t);const e=new Sh["LWMTS"](t.opt,t.params);this.wmtsMap.set(t.id,e)}},_remove(){this.wmtsMap.forEach(t=>t.removeLayer())},showAll(){this.wmtsMap.forEach(t=>t.show())},hideAll(){this.wmtsMap.forEach(t=>t.hide())},_isShow(t){const e=t.id;if(this.wmtsMap.has(e)){const i=this.wmtsMap.get(e);if(t.isShow)return void i.show();i.hide()}}}},sp=np,rp=Fh(sp,tp,ep,!1,null,null,null),op=rp.exports;op.install=t=>{t.install(op.name,op)};var ap=op;const lp=[nc,sc,rc,gc,bc,Rc,Xc,Gc,qc,au,rd,pd,xd,Td,Gd,Xd,Qd,ap],hp=(t,e)=>{lp.forEach(e=>{t.component(e.name,e)})};"undefined"!==typeof window&&window.Vue&&hp(window.Vue);var cp={install:hp};e["default"]=cp},fc6a:function(t,e,i){var n=i("44ad"),s=i("1d80");t.exports=function(t){return n(s(t))}},fdbf:function(t,e,i){var n=i("4930");t.exports=n&&!Symbol.sham&&"symbol"==typeof Symbol.iterator},fffc:function(t,e,i){"use strict";var n=i("23e7"),s=i("2266"),r=i("1c0b"),o=i("825a");n({target:"Iterator",proto:!0,real:!0},{find:function(t){return o(this),r(t),s(this,(function(e,i){if(t(e))return i(e)}),{IS_ITERATOR:!0,INTERRUPTED:!0}).result}})}})}));
1
+ (function(t,e){"object"===typeof exports&&"object"===typeof module?module.exports=e(require("ry-map")):"function"===typeof define&&define.amd?define(["ry-map"],e):"object"===typeof exports?exports["ryui"]=e(require("ry-map")):t["ryui"]=e(t["ry-map"])})("undefined"!==typeof self?self:this,(function(t){return function(t){var e={};function n(i){if(e[i])return e[i].exports;var o=e[i]={i:i,l:!1,exports:{}};return t[i].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=t,n.c=e,n.d=function(t,e,i){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:i})},n.r=function(t){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"===typeof t&&t&&t.__esModule)return t;var i=Object.create(null);if(n.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)n.d(i,o,function(e){return t[e]}.bind(null,o));return i},n.n=function(t){var e=t&&t.__esModule?function(){return t["default"]}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s="fb15")}({"00ee":function(t,e,n){var i=n("b622"),o=i("toStringTag"),r={};r[o]="z",t.exports="[object z]"===String(r)},"0366":function(t,e,n){var i=n("1c0b");t.exports=function(t,e,n){if(i(t),void 0===e)return t;switch(n){case 0:return function(){return t.call(e)};case 1:return function(n){return t.call(e,n)};case 2:return function(n,i){return t.call(e,n,i)};case 3:return function(n,i,o){return t.call(e,n,i,o)}}return function(){return t.apply(e,arguments)}}},"0643":function(t,e,n){"use strict";var i=n("23e7"),o=n("da84"),r=n("19aa"),s=n("9112"),a=n("d039"),l=n("5135"),h=n("b622"),c=n("ae93").IteratorPrototype,u=n("c430"),p=h("iterator"),d=h("toStringTag"),f=o.Iterator,y=u||"function"!=typeof f||f.prototype!==c||!a((function(){f({})})),g=function(){r(this,g)};u&&(c={},s(c,p,(function(){return this}))),l(c,d)||s(c,d,"Iterator"),!y&&l(c,"constructor")&&c.constructor!==Object||s(c,"constructor",g),g.prototype=c,i({global:!0,forced:y},{Iterator:g})},"06cf":function(t,e,n){var i=n("83ab"),o=n("d1e7"),r=n("5c6c"),s=n("fc6a"),a=n("c04e"),l=n("5135"),h=n("0cfb"),c=Object.getOwnPropertyDescriptor;e.f=i?c:function(t,e){if(t=s(t),e=a(e,!0),h)try{return c(t,e)}catch(n){}if(l(t,e))return r(!o.f.call(t,e),t[e])}},"0cfb":function(t,e,n){var i=n("83ab"),o=n("d039"),r=n("cc12");t.exports=!i&&!o((function(){return 7!=Object.defineProperty(r("div"),"a",{get:function(){return 7}}).a}))},"169d":function(e,n){e.exports=t},"174e":function(t,e,n){},"19aa":function(t,e){t.exports=function(t,e,n){if(!(t instanceof e))throw TypeError("Incorrect "+(n?n+" ":"")+"invocation");return t}},"1be4":function(t,e,n){var i=n("d066");t.exports=i("document","documentElement")},"1c0b":function(t,e){t.exports=function(t){if("function"!=typeof t)throw TypeError(String(t)+" is not a function");return t}},"1d80":function(t,e){t.exports=function(t){if(void 0==t)throw TypeError("Can't call method on "+t);return t}},2266:function(t,e,n){var i=n("825a"),o=n("e95a"),r=n("50c4"),s=n("0366"),a=n("35a1"),l=n("2a62"),h=function(t,e){this.stopped=t,this.result=e};t.exports=function(t,e,n){var c,u,p,d,f,y,g,v=n&&n.that,m=!(!n||!n.AS_ENTRIES),_=!(!n||!n.IS_ITERATOR),b=!(!n||!n.INTERRUPTED),w=s(e,v,1+m+b),C=function(t){return c&&l(c),new h(!0,t)},x=function(t){return m?(i(t),b?w(t[0],t[1],C):w(t[0],t[1])):b?w(t,C):w(t)};if(_)c=t;else{if(u=a(t),"function"!=typeof u)throw TypeError("Target is not iterable");if(o(u)){for(p=0,d=r(t.length);d>p;p++)if(f=x(t[p]),f&&f instanceof h)return f;return new h(!1)}c=u.call(t)}y=c.next;while(!(g=y.call(c)).done){try{f=x(g.value)}catch(E){throw l(c),E}if("object"==typeof f&&f&&f instanceof h)return f}return new h(!1)}},2382:function(t,e,n){"use strict";var i=n("23e7"),o=n("1c0b"),r=n("825a"),s=n("c5cc"),a=n("9bdd"),l=s((function(t){var e,n,i,o=this.iterator,s=this.filterer,l=this.next;while(1){if(e=r(l.call(o,t)),n=this.done=!!e.done,n)return;if(i=e.value,a(o,s,i))return i}}));i({target:"Iterator",proto:!0,real:!0},{filter:function(t){return new l({iterator:r(this),filterer:o(t)})}})},"23cb":function(t,e,n){var i=n("a691"),o=Math.max,r=Math.min;t.exports=function(t,e){var n=i(t);return n<0?o(n+e,0):r(n,e)}},"23e7":function(t,e,n){var i=n("da84"),o=n("06cf").f,r=n("9112"),s=n("6eeb"),a=n("ce4e"),l=n("e893"),h=n("94ca");t.exports=function(t,e){var n,c,u,p,d,f,y=t.target,g=t.global,v=t.stat;if(c=g?i:v?i[y]||a(y,{}):(i[y]||{}).prototype,c)for(u in e){if(d=e[u],t.noTargetGet?(f=o(c,u),p=f&&f.value):p=c[u],n=h(g?u:y+(v?".":"#")+u,t.forced),!n&&void 0!==p){if(typeof d===typeof p)continue;l(d,p)}(t.sham||p&&p.sham)&&r(d,"sham",!0),s(c,u,d,t)}}},"241c":function(t,e,n){var i=n("ca84"),o=n("7839"),r=o.concat("length","prototype");e.f=Object.getOwnPropertyNames||function(t){return i(t,r)}},"2a62":function(t,e,n){var i=n("825a");t.exports=function(t){var e=t["return"];if(void 0!==e)return i(e.call(t)).value}},"2d00":function(t,e,n){var i,o,r=n("da84"),s=n("342f"),a=r.process,l=a&&a.versions,h=l&&l.v8;h?(i=h.split("."),o=i[0]<4?1:i[0]+i[1]):s&&(i=s.match(/Edge\/(\d+)/),(!i||i[1]>=74)&&(i=s.match(/Chrome\/(\d+)/),i&&(o=i[1]))),t.exports=o&&+o},"342f":function(t,e,n){var i=n("d066");t.exports=i("navigator","userAgent")||""},"35a1":function(t,e,n){var i=n("f5df"),o=n("3f8c"),r=n("b622"),s=r("iterator");t.exports=function(t){if(void 0!=t)return t[s]||t["@@iterator"]||o[i(t)]}},"37e8":function(t,e,n){var i=n("83ab"),o=n("9bf2"),r=n("825a"),s=n("df75");t.exports=i?Object.defineProperties:function(t,e){r(t);var n,i=s(e),a=i.length,l=0;while(a>l)o.f(t,n=i[l++],e[n]);return t}},"3e8f":function(t,e){},"3f8c":function(t,e){t.exports={}},"428f":function(t,e,n){var i=n("da84");t.exports=i},"44ad":function(t,e,n){var i=n("d039"),o=n("c6b6"),r="".split;t.exports=i((function(){return!Object("z").propertyIsEnumerable(0)}))?function(t){return"String"==o(t)?r.call(t,""):Object(t)}:Object},"44d2":function(t,e,n){var i=n("b622"),o=n("7c73"),r=n("9bf2"),s=i("unscopables"),a=Array.prototype;void 0==a[s]&&r.f(a,s,{configurable:!0,value:o(null)}),t.exports=function(t){a[s][t]=!0}},4930:function(t,e,n){var i=n("2d00"),o=n("d039");t.exports=!!Object.getOwnPropertySymbols&&!o((function(){var t=Symbol();return!String(t)||!(Object(t)instanceof Symbol)||!Symbol.sham&&i&&i<41}))},"4d64":function(t,e,n){var i=n("fc6a"),o=n("50c4"),r=n("23cb"),s=function(t){return function(e,n,s){var a,l=i(e),h=o(l.length),c=r(s,h);if(t&&n!=n){while(h>c)if(a=l[c++],a!=a)return!0}else for(;h>c;c++)if((t||c in l)&&l[c]===n)return t||c||0;return!t&&-1}};t.exports={includes:s(!0),indexOf:s(!1)}},"4e3e":function(t,e,n){"use strict";var i=n("23e7"),o=n("2266"),r=n("825a");i({target:"Iterator",proto:!0,real:!0},{forEach:function(t){o(r(this),t,{IS_ITERATOR:!0})}})},"4ea7":function(t,e,n){"use strict";n("de76")},"50c4":function(t,e,n){var i=n("a691"),o=Math.min;t.exports=function(t){return t>0?o(i(t),9007199254740991):0}},5135:function(t,e,n){var i=n("7b0b"),o={}.hasOwnProperty;t.exports=Object.hasOwn||function(t,e){return o.call(i(t),e)}},5692:function(t,e,n){var i=n("c430"),o=n("c6cd");(t.exports=function(t,e){return o[t]||(o[t]=void 0!==e?e:{})})("versions",[]).push({version:"3.15.2",mode:i?"pure":"global",copyright:"© 2021 Denis Pushkarev (zloirock.ru)"})},"56ef":function(t,e,n){var i=n("d066"),o=n("241c"),r=n("7418"),s=n("825a");t.exports=i("Reflect","ownKeys")||function(t){var e=o.f(s(t)),n=r.f;return n?e.concat(n(t)):e}},"5bc0":function(t,e,n){},"5c6c":function(t,e){t.exports=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}}},"69f3":function(t,e,n){var i,o,r,s=n("7f9a"),a=n("da84"),l=n("861d"),h=n("9112"),c=n("5135"),u=n("c6cd"),p=n("f772"),d=n("d012"),f="Object already initialized",y=a.WeakMap,g=function(t){return r(t)?o(t):i(t,{})},v=function(t){return function(e){var n;if(!l(e)||(n=o(e)).type!==t)throw TypeError("Incompatible receiver, "+t+" required");return n}};if(s||u.state){var m=u.state||(u.state=new y),_=m.get,b=m.has,w=m.set;i=function(t,e){if(b.call(m,t))throw new TypeError(f);return e.facade=t,w.call(m,t,e),e},o=function(t){return _.call(m,t)||{}},r=function(t){return b.call(m,t)}}else{var C=p("state");d[C]=!0,i=function(t,e){if(c(t,C))throw new TypeError(f);return e.facade=t,h(t,C,e),e},o=function(t){return c(t,C)?t[C]:{}},r=function(t){return c(t,C)}}t.exports={set:i,get:o,has:r,enforce:g,getterFor:v}},"6eeb":function(t,e,n){var i=n("da84"),o=n("9112"),r=n("5135"),s=n("ce4e"),a=n("8925"),l=n("69f3"),h=l.get,c=l.enforce,u=String(String).split("String");(t.exports=function(t,e,n,a){var l,h=!!a&&!!a.unsafe,p=!!a&&!!a.enumerable,d=!!a&&!!a.noTargetGet;"function"==typeof n&&("string"!=typeof e||r(n,"name")||o(n,"name",e),l=c(n),l.source||(l.source=u.join("string"==typeof e?e:""))),t!==i?(h?!d&&t[e]&&(p=!0):delete t[e],p?t[e]=n:o(t,e,n)):p?t[e]=n:s(e,n)})(Function.prototype,"toString",(function(){return"function"==typeof this&&h(this).source||a(this)}))},7418:function(t,e){e.f=Object.getOwnPropertySymbols},"764d":function(t,e,n){"use strict";n("f78b")},7839:function(t,e){t.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},"7b0b":function(t,e,n){var i=n("1d80");t.exports=function(t){return Object(i(t))}},"7c73":function(t,e,n){var i,o=n("825a"),r=n("37e8"),s=n("7839"),a=n("d012"),l=n("1be4"),h=n("cc12"),c=n("f772"),u=">",p="<",d="prototype",f="script",y=c("IE_PROTO"),g=function(){},v=function(t){return p+f+u+t+p+"/"+f+u},m=function(t){t.write(v("")),t.close();var e=t.parentWindow.Object;return t=null,e},_=function(){var t,e=h("iframe"),n="java"+f+":";return e.style.display="none",l.appendChild(e),e.src=String(n),t=e.contentWindow.document,t.open(),t.write(v("document.F=Object")),t.close(),t.F},b=function(){try{i=document.domain&&new ActiveXObject("htmlfile")}catch(e){}b=i?m(i):_();var t=s.length;while(t--)delete b[d][s[t]];return b()};a[y]=!0,t.exports=Object.create||function(t,e){var n;return null!==t?(g[d]=o(t),n=new g,g[d]=null,n[y]=t):n=b(),void 0===e?n:r(n,e)}},"7f9a":function(t,e,n){var i=n("da84"),o=n("8925"),r=i.WeakMap;t.exports="function"===typeof r&&/native code/.test(o(r))},"825a":function(t,e,n){var i=n("861d");t.exports=function(t){if(!i(t))throw TypeError(String(t)+" is not an object");return t}},"83ab":function(t,e,n){var i=n("d039");t.exports=!i((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]}))},"861d":function(t,e){t.exports=function(t){return"object"===typeof t?null!==t:"function"===typeof t}},8925:function(t,e,n){var i=n("c6cd"),o=Function.toString;"function"!=typeof i.inspectSource&&(i.inspectSource=function(t){return o.call(t)}),t.exports=i.inspectSource},"90e3":function(t,e){var n=0,i=Math.random();t.exports=function(t){return"Symbol("+String(void 0===t?"":t)+")_"+(++n+i).toString(36)}},9112:function(t,e,n){var i=n("83ab"),o=n("9bf2"),r=n("5c6c");t.exports=i?function(t,e,n){return o.f(t,e,r(1,n))}:function(t,e,n){return t[e]=n,t}},"94ca":function(t,e,n){var i=n("d039"),o=/#|\.prototype\./,r=function(t,e){var n=a[s(t)];return n==h||n!=l&&("function"==typeof e?i(e):!!e)},s=r.normalize=function(t){return String(t).replace(o,".").toLowerCase()},a=r.data={},l=r.NATIVE="N",h=r.POLYFILL="P";t.exports=r},"9bdd":function(t,e,n){var i=n("825a"),o=n("2a62");t.exports=function(t,e,n,r){try{return r?e(i(n)[0],n[1]):e(n)}catch(s){throw o(t),s}}},"9bf2":function(t,e,n){var i=n("83ab"),o=n("0cfb"),r=n("825a"),s=n("c04e"),a=Object.defineProperty;e.f=i?a:function(t,e,n){if(r(t),e=s(e,!0),r(n),o)try{return a(t,e,n)}catch(i){}if("get"in n||"set"in n)throw TypeError("Accessors not supported");return"value"in n&&(t[e]=n.value),t}},"9fb2":function(t,e,n){"use strict";n("ba64")},a573:function(t,e,n){"use strict";var i=n("23e7"),o=n("1c0b"),r=n("825a"),s=n("c5cc"),a=n("9bdd"),l=s((function(t){var e=this.iterator,n=r(this.next.call(e,t)),i=this.done=!!n.done;if(!i)return a(e,this.mapper,n.value)}));i({target:"Iterator",proto:!0,real:!0},{map:function(t){return new l({iterator:r(this),mapper:o(t)})}})},a691:function(t,e){var n=Math.ceil,i=Math.floor;t.exports=function(t){return isNaN(t=+t)?0:(t>0?i:n)(t)}},ae93:function(t,e,n){"use strict";var i,o,r,s=n("d039"),a=n("e163"),l=n("9112"),h=n("5135"),c=n("b622"),u=n("c430"),p=c("iterator"),d=!1,f=function(){return this};[].keys&&(r=[].keys(),"next"in r?(o=a(a(r)),o!==Object.prototype&&(i=o)):d=!0);var y=void 0==i||s((function(){var t={};return i[p].call(t)!==t}));y&&(i={}),u&&!y||h(i,p)||l(i,p,f),t.exports={IteratorPrototype:i,BUGGY_SAFARI_ITERATORS:d}},ae9e:function(t,e,n){},b622:function(t,e,n){var i=n("da84"),o=n("5692"),r=n("5135"),s=n("90e3"),a=n("4930"),l=n("fdbf"),h=o("wks"),c=i.Symbol,u=l?c:c&&c.withoutSetter||s;t.exports=function(t){return r(h,t)&&(a||"string"==typeof h[t])||(a&&r(c,t)?h[t]=c[t]:h[t]=u("Symbol."+t)),h[t]}},b776:function(t,e,n){},ba64:function(t,e,n){},c04e:function(t,e,n){var i=n("861d");t.exports=function(t,e){if(!i(t))return t;var n,o;if(e&&"function"==typeof(n=t.toString)&&!i(o=n.call(t)))return o;if("function"==typeof(n=t.valueOf)&&!i(o=n.call(t)))return o;if(!e&&"function"==typeof(n=t.toString)&&!i(o=n.call(t)))return o;throw TypeError("Can't convert object to primitive value")}},c369:function(t,e,n){"use strict";n("b776")},c430:function(t,e){t.exports=!1},c5cc:function(t,e,n){"use strict";var i=n("428f"),o=n("1c0b"),r=n("825a"),s=n("7c73"),a=n("9112"),l=n("e2cc"),h=n("b622"),c=n("69f3"),u=c.set,p=c.get,d=h("toStringTag"),f=function(t){var e=p(this).iterator,n=e["return"];return void 0===n?{done:!0,value:t}:r(n.call(e,t))},y=function(t){var e=p(this).iterator,n=e["throw"];if(void 0===n)throw t;return n.call(e,t)};t.exports=function(t,e){var n=function(t){t.next=o(t.iterator.next),t.done=!1,u(this,t)};return n.prototype=l(s(i.Iterator.prototype),{next:function(){var e=p(this),n=e.done?void 0:t.apply(e,arguments);return{done:e.done,value:n}},return:f,throw:y}),e||a(n.prototype,d,"Generator"),n}},c6b6:function(t,e){var n={}.toString;t.exports=function(t){return n.call(t).slice(8,-1)}},c6cd:function(t,e,n){var i=n("da84"),o=n("ce4e"),r="__core-js_shared__",s=i[r]||o(r,{});t.exports=s},c8ba:function(t,e){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(i){"object"===typeof window&&(n=window)}t.exports=n},ca84:function(t,e,n){var i=n("5135"),o=n("fc6a"),r=n("4d64").indexOf,s=n("d012");t.exports=function(t,e){var n,a=o(t),l=0,h=[];for(n in a)!i(s,n)&&i(a,n)&&h.push(n);while(e.length>l)i(a,n=e[l++])&&(~r(h,n)||h.push(n));return h}},caad:function(t,e,n){"use strict";var i=n("23e7"),o=n("4d64").includes,r=n("44d2");i({target:"Array",proto:!0},{includes:function(t){return o(this,t,arguments.length>1?arguments[1]:void 0)}}),r("includes")},cc12:function(t,e,n){var i=n("da84"),o=n("861d"),r=i.document,s=o(r)&&o(r.createElement);t.exports=function(t){return s?r.createElement(t):{}}},ce4e:function(t,e,n){var i=n("da84"),o=n("9112");t.exports=function(t,e){try{o(i,t,e)}catch(n){i[t]=e}return e}},d012:function(t,e){t.exports={}},d039:function(t,e){t.exports=function(t){try{return!!t()}catch(e){return!0}}},d047:function(t,e,n){"use strict";n("174e")},d066:function(t,e,n){var i=n("428f"),o=n("da84"),r=function(t){return"function"==typeof t?t:void 0};t.exports=function(t,e){return arguments.length<2?r(i[t])||r(o[t]):i[t]&&i[t][e]||o[t]&&o[t][e]}},d1e7:function(t,e,n){"use strict";var i={}.propertyIsEnumerable,o=Object.getOwnPropertyDescriptor,r=o&&!i.call({1:2},1);e.f=r?function(t){var e=o(this,t);return!!e&&e.enumerable}:i},d9e6:function(t,e,n){"use strict";n("ae9e")},da84:function(t,e,n){(function(e){var n=function(t){return t&&t.Math==Math&&t};t.exports=n("object"==typeof globalThis&&globalThis)||n("object"==typeof window&&window)||n("object"==typeof self&&self)||n("object"==typeof e&&e)||function(){return this}()||Function("return this")()}).call(this,n("c8ba"))},de76:function(t,e,n){},dec4:function(t,e,n){},df75:function(t,e,n){var i=n("ca84"),o=n("7839");t.exports=Object.keys||function(t){return i(t,o)}},e163:function(t,e,n){var i=n("5135"),o=n("7b0b"),r=n("f772"),s=n("e177"),a=r("IE_PROTO"),l=Object.prototype;t.exports=s?Object.getPrototypeOf:function(t){return t=o(t),i(t,a)?t[a]:"function"==typeof t.constructor&&t instanceof t.constructor?t.constructor.prototype:t instanceof Object?l:null}},e177:function(t,e,n){var i=n("d039");t.exports=!i((function(){function t(){}return t.prototype.constructor=null,Object.getPrototypeOf(new t)!==t.prototype}))},e2cc:function(t,e,n){var i=n("6eeb");t.exports=function(t,e,n){for(var o in e)i(t,o,e[o],n);return t}},e893:function(t,e,n){var i=n("5135"),o=n("56ef"),r=n("06cf"),s=n("9bf2");t.exports=function(t,e){for(var n=o(e),a=s.f,l=r.f,h=0;h<n.length;h++){var c=n[h];i(t,c)||a(t,c,l(e,c))}}},e95a:function(t,e,n){var i=n("b622"),o=n("3f8c"),r=i("iterator"),s=Array.prototype;t.exports=function(t){return void 0!==t&&(o.Array===t||s[r]===t)}},e9c4:function(t,e,n){var i=n("23e7"),o=n("d066"),r=n("d039"),s=o("JSON","stringify"),a=/[\uD800-\uDFFF]/g,l=/^[\uD800-\uDBFF]$/,h=/^[\uDC00-\uDFFF]$/,c=function(t,e,n){var i=n.charAt(e-1),o=n.charAt(e+1);return l.test(t)&&!h.test(o)||h.test(t)&&!l.test(i)?"\\u"+t.charCodeAt(0).toString(16):t},u=r((function(){return'"\\udf06\\ud834"'!==s("\udf06\ud834")||'"\\udead"'!==s("\udead")}));s&&i({target:"JSON",stat:!0,forced:u},{stringify:function(t,e,n){var i=s.apply(null,arguments);return"string"==typeof i?i.replace(a,c):i}})},f08a:function(t,e,n){"use strict";n("dec4")},f5df:function(t,e,n){var i=n("00ee"),o=n("c6b6"),r=n("b622"),s=r("toStringTag"),a="Arguments"==o(function(){return arguments}()),l=function(t,e){try{return t[e]}catch(n){}};t.exports=i?o:function(t){var e,n,i;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(n=l(e=Object(t),s))?n:a?o(e):"Object"==(i=o(e))&&"function"==typeof e.callee?"Arguments":i}},f772:function(t,e,n){var i=n("5692"),o=n("90e3"),r=i("keys");t.exports=function(t){return r[t]||(r[t]=o(t))}},f78b:function(t,e,n){},fb15:function(t,e,n){"use strict";if(n.r(e),"undefined"!==typeof window){var i=window.document.currentScript,o=i&&i.src.match(/(.+\/)[^/]+\.js(\?.*)?$/);o&&(n.p=o[1])}n("0643"),n("a573");var r=function(){var t=this,e=t._self._c;return e("div",{staticClass:"map-box"},[e("div",{directives:[{name:"lmap",rawName:"v-lmap:loadMap",arg:"loadMap"}],staticClass:"map-style"}),t.lMap.map&&t.isRyMapTool?e("RyMapTool",{staticClass:"ry-map-tool",class:{left:!t.isRight,right:t.isRight},attrs:{lMap:t.lMap,isShowRangingTool:t.isShowRangingTool,initModifyPolygon:t.initModifyPolygon,isShowDrawTool:t.isShowDrawTool,isRight:t.isRight,isCrossHair:t.isCrossHair,hideAdd:t.hideAdd,hidePoint:t.hidePoint,hideCancel:t.hideCancel,hideDelete:t.hideDelete,hideSave:t.hideSave,hideLine:t.hideLine,hideArea:t.hideArea,isSwitchMap:t.isSwitchMap,isSwitchMapRight:t.isSwitchMapRight,gpsType:t.lastMapType},on:{crossHairClick:function(e){return t.crossHairClick(e)},loadDrawPolygonEvent:function(e){return t.loadDrawPolygonEvent(e)},success:function(e){return t.drawSuccess(e)},drawPolygonEvent:function(e){return t.drawPolygonEvent(e)},drawLineEvent:function(e){return t.drawLineEvent(e)},error:function(e){return t.drawError(e)}}},[[t._t("maptool")]],2):t._e(),t.map?[t._t("polygon",null,{mapDto:{map:t.map,lMap:t.lMap}}),t._t("marker",null,{mapDto:{map:t.map,lMap:t.lMap}})]:t._e(),t.isSwitchMapTool&&t.isShowSwitchMap?e("SwitchMap",{staticClass:"move-box",style:{top:t.switchMapPosTop+"px",right:t.isSwitchMapRight?t.switchMapPosLeftOrRight+"px":"none",left:t.isSwitchMapRight?"none":t.switchMapPosLeftOrRight+"px"},attrs:{height:t.switchMapHeight,switchMapDefaultTypeOrLayer:t.switchMapDefaultTypeOrLayer,mapTypeAndLayer:t.mapTypeAndLayer,"bottom-right":t.isSwitchMapRight,isDisabled:t.isDisabledSwitchMapTabEvent},on:{changeSwitchMap:t.changeSwitchMap}}):t._e()],2)},s=[],a=(n("e9c4"),n("4e3e"),n("5bc0"),function(){function t(){this.disposed=!1}return t.prototype.dispose=function(){this.disposed||(this.disposed=!0,this.disposeInternal())},t.prototype.disposeInternal=function(){},t}()),l=a;function h(t,e){return t>e?1:t<e?-1:0}function c(t,e,n){var i=t.length;if(t[0]<=e)return 0;if(e<=t[i-1])return i-1;var o=void 0;if(n>0){for(o=1;o<i;++o)if(t[o]<e)return o-1}else if(n<0){for(o=1;o<i;++o)if(t[o]<=e)return o}else for(o=1;o<i;++o){if(t[o]==e)return o;if(t[o]<e)return"function"===typeof n?n(e,t[o-1],t[o])>0?o-1:o:t[o-1]-e<e-t[o]?o-1:o}return i-1}function u(t,e){for(var n=Array.isArray(e)?e:[e],i=n.length,o=0;o<i;o++)t[t.length]=n[o]}function p(t,e){var n=t.length;if(n!==e.length)return!1;for(var i=0;i<n;i++)if(t[i]!==e[i])return!1;return!0}function d(){return!0}function f(){return!1}function y(){}function g(t){var e,n,i,o=!1;return function(){var r=Array.prototype.slice.call(arguments);return o&&this===i&&p(r,n)||(o=!0,i=this,n=r,e=t.apply(this,arguments)),e}}function v(){return function(){throw new Error("Unimplemented abstract method.")}()}var m=0;function _(t){return t.ol_uid||(t.ol_uid=String(++m))}var b="6.15.1",w="undefined"!==typeof navigator&&"undefined"!==typeof navigator.userAgent?navigator.userAgent.toLowerCase():"",C=-1!==w.indexOf("firefox"),x=-1!==w.indexOf("safari")&&-1==w.indexOf("chrom"),E=(x&&(w.indexOf("version/15.4")>=0||w.match(/cpu (os|iphone os) 15_4 like mac os x/)),-1!==w.indexOf("webkit")&&-1==w.indexOf("edge")),M=-1!==w.indexOf("macintosh"),P="undefined"!==typeof devicePixelRatio?devicePixelRatio:1,T="undefined"!==typeof WorkerGlobalScope&&"undefined"!==typeof OffscreenCanvas&&self instanceof WorkerGlobalScope,A="undefined"!==typeof Image&&Image.prototype.decode,S=function(){var t=!1;try{var e=Object.defineProperty({},"passive",{get:function(){t=!0}});window.addEventListener("_",null,e),window.removeEventListener("_",null,e)}catch(n){}return t}(),O=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!==typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),R=function(t){function e(e){var n=this,i="latest"===b?b:"v"+b.split("-")[0],o="Assertion failed. See https://openlayers.org/en/"+i+"/doc/errors/#"+e+" for details.";return n=t.call(this,o)||this,n.code=e,n.name="AssertionError",n.message=o,n}return O(e,t),e}(Error),L=R;function I(t,e){if(!t)throw new L(e)}var k;new Array(6);function j(){return[1,0,0,1,0,0]}function N(t,e){var n=e[0],i=e[1];return e[0]=t[0]*n+t[2]*i+t[4],e[1]=t[1]*n+t[3]*i+t[5],e}function D(t,e,n,i,o,r,s,a){var l=Math.sin(r),h=Math.cos(r);return t[0]=i*h,t[1]=o*l,t[2]=-i*l,t[3]=o*h,t[4]=s*i*h-a*i*l+e,t[5]=s*o*l+a*o*h+n,t}function G(t,e){var n=F(e);I(0!==n,32);var i=e[0],o=e[1],r=e[2],s=e[3],a=e[4],l=e[5];return t[0]=s/n,t[1]=-o/n,t[2]=-r/n,t[3]=i/n,t[4]=(r*l-s*a)/n,t[5]=-(i*l-o*a)/n,t}function F(t){return t[0]*t[3]-t[1]*t[2]}function B(t){var e="matrix("+t.join(", ")+")";if(T)return e;var n=k||(k=document.createElement("div"));return n.style.transform=e,n.style.transform}var Z={UNKNOWN:0,INTERSECTING:1,ABOVE:2,RIGHT:4,BELOW:8,LEFT:16};function V(t){for(var e=Y(),n=0,i=t.length;n<i;++n)it(e,t[n]);return e}function z(t,e,n){var i=Math.min.apply(null,t),o=Math.min.apply(null,e),r=Math.max.apply(null,t),s=Math.max.apply(null,e);return $(i,o,r,s,n)}function H(t,e){return e?(e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e):t.slice()}function K(t,e,n){var i,o;return i=e<t[0]?t[0]-e:t[2]<e?e-t[2]:0,o=n<t[1]?t[1]-n:t[3]<n?n-t[3]:0,i*i+o*o}function X(t,e){return J(t,e[0],e[1])}function U(t,e){return t[0]<=e[0]&&e[2]<=t[2]&&t[1]<=e[1]&&e[3]<=t[3]}function J(t,e,n){return t[0]<=e&&e<=t[2]&&t[1]<=n&&n<=t[3]}function W(t,e){var n=t[0],i=t[1],o=t[2],r=t[3],s=e[0],a=e[1],l=Z.UNKNOWN;return s<n?l|=Z.LEFT:s>o&&(l|=Z.RIGHT),a<i?l|=Z.BELOW:a>r&&(l|=Z.ABOVE),l===Z.UNKNOWN&&(l=Z.INTERSECTING),l}function Y(){return[1/0,1/0,-1/0,-1/0]}function $(t,e,n,i,o){return o?(o[0]=t,o[1]=e,o[2]=n,o[3]=i,o):[t,e,n,i]}function q(t){return $(1/0,1/0,-1/0,-1/0,t)}function Q(t,e){var n=t[0],i=t[1];return $(n,i,n,i,e)}function tt(t,e,n,i,o){var r=q(o);return ot(r,t,e,n,i)}function et(t,e){return t[0]==e[0]&&t[2]==e[2]&&t[1]==e[1]&&t[3]==e[3]}function nt(t,e){return e[0]<t[0]&&(t[0]=e[0]),e[2]>t[2]&&(t[2]=e[2]),e[1]<t[1]&&(t[1]=e[1]),e[3]>t[3]&&(t[3]=e[3]),t}function it(t,e){e[0]<t[0]&&(t[0]=e[0]),e[0]>t[2]&&(t[2]=e[0]),e[1]<t[1]&&(t[1]=e[1]),e[1]>t[3]&&(t[3]=e[1])}function ot(t,e,n,i,o){for(;n<i;n+=o)rt(t,e[n],e[n+1]);return t}function rt(t,e,n){t[0]=Math.min(t[0],e),t[1]=Math.min(t[1],n),t[2]=Math.max(t[2],e),t[3]=Math.max(t[3],n)}function st(t,e){var n;return n=e(lt(t)),n||(n=e(ht(t)),n||(n=e(gt(t)),n||(n=e(yt(t)),n||!1)))}function at(t){var e=0;return _t(t)||(e=vt(t)*dt(t)),e}function lt(t){return[t[0],t[1]]}function ht(t){return[t[2],t[1]]}function ct(t){return[(t[0]+t[2])/2,(t[1]+t[3])/2]}function ut(t,e,n,i,o){var r=pt(t,e,n,i),s=r[0],a=r[1],l=r[2],h=r[3],c=r[4],u=r[5],p=r[6],d=r[7];return $(Math.min(s,l,c,p),Math.min(a,h,u,d),Math.max(s,l,c,p),Math.max(a,h,u,d),o)}function pt(t,e,n,i){var o=e*i[0]/2,r=e*i[1]/2,s=Math.cos(n),a=Math.sin(n),l=o*s,h=o*a,c=r*s,u=r*a,p=t[0],d=t[1];return[p-l+u,d-h-c,p-l-u,d-h+c,p+l-u,d+h+c,p+l+u,d+h-c,p-l+u,d-h-c]}function dt(t){return t[3]-t[1]}function ft(t,e,n){var i=n||Y();return mt(t,e)?(t[0]>e[0]?i[0]=t[0]:i[0]=e[0],t[1]>e[1]?i[1]=t[1]:i[1]=e[1],t[2]<e[2]?i[2]=t[2]:i[2]=e[2],t[3]<e[3]?i[3]=t[3]:i[3]=e[3]):q(i),i}function yt(t){return[t[0],t[3]]}function gt(t){return[t[2],t[3]]}function vt(t){return t[2]-t[0]}function mt(t,e){return t[0]<=e[2]&&t[2]>=e[0]&&t[1]<=e[3]&&t[3]>=e[1]}function _t(t){return t[2]<t[0]||t[3]<t[1]}function bt(t,e){return e?(e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e):t}function wt(t,e,n){var i=!1,o=W(t,e),r=W(t,n);if(o===Z.INTERSECTING||r===Z.INTERSECTING)i=!0;else{var s=t[0],a=t[1],l=t[2],h=t[3],c=e[0],u=e[1],p=n[0],d=n[1],f=(d-u)/(p-c),y=void 0,g=void 0;r&Z.ABOVE&&!(o&Z.ABOVE)&&(y=p-(d-h)/f,i=y>=s&&y<=l),i||!(r&Z.RIGHT)||o&Z.RIGHT||(g=d-(p-l)*f,i=g>=a&&g<=h),i||!(r&Z.BELOW)||o&Z.BELOW||(y=p-(d-a)/f,i=y>=s&&y<=l),i||!(r&Z.LEFT)||o&Z.LEFT||(g=d-(p-s)*f,i=g>=a&&g<=h)}return i}function Ct(t,e,n,i){var o=[];if(i>1)for(var r=t[2]-t[0],s=t[3]-t[1],a=0;a<i;++a)o.push(t[0]+r*a/i,t[1],t[2],t[1]+s*a/i,t[2]-r*a/i,t[3],t[0],t[3]-s*a/i);else o=[t[0],t[1],t[2],t[1],t[2],t[3],t[0],t[3]];e(o,o,2);for(var l=[],h=[],c=(a=0,o.length);a<c;a+=2)l.push(o[a]),h.push(o[a+1]);return z(l,h,n)}function xt(t,e,n){return Math.min(Math.max(t,e),n)}var Et=function(){var t;return t="cosh"in Math?Math.cosh:function(t){var e=Math.exp(t);return(e+1/e)/2},t}(),Mt=function(){var t;return t="log2"in Math?Math.log2:function(t){return Math.log(t)*Math.LOG2E},t}();function Pt(t,e,n,i,o,r){var s=o-n,a=r-i;if(0!==s||0!==a){var l=((t-n)*s+(e-i)*a)/(s*s+a*a);l>1?(n=o,i=r):l>0&&(n+=s*l,i+=a*l)}return Tt(t,e,n,i)}function Tt(t,e,n,i){var o=n-t,r=i-e;return o*o+r*r}function At(t){for(var e=t.length,n=0;n<e;n++){for(var i=n,o=Math.abs(t[n][n]),r=n+1;r<e;r++){var s=Math.abs(t[r][n]);s>o&&(o=s,i=r)}if(0===o)return null;var a=t[i];t[i]=t[n],t[n]=a;for(var l=n+1;l<e;l++)for(var h=-t[l][n]/t[n][n],c=n;c<e+1;c++)n==c?t[l][c]=0:t[l][c]+=h*t[n][c]}for(var u=new Array(e),p=e-1;p>=0;p--){u[p]=t[p][e]/t[p][p];for(var d=p-1;d>=0;d--)t[d][e]-=t[d][p]*u[p]}return u}function St(t){return t*Math.PI/180}function Ot(t,e){var n=t%e;return n*e<0?n+e:n}function Rt(t,e,n){return t+n*(e-t)}var Lt=/^#([a-f0-9]{3}|[a-f0-9]{4}(?:[a-f0-9]{2}){0,2})$/i,It=/^([a-z]*)$|^hsla?\(.*\)$/i;function kt(t){return"string"===typeof t?t:Bt(t)}function jt(t){var e=document.createElement("div");if(e.style.color=t,""!==e.style.color){document.body.appendChild(e);var n=getComputedStyle(e).color;return document.body.removeChild(e),n}return""}var Nt=function(){var t=1024,e={},n=0;return function(i){var o;if(e.hasOwnProperty(i))o=e[i];else{if(n>=t){var r=0;for(var s in e)0===(3&r++)&&(delete e[s],--n)}o=Gt(i),e[i]=o,++n}return o}}();function Dt(t){return Array.isArray(t)?t:Nt(t)}function Gt(t){var e,n,i,o,r;if(It.exec(t)&&(t=jt(t)),Lt.exec(t)){var s=t.length-1,a=void 0;a=s<=4?1:2;var l=4===s||8===s;e=parseInt(t.substr(1+0*a,a),16),n=parseInt(t.substr(1+1*a,a),16),i=parseInt(t.substr(1+2*a,a),16),o=l?parseInt(t.substr(1+3*a,a),16):255,1==a&&(e=(e<<4)+e,n=(n<<4)+n,i=(i<<4)+i,l&&(o=(o<<4)+o)),r=[e,n,i,o/255]}else 0==t.indexOf("rgba(")?(r=t.slice(5,-1).split(",").map(Number),Ft(r)):0==t.indexOf("rgb(")?(r=t.slice(4,-1).split(",").map(Number),r.push(1),Ft(r)):I(!1,14);return r}function Ft(t){return t[0]=xt(t[0]+.5|0,0,255),t[1]=xt(t[1]+.5|0,0,255),t[2]=xt(t[2]+.5|0,0,255),t[3]=xt(t[3],0,1),t}function Bt(t){var e=t[0];e!=(0|e)&&(e=e+.5|0);var n=t[1];n!=(0|n)&&(n=n+.5|0);var i=t[2];i!=(0|i)&&(i=i+.5|0);var o=void 0===t[3]?1:Math.round(100*t[3])/100;return"rgba("+e+","+n+","+i+","+o+")"}var Zt=function(){function t(){this.cache_={},this.cacheSize_=0,this.maxCacheSize_=32}return t.prototype.clear=function(){this.cache_={},this.cacheSize_=0},t.prototype.canExpireCache=function(){return this.cacheSize_>this.maxCacheSize_},t.prototype.expire=function(){if(this.canExpireCache()){var t=0;for(var e in this.cache_){var n=this.cache_[e];0!==(3&t++)||n.hasListener()||(delete this.cache_[e],--this.cacheSize_)}}},t.prototype.get=function(t,e,n){var i=Vt(t,e,n);return i in this.cache_?this.cache_[i]:null},t.prototype.set=function(t,e,n,i){var o=Vt(t,e,n);this.cache_[o]=i,++this.cacheSize_},t.prototype.setSize=function(t){this.maxCacheSize_=t,this.expire()},t}();function Vt(t,e,n){var i=n?kt(n):"null";return e+":"+t+":"+i}var zt=new Zt,Ht=function(){function t(t){this.propagationStopped,this.defaultPrevented,this.type=t,this.target=null}return t.prototype.preventDefault=function(){this.defaultPrevented=!0},t.prototype.stopPropagation=function(){this.propagationStopped=!0},t}();var Kt=Ht,Xt={PROPERTYCHANGE:"propertychange"},Ut="function"===typeof Object.assign?Object.assign:function(t,e){if(void 0===t||null===t)throw new TypeError("Cannot convert undefined or null to object");for(var n=Object(t),i=1,o=arguments.length;i<o;++i){var r=arguments[i];if(void 0!==r&&null!==r)for(var s in r)r.hasOwnProperty(s)&&(n[s]=r[s])}return n};function Jt(t){for(var e in t)delete t[e]}var Wt="function"===typeof Object.values?Object.values:function(t){var e=[];for(var n in t)e.push(t[n]);return e};function Yt(t){var e;for(e in t)return!1;return!e}var $t=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!==typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),qt=function(t){function e(e){var n=t.call(this)||this;return n.eventTarget_=e,n.pendingRemovals_=null,n.dispatching_=null,n.listeners_=null,n}return $t(e,t),e.prototype.addEventListener=function(t,e){if(t&&e){var n=this.listeners_||(this.listeners_={}),i=n[t]||(n[t]=[]);-1===i.indexOf(e)&&i.push(e)}},e.prototype.dispatchEvent=function(t){var e="string"===typeof t,n=e?t:t.type,i=this.listeners_&&this.listeners_[n];if(i){var o=e?new Kt(t):t;o.target||(o.target=this.eventTarget_||this);var r,s=this.dispatching_||(this.dispatching_={}),a=this.pendingRemovals_||(this.pendingRemovals_={});n in s||(s[n]=0,a[n]=0),++s[n];for(var l=0,h=i.length;l<h;++l)if(r="handleEvent"in i[l]?i[l].handleEvent(o):i[l].call(this,o),!1===r||o.propagationStopped){r=!1;break}if(0===--s[n]){var c=a[n];delete a[n];while(c--)this.removeEventListener(n,y);delete s[n]}return r}},e.prototype.disposeInternal=function(){this.listeners_&&Jt(this.listeners_)},e.prototype.getListeners=function(t){return this.listeners_&&this.listeners_[t]||void 0},e.prototype.hasListener=function(t){return!!this.listeners_&&(t?t in this.listeners_:Object.keys(this.listeners_).length>0)},e.prototype.removeEventListener=function(t,e){var n=this.listeners_&&this.listeners_[t];if(n){var i=n.indexOf(e);-1!==i&&(this.pendingRemovals_&&t in this.pendingRemovals_?(n[i]=y,++this.pendingRemovals_[t]):(n.splice(i,1),0===n.length&&delete this.listeners_[t]))}},e}(l),Qt=qt,te={CHANGE:"change",ERROR:"error",BLUR:"blur",CLEAR:"clear",CONTEXTMENU:"contextmenu",CLICK:"click",DBLCLICK:"dblclick",DRAGENTER:"dragenter",DRAGOVER:"dragover",DROP:"drop",FOCUS:"focus",KEYDOWN:"keydown",KEYPRESS:"keypress",LOAD:"load",RESIZE:"resize",TOUCHMOVE:"touchmove",WHEEL:"wheel"};function ee(t,e,n,i,o){if(i&&i!==t&&(n=n.bind(i)),o){var r=n;n=function(){t.removeEventListener(e,n),r.apply(this,arguments)}}var s={target:t,type:e,listener:n};return t.addEventListener(e,n),s}function ne(t,e,n,i){return ee(t,e,n,i,!0)}function ie(t){t&&t.target&&(t.target.removeEventListener(t.type,t.listener),Jt(t))}var oe=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!==typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),re=function(t){function e(){var e=t.call(this)||this;return e.on=e.onInternal,e.once=e.onceInternal,e.un=e.unInternal,e.revision_=0,e}return oe(e,t),e.prototype.changed=function(){++this.revision_,this.dispatchEvent(te.CHANGE)},e.prototype.getRevision=function(){return this.revision_},e.prototype.onInternal=function(t,e){if(Array.isArray(t)){for(var n=t.length,i=new Array(n),o=0;o<n;++o)i[o]=ee(this,t[o],e);return i}return ee(this,t,e)},e.prototype.onceInternal=function(t,e){var n;if(Array.isArray(t)){var i=t.length;n=new Array(i);for(var o=0;o<i;++o)n[o]=ne(this,t[o],e)}else n=ne(this,t,e);return e.ol_key=n,n},e.prototype.unInternal=function(t,e){var n=e.ol_key;if(n)se(n);else if(Array.isArray(t))for(var i=0,o=t.length;i<o;++i)this.removeEventListener(t[i],e);else this.removeEventListener(t,e)},e}(Qt);function se(t){if(Array.isArray(t))for(var e=0,n=t.length;e<n;++e)ie(t[e]);else ie(t)}re.prototype.on,re.prototype.once,re.prototype.un;var ae=re,le=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!==typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),he=function(t){function e(e,n,i){var o=t.call(this,e)||this;return o.key=n,o.oldValue=i,o}return le(e,t),e}(Kt),ce=function(t){function e(e){var n=t.call(this)||this;return n.on,n.once,n.un,_(n),n.values_=null,void 0!==e&&n.setProperties(e),n}return le(e,t),e.prototype.get=function(t){var e;return this.values_&&this.values_.hasOwnProperty(t)&&(e=this.values_[t]),e},e.prototype.getKeys=function(){return this.values_&&Object.keys(this.values_)||[]},e.prototype.getProperties=function(){return this.values_&&Ut({},this.values_)||{}},e.prototype.hasProperties=function(){return!!this.values_},e.prototype.notify=function(t,e){var n;n="change:".concat(t),this.hasListener(n)&&this.dispatchEvent(new he(n,t,e)),n=Xt.PROPERTYCHANGE,this.hasListener(n)&&this.dispatchEvent(new he(n,t,e))},e.prototype.addChangeListener=function(t,e){this.addEventListener("change:".concat(t),e)},e.prototype.removeChangeListener=function(t,e){this.removeEventListener("change:".concat(t),e)},e.prototype.set=function(t,e,n){var i=this.values_||(this.values_={});if(n)i[t]=e;else{var o=i[t];i[t]=e,o!==e&&this.notify(t,o)}},e.prototype.setProperties=function(t,e){for(var n in t)this.set(n,t[n],e)},e.prototype.applyProperties=function(t){t.values_&&Ut(this.values_||(this.values_={}),t.values_)},e.prototype.unset=function(t,e){if(this.values_&&t in this.values_){var n=this.values_[t];delete this.values_[t],Yt(this.values_)&&(this.values_=null),e||this.notify(t,n)}},e}(ae),ue=ce,pe={OPACITY:"opacity",VISIBLE:"visible",EXTENT:"extent",Z_INDEX:"zIndex",MAX_RESOLUTION:"maxResolution",MIN_RESOLUTION:"minResolution",MAX_ZOOM:"maxZoom",MIN_ZOOM:"minZoom",SOURCE:"source",MAP:"map"},de=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!==typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),fe=function(t){function e(e){var n=t.call(this)||this;n.on,n.once,n.un,n.background_=e.background;var i=Ut({},e);return"object"===typeof e.properties&&(delete i.properties,Ut(i,e.properties)),i[pe.OPACITY]=void 0!==e.opacity?e.opacity:1,I("number"===typeof i[pe.OPACITY],64),i[pe.VISIBLE]=void 0===e.visible||e.visible,i[pe.Z_INDEX]=e.zIndex,i[pe.MAX_RESOLUTION]=void 0!==e.maxResolution?e.maxResolution:1/0,i[pe.MIN_RESOLUTION]=void 0!==e.minResolution?e.minResolution:0,i[pe.MIN_ZOOM]=void 0!==e.minZoom?e.minZoom:-1/0,i[pe.MAX_ZOOM]=void 0!==e.maxZoom?e.maxZoom:1/0,n.className_=void 0!==i.className?i.className:"ol-layer",delete i.className,n.setProperties(i),n.state_=null,n}return de(e,t),e.prototype.getBackground=function(){return this.background_},e.prototype.getClassName=function(){return this.className_},e.prototype.getLayerState=function(t){var e=this.state_||{layer:this,managed:void 0===t||t},n=this.getZIndex();return e.opacity=xt(Math.round(100*this.getOpacity())/100,0,1),e.visible=this.getVisible(),e.extent=this.getExtent(),e.zIndex=void 0!==n||e.managed?n:1/0,e.maxResolution=this.getMaxResolution(),e.minResolution=Math.max(this.getMinResolution(),0),e.minZoom=this.getMinZoom(),e.maxZoom=this.getMaxZoom(),this.state_=e,e},e.prototype.getLayersArray=function(t){return v()},e.prototype.getLayerStatesArray=function(t){return v()},e.prototype.getExtent=function(){return this.get(pe.EXTENT)},e.prototype.getMaxResolution=function(){return this.get(pe.MAX_RESOLUTION)},e.prototype.getMinResolution=function(){return this.get(pe.MIN_RESOLUTION)},e.prototype.getMinZoom=function(){return this.get(pe.MIN_ZOOM)},e.prototype.getMaxZoom=function(){return this.get(pe.MAX_ZOOM)},e.prototype.getOpacity=function(){return this.get(pe.OPACITY)},e.prototype.getSourceState=function(){return v()},e.prototype.getVisible=function(){return this.get(pe.VISIBLE)},e.prototype.getZIndex=function(){return this.get(pe.Z_INDEX)},e.prototype.setBackground=function(t){this.background_=t,this.changed()},e.prototype.setExtent=function(t){this.set(pe.EXTENT,t)},e.prototype.setMaxResolution=function(t){this.set(pe.MAX_RESOLUTION,t)},e.prototype.setMinResolution=function(t){this.set(pe.MIN_RESOLUTION,t)},e.prototype.setMaxZoom=function(t){this.set(pe.MAX_ZOOM,t)},e.prototype.setMinZoom=function(t){this.set(pe.MIN_ZOOM,t)},e.prototype.setOpacity=function(t){I("number"===typeof t,64),this.set(pe.OPACITY,t)},e.prototype.setVisible=function(t){this.set(pe.VISIBLE,t)},e.prototype.setZIndex=function(t){this.set(pe.Z_INDEX,t)},e.prototype.disposeInternal=function(){this.state_&&(this.state_.layer=null,this.state_=null),t.prototype.disposeInternal.call(this)},e}(ue),ye=fe,ge={PRERENDER:"prerender",POSTRENDER:"postrender",PRECOMPOSE:"precompose",POSTCOMPOSE:"postcompose",RENDERCOMPLETE:"rendercomplete"},ve=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!==typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),me=function(t){function e(e){var n=this,i=Ut({},e);delete i.source,n=t.call(this,i)||this,n.on,n.once,n.un,n.mapPrecomposeKey_=null,n.mapRenderKey_=null,n.sourceChangeKey_=null,n.renderer_=null,n.rendered=!1,e.render&&(n.render=e.render),e.map&&n.setMap(e.map),n.addChangeListener(pe.SOURCE,n.handleSourcePropertyChange_);var o=e.source?e.source:null;return n.setSource(o),n}return ve(e,t),e.prototype.getLayersArray=function(t){var e=t||[];return e.push(this),e},e.prototype.getLayerStatesArray=function(t){var e=t||[];return e.push(this.getLayerState()),e},e.prototype.getSource=function(){return this.get(pe.SOURCE)||null},e.prototype.getRenderSource=function(){return this.getSource()},e.prototype.getSourceState=function(){var t=this.getSource();return t?t.getState():"undefined"},e.prototype.handleSourceChange_=function(){this.changed()},e.prototype.handleSourcePropertyChange_=function(){this.sourceChangeKey_&&(ie(this.sourceChangeKey_),this.sourceChangeKey_=null);var t=this.getSource();t&&(this.sourceChangeKey_=ee(t,te.CHANGE,this.handleSourceChange_,this)),this.changed()},e.prototype.getFeatures=function(t){return this.renderer_?this.renderer_.getFeatures(t):new Promise((function(t){return t([])}))},e.prototype.getData=function(t){return this.renderer_&&this.rendered?this.renderer_.getData(t):null},e.prototype.render=function(t,e){var n=this.getRenderer();if(n.prepareFrame(t))return this.rendered=!0,n.renderFrame(t,e)},e.prototype.unrender=function(){this.rendered=!1},e.prototype.setMapInternal=function(t){t||this.unrender(),this.set(pe.MAP,t)},e.prototype.getMapInternal=function(){return this.get(pe.MAP)},e.prototype.setMap=function(t){this.mapPrecomposeKey_&&(ie(this.mapPrecomposeKey_),this.mapPrecomposeKey_=null),t||this.changed(),this.mapRenderKey_&&(ie(this.mapRenderKey_),this.mapRenderKey_=null),t&&(this.mapPrecomposeKey_=ee(t,ge.PRECOMPOSE,(function(t){var e=t,n=e.frameState.layerStatesArray,i=this.getLayerState(!1);I(!n.some((function(t){return t.layer===i.layer})),67),n.push(i)}),this),this.mapRenderKey_=ee(this,te.CHANGE,t.render,t),this.changed())},e.prototype.setSource=function(t){this.set(pe.SOURCE,t)},e.prototype.getRenderer=function(){return this.renderer_||(this.renderer_=this.createRenderer()),this.renderer_},e.prototype.hasRenderer=function(){return!!this.renderer_},e.prototype.createRenderer=function(){return null},e.prototype.disposeInternal=function(){this.renderer_&&(this.renderer_.dispose(),delete this.renderer_),this.setSource(null),t.prototype.disposeInternal.call(this)},e}(ye);function _e(t,e){if(!t.visible)return!1;var n=e.resolution;if(n<t.minResolution||n>=t.maxResolution)return!1;var i=e.zoom;return i>t.minZoom&&i<=t.maxZoom}var be=me;function we(t,e){return t[0]+=+e[0],t[1]+=+e[1],t}function Ce(t,e){for(var n=!0,i=t.length-1;i>=0;--i)if(t[i]!=e[i]){n=!1;break}return n}function xe(t,e){var n=Math.cos(e),i=Math.sin(e),o=t[0]*n-t[1]*i,r=t[1]*n+t[0]*i;return t[0]=o,t[1]=r,t}function Ee(t,e){return t[0]*=e,t[1]*=e,t}function Me(t,e){if(e.canWrapX()){var n=vt(e.getExtent()),i=Pe(t,e,n);i&&(t[0]-=i*n)}return t}function Pe(t,e,n){var i=e.getExtent(),o=0;if(e.canWrapX()&&(t[0]<i[0]||t[0]>i[2])){var r=n||vt(i);o=Math.floor((t[0]-i[0])/r)}return o}var Te=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!==typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),Ae=function(t){function e(e){var n=t.call(this)||this;return n.map_=e,n}return Te(e,t),e.prototype.dispatchRenderEvent=function(t,e){v()},e.prototype.calculateMatrices2D=function(t){var e=t.viewState,n=t.coordinateToPixelTransform,i=t.pixelToCoordinateTransform;D(n,t.size[0]/2,t.size[1]/2,1/e.resolution,-1/e.resolution,-e.rotation,-e.center[0],-e.center[1]),G(i,n)},e.prototype.forEachFeatureAtCoordinate=function(t,e,n,i,o,r,s,a){var l,h=e.viewState;function c(t,e,n,i){return o.call(r,e,t?n:null,i)}var u=h.projection,p=Me(t.slice(),u),d=[[0,0]];if(u.canWrapX()&&i){var f=u.getExtent(),y=vt(f);d.push([-y,0],[y,0])}for(var g=e.layerStatesArray,v=g.length,m=[],_=[],b=0;b<d.length;b++)for(var w=v-1;w>=0;--w){var C=g[w],x=C.layer;if(x.hasRenderer()&&_e(C,h)&&s.call(a,x)){var E=x.getRenderer(),M=x.getSource();if(E&&M){var P=M.getWrapX()?p:t,T=c.bind(null,C.managed);_[0]=P[0]+d[b][0],_[1]=P[1]+d[b][1],l=E.forEachFeatureAtCoordinate(_,e,n,T,m)}if(l)return l}}if(0!==m.length){var A=1/m.length;return m.forEach((function(t,e){return t.distanceSq+=e*A})),m.sort((function(t,e){return t.distanceSq-e.distanceSq})),m.some((function(t){return l=t.callback(t.feature,t.layer,t.geometry)})),l}},e.prototype.forEachLayerAtPixel=function(t,e,n,i,o){return v()},e.prototype.hasFeatureAtCoordinate=function(t,e,n,i,o,r){var s=this.forEachFeatureAtCoordinate(t,e,n,i,d,this,o,r);return void 0!==s},e.prototype.getMap=function(){return this.map_},e.prototype.renderFrame=function(t){v()},e.prototype.scheduleExpireIconCache=function(t){zt.canExpireCache()&&t.postRenderFunctions.push(Se)},e}(l);function Se(t,e){zt.expire()}var Oe=Ae,Re=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!==typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),Le=function(t){function e(e,n,i,o){var r=t.call(this,e)||this;return r.inversePixelTransform=n,r.frameState=i,r.context=o,r}return Re(e,t),e}(Kt),Ie=Le,ke="ol-hidden",je="ol-unselectable",Ne="ol-control",De="ol-collapsed",Ge=new RegExp(["^\\s*(?=(?:(?:[-a-z]+\\s*){0,2}(italic|oblique))?)","(?=(?:(?:[-a-z]+\\s*){0,2}(small-caps))?)","(?=(?:(?:[-a-z]+\\s*){0,2}(bold(?:er)?|lighter|[1-9]00 ))?)","(?:(?:normal|\\1|\\2|\\3)\\s*){0,3}((?:xx?-)?","(?:small|large)|medium|smaller|larger|[\\.\\d]+(?:\\%|in|[cem]m|ex|p[ctx]))","(?:\\s*\\/\\s*(normal|[\\.\\d]+(?:\\%|in|[cem]m|ex|p[ctx])?))","?\\s*([-,\\\"\\'\\sa-z]+?)\\s*$"].join(""),"i"),Fe=["style","variant","weight","size","lineHeight","family"],Be=function(t){var e=t.match(Ge);if(!e)return null;for(var n={lineHeight:"normal",size:"1.2em",style:"normal",weight:"normal",variant:"normal"},i=0,o=Fe.length;i<o;++i){var r=e[i+1];void 0!==r&&(n[Fe[i]]=r)}return n.families=n.family.split(/,\s?/),n};function Ze(t,e,n,i){var o;return o=n&&n.length?n.shift():T?new OffscreenCanvas(t||300,e||300):document.createElement("canvas"),t&&(o.width=t),e&&(o.height=e),o.getContext("2d",i)}function Ve(t,e){var n=e.parentNode;n&&n.replaceChild(t,e)}function ze(t){return t&&t.parentNode?t.parentNode.removeChild(t):null}function He(t){while(t.lastChild)t.removeChild(t.lastChild)}function Ke(t,e){for(var n=t.childNodes,i=0;1;++i){var o=n[i],r=e[i];if(!o&&!r)break;o!==r&&(o?r?t.insertBefore(r,o):(t.removeChild(o),--i):t.appendChild(r))}}var Xe=new ue,Ue=new Qt;Ue.setSize=function(){console.warn("labelCache is deprecated.")};var Je,We=null,Ye={};(function(){var t,e,n=100,i="32px ",o=["monospace","serif"],r=o.length,s="wmytzilWMYTZIL@#/&?$%10";function a(t,n,a){for(var l=!0,h=0;h<r;++h){var c=o[h];if(qe(t+" "+n+" "+i+c,s),a!=c){var u=qe(t+" "+n+" "+i+a+","+c,s);l&&u!=e}}return!!l}function l(){for(var e=!0,i=Xe.getKeys(),o=0,r=i.length;o<r;++o){var s=i[o];Xe.get(s)<n&&(a.apply(this,s.split("\n"))?(Jt(Ye),null,void 0,Xe.set(s,n)):(Xe.set(s,Xe.get(s)+1,!0),!1))}e&&(clearInterval(t),void 0)}})(),function(){var t}();function $e(t,e){return We||Ze(1,1),t!=Je&&(We.font=t,We.font),We.measureText(e)}function qe(t,e){return $e(t,e).width}var Qe=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!==typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),tn=function(t){function e(e){var n=t.call(this,e)||this;n.fontChangeListenerKey_=ee(Xe,Xt.PROPERTYCHANGE,e.redrawText.bind(e)),n.element_=document.createElement("div");var i=n.element_.style;i.position="absolute",i.width="100%",i.height="100%",i.zIndex="0",n.element_.className=je+" ol-layers";var o=e.getViewport();return o.insertBefore(n.element_,o.firstChild||null),n.children_=[],n.renderedVisible_=!0,n}return Qe(e,t),e.prototype.dispatchRenderEvent=function(t,e){var n=this.getMap();if(n.hasListener(t)){var i=new Ie(t,void 0,e);n.dispatchEvent(i)}},e.prototype.disposeInternal=function(){ie(this.fontChangeListenerKey_),this.element_.parentNode.removeChild(this.element_),t.prototype.disposeInternal.call(this)},e.prototype.renderFrame=function(t){if(t){this.calculateMatrices2D(t),this.dispatchRenderEvent(ge.PRECOMPOSE,t);var e=t.layerStatesArray.sort((function(t,e){return t.zIndex-e.zIndex})),n=t.viewState;this.children_.length=0;for(var i=[],o=null,r=0,s=e.length;r<s;++r){var a=e[r];t.layerIndex=r;var l=a.layer,h=l.getSourceState();if(!_e(a,n)||"ready"!=h&&"undefined"!=h)l.unrender();else{var c=l.render(t,o);c&&(c!==o&&(this.children_.push(c),o=c),"getDeclutter"in l&&i.push(l))}}for(r=i.length-1;r>=0;--r)i[r].renderDeclutter(t);Ke(this.element_,this.children_),this.dispatchRenderEvent(ge.POSTCOMPOSE,t),this.renderedVisible_||(this.element_.style.display="",this.renderedVisible_=!0),this.scheduleExpireIconCache(t)}else this.renderedVisible_&&(this.element_.style.display="none",this.renderedVisible_=!1)},e.prototype.forEachLayerAtPixel=function(t,e,n,i,o){for(var r=e.viewState,s=e.layerStatesArray,a=s.length,l=a-1;l>=0;--l){var h=s[l],c=h.layer;if(c.hasRenderer()&&_e(h,r)&&o(c)){var u=c.getRenderer(),p=u.getDataAtPixel(t,e,n);if(p){var d=i(c,p);if(d)return d}}}},e}(Oe),en=tn,nn={ADD:"add",REMOVE:"remove"},on=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!==typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),rn={LENGTH:"length"},sn=function(t){function e(e,n,i){var o=t.call(this,e)||this;return o.element=n,o.index=i,o}return on(e,t),e}(Kt),an=function(t){function e(e,n){var i=t.call(this)||this;i.on,i.once,i.un;var o=n||{};if(i.unique_=!!o.unique,i.array_=e||[],i.unique_)for(var r=0,s=i.array_.length;r<s;++r)i.assertUnique_(i.array_[r],r);return i.updateLength_(),i}return on(e,t),e.prototype.clear=function(){while(this.getLength()>0)this.pop()},e.prototype.extend=function(t){for(var e=0,n=t.length;e<n;++e)this.push(t[e]);return this},e.prototype.forEach=function(t){for(var e=this.array_,n=0,i=e.length;n<i;++n)t(e[n],n,e)},e.prototype.getArray=function(){return this.array_},e.prototype.item=function(t){return this.array_[t]},e.prototype.getLength=function(){return this.get(rn.LENGTH)},e.prototype.insertAt=function(t,e){this.unique_&&this.assertUnique_(e),this.array_.splice(t,0,e),this.updateLength_(),this.dispatchEvent(new sn(nn.ADD,e,t))},e.prototype.pop=function(){return this.removeAt(this.getLength()-1)},e.prototype.push=function(t){this.unique_&&this.assertUnique_(t);var e=this.getLength();return this.insertAt(e,t),this.getLength()},e.prototype.remove=function(t){for(var e=this.array_,n=0,i=e.length;n<i;++n)if(e[n]===t)return this.removeAt(n)},e.prototype.removeAt=function(t){var e=this.array_[t];return this.array_.splice(t,1),this.updateLength_(),this.dispatchEvent(new sn(nn.REMOVE,e,t)),e},e.prototype.setAt=function(t,e){var n=this.getLength();if(t<n){this.unique_&&this.assertUnique_(e,t);var i=this.array_[t];this.array_[t]=e,this.dispatchEvent(new sn(nn.REMOVE,i,t)),this.dispatchEvent(new sn(nn.ADD,e,t))}else{for(var o=n;o<t;++o)this.insertAt(o,void 0);this.insertAt(t,e)}},e.prototype.updateLength_=function(){this.set(rn.LENGTH,this.array_.length)},e.prototype.assertUnique_=function(t,e){for(var n=0,i=this.array_.length;n<i;++n)if(this.array_[n]===t&&n!==e)throw new L(58)},e}(ue),ln=an,hn=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!==typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),cn=function(t){function e(e,n){var i=t.call(this,e)||this;return i.layer=n,i}return hn(e,t),e}(Kt),un={LAYERS:"layers"},pn=function(t){function e(e){var n=this,i=e||{},o=Ut({},i);delete o.layers;var r=i.layers;return n=t.call(this,o)||this,n.on,n.once,n.un,n.layersListenerKeys_=[],n.listenerKeys_={},n.addChangeListener(un.LAYERS,n.handleLayersChanged_),r?Array.isArray(r)?r=new ln(r.slice(),{unique:!0}):I("function"===typeof r.getArray,43):r=new ln(void 0,{unique:!0}),n.setLayers(r),n}return hn(e,t),e.prototype.handleLayerChange_=function(){this.changed()},e.prototype.handleLayersChanged_=function(){this.layersListenerKeys_.forEach(ie),this.layersListenerKeys_.length=0;var t=this.getLayers();for(var e in this.layersListenerKeys_.push(ee(t,nn.ADD,this.handleLayersAdd_,this),ee(t,nn.REMOVE,this.handleLayersRemove_,this)),this.listenerKeys_)this.listenerKeys_[e].forEach(ie);Jt(this.listenerKeys_);for(var n=t.getArray(),i=0,o=n.length;i<o;i++){var r=n[i];this.registerLayerListeners_(r),this.dispatchEvent(new cn("addlayer",r))}this.changed()},e.prototype.registerLayerListeners_=function(t){var n=[ee(t,Xt.PROPERTYCHANGE,this.handleLayerChange_,this),ee(t,te.CHANGE,this.handleLayerChange_,this)];t instanceof e&&n.push(ee(t,"addlayer",this.handleLayerGroupAdd_,this),ee(t,"removelayer",this.handleLayerGroupRemove_,this)),this.listenerKeys_[_(t)]=n},e.prototype.handleLayerGroupAdd_=function(t){this.dispatchEvent(new cn("addlayer",t.layer))},e.prototype.handleLayerGroupRemove_=function(t){this.dispatchEvent(new cn("removelayer",t.layer))},e.prototype.handleLayersAdd_=function(t){var e=t.element;this.registerLayerListeners_(e),this.dispatchEvent(new cn("addlayer",e)),this.changed()},e.prototype.handleLayersRemove_=function(t){var e=t.element,n=_(e);this.listenerKeys_[n].forEach(ie),delete this.listenerKeys_[n],this.dispatchEvent(new cn("removelayer",e)),this.changed()},e.prototype.getLayers=function(){return this.get(un.LAYERS)},e.prototype.setLayers=function(t){var e=this.getLayers();if(e)for(var n=e.getArray(),i=0,o=n.length;i<o;++i)this.dispatchEvent(new cn("removelayer",n[i]));this.set(un.LAYERS,t)},e.prototype.getLayersArray=function(t){var e=void 0!==t?t:[];return this.getLayers().forEach((function(t){t.getLayersArray(e)})),e},e.prototype.getLayerStatesArray=function(t){var e=void 0!==t?t:[],n=e.length;this.getLayers().forEach((function(t){t.getLayerStatesArray(e)}));var i=this.getLayerState(),o=i.zIndex;t||void 0!==i.zIndex||(o=0);for(var r=n,s=e.length;r<s;r++){var a=e[r];a.opacity*=i.opacity,a.visible=a.visible&&i.visible,a.maxResolution=Math.min(a.maxResolution,i.maxResolution),a.minResolution=Math.max(a.minResolution,i.minResolution),a.minZoom=Math.max(a.minZoom,i.minZoom),a.maxZoom=Math.min(a.maxZoom,i.maxZoom),void 0!==i.extent&&(void 0!==a.extent?a.extent=ft(a.extent,i.extent):a.extent=i.extent),void 0===a.zIndex&&(a.zIndex=o)}return e},e.prototype.getSourceState=function(){return"ready"},e}(ye),dn=pn,fn=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!==typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),yn=function(t){function e(e,n,i){var o=t.call(this,e)||this;return o.map=n,o.frameState=void 0!==i?i:null,o}return fn(e,t),e}(Kt),gn=yn,vn=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!==typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),mn=function(t){function e(e,n,i,o,r,s){var a=t.call(this,e,n,r)||this;return a.originalEvent=i,a.pixel_=null,a.coordinate_=null,a.dragging=void 0!==o&&o,a.activePointers=s,a}return vn(e,t),Object.defineProperty(e.prototype,"pixel",{get:function(){return this.pixel_||(this.pixel_=this.map.getEventPixel(this.originalEvent)),this.pixel_},set:function(t){this.pixel_=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"coordinate",{get:function(){return this.coordinate_||(this.coordinate_=this.map.getCoordinateFromPixel(this.pixel)),this.coordinate_},set:function(t){this.coordinate_=t},enumerable:!1,configurable:!0}),e.prototype.preventDefault=function(){t.prototype.preventDefault.call(this),"preventDefault"in this.originalEvent&&this.originalEvent.preventDefault()},e.prototype.stopPropagation=function(){t.prototype.stopPropagation.call(this),"stopPropagation"in this.originalEvent&&this.originalEvent.stopPropagation()},e}(gn),_n=mn,bn={SINGLECLICK:"singleclick",CLICK:te.CLICK,DBLCLICK:te.DBLCLICK,POINTERDRAG:"pointerdrag",POINTERMOVE:"pointermove",POINTERDOWN:"pointerdown",POINTERUP:"pointerup",POINTEROVER:"pointerover",POINTEROUT:"pointerout",POINTERENTER:"pointerenter",POINTERLEAVE:"pointerleave",POINTERCANCEL:"pointercancel"},wn={POINTERMOVE:"pointermove",POINTERDOWN:"pointerdown",POINTERUP:"pointerup",POINTEROVER:"pointerover",POINTEROUT:"pointerout",POINTERENTER:"pointerenter",POINTERLEAVE:"pointerleave",POINTERCANCEL:"pointercancel"},Cn=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!==typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),xn=function(t){function e(e,n){var i=t.call(this,e)||this;i.map_=e,i.clickTimeoutId_,i.emulateClicks_=!1,i.dragging_=!1,i.dragListenerKeys_=[],i.moveTolerance_=void 0===n?1:n,i.down_=null;var o=i.map_.getViewport();return i.activePointers_=[],i.trackedTouches_={},i.element_=o,i.pointerdownListenerKey_=ee(o,wn.POINTERDOWN,i.handlePointerDown_,i),i.originalPointerMoveEvent_,i.relayedListenerKey_=ee(o,wn.POINTERMOVE,i.relayMoveEvent_,i),i.boundHandleTouchMove_=i.handleTouchMove_.bind(i),i.element_.addEventListener(te.TOUCHMOVE,i.boundHandleTouchMove_,!!S&&{passive:!1}),i}return Cn(e,t),e.prototype.emulateClick_=function(t){var e=new _n(bn.CLICK,this.map_,t);this.dispatchEvent(e),void 0!==this.clickTimeoutId_?(clearTimeout(this.clickTimeoutId_),this.clickTimeoutId_=void 0,e=new _n(bn.DBLCLICK,this.map_,t),this.dispatchEvent(e)):this.clickTimeoutId_=setTimeout(function(){this.clickTimeoutId_=void 0;var e=new _n(bn.SINGLECLICK,this.map_,t);this.dispatchEvent(e)}.bind(this),250)},e.prototype.updateActivePointers_=function(t){var e=t,n=e.pointerId;if(e.type==bn.POINTERUP||e.type==bn.POINTERCANCEL){for(var i in delete this.trackedTouches_[n],this.trackedTouches_)if(this.trackedTouches_[i].target!==e.target){delete this.trackedTouches_[i];break}}else e.type!=bn.POINTERDOWN&&e.type!=bn.POINTERMOVE||(this.trackedTouches_[n]=e);this.activePointers_=Wt(this.trackedTouches_)},e.prototype.handlePointerUp_=function(t){this.updateActivePointers_(t);var e=new _n(bn.POINTERUP,this.map_,t,void 0,void 0,this.activePointers_);this.dispatchEvent(e),this.emulateClicks_&&!e.defaultPrevented&&!this.dragging_&&this.isMouseActionButton_(t)&&this.emulateClick_(this.down_),0===this.activePointers_.length&&(this.dragListenerKeys_.forEach(ie),this.dragListenerKeys_.length=0,this.dragging_=!1,this.down_=null)},e.prototype.isMouseActionButton_=function(t){return 0===t.button},e.prototype.handlePointerDown_=function(t){this.emulateClicks_=0===this.activePointers_.length,this.updateActivePointers_(t);var e=new _n(bn.POINTERDOWN,this.map_,t,void 0,void 0,this.activePointers_);for(var n in this.dispatchEvent(e),this.down_={},t){var i=t[n];this.down_[n]="function"===typeof i?y:i}if(0===this.dragListenerKeys_.length){var o=this.map_.getOwnerDocument();this.dragListenerKeys_.push(ee(o,bn.POINTERMOVE,this.handlePointerMove_,this),ee(o,bn.POINTERUP,this.handlePointerUp_,this),ee(this.element_,bn.POINTERCANCEL,this.handlePointerUp_,this)),this.element_.getRootNode&&this.element_.getRootNode()!==o&&this.dragListenerKeys_.push(ee(this.element_.getRootNode(),bn.POINTERUP,this.handlePointerUp_,this))}},e.prototype.handlePointerMove_=function(t){if(this.isMoving_(t)){this.updateActivePointers_(t),this.dragging_=!0;var e=new _n(bn.POINTERDRAG,this.map_,t,this.dragging_,void 0,this.activePointers_);this.dispatchEvent(e)}},e.prototype.relayMoveEvent_=function(t){this.originalPointerMoveEvent_=t;var e=!(!this.down_||!this.isMoving_(t));this.dispatchEvent(new _n(bn.POINTERMOVE,this.map_,t,e))},e.prototype.handleTouchMove_=function(t){var e=this.originalPointerMoveEvent_;e&&!e.defaultPrevented||"boolean"===typeof t.cancelable&&!0!==t.cancelable||t.preventDefault()},e.prototype.isMoving_=function(t){return this.dragging_||Math.abs(t.clientX-this.down_.clientX)>this.moveTolerance_||Math.abs(t.clientY-this.down_.clientY)>this.moveTolerance_},e.prototype.disposeInternal=function(){this.relayedListenerKey_&&(ie(this.relayedListenerKey_),this.relayedListenerKey_=null),this.element_.removeEventListener(te.TOUCHMOVE,this.boundHandleTouchMove_),this.pointerdownListenerKey_&&(ie(this.pointerdownListenerKey_),this.pointerdownListenerKey_=null),this.dragListenerKeys_.forEach(ie),this.dragListenerKeys_.length=0,this.element_=null,t.prototype.disposeInternal.call(this)},e}(Qt),En=xn,Mn={POSTRENDER:"postrender",MOVESTART:"movestart",MOVEEND:"moveend",LOADSTART:"loadstart",LOADEND:"loadend"},Pn={LAYERGROUP:"layergroup",SIZE:"size",TARGET:"target",VIEW:"view"},Tn=1/0,An=function(){function t(t,e){this.priorityFunction_=t,this.keyFunction_=e,this.elements_=[],this.priorities_=[],this.queuedElements_={}}return t.prototype.clear=function(){this.elements_.length=0,this.priorities_.length=0,Jt(this.queuedElements_)},t.prototype.dequeue=function(){var t=this.elements_,e=this.priorities_,n=t[0];1==t.length?(t.length=0,e.length=0):(t[0]=t.pop(),e[0]=e.pop(),this.siftUp_(0));var i=this.keyFunction_(n);return delete this.queuedElements_[i],n},t.prototype.enqueue=function(t){I(!(this.keyFunction_(t)in this.queuedElements_),31);var e=this.priorityFunction_(t);return e!=Tn&&(this.elements_.push(t),this.priorities_.push(e),this.queuedElements_[this.keyFunction_(t)]=!0,this.siftDown_(0,this.elements_.length-1),!0)},t.prototype.getCount=function(){return this.elements_.length},t.prototype.getLeftChildIndex_=function(t){return 2*t+1},t.prototype.getRightChildIndex_=function(t){return 2*t+2},t.prototype.getParentIndex_=function(t){return t-1>>1},t.prototype.heapify_=function(){var t;for(t=(this.elements_.length>>1)-1;t>=0;t--)this.siftUp_(t)},t.prototype.isEmpty=function(){return 0===this.elements_.length},t.prototype.isKeyQueued=function(t){return t in this.queuedElements_},t.prototype.isQueued=function(t){return this.isKeyQueued(this.keyFunction_(t))},t.prototype.siftUp_=function(t){var e=this.elements_,n=this.priorities_,i=e.length,o=e[t],r=n[t],s=t;while(t<i>>1){var a=this.getLeftChildIndex_(t),l=this.getRightChildIndex_(t),h=l<i&&n[l]<n[a]?l:a;e[t]=e[h],n[t]=n[h],t=h}e[t]=o,n[t]=r,this.siftDown_(s,t)},t.prototype.siftDown_=function(t,e){var n=this.elements_,i=this.priorities_,o=n[e],r=i[e];while(e>t){var s=this.getParentIndex_(e);if(!(i[s]>r))break;n[e]=n[s],i[e]=i[s],e=s}n[e]=o,i[e]=r},t.prototype.reprioritize=function(){var t,e,n,i=this.priorityFunction_,o=this.elements_,r=this.priorities_,s=0,a=o.length;for(e=0;e<a;++e)t=o[e],n=i(t),n==Tn?delete this.queuedElements_[this.keyFunction_(t)]:(r[s]=n,o[s++]=t);o.length=s,r.length=s,this.heapify_()},t}(),Sn=An,On={IDLE:0,LOADING:1,LOADED:2,ERROR:3,EMPTY:4},Rn=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!==typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),Ln=function(t){function e(e,n){var i=t.call(this,(function(t){return e.apply(null,t)}),(function(t){return t[0].getKey()}))||this;return i.boundHandleTileChange_=i.handleTileChange.bind(i),i.tileChangeCallback_=n,i.tilesLoading_=0,i.tilesLoadingKeys_={},i}return Rn(e,t),e.prototype.enqueue=function(e){var n=t.prototype.enqueue.call(this,e);if(n){var i=e[0];i.addEventListener(te.CHANGE,this.boundHandleTileChange_)}return n},e.prototype.getTilesLoading=function(){return this.tilesLoading_},e.prototype.handleTileChange=function(t){var e=t.target,n=e.getState();if(n===On.LOADED||n===On.ERROR||n===On.EMPTY){e.removeEventListener(te.CHANGE,this.boundHandleTileChange_);var i=e.getKey();i in this.tilesLoadingKeys_&&(delete this.tilesLoadingKeys_[i],--this.tilesLoading_),this.tileChangeCallback_()}},e.prototype.loadMoreTiles=function(t,e){var n,i,o,r=0;while(this.tilesLoading_<t&&r<e&&this.getCount()>0)i=this.dequeue()[0],o=i.getKey(),n=i.getState(),n!==On.IDLE||o in this.tilesLoadingKeys_||(this.tilesLoadingKeys_[o]=!0,++this.tilesLoading_,++r,i.load())},e}(Sn),In=Ln;function kn(t,e,n,i,o){if(!t||!(n in t.wantedTiles))return Tn;if(!t.wantedTiles[n][e.getKey()])return Tn;var r=t.viewState.center,s=i[0]-r[0],a=i[1]-r[1];return 65536*Math.log(o)+Math.sqrt(s*s+a*a)/o}var jn={RADIANS:"radians",DEGREES:"degrees",FEET:"ft",METERS:"m",PIXELS:"pixels",TILE_PIXELS:"tile-pixels",USFEET:"us-ft"};jn.METERS,jn.FEET,jn.USFEET,jn.RADIANS,jn.DEGREES;var Nn={};Nn[jn.RADIANS]=6370997/(2*Math.PI),Nn[jn.DEGREES]=2*Math.PI*6370997/360,Nn[jn.FEET]=.3048,Nn[jn.METERS]=1,Nn[jn.USFEET]=1200/3937;var Dn=jn,Gn={ANIMATING:0,INTERACTING:1},Fn={CENTER:"center",RESOLUTION:"resolution",ROTATION:"rotation"},Bn=256,Zn=function(){function t(t){this.code_=t.code,this.units_=t.units,this.extent_=void 0!==t.extent?t.extent:null,this.worldExtent_=void 0!==t.worldExtent?t.worldExtent:null,this.axisOrientation_=void 0!==t.axisOrientation?t.axisOrientation:"enu",this.global_=void 0!==t.global&&t.global,this.canWrapX_=!(!this.global_||!this.extent_),this.getPointResolutionFunc_=t.getPointResolution,this.defaultTileGrid_=null,this.metersPerUnit_=t.metersPerUnit}return t.prototype.canWrapX=function(){return this.canWrapX_},t.prototype.getCode=function(){return this.code_},t.prototype.getExtent=function(){return this.extent_},t.prototype.getUnits=function(){return this.units_},t.prototype.getMetersPerUnit=function(){return this.metersPerUnit_||Nn[this.units_]},t.prototype.getWorldExtent=function(){return this.worldExtent_},t.prototype.getAxisOrientation=function(){return this.axisOrientation_},t.prototype.isGlobal=function(){return this.global_},t.prototype.setGlobal=function(t){this.global_=t,this.canWrapX_=!(!t||!this.extent_)},t.prototype.getDefaultTileGrid=function(){return this.defaultTileGrid_},t.prototype.setDefaultTileGrid=function(t){this.defaultTileGrid_=t},t.prototype.setExtent=function(t){this.extent_=t,this.canWrapX_=!(!this.global_||!t)},t.prototype.setWorldExtent=function(t){this.worldExtent_=t},t.prototype.setGetPointResolution=function(t){this.getPointResolutionFunc_=t},t.prototype.getPointResolutionFunc=function(){return this.getPointResolutionFunc_},t}(),Vn=Zn,zn=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!==typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),Hn=6378137,Kn=Math.PI*Hn,Xn=[-Kn,-Kn,Kn,Kn],Un=[-180,-85,180,85],Jn=Hn*Math.log(Math.tan(Math.PI/2)),Wn=function(t){function e(e){return t.call(this,{code:e,units:Dn.METERS,extent:Xn,global:!0,worldExtent:Un,getPointResolution:function(t,e){return t/Et(e[1]/Hn)}})||this}return zn(e,t),e}(Vn),Yn=[new Wn("EPSG:3857"),new Wn("EPSG:102100"),new Wn("EPSG:102113"),new Wn("EPSG:900913"),new Wn("http://www.opengis.net/def/crs/EPSG/0/3857"),new Wn("http://www.opengis.net/gml/srs/epsg.xml#3857")];function $n(t,e,n){var i=t.length,o=n>1?n:2,r=e;void 0===r&&(r=o>2?t.slice():new Array(i));for(var s=0;s<i;s+=o){r[s]=Kn*t[s]/180;var a=Hn*Math.log(Math.tan(Math.PI*(+t[s+1]+90)/360));a>Jn?a=Jn:a<-Jn&&(a=-Jn),r[s+1]=a}return r}function qn(t,e,n){var i=t.length,o=n>1?n:2,r=e;void 0===r&&(r=o>2?t.slice():new Array(i));for(var s=0;s<i;s+=o)r[s]=180*t[s]/Kn,r[s+1]=360*Math.atan(Math.exp(t[s+1]/Hn))/Math.PI-90;return r}var Qn=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!==typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),ti=6378137,ei=[-180,-90,180,90],ni=Math.PI*ti/180,ii=function(t){function e(e,n){return t.call(this,{code:e,units:Dn.DEGREES,extent:ei,axisOrientation:n,global:!0,metersPerUnit:ni,worldExtent:ei})||this}return Qn(e,t),e}(Vn),oi=[new ii("CRS:84"),new ii("EPSG:4326","neu"),new ii("urn:ogc:def:crs:OGC:1.3:CRS84"),new ii("urn:ogc:def:crs:OGC:2:84"),new ii("http://www.opengis.net/def/crs/OGC/1.3/CRS84"),new ii("http://www.opengis.net/gml/srs/epsg.xml#4326","neu"),new ii("http://www.opengis.net/def/crs/EPSG/0/4326","neu")],ri={};function si(t){return ri[t]||ri[t.replace(/urn:(x-)?ogc:def:crs:EPSG:(.*:)?(\w+)$/,"EPSG:$3")]||null}function ai(t,e){ri[t]=e}var li={};function hi(t,e,n){var i=t.getCode(),o=e.getCode();i in li||(li[i]={}),li[i][o]=n}function ci(t,e){var n;return t in li&&e in li[t]&&(n=li[t][e]),n}var ui=6371008.8;function pi(t,e,n){var i=n||ui,o=St(t[1]),r=St(e[1]),s=(r-o)/2,a=St(e[0]-t[0])/2,l=Math.sin(s)*Math.sin(s)+Math.sin(a)*Math.sin(a)*Math.cos(o)*Math.cos(r);return 2*i*Math.atan2(Math.sqrt(l),Math.sqrt(1-l))}var di=!0;function fi(t){var e=void 0===t||t;di=!e}function yi(t,e,n){var i;if(void 0!==e){for(var o=0,r=t.length;o<r;++o)e[o]=t[o];i=e}else i=t.slice();return i}function gi(t,e,n){if(void 0!==e&&t!==e){for(var i=0,o=t.length;i<o;++i)e[i]=t[i];t=e}return t}function vi(t){ai(t.getCode(),t),hi(t,t,yi)}function mi(t){t.forEach(vi)}function _i(t){return"string"===typeof t?si(t):t||null}function bi(t,e,n,i){var o;t=_i(t);var r=t.getPointResolutionFunc();if(r){if(o=r(e,n),i&&i!==t.getUnits()){var s=t.getMetersPerUnit();s&&(o=o*s/Nn[i])}}else{var a=t.getUnits();if(a==Dn.DEGREES&&!i||i==Dn.DEGREES)o=e;else{var l=Mi(t,_i("EPSG:4326"));if(l===gi&&a!==Dn.DEGREES)o=e*t.getMetersPerUnit();else{var h=[n[0]-e/2,n[1],n[0]+e/2,n[1],n[0],n[1]-e/2,n[0],n[1]+e/2];h=l(h,h,2);var c=pi(h.slice(0,2),h.slice(2,4)),u=pi(h.slice(4,6),h.slice(6,8));o=(c+u)/2}s=i?Nn[i]:t.getMetersPerUnit();void 0!==s&&(o/=s)}}return o}function wi(t){mi(t),t.forEach((function(e){t.forEach((function(t){e!==t&&hi(e,t,yi)}))}))}function Ci(t,e,n,i){t.forEach((function(t){e.forEach((function(e){hi(t,e,n),hi(e,t,i)}))}))}function xi(t,e){return t?"string"===typeof t?_i(t):t:_i(e)}function Ei(t,e){if(t===e)return!0;var n=t.getUnits()===e.getUnits();if(t.getCode()===e.getCode())return n;var i=Mi(t,e);return i===yi&&n}function Mi(t,e){var n=t.getCode(),i=e.getCode(),o=ci(n,i);return o||(o=gi),o}function Pi(t,e){var n=_i(t),i=_i(e);return Mi(n,i)}function Ti(t,e,n){var i=Pi(e,n);return i(t,void 0,t.length)}function Ai(t,e,n,i){var o=Pi(e,n);return Ct(t,o,void 0,i)}var Si=null;function Oi(){return Si}function Ri(t,e){return Si?Ti(t,e,Si):t}function Li(t,e){return Si?Ti(t,Si,e):(di&&!Ce(t,[0,0])&&t[0]>=-180&&t[0]<=180&&t[1]>=-90&&t[1]<=90&&(di=!1,console.warn("Call useGeographic() from ol/proj once to work with [longitude, latitude] coordinates.")),t)}function Ii(t,e){return Si?Ai(t,e,Si):t}function ki(t,e){return Si?Ai(t,Si,e):t}function ji(){wi(Yn),wi(oi),Ci(oi,Yn,$n,qn)}function Ni(t,e,n){return function(i,o,r,s,a){if(i){if(!o&&!e)return i;var l=e?0:r[0]*o,h=e?0:r[1]*o,c=a?a[0]:0,u=a?a[1]:0,p=t[0]+l/2+c,d=t[2]-l/2+c,f=t[1]+h/2+u,y=t[3]-h/2+u;p>d&&(p=(d+p)/2,d=p),f>y&&(f=(y+f)/2,y=f);var g=xt(i[0],p,d),v=xt(i[1],f,y);if(s&&n&&o){var m=30*o;g+=-m*Math.log(1+Math.max(0,p-i[0])/m)+m*Math.log(1+Math.max(0,i[0]-d)/m),v+=-m*Math.log(1+Math.max(0,f-i[1])/m)+m*Math.log(1+Math.max(0,i[1]-y)/m)}return[g,v]}}}function Di(t){return t}function Gi(t,e,n,i){var o=vt(e)/n[0],r=dt(e)/n[1];return i?Math.min(t,Math.max(o,r)):Math.min(t,Math.min(o,r))}function Fi(t,e,n){var i=Math.min(t,e),o=50;return i*=Math.log(1+o*Math.max(0,t/e-1))/o+1,n&&(i=Math.max(i,n),i/=Math.log(1+o*Math.max(0,n/t-1))/o+1),xt(i,n/2,2*e)}function Bi(t,e,n,i){return function(o,r,s,a){if(void 0!==o){var l=t[0],h=t[t.length-1],u=n?Gi(l,n,s,i):l;if(a){var p=void 0===e||e;return p?Fi(o,u,h):xt(o,h,u)}var d=Math.min(u,o),f=Math.floor(c(t,d,r));return t[f]>u&&f<t.length-1?t[f+1]:t[f]}}}function Zi(t,e,n,i,o,r){return function(s,a,l,h){if(void 0!==s){var c=o?Gi(e,o,l,r):e,u=void 0!==n?n:0;if(h){var p=void 0===i||i;return p?Fi(s,c,u):xt(s,u,c)}var d=1e-9,f=Math.ceil(Math.log(e/c)/Math.log(t)-d),y=-a*(.5-d)+.5,g=Math.min(c,s),v=Math.floor(Math.log(e/g)/Math.log(t)+y),m=Math.max(f,v),_=e/Math.pow(t,m);return xt(_,u,c)}}}function Vi(t,e,n,i,o){return function(r,s,a,l){if(void 0!==r){var h=i?Gi(t,i,a,o):t,c=void 0===n||n;return c&&l?Fi(r,h,e):xt(r,e,h)}}}function zi(t){return void 0!==t?0:void 0}function Hi(t){return void 0!==t?t:void 0}function Ki(t){var e=2*Math.PI/t;return function(t,n){return n?t:void 0!==t?(t=Math.floor(t/e+.5)*e,t):void 0}}function Xi(t){var e=t||St(5);return function(t,n){return n?t:void 0!==t?Math.abs(t)<=e?0:t:void 0}}function Ui(t){return Math.pow(t,3)}function Ji(t){return 1-Ui(1-t)}function Wi(t){return 3*t*t-2*t*t*t}function Yi(t){return t}ji();var $i={XY:"XY",XYZ:"XYZ",XYM:"XYM",XYZM:"XYZM"};function qi(t,e,n,i,o,r){for(var s=r||[],a=0,l=e;l<n;l+=i){var h=t[l],c=t[l+1];s[a++]=o[0]*h+o[2]*c+o[4],s[a++]=o[1]*h+o[3]*c+o[5]}return r&&s.length!=a&&(s.length=a),s}function Qi(t,e,n,i,o,r,s){for(var a=s||[],l=Math.cos(o),h=Math.sin(o),c=r[0],u=r[1],p=0,d=e;d<n;d+=i){var f=t[d]-c,y=t[d+1]-u;a[p++]=c+f*l-y*h,a[p++]=u+f*h+y*l;for(var g=d+2;g<d+i;++g)a[p++]=t[g]}return s&&a.length!=p&&(a.length=p),a}function to(t,e,n,i,o,r,s,a){for(var l=a||[],h=s[0],c=s[1],u=0,p=e;p<n;p+=i){var d=t[p]-h,f=t[p+1]-c;l[u++]=h+o*d,l[u++]=c+r*f;for(var y=p+2;y<p+i;++y)l[u++]=t[y]}return a&&l.length!=u&&(l.length=u),l}function eo(t,e,n,i,o,r,s){for(var a=s||[],l=0,h=e;h<n;h+=i){a[l++]=t[h]+o,a[l++]=t[h+1]+r;for(var c=h+2;c<h+i;++c)a[l++]=t[c]}return s&&a.length!=l&&(a.length=l),a}var no=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!==typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),io=j(),oo=function(t){function e(){var e=t.call(this)||this;return e.extent_=Y(),e.extentRevision_=-1,e.simplifiedGeometryMaxMinSquaredTolerance=0,e.simplifiedGeometryRevision=0,e.simplifyTransformedInternal=g((function(t,e,n){if(!n)return this.getSimplifiedGeometry(e);var i=this.clone();return i.applyTransform(n),i.getSimplifiedGeometry(e)})),e}return no(e,t),e.prototype.simplifyTransformed=function(t,e){return this.simplifyTransformedInternal(this.getRevision(),t,e)},e.prototype.clone=function(){return v()},e.prototype.closestPointXY=function(t,e,n,i){return v()},e.prototype.containsXY=function(t,e){var n=this.getClosestPoint([t,e]);return n[0]===t&&n[1]===e},e.prototype.getClosestPoint=function(t,e){var n=e||[NaN,NaN];return this.closestPointXY(t[0],t[1],n,1/0),n},e.prototype.intersectsCoordinate=function(t){return this.containsXY(t[0],t[1])},e.prototype.computeExtent=function(t){return v()},e.prototype.getExtent=function(t){if(this.extentRevision_!=this.getRevision()){var e=this.computeExtent(this.extent_);(isNaN(e[0])||isNaN(e[1]))&&q(e),this.extentRevision_=this.getRevision()}return bt(this.extent_,t)},e.prototype.rotate=function(t,e){v()},e.prototype.scale=function(t,e,n){v()},e.prototype.simplify=function(t){return this.getSimplifiedGeometry(t*t)},e.prototype.getSimplifiedGeometry=function(t){return v()},e.prototype.getType=function(){return v()},e.prototype.applyTransform=function(t){v()},e.prototype.intersectsExtent=function(t){return v()},e.prototype.translate=function(t,e){v()},e.prototype.transform=function(t,e){var n=_i(t),i=n.getUnits()==Dn.TILE_PIXELS?function(t,i,o){var r=n.getExtent(),s=n.getWorldExtent(),a=dt(s)/dt(r);return D(io,s[0],s[3],a,-a,0,0,0),qi(t,0,t.length,o,io,i),Pi(n,e)(t,i,o)}:Pi(n,e);return this.applyTransform(i),this},e}(ue),ro=oo,so=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!==typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),ao=function(t){function e(){var e=t.call(this)||this;return e.layout=$i.XY,e.stride=2,e.flatCoordinates=null,e}return so(e,t),e.prototype.computeExtent=function(t){return tt(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,t)},e.prototype.getCoordinates=function(){return v()},e.prototype.getFirstCoordinate=function(){return this.flatCoordinates.slice(0,this.stride)},e.prototype.getFlatCoordinates=function(){return this.flatCoordinates},e.prototype.getLastCoordinate=function(){return this.flatCoordinates.slice(this.flatCoordinates.length-this.stride)},e.prototype.getLayout=function(){return this.layout},e.prototype.getSimplifiedGeometry=function(t){if(this.simplifiedGeometryRevision!==this.getRevision()&&(this.simplifiedGeometryMaxMinSquaredTolerance=0,this.simplifiedGeometryRevision=this.getRevision()),t<0||0!==this.simplifiedGeometryMaxMinSquaredTolerance&&t<=this.simplifiedGeometryMaxMinSquaredTolerance)return this;var e=this.getSimplifiedGeometryInternal(t),n=e.getFlatCoordinates();return n.length<this.flatCoordinates.length?e:(this.simplifiedGeometryMaxMinSquaredTolerance=t,this)},e.prototype.getSimplifiedGeometryInternal=function(t){return this},e.prototype.getStride=function(){return this.stride},e.prototype.setFlatCoordinates=function(t,e){this.stride=ho(t),this.layout=t,this.flatCoordinates=e},e.prototype.setCoordinates=function(t,e){v()},e.prototype.setLayout=function(t,e,n){var i;if(t)i=ho(t);else{for(var o=0;o<n;++o){if(0===e.length)return this.layout=$i.XY,void(this.stride=2);e=e[0]}i=e.length,t=lo(i)}this.layout=t,this.stride=i},e.prototype.applyTransform=function(t){this.flatCoordinates&&(t(this.flatCoordinates,this.flatCoordinates,this.stride),this.changed())},e.prototype.rotate=function(t,e){var n=this.getFlatCoordinates();if(n){var i=this.getStride();Qi(n,0,n.length,i,t,e,n),this.changed()}},e.prototype.scale=function(t,e,n){var i=e;void 0===i&&(i=t);var o=n;o||(o=ct(this.getExtent()));var r=this.getFlatCoordinates();if(r){var s=this.getStride();to(r,0,r.length,s,t,i,o,r),this.changed()}},e.prototype.translate=function(t,e){var n=this.getFlatCoordinates();if(n){var i=this.getStride();eo(n,0,n.length,i,t,e,n),this.changed()}},e}(ro);function lo(t){var e;return 2==t?e=$i.XY:3==t?e=$i.XYZ:4==t&&(e=$i.XYZM),e}function ho(t){var e;return t==$i.XY?e=2:t==$i.XYZ||t==$i.XYM?e=3:t==$i.XYZM&&(e=4),e}var co=ao;function uo(t,e,n,i,o,r,s){var a,l=t[e],h=t[e+1],c=t[n]-l,u=t[n+1]-h;if(0===c&&0===u)a=e;else{var p=((o-l)*c+(r-h)*u)/(c*c+u*u);if(p>1)a=n;else{if(p>0){for(var d=0;d<i;++d)s[d]=Rt(t[e+d],t[n+d],p);return void(s.length=i)}a=e}}for(d=0;d<i;++d)s[d]=t[a+d];s.length=i}function po(t,e,n,i,o){var r=t[e],s=t[e+1];for(e+=i;e<n;e+=i){var a=t[e],l=t[e+1],h=Tt(r,s,a,l);h>o&&(o=h),r=a,s=l}return o}function fo(t,e,n,i,o){for(var r=0,s=n.length;r<s;++r){var a=n[r];o=po(t,e,a,i,o),e=a}return o}function yo(t,e,n,i,o,r,s,a,l,h,c){if(e==n)return h;var u,p;if(0===o){if(p=Tt(s,a,t[e],t[e+1]),p<h){for(u=0;u<i;++u)l[u]=t[e+u];return l.length=i,p}return h}var d=c||[NaN,NaN],f=e+i;while(f<n)if(uo(t,f-i,f,i,s,a,d),p=Tt(s,a,d[0],d[1]),p<h){for(h=p,u=0;u<i;++u)l[u]=d[u];l.length=i,f+=i}else f+=i*Math.max((Math.sqrt(p)-Math.sqrt(h))/o|0,1);if(r&&(uo(t,n-i,e,i,s,a,d),p=Tt(s,a,d[0],d[1]),p<h)){for(h=p,u=0;u<i;++u)l[u]=d[u];l.length=i}return h}function go(t,e,n,i,o,r,s,a,l,h,c){for(var u=c||[NaN,NaN],p=0,d=n.length;p<d;++p){var f=n[p];h=yo(t,e,f,i,o,r,s,a,l,h,u),e=f}return h}function vo(t,e,n,i){for(var o=0,r=n.length;o<r;++o)t[e++]=n[o];return e}function mo(t,e,n,i){for(var o=0,r=n.length;o<r;++o)for(var s=n[o],a=0;a<i;++a)t[e++]=s[a];return e}function _o(t,e,n,i,o){for(var r=o||[],s=0,a=0,l=n.length;a<l;++a){var h=mo(t,e,n[a],i);r[s++]=h,e=h}return r.length=s,r}function bo(t,e,n,i,o,r,s){var a=(n-e)/i;if(a<3){for(;e<n;e+=i)r[s++]=t[e],r[s++]=t[e+1];return s}var l=new Array(a);l[0]=1,l[a-1]=1;var h=[e,n-i],c=0;while(h.length>0){for(var u=h.pop(),p=h.pop(),d=0,f=t[p],y=t[p+1],g=t[u],v=t[u+1],m=p+i;m<u;m+=i){var _=t[m],b=t[m+1],w=Pt(_,b,f,y,g,v);w>d&&(c=m,d=w)}d>o&&(l[(c-e)/i]=1,p+i<c&&h.push(p,c),c+i<u&&h.push(c,u))}for(m=0;m<a;++m)l[m]&&(r[s++]=t[e+m*i],r[s++]=t[e+m*i+1]);return s}function wo(t,e){return e*Math.round(t/e)}function Co(t,e,n,i,o,r,s){if(e==n)return s;var a,l,h=wo(t[e],o),c=wo(t[e+1],o);e+=i,r[s++]=h,r[s++]=c;do{if(a=wo(t[e],o),l=wo(t[e+1],o),e+=i,e==n)return r[s++]=a,r[s++]=l,s}while(a==h&&l==c);while(e<n){var u=wo(t[e],o),p=wo(t[e+1],o);if(e+=i,u!=a||p!=l){var d=a-h,f=l-c,y=u-h,g=p-c;d*g==f*y&&(d<0&&y<d||d==y||d>0&&y>d)&&(f<0&&g<f||f==g||f>0&&g>f)?(a=u,l=p):(r[s++]=a,r[s++]=l,h=a,c=l,a=u,l=p)}}return r[s++]=a,r[s++]=l,s}function xo(t,e,n,i,o,r,s,a){for(var l=0,h=n.length;l<h;++l){var c=n[l];s=Co(t,e,c,i,o,r,s),a.push(s),e=c}return s}function Eo(t,e,n,i,o){for(var r=void 0!==o?o:[],s=0,a=e;a<n;a+=i)r[s++]=t.slice(a,a+i);return r.length=s,r}function Mo(t,e,n,i,o){for(var r=void 0!==o?o:[],s=0,a=0,l=n.length;a<l;++a){var h=n[a];r[s++]=Eo(t,e,h,i,r[s]),e=h}return r.length=s,r}function Po(t,e,n,i){for(var o=0,r=t[n-i],s=t[n-i+1];e<n;e+=i){var a=t[e],l=t[e+1];o+=s*a-r*l,r=a,s=l}return o/2}function To(t,e,n,i){for(var o=0,r=0,s=n.length;r<s;++r){var a=n[r];o+=Po(t,e,a,i),e=a}return o}var Ao=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!==typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),So=function(t){function e(e,n){var i=t.call(this)||this;return i.maxDelta_=-1,i.maxDeltaRevision_=-1,void 0===n||Array.isArray(e[0])?i.setCoordinates(e,n):i.setFlatCoordinates(n,e),i}return Ao(e,t),e.prototype.clone=function(){return new e(this.flatCoordinates.slice(),this.layout)},e.prototype.closestPointXY=function(t,e,n,i){return i<K(this.getExtent(),t,e)?i:(this.maxDeltaRevision_!=this.getRevision()&&(this.maxDelta_=Math.sqrt(po(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,0)),this.maxDeltaRevision_=this.getRevision()),yo(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,this.maxDelta_,!0,t,e,n,i))},e.prototype.getArea=function(){return Po(this.flatCoordinates,0,this.flatCoordinates.length,this.stride)},e.prototype.getCoordinates=function(){return Eo(this.flatCoordinates,0,this.flatCoordinates.length,this.stride)},e.prototype.getSimplifiedGeometryInternal=function(t){var n=[];return n.length=bo(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,t,n,0),new e(n,$i.XY)},e.prototype.getType=function(){return"LinearRing"},e.prototype.intersectsExtent=function(t){return!1},e.prototype.setCoordinates=function(t,e){this.setLayout(e,t,1),this.flatCoordinates||(this.flatCoordinates=[]),this.flatCoordinates.length=mo(this.flatCoordinates,0,t,this.stride),this.changed()},e}(co),Oo=So,Ro=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!==typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),Lo=function(t){function e(e,n){var i=t.call(this)||this;return i.setCoordinates(e,n),i}return Ro(e,t),e.prototype.clone=function(){var t=new e(this.flatCoordinates.slice(),this.layout);return t.applyProperties(this),t},e.prototype.closestPointXY=function(t,e,n,i){var o=this.flatCoordinates,r=Tt(t,e,o[0],o[1]);if(r<i){for(var s=this.stride,a=0;a<s;++a)n[a]=o[a];return n.length=s,r}return i},e.prototype.getCoordinates=function(){return this.flatCoordinates?this.flatCoordinates.slice():[]},e.prototype.computeExtent=function(t){return Q(this.flatCoordinates,t)},e.prototype.getType=function(){return"Point"},e.prototype.intersectsExtent=function(t){return J(t,this.flatCoordinates[0],this.flatCoordinates[1])},e.prototype.setCoordinates=function(t,e){this.setLayout(e,t,0),this.flatCoordinates||(this.flatCoordinates=[]),this.flatCoordinates.length=vo(this.flatCoordinates,0,t,this.stride),this.changed()},e}(co),Io=Lo;function ko(t,e,n,i,o){var r=st(o,(function(o){return!jo(t,e,n,i,o[0],o[1])}));return!r}function jo(t,e,n,i,o,r){for(var s=0,a=t[n-i],l=t[n-i+1];e<n;e+=i){var h=t[e],c=t[e+1];l<=r?c>r&&(h-a)*(r-l)-(o-a)*(c-l)>0&&s++:c<=r&&(h-a)*(r-l)-(o-a)*(c-l)<0&&s--,a=h,l=c}return 0!==s}function No(t,e,n,i,o,r){if(0===n.length)return!1;if(!jo(t,e,n[0],i,o,r))return!1;for(var s=1,a=n.length;s<a;++s)if(jo(t,n[s-1],n[s],i,o,r))return!1;return!0}function Do(t,e,n,i,o,r,s){for(var a,l,c,u,p,d,f,y=o[r+1],g=[],v=0,m=n.length;v<m;++v){var _=n[v];for(u=t[_-i],d=t[_-i+1],a=e;a<_;a+=i)p=t[a],f=t[a+1],(y<=d&&f<=y||d<=y&&y<=f)&&(c=(y-d)/(f-d)*(p-u)+u,g.push(c)),u=p,d=f}var b=NaN,w=-1/0;for(g.sort(h),u=g[0],a=1,l=g.length;a<l;++a){p=g[a];var C=Math.abs(p-u);C>w&&(c=(u+p)/2,No(t,e,n,i,c,y)&&(b=c,w=C)),u=p}return isNaN(b)&&(b=o[r]),s?(s.push(b,y,w),s):[b,y,w]}function Go(t,e,n,i,o){var r;for(e+=i;e<n;e+=i)if(r=o(t.slice(e-i,e),t.slice(e,e+i)),r)return r;return!1}function Fo(t,e,n,i,o){var r=ot(Y(),t,e,n,i);return!!mt(o,r)&&(!!U(o,r)||(r[0]>=o[0]&&r[2]<=o[2]||(r[1]>=o[1]&&r[3]<=o[3]||Go(t,e,n,i,(function(t,e){return wt(o,t,e)})))))}function Bo(t,e,n,i,o){return!!Fo(t,e,n,i,o)||(!!jo(t,e,n,i,o[0],o[1])||(!!jo(t,e,n,i,o[0],o[3])||(!!jo(t,e,n,i,o[2],o[1])||!!jo(t,e,n,i,o[2],o[3]))))}function Zo(t,e,n,i,o){if(!Bo(t,e,n[0],i,o))return!1;if(1===n.length)return!0;for(var r=1,s=n.length;r<s;++r)if(ko(t,n[r-1],n[r],i,o)&&!Fo(t,n[r-1],n[r],i,o))return!1;return!0}function Vo(t,e,n,i){while(e<n-i){for(var o=0;o<i;++o){var r=t[e+o];t[e+o]=t[n-i+o],t[n-i+o]=r}e+=i,n-=i}}function zo(t,e,n,i){for(var o=0,r=t[n-i],s=t[n-i+1];e<n;e+=i){var a=t[e],l=t[e+1];o+=(a-r)*(l+s),r=a,s=l}return 0===o?void 0:o>0}function Ho(t,e,n,i,o){for(var r=void 0!==o&&o,s=0,a=n.length;s<a;++s){var l=n[s],h=zo(t,e,l,i);if(0===s){if(r&&h||!r&&!h)return!1}else if(r&&!h||!r&&h)return!1;e=l}return!0}function Ko(t,e,n,i,o){for(var r=void 0!==o&&o,s=0,a=n.length;s<a;++s){var l=n[s],h=zo(t,e,l,i),c=0===s?r&&h||!r&&!h:r&&!h||!r&&h;c&&Vo(t,e,l,i),e=l}return e}var Xo=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!==typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),Uo=function(t){function e(e,n,i){var o=t.call(this)||this;return o.ends_=[],o.flatInteriorPointRevision_=-1,o.flatInteriorPoint_=null,o.maxDelta_=-1,o.maxDeltaRevision_=-1,o.orientedRevision_=-1,o.orientedFlatCoordinates_=null,void 0!==n&&i?(o.setFlatCoordinates(n,e),o.ends_=i):o.setCoordinates(e,n),o}return Xo(e,t),e.prototype.appendLinearRing=function(t){this.flatCoordinates?u(this.flatCoordinates,t.getFlatCoordinates()):this.flatCoordinates=t.getFlatCoordinates().slice(),this.ends_.push(this.flatCoordinates.length),this.changed()},e.prototype.clone=function(){var t=new e(this.flatCoordinates.slice(),this.layout,this.ends_.slice());return t.applyProperties(this),t},e.prototype.closestPointXY=function(t,e,n,i){return i<K(this.getExtent(),t,e)?i:(this.maxDeltaRevision_!=this.getRevision()&&(this.maxDelta_=Math.sqrt(fo(this.flatCoordinates,0,this.ends_,this.stride,0)),this.maxDeltaRevision_=this.getRevision()),go(this.flatCoordinates,0,this.ends_,this.stride,this.maxDelta_,!0,t,e,n,i))},e.prototype.containsXY=function(t,e){return No(this.getOrientedFlatCoordinates(),0,this.ends_,this.stride,t,e)},e.prototype.getArea=function(){return To(this.getOrientedFlatCoordinates(),0,this.ends_,this.stride)},e.prototype.getCoordinates=function(t){var e;return void 0!==t?(e=this.getOrientedFlatCoordinates().slice(),Ko(e,0,this.ends_,this.stride,t)):e=this.flatCoordinates,Mo(e,0,this.ends_,this.stride)},e.prototype.getEnds=function(){return this.ends_},e.prototype.getFlatInteriorPoint=function(){if(this.flatInteriorPointRevision_!=this.getRevision()){var t=ct(this.getExtent());this.flatInteriorPoint_=Do(this.getOrientedFlatCoordinates(),0,this.ends_,this.stride,t,0),this.flatInteriorPointRevision_=this.getRevision()}return this.flatInteriorPoint_},e.prototype.getInteriorPoint=function(){return new Io(this.getFlatInteriorPoint(),$i.XYM)},e.prototype.getLinearRingCount=function(){return this.ends_.length},e.prototype.getLinearRing=function(t){return t<0||this.ends_.length<=t?null:new Oo(this.flatCoordinates.slice(0===t?0:this.ends_[t-1],this.ends_[t]),this.layout)},e.prototype.getLinearRings=function(){for(var t=this.layout,e=this.flatCoordinates,n=this.ends_,i=[],o=0,r=0,s=n.length;r<s;++r){var a=n[r],l=new Oo(e.slice(o,a),t);i.push(l),o=a}return i},e.prototype.getOrientedFlatCoordinates=function(){if(this.orientedRevision_!=this.getRevision()){var t=this.flatCoordinates;Ho(t,0,this.ends_,this.stride)?this.orientedFlatCoordinates_=t:(this.orientedFlatCoordinates_=t.slice(),this.orientedFlatCoordinates_.length=Ko(this.orientedFlatCoordinates_,0,this.ends_,this.stride)),this.orientedRevision_=this.getRevision()}return this.orientedFlatCoordinates_},e.prototype.getSimplifiedGeometryInternal=function(t){var n=[],i=[];return n.length=xo(this.flatCoordinates,0,this.ends_,this.stride,Math.sqrt(t),n,0,i),new e(n,$i.XY,i)},e.prototype.getType=function(){return"Polygon"},e.prototype.intersectsExtent=function(t){return Zo(this.getOrientedFlatCoordinates(),0,this.ends_,this.stride,t)},e.prototype.setCoordinates=function(t,e){this.setLayout(e,t,2),this.flatCoordinates||(this.flatCoordinates=[]);var n=_o(this.flatCoordinates,0,t,this.stride,this.ends_);this.flatCoordinates.length=0===n.length?0:n[n.length-1],this.changed()},e}(co),Jo=Uo;function Wo(t){var e=t[0],n=t[1],i=t[2],o=t[3],r=[e,n,e,o,i,o,i,n,e,n];return new Uo(r,$i.XY,[r.length])}var Yo=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!==typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),$o=0,qo=function(t){function e(e){var n=t.call(this)||this;n.on,n.once,n.un;var i=Ut({},e);return n.hints_=[0,0],n.animations_=[],n.updateAnimationKey_,n.projection_=xi(i.projection,"EPSG:3857"),n.viewportSize_=[100,100],n.targetCenter_=null,n.targetResolution_,n.targetRotation_,n.nextCenter_=null,n.nextResolution_,n.nextRotation_,n.cancelAnchor_=void 0,i.projection&&fi(),i.center&&(i.center=Li(i.center,n.projection_)),i.extent&&(i.extent=ki(i.extent,n.projection_)),n.applyOptions_(i),n}return Yo(e,t),e.prototype.applyOptions_=function(t){var e=Ut({},t);for(var n in Fn)delete e[n];this.setProperties(e,!0);var i=er(t);this.maxResolution_=i.maxResolution,this.minResolution_=i.minResolution,this.zoomFactor_=i.zoomFactor,this.resolutions_=t.resolutions,this.padding_=t.padding,this.minZoom_=i.minZoom;var o=tr(t),r=i.constraint,s=nr(t);this.constraints_={center:o,resolution:r,rotation:s},this.setRotation(void 0!==t.rotation?t.rotation:0),this.setCenterInternal(void 0!==t.center?t.center:null),void 0!==t.resolution?this.setResolution(t.resolution):void 0!==t.zoom&&this.setZoom(t.zoom)},Object.defineProperty(e.prototype,"padding",{get:function(){return this.padding_},set:function(t){var e=this.padding_;this.padding_=t;var n=this.getCenter();if(n){var i=t||[0,0,0,0];e=e||[0,0,0,0];var o=this.getResolution(),r=o/2*(i[3]-e[3]+e[1]-i[1]),s=o/2*(i[0]-e[0]+e[2]-i[2]);this.setCenterInternal([n[0]+r,n[1]-s])}},enumerable:!1,configurable:!0}),e.prototype.getUpdatedOptions_=function(t){var e=this.getProperties();return void 0!==e.resolution?e.resolution=this.getResolution():e.zoom=this.getZoom(),e.center=this.getCenterInternal(),e.rotation=this.getRotation(),Ut({},e,t)},e.prototype.animate=function(t){this.isDef()&&!this.getAnimating()&&this.resolveConstraints(0);for(var e=new Array(arguments.length),n=0;n<e.length;++n){var i=arguments[n];i.center&&(i=Ut({},i),i.center=Li(i.center,this.getProjection())),i.anchor&&(i=Ut({},i),i.anchor=Li(i.anchor,this.getProjection())),e[n]=i}this.animateInternal.apply(this,e)},e.prototype.animateInternal=function(t){var e,n=arguments.length;n>1&&"function"===typeof arguments[n-1]&&(e=arguments[n-1],--n);for(var i=0;i<n&&!this.isDef();++i){var o=arguments[i];o.center&&this.setCenterInternal(o.center),void 0!==o.zoom?this.setZoom(o.zoom):o.resolution&&this.setResolution(o.resolution),void 0!==o.rotation&&this.setRotation(o.rotation)}if(i!==n){for(var r=Date.now(),s=this.targetCenter_.slice(),a=this.targetResolution_,l=this.targetRotation_,h=[];i<n;++i){var c=arguments[i],u={start:r,complete:!1,anchor:c.anchor,duration:void 0!==c.duration?c.duration:1e3,easing:c.easing||Wi,callback:e};if(c.center&&(u.sourceCenter=s,u.targetCenter=c.center.slice(),s=u.targetCenter),void 0!==c.zoom?(u.sourceResolution=a,u.targetResolution=this.getResolutionForZoom(c.zoom),a=u.targetResolution):c.resolution&&(u.sourceResolution=a,u.targetResolution=c.resolution,a=u.targetResolution),void 0!==c.rotation){u.sourceRotation=l;var p=Ot(c.rotation-l+Math.PI,2*Math.PI)-Math.PI;u.targetRotation=l+p,l=u.targetRotation}ir(u)?u.complete=!0:r+=u.duration,h.push(u)}this.animations_.push(h),this.setHint(Gn.ANIMATING,1),this.updateAnimations_()}else e&&Qo(e,!0)},e.prototype.getAnimating=function(){return this.hints_[Gn.ANIMATING]>0},e.prototype.getInteracting=function(){return this.hints_[Gn.INTERACTING]>0},e.prototype.cancelAnimations=function(){var t;this.setHint(Gn.ANIMATING,-this.hints_[Gn.ANIMATING]);for(var e=0,n=this.animations_.length;e<n;++e){var i=this.animations_[e];if(i[0].callback&&Qo(i[0].callback,!1),!t)for(var o=0,r=i.length;o<r;++o){var s=i[o];if(!s.complete){t=s.anchor;break}}}this.animations_.length=0,this.cancelAnchor_=t,this.nextCenter_=null,this.nextResolution_=NaN,this.nextRotation_=NaN},e.prototype.updateAnimations_=function(){if(void 0!==this.updateAnimationKey_&&(cancelAnimationFrame(this.updateAnimationKey_),this.updateAnimationKey_=void 0),this.getAnimating()){for(var t=Date.now(),e=!1,n=this.animations_.length-1;n>=0;--n){for(var i=this.animations_[n],o=!0,r=0,s=i.length;r<s;++r){var a=i[r];if(!a.complete){var l=t-a.start,h=a.duration>0?l/a.duration:1;h>=1?(a.complete=!0,h=1):o=!1;var c=a.easing(h);if(a.sourceCenter){var u=a.sourceCenter[0],p=a.sourceCenter[1],d=a.targetCenter[0],f=a.targetCenter[1];this.nextCenter_=a.targetCenter;var y=u+c*(d-u),g=p+c*(f-p);this.targetCenter_=[y,g]}if(a.sourceResolution&&a.targetResolution){var v=1===c?a.targetResolution:a.sourceResolution+c*(a.targetResolution-a.sourceResolution);if(a.anchor){var m=this.getViewportSize_(this.getRotation()),_=this.constraints_.resolution(v,0,m,!0);this.targetCenter_=this.calculateCenterZoom(_,a.anchor)}this.nextResolution_=a.targetResolution,this.targetResolution_=v,this.applyTargetState_(!0)}if(void 0!==a.sourceRotation&&void 0!==a.targetRotation){var b=1===c?Ot(a.targetRotation+Math.PI,2*Math.PI)-Math.PI:a.sourceRotation+c*(a.targetRotation-a.sourceRotation);if(a.anchor){var w=this.constraints_.rotation(b,!0);this.targetCenter_=this.calculateCenterRotate(w,a.anchor)}this.nextRotation_=a.targetRotation,this.targetRotation_=b}if(this.applyTargetState_(!0),e=!0,!a.complete)break}}if(o){this.animations_[n]=null,this.setHint(Gn.ANIMATING,-1),this.nextCenter_=null,this.nextResolution_=NaN,this.nextRotation_=NaN;var C=i[0].callback;C&&Qo(C,!0)}}this.animations_=this.animations_.filter(Boolean),e&&void 0===this.updateAnimationKey_&&(this.updateAnimationKey_=requestAnimationFrame(this.updateAnimations_.bind(this)))}},e.prototype.calculateCenterRotate=function(t,e){var n,i=this.getCenterInternal();return void 0!==i&&(n=[i[0]-e[0],i[1]-e[1]],xe(n,t-this.getRotation()),we(n,e)),n},e.prototype.calculateCenterZoom=function(t,e){var n,i=this.getCenterInternal(),o=this.getResolution();if(void 0!==i&&void 0!==o){var r=e[0]-t*(e[0]-i[0])/o,s=e[1]-t*(e[1]-i[1])/o;n=[r,s]}return n},e.prototype.getViewportSize_=function(t){var e=this.viewportSize_;if(t){var n=e[0],i=e[1];return[Math.abs(n*Math.cos(t))+Math.abs(i*Math.sin(t)),Math.abs(n*Math.sin(t))+Math.abs(i*Math.cos(t))]}return e},e.prototype.setViewportSize=function(t){this.viewportSize_=Array.isArray(t)?t.slice():[100,100],this.getAnimating()||this.resolveConstraints(0)},e.prototype.getCenter=function(){var t=this.getCenterInternal();return t?Ri(t,this.getProjection()):t},e.prototype.getCenterInternal=function(){return this.get(Fn.CENTER)},e.prototype.getConstraints=function(){return this.constraints_},e.prototype.getConstrainResolution=function(){return this.get("constrainResolution")},e.prototype.getHints=function(t){return void 0!==t?(t[0]=this.hints_[0],t[1]=this.hints_[1],t):this.hints_.slice()},e.prototype.calculateExtent=function(t){var e=this.calculateExtentInternal(t);return Ii(e,this.getProjection())},e.prototype.calculateExtentInternal=function(t){var e=t||this.getViewportSizeMinusPadding_(),n=this.getCenterInternal();I(n,1);var i=this.getResolution();I(void 0!==i,2);var o=this.getRotation();return I(void 0!==o,3),ut(n,i,o,e)},e.prototype.getMaxResolution=function(){return this.maxResolution_},e.prototype.getMinResolution=function(){return this.minResolution_},e.prototype.getMaxZoom=function(){return this.getZoomForResolution(this.minResolution_)},e.prototype.setMaxZoom=function(t){this.applyOptions_(this.getUpdatedOptions_({maxZoom:t}))},e.prototype.getMinZoom=function(){return this.getZoomForResolution(this.maxResolution_)},e.prototype.setMinZoom=function(t){this.applyOptions_(this.getUpdatedOptions_({minZoom:t}))},e.prototype.setConstrainResolution=function(t){this.applyOptions_(this.getUpdatedOptions_({constrainResolution:t}))},e.prototype.getProjection=function(){return this.projection_},e.prototype.getResolution=function(){return this.get(Fn.RESOLUTION)},e.prototype.getResolutions=function(){return this.resolutions_},e.prototype.getResolutionForExtent=function(t,e){return this.getResolutionForExtentInternal(ki(t,this.getProjection()),e)},e.prototype.getResolutionForExtentInternal=function(t,e){var n=e||this.getViewportSizeMinusPadding_(),i=vt(t)/n[0],o=dt(t)/n[1];return Math.max(i,o)},e.prototype.getResolutionForValueFunction=function(t){var e=t||2,n=this.getConstrainedResolution(this.maxResolution_),i=this.minResolution_,o=Math.log(n/i)/Math.log(e);return function(t){var i=n/Math.pow(e,t*o);return i}},e.prototype.getRotation=function(){return this.get(Fn.ROTATION)},e.prototype.getValueForResolutionFunction=function(t){var e=Math.log(t||2),n=this.getConstrainedResolution(this.maxResolution_),i=this.minResolution_,o=Math.log(n/i)/e;return function(t){var i=Math.log(n/t)/e/o;return i}},e.prototype.getViewportSizeMinusPadding_=function(t){var e=this.getViewportSize_(t),n=this.padding_;return n&&(e=[e[0]-n[1]-n[3],e[1]-n[0]-n[2]]),e},e.prototype.getState=function(){var t=this.getProjection(),e=this.getResolution(),n=this.getRotation(),i=this.getCenterInternal(),o=this.padding_;if(o){var r=this.getViewportSizeMinusPadding_();i=or(i,this.getViewportSize_(),[r[0]/2+o[3],r[1]/2+o[0]],e,n)}return{center:i.slice(0),projection:void 0!==t?t:null,resolution:e,nextCenter:this.nextCenter_,nextResolution:this.nextResolution_,nextRotation:this.nextRotation_,rotation:n,zoom:this.getZoom()}},e.prototype.getZoom=function(){var t,e=this.getResolution();return void 0!==e&&(t=this.getZoomForResolution(e)),t},e.prototype.getZoomForResolution=function(t){var e,n,i=this.minZoom_||0;if(this.resolutions_){var o=c(this.resolutions_,t,1);i=o,e=this.resolutions_[o],n=o==this.resolutions_.length-1?2:e/this.resolutions_[o+1]}else e=this.maxResolution_,n=this.zoomFactor_;return i+Math.log(e/t)/Math.log(n)},e.prototype.getResolutionForZoom=function(t){if(this.resolutions_){if(this.resolutions_.length<=1)return 0;var e=xt(Math.floor(t),0,this.resolutions_.length-2),n=this.resolutions_[e]/this.resolutions_[e+1];return this.resolutions_[e]/Math.pow(n,xt(t-e,0,1))}return this.maxResolution_/Math.pow(this.zoomFactor_,t-this.minZoom_)},e.prototype.fit=function(t,e){var n;if(I(Array.isArray(t)||"function"===typeof t.getSimplifiedGeometry,24),Array.isArray(t)){I(!_t(t),25);var i=ki(t,this.getProjection());n=Wo(i)}else if("Circle"===t.getType()){i=ki(t.getExtent(),this.getProjection());n=Wo(i),n.rotate(this.getRotation(),ct(i))}else{var o=Oi();n=o?t.clone().transform(o,this.getProjection()):t}this.fitInternal(n,e)},e.prototype.rotatedExtentForGeometry=function(t){for(var e=this.getRotation(),n=Math.cos(e),i=Math.sin(-e),o=t.getFlatCoordinates(),r=t.getStride(),s=1/0,a=1/0,l=-1/0,h=-1/0,c=0,u=o.length;c<u;c+=r){var p=o[c]*n-o[c+1]*i,d=o[c]*i+o[c+1]*n;s=Math.min(s,p),a=Math.min(a,d),l=Math.max(l,p),h=Math.max(h,d)}return[s,a,l,h]},e.prototype.fitInternal=function(t,e){var n=e||{},i=n.size;i||(i=this.getViewportSizeMinusPadding_());var o,r=void 0!==n.padding?n.padding:[0,0,0,0],s=void 0!==n.nearest&&n.nearest;o=void 0!==n.minResolution?n.minResolution:void 0!==n.maxZoom?this.getResolutionForZoom(n.maxZoom):0;var a=this.rotatedExtentForGeometry(t),l=this.getResolutionForExtentInternal(a,[i[0]-r[1]-r[3],i[1]-r[0]-r[2]]);l=isNaN(l)?o:Math.max(l,o),l=this.getConstrainedResolution(l,s?0:1);var h=this.getRotation(),c=Math.sin(h),u=Math.cos(h),p=ct(a);p[0]+=(r[1]-r[3])/2*l,p[1]+=(r[0]-r[2])/2*l;var d=p[0]*u-p[1]*c,f=p[1]*u+p[0]*c,g=this.getConstrainedCenter([d,f],l),v=n.callback?n.callback:y;void 0!==n.duration?this.animateInternal({resolution:l,center:g,duration:n.duration,easing:n.easing},v):(this.targetResolution_=l,this.targetCenter_=g,this.applyTargetState_(!1,!0),Qo(v,!0))},e.prototype.centerOn=function(t,e,n){this.centerOnInternal(Li(t,this.getProjection()),e,n)},e.prototype.centerOnInternal=function(t,e,n){this.setCenterInternal(or(t,e,n,this.getResolution(),this.getRotation()))},e.prototype.calculateCenterShift=function(t,e,n,i){var o,r=this.padding_;if(r&&t){var s=this.getViewportSizeMinusPadding_(-n),a=or(t,i,[s[0]/2+r[3],s[1]/2+r[0]],e,n);o=[t[0]-a[0],t[1]-a[1]]}return o},e.prototype.isDef=function(){return!!this.getCenterInternal()&&void 0!==this.getResolution()},e.prototype.adjustCenter=function(t){var e=Ri(this.targetCenter_,this.getProjection());this.setCenter([e[0]+t[0],e[1]+t[1]])},e.prototype.adjustCenterInternal=function(t){var e=this.targetCenter_;this.setCenterInternal([e[0]+t[0],e[1]+t[1]])},e.prototype.adjustResolution=function(t,e){var n=e&&Li(e,this.getProjection());this.adjustResolutionInternal(t,n)},e.prototype.adjustResolutionInternal=function(t,e){var n=this.getAnimating()||this.getInteracting(),i=this.getViewportSize_(this.getRotation()),o=this.constraints_.resolution(this.targetResolution_*t,0,i,n);e&&(this.targetCenter_=this.calculateCenterZoom(o,e)),this.targetResolution_*=t,this.applyTargetState_()},e.prototype.adjustZoom=function(t,e){this.adjustResolution(Math.pow(this.zoomFactor_,-t),e)},e.prototype.adjustRotation=function(t,e){e&&(e=Li(e,this.getProjection())),this.adjustRotationInternal(t,e)},e.prototype.adjustRotationInternal=function(t,e){var n=this.getAnimating()||this.getInteracting(),i=this.constraints_.rotation(this.targetRotation_+t,n);e&&(this.targetCenter_=this.calculateCenterRotate(i,e)),this.targetRotation_+=t,this.applyTargetState_()},e.prototype.setCenter=function(t){this.setCenterInternal(t?Li(t,this.getProjection()):t)},e.prototype.setCenterInternal=function(t){this.targetCenter_=t,this.applyTargetState_()},e.prototype.setHint=function(t,e){return this.hints_[t]+=e,this.changed(),this.hints_[t]},e.prototype.setResolution=function(t){this.targetResolution_=t,this.applyTargetState_()},e.prototype.setRotation=function(t){this.targetRotation_=t,this.applyTargetState_()},e.prototype.setZoom=function(t){this.setResolution(this.getResolutionForZoom(t))},e.prototype.applyTargetState_=function(t,e){var n=this.getAnimating()||this.getInteracting()||e,i=this.constraints_.rotation(this.targetRotation_,n),o=this.getViewportSize_(i),r=this.constraints_.resolution(this.targetResolution_,0,o,n),s=this.constraints_.center(this.targetCenter_,r,o,n,this.calculateCenterShift(this.targetCenter_,r,i,o));this.get(Fn.ROTATION)!==i&&this.set(Fn.ROTATION,i),this.get(Fn.RESOLUTION)!==r&&(this.set(Fn.RESOLUTION,r),this.set("zoom",this.getZoom(),!0)),s&&this.get(Fn.CENTER)&&Ce(this.get(Fn.CENTER),s)||this.set(Fn.CENTER,s),this.getAnimating()&&!t&&this.cancelAnimations(),this.cancelAnchor_=void 0},e.prototype.resolveConstraints=function(t,e,n){var i=void 0!==t?t:200,o=e||0,r=this.constraints_.rotation(this.targetRotation_),s=this.getViewportSize_(r),a=this.constraints_.resolution(this.targetResolution_,o,s),l=this.constraints_.center(this.targetCenter_,a,s,!1,this.calculateCenterShift(this.targetCenter_,a,r,s));if(0===i&&!this.cancelAnchor_)return this.targetResolution_=a,this.targetRotation_=r,this.targetCenter_=l,void this.applyTargetState_();var h=n||(0===i?this.cancelAnchor_:void 0);this.cancelAnchor_=void 0,this.getResolution()===a&&this.getRotation()===r&&this.getCenterInternal()&&Ce(this.getCenterInternal(),l)||(this.getAnimating()&&this.cancelAnimations(),this.animateInternal({rotation:r,center:l,resolution:a,duration:i,easing:Ji,anchor:h}))},e.prototype.beginInteraction=function(){this.resolveConstraints(0),this.setHint(Gn.INTERACTING,1)},e.prototype.endInteraction=function(t,e,n){var i=n&&Li(n,this.getProjection());this.endInteractionInternal(t,e,i)},e.prototype.endInteractionInternal=function(t,e,n){this.setHint(Gn.INTERACTING,-1),this.resolveConstraints(t,e,n)},e.prototype.getConstrainedCenter=function(t,e){var n=this.getViewportSize_(this.getRotation());return this.constraints_.center(t,e||this.getResolution(),n)},e.prototype.getConstrainedZoom=function(t,e){var n=this.getResolutionForZoom(t);return this.getZoomForResolution(this.getConstrainedResolution(n,e))},e.prototype.getConstrainedResolution=function(t,e){var n=e||0,i=this.getViewportSize_(this.getRotation());return this.constraints_.resolution(t,n,i)},e}(ue);function Qo(t,e){setTimeout((function(){t(e)}),0)}function tr(t){if(void 0!==t.extent){var e=void 0===t.smoothExtentConstraint||t.smoothExtentConstraint;return Ni(t.extent,t.constrainOnlyCenter,e)}var n=xi(t.projection,"EPSG:3857");if(!0!==t.multiWorld&&n.isGlobal()){var i=n.getExtent().slice();return i[0]=-1/0,i[2]=1/0,Ni(i,!1,!1)}return Di}function er(t){var e,n,i,o=28,r=2,s=void 0!==t.minZoom?t.minZoom:$o,a=void 0!==t.maxZoom?t.maxZoom:o,l=void 0!==t.zoomFactor?t.zoomFactor:r,h=void 0!==t.multiWorld&&t.multiWorld,c=void 0===t.smoothResolutionConstraint||t.smoothResolutionConstraint,u=void 0!==t.showFullExtent&&t.showFullExtent,p=xi(t.projection,"EPSG:3857"),d=p.getExtent(),f=t.constrainOnlyCenter,y=t.extent;if(h||y||!p.isGlobal()||(f=!1,y=d),void 0!==t.resolutions){var g=t.resolutions;n=g[s],i=void 0!==g[a]?g[a]:g[g.length-1],e=t.constrainResolution?Bi(g,c,!f&&y,u):Vi(n,i,c,!f&&y,u)}else{var v=d?Math.max(vt(d),dt(d)):360*Nn[Dn.DEGREES]/p.getMetersPerUnit(),m=v/Bn/Math.pow(r,$o),_=m/Math.pow(r,o-$o);n=t.maxResolution,void 0!==n?s=0:n=m/Math.pow(l,s),i=t.minResolution,void 0===i&&(i=void 0!==t.maxZoom?void 0!==t.maxResolution?n/Math.pow(l,a):m/Math.pow(l,a):_),a=s+Math.floor(Math.log(n/i)/Math.log(l)),i=n/Math.pow(l,a-s),e=t.constrainResolution?Zi(l,n,i,c,!f&&y,u):Vi(n,i,c,!f&&y,u)}return{constraint:e,maxResolution:n,minResolution:i,minZoom:s,zoomFactor:l}}function nr(t){var e=void 0===t.enableRotation||t.enableRotation;if(e){var n=t.constrainRotation;return void 0===n||!0===n?Xi():!1===n?Hi:"number"===typeof n?Ki(n):Hi}return zi}function ir(t){return!(t.sourceCenter&&t.targetCenter&&!Ce(t.sourceCenter,t.targetCenter))&&(t.sourceResolution===t.targetResolution&&t.sourceRotation===t.targetRotation)}function or(t,e,n,i,o){var r=Math.cos(-o),s=Math.sin(-o),a=t[0]*r-t[1]*s,l=t[1]*r+t[0]*s;a+=(e[0]/2-n[0])*i,l+=(n[1]-e[1]/2)*i,s=-s;var h=a*r-l*s,c=l*r+a*s;return[h,c]}var rr=qo;function sr(t){return t[0]>0&&t[1]>0}var ar=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!==typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}();function lr(t){t instanceof be?t.setMapInternal(null):t instanceof dn&&t.getLayers().forEach(lr)}function hr(t,e){if(t instanceof be)t.setMapInternal(e);else if(t instanceof dn)for(var n=t.getLayers().getArray(),i=0,o=n.length;i<o;++i)hr(n[i],e)}var cr=function(t){function e(e){var n=t.call(this)||this;n.on,n.once,n.un;var i=ur(e);n.renderComplete_,n.loaded_=!0,n.boundHandleBrowserEvent_=n.handleBrowserEvent.bind(n),n.maxTilesLoading_=void 0!==e.maxTilesLoading?e.maxTilesLoading:16,n.pixelRatio_=void 0!==e.pixelRatio?e.pixelRatio:P,n.postRenderTimeoutHandle_,n.animationDelayKey_,n.animationDelay_=function(){this.animationDelayKey_=void 0,this.renderFrame_(Date.now())}.bind(n),n.coordinateToPixelTransform_=j(),n.pixelToCoordinateTransform_=j(),n.frameIndex_=0,n.frameState_=null,n.previousExtent_=null,n.viewPropertyListenerKey_=null,n.viewChangeListenerKey_=null,n.layerGroupPropertyListenerKeys_=null,n.viewport_=document.createElement("div"),n.viewport_.className="ol-viewport"+("ontouchstart"in window?" ol-touch":""),n.viewport_.style.position="relative",n.viewport_.style.overflow="hidden",n.viewport_.style.width="100%",n.viewport_.style.height="100%",n.overlayContainer_=document.createElement("div"),n.overlayContainer_.style.position="absolute",n.overlayContainer_.style.zIndex="0",n.overlayContainer_.style.width="100%",n.overlayContainer_.style.height="100%",n.overlayContainer_.style.pointerEvents="none",n.overlayContainer_.className="ol-overlaycontainer",n.viewport_.appendChild(n.overlayContainer_),n.overlayContainerStopEvent_=document.createElement("div"),n.overlayContainerStopEvent_.style.position="absolute",n.overlayContainerStopEvent_.style.zIndex="0",n.overlayContainerStopEvent_.style.width="100%",n.overlayContainerStopEvent_.style.height="100%",n.overlayContainerStopEvent_.style.pointerEvents="none",n.overlayContainerStopEvent_.className="ol-overlaycontainer-stopevent",n.viewport_.appendChild(n.overlayContainerStopEvent_),n.mapBrowserEventHandler_=null,n.moveTolerance_=e.moveTolerance,n.keyboardEventTarget_=i.keyboardEventTarget,n.targetChangeHandlerKeys_=null,n.controls=i.controls||new ln,n.interactions=i.interactions||new ln,n.overlays_=i.overlays,n.overlayIdIndex_={},n.renderer_=null,n.postRenderFunctions_=[],n.tileQueue_=new In(n.getTilePriority.bind(n),n.handleTileChange_.bind(n)),n.addChangeListener(Pn.LAYERGROUP,n.handleLayerGroupChanged_),n.addChangeListener(Pn.VIEW,n.handleViewChanged_),n.addChangeListener(Pn.SIZE,n.handleSizeChanged_),n.addChangeListener(Pn.TARGET,n.handleTargetChanged_),n.setProperties(i.values);var o=n;return!e.view||e.view instanceof rr||e.view.then((function(t){o.setView(new rr(t))})),n.controls.addEventListener(nn.ADD,function(t){t.element.setMap(this)}.bind(n)),n.controls.addEventListener(nn.REMOVE,function(t){t.element.setMap(null)}.bind(n)),n.interactions.addEventListener(nn.ADD,function(t){t.element.setMap(this)}.bind(n)),n.interactions.addEventListener(nn.REMOVE,function(t){t.element.setMap(null)}.bind(n)),n.overlays_.addEventListener(nn.ADD,function(t){this.addOverlayInternal_(t.element)}.bind(n)),n.overlays_.addEventListener(nn.REMOVE,function(t){var e=t.element,n=e.getId();void 0!==n&&delete this.overlayIdIndex_[n.toString()],t.element.setMap(null)}.bind(n)),n.controls.forEach(function(t){t.setMap(this)}.bind(n)),n.interactions.forEach(function(t){t.setMap(this)}.bind(n)),n.overlays_.forEach(n.addOverlayInternal_.bind(n)),n}return ar(e,t),e.prototype.createRenderer=function(){throw new Error("Use a map type that has a createRenderer method")},e.prototype.addControl=function(t){this.getControls().push(t)},e.prototype.addInteraction=function(t){this.getInteractions().push(t)},e.prototype.addLayer=function(t){var e=this.getLayerGroup().getLayers();e.push(t)},e.prototype.handleLayerAdd_=function(t){hr(t.layer,this)},e.prototype.addOverlay=function(t){this.getOverlays().push(t)},e.prototype.addOverlayInternal_=function(t){var e=t.getId();void 0!==e&&(this.overlayIdIndex_[e.toString()]=t),t.setMap(this)},e.prototype.disposeInternal=function(){this.controls.clear(),this.interactions.clear(),this.overlays_.clear(),this.setTarget(null),t.prototype.disposeInternal.call(this)},e.prototype.forEachFeatureAtPixel=function(t,e,n){if(this.frameState_&&this.renderer_){var i=this.getCoordinateFromPixelInternal(t);n=void 0!==n?n:{};var o=void 0!==n.hitTolerance?n.hitTolerance:0,r=void 0!==n.layerFilter?n.layerFilter:d,s=!1!==n.checkWrapped;return this.renderer_.forEachFeatureAtCoordinate(i,this.frameState_,o,s,e,null,r,null)}},e.prototype.getFeaturesAtPixel=function(t,e){var n=[];return this.forEachFeatureAtPixel(t,(function(t){n.push(t)}),e),n},e.prototype.getAllLayers=function(){var t=[];function e(n){n.forEach((function(n){n instanceof dn?e(n.getLayers()):t.push(n)}))}return e(this.getLayers()),t},e.prototype.forEachLayerAtPixel=function(t,e,n){if(this.frameState_&&this.renderer_){var i=n||{},o=void 0!==i.hitTolerance?i.hitTolerance:0,r=i.layerFilter||d;return this.renderer_.forEachLayerAtPixel(t,this.frameState_,o,e,r)}},e.prototype.hasFeatureAtPixel=function(t,e){if(!this.frameState_||!this.renderer_)return!1;var n=this.getCoordinateFromPixelInternal(t);e=void 0!==e?e:{};var i=void 0!==e.layerFilter?e.layerFilter:d,o=void 0!==e.hitTolerance?e.hitTolerance:0,r=!1!==e.checkWrapped;return this.renderer_.hasFeatureAtCoordinate(n,this.frameState_,o,r,i,null)},e.prototype.getEventCoordinate=function(t){return this.getCoordinateFromPixel(this.getEventPixel(t))},e.prototype.getEventCoordinateInternal=function(t){return this.getCoordinateFromPixelInternal(this.getEventPixel(t))},e.prototype.getEventPixel=function(t){var e=this.viewport_.getBoundingClientRect(),n="changedTouches"in t?t.changedTouches[0]:t;return[n.clientX-e.left,n.clientY-e.top]},e.prototype.getTarget=function(){return this.get(Pn.TARGET)},e.prototype.getTargetElement=function(){var t=this.getTarget();return void 0!==t?"string"===typeof t?document.getElementById(t):t:null},e.prototype.getCoordinateFromPixel=function(t){return Ri(this.getCoordinateFromPixelInternal(t),this.getView().getProjection())},e.prototype.getCoordinateFromPixelInternal=function(t){var e=this.frameState_;return e?N(e.pixelToCoordinateTransform,t.slice()):null},e.prototype.getControls=function(){return this.controls},e.prototype.getOverlays=function(){return this.overlays_},e.prototype.getOverlayById=function(t){var e=this.overlayIdIndex_[t.toString()];return void 0!==e?e:null},e.prototype.getInteractions=function(){return this.interactions},e.prototype.getLayerGroup=function(){return this.get(Pn.LAYERGROUP)},e.prototype.setLayers=function(t){var e=this.getLayerGroup();if(t instanceof ln)e.setLayers(t);else{var n=e.getLayers();n.clear(),n.extend(t)}},e.prototype.getLayers=function(){var t=this.getLayerGroup().getLayers();return t},e.prototype.getLoadingOrNotReady=function(){for(var t=this.getLayerGroup().getLayerStatesArray(),e=0,n=t.length;e<n;++e){var i=t[e];if(i.visible){var o=i.layer.getRenderer();if(o&&!o.ready)return!0;var r=i.layer.getSource();if(r&&r.loading)return!0}}return!1},e.prototype.getPixelFromCoordinate=function(t){var e=Li(t,this.getView().getProjection());return this.getPixelFromCoordinateInternal(e)},e.prototype.getPixelFromCoordinateInternal=function(t){var e=this.frameState_;return e?N(e.coordinateToPixelTransform,t.slice(0,2)):null},e.prototype.getRenderer=function(){return this.renderer_},e.prototype.getSize=function(){return this.get(Pn.SIZE)},e.prototype.getView=function(){return this.get(Pn.VIEW)},e.prototype.getViewport=function(){return this.viewport_},e.prototype.getOverlayContainer=function(){return this.overlayContainer_},e.prototype.getOverlayContainerStopEvent=function(){return this.overlayContainerStopEvent_},e.prototype.getOwnerDocument=function(){var t=this.getTargetElement();return t?t.ownerDocument:document},e.prototype.getTilePriority=function(t,e,n,i){return kn(this.frameState_,t,e,n,i)},e.prototype.handleBrowserEvent=function(t,e){var n=e||t.type,i=new _n(n,this,t);this.handleMapBrowserEvent(i)},e.prototype.handleMapBrowserEvent=function(t){if(this.frameState_){var e=t.originalEvent,n=e.type;if(n===wn.POINTERDOWN||n===te.WHEEL||n===te.KEYDOWN){var i=this.getOwnerDocument(),o=this.viewport_.getRootNode?this.viewport_.getRootNode():i,r=e.target;if(this.overlayContainerStopEvent_.contains(r)||!(o===i?i.documentElement:o).contains(r))return}if(t.frameState=this.frameState_,!1!==this.dispatchEvent(t))for(var s=this.getInteractions().getArray().slice(),a=s.length-1;a>=0;a--){var l=s[a];if(l.getMap()===this&&l.getActive()&&this.getTargetElement()){var h=l.handleEvent(t);if(!h||t.propagationStopped)break}}}},e.prototype.handlePostRender=function(){var t=this.frameState_,e=this.tileQueue_;if(!e.isEmpty()){var n=this.maxTilesLoading_,i=n;if(t){var o=t.viewHints;if(o[Gn.ANIMATING]||o[Gn.INTERACTING]){var r=Date.now()-t.time>8;n=r?0:8,i=r?0:2}}e.getTilesLoading()<n&&(e.reprioritize(),e.loadMoreTiles(n,i))}t&&this.renderer_&&!t.animate&&(!0===this.renderComplete_?(this.hasListener(ge.RENDERCOMPLETE)&&this.renderer_.dispatchRenderEvent(ge.RENDERCOMPLETE,t),!1===this.loaded_&&(this.loaded_=!0,this.dispatchEvent(new gn(Mn.LOADEND,this,t)))):!0===this.loaded_&&(this.loaded_=!1,this.dispatchEvent(new gn(Mn.LOADSTART,this,t))));for(var s=this.postRenderFunctions_,a=0,l=s.length;a<l;++a)s[a](this,t);s.length=0},e.prototype.handleSizeChanged_=function(){this.getView()&&!this.getView().getAnimating()&&this.getView().resolveConstraints(0),this.render()},e.prototype.handleTargetChanged_=function(){if(this.mapBrowserEventHandler_){for(var t=0,e=this.targetChangeHandlerKeys_.length;t<e;++t)ie(this.targetChangeHandlerKeys_[t]);this.targetChangeHandlerKeys_=null,this.viewport_.removeEventListener(te.CONTEXTMENU,this.boundHandleBrowserEvent_),this.viewport_.removeEventListener(te.WHEEL,this.boundHandleBrowserEvent_),this.mapBrowserEventHandler_.dispose(),this.mapBrowserEventHandler_=null,ze(this.viewport_)}var n=this.getTargetElement();if(n){for(var i in n.appendChild(this.viewport_),this.renderer_||(this.renderer_=this.createRenderer()),this.mapBrowserEventHandler_=new En(this,this.moveTolerance_),bn)this.mapBrowserEventHandler_.addEventListener(bn[i],this.handleMapBrowserEvent.bind(this));this.viewport_.addEventListener(te.CONTEXTMENU,this.boundHandleBrowserEvent_,!1),this.viewport_.addEventListener(te.WHEEL,this.boundHandleBrowserEvent_,!!S&&{passive:!1});var o=this.getOwnerDocument().defaultView,r=this.keyboardEventTarget_?this.keyboardEventTarget_:n;this.targetChangeHandlerKeys_=[ee(r,te.KEYDOWN,this.handleBrowserEvent,this),ee(r,te.KEYPRESS,this.handleBrowserEvent,this),ee(o,te.RESIZE,this.updateSize,this)]}else this.renderer_&&(clearTimeout(this.postRenderTimeoutHandle_),this.postRenderTimeoutHandle_=void 0,this.postRenderFunctions_.length=0,this.renderer_.dispose(),this.renderer_=null),this.animationDelayKey_&&(cancelAnimationFrame(this.animationDelayKey_),this.animationDelayKey_=void 0);this.updateSize()},e.prototype.handleTileChange_=function(){this.render()},e.prototype.handleViewPropertyChanged_=function(){this.render()},e.prototype.handleViewChanged_=function(){this.viewPropertyListenerKey_&&(ie(this.viewPropertyListenerKey_),this.viewPropertyListenerKey_=null),this.viewChangeListenerKey_&&(ie(this.viewChangeListenerKey_),this.viewChangeListenerKey_=null);var t=this.getView();t&&(this.updateViewportSize_(),this.viewPropertyListenerKey_=ee(t,Xt.PROPERTYCHANGE,this.handleViewPropertyChanged_,this),this.viewChangeListenerKey_=ee(t,te.CHANGE,this.handleViewPropertyChanged_,this),t.resolveConstraints(0)),this.render()},e.prototype.handleLayerGroupChanged_=function(){this.layerGroupPropertyListenerKeys_&&(this.layerGroupPropertyListenerKeys_.forEach(ie),this.layerGroupPropertyListenerKeys_=null);var t=this.getLayerGroup();t&&(this.handleLayerAdd_(new cn("addlayer",t)),this.layerGroupPropertyListenerKeys_=[ee(t,Xt.PROPERTYCHANGE,this.render,this),ee(t,te.CHANGE,this.render,this),ee(t,"addlayer",this.handleLayerAdd_,this),ee(t,"removelayer",this.handleLayerRemove_,this)]),this.render()},e.prototype.isRendered=function(){return!!this.frameState_},e.prototype.renderSync=function(){this.animationDelayKey_&&cancelAnimationFrame(this.animationDelayKey_),this.animationDelay_()},e.prototype.redrawText=function(){for(var t=this.getLayerGroup().getLayerStatesArray(),e=0,n=t.length;e<n;++e){var i=t[e].layer;i.hasRenderer()&&i.getRenderer().handleFontsChanged()}},e.prototype.render=function(){this.renderer_&&void 0===this.animationDelayKey_&&(this.animationDelayKey_=requestAnimationFrame(this.animationDelay_))},e.prototype.removeControl=function(t){return this.getControls().remove(t)},e.prototype.removeInteraction=function(t){return this.getInteractions().remove(t)},e.prototype.removeLayer=function(t){var e=this.getLayerGroup().getLayers();return e.remove(t)},e.prototype.handleLayerRemove_=function(t){lr(t.layer)},e.prototype.removeOverlay=function(t){return this.getOverlays().remove(t)},e.prototype.renderFrame_=function(t){var e=this,n=this.getSize(),i=this.getView(),o=this.frameState_,r=null;if(void 0!==n&&sr(n)&&i&&i.isDef()){var s=i.getHints(this.frameState_?this.frameState_.viewHints:void 0),a=i.getState();if(r={animate:!1,coordinateToPixelTransform:this.coordinateToPixelTransform_,declutterTree:null,extent:ut(a.center,a.resolution,a.rotation,n),index:this.frameIndex_++,layerIndex:0,layerStatesArray:this.getLayerGroup().getLayerStatesArray(),pixelRatio:this.pixelRatio_,pixelToCoordinateTransform:this.pixelToCoordinateTransform_,postRenderFunctions:[],size:n,tileQueue:this.tileQueue_,time:t,usedTiles:{},viewState:a,viewHints:s,wantedTiles:{},mapId:_(this),renderTargets:{}},a.nextCenter&&a.nextResolution){var l=isNaN(a.nextRotation)?a.rotation:a.nextRotation;r.nextExtent=ut(a.nextCenter,a.nextResolution,l,n)}}if(this.frameState_=r,this.renderer_.renderFrame(r),r){if(r.animate&&this.render(),Array.prototype.push.apply(this.postRenderFunctions_,r.postRenderFunctions),o){var h=!this.previousExtent_||!_t(this.previousExtent_)&&!et(r.extent,this.previousExtent_);h&&(this.dispatchEvent(new gn(Mn.MOVESTART,this,o)),this.previousExtent_=q(this.previousExtent_))}var c=this.previousExtent_&&!r.viewHints[Gn.ANIMATING]&&!r.viewHints[Gn.INTERACTING]&&!et(r.extent,this.previousExtent_);c&&(this.dispatchEvent(new gn(Mn.MOVEEND,this,r)),H(r.extent,this.previousExtent_))}this.dispatchEvent(new gn(Mn.POSTRENDER,this,r)),this.renderComplete_=this.hasListener(Mn.LOADSTART)||this.hasListener(Mn.LOADEND)||this.hasListener(ge.RENDERCOMPLETE)?!this.tileQueue_.getTilesLoading()&&!this.tileQueue_.getCount()&&!this.getLoadingOrNotReady():void 0,this.postRenderTimeoutHandle_||(this.postRenderTimeoutHandle_=setTimeout((function(){e.postRenderTimeoutHandle_=void 0,e.handlePostRender()}),0))},e.prototype.setLayerGroup=function(t){var e=this.getLayerGroup();e&&this.handleLayerRemove_(new cn("removelayer",e)),this.set(Pn.LAYERGROUP,t)},e.prototype.setSize=function(t){this.set(Pn.SIZE,t)},e.prototype.setTarget=function(t){this.set(Pn.TARGET,t)},e.prototype.setView=function(t){if(!t||t instanceof rr)this.set(Pn.VIEW,t);else{this.set(Pn.VIEW,new rr);var e=this;t.then((function(t){e.setView(new rr(t))}))}},e.prototype.updateSize=function(){var t=this.getTargetElement(),e=void 0;if(t){var n=getComputedStyle(t),i=t.offsetWidth-parseFloat(n["borderLeftWidth"])-parseFloat(n["paddingLeft"])-parseFloat(n["paddingRight"])-parseFloat(n["borderRightWidth"]),o=t.offsetHeight-parseFloat(n["borderTopWidth"])-parseFloat(n["paddingTop"])-parseFloat(n["paddingBottom"])-parseFloat(n["borderBottomWidth"]);isNaN(i)||isNaN(o)||(e=[i,o],!sr(e)&&(t.offsetWidth||t.offsetHeight||t.getClientRects().length)&&console.warn("No map visible because the map container's width or height are 0."))}this.setSize(e),this.updateViewportSize_()},e.prototype.updateViewportSize_=function(){var t=this.getView();if(t){var e=void 0,n=getComputedStyle(this.viewport_);n.width&&n.height&&(e=[parseInt(n.width,10),parseInt(n.height,10)]),t.setViewportSize(e)}},e}(ue);function ur(t){var e=null;void 0!==t.keyboardEventTarget&&(e="string"===typeof t.keyboardEventTarget?document.getElementById(t.keyboardEventTarget):t.keyboardEventTarget);var n,i,o,r={},s=t.layers&&"function"===typeof t.layers.getLayers?t.layers:new dn({layers:t.layers});return r[Pn.LAYERGROUP]=s,r[Pn.TARGET]=t.target,r[Pn.VIEW]=t.view instanceof rr?t.view:new rr,void 0!==t.controls&&(Array.isArray(t.controls)?n=new ln(t.controls.slice()):(I("function"===typeof t.controls.getArray,47),n=t.controls)),void 0!==t.interactions&&(Array.isArray(t.interactions)?i=new ln(t.interactions.slice()):(I("function"===typeof t.interactions.getArray,48),i=t.interactions)),void 0!==t.overlays?Array.isArray(t.overlays)?o=new ln(t.overlays.slice()):(I("function"===typeof t.overlays.getArray,49),o=t.overlays):o=new ln,{controls:n,interactions:i,keyboardEventTarget:e,overlays:o,values:r}}var pr=cr,dr=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!==typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),fr=function(t){function e(e){var n=t.call(this)||this,i=e.element;return!i||e.target||i.style.pointerEvents||(i.style.pointerEvents="auto"),n.element=i||null,n.target_=null,n.map_=null,n.listenerKeys=[],e.render&&(n.render=e.render),e.target&&n.setTarget(e.target),n}return dr(e,t),e.prototype.disposeInternal=function(){ze(this.element),t.prototype.disposeInternal.call(this)},e.prototype.getMap=function(){return this.map_},e.prototype.setMap=function(t){this.map_&&ze(this.element);for(var e=0,n=this.listenerKeys.length;e<n;++e)ie(this.listenerKeys[e]);if(this.listenerKeys.length=0,this.map_=t,t){var i=this.target_?this.target_:t.getOverlayContainerStopEvent();i.appendChild(this.element),this.render!==y&&this.listenerKeys.push(ee(t,Mn.POSTRENDER,this.render,this)),t.render()}},e.prototype.render=function(t){},e.prototype.setTarget=function(t){this.target_="string"===typeof t?document.getElementById(t):t},e}(ue),yr=fr,gr=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!==typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),vr=function(t){function e(e){var n=this,i=e||{};n=t.call(this,{element:document.createElement("div"),render:i.render,target:i.target})||this,n.ulElement_=document.createElement("ul"),n.collapsed_=void 0===i.collapsed||i.collapsed,n.userCollapsed_=n.collapsed_,n.overrideCollapsible_=void 0!==i.collapsible,n.collapsible_=void 0===i.collapsible||i.collapsible,n.collapsible_||(n.collapsed_=!1);var o=void 0!==i.className?i.className:"ol-attribution",r=void 0!==i.tipLabel?i.tipLabel:"Attributions",s=void 0!==i.expandClassName?i.expandClassName:o+"-expand",a=void 0!==i.collapseLabel?i.collapseLabel:"›",l=void 0!==i.collapseClassName?i.collapseClassName:o+"-collapse";"string"===typeof a?(n.collapseLabel_=document.createElement("span"),n.collapseLabel_.textContent=a,n.collapseLabel_.className=l):n.collapseLabel_=a;var h=void 0!==i.label?i.label:"i";"string"===typeof h?(n.label_=document.createElement("span"),n.label_.textContent=h,n.label_.className=s):n.label_=h;var c=n.collapsible_&&!n.collapsed_?n.collapseLabel_:n.label_;n.toggleButton_=document.createElement("button"),n.toggleButton_.setAttribute("type","button"),n.toggleButton_.setAttribute("aria-expanded",String(!n.collapsed_)),n.toggleButton_.title=r,n.toggleButton_.appendChild(c),n.toggleButton_.addEventListener(te.CLICK,n.handleClick_.bind(n),!1);var u=o+" "+je+" "+Ne+(n.collapsed_&&n.collapsible_?" "+De:"")+(n.collapsible_?"":" ol-uncollapsible"),p=n.element;return p.className=u,p.appendChild(n.toggleButton_),p.appendChild(n.ulElement_),n.renderedAttributions_=[],n.renderedVisible_=!0,n}return gr(e,t),e.prototype.collectSourceAttributions_=function(t){for(var e={},n=[],i=!0,o=t.layerStatesArray,r=0,s=o.length;r<s;++r){var a=o[r];if(_e(a,t.viewState)){var l=a.layer.getSource();if(l){var h=l.getAttributions();if(h){var c=h(t);if(c)if(i=i&&!1!==l.getAttributionsCollapsible(),Array.isArray(c))for(var u=0,p=c.length;u<p;++u)c[u]in e||(n.push(c[u]),e[c[u]]=!0);else c in e||(n.push(c),e[c]=!0)}}}}return this.overrideCollapsible_||this.setCollapsible(i),n},e.prototype.updateElement_=function(t){if(t){var e=this.collectSourceAttributions_(t),n=e.length>0;if(this.renderedVisible_!=n&&(this.element.style.display=n?"":"none",this.renderedVisible_=n),!p(e,this.renderedAttributions_)){He(this.ulElement_);for(var i=0,o=e.length;i<o;++i){var r=document.createElement("li");r.innerHTML=e[i],this.ulElement_.appendChild(r)}this.renderedAttributions_=e}}else this.renderedVisible_&&(this.element.style.display="none",this.renderedVisible_=!1)},e.prototype.handleClick_=function(t){t.preventDefault(),this.handleToggle_(),this.userCollapsed_=this.collapsed_},e.prototype.handleToggle_=function(){this.element.classList.toggle(De),this.collapsed_?Ve(this.collapseLabel_,this.label_):Ve(this.label_,this.collapseLabel_),this.collapsed_=!this.collapsed_,this.toggleButton_.setAttribute("aria-expanded",String(!this.collapsed_))},e.prototype.getCollapsible=function(){return this.collapsible_},e.prototype.setCollapsible=function(t){this.collapsible_!==t&&(this.collapsible_=t,this.element.classList.toggle("ol-uncollapsible"),this.userCollapsed_&&this.handleToggle_())},e.prototype.setCollapsed=function(t){this.userCollapsed_=t,this.collapsible_&&this.collapsed_!==t&&this.handleToggle_()},e.prototype.getCollapsed=function(){return this.collapsed_},e.prototype.render=function(t){this.updateElement_(t.frameState)},e}(yr),mr=vr,_r=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!==typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),br=function(t){function e(e){var n=this,i=e||{};n=t.call(this,{element:document.createElement("div"),render:i.render,target:i.target})||this;var o=void 0!==i.className?i.className:"ol-rotate",r=void 0!==i.label?i.label:"⇧",s=void 0!==i.compassClassName?i.compassClassName:"ol-compass";n.label_=null,"string"===typeof r?(n.label_=document.createElement("span"),n.label_.className=s,n.label_.textContent=r):(n.label_=r,n.label_.classList.add(s));var a=i.tipLabel?i.tipLabel:"Reset rotation",l=document.createElement("button");l.className=o+"-reset",l.setAttribute("type","button"),l.title=a,l.appendChild(n.label_),l.addEventListener(te.CLICK,n.handleClick_.bind(n),!1);var h=o+" "+je+" "+Ne,c=n.element;return c.className=h,c.appendChild(l),n.callResetNorth_=i.resetNorth?i.resetNorth:void 0,n.duration_=void 0!==i.duration?i.duration:250,n.autoHide_=void 0===i.autoHide||i.autoHide,n.rotation_=void 0,n.autoHide_&&n.element.classList.add(ke),n}return _r(e,t),e.prototype.handleClick_=function(t){t.preventDefault(),void 0!==this.callResetNorth_?this.callResetNorth_():this.resetNorth_()},e.prototype.resetNorth_=function(){var t=this.getMap(),e=t.getView();if(e){var n=e.getRotation();void 0!==n&&(this.duration_>0&&n%(2*Math.PI)!==0?e.animate({rotation:0,duration:this.duration_,easing:Ji}):e.setRotation(0))}},e.prototype.render=function(t){var e=t.frameState;if(e){var n=e.viewState.rotation;if(n!=this.rotation_){var i="rotate("+n+"rad)";if(this.autoHide_){var o=this.element.classList.contains(ke);o||0!==n?o&&0!==n&&this.element.classList.remove(ke):this.element.classList.add(ke)}this.label_.style.transform=i}this.rotation_=n}},e}(yr),wr=br,Cr=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!==typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),xr=function(t){function e(e){var n=this,i=e||{};n=t.call(this,{element:document.createElement("div"),target:i.target})||this;var o=void 0!==i.className?i.className:"ol-zoom",r=void 0!==i.delta?i.delta:1,s=void 0!==i.zoomInClassName?i.zoomInClassName:o+"-in",a=void 0!==i.zoomOutClassName?i.zoomOutClassName:o+"-out",l=void 0!==i.zoomInLabel?i.zoomInLabel:"+",h=void 0!==i.zoomOutLabel?i.zoomOutLabel:"–",c=void 0!==i.zoomInTipLabel?i.zoomInTipLabel:"Zoom in",u=void 0!==i.zoomOutTipLabel?i.zoomOutTipLabel:"Zoom out",p=document.createElement("button");p.className=s,p.setAttribute("type","button"),p.title=c,p.appendChild("string"===typeof l?document.createTextNode(l):l),p.addEventListener(te.CLICK,n.handleClick_.bind(n,r),!1);var d=document.createElement("button");d.className=a,d.setAttribute("type","button"),d.title=u,d.appendChild("string"===typeof h?document.createTextNode(h):h),d.addEventListener(te.CLICK,n.handleClick_.bind(n,-r),!1);var f=o+" "+je+" "+Ne,y=n.element;return y.className=f,y.appendChild(p),y.appendChild(d),n.duration_=void 0!==i.duration?i.duration:250,n}return Cr(e,t),e.prototype.handleClick_=function(t,e){e.preventDefault(),this.zoomByDelta_(t)},e.prototype.zoomByDelta_=function(t){var e=this.getMap(),n=e.getView();if(n){var i=n.getZoom();if(void 0!==i){var o=n.getConstrainedZoom(i+t);this.duration_>0?(n.getAnimating()&&n.cancelAnimations(),n.animate({zoom:o,duration:this.duration_,easing:Ji})):n.setZoom(o)}}},e}(yr),Er=xr;function Mr(t){var e=t||{},n=new ln,i=void 0===e.zoom||e.zoom;i&&n.push(new Er(e.zoomOptions));var o=void 0===e.rotate||e.rotate;o&&n.push(new wr(e.rotateOptions));var r=void 0===e.attribution||e.attribution;return r&&n.push(new mr(e.attributionOptions)),n}var Pr={ACTIVE:"active"},Tr=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!==typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),Ar=function(t){function e(e){var n=t.call(this)||this;return n.on,n.once,n.un,e&&e.handleEvent&&(n.handleEvent=e.handleEvent),n.map_=null,n.setActive(!0),n}return Tr(e,t),e.prototype.getActive=function(){return this.get(Pr.ACTIVE)},e.prototype.getMap=function(){return this.map_},e.prototype.handleEvent=function(t){return!0},e.prototype.setActive=function(t){this.set(Pr.ACTIVE,t)},e.prototype.setMap=function(t){this.map_=t},e}(ue);function Sr(t,e,n){var i=t.getCenterInternal();if(i){var o=[i[0]+e[0],i[1]+e[1]];t.animateInternal({duration:void 0!==n?n:250,easing:Yi,center:t.getConstrainedCenter(o)})}}function Or(t,e,n,i){var o=t.getZoom();if(void 0!==o){var r=t.getConstrainedZoom(o+e),s=t.getResolutionForZoom(r);t.getAnimating()&&t.cancelAnimations(),t.animate({resolution:s,anchor:n,duration:void 0!==i?i:250,easing:Ji})}}var Rr=Ar,Lr=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!==typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),Ir=function(t){function e(e){var n=t.call(this)||this,i=e||{};return n.delta_=i.delta?i.delta:1,n.duration_=void 0!==i.duration?i.duration:250,n}return Lr(e,t),e.prototype.handleEvent=function(t){var e=!1;if(t.type==bn.DBLCLICK){var n=t.originalEvent,i=t.map,o=t.coordinate,r=n.shiftKey?-this.delta_:this.delta_,s=i.getView();Or(s,r,o,this.duration_),n.preventDefault(),e=!0}return!e},e}(Rr),kr=Ir,jr=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!==typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),Nr=function(t){function e(e){var n=this,i=e||{};return n=t.call(this,i)||this,i.handleDownEvent&&(n.handleDownEvent=i.handleDownEvent),i.handleDragEvent&&(n.handleDragEvent=i.handleDragEvent),i.handleMoveEvent&&(n.handleMoveEvent=i.handleMoveEvent),i.handleUpEvent&&(n.handleUpEvent=i.handleUpEvent),i.stopDown&&(n.stopDown=i.stopDown),n.handlingDownUpSequence=!1,n.targetPointers=[],n}return jr(e,t),e.prototype.getPointerCount=function(){return this.targetPointers.length},e.prototype.handleDownEvent=function(t){return!1},e.prototype.handleDragEvent=function(t){},e.prototype.handleEvent=function(t){if(!t.originalEvent)return!0;var e=!1;if(this.updateTrackedPointers_(t),this.handlingDownUpSequence){if(t.type==bn.POINTERDRAG)this.handleDragEvent(t),t.originalEvent.preventDefault();else if(t.type==bn.POINTERUP){var n=this.handleUpEvent(t);this.handlingDownUpSequence=n&&this.targetPointers.length>0}}else if(t.type==bn.POINTERDOWN){var i=this.handleDownEvent(t);this.handlingDownUpSequence=i,e=this.stopDown(i)}else t.type==bn.POINTERMOVE&&this.handleMoveEvent(t);return!e},e.prototype.handleMoveEvent=function(t){},e.prototype.handleUpEvent=function(t){return!1},e.prototype.stopDown=function(t){return t},e.prototype.updateTrackedPointers_=function(t){t.activePointers&&(this.targetPointers=t.activePointers)},e}(Rr);function Dr(t){for(var e=t.length,n=0,i=0,o=0;o<e;o++)n+=t[o].clientX,i+=t[o].clientY;return[n/e,i/e]}var Gr=Nr;function Fr(t){var e=arguments;return function(t){for(var n=!0,i=0,o=e.length;i<o;++i)if(n=n&&e[i](t),!n)break;return n}}var Br=function(t){var e=t.originalEvent;return e.altKey&&!(e.metaKey||e.ctrlKey)&&e.shiftKey},Zr=function(t){var e=t.map.getTargetElement(),n=t.map.getOwnerDocument().activeElement;return e.contains(n)},Vr=function(t){return!t.map.getTargetElement().hasAttribute("tabindex")||Zr(t)},zr=d,Hr=function(t){var e=t.originalEvent;return 0==e.button&&!(E&&M&&e.ctrlKey)},Kr=function(t){var e=t.originalEvent;return!e.altKey&&!(e.metaKey||e.ctrlKey)&&!e.shiftKey},Xr=function(t){var e=t.originalEvent;return!e.altKey&&!(e.metaKey||e.ctrlKey)&&e.shiftKey},Ur=function(t){var e=t.originalEvent,n=e.target.tagName;return"INPUT"!==n&&"SELECT"!==n&&"TEXTAREA"!==n&&!e.target.isContentEditable},Jr=function(t){var e=t.originalEvent;return I(void 0!==e,56),"mouse"==e.pointerType},Wr=function(t){var e=t.originalEvent;return I(void 0!==e,56),e.isPrimary&&0===e.button},Yr=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!==typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),$r=function(t){function e(e){var n=t.call(this,{stopDown:f})||this,i=e||{};n.kinetic_=i.kinetic,n.lastCentroid=null,n.lastPointersCount_,n.panning_=!1;var o=i.condition?i.condition:Fr(Kr,Wr);return n.condition_=i.onFocusOnly?Fr(Vr,o):o,n.noKinetic_=!1,n}return Yr(e,t),e.prototype.handleDragEvent=function(t){this.panning_||(this.panning_=!0,this.getMap().getView().beginInteraction());var e=this.targetPointers,n=Dr(e);if(e.length==this.lastPointersCount_){if(this.kinetic_&&this.kinetic_.update(n[0],n[1]),this.lastCentroid){var i=[this.lastCentroid[0]-n[0],n[1]-this.lastCentroid[1]],o=t.map,r=o.getView();Ee(i,r.getResolution()),xe(i,r.getRotation()),r.adjustCenterInternal(i)}}else this.kinetic_&&this.kinetic_.begin();this.lastCentroid=n,this.lastPointersCount_=e.length,t.originalEvent.preventDefault()},e.prototype.handleUpEvent=function(t){var e=t.map,n=e.getView();if(0===this.targetPointers.length){if(!this.noKinetic_&&this.kinetic_&&this.kinetic_.end()){var i=this.kinetic_.getDistance(),o=this.kinetic_.getAngle(),r=n.getCenterInternal(),s=e.getPixelFromCoordinateInternal(r),a=e.getCoordinateFromPixelInternal([s[0]-i*Math.cos(o),s[1]-i*Math.sin(o)]);n.animateInternal({center:n.getConstrainedCenter(a),duration:500,easing:Ji})}return this.panning_&&(this.panning_=!1,n.endInteraction()),!1}return this.kinetic_&&this.kinetic_.begin(),this.lastCentroid=null,!0},e.prototype.handleDownEvent=function(t){if(this.targetPointers.length>0&&this.condition_(t)){var e=t.map,n=e.getView();return this.lastCentroid=null,n.getAnimating()&&n.cancelAnimations(),this.kinetic_&&this.kinetic_.begin(),this.noKinetic_=this.targetPointers.length>1,!0}return!1},e}(Gr),qr=$r,Qr=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!==typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),ts=function(t){function e(e){var n=this,i=e||{};return n=t.call(this,{stopDown:f})||this,n.condition_=i.condition?i.condition:Br,n.lastAngle_=void 0,n.duration_=void 0!==i.duration?i.duration:250,n}return Qr(e,t),e.prototype.handleDragEvent=function(t){if(Jr(t)){var e=t.map,n=e.getView();if(n.getConstraints().rotation!==zi){var i=e.getSize(),o=t.pixel,r=Math.atan2(i[1]/2-o[1],o[0]-i[0]/2);if(void 0!==this.lastAngle_){var s=r-this.lastAngle_;n.adjustRotationInternal(-s)}this.lastAngle_=r}}},e.prototype.handleUpEvent=function(t){if(!Jr(t))return!0;var e=t.map,n=e.getView();return n.endInteraction(this.duration_),!1},e.prototype.handleDownEvent=function(t){if(!Jr(t))return!1;if(Hr(t)&&this.condition_(t)){var e=t.map;return e.getView().beginInteraction(),this.lastAngle_=void 0,!0}return!1},e}(Gr),es=ts,ns=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!==typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),is=function(t){function e(e){var n=t.call(this)||this;return n.geometry_=null,n.element_=document.createElement("div"),n.element_.style.position="absolute",n.element_.style.pointerEvents="auto",n.element_.className="ol-box "+e,n.map_=null,n.startPixel_=null,n.endPixel_=null,n}return ns(e,t),e.prototype.disposeInternal=function(){this.setMap(null)},e.prototype.render_=function(){var t=this.startPixel_,e=this.endPixel_,n="px",i=this.element_.style;i.left=Math.min(t[0],e[0])+n,i.top=Math.min(t[1],e[1])+n,i.width=Math.abs(e[0]-t[0])+n,i.height=Math.abs(e[1]-t[1])+n},e.prototype.setMap=function(t){if(this.map_){this.map_.getOverlayContainer().removeChild(this.element_);var e=this.element_.style;e.left="inherit",e.top="inherit",e.width="inherit",e.height="inherit"}this.map_=t,this.map_&&this.map_.getOverlayContainer().appendChild(this.element_)},e.prototype.setPixels=function(t,e){this.startPixel_=t,this.endPixel_=e,this.createOrUpdateGeometry(),this.render_()},e.prototype.createOrUpdateGeometry=function(){var t=this.startPixel_,e=this.endPixel_,n=[t,[t[0],e[1]],e,[e[0],t[1]]],i=n.map(this.map_.getCoordinateFromPixelInternal,this.map_);i[4]=i[0].slice(),this.geometry_?this.geometry_.setCoordinates([i]):this.geometry_=new Jo([i])},e.prototype.getGeometry=function(){return this.geometry_},e}(l),os=is,rs=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!==typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),ss={BOXSTART:"boxstart",BOXDRAG:"boxdrag",BOXEND:"boxend",BOXCANCEL:"boxcancel"},as=function(t){function e(e,n,i){var o=t.call(this,e)||this;return o.coordinate=n,o.mapBrowserEvent=i,o}return rs(e,t),e}(Kt),ls=function(t){function e(e){var n=t.call(this)||this;n.on,n.once,n.un;var i=e||{};return n.box_=new os(i.className||"ol-dragbox"),n.minArea_=void 0!==i.minArea?i.minArea:64,i.onBoxEnd&&(n.onBoxEnd=i.onBoxEnd),n.startPixel_=null,n.condition_=i.condition?i.condition:Hr,n.boxEndCondition_=i.boxEndCondition?i.boxEndCondition:n.defaultBoxEndCondition,n}return rs(e,t),e.prototype.defaultBoxEndCondition=function(t,e,n){var i=n[0]-e[0],o=n[1]-e[1];return i*i+o*o>=this.minArea_},e.prototype.getGeometry=function(){return this.box_.getGeometry()},e.prototype.handleDragEvent=function(t){this.box_.setPixels(this.startPixel_,t.pixel),this.dispatchEvent(new as(ss.BOXDRAG,t.coordinate,t))},e.prototype.handleUpEvent=function(t){this.box_.setMap(null);var e=this.boxEndCondition_(t,this.startPixel_,t.pixel);return e&&this.onBoxEnd(t),this.dispatchEvent(new as(e?ss.BOXEND:ss.BOXCANCEL,t.coordinate,t)),!1},e.prototype.handleDownEvent=function(t){return!!this.condition_(t)&&(this.startPixel_=t.pixel,this.box_.setMap(t.map),this.box_.setPixels(this.startPixel_,this.startPixel_),this.dispatchEvent(new as(ss.BOXSTART,t.coordinate,t)),!0)},e.prototype.onBoxEnd=function(t){},e}(Gr),hs=ls,cs=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!==typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),us=function(t){function e(e){var n=this,i=e||{},o=i.condition?i.condition:Xr;return n=t.call(this,{condition:o,className:i.className||"ol-dragzoom",minArea:i.minArea})||this,n.duration_=void 0!==i.duration?i.duration:200,n.out_=void 0!==i.out&&i.out,n}return cs(e,t),e.prototype.onBoxEnd=function(t){var e=this.getMap(),n=e.getView(),i=this.getGeometry();if(this.out_){var o=n.rotatedExtentForGeometry(i),r=n.getResolutionForExtentInternal(o),s=n.getResolution()/r;i=i.clone(),i.scale(s*s)}n.fitInternal(i,{duration:this.duration_,easing:Ji})},e}(hs),ps=us,ds={LEFT:37,UP:38,RIGHT:39,DOWN:40},fs=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!==typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),ys=function(t){function e(e){var n=t.call(this)||this,i=e||{};return n.defaultCondition_=function(t){return Kr(t)&&Ur(t)},n.condition_=void 0!==i.condition?i.condition:n.defaultCondition_,n.duration_=void 0!==i.duration?i.duration:100,n.pixelDelta_=void 0!==i.pixelDelta?i.pixelDelta:128,n}return fs(e,t),e.prototype.handleEvent=function(t){var e=!1;if(t.type==te.KEYDOWN){var n=t.originalEvent,i=n.keyCode;if(this.condition_(t)&&(i==ds.DOWN||i==ds.LEFT||i==ds.RIGHT||i==ds.UP)){var o=t.map,r=o.getView(),s=r.getResolution()*this.pixelDelta_,a=0,l=0;i==ds.DOWN?l=-s:i==ds.LEFT?a=-s:i==ds.RIGHT?a=s:l=s;var h=[a,l];xe(h,r.getRotation()),Sr(r,h,this.duration_),n.preventDefault(),e=!0}}return!e},e}(Rr),gs=ys,vs=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!==typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),ms=function(t){function e(e){var n=t.call(this)||this,i=e||{};return n.condition_=i.condition?i.condition:Ur,n.delta_=i.delta?i.delta:1,n.duration_=void 0!==i.duration?i.duration:100,n}return vs(e,t),e.prototype.handleEvent=function(t){var e=!1;if(t.type==te.KEYDOWN||t.type==te.KEYPRESS){var n=t.originalEvent,i=n.charCode;if(this.condition_(t)&&(i=="+".charCodeAt(0)||i=="-".charCodeAt(0))){var o=t.map,r=i=="+".charCodeAt(0)?this.delta_:-this.delta_,s=o.getView();Or(s,r,void 0,this.duration_),n.preventDefault(),e=!0}}return!e},e}(Rr),_s=ms,bs=function(){function t(t,e,n){this.decay_=t,this.minVelocity_=e,this.delay_=n,this.points_=[],this.angle_=0,this.initialVelocity_=0}return t.prototype.begin=function(){this.points_.length=0,this.angle_=0,this.initialVelocity_=0},t.prototype.update=function(t,e){this.points_.push(t,e,Date.now())},t.prototype.end=function(){if(this.points_.length<6)return!1;var t=Date.now()-this.delay_,e=this.points_.length-3;if(this.points_[e+2]<t)return!1;var n=e-3;while(n>0&&this.points_[n+2]>t)n-=3;var i=this.points_[e+2]-this.points_[n+2];if(i<1e3/60)return!1;var o=this.points_[e]-this.points_[n],r=this.points_[e+1]-this.points_[n+1];return this.angle_=Math.atan2(r,o),this.initialVelocity_=Math.sqrt(o*o+r*r)/i,this.initialVelocity_>this.minVelocity_},t.prototype.getDistance=function(){return(this.minVelocity_-this.initialVelocity_)/this.decay_},t.prototype.getAngle=function(){return this.angle_},t}(),ws=bs,Cs=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!==typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),xs={TRACKPAD:"trackpad",WHEEL:"wheel"},Es=function(t){function e(e){var n=this,i=e||{};n=t.call(this,i)||this,n.totalDelta_=0,n.lastDelta_=0,n.maxDelta_=void 0!==i.maxDelta?i.maxDelta:1,n.duration_=void 0!==i.duration?i.duration:250,n.timeout_=void 0!==i.timeout?i.timeout:80,n.useAnchor_=void 0===i.useAnchor||i.useAnchor,n.constrainResolution_=void 0!==i.constrainResolution&&i.constrainResolution;var o=i.condition?i.condition:zr;return n.condition_=i.onFocusOnly?Fr(Vr,o):o,n.lastAnchor_=null,n.startTime_=void 0,n.timeoutId_,n.mode_=void 0,n.trackpadEventGap_=400,n.trackpadTimeoutId_,n.deltaPerZoom_=300,n}return Cs(e,t),e.prototype.endInteraction_=function(){this.trackpadTimeoutId_=void 0;var t=this.getMap();if(t){var e=t.getView();e.endInteraction(void 0,this.lastDelta_?this.lastDelta_>0?1:-1:0,this.lastAnchor_)}},e.prototype.handleEvent=function(t){if(!this.condition_(t))return!0;var e=t.type;if(e!==te.WHEEL)return!0;var n,i=t.map,o=t.originalEvent;if(o.preventDefault(),this.useAnchor_&&(this.lastAnchor_=t.coordinate),t.type==te.WHEEL&&(n=o.deltaY,C&&o.deltaMode===WheelEvent.DOM_DELTA_PIXEL&&(n/=P),o.deltaMode===WheelEvent.DOM_DELTA_LINE&&(n*=40)),0===n)return!1;this.lastDelta_=n;var r=Date.now();void 0===this.startTime_&&(this.startTime_=r),(!this.mode_||r-this.startTime_>this.trackpadEventGap_)&&(this.mode_=Math.abs(n)<4?xs.TRACKPAD:xs.WHEEL);var s=i.getView();if(this.mode_===xs.TRACKPAD&&!s.getConstrainResolution()&&!this.constrainResolution_)return this.trackpadTimeoutId_?clearTimeout(this.trackpadTimeoutId_):(s.getAnimating()&&s.cancelAnimations(),s.beginInteraction()),this.trackpadTimeoutId_=setTimeout(this.endInteraction_.bind(this),this.timeout_),s.adjustZoom(-n/this.deltaPerZoom_,this.lastAnchor_),this.startTime_=r,!1;this.totalDelta_+=n;var a=Math.max(this.timeout_-(r-this.startTime_),0);return clearTimeout(this.timeoutId_),this.timeoutId_=setTimeout(this.handleWheelZoom_.bind(this,i),a),!1},e.prototype.handleWheelZoom_=function(t){var e=t.getView();e.getAnimating()&&e.cancelAnimations();var n=-xt(this.totalDelta_,-this.maxDelta_*this.deltaPerZoom_,this.maxDelta_*this.deltaPerZoom_)/this.deltaPerZoom_;(e.getConstrainResolution()||this.constrainResolution_)&&(n=n?n>0?1:-1:0),Or(e,n,this.lastAnchor_,this.duration_),this.mode_=void 0,this.totalDelta_=0,this.lastAnchor_=null,this.startTime_=void 0,this.timeoutId_=void 0},e.prototype.setMouseAnchor=function(t){this.useAnchor_=t,t||(this.lastAnchor_=null)},e}(Rr),Ms=Es,Ps=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!==typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),Ts=function(t){function e(e){var n=this,i=e||{},o=i;return o.stopDown||(o.stopDown=f),n=t.call(this,o)||this,n.anchor_=null,n.lastAngle_=void 0,n.rotating_=!1,n.rotationDelta_=0,n.threshold_=void 0!==i.threshold?i.threshold:.3,n.duration_=void 0!==i.duration?i.duration:250,n}return Ps(e,t),e.prototype.handleDragEvent=function(t){var e=0,n=this.targetPointers[0],i=this.targetPointers[1],o=Math.atan2(i.clientY-n.clientY,i.clientX-n.clientX);if(void 0!==this.lastAngle_){var r=o-this.lastAngle_;this.rotationDelta_+=r,!this.rotating_&&Math.abs(this.rotationDelta_)>this.threshold_&&(this.rotating_=!0),e=r}this.lastAngle_=o;var s=t.map,a=s.getView();if(a.getConstraints().rotation!==zi){var l=s.getViewport().getBoundingClientRect(),h=Dr(this.targetPointers);h[0]-=l.left,h[1]-=l.top,this.anchor_=s.getCoordinateFromPixelInternal(h),this.rotating_&&(s.render(),a.adjustRotationInternal(e,this.anchor_))}},e.prototype.handleUpEvent=function(t){if(this.targetPointers.length<2){var e=t.map,n=e.getView();return n.endInteraction(this.duration_),!1}return!0},e.prototype.handleDownEvent=function(t){if(this.targetPointers.length>=2){var e=t.map;return this.anchor_=null,this.lastAngle_=void 0,this.rotating_=!1,this.rotationDelta_=0,this.handlingDownUpSequence||e.getView().beginInteraction(),!0}return!1},e}(Gr),As=Ts,Ss=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!==typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),Os=function(t){function e(e){var n=this,i=e||{},o=i;return o.stopDown||(o.stopDown=f),n=t.call(this,o)||this,n.anchor_=null,n.duration_=void 0!==i.duration?i.duration:400,n.lastDistance_=void 0,n.lastScaleDelta_=1,n}return Ss(e,t),e.prototype.handleDragEvent=function(t){var e=1,n=this.targetPointers[0],i=this.targetPointers[1],o=n.clientX-i.clientX,r=n.clientY-i.clientY,s=Math.sqrt(o*o+r*r);void 0!==this.lastDistance_&&(e=this.lastDistance_/s),this.lastDistance_=s;var a=t.map,l=a.getView();1!=e&&(this.lastScaleDelta_=e);var h=a.getViewport().getBoundingClientRect(),c=Dr(this.targetPointers);c[0]-=h.left,c[1]-=h.top,this.anchor_=a.getCoordinateFromPixelInternal(c),a.render(),l.adjustResolutionInternal(e,this.anchor_)},e.prototype.handleUpEvent=function(t){if(this.targetPointers.length<2){var e=t.map,n=e.getView(),i=this.lastScaleDelta_>1?1:-1;return n.endInteraction(this.duration_,i),!1}return!0},e.prototype.handleDownEvent=function(t){if(this.targetPointers.length>=2){var e=t.map;return this.anchor_=null,this.lastDistance_=void 0,this.lastScaleDelta_=1,this.handlingDownUpSequence||e.getView().beginInteraction(),!0}return!1},e}(Gr),Rs=Os;function Ls(t){var e=t||{},n=new ln,i=new ws(-.005,.05,100),o=void 0===e.altShiftDragRotate||e.altShiftDragRotate;o&&n.push(new es);var r=void 0===e.doubleClickZoom||e.doubleClickZoom;r&&n.push(new kr({delta:e.zoomDelta,duration:e.zoomDuration}));var s=void 0===e.dragPan||e.dragPan;s&&n.push(new qr({onFocusOnly:e.onFocusOnly,kinetic:i}));var a=void 0===e.pinchRotate||e.pinchRotate;a&&n.push(new As);var l=void 0===e.pinchZoom||e.pinchZoom;l&&n.push(new Rs({duration:e.zoomDuration}));var h=void 0===e.keyboard||e.keyboard;h&&(n.push(new gs),n.push(new _s({delta:e.zoomDelta,duration:e.zoomDuration})));var c=void 0===e.mouseWheelZoom||e.mouseWheelZoom;c&&n.push(new Ms({onFocusOnly:e.onFocusOnly,duration:e.zoomDuration}));var u=void 0===e.shiftDragZoom||e.shiftDragZoom;return u&&n.push(new ps({duration:e.zoomDuration})),n}var Is=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!==typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),ks=function(t){function e(e){return e=Ut({},e),e.controls||(e.controls=Mr()),e.interactions||(e.interactions=Ls({onFocusOnly:!0})),t.call(this,e)||this}return Is(e,t),e.prototype.createRenderer=function(){return new en(this)},e}(pr),js=ks,Ns=n("169d");class Ds{constructor(){this.map=null,this._lPolygon=null,this._measureTooltip=null,this.currentLayer=[!1,!1,!0],this.polygonGeojsonArr=[],this.polygonGeojson=null,this.lModifyEventArr=[],this.lmap=null,this.lMEvent=null,this.am=new Ns["AM"],this.type=2,this.lPolygonNewArr=new Array,this.polygonGeojsonMap=new js,this.drawPolygonArr=new Set,this.drawLineArr=new Set,this._lRectangle=null,this.layers=null,this.drawZIndex=1}init(t){const{el:e,type:n,callback:i,viewOptions:o,layerType:r,mapType:s}=t;this.initMap({el:e,callback:i,viewOptions:o,type:n,layerType:r})}initMap({el:t,callback:e,type:n,viewOptions:i,layerType:o}){this.lmap||(this.lmap=new Ns["LMap"]({controls:Ns["MapConfig"].Defaults,interactions:Ls({pinchRotate:!1})})),setTimeout(()=>{const r=async()=>{this.map&&(this.map=null);const{map:r,layers:s}=await this.lmap.onLoad(t,n,o);this.map=r,this.layers=s,Ns["MapConfig"].View=i,this.map.setView(Ns["MapConfig"].View),e&&e(this.map,s)};r()},100)}get getMapTypeLength(){return this.lmap.getMapTypeLength}get getLayeTypeLength(){return this.lmap.getLayeTypeLength}selectMapLayer(t,e){return this.lmap?this.lmap.selectLayers(t,e):0}initBingMap(t,e,n){this.lmap||(this.lmap=new Ns["LMap"]({controls:Ns["MapConfig"].Defaults})),setTimeout(()=>{const i=async()=>{this.map&&(this.map=null);const{map:i,layers:o}=await this.lmap.onLoad(t,2,2);this.map=i,this.layers=o,Ns["MapConfig"].View=n,this.map.setView(Ns["MapConfig"].View),e&&e(this.map,o)};i()},100)}initBingMapNew(t,e,n){this.lmap||(this.lmap=new Ns["LMap"]({controls:Ns["MapConfig"].Defaults})),setTimeout(()=>{const i=async()=>{this.map&&(this.map=null);const{map:i,layers:o}=await this.lmap.onLoad(t,0,2);this.map=i,this.layers=o,Ns["MapConfig"].View=n,this.map.setView(Ns["MapConfig"].View),e&&e(this.map,o)};i()},100)}async initVectorMap(t){const{el:e,isAnalysisBBOX:n,isAnalysisCenter:i,callback:o,delaytime:r,isDrag:s}=t,a=new Ns["VectorMap"]({isAnalysisBBOX:n,isAnalysisCenter:i,isDrag:s,callback:t=>{o&&o(t)}});return new Promise(t=>{setTimeout(async()=>{const n=await a.onLoad(e);t({map:n,vmap:a})},r||100)})}async initStaticMap(t,e){return await new Promise((n,i)=>{setTimeout(o=>{const r=new js({target:t,view:e.view,layers:[e.layer]});this.map=r,this.layers=[e.layer],r?n(r):i(null)},30)})}getVectorLayerView(){return Ns["MapConfig"].getVectorLayerView}onSetLayers(t){this.type=t,this.currentLayer=this.currentLayer.map(t=>!1),this.currentLayer[t]=!0,this.removeLayers(t),this.addLayers(t)}removeLayers(t){Ns["MapConfig"].TMapLayerArr[t].forEach((t,e)=>{this.map.removeLayer(t)})}addLayers(t){Ns["MapConfig"].TMapLayerArr[t].forEach((t,e)=>{this.map.addLayer(t)})}onCreatePolygon(t,e=!1){this.polygonGeojson&&this.map.removeLayer(this.polygonGeojson),this._lPolygon&&this.clearlPolygon();return this._lPolygon=new Ns["LPolygon"](this.map,{strokeColor:"rgba(255,201,14, 1)",fillColor:"rgba(255,201,14, 0.4)"},e),this._lPolygon}skipCurrentDraw(){this._lPolygon&&this._lPolygon.skipCurrentDraw()}onCancel(){this._lPolygon&&this._lPolygon.removeLastPoint()}onDelete(t){this._lPolygon&&(this._lPolygon.remove(),this._lPolygon=null,this._removeMeasureTooltip(),t&&t())}getGeoJson(){if(this._lPolygon){const[t,e]=this._lPolygon.getCenterPoint(),n=Object(Ns["createGeoJson"])(this._lPolygon.getCoordinates(),{ruleId:"",centerlon:t,centerlat:e});return n}return null}getGeoJsonNew(t){if(this.polygonGeojson){const t=this.polygonGeojson,e=Object(Ns["createGeoJson"])(t.getSource().getFeatures()[0].getGeometry().getCoordinates(),{ruleId:"",centerlon:0,centerlat:0});return e}return null}getPolygonGeoJson(){return this._lPolygon?this._lPolygon.getGeoJson():null}onCreateLine(t){if(this.map){let e=new Ns["LDraw"]("LineString",t||(()=>{}),this.map,this.drawZIndex);return this.drawLineArr.add(e),e}return null}onCreateArea(t){if(this.map){let e=new Ns["LDraw"]("Polygon",t||(()=>{}),this.map,this.drawZIndex);return this.drawPolygonArr.add(e),e}return null}removeDrawArr(){this.drawLineArr.forEach(t=>{if(t)try{t.clear()}catch(e){}}),this.drawLineArr.clear(),this.drawPolygonArr.forEach(t=>{if(t)try{t.clear()}catch(e){}}),this.drawPolygonArr.clear()}clearlPolygon(){this.map&&this._lPolygon&&(this._lPolygon.remove(),this._lPolygon=null)}_createMeasureTooltip(){const t=new Ns["MeasureTooltip"];return t.setOffset([0,-30]),this._measureTooltip=t,t}_removeMeasureTooltip(){this.map&&this._measureTooltip&&this.map.removeOverlay(this._measureTooltip.getMarker())}createPolygonGeojson(t,e="rgba(255, 255, 255, 0.3)",n="rgba(00, 131, 241, 1)",i,o=!1,r=[]){if(this.map){const s=Object(Ns["createPolygonGeojson"])(t,e,n,i,o,r);this.polygonGeojsonArr.push(s),this.polygonGeojson=null,this.map.addLayer(s)}}createPolygonGeojsonNew(t,e="rgba(255, 255, 255, 0.3)",n="rgba(00, 131, 241, 1)",i,o=!1){if(this.polygonGeojson&&(this.polygonGeojson=null),this.map){const r=Object(Ns["createPolygonGeojson"])(t,e,n,i,o);this.polygonGeojson=r,this.map.addLayer(r)}}removePolygonGeojsons(){if(!this.polygonGeojsonArr.length)return;let t=null;while(t=this.polygonGeojsonArr.shift())this.map.removeLayer(t),t=null}removePolygonGeojsonNew(){this.polygonGeojson&&(this.map.removeLayer(this.polygonGeojson),this.polygonGeojson=null)}clear(){this.map&&(this.am&&(this.am=null,this.am=new Ns["AM"]),this.removeOverlays(),this.removeLModifyEventArr(),this.removePolygonGeojsons(),this.clearlPolygon(),this.removeLModifyEvent(),this.removePolygonGeojsonNew(),this.removeMapsLayers())}clearNew(){this.removeOverlays(),this.removeLModifyEventArr(),this.removePolygonGeojsons(),this.clearlPolygon(),this.removeLModifyEvent(),this.removePolygonGeojsonNew()}getMap(){return this.map}setCenter([t,e],n){if(!this.map)return;const i=this.map.getView();i.setCenter([t,e]),n>0&&i.setZoom(n)}setZoom(t){if(!this.map)return;const e=this.map.getView();e.setZoom(t)}setMaxZoom(t){if(!this.map)return;const e=this.map.getView();e.setMaxZoom(t)}setMinZoom(){if(!this.map)return;const t=this.map.getView();t.setMinZoom(zoom)}get getZoom(){if(!this.map)return 0;const t=this.map.getView();return t.getZoom()}getCenter(){if(!this.map)return;const t=this.map.getView();let[e,n]=t.getCenter();return[e,n]}fit(t){Object(Ns["fitNew"])(this.map,t)}createMarker(t,e=15,n=15){return new Ns["LMarker"](t,e,n)}removeMarker(t){this.map.removeOverlay(t.getMarker())}lModifyEventArr(){this.lModifyEventArr.length=0,this.polygonGeojsonArr.forEach((t,e)=>{const n=new Ns["LModifyEvent"](t,this.map);n.setActive(),this.lModifyEventArr.push(n)})}removeLModifyEventArr(){if(!this.lModifyEventArr.length)return;let t=null;while(t=this.lModifyEventArr.shift())t.setActive(!1),t.remove(),t=null}lModifyEvent(){if(this.map&&this.polygonGeojson){const t=new Ns["LModifyEvent"](this.polygonGeojson,this.map);t.setActive(),this.lMEvent=t}}removeLModifyEvent(){this.lMEvent&&(this.lMEvent.setActive(!1),this.lMEvent.remove())}convertWGS84GeoJSONgcj_encrypt(t){const{bbox:e,geometry:n,properties:i}=t,o=[];for(let a=0;a<e.length;a+=2){const{lon:t,lat:n}=Ns["GPS"].gcj_encrypt(e[a],e[a+1]);o.push(t),o.push(n)}t.bbox=o;const r=n.coordinates,s=new Array;for(let a=0;a<r.length;a++){s.push(r[a]);for(let t=0;t<r[a].length;t++){const e=r[a][t],{lon:n,lat:i}=Ns["GPS"].gcj_encrypt(e[0],e[1]);s[a][t]=[n,i]}}if(n.coordinates=s,i&&i.center){const[e,n]=i.center,[o,r]=Ns["GPS"].gcj_encrypt(e,n);t.properties.center=[o,r]}return t}gcj_encryptConvertWGS84GeoJSON(t){const{bbox:e,geometry:n,properties:i}=t,o=[];for(let a=0;a<e.length;a+=2){const{lon:t,lat:n}=Ns["GPS"].gcj_decrypt(e[a],e[a+1]);o.push(t),o.push(n)}t.bbox=o;const r=n.coordinates,s=new Array;for(let a=0;a<r.length;a++){s.push(r[a]);for(let t=0;t<r[a].length;t++){const e=r[a][t],{lon:n,lat:i}=Ns["GPS"].gcj_decrypt(e[0],e[1]);s[a][t]=[n,i]}}if(n.coordinates=s,i&&i.center){const[e,n]=i.center,[o,r]=Ns["GPS"].gcj_decrypt(e,n);t.properties.center=[o,r]}return t}gcj_encrypt(t,e){return Ns["GPS"].gcj_encrypt(t,e)}gcj_decrypt(t,e){return Ns["GPS"].gcj_decrypt(t,e)}formatArea(){return this._lPolygon&&this._lPolygon.getGeometry()?Object(Ns["formatArea"])(this._lPolygon.getGeometry()):0}formatLength(){return this._lPolygon&&this._lPolygon.getGeometry()?Object(Ns["formatLength"])(this._lPolygon.getGeometry()):0}createPolylinePointList(t,e=!1,n=!0,i=null,o=0){let r=new Array;const s=Object(Ns["createPolylinePoints"])(t,e);r=Object(Ns["addPolylinePoint"])(s,this.map);const a=Object(Ns["createGPSPoints"])(t,e,this.am);if(null!=a){let t=this.am.getLngLats();o&&(t=this.am.getLngLatGCJ02()),Object(Ns["fitNew"])(this.map,[[t[0],t[1]],[t[2],t[3]]])}return r}async setAreaCenterPoint(){let t="3301";if(window.localStorage.getItem("user")){const e=JSON.parse(window.localStorage.getItem("user"));t=e["areaCode"]}const{data:e}=await getAreaCenter(t),{areaCode:n,areaName:i,centerLongitude:o,centerLatitude:r}=e;window.localStorage.setItem("createPointData",JSON.stringify(e))}async getAreaCenterPoint(t=!1){return obj}removeAreaCenterPoint(){window.localStorage.removeItem("createPointData")}polygonStyle(){return Ns["polygonStyle"]}removeMapsLayers(){const t=this.map.getLayers().getArray();for(let e=t.length;0<=e;e--)this.map.removeLayer(t[e])}removeOverlays(){if(!this.map)return;const t=this.map.getOverlays().getArray();for(let e=t.length;0<=e;e--)this.map.removeOverlay(t[e])}resetAM(){this.am=null,this.am=new Ns["AM"]}createPolygonBoundary(t,e){const n=Object(Ns["createPolygonBoundary"])(t,e);this.polygonGeojsonArr.push(n),this.map.addLayer(n)}createPolylinePointListNew(t,e,n={isGCJ02Point:!1,isFit:!1}){let i=new Array;const o=Object(Ns["createPolylinePoints"])(t,!1);i=Object(Ns["addPolylinePointNew"])(o,this.map,e);const r=Object(Ns["createGPSPoints"])(t,!1,this.am);if(null!=r&&n.isFit){let t=this.am.getLngLats();e.type&&(t=this.am.getLngLatGCJ02()),Object(Ns["fitNew"])(this.map,[[t[0],t[1]],[t[2],t[3]]])}return i}createLPolygonNew(t,e){this.lPolygonNewArr.push(new Ns["LPolygonNew"](t,e))}setPolygonColor(t,e=["rgba(255,201,14, 0.4)","rgba(255,201,14, 1)"]){this.lPolygonNewArr.forEach(n=>{n.Id!=t||n.setPolygonColor(e)})}setPolygonColorAll(t=["rgba(184, 233, 134, 0.56)","rgba(23, 168, 162, 0.56)"]){this.lPolygonNewArr.forEach(e=>{e.setPolygonColor(t)})}removePolygonNew(){this.lPolygonNewArr.forEach(t=>{t.removePolygon(),t=null}),this.lPolygonNewArr=[]}caculateLL(t,e,n,i){return Object(Ns["caculateLL"])(t,e,n,i)}get LPolygonNewArr(){return this.lPolygonNewArr}get isTruePolygon(){return!!this._lPolygon&&this._lPolygon.isTruePolygon}onCreateRectangle(t){this._lRectangle&&this.clearRectangle();return this._lRectangle=new Ns["LRectangle"]("Circle",this.map,t=>{}),this._lRectangle}getRectangleData(){if(!this._lRectangle)return[];const t=this._lRectangle.getCoordinates(),e=t[0];if(e.length){const t=[];return t.push([e[0][0],e[1][1]]),t.push([e[1][0],e[2][1]]),t}return[]}getRectangleDataNew(){if(!this._lRectangle)return[];const t=this._lRectangle.getCoordinates(),e=t[0];if(e.length){const t=[];return t.push([e[0][0],e[1][1]]),t.push([e[1][0],e[2][1]]),t}return[]}clearRectangle(){if(this.map&&this._lRectangle){this._lRectangle.getCoordinates();this._lRectangle.remove(),this._lRectangle=null}}async initOfflineMap(t,e){const{el:n,urls:i,callback:o}=e;this.lmap=new Ns["OfflineMap"],setTimeout(async t=>{const{map:e,layers:r}=await this.lmap.onLoad(n,i);this.map=e,this.layers=r,o({map:e,lMap:this.lmap})},50)}set DrawZIndex(t){this.drawZIndex=t}get DrawZIndex(){return this.drawZIndex}}function Gs(t){return Gs="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Gs(t)}function Fs(t,e){if("object"!=Gs(t)||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var i=n.call(t,e||"default");if("object"!=Gs(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}function Bs(t){var e=Fs(t,"string");return"symbol"==Gs(e)?e:e+""}function Zs(t,e,n){return(e=Bs(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}class Vs{constructor(){Zs(this,"isShowSwitchMap",{type:Boolean,default:!0}),Zs(this,"resolution",{type:Boolean,default:!1}),Zs(this,"zoomedIn",{type:Number,default:17}),this.mapType={type:Number,default:0},this.layerType={type:Number,default:2},this.isSwitchMapTool={type:Boolean,default:!0},this.isRyMapTool={type:Boolean,default:!1},this.isRight={type:Boolean,default:!1},this.bindMapClick={type:Boolean,default:!1},this.bindContextmenu={type:Boolean,default:!1},this.binddblClick={type:Boolean,default:!1},this.bindMapMoveend={type:Boolean,default:!1},this.isDisabledSwitchMapTabEvent={type:Boolean,default:!1},this.initModifyPolygon={type:[String,Object],default:()=>null},this.m={type:Number,default:()=>3e3},this.switchMapDefaultTypeOrLayer={type:Array,default:()=>null},this.mapTypeAndLayer={type:Array,default:()=>[{id:0,icon:"el-icon--tianditu",activeIcon:"el-icon--tianditu-copy",name:"天地图",layer:[{id:0,name:"地图"},{id:1,name:"卫星"},{id:2,name:"卫星组合"}]},{id:1,icon:"el-icon--gaode",activeIcon:"el-icon--gaode-copy",name:"高德地图",layer:[{id:0,name:"地图"},{id:1,name:"卫星"},{id:2,name:"卫星组合"}]},{id:2,icon:"el-icon--Bing",activeIcon:"el-icon--Bing-copy",name:"Bing地图",layer:[{id:1,name:"卫星"},{id:2,name:"卫星组合"}]}]}}}class zs{constructor(t){this.zoom={type:Number,default:10},this.maxZoom={type:Number,default:18},this.minZoom={type:Number,default:1},this.center={type:Array,default:()=>[116.40769,39.89945]},this.projection={type:String,default:"EPSG:4326"},this.bbox={type:Array,default:()=>[]}}}class Hs{constructor(){Zs(this,"isHideAreaAndKM",{type:Boolean,default:!1}),Zs(this,"switchMapPosTop",{type:Number,default:50}),Zs(this,"switchMapPosLeftOrRight",{type:Number,default:20}),Zs(this,"isSwitchMapRight",{type:Boolean,default:!0}),Zs(this,"switchMapHeight",{type:Number,default:40}),Zs(this,"isShowRangingTool",{type:Boolean,default:!0}),Zs(this,"isShowDrawTool",{type:Boolean,default:!1}),Zs(this,"isRight",{type:Boolean,default:!0}),Zs(this,"isCrossHair",{type:Boolean,default:!1}),Zs(this,"initModifyPolygon",{type:[String,Object],default:()=>null}),Zs(this,"hideAdd",{type:Boolean,default:!1}),Zs(this,"hidePoint",{type:Boolean,default:!1}),Zs(this,"hideCancel",{type:Boolean,default:!1}),Zs(this,"hideDelete",{type:Boolean,default:!1}),Zs(this,"hideSave",{type:Boolean,default:!1}),Zs(this,"hideLine",{type:Boolean,default:!1}),Zs(this,"hideArea",{type:Boolean,default:!1}),Zs(this,"isSwitchMap",{type:Boolean,default:!0}),Zs(this,"gpsType",{type:Number,default:0}),Zs(this,"drawZIndex",{type:Number,default:1})}}var Ks=function(){var t=this,e=t._self._c;return e("div",{staticClass:"draw-tool-box"},[t.isRight?[t.isShowRangingTool?e("aside",{staticClass:"map-control",staticStyle:{"margin-right":"60px"}},[t.hideLine?t._e():e("el-button",{staticClass:"ele-text-primary el-icon--changdu",on:{click:function(e){return e.stopPropagation(),t.onCreateLine()}}}),t.hideArea?t._e():e("el-button",{staticClass:"ele-text-primary el-icon--mianji",on:{click:function(e){return e.stopPropagation(),t.onCreateArea()}}})],1):t._e(),t.isShowDrawTool?e("aside",{staticClass:"map-button-box"},[t.hideAdd?t._e():e("el-button",{staticClass:"ele-text-primary el-icon--add",on:{click:function(e){return e.stopPropagation(),t.onCreatePolygon()}}}),t.hidePoint?t._e():e("el-button",{staticClass:"ele-text-primary el-icon--dadian",on:{click:function(e){return e.stopPropagation(),t.onPointEvent()}}}),t.hideCancel?t._e():e("el-button",{staticClass:"ele-text-primary el-icon--back",on:{click:function(e){return e.stopPropagation(),t.lMap.onCancel()}}}),t.hideDelete?t._e():e("el-button",{staticClass:"ele-text-primary el-icon--ashbin",on:{click:function(e){return e.stopPropagation(),t.onDelete()}}}),t.hideSave?t._e():e("el-button",{staticClass:"ele-text-primary el-icon--duihao",on:{click:function(e){return e.stopPropagation(),t.onSave()}}}),t._t("default")],2):t._e()]:[t.isShowDrawTool?e("aside",{staticClass:"map-button-box"},[t.hideAdd?t._e():e("el-button",{staticClass:"ele-text-primary el-icon--add",on:{click:function(e){return e.stopPropagation(),t.onCreatePolygon()}}}),t.hidePoint?t._e():e("el-button",{staticClass:"ele-text-primary el-icon--dadian",on:{click:function(e){return e.stopPropagation(),t.onPointEvent()}}}),t.hideCancel?t._e():e("el-button",{staticClass:"ele-text-primary el-icon--back",on:{click:function(e){return e.stopPropagation(),t.lMap.onCancel()}}}),t.hideDelete?t._e():e("el-button",{staticClass:"ele-text-primary el-icon--ashbin",on:{click:function(e){return e.stopPropagation(),t.onDelete()}}}),t.hideSave?t._e():e("el-button",{staticClass:"ele-text-primary el-icon--duihao",on:{click:function(e){return e.stopPropagation(),t.onSave()}}}),t._t("default")],2):t._e(),t.isShowRangingTool?e("aside",{staticClass:"map-control",staticStyle:{"margin-left":"60px"}},[t.hideLine?t._e():e("el-button",{staticClass:"ele-text-primary el-icon--changdu",on:{click:function(e){return e.stopPropagation(),t.onCreateLine()}}}),t.hideArea?t._e():e("el-button",{staticClass:"ele-text-primary el-icon--mianji",on:{click:function(e){return e.stopPropagation(),t.onCreateArea()}}})],1):t._e()],t.lMap?e("ry-cross-hair",{attrs:{isHide:t.isCrossHair,map:t.lMap.map},on:{click:function(e){return t.onClick(e)}}}):t._e()],2)},Xs=[],Us=function(){var t=this,e=t._self._c;return e("div")},Js=[],Ws=(n("3e8f"),{name:"RyCrossHair",props:{map:{type:Object,default:()=>null},isHide:{type:Boolean,default:!1}},created(){this.isHide&&!this.crossHair&&this.createCrossHair()},watch:{isHide(t){!t||this.crossHair?this.removeControl():this.createCrossHair()}},data(){return{crossHair:null}},methods:{getCenter(){if(!this.map)return;const t=this.map.getView();let[e,n]=t.getCenter();return[e,n]},createCrossHair(){this.crossHair=new Ns["CrossHair"](()=>{this.$emit("click",this.getCenter())}),this.map.addControl(this.crossHair)},removeControl(){this.map&&this.crossHair&&(this.map.removeControl(this.crossHair),this.crossHair=null)}}}),Ys=Ws;function $s(t,e,n,i,o,r,s,a){var l,h="function"===typeof t?t.options:t;if(e&&(h.render=e,h.staticRenderFns=n,h._compiled=!0),i&&(h.functional=!0),r&&(h._scopeId="data-v-"+r),s?(l=function(t){t=t||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext,t||"undefined"===typeof __VUE_SSR_CONTEXT__||(t=__VUE_SSR_CONTEXT__),o&&o.call(this,t),t&&t._registeredComponents&&t._registeredComponents.add(s)},h._ssrRegister=l):o&&(l=a?function(){o.call(this,(h.functional?this.parent:this).$root.$options.shadowRoot)}:o),l)if(h.functional){h._injectStyles=l;var c=h.render;h.render=function(t,e){return l.call(e),c(t,e)}}else{var u=h.beforeCreate;h.beforeCreate=u?[].concat(u,l):[l]}return{exports:t,options:h}}var qs=$s(Ys,Us,Js,!1,null,null,null),Qs=qs.exports,ta={name:"RyMapTool",components:{RyCrossHair:Qs},props:{lMap:{type:Object,default:()=>null},...new Hs},watch:{initModifyPolygon(t){this.initModifyPolygon=t,this._initPolygon()},isShowRangingTool(t){this.isShowRangingTool=t},isShowDrawTool(t){this.isShowDrawTool=t,this.isCrossHair=t},isRight(t){this.isShowDrawTool=t},isCrossHair(t){this.isCrossHair=t},gpsType(t){this.lastType!=t&&(this.gpsType=t,this.lastType=t,this.drawPolygon&&(this.drawPolygon.type=t),this.selectGPSAll(this.gpsType))}},data(){return{drawPolygon:null,isEdit:!0,lastType:-1}},created(){this._initPolygon()},methods:{_initPolygon(){if(!this.lMap||!this.initModifyPolygon||!this.isShowDrawTool)return;const{coordinates:t,bbox:e}=this._serializeGeoJson();if(this.onDelete(),this.drawPolygon=this.lMap.onCreatePolygon(()=>{},this.isHideAreaAndKM),this.lastType=this.gpsType,this.drawPolygon.type=this.gpsType,this.drawPolygon.initCoordinates(t),this.isEdit=!0,this.$emit("loadDrawPolygonEvent",this),e){const t=[e[0],e[3],e[2],e[1]],n=[e[2],e[1],e[0],e[3]];this.lMap.fit([t,n])}},_serializeGeoJson(){let t=null;if(this.initModifyPolygon instanceof Object)t=this.initModifyPolygon;else{if("string"!==typeof this.initModifyPolygon)return t;t=JSON.parse(this.initModifyPolygon)}const{geometry:e,bbox:n}=t;return{coordinates:e.coordinates,bbox:n}},setFit(t){t&&t.length&&this.lMap&&Object(Ns["fitNew"])(this.lMap.map,[t])},onCreatePolygon(){this.lMap&&(this.drawPolygon=this.lMap.onCreatePolygon(()=>{},this.isHideAreaAndKM),this.lastType=this.gpsType,this.drawPolygon.type=this.gpsType,this.$emit("loadDrawPolygonEvent",this))},onDelete(){this.lMap&&this.drawPolygon&&(this.lMap.onDelete(),this.drawPolygon=null)},onPointEvent(){if(this.drawPolygon){const t=this.lMap.getCenter();if(this.x==t[0]&&this.y==t[1])return;this.x=t[0],this.y=t[1];let e=t;if(this.gpsType){let{lon:n,lat:i}=Ns["GPS"].gcj_decrypt(t[0],t[1]);e=[n,i]}return this.drawPolygon.setCoordinates(e,this.gpsType),void this.$emit("crossHairClick",{pointArr:t,delete:this.onDelete})}this.$message.error("请绘制地块后在进行操作!")},onSave(){const t=this.lMap.getPolygonGeoJson();t?this.lMap.isTruePolygon?t&&this.$emit("success",{geoJson:t,delete:this.onDelete}):this.error(t,1):this.error(t)},error(t,e=0){this.$emit("error",{geoJson:t,delete:this.onDelete,type:e})},onClick(t){if(this.drawPolygon){const t=this.lMap.getCenter();if(this.x==t[0]&&this.y==t[1])return;this.x=t[0],this.y=t[1];let e=t;if(this.gpsType){let{lon:n,lat:i}=Ns["GPS"].gcj_decrypt(t[0],t[1]);e=[n,i]}return this.drawPolygon.setCoordinates(e,this.gpsType),void this.$emit("crossHairClick",{pointArr:t,delete:this.onDelete})}this.$message.error("请绘制地块后在进行操作!")},getGeoJson(){if(this.lMap)return this.lMap.getPolygonGeoJson()},onCancel(){this.lMap&&this.lMap.onCancel()},onCreateLine(){let t=this.lMap.onCreateLine(({id:e,type:n})=>{this.$emit("drawLineEvent",{draw:t,id:e,type:n})});t.Id=Object(Ns["generateGuid"])()},onCreateArea(){let t=this.lMap.onCreateArea(({id:e,type:n})=>{this.$emit("drawPolygonEvent",{draw:t,id:e,type:n})});t.Id=Object(Ns["generateGuid"])()},selectGPSAll(t){this.lMap.removeDrawArr(),this.drawPolygon&&this.drawPolygon.selectGPS(t,!0)}}},ea=ta,na=(n("764d"),$s(ea,Ks,Xs,!1,null,"0be147fb",null)),ia=na.exports,oa=function(){var t=this,e=t._self._c;return t.mapTypeAndLayer&&t.mapTypeAndLayer.length>0?e("div",{staticClass:"switch-map"},[e("div",{staticClass:"top",style:{height:t.height+"px"}},[t.isDisabled?e("p",{staticStyle:{width:"10px"}}):[e("p",{class:t.bottomRight?t.isExpand?"el-icon-arrow-left":"el-icon-arrow-right":t.isExpand?"el-icon-arrow-right":"el-icon-arrow-left",on:{click:t.changeExpand}})],e("ul",t._l(t.mapTypeCopy,(function(n,i){return e("li",{key:i,class:{color:!!t.isExpand||t.mapTypeActive===n.id},on:{click:function(e){return t.mapTypeClick(n)}}},[e("i",{class:t.isExpand||t.mapTypeActive===n.id?n.activeIcon:n.icon}),t._v(" "+t._s(n.name)+" ")])})),0)],2),e("ul",{class:{bottom:!0,marginLeft:t.bottomRight}},t._l(t.mapStyleCopy,(function(n,i){return e("li",{key:i,class:{color:!!t.isTop||t.mapStyleActive===n.id},style:{height:t.height+"px",lineHeight:t.height+"px"}},[e("span",{on:{click:function(e){return t.mapStyleClick(n)}}},[t._v(" "+t._s(n.name)+" ")]),e("i",{directives:[{name:"show",rawName:"v-show",value:0===i,expression:"index===0"}],class:t.isTop?"el-icon-arrow-down":"el-icon-arrow-up",on:{click:t.changeDirectionArrow}})])})),0)]):t._e()},ra=[];n("caad"),n("2382");class sa{constructor(){Zs(this,"switchMapDefaultTypeOrLayer",{type:Array,default:()=>null}),Zs(this,"height",{type:Number,default:40}),Zs(this,"isSwitchMapRight",{type:Boolean,default:!0}),Zs(this,"bottomRight",{type:Boolean,default:!0}),Zs(this,"isDisabled",{type:Boolean,default:!1}),Zs(this,"mapTypeAndLayer",{type:Array,default:()=>null}),Zs(this,"mapType",{type:Array,default:()=>[{icon:"el-icon--tianditu",activeIcon:"el-icon--tianditu-copy",name:"天地图"},{icon:"el-icon--gaode",activeIcon:"el-icon--gaode-copy",name:"高德地图"}]}),Zs(this,"mapStyle",{type:Array,default:()=>["地图","卫星","卫星组合"]})}}var aa={name:"SwitchMap",props:{...new sa},data(){return{isExpand:!0,mapTypeActive:1,mapStyleActive:2,isTop:!0,mapTypeCopy:[],mapStyleCopy:[]}},watch:{switchMapDefaultTypeOrLayer(t){if(!t)return;const e=this.formatToJudge(t);if(!e)return;const n=this.mapStyleActive,i=e||0===e?t[0]:1,o=e||1===e?n:2;setTimeout(()=>{this.$emit("changeSwitchMap",{mapType:i,layerType:o})},100)},mapTypeAndLayer:{handler(t){Array.isArray(t)&&t[1]&&t.forEach((t,e)=>{1!==e||this.switchMapDefaultTypeOrLayer||(this.mapStyleCopy=[t.layer[2]],this.mapTypeCopy=[t])})},immediate:!0}},created(){},mounted(){this._switchMapDefaultTypeOrLayer(this.switchMapDefaultTypeOrLayer),this.switchMapDefaultTypeOrLayer||setTimeout(()=>{this.$emit("changeSwitchMap",{mapType:1,layerType:2})},100)},methods:{formatToJudge(t){var e;const n=[1,2],i=Array.isArray(t),o=n.includes(t.length),r=t[0]>=0&&t[0]<=this.mapTypeAndLayer.length-1,s=t[1]>=0&&t[1]<=(null===(e=this.mapTypeAndLayer[t[0]])||void 0===e?void 0:e.layer.length)-1;if(!i||!o)return!1;if(!r||!s){var a,l;const t=this.mapTypeActive,e=this.mapStyleActive;return this.mapTypeCopy=[this.mapTypeAndLayer[t]],this.mapStyleCopy=[null===(a=this.mapTypeAndLayer[t])||void 0===a?void 0:a.layer[e]],this.mapStyleActive=null===(l=this.mapStyleCopy[0])||void 0===l?void 0:l.id,!1}return r&&!s?(this.mapTypeActive=t[0],this.mapTypeCopy=[this.mapTypeAndLayer[t[0]]],0):s&&!r?(this.mapStyleCopy=[null===(h=this.mapTypeAndLayer[t[0]])||void 0===h?void 0:h.layer[t[1]]],this.mapStyleActive=this.mapStyleCopy[0].id,1):!(!r||!s)&&(this.mapTypeActive=t[0],this.mapTypeCopy=[this.mapTypeAndLayer[t[0]]],this.mapStyleCopy=[null===(c=this.mapTypeAndLayer[t[0]])||void 0===c?void 0:c.layer[t[1]]],this.mapStyleActive=null===(u=this.mapStyleCopy[0])||void 0===u?void 0:u.id,!0);var h,c,u},changeExpand(){if(!this.isDisabled){if(this.isExpand=!this.isExpand,this.isExpand)return this.mapTypeCopy=this.mapTypeAndLayer.filter((t,e)=>this.mapTypeActive===e),void(this.isTop||(this.isTop=!0,this.mapStyleCopy=this.mapTypeAndLayer[this.mapTypeActive].layer.filter(t=>this.mapStyleActive===t.id)));this.mapTypeCopy=[...this.mapTypeAndLayer]}},changeDirectionArrow(){this.isTop=!this.isTop;const t=this.mapTypeActive,e=this.mapTypeAndLayer[t].layer;this.isTop?this.mapStyleCopy=e.filter(e=>t===e.id):this.mapStyleCopy=[...e]},mapTypeClick({id:t}){if(this.mapTypeActive===t||this.isExpand)return;const e=this.mapTypeAndLayer[t].layer;this.mapTypeActive=t,this.mapStyleActive=e[e.length-1].id,this.isTop?this.mapStyleCopy=e.filter(t=>this.mapStyleActive===t.id):this.mapStyleCopy=e,this.$emit("changeSwitchMap",{mapType:this.mapTypeActive,layerType:this.mapStyleActive,cisDisabled:!1})},mapStyleClick({id:t}){this.mapStyleActive===t||this.isTop||(this.mapStyleActive=t,this.$emit("changeSwitchMap",{mapType:this.mapTypeActive,layerType:this.mapStyleActive}))},_switchMapDefaultTypeOrLayer(t){if(!t)return;const e=this.formatToJudge(t);if(!e)return;const n=this.mapStyleActive,i=e||0===e?t[0]:1,o=e||1===e?n:2;setTimeout(()=>{this.$emit("changeSwitchMap",{mapType:i,layerType:o})},100)}}},la=aa,ha=(n("c369"),$s(la,oa,ra,!1,null,"10ed49d6",null)),ca=ha.exports,ua={name:"RyMap",components:{RyMapTool:ia,SwitchMap:ca},props:{...new Vs,...new zs,...new Hs},created(){},watch:{center(t){this.setCenter(t)},bbox(t){this.setFit(t)},maxZoom(t){this.lMap.setMaxZoom(t)},zoom(t){this.lMap.setZoom(t)},minZoom(t){this.lMap.setMinZoom(t)},bindMapClick(t){this._bingMapEvent()},bindContextmenu(t){this._bindContextmenu()},binddblClick(t){this._binddblClick()},bindMapMoveend(t){this._bingMapMoveend()},resolution(t){this._bingResolution()},m(t){this.m=t}},data(){return{lMap:new Ds,drawPolygon:null,mapClick:null,map:null,moveend:null,lastX:0,lastY:0,lastMapType:0,isFirstLoad:!1,contextmenu:null,dblClick:null,resolutionFun:null}},methods:{changeSwitchMap({mapType:t,layerType:e}){this.lMap.selectMapLayer(t,e),this._setMaxZoom(t,e);let n=t;if(t>1&&(n=0),this.lastMapType==n)return;this.lastMapType=n;const i=this.lMap.getCenter();if(i&&i.length)if(0==n){const{lon:t,lat:e}=Ns["GPS"].gcj_decrypt(i[0],i[1]);this.lMap.setCenter([t,e])}else{const{lon:t,lat:e}=Ns["GPS"].gcj_encrypt(i[0],i[1]);this.lMap.setCenter([t,e])}this.$emit("changeSwitchMap",{mapType:n,layerType:e,type:t})},_setMaxZoom(t,e){2==t||0==e?this.setMaxZoom(28):this.setMaxZoom(18)},loadMap(t){this.lMap.DrawZIndex=this.drawZIndex,this.lMap.init({el:t,type:this.mapType,layerType:this.layerType,viewOptions:this.getViewOptions(),callback:(t,e)=>{this.map=t,this.bbox.length>0&&this.setFit(this.bbox);try{const[t,e]=this.lMap.getCenter();this.lastX=t,this.lastY=e}catch(n){}this._bingMapEvent(),this._bingMapMoveend(),this._bingResolution(),this._bindContextmenu(),this._binddblClick(),this.$emit("load",{map:t,mapServices:this.lMap,layers:e,ryMapTool:this.$refs.mapTool}),this.isShowSwitchMap||(this.lastMapType=this.mapType>2?0:this.mapType)}})},_bingMapEvent(){this.bindMapClick?this._mapClickOnce():this._mapClickOnce(!0)},_bingMapMoveend(){this.bindMapMoveend?this._mapMoveend():this._mapMoveend(!0)},_bingResolution(){this.resolution?this.bingResolutionEvent():this.bingResolutionEvent(!0)},_bindContextmenu(){this.bindContextmenu?this._contextmenu():this._contextmenu(!0)},_binddblClick(){this.binddblClick?this._dblClick():this._dblClick(!0)},getViewOptions(){return{projection:this.projection,center:this.center,zoom:this.zoom,minZoom:this.minZoom,maxZoom:this.maxZoom}},setMaxZoom(t){this.lMap.setMaxZoom(t)},setMinZoom(t){this.lMap.setMinZoom(t)},setZoom(t){this.lMap.setZoom(t)},crossHairClick(t){this.$emit("crossHairClick",t)},setCenter(t){this.lMap.setCenter(t,15)},setFit(t){t.length&&this.map&&Object(Ns["fitNew"])(this.map,[t])},drawSuccess(t){this.$emit("drawSuccess",t)},drawError(t){this.$emit("drawError",t)},drawPolygonEvent(t){this.$emit("drawPolygonEvent",t)},drawLineEvent(t){this.$emit("drawLineEvent",t)},_mapClickOnce(t=!1){this.mapClick||(this.mapClick=t=>{if(t.dragging)return;const e=this.map.getEventPixel(t.originalEvent),n=this.map.hasFeatureAtPixel(e);if(n){const e=this.map.forEachFeatureAtPixel(t.pixel,t=>t);this.$emit("mapClick2",e);const n=e.getId();if(void 0===n)return;this.$emit("mapClick",n)}}),t?(this.map.un("singleclick",this.mapClick),this.mapClick=null):this.map.on("singleclick",this.mapClick)},_getLayersId(t,e="dblclick"){if(t.dragging)return;const n=this.map.getEventPixel(t.originalEvent),i=this.map.hasFeatureAtPixel(n);if(i){const n=this.map.forEachFeatureAtPixel(t.pixel,t=>t),i=n.getId();if(void 0===i)return;this.$emit(e,i)}t.preventDefault()},_contextmenu(t){this.contextmenu||(this.contextmenu=t=>{this._getLayersId(t,"contextmenuClick")}),t?(this.map.un("contextmenu",this.contextmenu),this.contextmenu=null):this.map.on("contextmenu",this.contextmenu)},_dblClick(t){this.dblClick||(this.dblClick=t=>{this._getLayersId(t,"doubleClickEvent")}),t?(this.map.un("dblclick",this.dblClick),this.dblClick=null):this.map.on("dblclick",this.dblClick)},_mapMoveend(t=!1){this.moveend=t=>{const[e,n]=this.lMap.getCenter();let i=0;if(this.lastX!==e&&this.lastY!==n)return i=Object(Ns["caculateLL"])(this.lastY,this.lastX,n,e),this.$emit("mapMoveend",{m:i,oversteSetValue:i>=this.m,x:e,y:n,e:t}),void(i>=this.m&&(this.lastX=e,this.lastY=n));this.$emit("mapMoveend",{m:i,oversteSetValue:!1,x:e,y:n,e:t})},t?this.map.un("moveend",this.moveend):this.map.on("moveend",this.moveend)},loadDrawPolygonEvent(t){this.$emit("loadDrawPolygonEvent",t)},bingResolutionEvent(t=!1){const e=this.map.getView(),n=this.zoomedIn;let i=e.getZoom()>n;this.resolutionFun=()=>{const t=e.getZoom();t>n&&!i?(i=!0,this.$emit("resolutionEvent",{zoom:t,status:i})):t<=n&&i&&(i=!1,this.$emit("resolutionEvent",{zoom:t,status:i}))},t?e.un("change:resolution",this.resolutionFun):e.on("change:resolution",this.resolutionFun)}}},pa=ua,da=(n("9fb2"),$s(pa,r,s,!1,null,"0959b11c",null)),fa=da.exports;fa.install=t=>{t.install(fa.name,fa)};var ya=fa;Qs.install=t=>{t.install(Qs.name,Qs)};var ga=Qs;ia.install=t=>{t.install(ia.name,ia)};var va=ia,ma=function(){var t=this,e=t._self._c;return e("div")},_a=[];class ba{constructor(){Zs(this,"map",{type:Object,default:()=>null}),Zs(this,"gpsType",{type:Number,default:0})}}class wa extends ba{constructor(...t){super(...t),Zs(this,"model",{type:Object,default:()=>null}),Zs(this,"isShow",{type:Boolean,default:!0}),Zs(this,"clear",{type:Boolean,default:!1}),Zs(this,"isCheckPointHide",{type:Boolean,default:!1}),Zs(this,"polygonColor",{type:Array,default:()=>[]}),Zs(this,"text",{type:String,default:null}),Zs(this,"isFit",{type:Boolean,default:!0})}}var Ca={name:"RyPolygon",props:{...new wa},data(){return{polygon:null,checkPoint:null,bbox:[],bboxGCJ02:[],lastType:-1}},watch:{isShow(t){this.polygon&&(t?this.show():this.hide())},clear(t){t&&this.remove()},model(t){this.remove(),this.model=t,this.init()},isCheckPointHide(t){t?this.hideCheckPoint():this.showCheckPoint()},polygonColor(t){t.length&&this.setPolygonColor(t)},isFit(t){this.isFit=t,t&&this.setFit()},gpsType(t){this.lastType!=t&&(this.gpsType=t,this.lastType=t,this.selectGPSAll(this.gpsType))}},created(){this.init()},methods:{initPolygonText(t,e){const{text:n,center:i,isShow:o}=e;t.setShowText(o),t.setText(n),t.setCenter(i)},init(){if(this.lastType=this.gpsType,!this.model||!this.model.geo&&!this.model.coordinates)return;let t=[];if(this.model.geo){const{coordinates:e,center:n,bbox:i}=this._serializeGeoJson();this.model.coordinates=e,this.bbox=i,this.bboxGCJ02=this.convertBBoxGCJ02(i),t=n}else this.bbox=Object(Ns["getLngAndLatMaxMin"])(this.model.coordinates),this.bboxGCJ02=this.convertBBoxGCJ02(this.bbox);this.polygon=new Ns["LPolygonNew"]({...this.model,type:this.gpsType},this.map),this.isFit&&this.setFit(1==this.gpsType?this.bboxGCJ02:this.bbox),this.isCheckPointHide?this.initPolygonText(this.polygon,{text:this.model.text,center:t,isShow:!1}):this.initPolygonText(this.polygon,{text:this.model.text,center:t,isShow:!0}),this.polygon.isShowPolygon=!0,this.isShow?this.show():this.hide(),this.clear&&this.remove(),this.$emit("onLoad",{polygon:this.polygon,checkPoint:this.checkPoint})},setFit(t){if(!t.length||!this.map)return;const e=[t[0],t[3],t[2],t[1]],n=[t[2],t[1],t[0],t[3]];Object(Ns["fitNew"])(this.map,[e,n])},_serializeGeoJson(){let t=null;if(this.model.geo instanceof Object)t=this.model.geo;else{if("string"!==typeof this.model.geo)return t;t=JSON.parse(this.model.geo)}const{bbox:e,geometry:n,properties:i}=t;let o=[];return i&&i.center&&(o=i.center),{bbox:e,coordinates:n.coordinates,center:o.length?o:Object(Ns["getCenterPoint"])(n.coordinates)}},convertBBoxGCJ02(t){const e=[],{lat:n,lon:i}=Ns["GPS"].gcj_encrypt(t[0],t[1]),{lon:o,lat:r}=Ns["GPS"].gcj_encrypt(t[2],t[3]);return e.push(i),e.push(n),e.push(o),e.push(r),e},getBBOX(){if(!this.model.geo)return Object(Ns["getLngAndLatMaxMin"])(this.model.coordinates)},createCheckPoint(t,e){const n=new Ns["CheckPoint"](t,12,"#fff");return n.setOffset([0,-5]),n.setPosition(e,this.gpsType),this.map.addOverlay(n.getMarker()),n},show(){this.polygon.show()},hide(){this.polygon.hide()},remove(){this.polygon&&(this.polygon.removePolygon(),this.polygon=null),this.bbox=[],this.bboxGCJ02=[]},setPolygonColor(t){if(this.polygon){this.polygon.setPolygonColor(t);const e=this.map.getView().getZoom();this.map.getView().setZoom(e+1e-5),this.map.getView().setZoom(e-1e-4)}},getId(){return this.polygon._id},showCheckPoint(){this.polygon&&this.polygon.setTextVisible(!0)},hideCheckPoint(){this.polygon&&this.polygon.setTextVisible(!1)},setText(t){this.polygon.setText(t)},selectGPSAll(t){this.polygon&&this.polygon.selectGPS(t)}}},xa=Ca,Ea=$s(xa,ma,_a,!1,null,null,null),Ma=Ea.exports;Ma.install=t=>{t.install(Ma.name,Ma)};var Pa=Ma,Ta=function(){var t=this,e=t._self._c;return e("div")},Aa=[];class Sa extends ba{constructor(...t){super(...t),Zs(this,"modelArr",{type:Array,default:()=>[]}),Zs(this,"insert",{type:Object,default:()=>null}),Zs(this,"inserts",{type:Array,default:()=>[]}),Zs(this,"isShowAll",{type:Boolean,default:!0}),Zs(this,"isShowPolygon",{type:Object,default:()=>null}),Zs(this,"isShowPolygons",{type:Array,default:()=>[]}),Zs(this,"clear",{type:Boolean,default:!1}),Zs(this,"isCheckPointHideAll",{type:Boolean,default:!1}),Zs(this,"isCheckPointHide",{type:Object,default:()=>null}),Zs(this,"isCheckPointHides",{type:Array,default:()=>[]}),Zs(this,"polygonColor",{type:Object,default:()=>null}),Zs(this,"polygonColors",{type:Array,default:()=>[]}),Zs(this,"text",{type:Object,default:()=>null}),Zs(this,"isFit",{type:Boolean,default:!0}),Zs(this,"remove",{type:[String,Number,Object],default:()=>null}),Zs(this,"removes",{type:Array,default:()=>[]}),Zs(this,"ranges",{type:Array,default:()=>[]}),Zs(this,"range",{type:[String,Number,Object],default:()=>null}),Zs(this,"restFit",{type:Boolean,default:!1})}}var Oa={name:"RyPolygons",props:{...new Sa},data(){return{bbox:[],bboxMap:new Map,bboxGCJ02:[],bboxMapGCJ02:new Map,polygonMap:new Map,checkPointMap:new Map,isCreate:!0,lastType:-1}},watch:{modelArr(t){this._remove(),t.length&&(this.modelArr=t,this.init())},isShowAll(t){t?this.showAll():this.hideAll()},isShowPolygon(t){this.isShowPolygon=t,t&&this._isShowPolygon(t)},isShowPolygons(t){this.isShowPolygons=t,(t||t.length)&&this._isShowPolygons(t)},clear(t){t&&this._remove()},isCheckPointHideAll(t){t?this.hideCheckPointAll():this.showCheckPointAll()},isCheckPointHide(t){this.isCheckPointHide=t,t&&this._isCheckPointHide(t)},isCheckPointHides(t){this.isCheckPointHides=t,(t||t.length)&&this._isCheckPointHides(t)},polygonColor(t){t&&this.setPolygonColor(t.id,t.colorArr)},polygonColors(t){t&&this.setPolygonColors(t)},isFit(t){this.isFit=t,t&&this.setFit()},remove(t){this.remove=t,this.removePolygonAndCheckPoint(t)},removes(t){this.removes=t,this.removePolygonsAndCheckPoints(t)},ranges(t){this.ranges=t,this._ranges(t)},range(t){this.range=t,this._range(t)},insert(t){this.insert=t,this._insert(t)},inserts(t){this.inserts=t,this._inserts(t)},restFit(t){this.restFit=t},text(t){t&&t.id&&t.text&&this.setText(t.id,t.text)},gpsType(t){this.lastType!=t&&(this.gpsType=t,this.lastType=t,this.selectGPSAll(this.gpsType))}},created(){this.init()},methods:{init(){(this.modelArr||this.modelArr.length)&&(this.modelArr.forEach(t=>{this._insert(t)}),this.polygonColor&&this.setPolygonColor(this.polygonColor),this.setPolygonColors(this.polygonColors),this.removePolygonAndCheckPoint(this.remove),this.removePolygonsAndCheckPoints(this.removes),this._ranges(this.ranges),this._range(this.range),this._insert(this.insert),this._inserts(this.inserts),this.isFit&&this.setFit(),this.isShowAll||this.hideAll(),this.isCheckPointHideAll&&this.hideCheckPointAll(),this.isShowPolygon&&this._isShowPolygon(this.isShowPolygon),this._isShowPolygons(this.isShowPolygons),this.isCheckPointHide&&this._isCheckPointHide(this.isCheckPointHide),this._isCheckPointHides(this.isCheckPointHides),this._onLoad())},initPolygon(t,e){if(!this.polygonMap.has(t.id)){const n=new Ns["LPolygonNew"]({...t,type:this.gpsType},this.map);n.isShowPolygon=!0,this.polygonMap.set(t.id,n);const i=t.text;this.isCheckPointHideAll?this.isCheckPointHideAll||void 0===t.isShowText||null===t.isShowText||NaN===t.isShowText?this.initPolygonText(n,{text:i,center:e,isShow:!1}):this.initPolygonText(n,{text:i,center:e,isShow:t.isShowText}):this.initPolygonText(n,{text:i,center:e,isShow:!0})}},initPolygonText(t,e){const{text:n,center:i,isShow:o}=e;t.setShowText(o),t.setText(n),t.setCenter(i)},selectGPSAll(t){this.polygonMap.forEach(e=>{e.selectGPS(t)})},setBBOXArr(t,e){if(this.bboxMap.has(t)||(this.bbox.push(e),this.bboxMap.set(t,e)),!this.bboxMapGCJ02.has(t)){const n=this.convertBBoxGCJ02(e);this.bboxGCJ02.push(n),this.bboxMapGCJ02.set(t,n)}},setFit(){this.bbox.length&&this.map&&(this.bbox.length>1?Object(Ns["fitNew"])(this.map,1==this.gpsType?this.bboxGCJ02:this.bbox):this.setFitFist(1==this.gpsType?this.bboxGCJ02[0]:this.bbox[0]))},setFitFist(t){const e=[t[0],t[3],t[2],t[1]],n=[t[2],t[1],t[0],t[3]];Object(Ns["fitNew"])(this.map,[e,n])},_serializeGeoJson(t){let e=null;try{t instanceof Object?e=t:"string"===typeof t&&(e=JSON.parse(t))}catch(s){return null}const{bbox:n,geometry:i,properties:o}=e;let r=[];return o&&o.center&&(r=o.center),{bbox:n,coordinates:i.coordinates,center:r.length?r:Object(Ns["getCenterPoint"])(i.coordinates)}},getBBOX(){if(!this.model.geo)return Object(Ns["getLngAndLatMaxMin"])(this.model.coordinates)},showAll(){this.polygonMap.forEach(t=>t.show()),this.restFit&&this._restFit()},hideAll(){this.polygonMap.forEach(t=>t.hide())},_remove(){this.polygonMap.forEach(t=>{t.removePolygon(),t=null}),this.checkPointMap.clear(),this.polygonMap.clear(),this.bboxMap.clear(),this.bbox=[],this.bboxGCJ02=[],this.bboxMapGCJ02.clear()},setPolygonColor(t,e,n=!0){if(this.polygonMap.has(t)){const i=this.polygonMap.get(t);i.setPolygonColor(e),n&&this._setZoom()}},_setZoom(){const t=this.map.getView().getZoom();this.map.getView().setZoom(t+1e-5),this.map.getView().setZoom(t-1e-4)},setPolygonColors(t){t.forEach(t=>{this.setPolygonColor(t.id,t.colorArr,!1)}),t.length&&this._setZoom()},showCheckPointAll(){this.map&&this.polygonMap.forEach(t=>t.setTextVisible(!0))},_isShowPolygon(t){const e=t.id;if(this.polygonMap.has(e)){const n=this.polygonMap.get(e);if(t.isShow)return void n.show();n.hide()}},_isShowPolygons(t){t.forEach(t=>{this._isShowPolygon(t)}),this.restFit&&this._restFit()},hideCheckPointAll(){this.polygonMap.forEach(t=>t.setTextVisible(!1))},_isCheckPointHide(t){const e=t.id;if(this.polygonMap.has(e)){this.polygonMap.get(e).setTextVisible(t.isShow)}},_isCheckPointHides(t){t.forEach(t=>{this._isCheckPointHide(t)})},setText(t,e){if(this.polygonMap.has(t)){const n=this.polygonMap.get(t);n.setText(e)}},restBBOXArr(){this.bbox=[],this.bboxGCJ02=[],this.bboxMap.forEach(t=>{this.bbox.push(t)}),this.bboxMapGCJ02.forEach(t=>{this.bboxGCJ02.push(t)})},removePolygonsAndCheckPoints(t){t.forEach((t,e)=>{this.removePolygonAndCheckPoint(t)}),t.length&&this.restBBOXArr()},removePolygonAndCheckPoint(t,e=!0){if(this.checkPointMap.has(t)){const n=this.checkPointMap.get(t);this.map.removeOverlay(n.getMarker()),this.checkPointMap.delete(t),e&&this.restBBOXArr()}if(this.polygonMap.has(t)){const e=this.polygonMap.get(t);e.removePolygon(),this.polygonMap.delete(t)}this.bboxMap.has(t)&&this.bboxMap.delete(t),this.bboxMapGCJ02.has(t)&&this.bboxMapGCJ02.delete(t)},_ranges(t){const e=[];t.forEach(t=>{if(this.bboxMap.has(t)&&1!=this.gpsType){const n=this.bboxMap.get(t);e.push(n)}else if(this.bboxMapGCJ02.has(t)&&1==this.gpsType){const n=this.bboxMapGCJ02.get(t);e.push(n)}}),e.length&&Object(Ns["fitNew"])(this.map,e)},_range(t){if(this.bboxMap.has(t)&&1!=this.gpsType){const e=this.bboxMap.get(t);Object(Ns["fitNew"])(this.map,[e])}else if(this.bboxMapGCJ02.has(t)&&1==this.gpsType){const e=this.bboxMapGCJ02.get(t);Object(Ns["fitNew"])(this.map,[e])}},_insert(t,e){if(!t)return;let n=[],i=[];if(!t.coordinates){const{coordinates:e,center:i,bbox:o}=this._serializeGeoJson(t.geo);t.coordinates=e,n=i}this.initPolygon(t,n),this.setBBOXArr(t.id,i.length?i:Object(Ns["getLngAndLatMaxMin"])(t.coordinates)),e&&this._onLoad()},_inserts(t){this.lastType=this.gpsType,t.forEach(t=>{this._insert(t,!1)}),t.length&&this._onLoad()},_onLoad(){this.$emit("onLoad",{polygonMap:this.polygonMap,checkPointMap:this.checkPointMap,bboxMap:this.bboxMap,bboxMapGCJ02:this.bboxMapGCJ02})},_restFit(){let t=[];1!=this.gpsType?this.bboxMap.forEach((e,n)=>{-1===this.isShowPolygons.findIndex(t=>t.id==n)&&t.push(this.bboxMap.get(n))}):1==this.gpsType&&this.bboxMapGCJ02.forEach((e,n)=>{-1===this.isShowPolygons.findIndex(t=>t.id==n)&&t.push(this.bboxMapGCJ02.get(n))}),t.length&&(t.length>1?Object(Ns["fitNew"])(this.map,t):this.setFitFist(t[0]))},convertBBoxGCJ02(t){const e=[],{lat:n,lon:i}=Ns["GPS"].gcj_encrypt(t[0],t[1]),{lon:o,lat:r}=Ns["GPS"].gcj_encrypt(t[2],t[3]);return e.push(i),e.push(n),e.push(o),e.push(r),e}}},Ra=Oa,La=$s(Ra,Ta,Aa,!1,null,null,null),Ia=La.exports;Ia.install=t=>{t.install(Ia.name,Ia)};var ka=Ia,ja=function(){var t=this,e=t._self._c;return e("div")},Na=[];n("fffc");const Da={fillColor:"rgba(184, 233, 134, 0.56)",stroke:"rgba(23, 168, 162, 0.56)",width:3,text:"块"};var Ga={name:"RyClusters",props:{modelArr:{type:Array,default:()=>[]},clusterPolygonModel:{type:Object,default:()=>Da},map:{type:Object,default:()=>null},gpsType:{type:Number,default:0},color:{type:String,default:"#fff"},fontSize:{type:Number,default:14},offsetX:{type:Number,default:0},offsetY:{type:Number,default:0},distance:{type:Number,default:30}},data(){return{checkPointArr:new Map,currentArr:Array(),fpModelArr:[],featurePolygon:null,multiPolygonMap:new Map,scan:new Ns["GrahamScan"],polygonSet:new Set}},beforeDestroy(){this.clear()},watch:{modelArr(t){this.map&&(this.clear(),this.init())},gpsType(t){this.gpsType=t,this.selectGPSAll(t)}},created(){this.featurePolygon=new Ns["FeaturePolygon"](this.gpsType),this.clear(),this.init()},methods:{mergeGeoJson(t){let e=[],n=new Set;t.forEach(t=>{if(t){const i=t.getId();if(this.multiPolygonMap.has(i)){const t=this.multiPolygonMap.get(i);n.add(i),t.forEach(t=>{e.push(t)})}}}),this.scan.setPoints(e),this.scan.getHull(),n.forEach(t=>{this.removeAggregation(t)});const i={...this.clusterPolygonModel,coordinates:[this.scan.getHull()],ids:n};this.polygonSet.add(new Ns["LPolygonNew"]({...i,gpsType:this.gpsType},this.map))},removeAggregation(t){let e=[];0!==this.polygonSet.size&&(this.polygonSet.forEach(n=>{n.Ids.has(t)&&(n.removePolygon(),e.push(n))}),e.forEach(t=>{this.polygonSet.has(t)&&this.polygonSet.delete(t)}))},removePolygonNew(){this.lPolygonNewArr.forEach(t=>{t.removePolygon(),t=null}),this.lPolygonNewArr.length=0},clear(){},createFeaturePolygonModel(t,e){return new Ns["FeaturePolygonModel"](e,t)},async init(){this.initPolygon(),this.initCluster()},_serializeGeoJson(t){let e=null;try{t instanceof Object?e=t:"string"===typeof t&&(e=JSON.parse(t))}catch(s){return null}const{bbox:n,geometry:i,properties:o}=e;let r=[];return o&&o.center&&(r=o.center),{bbox:n,coordinates:i.coordinates,center:r.length?r:Object(Ns["getCenterPoint"])(i.coordinates)}},initPolygon(){this.modelArr.forEach(t=>{t.geo;const{coordinates:e,center:n,bbox:i}=this._serializeGeoJson(t.geo),o=this.createFeaturePolygonModel(t.id,n);this.fpModelArr.push(o)})},initCluster(){const t=new Ns["LCluster"]((t,e,n)=>{const i=t.getId();if(n)return this.$emit("callback",{id:i,isShow:!0}),void(this.multiPolygonMap.has(i)&&this.multiPolygonMap.delete(i));if(!this.multiPolygonMap.has(i)){var o;const t=null===(o=this.modelArr.find(t=>t.id==i))||void 0===o?void 0:o.geo;if(t){const{coordinates:e}=this._serializeGeoJson(t);this.multiPolygonMap.set(i,e[0])}}this.$emit("callback",{id:i,isShow:!1})},{text:this.clusterPolygonModel.text,offsetX:this.offsetX,offsetY:this.offsetY,fontSize:this.fontSize,color:this.fontColor,aggregationCallback:t=>{this.mergeGeoJson(t)},removeAggregationCallback:t=>{const e=t.getId();e&&this.removeAggregation(e)}}),e=this.featurePolygon.getVectorSource(this.fpModelArr),n=t.getVectorLayer(e,this.distance);this.map.addLayer(n)},selectGPSAll(t){this.polygonSet.forEach(e=>{e.selectGPS(t)}),this.featurePolygon&&this.featurePolygon.selectGPSAll(t)}}},Fa=Ga,Ba=$s(Fa,ja,Na,!1,null,"148ba5e7",null),Za=Ba.exports;Za.install=t=>{t.install(Za.name,Za)};var Va=Za,za=function(){var t=this,e=t._self._c;return e("div")},Ha=[];var Ka={name:"RyClustersMarker",props:{modelArr:{type:Array,default:()=>[]},text:{type:String,default:()=>"台"},map:{type:Object,default:()=>null},gpsType:{type:Number,default:0},distance:{type:Number,default:200},fontColor:{type:String,default:"#fff"},src:{type:String,default:()=>null},fontSize:{type:Number,default:14},offsetX:{type:Number,default:0},offsetY:{type:Number,default:0}},data(){return{fpModelArr:[],featurePolygon:new Ns["FeaturePolygon"](this.gpsType),scan:new Ns["GrahamScan"],polygonSet:new Set}},beforeDestroy(){this.clear()},watch:{modelArr(t){this.map&&(this.clear(),this.init())},gpsType(t){this.gpsType=t,this.selectGPSAll(t)}},created(){this.clear(),this.init()},methods:{clear(){},createFeaturePolygonModel(t,e){return new Ns["FeaturePolygonModel"](e,t)},async init(){this.initFeature(),this.initCluster()},initFeature(){this.modelArr.forEach(t=>{const e=this.createFeaturePolygonModel(t.id,[t.x,t.y]);this.fpModelArr.push(e)})},initCluster(){const t=new Ns["LClusterMarker"]((t,e,n)=>{const i=t.getId();n?this.$emit("callback",{id:i,isShow:!0}):this.$emit("callback",{id:i,isShow:!1})},{text:this.text,offsetX:this.offsetX,offsetY:this.offsetY,fontSize:this.fontSize,color:this.fontColor,src:this.src,aggregationCallback:t=>{},removeAggregationCallback:t=>{}}),e=this.featurePolygon.getVectorSource(this.fpModelArr),n=t.getVectorLayer(e,this.distance);this.map.addLayer(n)},selectGPSAll(t){this.featurePolygon&&this.featurePolygon.selectGPSAll(t)}}},Xa=Ka,Ua=$s(Xa,za,Ha,!1,null,"64b08b64",null),Ja=Ua.exports;Ja.install=t=>{t.install(Ja.name,Ja)};var Wa=Ja,Ya=function(){var t=this,e=t._self._c;return e("div")},$a=[];class qa extends ba{constructor(...t){super(...t),Zs(this,"model",{type:Object,default:()=>null}),Zs(this,"isShow",{type:Boolean,default:!0}),Zs(this,"clear",{type:Boolean,default:!1}),Zs(this,"isFit",{type:Boolean,default:!0}),Zs(this,"isStandardGeo",{type:Boolean,default:!1})}}var Qa={name:"RyPolygonGeo",props:{...new qa},data(){return{polygon:null,bbox:[],bboxGCJ02:[],lastType:-1}},watch:{isShow(t){this.polygon&&(t?this.show():this.hide())},clear(t){t&&this.remove()},model(t){this.remove(),this.isStandardGeo?this.initNew():this.init()},isFit(t){this.isFit=t,t&&this.setFit()},gpsType(t){this.lastType!=t&&(this.gpsType=t,this.lastType=t,this.selectGPSAll(this.gpsType))}},created(){this.isStandardGeo?this.initNew():this.init()},methods:{init(){if(this.lastType=this.gpsType,!this.model||!this.model.geo)return;let t=[];if(this.model.geo){const{coordinates:e,center:n,bbox:i}=this._serializeGeoJson();this.bbox=i,this.bboxGCJ02=this.convertBBoxGCJ02(i),t=n}else this.bbox=Object(Ns["getLngAndLatMaxMin"])(this.model.coordinates),this.bboxGCJ02=this.convertBBoxGCJ02(this.bbox);this.polygon=Object(Ns["createPolygonBoundary"])(this.model.geo,this.model),this.map.addLayer(this.polygon),this.isFit&&this.setFit(1==this.gpsType?this.bboxGCJ02:this.bbox),this.polygon.isShowPolygon=!0,this.isShow?this.show():this.hide(),this.clear&&this.remove(),this.$emit("onLoad",{polygon:this.polygon})},initNew(){if(this.lastType=this.gpsType,this.model&&this.model.geo){if(this.model.geo){const{bbox:t}=this.model.geo;this.bbox=t,this.bboxGCJ02=this.convertBBoxGCJ02(t)}this.polygon=Object(Ns["createPolygonBoundary"])(this.model.geo,this.model),this.map.addLayer(this.polygon),this.isFit&&this.setFit(1==this.gpsType?this.bboxGCJ02:this.bbox),this.polygon.isShowPolygon=!0,this.isShow?this.show():this.hide(),this.clear&&this.remove(),this.$emit("onLoad",{polygon:this.polygon})}},setFit(t){if(!t.length||!this.map)return;const e=[t[0],t[3],t[2],t[1]],n=[t[2],t[1],t[0],t[3]];Object(Ns["fitNew"])(this.map,[e,n])},_serializeGeoJson(){let t=null;if(this.model.geo instanceof Object)t=this.model.geo;else{if("string"!==typeof this.model.geo)return t;t=JSON.parse(this.model.geo)}const{bbox:e,geometry:n,properties:i}=t;let o=[];return i&&i.center&&(o=i.center),{bbox:e,coordinates:n.coordinates,center:o.length?o:Object(Ns["getCenterPoint"])(n.coordinates)}},convertBBoxGCJ02(t){const e=[],{lat:n,lon:i}=Ns["GPS"].gcj_encrypt(t[0],t[1]),{lon:o,lat:r}=Ns["GPS"].gcj_encrypt(t[2],t[3]);return e.push(i),e.push(n),e.push(o),e.push(r),e},getBBOX(){if(!this.model.geo)return Object(Ns["getLngAndLatMaxMin"])(this.model.coordinates)},show(){},hide(){},selectGPSAll(t){},remove(){this.map&&this.polygon&&(this.map.removeLayer(this.polygon),this.polygon=null)},getId(){return this.id}}},tl=Qa,el=$s(tl,Ya,$a,!1,null,null,null),nl=el.exports;nl.install=t=>{t.install(nl.name,nl)};var il=nl,ol=function(){var t=this,e=t._self._c;return e("div",{directives:[{name:"lmap",rawName:"v-lmap:loadMap",arg:"loadMap"}],staticClass:"vector-map"},[t._t("polygon",null,{mapDto:{map:t.map,lMap:t.lMap}})],2)},rl=[],sl={name:"RyVectorMap",props:{isAnalysisBBOX:{type:Boolean,default:!0},isAnalysisCenter:{type:Boolean,default:!0},modelArr:{type:Array,default:()=>[]},delayTime:{type:Number,default:()=>50},bindMapClick:{type:Boolean,default:!1},isDrag:{type:Boolean,default:!0}},data(){return{lMap:new Ds,drawPolygon:null,mapClick:null,map:null,vmap:null,lastX:0,lastY:0,moveend:null,polygonMap:null}},watch:{modelArr(t){this.initLayers(t)},bindMapClick(t){this.bindMapClick!==t&&(this.bindMapClick=t,this._bingMapEvent())},polygonColor(t){t&&this.setPolygonColor(t.id,t.colorArr)}},mounted(){},methods:{async loadMap(t){const{map:e,vmap:n}=await this.lMap.initVectorMap({el:t,isAnalysisBBOX:this.isAnalysisBBOX,isAnalysisCenter:this.isAnalysisCenter,delayTime:this.delayTime,isDrag:this.isDrag,callback:t=>this.$emit("initLayersEvent",t)});this.map=e,this.vmap=n,this.polygonMap=n.getLayerMap,this._bingMapEvent(),this.$emit("load",{map:e,vmap:n}),this.modelArr.length&&this.initLayers(val)},initLayers(t){this.vmap&&this.vmap.initLayers(t)},_mapClickOnce(t=!1){this.mapClick||(this.mapClick=t=>{if(t.dragging)return;const e=this.map.getEventPixel(t.originalEvent),n=this.map.hasFeatureAtPixel(e);if(n){const e=this.map.forEachFeatureAtPixel(t.pixel,t=>t),n=e.getProperties(),i=this.map.getView(),[o,r]=i.getCenter(),s=e.getId();n&&this.$emit("mapClick",{...n,id:s||null,currentX:o,currentY:r})}}),t?(this.map.un("click",this.mapClick),this.mapClick=null):this.map.on("click",this.mapClick)},_bingMapEvent(){this.bindMapClick?this._mapClickOnce():this._mapClickOnce(!0)},setPolygonColor(t,e,n=!0){if(this.polygonMap.has(t)){const i=this.polygonMap.get(t);i.setPolygonColor(e),n&&this._setZoom()}},_setZoom(){const t=this.map.getView().getZoom();this.map.getView().setZoom(t+1e-5),this.map.getView().setZoom(t-1e-4)}}},al=sl,ll=(n("4ea7"),$s(al,ol,rl,!1,null,"007eb38f",null)),hl=ll.exports;hl.install=t=>{t.install(hl.name,hl)};var cl=hl,ul=function(){var t=this,e=t._self._c;return e("div",[t.isShowPlayback?e("div",{staticClass:"el-slider-box"},[e("el-row",{attrs:{type:"flex",justify:"center"}},[e("el-col",{attrs:{span:1}},[t.index&&t.isStop?e("button",{staticClass:"button-stop",on:{click:function(e){return e.stopPropagation(),t.onStopTrajectory()}}}):e("button",{staticClass:"button-paly",on:{click:function(e){return e.stopPropagation(),t.onPlayTrajectory()}}})]),e("el-col",{staticStyle:{"margin-left":"30px"},attrs:{xs:13,sm:19,md:19,lg:19,xl:23}},[e("el-slider",{attrs:{marks:t.marks,"show-tooltip":"",step:1,min:0,max:t.cacheArr.length-1,"format-tooltip":t.formatTooltip},on:{change:t.sliderChange},model:{value:t.index,callback:function(e){t.index=e},expression:"index"}})],1)],1),e("el-row",{attrs:{type:"flex",justify:"end"}},[e("el-col",[e("section",{staticClass:"control-panel"},[e("span",[t._v("播放倍速:")]),e("span",{class:{active:t.selectActive[0]},on:{click:function(e){return e.stopPropagation(),t.onPlaySpeed(0,200)}}},[t._v("0.5x")]),e("span",{class:{active:t.selectActive[1]},on:{click:function(e){return e.stopPropagation(),t.onPlaySpeed(1,100)}}},[t._v("正常")]),e("span",{class:{active:t.selectActive[2]},on:{click:function(e){return e.stopPropagation(),t.onPlaySpeed(2,50)}}},[t._v("1.5x")]),e("span",{class:{active:t.selectActive[3]},on:{click:function(e){return e.stopPropagation(),t.onPlaySpeed(3,5)}}},[t._v("2.0x")])])])],1)],1):t._e()])},pl=[];const dl={color:"red",width:2,zIndex:1};class fl extends ba{constructor(...t){super(...t),Zs(this,"model",{type:Object,default:()=>null}),Zs(this,"linenIsert",{type:Object,default:()=>null}),Zs(this,"isLineFit",{type:Boolean,default:!0}),Zs(this,"isShowPlayback",{type:Boolean,default:!1}),Zs(this,"lineAppend",{type:Array,default:()=>[]}),Zs(this,"startMarkerDto",{type:Object,default:()=>null}),Zs(this,"endMarkerDto",{type:Object,default:()=>null}),Zs(this,"moveMarkerDto",{type:Object,default:()=>null}),Zs(this,"clearLiens",{type:Boolean,default:!1}),Zs(this,"endMarkerPoint",{type:Array,default:()=>[]}),Zs(this,"lineDto",{type:Object,default:()=>dl}),Zs(this,"isShowAll",{type:Boolean,default:!0}),Zs(this,"isConneLine",{type:Boolean,default:!0}),Zs(this,"isPlaybackTrackPoints",{type:Boolean,default:!1}),Zs(this,"playbackSpeed",{type:Number,default:10}),Zs(this,"pepeatPlayback",{type:Boolean,default:!1})}}var yl={name:"RyLines",props:{...new fl},data(){return{lines:null,checkPoint:null,bbox:[],bboxGCJ02:[],lastType:-1,lastLinesDto:null,moveMarker:null,endMarker:null,startMarker:null,pineArr:[],lastLineX:0,lastLineY:0,lastLineX2:0,lastLineY2:0,cacheArr:new Array,cacheModelArr:new Map,cacheColors:new Map,cacheLenArr:new Array,cacheLines:new Array,cacheLineMaps:new Map,cacheScales:new Array,isFist:!0,lastColor:null,len:0,am:new Ns["AM"],index:0,intervalId:null,selectActive:[!1,!0,!1,!1],marks:{},marks2:{},isPlayback:!1,isStop:!1,playSpeed:100}},watch:{model(t){this.init(),t&&this.insertCache(t.pointArr)},linenIsert(t){this.map&&t&&(this.insertCache(t),this._insertLineAndMarker(t))},gpsType(t){this.selectGPSAll(t)},clearLiens(t){t&&this.clearLine()},lineAppend(t){t.length>0&&this.map&&(this.appendCoordinate(t),this.setMarkerPoint(this.endMarker,t))},isShowPlayback(t){if(!t)return this.endPlaybackLines(),this.index=0,void this.resetPyalPanel();delete this.marks2[this.len],this.marks=this.marks2},isShowAll(t){if(!t)return this.hideAll(),void this.hideMarker();this.showAll(),this.showMarker()},isPlaybackTrackPoints(t){t&&this.playbackTrackNew()}},created(){this.init()},methods:{init(){this.map&&(this.clearLine(),(this.model||this.linenIsert)&&(this.lastType=this.gpsType,this.model&&(this.insertCache(this.model),this._insertLineAndMarker(this.model),this.isPlaybackTrackPoints&&this.playbackTrackNew()),this.linenIsert&&(this.insertCache(this.linenIsert),this._insertLineAndMarker(this.linenIsert))))},insertCache(t){if(t){const{playbackColor:e,pointArr:n}=t;if(!n)return;const i=n.length;if(!n.length)return;this.len+=i,this.cacheArr.push(...t.pointArr),this.cacheColors.set(this.len,e),this.cacheLenArr.push(i),this.marks2[this.len]="",this.cacheScales.push(this.len),this.cacheModelArr.set(this.len,t)}},_insertLineAndMarker(t){const e=t.pointArr;if(this.isLineFit&&this.calculateLineBBOX(e),this.initMarker(e[0]),!t.isAppend){this._insertPoint(t,[this.lastLineX,this.lastLineY]);const n=this.createPolyline(t),i=e.length-1;this.setMarkerPoint(this.endMarker,e[i]);const{x:o,y:r}=this.restLastData(e);return this.lastLineX=o,this.lastLineY=r,void this.pineArr.push(n)}e.forEach(t=>{this.appendCoordinate(t)});const n=e.length-1;this.setMarkerPoint(this.endMarker,e[n]),this.restLastData(e)},_insertLineAndMarker2(t){this._insertPoint(t,[this.lastLineX2,this.lastLineY2]);const e=t.pointArr,n=this.createPolyline(t),{x:i,y:o}=this.restLastData(e);this.lastLineX2=i,this.lastLineY2=o,this.cacheLines.push(n)},async calculateLineBBOX(t){return await new Promise(e=>{t.forEach(t=>{this.am.getLngAndLatMaxMin({X:t[0],Y:t[1]})});let n=[];n=this.gpsType?this.am.getLngLatGCJ02():this.am.getLngLats(),Object(Ns["fitNew"])(this.map,[[n[0],n[1]],[n[2],n[3]]]),e()})},initMarker(t){(this.startMarkerDto||this.endMarkerDto)&&(this.startMarker||this.endMarker||(this.startMarker=this.createStartMarker(this.startMarkerDto,t),this.endMarker=this.createStartMarker(this.endMarkerDto)))},setMarkerPoint(t,e){t&&e.length>1&&t.setPosition(e,this.gpsType)},restLastData(t){if(t.length>0){const[e,n]=t[t.length-1];return{x:e,y:n}}},_insertPoint(t,e){if(!this.isConneLine)return;const[n,i]=e;n>0&&i>0&&t&&t.pointArr.unshift(e)},createPolyline(t={color:"rgb(0,0,255)",width:2,pointArr:[],zIndex:1}){return new Ns["Polyline"]({...t,type:this.gpsType},this.map)},createStartMarker({offset:t,url:e,width:n,height:i},o=[]){const r=new Ns["LMarker"](e,n,i);return r.setOffset(t),o.length&&r.setPosition(o,this.gpsType),this.map.addOverlay(r.getMarker()),r},getLngLatGCJ02(t){const e=[];return t.forEach(t=>{const{lon:n,lat:i}=Ns["GPS"].gcj_encrypt(t[0],t[1]);e.push([n,i])}),e},removeLines(){this.pineArr.forEach(t=>{t.removePolyline()}),this.pineArr=[]},showAll(){this.pineArr.forEach(t=>{t.show()})},hideAll(){this.pineArr.forEach(t=>{t.hide()})},showMarker(){this.endMarker&&this.endMarker.show(),this.startMarker&&this.startMarker.show(),this.moveMarker&&this.moveMarker.show()},hideMarker(){this.endMarker&&this.endMarker.hide(),this.startMarker&&this.startMarker.hide(),this.moveMarker&&this.moveMarker.hide()},removeLineMarker(){this.map&&(this.endMarker&&this.map.removeOverlay(this.endMarker.getMarker()),this.startMarker&&this.map.removeOverlay(this.startMarker.getMarker()),this.moveMarker&&this.map.removeOverlay(this.moveMarker.getMarker()),this.moveMarker=null,this.endMarker=null,this.startMarker=null)},clearLine(){this.resetPyalPanel(),this.removeLines(),this.removeLineMarker(),this.cacheArr=[],this.lastColor=null,this.lastLineX=0,this.lastLineY=0,this.am=null,this.am=new Ns["AM"],this.marks={},this.marks2={},this._clearInterval(),this.clearCacheLines()},_clearInterval(){this.intervalId&&clearInterval(this.intervalId)},clearCacheLines(){this.endPlaybackLines(),this.cacheLenArr=[],this.cacheArr=[],this.cacheColors.clear(),this.cacheModelArr.clear(),this.len=0,this.cacheScales=[],this.index=0},endPlaybackLines(){this._clearInterval(),this.cacheLines.forEach(t=>{t.removePolyline()}),this.moveMarker&&this.map.removeOverlay(this.moveMarker.getMarker()),this.isPlayback=!1,this.isStop=!1,this.cacheLines=[],this.cacheLineMaps.clear(),this.moveMarker=null,this.lastLineX2=0,this.lastLineY2=0},stopPlaybackLines(t){this.isPlayback=!1,this.isStop=!1,t?this._clearInterval():this.trackPlayback()},createTrackLineAndMarker(t=0,e=0){const n=t,{playbackColor:i,width:o,zIndex:r}=this.cacheModelArr.get(n),s=this.createPolyline({color:i,isAppend:!1,width:o,pointArr:[],zIndex:r},this.gpsType);this.lastColor=i,this.cacheLines.push(s),this.moveMarkerDto&&!this.moveMarker&&(this.moveMarker=this.createStartMarker(this.moveMarkerDto,this.cacheArr[e]))},trackPlayback(){this.cacheLines.length||this.createTrackLineAndMarker(this.cacheScales[0],0),this.intervalId=setInterval(t=>{if(this.index>=this.len-1||!this.isPlayback){const t=this.cacheLines[this.cacheLines.length-1],e=this.cacheArr[this.index];return this.setMarkerPoint(this.moveMarker,e),t.appendCoordinate(e,this.gpsType),this.$emit("trackPlayEvent",{index:this.index,points:e}),this._clearInterval(),this.index=0,this.isStop=!1,void this.$emit("trackPlayEvent",{index:this.index,points:this.cacheArr[0]})}const e=this.getKey(this.index);if(this.cacheColors.has(e)&&!this.cacheLineMaps.has(e)&&!this.cacheLineMaps.has(e)){this.createTrackLineAndMarker(e,this.index);const t=this.cacheLines[this.cacheLines.length-1];this.cacheLineMaps.set(e,t);const n=this.index-1==-1?0:this.index-1;t.appendCoordinate(this.cacheArr[n],this.gpsType)}const n=this.cacheLines[this.cacheLines.length-1],i=this.cacheArr[this.index];this.setMarkerPoint(this.moveMarker,i),n.appendCoordinate(i,this.gpsType),this.$emit("trackPlayEvent",{index:this.index,points:i}),this.index+=1},this.playSpeed)},appendCoordinate(t=[]){if(!t.length)return;this.pineArr.length||this._insertLineAndMarker({...this.lineDto,pointArr:[t],isAppend:!1});const e=this.pineArr[this.pineArr.length-1];e.appendCoordinate(t,this.gpsType)},formatTooltip(t){return t/100},getKeys(t){const e=[];for(let n=0;n<this.cacheScales.length;n++){if(!(t>=this.cacheScales[n])){e.push(this.cacheScales[n]);break}e.push(this.cacheScales[n])}return e},getKey(t){for(let e=0;e<this.cacheScales.length;e++){const n=this.cacheScales[e];if(t<=n)return n}return 0},createLineModels(t,e,n){const i=[],o=[...e];if(t.length<=1){const e=t[0],{width:r,zIndex:s}=this.cacheModelArr.get(e);return i.push({isAppend:!1,color:this.cacheColors.get(e),width:r,zIndex:s,pointArr:o.splice(0,n+1)}),i}for(let r=0;r<t.length;r++){const e=t[r],{width:n,zIndex:s}=this.cacheModelArr.get(e),a=o.splice(0,this.cacheLenArr[r]);if(a.length){const t={color:this.cacheColors.get(e),width:n,zIndex:s,pointArr:a};i.push(t)}}return i},sliderChange(t){if(this.endPlaybackLines(),0===t)return void this.$emit("trackPlayEvent",{index:t,points:this.cacheArr[0]});const e=this.cacheArr.slice(0,t+1),n=this.createLineModels(this.getKeys(t),e,t);n.forEach(t=>this._insertLineAndMarker2(t,!1)),e.length&&this.$emit("trackPlayEvent",{index:t,points:e[e.length-1]}),this.moveMarkerDto&&!this.moveMarker&&e.length&&(this.moveMarker=this.createStartMarker(this.moveMarkerDto,e[e.length-1]))},onPlayTrajectory(){this.isStop||0==this.index&&this.endPlaybackLines(),this.isPlayback=!0,this.isStop=!0,this.trackPlayback()},onStopTrajectory(){this.isStop=!1,this._clearInterval()},onPlaySpeed(t,e){this.selectActive=this.selectActive.map(t=>!1),this.selectActive[t]=!0,this.playSpeed=e,this.isStop=!1,this._clearInterval()},resetPyalPanel(){this.selectActive=[!1,!0,!1,!1,!1],this.playSpeed=100},selectGPSAll(t){this.pineArr.forEach(e=>{e.selectGPS(t)}),this.endPlaybackLines(),this.index=0,this.startMarker&&this.startMarker.selectGPS(t),this.endMarker&&this.endMarker.selectGPS(t),this.moveMarker&&this.moveMarker.selectGPS(t)},playbackTrackNew(){this.cacheLines.length||this.createTrackLineAndMarker(this.cacheScales[0],0),this.intervalId=setInterval(t=>{if(this.index>=this.len-1||!this.isPlaybackTrackPoints){const t=this.cacheArr[this.index];if(this.setMarkerPoint(this.moveMarker,t),this.index=0,!this.pepeatPlayback||!this.isPlaybackTrackPoints)return this._clearInterval(),this.moveMarker.hide(),void this.playbackTrack("playbackTrackEndEvent")}const e=this.cacheArr[this.index];this.setMarkerPoint(this.moveMarker,e),this.moveMarker&&0==this.index&&this.moveMarker.show(),this.index+=1},this.playbackSpeed)}}},gl=yl,vl=(n("f08a"),$s(gl,ul,pl,!1,null,"684b189a",null)),ml=vl.exports;ml.install=t=>{t.install(ml.name,ml)};var _l=ml,bl=function(){var t=this,e=t._self._c;return e("div",{staticClass:"map-box"},[e("div",{directives:[{name:"lmap",rawName:"v-lmap:loadMap",arg:"loadMap"}],staticClass:"map-style"}),t.lMap.map&&t.isRyMapTool?e("RyMapTool",{staticClass:"ry-map-tool",class:{left:!t.isRight,right:t.isRight},attrs:{lMap:t.lMap,isShowRangingTool:t.isShowRangingTool,initModifyPolygon:t.initModifyPolygon,isShowDrawTool:t.isShowDrawTool,isRight:t.isRight,isCrossHair:t.isCrossHair,hideAdd:t.hideAdd,hidePoint:t.hidePoint,hideCancel:t.hideCancel,hideDelete:t.hideDelete,hideSave:t.hideSave,hideLine:t.hideLine,hideArea:t.hideArea,isSwitchMap:t.isSwitchMap,isSwitchMapRight:t.isSwitchMapRight,isHideAreaAndKM:t.isHideAreaAndKM},on:{crossHairClick:function(e){return t.crossHairClick(e)},loadDrawPolygonEvent:function(e){return t.loadDrawPolygonEvent(e)},success:function(e){return t.drawSuccess(e)},error:function(e){return t.drawError(e)}}},[[t._t("maptool")]],2):t._e(),t.map?[t._t("polygon",null,{mapDto:{map:t.map,lMap:t.lMap}}),t._t("marker",null,{mapDto:{map:t.map,lMap:t.lMap}})]:t._e()],2)},wl=[];class Cl{constructor(){this.isSwitchMapTool={type:Boolean,default:!0},this.isRyMapTool={type:Boolean,default:!1},this.isRight={type:Boolean,default:!1},this.bindMapClick={type:Boolean,default:!1},this.initModifyPolygon={type:[String,Object],default:()=>null}}}class xl{constructor(t){this.zoom={type:Number,default:10},this.maxZoom={type:Number,default:28},this.minZoom={type:Number,default:1},this.center={type:Array,default:()=>[2575,1450]},this.bbox={type:Array,default:()=>[]},this.url={type:String,default:()=>null},this.imageSize={type:Array,default:()=>[0,0,7247,3562]},this.imageExtent={type:Array,default:()=>[500,400,5e3,2700]}}}var El=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!==typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),Ml=function(t){function e(e){var n=e||{};return t.call(this,n)||this}return El(e,t),e}(be),Pl=Ml,Tl={IDLE:0,LOADING:1,LOADED:2,ERROR:3,EMPTY:4},Al=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!==typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),Sl=function(t){function e(e){var n=t.call(this)||this;return n.ready=!0,n.boundHandleImageChange_=n.handleImageChange_.bind(n),n.layer_=e,n.declutterExecutorGroup=null,n}return Al(e,t),e.prototype.getFeatures=function(t){return v()},e.prototype.getData=function(t){return null},e.prototype.prepareFrame=function(t){return v()},e.prototype.renderFrame=function(t,e){return v()},e.prototype.loadedTileCallback=function(t,e,n){t[e]||(t[e]={}),t[e][n.tileCoord.toString()]=n},e.prototype.createLoadedTileFinder=function(t,e,n){return function(i,o){var r=this.loadedTileCallback.bind(this,n,i);return t.forEachLoadedTile(e,i,o,r)}.bind(this)},e.prototype.forEachFeatureAtCoordinate=function(t,e,n,i,o){},e.prototype.getDataAtPixel=function(t,e,n){return null},e.prototype.getLayer=function(){return this.layer_},e.prototype.handleFontsChanged=function(){},e.prototype.handleImageChange_=function(t){var e=t.target;e.getState()===Tl.LOADED&&this.renderIfReadyAndVisible()},e.prototype.loadImage=function(t){var e=t.getState();return e!=Tl.LOADED&&e!=Tl.ERROR&&t.addEventListener(te.CHANGE,this.boundHandleImageChange_),e==Tl.IDLE&&(t.load(),e=t.getState()),e==Tl.LOADED},e.prototype.renderIfReadyAndVisible=function(){var t=this.getLayer();t&&t.getVisible()&&"ready"===t.getSourceState()&&t.changed()},e.prototype.disposeInternal=function(){delete this.layer_,t.prototype.disposeInternal.call(this)},e}(ae),Ol=Sl,Rl=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!==typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),Ll=null;function Il(){var t=document.createElement("canvas");t.width=1,t.height=1,Ll=t.getContext("2d")}var kl,jl=function(t){function e(e){var n=t.call(this,e)||this;return n.container=null,n.renderedResolution,n.tempTransform=j(),n.pixelTransform=j(),n.inversePixelTransform=j(),n.context=null,n.containerReused=!1,n.pixelContext_=null,n.frameState=null,n}return Rl(e,t),e.prototype.getImageData=function(t,e,n){var i;Ll||Il(),Ll.clearRect(0,0,1,1);try{Ll.drawImage(t,e,n,1,1,0,0,1,1),i=Ll.getImageData(0,0,1,1).data}catch(o){return Ll=null,null}return i},e.prototype.getBackground=function(t){var e=this.getLayer(),n=e.getBackground();return"function"===typeof n&&(n=n(t.viewState.resolution)),n||void 0},e.prototype.useContainer=function(t,e,n){var i,o,r=this.getLayer().getClassName();if(t&&t.className===r&&(!n||t&&t.style.backgroundColor&&p(Dt(t.style.backgroundColor),Dt(n)))){var s=t.firstElementChild;s instanceof HTMLCanvasElement&&(o=s.getContext("2d"))}if(o&&o.canvas.style.transform===e?(this.container=t,this.context=o,this.containerReused=!0):this.containerReused&&(this.container=null,this.context=null,this.containerReused=!1),!this.container){i=document.createElement("div"),i.className=r;var a=i.style;a.position="absolute",a.width="100%",a.height="100%",o=Ze();s=o.canvas;i.appendChild(s),a=s.style,a.position="absolute",a.left="0",a.transformOrigin="top left",this.container=i,this.context=o}this.containerReused||!n||this.container.style.backgroundColor||(this.container.style.backgroundColor=n)},e.prototype.clipUnrotated=function(t,e,n){var i=yt(n),o=gt(n),r=ht(n),s=lt(n);N(e.coordinateToPixelTransform,i),N(e.coordinateToPixelTransform,o),N(e.coordinateToPixelTransform,r),N(e.coordinateToPixelTransform,s);var a=this.inversePixelTransform;N(a,i),N(a,o),N(a,r),N(a,s),t.save(),t.beginPath(),t.moveTo(Math.round(i[0]),Math.round(i[1])),t.lineTo(Math.round(o[0]),Math.round(o[1])),t.lineTo(Math.round(r[0]),Math.round(r[1])),t.lineTo(Math.round(s[0]),Math.round(s[1])),t.clip()},e.prototype.dispatchRenderEvent_=function(t,e,n){var i=this.getLayer();if(i.hasListener(t)){var o=new Ie(t,this.inversePixelTransform,n,e);i.dispatchEvent(o)}},e.prototype.preRender=function(t,e){this.frameState=e,this.dispatchRenderEvent_(ge.PRERENDER,t,e)},e.prototype.postRender=function(t,e){this.dispatchRenderEvent_(ge.POSTRENDER,t,e)},e.prototype.getRenderTransform=function(t,e,n,i,o,r,s){var a=o/2,l=r/2,h=i/e,c=-h,u=-t[0]+s,p=-t[1];return D(this.tempTransform,a,l,h,c,-n,u,p)},e.prototype.getDataAtPixel=function(t,e,n){var i=N(this.inversePixelTransform,t.slice()),o=this.context,r=this.getLayer(),s=r.getExtent();if(s){var a=N(e.pixelToCoordinateTransform,t.slice());if(!X(s,a))return null}var l,h=Math.round(i[0]),c=Math.round(i[1]),u=this.pixelContext_;if(!u){var p=document.createElement("canvas");p.width=1,p.height=1,u=p.getContext("2d"),this.pixelContext_=u}u.clearRect(0,0,1,1);try{u.drawImage(o.canvas,h,c,1,1,0,0,1,1),l=u.getImageData(0,0,1,1).data}catch(d){return"SecurityError"===d.name?(this.pixelContext_=null,new Uint8Array):l}return 0===l[3]?null:l},e.prototype.disposeInternal=function(){delete this.frameState,t.prototype.disposeInternal.call(this)},e}(Ol),Nl=jl,Dl=.5,Gl=!0,Fl={imageSmoothingEnabled:!1,msImageSmoothingEnabled:!1},Bl={imageSmoothingEnabled:!0,msImageSmoothingEnabled:!0},Zl=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!==typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),Vl=function(t){function e(e){var n=t.call(this,e)||this;return n.image_=null,n}return Zl(e,t),e.prototype.getImage=function(){return this.image_?this.image_.getImage():null},e.prototype.prepareFrame=function(t){var e=t.layerStatesArray[t.layerIndex],n=t.pixelRatio,i=t.viewState,o=i.resolution,r=this.getLayer().getSource(),s=t.viewHints,a=t.extent;if(void 0!==e.extent&&(a=ft(a,ki(e.extent,i.projection))),!s[Gn.ANIMATING]&&!s[Gn.INTERACTING]&&!_t(a))if(r){var l=i.projection;if(!Gl){var h=r.getProjection();h&&(l=h)}var c=r.getImage(a,o,n,l);c&&(this.loadImage(c)?this.image_=c:c.getState()===Tl.EMPTY&&(this.image_=null))}else this.image_=null;return!!this.image_},e.prototype.getData=function(t){var e=this.frameState;if(!e)return null;var n=this.getLayer(),i=N(e.pixelToCoordinateTransform,t.slice()),o=n.getExtent();if(o&&!X(o,i))return null;var r=this.image_.getExtent(),s=this.image_.getImage(),a=vt(r),l=Math.floor(s.width*((i[0]-r[0])/a));if(l<0||l>=s.width)return null;var h=dt(r),c=Math.floor(s.height*((r[3]-i[1])/h));return c<0||c>=s.height?null:this.getImageData(s,l,c)},e.prototype.renderFrame=function(t,e){var n=this.image_,i=n.getExtent(),o=n.getResolution(),r=n.getPixelRatio(),s=t.layerStatesArray[t.layerIndex],a=t.pixelRatio,l=t.viewState,h=l.center,c=l.resolution,u=a*o/(c*r),p=t.extent,d=l.resolution,f=l.rotation,y=Math.round(vt(p)/d*a),g=Math.round(dt(p)/d*a);D(this.pixelTransform,t.size[0]/2,t.size[1]/2,1/a,1/a,f,-y/2,-g/2),G(this.inversePixelTransform,this.pixelTransform);var v=B(this.pixelTransform);this.useContainer(e,v,this.getBackground(t));var m=this.context,_=m.canvas;_.width!=y||_.height!=g?(_.width=y,_.height=g):this.containerReused||m.clearRect(0,0,y,g);var b=!1,w=!0;if(s.extent){var C=ki(s.extent,l.projection);w=mt(C,t.extent),b=w&&!U(C,t.extent),b&&this.clipUnrotated(m,t,C)}var x=n.getImage(),E=D(this.tempTransform,y/2,g/2,u,u,0,r*(i[0]-h[0])/o,r*(h[1]-i[3])/o);this.renderedResolution=o*a/r;var M=x.width*E[0],P=x.height*E[3];if(this.getLayer().getSource().getInterpolate()||Ut(m,Fl),this.preRender(m,t),w&&M>=.5&&P>=.5){var T=E[4],A=E[5],S=s.opacity,O=void 0;1!==S&&(O=m.globalAlpha,m.globalAlpha=S),m.drawImage(x,0,0,+x.width,+x.height,T,A,M,P),1!==S&&(m.globalAlpha=O)}return this.postRender(m,t),b&&m.restore(),Ut(m,Bl),v!==_.style.transform&&(_.style.transform=v),this.container},e}(Nl),zl=Vl,Hl=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!==typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),Kl=function(t){function e(e){return t.call(this,e)||this}return Hl(e,t),e.prototype.createRenderer=function(){return new zl(this)},e.prototype.getData=function(e){return t.prototype.getData.call(this,e)},e}(Pl),Xl=Kl,Ul=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!==typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),Jl=function(t){function e(e,n,i,o){var r=t.call(this)||this;return r.extent=e,r.pixelRatio_=i,r.resolution=n,r.state=o,r}return Ul(e,t),e.prototype.changed=function(){this.dispatchEvent(te.CHANGE)},e.prototype.getExtent=function(){return this.extent},e.prototype.getImage=function(){return v()},e.prototype.getPixelRatio=function(){return this.pixelRatio_},e.prototype.getResolution=function(){return this.resolution},e.prototype.getState=function(){return this.state},e.prototype.load=function(){v()},e}(Qt),Wl=Jl,Yl=10,$l=.25,ql=function(){function t(t,e,n,i,o,r){this.sourceProj_=t,this.targetProj_=e;var s={},a=Pi(this.targetProj_,this.sourceProj_);this.transformInv_=function(t){var e=t[0]+"/"+t[1];return s[e]||(s[e]=a(t)),s[e]},this.maxSourceExtent_=i,this.errorThresholdSquared_=o*o,this.triangles_=[],this.wrapsXInSource_=!1,this.canWrapXInSource_=this.sourceProj_.canWrapX()&&!!i&&!!this.sourceProj_.getExtent()&&vt(i)==vt(this.sourceProj_.getExtent()),this.sourceWorldWidth_=this.sourceProj_.getExtent()?vt(this.sourceProj_.getExtent()):null,this.targetWorldWidth_=this.targetProj_.getExtent()?vt(this.targetProj_.getExtent()):null;var l=yt(n),h=gt(n),c=ht(n),u=lt(n),p=this.transformInv_(l),d=this.transformInv_(h),f=this.transformInv_(c),y=this.transformInv_(u),g=Yl+(r?Math.max(0,Math.ceil(Mt(at(n)/(r*r*256*256)))):0);if(this.addQuad_(l,h,c,u,p,d,f,y,g),this.wrapsXInSource_){var v=1/0;this.triangles_.forEach((function(t,e,n){v=Math.min(v,t.source[0][0],t.source[1][0],t.source[2][0])})),this.triangles_.forEach(function(t){if(Math.max(t.source[0][0],t.source[1][0],t.source[2][0])-v>this.sourceWorldWidth_/2){var e=[[t.source[0][0],t.source[0][1]],[t.source[1][0],t.source[1][1]],[t.source[2][0],t.source[2][1]]];e[0][0]-v>this.sourceWorldWidth_/2&&(e[0][0]-=this.sourceWorldWidth_),e[1][0]-v>this.sourceWorldWidth_/2&&(e[1][0]-=this.sourceWorldWidth_),e[2][0]-v>this.sourceWorldWidth_/2&&(e[2][0]-=this.sourceWorldWidth_);var n=Math.min(e[0][0],e[1][0],e[2][0]),i=Math.max(e[0][0],e[1][0],e[2][0]);i-n<this.sourceWorldWidth_/2&&(t.source=e)}}.bind(this))}s={}}return t.prototype.addTriangle_=function(t,e,n,i,o,r){this.triangles_.push({source:[i,o,r],target:[t,e,n]})},t.prototype.addQuad_=function(t,e,n,i,o,r,s,a,l){var h=V([o,r,s,a]),c=this.sourceWorldWidth_?vt(h)/this.sourceWorldWidth_:null,u=this.sourceWorldWidth_,p=this.sourceProj_.canWrapX()&&c>.5&&c<1,d=!1;if(l>0){if(this.targetProj_.isGlobal()&&this.targetWorldWidth_){var f=V([t,e,n,i]),y=vt(f)/this.targetWorldWidth_;d=y>$l||d}!p&&this.sourceProj_.isGlobal()&&c&&(d=c>$l||d)}if(!(!d&&this.maxSourceExtent_&&isFinite(h[0])&&isFinite(h[1])&&isFinite(h[2])&&isFinite(h[3]))||mt(h,this.maxSourceExtent_)){var g=0;if(!d&&(!isFinite(o[0])||!isFinite(o[1])||!isFinite(r[0])||!isFinite(r[1])||!isFinite(s[0])||!isFinite(s[1])||!isFinite(a[0])||!isFinite(a[1])))if(l>0)d=!0;else if(g=(isFinite(o[0])&&isFinite(o[1])?0:8)+(isFinite(r[0])&&isFinite(r[1])?0:4)+(isFinite(s[0])&&isFinite(s[1])?0:2)+(isFinite(a[0])&&isFinite(a[1])?0:1),1!=g&&2!=g&&4!=g&&8!=g)return;if(l>0){if(!d){var v=[(t[0]+n[0])/2,(t[1]+n[1])/2],m=this.transformInv_(v),_=void 0;if(p){var b=(Ot(o[0],u)+Ot(s[0],u))/2;_=b-Ot(m[0],u)}else _=(o[0]+s[0])/2-m[0];var w=(o[1]+s[1])/2-m[1],C=_*_+w*w;d=C>this.errorThresholdSquared_}if(d){if(Math.abs(t[0]-n[0])<=Math.abs(t[1]-n[1])){var x=[(e[0]+n[0])/2,(e[1]+n[1])/2],E=this.transformInv_(x),M=[(i[0]+t[0])/2,(i[1]+t[1])/2],P=this.transformInv_(M);this.addQuad_(t,e,x,M,o,r,E,P,l-1),this.addQuad_(M,x,n,i,P,E,s,a,l-1)}else{var T=[(t[0]+e[0])/2,(t[1]+e[1])/2],A=this.transformInv_(T),S=[(n[0]+i[0])/2,(n[1]+i[1])/2],O=this.transformInv_(S);this.addQuad_(t,T,S,i,o,A,O,a,l-1),this.addQuad_(T,e,n,S,A,r,s,O,l-1)}return}}if(p){if(!this.canWrapXInSource_)return;this.wrapsXInSource_=!0}0==(11&g)&&this.addTriangle_(t,n,i,o,s,a),0==(14&g)&&this.addTriangle_(t,n,e,o,s,r),g&&(0==(13&g)&&this.addTriangle_(e,i,t,r,a,o),0==(7&g)&&this.addTriangle_(e,i,n,r,a,s))}},t.prototype.calculateSourceExtent=function(){var t=Y();return this.triangles_.forEach((function(e,n,i){var o=e.source;it(t,o[0]),it(t,o[1]),it(t,o[2])})),t},t.prototype.getTriangles=function(){return this.triangles_},t}(),Ql=ql,th=[];function eh(t,e,n,i,o){t.beginPath(),t.moveTo(0,0),t.lineTo(e,n),t.lineTo(i,o),t.closePath(),t.save(),t.clip(),t.fillRect(0,0,Math.max(e,i)+1,Math.max(n,o)),t.restore()}function nh(t,e){return Math.abs(t[4*e]-210)>2||Math.abs(t[4*e+3]-191.25)>2}function ih(){if(void 0===kl){var t=document.createElement("canvas").getContext("2d");t.globalCompositeOperation="lighter",t.fillStyle="rgba(210, 0, 0, 0.75)",eh(t,4,5,4,0),eh(t,4,5,0,5);var e=t.getImageData(0,0,3,3).data;kl=nh(e,0)||nh(e,4)||nh(e,8)}return kl}function oh(t,e,n,i){var o=Ti(n,e,t),r=bi(e,i,n),s=e.getMetersPerUnit();void 0!==s&&(r*=s);var a=t.getMetersPerUnit();void 0!==a&&(r/=a);var l=t.getExtent();if(!l||X(l,o)){var h=bi(t,r,o)/r;isFinite(h)&&h>0&&(r/=h)}return r}function rh(t,e,n,i,o,r,s,a,l,h,c,u){var p=Ze(Math.round(n*t),Math.round(n*e),th);if(u||Ut(p,Fl),0===l.length)return p.canvas;function d(t){return Math.round(t*n)/n}p.scale(n,n),p.globalCompositeOperation="lighter";var f=Y();l.forEach((function(t,e,n){nt(f,t.extent)}));var y=vt(f),g=dt(f),v=Ze(Math.round(n*y/i),Math.round(n*g/i));u||Ut(v,Fl);var m=n/i;l.forEach((function(t,e,n){var i=t.extent[0]-f[0],o=-(t.extent[3]-f[3]),r=vt(t.extent),s=dt(t.extent);t.image.width>0&&t.image.height>0&&v.drawImage(t.image,h,h,t.image.width-2*h,t.image.height-2*h,i*m,o*m,r*m,s*m)}));var _=yt(s);return a.getTriangles().forEach((function(t,e,o){var s=t.source,a=t.target,l=s[0][0],h=s[0][1],c=s[1][0],y=s[1][1],g=s[2][0],m=s[2][1],b=d((a[0][0]-_[0])/r),w=d(-(a[0][1]-_[1])/r),C=d((a[1][0]-_[0])/r),x=d(-(a[1][1]-_[1])/r),E=d((a[2][0]-_[0])/r),M=d(-(a[2][1]-_[1])/r),P=l,T=h;l=0,h=0,c-=P,y-=T,g-=P,m-=T;var A=[[c,y,0,0,C-b],[g,m,0,0,E-b],[0,0,c,y,x-w],[0,0,g,m,M-w]],S=At(A);if(S){if(p.save(),p.beginPath(),ih()||!u){p.moveTo(C,x);for(var O=4,R=b-C,L=w-x,I=0;I<O;I++)p.lineTo(C+d((I+1)*R/O),x+d(I*L/(O-1))),I!=O-1&&p.lineTo(C+d((I+1)*R/O),x+d((I+1)*L/(O-1)));p.lineTo(E,M)}else p.moveTo(C,x),p.lineTo(b,w),p.lineTo(E,M);p.clip(),p.transform(S[0],S[2],S[1],S[3],b,w),p.translate(f[0]-P,f[3]-T),p.scale(i/n,-i/n),p.drawImage(v.canvas,0,0),p.restore()}})),c&&(p.save(),p.globalCompositeOperation="source-over",p.strokeStyle="black",p.lineWidth=1,a.getTriangles().forEach((function(t,e,n){var i=t.target,o=(i[0][0]-_[0])/r,s=-(i[0][1]-_[1])/r,a=(i[1][0]-_[0])/r,l=-(i[1][1]-_[1])/r,h=(i[2][0]-_[0])/r,c=-(i[2][1]-_[1])/r;p.beginPath(),p.moveTo(a,l),p.lineTo(o,s),p.lineTo(h,c),p.closePath(),p.stroke()})),p.restore()),p.canvas}var sh=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!==typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),ah=function(t){function e(e,n,i,o,r,s,a){var l=this,h=e.getExtent(),c=n.getExtent(),u=c?ft(i,c):i,p=ct(u),d=oh(e,n,p,o),f=Dl,y=new Ql(e,n,u,h,d*f,o),g=y.calculateSourceExtent(),v=s(g,d,r),m=v?Tl.IDLE:Tl.EMPTY,_=v?v.getPixelRatio():1;return l=t.call(this,i,o,_,m)||this,l.targetProj_=n,l.maxSourceExtent_=h,l.triangulation_=y,l.targetResolution_=o,l.targetExtent_=i,l.sourceImage_=v,l.sourcePixelRatio_=_,l.interpolate_=a,l.canvas_=null,l.sourceListenerKey_=null,l}return sh(e,t),e.prototype.disposeInternal=function(){this.state==Tl.LOADING&&this.unlistenSource_(),t.prototype.disposeInternal.call(this)},e.prototype.getImage=function(){return this.canvas_},e.prototype.getProjection=function(){return this.targetProj_},e.prototype.reproject_=function(){var t=this.sourceImage_.getState();if(t==Tl.LOADED){var e=vt(this.targetExtent_)/this.targetResolution_,n=dt(this.targetExtent_)/this.targetResolution_;this.canvas_=rh(e,n,this.sourcePixelRatio_,this.sourceImage_.getResolution(),this.maxSourceExtent_,this.targetResolution_,this.targetExtent_,this.triangulation_,[{extent:this.sourceImage_.getExtent(),image:this.sourceImage_.getImage()}],0,void 0,this.interpolate_)}this.state=t,this.changed()},e.prototype.load=function(){if(this.state==Tl.IDLE){this.state=Tl.LOADING,this.changed();var t=this.sourceImage_.getState();t==Tl.LOADED||t==Tl.ERROR?this.reproject_():(this.sourceListenerKey_=ee(this.sourceImage_,te.CHANGE,(function(t){var e=this.sourceImage_.getState();e!=Tl.LOADED&&e!=Tl.ERROR||(this.unlistenSource_(),this.reproject_())}),this),this.sourceImage_.load())}},e.prototype.unlistenSource_=function(){ie(this.sourceListenerKey_),this.sourceListenerKey_=null},e}(Wl),lh=ah,hh=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!==typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),ch=function(t){function e(e){var n=t.call(this)||this;n.projection=_i(e.projection),n.attributions_=uh(e.attributions),n.attributionsCollapsible_=void 0===e.attributionsCollapsible||e.attributionsCollapsible,n.loading=!1,n.state_=void 0!==e.state?e.state:"ready",n.wrapX_=void 0!==e.wrapX&&e.wrapX,n.interpolate_=!!e.interpolate,n.viewResolver=null,n.viewRejector=null;var i=n;return n.viewPromise_=new Promise((function(t,e){i.viewResolver=t,i.viewRejector=e})),n}return hh(e,t),e.prototype.getAttributions=function(){return this.attributions_},e.prototype.getAttributionsCollapsible=function(){return this.attributionsCollapsible_},e.prototype.getProjection=function(){return this.projection},e.prototype.getResolutions=function(){return v()},e.prototype.getView=function(){return this.viewPromise_},e.prototype.getState=function(){return this.state_},e.prototype.getWrapX=function(){return this.wrapX_},e.prototype.getInterpolate=function(){return this.interpolate_},e.prototype.refresh=function(){this.changed()},e.prototype.setAttributions=function(t){this.attributions_=uh(t),this.changed()},e.prototype.setState=function(t){this.state_=t,this.changed()},e}(ue);function uh(t){return t?Array.isArray(t)?function(e){return t}:"function"===typeof t?t:function(e){return[t]}:null}var ph=ch,dh=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!==typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),fh={IMAGELOADSTART:"imageloadstart",IMAGELOADEND:"imageloadend",IMAGELOADERROR:"imageloaderror"},yh=function(t){function e(e,n){var i=t.call(this,e)||this;return i.image=n,i}return dh(e,t),e}(Kt),gh=function(t){function e(e){var n=this,i=void 0===e.imageSmoothing||e.imageSmoothing;return void 0!==e.interpolate&&(i=e.interpolate),n=t.call(this,{attributions:e.attributions,projection:e.projection,state:e.state,interpolate:i})||this,n.on,n.once,n.un,n.resolutions_=void 0!==e.resolutions?e.resolutions:null,n.reprojectedImage_=null,n.reprojectedRevision_=0,n}return dh(e,t),e.prototype.getResolutions=function(){return this.resolutions_},e.prototype.findNearestResolution=function(t){if(this.resolutions_){var e=c(this.resolutions_,t,0);t=this.resolutions_[e]}return t},e.prototype.getImage=function(t,e,n,i){var o=this.getProjection();if(Gl&&o&&i&&!Ei(o,i)){if(this.reprojectedImage_){if(this.reprojectedRevision_==this.getRevision()&&Ei(this.reprojectedImage_.getProjection(),i)&&this.reprojectedImage_.getResolution()==e&&et(this.reprojectedImage_.getExtent(),t))return this.reprojectedImage_;this.reprojectedImage_.dispose(),this.reprojectedImage_=null}return this.reprojectedImage_=new lh(o,i,t,e,n,function(t,e,n){return this.getImageInternal(t,e,n,o)}.bind(this),this.getInterpolate()),this.reprojectedRevision_=this.getRevision(),this.reprojectedImage_}return o&&(i=o),this.getImageInternal(t,e,n,i)},e.prototype.getImageInternal=function(t,e,n,i){return v()},e.prototype.handleImageChange=function(t){var e,n=t.target;switch(n.getState()){case Tl.LOADING:this.loading=!0,e=fh.IMAGELOADSTART;break;case Tl.LOADED:this.loading=!1,e=fh.IMAGELOADEND;break;case Tl.ERROR:this.loading=!1,e=fh.IMAGELOADERROR;break;default:return}this.hasListener(e)&&this.dispatchEvent(new yh(e,n))},e}(ph);function vh(t,e){t.getImage().src=e}var mh=gh,_h=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!==typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),bh=function(t){function e(e,n,i,o,r,s){var a=t.call(this,e,n,i,Tl.IDLE)||this;return a.src_=o,a.image_=new Image,null!==r&&(a.image_.crossOrigin=r),a.unlisten_=null,a.state=Tl.IDLE,a.imageLoadFunction_=s,a}return _h(e,t),e.prototype.getImage=function(){return this.image_},e.prototype.handleImageError_=function(){this.state=Tl.ERROR,this.unlistenImage_(),this.changed()},e.prototype.handleImageLoad_=function(){void 0===this.resolution&&(this.resolution=dt(this.extent)/this.image_.height),this.state=Tl.LOADED,this.unlistenImage_(),this.changed()},e.prototype.load=function(){this.state!=Tl.IDLE&&this.state!=Tl.ERROR||(this.state=Tl.LOADING,this.changed(),this.imageLoadFunction_(this,this.src_),this.unlisten_=wh(this.image_,this.handleImageLoad_.bind(this),this.handleImageError_.bind(this)))},e.prototype.setImage=function(t){this.image_=t,this.resolution=dt(this.extent)/this.image_.height},e.prototype.unlistenImage_=function(){this.unlisten_&&(this.unlisten_(),this.unlisten_=null)},e}(Wl);function wh(t,e,n){var i=t,o=!0,r=!1,s=!1,a=[ne(i,te.LOAD,(function(){s=!0,r||e()}))];return i.src&&A?(r=!0,i.decode().then((function(){o&&e()})).catch((function(t){o&&(s?e():n())}))):a.push(ne(i,te.ERROR,n)),function(){o=!1,a.forEach(ie)}}var Ch=bh,xh=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!==typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),Eh=function(t){function e(e){var n=this,i=void 0!==e.crossOrigin?e.crossOrigin:null,o=void 0!==e.imageLoadFunction?e.imageLoadFunction:vh,r=void 0===e.imageSmoothing||e.imageSmoothing;return void 0!==e.interpolate&&(r=e.interpolate),n=t.call(this,{attributions:e.attributions,interpolate:r,projection:_i(e.projection)})||this,n.url_=e.url,n.imageExtent_=e.imageExtent,n.image_=new Ch(n.imageExtent_,void 0,1,n.url_,i,o),n.imageSize_=e.imageSize?e.imageSize:null,n.image_.addEventListener(te.CHANGE,n.handleImageChange.bind(n)),n}return xh(e,t),e.prototype.getImageExtent=function(){return this.imageExtent_},e.prototype.getImageInternal=function(t,e,n,i){return mt(t,this.image_.getExtent())?this.image_:null},e.prototype.getUrl=function(){return this.url_},e.prototype.handleImageChange=function(e){if(this.image_.getState()==Tl.LOADED){var n=this.image_.getExtent(),i=this.image_.getImage(),o=void 0,r=void 0;this.imageSize_?(o=this.imageSize_[0],r=this.imageSize_[1]):(o=i.width,r=i.height);var s=vt(n),a=dt(n),l=s/o,h=a/r,c=o,u=r;if(l>h?c=Math.round(s/h):u=Math.round(a/l),c!==o||u!==r){var p=Ze(c,u);this.getInterpolate()||Ut(p,Fl);var d=p.canvas;p.drawImage(i,0,0,o,r,0,0,d.width,d.height),this.image_.setImage(d)}}t.prototype.handleImageChange.call(this,e)},e}(mh),Mh=Eh,Ph={name:"RyStaticMap",components:{RyMapTool:ia},props:{...new Cl,...new xl,...new Hs},created(){},watch:{center(t){this.setCenter(t)},bbox(t){this.setFit(t)},maxZoom(t){this.lMap.setMaxZoom(t)},zoom(t){this.lMap.setZoom(t)},minZoom(t){this.lMap.setMinZoom(t)},bindMapClick(t){this.bindMapClick!==t&&(this.bindMapClick=t,this._bingMapEvent())},url(t){this.map&&(this.selectLayer(),this.setCenter())}},data(){return{lMap:new Ds,drawPolygon:null,mapClick:null,map:null,moveend:null,lastX:0,lastY:0,layer:null}},methods:{getImageLayer(){return new Xl({source:new Mh({crossOrigin:"anonymous",imageSize:this.imageSize,imageExtent:this.imageExtent,url:this.url})})},getProjection(){return new Vn({code:3875,extent:this.imageExtent,units:"m"})},getView(){return new rr({projection:"EPSG:3857",center:this.center,Projection:this.getProjection(),zoom:this.zoom,minZoom:this.minZoom,maxZoom:this.maxZoom})},async loadMap(t){this.layer=this.getImageLayer();const e=await this.lMap.initStaticMap(t,{view:this.getView(),layer:this.layer});this.map=e,this.$emit("load",{map:e,mapServices:this.lMap,ryMapTool:this.$refs.mapTool})},_bingMapEvent(){this.bindMapClick?this._mapClickOnce():this._mapClickOnce(!0)},setMaxZoom(t){this.lMap.setMaxZoom(t)},setMinZoom(t){this.lMap.setMinZoom(t)},setZoom(t){this.lMap.setZoom(t)},crossHairClick(t){this.$emit("crossHairClick",t)},setCenter(t){this.lMap.setCenter(t,15)},setFit(t){t.length&&this.map&&Object(Ns["fitNew"])(this.map,[t])},drawSuccess(t){this.$emit("drawSuccess",t)},drawError(t){this.$emit("drawError",t)},_mapClickOnce(t=!1){this.mapClick||(this.mapClick=t=>{if(t.dragging)return;const e=this.map.getEventPixel(t.originalEvent),n=this.map.hasFeatureAtPixel(e);if(n){const e=this.map.forEachFeatureAtPixel(t.pixel,t=>t),n=e.getId();if(void 0===n)return;this.$emit("mapClick",n)}}),t?(this.map.un("click",this.mapClick),this.mapClick=null):this.map.on("click",this.mapClick)},removeLayer(){this.map&&this.layer&&this.map.removeLayer(this.layer)},selectLayer(){this.removeLayer(),this.map&&(this.layer=this.getImageLayer(),this.map.addLayer(this.layer),this.$emit("selectMapEvent"))},loadDrawPolygonEvent(t){this.$emit("loadDrawPolygonEvent",t)}}},Th=Ph,Ah=(n("d047"),$s(Th,bl,wl,!1,null,"8a78c586",null)),Sh=Ah.exports;Sh.install=t=>{t.install(Sh.name,Sh)};var Oh=Sh,Rh=function(){var t=this,e=t._self._c;return e("div",{staticClass:"map-box"},[e("div",{directives:[{name:"lmap",rawName:"v-lmap:loadMap",arg:"loadMap"}],staticClass:"map-style"}),t.lMap.map&&t.isRyMapTool?e("RyMapTool",{staticClass:"ry-map-tool",class:{left:!t.isRight,right:t.isRight},attrs:{lMap:t.lMap,isShowRangingTool:t.isShowRangingTool,initModifyPolygon:t.initModifyPolygon,isShowDrawTool:t.isShowDrawTool,isRight:t.isRight,isCrossHair:t.isCrossHair,hideAdd:t.hideAdd,hidePoint:t.hidePoint,hideCancel:t.hideCancel,hideDelete:t.hideDelete,hideSave:t.hideSave,hideLine:t.hideLine,hideArea:t.hideArea,isSwitchMap:t.isSwitchMap,isSwitchMapRight:t.isSwitchMapRight,gpsType:t.lastMapType},on:{crossHairClick:function(e){return t.crossHairClick(e)},loadDrawPolygonEvent:function(e){return t.loadDrawPolygonEvent(e)},success:function(e){return t.drawSuccess(e)},error:function(e){return t.drawError(e)}}},[[t._t("maptool")]],2):t._e(),t.map?[t._t("polygon",null,{mapDto:{map:t.map,lMap:t.lMap}}),t._t("marker",null,{mapDto:{map:t.map,lMap:t.lMap}})]:t._e()],2)},Lh=[];class Ih{constructor(){Zs(this,"isShowSwitchMap",{type:Boolean,default:!0}),Zs(this,"urls",{type:Array,default:()=>[]}),Zs(this,"boundaryModel",{type:Object,default:()=>null}),Zs(this,"slicingZoom",{type:Number,default:13}),this.mapType={type:Number,default:0},this.layerType={type:Number,default:2},this.isSwitchMapTool={type:Boolean,default:!0},this.isRyMapTool={type:Boolean,default:!1},this.isRight={type:Boolean,default:!1},this.bindMapClick={type:Boolean,default:!1},this.bindMapMoveend={type:Boolean,default:!1},this.isDisabledSwitchMapTabEvent={type:Boolean,default:!1},this.initModifyPolygon={type:[String,Object],default:()=>null},this.m={type:Number,default:()=>3e3},this.switchMapDefaultTypeOrLayer={type:Array,default:()=>null},this.mapTypeAndLayer={type:Array,default:()=>[{id:0,icon:"el-icon--tianditu",activeIcon:"el-icon--tianditu-copy",name:"天地图",layer:[{id:0,name:"地图"},{id:1,name:"卫星"},{id:2,name:"卫星组合"}]},{id:1,icon:"el-icon--gaode",activeIcon:"el-icon--gaode-copy",name:"高德地图",layer:[{id:0,name:"地图"},{id:1,name:"卫星"},{id:2,name:"卫星组合"}]},{id:2,icon:"el-icon--Bing",activeIcon:"el-icon--Bing-copy",name:"Bing地图",layer:[{id:1,name:"卫星"},{id:2,name:"卫星组合"}]}]}}}var kh={name:"RyOfflineMap",components:{RyMapTool:ia},props:{...new Ih,...new zs,...new Hs},created(){},watch:{center(t){this.setCenter(t)},bbox(t){this.setFit(t)},maxZoom(t){this.lMap.setMaxZoom(t)},zoom(t){this.lMap.setZoom(t)},minZoom(t){this.lMap.setMinZoom(t)},bindMapClick(t){this.bindMapClick!==t&&(this.bindMapClick=t,this._bingMapEvent())},bindMapMoveend(t){this.bindMapMoveend!==t&&(this.bindMapMoveend=t,this._bingMapMoveend())},m(t){this.m=t},boundaryModel(t){this.map}},data(){return{lMap:new Ds,drawPolygon:null,mapClick:null,map:null,moveend:null,lastX:0,lastY:0,lastMapType:0,isFirstLoad:!1}},methods:{_setMaxZoom(t,e){this.setMaxZoom(18)},async loadMap(t){this.lMap.initOfflineMap(100,{el:t,urls:this.urls,callback:({map:t,lMap:e})=>{e.setView(this.center,this.bbox);const n=e.getView();n.fit(this.bbox,[50,50,50,50]),n.setMaxZoom(this.minZoom),n.setMaxZoom(this.maxZoom),this.map=t;const{geo:i,width:o,color:r,lineDash:s}=this.boundaryModel;e.SlicingZoom=this.slicingZoom,e.initMapMaskEvent(t.getLayers(),i,{width:o,color:r,lineDash:s}),this._bingMapEvent(),this._bingMapMoveend(),this.$emit("load",{map:t,mapServices:this.lMap,ryMapTool:this.$refs.mapTool})}})},_bingMapEvent(){this.bindMapClick?this._mapClickOnce():this._mapClickOnce(!0)},_bingMapMoveend(){this.bindMapMoveend?this._mapMoveend():this._mapMoveend(!0)},getViewOptions(){return{projection:this.projection,center:this.center,zoom:this.zoom,minZoom:this.minZoom,maxZoom:this.maxZoom}},setMaxZoom(t){this.lMap.setMaxZoom(t)},setMinZoom(t){this.lMap.setMinZoom(t)},setZoom(t){this.lMap.setZoom(t)},crossHairClick(t){this.$emit("crossHairClick",t)},setCenter(t){this.lMap.setCenter(t,15)},setFit(t){t.length&&this.map&&Object(Ns["fitNew"])(this.map,[t])},drawSuccess(t){this.$emit("drawSuccess",t)},drawError(t){this.$emit("drawError",t)},_mapClickOnce(t=!1){this.mapClick||(this.mapClick=t=>{if(t.dragging)return;const e=this.map.getEventPixel(t.originalEvent),n=this.map.hasFeatureAtPixel(e);if(n){const e=this.map.forEachFeatureAtPixel(t.pixel,t=>t),n=e.getId();if(void 0===n)return;this.$emit("mapClick",n)}}),t?(this.map.un("click",this.mapClick),this.mapClick=null):this.map.on("click",this.mapClick)},_mapMoveend(t=!1){this.moveend=t=>{const[e,n]=this.lMap.getCenter();let i=0;if(this.lastX!==e&&this.lastY!==n)return i=Object(Ns["caculateLL"])(this.lastY,this.lastX,n,e),this.$emit("mapMoveend",{m:i,oversteSetValue:i>=this.m,x:e,y:n,e:t}),void(i>=this.m&&(this.lastX=e,this.lastY=n));this.$emit("mapMoveend",{m:i,oversteSetValue:!1,x:e,y:n,e:t})},t?this.map.un("moveend",this.moveend):this.map.on("moveend",this.moveend)},loadDrawPolygonEvent(t){this.$emit("loadDrawPolygonEvent",t)}}},jh=kh,Nh=(n("d9e6"),$s(jh,Rh,Lh,!1,null,"44c7c94c",null)),Dh=Nh.exports;Dh.install=t=>{t.install(RyMap.name,Dh)};var Gh=Dh,Fh=function(){var t=this,e=t._self._c;return e("div")},Bh=[];class Zh extends ba{constructor(...t){super(...t),Zs(this,"modelArr",{type:Array,default:()=>[]}),Zs(this,"insert",{type:Object,default:()=>null}),Zs(this,"inserts",{type:Array,default:()=>[]}),Zs(this,"isShowAll",{type:Boolean,default:!0}),Zs(this,"clear",{type:Boolean,default:!1}),Zs(this,"isFit",{type:Boolean,default:!0}),Zs(this,"setColor",{type:Object,default:()=>null}),Zs(this,"time",{type:Number,default:100})}}var Vh={name:"RyKMLs",props:{...new Zh},data(){return{bbox:[],bboxMap:new Map,bboxGCJ02:[],bboxMapGCJ02:new Map,kmlMap:new Map,isCreate:!0,lastType:-1,urls:new Map,gcj02Urls:new Map,lastColor:null,lastId:0}},watch:{modelArr(t){this._remove(),t.length&&(this.modelArr=t,this.init(t))},gpsType(t){this.lastType!=t&&(this.gpsType=t,this.lastType=t,this.selectGPSAll(this.gpsType))},async insert(t){this.isFit&&this.$emit("loadingEvent",!0),await this._insert(t),this.isFit&&(this.setFit(),this.$emit("loadingEvent",!1))},inserts(t){this._inserts(t)},clear(t){t&&this._remove()},isShowAll(t){t?this.showAll():this.hideAll()},setColor(t){t&&this._setColor(t)}},async created(){this.lastType=this.gpsType,this.modelArr.length?await this.init(this.modelArr):this.inserts.length&&await this.init(this.inserts)},methods:{async init(t){if(this.isFit&&this.$emit("loadingEvent",!0),t&&t.length){for(let e=0;e<t.length;e++)await this._insert(t[e]);this.isFit&&(this.setFit(),this.$emit("loadingEvent",!1))}},async _inserts(t){this.lastType=this.gpsType,this.isFit&&this.$emit("loadingEvent",!0);for(let e=0;e<t.length;e++)await this._insert(t[e]);this.isFit&&(this.setFit(),this.$emit("loadingEvent",!1))},async _insert(t){const{id:e,url:n,bbox:i,isShow:o,stroke:r,fillColor:s,zIndex:a,width:l,extractStyles:h,gcj02Url:c}=t;if(!this.kmlMap.has(e)){const u=new Ns["LKML"]({id:e,url:1==this.gpsType?c:n,bbox:i,isShow:o,stroke:r,fillColor:s,zIndex:a,width:l},this.map,h);await u.init(this.time),e&&u.setId(e),this.kmlMap.set(e,u),this.urls.set(e,n),c&&this.gcj02Urls.set(e,c),this.setBBOXArr(t.id,u.getExtent())}},_setZoom(){const t=this.map.getView().getZoom();this.map.getView().setZoom(t+1e-5),this.map.getView().setZoom(t-1e-4)},setBBOXArr(t,e){if(this.bboxMap.has(t)||(this.bbox.push(e),this.bboxMap.set(t,e)),!this.bboxMapGCJ02.has(t)){const n=this.convertBBoxGCJ02(e);this.bboxGCJ02.push(n),this.bboxMapGCJ02.set(t,n)}},setUrl(t,e){this.kmlMap.has(t)&&this.kmlMap.get(t).setUrl(e)},setFit(){this.bbox.length&&this.map&&(this.bbox.length>1?Object(Ns["fitNew"])(this.map,1==this.gpsType?this.bboxGCJ02:this.bbox):this.setFitFist(1==this.gpsType?this.bboxGCJ02[0]:this.bbox[0]))},setFitFist(t){const e=[t[0],t[3],t[2],t[1]],n=[t[2],t[1],t[0],t[3]];Object(Ns["fitNew"])(this.map,[e,n])},convertBBoxGCJ02(t){const e=[],{lat:n,lon:i}=Ns["GPS"].gcj_encrypt(t[0],t[1]),{lon:o,lat:r}=Ns["GPS"].gcj_encrypt(t[2],t[3]);return e.push(i),e.push(n),e.push(o),e.push(r),e},_remove(){this.kmlMap.forEach(t=>{t.removeKML(),t=null}),this.kmlMap.clear(),this.bboxMap.clear(),this.bbox=[],this.bboxGCJ02=[],this.bboxMapGCJ02.clear(),this.urls.clear(),this.gcj02Urls.clear(),this.lastColor=null,this.lastId=0},selectGPSAll(t){const e=1==t?this.gcj02Urls:this.urls;e.forEach((t,e)=>{this.setUrl(e,t)})},_setColor(t){const{color:e,id:n}=t;if(this.kmlMap.has(n)){const t=this.kmlMap.get(n);t.setPolygonColor([e,e])}this._setZoom()},setCenter(t){if(this.bboxMapGCJ02.has(t)){const e=1==this.gpsType?this.bboxMapGCJ02.get(t):this.bboxMap.get(t);this.setFitFist(e)}},showAll(){this.kmlMap.forEach(t=>t.show()),this.restFit&&this._restFit()},hideAll(){this.kmlMap.forEach(t=>t.hide())}}},zh=Vh,Hh=$s(zh,Fh,Bh,!1,null,null,null),Kh=Hh.exports;Kh.install=t=>{t.install(Kh.name,Kh)};var Xh=Kh,Uh=function(){var t=this,e=t._self._c;return e("div")},Jh=[];class Wh extends ba{constructor(...t){super(...t),Zs(this,"model",{type:Object,default:()=>null}),Zs(this,"isShow",{type:Boolean,default:!0}),Zs(this,"clear",{type:Boolean,default:!1}),Zs(this,"isFit",{type:Boolean,default:!0}),Zs(this,"time",{type:Number,default:100})}}var Yh={name:"RyKML",props:{...new Wh},data(){return{bbox:[],bboxGCJ02:[],kml:null,lastType:-1,url:null,gcj02Url:null}},watch:{model(t){this._remove(),t&&(this.model=t,this.init(t))},clear(t){t&&this._remove()},isShow(t){t?this.showAll():this.hideAll()},gpsType(t){this.lastType!=t&&(this.gpsType=t,this.lastType=t,this.selectGPSAll(this.gpsType))}},created(){this.lastType=this.gpsType,this.model&&this.init(this.model)},methods:{async init(t){this.isFit&&this.$emit("loadingEvent",!0),await this._insert(t),this.isFit&&(this.setFit(),this.$emit("loadingEvent",!1))},async _insert(t){const{id:e,url:n,bbox:i,is:o,stroke:r,fillColor:s,zIndex:a,width:l,extractStyles:h,gcj02Url:c}=t,u=new Ns["LKML"]({id:e,url:1==this.gpsType?c:n,bbox:i,is:o,stroke:r,fillColor:s,zIndex:a,width:l},this.map,h);this.kml=u,this.url=n,this.gcj02Url=c,await u.init(this.time),e&&u.setId(e),this.setBBOXArr(u.getExtent())},setBBOXArr(t){this.bbox=t;const e=this.convertBBoxGCJ02(t);this.bboxGCJ02=e},setUrl(t){this.kml&&this.kml.setUrl(t)},setFit(){this.bbox.length&&this.map&&this.setFitFist(1==this.gpsType?this.bboxGCJ02:this.bbox)},setFitFist(t){const e=[t[0],t[3],t[2],t[1]],n=[t[2],t[1],t[0],t[3]];Object(Ns["fitNew"])(this.map,[e,n])},convertBBoxGCJ02(t){const e=[],{lat:n,lon:i}=Ns["GPS"].gcj_encrypt(t[0],t[1]),{lon:o,lat:r}=Ns["GPS"].gcj_encrypt(t[2],t[3]);return e.push(i),e.push(n),e.push(o),e.push(r),e},_remove(){this.kml&&(this.kml.removeKML(),this.bbox=[],this.bboxGCJ02=[],this.url=null,this.gcj02Url=null)},selectGPSAll(t){const e=1==t?this.gcj02Url:this.url;this.setUrl(e)},show(){this.kml&&(this.kml.show(),this.isFit&&setTimeout(()=>{this.setFit()},50))},hide(){this.kml&&this.kml.hide()}}},$h=Yh,qh=$s($h,Uh,Jh,!1,null,null,null),Qh=qh.exports;Qh.install=t=>{t.install(Qh.name,Qh)};var tc=Qh,ec=function(){var t=this,e=t._self._c;return e("div")},nc=[];class ic extends ba{constructor(...t){super(...t),Zs(this,"modelArr",{type:Array,default:()=>[]}),Zs(this,"insert",{type:Object,default:()=>null}),Zs(this,"inserts",{type:Array,default:()=>[]}),Zs(this,"isShowAll",{type:Boolean,default:!0}),Zs(this,"isShow",{type:Object,default:()=>null}),Zs(this,"clear",{type:Boolean,default:!1}),Zs(this,"isFit",{type:Boolean,default:!0})}}var oc={name:"RyStaticLayers",props:{...new ic},data(){return{bbox:[],bboxMap:new Map,bboxGCJ02:[],bboxMapGCJ02:new Map,staticMap:new Map,isCreate:!0,lastType:-1}},watch:{modelArr(t){this._remove(),t.length&&(this.modelArr=t,this.init(t))},gpsType(t){this.lastType!=t&&(this.gpsType=t,this.lastType=t,this.selectGPSAll(this.gpsType))},insert(t){this.insert=t,this._insert(t),this.isFit&&setTimeout(()=>{this.setFit()},50)},inserts(t){this.inserts=t,this._inserts(t)},clear(t){t&&this._remove()},isShowAll(t){t?this.showAll():this.hideAll()},isShow(t){t&&this._isShow(t)}},created(){this.lastType=this.gpsType,this.init(this.modelArr)},methods:{init(t){t&&t.length&&(t.forEach(t=>{this._insert(t)}),this.isFit&&setTimeout(()=>{this.setFit()},50))},_inserts(t){this.lastType=this.gpsType,t.forEach(t=>{this._insert(t,!1)}),this.isFit&&setTimeout(()=>{this.setFit()},50)},_insert(t){const{id:e,url:n,bbox:i,zIndex:o,projection:r}=t;if(!this.staticMap.has(e)){const t=new Ns["staticImage"]({id:e,url:n,imageExtent:i,zIndex:o,type:this.gpsType,projection:r},this.map);this.staticMap.set(e,t)}this.setBBOXArr(t.id,i)},setBBOXArr(t,e){if(this.bboxMap.has(t)||(this.bbox.push(e),this.bboxMap.set(t,e)),!this.bboxMapGCJ02.has(t)){const n=this.convertBBoxGCJ02(e);this.bboxGCJ02.push(n),this.bboxMapGCJ02.set(t,n)}},setFit(){this.bbox.length&&this.map&&(this.bbox.length>1?Object(Ns["fitNew"])(this.map,1==this.gpsType?this.bboxGCJ02:this.bbox):this.setFitFist(1==this.gpsType?this.bboxGCJ02[0]:this.bbox[0]))},setFitFist(t){const e=[t[0],t[3],t[2],t[1]],n=[t[2],t[1],t[0],t[3]];Object(Ns["fitNew"])(this.map,[e,n])},convertBBoxGCJ02(t){const e=[],{lat:n,lon:i}=Ns["GPS"].gcj_encrypt(t[0],t[1]),{lon:o,lat:r}=Ns["GPS"].gcj_encrypt(t[2],t[3]);return e.push(i),e.push(n),e.push(o),e.push(r),e},_remove(){this.staticMap.forEach(t=>{t.removeImageLayer(),t=null}),this.staticMap.clear(),this.bboxMap.clear(),this.bbox=[],this.bboxGCJ02=[],this.bboxMapGCJ02.clear()},selectGPSAll(t){this.staticMap.forEach(e=>{e.selectGPS(t)})},showAll(){this.staticMap.forEach(t=>t.show()),this.restFit&&this._restFit()},hideAll(){this.staticMap.forEach(t=>t.hide())},_isShow(t){const e=t.id;if(this.staticMap.has(e)){const n=this.staticMap.get(e);if(t.show)return void n.show();n.hide()}}}},rc=oc,sc=$s(rc,ec,nc,!1,null,null,null),ac=sc.exports;ac.install=t=>{t.install(ac.name,ac)};var lc=ac,hc=function(){var t=this,e=t._self._c;return e("div")},cc=[];class uc extends ba{constructor(...t){super(...t),Zs(this,"model",{type:Object,default:()=>null}),Zs(this,"isShow",{type:Boolean,default:!0}),Zs(this,"clear",{type:Boolean,default:!1}),Zs(this,"isFit",{type:Boolean,default:!0})}}var pc={name:"RyStaticLayer",props:{...new uc},data(){return{bbox:[],bboxGCJ02:[],staticImg:null,lastType:-1}},watch:{model(t){this._remove(),t&&this.init(t)},gpsType(t){this.lastType!=t&&(this.gpsType=t,this.lastType=t,this.selectGPSAll(this.gpsType))},clear(t){t&&this._remove()},isShow(t){this._isShow(t)}},created(){this.lastType=this.gpsType,this.init(this.model)},methods:{init(t){t&&(this._insert(t),this.isFit&&setTimeout(()=>{this.setFit()},50))},_insert(t){const{id:e,url:n,bbox:i,zIndex:o,projection:r}=t;let s="EPSG:4326";r instanceof Object&&(s=r);const a=new Ns["staticImage"]({id:e,url:n,imageExtent:i,zIndex:o,type:this.gpsType,projection:s},this.map);this.staticImg=a,this.setBBOXArr(i)},setBBOXArr(t){this.bbox.push(t);const e=this.convertBBoxGCJ02(t);this.bboxGCJ02.push(e)},setFit(){this.bbox.length&&this.map&&(this.bbox.length>1?Object(Ns["fitNew"])(this.map,1==this.gpsType?this.bboxGCJ02:this.bbox):this.setFitFist(1==this.gpsType?this.bboxGCJ02[0]:this.bbox[0]))},setFitFist(t){const e=[t[0],t[3],t[2],t[1]],n=[t[2],t[1],t[0],t[3]];Object(Ns["fitNew"])(this.map,[e,n])},convertBBoxGCJ02(t){const e=[],{lat:n,lon:i}=Ns["GPS"].gcj_encrypt(t[0],t[1]),{lon:o,lat:r}=Ns["GPS"].gcj_encrypt(t[2],t[3]);return e.push(i),e.push(n),e.push(o),e.push(r),e},_remove(){this.staticImg&&this.staticImg.removeImageLayer(),this.staticImg=null,this.bbox=[],this.bboxGCJ02=[]},selectGPSAll(t){this.staticImg&&this.staticImg.selectGPS(t)},_isShow(t){if(this.staticImg){const e=this.staticImg;if(t)return void e.show();e.hide()}}}},dc=pc,fc=$s(dc,hc,cc,!1,null,null,null),yc=fc.exports;yc.install=t=>{t.install(yc.name,yc)};var gc=yc,vc=function(){var t=this,e=t._self._c;return e("div")},mc=[];class _c extends ba{constructor(...t){super(...t),Zs(this,"modelArr",{type:Array,default:()=>[]}),Zs(this,"insert",{type:Object,default:()=>null}),Zs(this,"inserts",{type:Array,default:()=>[]}),Zs(this,"isShowAll",{type:Boolean,default:!0}),Zs(this,"isShow",{type:Object,default:()=>null}),Zs(this,"clear",{type:Boolean,default:!1})}}var bc={name:"RyWMSs",props:{...new _c},data(){return{wmsMap:new Map,isCreate:!0}},watch:{modelArr(t){this._remove()},insert(t){this._insert(t)},inserts(t){this._inserts(t)},clear(t){t&&this._remove()},isShowAll(t){t?this.showAll():this.hideAll()},isShow(t){t&&this._isShow(t)}},created(){this.modelArr.length?this.init(this.modelArr):this.inserts.length&&this.init(this.inserts)},methods:{init(t){t&&t.length&&t.forEach(t=>{this._insert(t)})},_inserts(t){t.forEach(t=>{this._insert(t,!1)})},_insert(t){if(!this.wmsMap.has(t.id)){const e=new Ns["LWMS"]({map:this.map,...t});this.wmsMap.set(t.id,e)}},_remove(){this.wmsMap.forEach(t=>t.removeLayer())},showAll(){this.wmsMap.forEach(t=>t.show())},hideAll(){this.wmsMap.forEach(t=>t.hide())},_isShow(t){const e=t.id;if(this.wmsMap.has(e)){const n=this.wmsMap.get(e);if(t.isShow)return void n.show();n.hide()}}}},wc=bc,Cc=$s(wc,vc,mc,!1,null,null,null),xc=Cc.exports;xc.install=t=>{t.install(xc.name,xc)};var Ec=xc,Mc=function(){var t=this,e=t._self._c;return e("div")},Pc=[];class Tc extends ba{constructor(...t){super(...t),Zs(this,"modelArr",{type:Array,default:()=>[]}),Zs(this,"insert",{type:Object,default:()=>null}),Zs(this,"inserts",{type:Array,default:()=>[]}),Zs(this,"isShowAll",{type:Boolean,default:!0}),Zs(this,"clear",{type:Boolean,default:!1}),Zs(this,"isShow",{type:Object,default:()=>null})}}var Ac={name:"RyWMTSs",props:{...new Tc},data(){return{wmtsMap:new Map,isCreate:!0}},watch:{modelArr(t){this._remove()},insert(t){this._insert(t)},inserts(t){this._inserts(t)},clear(t){t&&this._remove()},isShowAll(t){t?this.showAll():this.hideAll()},isShow(t){t&&this._isShow(t)}},created(){this.modelArr.length?this.init(this.modelArr):this.inserts.length&&this.init(this.inserts)},methods:{init(t){t&&t.length&&t.forEach(t=>{this._insert(t)})},_inserts(t){t.forEach(t=>{this._insert(t,!1)})},_insert(t){if(!this.wmtsMap.has(t.id)){console.log(t);const e=new Ns["LWMTS"](t.opt,t.params);this.wmtsMap.set(t.id,e)}},_remove(){this.wmtsMap.forEach(t=>t.removeLayer())},showAll(){this.wmtsMap.forEach(t=>t.show())},hideAll(){this.wmtsMap.forEach(t=>t.hide())},_isShow(t){const e=t.id;if(this.wmtsMap.has(e)){const n=this.wmtsMap.get(e);if(t.isShow)return void n.show();n.hide()}}}},Sc=Ac,Oc=$s(Sc,Mc,Pc,!1,null,null,null),Rc=Oc.exports;Rc.install=t=>{t.install(Rc.name,Rc)};var Lc=Rc;const Ic=[ya,ga,va,Pa,ka,Va,il,Wa,cl,_l,Oh,Gh,Xh,tc,lc,gc,Ec,Lc],kc=(t,e)=>{Ic.forEach(e=>{t.component(e.name,e)})};"undefined"!==typeof window&&window.Vue&&kc(window.Vue);var jc={install:kc};e["default"]=jc},fc6a:function(t,e,n){var i=n("44ad"),o=n("1d80");t.exports=function(t){return i(o(t))}},fdbf:function(t,e,n){var i=n("4930");t.exports=i&&!Symbol.sham&&"symbol"==typeof Symbol.iterator},fffc:function(t,e,n){"use strict";var i=n("23e7"),o=n("2266"),r=n("1c0b"),s=n("825a");i({target:"Iterator",proto:!0,real:!0},{find:function(t){return s(this),r(t),o(this,(function(e,n){if(t(e))return n(e)}),{IS_ITERATOR:!0,INTERRUPTED:!0}).result}})}})}));