/*! * * iclient-leaflet.(https://iclient.supermap.io) * Copyright© 2000 - 2022 SuperMap Software Co.Ltd * license: Apache-2.0 * version: v11.0.1 * */!function(){var e={525:function(e){"use strict";function t(e,t){this.x=e,this.y=t}e.exports=t,t.prototype={clone:function(){return new t(this.x,this.y)},add:function(e){return this.clone()._add(e)},sub:function(e){return this.clone()._sub(e)},multByPoint:function(e){return this.clone()._multByPoint(e)},divByPoint:function(e){return this.clone()._divByPoint(e)},mult:function(e){return this.clone()._mult(e)},div:function(e){return this.clone()._div(e)},rotate:function(e){return this.clone()._rotate(e)},rotateAround:function(e,t){return this.clone()._rotateAround(e,t)},matMult:function(e){return this.clone()._matMult(e)},unit:function(){return this.clone()._unit()},perp:function(){return this.clone()._perp()},round:function(){return this.clone()._round()},mag:function(){return Math.sqrt(this.x*this.x+this.y*this.y)},equals:function(e){return this.x===e.x&&this.y===e.y},dist:function(e){return Math.sqrt(this.distSqr(e))},distSqr:function(e){var t=e.x-this.x,r=e.y-this.y;return t*t+r*r},angle:function(){return Math.atan2(this.y,this.x)},angleTo:function(e){return Math.atan2(this.y-e.y,this.x-e.x)},angleWith:function(e){return this.angleWithSep(e.x,e.y)},angleWithSep:function(e,t){return Math.atan2(this.x*t-this.y*e,this.x*e+this.y*t)},_matMult:function(e){var t=e[0]*this.x+e[1]*this.y,r=e[2]*this.x+e[3]*this.y;return this.x=t,this.y=r,this},_add:function(e){return this.x+=e.x,this.y+=e.y,this},_sub:function(e){return this.x-=e.x,this.y-=e.y,this},_mult:function(e){return this.x*=e,this.y*=e,this},_div:function(e){return this.x/=e,this.y/=e,this},_multByPoint:function(e){return this.x*=e.x,this.y*=e.y,this},_divByPoint:function(e){return this.x/=e.x,this.y/=e.y,this},_unit:function(){return this._div(this.mag()),this},_perp:function(){var e=this.y;return this.y=this.x,this.x=-e,this},_rotate:function(e){var t=Math.cos(e),r=Math.sin(e),n=t*this.x-r*this.y,o=r*this.x+t*this.y;return this.x=n,this.y=o,this},_rotateAround:function(e,t){var r=Math.cos(e),n=Math.sin(e),o=t.x+r*(this.x-t.x)-n*(this.y-t.y),i=t.y+n*(this.x-t.x)+r*(this.y-t.y);return this.x=o,this.y=i,this},_round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}},t.convert=function(e){return e instanceof t?e:Array.isArray(e)?new t(e[0],e[1]):e}},721:function(e,t,r){e.exports.VectorTile=r(473),r(233),r(557)},473:function(e,t,r){"use strict";var n=r(557);function o(e,t,r){if(3===e){var o=new n(r,r.readVarint()+r.pos);o.length&&(t[o.name]=o)}}e.exports=function(e,t){this.layers=e.readFields(o,{},t)}},233:function(e,t,r){"use strict";var n=r(525);function o(e,t,r,n,o){this.properties={},this.extent=r,this.type=0,this._pbf=e,this._geometry=-1,this._keys=n,this._values=o,e.readFields(i,this,t)}function i(e,t,r){1==e?t.id=r.readVarint():2==e?function(e,t){var r=e.readVarint()+e.pos;for(;e.pos>3}if(i--,1===o||2===o)a+=e.readSVarint(),s+=e.readSVarint(),1===o&&(t&&l.push(t),t=[]),t.push(new n(a,s));else{if(7!==o)throw new Error("unknown command "+o);t&&t.push(t[0].clone())}}return t&&l.push(t),l},o.prototype.bbox=function(){var e=this._pbf;e.pos=this._geometry;for(var t=e.readVarint()+e.pos,r=1,n=0,o=0,i=0,a=1/0,s=-1/0,l=1/0,u=-1/0;e.pos>3}if(n--,1===r||2===r)o+=e.readSVarint(),i+=e.readSVarint(),os&&(s=o),iu&&(u=i);else if(7!==r)throw new Error("unknown command "+r)}return[a,l,s,u]},o.prototype.toGeoJSON=function(e,t,r){var n,i,s=this.extent*Math.pow(2,r),l=this.extent*e,u=this.extent*t,c=this.loadGeometry(),f=o.types[this.type];function p(e){for(var t=0;t>3;t=1===n?e.readString():2===n?e.readFloat():3===n?e.readDouble():4===n?e.readVarint64():5===n?e.readVarint():6===n?e.readSVarint():7===n?e.readBoolean():null}return t}(r))}e.exports=o,o.prototype.feature=function(e){if(e<0||e>=this._features.length)throw new Error("feature index out of bounds");this._pbf.pos=this._features[e];var t=this._pbf.readVarint()+this._pbf.pos;return new n(this._pbf,t,this.extent,this._keys,this._values)}},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)},299:function(e,t){t.read=function(e,t,r,n,o){var i,a,s=8*o-n-1,l=(1<>1,c=-7,f=r?o-1:0,p=r?-1:1,h=e[t+f];for(f+=p,i=h&(1<<-c)-1,h>>=-c,c+=s;c>0;i=256*i+e[t+f],f+=p,c-=8);for(a=i&(1<<-c)-1,i>>=-c,c+=n;c>0;a=256*a+e[t+f],f+=p,c-=8);if(0===i)i=1-u;else{if(i===l)return a?NaN:1/0*(h?-1:1);a+=Math.pow(2,n),i-=u}return(h?-1:1)*a*Math.pow(2,i-n)},t.write=function(e,t,r,n,o,i){var a,s,l,u=8*i-o-1,c=(1<>1,p=23===o?Math.pow(2,-24)-Math.pow(2,-77):0,h=n?0:i-1,y=n?1:-1,d=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(s=isNaN(t)?1:0,a=c):(a=Math.floor(Math.log(t)/Math.LN2),t*(l=Math.pow(2,-a))<1&&(a--,l*=2),(t+=a+f>=1?p/l:p*Math.pow(2,1-f))*l>=2&&(a++,l/=2),a+f>=c?(s=0,a=c):a+f>=1?(s=(t*l-1)*Math.pow(2,o),a+=f):(s=t*Math.pow(2,f-1)*Math.pow(2,o),a=0));o>=8;e[r+h]=255&s,h+=y,s/=256,o-=8);for(a=a<0;e[r+h]=255&a,h+=y,a/=256,u-=8);e[r+h-y]|=128*d}},879: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)}var o=r(99),i="&&",a="||",s="and",l="or",u="=",c="~",f="!"+u,p="!"+c,h=">",y=">=",d="<",b="<=",v="*",m=",",g=".",w="(",O=")",S="where",_={pathway:[],groups:{}},P={},x={},C=console.log;function T(e){var t=j(e,S),r=t[0],n=t[1];_.pathway=j(r,m);for(var o=0,s=_.pathway.length;ol&&-1!==l){var T="gr_"+(new Date).getTime();_.groups[T]=n.substring(l+1,x),n=n.replace(w+_.groups[T]+O,T),C=-1}C+=1}!function e(t,r){var n=E(r,i),o=E(r,a);if(n!==Number.MAX_VALUE||o!==Number.MAX_VALUE)if(n-1}function M(e,t){var r=j(t,g),n=e;for(var i in r){if(!n.hasOwnProperty(r[i]))return"";n=n[r[i]]}return n=o.isDate(n)?n.valueOf():o.isDateString(n)?o.parseDateFromString(n):n.toString()}function R(e,t){var r=!1;for(var n in e){if(r=r||(n===s?A:n===l?R:L)(e[n],t),x.trace&&C(_.step,"======((( or",e[n],r),r)return r}return r}function A(e,t){var r=!0;for(var n in e){if(r=r&&(n===s?A:n===l?R:L)(e[n],t),x.trace&&C(_.step,"======((( and",e[n],r),!r)return r}return r}function L(e,t){if(_.step+=1,e.or){var r=R(e.or,t);return x.trace&&C(_.step,"OR",e,r),r}if(e.and){r=A(e.and,t);return x.trace&&C(_.step,"AND",e,r),r}if("object"===n(e))return e.eq?M(t,e.eq[0])===e.eq[1]:e.ne?M(t,e.ne[0])!==e.ne[1]:e.req?k(M(t,e.req[0]),e.req[1]):e.nreq?!k(M(t,e.nreq[0]),e.nreq[1]):e.gt?M(t,e.gt[0])>e.gt[1]:e.ge?M(t,e.ge[0])>=e.ge[1]:e.lt?M(t,e.lt[0])0?n.map(function(e){for(var t={},r=0,n=_.pathway.length;r-1&&e%1==0&&e-1&&e%1==0&&e<=o}(e.length)&&!Y(e)}function Y(e){var t=Q(e)?x.call(e):"";return t==a||t==s}function Q(e){var t=n(e);return!!e&&("object"==t||"function"==t)}var X,Z=(X=function(e){return W(e)?B(e):U(e)},function(e){var t,r,n,o=V(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,X(e))});e.exports=Z},943:function(e,t,r){"use strict";e.exports=o;var n=r(299);function o(e){this.buf=ArrayBuffer.isView&&ArrayBuffer.isView(e)?e:new Uint8Array(e||0),this.pos=0,this.type=0,this.length=this.buf.length}o.Varint=0,o.Fixed64=1,o.Bytes=2,o.Fixed32=5;var i="undefined"==typeof TextDecoder?null:new TextDecoder("utf8");function a(e){return e.type===o.Bytes?e.readVarint()+e.pos:e.pos+1}function s(e,t,r){return r?4294967296*t+(e>>>0):4294967296*(t>>>0)+(e>>>0)}function l(e,t,r){var n=t<=16383?1:t<=2097151?2:t<=268435455?3:Math.floor(Math.log(t)/(7*Math.LN2));r.realloc(n);for(var o=r.pos-1;o>=e;o--)r.buf[o+n]=r.buf[o]}function u(e,t){for(var r=0;r>>8,e[r+2]=t>>>16,e[r+3]=t>>>24}function w(e,t){return(e[t]|e[t+1]<<8|e[t+2]<<16)+(e[t+3]<<24)}o.prototype={destroy:function(){this.buf=null},readFields:function(e,t,r){for(r=r||this.length;this.pos>3,i=this.pos;this.type=7&n,e(o,t,this),this.pos===i&&this.skip(n)}return t},readMessage:function(e,t){return this.readFields(e,t,this.readVarint()+this.pos)},readFixed32:function(){var e=m(this.buf,this.pos);return this.pos+=4,e},readSFixed32:function(){var e=w(this.buf,this.pos);return this.pos+=4,e},readFixed64:function(){var e=m(this.buf,this.pos)+4294967296*m(this.buf,this.pos+4);return this.pos+=8,e},readSFixed64:function(){var e=m(this.buf,this.pos)+4294967296*w(this.buf,this.pos+4);return this.pos+=8,e},readFloat:function(){var e=n.read(this.buf,this.pos,!0,23,4);return this.pos+=4,e},readDouble:function(){var e=n.read(this.buf,this.pos,!0,52,8);return this.pos+=8,e},readVarint:function(e){var t,r,n=this.buf;return t=127&(r=n[this.pos++]),r<128?t:(t|=(127&(r=n[this.pos++]))<<7,r<128?t:(t|=(127&(r=n[this.pos++]))<<14,r<128?t:(t|=(127&(r=n[this.pos++]))<<21,r<128?t:function(e,t,r){var n,o,i=r.buf;if(o=i[r.pos++],n=(112&o)>>4,o<128)return s(e,n,t);if(o=i[r.pos++],n|=(127&o)<<3,o<128)return s(e,n,t);if(o=i[r.pos++],n|=(127&o)<<10,o<128)return s(e,n,t);if(o=i[r.pos++],n|=(127&o)<<17,o<128)return s(e,n,t);if(o=i[r.pos++],n|=(127&o)<<24,o<128)return s(e,n,t);if(o=i[r.pos++],n|=(1&o)<<31,o<128)return s(e,n,t);throw new Error("Expected varint not more than 10 bytes")}(t|=(15&(r=n[this.pos]))<<28,e,this))))},readVarint64:function(){return this.readVarint(!0)},readSVarint:function(){var e=this.readVarint();return e%2==1?(e+1)/-2:e/2},readBoolean:function(){return Boolean(this.readVarint())},readString:function(){var e=this.readVarint()+this.pos,t=this.pos;return this.pos=e,e-t>=12&&i?function(e,t,r){return i.decode(e.subarray(t,r))}(this.buf,t,e):function(e,t,r){var n="",o=t;for(;o239?4:l>223?3:l>191?2:1;if(o+c>r)break;1===c?l<128&&(u=l):2===c?128==(192&(i=e[o+1]))&&(u=(31&l)<<6|63&i)<=127&&(u=null):3===c?(i=e[o+1],a=e[o+2],128==(192&i)&&128==(192&a)&&((u=(15&l)<<12|(63&i)<<6|63&a)<=2047||u>=55296&&u<=57343)&&(u=null)):4===c&&(i=e[o+1],a=e[o+2],s=e[o+3],128==(192&i)&&128==(192&a)&&128==(192&s)&&((u=(15&l)<<18|(63&i)<<12|(63&a)<<6|63&s)<=65535||u>=1114112)&&(u=null)),null===u?(u=65533,c=1):u>65535&&(u-=65536,n+=String.fromCharCode(u>>>10&1023|55296),u=56320|1023&u),n+=String.fromCharCode(u),o+=c}return n}(this.buf,t,e)},readBytes:function(){var e=this.readVarint()+this.pos,t=this.buf.subarray(this.pos,e);return this.pos=e,t},readPackedVarint:function(e,t){if(this.type!==o.Bytes)return e.push(this.readVarint(t));var r=a(this);for(e=e||[];this.pos127;);else if(t===o.Bytes)this.pos=this.readVarint()+this.pos;else if(t===o.Fixed32)this.pos+=4;else{if(t!==o.Fixed64)throw new Error("Unimplemented type: "+t);this.pos+=8}},writeTag:function(e,t){this.writeVarint(e<<3|t)},realloc:function(e){for(var t=this.length||16;t268435455||e<0?function(e,t){var r,n;e>=0?(r=e%4294967296|0,n=e/4294967296|0):(n=~(-e/4294967296),4294967295^(r=~(-e%4294967296))?r=r+1|0:(r=0,n=n+1|0));if(e>=0x10000000000000000||e<-0x10000000000000000)throw new Error("Given varint doesn't fit into 10 bytes");t.realloc(10),function(e,t,r){r.buf[r.pos++]=127&e|128,e>>>=7,r.buf[r.pos++]=127&e|128,e>>>=7,r.buf[r.pos++]=127&e|128,e>>>=7,r.buf[r.pos++]=127&e|128,e>>>=7,r.buf[r.pos]=127&e}(r,0,t),function(e,t){var r=(7&e)<<4;if(t.buf[t.pos++]|=r|((e>>>=3)?128:0),!e)return;if(t.buf[t.pos++]=127&e|((e>>>=7)?128:0),!e)return;if(t.buf[t.pos++]=127&e|((e>>>=7)?128:0),!e)return;if(t.buf[t.pos++]=127&e|((e>>>=7)?128:0),!e)return;if(t.buf[t.pos++]=127&e|((e>>>=7)?128:0),!e)return;t.buf[t.pos++]=127&e}(n,t)}(e,this):(this.realloc(4),this.buf[this.pos++]=127&e|(e>127?128:0),e<=127||(this.buf[this.pos++]=127&(e>>>=7)|(e>127?128:0),e<=127||(this.buf[this.pos++]=127&(e>>>=7)|(e>127?128:0),e<=127||(this.buf[this.pos++]=e>>>7&127))))},writeSVarint:function(e){this.writeVarint(e<0?2*-e-1:2*e)},writeBoolean:function(e){this.writeVarint(Boolean(e))},writeString:function(e){e=String(e),this.realloc(4*e.length),this.pos++;var t=this.pos;this.pos=function(e,t,r){for(var n,o,i=0;i55295&&n<57344){if(!o){n>56319||i+1===t.length?(e[r++]=239,e[r++]=191,e[r++]=189):o=n;continue}if(n<56320){e[r++]=239,e[r++]=191,e[r++]=189,o=n;continue}n=o-55296<<10|n-56320|65536,o=null}else o&&(e[r++]=239,e[r++]=191,e[r++]=189,o=null);n<128?e[r++]=n:(n<2048?e[r++]=n>>6|192:(n<65536?e[r++]=n>>12|224:(e[r++]=n>>18|240,e[r++]=n>>12&63|128),e[r++]=n>>6&63|128),e[r++]=63&n|128)}return r}(this.buf,e,this.pos);var r=this.pos-t;r>=128&&l(t,r,this),this.pos=t-1,this.writeVarint(r),this.pos+=r},writeFloat:function(e){this.realloc(4),n.write(this.buf,e,this.pos,!0,23,4),this.pos+=4},writeDouble:function(e){this.realloc(8),n.write(this.buf,e,this.pos,!0,52,8),this.pos+=8},writeBytes:function(e){var t=e.length;this.writeVarint(t),this.realloc(t);for(var r=0;r=128&&l(r,n,this),this.pos=r-1,this.writeVarint(n),this.pos+=n},writeMessage:function(e,t,r){this.writeTag(e,o.Bytes),this.writeRawMessage(t,r)},writePackedVarint:function(e,t){t.length&&this.writeMessage(e,u,t)},writePackedSVarint:function(e,t){t.length&&this.writeMessage(e,c,t)},writePackedBoolean:function(e,t){t.length&&this.writeMessage(e,h,t)},writePackedFloat:function(e,t){t.length&&this.writeMessage(e,f,t)},writePackedDouble:function(e,t){t.length&&this.writeMessage(e,p,t)},writePackedFixed32:function(e,t){t.length&&this.writeMessage(e,y,t)},writePackedSFixed32:function(e,t){t.length&&this.writeMessage(e,d,t)},writePackedFixed64:function(e,t){t.length&&this.writeMessage(e,b,t)},writePackedSFixed64:function(e,t){t.length&&this.writeMessage(e,v,t)},writeBytesField:function(e,t){this.writeTag(e,o.Bytes),this.writeBytes(t)},writeFixed32Field:function(e,t){this.writeTag(e,o.Fixed32),this.writeFixed32(t)},writeSFixed32Field:function(e,t){this.writeTag(e,o.Fixed32),this.writeSFixed32(t)},writeFixed64Field:function(e,t){this.writeTag(e,o.Fixed64),this.writeFixed64(t)},writeSFixed64Field:function(e,t){this.writeTag(e,o.Fixed64),this.writeSFixed64(t)},writeVarintField:function(e,t){this.writeTag(e,o.Varint),this.writeVarint(t)},writeSVarintField:function(e,t){this.writeTag(e,o.Varint),this.writeSVarint(t)},writeStringField:function(e,t){this.writeTag(e,o.Bytes),this.writeString(t)},writeFloatField:function(e,t){this.writeTag(e,o.Fixed32),this.writeFloat(t)},writeDoubleField:function(e,t){this.writeTag(e,o.Fixed64),this.writeDouble(t)},writeBooleanField:function(e,t){this.writeVarintField(e,Boolean(t))}}},957: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";function e(e){var t=this.constructor;return this.then(function(r){return t.resolve(e()).then(function(){return r})},function(r){return t.resolve(e()).then(function(){return t.reject(r)})})}function t(e){return new this(function(t,r){if(!e||void 0===e.length)return r(new TypeError(a(e)+" "+e+" is not iterable(cannot read property Symbol(Symbol.iterator))"));var n=Array.prototype.slice.call(e);if(0===n.length)return t([]);var o=n.length;function i(e,r){if(r&&("object"===a(r)||"function"==typeof r)){var s=r.then;if("function"==typeof s)return void s.call(r,function(t){i(e,t)},function(r){n[e]={status:"rejected",reason:r},0==--o&&t(n)})}n[e]={status:"fulfilled",value:r},0==--o&&t(n)}for(var s=0;s0&&(r=parseFloat(e.toPrecision(t))),r},format:function(e,t,r,n){t=void 0!==t?t:0,r=void 0!==r?r:Q.thousandsSeparator,n=void 0!==n?n:Q.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 Q.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(){}},Z={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||ie.indexOf("trident")>-1&&ie.indexOf("rv")>-1?(re="msie",te=ie.match(/msie ([\d.]+)/)||ie.match(/rv:([\d.]+)/)):ie.indexOf("chrome")>-1?(re="chrome",te=ie.match(/chrome\/([\d.]+)/)):ie.indexOf("firefox")>-1?(re="firefox",te=ie.match(/firefox\/([\d.]+)/)):ie.indexOf("opera")>-1?(re="opera",te=ie.match(/version\/([\d.]+)/)):ie.indexOf("safari")>-1&&(re="safari",te=ie.match(/version\/([\d.]+)/)),ne=te?te[1]:"",ie.indexOf("ipad")>-1||ie.indexOf("ipod")>-1||ie.indexOf("iphone")>-1?oe="apple":ie.indexOf("android")>-1&&(ne=(te=ie.match(/version\/([\d.]+)/))?te[1]:"",oe="android"),{name:re,version:ne,device:oe}),ue=(ae=!0,se=le,document.createElement("canvas").getContext?("firefox"===se.name&&parseFloat(se.version)<5&&(ae=!1),"safari"===se.name&&parseFloat(se.version)<4&&(ae=!1),"opera"===se.name&&parseFloat(se.version)<10&&(ae=!1),"msie"===se.name&&parseFloat(se.version)<9&&(ae=!1)):ae=!1,ae),ce=function(){var e=navigator.userAgent.toLowerCase();return-1===e.indexOf("webkit")&&-1!==e.indexOf("gecko")}(),fe={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"===ee(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"===ee(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=fe.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(Y.contains(e,"?")){var r=e.indexOf("?")+1,n=Y.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/(fe.normalizeScale(e)*pe[t]*96));return r},getScaleFromResolution:function(e,t){return null==t&&(t="degrees"),e*pe[t]*96},getBrowser:function(){return le},isSupportCanvas:ue,supportCanvas:function(){return fe.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=fe.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 $.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"!==ee(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}},pe={inches:1,ft:12,mi:63360,m:39.3701,km:39370.1,dd:4374754,yd:36};pe.in=pe.inches,pe.degrees=pe.dd,pe.nmi=1852*pe.m;var he=.0254000508001016;function ye(e,t){for(var r=0;re.right;)t.lon-=e.getWidth()}return t}},{key:"destroy",value:function(){this.lon=null,this.lat=null}}])&&ye(t.prototype,r),n&&ye(t,n),Object.defineProperty(t,"prototype",{writable:!1}),e}();function be(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}}])&&be(t.prototype,r),n&&be(t,n),Object.defineProperty(t,"prototype",{writable:!1}),e}();function me(e){"@babel/helpers - typeof";return(me="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 ge(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 fe.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&&He(Qe(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 ve(o,i,s,a)}},{key:"getLabelPxBoundsByText",value:function(e,t){var r,n,o,i,a=this.getLabelPxSize(t),s=fe.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 ve(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}}])&&Ke(t.prototype,r),n&&Ke(t,n),Object.defineProperty(t,"prototype",{writable:!1}),i}();function ot(e){"@babel/helpers - typeof";return(ot="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 it(e,t){for(var r=0;r3;if(t){this.components.pop(),at(ut(i.prototype),"removeComponent",this).apply(this,arguments);var r=this.components[0];at(ut(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=fe.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=fe.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=fe.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=fe.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=nr(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}}])&&kr(t.prototype,r),n&&kr(t,n),Object.defineProperty(t,"prototype",{writable:!1}),i}();function Dr(e){"@babel/helpers - typeof";return(Dr="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 Ir(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}}])&&Ir(t.prototype,r),n&&Ir(t,n),Object.defineProperty(t,"prototype",{writable:!1}),i}();function zr(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 Ut(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(){}}])&&zr(t.prototype,r),n&&zr(t,n),Object.defineProperty(t,"prototype",{writable:!1}),e}();function Jr(e){"@babel/helpers - typeof";return(Jr="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 qr(e,t){for(var r=0;r=e.endTime&&(e.currentTime=e.endTime)}}}])&&qr(t.prototype,r),n&&qr(t,n),Object.defineProperty(t,"prototype",{writable:!1}),i}(),en=(r(957),r(937),r(238)),tn=r.n(en),rn=window.fetch,nn={limitLength:1500,queryKeys:[],queryValues:[],supermap_callbacks:{},addQueryStrings:function(e){for(var t in e){this.queryKeys.push(t),"string"!=typeof e[t]&&(e[t]=fe.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)),tn()(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)}},on=function(){return void 0!=Zr?Zr:window.XMLHttpRequest&&"withCredentials"in new window.XMLHttpRequest},an=function(){return Kr||45e3},sn={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!!fe.isInTheSameDomain(e)||(void 0!=t.crossOrigin?t.crossOrigin:on()||t.proxy)},get:function(e,t,r){r=r||{};if(e=fe.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 nn.GET(n)}return this.urlIsLong(e)?this._postSimulatie("GET",e.substring(0,e.indexOf("?")),fe.getParameters(e),r):this._fetch(e,t,r,"GET")},delete:function(e,t,r){r=r||{};if(e=fe.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 nn.DELETE(n)}return this.urlIsLong(e)?this._postSimulatie("DELETE",e.substring(0,e.indexOf("?")),fe.getParameters(e),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 nn.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 nn.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,rn(e,{method:n,headers:r.headers,body:"PUT"===n||"POST"===n?t:void 0,credentials:this._getWithCredentials(r),mode:"cors",timeout:an()}).then(function(e){return e})):rn(e,{method:n,body:"PUT"===n||"POST"===n?t:void 0,headers:r.headers,credentials:this._getWithCredentials(r),mode:"cors",timeout:an()}).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||{},tn()(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 ln(e,t){for(var r=0;r3&&void 0!==arguments[3]?arguments[3]:{headers:this.headers,crossOrigin:this.crossOrigin,withCredentials:this.withCredentials};return t=un.appendCredential(t),sn.commit(e,t,r,n).then(function(e){return e.json()})}}])&&wn(t.prototype,r),n&&wn(t,n),Object.defineProperty(t,"prototype",{writable:!1}),e}();function Sn(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=fe.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=fe.transformResult(e),this.events.triggerEvent("processCompleted",{result:e})}},{key:"serviceProcessFailed",value:function(e){var t=(e=fe.transformResult(e)).error||e;this.events.triggerEvent("processFailed",{error:t})}},{key:"_commit",value:function(e){if("POST"===e.method||"PUT"===e.method||"PATCH"===e.method)if(e.params&&(e.url=fe.urlAppend(e.url,fe.getParameterString(e.params||{}))),"object"===so(e.data))try{e.params=fe.toJSON(e.data)}catch(e){console.log("不是json对象")}else e.params=e.data;sn.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(e){var t=e;return"string"==typeof e&&(t=(new lr).read(e)),(!t||t.error||t.code>=300&&304!==t.code)&&(t=t&&t.error?{error:t.error}:{error:t}),t}).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))})}}])&&lo(t.prototype,r),n&&lo(t,n),Object.defineProperty(t,"prototype",{writable:!1}),e}();function co(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}}])&&Bi(t.prototype,r),n&&Bi(t,n),Object.defineProperty(t,"prototype",{writable:!1}),e}();function Ui(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+="]"}}])&&Za(t.prototype,r),n&&Za(t,n),Object.defineProperty(t,"prototype",{writable:!1}),i}();function ns(e){"@babel/helpers - typeof";return(ns="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 os(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=un.appendCredential(e),"WebSocket"in window?new WebSocket(e):"MozWebSocket"in window?new(0,window.MozWebSocket)(e):(console.log("no WebSocket"),null)}}])&&os(t.prototype,r),n&&os(t,n),Object.defineProperty(t,"prototype",{writable:!1}),i}();function cs(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 Nr;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+=fe.toJSON(e[n]);return t+="]"}},{key:"toGeoJSONResult",value:function(e){if(!e)return null;var t=new Nr;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 Cc(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 Nr;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}}])&&jc(t.prototype,r),n&&jc(t,n),Object.defineProperty(t,"prototype",{writable:!1}),i}();function Nc(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 Nr;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}}])&&Fc(t.prototype,r),n&&Fc(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 Nr;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 Nr;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}}}])&&Vf(t.prototype,r),n&&Vf(t,n),Object.defineProperty(t,"prototype",{writable:!1}),i}();function Xf(e){"@babel/helpers - typeof";return(Xf="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 kp(e){"@babel/helpers - typeof";return(kp="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 Mp(e,t){for(var r=0;r=0&&r.toIndex>=0&&!n&&(r.url=fe.urlAppend(r.url,"fromIndex=".concat(r.fromIndex,"&toIndex=").concat(r.toIndex))),e.returnCountOnly&&(r.url=fe.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=fe.transformResult(e),this.format===t.GEOJSON&&e.features){var r=new Nr;e.features=r.toGeoJSON(e.features)}this.events.triggerEvent("processCompleted",{result:e})}}])&&Mp(r.prototype,n),o&&Mp(r,o),Object.defineProperty(r,"prototype",{writable:!1}),a}();function Fp(e){"@babel/helpers - typeof";return(Fp="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 jh(e){"@babel/helpers - typeof";return(jh="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 kh(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=fe.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}}])&&Md(t.prototype,r),n&&Md(t,n),Object.defineProperty(t,"prototype",{writable:!1}),i}();function Fd(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 jb).fromJson(t[n]),t[n]=r}}}}])&&Mb(t.prototype,r),n&&Mb(t,n),Object.defineProperty(t,"prototype",{writable:!1}),i}();function Fb(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=fe.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=fe.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 NS(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=fe.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 QS(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':"+fe.toJSON(t)+","),e.joinItems&&e.joinItems.length>0&&e.joinItems[a]&&(r+="'joinItems':["+fe.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=un.appendCredential(t),n.crossOrigin=this.options.crossOrigin,n.headers=this.options.headers,sn.commit(e,t,r,n).then(function(e){return e.json()})}}])&&fC(t.prototype,r),n&&fC(t,n),Object.defineProperty(t,"prototype",{writable:!1}),e}();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 yC(e,t){for(var r=0;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}}])&&RC(t.prototype,r),n&&RC(t,n),Object.defineProperty(t,"prototype",{writable:!1}),e}();function LC(e){"@babel/helpers - typeof";return(LC="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 NC(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]}}])&&IC(t.prototype,r),n&&IC(t,n),Object.defineProperty(t,"prototype",{writable:!1}),e}();function BC(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)&&zC(t.prototype,r),n&&zC(t,n),Object.defineProperty(t,"prototype",{writable:!1}),e}(),JC=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 qC(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;au&&(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 tT(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 $C.Tree.Dimension(Math.round(e.toHSL().h)):null},saturation:function(e){return"toHSL"in e?new $C.Tree.Dimension(Math.round(100*e.toHSL().s),"%"):null},lightness:function(e){return"toHSL"in e?new $C.Tree.Dimension(Math.round(100*e.toHSL().l),"%"):null},alpha:function(e){return"toHSL"in e?new $C.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 $C.Tree.Color(l,u)},greyscale:function(e){return this.desaturate(e,new $C.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 $C.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 $C.Tree.Dimension($C.Tree.operate(t,this.value,this.value*r.value*.01),this.unit):new $C.Tree.Dimension($C.Tree.operate(t,this.value,r.value),this.unit||r.unit)}}]),e}(),$C.Tree.Element=function(){function e(t){XC(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 KC(e,[{key:"specificity",value:function(){return["id"===this.type?1:0,"class"===this.type?1:0]}},{key:"toString",value:function(){return this.value}}]),e}(),$C.Tree.Expression=function(){function e(t){XC(this,e),this.is="expression",this.value=t}return KC(e,[{key:"ev",value:function(e){return this.value.length>1?new $C.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}(),$C.Tree.Field=function(){function e(t){XC(this,e),this.is="field",this.value=t||""}return KC(e,[{key:"toString",value:function(){return'["'+this.value.toUpperCase()+'"]'}},{key:"ev",value:function(){return this}}]),e}(),$C.Tree.Filter=function(){function e(t,r,n,o,i){XC(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 KC(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}(),$C.Tree.Filterset=function(){function e(){XC(this,e),this.filters={}}return KC(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"!==QC(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 $C.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 $C.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}(),$C.Tree.Fontset=KC(function e(t,r){XC(this,e),this.fonts=r,this.name="fontset-"+t.effects.length}),$C.Tree.Invalid=function(){function e(t,r,n){XC(this,e),this.is="invalid",this.chunk=t,this.index=r,this.type="syntax",this.message=n||"Invalid code: "+this.chunk}return KC(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}(),$C.Tree.Keyword=function(){function e(t){XC(this,e),this.value=t;var r={transparent:"color",true:"boolean",false:"boolean"};this.is=r[t]?r[t]:"keyword"}return KC(e,[{key:"ev",value:function(){return this}},{key:"toString",value:function(){return this.value}}]),e}(),$C.Tree.Literal=function(){function e(t){XC(this,e),this.value=t||"",this.is="field"}return KC(e,[{key:"toString",value:function(){return this.value}},{key:"ev",value:function(){return this}}]),e}(),$C.Tree.Operation=function(){function e(t,r,n){XC(this,e),this.is="operation",this.op=t.trim(),this.operands=r,this.index=n}return KC(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 $C.Tree.Dimension&&n instanceof $C.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 $C.Tree.Quoted&&n instanceof $C.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 $C.Tree.Field||n instanceof $C.Tree.Field||r instanceof $C.Tree.Literal||n instanceof $C.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 $C.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}(),$C.Tree.Quoted=function(){function e(t){XC(this,e),this.is="string",this.value=t||""}return KC(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 $C.Tree.Quoted($C.Tree.operate(t,this.toString(),r.toString(this.contains_field)))}}]),e}(),$C.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 $C.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;t$C.Tree.Zoom.maxZoom||t<0)&&e.error({message:"Only zoom levels between 0 and "+$C.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<=$C.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),C=Math.cos(P),T=(-s-2*x*C)/(3*a),E=(-s+x*(C+this.THREE_SQRT*Math.sin(P)))/(3*a),j=(-s+x*(C-this.THREE_SQRT*Math.sin(P)))/(3*a);T>=0&&T<=1&&(i[h++]=T),E>=0&&E<=1&&(i[h++]=E),j>=0&&j<=1&&(i[h++]=j)}}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}}])&&hE(t.prototype,r),n&&hE(t,n),Object.defineProperty(t,"prototype",{writable:!1}),e}();function dE(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 pE,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))}}])&&dE(t.prototype,r),n&&dE(t,n),Object.defineProperty(t,"prototype",{writable:!1}),e}();function vE(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)}}])&&SE(t.prototype,r),n&&SE(t,n),Object.defineProperty(t,"prototype",{writable:!1}),e}();function PE(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}}])&&CE(t.prototype,r),n&&CE(t,n),Object.defineProperty(t,"prototype",{writable:!1}),e}();function EE(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}AE.Util_vector.sub(t,e,this.position),n(t[0])&&n(t[1])||(AE.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||AE.Util_matrix.create();if(AE.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&&AE.Util_matrix.translate(t,t,e),AE.Util_matrix.scale(t,t,this.scale),r&&(e[0]=-e[0],e[1]=-e[1],AE.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&&AE.Util_matrix.translate(t,t,e),AE.Util_matrix.rotate(t,t,this.rotation[0]),n&&(e[0]=-e[0],e[1]=-e[1],AE.Util_matrix.translate(t,t,e))}}else 0!=+this.rotation&&AE.Util_matrix.rotate(t,t,this.rotation);(o(this.position[0])||o(this.position[1]))&&AE.Util_matrix.translate(t,t,this.position)}this.transform=t,this.parent&&this.parent.needTransform&&(this.needLocalTransform?AE.Util_matrix.mul(this.transform,this.parent.transform,this.transform):AE.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}}}])&&LE(t.prototype,r),n&&LE(t,n),Object.defineProperty(t,"prototype",{writable:!1}),e}();function DE(e){"@babel/helpers - typeof";return(DE="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 IE(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&&AE.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=AE.Util_area.getTextHeight("ZH",e.textFont),o=AE.Util_area.getTextWidth(e.text,e.textFont),i=AE.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}}])&&KE(t.prototype,r),n&&KE(t,n),Object.defineProperty(t,"prototype",{writable:!1}),i}();function oj(e){"@babel/helpers - typeof";return(oj="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 ij(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=fe.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=AE.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}}])&&pj(t.prototype,r),n&&pj(t,n),Object.defineProperty(t,"prototype",{writable:!1}),i}();function mj(e){"@babel/helpers - typeof";return(mj="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 gj(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)}}])&&Aj(t.prototype,r),n&&Aj(t,n),Object.defineProperty(t,"prototype",{writable:!1}),i}();function Bj(e){"@babel/helpers - typeof";return(Bj="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 Gj(e,t){for(var r=0;r1?AE.Util_computeBoundingBox.arc(a,s,l,c,f,!p,r,o):(r[0]=o[0]=a,r[1]=o[1]=s),AE.Util_computeBoundingBox.arc(a,s,u,c,f,!p,n,i),AE.Util_vector.min(r,r,n),AE.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}}])&&Gj(t.prototype,r),n&&Gj(t,n),Object.defineProperty(t,"prototype",{writable:!1}),i}();function Hj(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 xT(w);S.style={fillColor:"#008acd"},fe.copyAttributesWithClip(S.style,i.axisStyle),s.push(e.createShape(S));var _=new xT(O);if(_.style={fillColor:"#008acd"},fe.copyAttributesWithClip(_.style,i.axisStyle),s.push(e.createShape(_)),i.axis3DParameter&&!isNaN(i.axis3DParameter)&&i.axis3DParameter>=15){var P=new xT(c);P.style={fillColor:"#008acd"},fe.copyAttributesWithClip(P.style,i.axisStyle),s.push(e.createShape(P))}}var x=new mT(f);x.style={strokeLinecap:"butt",strokeLineJoin:"round",strokeColor:"#008acd",strokeWidth:1},i.axisStyle&&fe.copyAttributesWithClip(x.style,i.axisStyle),x.clickable=!1,x.hoverable=!1;var C=[e.createShape(x)],T=[];if(i.axisYLabels&&i.axisYLabels.length&&i.axisYLabels.length>0){var E=i.axisYLabels,j=E.length,k=[0,0];if(i.axisYLabelsOffset&&i.axisYLabelsOffset.length&&(k=i.axisYLabelsOffset),1==j){var M=new HT(o[0]-5+k[0],o[3]+k[1],E[0]);M.style={labelAlign:"right"},i.axisYLabelsStyle&&fe.copyAttributesWithClip(M.style,i.axisYLabelsStyle),M.clickable=!1,M.hoverable=!1,T.push(e.createShape(M))}else for(var R=o[3],A=Math.abs(o[1]-o[3])/(j-1),L=0;L0){var I=i.axisXLabels,F=I.length,B=[0,0];if(i.axisXLabelsOffset&&i.axisXLabelsOffset.length&&(B=i.axisXLabelsOffset),n&&n.xPositions&&n.xPositions.length&&n.xPositions.length==F)for(var G=n.xPositions,U=0;U=0&&r[o]&&fe.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 ve(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 uk=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&&ak(e,t)}(i,rk);var t,r,n,o=sk(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(){ik(lk(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(Wj.Background(this.shapeFactory,this.chartBox,t)),(void 0===t.useAxis||t.useAxis)&&(this.shapes=this.shapes.concat(Wj.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 FC).getLinearGradient(a,0,s,0,[[0,l],[1,u]]);o.style.color=c}}}}])&&ok(t.prototype,r),n&&ok(t,n),Object.defineProperty(t,"prototype",{writable:!1}),i}();function ck(e){"@babel/helpers - typeof";return(ck="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;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(Wj.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(Wj.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)}}])&&mk(t.prototype,r),n&&mk(t,n),Object.defineProperty(t,"prototype",{writable:!1}),i}();function Pk(e){"@babel/helpers - typeof";return(Pk="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 xk(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 aE(s[0],s[1],a);l.style=Wj.ShapeStyleTool(null,e.circleStyle,null,null,0),void 0!==e.fillColor?l.style.fillColor=e.fillColor:l.style.fillColor="#ff9277",l.highlightStyle=Wj.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()}}}])&&xk(t.prototype,r),n&&xk(t,n),Object.defineProperty(t,"prototype",{writable:!1}),i}();function Mk(e){"@babel/helpers - typeof";return(Mk="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 Rk(e,t){for(var r=0;rr[1])return null;a=l[f],s=t[1]-(o[f]-r[0])/n;var h=new fT(a,s);h.style=Wj.ShapeStyleTool({fillColor:"#ee9900"},e.pointStyle,e.pointStyleByFields,e.pointStyleByCodomain,f,o[f]),h.highlightStyle=Wj.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 mT(u);d.style=Wj.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 BT(l[0],l[1],p,u,c);if(void 0===e.sectorStyleByFields){var b=h%t.length;d.style=Wj.ShapeStyleTool(null,e.sectorStyle,t,null,b)}else d.style=Wj.ShapeStyleTool(null,e.sectorStyle,e.sectorStyleByFields,e.sectorStyleByCodomain,h,r[h]);d.highlightStyle=Wj.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()}}}}])&&Bk(t.prototype,r),n&&Bk(t,n),Object.defineProperty(t,"prototype",{writable:!1}),i}();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 Hk(e,t){for(var r=0;rr[1])return null;a=l[u],s=t[1]-(o[u]-r[0])/n;var f=new fT(a,s);f.style=Wj.ShapeStyleTool({fillColor:"#ee9900"},e.pointStyle,e.pointStyleByFields,e.pointStyleByCodomain,u,o[u]),f.highlightStyle=Wj.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=fe.copyAttributesWithClip(c,this.style,["pointList"])).pointList=i;var f=new Pj({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&&fe.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=fe.copyAttributesWithClip(c,this.style)).x=n[0],c.y=n[1];var f=new XE({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&&fe.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=fe.copyAttributesWithClip(d,this.style,["pointList"])).pointList=i;var b=new vj({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&&fe.copyAttributesWithClip(b,this.shapeOptions),this.shapes.push(b)}}},{key:"rectangleToTF",value:function(e){var t=this.location,r=new de(e.x,e.y),n=this.layer.map.getResolution(),o=this.getLocalXY(r),i=new Object;i.r=6,(i=fe.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 Fj({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&&fe.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=fe.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 nj({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&&fe.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 OM&&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 OM&&i.delChildrenFromStorage(this))}}},{key:"addToMap",value:function(e){return e instanceof OM&&(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 OM&&(t._storage=null)),this}},{key:"dispose",value:function(){this._elements=null,this._roots=null,this._hoverElements=null}}])&&SM(t.prototype,r),n&&SM(t,n),Object.defineProperty(t,"prototype",{writable:!1}),e}();function PM(e){"@babel/helpers - typeof";return(PM="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 xM(e,t){return(xM=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function CM(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=TM(e);if(t){var o=TM(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return function(e,t){if(t&&("object"===PM(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 TM(e){return(TM=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function EM(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function jM(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 RM(fe.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 DC).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,xE.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=AE.Util_event.getX(e),this._mouseY=AE.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,xE.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(xE.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,xE.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,xE.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&&AE.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&&(AE.Util_matrix.invert(t,e.transform),AE.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=C;wa);w++);w=Math.min(w-1,u-2)}C=w,T=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?KM._catmullRomInterpolateArray(S,_,P,x,O,O*O,O*O*O,n(e,l),h):(c=p?KM.rgba2String(E):KM._catmullRomInterpolate(S,_,P,x,O,O*O,O*O*O),r(e,l,c))):f?KM._interpolateArray(b[w],b[w+1],O,n(e,l),h):(p?(KM._interpolateArray(b[w],b[w+1],O,E,1),y=KM.rgba2String(E)):y=KM._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}}])&&lR(t.prototype,r),n&&lR(t,n),Object.defineProperty(t,"prototype",{writable:!1}),e}(),cR=function(){try{return echarts}catch(e){return{}}}(),fR=r.n(cR),pR={"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 pR.code||pR.setCode(),pR.code},setCode:function(){var e=this.getLanguageFromCookie();e?pR.code=e:(e=pR.defaultCode,0===(e="Netscape"===navigator.appName?navigator.language:navigator.browserLanguage).indexOf("zh")&&(e="zh-CN"),0===e.indexOf("en")&&(e="en-US"),pR.code=e)},getLanguageFromCookie:function(){for(var e=document.cookie.split(";"),t=0;t0){var a=i.SheetNames[0],s=hR.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,pR.i18n("msg_dataInWrongGeoJSONFormat")),r&&r.call(o,i)}else n&&n.call(o,pR.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",sn.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(pR.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");sn.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"),sn.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");sn.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"),sn.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 ci(s),a=new Vh({queryParameter:i,datasetNames:t,fromIndex:0,toIndex:1e5,returnContent:!0}),new Xh(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 ci(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 mR(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 bR(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)}}])&&wA(t.prototype,r),n&&wA(t,n),Object.defineProperty(t,"prototype",{writable:!1}),i}(),xA=function(e){return/^.*\.(?:xls|xlsx)$/i.test(e)?oR.EXCEL:/^.*\.(?:csv)$/i.test(e)?oR.CSV:/^.*\.(?:geojson|json)$/i.test(e)?oR.GEOJSON:null};function CA(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 TA(e){for(var t=1;t=this.text.length)return;e=this.text[this.place++]}switch(this.state){case rL: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}},lL.prototype.afterquote=function(e){if('"'===e)return this.word+='"',void(this.state=4);if(aL.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)},lL.prototype.afterItem=function(e){return","===e?(null!==this.word&&this.currentObject.push(this.word),this.word=null,void(this.state=rL)):"]"===e?(this.level--,null!==this.word&&(this.currentObject.push(this.word),this.word=null),this.state=rL,this.currentObject=this.stack.pop(),void(this.currentObject||(this.state=-1))):void 0},lL.prototype.number=function(e){if(!sL.test(e)){if(aL.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},lL.prototype.quoted=function(e){'"'!==e?this.word+=e:this.state=5},lL.prototype.keyword=function(e){if(iL.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=rL)}if(!aL.test(e))throw new Error("havn't handled \""+e+'" in keyword yet, index '+this.place);this.afterItem(e)}},lL.prototype.neutral=function(e){if(oL.test(e))return this.word=e,void(this.state=2);if('"'===e)return this.word="",void(this.state=4);if(sL.test(e))return this.word=e,void(this.state=3);if(!aL.test(e))throw new Error("havn't handled \""+e+'" in neutral yet, index '+this.place);this.afterItem(e)},lL.prototype.output=function(){for(;this.place0?90:-90),e.lat_ts=e.lat1)}(o),o}function dL(e){var t=this;if(2===arguments.length){var r=arguments[1];"string"==typeof r?"+"===r.charAt(0)?dL[e]=eL(arguments[1]):dL[e]=yL(arguments[1]):dL[e]=r}else if(1===arguments.length){if(Array.isArray(e))return e.map(function(e){Array.isArray(e)?dL.apply(t,e):dL(e)});if("string"==typeof e){if(e in dL)return dL[e]}else"EPSG"in e?dL["EPSG:"+e.EPSG]=e:"ESRI"in e?dL["ESRI:"+e.ESRI]=e:"IAU2000"in e?dL["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"]}(dL);var bL=dL;var vL=["PROJECTEDCRS","PROJCRS","GEOGCS","GEOCCS","PROJCS","LOCAL_CS","GEODCRS","GEODETICCRS","GEODETICDATUM","ENGCRS","ENGINEERINGCRS"];var mL=["3857","900913","3785","102113"];var gL=function(e){if(!function(e){return"string"==typeof e}(e))return e;if(function(e){return e in bL}(e))return bL[e];if(function(e){return vL.some(function(t){return e.indexOf(t)>-1})}(e)){var t=yL(e);if(function(e){var t=$A(e,"authority");if(t){var r=$A(t,"epsg");return r&&mL.indexOf(r)>-1}}(t))return bL["EPSG:3857"];var r=function(e){var t=$A(e,"extension");if(t)return $A(t,"proj4")}(t);return r?eL(r):t}return function(e){return"+"===e[0]}(e)?eL(e):void 0};function wL(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}function OL(e,t,r){var n=e*t;return r/Math.sqrt(1-n*n)}function SL(e){return e<0?-1:1}function _L(e){return Math.abs(e)<=QA?e:e-SL(e)*YA}function PL(e,t,r){var n=e*r,o=.5*e;return n=Math.pow((1-n)/(1+n),o),Math.tan(.5*(GA-t))/n}function xL(e,t){for(var r,n,o=.5*e,i=GA-2*Math.atan(t),a=0;a<=15;a++)if(r=e*Math.sin(i),i+=n=GA-2*Math.atan(t*Math.pow((1-r)/(1+r),o))-i,Math.abs(n)<=1e-10)return i;return-9999}function CL(e){return e}var TL=[{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=OL(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*HA>90&&o*HA<-90&&n*HA>180&&n*HA<-180)return null;if(Math.abs(Math.abs(o)-GA)<=JA)return null;if(this.sphere)t=this.x0+this.a*this.k0*_L(n-this.long0),r=this.y0+this.a*this.k0*Math.log(Math.tan(WA+.5*o));else{var i=Math.sin(o),a=PL(this.e,o,i);t=this.x0+this.a*this.k0*_L(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=GA-2*Math.atan(Math.exp(-o/(this.a*this.k0)));else{var i=Math.exp(-o/(this.a*this.k0));if(-9999===(r=xL(this.e,i)))return null}return t=_L(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:CL,inverse:CL,names:["longlat","identity"]}],EL={},jL=[];function kL(e,t){var r=jL.length;return e.names?(jL[r]=e,e.names.forEach(function(e){EL[e.toLowerCase()]=r}),this):(console.log(t),!0)}var ML={start:function(){TL.forEach(kL)},add:kL,get:function(e){if(!e)return!1;var t=e.toLowerCase();return void 0!==EL[t]&&jL[EL[t]]?jL[EL[t]]:void 0}},RL={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."},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"}},AL=RL.WGS84={a:6378137,rf:298.257223563,ellipseName:"WGS 84"};RL.sphere={a:6370997,b:6370997,ellipseName:"Normal Sphere (r=6370997)"};var LL={};LL.wgs84={towgs84:"0,0,0",ellipse:"WGS84",datumName:"WGS84"},LL.ch1903={towgs84:"674.374,15.056,405.346",ellipse:"bessel",datumName:"swiss"},LL.ggrs87={towgs84:"-199.87,74.79,246.62",ellipse:"GRS80",datumName:"Greek_Geodetic_Reference_System_1987"},LL.nad83={towgs84:"0,0,0",ellipse:"GRS80",datumName:"North_American_Datum_1983"},LL.nad27={nadgrids:"@conus,@alaska,@ntv2_0.gsb,@ntv1_can.dat",ellipse:"clrk66",datumName:"North_American_Datum_1927"},LL.potsdam={towgs84:"598.1,73.7,418.2,0.202,0.045,-2.455,6.7",ellipse:"bessel",datumName:"Potsdam Rauenberg 1950 DHDN"},LL.carthage={towgs84:"-263.0,6.0,431.0",ellipse:"clark80",datumName:"Carthage 1934 Tunisia"},LL.hermannskogel={towgs84:"577.326,90.129,463.919,5.137,1.474,5.297,2.4232",ellipse:"bessel",datumName:"Hermannskogel"},LL.osni52={towgs84:"482.530,-130.596,564.557,-1.042,-0.214,-0.631,8.15",ellipse:"airy",datumName:"Irish National"},LL.ire65={towgs84:"482.530,-130.596,564.557,-1.042,-0.214,-0.631,8.15",ellipse:"mod_airy",datumName:"Ireland 1965"},LL.rassadiran={towgs84:"-133.63,-157.5,-158.62",ellipse:"intl",datumName:"Rassadiran"},LL.nzgd49={towgs84:"59.47,-5.04,187.44,0.47,-0.1,1.024,-4.5993",ellipse:"intl",datumName:"New Zealand Geodetic Datum 1949"},LL.osgb36={towgs84:"446.448,-125.157,542.060,0.1502,0.2470,0.8421,-20.4894",ellipse:"airy",datumName:"Airy 1830"},LL.s_jtsk={towgs84:"589,76,480",ellipse:"bessel",datumName:"S-JTSK (Ferro)"},LL.beduaram={towgs84:"-106,-87,188",ellipse:"clrk80",datumName:"Beduaram"},LL.gunung_segara={towgs84:"-403,684,41",ellipse:"bessel",datumName:"Gunung Segara Jakarta"},LL.rnb72={towgs84:"106.869,-52.2978,103.724,-0.33657,0.456955,-1.84218,1",ellipse:"intl",datumName:"Reseau National Belge 1972"};var NL=function(e,t,r,n,o,i,a){var s={};return s.datum_type=void 0===e||"none"===e?NA:LA,t&&(s.datum_params=t.map(parseFloat),0===s.datum_params[0]&&0===s.datum_params[1]&&0===s.datum_params[2]||(s.datum_type=MA),s.datum_params.length>3&&(0===s.datum_params[3]&&0===s.datum_params[4]&&0===s.datum_params[5]&&0===s.datum_params[6]||(s.datum_type=RA,s.datum_params[3]*=BA,s.datum_params[4]*=BA,s.datum_params[5]*=BA,s.datum_params[6]=s.datum_params[6]/1e6+1))),a&&(s.datum_type=AA,s.grids=a),s.a=r,s.b=n,s.es=o,s.ep2=i,s},DL={};function IL(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:DL[e]||null,isNull:!1}}function FL(e){return e/3600*Math.PI/180}function BL(e,t,r){return String.fromCharCode.apply(null,new Uint8Array(e.buffer.slice(t,r)))}function GL(e){return e.map(function(e){return[FL(e.longitudeShift),FL(e.latitudeShift)]})}function UL(e,t,r){return{name:BL(e,t+8,t+16).trim(),parent:BL(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 zL(e,t,r,n){for(var o=t+176,i=[],a=0;a-1.001*GA)l=-GA;else if(l>GA&&l<1.001*GA)l=GA;else{if(l<-GA)return{x:-1/0,y:-1/0,z:e.z};if(l>GA)return{x:1/0,y:1/0,z:e.z}}return s>Math.PI&&(s-=2*Math.PI),o=Math.sin(l),a=Math.cos(l),i=o*o,{x:((n=r/Math.sqrt(1-t*i))+u)*a*Math.cos(s),y:(n+u)*a*Math.sin(s),z:(n*(1-t)+u)*o}}function WL(e,t,r,n){var o,i,a,s,l,u,c,f,p,h,y,d,b,v,m,g=e.x,w=e.y,O=e.z?e.z:0;if(o=Math.sqrt(g*g+w*w),i=Math.sqrt(g*g+w*w+O*O),o/r<1e-12){if(v=0,i/r<1e-12)return GA,m=-n,{x:e.x,y:e.y,z:e.z}}else v=Math.atan2(w,g);a=O/i,f=(s=o/i)*(1-t)*(l=1/Math.sqrt(1-t*(2-t)*s*s)),p=a*l,b=0;do{b++,u=t*(c=r/Math.sqrt(1-t*p*p))/(c+(m=o*f+O*p-c*(1-t*p*p))),d=(y=a*(l=1/Math.sqrt(1-u*(2-u)*s*s)))*f-(h=s*(1-u)*l)*p,f=h,p=y}while(d*d>1e-24&&b<30);return{x:v,y:Math.atan(y/Math.abs(h)),z:m}}function YL(e){return e===MA||e===RA}function QL(e,t,r){if(function(e,t){return e.datum_type===t.datum_type&&!(e.a!==t.a||Math.abs(e.es-t.es)>5e-11)&&(e.datum_type===MA?e.datum_params[0]===t.datum_params[0]&&e.datum_params[1]===t.datum_params[1]&&e.datum_params[2]===t.datum_params[2]:e.datum_type!==RA||e.datum_params[0]===t.datum_params[0]&&e.datum_params[1]===t.datum_params[1]&&e.datum_params[2]===t.datum_params[2]&&e.datum_params[3]===t.datum_params[3]&&e.datum_params[4]===t.datum_params[4]&&e.datum_params[5]===t.datum_params[5]&&e.datum_params[6]===t.datum_params[6])}(e,t))return r;if(e.datum_type===NA||t.datum_type===NA)return r;var n=e.a,o=e.es;if(e.datum_type===AA){if(0!==XL(e,!1,r))return;n=DA,o=FA}var i=t.a,a=t.b,s=t.es;if(t.datum_type===AA&&(i=DA,a=IA,s=FA),o===s&&n===i&&!YL(e.datum_type)&&!YL(t.datum_type))return r;if((r=HL(r,o,n),YL(e.datum_type)&&(r=function(e,t,r){if(t===MA)return{x:e.x+r[0],y:e.y+r[1],z:e.z+r[2]};if(t===RA){var n=r[0],o=r[1],i=r[2],a=r[3],s=r[4],l=r[5],u=r[6];return{x:u*(e.x-l*e.y+s*e.z)+n,y:u*(l*e.x+e.y-a*e.z)+o,z:u*(-s*e.x+a*e.y+e.z)+i}}}(r,e.datum_type,e.datum_params)),YL(t.datum_type)&&(r=function(e,t,r){if(t===MA)return{x:e.x-r[0],y:e.y-r[1],z:e.z-r[2]};if(t===RA){var n=r[0],o=r[1],i=r[2],a=r[3],s=r[4],l=r[5],u=r[6],c=(e.x-n)/u,f=(e.y-o)/u,p=(e.z-i)/u;return{x:c+l*f-s*p,y:-l*c+f+a*p,z:s*c-a*f+p}}}(r,t.datum_type,t.datum_params)),r=WL(r,s,i,a),t.datum_type===AA)&&0!==XL(t,!0,r))return;return r}function XL(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||h1e-12&&Math.abs(a.y)>1e-12);if(l<0)return console.log("Inverse grid shift iterator failed to converge."),n;n.x=_L(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 KL(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}function $L(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}function eN(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}function tN(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 rN(e,t,r,n){var o;if(Array.isArray(r)&&(r=eN(r)),function(e){tN(e.x),tN(e.y)}(r),e.datum&&t.datum&&function(e,t){return(e.datum.datum_type===MA||e.datum.datum_type===RA)&&"WGS84"!==t.datumCode||(t.datum.datum_type===MA||t.datum.datum_type===RA)&&"WGS84"!==e.datumCode}(e,t)&&(r=rN(e,o=new qL("WGS84"),r,n),e=o),n&&"enu"!==e.axis&&(r=$L(e,!1,r)),"longlat"===e.projName)r={x:r.x*qA,y:r.y*qA,z:r.z||0};else if(e.to_meter&&(r={x:r.x*e.to_meter,y:r.y*e.to_meter,z:r.z||0}),!(r=e.inverse(r)))return;if(e.from_greenwich&&(r.x+=e.from_greenwich),r=QL(e.datum,t.datum,r))return t.from_greenwich&&(r={x:r.x-t.from_greenwich,y:r.y,z:r.z||0}),"longlat"===t.projName?r={x:r.x*HA,y:r.y*HA,z:r.z||0}:(r=t.forward(r),t.to_meter&&(r={x:r.x/t.to_meter,y:r.y/t.to_meter,z:r.z||0})),n&&"enu"!==t.axis?$L(t,!0,r):r}var nN=qL("WGS84");function oN(e,t,r,n){var o,i,a;return Array.isArray(r)?(o=rN(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=rN(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 iN(e){return e instanceof qL?e:e.oProj?e.oProj:qL(e)}var aN=function(e,t,r){e=iN(e);var n,o=!1;return void 0===t?(t=e,e=nN,o=!0):(void 0!==t.x||Array.isArray(t))&&(r=t,t=e,e=nN,o=!0),t=iN(t),r?oN(e,t,r):(n={forward:function(r,n){return oN(e,t,r,n)},inverse:function(r,n){return oN(t,e,r,n)}},o&&(n.oProj=t),n)},sN=6,lN="AJSAJS",uN="AFAFAF",cN=65,fN=73,pN=79,hN=86,yN=90,dN={forward:bN,inverse:function(e){var t=wN(SN(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:vN};function bN(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=ON(d),v=Math.floor(h/1e5),m=Math.floor(y/1e5)%20,o=v,i=m,a=b,s=a-1,l=lN.charCodeAt(s),u=uN.charCodeAt(s),c=l+o-1,f=u+i,p=!1,c>yN&&(c=c-yN+cN-1,p=!0),(c===fN||lfN||(c>fN||lpN||(c>pN||lyN&&(c=c-yN+cN-1),f>hN?(f=f-hN+cN-1,p=!0):p=!1,(f===fN||ufN||(f>fN||upN||(f>pN||uhN&&(f=f-hN+cN-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=mN(l),p=mN(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=mN(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 vN(e){var t=wN(SN(e.toUpperCase()));return t.lat&&t.lon?[t.lon,t.lat]:[(t.left+t.right)/2,(t.top+t.bottom)/2]}function mN(e){return e*(Math.PI/180)}function gN(e){return e/Math.PI*180}function wN(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=gN(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+gN(g),e.accuracy){var w=wN({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 ON(e){var t=e%sN;return 0===t&&(t=sN),t}function SN(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=ON(a),u=function(e,t){var r=lN.charCodeAt(t-1),n=1e5,o=!1;for(;r!==e.charCodeAt(0);){if(++r===fN&&r++,r===pN&&r++,r>yN){if(o)throw"Bad character: "+e;r=cN,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=uN.charCodeAt(t-1),n=0,o=!1;for(;r!==e.charCodeAt(0);){if(++r===fN&&r++,r===pN&&r++,r>hN){if(o)throw"Bad character: "+e;r=cN,o=!0}n+=1e5}return n}(n.charAt(1),l);c<_N(s);)c+=2e6;var f=r-i;if(f%2!=0)throw"MGRSPoint has to have an even number \nof digits after the zone letter and two 100km letters - front \nhalf for easting meters, second half for \nnorthing meters"+e;var p,h,y,d=f/2,b=0,v=0;return d>0&&(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 _N(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 PN(e){"@babel/helpers - typeof";return(PN="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 xN(e,t,r){if(!(this instanceof xN))return new xN(e,t,r);if(Array.isArray(e))this.x=e[0],this.y=e[1],this.z=e[2]||0;else if("object"===PN(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")}xN.fromMGRS=function(e){return new xN(vN(e))},xN.prototype.toMGRS=function(e){return bN([this.x,this.y],e)};var CN=xN,TN=1,EN=.25,jN=.046875,kN=.01953125,MN=.01068115234375,RN=.75,AN=.46875,LN=.013020833333333334,NN=.007120768229166667,DN=.3645833333333333,IN=.005696614583333333,FN=.3076171875;function BN(e){var t=[];t[0]=TN-e*(EN+e*(jN+e*(kN+e*MN))),t[1]=e*(RN-e*(jN+e*(kN+e*MN)));var r=e*e;return t[2]=r*(AN-e*(LN+e*NN)),r*=e,t[3]=r*(DN-e*IN),t[4]=r*e*FN,t}function GN(e,t,r,n){return r*=t,t*=t,n[0]*e-r*(n[1]+t*(n[2]+t*(n[3]+t*n[4])))}var UN=20;function zN(e,t,r){for(var n=1/(1-t),o=e,i=UN;i;--i){var a=Math.sin(o),s=1-t*a*a;if(o-=s=(GN(o,a,Math.cos(o),r)-e)*(s*Math.sqrt(s))*n,Math.abs(s)JA?Math.tan(i):0,y=Math.pow(h,2),d=Math.pow(y,2);t=1-this.es*Math.pow(s,2),u/=Math.sqrt(t);var b=GN(i,s,l,this.en);r=this.a*(this.k0*u*(1+c/6*(1-y+f+c/20*(5-18*y+d+14*f-58*y*f+c/42*(61+179*d-d*y-479*y)))))+this.x0,n=this.a*(this.k0*(b-this.ml0+s*a*u/2*(1+c/12*(5-y+9*f+4*p+c/30*(61+d-58*y+270*f-330*y*f+c/56*(1385+543*d-d*y-3111*y))))))+this.y0}else{var v=l*Math.sin(a);if(Math.abs(Math.abs(v)-1)=1){if(v-1>JA)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(r=zN(t=this.ml0+a/this.k0,this.es,this.en),Math.abs(r)JA?Math.tan(r):0,c=this.ep2*Math.pow(l,2),f=Math.pow(c,2),p=Math.pow(u,2),h=Math.pow(p,2);t=1-this.es*Math.pow(s,2);var y=i*Math.sqrt(t)/this.k0,d=Math.pow(y,2);n=r-(t*=u)*d/(1-this.es)*.5*(1-d/12*(5+3*p-9*c*p+c-4*f-d/30*(61+90*p-252*c*p+45*h+46*c-d/56*(1385+3633*p+4095*h+1574*h*p)))),o=_L(this.long0+y*(1-d/6*(1+2*p+c-d/20*(5+28*p+24*h+8*c*p+6*c-d/42*(61+662*p+1320*h+720*h*p))))/l)}else n=GA*SL(a),o=0;else{var b=Math.exp(i/this.k0),v=.5*(b-1/b),m=this.lat0+a/this.k0,g=Math.cos(m);t=Math.sqrt((1-Math.pow(g,2))/(1+Math.pow(v,2))),n=Math.asin(t),a<0&&(n=-n),o=0===v&&0===g?0:_L(Math.atan2(v,g)+this.long0)}return e.x=o,e.y=n,e},names:["Fast_Transverse_Mercator","Fast Transverse Mercator"]};function JN(e){var t=Math.exp(e);return t=(t-1/t)/2}function qN(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))}function HN(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/(qN(1,t)+1))),e<0?-t:t}function WN(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)}function YN(e,t,r){for(var n,o,i=Math.sin(t),a=Math.cos(t),s=JN(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 QN={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&&(VN.init.apply(this),this.forward=VN.forward,this.inverse=VN.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=WN(this.cbg,this.lat0);this.Zb=-this.Qn*(n+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}(this.gtu,2*n))},forward:function(e){var t=_L(e.x-this.long0),r=e.y;r=WN(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,qN(n,o*a)),t=HN(Math.tan(t));var s,l,u=YN(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=YN(this.utg,2*o,2*n);o+=i[0],n+=i[1],n=Math.atan(JN(n));var a=Math.sin(o),s=Math.cos(o),l=Math.sin(n),u=Math.cos(n);o=Math.atan2(a*u,qN(l,u*s)),t=_L((n=Math.atan2(l,u*s))+this.long0),r=WN(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"]};var XN={init:function(){var e=function(e,t){if(void 0===e){if((e=Math.floor(30*(_L(t)+Math.PI)/Math.PI)+1)<0)return 0;if(e>60)return 60}return 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)*qA,this.x0=5e5,this.y0=this.utmSouth?1e7:0,this.k0=.9996,QN.init.apply(this),this.forward=QN.forward,this.inverse=QN.inverse},names:["Universal Transverse Mercator System","utm"],dependsOn:"etmerc"};function ZN(e,t){return Math.pow((1-e)/(1+e),t)}var KN=20;var $N={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+WA)/(Math.pow(Math.tan(.5*this.lat0+WA),this.C)*ZN(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+WA),this.C)*ZN(this.e*Math.sin(r),this.ratexp))-GA,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+WA)/this.K,1/this.C),o=KN;o>0&&(r=2*Math.atan(n*ZN(this.e*Math.sin(e.y),-.5*this.e))-GA,!(Math.abs(r-e.y)<1e-14));--o)e.y=r;return o?(e.x=t,e.y=r,e):null},names:["gauss"]};var eD={init:function(){$N.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=_L(e.x-this.long0),$N.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,$N.inverse.apply(this,[e]),e.x=_L(e.x+this.long0),e},names:["Stereographic_North_Pole","Oblique_Stereographic","Polar_Stereographic","sterea","Oblique Stereographic Alternative","Double_Stereographic"]};var tD={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)<=JA&&(this.k0=.5*(1+SL(this.lat0)*Math.sin(this.lat_ts))):(Math.abs(this.coslat0)<=JA&&(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)<=JA&&(this.k0=.5*this.cons*OL(this.e,Math.sin(this.lat_ts),Math.cos(this.lat_ts))/PL(this.e,this.con*this.lat_ts,this.con*Math.sin(this.lat_ts))),this.ms1=OL(this.e,this.sinlat0,this.coslat0),this.X0=2*Math.atan(this.ssfn_(this.lat0,this.sinlat0,this.e))-GA,this.cosX0=Math.cos(this.X0),this.sinX0=Math.sin(this.X0))},forward:function(e){var t,r,n,o,i,a,s=e.x,l=e.y,u=Math.sin(l),c=Math.cos(l),f=_L(s-this.long0);return Math.abs(Math.abs(s-this.long0)-Math.PI)<=JA&&Math.abs(l+this.lat0)<=JA?(e.x=NaN,e.y=NaN,e):this.sphere?(t=2*this.k0/(1+this.sinlat0*u+this.coslat0*c*Math.cos(f)),e.x=this.a*t*c*Math.sin(f)+this.x0,e.y=this.a*t*(this.coslat0*u-this.sinlat0*c*Math.cos(f))+this.y0,e):(r=2*Math.atan(this.ssfn_(l,u,this.e))-GA,o=Math.cos(r),n=Math.sin(r),Math.abs(this.coslat0)<=JA?(i=PL(this.e,l*this.con,this.con*u),a=2*this.a*this.k0*i/this.cons,e.x=this.x0+a*Math.sin(s-this.long0),e.y=this.y0-this.con*a*Math.cos(s-this.long0),e):(Math.abs(this.sinlat0)0?_L(this.long0+Math.atan2(e.x,-1*e.y)):_L(this.long0+Math.atan2(e.x,e.y)):_L(this.long0+Math.atan2(e.x*Math.sin(s),a*this.coslat0*Math.cos(s)-e.y*this.sinlat0*Math.sin(s))),e.x=t,e.y=r,e)}if(Math.abs(this.coslat0)<=JA){if(a<=JA)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*xL(this.e,n),t=this.con*_L(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<=JA?i=this.X0:(i=Math.asin(Math.cos(o)*this.sinX0+e.y*Math.sin(o)*this.cosX0/a),t=_L(this.long0+Math.atan2(e.x*Math.sin(o),a*this.cosX0*Math.cos(o)-e.y*this.sinX0*Math.sin(o)))),r=-1*xL(this.e,Math.tan(.5*(GA+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*(GA+e))*Math.pow((1-t)/(1+t),.5*r)}};var rD={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"]};function nD(e){"@babel/helpers - typeof";return(nD="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)}var oD=1e-7;var iD={init:function(){var e,t,r,n,o,i,a,s,l,u,c,f,p,h=0,y=0,d=0,b=0,v=0,m=0,g=0;this.no_off=(p="object"===nD((f=this).PROJECTION)?Object.keys(f.PROJECTION)[0]:f.PROJECTION,"no_uoff"in f||"no_off"in f||-1!==["Hotine_Oblique_Mercator","Hotine_Oblique_Mercator_Azimuth_Natural_Origin"].indexOf(p)),this.no_rot="no_rot"in this;var w=!1;"alpha"in this&&(w=!0);var O=!1;if("rectified_grid_angle"in this&&(O=!0),w&&(g=this.alpha),O&&(h=this.rectified_grid_angle*qA),w||O)y=this.longc;else if(d=this.long1,v=this.lat1,b=this.long2,m=this.lat2,Math.abs(v-m)<=oD||(e=Math.abs(v))<=oD||Math.abs(e-GA)<=oD||Math.abs(Math.abs(this.lat0)-GA)<=oD||Math.abs(Math.abs(m)-GA)<=oD)throw new Error;var S=1-this.es;t=Math.sqrt(S),Math.abs(this.lat0)>JA?(s=Math.sin(this.lat0),r=Math.cos(this.lat0),e=1-this.es*s*s,this.B=r*r,this.B=Math.sqrt(1+this.es*this.B*this.B/S),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(PL(this.e,this.lat0,s),this.B)):(this.B=1/t,this.A=this.k0,this.E=n=o=1),w||O?(w?(c=Math.asin(Math.sin(g)/n),O||(h=g)):(c=h,g=Math.asin(n*Math.sin(c))),this.lam0=y-Math.asin(.5*(o-1/o)*Math.tan(c))/this.B):(i=Math.pow(PL(this.e,v,Math.sin(v)),this.B),a=Math.pow(PL(this.e,m,Math.sin(m)),this.B),o=this.E/i,l=(a-i)/(a+i),u=((u=this.E*this.E)-a*i)/(u+a*i),(e=d-b)<-Math.pi?b-=YA:e>Math.pi&&(b+=YA),this.lam0=_L(.5*(d+b)-Math.atan(u*Math.tan(.5*this.B*(d-b))/l)/this.B),c=Math.atan(2*Math.sin(this.B*_L(d-this.lam0))/(o-1/o)),h=g=Math.asin(n*Math.sin(c))),this.singam=Math.sin(c),this.cosgam=Math.cos(c),this.sinrot=Math.sin(h),this.cosrot=Math.cos(h),this.rB=1/this.B,this.ArB=this.A*this.rB,this.BrA=1/this.ArB,this.A,this.B,this.no_off?this.u_0=0:(this.u_0=Math.abs(this.ArB*Math.atan(Math.sqrt(n*n-1)/Math.cos(g))),this.lat0<0&&(this.u_0=-this.u_0)),o=.5*c,this.v_pole_n=this.ArB*Math.log(Math.tan(WA-o)),this.v_pole_s=this.ArB*Math.log(Math.tan(WA+o))},forward:function(e){var t,r,n,o,i,a,s,l,u={};if(e.x=e.x-this.lam0,Math.abs(Math.abs(e.y)-GA)>JA){if(t=.5*((i=this.E/Math.pow(PL(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,s=this.ArB*e.y;return this.no_rot?(u.x=s,u.y=l):(s-=this.u_0,u.x=l*this.cosrot+s*this.sinrot,u.y=s*this.cosrot-l*this.sinrot),u.x=this.a*u.x+this.x0,u.y=this.a*u.y+this.y0,u},inverse:function(e){var t,r,n,o,i,a,s,l={};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),s=((a=Math.sin(this.BrA*t))*this.cosgam+o*this.singam)/i,Math.abs(Math.abs(s)-1)JA?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)<=JA&&(r=SL(r)*(GA-2*JA));var n,o,i=Math.abs(Math.abs(r)-GA);if(i>JA)n=PL(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*_L(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,s=this.rh-(e.y-this.y0)/this.k0;this.ns>0?(t=Math.sqrt(a*a+s*s),r=1):(t=-Math.sqrt(a*a+s*s),r=-1);var l=0;if(0!==t&&(l=Math.atan2(r*a,r*s)),0!==t||this.ns>0){if(r=1/this.ns,n=Math.pow(t/(this.a*this.f0),r),-9999===(o=xL(this.e,n)))return null}else o=-GA;return i=_L(l/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 sD={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=_L(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"]};function lD(e,t,r,n,o){return e*o-t*Math.sin(2*o)+r*Math.sin(4*o)-n*Math.sin(6*o)}function uD(e){return 1-.25*e*(1+e/16*(3+1.25*e))}function cD(e){return.375*e*(1+.25*e*(1+.46875*e))}function fD(e){return.05859375*e*e*(1+.75*e)}function pD(e){return e*e*e*(35/3072)}function hD(e,t,r){var n=t*r;return e/Math.sqrt(1-n*n)}function yD(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 mD=.3333333333333333,gD=.17222222222222222,wD=.10257936507936508,OD=.06388888888888888,SD=.0664021164021164,_D=.016415012942191543;var PD={init:function(){var e,t=Math.abs(this.lat0);if(Math.abs(t-GA)0)switch(this.qp=vD(this.e,1),this.mmf=.5/(1-this.es),this.apa=function(e){var t,r=[];return r[0]=e*mD,t=e*e,r[0]+=t*gD,r[1]=t*OD,t*=e,r[0]+=t*wD,r[1]+=t*SD,r[2]=t*_D,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=vD(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,s,l,u,c,f=e.x,p=e.y;if(f=_L(f-this.long0),this.sphere){if(i=Math.sin(p),c=Math.cos(p),n=Math.cos(f),this.mode===this.OBLIQ||this.mode===this.EQUIT){if((r=this.mode===this.EQUIT?1+c*n:1+this.sinph0*i+this.cosph0*c*n)<=JA)return null;t=(r=Math.sqrt(2/r))*c*Math.sin(f),r*=this.mode===this.EQUIT?i:this.cosph0*i-this.sinph0*c*n}else if(this.mode===this.N_POLE||this.mode===this.S_POLE){if(this.mode===this.N_POLE&&(n=-n),Math.abs(p+this.lat0)=0?(t=(u=Math.sqrt(a))*o,r=n*(this.mode===this.S_POLE?u:-u)):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,s,l,u,c,f=e.x/this.a,p=e.y/this.a;if(this.sphere){var h,y=0,d=0;if((r=.5*(h=Math.sqrt(f*f+p*p)))>1)return null;switch(r=2*Math.asin(r),this.mode!==this.OBLIQ&&this.mode!==this.EQUIT||(d=Math.sin(r),y=Math.cos(r)),this.mode){case this.EQUIT:r=Math.abs(h)<=JA?0:Math.asin(p*d/h),f*=d,p=y*h;break;case this.OBLIQ:r=Math.abs(h)<=JA?this.lat0:Math.asin(y*this.sinph0+p*d*this.cosph0/h),f*=d*this.cosph0,p=(y-Math.sin(r)*this.sinph0)*h;break;case this.N_POLE:p=-p,r=GA-r;break;case this.S_POLE:r-=GA}t=0!==p||this.mode!==this.EQUIT&&this.mode!==this.OBLIQ?Math.atan2(f,p):0}else{if(s=0,this.mode===this.OBLIQ||this.mode===this.EQUIT){if(f/=this.dd,p*=this.dd,(a=Math.sqrt(f*f+p*p))1&&(e=e>1?1:-1),Math.asin(e)}var CD={init:function(){Math.abs(this.lat1+this.lat2)JA?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=vD(this.e3,this.sin_phi,this.cos_phi),o=this.a*Math.sqrt(this.c-this.ns0*n)/this.ns0,i=this.ns0*_L(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=_L(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=xD(.5*t);if(e0||Math.abs(i)<=JA?(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),a=xD((n=Math.cos(o))*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=_L(this.long0+i)):(a=this.phic0,i=0),e.x=i,e.y=a,e},names:["gnom"]};var ED={init:function(){this.sphere||(this.k0=OL(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=_L(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=vD(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=_L(this.long0+e.x/this.a/Math.cos(this.lat_ts)),r=Math.asin(e.y/this.a*Math.cos(this.lat_ts))):(r=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*GA:GA;for(var n,o,i,a,s=Math.asin(.5*t),l=0;l<30;l++)if(o=Math.sin(s),i=Math.cos(s),a=e*o,s+=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 s;return NaN}(this.e,2*e.y*this.k0/this.a),t=_L(this.long0+e.x/(this.a*this.k0))),e.x=t,e.y=r,e},names:["cea"]};var jD={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=_L(t-this.long0),o=yD(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=_L(this.long0+(t-this.x0)/(this.a*this.rc)),e.y=yD(this.lat0+(r-this.y0)/this.a),e},names:["Equirectangular","Equidistant_Cylindrical","eqc"]},kD=20;var MD={init:function(){this.temp=this.b/this.a,this.es=1-Math.pow(this.temp,2),this.e=Math.sqrt(this.es),this.e0=uD(this.es),this.e1=cD(this.es),this.e2=fD(this.es),this.e3=pD(this.es),this.ml0=this.a*lD(this.e0,this.e1,this.e2,this.e3,this.lat0)},forward:function(e){var t,r,n,o=e.x,i=e.y,a=_L(o-this.long0);if(n=a*Math.sin(i),this.sphere)Math.abs(i)<=JA?(t=this.a*a,r=-1*this.a*this.lat0):(t=this.a*Math.sin(n)/Math.tan(i),r=this.a*(yD(i-this.lat0)+(1-Math.cos(n))/Math.tan(i)));else if(Math.abs(i)<=JA)t=this.a*a,r=-1*this.ml0;else{var s=hD(this.a,this.e,Math.sin(i))/Math.tan(i);t=s*Math.sin(n),r=this.a*lD(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)<=JA)t=_L(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=kD;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)<=JA){r=l;break}t=_L(this.long0+Math.asin(n*Math.tan(l)/this.a)/Math.sin(r))}else if(Math.abs(o+this.ml0)<=JA)r=0,t=_L(this.long0+n/this.a);else{var f,p,h,y,d;for(a=(this.ml0+o)/this.a,s=n*n/this.a/this.a+a*a,l=a,i=kD;i;--i)if(d=this.e*Math.sin(l),f=Math.sqrt(1-d*d)*Math.tan(l),p=this.a*lD(this.e0,this.e1,this.e2,this.e3,l),h=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*(f*(y=p/this.a)+1)-y-.5*f*(y*y+s))/(this.es*Math.sin(2*l)*(y*y+s-2*a*y)/(4*f)+(a-y)*(f*h-2/Math.sin(2*l))-h),Math.abs(u)<=JA){r=l;break}f=Math.sqrt(1-this.es*Math.pow(Math.sin(r),2))*Math.tan(r),t=_L(this.long0+Math.asin(n*f/this.a)/Math.sin(r))}return e.x=t,e.y=r,e},names:["Polyconic","poly"]};var RD={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,i=n/BA*1e-5,a=o,s=1,l=0;for(t=1;t<=10;t++)s*=i,l+=this.A[t]*s;var u,c=l,f=a,p=1,h=0,y=0,d=0;for(t=1;t<=6;t++)u=h*c+p*f,p=p*c-h*f,h=u,y=y+this.B_re[t]*p-this.B_im[t]*h,d=d+this.B_im[t]*p+this.B_re[t]*h;return e.x=d*this.a+this.x0,e.y=y*this.a+this.y0,e},inverse:function(e){var t,r,n=e.x,o=e.y,i=n-this.x0,a=(o-this.y0)/this.a,s=i/this.a,l=1,u=0,c=0,f=0;for(t=1;t<=6;t++)r=u*a+l*s,l=l*a-u*s,u=r,c=c+this.C_re[t]*l-this.C_im[t]*u,f=f+this.C_im[t]*l+this.C_re[t]*u;for(var p=0;p.999999999999&&(r=.999999999999),t=Math.asin(r);var n=_L(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 ID={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;return 0!==r&&(i=Math.atan2(t*e.x,t*e.y)),this.sphere?(o=_L(this.long0+i/this.ns),n=yD(this.g-r/this.a),e.x=o,e.y=n,e):(n=dD(this.g-r/this.a,this.e0,this.e1,this.e2,this.e3),o=_L(this.long0+i/this.ns),e.x=o,e.y=n,e)},names:["Equidistant_Conic","eqdc"]};var FD={init:function(){this.R=this.a},forward:function(e){var t,r,n=e.x,o=e.y,i=_L(n-this.long0);Math.abs(o)<=JA&&(t=this.x0+this.R*i,r=this.y0);var a=xD(2*Math.abs(o/Math.PI));(Math.abs(i)<=JA||Math.abs(Math.abs(o)-GA)<=JA)&&(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 s=.5*Math.abs(Math.PI/i-i/Math.PI),l=s*s,u=Math.sin(a),c=Math.cos(a),f=c/(u+c-1),p=f*f,h=f*(2/u-1),y=h*h,d=Math.PI*this.R*(s*(f-y)+Math.sqrt(l*(f-y)*(f-y)-(y+l)*(p-y)))/(y+l);i<0&&(d=-d),t=this.x0+d;var b=l+f;return d=Math.PI*this.R*(h*b-s*Math.sqrt((y+l)*(l+1)-b*b))/(y+l),r=o>=0?this.y0+d:this.y0-d,e.x=t,e.y=r,e},inverse:function(e){var t,r,n,o,i,a,s,l,u,c,f,p;return e.x-=this.x0,e.y-=this.y0,f=Math.PI*this.R,i=(n=e.x/f)*n+(o=e.y/f)*o,f=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(f)>1&&(f=f>=0?1:-1),p=Math.acos(f)/3,r=e.y>=0?(-c*Math.cos(p+Math.PI/3)-s/3/l)*Math.PI:-(-c*Math.cos(p+Math.PI/3)-s/3/l)*Math.PI,t=Math.abs(n)2*GA*this.a)return;return r=t/this.a,n=Math.sin(r),o=Math.cos(r),i=this.long0,Math.abs(t)<=JA?a=this.lat0:(a=xD(o*this.sin_p12+e.y*n*this.cos_p12/t),s=Math.abs(this.lat0)-GA,i=Math.abs(s)<=JA?this.lat0>=0?_L(this.long0+Math.atan2(e.x,-e.y)):_L(this.long0-Math.atan2(-e.x,e.y)):_L(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 l=uD(this.es),u=cD(this.es),c=fD(this.es),f=pD(this.es),Math.abs(this.sin_p12-1)<=JA?(a=dD(((p=this.a*lD(l,u,c,f,GA))-(t=Math.sqrt(e.x*e.x+e.y*e.y)))/this.a,l,u,c,f),i=_L(this.long0+Math.atan2(e.x,-1*e.y)),e.x=i,e.y=a,e):Math.abs(this.sin_p12+1)<=JA?(p=this.a*lD(l,u,c,f,GA),a=dD(((t=Math.sqrt(e.x*e.x+e.y*e.y))-p)/this.a,l,u,c,f),i=_L(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),d=Math.atan2(e.x,e.y),h=hD(this.a,this.e,this.sin_p12),b=Math.cos(d),m=-(v=this.e*this.cos_p12*b)*v/(1-this.es),g=3*this.es*(1-m)*this.sin_p12*this.cos_p12*b/(1-this.es),S=1-m*(O=(w=t/h)-m*(1+m)*Math.pow(w,3)/6-g*(1+3*m)*Math.pow(w,4)/24)*O/2-w*O*O*O/6,y=Math.asin(this.sin_p12*Math.cos(O)+this.cos_p12*Math.sin(O)*b),i=_L(this.long0+Math.asin(Math.sin(d)*Math.sin(O)/Math.cos(y))),_=Math.sin(y),a=Math.atan2((_-this.es*S*this.sin_p12)*Math.tan(y),_*(1-this.es)),e.x=i,e.y=a,e)},names:["Azimuthal_Equidistant","aeqd"]};var GD={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=_L(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)<=JA)&&(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,s;return e.x-=this.x0,e.y-=this.y0,r=xD((t=Math.sqrt(e.x*e.x+e.y*e.y))/this.a),n=Math.sin(r),o=Math.cos(r),a=this.long0,Math.abs(t)<=JA?(s=this.lat0,e.x=a,e.y=s,e):(s=xD(o*this.sin_p14+e.y*n*this.cos_p14/t),i=Math.abs(this.lat0)-GA,Math.abs(i)<=JA?(a=this.lat0>=0?_L(this.long0+Math.atan2(e.x,-e.y)):_L(this.long0-Math.atan2(-e.x,e.y)),e.x=a,e.y=s,e):(a=_L(this.long0+Math.atan2(e.x*n,t*this.cos_p14*o-e.y*this.sin_p14*n)),e.x=a,e.y=s,e))},names:["ortho"]},UD={FRONT:1,RIGHT:2,BACK:3,LEFT:4,TOP:5,BOTTOM:6},zD={AREA_0:1,AREA_1:2,AREA_2:3,AREA_3:4};function VD(e,t,r,n){var o;return eWA&&o<=GA+WA?(n.value=zD.AREA_1,o-=GA):o>GA+WA||o<=-(GA+WA)?(n.value=zD.AREA_2,o=o>=0?o-QA:o+QA):(n.value=zD.AREA_3,o+=GA)),o}function JD(e,t){var r=e+t;return r<-QA?r+=YA:r>+QA&&(r-=YA),r}var qD={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>=GA-WA/2?this.face=UD.TOP:this.lat0<=-(GA-WA/2)?this.face=UD.BOTTOM:Math.abs(this.long0)<=WA?this.face=UD.FRONT:Math.abs(this.long0)<=GA+WA?this.face=this.long0>0?UD.RIGHT:UD.LEFT:this.face=UD.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,s={x:0,y:0},l={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===UD.TOP)o=GA-t,r>=WA&&r<=GA+WA?(l.value=zD.AREA_0,n=r-GA):r>GA+WA||r<=-(GA+WA)?(l.value=zD.AREA_1,n=r>0?r-QA:r+QA):r>-(GA+WA)&&r<=-WA?(l.value=zD.AREA_2,n=r+GA):(l.value=zD.AREA_3,n=r);else if(this.face===UD.BOTTOM)o=GA+t,r>=WA&&r<=GA+WA?(l.value=zD.AREA_0,n=-r+GA):r=-WA?(l.value=zD.AREA_1,n=-r):r<-WA&&r>=-(GA+WA)?(l.value=zD.AREA_2,n=-r-GA):(l.value=zD.AREA_3,n=r>0?-r+QA:-r-QA);else{var u,c,f,p,h,y;this.face===UD.RIGHT?r=JD(r,+GA):this.face===UD.BACK?r=JD(r,+QA):this.face===UD.LEFT&&(r=JD(r,-GA)),p=Math.sin(t),h=Math.cos(t),y=Math.sin(r),u=h*Math.cos(r),c=h*y,f=p,this.face===UD.FRONT?n=VD(o=Math.acos(u),f,c,l):this.face===UD.RIGHT?n=VD(o=Math.acos(c),f,-u,l):this.face===UD.BACK?n=VD(o=Math.acos(-u),f,-c,l):this.face===UD.LEFT?n=VD(o=Math.acos(-c),f,u,l):(o=n=0,l.value=zD.AREA_0)}return a=Math.atan(12/QA*(n+Math.acos(Math.sin(n)*Math.cos(WA))-GA)),i=Math.sqrt((1-Math.cos(o))/(Math.cos(a)*Math.cos(a))/(1-Math.cos(Math.atan(1/Math.cos(n))))),l.value===zD.AREA_1?a+=GA:l.value===zD.AREA_2?a+=QA:l.value===zD.AREA_3&&(a+=1.5*QA),s.x=i*Math.cos(a),s.y=i*Math.sin(a),s.x=s.x*this.a+this.x0,s.y=s.y*this.a+this.y0,e.x=s.x,e.y=s.y,e},inverse:function(e){var t,r,n,o,i,a,s,l,u,c,f,p,h={lam:0,phi:0},y={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)?y.value=zD.AREA_0:e.y>=0&&e.y>=Math.abs(e.x)?(y.value=zD.AREA_1,t-=GA):e.x<0&&-e.x>=Math.abs(e.y)?(y.value=zD.AREA_2,t=t<0?t+QA:t-QA):(y.value=zD.AREA_3,t+=GA),u=QA/12*Math.tan(t),i=Math.sin(u)/(Math.cos(u)-1/Math.sqrt(2)),a=Math.atan(i),(s=1-(n=Math.cos(t))*n*(o=Math.tan(r))*o*(1-Math.cos(Math.atan(1/Math.cos(a)))))<-1?s=-1:s>1&&(s=1),this.face===UD.TOP)l=Math.acos(s),h.phi=GA-l,y.value===zD.AREA_0?h.lam=a+GA:y.value===zD.AREA_1?h.lam=a<0?a+QA:a-QA:y.value===zD.AREA_2?h.lam=a-GA:h.lam=a;else if(this.face===UD.BOTTOM)l=Math.acos(s),h.phi=l-GA,y.value===zD.AREA_0?h.lam=-a+GA:y.value===zD.AREA_1?h.lam=-a:y.value===zD.AREA_2?h.lam=-a-GA:h.lam=a<0?-a-QA:-a+QA;else{var d,b,v;u=(d=s)*d,b=(u+=(v=u>=1?0:Math.sqrt(1-u)*Math.sin(a))*v)>=1?0:Math.sqrt(1-u),y.value===zD.AREA_1?(u=b,b=-v,v=u):y.value===zD.AREA_2?(b=-b,v=-v):y.value===zD.AREA_3&&(u=b,b=v,v=-u),this.face===UD.RIGHT?(u=d,d=-b,b=u):this.face===UD.BACK?(d=-d,b=-b):this.face===UD.LEFT&&(u=d,d=b,b=-u),h.phi=Math.acos(-v)-GA,h.lam=Math.atan2(b,d),this.face===UD.RIGHT?h.lam=JD(h.lam,-GA):this.face===UD.BACK?h.lam=JD(h.lam,-QA):this.face===UD.LEFT&&(h.lam=JD(h.lam,+GA))}return 0!==this.es&&(c=h.phi<0?1:0,f=Math.tan(h.phi),p=this.b/Math.sqrt(f*f+this.one_minus_f_squared),h.phi=Math.atan(Math.sqrt(this.a*this.a-p*p)/(this.one_minus_f*p)),c&&(h.phi=-h.phi)),h.lam+=this.long0,e.x=h.lam,e.y=h.phi,e},names:["Quadrilateralized Spherical Cube","Quadrilateralized_Spherical_Cube","qsc"]},HD=[[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]],WD=[[-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]],YD=.8487,QD=1.3523,XD=HA/5,ZD=1/XD,KD=18,$D=function(e,t){return e[0]+t*(e[1]+t*(e[2]+t*e[3]))},eI=function(e,t){return e[1]+t*(2*e[2]+3*t*e[3])};var tI={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=_L(e.x-this.long0),r=Math.abs(e.y),n=Math.floor(r*XD);n<0?n=0:n>=KD&&(n=KD-1),r=HA*(r-ZD*n);var o={x:$D(HD[n],r)*t,y:$D(WD[n],r)};return e.y<0&&(o.y=-o.y),o.x=o.x*this.a*YD+this.x0,o.y=o.y*this.a*QD+this.y0,o},inverse:function(e){var t={x:(e.x-this.x0)/(this.a*YD),y:Math.abs(e.y-this.y0)/(this.a*QD)};if(t.y>=1)t.x/=HD[KD][0],t.y=e.y<0?-GA:GA;else{var r=Math.floor(t.y*KD);for(r<0?r=0:r>=KD&&(r=KD-1);;)if(WD[r][0]>t.y)--r;else{if(!(WD[r+1][0]<=t.y))break;++r}var n=WD[r],o=5*(t.y-n[0])/(WD[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/qN(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/qN(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/qN(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/qN(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/qN(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)*qN(1,s)):(a=Math.tan(e.x/this.radius_g_1),s=Math.tan(e.y/this.radius_g_1)*qN(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"]};aN.defaultDatum="WGS84",aN.Proj=qL,aN.WGS84=new aN.Proj("WGS84"),aN.Point=CN,aN.toPoint=eN,aN.defs=bL,aN.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:BL(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;othis.bounds.max.x?this.bounds.max.x:e.x,e.y=e.ythis.bounds.max.y?this.bounds.max.y:e.y);var r=this._proj.inverse([e.x,e.y]);return new(kA().LatLng)(r[1],r[0],t)},_projFromCodeDef:function(e,t){if(t)sI.defs(e,t);else if(void 0===sI.defs[e]){var r=e.split(":");if(r.length>3&&(e=r[r.length-3]+":"+r[r.length-1]),void 0===sI.defs[e])throw"No projection definition for code "+e}return sI(e)},getUnits:function(){return this._proj.oProj.units||"degrees"}});var lI=kA().Class.extend({includes:kA().CRS,options:{transformation:new(kA().Transformation)(1,0,-1,0)},initialize:function(e,t){var r,n,o;if(kA().Proj._isProj4Obj(e)?(r=(n=e).srsCode,t=t||{},this.projection=new(kA().Proj.Projection)(n,t.bounds,t.wrapLng)):(r=e,o=(t=t||{}).def||"",this.projection=new(kA().Proj.Projection)(r,o,t.bounds,t.wrapLng)),kA().Util.setOptions(this,t),this.options.wrapLng&&(this.wrapLng=this.options.wrapLng),this.code=r,this.transformation=this.options.transformation,this.options.dpi=this.options.dpi||96,this.options.bounds&&(this.options.bounds=kA().bounds(this.options.bounds)),!this.options.origin&&this.options.bounds&&(this.options.origin=[this.options.bounds.min.x,this.options.bounds.max.y]),this.options.origin&&(this.options.origin instanceof kA().Point&&(this.options.origin=[this.options.origin.x,this.options.origin.y]),this.transformation=new(kA().Transformation)(1,-this.options.origin[0],-1,this.options.origin[1])),this.options.scales&&this.options.scales.length>0)this.scales=this.options.scales,this._scales=this._toProj4Scales(this.options.scales,this.options.dpi);else if(this.options.scaleDenominators&&this.options.scaleDenominators.length>0){this.scales=[];for(var i=0;i0){this._scales=[];for(var a=this.options.resolutions.length-1;a>=0;a--)this.options.resolutions[a]&&(this._scales[a]=1/this.options.resolutions[a])}else this.options.bounds&&(this._scales=this._getDefaultProj4ScalesByBounds(this.options.bounds));this._rectify(),this.infinite=!this.options.bounds},_rectify:function(){if(this._scales&&(this.resolutions||(this.resolutions=[],this.resolutions=this._proj4ScalesToResolutions(this._scales)),!this.scales)){this.scales=[];for(var e=0;e© SuperMap iClient",Common:{attribution:"Map Data © SuperMap iServer"},Online:{attribution:"Map Data © SuperMap Online"},ECharts:{attribution:"© 2018 百度 ECharts"},MapV:{attribution:"© 2018 百度 MapV "},Turf:{attribution:"© turfjs"},Baidu:{attribution:"Map Data © 2018 Baidu - GS(2016)2089号 - Data © 长地万方"},Cloud:{attribution:"Map Data ©2014 SuperMap - GS(2014)6070号-data©Navinfo"},Tianditu:{attribution:"Map Data "}}; /* Copyright© 2000 - 2022 SuperMap Software Co.Ltd. All rights reserved. * This program are made available under the terms of the Apache License, Version 2.0 * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/ kA().Control.Attribution.include({options:{position:"bottomright",prefix:cI.Prefix}}),kA().Map.include({latLngToAccurateContainerPoint:function(e){var t=this.project(kA().latLng(e))._subtract(this.getPixelOrigin());return kA().point(t).add(this._getMapPanePos())}}),[kA().Polyline,kA().Polygon,kA().Marker,kA().CircleMarker,kA().Circle,kA().LayerGroup].map(function(e){return e.defaultFunction=e.prototype.toGeoJSON,e.include({toGeoJSON:function(t){return e.defaultFunction.call(this,t||10)}}),e}); /* Copyright© 2000 - 2022 SuperMap Software Co.Ltd. All rights reserved. * This program are made available under the terms of the Apache License, Version 2.0 * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/ var fI=kA().Evented.extend({options:{url:null,proxy:null,withCredentials:!1,crossOrigin:null},initialize:function(e,t){e&&(e=e.indexOf("/")!==e.length-1?e:e.substr(0,e.length-1)),this.url=e,kA().setOptions(this,t),this.fire("initialized",this)},destroy:function(){this.fire("destroy",this)}}),pI=fI.extend({options:{projection:null},initialize:function(e,t){t=t||{},kA().setOptions(this,t),t.projection&&(this.options.projection=t.projection),fI.prototype.initialize.call(this,e,t)},getMapInfo:function(e){var t=this;new dm(t.url,{proxy:t.options.proxy,withCredentials:t.options.withCredentials,crossOrigin:t.options.crossOrigin,headers:t.options.headers,eventListeners:{scope:t,processCompleted:e,processFailed:e},projection:t.options.projection}).processAsync()},getWkt:function(e){var t=this;new dm("".concat(t.url,"/prjCoordSys.wkt"),{proxy:t.options.proxy,withCredentials:t.options.withCredentials,withoutFormatSuffix:!0,crossOrigin:t.options.crossOrigin,headers:t.options.headers,eventListeners:{scope:t,processCompleted:e,processFailed:e},projection:t.options.projection}).processAsync()},getTilesets:function(e){var t=this;new T_(t.url,{proxy:t.options.proxy,withCredentials:t.options.withCredentials,crossOrigin:t.options.crossOrigin,headers:t.options.headers,eventListeners:{scope:t,processCompleted:e,processFailed:e}}).processAsync()}}),hI=kA().Control.extend({options:{layer:null,position:"topleft",title:"switch tile version",tooltip:"top",collapsed:!0,nextText:"+",lastText:"-",ico:"V",orientation:"horizontal",switch:!0},onAdd:function(){"vertical"!==this.options.orientation&&(this.options.orientation="horizontal");var e=this._initLayout();return this.options.layer&&this.setLayer(this.options.layer),e},setContent:function(e){var t=kA().Util.extend({},e);this.setVersionName(t.desc).setToolTip(t.desc)},setVersionName:function(e){var t=e;return e||(t=this.getValue()),this._sliderValue.innerHTML=t,this},setToolTip:function(e){return this.tooltip.innerHTML=e,this},updateLength:function(e){e>0&&(this.length=e,this.max=this.length-1,this.slider.setAttribute("max",this.max))},setLayer:function(e){e&&(this.options.layer=e);var t=this,r=t.options.layer;r.on("tilesetsinfoloaded",function(e){var r=e&&e.tileVersions;t.update(r)}),r.on("tileversionschanged",function(e){var r=e&&e.tileVersion;t.setContent(r)}),t.getTileSetsInfo()},update:function(e){this.tileVersions=e||[],this.updateLength(this.tileVersions.length)},getTileSetsInfo:function(){var e=this;e.options.layer&&new pI(e.options.layer._url).getTilesets(function(t){e.options.layer.setTileSetsInfo(t.result)})},removeLayer:function(){this.options.layer=null},nextTilesVersion: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)},lastTilesVersion:function(){return parseInt(this.slider.value)"+r+"",e}});kA().Map.mergeOptions({logoControl:!0}),kA().Map.addInitHook(function(){!this._logoAdded&&this.options.logoControl&&(!0===this.options.logoControl?this.logoControl=new yI:this.options.logoControl instanceof kA().Control&&(this.logoControl=this.options.logoControl),this.logoControl&&(this.addControl(this.logoControl),this._logoAdded=!0))});for(var dI,bI=function(e){return"[object Array]"==Object.prototype.toString.call(e)},vI={toSuperMapBounds:function(e){return e&&-1!==["FeatureCollection","Feature"].indexOf(e.type)&&(e=kA().geoJSON(e).getBounds()),e instanceof kA().LatLngBounds?new ve(e.getSouthWest().lng,e.getSouthWest().lat,e.getNorthEast().lng,e.getNorthEast().lat):e instanceof kA().Bounds?new ve(e.min.x,e.min.y,e.max.x,e.max.y):bI(e)?new ve(e[0],e[1],e[2],e[3]):new ve},isArray:bI,toProcessingParam:function(e){var t={};if(e.length<1)t="";else{for(var r=[],n=0;n-1?r:Math.log(e/(1/this.resolutions[0]))/Math.LN2},distance:function(e,t){var r=t.lng-e.lng,n=t.lat-e.lat;return Math.sqrt(r*r+n*n)},infinite:!1}),kI=function(e){return new jI(e)},MI=function(e){return e?(new Nr).toGeoJSON(e):e},RI=function(e){if(!e)return e;var t,r=new Nr;if(-1!=["FeatureCollection","Feature","Geometry"].indexOf(e.type))t=r.read(e,e.type);else if("function"==typeof e.toGeoJSON){var n=e.toGeoJSON();t=n?r.read(n,n.type):e}var o=t||e;return kA().Util.isArray(t)&&(1===t.length?o=t[0]:t.length>1&&(o=[],t.map(function(e){return o.push(e.geometry),e}))),o&&o.geometry?o.geometry:o},AI=JC,LI=function(e,t,r){var n=e*t*(1/.0254)*AI(r);return n=1/n},NI=function(e,t,r){var n=e*t*(1/.0254)*AI(r);return n=1/n},DI=function(e){return e>1?1/e:e},II=function(e,t,r,n){return n=n||6378137,r=r||"",e>0&&t>0?(e=DI(e),"degree"===r.toLowerCase()||"degrees"===r.toLowerCase()||"dd"===r.toLowerCase()?254/t/e/(2*Math.PI*n/360)/1e4:254/t/e/1e4):-1},FI=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:kA().CRS.EPSG4326,r=arguments.length>2?arguments[2]:void 0,n=null,o=null;if(-1===["FeatureCollection","Feature","Geometry"].indexOf(e.type))if(e.toGeoJSON)e=e.toGeoJSON();else if(e instanceof kA().LatLngBounds)e=kA().rectangle(e).toGeoJSON();else{if(!(e instanceof kA().Bounds))throw new Error("This tool only supports data conversion in geojson format or Vector Layers of Leaflet.");e=kA().rectangle([[e.getTopLeft().x,e.getTopLeft().y],[e.getBottomRight().x,e.getBottomRight().y]]).toGeoJSON()}var i={point:function(e){return o(e)},multipoint:function(e){return i.linestring.apply(this,[e])},linestring:function(e){for(var t=[],r=null,n=0,o=e.length;n(this._map.options.maxZoom||18)||e<(this._map.options.minZoom||0))this._currentImage&&(this._currentImage._map.removeLayer(this._currentImage),this._currentImage=null);else{var r=this._getImageParams();r?this._requestImage(r,t):this._currentImage&&(this._currentImage._map.removeLayer(this._currentImage),this._currentImage=null)}}},_calculateBounds:function(){var e=this._map.getPixelBounds(),t=this._map.unproject(e.getBottomLeft()),r=this._map.unproject(e.getTopRight()),n=this._map.options.crs.project(r),o=this._map.options.crs.project(t);return kA().bounds(n,o)},_compriseBounds:function(e){var t={leftBottom:{x:e.getBottomLeft().x,y:e.getTopRight().y},rightTop:{x:e.getTopRight().x,y:e.getBottomLeft().y}};return JSON.stringify(t)},_calculateImageSize:function(){var e=this._map,t=e.getPixelBounds(),r=e.getSize(),n=e.unproject(t.getBottomLeft()),o=e.unproject(t.getTopRight()),i=e.latLngToLayerPoint(o).y,a=e.latLngToLayerPoint(n).y;return(i>0||a-1?this._url.substring(0,this._url.indexOf("?")):this._url,i=n>-1?this._url.substring(this._url.indexOf("?")):"";o=kA().Util.template(o,{s:this._getSubdomain(e)});var a={service:"WMTS",request:"GetTile",version:this.options.version,style:this.options.style,tilematrixSet:this.options.tilematrixSet,format:this.options.format,width:this.options.tileSize,height:this.options.tileSize,layer:this.options.layer,tilematrix:r,tilerow:e.y,tilecol:e.x};if(this.options.tileProxy&&(o=this.options.tileProxy+o),"KVP"===this.options.requestEncoding)o+=kA().Util.getParamString(a,o);else if("REST"===this.options.requestEncoding){o+="/"+a.layer+"/"+a.style+"/"+a.tilematrixSet+"/"+a.tilematrix+"/"+a.tilerow+"/"+a.tilecol+this.formatSuffix}return o=fe.urlAppend(o,i),o=un.appendCredential(o)}}),qI=function(e,t){return new JI(e,t)},HI=JI.extend({layerLabelMap:{vec:"cva",ter:"cta",img:"cia"},layerZoomMap:{vec:18,ter:14,img:18},options:{layerType:"vec",isLabel:!1,attribution:cI.Tianditu.attribution,url:"https://t{s}.tianditu.gov.cn/{layer}_{proj}/wmts?",zoomOffset:1,key:"",dpi:96,style:"default",format:"tiles",subdomains:[0,1,2,3,4,5,6,7],bounds:[[-90,-180],[90,180]],noWrap:!0},initialize:function(e){e=e||{},kA().setOptions(this,e),this.options.layer=this.options.isLabel?this.layerLabelMap[this.options.layerType]:this.options.layerType,this.options.maxZoom=this.layerZoomMap[this.options.layerType]-1,JI.prototype.initialize.call(this,this.options.url,this.options),kA().stamp(this),this.options.key&&(this._url="".concat(this._url,"tk=").concat(this.options.key))},onAdd:function(e){this.options.tilematrixSet="EPSG:4326"===e.options.crs.code?"c":"w",this._url=this._url.replace("{layer}",this.options.layer).replace("{proj}",this.options.tilematrixSet),JI.prototype.onAdd.call(this,e)},_isValidTile:function(e){var t=this._map.options.crs;if(!t.infinite){var r=this._globalTileRange;if((!t.wrapLng||this.options.noWrap)&&(e.xr.max.x)||!t.wrapLat&&(e.yr.max.y))return!1}if(!this.options.bounds)return!0;var n=this._tileCoordsToBounds(e);return kA().latLngBounds(this.options.bounds).overlaps(n)}}),WI=kA().TileLayer.extend({options:{layersID:null,redirect:!1,transparent:!0,cacheEnabled:!0,clipRegionEnabled:!1,clipRegion:null,prjCoordSys:null,overlapDisplayed:!1,overlapDisplayedOptions:null,tileversion:null,crs:null,format:"png",tileProxy:null,attribution:cI.Common.attribution,subdomains:null},initialize:function(e,t){this._url=e,kA().TileLayer.prototype.initialize.apply(this,arguments),kA().setOptions(this,t),kA().stamp(this),this.tileSetsIndex=-1,this.tempIndex=-1},onAdd:function(e){this._crs=this.options.crs||e.options.crs,kA().TileLayer.prototype.onAdd.call(this,e)},getTileUrl:function(e){var t=this.getScaleFromCoords(e),r=this._getLayerUrl()+"&scale="+t+"&x="+e.x+"&y="+e.y;return this.options.tileProxy&&(r=this.options.tileProxy+encodeURIComponent(r)),this.options.cacheEnabled||(r+="&_t="+(new Date).getTime()),this.options.subdomains&&(r=kA().Util.template(r,{s:this._getSubdomain(e)})),r},getScale:function(e){var t=e||this._map.getZoom();return this.scales[t]},getScaleFromCoords:function(e){var t,r=this;return r.scales&&r.scales[e.z]?r.scales[e.z]:(r.scales=r.scales||{},t=r.getDefaultScale(e),r.scales[e.z]=t,t)},getDefaultScale:function(e){var t=this._crs;if(t.scales)return t.scales[e.z];var r=this._tileCoordsToBounds(e),n=t.project(r.getNorthEast()),o=t.project(r.getSouthWest()),i=this.options.tileSize,a=Math.max(Math.abs(n.x-o.x)/i,Math.abs(n.y-o.y)/i),s=l.METER;if(t.code){var u=t.code.split(":");if(u&&u.length>1){var c=parseInt(u[1]);s=c&&c>=4e3&&c<=5e3?l.DEGREE:l.METER}}return LI(a,96,s)},setTileSetsInfo:function(e){this.tileSets=e,kA().Util.isArray(this.tileSets)&&(this.tileSets=this.tileSets[0]),this.tileSets&&(this.fire("tilesetsinfoloaded",{tileVersions:this.tileSets.tileVersions}),this.changeTilesVersion())},lastTilesVersion:function(){this.tempIndex=this.tileSetsIndex-1,this.changeTilesVersion()},nextTilesVersion:function(){this.tempIndex=this.tileSetsIndex+1,this.changeTilesVersion()},changeTilesVersion: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.fire("tileversionschanged",{tileVersion:t[e.tempIndex]}))}}},updateCurrentTileSetsIndex:function(e){this.tempIndex=e},mergeTileVersionParam:function(e){return!!e&&(this.requestParams.tileversion=e,this._paramsChanged=!0,this.redraw(),this._paramsChanged=!1,!0)},_getLayerUrl:function(){return this._paramsChanged&&(this._layerUrl=this._createLayerUrl()),this._layerUrl||this._createLayerUrl()},_createLayerUrl:function(){var e=fe.urlPathAppend(this._url,"tileImage.".concat(this.options.format));return this.requestParams=this.requestParams||this._getAllRequestParams(),e=fe.urlAppend(e,jA.Util.getParamString(this.requestParams)),e=un.appendCredential(e),this._layerUrl=e,e},_getAllRequestParams:function(){var e=this.options||{},t={},r=this.options.tileSize;r instanceof kA().Point||(r=kA().point(r,r)),t.width=r.x,t.height=r.y,t.redirect=!0===e.redirect,t.transparent=!0===e.transparent,t.cacheEnabled=!(!1===e.cacheEnabled),e.prjCoordSys&&(t.prjCoordSys=JSON.stringify(e.prjCoordSys)),e.layersID&&(t.layersID=e.layersID.toString()),e.clipRegionEnabled&&e.clipRegion&&(e.clipRegion=Er.fromGeometry(RI(e.clipRegion)),t.clipRegionEnabled=e.clipRegionEnabled,t.clipRegion=JSON.stringify(e.clipRegion));var n=this._crs;if(n.options&&n.options.origin)t.origin=JSON.stringify({x:n.options.origin[0],y:n.options.origin[1]});else if(n.projection&&n.projection.bounds){var o=n.projection.bounds,i=kA().point(o.min.x,o.max.y);t.origin=JSON.stringify({x:i.x,y:i.y})}return!1===e.overlapDisplayed?(t.overlapDisplayed=!1,e.overlapDisplayedOptions&&(t.overlapDisplayedOptions=e.overlapDisplayedOptions)):t.overlapDisplayed=!0,!0===t.cacheEnabled&&e.tileversion&&(t.tileversion=e.tileversion.toString()),e.rasterfunction&&(t.rasterfunction=JSON.stringify(e.rasterfunction)),t}}),YI=function(e,t){return new WI(e,t)},QI=r(879),XI=r.n(QI),ZI={TEXT:{fontSize:"14px",fontFamily:"Arial Unicode MS Regular,Microsoft YaHei",textAlign:"left",color:"rgba(255,255,255,0)",fillColor:"rgba(80,80,80,1)",weight:1,globalAlpha:1},POINT:{fillColor:"#ffcc00",color:"#cc3333",weight:1,radius:3,opacity:1},LINE:{color:"rgba(0,0,0,0)",weight:1,lineCap:"butt",lineJoin:"round",dashOffset:0,dashArray:[],opacity:1},REGION:{color:"rgba(0,0,0,0)",fillColor:"rgba(0,0,0,0)",weight:1,lineCap:"butt",lineJoin:"round",dashOffset:0,opacity:1,fillOpacity:1,dashArray:[]}},KI={TEXT:{"text-size":"fontSize","text-face-name":"fontFamily","text-align":"textAlign","text-name":"textName","text-weight":"fontWeight","text-halo-color":"color","text-fill":"fillColor","text-comp-op":"globalCompositeOperation"},POINT:{"point-file":"iconUrl","point-fill":"fillColor","point-radius":"radius","point-halo-color":"color","point-comp-op":"globalCompositeOperation"},LINE:{"line-color":"color","line-width":"weight","line-cap":"lineCap","line-join":"lineJoin","line-dash-offset":"dashOffset","line-opacity":"opacity","line-dasharray":"dashArray","line-comp-op":"globalCompositeOperation"},REGION:{"line-color":"color","line-width":"weight","line-cap":"lineCap","line-join":"lineJoin","line-dash-offset":"dashOffset","line-opacity":"opacity","line-dasharray":"dashArray","polygon-fill":"fillColor","polygon-opacity":"fillOpacity","polygon-comp-op":"globalCompositeOperation"}},$I={lineWidth:{leafletStyle:"weight",type:"number",unit:"mm",defaultValue:.1},fillForeColor:{leafletStyle:"fillColor",type:"color",defaultValue:"rgba(0,0,0,0)"},foreColor:{leafletStyle:"color",type:"color",defaultValue:"rgba(0,0,0,0)"},markerSize:{leafletStyle:"markerSize",type:"number",unit:"mm",defaultValue:2.4},lineColor:{leafletStyle:"color",type:"color",defaultValue:"#000000"}},eF={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:""};function tF(e,t){for(var r=0;r-1;a--)if(e.indexOf(i[a])>-1){o=e.replace(i[a],r[i[a]]);break}o=o.replace(/[#]/gi,"#"),r[e]=n,t=t.replace(new RegExp(o,"g"),n)}),t=(t=t.replace(/[#]/gi,"\n#")).replace(/\[zoom/gi,"[scale")}}},{key:"pickShader",value:function(e){if(!this.cartoCSS)return null;var t=e.replace(/[@#\s]/gi,"___");return this.cartoCSS[t]}},{key:"getDefaultStyle",value:function(e){var t={},r=ZI[e];for(var n in r){var o=r[n];t[n]=o}return t}},{key:"getStyleFromiPortalMarker",value:function(e){return 0==e.indexOf("./")?null:(0==e.indexOf("http://support.supermap.com.cn:8092/static/portal")&&(e=e.replace("http://support.supermap.com.cn:8092/static/portal","http://support.supermap.com.cn:8092/apps/viewer/static")),kA().icon({iconUrl:e,iconSize:kA().point(48,43),iconAnchor:kA().point(24,43),popupAnchor:kA().point(0,-43)}))}},{key:"getStyleFromiPortalStyle",value:function(e,t,r){var n=r?JSON.parse(r):null,o={};if("Point"===t||"MultiPoint"===t){var i=n||e.pointStyle;return i.externalGraphic?0==i.externalGraphic.indexOf("./")?null:(0==i.externalGraphic.indexOf("http://support.supermap.com.cn:8092/static/portal")&&(i.externalGraphic=i.externalGraphic.replace("http://support.supermap.com.cn:8092/static/portal","http://support.supermap.com.cn:8092/apps/viewer/static")),kA().icon({iconUrl:i.externalGraphic,iconSize:kA().point(i.graphicWidth,i.graphicHeight),iconAnchor:kA().point(-i.graphicXOffset,-i.graphicYOffset),popupAnchor:kA().point(0,-i.graphicHeight)})):(o.radius=i.pointRadius,o.color=i.strokeColor,o.opacity=i.strokeOpacity,o.lineCap=i.strokeLineCap,o.weight=i.strokeWidth,o.fillColor=i.fillColor,o.fillOpacity=i.fillOpacity,o.dashArray=this.dashStyle(i,1),o)}if("LineString"===t||"MultiLineString"===t||"Box"===t){var a=n||e.lineStyle;return o.color=a.strokeColor,o.opacity=a.strokeOpacity,o.fillOpacity=a.fillOpacity,o.lineCap=a.strokeLineCap,o.weight=a.strokeWidth,o.dashArray=this.dashStyle(a,1),o}if("Polygon"===t||"MultiPolygon"===t){var s=n||e.polygonStyle;return o.color=s.strokeColor,o.opacity=s.strokeOpacity,o.lineCap=s.strokeLineCap,o.weight=s.strokeWidth,o.fillColor=s.fillColor,o.fillOpacity=s.fillOpacity,o.dashArray=this.dashStyle(s,1),o}}},{key:"dashStyle",value:function(e,t){if(!e)return[];var r=e.strokeWidth*t,n=e.strokeDashstyle;switch(n){case"solid":return[];case"dot":return[1,4*r];case"dash":return[4*r,4*r];case"dashdot":return[4*r,4*r,1,4*r];case"longdash":return[8*r,4*r];case"longdashdot":return[8*r,4*r,1,4*r];default:return n?fe.isArray(n)?n:(n=Y.trim(n).replace(/\s+/g,",")).replace(/\[|\]/gi,"").split(","):[]}}},{key:"getValidStyleFromCarto",value:function(e,t,r,n,o){if(!r)return null;var i=n.type,a=n.properties.attributes||{},s=this.getDefaultStyle(i);o=void 0===o||o,a.FEATUREID=n.properties.id,a.SCALE=t;for(var l,u,c=KI[i],f=0,p=r.length;f7?0:o.fillSymbolID,c=o.lineSymbolID>5?0:o.lineSymbolID;for(var f in o){var p=$I[f];if(p){var h=p.leafletStyle;switch(p.type){case"number":var y=o[f];p.unit&&(y=96*y*pe[p.unit]*2.5),n[h]=y;break;case"color":var d=o[f],b=void 0,v=1;if("fillColor"===h)0!==u&&1!==u||(v=1-u,b="rgba("+d.red+","+d.green+","+d.blue+","+v+")");else if("color"===h){if(0===c||5===c)v=0===c?1:0;else{var m=[1,0];switch(c){case 1:m=[9.7,3.7];break;case 2:m=[3.7,3.7];break;case 3:m=[9.7,3.7,2.3,3.7];break;case 4:m=[9.7,3.7,2.3,3.7,2.3,3.7]}n.lineDasharray=m}b="rgba("+d.red+","+d.green+","+d.blue+","+v+")"}n[h]=b}}}return t.textField&&(n.textAlign="LEFT"),n}}])&&tF(t.prototype,r),n&&tF(t,n),Object.defineProperty(t,"prototype",{writable:!1}),e}(),nF=kA().Class.extend({initialize:function(e){var t=(e=e||{}).latLng||e._latLng;this._latLng=kA().latLng(t.lat,t.lng),this._style=e.style||e._canvas,this.attributes=e.attributes,this.id=e.id?e.id:null},getId:function(){return this.id},setId:function(e){this.id=e},setLatLng:function(e){this._latLng=e},setCanvas:function(e){this._style=e},setAttributes:function(e){this.attributes=e},getLatLng:function(){return this._latLng},getCanvas:function(){return this._style},getAttributes:function(){return this.attributes},setStyle:function(e){this._style=e},getStyle:function(){return this._style}}),oF=kA().Class.extend({initialize:function(e,t){this.geometry=e,this.attributes=t},toFeature:function(){var e=this.geometry;if(e.toGeoJSON){var t=e.toGeoJSON();return t.properties=this.attributes,(new Nr).read(t)[0]}if(3===e.length)e=new nt(e[1],e[0],e[2]);else if(2===e.length)e=new Ve(e[0],e[1]);else if(e instanceof kA().LatLng)e=new Ve(e.lng,e.lat);else if(e instanceof kA().Point)e=new Ve(e.x,e.y);else if(e instanceof kA().CircleMarker){var r=e.getLatLng();e=new Ve(r.lng,r.lat)}return new er(e,this.attributes)},reverseLatLngs:function(e){kA().Util.isArray(e)||(e=[e]);for(var t=0;t0&&t._reset(),t.addTFEvents(),t.mouseMoveHandler=function(e){var r=e.layerPoint;t.currentMousePosition=kA().point(r.x+t.movingOffset[0],r.y+t.movingOffset[1])},e.on("mousemove",t.mouseMoveHandler),t.update(e.getBounds())}else e.removeLayer(t)},addFeatures:function(e){},redrawThematicFeatures:function(e){},destroyFeatures: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()}},removeFeatures:function(e){var t=this;if(e){if(e===t.features)return t.removeAllFeatures();kA().Util.isArray(e)||"function"==typeof e||(e=[e]);for(var r=[],n=0;nu)){var b=s[0];s.splice(0,1),delete a[b]}}}}if(t.renderer.render(),n&&t.options.isHoverAble&&t.options.isMultiHover){var v=this.getShapesByFeatureID(n);this.renderer.updateHoverShapes(v)}},createThematicFeature:function(e){var t=this,r=t.getStyleByData(e);e.style&&t.isAllowFeatureStyle&&(r=fe.copyAttributesWithClip(e.style));var n={};n.nodesClipPixel=t.options.nodesClipPixel,n.isHoverAble=t.options.isHoverAble,n.isMultiHover=t.options.isMultiHover,n.isClickAble=t.options.isClickAble,n.highlightStyle=Wj.transformStyle(t.highlightStyle);for(var o=new hM(e,t,Wj.transformStyle(r),n),i=0;i0;if(t.themeField&&s&&r.attributes){var l=t.themeField,u=r.attributes;for(var c in u)if(l===c){i=!0,a=u[c];break}}if(i)for(var f=0,p=o.length;f0;if(t.themeField&&s&&r.attributes){var l=t.themeField,u=r.attributes;for(var c in u)if(l===c){i=!0,a=u[c];break}}if(i)for(var f=0,p=o.length;f=o[f].start&&a<=o[f].end:a>=o[f].start&&a0&&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 ve(0,u.y,u.x,0),b=y.length;if(this.options.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")}}}},isQuadrilateralOverLap:function(e,t){var r=e.length,n=t.length;if(5!==r||5!==n)return null;for(var o=!1,i=0;i=0&&e.options.fontOpacity<1&&(r.globalAlpha=e.options.fontOpacity),r.fillText){r.font=n,r.textAlign=e.options.textAlign,r.textBaseline=e.options.textBaseline;var s=e.options.vfactor,l=r.measureText("Mg").height||r.measureText("xx").width;t.y+=l*s*(a-1);for(var u=0;u0;){var o=t.pop(),i=o.type,a=o.layerType=o.layerType||"BASE_LAYER";"OVERLAY_LAYER"!==a&&(i=a),this.createLayer(i,o)}this.fire("maploaded",{map:this._map})}},createCRS:function(e,t,r,n,o){return e<0?new jI({bounds:o,origin:n,resolutions:r}):910112===e||910102===e?mI:(910111===e&&(e=3857),910101===e&&(e=4326),uI("EPSG:"+e,{origin:n,resolutions:r,bounds:o}))},createMap:function(e){var t=e.crs||kA().CRS.EPSG3857,r=kA().latLngBounds(t.unproject(e.bounds.min),t.unproject(e.bounds.max));this._map=kA().map(this.options.map,{center:r.getCenter(),maxZoom:e.maxZoom||22,minZoom:e.minZoom||0,zoom:e.zoom||0,crs:t,renderer:kA().canvas()}),t instanceof jI?this._map.setZoom(e.zoom?e.zoom+2:2,{maxZoom:e.maxZoom||22}):this._map.fitBounds(r,{maxZoom:e.maxZoom||22})},getResolutionsFromScales:function(e,t,r,n){for(var o=[],i=0;i 0"},datasetNames:[t+":"+r],fromIndex:0,toIndex:1e5});fF(e).getFeaturesBySQL(a,i,o)},createThemeLayer:function(e){var t,r=this,n=e.themeSettings&&JSON.parse(e.themeSettings),o=n.type;if(e.themeSettings=n,(t="HEAT"===o?this.createHeatLayer(e,n):"UNIQUE"===o?this.createUniqueLayer(e,n):"RANGE"===o?this.createRangeLayer(e,n):this.createBaseThemeLayer(e,n))&&(this.addFeature2ThemeLayer(e,t),t.on("add",function(e){r.registerThemeEvent(e.target)})),n&&n.labelField){var i=this.createLabelLayer(e,n);i.on("add",function(e){r.registerThemeEvent(e.target)}),t.labelLayer=i}return t},createBaseThemeLayer:function(e,t){var r=e.style,n=e.opacity,o=t.vectorType,i=r.pointStyle;i.fill="LINE"!==o;var a={};a.radius=i.pointRadius,a.color=i.strokeColor,a.opacity=i.strokeOpacity,a.lineCap=i.strokeLineCap,a.weight=i.strokeWidth,a.fillColor=i.fillColor,a.fillOpacity=i.fillOpacity;var s=function(e,t){return kA().circleMarker(t,a)};return i.unicode&&(s=function(e,t){return new pF(t,i)}),kA().geoJSON({type:"GeometryCollection",geometries:[]},{pointToLayer:s,opacity:n})},createUniqueLayer:function(e,t){for(var r=e.title,n=t.field,o=[],i=t.settings,a=e.isVisible,s=e.opacity,l=t.vectorType,u=0;u0?{fillColor:"#ffffff"}:i[0].style;var s=kA().Util.extend(new rT,r);s.fontWeight="bold",s.fontSize="14px",s.labelRect=!0,s.strokeColor=s.fillColor,s.fontColor=t.labelColor,t.labelFont&&(s.fontFamily=t.labelFont);var l=new uF(n,{visibility:a,opacity:.7});return this.registerThemeEvent(l),l.style=s,l.themeField=o,l.styleGroups=[],l},createHeatLayer:function(e,t){for(var r,n=t.colors||["blue","cyan","lime","yellow","red"],o={},i=0,a=n.length,s=1;i0&&i.push(n[a]);else for(var u=0,c=(n=o.parseFeatureFromJson(t.content)).length;u0&&i.push(n[u]);var f=e.prjCoordSys&&e.prjCoordSys.epsgCode;s?o.changeFeatureLayerEpsgCode(f,"4326",r,i,function(e){j(e)}):j(i)},function(){});else{for(var m=[],g=e.features,w=0,O=g.length;w0){var _=S.geometry.points[0].x,P=S.geometry.points[0].y,x=new Ve(_,P),C=new er(x,S.attributes,S.style);m.push(C)}}j(m)}}else if(i){var T=e.datasourceName;f=(c=(u=e.subLayers&&JSON.parse(e.subLayers)).length&&u.length>0?u[0]:u)&&c.name,this.getFeaturesBySQL(e.url,T,f,y.filter,t.ISERVER,function(t){var o,i,a=t.result,l=[];if(a&&a.features){for(var u=0,c=(o=a.features).length;u0?u[0]:u)&&c.name;var E=e.prjCoordSys&&e.prjCoordSys.epsgCode;this.getFeaturesBySQL(p,h,f,d,t.ISERVER,function(e){s?o.changeFeatureLayerEpsgCode(E,"4326",r,e,function(e){j(e)}):j(e)})}}function j(t){if(r&&r.labelLayer instanceof uF&&o.addFeature2LabelLayer(r.labelLayer,t,e),kA().HeatLayer&&r instanceof kA().HeatLayer){for(var n=[],i=0,a=t.length;i0){for(i=0,a=n.length;i==/g,">=").replace(/<==/g,"<="))+")":" * where (1==1||1>=0)"},getAttributesObjFromTable:function(e,t){if(0!==e.length&&0!==t.length){for(var r=[],n=0;n-1?(r=(e=JSON.parse(e)).needTransform,t=e.isAddFile):"needTransform"===e?(r=!0,t=!1):t="true"===e,{isAddFile:t,needTransform:r}},registerThemeEvent:function(e){var t=this;e.on("click",function(r){var n;e.map&&(t.selectedFeature&&(t.fire("featureunselected",{feature:t.selectedFeature}),t.selectedFeature=null),r.target&&r.target.refDataID&&(n=e.getFeatureById(r.target.refDataID)),n&&(t.selectedFeature=n,t.fire("featureselected",{feature:n})))}),e.on("mousemove",function(r){var n;e.map&&(r.target&&r.target.refDataID&&(r.target&&r.target.refDataID&&(n=e.getFeatureById(r.target.refDataID)),n&&t.fire("featuremousemove",{feature:n})))})},SERVER_TYPE_MAP:{"EPSG:4326":"WGS84","EPSG:3857":"MERCATOR","EPSG:900913":"MERCATOR","EPSG:102113":"MERCATOR","EPSG:910101":"GCJ02","EPSG:910111":"GCJ02MERCATOR","EPSG:910102":"BD","EPSG:910112":"BDMERCATOR"}}),yF=kA().TileLayer.extend({options:{collectionId:null,sqlFilter:null,ids:null,names:null,renderingRule:null,format:"png",zoomOffset:1,transparent:!0,cacheEnabled:!0,tileProxy:null,attribution:cI.Common.attribution,subdomains:null},initialize:function(e,t){this._url=e,kA().TileLayer.prototype.initialize.apply(this,arguments),kA().setOptions(this,t),kA().stamp(this)},onAdd:function(e){kA().TileLayer.prototype.onAdd.call(this,e)},getTileUrl:function(e){var t=this._getLayerUrl()+"&z="+this._getZoomForUrl()+"&x="+e.x+"&y="+e.y;return this.options.tileProxy&&(t=this.options.tileProxy+encodeURIComponent(t)),this.options.cacheEnabled||(t+="&_t="+(new Date).getTime()),this.options.subdomains&&(t=kA().Util.template(t,{s:this._getSubdomain(e)})),t},_getLayerUrl:function(){return this._layerUrl||this._createLayerUrl()},_createLayerUrl:function(){var e=fe.urlPathAppend(this._url,"/collections/".concat(this.options.collectionId,"/tile.").concat(this.options.format));return this.requestParams=this.requestParams||this._getAllRequestParams(),e=fe.urlAppend(e,jA.Util.getParamString(this.requestParams)),e=un.appendCredential(e),this._layerUrl=e,e},_getAllRequestParams:function(){var e=this.options||{},t={};return t.transparent=!0===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(",")),t}});function dF(e){"@babel/helpers - typeof";return(dF="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 bF(){bF=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"==dF(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 vF(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 mF(e){for(var t=1;t0&&(s.resolutions=o);return new lI(e,s)}(l,{bounds:o,dpi:a,resolutions:s}):void 0}function _F(e){return"PCS_NON_EARTH"===e.type}function PF(e,t){return xF.apply(this,arguments)}function xF(){return(xF=OF(bF().mark(function e(t,r){var n;return bF().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(CF(r,!1)){e.next=5;break}return e.next=3,jF(t);case 3:(n=e.sent)&&sI.defs(r,n);case 5:case"end":return e.stop()}},e)}))).apply(this,arguments)}function CF(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];try{sI(e)}catch(r){return t&&console.error("The projection of ".concat(e," is missing, please register the projection of ").concat(e," first, refer to the documentation: https://iclient.supermap.io/web/introduction/leafletDevelop.html#multiProjection")),!1}return!0}function TF(e,t){var r=e.bounds,n=e.center,o=e.scale,i=e.visibleScales,a=e.prjCoordSys,s=e.dpi,l=e.coordUnit,u=t.maxZoom,c=void 0===u?22:u,f=qC(i,r,s,l,c),p=SF({prjCoordSys:a,bounds:r,dpi:s,visibleScales:i,coordUnit:l},{maxZoom:c}),h=p.resolutions||f;return{crs:p,center:function(e,t){var r=t.center,n=t.bounds,o="string"==typeof e?e:e.code;"number"!=typeof r.x&&"number"!=typeof r.y&&(r={lat:(n.bottom+n.top)/2,lng:(n.left+n.right)/2});if("EPSG:4326"===o)return{lat:r.y,lng:r.x};return e.unproject(kA().point(r.x,r.y))}(p,{center:n,bounds:r}),zoom:function(e,t){var r=e.scale,n=e.dpi,o=e.coordUnit;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}(NI(r,n,o),t)}({scale:o,dpi:s,coordUnit:l},h),maxZoom:function(e){if(e.length>0)return e.length-1;return 22}(f)}}function EF(e){var t=e.type,r=e.epsgCode;return"PCS_NON_EARTH"==t?"":"EPSG:"+r}function jF(e){return kF.apply(this,arguments)}function kF(){return(kF=OF(bF().mark(function e(t){return bF().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",new Promise(function(e,r){new pI(t,{withoutFormatSuffix:!0}).getWkt(function(t){if("processCompleted"!==t.type)r();else{var n=t.result.data;e(n)}})}));case 1:case"end":return e.stop()}},e)}))).apply(this,arguments)} /* Copyright© 2000 - 2022 SuperMap Software Co.Ltd. All rights reserved. * This program are made available under the terms of the Apache License, Version 2.0 * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/ var MF=fI.extend({options:{geometry:null,prjCoordSys:null,excludeField:null},initialize:function(e,t){t=t||{},kA().setOptions(this,t),t.projection&&(this.options.prjCoordSys=t.projection),fI.prototype.initialize.call(this,e,t),this.dataFlow=new us(e,t),this.dataFlow.events.on({broadcastSocketConnected:this._defaultEvent,broadcastSocketError:this._defaultEvent,broadcastFailed:this._defaultEvent,broadcastSucceeded:this._defaultEvent,subscribeSocketConnected:this._defaultEvent,subscribeSocketError:this._defaultEvent,messageSucceeded:this._defaultEvent,setFilterParamSucceeded:this._defaultEvent,scope:this})},initBroadcast:function(){return this.dataFlow.initBroadcast(),this},broadcast:function(e){this.dataFlow.broadcast(e)},initSubscribe:function(){return this.dataFlow.initSubscribe(),this},setExcludeField:function(e){return this.dataFlow.setExcludeField(e),this.options.excludeField=e,this},setGeometry:function(e){return this.dataFlow.setGeometry(e),this.options.geometry=e,this},unSubscribe:function(){this.dataFlow.unSubscribe()},unBroadcast:function(){this.dataFlow.unBroadcast()},_defaultEvent:function(e){this.fire(e.eventType||e.type,e)}}),RF=function(){try{return mapv}catch(e){return{}}}();function AF(e){"@babel/helpers - typeof";return(AF="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 LF(e,t){for(var r=0;rt.options.maxZoom)){var a=o.getBounds(),s=a.getEast()-a.getWest(),l=a.getNorth()-a.getSouth(),u=o.getSize(),c=s/u.x,f=l/u.y,p=AI("DEGREE")*c,h=this.canvasLayer.getTopLeft(),y=o.latLngToAccurateContainerPoint(h),d={transferCoordinate:function(e){var r,n={x:(r="2d"===t.context?o.latLngToAccurateContainerPoint(kA().latLng(e[1],e[0])):{x:(e[0]-h.lng)/c,y:(h.lat-e[1])/f}).x-y.x,y:r.y-y.y};return[n.x,n.y]}};void 0!==e&&(d.filter=function(t){var n=r.trails||10;return e&&t.time>e-n&&t.time200&&(this._last=new Date,this.update({data:this.data,options:this.mapVOptions}))},_toMapvStyle:function(e){var t={draw:"simple"};return t.strokeStyle=e.color,t.lineWidth=e.width,t.globalAlpha=e.fillOpacity||e.opacity,t.lineCap=e.lineCap,t.lineJoin=e.lineJoin,t.fillStyle=e.fillColor,t.size=e.radius,t}}),qF=kA().GeoJSON.extend({initialize:function(e,t){(t=t||{}).style&&!t.pointToLayer&&(t.pointToLayer=function(e,r){return kA().circleMarker(r,t.style())}),kA().Util.setOptions(this,t),this._layers={},kA().stamp(this),this.url=e,this.idCache={}},onMessageSuccessed:function(e){var t=e.featureResult,r=e.featureResult.properties[this.options.idField],n=null;void 0!==r&&this.idCache[r]?(n=this.getLayer(this.idCache[r]),this._updateLayerData(n,t)):((n=kA().GeoJSON.geometryToLayer(t,this.options)).feature=kA().GeoJSON.asFeature(t),this.addLayer(n),void 0!==r&&(this.idCache[r]=this.getLayerId(n))),this.options.onEachFeature&&this.options.onEachFeature(t,n)},_updateLayerData:function(e,t){t.properties&&(e.feature.properties=t.properties);var r=[];switch(t.geometry.type){case"Point":r=kA().GeoJSON.coordsToLatLng(t.geometry.coordinates),e.setLatLng(r);break;case"LineString":r=kA().GeoJSON.coordsToLatLngs(t.geometry.coordinates,0),e.setLatLngs(r);break;case"MultiLineString":case"Polygon":r=kA().GeoJSON.coordsToLatLngs(t.geometry.coordinates,1),e.setLatLngs(r);break;case"MultiPolygon":r=kA().GeoJSON.coordsToLatLngs(t.geometry.coordinates,2),e.setLatLngs(r)}}}),HF=kA().LayerGroup.extend({options:{geometry:null,prjCoordSys:null,excludeField:null,idField:"id",render:"normal"},initialize:function(e,t){t=t||{},kA().Util.setOptions(this,t),this.url=e,this._layers={},this.dataService=new MF(this.url,{geometry:this.options.geometry,prjCoordSys:this.options.prjCoordSys,excludeField:this.options.excludeField})},onAdd:function(e){var t=this;this.dataService.initSubscribe(),this.dataService.on("subscribeSocketConnected",function(e){return t.fire("subscribesucceeded",e)}),this.dataService.on("subscribeSocketError",function(e){return t.fire("subscribefailed",e)}),this.dataService.on("messageSucceeded",function(e){return t._onMessageSuccessed(e)}),this.dataService.on("setFilterParamSucceeded",function(e){return t.fire("setfilterparamsucceeded",e)}),"mapv"===this.options.render?this.addLayer(new JF(this.url,this.options)):this.addLayer(new qF(this.url,this.options)),kA().LayerGroup.prototype.onAdd.call(this,e)},onRemove:function(e){kA().LayerGroup.prototype.onRemove.call(this,e),this.dataService&&this.dataService.unSubscribe()},setExcludeField:function(e){return this.dataService.setExcludeField(e),this.options.excludeField=e,this},setGeometry:function(e){return this.dataService.setGeometry(e),this.options.geometry=e,this},_onMessageSuccessed:function(e){var t=this;this.getLayers().map(function(r){return r.onMessageSuccessed&&(r.onMessageSuccessed(e),t.fire("dataupdated",{layer:r,data:e.featureResult})),r})}}),WF=kA().Layer.extend({includes:[],_echartsContainer:null,_map:null,_ec:null,_echartsOptions:null,options:{attribution:cI.ECharts.attribution,loadWhileAnimating:!1},initialize:function(e,t){kA().Util.setOptions(this,t),this.setOption(e)},setOption:function(e,t,r){var n=e.baseOption||e;n.LeafletMap=n.LeafletMap||{roam:!0},n.animation=!0===n.animation,this._echartsOptions=e,this._ec&&this._ec.setOption(e,t,r)},getEcharts:function(){return this._ec},_disableEchartsContainer:function(){this._echartsContainer.style.visibility="hidden"},_enableEchartsContainer:function(){this._echartsContainer.style.visibility="visible"},onAdd:function(e){this._map=e,this._initEchartsContainer(),this._ec=fR().init(this._echartsContainer),this._ec.leafletMap=e;var t=this;e.on("zoomstart",function(){t._disableEchartsContainer()}),!t.options.loadWhileAnimating&&e.on("movestart",function(){t._disableEchartsContainer()}),fR().registerAction({type:"LeafletMapLayout",event:"LeafletMapLayout",update:"updateLayout"},function(e){}),fR().registerCoordinateSystem("leaflet",YF),fR().extendComponentModel({type:"LeafletMap",getBMap:function(){return this.__LeafletMap},defaultOption:{roam:!1}}),fR().extendComponentView({type:"LeafletMap",render:function(e,r,n){var o=!0,i=r.scheduler.ecInstance.leafletMap,a=n.getZr().painter.getViewportRoot(),s=i.options.zoomAnimation&&kA().Browser.any3d;a.className=" leaflet-layer leaflet-zoom-"+(s?"animated":"hide")+" echarts-layer";var l=kA().DomUtil.testProp(["transformOrigin","WebkitTransformOrigin","msTransformOrigin"]);a.style[l]="50% 50%";var u=e.coordinateSystem,c=n.getZr().painter.getLayers();XF(t._map,a);var f=function(){if(!o){var r,i=XF(t._map,a);if(!t.options.loadWhileAnimating){for(var s in c)c.hasOwnProperty(s)&&c[s]&&(r=c[s].ctx)&&r.clearRect&&r.clearRect(0,0,r.canvas.width,r.canvas.height);t._enableEchartsContainer()}u.setMapOffset(i),e.__mapOffset=i,n.dispatchAction({type:"LeafletMapLayout"})}};function p(){o||(n.dispatchAction({type:"LeafletMapLayout"}),t._enableEchartsContainer())}t._oldMoveHandler&&i.off(t.options.loadWhileAnimating?"move":"moveend",t._oldMoveHandler),t._oldZoomEndHandler&&i.off("zoomend",t._oldZoomEndHandler),i.on(t.options.loadWhileAnimating?"move":"moveend",f),i.on("zoomend",p),t._oldMoveHandler=f,t._oldZoomEndHandler=p,o=!1}}),this._ec.setOption(this._echartsOptions)},onRemove:function(){this._ec.clear(),this._ec.dispose(),delete this._ec,kA().DomUtil.remove(this._echartsContainer),this._oldZoomEndHandler&&(this._map.off("zoomend",this._oldZoomEndHandler),this._oldZoomEndHandler=null),this._oldMoveHandler&&(this._map.off(this.options.loadWhileAnimating?"move":"moveend",this._oldMoveHandler),this._oldMoveHandler=null),this._resizeHandler&&(this._map.off("resize",this._resizeHandler),this._resizeHandler=null),delete this._map},_initEchartsContainer:function(){var e=this._map.getSize(),t=document.createElement("div");t.style.position="absolute",t.style.height=e.y+"px",t.style.width=e.x+"px",t.style.zIndex=10,this._echartsContainer=t,this.getPane().appendChild(this._echartsContainer);var r=this;function n(e){var t=e.newSize;r._echartsContainer.style.width=t.x+"px",r._echartsContainer.style.height=t.y+"px",r._ec.resize()}this._map.on("resize",n),this._resizeHandler=n}});function YF(e){this._LeafletMap=e,this.dimensions=["lng","lat"],this._mapOffset=QF(e)}function QF(e){var t=e.containerPointToLayerPoint([0,0]);return[t.x||0,t.y||0]}function XF(e,t){var r=QF(e);return t.style.left=r[0]+"px",t.style.top=r[1]+"px",r}YF.prototype.dimensions=["lng","lat"],YF.prototype.setMapOffset=function(e){this._mapOffset=e},YF.prototype.getBMap=function(){return this._LeafletMap},YF.prototype.prepareCustoms=function(){var e=fR().util,t=this.getViewRect();return{coordSys:{type:"leaflet",x:t.x,y:t.y,width:t.width,height:t.height},api:{coord:e.bind(this.dataToPoint,this),size:e.bind(function(t,r){return r=r||[0,0],e.map([0,1],function(e){var n=r[e],o=t[e]/2,i=[],a=[];return i[e]=n-o,a[e]=n+o,i[1-e]=a[1-e]=r[1-e],Math.abs(this.dataToPoint(i)[e]-this.dataToPoint(a)[e])},this)},this)}}},YF.prototype.dataToPoint=function(e){null===e[1]&&(e[1]=kA().CRS.EPSG3857.projection.MAX_LATITUDE);var t=this._LeafletMap.latLngToLayerPoint([e[1],e[0]]),r=this._mapOffset;return[t.x-r[0],t.y-r[1]]},YF.prototype.fixLat=function(e){return e>=90?89.99999999999999:e<=-90?-89.99999999999999:e},YF.prototype.pointToData=function(e){var t=this._mapOffset,r=this._LeafletMap.layerPointToLatLng([e[0]+t[0],e[1]+t[1]]);return[r.lng,r.lat]},YF.prototype.getViewRect=function(){var e=this._LeafletMap.getSize();return new(fR().graphic.BoundingRect)(0,0,e.x,e.y)},YF.prototype.getRoamTransform=function(){return fR().matrix.create()},YF.dimensions=YF.prototype.dimensions,YF.create=function(e){var t,r=e.scheduler.ecInstance.leafletMap;e.eachComponent("LeafletMap",function(e){t||(t=new YF(r)),e.coordinateSystem=t,e.coordinateSystem.setMapOffset(e.__mapOffset||QF(r))}),e.eachSeries(function(e){e.get("coordinateSystem")&&"leaflet"!==e.get("coordinateSystem")||(t||(t=new YF(r)),e.coordinateSystem=t,e.animation=!0===e.animation)})};function ZF(e,t){for(var r=0;r=0;o--){var i=void 0,a=void 0,s=r.latLngToLayerPoint(n[o].getLatLng()),l=n[o].getStyle();if(!l&&this.defaultStyle&&(l=this.defaultStyle),l.img){var u=l.img.width,c=l.img.height;l.size&&l.size[0]&&l.size[1]&&(u=l.size[0],c=l.size[1]);var f=l.anchor||[u/2,c/2];i=kA().point(s.x-f[0],s.y-f[1]),a=kA().point(i.x+u,i.y+c)}else i=kA().point(s.x-l.width/2,s.y-l.height/2),a=kA().point(s.x+l.width/2,s.y+l.height/2);if(kA().bounds(i,a).contains(e))return n[o]}return null},containsPoint:function(e){return!!this._getGraphicAtPoint(e)},_handleClick:function(e){e.target=null;var t=this.layer,r=t._map,n=this._getGraphicAtPoint(r.latLngToLayerPoint(e.latlng));if(n)return this.layer._renderer._ctx.canvas.style.cursor="pointer",e.target=n,void("click"===e.type&&t.options.onClick&&t.options.onClick.call(t,n,e));this.layer._renderer._ctx.canvas.style.cursor="auto"},_clearBuffer:nB});kA().Canvas.include({drawGraphics:function(e,t){var r=this;r._drawing&&e.forEach(function(e){var n=e.getStyle();!n&&t&&(n=t),n.img?r._drawImage.call(r,r._ctx,n,e.getLatLng()):r._drawCanvas.call(r,r._ctx,n,e.getLatLng())})},_drawCanvas:function(e,t,r){var n=t,o=this._map.latLngToLayerPoint(r),i=o.x-n.width/2,a=o.y-n.height/2,s=n.width,l=n.height;e.drawImage(n,i,a,s,l)},_drawImage:function(e,t,r){var n,o;if(t.size){var i=t.size;n=i[0],o=i[1]}else n=t.img.width,o=t.img.height;var a=this._coordinateToPoint(r),s=kA().point(a),l=kA().point(t.anchor||[n/2,o/2]);a=[s.x-l.x,s.y-l.y],e.drawImage(t.img,a[0],a[1],n,o)},_coordinateToPoint:function(e){if(!this._map)return e;var t=e;kA().Util.isArray(e)?t=kA().latLng(e[0],e[1]):e instanceof kA().LatLng&&(t=kA().latLng(e.lat,e.lng));var r=this._map.latLngToLayerPoint(t);return[r.x,r.y]}}); /* Copyright© 2000 - 2022 SuperMap Software Co.Ltd. All rights reserved. * This program are made available under the terms of the Apache License, Version 2.0 * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/ var iB=kA().Util.falseFn,aB=function(){for(var e=document.createElement("div"),t=["transform","WebkitTransform","MozTransform","OTransform","msTransform"],r=0;r-1&&(this._data=e),this._renderLayer.setChangeFlags({dataChanged:!0,propsChanged:!0,viewportChanged:!0,updateTriggersChanged:!0}),this._refreshData();var t=this._getLayerState();t.data=this._data||[],this._layerDefaultStyleCache=null,this._renderLayer.setNeedsRedraw(!0),this._renderLayer.setState(t)},drawGraphics:function(e){this._clearBuffer();var t=this.layer._map.getSize();this._container.width!==t.x&&(this._container.width=t.x),this._container.height!==t.y&&(this._container.height=t.y);var r=this.layer._map.getPanes().mapPane._leaflet_pos;this._container.style[aB]="translate("+-Math.round(r.x)+"px,"+-Math.round(r.y)+"px)",this._data=e||[],this._renderLayer||this._createInnerRender(),this._draw()},_initContainer:function(){this._container=this._createCanvas(this.options.width,this.options.height),this._layerContainer=this.options.container,this._wrapper=kA().DomUtil.create("div","deck-wrapper",this._layerContainer),this._wrapper.appendChild(this._container)},_createCanvas:function(e,t){var r=kA().DomUtil.create("canvas","graphicLayer leaflet-layer leaflet-zoom-hide");return r.oncontextmenu=kA().Util.falseFn,r.width=e,r.height=t,r.style.width=e+"px",r.style.height=t+"px",r},_pixelToMeter:function(e){var t=this.layer._map.getBounds();return e*((t.getEast()-t.getWest())/this.layer._map.getSize().x*(6378137*Math.PI/180))},_createInnerRender: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,f={id:"scatter-plot",data:e._data,pickable:Boolean(this.options.onClick)||Boolean(this.options.onHover),autoHighlight:!0,color:r,opacity:o,radius:n,radiusScale:a,highlightColor:i,radiusMinPixels:s,radiusMaxPixels:l,strokeWidth:u,coordinateSystem:this._isWGS84()?window.DeckGL.COORDINATE_SYSTEM.LNGLAT_OFFSETS:window.DeckGL.COORDINATE_SYSTEM.LNGLAT,isGeographicCoordinateSystem:this._isWGS84(),outline:c,getPosition:function(e){if(!e)return[0,0,0];var t=e.getLatLng();return t&&[t.lng,t.lat,0]},getColor:function(t){var r=e._getLayerDefaultStyle(),n=t&&t.options;return n&&n.color||r.color},getRadius:function(t){var r=e._getLayerDefaultStyle(),n=t&&t.getStyle();return n&&n.radius||r.radius},updateTriggers:{getColor:[r],getRadius:[n]}},p=this;this.options.onClick&&(f.onClick=function(){p._container.style.cursor="pointer",p.options.onClick.apply(p,arguments)}),this.options.onHover&&(f.onHover=function(){p._container.style.cursor="pointer",p.options.onHover.apply(p,arguments)}),e._renderLayer=new window.DeckGL.ScatterplotLayer(f)},_getLayerDefaultStyle:function(){if(this._layerDefaultStyleCache)return this._layerDefaultStyleCache;var e=this.layer.options,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 n=this._pixelToMeter(n),this._layerDefaultStyleCache={color:t,opacity:r,radius:n,radiusScale:o,radiusMinPixels:i,radiusMaxPixels:a,strokeWidth:s,outline:l},this._layerDefaultStyleCache},_getLayerState:function(){var e=this.layer.getState();return e.zoom=e.zoom-1,e},_draw:function(){var e=this._getLayerState();this._refreshData(),e.data=this._data||[];var t={};for(var r in e)t[r]=e[r];this._layerDefaultStyleCache=null,this._renderLayer.setNeedsRedraw(!0),t.layers=[this._renderLayer],t.canvas=this._container,t.onBeforeRender=this._onBeforeRender.bind(this),t.onAfterRender=this._onAfterRender.bind(this),t.coordinateSystem=this._isWGS84()?window.DeckGL.COORDINATE_SYSTEM.LNGLAT_OFFSETS:window.DeckGL.COORDINATE_SYSTEM.LNGLAT,t.isGeographicCoordinateSystem=this._isWGS84(),this.deckGL?this.deckGL.setProps(t):this.deckGL=new window.DeckGL.experimental.DeckGLJS(t)},_clearBuffer:function(){if(this.deckGL){var e=this.deckGL.layerManager;e&&e.context.gl.clear(e.context.gl.COLOR_BUFFER_BIT)}return this},_refreshData:function(){var e=this._data||[],t=kA().Util.isArray(e)?[].concat(e):[e];this._renderLayer.props.data||(this._renderLayer.props.data=[]),this._renderLayer.props.data.length=0;for(var r=0;r0&&void 0!==arguments[0]?arguments[0]:null;if(!e||0===e.length||e===this.graphics)return this.graphics.length=0,void this.update();fe.isArray(e)||(e=[e]);for(var t=e.length-1;t>=0;t--){var r=e[t],n=fe.indexOf(this.graphics,r);-1!==n&&this.graphics.splice(n,1)}this.update()},setStyle:function(e){var t=this.options,r={color:t.color,radius:t.radius,opacity:t.opacity,highlightColor:t.highlightColor,radiusScale:t.radiusScale,radiusMinPixels:t.radiusMinPixels,radiusMaxPixels:t.radiusMaxPixels,strokeWidth:t.strokeWidth,outline:t.outline};this.options=kA().Util.extend(this.options,r,e),this.defaultStyle=this._getDefaultStyle(this.options),this.update()},update:function(){this._layerRenderer.update(this.graphics)},clear:function(){this.removeGraphics()},getRenderer:function(){return this._renderer},getState:function(){var e=this._map,t=e.getSize().x,r=e.getSize().y,n=e.getCenter(),o=n.lng,i=n.lat,a=fB[this._crs.code]||0;cB[this._crs.code]&&this._crs.resolutions&&this._crs.resolutions.length>0&&(a=Math.round(Math.log2(cB[this._crs.code]/this._crs.resolutions[0])));var s={longitude:o,latitude:i,zoom:e.getZoom()+a,maxZoom:e.getMaxZoom()+a,pitch:0,bearing:0},l={};for(var u in s)l[u]=s[u];l.width=t,l.height=r;var c=this.options;return l.color=c.color,l.radius=c.radius,l.opacity=c.opacity,l.highlightColor=c.highlightColor,l.radiusScale=c.radiusScale,l.radiusMinPixels=c.radiusMinPixels,l.radiusMaxPixels=c.radiusMaxPixels,l.strokeWidth=c.strokeWidth,l.outline=c.outline,l},_resize:function(){var e=this._map.getSize();this._container.width=e.x,this._container.height=e.y,this._container.style.width=e.x+"px",this._container.style.height=e.y+"px";var t=this._map.containerPointToLayerPoint([0,0]);kA().DomUtil.setPosition(this._container,t),this._update()},_moveEnd:function(){this._layerRenderer instanceof sB&&this._update()},_createRenderer:function(){var e,t=this._map,r=t.getSize().x,n=t.getSize().y;if(this.options.render===lB[0])e=new oB(this,{width:r,height:n,renderer:t.getRenderer(this)});else{var o=kA().Util.setOptions({},uB),i=kA().Util.setOptions({options:o},this.options);(i=kA().Util.setOptions(this,i)).container=t.getPane("overlayPane"),i.width=r,i.height=n,e=new sB(this,i)}return e.defaultStyle=this.defaultStyle,this._layerRenderer=e,this._layerRenderer.getRenderer()},_update:function(){this._map&&this._updatePath()},_updatePath:function(){var e=this._getGraphicsInBounds();this._renderer.drawGraphics(e,this.defaultStyle)},_project:function(){var e=this;e._getGraphicsInBounds().map(function(t){var r=e._map.latLngToLayerPoint(t.getLatLng()),n=e._clickTolerance(),o=[t._anchor+n,t._anchor+n];return t._pxBounds=new(kA().Bounds)(r.subtract(o),r.add(o)),t}),e._pxBounds=kA().bounds(kA().point(0,0),kA().point(this._container.width,this._container.height))},_getDefaultStyle:function(e){var t={};if(e.color){t.fill=!0;var r=this.toRGBA(e.color);t.color=r,t.fillColor=r}return e.opacity&&(t.opacity=e.opacity,t.fillOpacity=e.opacity),e.radius&&(t.radius=e.radius),e.strokeWidth&&(t.weight=e.strokeWidth),e.outline&&(t.stroke=e.outline),new tB(t).getStyle()},toRGBA:function(e){return"rgba(".concat(e[0],",").concat(e[1],",").concat(e[2],",").concat((e[3]||255)/255,")")},_getGraphicsInBounds:function(){var e=[],t=this._map.getBounds();return this.graphics.map(function(r){return t.contains(r.getLatLng())&&e.push(r),r}),e},_handleClick:function(e){this._layerRenderer._handleClick(e)},beforeAdd:kA().Util.falseFn,_containsPoint:function(e){return this._layerRenderer.containsPoint(e)}}),hB=iF.extend({options:{isOverLay:!0},initialize:function(e,t,r){var n=[];n.push(e),n.push(r),iF.prototype.initialize.apply(this,n),this.chartsType=t,this.themeFields=r&&r.themeFields?r.themeFields:null,this.charts=r&&r.charts?r.charts:[],this.cache=r&&r.cache?r.cache:{},this.chartsSetting=r&&r.chartsSetting?r.chartsSetting:{}},setChartsType:function(e){this.chartsType=e,this.redraw()},addFeatures:function(e){var t=this;t.fire("beforefeaturesadded",{features:e}),this.features=this.toiClientFeature(e),t.renderer&&(t._map?t.redrawThematicFeatures(t._map.getBounds()):t.redrawThematicFeatures())},redrawThematicFeatures:function(e){var t=this;t.renderer.clearAll();var r=t.features;if(this.options.alwaysMapCRS&&e&&e instanceof kA().LatLngBounds){var n=this._map.options.crs;e=kA().bounds(n.project(e.getSouthWest()),n.project(e.getNorthEast()))}e=vI.toSuperMapBounds(e);for(var o=0,i=r.length;o=r.left&&a.x<=r.right&&a.y>=r.top&&a.y<=r.bottom){n=!0;break}}return n},clearCache:function(){this.cache={},this.charts=[]},removeFeatures:function(e){this.clearCache(),iF.prototype.removeFeatures.call(this,e)},removeAllFeatures:function(){this.clearCache(),iF.prototype.removeAllFeatures.apply(this,arguments)},redraw:function(){return this.clearCache(),iF.prototype.redraw.apply(this,arguments)},clear:function(){var e=this;e.renderer&&(e.renderer.clearAll(),e.renderer.refresh()),e.removeAllFeatures(),e.clearCache()},getWeightFieldValue:function(e,t,r){if((void 0===r||isNaN(r))&&(r=0),!e.attributes)return r;var n=e.attributes[t];return(void 0===n||isNaN(n))&&(n=r),n},_sortChart:function(){this.charts&&this.charts.sort(function(e,t){return void 0===e.__overlayWeight&&void 0===t.__overlayWeight?0:void 0!==e.__overlayWeight&&void 0===t.__overlayWeight?-1:void 0===e.__overlayWeight&&void 0!==t.__overlayWeight?1:void 0!==e.__overlayWeight&&void 0!==t.__overlayWeight?parseFloat(e.__overlayWeight)1?r.weight/10:r.weight)):t.setAttribute("stroke","none"),r.fill?(t.setAttribute("fill",r.fillColor||r.color),t.setAttribute("fill-opacity",r.fillOpacity)):t.setAttribute("fill","none")}});var CB=kA().CircleMarker.extend({includes:SB.prototype,statics:{iconCache:{}},initialize:function(e,t){SB.prototype.initialize.call(this,e),this._makeFeatureParts(e,t)},getLatLng:void 0,render:function(e,t){SB.prototype.render.call(this,e,t),this._radius=t.radius||kA().CircleMarker.prototype.options.radius,this._updatePath()},_makeFeatureParts:function(e,t){t=t||{x:1,y:1};var r=e.geometry[0];"object"===xB(r[0])&&"x"in r[0]?(this._point=kA().point(r[0]).scaleBy(t),this._empty=kA().Util.falseFn):(this._point=kA().point(r).scaleBy(t),this._empty=kA().Util.falseFn)},makeInteractive:function(){this._updateBounds()},updateStyle:function(e,t){return this._radius=t.radius||this._radius,this._updateBounds(),SB.prototype.updateStyle.call(this,e,t)},_updateBounds:function(){if(this.options.iconUrl&&this.options.iconSize){var e=kA().point(this.options.iconSize),t=e&&e.divideBy(2,!0),r=this._point.subtract(t);this._pxBounds=new(kA().Bounds)(r,r.add(e))}else kA().CircleMarker.prototype._updateBounds.call(this)},_updatePath:function(){this.options.iconUrl?this._renderer._updateIcon(this):kA().CircleMarker.prototype._updatePath.call(this)},_getImage:function(){if(!this.options.iconUrl)return null;var e=this.options.iconUrl,t=CB.iconCache[e];if(!t){var r=this.options.iconSize||[50,50];t=CB.iconCache[e]=this._createIcon(e,r)}return t},_createIcon:function(e,t){var r=e;if(!r)throw new Error("iconUrl not set in Icon options (see the docs).");var n=document.createElement("img");n.src=r,n.className="leaflet-marker-icon "+(this.layerName||"");var o=t;if("number"==typeof o&&(o=[o,o]),o){var i=kA().point(o),a=kA().point(i&&i.divideBy(2,!0));i&&(n.style.width=i.x+"px",n.style.height=i.y+"px"),a&&(n.style.marginLeft=-a.x+"px",n.style.marginTop=-a.y+"px")}return n.onload=function(){o||(n.style.width=this.width+"px",n.style.height=this.height+"px")},n},_containsPoint:function(e){return this.options.iconUrl?this._pxBounds.contains(e):kA().CircleMarker.prototype._containsPoint.call(this,e)}}),TB={_makeFeatureParts:function(e,t){t=t||{x:1,y:1};var r,n=e.geometry;this._parts=[];for(var o=0;o-1?new AB(n):new LB(n)).getTile().then(function(t){e.render(t,r)})},render:function(e,t){if(e){for(var r=this,n=r.renderer,o=r.layer,i=0;i0&&a[a.length-1]}t.properties.textField=i}r.vectorTileLayerStyles=r.vectorTileLayerStyles||{};var s=r.vectorTileLayerStyles[n];if(s)return t=this._mergeFeatureTextField(t,s),s;var l=this.getScaleFromCoords(e),u=this.cartoCSSToLeaflet.pickShader(n)||[];for(var c in s=[],u)for(var f=u[c],p=0;p1){var c=parseInt(u[1]);s=c&&c>=4e3&&c<=5e3?l.DEGREE:l.METER}}return LI(a,96,s)},_mergeFeatureTextField:function(e,t){if(!this.options.serverCartoCSSStyle||!t||"TEXT"!==e.type)return e;var r=t;kA().Util.isArray(t)||(r=[t]);for(var n=0;n0?this.convertFastToPixelPoints(e):this.canvasContext.clearRect(0,0,this.maxWidth,this.maxWidth)},convertFastToPixelPoints:function(e){var t,r,n,o,i,a,s,l=[],u=e.getEast()-e.getWest(),c=e.getNorth()-e.getSouth(),f=this._map.getSize();o=u/f.x>c/f.y?u/f.x:c/f.y,this.useRadius=this.useGeoUnit?parseInt(this.radius/o):this.radius;for(var p=0;p0&&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;nthis.fileModel.FileConfig.fileMaxSize)return this.fire("filesizeexceed",{messageType:"warring",message:pR.i18n("msg_fileSizeExceeded")}),!1;var n=t.value,o=r.name,i=xA(o);if(!i)return this.fire("errorfileformat",{messageType:"failure",message:pR.i18n("msg_fileTypeUnsupported")}),!1;""!==o&&(this.fileModel.set("loadFileObject",{file:r,filePath:n,fileName:o,fileType:i}),this._readData())},_readData:function(){var e=this,t=this,r=this.fileModel.loadFileObject.fileType;yR.readFile(r,{file:this.fileModel.loadFileObject.file,path:this.fileModel.loadFileObject.filePath},function(n){yR.processDataToGeoJson(r,n,function(t){t&&e.fire("openfilesucceeded",{result:t,layerName:e.fileModel.loadFileObject.fileName.split(".")[0]})},function(e){t.fire("openfilefailed",{messageType:"failure",message:e})},e)},function(){t.fire("openfilefailed",{messageType:"failure",message:pR.i18n("msg_openFileFail")})},this)}}),cG=lG.extend({options:{layer:null},initialize:function(e){lG.prototype.initialize.apply(this,[e]),this.viewModel=new uG},setViewStyle:function(e,t){this.rootContainer.style[e]=t},_initView:function(){var e=this,t=kA().DomUtil.create("div","component-openfile");return t.id="openFile",this.fileSelect=kA().DomUtil.create("div","",t),this.label=kA().DomUtil.create("label","component-openfile__span--select",this.fileSelect),this.label.htmlFor="input_file",kA().DomUtil.create("div","supermapol-icons-upload",this.label),kA().DomUtil.create("span","component-openfile__span",this.label).appendChild(document.createTextNode(pR.i18n("text_chooseFile"))),this.fileInput=kA().DomUtil.create("input","component-openfile__input",this.fileSelect),this.fileInput.id="input_file",this.fileInput.type="file",this.fileInput.accept=".json,.geojson,.csv,.xls,application/vnd.openxmlformats-officedocument.spreadsheetml.sheet,application/vnd.ms-excel",this.fileInput.onchange=function(t){e.messageBox.closeView(),e.viewModel.readFile(t)},this.messageBox=new uR,this.viewModel.on("filesizeexceed",function(t){e.messageBox.showView(t.message,t.messageType)}),this.viewModel.on("errorfileformat",function(t){e.messageBox.showView(t.message,t.messageType)}),this.viewModel.on("openfilefailed",function(t){e.messageBox.showView(t.message,t.messageType),e._event.fire("openfilefailed",t)}),this.viewModel.on("readdatafail",function(t){e.messageBox.showView(t.message,t.messageType)}),this.viewModel.on("openfilesucceeded",function(t){e._event.fire("openfilesucceeded",t)}),this._preventMapEvent(t,this.map),t}});function fG(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function pG(e,t){for(var r=0;r0&&this.addLayers(t),this.currentLayerDataModel=null}return hG(e,[{key:"addLayers",value:function(e,t,r,n){for(var o=0;o0?n.operatingAttributeNames:n.attributeNames).length;a0?this.fire("searchlayersucceeded",{result:r}):this.fire("searchfailed",{searchType:"searchLayersField"})}},searchFromCityLocalSearchService:function(e){if(this.searchCache[e])this.fire("geocodesucceeded",{result:this.searchCache[e]});else{this.geoCodeParam.keyWords=e||this.geoCodeParam.city;var t=this,r=this._getSearchUrl(this.geoCodeParam);sn.get(r).then(function(e){return e.json()}).then(function(e){if(e.error||0===e.poiInfos.length)t.fire("searchfailed",{searchType:"searchGeocodeField"});else if(e.poiInfos){var r=t._dataToGeoJson(e.poiInfos,t.geoCodeParam);t.fire("geocodesucceeded",{result:r})}})}},addSearchLayers:function(e){var t=this;this.dataModel.addLayers(e,function(e){t.fire("newlayeradded",{layerName:e.layerName})},null,this)},panToLayer:function(e){this.dataModel.layers[e]&&this.map.flyToBounds(this.dataModel.layers[e].layer.getBounds())},panToCity:function(e){this.geoCodeParam.keyWords=e,this.geoCodeParam.city=e;var t=this,r=this._getSearchUrl(this.geoCodeParam);sn.get(r).then(function(e){return e.json()}).then(function(e){if(e.poiInfos.length>0){var r=kA().latLng(e.poiInfos[0].location.y,e.poiInfos[0].location.x);t.map.setView(r,8)}else t.fire("searchfailed",{searchType:"cityGeocodeField"})})},_dataToGeoJson:function(e,t){for(var r=[],n=0;n0&&document.getElementsByClassName("component-single-checked-img")[0].setAttribute("class","component-single-default-img"),r.firstChild.setAttribute("class","component-single-checked-img"),t.currentSearchLayerName=r.lastChild.innerText,t.isSearchLayer=!0,i.removeChild(i.firstChild),i.insertBefore(document.createTextNode(t.currentSearchLayerName),i.firstChild),t.viewModel.panToLayer(t.currentSearchLayerName),t.messageBox.closeView()},r.appendChild(f),e}(),c=[];s&&c.push({title:pR.i18n("title_searchCity"),content:s}),c.push({title:pR.i18n("title_searchLayer"),content:u});var f=new mA({tabs:c}),p=f.getElement();f.closeView(),n.appendChild(p),o.onclick=function(){p.hidden?f.showView():f.closeView()},n.appendChild(o),i.innerText||i.appendChild(document.createTextNode(pR.i18n("text_label_chooseSearchLayers")));var h=document.createElement("div");h.setAttribute("class","component-search__input");var y=document.createElement("input");y.type="text",y.placeholder=pR.i18n("text_label_searchTips"),h.appendChild(y),this.poiInput=y;var d=document.createElement("span");d.setAttribute("class","supermapol-icons-close"),d.hidden=!0,h.appendChild(d),n.appendChild(h);var b=document.createElement("div");b.setAttribute("class","component-search-icon supermapol-icons-search");var v=new PA;this._resultDomObj=v,b.onclick=function(){v.closeView(),e.clearSearchResult(),e.messageBox.closeView(),f.closeView();var t=e.poiInput.value.trim();""!==t?e.isSearchLayer?e.viewModel.search(t,e.currentSearchLayerName):e.viewModel.search(t):e.messageBox.showView(pR.i18n("msg_searchKeywords"))},y.onkeypress=function(e){if(13==e.which){var t=document.createEvent("HTMLEvents");t.initEvent("click",!1,!0),b.dispatchEvent(t)}},n.appendChild(b);var m=function(){var e=v.getElement();return e.style.position="absolute",e.style.top="44px",e.style.right="0",v.closeView(),v.content.onclick=function(e){var r=null;if("component-search-result-info"===e.target.parentNode.className)r=e.target.parentNode.parentNode;else if("component-search__resultitme"===e.target.parentNode.className)r=e.target.parentNode;else{if("component-search__resultitme"!==e.target.className)return;r=e.target}document.getElementsByClassName("component-search__resultitme-selected").length>0&&document.getElementsByClassName("component-search__resultitme-selected")[0].classList.remove("component-search__resultitme-selected"),r.firstChild.classList.add("component-search__resultitme-selected");var n=r.children[1].firstChild.innerText;t._linkageFeature(n)},e}();return n.appendChild(m),d.onclick=function(t){e.clearSearchResult(),y.value="",t.target.hidden=!0,v.closeView()},y.oninput=function(){d.hidden=!1},this.messageBox=new uR,this._addViewModelListener(),r.appendChild(n),this._preventMapEvent(r,this.map),r},_createSearchLayerItem:function(e){var t=document.createElement("div");t.setAttribute("class","component-search__layers__itme");var r=document.createElement("div");r.setAttribute("class","component-search__layers__itme__singleselect");var n=document.createElement("div");n.setAttribute("class","component-single-default-img"),r.appendChild(n);var o=document.createElement("span");o.setAttribute("class","single-label"),o.innerHTML=e,r.appendChild(o),t.appendChild(r),document.getElementsByClassName("component-search__layers__body")[0].appendChild(t)},_createResultItem:function(e,t){var r=document.createElement("div");r.setAttribute("class","component-search__resultitme");var n=document.createElement("div");"Point"===e||"MultiPoint"===e?n.setAttribute("class","supermapol-icons-marker-layer component-search-result-icon"):"LineString"===e||"MultiLineString "===e?n.setAttribute("class","supermapol-icons-line-layer component-search-result-icon"):"Polygon"===e||"MultiPolygon"===e?n.setAttribute("class","supermapol-icons-polygon-layer component-search-result-icon"):n.setAttribute("class","supermapol-icons-point-layer component-search-result-icon"),r.appendChild(n);var o=document.createElement("div");o.setAttribute("class","component-search-result-info");var i=document.createElement("div");o.appendChild(i);var a=document.createElement("div");return t.name?(i.innerHTML=t.name,a.innerHTML=t.address,o.appendChild(a)):i.innerHTML=t.filterAttributeName+": "+t.filterAttributeValue,r.appendChild(o),document.createElement("div").setAttribute("class","component-checkbox component-checkbox-default-img"),r},_addViewModelListener:function(){var e=this;this.viewModel.on("searchlayerschanged",function(t){for(var r=0;rt.length?(n=this.perPageDataNum*(e-1),r=t.length-1):(n=this.perPageDataNum*(e-1),r=e*this.perPageDataNum-1);for(var o=document.createElement("div"),i=n;i<=r;i++){var a=void 0,s="Point";t[i].filterAttribute?(s=t[i].feature.geometry.type,a=t[i].filterAttribute):a=t[i].properties,o.appendChild(this._createResultItem(s,a))}this._resultDomObj.setContent(o),this._resultDomObj.showView(),o.firstChild.getElementsByClassName("component-search-result-icon")[0].classList.add("component-search__resultitme-selected");var l=o.firstChild.getElementsByClassName("component-search-result-info")[0].firstChild.innerText;!this._selectMarkerFeature&&this._linkageFeature(l)},_flyToBounds:function(e){var t=e.getSouthWest(),r=e.getNorthEast();t.lat===r.lat&&t.lng===r.lng?this.map.flyTo(t):this.map.fitBounds(e)},_linkageFeature:function(e){var t=this,r="";r=this.isSearchLayer?e.split(":")[1].trim():e,this._selectFeature&&this._selectFeature.addTo(this.map),this.searchResultLayer.eachLayer(function(e){(!r||e.filterAttribute&&e.filterAttribute.filterAttributeValue===r||e.feature.properties&&e.feature.properties.name===r)&&(e.remove(),t._setSelectedLayerStyle(e))})},clearSearchResult:function(){this.searchResultLayer&&(this.map.closePopup(),!this.isSearchLayer&&this.map.removeLayer(this.searchResultLayer),this._selectMarkerFeature&&this.map.removeLayer(this._selectMarkerFeature),this._selectFeaturethis&&this.map.removeLayer(this._selectFeature),this._selectMarkerFeature=null,this._selectFeature=null,this.searchResultLayer=null,this.currentResult=null)},_featureOnclickEvent:function(e,t){var r=this;t.on("click",function(){var n,o,i=document.getElementsByClassName("component-pagination__link")[0];r._resultDomObj._changePageEvent({target:i.children[0].children[0]}),r._selectFeature&&r._selectFeature.addTo(r.map),t.remove();for(var a=0;a1)for(var l=1;l0&&document.getElementsByClassName("component-search__resultitme-selected")[0].classList.remove("component-search__resultitme-selected"),p.firstChild.classList.add("component-search__resultitme-selected"),r._setSelectedLayerStyle(t)}},this)},_setSelectedLayerStyle:function(e){var t;this._selectMarkerFeature&&this._selectMarkerFeature.remove(),this._selectMarkerFeature=null,this._selectFeature=e,this._selectMarkerFeature=kA().geoJSON(e.toGeoJSON(),{pointToLayer:function(e,t){return kA().marker(t,{icon:kA().divIcon({className:"component-select-marker-icon",iconAnchor:[15,0]})})},style:{fillColor:"red",weight:1,opacity:1,color:"red",fillOpacity:.2}}).addTo(this.map),this._selectMarkerFeature.bindPopup(function(){return new eA({attributes:e.feature.properties}).getElement()},{closeOnClick:!1}).openPopup().addTo(this.map),this._flyToBounds(this.searchResultLayer.getBounds()),e.getLatLng?t=e.getLatLng():e.getCenter&&(t=e.getCenter()),this.map.setView(t)}}),mG=kA().Evented.extend({options:{_defaultLayerOptions:{style:null,onEachFeature:function(e,t){var r="属性信息如下:
";for(var n in e.properties)r+=n+": "+e.properties[n]+"
";t.bindPopup(r)}}},initialize:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if(!e)return new Error("Cannot find map, fileModel.map cannot be null.");this.map=e,kA().Util.extend(this.options._defaultLayerOptions,t),this.options._defaultLayerOptions.pointToLayer=this.options._defaultLayerOptions.style,this.popupsStatus=!0,this.dataFlowStatus=!1,this.dataFlowUrl="",this.currentFeatures=[],this.dataFlowLayer=null},subscribe:function(e){var t=this;if(this.dataFlowUrl===e){if(this.dataFlowStatus)return void this.fire("dataflowservicesubscribed")}else this.dataFlowUrl=e;this.dataFlowStatus=!0,this.dataFlowLayer&&(this.dataFlowLayer.remove(),this.dataFlowLayer=null);var r=new HF(e,this.options._defaultLayerOptions);r.on("subscribesucceeded",function(e){t.fire("subscribesucceeded",{result:e})}),r.on("subscribefailed",function(e){t.fire("subscribefailed",{result:e})}),r.on("dataupdated",function(e){t.fire("dataupdated",{result:e});var r=e.layer.getBounds(),n=vI.toSuperMapBounds(t.map.getBounds()),o=vI.toSuperMapBounds(r);n.intersectsBounds(o)||(o.left===o.right&&o.top===o.bottom?t.map.setView(r.getCenter()):t.map.flyToBounds(r)),t.popupsStatus&&t.openPopups()}),r.addTo(this.map),this.dataFlowLayer=r},cancelSubscribe:function(){this.dataFlowLayer&&(this.dataFlowStatus=!1,this.dataFlowLayer.dataService.unSubscribe(),this.dataFlowLayer.remove(),this.dataFlowLayer=null)},openPopups:function(){if(this.popupsStatus=!0,this.dataFlowLayer)for(var e=this.dataFlowLayer.getLayers(),t=0;t\n \n \n \n \n ',kA().DomUtil.create("span","",K).innerHTML=pR.i18n("btn_analyzing");var ee=kA().DomUtil.create("button","component-analysis__analysisbtn--cancel",Z);ee.innerHTML=pR.i18n("btn_cancelAnalysis");var te=kA().DomUtil.create("button","component-analysis__analysisbtn--analysis component-analysis__analysisbtn--deletelayers",Q);te.innerHTML=pR.i18n("btn_emptyTheAnalysisLayer");for(var re=function(t){a.children[t].onclick=function(){i.innerHTML=a.children[t].outerHTML,i.children[0].id="dropDownTop";var r=document.getElementById("layersSelect"),o=document.getElementById("layerSelectName"),s=a.children[t].getAttribute("data-value"),l={};switch(s){case"buffer":d.classList.add("hidden"),M.classList.remove("hidden"),n.style.height="422px",W.value=pR.i18n("text_label_buffer")+o.title,l=e.fillData.point;break;case"isolines":d.classList.remove("hidden"),M.classList.add("hidden"),n.style.height="712px",W.value=pR.i18n("text_label_isolines")+o.title,l=e.fillData.point}if(e.currentFillData!==l){if(r.innerHTML="","{}"==JSON.stringify(l))return W.value="",o.title="",void(o.innerHTML="");var u=[];for(var c in l)u.push(c);o.title=u[0],o.innerHTML=u[0],e._createOptions(r,u),e.layerSelectObj.optionClickEvent(r,o,e.layersSelectOnchange),"buffer"===s?W.value=pR.i18n("text_label_buffer")+u[0]:"isolines"===s&&(W.value=pR.i18n("text_label_isolines")+u[0]),e.currentData=l[o.title],e.currentFillData=l}}},ne=0;ne\n \n \n \n \n ',kA().DomUtil.create("span","",ne).innerHTML=pR.i18n("btn_analyzing");var oe=kA().DomUtil.create("button","component-analysis__analysisbtn--analysis component-analysis__analysisbtn--deletelayers",ee);function ie(e){if(this.messageBox.closeView(),this.dataHash){E.innerHTML="";var t=this.dataHash[e.title],r=this;this.viewModel.on("datasetinfoloaded",function(e){T.title=pR.i18n("text_option_notSet"),T.innerHTML=pR.i18n("text_option_notSet"),E.innerHTML="";var t=i.getAttribute("data-value"),n=e.result.type,o=e.result.fields;"density"===t&&("REGION"===n||"LINE"===n?r.messageBox.showView(pR.i18n("msg_datasetOrMethodUnsupport"),"failure"):(r.messageBox.closeView(),r._createOptions(E,o),r.weightFieldsSelectObj.optionClickEvent(E,T)))}),this.viewModel.getDatasetInfo(t)}}return oe.id="deleteLayersBtn",oe.innerHTML=pR.i18n("btn_emptyTheAnalysisLayer"),this.messageBox=new uR,this.datasetSelectOnchange=ie.bind(this),te.onclick=function(){e.messageBox.closeView();var t=function(){var e,t,r=i.getAttribute("data-value"),n=_.getAttribute("data-value"),o=x.getAttribute("data-value"),a=M.value,s=N.title,l=B.title,u=z.title,c=X.getAttribute("data-value"),f=q.getAttribute("data-value"),p=new Date,y=K.value||p.getTime();e="NOTSET"===f?"":{rangeMode:f,rangeCount:W.value,colorGradientType:c};"density"===r&&(t=new Tv({datasetName:h.title,method:n,meshType:o,resolution:L.value,fields:T.title,radius:F.value,meshSizeUnit:s,radiusUnit:l,areaUnit:u,query:a,mappingParameters:new Gi({rangeMode:e.rangeMode,rangeCount:e.rangeCount,colorGradientType:e.colorGradientType})}));return{analysisParam:t,resultLayerName:y}}();h.title===pR.i18n("text_option_selectDataset")?e.messageBox.showView(pR.i18n("msg_selectDataset"),"failure"):T.title===pR.i18n("text_option_notSet")?e.messageBox.showView(pR.i18n("msg_setTheWeightField"),"failure"):(e.messageBox.closeView(),re.style.display="block",te.style.display="none",e.viewModel.on("layerloaded",function(t){re.style.display="none",te.style.display="block",e._event.fire("analysissucceeded",{layer:t.layer,name:t.name})}),e.viewModel.on("analysisfailed",function(t){e.messageBox.showView(pR.i18n("msg_theFieldNotSupportAnalysis"),"failure"),re.style.display="none",te.style.display="block",e._event.fire("analysisfailed",{error:t.error})}),e.viewModel.analysis(t,e.map))},oe.onclick=function(){e.viewModel.on("layersremoved",function(t){e._event.fire("layersremoved",{layers:t.layers})}),e.viewModel.clearLayers()},this._preventMapEvent(t,this.map),t},_createOptions:function(e,t){for(var r in t){var n=document.createElement("div");n.className="component-selecttool__option",n.title=t[r],n.innerHTML=t[r],n.setAttribute("data-value",t[r]),e.appendChild(n)}},_creatInputBox:function(e,t){var r=kA().DomUtil.create("div","",t);kA().DomUtil.create("span","",r).innerHTML=e.spanName;var n=kA().DomUtil.create("input","",r);return n.value=e.value,n.className="component-distributeanalysis__input",r},_creatUnitSelectBox:function(e,t){var r=kA().DomUtil.create("div","component-clientcomputation__buffer--radius",t);kA().DomUtil.create("span","",r).innerHTML=e.labelName;var n=kA().DomUtil.create("div","",r);kA().DomUtil.create("input","buffer-radius-input",n);var o=kA().DomUtil.create("div","component-clientcomputation__buffer--unit",n),i=e.selectOptions,a=new DR(i).getElement();return o.appendChild(a),r},_setEleAtribute:function(e,t,r){for(var n=0;n1){var n={optionsArr:e,labelName:pR.i18n("text_label_queryMode"),optionsClickCb:this.queryModeltOnchange},o=new DR(n).getElement();t.appendChild(o),r=o.children[1].children[0],o.children[1].classList.add("dataservice-select");var i=o.children[1];i.classList.add("dataservice-select"),i.classList.add("querymodel-select")}else{var a=kA().DomUtil.create("span","",l);a.innerHTML=pR.i18n("text_label_queryMode"),r=kA().DomUtil.create("div","component-servicequery__querymode-selectname",l);var s=kA().DomUtil.create("span","",r);e instanceof Array?s.innerHTML=e[0]:s.innerHTML=e,r.title=s.innerHTML,this.queryModeltOnchange(r)}return r.id="queryModelSelectName",r}.bind(this),this.queryModeltOnchange=W.bind(this),this.creatQueryModeSelect(n,u);var c=kA().DomUtil.create("div","component-analysis__container component-textarea--dataservice__container",a),f=kA().DomUtil.create("span","textarea-name",c);f.innerHTML=pR.i18n("text_label_IDArrayOfFeatures");var p=kA().DomUtil.create("div","component-textarea component-textarea--dataservice",c);p.id="getfeaturesIdArr";var h=kA().DomUtil.create("div","scrollarea",p),y=kA().DomUtil.create("div","component-scrollarea-content",h);y.setAttribute("tabindex","1");var d=kA().DomUtil.create("textarea","component-textarea__content",y);d.value="[1,2,3]",d.id="getValueTextArea";var b=kA().DomUtil.create("div","component-servicequery__maxfeatures-container hidden",a),v={spanName:pR.i18n("text_label_maxFeatures"),value:"1000"},m=this._creatInputBox(v,b).children[1];m.classList.add("max-features-input");var g=kA().DomUtil.create("div","component-servicequery__distance-container hidden",a),w={spanName:pR.i18n("text_label_bufferDistance"),value:"10"},O=this._creatInputBox(w,g).children[1],S=kA().DomUtil.create("div","component-analysis__container component-textarea--dataservice__container hidden",a),_=kA().DomUtil.create("span","textarea-name",S),P=kA().DomUtil.create("div","",S),x=kA().DomUtil.create("div","component-servicequery__rangeicon-container",P);_.innerHTML=pR.i18n("text_label_queryRange1");var C=kA().DomUtil.create("div","component-servicequery__rangeicon supermapol-icons-polygon-layer bounds",x),T=kA().DomUtil.create("div","component-servicequery__rangeicon supermapol-icons-line-layer hidden",x),E=kA().DomUtil.create("div","component-servicequery__rangeicon supermapol-icons-point-layer hidden",x),j=kA().DomUtil.create("div","component-textarea component-textarea--rangequery",P);j.id="getfeaturesIdArr";var k=kA().DomUtil.create("div","",j),M=kA().DomUtil.create("div","component-scrollarea-content",k);M.setAttribute("tabindex","1");var R=kA().DomUtil.create("textarea","component-textarea__content component-textarea--rangequery__content",M);R.value='{"leftBottom":{"x":-5,"y":-5},"rightTop":{"x":5,"y":5}}';var A=kA().DomUtil.create("div","component-servicequery__spatialquerymode-container hidden",a),L={optionsArr:["CONTAIN","CROSS","DISJOINT","IDENTITY","INTERSECT","NONE","OVERLAP","TOUCH","WITHIN"],labelName:pR.i18n("text_label_spatialQueryMode")},N=kA().DomUtil.create("div","component-analysis__selecttool",A),D=new DR(L).getElement();D.children[1].classList.add("dataservice-select"),N.appendChild(D);var I=D.children[1].children[0];I.id="spatialQueryModeSelectName",D.children[1].children[2].classList.add("component-servicequery__spatialquerymode__selectcontent");var F=kA().DomUtil.create("div","component-analysis__container__analysisbtn",a),B=kA().DomUtil.create("div","component-analysis__analysisbtn",F),G=kA().DomUtil.create("button","component-analysis__analysisbtn--analysis",B);G.innerHTML=pR.i18n("btn_query");var U=kA().DomUtil.create("div","component-analysis__analysisbtn--analysing-container hidden",B),z=kA().DomUtil.create("div","component-analysis__analysisbtn--analysising component-servicequery__querybtn--querying",U);kA().DomUtil.create("div","component-analysis__svg-container",z).innerHTML='\n \n \n \n \n ',kA().DomUtil.create("span","",z).innerHTML=pR.i18n("btn_querying");var V=kA().DomUtil.create("button","component-analysis__analysisbtn--analysis component-analysis__analysisbtn--deletelayers",B);V.innerHTML=pR.i18n("btn_emptyTheRresultLayer"),W(n[0]);var J,q,H=this;function W(e){var t;switch(t=e.title?e.title:e,b.classList.add("hidden"),S.classList.add("hidden"),g.classList.add("hidden"),T.classList.add("hidden"),E.classList.add("hidden"),C.classList.remove("bounds"),A.classList.add("hidden"),f.innerHTML=pR.i18n("text_label_featureFilter"),d.value="SMID<10","BUFFER"!==t&&"SPATIAL"!==t||(S.classList.remove("hidden"),_.innerHTML=pR.i18n("text_label_geometricObject"),R.value='{"type":"Feature","properties":{},"geometry":{"type":"Point","coordinates":[84.90234375,40.25390625]}}',T.classList.remove("hidden"),E.classList.remove("hidden")),t){case"ID":f.innerHTML=pR.i18n("text_label_IDArrayOfFeatures"),d.value="[1,2,3]";break;case"SQL":b.classList.remove("hidden");break;case"BOUNDS":S.classList.remove("hidden"),_.innerHTML=pR.i18n("text_label_queryRange"),R.value='{"leftBottom":{"x":-5,"y":-5},"rightTop":{"x":5,"y":5}}',C.classList.add("bounds");break;case"BUFFER":g.classList.remove("hidden");break;case"SPATIAL":A.classList.remove("hidden")}}return G.onclick=function(){e.messageBox.closeView(),U.style.display="block",G.style.display="none";var t=function(){var e,t=H.dataSetNames,r=document.getElementById("queryModelSelectName").title,n=d.value;if("ID"===r){var o=d.value,i=o.substring(1,o.length-1).split(",");e=new Eh({IDs:i,datasetNames:t})}else if("SQL"===r){var a=m.value;e=new Vh({queryParameter:{attributeFilter:n},datasetNames:t,maxFeatures:a})}else if("BOUNDS"===r){if(!J){var s=JSON.parse(R.value);J=kA().bounds([s.leftBottom.x,s.leftBottom.y],[s.rightTop.x,s.rightTop.y])}e=new jp({attributeFilter:n,datasetNames:t,bounds:J})}else if("BUFFER"===r){var l=O.value,u=JSON.parse(R.value),c=q||u;e=new Kp({attributeFilter:n,datasetNames:t,bufferDistance:l,geometry:c})}else if("SPATIAL"===r){var f=I.title,p=JSON.parse(R.value),h=q||p;e=new hh({attributeFilter:n,datasetNames:t,spatialQueryMode:f,geometry:h})}return e}();e.viewModel.on("getfeaturessucceeded",function(t){U.style.display="none",G.style.display="block",0===t.result.features.length&&e.messageBox.showView(pR.i18n("msg_dataReturnedIsEmpty"),"success"),e._event.fire("getfeaturessucceeded",{result:t.result})}),e.viewModel.on("getfeaturesfailed",function(t){U.style.display="none",G.style.display="block",e.messageBox.showView(t.error.errorMsg,"failure"),e._event.fire("getfeaturesfailed",{error:t.error})}),e.viewModel.getFeatures(t,e.map)},C.onclick=function(t){var r=document.getElementById("queryModelSelectName").title;q&&q.remove(),"BOUNDS"===r?e.map.pm.enableDraw("Rectangle"):e.map.pm.enableDraw("Poly"),t.stopPropagation(),t.preventDefault()},T.onclick=function(t){q&&q.remove(),e.map.pm.enableDraw("Line"),t.stopPropagation(),t.preventDefault()},E.onclick=function(t){q&&q.remove(),e.map.pm.enableDraw("Marker"),t.stopPropagation(),t.preventDefault()},this.map.on("pm:create",function(t){if("Rectangle"===t.shape){var r=(q=t.layer).getBounds();J=kA().bounds([r._southWest.lng,r._southWest.lat],[r._northEast.lng,r._northEast.lat]);var n={leftBottom:{x:r._southWest.lng,y:r._southWest.lat},rightTop:{x:r._northEast.lng,y:r._northEast.lat}};R.value=JSON.stringify(n)}"Marker"===t.shape&&(q=t.layer,R.value=JSON.stringify(t.layer.toGeoJSON()),e.map.pm.disableDraw("Marker")),"Line"===t.shape&&(q=t.layer,R.value=JSON.stringify(t.layer.toGeoJSON())),"Polygon"===t.shape&&(q=t.layer,R.value=JSON.stringify(t.layer.toGeoJSON()))}),V.onclick=function(){e.viewModel.clearLayers()},this._preventMapEvent(t,this.map),t},_creatInputBox:function(e,t){var r=kA().DomUtil.create("div","",t);return kA().DomUtil.create("span","",r).innerHTML=e.spanName,kA().DomUtil.create("input","",r).value=e.value,r}});function ZG(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 KG(e){for(var t=1;t