(function(t,e){"object"===typeof exports&&"object"===typeof module?module.exports=e():"function"===typeof define&&define.amd?define([],e):"object"===typeof exports?exports["OlMapTool"]=e():t["OlMapTool"]=e()})("undefined"!==typeof self?self:this,(function(){return function(t){var e={};function n(r){if(e[r])return e[r].exports;var i=e[r]={i:r,l:!1,exports:{}};return t[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},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 r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var i in t)n.d(r,i,function(e){return t[e]}.bind(null,i));return r},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")}({0:function(t,e){},"00bb":function(t,e,n){(function(e,r,i){t.exports=r(n("21bf"),n("38ba"))})(0,(function(t){return t.mode.CFB=function(){var e=t.lib.BlockCipherMode.extend();function n(t,e,n,r){var i,o=this._iv;o?(i=o.slice(0),this._iv=void 0):i=this._prevBlock,r.encryptBlock(i,0);for(var s=0;s0?r:Math.max(c/l[0],s/l[1]),f=i+1,p=new Array(f),d=0;dw&&(h=(f+p)/2,Object(r["c"])(t,e,n,o,h,y)&&(E=h,w=x)),f=p}return isNaN(E)&&(E=s[a]),u?(u.push(E,y,w),u):[E,y,w]}function s(t,e,n,r,i){for(var s=[],a=0,u=n.length;ao&&(c|=r["a"].RIGHT),us&&(c|=r["a"].ABOVE),c===r["a"].UNKNOWN&&(c=r["a"].INTERSECTING),c}function d(){return[1/0,1/0,-1/0,-1/0]}function g(t,e,n,r,i){return i?(i[0]=t,i[1]=e,i[2]=n,i[3]=r,i):[t,e,n,r]}function y(t){return g(1/0,1/0,-1/0,-1/0,t)}function v(t,e){var n=t[0],r=t[1];return g(n,r,n,r,e)}function _(t,e,n,r,i){var o=y(i);return w(o,t,e,n,r)}function m(t,e){return t[0]==e[0]&&t[2]==e[2]&&t[1]==e[1]&&t[3]==e[3]}function b(t,e){return e[0]t[2]&&(t[2]=e[2]),e[1]t[3]&&(t[3]=e[3]),t}function E(t,e){e[0]t[2]&&(t[2]=e[0]),e[1]t[3]&&(t[3]=e[1])}function w(t,e,n,r,i){for(;ne[0]?r[0]=t[0]:r[0]=e[0],t[1]>e[1]?r[1]=t[1]:r[1]=e[1],t[2]=e[0]&&t[1]<=e[3]&&t[3]>=e[1]}function k(t){return t[2]=a&&v<=c),i||!(s&r["a"].RIGHT)||o&r["a"].RIGHT||(_=g-(d-c)*y,i=_>=u&&_<=l),i||!(s&r["a"].BELOW)||o&r["a"].BELOW||(v=d-(g-u)/y,i=v>=a&&v<=c),i||!(s&r["a"].LEFT)||o&r["a"].LEFT||(_=g-(d-a)*y,i=_>=u&&_<=l)}return i}function U(t,e,n,r){var i=[];if(r>1)for(var o=t[2]-t[0],a=t[3]-t[1],u=0;u=n[2])){var i=j(n),o=Math.floor((r[0]-n[0])/i),s=o*i;t[0]-=s,t[2]-=s}return t}function Y(t,e){if(e.canWrapX()){var n=e.getExtent();if(!isFinite(t[0])||!isFinite(t[2]))return[[n[0],t[1],n[2],t[3]]];z(t,e);var r=j(n);if(j(t)>r)return[[n[0],t[1],n[2],t[3]]];if(t[0]n[2])return[[t[0],t[1],n[2],t[3]],[n[0],t[1],t[2]-r,t[3]]]}return[t]}},"0b0e":function(t,e,n){"use strict";n.d(e,"a",(function(){return r})),n.d(e,"b",(function(){return i}));var r={imageSmoothingEnabled:!1,msImageSmoothingEnabled:!1},i={imageSmoothingEnabled:!0,msImageSmoothingEnabled:!0}},"0b2d":function(t,e,n){"use strict";var r=n("01d4");e["a"]={SINGLECLICK:"singleclick",CLICK:r["a"].CLICK,DBLCLICK:r["a"].DBLCLICK,POINTERDRAG:"pointerdrag",POINTERMOVE:"pointermove",POINTERDOWN:"pointerdown",POINTERUP:"pointerup",POINTEROVER:"pointerover",POINTEROUT:"pointerout",POINTERENTER:"pointerenter",POINTERLEAVE:"pointerleave",POINTERCANCEL:"pointercancel"}},"0cfb":function(t,e,n){var r=n("83ab"),i=n("d039"),o=n("cc12");t.exports=!r&&!i((function(){return 7!=Object.defineProperty(o("div"),"a",{get:function(){return 7}}).a}))},"0d26":function(t,e,n){var r=n("e330"),i=Error,o=r("".replace),s=function(t){return String(i(t).stack)}("zxcasd"),a=/\n\s*at [^:]*:[^\n]*/,u=a.test(s);t.exports=function(t,e){if(u&&"string"==typeof t&&!i.prepareStackTrace)while(e--)t=o(t,a,"");return t}},"0d51":function(t,e){var n=String;t.exports=function(t){try{return n(t)}catch(e){return"Object"}}},"0df5":function(t,e,n){"use strict";n("4cdf"),n("521b"),n("f403"),n("9a44"),n("7a09"),n("47e4"),n("88da"),n("5bc3");var r=n("a896"),i=n("0af5"),o=n("9f5e"),s=n("0a9d"),a=n("256f"),u=(n("4d98"),n("b1a2")),c=n("9159"),l=n("bef8"),h=Object(r["c"])(),f=function(){function t(t,e,n,r,i){this.styleFunction,this.extent_,this.id_=i,this.type_=t,this.flatCoordinates_=e,this.flatInteriorPoints_=null,this.flatMidpoints_=null,this.ends_=n,this.properties_=r}return t.prototype.get=function(t){return this.properties_[t]},t.prototype.getExtent=function(){return this.extent_||(this.extent_="Point"===this.type_?Object(i["m"])(this.flatCoordinates_):Object(i["n"])(this.flatCoordinates_,0,this.flatCoordinates_.length,2)),this.extent_},t.prototype.getFlatInteriorPoint=function(){if(!this.flatInteriorPoints_){var t=Object(i["w"])(this.getExtent());this.flatInteriorPoints_=Object(s["a"])(this.flatCoordinates_,0,this.ends_,2,t,0)}return this.flatInteriorPoints_},t.prototype.getFlatInteriorPoints=function(){if(!this.flatInteriorPoints_){var t=Object(c["a"])(this.flatCoordinates_,0,this.ends_,2);this.flatInteriorPoints_=Object(s["b"])(this.flatCoordinates_,0,this.ends_,2,t)}return this.flatInteriorPoints_},t.prototype.getFlatMidpoint=function(){return this.flatMidpoints_||(this.flatMidpoints_=Object(u["a"])(this.flatCoordinates_,0,this.flatCoordinates_.length,2,.5)),this.flatMidpoints_},t.prototype.getFlatMidpoints=function(){if(!this.flatMidpoints_){this.flatMidpoints_=[];for(var t=this.flatCoordinates_,e=0,n=this.ends_,r=0,i=n.length;r0)},e.prototype.removeEventListener=function(t,e){var n=this.listeners_&&this.listeners_[t];if(n){var r=n.indexOf(e);-1!==r&&(this.pendingRemovals_&&t in this.pendingRemovals_?(n[r]=o["c"],++this.pendingRemovals_[t]):(n.splice(r,1),0===n.length&&delete this.listeners_[t]))}},e}(r["a"]);e["a"]=u},"10b7":function(t,e,n){(function(e,r){t.exports=r(n("21bf"))})(0,(function(t){ /** @preserve (c) 2012 by Cédric Mesnil. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. - Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ return function(e){var n=t,r=n.lib,i=r.WordArray,o=r.Hasher,s=n.algo,a=i.create([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13]),u=i.create([5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11]),c=i.create([11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6]),l=i.create([8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11]),h=i.create([0,1518500249,1859775393,2400959708,2840853838]),f=i.create([1352829926,1548603684,1836072691,2053994217,0]),p=s.RIPEMD160=o.extend({_doReset:function(){this._hash=i.create([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(t,e){for(var n=0;n<16;n++){var r=e+n,i=t[r];t[r]=16711935&(i<<8|i>>>24)|4278255360&(i<<24|i>>>8)}var o,s,p,b,E,w,x,O,S,C,I,P=this._hash.words,R=h.words,T=f.words,L=a.words,M=u.words,N=c.words,A=l.words;w=o=P[0],x=s=P[1],O=p=P[2],S=b=P[3],C=E=P[4];for(n=0;n<80;n+=1)I=o+t[e+L[n]]|0,I+=n<16?d(s,p,b)+R[0]:n<32?g(s,p,b)+R[1]:n<48?y(s,p,b)+R[2]:n<64?v(s,p,b)+R[3]:_(s,p,b)+R[4],I|=0,I=m(I,N[n]),I=I+E|0,o=E,E=b,b=m(p,10),p=s,s=I,I=w+t[e+M[n]]|0,I+=n<16?_(x,O,S)+T[0]:n<32?v(x,O,S)+T[1]:n<48?y(x,O,S)+T[2]:n<64?g(x,O,S)+T[3]:d(x,O,S)+T[4],I|=0,I=m(I,A[n]),I=I+C|0,w=C,C=S,S=m(O,10),O=x,x=I;I=P[1]+p+S|0,P[1]=P[2]+b+C|0,P[2]=P[3]+E+w|0,P[3]=P[4]+o+x|0,P[4]=P[0]+s+O|0,P[0]=I},_doFinalize:function(){var t=this._data,e=t.words,n=8*this._nDataBytes,r=8*t.sigBytes;e[r>>>5]|=128<<24-r%32,e[14+(r+64>>>9<<4)]=16711935&(n<<8|n>>>24)|4278255360&(n<<24|n>>>8),t.sigBytes=4*(e.length+1),this._process();for(var i=this._hash,o=i.words,s=0;s<5;s++){var a=o[s];o[s]=16711935&(a<<8|a>>>24)|4278255360&(a<<24|a>>>8)}return i},clone:function(){var t=o.clone.call(this);return t._hash=this._hash.clone(),t}});function d(t,e,n){return t^e^n}function g(t,e,n){return t&e|~t&n}function y(t,e,n){return(t|~e)^n}function v(t,e,n){return t&n|e&~n}function _(t,e,n){return t^(e|~n)}function m(t,e){return t<>>32-e}n.RIPEMD160=o._createHelper(p),n.HmacRIPEMD160=o._createHmacHelper(p)}(Math),t.RIPEMD160}))},1132:function(t,e,n){(function(e,r){t.exports=r(n("21bf"))})(0,(function(t){return function(){var e=t,n=e.lib,r=n.WordArray,i=e.enc;i.Base64={stringify:function(t){var e=t.words,n=t.sigBytes,r=this._map;t.clamp();for(var i=[],o=0;o>>2]>>>24-o%4*8&255,a=e[o+1>>>2]>>>24-(o+1)%4*8&255,u=e[o+2>>>2]>>>24-(o+2)%4*8&255,c=s<<16|a<<8|u,l=0;l<4&&o+.75*l>>6*(3-l)&63));var h=r.charAt(64);if(h)while(i.length%4)i.push(h);return i.join("")},parse:function(t){var e=t.length,n=this._map,r=this._reverseMap;if(!r){r=this._reverseMap=[];for(var i=0;i>>6-s%4*2,c=a|u;i[o>>>2]|=c<<24-o%4*8,o++}return r.create(i,o)}}(),t.enc.Base64}))},1300:function(t,e,n){"use strict";function r(){return function(){throw new Error("Unimplemented abstract method.")}()}n.d(e,"b",(function(){return r})),n.d(e,"c",(function(){return o})),n.d(e,"a",(function(){return s}));var i=0;function o(t){return t.ol_uid||(t.ol_uid=String(++i))}var s="6.15.1"},"137e":function(t,e,n){"use strict";n.d(e,"a",(function(){return f}));var r=n("faf4"),i=n("3333"),o=n("070d"),s=n("a896"),a=n("5c38"),u=n("0af5"),c=n("0999"),l=n("9f5e"),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 r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),f=[],p=null;function d(){var t=document.createElement("canvas");t.width=1,t.height=1,p=t.getContext("2d")}var g=function(t){function e(e){var n=t.call(this,e)||this;return n.container=null,n.renderedResolution,n.tempTransform=Object(s["c"])(),n.pixelTransform=Object(s["c"])(),n.inversePixelTransform=Object(s["c"])(),n.context=null,n.containerReused=!1,n.pixelContext_=null,n.frameState=null,n}return h(e,t),e.prototype.getImageData=function(t,e,n){var r;p||d(),p.clearRect(0,0,1,1);try{p.drawImage(t,e,n,1,1,0,0,1,1),r=p.getImageData(0,0,1,1).data}catch(i){return p=null,null}return r},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 r,i,o=this.getLayer().getClassName();if(t&&t.className===o&&(!n||t&&t.style.backgroundColor&&Object(l["b"])(Object(a["a"])(t.style.backgroundColor),Object(a["a"])(n)))){var s=t.firstElementChild;s instanceof HTMLCanvasElement&&(i=s.getContext("2d"))}if(i&&i.canvas.style.transform===e?(this.container=t,this.context=i,this.containerReused=!0):this.containerReused&&(this.container=null,this.context=null,this.containerReused=!1),!this.container){r=document.createElement("div"),r.className=o;var u=r.style;u.position="absolute",u.width="100%",u.height="100%",i=Object(c["a"])();s=i.canvas;r.appendChild(s),u=s.style,u.position="absolute",u.left="0",u.transformOrigin="top left",this.container=r,this.context=i}this.containerReused||!n||this.container.style.backgroundColor||(this.container.style.backgroundColor=n)},e.prototype.clipUnrotated=function(t,e,n){var r=Object(u["C"])(n),i=Object(u["D"])(n),o=Object(u["v"])(n),a=Object(u["u"])(n);Object(s["a"])(e.coordinateToPixelTransform,r),Object(s["a"])(e.coordinateToPixelTransform,i),Object(s["a"])(e.coordinateToPixelTransform,o),Object(s["a"])(e.coordinateToPixelTransform,a);var c=this.inversePixelTransform;Object(s["a"])(c,r),Object(s["a"])(c,i),Object(s["a"])(c,o),Object(s["a"])(c,a),t.save(),t.beginPath(),t.moveTo(Math.round(r[0]),Math.round(r[1])),t.lineTo(Math.round(i[0]),Math.round(i[1])),t.lineTo(Math.round(o[0]),Math.round(o[1])),t.lineTo(Math.round(a[0]),Math.round(a[1])),t.clip()},e.prototype.dispatchRenderEvent_=function(t,e,n){var r=this.getLayer();if(r.hasListener(t)){var o=new i["a"](t,this.inversePixelTransform,n,e);r.dispatchEvent(o)}},e.prototype.preRender=function(t,e){this.frameState=e,this.dispatchRenderEvent_(o["a"].PRERENDER,t,e)},e.prototype.postRender=function(t,e){this.dispatchRenderEvent_(o["a"].POSTRENDER,t,e)},e.prototype.getRenderTransform=function(t,e,n,r,i,o,a){var u=i/2,c=o/2,l=r/e,h=-l,f=-t[0]+a,p=-t[1];return Object(s["b"])(this.tempTransform,u,c,l,h,-n,f,p)},e.prototype.getDataAtPixel=function(t,e,n){var r=Object(s["a"])(this.inversePixelTransform,t.slice()),i=this.context,o=this.getLayer(),a=o.getExtent();if(a){var c=Object(s["a"])(e.pixelToCoordinateTransform,t.slice());if(!Object(u["f"])(a,c))return null}var l,h=Math.round(r[0]),f=Math.round(r[1]),p=this.pixelContext_;if(!p){var d=document.createElement("canvas");d.width=1,d.height=1,p=d.getContext("2d"),this.pixelContext_=p}p.clearRect(0,0,1,1);try{p.drawImage(i.canvas,h,f,1,1,0,0,1,1),l=p.getImageData(0,0,1,1).data}catch(g){return"SecurityError"===g.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}(r["a"]);e["b"]=g},1382:function(t,e,n){(function(e,r,i){t.exports=r(n("21bf"),n("1132"),n("72fe"),n("2b79"),n("38ba"))})(0,(function(t){return function(){var e=t,n=e.lib,r=n.StreamCipher,i=e.algo,o=[],s=[],a=[],u=i.Rabbit=r.extend({_doReset:function(){for(var t=this._key.words,e=this.cfg.iv,n=0;n<4;n++)t[n]=16711935&(t[n]<<8|t[n]>>>24)|4278255360&(t[n]<<24|t[n]>>>8);var r=this._X=[t[0],t[3]<<16|t[2]>>>16,t[1],t[0]<<16|t[3]>>>16,t[2],t[1]<<16|t[0]>>>16,t[3],t[2]<<16|t[1]>>>16],i=this._C=[t[2]<<16|t[2]>>>16,4294901760&t[0]|65535&t[1],t[3]<<16|t[3]>>>16,4294901760&t[1]|65535&t[2],t[0]<<16|t[0]>>>16,4294901760&t[2]|65535&t[3],t[1]<<16|t[1]>>>16,4294901760&t[3]|65535&t[0]];this._b=0;for(n=0;n<4;n++)c.call(this);for(n=0;n<8;n++)i[n]^=r[n+4&7];if(e){var o=e.words,s=o[0],a=o[1],u=16711935&(s<<8|s>>>24)|4278255360&(s<<24|s>>>8),l=16711935&(a<<8|a>>>24)|4278255360&(a<<24|a>>>8),h=u>>>16|4294901760&l,f=l<<16|65535&u;i[0]^=u,i[1]^=h,i[2]^=l,i[3]^=f,i[4]^=u,i[5]^=h,i[6]^=l,i[7]^=f;for(n=0;n<4;n++)c.call(this)}},_doProcessBlock:function(t,e){var n=this._X;c.call(this),o[0]=n[0]^n[5]>>>16^n[3]<<16,o[1]=n[2]^n[7]>>>16^n[5]<<16,o[2]=n[4]^n[1]>>>16^n[7]<<16,o[3]=n[6]^n[3]>>>16^n[1]<<16;for(var r=0;r<4;r++)o[r]=16711935&(o[r]<<8|o[r]>>>24)|4278255360&(o[r]<<24|o[r]>>>8),t[e+r]^=o[r]},blockSize:4,ivSize:2});function c(){for(var t=this._X,e=this._C,n=0;n<8;n++)s[n]=e[n];e[0]=e[0]+1295307597+this._b|0,e[1]=e[1]+3545052371+(e[0]>>>0>>0?1:0)|0,e[2]=e[2]+886263092+(e[1]>>>0>>0?1:0)|0,e[3]=e[3]+1295307597+(e[2]>>>0>>0?1:0)|0,e[4]=e[4]+3545052371+(e[3]>>>0>>0?1:0)|0,e[5]=e[5]+886263092+(e[4]>>>0>>0?1:0)|0,e[6]=e[6]+1295307597+(e[5]>>>0>>0?1:0)|0,e[7]=e[7]+3545052371+(e[6]>>>0>>0?1:0)|0,this._b=e[7]>>>0>>0?1:0;for(n=0;n<8;n++){var r=t[n]+e[n],i=65535&r,o=r>>>16,u=((i*i>>>17)+i*o>>>15)+o*o,c=((4294901760&r)*r|0)+((65535&r)*r|0);a[n]=u^c}t[0]=a[0]+(a[7]<<16|a[7]>>>16)+(a[6]<<16|a[6]>>>16)|0,t[1]=a[1]+(a[0]<<8|a[0]>>>24)+a[7]|0,t[2]=a[2]+(a[1]<<16|a[1]>>>16)+(a[0]<<16|a[0]>>>16)|0,t[3]=a[3]+(a[2]<<8|a[2]>>>24)+a[1]|0,t[4]=a[4]+(a[3]<<16|a[3]>>>16)+(a[2]<<16|a[2]>>>16)|0,t[5]=a[5]+(a[4]<<8|a[4]>>>24)+a[3]|0,t[6]=a[6]+(a[5]<<16|a[5]>>>16)+(a[4]<<16|a[4]>>>16)|0,t[7]=a[7]+(a[6]<<8|a[6]>>>24)+a[5]|0}e.Rabbit=r._createHelper(u)}(),t.Rabbit}))},"13d2":function(t,e,n){var r=n("e330"),i=n("d039"),o=n("1626"),s=n("1a2d"),a=n("83ab"),u=n("5e77").CONFIGURABLE,c=n("8925"),l=n("69f3"),h=l.enforce,f=l.get,p=String,d=Object.defineProperty,g=r("".slice),y=r("".replace),v=r([].join),_=a&&!i((function(){return 8!==d((function(){}),"length",{value:8}).length})),m=String(String).split("String"),b=t.exports=function(t,e,n){"Symbol("===g(p(e),0,7)&&(e="["+y(p(e),/^Symbol\(([^)]*)\)/,"$1")+"]"),n&&n.getter&&(e="get "+e),n&&n.setter&&(e="set "+e),(!s(t,"name")||u&&t.name!==e)&&(a?d(t,"name",{value:e,configurable:!0}):t.name=e),_&&n&&s(n,"arity")&&t.length!==n.arity&&d(t,"length",{value:n.arity});try{n&&s(n,"constructor")&&n.constructor?a&&d(t,"prototype",{writable:!1}):t.prototype&&(t.prototype=void 0)}catch(i){}var r=h(t);return s(r,"source")||(r.source=v(m,"string"==typeof e?e:"")),t};Function.prototype.toString=b((function(){return o(this)&&f(this).source||c(this)}),"toString")},"14d9":function(t,e,n){"use strict";var r=n("23e7"),i=n("7b0b"),o=n("07fa"),s=n("3a34"),a=n("3511"),u=n("d039"),c=u((function(){return 4294967297!==[].push.call({length:4294967296},1)})),l=function(){try{Object.defineProperty([],"length",{writable:!1}).push()}catch(t){return t instanceof TypeError}},h=c||!l();r({target:"Array",proto:!0,arity:1,forced:h},{push:function(t){var e=i(this),n=o(e),r=arguments.length;a(n+r);for(var u=0;u>>2]|=t[r]<<24-r%4*8;i.call(this,n,e)}else i.apply(this,arguments)};o.prototype=r}}(),t.lib.WordArray}))},"183a":function(t,e,n){"use strict";e["a"]={ADD:"add",REMOVE:"remove"}},"191b":function(t,e,n){(function(e,r,i){t.exports=r(n("21bf"),n("94f8"))})(0,(function(t){return function(){var e=t,n=e.lib,r=n.WordArray,i=e.algo,o=i.SHA256,s=i.SHA224=o.extend({_doReset:function(){this._hash=new r.init([3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428])},_doFinalize:function(){var t=o._doFinalize.call(this);return t.sigBytes-=4,t}});e.SHA224=o._createHelper(s),e.HmacSHA224=o._createHmacHelper(s)}(),t.SHA224}))},"1a2d":function(t,e,n){var r=n("e330"),i=n("7b0b"),o=r({}.hasOwnProperty);t.exports=Object.hasOwn||function(t,e){return o(i(t),e)}},"1af9":function(t,e,n){"use strict";n.d(e,"b",(function(){return f}));var r=n("5564"),i=n("01d4"),o=n("df4c"),s=n("070d"),a=n("92fa"),u=n("38f3"),c=n("1e8d"),l=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 r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),h=function(t){function e(e){var n=this,r=Object(u["a"])({},e);delete r.source,n=t.call(this,r)||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(o["a"].SOURCE,n.handleSourcePropertyChange_);var i=e.source?e.source:null;return n.setSource(i),n}return l(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(o["a"].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_&&(Object(c["c"])(this.sourceChangeKey_),this.sourceChangeKey_=null);var t=this.getSource();t&&(this.sourceChangeKey_=Object(c["a"])(t,i["a"].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(o["a"].MAP,t)},e.prototype.getMapInternal=function(){return this.get(o["a"].MAP)},e.prototype.setMap=function(t){this.mapPrecomposeKey_&&(Object(c["c"])(this.mapPrecomposeKey_),this.mapPrecomposeKey_=null),t||this.changed(),this.mapRenderKey_&&(Object(c["c"])(this.mapRenderKey_),this.mapRenderKey_=null),t&&(this.mapPrecomposeKey_=Object(c["a"])(t,s["a"].PRECOMPOSE,(function(t){var e=t,n=e.frameState.layerStatesArray,r=this.getLayerState(!1);Object(a["a"])(!n.some((function(t){return t.layer===r.layer})),67),n.push(r)}),this),this.mapRenderKey_=Object(c["a"])(this,i["a"].CHANGE,t.render,t),this.changed())},e.prototype.setSource=function(t){this.set(o["a"].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}(r["a"]);function f(t,e){if(!t.visible)return!1;var n=e.resolution;if(n=t.maxResolution)return!1;var r=e.zoom;return r>t.minZoom&&r<=t.maxZoom}e["a"]=h},"1c48":function(t,e,n){"use strict";n.d(e,"a",(function(){return i})),n.d(e,"b",(function(){return o})),n.d(e,"e",(function(){return s})),n.d(e,"c",(function(){return u})),n.d(e,"d",(function(){return c}));var r=n("7fc9");function i(t,e,n,i,o,s,a){var u=(n-e)/i;if(u<3){for(;e0){for(var f=l.pop(),p=l.pop(),d=0,g=t[p],y=t[p+1],v=t[f],_=t[f+1],m=p+i;md&&(h=m,d=w)}d>o&&(c[(h-e)/i]=1,p+i0&&y>d)&&(g<0&&v0&&v>g)?(u=f,c=p):(o[a++]=u,o[a++]=c,l=u,h=c,u=f,c=p)}}return o[a++]=u,o[a++]=c,a}function u(t,e,n,r,i,o,s,u){for(var c=0,l=n.length;c0)throw new Error("Invalid string. Length must be a multiple of 4");var n=t.indexOf("=");-1===n&&(n=e);var r=n===e?0:4-n%4;return[n,r]}function l(t){var e=c(t),n=e[0],r=e[1];return 3*(n+r)/4-r}function h(t,e,n){return 3*(e+n)/4-n}function f(t){var e,n,r=c(t),s=r[0],a=r[1],u=new o(h(t,s,a)),l=0,f=a>0?s-4:s;for(n=0;n>16&255,u[l++]=e>>8&255,u[l++]=255&e;return 2===a&&(e=i[t.charCodeAt(n)]<<2|i[t.charCodeAt(n+1)]>>4,u[l++]=255&e),1===a&&(e=i[t.charCodeAt(n)]<<10|i[t.charCodeAt(n+1)]<<4|i[t.charCodeAt(n+2)]>>2,u[l++]=e>>8&255,u[l++]=255&e),u}function p(t){return r[t>>18&63]+r[t>>12&63]+r[t>>6&63]+r[63&t]}function d(t,e,n){for(var r,i=[],o=e;ou?u:a+s));return 1===i?(e=t[n-1],o.push(r[e>>2]+r[e<<4&63]+"==")):2===i&&(e=(t[n-2]<<8)+t[n-1],o.push(r[e>>10]+r[e>>4&63]+r[e<<2&63]+"=")),o.join("")}i["-".charCodeAt(0)]=62,i["_".charCodeAt(0)]=63},"21bf":function(t,e,n){(function(e){(function(e,n){t.exports=n()})(0,(function(){var t=t||function(t,r){var i;if("undefined"!==typeof window&&window.crypto&&(i=window.crypto),"undefined"!==typeof self&&self.crypto&&(i=self.crypto),"undefined"!==typeof globalThis&&globalThis.crypto&&(i=globalThis.crypto),!i&&"undefined"!==typeof window&&window.msCrypto&&(i=window.msCrypto),!i&&"undefined"!==typeof e&&e.crypto&&(i=e.crypto),!i)try{i=n(0)}catch(v){}var o=function(){if(i){if("function"===typeof i.getRandomValues)try{return i.getRandomValues(new Uint32Array(1))[0]}catch(v){}if("function"===typeof i.randomBytes)try{return i.randomBytes(4).readInt32LE()}catch(v){}}throw new Error("Native crypto module could not be used to get secure random number.")},s=Object.create||function(){function t(){}return function(e){var n;return t.prototype=e,n=new t,t.prototype=null,n}}(),a={},u=a.lib={},c=u.Base=function(){return{extend:function(t){var e=s(this);return t&&e.mixIn(t),e.hasOwnProperty("init")&&this.init!==e.init||(e.init=function(){e.$super.init.apply(this,arguments)}),e.init.prototype=e,e.$super=this,e},create:function(){var t=this.extend();return t.init.apply(t,arguments),t},init:function(){},mixIn:function(t){for(var e in t)t.hasOwnProperty(e)&&(this[e]=t[e]);t.hasOwnProperty("toString")&&(this.toString=t.toString)},clone:function(){return this.init.prototype.extend(this)}}}(),l=u.WordArray=c.extend({init:function(t,e){t=this.words=t||[],this.sigBytes=e!=r?e:4*t.length},toString:function(t){return(t||f).stringify(this)},concat:function(t){var e=this.words,n=t.words,r=this.sigBytes,i=t.sigBytes;if(this.clamp(),r%4)for(var o=0;o>>2]>>>24-o%4*8&255;e[r+o>>>2]|=s<<24-(r+o)%4*8}else for(var a=0;a>>2]=n[a>>>2];return this.sigBytes+=i,this},clamp:function(){var e=this.words,n=this.sigBytes;e[n>>>2]&=4294967295<<32-n%4*8,e.length=t.ceil(n/4)},clone:function(){var t=c.clone.call(this);return t.words=this.words.slice(0),t},random:function(t){for(var e=[],n=0;n>>2]>>>24-i%4*8&255;r.push((o>>>4).toString(16)),r.push((15&o).toString(16))}return r.join("")},parse:function(t){for(var e=t.length,n=[],r=0;r>>3]|=parseInt(t.substr(r,2),16)<<24-r%8*4;return new l.init(n,e/2)}},p=h.Latin1={stringify:function(t){for(var e=t.words,n=t.sigBytes,r=[],i=0;i>>2]>>>24-i%4*8&255;r.push(String.fromCharCode(o))}return r.join("")},parse:function(t){for(var e=t.length,n=[],r=0;r>>2]|=(255&t.charCodeAt(r))<<24-r%4*8;return new l.init(n,e)}},d=h.Utf8={stringify:function(t){try{return decodeURIComponent(escape(p.stringify(t)))}catch(e){throw new Error("Malformed UTF-8 data")}},parse:function(t){return p.parse(unescape(encodeURIComponent(t)))}},g=u.BufferedBlockAlgorithm=c.extend({reset:function(){this._data=new l.init,this._nDataBytes=0},_append:function(t){"string"==typeof t&&(t=d.parse(t)),this._data.concat(t),this._nDataBytes+=t.sigBytes},_process:function(e){var n,r=this._data,i=r.words,o=r.sigBytes,s=this.blockSize,a=4*s,u=o/a;u=e?t.ceil(u):t.max((0|u)-this._minBufferSize,0);var c=u*s,h=t.min(4*c,o);if(c){for(var f=0;f1?n:2,o=e;void 0===o&&(o=i>2?t.slice():new Array(r));for(var s=0;sh?c=h:c<-h&&(c=-h),o[s+1]=c}return o}function g(t,e,n){var r=t.length,i=n>1?n:2,o=e;void 0===o&&(o=i>2?t.slice():new Array(r));for(var s=0;s=-180&&t[0]<=180&&t[1]>=-90&&t[1]<=90&&(L=!1,console.warn("Call useGeographic() from ol/proj once to work with [longitude, latitude] coordinates.")),t)}function J(t,e){return W?q(t,e,W):t}function Q(t,e){return W?q(t,W,e):t}function $(t,e){if(!W)return t;var n=D(e).getUnits(),i=W.getUnits();return n&&i?t*r["a"][n]/r["a"][i]:t}function tt(t,e){if(!W)return t;var n=D(e).getUnits(),i=W.getUnits();return n&&i?t*r["a"][i]/r["a"][n]:t}function et(){G(p),G(E),B(E,p,d,g)}et()},"25a5":function(t,e,n){!function(e,n){t.exports=n()}(0,(function(){"use strict";function t(t,r,i,o,s){!function t(n,r,i,o,s){for(;o>i;){if(o-i>600){var a=o-i+1,u=r-i+1,c=Math.log(a),l=.5*Math.exp(2*c/3),h=.5*Math.sqrt(c*l*(a-l)/a)*(u-a/2<0?-1:1),f=Math.max(i,Math.floor(r-u*l/a+h)),p=Math.min(o,Math.floor(r+(a-u)*l/a+h));t(n,r,f,p,s)}var d=n[r],g=i,y=o;for(e(n,i,r),s(n[o],d)>0&&e(n,i,o);g0;)y--}0===s(n[i],d)?e(n,i,y):e(n,++y,o),y<=r&&(i=y+1),r<=y&&(o=y-1)}}(t,r,i||0,o||t.length-1,s||n)}function e(t,e,n){var r=t[e];t[e]=t[n],t[n]=r}function n(t,e){return te?1:0}var r=function(t){void 0===t&&(t=9),this._maxEntries=Math.max(4,t),this._minEntries=Math.max(2,Math.ceil(.4*this._maxEntries)),this.clear()};function i(t,e,n){if(!n)return e.indexOf(t);for(var r=0;r=t.minX&&e.maxY>=t.minY}function d(t){return{children:t,height:1,leaf:!0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}}function g(e,n,r,i,o){for(var s=[n,r];s.length;)if(!((r=s.pop())-(n=s.pop())<=i)){var a=n+Math.ceil((r-n)/i/2)*i;t(e,a,n,r,o),s.push(n,a,a,r)}}return r.prototype.all=function(){return this._all(this.data,[])},r.prototype.search=function(t){var e=this.data,n=[];if(!p(t,e))return n;for(var r=this.toBBox,i=[];e;){for(var o=0;o=0&&i[e].children.length>this._maxEntries;)this._split(i,e),e--;this._adjustParentBBoxes(r,i,e)},r.prototype._split=function(t,e){var n=t[e],r=n.children.length,i=this._minEntries;this._chooseSplitAxis(n,i,r);var s=this._chooseSplitIndex(n,i,r),a=d(n.children.splice(s,n.children.length-s));a.height=n.height,a.leaf=n.leaf,o(n,this.toBBox),o(a,this.toBBox),e?t[e-1].children.push(a):this._splitRoot(n,a)},r.prototype._splitRoot=function(t,e){this.data=d([t,e]),this.data.height=t.height+1,this.data.leaf=!1,o(this.data,this.toBBox)},r.prototype._chooseSplitIndex=function(t,e,n){for(var r,i,o,a,u,c,h,f=1/0,p=1/0,d=e;d<=n-e;d++){var g=s(t,0,d,this.toBBox),y=s(t,d,n,this.toBBox),v=(i=g,o=y,a=void 0,u=void 0,c=void 0,h=void 0,a=Math.max(i.minX,o.minX),u=Math.max(i.minY,o.minY),c=Math.min(i.maxX,o.maxX),h=Math.min(i.maxY,o.maxY),Math.max(0,c-a)*Math.max(0,h-u)),_=l(g)+l(y);v=e;p--){var d=t.children[p];a(u,t.leaf?i(d):d),c+=h(u)}return c},r.prototype._adjustParentBBoxes=function(t,e,n){for(var r=n;r>=0;r--)a(e[r],t)},r.prototype._condense=function(t){for(var e=t.length-1,n=void 0;e>=0;e--)0===t[e].children.length?e>0?(n=t[e-1].children).splice(n.indexOf(t[e]),1):this.clear():o(t[e],this.toBBox)},r}))},"25f1":function(t,e,n){"use strict";n.d(e,"a",(function(){return i})),n.d(e,"b",(function(){return o})),n.d(e,"c",(function(){return s})),n.d(e,"d",(function(){return a}));var r=n("0af5");function i(t,e,n,i,s){var a=Object(r["s"])(s,(function(r){return!o(t,e,n,i,r[0],r[1])}));return!a}function o(t,e,n,r,i,o){for(var s=0,a=t[n-r],u=t[n-r+1];eo&&(c-a)*(o-u)-(i-a)*(l-u)>0&&s++:l<=o&&(c-a)*(o-u)-(i-a)*(l-u)<0&&s--,a=c,u=l}return 0!==s}function s(t,e,n,r,i,s){if(0===n.length)return!1;if(!o(t,e,n[0],r,i,s))return!1;for(var a=1,u=n.length;a=0;n--){var h=o[n][0],f=Object(g["g"])(new a["a"](h).getExtent(),new a["a"](c).getExtent());if(f){o[n].push(c),l=!0;break}}l||o.push([c.reverse()])}return o}function C(t){var e;return e=void 0!==t.m&&void 0!==t.z?new h["a"]([t.x,t.y,t.z,t.m],i["a"].XYZM):void 0!==t.z?new h["a"]([t.x,t.y,t.z],i["a"].XYZ):void 0!==t.m?new h["a"]([t.x,t.y,t.m],i["a"].XYM):new h["a"]([t.x,t.y]),e}function I(t){var e=R(t);return new s["a"](t.paths[0],e)}function P(t){var e=R(t);return new u["a"](t.paths,e)}function R(t){var e=i["a"].XY;return!0===t.hasZ&&!0===t.hasM?e=i["a"].XYZM:!0===t.hasZ?e=i["a"].XYZ:!0===t.hasM&&(e=i["a"].XYM),e}function T(t){var e=R(t);return new c["a"](t.points,e)}function L(t){var e=R(t);return new l["a"](t.rings,e)}function M(t){var e=R(t);return new f["a"](t.rings,e)}function N(t,e){var n,r=t.getCoordinates(),o=t.getLayout();return o===i["a"].XYZ?n={x:r[0],y:r[1],z:r[2]}:o===i["a"].XYM?n={x:r[0],y:r[1],m:r[2]}:o===i["a"].XYZM?n={x:r[0],y:r[1],z:r[2],m:r[3]}:o===i["a"].XY?n={x:r[0],y:r[1]}:Object(p["a"])(!1,34),n}function A(t){var e=t.getLayout();return{hasZ:e===i["a"].XYZ||e===i["a"].XYZM,hasM:e===i["a"].XYM||e===i["a"].XYZM}}function F(t,e){var n=A(t);return{hasZ:n.hasZ,hasM:n.hasM,paths:[t.getCoordinates()]}}function j(t,e){var n=A(t);return{hasZ:n.hasZ,hasM:n.hasM,rings:t.getCoordinates(!1)}}function D(t,e){var n=A(t);return{hasZ:n.hasZ,hasM:n.hasM,paths:t.getCoordinates()}}function k(t,e){var n=A(t);return{hasZ:n.hasZ,hasM:n.hasM,points:t.getCoordinates()}}function G(t,e){for(var n=A(t),r=t.getCoordinates(!1),i=[],o=0;o=0;s--)i.push(r[o][s]);return{hasZ:n.hasZ,hasM:n.hasM,rings:i}}function B(t,e){var n=w[t.getType()];return n(Object(m["c"])(t,!0,e),e)}var U=x,z=n("a2e1"),Y=n("1300"),X=n("9f5e"),V="http://www.w3.org/2001/XMLSchema-instance";function q(t,e){return yt().createElementNS(t,e)}function W(t,e){return H(t,e,[]).join("")}function H(t,e,n){if(t.nodeType==Node.CDATA_SECTION_NODE||t.nodeType==Node.TEXT_NODE)e?n.push(String(t.nodeValue).replace(/(\r\n|\r|\n)/g,"")):n.push(t.nodeValue);else{var r=void 0;for(r=t.firstChild;r;r=r.nextSibling)H(r,e,n)}return n}function Z(t){return"documentElement"in t}function K(t,e,n){return t.getAttributeNS(e,n)||""}function J(t){return(new DOMParser).parseFromString(t,"application/xml")}function Q(t,e){return function(n,r){var i=t.call(void 0!==e?e:this,n,r);if(void 0!==i){var o=r[r.length-1];Object(X["c"])(o,i)}}}function $(t,e){return function(n,r){var i=t.call(void 0!==e?e:this,n,r);if(void 0!==i){var o=r[r.length-1];o.push(i)}}}function tt(t,e){return function(n,r){var i=t.call(void 0!==e?e:this,n,r);void 0!==i&&(r[r.length-1]=i)}}function et(t,e,n){return function(r,i){var o=t.call(void 0!==n?n:this,r,i);if(void 0!==o){var s=i[i.length-1],a=void 0!==e?e:r.localName,u=void 0;a in s?u=s[a]:(u=[],s[a]=u),u.push(o)}}}function nt(t,e,n){return function(r,i){var o=t.call(void 0!==n?n:this,r,i);if(void 0!==o){var s=i[i.length-1],a=void 0!==e?e:r.localName;s[a]=o}}}function rt(t,e){return function(n,r,i){t.call(void 0!==e?e:this,n,r,i);var o=i[i.length-1],s=o.node;s.appendChild(n)}}function it(t,e){var n,r;return function(e,i,o){if(void 0===n){n={};var s={};s[e.localName]=t,n[e.namespaceURI]=s,r=ot(e.localName)}ht(n,r,i,o)}}function ot(t,e){var n=t;return function(t,r,i){var o=r[r.length-1],s=o.node,a=n;void 0===a&&(a=i);var u=void 0!==e?e:s.namespaceURI;return q(u,a)}}var st=ot();function at(t,e){for(var n=e.length,r=new Array(n),i=0;i0?n[0]:null},e.prototype.readFeatureFromNode=function(t,e){return null},e.prototype.readFeatures=function(t,e){if(t){if("string"===typeof t){var n=J(t);return this.readFeaturesFromDocument(n,e)}return Z(t)?this.readFeaturesFromDocument(t,e):this.readFeaturesFromNode(t,e)}return[]},e.prototype.readFeaturesFromDocument=function(t,e){for(var n=[],r=t.firstChild;r;r=r.nextSibling)r.nodeType==Node.ELEMENT_NODE&&Object(X["c"])(n,this.readFeaturesFromNode(r,e));return n},e.prototype.readFeaturesFromNode=function(t,e){return Object(Y["b"])()},e.prototype.readGeometry=function(t,e){if(t){if("string"===typeof t){var n=J(t);return this.readGeometryFromDocument(n,e)}return Z(t)?this.readGeometryFromDocument(t,e):this.readGeometryFromNode(t,e)}return null},e.prototype.readGeometryFromDocument=function(t,e){return null},e.prototype.readGeometryFromNode=function(t,e){return null},e.prototype.readProjection=function(t){if(t){if("string"===typeof t){var e=J(t);return this.readProjectionFromDocument(e)}return Z(t)?this.readProjectionFromDocument(t):this.readProjectionFromNode(t)}return null},e.prototype.readProjectionFromDocument=function(t){return this.dataProjection},e.prototype.readProjectionFromNode=function(t){return this.dataProjection},e.prototype.writeFeature=function(t,e){var n=this.writeFeatureNode(t,e);return this.xmlSerializer_.serializeToString(n)},e.prototype.writeFeatureNode=function(t,e){return null},e.prototype.writeFeatures=function(t,e){var n=this.writeFeaturesNode(t,e);return this.xmlSerializer_.serializeToString(n)},e.prototype.writeFeaturesNode=function(t,e){return null},e.prototype.writeGeometry=function(t,e){var n=this.writeGeometryNode(t,e);return this.xmlSerializer_.serializeToString(n)},e.prototype.writeGeometryNode=function(t,e){return null},e}(m["a"]),mt=_t,bt=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 r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Et="http://www.opengis.net/gml",wt=/^[\s\xa0]*$/,xt=function(t){function e(e){var n=t.call(this)||this,r=e||{};return n.featureType=r.featureType,n.featureNS=r.featureNS,n.srsName=r.srsName,n.schemaLocation="",n.FEATURE_COLLECTION_PARSERS={},n.FEATURE_COLLECTION_PARSERS[n.namespace]={featureMember:$(n.readFeaturesInternal),featureMembers:tt(n.readFeaturesInternal)},n.supportedMediaTypes=["application/gml+xml"],n}return bt(e,t),e.prototype.readFeaturesInternal=function(t,e){var n=t.localName,r=null;if("FeatureCollection"==n)r=lt([],this.FEATURE_COLLECTION_PARSERS,t,e,this);else if("featureMembers"==n||"featureMember"==n||"member"==n){var i=e[0],o=i["featureType"],s=i["featureNS"],a="p",u="p0";if(!o&&t.childNodes){o=[],s={};for(var c=0,l=t.childNodes.length;c0){a={_content_:a};for(var l=0;l1,r=n&&t.imageInfo.profile[1].supports?t.imageInfo.profile[1].supports:[],i=n&&t.imageInfo.profile[1].formats?t.imageInfo.profile[1].formats:[],o=n&&t.imageInfo.profile[1].qualities?t.imageInfo.profile[1].qualities:[];return{url:t.imageInfo["@id"].replace(/\/?(?:info\.json)?$/g,""),sizes:void 0===t.imageInfo.sizes?void 0:t.imageInfo.sizes.map((function(t){return[t.width,t.height]})),tileSize:void 0===t.imageInfo.tiles?void 0:[t.imageInfo.tiles.map((function(t){return t.width}))[0],t.imageInfo.tiles.map((function(t){return void 0===t.height?t.width:t.height}))[0]],resolutions:void 0===t.imageInfo.tiles?void 0:t.imageInfo.tiles.map((function(t){return t.scaleFactors}))[0],supports:Je(Je([],e.supports,!0),r,!0),formats:Je(Je([],e.formats,!0),i,!0),qualities:Je(Je([],e.qualities,!0),o,!0)}}function sn(t){var e=t.getComplianceLevelSupportedFeatures(),n=void 0===t.imageInfo.extraFormats?e.formats:Je(Je([],e.formats,!0),t.imageInfo.extraFormats,!0),r=void 0!==t.imageInfo.preferredFormats&&Array.isArray(t.imageInfo.preferredFormats)&&t.imageInfo.preferredFormats.length>0?t.imageInfo.preferredFormats.filter((function(t){return Object(X["f"])(["jpg","png","gif"],t)})).reduce((function(t,e){return void 0===t&&Object(X["f"])(n,e)?e:t}),void 0):void 0;return{url:t.imageInfo["id"],sizes:void 0===t.imageInfo.sizes?void 0:t.imageInfo.sizes.map((function(t){return[t.width,t.height]})),tileSize:void 0===t.imageInfo.tiles?void 0:[t.imageInfo.tiles.map((function(t){return t.width}))[0],t.imageInfo.tiles.map((function(t){return t.height}))[0]],resolutions:void 0===t.imageInfo.tiles?void 0:t.imageInfo.tiles.map((function(t){return t.scaleFactors}))[0],supports:void 0===t.imageInfo.extraFeatures?e.supports:Je(Je([],e.supports,!0),t.imageInfo.extraFeatures,!0),formats:n,qualities:void 0===t.imageInfo.extraQualities?e.qualities:Je(Je([],e.qualities,!0),t.imageInfo.extraQualities,!0),preferredFormat:r}}var an={};an[Qe.VERSION1]=rn,an[Qe.VERSION2]=on,an[Qe.VERSION3]=sn;var un,cn,ln,hn,fn,pn,dn=function(){function t(t){this.setImageInfo(t)}return t.prototype.setImageInfo=function(t){this.imageInfo="string"==typeof t?JSON.parse(t):t},t.prototype.getImageApiVersion=function(){if(void 0!==this.imageInfo){var t=this.imageInfo["@context"]||"ol-no-context";"string"==typeof t&&(t=[t]);for(var e=0;e0&&"string"===typeof this.imageInfo.profile[0]&&en.test(this.imageInfo.profile[0]))return this.imageInfo.profile[0];break;default:}},t.prototype.getComplianceLevelFromProfile=function(t){var e=this.getComplianceLevelEntryFromProfile(t);if(void 0!==e){var n=e.match(/level[0-2](?:\.json)?$/g);return Array.isArray(n)?n[0].replace(".json",""):void 0}},t.prototype.getComplianceLevelSupportedFeatures=function(){if(void 0!==this.imageInfo){var t=this.getImageApiVersion(),e=this.getComplianceLevelFromProfile(t);return void 0===e?$e["none"]["none"]:$e[t][e]}},t.prototype.getTileSourceOptions=function(t){var e=t||{},n=this.getImageApiVersion();if(void 0!==n){var r=void 0===n?void 0:an[n](this);if(void 0!==r)return{url:r.url,version:n,size:[this.imageInfo.width,this.imageInfo.height],sizes:r.sizes,format:void 0!==e.format&&Object(X["f"])(r.formats,e.format)?e.format:void 0!==r.preferredFormat?r.preferredFormat:"jpg",supports:r.supports,quality:e.quality&&Object(X["f"])(r.qualities,e.quality)?e.quality:Object(X["f"])(r.qualities,"native")?"native":"default",resolutions:Array.isArray(r.resolutions)?r.resolutions.sort((function(t,e){return e-t})):void 0,tileSize:r.tileSize}}},t}(),gn=dn,yn=n("83a6"),vn=n("d352"),_n=n("6cbf"),mn=n("82b0"),bn=n("d202"),En=n("869f"),wn=n("8682"),xn=n("6c77"),On=n("8295"),Sn=n("5c38"),Cn=n("7fc9"),In=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 r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Pn=["http://www.google.com/kml/ext/2.2"],Rn=[null,"http://earth.google.com/kml/2.0","http://earth.google.com/kml/2.1","http://earth.google.com/kml/2.2","http://www.opengis.net/kml/2.2"],Tn="http://www.opengis.net/kml/2.2 https://developers.google.com/kml/schema/kml22gx.xsd",Ln={fraction:mn["a"].FRACTION,pixels:mn["a"].PIXELS,insetPixels:mn["a"].PIXELS},Mn=ut(Rn,{ExtendedData:Ur,Region:zr,MultiGeometry:nt(Lr,"geometry"),LineString:nt(Pr,"geometry"),LinearRing:nt(Rr,"geometry"),Point:nt(Mr,"geometry"),Polygon:nt(Ar,"geometry"),Style:nt(jr),StyleMap:Vr,address:nt(Nt),description:nt(Nt),name:nt(Nt),open:nt(Ct),phoneNumber:nt(Nt),styleUrl:nt(rr),visibility:nt(Ct)},ut(Pn,{MultiTrack:nt(br,"geometry"),Track:nt(wr,"geometry")})),Nn=ut(Rn,{ExtendedData:Ur,Region:zr,Link:ri,address:nt(Nt),description:nt(Nt),name:nt(Nt),open:nt(Ct),phoneNumber:nt(Nt),visibility:nt(Ct)}),An=ut(Rn,{href:nt(nr)}),Fn=ut(Rn,{LatLonAltBox:Kr,Lod:Qr}),jn=ut(Rn,["Document","Placemark"]),Dn=ut(Rn,{Document:rt(pi),Placemark:rt(zi)}),kn=null;var Gn,Bn=null;var Un,zn=null;var Yn=null;var Xn=null;var Vn,qn=null;function Wn(t){return 32/Math.min(t[0],t[1])}function Hn(){un=[255,255,255,1],kn=new yn["a"]({color:un}),cn=[20,2],ln=mn["a"].PIXELS,hn=mn["a"].PIXELS,fn=[64,64],pn="https://maps.google.com/mapfiles/kml/pushpin/ylw-pushpin.png",Bn=new _n["a"]({anchor:cn,anchorOrigin:bn["a"].BOTTOM_LEFT,anchorXUnits:ln,anchorYUnits:hn,crossOrigin:"anonymous",rotation:0,scale:Wn(fn),size:fn,src:pn}),Gn="NO_IMAGE",zn=new wn["a"]({color:un,width:1}),Un=new wn["a"]({color:[51,51,51,1],width:2}),Yn=new On["a"]({font:"bold 16px Helvetica",fill:kn,stroke:Un,scale:.8}),Xn=new xn["c"]({fill:kn,image:Bn,text:Yn,stroke:zn,zIndex:0}),qn=[Xn]}function Zn(t){return t}var Kn=function(t){function e(e){var n=t.call(this)||this,r=e||{};return qn||Hn(),n.dataProjection=Object(v["h"])("EPSG:4326"),n.defaultStyle_=r.defaultStyle?r.defaultStyle:qn,n.extractStyles_=void 0===r.extractStyles||r.extractStyles,n.writeStyles_=void 0===r.writeStyles||r.writeStyles,n.sharedStyles_={},n.showPointNames_=void 0===r.showPointNames||r.showPointNames,n.crossOrigin_=void 0!==r.crossOrigin?r.crossOrigin:"anonymous",n.iconUrlFunction_=r.iconUrlFunction?r.iconUrlFunction:Zn,n.supportedMediaTypes=["application/vnd.google-earth.kml+xml"],n}return In(e,t),e.prototype.readDocumentOrFolder_=function(t,e){var n=ut(Rn,{Document:Q(this.readDocumentOrFolder_,this),Folder:Q(this.readDocumentOrFolder_,this),Placemark:$(this.readPlacemark_,this),Style:this.readSharedStyle_.bind(this),StyleMap:this.readSharedStyleMap_.bind(this)}),r=lt([],n,t,e,this);return r||void 0},e.prototype.readPlacemark_=function(t,e){var n=lt({geometry:null},Mn,t,e,this);if(n){var i=new r["a"],o=t.getAttribute("id");null!==o&&i.setId(o);var s=e[0],a=n["geometry"];if(a&&Object(m["c"])(a,!1,s),i.setGeometry(a),delete n["geometry"],this.extractStyles_){var u=n["Style"],c=n["styleUrl"],l=Qn(u,c,this.defaultStyle_,this.sharedStyles_,this.showPointNames_);i.setStyle(l)}return delete n["Style"],i.setProperties(n,!0),i}},e.prototype.readSharedStyle_=function(t,e){var n=t.getAttribute("id");if(null!==n){var r=jr.call(this,t,e);if(r){var i=void 0,o=t.baseURI;if(o&&"about:blank"!=o||(o=window.location.href),o){var s=new URL("#"+n,o);i=s.href}else i="#"+n;this.sharedStyles_[i]=r}}},e.prototype.readSharedStyleMap_=function(t,e){var n=t.getAttribute("id");if(null!==n){var r=ar.call(this,t,e);if(r){var i,o=t.baseURI;if(o&&"about:blank"!=o||(o=window.location.href),o){var s=new URL("#"+n,o);i=s.href}else i="#"+n;this.sharedStyles_[i]=r}}},e.prototype.readFeatureFromNode=function(t,e){if(!Object(X["f"])(Rn,t.namespaceURI))return null;var n=this.readPlacemark_(t,[this.getReadOptions(t,e)]);return n||null},e.prototype.readFeaturesFromNode=function(t,e){if(!Object(X["f"])(Rn,t.namespaceURI))return[];var n,r=t.localName;if("Document"==r||"Folder"==r)return n=this.readDocumentOrFolder_(t,[this.getReadOptions(t,e)]),n||[];if("Placemark"==r){var i=this.readPlacemark_(t,[this.getReadOptions(t,e)]);return i?[i]:[]}if("kml"==r){n=[];for(var o=t.firstElementChild;o;o=o.nextElementSibling){var s=this.readFeaturesFromNode(o,e);s&&Object(X["c"])(n,s)}return n}return[]},e.prototype.readName=function(t){if(t){if("string"===typeof t){var e=J(t);return this.readNameFromDocument(e)}return Z(t)?this.readNameFromDocument(t):this.readNameFromNode(t)}},e.prototype.readNameFromDocument=function(t){for(var e=t.firstChild;e;e=e.nextSibling)if(e.nodeType==Node.ELEMENT_NODE){var n=this.readNameFromNode(e);if(n)return n}},e.prototype.readNameFromNode=function(t){for(var e=t.firstElementChild;e;e=e.nextElementSibling)if(Object(X["f"])(Rn,e.namespaceURI)&&"name"==e.localName)return Nt(e);for(e=t.firstElementChild;e;e=e.nextElementSibling){var n=e.localName;if(Object(X["f"])(Rn,e.namespaceURI)&&("Document"==n||"Folder"==n||"Placemark"==n||"kml"==n)){var r=this.readNameFromNode(e);if(r)return r}}},e.prototype.readNetworkLinks=function(t){var e=[];if("string"===typeof t){var n=J(t);Object(X["c"])(e,this.readNetworkLinksFromDocument(n))}else Z(t)?Object(X["c"])(e,this.readNetworkLinksFromDocument(t)):Object(X["c"])(e,this.readNetworkLinksFromNode(t));return e},e.prototype.readNetworkLinksFromDocument=function(t){for(var e=[],n=t.firstChild;n;n=n.nextSibling)n.nodeType==Node.ELEMENT_NODE&&Object(X["c"])(e,this.readNetworkLinksFromNode(n));return e},e.prototype.readNetworkLinksFromNode=function(t){for(var e=[],n=t.firstElementChild;n;n=n.nextElementSibling)if(Object(X["f"])(Rn,n.namespaceURI)&&"NetworkLink"==n.localName){var r=lt({},Nn,n,[]);e.push(r)}for(n=t.firstElementChild;n;n=n.nextElementSibling){var i=n.localName;!Object(X["f"])(Rn,n.namespaceURI)||"Document"!=i&&"Folder"!=i&&"kml"!=i||Object(X["c"])(e,this.readNetworkLinksFromNode(n))}return e},e.prototype.readRegion=function(t){var e=[];if("string"===typeof t){var n=J(t);Object(X["c"])(e,this.readRegionFromDocument(n))}else Z(t)?Object(X["c"])(e,this.readRegionFromDocument(t)):Object(X["c"])(e,this.readRegionFromNode(t));return e},e.prototype.readRegionFromDocument=function(t){for(var e=[],n=t.firstChild;n;n=n.nextSibling)n.nodeType==Node.ELEMENT_NODE&&Object(X["c"])(e,this.readRegionFromNode(n));return e},e.prototype.readRegionFromNode=function(t){for(var e=[],n=t.firstElementChild;n;n=n.nextElementSibling)if(Object(X["f"])(Rn,n.namespaceURI)&&"Region"==n.localName){var r=lt({},Fn,n,[]);e.push(r)}for(n=t.firstElementChild;n;n=n.nextElementSibling){var i=n.localName;!Object(X["f"])(Rn,n.namespaceURI)||"Document"!=i&&"Folder"!=i&&"kml"!=i||Object(X["c"])(e,this.readRegionFromNode(n))}return e},e.prototype.writeFeaturesNode=function(t,e){e=this.adaptOptions(e);var n=q(Rn[4],"kml"),r="http://www.w3.org/2000/xmlns/";n.setAttributeNS(r,"xmlns:gx",Pn[0]),n.setAttributeNS(r,"xmlns:xsi",V),n.setAttributeNS(V,"xsi:schemaLocation",Tn);var i={node:n},o={};t.length>1?o["Document"]=t:1==t.length&&(o["Placemark"]=t[0]);var s=jn[n.namespaceURI],a=at(o,s);return ft(i,Dn,st,a,[e],s,this),n},e}(mt);function Jn(t,e){var n=[0,0],r="start",i=t.getImage();if(i){var o=i.getSize();if(o&&2==o.length){var s=i.getScaleArray(),a=i.getAnchor();n[0]=s[0]*(o[0]-a[0]),n[1]=s[1]*(o[1]/2-a[1]),r="left"}}var u=t.getText();u?(u=u.clone(),u.setFont(u.getFont()||Yn.getFont()),u.setScale(u.getScale()||Yn.getScale()),u.setFill(u.getFill()||Yn.getFill()),u.setStroke(u.getStroke()||Un)):u=Yn.clone(),u.setText(e),u.setOffsetX(n[0]),u.setOffsetY(n[1]),u.setTextAlign(r);var c=new xn["c"]({image:i,text:u});return c}function Qn(t,e,n,r,i){return function(o,s){var a=i,u="",c=[];if(a){var l=o.getGeometry();if(l)if(l instanceof vn["a"])c=l.getGeometriesArrayRecursive().filter((function(t){var e=t.getType();return"Point"===e||"MultiPoint"===e})),a=c.length>0;else{var h=l.getType();a="Point"===h||"MultiPoint"===h}}a&&(u=o.get("name"),a=a&&!!u,a&&u.search(/&[^&]+;/)>-1&&(Vn||(Vn=document.createElement("textarea")),Vn.innerHTML=u,u=Vn.value));var f=n;if(t?f=t:e&&(f=$n(e,n,r)),a){var p=Jn(f[0],u);if(c.length>0){p.setGeometry(new vn["a"](c));var d=new xn["c"]({geometry:f[0].getGeometry(),image:null,fill:f[0].getFill(),stroke:f[0].getStroke(),text:null});return[p,d].concat(f.slice(1))}return p}return f}}function $n(t,e,n){return Array.isArray(t)?t:"string"===typeof t?$n(n[t],e,n):e}function tr(t){var e=W(t,!1),n=/^\s*#?\s*([0-9A-Fa-f]{8})\s*$/.exec(e);if(n){var r=n[1];return[parseInt(r.substr(6,2),16),parseInt(r.substr(4,2),16),parseInt(r.substr(2,2),16),parseInt(r.substr(0,2),16)/255]}}function er(t){var e=W(t,!1),n=[];e=e.replace(/\s*,\s*/g,",");var r,i=/^\s*([+\-]?\d*\.?\d+(?:e[+\-]?\d+)?),([+\-]?\d*\.?\d+(?:e[+\-]?\d+)?)(?:\s+|,|$)(?:([+\-]?\d*\.?\d+(?:e[+\-]?\d+)?)(?:\s+|$))?\s*/i;while(r=i.exec(e)){var o=parseFloat(r[1]),s=parseFloat(r[2]),a=r[3]?parseFloat(r[3]):0;n.push(o,s,a),e=e.substr(r[0].length)}if(""===e)return n}function nr(t){var e=W(t,!1).trim(),n=t.baseURI;if(n&&"about:blank"!=n||(n=window.location.href),n){var r=new URL(e,n);return r.href}return e}function rr(t){var e=W(t,!1).trim().replace(/^(?!.*#)/,"#"),n=t.baseURI;if(n&&"about:blank"!=n||(n=window.location.href),n){var r=new URL(e,n);return r.href}return e}function ir(t){var e,n=t.getAttribute("xunits"),r=t.getAttribute("yunits");return e="insetPixels"!==n?"insetPixels"!==r?bn["a"].BOTTOM_LEFT:bn["a"].TOP_LEFT:"insetPixels"!==r?bn["a"].BOTTOM_RIGHT:bn["a"].TOP_RIGHT,{x:parseFloat(t.getAttribute("x")),xunits:Ln[n],y:parseFloat(t.getAttribute("y")),yunits:Ln[r],origin:e}}function or(t){return Rt(t)}var sr=ut(Rn,{Pair:Xr});function ar(t,e){return lt(void 0,sr,t,e,this)}var ur=ut(Rn,{Icon:nt(Or),color:nt(tr),heading:nt(Rt),hotSpot:nt(ir),scale:nt(or)});function cr(t,e){var n=lt({},ur,t,e);if(n){var r,i,o,s,a=e[e.length-1],u="Icon"in n?n["Icon"]:{},c=!("Icon"in n)||Object.keys(u).length>0,l=u["href"];l?r=l:c&&(r=pn);var h,f=bn["a"].BOTTOM_LEFT,p=n["hotSpot"];p?(i=[p.x,p.y],o=p.xunits,s=p.yunits,f=p.origin):/^http:\/\/maps\.(?:google|gstatic)\.com\//.test(r)&&(/pushpin/.test(r)?(i=cn,o=ln,s=hn):/arrow-reverse/.test(r)?(i=[54,42],o=ln,s=hn):/paddle/.test(r)&&(i=[32,1],o=ln,s=hn));var d,g=u["x"],y=u["y"];void 0!==g&&void 0!==y&&(h=[g,y]);var v,_=u["w"],m=u["h"];void 0!==_&&void 0!==m&&(d=[_,m]);var b=n["heading"];void 0!==b&&(v=Object(Cn["l"])(b));var E=n["scale"],w=n["color"];if(c){r==pn&&(d=fn);var x=new _n["a"]({anchor:i,anchorOrigin:f,anchorXUnits:o,anchorYUnits:s,crossOrigin:this.crossOrigin_,offset:h,offsetOrigin:bn["a"].BOTTOM_LEFT,rotation:v,scale:E,size:d,src:this.iconUrlFunction_(r),color:w}),O=x.getScaleArray()[0],S=x.getSize();if(null===S){var C=x.getImageState();if(C===En["a"].IDLE||C===En["a"].LOADING){var I=function(){var t=x.getImageState();if(t!==En["a"].IDLE&&t!==En["a"].LOADING){var e=x.getSize();if(e&&2==e.length){var n=Wn(e);x.setScale(O*n)}x.unlistenImageChange(I)}};x.listenImageChange(I),C===En["a"].IDLE&&x.load()}}else if(2==S.length){var P=Wn(S);x.setScale(O*P)}a["imageStyle"]=x}else a["imageStyle"]=Gn}}var lr=ut(Rn,{color:nt(tr),scale:nt(or)});function hr(t,e){var n=lt({},lr,t,e);if(n){var r=e[e.length-1],i=new On["a"]({fill:new yn["a"]({color:"color"in n?n["color"]:un}),scale:n["scale"]});r["textStyle"]=i}}var fr=ut(Rn,{color:nt(tr),width:nt(Rt)});function pr(t,e){var n=lt({},fr,t,e);if(n){var r=e[e.length-1],i=new wn["a"]({color:"color"in n?n["color"]:un,width:"width"in n?n["width"]:1});r["strokeStyle"]=i}}var dr=ut(Rn,{color:nt(tr),fill:nt(Ct),outline:nt(Ct)});function gr(t,e){var n=lt({},dr,t,e);if(n){var r=e[e.length-1],i=new yn["a"]({color:"color"in n?n["color"]:un});r["fillStyle"]=i;var o=n["fill"];void 0!==o&&(r["fill"]=o);var s=n["outline"];void 0!==s&&(r["outline"]=s)}}var yr=ut(Rn,{coordinates:tt(er)});function vr(t,e){return lt(null,yr,t,e)}function _r(t,e){var n=e[e.length-1],r=n.coordinates,i=W(t,!1),o=/^\s*([+\-]?\d+(?:\.\d*)?(?:e[+\-]?\d*)?)\s+([+\-]?\d+(?:\.\d*)?(?:e[+\-]?\d*)?)\s+([+\-]?\d+(?:\.\d*)?(?:e[+\-]?\d*)?)\s*$/i,s=o.exec(i);if(s){var a=parseFloat(s[1]),u=parseFloat(s[2]),c=parseFloat(s[3]);r.push([a,u,c])}else r.push([])}var mr=ut(Pn,{Track:$(wr)});function br(t,e){var n=lt([],mr,t,e);if(n)return new u["a"](n)}var Er=ut(Rn,{when:ii},ut(Pn,{coord:_r}));function wr(t,e){var n=lt({coordinates:[],whens:[]},Er,t,e);if(n){for(var r=[],o=n.coordinates,a=n.whens,u=0,c=Math.min(o.length,a.length);u0){var r=e[e.length-1];r.push.apply(r,n)}}var ei=ut(Rn,{LinearRing:tt(vr)});function ni(t,e){var n=lt(void 0,ei,t,e);if(n){var r=e[e.length-1];r[0]=n}}function ri(t,e){ct(An,t,e)}function ii(t,e){var n=e[e.length-1],r=n.whens,i=W(t,!1),o=Date.parse(i);r.push(isNaN(o)?0:o)}function oi(t,e){for(var n=Object(Sn["a"])(e),r=4==n.length?n[3]:1,i=[255*r,n[2],n[1],n[0]],o=0;o<4;++o){var s=Math.floor(i[o]).toString(16);i[o]=1==s.length?"0"+s:s}Gt(t,i.join(""))}function si(t,e,n){var r,o=n[n.length-1],s=o["layout"],a=o["stride"];s==i["a"].XY||s==i["a"].XYM?r=2:s==i["a"].XYZ||s==i["a"].XYZM?r=3:Object(p["a"])(!1,34);var u=e.length,c="";if(u>0){c+=e[0];for(var l=1;l0){var v=at(i,s),_={names:s,values:v};ft(r,Gi,Ui,[_],n)}var b=n[0],E=e.getGeometry();E&&(E=Object(m["c"])(E,!0,b)),ft(r,Gi,Ti,[E],n)}var Yi=ut(Rn,["extrude","tessellate","altitudeMode","coordinates"]),Xi=ut(Rn,{extrude:rt(At),tessellate:rt(At),altitudeMode:rt(Gt),coordinates:rt(si)});function Vi(t,e,n){var r=e.getFlatCoordinates(),i={node:t};i["layout"]=e.getLayout(),i["stride"]=e.getStride();var o=e.getProperties();o.coordinates=r;var s=n[n.length-1].node,a=Yi[s.namespaceURI],u=at(o,a);ft(i,Xi,st,u,n,a)}var qi=ut(Rn,["color","fill","outline"]),Wi=ut(Rn,{outerBoundaryIs:rt(ki),innerBoundaryIs:rt(ki)}),Hi=ot("innerBoundaryIs"),Zi=ot("outerBoundaryIs");function Ki(t,e,n){var r=e.getLinearRings(),i=r.shift(),o={node:t};ft(o,Wi,Hi,r,n),ft(o,Wi,Zi,[i],n)}var Ji=ut(Rn,{color:rt(oi),fill:rt(At),outline:rt(At)});function Qi(t,e,n){var r={node:t},i=e.getFill(),o=e.getStroke(),s={color:i?i.getColor():void 0,fill:!!i&&void 0,outline:!!o&&void 0},a=n[n.length-1].node,u=qi[a.namespaceURI],c=at(s,u);ft(r,Ji,st,c,n,u)}function $i(t,e){Dt(t,Math.round(1e6*e)/1e6)}var to=ut(Rn,["IconStyle","LabelStyle","LineStyle","PolyStyle"]),eo=ut(Rn,{IconStyle:rt(wi),LabelStyle:rt(Si),LineStyle:rt(Pi),PolyStyle:rt(Qi)});function no(t,e,n){var r={node:t},i={};if(e.pointStyles.length){var o=e.pointStyles[0].getText();o&&(i["LabelStyle"]=o);var s=e.pointStyles[0].getImage();s&&"function"===typeof s.getSrc&&(i["IconStyle"]=s)}if(e.lineStyles.length){var a=e.lineStyles[0].getStroke();a&&(i["LineStyle"]=a)}if(e.polyStyles.length){a=e.polyStyles[0].getStroke();a&&!i["LineStyle"]&&(i["LineStyle"]=a),i["PolyStyle"]=e.polyStyles[0]}var u=n[n.length-1].node,c=to[u.namespaceURI],l=at(i,c);ft(r,eo,st,l,n,c)}function ro(t,e){t.setAttribute("x",String(e.x)),t.setAttribute("y",String(e.y)),t.setAttribute("xunits",e.xunits),t.setAttribute("yunits",e.yunits)}var io=Kn,oo=n("fdb7"),so=function(){function t(){}return t.prototype.read=function(t){if(t){if("string"===typeof t){var e=J(t);return this.readFromDocument(e)}return Z(t)?this.readFromDocument(t):this.readFromNode(t)}return null},t.prototype.readFromDocument=function(t){for(var e=t.firstChild;e;e=e.nextSibling)if(e.nodeType==Node.ELEMENT_NODE)return this.readFromNode(e);return null},t.prototype.readFromNode=function(t){},t}(),ao=so,uo="http://www.w3.org/1999/xlink";function co(t){return t.getAttributeNS(uo,"href")}var lo=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 r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),ho=[null,"http://www.opengis.net/ows/1.1"],fo=ut(ho,{ServiceIdentification:nt(ko),ServiceProvider:nt(Bo),OperationsMetadata:nt(jo)}),po=function(t){function e(){return t.call(this)||this}return lo(e,t),e.prototype.readFromNode=function(t){var e=lt({},fo,t,[]);return e||null},e}(ao),go=ut(ho,{DeliveryPoint:nt(Nt),City:nt(Nt),AdministrativeArea:nt(Nt),PostalCode:nt(Nt),Country:nt(Nt),ElectronicMailAddress:nt(Nt)}),yo=ut(ho,{Value:et(Uo)}),vo=ut(ho,{AllowedValues:nt(Ro)}),_o=ut(ho,{Phone:nt(Do),Address:nt(Po)}),mo=ut(ho,{HTTP:nt(Ao)}),bo=ut(ho,{Get:et(No),Post:void 0}),Eo=ut(ho,{DCP:nt(Mo)}),wo=ut(ho,{Operation:Fo}),xo=ut(ho,{Voice:nt(Nt),Facsimile:nt(Nt)}),Oo=ut(ho,{Constraint:et(To)}),So=ut(ho,{IndividualName:nt(Nt),PositionName:nt(Nt),ContactInfo:nt(Lo)}),Co=ut(ho,{Abstract:nt(Nt),AccessConstraints:nt(Nt),Fees:nt(Nt),Title:nt(Nt),ServiceTypeVersion:nt(Nt),ServiceType:nt(Nt)}),Io=ut(ho,{ProviderName:nt(Nt),ProviderSite:nt(co),ServiceContact:nt(Go)});function Po(t,e){return lt({},go,t,e)}function Ro(t,e){return lt({},yo,t,e)}function To(t,e){var n=t.getAttribute("name");if(n)return lt({name:n},vo,t,e)}function Lo(t,e){return lt({},_o,t,e)}function Mo(t,e){return lt({},mo,t,e)}function No(t,e){var n=co(t);if(n)return lt({href:n},Oo,t,e)}function Ao(t,e){return lt({},bo,t,e)}function Fo(t,e){var n=t.getAttribute("name"),r=lt({},Eo,t,e);if(r){var i=e[e.length-1];i[n]=r}}function jo(t,e){return lt({},wo,t,e)}function Do(t,e){return lt({},xo,t,e)}function ko(t,e){return lt({},Co,t,e)}function Go(t,e){return lt({},So,t,e)}function Bo(t,e){return lt({},Io,t,e)}function Uo(t,e){return Nt(t)}var zo=po;function Yo(t,e,n,r,i,o){var s,a;void 0!==i?(s=i,a=void 0!==o?o:0):(s=[],a=0);var u=e;while(u>1):i>>1}return e}function ts(t){for(var e="",n=0,r=t.length;n=32)e=63+(32|31&t),n+=String.fromCharCode(e),t>>=5;return e=t+63,n+=String.fromCharCode(e),n}var rs=Wo,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 r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),os=function(t){function e(e){var n=t.call(this)||this,r=e||{};return n.layerName_=r.layerName,n.layers_=r.layers?r.layers:null,n.dataProjection=Object(v["h"])(r.dataProjection?r.dataProjection:"EPSG:4326"),n}return is(e,t),e.prototype.readFeaturesFromObject=function(t,e){if("Topology"==t.type){var n=t,r=void 0,i=null,o=null;n["transform"]&&(r=n["transform"],i=r["scale"],o=r["translate"]);var s=n["arcs"];r&&ys(s,i,o);var a=[],u=n["objects"],c=this.layerName_,l=void 0;for(var h in u)this.layers_&&-1==this.layers_.indexOf(h)||("GeometryCollection"===u[h].type?(l=u[h],a.push.apply(a,ds(l,s,i,o,c,h,e))):(l=u[h],a.push(gs(l,s,i,o,c,h,e))));return a}return[]},e.prototype.readProjectionFromObject=function(t){return this.dataProjection},e}(o["a"]),ss={Point:us,LineString:ls,Polygon:fs,MultiPoint:cs,MultiLineString:hs,MultiPolygon:ps};function as(t,e){for(var n,r=[],i=0,o=t.length;i0&&r.pop(),n>=0)for(var s=e[n],a=0,u=s.length;a=0;--a)r.push(s[a].slice(0));return r}function us(t,e,n){var r=t["coordinates"];return e&&n&&_s(r,e,n),new h["a"](r)}function cs(t,e,n){var r=t["coordinates"];if(e&&n)for(var i=0,o=r.length;i=2,57),r}return Ss(e,t),e}(Os),Is=Cs,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 r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Rs=function(t){function e(e){return t.call(this,"And",Array.prototype.slice.call(arguments))||this}return Ps(e,t),e}(Is),Ts=Rs,Ls=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 r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Ms=function(t){function e(e,n,r){var i=t.call(this,"BBOX")||this;if(i.geometryName=e,i.extent=n,4!==n.length)throw new Error("Expected an extent with four values ([minX, minY, maxX, maxY])");return i.srsName=r,i}return Ls(e,t),e}(Os),Ns=Ms,As=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 r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Fs=function(t){function e(e,n,r,i){var o=t.call(this,e)||this;return o.geometryName=n||"the_geom",o.geometry=r,o.srsName=i,o}return As(e,t),e}(Os),js=Fs,Ds=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 r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),ks=(function(t){function e(e,n,r){return t.call(this,"Contains",e,n,r)||this}Ds(e,t)}(js),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 r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}()),Gs=(function(t){function e(e,n,r,i,o){var s=t.call(this,"DWithin",e,n,o)||this;return s.distance=r,s.unit=i,s}ks(e,t)}(js),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 r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}()),Bs=(function(t){function e(e,n,r){return t.call(this,"Disjoint",e,n,r)||this}Gs(e,t)}(js),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 r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}()),Us=function(t){function e(e,n){var r=t.call(this,e)||this;return r.propertyName=n,r}return Bs(e,t),e}(Os),zs=Us,Ys=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 r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Xs=(function(t){function e(e,n,r){var i=t.call(this,"During",e)||this;return i.begin=n,i.end=r,i}Ys(e,t)}(zs),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 r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}()),Vs=function(t){function e(e,n,r,i){var o=t.call(this,e,n)||this;return o.expression=r,o.matchCase=i,o}return Xs(e,t),e}(zs),qs=Vs,Ws=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 r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Hs=(function(t){function e(e,n,r){return t.call(this,"PropertyIsEqualTo",e,n,r)||this}Ws(e,t)}(qs),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 r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}()),Zs=(function(t){function e(e,n){return t.call(this,"PropertyIsGreaterThan",e,n)||this}Hs(e,t)}(qs),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 r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}()),Ks=(function(t){function e(e,n){return t.call(this,"PropertyIsGreaterThanOrEqualTo",e,n)||this}Zs(e,t)}(qs),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 r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}()),Js=(function(t){function e(e,n,r){return t.call(this,"Intersects",e,n,r)||this}Ks(e,t)}(js),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 r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}()),Qs=(function(t){function e(e,n,r){var i=t.call(this,"PropertyIsBetween",e)||this;return i.lowerBoundary=n,i.upperBoundary=r,i}Js(e,t)}(zs),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 r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}()),$s=(function(t){function e(e,n,r,i,o,s){var a=t.call(this,"PropertyIsLike",e)||this;return a.pattern=n,a.wildCard=void 0!==r?r:"*",a.singleChar=void 0!==i?i:".",a.escapeChar=void 0!==o?o:"!",a.matchCase=s,a}Qs(e,t)}(zs),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 r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}()),ta=(function(t){function e(e){return t.call(this,"PropertyIsNull",e)||this}$s(e,t)}(zs),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 r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}()),ea=(function(t){function e(e,n){return t.call(this,"PropertyIsLessThan",e,n)||this}ta(e,t)}(qs),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 r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}()),na=(function(t){function e(e,n){return t.call(this,"PropertyIsLessThanOrEqualTo",e,n)||this}ea(e,t)}(qs),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 r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}()),ra=(function(t){function e(e){var n=t.call(this,"Not")||this;return n.condition=e,n}na(e,t)}(Os),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 r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}()),ia=(function(t){function e(e,n,r){return t.call(this,"PropertyIsNotEqualTo",e,n,r)||this}ra(e,t)}(qs),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 r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}()),oa=(function(t){function e(e){return t.call(this,"Or",Array.prototype.slice.call(arguments))||this}ia(e,t)}(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 r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}()),sa=(function(t){function e(e){var n=t.call(this,"ResourceId")||this;return n.rid=e,n}oa(e,t)}(Os),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 r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}());(function(t){function e(e,n,r){return t.call(this,"Within",e,n,r)||this}sa(e,t)})(js);function aa(t){var e=[null].concat(Array.prototype.slice.call(arguments));return new(Function.prototype.bind.apply(Ts,e))}function ua(t,e,n){return new Ns(t,e,n)}var ca=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 r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),la={"http://www.opengis.net/gml":{boundedBy:nt(Ot.prototype.readExtentElement,"bounds")},"http://www.opengis.net/wfs/2.0":{member:$(Ot.prototype.readFeaturesInternal)}},ha={"http://www.opengis.net/wfs":{totalInserted:nt(Lt),totalUpdated:nt(Lt),totalDeleted:nt(Lt)},"http://www.opengis.net/wfs/2.0":{totalInserted:nt(Lt),totalUpdated:nt(Lt),totalDeleted:nt(Lt)}},fa={"http://www.opengis.net/wfs":{TransactionSummary:nt(Ca,"transactionSummary"),InsertResults:nt(Ta,"insertIds")},"http://www.opengis.net/wfs/2.0":{TransactionSummary:nt(Ca,"transactionSummary"),InsertResults:nt(Ta,"insertIds")}},pa={"http://www.opengis.net/wfs":{PropertyName:rt(Gt)},"http://www.opengis.net/wfs/2.0":{PropertyName:rt(Gt)}},da={"http://www.opengis.net/wfs":{Insert:rt(La),Update:rt(Fa),Delete:rt(Aa),Property:rt(ja),Native:rt(Da)},"http://www.opengis.net/wfs/2.0":{Insert:rt(La),Update:rt(Fa),Delete:rt(Aa),Property:rt(ja),Native:rt(Da)}},ga="feature",ya="http://www.w3.org/2000/xmlns/",va={"2.0.0":"http://www.opengis.net/ogc/1.1","1.1.0":"http://www.opengis.net/ogc","1.0.0":"http://www.opengis.net/ogc"},_a={"2.0.0":"http://www.opengis.net/wfs/2.0","1.1.0":"http://www.opengis.net/wfs","1.0.0":"http://www.opengis.net/wfs"},ma={"2.0.0":"http://www.opengis.net/fes/2.0","1.1.0":"http://www.opengis.net/fes","1.0.0":"http://www.opengis.net/fes"},ba={"2.0.0":"http://www.opengis.net/wfs/2.0 http://schemas.opengis.net/wfs/2.0/wfs.xsd","1.1.0":"http://www.opengis.net/wfs http://schemas.opengis.net/wfs/1.1.0/wfs.xsd","1.0.0":"http://www.opengis.net/wfs http://schemas.opengis.net/wfs/1.0.0/wfs.xsd"},Ea={"2.0.0":ws,"1.1.0":Zt,"1.0.0":Xt},wa="1.1.0",xa=function(t){function e(e){var n=t.call(this)||this,r=e||{};return n.version_=r.version?r.version:wa,n.featureType_=r.featureType,n.featureNS_=r.featureNS,n.gmlFormat_=r.gmlFormat?r.gmlFormat:new Ea[n.version_],n.schemaLocation_=r.schemaLocation?r.schemaLocation:ba[n.version_],n}return ca(e,t),e.prototype.getFeatureType=function(){return this.featureType_},e.prototype.setFeatureType=function(t){this.featureType_=t},e.prototype.readFeaturesFromNode=function(t,e){var n={node:t};Object(d["a"])(n,{featureType:this.featureType_,featureNS:this.featureNS_}),Object(d["a"])(n,this.getReadOptions(t,e||{}));var r,i=[n];r="2.0.0"===this.version_?la:this.gmlFormat_.FEATURE_COLLECTION_PARSERS;var o=lt([],r,t,i,this.gmlFormat_);return o||(o=[]),o},e.prototype.readTransactionResponse=function(t){if(t){if("string"===typeof t){var e=J(t);return this.readTransactionResponseFromDocument(e)}return Z(t)?this.readTransactionResponseFromDocument(t):this.readTransactionResponseFromNode(t)}},e.prototype.readFeatureCollectionMetadata=function(t){if(t){if("string"===typeof t){var e=J(t);return this.readFeatureCollectionMetadataFromDocument(e)}return Z(t)?this.readFeatureCollectionMetadataFromDocument(t):this.readFeatureCollectionMetadataFromNode(t)}},e.prototype.readFeatureCollectionMetadataFromDocument=function(t){for(var e=t.firstChild;e;e=e.nextSibling)if(e.nodeType==Node.ELEMENT_NODE)return this.readFeatureCollectionMetadataFromNode(e)},e.prototype.readFeatureCollectionMetadataFromNode=function(t){var e={},n=Mt(t.getAttribute("numberOfFeatures"));return e["numberOfFeatures"]=n,lt(e,la,t,[],this.gmlFormat_)},e.prototype.readTransactionResponseFromDocument=function(t){for(var e=t.firstChild;e;e=e.nextSibling)if(e.nodeType==Node.ELEMENT_NODE)return this.readTransactionResponseFromNode(e)},e.prototype.readTransactionResponseFromNode=function(t){return lt({},fa,t,[])},e.prototype.writeGetFeature=function(t){var e=this,n=q(_a[this.version_],"GetFeature");n.setAttribute("service","WFS"),n.setAttribute("version",this.version_),t.handle&&n.setAttribute("handle",t.handle),t.outputFormat&&n.setAttribute("outputFormat",t.outputFormat),void 0!==t.maxFeatures&&n.setAttribute("maxFeatures",String(t.maxFeatures)),t.resultType&&n.setAttribute("resultType",t.resultType),void 0!==t.startIndex&&n.setAttribute("startIndex",String(t.startIndex)),void 0!==t.count&&n.setAttribute("count",String(t.count)),void 0!==t.viewParams&&n.setAttribute("viewParams",t.viewParams),n.setAttributeNS(V,"xsi:schemaLocation",this.schemaLocation_);var r={node:n};if(Object(d["a"])(r,{version:this.version_,srsName:t.srsName,featureNS:t.featureNS?t.featureNS:this.featureNS_,featurePrefix:t.featurePrefix,propertyNames:t.propertyNames?t.propertyNames:[]}),Object(p["a"])(Array.isArray(t.featureTypes),11),"string"===typeof t.featureTypes[0]){var i=t.filter;t.bbox&&(Object(p["a"])(t.geometryName,12),i=this.combineBboxAndFilter(t.geometryName,t.bbox,t.srsName,i)),Object(d["a"])(r,{geometryName:t.geometryName,filter:i}),nu(n,t.featureTypes,[r])}else t.featureTypes.forEach((function(i){var o=e.combineBboxAndFilter(i.geometryName,i.bbox,t.srsName,t.filter);Object(d["a"])(r,{geometryName:i.geometryName,filter:o}),nu(n,[i.name],[r])}));return n},e.prototype.combineBboxAndFilter=function(t,e,n,r){var i=ua(t,e,n);return r?aa(r,i):i},e.prototype.writeTransaction=function(t,e,n,r){var i,o=[],s=r.version?r.version:this.version_,a=q(_a[s],"Transaction");a.setAttribute("service","WFS"),a.setAttribute("version",s),r&&(i=r.gmlOptions?r.gmlOptions:{},r.handle&&a.setAttribute("handle",r.handle)),a.setAttributeNS(V,"xsi:schemaLocation",ba[s]);var u=Oa(a,i,s,r);return t&&Sa("Insert",t,o,u),e&&Sa("Update",e,o,u),n&&Sa("Delete",n,o,u),r.nativeElements&&Sa("Native",r.nativeElements,o,u),a},e.prototype.readProjectionFromDocument=function(t){for(var e=t.firstChild;e;e=e.nextSibling)if(e.nodeType==Node.ELEMENT_NODE)return this.readProjectionFromNode(e);return null},e.prototype.readProjectionFromNode=function(t){if(t.firstElementChild&&t.firstElementChild.firstElementChild){t=t.firstElementChild.firstElementChild;for(var e=t.firstElementChild;e;e=e.nextElementSibling)if(0!==e.childNodes.length&&(1!==e.childNodes.length||3!==e.firstChild.nodeType)){var n=[{}];return this.gmlFormat_.readGeometryElement(e,n),Object(v["h"])(n.pop().srsName)}}return null},e}(mt);function Oa(t,e,n,r){var i,o=r.featurePrefix?r.featurePrefix:ga;"1.0.0"===n?i=2:"1.1.0"===n?i=3:"2.0.0"===n&&(i=3.2);var s=Object(d["a"])({node:t},{version:n,featureNS:r.featureNS,featureType:r.featureType,featurePrefix:o,gmlVersion:i,hasZ:r.hasZ,srsName:r.srsName},e);return s}function Sa(t,e,n,r){ft(r,da,ot(t),e,n)}function Ca(t,e){return lt({},ha,t,e)}var Ia={"http://www.opengis.net/ogc":{FeatureId:$((function(t,e){return t.getAttribute("fid")}))},"http://www.opengis.net/ogc/1.1":{FeatureId:$((function(t,e){return t.getAttribute("fid")}))}};function Pa(t,e){ct(Ia,t,e)}var Ra={"http://www.opengis.net/wfs":{Feature:Pa},"http://www.opengis.net/wfs/2.0":{Feature:Pa}};function Ta(t,e){return lt([],Ra,t,e)}function La(t,e,n){var r=n[n.length-1],i=r["featureType"],o=r["featureNS"],s=r["gmlVersion"],a=q(o,i);t.appendChild(a),2===s?Xt.prototype.writeFeatureElement(a,e,n):3===s?Zt.prototype.writeFeatureElement(a,e,n):ws.prototype.writeFeatureElement(a,e,n)}function Ma(t,e,n){var r=n[n.length-1],i=r["version"],o=va[i],s=q(o,"Filter"),a=q(o,"FeatureId");s.appendChild(a),a.setAttribute("fid",e),t.appendChild(s)}function Na(t,e){t=t||ga;var n=t+":";return 0===e.indexOf(n)?e:n+e}function Aa(t,e,n){var r=n[n.length-1];Object(p["a"])(void 0!==e.getId(),26);var i=r["featureType"],o=r["featurePrefix"],s=r["featureNS"],a=Na(o,i);t.setAttribute("typeName",a),t.setAttributeNS(ya,"xmlns:"+o,s);var u=e.getId();void 0!==u&&Ma(t,u,n)}function Fa(t,e,n){var r=n[n.length-1];Object(p["a"])(void 0!==e.getId(),27);var i=r["version"],o=r["featureType"],s=r["featurePrefix"],a=r["featureNS"],u=Na(s,o),c=e.getGeometryName();t.setAttribute("typeName",u),t.setAttributeNS(ya,"xmlns:"+s,a);var l=e.getId();if(void 0!==l){for(var h=e.getKeys(),f=[],d=0,g=h.length;d0,r=this.readUint32(n),i=Math.floor((268435455&r)/1e3),o=Boolean(2147483648&r)||1===i||3===i,s=Boolean(1073741824&r)||2===i||3===i,a=Boolean(536870912&r),u=(268435455&r)%1e3,c=["XY",o?"Z":"",s?"M":""].join(""),l=a?this.readUint32(n):null;if(void 0!==t&&t!==u)throw new Error("Unexpected WKB geometry type "+u);if(this.initialized_){if(this.isLittleEndian_!==n)throw new Error("Inconsistent endian");if(this.layout_!==c)throw new Error("Inconsistent geometry layout");if(l&&this.srid_!==l)throw new Error("Inconsistent coordinate system (SRID)")}else this.isLittleEndian_=n,this.hasZ_=o,this.hasM_=s,this.layout_=c,this.srid_=l,this.initialized_=!0;return u},t.prototype.readWkbPayload=function(t){switch(t){case su.POINT:return this.readPoint();case su.LINE_STRING:return this.readLineString();case su.POLYGON:case su.TRIANGLE:return this.readPolygon();case su.MULTI_POINT:return this.readMultiPoint();case su.MULTI_LINE_STRING:return this.readMultiLineString();case su.MULTI_POLYGON:case su.POLYHEDRAL_SURFACE:case su.TIN:return this.readMultiPolygon();case su.GEOMETRY_COLLECTION:return this.readGeometryCollection();default:throw new Error("Unsupported WKB geometry type "+t+" is found")}},t.prototype.readWkbBlock=function(t){return this.readWkbPayload(this.readWkbHeader(t))},t.prototype.readWkbCollection=function(t,e){for(var n=this.readUint32(),r=[],i=0;i=0&&(t+=this.isEWKB_?2147483648:1e3),this.layout_.indexOf("M")>=0&&(t+=this.isEWKB_?1073741824:2e3),this.isEWKB_&&Number.isInteger(e)&&(t|=536870912),this.writeUint8(this.isLittleEndian_?1:0),this.writeUint32(t),this.isEWKB_&&Number.isInteger(e)&&this.writeUint32(e)},t.prototype.writeMultiPoint=function(t,e){this.writeUint32(t.length);for(var n=0;n=0;n--)if(e[n>>>2]>>>24-n%4*8&255){t.sigBytes=n+1;break}}},t.pad.ZeroPadding}))},"2b79":function(t,e,n){(function(e,r,i){t.exports=r(n("21bf"),n("df2f"),n("5980"))})(0,(function(t){return function(){var e=t,n=e.lib,r=n.Base,i=n.WordArray,o=e.algo,s=o.MD5,a=o.EvpKDF=r.extend({cfg:r.extend({keySize:4,hasher:s,iterations:1}),init:function(t){this.cfg=this.cfg.extend(t)},compute:function(t,e){var n,r=this.cfg,o=r.hasher.create(),s=i.create(),a=s.words,u=r.keySize,c=r.iterations;while(a.lengthn||n>e.getMaxZoom())return!1;var o=e.getFullTileRange(n);return!o||o.containsXY(r,i)}n.d(e,"a",(function(){return r})),n.d(e,"d",(function(){return i})),n.d(e,"c",(function(){return o})),n.d(e,"b",(function(){return s})),n.d(e,"e",(function(){return a})),n.d(e,"f",(function(){return u}))},"2ce2":function(t,e,n){"use strict";var r=n("e300"),i=n("183a"),o=n("cef7"),s=n("4334"),a=n("3e6b"),u=n("57cb"),c=n("38f3"),l=n("6c77"),h=n("9f5e"),f=n("1300"),p=n("06f8"),d=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 r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),g={SELECT:"select"},y=function(t){function e(e,n,r,i){var o=t.call(this,e)||this;return o.selected=n,o.deselected=r,o.mapBrowserEvent=i,o}return d(e,t),e}(o["a"]),v={},_=function(t){function e(e){var n=t.call(this)||this;n.on,n.once,n.un;var i,o=e||{};if(n.boundAddFeature_=n.addFeature_.bind(n),n.boundRemoveFeature_=n.removeFeature_.bind(n),n.condition_=o.condition?o.condition:p["k"],n.addCondition_=o.addCondition?o.addCondition:p["g"],n.removeCondition_=o.removeCondition?o.removeCondition:p["g"],n.toggleCondition_=o.toggleCondition?o.toggleCondition:p["j"],n.multi_=!!o.multi&&o.multi,n.filter_=o.filter?o.filter:u["b"],n.hitTolerance_=o.hitTolerance?o.hitTolerance:0,n.style_=void 0!==o.style?o.style:m(),n.features_=o.features||new r["a"],o.layers)if("function"===typeof o.layers)i=o.layers;else{var s=o.layers;i=function(t){return Object(h["f"])(s,t)}}else i=u["b"];return n.layerFilter_=i,n.featureLayerAssociation_={},n}return d(e,t),e.prototype.addFeatureLayerAssociation_=function(t,e){this.featureLayerAssociation_[Object(f["c"])(t)]=e},e.prototype.getFeatures=function(){return this.features_},e.prototype.getHitTolerance=function(){return this.hitTolerance_},e.prototype.getLayer=function(t){return this.featureLayerAssociation_[Object(f["c"])(t)]},e.prototype.setHitTolerance=function(t){this.hitTolerance_=t},e.prototype.setMap=function(e){var n=this.getMap();n&&this.style_&&this.features_.forEach(this.restorePreviousStyle_.bind(this)),t.prototype.setMap.call(this,e),e?(this.features_.addEventListener(i["a"].ADD,this.boundAddFeature_),this.features_.addEventListener(i["a"].REMOVE,this.boundRemoveFeature_),this.style_&&this.features_.forEach(this.applySelectedStyle_.bind(this))):(this.features_.removeEventListener(i["a"].ADD,this.boundAddFeature_),this.features_.removeEventListener(i["a"].REMOVE,this.boundRemoveFeature_))},e.prototype.addFeature_=function(t){var e=t.element;if(this.style_&&this.applySelectedStyle_(e),!this.getLayer(e)){var n=this.getMap().getAllLayers().find((function(t){if(t instanceof a["a"]&&t.getSource()&&t.getSource().hasFeature(e))return t}));n&&this.addFeatureLayerAssociation_(e,n)}},e.prototype.removeFeature_=function(t){var e=t.element;this.style_&&this.restorePreviousStyle_(e)},e.prototype.getStyle=function(){return this.style_},e.prototype.applySelectedStyle_=function(t){var e=Object(f["c"])(t);e in v||(v[e]=t.getStyle()),t.setStyle(this.style_)},e.prototype.restorePreviousStyle_=function(t){for(var n=this.getMap().getInteractions().getArray(),r=n.length-1;r>=0;--r){var i=n[r];if(i!==this&&i instanceof e&&i.getStyle()&&-1!==i.getFeatures().getArray().lastIndexOf(t))return void t.setStyle(i.getStyle())}var o=Object(f["c"])(t);t.setStyle(v[o]),delete v[o]},e.prototype.removeFeatureLayerAssociation_=function(t){delete this.featureLayerAssociation_[Object(f["c"])(t)]},e.prototype.handleEvent=function(t){if(!this.condition_(t))return!0;var e=this.addCondition_(t),n=this.removeCondition_(t),r=this.toggleCondition_(t),i=!e&&!n&&!r,o=t.map,s=this.getFeatures(),a=[],u=[];if(i){Object(c["b"])(this.featureLayerAssociation_),o.forEachFeatureAtPixel(t.pixel,function(t,e){if(this.filter_(t,e))return this.addFeatureLayerAssociation_(t,e),u.push(t),!this.multi_}.bind(this),{layerFilter:this.layerFilter_,hitTolerance:this.hitTolerance_});for(var l=s.getLength()-1;l>=0;--l){var f=s.item(l),p=u.indexOf(f);p>-1?u.splice(p,1):(s.remove(f),a.push(f))}0!==u.length&&s.extend(u)}else{o.forEachFeatureAtPixel(t.pixel,function(t,i){if(this.filter_(t,i))return!e&&!r||Object(h["f"])(s.getArray(),t)?(n||r)&&Object(h["f"])(s.getArray(),t)&&(a.push(t),this.removeFeatureLayerAssociation_(t)):(this.addFeatureLayerAssociation_(t,i),u.push(t)),!this.multi_}.bind(this),{layerFilter:this.layerFilter_,hitTolerance:this.hitTolerance_});for(var d=a.length-1;d>=0;--d)s.remove(a[d]);s.extend(u)}return(u.length>0||a.length>0)&&this.dispatchEvent(new y(g.SELECT,u,a,t)),!0},e}(s["a"]);function m(){var t=Object(l["b"])();return Object(h["c"])(t["Polygon"],t["LineString"]),Object(h["c"])(t["GeometryCollection"],t["LineString"]),function(e){return e.getGeometry()?t[e.getGeometry().getType()]:null}}e["a"]=_},"2d00":function(t,e,n){var r,i,o=n("da84"),s=n("342f"),a=o.process,u=o.Deno,c=a&&a.versions||u&&u.version,l=c&&c.v8;l&&(r=l.split("."),i=r[0]>0&&r[0]<4?1:+(r[0]+r[1])),!i&&s&&(r=s.match(/Edge\/(\d+)/),(!r||r[1]>=74)&&(r=s.match(/Chrome\/(\d+)/),r&&(i=+r[1]))),t.exports=i},"2ef1":function(t,e,n){"use strict";var r=n("91b1"),i=n("089b"),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 r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),s=function(t){function e(e){var n=this,r=e||{},o=void 0===r.imageSmoothing||r.imageSmoothing;void 0!==r.interpolate&&(o=r.interpolate);var s=void 0!==r.projection?r.projection:"EPSG:3857",a=void 0!==r.tileGrid?r.tileGrid:Object(i["a"])({extent:Object(i["b"])(s),maxResolution:r.maxResolution,maxZoom:r.maxZoom,minZoom:r.minZoom,tileSize:r.tileSize});return n=t.call(this,{attributions:r.attributions,cacheSize:r.cacheSize,crossOrigin:r.crossOrigin,interpolate:o,opaque:r.opaque,projection:s,reprojectionErrorThreshold:r.reprojectionErrorThreshold,tileGrid:a,tileLoadFunction:r.tileLoadFunction,tilePixelRatio:r.tilePixelRatio,tileUrlFunction:r.tileUrlFunction,url:r.url,urls:r.urls,wrapX:void 0===r.wrapX||r.wrapX,transition:r.transition,attributionsCollapsible:r.attributionsCollapsible,zDirection:r.zDirection})||this,n.gutter_=void 0!==r.gutter?r.gutter:0,n}return o(e,t),e.prototype.getGutter=function(){return this.gutter_},e}(r["a"]);e["a"]=s},"2efc":function(t,e,n){"use strict";var r,i=n("a504"),o=n("01d4"),s=n("5e31"),a=n("acc1"),u=n("0af5"),c=n("256f"),l=n("7fc9"),h=10,f=.25,p=function(){function t(t,e,n,r,i,o){this.sourceProj_=t,this.targetProj_=e;var s={},a=Object(c["j"])(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_=r,this.errorThresholdSquared_=i*i,this.triangles_=[],this.wrapsXInSource_=!1,this.canWrapXInSource_=this.sourceProj_.canWrapX()&&!!r&&!!this.sourceProj_.getExtent()&&Object(u["E"])(r)==Object(u["E"])(this.sourceProj_.getExtent()),this.sourceWorldWidth_=this.sourceProj_.getExtent()?Object(u["E"])(this.sourceProj_.getExtent()):null,this.targetWorldWidth_=this.targetProj_.getExtent()?Object(u["E"])(this.targetProj_.getExtent()):null;var f=Object(u["C"])(n),p=Object(u["D"])(n),d=Object(u["v"])(n),g=Object(u["u"])(n),y=this.transformInv_(f),v=this.transformInv_(p),_=this.transformInv_(d),m=this.transformInv_(g),b=h+(o?Math.max(0,Math.ceil(Object(l["f"])(Object(u["t"])(n)/(o*o*256*256)))):0);if(this.addQuad_(f,p,d,g,y,v,_,m,b),this.wrapsXInSource_){var E=1/0;this.triangles_.forEach((function(t,e,n){E=Math.min(E,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])-E>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]-E>this.sourceWorldWidth_/2&&(e[0][0]-=this.sourceWorldWidth_),e[1][0]-E>this.sourceWorldWidth_/2&&(e[1][0]-=this.sourceWorldWidth_),e[2][0]-E>this.sourceWorldWidth_/2&&(e[2][0]-=this.sourceWorldWidth_);var n=Math.min(e[0][0],e[1][0],e[2][0]),r=Math.max(e[0][0],e[1][0],e[2][0]);r-n.5&&p<1,y=!1;if(c>0){if(this.targetProj_.isGlobal()&&this.targetWorldWidth_){var v=Object(u["b"])([t,e,n,r]),_=Object(u["E"])(v)/this.targetWorldWidth_;y=_>f||y}!g&&this.sourceProj_.isGlobal()&&p&&(y=p>f||y)}if(!(!y&&this.maxSourceExtent_&&isFinite(h[0])&&isFinite(h[1])&&isFinite(h[2])&&isFinite(h[3]))||Object(u["F"])(h,this.maxSourceExtent_)){var m=0;if(!y&&(!isFinite(i[0])||!isFinite(i[1])||!isFinite(o[0])||!isFinite(o[1])||!isFinite(s[0])||!isFinite(s[1])||!isFinite(a[0])||!isFinite(a[1])))if(c>0)y=!0;else if(m=(isFinite(i[0])&&isFinite(i[1])?0:8)+(isFinite(o[0])&&isFinite(o[1])?0:4)+(isFinite(s[0])&&isFinite(s[1])?0:2)+(isFinite(a[0])&&isFinite(a[1])?0:1),1!=m&&2!=m&&4!=m&&8!=m)return;if(c>0){if(!y){var b=[(t[0]+n[0])/2,(t[1]+n[1])/2],E=this.transformInv_(b),w=void 0;if(g){var x=(Object(l["g"])(i[0],d)+Object(l["g"])(s[0],d))/2;w=x-Object(l["g"])(E[0],d)}else w=(i[0]+s[0])/2-E[0];var O=(i[1]+s[1])/2-E[1],S=w*w+O*O;y=S>this.errorThresholdSquared_}if(y){if(Math.abs(t[0]-n[0])<=Math.abs(t[1]-n[1])){var C=[(e[0]+n[0])/2,(e[1]+n[1])/2],I=this.transformInv_(C),P=[(r[0]+t[0])/2,(r[1]+t[1])/2],R=this.transformInv_(P);this.addQuad_(t,e,C,P,i,o,I,R,c-1),this.addQuad_(P,C,n,r,R,I,s,a,c-1)}else{var T=[(t[0]+e[0])/2,(t[1]+e[1])/2],L=this.transformInv_(T),M=[(n[0]+r[0])/2,(n[1]+r[1])/2],N=this.transformInv_(M);this.addQuad_(t,T,M,r,i,L,N,a,c-1),this.addQuad_(T,e,n,M,L,o,s,N,c-1)}return}}if(g){if(!this.canWrapXInSource_)return;this.wrapsXInSource_=!0}0==(11&m)&&this.addTriangle_(t,n,r,i,s,a),0==(14&m)&&this.addTriangle_(t,n,e,i,s,o),m&&(0==(13&m)&&this.addTriangle_(e,r,t,o,a,i),0==(7&m)&&this.addTriangle_(e,r,n,o,a,s))}},t.prototype.calculateSourceExtent=function(){var t=Object(u["j"])();return this.triangles_.forEach((function(e,n,r){var i=e.source;Object(u["q"])(t,i[0]),Object(u["q"])(t,i[1]),Object(u["q"])(t,i[2])})),t},t.prototype.getTriangles=function(){return this.triangles_},t}(),d=p,g=n("0b0e"),y=n("38f3"),v=n("0999"),_=[];function m(t,e,n,r,i){t.beginPath(),t.moveTo(0,0),t.lineTo(e,n),t.lineTo(r,i),t.closePath(),t.save(),t.clip(),t.fillRect(0,0,Math.max(e,r)+1,Math.max(n,i)),t.restore()}function b(t,e){return Math.abs(t[4*e]-210)>2||Math.abs(t[4*e+3]-191.25)>2}function E(){if(void 0===r){var t=document.createElement("canvas").getContext("2d");t.globalCompositeOperation="lighter",t.fillStyle="rgba(210, 0, 0, 0.75)",m(t,4,5,4,0),m(t,4,5,0,5);var e=t.getImageData(0,0,3,3).data;r=b(e,0)||b(e,4)||b(e,8)}return r}function w(t,e,n,r){var i=Object(c["p"])(n,e,t),o=Object(c["i"])(e,r,n),s=e.getMetersPerUnit();void 0!==s&&(o*=s);var a=t.getMetersPerUnit();void 0!==a&&(o/=a);var l=t.getExtent();if(!l||Object(u["f"])(l,i)){var h=Object(c["i"])(t,o,i)/o;isFinite(h)&&h>0&&(o/=h)}return o}function x(t,e,n,r){var i=Object(u["w"])(n),o=w(t,e,i,r);return(!isFinite(o)||o<=0)&&Object(u["s"])(n,(function(n){return o=w(t,e,n,r),isFinite(o)&&o>0})),o}function O(t,e,n,r,i,o,s,a,c,h,f,p){var d=Object(v["a"])(Math.round(n*t),Math.round(n*e),_);if(p||Object(y["a"])(d,g["a"]),0===c.length)return d.canvas;function m(t){return Math.round(t*n)/n}d.scale(n,n),d.globalCompositeOperation="lighter";var b=Object(u["j"])();c.forEach((function(t,e,n){Object(u["p"])(b,t.extent)}));var w=Object(u["E"])(b),x=Object(u["z"])(b),O=Object(v["a"])(Math.round(n*w/r),Math.round(n*x/r));p||Object(y["a"])(O,g["a"]);var S=n/r;c.forEach((function(t,e,n){var r=t.extent[0]-b[0],i=-(t.extent[3]-b[3]),o=Object(u["E"])(t.extent),s=Object(u["z"])(t.extent);t.image.width>0&&t.image.height>0&&O.drawImage(t.image,h,h,t.image.width-2*h,t.image.height-2*h,r*S,i*S,o*S,s*S)}));var C=Object(u["C"])(s);return a.getTriangles().forEach((function(t,e,i){var s=t.source,a=t.target,u=s[0][0],c=s[0][1],h=s[1][0],f=s[1][1],g=s[2][0],y=s[2][1],v=m((a[0][0]-C[0])/o),_=m(-(a[0][1]-C[1])/o),w=m((a[1][0]-C[0])/o),x=m(-(a[1][1]-C[1])/o),S=m((a[2][0]-C[0])/o),I=m(-(a[2][1]-C[1])/o),P=u,R=c;u=0,c=0,h-=P,f-=R,g-=P,y-=R;var T=[[h,f,0,0,w-v],[g,y,0,0,S-v],[0,0,h,f,x-_],[0,0,g,y,I-_]],L=Object(l["h"])(T);if(L){if(d.save(),d.beginPath(),E()||!p){d.moveTo(w,x);for(var M=4,N=v-w,A=_-x,F=0;F0&&t[1]>0}function i(t,e,n){return void 0===n&&(n=[0,0]),n[0]=t[0]*e+.5|0,n[1]=t[1]*e+.5|0,n}function o(t,e){return Array.isArray(t)?t:(void 0===e?e=[t,t]:(e[0]=t,e[1]=t),e)}n.d(e,"a",(function(){return r})),n.d(e,"b",(function(){return i})),n.d(e,"c",(function(){return o}))},3511:function(t,e){var n=TypeError,r=9007199254740991;t.exports=function(t){if(t>r)throw n("Maximum allowed index exceeded");return t}},3574:function(t,e,n){},"35a7":function(t,e,n){"use strict";var r=n("0ec0"),i=n("01d4"),o=n("1e8d"),s=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 r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),a=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 s(e,t),e.prototype.changed=function(){++this.revision_,this.dispatchEvent(i["a"].CHANGE)},e.prototype.getRevision=function(){return this.revision_},e.prototype.onInternal=function(t,e){if(Array.isArray(t)){for(var n=t.length,r=new Array(n),i=0;i>>2];t.sigBytes-=e}},v=(r.BlockCipher=h.extend({cfg:h.cfg.extend({mode:d,padding:y}),reset:function(){var t;h.reset.call(this);var e=this.cfg,n=e.iv,r=e.mode;this._xformMode==this._ENC_XFORM_MODE?t=r.createEncryptor:(t=r.createDecryptor,this._minBufferSize=1),this._mode&&this._mode.__creator==t?this._mode.init(this,n&&n.words):(this._mode=t.call(r,this,n&&n.words),this._mode.__creator=t)},_doProcessBlock:function(t,e){this._mode.processBlock(t,e)},_doFinalize:function(){var t,e=this.cfg.padding;return this._xformMode==this._ENC_XFORM_MODE?(e.pad(this._data,this.blockSize),t=this._process(!0)):(t=this._process(!0),e.unpad(t)),t},blockSize:4}),r.CipherParams=i.extend({init:function(t){this.mixIn(t)},toString:function(t){return(t||this.formatter).stringify(this)}})),_=n.format={},m=_.OpenSSL={stringify:function(t){var e,n=t.ciphertext,r=t.salt;return e=r?o.create([1398893684,1701076831]).concat(r).concat(n):n,e.toString(u)},parse:function(t){var e,n=u.parse(t),r=n.words;return 1398893684==r[0]&&1701076831==r[1]&&(e=o.create(r.slice(2,4)),r.splice(0,4),n.sigBytes-=16),v.create({ciphertext:n,salt:e})}},b=r.SerializableCipher=i.extend({cfg:i.extend({format:m}),encrypt:function(t,e,n,r){r=this.cfg.extend(r);var i=t.createEncryptor(n,r),o=i.finalize(e),s=i.cfg;return v.create({ciphertext:o,key:n,iv:s.iv,algorithm:t,mode:s.mode,padding:s.padding,blockSize:t.blockSize,formatter:r.format})},decrypt:function(t,e,n,r){r=this.cfg.extend(r),e=this._parse(e,r.format);var i=t.createDecryptor(n,r).finalize(e.ciphertext);return i},_parse:function(t,e){return"string"==typeof t?e.parse(t,this):t}}),E=n.kdf={},w=E.OpenSSL={execute:function(t,e,n,r){r||(r=o.random(8));var i=l.create({keySize:e+n}).compute(t,r),s=o.create(i.words.slice(e),4*n);return i.sigBytes=4*e,v.create({key:i,iv:s,salt:r})}},x=r.PasswordBasedCipher=b.extend({cfg:b.cfg.extend({kdf:w}),encrypt:function(t,e,n,r){r=this.cfg.extend(r);var i=r.kdf.execute(n,t.keySize,t.ivSize);r.iv=i.iv;var o=b.encrypt.call(this,t,e,i.key,r);return o.mixIn(i),o},decrypt:function(t,e,n,r){r=this.cfg.extend(r),e=this._parse(e,r.format);var i=r.kdf.execute(n,t.keySize,t.ivSize,e.salt);r.iv=i.iv;var o=b.decrypt.call(this,t,e,i.key,r);return o}})}()}))},"38f3":function(t,e,n){"use strict";n.d(e,"a",(function(){return r})),n.d(e,"b",(function(){return i})),n.d(e,"c",(function(){return o})),n.d(e,"d",(function(){return s}));var r="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),r=1,i=arguments.length;r0&&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}(c["b"]),y=g,v=n("8cc5"),_=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 r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),m=function(t){function e(e){var n=this,r=e||{};return n=t.call(this,{stopDown:l["a"]})||this,n.condition_=r.condition?r.condition:h["b"],n.lastAngle_=void 0,n.duration_=void 0!==r.duration?r.duration:250,n}return _(e,t),e.prototype.handleDragEvent=function(t){if(Object(h["f"])(t)){var e=t.map,n=e.getView();if(n.getConstraints().rotation!==v["c"]){var r=e.getSize(),i=t.pixel,o=Math.atan2(r[1]/2-i[1],i[0]-r[0]/2);if(void 0!==this.lastAngle_){var s=o-this.lastAngle_;n.adjustRotationInternal(-s)}this.lastAngle_=o}}},e.prototype.handleUpEvent=function(t){if(!Object(h["f"])(t))return!0;var e=t.map,n=e.getView();return n.endInteraction(this.duration_),!1},e.prototype.handleDownEvent=function(t){if(!Object(h["f"])(t))return!1;if(Object(h["e"])(t)&&this.condition_(t)){var e=t.map;return e.getView().beginInteraction(),this.lastAngle_=void 0,!0}return!1},e}(c["b"]),b=m,E=n("cef7"),w=n("da5c"),x=n("5bc3"),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 r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),S=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 O(e,t),e.prototype.disposeInternal=function(){this.setMap(null)},e.prototype.render_=function(){var t=this.startPixel_,e=this.endPixel_,n="px",r=this.element_.style;r.left=Math.min(t[0],e[0])+n,r.top=Math.min(t[1],e[1])+n,r.width=Math.abs(e[0]-t[0])+n,r.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]]],r=n.map(this.map_.getCoordinateFromPixelInternal,this.map_);r[4]=r[0].slice(),this.geometry_?this.geometry_.setCoordinates([r]):this.geometry_=new x["a"]([r])},e.prototype.getGeometry=function(){return this.geometry_},e}(w["a"]),C=S,I=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 r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),P={BOXSTART:"boxstart",BOXDRAG:"boxdrag",BOXEND:"boxend",BOXCANCEL:"boxcancel"},R=function(t){function e(e,n,r){var i=t.call(this,e)||this;return i.coordinate=n,i.mapBrowserEvent=r,i}return I(e,t),e}(E["a"]),T=function(t){function e(e){var n=t.call(this)||this;n.on,n.once,n.un;var r=e||{};return n.box_=new C(r.className||"ol-dragbox"),n.minArea_=void 0!==r.minArea?r.minArea:64,r.onBoxEnd&&(n.onBoxEnd=r.onBoxEnd),n.startPixel_=null,n.condition_=r.condition?r.condition:h["e"],n.boxEndCondition_=r.boxEndCondition?r.boxEndCondition:n.defaultBoxEndCondition,n}return I(e,t),e.prototype.defaultBoxEndCondition=function(t,e,n){var r=n[0]-e[0],i=n[1]-e[1];return r*r+i*i>=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 R(P.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 R(e?P.BOXEND:P.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 R(P.BOXSTART,t.coordinate,t)),!0)},e.prototype.onBoxEnd=function(t){},e}(c["b"]),L=T,M=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 r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),N=function(t){function e(e){var n=this,r=e||{},i=r.condition?r.condition:h["j"];return n=t.call(this,{condition:i,className:r.className||"ol-dragzoom",minArea:r.minArea})||this,n.duration_=void 0!==r.duration?r.duration:200,n.out_=void 0!==r.out&&r.out,n}return M(e,t),e.prototype.onBoxEnd=function(t){var e=this.getMap(),n=e.getView(),r=this.getGeometry();if(this.out_){var i=n.rotatedExtentForGeometry(r),o=n.getResolutionForExtentInternal(i),s=n.getResolution()/o;r=r.clone(),r.scale(s*s)}n.fitInternal(r,{duration:this.duration_,easing:f["b"]})},e}(L),A=N,F=n("01d4"),j={LEFT:37,UP:38,RIGHT:39,DOWN:40},D=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 r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),k=function(t){function e(e){var n=t.call(this)||this,r=e||{};return n.defaultCondition_=function(t){return Object(h["h"])(t)&&Object(h["l"])(t)},n.condition_=void 0!==r.condition?r.condition:n.defaultCondition_,n.duration_=void 0!==r.duration?r.duration:100,n.pixelDelta_=void 0!==r.pixelDelta?r.pixelDelta:128,n}return D(e,t),e.prototype.handleEvent=function(t){var e=!1;if(t.type==F["a"].KEYDOWN){var n=t.originalEvent,r=n.keyCode;if(this.condition_(t)&&(r==j.DOWN||r==j.LEFT||r==j.RIGHT||r==j.UP)){var o=t.map,s=o.getView(),a=s.getResolution()*this.pixelDelta_,u=0,c=0;r==j.DOWN?c=-a:r==j.LEFT?u=-a:r==j.RIGHT?u=a:c=a;var l=[u,c];Object(p["d"])(l,s.getRotation()),Object(i["b"])(s,l,this.duration_),n.preventDefault(),e=!0}}return!e},e}(i["a"]),G=k,B=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 r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),U=function(t){function e(e){var n=t.call(this)||this,r=e||{};return n.condition_=r.condition?r.condition:h["l"],n.delta_=r.delta?r.delta:1,n.duration_=void 0!==r.duration?r.duration:100,n}return B(e,t),e.prototype.handleEvent=function(t){var e=!1;if(t.type==F["a"].KEYDOWN||t.type==F["a"].KEYPRESS){var n=t.originalEvent,r=n.charCode;if(this.condition_(t)&&(r=="+".charCodeAt(0)||r=="-".charCodeAt(0))){var o=t.map,s=r=="+".charCodeAt(0)?this.delta_:-this.delta_,a=o.getView();Object(i["c"])(a,s,void 0,this.duration_),n.preventDefault(),e=!0}}return!e},e}(i["a"]),z=U,Y=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]0&&this.points_[n+2]>t)n-=3;var r=this.points_[e+2]-this.points_[n+2];if(r<1e3/60)return!1;var i=this.points_[e]-this.points_[n],o=this.points_[e+1]-this.points_[n+1];return this.angle_=Math.atan2(o,i),this.initialVelocity_=Math.sqrt(i*i+o*o)/r,this.initialVelocity_>this.minVelocity_},t.prototype.getDistance=function(){return(this.minVelocity_-this.initialVelocity_)/this.decay_},t.prototype.getAngle=function(){return this.angle_},t}(),X=Y,V=n("617d"),q=n("7fc9"),W=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 r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),H={TRACKPAD:"trackpad",WHEEL:"wheel"},Z=function(t){function e(e){var n=this,r=e||{};n=t.call(this,r)||this,n.totalDelta_=0,n.lastDelta_=0,n.maxDelta_=void 0!==r.maxDelta?r.maxDelta:1,n.duration_=void 0!==r.duration?r.duration:250,n.timeout_=void 0!==r.timeout?r.timeout:80,n.useAnchor_=void 0===r.useAnchor||r.useAnchor,n.constrainResolution_=void 0!==r.constrainResolution&&r.constrainResolution;var i=r.condition?r.condition:h["c"];return n.condition_=r.onFocusOnly?Object(h["a"])(h["d"],i):i,n.lastAnchor_=null,n.startTime_=void 0,n.timeoutId_,n.mode_=void 0,n.trackpadEventGap_=400,n.trackpadTimeoutId_,n.deltaPerZoom_=300,n}return W(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!==F["a"].WHEEL)return!0;var n,r=t.map,i=t.originalEvent;if(i.preventDefault(),this.useAnchor_&&(this.lastAnchor_=t.coordinate),t.type==F["a"].WHEEL&&(n=i.deltaY,V["b"]&&i.deltaMode===WheelEvent.DOM_DELTA_PIXEL&&(n/=V["a"]),i.deltaMode===WheelEvent.DOM_DELTA_LINE&&(n*=40)),0===n)return!1;this.lastDelta_=n;var o=Date.now();void 0===this.startTime_&&(this.startTime_=o),(!this.mode_||o-this.startTime_>this.trackpadEventGap_)&&(this.mode_=Math.abs(n)<4?H.TRACKPAD:H.WHEEL);var s=r.getView();if(this.mode_===H.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_=o,!1;this.totalDelta_+=n;var a=Math.max(this.timeout_-(o-this.startTime_),0);return clearTimeout(this.timeoutId_),this.timeoutId_=setTimeout(this.handleWheelZoom_.bind(this,r),a),!1},e.prototype.handleWheelZoom_=function(t){var e=t.getView();e.getAnimating()&&e.cancelAnimations();var n=-Object(q["b"])(this.totalDelta_,-this.maxDelta_*this.deltaPerZoom_,this.maxDelta_*this.deltaPerZoom_)/this.deltaPerZoom_;(e.getConstrainResolution()||this.constrainResolution_)&&(n=n?n>0?1:-1:0),Object(i["c"])(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}(i["a"]),K=Z,J=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 r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Q=function(t){function e(e){var n=this,r=e||{},i=r;return i.stopDown||(i.stopDown=l["a"]),n=t.call(this,i)||this,n.anchor_=null,n.lastAngle_=void 0,n.rotating_=!1,n.rotationDelta_=0,n.threshold_=void 0!==r.threshold?r.threshold:.3,n.duration_=void 0!==r.duration?r.duration:250,n}return J(e,t),e.prototype.handleDragEvent=function(t){var e=0,n=this.targetPointers[0],r=this.targetPointers[1],i=Math.atan2(r.clientY-n.clientY,r.clientX-n.clientX);if(void 0!==this.lastAngle_){var o=i-this.lastAngle_;this.rotationDelta_+=o,!this.rotating_&&Math.abs(this.rotationDelta_)>this.threshold_&&(this.rotating_=!0),e=o}this.lastAngle_=i;var s=t.map,a=s.getView();if(a.getConstraints().rotation!==v["c"]){var u=s.getViewport().getBoundingClientRect(),l=Object(c["a"])(this.targetPointers);l[0]-=u.left,l[1]-=u.top,this.anchor_=s.getCoordinateFromPixelInternal(l),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}(c["b"]),$=Q,tt=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 r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),et=function(t){function e(e){var n=this,r=e||{},i=r;return i.stopDown||(i.stopDown=l["a"]),n=t.call(this,i)||this,n.anchor_=null,n.duration_=void 0!==r.duration?r.duration:400,n.lastDistance_=void 0,n.lastScaleDelta_=1,n}return tt(e,t),e.prototype.handleDragEvent=function(t){var e=1,n=this.targetPointers[0],r=this.targetPointers[1],i=n.clientX-r.clientX,o=n.clientY-r.clientY,s=Math.sqrt(i*i+o*o);void 0!==this.lastDistance_&&(e=this.lastDistance_/s),this.lastDistance_=s;var a=t.map,u=a.getView();1!=e&&(this.lastScaleDelta_=e);var l=a.getViewport().getBoundingClientRect(),h=Object(c["a"])(this.targetPointers);h[0]-=l.left,h[1]-=l.top,this.anchor_=a.getCoordinateFromPixelInternal(h),a.render(),u.adjustResolutionInternal(e,this.anchor_)},e.prototype.handleUpEvent=function(t){if(this.targetPointers.length<2){var e=t.map,n=e.getView(),r=this.lastScaleDelta_>1?1:-1;return n.endInteraction(this.duration_,r),!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}(c["b"]),nt=et;function rt(t){var e=t||{},n=new r["a"],i=new X(-.005,.05,100),o=void 0===e.altShiftDragRotate||e.altShiftDragRotate;o&&n.push(new b);var s=void 0===e.doubleClickZoom||e.doubleClickZoom;s&&n.push(new u({delta:e.zoomDelta,duration:e.zoomDuration}));var a=void 0===e.dragPan||e.dragPan;a&&n.push(new y({onFocusOnly:e.onFocusOnly,kinetic:i}));var c=void 0===e.pinchRotate||e.pinchRotate;c&&n.push(new $);var l=void 0===e.pinchZoom||e.pinchZoom;l&&n.push(new nt({duration:e.zoomDuration}));var h=void 0===e.keyboard||e.keyboard;h&&(n.push(new G),n.push(new z({delta:e.zoomDelta,duration:e.zoomDuration})));var f=void 0===e.mouseWheelZoom||e.mouseWheelZoom;f&&n.push(new K({onFocusOnly:e.onFocusOnly,duration:e.zoomDuration}));var p=void 0===e.shiftDragZoom||e.shiftDragZoom;return p&&n.push(new A({duration:e.zoomDuration})),n}},"3a9b":function(t,e,n){var r=n("e330");t.exports=r({}.isPrototypeOf)},"3bbe":function(t,e,n){var r=n("1626"),i=String,o=TypeError;t.exports=function(t){if("object"==typeof t||r(t))return t;throw o("Can't set "+i(t)+" as a prototype")}},"3c22":function(t,e,n){"use strict";n.d(e,"a",(function(){return s}));var r=n("5c38"),i=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 r=o(t,e,n);return r in this.cache_?this.cache_[r]:null},t.prototype.set=function(t,e,n,r){var i=o(t,e,n);this.cache_[i]=r,++this.cacheSize_},t.prototype.setSize=function(t){this.maxCacheSize_=t,this.expire()},t}();function o(t,e,n){var i=n?Object(r["b"])(n):"null";return e+":"+t+":"+i}var s=new i},"3d5a":function(t,e,n){(function(e,r,i){t.exports=r(n("21bf"),n("1132"),n("72fe"),n("2b79"),n("38ba"))})(0,(function(t){return function(){var e=t,n=e.lib,r=n.StreamCipher,i=e.algo,o=[],s=[],a=[],u=i.RabbitLegacy=r.extend({_doReset:function(){var t=this._key.words,e=this.cfg.iv,n=this._X=[t[0],t[3]<<16|t[2]>>>16,t[1],t[0]<<16|t[3]>>>16,t[2],t[1]<<16|t[0]>>>16,t[3],t[2]<<16|t[1]>>>16],r=this._C=[t[2]<<16|t[2]>>>16,4294901760&t[0]|65535&t[1],t[3]<<16|t[3]>>>16,4294901760&t[1]|65535&t[2],t[0]<<16|t[0]>>>16,4294901760&t[2]|65535&t[3],t[1]<<16|t[1]>>>16,4294901760&t[3]|65535&t[0]];this._b=0;for(var i=0;i<4;i++)c.call(this);for(i=0;i<8;i++)r[i]^=n[i+4&7];if(e){var o=e.words,s=o[0],a=o[1],u=16711935&(s<<8|s>>>24)|4278255360&(s<<24|s>>>8),l=16711935&(a<<8|a>>>24)|4278255360&(a<<24|a>>>8),h=u>>>16|4294901760&l,f=l<<16|65535&u;r[0]^=u,r[1]^=h,r[2]^=l,r[3]^=f,r[4]^=u,r[5]^=h,r[6]^=l,r[7]^=f;for(i=0;i<4;i++)c.call(this)}},_doProcessBlock:function(t,e){var n=this._X;c.call(this),o[0]=n[0]^n[5]>>>16^n[3]<<16,o[1]=n[2]^n[7]>>>16^n[5]<<16,o[2]=n[4]^n[1]>>>16^n[7]<<16,o[3]=n[6]^n[3]>>>16^n[1]<<16;for(var r=0;r<4;r++)o[r]=16711935&(o[r]<<8|o[r]>>>24)|4278255360&(o[r]<<24|o[r]>>>8),t[e+r]^=o[r]},blockSize:4,ivSize:2});function c(){for(var t=this._X,e=this._C,n=0;n<8;n++)s[n]=e[n];e[0]=e[0]+1295307597+this._b|0,e[1]=e[1]+3545052371+(e[0]>>>0>>0?1:0)|0,e[2]=e[2]+886263092+(e[1]>>>0>>0?1:0)|0,e[3]=e[3]+1295307597+(e[2]>>>0>>0?1:0)|0,e[4]=e[4]+3545052371+(e[3]>>>0>>0?1:0)|0,e[5]=e[5]+886263092+(e[4]>>>0>>0?1:0)|0,e[6]=e[6]+1295307597+(e[5]>>>0>>0?1:0)|0,e[7]=e[7]+3545052371+(e[6]>>>0>>0?1:0)|0,this._b=e[7]>>>0>>0?1:0;for(n=0;n<8;n++){var r=t[n]+e[n],i=65535&r,o=r>>>16,u=((i*i>>>17)+i*o>>>15)+o*o,c=((4294901760&r)*r|0)+((65535&r)*r|0);a[n]=u^c}t[0]=a[0]+(a[7]<<16|a[7]>>>16)+(a[6]<<16|a[6]>>>16)|0,t[1]=a[1]+(a[0]<<8|a[0]>>>24)+a[7]|0,t[2]=a[2]+(a[1]<<16|a[1]>>>16)+(a[0]<<16|a[0]>>>16)|0,t[3]=a[3]+(a[2]<<8|a[2]>>>24)+a[1]|0,t[4]=a[4]+(a[3]<<16|a[3]>>>16)+(a[2]<<16|a[2]>>>16)|0,t[5]=a[5]+(a[4]<<8|a[4]>>>24)+a[3]|0,t[6]=a[6]+(a[5]<<16|a[5]>>>16)+(a[4]<<16|a[4]>>>16)|0,t[7]=a[7]+(a[6]<<8|a[6]>>>24)+a[5]|0}e.RabbitLegacy=r._createHelper(u)}(),t.RabbitLegacy}))},"3e6b":function(t,e,n){"use strict";var r=n("ae50"),i={BEGIN_GEOMETRY:0,BEGIN_PATH:1,CIRCLE:2,CLOSE_PATH:3,CUSTOM:4,DRAW_CHARS:5,DRAW_IMAGE:6,END_GEOMETRY:7,FILL:8,MOVE_TO_LINE_TO:9,SET_FILL_STYLE:10,SET_STROKE_STYLE:11,STROKE:12},o=[i.FILL],s=[i.STROKE],a=[i.BEGIN_PATH],u=[i.CLOSE_PATH],c=i,l=n("045d"),h=n("f78c"),f=n("e98d"),p=n("0af5"),d=n("ddea"),g=n("9f5e"),y=n("bb6c"),v=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 r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),_=function(t){function e(e,n,r,i){var o=t.call(this)||this;return o.tolerance=e,o.maxExtent=n,o.pixelRatio=i,o.maxLineWidth=0,o.resolution=r,o.beginGeometryInstruction1_=null,o.beginGeometryInstruction2_=null,o.bufferedMaxExtent_=null,o.instructions=[],o.coordinates=[],o.tmpCoordinate_=[],o.hitDetectionInstructions=[],o.state={},o}return v(e,t),e.prototype.applyPixelRatio=function(t){var e=this.pixelRatio;return 1==e?t:t.map((function(t){return t*e}))},e.prototype.appendFlatPointCoordinates=function(t,e){for(var n=this.getBufferedMaxExtent(),r=this.tmpCoordinate_,i=this.coordinates,o=i.length,s=0,a=t.length;sf&&(this.instructions.push([c.CUSTOM,f,o,t,n,y["a"]]),this.hitDetectionInstructions.push([c.CUSTOM,f,o,t,r||n,y["a"]]));break;case"Point":i=t.getFlatCoordinates(),this.coordinates.push(i[0],i[1]),o=this.coordinates.length,this.instructions.push([c.CUSTOM,f,o,t,n]),this.hitDetectionInstructions.push([c.CUSTOM,f,o,t,r||n]);break;default:}this.endGeometry(e)},e.prototype.beginGeometry=function(t,e){this.beginGeometryInstruction1_=[c.BEGIN_GEOMETRY,e,0,t],this.instructions.push(this.beginGeometryInstruction1_),this.beginGeometryInstruction2_=[c.BEGIN_GEOMETRY,e,0,t],this.hitDetectionInstructions.push(this.beginGeometryInstruction2_)},e.prototype.finish=function(){return{instructions:this.instructions,hitDetectionInstructions:this.hitDetectionInstructions,coordinates:this.coordinates}},e.prototype.reverseHitDetectionInstructions=function(){var t,e=this.hitDetectionInstructions;e.reverse();var n,r,i=e.length,o=-1;for(t=0;tthis.maxLineWidth&&(this.maxLineWidth=n.lineWidth,this.bufferedMaxExtent_=null)}else n.strokeStyle=void 0,n.lineCap=void 0,n.lineDash=null,n.lineDashOffset=void 0,n.lineJoin=void 0,n.lineWidth=void 0,n.miterLimit=void 0},e.prototype.createFill=function(t){var e=t.fillStyle,n=[c.SET_FILL_STYLE,e];return"string"!==typeof e&&n.push(!0),n},e.prototype.applyStroke=function(t){this.instructions.push(this.createStroke(t))},e.prototype.createStroke=function(t){return[c.SET_STROKE_STYLE,t.strokeStyle,t.lineWidth*this.pixelRatio,t.lineCap,t.lineJoin,t.miterLimit,this.applyPixelRatio(t.lineDash),t.lineDashOffset*this.pixelRatio]},e.prototype.updateFillStyle=function(t,e){var n=t.fillStyle;"string"===typeof n&&t.currentFillStyle==n||(void 0!==n&&this.instructions.push(e.call(this,t)),t.currentFillStyle=n)},e.prototype.updateStrokeStyle=function(t,e){var n=t.strokeStyle,r=t.lineCap,i=t.lineDash,o=t.lineDashOffset,s=t.lineJoin,a=t.lineWidth,u=t.miterLimit;(t.currentStrokeStyle!=n||t.currentLineCap!=r||i!=t.currentLineDash&&!Object(g["b"])(t.currentLineDash,i)||t.currentLineDashOffset!=o||t.currentLineJoin!=s||t.currentLineWidth!=a||t.currentMiterLimit!=u)&&(void 0!==n&&e.call(this,t),t.currentStrokeStyle=n,t.currentLineCap=r,t.currentLineDash=i,t.currentLineDashOffset=o,t.currentLineJoin=s,t.currentLineWidth=a,t.currentMiterLimit=u)},e.prototype.endGeometry=function(t){this.beginGeometryInstruction1_[2]=this.instructions.length,this.beginGeometryInstruction1_=null,this.beginGeometryInstruction2_[2]=this.hitDetectionInstructions.length,this.beginGeometryInstruction2_=null;var e=[c.END_GEOMETRY,t];this.instructions.push(e),this.hitDetectionInstructions.push(e)},e.prototype.getBufferedMaxExtent=function(){if(!this.bufferedMaxExtent_&&(this.bufferedMaxExtent_=Object(p["d"])(this.maxExtent),this.maxLineWidth>0)){var t=this.resolution*(this.maxLineWidth+1)/2;Object(p["c"])(this.bufferedMaxExtent_,t,this.bufferedMaxExtent_)}return this.bufferedMaxExtent_},e}(h["a"]),m=_,b=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 r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),E=function(t){function e(e,n,r,i){var o=t.call(this,e,n,r,i)||this;return o.hitDetectionImage_=null,o.image_=null,o.imagePixelRatio_=void 0,o.anchorX_=void 0,o.anchorY_=void 0,o.height_=void 0,o.opacity_=void 0,o.originX_=void 0,o.originY_=void 0,o.rotateWithView_=void 0,o.rotation_=void 0,o.scale_=void 0,o.width_=void 0,o.declutterMode_=void 0,o.declutterImageWithText_=void 0,o}return b(e,t),e.prototype.drawPoint=function(t,e){if(this.image_){this.beginGeometry(t,e);var n=t.getFlatCoordinates(),r=t.getStride(),i=this.coordinates.length,o=this.appendFlatPointCoordinates(n,r);this.instructions.push([c.DRAW_IMAGE,i,o,this.image_,this.anchorX_*this.imagePixelRatio_,this.anchorY_*this.imagePixelRatio_,Math.ceil(this.height_*this.imagePixelRatio_),this.opacity_,this.originX_*this.imagePixelRatio_,this.originY_*this.imagePixelRatio_,this.rotateWithView_,this.rotation_,[this.scale_[0]*this.pixelRatio/this.imagePixelRatio_,this.scale_[1]*this.pixelRatio/this.imagePixelRatio_],Math.ceil(this.width_*this.imagePixelRatio_),this.declutterMode_,this.declutterImageWithText_]),this.hitDetectionInstructions.push([c.DRAW_IMAGE,i,o,this.hitDetectionImage_,this.anchorX_,this.anchorY_,this.height_,this.opacity_,this.originX_,this.originY_,this.rotateWithView_,this.rotation_,this.scale_,this.width_,this.declutterMode_,this.declutterImageWithText_]),this.endGeometry(e)}},e.prototype.drawMultiPoint=function(t,e){if(this.image_){this.beginGeometry(t,e);var n=t.getFlatCoordinates(),r=t.getStride(),i=this.coordinates.length,o=this.appendFlatPointCoordinates(n,r);this.instructions.push([c.DRAW_IMAGE,i,o,this.image_,this.anchorX_*this.imagePixelRatio_,this.anchorY_*this.imagePixelRatio_,Math.ceil(this.height_*this.imagePixelRatio_),this.opacity_,this.originX_*this.imagePixelRatio_,this.originY_*this.imagePixelRatio_,this.rotateWithView_,this.rotation_,[this.scale_[0]*this.pixelRatio/this.imagePixelRatio_,this.scale_[1]*this.pixelRatio/this.imagePixelRatio_],Math.ceil(this.width_*this.imagePixelRatio_),this.declutterMode_,this.declutterImageWithText_]),this.hitDetectionInstructions.push([c.DRAW_IMAGE,i,o,this.hitDetectionImage_,this.anchorX_,this.anchorY_,this.height_,this.opacity_,this.originX_,this.originY_,this.rotateWithView_,this.rotation_,this.scale_,this.width_,this.declutterMode_,this.declutterImageWithText_]),this.endGeometry(e)}},e.prototype.finish=function(){return this.reverseHitDetectionInstructions(),this.anchorX_=void 0,this.anchorY_=void 0,this.hitDetectionImage_=null,this.image_=null,this.imagePixelRatio_=void 0,this.height_=void 0,this.scale_=void 0,this.opacity_=void 0,this.originX_=void 0,this.originY_=void 0,this.rotateWithView_=void 0,this.rotation_=void 0,this.width_=void 0,t.prototype.finish.call(this)},e.prototype.setImageStyle=function(t,e){var n=t.getAnchor(),r=t.getSize(),i=t.getOrigin();this.imagePixelRatio_=t.getPixelRatio(this.pixelRatio),this.anchorX_=n[0],this.anchorY_=n[1],this.hitDetectionImage_=t.getHitDetectionImage(),this.image_=t.getImage(this.pixelRatio),this.height_=r[1],this.opacity_=t.getOpacity(),this.originX_=i[0],this.originY_=i[1],this.rotateWithView_=t.getRotateWithView(),this.rotation_=t.getRotation(),this.scale_=t.getScaleArray(),this.width_=r[0],this.declutterMode_=t.getDeclutterMode(),this.declutterImageWithText_=e},e}(m),w=E,x=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 r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),O=function(t){function e(e,n,r,i){return t.call(this,e,n,r,i)||this}return x(e,t),e.prototype.drawFlatCoordinates_=function(t,e,n,r){var i=this.coordinates.length,o=this.appendFlatLineCoordinates(t,e,n,r,!1,!1),s=[c.MOVE_TO_LINE_TO,i,o];return this.instructions.push(s),this.hitDetectionInstructions.push(s),n},e.prototype.drawLineString=function(t,e){var n=this.state,r=n.strokeStyle,i=n.lineWidth;if(void 0!==r&&void 0!==i){this.updateStrokeStyle(n,this.applyStroke),this.beginGeometry(t,e),this.hitDetectionInstructions.push([c.SET_STROKE_STYLE,n.strokeStyle,n.lineWidth,n.lineCap,n.lineJoin,n.miterLimit,d["e"],d["f"]],a);var o=t.getFlatCoordinates(),u=t.getStride();this.drawFlatCoordinates_(o,0,o.length,u),this.hitDetectionInstructions.push(s),this.endGeometry(e)}},e.prototype.drawMultiLineString=function(t,e){var n=this.state,r=n.strokeStyle,i=n.lineWidth;if(void 0!==r&&void 0!==i){this.updateStrokeStyle(n,this.applyStroke),this.beginGeometry(t,e),this.hitDetectionInstructions.push([c.SET_STROKE_STYLE,n.strokeStyle,n.lineWidth,n.lineCap,n.lineJoin,n.miterLimit,n.lineDash,n.lineDashOffset],a);for(var o=t.getEnds(),u=t.getFlatCoordinates(),l=t.getStride(),h=0,f=0,p=o.length;ft&&(_>v&&(v=_,g=m,y=s),_=0,m=s-i)),a=u,h=p,f=d),c=b,l=E}return _+=u,_>v?[m,s]:[g,y]}var N=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 r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),A={left:0,end:0,center:.5,right:1,start:1,top:0,middle:.5,hanging:.2,alphabetic:.8,ideographic:.8,bottom:1},F=function(t){function e(e,n,r,i){var o=t.call(this,e,n,r,i)||this;return o.labels_=null,o.text_="",o.textOffsetX_=0,o.textOffsetY_=0,o.textRotateWithView_=void 0,o.textRotation_=0,o.textFillState_=null,o.fillStates={},o.textStrokeState_=null,o.strokeStates={},o.textState_={},o.textStates={},o.textKey_="",o.fillKey_="",o.strokeKey_="",o.declutterImageWithText_=void 0,o}return N(e,t),e.prototype.finish=function(){var e=t.prototype.finish.call(this);return e.textStates=this.textStates,e.fillStates=this.fillStates,e.strokeStates=this.strokeStates,e},e.prototype.drawText=function(t,e){var n=this.textFillState_,r=this.textStrokeState_,i=this.textState_;if(""!==this.text_&&i&&(n||r)){var o=this.coordinates,s=o.length,a=t.getType(),u=null,l=t.getStride();if(i.placement!==T["a"].LINE||"LineString"!=a&&"MultiLineString"!=a&&"Polygon"!=a&&"MultiPolygon"!=a){var h=i.overflow?null:[];switch(a){case"Point":case"MultiPoint":u=t.getFlatCoordinates();break;case"LineString":u=t.getFlatMidpoint();break;case"Circle":u=t.getCenter();break;case"MultiLineString":u=t.getFlatMidpoints(),l=2;break;case"Polygon":u=t.getFlatInteriorPoint(),i.overflow||h.push(u[2]/this.resolution),l=3;break;case"MultiPolygon":var f=t.getFlatInteriorPoints();u=[];for(S=0,C=f.length;SP[2]}else S=b>C;var R,T=Math.PI,L=[],M=w+r===e;if(e=w,y=0,v=x,f=t[e],p=t[e+1],M){_(),R=Math.atan2(p-g,f-d),S&&(R+=R>0?-T:T);var N=(C+b)/2,A=(I+E)/2;return L[0]=[N,A,(O-o)/2,R,i],L}i=i.replace(/\n/g," ");for(var F=0,j=i.length;F0?-T:T),void 0!==R){var k=D-R;if(k+=k>T?-2*T:k<-T?2*T:0,Math.abs(k)>s)return null}R=D;for(var G=F,B=0;F0&&t.push("\n",""),t.push(e,""),t}var nt=function(){function t(t,e,n,r){this.overlaps=n,this.pixelRatio=e,this.resolution=t,this.alignFill_,this.instructions=r.instructions,this.coordinates=r.coordinates,this.coordinateCache_={},this.renderedTransform_=Object(z["c"])(),this.hitDetectionInstructions=r.hitDetectionInstructions,this.pixelCoordinates_=null,this.viewRotation_=0,this.fillStates=r.fillStates||{},this.strokeStates=r.strokeStates||{},this.textStates=r.textStates||{},this.widths_={},this.labels_={}}return t.prototype.createLabel=function(t,e,n,r){var i=t+e+n+r;if(this.labels_[i])return this.labels_[i];var o=r?this.strokeStates[r]:null,s=n?this.fillStates[n]:null,a=this.textStates[e],u=this.pixelRatio,c=[a.scale[0]*u,a.scale[1]*u],l=Array.isArray(t),h=a.justify?A[a.justify]:tt(Array.isArray(t)?t[0]:t,a.textAlign||d["l"]),f=r&&o.lineWidth?o.lineWidth:0,p=l?t:t.split("\n").reduce(et,[]),g=Object(d["o"])(a,p),y=g.width,v=g.height,_=g.widths,m=g.heights,b=g.lineWidths,E=y+f,w=[],x=(E+2)*c[0],O=(v+f)*c[1],S={width:x<0?Math.floor(x):Math.ceil(x),height:O<0?Math.floor(O):Math.ceil(O),contextInstructions:w};if(1==c[0]&&1==c[1]||w.push("scale",c),r){w.push("strokeStyle",o.strokeStyle),w.push("lineWidth",f),w.push("lineCap",o.lineCap),w.push("lineJoin",o.lineJoin),w.push("miterLimit",o.miterLimit);var C=U["h"]?OffscreenCanvasRenderingContext2D:CanvasRenderingContext2D;C.prototype.setLineDash&&(w.push("setLineDash",[o.lineDash]),w.push("lineDashOffset",o.lineDashOffset))}n&&w.push("fillStyle",s.fillStyle),w.push("textBaseline","middle"),w.push("textAlign","center");for(var I,P=.5-h,R=h*E+P*f,T=[],L=[],M=0,N=0,F=0,j=0,D=0,k=p.length;Dt?t-u:i,E=o+c>e?e-c:o,w=d[3]+b*h[0]+d[1],x=d[0]+E*h[1]+d[2],O=_-d[3],S=m-d[0];return(g||0!==l)&&(H[0]=O,J[0]=O,H[1]=S,Z[1]=S,Z[0]=O+w,K[0]=Z[0],K[1]=S+x,J[1]=K[1]),0!==l?(v=Object(z["b"])(Object(z["c"])(),n,r,1,1,l,-n,-r),Object(z["a"])(v,H),Object(z["a"])(v,Z),Object(z["a"])(v,K),Object(z["a"])(v,J),Object(p["k"])(Math.min(H[0],Z[0],K[0],J[0]),Math.min(H[1],Z[1],K[1],J[1]),Math.max(H[0],Z[0],K[0],J[0]),Math.max(H[1],Z[1],K[1],J[1]),W)):Object(p["k"])(Math.min(O,O+w),Math.min(S,S+x),Math.max(O,O+w),Math.max(S,S+x),W),f&&(_=Math.round(_),m=Math.round(m)),{drawImageX:_,drawImageY:m,drawImageW:b,drawImageH:E,originX:u,originY:c,declutterBox:{minX:W[0],minY:W[1],maxX:W[2],maxY:W[3],value:y},canvasTransform:v,scale:h}},t.prototype.replayImageOrLabel_=function(t,e,n,r,i,o,s){var a=!(!o&&!s),u=r.declutterBox,c=t.canvas,l=s?s[2]*r.scale[0]/2:0,h=u.minX-l<=c.width/e&&u.maxX+l>=0&&u.minY-l<=c.height/e&&u.maxY+l>=0;return h&&(a&&this.replayTextBackground_(t,H,Z,K,J,o,s),Object(d["n"])(t,r.canvasTransform,i,n,r.originX,r.originY,r.drawImageW,r.drawImageH,r.drawImageX,r.drawImageY,r.scale)),!0},t.prototype.fill_=function(t){if(this.alignFill_){var e=Object(z["a"])(this.renderedTransform_,[0,0]),n=512*this.pixelRatio;t.save(),t.translate(e[0]%n,e[1]%n),t.rotate(this.viewRotation_)}t.fill(),this.alignFill_&&t.restore()},t.prototype.setStrokeStyle_=function(t,e){t["strokeStyle"]=e[1],t.lineWidth=e[2],t.lineCap=e[3],t.lineJoin=e[4],t.miterLimit=e[5],t.setLineDash&&(t.lineDashOffset=e[7],t.setLineDash(e[6]))},t.prototype.drawLabelWithPointPlacement_=function(t,e,n,r){var i=this.textStates[e],o=this.createLabel(t,e,r,n),s=this.strokeStates[n],a=this.pixelRatio,u=tt(Array.isArray(t)?t[0]:t,i.textAlign||d["l"]),c=A[i.textBaseline||d["m"]],l=s&&s.lineWidth?s.lineWidth:0,h=o.width/a-2*i.scale[0],f=u*h+2*(.5-u)*l,p=c*o.height/a+2*(.5-c)*l;return{label:o,anchorX:f,anchorY:p}},t.prototype.execute_=function(t,e,n,r,i,o,s,a){var u;this.pixelCoordinates_&&Object(g["b"])(n,this.renderedTransform_)?u=this.pixelCoordinates_:(this.pixelCoordinates_||(this.pixelCoordinates_=[]),u=Object(X["c"])(this.coordinates,0,this.coordinates.length,2,n,this.pixelCoordinates_),Object(z["j"])(this.renderedTransform_,n));var l,h,f,y,v,_,m,b,E,w,x,O,S,C,I,P,R=0,T=r.length,L=0,M=0,N=0,F=null,j=null,D=this.coordinateCache_,k=this.viewRotation_,G=Math.round(1e12*Math.atan2(-n[1],n[0]))/1e12,B={context:t,pixelRatio:this.pixelRatio,resolution:this.resolution,rotation:k},U=this.instructions!=r||this.overlaps?0:200;while(RU&&(this.fill_(t),M=0),N>U&&(t.stroke(),N=0),M||N||(t.beginPath(),y=NaN,v=NaN),++R;break;case c.CIRCLE:L=Y[1];var H=u[L],Z=u[L+1],K=u[L+2],J=u[L+3],$=K-H,tt=J-Z,et=Math.sqrt($*$+tt*tt);t.moveTo(H+et,Z),t.arc(H,Z,et,0,2*Math.PI,!0),++R;break;case c.CLOSE_PATH:t.closePath(),++R;break;case c.CUSTOM:L=Y[1],l=Y[2];var nt=Y[3],rt=Y[4],it=6==Y.length?Y[5]:void 0;B.geometry=nt,B.feature=S,R in D||(D[R]=[]);var ot=D[R];it?it(u,L,l,2,ot):(ot[0]=u[L],ot[1]=u[L+1],ot.length=2),rt(ot,B),++R;break;case c.DRAW_IMAGE:L=Y[1],l=Y[2],b=Y[3],h=Y[4],f=Y[5];var st=Y[6],at=Y[7],ut=Y[8],ct=Y[9],lt=Y[10],ht=Y[11],ft=Y[12],pt=Y[13],dt=Y[14],gt=Y[15];if(!b&&Y.length>=20){E=Y[19],w=Y[20],x=Y[21],O=Y[22];var yt=this.drawLabelWithPointPlacement_(E,w,x,O);b=yt.label,Y[3]=b;var vt=Y[23];h=(yt.anchorX-vt)*this.pixelRatio,Y[4]=h;var _t=Y[24];f=(yt.anchorY-_t)*this.pixelRatio,Y[5]=f,st=b.height,Y[6]=st,pt=b.width,Y[13]=pt}var mt=void 0;Y.length>25&&(mt=Y[25]);var bt=void 0,Et=void 0,wt=void 0;Y.length>17?(bt=Y[16],Et=Y[17],wt=Y[18]):(bt=d["j"],Et=!1,wt=!1),lt&&G?ht+=k:lt||G||(ht-=k);for(var xt=0;L0){if(!o||"Image"!==h&&"Text"!==h||-1!==o.indexOf(t)){var c=(f[a]-3)/4,p=r-c%s,d=r-(c/s|0),g=i(t,e,p*p+d*d);if(g)return g}l.clearRect(0,0,s,s);break}}var y,v,_,m,b,E=Object.keys(this.executorsByZIndex_).map(Number);for(E.sort(g["i"]),y=E.length-1;y>=0;--y){var w=E[y].toString();for(_=this.executorsByZIndex_[w],v=st.length-1;v>=0;--v)if(h=st[v],m=_[h],void 0!==m&&(b=m.executeHitDetection(l,a,n,d,c),b))return b}},t.prototype.getClipCoords=function(t){var e=this.maxExtent_;if(!e)return null;var n=e[0],r=e[1],i=e[2],o=e[3],s=[n,r,n,o,i,o,i,r];return Object(X["c"])(s,0,8,2,t,s),s},t.prototype.isEmpty=function(){return Object(ot["d"])(this.executorsByZIndex_)},t.prototype.execute=function(t,e,n,r,i,o,s){var a=Object.keys(this.executorsByZIndex_).map(Number);a.sort(g["i"]),this.maxExtent_&&(t.save(),this.clip(t,n));var u,c,l,h,f,p,d=o||st;for(s&&a.reverse(),u=0,c=a.length;un)break;var a=r[s];a||(a=[],r[s]=a),a.push(4*((t+i)*e+(t+o))+3),i>0&&a.push(4*((t-i)*e+(t+o))+3),o>0&&(a.push(4*((t+i)*e+(t-o))+3),i>0&&a.push(4*((t-i)*e+(t-o))+3))}for(var u=[],c=(i=0,r.length);id[2])++v,_=y*v,c.push(this.getRenderTransform(r,i,o,gt,l,h,_).slice()),g-=y}this.hitDetectionImageData_=yt(n,c,this.renderedFeatures_,u.getStyleFunction(),a,i,o)}e(vt(t,this.renderedFeatures_,this.hitDetectionImageData_))}.bind(this))},e.prototype.forEachFeatureAtCoordinate=function(t,e,n,r,i){var o=this;if(this.replayGroup_){var s,a=e.viewState.resolution,u=e.viewState.rotation,c=this.getLayer(),l={},h=function(t,e,n){var o=Object(L["c"])(t),s=l[o];if(s){if(!0!==s&&nE[0]&&O[2]>E[2]&&b.push([O[0]-w,O[1],O[2]-w,O[3]])}if(this.ready&&this.renderedResolution_==l&&this.renderedRevision_==f&&this.renderedRenderOrder_==y&&Object(p["g"])(this.wrappedRenderedExtent_,_))return Object(g["b"])(this.renderedExtent_,m)||(this.hitDetectionImageData_=null,this.renderedExtent_=m),this.renderedCenter_=v,this.replayGroupChanged=!1,!0;this.replayGroup_=null;var S,C=new G(Object(_t["c"])(l,h),_,l,h);this.getLayer().getDeclutter()&&(S=new G(Object(_t["c"])(l,h),_,l,h));var I,P=Object(mt["l"])();if(P){for(var R=0,T=b.length;R0}}else if(t.type==i["a"].POINTERDOWN){var r=this.handleDownEvent(t);this.handlingDownUpSequence=r,e=this.stopDown(r)}else t.type==i["a"].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}(r["a"]);function a(t){for(var e=t.length,n=0,r=0,i=0;i0&&(this.newTiles_=!0):u.setState(p["a"].LOADED)),this.isDrawableTile(u)||(u=u.getInterimTile()),u},e.prototype.getData=function(t){var e=this.frameState;if(!e)return null;var n=this.getLayer(),r=Object(g["a"])(e.pixelToCoordinateTransform,t.slice()),i=n.getExtent();if(i&&!Object(y["f"])(i,r))return null;for(var o=e.pixelRatio,s=e.viewState.projection,a=e.viewState,u=n.getRenderSource(),c=u.getTileGridForProjection(a.projection),f=u.getTilePixelRatio(e.pixelRatio),d=c.getZForResolution(a.resolution);d>=c.getMinZoom();--d){var v=c.getTileCoordForCoordAndZ(r,d),_=u.getTile(d,v[1],v[2],o,s);if(!(_ instanceof l["a"]||_ instanceof h["a"]))return null;if(_.getState()===p["a"].LOADED){var m=c.getOrigin(d),E=Object(b["c"])(c.getTileSize(d)),w=c.getResolution(d),x=Math.floor(f*((r[0]-m[0])/w-v[1]*E[0])),O=Math.floor(f*((m[1]-r[1])/w-v[2]*E[1])),S=Math.round(f*u.getGutterForProjection(a.projection));return this.getImageData(_.getImage(),x+S,O+S)}}return null},e.prototype.loadedTileCallback=function(e,n,r){return!!this.isDrawableTile(r)&&t.prototype.loadedTileCallback.call(this,e,n,r)},e.prototype.prepareFrame=function(t){return!!this.getLayer().getSource()},e.prototype.renderFrame=function(t,e){var n=t.layerStatesArray[t.layerIndex],r=t.viewState,i=r.projection,s=r.resolution,a=r.center,u=r.rotation,c=t.pixelRatio,l=this.getLayer(),h=l.getSource(),f=h.getRevision(),b=h.getTileGridForProjection(i),E=b.getZForResolution(s,h.zDirection),w=b.getResolution(E),x=t.extent,O=t.viewState.resolution,S=h.getTilePixelRatio(c),C=Math.round(Object(y["E"])(x)/O*c),I=Math.round(Object(y["z"])(x)/O*c),P=n.extent&&Object(v["f"])(n.extent,i);P&&(x=Object(y["A"])(x,Object(v["f"])(n.extent,i)));var R=w*C/2/S,T=w*I/2/S,L=[a[0]-R,a[1]-T,a[0]+R,a[1]+T],M=b.getTileRangeForExtentAndZ(x,E),N={};N[E]={};var A=this.createLoadedTileFinder(h,i,N),F=this.tmpExtent,j=this.tmpTileRange_;this.newTiles_=!1;for(var D=u?Object(y["B"])(r.center,O,u,t.size):void 0,k=M.minX;k<=M.maxX;++k)for(var G=M.minY;G<=M.maxY;++G)if(!u||b.tileCoordIntersectsViewport([E,k,G],D)){var B=this.getTile(E,k,G,t);if(this.isDrawableTile(B)){var U=Object(_["c"])(this);if(B.getState()==p["a"].LOADED){N[E][B.tileCoord.toString()]=B;var z=B.inTransition(U);z&&1!==n.opacity&&(B.endTransition(U),z=!1),this.newTiles_||!z&&-1!==this.renderedTiles.indexOf(B)||(this.newTiles_=!0)}if(1===B.getAlpha(U,t.time))continue}var Y=b.getTileCoordChildTileRange(B.tileCoord,j,F),X=!1;Y&&(X=A(E+1,Y)),X||b.forEachTileCoordParentTileRange(B.tileCoord,A,j,F)}var V=w/s*c/S;Object(g["b"])(this.pixelTransform,t.size[0]/2,t.size[1]/2,1/c,1/c,u,-C/2,-I/2);var q=Object(g["k"])(this.pixelTransform);this.useContainer(e,q,this.getBackground(t));var W=this.context,H=W.canvas;Object(g["d"])(this.inversePixelTransform,this.pixelTransform),Object(g["b"])(this.tempTransform,C/2,I/2,V,V,0,-C/2,-I/2),H.width!=C||H.height!=I?(H.width=C,H.height=I):this.containerReused||W.clearRect(0,0,C,I),P&&this.clipUnrotated(W,t,P),h.getInterpolate()||Object(o["a"])(W,d["a"]),this.preRender(W,t),this.renderedTiles.length=0;var Z,K,J,Q=Object.keys(N).map(Number);Q.sort(m["i"]),1!==n.opacity||this.containerReused&&!h.getOpaque(t.viewState.projection)?(Z=[],K=[]):Q=Q.reverse();for(var $=Q.length-1;$>=0;--$){var tt=Q[$],et=h.getTilePixelSize(tt,c,i),nt=b.getResolution(tt),rt=nt/w,it=et[0]*rt*V,ot=et[1]*rt*V,st=b.getTileCoordForCoordAndZ(Object(y["C"])(L),tt),at=b.getTileCoordExtent(st),ut=Object(g["a"])(this.tempTransform,[S*(at[0]-L[0])/w,S*(L[3]-at[3])/w]),ct=S*h.getGutterForProjection(i),lt=N[tt];for(var ht in lt){B=lt[ht];var ft=B.tileCoord,pt=st[1]-ft[1],dt=Math.round(ut[0]-(pt-1)*it),gt=st[2]-ft[2],yt=Math.round(ut[1]-(gt-1)*ot),vt=(k=Math.round(ut[0]-pt*it),G=Math.round(ut[1]-gt*ot),dt-k),_t=yt-G,mt=E===tt,bt=(z=mt&&1!==B.getAlpha(Object(_["c"])(this),t.time),!1);if(!z)if(Z){J=[k,G,k+vt,G,k+vt,G+_t,k,G+_t];for(var Et=0,wt=Z.length;Etl)if(a=u[l++],a!=a)return!0}else for(;c>l;l++)if((t||l in u)&&u[l]===n)return t||l||0;return!t&&-1}};t.exports={includes:s(!0),indexOf:s(!1)}},"4d98":function(t,e,n){"use strict";function r(t,e,n,r){while(e0}function o(t,e,n,r,o){for(var s=void 0!==o&&o,a=0,u=n.length;a0?i(r(t),9007199254740991):0}},"521b":function(t,e,n){"use strict";e["a"]={XY:"XY",XYZ:"XYZ",XYM:"XYM",XYZM:"XYZM"}},5564:function(t,e,n){"use strict";var r=n("e269"),i=n("df4c"),o=n("1300"),s=n("92fa"),a=n("38f3"),u=n("7fc9"),c=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 r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),l=function(t){function e(e){var n=t.call(this)||this;n.on,n.once,n.un,n.background_=e.background;var r=Object(a["a"])({},e);return"object"===typeof e.properties&&(delete r.properties,Object(a["a"])(r,e.properties)),r[i["a"].OPACITY]=void 0!==e.opacity?e.opacity:1,Object(s["a"])("number"===typeof r[i["a"].OPACITY],64),r[i["a"].VISIBLE]=void 0===e.visible||e.visible,r[i["a"].Z_INDEX]=e.zIndex,r[i["a"].MAX_RESOLUTION]=void 0!==e.maxResolution?e.maxResolution:1/0,r[i["a"].MIN_RESOLUTION]=void 0!==e.minResolution?e.minResolution:0,r[i["a"].MIN_ZOOM]=void 0!==e.minZoom?e.minZoom:-1/0,r[i["a"].MAX_ZOOM]=void 0!==e.maxZoom?e.maxZoom:1/0,n.className_=void 0!==r.className?r.className:"ol-layer",delete r.className,n.setProperties(r),n.state_=null,n}return c(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=Object(u["b"])(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 Object(o["b"])()},e.prototype.getLayerStatesArray=function(t){return Object(o["b"])()},e.prototype.getExtent=function(){return this.get(i["a"].EXTENT)},e.prototype.getMaxResolution=function(){return this.get(i["a"].MAX_RESOLUTION)},e.prototype.getMinResolution=function(){return this.get(i["a"].MIN_RESOLUTION)},e.prototype.getMinZoom=function(){return this.get(i["a"].MIN_ZOOM)},e.prototype.getMaxZoom=function(){return this.get(i["a"].MAX_ZOOM)},e.prototype.getOpacity=function(){return this.get(i["a"].OPACITY)},e.prototype.getSourceState=function(){return Object(o["b"])()},e.prototype.getVisible=function(){return this.get(i["a"].VISIBLE)},e.prototype.getZIndex=function(){return this.get(i["a"].Z_INDEX)},e.prototype.setBackground=function(t){this.background_=t,this.changed()},e.prototype.setExtent=function(t){this.set(i["a"].EXTENT,t)},e.prototype.setMaxResolution=function(t){this.set(i["a"].MAX_RESOLUTION,t)},e.prototype.setMinResolution=function(t){this.set(i["a"].MIN_RESOLUTION,t)},e.prototype.setMaxZoom=function(t){this.set(i["a"].MAX_ZOOM,t)},e.prototype.setMinZoom=function(t){this.set(i["a"].MIN_ZOOM,t)},e.prototype.setOpacity=function(t){Object(s["a"])("number"===typeof t,64),this.set(i["a"].OPACITY,t)},e.prototype.setVisible=function(t){this.set(i["a"].VISIBLE,t)},e.prototype.setZIndex=function(t){this.set(i["a"].Z_INDEX,t)},e.prototype.disposeInternal=function(){this.state_&&(this.state_.layer=null,this.state_=null),t.prototype.disposeInternal.call(this)},e}(r["a"]);e["a"]=l},5692:function(t,e,n){var r=n("c430"),i=n("c6cd");(t.exports=function(t,e){return i[t]||(i[t]=void 0!==e?e:{})})("versions",[]).push({version:"3.27.2",mode:r?"pure":"global",copyright:"© 2014-2023 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.27.2/LICENSE",source:"https://github.com/zloirock/core-js"})},"56ef":function(t,e,n){var r=n("d066"),i=n("e330"),o=n("241c"),s=n("7418"),a=n("825a"),u=i([].concat);t.exports=r("Reflect","ownKeys")||function(t){var e=o.f(a(t)),n=s.f;return n?u(e,n(t)):e}},"577e":function(t,e,n){var r=n("f5df"),i=String;t.exports=function(t){if("Symbol"===r(t))throw TypeError("Cannot convert a Symbol value to a string");return i(t)}},"57cb":function(t,e,n){"use strict";n.d(e,"b",(function(){return i})),n.d(e,"a",(function(){return o})),n.d(e,"c",(function(){return s})),n.d(e,"d",(function(){return a}));var r=n("9f5e");function i(){return!0}function o(){return!1}function s(){}function a(t){var e,n,i,o=!1;return function(){var s=Array.prototype.slice.call(arguments);return o&&this===i&&Object(r["b"])(s,n)||(o=!0,i=this,n=s,e=t.apply(this,arguments)),e}}},5831:function(t,e,n){"use strict";var r=n("e300"),i=n("183a"),o=n("cef7"),s=n("01d4"),a=n("7b4f"),u=n("25a5"),c=n.n(u),l=n("0af5"),h=n("1300"),f=n("38f3"),p=function(){function t(t){this.rbush_=new c.a(t),this.items_={}}return t.prototype.insert=function(t,e){var n={minX:t[0],minY:t[1],maxX:t[2],maxY:t[3],value:e};this.rbush_.insert(n),this.items_[Object(h["c"])(e)]=n},t.prototype.load=function(t,e){for(var n=new Array(e.length),r=0,i=e.length;r=200&&a.status<300){var r=e.getType(),u=void 0;"json"==r||"text"==r?u=a.responseText:"xml"==r?(u=a.responseXML,u||(u=(new DOMParser).parseFromString(a.responseText,"application/xml"))):"arraybuffer"==r&&(u=a.response),u?o(e.readFeatures(u,{extent:n,featureProjection:i}),e.readProjection(u)):s()}else s()},a.onerror=s,a.send()}function O(t,e){return function(n,r,i,o,s){var a=this;x(t,e,n,r,i,(function(t,e){a.addFeatures(t),void 0!==o&&o(t)}),s||v["c"])}}var S=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 r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),C=function(t){function e(e,n,r){var i=t.call(this,e)||this;return i.feature=n,i.features=r,i}return S(e,t),e}(o["a"]),I=function(t){function e(e){var n=this,i=e||{};n=t.call(this,{attributions:i.attributions,interpolate:!0,projection:void 0,state:"ready",wrapX:void 0===i.wrapX||i.wrapX})||this,n.on,n.once,n.un,n.loader_=v["c"],n.format_=i.format,n.overlaps_=void 0===i.overlaps||i.overlaps,n.url_=i.url,void 0!==i.loader?n.loader_=i.loader:void 0!==n.url_&&(Object(m["a"])(n.format_,7),n.loader_=O(n.url_,n.format_)),n.strategy_=void 0!==i.strategy?i.strategy:_;var o,s,a=void 0===i.useSpatialIndex||i.useSpatialIndex;return n.featuresRtree_=a?new d:null,n.loadedExtentsRtree_=new d,n.loadingExtentsCount_=0,n.nullGeometryFeatures_={},n.idIndex_={},n.uidIndex_={},n.featureChangeKeys_={},n.featuresCollection_=null,Array.isArray(i.features)?s=i.features:i.features&&(o=i.features,s=o.getArray()),a||void 0!==o||(o=new r["a"](s)),void 0!==s&&n.addFeaturesInternal(s),void 0!==o&&n.bindFeaturesCollection_(o),n}return S(e,t),e.prototype.addFeature=function(t){this.addFeatureInternal(t),this.changed()},e.prototype.addFeatureInternal=function(t){var e=Object(h["c"])(t);if(this.addToIndex_(e,t)){this.setupChangeEvents_(e,t);var n=t.getGeometry();if(n){var r=n.getExtent();this.featuresRtree_&&this.featuresRtree_.insert(r,t)}else this.nullGeometryFeatures_[e]=t;this.dispatchEvent(new C(y["a"].ADDFEATURE,t))}else this.featuresCollection_&&this.featuresCollection_.remove(t)},e.prototype.setupChangeEvents_=function(t,e){this.featureChangeKeys_[t]=[Object(E["a"])(e,s["a"].CHANGE,this.handleFeatureChange_,this),Object(E["a"])(e,a["a"].PROPERTYCHANGE,this.handleFeatureChange_,this)]},e.prototype.addToIndex_=function(t,e){var n=!0,r=e.getId();return void 0!==r&&(r.toString()in this.idIndex_?n=!1:this.idIndex_[r.toString()]=e),n&&(Object(m["a"])(!(t in this.uidIndex_),30),this.uidIndex_[t]=e),n},e.prototype.addFeatures=function(t){this.addFeaturesInternal(t),this.changed()},e.prototype.addFeaturesInternal=function(t){for(var e=[],n=[],r=[],i=0,o=t.length;i0},e.prototype.refresh=function(){this.clear(!0),this.loadedExtentsRtree_.clear(),t.prototype.refresh.call(this)},e.prototype.removeLoadedExtent=function(t){var e,n=this.loadedExtentsRtree_;n.forEachInExtent(t,(function(n){if(Object(l["o"])(n.extent,t))return e=n,!0})),e&&n.remove(e)},e.prototype.removeFeature=function(t){if(t){var e=Object(h["c"])(t);e in this.nullGeometryFeatures_?delete this.nullGeometryFeatures_[e]:this.featuresRtree_&&this.featuresRtree_.remove(t);var n=this.removeFeatureInternal(t);n&&this.changed()}},e.prototype.removeFeatureInternal=function(t){var e=Object(h["c"])(t),n=this.featureChangeKeys_[e];if(n){n.forEach(E["c"]),delete this.featureChangeKeys_[e];var r=t.getId();return void 0!==r&&delete this.idIndex_[r.toString()],delete this.uidIndex_[e],this.dispatchEvent(new C(y["a"].REMOVEFEATURE,t)),t}},e.prototype.removeFromIdIndex_=function(t){var e=!1;for(var n in this.idIndex_)if(this.idIndex_[n]===t){delete this.idIndex_[n],e=!0;break}return e},e.prototype.setLoader=function(t){this.loader_=t},e.prototype.setUrl=function(t){Object(m["a"])(this.format_,7),this.url_=t,this.setLoader(O(t,this.format_))},e}(g["a"]);e["a"]=I},5926:function(t,e,n){var r=n("b42e");t.exports=function(t){var e=+t;return e!==e||0===e?0:r(e)}},"592d":function(t,e,n){"use strict";e["a"]={POSTRENDER:"postrender",MOVESTART:"movestart",MOVEEND:"moveend",LOADSTART:"loadstart",LOADEND:"loadend"}},5938:function(t,e,n){"use strict";function r(t,e,n,r){for(var i=t[e],o=t[e+1],s=0,a=e+r;a=0))throw new Error("precision must be a positive number");var n=Math.pow(10,e||0);return Math.round(t*n)/n}function b(t,e){void 0===e&&(e="kilometers");var n=r[e];if(!n)throw new Error(e+" units is invalid");return t*n}function E(t,e){void 0===e&&(e="kilometers");var n=r[e];if(!n)throw new Error(e+" units is invalid");return t/n}function w(t,e){return O(E(t,e))}function x(t){var e=t%360;return e<0&&(e+=360),e}function O(t){return t%(2*Math.PI)*180/Math.PI}function S(t){return t%360*Math.PI/180}function C(t,e,n){if(void 0===e&&(e="kilometers"),void 0===n&&(n="kilometers"),!(t>=0))throw new Error("length must be a positive number");return b(E(t,e),n)}function I(t,e,n){if(void 0===e&&(e="meters"),void 0===n&&(n="kilometers"),!(t>=0))throw new Error("area must be a positive number");var r=o[e];if(!r)throw new Error("invalid original units");var i=o[n];if(!i)throw new Error("invalid final units");return t/r*i}function P(t){return!isNaN(t)&&null!==t&&!Array.isArray(t)}function R(t){return!!t&&t.constructor===Object}function T(t){if(!t)throw new Error("bbox is required");if(!Array.isArray(t))throw new Error("bbox must be an Array");if(4!==t.length&&6!==t.length)throw new Error("bbox must be an Array of 4 or 6 numbers");t.forEach((function(t){if(!P(t))throw new Error("bbox must only contain numbers")}))}function L(t){if(!t)throw new Error("id is required");if(-1===["string","number"].indexOf(typeof t))throw new Error("id must be a number or a string")}var M=Object.freeze({__proto__:null,earthRadius:n,factors:r,unitsFactors:i,areaFactors:o,feature:s,geometry:a,point:u,points:c,polygon:l,polygons:h,lineString:f,lineStrings:p,featureCollection:d,multiLineString:g,multiPoint:y,multiPolygon:v,geometryCollection:_,round:m,radiansToLength:b,lengthToRadians:E,lengthToDegrees:w,bearingToAzimuth:x,radiansToDegrees:O,degreesToRadians:S,convertLength:C,convertArea:I,isNumber:P,isObject:R,validateBBox:T,validateId:L});function N(t,e,n){if(null!==t)for(var r,i,o,s,a,u,c,l,h=0,f=0,p=t.type,d="FeatureCollection"===p,g="Feature"===p,y=d?t.features.length:1,v=0;va||p>u||d>c)return s=o,a=n,u=p,c=d,void(i=0);var g=f([s,o],t.properties);if(!1===e(g,n,r,d,i))return!1;i++,s=o}))&&void 0}}}))}function V(t,e,n){var r=n,i=!1;return X(t,(function(t,o,s,a,u){r=!1===i&&void 0===n?t:e(r,t,o,s,a,u),i=!0})),r}function q(t,e){if(!t)throw new Error("geojson is required");z(t,(function(t,n,r){if(null!==t.geometry){var i=t.geometry.type,o=t.geometry.coordinates;switch(i){case"LineString":if(!1===e(t,n,r,0,0))return!1;break;case"Polygon":for(var s=0;st[0]&&(e[0]=t[0]),e[1]>t[1]&&(e[1]=t[1]),e[2]=2&&!Array.isArray(t[0])&&!Array.isArray(t[1]))return t;throw new Error("coord must be GeoJSON Point or an Array of numbers")}function $(t){if(Array.isArray(t))return t;if("Feature"===t.type){if(null!==t.geometry)return t.geometry.coordinates}else if(t.coordinates)return t.coordinates;throw new Error("coords must be GeoJSON Feature, Geometry Object or an Array")}function tt(t){if(t.length>1&&P(t[0])&&P(t[1]))return!0;if(Array.isArray(t[0])&&t[0].length)return tt(t[0]);throw new Error("coordinates must only contain numbers")}function et(t,e,n){if(!e||!n)throw new Error("type and name required");if(!t||t.type!==e)throw new Error("Invalid input to "+n+": must be a "+e+", given "+t.type)}function nt(t,e,n){if(!t)throw new Error("No feature passed");if(!n)throw new Error(".featureOf() requires a name");if(!t||"Feature"!==t.type||!t.geometry)throw new Error("Invalid input to "+n+", Feature with geometry required");if(!t.geometry||t.geometry.type!==e)throw new Error("Invalid input to "+n+": must be a "+e+", given "+t.geometry.type)}function rt(t,e,n){if(!t)throw new Error("No featureCollection passed");if(!n)throw new Error(".collectionOf() requires a name");if(!t||"FeatureCollection"!==t.type)throw new Error("Invalid input to "+n+", FeatureCollection required");for(var r=0,i=t.features;r * v. 1.2.0 * https://github.com/RaumZeit/MarchingSquares.js * * MarchingSquaresJS is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * MarchingSquaresJS is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Affero General Public License for more details. * * As additional permission under GNU Affero General Public License version 3 * section 7, third-party projects (personal or commercial) may distribute, * include, or link against UNMODIFIED VERSIONS of MarchingSquaresJS without the * requirement that said third-party project for that reason alone becomes * subject to any requirement of the GNU Affero General Public License version 3. * Any modifications to MarchingSquaresJS, however, must be shared with the public * and made available. * * In summary this: * - allows you to use MarchingSquaresJS at no cost * - allows you to use MarchingSquaresJS for both personal and commercial purposes * - allows you to distribute UNMODIFIED VERSIONS of MarchingSquaresJS under any * license as long as this license notice is included * - enables you to keep the source code of your program that uses MarchingSquaresJS * undisclosed * - forces you to share any modifications you have made to MarchingSquaresJS, * e.g. bug-fixes * * You should have received a copy of the GNU Affero General Public License * along with MarchingSquaresJS. If not, see . */function dt(t,e,n){n=n||{};for(var r=Object.keys(ft),i=0;i=0&&y>=0&&y=0;h--)if(Math.abs(e[h][0][0]-c)<=r&&Math.abs(e[h][0][1]-l)<=r){for(var f=a.path.length-2;f>=0;--f)e[h].unshift(a.path[f]);u=!0;break}u||(e[n++]=a.path)}var p}))})),e}(function(t,e){for(var n=t.length-1,r=t[0].length-1,i={rows:n,cols:r,cells:[]},o=0;o=e?8:0,a|=c>=e?4:0,a|=l>=e?2:0;var f,p,d,g,y=!1;if(5===(a|=h>=e?1:0)||10===a){var v=(u+c+l+h)/4;5===a&&vn;){if(r-n>600){var o=r-n+1,s=e-n+1,a=Math.log(o),u=.5*Math.exp(2*a/3),c=.5*Math.sqrt(a*u*(o-u)/o)*(s-o/2<0?-1:1);xt(t,e,Math.max(n,Math.floor(e-s*u/o+c)),Math.min(r,Math.floor(e+(o-s)*u/o+c)),i)}var l=t[e],h=n,f=r;for(Ot(t,n,e),i(t[r],l)>0&&Ot(t,n,r);h0;)f--}0===i(t[n],l)?Ot(t,n,f):Ot(t,++f,r),f<=e&&(n=f+1),e<=f&&(r=f-1)}}function Ot(t,e,n){var r=t[e];t[e]=t[n],t[n]=r}function St(t,e){return te?1:0}bt.default=Et;var Ct=Pt,It=Pt;function Pt(t,e){if(!(this instanceof Pt))return new Pt(t,e);this._maxEntries=Math.max(4,t||9),this._minEntries=Math.max(2,Math.ceil(.4*this._maxEntries)),e&&this._initFormat(e),this.clear()}function Rt(t,e,n){if(!n)return e.indexOf(t);for(var r=0;r=t.minX&&e.maxY>=t.minY}function Gt(t){return{children:t,height:1,leaf:!0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}}function Bt(t,e,n,r,i){for(var o,s=[e,n];s.length;)(n=s.pop())-(e=s.pop())<=r||(o=e+Math.ceil((n-e)/r/2)*r,bt(t,o,e,n,i),s.push(e,o,o,n))}function Ut(t){var e={exports:{}};return t(e,e.exports),e.exports}Pt.prototype={all:function(){return this._all(this.data,[])},search:function(t){var e=this.data,n=[],r=this.toBBox;if(!kt(t,e))return n;for(var i,o,s,a,u=[];e;){for(i=0,o=e.children.length;i=0&&o[e].children.length>this._maxEntries;)this._split(o,e),e--;this._adjustParentBBoxes(i,o,e)},_split:function(t,e){var n=t[e],r=n.children.length,i=this._minEntries;this._chooseSplitAxis(n,i,r);var o=this._chooseSplitIndex(n,i,r),s=Gt(n.children.splice(o,n.children.length-o));s.height=n.height,s.leaf=n.leaf,Tt(n,this.toBBox),Tt(s,this.toBBox),e?t[e-1].children.push(s):this._splitRoot(n,s)},_splitRoot:function(t,e){this.data=Gt([t,e]),this.data.height=t.height+1,this.data.leaf=!1,Tt(this.data,this.toBBox)},_chooseSplitIndex:function(t,e,n){var r,i,o,s,a,u,c,l,h,f,p,d,g,y;for(u=c=1/0,r=e;r<=n-e;r++)i=Lt(t,0,r,this.toBBox),o=Lt(t,r,n,this.toBBox),h=i,f=o,p=void 0,d=void 0,g=void 0,y=void 0,p=Math.max(h.minX,f.minX),d=Math.max(h.minY,f.minY),g=Math.min(h.maxX,f.maxX),y=Math.min(h.maxY,f.maxY),s=Math.max(0,g-p)*Math.max(0,y-d),a=Ft(i)+Ft(o),s=e;i--)o=t.children[i],Mt(u,t.leaf?s(o):o),c+=jt(u);return c},_adjustParentBBoxes:function(t,e,n){for(var r=n;r>=0;r--)Mt(e[r],t)},_condense:function(t){for(var e,n=t.length-1;n>=0;n--)0===t[n].children.length?n>0?(e=t[n-1].children).splice(e.indexOf(t[n]),1):this.clear():Tt(t[n],this.toBBox)},_initFormat:function(t){var e=["return a"," - b",";"];this.compareMinX=new Function("a","b",e.join(t[0])),this.compareMinY=new Function("a","b",e.join(t[1])),this.toBBox=new Function("a","return {minX: a"+t[0]+", minY: a"+t[1]+", maxX: a"+t[2]+", maxY: a"+t[3]+"};")}},Ct.default=It;var zt=function(t,e,n){var r=t*e,i=Yt*t,o=i-(i-t),s=t-o,a=Yt*e,u=a-(a-e),c=e-u,l=s*c-(r-o*u-s*u-o*c);return n?(n[0]=l,n[1]=r,n):[l,r]},Yt=+(Math.pow(2,27)+1),Xt=function(t,e){var n=0|t.length,r=0|e.length;if(1===n&&1===r)return function(t,e){var n=t+e,r=n-t,i=t-(n-r)+(e-r);return i?[i,n]:[n]}(t[0],e[0]);var i,o,s=new Array(n+r),a=0,u=0,c=0,l=Math.abs,h=t[u],f=l(h),p=e[c],d=l(p);f=r?(i=h,(u+=1)=r?(i=h,(u+=1)>1;return["sum(",n(t.slice(0,e)),",",n(t.slice(e)),")"].join("")}function r(t){if(2===t.length)return[["sum(prod(",t[0][0],",",t[1][1],"),prod(-",t[0][1],",",t[1][0],"))"].join("")];for(var i=[],o=0;o0){if(s<=0)return a;r=i+s}else{if(!(i<0))return a;if(s>=0)return a;r=-(i+s)}var u=33306690738754716e-32*r;return a>=u||a<=-u?a:o(t,e,n)},function(t,e,n,r){var i=t[0]-r[0],o=e[0]-r[0],a=n[0]-r[0],u=t[1]-r[1],c=e[1]-r[1],l=n[1]-r[1],h=t[2]-r[2],f=e[2]-r[2],p=n[2]-r[2],d=o*l,g=a*c,y=a*u,v=i*l,_=i*c,m=o*u,b=h*(d-g)+f*(y-v)+p*(_-m),E=7771561172376103e-31*((Math.abs(d)+Math.abs(g))*Math.abs(h)+(Math.abs(y)+Math.abs(v))*Math.abs(f)+(Math.abs(_)+Math.abs(m))*Math.abs(p));return b>E||-b>E?b:s(t,e,n,r)}];function u(t){var e=a[t.length];return e||(e=a[t.length]=i(t.length)),e.apply(void 0,t)}!function(){for(;a.length<=5;)a.push(i(a.length));for(var e=[],n=["slow"],r=0;r<=5;++r)e.push("a"+r),n.push("o"+r);var o=["function getOrientation(",e.join(),"){switch(arguments.length){case 0:case 1:return 0;"];for(r=2;r<=5;++r)o.push("case ",r,":return o",r,"(",e.slice(0,r).join(),");");o.push("}var s=new Array(arguments.length);for(var i=0;i1&&Kt(t[o[c-2]],t[o[c-1]],u)<=0;)c-=1,o.pop();for(o.push(a),c=s.length;c>1&&Kt(t[s[c-2]],t[s[c-1]],u)>=0;)c-=1,s.pop();s.push(a)}n=new Array(s.length+o.length-2);for(var l=0,h=(r=0,o.length);r0;--f)n[l++]=s[f];return n},Kt=Ht[3],Jt=$t,Qt=$t;function $t(t,e){if(!(this instanceof $t))return new $t(t,e);if(this.data=t||[],this.length=this.data.length,this.compare=e||te,this.length>0)for(var n=(this.length>>1)-1;n>=0;n--)this._down(n)}function te(t,e){return te?1:0}$t.prototype={push:function(t){this.data.push(t),this.length++,this._up(this.length-1)},pop:function(){if(0!==this.length){var t=this.data[0];return this.length--,this.length>0&&(this.data[0]=this.data[this.length],this._down(0)),this.data.pop(),t}},peek:function(){return this.data[0]},_up:function(t){for(var e=this.data,n=this.compare,r=e[t];t>0;){var i=t-1>>1,o=e[i];if(n(r,o)>=0)break;e[t]=o,t=i}e[t]=r},_down:function(t){for(var e=this.data,n=this.compare,r=this.length>>1,i=e[t];t=0)break;e[t]=a,t=o}e[t]=i}},Jt.default=Qt;var ee=function(t,e){for(var n=t[0],r=t[1],i=!1,o=0,s=e.length-1;or!=l>r&&n<(c-a)*(r-u)/(l-u)+a&&(i=!i)}return i},ne=Ht[3],re=oe,ie=oe;function oe(t,e,n){e=Math.max(0,void 0===e?2:e),n=n||0;for(var r,i=function(t){for(var e=t[0],n=t[0],r=t[0],i=t[0],o=0;or[0]&&(r=s),s[1]i[1]&&(i=s)}var a=[e,n,r,i],u=a.slice();for(o=0;oo||a.push({node:l,dist:h})}for(;a.length&&!a.peek().node.children;){var f=a.pop(),p=f.node,d=de(p,e,n),g=de(p,r,i);if(f.dist=e.minX&&t[0]<=e.maxX&&t[1]>=e.minY&&t[1]<=e.maxY}function le(t,e,n){for(var r,i,o,s,a=Math.min(t[0],e[0]),u=Math.min(t[1],e[1]),c=Math.max(t[0],e[0]),l=Math.max(t[1],e[1]),h=n.search({minX:a,minY:u,maxX:c,maxY:l}),f=0;f0!=ne(r,i,s)>0&&ne(o,s,r)>0!=ne(o,s,i)>0)return!1;return!0}function he(t){var e=t.p,n=t.next.p;return t.minX=Math.min(e[0],n[0]),t.minY=Math.min(e[1],n[1]),t.maxX=Math.max(e[0],n[0]),t.maxY=Math.max(e[1],n[1]),t}function fe(t,e){var n={p:t,prev:null,next:null,minX:0,minY:0,maxX:0,maxY:0};return e?(n.next=e.next,n.prev=e,e.next.prev=n,e.next=n):(n.prev=n,n.next=n),n}function pe(t,e){var n=t[0]-e[0],r=t[1]-e[1];return n*n+r*r}function de(t,e,n){var r=e[0],i=e[1],o=n[0]-r,s=n[1]-i;if(0!==o||0!==s){var a=((t[0]-r)*o+(t[1]-i)*s)/(o*o+s*s);a>1?(r=n[0],i=n[1]):a>0&&(r+=o*a,i+=s*a)}return(o=t[0]-r)*o+(s=t[1]-i)*s}function ge(t,e,n,r,i,o,s,a){var u,c,l,h,f=n-t,p=r-e,d=s-i,g=a-o,y=t-i,v=e-o,_=f*f+p*p,m=f*d+p*g,b=d*d+g*g,E=f*y+p*v,w=d*y+g*v,x=_*b-m*m,O=x,S=x;0===x?(c=0,O=1,h=w,S=b):(h=_*w-m*E,(c=m*w-b*E)<0?(c=0,h=w,S=b):c>O&&(c=O,h=w+m,S=b)),h<0?(h=0,-E<0?c=0:-E>_?c=O:(c=-E,O=_)):h>S&&(h=S,-E+m<0?c=0:-E+m>_?c=O:(c=-E+m,O=_));var C=(1-(l=0===h?0:h/S))*i+l*s-((1-(u=0===c?0:c/O))*t+u*n),I=(1-l)*o+l*a-((1-u)*e+u*r);return C*C+I*I}function ye(t,e){void 0===e&&(e={}),e.concavity=e.concavity||1/0;var n=[];if(N(t,(function(t){n.push([t[0],t[1]])})),!n.length)return null;var r=re(n,e.concavity);return r.length>3?l([r]):null}function ve(t,e,n){if(void 0===n&&(n={}),!t)throw new Error("point is required");if(!e)throw new Error("polygon is required");var r=Q(t),i=it(e),o=i.type,s=e.bbox,a=i.coordinates;if(s&&!1===function(t,e){return e[0]<=t[0]&&e[1]<=t[1]&&e[2]>=t[0]&&e[3]>=t[1]}(r,s))return!1;"Polygon"===o&&(a=[a]);for(var u=!1,c=0;ct[1]!=c>t[1]&&t[0]<(u-s)*(t[1]-a)/(c-a)+s&&(r=!r)}return r}function me(t,e){var n=[];return D(t,(function(t){var r=!1;if("Point"===t.geometry.type)B(e,(function(e){ve(t,e)&&(r=!0)})),r&&n.push(t);else{if("MultiPoint"!==t.geometry.type)throw new Error("Input geometry must be a Point or MultiPoint");var i=[];B(e,(function(e){N(t,(function(t){ve(t,e)&&(r=!0,i.push(t))}))})),r&&n.push(y(i))}})),d(n)}function be(t,e,n){void 0===n&&(n={});var r=Q(t),i=Q(e),o=S(i[1]-r[1]),s=S(i[0]-r[0]),a=S(r[1]),u=S(i[1]),c=Math.pow(Math.sin(o/2),2)+Math.pow(Math.sin(s/2),2)*Math.cos(a)*Math.cos(u);return b(2*Math.atan2(Math.sqrt(c),Math.sqrt(1-c)),n.units)}function Ee(t,e){var n=!1;return d(function(t){if(t.length<3)return[];t.sort(xe);for(var e,n,r,i,o,s,a=t.length-1,u=t[a].x,c=t[0].x,l=t[a].y,h=l,f=1e-12;a--;)t[a].yh&&(h=t[a].y);var p,d=c-u,g=h-l,y=d>g?d:g,v=.5*(c+u),_=.5*(h+l),m=[new we({__sentinel:!0,x:v-20*y,y:_-y},{__sentinel:!0,x:v,y:_+20*y},{__sentinel:!0,x:v+20*y,y:_-y})],b=[],E=[];for(a=t.length;a--;){for(E.length=0,p=m.length;p--;)(d=t[a].x-m[p].x)>0&&d*d>m[p].r?(b.push(m[p]),m.splice(p,1)):d*d+(g=t[a].y-m[p].y)*g>m[p].r||(E.push(m[p].a,m[p].b,m[p].b,m[p].c,m[p].c,m[p].a),m.splice(p,1));for(Oe(E),p=E.length;p;)n=E[--p],e=E[--p],r=t[a],i=n.x-e.x,o=n.y-e.y,s=2*(i*(r.y-n.y)-o*(r.x-n.x)),Math.abs(s)>f&&m.push(new we(e,n,r))}for(Array.prototype.push.apply(b,m),a=b.length;a--;)(b[a].a.__sentinel||b[a].b.__sentinel||b[a].c.__sentinel)&&b.splice(a,1);return b}(t.features.map((function(t){var r={x:t.geometry.coordinates[0],y:t.geometry.coordinates[1]};return e?r.z=t.properties[e]:3===t.geometry.coordinates.length&&(n=!0,r.z=t.geometry.coordinates[2]),r}))).map((function(t){var e=[t.a.x,t.a.y],r=[t.b.x,t.b.y],i=[t.c.x,t.c.y],o={};return n?(e.push(t.a.z),r.push(t.b.z),i.push(t.c.z)):o={a:t.a.z,b:t.b.z,c:t.c.z},l([[e,r,i,e]],o)})))}re.default=ie;var we=function(t,e,n){this.a=t,this.b=e,this.c=n;var r,i,o=e.x-t.x,s=e.y-t.y,a=n.x-t.x,u=n.y-t.y,c=o*(t.x+e.x)+s*(t.y+e.y),l=a*(t.x+n.x)+u*(t.y+n.y),h=2*(o*(n.y-e.y)-s*(n.x-e.x));this.x=(u*c-s*l)/h,this.y=(o*l-a*c)/h,r=this.x-t.x,i=this.y-t.y,this.r=r*r+i*i};function xe(t,e){return e.x-t.x}function Oe(t){var e,n,r,i,o,s=t.length;t:for(;s;)for(n=t[--s],e=t[--s],r=s;r;)if(o=t[--r],e===(i=t[--r])&&n===o||e===o&&n===i){t.splice(s,2),t.splice(r,2),s-=2;continue t}}function Se(t){if(!t)throw new Error("geojson is required");switch(t.type){case"Feature":return Ce(t);case"FeatureCollection":return function(t){var e={type:"FeatureCollection"};return Object.keys(t).forEach((function(n){switch(n){case"type":case"features":return;default:e[n]=t[n]}})),e.features=t.features.map((function(t){return Ce(t)})),e}(t);case"Point":case"LineString":case"Polygon":case"MultiPoint":case"MultiLineString":case"MultiPolygon":case"GeometryCollection":return Pe(t);default:throw new Error("unknown GeoJSON type")}}function Ce(t){var e={type:"Feature"};return Object.keys(t).forEach((function(n){switch(n){case"type":case"properties":case"geometry":return;default:e[n]=t[n]}})),e.properties=Ie(t.properties),e.geometry=Pe(t.geometry),e}function Ie(t){var e={};return t?(Object.keys(t).forEach((function(n){var r=t[n];"object"==typeof r?null===r?e[n]=null:Array.isArray(r)?e[n]=r.map((function(t){return t})):e[n]=Ie(r):e[n]=r})),e):e}function Pe(t){var e={type:t.type};return t.bbox&&(e.bbox=t.bbox),"GeometryCollection"===t.type?(e.geometries=t.geometries.map((function(t){return Pe(t)})),e):(e.coordinates=Re(t.coordinates),e)}function Re(t){var e=t;return"object"!=typeof e[0]?e.slice():e.map((function(t){return Re(t)}))}function Te(t,e){if(void 0===e&&(e={}),!R(e=e||{}))throw new Error("options is invalid");var n=e.mutate;if("FeatureCollection"!==ot(t))throw new Error("geojson must be a FeatureCollection");if(!t.features.length)throw new Error("geojson is empty");!1!==n&&void 0!==n||(t=Se(t));var r=[],i=W(t,(function(t,e){var n=function(t,e){var n,r=t.geometry.coordinates,i=e.geometry.coordinates,o=Le(r[0]),s=Le(r[r.length-1]),a=Le(i[0]),u=Le(i[i.length-1]);if(o===u)n=i.concat(r.slice(1));else if(a===s)n=r.concat(i.slice(1));else if(o===a)n=r.slice(1).reverse().concat(i);else{if(s!==u)return null;n=r.concat(i.reverse().slice(1))}return f(n)}(t,e);return n||(r.push(t),e)}));return i&&r.push(i),r.length?1===r.length?r[0]:g(r.map((function(t){return t.coordinates}))):null}function Le(t){return t[0].toString()+","+t[1].toString()}function Me(t){return t}function Ne(t,e){var n=function(t){if(null==t)return Me;var e,n,r=t.scale[0],i=t.scale[1],o=t.translate[0],s=t.translate[1];return function(t,a){a||(e=n=0);var u=2,c=t.length,l=new Array(c);for(l[0]=(e+=t[0])*r+o,l[1]=(n+=t[1])*i+s;u1)for(var o,a,u=1,c=s(i[0]);uc&&(a=i[0],i[0]=i[u],i[u]=a,c=o);return i})).filter((function(t){return t.length>0}))}}var je=Object.prototype.hasOwnProperty;function De(t,e,n,r,i,o){3===arguments.length&&(r=o=Array,i=null);for(var s=new r(t=1<=t)throw new Error("full hashmap");l=s[c=c+1&u]}return s[c]=r,a[c]=o,o}function h(r,o){for(var c=e(r)&u,l=s[c],h=0;l!=i;){if(n(l,r))return a[c];if(++h>=t)throw new Error("full hashmap");l=s[c=c+1&u]}return s[c]=r,a[c]=o,o}function f(r,o){for(var c=e(r)&u,l=s[c],h=0;l!=i;){if(n(l,r))return a[c];if(++h>=t)break;l=s[c=c+1&u]}return o}function p(){for(var t=[],e=0,n=s.length;e>7^Ue[2]^Ue[3])}function Ye(t){var e,n,r,i,o=t.coordinates,s=t.lines,a=t.rings,u=function(){for(var t=De(1.4*o.length,E,w,Int32Array,-1,Int32Array),e=new Int32Array(o.length),n=0,r=o.length;n=0){var o=h[n];i===e&&o===r||i===r&&o===e||(++p,f[n]=1)}else l[n]=e,h[n]=r}}function E(t){return ze(o[t])}function w(t,e){return ke(o[t],o[e])}c=l=h=null;var x,O=function(t,e,n,r,i){3===arguments.length&&(r=Array,i=null);for(var o=new r(t=1<=t)throw new Error("full hashset");u=o[a=a+1&s]}return o[a]=r,!0}function c(r){for(var a=e(r)&s,u=o[a],c=0;u!=i;){if(n(u,r))return!0;if(++c>=t)break;u=o[a=a+1&s]}return!1}function l(){for(var t=[],e=0,n=o.length;e>1);er&&(r=o),si&&(i=s)}function u(t){t.forEach(a)}function c(t){t.forEach(u)}for(var l in t)o(t[l]);return r>=e&&i>=n?[e,n,r,i]:void 0}(t=qe(t)),r=e>0&&n&&function(t,e,n){var r=e[0],i=e[1],o=e[2],s=e[3],a=o-r?(n-1)/(o-r):1,u=s-i?(n-1)/(s-i):1;function c(t){return[Math.round((t[0]-r)*a),Math.round((t[1]-i)*u)]}function l(t,e){for(var n,o,s,c,l,h=-1,f=0,p=t.length,d=new Array(p);++h2&&on(n[i-3],n[i-1],n[i-2])&&n.splice(n.length-2,1))}if(n.push(e[e.length-1]),i=n.length,rn(e[0],e[e.length-1])&&i<4)throw new Error("invalid polygon");return on(n[i-3],n[i-1],n[i-2])&&n.splice(n.length-2,1),n}function rn(t,e){return t[0]===e[0]&&t[1]===e[1]}function on(t,e,n){var r=n[0],i=n[1],o=t[0],s=t[1],a=e[0],u=e[1],c=a-o,l=u-s;return 0===(r-o)*l-(i-s)*c&&(Math.abs(c)>=Math.abs(l)?c>0?o<=r&&r<=a:a<=r&&r<=o:l>0?s<=i&&i<=u:u<=i&&i<=s)}function sn(t,e,n){var r=e.x,i=e.y,o=n.x-r,s=n.y-i;if(0!==o||0!==s){var a=((t.x-r)*o+(t.y-i)*s)/(o*o+s*s);a>1?(r=n.x,i=n.y):a>0&&(r+=o*a,i+=s*a)}return(o=t.x-r)*o+(s=t.y-i)*s}function an(t,e,n,r,i){for(var o,s=r,a=e+1;as&&(o=a,s=u)}s>r&&(o-e>1&&an(t,e,o,r,i),i.push(t[o]),n-o>1&&an(t,o,n,r,i))}function un(t,e){var n=t.length-1,r=[t[0]];return an(t,0,n,e,r),r.push(t[n]),r}function cn(t,e,n){if(t.length<=2)return t;var r=void 0!==e?e*e:1;return un(t=n?t:function(t,e){for(var n,r,i,o,s,a=t[0],u=[a],c=1,l=t.length;ce&&(u.push(n),a=n);return a!==n&&u.push(n),u}(t,r),r)}function ln(t,e,n){return cn(t.map((function(t){return{x:t[0],y:t[1],z:t[2]}})),e,n).map((function(t){return t.z?[t.x,t.y,t.z]:[t.x,t.y]}))}function hn(t,e,n){return t.map((function(t){var r=t.map((function(t){return{x:t[0],y:t[1]}}));if(r.length<4)throw new Error("invalid polygon");for(var i=cn(r,e,n).map((function(t){return[t.x,t.y]}));!fn(i);)i=cn(r,e-=.01*e,n).map((function(t){return[t.x,t.y]}));return i[i.length-1][0]===i[0][0]&&i[i.length-1][1]===i[0][1]||i.push(i[0]),i}))}function fn(t){return!(t.length<3)&&!(3===t.length&&t[2][0]===t[0][0]&&t[2][1]===t[0][1])}var pn=function(){function t(t){this.points=t.points||[],this.duration=t.duration||1e4,this.sharpness=t.sharpness||.85,this.centers=[],this.controls=[],this.stepLength=t.stepLength||60,this.length=this.points.length,this.delay=0;for(var e=0;et&&(e.push(r),n=i)}return e},t.prototype.vector=function(t){var e=this.pos(t+10),n=this.pos(t-10);return{angle:180*Math.atan2(e.y-n.y,e.x-n.x)/3.14,speed:Math.sqrt((n.x-e.x)*(n.x-e.x)+(n.y-e.y)*(n.y-e.y)+(n.z-e.z)*(n.z-e.z))}},t.prototype.pos=function(t){var e=t-this.delay;e<0&&(e=0),e>this.duration&&(e=this.duration-1);var n=e/this.duration;if(n>=1)return this.points[this.length-1];var r=Math.floor((this.points.length-1)*n);return function(t,e,n,r,i){var o=function(t){var e=t*t;return[e*t,3*e*(1-t),3*t*(1-t)*(1-t),(1-t)*(1-t)*(1-t)]}(t);return{x:i.x*o[0]+r.x*o[1]+n.x*o[2]+e.x*o[3],y:i.y*o[0]+r.y*o[1]+n.y*o[2]+e.y*o[3],z:i.z*o[0]+r.z*o[1]+n.z*o[2]+e.z*o[3]}}((this.length-1)*n-r,this.points[r],this.controls[r][1],this.controls[r+1][0],this.points[r+1])},t}();function dn(t,e){void 0===e&&(e={});for(var n=e.resolution||1e4,r=e.sharpness||.85,i=[],o=it(t).coordinates.map((function(t){return{x:t[0],y:t[1]}})),s=new pn({duration:n,points:o,sharpness:r}),a=function(t){var e=s.pos(t);Math.floor(t/100)%2==0&&i.push([e.x,e.y])},u=0;u=be(t.slice(0,2),[e,i])){var o=(n+i)/2;return[e,o-(r-e)/2,r,o+(r-e)/2]}var s=(e+r)/2;return[s-(i-n)/2,n,s+(i-n)/2,i]}function _n(t,e,n,r){void 0===r&&(r={});var i=Q(t),o=S(i[0]),s=S(i[1]),a=S(n),c=E(e,r.units),l=Math.asin(Math.sin(s)*Math.cos(c)+Math.cos(s)*Math.sin(c)*Math.cos(a));return u([O(o+Math.atan2(Math.sin(a)*Math.sin(c)*Math.cos(s),Math.cos(c)-Math.sin(s)*Math.sin(l))),O(l)],r.properties)}function mn(t,e,n){void 0===n&&(n={});for(var r=n.steps||64,i=n.properties?n.properties:!Array.isArray(t)&&"Feature"===t.type&&t.properties?t.properties:{},o=[],s=0;s80*n){r=o=t[0],i=s=t[1];for(var d=n;do&&(o=a),u>s&&(s=u);c=0!==(c=Math.max(o-r,s-i))?1/c:0}return Rn(f,p,n,r,i,c),p}function In(t,e,n,r,i){var o,s;if(i===Hn(t,e,n,r)>0)for(o=e;o=e;o-=r)s=Vn(o,t[o],t[o+1],s);return s&&Un(s,s.next)&&(qn(s),s=s.next),s}function Pn(t,e){if(!t)return t;e||(e=t);var n,r=t;do{if(n=!1,r.steiner||!Un(r,r.next)&&0!==Bn(r.prev,r,r.next))r=r.next;else{if(qn(r),(r=e=r.prev)===r.next)break;n=!0}}while(n||r!==e);return e}function Rn(t,e,n,r,i,o,s){if(t){!s&&o&&function(t,e,n,r){var i=t;do{null===i.z&&(i.z=jn(i.x,i.y,e,n,r)),i.prevZ=i.prev,i.nextZ=i.next,i=i.next}while(i!==t);i.prevZ.nextZ=null,i.prevZ=null,function(t){var e,n,r,i,o,s,a,u,c=1;do{for(n=t,t=null,o=null,s=0;n;){for(s++,r=n,a=0,e=0;e0||u>0&&r;)0!==a&&(0===u||!r||n.z<=r.z)?(i=n,n=n.nextZ,a--):(i=r,r=r.nextZ,u--),o?o.nextZ=i:t=i,i.prevZ=o,o=i;n=r}o.nextZ=null,c*=2}while(s>1)}(i)}(t,r,i,o);for(var a,u,c=t;t.prev!==t.next;)if(a=t.prev,u=t.next,o?Ln(t,r,i,o):Tn(t))e.push(a.i/n),e.push(t.i/n),e.push(u.i/n),qn(t),t=u.next,c=u.next;else if((t=u)===c){s?1===s?Rn(t=Mn(t,e,n),e,n,r,i,o,2):2===s&&Nn(t,e,n,r,i,o):Rn(Pn(t),e,n,r,i,o,1);break}}}function Tn(t){var e=t.prev,n=t,r=t.next;if(Bn(e,n,r)>=0)return!1;for(var i=t.next.next;i!==t.prev;){if(kn(e.x,e.y,n.x,n.y,r.x,r.y,i.x,i.y)&&Bn(i.prev,i,i.next)>=0)return!1;i=i.next}return!0}function Ln(t,e,n,r){var i=t.prev,o=t,s=t.next;if(Bn(i,o,s)>=0)return!1;for(var a=i.xo.x?i.x>s.x?i.x:s.x:o.x>s.x?o.x:s.x,l=i.y>o.y?i.y>s.y?i.y:s.y:o.y>s.y?o.y:s.y,h=jn(a,u,e,n,r),f=jn(c,l,e,n,r),p=t.prevZ,d=t.nextZ;p&&p.z>=h&&d&&d.z<=f;){if(p!==t.prev&&p!==t.next&&kn(i.x,i.y,o.x,o.y,s.x,s.y,p.x,p.y)&&Bn(p.prev,p,p.next)>=0)return!1;if(p=p.prevZ,d!==t.prev&&d!==t.next&&kn(i.x,i.y,o.x,o.y,s.x,s.y,d.x,d.y)&&Bn(d.prev,d,d.next)>=0)return!1;d=d.nextZ}for(;p&&p.z>=h;){if(p!==t.prev&&p!==t.next&&kn(i.x,i.y,o.x,o.y,s.x,s.y,p.x,p.y)&&Bn(p.prev,p,p.next)>=0)return!1;p=p.prevZ}for(;d&&d.z<=f;){if(d!==t.prev&&d!==t.next&&kn(i.x,i.y,o.x,o.y,s.x,s.y,d.x,d.y)&&Bn(d.prev,d,d.next)>=0)return!1;d=d.nextZ}return!0}function Mn(t,e,n){var r=t;do{var i=r.prev,o=r.next.next;!Un(i,o)&&zn(i,r,r.next,o)&&Yn(i,o)&&Yn(o,i)&&(e.push(i.i/n),e.push(r.i/n),e.push(o.i/n),qn(r),qn(r.next),r=t=o),r=r.next}while(r!==t);return r}function Nn(t,e,n,r,i,o){var s=t;do{for(var a=s.next.next;a!==s.prev;){if(s.i!==a.i&&Gn(s,a)){var u=Xn(s,a);return s=Pn(s,s.next),u=Pn(u,u.next),Rn(s,e,n,r,i,o),void Rn(u,e,n,r,i,o)}a=a.next}s=s.next}while(s!==t)}function An(t,e){return t.x-e.x}function Fn(t,e){if(e=function(t,e){var n,r=e,i=t.x,o=t.y,s=-1/0;do{if(o<=r.y&&o>=r.next.y&&r.next.y!==r.y){var a=r.x+(o-r.y)*(r.next.x-r.x)/(r.next.y-r.y);if(a<=i&&a>s){if(s=a,a===i){if(o===r.y)return r;if(o===r.next.y)return r.next}n=r.x=r.x&&r.x>=l&&i!==r.x&&kn(on.x)&&Yn(r,t)&&(n=r,f=u),r=r.next;return n}(t,e)){var n=Xn(e,t);Pn(n,n.next)}}function jn(t,e,n,r,i){return(t=1431655765&((t=858993459&((t=252645135&((t=16711935&((t=32767*(t-n)*i)|t<<8))|t<<4))|t<<2))|t<<1))|(e=1431655765&((e=858993459&((e=252645135&((e=16711935&((e=32767*(e-r)*i)|e<<8))|e<<4))|e<<2))|e<<1))<<1}function Dn(t){var e=t,n=t;do{e.x=0&&(t-s)*(r-a)-(n-s)*(e-a)>=0&&(n-s)*(o-a)-(i-s)*(r-a)>=0}function Gn(t,e){return t.next.i!==e.i&&t.prev.i!==e.i&&!function(t,e){var n=t;do{if(n.i!==t.i&&n.next.i!==t.i&&n.i!==e.i&&n.next.i!==e.i&&zn(n,n.next,t,e))return!0;n=n.next}while(n!==t);return!1}(t,e)&&Yn(t,e)&&Yn(e,t)&&function(t,e){var n=t,r=!1,i=(t.x+e.x)/2,o=(t.y+e.y)/2;do{n.y>o!=n.next.y>o&&n.next.y!==n.y&&i<(n.next.x-n.x)*(o-n.y)/(n.next.y-n.y)+n.x&&(r=!r),n=n.next}while(n!==t);return r}(t,e)}function Bn(t,e,n){return(e.y-t.y)*(n.x-e.x)-(e.x-t.x)*(n.y-e.y)}function Un(t,e){return t.x===e.x&&t.y===e.y}function zn(t,e,n,r){return!!(Un(t,e)&&Un(n,r)||Un(t,r)&&Un(n,e))||Bn(t,e,n)>0!=Bn(t,e,r)>0&&Bn(n,r,t)>0!=Bn(n,r,e)>0}function Yn(t,e){return Bn(t.prev,t,t.next)<0?Bn(t,e,t.next)>=0&&Bn(t,t.prev,e)>=0:Bn(t,e,t.prev)<0||Bn(t,t.next,e)<0}function Xn(t,e){var n=new Wn(t.i,t.x,t.y),r=new Wn(e.i,e.x,e.y),i=t.next,o=e.prev;return t.next=e,e.prev=t,n.next=i,i.prev=n,r.next=n,n.prev=r,o.next=r,r.prev=o,r}function Vn(t,e,n,r){var i=new Wn(t,e,n);return r?(i.next=r.next,i.prev=r,r.next.prev=i,r.next=i):(i.prev=i,i.next=i),i}function qn(t){t.next.prev=t.prev,t.prev.next=t.next,t.prevZ&&(t.prevZ.nextZ=t.nextZ),t.nextZ&&(t.nextZ.prevZ=t.prevZ)}function Wn(t,e,n){this.i=t,this.x=e,this.y=n,this.prev=null,this.next=null,this.z=null,this.prevZ=null,this.nextZ=null,this.steiner=!1}function Hn(t,e,n,r){for(var i=0,o=e,s=n-r;o0&&(r+=t[i-1].length,n.holes.push(r))}return n}(t),n=On(e.vertices,e.holes,2),r=[],i=[];n.forEach((function(t,r){var o=n[r];i.push([e.vertices[2*o],e.vertices[2*o+1]])}));for(var o=0;oi?n:i,r>o?r:o]}(t,r),n.push(i),r})),n})(n,t.properties).forEach((function(t){t.id=e.length,e.push(t)}))}))}}(t,e)})),d(e)}Cn.deviation=function(t,e,n,r){var i=e&&e.length,o=i?e[0]*n:t.length,s=Math.abs(Hn(t,0,o,n));if(i)for(var a=0,u=e.length;a0&&(r+=t[i-1].length,n.holes.push(r))}return n},On.default=Sn;var Qn=Ut((function(t,e){function n(t,e,n){void 0===n&&(n={});var r={type:"Feature"};return(0===n.id||n.id)&&(r.id=n.id),n.bbox&&(r.bbox=n.bbox),r.properties=e||{},r.geometry=t,r}function r(t,e,r){if(void 0===r&&(r={}),!t)throw new Error("coordinates is required");if(!Array.isArray(t))throw new Error("coordinates must be an Array");if(t.length<2)throw new Error("coordinates must be at least 2 numbers long");if(!p(t[0])||!p(t[1]))throw new Error("coordinates must contain numbers");return n({type:"Point",coordinates:t},e,r)}function i(t,e,r){void 0===r&&(r={});for(var i=0,o=t;i=0))throw new Error("precision must be a positive number");var n=Math.pow(10,e||0);return Math.round(t*n)/n},e.radiansToLength=l,e.lengthToRadians=h,e.lengthToDegrees=function(t,e){return f(h(t,e))},e.bearingToAzimuth=function(t){var e=t%360;return e<0&&(e+=360),e},e.radiansToDegrees=f,e.degreesToRadians=function(t){return t%360*Math.PI/180},e.convertLength=function(t,e,n){if(void 0===e&&(e="kilometers"),void 0===n&&(n="kilometers"),!(t>=0))throw new Error("length must be a positive number");return l(h(t,e),n)},e.convertArea=function(t,n,r){if(void 0===n&&(n="meters"),void 0===r&&(r="kilometers"),!(t>=0))throw new Error("area must be a positive number");var i=e.areaFactors[n];if(!i)throw new Error("invalid original units");var o=e.areaFactors[r];if(!o)throw new Error("invalid final units");return t/i*o},e.isNumber=p,e.isObject=function(t){return!!t&&t.constructor===Object},e.validateBBox=function(t){if(!t)throw new Error("bbox is required");if(!Array.isArray(t))throw new Error("bbox must be an Array");if(4!==t.length&&6!==t.length)throw new Error("bbox must be an Array of 4 or 6 numbers");t.forEach((function(t){if(!p(t))throw new Error("bbox must only contain numbers")}))},e.validateId=function(t){if(!t)throw new Error("id is required");if(-1===["string","number"].indexOf(typeof t))throw new Error("id must be a number or a string")}}));function $n(t,e,n){if(null!==t)for(var r,i,o,s,a,u,c,l,h=0,f=0,p=t.type,d="FeatureCollection"===p,g="Feature"===p,y=d?t.features.length:1,v=0;va||f>u||p>c)return s=o,a=n,u=f,c=p,void(i=0);var d=Qn.lineString([s,o],t.properties);if(!1===e(d,n,r,p,i))return!1;i++,s=o}))&&void 0}}}))}function or(t,e){if(!t)throw new Error("geojson is required");rr(t,(function(t,n,r){if(null!==t.geometry){var i=t.geometry.type,o=t.geometry.coordinates;switch(i){case"LineString":if(!1===e(t,n,r,0,0))return!1;break;case"Polygon":for(var s=0;st[0]&&(e[0]=t[0]),e[1]>t[1]&&(e[1]=t[1]),e[2] line1 must only contain 2 coordinates");if(2!==r.length)throw new Error(" line2 must only contain 2 coordinates");var i=n[0][0],o=n[0][1],s=n[1][0],a=n[1][1],c=r[0][0],l=r[0][1],h=r[1][0],f=r[1][1],p=(f-l)*(s-i)-(h-c)*(a-o),d=(h-c)*(o-l)-(f-l)*(i-c),g=(s-i)*(o-l)-(a-o)*(i-c);if(0===p)return null;var y=d/p,v=g/p;return y>=0&&y<=1&&v>=0&&v<=1?u([i+y*(s-i),o+y*(a-o)]):null}function Ar(t,e,n){void 0===n&&(n={});var r=u([1/0,1/0],{dist:1/0}),i=0;return z(t,(function(t){for(var o=$(t),s=0;s0&&((v=y.features[0]).properties.dist=be(e,v,n),v.properties.location=i+be(a,v,n)),a.properties.dist180?-360:i[0]-o[0]>180?360:0,C(function(t,e,r){var i=r=void 0===r?n:Number(r),o=t[1]*Math.PI/180,s=e[1]*Math.PI/180,a=s-o,u=Math.abs(e[0]-t[0])*Math.PI/180;u>Math.PI&&(u-=2*Math.PI);var c=Math.log(Math.tan(s/2+Math.PI/4)/Math.tan(o/2+Math.PI/4)),l=Math.abs(c)>1e-11?a/c:Math.cos(o);return Math.sqrt(a*a+l*l*u*u)*i}(i,o),"meters",r.units)}function jr(t,e,n){if(void 0===n&&(n={}),n.method||(n.method="geodesic"),n.units||(n.units="kilometers"),!t)throw new Error("pt is required");if(Array.isArray(t)?t=u(t):"Point"===t.type?t=s(t):nt(t,"Point","point"),!e)throw new Error("line is required");Array.isArray(e)?e=f(e):"LineString"===e.type?e=s(e):nt(e,"LineString","line");var r=1/0,i=t.geometry.coordinates;return X(e,(function(t){var e=t.geometry.coordinates[0],o=t.geometry.coordinates[1],s=function(t,e,n,r){var i=[n[0]-e[0],n[1]-e[1]],o=Dr([t[0]-e[0],t[1]-e[1]],i);if(o<=0)return kr(t,e,{method:r.method,units:"degrees"});var s=Dr(i,i);if(s<=o)return kr(t,n,{method:r.method,units:"degrees"});var a=o/s,u=[e[0]+a*i[0],e[1]+a*i[1]];return kr(t,u,{method:r.method,units:"degrees"})}(i,e,o,n);s=0&&c<=1&&(f.onLine1=!0),l>=0&&l<=1&&(f.onLine2=!0),!(!f.onLine1||!f.onLine2)&&[f.x,f.y])}function Br(t){for(var e=function(t){return"FeatureCollection"!==t.type?"Feature"!==t.type?d([s(t)]):d([t]):t}(t),n=En(e),r=!1,i=0;!r&&i0){e+=Math.abs(Vr(t[0]));for(var n=1;n2){for(s=0;s=l&&h===i.length-1);h++){if(l>e&&0===o.length){if(!(s=e-l))return o.push(i[h]),f(o);a=bn(i[h],i[h-1])-180,u=_n(i[h],s,a,r),o.push(u.geometry.coordinates)}if(l>=n)return(s=n-l)?(a=bn(i[h],i[h-1])-180,u=_n(i[h],s,a,r),o.push(u.geometry.coordinates),f(o)):(o.push(i[h]),f(o));if(l>=e&&o.push(i[h]),h===i.length-1)return f(o);l+=be(i[h],i[h+1],r)}if(li)return!1}else if(0!==p)return!1;return r?"start"===r?Math.abs(h)>=Math.abs(f)?h>0?a0?u=Math.abs(f)?h>0?a<=o&&o0?u<=s&&s=Math.abs(f)?h>0?a0?u=Math.abs(f)?h>0?a<=o&&o<=c:c<=o&&o<=a:f>0?u<=s&&s<=l:l<=s&&s<=u}function Jr(t,e){var n=it(t),r=it(e),i=n.type,o=r.type;switch(i){case"Point":switch(o){case"MultiPoint":return function(t,e){var n,r=!1;for(n=0;ne[0])&&!(t[2]e[1])&&!(t[3] is required");if("number"!=typeof n)throw new Error(" must be a number");if("number"!=typeof r)throw new Error(" must be a number");!1!==i&&void 0!==i||(t=JSON.parse(JSON.stringify(t)));var o=Math.pow(10,n);return N(t,(function(t){!function(t,e,n){t.length>n&&t.splice(n,t.length);for(var r=0;r=1||u<=0||c>=1||c<=0))){var g=d,y=!o[g];y&&(o[g]=!0),e?i.push(e(d,t,n,l,h,u,s,a,f,p,c,y)):i.push(d)}}function g(t,e){var n,i,o,s,a=r[t][e],u=r[t][e+1];return a[0]f[e.isect].coord?-1:1})),u=[];w.length>0;){var I=w.pop(),P=I.isect,R=I.parent,T=I.winding,L=u.length,M=[f[P].coord],N=P;if(f[P].ringAndEdge1Walkable)var A=f[P].ringAndEdge1,F=f[P].nxtIsectAlongRingAndEdge1;else A=f[P].ringAndEdge2,F=f[P].nxtIsectAlongRingAndEdge2;for(;!hi(f[P].coord,f[F].coord);){M.push(f[F].coord);var j=void 0;for(r=0;r1)for(e=0;e=0==e}function li(t){for(var e=0,n=0;n1&&n.push(f(c)),d(n)}function Ei(t,e){if(!e.features.length)throw new Error("lines must contain features");if(1===e.features.length)return e.features[0];var n,r=1/0;return D(e,(function(e){var i=Ar(e,t).properties.dist;il&&p.push(_n(t,e,l,i).geometry.coordinates),f(p,u)}function Oi(t){var e=t%360;return e<0&&(e+=360),e}function Si(t,e){void 0===e&&(e={});var n=it(t);switch(e.properties||"Feature"!==t.type||(e.properties=t.properties),n.type){case"Polygon":return Ci(n,e);case"MultiPolygon":return function(t,e){void 0===e&&(e={});var n=it(t).coordinates,r=e.properties?e.properties:"Feature"===t.type?t.properties:{},i=[];return n.forEach((function(t){i.push(Ii(t,r))})),d(i)}(n,e);default:throw new Error("invalid poly")}}function Ci(t,e){return void 0===e&&(e={}),Ii(it(t).coordinates,e.properties?e.properties:"Feature"===t.type?t.properties:{})}function Ii(t,e){return t.length>1?g(t,e):f(t[0],e)}function Pi(t,e){var n,r,i;void 0===e&&(e={});var o=e.properties,s=null===(n=e.autoComplete)||void 0===n||n,a=null===(r=e.orderCoords)||void 0===r||r;switch(null!==(i=e.mutate)&&void 0!==i&&i||(t=Se(t)),t.type){case"FeatureCollection":var u=[];return t.features.forEach((function(t){u.push($(Ri(t,{},s,a)))})),v(u,o);default:return Ri(t,o,s,a)}}function Ri(t,e,n,r){e=e||("Feature"===t.type?t.properties:{});var i=it(t),o=i.coordinates,s=i.type;if(!o.length)throw new Error("line must contain coordinates");switch(s){case"LineString":return n&&(o=Ti(o)),l([o],e);case"MultiLineString":var a=[],u=0;return o.forEach((function(t){if(n&&(t=Ti(t)),r){var e=function(t){var e=t[0],n=t[1],r=t[2],i=t[3];return Math.abs(e-r)*Math.abs(n-i)}(J(f(t)));e>u?(a.unshift(t),u=e):a.push(t)}else a.push(t)})),l(a,e);default:throw new Error("geometry type "+s+" is not supported")}}function Ti(t){var e=t[0],n=e[0],r=e[1],i=t[t.length-1],o=i[0],s=i[1];return n===o&&r===s||t.push(e),t}function Li(t,e){var n,r,i,o,s,a,u;for(r=1;r<=8;r*=2){for(n=[],o=!(Ni(i=t[t.length-1],e)&r),s=0;se[2]&&(n|=2),t[1]e[3]&&(n|=8),n}function Ai(t,e){for(var n=[],r=0,i=t;r0&&(o[0][0]===o[o.length-1][0]&&o[0][1]===o[o.length-1][1]||o.push(o[0]),o.length>=4&&n.push(o))}return n}_i.prototype.interpolate=function(t){var e=Math.sin((1-t)*this.g)/Math.sin(this.g),n=Math.sin(t*this.g)/Math.sin(this.g),r=e*Math.cos(this.start.y)*Math.cos(this.start.x)+n*Math.cos(this.end.y)*Math.cos(this.end.x),i=e*Math.cos(this.start.y)*Math.sin(this.start.x)+n*Math.cos(this.end.y)*Math.sin(this.end.x),o=e*Math.sin(this.start.y)+n*Math.sin(this.end.y),s=di*Math.atan2(o,Math.sqrt(Math.pow(r,2)+Math.pow(i,2)));return[di*Math.atan2(i,r),s]},_i.prototype.Arc=function(t,e){var n=[];if(!t||t<=2)n.push([this.start.lon,this.start.lat]),n.push([this.end.lon,this.end.lat]);else for(var r=1/(t-1),i=0;if&&(g>l&&dl&&gu&&(u=y)}var v=[];if(a&&u0&&Math.abs(b-n[m-1][0])>f){var E=parseFloat(n[m-1][0]),w=parseFloat(n[m-1][1]),x=parseFloat(n[m][0]),O=parseFloat(n[m][1]);if(E>-180&&E-180&&n[m-1][0]l&&E<180&&-180===x&&m+1l&&n[m-1][0]<180){_.push([180,n[m][1]]),m++,_.push([n[m][0],n[m][1]]);continue}if(El){var S=E;E=x,x=S;var C=w;w=O,O=C}if(E>l&&x=180&&El?180:-180,P]),(_=[]).push([n[m-1][0]>l?-180:180,P]),v.push(_)}else _=[],v.push(_);_.push([b,n[m][1]])}else _.push([n[m][0],n[m][1]])}}else{var R=[];v.push(R);for(var T=0;T=0;a--)if(c[a]!=l[a])return!1;for(a=c.length-1;a>=0;a--)if(u=c[a],!n(t[u],o[u],s))return!1;return typeof t==typeof o}(t,o,s))};function r(t){return null==t}function i(t){return!(!t||"object"!=typeof t||"number"!=typeof t.length)&&"function"==typeof t.copy&&"function"==typeof t.slice&&!(t.length>0&&"number"!=typeof t[0])}}));function ki(t,e,n){if(void 0===n&&(n={}),!R(n=n||{}))throw new Error("options is invalid");var r,i=n.tolerance||0,o=[],s=Tr(),a=Jn(t);return s.load(a),X(e,(function(t){var e=!1;t&&(D(s.search(t),(function(n){if(!1===e){var o=$(t).sort(),s=$(n).sort();Di(o,s)||(0===i?Zr(o[0],n)&&Zr(o[1],n):Ar(n,o[0]).properties.dist<=i&&Ar(n,o[1]).properties.dist<=i)?(e=!0,r=r?Gi(r,t):t):(0===i?Zr(s[0],t)&&Zr(s[1],t):Ar(t,s[0]).properties.dist<=i&&Ar(t,s[1]).properties.dist<=i)&&(r=r?Gi(r,n):n)}})),!1===e&&r&&(o.push(r),r=void 0))})),r&&o.push(r),d(o)}function Gi(t,e){var n=$(e),r=$(t),i=r[0],o=r[r.length-1],s=t.geometry.coordinates;return Di(n[0],i)?s.unshift(n[1]):Di(n[0],o)?s.push(n[1]):Di(n[1],i)?s.unshift(n[0]):Di(n[1],o)&&s.push(n[0]),t}function Bi(t){var e=t%360;return e<0&&(e+=360),e}function Ui(t,e,n){var r;return void 0===n&&(n={}),(r=n.final?zi(Q(e),Q(t)):zi(Q(t),Q(e)))>180?-(360-r):r}function zi(t,e){var n=S(t[1]),r=S(e[1]),i=S(e[0]-t[0]);i>Math.PI&&(i-=2*Math.PI),i<-Math.PI&&(i+=2*Math.PI);var o=Math.log(Math.tan(r/2+Math.PI/4)/Math.tan(n/2+Math.PI/4));return(O(Math.atan2(i,o))+360)%360}function Yi(t,e,r,i){void 0===i&&(i={});var o=e<0,s=C(Math.abs(e),i.units,"meters");o&&(s=-Math.abs(s));var a=Q(t),c=function(t,e,r,i){i=void 0===i?n:Number(i);var o=e/i,s=t[0]*Math.PI/180,a=S(t[1]),u=S(r),c=o*Math.cos(u),l=a+c;Math.abs(l)>Math.PI/2&&(l=l>0?Math.PI-l:-Math.PI-l);var h=Math.log(Math.tan(l/2+Math.PI/4)/Math.tan(a/2+Math.PI/4)),f=Math.abs(h)>1e-11?c/h:Math.cos(a),p=o*Math.sin(u)/f;return[(180*(s+p)/Math.PI+540)%360-180,180*l/Math.PI]}(a,s,r);return c[0]+=c[0]-a[0]>180?-360:a[0]-c[0]>180?360:0,u(c,i.properties)}function Xi(t,e,n,r,i,o){for(var s=0;s0?qi(e,a,i)<0||(i=a):n>0&&r<=0&&(Vi(e,a,o)||(o=a)),n=r}return[i,o]}function Vi(t,e,n){return qi(t,e,n)>0}function qi(t,e,n){return(e[0]-t[0])*(n[1]-t[1])-(n[0]-t[0])*(e[1]-t[1])}function Wi(t){for(var e,n,r=$(t),i=0,o=1;o0}function Hi(t,e){switch("Feature"===t.type?t.geometry.type:t.type){case"GeometryCollection":return B(t,(function(t){Hi(t,e)})),t;case"LineString":return Zi($(t),e),t;case"Polygon":return Ki($(t),e),t;case"MultiLineString":return $(t).forEach((function(t){Zi(t,e)})),t;case"MultiPolygon":return $(t).forEach((function(t){Ki(t,e)})),t;case"Point":case"MultiPoint":return t}}function Zi(t,e){Wi(t)===e&&t.reverse()}function Ki(t,e){Wi(t[0])!==e&&t[0].reverse();for(var n=1;n * v. 1.2.0 * https://github.com/RaumZeit/MarchingSquares.js * * MarchingSquaresJS is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * MarchingSquaresJS is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Affero General Public License for more details. * * As additional permission under GNU Affero General Public License version 3 * section 7, third-party projects (personal or commercial) may distribute, * include, or link against UNMODIFIED VERSIONS of MarchingSquaresJS without the * requirement that said third-party project for that reason alone becomes * subject to any requirement of the GNU Affero General Public License version 3. * Any modifications to MarchingSquaresJS, however, must be shared with the public * and made available. * * In summary this: * - allows you to use MarchingSquaresJS at no cost * - allows you to use MarchingSquaresJS for both personal and commercial purposes * - allows you to distribute UNMODIFIED VERSIONS of MarchingSquaresJS under any * license as long as this license notice is included * - enables you to keep the source code of your program that uses MarchingSquaresJS * undisclosed * - forces you to share any modifications you have made to MarchingSquaresJS, * e.g. bug-fixes * * You should have received a copy of the GNU Affero General Public License * along with MarchingSquaresJS. If not, see . */(t,r),s=[],a=0;as?128:64,c|=hs?32:16,c|=fs?8:4;var d=+(c|=ps?2:1),g=0;if(17===c||18===c||33===c||34===c||38===c||68===c||72===c||98===c||102===c||132===c||136===c||137===c||152===c||153===c){var y=(l+h+f+p)/4;g=y>s?2:y0?(c=156,g=4):c=152:33===c?g>0?(c=139,g=4):c=137:72===c?g>0?(c=99,g=4):c=98:132===c&&(g>0?(c=39,g=4):c=38)}if(0!=c&&170!=c){var v,_,m,b,E,w,x,O;v=_=m=b=E=w=x=O=.5;var S=[];1===c?(m=1-Vo(e,f,p),O=1-Vo(e,l,p),S.push(Go[c])):169===c?(m=Vo(s,p,f),O=Vo(s,p,l),S.push(Go[c])):4===c?(w=1-Vo(e,h,f),b=Vo(e,p,f),S.push(Do[c])):166===c?(w=Vo(s,f,h),b=1-Vo(s,f,p),S.push(Do[c])):16===c?(E=Vo(e,f,h),_=Vo(e,l,h),S.push(jo[c])):154===c?(E=1-Vo(s,h,f),_=1-Vo(s,h,l),S.push(jo[c])):64===c?(x=Vo(e,p,l),v=1-Vo(e,h,l),S.push(Uo[c])):106===c?(x=1-Vo(s,l,p),v=Vo(s,l,h),S.push(Uo[c])):168===c?(b=Vo(s,p,f),m=Vo(e,p,f),O=Vo(e,p,l),x=Vo(s,p,l),S.push(ko[c]),S.push(Go[c])):2===c?(b=1-Vo(e,f,p),m=1-Vo(s,f,p),O=1-Vo(s,l,p),x=1-Vo(e,l,p),S.push(ko[c]),S.push(Go[c])):162===c?(E=Vo(s,f,h),w=Vo(e,f,h),b=1-Vo(e,f,p),m=1-Vo(s,f,p),S.push(ko[c]),S.push(Go[c])):8===c?(E=1-Vo(e,h,f),w=1-Vo(s,h,f),b=Vo(s,p,f),m=Vo(e,p,f),S.push(jo[c]),S.push(Do[c])):138===c?(E=1-Vo(e,h,f),w=1-Vo(s,h,f),v=1-Vo(s,h,l),_=1-Vo(e,h,l),S.push(jo[c]),S.push(Do[c])):32===c?(E=Vo(s,f,h),w=Vo(e,f,h),v=Vo(e,l,h),_=Vo(s,l,h),S.push(jo[c]),S.push(Do[c])):42===c?(O=1-Vo(s,l,p),x=1-Vo(e,l,p),v=Vo(e,l,h),_=Vo(s,l,h),S.push(Bo[c]),S.push(Uo[c])):128===c&&(O=Vo(e,p,l),x=Vo(s,p,l),v=1-Vo(s,h,l),_=1-Vo(e,h,l),S.push(Bo[c]),S.push(Uo[c])),5===c?(w=1-Vo(e,h,f),O=1-Vo(e,l,p),S.push(Do[c])):165===c?(w=Vo(s,f,h),O=Vo(s,p,l),S.push(Do[c])):20===c?(b=Vo(e,p,f),_=Vo(e,l,h),S.push(ko[c])):150===c?(b=1-Vo(s,f,p),_=1-Vo(s,h,l),S.push(ko[c])):80===c?(E=Vo(e,f,h),x=Vo(e,p,l),S.push(jo[c])):90===c?(E=1-Vo(s,h,f),x=1-Vo(s,l,p),S.push(jo[c])):65===c?(m=1-Vo(e,f,p),v=1-Vo(e,h,l),S.push(Go[c])):105===c?(m=Vo(s,p,f),v=Vo(s,l,h),S.push(Go[c])):160===c?(E=Vo(s,f,h),w=Vo(e,f,h),O=Vo(e,p,l),x=Vo(s,p,l),S.push(jo[c]),S.push(Do[c])):10===c?(E=1-Vo(e,h,f),w=1-Vo(s,h,f),O=1-Vo(s,l,p),x=1-Vo(e,l,p),S.push(jo[c]),S.push(Do[c])):130===c?(b=1-Vo(e,f,p),m=1-Vo(s,f,p),v=1-Vo(s,h,l),_=1-Vo(e,h,l),S.push(ko[c]),S.push(Go[c])):40===c?(b=Vo(s,p,f),m=Vo(e,p,f),v=Vo(e,l,h),_=Vo(s,l,h),S.push(ko[c]),S.push(Go[c])):101===c?(w=Vo(s,f,h),v=Vo(s,l,h),S.push(Do[c])):69===c?(w=1-Vo(e,h,f),v=1-Vo(e,h,l),S.push(Do[c])):149===c?(O=Vo(s,p,l),_=1-Vo(s,h,l),S.push(Bo[c])):21===c?(O=1-Vo(e,l,p),_=Vo(e,l,h),S.push(Bo[c])):86===c?(b=1-Vo(s,f,p),x=1-Vo(s,l,p),S.push(ko[c])):84===c?(b=Vo(e,p,f),x=Vo(e,p,l),S.push(ko[c])):89===c?(E=1-Vo(s,h,f),m=Vo(s,p,f),S.push(Go[c])):81===c?(E=Vo(e,f,h),m=1-Vo(e,f,p),S.push(Go[c])):96===c?(E=Vo(s,f,h),w=Vo(e,f,h),x=Vo(e,p,l),v=Vo(s,l,h),S.push(jo[c]),S.push(Do[c])):74===c?(E=1-Vo(e,h,f),w=1-Vo(s,h,f),x=1-Vo(s,l,p),v=1-Vo(e,h,l),S.push(jo[c]),S.push(Do[c])):24===c?(E=1-Vo(s,h,f),b=Vo(s,p,f),m=Vo(e,p,f),_=Vo(e,l,h),S.push(jo[c]),S.push(Go[c])):146===c?(E=Vo(e,f,h),b=1-Vo(e,f,p),m=1-Vo(s,f,p),_=1-Vo(s,h,l),S.push(jo[c]),S.push(Go[c])):6===c?(w=1-Vo(e,h,f),b=1-Vo(s,f,p),O=1-Vo(s,l,p),x=1-Vo(e,l,p),S.push(Do[c]),S.push(ko[c])):164===c?(w=Vo(s,f,h),b=Vo(e,p,f),O=Vo(e,p,l),x=Vo(s,p,l),S.push(Do[c]),S.push(ko[c])):129===c?(m=1-Vo(e,f,p),O=Vo(s,p,l),v=1-Vo(s,h,l),_=1-Vo(e,h,l),S.push(Go[c]),S.push(Bo[c])):41===c?(m=Vo(s,p,f),O=1-Vo(e,l,p),v=Vo(e,l,h),_=Vo(s,l,h),S.push(Go[c]),S.push(Bo[c])):66===c?(b=1-Vo(e,f,p),m=1-Vo(s,f,p),x=1-Vo(s,l,p),v=1-Vo(e,h,l),S.push(ko[c]),S.push(Go[c])):104===c?(b=Vo(s,p,f),m=Vo(e,p,f),x=Vo(e,p,l),v=Vo(s,l,h),S.push(Go[c]),S.push(zo[c])):144===c?(E=Vo(e,f,h),O=Vo(e,p,l),x=Vo(s,p,l),_=1-Vo(s,h,l),S.push(jo[c]),S.push(Uo[c])):26===c?(E=1-Vo(s,h,f),O=1-Vo(s,l,p),x=1-Vo(e,l,p),_=Vo(e,l,h),S.push(jo[c]),S.push(Uo[c])):36===c?(w=Vo(s,f,h),b=Vo(e,p,f),v=Vo(e,l,h),_=Vo(s,l,h),S.push(Do[c]),S.push(ko[c])):134===c?(w=1-Vo(e,h,f),b=1-Vo(s,f,p),v=1-Vo(s,h,l),_=1-Vo(e,h,l),S.push(Do[c]),S.push(ko[c])):9===c?(E=1-Vo(e,h,f),w=1-Vo(s,h,f),m=Vo(s,p,f),O=1-Vo(e,l,p),S.push(jo[c]),S.push(Do[c])):161===c?(E=Vo(s,f,h),w=Vo(e,f,h),m=1-Vo(e,f,p),O=Vo(s,p,l),S.push(jo[c]),S.push(Do[c])):37===c?(w=Vo(s,f,h),O=1-Vo(e,l,p),v=Vo(e,l,h),_=Vo(s,l,h),S.push(Do[c]),S.push(Bo[c])):133===c?(w=1-Vo(e,h,f),O=Vo(s,p,l),v=1-Vo(s,h,l),_=1-Vo(e,h,l),S.push(Do[c]),S.push(Bo[c])):148===c?(b=Vo(e,p,f),O=Vo(e,p,l),x=Vo(s,p,l),_=1-Vo(s,h,l),S.push(ko[c]),S.push(Uo[c])):22===c?(b=1-Vo(s,f,p),O=1-Vo(s,l,p),x=1-Vo(e,l,p),_=Vo(e,l,h),S.push(ko[c]),S.push(Uo[c])):82===c?(E=Vo(e,f,h),b=1-Vo(e,f,p),m=1-Vo(s,f,p),x=1-Vo(s,l,p),S.push(jo[c]),S.push(Go[c])):88===c?(E=1-Vo(s,h,f),b=Vo(s,p,f),m=Vo(e,p,f),x=Vo(e,p,l),S.push(jo[c]),S.push(Go[c])):73===c?(E=1-Vo(e,h,f),w=1-Vo(s,h,f),m=Vo(s,p,f),v=1-Vo(e,h,l),S.push(jo[c]),S.push(Do[c])):97===c?(E=Vo(s,f,h),w=Vo(e,f,h),m=1-Vo(e,f,p),v=Vo(s,l,h),S.push(jo[c]),S.push(Do[c])):145===c?(E=Vo(e,f,h),m=1-Vo(e,f,p),O=Vo(s,p,l),_=1-Vo(s,h,l),S.push(jo[c]),S.push(Bo[c])):25===c?(E=1-Vo(s,h,f),m=Vo(s,p,f),O=1-Vo(e,l,p),_=Vo(e,l,h),S.push(jo[c]),S.push(Bo[c])):70===c?(w=1-Vo(e,h,f),b=1-Vo(s,f,p),x=1-Vo(s,l,p),v=1-Vo(e,h,l),S.push(Do[c]),S.push(ko[c])):100===c?(w=Vo(s,f,h),b=Vo(e,p,f),x=Vo(e,p,l),v=Vo(s,l,h),S.push(Do[c]),S.push(ko[c])):34===c?(0===g?(E=1-Vo(e,h,f),w=1-Vo(s,h,f),b=Vo(s,p,f),m=Vo(e,p,f),O=Vo(e,p,l),x=Vo(s,p,l),v=1-Vo(s,h,l),_=1-Vo(e,h,l)):(E=Vo(s,f,h),w=Vo(e,f,h),b=1-Vo(e,f,p),m=1-Vo(s,f,p),O=1-Vo(s,l,p),x=1-Vo(e,l,p),v=Vo(e,l,h),_=Vo(s,l,h)),S.push(jo[c]),S.push(Do[c]),S.push(Bo[c]),S.push(Uo[c])):35===c?(4===g?(E=1-Vo(e,h,f),w=1-Vo(s,h,f),b=Vo(s,p,f),m=Vo(e,p,f),O=Vo(e,p,l),x=Vo(s,p,l),v=1-Vo(s,h,l),_=1-Vo(e,h,l)):(E=Vo(s,f,h),w=Vo(e,f,h),b=1-Vo(e,f,p),m=1-Vo(s,f,p),O=1-Vo(s,l,p),x=1-Vo(e,l,p),v=Vo(e,l,h),_=Vo(s,l,h)),S.push(jo[c]),S.push(Do[c]),S.push(Go[c]),S.push(Uo[c])):136===c?(0===g?(E=Vo(s,f,h),w=Vo(e,f,h),b=1-Vo(e,f,p),m=1-Vo(s,f,p),O=1-Vo(s,l,p),x=1-Vo(e,l,p),v=Vo(e,l,h),_=Vo(s,l,h)):(E=1-Vo(e,h,f),w=1-Vo(s,h,f),b=Vo(s,p,f),m=Vo(e,p,f),O=Vo(e,p,l),x=Vo(s,p,l),v=1-Vo(s,h,l),_=1-Vo(e,h,l)),S.push(jo[c]),S.push(Do[c]),S.push(Bo[c]),S.push(Uo[c])):153===c?(0===g?(E=Vo(e,f,h),m=1-Vo(e,f,p),O=1-Vo(e,l,p),_=Vo(e,l,h)):(E=1-Vo(s,h,f),m=Vo(s,p,f),O=Vo(s,p,l),_=1-Vo(s,h,l)),S.push(jo[c]),S.push(Go[c])):102===c?(0===g?(w=1-Vo(e,h,f),b=Vo(e,p,f),x=Vo(e,p,l),v=1-Vo(e,h,l)):(w=Vo(s,f,h),b=1-Vo(s,f,p),x=1-Vo(s,l,p),v=Vo(s,l,h)),S.push(Do[c]),S.push(Uo[c])):155===c?(4===g?(E=Vo(e,f,h),m=1-Vo(e,f,p),O=1-Vo(e,l,p),_=Vo(e,l,h)):(E=1-Vo(s,h,f),m=Vo(s,p,f),O=Vo(s,p,l),_=1-Vo(s,h,l)),S.push(jo[c]),S.push(Bo[c])):103===c?(4===g?(w=1-Vo(e,h,f),b=Vo(e,p,f),x=Vo(e,p,l),v=1-Vo(e,h,l)):(w=Vo(s,f,h),b=1-Vo(s,f,p),x=1-Vo(s,l,p),v=Vo(s,l,h)),S.push(Do[c]),S.push(ko[c])):152===c?(0===g?(E=Vo(e,f,h),b=1-Vo(e,f,p),m=1-Vo(s,f,p),O=1-Vo(s,l,p),x=1-Vo(e,l,p),_=Vo(e,l,h)):(E=1-Vo(s,h,f),b=Vo(s,p,f),m=Vo(e,p,f),O=Vo(e,p,l),x=Vo(s,p,l),_=1-Vo(s,h,l)),S.push(jo[c]),S.push(ko[c]),S.push(Go[c])):156===c?(4===g?(E=Vo(e,f,h),b=1-Vo(e,f,p),m=1-Vo(s,f,p),O=1-Vo(s,l,p),x=1-Vo(e,l,p),_=Vo(e,l,h)):(E=1-Vo(s,h,f),b=Vo(s,p,f),m=Vo(e,p,f),O=Vo(e,p,l),x=Vo(s,p,l),_=1-Vo(s,h,l)),S.push(jo[c]),S.push(Go[c]),S.push(Uo[c])):137===c?(0===g?(E=Vo(s,f,h),w=Vo(e,f,h),m=1-Vo(e,f,p),O=1-Vo(e,l,p),v=Vo(e,l,h),_=Vo(s,l,h)):(E=1-Vo(e,h,f),w=1-Vo(s,h,f),m=Vo(s,p,f),O=Vo(s,p,l),v=1-Vo(s,h,l),_=1-Vo(e,h,l)),S.push(jo[c]),S.push(Do[c]),S.push(Go[c])):139===c?(4===g?(E=Vo(s,f,h),w=Vo(e,f,h),m=1-Vo(e,f,p),O=1-Vo(e,l,p),v=Vo(e,l,h),_=Vo(s,l,h)):(E=1-Vo(e,h,f),w=1-Vo(s,h,f),m=Vo(s,p,f),O=Vo(s,p,l),v=1-Vo(s,h,l),_=1-Vo(e,h,l)),S.push(jo[c]),S.push(Do[c]),S.push(Bo[c])):98===c?(0===g?(E=1-Vo(e,h,f),w=1-Vo(s,h,f),b=Vo(s,p,f),m=Vo(e,p,f),x=Vo(e,p,l),v=1-Vo(e,h,l)):(E=Vo(s,f,h),w=Vo(e,f,h),b=1-Vo(e,f,p),m=1-Vo(s,f,p),x=1-Vo(s,l,p),v=Vo(s,l,h)),S.push(jo[c]),S.push(Do[c]),S.push(Uo[c])):99===c?(4===g?(E=1-Vo(e,h,f),w=1-Vo(s,h,f),b=Vo(s,p,f),m=Vo(e,p,f),x=Vo(e,p,l),v=1-Vo(e,h,l)):(E=Vo(s,f,h),w=Vo(e,f,h),b=1-Vo(e,f,p),m=1-Vo(s,f,p),x=1-Vo(s,l,p),v=Vo(s,l,h)),S.push(jo[c]),S.push(Do[c]),S.push(Go[c])):38===c?(0===g?(w=1-Vo(e,h,f),b=Vo(e,p,f),O=Vo(e,p,l),x=Vo(s,p,l),v=1-Vo(s,h,l),_=1-Vo(e,h,l)):(w=Vo(s,f,h),b=1-Vo(s,f,p),O=1-Vo(s,l,p),x=1-Vo(e,l,p),v=Vo(e,l,h),_=Vo(s,l,h)),S.push(Do[c]),S.push(Bo[c]),S.push(Uo[c])):39===c?(4===g?(w=1-Vo(e,h,f),b=Vo(e,p,f),O=Vo(e,p,l),x=Vo(s,p,l),v=1-Vo(s,h,l),_=1-Vo(e,h,l)):(w=Vo(s,f,h),b=1-Vo(s,f,p),O=1-Vo(s,l,p),x=1-Vo(e,l,p),v=Vo(e,l,h),_=Vo(s,l,h)),S.push(Do[c]),S.push(ko[c]),S.push(Uo[c])):85===c&&(E=1,w=0,b=1,m=0,O=0,x=1,v=0,_=1),(v<0||v>1||_<0||_>1||E<0||E>1||b<0||b>1||O<0||O>1||x<0||x>1)&&console.log("MarchingSquaresJS-isoBands: "+c+" "+d+" "+l+","+h+","+f+","+p+" "+g+" "+v+" "+_+" "+E+" "+w+" "+b+" "+m+" "+O+" "+x),o.cells[a][u]={cval:c,cval_real:d,flipped:g,topleft:v,topright:_,righttop:E,rightbottom:w,bottomright:b,bottomleft:m,leftbottom:O,lefttop:x,edges:S}}}}}return o}(t,e,n);return $i.polygons?($i.verbose&&console.log("MarchingSquaresJS-isoBands: returning single polygons for each grid cell"),u=function(t){var e=[],n=0;return t.cells.forEach((function(t,r){t.forEach((function(t,i){if(void 0!==t){var o=Xo[t.cval](t);"object"==typeof o&&qo(o)?"object"==typeof o[0]&&qo(o[0])?"object"==typeof o[0][0]&&qo(o[0][0])?o.forEach((function(t){t.forEach((function(t){t[0]+=i,t[1]+=r})),e[n++]=t})):(o.forEach((function(t){t[0]+=i,t[1]+=r})),e[n++]=o):console.log("MarchingSquaresJS-isoBands: bandcell polygon with malformed coordinates"):console.log("MarchingSquaresJS-isoBands: bandcell polygon with null coordinates")}}))})),e}(c)):($i.verbose&&console.log("MarchingSquaresJS-isoBands: returning polygon paths for entire data grid"),u=function(t){for(var e=[],n=t.rows,r=t.cols,i=[],o=0;o0){var a=Ho(t.cells[o][s]),u=null,c=s,l=o;null!==a&&i.push([a.p[0]+c,a.p[1]+l]);do{if(null===(u=Zo(t.cells[l][c],a.x,a.y,a.o)))break;if(i.push([u.p[0]+c,u.p[1]+l]),c+=u.x,a=u,(l+=u.y)<0||l>=n||c<0||c>=r||void 0===t.cells[l][c]){var h=Wo(t,c-=u.x,l-=u.y,u.x,u.y,u.o);if(null===h)break;h.path.forEach((function(t){i.push(t)})),c=h.i,l=h.j,a=h}}while(void 0!==t.cells[l][c]&&t.cells[l][c].edges.length>0);e.push(i),i=[],t.cells[o][s].edges.length>0&&s--}return e}(c)),"function"==typeof $i.successCallback&&$i.successCallback(u),u}var eo=64,no=16,ro=[],io=[],oo=[],so=[],ao=[],uo=[],co=[],lo=[],ho=[],fo=[],po=[],go=[],yo=[],vo=[],_o=[],mo=[],bo=[],Eo=[],wo=[],xo=[],Oo=[],So=[],Co=[],Io=[];co[85]=fo[85]=-1,lo[85]=po[85]=0,ho[85]=go[85]=1,wo[85]=So[85]=1,xo[85]=Co[85]=0,Oo[85]=Io[85]=1,ro[85]=so[85]=0,io[85]=ao[85]=-1,oo[85]=_o[85]=0,mo[85]=yo[85]=0,bo[85]=vo[85]=1,uo[85]=Eo[85]=1,So[1]=So[169]=0,Co[1]=Co[169]=-1,Io[1]=Io[169]=0,yo[1]=yo[169]=-1,vo[1]=vo[169]=0,_o[1]=_o[169]=0,fo[4]=fo[166]=0,po[4]=po[166]=-1,go[4]=go[166]=1,mo[4]=mo[166]=1,bo[4]=bo[166]=0,Eo[4]=Eo[166]=0,co[16]=co[154]=0,lo[16]=lo[154]=1,ho[16]=ho[154]=1,so[16]=so[154]=1,ao[16]=ao[154]=0,uo[16]=uo[154]=1,wo[64]=wo[106]=0,xo[64]=xo[106]=1,Oo[64]=Oo[106]=0,ro[64]=ro[106]=-1,io[64]=io[106]=0,oo[64]=oo[106]=1,wo[2]=wo[168]=0,xo[2]=xo[168]=-1,Oo[2]=Oo[168]=1,So[2]=So[168]=0,Co[2]=Co[168]=-1,Io[2]=Io[168]=0,yo[2]=yo[168]=-1,vo[2]=vo[168]=0,_o[2]=_o[168]=0,mo[2]=mo[168]=-1,bo[2]=bo[168]=0,Eo[2]=Eo[168]=1,co[8]=co[162]=0,lo[8]=lo[162]=-1,ho[8]=ho[162]=0,fo[8]=fo[162]=0,po[8]=po[162]=-1,go[8]=go[162]=1,yo[8]=yo[162]=1,vo[8]=vo[162]=0,_o[8]=_o[162]=1,mo[8]=mo[162]=1,bo[8]=bo[162]=0,Eo[8]=Eo[162]=0,co[32]=co[138]=0,lo[32]=lo[138]=1,ho[32]=ho[138]=1,fo[32]=fo[138]=0,po[32]=po[138]=1,go[32]=go[138]=0,ro[32]=ro[138]=1,io[32]=io[138]=0,oo[32]=oo[138]=0,so[32]=so[138]=1,ao[32]=ao[138]=0,uo[32]=uo[138]=1,So[128]=So[42]=0,Co[128]=Co[42]=1,Io[128]=Io[42]=1,wo[128]=wo[42]=0,xo[128]=xo[42]=1,Oo[128]=Oo[42]=0,ro[128]=ro[42]=-1,io[128]=io[42]=0,oo[128]=oo[42]=1,so[128]=so[42]=-1,ao[128]=ao[42]=0,uo[128]=uo[42]=0,fo[5]=fo[165]=-1,po[5]=po[165]=0,go[5]=go[165]=0,So[5]=So[165]=1,Co[5]=Co[165]=0,Io[5]=Io[165]=0,mo[20]=mo[150]=0,bo[20]=bo[150]=1,Eo[20]=Eo[150]=1,so[20]=so[150]=0,ao[20]=ao[150]=-1,uo[20]=uo[150]=1,co[80]=co[90]=-1,lo[80]=lo[90]=0,ho[80]=ho[90]=1,wo[80]=wo[90]=1,xo[80]=xo[90]=0,Oo[80]=Oo[90]=1,yo[65]=yo[105]=0,vo[65]=vo[105]=1,_o[65]=_o[105]=0,ro[65]=ro[105]=0,io[65]=io[105]=-1,oo[65]=oo[105]=0,co[160]=co[10]=-1,lo[160]=lo[10]=0,ho[160]=ho[10]=1,fo[160]=fo[10]=-1,po[160]=po[10]=0,go[160]=go[10]=0,So[160]=So[10]=1,Co[160]=Co[10]=0,Io[160]=Io[10]=0,wo[160]=wo[10]=1,xo[160]=xo[10]=0,Oo[160]=Oo[10]=1,mo[130]=mo[40]=0,bo[130]=bo[40]=1,Eo[130]=Eo[40]=1,yo[130]=yo[40]=0,vo[130]=vo[40]=1,_o[130]=_o[40]=0,ro[130]=ro[40]=0,io[130]=io[40]=-1,oo[130]=oo[40]=0,so[130]=so[40]=0,ao[130]=ao[40]=-1,uo[130]=uo[40]=1,fo[37]=fo[133]=0,po[37]=po[133]=1,go[37]=go[133]=1,So[37]=So[133]=0,Co[37]=Co[133]=1,Io[37]=Io[133]=0,ro[37]=ro[133]=-1,io[37]=io[133]=0,oo[37]=oo[133]=0,so[37]=so[133]=1,ao[37]=ao[133]=0,uo[37]=uo[133]=0,mo[148]=mo[22]=-1,bo[148]=bo[22]=0,Eo[148]=Eo[22]=0,So[148]=So[22]=0,Co[148]=Co[22]=-1,Io[148]=Io[22]=1,wo[148]=wo[22]=0,xo[148]=xo[22]=1,Oo[148]=Oo[22]=1,so[148]=so[22]=-1,ao[148]=ao[22]=0,uo[148]=uo[22]=1,co[82]=co[88]=0,lo[82]=lo[88]=-1,ho[82]=ho[88]=1,mo[82]=mo[88]=1,bo[82]=bo[88]=0,Eo[82]=Eo[88]=1,yo[82]=yo[88]=-1,vo[82]=vo[88]=0,_o[82]=_o[88]=1,wo[82]=wo[88]=0,xo[82]=xo[88]=-1,Oo[82]=Oo[88]=0,co[73]=co[97]=0,lo[73]=lo[97]=1,ho[73]=ho[97]=0,fo[73]=fo[97]=0,po[73]=po[97]=-1,go[73]=go[97]=0,yo[73]=yo[97]=1,vo[73]=vo[97]=0,_o[73]=_o[97]=0,ro[73]=ro[97]=1,io[73]=io[97]=0,oo[73]=oo[97]=1,co[145]=co[25]=0,lo[145]=lo[25]=-1,ho[145]=ho[25]=0,yo[145]=yo[25]=1,vo[145]=vo[25]=0,_o[145]=_o[25]=1,So[145]=So[25]=0,Co[145]=Co[25]=1,Io[145]=Io[25]=1,so[145]=so[25]=-1,ao[145]=ao[25]=0,uo[145]=uo[25]=0,fo[70]=fo[100]=0,po[70]=po[100]=1,go[70]=go[100]=0,mo[70]=mo[100]=-1,bo[70]=bo[100]=0,Eo[70]=Eo[100]=1,wo[70]=wo[100]=0,xo[70]=xo[100]=-1,Oo[70]=Oo[100]=1,ro[70]=ro[100]=1,io[70]=io[100]=0,oo[70]=oo[100]=0,fo[101]=fo[69]=0,po[101]=po[69]=1,go[101]=go[69]=0,ro[101]=ro[69]=1,io[101]=io[69]=0,oo[101]=oo[69]=0,So[149]=So[21]=0,Co[149]=Co[21]=1,Io[149]=Io[21]=1,so[149]=so[21]=-1,ao[149]=ao[21]=0,uo[149]=uo[21]=0,mo[86]=mo[84]=-1,bo[86]=bo[84]=0,Eo[86]=Eo[84]=1,wo[86]=wo[84]=0,xo[86]=xo[84]=-1,Oo[86]=Oo[84]=1,co[89]=co[81]=0,lo[89]=lo[81]=-1,ho[89]=ho[81]=0,yo[89]=yo[81]=1,vo[89]=vo[81]=0,_o[89]=_o[81]=1,co[96]=co[74]=0,lo[96]=lo[74]=1,ho[96]=ho[74]=0,fo[96]=fo[74]=-1,po[96]=po[74]=0,go[96]=go[74]=1,wo[96]=wo[74]=1,xo[96]=xo[74]=0,Oo[96]=Oo[74]=0,ro[96]=ro[74]=1,io[96]=io[74]=0,oo[96]=oo[74]=1,co[24]=co[146]=0,lo[24]=lo[146]=-1,ho[24]=ho[146]=1,mo[24]=mo[146]=1,bo[24]=bo[146]=0,Eo[24]=Eo[146]=1,yo[24]=yo[146]=0,vo[24]=vo[146]=1,_o[24]=_o[146]=1,so[24]=so[146]=0,ao[24]=ao[146]=-1,uo[24]=uo[146]=0,fo[6]=fo[164]=-1,po[6]=po[164]=0,go[6]=go[164]=1,mo[6]=mo[164]=-1,bo[6]=bo[164]=0,Eo[6]=Eo[164]=0,So[6]=So[164]=0,Co[6]=Co[164]=-1,Io[6]=Io[164]=1,wo[6]=wo[164]=1,xo[6]=xo[164]=0,Oo[6]=Oo[164]=0,yo[129]=yo[41]=0,vo[129]=vo[41]=1,_o[129]=_o[41]=1,So[129]=So[41]=0,Co[129]=Co[41]=1,Io[129]=Io[41]=0,ro[129]=ro[41]=-1,io[129]=io[41]=0,oo[129]=oo[41]=0,so[129]=so[41]=0,ao[129]=ao[41]=-1,uo[129]=uo[41]=0,mo[66]=mo[104]=0,bo[66]=bo[104]=1,Eo[66]=Eo[104]=0,yo[66]=yo[104]=-1,vo[66]=vo[104]=0,_o[66]=_o[104]=1,wo[66]=wo[104]=0,xo[66]=xo[104]=-1,Oo[66]=Oo[104]=0,ro[66]=ro[104]=0,io[66]=io[104]=-1,oo[66]=oo[104]=1,co[144]=co[26]=-1,lo[144]=lo[26]=0,ho[144]=ho[26]=0,So[144]=So[26]=1,Co[144]=Co[26]=0,Io[144]=Io[26]=1,wo[144]=wo[26]=0,xo[144]=xo[26]=1,Oo[144]=Oo[26]=1,so[144]=so[26]=-1,ao[144]=ao[26]=0,uo[144]=uo[26]=1,fo[36]=fo[134]=0,po[36]=po[134]=1,go[36]=go[134]=1,mo[36]=mo[134]=0,bo[36]=bo[134]=1,Eo[36]=Eo[134]=0,ro[36]=ro[134]=0,io[36]=io[134]=-1,oo[36]=oo[134]=1,so[36]=so[134]=1,ao[36]=ao[134]=0,uo[36]=uo[134]=0,co[9]=co[161]=-1,lo[9]=lo[161]=0,ho[9]=ho[161]=0,fo[9]=fo[161]=0,po[9]=po[161]=-1,go[9]=go[161]=0,yo[9]=yo[161]=1,vo[9]=vo[161]=0,_o[9]=_o[161]=0,So[9]=So[161]=1,Co[9]=Co[161]=0,Io[9]=Io[161]=1,co[136]=0,lo[136]=1,ho[136]=1,fo[136]=0,po[136]=1,go[136]=0,mo[136]=-1,bo[136]=0,Eo[136]=1,yo[136]=-1,vo[136]=0,_o[136]=0,So[136]=0,Co[136]=-1,Io[136]=0,wo[136]=0,xo[136]=-1,Oo[136]=1,ro[136]=1,io[136]=0,oo[136]=0,so[136]=1,ao[136]=0,uo[136]=1,co[34]=0,lo[34]=-1,ho[34]=0,fo[34]=0,po[34]=-1,go[34]=1,mo[34]=1,bo[34]=0,Eo[34]=0,yo[34]=1,vo[34]=0,_o[34]=1,So[34]=0,Co[34]=1,Io[34]=1,wo[34]=0,xo[34]=1,Oo[34]=0,ro[34]=-1,io[34]=0,oo[34]=1,so[34]=-1,ao[34]=0,uo[34]=0,co[35]=0,lo[35]=1,ho[35]=1,fo[35]=0,po[35]=-1,go[35]=1,mo[35]=1,bo[35]=0,Eo[35]=0,yo[35]=-1,vo[35]=0,_o[35]=0,So[35]=0,Co[35]=-1,Io[35]=0,wo[35]=0,xo[35]=1,Oo[35]=0,ro[35]=-1,io[35]=0,oo[35]=1,so[35]=1,ao[35]=0,uo[35]=1,co[153]=0,lo[153]=1,ho[153]=1,yo[153]=-1,vo[153]=0,_o[153]=0,So[153]=0,Co[153]=-1,Io[153]=0,so[153]=1,ao[153]=0,uo[153]=1,fo[102]=0,po[102]=-1,go[102]=1,mo[102]=1,bo[102]=0,Eo[102]=0,wo[102]=0,xo[102]=1,Oo[102]=0,ro[102]=-1,io[102]=0,oo[102]=1,co[155]=0,lo[155]=-1,ho[155]=0,yo[155]=1,vo[155]=0,_o[155]=1,So[155]=0,Co[155]=1,Io[155]=1,so[155]=-1,ao[155]=0,uo[155]=0,fo[103]=0,po[103]=1,go[103]=0,mo[103]=-1,bo[103]=0,Eo[103]=1,wo[103]=0,xo[103]=-1,Oo[103]=1,ro[103]=1,io[103]=0,oo[103]=0,co[152]=0,lo[152]=1,ho[152]=1,mo[152]=-1,bo[152]=0,Eo[152]=1,yo[152]=-1,vo[152]=0,_o[152]=0,So[152]=0,Co[152]=-1,Io[152]=0,wo[152]=0,xo[152]=-1,Oo[152]=1,so[152]=1,ao[152]=0,uo[152]=1,co[156]=0,lo[156]=-1,ho[156]=1,mo[156]=1,bo[156]=0,Eo[156]=1,yo[156]=-1,vo[156]=0,_o[156]=0,So[156]=0,Co[156]=-1,Io[156]=0,wo[156]=0,xo[156]=1,Oo[156]=1,so[156]=-1,ao[156]=0,uo[156]=1,co[137]=0,lo[137]=1,ho[137]=1,fo[137]=0,po[137]=1,go[137]=0,yo[137]=-1,vo[137]=0,_o[137]=0,So[137]=0,Co[137]=-1,Io[137]=0,ro[137]=1,io[137]=0,oo[137]=0,so[137]=1,ao[137]=0,uo[137]=1,co[139]=0,lo[139]=1,ho[139]=1,fo[139]=0,po[139]=-1,go[139]=0,yo[139]=1,vo[139]=0,_o[139]=0,So[139]=0,Co[139]=1,Io[139]=0,ro[139]=-1,io[139]=0,oo[139]=0,so[139]=1,ao[139]=0,uo[139]=1,co[98]=0,lo[98]=-1,ho[98]=0,fo[98]=0,po[98]=-1,go[98]=1,mo[98]=1,bo[98]=0,Eo[98]=0,yo[98]=1,vo[98]=0,_o[98]=1,wo[98]=0,xo[98]=1,Oo[98]=0,ro[98]=-1,io[98]=0,oo[98]=1,co[99]=0,lo[99]=1,ho[99]=0,fo[99]=0,po[99]=-1,go[99]=1,mo[99]=1,bo[99]=0,Eo[99]=0,yo[99]=-1,vo[99]=0,_o[99]=1,wo[99]=0,xo[99]=-1,Oo[99]=0,ro[99]=1,io[99]=0,oo[99]=1,fo[38]=0,po[38]=-1,go[38]=1,mo[38]=1,bo[38]=0,Eo[38]=0,So[38]=0,Co[38]=1,Io[38]=1,wo[38]=0,xo[38]=1,Oo[38]=0,ro[38]=-1,io[38]=0,oo[38]=1,so[38]=-1,ao[38]=0,uo[38]=0,fo[39]=0,po[39]=1,go[39]=1,mo[39]=-1,bo[39]=0,Eo[39]=0,So[39]=0,Co[39]=-1,Io[39]=1,wo[39]=0,xo[39]=1,Oo[39]=0,ro[39]=-1,io[39]=0,oo[39]=1,so[39]=1,ao[39]=0,uo[39]=0;var Po=function(t){return[[t.bottomleft,0],[0,0],[0,t.leftbottom]]},Ro=function(t){return[[1,t.rightbottom],[1,0],[t.bottomright,0]]},To=function(t){return[[t.topright,1],[1,1],[1,t.righttop]]},Lo=function(t){return[[0,t.lefttop],[0,1],[t.topleft,1]]},Mo=function(t){return[[t.bottomright,0],[t.bottomleft,0],[0,t.leftbottom],[0,t.lefttop]]},No=function(t){return[[t.bottomright,0],[t.bottomleft,0],[1,t.righttop],[1,t.rightbottom]]},Ao=function(t){return[[1,t.righttop],[1,t.rightbottom],[t.topleft,1],[t.topright,1]]},Fo=function(t){return[[0,t.leftbottom],[0,t.lefttop],[t.topleft,1],[t.topright,1]]},jo=[],Do=[],ko=[],Go=[],Bo=[],Uo=[],zo=[],Yo=[];Go[1]=Bo[1]=18,Go[169]=Bo[169]=18,ko[4]=Do[4]=12,ko[166]=Do[166]=12,jo[16]=Yo[16]=4,jo[154]=Yo[154]=4,Uo[64]=zo[64]=22,Uo[106]=zo[106]=22,ko[2]=Uo[2]=17,Go[2]=Bo[2]=18,ko[168]=Uo[168]=17,Go[168]=Bo[168]=18,jo[8]=Go[8]=9,Do[8]=ko[8]=12,jo[162]=Go[162]=9,Do[162]=ko[162]=12,jo[32]=Yo[32]=4,Do[32]=zo[32]=1,jo[138]=Yo[138]=4,Do[138]=zo[138]=1,Bo[128]=Yo[128]=21,Uo[128]=zo[128]=22,Bo[42]=Yo[42]=21,Uo[42]=zo[42]=22,Do[5]=Bo[5]=14,Do[165]=Bo[165]=14,ko[20]=Yo[20]=6,ko[150]=Yo[150]=6,jo[80]=Uo[80]=11,jo[90]=Uo[90]=11,Go[65]=zo[65]=3,Go[105]=zo[105]=3,jo[160]=Uo[160]=11,Do[160]=Bo[160]=14,jo[10]=Uo[10]=11,Do[10]=Bo[10]=14,ko[130]=Yo[130]=6,Go[130]=zo[130]=3,ko[40]=Yo[40]=6,Go[40]=zo[40]=3,Do[101]=zo[101]=1,Do[69]=zo[69]=1,Bo[149]=Yo[149]=21,Bo[21]=Yo[21]=21,ko[86]=Uo[86]=17,ko[84]=Uo[84]=17,jo[89]=Go[89]=9,jo[81]=Go[81]=9,jo[96]=zo[96]=0,Do[96]=Uo[96]=15,jo[74]=zo[74]=0,Do[74]=Uo[74]=15,jo[24]=ko[24]=8,Go[24]=Yo[24]=7,jo[146]=ko[146]=8,Go[146]=Yo[146]=7,Do[6]=Uo[6]=15,ko[6]=Bo[6]=16,Do[164]=Uo[164]=15,ko[164]=Bo[164]=16,Go[129]=Yo[129]=7,Bo[129]=zo[129]=20,Go[41]=Yo[41]=7,Bo[41]=zo[41]=20,ko[66]=zo[66]=2,Go[66]=Uo[66]=19,ko[104]=zo[104]=2,Go[104]=Uo[104]=19,jo[144]=Bo[144]=10,Uo[144]=Yo[144]=23,jo[26]=Bo[26]=10,Uo[26]=Yo[26]=23,Do[36]=Yo[36]=5,ko[36]=zo[36]=2,Do[134]=Yo[134]=5,ko[134]=zo[134]=2,jo[9]=Bo[9]=10,Do[9]=Go[9]=13,jo[161]=Bo[161]=10,Do[161]=Go[161]=13,Do[37]=Yo[37]=5,Bo[37]=zo[37]=20,Do[133]=Yo[133]=5,Bo[133]=zo[133]=20,ko[148]=Bo[148]=16,Uo[148]=Yo[148]=23,ko[22]=Bo[22]=16,Uo[22]=Yo[22]=23,jo[82]=ko[82]=8,Go[82]=Uo[82]=19,jo[88]=ko[88]=8,Go[88]=Uo[88]=19,jo[73]=zo[73]=0,Do[73]=Go[73]=13,jo[97]=zo[97]=0,Do[97]=Go[97]=13,jo[145]=Go[145]=9,Bo[145]=Yo[145]=21,jo[25]=Go[25]=9,Bo[25]=Yo[25]=21,Do[70]=zo[70]=1,ko[70]=Uo[70]=17,Do[100]=zo[100]=1,ko[100]=Uo[100]=17,jo[34]=Go[34]=9,Do[34]=ko[34]=12,Bo[34]=Yo[34]=21,Uo[34]=zo[34]=22,jo[136]=Yo[136]=4,Do[136]=zo[136]=1,ko[136]=Uo[136]=17,Go[136]=Bo[136]=18,jo[35]=Yo[35]=4,Do[35]=ko[35]=12,Go[35]=Bo[35]=18,Uo[35]=zo[35]=22,jo[153]=Yo[153]=4,Go[153]=Bo[153]=18,Do[102]=ko[102]=12,Uo[102]=zo[102]=22,jo[155]=Go[155]=9,Bo[155]=Yo[155]=23,Do[103]=zo[103]=1,ko[103]=Uo[103]=17,jo[152]=Yo[152]=4,ko[152]=Uo[152]=17,Go[152]=Bo[152]=18,jo[156]=ko[156]=8,Go[156]=Bo[156]=18,Uo[156]=Yo[156]=23,jo[137]=Yo[137]=4,Do[137]=zo[137]=1,Go[137]=Bo[137]=18,jo[139]=Yo[139]=4,Do[139]=Go[139]=13,Bo[139]=zo[139]=20,jo[98]=Go[98]=9,Do[98]=ko[98]=12,Uo[98]=zo[98]=22,jo[99]=zo[99]=0,Do[99]=ko[99]=12,Go[99]=Uo[99]=19,Do[38]=ko[38]=12,Bo[38]=Yo[38]=21,Uo[38]=zo[38]=22,Do[39]=Yo[39]=5,ko[39]=Bo[39]=16,Uo[39]=zo[39]=22;var Xo=[];function Vo(t,e,n){return(t-e)/(n-e)}function qo(t){return t.constructor.toString().indexOf("Array")>-1}function Wo(t,e,n,r,i,o){for(var s=t.cells[n][e],a=s.cval_real,u=e+r,c=n+i,l=[],h=!1;!h;){if(void 0===t.cells[c]||void 0===t.cells[c][u])if(c-=i,u-=r,a=(s=t.cells[c][u]).cval_real,-1===i)if(0===o)if(1&a)l.push([u,c]),r=-1,i=0,o=0;else{if(!(4&a)){l.push([u+s.bottomright,c]),r=0,i=1,o=1,h=!0;break}l.push([u+1,c]),r=1,i=0,o=0}else{if(!(1&a)){if(4&a){l.push([u+s.bottomright,c]),r=0,i=1,o=1,h=!0;break}l.push([u+s.bottomleft,c]),r=0,i=1,o=0,h=!0;break}l.push([u,c]),r=-1,i=0,o=0}else if(1===i)if(0===o){if(!(a&no)){if(a&eo){l.push([u+s.topleft,c+1]),r=0,i=-1,o=0,h=!0;break}l.push([u+s.topright,c+1]),r=0,i=-1,o=1,h=!0;break}l.push([u+1,c+1]),r=1,i=0,o=1}else l.push([u+1,c+1]),r=1,i=0,o=1;else if(-1===r)if(0===o){if(!(a&eo)){if(1&a){l.push([u,c+s.leftbottom]),r=1,i=0,o=0,h=!0;break}l.push([u,c+s.lefttop]),r=1,i=0,o=1,h=!0;break}l.push([u,c+1]),r=0,i=1,o=0}else{if(!(a&eo)){console.log("MarchingSquaresJS-isoBands: wtf");break}l.push([u,c+1]),r=0,i=1,o=0}else{if(1!==r){console.log("MarchingSquaresJS-isoBands: we came from nowhere!");break}if(0===o){if(!(4&a)){l.push([u+1,c+s.rightbottom]),r=-1,i=0,o=0,h=!0;break}l.push([u+1,c]),r=0,i=-1,o=1}else{if(!(4&a)){if(a&no){l.push([u+1,c+s.righttop]),r=-1,i=0,o=1;break}l.push([u+1,c+s.rightbottom]),r=-1,i=0,o=0,h=!0;break}l.push([u+1,c]),r=0,i=-1,o=1}}else if(a=(s=t.cells[c][u]).cval_real,-1===r)if(0===o)if(void 0!==t.cells[c-1]&&void 0!==t.cells[c-1][u])r=0,i=-1,o=1;else{if(!(1&a)){l.push([u+s.bottomright,c]),r=0,i=1,o=1,h=!0;break}l.push([u,c])}else{if(!(a&eo)){console.log("MarchingSquaresJS-isoBands: found entry from top at "+u+","+c);break}console.log("MarchingSquaresJS-isoBands: proceeding in x-direction!")}else if(1===r){if(0===o){console.log("MarchingSquaresJS-isoBands: wtf");break}if(void 0!==t.cells[c+1]&&void 0!==t.cells[c+1][u])r=0,i=1,o=0;else{if(!(a&no)){l.push([u+s.topleft,c+1]),r=0,i=-1,o=0,h=!0;break}l.push([u+1,c+1]),r=1,i=0,o=1}}else if(-1===i){if(1!==o){console.log("MarchingSquaresJS-isoBands: wtf");break}if(void 0!==t.cells[c][u+1])r=1,i=0,o=1;else{if(!(4&a)){l.push([u+1,c+s.righttop]),r=-1,i=0,o=1,h=!0;break}l.push([u+1,c]),r=0,i=-1,o=1}}else{if(1!==i){console.log("MarchingSquaresJS-isoBands: where did we came from???");break}if(0!==o){console.log("MarchingSquaresJS-isoBands: wtf");break}if(void 0!==t.cells[c][u-1])r=-1,i=0,o=0;else{if(!(a&eo)){l.push([u,c+s.leftbottom]),r=1,i=0,o=0,h=!0;break}l.push([u,c+1]),r=0,i=1,o=0}}if(c+=i,(u+=r)===e&&c===n)break}return{path:l,i:u,j:c,x:r,y:i,o:o}}function Ho(t){if(t.edges.length>0){var e=t.edges[t.edges.length-1],n=t.cval_real;switch(e){case 0:return n&no?{p:[1,t.righttop],x:-1,y:0,o:1}:{p:[t.topleft,1],x:0,y:-1,o:0};case 1:return 4&n?{p:[t.topleft,1],x:0,y:-1,o:0}:{p:[1,t.rightbottom],x:-1,y:0,o:0};case 2:return 4&n?{p:[t.bottomright,0],x:0,y:1,o:1}:{p:[t.topleft,1],x:0,y:-1,o:0};case 3:return 1&n?{p:[t.topleft,1],x:0,y:-1,o:0}:{p:[t.bottomleft,0],x:0,y:1,o:0};case 4:return n&no?{p:[1,t.righttop],x:-1,y:0,o:1}:{p:[t.topright,1],x:0,y:-1,o:1};case 5:return 4&n?{p:[t.topright,1],x:0,y:-1,o:1}:{p:[1,t.rightbottom],x:-1,y:0,o:0};case 6:return 4&n?{p:[t.bottomright,0],x:0,y:1,o:1}:{p:[t.topright,1],x:0,y:-1,o:1};case 7:return 1&n?{p:[t.topright,1],x:0,y:-1,o:1}:{p:[t.bottomleft,0],x:0,y:1,o:0};case 8:return 4&n?{p:[t.bottomright,0],x:0,y:1,o:1}:{p:[1,t.righttop],x:-1,y:0,o:1};case 9:return 1&n?{p:[1,t.righttop],x:-1,y:0,o:1}:{p:[t.bottomleft,0],x:0,y:1,o:0};case 10:return 1&n?{p:[0,t.leftbottom],x:1,y:0,o:0}:{p:[1,t.righttop],x:-1,y:0,o:1};case 11:return n&eo?{p:[1,t.righttop],x:-1,y:0,o:1}:{p:[0,t.lefttop],x:1,y:0,o:1};case 12:return 4&n?{p:[t.bottomright,0],x:0,y:1,o:1}:{p:[1,t.rightbottom],x:-1,y:0,o:0};case 13:return 1&n?{p:[1,t.rightbottom],x:-1,y:0,o:0}:{p:[t.bottomleft,0],x:0,y:1,o:0};case 14:return 1&n?{p:[0,t.leftbottom],x:1,y:0,o:0}:{p:[1,t.rightbottom],x:-1,y:0,o:0};case 15:return n&eo?{p:[1,t.rightbottom],x:-1,y:0,o:0}:{p:[0,t.lefttop],x:1,y:0,o:1};case 16:return 4&n?{p:[t.bottomright,0],x:0,y:1,o:1}:{p:[0,t.leftbottom],x:1,y:0,o:0};case 17:return n&eo?{p:[t.bottomright,0],x:0,y:1,o:1}:{p:[0,t.lefttop],x:1,y:0,o:1};case 18:return 1&n?{p:[0,t.leftbottom],x:1,y:0,o:0}:{p:[t.bottomleft,0],x:0,y:1,o:0};case 19:return n&eo?{p:[t.bottomleft,0],x:0,y:1,o:0}:{p:[0,t.lefttop],x:1,y:0,o:1};case 20:return n&eo?{p:[t.topleft,1],x:0,y:-1,o:0}:{p:[0,t.leftbottom],x:1,y:0,o:0};case 21:return n&no?{p:[0,t.leftbottom],x:1,y:0,o:0}:{p:[t.topright,1],x:0,y:-1,o:1};case 22:return n&eo?{p:[t.topleft,1],x:0,y:-1,o:0}:{p:[0,t.lefttop],x:1,y:0,o:1};case 23:return n&no?{p:[0,t.lefttop],x:1,y:0,o:1}:{p:[t.topright,1],x:0,y:-1,o:1};default:console.log("MarchingSquaresJS-isoBands: edge index out of range!"),console.log(t)}}return null}function Zo(t,e,n,r){var i,o,s,a,u,c=t.cval;switch(e){case-1:switch(r){case 0:i=Do[c],s=fo[c],a=po[c],u=go[c];break;default:i=jo[c],s=co[c],a=lo[c],u=ho[c]}break;case 1:switch(r){case 0:i=Bo[c],s=So[c],a=Co[c],u=Io[c];break;default:i=Uo[c],s=wo[c],a=xo[c],u=Oo[c]}break;default:switch(n){case-1:switch(r){case 0:i=zo[c],s=ro[c],a=io[c],u=oo[c];break;default:i=Yo[c],s=so[c],a=ao[c],u=uo[c]}break;case 1:switch(r){case 0:i=Go[c],s=yo[c],a=vo[c],u=_o[c];break;default:i=ko[c],s=mo[c],a=bo[c],u=Eo[c]}}}if(o=t.edges.indexOf(i),void 0===t.edges[o])return null;switch(function(t,e){delete t.edges[e];for(var n=e+1;n0){var a=r[e-1],u=os(n,a);!1!==u&&(a[1]=u,n[0]=u),s.push(a[0]),e===o.length-2&&(s.push(n[0]),s.push(n[1]))}2===o.length&&(s.push(n[0]),s.push(n[1]))}var c,l,h,f,p,d,g,y})),f(s,t.properties)}function as(t,e,n){var r=e[0]-t[0],i=e[1]-t[1],o=n[0]-e[0];return function(t){return(t>0)-(t<0)||+t}(r*(n[1]-e[1])-o*i)}function us(t,e){return e.geometry.coordinates[0].every((function(e){return ve(u(e),t)}))}Xo[1]=Xo[169]=Po,Xo[4]=Xo[166]=Ro,Xo[16]=Xo[154]=To,Xo[64]=Xo[106]=Lo,Xo[168]=Xo[2]=Mo,Xo[162]=Xo[8]=No,Xo[138]=Xo[32]=Ao,Xo[42]=Xo[128]=Fo,Xo[5]=Xo[165]=function(t){return[[0,0],[0,t.leftbottom],[1,t.rightbottom],[1,0]]},Xo[20]=Xo[150]=function(t){return[[1,0],[t.bottomright,0],[t.topright,1],[1,1]]},Xo[80]=Xo[90]=function(t){return[[1,1],[1,t.righttop],[0,t.lefttop],[0,1]]},Xo[65]=Xo[105]=function(t){return[[t.bottomleft,0],[0,0],[0,1],[t.topleft,1]]},Xo[160]=Xo[10]=function(t){return[[1,t.righttop],[1,t.rightbottom],[0,t.leftbottom],[0,t.lefttop]]},Xo[130]=Xo[40]=function(t){return[[t.topleft,1],[t.topright,1],[t.bottomright,0],[t.bottomleft,0]]},Xo[85]=function(){return[[0,0],[0,1],[1,1],[1,0]]},Xo[101]=Xo[69]=function(t){return[[1,t.rightbottom],[1,0],[0,0],[0,1],[t.topleft,1]]},Xo[149]=Xo[21]=function(t){return[[t.topright,1],[1,1],[1,0],[0,0],[0,t.leftbottom]]},Xo[86]=Xo[84]=function(t){return[[1,0],[t.bottomright,0],[0,t.lefttop],[0,1],[1,1]]},Xo[89]=Xo[81]=function(t){return[[1,1],[1,t.righttop],[t.bottomleft,0],[0,0],[0,1]]},Xo[96]=Xo[74]=function(t){return[[1,t.righttop],[1,t.rightbottom],[0,t.lefttop],[0,1],[t.topleft,1]]},Xo[24]=Xo[146]=function(t){return[[1,1],[1,t.righttop],[t.bottomright,0],[t.bottomleft,0],[t.topright,1]]},Xo[6]=Xo[164]=function(t){return[[1,t.rightbottom],[1,0],[t.bottomright,0],[0,t.leftbottom],[0,t.lefttop]]},Xo[129]=Xo[41]=function(t){return[[t.topright,1],[t.bottomleft,0],[0,0],[0,t.leftbottom],[t.topleft,1]]},Xo[66]=Xo[104]=function(t){return[[t.bottomright,0],[t.bottomleft,0],[0,t.lefttop],[0,1],[t.topleft,1]]},Xo[144]=Xo[26]=function(t){return[[1,1],[1,t.righttop],[0,t.leftbottom],[0,t.lefttop],[t.topright,1]]},Xo[36]=Xo[134]=function(t){return[[1,t.rightbottom],[1,0],[t.bottomright,0],[t.topleft,1],[t.topright,1]]},Xo[9]=Xo[161]=function(t){return[[1,t.righttop],[1,t.rightbottom],[t.bottomleft,0],[0,0],[0,t.leftbottom]]},Xo[37]=Xo[133]=function(t){return[[1,t.rightbottom],[1,0],[0,0],[0,t.leftbottom],[t.topleft,1],[t.topright,1]]},Xo[148]=Xo[22]=function(t){return[[1,1],[1,0],[t.bottomright,0],[0,t.leftbottom],[0,t.lefttop],[t.topright,1]]},Xo[82]=Xo[88]=function(t){return[[1,1],[1,t.righttop],[t.bottomright,0],[t.bottomleft,0],[0,t.lefttop],[0,1]]},Xo[73]=Xo[97]=function(t){return[[1,t.righttop],[1,t.rightbottom],[t.bottomleft,0],[0,0],[0,1],[t.topleft,1]]},Xo[145]=Xo[25]=function(t){return[[1,1],[1,t.righttop],[t.bottomleft,0],[0,0],[0,t.leftbottom],[t.topright,1]]},Xo[70]=Xo[100]=function(t){return[[1,t.rightbottom],[1,0],[t.bottomright,0],[0,t.lefttop],[0,1],[t.topleft,1]]},Xo[34]=function(t){return[Fo(t),No(t)]},Xo[35]=function(t){return[[1,t.righttop],[1,t.rightbottom],[t.bottomright,0],[t.bottomleft,0],[0,t.leftbottom],[0,t.lefttop],[t.topleft,1],[t.topright,1]]},Xo[136]=function(t){return[Ao(t),Mo(t)]},Xo[153]=function(t){return[To(t),Po(t)]},Xo[102]=function(t){return[Ro(t),Lo(t)]},Xo[155]=function(t){return[[1,1],[1,t.righttop],[t.bottomleft,0],[0,0],[0,t.leftbottom],[t.topright,1]]},Xo[103]=function(t){return[[1,t.rightbottom],[1,0],[t.bottomright,0],[0,t.lefttop],[0,1],[t.topleft,1]]},Xo[152]=function(t){return[To(t),Mo(t)]},Xo[156]=function(t){return[[1,1],[1,t.righttop],[t.bottomright,0],[t.bottomleft,0],[0,t.leftbottom],[0,t.lefttop],[t.topright,1]]},Xo[137]=function(t){return[Ao(t),Po(t)]},Xo[139]=function(t){return[[1,t.righttop],[1,t.rightbottom],[t.bottomleft,0],[0,0],[0,t.leftbottom],[t.topleft,1],[t.topright,1]]},Xo[98]=function(t){return[No(t),Lo(t)]},Xo[99]=function(t){return[[1,t.righttop],[1,t.rightbottom],[t.bottomright,0],[t.bottomleft,0],[0,t.lefttop],[0,1],[t.topleft,1]]},Xo[38]=function(t){return[Ro(t),Fo(t)]},Xo[39]=function(t){return[[1,t.rightbottom],[1,0],[t.bottomright,0],[0,t.leftbottom],[0,t.lefttop],[t.topleft,1],[t.topright,1]]};var cs=function(){function t(e){this.id=t.buildId(e),this.coordinates=e,this.innerEdges=[],this.outerEdges=[],this.outerEdgesSorted=!1}return t.buildId=function(t){return t.join(",")},t.prototype.removeInnerEdge=function(t){this.innerEdges=this.innerEdges.filter((function(e){return e.from.id!==t.from.id}))},t.prototype.removeOuterEdge=function(t){this.outerEdges=this.outerEdges.filter((function(e){return e.to.id!==t.to.id}))},t.prototype.addOuterEdge=function(t){this.outerEdges.push(t),this.outerEdgesSorted=!1},t.prototype.sortOuterEdges=function(){var t=this;this.outerEdgesSorted||(this.outerEdges.sort((function(e,n){var r=e.to,i=n.to;if(r.coordinates[0]-t.coordinates[0]>=0&&i.coordinates[0]-t.coordinates[0]<0)return 1;if(r.coordinates[0]-t.coordinates[0]<0&&i.coordinates[0]-t.coordinates[0]>=0)return-1;if(r.coordinates[0]-t.coordinates[0]==0&&i.coordinates[0]-t.coordinates[0]==0)return r.coordinates[1]-t.coordinates[1]>=0||i.coordinates[1]-t.coordinates[1]>=0?r.coordinates[1]-i.coordinates[1]:i.coordinates[1]-r.coordinates[1];var o=as(t.coordinates,r.coordinates,i.coordinates);return o<0?1:o>0?-1:Math.pow(r.coordinates[0]-t.coordinates[0],2)+Math.pow(r.coordinates[1]-t.coordinates[1],2)-(Math.pow(i.coordinates[0]-t.coordinates[0],2)+Math.pow(i.coordinates[1]-t.coordinates[1],2))})),this.outerEdgesSorted=!0)},t.prototype.getOuterEdges=function(){return this.sortOuterEdges(),this.outerEdges},t.prototype.getOuterEdge=function(t){return this.sortOuterEdges(),this.outerEdges[t]},t.prototype.addInnerEdge=function(t){this.innerEdges.push(t)},t}(),ls=function(){function t(t,e){this.from=t,this.to=e,this.next=void 0,this.label=void 0,this.symetric=void 0,this.ring=void 0,this.from.addOuterEdge(this),this.to.addInnerEdge(this)}return t.prototype.getSymetric=function(){return this.symetric||(this.symetric=new t(this.to,this.from),this.symetric.symetric=this),this.symetric},t.prototype.deleteEdge=function(){this.from.removeOuterEdge(this),this.to.removeInnerEdge(this)},t.prototype.isEqual=function(t){return this.from.id===t.from.id&&this.to.id===t.to.id},t.prototype.toString=function(){return"Edge { "+this.from.id+" -> "+this.to.id+" }"},t.prototype.toLineString=function(){return f([this.from.coordinates,this.to.coordinates])},t.prototype.compareTo=function(t){return as(t.from.coordinates,t.to.coordinates,this.to.coordinates)},t}(),hs=function(){function t(){this.edges=[],this.polygon=void 0,this.envelope=void 0}return t.prototype.push=function(t){this.edges.push(t),this.polygon=this.envelope=void 0},t.prototype.get=function(t){return this.edges[t]},Object.defineProperty(t.prototype,"length",{get:function(){return this.edges.length},enumerable:!0,configurable:!0}),t.prototype.forEach=function(t){this.edges.forEach(t)},t.prototype.map=function(t){return this.edges.map(t)},t.prototype.some=function(t){return this.edges.some(t)},t.prototype.isValid=function(){return!0},t.prototype.isHole=function(){var t=this,e=this.edges.reduce((function(e,n,r){return n.from.coordinates[1]>t.edges[e].from.coordinates[1]&&(e=r),e}),0),n=(0===e?this.length:e)-1,r=(e+1)%this.length,i=as(this.edges[n].from.coordinates,this.edges[e].from.coordinates,this.edges[r].from.coordinates);return 0===i?this.edges[n].from.coordinates[0]>this.edges[r].from.coordinates[0]:i>0},t.prototype.toMultiPoint=function(){return y(this.edges.map((function(t){return t.from.coordinates})))},t.prototype.toPolygon=function(){if(this.polygon)return this.polygon;var t=this.edges.map((function(t){return t.from.coordinates}));return t.push(this.edges[0].from.coordinates),this.polygon=l([t])},t.prototype.getEnvelope=function(){return this.envelope?this.envelope:this.envelope=yn(this.toPolygon())},t.findEdgeRingContaining=function(t,e){var n,r,i=t.getEnvelope();return e.forEach((function(e){var o,s,a,c,l,h,f=e.getEnvelope();if(r&&(n=r.getEnvelope()),s=i,a=(o=f).geometry.coordinates[0].map((function(t){return t[0]})),c=o.geometry.coordinates[0].map((function(t){return t[1]})),l=s.geometry.coordinates[0].map((function(t){return t[0]})),h=s.geometry.coordinates[0].map((function(t){return t[1]})),(Math.max.apply(null,a)!==Math.max.apply(null,l)||Math.max.apply(null,c)!==Math.max.apply(null,h)||Math.min.apply(null,a)!==Math.min.apply(null,l)||Math.min.apply(null,c)!==Math.min.apply(null,h))&&us(f,i)){for(var p=t.map((function(t){return t.from.coordinates})),d=void 0,g=function(t){e.some((function(e){return n=t,r=e.from.coordinates,n[0]===r[0]&&n[1]===r[1];var n,r}))||(d=t)},y=0,v=p;y=0;--o){var s=i[o],a=s.symetric,u=void 0,c=void 0;s.label===e&&(u=s),a.label===e&&(c=a),u&&c&&(c&&(r=c),u&&(r&&(r.next=u,r=void 0),n||(n=u)))}r&&(r.next=n)},t.prototype._findLabeledEdgeRings=function(){var t=[],e=0;return this.edges.forEach((function(n){if(!(n.label>=0)){t.push(n);var r=n;do{r.label=e,r=r.next}while(!n.isEqual(r));e++}})),t},t.prototype.getEdgeRings=function(){var t=this;this._computeNextCWEdges(),this.edges.forEach((function(t){t.label=void 0})),this._findLabeledEdgeRings().forEach((function(e){t._findIntersectionNodes(e).forEach((function(n){t._computeNextCCWEdges(n,e.label)}))}));var e=[];return this.edges.forEach((function(n){n.ring||e.push(t._findEdgeRing(n))})),e},t.prototype._findIntersectionNodes=function(t){var e=[],n=t,r=function(){var r=0;n.from.getOuterEdges().forEach((function(e){e.label===t.label&&++r})),r>1&&e.push(n.from),n=n.next};do{r()}while(!t.isEqual(n));return e},t.prototype._findEdgeRing=function(t){var e=t,n=new hs;do{n.push(e),e.ring=n,e=e.next}while(!t.isEqual(e));return n},t.prototype.removeNode=function(t){var e=this;t.getOuterEdges().forEach((function(t){return e.removeEdge(t)})),t.innerEdges.forEach((function(t){return e.removeEdge(t)})),delete this.nodes[t.id]},t.prototype.removeEdge=function(t){this.edges=this.edges.filter((function(e){return!e.isEqual(t)})),t.deleteEdge()},t}();function ps(t,e){var n=!0;return z(t,(function(t){z(e,(function(e){if(!1===n)return!1;n=function(t,e){switch(t.type){case"Point":switch(e.type){case"Point":return n=t.coordinates,r=e.coordinates,!(n[0]===r[0]&&n[1]===r[1]);case"LineString":return!ds(e,t);case"Polygon":return!ve(t,e)}break;case"LineString":switch(e.type){case"Point":return!ds(t,e);case"LineString":return!function(t,e){return Mr(t,e).features.length>0}(t,e);case"Polygon":return!gs(e,t)}break;case"Polygon":switch(e.type){case"Point":return!ve(e,t);case"LineString":return!gs(t,e);case"Polygon":return!function(t,e){for(var n=0,r=t.coordinates[0];n0}(e,t)}}var n,r;return!1}(t.geometry,e.geometry)}))})),n}function ds(t,e){for(var n=0;n0}function ys(t,e,n){var r=n[0]-t[0],i=n[1]-t[1],o=e[0]-t[0],s=e[1]-t[1];return 0==r*s-i*o&&(Math.abs(o)>=Math.abs(s)?o>0?t[0]<=n[0]&&n[0]<=e[0]:e[0]<=n[0]&&n[0]<=t[0]:s>0?t[1]<=n[1]&&n[1]<=e[1]:e[1]<=n[1]&&n[1]<=t[1])}function vs(t,e){return!(t[0]>e[0])&&!(t[2]e[1])&&!(t[3]0}function ws(t,e){for(var n=!1,r=!1,i=t.coordinates.length,o=0;o=Math.abs(a)?s>0?t[0]<=n[0]&&n[0]<=e[0]:e[0]<=n[0]&&n[0]<=t[0]:a>0?t[1]<=n[1]&&n[1]<=e[1]:e[1]<=n[1]&&n[1]<=t[1]:Math.abs(s)>=Math.abs(a)?s>0?t[0]0?t[1]=0&&(n=[].concat(t.slice(r,t.length),t.slice(1,r+1))),n},Os.prototype.comparePath=function(t,e){var n=this;return t.every((function(t,e){return n.compareCoord(t,this[e])}),e)},Os.prototype.comparePolygon=function(t,e){if(this.compareLine(t.coordinates[0],e.coordinates[0],1,!0)){var n=t.coordinates.slice(1,t.coordinates.length),r=e.coordinates.slice(1,e.coordinates.length),i=this;return n.every((function(t){return this.some((function(e){return i.compareLine(t,e,1,!0)}))}),r)}return!1},Os.prototype.compareFeature=function(t,e){return!(t.id!==e.id||!this.objectComparator(t.properties,e.properties)||!this.compareBBox(t,e))&&this.compare(t.geometry,e.geometry)},Os.prototype.compareBBox=function(t,e){return!!(!t.bbox&&!e.bbox||t.bbox&&e.bbox&&this.compareCoord(t.bbox,e.bbox))},Os.prototype.removePseudo=function(t){return t};var Ps=Os;function Rs(t,e){var n=!1;return z(t,(function(t){z(e,(function(e){if(!0===n)return!0;n=!ps(t.geometry,e.geometry)}))})),n}var Ts=Ut((function(t){function e(t,e,n,r){this.dataset=[],this.epsilon=1,this.minPts=2,this.distance=this._euclideanDistance,this.clusters=[],this.noise=[],this._visited=[],this._assigned=[],this._datasetLength=0,this._init(t,e,n,r)}e.prototype.run=function(t,e,n,r){this._init(t,e,n,r);for(var i=0;i=this.minPts&&(e=this._mergeArrays(e,i))}1!==this._assigned[r]&&this._addToCluster(r,t)}},e.prototype._addToCluster=function(t,e){this.clusters[e].push(t),this._assigned[t]=1},e.prototype._regionQuery=function(t){for(var e=[],n=0;n0){for(u=0;u=0);return t},e.prototype.assign=function(){for(var t,e=!1,n=this.dataset.length,r=0;ri&&(n=r):e=this.minPts)return n},n.prototype._regionQuery=function(t,e){e=e||this.epsilon;for(var n=[],r=0,i=this.dataset.length;r0;r.length0;){var a=t[Math.floor(Math.random()*o)],u=s?a.join("_"):""+a;n[u]||(n[u]=!0,r.push(a))}if(r.length0,s=t[Math.floor(Math.random()*i)];for(o&&s.join("_"),r.push(s);r.length0,p=[];if(n)i="kmrand"==n?Gs(t,e):"kmpp"==n?Bs(t,e):n;else for(var d={};i.length0;){var u=s.pop();if(u===n)return Vs(u);u.closed=!0;for(var c=t.neighbors(u),l=0,h=c.length;l0)){if(o/=f,f<0){if(o0){if(o>h)return;o>l&&(l=o)}if(o=r-u,f||!(o<0)){if(o/=f,f<0){if(o>h)return;o>l&&(l=o)}else if(f>0){if(o0)){if(o/=p,p<0){if(o0){if(o>h)return;o>l&&(l=o)}if(o=i-c,p||!(o<0)){if(o/=p,p<0){if(o>h)return;o>l&&(l=o)}else if(p>0){if(o0||h<1)||(l>0&&(t[0]=[u+l*f,c+l*p]),h<1&&(t[1]=[u+h*f,c+h*p]),!0)}}}}}function ca(t,e,n,r,i){var o=t[1];if(o)return!0;var s,a,u=t[0],c=t.left,l=t.right,h=c[0],f=c[1],p=l[0],d=l[1],g=(h+p)/2,y=(f+d)/2;if(d===f){if(g=r)return;if(h>p){if(u){if(u[1]>=i)return}else u=[g,n];o=[g,i]}else{if(u){if(u[1]1)if(h>p){if(u){if(u[1]>=i)return}else u=[(n-a)/s,n];o=[(i-a)/s,i]}else{if(u){if(u[1]=r)return}else u=[e,s*e+a];o=[r,s*r+a]}else{if(u){if(u[0]0&&(this.content[0]=e,this.bubbleUp(0)),t},remove:function(t){var e=this.content.indexOf(t),n=this.content.pop();e!==this.content.length-1&&(this.content[e]=n,this.scoreFunction(n)0;){var n=(t+1>>1)-1,r=this.content[n];if(!(this.scoreFunction(e)=-La)){var p=u*u+c*c,d=l*l+h*h,g=(h*p-c*d)/f,y=(u*d-l*p)/f,v=da.pop()||new ga;v.arc=t,v.site=i,v.x=g+s,v.y=(v.cy=y+a)+Math.sqrt(g*g+y*y),t.circle=v;for(var _=null,m=Pa._;m;)if(v.yTa)a=a.L;else{if(!((i=o-Sa(a,s))>Ta)){r>-Ta?(e=a.P,n=a):i>-Ta?(e=a,n=a.N):e=n=a;break}if(!a.R){e=a;break}a=a.R}!function(t){Ia[t.index]={site:t,halfedges:[]}}(t);var u=ba(t);if(Ca.insert(e,u),e||n){if(e===n)return va(e),n=ba(e.site),Ca.insert(u,n),u.edge=n.edge=oa(e.site,u.site),ya(e),void ya(n);if(n){va(e),va(n);var c=e.site,l=c[0],h=c[1],f=t[0]-l,p=t[1]-h,d=n.site,g=d[0]-l,y=d[1]-h,v=2*(f*y-p*g),_=f*f+p*p,m=g*g+y*y,b=[(y*_-p*m)/v+l,(f*m-g*_)/v+h];aa(n.edge,c,d,b),u.edge=oa(c,t,null,b),n.edge=oa(t,d,null,b),ya(e),ya(n)}else u.edge=oa(e.site,u.site)}}function Oa(t,e){var n=t.site,r=n[0],i=n[1],o=i-e;if(!o)return r;var s=t.P;if(!s)return-1/0;var a=(n=s.site)[0],u=n[1],c=u-e;if(!c)return a;var l=a-r,h=1/o-1/c,f=l/c;return h?(-f+Math.sqrt(f*f-2*h*(l*l/(-2*c)-u+c/2+i-o/2)))/h+r:(r+a)/2}function Sa(t,e){var n=t.N;if(n)return Oa(n,e);var r=t.site;return r[1]===e?r[0]:1/0}var Ca,Ia,Pa,Ra,Ta=1e-6,La=1e-12;function Ma(t,e){return e[1]-t[1]||e[0]-t[0]}function Na(t,e){var n,r,i,o=t.sort(Ma).pop();for(Ra=[],Ia=new Array(t.length),Ca=new ta,Pa=new ta;;)if(i=pa,o&&(!i||o[1]Ta||Math.abs(i[0][1]-i[1][1])>Ta)||delete Ra[o]}(s,a,u,c),function(t,e,n,r){var i,o,s,a,u,c,l,h,f,p,d,g,y=Ia.length,v=!0;for(i=0;iTa||Math.abs(g-f)>Ta)&&(u.splice(a,0,Ra.push(sa(s,p,Math.abs(d-t)Ta?[t,Math.abs(h-t)Ta?[Math.abs(f-r)Ta?[n,Math.abs(h-n)Ta?[Math.abs(f-e)=-270&&(g=-g),d<-180&&d>=-360&&(y=-y),"degrees"===o){var v=g*Math.cos(h)+y*Math.sin(h),_=y*Math.cos(h)-g*Math.sin(h);g=v,y=_}f.push([g+c[0],y+c[1]])}return f.push(f[0]),"degrees"===o?l([f],u):ts(l([f],u),s,{pivot:a})}function ja(t){var e=t*Math.PI/180;return Math.tan(e)}function Da(t,e){void 0===e&&(e={});var n=0,r=0,i=0;return B(t,(function(t,o,s){var a=e.weight?null==s?void 0:s[e.weight]:void 0;if(!P(a=null==a?1:a))throw new Error("weight value must be a number for feature index "+o);(a=Number(a))>0&&N(t,(function(t){n+=t[0]*a,r+=t[1]*a,i+=a}))})),u([n/i,r/i],e.properties,e)}function ka(t,e,n,r,i){var o=r.tolerance||.001,s=0,a=0,c=0,l=0;if(D(n,(function(e){var n,r=null===(n=e.properties)||void 0===n?void 0:n.weight,i=null==r?1:r;if(!P(i=Number(i)))throw new Error("weight value must be a number");if(i>0){l+=1;var o=i*be(e,t);0===o&&(o=1);var u=i/o;s+=e.geometry.coordinates[0]*u,a+=e.geometry.coordinates[1]*u,c+=u}})),l<1)throw new Error("no features to measure");var h=s/c,f=a/c;return 1===l||0===i||Math.abs(h-e[0])n&&(n=u,r=o,e.push([]));var c=o-r,l=t.coordinates[u][c+1],h=i[0],f=i[1],p=l[0],d=l[1];e[u].push([.75*h+.25*p,.75*f+.25*d]),e[u].push([.25*h+.75*p,.25*f+.75*d])}),!0),e.forEach((function(t){t.push(t[0])}))}function Ua(t,e){var n=0,r=0,i=0;N(t,(function(o,s,a,u,c){u>i&&(i=u,r=s,e.push([[]])),c>n&&(n=c,r=s,e[u].push([]));var l=s-r,h=t.coordinates[u][c][l+1],f=o[0],p=o[1],d=h[0],g=h[1];e[u][c].push([.75*f+.25*d,.75*p+.25*g]),e[u][c].push([.25*f+.75*d,.25*p+.75*g])}),!0),e.forEach((function(t){t.forEach((function(t){t.push(t[0])}))}))}function za(t,e,n){void 0===n&&(n=2);var r=Q(t),i=Q(e),o=r[0]-i[0],s=r[1]-i[1];return 1===n?Math.abs(o)+Math.abs(s):Math.pow(Math.pow(o,n)+Math.pow(s,n),1/n)}function Ya(t,e){var n=(e=e||{}).threshold||1e4,r=e.p||2,i=e.binary||!1,o=e.alpha||-1,s=e.standardization||!1,a=[];D(t,(function(t){a.push(wn(t))}));for(var u=[],c=0;c0?1:0}(t[0]))*e,n*Math.log(Math.tan(.25*Math.PI+.5*t[1]*e))];return i[0]>r&&(i[0]=r),i[0]<-r&&(i[0]=-r),i[1]>r&&(i[1]=r),i[1]<-r&&(i[1]=-r),i}function Za(t){var e=180/Math.PI,n=6378137;return[t[0]*e/n,(.5*Math.PI-2*Math.atan(Math.exp(-t[1]/n)))*e]}Na.prototype={constructor:Na,polygons:function(){var t=this.edges;return this.cells.map((function(e){var n=e.halfedges.map((function(n){return ha(e,t[n])}));return n.data=e.site.data,n}))},triangles:function(){var t=[],e=this.edges;return this.cells.forEach((function(n,r){if(o=(i=n.halfedges).length)for(var i,o,s,a,u,c,l=n.site,h=-1,f=e[i[o-1]],p=f.left===l?f.right:f.left;++h=a)return null;var u=t-i.site[0],c=e-i.site[1],l=u*u+c*c;do{i=o.cells[r=s],s=null,i.halfedges.forEach((function(n){var r=o.edges[n],a=r.left;if(a!==i.site&&a||(a=r.right)){var u=t-a[0],c=e-a[1],h=u*u+c*c;h0?t+n[e-1]:t})),o.forEach((function(t){t=2*t*Math.PI/o[o.length-1];var n=Math.random();i.push([n*(e.max_radial_length||10)*Math.sin(t),n*(e.max_radial_length||10)*Math.cos(t)])})),i[i.length-1]=i[0],i=i.map((r=Qa(e.bbox),function(t){return[t[0]+r[0],t[1]+r[1]]})),n.push(l([i]))},i=0;i * @license MIT * @preserve */};function du(t,e){return t>e?1:t0))break;if(null===e.right)break;if(n(t,e.right.key)>0&&(a=e.right,e.right=a.left,a.left=e,null===(e=a).right))break;i.right=e,i=e,e=e.right}}return i.right=e.left,o.left=e.right,e.left=r.right,e.right=r.left,e}function yu(t,e,n,r){var i=new pu(t,e);if(null===n)return i.left=i.right=null,i;var o=r(t,(n=gu(t,n,r)).key);return o<0?(i.left=n.left,i.right=n,n.left=null):o>=0&&(i.right=n.right,i.left=n,n.right=null),i}function vu(t,e,n){var r=null,i=null;if(e){var o=n((e=gu(t,e,n)).key,t);0===o?(r=e.left,i=e.right):o<0?(i=e.right,e.right=null,r=e):(r=e.left,e.left=null,i=e)}return{left:r,right:i}}function _u(t,e,n,r,i){if(t){r(e+(n?"└── ":"├── ")+i(t)+"\n");var o=e+(n?" ":"│ ");t.left&&_u(t.left,o,!1,r,i),t.right&&_u(t.right,o,!0,r,i)}}var mu=function(){function t(t){void 0===t&&(t=du),this._root=null,this._size=0,this._comparator=t}return t.prototype.insert=function(t,e){return this._size++,this._root=yu(t,e,this._root,this._comparator)},t.prototype.add=function(t,e){var n=new pu(t,e);null===this._root&&(n.left=n.right=null,this._size++,this._root=n);var r=this._comparator,i=gu(t,this._root,r),o=r(t,i.key);return 0===o?this._root=i:(o<0?(n.left=i.left,n.right=i,i.left=null):o>0&&(n.right=i.right,n.left=i,i.right=null),this._size++,this._root=n),this._root},t.prototype.remove=function(t){this._root=this._remove(t,this._root,this._comparator)},t.prototype._remove=function(t,e,n){var r;return null===e?null:0===n(t,(e=gu(t,e,n)).key)?(null===e.left?r=e.right:(r=gu(t,e.left,n)).right=e.right,this._size--,r):e},t.prototype.pop=function(){var t=this._root;if(t){for(;t.left;)t=t.left;return this._root=gu(t.key,this._root,this._comparator),this._root=this._remove(t.key,this._root,this._comparator),{key:t.key,data:t.data}}return null},t.prototype.findStatic=function(t){for(var e=this._root,n=this._comparator;e;){var r=n(t,e.key);if(0===r)return e;e=r<0?e.left:e.right}return null},t.prototype.find=function(t){return this._root&&(this._root=gu(t,this._root,this._comparator),0!==this._comparator(t,this._root.key))?null:this._root},t.prototype.contains=function(t){for(var e=this._root,n=this._comparator;e;){var r=n(t,e.key);if(0===r)return!0;e=r<0?e.left:e.right}return!1},t.prototype.forEach=function(t,e){for(var n=this._root,r=[],i=!1;!i;)null!==n?(r.push(n),n=n.left):0!==r.length?(n=r.pop(),t.call(e,n),n=n.right):i=!0;return this},t.prototype.range=function(t,e,n,r){for(var i=[],o=this._comparator,s=this._root;0!==i.length||s;)if(s)i.push(s),s=s.left;else{if(o((s=i.pop()).key,e)>0)break;if(o(s.key,t)>=0&&n.call(r,s))return this;s=s.right}return this},t.prototype.keys=function(){var t=[];return this.forEach((function(e){var n=e.key;return t.push(n)})),t},t.prototype.values=function(){var t=[];return this.forEach((function(e){var n=e.data;return t.push(n)})),t},t.prototype.min=function(){return this._root?this.minNode(this._root).key:null},t.prototype.max=function(){return this._root?this.maxNode(this._root).key:null},t.prototype.minNode=function(t){if(void 0===t&&(t=this._root),t)for(;t.left;)t=t.left;return t},t.prototype.maxNode=function(t){if(void 0===t&&(t=this._root),t)for(;t.right;)t=t.right;return t},t.prototype.at=function(t){for(var e=this._root,n=!1,r=0,i=[];!n;)if(e)i.push(e),e=e.left;else if(i.length>0){if(e=i.pop(),r===t)return e;r++,e=e.right}else n=!0;return null},t.prototype.next=function(t){var e=this._root,n=null;if(t.right){for(n=t.right;n.left;)n=n.left;return n}for(var r=this._comparator;e;){var i=r(t.key,e.key);if(0===i)break;i<0?(n=e,e=e.left):e=e.right}return n},t.prototype.prev=function(t){var e=this._root,n=null;if(null!==t.left){for(n=t.left;n.right;)n=n.right;return n}for(var r=this._comparator;e;){var i=r(t.key,e.key);if(0===i)break;i<0?e=e.left:(n=e,e=e.right)}return n},t.prototype.clear=function(){return this._root=null,this._size=0,this},t.prototype.toList=function(){return function(t){for(var e=t,n=[],r=!1,i=new pu(null,null),o=i;!r;)e?(n.push(e),e=e.left):n.length>0?e=(e=o=o.next=n.pop()).right:r=!0;return o.next=null,i.next}(this._root)},t.prototype.load=function(t,e,n){void 0===e&&(e=[]),void 0===n&&(n=!1);var r=t.length,i=this._comparator;if(n&&wu(t,e,0,r-1,i),null===this._root)this._root=bu(t,e,0,r),this._size=r;else{var o=function(t,e,n){for(var r=new pu(null,null),i=r,o=t,s=e;null!==o&&null!==s;)n(o.key,s.key)<0?(i.next=o,o=o.next):(i.next=s,s=s.next),i=i.next;return null!==o?i.next=o:null!==s&&(i.next=s),r.next}(this.toList(),function(t,e){for(var n=new pu(null,null),r=n,i=0;i0){var o=n+Math.floor(i/2),s=t[o],a=e[o],u=new pu(s,a);return u.left=bu(t,e,n,o),u.right=bu(t,e,o+1,r),u}return null}function Eu(t,e,n){var r=n-e;if(r>0){var i=e+Math.floor(r/2),o=Eu(t,e,i),s=t.head;return s.left=o,t.head=t.head.next,s.right=Eu(t,i+1,n),s}return null}function wu(t,e,n,r,i){if(!(n>=r)){for(var o=t[n+r>>1],s=n-1,a=r+1;;){do{s++}while(i(t[s],o)<0);do{a--}while(i(t[a],o)>0);if(s>=a)break;var u=t[s];t[s]=t[a],t[a]=u,u=e[s],e[s]=e[a],e[a]=u}wu(t,e,n,a,i),wu(t,e,a+1,r,i)}}function xu(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Ou(t,e){for(var n=0;ne.x?1:t.ye.y?1:0}}]),Su(t,[{key:"link",value:function(t){if(t.point===this.point)throw new Error("Tried to link already linked events");for(var e=t.point.events,n=0,r=e.length;n=0&&u>=0?sc?-1:0:o<0&&u<0?sc?1:0:uo?1:0}}}]),t}(),zu=0,Yu=function(){function t(e,n,r,i){xu(this,t),this.id=++zu,this.leftSE=e,e.segment=this,e.otherSE=n,this.rightSE=n,n.segment=this,n.otherSE=e,this.rings=r,this.windings=i}return Su(t,null,[{key:"compare",value:function(t,e){var n=t.leftSE.point.x,r=e.leftSE.point.x,i=t.rightSE.point.x,o=e.rightSE.point.x;if(os&&a>u)return-1;var l=t.comparePoint(e.leftSE.point);if(l<0)return 1;if(l>0)return-1;var h=e.comparePoint(t.rightSE.point);return 0!==h?h:-1}if(n>r){if(sa&&s>c)return 1;var f=e.comparePoint(t.leftSE.point);if(0!==f)return f;var p=t.comparePoint(e.rightSE.point);return p<0?1:p>0?-1:1}if(sa)return 1;if(io){var g=t.comparePoint(e.rightSE.point);if(g<0)return 1;if(g>0)return-1}if(i!==o){var y=u-s,v=i-n,_=c-a,m=o-r;if(y>v&&_m)return-1}return i>o?1:ic?1:t.ide.id?1:0}}]),Su(t,[{key:"replaceRightSE",value:function(t){this.rightSE=t,this.rightSE.segment=this,this.rightSE.otherSE=this.leftSE,this.leftSE.otherSE=this.rightSE}},{key:"bbox",value:function(){var t=this.leftSE.point.y,e=this.rightSE.point.y;return{ll:{x:this.leftSE.point.x,y:te?t:e}}}},{key:"vector",value:function(){return{x:this.rightSE.point.x-this.leftSE.point.x,y:this.rightSE.point.y-this.leftSE.point.y}}},{key:"isAnEndpoint",value:function(t){return t.x===this.leftSE.point.x&&t.y===this.leftSE.point.y||t.x===this.rightSE.point.x&&t.y===this.rightSE.point.y}},{key:"comparePoint",value:function(t){if(this.isAnEndpoint(t))return 0;var e=this.leftSE.point,n=this.rightSE.point,r=this.vector();if(e.x===n.x)return t.x===e.x?0:t.x0&&a.swapEvents(),Uu.comparePoints(this.leftSE.point,this.rightSE.point)>0&&this.swapEvents(),r&&(i.checkForConsuming(),o.checkForConsuming()),n}},{key:"swapEvents",value:function(){var t=this.rightSE;this.rightSE=this.leftSE,this.leftSE=t,this.leftSE.isLeft=!0,this.rightSE.isLeft=!1;for(var e=0,n=this.windings.length;e0){var o=n;n=r,r=o}if(n.prev===r){var s=n;n=r,r=s}for(var a=0,u=r.rings.length;a0))throw new Error("Tried to create degenerate segment at [".concat(e.x,", ").concat(e.y,"]"));i=n,o=e,s=-1}return new t(new Uu(i,!0),new Uu(o,!1),[r],[s])}}]),t}(),Xu=function(){function t(e,n,r){if(xu(this,t),!Array.isArray(e)||0===e.length)throw new Error("Input geometry is not a valid Polygon or MultiPolygon");if(this.poly=n,this.isExterior=r,this.segments=[],"number"!=typeof e[0][0]||"number"!=typeof e[0][1])throw new Error("Input geometry is not a valid Polygon or MultiPolygon");var i=Nu.round(e[0][0],e[0][1]);this.bbox={ll:{x:i.x,y:i.y},ur:{x:i.x,y:i.y}};for(var o=i,s=1,a=e.length;sthis.bbox.ur.x&&(this.bbox.ur.x=u.x),u.y>this.bbox.ur.y&&(this.bbox.ur.y=u.y),o=u)}i.x===o.x&&i.y===o.y||this.segments.push(Yu.fromRing(o,i,this))}return Su(t,[{key:"getSweepEvents",value:function(){for(var t=[],e=0,n=this.segments.length;ethis.bbox.ur.x&&(this.bbox.ur.x=o.bbox.ur.x),o.bbox.ur.y>this.bbox.ur.y&&(this.bbox.ur.y=o.bbox.ur.y),this.interiorRings.push(o)}this.multiPoly=n}return Su(t,[{key:"getSweepEvents",value:function(){for(var t=this.exteriorRing.getSweepEvents(),e=0,n=this.interiorRings.length;ethis.bbox.ur.x&&(this.bbox.ur.x=o.bbox.ur.x),o.bbox.ur.y>this.bbox.ur.y&&(this.bbox.ur.y=o.bbox.ur.y),this.polys.push(o)}this.isSubject=n}return Su(t,[{key:"getSweepEvents",value:function(){for(var t=[],e=0,n=this.polys.length;e0&&(t=r)}for(var i=t.segment.prevInResult(),o=i?i.prevInResult():null;;){if(!i)return null;if(!o)return i.ringOut;if(o.ringOut!==i.ringOut)return o.ringOut.enclosingRing()!==i.ringOut?i.ringOut:i.ringOut.enclosingRing();i=o.prevInResult(),o=i?i.prevInResult():null}}}]),t}(),Hu=function(){function t(e){xu(this,t),this.exteriorRing=e,e.poly=this,this.interiorRings=[]}return Su(t,[{key:"addInterior",value:function(t){this.interiorRings.push(t),t.poly=this}},{key:"getGeom",value:function(){var t=[this.exteriorRing.getGeom()];if(null===t[0])return null;for(var e=0,n=this.interiorRings.length;e1&&void 0!==arguments[1]?arguments[1]:Yu.compare;xu(this,t),this.queue=e,this.tree=new mu(n),this.segments=[]}return Su(t,[{key:"process",value:function(t){var e=t.segment,n=[];if(t.consumedBy)return t.isLeft?this.queue.remove(t.otherSE):this.tree.remove(e),n;var r=t.isLeft?this.tree.insert(e):this.tree.find(e);if(!r)throw new Error("Unable to find segment #".concat(e.id," ")+"[".concat(e.leftSE.point.x,", ").concat(e.leftSE.point.y,"] -> ")+"[".concat(e.rightSE.point.x,", ").concat(e.rightSE.point.y,"] ")+"in SweepLine tree. Please submit a bug report.");for(var i=r,o=r,s=void 0,a=void 0;void 0===s;)null===(i=this.tree.prev(i))?s=null:void 0===i.key.consumedBy&&(s=i.key);for(;void 0===a;)null===(o=this.tree.next(o))?a=null:void 0===o.key.consumedBy&&(a=o.key);if(t.isLeft){var u=null;if(s){var c=s.getIntersection(e);if(null!==c&&(e.isAnEndpoint(c)||(u=c),!s.isAnEndpoint(c)))for(var l=this._splitSafely(s,c),h=0,f=l.length;h0?(this.tree.remove(e),n.push(t)):(this.segments.push(e),e.prev=s)}else{if(s&&a){var w=s.getIntersection(a);if(null!==w){if(!s.isAnEndpoint(w))for(var x=this._splitSafely(s,w),O=0,S=x.length;OJu)throw new Error("Infinite loop when putting segment endpoints in a priority queue (queue size too big). Please file a bug report.");for(var m=new Ku(p),b=p.size,E=p.pop();E;){var w=E.key;if(p.size===b){var x=w.segment;throw new Error("Unable to pop() ".concat(w.isLeft?"left":"right"," SweepEvent ")+"[".concat(w.point.x,", ").concat(w.point.y,"] from segment #").concat(x.id," ")+"[".concat(x.leftSE.point.x,", ").concat(x.leftSE.point.y,"] -> ")+"[".concat(x.rightSE.point.x,", ").concat(x.rightSE.point.y,"] from queue. ")+"Please file a bug report.")}if(p.size>Ju)throw new Error("Infinite loop when passing sweep line over endpoints (queue size too big). Please file a bug report.");if(m.segments.length>Qu)throw new Error("Infinite loop when passing sweep line over endpoints (too many sweep line segments). Please file a bug report.");for(var O=m.process(w),S=0,C=O.length;S1?e-1:0),r=1;r1?e-1:0),r=1;r1?e-1:0),r=1;r1?e-1:0),r=1;re.x?1:this.ye.y?1:0},cc.prototype.clone=function(){},cc.prototype.copy=function(){return new cc(this)},cc.prototype.toString=function(){return"("+this.x+", "+this.y+", "+this.z+")"},cc.prototype.distance3D=function(t){var e=this.x-t.x,n=this.y-t.y,r=this.z-t.z;return Math.sqrt(e*e+n*n+r*r)},cc.prototype.distance=function(t){var e=this.x-t.x,n=this.y-t.y;return Math.sqrt(e*e+n*n)},cc.prototype.hashCode=function(){var t=17;return 37*(t=37*t+cc.hashCode(this.x))+cc.hashCode(this.y)},cc.prototype.setCoordinate=function(t){this.x=t.x,this.y=t.y,this.z=t.z},cc.prototype.interfaces_=function(){return[oc,sc,uc]},cc.prototype.getClass=function(){return cc},cc.hashCode=function(){if(1===arguments.length){var t=arguments[0],e=rc.doubleToLongBits(t);return Math.trunc((e^e)>>>32)}},lc.DimensionalComparator.get=function(){return hc},lc.serialVersionUID.get=function(){return 0x5cbf2c235c7e5800},lc.NULL_ORDINATE.get=function(){return rc.NaN},lc.X.get=function(){return 0},lc.Y.get=function(){return 1},lc.Z.get=function(){return 2},Object.defineProperties(cc,lc);var hc=function(t){if(this._dimensionsToTest=2,0===arguments.length);else if(1===arguments.length){var e=arguments[0];if(2!==e&&3!==e)throw new nc("only 2 or 3 dimensions may be specified");this._dimensionsToTest=e}};hc.prototype.compare=function(t,e){var n=t,r=e,i=hc.compare(n.x,r.x);if(0!==i)return i;var o=hc.compare(n.y,r.y);return 0!==o?o:this._dimensionsToTest<=2?0:hc.compare(n.z,r.z)},hc.prototype.interfaces_=function(){return[ac]},hc.prototype.getClass=function(){return hc},hc.compare=function(t,e){return te?1:rc.isNaN(t)?rc.isNaN(e)?0:-1:rc.isNaN(e)?1:0};var fc=function(){};fc.prototype.create=function(){},fc.prototype.interfaces_=function(){return[]},fc.prototype.getClass=function(){return fc};var pc=function(){},dc={INTERIOR:{configurable:!0},BOUNDARY:{configurable:!0},EXTERIOR:{configurable:!0},NONE:{configurable:!0}};pc.prototype.interfaces_=function(){return[]},pc.prototype.getClass=function(){return pc},pc.toLocationSymbol=function(t){switch(t){case pc.EXTERIOR:return"e";case pc.BOUNDARY:return"b";case pc.INTERIOR:return"i";case pc.NONE:return"-"}throw new nc("Unknown location value: "+t)},dc.INTERIOR.get=function(){return 0},dc.BOUNDARY.get=function(){return 1},dc.EXTERIOR.get=function(){return 2},dc.NONE.get=function(){return-1},Object.defineProperties(pc,dc);var gc=function(t,e){return t.interfaces_&&t.interfaces_().indexOf(e)>-1},yc=function(){},vc={LOG_10:{configurable:!0}};yc.prototype.interfaces_=function(){return[]},yc.prototype.getClass=function(){return yc},yc.log10=function(t){var e=Math.log(t);return rc.isInfinite(e)||rc.isNaN(e)?e:e/yc.LOG_10},yc.min=function(t,e,n,r){var i=t;return en?n:t}if(Number.isInteger(arguments[2])&&Number.isInteger(arguments[0])&&Number.isInteger(arguments[1])){var r=arguments[0],i=arguments[1],o=arguments[2];return ro?o:r}},yc.wrap=function(t,e){return t<0?e- -t%e:t%e},yc.max=function(){if(3===arguments.length){var t=arguments[0],e=arguments[1],n=arguments[2],r=t;return e>r&&(r=e),n>r&&(r=n),r}if(4===arguments.length){var i=arguments[0],o=arguments[1],s=arguments[2],a=arguments[3],u=i;return o>u&&(u=o),s>u&&(u=s),a>u&&(u=a),u}},yc.average=function(t,e){return(t+e)/2},vc.LOG_10.get=function(){return Math.log(10)},Object.defineProperties(yc,vc);var _c=function(t){this.str=t};_c.prototype.append=function(t){this.str+=t},_c.prototype.setCharAt=function(t,e){this.str=this.str.substr(0,t)+e+this.str.substr(t+1)},_c.prototype.toString=function(t){return this.str};var mc=function(t){this.value=t};mc.prototype.intValue=function(){return this.value},mc.prototype.compareTo=function(t){return this.valuet?1:0},mc.isNaN=function(t){return Number.isNaN(t)};var bc=function(){};bc.isWhitespace=function(t){return t<=32&&t>=0||127===t},bc.toUpperCase=function(t){return t.toUpperCase()};var Ec=function t(){if(this._hi=0,this._lo=0,0===arguments.length)this.init(0);else if(1===arguments.length){if("number"==typeof arguments[0]){var e=arguments[0];this.init(e)}else if(arguments[0]instanceof t){var n=arguments[0];this.init(n)}else if("string"==typeof arguments[0]){var r=arguments[0];t.call(this,t.parse(r))}}else if(2===arguments.length){var i=arguments[0],o=arguments[1];this.init(i,o)}},wc={PI:{configurable:!0},TWO_PI:{configurable:!0},PI_2:{configurable:!0},E:{configurable:!0},NaN:{configurable:!0},EPS:{configurable:!0},SPLIT:{configurable:!0},MAX_PRINT_DIGITS:{configurable:!0},TEN:{configurable:!0},ONE:{configurable:!0},SCI_NOT_EXPONENT_CHAR:{configurable:!0},SCI_NOT_ZERO:{configurable:!0}};Ec.prototype.le=function(t){return(this._hi9?(l=!0,h="9"):h="0"+c,s.append(h),n=n.subtract(Ec.valueOf(c)).multiply(Ec.TEN),l&&n.selfAdd(Ec.TEN);var f=!0,p=Ec.magnitude(n._hi);if(p<0&&Math.abs(p)>=a-u&&(f=!1),!f)break}return e[0]=r,s.toString()},Ec.prototype.sqr=function(){return this.multiply(this)},Ec.prototype.doubleValue=function(){return this._hi+this._lo},Ec.prototype.subtract=function(){if(arguments[0]instanceof Ec){var t=arguments[0];return this.add(t.negate())}if("number"==typeof arguments[0]){var e=arguments[0];return this.add(-e)}},Ec.prototype.equals=function(){if(1===arguments.length){var t=arguments[0];return this._hi===t._hi&&this._lo===t._lo}},Ec.prototype.isZero=function(){return 0===this._hi&&0===this._lo},Ec.prototype.selfSubtract=function(){if(arguments[0]instanceof Ec){var t=arguments[0];return this.isNaN()?this:this.selfAdd(-t._hi,-t._lo)}if("number"==typeof arguments[0]){var e=arguments[0];return this.isNaN()?this:this.selfAdd(-e,0)}},Ec.prototype.getSpecialNumberString=function(){return this.isZero()?"0.0":this.isNaN()?"NaN ":null},Ec.prototype.min=function(t){return this.le(t)?this:t},Ec.prototype.selfDivide=function(){if(1===arguments.length){if(arguments[0]instanceof Ec){var t=arguments[0];return this.selfDivide(t._hi,t._lo)}if("number"==typeof arguments[0]){var e=arguments[0];return this.selfDivide(e,0)}}else if(2===arguments.length){var n=arguments[0],r=arguments[1],i=null,o=null,s=null,a=null,u=null,c=null,l=null,h=null;return u=this._hi/n,h=(i=(c=Ec.SPLIT*u)-(i=c-u))*(s=(h=Ec.SPLIT*n)-(s=h-n))-(l=u*n)+i*(a=n-s)+(o=u-i)*s+o*a,h=u+(c=(this._hi-l-h+this._lo-u*r)/n),this._hi=h,this._lo=u-h+c,this}},Ec.prototype.dump=function(){return"DD<"+this._hi+", "+this._lo+">"},Ec.prototype.divide=function(){if(arguments[0]instanceof Ec){var t=arguments[0],e=null,n=null,r=null,i=null,o=null,s=null,a=null,u=null;n=(o=this._hi/t._hi)-(e=(s=Ec.SPLIT*o)-(e=s-o)),u=e*(r=(u=Ec.SPLIT*t._hi)-(r=u-t._hi))-(a=o*t._hi)+e*(i=t._hi-r)+n*r+n*i;var c=u=o+(s=(this._hi-a-u+this._lo-o*t._lo)/t._hi),l=o-u+s;return new Ec(c,l)}if("number"==typeof arguments[0]){var h=arguments[0];return rc.isNaN(h)?Ec.createNaN():Ec.copy(this).selfDivide(h,0)}},Ec.prototype.ge=function(t){return(this._hi>t._hi||this._hi===t._hi)&&this._lo>=t._lo},Ec.prototype.pow=function(t){if(0===t)return Ec.valueOf(1);var e=new Ec(this),n=Ec.valueOf(1),r=Math.abs(t);if(r>1)for(;r>0;)r%2==1&&n.selfMultiply(e),(r/=2)>0&&(e=e.sqr());else n=e;return t<0?n.reciprocal():n},Ec.prototype.ceil=function(){if(this.isNaN())return Ec.NaN;var t=Math.ceil(this._hi),e=0;return t===this._hi&&(e=Math.ceil(this._lo)),new Ec(t,e)},Ec.prototype.compareTo=function(t){var e=t;return this._hie._hi?1:this._loe._lo?1:0},Ec.prototype.rint=function(){return this.isNaN()?this:this.add(.5).floor()},Ec.prototype.setValue=function(){if(arguments[0]instanceof Ec){var t=arguments[0];return this.init(t),this}if("number"==typeof arguments[0]){var e=arguments[0];return this.init(e),this}},Ec.prototype.max=function(t){return this.ge(t)?this:t},Ec.prototype.sqrt=function(){if(this.isZero())return Ec.valueOf(0);if(this.isNegative())return Ec.NaN;var t=1/Math.sqrt(this._hi),e=this._hi*t,n=Ec.valueOf(e),r=this.subtract(n.sqr())._hi*(.5*t);return n.add(r)},Ec.prototype.selfAdd=function(){if(1===arguments.length){if(arguments[0]instanceof Ec){var t=arguments[0];return this.selfAdd(t._hi,t._lo)}if("number"==typeof arguments[0]){var e=arguments[0],n=null,r=null,i=null,o=null,s=null,a=null;return o=(i=this._hi+e)-(s=i-this._hi),r=(a=(o=e-s+(this._hi-o))+this._lo)+(i-(n=i+a)),this._hi=n+r,this._lo=r+(n-this._hi),this}}else if(2===arguments.length){var u=arguments[0],c=arguments[1],l=null,h=null,f=null,p=null,d=null,g=null,y=null;p=this._hi+u,h=this._lo+c,d=p-(g=p-this._hi),f=h-(y=h-this._lo);var v=(l=p+(g=(d=u-g+(this._hi-d))+h))+(g=(f=c-y+(this._lo-f))+(g+(p-l))),_=g+(l-v);return this._hi=v,this._lo=_,this}},Ec.prototype.selfMultiply=function(){if(1===arguments.length){if(arguments[0]instanceof Ec){var t=arguments[0];return this.selfMultiply(t._hi,t._lo)}if("number"==typeof arguments[0]){var e=arguments[0];return this.selfMultiply(e,0)}}else if(2===arguments.length){var n=arguments[0],r=arguments[1],i=null,o=null,s=null,a=null,u=null,c=null;i=(u=Ec.SPLIT*this._hi)-this._hi,c=Ec.SPLIT*n,i=u-i,o=this._hi-i,s=c-n;var l=(u=this._hi*n)+(c=i*(s=c-s)-u+i*(a=n-s)+o*s+o*a+(this._hi*r+this._lo*n)),h=c+(i=u-l);return this._hi=l,this._lo=h,this}},Ec.prototype.selfSqr=function(){return this.selfMultiply(this)},Ec.prototype.floor=function(){if(this.isNaN())return Ec.NaN;var t=Math.floor(this._hi),e=0;return t===this._hi&&(e=Math.floor(this._lo)),new Ec(t,e)},Ec.prototype.negate=function(){return this.isNaN()?this:new Ec(-this._hi,-this._lo)},Ec.prototype.clone=function(){},Ec.prototype.multiply=function(){if(arguments[0]instanceof Ec){var t=arguments[0];return t.isNaN()?Ec.createNaN():Ec.copy(this).selfMultiply(t)}if("number"==typeof arguments[0]){var e=arguments[0];return rc.isNaN(e)?Ec.createNaN():Ec.copy(this).selfMultiply(e,0)}},Ec.prototype.isNaN=function(){return rc.isNaN(this._hi)},Ec.prototype.intValue=function(){return Math.trunc(this._hi)},Ec.prototype.toString=function(){var t=Ec.magnitude(this._hi);return t>=-3&&t<=20?this.toStandardNotation():this.toSciNotation()},Ec.prototype.toStandardNotation=function(){var t=this.getSpecialNumberString();if(null!==t)return t;var e=new Array(1).fill(null),n=this.extractSignificantDigits(!0,e),r=e[0]+1,i=n;if("."===n.charAt(0))i="0"+n;else if(r<0)i="0."+Ec.stringOfChar("0",-r)+n;else if(-1===n.indexOf(".")){var o=r-n.length;i=n+Ec.stringOfChar("0",o)+".0"}return this.isNegative()?"-"+i:i},Ec.prototype.reciprocal=function(){var t,e,n,r,i=null,o=null,s=null,a=null;t=(n=1/this._hi)-(i=(s=Ec.SPLIT*n)-(i=s-n)),o=(a=Ec.SPLIT*this._hi)-this._hi;var u=n+(s=(1-(r=n*this._hi)-(a=i*(o=a-o)-r+i*(e=this._hi-o)+t*o+t*e)-n*this._lo)/this._hi);return new Ec(u,n-u+s)},Ec.prototype.toSciNotation=function(){if(this.isZero())return Ec.SCI_NOT_ZERO;var t=this.getSpecialNumberString();if(null!==t)return t;var e=new Array(1).fill(null),n=this.extractSignificantDigits(!1,e),r=Ec.SCI_NOT_EXPONENT_CHAR+e[0];if("0"===n.charAt(0))throw new Error("Found leading zero: "+n);var i="";n.length>1&&(i=n.substring(1));var o=n.charAt(0)+"."+i;return this.isNegative()?"-"+o+r:o+r},Ec.prototype.abs=function(){return this.isNaN()?Ec.NaN:this.isNegative()?this.negate():new Ec(this)},Ec.prototype.isPositive=function(){return(this._hi>0||0===this._hi)&&this._lo>0},Ec.prototype.lt=function(t){return(this._hit._hi||this._hi===t._hi)&&this._lo>t._lo},Ec.prototype.isNegative=function(){return(this._hi<0||0===this._hi)&&this._lo<0},Ec.prototype.trunc=function(){return this.isNaN()?Ec.NaN:this.isPositive()?this.floor():this.ceil()},Ec.prototype.signum=function(){return this._hi>0?1:this._hi<0?-1:this._lo>0?1:this._lo<0?-1:0},Ec.prototype.interfaces_=function(){return[uc,oc,sc]},Ec.prototype.getClass=function(){return Ec},Ec.sqr=function(t){return Ec.valueOf(t).selfMultiply(t)},Ec.valueOf=function(){if("string"==typeof arguments[0]){var t=arguments[0];return Ec.parse(t)}if("number"==typeof arguments[0]){var e=arguments[0];return new Ec(e)}},Ec.sqrt=function(t){return Ec.valueOf(t).sqrt()},Ec.parse=function(t){for(var e=0,n=t.length;bc.isWhitespace(t.charAt(e));)e++;var r=!1;if(e=n);){var c=t.charAt(e);if(e++,bc.isDigit(c)){var l=c-"0";o.selfMultiply(Ec.TEN),o.selfAdd(l),s++}else{if("."!==c){if("e"===c||"E"===c){var h=t.substring(e);try{u=mc.parseInt(h)}catch(e){throw e instanceof Error?new Error("Invalid exponent "+h+" in string "+t):e}break}throw new Error("Unexpected character '"+c+"' at position "+e+" in string "+t)}a=s}}var f=o,p=s-a-u;if(0===p)f=o;else if(p>0){var d=Ec.TEN.pow(p);f=o.divide(d)}else if(p<0){var g=Ec.TEN.pow(-p);f=o.multiply(g)}return r?f.negate():f},Ec.createNaN=function(){return new Ec(rc.NaN,rc.NaN)},Ec.copy=function(t){return new Ec(t)},Ec.magnitude=function(t){var e=Math.abs(t),n=Math.log(e)/Math.log(10),r=Math.trunc(Math.floor(n));return 10*Math.pow(10,r)<=e&&(r+=1),r},Ec.stringOfChar=function(t,e){for(var n=new _c,r=0;r0){if(o<=0)return xc.signum(s);r=i+o}else{if(!(i<0))return xc.signum(s);if(o>=0)return xc.signum(s);r=-i-o}var a=xc.DP_SAFE_EPSILON*r;return s>=a||-s>=a?xc.signum(s):2},xc.signum=function(t){return t>0?1:t<0?-1:0},Oc.DP_SAFE_EPSILON.get=function(){return 1e-15},Object.defineProperties(xc,Oc);var Sc=function(){},Cc={X:{configurable:!0},Y:{configurable:!0},Z:{configurable:!0},M:{configurable:!0}};Cc.X.get=function(){return 0},Cc.Y.get=function(){return 1},Cc.Z.get=function(){return 2},Cc.M.get=function(){return 3},Sc.prototype.setOrdinate=function(t,e,n){},Sc.prototype.size=function(){},Sc.prototype.getOrdinate=function(t,e){},Sc.prototype.getCoordinate=function(){},Sc.prototype.getCoordinateCopy=function(t){},Sc.prototype.getDimension=function(){},Sc.prototype.getX=function(t){},Sc.prototype.clone=function(){},Sc.prototype.expandEnvelope=function(t){},Sc.prototype.copy=function(){},Sc.prototype.getY=function(t){},Sc.prototype.toCoordinateArray=function(){},Sc.prototype.interfaces_=function(){return[sc]},Sc.prototype.getClass=function(){return Sc},Object.defineProperties(Sc,Cc);var Ic=function(){},Pc=function(t){function e(){t.call(this,"Projective point not representable on the Cartesian plane.")}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.interfaces_=function(){return[]},e.prototype.getClass=function(){return e},e}(Ic),Rc=function(){};Rc.arraycopy=function(t,e,n,r,i){for(var o=0,s=e;st._minx?this._minx:t._minx,n=this._miny>t._miny?this._miny:t._miny,r=this._maxx=this._minx&&e.getMaxX()<=this._maxx&&e.getMinY()>=this._miny&&e.getMaxY()<=this._maxy}}else if(2===arguments.length){var n=arguments[0],r=arguments[1];return!this.isNull()&&n>=this._minx&&n<=this._maxx&&r>=this._miny&&r<=this._maxy}},Lc.prototype.intersects=function(){if(1===arguments.length){if(arguments[0]instanceof Lc){var t=arguments[0];return!this.isNull()&&!t.isNull()&&!(t._minx>this._maxx||t._maxxthis._maxy||t._maxythis._maxx||nthis._maxy||rthis._maxx&&(this._maxx=e._maxx),e._minythis._maxy&&(this._maxy=e._maxy))}}else if(2===arguments.length){var n=arguments[0],r=arguments[1];this.isNull()?(this._minx=n,this._maxx=n,this._miny=r,this._maxy=r):(nthis._maxx&&(this._maxx=n),rthis._maxy&&(this._maxy=r))}},Lc.prototype.minExtent=function(){if(this.isNull())return 0;var t=this.getWidth(),e=this.getHeight();return te._minx?1:this._minye._miny?1:this._maxxe._maxx?1:this._maxye._maxy?1:0},Lc.prototype.translate=function(t,e){if(this.isNull())return null;this.init(this.getMinX()+t,this.getMaxX()+t,this.getMinY()+e,this.getMaxY()+e)},Lc.prototype.toString=function(){return"Env["+this._minx+" : "+this._maxx+", "+this._miny+" : "+this._maxy+"]"},Lc.prototype.setToNull=function(){this._minx=0,this._maxx=-1,this._miny=0,this._maxy=-1},Lc.prototype.getHeight=function(){return this.isNull()?0:this._maxy-this._miny},Lc.prototype.maxExtent=function(){if(this.isNull())return 0;var t=this.getWidth(),e=this.getHeight();return t>e?t:e},Lc.prototype.expandBy=function(){if(1===arguments.length){var t=arguments[0];this.expandBy(t,t)}else if(2===arguments.length){var e=arguments[0],n=arguments[1];if(this.isNull())return null;this._minx-=e,this._maxx+=e,this._miny-=n,this._maxy+=n,(this._minx>this._maxx||this._miny>this._maxy)&&this.setToNull()}},Lc.prototype.contains=function(){if(1===arguments.length){if(arguments[0]instanceof Lc){var t=arguments[0];return this.covers(t)}if(arguments[0]instanceof cc){var e=arguments[0];return this.covers(e)}}else if(2===arguments.length){var n=arguments[0],r=arguments[1];return this.covers(n,r)}},Lc.prototype.centre=function(){return this.isNull()?null:new cc((this.getMinX()+this.getMaxX())/2,(this.getMinY()+this.getMaxY())/2)},Lc.prototype.init=function(){if(0===arguments.length)this.setToNull();else if(1===arguments.length){if(arguments[0]instanceof cc){var t=arguments[0];this.init(t.x,t.x,t.y,t.y)}else if(arguments[0]instanceof Lc){var e=arguments[0];this._minx=e._minx,this._maxx=e._maxx,this._miny=e._miny,this._maxy=e._maxy}}else if(2===arguments.length){var n=arguments[0],r=arguments[1];this.init(n.x,r.x,n.y,r.y)}else if(4===arguments.length){var i=arguments[0],o=arguments[1],s=arguments[2],a=arguments[3];it._maxx&&(e=this._minx-t._maxx);var n=0;return this._maxyt._maxy&&(n=this._miny-t._maxy),0===e?n:0===n?e:Math.sqrt(e*e+n*n)},Lc.prototype.hashCode=function(){var t=17;return 37*(t=37*(t=37*(t=37*t+cc.hashCode(this._minx))+cc.hashCode(this._maxx))+cc.hashCode(this._miny))+cc.hashCode(this._maxy)},Lc.prototype.interfaces_=function(){return[oc,uc]},Lc.prototype.getClass=function(){return Lc},Lc.intersects=function(){if(3===arguments.length){var t=arguments[0],e=arguments[1],n=arguments[2];return n.x>=(t.xe.x?t.x:e.x)&&n.y>=(t.ye.y?t.y:e.y)}if(4===arguments.length){var r=arguments[0],i=arguments[1],o=arguments[2],s=arguments[3],a=Math.min(o.x,s.x),u=Math.max(o.x,s.x),c=Math.min(r.x,i.x),l=Math.max(r.x,i.x);return!(c>u)&&!(lu)&&!(ln?(this._intLineIndex[t][0]=0,this._intLineIndex[t][1]=1):(this._intLineIndex[t][0]=1,this._intLineIndex[t][1]=0)}},Uc.prototype.isProper=function(){return this.hasIntersection()&&this._isProper},Uc.prototype.setPrecisionModel=function(t){this._precisionModel=t},Uc.prototype.isInteriorIntersection=function(){var t=this;if(0===arguments.length)return!!this.isInteriorIntersection(0)||!!this.isInteriorIntersection(1);if(1===arguments.length){for(var e=arguments[0],n=0;ni?r:i;else{var s=Math.abs(t.x-e.x),a=Math.abs(t.y-e.y);0!==(o=r>i?s:a)||t.equals(e)||(o=Math.max(s,a))}return Bc.isTrue(!(0===o&&!t.equals(e)),"Bad distance calculation"),o},Uc.nonRobustComputeEdgeDistance=function(t,e,n){var r=t.x-e.x,i=t.y-e.y,o=Math.sqrt(r*r+i*i);return Bc.isTrue(!(0===o&&!t.equals(e)),"Invalid distance calculation"),o},zc.DONT_INTERSECT.get=function(){return 0},zc.DO_INTERSECT.get=function(){return 1},zc.COLLINEAR.get=function(){return 2},zc.NO_INTERSECTION.get=function(){return 0},zc.POINT_INTERSECTION.get=function(){return 1},zc.COLLINEAR_INTERSECTION.get=function(){return 2},Object.defineProperties(Uc,zc);var Yc=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.isInSegmentEnvelopes=function(t){var e=new Lc(this._inputLines[0][0],this._inputLines[0][1]),n=new Lc(this._inputLines[1][0],this._inputLines[1][1]);return e.contains(t)&&n.contains(t)},e.prototype.computeIntersection=function(){if(3!==arguments.length)return t.prototype.computeIntersection.apply(this,arguments);var e=arguments[0],n=arguments[1],r=arguments[2];if(this._isProper=!1,Lc.intersects(n,r,e)&&0===qc.orientationIndex(n,r,e)&&0===qc.orientationIndex(r,n,e))return this._isProper=!0,(e.equals(n)||e.equals(r))&&(this._isProper=!1),this._result=t.POINT_INTERSECTION,null;this._result=t.NO_INTERSECTION},e.prototype.normalizeToMinimum=function(t,e,n,r,i){i.x=this.smallestInAbsValue(t.x,e.x,n.x,r.x),i.y=this.smallestInAbsValue(t.y,e.y,n.y,r.y),t.x-=i.x,t.y-=i.y,e.x-=i.x,e.y-=i.y,n.x-=i.x,n.y-=i.y,r.x-=i.x,r.y-=i.y},e.prototype.safeHCoordinateIntersection=function(t,n,r,i){var o=null;try{o=Tc.intersection(t,n,r,i)}catch(a){if(!(a instanceof Pc))throw a;o=e.nearestEndpoint(t,n,r,i)}return o},e.prototype.intersection=function(t,n,r,i){var o=this.intersectionWithNormalization(t,n,r,i);return this.isInSegmentEnvelopes(o)||(o=new cc(e.nearestEndpoint(t,n,r,i))),null!==this._precisionModel&&this._precisionModel.makePrecise(o),o},e.prototype.smallestInAbsValue=function(t,e,n,r){var i=t,o=Math.abs(i);return Math.abs(e)1e-4&&Rc.out.println("Distance = "+i.distance(o))},e.prototype.intersectionWithNormalization=function(t,e,n,r){var i=new cc(t),o=new cc(e),s=new cc(n),a=new cc(r),u=new cc;this.normalizeToEnvCentre(i,o,s,a,u);var c=this.safeHCoordinateIntersection(i,o,s,a);return c.x+=u.x,c.y+=u.y,c},e.prototype.computeCollinearIntersection=function(e,n,r,i){var o=Lc.intersects(e,n,r),s=Lc.intersects(e,n,i),a=Lc.intersects(r,i,e),u=Lc.intersects(r,i,n);return o&&s?(this._intPt[0]=r,this._intPt[1]=i,t.COLLINEAR_INTERSECTION):a&&u?(this._intPt[0]=e,this._intPt[1]=n,t.COLLINEAR_INTERSECTION):o&&a?(this._intPt[0]=r,this._intPt[1]=e,!r.equals(e)||s||u?t.COLLINEAR_INTERSECTION:t.POINT_INTERSECTION):o&&u?(this._intPt[0]=r,this._intPt[1]=n,!r.equals(n)||s||a?t.COLLINEAR_INTERSECTION:t.POINT_INTERSECTION):s&&a?(this._intPt[0]=i,this._intPt[1]=e,!i.equals(e)||o||u?t.COLLINEAR_INTERSECTION:t.POINT_INTERSECTION):s&&u?(this._intPt[0]=i,this._intPt[1]=n,!i.equals(n)||o||a?t.COLLINEAR_INTERSECTION:t.POINT_INTERSECTION):t.NO_INTERSECTION},e.prototype.normalizeToEnvCentre=function(t,e,n,r,i){var o=t.xe.x?t.x:e.x,u=t.y>e.y?t.y:e.y,c=n.xr.x?n.x:r.x,f=n.y>r.y?n.y:r.y,p=((o>c?o:c)+(al?s:l)+(u0&&s>0||o<0&&s<0)return t.NO_INTERSECTION;var a=qc.orientationIndex(r,i,e),u=qc.orientationIndex(r,i,n);return a>0&&u>0||a<0&&u<0?t.NO_INTERSECTION:0===o&&0===s&&0===a&&0===u?this.computeCollinearIntersection(e,n,r,i):(0===o||0===s||0===a||0===u?(this._isProper=!1,e.equals2D(r)||e.equals2D(i)?this._intPt[0]=e:n.equals2D(r)||n.equals2D(i)?this._intPt[0]=n:0===o?this._intPt[0]=new cc(r):0===s?this._intPt[0]=new cc(i):0===a?this._intPt[0]=new cc(e):0===u&&(this._intPt[0]=new cc(n))):(this._isProper=!0,this._intPt[0]=this.intersection(e,n,r,i)),t.POINT_INTERSECTION)},e.prototype.interfaces_=function(){return[]},e.prototype.getClass=function(){return e},e.nearestEndpoint=function(t,e,n,r){var i=t,o=qc.distancePointLine(t,n,r),s=qc.distancePointLine(e,n,r);return s0?n>0?-i:i:n>0?i:-i;if(0===e||0===n)return r>0?t>0?i:-i:t>0?-i:i;if(e>0?r>0?e<=r||(i=-i,o=t,t=n,n=o,o=e,e=r,r=o):e<=-r?(i=-i,n=-n,r=-r):(o=t,t=-n,n=o,o=e,e=-r,r=o):r>0?-e<=r?(i=-i,t=-t,e=-e):(o=-t,t=n,n=o,o=-e,e=r,r=o):e>=r?(t=-t,e=-e,n=-n,r=-r):(i=-i,o=-t,t=-n,n=o,o=-e,e=-r,r=o),t>0){if(!(n>0))return i;if(!(t<=n))return i}else{if(n>0)return-i;if(!(t>=n))return-i;i=-i,t=-t,n=-n}for(;;){if((r-=(s=Math.floor(n/t))*e)<0)return-i;if(r>e)return i;if(t>(n-=s*t)+n){if(er+r)return-i;n=t-n,r=e-r,i=-i}if(0===r)return 0===n?0:-i;if(0===n)return i;if((e-=(s=Math.floor(t/n))*r)<0)return i;if(e>r)return-i;if(n>(t-=s*n)+t){if(re+e)return i;t=n-t,e=r-e,i=-i}if(0===e)return 0===t?0:i;if(0===t)return-i}};var Vc=function(){this._p=null,this._crossingCount=0,this._isPointOnSegment=!1;var t=arguments[0];this._p=t};Vc.prototype.countSegment=function(t,e){if(t.xr&&(n=e.x,r=t.x),this._p.x>=n&&this._p.x<=r&&(this._isPointOnSegment=!0),null}if(t.y>this._p.y&&e.y<=this._p.y||e.y>this._p.y&&t.y<=this._p.y){var i=t.x-this._p.x,o=t.y-this._p.y,s=e.x-this._p.x,a=e.y-this._p.y,u=Xc.signOfDet2x2(i,o,s,a);if(0===u)return this._isPointOnSegment=!0,null;a0&&this._crossingCount++}},Vc.prototype.isPointInPolygon=function(){return this.getLocation()!==pc.EXTERIOR},Vc.prototype.getLocation=function(){return this._isPointOnSegment?pc.BOUNDARY:this._crossingCount%2==1?pc.INTERIOR:pc.EXTERIOR},Vc.prototype.isOnSegment=function(){return this._isPointOnSegment},Vc.prototype.interfaces_=function(){return[]},Vc.prototype.getClass=function(){return Vc},Vc.locatePointInRing=function(){if(arguments[0]instanceof cc&&gc(arguments[1],Sc)){for(var t=arguments[0],e=arguments[1],n=new Vc(t),r=new cc,i=new cc,o=1;o1||a<0||a>1)&&(i=!0)}}else i=!0;return i?yc.min(qc.distancePointLine(t,n,r),qc.distancePointLine(e,n,r),qc.distancePointLine(n,t,e),qc.distancePointLine(r,t,e)):0},qc.isPointInRing=function(t,e){return qc.locatePointInRing(t,e)!==pc.EXTERIOR},qc.computeLength=function(t){var e=t.size();if(e<=1)return 0;var n=0,r=new cc;t.getCoordinate(0,r);for(var i=r.x,o=r.y,s=1;sn.y&&(n=o,r=i)}var s=r;do{(s-=1)<0&&(s=e)}while(t[s].equals2D(n)&&s!==r);var a=r;do{a=(a+1)%e}while(t[a].equals2D(n)&&a!==r);var u=t[s],c=t[a];if(u.equals2D(n)||c.equals2D(n)||u.equals2D(c))return!1;var l=qc.computeOrientation(u,n,c),h=!1;return h=0===l?u.x>c.x:l>0,h},qc.locatePointInRing=function(t,e){return Vc.locatePointInRing(t,e)},qc.distancePointLinePerpendicular=function(t,e,n){var r=(n.x-e.x)*(n.x-e.x)+(n.y-e.y)*(n.y-e.y),i=((e.y-t.y)*(n.x-e.x)-(e.x-t.x)*(n.y-e.y))/r;return Math.abs(i)*Math.sqrt(r)},qc.computeOrientation=function(t,e,n){return qc.orientationIndex(t,e,n)},qc.distancePointLine=function(){if(2===arguments.length){var t=arguments[0],e=arguments[1];if(0===e.length)throw new nc("Line array must contain at least one vertex");for(var n=t.distance(e[0]),r=0;r=1)return o.distance(a);var l=((s.y-o.y)*(a.x-s.x)-(s.x-o.x)*(a.y-s.y))/u;return Math.abs(l)*Math.sqrt(u)}},qc.isOnLine=function(t,e){for(var n=new Yc,r=1;r0},nl.prototype.interfaces_=function(){return[$c]},nl.prototype.getClass=function(){return nl};var rl=function(){};rl.prototype.isInBoundary=function(t){return t>1},rl.prototype.interfaces_=function(){return[$c]},rl.prototype.getClass=function(){return rl};var il=function(){};il.prototype.isInBoundary=function(t){return 1===t},il.prototype.interfaces_=function(){return[$c]},il.prototype.getClass=function(){return il};var ol=function(){};function sl(t){this.message=t||""}ol.prototype.add=function(){},ol.prototype.addAll=function(){},ol.prototype.isEmpty=function(){},ol.prototype.iterator=function(){},ol.prototype.size=function(){},ol.prototype.toArray=function(){},ol.prototype.remove=function(){},sl.prototype=new Error,sl.prototype.name="IndexOutOfBoundsException";var al=function(){};al.prototype.hasNext=function(){},al.prototype.next=function(){},al.prototype.remove=function(){};var ul=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.get=function(){},e.prototype.set=function(){},e.prototype.isEmpty=function(){},e}(ol);function cl(t){this.message=t||""}cl.prototype=new Error,cl.prototype.name="NoSuchElementException";var ll=function(t){function e(){t.call(this),this.array_=[],arguments[0]instanceof ol&&this.addAll(arguments[0])}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.ensureCapacity=function(){},e.prototype.interfaces_=function(){return[t,ol]},e.prototype.add=function(t){return 1===arguments.length?this.array_.push(t):this.array_.splice(arguments[0],arguments[1]),!0},e.prototype.clear=function(){this.array_=[]},e.prototype.addAll=function(t){for(var e=t.iterator();e.hasNext();)this.add(e.next());return!0},e.prototype.set=function(t,e){var n=this.array_[t];return this.array_[t]=e,n},e.prototype.iterator=function(){return new hl(this)},e.prototype.get=function(t){if(t<0||t>=this.size())throw new sl;return this.array_[t]},e.prototype.isEmpty=function(){return 0===this.array_.length},e.prototype.size=function(){return this.array_.length},e.prototype.toArray=function(){for(var t=[],e=0,n=this.array_.length;e=1){var a=this.get(this.size()-1);if(a.equals2D(o))return null}t.prototype.add.call(this,o)}else if(arguments[0]instanceof Object&&"boolean"==typeof arguments[1]){var u=arguments[0],c=arguments[1];return this.add(u,c),!0}}else if(3===arguments.length){if("boolean"==typeof arguments[2]&&arguments[0]instanceof Array&&"boolean"==typeof arguments[1]){var l=arguments[0],h=arguments[1],f=arguments[2];if(f)for(var p=0;p=0;d--)e.add(l[d],h);return!0}if("boolean"==typeof arguments[2]&&Number.isInteger(arguments[0])&&arguments[1]instanceof cc){var g=arguments[0],y=arguments[1],v=arguments[2];if(!v){var _=this.size();if(_>0){if(g>0){var m=this.get(g-1);if(m.equals2D(y))return null}if(g<_){var b=this.get(g);if(b.equals2D(y))return null}}}t.prototype.add.call(this,g,y)}}else if(4===arguments.length){var E=arguments[0],w=arguments[1],x=arguments[2],O=arguments[3],S=1;x>O&&(S=-1);for(var C=x;C!==O;C+=S)e.add(E[C],w);return!0}},e.prototype.closeRing=function(){this.size()>0&&this.add(new cc(this.get(0)),!1)},e.prototype.interfaces_=function(){return[]},e.prototype.getClass=function(){return e},Object.defineProperties(e,n),e}(ll),pl=function(){},dl={ForwardComparator:{configurable:!0},BidirectionalComparator:{configurable:!0},coordArrayType:{configurable:!0}};dl.ForwardComparator.get=function(){return gl},dl.BidirectionalComparator.get=function(){return yl},dl.coordArrayType.get=function(){return new Array(0).fill(null)},pl.prototype.interfaces_=function(){return[]},pl.prototype.getClass=function(){return pl},pl.isRing=function(t){return!(t.length<4)&&!!t[0].equals2D(t[t.length-1])},pl.ptNotInList=function(t,e){for(var n=0;n=t?e:[]},pl.indexOf=function(t,e){for(var n=0;n0)&&(e=t[n]);return e},pl.extract=function(t,e,n){e=yc.clamp(e,0,t.length);var r=(n=yc.clamp(n,-1,t.length))-e+1;n<0&&(r=0),e>=t.length&&(r=0),nr.length)return 1;if(0===n.length)return 0;var i=pl.compare(n,r);return pl.isEqualReversed(n,r)?0:i},yl.prototype.OLDcompare=function(t,e){var n=t,r=e;if(n.lengthr.length)return 1;if(0===n.length)return 0;for(var i=pl.increasingDirection(n),o=pl.increasingDirection(r),s=i>0?0:n.length-1,a=o>0?0:n.length-1,u=0;u0))return e.value;e=e.right}}return null},Pl.prototype.put=function(t,e){if(null===this.root_)return this.root_={key:t,value:e,left:null,right:null,parent:null,color:0,getValue:function(){return this.value},getKey:function(){return this.key}},this.size_=1,null;var n,r,i=this.root_;do{if(n=i,(r=t.compareTo(i.key))<0)i=i.left;else{if(!(r>0)){var o=i.value;return i.value=e,o}i=i.right}}while(null!==i);var s={key:t,left:null,right:null,value:e,parent:n,color:0,getValue:function(){return this.value},getKey:function(){return this.key}};return r<0?n.left=s:n.right=s,this.fixAfterInsertion(s),this.size_++,null},Pl.prototype.fixAfterInsertion=function(t){var e=this;for(t.color=1;null!=t&&t!==this.root_&&1===t.parent.color;)if(Ol(t)===Cl(Ol(Ol(t)))){var n=Il(Ol(Ol(t)));1===xl(n)?(Sl(Ol(t),0),Sl(n,0),Sl(Ol(Ol(t)),1),t=Ol(Ol(t))):(t===Il(Ol(t))&&(t=Ol(t),e.rotateLeft(t)),Sl(Ol(t),0),Sl(Ol(Ol(t)),1),e.rotateRight(Ol(Ol(t))))}else{var r=Cl(Ol(Ol(t)));1===xl(r)?(Sl(Ol(t),0),Sl(r,0),Sl(Ol(Ol(t)),1),t=Ol(Ol(t))):(t===Cl(Ol(t))&&(t=Ol(t),e.rotateRight(t)),Sl(Ol(t),0),Sl(Ol(Ol(t)),1),e.rotateLeft(Ol(Ol(t))))}this.root_.color=0},Pl.prototype.values=function(){var t=new ll,e=this.getFirstEntry();if(null!==e)for(t.add(e.value);null!==(e=Pl.successor(e));)t.add(e.value);return t},Pl.prototype.entrySet=function(){var t=new El,e=this.getFirstEntry();if(null!==e)for(t.add(e);null!==(e=Pl.successor(e));)t.add(e);return t},Pl.prototype.rotateLeft=function(t){if(null!=t){var e=t.right;t.right=e.left,null!=e.left&&(e.left.parent=t),e.parent=t.parent,null===t.parent?this.root_=e:t.parent.left===t?t.parent.left=e:t.parent.right=e,e.left=t,t.parent=e}},Pl.prototype.rotateRight=function(t){if(null!=t){var e=t.left;t.left=e.right,null!=e.right&&(e.right.parent=t),e.parent=t.parent,null===t.parent?this.root_=e:t.parent.right===t?t.parent.right=e:t.parent.left=e,e.right=t,t.parent=e}},Pl.prototype.getFirstEntry=function(){var t=this.root_;if(null!=t)for(;null!=t.left;)t=t.left;return t},Pl.successor=function(t){if(null===t)return null;if(null!==t.right){for(var e=t.right;null!==e.left;)e=e.left;return e}for(var n=t.parent,r=t;null!==n&&r===n.right;)r=n,n=n.parent;return n},Pl.prototype.size=function(){return this.size_};var Rl=function(){};function Tl(){}function Ll(){this.array_=[],arguments[0]instanceof ol&&this.addAll(arguments[0])}Rl.prototype.interfaces_=function(){return[]},Rl.prototype.getClass=function(){return Rl},Tl.prototype=new bl,Ll.prototype=new Tl,Ll.prototype.contains=function(t){for(var e=0,n=this.array_.length;e=0;){var s=i.substring(0,o);r.add(s),o=(i=i.substring(o+n)).indexOf(e)}i.length>0&&r.add(i);for(var a=new Array(r.size()).fill(null),u=0;u0)for(var o=i;o0&&r.append(" ");for(var o=0;o0&&r.append(","),r.append(Hl.toString(t.getOrdinate(i,o)))}return r.append(")"),r.toString()}},Kl.ensureValidRing=function(t,e){var n=e.size();return 0===n?e:n<=3?Kl.createClosedRing(t,e,4):e.getOrdinate(0,Sc.X)===e.getOrdinate(n-1,Sc.X)&&e.getOrdinate(0,Sc.Y)===e.getOrdinate(n-1,Sc.Y)?e:Kl.createClosedRing(t,e,n+1)},Kl.createClosedRing=function(t,e,n){var r=t.create(n,e.getDimension()),i=e.size();Kl.copy(e,0,r,0,i);for(var o=i;o0&&Kl.reverse(t._points),null}},e.prototype.getCoordinate=function(){return this.isEmpty()?null:this._points.getCoordinate(0)},e.prototype.getBoundaryDimension=function(){return this.isClosed()?Al.FALSE:0},e.prototype.isClosed=function(){return!this.isEmpty()&&this.getCoordinateN(0).equals2D(this.getCoordinateN(this.getNumPoints()-1))},e.prototype.getEndPoint=function(){return this.isEmpty()?null:this.getPointN(this.getNumPoints()-1)},e.prototype.getDimension=function(){return 1},e.prototype.getLength=function(){return qc.computeLength(this._points)},e.prototype.getNumPoints=function(){return this._points.size()},e.prototype.reverse=function(){var t=this._points.copy();return Kl.reverse(t),this.getFactory().createLineString(t)},e.prototype.compareToSameClass=function(){var t=this;if(1===arguments.length){for(var e=arguments[0],n=e,r=0,i=0;r= 2)");this._points=t},e.prototype.isCoordinate=function(t){for(var e=0;e=1&&this.getCoordinateSequence().size()= 4)")},e.prototype.getGeometryType=function(){return"LinearRing"},e.prototype.copy=function(){return new e(this._points.copy(),this._factory)},e.prototype.interfaces_=function(){return[]},e.prototype.getClass=function(){return e},n.MINIMUM_VALID_SIZE.get=function(){return 4},n.serialVersionUID.get=function(){return-0x3b229e262367a600},Object.defineProperties(e,n),e}(Jl),ih=function(t){function e(){t.apply(this,arguments)}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var n={serialVersionUID:{configurable:!0}};return e.prototype.getSortIndex=function(){return Zc.SORTINDEX_MULTIPOLYGON},e.prototype.equalsExact=function(){if(2===arguments.length){var e=arguments[0],n=arguments[1];return!!this.isEquivalentClass(e)&&t.prototype.equalsExact.call(this,e,n)}return t.prototype.equalsExact.apply(this,arguments)},e.prototype.getBoundaryDimension=function(){return 1},e.prototype.getDimension=function(){return 2},e.prototype.reverse=function(){for(var t=this._geometries.length,e=new Array(t).fill(null),n=0;n0?e.createPoint(n[0]):e.createPoint():t},uh.prototype.interfaces_=function(){return[oh.GeometryEditorOperation]},uh.prototype.getClass=function(){return uh};var ch=function(){};ch.prototype.edit=function(t,e){return t instanceof rh?e.createLinearRing(this.edit(t.getCoordinateSequence(),t)):t instanceof Jl?e.createLineString(this.edit(t.getCoordinateSequence(),t)):t instanceof $l?e.createPoint(this.edit(t.getCoordinateSequence(),t)):t},ch.prototype.interfaces_=function(){return[oh.GeometryEditorOperation]},ch.prototype.getClass=function(){return ch};var lh=function(){var t=this;if(this._dimension=3,this._coordinates=null,1===arguments.length){if(arguments[0]instanceof Array)this._coordinates=arguments[0],this._dimension=3;else if(Number.isInteger(arguments[0])){var e=arguments[0];this._coordinates=new Array(e).fill(null);for(var n=0;n0){var t=new _c(17*this._coordinates.length);t.append("("),t.append(this._coordinates[0]);for(var e=1;e3&&(r=3),r<2?new lh(n):new lh(n,r)}},fh.prototype.interfaces_=function(){return[fc,uc]},fh.prototype.getClass=function(){return fh},fh.instance=function(){return fh.instanceObject},ph.serialVersionUID.get=function(){return-0x38e49fa6cf6f2e00},ph.instanceObject.get=function(){return new fh},Object.defineProperties(fh,ph);var dh=function(t){function e(){t.call(this),this.map_=new Map}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.get=function(t){return this.map_.get(t)||null},e.prototype.put=function(t,e){return this.map_.set(t,e),e},e.prototype.values=function(){for(var t=new ll,e=this.map_.values(),n=e.next();!n.done;)t.add(n.value),n=e.next();return t},e.prototype.entrySet=function(){var t=new El;return this.map_.entries().forEach((function(e){return t.add(e)})),t},e.prototype.size=function(){return this.map_.size()},e}(vl),gh=function t(){if(this._modelType=null,this._scale=null,0===arguments.length)this._modelType=t.FLOATING;else if(1===arguments.length)if(arguments[0]instanceof vh){var e=arguments[0];this._modelType=e,e===t.FIXED&&this.setScale(1)}else if("number"==typeof arguments[0]){var n=arguments[0];this._modelType=t.FIXED,this.setScale(n)}else if(arguments[0]instanceof t){var r=arguments[0];this._modelType=r._modelType,this._scale=r._scale}},yh={serialVersionUID:{configurable:!0},maximumPreciseValue:{configurable:!0}};gh.prototype.equals=function(t){if(!(t instanceof gh))return!1;var e=t;return this._modelType===e._modelType&&this._scale===e._scale},gh.prototype.compareTo=function(t){var e=t,n=this.getMaximumSignificantDigits(),r=e.getMaximumSignificantDigits();return new mc(n).compareTo(new mc(r))},gh.prototype.getScale=function(){return this._scale},gh.prototype.isFloating=function(){return this._modelType===gh.FLOATING||this._modelType===gh.FLOATING_SINGLE},gh.prototype.getType=function(){return this._modelType},gh.prototype.toString=function(){var t="UNKNOWN";return this._modelType===gh.FLOATING?t="Floating":this._modelType===gh.FLOATING_SINGLE?t="Floating-Single":this._modelType===gh.FIXED&&(t="Fixed (Scale="+this.getScale()+")"),t},gh.prototype.makePrecise=function(){if("number"==typeof arguments[0]){var t=arguments[0];return rc.isNaN(t)||this._modelType===gh.FLOATING_SINGLE?t:this._modelType===gh.FIXED?Math.round(t*this._scale)/this._scale:t}if(arguments[0]instanceof cc){var e=arguments[0];if(this._modelType===gh.FLOATING)return null;e.x=this.makePrecise(e.x),e.y=this.makePrecise(e.y)}},gh.prototype.getMaximumSignificantDigits=function(){var t=16;return this._modelType===gh.FLOATING?t=16:this._modelType===gh.FLOATING_SINGLE?t=6:this._modelType===gh.FIXED&&(t=1+Math.trunc(Math.ceil(Math.log(this.getScale())/Math.log(10)))),t},gh.prototype.setScale=function(t){this._scale=Math.abs(t)},gh.prototype.interfaces_=function(){return[uc,oc]},gh.prototype.getClass=function(){return gh},gh.mostPrecise=function(t,e){return t.compareTo(e)>=0?t:e},yh.serialVersionUID.get=function(){return 0x6bee6404e9a25c00},yh.maximumPreciseValue.get=function(){return 9007199254740992},Object.defineProperties(gh,yh);var vh=function t(e){this._name=e||null,t.nameToTypeMap.put(e,this)},_h={serialVersionUID:{configurable:!0},nameToTypeMap:{configurable:!0}};vh.prototype.readResolve=function(){return vh.nameToTypeMap.get(this._name)},vh.prototype.toString=function(){return this._name},vh.prototype.interfaces_=function(){return[uc]},vh.prototype.getClass=function(){return vh},_h.serialVersionUID.get=function(){return-552860263173159e4},_h.nameToTypeMap.get=function(){return new dh},Object.defineProperties(vh,_h),gh.Type=vh,gh.FIXED=new vh("FIXED"),gh.FLOATING=new vh("FLOATING"),gh.FLOATING_SINGLE=new vh("FLOATING SINGLE");var mh=function t(){this._precisionModel=new gh,this._SRID=0,this._coordinateSequenceFactory=t.getDefaultCoordinateSequenceFactory(),0===arguments.length||(1===arguments.length?gc(arguments[0],fc)?this._coordinateSequenceFactory=arguments[0]:arguments[0]instanceof gh&&(this._precisionModel=arguments[0]):2===arguments.length?(this._precisionModel=arguments[0],this._SRID=arguments[1]):3===arguments.length&&(this._precisionModel=arguments[0],this._SRID=arguments[1],this._coordinateSequenceFactory=arguments[2]))},bh={serialVersionUID:{configurable:!0}};mh.prototype.toGeometry=function(t){return t.isNull()?this.createPoint(null):t.getMinX()===t.getMaxX()&&t.getMinY()===t.getMaxY()?this.createPoint(new cc(t.getMinX(),t.getMinY())):t.getMinX()===t.getMaxX()||t.getMinY()===t.getMaxY()?this.createLineString([new cc(t.getMinX(),t.getMinY()),new cc(t.getMaxX(),t.getMaxY())]):this.createPolygon(this.createLinearRing([new cc(t.getMinX(),t.getMinY()),new cc(t.getMinX(),t.getMaxY()),new cc(t.getMaxX(),t.getMaxY()),new cc(t.getMaxX(),t.getMinY()),new cc(t.getMinX(),t.getMinY())]),null)},mh.prototype.createLineString=function(t){return t?t instanceof Array?new Jl(this.getCoordinateSequenceFactory().create(t),this):gc(t,Sc)?new Jl(t,this):void 0:new Jl(this.getCoordinateSequenceFactory().create([]),this)},mh.prototype.createMultiLineString=function(){if(0===arguments.length)return new Gl(null,this);if(1===arguments.length){var t=arguments[0];return new Gl(t,this)}},mh.prototype.buildGeometry=function(t){for(var e=null,n=!1,r=!1,i=t.iterator();i.hasNext();){var o=i.next(),s=o.getClass();null===e&&(e=s),s!==e&&(n=!0),o.isGeometryCollectionOrDerived()&&(r=!0)}if(null===e)return this.createGeometryCollection();if(n||r)return this.createGeometryCollection(mh.toGeometryArray(t));var a=t.iterator().next();if(t.size()>1){if(a instanceof eh)return this.createMultiPolygon(mh.toPolygonArray(t));if(a instanceof Jl)return this.createMultiLineString(mh.toLineStringArray(t));if(a instanceof $l)return this.createMultiPoint(mh.toPointArray(t));Bc.shouldNeverReachHere("Unhandled class: "+a.getClass().getName())}return a},mh.prototype.createMultiPointFromCoords=function(t){return this.createMultiPoint(null!==t?this.getCoordinateSequenceFactory().create(t):null)},mh.prototype.createPoint=function(){if(0===arguments.length)return this.createPoint(this.getCoordinateSequenceFactory().create([]));if(1===arguments.length){if(arguments[0]instanceof cc){var t=arguments[0];return this.createPoint(null!==t?this.getCoordinateSequenceFactory().create([t]):null)}if(gc(arguments[0],Sc)){var e=arguments[0];return new $l(e,this)}}},mh.prototype.getCoordinateSequenceFactory=function(){return this._coordinateSequenceFactory},mh.prototype.createPolygon=function(){if(0===arguments.length)return new eh(null,null,this);if(1===arguments.length){if(gc(arguments[0],Sc)){var t=arguments[0];return this.createPolygon(this.createLinearRing(t))}if(arguments[0]instanceof Array){var e=arguments[0];return this.createPolygon(this.createLinearRing(e))}if(arguments[0]instanceof rh){var n=arguments[0];return this.createPolygon(n,null)}}else if(2===arguments.length){var r=arguments[0],i=arguments[1];return new eh(r,i,this)}},mh.prototype.getSRID=function(){return this._SRID},mh.prototype.createGeometryCollection=function(){if(0===arguments.length)return new kl(null,this);if(1===arguments.length){var t=arguments[0];return new kl(t,this)}},mh.prototype.createGeometry=function(t){return new oh(this).edit(t,{edit:function(){if(2===arguments.length){var t=arguments[0];return this._coordinateSequenceFactory.create(t)}}})},mh.prototype.getPrecisionModel=function(){return this._precisionModel},mh.prototype.createLinearRing=function(){if(0===arguments.length)return this.createLinearRing(this.getCoordinateSequenceFactory().create([]));if(1===arguments.length){if(arguments[0]instanceof Array){var t=arguments[0];return this.createLinearRing(null!==t?this.getCoordinateSequenceFactory().create(t):null)}if(gc(arguments[0],Sc)){var e=arguments[0];return new rh(e,this)}}},mh.prototype.createMultiPolygon=function(){if(0===arguments.length)return new ih(null,this);if(1===arguments.length){var t=arguments[0];return new ih(t,this)}},mh.prototype.createMultiPoint=function(){var t=this;if(0===arguments.length)return new nh(null,this);if(1===arguments.length){if(arguments[0]instanceof Array){var e=arguments[0];return new nh(e,this)}if(arguments[0]instanceof Array){var n=arguments[0];return this.createMultiPoint(null!==n?this.getCoordinateSequenceFactory().create(n):null)}if(gc(arguments[0],Sc)){var r=arguments[0];if(null===r)return this.createMultiPoint(new Array(0).fill(null));for(var i=new Array(r.size()).fill(null),o=0;o=this.size())throw new Error;return this.array_[t]},Th.prototype.push=function(t){return this.array_.push(t),t},Th.prototype.pop=function(t){if(0===this.array_.length)throw new Rh;return this.array_.pop()},Th.prototype.peek=function(){if(0===this.array_.length)throw new Rh;return this.array_[this.array_.length-1]},Th.prototype.empty=function(){return 0===this.array_.length},Th.prototype.isEmpty=function(){return this.empty()},Th.prototype.search=function(t){return this.array_.indexOf(t)},Th.prototype.size=function(){return this.array_.length},Th.prototype.toArray=function(){for(var t=[],e=0,n=this.array_.length;e0&&this._minIndexthis._minCoord.y&&n.y>this._minCoord.y&&r===qc.CLOCKWISE)&&(i=!0),i&&(this._minIndex=this._minIndex-1)},Lh.prototype.getRightmostSideOfSegment=function(t,e){var n=t.getEdge().getCoordinates();if(e<0||e+1>=n.length)return-1;if(n[e].y===n[e+1].y)return-1;var r=Ih.LEFT;return n[e].ye._minCoord.x)&&(e._minDe=t,e._minIndex=r,e._minCoord=n[r])},Lh.prototype.findRightmostEdgeAtNode=function(){var t=this._minDe.getNode().getEdges();this._minDe=t.getRightmostEdge(),this._minDe.isForward()||(this._minDe=this._minDe.getSym(),this._minIndex=this._minDe.getEdge().getCoordinates().length-1)},Lh.prototype.findEdge=function(t){for(var e=t.iterator();e.hasNext();){var n=e.next();n.isForward()&&this.checkForRightmostCoordinate(n)}Bc.isTrue(0!==this._minIndex||this._minCoord.equals(this._minDe.getCoordinate()),"inconsistency in rightmost processing"),0===this._minIndex?this.findRightmostEdgeAtNode():this.findRightmostEdgeAtVertex(),this._orientedDe=this._minDe,this.getRightmostSide(this._minDe,this._minIndex)===Ih.LEFT&&(this._orientedDe=this._minDe.getSym())},Lh.prototype.interfaces_=function(){return[]},Lh.prototype.getClass=function(){return Lh};var Mh=function(t){function e(n,r){t.call(this,e.msgWithCoord(n,r)),this.pt=r?new cc(r):null,this.name="TopologyException"}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getCoordinate=function(){return this.pt},e.prototype.interfaces_=function(){return[]},e.prototype.getClass=function(){return e},e.msgWithCoord=function(t,e){return e?t:t+" [ "+e+" ]"},e}(kc),Nh=function(){this.array_=[]};Nh.prototype.addLast=function(t){this.array_.push(t)},Nh.prototype.removeFirst=function(){return this.array_.shift()},Nh.prototype.isEmpty=function(){return 0===this.array_.length};var Ah=function(){this._finder=null,this._dirEdgeList=new ll,this._nodes=new ll,this._rightMostCoord=null,this._env=null,this._finder=new Lh};Ah.prototype.clearVisitedEdges=function(){for(var t=this._dirEdgeList.iterator();t.hasNext();)t.next().setVisited(!1)},Ah.prototype.getRightmostCoordinate=function(){return this._rightMostCoord},Ah.prototype.computeNodeDepth=function(t){for(var e=null,n=t.getEdges().iterator();n.hasNext();){var r=n.next();if(r.isVisited()||r.getSym().isVisited()){e=r;break}}if(null===e)throw new Mh("unable to find edge to compute depths at "+t.getCoordinate());t.getEdges().computeDepths(e);for(var i=t.getEdges().iterator();i.hasNext();){var o=i.next();o.setVisited(!0),this.copySymDepths(o)}},Ah.prototype.computeDepth=function(t){this.clearVisitedEdges();var e=this._finder.getEdge();e.setEdgeDepths(Ih.RIGHT,t),this.copySymDepths(e),this.computeDepths(e)},Ah.prototype.create=function(t){this.addReachable(t),this._finder.findEdge(this._dirEdgeList),this._rightMostCoord=this._finder.getCoordinate()},Ah.prototype.findResultEdges=function(){for(var t=this._dirEdgeList.iterator();t.hasNext();){var e=t.next();e.getDepth(Ih.RIGHT)>=1&&e.getDepth(Ih.LEFT)<=0&&!e.isInteriorAreaEdge()&&e.setInResult(!0)}},Ah.prototype.computeDepths=function(t){var e=new El,n=new Nh,r=t.getNode();for(n.addLast(r),e.add(r),t.setVisited(!0);!n.isEmpty();){var i=n.removeFirst();e.add(i),this.computeNodeDepth(i);for(var o=i.getEdges().iterator();o.hasNext();){var s=o.next().getSym();if(!s.isVisited()){var a=s.getNode();e.contains(a)||(n.addLast(a),e.add(a))}}}},Ah.prototype.compareTo=function(t){var e=t;return this._rightMostCoord.xe._rightMostCoord.x?1:0},Ah.prototype.getEnvelope=function(){if(null===this._env){for(var t=new Lc,e=this._dirEdgeList.iterator();e.hasNext();)for(var n=e.next().getEdge().getCoordinates(),r=0;rthis.location.length){var e=new Array(3).fill(null);e[Ih.ON]=this.location[Ih.ON],e[Ih.LEFT]=pc.NONE,e[Ih.RIGHT]=pc.NONE,this.location=e}for(var n=0;n1&&t.append(pc.toLocationSymbol(this.location[Ih.LEFT])),t.append(pc.toLocationSymbol(this.location[Ih.ON])),this.location.length>1&&t.append(pc.toLocationSymbol(this.location[Ih.RIGHT])),t.toString()},Fh.prototype.setLocations=function(t,e,n){this.location[Ih.ON]=t,this.location[Ih.LEFT]=e,this.location[Ih.RIGHT]=n},Fh.prototype.get=function(t){return t1},Fh.prototype.isAnyNull=function(){for(var t=0;tt._maxNodeDegree&&(t._maxNodeDegree=n),e=t.getNext(e)}while(e!==this._startDe);this._maxNodeDegree*=2},Dh.prototype.addPoints=function(t,e,n){var r=t.getCoordinates();if(e){var i=1;n&&(i=0);for(var o=i;o=0;a--)this._pts.add(r[a])}},Dh.prototype.isHole=function(){return this._isHole},Dh.prototype.setInResult=function(){var t=this._startDe;do{t.getEdge().setInResult(!0),t=t.getNext()}while(t!==this._startDe)},Dh.prototype.containsPoint=function(t){var e=this.getLinearRing();if(!e.getEnvelopeInternal().contains(t))return!1;if(!qc.isPointInRing(t,e.getCoordinates()))return!1;for(var n=this._holes.iterator();n.hasNext();)if(n.next().containsPoint(t))return!1;return!0},Dh.prototype.addHole=function(t){this._holes.add(t)},Dh.prototype.isShell=function(){return null===this._shell},Dh.prototype.getLabel=function(){return this._label},Dh.prototype.getEdges=function(){return this._edges},Dh.prototype.getMaxNodeDegree=function(){return this._maxNodeDegree<0&&this.computeMaxNodeDegree(),this._maxNodeDegree},Dh.prototype.getShell=function(){return this._shell},Dh.prototype.mergeLabel=function(){if(1===arguments.length){var t=arguments[0];this.mergeLabel(t,0),this.mergeLabel(t,1)}else if(2===arguments.length){var e=arguments[0],n=arguments[1],r=e.getLocation(n,Ih.RIGHT);if(r===pc.NONE)return null;if(this._label.getLocation(n)===pc.NONE)return this._label.setLocation(n,r),null}},Dh.prototype.setShell=function(t){this._shell=t,null!==t&&t.addHole(this)},Dh.prototype.toPolygon=function(t){for(var e=new Array(this._holes.size()).fill(null),n=0;n=2,"found partial label"),this.computeIM(t)},Bh.prototype.isInResult=function(){return this._isInResult},Bh.prototype.isVisited=function(){return this._isVisited},Bh.prototype.interfaces_=function(){return[]},Bh.prototype.getClass=function(){return Bh};var Uh=function(t){function e(){t.call(this),this._coord=null,this._edges=null;var e=arguments[0],n=arguments[1];this._coord=e,this._edges=n,this._label=new jh(0,pc.NONE)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.isIncidentEdgeInResult=function(){for(var t=this.getEdges().getEdges().iterator();t.hasNext();)if(t.next().getEdge().isInResult())return!0;return!1},e.prototype.isIsolated=function(){return 1===this._label.getGeometryCount()},e.prototype.getCoordinate=function(){return this._coord},e.prototype.print=function(t){t.println("node "+this._coord+" lbl: "+this._label)},e.prototype.computeIM=function(t){},e.prototype.computeMergedLocation=function(t,e){var n=pc.NONE;if(n=this._label.getLocation(e),!t.isNull(e)){var r=t.getLocation(e);n!==pc.BOUNDARY&&(n=r)}return n},e.prototype.setLabel=function(){if(2!==arguments.length)return t.prototype.setLabel.apply(this,arguments);var e=arguments[0],n=arguments[1];null===this._label?this._label=new jh(e,n):this._label.setLocation(e,n)},e.prototype.getEdges=function(){return this._edges},e.prototype.mergeLabel=function(){var t=this;if(arguments[0]instanceof e){var n=arguments[0];this.mergeLabel(n._label)}else if(arguments[0]instanceof jh)for(var r=arguments[0],i=0;i<2;i++){var o=t.computeMergedLocation(r,i),s=t._label.getLocation(i);s===pc.NONE&&t._label.setLocation(i,o)}},e.prototype.add=function(t){this._edges.insert(t),t.setNode(this)},e.prototype.setLabelBoundary=function(t){if(null===this._label)return null;var e=pc.NONE;null!==this._label&&(e=this._label.getLocation(t));var n=null;switch(e){case pc.BOUNDARY:n=pc.INTERIOR;break;case pc.INTERIOR:default:n=pc.BOUNDARY}this._label.setLocation(t,n)},e.prototype.interfaces_=function(){return[]},e.prototype.getClass=function(){return e},e}(Bh),zh=function(){this.nodeMap=new Pl,this.nodeFact=null;var t=arguments[0];this.nodeFact=t};zh.prototype.find=function(t){return this.nodeMap.get(t)},zh.prototype.addNode=function(){if(arguments[0]instanceof cc){var t=arguments[0],e=this.nodeMap.get(t);return null===e&&(e=this.nodeFact.createNode(t),this.nodeMap.put(t,e)),e}if(arguments[0]instanceof Uh){var n=arguments[0],r=this.nodeMap.get(n.getCoordinate());return null===r?(this.nodeMap.put(n.getCoordinate(),n),n):(r.mergeLabel(n),r)}},zh.prototype.print=function(t){for(var e=this.iterator();e.hasNext();)e.next().print(t)},zh.prototype.iterator=function(){return this.nodeMap.values().iterator()},zh.prototype.values=function(){return this.nodeMap.values()},zh.prototype.getBoundaryNodes=function(t){for(var e=new ll,n=this.iterator();n.hasNext();){var r=n.next();r.getLabel().getLocation(t)===pc.BOUNDARY&&e.add(r)}return e},zh.prototype.add=function(t){var e=t.getCoordinate();this.addNode(e).add(t)},zh.prototype.interfaces_=function(){return[]},zh.prototype.getClass=function(){return zh};var Yh=function(){},Xh={NE:{configurable:!0},NW:{configurable:!0},SW:{configurable:!0},SE:{configurable:!0}};Yh.prototype.interfaces_=function(){return[]},Yh.prototype.getClass=function(){return Yh},Yh.isNorthern=function(t){return t===Yh.NE||t===Yh.NW},Yh.isOpposite=function(t,e){return t!==e&&2===(t-e+4)%4},Yh.commonHalfPlane=function(t,e){if(t===e)return t;if(2===(t-e+4)%4)return-1;var n=te?t:e)?3:n},Yh.isInHalfPlane=function(t,e){return e===Yh.SE?t===Yh.SE||t===Yh.SW:t===e||t===e+1},Yh.quadrant=function(){if("number"==typeof arguments[0]&&"number"==typeof arguments[1]){var t=arguments[0],e=arguments[1];if(0===t&&0===e)throw new nc("Cannot compute the quadrant for point ( "+t+", "+e+" )");return t>=0?e>=0?Yh.NE:Yh.SE:e>=0?Yh.NW:Yh.SW}if(arguments[0]instanceof cc&&arguments[1]instanceof cc){var n=arguments[0],r=arguments[1];if(r.x===n.x&&r.y===n.y)throw new nc("Cannot compute the quadrant for two identical points "+n);return r.x>=n.x?r.y>=n.y?Yh.NE:Yh.SE:r.y>=n.y?Yh.NW:Yh.SW}},Xh.NE.get=function(){return 0},Xh.NW.get=function(){return 1},Xh.SW.get=function(){return 2},Xh.SE.get=function(){return 3},Object.defineProperties(Yh,Xh);var Vh=function(){if(this._edge=null,this._label=null,this._node=null,this._p0=null,this._p1=null,this._dx=null,this._dy=null,this._quadrant=null,1===arguments.length){var t=arguments[0];this._edge=t}else if(3===arguments.length){var e=arguments[0],n=arguments[1],r=arguments[2],i=null;this._edge=e,this.init(n,r),this._label=i}else if(4===arguments.length){var o=arguments[0],s=arguments[1],a=arguments[2],u=arguments[3];this._edge=o,this.init(s,a),this._label=u}};Vh.prototype.compareDirection=function(t){return this._dx===t._dx&&this._dy===t._dy?0:this._quadrant>t._quadrant?1:this._quadrant2){o.linkDirectedEdgesForMinimalEdgeRings();var s=o.buildMinimalRings(),a=this.findShell(s);null!==a?(this.placePolygonHoles(a,s),e.add(a)):n.addAll(s)}else r.add(o)}return r},Zh.prototype.containsPoint=function(t){for(var e=this._shellList.iterator();e.hasNext();)if(e.next().containsPoint(t))return!0;return!1},Zh.prototype.buildMaximalEdgeRings=function(t){for(var e=new ll,n=t.iterator();n.hasNext();){var r=n.next();if(r.isInResult()&&r.getLabel().isArea()&&null===r.getEdgeRing()){var i=new Gh(r,this._geometryFactory);e.add(i),i.setInResult()}}return e},Zh.prototype.placePolygonHoles=function(t,e){for(var n=e.iterator();n.hasNext();){var r=n.next();r.isHole()&&r.setShell(t)}},Zh.prototype.getPolygons=function(){return this.computePolygons(this._shellList)},Zh.prototype.findEdgeRingContaining=function(t,e){for(var n=t.getLinearRing(),r=n.getEnvelopeInternal(),i=n.getCoordinateN(0),o=null,s=null,a=e.iterator();a.hasNext();){var u=a.next(),c=u.getLinearRing(),l=c.getEnvelopeInternal();null!==o&&(s=o.getLinearRing().getEnvelopeInternal());var h=!1;l.contains(r)&&qc.isPointInRing(i,c.getCoordinates())&&(h=!0),h&&(null===o||s.contains(l))&&(o=u)}return o},Zh.prototype.findShell=function(t){for(var e=0,n=null,r=t.iterator();r.hasNext();){var i=r.next();i.isHole()||(n=i,e++)}return Bc.isTrue(e<=1,"found two shells in MinimalEdgeRing list"),n},Zh.prototype.add=function(){if(1===arguments.length){var t=arguments[0];this.add(t.getEdgeEnds(),t.getNodes())}else if(2===arguments.length){var e=arguments[0],n=arguments[1];Hh.linkResultDirectedEdges(n);var r=this.buildMaximalEdgeRings(e),i=new ll,o=this.buildMinimalEdgeRings(r,this._shellList,i);this.sortShellsAndHoles(o,this._shellList,i),this.placeFreeHoles(this._shellList,i)}},Zh.prototype.interfaces_=function(){return[]},Zh.prototype.getClass=function(){return Zh};var Kh=function(){};Kh.prototype.getBounds=function(){},Kh.prototype.interfaces_=function(){return[]},Kh.prototype.getClass=function(){return Kh};var Jh=function(){this._bounds=null,this._item=null;var t=arguments[0],e=arguments[1];this._bounds=t,this._item=e};Jh.prototype.getItem=function(){return this._item},Jh.prototype.getBounds=function(){return this._bounds},Jh.prototype.interfaces_=function(){return[Kh,uc]},Jh.prototype.getClass=function(){return Jh};var Qh=function(){this._size=null,this._items=null,this._size=0,this._items=new ll,this._items.add(null)};Qh.prototype.poll=function(){if(this.isEmpty())return null;var t=this._items.get(1);return this._items.set(1,this._items.get(this._size)),this._size-=1,this.reorder(1),t},Qh.prototype.size=function(){return this._size},Qh.prototype.reorder=function(t){for(var e=this,n=null,r=this._items.get(t);2*t<=this._size&&((n=2*t)!==e._size&&e._items.get(n+1).compareTo(e._items.get(n))<0&&n++,e._items.get(n).compareTo(r)<0);t=n)e._items.set(t,e._items.get(n));this._items.set(t,r)},Qh.prototype.clear=function(){this._size=0,this._items.clear()},Qh.prototype.isEmpty=function(){return 0===this._size},Qh.prototype.add=function(t){this._items.add(null),this._size+=1;var e=this._size;for(this._items.set(0,t);t.compareTo(this._items.get(Math.trunc(e/2)))<0;e/=2)this._items.set(e,this._items.get(Math.trunc(e/2)));this._items.set(e,t)},Qh.prototype.interfaces_=function(){return[]},Qh.prototype.getClass=function(){return Qh};var $h=function(){};$h.prototype.visitItem=function(t){},$h.prototype.interfaces_=function(){return[]},$h.prototype.getClass=function(){return $h};var tf=function(){};tf.prototype.insert=function(t,e){},tf.prototype.remove=function(t,e){},tf.prototype.query=function(){},tf.prototype.interfaces_=function(){return[]},tf.prototype.getClass=function(){return tf};var ef=function(){if(this._childBoundables=new ll,this._bounds=null,this._level=null,0===arguments.length);else if(1===arguments.length){var t=arguments[0];this._level=t}},nf={serialVersionUID:{configurable:!0}};ef.prototype.getLevel=function(){return this._level},ef.prototype.size=function(){return this._childBoundables.size()},ef.prototype.getChildBoundables=function(){return this._childBoundables},ef.prototype.addChildBoundable=function(t){Bc.isTrue(null===this._bounds),this._childBoundables.add(t)},ef.prototype.isEmpty=function(){return this._childBoundables.isEmpty()},ef.prototype.getBounds=function(){return null===this._bounds&&(this._bounds=this.computeBounds()),this._bounds},ef.prototype.interfaces_=function(){return[Kh,uc]},ef.prototype.getClass=function(){return ef},nf.serialVersionUID.get=function(){return 0x5a1e55ec41369800},Object.defineProperties(ef,nf);var rf=function(){};rf.reverseOrder=function(){return{compare:function(t,e){return e.compareTo(t)}}},rf.min=function(t){return rf.sort(t),t.get(0)},rf.sort=function(t,e){var n=t.toArray();e?Nl.sort(n,e):Nl.sort(n);for(var r=t.iterator(),i=0,o=n.length;iof.area(this._boundable2)?(this.expand(this._boundable1,this._boundable2,t,e),null):(this.expand(this._boundable2,this._boundable1,t,e),null);if(n)return this.expand(this._boundable1,this._boundable2,t,e),null;if(r)return this.expand(this._boundable2,this._boundable1,t,e),null;throw new nc("neither boundable is composite")},of.prototype.isLeaves=function(){return!(of.isComposite(this._boundable1)||of.isComposite(this._boundable2))},of.prototype.compareTo=function(t){var e=t;return this._distancee._distance?1:0},of.prototype.expand=function(t,e,n,r){for(var i=t.getChildBoundables().iterator();i.hasNext();){var o=i.next(),s=new of(o,e,this._itemDistance);s.getDistance()1,"Node capacity must be greater than 1"),this._nodeCapacity=n}},af={IntersectsOp:{configurable:!0},serialVersionUID:{configurable:!0},DEFAULT_NODE_CAPACITY:{configurable:!0}};sf.prototype.getNodeCapacity=function(){return this._nodeCapacity},sf.prototype.lastNode=function(t){return t.get(t.size()-1)},sf.prototype.size=function(){var t=this;if(0===arguments.length)return this.isEmpty()?0:(this.build(),this.size(this._root));if(1===arguments.length){for(var e=arguments[0],n=0,r=e.getChildBoundables().iterator();r.hasNext();){var i=r.next();i instanceof ef?n+=t.size(i):i instanceof Jh&&(n+=1)}return n}},sf.prototype.removeItem=function(t,e){for(var n=null,r=t.getChildBoundables().iterator();r.hasNext();){var i=r.next();i instanceof Jh&&i.getItem()===e&&(n=i)}return null!==n&&(t.getChildBoundables().remove(n),!0)},sf.prototype.itemsTree=function(){var t=this;if(0===arguments.length){this.build();var e=this.itemsTree(this._root);return null===e?new ll:e}if(1===arguments.length){for(var n=arguments[0],r=new ll,i=n.getChildBoundables().iterator();i.hasNext();){var o=i.next();if(o instanceof ef){var s=t.itemsTree(o);null!==s&&r.add(s)}else o instanceof Jh?r.add(o.getItem()):Bc.shouldNeverReachHere()}return r.size()<=0?null:r}},sf.prototype.insert=function(t,e){Bc.isTrue(!this._built,"Cannot insert items into an STR packed R-tree after it has been built."),this._itemBoundables.add(new Jh(t,e))},sf.prototype.boundablesAtLevel=function(){var t=this;if(1===arguments.length){var e=arguments[0],n=new ll;return this.boundablesAtLevel(e,this._root,n),n}if(3===arguments.length){var r=arguments[0],i=arguments[1],o=arguments[2];if(Bc.isTrue(r>-2),i.getLevel()===r)return o.add(i),null;for(var s=i.getChildBoundables().iterator();s.hasNext();){var a=s.next();a instanceof ef?t.boundablesAtLevel(r,a,o):(Bc.isTrue(a instanceof Jh),-1===r&&o.add(a))}return null}},sf.prototype.query=function(){var t=this;if(1===arguments.length){var e=arguments[0];this.build();var n=new ll;return this.isEmpty()||this.getIntersectsOp().intersects(this._root.getBounds(),e)&&this.query(e,this._root,n),n}if(2===arguments.length){var r=arguments[0],i=arguments[1];if(this.build(),this.isEmpty())return null;this.getIntersectsOp().intersects(this._root.getBounds(),r)&&this.query(r,this._root,i)}else if(3===arguments.length)if(gc(arguments[2],$h)&&arguments[0]instanceof Object&&arguments[1]instanceof ef)for(var o=arguments[0],s=arguments[1],a=arguments[2],u=s.getChildBoundables(),c=0;cn&&(n=o)}}return n+1}},sf.prototype.createParentBoundables=function(t,e){var n=this;Bc.isTrue(!t.isEmpty());var r=new ll;r.add(this.createNode(e));var i=new ll(t);rf.sort(i,this.getComparator());for(var o=i.iterator();o.hasNext();){var s=o.next();n.lastNode(r).getChildBoundables().size()===n.getNodeCapacity()&&r.add(n.createNode(e)),n.lastNode(r).addChildBoundable(s)}return r},sf.prototype.isEmpty=function(){return this._built?this._root.isEmpty():this._itemBoundables.isEmpty()},sf.prototype.interfaces_=function(){return[uc]},sf.prototype.getClass=function(){return sf},sf.compareDoubles=function(t,e){return t>e?1:t0);for(var n=new ll,r=0;r0;){var f=h.poll(),p=f.getDistance();if(p>=c)break;f.isLeaves()?(c=p,l=f):f.expandToQueue(h,c)}return[l.getBoundable(0).getItem(),l.getBoundable(1).getItem()]}}else if(3===arguments.length){var d=arguments[0],g=arguments[1],y=arguments[2],v=new Jh(d,g),_=new of(this.getRoot(),v,y);return this.nearestNeighbour(_)[0]}},e.prototype.interfaces_=function(){return[tf,uc]},e.prototype.getClass=function(){return e},e.centreX=function(t){return e.avg(t.getMinX(),t.getMaxX())},e.avg=function(t,e){return(t+e)/2},e.centreY=function(t){return e.avg(t.getMinY(),t.getMaxY())},n.STRtreeNode.get=function(){return hf},n.serialVersionUID.get=function(){return 0x39920f7d5f261e0},n.xComparator.get=function(){return{interfaces_:function(){return[ac]},compare:function(n,r){return t.compareDoubles(e.centreX(n.getBounds()),e.centreX(r.getBounds()))}}},n.yComparator.get=function(){return{interfaces_:function(){return[ac]},compare:function(n,r){return t.compareDoubles(e.centreY(n.getBounds()),e.centreY(r.getBounds()))}}},n.intersectsOp.get=function(){return{interfaces_:function(){return[t.IntersectsOp]},intersects:function(t,e){return t.intersects(e)}}},n.DEFAULT_NODE_CAPACITY.get=function(){return 10},Object.defineProperties(e,n),e}(sf),hf=function(t){function e(){var e=arguments[0];t.call(this,e)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.computeBounds=function(){for(var t=null,e=this.getChildBoundables().iterator();e.hasNext();){var n=e.next();null===t?t=new Lc(n.getBounds()):t.expandToInclude(n.getBounds())}return t},e.prototype.interfaces_=function(){return[]},e.prototype.getClass=function(){return e},e}(ef),ff=function(){};ff.prototype.interfaces_=function(){return[]},ff.prototype.getClass=function(){return ff},ff.relativeSign=function(t,e){return te?1:0},ff.compare=function(t,e,n){if(e.equals2D(n))return 0;var r=ff.relativeSign(e.x,n.x),i=ff.relativeSign(e.y,n.y);switch(t){case 0:return ff.compareValue(r,i);case 1:return ff.compareValue(i,r);case 2:return ff.compareValue(i,-r);case 3:return ff.compareValue(-r,i);case 4:return ff.compareValue(-r,-i);case 5:return ff.compareValue(-i,-r);case 6:return ff.compareValue(-i,r);case 7:return ff.compareValue(r,-i)}return Bc.shouldNeverReachHere("invalid octant value"),0},ff.compareValue=function(t,e){return t<0?-1:t>0?1:e<0?-1:e>0?1:0};var pf=function(){this._segString=null,this.coord=null,this.segmentIndex=null,this._segmentOctant=null,this._isInterior=null;var t=arguments[0],e=arguments[1],n=arguments[2],r=arguments[3];this._segString=t,this.coord=new cc(e),this.segmentIndex=n,this._segmentOctant=r,this._isInterior=!e.equals2D(t.getCoordinate(n))};pf.prototype.getCoordinate=function(){return this.coord},pf.prototype.print=function(t){t.print(this.coord),t.print(" seg # = "+this.segmentIndex)},pf.prototype.compareTo=function(t){var e=t;return this.segmentIndexe.segmentIndex?1:this.coord.equals2D(e.coord)?0:ff.compare(this._segmentOctant,this.coord,e.coord)},pf.prototype.isEndPoint=function(t){return 0===this.segmentIndex&&!this._isInterior||this.segmentIndex===t},pf.prototype.isInterior=function(){return this._isInterior},pf.prototype.interfaces_=function(){return[oc]},pf.prototype.getClass=function(){return pf};var df=function(){this._nodeMap=new Pl,this._edge=null;var t=arguments[0];this._edge=t};df.prototype.getSplitCoordinates=function(){var t=new fl;this.addEndpoints();for(var e=this.iterator(),n=e.next();e.hasNext();){var r=e.next();this.addEdgeCoordinates(n,r,t),n=r}return t.toCoordinateArray()},df.prototype.addCollapsedNodes=function(){var t=new ll;this.findCollapsesFromInsertedNodes(t),this.findCollapsesFromExistingVertices(t);for(var e=t.iterator();e.hasNext();){var n=e.next().intValue();this.add(this._edge.getCoordinate(n),n)}},df.prototype.print=function(t){t.println("Intersections:");for(var e=this.iterator();e.hasNext();)e.next().print(t)},df.prototype.findCollapsesFromExistingVertices=function(t){for(var e=0;e=0?e>=0?n>=r?0:1:n>=r?7:6:e>=0?n>=r?3:2:n>=r?4:5}if(arguments[0]instanceof cc&&arguments[1]instanceof cc){var i=arguments[0],o=arguments[1],s=o.x-i.x,a=o.y-i.y;if(0===s&&0===a)throw new nc("Cannot compute the octant for two identical points "+i);return gf.octant(s,a)}};var yf=function(){};yf.prototype.getCoordinates=function(){},yf.prototype.size=function(){},yf.prototype.getCoordinate=function(t){},yf.prototype.isClosed=function(){},yf.prototype.setData=function(t){},yf.prototype.getData=function(){},yf.prototype.interfaces_=function(){return[]},yf.prototype.getClass=function(){return yf};var vf=function(){};vf.prototype.addIntersection=function(t,e){},vf.prototype.interfaces_=function(){return[yf]},vf.prototype.getClass=function(){return vf};var _f=function(){this._nodeList=new df(this),this._pts=null,this._data=null;var t=arguments[0],e=arguments[1];this._pts=t,this._data=e};_f.prototype.getCoordinates=function(){return this._pts},_f.prototype.size=function(){return this._pts.length},_f.prototype.getCoordinate=function(t){return this._pts[t]},_f.prototype.isClosed=function(){return this._pts[0].equals(this._pts[this._pts.length-1])},_f.prototype.getSegmentOctant=function(t){return t===this._pts.length-1?-1:this.safeOctant(this.getCoordinate(t),this.getCoordinate(t+1))},_f.prototype.setData=function(t){this._data=t},_f.prototype.safeOctant=function(t,e){return t.equals2D(e)?0:gf.octant(t,e)},_f.prototype.getData=function(){return this._data},_f.prototype.addIntersection=function(){if(2===arguments.length){var t=arguments[0],e=arguments[1];this.addIntersectionNode(t,e)}else if(4===arguments.length){var n=arguments[0],r=arguments[1],i=arguments[3],o=new cc(n.getIntersection(i));this.addIntersection(o,r)}},_f.prototype.toString=function(){return Dc.toLineString(new lh(this._pts))},_f.prototype.getNodeList=function(){return this._nodeList},_f.prototype.addIntersectionNode=function(t,e){var n=e,r=n+1;if(r=0&&n>=0||e<=0&&n<=0?Math.max(e,n):0}if(arguments[0]instanceof cc){var r=arguments[0];return qc.orientationIndex(this.p0,this.p1,r)}},mf.prototype.toGeometry=function(t){return t.createLineString([this.p0,this.p1])},mf.prototype.isVertical=function(){return this.p0.x===this.p1.x},mf.prototype.equals=function(t){if(!(t instanceof mf))return!1;var e=t;return this.p0.equals(e.p0)&&this.p1.equals(e.p1)},mf.prototype.intersection=function(t){var e=new Yc;return e.computeIntersection(this.p0,this.p1,t.p0,t.p1),e.hasIntersection()?e.getIntersection(0):null},mf.prototype.project=function(){if(arguments[0]instanceof cc){var t=arguments[0];if(t.equals(this.p0)||t.equals(this.p1))return new cc(t);var e=this.projectionFactor(t),n=new cc;return n.x=this.p0.x+e*(this.p1.x-this.p0.x),n.y=this.p0.y+e*(this.p1.y-this.p0.y),n}if(arguments[0]instanceof mf){var r=arguments[0],i=this.projectionFactor(r.p0),o=this.projectionFactor(r.p1);if(i>=1&&o>=1)return null;if(i<=0&&o<=0)return null;var s=this.project(r.p0);i<0&&(s=this.p0),i>1&&(s=this.p1);var a=this.project(r.p1);return o<0&&(a=this.p0),o>1&&(a=this.p1),new mf(s,a)}},mf.prototype.normalize=function(){this.p1.compareTo(this.p0)<0&&this.reverse()},mf.prototype.angle=function(){return Math.atan2(this.p1.y-this.p0.y,this.p1.x-this.p0.x)},mf.prototype.getCoordinate=function(t){return 0===t?this.p0:this.p1},mf.prototype.distancePerpendicular=function(t){return qc.distancePointLinePerpendicular(t,this.p0,this.p1)},mf.prototype.minY=function(){return Math.min(this.p0.y,this.p1.y)},mf.prototype.midPoint=function(){return mf.midPoint(this.p0,this.p1)},mf.prototype.projectionFactor=function(t){if(t.equals(this.p0))return 0;if(t.equals(this.p1))return 1;var e=this.p1.x-this.p0.x,n=this.p1.y-this.p0.y,r=e*e+n*n;return r<=0?rc.NaN:((t.x-this.p0.x)*e+(t.y-this.p0.y)*n)/r},mf.prototype.closestPoints=function(t){var e=this.intersection(t);if(null!==e)return[e,e];var n=new Array(2).fill(null),r=rc.MAX_VALUE,i=null,o=this.closestPoint(t.p0);r=o.distance(t.p0),n[0]=o,n[1]=t.p0;var s=this.closestPoint(t.p1);(i=s.distance(t.p1))0&&e<1?this.project(t):this.p0.distance(t)1||rc.isNaN(e))&&(e=1),e},mf.prototype.toString=function(){return"LINESTRING( "+this.p0.x+" "+this.p0.y+", "+this.p1.x+" "+this.p1.y+")"},mf.prototype.isHorizontal=function(){return this.p0.y===this.p1.y},mf.prototype.distance=function(){if(arguments[0]instanceof mf){var t=arguments[0];return qc.distanceLineLine(this.p0,this.p1,t.p0,t.p1)}if(arguments[0]instanceof cc){var e=arguments[0];return qc.distancePointLine(e,this.p0,this.p1)}},mf.prototype.pointAlong=function(t){var e=new cc;return e.x=this.p0.x+t*(this.p1.x-this.p0.x),e.y=this.p0.y+t*(this.p1.y-this.p0.y),e},mf.prototype.hashCode=function(){var t=rc.doubleToLongBits(this.p0.x);t^=31*rc.doubleToLongBits(this.p0.y);var e=Math.trunc(t)^Math.trunc(t>>32),n=rc.doubleToLongBits(this.p1.x);return n^=31*rc.doubleToLongBits(this.p1.y),e^Math.trunc(n)^Math.trunc(n>>32)},mf.prototype.interfaces_=function(){return[oc,uc]},mf.prototype.getClass=function(){return mf},mf.midPoint=function(t,e){return new cc((t.x+e.x)/2,(t.y+e.y)/2)},bf.serialVersionUID.get=function(){return 0x2d2172135f411c00},Object.defineProperties(mf,bf);var Ef=function(){this.tempEnv1=new Lc,this.tempEnv2=new Lc,this._overlapSeg1=new mf,this._overlapSeg2=new mf};Ef.prototype.overlap=function(){if(2===arguments.length);else if(4===arguments.length){var t=arguments[0],e=arguments[1],n=arguments[2],r=arguments[3];t.getLineSegment(e,this._overlapSeg1),n.getLineSegment(r,this._overlapSeg2),this.overlap(this._overlapSeg1,this._overlapSeg2)}},Ef.prototype.interfaces_=function(){return[]},Ef.prototype.getClass=function(){return Ef};var wf=function(){this._pts=null,this._start=null,this._end=null,this._env=null,this._context=null,this._id=null;var t=arguments[0],e=arguments[1],n=arguments[2],r=arguments[3];this._pts=t,this._start=e,this._end=n,this._context=r};wf.prototype.getLineSegment=function(t,e){e.p0=this._pts[t],e.p1=this._pts[t+1]},wf.prototype.computeSelect=function(t,e,n,r){var i=this._pts[e],o=this._pts[n];if(r.tempEnv1.init(i,o),n-e==1)return r.select(this,e),null;if(!t.intersects(r.tempEnv1))return null;var s=Math.trunc((e+n)/2);e=t.length-1)return t.length-1;for(var r=Yh.quadrant(t[n],t[n+1]),i=e+1;ir.getId()&&(r.computeOverlaps(o,e),t._nOverlaps++),t._segInt.isDone())return null}},e.prototype.interfaces_=function(){return[]},e.prototype.getClass=function(){return e},n.SegmentOverlapAction.get=function(){return If},Object.defineProperties(e,n),e}(Sf),If=function(t){function e(){t.call(this),this._si=null;var e=arguments[0];this._si=e}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.overlap=function(){if(4!==arguments.length)return t.prototype.overlap.apply(this,arguments);var e=arguments[0],n=arguments[1],r=arguments[2],i=arguments[3],o=e.getContext(),s=r.getContext();this._si.processIntersections(o,n,s,i)},e.prototype.interfaces_=function(){return[]},e.prototype.getClass=function(){return e},e}(Ef),Pf=function t(){if(this._quadrantSegments=t.DEFAULT_QUADRANT_SEGMENTS,this._endCapStyle=t.CAP_ROUND,this._joinStyle=t.JOIN_ROUND,this._mitreLimit=t.DEFAULT_MITRE_LIMIT,this._isSingleSided=!1,this._simplifyFactor=t.DEFAULT_SIMPLIFY_FACTOR,0===arguments.length);else if(1===arguments.length){var e=arguments[0];this.setQuadrantSegments(e)}else if(2===arguments.length){var n=arguments[0],r=arguments[1];this.setQuadrantSegments(n),this.setEndCapStyle(r)}else if(4===arguments.length){var i=arguments[0],o=arguments[1],s=arguments[2],a=arguments[3];this.setQuadrantSegments(i),this.setEndCapStyle(o),this.setJoinStyle(s),this.setMitreLimit(a)}},Rf={CAP_ROUND:{configurable:!0},CAP_FLAT:{configurable:!0},CAP_SQUARE:{configurable:!0},JOIN_ROUND:{configurable:!0},JOIN_MITRE:{configurable:!0},JOIN_BEVEL:{configurable:!0},DEFAULT_QUADRANT_SEGMENTS:{configurable:!0},DEFAULT_MITRE_LIMIT:{configurable:!0},DEFAULT_SIMPLIFY_FACTOR:{configurable:!0}};Pf.prototype.getEndCapStyle=function(){return this._endCapStyle},Pf.prototype.isSingleSided=function(){return this._isSingleSided},Pf.prototype.setQuadrantSegments=function(t){this._quadrantSegments=t,0===this._quadrantSegments&&(this._joinStyle=Pf.JOIN_BEVEL),this._quadrantSegments<0&&(this._joinStyle=Pf.JOIN_MITRE,this._mitreLimit=Math.abs(this._quadrantSegments)),t<=0&&(this._quadrantSegments=1),this._joinStyle!==Pf.JOIN_ROUND&&(this._quadrantSegments=Pf.DEFAULT_QUADRANT_SEGMENTS)},Pf.prototype.getJoinStyle=function(){return this._joinStyle},Pf.prototype.setJoinStyle=function(t){this._joinStyle=t},Pf.prototype.setSimplifyFactor=function(t){this._simplifyFactor=t<0?0:t},Pf.prototype.getSimplifyFactor=function(){return this._simplifyFactor},Pf.prototype.getQuadrantSegments=function(){return this._quadrantSegments},Pf.prototype.setEndCapStyle=function(t){this._endCapStyle=t},Pf.prototype.getMitreLimit=function(){return this._mitreLimit},Pf.prototype.setMitreLimit=function(t){this._mitreLimit=t},Pf.prototype.setSingleSided=function(t){this._isSingleSided=t},Pf.prototype.interfaces_=function(){return[]},Pf.prototype.getClass=function(){return Pf},Pf.bufferDistanceError=function(t){var e=Math.PI/2/t;return 1-Math.cos(e/2)},Rf.CAP_ROUND.get=function(){return 1},Rf.CAP_FLAT.get=function(){return 2},Rf.CAP_SQUARE.get=function(){return 3},Rf.JOIN_ROUND.get=function(){return 1},Rf.JOIN_MITRE.get=function(){return 2},Rf.JOIN_BEVEL.get=function(){return 3},Rf.DEFAULT_QUADRANT_SEGMENTS.get=function(){return 8},Rf.DEFAULT_MITRE_LIMIT.get=function(){return 5},Rf.DEFAULT_SIMPLIFY_FACTOR.get=function(){return.01},Object.defineProperties(Pf,Rf);var Tf=function(t){this._distanceTol=null,this._isDeleted=null,this._angleOrientation=qc.COUNTERCLOCKWISE,this._inputLine=t||null},Lf={INIT:{configurable:!0},DELETE:{configurable:!0},KEEP:{configurable:!0},NUM_PTS_TO_CHECK:{configurable:!0}};Tf.prototype.isDeletable=function(t,e,n,r){var i=this._inputLine[t],o=this._inputLine[e],s=this._inputLine[n];return!!this.isConcave(i,o,s)&&!!this.isShallow(i,o,s,r)&&this.isShallowSampled(i,o,t,n,r)},Tf.prototype.deleteShallowConcavities=function(){for(var t=this,e=1,n=this.findNextNonDeletedIndex(e),r=this.findNextNonDeletedIndex(n),i=!1;r=0;r--)this.addPt(t[r])},Mf.prototype.isRedundant=function(t){if(this._ptList.size()<1)return!1;var e=this._ptList.get(this._ptList.size()-1);return t.distance(e)Math.PI;)t-=Af.PI_TIMES_2;for(;t<=-Math.PI;)t+=Af.PI_TIMES_2;return t},Af.angle=function(){if(1===arguments.length){var t=arguments[0];return Math.atan2(t.y,t.x)}if(2===arguments.length){var e=arguments[0],n=arguments[1],r=n.x-e.x,i=n.y-e.y;return Math.atan2(i,r)}},Af.isAcute=function(t,e,n){var r=t.x-e.x,i=t.y-e.y;return r*(n.x-e.x)+i*(n.y-e.y)>0},Af.isObtuse=function(t,e,n){var r=t.x-e.x,i=t.y-e.y;return r*(n.x-e.x)+i*(n.y-e.y)<0},Af.interiorAngle=function(t,e,n){var r=Af.angle(e,t),i=Af.angle(e,n);return Math.abs(i-r)},Af.normalizePositive=function(t){if(t<0){for(;t<0;)t+=Af.PI_TIMES_2;t>=Af.PI_TIMES_2&&(t=0)}else{for(;t>=Af.PI_TIMES_2;)t-=Af.PI_TIMES_2;t<0&&(t=0)}return t},Af.angleBetween=function(t,e,n){var r=Af.angle(e,t),i=Af.angle(e,n);return Af.diff(r,i)},Af.diff=function(t,e){var n=null;return(n=tMath.PI&&(n=2*Math.PI-n),n},Af.toRadians=function(t){return t*Math.PI/180},Af.getTurn=function(t,e){var n=Math.sin(e-t);return n>0?Af.COUNTERCLOCKWISE:n<0?Af.CLOCKWISE:Af.NONE},Af.angleBetweenOriented=function(t,e,n){var r=Af.angle(e,t),i=Af.angle(e,n)-r;return i<=-Math.PI?i+Af.PI_TIMES_2:i>Math.PI?i-Af.PI_TIMES_2:i},Ff.PI_TIMES_2.get=function(){return 2*Math.PI},Ff.PI_OVER_2.get=function(){return Math.PI/2},Ff.PI_OVER_4.get=function(){return Math.PI/4},Ff.COUNTERCLOCKWISE.get=function(){return qc.COUNTERCLOCKWISE},Ff.CLOCKWISE.get=function(){return qc.CLOCKWISE},Ff.NONE.get=function(){return qc.COLLINEAR},Object.defineProperties(Af,Ff);var jf=function t(){this._maxCurveSegmentError=0,this._filletAngleQuantum=null,this._closingSegLengthFactor=1,this._segList=null,this._distance=0,this._precisionModel=null,this._bufParams=null,this._li=null,this._s0=null,this._s1=null,this._s2=null,this._seg0=new mf,this._seg1=new mf,this._offset0=new mf,this._offset1=new mf,this._side=0,this._hasNarrowConcaveAngle=!1;var e=arguments[0],n=arguments[1],r=arguments[2];this._precisionModel=e,this._bufParams=n,this._li=new Yc,this._filletAngleQuantum=Math.PI/2/n.getQuadrantSegments(),n.getQuadrantSegments()>=8&&n.getJoinStyle()===Pf.JOIN_ROUND&&(this._closingSegLengthFactor=t.MAX_CLOSING_SEG_LEN_FACTOR),this.init(r)},Df={OFFSET_SEGMENT_SEPARATION_FACTOR:{configurable:!0},INSIDE_TURN_VERTEX_SNAP_DISTANCE_FACTOR:{configurable:!0},CURVE_VERTEX_SNAP_DISTANCE_FACTOR:{configurable:!0},MAX_CLOSING_SEG_LEN_FACTOR:{configurable:!0}};jf.prototype.addNextSegment=function(t,e){if(this._s0=this._s1,this._s1=this._s2,this._s2=t,this._seg0.setCoordinates(this._s0,this._s1),this.computeOffsetSegment(this._seg0,this._side,this._distance,this._offset0),this._seg1.setCoordinates(this._s1,this._s2),this.computeOffsetSegment(this._seg1,this._side,this._distance,this._offset1),this._s1.equals(this._s2))return null;var n=qc.computeOrientation(this._s0,this._s1,this._s2),r=n===qc.CLOCKWISE&&this._side===Ih.LEFT||n===qc.COUNTERCLOCKWISE&&this._side===Ih.RIGHT;0===n?this.addCollinear(e):r?this.addOutsideTurn(n,e):this.addInsideTurn(n,e)},jf.prototype.addLineEndCap=function(t,e){var n=new mf(t,e),r=new mf;this.computeOffsetSegment(n,Ih.LEFT,this._distance,r);var i=new mf;this.computeOffsetSegment(n,Ih.RIGHT,this._distance,i);var o=e.x-t.x,s=e.y-t.y,a=Math.atan2(s,o);switch(this._bufParams.getEndCapStyle()){case Pf.CAP_ROUND:this._segList.addPt(r.p1),this.addFilletArc(e,a+Math.PI/2,a-Math.PI/2,qc.CLOCKWISE,this._distance),this._segList.addPt(i.p1);break;case Pf.CAP_FLAT:this._segList.addPt(r.p1),this._segList.addPt(i.p1);break;case Pf.CAP_SQUARE:var u=new cc;u.x=Math.abs(this._distance)*Math.cos(a),u.y=Math.abs(this._distance)*Math.sin(a);var c=new cc(r.p1.x+u.x,r.p1.y+u.y),l=new cc(i.p1.x+u.x,i.p1.y+u.y);this._segList.addPt(c),this._segList.addPt(l)}},jf.prototype.getCoordinates=function(){return this._segList.getCoordinates()},jf.prototype.addMitreJoin=function(t,e,n,r){var i=!0,o=null;try{o=Tc.intersection(e.p0,e.p1,n.p0,n.p1),(r<=0?1:o.distance(t)/Math.abs(r))>this._bufParams.getMitreLimit()&&(i=!1)}catch(t){if(!(t instanceof Pc))throw t;o=new cc(0,0),i=!1}i?this._segList.addPt(o):this.addLimitedMitreJoin(e,n,r,this._bufParams.getMitreLimit())},jf.prototype.addFilletCorner=function(t,e,n,r,i){var o=e.x-t.x,s=e.y-t.y,a=Math.atan2(s,o),u=n.x-t.x,c=n.y-t.y,l=Math.atan2(c,u);r===qc.CLOCKWISE?a<=l&&(a+=2*Math.PI):a>=l&&(a-=2*Math.PI),this._segList.addPt(e),this.addFilletArc(t,a,l,r,i),this._segList.addPt(n)},jf.prototype.addOutsideTurn=function(t,e){if(this._offset0.p1.distance(this._offset1.p0)0){var n=new cc((this._closingSegLengthFactor*this._offset0.p1.x+this._s1.x)/(this._closingSegLengthFactor+1),(this._closingSegLengthFactor*this._offset0.p1.y+this._s1.y)/(this._closingSegLengthFactor+1));this._segList.addPt(n);var r=new cc((this._closingSegLengthFactor*this._offset1.p0.x+this._s1.x)/(this._closingSegLengthFactor+1),(this._closingSegLengthFactor*this._offset1.p0.y+this._s1.y)/(this._closingSegLengthFactor+1));this._segList.addPt(r)}else this._segList.addPt(this._s1);this._segList.addPt(this._offset1.p0)}},jf.prototype.createCircle=function(t){var e=new cc(t.x+this._distance,t.y);this._segList.addPt(e),this.addFilletArc(t,0,2*Math.PI,-1,this._distance),this._segList.closeRing()},jf.prototype.addBevelJoin=function(t,e){this._segList.addPt(t.p1),this._segList.addPt(e.p0)},jf.prototype.init=function(t){this._distance=t,this._maxCurveSegmentError=t*(1-Math.cos(this._filletAngleQuantum/2)),this._segList=new Mf,this._segList.setPrecisionModel(this._precisionModel),this._segList.setMinimumVertexDistance(t*jf.CURVE_VERTEX_SNAP_DISTANCE_FACTOR)},jf.prototype.addCollinear=function(t){this._li.computeIntersection(this._s0,this._s1,this._s1,this._s2),this._li.getIntersectionNum()>=2&&(this._bufParams.getJoinStyle()===Pf.JOIN_BEVEL||this._bufParams.getJoinStyle()===Pf.JOIN_MITRE?(t&&this._segList.addPt(this._offset0.p1),this._segList.addPt(this._offset1.p0)):this.addFilletCorner(this._s1,this._offset0.p1,this._offset1.p0,qc.CLOCKWISE,this._distance))},jf.prototype.closeRing=function(){this._segList.closeRing()},jf.prototype.hasNarrowConcaveAngle=function(){return this._hasNarrowConcaveAngle},jf.prototype.interfaces_=function(){return[]},jf.prototype.getClass=function(){return jf},Df.OFFSET_SEGMENT_SEPARATION_FACTOR.get=function(){return.001},Df.INSIDE_TURN_VERTEX_SNAP_DISTANCE_FACTOR.get=function(){return.001},Df.CURVE_VERTEX_SNAP_DISTANCE_FACTOR.get=function(){return 1e-6},Df.MAX_CLOSING_SEG_LEN_FACTOR.get=function(){return 80},Object.defineProperties(jf,Df);var kf=function(){this._distance=0,this._precisionModel=null,this._bufParams=null;var t=arguments[0],e=arguments[1];this._precisionModel=t,this._bufParams=e};kf.prototype.getOffsetCurve=function(t,e){if(this._distance=e,0===e)return null;var n=e<0,r=Math.abs(e),i=this.getSegGen(r);t.length<=1?this.computePointCurve(t[0],i):this.computeOffsetCurve(t,n,i);var o=i.getCoordinates();return n&&pl.reverse(o),o},kf.prototype.computeSingleSidedBufferCurve=function(t,e,n){var r=this.simplifyTolerance(this._distance);if(e){n.addSegments(t,!0);var i=Tf.simplify(t,-r),o=i.length-1;n.initSideSegments(i[o],i[o-1],Ih.LEFT),n.addFirstSegment();for(var s=o-2;s>=0;s--)n.addNextSegment(i[s],!0)}else{n.addSegments(t,!1);var a=Tf.simplify(t,r),u=a.length-1;n.initSideSegments(a[0],a[1],Ih.LEFT),n.addFirstSegment();for(var c=2;c<=u;c++)n.addNextSegment(a[c],!0)}n.addLastSegment(),n.closeRing()},kf.prototype.computeRingBufferCurve=function(t,e,n){var r=this.simplifyTolerance(this._distance);e===Ih.RIGHT&&(r=-r);var i=Tf.simplify(t,r),o=i.length-1;n.initSideSegments(i[o-1],i[0],e);for(var s=1;s<=o;s++){var a=1!==s;n.addNextSegment(i[s],a)}n.closeRing()},kf.prototype.computeLineBufferCurve=function(t,e){var n=this.simplifyTolerance(this._distance),r=Tf.simplify(t,n),i=r.length-1;e.initSideSegments(r[0],r[1],Ih.LEFT);for(var o=2;o<=i;o++)e.addNextSegment(r[o],!0);e.addLastSegment(),e.addLineEndCap(r[i-1],r[i]);var s=Tf.simplify(t,-n),a=s.length-1;e.initSideSegments(s[a],s[a-1],Ih.LEFT);for(var u=a-2;u>=0;u--)e.addNextSegment(s[u],!0);e.addLastSegment(),e.addLineEndCap(s[1],s[0]),e.closeRing()},kf.prototype.computePointCurve=function(t,e){switch(this._bufParams.getEndCapStyle()){case Pf.CAP_ROUND:e.createCircle(t);break;case Pf.CAP_SQUARE:e.createSquare(t)}},kf.prototype.getLineCurve=function(t,e){if(this._distance=e,e<0&&!this._bufParams.isSingleSided())return null;if(0===e)return null;var n=Math.abs(e),r=this.getSegGen(n);if(t.length<=1)this.computePointCurve(t[0],r);else if(this._bufParams.isSingleSided()){var i=e<0;this.computeSingleSidedBufferCurve(t,i,r)}else this.computeLineBufferCurve(t,r);return r.getCoordinates()},kf.prototype.getBufferParameters=function(){return this._bufParams},kf.prototype.simplifyTolerance=function(t){return t*this._bufParams.getSimplifyFactor()},kf.prototype.getRingCurve=function(t,e,n){if(this._distance=n,t.length<=2)return this.getLineCurve(t,n);if(0===n)return kf.copyCoordinates(t);var r=this.getSegGen(n);return this.computeRingBufferCurve(t,e,r),r.getCoordinates()},kf.prototype.computeOffsetCurve=function(t,e,n){var r=this.simplifyTolerance(this._distance);if(e){var i=Tf.simplify(t,-r),o=i.length-1;n.initSideSegments(i[o],i[o-1],Ih.LEFT),n.addFirstSegment();for(var s=o-2;s>=0;s--)n.addNextSegment(i[s],!0)}else{var a=Tf.simplify(t,r),u=a.length-1;n.initSideSegments(a[0],a[1],Ih.LEFT),n.addFirstSegment();for(var c=2;c<=u;c++)n.addNextSegment(a[c],!0)}n.addLastSegment()},kf.prototype.getSegGen=function(t){return new jf(this._precisionModel,this._bufParams,t)},kf.prototype.interfaces_=function(){return[]},kf.prototype.getClass=function(){return kf},kf.copyCoordinates=function(t){for(var e=new Array(t.length).fill(null),n=0;no.getMaxY()||t.findStabbedSegments(e,i.getDirectedEdges(),n)}return n}if(3===arguments.length)if(gc(arguments[2],ul)&&arguments[0]instanceof cc&&arguments[1]instanceof qh)for(var s=arguments[0],a=arguments[1],u=arguments[2],c=a.getEdge().getCoordinates(),l=0;lt._seg.p1.y&&t._seg.reverse();var h=Math.max(t._seg.p0.x,t._seg.p1.x);if(!(ht._seg.p1.y||qc.computeOrientation(t._seg.p0,t._seg.p1,s)===qc.RIGHT)){var f=a.getDepth(Ih.LEFT);t._seg.p0.equals(c[l])||(f=a.getDepth(Ih.RIGHT));var p=new Uf(t._seg,f);u.add(p)}}else if(gc(arguments[2],ul)&&arguments[0]instanceof cc&&gc(arguments[1],ul))for(var d=arguments[0],g=arguments[1],y=arguments[2],v=g.iterator();v.hasNext();){var _=v.next();_.isForward()&&t.findStabbedSegments(d,_,y)}},Gf.prototype.getDepth=function(t){var e=this.findStabbedSegments(t);return 0===e.size()?0:rf.min(e)._leftDepth},Gf.prototype.interfaces_=function(){return[]},Gf.prototype.getClass=function(){return Gf},Bf.DepthSegment.get=function(){return Uf},Object.defineProperties(Gf,Bf);var Uf=function(){this._upwardSeg=null,this._leftDepth=null;var t=arguments[0],e=arguments[1];this._upwardSeg=new mf(t),this._leftDepth=e};Uf.prototype.compareTo=function(t){var e=t;if(this._upwardSeg.minX()>=e._upwardSeg.maxX())return 1;if(this._upwardSeg.maxX()<=e._upwardSeg.minX())return-1;var n=this._upwardSeg.orientationIndex(e._upwardSeg);return 0!==n||0!==(n=-1*e._upwardSeg.orientationIndex(this._upwardSeg))?n:this._upwardSeg.compareTo(e._upwardSeg)},Uf.prototype.compareX=function(t,e){var n=t.p0.compareTo(e.p0);return 0!==n?n:t.p1.compareTo(e.p1)},Uf.prototype.toString=function(){return this._upwardSeg.toString()},Uf.prototype.interfaces_=function(){return[oc]},Uf.prototype.getClass=function(){return Uf};var zf=function(t,e,n){this.p0=t||null,this.p1=e||null,this.p2=n||null};zf.prototype.area=function(){return zf.area(this.p0,this.p1,this.p2)},zf.prototype.signedArea=function(){return zf.signedArea(this.p0,this.p1,this.p2)},zf.prototype.interpolateZ=function(t){if(null===t)throw new nc("Supplied point is null.");return zf.interpolateZ(t,this.p0,this.p1,this.p2)},zf.prototype.longestSideLength=function(){return zf.longestSideLength(this.p0,this.p1,this.p2)},zf.prototype.isAcute=function(){return zf.isAcute(this.p0,this.p1,this.p2)},zf.prototype.circumcentre=function(){return zf.circumcentre(this.p0,this.p1,this.p2)},zf.prototype.area3D=function(){return zf.area3D(this.p0,this.p1,this.p2)},zf.prototype.centroid=function(){return zf.centroid(this.p0,this.p1,this.p2)},zf.prototype.inCentre=function(){return zf.inCentre(this.p0,this.p1,this.p2)},zf.prototype.interfaces_=function(){return[]},zf.prototype.getClass=function(){return zf},zf.area=function(t,e,n){return Math.abs(((n.x-t.x)*(e.y-t.y)-(e.x-t.x)*(n.y-t.y))/2)},zf.signedArea=function(t,e,n){return((n.x-t.x)*(e.y-t.y)-(e.x-t.x)*(n.y-t.y))/2},zf.det=function(t,e,n,r){return t*r-e*n},zf.interpolateZ=function(t,e,n,r){var i=e.x,o=e.y,s=n.x-i,a=r.x-i,u=n.y-o,c=r.y-o,l=s*c-a*u,h=t.x-i,f=t.y-o,p=(c*h-a*f)/l,d=(-u*h+s*f)/l;return e.z+p*(n.z-e.z)+d*(r.z-e.z)},zf.longestSideLength=function(t,e,n){var r=t.distance(e),i=e.distance(n),o=n.distance(t),s=r;return i>s&&(s=i),o>s&&(s=o),s},zf.isAcute=function(t,e,n){return!!Af.isAcute(t,e,n)&&!!Af.isAcute(e,n,t)&&!!Af.isAcute(n,t,e)},zf.circumcentre=function(t,e,n){var r=n.x,i=n.y,o=t.x-r,s=t.y-i,a=e.x-r,u=e.y-i,c=2*zf.det(o,s,a,u),l=zf.det(s,o*o+s*s,u,a*a+u*u),h=zf.det(o,o*o+s*s,a,a*a+u*u);return new cc(r-l/c,i+h/c)},zf.perpendicularBisector=function(t,e){var n=e.x-t.x,r=e.y-t.y,i=new Tc(t.x+n/2,t.y+r/2,1),o=new Tc(t.x-r+n/2,t.y+n+r/2,1);return new Tc(i,o)},zf.angleBisector=function(t,e,n){var r=e.distance(t),i=r/(r+e.distance(n)),o=n.x-t.x,s=n.y-t.y;return new cc(t.x+i*o,t.y+i*s)},zf.area3D=function(t,e,n){var r=e.x-t.x,i=e.y-t.y,o=e.z-t.z,s=n.x-t.x,a=n.y-t.y,u=n.z-t.z,c=i*u-o*a,l=o*s-r*u,h=r*a-i*s,f=c*c+l*l+h*h,p=Math.sqrt(f)/2;return p},zf.centroid=function(t,e,n){var r=(t.x+e.x+n.x)/3,i=(t.y+e.y+n.y)/3;return new cc(r,i)},zf.inCentre=function(t,e,n){var r=e.distance(n),i=t.distance(n),o=t.distance(e),s=r+i+o,a=(r*t.x+i*e.x+o*n.x)/s,u=(r*t.y+i*e.y+o*n.y)/s;return new cc(a,u)};var Yf=function(){this._inputGeom=null,this._distance=null,this._curveBuilder=null,this._curveList=new ll;var t=arguments[0],e=arguments[1],n=arguments[2];this._inputGeom=t,this._distance=e,this._curveBuilder=n};Yf.prototype.addPoint=function(t){if(this._distance<=0)return null;var e=t.getCoordinates(),n=this._curveBuilder.getLineCurve(e,this._distance);this.addCurve(n,pc.EXTERIOR,pc.INTERIOR)},Yf.prototype.addPolygon=function(t){var e=this,n=this._distance,r=Ih.LEFT;this._distance<0&&(n=-this._distance,r=Ih.RIGHT);var i=t.getExteriorRing(),o=pl.removeRepeatedPoints(i.getCoordinates());if(this._distance<0&&this.isErodedCompletely(i,this._distance))return null;if(this._distance<=0&&o.length<3)return null;this.addPolygonRing(o,n,r,pc.EXTERIOR,pc.INTERIOR);for(var s=0;s0&&e.isErodedCompletely(a,-e._distance)||e.addPolygonRing(u,n,Ih.opposite(r),pc.INTERIOR,pc.EXTERIOR)}},Yf.prototype.isTriangleErodedCompletely=function(t,e){var n=new zf(t[0],t[1],t[2]),r=n.inCentre();return qc.distancePointLine(r,n.p0,n.p1)=rh.MINIMUM_VALID_SIZE&&qc.isCCW(t)&&(o=i,s=r,n=Ih.opposite(n));var a=this._curveBuilder.getRingCurve(t,n,e);this.addCurve(a,o,s)},Yf.prototype.add=function(t){if(t.isEmpty())return null;t instanceof eh?this.addPolygon(t):t instanceof Jl?this.addLineString(t):t instanceof $l?this.addPoint(t):(t instanceof nh||t instanceof Gl||t instanceof ih||t instanceof kl)&&this.addCollection(t)},Yf.prototype.isErodedCompletely=function(t,e){var n=t.getCoordinates();if(n.length<4)return e<0;if(4===n.length)return this.isTriangleErodedCompletely(n,e);var r=t.getEnvelopeInternal(),i=Math.min(r.getHeight(),r.getWidth());return e<0&&2*Math.abs(e)>i},Yf.prototype.addCollection=function(t){for(var e=0;e=this._max)throw new cl;var t=this._parent.getGeometryN(this._index++);return t instanceof kl?(this._subcollectionIterator=new Vf(t),this._subcollectionIterator.next()):t},Vf.prototype.remove=function(){throw new Error(this.getClass().getName())},Vf.prototype.hasNext=function(){if(this._atStart)return!0;if(null!==this._subcollectionIterator){if(this._subcollectionIterator.hasNext())return!0;this._subcollectionIterator=null}return!(this._index>=this._max)},Vf.prototype.interfaces_=function(){return[al]},Vf.prototype.getClass=function(){return Vf},Vf.isAtomic=function(t){return!(t instanceof kl)};var qf=function(){this._geom=null;var t=arguments[0];this._geom=t};qf.prototype.locate=function(t){return qf.locate(t,this._geom)},qf.prototype.interfaces_=function(){return[Xf]},qf.prototype.getClass=function(){return qf},qf.isPointInRing=function(t,e){return!!e.getEnvelopeInternal().intersects(t)&&qc.isPointInRing(t,e.getCoordinates())},qf.containsPointInPolygon=function(t,e){if(e.isEmpty())return!1;var n=e.getExteriorRing();if(!qf.isPointInRing(t,n))return!1;for(var r=0;r=0;n--){var r=this._edgeList.get(n),i=r.getSym();null===e&&(e=i),null!==t&&i.setNext(t),t=r}e.setNext(t)},e.prototype.computeDepths=function(){var t=this;if(1===arguments.length){var e=arguments[0],n=this.findIndex(e),r=e.getDepth(Ih.LEFT),i=e.getDepth(Ih.RIGHT),o=this.computeDepths(n+1,this._edgeList.size(),r),s=this.computeDepths(0,n,o);if(s!==i)throw new Mh("depth mismatch at "+e.getCoordinate())}else if(3===arguments.length){for(var a=arguments[0],u=arguments[1],c=arguments[2],l=c,h=a;h=0;o--){var s=e._resultAreaEdgeList.get(o),a=s.getSym();switch(null===n&&s.getEdgeRing()===t&&(n=s),i){case e._SCANNING_FOR_INCOMING:if(a.getEdgeRing()!==t)continue;r=a,i=e._LINKING_TO_OUTGOING;break;case e._LINKING_TO_OUTGOING:if(s.getEdgeRing()!==t)continue;r.setNextMin(s),i=e._SCANNING_FOR_INCOMING}}i===this._LINKING_TO_OUTGOING&&(Bc.isTrue(null!==n,"found null for first outgoing dirEdge"),Bc.isTrue(n.getEdgeRing()===t,"unable to link last incoming dirEdge"),r.setNextMin(n))},e.prototype.getOutgoingDegree=function(){if(0===arguments.length){for(var t=0,e=this.iterator();e.hasNext();){var n=e.next();n.isInResult()&&t++}return t}if(1===arguments.length){for(var r=arguments[0],i=0,o=this.iterator();o.hasNext();){var s=o.next();s.getEdgeRing()===r&&i++}return i}},e.prototype.getLabel=function(){return this._label},e.prototype.findCoveredLineEdges=function(){for(var t=pc.NONE,e=this.iterator();e.hasNext();){var n=e.next(),r=n.getSym();if(!n.isLineEdge()){if(n.isInResult()){t=pc.INTERIOR;break}if(r.isInResult()){t=pc.EXTERIOR;break}}}if(t===pc.NONE)return null;for(var i=t,o=this.iterator();o.hasNext();){var s=o.next(),a=s.getSym();s.isLineEdge()?s.getEdge().setCovered(i===pc.INTERIOR):(s.isInResult()&&(i=pc.EXTERIOR),a.isInResult()&&(i=pc.INTERIOR))}},e.prototype.computeLabelling=function(e){t.prototype.computeLabelling.call(this,e),this._label=new jh(pc.NONE);for(var n=this.iterator();n.hasNext();)for(var r=n.next().getEdge().getLabel(),i=0;i<2;i++){var o=r.getLocation(i);o!==pc.INTERIOR&&o!==pc.BOUNDARY||this._label.setLocation(i,pc.INTERIOR)}},e.prototype.interfaces_=function(){return[]},e.prototype.getClass=function(){return e},e}(Wf),Zf=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.createNode=function(t){return new Uh(t,new Hf)},e.prototype.interfaces_=function(){return[]},e.prototype.getClass=function(){return e},e}(Wh),Kf=function t(){this._pts=null,this._orientation=null;var e=arguments[0];this._pts=e,this._orientation=t.orientation(e)};Kf.prototype.compareTo=function(t){var e=t;return Kf.compareOriented(this._pts,this._orientation,e._pts,e._orientation)},Kf.prototype.interfaces_=function(){return[oc]},Kf.prototype.getClass=function(){return Kf},Kf.orientation=function(t){return 1===pl.increasingDirection(t)},Kf.compareOriented=function(t,e,n,r){for(var i=e?1:-1,o=r?1:-1,s=e?t.length:-1,a=r?n.length:-1,u=e?0:t.length-1,c=r?0:n.length-1;;){var l=t[u].compareTo(n[c]);if(0!==l)return l;var h=(u+=i)===s,f=(c+=o)===a;if(h&&!f)return-1;if(!h&&f)return 1;if(h&&f)return 0}};var Jf=function(){this._edges=new ll,this._ocaMap=new Pl};Jf.prototype.print=function(t){t.print("MULTILINESTRING ( ");for(var e=0;e0&&t.print(","),t.print("(");for(var r=n.getCoordinates(),i=0;i0&&t.print(","),t.print(r[i].x+" "+r[i].y);t.println(")")}t.print(") ")},Jf.prototype.addAll=function(t){for(var e=t.iterator();e.hasNext();)this.add(e.next())},Jf.prototype.findEdgeIndex=function(t){for(var e=0;e0||!e.coord.equals2D(r);i||n--;var o=new Array(n).fill(null),s=0;o[s++]=new cc(t.coord);for(var a=t.segmentIndex+1;a<=e.segmentIndex;a++)o[s++]=this.edge.pts[a];return i&&(o[s]=e.coord),new sp(o,new jh(this.edge._label))},ep.prototype.add=function(t,e,n){var r=new tp(t,e,n),i=this._nodeMap.get(r);return null!==i?i:(this._nodeMap.put(r,r),r)},ep.prototype.isIntersection=function(t){for(var e=this.iterator();e.hasNext();)if(e.next().coord.equals(t))return!0;return!1},ep.prototype.interfaces_=function(){return[]},ep.prototype.getClass=function(){return ep};var np=function(){};np.prototype.getChainStartIndices=function(t){var e=0,n=new ll;n.add(new mc(e));do{var r=this.findChainEnd(t,e);n.add(new mc(r)),e=r}while(en?e:n},rp.prototype.getMinX=function(t){var e=this.pts[this.startIndex[t]].x,n=this.pts[this.startIndex[t+1]].x;return en&&(i=1),t._depth[e][r]=i}}},ip.prototype.getDelta=function(t){return this._depth[t][Ih.RIGHT]-this._depth[t][Ih.LEFT]},ip.prototype.getLocation=function(t,e){return this._depth[t][e]<=0?pc.EXTERIOR:pc.INTERIOR},ip.prototype.toString=function(){return"A: "+this._depth[0][1]+","+this._depth[0][2]+" B: "+this._depth[1][1]+","+this._depth[1][2]},ip.prototype.add=function(){var t=this;if(1===arguments.length)for(var e=arguments[0],n=0;n<2;n++)for(var r=1;r<3;r++){var i=e.getLocation(n,r);i!==pc.EXTERIOR&&i!==pc.INTERIOR||(t.isNull(n,r)?t._depth[n][r]=ip.depthAtLocation(i):t._depth[n][r]+=ip.depthAtLocation(i))}else if(3===arguments.length){var o=arguments[0],s=arguments[1],a=arguments[2];a===pc.INTERIOR&&this._depth[o][s]++}},ip.prototype.interfaces_=function(){return[]},ip.prototype.getClass=function(){return ip},ip.depthAtLocation=function(t){return t===pc.EXTERIOR?0:t===pc.INTERIOR?1:ip.NULL_VALUE},op.NULL_VALUE.get=function(){return-1},Object.defineProperties(ip,op);var sp=function(t){function e(){if(t.call(this),this.pts=null,this._env=null,this.eiList=new ep(this),this._name=null,this._mce=null,this._isIsolated=!0,this._depth=new ip,this._depthDelta=0,1===arguments.length){var n=arguments[0];e.call(this,n,null)}else if(2===arguments.length){var r=arguments[0],i=arguments[1];this.pts=r,this._label=i}}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getDepth=function(){return this._depth},e.prototype.getCollapsedEdge=function(){var t=new Array(2).fill(null);return t[0]=this.pts[0],t[1]=this.pts[1],new e(t,jh.toLineLabel(this._label))},e.prototype.isIsolated=function(){return this._isIsolated},e.prototype.getCoordinates=function(){return this.pts},e.prototype.setIsolated=function(t){this._isIsolated=t},e.prototype.setName=function(t){this._name=t},e.prototype.equals=function(t){if(!(t instanceof e))return!1;var n=t;if(this.pts.length!==n.pts.length)return!1;for(var r=!0,i=!0,o=this.pts.length,s=0;s0?this.pts[0]:null;if(1===arguments.length){var t=arguments[0];return this.pts[t]}},e.prototype.print=function(t){t.print("edge "+this._name+": "),t.print("LINESTRING (");for(var e=0;e0&&t.print(","),t.print(this.pts[e].x+" "+this.pts[e].y);t.print(") "+this._label+" "+this._depthDelta)},e.prototype.computeIM=function(t){e.updateIM(this._label,t)},e.prototype.isCollapsed=function(){return!!this._label.isArea()&&3===this.pts.length&&!!this.pts[0].equals(this.pts[2])},e.prototype.isClosed=function(){return this.pts[0].equals(this.pts[this.pts.length-1])},e.prototype.getMaximumSegmentIndex=function(){return this.pts.length-1},e.prototype.getDepthDelta=function(){return this._depthDelta},e.prototype.getNumPoints=function(){return this.pts.length},e.prototype.printReverse=function(t){t.print("edge "+this._name+": ");for(var e=this.pts.length-1;e>=0;e--)t.print(this.pts[e]+" ");t.println("")},e.prototype.getMonotoneChainEdge=function(){return null===this._mce&&(this._mce=new rp(this)),this._mce},e.prototype.getEnvelope=function(){if(null===this._env){this._env=new Lc;for(var t=0;t0&&t.append(","),t.append(this.pts[e].x+" "+this.pts[e].y);return t.append(") "+this._label+" "+this._depthDelta),t.toString()},e.prototype.isPointwiseEqual=function(t){if(this.pts.length!==t.pts.length)return!1;for(var e=0;er||this._maxyo;if(s)return!1;var a=this.intersectsToleranceSquare(t,e);return Bc.isTrue(!(s&&a),"Found bad envelope test"),a},hp.prototype.initCorners=function(t){var e=.5;this._minx=t.x-e,this._maxx=t.x+e,this._miny=t.y-e,this._maxy=t.y+e,this._corner[0]=new cc(this._maxx,this._maxy),this._corner[1]=new cc(this._minx,this._maxy),this._corner[2]=new cc(this._minx,this._miny),this._corner[3]=new cc(this._maxx,this._miny)},hp.prototype.intersects=function(t,e){return 1===this._scaleFactor?this.intersectsScaled(t,e):(this.copyScaled(t,this._p0Scaled),this.copyScaled(e,this._p1Scaled),this.intersectsScaled(this._p0Scaled,this._p1Scaled))},hp.prototype.scale=function(t){return Math.round(t*this._scaleFactor)},hp.prototype.getCoordinate=function(){return this._originalPt},hp.prototype.copyScaled=function(t,e){e.x=this.scale(t.x),e.y=this.scale(t.y)},hp.prototype.getSafeEnvelope=function(){if(null===this._safeEnv){var t=hp.SAFE_ENV_EXPANSION_FACTOR/this._scaleFactor;this._safeEnv=new Lc(this._originalPt.x-t,this._originalPt.x+t,this._originalPt.y-t,this._originalPt.y+t)}return this._safeEnv},hp.prototype.intersectsPixelClosure=function(t,e){return this._li.computeIntersection(t,e,this._corner[0],this._corner[1]),!!this._li.hasIntersection()||(this._li.computeIntersection(t,e,this._corner[1],this._corner[2]),!!this._li.hasIntersection()||(this._li.computeIntersection(t,e,this._corner[2],this._corner[3]),!!this._li.hasIntersection()||(this._li.computeIntersection(t,e,this._corner[3],this._corner[0]),!!this._li.hasIntersection())))},hp.prototype.intersectsToleranceSquare=function(t,e){var n=!1,r=!1;return this._li.computeIntersection(t,e,this._corner[0],this._corner[1]),!!this._li.isProper()||(this._li.computeIntersection(t,e,this._corner[1],this._corner[2]),!!this._li.isProper()||(this._li.hasIntersection()&&(n=!0),this._li.computeIntersection(t,e,this._corner[2],this._corner[3]),!!this._li.isProper()||(this._li.hasIntersection()&&(r=!0),this._li.computeIntersection(t,e,this._corner[3],this._corner[0]),!!this._li.isProper()||!(!n||!r)||!!t.equals(this._pt)||!!e.equals(this._pt))))},hp.prototype.addSnappedNode=function(t,e){var n=t.getCoordinate(e),r=t.getCoordinate(e+1);return!!this.intersects(n,r)&&(t.addIntersection(this.getCoordinate(),e),!0)},hp.prototype.interfaces_=function(){return[]},hp.prototype.getClass=function(){return hp},fp.SAFE_ENV_EXPANSION_FACTOR.get=function(){return.75},Object.defineProperties(hp,fp);var pp=function(){this.tempEnv1=new Lc,this.selectedSegment=new mf};pp.prototype.select=function(){if(1===arguments.length);else if(2===arguments.length){var t=arguments[0],e=arguments[1];t.getLineSegment(e,this.selectedSegment),this.select(this.selectedSegment)}},pp.prototype.interfaces_=function(){return[]},pp.prototype.getClass=function(){return pp};var dp=function(){this._index=null;var t=arguments[0];this._index=t},gp={HotPixelSnapAction:{configurable:!0}};dp.prototype.snap=function(){if(1===arguments.length){var t=arguments[0];return this.snap(t,null,-1)}if(3===arguments.length){var e=arguments[0],n=arguments[1],r=arguments[2],i=e.getSafeEnvelope(),o=new yp(e,n,r);return this._index.query(i,{interfaces_:function(){return[$h]},visitItem:function(t){t.select(i,o)}}),o.isNodeAdded()}},dp.prototype.interfaces_=function(){return[]},dp.prototype.getClass=function(){return dp},gp.HotPixelSnapAction.get=function(){return yp},Object.defineProperties(dp,gp);var yp=function(t){function e(){t.call(this),this._hotPixel=null,this._parentEdge=null,this._hotPixelVertexIndex=null,this._isNodeAdded=!1;var e=arguments[0],n=arguments[1],r=arguments[2];this._hotPixel=e,this._parentEdge=n,this._hotPixelVertexIndex=r}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.isNodeAdded=function(){return this._isNodeAdded},e.prototype.select=function(){if(2!==arguments.length)return t.prototype.select.apply(this,arguments);var e=arguments[0],n=arguments[1],r=e.getContext();if(null!==this._parentEdge&&r===this._parentEdge&&n===this._hotPixelVertexIndex)return null;this._isNodeAdded=this._hotPixel.addSnappedNode(r,n)},e.prototype.interfaces_=function(){return[]},e.prototype.getClass=function(){return e},e}(pp),vp=function(){this._li=null,this._interiorIntersections=null;var t=arguments[0];this._li=t,this._interiorIntersections=new ll};vp.prototype.processIntersections=function(t,e,n,r){if(t===n&&e===r)return null;var i=t.getCoordinates()[e],o=t.getCoordinates()[e+1],s=n.getCoordinates()[r],a=n.getCoordinates()[r+1];if(this._li.computeIntersection(i,o,s,a),this._li.hasIntersection()&&this._li.isInteriorIntersection()){for(var u=0;u=0;e--){try{t.bufferReducedPrecision(e)}catch(e){if(!(e instanceof Mh))throw e;t._saveException=e}if(null!==t._resultGeometry)return null}throw this._saveException}if(1===arguments.length){var n=arguments[0],r=mp.precisionScaleFactor(this._argGeom,this._distance,n),i=new gh(r);this.bufferFixedPrecision(i)}},mp.prototype.computeGeometry=function(){if(this.bufferOriginalPrecision(),null!==this._resultGeometry)return null;var t=this._argGeom.getFactory().getPrecisionModel();t.getType()===gh.FIXED?this.bufferFixedPrecision(t):this.bufferReducedPrecision()},mp.prototype.setQuadrantSegments=function(t){this._bufParams.setQuadrantSegments(t)},mp.prototype.bufferOriginalPrecision=function(){try{var t=new ap(this._bufParams);this._resultGeometry=t.buffer(this._argGeom,this._distance)}catch(t){if(!(t instanceof kc))throw t;this._saveException=t}},mp.prototype.getResultGeometry=function(t){return this._distance=t,this.computeGeometry(),this._resultGeometry},mp.prototype.setEndCapStyle=function(t){this._bufParams.setEndCapStyle(t)},mp.prototype.interfaces_=function(){return[]},mp.prototype.getClass=function(){return mp},mp.bufferOp=function(){if(2===arguments.length){var t=arguments[0],e=arguments[1],n=new mp(t),r=n.getResultGeometry(e);return r}if(3===arguments.length){if(Number.isInteger(arguments[2])&&arguments[0]instanceof Zc&&"number"==typeof arguments[1]){var i=arguments[0],o=arguments[1],s=arguments[2],a=new mp(i);a.setQuadrantSegments(s);var u=a.getResultGeometry(o);return u}if(arguments[2]instanceof Pf&&arguments[0]instanceof Zc&&"number"==typeof arguments[1]){var c=arguments[0],l=arguments[1],h=arguments[2],f=new mp(c,h),p=f.getResultGeometry(l);return p}}else if(4===arguments.length){var d=arguments[0],g=arguments[1],y=arguments[2],v=arguments[3],_=new mp(d);_.setQuadrantSegments(y),_.setEndCapStyle(v);var m=_.getResultGeometry(g);return m}},mp.precisionScaleFactor=function(t,e,n){var r=t.getEnvelopeInternal(),i=yc.max(Math.abs(r.getMaxX()),Math.abs(r.getMaxY()),Math.abs(r.getMinX()),Math.abs(r.getMinY()))+2*(e>0?e:0),o=n-Math.trunc(Math.log(i)/Math.log(10)+1);return Math.pow(10,o)},bp.CAP_ROUND.get=function(){return Pf.CAP_ROUND},bp.CAP_BUTT.get=function(){return Pf.CAP_FLAT},bp.CAP_FLAT.get=function(){return Pf.CAP_FLAT},bp.CAP_SQUARE.get=function(){return Pf.CAP_SQUARE},bp.MAX_PRECISION_DIGITS.get=function(){return 12},Object.defineProperties(mp,bp);var Ep=function(){this._pt=[new cc,new cc],this._distance=rc.NaN,this._isNull=!0};Ep.prototype.getCoordinates=function(){return this._pt},Ep.prototype.getCoordinate=function(t){return this._pt[t]},Ep.prototype.setMinimum=function(){if(1===arguments.length){var t=arguments[0];this.setMinimum(t._pt[0],t._pt[1])}else if(2===arguments.length){var e=arguments[0],n=arguments[1];if(this._isNull)return this.initialize(e,n),null;var r=e.distance(n);rthis._distance&&this.initialize(e,n,r)}},Ep.prototype.interfaces_=function(){return[]},Ep.prototype.getClass=function(){return Ep};var wp=function(){};wp.prototype.interfaces_=function(){return[]},wp.prototype.getClass=function(){return wp},wp.computeDistance=function(){if(arguments[2]instanceof Ep&&arguments[0]instanceof Jl&&arguments[1]instanceof cc)for(var t=arguments[0],e=arguments[1],n=arguments[2],r=t.getCoordinates(),i=new mf,o=0;o0||this._isIn?pc.INTERIOR:pc.EXTERIOR)},Rp.prototype.interfaces_=function(){return[]},Rp.prototype.getClass=function(){return Rp};var Tp=function t(){if(this._component=null,this._segIndex=null,this._pt=null,2===arguments.length){var e=arguments[0],n=arguments[1];t.call(this,e,t.INSIDE_AREA,n)}else if(3===arguments.length){var r=arguments[0],i=arguments[1],o=arguments[2];this._component=r,this._segIndex=i,this._pt=o}},Lp={INSIDE_AREA:{configurable:!0}};Tp.prototype.isInsideArea=function(){return this._segIndex===Tp.INSIDE_AREA},Tp.prototype.getCoordinate=function(){return this._pt},Tp.prototype.getGeometryComponent=function(){return this._component},Tp.prototype.getSegmentIndex=function(){return this._segIndex},Tp.prototype.interfaces_=function(){return[]},Tp.prototype.getClass=function(){return Tp},Lp.INSIDE_AREA.get=function(){return-1},Object.defineProperties(Tp,Lp);var Mp=function(t){this._pts=t||null};Mp.prototype.filter=function(t){t instanceof $l&&this._pts.add(t)},Mp.prototype.interfaces_=function(){return[jl]},Mp.prototype.getClass=function(){return Mp},Mp.getPoints=function(){if(1===arguments.length){var t=arguments[0];return t instanceof $l?rf.singletonList(t):Mp.getPoints(t,new ll)}if(2===arguments.length){var e=arguments[0],n=arguments[1];return e instanceof $l?n.add(e):e instanceof kl&&e.apply(new Mp(n)),n}};var Np=function(){this._locations=null;var t=arguments[0];this._locations=t};Np.prototype.filter=function(t){(t instanceof $l||t instanceof Jl||t instanceof eh)&&this._locations.add(new Tp(t,0,t.getCoordinate()))},Np.prototype.interfaces_=function(){return[jl]},Np.prototype.getClass=function(){return Np},Np.getLocations=function(t){var e=new ll;return t.apply(new Np(e)),e};var Ap=function(){if(this._geom=null,this._terminateDistance=0,this._ptLocator=new Rp,this._minDistanceLocation=null,this._minDistance=rc.MAX_VALUE,2===arguments.length){var t=arguments[0],e=arguments[1];this._geom=[t,e],this._terminateDistance=0}else if(3===arguments.length){var n=arguments[0],r=arguments[1],i=arguments[2];this._geom=new Array(2).fill(null),this._geom[0]=n,this._geom[1]=r,this._terminateDistance=i}};Ap.prototype.computeContainmentDistance=function(){var t=this;if(0===arguments.length){var e=new Array(2).fill(null);if(this.computeContainmentDistance(0,e),this._minDistance<=this._terminateDistance)return null;this.computeContainmentDistance(1,e)}else if(2===arguments.length){var n=arguments[0],r=arguments[1],i=1-n,o=Ip.getPolygons(this._geom[n]);if(o.size()>0){var s=Np.getLocations(this._geom[i]);if(this.computeContainmentDistance(s,o,r),this._minDistance<=this._terminateDistance)return this._minDistanceLocation[i]=r[0],this._minDistanceLocation[n]=r[1],null}}else if(3===arguments.length)if(arguments[2]instanceof Array&&gc(arguments[0],ul)&&gc(arguments[1],ul)){for(var a=arguments[0],u=arguments[1],c=arguments[2],l=0;lthis._minDistance)return null;for(var i=e.getCoordinates(),o=n.getCoordinate(),s=0;sthis._minDistance)return null;for(var p=l.getCoordinates(),d=h.getCoordinates(),g=0;gthis._distance&&this.initialize(e,n,r)}},Fp.prototype.interfaces_=function(){return[]},Fp.prototype.getClass=function(){return Fp};var jp=function(){};jp.prototype.interfaces_=function(){return[]},jp.prototype.getClass=function(){return jp},jp.computeDistance=function(){if(arguments[2]instanceof Fp&&arguments[0]instanceof Jl&&arguments[1]instanceof cc)for(var t=arguments[0],e=arguments[1],n=arguments[2],r=new mf,i=t.getCoordinates(),o=0;o1||t<=0)throw new nc("Fraction is not in range (0.0 - 1.0]");this._densifyFrac=t},Dp.prototype.compute=function(t,e){this.computeOrientedDistance(t,e,this._ptDist),this.computeOrientedDistance(e,t,this._ptDist)},Dp.prototype.distance=function(){return this.compute(this._g0,this._g1),this._ptDist.getDistance()},Dp.prototype.computeOrientedDistance=function(t,e,n){var r=new Gp(e);if(t.apply(r),n.setMaximum(r.getMaxPointDistance()),this._densifyFrac>0){var i=new Bp(e,this._densifyFrac);t.apply(i),n.setMaximum(i.getMaxPointDistance())}},Dp.prototype.orientedDistance=function(){return this.computeOrientedDistance(this._g0,this._g1,this._ptDist),this._ptDist.getDistance()},Dp.prototype.interfaces_=function(){return[]},Dp.prototype.getClass=function(){return Dp},Dp.distance=function(){if(2===arguments.length){var t=arguments[0],e=arguments[1],n=new Dp(t,e);return n.distance()}if(3===arguments.length){var r=arguments[0],i=arguments[1],o=arguments[2],s=new Dp(r,i);return s.setDensifyFraction(o),s.distance()}},kp.MaxPointDistanceFilter.get=function(){return Gp},kp.MaxDensifiedByFractionDistanceFilter.get=function(){return Bp},Object.defineProperties(Dp,kp);var Gp=function(){this._maxPtDist=new Fp,this._minPtDist=new Fp,this._euclideanDist=new jp,this._geom=null;var t=arguments[0];this._geom=t};Gp.prototype.filter=function(t){this._minPtDist.initialize(),jp.computeDistance(this._geom,t,this._minPtDist),this._maxPtDist.setMaximum(this._minPtDist)},Gp.prototype.getMaxPointDistance=function(){return this._maxPtDist},Gp.prototype.interfaces_=function(){return[Qc]},Gp.prototype.getClass=function(){return Gp};var Bp=function(){this._maxPtDist=new Fp,this._minPtDist=new Fp,this._geom=null,this._numSubSegs=0;var t=arguments[0],e=arguments[1];this._geom=t,this._numSubSegs=Math.trunc(Math.round(1/e))};Bp.prototype.filter=function(t,e){var n=this;if(0===e)return null;for(var r=t.getCoordinate(e-1),i=t.getCoordinate(e),o=(i.x-r.x)/this._numSubSegs,s=(i.y-r.y)/this._numSubSegs,a=0;an){this._isValid=!1;var i=r.getCoordinates();this._errorLocation=i[1],this._errorIndicator=t.getFactory().createLineString(i),this._errMsg="Distance between buffer curve and input is too large ("+this._maxDistanceFound+" at "+Dc.toLineString(i[0],i[1])+")"}},Up.prototype.isValid=function(){var t=Math.abs(this._bufDistance),e=Up.MAX_DISTANCE_DIFF_FRAC*t;return this._minValidDistance=t-e,this._maxValidDistance=t+e,!(!this._input.isEmpty()&&!this._result.isEmpty())||(this._bufDistance>0?this.checkPositiveValid():this.checkNegativeValid(),Up.VERBOSE&&Rc.out.println("Min Dist= "+this._minDistanceFound+" err= "+(1-this._minDistanceFound/this._bufDistance)+" Max Dist= "+this._maxDistanceFound+" err= "+(this._maxDistanceFound/this._bufDistance-1)),this._isValid)},Up.prototype.checkNegativeValid=function(){if(!(this._input instanceof eh||this._input instanceof ih||this._input instanceof kl))return null;var t=this.getPolygonLines(this._input);if(this.checkMinimumDistance(t,this._result,this._minValidDistance),!this._isValid)return null;this.checkMaximumDistance(t,this._result,this._maxValidDistance)},Up.prototype.getErrorIndicator=function(){return this._errorIndicator},Up.prototype.checkMinimumDistance=function(t,e,n){var r=new Ap(t,e,n);if(this._minDistanceFound=r.distance(),this._minDistanceFound0&&t>e&&(this._isValid=!1,this._errorMsg="Area of positive buffer is smaller than input",this._errorIndicator=this._result),this._distance<0&&t=2||this._distance>0?null:(this._result.isEmpty()||(this._isValid=!1,this._errorMsg="Result is non-empty",this._errorIndicator=this._result),void this.report("ExpectedEmpty"))},Yp.prototype.report=function(t){if(!Yp.VERBOSE)return null;Rc.out.println("Check "+t+": "+(this._isValid?"passed":"FAILED"))},Yp.prototype.getErrorMessage=function(){return this._errorMsg},Yp.prototype.interfaces_=function(){return[]},Yp.prototype.getClass=function(){return Yp},Yp.isValidMsg=function(t,e,n){var r=new Yp(t,e,n);return r.isValid()?null:r.getErrorMessage()},Yp.isValid=function(t,e,n){return!!new Yp(t,e,n).isValid()},Xp.VERBOSE.get=function(){return!1},Xp.MAX_ENV_DIFF_FRAC.get=function(){return.012},Object.defineProperties(Yp,Xp);var Vp=function(){this._pts=null,this._data=null;var t=arguments[0],e=arguments[1];this._pts=t,this._data=e};Vp.prototype.getCoordinates=function(){return this._pts},Vp.prototype.size=function(){return this._pts.length},Vp.prototype.getCoordinate=function(t){return this._pts[t]},Vp.prototype.isClosed=function(){return this._pts[0].equals(this._pts[this._pts.length-1])},Vp.prototype.getSegmentOctant=function(t){return t===this._pts.length-1?-1:gf.octant(this.getCoordinate(t),this.getCoordinate(t+1))},Vp.prototype.setData=function(t){this._data=t},Vp.prototype.getData=function(){return this._data},Vp.prototype.toString=function(){return Dc.toLineString(new lh(this._pts))},Vp.prototype.interfaces_=function(){return[yf]},Vp.prototype.getClass=function(){return Vp};var qp=function(){this._findAllIntersections=!1,this._isCheckEndSegmentsOnly=!1,this._li=null,this._interiorIntersection=null,this._intSegments=null,this._intersections=new ll,this._intersectionCount=0,this._keepIntersections=!0;var t=arguments[0];this._li=t,this._interiorIntersection=null};qp.prototype.getInteriorIntersection=function(){return this._interiorIntersection},qp.prototype.setCheckEndSegmentsOnly=function(t){this._isCheckEndSegmentsOnly=t},qp.prototype.getIntersectionSegments=function(){return this._intSegments},qp.prototype.count=function(){return this._intersectionCount},qp.prototype.getIntersections=function(){return this._intersections},qp.prototype.setFindAllIntersections=function(t){this._findAllIntersections=t},qp.prototype.setKeepIntersections=function(t){this._keepIntersections=t},qp.prototype.processIntersections=function(t,e,n,r){if(!this._findAllIntersections&&this.hasIntersection())return null;if(t===n&&e===r)return null;if(this._isCheckEndSegmentsOnly&&!this.isEndSegment(t,e)&&!this.isEndSegment(n,r))return null;var i=t.getCoordinates()[e],o=t.getCoordinates()[e+1],s=n.getCoordinates()[r],a=n.getCoordinates()[r+1];this._li.computeIntersection(i,o,s,a),this._li.hasIntersection()&&this._li.isInteriorIntersection()&&(this._intSegments=new Array(4).fill(null),this._intSegments[0]=i,this._intSegments[1]=o,this._intSegments[2]=s,this._intSegments[3]=a,this._interiorIntersection=this._li.getIntersection(0),this._keepIntersections&&this._intersections.add(this._interiorIntersection),this._intersectionCount++)},qp.prototype.isEndSegment=function(t,e){return 0===e||e>=t.size()-2},qp.prototype.hasIntersection=function(){return null!==this._interiorIntersection},qp.prototype.isDone=function(){return!this._findAllIntersections&&null!==this._interiorIntersection},qp.prototype.interfaces_=function(){return[Qf]},qp.prototype.getClass=function(){return qp},qp.createAllIntersectionsFinder=function(t){var e=new qp(t);return e.setFindAllIntersections(!0),e},qp.createAnyIntersectionFinder=function(t){return new qp(t)},qp.createIntersectionCounter=function(t){var e=new qp(t);return e.setFindAllIntersections(!0),e.setKeepIntersections(!1),e};var Wp=function(){this._li=new Yc,this._segStrings=null,this._findAllIntersections=!1,this._segInt=null,this._isValid=!0;var t=arguments[0];this._segStrings=t};Wp.prototype.execute=function(){if(null!==this._segInt)return null;this.checkInteriorIntersections()},Wp.prototype.getIntersections=function(){return this._segInt.getIntersections()},Wp.prototype.isValid=function(){return this.execute(),this._isValid},Wp.prototype.setFindAllIntersections=function(t){this._findAllIntersections=t},Wp.prototype.checkInteriorIntersections=function(){this._isValid=!0,this._segInt=new qp(this._li),this._segInt.setFindAllIntersections(this._findAllIntersections);var t=new Cf;if(t.setSegmentIntersector(this._segInt),t.computeNodes(this._segStrings),this._segInt.hasIntersection())return this._isValid=!1,null},Wp.prototype.checkValid=function(){if(this.execute(),!this._isValid)throw new Mh(this.getErrorMessage(),this._segInt.getInteriorIntersection())},Wp.prototype.getErrorMessage=function(){if(this._isValid)return"no intersections found";var t=this._segInt.getIntersectionSegments();return"found non-noded intersection between "+Dc.toLineString(t[0],t[1])+" and "+Dc.toLineString(t[2],t[3])},Wp.prototype.interfaces_=function(){return[]},Wp.prototype.getClass=function(){return Wp},Wp.computeIntersections=function(t){var e=new Wp(t);return e.setFindAllIntersections(!0),e.isValid(),e.getIntersections()};var Hp=function t(){this._nv=null;var e=arguments[0];this._nv=new Wp(t.toSegmentStrings(e))};Hp.prototype.checkValid=function(){this._nv.checkValid()},Hp.prototype.interfaces_=function(){return[]},Hp.prototype.getClass=function(){return Hp},Hp.toSegmentStrings=function(t){for(var e=new ll,n=t.iterator();n.hasNext();){var r=n.next();e.add(new Vp(r.getCoordinates(),r))}return e},Hp.checkValid=function(t){new Hp(t).checkValid()};var Zp=function(t){this._mapOp=t};Zp.prototype.map=function(t){for(var e=new ll,n=0;n0&&r<4&&!this._preserveType?this._factory.createLineString(n):this._factory.createLinearRing(n)},Qp.prototype.interfaces_=function(){return[]},Qp.prototype.getClass=function(){return Qp};var $p=function t(){if(this._snapTolerance=0,this._srcPts=null,this._seg=new mf,this._allowSnappingToSourceVertices=!1,this._isClosed=!1,arguments[0]instanceof Jl&&"number"==typeof arguments[1]){var e=arguments[0],n=arguments[1];t.call(this,e.getCoordinates(),n)}else if(arguments[0]instanceof Array&&"number"==typeof arguments[1]){var r=arguments[0],i=arguments[1];this._srcPts=r,this._isClosed=t.isClosed(r),this._snapTolerance=i}};$p.prototype.snapVertices=function(t,e){for(var n=this._isClosed?t.size()-1:t.size(),r=0;r=0&&t.add(o+1,new cc(i),!1)}},$p.prototype.findSegmentIndexToSnap=function(t,e){for(var n=this,r=rc.MAX_VALUE,i=-1,o=0;oe&&(e=r)}return e}if(2===arguments.length){var i=arguments[0],o=arguments[1];return Math.min(td.computeOverlaySnapTolerance(i),td.computeOverlaySnapTolerance(o))}},td.computeSizeBasedSnapTolerance=function(t){var e=t.getEnvelopeInternal();return Math.min(e.getHeight(),e.getWidth())*td.SNAP_PRECISION_FACTOR},td.snapToSelf=function(t,e,n){return new td(t).snapToSelf(e,n)},ed.SNAP_PRECISION_FACTOR.get=function(){return 1e-9},Object.defineProperties(td,ed);var nd=function(t){function e(e,n,r){t.call(this),this._snapTolerance=e||null,this._snapPts=n||null,this._isSelfSnap=void 0!==r&&r}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.snapLine=function(t,e){var n=new $p(t,this._snapTolerance);return n.setAllowSnappingToSourceVertices(this._isSelfSnap),n.snapTo(e)},e.prototype.transformCoordinates=function(t,e){var n=t.toCoordinateArray(),r=this.snapLine(n,this._snapPts);return this._factory.getCoordinateSequenceFactory().create(r)},e.prototype.interfaces_=function(){return[]},e.prototype.getClass=function(){return e},e}(Qp),rd=function(){this._isFirst=!0,this._commonMantissaBitsCount=53,this._commonBits=0,this._commonSignExp=null};rd.prototype.getCommon=function(){return rc.longBitsToDouble(this._commonBits)},rd.prototype.add=function(t){var e=rc.doubleToLongBits(t);return this._isFirst?(this._commonBits=e,this._commonSignExp=rd.signExpBits(this._commonBits),this._isFirst=!1,null):rd.signExpBits(e)!==this._commonSignExp?(this._commonBits=0,null):(this._commonMantissaBitsCount=rd.numCommonMostSigMantissaBits(this._commonBits,e),void(this._commonBits=rd.zeroLowerBits(this._commonBits,64-(12+this._commonMantissaBitsCount))))},rd.prototype.toString=function(){if(1===arguments.length){var t=arguments[0],e=rc.longBitsToDouble(t),n=rc.toBinaryString(t),r="0000000000000000000000000000000000000000000000000000000000000000"+n,i=r.substring(r.length-64),o=i.substring(0,1)+" "+i.substring(1,12)+"(exp) "+i.substring(12)+" [ "+e+" ]";return o}},rd.prototype.interfaces_=function(){return[]},rd.prototype.getClass=function(){return rd},rd.getBit=function(t,e){return 0!=(t&1<>52},rd.zeroLowerBits=function(t,e){return t&~((1<=0;r--){if(rd.getBit(t,r)!==rd.getBit(e,r))return n;n++}return 52};var id=function(){this._commonCoord=null,this._ccFilter=new sd},od={CommonCoordinateFilter:{configurable:!0},Translater:{configurable:!0}};id.prototype.addCommonBits=function(t){var e=new ad(this._commonCoord);t.apply(e),t.geometryChanged()},id.prototype.removeCommonBits=function(t){if(0===this._commonCoord.x&&0===this._commonCoord.y)return t;var e=new cc(this._commonCoord);e.x=-e.x,e.y=-e.y;var n=new ad(e);return t.apply(n),t.geometryChanged(),t},id.prototype.getCommonCoordinate=function(){return this._commonCoord},id.prototype.add=function(t){t.apply(this._ccFilter),this._commonCoord=this._ccFilter.getCommonCoordinate()},id.prototype.interfaces_=function(){return[]},id.prototype.getClass=function(){return id},od.CommonCoordinateFilter.get=function(){return sd},od.Translater.get=function(){return ad},Object.defineProperties(id,od);var sd=function(){this._commonBitsX=new rd,this._commonBitsY=new rd};sd.prototype.filter=function(t){this._commonBitsX.add(t.x),this._commonBitsY.add(t.y)},sd.prototype.getCommonCoordinate=function(){return new cc(this._commonBitsX.getCommon(),this._commonBitsY.getCommon())},sd.prototype.interfaces_=function(){return[Qc]},sd.prototype.getClass=function(){return sd};var ad=function(){this.trans=null;var t=arguments[0];this.trans=t};ad.prototype.filter=function(t,e){var n=t.getOrdinate(e,0)+this.trans.x,r=t.getOrdinate(e,1)+this.trans.y;t.setOrdinate(e,0,n),t.setOrdinate(e,1,r)},ad.prototype.isDone=function(){return!1},ad.prototype.isGeometryChanged=function(){return!0},ad.prototype.interfaces_=function(){return[Dl]},ad.prototype.getClass=function(){return ad};var ud=function(t,e){this._geom=new Array(2).fill(null),this._snapTolerance=null,this._cbr=null,this._geom[0]=t,this._geom[1]=e,this.computeSnapTolerance()};ud.prototype.selfSnap=function(t){return new td(t).snapTo(t,this._snapTolerance)},ud.prototype.removeCommonBits=function(t){this._cbr=new id,this._cbr.add(t[0]),this._cbr.add(t[1]);var e=new Array(2).fill(null);return e[0]=this._cbr.removeCommonBits(t[0].copy()),e[1]=this._cbr.removeCommonBits(t[1].copy()),e},ud.prototype.prepareResult=function(t){return this._cbr.addCommonBits(t),t},ud.prototype.getResultGeometry=function(t){var e=this.snap(this._geom),n=Td.overlayOp(e[0],e[1],t);return this.prepareResult(n)},ud.prototype.checkValid=function(t){t.isValid()||Rc.out.println("Snapped geometry is invalid")},ud.prototype.computeSnapTolerance=function(){this._snapTolerance=td.computeOverlaySnapTolerance(this._geom[0],this._geom[1])},ud.prototype.snap=function(t){var e=this.removeCommonBits(t);return td.snap(e[0],e[1],this._snapTolerance)},ud.prototype.interfaces_=function(){return[]},ud.prototype.getClass=function(){return ud},ud.overlayOp=function(t,e,n){return new ud(t,e).getResultGeometry(n)},ud.union=function(t,e){return ud.overlayOp(t,e,Td.UNION)},ud.intersection=function(t,e){return ud.overlayOp(t,e,Td.INTERSECTION)},ud.symDifference=function(t,e){return ud.overlayOp(t,e,Td.SYMDIFFERENCE)},ud.difference=function(t,e){return ud.overlayOp(t,e,Td.DIFFERENCE)};var cd=function(t,e){this._geom=new Array(2).fill(null),this._geom[0]=t,this._geom[1]=e};cd.prototype.getResultGeometry=function(t){var e=null,n=!1,r=null;try{e=Td.overlayOp(this._geom[0],this._geom[1],t),n=!0}catch(t){if(!(t instanceof kc))throw t;r=t}if(!n)try{e=ud.overlayOp(this._geom[0],this._geom[1],t)}catch(t){throw t instanceof kc?r:t}return e},cd.prototype.interfaces_=function(){return[]},cd.prototype.getClass=function(){return cd},cd.overlayOp=function(t,e,n){return new cd(t,e).getResultGeometry(n)},cd.union=function(t,e){return cd.overlayOp(t,e,Td.UNION)},cd.intersection=function(t,e){return cd.overlayOp(t,e,Td.INTERSECTION)},cd.symDifference=function(t,e){return cd.overlayOp(t,e,Td.SYMDIFFERENCE)},cd.difference=function(t,e){return cd.overlayOp(t,e,Td.DIFFERENCE)};var ld=function(){this.mce=null,this.chainIndex=null;var t=arguments[0],e=arguments[1];this.mce=t,this.chainIndex=e};ld.prototype.computeIntersections=function(t,e){this.mce.computeIntersectsForChain(this.chainIndex,t.mce,t.chainIndex,e)},ld.prototype.interfaces_=function(){return[]},ld.prototype.getClass=function(){return ld};var hd=function t(){if(this._label=null,this._xValue=null,this._eventType=null,this._insertEvent=null,this._deleteEventIndex=null,this._obj=null,2===arguments.length){var e=arguments[0],n=arguments[1];this._eventType=t.DELETE,this._xValue=e,this._insertEvent=n}else if(3===arguments.length){var r=arguments[0],i=arguments[1],o=arguments[2];this._eventType=t.INSERT,this._label=r,this._xValue=i,this._obj=o}},fd={INSERT:{configurable:!0},DELETE:{configurable:!0}};hd.prototype.isDelete=function(){return this._eventType===hd.DELETE},hd.prototype.setDeleteEventIndex=function(t){this._deleteEventIndex=t},hd.prototype.getObject=function(){return this._obj},hd.prototype.compareTo=function(t){var e=t;return this._xValuee._xValue?1:this._eventTypee._eventType?1:0},hd.prototype.getInsertEvent=function(){return this._insertEvent},hd.prototype.isInsert=function(){return this._eventType===hd.INSERT},hd.prototype.isSameLabel=function(t){return null!==this._label&&this._label===t._label},hd.prototype.getDeleteEventIndex=function(){return this._deleteEventIndex},hd.prototype.interfaces_=function(){return[oc]},hd.prototype.getClass=function(){return hd},fd.INSERT.get=function(){return 1},fd.DELETE.get=function(){return 2},Object.defineProperties(hd,fd);var pd=function(){};pd.prototype.interfaces_=function(){return[]},pd.prototype.getClass=function(){return pd};var dd=function(){this._hasIntersection=!1,this._hasProper=!1,this._hasProperInterior=!1,this._properIntersectionPoint=null,this._li=null,this._includeProper=null,this._recordIsolated=null,this._isSelfIntersection=null,this._numIntersections=0,this.numTests=0,this._bdyNodes=null,this._isDone=!1,this._isDoneWhenProperInt=!1;var t=arguments[0],e=arguments[1],n=arguments[2];this._li=t,this._includeProper=e,this._recordIsolated=n};dd.prototype.isTrivialIntersection=function(t,e,n,r){if(t===n&&1===this._li.getIntersectionNum()){if(dd.isAdjacentSegments(e,r))return!0;if(t.isClosed()){var i=t.getNumPoints()-1;if(0===e&&r===i||0===r&&e===i)return!0}}return!1},dd.prototype.getProperIntersectionPoint=function(){return this._properIntersectionPoint},dd.prototype.setIsDoneIfProperInt=function(t){this._isDoneWhenProperInt=t},dd.prototype.hasProperInteriorIntersection=function(){return this._hasProperInterior},dd.prototype.isBoundaryPointInternal=function(t,e){for(var n=e.iterator();n.hasNext();){var r=n.next().getCoordinate();if(t.isIntersection(r))return!0}return!1},dd.prototype.hasProperIntersection=function(){return this._hasProper},dd.prototype.hasIntersection=function(){return this._hasIntersection},dd.prototype.isDone=function(){return this._isDone},dd.prototype.isBoundaryPoint=function(t,e){return null!==e&&(!!this.isBoundaryPointInternal(t,e[0])||!!this.isBoundaryPointInternal(t,e[1]))},dd.prototype.setBoundaryNodes=function(t,e){this._bdyNodes=new Array(2).fill(null),this._bdyNodes[0]=t,this._bdyNodes[1]=e},dd.prototype.addIntersections=function(t,e,n,r){if(t===n&&e===r)return null;this.numTests++;var i=t.getCoordinates()[e],o=t.getCoordinates()[e+1],s=n.getCoordinates()[r],a=n.getCoordinates()[r+1];this._li.computeIntersection(i,o,s,a),this._li.hasIntersection()&&(this._recordIsolated&&(t.setIsolated(!1),n.setIsolated(!1)),this._numIntersections++,this.isTrivialIntersection(t,e,n,r)||(this._hasIntersection=!0,!this._includeProper&&this._li.isProper()||(t.addIntersections(this._li,e,0),n.addIntersections(this._li,r,1)),this._li.isProper()&&(this._properIntersectionPoint=this._li.getIntersection(0).copy(),this._hasProper=!0,this._isDoneWhenProperInt&&(this._isDone=!0),this.isBoundaryPoint(this._li,this._bdyNodes)||(this._hasProperInterior=!0))))},dd.prototype.interfaces_=function(){return[]},dd.prototype.getClass=function(){return dd},dd.isAdjacentSegments=function(t,e){return 1===Math.abs(t-e)};var gd=function(t){function e(){t.call(this),this.events=new ll,this.nOverlaps=null}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.prepareEvents=function(){rf.sort(this.events);for(var t=0;te||this._maxo?1:0},_d.prototype.interfaces_=function(){return[ac]},_d.prototype.getClass=function(){return _d};var md=function(t){function e(){t.call(this),this._item=null;var e=arguments[0],n=arguments[1],r=arguments[2];this._min=e,this._max=n,this._item=r}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.query=function(t,e,n){if(!this.intersects(t,e))return null;n.visitItem(this._item)},e.prototype.interfaces_=function(){return[]},e.prototype.getClass=function(){return e},e}(yd),bd=function(t){function e(){t.call(this),this._node1=null,this._node2=null;var e=arguments[0],n=arguments[1];this._node1=e,this._node2=n,this.buildExtent(this._node1,this._node2)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.buildExtent=function(t,e){this._min=Math.min(t._min,e._min),this._max=Math.max(t._max,e._max)},e.prototype.query=function(t,e,n){if(!this.intersects(t,e))return null;null!==this._node1&&this._node1.query(t,e,n),null!==this._node2&&this._node2.query(t,e,n)},e.prototype.interfaces_=function(){return[]},e.prototype.getClass=function(){return e},e}(yd),Ed=function(){this._leaves=new ll,this._root=null,this._level=0};Ed.prototype.buildTree=function(){rf.sort(this._leaves,new yd.NodeComparator);for(var t=this._leaves,e=null,n=new ll;;){if(this.buildLevel(t,n),1===n.size())return n.get(0);e=t,t=n,n=e}},Ed.prototype.insert=function(t,e,n){if(null!==this._root)throw new Error("Index cannot be added to once it has been queried");this._leaves.add(new md(t,e,n))},Ed.prototype.query=function(t,e,n){this.init(),this._root.query(t,e,n)},Ed.prototype.buildRoot=function(){if(null!==this._root)return null;this._root=this.buildTree()},Ed.prototype.printNode=function(t){Rc.out.println(Dc.toLineString(new cc(t._min,this._level),new cc(t._max,this._level)))},Ed.prototype.init=function(){if(null!==this._root)return null;this.buildRoot()},Ed.prototype.buildLevel=function(t,e){this._level++,e.clear();for(var n=0;n=2,"found LineString with single point"),this.insertBoundaryPoint(this._argIndex,e[0]),this.insertBoundaryPoint(this._argIndex,e[e.length-1])},e.prototype.getInvalidPoint=function(){return this._invalidPoint},e.prototype.getBoundaryPoints=function(){for(var t=this.getBoundaryNodes(),e=new Array(t.size()).fill(null),n=0,r=t.iterator();r.hasNext();){var i=r.next();e[n++]=i.getCoordinate().copy()}return e},e.prototype.getBoundaryNodes=function(){return null===this._boundaryNodes&&(this._boundaryNodes=this._nodes.getBoundaryNodes(this._argIndex)),this._boundaryNodes},e.prototype.addSelfIntersectionNode=function(t,e,n){if(this.isBoundaryNode(t,e))return null;n===pc.BOUNDARY&&this._useBoundaryDeterminationRule?this.insertBoundaryPoint(t,e):this.insertPoint(t,e,n)},e.prototype.addPolygonRing=function(t,e,n){if(t.isEmpty())return null;var r=pl.removeRepeatedPoints(t.getCoordinates());if(r.length<4)return this._hasTooFewPoints=!0,this._invalidPoint=r[0],null;var i=e,o=n;qc.isCCW(r)&&(i=n,o=e);var s=new sp(r,new jh(this._argIndex,pc.BOUNDARY,i,o));this._lineEdgeMap.put(t,s),this.insertEdge(s),this.insertPoint(this._argIndex,r[0],pc.BOUNDARY)},e.prototype.insertPoint=function(t,e,n){var r=this._nodes.addNode(e),i=r.getLabel();null===i?r._label=new jh(t,n):i.setLocation(t,n)},e.prototype.createEdgeSetIntersector=function(){return new gd},e.prototype.addSelfIntersectionNodes=function(t){for(var e=this._edges.iterator();e.hasNext();)for(var n=e.next(),r=n.getLabel().getLocation(t),i=n.eiList.iterator();i.hasNext();){var o=i.next();this.addSelfIntersectionNode(t,o.coord,r)}},e.prototype.add=function(){if(1!==arguments.length)return t.prototype.add.apply(this,arguments);var e=arguments[0];if(e.isEmpty())return null;if(e instanceof ih&&(this._useBoundaryDeterminationRule=!1),e instanceof eh)this.addPolygon(e);else if(e instanceof Jl)this.addLineString(e);else if(e instanceof $l)this.addPoint(e);else if(e instanceof nh)this.addCollection(e);else if(e instanceof Gl)this.addCollection(e);else if(e instanceof ih)this.addCollection(e);else{if(!(e instanceof kl))throw new Error(e.getClass().getName());this.addCollection(e)}},e.prototype.addCollection=function(t){for(var e=0;e50?(null===this._areaPtLocator&&(this._areaPtLocator=new xd(this._parentGeom)),this._areaPtLocator.locate(t)):this._ptLocator.locate(t,this._parentGeom)},e.prototype.findEdge=function(){if(1===arguments.length){var e=arguments[0];return this._lineEdgeMap.get(e)}return t.prototype.findEdge.apply(this,arguments)},e.prototype.interfaces_=function(){return[]},e.prototype.getClass=function(){return e},e.determineBoundary=function(t,e){return t.isInBoundary(e)?pc.BOUNDARY:pc.INTERIOR},e}(Hh),Pd=function(){if(this._li=new Yc,this._resultPrecisionModel=null,this._arg=null,1===arguments.length){var t=arguments[0];this.setComputationPrecision(t.getPrecisionModel()),this._arg=new Array(1).fill(null),this._arg[0]=new Id(0,t)}else if(2===arguments.length){var e=arguments[0],n=arguments[1],r=$c.OGC_SFS_BOUNDARY_RULE;e.getPrecisionModel().compareTo(n.getPrecisionModel())>=0?this.setComputationPrecision(e.getPrecisionModel()):this.setComputationPrecision(n.getPrecisionModel()),this._arg=new Array(2).fill(null),this._arg[0]=new Id(0,e,r),this._arg[1]=new Id(1,n,r)}else if(3===arguments.length){var i=arguments[0],o=arguments[1],s=arguments[2];i.getPrecisionModel().compareTo(o.getPrecisionModel())>=0?this.setComputationPrecision(i.getPrecisionModel()):this.setComputationPrecision(o.getPrecisionModel()),this._arg=new Array(2).fill(null),this._arg[0]=new Id(0,i,s),this._arg[1]=new Id(1,o,s)}};Pd.prototype.getArgGeometry=function(t){return this._arg[t].getGeometry()},Pd.prototype.setComputationPrecision=function(t){this._resultPrecisionModel=t,this._li.setPrecisionModel(this._resultPrecisionModel)},Pd.prototype.interfaces_=function(){return[]},Pd.prototype.getClass=function(){return Pd};var Rd=function(){};Rd.prototype.interfaces_=function(){return[]},Rd.prototype.getClass=function(){return Rd},Rd.map=function(){if(arguments[0]instanceof Zc&&gc(arguments[1],Rd.MapOp)){for(var t=arguments[0],e=arguments[1],n=new ll,r=0;r=t.size()?null:t.get(e)},Dd.union=function(t){return new Dd(t).union()},kd.STRTREE_NODE_CAPACITY.get=function(){return 4},Object.defineProperties(Dd,kd);var Gd=function(){};function Bd(){return new Ud}function Ud(){this.reset()}Gd.prototype.interfaces_=function(){return[]},Gd.prototype.getClass=function(){return Gd},Gd.union=function(t,e){if(t.isEmpty()||e.isEmpty()){if(t.isEmpty()&&e.isEmpty())return Td.createEmptyResult(Td.UNION,t,e,t.getFactory());if(t.isEmpty())return e.copy();if(e.isEmpty())return t.copy()}return t.checkNotGeometryCollection(t),t.checkNotGeometryCollection(e),cd.overlayOp(t,e,Td.UNION)},Ud.prototype={constructor:Ud,reset:function(){this.s=this.t=0},add:function(t){Yd(zd,t,this.t),Yd(this,zd.s,this.s),this.s?this.t+=zd.t:this.s=zd.t},valueOf:function(){return this.s}};var zd=new Ud;function Yd(t,e,n){var r=t.s=e+n,i=r-e,o=r-i;t.t=e-o+(n-i)}var Xd=1e-6,Vd=Math.PI,qd=Vd/2,Wd=Vd/4,Hd=2*Vd,Zd=180/Vd,Kd=Vd/180,Jd=Math.abs,Qd=Math.atan,$d=Math.atan2,tg=Math.cos,eg=Math.sin,ng=Math.sqrt;function rg(t){return t>1?0:t<-1?Vd:Math.acos(t)}function ig(t){return t>1?qd:t<-1?-qd:Math.asin(t)}function og(){}function sg(t,e){t&&lg.hasOwnProperty(t.type)&&lg[t.type](t,e)}var ag,ug,cg={Feature:function(t,e){sg(t.geometry,e)},FeatureCollection:function(t,e){for(var n=t.features,r=-1,i=n.length;++rVd?t-Hd:t<-Vd?t+Hd:t,e]}function wg(t){return function(e,n){return[(e+=t)>Vd?e-Hd:e<-Vd?e+Hd:e,n]}}function xg(t){var e=wg(t);return e.invert=wg(-t),e}function Og(t,e){var n=tg(t),r=eg(t),i=tg(e),o=eg(e);function s(t,e){var s=tg(e),a=tg(t)*s,u=eg(t)*s,c=eg(e),l=c*n+a*r;return[$d(u*i-l*o,a*n-c*r),ig(l*i+u*o)]}return s.invert=function(t,e){var s=tg(e),a=tg(t)*s,u=eg(t)*s,c=eg(e),l=c*i-u*o;return[$d(u*i+c*o,a*n+l*r),ig(l*n-a*r)]},s}function Sg(t,e){(e=dg(e))[0]-=t,mg(e);var n=rg(-e[1]);return((-e[2]<0?-n:n)+Hd-Xd)%Hd}function Cg(){var t,e=[];return{point:function(e,n){t.push([e,n])},lineStart:function(){e.push(t=[])},lineEnd:og,rejoin:function(){e.length>1&&e.push(e.pop().concat(e.shift()))},result:function(){var n=e;return e=[],t=null,n}}}function Ig(t,e){return Jd(t[0]-e[0])=0;--o)i.point((l=c[o])[0],l[1]);else r(f.x,f.p.x,-1,i);f=f.p}c=(f=f.o).z,p=!p}while(!f.v);i.lineEnd()}}}function Tg(t){if(e=t.length){for(var e,n,r=0,i=t[0];++re?1:t>=e?0:NaN}function Mg(t){for(var e,n,r,i=t.length,o=-1,s=0;++o=0;)for(e=(r=t[i]).length;--e>=0;)n[--s]=r[e];return n}Bd(),Bd(),Bd(),Eg.invert=Eg,1===(ag=Lg).length&&(ug=ag,ag=function(t,e){return Lg(ug(t),e)});var Ng=1e9,Ag=-Ng;function Fg(t,e,n,r){function i(i,o){return t<=i&&i<=n&&e<=o&&o<=r}function o(i,o,a,c){var l=0,h=0;if(null==i||(l=s(i,a))!==(h=s(o,a))||u(i,o)<0^a>0)do{c.point(0===l||3===l?t:n,l>1?r:e)}while((l=(l+a+4)%4)!==h);else c.point(o[0],o[1])}function s(r,i){return Jd(r[0]-t)0?0:3:Jd(r[0]-n)0?2:1:Jd(r[1]-e)0?1:0:i>0?3:2}function a(t,e){return u(t.x,e.x)}function u(t,e){var n=s(t,1),r=s(e,1);return n!==r?n-r:0===n?e[1]-t[1]:1===n?t[0]-e[0]:2===n?t[1]-e[1]:e[0]-t[0]}return function(s){var u,c,l,h,f,p,d,g,y,v,_,m=s,b=Cg(),E={point:w,lineStart:function(){E.point=x,c&&c.push(l=[]),v=!0,y=!1,d=g=NaN},lineEnd:function(){u&&(x(h,f),p&&y&&b.rejoin(),u.push(b.result())),E.point=w,y&&m.lineEnd()},polygonStart:function(){m=b,u=[],c=[],_=!0},polygonEnd:function(){var e=function(){for(var e=0,n=0,i=c.length;nr&&(f-o)*(r-s)>(p-s)*(t-o)&&++e:p<=r&&(f-o)*(r-s)<(p-s)*(t-o)&&--e;return e}(),n=_&&e,i=(u=Mg(u)).length;(n||i)&&(s.polygonStart(),n&&(s.lineStart(),o(null,null,1,s),s.lineEnd()),i&&Rg(u,a,e,o,s),s.polygonEnd()),m=s,u=c=l=null}};function w(t,e){i(t,e)&&m.point(t,e)}function x(o,s){var a=i(o,s);if(c&&l.push([o,s]),v)h=o,f=s,p=a,v=!1,a&&(m.lineStart(),m.point(o,s));else if(a&&y)m.point(o,s);else{var u=[d=Math.max(Ag,Math.min(Ng,d)),g=Math.max(Ag,Math.min(Ng,g))],b=[o=Math.max(Ag,Math.min(Ng,o)),s=Math.max(Ag,Math.min(Ng,s))];!function(t,e,n,r,i,o){var s,a=t[0],u=t[1],c=0,l=1,h=e[0]-a,f=e[1]-u;if(s=n-a,h||!(s>0)){if(s/=h,h<0){if(s0){if(s>l)return;s>c&&(c=s)}if(s=i-a,h||!(s<0)){if(s/=h,h<0){if(s>l)return;s>c&&(c=s)}else if(h>0){if(s0)){if(s/=f,f<0){if(s0){if(s>l)return;s>c&&(c=s)}if(s=o-u,f||!(s<0)){if(s/=f,f<0){if(s>l)return;s>c&&(c=s)}else if(f>0){if(s0&&(t[0]=a+c*h,t[1]=u+c*f),l<1&&(e[0]=a+l*h,e[1]=u+l*f),!0}}}}}(u,b,t,e,n,r)?a&&(m.lineStart(),m.point(o,s),_=!1):(y||(m.lineStart(),m.point(u[0],u[1])),m.point(b[0],b[1]),a||m.lineEnd(),_=!1)}d=o,g=s,y=a}return E}}var jg=Bd();function Dg(t){return t}Bd(),Bd(),Bd();var kg=1/0,Gg=kg,Bg=-kg,Ug=Bg,zg={point:function(t,e){tBg&&(Bg=t),eUg&&(Ug=e)},lineStart:og,lineEnd:og,polygonStart:og,polygonEnd:og,result:function(){var t=[[kg,Gg],[Bg,Ug]];return Bg=Ug=-(Gg=kg=1/0),t}};function Yg(t,e,n,r){return function(i,o){var s,a,u,c=e(o),l=i.invert(r[0],r[1]),h=Cg(),f=e(h),p=!1,d={point:g,lineStart:v,lineEnd:_,polygonStart:function(){d.point=m,d.lineStart=b,d.lineEnd=E,a=[],s=[]},polygonEnd:function(){d.point=g,d.lineStart=v,d.lineEnd=_,a=Mg(a);var t=function(t,e){var n=e[0],r=e[1],i=[eg(n),-tg(n),0],o=0,s=0;jg.reset();for(var a=0,u=t.length;a=0?1:-1,O=x*w,S=O>Vd,C=d*b;if(jg.add($d(C*x*eg(O),g*E+C*tg(O))),o+=S?w+x*Hd:w,S^f>=n^_>=n){var I=yg(dg(h),dg(v));mg(I);var P=yg(i,I);mg(P);var R=(S^w>=0?-1:1)*ig(P[2]);(r>R||r===R&&(I[0]||I[1]))&&(s+=S^w>=0?1:-1)}}return(o<-1e-6||o0){for(p||(o.polygonStart(),p=!0),o.lineStart(),t=0;t1&&2&i&&c.push(c.pop().concat(c.shift())),a.push(c.filter(Xg))}return d}}function Xg(t){return t.length>1}function Vg(t,e){return((t=t.x)[0]<0?t[1]-qd-Xd:qd-t[1])-((e=e.x)[0]<0?e[1]-qd-Xd:qd-e[1])}Bd();var qg=Yg((function(){return!0}),(function(t){var e,n=NaN,r=NaN,i=NaN;return{lineStart:function(){t.lineStart(),e=1},point:function(o,s){var a=o>0?Vd:-Vd,u=Jd(o-n);Jd(u-Vd)0?qd:-qd),t.point(i,r),t.lineEnd(),t.lineStart(),t.point(a,r),t.point(o,r),e=0):i!==a&&u>=Vd&&(Jd(n-i)Xd?Qd((eg(e)*(o=tg(r))*eg(n)-eg(r)*(i=tg(e))*eg(t))/(i*o*s)):(e+r)/2}(n,r,o,s),t.point(i,r),t.lineEnd(),t.lineStart(),t.point(a,r),e=0),t.point(n=o,r=s),i=a},lineEnd:function(){t.lineEnd(),n=r=NaN},clean:function(){return 2-e}}}),(function(t,e,n,r){var i;if(null==t)i=n*qd,r.point(-Vd,i),r.point(0,i),r.point(Vd,i),r.point(Vd,0),r.point(Vd,-i),r.point(0,-i),r.point(-Vd,-i),r.point(-Vd,0),r.point(-Vd,i);else if(Jd(t[0]-e[0])>Xd){var o=t[0]0,i=Jd(n)>Xd;function o(t,e){return tg(t)*tg(e)>n}function s(t,e,r){var i=[1,0,0],o=yg(dg(t),dg(e)),s=gg(o,o),a=o[0],u=s-a*a;if(!u)return!r&&t;var c=n*s/u,l=-n*a/u,h=yg(i,o),f=_g(i,c);vg(f,_g(o,l));var p=h,d=gg(f,p),g=gg(p,p),y=d*d-g*(gg(f,f)-1);if(!(y<0)){var v=ng(y),_=_g(p,(-d-v)/g);if(vg(_,f),_=pg(_),!r)return _;var m,b=t[0],E=e[0],w=t[1],x=e[1];E0^_[1]<(Jd(_[0]-b)Vd^(b<=_[0]&&_[0]<=E)){var C=_g(p,(-d+v)/g);return vg(C,f),[_,pg(C)]}}}function a(e,n){var i=r?t:Vd-t,o=0;return e<-i?o|=1:e>i&&(o|=2),n<-i?o|=4:n>i&&(o|=8),o}return Yg(o,(function(t){var e,n,u,c,l;return{lineStart:function(){c=u=!1,l=1},point:function(h,f){var p,d=[h,f],g=o(h,f),y=r?g?0:a(h,f):g?a(h+(h<0?Vd:-Vd),f):0;if(!e&&(c=u=g)&&t.lineStart(),g!==u&&(!(p=s(e,d))||Ig(e,p)||Ig(d,p))&&(d[0]+=Xd,d[1]+=Xd,g=o(d[0],d[1])),g!==u)l=0,g?(t.lineStart(),p=s(d,e),t.point(p[0],p[1])):(p=s(e,d),t.point(p[0],p[1]),t.lineEnd()),e=p;else if(i&&e&&r^g){var v;y&n||!(v=s(d,e,!0))||(l=0,r?(t.lineStart(),t.point(v[0][0],v[0][1]),t.point(v[1][0],v[1][1]),t.lineEnd()):(t.point(v[1][0],v[1][1]),t.lineEnd(),t.lineStart(),t.point(v[0][0],v[0][1])))}!g||e&&Ig(e,d)||t.point(d[0],d[1]),e=d,u=g,n=y},lineEnd:function(){u&&t.lineEnd(),e=null},clean:function(){return l|(c&&u)<<1}}}),(function(n,r,i,o){!function(t,e,n,r,i,o){if(n){var s=tg(e),a=eg(e),u=r*n;null==i?(i=e+r*Hd,o=e-u/2):(i=Sg(s,i),o=Sg(s,o),(r>0?io)&&(i+=r*Hd));for(var c,l=i;r>0?l>o:l4*e&&g--){var b=s+f,E=a+p,w=u+d,x=ng(b*b+E*E+w*w),O=ig(w/=x),S=Jd(Jd(w)-1)e||Jd((v*R+_*T)/m-.5)>.3||s*f+a*p+u*d2?t[2]%360*Kd:0,P()):[y*Zd,v*Zd,_*Zd]},S.precision=function(t){return arguments.length?(O=Qg(I,x=t*t),R()):ng(x)},S.fitExtent=function(t,e){return Kg(S,t,e)},S.fitSize=function(t,e){return function(t,e,n){return Kg(t,[[0,0],e],n)}(S,t,e)},function(){return e=t.apply(this,arguments),S.invert=e.invert&&C,P()}}((function(){return t}))()}var ey=function(t){return function(e,n){var r=tg(e),i=tg(n),o=t(r*i);return[o*i*eg(e),o*eg(n)]}}((function(t){return(t=rg(t))&&t/eg(t)}));function ny(){return ty(ey).scale(79.4188).clipAngle(179.999)}function ry(t,e,r,i){var o=t.properties||{},a="Feature"===t.type?t.geometry:t;if("GeometryCollection"===a.type){var u=[];return B(t,(function(t){var n=ry(t,e,r,i);n&&u.push(n)})),d(u)}var c=function(t){var e=En(t).geometry.coordinates,r=[-e[0],-e[1]];return ny().rotate(r).scale(n)}(a),l={type:a.type,coordinates:oy(a.coordinates,c)},h=(new Sh).read(l),f=b(E(e,r),"meters"),p=mp.bufferOp(h,f,i);if(!iy((p=(new Ch).write(p)).coordinates))return s({type:p.type,coordinates:sy(p.coordinates,c)},o)}function iy(t){return Array.isArray(t[0])?iy(t[0]):isNaN(t[0])}function oy(t,e){return"object"!=typeof t[0]?e(t):t.map((function(t){return oy(t,e)}))}function sy(t,e){return"object"!=typeof t[0]?e.invert(t):t.map((function(t){return sy(t,e)}))}function ay(t,e,n){void 0===n&&(n={});var r=it(t),i=it(e),o=tc.intersection(r.coordinates,i.coordinates);return 0===o.length?null:1===o.length?l(o[0],n.properties):v(o,n.properties)}function uy(t,e,n){void 0===n&&(n={});var r=JSON.stringify(n.properties||{}),i=t[0],o=t[1],s=t[2],a=t[3],u=(o+a)/2,c=(i+s)/2,l=2*e/be([i,u],[s,u],n)*(s-i),h=2*e/be([c,o],[c,a],n)*(a-o),f=l/2,p=2*f,g=Math.sqrt(3)/2*h,y=s-i,v=a-o,_=3/4*p,m=g,b=(y-p)/(p-f/2),E=Math.floor(b),w=(E*_-f/2-y)/2-f/2+_/2,x=Math.floor((v-g)/g),O=(v-x*g)/2,S=x*g-v>g/2;S&&(O-=g/4);for(var C=[],I=[],P=0;P<6;P++){var R=2*Math.PI/6*P;C.push(Math.cos(R)),I.push(Math.sin(R))}for(var T=[],L=0;L<=E;L++)for(var M=0;M<=x;M++){var N=L%2==1;if((0!==M||!N)&&(0!==M||!S)){var A=L*_+i-w,F=M*m+o+O;if(N&&(F-=g/2),!0===n.triangles)ly([A,F],l/2,h/2,JSON.parse(r),C,I).forEach((function(t){n.mask?ay(n.mask,t)&&T.push(t):T.push(t)}));else{var j=cy([A,F],l/2,h/2,JSON.parse(r),C,I);n.mask?ay(n.mask,j)&&T.push(j):T.push(j)}}}return d(T)}function cy(t,e,n,r,i,o){for(var s=[],a=0;a<6;a++){var u=t[0]+e*i[a],c=t[1]+n*o[a];s.push([u,c])}return s.push(s[0].slice()),l([s],r)}function ly(t,e,n,r,i,o){for(var s=[],a=0;a<6;a++){var u=[];u.push(t),u.push([t[0]+e*i[a],t[1]+n*o[a]]),u.push([t[0]+e*i[(a+1)%6],t[1]+n*o[(a+1)%6]]),u.push(t),s.push(l([u],r))}return s}function hy(t){return v(t)}function fy(t){return l(t&&t.geometry.coordinates||[[[180,90],[-180,90],[-180,-90],[180,-90],[180,90]]])}function py(t,e,n){return void 0===n&&(n={}),function(t,e,n,r){void 0===r&&(r={});for(var i=[],o=t[0],s=t[1],a=t[2],u=t[3],c=e/be([o,s],[a,s],r)*(a-o),h=n/be([o,s],[o,u],r)*(u-s),f=a-o,p=u-s,g=Math.floor(f/c),y=Math.floor(p/h),v=(p-y*h)/2,_=o+(f-g*c)/2,m=0;m=i&&o===r.length-1);o++){if(i>=e){var s=e-i;if(s){var a=bn(r[o],r[o-1])-180;return _n(r[o],s,a,n)}return u(r[o])}i+=be(r[o],r[o+1],n)}return u(r[r.length-1])},e.angle=function(t,e,n,r){if(void 0===r&&(r={}),!R(r))throw new Error("options is invalid");if(!t)throw new Error("startPoint is required");if(!e)throw new Error("midPoint is required");if(!n)throw new Error("endPoint is required");var i=t,o=e,s=n,a=x(!0!==r.mercator?bn(i,o):Ui(i,o)),u=x(!0!==r.mercator?bn(s,o):Ui(s,o)),c=Math.abs(a-u);return!0===r.explementary?360-c:c},e.applyFilter=cu,e.area=Yr,e.areaFactors=o,e.bbox=J,e.bboxClip=function(t,e){var n=it(t),r=n.type,i="Feature"===t.type?t.properties:{},o=n.coordinates;switch(r){case"LineString":case"MultiLineString":var s=[];return"LineString"===r&&(o=[o]),o.forEach((function(t){!function(t,e,n){var r,i,o,s,a,u=t.length,c=Ni(t[0],e),l=[];for(n||(n=[]),r=1;r0)for(var n=0;n0},e.booleanParallel=function(t,e){if(!t)throw new Error("line1 is required");if(!e)throw new Error("line2 is required");if("LineString"!==Xs(t,"line1"))throw new Error("line1 must be a LineString");if("LineString"!==Xs(e,"line2"))throw new Error("line2 must be a LineString");for(var n=Jn(en(t)).features,r=Jn(en(e)).features,i=0;in&&(e.numberOfClusters=n),!0!==e.mutate&&(t=Se(t));var r=G(t),i=r.slice(0,e.numberOfClusters),o=zs(r,e.numberOfClusters,i),s={};return o.centroids.forEach((function(t,e){s[e]=t})),D(t,(function(t,e){var n=o.idxs[e];t.properties.cluster=n,t.properties.centroid=s[n]})),t},e.collect=function(t,e,n,r){var i=Ct(6),o=e.features.map((function(t){var e;return{minX:t.geometry.coordinates[0],minY:t.geometry.coordinates[1],maxX:t.geometry.coordinates[0],maxY:t.geometry.coordinates[1],property:null===(e=t.properties)||void 0===e?void 0:e[n]}}));return i.load(o),t.features.forEach((function(t){t.properties||(t.properties={});var e=J(t),n=i.search({minX:e[0],minY:e[1],maxX:e[2],maxY:e[3]}),o=[];n.forEach((function(e){ve([e.minX,e.minY],t)&&o.push(e.property)})),t.properties[r]=o})),t},e.collectionOf=rt,e.combine=function(t){var e={MultiPoint:{coordinates:[],properties:[]},MultiLineString:{coordinates:[],properties:[]},MultiPolygon:{coordinates:[],properties:[]}};return D(t,(function(t){var n,r,i,o;switch(null===(o=t.geometry)||void 0===o?void 0:o.type){case"Point":e.MultiPoint.coordinates.push(t.geometry.coordinates),e.MultiPoint.properties.push(t.properties);break;case"MultiPoint":(n=e.MultiPoint.coordinates).push.apply(n,t.geometry.coordinates),e.MultiPoint.properties.push(t.properties);break;case"LineString":e.MultiLineString.coordinates.push(t.geometry.coordinates),e.MultiLineString.properties.push(t.properties);break;case"MultiLineString":(r=e.MultiLineString.coordinates).push.apply(r,t.geometry.coordinates),e.MultiLineString.properties.push(t.properties);break;case"Polygon":e.MultiPolygon.coordinates.push(t.geometry.coordinates),e.MultiPolygon.properties.push(t.properties);break;case"MultiPolygon":(i=e.MultiPolygon.coordinates).push.apply(i,t.geometry.coordinates),e.MultiPolygon.properties.push(t.properties)}})),d(Object.keys(e).filter((function(t){return e[t].coordinates.length})).sort().map((function(t){return s({type:t,coordinates:e[t].coordinates},{collectedProperties:e[t].properties})})))},e.concave=function(t,e){void 0===e&&(e={});var n=e.maxEdge||1/0,r=Ee(function(t){var e=[],n={};return D(t,(function(t){if(t.geometry){var r=t.geometry.coordinates.join("-");Object.prototype.hasOwnProperty.call(n,r)||(e.push(t),n[r]=!0)}})),d(e)}(t));if(r.features=r.features.filter((function(t){var r=t.geometry.coordinates[0][0],i=t.geometry.coordinates[0][1],o=t.geometry.coordinates[0][2],s=be(r,i,e),a=be(i,o,e),u=be(r,o,e);return s<=n&&a<=n&&u<=n})),r.features.length<1)return null;var i=tn(r);return 1===i.coordinates.length&&(i.coordinates=i.coordinates[0],i.type="Polygon"),s(i)},e.containsNumber=tt,e.convertArea=I,e.convertDistance=C,e.convertLength=C,e.convex=ye,e.coordAll=G,e.coordEach=N,e.coordReduce=A,e.createBins=uu,e.degrees2radians=S,e.degreesToRadians=S,e.destination=_n,e.difference=function(t,e){var n=it(t),r=it(e),i=t.properties||{},o=tc.difference(n.coordinates,r.coordinates);return 0===o.length?null:1===o.length?l(o[0],i):v(o,i)},e.dissolve=function(t,e){if(!R(e=e||{}))throw new Error("options is invalid");var n=e.propertyName;rt(t,"Polygon","dissolve");var r=[];if(!e.propertyName)return ri(v(tc.union.apply(null,t.features.map((function(t){return t.geometry.coordinates})))));var i={};D(t,(function(t){Object.prototype.hasOwnProperty.call(i,t.properties[n])||(i[t.properties[n]]=[]),i[t.properties[n]].push(t)}));for(var o=Object.keys(i),s=0;s0&&(s=l(o).geometry),Ba(s,a),o=a.slice(0);n.push(l(o,i));break;case"MultiPolygon":o=[[[]]];for(var c=0;c0&&(s=v(o).geometry),Ua(s,a),o=a.slice(0);n.push(v(o,i));break;default:throw new Error("geometry is invalid, must be Polygon or MultiPolygon")}})),d(n)},e.polygonTangents=function(t,e){var n,r,i,o,s=$(t),a=$(e),c=J(e),l=0,h=null;switch(s[0]>c[0]&&s[0]c[1]&&s[1] is required");if("boolean"!=typeof n)throw new Error(" must be a boolean");if("boolean"!=typeof r)throw new Error(" must be a boolean");!1===r&&(t=Se(t));var i=[];switch(t.type){case"GeometryCollection":return B(t,(function(t){Hi(t,n)})),t;case"FeatureCollection":return D(t,(function(t){D(Hi(t,n),(function(t){i.push(t)}))})),d(i)}return Hi(t,n)},e.rhumbBearing=Ui,e.rhumbDestination=Yi,e.rhumbDistance=Fr,e.round=m,e.sample=function(t,e){if(!t)throw new Error("featurecollection is required");if(null==e)throw new Error("num is required");if("number"!=typeof e)throw new Error("num must be a number");return d(function(t,e){for(var n,r,i=t.slice(0),o=t.length,s=o-e;o-- >s;)n=i[r=Math.floor((o+1)*Math.random())],i[r]=i[o],i[o]=n;return i.slice(s)}(t.features,e))},e.sector=function(t,e,n,r,i){if(!R(i=i||{}))throw new Error("options is invalid");var o=i.properties;if(!t)throw new Error("center is required");if(null==n)throw new Error("bearing1 is required");if(null==r)throw new Error("bearing2 is required");if(!e)throw new Error("radius is required");if("object"!=typeof i)throw new Error("options must be an object");if(Bi(n)===Bi(r))return mn(t,e,i);var s=$(t),a=xi(t,e,n,r,i),u=[[s]];return N(a,(function(t){u[0].push(t)})),u[0].push(s),l(u,o)},e.segmentEach=X,e.segmentReduce=V,e.shortestPath=function(t,e,n){if(!R(n=n||{}))throw new Error("options is invalid");var r=n.resolution,i=n.minDistance,o=n.obstacles||d([]);if(!t)throw new Error("start is required");if(!e)throw new Error("end is required");if(r&&!P(r)||r<=0)throw new Error("options.resolution must be a number, greater than 0");if(i)throw new Error("options.minDistance is not yet implemented");var a=Q(t),c=Q(e);switch(t=u(a),e=u(c),ot(o)){case"FeatureCollection":if(0===o.features.length)return f([a,c]);break;case"Polygon":o=d([s(it(o))]);break;default:throw new Error("invalid obstacles")}var l=o;l.features.push(t),l.features.push(e);var h=J(es(gn(J(l)),1.15));r||(r=be([h[0],h[1]],[h[2],h[1]],n)/100),l.features.pop(),l.features.pop();for(var p=h[0],g=h[1],y=h[2],v=h[3],_=r/be([p,g],[y,g],n)*(y-p),m=r/be([p,g],[p,v],n)*(v-g),b=y-p,E=v-g,w=Math.floor(b/_),x=Math.floor(E/m),O=(b-w*_)/2,S=[],C=[],I=[],T=[],L=1/0,M=1/0,N=v-(E-x*m)/2,A=0;N>=g;){for(var F=[],j=[],D=p+O,k=0;D<=y;){var G=u([D,N]),B=Ks(G,o);F.push(B?0:1),j.push(D+"|"+N);var U=be(G,t);!B&&Ur&&(e=t.finalize(e)),e.clamp();for(var i=this._oKey=e.clone(),s=this._iKey=e.clone(),a=i.words,u=s.words,c=0;c{const e=t.resolutions?t.resolutions:c.resolutions.slice(3,17),n=t.url+"/tile/{z}/{y}/{x}";let r=new u["a"]({origin:l,extent:c.extentQg,resolutions:e});return new s["a"]({source:new a["a"]({tileGrid:r,projection:"EPSG:4326",url:n})})};var f=n("9c78"),p=n("91b1"),d=n("c721"),g=n("38f3"),y=n("0af5"),v=(n("9f5e"),n("256f")),_=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 r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),m=function(t){function e(e){var n=t.call(this,{extent:e.extent,origin:e.origin,origins:e.origins,resolutions:e.resolutions,tileSize:e.tileSize,tileSizes:e.tileSizes,sizes:e.sizes})||this;return n.matrixIds_=e.matrixIds,n}return _(e,t),e.prototype.getMatrixId=function(t){return this.matrixIds_[t]},e.prototype.getMatrixIds=function(){return this.matrixIds_},e}(u["a"]),b=m;var E=n("9cff"),w=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 r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),x=function(t){function e(e){var n=this,r=void 0===e.imageSmoothing||e.imageSmoothing;void 0!==e.interpolate&&(r=e.interpolate);var i=void 0!==e.requestEncoding?e.requestEncoding:"KVP",o=e.tileGrid,s=e.urls;return void 0===s&&void 0!==e.url&&(s=Object(E["c"])(e.url)),n=t.call(this,{attributions:e.attributions,attributionsCollapsible:e.attributionsCollapsible,cacheSize:e.cacheSize,crossOrigin:e.crossOrigin,interpolate:r,projection:e.projection,reprojectionErrorThreshold:e.reprojectionErrorThreshold,tileClass:e.tileClass,tileGrid:o,tileLoadFunction:e.tileLoadFunction,tilePixelRatio:e.tilePixelRatio,urls:s,wrapX:void 0!==e.wrapX&&e.wrapX,transition:e.transition,zDirection:e.zDirection})||this,n.version_=void 0!==e.version?e.version:"1.0.0",n.format_=void 0!==e.format?e.format:"image/jpeg",n.dimensions_=void 0!==e.dimensions?e.dimensions:{},n.layer_=e.layer,n.matrixSet_=e.matrixSet,n.style_=e.style,n.requestEncoding_=i,n.setKey(n.getKeyForDimensions_()),s&&s.length>0&&(n.tileUrlFunction=Object(E["b"])(s.map(n.createFromWMTSTemplate.bind(n)))),n}return w(e,t),e.prototype.setUrls=function(t){this.urls=t;var e=t.join("\n");this.setTileUrlFunction(Object(E["b"])(t.map(this.createFromWMTSTemplate.bind(this))),e)},e.prototype.getDimensions=function(){return this.dimensions_},e.prototype.getFormat=function(){return this.format_},e.prototype.getLayer=function(){return this.layer_},e.prototype.getMatrixSet=function(){return this.matrixSet_},e.prototype.getRequestEncoding=function(){return this.requestEncoding_},e.prototype.getStyle=function(){return this.style_},e.prototype.getVersion=function(){return this.version_},e.prototype.getKeyForDimensions_=function(){var t=0,e=[];for(var n in this.dimensions_)e[t++]=n+"-"+this.dimensions_[n];return e.join("/")},e.prototype.updateDimensions=function(t){Object(g["a"])(this.dimensions_,t),this.setKey(this.getKeyForDimensions_())},e.prototype.createFromWMTSTemplate=function(t){var e=this.requestEncoding_,n={layer:this.layer_,style:this.style_,tilematrixset:this.matrixSet_};"KVP"==e&&Object(g["a"])(n,{Service:"WMTS",Request:"GetTile",Version:this.version_,Format:this.format_}),t="KVP"==e?Object(d["a"])(t,n):t.replace(/\{(\w+?)\}/g,(function(t,e){return e.toLowerCase()in n?n[e.toLowerCase()]:t}));var r=this.tileGrid,i=this.dimensions_;return function(n,o,s){if(n){var a={TileMatrix:r.getMatrixId(n[0]),TileCol:n[1],TileRow:n[2]};Object(g["a"])(a,i);var u=t;return u="KVP"==e?Object(d["a"])(u,a):u.replace(/\{(\w+?)\}/g,(function(t,e){return a[e]})),u}}},e}(p["a"]),O=x;n("14d9");function S(t,e=0,n=""){t=t||v["h"]("EPSG:3857");const r=t.getExtent(),i=y["C"](r);let o=y["E"](r)/256;"EPSG:4326"===t.getCode()&&(o=y["E"](r)/512);const s=[],a=[];for(let u=0;u<18;u++)a.push(n+(u+e)),s.push(o/2**u);return new b({origin:i,extent:r,resolutions:s,matrixIds:a})}const C=t=>{const e="9ddc360d6bdaa451e6add0da729497d6",[n,r]=t.split("_");let i=`http://t{0-7}.tianditu.gov.cn/img_w/wmts?service=wmts&request=gettile&version=1.0.0&style=default&format=tiles&tilematrix={z}&tilerow={x}&tilecol={y}&layer=${n}&tilematrixset=${r}&tk=${e}`;return i=`http://t{0-7}.tianditu.gov.cn/DataServer?t=${t}&x={x}&y={y}&l={z}&tk=${e}`,new s["a"]({source:new a["a"]({url:i,wrapX:!0})})},I=t=>{const[e,n]=t.split("_");let r=v["h"]("EPSG:3857"),i=S(r);"c"===n&&(r=v["h"]("EPSG:4326"),i=S(r,1));const o="9ddc360d6bdaa451e6add0da729497d6";return new s["a"]({source:new O({format:"tiles",layer:e,matrixSet:n,tileGrid:i,url:`http://t{0-7}.tianditu.gov.cn/${t}/wmts?tk=${o}`,wrapX:!0})})},P=(t,e)=>{const n="EPSG:4326"===e?"c":"w";if("tdtVec"===t){const t=I("vec_"+n),e=I("cva_"+n);return new f["b"]({layers:[t,e]})}if("tdtImg"===t){const t=I("img_"+n),e=I("cia_"+n);return new f["b"]({layers:[t,e]})}if("tdtTer"===t){const t=I("ter_"+n),e=I("cta_"+n);return new f["b"]({layers:[e,t]})}},R=function(){return new s["a"]({source:new a["a"]({url:"http://www.google.cn/maps/vt?lyrs=s@189&gl=cn&x={x}&y={y}&z={z}"})})},T=function(){return new s["a"]({source:new a["a"]({url:"http://wprd0{1-4}.is.autonavi.com/appmaptile?lang=zh_cn&size=1&style=7&x={x}&y={y}&z={z}"})})},L=function(t){return new s["a"]({source:new a["a"]({url:t+"/tile/{x}/{y}/{z}"})})},M=()=>{const t=[];for(let r=0;r<19;r++)t[r]=Math.pow(2,18-r);const e=new u["a"]({origin:[0,0],resolutions:t}),n=new p["a"]({projection:"EPSG:3857",tileGrid:e,tileUrlFunction(t,e,n){if(!t)return"";const r=t[0];let i=t[1],o=-t[2]-1;return i<0&&(i="M"+-i),o<0&&(o="M"+-o),`http://online3.map.bdimg.com/onlinelabel/?qt=tile&x=${i}&y=${o}&z=${r}&styles=pl&udt=20191119&scaler=1&p=1`}});return new s["a"]({source:n,visible:!0})};var N=n("3e6b"),A=n("5831"),F=n("6c77"),j=n("83a6"),D=n("8682"),k=n("ce2c"),G=n("ac29"),B=n("790a"),U=n("5bc3"),z=n("7a09"),Y=n("64d9"),X=n("0710");let V,q,W,H,Z,K;const J=[],Q="点击继续画面",$="点击继续划线";class tt{constructor(t){this.map=V=t,this.initVectorLayer()}setSketchType(t){V.removeInteraction(this.draw),this.addMapListeners(),this.addInteraction(t)}removeInteraction(){this.remove(),this.removeMapListeners()}remove(){V.removeInteraction(this.draw)}initVectorLayer(){this.source=new A["a"],this.vector=new N["a"]({source:this.source,style:new F["c"]({fill:new j["a"]({color:"rgba(255, 255, 255, 0.2)"}),stroke:new D["a"]({color:"#ffcc33",width:2}),image:new k["a"]({radius:7,fill:new j["a"]({color:"#ffcc33"})})})}),V.addLayer(this.vector),V.drawOutPut=""}addMapListeners(){V.on("pointermove",nt),V.getViewport().addEventListener("mouseout",rt)}removeMapListeners(){V.unset("pointermove",nt),V.getViewport().removeEventListener("mouseout",rt),V.removeOverlay(H),J.forEach(t=>{V.removeOverlay(t)}),this.vector.getSource().clear(),V.drawOutPut=""}addInteraction(t){const e=window.mapLayerName;let n,r="rgba(255, 255, 255, 0.5)",i="rgba(255, 255, 255, 0.5)";"chinaWhite"!==e&&"tdtVec"!==e||(r="rgba(0, 0, 0, 0.5)",i="rgba(0, 0, 0, 0.3)"),this.draw&&this.remove(),this.vector.getSource().clear(),this.draw=new G["a"]({source:this.source,type:t,style:new F["c"]({fill:new j["a"]({color:i}),stroke:new D["a"]({color:r,lineDash:[10,10],width:2}),image:new k["a"]({radius:5,stroke:new D["a"]({color:r}),fill:new j["a"]({color:r})})})}),V.addInteraction(this.draw),at(),st();this.draw.on("drawstart",t=>{this.vector.getSource().clear(),q=t.feature;let e=t.coordinate;n=q.getGeometry().on("change",t=>{const n=t.target;let r;n instanceof U["a"]?(r=ot(n),e=n.getInteriorPoint().getCoordinates()):n instanceof z["a"]&&(r=it(n),e=n.getLastCoordinate()),Z.innerHTML=r,K.setPosition(e)})}),this.draw.on("drawend",t=>{Z.className="ol-tooltip ol-tooltip-static",K.setOffset([0,-7]),q=null})}formatWkt(t){const e=new Y["a"],n=e.writeFeature(t);V.drawOutPut=n}formatFeature(t){return(new Y["a"]).readFeature(t)}}var et=tt;function nt(t){if(t.dragging)return;let e="点击开始画图";if(q){const t=q.getGeometry();t instanceof U["a"]?e=Q:t instanceof z["a"]&&(e=$)}W.innerHTML=e,H.setPosition(t.coordinate),W.classList.remove("hidden")}function rt(){W.classList.add("hidden")}function it(t){const e="EPSG:4326"===V.getView().getProjection().getCode();let n,r;if(e){const e=t.clone().transform("EPSG:4326","EPSG:3857");n=B["c"](e)}else n=B["c"](t);return r=n>100?Math.round(n/1e3*100)/100+" km":Math.round(100*n)/100+" m",r}function ot(t){const e="EPSG:4326"===V.getView().getProjection().getCode();let n,r;if(e){const e=t.clone().transform("EPSG:4326","EPSG:3857");n=B["a"](e)}else n=B["a"](t);return r=n>1e4?Math.round(n/1e6*100)/100+" km2":Math.round(100*n)/100+" m2",r}function st(){W&&W.parentNode.removeChild(W),W=document.createElement("div"),W.className="ol-tooltip hidden",H=new X["a"]({element:W,offset:[15,0],positioning:"center-left"}),V.addOverlay(H)}function at(){Z&&Z.parentNode.removeChild(Z),Z=document.createElement("div"),Z.className="ol-tooltip ol-tooltip-measure";const t=K=new X["a"]({element:Z,offset:[0,-15],positioning:"bottom-center"});J.push(t),V.addOverlay(K)}e["default"]={utilsArcgis:r,utilsTileLayer:o,utilsTileGrid:i,MeasureTool:et}},"5bc3":function(t,e,n){"use strict";n.d(e,"c",(function(){return E})),n.d(e,"b",(function(){return w})),n.d(e,"d",(function(){return x}));var r=n("521b"),i=n("049d"),o=n("f403"),s=n("9abc"),a=n("9769"),u=n("0af5"),c=n("abb7"),l=n("9f5e"),h=n("0a9d"),f=n("bb6c"),p=n("c560"),d=n("4d98"),g=n("b589"),y=n("25f1"),v=n("7fc9"),_=n("1c48"),m=(n("790a"),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 r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}()),b=function(t){function e(e,n,r){var i=t.call(this)||this;return i.ends_=[],i.flatInteriorPointRevision_=-1,i.flatInteriorPoint_=null,i.maxDelta_=-1,i.maxDeltaRevision_=-1,i.orientedRevision_=-1,i.orientedFlatCoordinates_=null,void 0!==n&&r?(i.setFlatCoordinates(n,e),i.ends_=r):i.setCoordinates(e,n),i}return m(e,t),e.prototype.appendLinearRing=function(t){this.flatCoordinates?Object(l["c"])(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,r){return r=t){var o=0;for(var s in e)0===(3&o++)&&(delete e[s],--n)}i=h(r),e[r]=i,++n}return i}}();function l(t){return Array.isArray(t)?t:c(t)}function h(t){var e,n,i,a,c;if(s.exec(t)&&(t=u(t)),o.exec(t)){var l=t.length-1,h=void 0;h=l<=4?1:2;var p=4===l||8===l;e=parseInt(t.substr(1+0*h,h),16),n=parseInt(t.substr(1+1*h,h),16),i=parseInt(t.substr(1+2*h,h),16),a=p?parseInt(t.substr(1+3*h,h),16):255,1==h&&(e=(e<<4)+e,n=(n<<4)+n,i=(i<<4)+i,p&&(a=(a<<4)+a)),c=[e,n,i,a/255]}else 0==t.indexOf("rgba(")?(c=t.slice(5,-1).split(",").map(Number),f(c)):0==t.indexOf("rgb(")?(c=t.slice(4,-1).split(",").map(Number),c.push(1),f(c)):Object(r["a"])(!1,14);return c}function f(t){return t[0]=Object(i["b"])(t[0]+.5|0,0,255),t[1]=Object(i["b"])(t[1]+.5|0,0,255),t[2]=Object(i["b"])(t[2]+.5|0,0,255),t[3]=Object(i["b"])(t[3],0,1),t}function p(t){var e=t[0];e!=(0|e)&&(e=e+.5|0);var n=t[1];n!=(0|n)&&(n=n+.5|0);var r=t[2];r!=(0|r)&&(r=r+.5|0);var i=void 0===t[3]?1:Math.round(100*t[3])/100;return"rgba("+e+","+n+","+r+","+i+")"}},"5c6c":function(t,e){t.exports=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}}},"5e31":function(t,e,n){"use strict";var r=n("0ec0"),i=n("01d4"),o=n("acc1"),s=n("1300"),a=n("ca42"),u=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 r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),c=function(t){function e(e,n,r){var i=t.call(this)||this,o=r||{};return i.tileCoord=e,i.state=n,i.interimTile=null,i.key="",i.transition_=void 0===o.transition?250:o.transition,i.transitionStarts_={},i.interpolate=!!o.interpolate,i}return u(e,t),e.prototype.changed=function(){this.dispatchEvent(i["a"].CHANGE)},e.prototype.release=function(){},e.prototype.getKey=function(){return this.key+"/"+this.tileCoord},e.prototype.getInterimTile=function(){if(!this.interimTile)return this;var t=this.interimTile;do{if(t.getState()==o["a"].LOADED)return this.transition_=0,t;t=t.interimTile}while(t);return this},e.prototype.refreshInterimChain=function(){if(this.interimTile){var t=this.interimTile,e=this;do{if(t.getState()==o["a"].LOADED){t.interimTile=null;break}t.getState()==o["a"].LOADING?e=t:t.getState()==o["a"].IDLE?e.interimTile=t.interimTile:e=t,t=e.interimTile}while(t)}},e.prototype.getTileCoord=function(){return this.tileCoord},e.prototype.getState=function(){return this.state},e.prototype.setState=function(t){if(this.state!==o["a"].ERROR&&this.state>t)throw new Error("Tile load sequence violation");this.state=t,this.changed()},e.prototype.load=function(){Object(s["b"])()},e.prototype.getAlpha=function(t,e){if(!this.transition_)return 1;var n=this.transitionStarts_[t];if(n){if(-1===n)return 1}else n=e,this.transitionStarts_[t]=n;var r=e-n+1e3/60;return r>=this.transition_?1:Object(a["a"])(r/this.transition_)},e.prototype.inTransition=function(t){return!!this.transition_&&-1!==this.transitionStarts_[t]},e.prototype.endTransition=function(t){this.transition_&&(this.transitionStarts_[t]=-1)},e}(r["a"]);e["a"]=c},"5e77":function(t,e,n){var r=n("83ab"),i=n("1a2d"),o=Function.prototype,s=r&&Object.getOwnPropertyDescriptor,a=i(o,"name"),u=a&&"something"===function(){}.name,c=a&&(!r||r&&s(o,"name").configurable);t.exports={EXISTS:a,PROPER:u,CONFIGURABLE:c}},"5eee":function(t,e,n){"use strict";var r=n("da5c"),i=n("57cb"),o=n("1300"),s=n("a896"),a=n("0af5"),u=n("3c22"),c=n("1af9"),l=n("a568"),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 r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),f=function(t){function e(e){var n=t.call(this)||this;return n.map_=e,n}return h(e,t),e.prototype.dispatchRenderEvent=function(t,e){Object(o["b"])()},e.prototype.calculateMatrices2D=function(t){var e=t.viewState,n=t.coordinateToPixelTransform,r=t.pixelToCoordinateTransform;Object(s["b"])(n,t.size[0]/2,t.size[1]/2,1/e.resolution,-1/e.resolution,-e.rotation,-e.center[0],-e.center[1]),Object(s["d"])(r,n)},e.prototype.forEachFeatureAtCoordinate=function(t,e,n,r,i,o,s,u){var h,f=e.viewState;function p(t,e,n,r){return i.call(o,e,t?n:null,r)}var d=f.projection,g=Object(l["g"])(t.slice(),d),y=[[0,0]];if(d.canWrapX()&&r){var v=d.getExtent(),_=Object(a["E"])(v);y.push([-_,0],[_,0])}for(var m=e.layerStatesArray,b=m.length,E=[],w=[],x=0;x=0;--O){var S=m[O],C=S.layer;if(C.hasRenderer()&&Object(c["b"])(S,f)&&s.call(u,C)){var I=C.getRenderer(),P=C.getSource();if(I&&P){var R=P.getWrapX()?g:t,T=p.bind(null,S.managed);w[0]=R[0]+y[x][0],w[1]=R[1]+y[x][1],h=I.forEachFeatureAtCoordinate(w,e,n,T,E)}if(h)return h}}if(0!==E.length){var L=1/E.length;return E.forEach((function(t,e){return t.distanceSq+=e*L})),E.sort((function(t,e){return t.distanceSq-e.distanceSq})),E.some((function(t){return h=t.callback(t.feature,t.layer,t.geometry)})),h}},e.prototype.forEachLayerAtPixel=function(t,e,n,r,i){return Object(o["b"])()},e.prototype.hasFeatureAtCoordinate=function(t,e,n,r,o,s){var a=this.forEachFeatureAtCoordinate(t,e,n,r,i["b"],this,o,s);return void 0!==a},e.prototype.getMap=function(){return this.map_},e.prototype.renderFrame=function(t){Object(o["b"])()},e.prototype.scheduleExpireIconCache=function(t){u["a"].canExpireCache()&&t.postRenderFunctions.push(p)},e}(r["a"]);function p(t,e){u["a"].expire()}var d=f,g=n("7b4f"),y=n("3333"),v=n("070d"),_=n("cd7e"),m=n("ddea"),b=n("1e8d"),E=n("0999"),w=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 r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),x=function(t){function e(e){var n=t.call(this,e)||this;n.fontChangeListenerKey_=Object(b["a"])(m["a"],g["a"].PROPERTYCHANGE,e.redrawText.bind(e)),n.element_=document.createElement("div");var r=n.element_.style;r.position="absolute",r.width="100%",r.height="100%",r.zIndex="0",n.element_.className=_["e"]+" ol-layers";var i=e.getViewport();return i.insertBefore(n.element_,i.firstChild||null),n.children_=[],n.renderedVisible_=!0,n}return w(e,t),e.prototype.dispatchRenderEvent=function(t,e){var n=this.getMap();if(n.hasListener(t)){var r=new y["a"](t,void 0,e);n.dispatchEvent(r)}},e.prototype.disposeInternal=function(){Object(b["c"])(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(v["a"].PRECOMPOSE,t);var e=t.layerStatesArray.sort((function(t,e){return t.zIndex-e.zIndex})),n=t.viewState;this.children_.length=0;for(var r=[],i=null,o=0,s=e.length;o=0;--o)r[o].renderDeclutter(t);Object(E["g"])(this.element_,this.children_),this.dispatchRenderEvent(v["a"].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,r,i){for(var o=e.viewState,s=e.layerStatesArray,a=s.length,u=a-1;u>=0;--u){var l=s[u],h=l.layer;if(h.hasRenderer()&&Object(c["b"])(l,o)&&i(h)){var f=h.getRenderer(),p=f.getDataAtPixel(t,e,n);if(p){var d=r(h,p);if(d)return d}}}},e}(d),O=x,S=n("e269"),C=n("e300"),I=n("183a"),P=n("01d4"),R=n("9c78"),T=n("509b"),L=n("0b2d"),M={POINTERMOVE:"pointermove",POINTERDOWN:"pointerdown",POINTERUP:"pointerup",POINTEROVER:"pointerover",POINTEROUT:"pointerout",POINTERENTER:"pointerenter",POINTERLEAVE:"pointerleave",POINTERCANCEL:"pointercancel"},N=n("0ec0"),A=n("617d"),F=n("38f3"),j=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 r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),D=function(t){function e(e,n){var r=t.call(this,e)||this;r.map_=e,r.clickTimeoutId_,r.emulateClicks_=!1,r.dragging_=!1,r.dragListenerKeys_=[],r.moveTolerance_=void 0===n?1:n,r.down_=null;var i=r.map_.getViewport();return r.activePointers_=[],r.trackedTouches_={},r.element_=i,r.pointerdownListenerKey_=Object(b["a"])(i,M.POINTERDOWN,r.handlePointerDown_,r),r.originalPointerMoveEvent_,r.relayedListenerKey_=Object(b["a"])(i,M.POINTERMOVE,r.relayMoveEvent_,r),r.boundHandleTouchMove_=r.handleTouchMove_.bind(r),r.element_.addEventListener(P["a"].TOUCHMOVE,r.boundHandleTouchMove_,!!A["e"]&&{passive:!1}),r}return j(e,t),e.prototype.emulateClick_=function(t){var e=new T["a"](L["a"].CLICK,this.map_,t);this.dispatchEvent(e),void 0!==this.clickTimeoutId_?(clearTimeout(this.clickTimeoutId_),this.clickTimeoutId_=void 0,e=new T["a"](L["a"].DBLCLICK,this.map_,t),this.dispatchEvent(e)):this.clickTimeoutId_=setTimeout(function(){this.clickTimeoutId_=void 0;var e=new T["a"](L["a"].SINGLECLICK,this.map_,t);this.dispatchEvent(e)}.bind(this),250)},e.prototype.updateActivePointers_=function(t){var e=t,n=e.pointerId;if(e.type==L["a"].POINTERUP||e.type==L["a"].POINTERCANCEL){for(var r in delete this.trackedTouches_[n],this.trackedTouches_)if(this.trackedTouches_[r].target!==e.target){delete this.trackedTouches_[r];break}}else e.type!=L["a"].POINTERDOWN&&e.type!=L["a"].POINTERMOVE||(this.trackedTouches_[n]=e);this.activePointers_=Object(F["c"])(this.trackedTouches_)},e.prototype.handlePointerUp_=function(t){this.updateActivePointers_(t);var e=new T["a"](L["a"].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(b["c"]),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 T["a"](L["a"].POINTERDOWN,this.map_,t,void 0,void 0,this.activePointers_);for(var n in this.dispatchEvent(e),this.down_={},t){var r=t[n];this.down_[n]="function"===typeof r?i["c"]:r}if(0===this.dragListenerKeys_.length){var o=this.map_.getOwnerDocument();this.dragListenerKeys_.push(Object(b["a"])(o,L["a"].POINTERMOVE,this.handlePointerMove_,this),Object(b["a"])(o,L["a"].POINTERUP,this.handlePointerUp_,this),Object(b["a"])(this.element_,L["a"].POINTERCANCEL,this.handlePointerUp_,this)),this.element_.getRootNode&&this.element_.getRootNode()!==o&&this.dragListenerKeys_.push(Object(b["a"])(this.element_.getRootNode(),L["a"].POINTERUP,this.handlePointerUp_,this))}},e.prototype.handlePointerMove_=function(t){if(this.isMoving_(t)){this.updateActivePointers_(t),this.dragging_=!0;var e=new T["a"](L["a"].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 T["a"](L["a"].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_&&(Object(b["c"])(this.relayedListenerKey_),this.relayedListenerKey_=null),this.element_.removeEventListener(P["a"].TOUCHMOVE,this.boundHandleTouchMove_),this.pointerdownListenerKey_&&(Object(b["c"])(this.pointerdownListenerKey_),this.pointerdownListenerKey_=null),this.dragListenerKeys_.forEach(b["c"]),this.dragListenerKeys_.length=0,this.element_=null,t.prototype.disposeInternal.call(this)},e}(N["a"]),k=D,G=n("7238"),B=n("592d"),U={LAYERGROUP:"layergroup",SIZE:"size",TARGET:"target",VIEW:"view"},z=n("92fa"),Y=1/0,X=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,Object(F["b"])(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 r=this.keyFunction_(n);return delete this.queuedElements_[r],n},t.prototype.enqueue=function(t){Object(z["a"])(!(this.keyFunction_(t)in this.queuedElements_),31);var e=this.priorityFunction_(t);return e!=Y&&(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_,r=e.length,i=e[t],o=n[t],s=t;while(t>1){var a=this.getLeftChildIndex_(t),u=this.getRightChildIndex_(t),c=ut){var s=this.getParentIndex_(e);if(!(r[s]>o))break;n[e]=n[s],r[e]=r[s],e=s}n[e]=i,r[e]=o},t.prototype.reprioritize=function(){var t,e,n,r=this.priorityFunction_,i=this.elements_,o=this.priorities_,s=0,a=i.length;for(e=0;e0)r=this.dequeue()[0],i=r.getKey(),n=r.getState(),n!==q["a"].IDLE||i in this.tilesLoadingKeys_||(this.tilesLoadingKeys_[i]=!0,++this.tilesLoading_,++o,r.load())},e}(V),Z=H;function K(t,e,n,r,i){if(!t||!(n in t.wantedTiles))return Y;if(!t.wantedTiles[n][e.getKey()])return Y;var o=t.viewState.center,s=r[0]-o[0],a=r[1]-o[1];return 65536*Math.log(i)+Math.sqrt(s*s+a*a)/i}var J=n("a2c7"),Q=n("496f"),$=n("256f"),tt=n("345d"),et=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 r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();function nt(t){t instanceof c["a"]?t.setMapInternal(null):t instanceof R["b"]&&t.getLayers().forEach(nt)}function rt(t,e){if(t instanceof c["a"])t.setMapInternal(e);else if(t instanceof R["b"])for(var n=t.getLayers().getArray(),r=0,i=n.length;r=0;a--){var u=s[a];if(u.getMap()===this&&u.getActive()&&this.getTargetElement()){var c=u.handleEvent(t);if(!c||t.propagationStopped)break}}}},e.prototype.handlePostRender=function(){var t=this.frameState_,e=this.tileQueue_;if(!e.isEmpty()){var n=this.maxTilesLoading_,r=n;if(t){var i=t.viewHints;if(i[Q["a"].ANIMATING]||i[Q["a"].INTERACTING]){var o=Date.now()-t.time>8;n=o?0:8,r=o?0:2}}e.getTilesLoading()0;if(this.renderedVisible_!=n&&(this.element.style.display=n?"":"none",this.renderedVisible_=n),!Object(lt["b"])(e,this.renderedAttributions_)){Object(E["e"])(this.ulElement_);for(var r=0,i=e.length;r0&&n%(2*Math.PI)!==0?e.animate({rotation:0,duration:this.duration_,easing:dt["b"]}):e.setRotation(0))}},e.prototype.render=function(t){var e=t.frameState;if(e){var n=e.viewState.rotation;if(n!=this.rotation_){var r="rotate("+n+"rad)";if(this.autoHide_){var i=this.element.classList.contains(_["c"]);i||0!==n?i&&0!==n&&this.element.classList.remove(_["c"]):this.element.classList.add(_["c"])}this.label_.style.transform=r}this.rotation_=n}},e}(ct),vt=yt,_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 r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),mt=function(t){function e(e){var n=this,r=e||{};n=t.call(this,{element:document.createElement("div"),target:r.target})||this;var i=void 0!==r.className?r.className:"ol-zoom",o=void 0!==r.delta?r.delta:1,s=void 0!==r.zoomInClassName?r.zoomInClassName:i+"-in",a=void 0!==r.zoomOutClassName?r.zoomOutClassName:i+"-out",u=void 0!==r.zoomInLabel?r.zoomInLabel:"+",c=void 0!==r.zoomOutLabel?r.zoomOutLabel:"–",l=void 0!==r.zoomInTipLabel?r.zoomInTipLabel:"Zoom in",h=void 0!==r.zoomOutTipLabel?r.zoomOutTipLabel:"Zoom out",f=document.createElement("button");f.className=s,f.setAttribute("type","button"),f.title=l,f.appendChild("string"===typeof u?document.createTextNode(u):u),f.addEventListener(P["a"].CLICK,n.handleClick_.bind(n,o),!1);var p=document.createElement("button");p.className=a,p.setAttribute("type","button"),p.title=h,p.appendChild("string"===typeof c?document.createTextNode(c):c),p.addEventListener(P["a"].CLICK,n.handleClick_.bind(n,-o),!1);var d=i+" "+_["e"]+" "+_["b"],g=n.element;return g.className=d,g.appendChild(f),g.appendChild(p),n.duration_=void 0!==r.duration?r.duration:250,n}return _t(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 r=n.getZoom();if(void 0!==r){var i=n.getConstrainedZoom(r+t);this.duration_>0?(n.getAnimating()&&n.cancelAnimations(),n.animate({zoom:i,duration:this.duration_,easing:dt["b"]})):n.setZoom(i)}}},e}(ct),bt=mt;function Et(t){var e=t||{},n=new C["a"],r=void 0===e.zoom||e.zoom;r&&n.push(new bt(e.zoomOptions));var i=void 0===e.rotate||e.rotate;i&&n.push(new vt(e.rotateOptions));var o=void 0===e.attribution||e.attribution;return o&&n.push(new pt(e.attributionOptions)),n}var wt=n("3a39"),xt=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 r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Ot=function(t){function e(e){return e=Object(F["a"])({},e),e.controls||(e.controls=Et()),e.interactions||(e.interactions=Object(wt["a"])({onFocusOnly:!0})),t.call(this,e)||this}return xt(e,t),e.prototype.createRenderer=function(){return new O(this)},e}(st);e["a"]=Ot},"617d":function(t,e,n){"use strict";n.d(e,"b",(function(){return i})),n.d(e,"f",(function(){return s})),n.d(e,"g",(function(){return a})),n.d(e,"d",(function(){return u})),n.d(e,"a",(function(){return c})),n.d(e,"h",(function(){return l})),n.d(e,"c",(function(){return h})),n.d(e,"e",(function(){return f}));var r="undefined"!==typeof navigator&&"undefined"!==typeof navigator.userAgent?navigator.userAgent.toLowerCase():"",i=-1!==r.indexOf("firefox"),o=-1!==r.indexOf("safari")&&-1==r.indexOf("chrom"),s=o&&!!(r.indexOf("version/15.4")>=0||r.match(/cpu (os|iphone os) 15_4 like mac os x/)),a=-1!==r.indexOf("webkit")&&-1==r.indexOf("edge"),u=-1!==r.indexOf("macintosh"),c="undefined"!==typeof devicePixelRatio?devicePixelRatio:1,l="undefined"!==typeof WorkerGlobalScope&&"undefined"!==typeof OffscreenCanvas&&self instanceof WorkerGlobalScope,h="undefined"!==typeof Image&&Image.prototype.decode,f=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}()},6374:function(t,e,n){var r=n("da84"),i=Object.defineProperty;t.exports=function(t,e){try{i(r,t,{value:e,configurable:!0,writable:!0})}catch(n){r[t]=e}return e}},"64d9":function(t,e,n){"use strict";var r=n("4cdf"),i=n("d352"),o=n("521b"),s=n("7a09"),a=n("47e4"),u=n("9a44"),c=n("88da"),l=n("f403"),h=n("5bc3"),f=n("8da7"),p=n("b7df"),d=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 r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),g={POINT:l["a"],LINESTRING:s["a"],POLYGON:h["a"],MULTIPOINT:u["a"],MULTILINESTRING:a["a"],MULTIPOLYGON:c["a"]},y="EMPTY",v="Z",_="M",m="ZM",b={START:0,TEXT:1,LEFT_PAREN:2,RIGHT_PAREN:3,NUMBER:4,COMMA:5,EOF:6},E={Point:"POINT",LineString:"LINESTRING",Polygon:"POLYGON",MultiPoint:"MULTIPOINT",MultiLineString:"MULTILINESTRING",MultiPolygon:"MULTIPOLYGON",GeometryCollection:"GEOMETRYCOLLECTION",Circle:"CIRCLE"},w=function(){function t(t){this.wkt=t,this.index_=-1}return t.prototype.isAlpha_=function(t){return t>="a"&&t<="z"||t>="A"&&t<="Z"},t.prototype.isNumeric_=function(t,e){var n=void 0!==e&&e;return t>="0"&&t<="9"||"."==t&&!n},t.prototype.isWhiteSpace_=function(t){return" "==t||"\t"==t||"\r"==t||"\n"==t},t.prototype.nextChar_=function(){return this.wkt.charAt(++this.index_)},t.prototype.nextToken=function(){var t,e=this.nextChar_(),n=this.index_,r=e;if("("==e)t=b.LEFT_PAREN;else if(","==e)t=b.COMMA;else if(")"==e)t=b.RIGHT_PAREN;else if(this.isNumeric_(e)||"-"==e)t=b.NUMBER,r=this.readNumber_();else if(this.isAlpha_(e))t=b.TEXT,r=this.readText_();else{if(this.isWhiteSpace_(e))return this.nextToken();if(""!==e)throw new Error("Unexpected character: "+e);t=b.EOF}return{position:n,value:r,type:t}},t.prototype.readNumber_=function(){var t,e=this.index_,n=!1,r=!1;do{"."==t?n=!0:"e"!=t&&"E"!=t||(r=!0),t=this.nextChar_()}while(this.isNumeric_(t,n)||!r&&("e"==t||"E"==t)||r&&("-"==t||"+"==t));return parseFloat(this.wkt.substring(e,this.index_--))},t.prototype.readText_=function(){var t,e=this.index_;do{t=this.nextChar_()}while(this.isAlpha_(t));return this.wkt.substring(e,this.index_--).toUpperCase()},t}(),x=function(){function t(t){this.lexer_=t,this.token_={position:0,type:b.START},this.layout_=o["a"].XY}return t.prototype.consume_=function(){this.token_=this.lexer_.nextToken()},t.prototype.isTokenType=function(t){return this.token_.type==t},t.prototype.match=function(t){var e=this.isTokenType(t);return e&&this.consume_(),e},t.prototype.parse=function(){return this.consume_(),this.parseGeometry_()},t.prototype.parseGeometryLayout_=function(){var t=o["a"].XY,e=this.token_;if(this.isTokenType(b.TEXT)){var n=e.value;n===v?t=o["a"].XYZ:n===_?t=o["a"].XYM:n===m&&(t=o["a"].XYZM),t!==o["a"].XY&&this.consume_()}return t},t.prototype.parseGeometryCollectionText_=function(){if(this.match(b.LEFT_PAREN)){var t=[];do{t.push(this.parseGeometry_())}while(this.match(b.COMMA));if(this.match(b.RIGHT_PAREN))return t}throw new Error(this.formatErrorMessage_())},t.prototype.parsePointText_=function(){if(this.match(b.LEFT_PAREN)){var t=this.parsePoint_();if(this.match(b.RIGHT_PAREN))return t}throw new Error(this.formatErrorMessage_())},t.prototype.parseLineStringText_=function(){if(this.match(b.LEFT_PAREN)){var t=this.parsePointList_();if(this.match(b.RIGHT_PAREN))return t}throw new Error(this.formatErrorMessage_())},t.prototype.parsePolygonText_=function(){if(this.match(b.LEFT_PAREN)){var t=this.parseLineStringTextList_();if(this.match(b.RIGHT_PAREN))return t}throw new Error(this.formatErrorMessage_())},t.prototype.parseMultiPointText_=function(){if(this.match(b.LEFT_PAREN)){var t=void 0;if(t=this.token_.type==b.LEFT_PAREN?this.parsePointTextList_():this.parsePointList_(),this.match(b.RIGHT_PAREN))return t}throw new Error(this.formatErrorMessage_())},t.prototype.parseMultiLineStringText_=function(){if(this.match(b.LEFT_PAREN)){var t=this.parseLineStringTextList_();if(this.match(b.RIGHT_PAREN))return t}throw new Error(this.formatErrorMessage_())},t.prototype.parseMultiPolygonText_=function(){if(this.match(b.LEFT_PAREN)){var t=this.parsePolygonTextList_();if(this.match(b.RIGHT_PAREN))return t}throw new Error(this.formatErrorMessage_())},t.prototype.parsePoint_=function(){for(var t=[],e=this.layout_.length,n=0;n0&&(i+=" "+o)}return 0===r.length?i+" "+y:i+"("+r+")"}e["a"]=O},6611:function(t,e,n){"use strict";n.d(e,"a",(function(){return d}));var r=n("01d4"),i=n("0ec0"),o=n("1300"),s=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 r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),a=function(t){function e(e,n,r,i){var o=t.call(this)||this;return o.extent=e,o.pixelRatio_=r,o.resolution=n,o.state=i,o}return s(e,t),e.prototype.changed=function(){this.dispatchEvent(r["a"].CHANGE)},e.prototype.getExtent=function(){return this.extent},e.prototype.getImage=function(){return Object(o["b"])()},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(){Object(o["b"])()},e}(i["a"]),u=a,c=n("869f"),l=n("617d"),h=n("0af5"),f=n("1e8d"),p=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 r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();(function(t){function e(e,n,r,i,o,s){var a=t.call(this,e,n,r,c["a"].IDLE)||this;return a.src_=i,a.image_=new Image,null!==o&&(a.image_.crossOrigin=o),a.unlisten_=null,a.state=c["a"].IDLE,a.imageLoadFunction_=s,a}p(e,t),e.prototype.getImage=function(){return this.image_},e.prototype.handleImageError_=function(){this.state=c["a"].ERROR,this.unlistenImage_(),this.changed()},e.prototype.handleImageLoad_=function(){void 0===this.resolution&&(this.resolution=Object(h["z"])(this.extent)/this.image_.height),this.state=c["a"].LOADED,this.unlistenImage_(),this.changed()},e.prototype.load=function(){this.state!=c["a"].IDLE&&this.state!=c["a"].ERROR||(this.state=c["a"].LOADING,this.changed(),this.imageLoadFunction_(this,this.src_),this.unlisten_=d(this.image_,this.handleImageLoad_.bind(this),this.handleImageError_.bind(this)))},e.prototype.setImage=function(t){this.image_=t,this.resolution=Object(h["z"])(this.extent)/this.image_.height},e.prototype.unlistenImage_=function(){this.unlisten_&&(this.unlisten_(),this.unlisten_=null)}})(u);function d(t,e,n){var i=t,o=!0,s=!1,a=!1,u=[Object(f["b"])(i,r["a"].LOAD,(function(){a=!0,s||e()}))];return i.src&&l["c"]?(s=!0,i.decode().then((function(){o&&e()})).catch((function(t){o&&(a?e():n())}))):u.push(Object(f["b"])(i,r["a"].ERROR,n)),function(){o=!1,u.forEach(f["c"])}}},"69f3":function(t,e,n){var r,i,o,s=n("cdce"),a=n("da84"),u=n("861d"),c=n("9112"),l=n("1a2d"),h=n("c6cd"),f=n("f772"),p=n("d012"),d="Object already initialized",g=a.TypeError,y=a.WeakMap,v=function(t){return o(t)?i(t):r(t,{})},_=function(t){return function(e){var n;if(!u(e)||(n=i(e)).type!==t)throw g("Incompatible receiver, "+t+" required");return n}};if(s||h.state){var m=h.state||(h.state=new y);m.get=m.get,m.has=m.has,m.set=m.set,r=function(t,e){if(m.has(t))throw g(d);return e.facade=t,m.set(t,e),e},i=function(t){return m.get(t)||{}},o=function(t){return m.has(t)}}else{var b=f("state");p[b]=!0,r=function(t,e){if(l(t,b))throw g(d);return e.facade=t,c(t,b,e),e},i=function(t){return l(t,b)?t[b]:{}},o=function(t){return l(t,b)}}t.exports={set:r,get:i,has:o,enforce:v,getterFor:_}},"6c77":function(t,e,n){"use strict";n.d(e,"d",(function(){return u})),n.d(e,"a",(function(){return l})),n.d(e,"b",(function(){return h}));var r=n("ce2c"),i=n("83a6"),o=n("8682"),s=n("92fa"),a=function(){function t(t){var e=t||{};this.geometry_=null,this.geometryFunction_=f,void 0!==e.geometry&&this.setGeometry(e.geometry),this.fill_=void 0!==e.fill?e.fill:null,this.image_=void 0!==e.image?e.image:null,this.renderer_=void 0!==e.renderer?e.renderer:null,this.hitDetectionRenderer_=void 0!==e.hitDetectionRenderer?e.hitDetectionRenderer:null,this.stroke_=void 0!==e.stroke?e.stroke:null,this.text_=void 0!==e.text?e.text:null,this.zIndex_=e.zIndex}return t.prototype.clone=function(){var e=this.getGeometry();return e&&"object"===typeof e&&(e=e.clone()),new t({geometry:e,fill:this.getFill()?this.getFill().clone():void 0,image:this.getImage()?this.getImage().clone():void 0,renderer:this.getRenderer(),stroke:this.getStroke()?this.getStroke().clone():void 0,text:this.getText()?this.getText().clone():void 0,zIndex:this.getZIndex()})},t.prototype.getRenderer=function(){return this.renderer_},t.prototype.setRenderer=function(t){this.renderer_=t},t.prototype.setHitDetectionRenderer=function(t){this.hitDetectionRenderer_=t},t.prototype.getHitDetectionRenderer=function(){return this.hitDetectionRenderer_},t.prototype.getGeometry=function(){return this.geometry_},t.prototype.getGeometryFunction=function(){return this.geometryFunction_},t.prototype.getFill=function(){return this.fill_},t.prototype.setFill=function(t){this.fill_=t},t.prototype.getImage=function(){return this.image_},t.prototype.setImage=function(t){this.image_=t},t.prototype.getStroke=function(){return this.stroke_},t.prototype.setStroke=function(t){this.stroke_=t},t.prototype.getText=function(){return this.text_},t.prototype.setText=function(t){this.text_=t},t.prototype.getZIndex=function(){return this.zIndex_},t.prototype.setGeometry=function(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_=f,this.geometry_=t},t.prototype.setZIndex=function(t){this.zIndex_=t},t}();function u(t){var e;if("function"===typeof t)e=t;else{var n;if(Array.isArray(t))n=t;else{Object(s["a"])("function"===typeof t.getZIndex,41);var r=t;n=[r]}e=function(){return n}}return e}var c=null;function l(t,e){if(!c){var n=new i["a"]({color:"rgba(255,255,255,0.4)"}),s=new o["a"]({color:"#3399CC",width:1.25});c=[new a({image:new r["a"]({fill:n,stroke:s,radius:5}),fill:n,stroke:s})]}return c}function h(){var t={},e=[255,255,255,1],n=[0,153,255,1],s=3;return t["Polygon"]=[new a({fill:new i["a"]({color:[255,255,255,.5]})})],t["MultiPolygon"]=t["Polygon"],t["LineString"]=[new a({stroke:new o["a"]({color:e,width:s+2})}),new a({stroke:new o["a"]({color:n,width:s})})],t["MultiLineString"]=t["LineString"],t["Circle"]=t["Polygon"].concat(t["LineString"]),t["Point"]=[new a({image:new r["a"]({radius:2*s,fill:new i["a"]({color:n}),stroke:new o["a"]({color:e,width:s/2})}),zIndex:1/0})],t["MultiPoint"]=t["Point"],t["GeometryCollection"]=t["Polygon"].concat(t["LineString"],t["Point"]),t}function f(t){return t.getGeometry()}e["c"]=a},"6cbf":function(t,e,n){"use strict";var r=n("01d4"),i=n("82b0"),o=n("d202"),s=n("869f"),a=n("ab35"),u=n("5c38"),c=n("92fa"),l=n("0ec0"),h=n("0999"),f=n("3c22"),p=n("6611"),d=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 r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),g=null,y=function(t){function e(e,n,r,i,o,s){var a=t.call(this)||this;return a.hitDetectionImage_=null,a.image_=e||new Image,null!==i&&(a.image_.crossOrigin=i),a.canvas_={},a.color_=s,a.unlisten_=null,a.imageState_=o,a.size_=r,a.src_=n,a.tainted_,a}return d(e,t),e.prototype.isTainted_=function(){if(void 0===this.tainted_&&this.imageState_===s["a"].LOADED){g||(g=Object(h["a"])(1,1)),g.drawImage(this.image_,0,0);try{g.getImageData(0,0,1,1),this.tainted_=!1}catch(t){g=null,this.tainted_=!0}}return!0===this.tainted_},e.prototype.dispatchChangeEvent_=function(){this.dispatchEvent(r["a"].CHANGE)},e.prototype.handleImageError_=function(){this.imageState_=s["a"].ERROR,this.unlistenImage_(),this.dispatchChangeEvent_()},e.prototype.handleImageLoad_=function(){this.imageState_=s["a"].LOADED,this.size_?(this.image_.width=this.size_[0],this.image_.height=this.size_[1]):this.size_=[this.image_.width,this.image_.height],this.unlistenImage_(),this.dispatchChangeEvent_()},e.prototype.getImage=function(t){return this.replaceColor_(t),this.canvas_[t]?this.canvas_[t]:this.image_},e.prototype.getPixelRatio=function(t){return this.replaceColor_(t),this.canvas_[t]?t:1},e.prototype.getImageState=function(){return this.imageState_},e.prototype.getHitDetectionImage=function(){if(!this.hitDetectionImage_)if(this.isTainted_()){var t=this.size_[0],e=this.size_[1],n=Object(h["a"])(t,e);n.fillRect(0,0,t,e),this.hitDetectionImage_=n.canvas}else this.hitDetectionImage_=this.image_;return this.hitDetectionImage_},e.prototype.getSize=function(){return this.size_},e.prototype.getSrc=function(){return this.src_},e.prototype.load=function(){if(this.imageState_==s["a"].IDLE){this.imageState_=s["a"].LOADING;try{this.image_.src=this.src_}catch(t){this.handleImageError_()}this.unlisten_=Object(p["a"])(this.image_,this.handleImageLoad_.bind(this),this.handleImageError_.bind(this))}},e.prototype.replaceColor_=function(t){if(this.color_&&!this.canvas_[t]&&this.imageState_===s["a"].LOADED){var e=document.createElement("canvas");this.canvas_[t]=e,e.width=Math.ceil(this.image_.width*t),e.height=Math.ceil(this.image_.height*t);var n=e.getContext("2d");if(n.scale(t,t),n.drawImage(this.image_,0,0),n.globalCompositeOperation="multiply","multiply"===n.globalCompositeOperation||this.isTainted_())n.fillStyle=Object(u["b"])(this.color_),n.fillRect(0,0,e.width/t,e.height/t),n.globalCompositeOperation="destination-in",n.drawImage(this.image_,0,0);else{for(var r=n.getImageData(0,0,e.width,e.height),i=r.data,o=this.color_[0]/255,a=this.color_[1]/255,c=this.color_[2]/255,l=this.color_[3],h=0,f=i.length;h0,6);var g=void 0!==r.src?s["a"].IDLE:s["a"].LOADED;return n.color_=void 0!==r.color?Object(u["a"])(r.color):null,n.iconImage_=v(p,d,void 0!==n.imgSize_?n.imgSize_:null,n.crossOrigin_,g,n.color_),n.offset_=void 0!==r.offset?r.offset:[0,0],n.offsetOrigin_=void 0!==r.offsetOrigin?r.offsetOrigin:o["a"].TOP_LEFT,n.origin_=null,n.size_=void 0!==r.size?r.size:null,n}return m(e,t),e.prototype.clone=function(){var t=this.getScale();return new e({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_,imgSize:this.imgSize_,offset:this.offset_.slice(),offsetOrigin:this.offsetOrigin_,opacity:this.getOpacity(),rotateWithView:this.getRotateWithView(),rotation:this.getRotation(),scale:Array.isArray(t)?t.slice():t,size:null!==this.size_?this.size_.slice():void 0,src:this.getSrc(),displacement:this.getDisplacement().slice(),declutterMode:this.getDeclutterMode()})},e.prototype.getAnchor=function(){var t=this.normalizedAnchor_;if(!t){t=this.anchor_;var e=this.getSize();if(this.anchorXUnits_==i["a"].FRACTION||this.anchorYUnits_==i["a"].FRACTION){if(!e)return null;t=this.anchor_.slice(),this.anchorXUnits_==i["a"].FRACTION&&(t[0]*=e[0]),this.anchorYUnits_==i["a"].FRACTION&&(t[1]*=e[1])}if(this.anchorOrigin_!=o["a"].TOP_LEFT){if(!e)return null;t===this.anchor_&&(t=this.anchor_.slice()),this.anchorOrigin_!=o["a"].TOP_RIGHT&&this.anchorOrigin_!=o["a"].BOTTOM_RIGHT||(t[0]=-t[0]+e[0]),this.anchorOrigin_!=o["a"].BOTTOM_LEFT&&this.anchorOrigin_!=o["a"].BOTTOM_RIGHT||(t[1]=-t[1]+e[1])}this.normalizedAnchor_=t}var n=this.getDisplacement();return[t[0]-n[0],t[1]+n[1]]},e.prototype.setAnchor=function(t){this.anchor_=t,this.normalizedAnchor_=null},e.prototype.getColor=function(){return this.color_},e.prototype.getImage=function(t){return this.iconImage_.getImage(t)},e.prototype.getPixelRatio=function(t){return this.iconImage_.getPixelRatio(t)},e.prototype.getImageSize=function(){return this.iconImage_.getSize()},e.prototype.getImageState=function(){return this.iconImage_.getImageState()},e.prototype.getHitDetectionImage=function(){return this.iconImage_.getHitDetectionImage()},e.prototype.getOrigin=function(){if(this.origin_)return this.origin_;var t=this.offset_;if(this.offsetOrigin_!=o["a"].TOP_LEFT){var e=this.getSize(),n=this.iconImage_.getSize();if(!e||!n)return null;t=t.slice(),this.offsetOrigin_!=o["a"].TOP_RIGHT&&this.offsetOrigin_!=o["a"].BOTTOM_RIGHT||(t[0]=n[0]-e[0]-t[0]),this.offsetOrigin_!=o["a"].BOTTOM_LEFT&&this.offsetOrigin_!=o["a"].BOTTOM_RIGHT||(t[1]=n[1]-e[1]-t[1])}return this.origin_=t,this.origin_},e.prototype.getSrc=function(){return this.iconImage_.getSrc()},e.prototype.getSize=function(){return this.size_?this.size_:this.iconImage_.getSize()},e.prototype.listenImageChange=function(t){this.iconImage_.addEventListener(r["a"].CHANGE,t)},e.prototype.load=function(){this.iconImage_.load()},e.prototype.unlistenImageChange=function(t){this.iconImage_.removeEventListener(r["a"].CHANGE,t)},e}(a["a"]);e["a"]=b},"6d08":function(t,e,n){(function(e,r,i){t.exports=r(n("21bf"),n("38ba"))})(0,(function(t){return function(e){var n=t,r=n.lib,i=r.CipherParams,o=n.enc,s=o.Hex,a=n.format;a.Hex={stringify:function(t){return t.ciphertext.toString(s)},parse:function(t){var e=s.parse(t);return i.create({ciphertext:e})}}}(),t.format.Hex}))},"6f19":function(t,e,n){var r=n("9112"),i=n("0d26"),o=n("b980"),s=Error.captureStackTrace;t.exports=function(t,e,n,a){o&&(s?s(t,e):r(t,"stack",i(n,a)))}},7156:function(t,e,n){var r=n("1626"),i=n("861d"),o=n("d2bb");t.exports=function(t,e,n){var s,a;return o&&r(s=e.constructor)&&s!==n&&i(a=s.prototype)&&a!==n.prototype&&o(t,a),t}},7234:function(t,e){t.exports=function(t){return null===t||void 0===t}},7238:function(t,e,n){"use strict";var r=n("cef7"),i=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 r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),o=function(t){function e(e,n,r){var i=t.call(this,e)||this;return i.map=n,i.frameState=void 0!==r?r:null,i}return i(e,t),e}(r["a"]);e["a"]=o},"72fe":function(t,e,n){(function(e,r){t.exports=r(n("21bf"))})(0,(function(t){return function(e){var n=t,r=n.lib,i=r.WordArray,o=r.Hasher,s=n.algo,a=[];(function(){for(var t=0;t<64;t++)a[t]=4294967296*e.abs(e.sin(t+1))|0})();var u=s.MD5=o.extend({_doReset:function(){this._hash=new i.init([1732584193,4023233417,2562383102,271733878])},_doProcessBlock:function(t,e){for(var n=0;n<16;n++){var r=e+n,i=t[r];t[r]=16711935&(i<<8|i>>>24)|4278255360&(i<<24|i>>>8)}var o=this._hash.words,s=t[e+0],u=t[e+1],p=t[e+2],d=t[e+3],g=t[e+4],y=t[e+5],v=t[e+6],_=t[e+7],m=t[e+8],b=t[e+9],E=t[e+10],w=t[e+11],x=t[e+12],O=t[e+13],S=t[e+14],C=t[e+15],I=o[0],P=o[1],R=o[2],T=o[3];I=c(I,P,R,T,s,7,a[0]),T=c(T,I,P,R,u,12,a[1]),R=c(R,T,I,P,p,17,a[2]),P=c(P,R,T,I,d,22,a[3]),I=c(I,P,R,T,g,7,a[4]),T=c(T,I,P,R,y,12,a[5]),R=c(R,T,I,P,v,17,a[6]),P=c(P,R,T,I,_,22,a[7]),I=c(I,P,R,T,m,7,a[8]),T=c(T,I,P,R,b,12,a[9]),R=c(R,T,I,P,E,17,a[10]),P=c(P,R,T,I,w,22,a[11]),I=c(I,P,R,T,x,7,a[12]),T=c(T,I,P,R,O,12,a[13]),R=c(R,T,I,P,S,17,a[14]),P=c(P,R,T,I,C,22,a[15]),I=l(I,P,R,T,u,5,a[16]),T=l(T,I,P,R,v,9,a[17]),R=l(R,T,I,P,w,14,a[18]),P=l(P,R,T,I,s,20,a[19]),I=l(I,P,R,T,y,5,a[20]),T=l(T,I,P,R,E,9,a[21]),R=l(R,T,I,P,C,14,a[22]),P=l(P,R,T,I,g,20,a[23]),I=l(I,P,R,T,b,5,a[24]),T=l(T,I,P,R,S,9,a[25]),R=l(R,T,I,P,d,14,a[26]),P=l(P,R,T,I,m,20,a[27]),I=l(I,P,R,T,O,5,a[28]),T=l(T,I,P,R,p,9,a[29]),R=l(R,T,I,P,_,14,a[30]),P=l(P,R,T,I,x,20,a[31]),I=h(I,P,R,T,y,4,a[32]),T=h(T,I,P,R,m,11,a[33]),R=h(R,T,I,P,w,16,a[34]),P=h(P,R,T,I,S,23,a[35]),I=h(I,P,R,T,u,4,a[36]),T=h(T,I,P,R,g,11,a[37]),R=h(R,T,I,P,_,16,a[38]),P=h(P,R,T,I,E,23,a[39]),I=h(I,P,R,T,O,4,a[40]),T=h(T,I,P,R,s,11,a[41]),R=h(R,T,I,P,d,16,a[42]),P=h(P,R,T,I,v,23,a[43]),I=h(I,P,R,T,b,4,a[44]),T=h(T,I,P,R,x,11,a[45]),R=h(R,T,I,P,C,16,a[46]),P=h(P,R,T,I,p,23,a[47]),I=f(I,P,R,T,s,6,a[48]),T=f(T,I,P,R,_,10,a[49]),R=f(R,T,I,P,S,15,a[50]),P=f(P,R,T,I,y,21,a[51]),I=f(I,P,R,T,x,6,a[52]),T=f(T,I,P,R,d,10,a[53]),R=f(R,T,I,P,E,15,a[54]),P=f(P,R,T,I,u,21,a[55]),I=f(I,P,R,T,m,6,a[56]),T=f(T,I,P,R,C,10,a[57]),R=f(R,T,I,P,v,15,a[58]),P=f(P,R,T,I,O,21,a[59]),I=f(I,P,R,T,g,6,a[60]),T=f(T,I,P,R,w,10,a[61]),R=f(R,T,I,P,p,15,a[62]),P=f(P,R,T,I,b,21,a[63]),o[0]=o[0]+I|0,o[1]=o[1]+P|0,o[2]=o[2]+R|0,o[3]=o[3]+T|0},_doFinalize:function(){var t=this._data,n=t.words,r=8*this._nDataBytes,i=8*t.sigBytes;n[i>>>5]|=128<<24-i%32;var o=e.floor(r/4294967296),s=r;n[15+(i+64>>>9<<4)]=16711935&(o<<8|o>>>24)|4278255360&(o<<24|o>>>8),n[14+(i+64>>>9<<4)]=16711935&(s<<8|s>>>24)|4278255360&(s<<24|s>>>8),t.sigBytes=4*(n.length+1),this._process();for(var a=this._hash,u=a.words,c=0;c<4;c++){var l=u[c];u[c]=16711935&(l<<8|l>>>24)|4278255360&(l<<24|l>>>8)}return a},clone:function(){var t=o.clone.call(this);return t._hash=this._hash.clone(),t}});function c(t,e,n,r,i,o,s){var a=t+(e&n|~e&r)+i+s;return(a<>>32-o)+e}function l(t,e,n,r,i,o,s){var a=t+(e&r|n&~r)+i+s;return(a<>>32-o)+e}function h(t,e,n,r,i,o,s){var a=t+(e^n^r)+i+s;return(a<>>32-o)+e}function f(t,e,n,r,i,o,s){var a=t+(n^(e|~r))+i+s;return(a<>>32-o)+e}n.MD5=o._createHelper(u),n.HmacMD5=o._createHmacHelper(u)}(Math),t.MD5}))},7418:function(t,e){e.f=Object.getOwnPropertySymbols},7839:function(t,e){t.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},"78db":function(t,e,n){"use strict";var r=n("dc07"),i=n("0414"),o=n("92fa"),s=n("7fc9"),a=n("0af5"),u=n("2c30"),c=n("c560"),l=n("9f5e"),h=n("345d"),f=[0,0,0],p=5,d=function(){function t(t){var e;if(this.minZoom=void 0!==t.minZoom?t.minZoom:0,this.resolutions_=t.resolutions,Object(o["a"])(Object(l["g"])(this.resolutions_,(function(t,e){return e-t}),!0),17),!t.origins)for(var n=0,s=this.resolutions_.length-1;n=this.minZoom){if(2===this.zoomFactor_?(s=Math.floor(s/2),a=Math.floor(a/2),o=Object(r["a"])(s,s,a,a,n)):o=this.getTileRangeForExtentAndZ(u,c,n),e(c,o))return!0;--c}return!1},t.prototype.getExtent=function(){return this.extent_},t.prototype.getMaxZoom=function(){return this.maxZoom},t.prototype.getMinZoom=function(){return this.minZoom},t.prototype.getOrigin=function(t){return this.origin_?this.origin_:this.origins_[t]},t.prototype.getResolution=function(t){return this.resolutions_[t]},t.prototype.getResolutions=function(){return this.resolutions_},t.prototype.getTileCoordChildTileRange=function(t,e,n){if(t[0]this.maxZoom||e>4,i<128)return h(t,r,e);if(i=o[n.pos++],r|=(127&i)<<3,i<128)return h(t,r,e);if(i=o[n.pos++],r|=(127&i)<<10,i<128)return h(t,r,e);if(i=o[n.pos++],r|=(127&i)<<17,i<128)return h(t,r,e);if(i=o[n.pos++],r|=(127&i)<<24,i<128)return h(t,r,e);if(i=o[n.pos++],r|=(1&i)<<31,i<128)return h(t,r,e);throw new Error("Expected varint not more than 10 bytes")}function l(t){return t.type===i.Bytes?t.readVarint()+t.pos:t.pos+1}function h(t,e,n){return n?4294967296*e+(t>>>0):4294967296*(e>>>0)+(t>>>0)}function f(t,e){var n,r;if(t>=0?(n=t%4294967296|0,r=t/4294967296|0):(n=~(-t%4294967296),r=~(-t/4294967296),4294967295^n?n=n+1|0:(n=0,r=r+1|0)),t>=0x10000000000000000||t<-0x10000000000000000)throw new Error("Given varint doesn't fit into 10 bytes");e.realloc(10),p(n,r,e),d(r,e)}function p(t,e,n){n.buf[n.pos++]=127&t|128,t>>>=7,n.buf[n.pos++]=127&t|128,t>>>=7,n.buf[n.pos++]=127&t|128,t>>>=7,n.buf[n.pos++]=127&t|128,t>>>=7,n.buf[n.pos]=127&t}function d(t,e){var n=(7&t)<<4;e.buf[e.pos++]|=n|((t>>>=3)?128:0),t&&(e.buf[e.pos++]=127&t|((t>>>=7)?128:0),t&&(e.buf[e.pos++]=127&t|((t>>>=7)?128:0),t&&(e.buf[e.pos++]=127&t|((t>>>=7)?128:0),t&&(e.buf[e.pos++]=127&t|((t>>>=7)?128:0),t&&(e.buf[e.pos++]=127&t)))))}function g(t,e,n){var r=e<=16383?1:e<=2097151?2:e<=268435455?3:Math.floor(Math.log(e)/(7*Math.LN2));n.realloc(r);for(var i=n.pos-1;i>=t;i--)n.buf[i+r]=n.buf[i]}function y(t,e){for(var n=0;n>>8,t[n+2]=e>>>16,t[n+3]=e>>>24}function I(t,e){return(t[e]|t[e+1]<<8|t[e+2]<<16)+(t[e+3]<<24)}function P(t,e,n){var r="",i=e;while(i239?4:u>223?3:u>191?2:1;if(i+l>n)break;1===l?u<128&&(c=u):2===l?(o=t[i+1],128===(192&o)&&(c=(31&u)<<6|63&o,c<=127&&(c=null))):3===l?(o=t[i+1],s=t[i+2],128===(192&o)&&128===(192&s)&&(c=(15&u)<<12|(63&o)<<6|63&s,(c<=2047||c>=55296&&c<=57343)&&(c=null))):4===l&&(o=t[i+1],s=t[i+2],a=t[i+3],128===(192&o)&&128===(192&s)&&128===(192&a)&&(c=(15&u)<<18|(63&o)<<12|(63&s)<<6|63&a,(c<=65535||c>=1114112)&&(c=null))),null===c?(c=65533,l=1):c>65535&&(c-=65536,r+=String.fromCharCode(c>>>10&1023|55296),c=56320|1023&c),r+=String.fromCharCode(c),i+=l}return r}function R(t,e,n){return u.decode(t.subarray(e,n))}function T(t,e,n){for(var r,i,o=0;o55295&&r<57344){if(!i){r>56319||o+1===e.length?(t[n++]=239,t[n++]=191,t[n++]=189):i=r;continue}if(r<56320){t[n++]=239,t[n++]=191,t[n++]=189,i=r;continue}r=i-55296<<10|r-56320|65536,i=null}else i&&(t[n++]=239,t[n++]=191,t[n++]=189,i=null);r<128?t[n++]=r:(r<2048?t[n++]=r>>6|192:(r<65536?t[n++]=r>>12|224:(t[n++]=r>>18|240,t[n++]=r>>12&63|128),t[n++]=r>>6&63|128),t[n++]=63&r|128)}return n}i.prototype={destroy:function(){this.buf=null},readFields:function(t,e,n){n=n||this.length;while(this.pos>3,o=this.pos;this.type=7&r,t(i,e,this),this.pos===o&&this.skip(r)}return e},readMessage:function(t,e){return this.readFields(t,e,this.readVarint()+this.pos)},readFixed32:function(){var t=S(this.buf,this.pos);return this.pos+=4,t},readSFixed32:function(){var t=I(this.buf,this.pos);return this.pos+=4,t},readFixed64:function(){var t=S(this.buf,this.pos)+S(this.buf,this.pos+4)*o;return this.pos+=8,t},readSFixed64:function(){var t=S(this.buf,this.pos)+I(this.buf,this.pos+4)*o;return this.pos+=8,t},readFloat:function(){var t=r.read(this.buf,this.pos,!0,23,4);return this.pos+=4,t},readDouble:function(){var t=r.read(this.buf,this.pos,!0,52,8);return this.pos+=8,t},readVarint:function(t){var e,n,r=this.buf;return n=r[this.pos++],e=127&n,n<128?e:(n=r[this.pos++],e|=(127&n)<<7,n<128?e:(n=r[this.pos++],e|=(127&n)<<14,n<128?e:(n=r[this.pos++],e|=(127&n)<<21,n<128?e:(n=r[this.pos],e|=(15&n)<<28,c(e,t,this)))))},readVarint64:function(){return this.readVarint(!0)},readSVarint:function(){var t=this.readVarint();return t%2===1?(t+1)/-2:t/2},readBoolean:function(){return Boolean(this.readVarint())},readString:function(){var t=this.readVarint()+this.pos,e=this.pos;return this.pos=t,t-e>=a&&u?R(this.buf,e,t):P(this.buf,e,t)},readBytes:function(){var t=this.readVarint()+this.pos,e=this.buf.subarray(this.pos,t);return this.pos=t,e},readPackedVarint:function(t,e){if(this.type!==i.Bytes)return t.push(this.readVarint(e));var n=l(this);t=t||[];while(this.pos127);else if(e===i.Bytes)this.pos=this.readVarint()+this.pos;else if(e===i.Fixed32)this.pos+=4;else{if(e!==i.Fixed64)throw new Error("Unimplemented type: "+e);this.pos+=8}},writeTag:function(t,e){this.writeVarint(t<<3|e)},realloc:function(t){var e=this.length||16;while(e268435455||t<0?f(t,this):(this.realloc(4),this.buf[this.pos++]=127&t|(t>127?128:0),t<=127||(this.buf[this.pos++]=127&(t>>>=7)|(t>127?128:0),t<=127||(this.buf[this.pos++]=127&(t>>>=7)|(t>127?128:0),t<=127||(this.buf[this.pos++]=t>>>7&127))))},writeSVarint:function(t){this.writeVarint(t<0?2*-t-1:2*t)},writeBoolean:function(t){this.writeVarint(Boolean(t))},writeString:function(t){t=String(t),this.realloc(4*t.length),this.pos++;var e=this.pos;this.pos=T(this.buf,t,this.pos);var n=this.pos-e;n>=128&&g(e,n,this),this.pos=e-1,this.writeVarint(n),this.pos+=n},writeFloat:function(t){this.realloc(4),r.write(this.buf,t,this.pos,!0,23,4),this.pos+=4},writeDouble:function(t){this.realloc(8),r.write(this.buf,t,this.pos,!0,52,8),this.pos+=8},writeBytes:function(t){var e=t.length;this.writeVarint(e),this.realloc(e);for(var n=0;n=128&&g(n,r,this),this.pos=n-1,this.writeVarint(r),this.pos+=r},writeMessage:function(t,e,n){this.writeTag(t,i.Bytes),this.writeRawMessage(e,n)},writePackedVarint:function(t,e){e.length&&this.writeMessage(t,y,e)},writePackedSVarint:function(t,e){e.length&&this.writeMessage(t,v,e)},writePackedBoolean:function(t,e){e.length&&this.writeMessage(t,b,e)},writePackedFloat:function(t,e){e.length&&this.writeMessage(t,_,e)},writePackedDouble:function(t,e){e.length&&this.writeMessage(t,m,e)},writePackedFixed32:function(t,e){e.length&&this.writeMessage(t,E,e)},writePackedSFixed32:function(t,e){e.length&&this.writeMessage(t,w,e)},writePackedFixed64:function(t,e){e.length&&this.writeMessage(t,x,e)},writePackedSFixed64:function(t,e){e.length&&this.writeMessage(t,O,e)},writeBytesField:function(t,e){this.writeTag(t,i.Bytes),this.writeBytes(e)},writeFixed32Field:function(t,e){this.writeTag(t,i.Fixed32),this.writeFixed32(e)},writeSFixed32Field:function(t,e){this.writeTag(t,i.Fixed32),this.writeSFixed32(e)},writeFixed64Field:function(t,e){this.writeTag(t,i.Fixed64),this.writeFixed64(e)},writeSFixed64Field:function(t,e){this.writeTag(t,i.Fixed64),this.writeSFixed64(e)},writeVarintField:function(t,e){this.writeTag(t,i.Varint),this.writeVarint(e)},writeSVarintField:function(t,e){this.writeTag(t,i.Varint),this.writeSVarint(e)},writeStringField:function(t,e){this.writeTag(t,i.Bytes),this.writeString(e)},writeFloatField:function(t,e){this.writeTag(t,i.Fixed32),this.writeFloat(e)},writeDoubleField:function(t,e){this.writeTag(t,i.Fixed64),this.writeDouble(e)},writeBooleanField:function(t,e){this.writeVarintField(t,Boolean(e))}}},"7a09":function(t,e,n){"use strict";var r=n("521b"),i=n("9abc"),o=n("9769"),s=n("0af5"),a=n("abb7"),u=n("1c48"),c=n("9f5e"),l=n("fd4d"),h=n("bb6c"),f=n("b1a2"),p=n("c560"),d=n("5938"),g=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 r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),y=function(t){function e(e,n){var r=t.call(this)||this;return r.flatMidpoint_=null,r.flatMidpointRevision_=-1,r.maxDelta_=-1,r.maxDeltaRevision_=-1,void 0===n||Array.isArray(e[0])?r.setCoordinates(e,n):r.setFlatCoordinates(n,e),r}return g(e,t),e.prototype.appendCoordinate=function(t){this.flatCoordinates?Object(c["c"])(this.flatCoordinates,t):this.flatCoordinates=t.slice(),this.changed()},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,r){return r1?(n=i,r=o):c>0&&(n+=s*c,r+=u*c)}return a(t,e,n,r)}function a(t,e,n,r){var i=n-t,o=r-e;return i*i+o*o}function u(t){for(var e=t.length,n=0;ni&&(i=s,r=o)}if(0===i)return null;var a=t[r];t[r]=t[n],t[n]=a;for(var u=n+1;u=0;f--){h[f]=t[f][e]/t[f][f];for(var p=f-1;p>=0;p--)t[p][e]-=t[p][f]*h[f]}return h}function c(t){return 180*t/Math.PI}function l(t){return t*Math.PI/180}function h(t,e){var n=t%e;return n*e<0?n+e:n}function f(t,e,n){return t+n*(e-t)}function p(t,e){var n=Math.pow(10,e);return Math.round(t*n)/n}function d(t,e){return Math.floor(p(t,e))}function g(t,e){return Math.ceil(p(t,e))}},"7fd1":function(t,e,n){"use strict";(function(t){function r(){var e='const e="function"==typeof Object.assign?Object.assign:function(e,n){if(null==e)throw new TypeError("Cannot convert undefined or null to object");const t=Object(e);for(let e=1,n=arguments.length;e=0||n.match(/cpu (os|iphone os) 15_4 like mac os x/)),-1!==n.indexOf("webkit")&&n.indexOf("edge"),n.indexOf("macintosh"),"undefined"!=typeof WorkerGlobalScope&&"undefined"!=typeof OffscreenCanvas&&(self,WorkerGlobalScope),function(){let e=!1;try{const n=Object.defineProperty({},"passive",{get:function(){e=!0}});window.addEventListener("_",null,n),window.removeEventListener("_",null,n)}catch(e){}}(),new Array(6);const t="GENERATE_BUFFERS",o=[],r={vertexPosition:0,indexPosition:0};function i(e,n,t,o,r){e[n+0]=t,e[n+1]=o,e[n+2]=r}function s(e,n,t,s,f,c){const l=3+f,a=e[n+0],u=e[n+1],d=o;d.length=f;for(let t=0;t{const o=n.data;if(o.type===t){const n=3,t=2,r=o.customAttributesCount,i=t+r,c=new Float32Array(o.renderInstructions),l=c.length/i,a=4*l*(r+n),u=new Uint32Array(6*l),d=new Float32Array(a);let g;for(let e=0;e */ e.read=function(t,e,n,r,i){var o,s,a=8*i-r-1,u=(1<>1,l=-7,h=n?i-1:0,f=n?-1:1,p=t[e+h];for(h+=f,o=p&(1<<-l)-1,p>>=-l,l+=a;l>0;o=256*o+t[e+h],h+=f,l-=8);for(s=o&(1<<-l)-1,o>>=-l,l+=r;l>0;s=256*s+t[e+h],h+=f,l-=8);if(0===o)o=1-c;else{if(o===u)return s?NaN:1/0*(p?-1:1);s+=Math.pow(2,r),o-=c}return(p?-1:1)*s*Math.pow(2,o-r)},e.write=function(t,e,n,r,i,o){var s,a,u,c=8*o-i-1,l=(1<>1,f=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,p=r?0:o-1,d=r?1:-1,g=e<0||0===e&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(a=isNaN(e)?1:0,s=l):(s=Math.floor(Math.log(e)/Math.LN2),e*(u=Math.pow(2,-s))<1&&(s--,u*=2),e+=s+h>=1?f/u:f*Math.pow(2,1-h),e*u>=2&&(s++,u/=2),s+h>=l?(a=0,s=l):s+h>=1?(a=(e*u-1)*Math.pow(2,i),s+=h):(a=e*Math.pow(2,h-1)*Math.pow(2,i),s=0));i>=8;t[n+p]=255&a,p+=d,a/=256,i-=8);for(s=s<0;t[n+p]=255&s,p+=d,s/=256,c-=8);t[n+p-d]|=128*g}},9159:function(t,e,n){"use strict";n.d(e,"a",(function(){return i}));var r=n("0af5");function i(t,e,n,i){for(var o=[],s=Object(r["j"])(),a=0,u=n.length;a0&&this.getCount()>this.highWaterMark},t.prototype.expireCache=function(t){while(this.canExpireCache())this.pop()},t.prototype.clear=function(){this.count_=0,this.entries_={},this.oldest_=null,this.newest_=null},t.prototype.containsKey=function(t){return this.entries_.hasOwnProperty(t)},t.prototype.forEach=function(t){var e=this.oldest_;while(e)t(e.value_,e.key_,this),e=e.newer},t.prototype.get=function(t,e){var n=this.entries_[t];return Object(s["a"])(void 0!==n,15),n===this.newest_||(n===this.oldest_?(this.oldest_=this.oldest_.newer,this.oldest_.older=null):(n.newer.older=n.older,n.older.newer=n.newer),n.newer=null,n.older=this.newest_,this.newest_.newer=n,this.newest_=n),n.value_},t.prototype.remove=function(t){var e=this.entries_[t];return Object(s["a"])(void 0!==e,15),e===this.newest_?(this.newest_=e.older,this.newest_&&(this.newest_.newer=null)):e===this.oldest_?(this.oldest_=e.newer,this.oldest_&&(this.oldest_.older=null)):(e.newer.older=e.older,e.older.newer=e.newer),delete this.entries_[t],--this.count_,e.value_},t.prototype.getCount=function(){return this.count_},t.prototype.getKeys=function(){var t,e=new Array(this.count_),n=0;for(t=this.newest_;t;t=t.older)e[n++]=t.key_;return e},t.prototype.getValues=function(){var t,e=new Array(this.count_),n=0;for(t=this.newest_;t;t=t.older)e[n++]=t.value_;return e},t.prototype.peekLast=function(){return this.oldest_.value_},t.prototype.peekLastKey=function(){return this.oldest_.key_},t.prototype.peekFirstKey=function(){return this.newest_.key_},t.prototype.peek=function(t){if(this.containsKey(t))return this.entries_[t].value_},t.prototype.pop=function(){var t=this.oldest_;return delete this.entries_[t.key_],t.newer&&(t.newer.older=null),this.oldest_=t.newer,this.oldest_||(this.newest_=null),--this.count_,t.value_},t.prototype.replace=function(t,e){this.get(t),this.entries_[t].value_=e},t.prototype.set=function(t,e){Object(s["a"])(!(t in this.entries_),16);var n={key_:t,newer:null,older:this.newest_,value_:e};this.newest_?this.newest_.newer=n:this.oldest_=n,this.newest_=n,this.entries_[t]=n,++this.count_},t.prototype.setSize=function(t){this.highWaterMark=t},t}(),u=a,c=n("2c30"),l=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 r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),h=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return l(e,t),e.prototype.expireCache=function(t){while(this.canExpireCache()){var e=this.peekLast();if(e.getKey()in t)break;this.pop().release()}},e.prototype.pruneExceptNewestZ=function(){if(0!==this.getCount()){var t=this.peekFirstKey(),e=Object(c["b"])(t),n=e[0];this.forEach(function(t){t.tileCoord[0]!==n&&(this.remove(Object(c["c"])(t.tileCoord)),t.release())}.bind(this))}},e}(u),f=h,p=n("acc1"),d={TILELOADSTART:"tileloadstart",TILELOADEND:"tileloadend",TILELOADERROR:"tileloaderror"},g=n("cef7"),y=n("ff80"),v=n("1300"),_=n("256f"),m=n("089b"),b=n("345d"),E=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 r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),w=function(t){function e(e){var n=t.call(this,{attributions:e.attributions,attributionsCollapsible:e.attributionsCollapsible,projection:e.projection,state:e.state,wrapX:e.wrapX,interpolate:e.interpolate})||this;n.on,n.once,n.un,n.opaque_=void 0!==e.opaque&&e.opaque,n.tilePixelRatio_=void 0!==e.tilePixelRatio?e.tilePixelRatio:1,n.tileGrid=void 0!==e.tileGrid?e.tileGrid:null;var r=[256,256];return n.tileGrid&&Object(b["c"])(n.tileGrid.getTileSize(n.tileGrid.getMinZoom()),r),n.tileCache=new f(e.cacheSize||0),n.tmpSize=[0,0],n.key_=e.key||"",n.tileOptions={transition:e.transition,interpolate:e.interpolate},n.zDirection=e.zDirection?e.zDirection:0,n}return E(e,t),e.prototype.canExpireCache=function(){return this.tileCache.canExpireCache()},e.prototype.expireCache=function(t,e){var n=this.getTileCacheForProjection(t);n&&n.expireCache(e)},e.prototype.forEachLoadedTile=function(t,e,n,r){var i=this.getTileCacheForProjection(t);if(!i)return!1;for(var o,s,a,u=!0,l=n.minX;l<=n.maxX;++l)for(var h=n.minY;h<=n.maxY;++h)s=Object(c["d"])(e,l,h),a=!1,i.containsKey(s)&&(o=i.get(s),a=o.getState()===p["a"].LOADED,a&&(a=!1!==r(o))),a||(u=!1);return u},e.prototype.getGutterForProjection=function(t){return 0},e.prototype.getKey=function(){return this.key_},e.prototype.setKey=function(t){this.key_!==t&&(this.key_=t,this.changed())},e.prototype.getOpaque=function(t){return this.opaque_},e.prototype.getResolutions=function(){return this.tileGrid?this.tileGrid.getResolutions():null},e.prototype.getTile=function(t,e,n,r,i){return Object(v["b"])()},e.prototype.getTileGrid=function(){return this.tileGrid},e.prototype.getTileGridForProjection=function(t){return this.tileGrid?this.tileGrid:Object(m["c"])(t)},e.prototype.getTileCacheForProjection=function(t){var e=this.getProjection();return Object(s["a"])(null===e||Object(_["d"])(e,t),68),this.tileCache},e.prototype.getTilePixelRatio=function(t){return this.tilePixelRatio_},e.prototype.getTilePixelSize=function(t,e,n){var r=this.getTileGridForProjection(n),i=this.getTilePixelRatio(e),o=Object(b["c"])(r.getTileSize(t),this.tmpSize);return 1==i?o:Object(b["b"])(o,i,this.tmpSize)},e.prototype.getTileCoordForTileUrlFunction=function(t,e){var n=void 0!==e?e:this.getProjection(),r=this.getTileGridForProjection(n);return this.getWrapX()&&n.isGlobal()&&(t=Object(m["d"])(r,t,n)),Object(c["f"])(t,r)?t:null},e.prototype.clear=function(){this.tileCache.clear()},e.prototype.refresh=function(){this.clear(),t.prototype.refresh.call(this)},e.prototype.updateCacheSize=function(t,e){var n=this.getTileCacheForProjection(e);t>n.highWaterMark&&(n.highWaterMark=t)},e.prototype.useTile=function(t,e,n,r){},e}(y["a"]),x=function(t){function e(e,n){var r=t.call(this,e)||this;return r.tile=n,r}return E(e,t),e}(g["a"]),O=w,S=n("9cff"),C=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 r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),I=function(t){function e(n){var r=t.call(this,{attributions:n.attributions,cacheSize:n.cacheSize,opaque:n.opaque,projection:n.projection,state:n.state,tileGrid:n.tileGrid,tilePixelRatio:n.tilePixelRatio,wrapX:n.wrapX,transition:n.transition,interpolate:n.interpolate,key:n.key,attributionsCollapsible:n.attributionsCollapsible,zDirection:n.zDirection})||this;return r.generateTileUrlFunction_=r.tileUrlFunction===e.prototype.tileUrlFunction,r.tileLoadFunction=n.tileLoadFunction,n.tileUrlFunction&&(r.tileUrlFunction=n.tileUrlFunction),r.urls=null,n.urls?r.setUrls(n.urls):n.url&&r.setUrl(n.url),r.tileLoadingKeys_={},r}return C(e,t),e.prototype.getTileLoadFunction=function(){return this.tileLoadFunction},e.prototype.getTileUrlFunction=function(){return Object.getPrototypeOf(this).tileUrlFunction===this.tileUrlFunction?this.tileUrlFunction.bind(this):this.tileUrlFunction},e.prototype.getUrls=function(){return this.urls},e.prototype.handleTileChange=function(t){var e,n=t.target,r=Object(v["c"])(n),i=n.getState();i==p["a"].LOADING?(this.tileLoadingKeys_[r]=!0,e=d.TILELOADSTART):r in this.tileLoadingKeys_&&(delete this.tileLoadingKeys_[r],e=i==p["a"].ERROR?d.TILELOADERROR:i==p["a"].LOADED?d.TILELOADEND:void 0),void 0!=e&&this.dispatchEvent(new x(e,n))},e.prototype.setTileLoadFunction=function(t){this.tileCache.clear(),this.tileLoadFunction=t,this.changed()},e.prototype.setTileUrlFunction=function(t,e){this.tileUrlFunction=t,this.tileCache.pruneExceptNewestZ(),"undefined"!==typeof e?this.setKey(e):this.changed()},e.prototype.setUrl=function(t){var e=Object(S["c"])(t);this.urls=e,this.setUrls(e)},e.prototype.setUrls=function(t){this.urls=t;var e=t.join("\n");this.generateTileUrlFunction_?this.setTileUrlFunction(Object(S["a"])(t,this.tileGrid),e):this.setKey(e)},e.prototype.tileUrlFunction=function(t,e,n){},e.prototype.useTile=function(t,e,n){var r=Object(c["d"])(t,e,n);this.tileCache.containsKey(r)&&this.tileCache.get(r)},e}(O),P=I,R=n("a504"),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 r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),L=function(t){function e(e){var n=this,r=void 0===e.imageSmoothing||e.imageSmoothing;return void 0!==e.interpolate&&(r=e.interpolate),n=t.call(this,{attributions:e.attributions,cacheSize:e.cacheSize,opaque:e.opaque,projection:e.projection,state:e.state,tileGrid:e.tileGrid,tileLoadFunction:e.tileLoadFunction?e.tileLoadFunction:M,tilePixelRatio:e.tilePixelRatio,tileUrlFunction:e.tileUrlFunction,url:e.url,urls:e.urls,wrapX:e.wrapX,transition:e.transition,interpolate:r,key:e.key,attributionsCollapsible:e.attributionsCollapsible,zDirection:e.zDirection})||this,n.crossOrigin=void 0!==e.crossOrigin?e.crossOrigin:null,n.tileClass=void 0!==e.tileClass?e.tileClass:i["a"],n.tileCacheForProjection={},n.tileGridForProjection={},n.reprojectionErrorThreshold_=e.reprojectionErrorThreshold,n.renderReprojectionEdges_=!1,n}return T(e,t),e.prototype.canExpireCache=function(){if(!R["a"])return t.prototype.canExpireCache.call(this);if(this.tileCache.canExpireCache())return!0;for(var e in this.tileCacheForProjection)if(this.tileCacheForProjection[e].canExpireCache())return!0;return!1},e.prototype.expireCache=function(e,n){if(R["a"]){var r=this.getTileCacheForProjection(e);for(var i in this.tileCache.expireCache(this.tileCache==r?n:{}),this.tileCacheForProjection){var o=this.tileCacheForProjection[i];o.expireCache(o==r?n:{})}}else t.prototype.expireCache.call(this,e,n)},e.prototype.getGutterForProjection=function(t){return R["a"]&&this.getProjection()&&t&&!Object(_["d"])(this.getProjection(),t)?0:this.getGutter()},e.prototype.getGutter=function(){return 0},e.prototype.getKey=function(){var e=t.prototype.getKey.call(this);return this.getInterpolate()||(e+=":disable-interpolation"),e},e.prototype.getOpaque=function(e){return!(R["a"]&&this.getProjection()&&e&&!Object(_["d"])(this.getProjection(),e))&&t.prototype.getOpaque.call(this,e)},e.prototype.getTileGridForProjection=function(e){if(!R["a"])return t.prototype.getTileGridForProjection.call(this,e);var n=this.getProjection();if(!this.tileGrid||n&&!Object(_["d"])(n,e)){var r=Object(v["c"])(e);return r in this.tileGridForProjection||(this.tileGridForProjection[r]=Object(m["c"])(e)),this.tileGridForProjection[r]}return this.tileGrid},e.prototype.getTileCacheForProjection=function(e){if(!R["a"])return t.prototype.getTileCacheForProjection.call(this,e);var n=this.getProjection();if(!n||Object(_["d"])(n,e))return this.tileCache;var r=Object(v["c"])(e);return r in this.tileCacheForProjection||(this.tileCacheForProjection[r]=new f(this.tileCache.highWaterMark)),this.tileCacheForProjection[r]},e.prototype.createTile_=function(t,e,n,i,o,s){var a=[t,e,n],u=this.getTileCoordForTileUrlFunction(a,o),c=u?this.tileUrlFunction(u,i,o):void 0,l=new this.tileClass(a,void 0!==c?p["a"].IDLE:p["a"].EMPTY,void 0!==c?c:"",this.crossOrigin,this.tileLoadFunction,this.tileOptions);return l.key=s,l.addEventListener(r["a"].CHANGE,this.handleTileChange.bind(this)),l},e.prototype.getTile=function(t,e,n,r,i){var s=this.getProjection();if(R["a"]&&s&&i&&!Object(_["d"])(s,i)){var a=this.getTileCacheForProjection(i),u=[t,e,n],l=void 0,h=Object(c["c"])(u);a.containsKey(h)&&(l=a.get(h));var f=this.getKey();if(l&&l.key==f)return l;var p=this.getTileGridForProjection(s),d=this.getTileGridForProjection(i),g=this.getTileCoordForTileUrlFunction(u,i),y=new o["a"](s,p,i,d,u,g,this.getTilePixelRatio(r),this.getGutter(),function(t,e,n,r){return this.getTileInternal(t,e,n,r,s)}.bind(this),this.reprojectionErrorThreshold_,this.renderReprojectionEdges_,this.getInterpolate());return y.key=f,l?(y.interimTile=l,y.refreshInterimChain(),a.replace(h,y)):a.set(h,y),y}return this.getTileInternal(t,e,n,r,s||i)},e.prototype.getTileInternal=function(t,e,n,r,i){var o=null,s=Object(c["d"])(t,e,n),a=this.getKey();if(this.tileCache.containsKey(s)){if(o=this.tileCache.get(s),o.key!=a){var u=o;o=this.createTile_(t,e,n,r,i,a),u.getState()==p["a"].IDLE?o.interimTile=u.interimTile:o.interimTile=u,o.refreshInterimChain(),this.tileCache.replace(s,o)}}else o=this.createTile_(t,e,n,r,i,a),this.tileCache.set(s,o);return o},e.prototype.setRenderReprojectionEdges=function(t){if(R["a"]&&this.renderReprojectionEdges_!=t){for(var e in this.renderReprojectionEdges_=t,this.tileCacheForProjection)this.tileCacheForProjection[e].clear();this.changed()}},e.prototype.setTileGridForProjection=function(t,e){if(R["a"]){var n=Object(_["h"])(t);if(n){var r=Object(v["c"])(n);r in this.tileGridForProjection||(this.tileGridForProjection[r]=e)}}},e}(P);function M(t,e){t.getImage().src=e}e["a"]=L},"92fa":function(t,e,n){"use strict";n.d(e,"a",(function(){return i}));var r=n("835b");function i(t,e){if(!t)throw new r["a"](e)}},"94ca":function(t,e,n){var r=n("d039"),i=n("1626"),o=/#|\.prototype\./,s=function(t,e){var n=u[a(t)];return n==l||n!=c&&(i(e)?r(e):!!e)},a=s.normalize=function(t){return String(t).replace(o,".").toLowerCase()},u=s.data={},c=s.NATIVE="N",l=s.POLYFILL="P";t.exports=s},"94f8":function(t,e,n){(function(e,r){t.exports=r(n("21bf"))})(0,(function(t){return function(e){var n=t,r=n.lib,i=r.WordArray,o=r.Hasher,s=n.algo,a=[],u=[];(function(){function t(t){for(var n=e.sqrt(t),r=2;r<=n;r++)if(!(t%r))return!1;return!0}function n(t){return 4294967296*(t-(0|t))|0}var r=2,i=0;while(i<64)t(r)&&(i<8&&(a[i]=n(e.pow(r,.5))),u[i]=n(e.pow(r,1/3)),i++),r++})();var c=[],l=s.SHA256=o.extend({_doReset:function(){this._hash=new i.init(a.slice(0))},_doProcessBlock:function(t,e){for(var n=this._hash.words,r=n[0],i=n[1],o=n[2],s=n[3],a=n[4],l=n[5],h=n[6],f=n[7],p=0;p<64;p++){if(p<16)c[p]=0|t[e+p];else{var d=c[p-15],g=(d<<25|d>>>7)^(d<<14|d>>>18)^d>>>3,y=c[p-2],v=(y<<15|y>>>17)^(y<<13|y>>>19)^y>>>10;c[p]=g+c[p-7]+v+c[p-16]}var _=a&l^~a&h,m=r&i^r&o^i&o,b=(r<<30|r>>>2)^(r<<19|r>>>13)^(r<<10|r>>>22),E=(a<<26|a>>>6)^(a<<21|a>>>11)^(a<<7|a>>>25),w=f+E+_+u[p]+c[p],x=b+m;f=h,h=l,l=a,a=s+w|0,s=o,o=i,i=r,r=w+x|0}n[0]=n[0]+r|0,n[1]=n[1]+i|0,n[2]=n[2]+o|0,n[3]=n[3]+s|0,n[4]=n[4]+a|0,n[5]=n[5]+l|0,n[6]=n[6]+h|0,n[7]=n[7]+f|0},_doFinalize:function(){var t=this._data,n=t.words,r=8*this._nDataBytes,i=8*t.sigBytes;return n[i>>>5]|=128<<24-i%32,n[14+(i+64>>>9<<4)]=e.floor(r/4294967296),n[15+(i+64>>>9<<4)]=r,t.sigBytes=4*n.length,this._process(),this._hash},clone:function(){var t=o.clone.call(this);return t._hash=this._hash.clone(),t}});n.SHA256=o._createHelper(l),n.HmacSHA256=o._createHmacHelper(l)}(Math),t.SHA256}))},9769:function(t,e,n){"use strict";n.d(e,"e",(function(){return o})),n.d(e,"a",(function(){return s})),n.d(e,"f",(function(){return a})),n.d(e,"d",(function(){return u})),n.d(e,"b",(function(){return c})),n.d(e,"c",(function(){return l}));var r=n("7fc9");function i(t,e,n,i,o,s,a){var u,c=t[e],l=t[e+1],h=t[n]-c,f=t[n+1]-l;if(0===h&&0===f)u=e;else{var p=((o-c)*h+(s-l)*f)/(h*h+f*f);if(p>1)u=n;else{if(p>0){for(var d=0;do&&(o=l),s=u,a=c}return o}function s(t,e,n,r,i){for(var s=0,a=n.length;s>1),o=+s(t[r],e),o<0?a=r+1:(u=r,c=!o);return c?a:~a}function i(t,e){return t>e?1:t=0}function s(t,e,n){var r=t.length;if(t[0]<=e)return 0;if(e<=t[r-1])return r-1;var i=void 0;if(n>0){for(i=1;i0?i-1:i:t[i-1]-e>>0,i=0;i0||n&&0===o)}))}n.d(e,"a",(function(){return r})),n.d(e,"i",(function(){return i})),n.d(e,"f",(function(){return o})),n.d(e,"h",(function(){return s})),n.d(e,"j",(function(){return a})),n.d(e,"c",(function(){return u})),n.d(e,"d",(function(){return c})),n.d(e,"b",(function(){return l})),n.d(e,"e",(function(){return h})),n.d(e,"g",(function(){return f}))},a04b:function(t,e,n){var r=n("c04e"),i=n("d9b5");t.exports=function(t){var e=r(t,"string");return i(e)?e:e+""}},a11b:function(t,e,n){(function(e,r,i){t.exports=r(n("21bf"),n("38ba"))})(0,(function(t){return t.pad.Iso10126={pad:function(e,n){var r=4*n,i=r-e.sigBytes%r;e.concat(t.lib.WordArray.random(i-1)).concat(t.lib.WordArray.create([i<<24],1))},unpad:function(t){var e=255&t.words[t.sigBytes-1>>>2];t.sigBytes-=e}},t.pad.Iso10126}))},a2c7:function(t,e,n){"use strict";var r=n("e269"),i=n("fced"),o=n("496f"),s={CENTER:"center",RESOLUTION:"resolution",ROTATION:"rotation"},a=n("0414"),u=n("256f"),c=n("57cb"),l=n("a568"),h=n("92fa"),f=n("38f3"),p=n("7fc9");function d(t,e,n){return function(r,i,o,s,a){if(r){if(!i&&!e)return r;var u=e?0:o[0]*i,c=e?0:o[1]*i,l=a?a[0]:0,h=a?a[1]:0,f=t[0]+u/2+l,d=t[2]-u/2+l,g=t[1]+c/2+h,y=t[3]-c/2+h;f>d&&(f=(d+f)/2,d=f),g>y&&(g=(y+g)/2,y=g);var v=Object(p["b"])(r[0],f,d),_=Object(p["b"])(r[1],g,y);if(s&&n&&i){var m=30*i;v+=-m*Math.log(1+Math.max(0,f-r[0])/m)+m*Math.log(1+Math.max(0,r[0]-d)/m),_+=-m*Math.log(1+Math.max(0,g-r[1])/m)+m*Math.log(1+Math.max(0,r[1]-y)/m)}return[v,_]}}}function g(t){return t}var y=n("0af5"),v=n("9f5e");function _(t,e,n,r){var i=Object(y["E"])(e)/n[0],o=Object(y["z"])(e)/n[1];return r?Math.min(t,Math.max(i,o)):Math.min(t,Math.min(i,o))}function m(t,e,n){var r=Math.min(t,e),i=50;return r*=Math.log(1+i*Math.max(0,t/e-1))/i+1,n&&(r=Math.max(r,n),r/=Math.log(1+i*Math.max(0,n/t-1))/i+1),Object(p["b"])(r,n/2,2*e)}function b(t,e,n,r){return function(i,o,s,a){if(void 0!==i){var u=t[0],c=t[t.length-1],l=n?_(u,n,s,r):u;if(a){var h=void 0===e||e;return h?m(i,l,c):Object(p["b"])(i,c,l)}var f=Math.min(l,i),d=Math.floor(Object(v["h"])(t,f,o));return t[d]>l&&d1&&"function"===typeof arguments[n-1]&&(e=arguments[n-1],--n);for(var r=0;r0},e.prototype.getInteracting=function(){return this.hints_[o["a"].INTERACTING]>0},e.prototype.cancelAnimations=function(){var t;this.setHint(o["a"].ANIMATING,-this.hints_[o["a"].ANIMATING]);for(var e=0,n=this.animations_.length;e=0;--n){for(var r=this.animations_[n],i=!0,s=0,a=r.length;s0?c/u.duration:1;l>=1?(u.complete=!0,l=1):i=!1;var h=u.easing(l);if(u.sourceCenter){var f=u.sourceCenter[0],d=u.sourceCenter[1],g=u.targetCenter[0],y=u.targetCenter[1];this.nextCenter_=u.targetCenter;var v=f+h*(g-f),_=d+h*(y-d);this.targetCenter_=[v,_]}if(u.sourceResolution&&u.targetResolution){var m=1===h?u.targetResolution:u.sourceResolution+h*(u.targetResolution-u.sourceResolution);if(u.anchor){var b=this.getViewportSize_(this.getRotation()),E=this.constraints_.resolution(m,0,b,!0);this.targetCenter_=this.calculateCenterZoom(E,u.anchor)}this.nextResolution_=u.targetResolution,this.targetResolution_=m,this.applyTargetState_(!0)}if(void 0!==u.sourceRotation&&void 0!==u.targetRotation){var w=1===h?Object(p["g"])(u.targetRotation+Math.PI,2*Math.PI)-Math.PI:u.sourceRotation+h*(u.targetRotation-u.sourceRotation);if(u.anchor){var x=this.constraints_.rotation(w,!0);this.targetCenter_=this.calculateCenterRotate(x,u.anchor)}this.nextRotation_=u.targetRotation,this.targetRotation_=w}if(this.applyTargetState_(!0),e=!0,!u.complete)break}}if(i){this.animations_[n]=null,this.setHint(o["a"].ANIMATING,-1),this.nextCenter_=null,this.nextResolution_=NaN,this.nextRotation_=NaN;var O=r[0].callback;O&&R(O,!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,r=this.getCenterInternal();return void 0!==r&&(n=[r[0]-e[0],r[1]-e[1]],Object(l["d"])(n,t-this.getRotation()),Object(l["a"])(n,e)),n},e.prototype.calculateCenterZoom=function(t,e){var n,r=this.getCenterInternal(),i=this.getResolution();if(void 0!==r&&void 0!==i){var o=e[0]-t*(e[0]-r[0])/i,s=e[1]-t*(e[1]-r[1])/i;n=[o,s]}return n},e.prototype.getViewportSize_=function(t){var e=this.viewportSize_;if(t){var n=e[0],r=e[1];return[Math.abs(n*Math.cos(t))+Math.abs(r*Math.sin(t)),Math.abs(n*Math.sin(t))+Math.abs(r*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?Object(u["m"])(t,this.getProjection()):t},e.prototype.getCenterInternal=function(){return this.get(s.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 Object(u["n"])(e,this.getProjection())},e.prototype.calculateExtentInternal=function(t){var e=t||this.getViewportSizeMinusPadding_(),n=this.getCenterInternal();Object(h["a"])(n,1);var r=this.getResolution();Object(h["a"])(void 0!==r,2);var i=this.getRotation();return Object(h["a"])(void 0!==i,3),Object(y["y"])(n,r,i,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(s.RESOLUTION)},e.prototype.getResolutions=function(){return this.resolutions_},e.prototype.getResolutionForExtent=function(t,e){return this.getResolutionForExtentInternal(Object(u["f"])(t,this.getProjection()),e)},e.prototype.getResolutionForExtentInternal=function(t,e){var n=e||this.getViewportSizeMinusPadding_(),r=Object(y["E"])(t)/n[0],i=Object(y["z"])(t)/n[1];return Math.max(r,i)},e.prototype.getResolutionForValueFunction=function(t){var e=t||2,n=this.getConstrainedResolution(this.maxResolution_),r=this.minResolution_,i=Math.log(n/r)/Math.log(e);return function(t){var r=n/Math.pow(e,t*i);return r}},e.prototype.getRotation=function(){return this.get(s.ROTATION)},e.prototype.getValueForResolutionFunction=function(t){var e=Math.log(t||2),n=this.getConstrainedResolution(this.maxResolution_),r=this.minResolution_,i=Math.log(n/r)/e;return function(t){var r=Math.log(n/t)/e/i;return r}},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(),r=this.getCenterInternal(),i=this.padding_;if(i){var o=this.getViewportSizeMinusPadding_();r=A(r,this.getViewportSize_(),[o[0]/2+i[3],o[1]/2+i[0]],e,n)}return{center:r.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,r=this.minZoom_||0;if(this.resolutions_){var i=Object(v["h"])(this.resolutions_,t,1);r=i,e=this.resolutions_[i],n=i==this.resolutions_.length-1?2:e/this.resolutions_[i+1]}else e=this.maxResolution_,n=this.zoomFactor_;return r+Math.log(e/t)/Math.log(n)},e.prototype.getResolutionForZoom=function(t){if(this.resolutions_){if(this.resolutions_.length<=1)return 0;var e=Object(p["b"])(Math.floor(t),0,this.resolutions_.length-2),n=this.resolutions_[e]/this.resolutions_[e+1];return this.resolutions_[e]/Math.pow(n,Object(p["b"])(t-e,0,1))}return this.maxResolution_/Math.pow(this.zoomFactor_,t-this.minZoom_)},e.prototype.fit=function(t,e){var n;if(Object(h["a"])(Array.isArray(t)||"function"===typeof t.getSimplifiedGeometry,24),Array.isArray(t)){Object(h["a"])(!Object(y["H"])(t),25);var r=Object(u["f"])(t,this.getProjection());n=Object(S["c"])(r)}else if("Circle"===t.getType()){r=Object(u["f"])(t.getExtent(),this.getProjection());n=Object(S["c"])(r),n.rotate(this.getRotation(),Object(y["w"])(r))}else{var i=Object(u["l"])();n=i?t.clone().transform(i,this.getProjection()):t}this.fitInternal(n,e)},e.prototype.rotatedExtentForGeometry=function(t){for(var e=this.getRotation(),n=Math.cos(e),r=Math.sin(-e),i=t.getFlatCoordinates(),o=t.getStride(),s=1/0,a=1/0,u=-1/0,c=-1/0,l=0,h=i.length;l>>5]>>>31-i%32&1}for(var o=this._subKeys=[],c=0;c<16;c++){var l=o[c]=[],h=u[c];for(r=0;r<24;r++)l[r/6|0]|=n[(a[r]-1+h)%28]<<31-r%6,l[4+(r/6|0)]|=n[28+(a[r+24]-1+h)%28]<<31-r%6;l[0]=l[0]<<1|l[0]>>>31;for(r=1;r<7;r++)l[r]=l[r]>>>4*(r-1)+3;l[7]=l[7]<<5|l[7]>>>27}var f=this._invSubKeys=[];for(r=0;r<16;r++)f[r]=o[15-r]},encryptBlock:function(t,e){this._doCryptBlock(t,e,this._subKeys)},decryptBlock:function(t,e){this._doCryptBlock(t,e,this._invSubKeys)},_doCryptBlock:function(t,e,n){this._lBlock=t[e],this._rBlock=t[e+1],f.call(this,4,252645135),f.call(this,16,65535),p.call(this,2,858993459),p.call(this,8,16711935),f.call(this,1,1431655765);for(var r=0;r<16;r++){for(var i=n[r],o=this._lBlock,s=this._rBlock,a=0,u=0;u<8;u++)a|=c[u][((s^i[u])&l[u])>>>0];this._lBlock=s,this._rBlock=o^a}var h=this._lBlock;this._lBlock=this._rBlock,this._rBlock=h,f.call(this,1,1431655765),p.call(this,8,16711935),p.call(this,2,858993459),f.call(this,16,65535),f.call(this,4,252645135),t[e]=this._lBlock,t[e+1]=this._rBlock},keySize:2,ivSize:2,blockSize:2});function f(t,e){var n=(this._lBlock>>>t^this._rBlock)&e;this._rBlock^=n,this._lBlock^=n<>>t^this._lBlock)&e;this._lBlock^=n,this._rBlock^=n<192.");var n=e.slice(0,2),i=e.length<4?e.slice(0,2):e.slice(2,4),o=e.length<6?e.slice(0,2):e.slice(4,6);this._des1=h.createEncryptor(r.create(n)),this._des2=h.createEncryptor(r.create(i)),this._des3=h.createEncryptor(r.create(o))},encryptBlock:function(t,e){this._des1.encryptBlock(t,e),this._des2.decryptBlock(t,e),this._des3.encryptBlock(t,e)},decryptBlock:function(t,e){this._des3.decryptBlock(t,e),this._des2.encryptBlock(t,e),this._des1.decryptBlock(t,e)},keySize:6,ivSize:2,blockSize:2});e.TripleDES=i._createHelper(d)}(),t.TripleDES}))},a43f:function(t,e,n){"use strict";e["a"]={ADDFEATURE:"addfeature",CHANGEFEATURE:"changefeature",CLEAR:"clear",REMOVEFEATURE:"removefeature",FEATURESLOADSTART:"featuresloadstart",FEATURESLOADEND:"featuresloadend",FEATURESLOADERROR:"featuresloaderror"}},a504:function(t,e,n){"use strict";n.d(e,"b",(function(){return r})),n.d(e,"a",(function(){return i}));var r=.5,i=!0},a568:function(t,e,n){"use strict";n.d(e,"a",(function(){return i})),n.d(e,"b",(function(){return o})),n.d(e,"d",(function(){return s})),n.d(e,"e",(function(){return a})),n.d(e,"f",(function(){return u})),n.d(e,"g",(function(){return c})),n.d(e,"c",(function(){return l}));var r=n("0af5");n("7fc9"),n("b0c1");function i(t,e){return t[0]+=+e[0],t[1]+=+e[1],t}function o(t,e){for(var n=!0,r=t.length-1;r>=0;--r)if(t[r]!=e[r]){n=!1;break}return n}function s(t,e){var n=Math.cos(e),r=Math.sin(e),i=t[0]*n-t[1]*r,o=t[1]*n+t[0]*r;return t[0]=i,t[1]=o,t}function a(t,e){return t[0]*=e,t[1]*=e,t}function u(t,e){var n=t[0]-e[0],r=t[1]-e[1];return n*n+r*r}function c(t,e){if(e.canWrapX()){var n=Object(r["E"])(e.getExtent()),i=l(t,e,n);i&&(t[0]-=i*n)}return t}function l(t,e,n){var i=e.getExtent(),o=0;if(e.canWrapX()&&(t[0]i[2])){var s=n||Object(r["E"])(i);o=Math.floor((t[0]-i[0])/s)}return o}},a817:function(t,e,n){(function(e,r,i){t.exports=r(n("21bf"),n("38ba"))})(0,(function(t){return t.pad.AnsiX923={pad:function(t,e){var n=t.sigBytes,r=4*e,i=r-n%r,o=n+i-1;t.clamp(),t.words[o>>>2]|=i<<24-o%4*8,t.sigBytes+=i},unpad:function(t){var e=255&t.words[t.sigBytes-1>>>2];t.sigBytes-=e}},t.pad.Ansix923}))},a896:function(t,e,n){"use strict";n.d(e,"c",(function(){return a})),n.d(e,"g",(function(){return u})),n.d(e,"f",(function(){return c})),n.d(e,"j",(function(){return h})),n.d(e,"a",(function(){return f})),n.d(e,"h",(function(){return p})),n.d(e,"i",(function(){return d})),n.d(e,"e",(function(){return g})),n.d(e,"l",(function(){return y})),n.d(e,"b",(function(){return v})),n.d(e,"d",(function(){return _})),n.d(e,"k",(function(){return b}));var r,i=n("617d"),o=n("92fa"),s=new Array(6);function a(){return[1,0,0,1,0,0]}function u(t){return l(t,1,0,0,1,0,0)}function c(t,e){var n=t[0],r=t[1],i=t[2],o=t[3],s=t[4],a=t[5],u=e[0],c=e[1],l=e[2],h=e[3],f=e[4],p=e[5];return t[0]=n*u+i*c,t[1]=r*u+o*c,t[2]=n*l+i*h,t[3]=r*l+o*h,t[4]=n*f+i*p+s,t[5]=r*f+o*p+a,t}function l(t,e,n,r,i,o,s){return t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=o,t[5]=s,t}function h(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t}function f(t,e){var n=e[0],r=e[1];return e[0]=t[0]*n+t[2]*r+t[4],e[1]=t[1]*n+t[3]*r+t[5],e}function p(t,e){var n=Math.cos(e),r=Math.sin(e);return c(t,l(s,n,r,-r,n,0,0))}function d(t,e,n){return c(t,l(s,e,0,0,n,0,0))}function g(t,e,n){return l(t,e,0,0,n,0,0)}function y(t,e,n){return c(t,l(s,1,0,0,1,e,n))}function v(t,e,n,r,i,o,s,a){var u=Math.sin(o),c=Math.cos(o);return t[0]=r*c,t[1]=i*u,t[2]=-r*u,t[3]=i*c,t[4]=s*r*c-a*r*u+e,t[5]=s*i*u+a*i*c+n,t}function _(t,e){var n=m(e);Object(o["a"])(0!==n,32);var r=e[0],i=e[1],s=e[2],a=e[3],u=e[4],c=e[5];return t[0]=a/n,t[1]=-i/n,t[2]=-s/n,t[3]=r/n,t[4]=(s*c-a*u)/n,t[5]=-(r*c-i*u)/n,t}function m(t){return t[0]*t[3]-t[1]*t[2]}function b(t){var e="matrix("+t.join(", ")+")";if(i["h"])return e;var n=r||(r=document.createElement("div"));return n.style.transform=e,n.style.transform}},a8ce:function(t,e,n){(function(e,r){t.exports=r(n("21bf"))})(0,(function(t){return function(){var e=t,n=e.lib,r=n.WordArray,i=e.enc;i.Utf16=i.Utf16BE={stringify:function(t){for(var e=t.words,n=t.sigBytes,r=[],i=0;i>>2]>>>16-i%4*8&65535;r.push(String.fromCharCode(o))}return r.join("")},parse:function(t){for(var e=t.length,n=[],i=0;i>>1]|=t.charCodeAt(i)<<16-i%2*16;return r.create(n,2*e)}};function o(t){return t<<8&4278255360|t>>>8&16711935}i.Utf16LE={stringify:function(t){for(var e=t.words,n=t.sigBytes,r=[],i=0;i>>2]>>>16-i%4*8&65535);r.push(String.fromCharCode(s))}return r.join("")},parse:function(t){for(var e=t.length,n=[],i=0;i>>1]|=o(t.charCodeAt(i)<<16-i%2*16);return r.create(n,2*e)}}}(),t.enc.Utf16}))},aaef:function(t,e,n){(function(e,r,i){t.exports=r(n("21bf"),n("38ba"))})(0,(function(t){ /** @preserve * Counter block mode compatible with Dr Brian Gladman fileenc.c * derived from CryptoJS.mode.CTR * Jan Hruby jhruby.web@gmail.com */ return t.mode.CTRGladman=function(){var e=t.lib.BlockCipherMode.extend();function n(t){if(255===(t>>24&255)){var e=t>>16&255,n=t>>8&255,r=255&t;255===e?(e=0,255===n?(n=0,255===r?r=0:++r):++n):++e,t=0,t+=e<<16,t+=n<<8,t+=r}else t+=1<<24;return t}function r(t){return 0===(t[0]=n(t[0]))&&(t[1]=n(t[1])),t}var i=e.Encryptor=e.extend({processBlock:function(t,e){var n=this._cipher,i=n.blockSize,o=this._iv,s=this._counter;o&&(s=this._counter=o.slice(0),this._iv=void 0),r(s);var a=s.slice(0);n.encryptBlock(a,0);for(var u=0;u=n[0]||(t[1]<=n[1]&&t[3]>=n[1]||Object(i["s"])(t,this.intersectsCoordinate.bind(this)))}return!1},e.prototype.setCenter=function(t){var e=this.stride,n=this.flatCoordinates[e]-this.flatCoordinates[0],r=t.slice();r[e]=r[0]+n;for(var i=1;i=this.dragVertexDelay_?(this.downPx_=e.pixel,this.shouldHandle_=!this.freehand_,n=!0):this.lastDragTime_=void 0,this.shouldHandle_&&void 0!==this.downTimeout_&&(clearTimeout(this.downTimeout_),this.downTimeout_=void 0)}return this.freehand_&&e.type===v["a"].POINTERDRAG&&null!==this.sketchFeature_?(this.addToDrawing_(e.coordinate),r=!1):this.freehand_&&e.type===v["a"].POINTERDOWN?r=!1:n&&this.getPointerCount()<2?(r=e.type===v["a"].POINTERMOVE,r&&this.freehand_?(this.handlePointerMove_(e),this.shouldHandle_&&e.originalEvent.preventDefault()):("mouse"===e.originalEvent.pointerType||e.type===v["a"].POINTERDRAG&&void 0===this.downTimeout_)&&this.handlePointerMove_(e)):e.type===v["a"].DBLCLICK&&(r=!1),t.prototype.handleEvent.call(this,e)&&r},e.prototype.handleDownEvent=function(t){return this.shouldHandle_=!this.freehand_,this.freehand_?(this.downPx_=t.pixel,this.finishCoordinate_||this.startDrawing_(t.coordinate),!0):this.condition_(t)?(this.lastDragTime_=Date.now(),this.downTimeout_=setTimeout(function(){this.handlePointerMove_(new y["a"](v["a"].POINTERMOVE,t.map,t.originalEvent,!1,t.frameState))}.bind(this),this.dragVertexDelay_),this.downPx_=t.pixel,!0):(this.lastDragTime_=void 0,!1)},e.prototype.handleUpEvent=function(t){var e=!0;if(0===this.getPointerCount())if(this.downTimeout_&&(clearTimeout(this.downTimeout_),this.downTimeout_=void 0),this.handlePointerMove_(t),this.shouldHandle_){var n=!this.finishCoordinate_;n&&this.startDrawing_(t.coordinate),!n&&this.freehand_?this.finishDrawing():this.freehand_||n&&this.mode_!==M.POINT||(this.atFinish_(t.pixel)?this.finishCondition_(t)&&this.finishDrawing():this.addToDrawing_(t.coordinate)),e=!1}else this.freehand_&&this.abortDrawing();return!e&&this.stopClick_&&t.preventDefault(),e},e.prototype.handlePointerMove_=function(t){if(this.pointerType_=t.originalEvent.pointerType,this.downPx_&&(!this.freehand_&&this.shouldHandle_||this.freehand_&&!this.shouldHandle_)){var e=this.downPx_,n=t.pixel,r=e[0]-n[0],i=e[1]-n[1],o=r*r+i*i;if(this.shouldHandle_=this.freehand_?o>this.squaredClickTolerance_:o<=this.squaredClickTolerance_,!this.shouldHandle_)return}this.finishCoordinate_?this.modifyDrawing_(t.coordinate):this.createOrUpdateSketchPoint_(t.coordinate.slice())},e.prototype.atFinish_=function(t){var e=!1;if(this.sketchFeature_){var n=!1,r=[this.finishCoordinate_],i=this.mode_;if(i===M.POINT)e=!0;else if(i===M.CIRCLE)e=2===this.sketchCoords_.length;else if(i===M.LINE_STRING)n=this.sketchCoords_.length>this.minPoints_;else if(i===M.POLYGON){var o=this.sketchCoords_;n=o[0].length>this.minPoints_,r=[o[0][0],o[0][o[0].length-2]]}if(n)for(var s=this.getMap(),a=0,u=r.length;a=this.maxPoints_&&(this.freehand_?n.pop():e=!0),n.push(t.slice()),this.geometryFunction_(n,r,i)):o===M.POLYGON&&(n=this.sketchCoords_[0],n.length>=this.maxPoints_&&(this.freehand_?n.pop():e=!0),n.push(t.slice()),e&&(this.finishCoordinate_=n[0]),this.geometryFunction_(this.sketchCoords_,r,i)),this.createOrUpdateSketchPoint_(t.slice()),this.updateSketchFeatures_(),e&&this.finishDrawing()},e.prototype.removeLastPoint=function(){if(this.sketchFeature_){var t,e=this.sketchFeature_.getGeometry(),n=this.getMap().getView().getProjection(),r=this.mode_;if(r===M.LINE_STRING||r===M.CIRCLE){if(t=this.sketchCoords_,t.splice(-2,1),t.length>=2){this.finishCoordinate_=t[t.length-2].slice();var i=this.finishCoordinate_.slice();t[t.length-1]=i,this.createOrUpdateSketchPoint_(i)}this.geometryFunction_(t,e,n),"Polygon"===e.getType()&&this.sketchLine_&&this.createOrUpdateCustomSketchLine_(e)}else if(r===M.POLYGON){t=this.sketchCoords_[0],t.splice(-2,1);var o=this.sketchLine_.getGeometry();if(t.length>=2){i=t[t.length-2].slice();t[t.length-1]=i,this.createOrUpdateSketchPoint_(i)}o.setCoordinates(t),this.geometryFunction_(this.sketchCoords_,e,n)}1===t.length&&this.abortDrawing(),this.updateSketchFeatures_()}},e.prototype.finishDrawing=function(){var t=this.abortDrawing_();if(t){var e=this.sketchCoords_,n=t.getGeometry(),r=this.getMap().getView().getProjection();this.mode_===M.LINE_STRING?(e.pop(),this.geometryFunction_(e,n,r)):this.mode_===M.POLYGON&&(e[0].pop(),this.geometryFunction_(e,n,r),e=n.getCoordinates()),"MultiPoint"===this.type_?t.setGeometry(new m["a"]([e])):"MultiLineString"===this.type_?t.setGeometry(new _["a"]([e])):"MultiPolygon"===this.type_&&t.setGeometry(new b["a"]([e])),this.dispatchEvent(new A(N.DRAWEND,t)),this.features_&&this.features_.push(t),this.source_&&this.source_.addFeature(t)}},e.prototype.abortDrawing_=function(){this.finishCoordinate_=null;var t=this.sketchFeature_;return this.sketchFeature_=null,this.sketchPoint_=null,this.sketchLine_=null,this.overlay_.getSource().clear(!0),t},e.prototype.abortDrawing=function(){var t=this.abortDrawing_();t&&this.dispatchEvent(new A(N.DRAWABORT,t))},e.prototype.appendCoordinates=function(t){var e,n=this.mode_,r=!this.sketchFeature_;if(r&&this.startDrawing_(t[0]),n===M.LINE_STRING||n===M.CIRCLE)e=this.sketchCoords_;else{if(n!==M.POLYGON)return;e=this.sketchCoords_&&this.sketchCoords_.length?this.sketchCoords_[0]:[]}r&&e.shift(),e.pop();for(var i=0;ie?r:new Array(1+e-i).join("0")+r}n.d(e,"a",(function(){return r}))},b1a2:function(t,e,n){"use strict";n.d(e,"a",(function(){return o})),n.d(e,"b",(function(){return s})),n.d(e,"c",(function(){return a}));var r=n("9f5e"),i=n("7fc9");function o(t,e,n,o,s,a,u){var c,l,h=(n-e)/o;if(1===h)c=e;else if(2===h)c=e,l=s;else if(0!==h){for(var f=t[e],p=t[e+1],d=0,g=[0],y=e+o;y1?u:2,w=a||new Array(E);for(y=0;y>1;o0?r:n)(e)}},b589:function(t,e,n){"use strict";function r(t,e,n,r){for(var i=0,o=t[n-r],s=t[n-r+1];e * @license MIT */ var r=n("1fb5"),i=n("9152"),o=n("e3db");function s(){try{var t=new Uint8Array(1);return t.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===t.foo()&&"function"===typeof t.subarray&&0===t.subarray(1,1).byteLength}catch(e){return!1}}function a(){return c.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function u(t,e){if(a()=a())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+a().toString(16)+" bytes");return 0|t}function m(t){return+t!=t&&(t=0),c.alloc(+t)}function b(t,e){if(c.isBuffer(t))return t.length;if("undefined"!==typeof ArrayBuffer&&"function"===typeof ArrayBuffer.isView&&(ArrayBuffer.isView(t)||t instanceof ArrayBuffer))return t.byteLength;"string"!==typeof t&&(t=""+t);var n=t.length;if(0===n)return 0;for(var r=!1;;)switch(e){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":case void 0:return K(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return $(t).length;default:if(r)return K(t).length;e=(""+e).toLowerCase(),r=!0}}function E(t,e,n){var r=!1;if((void 0===e||e<0)&&(e=0),e>this.length)return"";if((void 0===n||n>this.length)&&(n=this.length),n<=0)return"";if(n>>>=0,e>>>=0,n<=e)return"";t||(t="utf8");while(1)switch(t){case"hex":return D(this,e,n);case"utf8":case"utf-8":return M(this,e,n);case"ascii":return F(this,e,n);case"latin1":case"binary":return j(this,e,n);case"base64":return L(this,e,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return k(this,e,n);default:if(r)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),r=!0}}function w(t,e,n){var r=t[e];t[e]=t[n],t[n]=r}function x(t,e,n,r,i){if(0===t.length)return-1;if("string"===typeof n?(r=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),n=+n,isNaN(n)&&(n=i?0:t.length-1),n<0&&(n=t.length+n),n>=t.length){if(i)return-1;n=t.length-1}else if(n<0){if(!i)return-1;n=0}if("string"===typeof e&&(e=c.from(e,r)),c.isBuffer(e))return 0===e.length?-1:O(t,e,n,r,i);if("number"===typeof e)return e&=255,c.TYPED_ARRAY_SUPPORT&&"function"===typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(t,e,n):Uint8Array.prototype.lastIndexOf.call(t,e,n):O(t,[e],n,r,i);throw new TypeError("val must be string, number or Buffer")}function O(t,e,n,r,i){var o,s=1,a=t.length,u=e.length;if(void 0!==r&&(r=String(r).toLowerCase(),"ucs2"===r||"ucs-2"===r||"utf16le"===r||"utf-16le"===r)){if(t.length<2||e.length<2)return-1;s=2,a/=2,u/=2,n/=2}function c(t,e){return 1===s?t[e]:t.readUInt16BE(e*s)}if(i){var l=-1;for(o=n;oa&&(n=a-u),o=n;o>=0;o--){for(var h=!0,f=0;fi&&(r=i)):r=i;var o=e.length;if(o%2!==0)throw new TypeError("Invalid hex string");r>o/2&&(r=o/2);for(var s=0;s239?4:c>223?3:c>191?2:1;if(i+h<=n)switch(h){case 1:c<128&&(l=c);break;case 2:o=t[i+1],128===(192&o)&&(u=(31&c)<<6|63&o,u>127&&(l=u));break;case 3:o=t[i+1],s=t[i+2],128===(192&o)&&128===(192&s)&&(u=(15&c)<<12|(63&o)<<6|63&s,u>2047&&(u<55296||u>57343)&&(l=u));break;case 4:o=t[i+1],s=t[i+2],a=t[i+3],128===(192&o)&&128===(192&s)&&128===(192&a)&&(u=(15&c)<<18|(63&o)<<12|(63&s)<<6|63&a,u>65535&&u<1114112&&(l=u))}null===l?(l=65533,h=1):l>65535&&(l-=65536,r.push(l>>>10&1023|55296),l=56320|1023&l),r.push(l),i+=h}return A(r)}e.Buffer=c,e.SlowBuffer=m,e.INSPECT_MAX_BYTES=50,c.TYPED_ARRAY_SUPPORT=void 0!==t.TYPED_ARRAY_SUPPORT?t.TYPED_ARRAY_SUPPORT:s(),e.kMaxLength=a(),c.poolSize=8192,c._augment=function(t){return t.__proto__=c.prototype,t},c.from=function(t,e,n){return l(null,t,e,n)},c.TYPED_ARRAY_SUPPORT&&(c.prototype.__proto__=Uint8Array.prototype,c.__proto__=Uint8Array,"undefined"!==typeof Symbol&&Symbol.species&&c[Symbol.species]===c&&Object.defineProperty(c,Symbol.species,{value:null,configurable:!0})),c.alloc=function(t,e,n){return f(null,t,e,n)},c.allocUnsafe=function(t){return p(null,t)},c.allocUnsafeSlow=function(t){return p(null,t)},c.isBuffer=function(t){return!(null==t||!t._isBuffer)},c.compare=function(t,e){if(!c.isBuffer(t)||!c.isBuffer(e))throw new TypeError("Arguments must be Buffers");if(t===e)return 0;for(var n=t.length,r=e.length,i=0,o=Math.min(n,r);i0&&(t=this.toString("hex",0,n).match(/.{2}/g).join(" "),this.length>n&&(t+=" ... ")),""},c.prototype.compare=function(t,e,n,r,i){if(!c.isBuffer(t))throw new TypeError("Argument must be a Buffer");if(void 0===e&&(e=0),void 0===n&&(n=t?t.length:0),void 0===r&&(r=0),void 0===i&&(i=this.length),e<0||n>t.length||r<0||i>this.length)throw new RangeError("out of range index");if(r>=i&&e>=n)return 0;if(r>=i)return-1;if(e>=n)return 1;if(e>>>=0,n>>>=0,r>>>=0,i>>>=0,this===t)return 0;for(var o=i-r,s=n-e,a=Math.min(o,s),u=this.slice(r,i),l=t.slice(e,n),h=0;hi)&&(n=i),t.length>0&&(n<0||e<0)||e>this.length)throw new RangeError("Attempt to write outside buffer bounds");r||(r="utf8");for(var o=!1;;)switch(r){case"hex":return S(this,t,e,n);case"utf8":case"utf-8":return C(this,t,e,n);case"ascii":return I(this,t,e,n);case"latin1":case"binary":return P(this,t,e,n);case"base64":return R(this,t,e,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return T(this,t,e,n);default:if(o)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),o=!0}},c.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var N=4096;function A(t){var e=t.length;if(e<=N)return String.fromCharCode.apply(String,t);var n="",r=0;while(rr)&&(n=r);for(var i="",o=e;on)throw new RangeError("Trying to access beyond buffer length")}function B(t,e,n,r,i,o){if(!c.isBuffer(t))throw new TypeError('"buffer" argument must be a Buffer instance');if(e>i||et.length)throw new RangeError("Index out of range")}function U(t,e,n,r){e<0&&(e=65535+e+1);for(var i=0,o=Math.min(t.length-n,2);i>>8*(r?i:1-i)}function z(t,e,n,r){e<0&&(e=4294967295+e+1);for(var i=0,o=Math.min(t.length-n,4);i>>8*(r?i:3-i)&255}function Y(t,e,n,r,i,o){if(n+r>t.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function X(t,e,n,r,o){return o||Y(t,e,n,4,34028234663852886e22,-34028234663852886e22),i.write(t,e,n,r,23,4),n+4}function V(t,e,n,r,o){return o||Y(t,e,n,8,17976931348623157e292,-17976931348623157e292),i.write(t,e,n,r,52,8),n+8}c.prototype.slice=function(t,e){var n,r=this.length;if(t=~~t,e=void 0===e?r:~~e,t<0?(t+=r,t<0&&(t=0)):t>r&&(t=r),e<0?(e+=r,e<0&&(e=0)):e>r&&(e=r),e0&&(i*=256))r+=this[t+--e]*i;return r},c.prototype.readUInt8=function(t,e){return e||G(t,1,this.length),this[t]},c.prototype.readUInt16LE=function(t,e){return e||G(t,2,this.length),this[t]|this[t+1]<<8},c.prototype.readUInt16BE=function(t,e){return e||G(t,2,this.length),this[t]<<8|this[t+1]},c.prototype.readUInt32LE=function(t,e){return e||G(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},c.prototype.readUInt32BE=function(t,e){return e||G(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},c.prototype.readIntLE=function(t,e,n){t|=0,e|=0,n||G(t,e,this.length);var r=this[t],i=1,o=0;while(++o=i&&(r-=Math.pow(2,8*e)),r},c.prototype.readIntBE=function(t,e,n){t|=0,e|=0,n||G(t,e,this.length);var r=e,i=1,o=this[t+--r];while(r>0&&(i*=256))o+=this[t+--r]*i;return i*=128,o>=i&&(o-=Math.pow(2,8*e)),o},c.prototype.readInt8=function(t,e){return e||G(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},c.prototype.readInt16LE=function(t,e){e||G(t,2,this.length);var n=this[t]|this[t+1]<<8;return 32768&n?4294901760|n:n},c.prototype.readInt16BE=function(t,e){e||G(t,2,this.length);var n=this[t+1]|this[t]<<8;return 32768&n?4294901760|n:n},c.prototype.readInt32LE=function(t,e){return e||G(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},c.prototype.readInt32BE=function(t,e){return e||G(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},c.prototype.readFloatLE=function(t,e){return e||G(t,4,this.length),i.read(this,t,!0,23,4)},c.prototype.readFloatBE=function(t,e){return e||G(t,4,this.length),i.read(this,t,!1,23,4)},c.prototype.readDoubleLE=function(t,e){return e||G(t,8,this.length),i.read(this,t,!0,52,8)},c.prototype.readDoubleBE=function(t,e){return e||G(t,8,this.length),i.read(this,t,!1,52,8)},c.prototype.writeUIntLE=function(t,e,n,r){if(t=+t,e|=0,n|=0,!r){var i=Math.pow(2,8*n)-1;B(this,t,e,n,i,0)}var o=1,s=0;this[e]=255&t;while(++s=0&&(s*=256))this[e+o]=t/s&255;return e+n},c.prototype.writeUInt8=function(t,e,n){return t=+t,e|=0,n||B(this,t,e,1,255,0),c.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),this[e]=255&t,e+1},c.prototype.writeUInt16LE=function(t,e,n){return t=+t,e|=0,n||B(this,t,e,2,65535,0),c.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8):U(this,t,e,!0),e+2},c.prototype.writeUInt16BE=function(t,e,n){return t=+t,e|=0,n||B(this,t,e,2,65535,0),c.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=255&t):U(this,t,e,!1),e+2},c.prototype.writeUInt32LE=function(t,e,n){return t=+t,e|=0,n||B(this,t,e,4,4294967295,0),c.TYPED_ARRAY_SUPPORT?(this[e+3]=t>>>24,this[e+2]=t>>>16,this[e+1]=t>>>8,this[e]=255&t):z(this,t,e,!0),e+4},c.prototype.writeUInt32BE=function(t,e,n){return t=+t,e|=0,n||B(this,t,e,4,4294967295,0),c.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t):z(this,t,e,!1),e+4},c.prototype.writeIntLE=function(t,e,n,r){if(t=+t,e|=0,!r){var i=Math.pow(2,8*n-1);B(this,t,e,n,i-1,-i)}var o=0,s=1,a=0;this[e]=255&t;while(++o>0)-a&255;return e+n},c.prototype.writeIntBE=function(t,e,n,r){if(t=+t,e|=0,!r){var i=Math.pow(2,8*n-1);B(this,t,e,n,i-1,-i)}var o=n-1,s=1,a=0;this[e+o]=255&t;while(--o>=0&&(s*=256))t<0&&0===a&&0!==this[e+o+1]&&(a=1),this[e+o]=(t/s>>0)-a&255;return e+n},c.prototype.writeInt8=function(t,e,n){return t=+t,e|=0,n||B(this,t,e,1,127,-128),c.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),t<0&&(t=255+t+1),this[e]=255&t,e+1},c.prototype.writeInt16LE=function(t,e,n){return t=+t,e|=0,n||B(this,t,e,2,32767,-32768),c.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8):U(this,t,e,!0),e+2},c.prototype.writeInt16BE=function(t,e,n){return t=+t,e|=0,n||B(this,t,e,2,32767,-32768),c.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=255&t):U(this,t,e,!1),e+2},c.prototype.writeInt32LE=function(t,e,n){return t=+t,e|=0,n||B(this,t,e,4,2147483647,-2147483648),c.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8,this[e+2]=t>>>16,this[e+3]=t>>>24):z(this,t,e,!0),e+4},c.prototype.writeInt32BE=function(t,e,n){return t=+t,e|=0,n||B(this,t,e,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),c.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t):z(this,t,e,!1),e+4},c.prototype.writeFloatLE=function(t,e,n){return X(this,t,e,!0,n)},c.prototype.writeFloatBE=function(t,e,n){return X(this,t,e,!1,n)},c.prototype.writeDoubleLE=function(t,e,n){return V(this,t,e,!0,n)},c.prototype.writeDoubleBE=function(t,e,n){return V(this,t,e,!1,n)},c.prototype.copy=function(t,e,n,r){if(n||(n=0),r||0===r||(r=this.length),e>=t.length&&(e=t.length),e||(e=0),r>0&&r=this.length)throw new RangeError("sourceStart out of bounds");if(r<0)throw new RangeError("sourceEnd out of bounds");r>this.length&&(r=this.length),t.length-e=0;--i)t[i+e]=this[i+n];else if(o<1e3||!c.TYPED_ARRAY_SUPPORT)for(i=0;i>>=0,n=void 0===n?this.length:n>>>0,t||(t=0),"number"===typeof t)for(o=e;o55295&&n<57344){if(!i){if(n>56319){(e-=3)>-1&&o.push(239,191,189);continue}if(s+1===r){(e-=3)>-1&&o.push(239,191,189);continue}i=n;continue}if(n<56320){(e-=3)>-1&&o.push(239,191,189),i=n;continue}n=65536+(i-55296<<10|n-56320)}else i&&(e-=3)>-1&&o.push(239,191,189);if(i=null,n<128){if((e-=1)<0)break;o.push(n)}else if(n<2048){if((e-=2)<0)break;o.push(n>>6|192,63&n|128)}else if(n<65536){if((e-=3)<0)break;o.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((e-=4)<0)break;o.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return o}function J(t){for(var e=[],n=0;n>8,i=n%256,o.push(i),o.push(r)}return o}function $(t){return r.toByteArray(W(t))}function tt(t,e,n,r){for(var i=0;i=e.length||i>=t.length)break;e[i+n]=t[i]}return i}function et(t){return t!==t}}).call(this,n("c8ba"))},b7df:function(t,e,n){"use strict";n.d(e,"c",(function(){return u})),n.d(e,"b",(function(){return c}));var r=n("fced"),i=n("1300"),o=n("38f3"),s=n("256f"),a=function(){function t(){this.dataProjection=void 0,this.defaultFeatureProjection=void 0,this.supportedMediaTypes=null}return t.prototype.getReadOptions=function(t,e){var n;if(e){var i=e.dataProjection?Object(s["h"])(e.dataProjection):this.readProjection(t);e.extent&&i&&i.getUnits()===r["b"].TILE_PIXELS&&(i=Object(s["h"])(i),i.setWorldExtent(e.extent)),n={dataProjection:i,featureProjection:e.featureProjection}}return this.adaptOptions(n)},t.prototype.adaptOptions=function(t){return Object(o["a"])({dataProjection:this.dataProjection,featureProjection:this.defaultFeatureProjection},t)},t.prototype.getType=function(){return Object(i["b"])()},t.prototype.readFeature=function(t,e){return Object(i["b"])()},t.prototype.readFeatures=function(t,e){return Object(i["b"])()},t.prototype.readGeometry=function(t,e){return Object(i["b"])()},t.prototype.readProjection=function(t){return Object(i["b"])()},t.prototype.writeFeature=function(t,e){return Object(i["b"])()},t.prototype.writeFeatures=function(t,e){return Object(i["b"])()},t.prototype.writeGeometry=function(t,e){return Object(i["b"])()},t}();function u(t,e,n){var r,i=n?Object(s["h"])(n.featureProjection):null,o=n?Object(s["h"])(n.dataProjection):null;if(r=i&&o&&!Object(s["d"])(i,o)?(e?t.clone():t).transform(e?i:o,e?o:i):t,e&&n&&void 0!==n.decimals){var a=Math.pow(10,n.decimals),u=function(t){for(var e=0,n=t.length;e>>8^255&i^99,o[n]=i,s[i]=n;var g=t[n],y=t[g],v=t[y],_=257*t[i]^16843008*i;a[n]=_<<24|_>>>8,u[n]=_<<16|_>>>16,c[n]=_<<8|_>>>24,l[n]=_;_=16843009*v^65537*y^257*g^16843008*n;h[i]=_<<24|_>>>8,f[i]=_<<16|_>>>16,p[i]=_<<8|_>>>24,d[i]=_,n?(n=g^t[t[t[v^g]]],r^=t[t[r]]):n=r=1}})();var g=[0,1,2,4,8,16,32,64,128,27,54],y=i.AES=r.extend({_doReset:function(){if(!this._nRounds||this._keyPriorReset!==this._key){for(var t=this._keyPriorReset=this._key,e=t.words,n=t.sigBytes/4,r=this._nRounds=n+6,i=4*(r+1),s=this._keySchedule=[],a=0;a6&&a%n==4&&(l=o[l>>>24]<<24|o[l>>>16&255]<<16|o[l>>>8&255]<<8|o[255&l]):(l=l<<8|l>>>24,l=o[l>>>24]<<24|o[l>>>16&255]<<16|o[l>>>8&255]<<8|o[255&l],l^=g[a/n|0]<<24),s[a]=s[a-n]^l);for(var u=this._invKeySchedule=[],c=0;c>>24]]^f[o[l>>>16&255]]^p[o[l>>>8&255]]^d[o[255&l]]}}},encryptBlock:function(t,e){this._doCryptBlock(t,e,this._keySchedule,a,u,c,l,o)},decryptBlock:function(t,e){var n=t[e+1];t[e+1]=t[e+3],t[e+3]=n,this._doCryptBlock(t,e,this._invKeySchedule,h,f,p,d,s);n=t[e+1];t[e+1]=t[e+3],t[e+3]=n},_doCryptBlock:function(t,e,n,r,i,o,s,a){for(var u=this._nRounds,c=t[e]^n[0],l=t[e+1]^n[1],h=t[e+2]^n[2],f=t[e+3]^n[3],p=4,d=1;d>>24]^i[l>>>16&255]^o[h>>>8&255]^s[255&f]^n[p++],y=r[l>>>24]^i[h>>>16&255]^o[f>>>8&255]^s[255&c]^n[p++],v=r[h>>>24]^i[f>>>16&255]^o[c>>>8&255]^s[255&l]^n[p++],_=r[f>>>24]^i[c>>>16&255]^o[l>>>8&255]^s[255&h]^n[p++];c=g,l=y,h=v,f=_}g=(a[c>>>24]<<24|a[l>>>16&255]<<16|a[h>>>8&255]<<8|a[255&f])^n[p++],y=(a[l>>>24]<<24|a[h>>>16&255]<<16|a[f>>>8&255]<<8|a[255&c])^n[p++],v=(a[h>>>24]<<24|a[f>>>16&255]<<16|a[c>>>8&255]<<8|a[255&l])^n[p++],_=(a[f>>>24]<<24|a[c>>>16&255]<<16|a[l>>>8&255]<<8|a[255&h])^n[p++];t[e]=g,t[e+1]=y,t[e+2]=v,t[e+3]=_},keySize:8});e.AES=r._createHelper(y)}(),t.AES}))},c1bc:function(t,e,n){(function(e,r){t.exports=r(n("21bf"))})(0,(function(t){return function(){var e=t,n=e.lib,r=n.WordArray,i=e.enc;i.Base64url={stringify:function(t,e=!0){var n=t.words,r=t.sigBytes,i=e?this._safe_map:this._map;t.clamp();for(var o=[],s=0;s>>2]>>>24-s%4*8&255,u=n[s+1>>>2]>>>24-(s+1)%4*8&255,c=n[s+2>>>2]>>>24-(s+2)%4*8&255,l=a<<16|u<<8|c,h=0;h<4&&s+.75*h>>6*(3-h)&63));var f=i.charAt(64);if(f)while(o.length%4)o.push(f);return o.join("")},parse:function(t,e=!0){var n=t.length,r=e?this._safe_map:this._map,i=this._reverseMap;if(!i){i=this._reverseMap=[];for(var s=0;s>>6-s%4*2,c=a|u;i[o>>>2]|=c<<24-o%4*8,o++}return r.create(i,o)}}(),t.enc.Base64url}))},c3b6:function(t,e,n){(function(e,r,i){t.exports=r(n("21bf"),n("1132"),n("72fe"),n("2b79"),n("38ba"))})(0,(function(t){return function(){var e=t,n=e.lib,r=n.StreamCipher,i=e.algo,o=i.RC4=r.extend({_doReset:function(){for(var t=this._key,e=t.words,n=t.sigBytes,r=this._S=[],i=0;i<256;i++)r[i]=i;i=0;for(var o=0;i<256;i++){var s=i%n,a=e[s>>>2]>>>24-s%4*8&255;o=(o+r[i]+a)%256;var u=r[i];r[i]=r[o],r[o]=u}this._i=this._j=0},_doProcessBlock:function(t,e){t[e]^=s.call(this)},keySize:8,ivSize:0});function s(){for(var t=this._S,e=this._i,n=this._j,r=0,i=0;i<4;i++){e=(e+1)%256,n=(n+t[e])%256;var o=t[e];t[e]=t[n],t[n]=o,r|=t[(t[e]+t[n])%256]<<24-8*i}return this._i=e,this._j=n,r}e.RC4=r._createHelper(o);var a=i.RC4Drop=o.extend({cfg:o.cfg.extend({drop:192}),_doReset:function(){o._doReset.call(this);for(var t=this.cfg.drop;t>0;t--)s.call(this)}});e.RC4Drop=r._createHelper(a)}(),t.RC4}))},c430:function(t,e){t.exports=!1},c560:function(t,e,n){"use strict";n.d(e,"a",(function(){return s})),n.d(e,"b",(function(){return a})),n.d(e,"c",(function(){return u})),n.d(e,"d",(function(){return c})),n.d(e,"e",(function(){return l}));var r=n("0af5"),i=n("fd4d"),o=n("25f1");function s(t,e,n,o,s){var a=Object(r["r"])(Object(r["j"])(),t,e,n,o);return!!Object(r["F"])(s,a)&&(!!Object(r["g"])(s,a)||(a[0]>=s[0]&&a[2]<=s[2]||(a[1]>=s[1]&&a[3]<=s[3]||Object(i["a"])(t,e,n,o,(function(t,e){return Object(r["G"])(s,t,e)})))))}function a(t,e,n,r,i){for(var o=0,a=n.length;oc)i(r,n=e[c++])&&(~s(l,n)||u(l,n));return l}},cb2d:function(t,e,n){var r=n("1626"),i=n("9bf2"),o=n("13d2"),s=n("6374");t.exports=function(t,e,n,a){a||(a={});var u=a.enumerable,c=void 0!==a.name?a.name:e;if(r(n)&&o(n,c,a),a.global)u?t[e]=n:s(e,n);else{try{a.unsafe?t[e]&&(u=!0):delete t[e]}catch(l){}u?t[e]=n:i.f(t,e,{value:n,enumerable:!1,configurable:!a.nonConfigurable,writable:!a.nonWritable})}return t}},cc12:function(t,e,n){var r=n("da84"),i=n("861d"),o=r.document,s=i(o)&&i(o.createElement);t.exports=function(t){return s?o.createElement(t):{}}},cd7e:function(t,e,n){"use strict";n.d(e,"c",(function(){return r})),n.d(e,"d",(function(){return i})),n.d(e,"e",(function(){return o})),n.d(e,"b",(function(){return s})),n.d(e,"a",(function(){return a})),n.d(e,"f",(function(){return l}));var r="ol-hidden",i="ol-selectable",o="ol-unselectable",s="ol-control",a="ol-collapsed",u=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"),c=["style","variant","weight","size","lineHeight","family"],l=function(t){var e=t.match(u);if(!e)return null;for(var n={lineHeight:"normal",size:"1.2em",style:"normal",weight:"normal",variant:"normal"},r=0,i=c.length;r>>1|J<<31)^(K>>>8|J<<24)^K>>>7,$=(J>>>1|K<<31)^(J>>>8|K<<24)^(J>>>7|K<<25),tt=l[V-2],et=tt.high,nt=tt.low,rt=(et>>>19|nt<<13)^(et<<3|nt>>>29)^et>>>6,it=(nt>>>19|et<<13)^(nt<<3|et>>>29)^(nt>>>6|et<<26),ot=l[V-7],st=ot.high,at=ot.low,ut=l[V-16],ct=ut.high,lt=ut.low;q=$+at,W=Q+st+(q>>>0<$>>>0?1:0),q+=it,W=W+rt+(q>>>0>>0?1:0),q+=lt,W=W+ct+(q>>>0>>0?1:0),H.high=W,H.low=q}var ht=D&G^~D&U,ft=k&B^~k&z,pt=R&L^R&N^L&N,dt=T&M^T&A^M&A,gt=(R>>>28|T<<4)^(R<<30|T>>>2)^(R<<25|T>>>7),yt=(T>>>28|R<<4)^(T<<30|R>>>2)^(T<<25|R>>>7),vt=(D>>>14|k<<18)^(D>>>18|k<<14)^(D<<23|k>>>9),_t=(k>>>14|D<<18)^(k>>>18|D<<14)^(k<<23|D>>>9),mt=c[V],bt=mt.high,Et=mt.low,wt=X+_t,xt=Y+vt+(wt>>>0>>0?1:0),Ot=(wt=wt+ft,xt=xt+ht+(wt>>>0>>0?1:0),wt=wt+Et,xt=xt+bt+(wt>>>0>>0?1:0),wt=wt+q,xt=xt+W+(wt>>>0>>0?1:0),yt+dt),St=gt+pt+(Ot>>>0>>0?1:0);Y=U,X=z,U=G,z=B,G=D,B=k,k=j+wt|0,D=F+xt+(k>>>0>>0?1:0)|0,F=N,j=A,N=L,A=M,L=R,M=T,T=wt+Ot|0,R=xt+St+(T>>>0>>0?1:0)|0}d=r.low=d+T,r.high=p+R+(d>>>0>>0?1:0),y=i.low=y+M,i.high=g+L+(y>>>0>>0?1:0),_=o.low=_+A,o.high=v+N+(_>>>0>>0?1:0),b=s.low=b+j,s.high=m+F+(b>>>0>>0?1:0),w=a.low=w+k,a.high=E+D+(w>>>0>>0?1:0),O=u.low=O+B,u.high=x+G+(O>>>0>>0?1:0),C=h.low=C+z,h.high=S+U+(C>>>0>>0?1:0),P=f.low=P+X,f.high=I+Y+(P>>>0>>0?1:0)},_doFinalize:function(){var t=this._data,e=t.words,n=8*this._nDataBytes,r=8*t.sigBytes;e[r>>>5]|=128<<24-r%32,e[30+(r+128>>>10<<5)]=Math.floor(n/4294967296),e[31+(r+128>>>10<<5)]=n,t.sigBytes=4*e.length,this._process();var i=this._hash.toX32();return i},clone:function(){var t=r.clone.call(this);return t._hash=this._hash.clone(),t},blockSize:32});e.SHA512=r._createHelper(h),e.HmacSHA512=r._createHmacHelper(h)}(),t.SHA512}))},d9b5:function(t,e,n){var r=n("d066"),i=n("1626"),o=n("3a9b"),s=n("fdbf"),a=Object;t.exports=s?function(t){return"symbol"==typeof t}:function(t){var e=r("Symbol");return i(e)&&o(e.prototype,a(t))}},d9e2:function(t,e,n){var r=n("23e7"),i=n("da84"),o=n("2ba4"),s=n("e5cb"),a="WebAssembly",u=i[a],c=7!==Error("e",{cause:7}).cause,l=function(t,e){var n={};n[t]=s(t,e,c),r({global:!0,constructor:!0,arity:1,forced:c},n)},h=function(t,e){if(u&&u[t]){var n={};n[t]=s(a+"."+t,e,c),r({target:a,stat:!0,constructor:!0,arity:1,forced:c},n)}};l("Error",(function(t){return function(e){return o(t,this,arguments)}})),l("EvalError",(function(t){return function(e){return o(t,this,arguments)}})),l("RangeError",(function(t){return function(e){return o(t,this,arguments)}})),l("ReferenceError",(function(t){return function(e){return o(t,this,arguments)}})),l("SyntaxError",(function(t){return function(e){return o(t,this,arguments)}})),l("TypeError",(function(t){return function(e){return o(t,this,arguments)}})),l("URIError",(function(t){return function(e){return o(t,this,arguments)}})),h("CompileError",(function(t){return function(e){return o(t,this,arguments)}})),h("LinkError",(function(t){return function(e){return o(t,this,arguments)}})),h("RuntimeError",(function(t){return function(e){return o(t,this,arguments)}}))},da5c:function(t,e,n){"use strict";var r=function(){function t(){this.disposed=!1}return t.prototype.dispose=function(){this.disposed||(this.disposed=!0,this.disposeInternal())},t.prototype.disposeInternal=function(){},t}();e["a"]=r},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"))},dc07:function(t,e,n){"use strict";n.d(e,"a",(function(){return i}));var r=function(){function t(t,e,n,r){this.minX=t,this.maxX=e,this.minY=n,this.maxY=r}return t.prototype.contains=function(t){return this.containsXY(t[1],t[2])},t.prototype.containsTileRange=function(t){return this.minX<=t.minX&&t.maxX<=this.maxX&&this.minY<=t.minY&&t.maxY<=this.maxY},t.prototype.containsXY=function(t,e){return this.minX<=t&&t<=this.maxX&&this.minY<=e&&e<=this.maxY},t.prototype.equals=function(t){return this.minX==t.minX&&this.minY==t.minY&&this.maxX==t.maxX&&this.maxY==t.maxY},t.prototype.extend=function(t){t.minXthis.maxX&&(this.maxX=t.maxX),t.minYthis.maxY&&(this.maxY=t.maxY)},t.prototype.getHeight=function(){return this.maxY-this.minY+1},t.prototype.getSize=function(){return[this.getWidth(),this.getHeight()]},t.prototype.getWidth=function(){return this.maxX-this.minX+1},t.prototype.intersects=function(t){return this.minX<=t.maxX&&this.maxX>=t.minX&&this.minY<=t.maxY&&this.maxY>=t.minY},t}();function i(t,e,n,i,o){return void 0!==o?(o.minX=t,o.maxX=e,o.minY=n,o.maxY=i,o):new r(t,e,n,i)}e["b"]=r},dc4a:function(t,e,n){var r=n("59ed"),i=n("7234");t.exports=function(t,e){var n=t[e];return i(n)?void 0:r(n)}},ddea:function(t,e,n){"use strict";n.d(e,"c",(function(){return c})),n.d(e,"b",(function(){return l})),n.d(e,"d",(function(){return h})),n.d(e,"e",(function(){return f})),n.d(e,"f",(function(){return p})),n.d(e,"g",(function(){return d})),n.d(e,"i",(function(){return g})),n.d(e,"k",(function(){return y})),n.d(e,"l",(function(){return v})),n.d(e,"m",(function(){return _})),n.d(e,"j",(function(){return m})),n.d(e,"h",(function(){return b})),n.d(e,"a",(function(){return E})),n.d(e,"q",(function(){return C})),n.d(e,"p",(function(){return T})),n.d(e,"o",(function(){return L})),n.d(e,"n",(function(){return M}));var r=n("e269"),i=n("0ec0"),o=n("617d"),s=n("38f3"),a=n("0999"),u=n("cd7e"),c="10px sans-serif",l="#000",h="round",f=[],p=0,d="round",g=10,y="#000",v="center",_="middle",m=[0,0,0,0],b=1,E=new r["a"],w=new i["a"];w.setSize=function(){console.warn("labelCache is deprecated.")};var x,O=null,S={},C=function(){var t,e,n=100,r="32px ",i=["monospace","serif"],o=i.length,a="wmytzilWMYTZIL@#/&?$%10";function c(t,n,s){for(var u=!0,c=0;c>>31}var h=(r<<5|r>>>27)+u+s[c];h+=c<20?1518500249+(i&o|~i&a):c<40?1859775393+(i^o^a):c<60?(i&o|i&a|o&a)-1894007588:(i^o^a)-899497514,u=a,a=o,o=i<<30|i>>>2,i=r,r=h}n[0]=n[0]+r|0,n[1]=n[1]+i|0,n[2]=n[2]+o|0,n[3]=n[3]+a|0,n[4]=n[4]+u|0},_doFinalize:function(){var t=this._data,e=t.words,n=8*this._nDataBytes,r=8*t.sigBytes;return e[r>>>5]|=128<<24-r%32,e[14+(r+64>>>9<<4)]=Math.floor(n/4294967296),e[15+(r+64>>>9<<4)]=n,t.sigBytes=4*e.length,this._process(),this._hash},clone:function(){var t=i.clone.call(this);return t._hash=this._hash.clone(),t}});e.SHA1=i._createHelper(a),e.HmacSHA1=i._createHmacHelper(a)}(),t.SHA1}))},df4c:function(t,e,n){"use strict";e["a"]={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"}},df7c:function(t,e,n){(function(t){function n(t,e){for(var n=0,r=t.length-1;r>=0;r--){var i=t[r];"."===i?t.splice(r,1):".."===i?(t.splice(r,1),n++):n&&(t.splice(r,1),n--)}if(e)for(;n--;n)t.unshift("..");return t}function r(t){"string"!==typeof t&&(t+="");var e,n=0,r=-1,i=!0;for(e=t.length-1;e>=0;--e)if(47===t.charCodeAt(e)){if(!i){n=e+1;break}}else-1===r&&(i=!1,r=e+1);return-1===r?"":t.slice(n,r)}function i(t,e){if(t.filter)return t.filter(e);for(var n=[],r=0;r=-1&&!r;o--){var s=o>=0?arguments[o]:t.cwd();if("string"!==typeof s)throw new TypeError("Arguments to path.resolve must be strings");s&&(e=s+"/"+e,r="/"===s.charAt(0))}return e=n(i(e.split("/"),(function(t){return!!t})),!r).join("/"),(r?"/":"")+e||"."},e.normalize=function(t){var r=e.isAbsolute(t),s="/"===o(t,-1);return t=n(i(t.split("/"),(function(t){return!!t})),!r).join("/"),t||r||(t="."),t&&s&&(t+="/"),(r?"/":"")+t},e.isAbsolute=function(t){return"/"===t.charAt(0)},e.join=function(){var t=Array.prototype.slice.call(arguments,0);return e.normalize(i(t,(function(t,e){if("string"!==typeof t)throw new TypeError("Arguments to path.join must be strings");return t})).join("/"))},e.relative=function(t,n){function r(t){for(var e=0;e=0;n--)if(""!==t[n])break;return e>n?[]:t.slice(e,n-e+1)}t=e.resolve(t).substr(1),n=e.resolve(n).substr(1);for(var i=r(t.split("/")),o=r(n.split("/")),s=Math.min(i.length,o.length),a=s,u=0;u=1;--o)if(e=t.charCodeAt(o),47===e){if(!i){r=o;break}}else i=!1;return-1===r?n?"/":".":n&&1===r?"/":t.slice(0,r)},e.basename=function(t,e){var n=r(t);return e&&n.substr(-1*e.length)===e&&(n=n.substr(0,n.length-e.length)),n},e.extname=function(t){"string"!==typeof t&&(t+="");for(var e=-1,n=0,r=-1,i=!0,o=0,s=t.length-1;s>=0;--s){var a=t.charCodeAt(s);if(47!==a)-1===r&&(i=!1,r=s+1),46===a?-1===e?e=s:1!==o&&(o=1):-1!==e&&(o=-1);else if(!i){n=s+1;break}}return-1===e||-1===r||0===o||1===o&&e===r-1&&e===n+1?"":t.slice(e,r)};var o="b"==="ab".substr(-1)?function(t,e,n){return t.substr(e,n)}:function(t,e,n){return e<0&&(e=t.length+e),t.substr(e,n)}}).call(this,n("4362"))},e269:function(t,e,n){"use strict";var r=n("cef7"),i=n("7b4f"),o=n("35a7"),s=n("38f3"),a=n("1300"),u=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 r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),c=function(t){function e(e,n,r){var i=t.call(this,e)||this;return i.key=n,i.oldValue=r,i}return u(e,t),e}(r["a"]),l=function(t){function e(e){var n=t.call(this)||this;return n.on,n.once,n.un,Object(a["c"])(n),n.values_=null,void 0!==e&&n.setProperties(e),n}return u(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_&&Object(s["a"])({},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 c(n,t,e)),n=i["a"].PROPERTYCHANGE,this.hasListener(n)&&this.dispatchEvent(new c(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 r=this.values_||(this.values_={});if(n)r[t]=e;else{var i=r[t];r[t]=e,i!==e&&this.notify(t,i)}},e.prototype.setProperties=function(t,e){for(var n in t)this.set(n,t[n],e)},e.prototype.applyProperties=function(t){t.values_&&Object(s["a"])(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],Object(s["d"])(this.values_)&&(this.values_=null),e||this.notify(t,n)}},e}(o["a"]);e["a"]=l},e300:function(t,e,n){"use strict";var r=n("835b"),i=n("e269"),o=n("183a"),s=n("cef7"),a=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 r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),u={LENGTH:"length"},c=function(t){function e(e,n,r){var i=t.call(this,e)||this;return i.element=n,i.index=r,i}return a(e,t),e}(s["a"]),l=function(t){function e(e,n){var r=t.call(this)||this;r.on,r.once,r.un;var i=n||{};if(r.unique_=!!i.unique,r.array_=e||[],r.unique_)for(var o=0,s=r.array_.length;o0)this.pop()},e.prototype.extend=function(t){for(var e=0,n=t.length;e_&&f(r,arguments[_]),r}));if(O.prototype=w,"Error"!==b?a?a(O,x):u(O,x,{name:!0}):d&&v in E&&(c(O,E,v),c(O,E,"prepareStackTrace")),u(O,E),!g)try{w.name!==b&&o(w,"name",b),w.constructor=O}catch(S){}return O}}},e61b:function(t,e,n){(function(e,r,i){t.exports=r(n("21bf"),n("3252"))})(0,(function(t){return function(e){var n=t,r=n.lib,i=r.WordArray,o=r.Hasher,s=n.x64,a=s.Word,u=n.algo,c=[],l=[],h=[];(function(){for(var t=1,e=0,n=0;n<24;n++){c[t+5*e]=(n+1)*(n+2)/2%64;var r=e%5,i=(2*t+3*e)%5;t=r,e=i}for(t=0;t<5;t++)for(e=0;e<5;e++)l[t+5*e]=e+(2*t+3*e)%5*5;for(var o=1,s=0;s<24;s++){for(var u=0,f=0,p=0;p<7;p++){if(1&o){var d=(1<>>24)|4278255360&(o<<24|o>>>8),s=16711935&(s<<8|s>>>24)|4278255360&(s<<24|s>>>8);var a=n[i];a.high^=s,a.low^=o}for(var u=0;u<24;u++){for(var p=0;p<5;p++){for(var d=0,g=0,y=0;y<5;y++){a=n[p+5*y];d^=a.high,g^=a.low}var v=f[p];v.high=d,v.low=g}for(p=0;p<5;p++){var _=f[(p+4)%5],m=f[(p+1)%5],b=m.high,E=m.low;for(d=_.high^(b<<1|E>>>31),g=_.low^(E<<1|b>>>31),y=0;y<5;y++){a=n[p+5*y];a.high^=d,a.low^=g}}for(var w=1;w<25;w++){a=n[w];var x=a.high,O=a.low,S=c[w];S<32?(d=x<>>32-S,g=O<>>32-S):(d=O<>>64-S,g=x<>>64-S);var C=f[l[w]];C.high=d,C.low=g}var I=f[0],P=n[0];I.high=P.high,I.low=P.low;for(p=0;p<5;p++)for(y=0;y<5;y++){w=p+5*y,a=n[w];var R=f[w],T=f[(p+1)%5+5*y],L=f[(p+2)%5+5*y];a.high=R.high^~T.high&L.high,a.low=R.low^~T.low&L.low}a=n[0];var M=h[u];a.high^=M.high,a.low^=M.low}},_doFinalize:function(){var t=this._data,n=t.words,r=(this._nDataBytes,8*t.sigBytes),o=32*this.blockSize;n[r>>>5]|=1<<24-r%32,n[(e.ceil((r+1)/o)*o>>>5)-1]|=128,t.sigBytes=4*n.length,this._process();for(var s=this._state,a=this.cfg.outputLength/8,u=a/8,c=[],l=0;l>>24)|4278255360&(f<<24|f>>>8),p=16711935&(p<<8|p>>>24)|4278255360&(p<<24|p>>>8),c.push(p),c.push(f)}return new i.init(c,a)},clone:function(){for(var t=o.clone.call(this),e=t._state=this._state.slice(0),n=0;n<25;n++)e[n]=e[n].clone();return t}});n.SHA3=o._createHelper(p),n.HmacSHA3=o._createHmacHelper(p)}(Math),t.SHA3}))},e893:function(t,e,n){var r=n("1a2d"),i=n("56ef"),o=n("06cf"),s=n("9bf2");t.exports=function(t,e,n){for(var a=i(e),u=s.f,c=o.f,l=0;lnew m["a"](t),MultiPoint:t=>new b["a"](t),LineString:t=>new E["a"](t),MultiLineString:t=>new w["a"](t),Polygon:t=>new x["a"](t),MultiPolygon:t=>new O["a"](t)},S.OlFormat=_;var C=n("595b");class I{static getTurfArcFeature(t,e){let n=C["lineString"]([t,[t[0]+.5*(e[0]-t[0]),t[1]+.65*(e[1]-t[1])],e]),r=C["bezierSpline"](n),i=C["length"](r,{units:"meters"});return{curved:r,length:i}}static calculateRotate(t,e){let n=null;try{const r=C["point"](t),i=C["point"](e);n=C["bearing"](r,i)}catch(r){}return n}}I._=C;var P=n("c946"),R=n("617d"),T=n("a896"),L=n("30d1"),M=n("256f");function N(t){if(!(t.context instanceof CanvasRenderingContext2D))throw new Error("Only works for render events from Canvas 2D layers");var e,n=t.inversePixelTransform[0],r=t.frameState,i=Object(T["f"])(t.inversePixelTransform.slice(),r.coordinateToPixelTransform),o=Object(L["b"])(r.viewState.resolution,n),s=Object(M["l"])();return s&&(e=Object(M["k"])(s,r.viewState.projection)),new P["a"](t.context,n,r.extent,i,r.viewState.rotation,o,e)}class A{constructor(t){this.map=t}addAnimation(t,e){const n=d.setOlStyle(e.style),r=d.setOlStyle(e.trackStyle),i=t.getProperties().features,o=this.map;let s={};const a=t=>{let a=N(t);i.forEach((o,u)=>{let c=o.get("center"),l=(t.frameState.time-o.get("start"))/1e3,h=l/e.speed-u/i.length;o.get("start")||o.set("start",(new Date).getTime()),o.get("operation")||o.set("operation",[]),o.get("animating")||o.set("animating",!0),h>=1&&(e.loop?(o.set("start",(new Date).getTime()),o.set("operation",[]),o.set("animating",!0),h=0):o.set("animating",!1));let f=o.get("operation"),p=o.getGeometry().getCoordinateAt(h),d=o.getGeometry().getCoordinateAt(s[u]||p);p[0]&&(f.push(p),o.set("operation",f),c&&this.setCenter(p,c));let g=S.geoFeature("Point",p);if(e.style.icon){const t=I.calculateRotate(p,d);if(t){const r=e.style.angle||0;n.getImage().setRotation(.01745329251*t+r)}}let y=S.geoFeature("LineString",f);a.drawFeature(y,r),a.drawFeature(g,n),s[u]=h}),o.render()};t.on("postrender",a),e.moveFeature=a}viewSetZoom(t){const e=this.map.getView();return e.setZoom(t),Math.ceil(e.getZoom())}setCenter(t=[0,0],e){const n=this.map.getView();e=e||n.getZoom(),n.setCenter(t),this.viewSetZoom(e)}start(){}stop(){}}var F=n("3e6b"),j=n("ae50"),D=n("a43f"),k=n("496f"),G=n("38f3"),B=34962,U=34963,z=35040,Y=35044,X=35048,V=5121,q=5123,W=5125,H=5126,Z=["experimental-webgl","webgl","webkit-3d","moz-webgl"];function K(t,e){for(var n=Object(G["a"])({preserveDrawingBuffer:!0,antialias:!R["f"]},e),r=Z.length,i=0;i0))){var n=e.canvas,r=K(n),i=r.getExtension("WEBGL_lose_context");i&&i.loseContext(),delete _t[t]}}var Ot=function(t){function e(e){var n=t.call(this)||this,r=e||{};n.boundHandleWebGLContextLost_=n.handleWebGLContextLost.bind(n),n.boundHandleWebGLContextRestored_=n.handleWebGLContextRestored.bind(n),n.canvasCacheKey_=r.canvasCacheKey?mt(r.canvasCacheKey):Et(),n.canvas_=wt(n.canvasCacheKey_),n.gl_=K(n.canvas_),n.bufferCache_={},n.extensionCache_={},n.currentProgram_=null,n.canvas_.addEventListener(st.LOST,n.boundHandleWebGLContextLost_),n.canvas_.addEventListener(st.RESTORED,n.boundHandleWebGLContextRestored_),n.offsetRotateMatrix_=Object(T["c"])(),n.offsetScaleMatrix_=Object(T["c"])(),n.tmpMat4_=pt(),n.uniformLocations_={},n.attribLocations_={},n.uniforms_=[],r.uniforms&&n.setUniforms(r.uniforms);var i=n.getGL();return n.postProcessPasses_=r.postProcesses?r.postProcesses.map((function(t){return new ft({webGlContext:i,scaleRatio:t.scaleRatio,vertexShader:t.vertexShader,fragmentShader:t.fragmentShader,uniforms:t.uniforms})})):[new ft({webGlContext:i})],n.shaderCompileErrors_=null,n.startTime_=Date.now(),n}return gt(e,t),e.prototype.setUniforms=function(t){for(var e in this.uniforms_=[],t)this.uniforms_.push({name:e,value:t[e]});this.uniformLocations_={}},e.prototype.canvasCacheKeyMatches=function(t){return this.canvasCacheKey_===mt(t)},e.prototype.getExtension=function(t){if(t in this.extensionCache_)return this.extensionCache_[t];var e=this.gl_.getExtension(t);return this.extensionCache_[t]=e,e},e.prototype.bindBuffer=function(t){var e=this.getGL(),n=Object(ut["c"])(t),r=this.bufferCache_[n];if(!r){var i=e.createBuffer();r={buffer:t,webGlBuffer:i},this.bufferCache_[n]=r}e.bindBuffer(t.getType(),r.webGlBuffer)},e.prototype.flushBufferData=function(t){var e=this.getGL();this.bindBuffer(t),e.bufferData(t.getType(),t.getArray(),t.getUsage())},e.prototype.deleteBuffer=function(t){var e=this.getGL(),n=Object(ut["c"])(t),r=this.bufferCache_[n];r&&!e.isContextLost()&&e.deleteBuffer(r.webGlBuffer),delete this.bufferCache_[n]},e.prototype.disposeInternal=function(){this.canvas_.removeEventListener(st.LOST,this.boundHandleWebGLContextLost_),this.canvas_.removeEventListener(st.RESTORED,this.boundHandleWebGLContextRestored_),xt(this.canvasCacheKey_),delete this.gl_,delete this.canvas_},e.prototype.prepareDraw=function(t,e){var n=this.getGL(),r=this.getCanvas(),i=t.size,o=t.pixelRatio;r.width=i[0]*o,r.height=i[1]*o,r.style.width=i[0]+"px",r.style.height=i[1]+"px",n.useProgram(this.currentProgram_);for(var s=this.postProcessPasses_.length-1;s>=0;s--)this.postProcessPasses_[s].init(t);n.bindTexture(n.TEXTURE_2D,null),n.clearColor(0,0,0,0),n.clear(n.COLOR_BUFFER_BIT),n.enable(n.BLEND),n.blendFunc(n.ONE,e?n.ZERO:n.ONE_MINUS_SRC_ALPHA),n.useProgram(this.currentProgram_),this.applyFrameState(t),this.applyUniforms(t)},e.prototype.prepareDrawToRenderTarget=function(t,e,n){var r=this.getGL(),i=e.getSize();r.bindFramebuffer(r.FRAMEBUFFER,e.getFramebuffer()),r.viewport(0,0,i[0],i[1]),r.bindTexture(r.TEXTURE_2D,e.getTexture()),r.clearColor(0,0,0,0),r.clear(r.COLOR_BUFFER_BIT),r.enable(r.BLEND),r.blendFunc(r.ONE,n?r.ZERO:r.ONE_MINUS_SRC_ALPHA),r.useProgram(this.currentProgram_),this.applyFrameState(t),this.applyUniforms(t)},e.prototype.drawElements=function(t,e){var n=this.getGL();this.getExtension("OES_element_index_uint");var r=n.UNSIGNED_INT,i=4,o=e-t,s=t*i;n.drawElements(n.TRIANGLES,o,r,s)},e.prototype.finalizeDraw=function(t,e,n){for(var r=0,i=this.postProcessPasses_.length;rthis.size_[0]||e>=this.size_[1])return jt[0]=0,jt[1]=0,jt[2]=0,jt[3]=0,jt;this.readAll();var n=Math.floor(t)+(this.size_[1]-Math.floor(e)-1)*this.size_[0];return jt[0]=this.data_[4*n],jt[1]=this.data_[4*n+1],jt[2]=this.data_[4*n+2],jt[3]=this.data_[4*n+3],jt},t.prototype.getTexture=function(){return this.texture_},t.prototype.getFramebuffer=function(){return this.framebuffer_},t.prototype.updateSize_=function(){var t=this.size_,e=this.helper_.getGL();this.texture_=this.helper_.createTexture(t,null,this.texture_),e.bindFramebuffer(e.FRAMEBUFFER,this.framebuffer_),e.viewport(0,0,t[0],t[1]),e.framebufferTexture2D(e.FRAMEBUFFER,e.COLOR_ATTACHMENT0,e.TEXTURE_2D,this.texture_,0),this.data_=new Uint8Array(t[0]*t[1]*4)},t}(),kt=Dt,Gt=n("7fd1"),Bt=n("1e8d"),Ut=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 r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),zt=function(t){function e(e,n){var r=this,i=n.uniforms||{},o=Object(T["c"])();i[yt.PROJECTION_MATRIX]=o,r=t.call(this,e,{uniforms:i,postProcesses:n.postProcesses})||this,r.ready=!1,r.sourceRevision_=-1,r.verticesBuffer_=new et(B,X),r.hitVerticesBuffer_=new et(B,X),r.indicesBuffer_=new et(U,X),r.vertexShader_=n.vertexShader,r.fragmentShader_=n.fragmentShader,r.program_,r.hitDetectionEnabled_=!(!n.hitFragmentShader||!n.hitVertexShader),r.hitVertexShader_=n.hitVertexShader,r.hitFragmentShader_=n.hitFragmentShader,r.hitProgram_;var s=n.attributes?n.attributes.map((function(t){return{name:"a_"+t.name,size:1,type:vt.FLOAT}})):[];r.attributes=[{name:"a_position",size:2,type:vt.FLOAT},{name:"a_index",size:1,type:vt.FLOAT}].concat(s),r.hitDetectionAttributes=[{name:"a_position",size:2,type:vt.FLOAT},{name:"a_index",size:1,type:vt.FLOAT},{name:"a_hitColor",size:4,type:vt.FLOAT},{name:"a_featureUid",size:1,type:vt.FLOAT}].concat(s),r.customAttributes=n.attributes?n.attributes:[],r.previousExtent_=Object(Pt["j"])(),r.currentTransform_=o,r.renderTransform_=Object(T["c"])(),r.invertRenderTransform_=Object(T["c"])(),r.renderInstructions_=new Float32Array(0),r.hitRenderInstructions_=new Float32Array(0),r.hitRenderTarget_,r.generateBuffersRun_=0,r.worker_=Object(Gt["a"])(),r.worker_.addEventListener("message",function(t){var e=t.data;if(e.type===Tt.GENERATE_BUFFERS){var n=e.projectionTransform;e.hitDetection?(this.hitVerticesBuffer_.fromArrayBuffer(e.vertexBuffer),this.helper.flushBufferData(this.hitVerticesBuffer_)):(this.verticesBuffer_.fromArrayBuffer(e.vertexBuffer),this.helper.flushBufferData(this.verticesBuffer_)),this.indicesBuffer_.fromArrayBuffer(e.indexBuffer),this.helper.flushBufferData(this.indicesBuffer_),this.renderTransform_=n,Object(T["d"])(this.invertRenderTransform_,this.renderTransform_),e.hitDetection?this.hitRenderInstructions_=new Float32Array(t.data.renderInstructions):(this.renderInstructions_=new Float32Array(t.data.renderInstructions),e.generateBuffersRun===this.generateBuffersRun_&&(this.ready=!0)),this.getLayer().changed()}}.bind(r)),r.featureCache_={},r.featureCount_=0;var a=r.getLayer().getSource();return r.sourceListenKeys_=[Object(Bt["a"])(a,D["a"].ADDFEATURE,r.handleSourceFeatureAdded_,r),Object(Bt["a"])(a,D["a"].CHANGEFEATURE,r.handleSourceFeatureChanged_,r),Object(Bt["a"])(a,D["a"].REMOVEFEATURE,r.handleSourceFeatureDelete_,r),Object(Bt["a"])(a,D["a"].CLEAR,r.handleSourceFeatureClear_,r)],a.forEachFeature(function(t){this.featureCache_[Object(ut["c"])(t)]={feature:t,properties:t.getProperties(),geometry:t.getGeometry()},this.featureCount_++}.bind(r)),r}return Ut(e,t),e.prototype.afterHelperCreated=function(){this.program_=this.helper.getProgram(this.fragmentShader_,this.vertexShader_),this.hitDetectionEnabled_&&(this.hitProgram_=this.helper.getProgram(this.hitFragmentShader_,this.hitVertexShader_),this.hitRenderTarget_=new kt(this.helper))},e.prototype.handleSourceFeatureAdded_=function(t){var e=t.feature;this.featureCache_[Object(ut["c"])(e)]={feature:e,properties:e.getProperties(),geometry:e.getGeometry()},this.featureCount_++},e.prototype.handleSourceFeatureChanged_=function(t){var e=t.feature;this.featureCache_[Object(ut["c"])(e)]={feature:e,properties:e.getProperties(),geometry:e.getGeometry()}},e.prototype.handleSourceFeatureDelete_=function(t){var e=t.feature;delete this.featureCache_[Object(ut["c"])(e)],this.featureCount_--},e.prototype.handleSourceFeatureClear_=function(){this.featureCache_={},this.featureCount_=0},e.prototype.renderFrame=function(t){var e=this.helper.getGL();this.preRender(e,t);var n=t.viewState.projection,r=this.getLayer(),i=r.getSource(),o=i.getWrapX()&&n.canWrapX(),s=n.getExtent(),a=t.extent,u=o?Object(Pt["E"])(s):null,c=o?Math.ceil((a[2]-s[2])/u)+1:1,l=o?Math.floor((a[0]-s[0])/u):0,h=l,f=this.indicesBuffer_.getSize();do{this.helper.makeProjectionTransform(t,this.currentTransform_),Object(T["l"])(this.currentTransform_,h*u,0),Object(T["f"])(this.currentTransform_,this.invertRenderTransform_),this.helper.applyUniforms(t),this.helper.drawElements(0,f)}while(++h{const n=S.createFeature(t);e.push(n)});const n=new $t["a"]({features:e});return n}static getSource(t){let e;return e=t.url?new $t["a"]({url:t.url,format:new S.OlFormat.GeoJSON}):this.getFeatureSource(t),e}getOption(t){}createMultipleFeatureLayer(t){if(!t.layerName)throw Error("图层名称不能为空");this.removeGeometryLayer(t.layerName);let e=le.getSource(t);const n={name:t.layerName,source:e,style:e=>{let n,{olStyle:r,selectStyle:i}=e.getProperties();return i||e.setProperties({selectStyle:t.selectStyle||d.defaultStyle}),n=r||t.style||{},d.setOlStyle(n)}},r=new F["a"](n);return r.setProperties({name:t.layerName}),t.center&&this.map.getView().fit(e.getExtent(),{size:this.map.getSize(),maxZoom:t.center}),this.geometryLayers[t.layerName]=r,r}createAnimationLayer(t){if(!t.layerName)throw Error("图层名称不能为空");const e=[];t.features.forEach(t=>{const{selectStyle:n,olStyle:r,center:i}=t;let o=null;if(t.geometryType="LineString",t.to&&t.from){let{to:e,from:n}=t;if("string"===typeof t.to){const n=S.wktFeature(t.to);e=n.getGeometry().getCoordinates()}if("string"===typeof t.from){const e=S.wktFeature(t.from);n=e.getGeometry().getCoordinates()}const{curved:r,length:i}=I.getTurfArcFeature(e,n);o=S.jsonFeature(r),o.set("length",i)}else o=S.createFeature(t);o.setProperties(t.attributes),o.setProperties({selectStyle:n,olStyle:r,center:i}),e.push(o)});const n=new $t["a"]({features:e}),r={name:t.layerName,source:n,style:e=>{let n,{olStyle:r,selectStyle:i}=e.getProperties();return i||e.setProperties({selectStyle:t.selectStyle||d.defaultStyle}),n=r||t.style||{},n.stroke||(n["stroke"]={width:1,color:"rgba(228, 228, 54,0)"}),d.setOlStyle(n)}},i=new F["a"](r);return i.setProperties({name:t.layerName,features:e}),this.animations[t.layerName]=t,this.geometryLayers[t.layerName]=i,i}createHeatMapLayer(t){if(!t.layerName)throw Error("图层名称不能为空");let e=le.getSource(t),n=t.layerName;const r=Object.assign(t,{name:n,source:e});let i=new Jt(r);return this.geometryLayers[t.layerName]=i,i}removeGeometryLayer(t){const e=this.map.getLayers().getArray();this.animations[t]&&this.unAnimation(t),e.forEach(e=>{if(e.getProperties().name===t)return this.map.removeLayer(e),delete this.geometryLayers[t],!1})}checkedGeometryLayer(t){for(const e in this.geometryLayers)this.geometryLayers[e].setVisible(t.indexOf(e)>-1)}unAnimation(t){this.geometryLayers[t].un("postrender",this.animations[t].moveFeature),delete this.animations[t]}removeLayerAll(){const t=Object.keys(this.geometryLayers);t.forEach(t=>this.removeGeometryLayer(t))}createArcGISMapServerLayer(t){const e=new se({url:t.url}),n=new Qt["a"]({source:e,extent:ce.extentJx});return n.setProperties({name:t.layerName}),this.geometryLayers[t.layerName]=n,n}createLayerArcgisXYZ(t){const{resolutions:e}=t,n=t.url+"/tile/{z}/{y}/{x}";let r=new ue["a"]({origin:ce.originArcgisServer,extent:ce.extentJx,resolutions:e});return new Qt["a"]({source:new ae["a"]({tileGrid:r,projection:"EPSG:4326",url:n})})}}var he=n("2ce2");class fe{constructor(t,e){this.map=t,this.config=e}initSelectSingleClick(t){const e=this.map,n=t=>{const e=t.values_.selectStyle||d.defaultStyle;return d.setOlStyle(e)},r={style:n},i=new he["a"](r);e.addInteraction(i),i.on("select",e=>{const n=e.target.getFeatures().getArray();if(n.length>0){const r=n[0],i=r.values_;if(i.callback&&i.callback(Object.assign(e,{properties:i})),t.onSelectClick){let n=e.mapBrowserEvent||e;t.onSelectClick(Object.assign(n,{properties:n}))}}}),this.selectSingleClick=i}on(t,e){this.map.on(t,e)}pointermove(t){this.on("pointermove",e=>{this.map.forEachFeatureAtPixel(e.pixel,(n,r)=>{if(!n.values_)return!1;t.onPointerMove&&t.onPointerMove(Object.assign(e,{properties:n.values_})),this.config.isMoveSelect&&(this.selectSingleClick.getFeatures().clear(),this.selectSingleClick.getFeatures().push(n),this.selectSingleClick.dispatchEvent({type:"select",selected:[n],coordinate:e.coordinate}))})})}onClickSelected(t){this.on("click",t=>{this.map.forEachFeatureAtPixel(t.pixel,(e,n)=>{if(!e.values_)return!1;this.config.isClickSelect&&(this.selectSingleClick.getFeatures().clear(),this.selectSingleClick.getFeatures().push(e),this.selectSingleClick.dispatchEvent({type:"select",selected:[e],coordinate:t.coordinate,event:t}))})})}}var pe=n("5eee"),de=n("a2c7"),ge=n("0710"),ye=n("3452"),ve=n.n(ye);const _e=n("5a24").default,me={target:"map",config:{},arcgisUrls:{},onEvent:{}};class be{constructor(t={}){this.baseLayers={},this.layerName="",this.config={},this.arcgisUrls={},this.overlays={},t=Object.assign(me,t);let{target:e,config:n,arcgisUrls:r,onEvent:i}=t;const a=new s;n=Object.assign(a,n),this.map=new pe["a"]({controls:[],target:e,view:new de["a"](n)}),this.arcgisUrls=Object.assign(o.arcgisUrls,r||{}),this.config=n,this.olLayer=new le(this.map),this.olAni=new A(this.map),this.createBaseLayers(this.config.layerName),this.listens=new fe(this.map,n),this.listens.initSelectSingleClick(i),this.listens.pointermove(i),n.isClickSelect&&this.listens.onClickSelected(i)}createBaseLayers(t){const{utilsTileLayer:e}=_e,n=e.createLayerBaiduXYZ(),r=e.createLayerGD(),i=e.createLayerGoogle();let o={baidu:n,gaode:r,google:i};this.baseLayers=o;for(let s in this.arcgisUrls){const t=this.arcgisUrls[s];this.addBaseArcgisLayer(s,t)}for(const s in this.baseLayers)this.map.addLayer(this.baseLayers[s]);this.changeBaseLayer(t),this.map.measureTool=new _e.MeasureTool(this.map)}changeBaseLayer(t){this.layerName=t;for(const e in this.baseLayers)this.baseLayers[e].setVisible(e===t)}addGeometryLayer(t){let e=this.olLayer.createMultipleFeatureLayer(t);this.map.addLayer(e)}addGeometryJMLayer(t){t.features.forEach(t=>{t.geometry=this.addGeometryDecrypt(t.geometry)});let e=this.olLayer.createMultipleFeatureLayer(t);this.map.addLayer(e)}addHeatMapLayer(t){let e=this.olLayer.createHeatMapLayer(t);this.map.addLayer(e)}addAnimationLayer(t){const e=this.olLayer.createAnimationLayer(t);this.map.addLayer(e),this.olAni.addAnimation(e,t)}addOverlay(t,e){let n;if(n="string"===typeof t?document.getElementById(t):t,!n)throw Error("获取Element失败");const r=n.id;let i=this.overlays[r];i&&this.removeOverlay(r),i=new ge["a"](Object.assign(e,{element:n})),this.map.addOverlay(i),this.overlays[r]=i,i.setPosition(e.position)}removeOverlay(t){const e=this.overlays[t];e&&this.map.removeOverlay(e)}closeOverlay(t){const e=this.overlays[t];e&&e.setPosition(void 0)}setOverlayPosition(t,e){const n=this.overlays[t];n.setPosition(e)}removeGeometryLayer(t){this.olLayer.removeGeometryLayer(t)}checkedGeometryLayer(t){this.olLayer.checkedGeometryLayer(t)}addGeometryLayers(t){t.forEach(t=>this.addGeometryLayer(t))}unAnimation(t){this.olLayer.unAnimation(t)}addGeometryDecrypt(t){let e="ABCD",n="EF12",r="3456",i="7890",o="1234",s="5678",a="90AB",u="CDEF",c=`${e}${n}${r}${i}`,l=`${o}${s}${a}${u}`,h=ve.a.enc.Utf8.parse(t);var f=ve.a.enc.Utf8.parse(c);let p=ve.a.enc.Utf8.parse(l),d=ve.a.enc.Utf8.stringify(h);var g=ve.a.AES.decrypt(d,f,{iv:p,mode:ve.a.mode.CBC,padding:ve.a.pad.Pkcs7});let y=g.toString(ve.a.enc.Utf8);return y}addMeasure(){this.map.measureTool.addInteraction("LineString")}unMeasure(){this.map.measureTool.removeInteraction()}removeLayerAll(){this.olLayer.removeLayerAll()}setZoom(t=1){const e=this.map.getView();let n=e.getZoom()+t;return this.viewSetZoom(n)}viewSetZoom(t){const e=this.map.getView();if(t>this.config.maxZoom)throw Error("缩放等级不能超过最大缩放等级");if(t>3}s--,1===o||2===o?(a+=t.readSVarint(),u+=t.readSVarint(),1===o&&c>l&&(r.push(c),l=c),n.push(a,u),c+=2):7===o?c>l&&(n.push(n[l],n[l+1]),c+=2):Object(y["a"])(!1,59)}c>l&&(r.push(c),l=c)},e.prototype.createFeature_=function(t,e,n){var c,l=e.type;if(0===l)return null;var p,g=e.properties;this.idProperty_?(p=g[this.idProperty_],delete g[this.idProperty_]):p=e.id,g[this.layerName_]=e.layer.name;var y=[],v=[];this.readRawGeometry_(t,e,y,v);var m=S(l,v.length);if(this.featureClass_===d["a"])c=new this.featureClass_(m,y,v,g,p),c.transform(n.dataProjection);else{var b=void 0;if("Polygon"==m){var E=Object(_["a"])(y,v);b=E.length>1?new u["a"](y,i["a"].XY,E):new f["a"](y,i["a"].XY,v)}else b="Point"===m?new h["a"](y,i["a"].XY):"LineString"===m?new o["a"](y,i["a"].XY):"MultiPoint"===m?new a["a"](y,i["a"].XY):"MultiLineString"===m?new s["a"](y,i["a"].XY,v):null;var w=this.featureClass_;c=new w,this.geometryName_&&c.setGeometryName(this.geometryName_);var x=Object(r["c"])(b,!1,n);c.setGeometry(x),void 0!==p&&c.setId(p),c.setProperties(g,!0)}return c},e.prototype.getType=function(){return"arraybuffer"},e.prototype.readFeatures=function(t,e){var n=this.layers_,r=this.adaptOptions(e),i=Object(v["h"])(r.dataProjection);i.setWorldExtent(r.extent),r.dataProjection=i;var o=new l.a(t),s=o.readFields(E,{}),a=[];for(var u in s)if(!n||-1!=n.indexOf(u)){var c=s[u],h=c?[0,0,c.extent,c.extent]:null;i.setExtent(h);for(var f=0,p=c.length;f>3,r=1===t?n.readString():2===t?n.readFloat():3===t?n.readDouble():4===t?n.readVarint64():5===t?n.readVarint():6===t?n.readSVarint():7===t?n.readBoolean():null;e.values.push(r)}}function x(t,e,n){if(1==t)e.id=n.readVarint();else if(2==t){var r=n.readVarint()+n.pos;while(n.pos