/*! * * iclient-openlayers * Copyright© 2000 - 2023 SuperMap Software Co.Ltd * license: Apache-2.0 * version: v11.1.0-beta * */!function(){var e={937:function(e){!function(t){"use strict";if(t.__disableNativeFetch||!t.fetch){s.prototype.append=function(e,t){e=i(e),t=a(t);var r=this.map[e];r||(r=[],this.map[e]=r),r.push(t)},s.prototype.delete=function(e){delete this.map[i(e)]},s.prototype.get=function(e){var t=this.map[i(e)];return t?t[0]:null},s.prototype.getAll=function(e){return this.map[i(e)]||[]},s.prototype.has=function(e){return this.map.hasOwnProperty(i(e))},s.prototype.set=function(e,t){this.map[i(e)]=[a(t)]},s.prototype.forEach=function(e,t){Object.getOwnPropertyNames(this.map).forEach(function(r){this.map[r].forEach(function(n){e.call(t,n,r,this)},this)},this)};var r={blob:"FileReader"in t&&"Blob"in t&&function(){try{return new Blob,!0}catch(e){return!1}}(),formData:"FormData"in t,arrayBuffer:"ArrayBuffer"in t},n=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];p.prototype.clone=function(){return new p(this)},f.call(p.prototype),f.call(y.prototype),y.prototype.clone=function(){return new y(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new s(this.headers),url:this.url})},y.error=function(){var e=new y(null,{status:0,statusText:""});return e.type="error",e};var o=[301,302,303,307,308];y.redirect=function(e,t){if(-1===o.indexOf(t))throw new RangeError("Invalid status code");return new y(null,{status:t,headers:{location:e}})},t.Headers=s,t.Request=p,t.Response=y,t.fetch=function(e,t){return new Promise(function(n,o){var i;i=p.prototype.isPrototypeOf(e)&&!t?e:new p(e,t);var a=new XMLHttpRequest;var l=!1;function u(){if(4===a.readyState){var e=1223===a.status?204:a.status;if(e<100||e>599){if(l)return;return l=!0,void o(new TypeError("Network request failed"))}var t={status:e,statusText:a.statusText,headers:function(e){var t=new s;return e.getAllResponseHeaders().trim().split("\n").forEach(function(e){var r=e.trim().split(":"),n=r.shift().trim(),o=r.join(":").trim();t.append(n,o)}),t}(a),url:"responseURL"in a?a.responseURL:/^X-Request-URL:/m.test(a.getAllResponseHeaders())?a.getResponseHeader("X-Request-URL"):void 0},r="response"in a?a.response:a.responseText;l||(l=!0,n(new y(r,t)))}}a.onreadystatechange=u,a.onload=u,a.onerror=function(){l||(l=!0,o(new TypeError("Network request failed")))},a.open(i.method,i.url,!0);try{"include"===i.credentials&&("withCredentials"in a?a.withCredentials=!0:console&&console.warn&&console.warn("withCredentials is not supported, you can ignore this warning"))}catch(e){console&&console.warn&&console.warn("set withCredentials error:"+e)}"responseType"in a&&r.blob&&(a.responseType="blob"),i.headers.forEach(function(e,t){a.setRequestHeader(t,e)}),a.send(void 0===i._bodyInit?null:i._bodyInit)})},t.fetch.polyfill=!0,e.exports&&(e.exports=t.fetch)}function i(e){if("string"!=typeof e&&(e=String(e)),/[^a-z0-9\-#$%&'*+.\^_`|~]/i.test(e))throw new TypeError("Invalid character in header field name");return e.toLowerCase()}function a(e){return"string"!=typeof e&&(e=String(e)),e}function s(e){this.map={},e instanceof s?e.forEach(function(e,t){this.append(t,e)},this):e&&Object.getOwnPropertyNames(e).forEach(function(t){this.append(t,e[t])},this)}function l(e){if(e.bodyUsed)return Promise.reject(new TypeError("Already read"));e.bodyUsed=!0}function u(e){return new Promise(function(t,r){e.onload=function(){t(e.result)},e.onerror=function(){r(e.error)}})}function c(e){var t=new FileReader;return t.readAsArrayBuffer(e),u(t)}function f(){return this.bodyUsed=!1,this._initBody=function(e,t){if(this._bodyInit=e,"string"==typeof e)this._bodyText=e;else if(r.blob&&Blob.prototype.isPrototypeOf(e))this._bodyBlob=e,this._options=t;else if(r.formData&&FormData.prototype.isPrototypeOf(e))this._bodyFormData=e;else if(e){if(!r.arrayBuffer||!ArrayBuffer.prototype.isPrototypeOf(e))throw new Error("unsupported BodyInit type")}else this._bodyText=""},r.blob?(this.blob=function(){var e=l(this);if(e)return e;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))},this.arrayBuffer=function(){return this.blob().then(c)},this.text=function(){var e,t,r,n,o,i,a,s=l(this);if(s)return s;if(this._bodyBlob)return e=this._bodyBlob,t=this._options,r=new FileReader,n=t.headers.map["content-type"]?t.headers.map["content-type"].toString():"",o=/charset\=[0-9a-zA-Z\-\_]*;?/,i=e.type.match(o)||n.match(o),a=[e],i&&a.push(i[0].replace(/^charset\=/,"").replace(/;$/,"")),r.readAsText.apply(r,a),u(r);if(this._bodyFormData)throw new Error("could not read FormData body as text");return Promise.resolve(this._bodyText)}):this.text=function(){var e=l(this);return e||Promise.resolve(this._bodyText)},r.formData&&(this.formData=function(){return this.text().then(h)}),this.json=function(){return this.text().then(JSON.parse)},this}function p(e,t){var r,o,i=(t=t||{}).body;if(p.prototype.isPrototypeOf(e)){if(e.bodyUsed)throw new TypeError("Already read");this.url=e.url,this.credentials=e.credentials,t.headers||(this.headers=new s(e.headers)),this.method=e.method,this.mode=e.mode,i||(i=e._bodyInit,e.bodyUsed=!0)}else this.url=e;if(this.credentials=t.credentials||this.credentials||"omit",!t.headers&&this.headers||(this.headers=new s(t.headers)),this.method=(r=t.method||this.method||"GET",o=r.toUpperCase(),n.indexOf(o)>-1?o:r),this.mode=t.mode||this.mode||null,this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&i)throw new TypeError("Body not allowed for GET or HEAD requests");this._initBody(i,t)}function h(e){var t=new FormData;return e.trim().split("&").forEach(function(e){if(e){var r=e.split("="),n=r.shift().replace(/\+/g," "),o=r.join("=").replace(/\+/g," ");t.append(decodeURIComponent(n),decodeURIComponent(o))}}),t}function y(e,t){t||(t={}),this._initBody(e,t),this.type="default",this.status=t.status,this.ok=this.status>=200&&this.status<300,this.statusText=t.statusText,this.headers=t.headers instanceof s?t.headers:new s(t.headers),this.url=t.url||""}}("undefined"!=typeof self?self:this)},238:function(e,t){var r,n,o;n=[t,e],void 0===(o="function"==typeof(r=function(e,t){"use strict";var r={timeout:5e3,jsonpCallback:"callback",jsonpCallbackFunction:null};function n(e){try{delete window[e]}catch(t){window[e]=void 0}}function o(e){var t=document.getElementById(e);t&&document.getElementsByTagName("head")[0].removeChild(t)}t.exports=function(e){var t=arguments.length<=1||void 0===arguments[1]?{}:arguments[1],i=e,a=t.timeout||r.timeout,s=t.jsonpCallback||r.jsonpCallback,l=void 0;return new Promise(function(r,u){var c=t.jsonpCallbackFunction||"jsonp_"+Date.now()+"_"+Math.ceil(1e5*Math.random()),f=s+"_"+c;window[c]=function(e){r({ok:!0,json:function(){return Promise.resolve(e)}}),l&&clearTimeout(l),o(f),n(c)},i+=-1===i.indexOf("?")?"?":"&";var p=document.createElement("script");p.setAttribute("src",""+i+s+"="+c),t.charset&&p.setAttribute("charset",t.charset),p.id=f,document.getElementsByTagName("head")[0].appendChild(p),l=setTimeout(function(){u(new Error("JSONP request to "+e+" timed out")),n(c),o(f),window[c]=function(){n(c)}},a),p.onerror=function(){u(new Error("JSONP request to "+e+" failed")),n(c),o(f),l&&clearTimeout(l)}})}})?r.apply(t,n):r)||(e.exports=o)},634:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Builder=void 0;var n=r(603),o=r(83),i=function(){function e(e){var t;this.minalign=1,this.vtable=null,this.vtable_in_use=0,this.isNested=!1,this.object_start=0,this.vtables=[],this.vector_num_elems=0,this.force_defaults=!1,this.string_maps=null,t=e||1024,this.bb=n.ByteBuffer.allocate(t),this.space=t}return e.prototype.clear=function(){this.bb.clear(),this.space=this.bb.capacity(),this.minalign=1,this.vtable=null,this.vtable_in_use=0,this.isNested=!1,this.object_start=0,this.vtables=[],this.vector_num_elems=0,this.force_defaults=!1,this.string_maps=null},e.prototype.forceDefaults=function(e){this.force_defaults=e},e.prototype.dataBuffer=function(){return this.bb},e.prototype.asUint8Array=function(){return this.bb.bytes().subarray(this.bb.position(),this.bb.position()+this.offset())},e.prototype.prep=function(t,r){t>this.minalign&&(this.minalign=t);for(var n=1+~(this.bb.capacity()-this.space+r)&t-1;this.space=0&&0==this.vtable[t];t--);for(var r=t+1;t>=0;t--)this.addInt16(0!=this.vtable[t]?e-this.vtable[t]:0);this.addInt16(e-this.object_start);var n=(r+2)*o.SIZEOF_SHORT;this.addInt16(n);var i=0,a=this.space;e:for(t=0;t=0;a--)this.writeInt8(i.charCodeAt(a))}this.prep(this.minalign,o.SIZEOF_INT+n),this.addOffset(e),n&&this.addInt32(this.bb.capacity()-this.space),this.bb.setPosition(this.space)},e.prototype.finishSizePrefixed=function(e,t){this.finish(e,t,!0)},e.prototype.requiredField=function(e,t){var r=this.bb.capacity()-e,n=r-this.bb.readInt32(r);if(!(0!=this.bb.readInt16(n+t)))throw new Error("FlatBuffers: field "+t+" must be set")},e.prototype.startVector=function(e,t,r){this.notNested(),this.vector_num_elems=t,this.prep(o.SIZEOF_INT,e*t),this.prep(r,e*t)},e.prototype.endVector=function(){return this.writeInt32(this.vector_num_elems),this.offset()},e.prototype.createSharedString=function(e){if(!e)return 0;if(this.string_maps||(this.string_maps=new Map),this.string_maps.has(e))return this.string_maps.get(e);var t=this.createString(e);return this.string_maps.set(e,t),t},e.prototype.createString=function(e){if(null===e||void 0===e)return 0;var t;if(e instanceof Uint8Array)t=e;else{t=[];for(var r=0;r=56320)n=o;else n=(o<<10)+e.charCodeAt(r++)+-56613888;n<128?t.push(n):(n<2048?t.push(n>>6&31|192):(n<65536?t.push(n>>12&15|224):t.push(n>>18&7|240,n>>12&63|128),t.push(n>>6&63|128)),t.push(63&n|128))}}this.addInt8(0),this.startVector(1,t.length,1),this.bb.setPosition(this.space-=t.length);r=0;for(var i=this.space,a=this.bb.bytes();r>24},e.prototype.readUint8=function(e){return this.bytes_[e]},e.prototype.readInt16=function(e){return this.readUint16(e)<<16>>16},e.prototype.readUint16=function(e){return this.bytes_[e]|this.bytes_[e+1]<<8},e.prototype.readInt32=function(e){return this.bytes_[e]|this.bytes_[e+1]<<8|this.bytes_[e+2]<<16|this.bytes_[e+3]<<24},e.prototype.readUint32=function(e){return this.readInt32(e)>>>0},e.prototype.readInt64=function(e){return BigInt.asIntN(64,BigInt(this.readUint32(e))+(BigInt(this.readUint32(e+4))<>8},e.prototype.writeUint16=function(e,t){this.bytes_[e]=t,this.bytes_[e+1]=t>>8},e.prototype.writeInt32=function(e,t){this.bytes_[e]=t,this.bytes_[e+1]=t>>8,this.bytes_[e+2]=t>>16,this.bytes_[e+3]=t>>24},e.prototype.writeUint32=function(e,t){this.bytes_[e]=t,this.bytes_[e+1]=t>>8,this.bytes_[e+2]=t>>16,this.bytes_[e+3]=t>>24},e.prototype.writeInt64=function(e,t){this.writeInt32(e,Number(BigInt.asIntN(32,t))),this.writeInt32(e+4,Number(BigInt.asIntN(32,t>>BigInt(32))))},e.prototype.writeUint64=function(e,t){this.writeUint32(e,Number(BigInt.asUintN(32,t))),this.writeUint32(e+4,Number(BigInt.asUintN(32,t>>BigInt(32))))},e.prototype.writeFloat32=function(e,t){o.float32[0]=t,this.writeInt32(e,o.int32[0])},e.prototype.writeFloat64=function(e,t){o.float64[0]=t,this.writeInt32(e,o.int32[o.isLittleEndian?0:1]),this.writeInt32(e+4,o.int32[o.isLittleEndian?1:0])},e.prototype.getBufferIdentifier=function(){if(this.bytes_.length>10),56320+(1023&s)))}return o},e.prototype.__union_with_string=function(e,t){return"string"==typeof e?this.__string(t):this.__union(e,t)},e.prototype.__indirect=function(e){return e+this.readInt32(e)},e.prototype.__vector=function(e){return e+this.readInt32(e)+n.SIZEOF_INT},e.prototype.__vector_len=function(e){return this.readInt32(e+this.readInt32(e))},e.prototype.__has_identifier=function(e){if(e.length!=n.FILE_IDENTIFIER_LENGTH)throw new Error("FlatBuffers: file identifier must be length "+n.FILE_IDENTIFIER_LENGTH);for(var t=0;t-1}function d(e,t,r){for(var n=-1,o=e?e.length:0;++n=o&&(s=m,l=!1,t=new B(t));e:for(;++a-1},F.prototype.set=function(e,t){var r=this.__data__,n=G(r,e);return n<0?r.push([e,t]):r[n][1]=t,this},D.prototype.clear=function(){this.__data__={hash:new N,map:new(L||F),string:new N}},D.prototype.delete=function(e){return z(this,e).delete(e)},D.prototype.get=function(e){return z(this,e).get(e)},D.prototype.has=function(e){return z(this,e).has(e)},D.prototype.set=function(e,t){return z(this,e).set(e,t),this},B.prototype.add=B.prototype.push=function(e){return this.__data__.set(e,i),this},B.prototype.has=function(e){return this.__data__.has(e)};var H,W,Y=(H=function(e,t){return Z(e)?U(e,function e(t,r,n,o,i){var a=-1,s=t.length;for(n||(n=q),i||(i=[]);++a0&&n(l)?r>1?e(l,r-1,n,o,i):b(i,l):o||(i[i.length]=l)}return i}(t,1,Z,!0)):[]},W=A(void 0===W?H.length-1:W,0),function(){for(var e=arguments,t=-1,r=A(e.length-W,0),n=Array(r);++t-1&&e%1==0&&e<=a}(e.length)&&!K(e)}function Z(e){return function(e){return!!e&&"object"==n(e)}(e)&&Q(e)}function K(e){var t=$(e)?j.call(e):"";return t==l||t==u}function $(e){var t=n(e);return!!e&&("object"==t||"function"==t)}e.exports=Y},944:function(e,t,r){function n(e){"@babel/helpers - typeof";return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}e=r.nmd(e);var o=200,i="Expected a function",a="__lodash_hash_undefined__",s=1,l=2,u=1/0,c=9007199254740991,f="[object Arguments]",p="[object Array]",h="[object Boolean]",y="[object Date]",d="[object Error]",b="[object Function]",v="[object GeneratorFunction]",m="[object Map]",g="[object Number]",w="[object Object]",O="[object RegExp]",S="[object Set]",_="[object String]",P="[object Symbol]",x="[object ArrayBuffer]",k="[object DataView]",j=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,E=/^\w*$/,T=/^\./,C=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,R=/\\(\\)?/g,M=/^\[object .+?Constructor\]$/,A=/^(?:0|[1-9]\d*)$/,L={};L["[object Float32Array]"]=L["[object Float64Array]"]=L["[object Int8Array]"]=L["[object Int16Array]"]=L["[object Int32Array]"]=L["[object Uint8Array]"]=L["[object Uint8ClampedArray]"]=L["[object Uint16Array]"]=L["[object Uint32Array]"]=!0,L[f]=L[p]=L[x]=L[h]=L[k]=L[y]=L[d]=L[b]=L[m]=L[g]=L[w]=L[O]=L[S]=L[_]=L["[object WeakMap]"]=!1;var I="object"==(void 0===r.g?"undefined":n(r.g))&&r.g&&r.g.Object===Object&&r.g,N="object"==("undefined"==typeof self?"undefined":n(self))&&self&&self.Object===Object&&self,F=I||N||Function("return this")(),D="object"==n(t)&&t&&!t.nodeType&&t,B=D&&"object"==n(e)&&e&&!e.nodeType&&e,G=B&&B.exports===D&&I.process,U=function(){try{return G&&G.binding("util")}catch(e){}}(),V=U&&U.isTypedArray;function z(e,t){for(var r=-1,n=e?e.length:0;++ru))return!1;var f=i.get(e);if(f&&i.get(t))return f==t;var p=-1,h=!0,y=o&s?new je:void 0;for(i.set(e,t),i.set(t,e);++p-1},xe.prototype.set=function(e,t){var r=this.__data__,n=Ce(r,e);return n<0?r.push([e,t]):r[n][1]=t,this},ke.prototype.clear=function(){this.__data__={hash:new Pe,map:new(fe||xe),string:new Pe}},ke.prototype.delete=function(e){return Be(this,e).delete(e)},ke.prototype.get=function(e){return Be(this,e).get(e)},ke.prototype.has=function(e){return Be(this,e).has(e)},ke.prototype.set=function(e,t){return Be(this,e).set(e,t),this},je.prototype.add=je.prototype.push=function(e){return this.__data__.set(e,a),this},je.prototype.has=function(e){return this.__data__.has(e)},Ee.prototype.clear=function(){this.__data__=new xe},Ee.prototype.delete=function(e){return this.__data__.delete(e)},Ee.prototype.get=function(e){return this.__data__.get(e)},Ee.prototype.has=function(e){return this.__data__.has(e)},Ee.prototype.set=function(e,t){var r=this.__data__;if(r instanceof xe){var n=r.__data__;if(!fe||n.length-1&&e%1==0&&eo?0:o+t),(r=r>o?o:r)<0&&(r+=o),o=t>r?0:r-t>>>0,t>>>=0;for(var i=Array(o);++n-1&&e%1==0&&e<=c}function ot(e){var t=n(e);return!!e&&("object"==t||"function"==t)}function it(e){return!!e&&"object"==n(e)}function at(e){return"symbol"==n(e)||it(e)&&ne.call(e)==P}var st=V?function(e){return function(t){return e(t)}}(V):function(e){return it(e)&&nt(e.length)&&!!L[ne.call(e)]};function lt(e){return tt(e)?Te(e):Ne(e)}function ut(e){return e}e.exports=function(e,t){var r=[];if(!e||!e.length)return r;var n=-1,o=[],i=e.length;for(t=Ie(t);++n-1&&e%1==0&&e-1&&e%1==0&&e<=o}(e.length)&&!Y(e)}function Y(e){var t=X(e)?x.call(e):"";return t==a||t==s}function X(e){var t=n(e);return!!e&&("object"==t||"function"==t)}var Q,Z=(Q=function(e){return W(e)?B(e):U(e)},function(e){var t,r,n,o=z(e);return o==l?(t=e,r=-1,n=Array(t.size),t.forEach(function(e,t){n[++r]=[t,e]}),n):o==u?function(e){var t=-1,r=Array(e.size);return e.forEach(function(e){r[++t]=[e,e]}),r}(e):d(e,Q(e))});e.exports=Z},689:function(e,t,r){var n,o,i;function a(e){"@babel/helpers - typeof";return(a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}i=function(){"use strict";var e=1,t=2,r=3,n=4,o=5,i=484813681109536e-20,s=Math.PI/2,l=.16666666666666666,u=.04722222222222222,c=.022156084656084655,f=1e-10,p=.017453292519943295,h=57.29577951308232,y=Math.PI/4,d=2*Math.PI,b=3.14159265359,v={greenwich:0,lisbon:-9.131906111111,paris:2.337229166667,bogota:-74.080916666667,madrid:-3.687938888889,rome:12.452333333333,bern:7.439583333333,jakarta:106.807719444444,ferro:-17.666666666667,brussels:4.367975,stockholm:18.058277777778,athens:23.7163375,oslo:10.722916666667},m={ft:{to_meter:.3048},"us-ft":{to_meter:1200/3937}},g=/[\s_\-\/\(\)]/g;function w(e,t){if(e[t])return e[t];for(var r,n=Object.keys(e),o=t.toLowerCase().replace(g,""),i=-1;++i=this.text.length)return;e=this.text[this.place++]}switch(this.state){case S:return this.neutral(e);case 2:return this.keyword(e);case 4:return this.quoted(e);case 5:return this.afterquote(e);case 3:return this.number(e);case-1:return}},E.prototype.afterquote=function(e){if('"'===e)return this.word+='"',void(this.state=4);if(k.test(e))return this.word=this.word.trim(),void this.afterItem(e);throw new Error("havn't handled \""+e+'" in afterquote yet, index '+this.place)},E.prototype.afterItem=function(e){return","===e?(null!==this.word&&this.currentObject.push(this.word),this.word=null,void(this.state=S)):"]"===e?(this.level--,null!==this.word&&(this.currentObject.push(this.word),this.word=null),this.state=S,this.currentObject=this.stack.pop(),void(this.currentObject||(this.state=-1))):void 0},E.prototype.number=function(e){if(!j.test(e)){if(k.test(e))return this.word=parseFloat(this.word),void this.afterItem(e);throw new Error("havn't handled \""+e+'" in number yet, index '+this.place)}this.word+=e},E.prototype.quoted=function(e){'"'!==e?this.word+=e:this.state=5},E.prototype.keyword=function(e){if(x.test(e))this.word+=e;else{if("["===e){var t=[];return t.push(this.word),this.level++,null===this.root?this.root=t:this.currentObject.push(t),this.stack.push(this.currentObject),this.currentObject=t,void(this.state=S)}if(!k.test(e))throw new Error("havn't handled \""+e+'" in keyword yet, index '+this.place);this.afterItem(e)}},E.prototype.neutral=function(e){if(P.test(e))return this.word=e,void(this.state=2);if('"'===e)return this.word="",void(this.state=4);if(j.test(e))return this.word=e,void(this.state=3);if(!k.test(e))throw new Error("havn't handled \""+e+'" in neutral yet, index '+this.place);this.afterItem(e)},E.prototype.output=function(){for(;this.place0?90:-90),e.lat_ts=e.lat1)}(o),o};function L(e){var t=this;if(2===arguments.length){var r=arguments[1];"string"==typeof r?"+"===r.charAt(0)?L[e]=O(arguments[1]):L[e]=A(arguments[1]):L[e]=r}else if(1===arguments.length){if(Array.isArray(e))return e.map(function(e){Array.isArray(e)?L.apply(t,e):L(e)});if("string"==typeof e){if(e in L)return L[e]}else"EPSG"in e?L["EPSG:"+e.EPSG]=e:"ESRI"in e?L["ESRI:"+e.ESRI]=e:"IAU2000"in e?L["IAU2000:"+e.IAU2000]=e:console.log(e);return}}!function(e){e("EPSG:4326","+title=WGS 84 (long/lat) +proj=longlat +ellps=WGS84 +datum=WGS84 +units=degrees"),e("EPSG:4269","+title=NAD83 (long/lat) +proj=longlat +a=6378137.0 +b=6356752.31414036 +ellps=GRS80 +datum=NAD83 +units=degrees"),e("EPSG:3857","+title=WGS 84 / Pseudo-Mercator +proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0 +k=1.0 +units=m +nadgrids=@null +no_defs"),e.WGS84=e["EPSG:4326"],e["EPSG:3785"]=e["EPSG:3857"],e.GOOGLE=e["EPSG:3857"],e["EPSG:900913"]=e["EPSG:3857"],e["EPSG:102113"]=e["EPSG:3857"]}(L);var I=["PROJECTEDCRS","PROJCRS","GEOGCS","GEOCCS","PROJCS","LOCAL_CS","GEODCRS","GEODETICCRS","GEODETICDATUM","ENGCRS","ENGINEERINGCRS"];var N=["3857","900913","3785","102113"];function F(e){if(!function(e){return"string"==typeof e}(e))return e;if(function(e){return e in L}(e))return L[e];if(function(e){return I.some(function(t){return e.indexOf(t)>-1})}(e)){var t=A(e);if(function(e){var t=w(e,"authority");if(t){var r=w(t,"epsg");return r&&N.indexOf(r)>-1}}(t))return L["EPSG:3857"];var r=function(e){var t=w(e,"extension");if(t)return w(t,"proj4")}(t);return r?O(r):t}return function(e){return"+"===e[0]}(e)?O(e):void 0}var D=function(e,t){var r,n;if(e=e||{},!t)return e;for(n in t)void 0!==(r=t[n])&&(e[n]=r);return e},B=function(e,t,r){var n=e*t;return r/Math.sqrt(1-n*n)},G=function(e){return e<0?-1:1},U=function(e){return Math.abs(e)<=b?e:e-G(e)*d},V=function(e,t,r){var n=e*r,o=.5*e;return n=Math.pow((1-n)/(1+n),o),Math.tan(.5*(s-t))/n},z=function(e,t){for(var r,n,o=.5*e,i=s-2*Math.atan(t),a=0;a<=15;a++)if(r=e*Math.sin(i),i+=n=s-2*Math.atan(t*Math.pow((1-r)/(1+r),o))-i,Math.abs(n)<=1e-10)return i;return-9999};function J(e){return e}var q=[{init:function(){var e=this.b/this.a;this.es=1-e*e,"x0"in this||(this.x0=0),"y0"in this||(this.y0=0),this.e=Math.sqrt(this.es),this.lat_ts?this.sphere?this.k0=Math.cos(this.lat_ts):this.k0=B(this.e,Math.sin(this.lat_ts),Math.cos(this.lat_ts)):this.k0||(this.k?this.k0=this.k:this.k0=1)},forward:function(e){var t,r,n=e.x,o=e.y;if(o*h>90&&o*h<-90&&n*h>180&&n*h<-180)return null;if(Math.abs(Math.abs(o)-s)<=f)return null;if(this.sphere)t=this.x0+this.a*this.k0*U(n-this.long0),r=this.y0+this.a*this.k0*Math.log(Math.tan(y+.5*o));else{var i=Math.sin(o),a=V(this.e,o,i);t=this.x0+this.a*this.k0*U(n-this.long0),r=this.y0-this.a*this.k0*Math.log(a)}return e.x=t,e.y=r,e},inverse:function(e){var t,r,n=e.x-this.x0,o=e.y-this.y0;if(this.sphere)r=s-2*Math.atan(Math.exp(-o/(this.a*this.k0)));else{var i=Math.exp(-o/(this.a*this.k0));if(-9999===(r=z(this.e,i)))return null}return t=U(this.long0+n/(this.a*this.k0)),e.x=t,e.y=r,e},names:["Mercator","Popular Visualisation Pseudo Mercator","Mercator_1SP","Mercator_Auxiliary_Sphere","merc"]},{init:function(){},forward:J,inverse:J,names:["longlat","identity"]}],H={},W=[];function Y(e,t){var r=W.length;return e.names?(W[r]=e,e.names.forEach(function(e){H[e.toLowerCase()]=r}),this):(console.log(t),!0)}var X={start:function(){q.forEach(Y)},add:Y,get:function(e){if(!e)return!1;var t=e.toLowerCase();return void 0!==H[t]&&W[H[t]]?W[H[t]]:void 0}},Q={MERIT:{a:6378137,rf:298.257,ellipseName:"MERIT 1983"},SGS85:{a:6378136,rf:298.257,ellipseName:"Soviet Geodetic System 85"},GRS80:{a:6378137,rf:298.257222101,ellipseName:"GRS 1980(IUGG, 1980)"},IAU76:{a:6378140,rf:298.257,ellipseName:"IAU 1976"},airy:{a:6377563.396,b:6356256.91,ellipseName:"Airy 1830"},APL4:{a:6378137,rf:298.25,ellipseName:"Appl. Physics. 1965"},NWL9D:{a:6378145,rf:298.25,ellipseName:"Naval Weapons Lab., 1965"},mod_airy:{a:6377340.189,b:6356034.446,ellipseName:"Modified Airy"},andrae:{a:6377104.43,rf:300,ellipseName:"Andrae 1876 (Den., Iclnd.)"},aust_SA:{a:6378160,rf:298.25,ellipseName:"Australian Natl & S. Amer. 1969"},GRS67:{a:6378160,rf:298.247167427,ellipseName:"GRS 67(IUGG 1967)"},bessel:{a:6377397.155,rf:299.1528128,ellipseName:"Bessel 1841"},bess_nam:{a:6377483.865,rf:299.1528128,ellipseName:"Bessel 1841 (Namibia)"},clrk66:{a:6378206.4,b:6356583.8,ellipseName:"Clarke 1866"},clrk80:{a:6378249.145,rf:293.4663,ellipseName:"Clarke 1880 mod."},clrk80ign:{a:6378249.2,b:6356515,rf:293.4660213,ellipseName:"Clarke 1880 (IGN)"},clrk58:{a:6378293.645208759,rf:294.2606763692654,ellipseName:"Clarke 1858"},CPM:{a:6375738.7,rf:334.29,ellipseName:"Comm. des Poids et Mesures 1799"},delmbr:{a:6376428,rf:311.5,ellipseName:"Delambre 1810 (Belgium)"},engelis:{a:6378136.05,rf:298.2566,ellipseName:"Engelis 1985"},evrst30:{a:6377276.345,rf:300.8017,ellipseName:"Everest 1830"},evrst48:{a:6377304.063,rf:300.8017,ellipseName:"Everest 1948"},evrst56:{a:6377301.243,rf:300.8017,ellipseName:"Everest 1956"},evrst69:{a:6377295.664,rf:300.8017,ellipseName:"Everest 1969"},evrstSS:{a:6377298.556,rf:300.8017,ellipseName:"Everest (Sabah & Sarawak)"},fschr60:{a:6378166,rf:298.3,ellipseName:"Fischer (Mercury Datum) 1960"},fschr60m:{a:6378155,rf:298.3,ellipseName:"Fischer 1960"},fschr68:{a:6378150,rf:298.3,ellipseName:"Fischer 1968"},helmert:{a:6378200,rf:298.3,ellipseName:"Helmert 1906"},hough:{a:6378270,rf:297,ellipseName:"Hough"},intl:{a:6378388,rf:297,ellipseName:"International 1909 (Hayford)"},kaula:{a:6378163,rf:298.24,ellipseName:"Kaula 1961"},lerch:{a:6378139,rf:298.257,ellipseName:"Lerch 1979"},mprts:{a:6397300,rf:191,ellipseName:"Maupertius 1738"},new_intl:{a:6378157.5,b:6356772.2,ellipseName:"New International 1967"},plessis:{a:6376523,rf:6355863,ellipseName:"Plessis 1817 (France)"},krass:{a:6378245,rf:298.3,ellipseName:"Krassovsky, 1942"},SEasia:{a:6378155,b:6356773.3205,ellipseName:"Southeast Asia"},walbeck:{a:6376896,b:6355834.8467,ellipseName:"Walbeck"},WGS60:{a:6378165,rf:298.3,ellipseName:"WGS 60"},WGS66:{a:6378145,rf:298.25,ellipseName:"WGS 66"},WGS7:{a:6378135,rf:298.26,ellipseName:"WGS 72"}},Z=Q.WGS84={a:6378137,rf:298.257223563,ellipseName:"WGS 84"};Q.sphere={a:6370997,b:6370997,ellipseName:"Normal Sphere (r=6370997)"};var K={};K.wgs84={towgs84:"0,0,0",ellipse:"WGS84",datumName:"WGS84"},K.ch1903={towgs84:"674.374,15.056,405.346",ellipse:"bessel",datumName:"swiss"},K.ggrs87={towgs84:"-199.87,74.79,246.62",ellipse:"GRS80",datumName:"Greek_Geodetic_Reference_System_1987"},K.nad83={towgs84:"0,0,0",ellipse:"GRS80",datumName:"North_American_Datum_1983"},K.nad27={nadgrids:"@conus,@alaska,@ntv2_0.gsb,@ntv1_can.dat",ellipse:"clrk66",datumName:"North_American_Datum_1927"},K.potsdam={towgs84:"598.1,73.7,418.2,0.202,0.045,-2.455,6.7",ellipse:"bessel",datumName:"Potsdam Rauenberg 1950 DHDN"},K.carthage={towgs84:"-263.0,6.0,431.0",ellipse:"clark80",datumName:"Carthage 1934 Tunisia"},K.hermannskogel={towgs84:"577.326,90.129,463.919,5.137,1.474,5.297,2.4232",ellipse:"bessel",datumName:"Hermannskogel"},K.osni52={towgs84:"482.530,-130.596,564.557,-1.042,-0.214,-0.631,8.15",ellipse:"airy",datumName:"Irish National"},K.ire65={towgs84:"482.530,-130.596,564.557,-1.042,-0.214,-0.631,8.15",ellipse:"mod_airy",datumName:"Ireland 1965"},K.rassadiran={towgs84:"-133.63,-157.5,-158.62",ellipse:"intl",datumName:"Rassadiran"},K.nzgd49={towgs84:"59.47,-5.04,187.44,0.47,-0.1,1.024,-4.5993",ellipse:"intl",datumName:"New Zealand Geodetic Datum 1949"},K.osgb36={towgs84:"446.448,-125.157,542.060,0.1502,0.2470,0.8421,-20.4894",ellipse:"airy",datumName:"Airy 1830"},K.s_jtsk={towgs84:"589,76,480",ellipse:"bessel",datumName:"S-JTSK (Ferro)"},K.beduaram={towgs84:"-106,-87,188",ellipse:"clrk80",datumName:"Beduaram"},K.gunung_segara={towgs84:"-403,684,41",ellipse:"bessel",datumName:"Gunung Segara Jakarta"},K.rnb72={towgs84:"106.869,-52.2978,103.724,-0.33657,0.456955,-1.84218,1",ellipse:"intl",datumName:"Reseau National Belge 1972"};var $={};function ee(e){if(0===e.length)return null;var t="@"===e[0];return t&&(e=e.slice(1)),"null"===e?{name:"null",mandatory:!t,grid:null,isNull:!0}:{name:e,mandatory:!t,grid:$[e]||null,isNull:!1}}function te(e){return e/3600*Math.PI/180}function re(e,t,r){return String.fromCharCode.apply(null,new Uint8Array(e.buffer.slice(t,r)))}function ne(e){return e.map(function(e){return[te(e.longitudeShift),te(e.latitudeShift)]})}function oe(e,t,r){return{name:re(e,t+8,t+16).trim(),parent:re(e,t+24,t+24+8).trim(),lowerLatitude:e.getFloat64(t+72,r),upperLatitude:e.getFloat64(t+88,r),lowerLongitude:e.getFloat64(t+104,r),upperLongitude:e.getFloat64(t+120,r),latitudeInterval:e.getFloat64(t+136,r),longitudeInterval:e.getFloat64(t+152,r),gridNodeCount:e.getInt32(t+168,r)}}function ie(e,t,r,n){for(var o=t+176,i=[],a=0;a3&&(0===h.datum_params[3]&&0===h.datum_params[4]&&0===h.datum_params[5]&&0===h.datum_params[6]||(h.datum_type=t,h.datum_params[3]*=i,h.datum_params[4]*=i,h.datum_params[5]*=i,h.datum_params[6]=h.datum_params[6]/1e6+1))),p&&(h.datum_type=r,h.grids=p),h.a=l,h.b=u,h.es=c,h.ep2=f,h}(h.datumCode,h.datum_params,P.a,P.b,x.es,x.ep2,k);D(this,h),D(this,y),this.a=P.a,this.b=P.b,this.rf=P.rf,this.sphere=P.sphere,this.es=x.es,this.e=x.e,this.ep2=x.ep2,this.datum=j,this.init(),p(null,this)}else p(s)}else p(s)}function se(e,t,r){var n,o,i,a,l=e.x,u=e.y,c=e.z?e.z:0;if(u<-s&&u>-1.001*s)u=-s;else if(u>s&&u<1.001*s)u=s;else{if(u<-s)return{x:-1/0,y:-1/0,z:e.z};if(u>s)return{x:1/0,y:1/0,z:e.z}}return l>Math.PI&&(l-=2*Math.PI),o=Math.sin(u),a=Math.cos(u),i=o*o,{x:((n=r/Math.sqrt(1-t*i))+c)*a*Math.cos(l),y:(n+c)*a*Math.sin(l),z:(n*(1-t)+c)*o}}function le(e,t,r,n){var o,i,a,l,u,c,f,p,h,y,d,b,v,m,g,w=e.x,O=e.y,S=e.z?e.z:0;if(o=Math.sqrt(w*w+O*O),i=Math.sqrt(w*w+O*O+S*S),o/r<1e-12){if(m=0,i/r<1e-12)return s,g=-n,{x:e.x,y:e.y,z:e.z}}else m=Math.atan2(O,w);a=S/i,p=(l=o/i)*(1-t)*(u=1/Math.sqrt(1-t*(2-t)*l*l)),h=a*u,v=0;do{v++,c=t*(f=r/Math.sqrt(1-t*h*h))/(f+(g=o*p+S*h-f*(1-t*h*h))),b=(d=a*(u=1/Math.sqrt(1-c*(2-c)*l*l)))*p-(y=l*(1-c)*u)*h,p=y,h=d}while(b*b>1e-24&&v<30);return{x:m,y:Math.atan(d/Math.abs(y)),z:g}}function ue(r){return r===e||r===t}ae.projections=X,ae.projections.start();var ce=function(n,i,a){if(function(r,n){return r.datum_type===n.datum_type&&!(r.a!==n.a||Math.abs(r.es-n.es)>5e-11)&&(r.datum_type===e?r.datum_params[0]===n.datum_params[0]&&r.datum_params[1]===n.datum_params[1]&&r.datum_params[2]===n.datum_params[2]:r.datum_type!==t||r.datum_params[0]===n.datum_params[0]&&r.datum_params[1]===n.datum_params[1]&&r.datum_params[2]===n.datum_params[2]&&r.datum_params[3]===n.datum_params[3]&&r.datum_params[4]===n.datum_params[4]&&r.datum_params[5]===n.datum_params[5]&&r.datum_params[6]===n.datum_params[6])}(n,i))return a;if(n.datum_type===o||i.datum_type===o)return a;var s=n.a,l=n.es;if(n.datum_type===r){if(0!==fe(n,!1,a))return;s=6378137,l=.0066943799901413165}var u=i.a,c=i.b,f=i.es;if(i.datum_type===r&&(u=6378137,c=6356752.314,f=.0066943799901413165),l===f&&s===u&&!ue(n.datum_type)&&!ue(i.datum_type))return a;if((a=se(a,l,s),ue(n.datum_type)&&(a=function(r,n,o){if(n===e)return{x:r.x+o[0],y:r.y+o[1],z:r.z+o[2]};if(n===t){var i=o[0],a=o[1],s=o[2],l=o[3],u=o[4],c=o[5],f=o[6];return{x:f*(r.x-c*r.y+u*r.z)+i,y:f*(c*r.x+r.y-l*r.z)+a,z:f*(-u*r.x+l*r.y+r.z)+s}}}(a,n.datum_type,n.datum_params)),ue(i.datum_type)&&(a=function(r,n,o){if(n===e)return{x:r.x-o[0],y:r.y-o[1],z:r.z-o[2]};if(n===t){var i=o[0],a=o[1],s=o[2],l=o[3],u=o[4],c=o[5],f=o[6],p=(r.x-i)/f,h=(r.y-a)/f,y=(r.z-s)/f;return{x:p+c*h-u*y,y:-c*p+h+l*y,z:u*p-l*h+y}}}(a,i.datum_type,i.datum_params)),a=le(a,f,u,c),i.datum_type===r)&&0!==fe(i,!0,a))return;return a};function fe(e,t,r){if(null===e.grids||0===e.grids.length)return console.log("Grid shift grids not found"),-1;for(var n={x:-r.x,y:r.y},o={x:Number.NaN,y:Number.NaN},i=[],a=0;an.y||c>n.x||y1e-12&&Math.abs(a.y)>1e-12);if(l<0)return console.log("Inverse grid shift iterator failed to converge."),n;n.x=U(i.x+r.ll[0]),n.y=i.y+r.ll[1]}else isNaN(i.x)||(n.x=e.x+i.x,n.y=e.y+i.y);return n}function he(e,t){var r,n={x:e.x/t.del[0],y:e.y/t.del[1]},o=Math.floor(n.x),i=Math.floor(n.y),a=n.x-1*o,s=n.y-1*i,l={x:Number.NaN,y:Number.NaN};if(o<0||o>=t.lim[0])return l;if(i<0||i>=t.lim[1])return l;r=i*t.lim[0]+o;var u=t.cvs[r][0],c=t.cvs[r][1];r++;var f=t.cvs[r][0],p=t.cvs[r][1];r+=t.lim[0];var h=t.cvs[r][0],y=t.cvs[r][1];r--;var d=t.cvs[r][0],b=t.cvs[r][1],v=a*s,m=a*(1-s),g=(1-a)*(1-s),w=(1-a)*s;return l.x=g*u+m*f+w*d+v*h,l.y=g*c+m*p+w*b+v*y,l}var ye=function(e,t,r){var n,o,i,a=r.x,s=r.y,l=r.z||0,u={};for(i=0;i<3;i++)if(!t||2!==i||void 0!==r.z)switch(0===i?(n=a,o=-1!=="ew".indexOf(e.axis[i])?"x":"y"):1===i?(n=s,o=-1!=="ns".indexOf(e.axis[i])?"y":"x"):(n=l,o="z"),e.axis[i]){case"e":u[o]=n;break;case"w":u[o]=-n;break;case"n":u[o]=n;break;case"s":u[o]=-n;break;case"u":void 0!==r[o]&&(u.z=n);break;case"d":void 0!==r[o]&&(u.z=-n);break;default:return null}return u},de=function(e){var t={x:e[0],y:e[1]};return e.length>2&&(t.z=e[2]),e.length>3&&(t.m=e[3]),t},be=function(e){ve(e.x),ve(e.y)};function ve(e){if("function"==typeof Number.isFinite){if(Number.isFinite(e))return;throw new TypeError("coordinates must be finite numbers")}if("number"!=typeof e||e!=e||!isFinite(e))throw new TypeError("coordinates must be finite numbers")}function me(n,o,i,a){var s,l=void 0!==(i=Array.isArray(i)?de(i):{x:i.x,y:i.y,z:i.z,m:i.m}).z;if(be(i),n.datum&&o.datum&&function(n,o){return(n.datum.datum_type===e||n.datum.datum_type===t||n.datum.datum_type===r)&&"WGS84"!==o.datumCode||(o.datum.datum_type===e||o.datum.datum_type===t||o.datum.datum_type===r)&&"WGS84"!==n.datumCode}(n,o)&&(i=me(n,s=new ae("WGS84"),i,a),n=s),a&&"enu"!==n.axis&&(i=ye(n,!1,i)),"longlat"===n.projName)i={x:i.x*p,y:i.y*p,z:i.z||0};else if(n.to_meter&&(i={x:i.x*n.to_meter,y:i.y*n.to_meter,z:i.z||0}),!(i=n.inverse(i)))return;if(n.from_greenwich&&(i.x+=n.from_greenwich),i=ce(n.datum,o.datum,i))return o.from_greenwich&&(i={x:i.x-o.from_greenwich,y:i.y,z:i.z||0}),"longlat"===o.projName?i={x:i.x*h,y:i.y*h,z:i.z||0}:(i=o.forward(i),o.to_meter&&(i={x:i.x/o.to_meter,y:i.y/o.to_meter,z:i.z||0})),a&&"enu"!==o.axis?ye(o,!0,i):(l||delete i.z,i)}var ge=ae("WGS84");function we(e,t,r,n){var o,i,a;return Array.isArray(r)?(o=me(e,t,r,n)||{x:NaN,y:NaN},r.length>2?void 0!==e.name&&"geocent"===e.name||void 0!==t.name&&"geocent"===t.name?"number"==typeof o.z?[o.x,o.y,o.z].concat(r.splice(3)):[o.x,o.y,r[2]].concat(r.splice(3)):[o.x,o.y].concat(r.splice(2)):[o.x,o.y]):(i=me(e,t,r,n),2===(a=Object.keys(r)).length?i:(a.forEach(function(n){if(void 0!==e.name&&"geocent"===e.name||void 0!==t.name&&"geocent"===t.name){if("x"===n||"y"===n||"z"===n)return}else if("x"===n||"y"===n)return;i[n]=r[n]}),i))}function Oe(e){return e instanceof ae?e:e.oProj?e.oProj:ae(e)}function Se(e,t,r){e=Oe(e);var n,o=!1;return void 0===t?(t=e,e=ge,o=!0):(void 0!==t.x||Array.isArray(t))&&(r=t,t=e,e=ge,o=!0),t=Oe(t),r?we(e,t,r):(n={forward:function(r,n){return we(e,t,r,n)},inverse:function(r,n){return we(t,e,r,n)}},o&&(n.oProj=t),n)}var _e=6,Pe="AJSAJS",xe="AFAFAF",ke=65,je=73,Ee=79,Te=86,Ce=90,Re={forward:Me,inverse:function(e){var t=Ne(De(e.toUpperCase()));if(t.lat&&t.lon)return[t.lon,t.lat,t.lon,t.lat];return[t.left,t.bottom,t.right,t.top]},toPoint:Ae};function Me(e,t){return t=t||5,function(e,t){var r="00000"+e.easting,n="00000"+e.northing;return e.zoneNumber+e.zoneLetter+(h=e.easting,y=e.northing,d=e.zoneNumber,b=Fe(d),v=Math.floor(h/1e5),m=Math.floor(y/1e5)%20,o=v,i=m,a=b,s=a-1,l=Pe.charCodeAt(s),u=xe.charCodeAt(s),c=l+o-1,f=u+i,p=!1,c>Ce&&(c=c-Ce+ke-1,p=!0),(c===je||lje||(c>je||lEe||(c>Ee||lCe&&(c=c-Ce+ke-1),f>Te?(f=f-Te+ke-1,p=!0):p=!1,(f===je||uje||(f>je||uEe||(f>Ee||uTe&&(f=f-Te+ke-1),String.fromCharCode(c)+String.fromCharCode(f))+r.substr(r.length-5,t)+n.substr(n.length-5,t);var o,i,a,s,l,u,c,f,p;var h,y,d,b,v,m}(function(e){var t,r,n,o,i,a,s,l=e.lat,u=e.lon,c=6378137,f=Le(l),p=Le(u);s=Math.floor((u+180)/6)+1,180===u&&(s=60);l>=56&&l<64&&u>=3&&u<12&&(s=32);l>=72&&l<84&&(u>=0&&u<9?s=31:u>=9&&u<21?s=33:u>=21&&u<33?s=35:u>=33&&u<42&&(s=37));a=Le(6*(s-1)-180+3),.006739496752268451,t=c/Math.sqrt(1-.00669438*Math.sin(f)*Math.sin(f)),r=Math.tan(f)*Math.tan(f),n=.006739496752268451*Math.cos(f)*Math.cos(f),o=Math.cos(f)*(p-a),i=c*(.9983242984503243*f-.002514607064228144*Math.sin(2*f)+2639046602129982e-21*Math.sin(4*f)-3.418046101696858e-9*Math.sin(6*f));var h=.9996*t*(o+(1-r+n)*o*o*o/6+(5-18*r+r*r+72*n-.39089081163157013)*o*o*o*o*o/120)+5e5,y=.9996*(i+t*Math.tan(f)*(o*o/2+(5-r+9*n+4*n*n)*o*o*o*o/24+(61-58*r+r*r+600*n-2.2240339282485886)*o*o*o*o*o*o/720));l<0&&(y+=1e7);return{northing:Math.round(y),easting:Math.round(h),zoneNumber:s,zoneLetter:function(e){var t="Z";84>=e&&e>=72?t="X":72>e&&e>=64?t="W":64>e&&e>=56?t="V":56>e&&e>=48?t="U":48>e&&e>=40?t="T":40>e&&e>=32?t="S":32>e&&e>=24?t="R":24>e&&e>=16?t="Q":16>e&&e>=8?t="P":8>e&&e>=0?t="N":0>e&&e>=-8?t="M":-8>e&&e>=-16?t="L":-16>e&&e>=-24?t="K":-24>e&&e>=-32?t="J":-32>e&&e>=-40?t="H":-40>e&&e>=-48?t="G":-48>e&&e>=-56?t="F":-56>e&&e>=-64?t="E":-64>e&&e>=-72?t="D":-72>e&&e>=-80&&(t="C");return t}(l)}}({lat:e[1],lon:e[0]}),t)}function Ae(e){var t=Ne(De(e.toUpperCase()));return t.lat&&t.lon?[t.lon,t.lat]:[(t.left+t.right)/2,(t.top+t.bottom)/2]}function Le(e){return e*(Math.PI/180)}function Ie(e){return e/Math.PI*180}function Ne(e){var t=e.northing,r=e.easting,n=e.zoneLetter,o=e.zoneNumber;if(o<0||o>60)return null;var i,a,s,l,u,c,f,p,h=6378137,y=(1-Math.sqrt(.99330562))/(1+Math.sqrt(.99330562)),d=r-5e5,b=t;n<"N"&&(b-=1e7),c=6*(o-1)-180+3,p=(f=b/.9996/6367449.145945056)+(3*y/2-27*y*y*y/32)*Math.sin(2*f)+(21*y*y/16-55*y*y*y*y/32)*Math.sin(4*f)+151*y*y*y/96*Math.sin(6*f),i=h/Math.sqrt(1-.00669438*Math.sin(p)*Math.sin(p)),a=Math.tan(p)*Math.tan(p),s=.006739496752268451*Math.cos(p)*Math.cos(p),l=.99330562*h/Math.pow(1-.00669438*Math.sin(p)*Math.sin(p),1.5),u=d/(.9996*i);var v=p-i*Math.tan(p)/l*(u*u/2-(5+3*a+10*s-4*s*s-.06065547077041606)*u*u*u*u/24+(61+90*a+298*s+45*a*a-1.6983531815716497-3*s*s)*u*u*u*u*u*u/720);v=Ie(v);var m,g=(u-(1+2*a+s)*u*u*u/6+(5-2*s+28*a-3*s*s+.05391597401814761+24*a*a)*u*u*u*u*u/120)/Math.cos(p);if(g=c+Ie(g),e.accuracy){var w=Ne({northing:e.northing+e.accuracy,easting:e.easting+e.accuracy,zoneLetter:e.zoneLetter,zoneNumber:e.zoneNumber});m={top:w.lat,right:w.lon,bottom:v,left:g}}else m={lat:v,lon:g};return m}function Fe(e){var t=e%_e;return 0===t&&(t=_e),t}function De(e){if(e&&0===e.length)throw"MGRSPoint coverting from nothing";for(var t,r=e.length,n=null,o="",i=0;!/[A-Z]/.test(t=e.charAt(i));){if(i>=2)throw"MGRSPoint bad conversion from: "+e;o+=t,i++}var a=parseInt(o,10);if(0===i||i+3>r)throw"MGRSPoint bad conversion from: "+e;var s=e.charAt(i++);if(s<="A"||"B"===s||"Y"===s||s>="Z"||"I"===s||"O"===s)throw"MGRSPoint zone letter "+s+" not handled: "+e;n=e.substring(i,i+=2);for(var l=Fe(a),u=function(e,t){var r=Pe.charCodeAt(t-1),n=1e5,o=!1;for(;r!==e.charCodeAt(0);){if(++r===je&&r++,r===Ee&&r++,r>Ce){if(o)throw"Bad character: "+e;r=ke,o=!0}n+=1e5}return n}(n.charAt(0),l),c=function(e,t){if(e>"V")throw"MGRSPoint given invalid Northing "+e;var r=xe.charCodeAt(t-1),n=0,o=!1;for(;r!==e.charCodeAt(0);){if(++r===je&&r++,r===Ee&&r++,r>Te){if(o)throw"Bad character: "+e;r=ke,o=!0}n+=1e5}return n}(n.charAt(1),l);c0&&(p=1e5/Math.pow(10,d),h=e.substring(i,i+d),b=parseFloat(h)*p,y=e.substring(i+d),v=parseFloat(y)*p),{easting:b+u,northing:v+c,zoneLetter:s,zoneNumber:a,accuracy:p}}function Be(e){var t;switch(e){case"C":t=11e5;break;case"D":t=2e6;break;case"E":t=28e5;break;case"F":t=37e5;break;case"G":t=46e5;break;case"H":t=55e5;break;case"J":t=64e5;break;case"K":t=73e5;break;case"L":t=82e5;break;case"M":t=91e5;break;case"N":t=0;break;case"P":t=8e5;break;case"Q":t=17e5;break;case"R":t=26e5;break;case"S":t=35e5;break;case"T":t=44e5;break;case"U":t=53e5;break;case"V":t=62e5;break;case"W":t=7e6;break;case"X":t=79e5;break;default:t=-1}if(t>=0)return t;throw"Invalid zone letter: "+e}function Ge(e,t,r){if(!(this instanceof Ge))return new Ge(e,t,r);if(Array.isArray(e))this.x=e[0],this.y=e[1],this.z=e[2]||0;else if("object"===a(e))this.x=e.x,this.y=e.y,this.z=e.z||0;else if("string"==typeof e&&void 0===t){var n=e.split(",");this.x=parseFloat(n[0],10),this.y=parseFloat(n[1],10),this.z=parseFloat(n[2],10)||0}else this.x=e,this.y=t,this.z=r||0;console.warn("proj4.Point will be removed in version 3, use proj4.toPoint")}Ge.fromMGRS=function(e){return new Ge(Ae(e))},Ge.prototype.toMGRS=function(e){return Me([this.x,this.y],e)};var Ue=.01068115234375,Ve=function(e){var t=[];t[0]=1-e*(.25+e*(.046875+e*(.01953125+e*Ue))),t[1]=e*(.75-e*(.046875+e*(.01953125+e*Ue)));var r=e*e;return t[2]=r*(.46875-e*(.013020833333333334+.007120768229166667*e)),r*=e,t[3]=r*(.3645833333333333-.005696614583333333*e),t[4]=r*e*.3076171875,t},ze=function(e,t,r,n){return r*=t,t*=t,n[0]*e-r*(n[1]+t*(n[2]+t*(n[3]+t*n[4])))},Je=function(e,t,r){for(var n=1/(1-t),o=e,i=20;i;--i){var a=Math.sin(o),s=1-t*a*a;if(o-=s=(ze(o,a,Math.cos(o),r)-e)*(s*Math.sqrt(s))*n,Math.abs(s)f?Math.tan(i):0,d=Math.pow(y,2),b=Math.pow(d,2);t=1-this.es*Math.pow(s,2),u/=Math.sqrt(t);var v=ze(i,s,l,this.en);r=this.a*(this.k0*u*(1+c/6*(1-d+p+c/20*(5-18*d+b+14*p-58*d*p+c/42*(61+179*b-b*d-479*d)))))+this.x0,n=this.a*(this.k0*(v-this.ml0+s*a*u/2*(1+c/12*(5-d+9*p+4*h+c/30*(61+b-58*d+270*p-330*d*p+c/56*(1385+543*b-b*d-3111*d))))))+this.y0}else{var m=l*Math.sin(a);if(Math.abs(Math.abs(m)-1)=1){if(m-1>f)return 93;n=0}else n=Math.acos(n);i<0&&(n=-n),n=this.a*this.k0*(n-this.lat0)+this.y0}return e.x=r,e.y=n,e},inverse:function(e){var t,r,n,o,i=(e.x-this.x0)*(1/this.a),a=(e.y-this.y0)*(1/this.a);if(this.es)if(t=this.ml0+a/this.k0,r=Je(t,this.es,this.en),Math.abs(r)f?Math.tan(r):0,p=this.ep2*Math.pow(u,2),h=Math.pow(p,2),y=Math.pow(c,2),d=Math.pow(y,2);t=1-this.es*Math.pow(l,2);var b=i*Math.sqrt(t)/this.k0,v=Math.pow(b,2);n=r-(t*=c)*v/(1-this.es)*.5*(1-v/12*(5+3*y-9*p*y+p-4*h-v/30*(61+90*y-252*p*y+45*d+46*p-v/56*(1385+3633*y+4095*d+1574*d*y)))),o=U(this.long0+b*(1-v/6*(1+2*y+p-v/20*(5+28*y+24*d+8*p*y+6*p-v/42*(61+662*y+1320*d+720*d*y))))/u)}else n=s*G(a),o=0;else{var m=Math.exp(i/this.k0),g=.5*(m-1/m),w=this.lat0+a/this.k0,O=Math.cos(w);t=Math.sqrt((1-Math.pow(O,2))/(1+Math.pow(g,2))),n=Math.asin(t),a<0&&(n=-n),o=0===g&&0===O?0:U(Math.atan2(g,O)+this.long0)}return e.x=o,e.y=n,e},names:["Fast_Transverse_Mercator","Fast Transverse Mercator"]},He=function(e){var t=Math.exp(e);return t=(t-1/t)/2},We=function(e,t){e=Math.abs(e),t=Math.abs(t);var r=Math.max(e,t),n=Math.min(e,t)/(r||1);return r*Math.sqrt(1+Math.pow(n,2))},Ye=function(e){var t=Math.abs(e);return t=function(e){var t=1+e,r=t-1;return 0===r?e:e*Math.log(t)/r}(t*(1+t/(We(1,t)+1))),e<0?-t:t},Xe=function(e,t){for(var r,n=2*Math.cos(2*t),o=e.length-1,i=e[o],a=0;--o>=0;)r=n*i-a+e[o],a=i,i=r;return t+r*Math.sin(2*t)},Qe=function(e,t){for(var r,n=2*Math.cos(t),o=e.length-1,i=e[o],a=0;--o>=0;)r=n*i-a+e[o],a=i,i=r;return Math.sin(t)*r},Ze=function(e,t,r){for(var n,o,i=Math.sin(t),a=Math.cos(t),s=He(r),l=function(e){var t=Math.exp(e);return t=(t+1/t)/2}(r),u=2*a*l,c=-2*i*s,f=e.length-1,p=e[f],h=0,y=0,d=0;--f>=0;)n=y,o=h,p=u*(y=p)-n-c*(h=d)+e[f],d=c*y-o+u*h;return[(u=i*l)*p-(c=a*s)*d,u*d+c*p]};var Ke={init:function(){if(!this.approx&&(isNaN(this.es)||this.es<=0))throw new Error('Incorrect elliptical usage. Try using the +approx option in the proj string, or PROJECTION["Fast_Transverse_Mercator"] in the WKT.');this.approx&&(qe.init.apply(this),this.forward=qe.forward,this.inverse=qe.inverse),this.x0=void 0!==this.x0?this.x0:0,this.y0=void 0!==this.y0?this.y0:0,this.long0=void 0!==this.long0?this.long0:0,this.lat0=void 0!==this.lat0?this.lat0:0,this.cgb=[],this.cbg=[],this.utg=[],this.gtu=[];var e=this.es/(1+Math.sqrt(1-this.es)),t=e/(2-e),r=t;this.cgb[0]=t*(2+t*(-2/3+t*(t*(116/45+t*(26/45+t*(-2854/675)))-2))),this.cbg[0]=t*(t*(2/3+t*(4/3+t*(-82/45+t*(32/45+t*(4642/4725)))))-2),r*=t,this.cgb[1]=r*(7/3+t*(t*(-227/45+t*(2704/315+t*(2323/945)))-1.6)),this.cbg[1]=r*(5/3+t*(-16/15+t*(-13/9+t*(904/315+t*(-1522/945))))),r*=t,this.cgb[2]=r*(56/15+t*(-136/35+t*(-1262/105+t*(73814/2835)))),this.cbg[2]=r*(-26/15+t*(34/21+t*(1.6+t*(-12686/2835)))),r*=t,this.cgb[3]=r*(4279/630+t*(-332/35+t*(-399572/14175))),this.cbg[3]=r*(1237/630+t*(t*(-24832/14175)-2.4)),r*=t,this.cgb[4]=r*(4174/315+t*(-144838/6237)),this.cbg[4]=r*(-734/315+t*(109598/31185)),r*=t,this.cgb[5]=r*(601676/22275),this.cbg[5]=r*(444337/155925),r=Math.pow(t,2),this.Qn=this.k0/(1+t)*(1+r*(.25+r*(1/64+r/256))),this.utg[0]=t*(t*(2/3+t*(-37/96+t*(1/360+t*(81/512+t*(-96199/604800)))))-.5),this.gtu[0]=t*(.5+t*(-2/3+t*(5/16+t*(41/180+t*(-127/288+t*(7891/37800)))))),this.utg[1]=r*(-1/48+t*(-1/15+t*(437/1440+t*(-46/105+t*(1118711/3870720))))),this.gtu[1]=r*(13/48+t*(t*(557/1440+t*(281/630+t*(-1983433/1935360)))-.6)),r*=t,this.utg[2]=r*(-17/480+t*(37/840+t*(209/4480+t*(-5569/90720)))),this.gtu[2]=r*(61/240+t*(-103/140+t*(15061/26880+t*(167603/181440)))),r*=t,this.utg[3]=r*(-4397/161280+t*(11/504+t*(830251/7257600))),this.gtu[3]=r*(49561/161280+t*(-179/168+t*(6601661/7257600))),r*=t,this.utg[4]=r*(-4583/161280+t*(108847/3991680)),this.gtu[4]=r*(34729/80640+t*(-3418889/1995840)),r*=t,this.utg[5]=-.03233083094085698*r,this.gtu[5]=.6650675310896665*r;var n=Xe(this.cbg,this.lat0);this.Zb=-this.Qn*(n+Qe(this.gtu,2*n))},forward:function(e){var t=U(e.x-this.long0),r=e.y;r=Xe(this.cbg,r);var n=Math.sin(r),o=Math.cos(r),i=Math.sin(t),a=Math.cos(t);r=Math.atan2(n,a*o),t=Math.atan2(i*o,We(n,o*a)),t=Ye(Math.tan(t));var s,l,u=Ze(this.gtu,2*r,2*t);return r+=u[0],t+=u[1],Math.abs(t)<=2.623395162778?(s=this.a*(this.Qn*t)+this.x0,l=this.a*(this.Qn*r+this.Zb)+this.y0):(s=1/0,l=1/0),e.x=s,e.y=l,e},inverse:function(e){var t,r,n=(e.x-this.x0)*(1/this.a),o=(e.y-this.y0)*(1/this.a);if(o=(o-this.Zb)/this.Qn,n/=this.Qn,Math.abs(n)<=2.623395162778){var i=Ze(this.utg,2*o,2*n);o+=i[0],n+=i[1],n=Math.atan(He(n));var a=Math.sin(o),s=Math.cos(o),l=Math.sin(n),u=Math.cos(n);o=Math.atan2(a*u,We(l,u*s)),n=Math.atan2(l,u*s),t=U(n+this.long0),r=Xe(this.cgb,o)}else t=1/0,r=1/0;return e.x=t,e.y=r,e},names:["Extended_Transverse_Mercator","Extended Transverse Mercator","etmerc","Transverse_Mercator","Transverse Mercator","tmerc"]},$e=function(e,t){if(void 0===e){if((e=Math.floor(30*(U(t)+Math.PI)/Math.PI)+1)<0)return 0;if(e>60)return 60}return e};var et={init:function(){var e=$e(this.zone,this.long0);if(void 0===e)throw new Error("unknown utm zone");this.lat0=0,this.long0=(6*Math.abs(e)-183)*p,this.x0=5e5,this.y0=this.utmSouth?1e7:0,this.k0=.9996,Ke.init.apply(this),this.forward=Ke.forward,this.inverse=Ke.inverse},names:["Universal Transverse Mercator System","utm"],dependsOn:"etmerc"},tt=function(e,t){return Math.pow((1-e)/(1+e),t)},rt=20;var nt={init:function(){var e=Math.sin(this.lat0),t=Math.cos(this.lat0);t*=t,this.rc=Math.sqrt(1-this.es)/(1-this.es*e*e),this.C=Math.sqrt(1+this.es*t*t/(1-this.es)),this.phic0=Math.asin(e/this.C),this.ratexp=.5*this.C*this.e,this.K=Math.tan(.5*this.phic0+y)/(Math.pow(Math.tan(.5*this.lat0+y),this.C)*tt(this.e*e,this.ratexp))},forward:function(e){var t=e.x,r=e.y;return e.y=2*Math.atan(this.K*Math.pow(Math.tan(.5*r+y),this.C)*tt(this.e*Math.sin(r),this.ratexp))-s,e.x=this.C*t,e},inverse:function(e){for(var t=e.x/this.C,r=e.y,n=Math.pow(Math.tan(.5*r+y)/this.K,1/this.C),o=rt;o>0&&(r=2*Math.atan(n*tt(this.e*Math.sin(e.y),-.5*this.e))-s,!(Math.abs(r-e.y)<1e-14));--o)e.y=r;return o?(e.x=t,e.y=r,e):null},names:["gauss"]};var ot={init:function(){nt.init.apply(this),this.rc&&(this.sinc0=Math.sin(this.phic0),this.cosc0=Math.cos(this.phic0),this.R2=2*this.rc,this.title||(this.title="Oblique Stereographic Alternative"))},forward:function(e){var t,r,n,o;return e.x=U(e.x-this.long0),nt.forward.apply(this,[e]),t=Math.sin(e.y),r=Math.cos(e.y),n=Math.cos(e.x),o=this.k0*this.R2/(1+this.sinc0*t+this.cosc0*r*n),e.x=o*r*Math.sin(e.x),e.y=o*(this.cosc0*t-this.sinc0*r*n),e.x=this.a*e.x+this.x0,e.y=this.a*e.y+this.y0,e},inverse:function(e){var t,r,n,o,i;if(e.x=(e.x-this.x0)/this.a,e.y=(e.y-this.y0)/this.a,e.x/=this.k0,e.y/=this.k0,i=Math.sqrt(e.x*e.x+e.y*e.y)){var a=2*Math.atan2(i,this.R2);t=Math.sin(a),r=Math.cos(a),o=Math.asin(r*this.sinc0+e.y*t*this.cosc0/i),n=Math.atan2(e.x*t,i*this.cosc0*r-e.y*this.sinc0*t)}else o=this.phic0,n=0;return e.x=n,e.y=o,nt.inverse.apply(this,[e]),e.x=U(e.x+this.long0),e},names:["Stereographic_North_Pole","Oblique_Stereographic","Polar_Stereographic","sterea","Oblique Stereographic Alternative","Double_Stereographic"]};var it={init:function(){this.coslat0=Math.cos(this.lat0),this.sinlat0=Math.sin(this.lat0),this.sphere?1===this.k0&&!isNaN(this.lat_ts)&&Math.abs(this.coslat0)<=f&&(this.k0=.5*(1+G(this.lat0)*Math.sin(this.lat_ts))):(Math.abs(this.coslat0)<=f&&(this.lat0>0?this.con=1:this.con=-1),this.cons=Math.sqrt(Math.pow(1+this.e,1+this.e)*Math.pow(1-this.e,1-this.e)),1===this.k0&&!isNaN(this.lat_ts)&&Math.abs(this.coslat0)<=f&&(this.k0=.5*this.cons*B(this.e,Math.sin(this.lat_ts),Math.cos(this.lat_ts))/V(this.e,this.con*this.lat_ts,this.con*Math.sin(this.lat_ts))),this.ms1=B(this.e,this.sinlat0,this.coslat0),this.X0=2*Math.atan(this.ssfn_(this.lat0,this.sinlat0,this.e))-s,this.cosX0=Math.cos(this.X0),this.sinX0=Math.sin(this.X0))},forward:function(e){var t,r,n,o,i,a,l=e.x,u=e.y,c=Math.sin(u),p=Math.cos(u),h=U(l-this.long0);return Math.abs(Math.abs(l-this.long0)-Math.PI)<=f&&Math.abs(u+this.lat0)<=f?(e.x=NaN,e.y=NaN,e):this.sphere?(t=2*this.k0/(1+this.sinlat0*c+this.coslat0*p*Math.cos(h)),e.x=this.a*t*p*Math.sin(h)+this.x0,e.y=this.a*t*(this.coslat0*c-this.sinlat0*p*Math.cos(h))+this.y0,e):(r=2*Math.atan(this.ssfn_(u,c,this.e))-s,o=Math.cos(r),n=Math.sin(r),Math.abs(this.coslat0)<=f?(i=V(this.e,u*this.con,this.con*c),a=2*this.a*this.k0*i/this.cons,e.x=this.x0+a*Math.sin(l-this.long0),e.y=this.y0-this.con*a*Math.cos(l-this.long0),e):(Math.abs(this.sinlat0)0?U(this.long0+Math.atan2(e.x,-1*e.y)):U(this.long0+Math.atan2(e.x,e.y)):U(this.long0+Math.atan2(e.x*Math.sin(l),a*this.coslat0*Math.cos(l)-e.y*this.sinlat0*Math.sin(l))),e.x=t,e.y=r,e)}if(Math.abs(this.coslat0)<=f){if(a<=f)return r=this.lat0,t=this.long0,e.x=t,e.y=r,e;e.x*=this.con,e.y*=this.con,n=a*this.cons/(2*this.a*this.k0),r=this.con*z(this.e,n),t=this.con*U(this.con*this.long0+Math.atan2(e.x,-1*e.y))}else o=2*Math.atan(a*this.cosX0/(2*this.a*this.k0*this.ms1)),t=this.long0,a<=f?i=this.X0:(i=Math.asin(Math.cos(o)*this.sinX0+e.y*Math.sin(o)*this.cosX0/a),t=U(this.long0+Math.atan2(e.x*Math.sin(o),a*this.cosX0*Math.cos(o)-e.y*this.sinX0*Math.sin(o)))),r=-1*z(this.e,Math.tan(.5*(s+i)));return e.x=t,e.y=r,e},names:["stere","Stereographic_South_Pole","Polar Stereographic (variant B)"],ssfn_:function(e,t,r){return t*=r,Math.tan(.5*(s+e))*Math.pow((1-t)/(1+t),.5*r)}};var at={init:function(){var e=this.lat0;this.lambda0=this.long0;var t=Math.sin(e),r=this.a,n=1/this.rf,o=2*n-Math.pow(n,2),i=this.e=Math.sqrt(o);this.R=this.k0*r*Math.sqrt(1-o)/(1-o*Math.pow(t,2)),this.alpha=Math.sqrt(1+o/(1-o)*Math.pow(Math.cos(e),4)),this.b0=Math.asin(t/this.alpha);var a=Math.log(Math.tan(Math.PI/4+this.b0/2)),s=Math.log(Math.tan(Math.PI/4+e/2)),l=Math.log((1+i*t)/(1-i*t));this.K=a-this.alpha*s+this.alpha*i/2*l},forward:function(e){var t=Math.log(Math.tan(Math.PI/4-e.y/2)),r=this.e/2*Math.log((1+this.e*Math.sin(e.y))/(1-this.e*Math.sin(e.y))),n=-this.alpha*(t+r)+this.K,o=2*(Math.atan(Math.exp(n))-Math.PI/4),i=this.alpha*(e.x-this.lambda0),a=Math.atan(Math.sin(i)/(Math.sin(this.b0)*Math.tan(o)+Math.cos(this.b0)*Math.cos(i))),s=Math.asin(Math.cos(this.b0)*Math.sin(o)-Math.sin(this.b0)*Math.cos(o)*Math.cos(i));return e.y=this.R/2*Math.log((1+Math.sin(s))/(1-Math.sin(s)))+this.y0,e.x=this.R*a+this.x0,e},inverse:function(e){for(var t=e.x-this.x0,r=e.y-this.y0,n=t/this.R,o=2*(Math.atan(Math.exp(r/this.R))-Math.PI/4),i=Math.asin(Math.cos(this.b0)*Math.sin(o)+Math.sin(this.b0)*Math.cos(o)*Math.cos(n)),a=Math.atan(Math.sin(n)/(Math.cos(this.b0)*Math.cos(n)-Math.sin(this.b0)*Math.tan(o))),s=this.lambda0+a/this.alpha,l=0,u=i,c=-1e3,f=0;Math.abs(u-c)>1e-7;){if(++f>20)return;l=1/this.alpha*(Math.log(Math.tan(Math.PI/4+i/2))-this.K)+this.e*Math.log(Math.tan(Math.PI/4+Math.asin(this.e*Math.sin(u))/2)),c=u,u=2*Math.atan(Math.exp(l))-Math.PI/2}return e.x=s,e.y=u,e},names:["somerc"]},st=1e-7;var lt={init:function(){var e,t,r,n,o,i,l,u,c,h,b,v,m,g=0,w=0,O=0,S=0,_=0,P=0,x=0;this.no_off=(m="object"===a((v=this).PROJECTION)?Object.keys(v.PROJECTION)[0]:v.PROJECTION,"no_uoff"in v||"no_off"in v||-1!==["Hotine_Oblique_Mercator","Hotine_Oblique_Mercator_Azimuth_Natural_Origin"].indexOf(m)),this.no_rot="no_rot"in this;var k=!1;"alpha"in this&&(k=!0);var j=!1;if("rectified_grid_angle"in this&&(j=!0),k&&(x=this.alpha),j&&(g=this.rectified_grid_angle*p),k||j)w=this.longc;else if(O=this.long1,_=this.lat1,S=this.long2,P=this.lat2,Math.abs(_-P)<=st||(e=Math.abs(_))<=st||Math.abs(e-s)<=st||Math.abs(Math.abs(this.lat0)-s)<=st||Math.abs(Math.abs(P)-s)<=st)throw new Error;var E=1-this.es;t=Math.sqrt(E),Math.abs(this.lat0)>f?(u=Math.sin(this.lat0),r=Math.cos(this.lat0),e=1-this.es*u*u,this.B=r*r,this.B=Math.sqrt(1+this.es*this.B*this.B/E),this.A=this.B*this.k0*t/e,(o=(n=this.B*t/(r*Math.sqrt(e)))*n-1)<=0?o=0:(o=Math.sqrt(o),this.lat0<0&&(o=-o)),this.E=o+=n,this.E*=Math.pow(V(this.e,this.lat0,u),this.B)):(this.B=1/t,this.A=this.k0,this.E=n=o=1),k||j?(k?(b=Math.asin(Math.sin(x)/n),j||(g=x)):(b=g,x=Math.asin(n*Math.sin(b))),this.lam0=w-Math.asin(.5*(o-1/o)*Math.tan(b))/this.B):(i=Math.pow(V(this.e,_,Math.sin(_)),this.B),l=Math.pow(V(this.e,P,Math.sin(P)),this.B),o=this.E/i,c=(l-i)/(l+i),h=((h=this.E*this.E)-l*i)/(h+l*i),(e=O-S)<-Math.pi?S-=d:e>Math.pi&&(S+=d),this.lam0=U(.5*(O+S)-Math.atan(h*Math.tan(.5*this.B*(O-S))/c)/this.B),b=Math.atan(2*Math.sin(this.B*U(O-this.lam0))/(o-1/o)),g=x=Math.asin(n*Math.sin(b))),this.singam=Math.sin(b),this.cosgam=Math.cos(b),this.sinrot=Math.sin(g),this.cosrot=Math.cos(g),this.rB=1/this.B,this.ArB=this.A*this.rB,this.BrA=1/this.ArB,this.no_off?this.u_0=0:(this.u_0=Math.abs(this.ArB*Math.atan(Math.sqrt(n*n-1)/Math.cos(x))),this.lat0<0&&(this.u_0=-this.u_0)),o=.5*b,this.v_pole_n=this.ArB*Math.log(Math.tan(y-o)),this.v_pole_s=this.ArB*Math.log(Math.tan(y+o))},forward:function(e){var t,r,n,o,i,a,l,u,c={};if(e.x=e.x-this.lam0,Math.abs(Math.abs(e.y)-s)>f){if(t=.5*((i=this.E/Math.pow(V(this.e,e.y,Math.sin(e.y)),this.B))-(a=1/i)),r=.5*(i+a),o=Math.sin(this.B*e.x),n=(t*this.singam-o*this.cosgam)/r,Math.abs(Math.abs(n)-1)0?this.v_pole_n:this.v_pole_s,l=this.ArB*e.y;return this.no_rot?(c.x=l,c.y=u):(l-=this.u_0,c.x=u*this.cosrot+l*this.sinrot,c.y=l*this.cosrot-u*this.sinrot),c.x=this.a*c.x+this.x0,c.y=this.a*c.y+this.y0,c},inverse:function(e){var t,r,n,o,i,a,l,u={};if(e.x=(e.x-this.x0)*(1/this.a),e.y=(e.y-this.y0)*(1/this.a),this.no_rot?(r=e.y,t=e.x):(r=e.x*this.cosrot-e.y*this.sinrot,t=e.y*this.cosrot+e.x*this.sinrot+this.u_0),o=.5*((n=Math.exp(-this.BrA*r))-1/n),i=.5*(n+1/n),l=((a=Math.sin(this.BrA*t))*this.cosgam+o*this.singam)/i,Math.abs(Math.abs(l)-1)f?this.ns=Math.log(n/s)/Math.log(o/l):this.ns=t,isNaN(this.ns)&&(this.ns=t),this.f0=n/(this.ns*Math.pow(o,this.ns)),this.rh=this.a*this.f0*Math.pow(u,this.ns),this.title||(this.title="Lambert Conformal Conic")}},forward:function(e){var t=e.x,r=e.y;Math.abs(2*Math.abs(r)-Math.PI)<=f&&(r=G(r)*(s-2*f));var n,o,i=Math.abs(Math.abs(r)-s);if(i>f)n=V(this.e,r,Math.sin(r)),o=this.a*this.f0*Math.pow(n,this.ns);else{if((i=r*this.ns)<=0)return null;o=0}var a=this.ns*U(t-this.long0);return e.x=this.k0*(o*Math.sin(a))+this.x0,e.y=this.k0*(this.rh-o*Math.cos(a))+this.y0,e},inverse:function(e){var t,r,n,o,i,a=(e.x-this.x0)/this.k0,l=this.rh-(e.y-this.y0)/this.k0;this.ns>0?(t=Math.sqrt(a*a+l*l),r=1):(t=-Math.sqrt(a*a+l*l),r=-1);var u=0;if(0!==t&&(u=Math.atan2(r*a,r*l)),0!==t||this.ns>0){if(r=1/this.ns,n=Math.pow(t/(this.a*this.f0),r),-9999===(o=z(this.e,n)))return null}else o=-s;return i=U(u/this.ns+this.long0),e.x=i,e.y=o,e},names:["Lambert Tangential Conformal Conic Projection","Lambert_Conformal_Conic","Lambert_Conformal_Conic_1SP","Lambert_Conformal_Conic_2SP","lcc","Lambert Conic Conformal (1SP)","Lambert Conic Conformal (2SP)"]};var ct={init:function(){this.a=6377397.155,this.es=.006674372230614,this.e=Math.sqrt(this.es),this.lat0||(this.lat0=.863937979737193),this.long0||(this.long0=.4334234309119251),this.k0||(this.k0=.9999),this.s45=.785398163397448,this.s90=2*this.s45,this.fi0=this.lat0,this.e2=this.es,this.e=Math.sqrt(this.e2),this.alfa=Math.sqrt(1+this.e2*Math.pow(Math.cos(this.fi0),4)/(1-this.e2)),this.uq=1.04216856380474,this.u0=Math.asin(Math.sin(this.fi0)/this.alfa),this.g=Math.pow((1+this.e*Math.sin(this.fi0))/(1-this.e*Math.sin(this.fi0)),this.alfa*this.e/2),this.k=Math.tan(this.u0/2+this.s45)/Math.pow(Math.tan(this.fi0/2+this.s45),this.alfa)*this.g,this.k1=this.k0,this.n0=this.a*Math.sqrt(1-this.e2)/(1-this.e2*Math.pow(Math.sin(this.fi0),2)),this.s0=1.37008346281555,this.n=Math.sin(this.s0),this.ro0=this.k1*this.n0/Math.tan(this.s0),this.ad=this.s90-this.uq},forward:function(e){var t,r,n,o,i,a,s,l=e.x,u=e.y,c=U(l-this.long0);return t=Math.pow((1+this.e*Math.sin(u))/(1-this.e*Math.sin(u)),this.alfa*this.e/2),r=2*(Math.atan(this.k*Math.pow(Math.tan(u/2+this.s45),this.alfa)/t)-this.s45),n=-c*this.alfa,o=Math.asin(Math.cos(this.ad)*Math.sin(r)+Math.sin(this.ad)*Math.cos(r)*Math.cos(n)),i=Math.asin(Math.cos(r)*Math.sin(n)/Math.cos(o)),a=this.n*i,s=this.ro0*Math.pow(Math.tan(this.s0/2+this.s45),this.n)/Math.pow(Math.tan(o/2+this.s45),this.n),e.y=s*Math.cos(a)/1,e.x=s*Math.sin(a)/1,this.czech||(e.y*=-1,e.x*=-1),e},inverse:function(e){var t,r,n,o,i,a,s,l=e.x;e.x=e.y,e.y=l,this.czech||(e.y*=-1,e.x*=-1),i=Math.sqrt(e.x*e.x+e.y*e.y),o=Math.atan2(e.y,e.x)/Math.sin(this.s0),n=2*(Math.atan(Math.pow(this.ro0/i,1/this.n)*Math.tan(this.s0/2+this.s45))-this.s45),t=Math.asin(Math.cos(this.ad)*Math.sin(n)-Math.sin(this.ad)*Math.cos(n)*Math.cos(o)),r=Math.asin(Math.cos(n)*Math.sin(o)/Math.cos(t)),e.x=this.long0-r/this.alfa,a=t,s=0;var u=0;do{e.y=2*(Math.atan(Math.pow(this.k,-1/this.alfa)*Math.pow(Math.tan(t/2+this.s45),1/this.alfa)*Math.pow((1+this.e*Math.sin(a))/(1-this.e*Math.sin(a)),this.e/2))-this.s45),Math.abs(a-e.y)<1e-10&&(s=1),a=e.y,u+=1}while(0===s&&u<15);return u>=15?null:e},names:["Krovak","krovak"]},ft=function(e,t,r,n,o){return e*o-t*Math.sin(2*o)+r*Math.sin(4*o)-n*Math.sin(6*o)},pt=function(e){return 1-.25*e*(1+e/16*(3+1.25*e))},ht=function(e){return.375*e*(1+.25*e*(1+.46875*e))},yt=function(e){return.05859375*e*e*(1+.75*e)},dt=function(e){return e*e*e*(35/3072)},bt=function(e,t,r){var n=t*r;return e/Math.sqrt(1-n*n)},vt=function(e){return Math.abs(e)1e-7?(1-e*e)*(t/(1-(r=e*t)*r)-.5/e*Math.log((1-r)/(1+r))):2*t};var Ot=.3333333333333333,St=.17222222222222222,_t=.10257936507936508,Pt=.06388888888888888,xt=.0664021164021164,kt=.016415012942191543;var jt={init:function(){var e,t=Math.abs(this.lat0);if(Math.abs(t-s)0)switch(this.qp=wt(this.e,1),this.mmf=.5/(1-this.es),this.apa=function(e){var t,r=[];return r[0]=e*Ot,t=e*e,r[0]+=t*St,r[1]=t*Pt,t*=e,r[0]+=t*_t,r[1]+=t*xt,r[2]=t*kt,r}(this.es),this.mode){case this.N_POLE:case this.S_POLE:this.dd=1;break;case this.EQUIT:this.rq=Math.sqrt(.5*this.qp),this.dd=1/this.rq,this.xmf=1,this.ymf=.5*this.qp;break;case this.OBLIQ:this.rq=Math.sqrt(.5*this.qp),e=Math.sin(this.lat0),this.sinb1=wt(this.e,e)/this.qp,this.cosb1=Math.sqrt(1-this.sinb1*this.sinb1),this.dd=Math.cos(this.lat0)/(Math.sqrt(1-this.es*e*e)*this.rq*this.cosb1),this.ymf=(this.xmf=this.rq)/this.dd,this.xmf*=this.dd}else this.mode===this.OBLIQ&&(this.sinph0=Math.sin(this.lat0),this.cosph0=Math.cos(this.lat0))},forward:function(e){var t,r,n,o,i,a,l,u,c,p,h=e.x,d=e.y;if(h=U(h-this.long0),this.sphere){if(i=Math.sin(d),p=Math.cos(d),n=Math.cos(h),this.mode===this.OBLIQ||this.mode===this.EQUIT){if((r=this.mode===this.EQUIT?1+p*n:1+this.sinph0*i+this.cosph0*p*n)<=f)return null;t=(r=Math.sqrt(2/r))*p*Math.sin(h),r*=this.mode===this.EQUIT?i:this.cosph0*i-this.sinph0*p*n}else if(this.mode===this.N_POLE||this.mode===this.S_POLE){if(this.mode===this.N_POLE&&(n=-n),Math.abs(d+this.lat0)=0?(t=(c=Math.sqrt(a))*o,r=n*(this.mode===this.S_POLE?c:-c)):t=r=0}}return e.x=this.a*t+this.x0,e.y=this.a*r+this.y0,e},inverse:function(e){e.x-=this.x0,e.y-=this.y0;var t,r,n,o,i,a,l,u,c,p,h=e.x/this.a,y=e.y/this.a;if(this.sphere){var d,b=0,v=0;if((r=.5*(d=Math.sqrt(h*h+y*y)))>1)return null;switch(r=2*Math.asin(r),this.mode!==this.OBLIQ&&this.mode!==this.EQUIT||(v=Math.sin(r),b=Math.cos(r)),this.mode){case this.EQUIT:r=Math.abs(d)<=f?0:Math.asin(y*v/d),h*=v,y=b*d;break;case this.OBLIQ:r=Math.abs(d)<=f?this.lat0:Math.asin(b*this.sinph0+y*v*this.cosph0/d),h*=v*this.cosph0,y=(b-Math.sin(r)*this.sinph0)*d;break;case this.N_POLE:y=-y,r=s-r;break;case this.S_POLE:r-=s}t=0!==y||this.mode!==this.EQUIT&&this.mode!==this.OBLIQ?Math.atan2(h,y):0}else{if(l=0,this.mode===this.OBLIQ||this.mode===this.EQUIT){if(h/=this.dd,y*=this.dd,(a=Math.sqrt(h*h+y*y))1&&(e=e>1?1:-1),Math.asin(e)};var Tt={init:function(){Math.abs(this.lat1+this.lat2)f?this.ns0=(this.ms1*this.ms1-this.ms2*this.ms2)/(this.qs2-this.qs1):this.ns0=this.con,this.c=this.ms1*this.ms1+this.ns0*this.qs1,this.rh=this.a*Math.sqrt(this.c-this.ns0*this.qs0)/this.ns0)},forward:function(e){var t=e.x,r=e.y;this.sin_phi=Math.sin(r),this.cos_phi=Math.cos(r);var n=wt(this.e3,this.sin_phi),o=this.a*Math.sqrt(this.c-this.ns0*n)/this.ns0,i=this.ns0*U(t-this.long0),a=o*Math.sin(i)+this.x0,s=this.rh-o*Math.cos(i)+this.y0;return e.x=a,e.y=s,e},inverse:function(e){var t,r,n,o,i,a;return e.x-=this.x0,e.y=this.rh-e.y+this.y0,this.ns0>=0?(t=Math.sqrt(e.x*e.x+e.y*e.y),n=1):(t=-Math.sqrt(e.x*e.x+e.y*e.y),n=-1),o=0,0!==t&&(o=Math.atan2(n*e.x,n*e.y)),n=t*this.ns0/this.a,this.sphere?a=Math.asin((this.c-n*n)/(2*this.ns0)):(r=(this.c-n*n)/this.ns0,a=this.phi1z(this.e3,r)),i=U(o/this.ns0+this.long0),e.x=i,e.y=a,e},names:["Albers_Conic_Equal_Area","Albers","aea"],phi1z:function(e,t){var r,n,o,i,a,s=Et(.5*t);if(e0||Math.abs(i)<=f?(a=this.x0+1*this.a*r*Math.sin(n)/i,s=this.y0+1*this.a*(this.cos_p14*t-this.sin_p14*r*o)/i):(a=this.x0+this.infinity_dist*r*Math.sin(n),s=this.y0+this.infinity_dist*(this.cos_p14*t-this.sin_p14*r*o)),e.x=a,e.y=s,e},inverse:function(e){var t,r,n,o,i,a;return e.x=(e.x-this.x0)/this.a,e.y=(e.y-this.y0)/this.a,e.x/=this.k0,e.y/=this.k0,(t=Math.sqrt(e.x*e.x+e.y*e.y))?(o=Math.atan2(t,this.rc),r=Math.sin(o),n=Math.cos(o),a=Et(n*this.sin_p14+e.y*r*this.cos_p14/t),i=Math.atan2(e.x*r,t*this.cos_p14*n-e.y*this.sin_p14*r),i=U(this.long0+i)):(a=this.phic0,i=0),e.x=i,e.y=a,e},names:["gnom"]},Rt=function(e,t){var r=1-(1-e*e)/(2*e)*Math.log((1-e)/(1+e));if(Math.abs(Math.abs(t)-r)<1e-6)return t<0?-1*s:s;for(var n,o,i,a,l=Math.asin(.5*t),u=0;u<30;u++)if(o=Math.sin(l),i=Math.cos(l),a=e*o,l+=n=Math.pow(1-a*a,2)/(2*i)*(t/(1-e*e)-o/(1-a*a)+.5/e*Math.log((1-a)/(1+a))),Math.abs(n)<=1e-10)return l;return NaN};var Mt={init:function(){this.sphere||(this.k0=B(this.e,Math.sin(this.lat_ts),Math.cos(this.lat_ts)))},forward:function(e){var t,r,n=e.x,o=e.y,i=U(n-this.long0);if(this.sphere)t=this.x0+this.a*i*Math.cos(this.lat_ts),r=this.y0+this.a*Math.sin(o)/Math.cos(this.lat_ts);else{var a=wt(this.e,Math.sin(o));t=this.x0+this.a*this.k0*i,r=this.y0+this.a*a*.5/this.k0}return e.x=t,e.y=r,e},inverse:function(e){var t,r;return e.x-=this.x0,e.y-=this.y0,this.sphere?(t=U(this.long0+e.x/this.a/Math.cos(this.lat_ts)),r=Math.asin(e.y/this.a*Math.cos(this.lat_ts))):(r=Rt(this.e,2*e.y*this.k0/this.a),t=U(this.long0+e.x/(this.a*this.k0))),e.x=t,e.y=r,e},names:["cea"]};var At={init:function(){this.x0=this.x0||0,this.y0=this.y0||0,this.lat0=this.lat0||0,this.long0=this.long0||0,this.lat_ts=this.lat_ts||0,this.title=this.title||"Equidistant Cylindrical (Plate Carre)",this.rc=Math.cos(this.lat_ts)},forward:function(e){var t=e.x,r=e.y,n=U(t-this.long0),o=vt(r-this.lat0);return e.x=this.x0+this.a*n*this.rc,e.y=this.y0+this.a*o,e},inverse:function(e){var t=e.x,r=e.y;return e.x=U(this.long0+(t-this.x0)/(this.a*this.rc)),e.y=vt(this.lat0+(r-this.y0)/this.a),e},names:["Equirectangular","Equidistant_Cylindrical","eqc"]},Lt=20;var It={init:function(){this.temp=this.b/this.a,this.es=1-Math.pow(this.temp,2),this.e=Math.sqrt(this.es),this.e0=pt(this.es),this.e1=ht(this.es),this.e2=yt(this.es),this.e3=dt(this.es),this.ml0=this.a*ft(this.e0,this.e1,this.e2,this.e3,this.lat0)},forward:function(e){var t,r,n,o=e.x,i=e.y,a=U(o-this.long0);if(n=a*Math.sin(i),this.sphere)Math.abs(i)<=f?(t=this.a*a,r=-1*this.a*this.lat0):(t=this.a*Math.sin(n)/Math.tan(i),r=this.a*(vt(i-this.lat0)+(1-Math.cos(n))/Math.tan(i)));else if(Math.abs(i)<=f)t=this.a*a,r=-1*this.ml0;else{var s=bt(this.a,this.e,Math.sin(i))/Math.tan(i);t=s*Math.sin(n),r=this.a*ft(this.e0,this.e1,this.e2,this.e3,i)-this.ml0+s*(1-Math.cos(n))}return e.x=t+this.x0,e.y=r+this.y0,e},inverse:function(e){var t,r,n,o,i,a,s,l,u;if(n=e.x-this.x0,o=e.y-this.y0,this.sphere)if(Math.abs(o+this.a*this.lat0)<=f)t=U(n/this.a+this.long0),r=0;else{var c;for(a=this.lat0+o/this.a,s=n*n/this.a/this.a+a*a,l=a,i=Lt;i;--i)if(l+=u=-1*(a*(l*(c=Math.tan(l))+1)-l-.5*(l*l+s)*c)/((l-a)/c-1),Math.abs(u)<=f){r=l;break}t=U(this.long0+Math.asin(n*Math.tan(l)/this.a)/Math.sin(r))}else if(Math.abs(o+this.ml0)<=f)r=0,t=U(this.long0+n/this.a);else{var p,h,y,d,b;for(a=(this.ml0+o)/this.a,s=n*n/this.a/this.a+a*a,l=a,i=Lt;i;--i)if(b=this.e*Math.sin(l),p=Math.sqrt(1-b*b)*Math.tan(l),h=this.a*ft(this.e0,this.e1,this.e2,this.e3,l),y=this.e0-2*this.e1*Math.cos(2*l)+4*this.e2*Math.cos(4*l)-6*this.e3*Math.cos(6*l),l-=u=(a*(p*(d=h/this.a)+1)-d-.5*p*(d*d+s))/(this.es*Math.sin(2*l)*(d*d+s-2*a*d)/(4*p)+(a-d)*(p*y-2/Math.sin(2*l))-y),Math.abs(u)<=f){r=l;break}p=Math.sqrt(1-this.es*Math.pow(Math.sin(r),2))*Math.tan(r),t=U(this.long0+Math.asin(n*p/this.a)/Math.sin(r))}return e.x=t,e.y=r,e},names:["Polyconic","poly"]};var Nt={init:function(){this.A=[],this.A[1]=.6399175073,this.A[2]=-.1358797613,this.A[3]=.063294409,this.A[4]=-.02526853,this.A[5]=.0117879,this.A[6]=-.0055161,this.A[7]=.0026906,this.A[8]=-.001333,this.A[9]=67e-5,this.A[10]=-34e-5,this.B_re=[],this.B_im=[],this.B_re[1]=.7557853228,this.B_im[1]=0,this.B_re[2]=.249204646,this.B_im[2]=.003371507,this.B_re[3]=-.001541739,this.B_im[3]=.04105856,this.B_re[4]=-.10162907,this.B_im[4]=.01727609,this.B_re[5]=-.26623489,this.B_im[5]=-.36249218,this.B_re[6]=-.6870983,this.B_im[6]=-1.1651967,this.C_re=[],this.C_im=[],this.C_re[1]=1.3231270439,this.C_im[1]=0,this.C_re[2]=-.577245789,this.C_im[2]=-.007809598,this.C_re[3]=.508307513,this.C_im[3]=-.112208952,this.C_re[4]=-.15094762,this.C_im[4]=.18200602,this.C_re[5]=1.01418179,this.C_im[5]=1.64497696,this.C_re[6]=1.9660549,this.C_im[6]=2.5127645,this.D=[],this.D[1]=1.5627014243,this.D[2]=.5185406398,this.D[3]=-.03333098,this.D[4]=-.1052906,this.D[5]=-.0368594,this.D[6]=.007317,this.D[7]=.0122,this.D[8]=.00394,this.D[9]=-.0013},forward:function(e){var t,r=e.x,n=e.y-this.lat0,o=r-this.long0,a=n/i*1e-5,s=o,l=1,u=0;for(t=1;t<=10;t++)l*=a,u+=this.A[t]*l;var c,f=u,p=s,h=1,y=0,d=0,b=0;for(t=1;t<=6;t++)c=y*f+h*p,h=h*f-y*p,y=c,d=d+this.B_re[t]*h-this.B_im[t]*y,b=b+this.B_im[t]*h+this.B_re[t]*y;return e.x=b*this.a+this.x0,e.y=d*this.a+this.y0,e},inverse:function(e){var t,r,n=e.x,o=e.y,a=n-this.x0,s=(o-this.y0)/this.a,l=a/this.a,u=1,c=0,f=0,p=0;for(t=1;t<=6;t++)r=c*s+u*l,u=u*s-c*l,c=r,f=f+this.C_re[t]*u-this.C_im[t]*c,p=p+this.C_im[t]*u+this.C_re[t]*c;for(var h=0;h.999999999999&&(r=.999999999999),t=Math.asin(r);var n=U(this.long0+e.x/(.900316316158*this.a*Math.cos(t)));n<-Math.PI&&(n=-Math.PI),n>Math.PI&&(n=Math.PI),r=(2*t+Math.sin(2*t))/Math.PI,Math.abs(r)>1&&(r=1);var o=Math.asin(r);return e.x=n,e.y=o,e},names:["Mollweide","moll"]};var Ut={init:function(){Math.abs(this.lat1+this.lat2)=0?(r=Math.sqrt(e.x*e.x+e.y*e.y),t=1):(r=-Math.sqrt(e.x*e.x+e.y*e.y),t=-1);var i=0;if(0!==r&&(i=Math.atan2(t*e.x,t*e.y)),this.sphere)return o=U(this.long0+i/this.ns),n=vt(this.g-r/this.a),e.x=o,e.y=n,e;var a=this.g-r/this.a;return n=mt(a,this.e0,this.e1,this.e2,this.e3),o=U(this.long0+i/this.ns),e.x=o,e.y=n,e},names:["Equidistant_Conic","eqdc"]};var Vt={init:function(){this.R=this.a},forward:function(e){var t,r,n=e.x,o=e.y,i=U(n-this.long0);Math.abs(o)<=f&&(t=this.x0+this.R*i,r=this.y0);var a=Et(2*Math.abs(o/Math.PI));(Math.abs(i)<=f||Math.abs(Math.abs(o)-s)<=f)&&(t=this.x0,r=o>=0?this.y0+Math.PI*this.R*Math.tan(.5*a):this.y0+Math.PI*this.R*-Math.tan(.5*a));var l=.5*Math.abs(Math.PI/i-i/Math.PI),u=l*l,c=Math.sin(a),p=Math.cos(a),h=p/(c+p-1),y=h*h,d=h*(2/c-1),b=d*d,v=Math.PI*this.R*(l*(h-b)+Math.sqrt(u*(h-b)*(h-b)-(b+u)*(y-b)))/(b+u);i<0&&(v=-v),t=this.x0+v;var m=u+h;return v=Math.PI*this.R*(d*m-l*Math.sqrt((b+u)*(u+1)-m*m))/(b+u),r=o>=0?this.y0+v:this.y0-v,e.x=t,e.y=r,e},inverse:function(e){var t,r,n,o,i,a,s,l,u,c,p,h;return e.x-=this.x0,e.y-=this.y0,p=Math.PI*this.R,i=(n=e.x/p)*n+(o=e.y/p)*o,p=3*(o*o/(l=-2*(a=-Math.abs(o)*(1+i))+1+2*o*o+i*i)+(2*(s=a-2*o*o+n*n)*s*s/l/l/l-9*a*s/l/l)/27)/(u=(a-s*s/3/l)/l)/(c=2*Math.sqrt(-u/3)),Math.abs(p)>1&&(p=p>=0?1:-1),h=Math.acos(p)/3,r=e.y>=0?(-c*Math.cos(h+Math.PI/3)-s/3/l)*Math.PI:-(-c*Math.cos(h+Math.PI/3)-s/3/l)*Math.PI,t=Math.abs(n)2*s*this.a)return;return r=t/this.a,n=Math.sin(r),o=Math.cos(r),i=this.long0,Math.abs(t)<=f?a=this.lat0:(a=Et(o*this.sin_p12+e.y*n*this.cos_p12/t),l=Math.abs(this.lat0)-s,i=Math.abs(l)<=f?this.lat0>=0?U(this.long0+Math.atan2(e.x,-e.y)):U(this.long0-Math.atan2(-e.x,e.y)):U(this.long0+Math.atan2(e.x*n,t*this.cos_p12*o-e.y*this.sin_p12*n))),e.x=i,e.y=a,e}return u=pt(this.es),c=ht(this.es),p=yt(this.es),h=dt(this.es),Math.abs(this.sin_p12-1)<=f?(y=this.a*ft(u,c,p,h,s),t=Math.sqrt(e.x*e.x+e.y*e.y),a=mt((y-t)/this.a,u,c,p,h),i=U(this.long0+Math.atan2(e.x,-1*e.y)),e.x=i,e.y=a,e):Math.abs(this.sin_p12+1)<=f?(y=this.a*ft(u,c,p,h,s),t=Math.sqrt(e.x*e.x+e.y*e.y),a=mt((t-y)/this.a,u,c,p,h),i=U(this.long0+Math.atan2(e.x,e.y)),e.x=i,e.y=a,e):(t=Math.sqrt(e.x*e.x+e.y*e.y),v=Math.atan2(e.x,e.y),d=bt(this.a,this.e,this.sin_p12),m=Math.cos(v),w=-(g=this.e*this.cos_p12*m)*g/(1-this.es),O=3*this.es*(1-w)*this.sin_p12*this.cos_p12*m/(1-this.es),P=1-w*(_=(S=t/d)-w*(1+w)*Math.pow(S,3)/6-O*(1+3*w)*Math.pow(S,4)/24)*_/2-S*_*_*_/6,b=Math.asin(this.sin_p12*Math.cos(_)+this.cos_p12*Math.sin(_)*m),i=U(this.long0+Math.asin(Math.sin(v)*Math.sin(_)/Math.cos(b))),x=Math.sin(b),a=Math.atan2((x-this.es*P*this.sin_p12)*Math.tan(b),x*(1-this.es)),e.x=i,e.y=a,e)},names:["Azimuthal_Equidistant","aeqd"]};var Jt={init:function(){this.sin_p14=Math.sin(this.lat0),this.cos_p14=Math.cos(this.lat0)},forward:function(e){var t,r,n,o,i,a,s,l=e.x,u=e.y;return n=U(l-this.long0),t=Math.sin(u),r=Math.cos(u),o=Math.cos(n),((i=this.sin_p14*t+this.cos_p14*r*o)>0||Math.abs(i)<=f)&&(a=1*this.a*r*Math.sin(n),s=this.y0+1*this.a*(this.cos_p14*t-this.sin_p14*r*o)),e.x=a,e.y=s,e},inverse:function(e){var t,r,n,o,i,a,l;return e.x-=this.x0,e.y-=this.y0,t=Math.sqrt(e.x*e.x+e.y*e.y),r=Et(t/this.a),n=Math.sin(r),o=Math.cos(r),a=this.long0,Math.abs(t)<=f?(l=this.lat0,e.x=a,e.y=l,e):(l=Et(o*this.sin_p14+e.y*n*this.cos_p14/t),i=Math.abs(this.lat0)-s,Math.abs(i)<=f?(a=this.lat0>=0?U(this.long0+Math.atan2(e.x,-e.y)):U(this.long0-Math.atan2(-e.x,e.y)),e.x=a,e.y=l,e):(a=U(this.long0+Math.atan2(e.x*n,t*this.cos_p14*o-e.y*this.sin_p14*n)),e.x=a,e.y=l,e))},names:["ortho"]},qt={FRONT:1,RIGHT:2,BACK:3,LEFT:4,TOP:5,BOTTOM:6},Ht={AREA_0:1,AREA_1:2,AREA_2:3,AREA_3:4};function Wt(e,t,r,n){var o;return ey&&o<=s+y?(n.value=Ht.AREA_1,o-=s):o>s+y||o<=-(s+y)?(n.value=Ht.AREA_2,o=o>=0?o-b:o+b):(n.value=Ht.AREA_3,o+=s)),o}function Yt(e,t){var r=e+t;return r<-b?r+=d:r>+b&&(r-=d),r}var Xt={init:function(){this.x0=this.x0||0,this.y0=this.y0||0,this.lat0=this.lat0||0,this.long0=this.long0||0,this.lat_ts=this.lat_ts||0,this.title=this.title||"Quadrilateralized Spherical Cube",this.lat0>=s-y/2?this.face=qt.TOP:this.lat0<=-(s-y/2)?this.face=qt.BOTTOM:Math.abs(this.long0)<=y?this.face=qt.FRONT:Math.abs(this.long0)<=s+y?this.face=this.long0>0?qt.RIGHT:qt.LEFT:this.face=qt.BACK,0!==this.es&&(this.one_minus_f=1-(this.a-this.b)/this.a,this.one_minus_f_squared=this.one_minus_f*this.one_minus_f)},forward:function(e){var t,r,n,o,i,a,l={x:0,y:0},u={value:0};if(e.x-=this.long0,t=0!==this.es?Math.atan(this.one_minus_f_squared*Math.tan(e.y)):e.y,r=e.x,this.face===qt.TOP)o=s-t,r>=y&&r<=s+y?(u.value=Ht.AREA_0,n=r-s):r>s+y||r<=-(s+y)?(u.value=Ht.AREA_1,n=r>0?r-b:r+b):r>-(s+y)&&r<=-y?(u.value=Ht.AREA_2,n=r+s):(u.value=Ht.AREA_3,n=r);else if(this.face===qt.BOTTOM)o=s+t,r>=y&&r<=s+y?(u.value=Ht.AREA_0,n=-r+s):r=-y?(u.value=Ht.AREA_1,n=-r):r<-y&&r>=-(s+y)?(u.value=Ht.AREA_2,n=-r-s):(u.value=Ht.AREA_3,n=r>0?-r+b:-r-b);else{var c,f,p,h,d,v;this.face===qt.RIGHT?r=Yt(r,+s):this.face===qt.BACK?r=Yt(r,+b):this.face===qt.LEFT&&(r=Yt(r,-s)),h=Math.sin(t),d=Math.cos(t),v=Math.sin(r),c=d*Math.cos(r),f=d*v,p=h,this.face===qt.FRONT?n=Wt(o=Math.acos(c),p,f,u):this.face===qt.RIGHT?n=Wt(o=Math.acos(f),p,-c,u):this.face===qt.BACK?n=Wt(o=Math.acos(-c),p,-f,u):this.face===qt.LEFT?n=Wt(o=Math.acos(-f),p,c,u):(o=n=0,u.value=Ht.AREA_0)}return a=Math.atan(12/b*(n+Math.acos(Math.sin(n)*Math.cos(y))-s)),i=Math.sqrt((1-Math.cos(o))/(Math.cos(a)*Math.cos(a))/(1-Math.cos(Math.atan(1/Math.cos(n))))),u.value===Ht.AREA_1?a+=s:u.value===Ht.AREA_2?a+=b:u.value===Ht.AREA_3&&(a+=1.5*b),l.x=i*Math.cos(a),l.y=i*Math.sin(a),l.x=l.x*this.a+this.x0,l.y=l.y*this.a+this.y0,e.x=l.x,e.y=l.y,e},inverse:function(e){var t,r,n,o,i,a,l,u,c,f,p,h,y={lam:0,phi:0},d={value:0};if(e.x=(e.x-this.x0)/this.a,e.y=(e.y-this.y0)/this.a,r=Math.atan(Math.sqrt(e.x*e.x+e.y*e.y)),t=Math.atan2(e.y,e.x),e.x>=0&&e.x>=Math.abs(e.y)?d.value=Ht.AREA_0:e.y>=0&&e.y>=Math.abs(e.x)?(d.value=Ht.AREA_1,t-=s):e.x<0&&-e.x>=Math.abs(e.y)?(d.value=Ht.AREA_2,t=t<0?t+b:t-b):(d.value=Ht.AREA_3,t+=s),c=b/12*Math.tan(t),i=Math.sin(c)/(Math.cos(c)-1/Math.sqrt(2)),a=Math.atan(i),(l=1-(n=Math.cos(t))*n*(o=Math.tan(r))*o*(1-Math.cos(Math.atan(1/Math.cos(a)))))<-1?l=-1:l>1&&(l=1),this.face===qt.TOP)u=Math.acos(l),y.phi=s-u,d.value===Ht.AREA_0?y.lam=a+s:d.value===Ht.AREA_1?y.lam=a<0?a+b:a-b:d.value===Ht.AREA_2?y.lam=a-s:y.lam=a;else if(this.face===qt.BOTTOM)u=Math.acos(l),y.phi=u-s,d.value===Ht.AREA_0?y.lam=-a+s:d.value===Ht.AREA_1?y.lam=-a:d.value===Ht.AREA_2?y.lam=-a-s:y.lam=a<0?-a-b:-a+b;else{var v,m,g;c=(v=l)*v,m=(c+=(g=c>=1?0:Math.sqrt(1-c)*Math.sin(a))*g)>=1?0:Math.sqrt(1-c),d.value===Ht.AREA_1?(c=m,m=-g,g=c):d.value===Ht.AREA_2?(m=-m,g=-g):d.value===Ht.AREA_3&&(c=m,m=g,g=-c),this.face===qt.RIGHT?(c=v,v=-m,m=c):this.face===qt.BACK?(v=-v,m=-m):this.face===qt.LEFT&&(c=v,v=m,m=-c),y.phi=Math.acos(-g)-s,y.lam=Math.atan2(m,v),this.face===qt.RIGHT?y.lam=Yt(y.lam,-s):this.face===qt.BACK?y.lam=Yt(y.lam,-b):this.face===qt.LEFT&&(y.lam=Yt(y.lam,+s))}return 0!==this.es&&(f=y.phi<0?1:0,p=Math.tan(y.phi),h=this.b/Math.sqrt(p*p+this.one_minus_f_squared),y.phi=Math.atan(Math.sqrt(this.a*this.a-h*h)/(this.one_minus_f*h)),f&&(y.phi=-y.phi)),y.lam+=this.long0,e.x=y.lam,e.y=y.phi,e},names:["Quadrilateralized Spherical Cube","Quadrilateralized_Spherical_Cube","qsc"]},Qt=[[1,2.2199e-17,-715515e-10,31103e-10],[.9986,-482243e-9,-24897e-9,-13309e-10],[.9954,-83103e-8,-448605e-10,-9.86701e-7],[.99,-.00135364,-59661e-9,36777e-10],[.9822,-.00167442,-449547e-11,-572411e-11],[.973,-.00214868,-903571e-10,1.8736e-8],[.96,-.00305085,-900761e-10,164917e-11],[.9427,-.00382792,-653386e-10,-26154e-10],[.9216,-.00467746,-10457e-8,481243e-11],[.8962,-.00536223,-323831e-10,-543432e-11],[.8679,-.00609363,-113898e-9,332484e-11],[.835,-.00698325,-640253e-10,9.34959e-7],[.7986,-.00755338,-500009e-10,9.35324e-7],[.7597,-.00798324,-35971e-9,-227626e-11],[.7186,-.00851367,-701149e-10,-86303e-10],[.6732,-.00986209,-199569e-9,191974e-10],[.6213,-.010418,883923e-10,624051e-11],[.5722,-.00906601,182e-6,624051e-11],[.5322,-.00677797,275608e-9,624051e-11]],Zt=[[-5.20417e-18,.0124,1.21431e-18,-8.45284e-11],[.062,.0124,-1.26793e-9,4.22642e-10],[.124,.0124,5.07171e-9,-1.60604e-9],[.186,.0123999,-1.90189e-8,6.00152e-9],[.248,.0124002,7.10039e-8,-2.24e-8],[.31,.0123992,-2.64997e-7,8.35986e-8],[.372,.0124029,9.88983e-7,-3.11994e-7],[.434,.0123893,-369093e-11,-4.35621e-7],[.4958,.0123198,-102252e-10,-3.45523e-7],[.5571,.0121916,-154081e-10,-5.82288e-7],[.6176,.0119938,-241424e-10,-5.25327e-7],[.6769,.011713,-320223e-10,-5.16405e-7],[.7346,.0113541,-397684e-10,-6.09052e-7],[.7903,.0109107,-489042e-10,-104739e-11],[.8435,.0103431,-64615e-9,-1.40374e-9],[.8936,.00969686,-64636e-9,-8547e-9],[.9394,.00840947,-192841e-9,-42106e-10],[.9761,.00616527,-256e-6,-42106e-10],[1,.00328947,-319159e-9,-42106e-10]],Kt=.8487,$t=1.3523,er=h/5,tr=1/er,rr=18,nr=function(e,t){return e[0]+t*(e[1]+t*(e[2]+t*e[3]))},or=function(e,t){return e[1]+t*(2*e[2]+3*t*e[3])};var ir={init:function(){this.x0=this.x0||0,this.y0=this.y0||0,this.long0=this.long0||0,this.es=0,this.title=this.title||"Robinson"},forward:function(e){var t=U(e.x-this.long0),r=Math.abs(e.y),n=Math.floor(r*er);n<0?n=0:n>=rr&&(n=rr-1),r=h*(r-tr*n);var o={x:nr(Qt[n],r)*t,y:nr(Zt[n],r)};return e.y<0&&(o.y=-o.y),o.x=o.x*this.a*Kt+this.x0,o.y=o.y*this.a*$t+this.y0,o},inverse:function(e){var t={x:(e.x-this.x0)/(this.a*Kt),y:Math.abs(e.y-this.y0)/(this.a*$t)};if(t.y>=1)t.x/=Qt[rr][0],t.y=e.y<0?-s:s;else{var r=Math.floor(t.y*rr);for(r<0?r=0:r>=rr&&(r=rr-1);;)if(Zt[r][0]>t.y)--r;else{if(!(Zt[r+1][0]<=t.y))break;++r}var n=Zt[r],o=5*(t.y-n[0])/(Zt[r+1][0]-n[0]);o=function(e,t,r,n){for(var o=t;n;--n){var i=e(o);if(o-=i,Math.abs(i)1e10)throw new Error;if(this.radius_g=1+this.radius_g_1,this.C=this.radius_g*this.radius_g-1,0!==this.es){var e=1-this.es,t=1/e;this.radius_p=Math.sqrt(e),this.radius_p2=e,this.radius_p_inv2=t,this.shape="ellipse"}else this.radius_p=1,this.radius_p2=1,this.radius_p_inv2=1,this.shape="sphere";this.title||(this.title="Geostationary Satellite View")},forward:function(e){var t,r,n,o,i=e.x,a=e.y;if(i-=this.long0,"ellipse"===this.shape){a=Math.atan(this.radius_p2*Math.tan(a));var s=this.radius_p/We(this.radius_p*Math.cos(a),Math.sin(a));if(r=s*Math.cos(i)*Math.cos(a),n=s*Math.sin(i)*Math.cos(a),o=s*Math.sin(a),(this.radius_g-r)*r-n*n-o*o*this.radius_p_inv2<0)return e.x=Number.NaN,e.y=Number.NaN,e;t=this.radius_g-r,this.flip_axis?(e.x=this.radius_g_1*Math.atan(n/We(o,t)),e.y=this.radius_g_1*Math.atan(o/t)):(e.x=this.radius_g_1*Math.atan(n/t),e.y=this.radius_g_1*Math.atan(o/We(n,t)))}else"sphere"===this.shape&&(t=Math.cos(a),r=Math.cos(i)*t,n=Math.sin(i)*t,o=Math.sin(a),t=this.radius_g-r,this.flip_axis?(e.x=this.radius_g_1*Math.atan(n/We(o,t)),e.y=this.radius_g_1*Math.atan(o/t)):(e.x=this.radius_g_1*Math.atan(n/t),e.y=this.radius_g_1*Math.atan(o/We(n,t))));return e.x=e.x*this.a,e.y=e.y*this.a,e},inverse:function(e){var t,r,n,o,i=-1,a=0,s=0;if(e.x=e.x/this.a,e.y=e.y/this.a,"ellipse"===this.shape){this.flip_axis?(s=Math.tan(e.y/this.radius_g_1),a=Math.tan(e.x/this.radius_g_1)*We(1,s)):(a=Math.tan(e.x/this.radius_g_1),s=Math.tan(e.y/this.radius_g_1)*We(1,a));var l=s/this.radius_p;if(t=a*a+l*l+i*i,(n=(r=2*this.radius_g*i)*r-4*t*this.C)<0)return e.x=Number.NaN,e.y=Number.NaN,e;o=(-r-Math.sqrt(n))/(2*t),i=this.radius_g+o*i,a*=o,s*=o,e.x=Math.atan2(a,i),e.y=Math.atan(s*Math.cos(e.x)/i),e.y=Math.atan(this.radius_p_inv2*Math.tan(e.y))}else if("sphere"===this.shape){if(this.flip_axis?(s=Math.tan(e.y/this.radius_g_1),a=Math.tan(e.x/this.radius_g_1)*Math.sqrt(1+s*s)):(a=Math.tan(e.x/this.radius_g_1),s=Math.tan(e.y/this.radius_g_1)*Math.sqrt(1+a*a)),t=a*a+s*s+i*i,(n=(r=2*this.radius_g*i)*r-4*t*this.C)<0)return e.x=Number.NaN,e.y=Number.NaN,e;o=(-r-Math.sqrt(n))/(2*t),i=this.radius_g+o*i,a*=o,s*=o,e.x=Math.atan2(a,i),e.y=Math.atan(s*Math.cos(e.x)/i)}return e.x=e.x+this.long0,e},names:["Geostationary Satellite View","Geostationary_Satellite","geos"]};return Se.defaultDatum="WGS84",Se.Proj=ae,Se.WGS84=new Se.Proj("WGS84"),Se.Point=Ge,Se.toPoint=de,Se.defs=L,Se.nadgrid=function(e,t){var r=new DataView(t),n=function(e){var t=e.getInt32(8,!1);return 11!==t&&(11!==(t=e.getInt32(8,!0))&&console.warn("Failed to detect nadgrid endian-ness, defaulting to little-endian"),!0)}(r),o=function(e,t){return{nFields:e.getInt32(8,t),nSubgridFields:e.getInt32(24,t),nSubgrids:e.getInt32(40,t),shiftType:re(e,56,64).trim(),fromSemiMajorAxis:e.getFloat64(120,t),fromSemiMinorAxis:e.getFloat64(136,t),toSemiMajorAxis:e.getFloat64(152,t),toSemiMinorAxis:e.getFloat64(168,t)}}(r,n);o.nSubgrids>1&&console.log("Only single NTv2 subgrids are currently supported, subsequent sub grids are ignored");var i={header:o,subgrids:function(e,t,r){for(var n=[],o=0;o0?{done:!1,value:r}:{done:!0,value:void 0}:{done:!1,value:function(e,t){if(!e.length)return t;if(!t.length)return e;var r=new Uint8Array(e.length+t.length);return r.set(e),r.set(t,e.length),r}(r,n.value)}})},t.prototype.slice=function(t){if((t|=0)<0)throw new Error("invalid length");var r=this,n=this._array.length-this._index;if(this._index+t<=this._array.length)return Promise.resolve(this._array.subarray(this._index,this._index+=t));var o=new Uint8Array(t);return o.set(this._array.subarray(this._index)),function i(){return r._source.read().then(function(a){return a.done?(r._array=e,r._index=0,n>0?o.subarray(0,n):null):n+a.value.length>=t?(r._array=a.value,r._index=t-n,o.set(a.value.subarray(0,t-n),n),o):(o.set(a.value,n),n+=a.value.length,i())})}()},t.prototype.cancel=function(){return this._source.cancel()},function(e){return"function"==typeof e.slice?e:new t("function"==typeof e.read?e:e.getReader())}},"object"===a(t)?e.exports=i():void 0===(o="function"==typeof(n=i)?n.call(t,r,t,e):n)||(e.exports=o)},351:function(e,t){"use strict";var r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)};function n(e,t,r,n){return new(r||(r=Promise))(function(o,i){function a(e){try{l(n.next(e))}catch(e){i(e)}}function s(e){try{l(n.throw(e))}catch(e){i(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r(function(e){e(t)})).then(a,s)}l((n=n.apply(e,t||[])).next())})}function o(e,t){var r,n,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(r)throw new TypeError("Generator is already executing.");for(;a;)try{if(r=1,n&&(o=2&i[0]?n.return:i[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,i[1])).done)return o;switch(n=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,n=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=(o=a.trys).length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function a(e){return this instanceof a?(this.v=e,this):new a(e)}function s(e,t,r){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var n,o=r.apply(e,t||[]),i=[];return n={},s("next"),s("throw"),s("return"),n[Symbol.asyncIterator]=function(){return this},n;function s(e){o[e]&&(n[e]=function(t){return new Promise(function(r,n){i.push([e,t,r,n])>1||l(e,t)})})}function l(e,t){try{(r=o[e](t)).value instanceof a?Promise.resolve(r.value.v).then(u,c):f(i[0][2],r)}catch(e){f(i[0][3],e)}var r}function u(e){l("next",e)}function c(e){l("throw",e)}function f(e,t){e(t),i.shift(),i.length&&l(i[0][0],i[0][1])}}var l=function(e){function t(t){var r=e.call(this,t)||this;return Object.defineProperty(r,"name",{value:"RepeaterOverflowError",enumerable:!1}),"function"==typeof Object.setPrototypeOf?Object.setPrototypeOf(r,r.constructor.prototype):r.__proto__=r.constructor.prototype,"function"==typeof Error.captureStackTrace&&Error.captureStackTrace(r,r.constructor),r}return function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}(t,e),t}(Error),u=function(){function e(e){if(e<0)throw new RangeError("Capacity may not be less than 0");this._c=e,this._q=[]}return Object.defineProperty(e.prototype,"empty",{get:function(){return 0===this._q.length},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"full",{get:function(){return this._q.length>=this._c},enumerable:!1,configurable:!0}),e.prototype.add=function(e){if(this.full)throw new Error("Buffer full");this._q.push(e)},e.prototype.remove=function(){if(this.empty)throw new Error("Buffer empty");return this._q.shift()},e}(),c=function(){function e(e){if(e<1)throw new RangeError("Capacity may not be less than 1");this._c=e,this._q=[]}return Object.defineProperty(e.prototype,"empty",{get:function(){return 0===this._q.length},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"full",{get:function(){return!1},enumerable:!1,configurable:!0}),e.prototype.add=function(e){for(;this._q.length>=this._c;)this._q.shift();this._q.push(e)},e.prototype.remove=function(){if(this.empty)throw new Error("Buffer empty");return this._q.shift()},e}(),f=function(){function e(e){if(e<1)throw new RangeError("Capacity may not be less than 1");this._c=e,this._q=[]}return Object.defineProperty(e.prototype,"empty",{get:function(){return 0===this._q.length},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"full",{get:function(){return!1},enumerable:!1,configurable:!0}),e.prototype.add=function(e){this._q.length=b;return Promise.resolve(t).then(function(t){return!r&&e.state>=v?w(e).then(function(e){return{value:e,done:!0}}):{value:t,done:r}})}function S(e,t){var r,n;if(!(e.state>=d))if(e.state=d,e.onnext(),e.onstop(),null==e.err&&(e.err=t),0!==e.pushes.length||void 0!==e.buffer&&!e.buffer.empty)try{for(var o=i(e.pushes),a=o.next();!a.done;a=o.next()){a.value.resolve()}}catch(e){r={error:e}}finally{try{a&&!a.done&&(n=o.return)&&n.call(o)}finally{if(r)throw r.error}}else _(e)}function _(e){var t,r;if(!(e.state>=b)){e.state=v||(e.state=y)){e.state=y;var t=function(e,t){if(p(t),e.pushes.length>=m)throw new l("No more than "+m+" pending calls to push are allowed on a single repeater.");if(e.state>=d)return Promise.resolve(void 0);var r,n=void 0===e.pending?Promise.resolve(t):e.pending.then(function(){return t});n=n.catch(function(t){e.state=m)throw new l("No more than "+m+" pending calls to next are allowed on a single repeater.");if(t.state<=h&&x(t),t.onnext(e),void 0!==t.buffer&&!t.buffer.empty){var r=O(t,t.buffer.remove());if(t.pushes.length){var n=t.pushes.shift();t.buffer.add(n.value),t.onnext=n.resolve}return r}if(t.pushes.length){var o=t.pushes.shift();return t.onnext=o.resolve,O(t,o.value)}return t.state>=d?(_(t),O(t,w(t))):new Promise(function(r){return t.nexts.push({resolve:r,value:e})})},e.prototype.return=function(e){p(e);var t=k.get(this);if(void 0===t)throw new Error("WeakMap error");return _(t),t.execution=Promise.resolve(t.execution).then(function(){return e}),O(t,w(t))},e.prototype.throw=function(e){var t=k.get(this);if(void 0===t)throw new Error("WeakMap error");return t.state<=h||t.state>=d||void 0!==t.buffer&&!t.buffer.empty?(_(t),null==t.err&&(t.err=e),O(t,w(t))):this.next(Promise.reject(e))},e.prototype[Symbol.asyncIterator]=function(){return this},e.race=T,e.merge=C,e.zip=R,e.latest=M,e}();function E(e,t){var r,n,l=[],u=function(e){null!=e&&"function"==typeof e[Symbol.asyncIterator]?l.push(e[Symbol.asyncIterator]()):null!=e&&"function"==typeof e[Symbol.iterator]?l.push(e[Symbol.iterator]()):l.push(function(){return s(this,arguments,function(){return o(this,function(r){switch(r.label){case 0:return t.yieldValues?[4,a(e)]:[3,3];case 1:return[4,r.sent()];case 2:r.sent(),r.label=3;case 3:return t.returnValues?[4,a(e)]:[3,5];case 4:return[2,r.sent()];case 5:return[2]}})})}())};try{for(var c=i(e),f=c.next();!f.done;f=c.next()){u(f.value)}}catch(e){r={error:e}}finally{try{f&&!f.done&&(n=c.return)&&n.call(c)}finally{if(r)throw r.error}}return l}function T(e){var t=this,r=E(e,{returnValues:!0});return new j(function(e,a){return n(t,void 0,void 0,function(){var t,n,s,l,u,c;return o(this,function(f){switch(f.label){case 0:if(!r.length)return a(),[2];n=!1,a.then(function(){t(),n=!0}),f.label=1;case 1:f.trys.push([1,,5,7]),l=void 0,u=0,c=function(){var n,c,f,p,h,y;return o(this,function(o){switch(o.label){case 0:n=u;try{for(h=void 0,c=i(r),f=c.next();!f.done;f=c.next())p=f.value,Promise.resolve(p.next()).then(function(e){e.done?(a(),void 0===s&&(s=e)):u===n&&(u++,t(e))},function(e){return a(e)})}catch(e){h={error:e}}finally{try{f&&!f.done&&(y=c.return)&&y.call(c)}finally{if(h)throw h.error}}return[4,new Promise(function(e){return t=e})];case 1:return void 0===(l=o.sent())?[3,3]:[4,e(l.value)];case 2:o.sent(),o.label=3;case 3:return[2]}})},f.label=2;case 2:return n?[3,4]:[5,c()];case 3:return f.sent(),[3,2];case 4:return[2,s&&s.value];case 5:return a(),[4,Promise.race(r.map(function(e){return e.return&&e.return()}))];case 6:return f.sent(),[7];case 7:return[2]}})})})}function C(e){var t=this,r=E(e,{yieldValues:!0});return new j(function(e,a){return n(t,void 0,void 0,function(){var t,s,l,u=this;return o(this,function(c){switch(c.label){case 0:if(!r.length)return a(),[2];t=[],s=!1,a.then(function(){var e,r;s=!0;try{for(var n=i(t),o=n.next();!o.done;o=n.next()){(0,o.value)()}}catch(t){e={error:t}}finally{try{o&&!o.done&&(r=n.return)&&r.call(n)}finally{if(e)throw e.error}}}),c.label=1;case 1:return c.trys.push([1,,3,4]),[4,Promise.all(r.map(function(r,i){return n(u,void 0,void 0,function(){var n;return o(this,function(o){switch(o.label){case 0:o.trys.push([0,,6,9]),o.label=1;case 1:return s?[3,5]:(Promise.resolve(r.next()).then(function(e){return t[i](e)},function(e){return a(e)}),[4,new Promise(function(e){t[i]=e})]);case 2:return void 0===(n=o.sent())?[3,4]:n.done?(l=n,[2]):[4,e(n.value)];case 3:o.sent(),o.label=4;case 4:return[3,1];case 5:return[3,9];case 6:return r.return?[4,r.return()]:[3,8];case 7:o.sent(),o.label=8;case 8:return[7];case 9:return[2]}})})}))];case 2:return c.sent(),[2,l&&l.value];case 3:return a(),[7];case 4:return[2]}})})})}function R(e){var t=this,r=E(e,{returnValues:!0});return new j(function(e,i){return n(t,void 0,void 0,function(){var t,n,a,s;return o(this,function(o){switch(o.label){case 0:if(!r.length)return i(),[2,[]];n=!1,i.then(function(){t(),n=!0}),o.label=1;case 1:o.trys.push([1,,6,8]),o.label=2;case 2:return n?[3,5]:(Promise.all(r.map(function(e){return e.next()})).then(function(e){return t(e)},function(e){return i(e)}),[4,new Promise(function(e){return t=e})]);case 3:return void 0===(a=o.sent())?[2]:(s=a.map(function(e){return e.value}),a.some(function(e){return e.done})?[2,s]:[4,e(s)]);case 4:return o.sent(),[3,2];case 5:return[3,8];case 6:return i(),[4,Promise.all(r.map(function(e){return e.return&&e.return()}))];case 7:return o.sent(),[7];case 8:return[2]}})})})}function M(e){var t=this,r=E(e,{yieldValues:!0,returnValues:!0});return new j(function(e,a){return n(t,void 0,void 0,function(){var t,s,l,u,c,f=this;return o(this,function(p){switch(p.label){case 0:if(!r.length)return a(),[2,[]];s=[],l=!1,a.then(function(){var e,r;t();try{for(var n=i(s),o=n.next();!o.done;o=n.next()){(0,o.value)()}}catch(t){e={error:t}}finally{try{o&&!o.done&&(r=n.return)&&r.call(n)}finally{if(e)throw e.error}}l=!0}),p.label=1;case 1:return p.trys.push([1,,5,7]),Promise.all(r.map(function(e){return e.next()})).then(function(e){return t(e)},function(e){return a(e)}),[4,new Promise(function(e){return t=e})];case 2:return void 0===(u=p.sent())?[2]:(c=u.map(function(e){return e.value}),u.every(function(e){return e.done})?[2,c]:[4,e(c.slice())]);case 3:return p.sent(),[4,Promise.all(r.map(function(t,r){return n(f,void 0,void 0,function(){var n;return o(this,function(o){switch(o.label){case 0:if(u[r].done)return[2,u[r].value];o.label=1;case 1:return l?[3,4]:(Promise.resolve(t.next()).then(function(e){return s[r](e)},function(e){return a(e)}),[4,new Promise(function(e){return s[r]=e})]);case 2:return void 0===(n=o.sent())?[2,u[r].value]:n.done?[2,n.value]:(c[r]=n.value,[4,e(c.slice())]);case 3:return o.sent(),[3,1];case 4:return[2]}})})}))];case 4:return[2,p.sent()];case 5:return a(),[4,Promise.all(r.map(function(e){return e.return&&e.return()}))];case 6:return p.sent(),[7];case 7:return[2]}})})})}t.ZN=j}},t={};function r(n){var o=t[n];if(void 0!==o)return o.exports;var i=t[n]={id:n,loaded:!1,exports:{}};return e[n].call(i.exports,i,i.exports,r),i.loaded=!0,i.exports}r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,{a:t}),t},r.d=function(e,t){for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.nmd=function(e){return e.paths=[],e.children||(e.children=[]),e},function(){"use strict";var e=window.SuperMap=window.SuperMap||{};e.Components=window.SuperMap.Components||{};var t={GEOJSON:"GEOJSON",ISERVER:"ISERVER",FGB:"FGB"},n={ISERVER:"ISERVER",IPORTAL:"IPORTAL",ONLINE:"ONLINE"},o={LINE:"LINE",LINEM:"LINEM",POINT:"POINT",REGION:"REGION",POINTEPS:"POINTEPS",LINEEPS:"LINEEPS",REGIONEPS:"REGIONEPS",ELLIPSE:"ELLIPSE",CIRCLE:"CIRCLE",TEXT:"TEXT",RECTANGLE:"RECTANGLE",UNKNOWN:"UNKNOWN",GEOCOMPOUND:"GEOCOMPOUND"},i={ATTRIBUTE:"ATTRIBUTE",ATTRIBUTEANDGEOMETRY:"ATTRIBUTEANDGEOMETRY",GEOMETRY:"GEOMETRY"},a={CONTAIN:"CONTAIN",CROSS:"CROSS",DISJOINT:"DISJOINT",IDENTITY:"IDENTITY",INTERSECT:"INTERSECT",NONE:"NONE",OVERLAP:"OVERLAP",TOUCH:"TOUCH",WITHIN:"WITHIN"},s={DISTANCE:"DISTANCE",AREA:"AREA"},l={METER:"METER",KILOMETER:"KILOMETER",MILE:"MILE",YARD:"YARD",DEGREE:"DEGREE",MILLIMETER:"MILLIMETER",CENTIMETER:"CENTIMETER",INCH:"INCH",DECIMETER:"DECIMETER",FOOT:"FOOT",SECOND:"SECOND",MINUTE:"MINUTE",RADIAN:"RADIAN"},u={CENTIMETER:"CENTIMETER",DECIMETER:"DECIMETER",FOOT:"FOOT",INCH:"INCH",KILOMETER:"KILOMETER",METER:"METER",MILE:"MILE",MILLIMETER:"MILLIMETER",YARD:"YARD"},c={CAPTION:"CAPTION",CAPTION_PERCENT:"CAPTION_PERCENT",CAPTION_VALUE:"CAPTION_VALUE",PERCENT:"PERCENT",VALUE:"VALUE"},f={AREA:"AREA",BAR:"BAR",BAR3D:"BAR3D",LINE:"LINE",PIE:"PIE",PIE3D:"PIE3D",POINT:"POINT",RING:"RING",ROSE:"ROSE",ROSE3D:"ROSE3D",STACK_BAR:"STACK_BAR",STACK_BAR3D:"STACK_BAR3D",STEP:"STEP"},p={ALL:"ALL",NONE:"NONE",YAXES:"YAXES"},h={CONSTANT:"CONSTANT",LOGARITHM:"LOGARITHM",SQUAREROOT:"SQUAREROOT"},y={CUSTOMINTERVAL:"CUSTOMINTERVAL",EQUALINTERVAL:"EQUALINTERVAL",LOGARITHM:"LOGARITHM",QUANTILE:"QUANTILE",SQUAREROOT:"SQUAREROOT",STDDEVIATION:"STDDEVIATION"},d={BLACK_WHITE:"BLACKWHITE",BLUE_BLACK:"BLUEBLACK",BLUE_RED:"BLUERED",BLUE_WHITE:"BLUEWHITE",CYAN_BLACK:"CYANBLACK",CYAN_BLUE:"CYANBLUE",CYAN_GREEN:"CYANGREEN",CYAN_WHITE:"CYANWHITE",GREEN_BLACK:"GREENBLACK",GREEN_BLUE:"GREENBLUE",GREEN_ORANGE_VIOLET:"GREENORANGEVIOLET",GREEN_RED:"GREENRED",GREEN_WHITE:"GREENWHITE",PINK_BLACK:"PINKBLACK",PINK_BLUE:"PINKBLUE",PINK_RED:"PINKRED",PINK_WHITE:"PINKWHITE",RAIN_BOW:"RAINBOW",RED_BLACK:"REDBLACK",RED_WHITE:"REDWHITE",SPECTRUM:"SPECTRUM",TERRAIN:"TERRAIN",YELLOW_BLACK:"YELLOWBLACK",YELLOW_BLUE:"YELLOWBLUE",YELLOW_GREEN:"YELLOWGREEN",YELLOW_RED:"YELLOWRED",YELLOW_WHITE:"YELLOWWHITE"},b={TOPLEFT:"TOPLEFT",TOPCENTER:"TOPCENTER",TOPRIGHT:"TOPRIGHT",BASELINELEFT:"BASELINELEFT",BASELINECENTER:"BASELINECENTER",BASELINERIGHT:"BASELINERIGHT",BOTTOMLEFT:"BOTTOMLEFT",BOTTOMCENTER:"BOTTOMCENTER",BOTTOMRIGHT:"BOTTOMRIGHT",MIDDLELEFT:"MIDDLELEFT",MIDDLECENTER:"MIDDLECENTER",MIDDLERIGHT:"MIDDLERIGHT"},v={NORMAL:"ALONG_LINE_NORMAL",LB_TO_RT:"LEFT_BOTTOM_TO_RIGHT_TOP",LT_TO_RB:"LEFT_TOP_TO_RIGHT_BOTTOM",RB_TO_LT:"RIGHT_BOTTOM_TO_LEFT_TOP",RT_TO_LB:"RIGHT_TOP_TO_LEFT_BOTTOM"},m={DIAMOND:"DIAMOND",ELLIPSE:"ELLIPSE",MARKER:"MARKER",NONE:"NONE",RECT:"RECT",ROUNDRECT:"ROUNDRECT",TRIANGLE:"TRIANGLE"},g={NEWLINE:"NEWLINE",NONE:"NONE",OMIT:"OMIT"},w={FLAT:"FLAT",ROUND:"ROUND"},O={CLIP:"CLIP",ERASE:"ERASE",IDENTITY:"IDENTITY",INTERSECT:"INTERSECT",UNION:"UNION",UPDATE:"UPDATE",XOR:"XOR"},S={INDEXEDHDFS:"INDEXEDHDFS",UDB:"UDB",MONGODB:"MONGODB",PG:"PG"},_={BSPLINE:"BSPLINE",POLISH:"POLISH"},P={ISOLINE:"ISOLINE",ISOREGION:"ISOREGION"},x={DATASET_AND_RECORDSET:"DATASET_AND_RECORDSET",DATASET_ONLY:"DATASET_ONLY",RECORDSET_ONLY:"RECORDSET_ONLY"},k={ADD:"add",UPDATE:"update",DELETE:"delete"},j={LESS_TIME:"LESS_TIME",LESS_TRANSFER:"LESS_TRANSFER",LESS_WALK:"LESS_WALK",MIN_DISTANCE:"MIN_DISTANCE"},E={BUS:"BUS",SUBWAY:"SUBWAY",NO_SUBWAY:"NO_SUBWAY",NONE:"NONE"},T={EXPONENTIAL:"EXPONENTIAL",GAUSSIAN:"GAUSSIAN",SPHERICAL:"SPHERICAL"},C={EXP1:"EXP1",EXP2:"EXP2"},R={IP:"IP",REFERER:"Referer",REQUESTIP:"RequestIP",NONE:"NONE",SERVER:"SERVER",WEB:"WEB"},M={CLIP:"clip",INTERSECT:"intersect"},A={SQUAREMETER:"SquareMeter",SQUAREKILOMETER:"SquareKiloMeter",HECTARE:"Hectare",ARE:"Are",ACRE:"Acre",SQUAREFOOT:"SquareFoot",SQUAREYARD:"SquareYard",SQUAREMILE:"SquareMile"},L={METER:"Meter",KILOMETER:"Kilometer",YARD:"Yard",FOOT:"Foot",MILE:"Mile"},I={MAX:"max",MIN:"min",AVERAGE:"average",SUM:"sum",VARIANCE:"variance",STDDEVIATION:"stdDeviation"},N={SUMMARYMESH:"SUMMARYMESH",SUMMARYREGION:"SUMMARYREGION"},F={REGIONNOOVERLAP:"REGIONNOOVERLAP",REGIONNOOVERLAPWITH:"REGIONNOOVERLAPWITH",REGIONCONTAINEDBYREGION:"REGIONCONTAINEDBYREGION",REGIONCOVEREDBYREGION:"REGIONCOVEREDBYREGION",LINENOOVERLAP:"LINENOOVERLAP",LINENOOVERLAPWITH:"LINENOOVERLAPWITH",POINTNOIDENTICAL:"POINTNOIDENTICAL"},D={GEOHASH_GRID:"geohash_grid"},B={AVG:"avg",MAX:"max",MIN:"min",SUM:"sum"},G={NDVI:"NDVI",HILLSHADE:"HILLSHADE"};function U(e,t){for(var r=0;r0&&(r=parseFloat(e.toPrecision(t))),r},format:function(e,t,r,n){t=void 0!==t?t:0,r=void 0!==r?r:Y.thousandsSeparator,n=void 0!==n?n:Y.decimalSeparator,null!=t&&(e=parseFloat(e.toFixed(t)));var o=e.toString().split(".");1===o.length&&null==t&&(t=0);var i,a=o[0];if(r)for(var s=/(-?[0-9]+)([0-9]{3})/;s.test(a);)a=a.replace(s,"$1"+r+"$2");if(0==t)i=a;else{var l=o.length>1?o[1]:"0";null!=t&&(l+=new Array(t-l.length+1).join("0")),i=a+n+l}return i}};Number.prototype.limitSigDigs||(Number.prototype.limitSigDigs=function(e){return Y.limitSigDigs(this,e)});var X={bind:function(e,t){var r=Array.prototype.slice.apply(arguments,[2]);return function(){var n=r.concat(Array.prototype.slice.apply(arguments,[0]));return e.apply(t,n)}},bindAsEventListener:function(e,t){return function(r){return e.call(t,r||window.event)}},False:function(){return!1},True:function(){return!0},Void:function(){}},Q={filter:function(e,t,r){var n=[];if(Array.prototype.filter)n=e.filter(t,r);else{var o=e.length;if("function"!=typeof t)throw new TypeError;for(var i=0;i-1||oe.indexOf("trident")>-1&&oe.indexOf("rv")>-1?(te="msie",ee=oe.match(/msie ([\d.]+)/)||oe.match(/rv:([\d.]+)/)):oe.indexOf("chrome")>-1?(te="chrome",ee=oe.match(/chrome\/([\d.]+)/)):oe.indexOf("firefox")>-1?(te="firefox",ee=oe.match(/firefox\/([\d.]+)/)):oe.indexOf("opera")>-1?(te="opera",ee=oe.match(/version\/([\d.]+)/)):oe.indexOf("safari")>-1&&(te="safari",ee=oe.match(/version\/([\d.]+)/)),re=ee?ee[1]:"",oe.indexOf("ipad")>-1||oe.indexOf("ipod")>-1||oe.indexOf("iphone")>-1?ne="apple":oe.indexOf("android")>-1&&(re=(ee=oe.match(/version\/([\d.]+)/))?ee[1]:"",ne="android"),{name:te,version:re,device:ne}),le=(ie=!0,ae=se,document.createElement("canvas").getContext?("firefox"===ae.name&&parseFloat(ae.version)<5&&(ie=!1),"safari"===ae.name&&parseFloat(ae.version)<4&&(ie=!1),"opera"===ae.name&&parseFloat(ae.version)<10&&(ie=!1),"msie"===ae.name&&parseFloat(ae.version)<9&&(ie=!1)):ie=!1,ie),ue=function(){var e=navigator.userAgent.toLowerCase();return-1===e.indexOf("webkit")&&-1!==e.indexOf("gecko")}(),ce={extend:function(e,t){if(e=e||{},t){for(var r in t){var n=t[r];void 0!==n&&(e[r]=n)}!("function"==typeof window.Event&&t instanceof window.Event)&&t.hasOwnProperty&&t.hasOwnProperty("toString")&&(e.toString=t.toString)}return e},copy:function(e,t){var r;if(e=e||{},t)for(var n in e)void 0!==(r=t[n])&&(e[n]=r)},reset:function(e){for(var t in e=e||{})if(e.hasOwnProperty(t)){if("object"===$(e[t])&&e[t]instanceof Array){for(var r in e[t])e[t][r].destroy&&e[t][r].destroy();e[t].length=0}else"object"===$(e[t])&&e[t]instanceof Object&&e[t].destroy&&e[t].destroy();e[t]=null}},getElement:function(){for(var e=[],t=0,r=arguments.length;t=0;r--)e[r]===t&&e.splice(r,1);return e},indexOf:function(e,t){if(null==e)return-1;if("function"==typeof e.indexOf)return e.indexOf(t);for(var r=0,n=e.length;r=0&&parseFloat(s)<1?(e.style.filter="alpha(opacity="+100*s+")",e.style.opacity=s):1===parseFloat(s)&&(e.style.filter="",e.style.opacity="")},applyDefaults:function(e,t){e=e||{};var r="function"==typeof window.Event&&t instanceof window.Event;for(var n in t)(void 0===e[n]||!r&&t.hasOwnProperty&&t.hasOwnProperty(n)&&!e.hasOwnProperty(n))&&(e[n]=t[n]);return!r&&t&&t.hasOwnProperty&&t.hasOwnProperty("toString")&&!e.hasOwnProperty("toString")&&(e.toString=t.toString),e},getParameterString:function(e){var t=[];for(var r in e){var n,o=e[r];if(null!=o&&"function"!=typeof o)n=Array.isArray(o)||"[object Object]"===o.toString()?encodeURIComponent(JSON.stringify(o)):encodeURIComponent(o),t.push(encodeURIComponent(r)+"="+n)}return t.join("&")},urlAppend:function(e,t){var r=e;if(t){0===t.indexOf("?")&&(t=t.substring(1));var n=(e+" ").split(/[?&]/);r+=" "===n.pop()?t:n.length?"&"+t:"?"+t}return r},urlPathAppend:function(e,t){var r=e;if(!t)return r;0===t.indexOf("/")&&(t=t.substring(1));var n=e.split("?");return n[0].indexOf("/",n[0].length-1)<0&&(n[0]+="/"),r="".concat(n[0]).concat(t).concat(n.length>1?"?".concat(n[1]):"")},DEFAULT_PRECISION:14,toFloat:function(e,t){return null==t&&(t=ce.DEFAULT_PRECISION),"number"!=typeof e&&(e=parseFloat(e)),0===t?e:parseFloat(e.toPrecision(t))},rad:function(e){return e*Math.PI/180},getParameters:function(e){e=null===e||void 0===e?window.location.href:e;var t="";if(W.contains(e,"?")){var r=e.indexOf("?")+1,n=W.contains(e,"#")?e.indexOf("#"):e.length;t=e.substring(r,n)}for(var o={},i=t.split(/[&;]/),a=0,s=i.length;a1?1/e:e},getResolutionFromScale:function(e,t){var r;e&&(null==t&&(t="degrees"),r=1/(ce.normalizeScale(e)*fe[t]*96));return r},getScaleFromResolution:function(e,t){return null==t&&(t="degrees"),e*fe[t]*96},getBrowser:function(){return se},isSupportCanvas:le,supportCanvas:function(){return ce.isSupportCanvas},isInTheSameDomain:function(e){if(!e)return!0;var t=e.indexOf("//"),r=document.location.toString(),n=r.indexOf("//");if(-1===t)return!0;var o,i=o=e.substring(0,t),a=r.substring(n+2);n=a.indexOf("/");var s=a.indexOf(":"),l=a.substring(0,n),u=document.location.protocol;if(-1!==s||(l+=":"+("http:"===u.toLowerCase()?80:443)),u.toLowerCase()!==i.toLowerCase())return!1;var c=(i=e.substring(t+2)).indexOf(":");t=i.indexOf("/");var f,p=i.substring(0,t);return-1!==c?f=i.substring(0,c):(f=i.substring(0,t),p+=":"+("http:"===o.toLowerCase()?80:443)),f===document.domain&&p===l},calculateDpi:function(e,t,r,n,o){if(e&&t&&r){var i,a=e.getWidth(),s=e.getHeight(),l=t.w,u=t.h;if(o=o||6378137,"degree"===(n=n||"degrees").toLowerCase()||"degrees"===n.toLowerCase()||"dd"===n.toLowerCase()){var c=a/l,f=s/u;i=254/(c>f?c:f)/r/(2*Math.PI*o/360)/1e4}else{i=254/(a/l)/r/1e4}return i}},toJSON:function(e){var t=e;if(null==t)return null;switch(t.constructor){case String:return t=(t=(t=(t=(t=(t=(t='"'+t.replace(/(["\\])/g,"\\$1")+'"').replace(/\n/g,"\\n")).replace(/\r/g,"\\r")).replace("<","<")).replace(">",">")).replace(/%/g,"%25")).replace(/&/g,"%26");case Array:for(var r="",n=0,o=t.length;n0?"{"+l.join(",")+"}":"{}"}return t.toString()}},getResolutionFromScaleDpi:function(e,t,r,n){return n=n||6378137,r=r||"",e>0&&t>0?(e=ce.normalizeScale(e),"degree"===r.toLowerCase()||"degrees"===r.toLowerCase()||"dd"===r.toLowerCase()?254/t/e/(2*Math.PI*n/360)/1e4:254/t/e/1e4):-1},getScaleFromResolutionDpi:function(e,t,r,n){return n=n||6378137,r=r||"",e>0&&t>0?"degree"===r.toLowerCase()||"degrees"===r.toLowerCase()||"dd"===r.toLowerCase()?254/t/e/(2*Math.PI*n/360)/1e4:254/t/e/1e4:-1},transformResult:function(e){return e.responseText&&"string"==typeof e.responseText&&(e=JSON.parse(e.responseText)),e},copyAttributes:function(e,t){if(e=e||{},t)for(var r in t){var n=t[r];void 0!==n&&"CLASS_NAME"!==r&&"function"!=typeof n&&(e[r]=n)}return e},copyAttributesWithClip:function(e,t,r){if(e=e||{},t)for(var n in t){var o=!1;if(r&&r.length)for(var i=0,a=r.length;i=0&&i<=1&&o<=1&&i>=0?new K.Point(e.x+o*(t.x-e.x),e.y+o*(t.y-e.y)):"No Intersection";else if(0==s&&0==l){var c=Math.max(e.y,t.y),f=Math.min(e.y,t.y),p=Math.max(e.x,t.x),h=Math.min(e.x,t.x);a=(r.y>=f&&r.y<=c||n.y>=f&&n.y<=c)&&r.x>=h&&r.x<=p||n.x>=h&&n.x<=p?"Coincident":"Parallel"}else a="Parallel";return a},getTextBounds:function(e,t,r){document.body.appendChild(r),r.style.width="auto",r.style.height="auto",e.fontSize&&(r.style.fontSize=e.fontSize),e.fontFamily&&(r.style.fontFamily=e.fontFamily),e.fontWeight&&(r.style.fontWeight=e.fontWeight),r.style.position="relative",r.style.visibility="hidden",r.style.display="inline-block",r.innerHTML=t;var n=r.clientWidth,o=r.clientHeight;return document.body.removeChild(r),{textWidth:n,textHeight:o}},convertPath:function(e,t){return t?e.replace(/\{([\w-\.]+)\}/g,function(e,r){var n;return n=t.hasOwnProperty(r)?function(e){if(void 0==e||null==e)return"";if(e instanceof Date)return e.toJSON();if(function(e){if("string"!=typeof e&&"object"!==$(e))return!1;try{var t=e.toString();return"[object Object]"===t||"[object Array]"===t}catch(e){return!1}}(e))return JSON.stringify(e);return e.toString()}(t[r]):e,encodeURIComponent(n)}):e}},fe={inches:1,ft:12,mi:63360,m:39.3701,km:39370.1,dd:4374754,yd:36};fe.in=fe.inches,fe.degrees=fe.dd,fe.nmi=1852*fe.m;var pe=.0254000508001016;function he(e,t){for(var r=0;re.right;)t.lon-=e.getWidth()}return t}},{key:"destroy",value:function(){this.lon=null,this.lat=null}}])&&he(t.prototype,r),n&&he(t,n),Object.defineProperty(t,"prototype",{writable:!1}),e}();function de(e,t){for(var r=0;rthis.right)&&(this.right=r.right),(null==this.top||r.top>this.top)&&(this.top=r.top))}}},{key:"containsLonLat",value:function(e,t){"boolean"==typeof t&&(t={inclusive:t}),t=t||{};var r=this.contains(e.lon,e.lat,t.inclusive),n=t.worldBounds;if(n&&!r){var o=n.getWidth(),i=(n.left+n.right)/2,a=Math.round((e.lon-i)/o);r=this.containsLonLat({lon:e.lon-a*o,lat:e.lat},{inclusive:t.inclusive})}return r}},{key:"containsPixel",value:function(e,t){return this.contains(e.x,e.y,t)}},{key:"contains",value:function(e,t,r){if(null==r&&(r=!0),null==e||null==t)return!1;var n=!1;return n=r?e>=this.left&&e<=this.right&&t>=this.bottom&&t<=this.top:e>this.left&&ethis.bottom&&t=r.bottom&&e.bottom<=r.top||r.bottom>=e.bottom&&r.bottom<=e.top,a=e.top>=r.bottom&&e.top<=r.top||r.top>e.bottom&&r.top=r.left&&e.left<=r.right||r.left>=e.left&&r.left<=e.right,l=e.right>=r.left&&e.right<=r.right||r.right>=e.left&&r.right<=e.right;n=(i||a)&&(s||l)}if(t.worldBounds&&!n){var u=t.worldBounds,c=u.getWidth(),f=!u.containsBounds(r),p=!u.containsBounds(e);f&&!p?(e=e.add(-c,0),n=r.intersectsBounds(e,{inclusive:t.inclusive})):p&&!f&&(r=r.add(-c,0),n=e.intersectsBounds(r,{inclusive:t.inclusive}))}return n}},{key:"containsBounds",value:function(e,t,r){null==t&&(t=!1),null==r&&(r=!0);var n=this.contains(e.left,e.bottom,r),o=this.contains(e.right,e.bottom,r),i=this.contains(e.left,e.top,r),a=this.contains(e.right,e.top,r);return t?n||o||i||a:n&&o&&i&&a}},{key:"determineQuadrant",value:function(e){var t="",r=this.getCenterLonLat();return t+=e.lat=e.right&&o.right>e.right;)o=o.add(-i,0);var a=o.left+r;ae.left&&o.right-n>e.right&&(o=o.add(-i,0))}return o}},{key:"toServerJSONObject",value:function(){return{rightTop:{x:this.right,y:this.top},leftBottom:{x:this.left,y:this.bottom},left:this.left,right:this.right,top:this.top,bottom:this.bottom}}},{key:"destroy",value:function(){this.left=null,this.right=null,this.top=null,this.bottom=null,this.centerLonLat=null}}])&&de(t.prototype,r),n&&de(t,n),Object.defineProperty(t,"prototype",{writable:!1}),e}();function ve(e){"@babel/helpers - typeof";return(ve="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function me(e,t){for(var r=0;r-1)){if(null!=t&&t=0;--r)t=this.removeComponent(e[r])||t;return t}},{key:"removeComponent",value:function(e){return ce.removeItem(this.components,e),this.clearBounds(),!0}},{key:"getArea",value:function(){for(var e=0,t=0,r=this.components.length;t=1?1:v)<=-1?-1:v,c=180*Math.acos(v)/Math.PI,a=(c=o.x==r.x?t.x>r.x&&n.x>r.x||t.xp*t.x+h&&n.y>p*n.x+h||t.yr.y?n.xr.x&&(s=!1):o.xp*n.x+h&&(s=!1):o.x>r.x?n.y>r.y&&(s=!1):n.y=0?180*Math.atan(m)/Math.PI:Math.abs(180*Math.atan(m)/Math.PI)+90,w=Math.abs(t.y);r.y==w&&w==o.y&&r.x=0?m>=0?u+=l:u=180-(u-90)+l:u=m>0?u-180+l:90-u+l:O>=0?m>=0?u-=l:u=180-(u-90)-l:u=m>=0?u-180-l:90-u-l,u=u*Math.PI/180;var _=t.x+i*Math.cos(u),P=t.y+i*Math.sin(u);f.push(new Ve(_,P))}f.push(o)}return f}},{key:"createLineEPS",value:function(e){var t=[],r=e.length;if(r<2)return e;for(var n=0;n2;return t&&qe(Ye(i.prototype),"removeComponent",this).apply(this,arguments),t}},{key:"getSortedSegments",value:function(){for(var e,t,r=this.components.length-1,n=new Array(r),o=0;o1&&(r=parseFloat(r)*u),n.labelAlign&&"cm"!==n.labelAlign)switch(n.labelAlign){case"lt":l.x+=t/2,l.y+=r/2;break;case"lm":l.x+=t/2;break;case"lb":l.x+=t/2,l.y-=r/2;break;case"ct":l.y+=r/2;break;case"cb":l.y-=r/2;break;case"rt":l.x-=t/2,l.y+=r/2;break;case"rm":l.x-=t/2;break;case"rb":l.x-=t/2,l.y-=r/2}return this.bsInfo.h=r,this.bsInfo.w=t,o=l.x-parseFloat(t)/2,i=l.y+parseFloat(r)/2,s=l.x+parseFloat(t)/2,a=l.y-parseFloat(r)/2,new be(o,i,s,a)}},{key:"getLabelPxBoundsByText",value:function(e,t){var r,n,o,i,a=this.getLabelPxSize(t),s=ce.cloneObject(e);if(t.labelAlign&&"cm"!==t.labelAlign)switch(t.labelAlign){case"lt":s.x+=a.w/2,s.y+=a.h/2;break;case"lm":s.x+=a.w/2;break;case"lb":s.x+=a.w/2,s.y-=a.h/2;break;case"ct":s.y+=a.h/2;break;case"cb":s.y-=a.h/2;break;case"rt":s.x-=a.w/2,s.y+=a.h/2;break;case"rm":s.x-=a.w/2;break;case"rb":s.x-=a.w/2,s.y-=a.h/2}return this.bsInfo.h=a.h,this.bsInfo.w=a.w,r=s.x-a.w/2,n=s.y+a.h/2,i=t.fontStyle&&"italic"===t.fontStyle?s.x+a.w/2+parseInt(parseFloat(t.fontSize)/2):s.x+a.w/2,o=s.y-a.h/2,new be(r,n,i,o)}},{key:"getLabelPxSize",value:function(e){var t,r,n,o,i=parseFloat(e.strokeWidth);t=e.label||this.text,r=e.fontSize?parseFloat(e.fontSize):parseFloat("12px");var a=t.split("\n"),s=a.length;o=s>1?r*s+s+i+.2*r:r+i+.2*r+1,n=0,this.labelWTmp&&n255?r++:n++;return t.cnC=r,t.enC=n,t.textC=e.length,t}}])&&Ze(t.prototype,r),n&&Ze(t,n),Object.defineProperty(t,"prototype",{writable:!1}),i}();function nt(e){"@babel/helpers - typeof";return(nt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function ot(e,t){for(var r=0;r3;if(t){this.components.pop(),it(lt(i.prototype),"removeComponent",this).apply(this,arguments);var r=this.components[0];it(lt(i.prototype),"addComponent",this).apply(this,[r])}return t}},{key:"getArea",value:function(){var e=0;if(this.components&&this.components.length>2){for(var t=0,r=0,n=this.components.length;r0){e+=Math.abs(this.components[0].getArea());for(var t=1,r=this.components.length;t1},isLeftClick:function(e){return e.which&&1===e.which||e.button&&1===e.button},isRightClick:function(e){return e.which&&3===e.which||e.button&&2===e.button},stop:function(e,t){t||(e.preventDefault?e.preventDefault():e.returnValue=!1),e.stopPropagation?e.stopPropagation():e.cancelBubble=!0},findElement:function(e,t){for(var r=Ft.element(e);r.parentNode&&(!r.tagName||r.tagName.toUpperCase()!=t.toUpperCase());)r=r.parentNode;return r},observe:function(e,t,r,n){var o=ce.getElement(e);if(n=n||!1,"keypress"===t&&(navigator.appVersion.match(/Konqueror|Safari|KHTML/)||o.attachEvent)&&(t="keydown"),this.observers||(this.observers={}),!o._eventCacheID){var i="eventCacheID_";o.id&&(i=o.id+"_"+i),o._eventCacheID=ce.createUniqueID(i)}var a=o._eventCacheID;this.observers[a]||(this.observers[a]=[]),this.observers[a].push({element:o,name:t,observer:r,useCapture:n}),o.addEventListener?"mousewheel"===t?o.addEventListener(t,r,{useCapture:n,passive:!1}):o.addEventListener(t,r,n):o.attachEvent&&o.attachEvent("on"+t,r)},stopObservingElement:function(e){var t=ce.getElement(e)._eventCacheID;this._removeElementObservers(Ft.observers[t])},_removeElementObservers:function(e){if(e)for(var t=e.length-1;t>=0;t--){var r=e[t],n=new Array(r.element,r.name,r.observer,r.useCapture);Ft.stopObserving.apply(this,n)}},stopObserving:function(e,t,r,n){n=n||!1;var o=ce.getElement(e),i=o._eventCacheID;"keypress"===t&&(navigator.appVersion.match(/Konqueror|Safari|KHTML/)||o.detachEvent)&&(t="keydown");var a=!1,s=Ft.observers[i];if(s)for(var l=0;!a&&l0&&r.push(","),r.push(this.writeNewline(),this.writeIndent(),t));return this.level-=1,r.push(this.writeNewline(),this.writeIndent(),"]"),r.join("")},string:function(e){var t={"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"};return/["\\\x00-\x1f]/.test(e)?'"'+e.replace(/([\x00-\x1f\\"])/g,function(e,r){var n=t[r];return n||(n=r.charCodeAt(),"\\u00"+Math.floor(n/16).toString(16)+(n%16).toString(16))})+'"':'"'+e+'"'},number:function(e){return isFinite(e)?String(e):"null"},boolean:function(e){return String(e)},date:function(e){function t(e){return e<10?"0"+e:e}return'"'+e.getFullYear()+"-"+t(e.getMonth()+1)+"-"+t(e.getDate())+"T"+t(e.getHours())+":"+t(e.getMinutes())+":"+t(e.getSeconds())+'"'}},t}return t=i,(r=[{key:"read",value:function(e,t){var r;if(this.nativeJSON)try{r=JSON.parse(e,t)}catch(t){return{data:e}}return this.keepData&&(this.data=r),r}},{key:"write",value:function(e,t){this.pretty=!!t;var r=null,n=rr(e);if(this.serialize[n])try{r=!this.pretty&&this.nativeJSON?JSON.stringify(e):this.serialize[n].apply(this,[e])}catch(e){}return r}},{key:"writeIndent",value:function(){var e=[];if(this.pretty)for(var t=0;t0))return null;for(var a=0,s=0,l=[];a0){e+='"points":[';for(var r=0,n=this.components.length;re[i]){var a=e[i];e[i]=e[o],e[o]=a;var s=t[i];if(t[i]=t[o],t[o]=s,r&&r.length>0){var l=r[i];r[i]=r[o],r[o]=l}if(n&&n.length>0){var u=n[i];n[i]=n[o],n[o]=u}}}}],(r=[{key:"destroy",value:function(){var e=this;e.id=null,e.style=null,e.parts=null,e.partTopo=null,e.points=null,e.type=null,e.prjCoordSys=null}},{key:"toGeometry",value:function(){var e=this;switch(e.type.toUpperCase()){case o.POINT:return e.toGeoPoint();case o.LINE:return e.toGeoLine();case o.LINEM:return e.toGeoLinem();case o.REGION:return e.toGeoRegion();case o.POINTEPS:return e.toGeoPoint();case o.LINEEPS:return e.toGeoLineEPS();case o.REGIONEPS:return e.toGeoRegionEPS();case o.GEOCOMPOUND:return e.transformGeoCompound()}}},{key:"toGeoPoint",value:function(){var e=this.parts||[],t=this.points||[],r=e.length;if(r>0){if(1===r)return new Ve(t[0].x,t[0].y);for(var n=[],o=0;o0){if(1===r){for(var n=[],o=0;o0){if(1===s){for(e=0,r=[];e=0;g--)if(v[m]=-1,f[g].containsBounds(f[m])){p[m]=-1*p[g],p[m]<0&&(v[m]=g);break}for(var w=0;w0?i.push(c[w]):(i[v[w]].components=i[v[w]].components.concat(c[w].components),i.push(""))}else{i=new Array;for(var O=0;O0&&i.length>0&&(i[i.length-1].components=i[i.length-1].components.concat(l),l=[]),i.push(c[O])),O==o-1){var S=i.length;if(S)i[S-1].components=i[S-1].components.concat(l);else for(var _=0,P=l.length;_=0;w--)if(m[g]=-1,p[w].containsBounds(p[g])){h[g]=-1*h[w],h[g]<0&&(m[g]=w);break}for(var O=0;O0?a.push(f[O]):(a[m[O]].components=a[m[O]].components.concat(f[O].components),a.push(""))}else{a=new Array;for(var S=0;S0&&a.length>0&&(a[a.length-1].components=a[a.length-1].components.concat(u),u=[]),a.push(f[S])),S==o-1){var _=a.length;if(_)a[_-1].components=a[_-1].components.concat(u);else for(var P=0,x=u.length;P-1||(t[n]=e[n]);return t}}])&&Tr(t.prototype,r),n&&Tr(t,n),Object.defineProperty(t,"prototype",{writable:!1}),i}();function Ir(e){"@babel/helpers - typeof";return(Ir="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Nr(e,t){for(var r=0;r0&&o.push(","),r=t[i].geometry,o.push(this.extractGeometry(r));return n&&o.push(")"),o.join("")}},{key:"extractGeometry",value:function(e){var t=e.CLASS_NAME.split(".")[2].toLowerCase();return this.extract[t]?("collection"===t?"GEOMETRYCOLLECTION":t.toUpperCase())+"("+this.extract[t].apply(this,[e])+")":null}}])&&Nr(t.prototype,r),n&&Nr(t,n),Object.defineProperty(t,"prototype",{writable:!1}),i}();function Ur(e,t){for(var r=0;r=0?t.speed:1,this.frequency=t.speed&&t.frequency>=0?t.frequency:1e3,this.startTime=t.startTime&&null!=t.startTime?t.startTime:0,this.endTime=t.endTime&&null!=t.endTime&&t.endTime>=r.startTime?t.endTime:+new Date,this.repeat=void 0===t.repeat||t.repeat,this.reverse=void 0!==t.reverse&&t.reverse,this.currentTime=null,this.oldTime=null,this.running=!1,this.EVENT_TYPES=["start","pause","stop"],r.events=new Gt(this,null,this.EVENT_TYPES),r.speed=Number(r.speed),r.frequency=Number(r.frequency),r.startTime=Number(r.startTime),r.endTime=Number(r.endTime),r.startTime=Date.parse(new Date(r.startTime)),r.endTime=Date.parse(new Date(r.endTime)),r.currentTime=r.startTime,this.CLASS_NAME="SuperMap.TimeControlBase"}var t,r,n;return t=e,(r=[{key:"updateOptions",value:function(e){var t=this;(e=e||{}).speed&&e.speed>=0&&(t.speed=e.speed,t.speed=Number(t.speed)),e.speed&&e.frequency>=0&&(t.frequency=e.frequency,t.frequency=Number(t.frequency)),e.startTime&&null!=e.startTime&&(t.startTime=e.startTime,t.startTime=Date.parse(new Date(t.startTime))),e.endTime&&null!=e.endTime&&e.endTime>=t.startTime&&(t.endTime=e.endTime,t.endTime=Date.parse(new Date(t.endTime))),null!=e.repeat&&(t.repeat=e.repeat),null!=e.reverse&&(t.reverse=e.reverse)}},{key:"start",value:function(){var e=this;e.running||(e.running=!0,e.tick(),e.events.triggerEvent("start",e.currentTime))}},{key:"pause",value:function(){this.running=!1,this.events.triggerEvent("pause",this.currentTime)}},{key:"stop",value:function(){var e=this;e.currentTime=e.startTime,e.running&&(e.running=!1),e.events.triggerEvent("stop",e.currentTime)}},{key:"toggle",value:function(){this.running?this.pause():this.start()}},{key:"setSpeed",value:function(e){return e>=0&&(this.speed=e,!0)}},{key:"getSpeed",value:function(){return this.speed}},{key:"setFrequency",value:function(e){return e>=0&&(this.frequency=e,!0)}},{key:"getFrequency",value:function(){return this.frequency}},{key:"setStartTime",value:function(e){var t=this;return!((e=Date.parse(new Date(e)))>t.endTime)&&(t.startTime=e,t.currentTime=t.endTime&&(t.currentTime=t.startTime,t.tick()),!0)}},{key:"getEndTime",value:function(){return this.endTime}},{key:"setCurrentTime",value:function(e){var t=this;return t.currentTime=Date.parse(new Date(t.currentTime)),e>=t.startTime&&e<=t.endTime&&(t.currentTime=e,t.startTime=t.currentTime,t.tick(),!0)}},{key:"getCurrentTime",value:function(){return this.currentTime}},{key:"setRepeat",value:function(e){this.repeat=e}},{key:"getRepeat",value:function(){return this.repeat}},{key:"setReverse",value:function(e){this.reverse=e}},{key:"getReverse",value:function(){return this.reverse}},{key:"getRunning",value:function(){return this.running}},{key:"destroy",value:function(){var e=this;e.speed=null,e.frequency=null,e.startTime=null,e.endTime=null,e.currentTime=null,e.repeat=null,e.running=!1,e.reverse=null}},{key:"tick",value:function(){}}])&&Ur(t.prototype,r),n&&Ur(t,n),Object.defineProperty(t,"prototype",{writable:!1}),e}();function zr(e){"@babel/helpers - typeof";return(zr="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Jr(e,t){for(var r=0;r=e.endTime&&(e.currentTime=e.endTime)}}}])&&Jr(t.prototype,r),n&&Jr(t,n),Object.defineProperty(t,"prototype",{writable:!1}),i}(),$r=(r(957),r(937),r(238)),en=r.n($r),tn=window.fetch,rn={limitLength:1500,queryKeys:[],queryValues:[],supermap_callbacks:{},addQueryStrings:function(e){for(var t in e){this.queryKeys.push(t),"string"!=typeof e[t]&&(e[t]=ce.toJSON(e[t]));var r=encodeURIComponent(e[t]);this.queryValues.push(r)}},issue:function(e){for(var t=this,r=t.getUid(),n=e.url,o=[],i=new Promise(function(e){t.supermap_callbacks[r]=function(n){delete t.supermap_callbacks[r],e(n)}}),a=n,s=0,l=t.queryKeys?t.queryKeys.length:0,u=0;u=t.limitLength){if(0==s)return!1;o.push(a),a=n,s=0,u--}else if(a.length+t.queryKeys[u].length+2+t.queryValues[u].length>t.limitLength)for(var c=t.queryValues[u];c.length>0;){var f=t.limitLength-a.length-t.queryKeys[u].length-2;a.indexOf("?")>-1?a+="&":a+="?";var p=c.substring(0,f);"%"===p.substring(f-1,f)?(f-=1,p=c.substring(0,f)):"%"===p.substring(f-2,f-1)&&(f-=2,p=c.substring(0,f)),a+=t.queryKeys[u]+"="+p,c=c.substring(f),p.length>0&&(o.push(a),a=n,s=0)}else s++,a.indexOf("?")>-1?a+="&":a+="?",a+=t.queryKeys[u]+"="+t.queryValues[u];return o.push(a),t.send(o,"RequestJSONPPromise.supermap_callbacks["+r+"]",e&&e.proxy),i},getUid:function(){return 1e3*(new Date).getTime()+Math.floor(1e17*Math.random())},send:function(e,t,r){var n=e.length;if(n>0)for(var o=(new Date).getTime(),i=0;i-1?a+="&":a+="?",a+="sectionCount="+n,a+="§ionIndex="+i,a+="&jsonpUserID="+o,r&&(a=decodeURIComponent(a),a=r+encodeURIComponent(a)),en()(a,{jsonpCallbackFunction:t,timeout:3e4})}},GET:function(e){return this.queryKeys.length=0,this.queryValues.length=0,this.addQueryStrings(e.params),this.issue(e)},POST:function(e){return this.queryKeys.length=0,this.queryValues.length=0,this.addQueryStrings({requestEntity:e.data}),this.issue(e)},PUT:function(e){return this.queryKeys.length=0,this.queryValues.length=0,this.addQueryStrings({requestEntity:e.data}),this.issue(e)},DELETE:function(e){return this.queryKeys.length=0,this.queryValues.length=0,this.addQueryStrings({requestEntity:e.data}),this.issue(e)}},nn=function(){return void 0!=Qr?Qr:window.XMLHttpRequest&&"withCredentials"in new window.XMLHttpRequest},on=function(){return Zr||45e3},an={commit:function(e,t,r,n){switch(e=e?e.toUpperCase():e){case"GET":return this.get(t,r,n);case"POST":return this.post(t,r,n);case"PUT":return this.put(t,r,n);case"DELETE":return this.delete(t,r,n);default:return this.get(t,r,n)}},supportDirectRequest:function(e,t){return!!ce.isInTheSameDomain(e)||(void 0!=t.crossOrigin?t.crossOrigin:nn()||t.proxy)},get:function(e,t,r){r=r||{};if(e=ce.urlAppend(e,this._getParameterString(t||{})),e=this._processUrl(e,r),!this.supportDirectRequest(e,r)){var n={url:e=e.replace(".json",".jsonp"),data:t};return rn.GET(n)}return this.urlIsLong(e)?this._postSimulatie("GET",e.substring(0,e.indexOf("?")),t,r):this._fetch(e,t,r,"GET")},delete:function(e,t,r){r=r||{};if(e=ce.urlAppend(e,this._getParameterString(t||{})),e=this._processUrl(e,r),!this.supportDirectRequest(e,r)){e=e.replace(".json",".jsonp");var n={url:e+="&_method=DELETE",data:t};return rn.DELETE(n)}return this.urlIsLong(e)?this._postSimulatie("DELETE",e.substring(0,e.indexOf("?")),t,r):this._fetch(e,t,r,"DELETE")},post:function(e,t,r){if(r=r||{},!this.supportDirectRequest(e,r)){e=e.replace(".json",".jsonp");var n={url:e+="&_method=POST",data:t};return rn.POST(n)}return this._fetch(this._processUrl(e,r),t,r,"POST")},put:function(e,t,r){if(r=r||{},e=this._processUrl(e,r),!this.supportDirectRequest(e,r)){e=e.replace(".json",".jsonp");var n={url:e+="&_method=PUT",data:t};return rn.PUT(n)}return this._fetch(e,t,r,"PUT")},urlIsLong:function(e){for(var t=0,r=null,n=0,o=e.length;n-1?"&":"?")+"_method="+e,"string"!=typeof r&&(r=JSON.stringify(r)),this.post(t,r,n)},_processUrl:function(e,t){if(this._isMVTRequest(e))return e;if(-1===e.indexOf(".json")&&!t.withoutFormatSuffix)if(e.indexOf("?")<0)e+=".json";else{var r=e.split("?");2===r.length&&(e=r[0]+".json?"+r[1])}return t&&t.proxy&&("function"==typeof t.proxy?e=t.proxy(e):(e=decodeURIComponent(e),e=t.proxy+encodeURIComponent(e))),e},_fetch:function(e,t,r,n){return(r=r||{}).headers=r.headers||{},r.headers["Content-Type"]||FormData.prototype.isPrototypeOf(t)||(r.headers["Content-Type"]="application/x-www-form-urlencoded;charset=UTF-8"),r.timeout?this._timeout(r.timeout,tn(e,{method:n,headers:r.headers,body:"PUT"===n||"POST"===n?t:void 0,credentials:this._getWithCredentials(r),mode:"cors",timeout:on()}).then(function(e){return e})):tn(e,{method:n,body:"PUT"===n||"POST"===n?t:void 0,headers:r.headers,credentials:this._getWithCredentials(r),mode:"cors",timeout:on()}).then(function(e){return e})},_getWithCredentials:function(e){return!0===e.withCredentials?"include":!1===e.withCredentials?"omit":"same-origin"},_fetchJsonp:function(e,t){return t=t||{},en()(e,{method:"GET",timeout:t.timeout}).then(function(e){return e})},_timeout:function(e,t){return new Promise(function(r,n){setTimeout(function(){n(new Error("timeout"))},e),t.then(r,n)})},_getParameterString:function(e){var t=[];for(var r in e){var n,o=e[r];if(null!=o&&"function"!=typeof o)n=Array.isArray(o)||"[object Object]"===o.toString()?encodeURIComponent(JSON.stringify(o)):encodeURIComponent(o),t.push(encodeURIComponent(r)+"="+n)}return t.join("&")},_isMVTRequest:function(e){return e.indexOf(".mvt")>-1||e.indexOf(".pbf")>-1}};function sn(e,t){for(var r=0;r3&&void 0!==arguments[3]?arguments[3]:{headers:this.headers,crossOrigin:this.crossOrigin,withCredentials:this.withCredentials};return t=ln.appendCredential(t),an.commit(e,t,r,n).then(function(e){return e.json()})}}])&&gn(t.prototype,r),n&&gn(t,n),Object.defineProperty(t,"prototype",{writable:!1}),e}();function On(e,t){for(var r=0;r0?(this.totalTimes--,this.ajaxPolling()):this._processFailed(e)}},{key:"ajaxPolling",value:function(){var e=this,t=e.options.url,r=/^http:\/\/([a-z]{9}|(\d+\.){3}\d+):\d{0,4}/;e.index=parseInt(Math.random()*e.length),e.url=e.urls[e.index],t=t.replace(r,r.exec(e.url)[0]),e.options.url=t,e.options.isInTheSameDomain=ce.isInTheSameDomain(t),e._commit(e.options)}},{key:"calculatePollingTimes",value:function(){var e=this;e.times?e.totalTimes>e.POLLING_TIMES?e.times>e.POLLING_TIMES?e.totalTimes=e.POLLING_TIMES:e.totalTimes=e.times:e.timese.POLLING_TIMES&&(e.totalTimes=e.POLLING_TIMES),e.totalTimes--}},{key:"isServiceSupportPolling",value:function(){return!("SuperMap.REST.ThemeService"===this.CLASS_NAME||"SuperMap.REST.EditFeaturesService"===this.CLASS_NAME)}},{key:"serviceProcessCompleted",value:function(e){e=ce.transformResult(e),this.events.triggerEvent("processCompleted",{result:e})}},{key:"serviceProcessFailed",value:function(e){var t=(e=ce.transformResult(e)).error||e;this.events.triggerEvent("processFailed",{error:t})}},{key:"_returnContent",value:function(e){return e.scope.format!==t.FGB&&!!e.scope.returnContent}},{key:"supportDataFormat",value:function(e){return this.dataFormat().includes(e)}},{key:"dataFormat",value:function(){return[t.GEOJSON,t.ISERVER]}},{key:"_commit",value:function(e){if("POST"===e.method||"PUT"===e.method||"PATCH"===e.method)if(e.params&&(e.url=ce.urlAppend(e.url,ce.getParameterString(e.params||{}))),"object"===ao(e.data))try{e.params=ce.toJSON(e.data)}catch(e){console.log("不是json对象")}else e.params=e.data;an.commit(e.method,e.url,e.params,{headers:e.headers,withoutFormatSuffix:e.withoutFormatSuffix,withCredentials:e.withCredentials,crossOrigin:e.crossOrigin,timeout:e.async?0:null,proxy:e.proxy}).then(function(e){return e.text?e.text():e.json?e.json():e}).then(function(r){var n=r;return"string"==typeof r&&(n=(new sr).read(r)),(!n||n.error||n.code>=300&&304!==n.code)&&(n=n&&n.error?{error:n.error}:{error:n}),n&&e.scope.format===t.FGB&&(n.newResourceLocation=n.newResourceLocation.replace(".json","")+".fgb"),n}).catch(function(e){return{error:e}}).then(function(t){t.error?(e.scope?X.bind(e.failure,e.scope):e.failure)(t):(t.succeed=void 0==t.succeed||t.succeed,(e.scope?X.bind(e.success,e.scope):e.success)(t))})}}])&&so(r.prototype,n),o&&so(r,o),Object.defineProperty(r,"prototype",{writable:!1}),e}();function uo(e,t){for(var r=0;r0)for(var t in e.items)e.items[t].destroy(),e.items[t]=null;e.items=null}e.numericPrecision=null,e.rangeMode=null,e.rangeCount=null,e.colorGradientType=null}}])&&Di(t.prototype,r),n&&Di(t,n),Object.defineProperty(t,"prototype",{writable:!1}),e}();function Gi(e,t){for(var r=0;r0&&(r+=","),r+='{"x":'+t[o].x+',"y":'+t[o].y+"}";else if(!0===e)for(var i=0;i0&&(r+=","),r+=t[i];return r+="]"}}])&&Qa(t.prototype,r),n&&Qa(t,n),Object.defineProperty(t,"prototype",{writable:!1}),i}();function rs(e){"@babel/helpers - typeof";return(rs="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function ns(e,t){for(var r=0;r=0){var t=JSON.parse(e.data);return e.filterParam=t,e.eventType="setFilterParamSucceeded",void this.events.triggerEvent("setFilterParamSucceeded",e)}var r=JSON.parse(e.data);e.featureResult=r,e.eventType="messageSucceeded",this.events.triggerEvent("messageSucceeded",e)}},{key:"_connect",value:function(e){return e=ln.appendCredential(e),"WebSocket"in window?new WebSocket(e):"MozWebSocket"in window?new(0,window.MozWebSocket)(e):(console.log("no WebSocket"),null)}}])&&ns(t.prototype,r),n&&ns(t,n),Object.defineProperty(t,"prototype",{writable:!1}),i}();function us(e,t){for(var r=0;r0&&(r+=","),r+='{"x":'+t[o].x+',"y":'+t[o].y+"}";else if(!0===e)for(var i=0;i0&&(r+=","),r+=t[i];return r+="]"}},{key:"toGeoJSONResult",value:function(e){if(!e||!e.facilityPathList)return e;var t=new Lr;return e.facilityPathList.map(function(e){return e.route&&(e.route=t.toGeoJSON(e.route)),e.pathGuideItems&&(e.pathGuideItems=t.toGeoJSON(e.pathGuideItems)),e.edgeFeatures&&(e.edgeFeatures=t.toGeoJSON(e.edgeFeatures)),e.nodeFeatures&&(e.nodeFeatures=t.toGeoJSON(e.nodeFeatures)),e}),e}}])&&fc(t.prototype,r),n&&fc(t,n),Object.defineProperty(t,"prototype",{writable:!1}),i}();function vc(e,t){for(var r=0;r0&&(t+=","),t+=ce.toJSON(e[n]);return t+="]"}},{key:"toGeoJSONResult",value:function(e){if(!e)return null;var t=new Lr;return e.demandResults&&(e.demandResults=t.toGeoJSON(e.demandResults)),e.supplyResults&&(e.supplyResults=t.toGeoJSON(e.supplyResults)),e}}])&&wc(t.prototype,r),n&&wc(t,n),Object.defineProperty(t,"prototype",{writable:!1}),i}();function kc(e,t){for(var r=0;r0&&(r+=","),r+='{"x":'+t[o].x+',"y":'+t[o].y+"}";else if(!0===e)for(var i=0;i0&&(r+=","),r+=t[i];return r+="]"}},{key:"toGeoJSONResult",value:function(e){if(!e||!e.pathList)return null;var t=new Lr;return e.pathList.map(function(e){return e.route&&(e.route=t.toGeoJSON(e.route)),e.pathGuideItems&&(e.pathGuideItems=t.toGeoJSON(e.pathGuideItems)),e.edgeFeatures&&(e.edgeFeatures=t.toGeoJSON(e.edgeFeatures)),e.nodeFeatures&&(e.nodeFeatures=t.toGeoJSON(e.nodeFeatures)),e}),e}}])&&Tc(t.prototype,r),n&&Tc(t,n),Object.defineProperty(t,"prototype",{writable:!1}),i}();function Ic(e,t){for(var r=0;r0&&(r+=","),r+='{"x":'+t[o].x+',"y":'+t[o].y+"}";else if(!0===e)for(var i=0;i0&&(r+=","),r+=t[i];return r+="]"}},{key:"toGeoJSONResult",value:function(e){if(!e||!e.pathList||e.pathList.length<1)return null;var t=new Lr;return e.pathList.forEach(function(e){e.route&&(e.route=t.toGeoJSON(e.route)),e.pathGuideItems&&(e.pathGuideItems=t.toGeoJSON(e.pathGuideItems)),e.edgeFeatures&&(e.edgeFeatures=t.toGeoJSON(e.edgeFeatures)),e.nodeFeatures&&(e.nodeFeatures=t.toGeoJSON(e.nodeFeatures))}),e}}])&&Dc(t.prototype,r),n&&Dc(t,n),Object.defineProperty(t,"prototype",{writable:!1}),i}();function Jc(e,t){for(var r=0;r0&&(r+=","),r+='{"x":'+t[o].x+',"y":'+t[o].y+"}";else if(!0===e)for(var i=0;i0&&(r+=","),r+=t[i];return r+="]"}},{key:"toGeoJSONResult",value:function(e){if(!e||!e.serviceAreaList)return e;var t=new Lr;return e.serviceAreaList.map(function(e){return e.serviceRegion&&(e.serviceRegion=t.toGeoJSON(e.serviceRegion)),e.edgeFeatures&&(e.edgeFeatures=t.toGeoJSON(e.edgeFeatures)),e.nodeFeatures&&(e.nodeFeatures=t.toGeoJSON(e.nodeFeatures)),e.routes&&(e.routes=t.toGeoJSON(e.routes)),e}),e}}])&&Wc(t.prototype,r),n&&Wc(t,n),Object.defineProperty(t,"prototype",{writable:!1}),i}();function $c(e,t){for(var r=0;r0&&(t+=","),t+='{"x":'+o[r].x+',"y":'+o[r].y+"}";i+=t+="]"}else if(!0===e.isAnalyzeById){for(var a="[",s=e.nodes,l=s.length,u=0;u0&&(a+=","),a+=s[u];i+=a+="]"}return i}},{key:"toGeoJSONResult",value:function(e){if(!e||!e.tspPathList)return null;var t=new Lr;return e.tspPathList.forEach(function(e){e.route&&(e.route=t.toGeoJSON(e.route)),e.pathGuideItems&&(e.pathGuideItems=t.toGeoJSON(e.pathGuideItems)),e.edgeFeatures&&(e.edgeFeatures=t.toGeoJSON(e.edgeFeatures)),e.nodeFeatures&&(e.nodeFeatures=t.toGeoJSON(e.nodeFeatures))}),e}}])&&rf(t.prototype,r),n&&rf(t,n),Object.defineProperty(t,"prototype",{writable:!1}),i}();function uf(e,t){for(var r=0;r=0;e--)this.points[e].destroy();this.points=null}}}])&&zf(t.prototype,r),n&&zf(t,n),Object.defineProperty(t,"prototype",{writable:!1}),i}();function Qf(e){"@babel/helpers - typeof";return(Qf="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Zf(e,t){for(var r=0;r0;)e.fields.pop();e.fields=null}e.attributeFilter=null,e.spatialQueryMode=null,e.getFeatureMode=null}}])&&_p(t.prototype,r),n&&_p(t,n),Object.defineProperty(t,"prototype",{writable:!1}),i}();function Cp(e){"@babel/helpers - typeof";return(Cp="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Rp(e,t){for(var r=0;r=0&&r.toIndex>=0&&!n&&(r.url=ce.urlAppend(r.url,"fromIndex=".concat(r.fromIndex,"&toIndex=").concat(r.toIndex))),e.returnCountOnly&&(r.url=ce.urlAppend(r.url,"&returnCountOnly="+e.returnContent)),t=r.getJsonParameters(e),r.request({method:"POST",data:t,scope:r,success:r.serviceProcessCompleted,failure:r.serviceProcessFailed})}}},{key:"serviceProcessCompleted",value:function(e){if(e=ce.transformResult(e),this.format===t.GEOJSON&&e.features){var r=new Lr;e.features=r.toGeoJSON(e.features)}this.events.triggerEvent("processCompleted",{result:e})}},{key:"dataFormat",value:function(){return[t.GEOJSON,t.ISERVER,t.FGB]}}])&&Rp(r.prototype,n),o&&Rp(r,o),Object.defineProperty(r,"prototype",{writable:!1}),a}();function Dp(e){"@babel/helpers - typeof";return(Dp="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Bp(e,t){for(var r=0;r0;)e.fields.pop();e.fields=null}e.geometry&&(e.geometry.destroy(),e.geometry=null)}}])&&Hp(t.prototype,r),n&&Hp(t,n),Object.defineProperty(t,"prototype",{writable:!1}),i}();function $p(e){"@babel/helpers - typeof";return($p="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function eh(e,t){for(var r=0;r0;)e.fields.pop();e.fields=null}e.attributeFilter=null,e.spatialQueryMode=null,e.getFeatureMode=null}}])&&sh(t.prototype,r),n&&sh(t,n),Object.defineProperty(t,"prototype",{writable:!1}),i}();function yh(e){"@babel/helpers - typeof";return(yh="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function dh(e,t){for(var r=0;r0;)e.fields.pop();e.fields=null}}}])&&Sh(t.prototype,r),n&&Sh(t,n),Object.defineProperty(t,"prototype",{writable:!1}),i}();function Th(e){"@babel/helpers - typeof";return(Th="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Ch(e,t){for(var r=0;r0)for(var t in e.items)e.items[t].destroy(),e.items[t]=null;e.items=null}e.defaultStyle&&(e.defaultStyle.destroy(),e.defaultStyle=null)}},{key:"toServerJSONObject",value:function(){var e={};if((e=ce.copyAttributes(e,this)).defaultStyle&&e.defaultStyle.toServerJSONObject&&(e.defaultStyle=e.defaultStyle.toServerJSONObject()),e.items){for(var t=[],r=e.items.length,n=0;n0)for(var t in e.items)e.items[t].destroy(),e.items[t]=null;e.items=null}e.rangeExpression=null,e.rangeMode=null,e.rangeParameter=null,e.colorGradientType=null}}])&&Rd(t.prototype,r),n&&Rd(t,n),Object.defineProperty(t,"prototype",{writable:!1}),i}();function Dd(e,t){for(var r=0;r0?e[0].subLayers.layers:null)?t.length:0,this.handleLayers(r,t),this.events.triggerEvent("processCompleted",{result:e[0]})}},{key:"handleLayers",value:function(e,t){var r;if(e)for(var n=0;n0)this.handleLayers(t[n].subLayers.layers.length,t[n].subLayers.layers);else switch(t[n].ugcLayerType){case"THEME":(r=new lb).fromJson(t[n]),t[n]=r;break;case"GRID":(r=new db).fromJson(t[n]),t[n]=r;break;case"IMAGE":(r=new Sb).fromJson(t[n]),t[n]=r;break;case"VECTOR":(r=new Tb).fromJson(t[n]),t[n]=r}}}}])&&Rb(t.prototype,r),n&&Rb(t,n),Object.defineProperty(t,"prototype",{writable:!1}),i}();function Db(e,t){for(var r=0;r=200&&e.code<300||0==e.code||304===e.code,r=e.code&&t;!e.code||r?this.events&&this.events.triggerEvent("processCompleted",{result:e}):this.events.triggerEvent("processFailed",{error:e})}}])&&um(t.prototype,r),n&&um(t,n),Object.defineProperty(t,"prototype",{writable:!1}),i}();function bm(e,t){for(var r=0;r0&&(r+='"subLayers":'+e.toJSON()),r+=',"visible":true,',r+='"name":"'+this.getMapName(this.mapUrl)+'"',r+="}]",t.request({method:"PUT",data:r,scope:t,success:t.serviceProcessCompleted,failure:t.serviceProcessFailed})}}}},{key:"createTempLayerComplete",value:function(e){(e=ce.transformResult(e)).succeed&&(this.lastparams.resourceID=e.newResourceID),this.processAsync(this.lastparams)}},{key:"getMapName",value:function(e){var t=e;"/"===t.charAt(t.length-1)&&(t=t.substr(0,t.length-1));var r=t.lastIndexOf("/");return t.substring(r+1,t.length)}},{key:"serviceProcessCompleted",value:function(e){null!=(e=ce.transformResult(e))&&null!=this.lastparams&&(e.newResourceID=this.lastparams.resourceID),this.events.triggerEvent("processCompleted",{result:e})}}])&&aO(t.prototype,r),n&&aO(t,n),Object.defineProperty(t,"prototype",{writable:!1}),i}();function hO(e,t){for(var r=0;r0)for(var t in e.items)e.items[t].destroy(),e.items[t]=null;e.items=null}e.reverseColor=null,e.rangeMode=null,e.rangeParameter=null,e.colorGradientType=null}}])&&ES(t.prototype,r),n&&ES(t,n),Object.defineProperty(t,"prototype",{writable:!1}),i}();function IS(e,t){for(var r=0;r0)for(var t in e.items)e.items[t].destroy(),e.items[t]=null;e.items=null}e.defaultcolor&&(e.defaultcolor.destroy(),e.defaultcolor=null)}},{key:"toServerJSONObject",value:function(){var e={};if((e=ce.copyAttributes(e,this)).defaultcolor&&e.defaultcolor.toServerJSONObject&&(e.defaultcolor=e.defaultcolor.toServerJSONObject()),e.items){for(var t=[],r=e.items.length,n=0;n0&&(e=e.substring(0,e.length-1)),"{"+e+"}"}return null}}])&&WS(t.prototype,r),n&&WS(t,n),Object.defineProperty(t,"prototype",{writable:!1}),e}();function XS(e,t){for(var r=0;r0&&(1===o.length?r+="'displayFilter':\""+o[0]+'",':r+="'displayFilter':\""+o[a]+'",'),(i=e.displayOrderBy)&&i.length>0&&(1===i.length?r+="'displayOrderBy':'"+i[0]+"',":r+="'displayOrderBy':'"+i[a]+"',"),(t=e.fieldValuesDisplayFilter)&&(r+="'fieldValuesDisplayFilter':"+ce.toJSON(t)+","),e.joinItems&&e.joinItems.length>0&&e.joinItems[a]&&(r+="'joinItems':["+ce.toJSON(e.joinItems[a])+"],"),e.datasetNames&&e.dataSourceNames){var l=e.datasetNames[a]?a:e.datasetNames.length-1,u=e.dataSourceNames[a]?a:e.dataSourceNames.length-1;r+="'datasetInfo': {'name': '"+e.datasetNames[l]+"','dataSourceName': '"+e.dataSourceNames[u]+"'}},"}else r+="},"}e.themes&&e.themes.length>0&&(r=r.substring(0,r.length-1)),r+="]},";var c=this.url.split("/");return r+="'name': '"+c[c.length-2]+"'}]"}}])&&KS(t.prototype,r),n&&KS(t,n),Object.defineProperty(t,"prototype",{writable:!1}),i}();function i_(e){"@babel/helpers - typeof";return(i_="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function a_(e,t){for(var r=0;r3&&void 0!==arguments[3]?arguments[3]:{};return t=ln.appendCredential(t),n.crossOrigin=this.options.crossOrigin,n.headers=this.options.headers,an.commit(e,t,r,n).then(function(e){return e.json()})}}])&&fk(t.prototype,r),n&&fk(t,n),Object.defineProperty(t,"prototype",{writable:!1}),e}();function hk(e){"@babel/helpers - typeof";return(hk="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function yk(e,t){for(var r=0;re.length)&&(t=e.length);for(var r=0,n=new Array(t);rt.geoFence.radius&&(t.outOfGeoFence&&t.outOfGeoFence(e),t.events.triggerEvent("outOfGeoFence",{data:e})),r})}},{key:"_distance",value:function(e,t,r,n){return Math.sqrt((e-r)*(e-r)+(t-n)*(t-n))}},{key:"_getMeterPerMapUnit",value:function(e){var t;return"meter"===e?t=1:"degree"===e&&(t=2*Math.PI*6378137/360),t}}])&&Lk(t.prototype,r),n&&Lk(t,n),Object.defineProperty(t,"prototype",{writable:!1}),e}();function Nk(e){"@babel/helpers - typeof";return(Nk="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Fk(e,t){for(var r=0;ri&&(i=e+s+100,n.width=i,r=!0),t+l>a&&(a=t+l+100,n.height=a,r=!0),e<-s&&(i+=s=100*Math.ceil(-e/100),n.width=i,r=!0),t<-l&&(a+=l=100*Math.ceil(-t/100),n.height=a,r=!0),r&&o.translate(s,l)}},{key:"getPixelOffset",value:function(){return{x:this._offsetX,y:this._offsetY}}},{key:"indexOf",value:function(e,t){if(e.indexOf)return e.indexOf(t);for(var r=0,n=e.length;r1)for(var o=0,i=n-1;o1?Math.ceil(e):e}),t.indexOf("hex")>-1)return"#"+((1<<24)+(e[0]<<16)+(e[1]<<8)+ +e[2]).toString(16).slice(1);if(t.indexOf("hs")>-1){var r=this.map(e.slice(1,3),function(e){return e+"%"});e[1]=r[0],e[2]=r[1]}return t.indexOf("a")>-1?(3===e.length&&e.push(1),e[3]=this.adjust(e[3],[0,1]),t+"("+e.slice(0,4).join(",")+")"):t+"("+e.slice(0,3).join(",")+")"}}},{key:"toArray",value:function(e){(e=this.trim(e)).indexOf("rgba")<0&&(e=this.toRGBA(e));var t=[],r=0;return e.replace(/[\d.]+/g,function(e){r<3?e|=0:e=+e,t[r++]=e}),t}},{key:"convert",value:function(e,t){if(!this.isCalculableColor(e))return e;var r=this.getData(e),n=r[3];return void 0===n&&(n=1),e.indexOf("hsb")>-1?r=this._HSV_2_RGB(r):e.indexOf("hsl")>-1&&(r=this._HSL_2_RGB(r)),t.indexOf("hsb")>-1||t.indexOf("hsv")>-1?r=this._RGB_2_HSB(r):t.indexOf("hsl")>-1&&(r=this._RGB_2_HSL(r)),r[3]=n,this.toColor(r,t)}},{key:"toRGBA",value:function(e){return this.convert(e,"rgba")}},{key:"toRGB",value:function(e){return this.convert(e,"rgb")}},{key:"toHex",value:function(e){return this.convert(e,"hex")}},{key:"toHSVA",value:function(e){return this.convert(e,"hsva")}},{key:"toHSV",value:function(e){return this.convert(e,"hsv")}},{key:"toHSBA",value:function(e){return this.convert(e,"hsba")}},{key:"toHSB",value:function(e){return this.convert(e,"hsb")}},{key:"toHSLA",value:function(e){return this.convert(e,"hsla")}},{key:"toHSL",value:function(e){return this.convert(e,"hsl")}},{key:"toName",value:function(e){for(var t in this._nameColors)if(this.toHex(this._nameColors[t])===this.toHex(e))return t;return null}},{key:"trim",value:function(e){return String(e).replace(/\s+/g,"")}},{key:"normalize",value:function(e){if(this._nameColors[e]&&(e=this._nameColors[e]),e=(e=this.trim(e)).replace(/hsv/i,"hsb"),/^#[\da-f]{3}$/i.test(e)){var t=(3840&(e=parseInt(e.slice(1),16)))<<8,r=(240&e)<<4,n=15&e;e="#"+((1<<24)+(t<<4)+t+(r<<4)+r+(n<<4)+n).toString(16).slice(1)}return e}},{key:"lift",value:function(e,t){if(!this.isCalculableColor(e))return e;var r=t>0?1:-1;void 0===t&&(t=0),t=Math.abs(t)>1?1:Math.abs(t),e=this.toRGB(e);for(var n=this.getData(e),o=0;o<3;o++)n[o]=1===r?n[o]*(1-t)|0:(255-n[o])*t+n[o]|0;return"rgb("+n.join(",")+")"}},{key:"reverse",value:function(e){if(!this.isCalculableColor(e))return e;var t=this.getData(this.toRGBA(e));return t=this.map(t,function(e){return 255-e}),this.toColor(t,"rgb")}},{key:"mix",value:function(e,t,r){if(!this.isCalculableColor(e)||!this.isCalculableColor(t))return e;void 0===r&&(r=.5);for(var n=2*(r=1-this.adjust(r,[0,1]))-1,o=this.getData(this.toRGBA(e)),i=this.getData(this.toRGBA(t)),a=o[3]-i[3],s=((n*a==-1?n:(n+a)/(1+n*a))+1)/2,l=1-s,u=[],c=0;c<3;c++)u[c]=o[c]*s+i[c]*l;var f=o[3]*r+i[3]*(1-r);return f=Math.max(0,Math.min(1,f)),1===o[3]&&1===i[3]?this.toColor(u,"rgb"):(u[3]=f,this.toColor(u,"rgba"))}},{key:"random",value:function(){return"#"+Math.random().toString(16).slice(2,8)}},{key:"getData",value:function(t){var r,n,o=(t=this.normalize(t)).match(this.colorRegExp);if(null===o)throw new Error("The color format error");var i,a=[];if(o[2])i=[(r=o[2].replace("#","").split(""))[0]+r[1],r[2]+r[3],r[4]+r[5]],a=this.map(i,function(t){return e.prototype.adjust.call(this,parseInt(t,16),[0,255])});else if(o[4]){var s=o[4].split(",");n=s[3],i=s.slice(0,3),a=this.map(i,function(t){return t=Math.floor(t.indexOf("%")>0?2.55*parseInt(t,0):t),e.prototype.adjust.call(this,t,[0,255])}),void 0!==n&&a.push(this.adjust(parseFloat(n),[0,1]))}else if(o[5]||o[6]){var l=(o[5]||o[6]).split(","),u=parseInt(l[0],0)/360,c=l[1],f=l[2];n=l[3],(a=this.map([c,f],function(t){return e.prototype.adjust.call(this,parseFloat(t)/100,[0,1])})).unshift(u),void 0!==n&&a.push(this.adjust(parseFloat(n),[0,1]))}return a}},{key:"alpha",value:function(e,t){if(!this.isCalculableColor(e))return e;null===t&&(t=1);var r=this.getData(this.toRGBA(e));return r[3]=this.adjust(Number(t).toFixed(4),[0,1]),this.toColor(r,"rgba")}},{key:"map",value:function(e,t){if("function"!=typeof t)throw new TypeError;for(var r=e?e.length:0,n=0;n=t[1]&&(e=t[1]),e}},{key:"isCalculableColor",value:function(e){return e instanceof Array||"string"==typeof e}},{key:"_HSV_2_RGB",value:function(e){var t,r,n,o=e[0],i=e[1],a=e[2];if(0===i)t=255*a,r=255*a,n=255*a;else{var s=6*o;6===s&&(s=0);var l=0|s,u=a*(1-i),c=a*(1-i*(s-l)),f=a*(1-i*(1-(s-l))),p=0,h=0,y=0;0===l?(p=a,h=f,y=u):1===l?(p=c,h=a,y=u):2===l?(p=u,h=a,y=f):3===l?(p=u,h=c,y=a):4===l?(p=f,h=u,y=a):(p=a,h=u,y=c),t=255*p,r=255*h,n=255*y}return[t,r,n]}},{key:"_HSL_2_RGB",value:function(e){var t,r,n,o=e[0],i=e[1],a=e[2];if(0===i)t=255*a,r=255*a,n=255*a;else{var s,l=2*a-(s=a<.5?a*(1+i):a+i-i*a);t=255*this._HUE_2_RGB(l,s,o+1/3),r=255*this._HUE_2_RGB(l,s,o),n=255*this._HUE_2_RGB(l,s,o-1/3)}return[t,r,n]}},{key:"_HUE_2_RGB",value:function(e,t,r){return r<0&&(r+=1),r>1&&(r-=1),6*r<1?e+6*(t-e)*r:2*r<1?t:3*r<2?e+(t-e)*(2/3-r)*6:e}},{key:"_RGB_2_HSB",value:function(e){var t,r,n=e[0]/255,o=e[1]/255,i=e[2]/255,a=Math.min(n,o,i),s=Math.max(n,o,i),l=s-a,u=s;if(0===l)t=0,r=0;else{r=l/s;var c=((s-n)/6+l/2)/l,f=((s-o)/6+l/2)/l,p=((s-i)/6+l/2)/l;n===s?t=p-f:o===s?t=1/3+c-p:i===s&&(t=2/3+f-c),t<0&&(t+=1),t>1&&(t-=1)}return[t*=360,r*=100,u*=100]}},{key:"_RGB_2_HSL",value:function(e){var t,r,n=e[0]/255,o=e[1]/255,i=e[2]/255,a=Math.min(n,o,i),s=Math.max(n,o,i),l=s-a,u=(s+a)/2;if(0===l)t=0,r=0;else{r=u<.5?l/(s+a):l/(2-s-a);var c=((s-n)/6+l/2)/l,f=((s-o)/6+l/2)/l,p=((s-i)/6+l/2)/l;n===s?t=p-f:o===s?t=1/3+c-p:i===s&&(t=2/3+f-c),t<0&&(t+=1),t>1&&(t-=1)}return[t*=360,r*=100,u*=100]}}])&&Bk(t.prototype,r),n&&Bk(t,n),Object.defineProperty(t,"prototype",{writable:!1}),e}();function Uk(e,t){for(var r=0;r=t)if("RANGE"===r)for(o=0;o=0&&this.getSqrtInterval(e,r):"logarithm"===t?this.getMin(e)>0&&this.getGeometricProgression(e,r):void 0}},{key:"getSum",value:function(e){return this.getInstance(e).sum()}},{key:"getMax",value:function(e){return this.getInstance(e).max()}},{key:"getMin",value:function(e){return this.getInstance(e).min()}},{key:"getMean",value:function(e){return this.getInstance(e).mean()}},{key:"getMedian",value:function(e){return this.getInstance(e).median()}},{key:"getTimes",value:function(e){return e.length}},{key:"getEqInterval",value:function(e,t){return this.getInstance(e).getClassEqInterval(t)}},{key:"getJenks",value:function(e,t){return this.getInstance(e).getClassJenks(t)}},{key:"getSqrtInterval",value:function(e,t){return e=e.map(function(e){return Math.sqrt(e)}),this.getInstance(e).getClassEqInterval(t).map(function(e){return e*e})}},{key:"getGeometricProgression",value:function(e,t){return this.getInstance(e).getClassGeometricProgression(t)}}],(r=null)&&Jk(t.prototype,r),n&&Jk(t,n),Object.defineProperty(t,"prototype",{writable:!1}),e}(),Hk=function(e){var t;if(e===l.METER)t=1;else if(e===l.DEGREE)t=2*Math.PI*6378137/360;else if(e===l.KILOMETER)t=.001;else if(e===l.INCH)t=1/.025399999918;else{if(e!==l.FOOT)return t;t=.3048}return t};function Wk(e,t,r){return 1/(e*t*(1/.0254)*Hk(r))}var Yk=r(820),Xk=r.n(Yk);function Qk(e){"@babel/helpers - typeof";return(Qk="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Zk(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Kk(e,t){for(var r=0;ru&&(l[o]=l[o].slice(n-u),u=n)}function d(e){var t,i,a,s;if(e instanceof Function)return e.call(c.parsers);if("string"==typeof e)t=r.charAt(n)===e?e:null,i=1,y();else{if(y(),!(t=e.exec(l[o])))return null;i=t[0].length}if(t){var f=n+=i;for(s=n+l[o].length-i;n=0&&"\n"!==n.charAt(a);a--)e.column++;return new Error([e.filename,e.line,e.column,e.message].join(";"))}return this.env=t=t||{},this.env.filename=this.env.filename||null,this.env.inputs=this.env.inputs||{},c={parse:function(i){var a,c=null;if(n=o=u=s=0,l=[],r=i.replace(/\r\n/g,"\n"),t.filename&&(f.env.inputs[t.filename]=r),l=function(e){for(var t,n,o,i,a=0,s=/(?:@\{[\w-]+\}|[^"'`\{\}\/\(\)\\])+/g,l=/\/\*(?:[^*]|\*+[^\/*])*\*+\/|\/\/.*/g,u=/"((?:[^"\\\r\n]|\\.)*)"|'((?:[^'\\\r\n]|\\.)*)'|`((?:[^`]|\\.)*)`/g,f=0,p=e[0],h=0;h0?"missing closing `}`":"missing opening `{`"}),e.map(function(e){return e.join("")})}([[]]),c)throw b(c);var p=function(e,t){var r=e.specificity,n=t.specificity;return r[0]!=n[0]?n[0]-r[0]:r[1]!=n[1]?n[1]-r[1]:r[2]!=n[2]?n[2]-r[2]:n[3]-r[3]};return(a=new e.Tree.Ruleset([],d(this.parsers.primary))).root=!0,a.toList=function(e){e.error=function(t){e.errors||(e.errors=new Error("")),e.errors.message?e.errors.message+="\n"+b(t).message:e.errors.message=b(t).message},e.frames=e.frames||[];var t=this.flatten([],[],e);return t.sort(p),t},a},parsers:{primary:function(){for(var e,t=[];(e=d(this.rule)||d(this.ruleset)||d(this.comment))||d(/^[\s\n]+/)||(e=d(this.invalid));)e&&t.push(e);return t},invalid:function(){var t=d(/^[^;\n]*[;\n]/);if(t)return new e.Tree.Invalid(t,a)},comment:function(){var t;if("/"===r.charAt(n))return"/"===r.charAt(n+1)?new e.Tree.Comment(d(/^\/\/.*/),!0):(t=d(/^\/\*(?:[^*]|\*+[^\/*])*\*+\/\n?/))?new e.Tree.Comment(t):void 0},entities:{quoted:function(){if('"'===r.charAt(n)||"'"===r.charAt(n)){var t=d(/^"((?:[^"\\\r\n]|\\.)*)"|'((?:[^'\\\r\n]|\\.)*)'/);return t?new e.Tree.Quoted(t[1]||t[2]):void 0}},field:function(){if(d("[")){var t=d(/(^[^\]]+)/);if(d("]"))return t?new e.Tree.Field(t[1]):void 0}},comparison:function(){var e=d(/^=~|=|!=|<=|>=|<|>/);if(e)return e},keyword:function(){var t=d(/^[A-Za-z\u4e00-\u9fa5-]+[A-Za-z-0-9\u4e00-\u9fa5_]*/);if(t)return new e.Tree.Keyword(t)},call:function(){var t,r;if(t=/^([\w\-]+|%)\(/.exec(l[o])){if("url"===(t=t[1]))return null;n+=t.length;if(d("("),r=d(this.entities.arguments),d(")"))return t?new e.Tree.Call(t,r,n):void 0}},arguments:function(){for(var e,t=[];e=d(this.expression);){t.push(e);if(!d(","))break}return t},literal:function(){return d(this.entities.dimension)||d(this.entities.keywordcolor)||d(this.entities.hexcolor)||d(this.entities.quoted)},url:function(){var t;if("u"===r.charAt(n)&&d(/^url\(/)){t=d(this.entities.quoted)||d(this.entities.variable)||d(/^[\-\w%@_match\/.&=:;#+?~]+/)||"";return d(")")?new e.Tree.URL(void 0!==t.value||t instanceof e.Tree.Variable?t:new e.Tree.Quoted(t)):new e.Tree.Invalid(t,a,"Missing closing ) in URL.")}},variable:function(){var o,i=n;if("@"===r.charAt(n)&&(o=d(/^@[\w-]+/)))return new e.Tree.Variable(o,i,t.filename)},hexcolor:function(){var t;if("#"===r.charAt(n)&&(t=d(/^#([a-fA-F0-9]{6}|[a-fA-F0-9]{3})/)))return new e.Tree.Color(t[1])},keywordcolor:function(){var t=l[o].match(/^[a-z]+/);if(t&&t[0]in e.Tree.Reference.data.colors)return new e.Tree.Color(e.Tree.Reference.data.colors[d(/^[a-z]+/)])},dimension:function(){var t=r.charCodeAt(n);if(!(t>57||t<45||47===t)){var o=d(/^(-?\d*\.?\d+(?:[eE][-+]?\d+)?)(\%|\w+)?/);return o?new e.Tree.Dimension(o[1],o[2],a):void 0}}},variable:function(){var e;if("@"===r.charAt(n)&&(e=d(/^(@[\w-]+)\s*:/)))return e[1]},entity:function(){var e=d(this.entities.call)||d(this.entities.literal),t=d(this.entities.field)||d(this.entities.variable),r=d(this.entities.url)||d(this.entities.keyword);return e||t||r},end:function(){var e;return d(";")||("string"==typeof(e="}")?r.charAt(n)===e:!!e.test(l[o]))},element:function(){var t=d(/^(?:[.#][\w\u4e00-\u9fa5\-]+|\*|Map)/);if(t)return new e.Tree.Element(t)},attachment:function(){var e=d(/^::([\w\-]+(?:\/[\w\-]+)*)/);if(e)return e[1]},selector:function(){for(var t,o,i,s,l,u=[],c=new e.Tree.Filterset,f=[],p=0,h=0;(i=d(this.element))||(l=d(this.zoom))||(s=d(this.filter))||(t=d(this.attachment));){if(p++,i)u.push(i);else if(l)f.push(l),h++;else if(s){var y=c.add(s);if(y)throw b({message:y,index:n-1});h++}else{if(o)throw b({message:"Encountered second attachment name.",index:n-1});o=t}var v=r.charAt(n);if("{"===v||"}"===v||";"===v||","===v)break}if(p)return new e.Tree.Selector(c,f,u,o,h,a)},filter:function(){p();var r,n,o;if(d("[")&&(r=d(/^[a-zA-Z0-9\-_]+/)||d(this.entities.quoted)||d(this.entities.variable)||d(this.entities.keyword)||d(this.entities.field))&&(r instanceof e.Tree.Quoted&&(r=new e.Tree.Field(r.toString())),(n=d(this.entities.comparison))&&(o=d(this.entities.quoted)||d(this.entities.variable)||d(this.entities.dimension)||d(this.entities.keyword)||d(this.entities.field)))){if(!d("]"))throw b({message:"Missing closing ] of filter.",index:a-1});return r.is||(r=new e.Tree.Field(r)),new e.Tree.Filter(r,n,o,a,t.filename)}},zoom:function(){p();var t,r;if(d(/^\[\s*zoom/g)&&(t=d(this.entities.comparison))&&(r=d(this.entities.variable)||d(this.entities.dimension))&&d("]"))return new e.Tree.Zoom(t,r,a);h()},block:function(){var e;if(d("{")&&(e=d(this.primary))&&d("}"))return e},ruleset:function(){var t,r,n=[];for(p();t=d(this.selector);){for(n.push(t);d(this.comment););if(!d(","))break;for(;d(this.comment););}if(t)for(;d(this.comment););if(n.length>0&&(r=d(this.block))){if(1===n.length&&n[0].elements.length&&"Map"===n[0].elements[0].value){var o=new e.Tree.Ruleset(n,r);return o.isMap=!0,o}return new e.Tree.Ruleset(n,r)}h()},rule:function(){var o,i,l=r.charAt(n);if(p(),"."!==l&&"#"!==l&&(o=d(this.variable)||d(this.property))){if((i=d(this.value))&&d(this.end))return new e.Tree.Rule(o,i,a,t.filename);s=n,h()}},font:function(){for(var t,r=[],n=[];t=d(this.entity);)n.push(t);if(r.push(new e.Tree.Expression(n)),d(","))for(;(t=d(this.expression))&&(r.push(t),d(",")););return new e.Tree.Value(r)},value:function(){for(var t,r=[];(t=d(this.expression))&&(r.push(t),d(",")););return r.length>1?new e.Tree.Value(r.map(function(e){return e.value[0]})):1===r.length?new e.Tree.Value(r):void 0},sub:function(){var e;if(d("(")&&(e=d(this.expression))&&d(")"))return e},multiplication:function(){var t,r,n,o;if(t=d(this.operand)){for(;(n=d("/")||d("*")||d("%"))&&(r=d(this.operand));)o=new e.Tree.Operation(n,[o||t,r],a);return o||t}},addition:function(){var t,o,i,s;if(t=d(this.multiplication)){for(;(i=d(/^[-+]\s+/)||" "!=r.charAt(n-1)&&(d("+")||d("-")))&&(o=d(this.multiplication));)s=new e.Tree.Operation(i,[s||t,o],a);return s||t}},operand:function(){return d(this.sub)||d(this.entity)},expression:function(){for(var t,r=[];t=d(this.addition)||d(this.entity);)r.push(t);if(r.length>0)return new e.Tree.Expression(r)},property:function(){var e=d(/^(([a-z][-a-z_0-9]*\/)?\*?-?[-a-z_0-9]+)\s*:/);if(e)return e[1]}}}}},{key:"parse",value:function(e){var t=this.parser;return this.ruleSet=t.parse(e)}},{key:"toShaders",value:function(){if(this.ruleSet){var e=this.ruleSet;if(e){var t=e.toList(this.env);t.reverse();var r={},n=[];this._toShaders(r,n,t);for(var o=[],i={},a=0,s=t.length;a=0){if(!t.featureFilter){var i=o+n.length,a=r.indexOf(")",i+1),s="featureId&&(featureId"+r.substring(i,a)+")";Object.defineProperty(t,"featureFilter",{configurable:!0,enumerable:!1,value:function(e){return!!s}})}return{property:h,getValue:Function("attributes","zoom","seftFilter","var _value = null; var isExcute=typeof seftFilter=='function'?sefgFilter():seftFilter;if(isExcute){"+r+";} return _value; ")}}return{property:h,getValue:Function("attributes","zoom","var _value = null;"+r+"; return _value; ")}}(c[h],f);Object.defineProperty(f,"attachment",{configurable:!0,enumerable:!1,value:u}),Object.defineProperty(f,"elements",{configurable:!0,enumerable:!1,value:l.elements}),o.push(f),i[n[a]]=!0}Object.defineProperty(f,"zoom",{configurable:!0,enumerable:!1,value:l.zoom})}return o}}return null}},{key:"_toShaders",value:function(t,r,n){for(var o=0,i=n.length;o= minzoom - 1e-6 and scale < maxzoom + 1e-6"},maxzoom:{"default-value":"1.79769e+308",type:"float","default-meaning":"The layer will be visible at the maximum possible scale",doc:"The maximum scale denominator that this layer will be visible at. The default is the numeric limit of the C++ double type, which may vary slightly by system, but is likely a massive number like 1.79769e+308 and ensures that this layer will always be visible unless the value is reduced. A layer's visibility is determined by whether its status is true and if the Map scale >= minzoom - 1e-6 and scale < maxzoom + 1e-6"},queryable:{"default-value":!1,type:"boolean","default-meaning":"The layer will not be available for the direct querying of data values",doc:"This property was added for GetFeatureInfo/WMS compatibility and is rarely used. It is off by default meaning that in a WMS context the layer will not be able to be queried unless the property is explicitly set to true"},"clear-label-cache":{"default-value":!1,type:"boolean","default-meaning":"The renderer's collision detector cache (used for avoiding duplicate labels and overlapping markers) will not be cleared immediately before processing this layer",doc:"This property, by default off, can be enabled to allow a user to clear the collision detector cache before a given layer is processed. This may be desirable to ensure that a given layers data shows up on the map even if it normally would not because of collisions with previously rendered labels or markers"},"group-by":{"default-value":"",type:"string","default-meaning":"No special layer grouping will be used during rendering",doc:"https://github.com/mapnik/mapnik/wiki/Grouped-rendering"},"buffer-size":{"default-value":"0",type:"float","default-meaning":"No buffer will be used",doc:"Extra tolerance around the Layer extent (in pixels) used to when querying and (potentially) clipping the layer data during rendering"},"maximum-extent":{"default-value":"none",type:"bbox","default-meaning":"No clipping extent will be used",doc:"An extent to be used to limit the bounds used to query this specific layer data during rendering. Should be minx, miny, maxx, maxy in the coordinates of the Layer."}},symbolizers:{"*":{"image-filters":{css:"image-filters","default-value":"none","default-meaning":"no filters",type:"functions",functions:[["agg-stack-blur",2],["emboss",0],["blur",0],["gray",0],["sobel",0],["edge-detect",0],["x-gradient",0],["y-gradient",0],["invert",0],["sharpen",0]],doc:"A list of image filters."},"comp-op":{css:"comp-op","default-value":"src-over","default-meaning":"add the current layer on top of other layers",doc:"Composite operation. This defines how this layer should behave relative to layers atop or below it.",type:["clear","src","dst","src-over","dst-over","src-in","dst-in","src-out","dst-out","src-atop","dst-atop","xor","plus","minus","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","contrast","invert","invert-rgb","grain-merge","grain-extract","hue","saturation","color","value"]},opacity:{css:"opacity",type:"float",doc:"An alpha value for the style (which means an alpha applied to all features in separate buffer and then composited back to main buffer)","default-value":1,"default-meaning":"no separate buffer will be used and no alpha will be applied to the style after rendering"}},map:{"background-color":{css:"background-color","default-value":"none","default-meaning":"transparent",type:"color",doc:"Map Background color"},"background-image":{css:"background-image",type:"uri","default-value":"","default-meaning":"transparent",doc:"An image that is repeated below all features on a map as a background.",description:"Map Background image"},srs:{css:"srs",type:"string","default-value":"+proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs","default-meaning":"The proj4 literal of EPSG:4326 is assumed to be the Map's spatial reference and all data from layers within this map will be plotted using this coordinate system. If any layers do not declare an srs value then they will be assumed to be in the same srs as the Map and not transformations will be needed to plot them in the Map's coordinate space",doc:"Map spatial reference (proj4 string)"},"buffer-size":{css:"buffer-size","default-value":"0",type:"float","default-meaning":"No buffer will be used",doc:'Extra tolerance around the map (in pixels) used to ensure labels crossing tile boundaries are equally rendered in each tile (e.g. cut in each tile). Not intended to be used in combination with "avoid-edges".'},"maximum-extent":{css:"","default-value":"none",type:"bbox","default-meaning":"No clipping extent will be used",doc:"An extent to be used to limit the bounds used to query all layers during rendering. Should be minx, miny, maxx, maxy in the coordinates of the Map."},base:{css:"base","default-value":"","default-meaning":"This base path defaults to an empty string meaning that any relative paths to files referenced in styles or layers will be interpreted relative to the application process.",type:"string",doc:"Any relative paths used to reference files will be understood as relative to this directory path if the map is loaded from an in memory object rather than from the filesystem. If the map is loaded from the filesystem and this option is not provided it will be set to the directory of the stylesheet."},"paths-from-xml":{css:"","default-value":!0,"default-meaning":"Paths read from XML will be interpreted from the location of the XML",type:"boolean",doc:"value to control whether paths in the XML will be interpreted from the location of the XML or from the working directory of the program that calls load_map()"},"minimum-version":{css:"","default-value":"none","default-meaning":"Mapnik version will not be detected and no error will be thrown about compatibility",type:"string",doc:"The minumum Mapnik version (e.g. 0.7.2) needed to use certain functionality in the stylesheet"},"font-directory":{css:"font-directory",type:"uri","default-value":"none","default-meaning":"No map-specific fonts will be registered",doc:"Path to a directory which holds fonts which should be registered when the Map is loaded (in addition to any fonts that may be automatically registered)."}},polygon:{fill:{css:"polygon-fill",type:"color","default-value":"rgba(128,128,128,1)","default-meaning":"gray and fully opaque (alpha = 1), same as rgb(128,128,128)",doc:"Fill color to assign to a polygon"},"fill-opacity":{css:"polygon-opacity",type:"float",doc:"The opacity of the polygon","default-value":1,"default-meaning":"opaque"},gamma:{css:"polygon-gamma",type:"float","default-value":1,"default-meaning":"fully antialiased",range:"0-1",doc:"Level of antialiasing of polygon edges"},"gamma-method":{css:"polygon-gamma-method",type:["power","linear","none","threshold","multiply"],"default-value":"power","default-meaning":"pow(x,gamma) is used to calculate pixel gamma, which produces slightly smoother line and polygon antialiasing than the 'linear' method, while other methods are usually only used to disable AA",doc:"An Antigrain Geometry specific rendering hint to control the quality of antialiasing. Under the hood in Mapnik this method is used in combination with the 'gamma' value (which defaults to 1). The methods are in the AGG source at https://github.com/mapnik/mapnik/blob/master/deps/agg/include/agg_gamma_functions.h"},clip:{css:"polygon-clip",type:"boolean","default-value":!0,"default-meaning":"geometry will be clipped to map bounds before rendering",doc:"geometries are clipped to map bounds by default for best rendering performance. In some cases users may wish to disable this to avoid rendering artifacts."},smooth:{css:"polygon-smooth",type:"float","default-value":0,"default-meaning":"no smoothing",range:"0-1",doc:"Smooths out geometry angles. 0 is no smoothing, 1 is fully smoothed. Values greater than 1 will produce wild, looping geometries."},"geometry-transform":{css:"polygon-geometry-transform",type:"functions","default-value":"none","default-meaning":"geometry will not be transformed",doc:"Allows transformation functions to be applied to the geometry.",functions:[["matrix",6],["translate",2],["scale",2],["rotate",3],["skewX",1],["skewY",1]]},"comp-op":{css:"polygon-comp-op","default-value":"src-over","default-meaning":"add the current symbolizer on top of other symbolizer",doc:"Composite operation. This defines how this symbolizer should behave relative to symbolizers atop or below it.",type:["clear","src","dst","src-over","dst-over","src-in","dst-in","src-out","dst-out","src-atop","dst-atop","xor","plus","minus","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","contrast","invert","invert-rgb","grain-merge","grain-extract","hue","saturation","color","value"]}},line:{stroke:{css:"line-color","default-value":"rgba(0,0,0,1)",type:"color","default-meaning":"black and fully opaque (alpha = 1), same as rgb(0,0,0)",doc:"The color of a drawn line"},"stroke-width":{css:"line-width","default-value":1,type:"float",doc:"The width of a line in pixels"},"stroke-opacity":{css:"line-opacity","default-value":1,type:"float","default-meaning":"opaque",doc:"The opacity of a line"},"stroke-linejoin":{css:"line-join","default-value":"miter",type:["miter","round","bevel"],doc:"The behavior of lines when joining"},"stroke-linecap":{css:"line-cap","default-value":"butt",type:["butt","round","square"],doc:"The display of line endings"},"stroke-gamma":{css:"line-gamma",type:"float","default-value":1,"default-meaning":"fully antialiased",range:"0-1",doc:"Level of antialiasing of stroke line"},"stroke-gamma-method":{css:"line-gamma-method",type:["power","linear","none","threshold","multiply"],"default-value":"power","default-meaning":"pow(x,gamma) is used to calculate pixel gamma, which produces slightly smoother line and polygon antialiasing than the 'linear' method, while other methods are usually only used to disable AA",doc:"An Antigrain Geometry specific rendering hint to control the quality of antialiasing. Under the hood in Mapnik this method is used in combination with the 'gamma' value (which defaults to 1). The methods are in the AGG source at https://github.com/mapnik/mapnik/blob/master/deps/agg/include/agg_gamma_functions.h"},"stroke-dasharray":{css:"line-dasharray",type:"numbers",doc:"A pair of length values [a,b], where (a) is the dash length and (b) is the gap length respectively. More than two values are supported for more complex patterns.","default-value":"none","default-meaning":"solid line"},"stroke-dashoffset":{css:"line-dash-offset",type:"numbers",doc:"valid parameter but not currently used in renderers (only exists for experimental svg support in Mapnik which is not yet enabled)","default-value":"none","default-meaning":"solid line"},"stroke-miterlimit":{css:"line-miterlimit",type:"float",doc:"The limit on the ratio of the miter length to the stroke-width. Used to automatically convert miter joins to bevel joins for sharp angles to avoid the miter extending beyond the thickness of the stroking path. Normally will not need to be set, but a larger value can sometimes help avoid jaggy artifacts.","default-value":4,"default-meaning":"Will auto-convert miters to bevel line joins when theta is less than 29 degrees as per the SVG spec: 'miterLength / stroke-width = 1 / sin ( theta / 2 )'"},clip:{css:"line-clip",type:"boolean","default-value":!0,"default-meaning":"geometry will be clipped to map bounds before rendering",doc:"geometries are clipped to map bounds by default for best rendering performance. In some cases users may wish to disable this to avoid rendering artifacts."},smooth:{css:"line-smooth",type:"float","default-value":0,"default-meaning":"no smoothing",range:"0-1",doc:"Smooths out geometry angles. 0 is no smoothing, 1 is fully smoothed. Values greater than 1 will produce wild, looping geometries."},offset:{css:"line-offset",type:"float","default-value":0,"default-meaning":"no offset",doc:"Offsets a line a number of pixels parallel to its actual path. Postive values move the line left, negative values move it right (relative to the directionality of the line)."},rasterizer:{css:"line-rasterizer",type:["full","fast"],"default-value":"full",doc:"Exposes an alternate AGG rendering method that sacrifices some accuracy for speed."},"geometry-transform":{css:"line-geometry-transform",type:"functions","default-value":"none","default-meaning":"geometry will not be transformed",doc:"Allows transformation functions to be applied to the geometry.",functions:[["matrix",6],["translate",2],["scale",2],["rotate",3],["skewX",1],["skewY",1]]},"comp-op":{css:"line-comp-op","default-value":"src-over","default-meaning":"add the current symbolizer on top of other symbolizer",doc:"Composite operation. This defines how this symbolizer should behave relative to symbolizers atop or below it.",type:["clear","src","dst","src-over","dst-over","src-in","dst-in","src-out","dst-out","src-atop","dst-atop","xor","plus","minus","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","contrast","invert","invert-rgb","grain-merge","grain-extract","hue","saturation","color","value"]}},markers:{file:{css:"marker-file",doc:"An SVG file that this marker shows at each placement. If no file is given, the marker will show an ellipse.","default-value":"","default-meaning":"An ellipse or circle, if width equals height",type:"uri"},opacity:{css:"marker-opacity",doc:"The overall opacity of the marker, if set, overrides both the opacity of both the fill and stroke","default-value":1,"default-meaning":"The stroke-opacity and fill-opacity will be used",type:"float"},"fill-opacity":{css:"marker-fill-opacity",doc:"The fill opacity of the marker","default-value":1,"default-meaning":"opaque",type:"float"},stroke:{css:"marker-line-color",doc:"The color of the stroke around a marker shape.","default-value":"black",type:"color"},"stroke-width":{css:"marker-line-width",doc:"The width of the stroke around a marker shape, in pixels. This is positioned on the boundary, so high values can cover the area itself.",type:"float"},"stroke-opacity":{css:"marker-line-opacity","default-value":1,"default-meaning":"opaque",doc:"The opacity of a line",type:"float"},placement:{css:"marker-placement",type:["point","line","interior"],"default-value":"point","default-meaning":"Place markers at the center point (centroid) of the geometry",doc:"Attempt to place markers on a point, in the center of a polygon, or if markers-placement:line, then multiple times along a line. 'interior' placement can be used to ensure that points placed on polygons are forced to be inside the polygon interior"},"multi-policy":{css:"marker-multi-policy",type:["each","whole","largest"],"default-value":"each","default-meaning":"If a feature contains multiple geometries and the placement type is either point or interior then a marker will be rendered for each",doc:"A special setting to allow the user to control rendering behavior for 'multi-geometries' (when a feature contains multiple geometries). This setting does not apply to markers placed along lines. The 'each' policy is default and means all geometries will get a marker. The 'whole' policy means that the aggregate centroid between all geometries will be used. The 'largest' policy means that only the largest (by bounding box areas) feature will get a rendered marker (this is how text labeling behaves by default)."},"marker-type":{css:"marker-type",type:["arrow","ellipse"],"default-value":"ellipse",doc:"The default marker-type. If a SVG file is not given as the marker-file parameter, the renderer provides either an arrow or an ellipse (a circle if height is equal to width)"},width:{css:"marker-width","default-value":10,doc:"The width of the marker, if using one of the default types.",type:"expression"},height:{css:"marker-height","default-value":10,doc:"The height of the marker, if using one of the default types.",type:"expression"},fill:{css:"marker-fill","default-value":"blue",doc:"The color of the area of the marker.",type:"color"},"allow-overlap":{css:"marker-allow-overlap",type:"boolean","default-value":!1,doc:"Control whether overlapping markers are shown or hidden.","default-meaning":"Do not allow makers to overlap with each other - overlapping markers will not be shown."},"ignore-placement":{css:"marker-ignore-placement",type:"boolean","default-value":!1,"default-meaning":"do not store the bbox of this geometry in the collision detector cache",doc:"value to control whether the placement of the feature will prevent the placement of other features"},spacing:{css:"marker-spacing",doc:"Space between repeated labels","default-value":100,type:"float"},"max-error":{css:"marker-max-error",type:"float","default-value":.2,doc:"The maximum difference between actual marker placement and the marker-spacing parameter. Setting a high value can allow the renderer to try to resolve placement conflicts with other symbolizers."},transform:{css:"marker-transform",type:"functions",functions:[["matrix",6],["translate",2],["scale",2],["rotate",3],["skewX",1],["skewY",1]],"default-value":"","default-meaning":"No transformation",doc:"SVG transformation definition"},clip:{css:"marker-clip",type:"boolean","default-value":!0,"default-meaning":"geometry will be clipped to map bounds before rendering",doc:"geometries are clipped to map bounds by default for best rendering performance. In some cases users may wish to disable this to avoid rendering artifacts."},smooth:{css:"marker-smooth",type:"float","default-value":0,"default-meaning":"no smoothing",range:"0-1",doc:"Smooths out geometry angles. 0 is no smoothing, 1 is fully smoothed. Values greater than 1 will produce wild, looping geometries."},"geometry-transform":{css:"marker-geometry-transform",type:"functions","default-value":"none","default-meaning":"geometry will not be transformed",doc:"Allows transformation functions to be applied to the geometry.",functions:[["matrix",6],["translate",2],["scale",2],["rotate",3],["skewX",1],["skewY",1]]},"comp-op":{css:"marker-comp-op","default-value":"src-over","default-meaning":"add the current symbolizer on top of other symbolizer",doc:"Composite operation. This defines how this symbolizer should behave relative to symbolizers atop or below it.",type:["clear","src","dst","src-over","dst-over","src-in","dst-in","src-out","dst-out","src-atop","dst-atop","xor","plus","minus","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","contrast","invert","invert-rgb","grain-merge","grain-extract","hue","saturation","color","value"]}},shield:{name:{css:"shield-name",type:"expression",serialization:"content",doc:'Value to use for a shield"s text label. Data columns are specified using brackets like [column_name]'},file:{css:"shield-file",required:!0,type:"uri","default-value":"none",doc:"Image file to render behind the shield text"},"face-name":{css:"shield-face-name",type:"string",validate:"font",doc:"Font name and style to use for the shield text","default-value":"",required:!0},"unlock-image":{css:"shield-unlock-image",type:"boolean",doc:"This parameter should be set to true if you are trying to position text beside rather than on top of the shield image","default-value":!1,"default-meaning":"text alignment relative to the shield image uses the center of the image as the anchor for text positioning."},size:{css:"shield-size",type:"float",doc:"The size of the shield text in pixels"},fill:{css:"shield-fill",type:"color",doc:"The color of the shield text"},placement:{css:"shield-placement",type:["point","line","vertex","interior"],"default-value":"point",doc:"How this shield should be placed. Point placement attempts to place it on top of points, line places along lines multiple times per feature, vertex places on the vertexes of polygons, and interior attempts to place inside of polygons."},"avoid-edges":{css:"shield-avoid-edges",doc:"Tell positioning algorithm to avoid labeling near intersection edges.",type:"boolean","default-value":!1},"allow-overlap":{css:"shield-allow-overlap",type:"boolean","default-value":!1,doc:"Control whether overlapping shields are shown or hidden.","default-meaning":"Do not allow shields to overlap with other map elements already placed."},"minimum-distance":{css:"shield-min-distance",type:"float","default-value":0,doc:"Minimum distance to the next shield symbol, not necessarily the same shield."},spacing:{css:"shield-spacing",type:"float","default-value":0,doc:"The spacing between repeated occurrences of the same shield on a line"},"minimum-padding":{css:"shield-min-padding","default-value":0,doc:"Determines the minimum amount of padding that a shield gets relative to other shields",type:"float"},"wrap-width":{css:"shield-wrap-width",type:"unsigned","default-value":0,doc:"Length of a chunk of text in characters before wrapping text"},"wrap-before":{css:"shield-wrap-before",type:"boolean","default-value":!1,doc:"Wrap text before wrap-width is reached. If false, wrapped lines will be a bit longer than wrap-width."},"wrap-character":{css:"shield-wrap-character",type:"string","default-value":" ",doc:"Use this character instead of a space to wrap long names."},"halo-fill":{css:"shield-halo-fill",type:"color","default-value":"#FFFFFF","default-meaning":"white",doc:"Specifies the color of the halo around the text."},"halo-radius":{css:"shield-halo-radius",doc:"Specify the radius of the halo in pixels","default-value":0,"default-meaning":"no halo",type:"float"},"character-spacing":{css:"shield-character-spacing",type:"unsigned","default-value":0,doc:"Horizontal spacing between characters (in pixels). Currently works for point placement only, not line placement."},"line-spacing":{css:"shield-line-spacing",doc:"Vertical spacing between lines of multiline labels (in pixels)",type:"unsigned"},dx:{css:"shield-text-dx",type:"float",doc:"Displace text within shield by fixed amount, in pixels, +/- along the X axis. A positive value will shift the text right","default-value":0},dy:{css:"shield-text-dy",type:"float",doc:"Displace text within shield by fixed amount, in pixels, +/- along the Y axis. A positive value will shift the text down","default-value":0},"shield-dx":{css:"shield-dx",type:"float",doc:"Displace shield by fixed amount, in pixels, +/- along the X axis. A positive value will shift the text right","default-value":0},"shield-dy":{css:"shield-dy",type:"float",doc:"Displace shield by fixed amount, in pixels, +/- along the Y axis. A positive value will shift the text down","default-value":0},opacity:{css:"shield-opacity",type:"float",doc:"(Default 1.0) - opacity of the image used for the shield","default-value":1},"text-opacity":{css:"shield-text-opacity",type:"float",doc:"(Default 1.0) - opacity of the text placed on top of the shield","default-value":1},"horizontal-alignment":{css:"shield-horizontal-alignment",type:["left","middle","right","auto"],doc:"The shield's horizontal alignment from its centerpoint","default-value":"auto"},"vertical-alignment":{css:"shield-vertical-alignment",type:["top","middle","bottom","auto"],doc:"The shield's vertical alignment from its centerpoint","default-value":"middle"},"text-transform":{css:"shield-text-transform",type:["none","uppercase","lowercase","capitalize"],doc:"Transform the case of the characters","default-value":"none"},"justify-alignment":{css:"shield-justify-alignment",type:["left","center","right","auto"],doc:"Define how text in a shield's label is justified","default-value":"auto"},clip:{css:"shield-clip",type:"boolean","default-value":!0,"default-meaning":"geometry will be clipped to map bounds before rendering",doc:"geometries are clipped to map bounds by default for best rendering performance. In some cases users may wish to disable this to avoid rendering artifacts."},"comp-op":{css:"shield-comp-op","default-value":"src-over","default-meaning":"add the current symbolizer on top of other symbolizer",doc:"Composite operation. This defines how this symbolizer should behave relative to symbolizers atop or below it.",type:["clear","src","dst","src-over","dst-over","src-in","dst-in","src-out","dst-out","src-atop","dst-atop","xor","plus","minus","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","contrast","invert","invert-rgb","grain-merge","grain-extract","hue","saturation","color","value"]}},"line-pattern":{file:{css:"line-pattern-file",type:"uri","default-value":"none",required:!0,doc:"An image file to be repeated and warped along a line"},clip:{css:"line-pattern-clip",type:"boolean","default-value":!0,"default-meaning":"geometry will be clipped to map bounds before rendering",doc:"geometries are clipped to map bounds by default for best rendering performance. In some cases users may wish to disable this to avoid rendering artifacts."},smooth:{css:"line-pattern-smooth",type:"float","default-value":0,"default-meaning":"no smoothing",range:"0-1",doc:"Smooths out geometry angles. 0 is no smoothing, 1 is fully smoothed. Values greater than 1 will produce wild, looping geometries."},"geometry-transform":{css:"line-pattern-geometry-transform",type:"functions","default-value":"none","default-meaning":"geometry will not be transformed",doc:"Allows transformation functions to be applied to the geometry.",functions:[["matrix",6],["translate",2],["scale",2],["rotate",3],["skewX",1],["skewY",1]]},"comp-op":{css:"line-pattern-comp-op","default-value":"src-over","default-meaning":"add the current symbolizer on top of other symbolizer",doc:"Composite operation. This defines how this symbolizer should behave relative to symbolizers atop or below it.",type:["clear","src","dst","src-over","dst-over","src-in","dst-in","src-out","dst-out","src-atop","dst-atop","xor","plus","minus","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","contrast","invert","invert-rgb","grain-merge","grain-extract","hue","saturation","color","value"]}},"polygon-pattern":{file:{css:"polygon-pattern-file",type:"uri","default-value":"none",required:!0,doc:"Image to use as a repeated pattern fill within a polygon"},alignment:{css:"polygon-pattern-alignment",type:["local","global"],"default-value":"local",doc:"Specify whether to align pattern fills to the layer or to the map."},gamma:{css:"polygon-pattern-gamma",type:"float","default-value":1,"default-meaning":"fully antialiased",range:"0-1",doc:"Level of antialiasing of polygon pattern edges"},opacity:{css:"polygon-pattern-opacity",type:"float",doc:"(Default 1.0) - Apply an opacity level to the image used for the pattern","default-value":1,"default-meaning":"The image is rendered without modifications"},clip:{css:"polygon-pattern-clip",type:"boolean","default-value":!0,"default-meaning":"geometry will be clipped to map bounds before rendering",doc:"geometries are clipped to map bounds by default for best rendering performance. In some cases users may wish to disable this to avoid rendering artifacts."},smooth:{css:"polygon-pattern-smooth",type:"float","default-value":0,"default-meaning":"no smoothing",range:"0-1",doc:"Smooths out geometry angles. 0 is no smoothing, 1 is fully smoothed. Values greater than 1 will produce wild, looping geometries."},"geometry-transform":{css:"polygon-pattern-geometry-transform",type:"functions","default-value":"none","default-meaning":"geometry will not be transformed",doc:"Allows transformation functions to be applied to the geometry.",functions:[["matrix",6],["translate",2],["scale",2],["rotate",3],["skewX",1],["skewY",1]]},"comp-op":{css:"polygon-pattern-comp-op","default-value":"src-over","default-meaning":"add the current symbolizer on top of other symbolizer",doc:"Composite operation. This defines how this symbolizer should behave relative to symbolizers atop or below it.",type:["clear","src","dst","src-over","dst-over","src-in","dst-in","src-out","dst-out","src-atop","dst-atop","xor","plus","minus","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","contrast","invert","invert-rgb","grain-merge","grain-extract","hue","saturation","color","value"]}},raster:{opacity:{css:"raster-opacity","default-value":1,"default-meaning":"opaque",type:"float",doc:"The opacity of the raster symbolizer on top of other symbolizers."},"filter-factor":{css:"raster-filter-factor","default-value":-1,"default-meaning":"Allow the datasource to choose appropriate downscaling.",type:"float",doc:"This is used by the Raster or Gdal datasources to pre-downscale images using overviews. Higher numbers can sometimes cause much better scaled image output, at the cost of speed."},scaling:{css:"raster-scaling",type:["near","fast","bilinear","bilinear8","bicubic","spline16","spline36","hanning","hamming","hermite","kaiser","quadric","catrom","gaussian","bessel","mitchell","sinc","lanczos","blackman"],"default-value":"near",doc:"The scaling algorithm used to making different resolution versions of this raster layer. Bilinear is a good compromise between speed and accuracy, while lanczos gives the highest quality."},"mesh-size":{css:"raster-mesh-size","default-value":16,"default-meaning":"Reprojection mesh will be 1/16 of the resolution of the source image",type:"unsigned",doc:"A reduced resolution mesh is used for raster reprojection, and the total image size is divided by the mesh-size to determine the quality of that mesh. Values for mesh-size larger than the default will result in faster reprojection but might lead to distortion."},"comp-op":{css:"raster-comp-op","default-value":"src-over","default-meaning":"add the current symbolizer on top of other symbolizer",doc:"Composite operation. This defines how this symbolizer should behave relative to symbolizers atop or below it.",type:["clear","src","dst","src-over","dst-over","src-in","dst-in","src-out","dst-out","src-atop","dst-atop","xor","plus","minus","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","contrast","invert","invert-rgb","grain-merge","grain-extract","hue","saturation","color","value"]}},point:{file:{css:"point-file",type:"uri",required:!1,"default-value":"none",doc:"Image file to represent a point"},"allow-overlap":{css:"point-allow-overlap",type:"boolean","default-value":!1,doc:"Control whether overlapping points are shown or hidden.","default-meaning":"Do not allow points to overlap with each other - overlapping markers will not be shown."},"ignore-placement":{css:"point-ignore-placement",type:"boolean","default-value":!1,"default-meaning":"do not store the bbox of this geometry in the collision detector cache",doc:"value to control whether the placement of the feature will prevent the placement of other features"},opacity:{css:"point-opacity",type:"float","default-value":1,"default-meaning":"Fully opaque",doc:"A value from 0 to 1 to control the opacity of the point"},placement:{css:"point-placement",type:["centroid","interior"],doc:"How this point should be placed. Centroid calculates the geometric center of a polygon, which can be outside of it, while interior always places inside of a polygon.","default-value":"centroid"},transform:{css:"point-transform",type:"functions",functions:[["matrix",6],["translate",2],["scale",2],["rotate",3],["skewX",1],["skewY",1]],"default-value":"","default-meaning":"No transformation",doc:"SVG transformation definition"},"comp-op":{css:"point-comp-op","default-value":"src-over","default-meaning":"add the current symbolizer on top of other symbolizer",doc:"Composite operation. This defines how this symbolizer should behave relative to symbolizers atop or below it.",type:["clear","src","dst","src-over","dst-over","src-in","dst-in","src-out","dst-out","src-atop","dst-atop","xor","plus","minus","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","contrast","invert","invert-rgb","grain-merge","grain-extract","hue","saturation","color","value"]}},text:{name:{css:"text-name",type:"expression",required:!0,"default-value":"",serialization:"content",doc:"Value to use for a text label. Data columns are specified using brackets like [column_name]"},"face-name":{css:"text-face-name",type:"string",validate:"font",doc:"Font name and style to render a label in",required:!0},size:{css:"text-size",type:"float","default-value":10,doc:"Text size in pixels"},"text-ratio":{css:"text-ratio",doc:"Define the amount of text (of the total) present on successive lines when wrapping occurs","default-value":0,type:"unsigned"},"wrap-width":{css:"text-wrap-width",doc:"Length of a chunk of text in characters before wrapping text","default-value":0,type:"unsigned"},"wrap-before":{css:"text-wrap-before",type:"boolean","default-value":!1,doc:"Wrap text before wrap-width is reached. If false, wrapped lines will be a bit longer than wrap-width."},"wrap-character":{css:"text-wrap-character",type:"string","default-value":" ",doc:"Use this character instead of a space to wrap long text."},spacing:{css:"text-spacing",type:"unsigned",doc:"Distance between repeated text labels on a line (aka. label-spacing)"},"character-spacing":{css:"text-character-spacing",type:"float","default-value":0,doc:"Horizontal spacing adjustment between characters in pixels"},"line-spacing":{css:"text-line-spacing","default-value":0,type:"unsigned",doc:"Vertical spacing adjustment between lines in pixels"},"label-position-tolerance":{css:"text-label-position-tolerance","default-value":0,type:"unsigned",doc:"Allows the label to be displaced from its ideal position by a number of pixels (only works with placement:line)"},"max-char-angle-delta":{css:"text-max-char-angle-delta",type:"float","default-value":"22.5",doc:"The maximum angle change, in degrees, allowed between adjacent characters in a label. This value internally is converted to radians to the default is 22.5*math.pi/180.0. The higher the value the fewer labels will be placed around around sharp corners."},fill:{css:"text-fill",doc:"Specifies the color for the text","default-value":"#000000",type:"color"},opacity:{css:"text-opacity",doc:"A number from 0 to 1 specifying the opacity for the text","default-value":1,"default-meaning":"Fully opaque",type:"float"},"halo-fill":{css:"text-halo-fill",type:"color","default-value":"#FFFFFF","default-meaning":"white",doc:"Specifies the color of the halo around the text."},"halo-radius":{css:"text-halo-radius",doc:"Specify the radius of the halo in pixels","default-value":0,"default-meaning":"no halo",type:"float"},dx:{css:"text-dx",type:"float",doc:"Displace text by fixed amount, in pixels, +/- along the X axis. A positive value will shift the text right","default-value":0},dy:{css:"text-dy",type:"float",doc:"Displace text by fixed amount, in pixels, +/- along the Y axis. A positive value will shift the text down","default-value":0},"vertical-alignment":{css:"text-vertical-alignment",type:["top","middle","bottom","auto"],doc:"Position of label relative to point position.","default-value":"auto","default-meaning":'Default affected by value of dy; "bottom" for dy>0, "top" for dy<0.'},"avoid-edges":{css:"text-avoid-edges",doc:"Tell positioning algorithm to avoid labeling near intersection edges.","default-value":!1,type:"boolean"},"minimum-distance":{css:"text-min-distance",doc:"Minimum permitted distance to the next text symbolizer.",type:"float"},"minimum-padding":{css:"text-min-padding",doc:"Determines the minimum amount of padding that a text symbolizer gets relative to other text",type:"float"},"minimum-path-length":{css:"text-min-path-length",type:"float","default-value":0,"default-meaning":"place labels on all paths",doc:"Place labels only on paths longer than this value."},"allow-overlap":{css:"text-allow-overlap",type:"boolean","default-value":!1,doc:"Control whether overlapping text is shown or hidden.","default-meaning":"Do not allow text to overlap with other text - overlapping markers will not be shown."},orientation:{css:"text-orientation",type:"expression",doc:"Rotate the text."},placement:{css:"text-placement",type:["point","line","vertex","interior"],"default-value":"point",doc:"Control the style of placement of a point versus the geometry it is attached to."},"placement-type":{css:"text-placement-type",doc:'Re-position and/or re-size text to avoid overlaps. "simple" for basic algorithm (using text-placements string,) "dummy" to turn this feature off.',type:["dummy","simple"],"default-value":"dummy"},placements:{css:"text-placements",type:"string","default-value":"",doc:'If "placement-type" is set to "simple", use this "POSITIONS,[SIZES]" string. An example is `text-placements: "E,NE,SE,W,NW,SW";` '},"text-transform":{css:"text-transform",type:["none","uppercase","lowercase","capitalize"],doc:"Transform the case of the characters","default-value":"none"},"horizontal-alignment":{css:"text-horizontal-alignment",type:["left","middle","right","auto"],doc:"The text's horizontal alignment from its centerpoint","default-value":"auto"},"justify-alignment":{css:"text-align",type:["left","right","center","auto"],doc:"Define how text is justified","default-value":"auto","default-meaning":"Auto alignment means that text will be centered by default except when using the `placement-type` parameter - in that case either right or left justification will be used automatically depending on where the text could be fit given the `text-placements` directives"},clip:{css:"text-clip",type:"boolean","default-value":!0,"default-meaning":"geometry will be clipped to map bounds before rendering",doc:"geometries are clipped to map bounds by default for best rendering performance. In some cases users may wish to disable this to avoid rendering artifacts."},"comp-op":{css:"text-comp-op","default-value":"src-over","default-meaning":"add the current symbolizer on top of other symbolizer",doc:"Composite operation. This defines how this symbolizer should behave relative to symbolizers atop or below it.",type:["clear","src","dst","src-over","dst-over","src-in","dst-in","src-out","dst-out","src-atop","dst-atop","xor","plus","minus","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","contrast","invert","invert-rgb","grain-merge","grain-extract","hue","saturation","color","value"]}},building:{fill:{css:"building-fill","default-value":"#FFFFFF",doc:"The color of the buildings walls.",type:"color"},"fill-opacity":{css:"building-fill-opacity",type:"float",doc:"The opacity of the building as a whole, including all walls.","default-value":1},height:{css:"building-height",doc:"The height of the building in pixels.",type:"expression","default-value":"0"}}},colors:{aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],grey:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50],transparent:[0,0,0,0]},filter:{value:["true","false","null","point","linestring","polygon","collection"]}};function rj(e,t){for(var r=0;r1&&(t=arguments[1]),arguments.length>2&&(r=arguments[2]),{is:"tag",val:e,color:t,mode:r,toString:function(n){return'\n\t"}}},hsl:function(e,t,r){return this.hsla(e,t,r,1)},hsla:function(e,t,r,n){if([e=this.number(e)%360/360,t=this.number(t),r=this.number(r),n=this.number(n)].some(isNaN))return null;var o=r<=.5?r*(t+1):r+t-r*t,i=2*r-o;return this.rgba(255*a(e+1/3),255*a(e),255*a(e-1/3),n);function a(e){return 6*(e=e<0?e+1:e>1?e-1:e)<1?i+(o-i)*e*6:2*e<1?o:3*e<2?i+(o-i)*(2/3-e)*6:i}},hue:function(e){return"toHSL"in e?new ej.Tree.Dimension(Math.round(e.toHSL().h)):null},saturation:function(e){return"toHSL"in e?new ej.Tree.Dimension(Math.round(100*e.toHSL().s),"%"):null},lightness:function(e){return"toHSL"in e?new ej.Tree.Dimension(Math.round(100*e.toHSL().l),"%"):null},alpha:function(e){return"toHSL"in e?new ej.Tree.Dimension(e.toHSL().a):null},saturate:function(e,t){if(!("toHSL"in e))return null;var r=e.toHSL();return r.s+=t.value/100,r.s=this.clamp(r.s),this.hsla_simple(r)},desaturate:function(e,t){if(!("toHSL"in e))return null;var r=e.toHSL();return r.s-=t.value/100,r.s=this.clamp(r.s),this.hsla_simple(r)},lighten:function(e,t){if(!("toHSL"in e))return null;var r=e.toHSL();return r.l+=t.value/100,r.l=this.clamp(r.l),this.hsla_simple(r)},darken:function(e,t){if(!("toHSL"in e))return null;var r=e.toHSL();return r.l-=t.value/100,r.l=this.clamp(r.l),this.hsla_simple(r)},fadein:function(e,t){if(!("toHSL"in e))return null;var r=e.toHSL();return r.a+=t.value/100,r.a=this.clamp(r.a),this.hsla_simple(r)},fadeout:function(e,t){if(!("toHSL"in e))return null;var r=e.toHSL();return r.a-=t.value/100,r.a=this.clamp(r.a),this.hsla_simple(r)},spin:function(e,t){if(!("toHSL"in e))return null;var r=e.toHSL(),n=(r.h+t.value)%360;return r.h=n<0?360+n:n,this.hsla_simple(r)},replace:function(e,t,r){return"field"===e.is?e.toString+".replace("+t.toString()+", "+r.toString()+")":e.replace(t,r)},mix:function(e,t,r){var n=r.value/100,o=2*n-1,i=e.toHSL().a-t.toHSL().a,a=((o*i==-1?o:(o+i)/(1+o*i))+1)/2,s=1-a,l=[e.rgb[0]*a+t.rgb[0]*s,e.rgb[1]*a+t.rgb[1]*s,e.rgb[2]*a+t.rgb[2]*s],u=e.alpha*n+t.alpha*(1-n);return new ej.Tree.Color(l,u)},greyscale:function(e){return this.desaturate(e,new ej.Tree.Dimension(100))},"%":function(e){for(var t=Array.prototype.slice.call(arguments,1),r=e.value,n=0;n.5?u/(2-a-s):u/(a+s),a){case r:e=(n-o)/u+(n=0){if(!e.ppi)return e.error({message:"ppi is not set, so metric units can't be used",index:this.index}),{is:"undefined",value:"undefined"};this.value=this.value/this.densities[this.unit]*e.ppi,this.unit="px"}return this}},{key:"toColor",value:function(){return new ej.Tree.Color([this.value,this.value,this.value])}},{key:"round",value:function(){return this.value=Math.round(this.value),this}},{key:"toString",value:function(){return this.value.toString()}},{key:"operate",value:function(e,t,r){return"%"===this.unit&&"%"!==r.unit?(e.error({message:"If two operands differ, the first must not be %",index:this.index}),{is:"undefined",value:"undefined"}):"%"!==this.unit&&"%"===r.unit?"*"===t||"/"===t||"%"===t?(e.error({message:"Percent values can only be added or subtracted from other values",index:this.index}),{is:"undefined",value:"undefined"}):new ej.Tree.Dimension(ej.Tree.operate(t,this.value,this.value*r.value*.01),this.unit):new ej.Tree.Dimension(ej.Tree.operate(t,this.value,r.value),this.unit||r.unit)}}]),e}(),ej.Tree.Element=function(){function e(t){Zk(this,e),this.value=t.trim(),"#"===this.value[0]&&(this.type="id",this.clean=this.value.replace(/^#/,"")),"."===this.value[0]&&(this.type="class",this.clean=this.value.replace(/^\./,"")),-1!==this.value.indexOf("*")&&(this.type="wildcard")}return $k(e,[{key:"specificity",value:function(){return["id"===this.type?1:0,"class"===this.type?1:0]}},{key:"toString",value:function(){return this.value}}]),e}(),ej.Tree.Expression=function(){function e(t){Zk(this,e),this.is="expression",this.value=t}return $k(e,[{key:"ev",value:function(e){return this.value.length>1?new ej.Tree.Expression(this.value.map(function(t){return t.ev(e)})):this.value[0].ev(e)}},{key:"toString",value:function(e){return this.value.map(function(t){return t.toString(e)}).join(" ")}}]),e}(),ej.Tree.Field=function(){function e(t){Zk(this,e),this.is="field",this.value=t||""}return $k(e,[{key:"toString",value:function(){return'["'+this.value.toUpperCase()+'"]'}},{key:"ev",value:function(){return this}}]),e}(),ej.Tree.Filter=function(){function e(t,r,n,o,i){Zk(this,e),this.ops={"<":[" < ","numeric"],">":[" > ","numeric"],"=":[" = ","both"],"!=":[" != ","both"],"<=":[" <= ","numeric"],">=":[" >= ","numeric"],"=~":[".match(","string",")"]},this.key=t,this.op=r,this.val=n,this.index=o,this.filename=i,this.id=this.key+this.op+this.val}return $k(e,[{key:"ev",value:function(e){return this.key=this.key.ev(e),this.val=this.val.ev(e),this}},{key:"toString",value:function(){return"["+this.id+"]"}}]),e}(),ej.Tree.Filterset=function(){function e(){Zk(this,e),this.filters={}}return $k(e,[{key:"toJS",value:function(e){function t(e){var t=e.op;"="===t&&(t="==");var r=e.val;void 0!==e._val&&(r=e._val.toString(!0)),e.key&&"scale"===e.key.value?r=+r:"string"!=typeof r&&"object"!==Qk(r)||(r="'"+r+"'");var n="attributes";return n+"&&"+n+e.key+"&&"+n+e.key+" "+t+r}var r=[];for(var n in this.filters)r.push(t(this.filters[n]));return r.join(" && ")}},{key:"toString",value:function(){var e=[];for(var t in this.filters)e.push(this.filters[t].id);return e.sort().join("\t")}},{key:"ev",value:function(e){for(var t in this.filters)this.filters[t].ev(e);return this}},{key:"clone",value:function(){var e=new ej.Tree.Filterset;for(var t in this.filters)e.filters[t]=this.filters[t];return e}},{key:"cloneWith",value:function(e){var t=[];for(var r in e.filters){var n=this.addable(e.filters[r]);if(!1===n)return!1;!0===n&&t.push(e.filters[r])}if(!t.length)return null;var o=new ej.Tree.Filterset;for(r in this.filters)o.filters[r]=this.filters[r];for(;r=t.shift();)o.add(r);return o}},{key:"addable",value:function(e){var t=e.key.toString(),r=e.val.toString();switch(r.match(/^[0-9]+(\.[0-9]*)?_match/)&&(r=parseFloat(r)),e.op){case"=":return void 0!==this.filters[t+"="]?this.filters[t+"="].val.toString()==r&&null:void 0===this.filters[t+"!="+r]&&(!(void 0!==this.filters[t+">"]&&this.filters[t+">"].val>=r)&&(!(void 0!==this.filters[t+"<"]&&this.filters[t+"<"].val<=r)&&(!(void 0!==this.filters[t+">="]&&this.filters[t+">="].val>r)&&!(void 0!==this.filters[t+"<="]&&this.filters[t+"<="].val"]&&this.filters[t+">"].val>=r?null:void 0!==this.filters[t+"<"]&&this.filters[t+"<"].val<=r?null:void 0!==this.filters[t+">="]&&this.filters[t+">="].val>r?null:!(void 0!==this.filters[t+"<="]&&this.filters[t+"<="].val":return t+"="in this.filters?!(this.filters[t+"="].val<=r)&&null:!(void 0!==this.filters[t+"<"]&&this.filters[t+"<"].val<=r)&&(!(void 0!==this.filters[t+"<="]&&this.filters[t+"<="].val<=r)&&(void 0!==this.filters[t+">"]&&this.filters[t+">"].val>=r?null:!(void 0!==this.filters[t+">="]&&this.filters[t+">="].val>r)||null));case">=":return void 0!==this.filters[t+"="]?!(this.filters[t+"="].val"]&&this.filters[t+">"].val>=r?null:!(void 0!==this.filters[t+">="]&&this.filters[t+">="].val>=r)||null));case"<":return void 0!==this.filters[t+"="]?!(this.filters[t+"="].val>=r)&&null:!(void 0!==this.filters[t+">"]&&this.filters[t+">"].val>=r)&&(!(void 0!==this.filters[t+">="]&&this.filters[t+">="].val>=r)&&(void 0!==this.filters[t+"<"]&&this.filters[t+"<"].val<=r?null:!(void 0!==this.filters[t+"<="]&&this.filters[t+"<="].valr)&&null:!(void 0!==this.filters[t+">"]&&this.filters[t+">"].val>=r)&&(!(void 0!==this.filters[t+">="]&&this.filters[t+">="].val>r)&&(void 0!==this.filters[t+"<"]&&this.filters[t+"<"].val<=r?null:!(void 0!==this.filters[t+"<="]&&this.filters[t+"<="].val<=r)||null))}}},{key:"conflict",value:function(e){var t=e.key.toString(),r=e.val.toString();return isNaN(parseFloat(r))||(r=parseFloat(r)),("="===e.op&&void 0!==this.filters[t+"="]&&r!=this.filters[t+"="].val.toString()||"!="===e.op&&void 0!==this.filters[t+"="]&&r==this.filters[t+"="].val.toString()||"="===e.op&&void 0!==this.filters[t+"!="]&&r===this.filters[t+"!="].val.toString())&&e.toString()+" added to "+this.toString()+" produces an invalid filter"}},{key:"add",value:function(e,t){var r,n=e.key.toString(),o=e.op,i=this.conflict(e);if(i)return i;if("="===o){for(var a in this.filters)this.filters[a].key===n&&delete this.filters[a];this.filters[n+"="]=e}else if("!="===o)this.filters[n+"!="+e.val]=e;else if("=~"===o)this.filters[n+"=~"+e.val]=e;else if(">"===o){for(var s in this.filters)this.filters[s].key===n&&this.filters[s].val<=e.val&&delete this.filters[s];this.filters[n+">"]=e}else if(">="===o){for(var l in this.filters)r=+this.filters[l].val.toString(),this.filters[l].key===n&&r",this.filters[n+">"]=e):this.filters[n+">="]=e}else if("<"===o){for(var u in this.filters)r=+this.filters[u].val.toString(),this.filters[u].key===n&&r>=e.val&&delete this.filters[u];this.filters[n+"<"]=e}else if("<="===o){for(var c in this.filters)r=+this.filters[c].val.toString(),this.filters[c].key===n&&r>e.val&&delete this.filters[c];void 0!==this.filters[n+"!="+e.val]?(delete this.filters[n+"!="+e.val],e.op="<",this.filters[n+"<"]=e):this.filters[n+"<="]=e}}}]),e}(),ej.Tree.Fontset=$k(function e(t,r){Zk(this,e),this.fonts=r,this.name="fontset-"+t.effects.length}),ej.Tree.Invalid=function(){function e(t,r,n){Zk(this,e),this.is="invalid",this.chunk=t,this.index=r,this.type="syntax",this.message=n||"Invalid code: "+this.chunk}return $k(e,[{key:"ev",value:function(e){return e.error({chunk:this.chunk,index:this.index,type:"syntax",message:this.message||"Invalid code: "+this.chunk}),{is:"undefined"}}}]),e}(),ej.Tree.Keyword=function(){function e(t){Zk(this,e),this.value=t;var r={transparent:"color",true:"boolean",false:"boolean"};this.is=r[t]?r[t]:"keyword"}return $k(e,[{key:"ev",value:function(){return this}},{key:"toString",value:function(){return this.value}}]),e}(),ej.Tree.Literal=function(){function e(t){Zk(this,e),this.value=t||"",this.is="field"}return $k(e,[{key:"toString",value:function(){return this.value}},{key:"ev",value:function(){return this}}]),e}(),ej.Tree.Operation=function(){function e(t,r,n){Zk(this,e),this.is="operation",this.op=t.trim(),this.operands=r,this.index=n}return $k(e,[{key:"ev",value:function(e){var t,r=this.operands[0].ev(e),n=this.operands[1].ev(e);return"undefined"===r.is||"undefined"===n.is?{is:"undefined",value:"undefined"}:(r instanceof ej.Tree.Dimension&&n instanceof ej.Tree.Color&&("*"===this.op||"+"===this.op?(t=n,n=r,r=t):e.error({name:"OperationError",message:"Can't substract or divide a color from a number",index:this.index})),r instanceof ej.Tree.Quoted&&n instanceof ej.Tree.Quoted&&"+"!==this.op?(e.error({message:"Can't subtract, divide, or multiply strings.",index:this.index,type:"runtime",filename:this.filename}),{is:"undefined",value:"undefined"}):r instanceof ej.Tree.Field||n instanceof ej.Tree.Field||r instanceof ej.Tree.Literal||n instanceof ej.Tree.Literal?"color"===r.is||"color"===n.is?(e.error({message:"Can't subtract, divide, or multiply colors in expressions.",index:this.index,type:"runtime",filename:this.filename}),{is:"undefined",value:"undefined"}):new ej.Tree.Literal(r.ev(e).toString(!0)+this.op+n.ev(e).toString(!0)):void 0===r.operate?(e.error({message:"Cannot do math with type "+r.is+".",index:this.index,type:"runtime",filename:this.filename}),{is:"undefined",value:"undefined"}):r.operate(e,this.op,n))}}]),e}(),ej.Tree.Quoted=function(){function e(t){Zk(this,e),this.is="string",this.value=t||""}return $k(e,[{key:"toString",value:function(e){var t=this.value.replace(/&/g,"&"),r=t.replace(/\'/g,"\\'").replace(/\"/g,""").replace(//g,">");return!0===e?"'"+r+"'":t}},{key:"ev",value:function(){return this}},{key:"operate",value:function(e,t,r){return new ej.Tree.Quoted(ej.Tree.operate(t,this.toString(),r.toString(this.contains_field)))}}]),e}(),ej.Tree.Reference={_validateValue:{font:function(e,t){return!e.validation_data||!e.validation_data.fonts||-1!=e.validation_data.fonts.indexOf(t)}},setData:function(e){this.data=e,this.selector_cache=function(e){var t={};for(var r in e.symbolizers)for(var n in e.symbolizers[r])e.symbolizers[r][n].hasOwnProperty("css")&&(t[e.symbolizers[r][n].css]=[e.symbolizers[r][n],r,n]);return t}(e),this.mapnikFunctions=function(e){var t={};for(var r in e.symbolizers)for(var n in e.symbolizers[r])if("functions"===e.symbolizers[r][n].type)for(var o=0;o1?Array.prototype.push.apply(r,n.find(new ej.Tree.Selector(null,null,e.elements.slice(1)),t)):r.push(n);break}}),this._lookups[n]=r)}},{key:"evZooms",value:function(e){for(var t=0;tej.Tree.Zoom.maxZoom||t<0)&&e.error({message:"Only zoom levels between 0 and "+ej.Tree.Zoom.maxZoom+" supported.",index:this.index}),this.op){case"=":return this.zoom="zoom && zoom === "+t,this;case">":this.zoom="zoom && zoom > "+t;break;case">=":this.zoom="zoom && zoom >= "+t;break;case"<":this.zoom="zoom && zoom < "+t;break;case"<=":this.zoom="zoom && zoom <= "+t}return this}},{key:"toString",value:function(){for(var e="",t=0;t<=ej.Tree.Zoom.maxZoom;t++)e+=this.zoom&1<3&&(t=Array.prototype.slice.call(t,1));for(var n=this._handlers[e],o=n.length,i=0;i4&&(t=Array.prototype.slice.call(t,1,t.length-1));for(var n=t[t.length-1],o=this._handlers[e],i=o.length,a=0;a-this.EPSILON&&ethis.EPSILON||e<-this.EPSILON}},{key:"cubicAt",value:function(e,t,r,n,o){var i=1-o;return i*i*(i*e+3*o*t)+o*o*(o*n+3*i*r)}},{key:"cubicDerivativeAt",value:function(e,t,r,n,o){var i=1-o;return 3*(((t-e)*i+2*(r-t)*o)*i+(n-r)*o*o)}},{key:"cubicRootAt",value:function(e,t,r,n,o,i){var a=n+3*(t-r)-e,s=3*(r-2*t+e),l=3*(t-e),u=e-o,c=s*s-3*a*l,f=s*l-9*a*u,p=l*l-3*s*u,h=0;if(this.isAroundZero(c)&&this.isAroundZero(f))if(this.isAroundZero(s))i[0]=0;else{var y=-l/s;y>=0&&y<=1&&(i[h++]=y)}else{var d=f*f-4*c*p;if(this.isAroundZero(d)){var b=f/c,v=-s/a+b,m=-b/2;v>=0&&v<=1&&(i[h++]=v),m>=0&&m<=1&&(i[h++]=m)}else if(d>0){var g=Math.sqrt(d),w=c*s+1.5*a*(-f+g),O=c*s+1.5*a*(-f-g),S=(-s-((w=w<0?-Math.pow(-w,this.ONE_THIRD):Math.pow(w,this.ONE_THIRD))+(O=O<0?-Math.pow(-O,this.ONE_THIRD):Math.pow(O,this.ONE_THIRD))))/(3*a);S>=0&&S<=1&&(i[h++]=S)}else{var _=(2*c*s-3*a*f)/(2*Math.sqrt(c*c*c)),P=Math.acos(_)/3,x=Math.sqrt(c),k=Math.cos(P),j=(-s-2*x*k)/(3*a),E=(-s+x*(k+this.THREE_SQRT*Math.sin(P)))/(3*a),T=(-s+x*(k-this.THREE_SQRT*Math.sin(P)))/(3*a);j>=0&&j<=1&&(i[h++]=j),E>=0&&E<=1&&(i[h++]=E),T>=0&&T<=1&&(i[h++]=T)}}return h}},{key:"cubicExtrema",value:function(e,t,r,n,o){var i=6*r-12*t+6*e,a=9*t+3*n-3*e-9*r,s=3*t-3*e,l=0;if(this.isAroundZero(a)){if(this.isNotAroundZero(i)){var u=-s/i;u>=0&&u<=1&&(o[l++]=u)}}else{var c=i*i-4*a*s;if(this.isAroundZero(c))o[0]=-i/(2*a);else if(c>0){var f=Math.sqrt(c),p=(-i+f)/(2*a),h=(-i-f)/(2*a);p>=0&&p<=1&&(o[l++]=p),h>=0&&h<=1&&(o[l++]=h)}}return l}},{key:"cubicSubdivide",value:function(e,t,r,n,o,i){var a=(t-e)*o+e,s=(r-t)*o+t,l=(n-r)*o+r,u=(s-a)*o+a,c=(l-s)*o+s,f=(c-u)*o+u;i[0]=e,i[1]=a,i[2]=u,i[3]=f,i[4]=f,i[5]=c,i[6]=l,i[7]=n}},{key:"cubicProjectPoint",value:function(e,t,r,n,o,i,a,s,l,u,c){var f,p=this.vector.create(),h=this.vector.create(),y=this.vector.create(),d=.005,b=1/0;p[0]=l,p[1]=u;for(var v=0;v<1;v+=.05){h[0]=this.cubicAt(e,r,o,a,v),h[1]=this.cubicAt(t,n,i,s,v);var m=this.vector.distSquare(p,h);m=0&&S=0&&u<=1&&(o[l++]=u)}}else{var c=a*a-4*i*s;if(this.isAroundZero(c)){var f=-a/(2*i);f>=0&&f<=1&&(o[l++]=f)}else if(c>0){var p=Math.sqrt(c),h=(-a+p)/(2*i),y=(-a-p)/(2*i);h>=0&&h<=1&&(o[l++]=h),y>=0&&y<=1&&(o[l++]=y)}}return l}},{key:"quadraticExtremum",value:function(e,t,r){var n=e+r-2*t;return 0===n?.5:(e-t)/n}},{key:"quadraticProjectPoint",value:function(e,t,r,n,o,i,a,s,l){var u,c=this.vector.create(),f=this.vector.create(),p=this.vector.create(),h=.005,y=1/0;c[0]=a,c[1]=s;for(var d=0;d<1;d+=.05){f[0]=this.quadraticAt(e,r,o,d),f[1]=this.quadraticAt(t,n,i,d);var b=this.vector.distSquare(c,f);b=0&&w0){for(var m=this.isInsidePolygon(t.pointList,b,v),g=e.holePolygonPointLists,w=!1,O=0,S=g.length;Ot+s&&a>n+s||ae+s&&i>r+s||it+f&&c>n+f&&c>i+f&&c>s+f||ce+f&&u>r+f&&u>o+f&&u>a+f||ut+u&&l>n+u&&l>i+u||le+u&&s>r+u&&s>o+u||sr||f+c=u)return!0;if(i){var p=n;n=this.normalizeRadian(o),o=this.normalizeRadian(p)}else n=this.normalizeRadian(n),o=this.normalizeRadian(o);n>o&&(o+=u);var h=Math.atan2(l,s);return h<0&&(h+=u),h>=n&&h<=o||h+u>=n&&h+u<=o}},{key:"isInsideBrokenLine",value:function(e,t,r,n){for(var o=Math.max(t,10),i=0,a=e.length-1;ir*r}},{key:"isInsideRect",value:function(e,t,r,n,o,i){return o>=e&&o<=e+r&&i>=t&&i<=t+n}},{key:"isInsideCircle",value:function(e,t,r,n,o){return(n-e)*(n-e)+(o-t)*(o-t)t&&i>n||io?nt&&u>n&&u>i&&u>s||u1&&this.swapExtrema(),y=c.cubicAt(t,n,i,s,p[0]),v>1&&(d=c.cubicAt(t,n,i,s,p[1]))),2==v?gt&&s>n&&s>i||s=0&&f<=1){for(var p=0,h=l.quadraticAt(t,n,i,f),y=0;ya||(u[y]a?0:ir||s<-r)return 0;var c=Math.sqrt(r*r-s*s);if(l[0]=-c,l[1]=c,Math.abs(n-o)>=u){n=0,o=u;var f=i?1:-1;return a>=l[0]+e&&a<=l[1]+e?f:0}if(i){var p=n;n=this.normalizeRadian(o),o=this.normalizeRadian(p)}else n=this.normalizeRadian(n),o=this.normalizeRadian(o);n>o&&(o+=u);for(var h=0,y=0;y<2;y++){var d=l[y];if(d+e>a){var b=Math.atan2(s,d),v=i?1:-1;b<0&&(b=u+b),(b>=n&&b<=o||b+u>=n&&b+u<=o)&&(b>Math.PI/2&&b<1.5*Math.PI&&(v=-v),h+=v)}}return h}},{key:"isInsidePath",value:function(e,t,r,n,o){for(var i=0,a=0,s=0,l=0,u=0,c=!0,f=!0,p="stroke"===(r=r||"fill")||"both"===r,h="fill"===r||"both"===r,y=0;y0&&(h&&(i+=this.windingLine(a,s,l,u,n,o)),0!==i))return!0;l=b[b.length-2],u=b[b.length-1],c=!1,f&&"A"!==d.command&&(f=!1,a=l,s=u)}switch(d.command){case"M":a=b[0],s=b[1];break;case"L":if(p&&this.isInsideLine(a,s,b[0],b[1],t,n,o))return!0;h&&(i+=this.windingLine(a,s,b[0],b[1],n,o)),a=b[0],s=b[1];break;case"C":if(p&&this.isInsideCubicStroke(a,s,b[0],b[1],b[2],b[3],b[4],b[5],t,n,o))return!0;h&&(i+=this.windingCubic(a,s,b[0],b[1],b[2],b[3],b[4],b[5],n,o)),a=b[4],s=b[5];break;case"Q":if(p&&this.isInsideQuadraticStroke(a,s,b[0],b[1],b[2],b[3],t,n,o))return!0;h&&(i+=this.windingQuadratic(a,s,b[0],b[1],b[2],b[3],n,o)),a=b[2],s=b[3];break;case"A":var v=b[0],m=b[1],g=b[2],w=b[3],O=b[4],S=b[5],_=Math.cos(O)*g+v,P=Math.sin(O)*w+m;f?(f=!1,l=_,u=P):i+=this.windingLine(a,s,_,P);var x=(n-v)*w/g+v;if(p&&this.isInsideArcStroke(v,m,w,O,O+S,1-b[7],t,x,o))return!0;h&&(i+=this.windingArc(v,m,w,O,O+S,1-b[7],x,o)),a=Math.cos(O+S)*g+v,s=Math.sin(O+S)*w+m;break;case"z":if(p&&this.isInsideLine(a,s,l,u,t,n,o))return!0;c=!0}}return h&&(i+=this.windingLine(a,s,l,u,n,o)),0!==i}},{key:"getTextWidth",value:function(e,t){var r=e+":"+t;if(this._textWidthCache[r])return this._textWidthCache[r];this._ctx=this._ctx||this.util.getContext(),this._ctx.save(),t&&(this._ctx.font=t);for(var n=0,o=0,i=(e=(e+"").split("\n")).length;othis.TEXT_CACHE_MAX&&(this._textWidthCacheCounter=0,this._textWidthCache={}),n}},{key:"getTextHeight",value:function(e,t){var r=e+":"+t;if(this._textHeightCache[r])return this._textHeightCache[r];this._ctx=this._ctx||this.util.getContext(),this._ctx.save(),t&&(this._ctx.font=t),e=(e+"").split("\n");var n=(this._ctx.measureText("ZH").width+2)*e.length;return this._ctx.restore(),this._textHeightCache[r]=n,++this._textHeightCacheCounter>this.TEXT_CACHE_MAX&&(this._textHeightCacheCounter=0,this._textHeightCache={}),n}}])&&yE(t.prototype,r),n&&yE(t,n),Object.defineProperty(t,"prototype",{writable:!1}),e}();function bE(e,t){for(var r=0;ro&&(o=l[0]),l[1]a&&(a=l[1])}t[0]=n,t[1]=i,r[0]=o,r[1]=a}}},{key:"cubeBezier",value:function(e,t,r,n,o,i){var a=new hE,s=[];a.cubicExtrema(e[0],t[0],r[0],n[0],s);for(var l=0;lo&&!i?o+=2*Math.PI:nn&&(f[0]=Math.cos(h)*r+e,f[1]=Math.sin(h)*r+t,l.min(a,f,a),l.max(s,f,s))}}])&&bE(t.prototype,r),n&&bE(t,n),Object.defineProperty(t,"prototype",{writable:!1}),e}();function mE(e,t){for(var r=0;r=200&&o.status<300||304===o.status?t&&t(o.responseText):r&&r(),o.onreadystatechange=new Function,o=null)},o.send(null)}}])&&_E(t.prototype,r),n&&_E(t,n),Object.defineProperty(t,"prototype",{writable:!1}),e}();function xE(e,t){for(var r=0;r1)for(var t in arguments)console.log(arguments[t])}}var t,r,n;return t=e,(r=[{key:"destory",value:function(){return!0}}])&&jE(t.prototype,r),n&&jE(t,n),Object.defineProperty(t,"prototype",{writable:!1}),e}();function TE(e,t){for(var r=0;ra-2?a-1:h+1][0]+i[0],t[h>a-2?a-1:h+1][1]+i[1]],m=[t[h>a-3?a-1:h+2][0]+i[0],t[h>a-3?a-1:h+2][1]+i[1]]);var g=y*y,w=y*g;s.push([O(d[0],b[0],v[0],m[0],y,g,w),O(d[1],b[1],v[1],m[1],y,g,w)])}return s;function O(e,t,r,n,o,i,a){var s=.5*(r-e),l=.5*(n-t);return(2*(t-r)+s+l)*a+(-3*(t-r)-2*s-l)*i+s*o+t}}},{key:"SUtil_dashedLineTo",value:function(e,t,r,n,o,i,a){var s=[5,5];if(i="number"!=typeof i?5:i,e.setLineDash)return s[0]=i,s[1]=i,a&&a instanceof Array?e.setLineDash(a):e.setLineDash(s),e.moveTo(t,r),void e.lineTo(n,o);var l=n-t,u=o-r,c=Math.floor(Math.sqrt(l*l+u*u)/i);l/=c,u/=c;for(var f=!0,p=0;p-5e-5&&e<5e-5}LE.Util_vector.sub(t,e,this.position),n(t[0])&&n(t[1])||(LE.Util_vector.normalize(t,t),r[2]=t[0]*this.scale[1],r[3]=t[1]*this.scale[1],r[0]=t[1]*this.scale[0],r[1]=-t[0]*this.scale[0],r[4]=this.position[0],r[5]=this.position[1],this.decomposeTransform())})}var t,r,n;return t=e,(r=[{key:"destroy",value:function(){this.position=null,this.rotation=null,this.scale=null,this.needLocalTransform=null,this.needTransform=null}},{key:"updateNeedTransform",value:function(){function e(e){return e>5e-5||e<-5e-5}this.needLocalTransform=e(this.rotation[0])||e(this.position[0])||e(this.position[1])||e(this.scale[0]-1)||e(this.scale[1]-1)}},{key:"updateTransform",value:function(){if(this.updateNeedTransform(),this.parent?this.needTransform=this.needLocalTransform||this.parent.needTransform:this.needTransform=this.needLocalTransform,this.needTransform){var e=[0,0],t=this.transform||LE.Util_matrix.create();if(LE.Util_matrix.identity(t),this.needLocalTransform){if(o(this.scale[0])||o(this.scale[1])){e[0]=-this.scale[2]||0,e[1]=-this.scale[3]||0;var r=o(e[0])||o(e[1]);r&&LE.Util_matrix.translate(t,t,e),LE.Util_matrix.scale(t,t,this.scale),r&&(e[0]=-e[0],e[1]=-e[1],LE.Util_matrix.translate(t,t,e))}if(this.rotation instanceof Array){if(0!==this.rotation[0]){e[0]=-this.rotation[1]||0,e[1]=-this.rotation[2]||0;var n=o(e[0])||o(e[1]);n&&LE.Util_matrix.translate(t,t,e),LE.Util_matrix.rotate(t,t,this.rotation[0]),n&&(e[0]=-e[0],e[1]=-e[1],LE.Util_matrix.translate(t,t,e))}}else 0!=+this.rotation&&LE.Util_matrix.rotate(t,t,this.rotation);(o(this.position[0])||o(this.position[1]))&&LE.Util_matrix.translate(t,t,this.position)}this.transform=t,this.parent&&this.parent.needTransform&&(this.needLocalTransform?LE.Util_matrix.mul(this.transform,this.parent.transform,this.transform):LE.Util_matrix.copy(this.transform,this.parent.transform))}function o(e){return e>5e-5||e<-5e-5}}},{key:"setTransform",value:function(e){if(this.needTransform){var t=this.transform;e.transform(t[0],t[1],t[2],t[3],t[4],t[5])}}},{key:"decomposeTransform",value:function(){if(this.transform){var e=this.transform,t=e[0]*e[0]+e[1]*e[1],r=this.position,n=this.scale,o=this.rotation;a(t-1)&&(t=Math.sqrt(t));var i=e[2]*e[2]+e[3]*e[3];a(i-1)&&(i=Math.sqrt(i)),r[0]=e[4],r[1]=e[5],n[0]=t,n[1]=i,n[2]=n[3]=0,o[0]=Math.atan2(-e[1]/i,e[0]/t),o[1]=o[2]=0}function a(e){return e>5e-5||e<-5e-5}}}])&&IE(t.prototype,r),n&&IE(t,n),Object.defineProperty(t,"prototype",{writable:!1}),e}();function FE(e){"@babel/helpers - typeof";return(FE="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function DE(e,t){for(var r=0;r0&&(this.setCtxGlobalAlpha(e,"stroke",r),e.stroke()),this.setCtxGlobalAlpha(e,"reset",r);break;case"stroke":this.setCtxGlobalAlpha(e,"stroke",r),r.lineWidth>0&&e.stroke(),this.setCtxGlobalAlpha(e,"reset",r);break;default:this.setCtxGlobalAlpha(e,"fill",r),e.fill(),this.setCtxGlobalAlpha(e,"reset",r)}this.drawText(e,r,this.style),this.afterBrush(e)}},{key:"beforeBrush",value:function(e,t){var r=this.style;return this.brushTypeOnly&&(r.brushType=this.brushTypeOnly),t&&(r=this.getHighlightStyle(r,this.highlightStyle||{},this.brushTypeOnly)),"stroke"==this.brushTypeOnly&&(r.strokeColor=r.strokeColor||r.color),e.save(),this.doClip(e),this.setContext(e,r),this.setTransform(e),r}},{key:"afterBrush",value:function(e){e.restore()}},{key:"setContext",value:function(e,t){for(var r=[["color","fillStyle"],["strokeColor","strokeStyle"],["opacity","globalAlpha"],["lineCap","lineCap"],["lineJoin","lineJoin"],["miterLimit","miterLimit"],["lineWidth","lineWidth"],["shadowBlur","shadowBlur"],["shadowColor","shadowColor"],["shadowOffsetX","shadowOffsetX"],["shadowOffsetY","shadowOffsetY"]],n=0,o=r.length;n=n.x&&e<=n.x+n.width&&t>=n.y&&t<=n.y+n.height&&LE.Util_area.isInside(this,this.style,e,t)}},{key:"drawText",value:function(e,t,r){if(void 0!==t.text&&!1!==t.text){var n=t.textColor||t.color||t.strokeColor;e.fillStyle=n;var o,a,s,l,u=10,c=t.textPosition||this.textPosition||"top",f=[];switch(f=this.refOriginalPosition&&2===this.refOriginalPosition.length?this.refOriginalPosition:[0,0],c){case"inside":case"top":case"bottom":case"left":case"right":if(this.getRect){var p=(r||t).__rect||this.getRect(r||t);switch(c){case"inside":s=p.x+p.width/2,l=p.y+p.height/2,o="center",a="middle","stroke"!=t.brushType&&n==t.color&&(e.fillStyle="#fff");break;case"left":s=p.x-u,l=p.y+p.height/2,o="end",a="middle";break;case"right":s=p.x+p.width+u,l=p.y+p.height/2,o="start",a="middle";break;case"top":s=p.x+p.width/2,l=p.y-u,o="center",a="bottom";break;case"bottom":s=p.x+p.width/2,l=p.y+p.height+u,o="center",a="top"}}break;case"start":case"end":var h=0,y=0,d=0,b=0;if(void 0!==t.pointList){var v=t.pointList;if(v.length<2)return;var m=v.length;switch(c){case"start":h=v[0][0]+f[0],y=v[1][0]+f[0],d=v[0][1]+f[1],b=v[1][1]+f[1];break;case"end":h=v[m-2][0]+f[0],y=v[m-1][0]+f[0],d=v[m-2][1]+f[1],b=v[m-1][1]+f[1]}}else h=t.xStart+f[0]||0,y=t.xEnd+f[0]||0,d=t.yStart+f[1]||0,b=t.yEnd+f[1]||0;switch(c){case"start":o=hn&&(n=l[0]),l[1]o&&(o=l[1]))}return e.__rect={x:t,y:r,width:n-t,height:o-r},e.__rect}},{key:"getRectNoRotation",value:function(e){this.refOriginalPosition&&2===this.refOriginalPosition.length||(this.refOriginalPosition=[0,0]);var t,r=this.refOriginalPosition,n=LE.Util_area.getTextHeight("ZH",e.textFont),o=LE.Util_area.getTextWidth(e.text,e.textFont),i=LE.Util_area.getTextHeight(e.text,e.textFont),a=e.x+r[0];"end"==e.textAlign||"right"==e.textAlign?a-=o:"center"==e.textAlign&&(a-=o/2),t="top"==e.textBaseline?e.y+r[1]:"bottom"==e.textBaseline?e.y+r[1]-i:e.y+r[1]-i/2;var s,l=!1;if(e.maxWidth){var u=parseInt(e.maxWidth);u-1&&(o+=!0===l?n/3*(o/s):n/3));return{x:a,y:t,width:o,height:i}}},{key:"getTextBackground",value:function(e,t){this.refOriginalPosition&&2===this.refOriginalPosition.length||(this.refOriginalPosition=[0,0]);var r=this.refOriginalPosition;if(!t&&e.__textBackground)return e.__textBackground;var n=this.getRectNoRotation(e),o=e.x+r[0],i=e.y+r[1],a=[];if(e.textRotation&&0!==e.textRotation){var s=e.textRotation,l=this.getRotatedLocation(n.x,n.y,o,i,s),u=this.getRotatedLocation(n.x+n.width,n.y,o,i,s),c=this.getRotatedLocation(n.x+n.width,n.y+n.height,o,i,s),f=this.getRotatedLocation(n.x,n.y+n.height,o,i,s);a.push(l),a.push(u),a.push(c),a.push(f)}else{var p=[n.x,n.y],h=[n.x+n.width,n.y],y=[n.x+n.width,n.y+n.height],d=[n.x,n.y+n.height];a.push(p),a.push(h),a.push(y),a.push(d)}return e.__textBackground=a,e.__textBackground}},{key:"getRotatedLocation",value:function(e,t,r,n,o){var i,a,s=new Array;return t=-t,n=-n,o=-o,i=(e-r)*Math.cos(o/180*Math.PI)-(t-n)*Math.sin(o/180*Math.PI)+r,a=(e-r)*Math.sin(o/180*Math.PI)+(t-n)*Math.cos(o/180*Math.PI)+n,s[0]=i,s[1]=-a,s}}])&&$E(t.prototype,r),n&&$E(t,n),Object.defineProperty(t,"prototype",{writable:!1}),i}();function iT(e){"@babel/helpers - typeof";return(iT="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function aT(e,t){for(var r=0;r0&&("stroke"==r.brushType||"both"==r.brushType)&&(n||(e.beginPath(),this.buildPath(e,r)),this.setCtxGlobalAlpha(e,"stroke",r),e.stroke(),this.setCtxGlobalAlpha(e,"reset",r)),this.drawText(e,r,this.style);var o=ce.cloneObject(r);if(o.pointList&&this.holePolygonPointLists&&this.holePolygonPointLists.length>0)for(var i=this.holePolygonPointLists,a=i.length,s=0;s0&&("stroke"==o.brushType||"both"==o.brushType)?(n||(e.beginPath(),this.buildPath(e,o)),e.globalCompositeOperation="source-over",this.setCtxGlobalAlpha(e,"stroke",o),e.stroke(),this.setCtxGlobalAlpha(e,"reset",o)):e.globalCompositeOperation="source-over"}e.restore()}},{key:"buildPath",value:function(e,t){t.showShadow&&(e.shadowBlur=t.shadowBlur,e.shadowColor=t.shadowColor,e.shadowOffsetX=t.shadowOffsetX,e.shadowOffsetY=t.shadowOffsetY),this.refOriginalPosition&&2===this.refOriginalPosition.length||(this.refOriginalPosition=[0,0]);var r=this.refOriginalPosition,n=t.pointList;if(!(n.length<2))if(t.smooth&&"spline"!==t.smooth){var o,i,a,s=LE.SUtil_smoothBezier(n,t.smooth,!0,t.smoothConstraint,r);e.moveTo(n[0][0]+r[0],n[0][1]+r[1]);for(var l=n.length,u=0;ui&&(i=l[u][0]+r[0]),l[u][1]+r[1]s&&(s=l[u][1]+r[1]);return n="stroke"==e.brushType||"fill"==e.brushType?e.lineWidth||1:0,e.__rect={x:Math.round(o-n/2),y:Math.round(a-n/2),width:i-o+n,height:s-a+n},e.__rect}}])&&hT(t.prototype,r),n&&hT(t,n),Object.defineProperty(t,"prototype",{writable:!1}),i}();function gT(e){"@babel/helpers - typeof";return(gT="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function wT(e,t){for(var r=0;rc&&(r*=c/(a=r+n),n*=c/a),o+i>c&&(o*=c/(a=o+i),i*=c/a),n+o>f&&(n*=f/(a=n+o),o*=f/a),r+i>f&&(r*=f/(a=r+i),i*=f/a),e.moveTo(l+r,u),e.lineTo(l+c-n,u),0!==n&&e.quadraticCurveTo(l+c,u,l+c,u+n),e.lineTo(l+c,u+f-o),0!==o&&e.quadraticCurveTo(l+c,u+f,l+c-o,u+f),e.lineTo(l+i,u+f),0!==i&&e.quadraticCurveTo(l,u+f,l,u+f-i),e.lineTo(l,u+r),0!==r&&e.quadraticCurveTo(l,u,l+r,u)}},{key:"buildPath",value:function(e,t){this.refOriginalPosition&&2===this.refOriginalPosition.length||(this.refOriginalPosition=[0,0]);var r=this.refOriginalPosition;t.radius?this._buildRadiusPath(e,t):(e.moveTo(t.x+r[0],t.y+r[1]),e.lineTo(t.x+r[0]+t.width,t.y+r[1]),e.lineTo(t.x+r[0]+t.width,t.y+r[1]+t.height),e.lineTo(t.x+r[0],t.y+r[1]+t.height),e.lineTo(t.x+r[0],t.y+r[1])),e.closePath()}},{key:"getRect",value:function(e){this.refOriginalPosition&&2===this.refOriginalPosition.length||(this.refOriginalPosition=[0,0]);var t,r=this.refOriginalPosition;return e.__rect?e.__rect:(t="stroke"==e.brushType||"fill"==e.brushType?e.lineWidth||1:0,e.__rect={x:Math.round(e.x+r[0]-t/2),y:Math.round(e.y+r[1]-t/2),width:e.width+t,height:e.height+t},e.__rect)}}])&<(t.prototype,r),n&<(t,n),Object.defineProperty(t,"prototype",{writable:!1}),i}();function GT(e){"@babel/helpers - typeof";return(GT="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function UT(e,t){for(var r=0;r1?LE.Util_computeBoundingBox.arc(a,s,l,c,f,!p,r,o):(r[0]=o[0]=a,r[1]=o[1]=s),LE.Util_computeBoundingBox.arc(a,s,u,c,f,!p,n,i),LE.Util_vector.min(r,r,n),LE.Util_vector.max(o,o,i),e.__rect={x:r[0],y:r[1],width:o[0]-r[0],height:o[1]-r[1]},e.__rect}}])&&UT(t.prototype,r),n&&UT(t,n),Object.defineProperty(t,"prototype",{writable:!1}),i}();function WT(e,t){for(var r=0;r=15){var p=parseInt(i.axis3DParameter),h=[o[0]-p,o[1]+p];i.axisUseArrow?(c.push([h[0]+1.5,h[1]-7.5]),c.push([h[0]-1,h[1]+1]),c.push([h[0]+7.5,h[1]-1.5]),f.push([h[0],h[1]])):f.push([h[0],h[1]]),f.push([o[0],o[1]])}f.push([o[2]+5,o[1]])}else{var y=Math.abs(o[1]-o[3])/u,d=o[3];f.push([o[0],d-5]);for(var b=0;b=15){var m=parseInt(i.axis3DParameter),g=[o[0]-m,o[1]+m];i.axisUseArrow?(c.push([g[0]+1.5,g[1]-7.5]),c.push([g[0]-1,g[1]+1]),c.push([g[0]+7.5,g[1]-1.5]),f.push([g[0],g[1]])):f.push([g[0],g[1]]),f.push([o[0],o[1]])}f.push([o[2]+5,o[1]])}if(i.axisUseArrow){var w=[[o[2]+5,o[1]+4],[o[2]+13,o[1]],[o[2]+5,o[1]-4]],O=[[o[0]-4,o[3]-5],[o[0],o[3]-13],[o[0]+4,o[3]-5]],S=new kj(w);S.style={fillColor:"#008acd"},ce.copyAttributesWithClip(S.style,i.axisStyle),s.push(e.createShape(S));var _=new kj(O);if(_.style={fillColor:"#008acd"},ce.copyAttributesWithClip(_.style,i.axisStyle),s.push(e.createShape(_)),i.axis3DParameter&&!isNaN(i.axis3DParameter)&&i.axis3DParameter>=15){var P=new kj(c);P.style={fillColor:"#008acd"},ce.copyAttributesWithClip(P.style,i.axisStyle),s.push(e.createShape(P))}}var x=new gj(f);x.style={strokeLinecap:"butt",strokeLineJoin:"round",strokeColor:"#008acd",strokeWidth:1},i.axisStyle&&ce.copyAttributesWithClip(x.style,i.axisStyle),x.clickable=!1,x.hoverable=!1;var k=[e.createShape(x)],j=[];if(i.axisYLabels&&i.axisYLabels.length&&i.axisYLabels.length>0){var E=i.axisYLabels,T=E.length,C=[0,0];if(i.axisYLabelsOffset&&i.axisYLabelsOffset.length&&(C=i.axisYLabelsOffset),1==T){var R=new Wj(o[0]-5+C[0],o[3]+C[1],E[0]);R.style={labelAlign:"right"},i.axisYLabelsStyle&&ce.copyAttributesWithClip(R.style,i.axisYLabelsStyle),R.clickable=!1,R.hoverable=!1,j.push(e.createShape(R))}else for(var M=o[3],A=Math.abs(o[1]-o[3])/(T-1),L=0;L0){var F=i.axisXLabels,D=F.length,B=[0,0];if(i.axisXLabelsOffset&&i.axisXLabelsOffset.length&&(B=i.axisXLabelsOffset),n&&n.xPositions&&n.xPositions.length&&n.xPositions.length==D)for(var G=n.xPositions,U=0;U=0&&r[o]&&ce.copyAttributesWithClip(a,r[o]),n&&n.length&&void 0!==i)for(var s=n,l=s.length,u=parseFloat(i),c=0;c=u[2]||u[1]<=u[3])&&(this.DVBOrigonPoint=[u[0],u[3]],this.DVBWidth=Math.abs(u[2]-u[0]),this.DVBHeight=Math.abs(u[1]-u[3]),this.DVBCenterPoint=[this.DVBOrigonPoint[0]+this.DVBWidth/2,this.DVBOrigonPoint[1]+this.DVBHeight/2],this.origonPointOffset=[this.DVBOrigonPoint[0]-a[0],this.DVBOrigonPoint[1]-a[1]],!0)}},{key:"resetLocation",value:function(e){e&&(this.lonlat=e);var t=this.getLocalXY(this.lonlat);t[0]+=this.XOffset,t[1]+=this.YOffset,this.location=t;var r=this.width,n=this.height,o=this.location;return this.chartBounds=new be(o[0]-r/2,o[1]+n/2,o[0]+r/2,o[1]-n/2),this.resetLinearGradient(),o}},{key:"resetLinearGradient",value:function(){}},{key:"shapesConvertToRelativeCoordinate",value:function(){for(var e=this.shapes,t=this.location,r=0,n=e.length;r=0?n.push(parseFloat(o[a].toString()).toFixed(r)):n.push(parseFloat(o[a].toString()))}catch(e){throw new Error("not a number")}return n.length===t.length&&n};var cC=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&sC(e,t)}(i,nC);var t,r,n,o=lC(i);function i(e,t,r,n,a){var s;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,i),(s=o.call(this,e,t,r,n,a)).CLASS_NAME="SuperMap.Feature.Theme.Bar",s}return t=i,(r=[{key:"destroy",value:function(){aC(uC(i.prototype),"destroy",this).call(this)}},{key:"assembleShapes",value:function(){var e={showShadow:!0,shadowBlur:8,shadowColor:"rgba(100,100,100,0.8)",shadowOffsetX:2,shadowOffsetY:2},t=this.setting;if(t.barLinearGradient||(t.barLinearGradient=[["#00FF00","#00CD00"],["#00CCFF","#5E87A2"],["#00FF66","#669985"],["#CCFF00","#94A25E"],["#FF9900","#A2945E"]]),t.dataViewBoxParameter||(void 0===t.useAxis||t.useAxis?t.dataViewBoxParameter=[45,15,15,15]:t.dataViewBoxParameter=[5,5,5,5]),this.initBaseParameter()){var r=this.DVBCodomain;this.DVBUnitValue=(r[1]-r[0])/this.DVBHeight;var n=this.dataViewBox,o=this.dataValues;if(!(o.length<1)){for(var i=0,a=o.length;ir[1])return;var s=this.calculateXShapeInfo();if(s){var l=s.xPositions,u=s.width;(void 0===t.useBackground||t.useBackground)&&this.shapes.push(YT.Background(this.shapeFactory,this.chartBox,t)),(void 0===t.useAxis||t.useAxis)&&(this.shapes=this.shapes.concat(YT.GraphAxis(this.shapeFactory,n,t,s)));for(var c=0;c=t.length&&(r%=t.length);var l=t[r][0],u=t[r][1],c=(new Gk).getLinearGradient(a,0,s,0,[[0,l],[1,u]]);o.style.color=c}}}}])&&iC(t.prototype,r),n&&iC(t,n),Object.defineProperty(t,"prototype",{writable:!1}),i}();function fC(e){"@babel/helpers - typeof";return(fC="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function pC(e,t){for(var r=0;rt[1])return;var a=this.calculateXShapeInfo();if(a){var s=a.xPositions,l=a.width;(void 0===e.useBackground||e.useBackground)&&this.shapes.push(YT.Background(this.shapeFactory,this.chartBox,e)),(!e.axis3DParameter||isNaN(e.axis3DParameter)||e.axis3DParameter<15)&&(e.axis3DParameter=20),(void 0===e.useAxis||e.useAxis)&&(this.shapes=this.shapes.concat(YT.GraphAxis(this.shapeFactory,r,e,a)));for(var u=e.bar3DParameter&&!isNaN(e.bar3DParameter)?e.bar3DParameter:10,c=0;c=s[2]||s[1]<=s[3])&&(this.DVBOrigonPoint=[s[0],s[3]],this.DVBWidth=Math.abs(s[2]-s[0]),this.DVBHeight=Math.abs(s[1]-s[3]),this.DVBCenterPoint=[this.DVBOrigonPoint[0]+this.DVBWidth/2,this.DVBOrigonPoint[1]+this.DVBHeight/2],this.origonPointOffset=[this.DVBOrigonPoint[0]-o[0],this.DVBOrigonPoint[1]-o[1]],!0)}}])&&gC(t.prototype,r),n&&gC(t,n),Object.defineProperty(t,"prototype",{writable:!1}),i}();function xC(e){"@babel/helpers - typeof";return(xC="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function kC(e,t){for(var r=0;r0?this.DVBUnitValue=e.maxR/(o[1]-o[0]):this.DVBUnitValue=e.maxR;var i=this.DVBUnitValue,a=n[0]*i+e.minR;if(this.width=2*a,this.height=2*a,this.initBaseParameter()&&(!o||!(n[0]o[1]))){var s=this.DVBCenterPoint,l=new sE(s[0],s[1],a);l.style=YT.ShapeStyleTool(null,e.circleStyle,null,null,0),void 0!==e.fillColor?l.style.fillColor=e.fillColor:l.style.fillColor="#ff9277",l.highlightStyle=YT.ShapeStyleTool(null,e.circleHoverStyle),void 0!==e.circleHoverAble&&(l.hoverable=e.circleHoverAble),void 0!==e.circleClickAble&&(l.clickable=e.circleClickAble),l.refDataID=this.data.id,l.dataInfo={field:this.fields[0],r:a,value:n[0]},this.shapes.push(this.shapeFactory.createShape(l)),this.shapesConvertToRelativeCoordinate()}}}])&&kC(t.prototype,r),n&&kC(t,n),Object.defineProperty(t,"prototype",{writable:!1}),i}();function MC(e){"@babel/helpers - typeof";return(MC="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function AC(e,t){for(var r=0;rr[1])return null;a=l[f],s=t[1]-(o[f]-r[0])/n;var h=new pj(a,s);h.style=YT.ShapeStyleTool({fillColor:"#ee9900"},e.pointStyle,e.pointStyleByFields,e.pointStyleByCodomain,f,o[f]),h.highlightStyle=YT.ShapeStyleTool(null,e.pointHoverStyle),void 0!==e.pointHoverAble&&(h.hoverable=e.pointHoverAble),void 0!==e.pointClickAble&&(h.clickable=e.pointClickAble),h.refDataID=this.data.id,h.dataInfo={field:this.fields[f],value:o[f]},c.push(this.shapeFactory.createShape(h));var y=[a,s];u.push(y)}var d=new gj(u);d.style=YT.ShapeStyleTool({strokeColor:"#ee9900"},e.lineStyle),d.clickable=!1,d.hoverable=!1;var b=this.shapeFactory.createShape(d);this.shapes.push(b),this.shapes=this.shapes.concat(c),this.shapesConvertToRelativeCoordinate()}}}}},{key:"calculateXShapeInfo",value:function(){var e,t=this.dataViewBox,r=this.setting,n=this.dataValues.length;if(n<1)return null;var o=[],i=this.DVBWidth,a=0;if(r.xShapeBlank&&r.xShapeBlank.length&&2==r.xShapeBlank.length){var s=i-((e=r.xShapeBlank)[0]+e[1]);if(s<=n)return null;a=s/(n-1)}else e=[a=i/(n+1),a,a];for(var l=0,u=0;un[1])return;for(var i=0,a=0;a=360&&(c=359.9999999);var d=new Gj(l[0],l[1],p,u,c);if(void 0===e.sectorStyleByFields){var b=h%t.length;d.style=YT.ShapeStyleTool(null,e.sectorStyle,t,null,b)}else d.style=YT.ShapeStyleTool(null,e.sectorStyle,e.sectorStyleByFields,e.sectorStyleByCodomain,h,r[h]);d.highlightStyle=YT.ShapeStyleTool(null,e.sectorHoverStyle),void 0!==e.sectorHoverAble&&(d.hoverable=e.sectorHoverAble),void 0!==e.sectorClickAble&&(d.clickable=e.sectorClickAble),d.refDataID=this.data.id,d.dataInfo={field:this.fields[h],value:r[h]},this.shapes.push(this.shapeFactory.createShape(d)),u=c}this.shapesConvertToRelativeCoordinate()}}}}])&&GC(t.prototype,r),n&&GC(t,n),Object.defineProperty(t,"prototype",{writable:!1}),i}();function HC(e){"@babel/helpers - typeof";return(HC="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function WC(e,t){for(var r=0;rr[1])return null;a=l[u],s=t[1]-(o[u]-r[0])/n;var f=new pj(a,s);f.style=YT.ShapeStyleTool({fillColor:"#ee9900"},e.pointStyle,e.pointStyleByFields,e.pointStyleByCodomain,u,o[u]),f.highlightStyle=YT.ShapeStyleTool(null,e.pointHoverStyle),void 0!==e.pointHoverAble&&(f.hoverable=e.pointHoverAble),void 0!==e.pointClickAble&&(f.clickable=e.pointClickAble),f.refDataID=this.data.id,f.dataInfo={field:this.fields[u],value:o[u]},this.shapes.push(this.shapeFactory.createShape(f))}this.shapesConvertToRelativeCoordinate()}}}},{key:"calculateXShapeInfo",value:function(){var e,t=this.dataViewBox,r=this.setting,n=this.dataValues.length;if(n<1)return null;var o=[],i=this.DVBWidth,a=0;if(r.xShapeBlank&&r.xShapeBlank.length&&2==r.xShapeBlank.length){var s=i-((e=r.xShapeBlank)[0]+e[1]);if(s<=n)return null;a=s/(n-1)}else e=[a=i/(n+1),a,a];for(var l=0,u=0;un[1])return;for(var i=0,a=0;a=0&&t.innerRingRadius0){var u=i[i.length-1];if(Math.abs(u[0]-n[0])<=a&&Math.abs(u[1]-n[1])<=a)continue}i.push(n)}if(i.length<2)return null;var c=new Object;(c=ce.copyAttributesWithClip(c,this.style,["pointList"])).pointList=i;var f=new xT({style:c,clickable:this.isClickAble,hoverable:this.isHoverAble});this.highlightStyle&&(f.highlightStyle=this.highlightStyle),f.refOriginalPosition=this.location,f.refDataID=this.data.id,f.isHoverByRefDataID=this.isMultiHover,this.shapeOptions&&ce.copyAttributesWithClip(f,this.shapeOptions),this.shapes.push(f)}},{key:"multiPointToTF",value:function(e){for(var t=e.components,r=[],n=[],o=this.location,i=[],a=this.nodesClipPixel,s=0;s0){var u=i[i.length-1];if(Math.abs(u[0]-n[0])<=a&&Math.abs(u[1]-n[1])<=a)continue}i.push(n);var c=new Object;c.r=6,(c=ce.copyAttributesWithClip(c,this.style)).x=n[0],c.y=n[1];var f=new ZE({style:c,clickable:this.isClickAble,hoverable:this.isHoverAble});this.highlightStyle&&(f.highlightStyle=this.highlightStyle),f.refOriginalPosition=o,f.refDataID=this.data.id,f.isHoverByRefDataID=this.isMultiHover,this.shapeOptions&&ce.copyAttributesWithClip(f,this.shapeOptions),this.shapes.push(f)}}},{key:"multiLineStringToTF",value:function(e){for(var t=e.components,r=0;r0){var p=i[i.length-1];if(Math.abs(p[0]-n[0])<=l&&Math.abs(p[1]-n[1])<=l)continue}i.push(n)}}else{a=[];for(var h=0;h0){var y=a[a.length-1];if(Math.abs(y[0]-n[0])<=l&&Math.abs(y[1]-n[1])<=l)continue}a.push(n)}}a.length<2||s.push(a)}if(!(i.length<2)){var d={};(d=ce.copyAttributesWithClip(d,this.style,["pointList"])).pointList=i;var b=new mT({style:d,clickable:this.isClickAble,hoverable:this.isHoverAble});this.highlightStyle&&(b.highlightStyle=this.highlightStyle),b.refOriginalPosition=this.location,b.refDataID=this.data.id,b.isHoverByRefDataID=this.isMultiHover,s.length>0&&(b.holePolygonPointLists=s),this.shapeOptions&&ce.copyAttributesWithClip(b,this.shapeOptions),this.shapes.push(b)}}},{key:"rectangleToTF",value:function(e){var t=this.location,r=new ye(e.x,e.y),n=this.layer.map.getResolution(),o=this.getLocalXY(r),i=new Object;i.r=6,(i=ce.copyAttributesWithClip(i,this.style)).x=o[0]-t[0],i.y=o[1]-t[1]-2*e.width/n,i.width=e.width/n,i.height=e.height/n;var a=new BT({style:i,clickable:this.isClickAble,hoverable:this.isHoverAble});this.highlightStyle&&(a.highlightStyle=this.highlightStyle),a.refOriginalPosition=t,a.refDataID=this.data.id,a.isHoverByRefDataID=this.isMultiHover,this.shapeOptions&&ce.copyAttributesWithClip(a,this.shapeOptions),this.shapes.push(a)}},{key:"geoTextToTF",value:function(e){var t=this.location,r=this.getLocalXY(e),n=new Object;n.r=6,(n=ce.copyAttributesWithClip(n,this.style,["x","y","text"])).x=r[0]-t[0],n.y=r[1]-t[1],n.text=e.text;var o=new oT({style:n,clickable:this.isClickAble,hoverable:this.isHoverAble});this.highlightStyle&&(o.highlightStyle=this.highlightStyle),o.refOriginalPosition=t,o.refDataID=this.data.id,o.isHoverByRefDataID=this.isMultiHover,this.shapeOptions&&ce.copyAttributesWithClip(o,this.shapeOptions),this.shapes.push(o)}},{key:"updateAndAddShapes",value:function(){var e=this.getLocalXY(this.lonlat);this.location=e;for(var t=this.layer.renderer,r=0,n=this.shapes.length;r0}},{key:"addRoot",value:function(e){e instanceof SR&&e.addChildrenToStorage(this),this.addToMap(e),this._roots.push(e)}},{key:"delRoot",value:function(e){if(void 0===e){for(var t=0;t=0&&(this.delFromMap(i.id),this._roots.splice(a,1),i instanceof SR&&i.delChildrenFromStorage(this))}}},{key:"addToMap",value:function(e){return e instanceof SR&&(e._storage=this),e.modSelf(),this._elements[e.id]=e,this}},{key:"get",value:function(e){return this._elements[e]}},{key:"delFromMap",value:function(e){var t=this._elements[e];return t&&(delete this._elements[e],t instanceof SR&&(t._storage=null)),this}},{key:"dispose",value:function(){this._elements=null,this._roots=null,this._hoverElements=null}}])&&_R(t.prototype,r),n&&_R(t,n),Object.defineProperty(t,"prototype",{writable:!1}),e}();function xR(e){"@babel/helpers - typeof";return(xR="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function kR(e,t){return(kR=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function jR(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var r,n=ER(e);if(t){var o=ER(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return function(e,t){if(t&&("object"===xR(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,r)}}function ER(e){return(ER=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function TR(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function CR(e,t){for(var r=0;r0&&e>this._zlevelList[0]){for(o=0;oe);o++);n=this._layers[this._zlevelList[o]]}this._zlevelList.splice(o+1,0,e),t=new AR(ce.createUniqueID("_levelLayer_"+e),this);var i=n?n.dom:this._bgDom;i.nextSibling?i.parentNode.insertBefore(t.dom,i.nextSibling):i.parentNode.appendChild(t.dom),t.initContext(),this._layers[e]=t,this._layerConfig[e]&&(new Dk).merge(t,this._layerConfig[e],!0),t.updateTransform()}return t}},{key:"getLayers",value:function(){return this._layers}},{key:"_updateLayerStatus",value:function(e){var t=this._layers,r={};for(var n in t)"hover"!==n&&(r[n]=t[n].elCount,t[n].elCount=0);for(var o=0;o0?1.1:1/1.1,r=this.painter.getLayers(),n=!1;for(var o in r)if("hover"!==o){var i=r[o],a=i.position;if(i.zoomable){i.__zoom=i.__zoom||1;var s=i.__zoom;s*=t,t=(s=Math.max(Math.min(i.maxZoom,s),i.minZoom))/i.__zoom,i.__zoom=s,a[0]-=(this._mouseX-a[0])*(t-1),a[1]-=(this._mouseY-a[1])*(t-1),i.scale[0]*=t,i.scale[1]*=t,i.dirty=!0,n=!0}}n&&this.painter.refresh(),this._dispatchAgency(this._lastHover,kE.EVENT.MOUSEWHEEL,e),this._mousemoveHandler(e)},mousemove:function(e){this._clickThreshold++,e=this._zrenderEventFixed(e),this._lastX=this._mouseX,this._lastY=this._mouseY,this._mouseX=LE.Util_event.getX(e),this._mouseY=LE.Util_event.getY(e);var t=this._mouseX-this._lastX,r=this._mouseY-this._lastY;this._processDragStart(e),this._hasfound=0,this._event=e,this._iterateAndFindHover(),this._hasfound||((!this._draggingTarget||this._lastHover&&this._lastHover!=this._draggingTarget)&&(this._processOutShape(e),this._processDragLeave(e)),this._lastHover=null,this.storage.delHover(),this.painter.clearHover());var n="";if(this._draggingTarget)this.storage.drift(this._draggingTarget.id,t,r),this._draggingTarget.modSelf(),this.storage.addHover(this._draggingTarget);else if(this._isMouseDown){var o=this.painter.getLayers(),i=!1;for(var a in o)if("hover"!==a){var s=o[a];s.panable&&(n="move",s.position[0]+=t,s.position[1]+=r,i=!0,s.dirty=!0)}i&&this.painter.refresh()}this._draggingTarget||this._hasfound&&this._lastHover.draggable?n="move":this._hasfound&&this._lastHover.clickable&&(n="pointer"),this.root.style.cursor=n,this._dispatchAgency(this._lastHover,kE.EVENT.MOUSEMOVE,e),(this._draggingTarget||this._hasfound||this.storage.hasHoverShape())&&this.painter.refreshHover()},mouseout:function(e){var t=(e=this._zrenderEventFixed(e)).toElement||e.relatedTarget;if(t!=this.root)for(;t&&9!=t.nodeType;){if(t==this.root)return void this._mousemoveHandler(e);t=t.parentNode}e.zrenderX=this._lastX,e.zrenderY=this._lastY,this.root.style.cursor="",this._isMouseDown=0,this._processOutShape(e),this._processDrop(e),this._processDragEnd(e),this.painter.refreshHover(),this.dispatch(kE.EVENT.GLOBALOUT,e)},mousedown:function(e){if(this._clickThreshold=0,2==this._lastDownButton)return this._lastDownButton=e.button,void(this._mouseDownTarget=null);this._lastMouseDownMoment=new Date,e=this._zrenderEventFixed(e),this._isMouseDown=1,this._mouseDownTarget=this._lastHover,this._dispatchAgency(this._lastHover,kE.EVENT.MOUSEDOWN,e),this._lastDownButton=e.button},mouseup:function(e){e=this._zrenderEventFixed(e),this.root.style.cursor="",this._isMouseDown=0,this._mouseDownTarget=null,this._dispatchAgency(this._lastHover,kE.EVENT.MOUSEUP,e),this._processDrop(e),this._processDragEnd(e)},touchstart:function(e){e=this._zrenderEventFixed(e,!0),this._lastTouchMoment=new Date,this._mobildFindFixed(e),this._mousedownHandler(e)},touchmove:function(e){e=this._zrenderEventFixed(e,!0),this._mousemoveHandler(e),this._isDragging&&LE.Util_event.stop(e)},touchend:function(e){e=this._zrenderEventFixed(e,!0),this._mouseupHandler(e);var t=new Date;t-this._lastTouchMoment=0;o--){var i=r[o];if(void 0!==i.zlevel&&(e=this.painter.getLayer(i.zlevel,e),n[0]=this._mouseX,n[1]=this._mouseY,e.needTransform&&(LE.Util_matrix.invert(t,e.transform),LE.Util_vector.applyTransform(n,n,t))),this._findHover(i,n[0],n[1]))break}}},{key:"_mobildFindFixed",value:function(e){var t=[{x:10},{x:-20},{x:10,y:10},{y:-20}];this._lastHover=null,this._mouseX=e.zrenderX,this._mouseY=e.zrenderY,this._event=e,this._iterateAndFindHover();for(var r=0;!this._lastHover&&r=0&&this._clips.splice(t,1)}},{key:"_update",value:function(){for(var e=(new Date).getTime(),t=e-this._time,r=this._clips,n=r.length,o=[],i=[],a=0;a=0&&!(d[w]<=a);w--);w=Math.min(w,u-2)}else{for(w=k;wa);w++);w=Math.min(w-1,u-2)}k=w,j=a;var s=d[w+1]-d[w];if(0!==s){var c,y;for(O=(a-d[w])/s,i?(_=b[w],S=b[0===w?w:w-1],P=b[w>u-2?u-1:w+1],x=b[w>u-3?u-1:w+2],f?$R._catmullRomInterpolateArray(S,_,P,x,O,O*O,O*O*O,n(e,l),h):(c=p?$R.rgba2String(E):$R._catmullRomInterpolate(S,_,P,x,O,O*O,O*O*O),r(e,l,c))):f?$R._interpolateArray(b[w],b[w+1],O,n(e,l),h):(p?($R._interpolateArray(b[w],b[w+1],O,E,1),y=$R.rgba2String(E)):y=$R._interpolateNumber(b[w],b[w+1],O),r(e,l,y)),w=0;w1&&void 0!==arguments[1]?arguments[1]:"warring";"success"===t?(this.icon.setAttribute("class","supermapol-icons-message-success"),this.messageBoxContainer.setAttribute("class","component-messageboxcontainer component-border-bottom-green")):"failure"===t?(this.icon.setAttribute("class","supermapol-icons-message-failure"),this.messageBoxContainer.setAttribute("class","component-messageboxcontainer component-border-bottom-red")):"warring"===t&&(this.icon.setAttribute("class","supermapol-icons-message-warning"),this.messageBoxContainer.setAttribute("class","component-messageboxcontainer component-border-bottom-orange")),this.messageBox.innerHTML=e,this.messageBoxContainer.hidden=!1}}])&&uM(t.prototype,r),n&&uM(t,n),Object.defineProperty(t,"prototype",{writable:!1}),e}(),fM=function(){try{return echarts}catch(e){return{}}}(),pM=r.n(fM),hM={"en-US":{title_dataFlowService:"Data Flow Service",title_distributedAnalysis:"Distributed Analysis",title_clientComputing:"Client Computing",title_dataServiceQuery:"Data Service Query",title_searchCity:"Search city",title_searchLayer:" Search layer",text_input_value_inputDataFlowUrl:"Please enter the data stream service address such as: ws://{serviceRoot}/{dataFlowName}/dataflow/subscribe",text_displayFeaturesInfo:"Display feature information",text_subscribe:"subscribe",text_cancelSubscribe:"unsubscribe",text_densityAnalysis:"Density Analysis",text_CalculateTheValuePerUnitArea:"Calculate the value per unit area within the neighborhood shape",text_option_selectDataset:"Please select a dataset",text_label_dataset:"Dataset",text_option_simplePointDensityAnalysis:"Simple point density analysis",text_option_nuclearDensityAnalysis:"Nuclear density analysis",text_label_analyticalMethod:"Analytical method",text_option_quadrilateral:"Quadrilateral",text_option_hexagon:"hexagon",text_label_meshType:"Mesh type",text_option_notSet:"Not set",text_label_weightField:"Weight field",text_label_gridSizeInMeters:"Grid size",text_label_searchRadius:"Search radius",text_label_queryRange:"Scope of analysis",text_label_areaUnit:"Area unit",text_option_equidistantSegmentation:"Equidistant segmentation",text_option_logarithm:"Logarithm",text_option_equalCountingSegment:"Equal counting segment",text_option_squareRootSegmentation:"Square root segmentation",text_label_thematicMapSegmentationMode:"Thematic map segmentation mode",text_label_thematicMapSegmentationParameters:"Thematic map segmentation parameters",text_option_greenOrangePurpleGradient:"Green orange purple gradient",text_option_greenOrangeRedGradient:"Green orange red gradient",text_option_rainbowGradient:"Rainbow gradient",text_option_spectralGradient:"Spectral gradient",text_option_terrainGradient:"Terrain gradient",text_label_thematicMapColorGradientMode:"Thematic map color gradient mode",text_label_resultLayerName:"Result layer name",text_chooseFile:"Open File",text_isoline:"Isoline",text_extractDiscreteValue:"Extract discrete value generation curve",text_buffer:"Buffer",text_specifyTheDistance:"Specify the distance to create the surrounding area",text_label_analysisLayer:"Analysis layer",text_label_extractField:"Extract field",text_label_extractedValue:"Extracted value",text_label_distanceAttenuation:"Distance attenuation",text_label_gridSize:"gridSize",text_label_bufferRadius:"Buffer radius",text_label_defaultkilometers:"Default 10 kilometers",text_label_kilometer:"kilometer",text_label_unit:"unit",text_retainOriginal:"Retain original object field",text_mergeBuffer:"Merge buffer",text_label_color:"Color",text_label_buffer:"[Buffer]",text_label_isolines:"[Isolines]",text_label_queryRangeTips:"The default is the full range of input data. Example: -74.050, 40.650, -73.850, 40.850",text_label_queryModel:"Query mode",text_label_IDArrayOfFeatures:"ID array of features",text_label_maxFeatures:"The maximum number of features that can be returned",text_label_bufferDistance:"Buffer distance",text_label_queryRange1:"Query range",text_label_spatialQueryMode:"Spatial query mode",text_label_featureFilter:"Feature filter",text_label_geometricObject:"Geometric object",text_label_queryMode:"Query mode",text_label_searchTips:"Search for city locations or layer features",text_label_chooseSearchLayers:"Select a query layer",text_loadSearchCriteria:"Load search criteria",text_saveSearchCriteria:"Save search criteria",btn_analyze:"Analyze",btn_analyzing:"Analyzing",btn_emptyTheAnalysisLayer:"Empty the analysis layer",btn_cancelAnalysis:"Cancel",btn_query:"Query",btn_querying:"Querying",btn_emptyTheRresultLayer:"Clear all result layers","msg_dataReturnedIsEmpty.":"The request is successful and the data returned by the query is empty.",msg_dataFlowServiceHasBeenSubscribed:"The data stream service has been subscribed to.",msg_inputDataFlowUrlFirst:"Please enter the data stream service address first.",msg_datasetOrMethodUnsupport:"This dataset does not support this analysis type. Please reselect the dataset.",msg_selectDataset:"Please select a data set!",msg_setTheWeightField:"Please set the weight field!",msg_theFieldNotSupportAnalysis:"The field you currently select does not support analysis!",msg_resultIsEmpty:"The result of the analysis is empty!",msg_openFileFail:"Failed to open file!",msg_fileTypeUnsupported:"File format is not supported!",msg_fileSizeExceeded:"File size exceeded! The file size should not exceed 10M!",msg_dataInWrongGeoJSONFormat:"Wrong data format! Non standard GEOJSON format data!",msg_dataInWrongFormat:"Wrong data format! Non standard EXCEL, CSV or GEOJSON format data!",msg_searchKeywords:"Search keywords cannot be empty. Please enter your search criteria.",msg_searchGeocodeField:"Did not match the address matching service data!",msg_cityGeocodeField:"The address matching service of the current city is not configured.",msg_getFeatureField:"No related vector features found!",msg_dataflowservicesubscribed:"The data stream service has been subscribed to.",msg_subscribesucceeded:"The data stream service subscription was successful.",msg_crsunsupport:"Does not support the coordinate system of the current map",msg_tilematrixsetunsupport:"Incoming TileMatrixSet is not supported",msg_jsonResolveFiled:"JSON format parsing failure!",msg_requestContentFiled:"Failed to request data through iportal!",msg_getdatafailed:"Failed to get data!"},"zh-CN":{title_dataFlowService:"数据流服务",title_distributedAnalysis:"分布式分析",title_clientComputing:"客户端计算",title_dataServiceQuery:"数据服务查询",title_searchCity:"搜索城市",title_searchLayer:"搜索图层",text_input_value_inputDataFlowUrl:"请输入数据流服务地址如:ws://{serviceRoot}/{dataFlowName}/dataflow/subscribe",text_displayFeaturesInfo:"显示要素信息",text_subscribe:"订阅",text_cancelSubscribe:"取消订阅",text_densityAnalysis:"密度分析",text_CalculateTheValuePerUnitArea:"计算点指定邻域形状内的每单位面积量值",text_option_selectDataset:"请选择数据集",text_label_dataset:"数据集",text_option_simplePointDensityAnalysis:"简单点密度分析",text_option_nuclearDensityAnalysis:"核密度分析",text_label_analyticalMethod:"分析方法",text_option_quadrilateral:"四边形",text_option_hexagon:"六边形",text_label_meshType:"网格面类型",text_option_notSet:"未设置",text_label_weightField:"权重字段",text_label_gridSizeInMeters:"网格大小",text_label_searchRadius:"搜索半径",text_label_queryRange:"分析范围",text_label_areaUnit:"面积单位",text_option_equidistantSegmentation:"等距离分段",text_option_logarithm:"对数",text_option_equalCountingSegment:"等计数分段",text_option_squareRootSegmentation:"平方根分段",text_label_thematicMapSegmentationMode:"专题图分段模式",text_label_thematicMapSegmentationParameters:"专题图分段参数",text_option_greenOrangePurpleGradient:"绿橙紫渐变",text_option_greenOrangeRedGradient:"绿橙红渐变",text_option_rainbowGradient:"彩虹渐变",text_option_spectralGradient:"光谱渐变",text_option_terrainGradient:"地形渐变",text_label_thematicMapColorGradientMode:"专题图颜色渐变模式",text_label_resultLayerName:"结果图层名称",text_chooseFile:"选择文件",text_isoline:"等值线",text_extractDiscreteValue:"提取离散值生成曲线",text_buffer:"缓冲区",text_specifyTheDistance:"指定距离创建周边区域",text_label_analysisLayer:"分析图层",text_label_extractField:"提取字段",text_label_extractedValue:"提取值",text_label_distanceAttenuation:"距离衰减",text_label_gridSize:"栅格大小",text_label_bufferRadius:"缓冲半径",text_label_defaultkilometers:"默认10千米",text_option_kilometer:"千米",text_label_unit:"单位",text_retainOriginal:"保留原对象字段属性",text_mergeBuffer:"合并缓冲区",text_label_color:"颜色",text_label_buffer:"[缓冲区]",text_label_isolines:"[等值线]",text_label_queryRangeTips:"默认为输入数据的全幅范围。范例:-74.050,40.650,-73.850,40.850",text_label_IDArrayOfFeatures:"要素 ID 数组",text_label_maxFeatures:"最多可返回的要素数量",text_label_bufferDistance:"缓冲区距离",text_label_queryRange1:"查询范围",text_label_spatialQueryMode:"空间查询模式",text_label_featureFilter:"要素过滤器",text_label_geometricObject:"几何对象",text_label_queryMode:"查询模式",text_label_searchTips:"搜索城市地点或图层要素",text_label_chooseSearchLayers:"选择查询图层",text_loadSearchCriteria:"加载搜索条件",text_saveSearchCriteria:"保存搜索条件",btn_analyze:"分析",btn_analyzing:"分析中",btn_emptyTheAnalysisLayer:"清空分析图层",btn_cancelAnalysis:"取消",btn_query:"查询",btn_querying:"查询中",btn_emptyTheRresultLayer:"清除所有结果图层",msg_dataFlowServiceHasBeenSubscribed:"已订阅该数据流服务。",msg_inputDataFlowUrlFirst:"请先输入数据流服务地址。",msg_datasetOrMethodUnsupport:"该数据集不支持本分析类型,请重新选择数据集",msg_selectDataset:"请选择数据集!",msg_setTheWeightField:"请设置权重字段!",msg_theFieldNotSupportAnalysis:"您当前选择的字段不支持分析!",msg_resultIsEmpty:"分析的结果为空!",msg_dataReturnedIsEmpty:"请求成功,查询返回的数据为空。",msg_openFileFail:"打开文件失败!",msg_fileTypeUnsupported:"不支持该文件格式!",msg_fileSizeExceeded:"文件大小超限!文件大小不得超过 10M!",msg_dataInWrongGeoJSONFormat:"数据格式错误!非标准的 GEOJSON 格式数据!",msg_dataInWrongFormat:"数据格式错误!非标准的 EXCEL, CSV 或 GEOJSON 格式数据!",msg_searchKeywords:"搜索关键字不能为空,请输入搜索条件。",msg_searchGeocodeField:"未匹配到地址匹配服务数据!",msg_cityGeocodeField:"未配置当前城市的地址匹配服务。",msg_getFeatureField:"未查找到相关矢量要素!",msg_dataflowservicesubscribed:"已订阅该数据流服务。",msg_subscribesucceeded:"数据流服务订阅成功。",msg_crsunsupport:"不支持当前地图的坐标系",msg_tilematrixsetunsupport:"不支持传入的TileMatrixSet",msg_jsonResolveFiled:"json格式解析失败!",msg_requestContentFiled:"通过iportal请求数据失败!",msg_getdatafailed:"获取数据失败!"},code:null,defaultCode:"en-US",getCode:function(){return hM.code||hM.setCode(),hM.code},setCode:function(){var e=this.getLanguageFromCookie();e?hM.code=e:(e=hM.defaultCode,0===(e="Netscape"===navigator.appName?navigator.language:navigator.browserLanguage).indexOf("zh")&&(e="zh-CN"),0===e.indexOf("en")&&(e="en-US"),hM.code=e)},getLanguageFromCookie:function(){for(var e=document.cookie.split(";"),t=0;t0){var a=i.SheetNames[0],s=yM.utils.sheet_to_csv(i.Sheets[a]);t&&t.call(n,s)}}catch(e){r&&r.call(n,e)}},o.onerror=function(e){r&&r.call(n,e)},this.rABF&&o.readAsArrayBuffer(e.file)},processDataToGeoJson:function(e,t,r,n,o){var i=null;if("EXCEL"===e||"CSV"===e)i=this.processExcelDataToGeoJson(t),r&&r.call(o,i);else if("JSON"===e||"GEOJSON"===e){var a=t;"string"==typeof a&&(a=JSON.parse(a)),"ISERVER"===a.type?i=a.data.recordsets[0].features:"FeatureCollection"===a.type?i=a:n&&n.call(o,hM.i18n("msg_dataInWrongGeoJSONFormat")),r&&r.call(o,i)}else n&&n.call(o,hM.i18n("msg_dataInWrongFormat"))},processExcelDataToGeoJson:function(e){for(var t=this.string2Csv(e),r=t.colTitles,n=-1,o=-1,i=0,a=r.length;i0?(n.dataItemServices.forEach(function(n){if("RESTDATA"===n.serviceType&&"PUBLISHED"===n.serviceStatus)o=n;else{if("RESTMAP"!==n.serviceType||"PUBLISHED"!==n.serviceStatus)return void r.getDatafromContent(e,t);o=n}}),o&&r.getDatafromRest(o.serviceType,o.address,t)):r.getDatafromContent(e,t):r._fireFailedEvent(n)}).catch(function(e){console.log(e),r._fireFailedEvent(e)})}},{key:"getDatafromContent",value:function(e,t){var r=this,n={result:{}},o=this;e+="/content.json?pageSize=9999999¤tPage=1",an.get(e,null,{withCredentials:this.datasets.withCredentials}).then(function(e){return e.json()}).then(function(e){if(!1!==e.succeed){if(e.type){if("JSON"===e.type||"GEOJSON"===e.type){if(e.content=JSON.parse(e.content.trim()),!e.content.features)return void console.log(hM.i18n("msg_jsonResolveFiled"));var i=r._formatGeoJSON(e.content);n.result.features={type:e.content.type,features:i}}else if("EXCEL"===e.type||"CSV"===e.type){var a=r._excelData2Feature(e.content);n.result.features={type:"FeatureCollection",features:a}}t(n,"content")}}else o._fireFailedEvent(e)},this).catch(function(e){console.log(e),o._fireFailedEvent(e)})}},{key:"getDatafromRest",value:function(e,t,r){var n=this,o=this.datasets.withCredentials;if("RESTDATA"===e){var i,a,s="".concat(t,"/data/datasources");an.get(s,null,{withCredentials:o}).then(function(e){return e.json()}).then(function(e){i=e.datasourceNames[0],s="".concat(t,"/data/datasources/").concat(i,"/datasets"),an.get(s,null,{withCredentials:o}).then(function(e){return e.json()}).then(function(e){return a=e.datasetNames[0],n.getDatafromRestData("".concat(t,"/data"),[i+":"+a],r),[i+":"+a]}).catch(function(e){n._fireFailedEvent(e)})}).catch(function(e){n._fireFailedEvent(e)})}else{var l,u,c,f="".concat(t,"/maps");an.get(f,null,{withCredentials:o}).then(function(e){return e.json()}).then(function(e){l=e[0].name,c=e[0].path,f=f="".concat(t,"/maps/").concat(l,"/layers"),an.get(f,null,{withCredentials:o}).then(function(e){return e.json()}).then(function(e){return u=e[0].subLayers.layers[0].caption,n.getDatafromRestMap(u,c,r),u}).catch(function(e){n._fireFailedEvent(e)})}).catch(function(e){n._fireFailedEvent(e)})}}},{key:"getDatafromRestData",value:function(e,t,r){var n=this;this.datasets.queryInfo.attributeFilter=this.datasets.queryInfo.attributeFilter||"SmID>0",this._getFeatureBySQL(e,t,this.datasets.queryInfo,function(e){r(e,"RESTDATA")},function(e){console.log(e),n._fireFailedEvent(e)})}},{key:"getDatafromRestMap",value:function(e,t,r){var n=this;this.datasets.queryInfo.attributeFilter=this.datasets.queryInfo.attributeFilter||"smid=1",this._queryFeatureBySQL(t,e,this.datasets.queryInfo,null,null,function(e){r(e,"RESTMAP")},function(e){console.log(e),n._fireFailedEvent(e)})}},{key:"_getFeatureBySQL",value:function(e,t,r,n,o){var i,a,s={name:t.join().replace(":","@")};Object.assign(s,r),i=new ui(s),a=new zh({queryParameter:i,datasetNames:t,fromIndex:0,toIndex:1e5,returnContent:!0}),new Qh(e,{eventListeners:{processCompleted:function(e){n&&n(e)},processFailed:function(e){o&&o(e)}}}).processAsync(a)}},{key:"_queryFeatureBySQL",value:function(e,t,r,n,o,a,s,l,u,c){var f,p,h={name:t};Object.assign(h,r),f=new ui(h),n&&(f.fields=n);var y={queryParams:[f]};c&&(y.queryOption=i.ATTRIBUTE),l&&(y.startRecord=l),u&&(y.expectCount=u),o&&(y.prjCoordSys={epsgCode:o}),p=new sw(y),this._queryBySQL(e,p,function(e){"processCompleted"===e.type?a(e):s(e)})}},{key:"_queryBySQL",value:function(e,t,r,n){new yw(e,{eventListeners:{scope:this,processCompleted:r,processFailed:r},format:this._processFormat(n)}).processAsync(t)}},{key:"_processFormat",value:function(e){return e||t.GEOJSON}},{key:"_formatGeoJSON",value:function(e){var t=e.features;return t.forEach(function(e,t){e.properties.index=t}),t}},{key:"_excelData2Feature",value:function(e){for(var t=e.colTitles,r=-1,n=-1,o=0,i=t.length;o=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,s=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){s=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(s)throw i}}}}function gM(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r0&&e.forEach(function(e){e.xAxis&&t.xField.push({field:e.xAxis.field,name:e.xAxis.name}),e.yAxis&&t.yField.push({field:e.yAxis.field,name:e.yAxis.name})})}},{key:"getDatasetInfo",value:function(e){var t=this;this.createChart=e,this.datasets&&this._checkUrl(this.datasets.url)&&(this.chartModel=new vM(this.datasets),"iServer"===this.datasets.type?this.chartModel.getDatasetInfo(this._getDatasetInfoSuccess.bind(this)):"iPortal"===this.datasets.type&&this.chartModel.getDataInfoByIptl(this._getDataInfoSuccess.bind(this)),this.chartModel.events.on({getdatafailed:function(e){t.events.triggerEvent("getdatafailed",e)}}))}},{key:"_getDatasetInfoSuccess",value:function(e){var t=this.datasets.url,r=t.indexOf("rest");if(r>0){var n=t.indexOf("/",r+5),o=t.substring(r+5,n),i=t.substring(0,r+4)+"/data";if("maps"===o){var a=t.indexOf("/",n+1),s=t.substring(n+1,a);i=t.substring(0,r+4)+"/maps/"+s,e.result.dataUrl=i,this._getLayerFeatures(e)}else"data"===o&&(e.result.dataUrl=i,this._getDataFeatures(e))}}},{key:"_getDataInfoSuccess",value:function(e,t){"RESTMAP"===t?this._getChartDatasFromLayer(e):this._getChartDatas(e)}},{key:"_getDataFeatures",value:function(e){this.chartModel.getDataFeatures(e,this._getChartDatas.bind(this))}},{key:"_getLayerFeatures",value:function(e){this.chartModel.getLayerFeatures(e,this._getChartDatasFromLayer.bind(this))}},{key:"_getChartDatas",value:function(e){if(e){this.features=e.result.features;var t=this.features.features,r={};if(t.length){var n=t[0],o=[],i=[];for(var a in n.properties)o.push(a),i.push(this._getDataType(n.properties[a]));for(var s in r={features:t,fieldCaptions:o,fieldTypes:i,fieldValues:[]},i){var l=[];for(var u in t){var c=t[u],f=r.fieldCaptions[s],p=c.properties[f];l.push(p)}r.fieldValues.push(l)}this.createChart(r)}}}},{key:"_getChartDatasFromLayer",value:function(e){if(e.result.recordsets){var t=e.result.recordsets[0],r=t.features.features;this.features=t.features;var n={};if(r.length){for(var o in(n={features:t.features,fieldCaptions:t.fieldCaptions,fieldTypes:t.fieldTypes,fieldValues:[]}).fieldCaptions){var i=[];for(var a in r){var s=r[a],l=n.fieldCaptions[o],u=s.properties[l];i.push(u)}n.fieldValues.push(i)}this.createChart(n)}}}},{key:"_createChartOptions",value:function(e){return this.calculatedData=this._createChartDatas(e),this.updateChartOptions(this.chartType)}},{key:"changeType",value:function(e){if(e!==this.chartType)return this.chartType=e,this.updateChartOptions(this.chartType)}},{key:"updateData",value:function(e,t,r){this.updateChart=r,this.xField=[],this.yField=[],this._initXYField(t),e.type=e.type||"iServer",e.withCredentials=e.withCredentials||!1,this.datasets=e,this.getDatasetInfo(this._updateDataSuccess.bind(this))}},{key:"_updateDataSuccess",value:function(e){var t=this._createChartOptions(e);this.updateChart(t)}},{key:"updateChartOptions",value:function(e,t){if(this.calculatedData){var r=this.grid,n=this._createChartSeries(this.calculatedData,e),o=[];for(var i in this.calculatedData.XData)o.push({value:this.calculatedData.XData[i].fieldsData});var a={type:"category",name:this.xField[0].name||"X",data:o,nameTextStyle:{color:"#fff",fontSize:14},splitLine:{show:!1},axisLine:{lineStyle:{color:"#eee"}}},s={type:"value",name:this.yFieldName||"Y",data:{},nameTextStyle:{color:"#fff",fontSize:14},splitLine:{show:!1},axisLine:{lineStyle:{color:"#eee"}}},l={formatter:"{b0}: {c0}"},u="#404a59";return t&&(t.grid&&(r=t.grid),t.tooltip&&(l=t.tooltip),t.backgroundColor&&(u=t.backgroundColor)),{backgroundColor:u,grid:r,series:n,xAxis:a,yAxis:s,tooltip:l}}}},{key:"_createChartDatas",value:function(e){var t=0,r=[],n=e.fieldCaptions,o=this;n.forEach(function(e,r){o.xField[0]&&e===o.xField[0].field&&(t=r)}),this.yFieldName="",this.yField.forEach(function(e,t){0!==t&&(o.yFieldName=o.yFieldName+","),o.yFieldName=o.yFieldName+e.name,n.forEach(function(t,n){t===e.field&&r.push(n)})});var i=this._getAttrData(e,t),a=[];if(r.length>0)r.forEach(function(t){var r=[];for(var n in e.fieldValues[t])r.push({value:e.fieldValues[t][n]});a.push(r)});else{for(var s=[],l=[],u=i.length,c=0;c0;e--)this.header.removeChild(this.header.children[e]),this.content.removeChild(this.content.children[e])}},{key:"_changeTabsPage",value:function(e){for(var t=e.target.index,r=0;r0;t--)this.content.removeChild(this.content.children[t-1]);var r=this.config[e];for(var n in r)this._createCityItem(n,r[n])}},{key:"_createCityItem",value:function(e,t){var r=document.createElement("div"),n=document.createElement("div");n.setAttribute("class","component-citytabpag__py-key"),n.innerHTML=e,r.appendChild(n);var o=document.createElement("div");o.setAttribute("class","component-citytabpag__content");for(var i=0;i0&&this.appendTabs(e),this.rootContainer=t}},{key:"setTabs",value:function(e){this.removeAllTabs(),this.appendTabs(e)}},{key:"appendTabs",value:function(e){for(var t=0;t0;e--)this.navTabsTitle.removeChild(this.navTabsTitle.children[e]),this.navTabsContent.removeChild(this.navTabsContent.children[e])}},{key:"_changeTabsPage",value:function(e){for(var t=e.target.index,r=0;r=0;e--)this.content.removeChild(this.content.children[e])}},{key:"setPageLink",value:function(e){this.pageNumberLis=[],this.currentPageNumberLis=[],this.clearPageLink(),this._createPageLi(e),this._appendPageLink()}},{key:"_createPageLi",value:function(e){for(var t=0;t1;e--)this.link.removeChild(this.link.children[e])}},{key:"_createLink",value:function(e){for(var t=0;t<4;t++){var r=document.createElement("li");r.setAttribute("class","disable");var n=document.createElement("span");r.appendChild(n),0===t?(n.id="first",n.setAttribute("class","supermapol-icons-first")):1===t?(n.id="prev",n.setAttribute("class","supermapol-icons-prev")):2===t?(n.id="next",n.setAttribute("class","supermapol-icons-next")):3===t&&(n.id="last",n.setAttribute("class","supermapol-icons-last")),e.appendChild(r)}}},{key:"_changePageEvent",value:function(e){var t=e.target;if("disable"!==t.parentElement.classList[0]){var r;if(t.id)r=t.id;else{if(!Number(t.innerHTML))return;r=Number(t.innerHTML)}this._prePageNum(r),this.clearPageLink(),this._appendPageLink()}}},{key:"_changeDisableState",value:function(){this.link.children[0].setAttribute("class",""),this.link.children[1].setAttribute("class",""),this.link.children[this.link.children.length-1].setAttribute("class",""),this.link.children[this.link.children.length-2].setAttribute("class",""),1===this.currentPage&&(this.link.children[0].setAttribute("class","disable"),this.link.children[1].setAttribute("class","disable")),this.currentPage===this.pageNumberLis.length&&(this.link.children[this.link.children.length-1].setAttribute("class","disable"),this.link.children[this.link.children.length-2].setAttribute("class","disable"))}},{key:"_prePageNum",value:function(e){var t=[];if(this.currentPage="first"===e?1:"last"===e?this.pageNumberLis.length:"prev"===e?this.currentPage-1:"next"===e?this.currentPage+1:e,this.pageNumberLis.length<=5)for(var r=0;r=this.pageNumberLis.length-3)for(var o=this.pageNumberLis.length-5;o0&&(this.currentPageNumberLis=t)}}])&&OA(t.prototype,r),n&&OA(t,n),Object.defineProperty(t,"prototype",{writable:!1}),i}();function kA(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function jA(e){for(var t=1;t0&&(this.length=e,this.max=this.length-1,this.slider.setAttribute("max",this.max))}},{key:"setLayer",value:function(e){e&&(this.options.layer=e);var t=this,r=t.options.layer;r.on("tilesetsinfoloaded",function(e){var r=e.value&&e.value.tileVersions;t.update(r)}),r.on("tileversionschanged",function(e){var r=e.value&&e.value.tileVersion;t.setContent(r)}),t.getTileSetsInfo()}},{key:"update",value:function(e){this.tileVersions=e||[],this.updateLength(this.tileVersions.length)}},{key:"getTileSetsInfo",value:function(){var e=this;e.options.layer&&new zA(e.options.layer._url).getTilesets(function(t){e.options.layer.setTileSetsInfo(t.result)})}},{key:"removeLayer",value:function(){this.options.layer=null}},{key:"nextTilesVersion",value:function(){return this.firstLoad?(this.options.layer.nextTilesVersion(),this.firstLoad=!1,this):parseInt(this.slider.value)>this.max-1?this:(this.slider.value=parseInt(this.slider.value)+1,this.options.layer.nextTilesVersion(),this)}},{key:"lastTilesVersion",value:function(){return parseInt(this.slider.value)=this.minWidth_)break;++h}this.renderedHTML_=this.renderedHTML_||this.D||this.am,this.innerElement_=this.innerElement_||this.l||this.Tm,this.renderedWidth_=this.renderedWidth_||this.B||this.Am,this.renderedVisible_=this.renderedVisible_||this.j||this.yn,this.element_=this.element_||this.c;var d=u.toFixed(f<0?-f:0)+" "+s;this.renderedHTML_!=d&&(this.innerElement_.innerHTML=d,this.renderedHTML_=d),this.renderedWidth_!=c&&(this.innerElement_.style.width=c+"px",this.renderedWidth_=c),this.renderedVisible_||(this.element.style.display="",this.renderedVisible_=!0)}}])&&iL(t.prototype,r),n&&iL(t,n),Object.defineProperty(t,"prototype",{writable:!1}),i}(),cL="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAF4AAAAdCAYAAAAjHtusAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAA4ZpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuNi1jMDY3IDc5LjE1Nzc0NywgMjAxNS8wMy8zMC0yMzo0MDo0MiAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wTU09Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9tbS8iIHhtbG5zOnN0UmVmPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvc1R5cGUvUmVzb3VyY2VSZWYjIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtcE1NOk9yaWdpbmFsRG9jdW1lbnRJRD0ieG1wLmRpZDozYWZlOGIwMi01MWE3LTRiZjYtYWVkYS05MGQ2ZTQ4YjZiMmUiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6ODg0NkFBQUE3RjEzMTFFNzhFRjJFQkY4RjcxQjc1NjIiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6ODg0NkFBQTk3RjEzMTFFNzhFRjJFQkY4RjcxQjc1NjIiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENDIDIwMTUgKE1hY2ludG9zaCkiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDo4MWI3NzdhNC1lZmEyLTQ1MzUtOGQzNi03MmRjNDkyODMzN2UiIHN0UmVmOmRvY3VtZW50SUQ9ImFkb2JlOmRvY2lkOnBob3Rvc2hvcDpjYTYzODVjMi1jNDQ1LTExN2EtYTc0ZC1lM2I5MzJlMGE4Y2QiLz4gPC9yZGY6RGVzY3JpcHRpb24+IDwvcmRmOlJERj4gPC94OnhtcG1ldGE+IDw/eHBhY2tldCBlbmQ9InIiPz5q1HM0AAAF/ElEQVR42tSabYhUVRjHZ7W01C1uaCRW4F3oi9SXCUnwQ9gsGUFvOEtQH1bLu5VS9sbYh5KicjYt29qiGQwVg2xWWKgocob91AvC+CWsoJqB3qHMSdTMpZyeU/+Df07n3pk7997Z6cBv99z7nHvOvf/z/pxJNZvNVI/jCKXmv6EquAmVkxPSlvtp2GItr0/96fFQForChJAWDiVYTkMYMu4XBFcYjLOwWS3sNwmn8NGzZ0h4Flv/zwIdchAnh/slCGmmKUNIBzYPaXOUr0vPuEjD71JAPh7l61embzinhV3V8nnCGmGT8LwlzSL8/yUh4Tfjo9T/CgnCIYNKycA2Qq21AcHU/VHE80Idoo3Qs0W6p0UtUnkZvEMDeVcCyqxEafF7hL8Qf0oYsIj+lfC9cH1CwhchWAGCtZO+AooQOkdC1Km1VtCb63StW73uFSzgKFUkNwBbmZGGmqowhvg8ZNpH9oXChcIcYRdeNomgxLkaH+S1SGubAxyIpFv+Zp+0DYjrAS00j/dem2VGEl6FJ4Qa4quEu8j2hTCJ+GJhe4JjfQMf6JCYPPbysMPxBlp0BUKOogEF9Rg9/heNvNKYfM0KsZUZaYxX4STGrzJa+zbhPeFH2DcK10KItcI+pI0rVElwXl1ULaKnIJhDw0oRQpTQc1zcbwRU8ATy4DR6yMlTzwkqMziEWHvubJ4Nk4ZtHdnqwvwY17xq3Z4FjrG+z2Kdrdf2ZSGD+xlLPh6t1R0jP9fI22ZzKI92yvQl7EbmBxI4S7Y+vIAOL87QZqsc5uNnssxZIcfYjXT9snCR7jjobidp+FkxA2v+Cq1QervMDmp4P7Xs3YZtE9kOC3P/By6JGaETl8ElwueYTNTDq4UDsKnd7YfCNbT239LF1udS72xYJt1UWxNfN4IIP4bWuTpEja01JtMFZFsm/AHbtHBlDE6yasA4moYTrUbvdBTXHqUrAH4uSadbyzF+vbBM2IsNkS3MNa5305JxqfA02T4TnkX8XOH1mPw8ruVejpxbI9hZD2Cz1U7LdrrUvjP/WfZinNZhr6V27hP+FPZh9aLvLxVO4DllX0G2OcKnlO/DCblxaz6uXBtmi+8mBaP3/SP8IuEIiTRoPPQm2TaEmEyXo0JU+F0YiPFD0hhOsiE/vqeEVwyTgF8L51OilcIZ2I4Ll5NttvAJPfukUeB2sk0ZPSbKIUUJpCII7+DasWy08uhNNazT0wGHI7mAtB7KqMKm38HhDdAUibTVKGicbB8YAqrJ9DRsp43JdB4qUof1HQrPE6XTQWu3Ce/inVzjXhXpMiTwUYugNVQ+p80jrUsV5EH0POKeuXO9QjhFq5GryNYvfEMCDhsftYVsB9ETtG0V9ZjfhCURhbcJFpfwVZ9jvhxsLHwTYtp2svlWQw3vXL8UnqHVSIG8l8ex+tHhBXgjddgqHEZ8ufAA2aaEnYgrF/KrPXrEmMUqZ9THLW06xhoBaVueQpkug+ewOUphE3Qv2Q5gGamXYa+QbVq4O+DQ5FHyZqrjxNt7UHh9uuRa0F7HjCF8o9PCTOGnscM7g2u1Hl9C9oeEnxC/1ajZg8JLiM9Hj9GHJseMShwL2DO0G5yEWn3Zh1QUods5CPkIoqlwAZxhXMsb6HrcEPBxchhdJ6wj29vCW4hfLOzo8J3rltYX50nXQAATSf/K4DEaGlTLvplsk/QCpoD60EQ7gLYZc8H9wq+I3yncEOEcNhuz6HWf3XEiwU/4Y8YEqVp2P10rt+8REvBGw026i4aDcbL9jF8r8Blmf4fCOzhViiscskygXRdehf3CO4hfigmTBXyQrl8TFtD1IzQX3CbcQrY3hPcRv4z8OmHPXwchVNln2MmE7BX6VwIFi/he6uxvb6JM3m0fdqvx/ATidxg2JeC7VDErAw5NzGfvwRJVheEIQ8Mg/pdwIM+UOmi9Q8ivCsrIy0tF+wVbEcLrd3Pb2XisEb4Tdlhsi4WP4RBbaLGrHfC3PrvMIezy9rTpGm5lz9LOMG15xvFxD/j5gjzjjDbMOzk+9zzt3v5bgAEAibzFeFHVgYkAAAAASUVORK5CYII=";function fL(e){"@babel/helpers - typeof";return(fL="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function pL(e,t){for(var r=0;r"+r+"",e}.call(dL(t)),t}return t=i,r&&pL(t.prototype,r),n&&pL(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}(),mL={"point-file":"pointFile","point-fill":"fillStyle","point-radius":"pointRadius","point-halo-radius":"pointHaloRadius","point-halo-color":"pointHaloColor","point-dx":"offsetX","point-dy":"offsetY","point-opacity":"globalAlpha","point-comp-op":"globalCompositeOperation"},gL={"line-color":"strokeStyle","line-width":"lineWidth","line-cap":"lineCap","line-join":"lineJoin","line-miterlimit":"miterLimit","line-dash-offset":"lineDashOffset","line-opacity":"strokeOpacity","line-dasharray":"lineDasharray","line-offset":"offset","line-comp-op":"globalCompositeOperation"},wL={"line-color":"strokeStyle","line-width":"lineWidth","line-cap":"lineCap","line-join":"lineJoin","line-miterlimit":"miterLimit","line-dash-offset":"lineDashOffset","line-opacity":"strokeOpacity","line-dasharray":"lineDasharray","polygon-fill":"fillStyle","polygon-dx":"offsetX","polygon-dy":"offsetY","polygon-opacity":"fillOpacity","polygon-comp-op":"globalCompositeOperation"},OL={CartoStyleMap:{TEXT:{"text-size":"fontSize","text-face-name":"fontFamily","text-align":"textAlign","text-vertical-alignment":"textBaseline","text-horizontal-alignment":"textAlign","text-bold":"bold","text-weight":"fontWeight","text-name":"textName","text-halo-radius":"haloRadius","text-halo-color":"backColor","text-fill":"foreColor","text-opacity":"globalAlpha","text-dx":"offsetX","text-dy":"offsetY","text-comp-op":"globalCompositeOperation"},POINT:mL,MULTIPOINT:mL,LINE:gL,LINESTRING:gL,MULTILINESTRING:gL,REGION:wL,POLYGON:wL,MULTIPOLYGON:wL},ServerStyleMap:{fillBackOpaque:{canvasStyle:"",type:"bool",defaultValue:!0},lineWidth:{canvasStyle:"lineWidth",type:"number",unit:"mm",defaultValue:.1},fillBackColor:{canvasStyle:"",type:"color",defaultValue:"rgba(0,0,0,0)"},markerWidth:{canvasStyle:"",type:"number",unit:"mm",defaultValue:""},markerAngle:{canvasStyle:"",type:"number",unit:"degree",defaultValue:""},fillForeColor:{canvasStyle:"fillStyle",type:"color",defaultValue:"rgba(0,0,0,0)"},foreColor:{canvasStyle:"fillStyle",type:"color",defaultValue:"rgba(0,0,0,0)"},markerSize:{canvasStyle:"markerSize",type:"number",unit:"mm",defaultValue:2.4},fillGradientOffsetRatioX:{canvasStyle:"",type:"number",defaultValue:0},fillGradientOffsetRatioY:{canvasStyle:"",type:"number",defaultValue:0},lineColor:{canvasStyle:"strokeStyle",type:"color",defaultValue:"rgba(0,0,0,0)"},fillOpaqueRate:{canvasStyle:"",type:"number",defaultValue:100},markerHeight:{canvasStyle:"",type:"number",unit:"mm",defaultValue:0},fillGradientMode:{canvasStyle:"",type:"string",defaultValue:"NONE"},fillSymbolID:{canvasStyle:"",type:"number",defaultValue:0},fillGradientAngle:{canvasStyle:"",type:"number",unit:"degree",defaultValue:0},markerSymbolID:{canvasStyle:"",type:"number",defaultValue:0},lineSymbolID:{canvasStyle:"",type:"number",defaultValue:0}},CartoCompOpMap:{clear:"",src:"",dst:"","src-over":"source-over","dst-over":"destination-over","src-in":"source-in","dst-in":"destination-in","src-out":"source-out","dst-out":"destination-out","src-atop":"source-atop","dst-atop":"destination-atop",xor:"xor",plus:"lighter",minus:"",multiply:"",screen:"",overlay:"",darken:"",lighten:"lighter","color-dodge":"","color-burn":"","hard-light":"","soft-light":"",difference:"",exclusion:"",contrast:"",invert:"","invert-rgb":"","grain-merge":"","grain-extract":"",hue:"",saturation:"",color:"",value:""}},SL={pointFile:"",pointRadius:3,pointHaloRadius:1,pointHaloColor:"#c33",offsetX:0,offsetY:0,fillStyle:"#fc0",globalAlpha:1,globalCompositeOperation:"source-over",imageSmoothingEnabled:!0},_L={strokeStyle:"rgba(0,0,0,0)",lineWidth:1,lineCap:"butt",lineJoin:"round",miterLimit:10,lineDashOffset:0,lineDasharray:[],strokeOpacity:1,offset:0,globalAlpha:1,globalCompositeOperation:"source-over",imageSmoothingEnabled:!0},PL={strokeStyle:"rgba(0,0,0,0)",lineWidth:1,lineCap:"butt",lineJoin:"round",miterLimit:10,lineDashOffset:0,lineOpacity:1,fillOpacity:1,lineDasharray:[],fillStyle:"rgba(0,0,0,0)",polygonOpacity:1,offsetX:0,offsetY:0,globalAlpha:1,globalCompositeOperation:"source-over",imageSmoothingEnabled:!0},xL={TEXT:{font:"10px sans-serif",textAlign:"middle",textBaseline:"center",direction:"ltr",bold:!1,haloRadius:0,backColor:"rgba(255,255,255,1)",foreColor:"rgba(0,0,0,1)",offsetX:0,offsetY:0,textHeight:0,globalAlpha:1,globalCompositeOperation:"source-over",imageSmoothingEnabled:!0},POINT:SL,MULTIPOINT:SL,LINE:_L,LINESTRING:_L,MULTILINESTRING:_L,REGION:PL,POLYGON:PL,MULTIPOLYGON:PL,SHADOW:{shadowBlur:0,shadowColor:"rgba(0,0,0,0)",shadowOffsetX:0,shadowOffsetY:0},GLOBAL:{globalAlpha:1,globalCompositeOperation:"source-over",imageSmoothingEnabled:!0}},kL=ol.util,jL=ol.geom.Geometry,EL=r.n(jL),TL=ol.render,CL=ol.source.Vector,RL=r.n(CL),ML=ol.layer.Vector,AL=r.n(ML),LL=ol.style,IL=ol.Feature,NL=r.n(IL),FL=ol.proj.Projection,DL=r.n(FL),BL={getOlVersion:function(){if(kL&&kL.VERSION)return kL.VERSION.split(".")[0];if(window&&window.ol){if(window.ol.util)return"6";if(window.ol.WebGLMap)return"5"}return"4"},toGeoJSON:function(e){return e?(new Lr).toGeoJSON(e):null},toSuperMapGeometry:function(e){return e&&e.type?(new Lr).read(e,"FeatureCollection")[0].geometry:null},resolutionToScale:function(e,t,r){return 1/(e*t*(1/.0254)*Hk(r))},toSuperMapBounds:function(e){return new be(e[0],e[1],e[2],e[3])},toProcessingParam:function(e){if(e.length<1)return"";for(var t={},r=[],n=0;n-180&&u<90&&u>-90;if(a.length===o.length&&c){var f={type:"Feature",geometry:{},properties:{}};f.geometry.type="Point",f.geometry.coordinates=[l,u];for(var p=0;p0&&void 0!==arguments[0]?arguments[0]:"").replace(/(^\s*)|(\s*$)/g,"")},newGuid:function(e){for(var t=e||32,r="",n=1;nr&&(r=o,n=e)}),n},setMask:function(e,t){if(t&&((t instanceof NL()?t.getGeometry():t)instanceof EL()||!(["MultiPolygon","Polygon"].indexOf(t.getType())<0))){var r=t instanceof NL()?t:new(NL())(t),n=new LL.Style({fill:new LL.Fill({color:"black"})}),o=new(AL())({source:new(RL())({features:[r],wrapX:!1})}),i=function(e){var t=(0,TL.getVectorContext)(e);e.context.globalCompositeOperation="destination-in",o.getSource().forEachFeature(function(r){t.drawFeature(r,n),e.context.globalCompositeOperation="source-over"})},a=Array.isArray(e)?e:[e];UL(a),a.forEach(function(e){e.classNameBak_=e.className_,e.className_="ol_mask_layer_".concat(e.ol_uid),e.clipRender=i,e.extentBak_=e.getExtent(),e.setExtent(o.getSource().getExtent()),e.on("postrender",i),e.changed()})}},unsetMask:UL,getZoomByResolution:function(e,t){return function(e,t){for(var r,n=0,o=0;oMath.abs(e-t[o])&&(r=Math.abs(e-t[o]),n=o);return n}(e,t)},scalesToResolutions:function(e,t,r,n,o,i){return function(e,t,r,n){var o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:22,i=[];if(e&&e.length>0)for(var a=0;a=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var s=r.call(i,"catchLoc"),l=r.call(i,"finallyLoc");if(s&&l){if(this.prev=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),S(r),c}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;S(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:P(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),c}},e}function iI(e,t,r,n,o,i,a){try{var s=e[i](a),l=s.value}catch(e){return void r(e)}s.done?t(l):Promise.resolve(l).then(n,o)}function aI(e){return function(){var t=this,r=arguments;return new Promise(function(n,o){var i=e.apply(t,r);function a(e){iI(i,n,o,a,s,"next",e)}function s(e){iI(i,n,o,a,s,"throw",e)}a(void 0)})}}function sI(e,t){for(var r=0;r0&&y[y.length-1]}p=t.getProperties().attributes?t.getProperties().attributes[h]:t.getProperties()[h]}return t.getProperties().TEXT_FEATURE_CONTENT&&(p=t.getProperties().TEXT_FEATURE_CONTENT),p?this.toOLTextStyle(i,p):this.toOLPointStyle(this.getDefaultStyle("POINT"))}if(o){var d=o.fillSymbolID>7?0:o.fillSymbolID,b=o.lineSymbolID>5?0:o.lineSymbolID;for(var v in o){var m,g=OL.ServerStyleMap[v],w=g.canvasStyle;if(w&&""!=w)switch(g.type){case"number":m=o[v],g.unit&&(m=96*m*fe[g.unit]*2.5),i[w]=m;break;case"color":var O=o[v],S=o.fillBackColor,_=1;if("fillStyle"===w)if(0===d||1===d)_=1-d,m="rgba("+O.red+","+O.green+","+O.blue+","+_+")";else try{var P=document.createElement("canvas");P.height=8,P.width=8;var x=P.getContext("2d"),k=new Image;this.layer&&this.layer.fillImages&&x.drawImage(this.layer.fillImages["System "+d],0,0);for(var j=x.getImageData(0,0,P.width,P.height),E=j.data,T=0,C=E.length;T0&&void 0!==arguments[0]?arguments[0]:.5,arguments.length>1&&void 0!==arguments[1]?arguments[1]:.5]}},{key:"getCircleDisplacement",value:function(e){return[e*(arguments.length>1&&void 0!==arguments[1]?arguments[1]:0),-(e*(arguments.length>2&&void 0!==arguments[2]?arguments[2]:0))]}},{key:"getTextOffset",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,n=e.substr(0,e.length-2)/2;return{x:n*t,y:n*r}}},{key:"getCanvas",value:function(e){var t;e.canvas?t=document.querySelector("#"+e.canvas)?document.getElemntById(e.canvas):this.createCanvas(e):(t=this.createCanvas(e),e.canvas=t.id),t.style.display="none";var r=t.getContext("2d"),n=Number(e.font.replace(/[^0-9]/gi,"")),o=e.text.split("\r\n"),i=o.length;r.font=e.font;var a=this.drawRect(r,e,o,n,t);return this.positionY=8,i>1?o.forEach(function(t,o){0!==o&&(this.positionY=this.positionY+n),this.canvasTextAutoLine(t,e,r,n,a.width)},this):this.canvasTextAutoLine(o[0],e,r,n,a.width),{canvas:t,width:a.width,height:a.height}}},{key:"createCanvas",value:function(e){var t=document.createElement("div");document.body.appendChild(t);var r=document.createElement("canvas");return r.id=e.canvas?e.canvas:"textCanvas"+BL.newGuid(8),t.appendChild(r),r}},{key:"drawRect",value:function(e,t,r,n,o){var i,a=t.backgroundFill,s=t.maxWidth-16,l=0,u=0,c=[];return r.forEach(function(t){var r,n="";u++;for(var o=0;os&&o>0||"\n"===t[o]?(n=t[o],u++,r=!0):(n=a,i=l)}r?c.push(s):c.push(i)},this),i=this.getCanvasWidth(c,s),l=u*n,l+=16,o.width=i,o.height=l,e.fillStyle=a,e.fillRect(0,0,i,l),{width:i,height:l}}},{key:"getCanvasWidth",value:function(e,t){for(var r=0,n=0;n=t)return t+16;o>r&&(r=o)}return r+16}},{key:"canvasTextAutoLine",value:function(e,t,r,n,o){r.font=t.font;for(var i=t.textAlign,a=this.getPositionX(i,o),s=e.split(""),l="",u=t.fillColor,c=t.maxWidth-16,f=0;fc&&f>0||"\n"===s[f]?(r.fillStyle=u,r.textAlign=i,r.textBaseline="top",r.fillText(l,a,this.positionY),l=s[f],this.positionY+=n):l=p}r.fillStyle=u,r.textAlign=i,r.textBaseline="top",r.fillText(l,a,this.positionY)}},{key:"getPositionX",value:function(e,t){var r,n=t-16;switch(e){case"center":r=n/2;break;case"right":r=n;break;default:r=8}return r}},{key:"hexToRgb",value:function(e){if(e){var t=e.replace("#","").split(""),r=[t[0]+t[1],t[2]+t[3],t[4]+t[5]];return r=r.map(function(e){return parseInt(e,16)})}}},{key:"formatRGB",value:function(e){var t;return 3===e.length?(t="rgb(",e.forEach(function(e,r){t+=2===r?e:e+","})):(t="rgba(",e.forEach(function(e,r){t+=3===r?e:e+","})),t+=")"}},{key:"getCanvasFromSVG",value:function(){var e=aI(oI().mark(function e(t,r,n){var o,i,a;return oI().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return o=window.canvg&&window.canvg.default?window.canvg.default:JL(),(i=document.createElement("canvas")).id="dataviz-canvas-"+BL.newGuid(8),i.style.display="none",r.appendChild(i),e.prev=5,a=i.getContext("2d"),e.next=9,o.from(a,t,{ignoreMouse:!0,ignoreAnimation:!0,forceRedraw:function(){return!1}});case 9:if(e.sent.start(),!(i.width>300||i.height>300)){e.next=13;break}return e.abrupt("return");case 13:n(i),e.next=19;break;case 16:return e.prev=16,e.t0=e.catch(5),e.abrupt("return");case 19:case"end":return e.stop()}},e,null,[[5,16]])}));return function(t,r,n){return e.apply(this,arguments)}}()},{key:"stopCanvg",value:function(){this.canvgsV.forEach(function(e){return e.stop()}),this.canvgsV=[]}},{key:"getMarkerDefaultStyle",value:function(e,t){var r;switch(e){case"POINT":r={src:"".concat(t,"apps/dataviz/static/imgs/markers/mark_red.png"),scale:1,anchor:[.5,1]};break;case"LINE":case"LINESTRING":case"MULTILINESTRING":r={strokeColor:"#3498db",strokeOpacity:1,strokeWidth:5,lineCap:"round",lineDash:"solid"};break;case"REGION":case"POLYGON":case"MULTIPOLYGON":r={fillColor:"#1abd9c",fillOpacity:1,strokeColor:"#3498db",strokeOpacity:1,strokeWidth:3,lineCap:"round",lineDash:"solid"}}return r}},{key:"getOpenlayersStyle",value:function(){var e=aI(oI().mark(function e(t,r,n){var o;return oI().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if("BASIC_POINT"!==t.type){e.next=6;break}return e.next=3,this.toOpenLayersStyle(t,r);case 3:o=e.sent,e.next=17;break;case 6:if("SYMBOL_POINT"!==t.type){e.next=10;break}o=this.getSymbolStyle(t,n),e.next=17;break;case 10:if("SVG_POINT"!==t.type){e.next=16;break}return e.next=13,this.getSVGStyle(t);case 13:o=e.sent,e.next=17;break;case 16:"IMAGE_POINT"===t.type&&(o=this.getImageStyle(t));case 17:return e.abrupt("return",o);case 18:case"end":return e.stop()}},e,this)}));return function(t,r,n){return e.apply(this,arguments)}}()},{key:"getSymbolStyle",value:function(t,r){var n="";t.unicode&&(n=String.fromCharCode(parseInt(t.unicode.replace(/^&#x/,""),16)));var o=e.hexToRgb(t.fillColor);o.push(t.fillOpacity);var i=e.hexToRgb(t.strokeColor);i.push(t.strokeOpacity);var a=r?2*t.radius+"px":t.fontSize,s=t.offsetX,l=t.offsetY,u=t.rotation,c=void 0===u?0:u,f=e.getTextOffset(a,s,l);return new(HL())({text:new(rI())({text:n,font:a+" supermapol-icons",placement:"point",textAlign:"center",fill:new(KL())({color:o}),backgroundFill:new(KL())({color:[0,0,0,0]}),stroke:new(eI())({width:t.strokeWidth||1e-6,color:i}),offsetX:f.x,offsetY:f.y,rotation:c})})}},{key:"getSVGStyle",value:function(){var t=aI(oI().mark(function t(r){var n,o,i,a,s,l,u,c,f;return oI().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return(o=this).svgDiv||(o.svgDiv=document.createElement("div"),document.body.appendChild(o.svgDiv)),i=r.url,a=r.radius,s=r.offsetX,l=r.offsetY,u=r.fillOpacity,c=r.rotation,f=this.getIconAnchor(s,l),t.next=6,e.getCanvasFromSVG(i,o.svgDiv,function(e){n=new(HL())({image:new(YL())({img:o.setColorToCanvas(e,r),scale:2*a/e.width,imgSize:[e.width,e.height],anchor:f||[.5,.5],opacity:u,anchorOrigin:"bottom-right",rotation:c})})});case 6:return t.abrupt("return",n);case 7:case"end":return t.stop()}},t,this)}));return function(e){return t.apply(this,arguments)}}()},{key:"setColorToCanvas",value:function(t,r){var n=t.getContext("2d"),o=e.hexToRgb(r.fillColor);o&&o.push(r.fillOpacity);var i=e.hexToRgb(r.strokeColor);return i&&i.push(r.strokeOpacity),n.fillStyle=e.formatRGB(o),n.fill(),n.strokeStyle=e.formatRGB(i),n.lineWidth=r.strokeWidth,n.stroke(),t}},{key:"getImageStyle",value:function(e){var t=e.imageInfo.size,r=2*e.radius/t.w,n=e.imageInfo,o=n.img;o&&o.src||((o=new Image).src=n.url);var i=e.offsetX,a=e.offsetY,s=e.rotation,l=this.getIconAnchor(i,a);return new(HL())({image:new(YL())({img:o,scale:r,imgSize:[t.w,t.h],anchor:l||[.5,.5],anchorOrigin:"bottom-right",rotation:s})})}},{key:"getRoadPath",value:function(e,t){var r=e.strokeWidth,n=void 0===r?1e-7:r,o=e.lineCap,i=e.strokeColor,a=e.strokeOpacity,s=this.hexToRgb(i);s&&s.push(a);var l=new(HL())({stroke:new(eI())({width:n||1e-7,color:s,lineCap:o||"round",lineDash:[0]})}),u=t.strokeColor,c=this.hexToRgb(u);c&&c.push(a);var f=0===n?1e-7:n+2;return[new(HL())({stroke:new(eI())({width:f,color:c,lineCap:o||"round",lineDash:[0]})}),l]}},{key:"getPathway",value:function(e,t){var r,n=e.strokeWidth,o=void 0===n?1e-7:n,i=e.strokeColor,a=e.strokeOpacity,s=[r=4*o,r+2*o],l=this.hexToRgb(i);l&&l.push(a);var u=new(HL())({stroke:new(eI())({width:.5*o||1e-7,color:l,lineCap:"square",lineDash:s})}),c=t.strokeColor,f=this.hexToRgb(c);return f&&f.push(a),[new(HL())({stroke:new(eI())({width:o||1e-7,color:f,lineCap:"square"})}),u]}}],r&&sI(t.prototype,r),n&&sI(t,n),Object.defineProperty(t,"prototype",{writable:!1}),e}(),cI=ol.Map,fI=r.n(cI),pI=ol.layer.Group,hI=r.n(pI),yI=(lI=function e(t,r,n,o,i,a){t instanceof hI()?t.getLayers().forEach(function(t){e(t,r,n,o,i,a)}):t.getSource()._forEachFeatureAtCoordinate&&t.getSource()._forEachFeatureAtCoordinate(r,n,function(e){o(e,t)},i,a)},fI().prototype.forEachFeatureAtPixelDefault=fI().prototype.forEachFeatureAtPixel,fI().prototype.forEachFeatureAtPixel=fI().prototype.Tc=function(e,t,r,n){for(var o=r&&r.layerFilter?r.layerFilter:function(){return!0},i=this.getLayers().getArray(),a=this.getView().getResolution(),s=this.getCoordinateFromPixel(e),l=0;l© SuperMap iClient",a=i.defaultTileGrid(),s=void 0!==r.crossOrigin?r.crossOrigin:"anonymous",l=void 0!==r.url?r.url:"http://online1.map.bdimg.com/onlinelabel/?qt=tile&x={x}&y={y}&z={z}&styles={styles}&udt=20170408",u=r.hidpi||(window.devicePixelRatio||window.screen.deviceXDPI/window.screen.logicalXDPI)>1;l=l.replace("{styles}",u?"ph":"pl"),t=o.call(this,{attributions:n,cacheSize:r.cacheSize,crossOrigin:s,opaque:void 0===r.opaque||r.opaque,maxZoom:void 0!==r.maxZoom?r.maxZoom:19,reprojectionErrorThreshold:r.reprojectionErrorThreshold,tileLoadFunction:r.tileLoadFunction,projection:"EPSG:3857",wrapX:r.wrapX,tilePixelRatio:u?2:1,tileGrid:a,tileUrlFunction:function(e,t,r){var n=l.replace("{z}",e[0].toString()).replace("{x}",e[1].toString()).replace("{y}",function(){console.log(BL.getOlVersion());var t=["4","5"].indexOf(BL.getOlVersion())>-1?e[2]:-e[2]-1;return t.toString()}).replace("{-y}",function(){var t=e[0],r=a.getFullTileRange(t);bI.assert(r,55);var n=r.getHeight()+e[2];return n.toString()});c.tileProxy&&(n=c.tileProxy+encodeURIComponent(n));return n}}),r.tileProxy&&(t.tileProxy=r.tileProxy);var c=_I(t);return t}return t=i,n=[{key:"defaultTileGrid",value:function(){return new(mI())({extent:[-33554432,-33554432,33554432,33554432],resolutions:[262144,131072,65536,32768,16284,8192,4096,2048,1024,512,256,128,64,32,16,8,4,2,1,.5],origin:[0,0],minZoom:3})}}],(r=null)&&wI(t.prototype,r),n&&wI(t,n),Object.defineProperty(t,"prototype",{writable:!1}),i}(),kI=ol.source.Image,jI=r.n(kI),EI=ol.Image,TI=r.n(EI),CI=ol.format.GeoJSON,RI=r.n(CI),MI=ol.extent;function AI(e){"@babel/helpers - typeof";return(AI="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function LI(e,t){for(var r=0;r© SuperMap iServer with © SuperMap iClient",e.format=e.format?e.format:"png",t._layerUrl=ce.urlPathAppend(e.url,"image."+e.format),t._layerUrl=ln.appendCredential(t._layerUrl);var r={},n=void 0===e.transparent||e.transparent;r.transparent=n;var a=void 0===e.cacheEnabled||e.cacheEnabled;r.cacheEnabled=a,void 0!==e.layersID&&(r.layersID=e.layersID);var s=!1;return void 0!==e.redirect&&(s=e.redirect),r.redirect=s,e.prjCoordSys&&(r.prjCoordSys=JSON.stringify(e.prjCoordSys)),e.clipRegionEnabled&&e.clipRegion instanceof EL()&&(e.clipRegion=BL.toSuperMapGeometry((new(RI())).writeGeometryObject(e.clipRegion)),e.clipRegion=ce.toJSON(jr.fromGeometry(e.clipRegion)),r.clipRegionEnabled=e.clipRegionEnabled,r.clipRegion=JSON.stringify(e.clipRegion)),e.overlapDisplayed&&e.overlapDisplayedOptions&&(r.overlapDisplayed=e.overlapDisplayed,r.overlapDisplayedOptions=e.overlapDisplayedOptions.toString()),!0===a&&e.tileversion&&(r.tileversion=e.tileversion),e.rasterfunction&&(r.rasterfunction=JSON.stringify(e.rasterfunction)),void 0!==e.antialias&&(r.antialias=e.antialias),void 0!==e.markerAngleFixed&&(r.markerAngleFixed=e.markerAngleFixed),void 0!==e.textAngleFixed&&(r.textAngleFixed=e.textAngleFixed),void 0!==e.textOrientationFixed&&(r.textOrientationFixed=e.textOrientationFixed),void 0!==e.paintBackground&&(r.paintBackground=e.paintBackground),isNaN(e.maxVisibleTextSize)||(r.maxVisibleTextSize=+e.maxVisibleTextSize),isNaN(e.minVisibleTextSize)||(r.maxVisibleTextSize=+e.minVisibleTextSize),isNaN(e.maxVisibleVertex)||(r.maxVisibleVertex=Math.round(+e.maxVisibleVertex)),t._layerUrl=ce.urlAppend(t._layerUrl,ce.getParameterString(r)),t.cacheEnabled=a,e.tileProxy&&(t.tileProxy=e.tileProxy),t}return t=i,n=[{key:"optionsFromMapJSON",value:function(e,t){var r=[t.bounds.left,t.bounds.bottom,t.bounds.right,t.bounds.top];return{url:e,resolutions:function(){var e,n=r[2]-r[0],o=r[3]-r[1],i=n>=o?n:o;e=i===n?i/t.viewer.width:i/t.viewer.height;var a=[],s=l.METER;t.coordUnit===l.DEGREE&&(s=l.DEGREE);if(t.visibleScales.length>0)for(var u=0;u© SuperMap iClient",a=r.mapName||"quanguo",s=r.mapType||"web",l=r.url||"http://t2.dituhui.com/FileService/image?map={mapName}&type={type}&x={x}&y={y}&z={z}";l=l.replace("{mapName}",a).replace("{type}",s);var u={attributions:n,cacheSize:r.cacheSize,crossOrigin:r.crossOrigin,opaque:void 0===r.opaque||r.opaque,maxZoom:r.maxZoom||18,reprojectionErrorThreshold:r.reprojectionErrorThreshold,url:l,wrapX:r.wrapX};r.tileProxy&&(u.tileLoadFunction=function(e,t){e.getImage().src=c.tileProxy+encodeURIComponent(t)}),t=o.call(this,u),r.tileProxy&&(t.tileProxy=r.tileProxy);var c=HI(t);return t}return t=i,r&&zI(t.prototype,r),n&&zI(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}(),XI=ol.source.WMTS,QI=r.n(XI),ZI=ol.tilegrid.WMTS,KI=r.n(ZI);function $I(e){"@babel/helpers - typeof";return($I="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function eN(e,t){for(var r=0;r with © SuperMap iClient";r.layerType=r.layerType||"vec",r.layerType=r.isLabel?{vec:"cva",ter:"cta",img:"cia"}[r.layerType]:r.layerType,r.matrixSet="EPSG:4326"===r.projection||"EPSG:4490"===r.projection?"c":"w",r.url||r.urls||(r.url="http://t{0-7}.tianditu.gov.cn/{layer}_{proj}/wmts?"),r.key&&(r.url="".concat(r.url,"tk=").concat(r.key)),r.url=r.url.replace("{layer}",r.layerType).replace("{proj}",r.matrixSet);var a=r.tileGrid||i.getTileGrid(r.projection||"EPSG:3857"),s=void 0!==r.crossOrigin?r.crossOrigin:"anonymous",l={version:r.version||"1.0.0",format:r.format||"tiles",dimensions:r.dimensions||{},layer:r.layerType,matrixSet:r.matrixSet,tileGrid:a,style:r.style||"default",attributions:n,cacheSize:r.cacheSize,crossOrigin:s,opaque:void 0===r.opaque||r.opaque,maxZoom:{vec:18,ter:14,img:18}[r.layerType],reprojectionErrorThreshold:r.reprojectionErrorThreshold,url:r.url,urls:r.urls,projection:r.projection||"EPSG:3857",wrapX:r.wrapX};r.tileProxy&&(l.tileLoadFunction=function(e,t){e.getImage().src=u.tileProxy+encodeURIComponent(t)}),t=o.call(this,l),r.tileProxy&&(t.tileProxy=r.tileProxy);var u=nN(t);return t}return t=i,n=[{key:"getTileGrid",value:function(e){return"EPSG:4326"===e||"EPSG:4490"===e?i.default4326TileGrid():i.default3857TileGrid()}},{key:"default4326TileGrid",value:function(){for(var e=[],t=[],r=1;r<19;r++)e.push(1.40625/Math.pow(2,r)),t.push(r);return new(KI())({extent:[-180,-90,180,90],resolutions:e,origin:[-180,90],matrixIds:t,minZoom:1})}},{key:"default3857TileGrid",value:function(){for(var e=[],t=[],r=1;r<19;r++)e.push(156543.03392804062/Math.pow(2,r)),t.push(r);return new(KI())({extent:[-20037508.3427892,-20037508.3427892,20037508.3427892,20037508.3427892],resolutions:e,matrixIds:t,origin:[-20037508.3427892,20037508.3427892],minZoom:1})}}],(r=null)&&eN(t.prototype,r),n&&eN(t,n),Object.defineProperty(t,"prototype",{writable:!1}),i}(),aN=ol.size,sN=ol.tilegrid;function lN(e){"@babel/helpers - typeof";return(lN="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function uN(e,t){for(var r=0;r© SuperMap iServer with © SuperMap iClient",e.format=e.format?e.format:"png",t=o.call(this,{attributions:e.attributions,cacheSize:e.cacheSize,crossOrigin:e.crossOrigin,logo:"4"===BL.getOlVersion()?e.logo:null,opaque:e.opaque,projection:e.projection,reprojectionErrorThreshold:e.reprojectionErrorThreshold,state:e.state,tileClass:e.tileClass,tileGrid:e.tileGrid,tileLoadFunction:e.tileLoadFunction,tilePixelRatio:e.tilePixelRatio,tileUrlFunction:function(t,n,o){r.tileGrid||(e.extent?(r.tileGrid=i.createTileGrid(e.extent),r.resolutions&&(r.tileGrid.resolutions=r.resolutions)):("EPSG:3857"===o.getCode()&&(r.tileGrid=i.createTileGrid([-20037508.3427892,-20037508.3427892,20037508.3427892,20037508.3427892]),r.extent=[-20037508.3427892,-20037508.3427892,20037508.3427892,20037508.3427892]),"EPSG:4326"===o.getCode()&&(r.tileGrid=i.createTileGrid([-180,-90,180,90]),r.extent=[-180,-90,180,90])));r.origin=r.tileGrid.getOrigin(0);var s=t[0],u=t[1],c=["4","5"].indexOf(BL.getOlVersion())>-1?-t[2]-1:t[2],f=r.tileGrid.getResolution(s),p=r.dpi||96,h=o.getUnits()||l.DEGREE;"degrees"!==h&&"degree"!==h||(h=l.DEGREE);"m"!==h&&"meter"!==h||(h=l.METER);var y=BL.resolutionToScale(f,p,h),d=aN.toSize(r.tileGrid.getTileSize(s,r.tmpSize)),b=function(){this._paramsChanged&&(this._layerUrl=a.call(this),this._paramsChanged=!1);return this._layerUrl||a.call(this)}.call(r)+encodeURI("&x="+u+"&y="+c+"&width="+d[0]+"&height="+d[1]+"&scale="+y);r.tileProxy&&(b=r.tileProxy+encodeURIComponent(b));r.cacheEnabled||(b+="&_t="+(new Date).getTime());return b},wrapX:void 0!==e.wrapX&&e.wrapX,cacheEnabled:e.cacheEnabled,layersID:e.layersID}),e.tileProxy&&(t.tileProxy=e.tileProxy),t.options=e,t._url=e.url,t.tileSetsIndex=-1,t.tempIndex=-1,t.dpi=t.options.dpi||96;var r=pN(t),n=ce.urlPathAppend(e.url,"tileImage."+e.format);function a(){return this.requestParams=this.requestParams||function(){var t={};return t.redirect=void 0!==e.redirect&&e.redirect,t.transparent=void 0===e.transparent||e.transparent,t.cacheEnabled=!(!1===e.cacheEnabled),this.cacheEnabled=t.cacheEnabled,t._cache=t.cacheEnabled,this.origin&&(t.origin=JSON.stringify({x:this.origin[0],y:this.origin[1]})),e.prjCoordSys&&(t.prjCoordSys=JSON.stringify(e.prjCoordSys)),e.layersID&&(t.layersID=e.layersID.toString()),e.clipRegion instanceof EL()&&(e.clipRegionEnabled=!0,e.clipRegion=BL.toSuperMapGeometry((new(RI())).writeGeometryObject(e.clipRegion)),e.clipRegion=ce.toJSON(jr.fromGeometry(e.clipRegion)),t.clipRegionEnabled=e.clipRegionEnabled,t.clipRegion=JSON.stringify(e.clipRegion)),e.overlapDisplayed?t.overlapDisplayed=!0:(t.overlapDisplayed=!1,e.overlapDisplayedOptions&&(t.overlapDisplayedOptions=this.overlapDisplayedOptions.toString())),t.cacheEnabled&&e.tileversion&&(t.tileversion=e.tileversion.toString()),e.rasterfunction&&(t.rasterfunction=JSON.stringify(e.rasterfunction)),t}.call(this),this._layerUrl=ce.urlAppend(n,ce.getParameterString(this.requestParams)),this._layerUrl=ln.appendCredential(this._layerUrl),this._layerUrl}return t}return t=i,n=[{key:"optionsFromMapJSON",value:function(e,t){var r={};r.url=e,r.crossOrigin="anonymous";var n=[t.bounds.left,t.bounds.bottom,t.bounds.right,t.bounds.top],o=t.visibleScales,i=t.bounds,a=t.dpi,s=t.coordUnit,l=BL.scalesToResolutions(o,i,a,s);return r.tileGrid=new(mI())({extent:n,resolutions:l}),r}},{key:"createTileGrid",value:function(e,t,r,n,o){var i=sN.createXYZ({extent:e,maxZoom:t,minZoom:r,tileSize:n});return new(mI())({extent:e,minZoom:r,origin:o,resolutions:i.getResolutions(),tileSize:i.getTileSize()})}}],(r=[{key:"setTileSetsInfo",value:function(e){this.tileSets=e,BL.isArray(this.tileSets)&&(this.tileSets=e[0]),this.tileSets&&(this.dispatchEvent({type:"tilesetsinfoloaded",value:{tileVersions:this.tileSets.tileVersions}}),this.changeTilesVersion())}},{key:"lastTilesVersion",value:function(){this.tempIndex=this.tileSetsIndex-1,this.changeTilesVersion()}},{key:"nextTilesVersion",value:function(){this.tempIndex=this.tileSetsIndex+1,this.changeTilesVersion()}},{key:"changeTilesVersion",value:function(){var e=this;if(null!=e.tileSets&&!(e.tempIndex===e.tileSetsIndex||this.tempIndex<0)){var t=e.tileSets.tileVersions;if(t&&e.tempIndex=0){var r=t[e.tempIndex].name;e.mergeTileVersionParam(r)&&(e.tileSetsIndex=e.tempIndex,e.dispatchEvent({type:"tileversionschanged",value:{tileVersion:t[e.tempIndex]}}))}}}},{key:"updateCurrentTileSetsIndex",value:function(e){this.tempIndex=e}},{key:"mergeTileVersionParam",value:function(e){return!!e&&(this.requestParams.tileversion=e,this._paramsChanged=!0,this.refresh(),!0)}}])&&uN(t.prototype,r),n&&uN(t,n),Object.defineProperty(t,"prototype",{writable:!1}),i}(),dN=r(689),bN=r.n(dN);function vN(e){var t,r=(t={},["(",")","(",")",",",","].forEach(function(e,r){t[e]="$".concat(r)}),t);for(var n in r)for(var o=r[n],i=new RegExp("\\".concat(n),"g");i.test(e);)e=e.replace(i,o);return e}function mN(e,t){var r=e;return e.replace(/&|\||>|<|=|!/g," ").split(" ").filter(function(e){return e}).forEach(function(e){var n=t.find(function(t){return t===e});if(wN(e)&&n&&(r=r.replace(n,"$"+n)),n){var o=vN(n);r=r.replace(n,o)}}),r}function gN(e){var t={};for(var r in e){var n=r;wN(r)&&(n="$"+r),t[n=vN(n)]=e[r]}return t}function wN(e){return/^\d/.test(e)}var ON=ol.geom.Point,SN=r.n(ON);function _N(e){"@babel/helpers - typeof";return(_N="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function PN(e,t){for(var r=0;r1){for(var p=1;p© SuperMap iServer with © SuperMap iClient",canvasFunction:a,logo:"4"===BL.getOlVersion()?n.logo:null,projection:n.projection,ratio:n.ratio,resolutions:n.resolutions,state:n.state})).on=r.onInternal,r.id=n.id?n.id:ce.createUniqueID("themeLayer_"),r.canvasFunctionInternal_=a,r.EVENT_TYPES=["loadstart","loadend","loadcancel","visibilitychanged","move","moveend","added","removed","tileloaded","beforefeaturesadded","featuresadded","featuresremoved"],r.features=[],r.TFEvents=n.TFEvents||[],r.map=n.map;var s=r.map.getSize();return r.div=document.createElement("div"),r.map.getViewport().appendChild(r.div),r.div.style.width=s[0]+"px",r.div.style.height=s[1]+"px",r.setOpacity(n.opacity),r.levelRenderer=new oM,r.movingOffset=[0,0],r.renderer=r.levelRenderer.init(r.div),r.map.getViewport().removeChild(r.div),r.renderer.clear(),r.addTFEvents(),r}return t=i,(r=[{key:"destroy",value:function(){this.EVENT_TYPES=null,this.isBaseLayer=null,this.TFEvents=null,this.destroyFeatures(),this.features=null,this.renderer&&this.renderer.dispose(),this.renderer=null,this.levelRenderer=null,this.movingOffset=null,this.currentMousePosition=null}},{key:"destroyFeatures",value:function(e){if(void 0==e&&(e=this.features),e){this.removeFeatures(e),Array.isArray(e)||(e=[e]);for(var t=e.length-1;t>=0;t--)e[t].destroy()}}},{key:"setOpacity",value:function(e){if(e!==this.opacity){this.opacity=e;var t=this.div;ce.modifyDOMElement(t,null,null,null,null,null,null,e),null!==this.map&&this.dispatchEvent({type:"changelayer",value:{layer:this,property:"opacity"}})}}},{key:"addFeatures",value:function(e){}},{key:"removeFeatures",value:function(e){var t=this;if(e){if(e===t.features)return t.removeAllFeatures();ce.isArray(e)||"function"==typeof e||(e=[e]);for(var r=[],n=0;n=r.left&&a.x<=r.right&&a.y>=r.top&&a.y<=r.bottom){n=!0;break}}return n}},{key:"clearCache",value:function(){this.cache={},this.charts=[]}},{key:"removeFeatures",value:function(e){this.clearCache(),fF(yF(i.prototype),"removeFeatures",this).call(this,e)}},{key:"removeAllFeatures",value:function(){this.clearCache(),fF(yF(i.prototype),"removeAllFeatures",this).call(this)}},{key:"redraw",value:function(){return this.clearCache(),!!this.renderer&&(this.redrawThematicFeatures(this.map.getView().calculateExtent()),!0)}},{key:"clear",value:function(){this.renderer&&(this.renderer.clearAll(),this.renderer.refresh()),this.removeAllFeatures(),this.clearCache()}},{key:"canvasFunctionInternal_",value:function(e,t,r,n,o){return lF.prototype.canvasFunctionInternal_.apply(this,arguments)}}])&&cF(t.prototype,r),n&&cF(t,n),Object.defineProperty(t,"prototype",{writable:!1}),i}(),bF=ol.style.RegularShape,vF=r.n(bF);function mF(e){"@babel/helpers - typeof";return(mF="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function gF(e,t){for(var r=0;r-1&&(this._data=e),this._renderLayer){this._renderLayer.setChangeFlags({dataChanged:!0,propsChanged:!0,viewportChanged:!0,updateTriggersChanged:!0}),this._refreshData();var t=this._getLayerState();t.data=this._data||[],this._renderLayer.setNeedsRedraw(!0),this._renderLayer.setState(t)}}},{key:"drawGraphics",value:function(e){this._data=e||(this._data?this._data:[]),this._renderLayer||this._createInnerRender(),this._clearBuffer(),this._draw()}},{key:"_initContainer",value:function(){this._canvas=this._createCanvas(this.width,this.height),this._layerContainer=this.container,this._wrapper=document.createElement("div"),this._wrapper.className="deck-wrapper",this._wrapper.style.position="absolute",this._wrapper.style.top="0",this._wrapper.style.left="0",this._wrapper.appendChild(this._canvas),this._layerContainer&&this._layerContainer.appendChild(this._wrapper)}},{key:"_createCanvas",value:function(e,t){var r=document.createElement("canvas");return r.oncontextmenu=DF,r.width=e,r.height=t,r.style.width=e+"px",r.style.height=t+"px",r}},{key:"_createInnerRender",value:function(){var e=this,t=this._getLayerState(),r=t.color,n=t.radius,o=t.opacity,i=t.highlightColor,a=t.radiusScale,s=t.radiusMinPixels,l=t.radiusMaxPixels,u=t.strokeWidth,c=t.outline;n=this._pixelToMeter(n);var f={id:"scatter-plot",data:[],pickable:Boolean(this.onClick)||Boolean(this.onHover),autoHighlight:!0,color:r,opacity:o,radius:n,radiusScale:a,highlightColor:i,radiusMinPixels:s,radiusMaxPixels:l,strokeWidth:u,outline:c,getPosition:function(t){if(!t)return[0,0,0];var r=t.getGeometry(),n=r&&r.getCoordinates();return(n=e._project(n))&&[n[0],n[1],0]},getColor:function(t){var r=e._getLayerDefaultStyle(),n=t&&t.getStyle();return n&&n.getColor&&n.getColor()||r.color},getRadius:function(t){var r=e._getLayerDefaultStyle(),n=t&&t.getStyle();return n&&n.getRadius&&n.getRadius()||r.radius},updateTriggers:{getColor:[r],getRadius:[n]}};e._renderLayer=new window.DeckGL.ScatterplotLayer(f)}},{key:"_getLayerDefaultStyle",value:function(){var e=this._getLayerState(),t=e.color,r=e.opacity,n=e.radius,o=e.radiusScale,i=e.radiusMinPixels,a=e.radiusMaxPixels,s=e.strokeWidth,l=e.outline;return{color:t,opacity:r,radius:n=this._pixelToMeter(n),radiusScale:o,radiusMinPixels:i,radiusMaxPixels:a,strokeWidth:s,outline:l}}},{key:"_getLayerState",value:function(){var e=this.layer.getLayerState(),t=this.map.getView().getProjection().getCode(),r=tL.transform([e.longitude,e.latitude],t,"EPSG:4326");return e.longitude=r[0],e.latitude=r[1],e.zoom=e.zoom-1,e}},{key:"_draw",value:function(){this._refreshData();var e=this._getLayerState();e.data=this._data||[];var t={};for(var r in e)t[r]=e[r];this._renderLayer.setNeedsRedraw(!0),t.layers=[this._renderLayer],t.canvas=this._canvas,this.onBeforeRender&&(t.onBeforeRender=this.onBeforeRender.bind(this)),this.onAfterRender&&(t.onAfterRender=this.onAfterRender.bind(this)),this.deckGL?this.deckGL.setProps(t):this.deckGL=new window.DeckGL.experimental.DeckGLJS(t)}},{key:"_refreshData",value:function(){var e=this._data||[],t=BL.isArray(e)?[].concat(e):[e];this._renderLayer.props.data||(this._renderLayer.props.data=[]),this._renderLayer.props.data.length=0;for(var r=0;r=0;s--){var l=a[s].getStyle();if(!l)return;if(!(l instanceof TF)){var u=a[s].getGeometry().getCoordinates(),c=new(HL())({image:l}).getImage(),f=!1;if(c instanceof _F&&1===c.getCount()){var p=180*c.getRotation()/Math.PI,h=Number.parseFloat(c.getAngle()),y=c.getRadius()*t,d=null;if(h>355)d=new(QL())(u,y);else{var b=[];b.push(u);for(var v=h/8,m=0;m<8;m++){var g=(p+m*v)/180*Math.PI;b.push([u[0]+y*Math.cos(g),u[1]-y*Math.sin(g)])}b.push(u),d=new(tD())([b])}d.intersectsCoordinate(this.map.getCoordinateFromPixel(o))&&(f=!0)}else{var w=[];w[0]=u[0]-c.getAnchor()[0]*t,w[2]=u[0]+c.getAnchor()[0]*t,w[1]=u[1]-c.getAnchor()[1]*t,w[3]=u[1]+c.getAnchor()[1]*t,MI.containsCoordinate(w,e)&&(f=!0)}!0!==f||n&&n(a[s],i)}}return},t._options=e;var r=lD(t);return e.onClick&&r.map.on("click",function(t){if(r.isDeckGLRender){var n=r.renderer.deckGL.pickObject({x:t.pixel[0],y:t.pixel[1]});e.onClick(n)}else{var o=r.findGraphicByPixel(t,r);o&&(e.onClick(o,t),r.isHighLight&&r._highLight(o.getGeometry().getCoordinates(),new(HL())({image:o.getStyle()}).getImage(),o,t.pixel))}}),r.map.on("pointermove",function(t){if(r.isDeckGLRender){var n=r.renderer.deckGL.pickObject({x:t.pixel[0],y:t.pixel[1]});e.onHover&&e.onHover(n)}}),t}return t=i,(r=[{key:"findGraphicByPixel",value:function(e,t){for(var r=t.map.getFeaturesAtPixel(e.pixel)||[],n=0;n-1)return o}}},{key:"setGraphics",value:function(e){this.graphics=this.graphics||[],this.graphics.length=0;var t=BL.isArray(e)?[].concat(e):[e];this.graphics=[].concat(t),this.update()}},{key:"addGraphics",value:function(e){this.graphics=this.graphics||[];var t=BL.isArray(e)?[].concat(e):[e];this.graphics=this.graphics.concat(t),this.update()}},{key:"getGraphicBy",value:function(e,t){var r=null;for(var n in this.graphics)if(this.graphics[n][e]===t){r=this.graphics[n];break}return r}},{key:"getGraphicById",value:function(e){return this.getGraphicBy("id",e)}},{key:"getGraphicsByAttribute",value:function(e,t){var r,n=[];for(var o in this.graphics)(r=this.graphics[o])&&r.attributes&&r.attributes[e]===t&&n.push(r);return n}},{key:"removeGraphics",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;if(!e||0===e.length||e===this.graphics)return this.graphics.length=0,void this.update();ce.isArray(e)||(e=[e]);for(var t=e.length-1;t>=0;t--){var r=e[t],n=ce.indexOf(this.graphics,r);-1!==n&&this.graphics.splice(n,1)}this.update()}},{key:"clear",value:function(){this.removeGraphics()}},{key:"update",value:function(){this.renderer.update(this.graphics,this._getDefaultStyle())}},{key:"_getDefaultStyle",value:function(){var e={};return this.color&&(e.fill=new(KL())({color:this.toRGBA(this.color)})),this.radius&&(e.radius=this.radius),this.outline&&(e.stroke=new(KL())({color:this.toRGBA(this.color),width:this.strokeWidth})),new(QL())(e)}},{key:"toRGBA",value:function(e){return"rgba(".concat(e[0],",").concat(e[1],",").concat(e[2],",").concat((e[3]||255)/255,")")}},{key:"setStyle",value:function(e){var t={color:this.color,radius:this.radius,opacity:this.opacity,highlightColor:this.highlightColor,radiusScale:this.radiusScale,radiusMinPixels:this.radiusMinPixels,radiusMaxPixels:this.radiusMaxPixels,strokeWidth:this.strokeWidth,outline:this.outline};ce.extend(this,ce.extend(t,e)),this.update()}},{key:"getLayerState",value:function(){var e=this.map,t=e.getSize()[0],r=e.getSize()[1],n=e.getView(),o=n.getCenter(),i={longitude:o[0],latitude:o[1],zoom:n.getZoom(),maxZoom:n.getMaxZoom(),pitch:0,bearing:180*-n.getRotation()/Math.PI},a={};for(var s in i)a[s]=i[s];return a.width=t,a.height=r,a.color=this.color,a.radius=this.radius,a.opacity=this.opacity,a.highlightColor=this.highlightColor,a.radiusScale=this.radiusScale,a.radiusMinPixels=this.radiusMinPixels,a.radiusMaxPixels=this.radiusMaxPixels,a.strokeWidth=this.strokeWidth,a.outline=this.outline,a}},{key:"_highLightClose",value:function(){this.selected=null,this.hitGraphicLayer&&(this.map.removeLayer(this.hitGraphicLayer),this.hitGraphicLayer=null),this.changed()}},{key:"_highLight",value:function(e,t,r,n){if(r.getStyle()instanceof _F){this.hitGraphicLayer&&(this.map.removeLayer(this.hitGraphicLayer),this.hitGraphicLayer=null);var o=this.map.getPixelFromCoordinate([e[0],e[1]]);n=n||[0,0];var a=Math.atan2(n[1]-o[1],n[0]-o[0])/Math.PI*180;a=a>0?a:360+a;var s=(Math.ceil(a/(t.getAngle()+t.getSpaceAngle()))-1)*(t.getAngle()+t.getSpaceAngle()),l={stroke:new(eI())({color:"#ff0000",width:1}),fill:new(KL())({color:"#0099ff"}),radius:t.getRadius(),angle:t.getAngle(),eAngle:s+t.getAngle(),sAngle:s,rotation:t.getRotation()};this.highLightStyle&&this.highLightStyle instanceof TF&&(l.stroke=this.highLightStyle.getStroke(),l.fill=this.highLightStyle.getFill(),l.radius=this.highLightStyle.getRadius(),l.angle=this.highLightStyle.getAngle());var u=new $F(new(SN())(e));u.setStyle(new TF(l)),this.hitGraphicLayer=new(nD())({source:new i({map:this.map,graphics:[u]})}),this.map.addLayer(this.hitGraphicLayer)}else this.selected=r,this.changed()}},{key:"getGraphicsInExtent",value:function(e){var t=[];return e?(this.graphics.forEach(function(r){MI.containsExtent(e,r.getGeometry().getExtent())&&t.push(r)}),t):(this.graphics.forEach(function(e){t.push(e)}),t)}}])&&iD(t.prototype,r),n&&iD(t,n),Object.defineProperty(t,"prototype",{writable:!1}),i}();function hD(e){"@babel/helpers - typeof";return(hD="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function yD(e,t){for(var r=0;rs){var y=i[0];i.splice(0,1),delete o[y]}}}}if(this.renderer.render(),r&&this.isHoverAble&&this.isMultiHover){var d=this.getShapesByFeatureID(r);this.renderer.updateHoverShapes(d)}}},{key:"createThematicFeature",value:function(e){var t=ce.copyAttributesWithClip(this.style);e.style&&!0===this.isAllowFeatureStyle&&(t=ce.copyAttributesWithClip(e.style));var r={};r.nodesClipPixel=this.nodesClipPixel,r.isHoverAble=this.isHoverAble,r.isMultiHover=this.isMultiHover,r.isClickAble=this.isClickAble,r.highlightStyle=YT.transformStyle(this.highlightStyle);for(var n=new yR(e,this,YT.transformStyle(t),r),o=0;o0&&0===this.labelFeatures.length)for(var t=this.setLabelsStyle(this.features),r=0,n=t.length;r=0&&h.x<=u.x&&h.y>=0&&h.y<=u.y){if(r.style.minZoomLevel>-1&&c<=r.style.minZoomLevel)continue;if(r.style.maxZoomLevel>-1&&c>r.style.maxZoomLevel)continue;var y=null;r.isStyleChange?(r.isStyleChange=null,y=this.calculateLabelBounds(r,h)):y=r.geometry.bsInfo.w&&r.geometry.bsInfo.h?this.calculateLabelBounds2(r,h):this.calculateLabelBounds(r,h);var d=new be(0,u.y,u.x,0),b=y.length;if(this.isAvoid){var v=this.getAvoidInfo(d,y);if(v){if("left"===v.aspectW){r.style.labelXOffset+=v.offsetX;for(var m=0;m=o[l].start&&a=o[l].start&&as&&(s=r,l="top")}if(t.y>e.bottom){var n=Math.abs(t.y-e.bottom);n>s&&(s=n,l="bottom")}if(t.xa&&(a=o,u="left")}if(t.x>e.right){var i=Math.abs(t.x-e.right);i>a&&(a=i,u="right")}}}}},{key:"isQuadrilateralOverLap",value:function(e,t){var r=e.length,n=t.length;if(5!==r||5!==n)return null;for(var o=!1,i=0;ie-n&&t.time© SuperMap iClient",canvasFunction:function(e,t,r,n,o){var i=n[0]/r,a=n[1]/r,s=this.map.getSize()[0],l=this.map.getSize()[1];this.layer||(this.layer=new BD(this.map,this.dataSet,this.mapvOptions,i,a,this));this.layer.pixelRatio=r,this.layer.offset=[(i-s)/2,(a-l)/2],this.rotate?this.rotate!==this.map.getView().getRotation()&&(this.layer.canvasLayer.resize(i,a),this.rotate=this.map.getView().getRotation()):this.rotate=this.map.getView().getRotation();var u=this.layer.canvasLayer.canvas;this.layer.isEnabledTime()||(this.layer.canvasLayer.resize(i,a),this.layer.canvasLayer.draw());this.context||(this.context=BL.createCanvasContext2D(i,a));var c=this.context.canvas;this.context.clearRect(0,0,c.width,c.height),c.width=n[0],c.height=n[1],c.style.width=n[0]+"px",c.style.height=n[1]+"px",this.context.drawImage(u,0,0),(this.resolution!==t||JSON.stringify(this.extent)!==JSON.stringify(e))&&(this.resolution=t,this.extent=e);return this.context.canvas},logo:"4"===BL.getOlVersion()?r.logo:null,projection:r.projection,ratio:r.ratio,resolutions:r.resolutions,state:r.state})).map=e.map,t.dataSet=e.dataSet,t.mapvOptions=e.mapvOptions,t}return t=i,(r=[{key:"addData",value:function(e,t){this.layer.addData(e,t)}},{key:"getData",value:function(){return this.layer&&(this.dataSet=this.layer.getData()),this.dataSet}},{key:"removeData",value:function(e){this.layer&&this.layer.removeData(e)}},{key:"clearData",value:function(){this.layer.clearData()}},{key:"update",value:function(e){this.layer.update(e),this.changed()}}])&&UD(t.prototype,r),n&&UD(t,n),Object.defineProperty(t,"prototype",{writable:!1}),i}();function HD(e){"@babel/helpers - typeof";return(HD="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function WD(e,t){for(var r=0;r0&&r.attributes){var n=this.themeField,o=r.attributes,i=this.styleGroups,a=!1,s=null;for(var l in o)if(n===l){a=!0,s=o[l];break}if(a)for(var u=0,c=i.length;u=i[u].start&&s© turfjs with © SuperMap iClient",features:r.features,format:r.format,extent:r.extent,logo:"4"===BL.getOlVersion()?r.logo:null,projection:r.projection,wrapX:r.wrapX})).turfMap={"Measurement.along":["line","distance","units"],"Measurement.area":["geojson"],"Measurement.bbox":["geojson"],"Measurement.bboxPolygon":["bbox"],"Measurement.bearing":["start","end","final"],"Measurement.center":["geojson","properties"],"Measurement.centerOfMass":["geojson","properties"],"Measurement.centroid":["geojson","properties"],"Measurement.destination":["origin","distance","bearing","units"],"Measurement.distance":["from","to","units"],"Measurement.envelope":["geojson"],"Measurement.length":["geojson","units"],"Measurement.midpoint":["point1","point2"],"Measurement.pointOnFeature":["geojson"],"Measurement.polygonTangents":["point","polygon"],"Measurement.rhumbBearing":["start","end","final"],"Measurement.rhumbDestination":["origin","distance","bearing","units"],"Measurement.rhumbDistance":["from","to","units"],"Measurement.square":["bbox"],"Measurement.greatCircle":["start","end","properties","npoints","offset"],"CoordinateMutation.cleanCoords":["geojson","mutate"],"CoordinateMutation.flip":["geojson","mutate"],"CoordinateMutation.rewind":["geojson","reverse","mutate"],"CoordinateMutation.round":["num","precision"],"CoordinateMutation.truncate":["geojson","precision","coordinates","mutate"],"Transformation.bboxClip":["feature","bbox"],"Transformation.bezierSpline":["line","resolution","sharpness"],"Transformation.buffer":["geojson","radius","units","steps"],"Transformation.circle":["center","radius","steps","units","properties"],"Transformation.clone":["geojson"],"Transformation.concave":["points","maxEdge","units"],"Transformation.convex":["geojson","concavity"],"Transformation.difference":["polygon1","polygon2"],"Transformation.dissolve":["featureCollection","propertyName"],"Transformation.intersect":["poly1","poly2"],"Transformation.lineOffset":["geojson","distance","units"],"Transformation.simplify":["feature","tolerance","highQuality"],"Transformation.tesselate":["poly"],"Transformation.transformRotate":["geojson","angle","pivot","mutate"],"Transformation.transformTranslate":["geojson","distance","direction","units","zTranslation","mutate"],"Transformation.transformScale":["geojson","factor","origin","mutate"],"Transformation.union":["A"],"Transformation.voronoi":["points","bbox"],"featureConversion.combine":["fc"],"featureConversion.explode":["geojson"],"featureConversion.flatten":["geojson"],"featureConversion.lineStringToPolygon":["lines","properties","autoComplete","orderCoords"],"featureConversion.polygonize":["geojson"],"featureConversion.polygonToLineString":["polygon","properties"],"Misc.kinks":["featureIn"],"Misc.lineArc":["center","radius","bearing1","bearing2","steps","units"],"Misc.lineChunk":["geojson","segmentLength","units","reverse"],"Misc.lineIntersect":["line1","line2"],"Misc.lineOverlap":["line1","line2"],"Misc.lineSegment":["geojson"],"Misc.lineSlice":["startPt","stopPt","line"],"Misc.lineSliceAlong":["line","startDist","stopDist","units"],"Misc.lineSplit":["line","splitter"],"Misc.mask":["polygon","mask"],"Misc.pointOnLine":["lines","pt","units"],"Misc.sector":["center","radius","bearing1","bearing2","steps","units"],"Misc.shortestPath":["start","end","obstacles","units","resolution"],"Misc.unkinkPolygon":["geojson"],"Helper.featureCollection":["features","bbox","id"],"Helper.feature":["geometry","properties","bbox","id"],"Helper.geometryCollection":["geometries","properties","bbox","id"],"Helper.lineString":["coordinates","properties","bbox","id"],"Helper.multiLineString":["coordinates","properties","bbox","id"],"Helper.multiPoint":["coordinates","properties","bbox","id"],"Helper.multiPolygon":["coordinates","properties","bbox","id"],"Helper.point":["coordinates","properties","bbox","id"],"Helper.polygon":["coordinates","properties","bbox","id"],"Data.sample":["featurecollection","num"],"Interpolation.interpolate":["points","cellSize","gridType","property","units","weight"],"Interpolation.isobands":["pointGrid","breaks","zProperty","commonProperties","breaksProperties"],"Interpolation.isolines":["pointGrid","breaks","zProperty","commonProperties","breaksProperties"],"Interpolation.planepoint":["point","triangle"],"Interpolation.tin":["points","z"],"Joins.pointsWithinPolygon":["points","polygons"],"Joins.tag":["points","polygons","field","outField","mask","properties"],"Grids.hexGrid":["bbox","cellSide","units","triangles"],"Grids.pointGrid":["bbox","cellSide","units","mask","properties"],"Grids.squareGrid":["bbox","cellSide","units","mask","properties"],"Grids.triangleGrid":["bbox","cellSide","units","mask","properties"],"Classification.nearestPoint":["targetPoint","points"],"Aggregation.collect":["polygons","points","inProperty","outProperty"],"Aggregation.clustersDbscan":["points","maxDistance","units","minPoints","mutate"],"Aggregation.clustersKmeans":["points","numberOfClusters","mutate"],"Meta.coordAll":["geojson"],"Meta.coordEach":["geojson","callback","excludeWrapCoord"],"Meta.coordReduce":["geojson","callback","initialValue","excludeWrapCoord"],"Meta.featureEach":["geojson","callback"],"Meta.featureReduce":["geojson","callback","initialValue"],"Meta.flattenEach":["geojson","callback"],"Meta.flattenReduce":["geojson","callback","initialValue"],"Meta.getCoord":["coord"],"Meta.getCoords":["coords"],"Meta.getGeom":["geojson"],"Meta.getGeomType":["geojson","name"],"Meta.geomEach":["geojson","callback"],"Meta.geomReduce":["geojson","callback","initialValue"],"Meta.propEach":["geojson","callback"],"Meta.propReduce":["geojson","callback","initialValue"],"Meta.segmentEach":["geojson","callback"],"Meta.segmentReduce":["geojson","callback","initialValue"],"Meta.getCluster":["geojson","filter"],"Meta.clusterEach":["geojson","property","callback"],"Meta.clusterReduce":["geojson","property","callback","initialValue"],"Assertions.collectionOf":["featureCollection","type","name"],"Assertions.containsNumber":["coordinates"],"Assertions.geojsonType":["value","type","name"],"Assertions.featureOf":["feature","type","name"],"Booleans.booleanClockwise":["line"],"Booleans.booleanContains":["feature1","feature2"],"Booleans.booleanCrosses":["feature1","feature2"],"Booleans.booleanDisjoint":["feature1","feature2"],"Booleans.booleanEqual":["feature1","feature2"],"Booleans.booleanOverlap":["feature1","feature2"],"Booleans.booleanParallel":["feature1","feature2"],"Booleans.booleanPointInPolygon":["point","polygon","ignoreBoundary"],"Booleans.booleanPointOnLine":["point","linestring","ignoreEndVertices"],"UnitConversion.bearingToAngle":["bearing"],"UnitConversion.convertArea":["area","originalUnit","finalUnit"],"UnitConversion.convertLength":["length","originalUnit","finalUnit"],"UnitConversion.degreesToradians":["degrees"],"UnitConversion.lengthToRadians":["distance","units"],"UnitConversion.lengthToDegrees":["distance","units"],"UnitConversion.radiansToLength":["radians","units"],"UnitConversion.radiansToDegrees":["radians"],"UnitConversion.toMercator":["geojson","mutate"],"UnitConversion.toWgs84":["geojson","mutate"]},t.turfOptionMap={"Measurement.along":["line","distance",{units:""}],"Measurement.bboxPolygon":["bbox",{properties:"",id:""}],"Measurement.bearing":["start","end",{final:""}],"Measurement.center":["geojson",{properties:""}],"Measurement.destination":["origin","distance","bearing",{units:"",properties:""}],"Measurement.distance":["from","to",{units:""}],"Measurement.length":["geojson",{units:""}],"Measurement.rhumbBearing":["start","end",{final:""}],"Measurement.rhumbDestination":["origin","distance","bearing",{units:"",properties:""}],"Measurement.rhumbDistance":["from","to",{units:""}],"Measurement.greatCircle":["start","end",{properties:"",npoints:"",offset:""}],"CoordinateMutation.cleanCoords":["geojson",{mutate:""}],"CoordinateMutation.flip":["geojson",{mutate:""}],"CoordinateMutation.rewind":["geojson",{mutate:"",reverse:""}],"CoordinateMutation.truncate":["geojson",{precision:"",coordinates:"",mutate:""}],"Transformation.bezierSpline":["line",{resolution:"",sharpness:""}],"Transformation.buffer":["geojson","radius",{units:"",steps:""}],"Transformation.circle":["center","radius",{units:"",steps:"",properties:""}],"Transformation.concave":["points",{maxEdge:"",units:""}],"Transformation.convex":["geojson",{concavity:""}],"Transformation.dissolve":["featureCollection",{propertyName:""}],"Transformation.lineOffset":["geojson","distance",{units:""}],"Transformation.simplify":["geojson",{tolerance:"",highQuality:""}],"Transformation.transformRotate":["geojson","angle",{pivot:"",mutate:""}],"Transformation.transformTranslate":["geojson","distance","direction",{units:"",zTranslation:"",mutate:""}],"Transformation.transformScale":["geojson","factor",{origin:"",mutate:""}],"Transformation.voronoi":["points",{bbox:""}],"featureConversion.lineStringToPolygon":["lines",{properties:"",autoComplete:"",orderCoords:""}],"featureConversion.polygonToLineString":["polygon",{properties:""}],"Misc.lineArc":["center","radius","bearing1","bearing2",{steps:"",units:""}],"Misc.lineChunk":["geojson","segmentLength",{units:"",reverse:""}],"Misc.lineOverlap":["line1","line2",{tolerance:""}],"Misc.lineSliceAlong":["line","startDist","stopDist",{units:""}],"Misc.pointOnLine":["lines","pt",{units:""}],"Misc.sector":["center","radius","bearing1","bearing2",{units:"",steps:"",properties:""}],"Misc.shortestPath":["start","end",{obstacles:"",units:"",resolution:""}],"Helper.feature":["geometry","properties",{bbox:"",id:""}],"Helper.geometryCollection":["geometries","properties",{bbox:"",id:""}],"Helper.lineString":["coordinates","properties",{bbox:"",id:""}],"Helper.multiLineString":["coordinates","properties",{bbox:"",id:""}],"Helper.multiPoint":["coordinates","properties",{bbox:"",id:""}],"Helper.multiPolygon":["coordinates","properties",{bbox:"",id:""}],"Helper.point":["coordinates","properties",{bbox:"",id:""}],"Helper.polygon":["coordinates","properties",{bbox:"",id:""}],"Interpolation.interpolate":["points","cellSize",{gridType:"",property:"",units:"",weight:""}],"Interpolation.isobands":["pointGrid","breaks",{zProperty:"",commonProperties:"",breaksProperties:""}],"Interpolation.isolines":["pointGrid","breaks",{zProperty:"",commonProperties:"",breaksProperties:""}],"Grids.hexGrid":["bbox","cellSide",{units:"",triangles:"",properties:"",mask:""}],"Grids.pointGrid":["bbox","cellSide",{units:"",mask:"",properties:""}],"Grids.squareGrid":["bbox","cellSide",{units:"",mask:"",properties:""}],"Grids.triangleGrid":["bbox","cellSide",{units:"",mask:"",properties:""}],"Aggregation.clustersDbscan":["points","maxDistance",{units:"",minPoints:"",mutate:""}],"Aggregation.clustersKmeans":["points",{numberOfClusters:"",mutate:""}],"Booleans.booleanPointInPolygon":["point","polygon",{ignoreBoundary:""}],"Booleans.booleanPointOnLine":["point","linestring",{ignoreEndVertices:""}],"UnitConversion.toMercator":["geojson",{mutate:""}],"UnitConversion.toWgs84":["geojson",{mutate:""}]},t}return t=i,(r=[{key:"process",value:function(e,t,r,n){var o;try{o=oB[e.split(".")[1]].apply(this,this.parse(e,t))}catch(r){o=oB[e.split(".")[1]].apply(this,this.parseOption(e,t))}var i=null;try{i=(new(RI())).readFeatures(o)}catch(e){return void(r&&r(o))}(n=null==n||n)&&this.addFeatures(i),r&&r(o)}},{key:"parse",value:function(e,t){if("Transformation.union"===e)return t.A;var r=[],n=this.turfMap[e];return n&&n.map(function(e){return r.push(t[e]),t[e]}),r}},{key:"parseOption",value:function(e,t){var r=[];return this.turfOptionMap[e].map(function(e){if(e instanceof Object){var n=e;Object.keys(n).forEach(function(e){n[e]=t[e]}),r.push(n)}else r.push(t[e]);return t}),r}}])&&aB(t.prototype,r),n&&aB(t,n),Object.defineProperty(t,"prototype",{writable:!1}),i}();function fB(e){"@babel/helpers - typeof";return(fB="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function pB(e,t){for(var r=0;r0&&r.attributes){var n=this.themeField,o=r.attributes,i=this.styleGroups,a=!1,s=null;for(var l in o)if(n===l){a=!0,s=o[l];break}if(a)for(var u=0,c=i.length;u-1;a--)if(t.indexOf(i[a])>-1){o=t.replace(i[a],n[i[a]]);break}o=o.replace(/[#]/gi,"#"),n[t]=r,e=e.replace(new RegExp(o,"g"),r)}),e=(e=e.replace(/[#]/gi,"\n#")).replace(/\[zoom/gi,"[scale")}var o={};new ej(e).getShaders().forEach(function(e){return o[e.elements[0].clean]=o[e.elements[0].clean]||{},o[e.elements[0].clean][e.attachment]=o[e.elements[0].clean][e.attachment]||[],o[e.elements[0].clean][e.attachment].push(e),e}),i.setCartoShaders(o)}},l.send(null)}if(i.getCartoCss()){var c={};new ej(i.getCartoCss()).getShaders().forEach(function(e){return c[e.elements[0].clean]=c[e.elements[0].clean]||{},c[e.elements[0].clean][e.attachment]=c[e.elements[0].clean][e.attachment]||[],c[e.elements[0].clean][e.attachment].push(e),e}),i.setClientCartoShaders(c)}}},u.open("GET",ce.urlPathAppend(i.getUrl(),"layers.json"),!1),u.send(null),t.on("featureSelected",function(e){i.setSelectedId(e.selectedId),i.setLayerName(e.layerName)}),t}return t=i,n=[{key:"setCartoShaders",value:function(e){this.cartoShaders=e}},{key:"getCartoShaders",value:function(){return this.cartoShaders}},{key:"setClientCartoShaders",value:function(e){this.clientCartoShaders=e}},{key:"getClientCartoShaders",value:function(){return this.clientCartoShaders}},{key:"setCartoCss",value:function(e){this.cartoCss=e}},{key:"getCartoCss",value:function(){return this.cartoCss}},{key:"setDonotNeedServerCartoCss",value:function(e){this.donotNeedServerCartoCss=e}},{key:"getDonotNeedServerCartoCss",value:function(){return this.donotNeedServerCartoCss}},{key:"setLayersInfo",value:function(e){this.layersInfo=e}},{key:"getLayersInfo",value:function(){return this.layersInfo}},{key:"setUrl",value:function(e){this.url=e}},{key:"getUrl",value:function(){return this.url}},{key:"setView",value:function(e){this.view=e}},{key:"getView",value:function(){return this.view}},{key:"setSelectedId",value:function(e){this.selectedId=e}},{key:"getSelectedId",value:function(){return this.selectedId}},{key:"setLayerName",value:function(e){this.layerName=e}},{key:"getLayerName",value:function(){return this.layerName}},{key:"setSelectedPointStyle",value:function(e){this.selectedPointStyle=e}},{key:"setSelectedLineStyle",value:function(e){this.selectedLineStyle=e}},{key:"setSelectedRegionStyle",value:function(e){this.selectedRegionStyle=e}},{key:"setSelectedTextStyle",value:function(e){this.selectedTextStyle=e}},{key:"getSelectedStyle",value:function(e){return"POINT"===e||"MULTIPOINT"===e?this.selectedPointStyle:"LINESTRING"===e||"MULTILINESTRING"===e?this.selectedLineStyle:"POLYGON"===e||"MULTIPOLYGON"===e?this.selectedRegionStyle:"TEXT"===e?this.selectedTextStyle:void 0}},{key:"getLayerInfo",value:function(e){var t=i.getLayersInfo();if(void 0===t)return null;var r=t[e];if(!r)return null;var n={layerIndex:r.layerIndex,ugcLayerType:r.ugcLayerType};switch(r.ugcLayerType){case"VECTOR":n.layerStyle=r.style?r.style:null;break;case"THEME":var o=r.theme;n.layerStyle=o?o.defaultStyle:null,o&&"LABEL"===o.type&&(n.type=o.type,n.textField=o.labelExpression);break;default:r.style&&(n.layerStyle=r.style)}return n}},{key:"getStyle",value:function(e,t){var r=i.getUrl(),n=i.getView(),o=n.getZoom(),a=BL.resolutionToScale(n.getResolution(),96,l.METER),s=e.replace(/(@)/gi,"___").replace(/(#)/gi,"___");if(i.getCartoCss()&&i.getClientCartoShaders()[s])return f(i.getClientCartoShaders()[s]);var u=i.getLayerInfo(e);if(!i.getDonotNeedServerCartoCss()&&i.getCartoShaders()[s]){if(t.getProperties().textStyle||t.getProperties().TEXT_FEATURE_CONTENT||"LABEL"==u.type&&u.textField){var c=uI.getValidStyleFromLayerInfo(u,t,r);return"POINT"===t.getGeometry().getType().toUpperCase()&&(c=function(e,t,r){var n=uI.getValidStyleFromLayerInfo(e,t,r);if("LABEL"==e.type){t.setProperties({type:"TEXT"});for(var o=f(i.getCartoShaders()[s]),a=n.getText(),l=0;l© SuperMap iServer with © SuperMap iClient",["4","5"].indexOf(BL.getOlVersion())<0&&(e.tileSize=e.format instanceof jB()&&e.style?512:256);var u=MB(t=o.call(this,{attributions:e.attributions,cacheSize:e.cacheSize,format:e.format||new(RI()),logo:"4"===BL.getOlVersion()?e.logo:null,overlaps:e.overlaps,projection:e.projection,state:e.format instanceof jB()&&e.style&&"[object String]"==Object.prototype.toString.call(e.style)?"loading":e.state,tileClass:e.tileClass,tileGrid:e.tileGrid,tilePixelRatio:e.tilePixelRatio,tileUrlFunction:e.tileUrlFunction||(e.format instanceof jB()&&e.style?function(e){return e?u._tileUrl.replace(r,e[0].toString()).replace(n,e[1].toString()).replace(a,function(){var t=["4","5"].indexOf(BL.getOlVersion())>-1?-e[2]-1:e[2];return t.toString()}).replace(s,function(){var t=e[0],r=u.tileGrid.getFullTileRange(t),n=r.getHeight()+e[2];return n.toString()}):void 0}:function(e,t,r){u.tileGrid||(u.tileGrid=u.getTileGridForProjection(r));var n=e[0],o=e[1],i=["4","5"].indexOf(BL.getOlVersion())>-1?-e[2]-1:e[2],a=aN.toSize(u.tileGrid.getTileSize(n,u.tmpSize)),s="";if("ZXY"===u.tileType)s="&width="+a[0]+"&height="+a[1]+"&x="+o+"&y="+i+"&z="+n;else if("ViewBounds"===u.tileType){var c=u.tileGrid.getTileCoordExtent(e);s="&width="+a[0]+"&height="+a[1]+"&viewBounds="+c[0]+","+c[1]+","+c[2]+","+c[3]}else{var f=u.tileGrid.getOrigin(n),p=u.tileGrid.getResolution(n),h=r.getUnits()||"degrees";"degrees"===h&&(h=l.DEGREE),"m"===h&&(h=l.METER);var y=BL.resolutionToScale(p,96,h);s="&x="+o+"&y="+i+"&width="+a[0]+"&height="+a[1]+"&scale="+y+"&origin={'x':"+f[0]+",'y':"+f[1]+"}"}return u._tileUrl+encodeURI(s)}),tileLoadFunction:e.tileLoadFunction||(e.format instanceof jB()?function(e,t){var r=e.getFormat(),n=e.onLoad.bind(e),o=e.onError.bind(e);e.setLoader(function(e,i,a){var s=new XMLHttpRequest;s.open("GET","function"==typeof t?t(e,i,a):t,!0),"arraybuffer"==r.getType()&&(s.responseType="arraybuffer"),s.withCredentials=u.withCredentials,s.onload=function(){if(!s.status||s.status>=200&&s.status<300){var t=r.getType(),i=void 0;"json"===t||"text"===t?i=s.responseText:"xml"===t?(i=s.responseXML)||(i=(new DOMParser).parseFromString(s.responseText,"application/xml")):"arraybuffer"===t&&(i=s.response),i?["4","5"].indexOf(BL.getOlVersion())>-1?n.call(this,r.readFeatures(i,{featureProjection:a}),r.readProjection(i),r.getLastExtent()):n.call(this,r.readFeatures(i,{extent:e,featureProjection:a}),r.readProjection(i)):o.call(this)}else o.call(this)}.bind(this),s.onerror=function(){o.call(this)}.bind(this),s.send()})}:function(e,t){var r=new RegExp("(^|\\?|&)width=([^&]*)(\\s|&|$)"),n=new RegExp("(^|\\?|&)height=([^&]*)(\\s|&|$)"),o=Number(t.match(r)[2]),i=Number(t.match(n)[2]);e.setLoader(function(r,n,a){an.get(t).then(function(t){if(e.getFormat()instanceof RI())return t.json()}).then(function(t){var n=[];if(e.getFormat()instanceof RI()){t.recordsets.map(function(e){return e.features.map(function(e){for(var t=[],r=0,n=0;n-1?(e.setExtent([0,0,o,i]),e.setProjection(s),n=e.getFormat().readFeatures(BL.toGeoJSON(n))):n=e.getFormat().readFeatures(BL.toGeoJSON(n),{extent:r,dataProjection:s,featureProjection:a}),e.setFeatures(n)}})})}),wrapX:void 0!==e.wrapX&&e.wrapX,tileSize:e.tileSize||null,zDirection:["4","5"].indexOf(BL.getOlVersion())>-1?null:0}));if(u.withCredentials=e.withCredentials,u._tileType=e.tileType||"ScaleXY",t.vectorTileStyles=new _B,e.format instanceof jB()&&e.style)if("[object String]"==Object.prototype.toString.call(e.style)){var c=ln.appendCredential(e.style);an.get(c,null,{withCredentials:e.withCredentials}).then(function(e){return e.json()}).then(function(r){t._fillByStyleJSON(r,e.source),t.setState("ready")})}else t._fillByStyleJSON(e.style,e.source);else t._fillByRestMapOptions(e.url,e);return t}return t=i,n=[{key:"optionsFromMapJSON",value:function(e,t){var r={};r.url=e,r.crossOrigin="anonymous";var n=[t.bounds.left,t.bounds.bottom,t.bounds.right,t.bounds.top],o=function(){var e,r=n[2]-n[0],o=n[3]-n[1],i=r>=o?r:o;e=i===r?i/t.viewer.width:i/t.viewer.height;var a=[],s=l.METER;t.coordUnit===l.DEGREE&&(s=l.DEGREE);if(t.visibleScales.length>0)for(var u=function(e){var t=e.visibleScales;if(!t)return null;var r=e.viewBounds,n=e.coordUnit,o=e.viewer,i=e.scale,a=e.datumAxis;r=new be(r.left,r.bottom,r.right,r.top),o=new V(o.rightBottom.x,o.rightBottom.y),n=n.toLowerCase(),a=a||6378137;var s=n,l=ce.calculateDpi(r,o,i,s,a),u=function(e){if(null===e)return;var t,r;r=e.length,t=[r];for(var n=0;n© SuperMap iServer with © SuperMap iClient",canvasFunction:a,logo:"4"===BL.getOlVersion()?n.logo:null,projection:n.projection,ratio:n.ratio,resolutions:n.resolutions,state:n.state})).canvasFunctionInternal_=a,r.features=[],r.name=e,!n.map)throw new Error("options.map is not found.");r.map=n.map,r.id=n.id?n.id:ce.createUniqueID("HeatMapSource_"),r.opacity=n.opacity?n.opacity:1,r.colors=n.colors?n.colors:["blue","cyan","lime","yellow","red"],r.useGeoUnit=!!n.useGeoUnit&&n.useGeoUnit,r.radius=n.radius?n.radius:50,r.featureWeight=n.featureWeight?n.featureWeight:null,r.maxWeight=null,r.minWeight=null,r.maxWidth=null,r.maxHeight=null,r.rootCanvas=document.createElement("canvas");var s=r.map.getSize();return r.rootCanvas.width=r.maxWidth=parseInt(s[0]),r.rootCanvas.height=r.maxHeight=parseInt(s[1]),ce.modifyDOMElement(r.rootCanvas,null,null,null,null,null,null,r.opacity),r.canvasContext=r.rootCanvas.getContext("2d"),r}return t=i,(r=[{key:"addFeatures",value:function(e){this.features=this.toiClientFeature(e),this.changed()}},{key:"setOpacity",value:function(e){if(e!==this.opacity){this.opacity=e;var t=this.rootCanvas;ce.modifyDOMElement(t,null,null,null,null,null,null,e),null!==this.map&&this.changed()}}},{key:"updateHeatPoints",value:function(e){this.features&&this.features.length>0?this.convertFastToPixelPoints(e):this.canvasContext.clearRect(0,0,this.maxWidth,this.maxWidth)}},{key:"convertFastToPixelPoints",value:function(e){var t,r,n,o,i,a,s=[];this.useRadius=this.useGeoUnit?parseInt(this.radius/e):this.radius;for(var l=0;l0&&this.maxWidth>0))return!1;var r=this.canvasContext;this.canvasContext.clearRect(0,0,this.maxWidth,this.maxHeight),this.drawCircle(this.useRadius),this.createGradient();for(var n=0;n=0;r--)e.addInt32(t[r]);return e.endVector()}},{key:"startEndsVector",value:function(e,t){e.startVector(4,t,4)}},{key:"addXy",value:function(e,t){e.addFieldOffset(1,t,0)}},{key:"createXyVector",value:function(e,t){e.startVector(8,t.length,8);for(var r=t.length-1;r>=0;r--)e.addFloat64(t[r]);return e.endVector()}},{key:"startXyVector",value:function(e,t){e.startVector(8,t,8)}},{key:"addZ",value:function(e,t){e.addFieldOffset(2,t,0)}},{key:"createZVector",value:function(e,t){e.startVector(8,t.length,8);for(var r=t.length-1;r>=0;r--)e.addFloat64(t[r]);return e.endVector()}},{key:"startZVector",value:function(e,t){e.startVector(8,t,8)}},{key:"addM",value:function(e,t){e.addFieldOffset(3,t,0)}},{key:"createMVector",value:function(e,t){e.startVector(8,t.length,8);for(var r=t.length-1;r>=0;r--)e.addFloat64(t[r]);return e.endVector()}},{key:"startMVector",value:function(e,t){e.startVector(8,t,8)}},{key:"addT",value:function(e,t){e.addFieldOffset(4,t,0)}},{key:"createTVector",value:function(e,t){e.startVector(8,t.length,8);for(var r=t.length-1;r>=0;r--)e.addFloat64(t[r]);return e.endVector()}},{key:"startTVector",value:function(e,t){e.startVector(8,t,8)}},{key:"addTm",value:function(e,t){e.addFieldOffset(5,t,0)}},{key:"createTmVector",value:function(e,t){e.startVector(8,t.length,8);for(var r=t.length-1;r>=0;r--)e.addInt64(t[r]);return e.endVector()}},{key:"startTmVector",value:function(e,t){e.startVector(8,t,8)}},{key:"addType",value:function(e,t){e.addFieldInt8(6,t,GB.Unknown)}},{key:"addParts",value:function(e,t){e.addFieldOffset(7,t,0)}},{key:"createPartsVector",value:function(e,t){e.startVector(4,t.length,4);for(var r=t.length-1;r>=0;r--)e.addOffset(t[r]);return e.endVector()}},{key:"startPartsVector",value:function(e,t){e.startVector(4,t,4)}},{key:"endGeometry",value:function(e){return e.endObject()}},{key:"createGeometry",value:function(t,r,n,o,i,a,s,l,u){return e.startGeometry(t),e.addEnds(t,r),e.addXy(t,n),e.addZ(t,o),e.addM(t,i),e.addT(t,a),e.addTm(t,s),e.addType(t,l),e.addParts(t,u),e.endGeometry(t)}}],(r=[{key:"__init",value:function(e,t){return this.bb_pos=e,this.bb=t,this}},{key:"ends",value:function(e){var t=this.bb.__offset(this.bb_pos,4);return t?this.bb.readUint32(this.bb.__vector(this.bb_pos+t)+4*e):0}},{key:"endsLength",value:function(){var e=this.bb.__offset(this.bb_pos,4);return e?this.bb.__vector_len(this.bb_pos+e):0}},{key:"endsArray",value:function(){var e=this.bb.__offset(this.bb_pos,4);return e?new Uint32Array(this.bb.bytes().buffer,this.bb.bytes().byteOffset+this.bb.__vector(this.bb_pos+e),this.bb.__vector_len(this.bb_pos+e)):null}},{key:"xy",value:function(e){var t=this.bb.__offset(this.bb_pos,6);return t?this.bb.readFloat64(this.bb.__vector(this.bb_pos+t)+8*e):0}},{key:"xyLength",value:function(){var e=this.bb.__offset(this.bb_pos,6);return e?this.bb.__vector_len(this.bb_pos+e):0}},{key:"xyArray",value:function(){var e=this.bb.__offset(this.bb_pos,6);return e?new Float64Array(this.bb.bytes().buffer,this.bb.bytes().byteOffset+this.bb.__vector(this.bb_pos+e),this.bb.__vector_len(this.bb_pos+e)):null}},{key:"z",value:function(e){var t=this.bb.__offset(this.bb_pos,8);return t?this.bb.readFloat64(this.bb.__vector(this.bb_pos+t)+8*e):0}},{key:"zLength",value:function(){var e=this.bb.__offset(this.bb_pos,8);return e?this.bb.__vector_len(this.bb_pos+e):0}},{key:"zArray",value:function(){var e=this.bb.__offset(this.bb_pos,8);return e?new Float64Array(this.bb.bytes().buffer,this.bb.bytes().byteOffset+this.bb.__vector(this.bb_pos+e),this.bb.__vector_len(this.bb_pos+e)):null}},{key:"m",value:function(e){var t=this.bb.__offset(this.bb_pos,10);return t?this.bb.readFloat64(this.bb.__vector(this.bb_pos+t)+8*e):0}},{key:"mLength",value:function(){var e=this.bb.__offset(this.bb_pos,10);return e?this.bb.__vector_len(this.bb_pos+e):0}},{key:"mArray",value:function(){var e=this.bb.__offset(this.bb_pos,10);return e?new Float64Array(this.bb.bytes().buffer,this.bb.bytes().byteOffset+this.bb.__vector(this.bb_pos+e),this.bb.__vector_len(this.bb_pos+e)):null}},{key:"t",value:function(e){var t=this.bb.__offset(this.bb_pos,12);return t?this.bb.readFloat64(this.bb.__vector(this.bb_pos+t)+8*e):0}},{key:"tLength",value:function(){var e=this.bb.__offset(this.bb_pos,12);return e?this.bb.__vector_len(this.bb_pos+e):0}},{key:"tArray",value:function(){var e=this.bb.__offset(this.bb_pos,12);return e?new Float64Array(this.bb.bytes().buffer,this.bb.bytes().byteOffset+this.bb.__vector(this.bb_pos+e),this.bb.__vector_len(this.bb_pos+e)):null}},{key:"tm",value:function(e){var t=this.bb.__offset(this.bb_pos,14);return t?this.bb.readUint64(this.bb.__vector(this.bb_pos+t)+8*e):BigInt(0)}},{key:"tmLength",value:function(){var e=this.bb.__offset(this.bb_pos,14);return e?this.bb.__vector_len(this.bb_pos+e):0}},{key:"type",value:function(){var e=this.bb.__offset(this.bb_pos,16);return e?this.bb.readUint8(this.bb_pos+e):GB.Unknown}},{key:"parts",value:function(t,r){var n=this.bb.__offset(this.bb_pos,18);return n?(r||new e).__init(this.bb.__indirect(this.bb.__vector(this.bb_pos+n)+4*t),this.bb):null}},{key:"partsLength",value:function(){var e=this.bb.__offset(this.bb_pos,18);return e?this.bb.__vector_len(this.bb_pos+e):0}}])&&zB(t.prototype,r),n&&zB(t,n),Object.defineProperty(t,"prototype",{writable:!1}),e}();function HB(e,t){for(var r=[],n=0;n>1]),r.push(o)}return r}function WB(e,t,r){if(!r||0===r.length)return[HB(e,t)];var n,o=0,i=Array.from(r).map(function(t){return e.slice(o,o=t<<1)});return t&&(o=0,n=Array.from(r).map(function(e){return t.slice(o,o=e)})),i.map(function(e,t){return HB(e,n?n[t]:void 0)})}function YB(e,t){var r=t;if(r===GB.Unknown&&(r=e.type()),r===GB.GeometryCollection){for(var n=[],o=0;o=0;r--)e.addInt8(t[r]);return e.endVector()}},{key:"startPropertiesVector",value:function(e,t){e.startVector(1,t,1)}},{key:"addColumns",value:function(e,t){e.addFieldOffset(2,t,0)}},{key:"createColumnsVector",value:function(e,t){e.startVector(4,t.length,4);for(var r=t.length-1;r>=0;r--)e.addOffset(t[r]);return e.endVector()}},{key:"startColumnsVector",value:function(e,t){e.startVector(4,t,4)}},{key:"endFeature",value:function(e){return e.endObject()}},{key:"finishFeatureBuffer",value:function(e,t){e.finish(t)}},{key:"finishSizePrefixedFeatureBuffer",value:function(e,t){e.finish(t,void 0,!0)}},{key:"createFeature",value:function(t,r,n,o){return e.startFeature(t),e.addGeometry(t,r),e.addProperties(t,n),e.addColumns(t,o),e.endFeature(t)}}],(r=[{key:"__init",value:function(e,t){return this.bb_pos=e,this.bb=t,this}},{key:"geometry",value:function(e){var t=this.bb.__offset(this.bb_pos,4);return t?(e||new qB).__init(this.bb.__indirect(this.bb_pos+t),this.bb):null}},{key:"properties",value:function(e){var t=this.bb.__offset(this.bb_pos,6);return t?this.bb.readUint8(this.bb.__vector(this.bb_pos+t)+e):0}},{key:"propertiesLength",value:function(){var e=this.bb.__offset(this.bb_pos,6);return e?this.bb.__vector_len(this.bb_pos+e):0}},{key:"propertiesArray",value:function(){var e=this.bb.__offset(this.bb_pos,6);return e?new Uint8Array(this.bb.bytes().buffer,this.bb.bytes().byteOffset+this.bb.__vector(this.bb_pos+e),this.bb.__vector_len(this.bb_pos+e)):null}},{key:"columns",value:function(e,t){var r=this.bb.__offset(this.bb_pos,8);return r?(t||new QB).__init(this.bb.__indirect(this.bb.__vector(this.bb_pos+r)+4*e),this.bb):null}},{key:"columnsLength",value:function(){var e=this.bb.__offset(this.bb_pos,8);return e?this.bb.__vector_len(this.bb_pos+e):0}}])&&ZB(t.prototype,r),n&&ZB(t,n),Object.defineProperty(t,"prototype",{writable:!1}),e}(),$B=(new TextEncoder,new TextDecoder);function eG(e,t){var r={};if(!t||0===t.length)return r;var n=e.propertiesArray();if(!n)return r;for(var o=new DataView(n.buffer,n.byteOffset),i=e.propertiesLength(),a=0;a=0;r--)e.addFloat64(t[r]);return e.endVector()}},{key:"startEnvelopeVector",value:function(e,t){e.startVector(8,t,8)}},{key:"addGeometryType",value:function(e,t){e.addFieldInt8(2,t,GB.Unknown)}},{key:"addHasZ",value:function(e,t){e.addFieldInt8(3,+t,0)}},{key:"addHasM",value:function(e,t){e.addFieldInt8(4,+t,0)}},{key:"addHasT",value:function(e,t){e.addFieldInt8(5,+t,0)}},{key:"addHasTm",value:function(e,t){e.addFieldInt8(6,+t,0)}},{key:"addColumns",value:function(e,t){e.addFieldOffset(7,t,0)}},{key:"createColumnsVector",value:function(e,t){e.startVector(4,t.length,4);for(var r=t.length-1;r>=0;r--)e.addOffset(t[r]);return e.endVector()}},{key:"startColumnsVector",value:function(e,t){e.startVector(4,t,4)}},{key:"addFeaturesCount",value:function(e,t){e.addFieldInt64(8,t,BigInt("0"))}},{key:"addIndexNodeSize",value:function(e,t){e.addFieldInt16(9,t,16)}},{key:"addCrs",value:function(e,t){e.addFieldOffset(10,t,0)}},{key:"addTitle",value:function(e,t){e.addFieldOffset(11,t,0)}},{key:"addDescription",value:function(e,t){e.addFieldOffset(12,t,0)}},{key:"addMetadata",value:function(e,t){e.addFieldOffset(13,t,0)}},{key:"endHeader",value:function(e){return e.endObject()}},{key:"finishHeaderBuffer",value:function(e,t){e.finish(t)}},{key:"finishSizePrefixedHeaderBuffer",value:function(e,t){e.finish(t,void 0,!0)}}],(r=[{key:"__init",value:function(e,t){return this.bb_pos=e,this.bb=t,this}},{key:"name",value:function(e){var t=this.bb.__offset(this.bb_pos,4);return t?this.bb.__string(this.bb_pos+t,e):null}},{key:"envelope",value:function(e){var t=this.bb.__offset(this.bb_pos,6);return t?this.bb.readFloat64(this.bb.__vector(this.bb_pos+t)+8*e):0}},{key:"envelopeLength",value:function(){var e=this.bb.__offset(this.bb_pos,6);return e?this.bb.__vector_len(this.bb_pos+e):0}},{key:"envelopeArray",value:function(){var e=this.bb.__offset(this.bb_pos,6);return e?new Float64Array(this.bb.bytes().buffer,this.bb.bytes().byteOffset+this.bb.__vector(this.bb_pos+e),this.bb.__vector_len(this.bb_pos+e)):null}},{key:"geometryType",value:function(){var e=this.bb.__offset(this.bb_pos,8);return e?this.bb.readUint8(this.bb_pos+e):GB.Unknown}},{key:"hasZ",value:function(){var e=this.bb.__offset(this.bb_pos,10);return!!e&&!!this.bb.readInt8(this.bb_pos+e)}},{key:"hasM",value:function(){var e=this.bb.__offset(this.bb_pos,12);return!!e&&!!this.bb.readInt8(this.bb_pos+e)}},{key:"hasT",value:function(){var e=this.bb.__offset(this.bb_pos,14);return!!e&&!!this.bb.readInt8(this.bb_pos+e)}},{key:"hasTm",value:function(){var e=this.bb.__offset(this.bb_pos,16);return!!e&&!!this.bb.readInt8(this.bb_pos+e)}},{key:"columns",value:function(e,t){var r=this.bb.__offset(this.bb_pos,18);return r?(t||new QB).__init(this.bb.__indirect(this.bb.__vector(this.bb_pos+r)+4*e),this.bb):null}},{key:"columnsLength",value:function(){var e=this.bb.__offset(this.bb_pos,18);return e?this.bb.__vector_len(this.bb_pos+e):0}},{key:"featuresCount",value:function(){var e=this.bb.__offset(this.bb_pos,20);return e?this.bb.readUint64(this.bb_pos+e):BigInt("0")}},{key:"indexNodeSize",value:function(){var e=this.bb.__offset(this.bb_pos,22);return e?this.bb.readUint16(this.bb_pos+e):16}},{key:"crs",value:function(e){var t=this.bb.__offset(this.bb_pos,24);return t?(e||new oG).__init(this.bb.__indirect(this.bb_pos+t),this.bb):null}},{key:"title",value:function(e){var t=this.bb.__offset(this.bb_pos,26);return t?this.bb.__string(this.bb_pos+t,e):null}},{key:"description",value:function(e){var t=this.bb.__offset(this.bb_pos,28);return t?this.bb.__string(this.bb_pos+t,e):null}},{key:"metadata",value:function(e){var t=this.bb.__offset(this.bb_pos,30);return t?this.bb.__string(this.bb_pos+t,e):null}}])&&iG(t.prototype,r),n&&iG(t,n),Object.defineProperty(t,"prototype",{writable:!1}),e}();function sG(e){for(var t=aG.getRootAsHeader(e),r=t.featuresCount(),n=t.indexNodeSize(),o=[],i=0;ie)){for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var s=r.call(i,"catchLoc"),l=r.call(i,"finallyLoc");if(s&&l){if(this.prev=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),S(r),c}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;S(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:P(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),c}},e}function bG(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==r)return;var n,o,i=[],a=!0,s=!1;try{for(r=r.call(e);!(a=(n=r.next()).done)&&(i.push(n.value),!t||i.length!==t);a=!0);}catch(e){s=!0,o=e}finally{try{a||null==r.return||r.return()}finally{if(s)throw o}}return i}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return vG(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return vG(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function vG(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);rthis.nodes[1]),this.nodes[1]=e}},{key:"toString",value:function(){return"[NodeRange level: ".concat(this._level,", nodes: ").concat(this.nodes[0],"-").concat(this.nodes[1],"]")}}])&&gG(t.prototype,r),n&&gG(t,n),Object.defineProperty(t,"prototype",{writable:!1}),e}(),a=n.minX,s=n.minY,l=n.maxX,u=n.maxY,hG.info("tree items: ".concat(t,", nodeSize: ").concat(r)),c=PG(t,r),f=c[0][0],void 0,d=c.length-1,p=new i([0,1],d),h=[p],hG.debug("starting stream search with queue: ".concat(h,", numItems: ").concat(t,", nodeSize: ").concat(r,", levelBounds: ").concat(c)),y=dG().mark(function e(){var n,p,y,d,b,v,m,g,w,O,S,_;return dG().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return n=h.shift(),hG.debug("popped node: ".concat(n,", queueLength: ").concat(h.length)),p=n.startNode(),y=p>=f,d=bG(c[n.level()],2),b=d[1],v=Math.min(n.endNode()+r,b),m=v-p,e.next=9,new OG(o(p*SG,m*SG),0);case 9:g=e.sent,w=new Float64Array(g),O=new Uint32Array(g),S=dG().mark(function e(r){var o,c,d,b,v,m,g,S;return dG().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(!(lw[o+2])){e.next=7;break}return e.abrupt("return","continue");case 7:if(!(s>w[o+3])){e.next=9;break}return e.abrupt("return","continue");case 9:if(c=O[8+(o<<1)],d=O[9+(o<<1)],b=jG(d,c),!y){e.next=17;break}return v=function(){if(r ").concat(b)),g.extendEndNodeToNewOffset(b),e.abrupt("return","continue");case 23:void 0,_=n.level()-1,S=new i([b,b+1],_),void 0!==g&&g.level()==S.level()?hG.info("Same level, but too far away. Pushing new request at offset: ".concat(b," rather than merging with distant ").concat(g)):hG.info("Pushing new level for ".concat(S," onto queue with nearestNodeRange: ").concat(g," since there's not already a range for this level.")),h.push(S);case 26:case"end":return e.stop()}var _},e)}),_=p;case 14:if(!(_=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,s=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){s=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(s)throw i}}}}function MG(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==r)return;var n,o,i=[],a=!0,s=!1;try{for(r=r.call(e);!(a=(n=r.next()).done)&&(i.push(n.value),!t||i.length!==t);a=!0);}catch(e){s=!0,o=e}finally{try{a||null==r.return||r.return()}finally{if(s)throw o}}return i}(e,t)||AG(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function AG(e,t){if(e){if("string"==typeof e)return LG(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?LG(e,t):void 0}}function LG(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var s=r.call(i,"catchLoc"),l=r.call(i,"finallyLoc");if(s&&l){if(this.prev=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),S(r),c}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;S(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:P(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),c}},e}function NG(e,t,r,n,o,i,a){try{var s=e[i](a),l=s.value}catch(e){return void r(e)}s.done?t(l):Promise.resolve(l).then(n,o)}function FG(e){return function(){var t=this,r=arguments;return new Promise(function(n,o){var i=e.apply(t,r);function a(e){NG(i,n,o,a,s,"next",e)}function s(e){NG(i,n,o,a,s,"throw",e)}a(void 0)})}}function DG(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function BG(e,t){for(var r=0;rfG.global.extraRequestThreshold()&&(hG.info("Pushing new feature batch, since gap ".concat(w," was too large")),a.push(s),s=[]),s.push([d,v]);case 23:l=!1,r.next=9;break;case 26:r.next=32;break;case 28:r.prev=28,r.t0=r.catch(7),u=!0,c=r.t0;case 32:if(r.prev=32,r.prev=33,!l||null==f.return){r.next=37;break}return r.next=37,zG(f.return());case 37:if(r.prev=37,!u){r.next=40;break}throw c;case 40:return r.finish(37);case 41:return r.finish(32);case 42:return t.headerClient.logUsage("header+index"),s.length>0&&a.push(s),O=a.flatMap(function(e){return t.readFeatureBatch(e)}),r.delegateYield(JG(HG(lG.ZN.merge(O))),"t1",46);case 46:case"end":return r.stop()}},r,null,[[7,28,32,42],[33,,37,41]])}))()}},{key:"lengthBeforeTree",value:function(){return EG.length+TG+this.headerLength}},{key:"lengthBeforeFeatures",value:function(){return this.lengthBeforeTree()+this.indexLength}},{key:"buildFeatureClient",value:function(){return new XG(this.headerClient.httpClient)}},{key:"readFeatureBatch",value:function(e){var t=this;return UG(IG().mark(function r(){var n,o,i,a,s,l,u,c,f,p,h;return IG().wrap(function(r){for(;;)switch(r.prev=r.next){case 0:n=MG(e[0],1),o=n[0],i=MG(e[e.length-1],2),a=i[0],s=i[1],l=a+s-o,u=t.buildFeatureClient(),c=RG(e),r.prev=7,c.s();case 9:if((f=c.n()).done){r.next=17;break}return p=MG(f.value,1),h=p[0],r.next=13,zG(t.readFeature(u,h,l));case 13:return r.next=15,r.sent;case 15:r.next=9;break;case 17:r.next=22;break;case 19:r.prev=19,r.t0=r.catch(7),c.e(r.t0);case 22:return r.prev=22,c.f(),r.finish(22);case 25:u.logUsage("feature");case 26:case"end":return r.stop()}},r,null,[[7,19,22,25]])}))()}},{key:"readFeature",value:function(){var e=FG(IG().mark(function e(t,r,n){var o,i,a,s,l,u,c;return IG().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return o=r+this.lengthBeforeFeatures(),e.next=3,t.getRange(o,4,n,"feature length");case 3:return a=e.sent,i=new DataView(a).getUint32(0,!0),e.next=7,t.getRange(o+4,i,n,"feature data");case 7:return s=e.sent,l=new Uint8Array(s),(u=new Uint8Array(i+TG)).set(l,TG),(c=new VB.cZ(u)).setPosition(TG),e.abrupt("return",KB.getRootAsFeature(c));case 14:case"end":return e.stop()}},e,this)}));return function(t,r,n){return e.apply(this,arguments)}}()}],[{key:"open",value:function(){var t=FG(IG().mark(function t(r){var n,o,i,a,s,l,u,c,f,p,h;return IG().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return n=2024,o=new XG(r),i=function(){var e,t=0;for(e=0;e<3;e++){t+=Math.pow(16,e)*SG}return t}(),a=n+i,hG.debug("fetching header. minReqLength: ".concat(a," (assumedHeaderLength: ").concat(n,", assumedIndexLength: ").concat(i,")")),t.t0=Uint8Array,t.next=8,o.getRange(0,8,a,"header");case 8:if(t.t1=t.sent,(s=new t.t0(t.t1)).subarray(0,3).every(function(e,t){return EG[t]===e})){t.next=13;break}throw hG.error("bytes: ".concat(s," != ").concat(EG)),new Error("Not a FlatGeobuf file");case 13:return hG.debug("magic bytes look good"),t.next=16,o.getRange(8,4,a,"header");case 16:if(u=t.sent,!((l=new DataView(u).getUint32(0,!0))>10485760||l<8)){t.next=21;break}throw new Error("Invalid header size");case 21:return hG.debug("headerLength: ".concat(l)),t.next=24,o.getRange(12,l,a,"header");case 24:return c=t.sent,f=new VB.cZ(new Uint8Array(c)),p=sG(f),h=_G(p.featuresCount,p.indexNodeSize),hG.debug("completed: opening http reader"),t.abrupt("return",new e(o,p,l,h));case 30:case"end":return t.stop()}},t)}));return function(e){return t.apply(this,arguments)}}()}]),e}(),XG=function(){function e(t){DG(this,e),this.bytesEverUsed=0,this.bytesEverFetched=0,this.buffer=new ArrayBuffer(0),this.head=0,this.httpClient="string"==typeof t?new QG(t):t}return GG(e,[{key:"getRange",value:function(){var e=FG(IG().mark(function e(t,r,n,o){var i,a,s;return IG().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(this.bytesEverUsed+=r,i=t-this.head,a=i+r,!(i>=0&&a<=this.buffer.byteLength)){e.next=5;break}return e.abrupt("return",this.buffer.slice(i,a));case 5:return s=Math.max(r,n),this.bytesEverFetched+=s,hG.debug("requesting for new Range: ".concat(t,"-").concat(t+r-1)),e.next=10,this.httpClient.getRange(t,s,o);case 10:return this.buffer=e.sent,this.head=t,e.abrupt("return",this.buffer.slice(0,r));case 13:case"end":return e.stop()}},e,this)}));return function(t,r,n,o){return e.apply(this,arguments)}}()},{key:"logUsage",value:function(e){var t=e.split(" ")[0],r=this.bytesEverUsed,n=this.bytesEverFetched,o=(100*r/n).toFixed(2);hG.info("".concat(t," bytes used/requested: ").concat(r," / ").concat(n," = ").concat(o,"%"))}}]),e}(),QG=function(){function e(t){DG(this,e),this.requestsEverMade=0,this.bytesEverRequested=0,this.url=t}return GG(e,[{key:"getRange",value:function(){var e=FG(IG().mark(function e(t,r,n){var o,i;return IG().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return this.requestsEverMade+=1,this.bytesEverRequested+=r,o="bytes=".concat(t,"-").concat(t+r-1),hG.info("request: #".concat(this.requestsEverMade,", purpose: ").concat(n,"), bytes: (this_request: ").concat(r,", ever: ").concat(this.bytesEverRequested,"), Range: ").concat(o)),e.next=6,fetch(this.url,{headers:{Range:o}});case 6:return i=e.sent,e.abrupt("return",i.arrayBuffer());case 8:case"end":return e.stop()}},e,this)}));return function(t,r,n){return e.apply(this,arguments)}}()}]),e}();function ZG(e){"@babel/helpers - typeof";return(ZG="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function KG(){KG=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,n="function"==typeof Symbol?Symbol:{},o=n.iterator||"@@iterator",i=n.asyncIterator||"@@asyncIterator",a=n.toStringTag||"@@toStringTag";function s(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{s({},"")}catch(e){s=function(e,t,r){return e[t]=r}}function l(e,t,r,n){var o=t&&t.prototype instanceof f?t:f,i=Object.create(o.prototype),a=new _(n||[]);return i._invoke=function(e,t,r){var n="suspendedStart";return function(o,i){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===o)throw i;return x()}for(r.method=o,r.arg=i;;){var a=r.delegate;if(a){var s=w(a,r);if(s){if(s===c)continue;return s}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var l=u(e,t,r);if("normal"===l.type){if(n=r.done?"completed":"suspendedYield",l.arg===c)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(n="completed",r.method="throw",r.arg=l.arg)}}}(e,r,a),i}function u(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}e.wrap=l;var c={};function f(){}function p(){}function h(){}var y={};s(y,o,function(){return this});var d=Object.getPrototypeOf,b=d&&d(d(P([])));b&&b!==t&&r.call(b,o)&&(y=b);var v=h.prototype=f.prototype=Object.create(y);function m(e){["next","throw","return"].forEach(function(t){s(e,t,function(e){return this._invoke(t,e)})})}function g(e,t){var n;this._invoke=function(o,i){function a(){return new t(function(n,a){!function n(o,i,a,s){var l=u(e[o],e,i);if("throw"!==l.type){var c=l.arg,f=c.value;return f&&"object"==ZG(f)&&r.call(f,"__await")?t.resolve(f.__await).then(function(e){n("next",e,a,s)},function(e){n("throw",e,a,s)}):t.resolve(f).then(function(e){c.value=e,a(c)},function(e){return n("throw",e,a,s)})}s(l.arg)}(o,i,n,a)})}return n=n?n.then(a,a):a()}}function w(e,t){var r=e.iterator[t.method];if(void 0===r){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=void 0,w(e,t),"throw"===t.method))return c;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return c}var n=u(r,e.iterator,t.arg);if("throw"===n.type)return t.method="throw",t.arg=n.arg,t.delegate=null,c;var o=n.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,c):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,c)}function O(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function S(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function _(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(O,this),this.reset(!0)}function P(e){if(e){var t=e[o];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,i=function t(){for(;++n=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var s=r.call(i,"catchLoc"),l=r.call(i,"finallyLoc");if(s&&l){if(this.prev=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),S(r),c}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;S(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:P(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),c}},e}function $G(e,t,r,n,o,i,a){try{var s=e[i](a),l=s.value}catch(e){return void r(e)}s.done?t(l):Promise.resolve(l).then(n,o)}function eU(e){return function(){var t=this,r=arguments;return new Promise(function(n,o){var i=e.apply(t,r);function a(e){$G(i,n,o,a,s,"next",e)}function s(e){$G(i,n,o,a,s,"throw",e)}a(void 0)})}}function tU(e){var t,r,n,o=2;for("undefined"!=typeof Symbol&&(r=Symbol.asyncIterator,n=Symbol.iterator);o--;){if(r&&null!=(t=e[r]))return t.call(e);if(n&&null!=(t=e[n]))return new rU(t.call(e));r="@@asyncIterator",n="@@iterator"}throw new TypeError("Object is not async iterable")}function rU(e){function t(e){if(Object(e)!==e)return Promise.reject(new TypeError(e+" is not an object."));var t=e.done;return Promise.resolve(e.value).then(function(e){return{value:e,done:t}})}return(rU=function(e){this.s=e,this.n=e.next}).prototype={s:null,n:null,next:function(){return t(this.n.apply(this.s,arguments))},return:function(e){var r=this.s.return;return void 0===r?Promise.resolve({value:e,done:!0}):t(r.apply(this.s,arguments))},throw:function(e){var r=this.s.return;return void 0===r?Promise.reject(e):t(r.apply(this.s,arguments))}},new rU(e)}function nU(e){return new aU(e,0)}function oU(e){return function(){return new iU(e.apply(this,arguments))}}function iU(e){var t,r;function n(t,r){try{var i=e[t](r),a=i.value,s=a instanceof aU;Promise.resolve(s?a.v:a).then(function(r){if(s){var l="return"===t?"return":"next";if(!a.k||r.done)return n(l,r);r=e[l](r).value}o(i.done?"return":"normal",r)},function(e){n("throw",e)})}catch(e){o("throw",e)}}function o(e,o){switch(e){case"return":t.resolve({value:o,done:!0});break;case"throw":t.reject(o);break;default:t.resolve({value:o,done:!1})}(t=t.next)?n(t.key,t.arg):r=null}this._invoke=function(e,o){return new Promise(function(i,a){var s={key:e,arg:o,resolve:i,reject:a,next:null};r?r=r.next=s:(t=r=s,n(e,o))})},"function"!=typeof e.return&&(this.return=void 0)}function aU(e,t){this.v=e,this.k=t}function sU(){return(sU=oU(KG().mark(function e(t,r,n){var o,i,a,s,l,u,c,f,p,h;return KG().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return o=rG(t),i=function(){var e=eU(KG().mark(function e(t){return KG().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,o.slice(t);case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}},e)}));return function(t){return e.apply(this,arguments)}}(),e.t0=Uint8Array,e.next=5,nU(i(8,"magic bytes"));case 5:if(e.t1=e.sent,(a=new e.t0(e.t1)).subarray(0,3).every(function(e,t){return EG[t]===e})){e.next=9;break}throw new Error("Not a FlatGeobuf file");case 9:return e.t2=Uint8Array,e.next=12,nU(i(4,"header length"));case 12:return e.t3=e.sent,a=new e.t2(e.t3),s=new VB.cZ(a),l=s.readUint32(0),e.t4=Uint8Array,e.next=19,nU(i(l,"header data"));case 19:if(e.t5=e.sent,a=new e.t4(e.t5),s=new VB.cZ(a),u=sG(s),n&&n(u),c=u.indexNodeSize,f=u.featuresCount,!(c>0)){e.next=29;break}return p=_G(f,c),e.next=29,nU(i(p,"entire index, w/o rect"));case 29:return e.next=31,nU(uU(i,u,r));case 31:if(!(h=e.sent)){e.next=36;break}return e.next=34,h;case 34:e.next=29;break;case 36:case"end":return e.stop()}},e)}))).apply(this,arguments)}function lU(){return(lU=oU(KG().mark(function e(t,r,n,o){var i,a,s,l,u,c,f;return KG().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,nU(YG.open(t));case 2:i=e.sent,hG.debug("opened reader"),o&&o(i.header),a=!1,s=!1,e.prev=7,u=tU(i.selectBbox(r));case 9:return e.next=11,nU(u.next());case 11:if(!(a=!(c=e.sent).done)){e.next=18;break}return f=c.value,e.next=15,n(f,i.header);case 15:a=!1,e.next=9;break;case 18:e.next=24;break;case 20:e.prev=20,e.t0=e.catch(7),s=!0,l=e.t0;case 24:if(e.prev=24,e.prev=25,!a||null==u.return){e.next=29;break}return e.next=29,nU(u.return());case 29:if(e.prev=29,!s){e.next=32;break}throw l;case 32:return e.finish(29);case 33:return e.finish(24);case 34:case"end":return e.stop()}},e,null,[[7,20,24,34],[25,,29,33]])}))).apply(this,arguments)}function uU(e,t,r){return cU.apply(this,arguments)}function cU(){return(cU=eU(KG().mark(function e(t,r,n){var o,i,a,s,l;return KG().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.t0=Uint8Array,e.next=3,t(4,"feature length");case 3:if(e.t1=e.sent,0!==(o=new e.t0(e.t1)).byteLength){e.next=7;break}return e.abrupt("return");case 7:return i=new VB.cZ(o),a=i.readUint32(0),e.t2=Uint8Array,e.next=12,t(a,"feature data");case 12:return e.t3=e.sent,o=new e.t2(e.t3),(s=new Uint8Array(a+4)).set(o,4),(i=new VB.cZ(s)).setPosition(TG),l=KB.getRootAsFeature(i),e.abrupt("return",n(l,r));case 20:case"end":return e.stop()}},e)}))).apply(this,arguments)}function fU(e,t){return{type:"FeatureCollection",features:function(e,t,r){if(!e.subarray(0,3).every(function(e,t){return EG[t]===e}))throw new Error("Not a FlatGeobuf file");var n=new VB.cZ(e),o=n.readUint32(EG.length);n.setPosition(EG.length+TG);var i=sG(n);r&&r(i);var a=EG.length+TG+o,s=i.indexNodeSize,l=i.featuresCount;s>0&&(a+=_G(l,s));for(var u=[];a=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var s=r.call(i,"catchLoc"),l=r.call(i,"finallyLoc");if(s&&l){if(this.prev=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),S(r),c}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;S(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:P(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),c}},e}function mU(e,t,r,n,o,i,a){try{var s=e[i](a),l=s.value}catch(e){return void r(e)}s.done?t(l):Promise.resolve(l).then(n,o)}function gU(e){return function(){var t=this,r=arguments;return new Promise(function(n,o){var i=e.apply(t,r);function a(e){mU(i,n,o,a,s,"next",e)}function s(e){mU(i,n,o,a,s,"throw",e)}a(void 0)})}}function wU(e,t){for(var r=0;r=t[0]&&e[1]<=t[3]&&e[3]>=t[1]}(o,i=t)&&(o[0]>i[0]?a[0]=o[0]:a[0]=i[0],o[1]>i[1]?a[1]=o[1]:a[1]=i[1],o[2]1?(u=p,f=new t.geom.MultiPolygon(null)):f=new t.geom.Polygon(null)}else f=c===t.geom.GeometryType.POINT?new t.geom.Point(null):c===t.geom.GeometryType.LINE_STRING?new t.geom.LineString(null):c===t.geom.GeometryType.POLYGON?new t.geom.Polygon(null):c===t.geom.GeometryType.MULTI_POINT?new t.geom.MultiPoint(null):c===t.geom.GeometryType.MULTI_LINE_STRING?new t.geom.MultiLineString(null):null;if(f){f.setFlatCoordinates(t.geom.GeometryLayout.XY,l,u),o=new this.featureClass_,this.geometryName_&&o.setGeometryName(this.geometryName_);var m=t.format.Feature.transformWithOptions(f,!1,this.adaptOptions(n));o.setGeometry(m),o.setId(a),o.setProperties(s)}}return o},t.geom.flat.textpath.lineString=function(e,r,n,o,i,a,s,l){for(var u=[],c=Math.atan2(e[n-o+1]-e[r+1],e[n-o]-e[r]),f=c<-.785||c>2.356,p=c<-.785&&c>-2.356||c>.785&&c<2.356,h=i.length,y=e[r],d=e[r+1],b=e[r+=o],v=e[r+1],m=0,g=Math.sqrt(Math.pow(b-y,2)+Math.pow(v-d,2));r=19968&&R<=40907,A=a(j=f?C+j:j+C)-E;for(E+=A;r1?D:D<0||D>1?F:F1?D:D<0||D>1?F:F0?-Math.PI:Math.PI),M&&p&&(z+=z>0?-Math.PI/2:Math.PI/2),void 0!==S){var J=z-S;if(J+=J>Math.PI?-2*Math.PI:J<-Math.PI?2*Math.PI:0,M===_?Math.abs(J)>l:Math.abs(J)>l+Math.PI/2)return null}S!=z||p?(E=A,w=[B,G,A/2,z,j=C],f?u.unshift(w):u.push(w),S=z,_=M):(f&&(w[0]=B,w[1]=G,w[2]=A/2),w[4]=j),x=U,k=V,s+=A}return u},t.layer.VectorTile.prototype.setFastRender=function(e){return this.fastRender=e},t.renderer.canvas.VectorTileLayer.prototype.postCompose=function(e,r,n){var o,i,a=this.getLayer(),s=a.getDeclutter()?{}:null,l=a.getSource(),u=a.getRenderMode(),c=t.renderer.canvas.VectorTileLayer.VECTOR_REPLAYS[u],f=r.pixelRatio,p=r.viewState.rotation,h=r.size;p&&(o=Math.round(f*h[0]/2),i=Math.round(f*h[1]/2),t.render.canvas.rotateAtOffset(e,-p,o,i)),s&&this.declutterTree_.clear();for(var y=this.renderedTiles,d=l.getTileGridForProjection(r.viewState.projection),b=[],v=[],m=y.length-1;m>=0;--m){var g=y[m];if(g.getState()!=t.TileState.ABORT)for(var w=g.tileCoord,O=d.getTileCoordExtent(w)[0]-d.getTileCoordExtent(g.wrappedTileCoord)[0],S=void 0,_=0,P=g.tileKeys.length;_e.length)&&(t=e.length);for(var r=0,n=new Array(t);r=e.length)break;if(t[o.id]){var i=JSON.parse(JSON.stringify(t[o.id]));i.paint&&(i.paint=Object.assign({},o.paint,i.paint)),i.layout&&(i.layout=Object.assign({},o.layout,i.layout)),Object.assign(o,i),r++}}this._createStyleFunction()}},{key:"setStyle",value:function(e){this.layersBySourceLayer={},this._loadStyle(e)}},{key:"_loadStyle",value:function(e){var t=this;if("[object Object]"==Object.prototype.toString.call(e))this._mbStyle=e,this._resolve();else{var r=ln.appendCredential(e);an.get(r,null,{withCredentials:this.withCredentials}).then(function(e){return e.json()}).then(function(e){t._mbStyle=e,t._resolve()})}}},{key:"_resolve",value:function(){var e=this;if(this.source||(this.source=Object.keys(this._mbStyle.sources)[0]),this._mbStyle.sprite){var t=.5==(window.devicePixelRatio>=1.5?.5:1)?"@2x":"";this._mbStyle.sprite=this._mbStyle.sprite.replace("@2x","");var r=this._toSpriteUrl(this._mbStyle.sprite,this.path,t+".json");an.get(ln.appendCredential(r),null,{withCredentials:this.withCredentials}).then(function(e){return e.json()}).then(function(r){e._spriteData=r,e._spriteImageUrl=ln.appendCredential(e._toSpriteUrl(e._mbStyle.sprite,e.path,t+".png")),e._spriteImage=null;var n=new Image;n.crossOrigin=e.withCredentials?"use-credentials":"anonymous",n.onload=function(){e._spriteImage=n,e._initStyleFunction()},n.onerror=function(){e._spriteImage=null,e._initStyleFunction()},n.src=e._spriteImageUrl})}else this._initStyleFunction()}},{key:"_initStyleFunction",value:function(){if(!this.resolutions&&this._mbStyle.metadata&&this._mbStyle.metadata.indexbounds){for(var e=this._mbStyle.metadata.indexbounds,t=Math.max(e[2]-e[0],e[3]-e[1]),r=[],n=0;n<30;n++)r.push(t/512/Math.pow(2,n));this.resolutions=r}this._createStyleFunction(),this.dispatchEvent("styleloaded")}},{key:"_createStyleFunction",value:function(){this.map&&window.olms.applyBackground(this.map,this._mbStyle),this.featureStyleFuntion=this._getStyleFunction()}},{key:"_getStyleFunction",value:function(){var e=this;return this.fun=window.olms.stylefunction({setStyle:function(){},set:function(){},changed:function(){}},this._mbStyle,this.source,this.resolutions,this._spriteData,"",this._spriteImage),function(t,r){var n=e.fun(t,r);if(e.selectedObjects.length>0&&e.selectedObjects.find(function(e){return e.id===t.getId()&&e.sourceLayer===t.get("layer")})){var o=n&&n[0]?n[0].getZIndex():99999,i=e.selectedStyle(t,r);Array.isArray(i)||(i=[i]);for(var a=0;a2?n[2]:""):e+r}}])&&IU(t.prototype,r),n&&IU(t,n),Object.defineProperty(t,"prototype",{writable:!1}),i}();function GU(e){"@babel/helpers - typeof";return(GU="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function UU(e,t){for(var r=0;re.length)&&(t=e.length);for(var r=0,n=new Array(t);r=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var s=r.call(i,"catchLoc"),l=r.call(i,"finallyLoc");if(s&&l){if(this.prev=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),S(r),c}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;S(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:P(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),c}},e}function bJ(e,t,r,n,o,i,a){try{var s=e[i](a),l=s.value}catch(e){return void r(e)}s.done?t(l):Promise.resolve(l).then(n,o)}function vJ(e){return function(){var t=this,r=arguments;return new Promise(function(n,o){var i=e.apply(t,r);function a(e){bJ(i,n,o,a,s,"next",e)}function s(e){bJ(i,n,o,a,s,"throw",e)}a(void 0)})}}function mJ(e,t){for(var r=0;r-1){var o=this.server.split(n);o.length>1&&(t=o[0]+n+this.server+"web/maps/"+this.mapId+"/map.json")}}this.getMapInfo(t)}},{key:"getMapInfo",value:function(e){var t=this,r=e;-1===e.indexOf(".json")&&(r="".concat(e,".json")),an.get(t.getRequestUrl(r),null,{withCredentials:this.withCredentials}).then(function(e){return e.json()}).then(function(e){t.getMapInfoSuccess(e)}).catch(function(e){t.errorCallback&&t.errorCallback(e,"getMapFaild",t.map)})}},{key:"getMapInfoSuccess",value:function(){var e=vJ(dJ().mark(function e(t){var r,n;return dJ().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(r=this,!1!==t.succeed){e.next=4;break}return r.errorCallback&&r.errorCallback(t.error,"getMapFaild",r.map),e.abrupt("return");case 4:return e.next=6,r.handleCRS(t.projection,t.baseLayer.url);case 6:if(n=e.sent,r.mapParams={title:t.title,description:t.description},"BrowseMap"!==n.action){e.next=12;break}r.createSpecLayer(t),e.next=34;break;case 12:if("OpenMap"!==n.action){e.next=32;break}if(r.baseProjection=n.newCrs||t.projection,r.webMapVersion=t.version,r.baseLayer=t.baseLayer,r.isHaveGraticule=t.grid&&t.grid.graticule,!t.baseLayer||"MAPBOXSTYLE"!==t.baseLayer.layerType){e.next=21;break}r.addMVTMapLayer(t,t.baseLayer,0).then(vJ(dJ().mark(function e(){return dJ().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(r.createView(t),t.layers&&0!==t.layers.length){e.next=5;break}r.sendMapToUser(0),e.next=7;break;case 5:return e.next=7,r.addLayers(t);case 7:r.addGraticule(t);case 8:case"end":return e.stop()}},e)}))).catch(function(e){r.errorCallback&&r.errorCallback(e,"getMapFaild",r.map)}),e.next=30;break;case 21:return e.next=23,r.addBaseMap(t);case 23:if(t.layers&&0!==t.layers.length){e.next=27;break}r.sendMapToUser(0),e.next=29;break;case 27:return e.next=29,r.addLayers(t);case 29:r.addGraticule(t);case 30:e.next=34;break;case 32:return r.errorCallback&&r.errorCallback({type:"Not support CS",errorMsg:"Not support CS: ".concat(t.projection)},"getMapFaild",r.map),e.abrupt("return");case 34:case"end":return e.stop()}},e,this)}));return function(t){return e.apply(this,arguments)}}()},{key:"handleCRS",value:function(){var e=vJ(dJ().mark(function e(t,r){var n,o,i,a;return dJ().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(n=this,o={},i=t,a="OpenMap",!this.isCustomProjection(t)){e.next=7;break}return e.next=5,an.get(n.getRequestUrl("".concat(r,"/prjCoordSys.wkt")),null,{withCredentials:n.withCredentials,withoutFormatSuffix:!0}).then(function(e){return e.text()}).then(function(){var e=vJ(dJ().mark(function e(r){return dJ().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(-1!==r.indexOf("")){e.next=5;break}n.addProjctionFromWKT(r,t),o={action:a,newCrs:i},e.next=6;break;case 5:throw"ERROR";case 6:case"end":return e.stop()}},e)}));return function(t){return e.apply(this,arguments)}}()).catch(function(){o={action:a="BrowseMap",newCrs:i}});case 5:e.next=9;break;case 7:0===t.indexOf("EPSG")&&t.split(":")[1]<=0?a="BrowseMap":"EPSG:910111"===t||"EPSG:910112"===t?i="EPSG:3857":"EPSG:910101"===t||"EPSG:910102"===t?i="EPSG:4326":0!==t.indexOf("EPSG")&&(n.addProjctionFromWKT(i),i=n.getEpsgInfoFromWKT(t)),o={action:a,newCrs:i};case 9:return e.abrupt("return",o);case 10:case"end":return e.stop()}},e,this)}));return function(t,r){return e.apply(this,arguments)}}()},{key:"getScales",value:function(e){var t,r,n=this,o=[],i={},a=[],s=e.coordUnit||tL.get(e.projection).getUnits();if(s||(s="EPSG:3857"==this.baseProjection?"m":"degree"),e.visibleScales&&e.visibleScales.length>0)e.visibleScales.forEach(function(e){var r=1/e;t=n.getResFromScale(r,s),e="1:".concat(r),i[n.formatScale(e)]=t,a.push(t),o.push(e)},this);else if("WMTS"===e.layerType)e.scales.forEach(function(e){t=n.getResFromScale(e,s,90.7),e="1:".concat(e),i[n.formatScale(e)]=t,a.push(t),o.push(e)},this);else for(var l=e.minZoom,u=void 0===l?0:l,c=e.maxZoom,f=void 0===c?22:c,p=this.map.getView(),h=u;h<=f;h++)if(t=p.getResolutionForZoom(h),r=this.getScaleFromRes(t,s),-1===o.indexOf(r)){o.push(r);var y=r.replace(/,/g,"");i[y]=t,a.push(t)}this.scales=o,this.resolutions=i,this.resolutionArray=a}},{key:"getResFromScale",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"DEGREE";return.0254*e/(arguments.length>2&&void 0!==arguments[2]?arguments[2]:96)/PJ[t.toUpperCase()]}},{key:"getScaleFromRes",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"DEGREE";return"1:"+e*(arguments.length>2&&void 0!==arguments[2]?arguments[2]:96)*PJ[t.toUpperCase()]/.0254}},{key:"formatScale",value:function(e){return e.replace(/,/g,"")}},{key:"createSpecLayer",value:function(e){var t=this,r=e.baseLayer,n=r.url,o=r.layerType,i=[e.extent.leftBottom.x,e.extent.leftBottom.y,e.extent.rightTop.x,e.extent.rightTop.y],a=new tL.Projection({extent:i,units:"m",code:"EPSG:0"});tL.addProjection(a);var s={center:e.center,level:0};t.baseProjection=a;var l={center:s.center?[s.center.x,s.center.y]:[0,0],zoom:0,projection:a};["4","5"].indexOf(BL.getOlVersion())<0&&(l.multiWorld=!0);var u,c=new(Jz())(l);t.map.setView(c),t.mapParams&&(t.mapParams.extent=i,t.mapParams.projection=e.projection),n&&n.indexOf("?token=")>-1&&(t.credentialKey="token",t.credentialValue=e.baseLayer.credential=n.split("?token=")[1],n=n.split("?token=")[0]),"TILE"===o?an.get(t.getRequestUrl("".concat(n,".json")),null,{withCredentials:this.withCredentials}).then(function(e){return e.json()}).then(function(e){r.originResult=e;var o="IPORTAL",i=r.credential,a="Token",s=r.url;(r.url.indexOf("www.supermapol.com")>-1||r.url.indexOf("itest.supermapol.com")>-1)&&(a="Key",s=[s],o="ONLINE"),i&&ln["register".concat(a)](s,i);var l={serverType:o,url:n,tileGrid:yN.optionsFromMapJSON(n,e).tileGrid};n&&!t.isSameDomain(n)&&(l.tileProxy=t.server+"apps/viewer/getUrlResource.png?url="),u=new yN(l),t.addSpecToMap(u)}).catch(function(e){t.errorCallback&&t.errorCallback(e,"getMapFaild",t.map)}):"WMS"===o?(u=t.createWMSSource(r),t.addSpecToMap(u)):"WMTS"===o?an.get(t.getRequestUrl(n,!0),null,{withCredentials:this.withCredentials}).then(function(e){return e.text()}).then(function(n){r.extent=[e.extent.leftBottom.x,e.extent.leftBottom.y,e.extent.rightTop.x,e.extent.rightTop.y],r.scales=t.getWMTSScales(r.tileMatrixSet,n),r.dpi=kJ,u=t.createWMTSSource(r),t.addSpecToMap(u)}).catch(function(e){t.errorCallback&&t.errorCallback(e,"getMapFaild",t.map)}):t.errorCallback&&t.errorCallback({type:"Not support CS",errorMsg:"Not support CS: ".concat(o)},"getMapFaild",t.map),c&&c.fit(i)}},{key:"addSpecToMap",value:function(e){var t=new Qz.Tile({source:e,zIndex:0});this.map.addLayer(t),this.sendMapToUser(0)}},{key:"getWMTSScales",value:function(e,t){for(var r=(new(Kz())).read(t).Contents.TileMatrixSet,n=[],o=0;o=1)}},{key:"limitScale",value:function(e,t){if(this.validScale(e.minScale)&&this.validScale(e.maxScale)){var r,n,o;if("WMTS"===t.layerType)r=t.scales,n=+e.minScale.split(":")[1],o=+e.maxScale.split(":")[1];else{var i=this.scales.map(function(e){return 1/e.split(":")[1]});r=Array.isArray(t.visibleScales)&&t.visibleScales.length&&t.visibleScales?t.visibleScales:i,n=1/+e.minScale.split(":")[1],o=1/+e.maxScale.split(":")[1]}var a=this.findNearest(r,n),s=this.findNearest(r,o),l=r.indexOf(a),u=r.indexOf(s);if(l>u){var c=[u,l];l=c[0],u=c[1]}0===l&&u===r.length-1||(this.map.setView(new(Jz())(Object.assign({},this.map.getView().options_,{maxResolution:void 0,minResolution:void 0,minZoom:l,maxZoom:u,constrainResolution:!1}))),this.map.addInteraction(new(Hz())({constrainResolution:!0})))}}},{key:"parseNumber",value:function(e){return Number(e.split(":")[1])}},{key:"findNearest",value:function(e,t){for(var r=0,n=t,o=1,i=e.length;o0||u.scales&&u.scales.length>0)this.getScales(u);else if(e.baseLayer&&t&&4===t.length){var c=(t[2]-t[0])/512,f=(t[3]-t[1])/512;l=Math.max(c,f)}this.map.setView(new(Jz())({zoom:n,center:a,projection:i,maxZoom:o,maxResolution:l}));var p={};if(u.scales&&u.scales.length>0&&"WMTS"===u.layerType||this.resolutionArray&&this.resolutionArray.length>0?p={zoom:n,center:a,projection:i,resolutions:this.resolutionArray,maxZoom:o}:"WMTS"===u.layerType?(p={zoom:n,center:a,projection:i,maxZoom:o},this.getScales(u)):(p={zoom:n,center:a,projection:i,maxResolution:l,maxZoom:o},this.getScales(u)),["4","5"].indexOf(BL.getOlVersion())<0&&(p.multiWorld=!0,p.showFullExtent=!0,p.enableRotation=!1,p.constrainResolution=!0),this.map.setView(new(Jz())(p)),e.visibleExtent){var h=this.map.getView(),y=h.getResolutionForExtent(e.visibleExtent,this.map.getSize());h.setResolution(y),h.setCenter((0,MI.getCenter)(e.visibleExtent))}}},{key:"createBaseLayer",value:function(e,t,r,n,o){var i,a=this;n&&(a=n);var s=e.layerType;switch((s.indexOf("TIANDITU_VEC")>-1||s.indexOf("TIANDITU_IMG")>-1||s.indexOf("TIANDITU_TER")>-1)&&(s=s.substr(0,12)),s){case"TIANDITU_VEC":case"TIANDITU_IMG":case"TIANDITU_TER":i=this.createTiandituSource(s,e.projection);break;case"BAIDU":i=this.createBaiduSource();break;case"BING":i=this.createBingSource(e,e.projection);break;case"WMS":i=this.createWMSSource(e);break;case"WMTS":i=a.createWMTSSource(e);break;case"TILE":case"SUPERMAP_REST":i=a.createDynamicTiledSource(e,o);break;case"CLOUD":case"CLOUD_BLACK":case"OSM":case"JAPAN_ORT":case"JAPAN_RELIEF":case"JAPAN_PALE":case"JAPAN_STD":case"GOOGLE_CN":case"GOOGLE":i=this.createXYZSource(e)}var l=new Qz.Tile({source:i,zIndex:e.zIndex||1,visible:e.visible}),u=BL.newGuid(8);e.name&&l.setProperties({name:e.name,layerID:u}),void 0!==e.visible&&null!==e.visible||(e.visible=!0),l.setVisible(e.visible),e.opacity&&l.setOpacity(e.opacity),t&&l.setZIndex(t),e.layer=l,e.layerID=u;var c,f,p=e.visibleScale,h=e.autoUpdateTime;return p&&(f=this.resolutions[p.minScale],c=this.resolutions[p.maxScale],f>1?l.setMaxResolution(Math.ceil(f)):l.setMaxResolution(1.1*f),l.setMinResolution(c)),h&&!e.autoUpdateInterval&&(e.autoUpdateInterval=setInterval(function(){a.updateTileToMap(e,t)},h)),r&&(l.setZIndex(0),a.map.addLayer(l)),l}},{key:"updateTileToMap",value:function(e,t){this.map.removeLayer(e.layer),this.map.addLayer(this.createBaseLayer(e,t))}},{key:"getInternetMapInfo",value:function(e){var t=[-20037508.3427892,-20037508.3427892,20037508.3427892,20037508.3427892],r=[-20037508.34,-20037508.34,20037508.34,20037508.34];switch(e.units="m",e.layerType){case"BAIDU":e.iServerUrl="https://map.baidu.com/",e.epsgCode="EPSG:3857",e.minZoom=1,e.maxZoom=19,e.level=1,e.extent=t;break;case"CLOUD":e.url="http://t2.dituhui.com/FileService/image?map=quanguo&type=web&x={x}&y={y}&z={z}",e.epsgCode="EPSG:3857",e.minZoom=1,e.maxZoom=18,e.level=1,e.extent=t;break;case"CLOUD_BLACK":e.url="http://t3.dituhui.com/MapService/getGdp?x={x}&y={y}&z={z}",e.epsgCode="EPSG:3857",e.minZoom=1,e.maxZoom=18,e.level=1,e.extent=t;break;case"tencent":e.epsgCode="EPSG:3857",e.minZoom=1,e.maxZoom=18,e.level=1,e.extent=t;break;case"TIANDITU_VEC_3857":case"TIANDITU_IMG_3857":case"TIANDITU_TER_3857":e.iserverUrl="https://map.tianditu.gov.cn/",e.epsgCode="EPSG:3857",e.minZoom=0,e.maxZoom=19,e.level=1,e.extent=t,"TIANDITU_TER_3857"===e.layerType&&(e.maxZoom=14);break;case"TIANDITU_VEC_4326":case"TIANDITU_IMG_4326":case"TIANDITU_TER_4326":e.iserverUrl="https://map.tianditu.gov.cn/",e.epsgCode="EPSG:4326",e.minZoom=0,e.maxZoom=19,e.level=1,e.extent=[-180,-90,180,90],"TIANDITU_TER_4326"===e.layerType&&(e.maxZoom=14);break;case"OSM":e.url="http://{a-c}.tile.openstreetmap.org/{z}/{x}/{y}.png",e.epsgCode="EPSG:3857",e.minZoom=1,e.maxZoom=19,e.level=1,e.extent=r,e.iserverUrl="https://www.openstreetmap.org";break;case"GOOGLE":e.url="https://maps.googleapis.com/maps/vt?pb=!1m5!1m4!1i{z}!2i{x}!3i{y}!4i256!2m3!1e0!2sm!3i540264686!3m12!2s".concat(this.getLang(),"!3sUS!5e18!12m4!1e68!2m2!1sset!2sRoadmap!12m3!1e37!2m1!1ssmartmaps!4e0&key=").concat(this.googleMapsAPIKey),e.epsgCode="EPSG:3857",e.minZoom=1,e.maxZoom=22,e.level=1,e.extent=r,e.iserverUrl="https://www.google.cn/maps";break;case"JAPAN_STD":e.url="https://cyberjapandata.gsi.go.jp/xyz/std/{z}/{x}/{y}.png",e.epsgCode="EPSG:3857",e.minZoom=1,e.maxZoom=19,e.level=0,e.extent=r;break;case"JAPAN_PALE":e.url="https://cyberjapandata.gsi.go.jp/xyz/pale/{z}/{x}/{y}.png",e.epsgCode="EPSG:3857",e.minZoom=2,e.maxZoom=19,e.level=2,e.extent=r;break;case"JAPAN_RELIEF":e.url="https://cyberjapandata.gsi.go.jp/xyz/relief/{z}/{x}/{y}.png",e.epsgCode="EPSG:3857",e.minZoom=5,e.maxZoom=14,e.level=5,e.extent=[12555667.53929,1281852.98656,17525908.86651,7484870.70596];break;case"JAPAN_ORT":e.url="https://cyberjapandata.gsi.go.jp/xyz/ort/{z}/{x}/{y}.jpg",e.epsgCode="EPSG:3857",e.minZoom=2,e.maxZoom=12,e.level=2,e.extent=[-19741117.14519,-10003921.36848,19981677.71404,19660983.56089]}}},{key:"createDynamicTiledSource",value:function(e,t){var r="IPORTAL",n=e.credential?e.credential.token:void 0,o="Token",i=e.url;(e.url.indexOf("www.supermapol.com")>-1||e.url.indexOf("itest.supermapol.com")>-1)&&(o="Key",i=[i],r="ONLINE"),n&&ln["register".concat(o)](i,n);var a={transparent:!0,url:e.url,wrapX:!1,serverType:r,format:e.format};if(t||this.isCustomProjection(this.baseProjection)||(a.prjCoordSys={epsgCode:this.baseProjection.split(":")[1]}),e.visibleScales&&e.visibleScales.length>0){var s=[];for(var l in e.visibleScales){var u=BL.scaleToResolution(e.visibleScales[l],xJ,e.coordUnit);s.push(u)}e.visibleResolutions=s;var c=new(mI())({extent:e.extent,resolutions:s});a.tileGrid=c}else{a.extent=this.baseLayerExtent;var f=new(mI())({extent:e.extent,resolutions:this.getResolutionsFromBounds(e.extent)});a.tileGrid=f}e.url&&!this.isSameDomain(e.url)&&"webp"!==e.format&&(a.tileProxy=this.server+"apps/viewer/getUrlResource.png?url=");var p=new yN(a);return ln["register".concat(o)](e.url),p}},{key:"getResolutionsFromBounds",value:function(e){for(var t=[],r=Math.abs(e[0]-e[2])/512,n=0;n<22;n++)0!==n?(r/=2,t[n]=r):t[n]=r;return t}},{key:"createTiandituSource",value:function(e,t,r){var n={layerType:e.split("_")[1].toLowerCase(),isLabel:r||!1,projection:t,url:"https://t{0-7}.tianditu.gov.cn/{layer}_{proj}/wmts?tk=".concat(this.tiandituKey)};return new iN(n)}},{key:"createBaiduSource",value:function(){return new xI}},{key:"createBingSource",value:function(e,t){return new(UI())({wrapX:!1,projection:t,crossOrigin:"anonymous",tileUrlFunction:function(e){var t=pJ(e),r=t[0],n=t[1],o=t[2];o=o>0?o-1:-o-1;for(var i="",a=r;a>0;a--){var s=0,l=1<1&&void 0!==arguments[1])||arguments[1],n=this,o=e.url.trim(),i=e.credential,a={withCredentials:this.withCredentials,withoutFormatSuffix:!0};if(r){var s={epsgCode:n.baseProjection.split(":")[1]};n.isCustomProjection(n.baseProjection)||(o+=".json?prjCoordSys="+encodeURI(JSON.stringify(s)))}return i&&(o="".concat(o,"&token=").concat(encodeURI(i.token)),t=i.token),an.get(n.getRequestUrl("".concat(o,".json")),null,a).then(function(e){return e.json()}).then(function(){var r=vJ(dJ().mark(function r(o){var i,a;return dJ().wrap(function(r){for(;;)switch(r.prev=r.next){case 0:if(!1!==o.succeed){r.next=2;break}return r.abrupt("return",o);case 2:if(i="png","webp"!==n.tileFormat){r.next=8;break}return r.next=6,n.isSupportWebp(e.url,t);case 6:a=r.sent,i=a?"webp":"png";case 8:return r.abrupt("return",{units:o.coordUnit&&o.coordUnit.toLowerCase(),coordUnit:o.coordUnit,visibleScales:o.visibleScales,extent:[o.bounds.left,o.bounds.bottom,o.bounds.right,o.bounds.top],projection:"EPSG:".concat(o.prjCoordSys.epsgCode),format:i});case 9:case"end":return r.stop()}},r)}));return function(e){return r.apply(this,arguments)}}()).catch(function(e){return{succeed:!1,error:e}})}},{key:"getTileInfo",value:function(e,t,r){var n=this,o={withCredentials:this.withCredentials,withoutFormatSuffix:!0};return e.url.indexOf("?token=")>-1&&(n.credentialKey="token",n.credentialValue=e.credential=e.url.split("?token=")[1],e.url=e.url.split("?token=")[0]),an.get(n.getRequestUrl("".concat(e.url,".json")),null,o).then(function(e){return e.json()}).then(function(){var o=vJ(dJ().mark(function o(i){var a,s;return dJ().wrap(function(o){for(;;)switch(o.prev=o.next){case 0:if(!i||!i.code||200===i.code){o.next=2;break}throw i;case 2:if(i.visibleScales&&(e.visibleScales=i.visibleScales,e.coordUnit=i.coordUnit),e.maxZoom=i.maxZoom,e.maxZoom=i.minZoom,a=e.credential?e.credential.token:void 0,e.format="png","webp"!==n.tileFormat||"https://maptiles.supermapol.com/iserver/services/map_China/rest/maps/China_Dark"===e.url){o.next=12;break}return o.next=10,n.isSupportWebp(e.url,a);case 10:s=o.sent,e.format=s?"webp":"png";case 12:r?t&&t(r,null,!0,n):t&&t(e);case 13:case"end":return o.stop()}},o)}));return function(e){return o.apply(this,arguments)}}()).catch(function(e){n.errorCallback&&n.errorCallback(e,"getTileInfo",n.map)})}},{key:"getWMTSUrl",value:function(e,t){var r="?";return e.indexOf("?")>-1&&(r="&"),e+=t?r+"SERVICE=WMTS&VERSION=1.0.0&REQUEST=GetCapabilities":r+"/1.0.0/WMTSCapabilities.xml",this.getRequestUrl(e,!0)}},{key:"getWmtsInfo",value:function(e,t){var r=this,n={withCredentials:r.withCredentials,withoutFormatSuffix:!0},o=!e.requestEncoding||"KVP"===e.requestEncoding;return an.get(r.getWMTSUrl(e.url,o),null,n).then(function(e){return e.text()}).then(function(n){var i=(new(Kz())).read(n);if(r.isValidResponse(i)){for(var a,s,l=i.Contents,u=l.TileMatrixSet,c=l.Layer,f="default",p=0;p-1?[g[1],g[0]]:g;break}var w,O=e.name;h?(h[0]<-180&&(h[0]=-180),h[1]<-90&&(h[1]=-90),h[2]>180&&(h[2]=180),h[3]>90&&(h[3]=90),w=tL.transformExtent(h,"EPSG:4326",r.baseProjection)):w=tL.get(r.baseProjection).getExtent(),e.tileUrl=r.getTileUrl(i.OperationsMetadata.GetTile.DCP.HTTP.Get,a,s,o),e.extent=w,e.name=O,e.orginEpsgCode=e.projection,e.overLayer=!0,e.scales=y,e.style=f,e.title=O,e.unit="m",e.layerFormat=s,e.matrixIds=d,t&&t(e)}}).catch(function(e){r.errorCallback&&r.errorCallback(e,"getWmtsFaild",r.map)})}},{key:"getWmsInfo",value:function(e){var t=this,r=e.url.trim();r+=r.indexOf("?")>-1?"&SERVICE=WMS&REQUEST=GetCapabilities":"?SERVICE=WMS&REQUEST=GetCapabilities";var n={withCredentials:t.withCredentials,withoutFormatSuffix:!0};return new Promise(function(o){return an.get(t.getRequestUrl(r,!0),null,n).then(function(e){return e.text()}).then(function(){var t=vJ(dJ().mark(function t(r){var n,i,a,s,l,u,c;return dJ().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(n=new(eJ()),!(i=n.read(r))){t.next=17;break}a=i.Capability.Layer.Layer,s=e.projection,e.subLayers=e.layers[0],e.version=i.version,l=0;case 7:if(!(l=0?t.getImage().src="".concat(r,"&tk=").concat(ce.getParameters(e.url).tk):t.getImage().src=r}})}},{key:"getWMTSTileGrid",value:function(e,t,r,n,o,i){var a=this.getReslutionsFromScales(t,n||kJ,r);return new(KI())({origin:o,extent:e,resolutions:a.res,matrixIds:i||a.matrixIds})}},{key:"getReslutionsFromScales",value:function(e,t,r,n){r=r&&r.toLowerCase()||"degrees",t=t||kJ,n=n||6378137;var o=[],i=[];if(BL.isArray(e))e&&e.forEach(function(e,a){e>1&&(i.push(a),o.push(this.getResolutionFromScale(e,t,r,n)))},this);else{var a=e.TileMatrix;a&&a.forEach(function(e){i.push(e.Identifier),o.push(this.getResolutionFromScale(e.ScaleDenominator,t,r,n))},this)}return{res:o,matrixIds:i}}},{key:"getResolutionFromScale",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:xJ,r=arguments.length>2?arguments[2]:void 0,n=arguments.length>3?arguments[3]:void 0;return e=(e=+e)>1?1/e:e,"degrees"===r||"dd"===r||"degree"===r?254/t/e/(2*Math.PI*n/360)/1e4:254/t/e/1e4}},{key:"isValidResponse",value:function(e){for(var t=["Contents","OperationsMetadata"],r=!0,n=0;n0)){e.next=14;break}this.layers=r,a=dJ().mark(function e(){var a,l,c,f,p,h,y,d,b;return dJ().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(a=r[s],l=s+1,c=a.dataSource,f=c&&"SAMPLE_DATA"===c.type&&!!c.name,"MAPBOXSTYLE"!==a.layerType){e.next=6;break}n.addMVTMapLayer(t,a,l).then(function(){n.layerAdded++,n.sendMapToUser(i)}).catch(function(e){n.layerAdded++,n.sendMapToUser(i),n.errorCallback&&n.errorCallback(e,"getLayerFaild",n.map)}),e.next=18;break;case 6:if(!(c&&c.serverId||"MARKER"===a.layerType||"HOSTED_TILE"===a.layerType||f)){e.next=17;break}if(p=a.dataSource,(h=p?p.serverId:a.serverId)||f){e.next=14;break}return e.next=11,n.addLayer(a,null,l);case 11:return n.layerAdded++,n.sendMapToUser(i),e.abrupt("return",{v:void 0});case 14:"MARKER"===a.layerType||p&&(!p.accessType||"DIRECT"===p.accessType)||f?(y=f?"".concat(n.server,"apps/dataviz/libs/sample-datas/").concat(p.name,".json"):"".concat(n.server,"web/datas/").concat(h,"/content.json?pageSize=9999999¤tPage=1"),y=n.getRequestUrl(y),an.get(y,null,{withCredentials:u.withCredentials}).then(function(e){return e.json()}).then(function(){var e=vJ(dJ().mark(function e(t){var r,s,u,c,f;return dJ().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(!1!==t.succeed){e.next=5;break}return n.layerAdded++,n.sendMapToUser(i),n.errorCallback&&n.errorCallback(t.error,"getLayerFaild",n.map),e.abrupt("return");case 5:if(!t||!t.type){e.next=29;break}if("JSON"!==t.type&&"GEOJSON"!==t.type){e.next=11;break}t.content=t.content.type?t.content:JSON.parse(t.content),o=n.geojsonToFeature(t.content,a),e.next=25;break;case 11:if("EXCEL"!==t.type&&"CSV"!==t.type){e.next=24;break}if(!a.dataSource||!a.dataSource.administrativeInfo){e.next=19;break}t.content.rows.unshift(t.content.colTitles),r=a.dataSource.administrativeInfo,s=r.divisionType,u=r.divisionField,c=n.excelData2FeatureByDivision(t.content,s,u),o=n._parseGeoJsonData2Feature({allDatas:{features:c.features},fileCode:a.projection}),e.next=22;break;case 19:return e.next=21,n.excelData2Feature(t.content,a);case 21:o=e.sent;case 22:e.next=25;break;case 24:"SHP"===t.type&&(f=JSON.parse(t.content),t.content=f.layers[0],o=n.geojsonToFeature(t.content,a));case 25:return e.next=27,n.addLayer(a,o,l);case 27:n.layerAdded++,n.sendMapToUser(i);case 29:case"end":return e.stop()}},e)}));return function(t){return e.apply(this,arguments)}}()).catch(function(e){n.layerAdded++,n.sendMapToUser(i),n.errorCallback&&n.errorCallback(e,"getLayerFaild",n.map)})):(d="HOSTED_TILE"===a.layerType,b=p?p.serverId:a.serverId,n.checkUploadToRelationship(b).then(function(e){if(e&&e.length>0){var t=e[0].name,r=e[0].type.toUpperCase();n.getDataService(b,t).then(function(){var e=vJ(dJ().mark(function e(o){var s,u;return dJ().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(0!==(s=o.dataItemServices).length){e.next=6;break}return n.layerAdded++,n.sendMapToUser(i),n.errorCallback&&n.errorCallback(null,"getLayerFaild",n.map),e.abrupt("return");case 6:if(!d){e.next=11;break}u=n.getService(s,"RESTDATA"),n.isMvt(u.address,t).then(function(){var e=vJ(dJ().mark(function e(o){return dJ().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,n.getServiceInfoFromLayer(l,i,a,s,t,r,o);case 2:case"end":return e.stop()}},e)}));return function(t){return e.apply(this,arguments)}}()).catch(vJ(dJ().mark(function e(){return dJ().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,n.getServiceInfoFromLayer(l,i,a,s,t,r);case 2:case"end":return e.stop()}},e)}))),e.next=13;break;case 11:return e.next=13,n.getServiceInfoFromLayer(l,i,a,s,t,r);case 13:case"end":return e.stop()}},e)}));return function(t){return e.apply(this,arguments)}}())}else n.layerAdded++,n.sendMapToUser(i),n.errorCallback&&n.errorCallback(null,"getLayerFaild",n.map)}).catch(function(e){n.layerAdded++,n.sendMapToUser(i),n.errorCallback&&n.errorCallback(e,"getLayerFaild",n.map)})),e.next=18;break;case 17:c&&"USER_DATA"===c.type?n.addGeojsonFromUrl(a,i,l,!1):"TILE"===a.layerType?n.getTileLayerExtent(a,function(e){n.map.addLayer(n.createBaseLayer(e,l)),n.layerAdded++,n.sendMapToUser(i)},function(e){n.layerAdded++,n.sendMapToUser(i),n.errorCallback&&n.errorCallback(e,"getLayerFaild",n.map)}):"SUPERMAP_REST"===a.layerType||"WMS"===a.layerType||"WMTS"===a.layerType?"WMTS"===a.layerType?n.getWmtsInfo(a,function(e){n.map.addLayer(n.createBaseLayer(e,l)),n.layerAdded++,n.sendMapToUser(i)}):"WMS"===a.layerType?n.getWmsInfo(a).then(function(){n.map.addLayer(n.createBaseLayer(a,l)),n.layerAdded++,n.sendMapToUser(i)}):(a.projection=n.baseProjection,n.map.addLayer(n.createBaseLayer(a,l)),n.layerAdded++,n.sendMapToUser(i)):c&&"REST_DATA"===c.type?n.getFeaturesFromRestData(a,l,i):c&&"REST_MAP"===c.type&&c.url?FN(c.url,c.layerName,"smid=1",null,null,function(e){var t=e&&e.result.recordsets,r=t&&t[0],o=r.fields;if(r&&o){var s=[];for(var u in o){var c=o[u];0===c.indexOf("Sm")&&"SmID"!==c||s.push(c)}n.getFeatures(s,a,function(){var e=vJ(dJ().mark(function e(t){return dJ().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,n.addLayer(a,t,l);case 2:n.layerAdded++,n.sendMapToUser(i);case 4:case"end":return e.stop()}},e)}));return function(t){return e.apply(this,arguments)}}(),function(e){n.layerAdded++,n.errorCallback&&n.errorCallback(e,"getFeatureFaild",n.map)})}},function(e){n.errorCallback&&n.errorCallback(e,"getFeatureFaild",n.map)}):"DATAFLOW_POINT_TRACK"!==a.layerType&&"DATAFLOW_HEAT"!==a.layerType||n.getDataflowInfo(a,vJ(dJ().mark(function e(){return dJ().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,n.addLayer(a,o,l);case 2:n.layerAdded++,n.sendMapToUser(i);case 4:case"end":return e.stop()}},e)})),function(e){n.layerAdded++,n.errorCallback&&n.errorCallback(e,"getFeatureFaild",n.map)});case 18:case"end":return e.stop()}},e)}),s=0;case 6:if(!(s3&&void 0!==arguments[3]?arguments[3]:this.withCredentials,o=e.dataSource.url,i=this;an.get(o,null,{withCredentials:n,withoutFormatSuffix:!0}).then(function(e){return e.json()}).then(function(){var n=vJ(dJ().mark(function n(o){var a,s,l,u,c,f;return dJ().wrap(function(n){for(;;)switch(n.prev=n.next){case 0:if(o&&!1!==o.succeed){n.next=3;break}return t?i.errorCallback&&i.errorCallback(o.error,"autoUpdateFaild",i.map):(i.layerAdded++,i.sendMapToUser(t),i.errorCallback&&i.errorCallback(o.error,"getLayerFaild",i.map)),n.abrupt("return");case 3:if("CSV"!==o.type&&"EXCEL"!==o.type){n.next=16;break}if(!e.dataSource||!e.dataSource.administrativeInfo){n.next=11;break}o.content.rows.unshift(o.content.colTitles),s=e.dataSource.administrativeInfo,l=s.divisionType,u=s.divisionField,c=i.excelData2FeatureByDivision(o.content,l,u),a=i._parseGeoJsonData2Feature({allDatas:{features:c.features},fileCode:e.projection}),n.next=14;break;case 11:return n.next=13,i.excelData2Feature(o.content,e);case 13:a=n.sent;case 14:n.next=18;break;case 16:f=o.content?JSON.parse(o.content):o,a=i.geojsonToFeature(f,e);case 18:if(!t){n.next=25;break}return n.next=21,i.addLayer(e,a,r);case 21:i.layerAdded++,i.sendMapToUser(t),n.next=29;break;case 25:return i.map.removeLayer(e.layer),e.labelLayer&&i.map.removeLayer(e.labelLayer),n.next=29,i.addLayer(e,a,r);case 29:case"end":return n.stop()}},n)}));return function(e){return n.apply(this,arguments)}}()).catch(function(e){i.layerAdded++,i.sendMapToUser(t),i.errorCallback&&i.errorCallback(e,"getLayerFaild",i.map)})}},{key:"getServiceInfoFromLayer",value:function(){var e=vJ(dJ().mark(function e(t,r,n,o,i,a,s){var l,u,c,f,p,h;return dJ().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:l=this,u=s?!s.isMvt:"HOSTED_TILE"===n.layerType,c=!1,f=dJ().mark(function e(){var f,h;return dJ().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(f=o[p],!c){e.next=3;break}return e.abrupt("return",{v:void 0});case 3:if(!f||!u||"RESTMAP"!==f.serviceType){e.next=8;break}c=!0,l.getTileLayerInfo(f.address).then(function(e){e.forEach(function(e){var o=e.bounds;n.layerType="TILE",n.orginEpsgCode=l.baseProjection,n.units=e.coordUnit&&e.coordUnit.toLowerCase(),n.extent=[o.left,o.bottom,o.right,o.top],n.visibleScales=e.visibleScales,n.url=e.url,n.sourceType="TILE",l.map.addLayer(l.createBaseLayer(n,t)),l.layerAdded++,l.sendMapToUser(r)})}),e.next=24;break;case 8:if(!f||u||"RESTDATA"!==f.serviceType){e.next=24;break}if(c=!0,!s||!s.isMvt){e.next=22;break}return h=s.bounds,n=Object.assign(n,{layerType:"VECTOR_TILE",epsgCode:s.epsgCode,projection:"EPSG:".concat(s.epsgCode),bounds:h,extent:[h.left,h.bottom,h.right,h.top],name:n.name,url:s.url,visible:n.visible,featureType:a,serverId:n.serverId.toString()}),e.t0=l.map,e.next=16,l.addVectorTileLayer(n,t,"RESTDATA");case 16:e.t1=e.sent,e.t0.addLayer.call(e.t0,e.t1),l.layerAdded++,l.sendMapToUser(r),e.next=24;break;case 22:c=!0,l.getDatasources(f.address).then(function(e){n.dataSource.dataSourceName=e+":"+i,n.dataSource.url="".concat(f.address,"/data"),l.getFeaturesFromRestData(n,t,r)});case 24:case"end":return e.stop()}},e)}),p=0;case 4:if(!(p-1?w[k+"_1"]=g[P]:w[k]=g[P];case 33:P++,e.next=27;break;case 36:j=new(NL())({geometry:_,attributes:w}),u.push(j);case 38:v++,e.next=21;break;case 41:return e.abrupt("return",Promise.resolve(u));case 42:case"end":return e.stop()}},e,this,[[4,17]])}));return function(t,r){return e.apply(this,arguments)}}()},{key:"excelData2FeatureByDivision",value:function(e,t,r){var n;if("Province"===t?n=window.ProvinceData:"City"===t?n=window.MunicipalData:"GB-T_2260"===t&&(n=window.AdministrativeArea),n)return this.changeExcel2Geojson(n.features,e.rows,t,r)}},{key:"_parseGeoJsonData2Feature",value:function(e){for(var t=e.allDatas.features,r=[],n=0,o=t.length;n-1||y._smiportal_imgLinkUrl.indexOf("https://")>-1?d=y._smiportal_imgLinkUrl:void 0!==y._smiportal_imgLinkUrl&&null!==y._smiportal_imgLinkUrl&&""!==y._smiportal_imgLinkUrl&&(d="".concat(BL.getIPortalUrl(),"resources/markerIcon/").concat(y._smiportal_imgLinkUrl)),c={dataViz_description:y._smiportal_description,dataViz_imgUrl:d,dataViz_title:y._smiportal_title,dataViz_url:y._smiportal_otherLinkUrl},h.anchor=[.5,1],h.src=h.externalGraphic,f=h,p=Object.assign({},{attributes:c},{useStyle:f}),delete y._smiportal_description,delete y._smiportal_imgLinkUrl,delete y._smiportal_title,delete y._smiportal_otherLinkUrl}else p={attributes:a};s.setProperties(p),n.push(s)}return n}},{key:"parseGeoJsonData2Feature",value:function(e){for(var t=e.allDatas.features,r=[],n=0,o=t.length;n-1?(t.strokeColor="#4CC8A3",t.strokeWidth=2):["REGION","POLYGON","MULTIPOLYGON"].indexOf(e)>-1&&(t.fillColor="#826DBA"),t}},{key:"getFiterFeatures",value:function(e,t){for(var r=this.parseFilterCondition(e),n=[],o=0;o0&&n.push(i)}return n}},{key:"parseFilterCondition",value:function(e){return e.replace(/=/g,"==").replace(/AND|and/g,"&&").replace(/or|OR/g,"||").replace(/<==/g,"<=").replace(/>==/g,">=").replace(/\(?[^\(]+?\s*in\s*\([^\)]+?\)\)?/gi,function(e){var t=e.match(/([^(]+?)\s*in\s*\(([^)]+?)\)/i);return 3===t.length?"(".concat(t[2].split(",").map(function(e){return"".concat(t[1]," == ").concat(e.trim())}).join(" || "),")"):e})}},{key:"createGraphicLayer",value:function(){var e=vJ(dJ().mark(function e(t,r){var n,o;return dJ().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.filterCondition?this.getFiterFeatures(t.filterCondition,r):r,e.next=3,this.getGraphicsFromFeatures(r,t.style,t.featureType);case 3:return n=e.sent,o=new pD({graphics:n,render:"canvas",map:this.map,isHighLight:!1}),e.abrupt("return",new Qz.Image({source:o}));case 6:case"end":return e.stop()}},e,this)}));return function(t,r){return e.apply(this,arguments)}}()},{key:"getGraphicsFromFeatures",value:function(){var e=vJ(dJ().mark(function e(t,r,n){var o,i,a,s,l;return dJ().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,uI.getOpenlayersStyle(r,n);case 2:for(s in o=e.sent,i=o.getImage(),a=[],t)(l=new $F(t[s].getGeometry())).setStyle(i),l.setProperties({attributes:t[s].get("attributes")}),a.push(l);return e.abrupt("return",a);case 7:case"end":return e.stop()}},e)}));return function(t,r,n){return e.apply(this,arguments)}}()},{key:"createSymbolLayer",value:function(e,t){var r=uI.getSymbolStyle(e.style);return new Qz.Vector({style:r,source:new(RL())({features:e.filterCondition?this.getFiterFeatures(e.filterCondition,t):t,wrapX:!1}),renderMode:"image"})}},{key:"addLabelLayer",value:function(e,t){var r=e.labelStyle,n=this.getLabelStyle(r,e),o=e.labelLayer=new Qz.Vector({declutter:!0,styleOL:n,labelField:r.labelField,source:new(RL())({features:t,wrapX:!1})});o.setStyle(function(e){var t=r.labelField,n=e.get("attributes")[t.trim()]+"";if("undefined"===n)return null;var i=o.get("styleOL"),a=i.getText();return a&&a.setText&&a.setText(n),i}),this.map.addLayer(o),o.setVisible(e.visible),o.setZIndex(1e3);var i=e.visibleScale;return i&&this.setVisibleScales(o,i),o}},{key:"setVisibleScales",value:function(e,t){var r=this.resolutions[t.minScale],n=this.resolutions[t.maxScale];r>1?e.setMaxResolution(Math.ceil(r)):e.setMaxResolution(1.1*r),e.setMinResolution(n)}},{key:"getLabelStyle",value:function(e,t){var r=t.style||t.pointStyle,n=r.radius,o=void 0===n?0:n,i=r.strokeWidth,a=-(o+(void 0===i?0:i)),s=e.fontSize,l=void 0===s?"14px":s,u=e.fontFamily,c=e.fill,f=e.backgroundFill,p=e.offsetX,h=void 0===p?0:p,y=e.offsetY,d=void 0===y?a:y,b=e.placement,v=void 0===b?"point":b,m=e.textBaseline,g=void 0===m?"bottom":m,w=e.textAlign,O=void 0===w?"center":w,S=e.outlineColor,_=void 0===S?"#000000":S,P=e.outlineWidth,x=void 0===P?0:P,k={font:"".concat(l," ").concat(u),placement:v,textBaseline:g,fill:new(KL())({color:c}),backgroundFill:new(KL())({color:f}),padding:[3,3,3,3],offsetX:"POINT"===t.featureType?h:0,offsetY:"POINT"===t.featureType?d:0,overflow:!0,maxAngle:0};return"POINT"===t.featureType&&(k.textAlign=O),x>0&&(k.stroke=new(eI())({color:_,width:x})),new(HL())({text:new(rI())(k)})}},{key:"createVectorLayer",value:function(){var e=vJ(dJ().mark(function e(t,r){var n,o,i,a,s,l;return dJ().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(n=t.featureType,o=t.style,"LINE"!==n||!BL.isArray(o)){e.next=6;break}a=cJ(o,2),s=a[0],l=a[1],i="solid"===l.lineDash?uI.getRoadPath(l,s):uI.getPathway(l,s),e.next=9;break;case 6:return e.next=8,uI.toOpenLayersStyle(t.style,t.featureType);case 8:i=e.sent;case 9:return e.abrupt("return",new Qz.Vector({style:i,source:new(RL())({features:t.filterCondition?this.getFiterFeatures(t.filterCondition,r):r,wrapX:!1})}));case 10:case"end":return e.stop()}},e,this)}));return function(t,r){return e.apply(this,arguments)}}()},{key:"createHeatLayer",value:function(e,t){t=e.filterCondition?this.getFiterFeatures(e.filterCondition,t):t;var r={source:new(RL())({features:t,wrapX:!1})},n=e.themeSetting;r.gradient=n.colors.slice(),r.radius=parseInt(n.radius);var o=n.customSettings;for(var i in o)r.gradient[i]=o[i];return n.weight&&this.changeWeight(t,n.weight),new Qz.Heatmap(r)}},{key:"changeWeight",value:function(e,t){var r=this;this.fieldMaxValue={},this.getMaxValue(e,t);var n=this.fieldMaxValue[t];e.forEach(function(e){var o=e.get("attributes");try{var i=o[t];e.set("weight",i/n)}catch(e){r.errorCallback&&r.errorCallback(e)}})}},{key:"getMaxValue",value:function(e,t){var r,n=[],o=this,i=t;this.fieldMaxValue[i]||(e.forEach(function(e){r=e.get("attributes");try{n.push(parseFloat(r[i]))}catch(e){o.errorCallback&&o.errorCallback(e)}}),this.fieldMaxValue[i]=qk.getArrayStatistic(n,"Maximum"))}},{key:"createUniqueLayer",value:function(){var e=vJ(dJ().mark(function e(t,r){var n,o;return dJ().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.createUniqueSource(t,r);case 2:return n=e.sent,(o=new Qz.Vector({styleSource:n,source:new(RL())({features:t.filterCondition?this.getFiterFeatures(t.filterCondition,r):r,wrapX:!1})})).setStyle(function(e){var t=o.get("styleSource"),r=t.themeField,n=e.get("attributes")[r];return t.styleGroups.find(function(e){return e.value===n}).olStyle}),e.abrupt("return",o);case 6:case"end":return e.stop()}},e,this)}));return function(t,r){return e.apply(this,arguments)}}()},{key:"createUniqueSource",value:function(){var e=vJ(dJ().mark(function e(t,r){var n;return dJ().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.getUniqueStyleGroup(t,r);case 2:return n=e.sent,e.abrupt("return",{map:this.map,style:t.style,isHoverAble:t.isHoverAble,highlightStyle:t.highlightStyle,themeField:t.themeSetting.themeField,styleGroups:n});case 4:case"end":return e.stop()}},e,this)}));return function(t,r){return e.apply(this,arguments)}}()},{key:"getUniqueStyleGroup",value:function(){var e=vJ(dJ().mark(function e(t,r){var n,o,i,a,s,l,u,c,f,p,h,y,d,b,v,m,g,w,O,S,_;return dJ().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:n=t.featureType,o=t.style,i=t.themeSetting,a=i.themeField,s=[],l=i.customSettings,e.t0=dJ().keys(r);case 4:if((e.t1=e.t0()).done){e.next=20;break}u=e.t1.value,c=r[u].get("attributes"),f=c[a],p=!1,e.t2=dJ().keys(s);case 10:if((e.t3=e.t2()).done){e.next=17;break}if(h=e.t3.value,s[h]!==f){e.next=15;break}return p=!0,e.abrupt("break",17);case 15:e.next=10;break;case 17:p||s.push(f),e.next=4;break;case 20:y=[],d=this.getCustomSettingColors(l,n).map(function(e){return e.toLowerCase()}),b=this.getUniqueColors(i.colors||this.defaultParameters.themeSetting.colors,s.length+Object.keys(l).length).map(function(e){return e.toLowerCase()}),v=uJ()(b,d),m=0;case 25:if(!(m=i[a].start&&n<=i[a].end)return i[a].olStyle}else if(n>i[a].start&&n<=i[a].end)return i[a].olStyle}),e.abrupt("return",o);case 6:case"end":return e.stop()}},e,this)}));return function(t,r){return e.apply(this,arguments)}}()},{key:"createRangeSource",value:function(){var e=vJ(dJ().mark(function e(t,r){var n;return dJ().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.getRangeStyleGroup(t,r);case 2:if(!(n=e.sent)){e.next=7;break}return e.abrupt("return",{style:t.style,themeField:t.themeSetting.themeField,styleGroups:n});case 7:return e.abrupt("return",!1);case 8:case"end":return e.stop()}},e,this)}));return function(t,r){return e.apply(this,arguments)}}()},{key:"getRangeStyleGroup",value:function(){var e=vJ(dJ().mark(function e(t,r){var n,o,i,a,s,l,u,c,f,p,h,y,d,b,v,m,g,w,O,S,_,P,x,k,j;return dJ().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:n=t.featureType,o=t.themeSetting,i=t.style,a=o.segmentCount,s=o.segmentMethod,l=o.colors,u=o.customSettings,c=o.themeField,f=[],h=a,y=s,d=this,r.forEach(function(e){p=e.get("attributes");try{if(p){var t=p[c.trim()];void 0!==t&&null!==t&&BL.isNumber(t)&&f.push(parseFloat(t))}else e.get(c)&&BL.isNumber(e.get(c))&&e.get(c)&&f.push(parseFloat(e.get(c)))}catch(e){d.errorCallback&&d.errorCallback(e)}});try{b=qk.getArraySegments(f,y,h)}catch(e){d.errorCallback&&d.errorCallback(e)}if(!b){e.next=33;break}for(m in v=h,p&&b[0]===b[p.length-1]&&(v=1,b.length=2),b)g=b[m],g=0===Number(m)?Math.floor(100*g)/100:Math.ceil(100*g)/100+.1,b[m]=Number(g.toFixed(2));for(w=l,w=zk.getGradientColors(w,v,"RANGE"),O=0;O0&&d.addDataflowFeature(o,t.identifyField,{dataflowSource:i,featureCache:e,labelSource:s,labelFeatureCache:r,pathSource:u,pathFeatureCache:n,maxPointCount:t.maxPointCount})}else d.addDataflowFeature(o,t.identifyField,{dataflowSource:i,featureCache:e,labelSource:s,labelFeatureCache:r,pathSource:u,pathFeatureCache:n,maxPointCount:t.maxPointCount})}}(p,h,y)),this.setFeatureStyle(c,t.directionField,n.type),e.abrupt("return",c);case 21:case"end":return e.stop()}},e,this)}));return function(t,r){return e.apply(this,arguments)}}()},{key:"addDataflowFeature",value:function(e,t,r){r.dataflowSource&&this.addFeatureFromDataflowService(r.dataflowSource,e,t,r.featureCache),r.labelSource&&this.addFeatureFromDataflowService(r.labelSource,e,t,r.labelFeatureCache),r.pathSource&&this.addPathFeature(r.pathSource,e,t,r.pathFeatureCache,r.maxPointCount)}},{key:"addPathFeature",value:function(e,t,r,n,o){var i=[],a=t.get(r);n[a]?((i=n[a].getGeometry().getCoordinates()).push(t.getGeometry().getCoordinates()),o&&i.length>o&&i.splice(0,i.length-o),n[a].getGeometry().setCoordinates(i)):(i.push(t.getGeometry().getCoordinates()),n[a]=new(NL())({geometry:new tJ.LineString(i)}),e.addFeature(n[a]))}},{key:"setFeatureStyle",value:function(e,t,r){var n=e.get("styleOL");e.setStyle(function(e){var o,i;if((o=void 0!==t&&"未设置"!==t&&"None"!==t?e.get("attributes")[t]:0)>360||o<0)return null;i="SYMBOL_POINT"===r?n.getText():n.getImage();var a=Math.PI*o/180;return i&&i.setRotation(a),n})}},{key:"createDataflowHeatLayer",value:function(e){var t={source:this.createDataflowHeatSource(e)};if(t.gradient=e.themeSetting.colors.slice(),t.radius=parseInt(e.themeSetting.radius),e.themeSetting.customSettings){var r=e.themeSetting.customSettings;for(var n in r)t.gradient[n]=r[n]}return new Qz.Heatmap(t)}},{key:"createDataflowHeatSource",value:function(e){var t=this,r=new(RL())({wrapX:!1});return this.createDataflowService(e,function(n){return function(o){if(e.filterCondition){var i=t.parseFilterCondition(e.filterCondition),a=o.get("attributes"),s=mN(i,Object.keys(a)),l=gN(a),u="select * from json where ("+s+")",c=window.jsonsql.query(u,{attributes:l});c&&c.length>0&&t.addDataflowFeature(o,e.identifyField,{dataflowSource:r,featureCache:n})}else t.addDataflowFeature(o,e.identifyField,{dataflowSource:r,featureCache:n});e.themeSetting.weight&&t.changeWeight(r.getFeatures(),e.themeSetting.weight)}}({})),r}},{key:"addFeatureFromDataflowService",value:function(e,t,r,n){var o=t.get(r);void 0!==o&&n[o]?(n[o].setGeometry(t.getGeometry()),n[o].setProperties(t.getProperties()),e.changed()):(e.addFeature(t),n[o]=t)}},{key:"createDataflowService",value:function(e,t){var r=this,n=new qN(e.wsUrl).initSubscribe();n.on("messageSucceeded",function(n){var o=JSON.parse(n.value.data),i=_J.readFeature(o,{dataProjection:e.projection||"EPSG:4326",featureProjection:r.baseProjection||"EPSG:4326"});i.setProperties({attributes:o.properties}),t(i)}),e.dataflowService=n}},{key:"setEachFeatureDefaultStyle",value:function(){var e=vJ(dJ().mark(function e(t){var r,n,o,i,a,s;return dJ().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:r=this,t=BL.isArray(t)||t instanceof sJ()?t:[t],n=0;case 3:if(!(n=i[a].start&&n0&&r>0&&"EPSG:".concat(e.substring(t,r).split(",")[1].substr(1))}},{key:"createMigrationLayer",value:function(e,t){window.EChartsLayer.prototype.getContainer||(window.EChartsLayer.prototype.getContainer=function(){return this.$container}),window.EChartsLayer.prototype.setVisible||(window.EChartsLayer.prototype.setVisible=function(e){if(e){var t=this.get("options");t&&(this.setChartOptions(t),this.unset("options"))}else{var r=this.getChartOptions();this.set("options",r),this.clear(),this.setChartOptions({})}}),window.EChartsLayer.prototype.setZIndex||(window.EChartsLayer.prototype.setZIndex=function(e){var t=this.getContainer();t&&(t.style.zIndex=e)}),window.EChartsLayer.prototype.setCursor||(window.EChartsLayer.prototype.setCursor=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"default",t=this.getContainer();t&&"default"===e&&t.classList.add("cursor-default")});var r=IN(t),n=this.createLinesData(e,r),o=this.createPointsData(n,e,r),i=this.createOptions(e,n,o),a=new window.EChartsLayer(i,{hideOnMoving:!1,hideOnZooming:!1,forcedPrecomposeRerender:!0});return a.type="ECHARTS",a}},{key:"createOptions",value:function(e,t,r){var n,o=this.createLineSeries(e,t);if(r&&r.length){var i=this.createPointSeries(e,r);n=o.concat(i)}else n=o.slice();return{series:n}}},{key:"createLineSeries",value:function(e,t){var r=e.lineSetting,n=e.animationSetting,o=[{name:"line-series",type:"lines",zlevel:1,silent:!0,effect:{show:n.show,constantSpeed:n.constantSpeed,trailLength:0,symbol:n.symbol,symbolSize:n.symbolSize},lineStyle:{normal:{color:r.color,type:r.type,width:r.width,opacity:r.opacity,curveness:r.curveness}},data:t}];return t.length>1e3&&(o[0].blendMode="lighter"),o}},{key:"createPointSeries",value:function(e,t){var r=e.lineSetting,n=e.animationSetting,o=e.labelSetting,i=[{name:"point-series",coordinateSystem:"geo",zlevel:2,silent:!0,label:{normal:{show:o.show,position:"right",formatter:"{b}",color:o.color,fontFamily:o.fontFamily}},itemStyle:{normal:{color:r.color||o.color}},data:t}];return n.show?(i[0].type="effectScatter",i[0].rippleEffect={brushType:"stroke"}):i[0].type="scatter",i}},{key:"createPointsData",value:function(e,t,r){var n=[],o=t.labelSetting;if(!o.show||!e.length)return n;var i=[],a=[];return e.forEach(function(e,t){var n=e.coords,s=n[0],l=n[1],u=r[t][o.from],c=r[t][o.to];!i.find(function(e){return e.value[0]===s[0]&&e.value[1]===s[1]})&&i.push({name:u,value:s}),!a.find(function(e){return e.value[0]===l[0]&&e.value[1]===l[1]})&&a.push({name:c,value:l})}),n=i.concat(a)}},{key:"createLinesData",value:function(e,t){var r=[];if(t&&t.length){var n,o,i=e.from,a=e.to;if("XY_FIELD"===i.type&&i.xField&&i.yField&&a.xField&&a.yField)t.forEach(function(e){var t=e[i.xField],s=e[i.yField],l=e[a.xField],u=e[a.yField];t&&s&&l&&u&&(n=[e[i.xField],e[i.yField]],o=[e[a.xField],e[a.yField]],r.push({coords:[n,o]}))});else if("PLACE_FIELD"===i.type&&i.field&&a.field){var s=Gz.concat(Uz);t.forEach(function(e){var t=e[i.field],l=e[a.field];n=s.find(function(e){return BL.isMatchAdministrativeName(e.name,t)}),o=s.find(function(e){return BL.isMatchAdministrativeName(e.name,l)}),n&&o&&r.push({coords:[n.coord,o.coord]})})}}return r}},{key:"getService",value:function(e,t){return e.filter(function(e){return e&&e.serviceType===t})[0]}},{key:"isMvt",value:function(e,t){var r=this;return this.getDatasetsInfo(e,t).then(function(e){return e.epsgCode==r.baseProjection.split("EPSG:")[1]?an.get(r.getRequestUrl("".concat(e.url,"/tilefeature.mvt")),null,{withCredentials:r.withCredentials}).then(function(e){return e.json()}).then(function(t){return e.isMvt=t.error&&400===t.error.code,e}).catch(function(){return e}):e})}},{key:"getDatasetsInfo",value:function(e,t){var r=this;return r.getDatasources(e).then(function(n){var o="".concat(e,"/data/datasources/").concat(n,"/datasets/").concat(t,".json");return an.get(r.getRequestUrl(o),null,{withCredentials:r.withCredentials}).then(function(e){return e.json()}).then(function(e){return{epsgCode:e.datasetInfo.prjCoordSys.epsgCode,bounds:e.datasetInfo.bounds,url:o}})})}},{key:"isRestMapMapboxStyle",value:function(e){var t=e.dataSource,r=e.layerType;return!(!(t&&"EXTERNAL"===t.type&&t.url.indexOf("/tileFeature/vectorstyles.json?type=MapBox_GL&styleonly=true&tileURLTemplate=ZXY")>-1)||"MAPBOXSTYLE"!==r&&"VECTOR_TILE"!==r)}},{key:"getMapboxStyleLayerInfo",value:function(e,t){var r=this;return new Promise(function(n,o){return r.getMapLayerExtent(t).then(function(t){return r.getMapboxStyle(e,t).then(function(e){Object.assign(t,e),n(t)}).catch(function(e){o(e)})}).catch(function(e){o(e)})})}},{key:"getMapLayerExtent",value:function(e){var t=e.dataSource.url;this.isRestMapMapboxStyle(e)&&(t=t.replace("/tileFeature/vectorstyles.json?type=MapBox_GL&styleonly=true&tileURLTemplate=ZXY","")),t=this.getRequestUrl(t+".json");var r,n,o=e.credential;return o&&(r=o[n=Object.keys(o)[0]],t="".concat(t,"?").concat(n,"=").concat(r)),an.get(t,null,{withCredentials:this.withCredentials,withoutFormatSuffix:!0,headers:{"Content-Type":"application/json;chartset=uft-8"}}).then(function(e){return e.json()}).then(function(t){return e.visibleScales=t.visibleScales,e.coordUnit=t.coordUnit,e.scale=t.scale,e.epsgCode=t.prjCoordSys.epsgCode,e.bounds=t.bounds,e}).catch(function(e){throw e})}},{key:"getMapboxStyle",value:function(e,t){var r=this,n=t.url||t.dataSource.url,o=n;o.indexOf("/restjsr/")>-1&&(o="".concat(o,"/style.json")),o=this.getRequestUrl(o);var i,a,s=t.credential;return s&&(a=Object.keys(s)[0],i=s[a],o="".concat(o,"?").concat(a,"=").concat(i)),an.get(o,null,{withCredentials:this.withCredentials,withoutFormatSuffix:!0,headers:{"Content-Type":"application/json;chartset=uft-8"}}).then(function(e){return e.json()}).then(function(o){r._matchStyleObject(o);var s=t.bounds;if(i){o.sprite="".concat(o.sprite,"?").concat(a,"=").concat(i);var l=o.sources;Object.keys(l).forEach(function(e){o.sources[e].tiles.forEach(function(t,r){o.sources[e].tiles[r]="".concat(t,"?").concat(a,"=").concat(i)})})}var u={url:n,sourceType:"VECTOR_TILE",layerType:"VECTOR_TILE",styles:o,extent:s&&[s.left,s.bottom,s.right,s.top],bounds:t.bounds,projection:"EPSG:"+t.epsgCode,epsgCode:t.epsgCode,name:t.name};return Object.assign(t,u),t.zIndex>0&&r.modifyMapboxstyleLayer(e,t),t}).catch(function(e){return e})}},{key:"modifyMapboxstyleLayer",value:function(e,t){var r=this;if(!e.layers||0!==e.layers.length){var n=t.styles.layers;if(n){n=n.filter(function(e){return"background"!==e.type}),t.styles.layers=n;var o=e.layers.filter(function(e){return"VECTOR_TILE"===e.layerType&&e.zIndex!==t.zIndex}).map(function(e){return e.styles&&e.styles.layers});!o||o&&0===o.length||o.forEach(function(e){n.forEach(function(t){r.renameLayerId(e,t)})})}}}},{key:"renameLayerId",value:function(e,t){if(e.find(function(e){return e.id===t.id})){var r=t.id.match(/(.+)\((\w)\)$/);r?t.id="".concat(r[1],"(").concat(+r[2]+1,")"):t.id+="(1)",e.find(function(e){return e.id===t.id})&&this.renameLayerId(e,t)}}},{key:"_matchStyleObject",value:function(e){var t=e.sprite,r=e.glyphs;t&&"object"===fJ(t)&&(e.sprite=Object.values(t)[0]),r&&"object"===fJ(r)&&(e.glyphs=Object.values(r)[0])}},{key:"isIportalProxyServiceUrl",value:function(e){if(this.serviceProxy&&this.serviceProxy.enable&&e){var t="";return this.serviceProxy.proxyServerRootUrl?t="".concat(this.serviceProxy.proxyServerRootUrl,"/"):this.serviceProxy.rootUrlPostfix?t="".concat(this.serviceProxy.port,"/").concat(this.serviceProxy.rootUrlPostfix,"/"):this.serviceProxy.rootUrlPostfix||(t="".concat(this.serviceProxy.port,"/")),80!==this.serviceProxy.port?e.indexOf(t)>=0:e.indexOf(t)>=0||e.indexOf(t.replace(":80",""))>=0}return!1}},{key:"getStyleResolutions",value:function(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:22,n=[],o=Math.abs(e.left-e.right)/512,i=t;i<=r;i++)0!==i?(o/=2,n[i]=o):n[i]=o;return n}},{key:"createVisibleResolution",value:function(e,t,r,n){var o=this,i=[];if(e&&e.length>0)i=e.map(function(e){var t=1/e;return o.getResFromScale(t,n)});else{var a=this.getEnvelope(t,r);i=this.getStyleResolutions(a)}return i}},{key:"getEnvelope",value:function(e,t){var r={};return e&&4===e.length?(r.left=e[0],r.bottom=e[1],r.right=e[2],r.top=e[3]):r=t,r}},{key:"createMVTLayer",value:function(e){var t=e.styles,r=t&&t.metadata&&t.metadata.indexbounds,n=this.createVisibleResolution(e.visibleScales,r,e.bounds,e.coordUnit),o=this.getEnvelope(r,e.bounds),i=this.getStyleResolutions(o),a=this.isIportalProxyServiceUrl(t.sprite),s=new BU({style:t,source:t.name,resolutions:i,map:this.map,withCredentials:a});return new Promise(function(r){s.on("styleloaded",function(){var o=n[n.length-1],i=n[0],l=new Qz.VectorTile({declutter:!0,source:new LB({style:t,withCredentials:a,projection:e.projection,format:new(jB())({featureClass:iJ()}),wrapX:!1}),style:s.featureStyleFuntion,visible:e.visible,zIndex:e.zIndex,opacity:e.opacity,minResolution:o,maxResolution:i>1?Math.ceil(i):1.1*i});r(l)})})}},{key:"isSameDomain",value:function(e){var t=e.split("://")[1],r=t.indexOf("/"),n=t.substring(0,r),o=document.location.toString().split("://")[1],i=o.indexOf("/"),a=o.substring(0,i);if(n.indexOf(":")>-1||""!==window.location.port)return n===a;var s=n.split("."),l=a.split(".");return s[1]===l[1]&&s[2]===l[2]}},{key:"isSupportWebp",value:function(e,t){var r;return!(this.isIE()||this.isFirefox()&&this.getFirefoxVersion()<65||this.isChrome()&&this.getChromeVersion()<32)&&(e=t?"".concat(e,"/tileImage.webp?token=").concat(t):"".concat(e,"/tileImage.webp"),r=!(ce.isInTheSameDomain(e)&&!t),e=this.getRequestUrl(e,r),an.get(e,null,{withCredentials:this.withCredentials,withoutFormatSuffix:!0}).then(function(e){if(200!==e.status)throw e.status;return e}).then(function(){return!0}).catch(function(){return!1}))}},{key:"isIE",value:function(){return!!(window.ActiveXObject||"ActiveXObject"in window)}},{key:"isFirefox",value:function(){return navigator.userAgent.indexOf("Firefox")>-1}},{key:"isChrome",value:function(){return navigator.userAgent.indexOf("Chrome")>-1}},{key:"getFirefoxVersion",value:function(){return+navigator.userAgent.toLowerCase().match(/firefox\/([\d.]+)/)[1]}},{key:"getChromeVersion",value:function(){return+navigator.userAgent.toLowerCase().match(/chrome\/([\d.]+)/)[1]}},{key:"addGraticule",value:function(e){if(this.isHaveGraticule){this.createGraticuleLayer(e.grid.graticule),this.layerAdded++;var t=e.layers?e.layers.length:0;this.sendMapToUser(t)}}},{key:"createGraticuleLayer",value:function(e){var t=e.strokeColor,r=e.strokeWidth,n=e.lineDash,o=e.extent,i=e.visible,a=e.interval,s=e.lonLabelStyle,l=e.latLabelStyle,u=this.baseProjection,c=new tL.get(u);c.setExtent(o),c.setWorldExtent(tL.transformExtent(o,u,"EPSG:4326"));var f={layerID:"graticule_layer",strokeStyle:new(eI())({color:t,width:r,lineDash:n}),extent:o,visible:i,intervals:a,showLabels:!0,zIndex:9999,wrapX:!1,targetSize:0};s&&(f.lonLabelStyle=new(rI())({font:"".concat(s.fontSize," ").concat(s.fontFamily),textBaseline:s.textBaseline,fill:new(KL())({color:s.fill}),stroke:new(eI())({color:s.outlineColor,width:s.outlineWidth})})),l&&(f.latLabelStyle=new(rI())({font:"".concat(l.fontSize," ").concat(l.fontFamily),textBaseline:l.textBaseline,fill:new(KL())({color:l.fill}),stroke:new(eI())({color:l.outlineColor,width:l.outlineWidth})}));var p=new Qz.Graticule(f);this.map.addLayer(p)}},{key:"getLang",value:function(){if(this.getCookie("language")){var e=this.getCookie("language");return this.formatCookieLang(e)}return navigator.language||navigator.browserLanguage}},{key:"getCookie",value:function(e){e=e.toLowerCase();var t=null;return document.cookie.split(";").forEach(function(r){var n=r.split("=");n[0].toLowerCase().trim()!==e||(t=n[1].trim())}),t}},{key:"formatCookieLang",value:function(e){var t;switch(e){case"zh":t="zh-CN";break;case"ar":t="ar-EG";break;case"bg":t="bg-BG";break;case"ca":t="ca-ES";break;case"cs":t="cs-CZ";break;case"da":t="da-DK";break;case"de":t="de-DE";break;case"el":t="el-GR";break;case"es":t="es-ES";break;case"et":t="et-EE";break;case"fa":t="fa-IR";break;case"fl":t="fi-FI";break;case"fr":t="fr-FR";break;case"he":t="he-IL";break;case"hu":t="hu-HU";break;case"id":t="id-ID";break;case"is":t="is-IS";break;case"it":t="it-IT";break;case"ja":t="ja-JP";break;case"ko":t="ko-KR";break;case"ku":t="ku-IQ";break;case"mn":t="mn-MN";break;case"nb":t="nb-NO";break;case"ne":t="ne-NP";break;case"nl":t="nl-NL";break;case"pl":t="pl-PL";break;case"pt":t="pt-PT";break;case"ru":t="ru-RU";break;case"sk":t="sk-SK";break;case"sl":t="sl-SI";break;case"sr":t="sr-RS";break;case"sv":t="sv-SE";break;case"th":t="th-TH";break;case"tr":t="tr-TR";break;case"uk":t="uk-UA";break;case"vi":t="vi-VN";break;default:t="en-US"}return t}},{key:"isCustomProjection",value:function(e){return BL.isNumber(e)?[-1e3,-1].includes(+e):["EPSG:-1000","EPSG:-1"].includes(e)}}])&&mJ(t.prototype,r),n&&mJ(t,n),Object.defineProperty(t,"prototype",{writable:!1}),i}();function EJ(e){"@babel/helpers - typeof";return(EJ="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function TJ(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function CJ(e){for(var t=1;t© SuperMap iServer",n=function(e,t){var r=ce.urlPathAppend(e,"/collections/".concat(t.collectionId,"/tile.").concat(t.format,"?x={x}&y={y}&z={z}")),n=function(e){var t={};t.transparent=e.transparent,t.cacheEnabled=!(!1===e.cacheEnabled),e.sqlFilter&&(t.sqlFilter=e.sqlFilter);e.renderingRule&&(t.renderingRule=JSON.stringify(e.renderingRule));e.ids&&(t.ids=e.ids.join(","));e.names&&(t.names=e.names.join(","));return t}(t);r=ce.urlAppend(r,function(e){var t=[];for(var r in e)t.push(encodeURIComponent(r)+"="+encodeURIComponent(e[r]));return t.join("&")}(n)),r=ln.appendCredential(r),t.cacheEnabled||(r+="&_t="+(new Date).getTime());return r}(e.url,e),a=CJ(CJ({},e),{},{attributions:r,url:n});!e.tileLoadFunction&&e.tileProxy&&(a.tileLoadFunction=function(e,t){e.getImage().src=s.tileProxy+encodeURIComponent(t)});var s=IJ(t=o.call(this,a));return t.options=e,e.tileProxy&&(t.tileProxy=e.tileProxy),t}return t=i,r&&MJ(t.prototype,r),n&&MJ(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}(),DJ=ol.layer.Tile,BJ=r.n(DJ);function GJ(e){"@babel/helpers - typeof";return(GJ="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function UJ(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function VJ(e){for(var t=1;t=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var s=r.call(i,"catchLoc"),l=r.call(i,"finallyLoc");if(s&&l){if(this.prev=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),S(r),c}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;S(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:P(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),c}},e}function qJ(e,t,r,n,o,i,a){try{var s=e[i](a),l=s.value}catch(e){return void r(e)}s.done?t(l):Promise.resolve(l).then(n,o)}function HJ(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:22,r=e.bounds,n=e.dpi,o=e.center,i=e.visibleScales,a=e.scale,s=e.coordUnit,l=e.prjCoordSys,u=o.x&&o.y?[o.x,o.y]:[(r.left+r.right)/2,(r.bottom+r.top)/2],c=[r.left,r.bottom,r.right,r.top],f=BL.getProjection(l,c),p=BL.scalesToResolutions(i,r,n,s,t);return{center:u,projection:f,zoom:BL.getZoomByResolution(BL.scaleToResolution(a,n,s),p),resolutions:p}}function WJ(e,t,r){var n=HJ(e);return new(fI())(VJ({target:"map",view:new(Jz())(VJ(VJ({},n),r))},t))}function YJ(e,t,r){var n=[r.left,r.bottom,r.right,r.top],o="EPSG:".concat(e);(!(0,tL.get)(o)&&bN().defs(o,t),Wz&&Wz.register)&&(Wz.register(bN()),(0,tL.get)(o).setExtent(n))}function XJ(e,t,r,n){var o=yN.optionsFromMapJSON(e,t,!0);o=VJ(VJ({},o),r);var i=new yN(o);return{layer:new(BJ())(VJ({source:i},n)),source:i}}function QJ(e){return new Promise(function(t){new zA(e).getWkt(function(e){var r=e.result.data;t(r)})})}function ZJ(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function KJ(e){for(var t=1;t1&&void 0!==arguments[1]?arguments[1]:{},r=t.mapOptions,n=t.viewOptions,o=t.layerOptions,i=t.sourceOptions;return new Promise(function(t,a){var s,l;new zA(e).getMapInfo((s=JJ().mark(function s(l){var u,c,f,p,h,y,d,b;return JJ().wrap(function(s){for(;;)switch(s.prev=s.next){case 0:if(l&&l.result||a("service is not work!"),u=l.result,c=u.prjCoordSys,f=u.bounds,(0,tL.get)("EPSG:".concat(c.epsgCode))||"PCS_NON_EARTH"===c.type){s.next=7;break}return s.next=5,QJ(e);case 5:p=s.sent,YJ(c.epsgCode,p,f);case 7:h=WJ(l.result,r,n),y=XJ(e,l.result,i,o),d=y.layer,b=y.source,h.addLayer(d),t({map:h,source:b,layer:d});case 11:case"end":return s.stop()}},s)}),l=function(){var e=this,t=arguments;return new Promise(function(r,n){var o=s.apply(e,t);function i(e){qJ(o,r,n,i,a,"next",e)}function a(e){qJ(o,r,n,i,a,"throw",e)}i(void 0)})},function(e){return l.apply(this,arguments)}))})},eq.supermap.viewOptionsFromMapJSON=HJ,eq.supermap.CommonUtil=ce}}(),function(){"use strict"}()}();