rk-web-core 0.11.21 → 0.11.22

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/rk-web-core.js CHANGED
@@ -1,4 +1,4 @@
1
- !function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define("rk-web-core",[],e):"object"==typeof exports?exports["rk-web-core"]=e():t["rk-web-core"]=e()}(window,(function(){return function(t){function e(e){for(var n,r,i=e[0],o=e[1],a=0,s=[];a<i.length;a++)r=i[a],Object.prototype.hasOwnProperty.call(L,r)&&L[r]&&s.push(L[r][0]),L[r]=0;for(n in o)Object.prototype.hasOwnProperty.call(o,n)&&(t[n]=o[n]);for(D&&D(e);s.length;)s.shift()()}var n=window.webpackHotUpdaterk_web_core;window.webpackHotUpdaterk_web_core=function(t,e){!function(t,e){if(!w[t]||!x[t])return;for(var n in x[t]=!1,e)Object.prototype.hasOwnProperty.call(e,n)&&(m[n]=e[n]);0==--y&&0===_&&E()}(t,e),n&&n(t,e)};var r,i=!0,o="5fb701260a00a8d2a2f6",a={},s=[],c=[];function u(t){var e=P[t];if(!e)return R;var n=function(n){return e.hot.active?(P[n]?-1===P[n].parents.indexOf(t)&&P[n].parents.push(t):(s=[t],r=n),-1===e.children.indexOf(n)&&e.children.push(n)):(console.warn("[HMR] unexpected require("+n+") from disposed module "+t),s=[]),R(n)},i=function(t){return{configurable:!0,enumerable:!0,get:function(){return R[t]},set:function(e){R[t]=e}}};for(var o in R)Object.prototype.hasOwnProperty.call(R,o)&&"e"!==o&&"t"!==o&&Object.defineProperty(n,o,i(o));return n.e=function(t){return"ready"===f&&d("prepare"),_++,R.e(t).then(e,(function(t){throw e(),t}));function e(){_--,"prepare"===f&&(b[t]||A(t),0===_&&0===y&&E())}},n.t=function(t,e){return 1&e&&(t=n(t)),R.t(t,-2&e)},n}function l(e){var n={_acceptedDependencies:{},_declinedDependencies:{},_selfAccepted:!1,_selfDeclined:!1,_selfInvalidated:!1,_disposeHandlers:[],_main:r!==e,active:!0,accept:function(t,e){if(void 0===t)n._selfAccepted=!0;else if("function"==typeof t)n._selfAccepted=t;else if("object"==typeof t)for(var r=0;r<t.length;r++)n._acceptedDependencies[t[r]]=e||function(){};else n._acceptedDependencies[t]=e||function(){}},decline:function(t){if(void 0===t)n._selfDeclined=!0;else if("object"==typeof t)for(var e=0;e<t.length;e++)n._declinedDependencies[t[e]]=!0;else n._declinedDependencies[t]=!0},dispose:function(t){n._disposeHandlers.push(t)},addDisposeHandler:function(t){n._disposeHandlers.push(t)},removeDisposeHandler:function(t){var e=n._disposeHandlers.indexOf(t);e>=0&&n._disposeHandlers.splice(e,1)},invalidate:function(){switch(this._selfInvalidated=!0,f){case"idle":(m={})[e]=t[e],d("ready");break;case"ready":I(e);break;case"prepare":case"check":case"dispose":case"apply":(v=v||[]).push(e)}},check:S,apply:C,status:function(t){if(!t)return f;h.push(t)},addStatusHandler:function(t){h.push(t)},removeStatusHandler:function(t){var e=h.indexOf(t);e>=0&&h.splice(e,1)},data:a[e]};return r=void 0,n}var h=[],f="idle";function d(t){f=t;for(var e=0;e<h.length;e++)h[e].call(null,t)}var p,m,g,v,y=0,_=0,b={},x={},w={};function M(t){return+t+""===t?+t:t}function S(t){if("idle"!==f)throw new Error("check() is only allowed in idle status");return i=t,d("check"),(e=1e4,e=e||1e4,new Promise((function(t,n){if("undefined"==typeof XMLHttpRequest)return n(new Error("No browser support"));try{var r=new XMLHttpRequest,i=R.p+""+o+".hot-update.json";r.open("GET",i,!0),r.timeout=e,r.send(null)}catch(t){return n(t)}r.onreadystatechange=function(){if(4===r.readyState)if(0===r.status)n(new Error("Manifest request to "+i+" timed out."));else if(404===r.status)t();else if(200!==r.status&&304!==r.status)n(new Error("Manifest request to "+i+" failed."));else{try{var e=JSON.parse(r.responseText)}catch(t){return void n(t)}t(e)}}}))).then((function(t){if(!t)return d(T()?"ready":"idle"),null;x={},b={},w=t.c,g=t.h,d("prepare");var e=new Promise((function(t,e){p={resolve:t,reject:e}}));for(var n in m={},L)A(n);return"prepare"===f&&0===_&&0===y&&E(),e}));var e}function A(t){w[t]?(x[t]=!0,y++,function(t){var e=document.createElement("script");e.charset="utf-8",e.src=R.p+""+t+"."+o+".hot-update.js",e.crossOrigin="anonymous",document.head.appendChild(e)}(t)):b[t]=!0}function E(){d("ready");var t=p;if(p=null,t)if(i)Promise.resolve().then((function(){return C(i)})).then((function(e){t.resolve(e)}),(function(e){t.reject(e)}));else{var e=[];for(var n in m)Object.prototype.hasOwnProperty.call(m,n)&&e.push(M(n));t.resolve(e)}}function C(e){if("ready"!==f)throw new Error("apply() is only allowed in ready status");return function e(n){var i,c,u,l,h;function f(t){for(var e=[t],n={},r=e.map((function(t){return{chain:[t],id:t}}));r.length>0;){var i=r.pop(),o=i.id,a=i.chain;if((l=P[o])&&(!l.hot._selfAccepted||l.hot._selfInvalidated)){if(l.hot._selfDeclined)return{type:"self-declined",chain:a,moduleId:o};if(l.hot._main)return{type:"unaccepted",chain:a,moduleId:o};for(var s=0;s<l.parents.length;s++){var c=l.parents[s],u=P[c];if(u){if(u.hot._declinedDependencies[o])return{type:"declined",chain:a.concat([c]),moduleId:o,parentId:c};-1===e.indexOf(c)&&(u.hot._acceptedDependencies[o]?(n[c]||(n[c]=[]),p(n[c],[o])):(delete n[c],e.push(c),r.push({chain:a.concat([c]),id:c})))}}}}return{type:"accepted",moduleId:t,outdatedModules:e,outdatedDependencies:n}}function p(t,e){for(var n=0;n<e.length;n++){var r=e[n];-1===t.indexOf(r)&&t.push(r)}}T();var y={},_=[],b={},x=function(){console.warn("[HMR] unexpected require("+A.moduleId+") to disposed module")};for(var S in m)if(Object.prototype.hasOwnProperty.call(m,S)){var A;h=M(S),A=m[S]?f(h):{type:"disposed",moduleId:S};var E=!1,C=!1,I=!1,O="";switch(A.chain&&(O="\nUpdate propagation: "+A.chain.join(" -> ")),A.type){case"self-declined":n.onDeclined&&n.onDeclined(A),n.ignoreDeclined||(E=new Error("Aborted because of self decline: "+A.moduleId+O));break;case"declined":n.onDeclined&&n.onDeclined(A),n.ignoreDeclined||(E=new Error("Aborted because of declined dependency: "+A.moduleId+" in "+A.parentId+O));break;case"unaccepted":n.onUnaccepted&&n.onUnaccepted(A),n.ignoreUnaccepted||(E=new Error("Aborted because "+h+" is not accepted"+O));break;case"accepted":n.onAccepted&&n.onAccepted(A),C=!0;break;case"disposed":n.onDisposed&&n.onDisposed(A),I=!0;break;default:throw new Error("Unexception type "+A.type)}if(E)return d("abort"),Promise.reject(E);if(C)for(h in b[h]=m[h],p(_,A.outdatedModules),A.outdatedDependencies)Object.prototype.hasOwnProperty.call(A.outdatedDependencies,h)&&(y[h]||(y[h]=[]),p(y[h],A.outdatedDependencies[h]));I&&(p(_,[A.moduleId]),b[h]=x)}var k,B=[];for(c=0;c<_.length;c++)h=_[c],P[h]&&P[h].hot._selfAccepted&&b[h]!==x&&!P[h].hot._selfInvalidated&&B.push({module:h,parents:P[h].parents.slice(),errorHandler:P[h].hot._selfAccepted});d("dispose"),Object.keys(w).forEach((function(t){!1===w[t]&&function(t){delete L[t]}(t)}));var D,F,j=_.slice();for(;j.length>0;)if(h=j.pop(),l=P[h]){var U={},N=l.hot._disposeHandlers;for(u=0;u<N.length;u++)(i=N[u])(U);for(a[h]=U,l.hot.active=!1,delete P[h],delete y[h],u=0;u<l.children.length;u++){var z=P[l.children[u]];z&&((k=z.parents.indexOf(h))>=0&&z.parents.splice(k,1))}}for(h in y)if(Object.prototype.hasOwnProperty.call(y,h)&&(l=P[h]))for(F=y[h],u=0;u<F.length;u++)D=F[u],(k=l.children.indexOf(D))>=0&&l.children.splice(k,1);d("apply"),void 0!==g&&(o=g,g=void 0);for(h in m=void 0,b)Object.prototype.hasOwnProperty.call(b,h)&&(t[h]=b[h]);var G=null;for(h in y)if(Object.prototype.hasOwnProperty.call(y,h)&&(l=P[h])){F=y[h];var H=[];for(c=0;c<F.length;c++)if(D=F[c],i=l.hot._acceptedDependencies[D]){if(-1!==H.indexOf(i))continue;H.push(i)}for(c=0;c<H.length;c++){i=H[c];try{i(F)}catch(t){n.onErrored&&n.onErrored({type:"accept-errored",moduleId:h,dependencyId:F[c],error:t}),n.ignoreErrored||G||(G=t)}}}for(c=0;c<B.length;c++){var W=B[c];h=W.module,s=W.parents,r=h;try{R(h)}catch(t){if("function"==typeof W.errorHandler)try{W.errorHandler(t)}catch(e){n.onErrored&&n.onErrored({type:"self-accept-error-handler-errored",moduleId:h,error:e,originalError:t}),n.ignoreErrored||G||(G=e),G||(G=t)}else n.onErrored&&n.onErrored({type:"self-accept-errored",moduleId:h,error:t}),n.ignoreErrored||G||(G=t)}}if(G)return d("fail"),Promise.reject(G);if(v)return e(n).then((function(t){return _.forEach((function(e){t.indexOf(e)<0&&t.push(e)})),t}));return d("idle"),new Promise((function(t){t(_)}))}(e=e||{})}function T(){if(v)return m||(m={}),v.forEach(I),v=void 0,!0}function I(e){Object.prototype.hasOwnProperty.call(m,e)||(m[e]=t[e])}var P={},L={0:0};function R(e){if(P[e])return P[e].exports;var n=P[e]={i:e,l:!1,exports:{},hot:l(e),parents:(c=s,s=[],c),children:[]};return t[e].call(n.exports,n,n.exports,u(e)),n.l=!0,n.exports}R.e=function(t){var e=[],n=L[t];if(0!==n)if(n)e.push(n[2]);else{var r=new Promise((function(e,r){n=L[t]=[e,r]}));e.push(n[2]=r);var i,a=document.createElement("script");a.charset="utf-8",a.timeout=120,R.nc&&a.setAttribute("nonce",R.nc),a.src=function(t){return R.p+""+t+"."+o+".js"}(t),0!==a.src.indexOf(window.location.origin+"/")&&(a.crossOrigin="anonymous");var s=new Error;i=function(e){a.onerror=a.onload=null,clearTimeout(c);var n=L[t];if(0!==n){if(n){var r=e&&("load"===e.type?"missing":e.type),i=e&&e.target&&e.target.src;s.message="Loading chunk "+t+" failed.\n("+r+": "+i+")",s.name="ChunkLoadError",s.type=r,s.request=i,n[1](s)}L[t]=void 0}};var c=setTimeout((function(){i({type:"timeout",target:a})}),12e4);a.onerror=a.onload=i,document.head.appendChild(a)}return Promise.all(e)},R.m=t,R.c=P,R.d=function(t,e,n){R.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},R.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},R.t=function(t,e){if(1&e&&(t=R(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(R.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var r in t)R.d(n,r,function(e){return t[e]}.bind(null,r));return n},R.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return R.d(e,"a",e),e},R.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},R.p="./",R.oe=function(t){throw console.error(t),t},R.h=function(){return o};var O=window.webpackJsonprk_web_core=window.webpackJsonprk_web_core||[],k=O.push.bind(O);O.push=e,O=O.slice();for(var B=0;B<O.length;B++)e(O[B]);var D=k;return u(101)(R.s=101)}([function(t,e,n){(function(e){var r;t.exports=(r=r||function(t,r){var i;if("undefined"!=typeof window&&window.crypto&&(i=window.crypto),"undefined"!=typeof self&&self.crypto&&(i=self.crypto),"undefined"!=typeof globalThis&&globalThis.crypto&&(i=globalThis.crypto),!i&&"undefined"!=typeof window&&window.msCrypto&&(i=window.msCrypto),!i&&void 0!==e&&e.crypto&&(i=e.crypto),!i)try{i=n(286)}catch(t){}var o=function(){if(i){if("function"==typeof i.getRandomValues)try{return i.getRandomValues(new Uint32Array(1))[0]}catch(t){}if("function"==typeof i.randomBytes)try{return i.randomBytes(4).readInt32LE()}catch(t){}}throw new Error("Native crypto module could not be used to get secure random number.")},a=Object.create||function(){function t(){}return function(e){var n;return t.prototype=e,n=new t,t.prototype=null,n}}(),s={},c=s.lib={},u=c.Base={extend:function(t){var e=a(this);return t&&e.mixIn(t),e.hasOwnProperty("init")&&this.init!==e.init||(e.init=function(){e.$super.init.apply(this,arguments)}),e.init.prototype=e,e.$super=this,e},create:function(){var t=this.extend();return t.init.apply(t,arguments),t},init:function(){},mixIn:function(t){for(var e in t)t.hasOwnProperty(e)&&(this[e]=t[e]);t.hasOwnProperty("toString")&&(this.toString=t.toString)},clone:function(){return this.init.prototype.extend(this)}},l=c.WordArray=u.extend({init:function(t,e){t=this.words=t||[],this.sigBytes=null!=e?e:4*t.length},toString:function(t){return(t||f).stringify(this)},concat:function(t){var e=this.words,n=t.words,r=this.sigBytes,i=t.sigBytes;if(this.clamp(),r%4)for(var o=0;o<i;o++){var a=n[o>>>2]>>>24-o%4*8&255;e[r+o>>>2]|=a<<24-(r+o)%4*8}else for(var s=0;s<i;s+=4)e[r+s>>>2]=n[s>>>2];return this.sigBytes+=i,this},clamp:function(){var e=this.words,n=this.sigBytes;e[n>>>2]&=4294967295<<32-n%4*8,e.length=t.ceil(n/4)},clone:function(){var t=u.clone.call(this);return t.words=this.words.slice(0),t},random:function(t){for(var e=[],n=0;n<t;n+=4)e.push(o());return new l.init(e,t)}}),h=s.enc={},f=h.Hex={stringify:function(t){for(var e=t.words,n=t.sigBytes,r=[],i=0;i<n;i++){var o=e[i>>>2]>>>24-i%4*8&255;r.push((o>>>4).toString(16)),r.push((15&o).toString(16))}return r.join("")},parse:function(t){for(var e=t.length,n=[],r=0;r<e;r+=2)n[r>>>3]|=parseInt(t.substr(r,2),16)<<24-r%8*4;return new l.init(n,e/2)}},d=h.Latin1={stringify:function(t){for(var e=t.words,n=t.sigBytes,r=[],i=0;i<n;i++){var o=e[i>>>2]>>>24-i%4*8&255;r.push(String.fromCharCode(o))}return r.join("")},parse:function(t){for(var e=t.length,n=[],r=0;r<e;r++)n[r>>>2]|=(255&t.charCodeAt(r))<<24-r%4*8;return new l.init(n,e)}},p=h.Utf8={stringify:function(t){try{return decodeURIComponent(escape(d.stringify(t)))}catch(t){throw new Error("Malformed UTF-8 data")}},parse:function(t){return d.parse(unescape(encodeURIComponent(t)))}},m=c.BufferedBlockAlgorithm=u.extend({reset:function(){this._data=new l.init,this._nDataBytes=0},_append:function(t){"string"==typeof t&&(t=p.parse(t)),this._data.concat(t),this._nDataBytes+=t.sigBytes},_process:function(e){var n,r=this._data,i=r.words,o=r.sigBytes,a=this.blockSize,s=o/(4*a),c=(s=e?t.ceil(s):t.max((0|s)-this._minBufferSize,0))*a,u=t.min(4*c,o);if(c){for(var h=0;h<c;h+=a)this._doProcessBlock(i,h);n=i.splice(0,c),r.sigBytes-=u}return new l.init(n,u)},clone:function(){var t=u.clone.call(this);return t._data=this._data.clone(),t},_minBufferSize:0}),g=(c.Hasher=m.extend({cfg:u.extend(),init:function(t){this.cfg=this.cfg.extend(t),this.reset()},reset:function(){m.reset.call(this),this._doReset()},update:function(t){return this._append(t),this._process(),this},finalize:function(t){return t&&this._append(t),this._doFinalize()},blockSize:16,_createHelper:function(t){return function(e,n){return new t.init(n).finalize(e)}},_createHmacHelper:function(t){return function(e,n){return new g.HMAC.init(t,n).finalize(e)}}}),s.algo={});return s}(Math),r)}).call(this,n(15))},function(t,e){var n=t.exports={version:"2.6.12"};"number"==typeof __e&&(__e=n)},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getWidth=e.isOverManyTarget=e.getAllChildren=e.treeFindPath=e.prefixCls=void 0;var r,i=n(34),o=(r=i)&&r.__esModule?r:{default:r};e.prefixCls="rk-web-core",e.treeFindPath=function t(e,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];if(!e)return[];var i=!0,a=!1,s=void 0;try{for(var c,u=(0,o.default)(e);!(i=(c=u.next()).done);i=!0){var l=c.value;if(r.push(l),n(l))return r;if(l.children){var h=t(l.children,n,r);if(h.length)return h}r.pop()}}catch(t){a=!0,s=t}finally{try{!i&&u.return&&u.return()}finally{if(a)throw s}}return[]},e.getAllChildren=function(t){var e=t.componentOptions||{};return t.$vnode&&(e=t.$vnode.componentOptions||{}),t.children||e.children||[]},e.isOverManyTarget=function(t,e){if(t===e)return!1;var n=parseInt(t.style.left),r=parseInt(t.style.top),i=n+parseInt(t.style.width),o=r+parseInt(t.style.height),a=parseInt(e.style.left),s=parseInt(e.style.top),c=a+parseInt(e.style.width),u=s+parseInt(e.style.height),l=Math.min(i,c)-Math.max(n,a),h=Math.min(o,u)-Math.max(r,s),f=(l>0?l:0)*(h>0?h:0),d=parseInt(t.style.width)*parseInt(t.style.height);return f>d/2&&f<=d?t:null},e.getWidth=function(t){var e=t&&"function"==typeof t.getBoundingClientRect&&t.getBoundingClientRect().width;return e&&(e=+e.toFixed(6)),e||0}},function(t,e,n){(function(t,r){var i;
1
+ !function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define("rk-web-core",[],e):"object"==typeof exports?exports["rk-web-core"]=e():t["rk-web-core"]=e()}(window,(function(){return function(t){function e(e){for(var n,r,i=e[0],o=e[1],a=0,s=[];a<i.length;a++)r=i[a],Object.prototype.hasOwnProperty.call(L,r)&&L[r]&&s.push(L[r][0]),L[r]=0;for(n in o)Object.prototype.hasOwnProperty.call(o,n)&&(t[n]=o[n]);for(D&&D(e);s.length;)s.shift()()}var n=window.webpackHotUpdaterk_web_core;window.webpackHotUpdaterk_web_core=function(t,e){!function(t,e){if(!w[t]||!x[t])return;for(var n in x[t]=!1,e)Object.prototype.hasOwnProperty.call(e,n)&&(m[n]=e[n]);0==--y&&0===_&&E()}(t,e),n&&n(t,e)};var r,i=!0,o="4ca1be873ad869e19c1b",a={},s=[],c=[];function u(t){var e=P[t];if(!e)return R;var n=function(n){return e.hot.active?(P[n]?-1===P[n].parents.indexOf(t)&&P[n].parents.push(t):(s=[t],r=n),-1===e.children.indexOf(n)&&e.children.push(n)):(console.warn("[HMR] unexpected require("+n+") from disposed module "+t),s=[]),R(n)},i=function(t){return{configurable:!0,enumerable:!0,get:function(){return R[t]},set:function(e){R[t]=e}}};for(var o in R)Object.prototype.hasOwnProperty.call(R,o)&&"e"!==o&&"t"!==o&&Object.defineProperty(n,o,i(o));return n.e=function(t){return"ready"===f&&d("prepare"),_++,R.e(t).then(e,(function(t){throw e(),t}));function e(){_--,"prepare"===f&&(b[t]||A(t),0===_&&0===y&&E())}},n.t=function(t,e){return 1&e&&(t=n(t)),R.t(t,-2&e)},n}function l(e){var n={_acceptedDependencies:{},_declinedDependencies:{},_selfAccepted:!1,_selfDeclined:!1,_selfInvalidated:!1,_disposeHandlers:[],_main:r!==e,active:!0,accept:function(t,e){if(void 0===t)n._selfAccepted=!0;else if("function"==typeof t)n._selfAccepted=t;else if("object"==typeof t)for(var r=0;r<t.length;r++)n._acceptedDependencies[t[r]]=e||function(){};else n._acceptedDependencies[t]=e||function(){}},decline:function(t){if(void 0===t)n._selfDeclined=!0;else if("object"==typeof t)for(var e=0;e<t.length;e++)n._declinedDependencies[t[e]]=!0;else n._declinedDependencies[t]=!0},dispose:function(t){n._disposeHandlers.push(t)},addDisposeHandler:function(t){n._disposeHandlers.push(t)},removeDisposeHandler:function(t){var e=n._disposeHandlers.indexOf(t);e>=0&&n._disposeHandlers.splice(e,1)},invalidate:function(){switch(this._selfInvalidated=!0,f){case"idle":(m={})[e]=t[e],d("ready");break;case"ready":I(e);break;case"prepare":case"check":case"dispose":case"apply":(v=v||[]).push(e)}},check:S,apply:C,status:function(t){if(!t)return f;h.push(t)},addStatusHandler:function(t){h.push(t)},removeStatusHandler:function(t){var e=h.indexOf(t);e>=0&&h.splice(e,1)},data:a[e]};return r=void 0,n}var h=[],f="idle";function d(t){f=t;for(var e=0;e<h.length;e++)h[e].call(null,t)}var p,m,g,v,y=0,_=0,b={},x={},w={};function M(t){return+t+""===t?+t:t}function S(t){if("idle"!==f)throw new Error("check() is only allowed in idle status");return i=t,d("check"),(e=1e4,e=e||1e4,new Promise((function(t,n){if("undefined"==typeof XMLHttpRequest)return n(new Error("No browser support"));try{var r=new XMLHttpRequest,i=R.p+""+o+".hot-update.json";r.open("GET",i,!0),r.timeout=e,r.send(null)}catch(t){return n(t)}r.onreadystatechange=function(){if(4===r.readyState)if(0===r.status)n(new Error("Manifest request to "+i+" timed out."));else if(404===r.status)t();else if(200!==r.status&&304!==r.status)n(new Error("Manifest request to "+i+" failed."));else{try{var e=JSON.parse(r.responseText)}catch(t){return void n(t)}t(e)}}}))).then((function(t){if(!t)return d(T()?"ready":"idle"),null;x={},b={},w=t.c,g=t.h,d("prepare");var e=new Promise((function(t,e){p={resolve:t,reject:e}}));for(var n in m={},L)A(n);return"prepare"===f&&0===_&&0===y&&E(),e}));var e}function A(t){w[t]?(x[t]=!0,y++,function(t){var e=document.createElement("script");e.charset="utf-8",e.src=R.p+""+t+"."+o+".hot-update.js",e.crossOrigin="anonymous",document.head.appendChild(e)}(t)):b[t]=!0}function E(){d("ready");var t=p;if(p=null,t)if(i)Promise.resolve().then((function(){return C(i)})).then((function(e){t.resolve(e)}),(function(e){t.reject(e)}));else{var e=[];for(var n in m)Object.prototype.hasOwnProperty.call(m,n)&&e.push(M(n));t.resolve(e)}}function C(e){if("ready"!==f)throw new Error("apply() is only allowed in ready status");return function e(n){var i,c,u,l,h;function f(t){for(var e=[t],n={},r=e.map((function(t){return{chain:[t],id:t}}));r.length>0;){var i=r.pop(),o=i.id,a=i.chain;if((l=P[o])&&(!l.hot._selfAccepted||l.hot._selfInvalidated)){if(l.hot._selfDeclined)return{type:"self-declined",chain:a,moduleId:o};if(l.hot._main)return{type:"unaccepted",chain:a,moduleId:o};for(var s=0;s<l.parents.length;s++){var c=l.parents[s],u=P[c];if(u){if(u.hot._declinedDependencies[o])return{type:"declined",chain:a.concat([c]),moduleId:o,parentId:c};-1===e.indexOf(c)&&(u.hot._acceptedDependencies[o]?(n[c]||(n[c]=[]),p(n[c],[o])):(delete n[c],e.push(c),r.push({chain:a.concat([c]),id:c})))}}}}return{type:"accepted",moduleId:t,outdatedModules:e,outdatedDependencies:n}}function p(t,e){for(var n=0;n<e.length;n++){var r=e[n];-1===t.indexOf(r)&&t.push(r)}}T();var y={},_=[],b={},x=function(){console.warn("[HMR] unexpected require("+A.moduleId+") to disposed module")};for(var S in m)if(Object.prototype.hasOwnProperty.call(m,S)){var A;h=M(S),A=m[S]?f(h):{type:"disposed",moduleId:S};var E=!1,C=!1,I=!1,O="";switch(A.chain&&(O="\nUpdate propagation: "+A.chain.join(" -> ")),A.type){case"self-declined":n.onDeclined&&n.onDeclined(A),n.ignoreDeclined||(E=new Error("Aborted because of self decline: "+A.moduleId+O));break;case"declined":n.onDeclined&&n.onDeclined(A),n.ignoreDeclined||(E=new Error("Aborted because of declined dependency: "+A.moduleId+" in "+A.parentId+O));break;case"unaccepted":n.onUnaccepted&&n.onUnaccepted(A),n.ignoreUnaccepted||(E=new Error("Aborted because "+h+" is not accepted"+O));break;case"accepted":n.onAccepted&&n.onAccepted(A),C=!0;break;case"disposed":n.onDisposed&&n.onDisposed(A),I=!0;break;default:throw new Error("Unexception type "+A.type)}if(E)return d("abort"),Promise.reject(E);if(C)for(h in b[h]=m[h],p(_,A.outdatedModules),A.outdatedDependencies)Object.prototype.hasOwnProperty.call(A.outdatedDependencies,h)&&(y[h]||(y[h]=[]),p(y[h],A.outdatedDependencies[h]));I&&(p(_,[A.moduleId]),b[h]=x)}var k,B=[];for(c=0;c<_.length;c++)h=_[c],P[h]&&P[h].hot._selfAccepted&&b[h]!==x&&!P[h].hot._selfInvalidated&&B.push({module:h,parents:P[h].parents.slice(),errorHandler:P[h].hot._selfAccepted});d("dispose"),Object.keys(w).forEach((function(t){!1===w[t]&&function(t){delete L[t]}(t)}));var D,F,j=_.slice();for(;j.length>0;)if(h=j.pop(),l=P[h]){var U={},N=l.hot._disposeHandlers;for(u=0;u<N.length;u++)(i=N[u])(U);for(a[h]=U,l.hot.active=!1,delete P[h],delete y[h],u=0;u<l.children.length;u++){var z=P[l.children[u]];z&&((k=z.parents.indexOf(h))>=0&&z.parents.splice(k,1))}}for(h in y)if(Object.prototype.hasOwnProperty.call(y,h)&&(l=P[h]))for(F=y[h],u=0;u<F.length;u++)D=F[u],(k=l.children.indexOf(D))>=0&&l.children.splice(k,1);d("apply"),void 0!==g&&(o=g,g=void 0);for(h in m=void 0,b)Object.prototype.hasOwnProperty.call(b,h)&&(t[h]=b[h]);var G=null;for(h in y)if(Object.prototype.hasOwnProperty.call(y,h)&&(l=P[h])){F=y[h];var H=[];for(c=0;c<F.length;c++)if(D=F[c],i=l.hot._acceptedDependencies[D]){if(-1!==H.indexOf(i))continue;H.push(i)}for(c=0;c<H.length;c++){i=H[c];try{i(F)}catch(t){n.onErrored&&n.onErrored({type:"accept-errored",moduleId:h,dependencyId:F[c],error:t}),n.ignoreErrored||G||(G=t)}}}for(c=0;c<B.length;c++){var W=B[c];h=W.module,s=W.parents,r=h;try{R(h)}catch(t){if("function"==typeof W.errorHandler)try{W.errorHandler(t)}catch(e){n.onErrored&&n.onErrored({type:"self-accept-error-handler-errored",moduleId:h,error:e,originalError:t}),n.ignoreErrored||G||(G=e),G||(G=t)}else n.onErrored&&n.onErrored({type:"self-accept-errored",moduleId:h,error:t}),n.ignoreErrored||G||(G=t)}}if(G)return d("fail"),Promise.reject(G);if(v)return e(n).then((function(t){return _.forEach((function(e){t.indexOf(e)<0&&t.push(e)})),t}));return d("idle"),new Promise((function(t){t(_)}))}(e=e||{})}function T(){if(v)return m||(m={}),v.forEach(I),v=void 0,!0}function I(e){Object.prototype.hasOwnProperty.call(m,e)||(m[e]=t[e])}var P={},L={0:0};function R(e){if(P[e])return P[e].exports;var n=P[e]={i:e,l:!1,exports:{},hot:l(e),parents:(c=s,s=[],c),children:[]};return t[e].call(n.exports,n,n.exports,u(e)),n.l=!0,n.exports}R.e=function(t){var e=[],n=L[t];if(0!==n)if(n)e.push(n[2]);else{var r=new Promise((function(e,r){n=L[t]=[e,r]}));e.push(n[2]=r);var i,a=document.createElement("script");a.charset="utf-8",a.timeout=120,R.nc&&a.setAttribute("nonce",R.nc),a.src=function(t){return R.p+""+t+"."+o+".js"}(t),0!==a.src.indexOf(window.location.origin+"/")&&(a.crossOrigin="anonymous");var s=new Error;i=function(e){a.onerror=a.onload=null,clearTimeout(c);var n=L[t];if(0!==n){if(n){var r=e&&("load"===e.type?"missing":e.type),i=e&&e.target&&e.target.src;s.message="Loading chunk "+t+" failed.\n("+r+": "+i+")",s.name="ChunkLoadError",s.type=r,s.request=i,n[1](s)}L[t]=void 0}};var c=setTimeout((function(){i({type:"timeout",target:a})}),12e4);a.onerror=a.onload=i,document.head.appendChild(a)}return Promise.all(e)},R.m=t,R.c=P,R.d=function(t,e,n){R.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},R.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},R.t=function(t,e){if(1&e&&(t=R(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(R.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var r in t)R.d(n,r,function(e){return t[e]}.bind(null,r));return n},R.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return R.d(e,"a",e),e},R.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},R.p="./",R.oe=function(t){throw console.error(t),t},R.h=function(){return o};var O=window.webpackJsonprk_web_core=window.webpackJsonprk_web_core||[],k=O.push.bind(O);O.push=e,O=O.slice();for(var B=0;B<O.length;B++)e(O[B]);var D=k;return u(101)(R.s=101)}([function(t,e,n){(function(e){var r;t.exports=(r=r||function(t,r){var i;if("undefined"!=typeof window&&window.crypto&&(i=window.crypto),"undefined"!=typeof self&&self.crypto&&(i=self.crypto),"undefined"!=typeof globalThis&&globalThis.crypto&&(i=globalThis.crypto),!i&&"undefined"!=typeof window&&window.msCrypto&&(i=window.msCrypto),!i&&void 0!==e&&e.crypto&&(i=e.crypto),!i)try{i=n(286)}catch(t){}var o=function(){if(i){if("function"==typeof i.getRandomValues)try{return i.getRandomValues(new Uint32Array(1))[0]}catch(t){}if("function"==typeof i.randomBytes)try{return i.randomBytes(4).readInt32LE()}catch(t){}}throw new Error("Native crypto module could not be used to get secure random number.")},a=Object.create||function(){function t(){}return function(e){var n;return t.prototype=e,n=new t,t.prototype=null,n}}(),s={},c=s.lib={},u=c.Base={extend:function(t){var e=a(this);return t&&e.mixIn(t),e.hasOwnProperty("init")&&this.init!==e.init||(e.init=function(){e.$super.init.apply(this,arguments)}),e.init.prototype=e,e.$super=this,e},create:function(){var t=this.extend();return t.init.apply(t,arguments),t},init:function(){},mixIn:function(t){for(var e in t)t.hasOwnProperty(e)&&(this[e]=t[e]);t.hasOwnProperty("toString")&&(this.toString=t.toString)},clone:function(){return this.init.prototype.extend(this)}},l=c.WordArray=u.extend({init:function(t,e){t=this.words=t||[],this.sigBytes=null!=e?e:4*t.length},toString:function(t){return(t||f).stringify(this)},concat:function(t){var e=this.words,n=t.words,r=this.sigBytes,i=t.sigBytes;if(this.clamp(),r%4)for(var o=0;o<i;o++){var a=n[o>>>2]>>>24-o%4*8&255;e[r+o>>>2]|=a<<24-(r+o)%4*8}else for(var s=0;s<i;s+=4)e[r+s>>>2]=n[s>>>2];return this.sigBytes+=i,this},clamp:function(){var e=this.words,n=this.sigBytes;e[n>>>2]&=4294967295<<32-n%4*8,e.length=t.ceil(n/4)},clone:function(){var t=u.clone.call(this);return t.words=this.words.slice(0),t},random:function(t){for(var e=[],n=0;n<t;n+=4)e.push(o());return new l.init(e,t)}}),h=s.enc={},f=h.Hex={stringify:function(t){for(var e=t.words,n=t.sigBytes,r=[],i=0;i<n;i++){var o=e[i>>>2]>>>24-i%4*8&255;r.push((o>>>4).toString(16)),r.push((15&o).toString(16))}return r.join("")},parse:function(t){for(var e=t.length,n=[],r=0;r<e;r+=2)n[r>>>3]|=parseInt(t.substr(r,2),16)<<24-r%8*4;return new l.init(n,e/2)}},d=h.Latin1={stringify:function(t){for(var e=t.words,n=t.sigBytes,r=[],i=0;i<n;i++){var o=e[i>>>2]>>>24-i%4*8&255;r.push(String.fromCharCode(o))}return r.join("")},parse:function(t){for(var e=t.length,n=[],r=0;r<e;r++)n[r>>>2]|=(255&t.charCodeAt(r))<<24-r%4*8;return new l.init(n,e)}},p=h.Utf8={stringify:function(t){try{return decodeURIComponent(escape(d.stringify(t)))}catch(t){throw new Error("Malformed UTF-8 data")}},parse:function(t){return d.parse(unescape(encodeURIComponent(t)))}},m=c.BufferedBlockAlgorithm=u.extend({reset:function(){this._data=new l.init,this._nDataBytes=0},_append:function(t){"string"==typeof t&&(t=p.parse(t)),this._data.concat(t),this._nDataBytes+=t.sigBytes},_process:function(e){var n,r=this._data,i=r.words,o=r.sigBytes,a=this.blockSize,s=o/(4*a),c=(s=e?t.ceil(s):t.max((0|s)-this._minBufferSize,0))*a,u=t.min(4*c,o);if(c){for(var h=0;h<c;h+=a)this._doProcessBlock(i,h);n=i.splice(0,c),r.sigBytes-=u}return new l.init(n,u)},clone:function(){var t=u.clone.call(this);return t._data=this._data.clone(),t},_minBufferSize:0}),g=(c.Hasher=m.extend({cfg:u.extend(),init:function(t){this.cfg=this.cfg.extend(t),this.reset()},reset:function(){m.reset.call(this),this._doReset()},update:function(t){return this._append(t),this._process(),this},finalize:function(t){return t&&this._append(t),this._doFinalize()},blockSize:16,_createHelper:function(t){return function(e,n){return new t.init(n).finalize(e)}},_createHmacHelper:function(t){return function(e,n){return new g.HMAC.init(t,n).finalize(e)}}}),s.algo={});return s}(Math),r)}).call(this,n(15))},function(t,e){var n=t.exports={version:"2.6.12"};"number"==typeof __e&&(__e=n)},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getWidth=e.isOverManyTarget=e.getAllChildren=e.treeFindPath=e.prefixCls=void 0;var r,i=n(34),o=(r=i)&&r.__esModule?r:{default:r};e.prefixCls="rk-web-core",e.treeFindPath=function t(e,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];if(!e)return[];var i=!0,a=!1,s=void 0;try{for(var c,u=(0,o.default)(e);!(i=(c=u.next()).done);i=!0){var l=c.value;if(r.push(l),n(l))return r;if(l.children){var h=t(l.children,n,r);if(h.length)return h}r.pop()}}catch(t){a=!0,s=t}finally{try{!i&&u.return&&u.return()}finally{if(a)throw s}}return[]},e.getAllChildren=function(t){var e=t.componentOptions||{};return t.$vnode&&(e=t.$vnode.componentOptions||{}),t.children||e.children||[]},e.isOverManyTarget=function(t,e){if(t===e)return!1;var n=parseInt(t.style.left),r=parseInt(t.style.top),i=n+parseInt(t.style.width),o=r+parseInt(t.style.height),a=parseInt(e.style.left),s=parseInt(e.style.top),c=a+parseInt(e.style.width),u=s+parseInt(e.style.height),l=Math.min(i,c)-Math.max(n,a),h=Math.min(o,u)-Math.max(r,s),f=(l>0?l:0)*(h>0?h:0),d=parseInt(t.style.width)*parseInt(t.style.height);return f>d/2&&f<=d?t:null},e.getWidth=function(t){var e=t&&"function"==typeof t.getBoundingClientRect&&t.getBoundingClientRect().width;return e&&(e=+e.toFixed(6)),e||0}},function(t,e,n){(function(t,r){var i;
2
2
  /**
3
3
  * @license
4
4
  * Lodash <https://lodash.com/>
@@ -131,7 +131,7 @@ var r=n("1fb5"),i=n("9152"),o=n("e3db");function a(){return c.TYPED_ARRAY_SUPPOR
131
131
  * LICENSE : BSD-3-Clause
132
132
  * (c) 2016-2021 maptalks.org
133
133
  */
134
- var i="_maptalks__internal_layer_",o=["MultiPoint","MultiLineString","MultiPolygon","GeometryCollection"],a=["FeatureCollection","Feature","Point","LineString","Polygon"].concat(o),s=["markerFile","polygonPatternFile","linePatternFile","markerFillPatternFile","markerLinePatternFile"],c=[["markerWidth","markerHeight"],[],[null,"lineWidth"],[],[null,"markerLineWidth"]],u={lineWidth:1,lineOpacity:1,lineDx:1,lineDy:1,polygonOpacity:1,markerWidth:1,markerHeight:1,markerDx:1,markerDy:1,markerOpacity:1,markerFillOpacity:1,markerLineWidth:1,markerLineOpacity:1,textSize:1,textOpacity:1,textHaloRadius:1,textWrapWidth:1,textLineSpacing:1,textDx:1,textDy:1},l=["lineColor","polygonFill","markerFill","markerLineColor","textFill"],h=14;function f(){return Date.now()}function d(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)t[r]=n[r]}return t}function p(t){return null==t}function m(t){return"number"==typeof t&&!isNaN(t)}function g(t){return(0|t)===t}function v(t){return"object"==typeof t&&!!t}function y(t){return!p(t)&&("string"==typeof t||null!==t.constructor&&t.constructor===String)}function _(t){return!p(t)&&("function"==typeof t||null!==t.constructor&&t.constructor===Function)}var b=Object.prototype.hasOwnProperty;function x(t,e){return b.call(t,e)}var w=Math.PI/180;function M(t){return t*w}function S(t){return t/w}var A,E,C="[object process]"===Object.prototype.toString.call(void 0!==t?t:0)&&!t.versions.electron&&!t.versions.nw&&!t.versions["node-webkit"];function T(t){var e="data:image/svg+xml";return t.length>4&&".svg"===t.slice(-4)?1:t.slice(0,e.length)===e?2:0}function I(t,e){C&&I.node?I.node(t,e):t.src=e[0]}!function(){if(C)return A=function(t){return setTimeout(t,16)},void(E=clearTimeout);var t,e;function n(t){return setTimeout(t,1e3/30)}function r(t){return window["webkit"+t]||window["moz"+t]||window["ms"+t]}"undefined"!=typeof window?(t=window.requestAnimationFrame||r("RequestAnimationFrame")||n,e=window.cancelAnimationFrame||r("CancelAnimationFrame")||r("CancelRequestAnimationFrame")||function(t){window.clearTimeout(t)}):(t=n,e=clearTimeout),A=function(e){return t(e)},E=function(t){t&&e(t)}}();var P=0;function L(){return P++}var R=L;function O(t){return t&&y(t)?JSON.parse(t):t}function k(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];if(n)for(var r=0,i=n.length;r<i;r++)t.push(n[r])}return t.length}function B(t,e){var n=e.indexOf(t);n>-1&&e.splice(n,1)}function D(t,e,n){if(!Array.isArray(t))return n?e.call(n,t):e(t);for(var r,i,o=[],a=0,s=t.length;a<s;a++)p(r=t[a])?o.push(null):Array.isArray(r)?o.push(D(r,e,n)):(i=n?e.call(n,r):e(r),o.push(i));return o}function F(t,e){return void 0===t?e:t}function j(t){return Math.sign?Math.sign(t):0==(t=+t)||isNaN(t)?Number(t):t>0?1:-1}function U(t){if(Math.log2)return Math.log2(t);var e=Math.log(t)*Math.LOG2E,n=Math.round(e);return Math.abs(n-e)<1e-14?n:e}function N(t,e,n){return t*(1-n)+e*n}function z(t,e,n){if(t===n||t===e)return t;var r=n-e;return((t-e)%r+r)%r+e}function G(t,e,n){return Math.min(n,Math.max(e,t))}function H(t){return Array.isArray(t)&&t.length>0}var W=/^([a-z][a-z\d+\-.]*:)?\/\//i,V=/^url\((['"])(.+)\1\)$/i,Z=/^url\(([^'"].*[^'"])\)$/i;function Q(t){return y(t)?Z.test(t)?1:V.test(t)?2:3:0}function X(t){var e=Q(t);return 3===e?t:1===e?Z.exec(t)[1]:2===e?V.exec(t)[2]:t}function Y(t){if("undefined"!=typeof window&&window.btoa)return window.btoa(t);for(var e,n,r=String(t),i="",o=0,a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";r.charAt(0|o)||(a="=",o%1);i+=a.charAt(63&e>>8-o%1*8)){if((n=r.charCodeAt(o+=3/4))>255)throw new Error("'btoa' failed: The string to be encoded contains characters outside of the Latin1 range.");e=e<<8|n}return i}function J(t,e){for(var n=atob(t),r=new ArrayBuffer(n.length),i=new Uint8Array(r),o=0;o<n.length;o++)i[o]=255&n.charCodeAt(o);return new Blob([r],{type:e})}function q(t,e,n,r){var i=n-t,o=r-e;return Math.atan2(o,i)}var K="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7";function $(t,e){if(!t&&!e)return!0;if(!t||!e)return!1;for(var n in t)if("center"===n){if(!e[n]||!tt(t[n][0],e[n][0])||!tt(t[n][1],e[n][1]))return!1}else if(t[n]!==e[n])return!1;return!0}function tt(t,e,n){return null==n&&(n=1e-6),t>=e-n&&t<=e+n}function et(t,e,n,r){t||(t=100),e||(e=4);var i=this;return e*=2,this._flashTimeout&&clearTimeout(this._flashTimeout),this._flashTimeout=setTimeout((function o(){if(0===e)return i.show(),void(n&&(r?n.call(r):n()));e%2==0?i.hide():i.show(),e--,i._flashTimeout=setTimeout(o,t)}),t),this}var nt=["Unknown","Point","LineString","Polygon","MultiPoint","MultiLineString","MultiPolygon","GeometryCollection"];function rt(t){return new Function("f","var p = (f && f.properties || {}); return "+it(t))}function it(t){if(!t)return"true";var e=t[0];return t.length<=1?"any"===e?"false":"true":"("+("=="===e?at(t[1],t[2],"===",!1):"!="===e?at(t[1],t[2],"!==",!1):"<"===e||">"===e||"<="===e||">="===e?at(t[1],t[2],e,!0):"any"===e?st(t.slice(1),"||"):"all"===e?st(t.slice(1),"&&"):"none"===e?lt(st(t.slice(1),"||")):"in"===e?ct(t[1],t.slice(2)):"!in"===e?lt(ct(t[1],t.slice(2))):"has"===e?ut(t[1]):"!has"===e?lt(ut(t[1])):"true")+")"}function ot(t){return"$"===t[0]?"f."+t.substring(1):"p["+JSON.stringify(t)+"]"}function at(t,e,n,r){var i=ot(t),o="$type"===t?nt.indexOf(e):JSON.stringify(e);return(r?"typeof "+i+"=== typeof "+o+"&&":"")+i+n+o}function st(t,e){return t.map(it).join(e)}function ct(t,e){"$type"===t&&(e=e.map((function(t){return nt.indexOf(t)})));var n=JSON.stringify(e.sort(ht)),r=ot(t);return e.length<=200?n+".indexOf("+r+") !== -1":"function(v, a, i, j) {\n while (i <= j) { var m = (i + j) >> 1;\n if (a[m] === v) return true; if (a[m] > v) j = m - 1; else i = m + 1;\n }\n return false; }("+r+", "+n+",0,"+(e.length-1)+")"}function ut(t){return"$id"===t?'"id" in f':JSON.stringify(t)+" in p"}function lt(t){return"!("+t+")"}function ht(t,e){return t<e?-1:t>e?1:0}function ft(t){var e=t._toJSON(),n=e.feature;return n.type=nt.indexOf(n.geometry.type),n.subType=e.subType,n}function dt(t){if(!Array.isArray(t))return dt([t]);for(var e=[],n=0;n<t.length;n++){var r;r=!0===t[n].filter?function(){return!0}:rt(t[n].filter),e.push(pt({},t[n],{filter:r}))}return e}function pt(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)t[r]=n[r]}return t}function mt(t,e){for(var n=0;n<t.stops.length;n++)if(e===t.stops[n][0])return t.stops[n][1];return t.default}function gt(t,e){for(var n=0;n<t.stops.length&&!(e<t.stops[n][0]);n++);return t.stops[Math.max(n-1,0)][1]}function vt(t,e){for(var n=void 0!==t.base?t.base:1,r=0;!(r>=t.stops.length||e<=t.stops[r][0]);)r++;return 0===r?t.stops[r][1]:r===t.stops.length?t.stops[r-1][1]:function t(e,n,r,i,o,a){return"function"==typeof o?function(){var s=o.apply(void 0,arguments),c=a.apply(void 0,arguments);return t(e,n,r,i,s,c)}:o.length?function(t,e,n,r,i,o){for(var a=[],s=0;s<i.length;s++)a[s]=_t(t,e,n,r,i[s],o[s]);return a}(e,n,r,i,o,a):_t(e,n,r,i,o,a)}(e,n,t.stops[r-1][0],t.stops[r][0],t.stops[r-1][1],t.stops[r][1])}function yt(t,e){return function(t,e,n){return void 0!==t?t:void 0!==e?e:void 0!==n?n:null}(e,t.default)}function _t(t,e,n,r,i,o){var a,s=r-n,c=t-n;return i*(1-(a=1===e?c/s:(Math.pow(e,c)-1)/(Math.pow(e,s)-1)))+o*a}function bt(t){return t&&"object"==typeof t&&(t.stops||t.property&&"identity"===t.type)}function xt(t){for(var e in t)if(bt(t[e]))return!0;return!1}function wt(t){return At(t,"exponential")}function Mt(t,e){if(!t)return null;var n=!1;if(Array.isArray(t)){for(var r,i=[],o=0;o<t.length;o++)(r=Mt(t[o],e))?(i.push(r),n=!0):i.push(t[o]);return n?i:t}var a,s={__fn_types_loaded:!0},c=[];for(a in t)t.hasOwnProperty(a)&&c.push(a);for(var u=function(t){Object.defineProperty(s,t,{get:function(){return this["__fn_"+t]||(this["__fn_"+t]=wt(this["_"+t])),this["__fn_"+t].apply(this,e())},set:function(e){this["_"+t]=e},configurable:!0,enumerable:!0})},l=0,h=c.length;l<h;l++)bt(t[a=c[l]])?(n=!0,s["_"+a]=t[a],u(a)):s[a]=t[a];return n?s:t}function St(t){if(!t||!t.stops)return[];for(var e=[],n=0,r=t.stops.length;n<r;n++)e.push(t.stops[n][1]);return e}function At(t,e){if(!bt(t))return function(){return t};var n=!0,r=!0,i=(t=JSON.parse(JSON.stringify(t))).stops;if(i)for(var o=0;o<i.length;o++)if(bt(i[o][1])){var a=At(i[o][1],e);n=n&&a.isZoomConstant,r=r&&a.isFeatureConstant,i[o]=[i[o][0],a]}var s=function t(e,n){var r,i,o;if(bt(e)){var a,s=e.stops&&"object"==typeof e.stops[0][0],c=s||void 0!==e.property,u=s||!c,l=e.type||n||"exponential";if("exponential"===l)a=vt;else if("interval"===l)a=gt;else if("categorical"===l)a=mt;else{if("identity"!==l)throw new Error('Unknown function type "'+l+'"');a=yt}if(s){for(var h={},f=[],d=0;d<e.stops.length;d++){var p=e.stops[d];void 0===h[p[0].zoom]&&(h[p[0].zoom]={zoom:p[0].zoom,type:e.type,property:e.property,default:e.default,stops:[]}),h[p[0].zoom].stops.push([p[0].value,p[1]])}for(var m in h)f.push([h[m].zoom,t(h[m])]);r=function(t,n){var r=vt({stops:f,base:e.base},t)(t,n);return"function"==typeof r?r(t,n):r},i=!1,o=!1}else u?(r=function(t){var n=a(e,t);return"function"==typeof n?n(t):n},i=!0,o=!1):(r=function(t,n){var r=a(e,n?n[e.property]:null);return"function"==typeof r?r(t,n):r},i=!1,o=!0)}else r=function(){return e},i=!0,o=!0;return r.isZoomConstant=o,r.isFeatureConstant=i,r}(t,e);return s.isZoomConstant=n&&s.isZoomConstant,s.isFeatureConstant=r&&s.isFeatureConstant,s}var Et=Object.freeze({createFilter:rt,getFilterFeature:ft,compileStyle:dt,isFunctionDefinition:bt,hasFunctionDefinition:xt,interpolated:wt,piecewiseConstant:function(t){return At(t,"interval")},loadFunctionTypes:Mt,getFunctionTypeResources:St});function Ct(t){var e={stroke:{stroke:t.markerLineColor,"stroke-width":t.markerLineWidth,"stroke-opacity":t.markerLineOpacity,"stroke-dasharray":null,"stroke-linecap":"butt","stroke-linejoin":"round"},fill:{fill:t.markerFill,"fill-opacity":t.markerFillOpacity}};return 0===e.stroke["stroke-width"]&&(e.stroke["stroke-opacity"]=0),e}function Tt(t,e,n){if(!t.markerPath)return null;var r=1,i=Ct(t);m(t.markerOpacity)&&(r=t.markerOpacity),m(t.opacity)&&(r*=t.opacity);var o={};if(i){for(var a in i.stroke)i.stroke.hasOwnProperty(a)&&(p(i.stroke[a])||(o[a]=i.stroke[a]));for(var s in i.fill)i.fill.hasOwnProperty(s)&&(p(i.fill[s])||(o[s]=i.fill[s]))}for(var c,u=Array.isArray(t.markerPath)?t.markerPath:[t.markerPath],l=[],h=0;h<u.length;h++)(c=d({},c=y(u[h])?{path:u[h]}:u[h],o)).d=c.path,delete c.path,l.push(c);var f=['<svg version="1.1"','xmlns="http://www.w3.org/2000/svg"'];r<1&&f.push('opacity="'+r+'"'),t.markerPathWidth&&t.markerPathHeight&&f.push('viewBox="0 0 '+t.markerPathWidth+" "+t.markerPathHeight+'"'),f.push('preserveAspectRatio="none"'),e&&f.push('width="'+e+'"'),n&&f.push('height="'+n+'"'),f.push("><defs></defs>");for(var g=0;g<l.length;g++){var v="<path ";for(var _ in l[g])l[g].hasOwnProperty(_)&&(v+=" "+_+'="'+l[g][_]+'"');v+="></path>",f.push(v)}return f.push("</svg>"),"data:image/svg+xml;base64,"+Y(f.join(" "))}function It(t,e){if(!t)return[];var n=t;Array.isArray(t)||(n=[t]);for(var r,i,o,a,u=[],l=s,h=n.length-1;h>=0;h--)if(t=n[h]){e&&(t=Pt(t));for(var f=0;f<l.length;f++)if(bt(r=t[l[f]])&&(r=St(r)),r){Array.isArray(r)||(r=[r]);for(var d=0;d<r.length;d++)"url("===r[d].slice(0,4)&&(r[d]=X(r[d])),i=c[f],u.push([r[d],t[i[0]],t[i[1]]])}if("path"===t.markerType&&t.markerPath)if(o=bt(t.markerWidth)?200:t.markerWidth,a=bt(t.markerHeight)?200:t.markerHeight,bt(t.markerPath)){r=St(t.markerPath);for(var p=t.markerPath,m=0;m<r.length;m++)t.markerPath=r[m],u.push([Tt(t),o,a]);t.markerPath=p}else u.push([Tt(t),o,a])}return u}function Pt(t){if(!t)return null;var e=t;if(C)return e;for(var n,r=s,i=0,o=r.length;i<o;i++)(n=e[r[i]])&&(e[r[i]]=Lt(n));return e}function Lt(t){if(bt(t)){for(var e=t.stops,n=0;n<e.length;n++)e[n][1]=Lt(e[n][1]);return t}return"url("===t.slice(0,4)&&(t=X(t)),t}function Rt(t){return t&&t.colorStops}function Ot(t){var e=[t.type];if(t.places&&e.push(t.places.join()),t.colorStops){for(var n=[],r=t.colorStops.length-1;r>=0;r--)n.push(t.colorStops[r].join());e.push(n.join(","))}return e.join("_")}function kt(t,e){function n(t,e){p(t.opacity)?t.opacity=e:t.opacity*=e}var r;if(Array.isArray(t)){r=[];for(var i=0;i<t.length;i++){var o=d({},t[i]);n(o,e),r.push(o)}}else n(r=d({},t),e);return r}function Bt(t){var e=Array.prototype.slice.call(arguments,1);if(e&&e.length||(e=[{}]),Array.isArray(t)){for(var n,r,i=[],o=0,a=t.length;o<a;o++){n=t[o],r={};for(var s=0,c=e.length;s<c;s++)Array.isArray(e[s])?p(e[s][o])?d(r,n||{}):d(r,n,e[s][o]):d(r,n,e[s]?e[s]:{});i.push(r)}return i}var u=[{},t];return u.push.apply(u,e),d.apply(this,u)}function Dt(t){if(t.symbol&&(t=[t]),Array.isArray(t))return t;var e=t.$root,n=t.$iconset;return t=t.style,(e||n)&&(e&&"/"===e[e.length-1]&&(e=e.substring(0,e.length-1)),n&&"/"===n[n.length-1]&&(n=n.substring(0,n.length-1)),t=Ft(t,(function(t){return"{$root}"===t?e:"{$iconset}"===t?n:null}))),t}function Ft(t,e){for(var n=0;n<t.length;n++){var r=t[n].symbol;r&&Ut(r,e)}}var jt=/(\{\$root\}|\{\$iconset\})/g;function Ut(t,e){for(var n in t)t.hasOwnProperty(n)&&"textName"!==n&&(y(t[n])&&t[n].length>2?t[n]=t[n].replace(jt,e):bt(t[n])?t[n]=Nt(t[n],e):v(t[n])&&Ut(t[n],e))}function Nt(t,e){var n=t.default;y(n)&&(t.default=n.replace(jt,e));for(var r=t.stops,i=0;i<r.length;i++)Array.isArray(r[i])&&(y(r[i][1])?r[i][1]=r[i][1].replace(jt,e):bt(r[i][1])&&(r[i][1]=Nt(r[i][1],e)));return t}var zt=Object.freeze({now:f,extend:d,isNil:p,isNumber:m,isInteger:g,isObject:v,isString:y,isFunction:_,hasOwn:x,join:function(t,e){return t.join?t.join(e||","):Array.prototype.join.call(t,e||",")},isEmpty:function(t){var e;for(e in t)return!1;return!e},toRadian:M,toDegree:S,IS_NODE:C,get requestAnimFrame(){return A},get cancelAnimFrame(){return E},isSVG:T,loadImage:I,UID:L,GUID:R,parseJSON:O,pushIn:k,removeFromArray:B,forEachCoord:D,getValueOrDefault:F,sign:j,log2:U,interpolate:N,wrap:z,clamp:G,isArrayHasData:H,isURL:function(t){return W.test(t)},isCssUrl:Q,extractCssUrl:X,btoa:Y,b64toBlob:J,computeDegree:q,emptyImageUrl:K,equalMapView:$,flash:et,_defaults:function(t,e){for(var n=Object.getOwnPropertyNames(e),r=0;r<n.length;r++){var i=n[r],o=Object.getOwnPropertyDescriptor(e,i);o&&o.configurable&&void 0===t[i]&&Object.defineProperty(t,i,o)}return t},translateToSVGStyles:Ct,getMarkerPathBase64:Tt,getExternalResources:It,convertResourceUrl:Pt,isGradient:Rt,getGradientStamp:Ot,getSymbolStamp:function t(e){var n=[];if(Array.isArray(e)){for(var r=0;r<e.length;r++)n.push(t(e[r]));return"[ "+n.join(" , ")+" ]"}for(var i in e)x(e,i)&&(_(e[i])||(Rt(e[i])?n.push(i+"="+Ot(e[i])):n.push(i+"="+e[i])));return n.join(";")},lowerSymbolOpacity:kt,extendSymbol:Bt,parseStyleRootPath:Dt,convertStylePath:Ft}),Gt={};if(!C){var Ht=navigator.userAgent.toLowerCase(),Wt=document.documentElement,Vt="ActiveXObject"in window,Zt=-1!==Ht.indexOf("webkit"),Qt=-1!==Ht.indexOf("phantom"),Xt=-1!==Ht.search("android [23]"),Yt=-1!==Ht.indexOf("chrome"),Jt=-1!==Ht.indexOf("gecko")&&!Zt&&!window.opera&&!Vt,qt="undefined"!=typeof orientation||-1!==Ht.indexOf("mobile"),Kt=!window.PointerEvent&&window.MSPointerEvent,$t=window.PointerEvent&&navigator.pointerEnabled||Kt,te=Vt&&"transition"in Wt.style,ee="WebKitCSSMatrix"in window&&"m11"in new window.WebKitCSSMatrix&&!Xt,ne="MozPerspective"in Wt.style,re="OTransition"in Wt.style,ie=(te||ee||ne)&&!re&&!Qt,oe=0;Yt&&(oe=Ht.match(/chrome\/([\d.]+)/)[1]);var ae,se=!Qt&&($t||"ontouchstart"in window||window.DocumentTouch&&document instanceof window.DocumentTouch);try{var ce=document.createElement("canvas"),ue=ce.getContext("webgl")||ce.getContext("experimental-webgl");ae=ue&&ue instanceof WebGLRenderingContext}catch(t){ae=!1}var le=window.devicePixelRatio||window.screen.deviceXDPI/window.screen.logicalXDPI;Gt={ie:Vt,ielt9:Vt&&!document.addEventListener,edge:"msLaunchUri"in navigator&&!("documentMode"in document),webkit:Zt,gecko:Jt,android:-1!==Ht.indexOf("android"),android23:Xt,chrome:Yt,chromeVersion:oe,safari:!Yt&&-1!==Ht.indexOf("safari"),phantomjs:Qt,ie3d:te,webkit3d:ee,gecko3d:ne,opera12:re,any3d:ie,mobile:qt,mobileWebkit:qt&&Zt,mobileWebkit3d:qt&&ee,mobileOpera:qt&&window.opera,mobileGecko:qt&&Jt,touch:!!se,msPointer:!!Kt,pointer:!!$t,retina:le>1,devicePixelRatio:le,language:navigator.browserLanguage?navigator.browserLanguage:navigator.language,ie9:Vt&&9===document.documentMode,ie10:Vt&&10===document.documentMode,webgl:ae}}var he=Gt;function fe(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,t.__proto__=e}function de(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}var pe=function(){function t(t,e){if(p(t)||p(e)?p(t.x)||p(t.y)?Array.isArray(t)&&(this.x=+t[0],this.y=+t[1]):(this.x=+t.x,this.y=+t.y):(this.x=+t,this.y=+e),this._isNaN())throw new Error("Position is NaN")}var e=t.prototype;return e.set=function(t,e){return this.x=t,this.y=e,this},e.abs=function(){return new this.constructor(Math.abs(this.x),Math.abs(this.y))},e._abs=function(){return this.x=Math.abs(this.x),this.y=Math.abs(this.y),this},e._round=function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this},e.round=function(){return new this.constructor(Math.round(this.x),Math.round(this.y))},e._ceil=function(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this},e.ceil=function(){return new this.constructor(Math.ceil(this.x),Math.ceil(this.y))},e.distanceTo=function(t){var e=t.x-this.x,n=t.y-this.y;return Math.sqrt(e*e+n*n)},e._floor=function(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this},e.floor=function(){return new this.constructor(Math.floor(this.x),Math.floor(this.y))},e.copy=function(){return new this.constructor(this.x,this.y)},e._add=function(t,e){return p(t.x)?p(t[0])?(this.x+=t,this.y+=e):(this.x+=t[0],this.y+=t[1]):(this.x+=t.x,this.y+=t.y),this},e.add=function(t,e){var n,r;return p(t.x)?p(t[0])?(n=this.x+t,r=this.y+e):(n=this.x+t[0],r=this.y+t[1]):(n=this.x+t.x,r=this.y+t.y),new this.constructor(n,r)},e._sub=function(t,e){return p(t.x)?p(t[0])?(this.x-=t,this.y-=e):(this.x-=t[0],this.y-=t[1]):(this.x-=t.x,this.y-=t.y),this},e._substract=function(){return this._sub.apply(this,arguments)},e.sub=function(t,e){var n,r;return p(t.x)?p(t[0])?(n=this.x-t,r=this.y-e):(n=this.x-t[0],r=this.y-t[1]):(n=this.x-t.x,r=this.y-t.y),new this.constructor(n,r)},e.substract=function(){return this.sub.apply(this,arguments)},e.multi=function(t){return new this.constructor(this.x*t,this.y*t)},e._multi=function(t){return this.x*=t,this.y*=t,this},e.div=function(t){return this.multi(1/t)},e._div=function(t){return this._multi(1/t)},e.equals=function(t){return t instanceof this.constructor&&this.x===t.x&&this.y===t.y},e._isNaN=function(){return isNaN(this.x)||isNaN(this.y)},e.isZero=function(){return 0===this.x&&0===this.y},e.toArray=function(){return[this.x,this.y]},e.toFixed=function(t){return new this.constructor(this.x.toFixed(t),this.y.toFixed(t))},e.toJSON=function(){return{x:this.x,y:this.y}},t}(),me=function(t){function e(){return t.apply(this,arguments)||this}fe(e,t);var n=e.prototype;return n.closeTo=function(t,e){return e||(e=0),this.x>=t.x-e&&this.x<=t.x+e&&this.y>=t.y-e&&this.y<=t.y+e},n.mag=function(){return Math.sqrt(this.x*this.x+this.y*this.y)},n.unit=function(){return this.copy()._unit()},n._unit=function(){return this._div(this.mag()),this},n.perp=function(){return this.copy()._perp()},n._perp=function(){var t=this.y;return this.y=this.x,this.x=-t,this},n.angleWith=function(t){return this.angleWithSep(t.x,t.y)},n.angleWithSep=function(t,e){return Math.atan2(this.x*e-this.y*t,this.x*t+this.y*e)},n._rotate=function(t){var e=Math.cos(t),n=Math.sin(t),r=e*this.x-n*this.y,i=n*this.x+e*this.y;return this.x=r,this.y=i,this},n.rotate=function(t){return this.copy()._rotate(t)},e}(pe),ge=function(){function t(t,e){m(t)&&m(e)?(this.width=t,this.height=e):m(t.width)?(this.width=t.width,this.height=t.height):Array.isArray(t)&&(this.width=t[0],this.height=t[1])}var e=t.prototype;return e.copy=function(){return new t(this.width,this.height)},e.add=function(e,n){var r,i;return e instanceof t?(r=this.width+e.width,i=this.height+e.height):(r=this.width+e,i=this.height+n),new t(r,i)},e.equals=function(t){return this.width===t.width&&this.height===t.height},e.multi=function(e){return new t(this.width*e,this.height*e)},e._multi=function(t){return this.width*=t,this.height*=t,this},e._round=function(){return this.width=Math.round(this.width),this.height=Math.round(this.height),this},e.toPoint=function(){return new me(this.width,this.height)},e.toArray=function(){return[this.width,this.height]},e.toJSON=function(){return{width:this.width,height:this.height}},t}();function ve(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}var ye=/[\b\t\r\v\f]/gim;function _e(t){return y(t)?t.replace(ye,""):t}function be(t){return ve(t).split(/\s+/)}var xe="undefined"!=typeof document?document.createElement("canvas").getContext("2d"):null;function we(t,e){return we.node?we.node(t,e):(xe.font=e,xe.measureText(t).width)}function Me(t,e,n){var r=we(t,e);return new ge(r,n||h)}function Se(t,e,n,r){if(!t||0===t.length)return[{text:"",width:0}];var i=p(r)?we(t,e):r,o=i/t.length,a=Math.floor(n/o/2);if(o>=n||a<=0)return[{text:"",width:n}];if(i<=n)return[{text:t,width:i}];for(var s=[],c=t.substring(0,a),u=o*a,l=a,h=t.length;l<h;l++){var f=t[l],d=we(c+f);d>=n?(s.push({text:c,width:u}),c=t.substring(l,a+l),l+=a-1,u=o*a):(c+=f,u=d),l>=h-1&&(u=we(c),s.push({text:c,width:u}))}return s}var Ae=/\{([\w_]+)\}/g;function Ee(t,e){return y(t)?t.replace(Ae,(function(t,n){if(!e)return"";var r=e[n];return p(r)?"":Array.isArray(r)?r.join():r})):t}function Ce(t,e,n){var r=t.width,i=t.height;return new me("left"===e?-r:"right"===e?0:-r/2,"top"===n?-i:"bottom"===n?0:-i/2)}function Te(t){return t.textFont?t.textFont:(t.textStyle&&"normal"!==t.textStyle?t.textStyle+" ":"")+(t.textWeight&&"normal"!==t.textWeight?t.textWeight+" ":"")+t.textSize+"px "+(t.textFaceName?'"'===t.textFaceName[0]?t.textFaceName:'"'+t.textFaceName+'"':"monospace")}function Ie(t,e){var n=Te(e),r=e.textLineSpacing||0,i=Me(t,n,e.textSize),o=i.width,a=i.height,s=e.textWrapCharacter,c=[],u=e.textWrapWidth;(!u||u>o)&&(u=o),y(t)||(t+="");var l=0;if(s&&t.indexOf(s)>=0)for(var h=t.split(s),f=0,d=h.length;f<d;f++){var p=h[f],m=we(p,n);if(m>u)for(var g=Se(p,n,u,m),v=0,_=g.length;v<_;v++){var b=g[v].width;b>l&&(l=b),c.push({text:g[v].text,size:new ge(b,a)})}else m>l&&(l=m),c.push({text:p,size:new ge(m,a)})}else if(o>u)for(var x=Se(t,n,u,o),w=0;w<x.length;w++){var M=x[w].width;M>l&&(l=M),c.push({text:x[w].text,size:new ge(M,a)})}else o>l&&(l=o),c.push({text:t,size:i});var S=c.length;return{total:S,size:new ge(l,a*S+r*(S-1)),rows:c,rawSize:i}}var Pe=Object.freeze({trim:ve,escapeSpecialChars:_e,splitWords:be,stringWidth:we,stringLength:Me,getFontHeight:function(t){var e=nn("span");"_default_"!==t&&(e.style.font=t),e.innerHTML="秦";var n=e.clientHeight;return je(e),n},splitContent:Se,replaceVariable:Ee,getAlignPoint:Ce,getFont:Te,splitTextToRow:Ie}),Le=C?function(t){return t[0]}:function(t){for(var e=document.documentElement.style,n=0;n<t.length;n++)if(t[n]in e)return t[n];return!1},Re=Le(["transform","WebkitTransform","OTransform","MozTransform","msTransform"]),Oe=Le(["transformOrigin","WebkitTransformOrigin","OTransformOrigin","MozTransformOrigin","msTransformOrigin"]),ke=Le(["transition","WebkitTransition","OTransition","MozTransition","msTransition"]),Be=Le(["filter","WebkitFilter","OFilter","MozFilter","msFilter"]);function De(t,e){var n=document.createElement(t);return e&&qe(n,e),n}function Fe(t,e,n){var r=De(t);return e&&Xe(r,e),n&&n.appendChild(r),r}function je(t){if(!t)return this;if(he.ielt9||he.ie9){var e=De("div");e.appendChild(t),e.innerHTML="",e=null}else t.parentNode&&t.parentNode.removeChild(t);return this}function Ue(t,e,n,r){if(!(t&&t.addEventListener&&e&&n))return this;for(var i=function(e){e||(e=window.event),n.call(r||t,e)},o=e.split(" "),a=o.length-1;a>=0;a--){var s=o[a];s&&(t["Z__"+s]||(t["Z__"+s]=[]),ze(t,s,n)>=0&&Ne(t,s,n),t["Z__"+s].push({callback:i,src:n}),he.ie?t.addEventListener(s,i,!1):t.addEventListener(s,i,{capture:!1,passive:!1}))}return this}function Ne(t,e,n){function r(e,n){"mousewheel"===e&&he.gecko&&(e="DOMMouseScroll"),t.removeEventListener(e,n,!1)}if(!t||!t.removeEventListener||!e)return this;for(var i=e.split(" "),o=i.length-1;o>=0;o--){var a=i[o];if(a){if(!n&&t["Z__"+a]){for(var s=t["Z__"+a],c=0,u=s.length;c<u;c++)r(s[c].callback);return delete t["Z__"+a],this}var l=ze(t,a,n);if(l<0)return this;r(a,t["Z__"+a][l].callback),t["Z__"+a].splice(l,1)}}return this}function ze(t,e,n){if(!t||!t["Z__"+e]||!n)return-1;for(var r=t["Z__"+e],i=0,o=r.length;i<o;i++)if(r[i].src===n)return i;return-1}function Ge(t){return t.preventDefault?t.preventDefault():t.returnValue=!1,this}function He(t){return t.stopPropagation?t.stopPropagation():t.cancelBubble=!0,this}function We(t){return t.onselectstart=function(){return!1},t.ondragstart=function(){return!1},t.setAttribute("unselectable","on"),this}function Ve(t,e){return t?(he.any3d?$e(t,e):(t.style.left=e.x+"px",t.style.top=e.y+"px"),e):null}function Ze(t){var e=window.getComputedStyle(t),n=[parseInt(e["padding-left"]),parseInt(e["padding-top"])],r=t.getBoundingClientRect(),i=t.offsetWidth,o=t.offsetHeight,a=i?r.width/i:1,s=o?r.height/o:1;return t.__position=[r.left+n[0],r.top+n[1],a,s],t.__position}function Qe(t,e){t||(t=window.event);var n=e.__position;return n||(n=Ze(e)),new me((t.clientX-n[0]-e.clientLeft)/n[2],(t.clientY-n[1]-e.clientTop)/n[3])}function Xe(t,e){var n=t.style.cssText;return function(t,e){var n=t.length-e.length;return n>=0&&t.indexOf(e,n)===n}(n,";")||(n+=";"),t.style.cssText=n+e,this}function Ye(t,e){if(void 0!==t.classList)return t.classList.contains(e);var n=Ke(t);return n.length>0&&new RegExp("(^|\\s)"+e+"(\\s|$)").test(n)}function Je(t,e){if(void 0===t.classList||Ye(t,e)){var n=Ke(t);qe(t,(n?n+" ":"")+e)}else for(var r=be(e),i=0,o=r.length;i<o;i++)t.classList.add(r[i]);return this}function qe(t,e){return p(t.className.baseVal)?t.className=e:t.className.baseVal=e,this}function Ke(t){return p(t.className.baseVal)?t.className:t.className.baseVal}function $e(t,e){var n=e||new me(0,0);return t.style[Re]=he.any3d?"translate3d("+n.x+"px,"+n.y+"px,0px)":"translate("+n.x+"px,"+n.y+"px)",this}function tn(t){return/<[a-z\][\s\S]*>/i.test(t)}function en(t,e){var n=nn(t);y(e)?n.innerHTML=e:n.appendChild(e);var r=new ge(n.clientWidth,n.clientHeight);return je(n),r}function nn(t){var e=document.createElement(t);return e.style.cssText="position:absolute;left:-10000px;top:-10000px;",document.body.appendChild(e),e}var rn=Ue,on=Ne,an=Object.freeze({TRANSFORM:Re,TRANSFORMORIGIN:Oe,TRANSITION:ke,CSSFILTER:Be,createEl:De,createElOn:Fe,removeDomNode:je,addDomEvent:Ue,removeDomEvent:Ne,listensDomEvent:ze,preventDefault:Ge,stopPropagation:He,preventSelection:We,offsetDom:Ve,computeDomPosition:Ze,getEventContainerPoint:Qe,setStyle:Xe,hasClass:Ye,addClass:Je,setClass:qe,getClass:Ke,setOpacity:function(t,e){return t.style.opacity=e,this},setTransform:$e,setTransformMatrix:function(t,e){var n="matrix("+(y(e)?e:e.join())+")";return t.style[Re]!==n&&(t.style[Re]=n),this},removeTransform:function(t){return t.style[Re]&&(t.style[Re]=""),this},isHTML:tn,measureDom:en,getDomRuler:nn,on:rn,off:on}),sn={jsonp:function(t,e){var n="_maptalks_jsonp_"+L();t.match(/\?/)?t+="&callback="+n:t+="?callback="+n;var r=document.createElement("script");return r.type="text/javascript",r.src=t,window[n]=function(t){e(null,t),document.getElementsByTagName("head")[0].removeChild(r),r=null,delete window[n]},document.getElementsByTagName("head")[0].appendChild(r),this},get:function(t,e,n){if(_(e)){var r=n;n=e,e=r}if(C&&sn.get.node)return sn.get.node(t,n,e);var i=sn._getClient(n);if(i.open("GET",t,!0),e){for(var o in e.headers)i.setRequestHeader(o,e.headers[o]);i.withCredentials="include"===e.credentials,e.responseType&&(i.responseType=e.responseType)}return i.send(null),i},post:function(t,e,n){var r;if(y(t)){if(_(e)){var i=n;n=e,e=i}r=(e=e||{}).postData}else{var o=n;r=e,t=(e=t).url,n=o}if(C&&sn.post.node)return e.url=t,sn.post.node(e,r,n);var a=sn._getClient(n);if(a.open("POST",e.url,!0),e.headers||(e.headers={}),e.headers["Content-Type"]||(e.headers["Content-Type"]="application/x-www-form-urlencoded"),"setRequestHeader"in a)for(var s in e.headers)e.headers.hasOwnProperty(s)&&a.setRequestHeader(s,e.headers[s]);return y(r)||(r=JSON.stringify(r)),a.send(r),a},_wrapCallback:function(t,e){return function(){4===t.readyState&&(200===t.status?"arraybuffer"===t.responseType?0===t.response.byteLength?e(new Error("http status 200 returned without content.")):e(null,{data:t.response,cacheControl:t.getResponseHeader("Cache-Control"),expires:t.getResponseHeader("Expires"),contentType:t.getResponseHeader("Content-Type")}):e(null,t.responseText):e(new Error(t.statusText+","+t.status)))}},_getClient:function(t){var e;try{e=new XMLHttpRequest}catch(t){try{e=new ActiveXObject("Msxml2.XMLHTTP")}catch(t){try{e=new ActiveXObject("Microsoft.XMLHTTP")}catch(t){}}}return e.onreadystatechange=sn._wrapCallback(e,t),e},getArrayBuffer:function(t,e,n){if(_(e)){var r=n;n=e,e=r}return e||(e={}),e.responseType="arraybuffer",sn.get(t,e,n)},getImage:function(t,e,n){return sn.getArrayBuffer(e,n,(function(e,n){if(e)t.onerror&&t.onerror(e);else if(n){var r=window.URL||window.webkitURL,i=t.onload;t.onload=function(){i&&i(),r.revokeObjectURL(t.src)};var o=new Blob([new Uint8Array(n.data)],{type:n.contentType});t.cacheControl=n.cacheControl,t.expires=n.expires,t.src=n.data.byteLength?r.createObjectURL(o):K}}))},getJSON:function(t,e,n){if(_(e)){var r=n;n=e,e=r}var i=function(t,e){var r=e?O(e):null;n(t,r)};return e&&e.jsonp?sn.jsonp(t,i):sn.get(t,e,i)}},cn=!1,un=null,ln=Math.PI/180,hn={setHitTesting:function(t){cn=t},createCanvas:function(t,e,n){var r;return C?r=new n(t,e):((r=De("canvas")).width=t,r.height=e),r},prepareCanvasFont:function(t,e){t.textBaseline="top",t.font=Te(e);var n=e.textFill;n||(n="#000"),t.fillStyle=hn.getRgba(n,e.textOpacity)},prepareCanvas:function(t,e,n,r){if(e){var i=e.lineWidth;p(i)||t.lineWidth===i||(t.lineWidth=i);var o=e.linePatternFile,a=e.lineColor||"#000";if(r)t.strokeStyle="#000";else if(o&&n){var s;(e.linePatternDx||e.linePatternDy)&&(s=[e.linePatternDx,e.linePatternDy]),hn._setStrokePattern(t,o,i,s,n),e.lineDasharray=[]}else Rt(a)?e.lineGradientExtent?t.strokeStyle=hn._createGradient(t,a,e.lineGradientExtent):t.strokeStyle="#000":t.strokeStyle=a;e.lineJoin&&(t.lineJoin=e.lineJoin),e.lineCap&&(t.lineCap=e.lineCap),t.setLineDash&&H(e.lineDasharray)&&t.setLineDash(e.lineDasharray);var c=e.polygonPatternFile,u=e.polygonFill||"rgba(255,255,255,0)";if(r)t.fillStyle="#000";else if(c&&n){var l=pn(c),h=n.getImage([l,null,null]);if(h||(h=n.getImage([l+"-texture",null,i])),T(l)&&h instanceof Image&&(he.edge||he.ie)){var f=h.width||20,d=h.height||20,m=hn.createCanvas(f,d);hn.image(m.getContext("2d"),h,0,0,f,d),h=m}h?(t.fillStyle=t.createPattern(h,"repeat"),(e.polygonPatternDx||e.polygonPatternDy)&&(t.fillStyle.polygonPatternOffset=[e.polygonPatternDx,e.polygonPatternDy])):"undefined"!=typeof console&&console.warn("img not found for",l)}else Rt(u)?e.polygonGradientExtent?t.fillStyle=hn._createGradient(t,u,e.polygonGradientExtent):t.fillStyle="rgba(255,255,255,0)":t.fillStyle=u}},_createGradient:function(t,e,n){var r=null,i=e.places,o=n.getMin(),a=n.getMax(),s=n.getWidth(),c=n.getHeight();if(e.type&&"linear"!==e.type){if("radial"===e.type){if(i){if(6!==i.length)throw new Error("A radial gradient's places should have 6 numbers.");i=[o.x+i[0]*s,o.y+i[1]*c,s*i[2],o.x+i[3]*s,o.y+i[4]*c,s*i[5]]}else{var u=n.getCenter()._round();i=[u.x,u.y,Math.abs(u.x-o.x),u.x,u.y,0]}r=t.createRadialGradient.apply(t,i)}}else{if(i){if(4!==i.length)throw new Error("A linear gradient's places should have 4 numbers.");i=[o.x+i[0]*s,o.y+i[1]*c,o.x+i[2]*s,o.y+i[3]*c]}else i=[o.x,o.y,a.x,o.y];r=t.createLinearGradient.apply(t,i)}return e.colorStops.forEach((function(t){r.addColorStop.apply(r,t)})),r},_setStrokePattern:function(t,e,n,r,i){var o,a=pn(e);if(C)o=i.getImage([a,null,n]);else{var s=a+"-texture-"+n;if(!(o=i.getImage(s))){var c=i.getImage([a,null,null]);if(c){var u;u=c.width&&c.height?Math.round(c.width*n/c.height):n;var l=hn.createCanvas(u,n,t.canvas.constructor);hn.image(l.getContext("2d"),c,0,0,u,n),i.addResource([s,null,n],l),o=l}}}o?(t.strokeStyle=t.createPattern(o,"repeat"),t.strokeStyle.linePatternOffset=r):"undefined"!=typeof console&&console.warn("img not found for",a)},clearRect:function(t,e,n,r,i){t.canvas._drawn=!1,t.clearRect(e,n,r,i)},fillCanvas:function(t,e,n,r){if(cn&&(e=1),t.canvas._drawn=!0,0!==e){var i,o=hn._isPattern(t.fillStyle),a=t.fillStyle&&t.fillStyle.polygonPatternOffset,s=a?a[0]:0,c=a?a[1]:0;p(e)&&(e=1),e<1&&(i=t.globalAlpha,t.globalAlpha*=e),o&&(n=n||0,r=r||0,t.translate(n+s,r+c)),t.fill(),o&&t.translate(-n-s,-r-c),e<1&&(t.globalAlpha=i)}},getRgba:function(t,e){return p(e)&&(e=1),"#"!==t[0]?t:(7===t.length?(n=parseInt(t.substring(1,3),16),r=parseInt(t.substring(3,5),16),i=parseInt(t.substring(5,7),16)):(n=17*parseInt(t.substring(1,2),16),r=17*parseInt(t.substring(2,3),16),i=17*parseInt(t.substring(3,4),16)),"rgba("+n+","+r+","+i+","+e+")");var n,r,i},image:function(t,e,n,r,i,o){t.canvas._drawn=!0;try{m(i)&&m(o)?t.drawImage(e,n,r,i,o):t.drawImage(e,n,r)}catch(t){console&&(console.warn("error when drawing image on canvas:",t),console.warn(e))}},text:function(t,e,n,r,i){hn._textOnMultiRow(t,i.rows,r,n,i.size,i.rawSize)},_textOnMultiRow:function(t,e,n,r,i,o){for(var a,s,c=Ce(i,n.textHorizontalAlignment,n.textVerticalAlignment),u=o.height+n.textLineSpacing,l=r.add(0,c.y),h=n.textMaxHeight,f=0,d=0,p=e.length;d<p&&(a=e[d].text,s=Ce(e[d].size,n.textHorizontalAlignment,n.textVerticalAlignment),hn._textOnLine(t,a,l.add(s.x,d*u),n.textHaloRadius,n.textHaloFill,n.textHaloOpacity),!(h>0&&(f+=u,f+o.height>=h)));d++);},_textOnLine:function(t,e,n,r,i,o){cn&&(o=1);var a,s,c=0!==o&&0!==r;t.textBaseline="top";var u=t.shadowBlur,l=t.shadowOffsetX,h=t.shadowOffsetY;if(c){var f=t.globalAlpha;t.globalAlpha*=o,t.miterLimit=2,t.lineJoin="round",t.lineCap="round",t.lineWidth=2*r,t.strokeStyle=i,t.strokeText(e,n.x,n.y+1),t.miterLimit=10,t.globalAlpha=f,a=t.globalCompositeOperation,t.globalCompositeOperation="destination-out",s=t.fillStyle,t.fillStyle="#000"}u&&c&&(t.shadowBlur=t.shadowOffsetX=t.shadowOffsetY=0),hn.fillText(t,e,n),a&&(t.globalCompositeOperation=a,hn.fillText(t,e,n,s),u&&(t.shadowBlur=u,t.shadowOffsetX=l,t.shadowOffsetY=h))},fillText:function(t,e,n,r){t.canvas._drawn=!0,r&&(t.fillStyle=r),t.fillText(e,n.x,n.y+1)},_stroke:function(t,e,n,r){if(cn&&(e=1),t.canvas._drawn=!0,0!==e){var i,o=t.strokeStyle&&t.strokeStyle.linePatternOffset,a=o?o[0]:0,s=o?o[1]:0,c=hn._isPattern(t.strokeStyle)&&(!p(n)&&!p(r)||!p(a)&&!p(s));p(e)&&(e=1),e<1&&(i=t.globalAlpha,t.globalAlpha*=e),c&&(n=n||0,r=r||0,t.translate(n+a,r+s)),t.stroke(),c&&t.translate(-n-a,-r-s),e<1&&(t.globalAlpha=i)}},_path:function(t,e,n,r,i){if(H(e))for(var o,a,s=H(n),c=!0!==i&&hn._isPattern(t.strokeStyle),u=0,l=e.length;u<l;u++)if(o=e[u],!s||t.setLineDash)t.lineTo(o.x,o.y),c&&u>0&&(h(e[u-1],o),t.beginPath(),t.moveTo(o.x,o.y));else if(s){if(u===l-1)break;a=e[u+1],fn(t,o,a,n)}function h(e,n){var i=q(e.x,e.y,n.x,n.y);t.save();var o=Math.cos(i);Math.abs(o)<1e-7?t.translate(e.x-t.lineWidth/2,e.y):t.translate(e.x,e.y-t.lineWidth/2/o),t.rotate(i),hn._stroke(t,r),t.restore()}},path:function(t,e,n,r,i){H(e)&&(t.beginPath(),t.moveTo(e[0].x,e[0].y),hn._path(t,e,i,n),hn._stroke(t,n))},_multiClip:function(t,e){if(e&&0!==e.length)for(var n=0,r=(e=e[0]).length;n<r;n++){var i=e[n],o=i.x,a=i.y;0===n?t.moveTo(o,a):t.lineTo(o,a),n===r-1&&(o=e[0].x,a=e[0].y,t.lineTo(o,a))}},polygon:function(t,e,n,r,i,o){if(t.isMultiClip)hn._multiClip(t,e);else if(H(e)){var a=hn._isPattern(t.strokeStyle),s=H(i)&&!t.setLineDash||a&&!o;H(e[0])||(e=[e]);var c,u,l,h=t;if(e.length>1&&!C&&(un||(un=hn.createCanvas(1,1)),t.canvas._drawn=!1,un.width=t.canvas.width,un.height=t.canvas.height,mn(t=un.getContext("2d"),h)),s){for(t.save(),u=0,l=e.length;u<l;u++)H(e[u])&&(hn._ring(t,e[u],null,0,!0),c=r,u>0&&(t.globalCompositeOperation="destination-out",c=1),hn.fillCanvas(t,c,e[u][0].x,e[u][0].y),u>0?t.globalCompositeOperation="source-over":l>1&&(t.fillStyle="#fff"),hn._stroke(t,0));t.restore()}for(u=0,l=e.length;u<l;u++)H(e[u])&&(o?(hn.paintSmoothLine(t,e[u],n,o,!0),t.closePath()):hn._ring(t,e[u],i,n),s||(c=r,u>0&&(t.globalCompositeOperation="destination-out",c=1),hn.fillCanvas(t,c,e[u][0].x,e[u][0].y),u>0?t.globalCompositeOperation="source-over":l>1&&(t.fillStyle="#fff")),hn._stroke(t,n));e.length>1&&!C&&(h.drawImage(un,0,0),h.canvas._drawn=t.canvas._drawn,mn(h,t))}},_ring:function(t,e,n,r,i){var o=hn._isPattern(t.strokeStyle);i||!o||e[0].equals(e[e.length-1])||(e=e.concat([e[0]])),t.beginPath(),t.moveTo(e[0].x,e[0].y),hn._path(t,e,n,r,i),o||t.closePath()},paintSmoothLine:function(t,e,n,r,i,o,a){if(e)if(e.length<=2||!r)hn.path(t,e,n);else{var s,c=e.length,u=i?c:c-1;t.beginPath(),t.moveTo(e[0].x,e[0].y),void 0!==a&&(u-=Math.max(u-o-1,0));for(var l=0;l<u;l++){var h=e[l].x,f=e[l].y,d=void 0,p=void 0,m=void 0,g=void 0,v=void 0,y=void 0;l-1<0?i?(d=e[u-1].x,p=e[u-1].y):(d=e[l+1].x,p=e[l+1].y):(d=e[l-1].x,p=e[l-1].y),l+1<c?(m=e[l+1].x,g=e[l+1].y):(m=e[l+1-c].x,g=e[l+1-c].y),l+2<c?(v=e[l+2].x,y=e[l+2].y):i?(v=e[l+2-c].x,y=e[l+2-c].y):(v=e[l].x,y=e[l].y);var _=x(d,p,h,f,m,g,v,y,r,l===u-1?a:1);if(l===u-1&&a>=0&&a<1){t.bezierCurveTo(_[0],_[1],_[2],_[3],_[4],_[5]),e.splice(u-1,c-(u-1)-1);var b=new me(_[4],_[5]);b.prevCtrlPoint=new me(_[2],_[3]),e.push(b),c=e.length}else t.bezierCurveTo(_[0],_[1],_[2],_[3],m,g);e[l].nextCtrlPoint=_.slice(0,2),e[l].prevCtrlPoint=s?s.slice(2):null,s=_}!i&&e[1].prevCtrlPoint&&(e[0].nextCtrlPoint=e[1].prevCtrlPoint,delete e[0].prevCtrlPoint),e[c-1].prevCtrlPoint||(e[c-1].prevCtrlPoint=e[c-2].nextCtrlPoint),hn._stroke(t,n)}function x(t,e,n,r,i,o,a,s,c,u){var l=(t+n)/2,h=(e+r)/2,f=(n+i)/2,d=(r+o)/2,p=(i+a)/2,m=(o+s)/2,g=Math.sqrt((n-t)*(n-t)+(r-e)*(r-e)),v=Math.sqrt((i-n)*(i-n)+(o-r)*(o-r)),y=g/(g+v),_=v/(v+Math.sqrt((a-i)*(a-i)+(s-o)*(s-o))),b=l+(f-l)*y,x=h+(d-h)*y,w=f+(p-f)*_,M=d+(m-d)*_,S=b+(f-b)*c+n-b,A=x+(d-x)*c+r-x,E=w+(f-w)*c+i-w,C=M+(d-M)*c+o-M,T=[S,A,E,C];return u<1?function(t,e,n,r,i,o,a,s,c,u){var l=1-t,h=1-e,f=n*h*h+2*i*e*h+a*e*e,d=i*h*h+2*a*e*h+c*e*e,p=r*h*h+2*o*e*h+s*e*e,m=o*h*h+2*s*e*h+u*e*e;return[(n*l*l+2*i*t*l+a*t*t)*h+(i*l*l+2*a*t*l+c*t*t)*e,(r*l*l+2*o*t*l+s*t*t)*h+(o*l*l+2*s*t*l+u*t*t)*e,f*l+d*t,p*l+m*t,f*h+d*e,p*h+m*e]}(0,u,n,r,S,A,E,C,i,o):T}},_arcBetween:function(t,e,n,r){var i=r,o=e.distanceTo(n),a=o/2/Math.sin(i/2),s=Math.asin((n.y-e.y)/o);e.x>n.x&&(s=Math.PI-s);var c=s-(90*ln-i/2),u=Math.cos(c)*a,l=Math.sin(c)*a,h=e.x+u,f=e.y+l,d=Math.asin((n.y-f)/a);h>n.x&&(d=Math.PI-d);var p=d+i;return t.beginPath(),t.arc(h,f,a,d,p),[h,f]},_lineTo:function(t,e){t.lineTo(e.x,e.y)},bezierCurveAndFill:function(t,e,n,r){t.beginPath();var i=e[0];t.moveTo(i.x,i.y);var o=[t];o.push.apply(o,e.splice(1)),hn._bezierCurveTo.apply(hn,o),hn.fillCanvas(t,r),hn._stroke(t,n)},_bezierCurveTo:function(t,e,n,r){t.bezierCurveTo(e.x,e.y,n.x,n.y,r.x,r.y)},ellipse:function(t,e,n,r,i,o,a){t.beginPath(),n===r&&n===i?t.arc(e.x,e.y,n,0,2*Math.PI):t.ellipse?r!==i?(t.ellipse(e.x,e.y,n,r,0,180*ln,360*ln,!1),t.ellipse(e.x,e.y,n,i,0,0,180*ln,!1)):t.ellipse(e.x,e.y,n,r,0,0,360*ln,!1):function(e,n,r,i,o){var a=.5522848,s=r*a,c=i*a,u=o*a;t.moveTo(e-r,n),t.bezierCurveTo(e-r,n-c,e-s,n-i,e,n-i),t.bezierCurveTo(e+s,n-i,e+r,n-c,e+r,n),t.bezierCurveTo(e+r,n+u,e+s,n+o,e,n+o),t.bezierCurveTo(e-s,n+o,e-r,n+u,e-r,n),t.closePath()}(e.x,e.y,n,r,i),hn.fillCanvas(t,a,e.x-n,e.y-r),hn._stroke(t,o,e.x-n,e.y-r)},rectangle:function(t,e,n,r,i){var o=e.x,a=e.y;t.beginPath(),t.rect(o,a,n.width,n.height),hn.fillCanvas(t,i,o,a),hn._stroke(t,r,o,a)},sector:function(t,e,n,r,i,o){var a=ln,s=r[0],c=r[1];!function(t,e,n,r,s,c){var u=a*-c,l=a*-s;t.beginPath(),t.moveTo(e,n),t.arc(e,n,r,u,l),t.lineTo(e,n),hn.fillCanvas(t,o,e-r,n-r),hn._stroke(t,i,e-r,n-r)}(t,e.x,e.y,n,s,c)},_isPattern:function(t){return!y(t)&&!("addColorStop"in t)},drawCross:function(t,e,n,r,i){t.canvas._drawn=!0,t.strokeStyle=i,t.lineWidth=r,t.beginPath(),t.moveTo(e-5,n),t.lineTo(e+5,n),t.moveTo(e,n-5),t.lineTo(e,n+5),t.stroke()},copy:function(t,e){var n=e||De("canvas");return n.width=t.width,n.height=t.height,n.getContext("2d").drawImage(t,0,0),n}};function fn(t,e,n,r){var i=e.x,o=e.y,a=n.x,s=n.y,c=r,u=function(t,e){return t<=e},l=function(t,e){return t>=e},h=function(t,e){return Math.min(t,e)},f=function(t,e){return Math.max(t,e)},d={thereYet:l,cap:h},p={thereYet:l,cap:h};o-s>0&&(p.thereYet=u,p.cap=f),i-a>0&&(d.thereYet=u,d.cap=f),t.moveTo(i,o);for(var m,g,v=i,y=o,_=0,b=!0;!d.thereYet(v,a)||!p.thereYet(y,s);)m=Math.atan2(s-o,a-i),g=c[_],v=d.cap(a,v+Math.cos(m)*g),y=p.cap(s,y+Math.sin(m)*g),b?t.lineTo(v,y):t.moveTo(v,y),_=(_+1)%c.length,b=!b}var dn="data:image/";function pn(t){return t.substring(0,dn.length)===dn?t:X(t)}function mn(t,e){t.filter=e.filter,t.fillStyle=e.fillStyle,t.globalAlpha=e.globalAlpha,t.lineCap=e.lineCap,t.lineDashOffset=e.lineDashOffset,t.lineJoin=e.lineJoin,t.lineWidth=e.lineWidth,t.shadowBlur=e.shadowBlur,t.shadowColor=e.shadowColor,t.shadowOffsetX=e.shadowOffsetX,t.shadowOffsetY=e.shadowOffsetY,t.strokeStyle=e.strokeStyle}var gn="undefined"!=typeof window?window:void 0!==r?r:"undefined"!=typeof self?self:{};function vn(t,e){return t(e={exports:{}},e.exports),e.exports}var yn=vn((function(t){!function(e){function n(t){if(t){var e=this;t((function(t){e.resolve(t)}),(function(t){e.reject(t)}))}}function r(t,e){if("function"==typeof t.y)try{var n=t.y.call(a,e);t.p.resolve(n)}catch(e){t.p.reject(e)}else t.p.resolve(e)}function i(t,e){if("function"==typeof t.n)try{var n=t.n.call(a,e);t.p.resolve(n)}catch(e){t.p.reject(e)}else t.p.reject(e)}var o,a,s="fulfilled",c="undefined",u=function(){function t(){for(;n.length-r;){try{n[r]()}catch(t){e.console&&e.console.error(t)}n[r++]=a,r==i&&(n.splice(0,i),r=0)}}var n=[],r=0,i=1024,o=function(){if(typeof MutationObserver!==c){var e=document.createElement("div");return new MutationObserver(t).observe(e,{attributes:!0}),function(){e.setAttribute("a",0)}}return typeof setImmediate!==c?function(){setImmediate(t)}:function(){setTimeout(t,0)}}();return function(t){n.push(t),n.length-r==1&&o()}}();n.prototype={resolve:function(t){if(this.state===o){if(t===this)return this.reject(new TypeError("Attempt to resolve promise with self"));var e=this;if(t&&("function"==typeof t||"object"==typeof t))try{var n=!0,i=t.then;if("function"==typeof i)return void i.call(t,(function(t){n&&(n=!1,e.resolve(t))}),(function(t){n&&(n=!1,e.reject(t))}))}catch(t){return void(n&&this.reject(t))}this.state=s,this.v=t,e.c&&u((function(){for(var n=0,i=e.c.length;i>n;n++)r(e.c[n],t)}))}},reject:function(t){if(this.state===o){this.state="rejected",this.v=t;var r=this.c;r?u((function(){for(var e=0,n=r.length;n>e;e++)i(r[e],t)})):!n.suppressUncaughtRejectionError&&e.console&&e.console.log("You upset Zousan. Please catch rejections: ",t,t?t.stack:null)}},then:function(t,e){var a=new n,c={y:t,n:e,p:a};if(this.state===o)this.c?this.c.push(c):this.c=[c];else{var l=this.state,h=this.v;u((function(){l===s?r(c,h):i(c,h)}))}return a},catch:function(t){return this.then(null,t)},finally:function(t){return this.then(t,t)},timeout:function(t,e){e=e||"Timeout";var r=this;return new n((function(n,i){setTimeout((function(){i(Error(e))}),t),r.then((function(t){n(t)}),(function(t){i(t)}))}))}},n.resolve=function(t){var e=new n;return e.resolve(t),e},n.reject=function(t){var e=new n;return e.reject(t),e},n.all=function(t){function e(e,a){e&&"function"==typeof e.then||(e=n.resolve(e)),e.then((function(e){r[a]=e,++i==t.length&&o.resolve(r)}),(function(t){o.reject(t)}))}for(var r=[],i=0,o=new n,a=0;a<t.length;a++)e(t[a],a);return t.length||o.resolve(r),o},t.exports&&(t.exports=n),e.define&&e.define.amd&&e.define([],(function(){return n})),e.Zousan=n,n.soon=u}(gn)})),_n="undefined"!=typeof Promise?Promise:yn,bn=function(t){return function(t){function e(){return t.apply(this,arguments)||this}fe(e,t);var n=e.prototype;return n.on=function(t,e,n){if(!t)return this;if(!y(t))return this._switch("on",t,e);if(!e)return this;this._eventMap||(this._eventMap={});var r,i,o=t.toLowerCase().split(" ");n||(n=this);for(var a=0,s=o.length;a<s;a++){r=o[a],(i=this._eventMap[r])||(i=[],this._eventMap[r]=i);var c=i.length;if(c>0)for(var u=0;u<c;u++)if(e===i[u].handler&&i[u].context===n)return this;i.push({handler:e,context:n})}return this},n.addEventListener=function(){return this.on.apply(this,arguments)},n.once=function(t,e,n){if(!y(t)){var r={};for(var i in t)t.hasOwnProperty(i)&&(r[i]=this._wrapOnceHandler(i,t[i],n));return this._switch("on",r)}for(var o=t.split(" "),a=0,s=o.length;a<s;a++)this.on(o[a],this._wrapOnceHandler(o[a],e,n));return this},n.off=function(t,e,n){if(!this._eventMap||!t)return this;if(!y(t))return this._switch("off",t,e);if(!e)return this;var r,i,o,a=t.split(" ");n||(n=this);for(var s=0,c=a.length;s<c;s++){if(o="Z__"+(r=a[s].toLowerCase()),!(i=this._eventMap[r]))return this;for(var u=i.length-1;u>=0;u--){var l=i[u];e!==l.handler&&e!==l.handler[o]||l.context!==n||(delete l.handler[o],i.splice(u,1))}i.length||delete this._eventMap[r]}return this},n.removeEventListener=function(){return this.off.apply(this,arguments)},n.listens=function(t,e,n){if(!this._eventMap||!y(t))return 0;var r=this._eventMap[t.toLowerCase()];if(!r||!r.length)return 0;if(!e)return r.length;for(var i=0,o=r.length;i<o;i++)if(e===r[i].handler&&(p(n)||r[i].context===n))return 1;return 0},n.getListeningEvents=function(){return this._eventMap?Object.keys(this._eventMap):[]},n.copyEventListeners=function(t){var e,n=t._eventMap;if(!n)return this;for(var r in n)for(var i=0,o=(e=n[r]).length;i<o;i++)this.on(r,e[i].handler,e[i].context);return this},n.fire=function(){return this._eventParent?this._eventParent.fire.apply(this._eventParent,arguments):this._fire.apply(this,arguments)},n._wrapOnceHandler=function(t,e,n){var r=this,i="Z__"+t,o=!1,a=function s(){o||(delete a[i],o=!0,n?e.apply(n,arguments):e.apply(this,arguments),r.off(t,s,this))};return a[i]=e,a},n._switch=function(t,e,n){for(var r in e)e.hasOwnProperty(r)&&this[t](r,e[r],n);return this},n._clearListeners=function(t){this._eventMap&&y(t)&&this._eventMap[t.toLowerCase()]&&(this._eventMap[t]=null)},n._clearAllListeners=function(){this._eventMap=null},n._setEventParent=function(t){return this._eventParent=t,this},n._setEventTarget=function(t){return this._eventTarget=t,this},n._fire=function(t,e){if(!this._eventMap)return this;var n=this._eventMap[t.toLowerCase()];if(!n)return this;e||(e={}),e.type=t,e.target=this._eventTarget||this;for(var r,i,o=n.slice(0),a=0,s=o.length;a<s;a++)o[a]&&(r=o[a].context,i=d({},e),!1===(r?o[a].handler.call(r,i):o[a].handler(i))&&e.domEvent&&He(e.domEvent));return this},e}(t)},xn=function(){function t(t){this.target=t}var e=t.prototype;return e.enable=function(){return this._enabled||(this._enabled=!0,this.addHooks()),this},e.disable=function(){return this._enabled?(this._enabled=!1,this.removeHooks(),this):this},e.enabled=function(){return!!this._enabled},e.remove=function(){this.disable(),delete this.target,delete this.dom},t}(),wn=bn(xn),Mn=function(){function t(t){if(!this||!this.setOptions)throw new Error('Class instance is being created without "new" operator.');this.setOptions(t),this.callInitHooks()}var e=t.prototype;return e.callInitHooks=function(){var t=Object.getPrototypeOf(this);return this._visitInitHooks(t),this},e.setOptions=function(t){if(this.hasOwnProperty("options")||(this.options=this.options?Object.create(this.options):{}),!t)return this;for(var e in t)this.options[e]=t[e];return this},e.config=function(t){if(!t){var e={};for(var n in this.options)this.options.hasOwnProperty(n)&&(e[n]=this.options[n]);return e}if(2===arguments.length){var r={};r[t]=arguments[1],t=r}for(var i in t)this.options[i]=t[i],this[i]&&this[i]instanceof wn&&(t[i]?this[i].enable():this[i].disable());return this.onConfig(t),this},e.onConfig=function(){},e._visitInitHooks=function(t){if(!this._initHooksCalled){var e=Object.getPrototypeOf(t);e._visitInitHooks&&e._visitInitHooks.call(this,e),this._initHooksCalled=!0;var n=t._initHooks;if(n&&n!==e._initHooks)for(var r=0;r<n.length;r++)n[r].call(this)}},t.addInitHook=function(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];var i="function"==typeof t?t:function(){this[t].apply(this,n)},o=this.prototype,a=Object.getPrototypeOf(o);return o._initHooks&&o._initHooks!==a._initHooks||(o._initHooks=[]),o._initHooks.push(i),this},t.include=function(){for(var t=0;t<arguments.length;t++)d(this.prototype,t<0||arguments.length<=t?void 0:arguments[t]);return this},t.mergeOptions=function(t){var e=this.prototype,n=Object.getPrototypeOf(e);return e.options&&e.options!==n.options||(e.options=e.options?Object.create(e.options):{}),d(e.options,t),this},t}(),Sn={},An=function(t){return function(t){function e(){return t.apply(this,arguments)||this}return fe(e,t),e.registerJSONType=function(t){return t?(Sn[t]=this,this):this},e.getJSONClass=function(t){return t?Sn[t]:null},e.prototype.getJSONType=function(){if(void 0===this._jsonType){var t=Object.getPrototypeOf(this).constructor;for(var e in Sn)if(Sn[e]===t){this._jsonType=e;break}}if(!this._jsonType)throw new Error("Found an unregistered geometry class!");return this._jsonType},e}(t)};function En(t){return function(t){function e(){return t.apply(this,arguments)||this}fe(e,t);var n=e.prototype;return n.addHandler=function(t,e){if(!e)return this;if(this._handlers||(this._handlers=[]),this[t])return this[t].enable(),this;var n=this[t]=new e(this);return this._handlers.push(n),this.options[t]&&n.enable(),this},n.removeHandler=function(t){if(!t)return this;var e=this[t];if(e){var n=this._handlers.indexOf(e);n>=0&&this._handlers.splice(n,1),this[t].remove(),delete this[t]}return this},n._clearHandlers=function(){for(var t=0,e=this._handlers.length;t<e;t++)this._handlers[t].remove();this._handlers=[]},e}(t)}var Cn="touchstart mousedown",Tn={mousedown:"mousemove",touchstart:"touchmove",pointerdown:"touchmove",MSPointerDown:"touchmove"},In={mousedown:"mouseup",touchstart:"touchend",pointerdown:"touchend",MSPointerDown:"touchend"},Pn=function(t){function e(e,n){var r;return void 0===n&&(n={}),(r=t.call(this,null)||this).dom=e,r.options=n,r}fe(e,t);var n=e.prototype;return n.enable=function(){return this.dom?(this._onMouseDown=function(t){return this.onMouseDown(t)},rn(this.dom,Cn,this._onMouseDown,this),this):this},n.disable=function(){return this.dom?(this._offEvents(),on(this.dom,Cn,this._onMouseDown),delete this._onMouseDown,this):this},n.onMouseDown=function(t){if((this.options.rightclick||2!==t.button)&&!(t.touches&&t.touches.length>1)&&(!this.options.cancelOn||!0!==this.options.cancelOn(t))){var e=this.dom;e.setCapture?e.setCapture():window.captureEvents&&window.captureEvents(window.Event.MOUSEMOVE|window.Event.MOUSEUP),e.ondragstart=function(){return!1},delete this.moved;var n=t.touches?t.touches[0]:t;this.startPos=new me(n.clientX,n.clientY),rn(document,Tn[t.type],this.onMouseMove,this),rn(document,In[t.type],this.onMouseUp,this),this.options.ignoreMouseleave||rn(this.dom,"mouseleave",this.onMouseUp,this),this.fire("mousedown",{domEvent:t,mousePos:new me(n.clientX,n.clientY)})}},n.onMouseMove=function(t){if(t.touches&&t.touches.length>1)this.moved&&(this.interupted=!0,this.onMouseUp(t));else{var e=t.touches?t.touches[0]:t,n=new me(e.clientX,e.clientY).sub(this.startPos);(n.x||n.y)&&(this.moved?this.fire("dragging",{domEvent:t,mousePos:new me(e.clientX,e.clientY)}):(this.fire("dragstart",{domEvent:t,mousePos:this.startPos.copy()}),this.moved=!0))}},n.onMouseUp=function(t){var e=t.changedTouches?t.changedTouches[0]:t;this._offEvents();var n={domEvent:t};m(e.clientX)&&(n.mousePos=new me(parseInt(e.clientX,0),parseInt(e.clientY,0))),this.moved&&(n.interupted=this.interupted,this.fire("dragend",n),delete this.interupted,delete this.moved),this.fire("mouseup",n)},n._offEvents=function(){var t=this.dom;if(on(t,"mouseleave",this.onMouseUp,this),"undefined"!=typeof document&&"undefined"!=typeof window){for(var e in Tn)on(document,Tn[e],this.onMouseMove,this),on(document,In[e],this.onMouseUp,this);t.releaseCapture?t.releaseCapture():window.captureEvents&&window.captureEvents(window.Event.MOUSEMOVE|window.Event.MOUSEUP)}},e}(wn),Ln=function(t){function e(){return t.apply(this,arguments)||this}return fe(e,t),e.toNumberArrays=function(t){return Array.isArray(t)?D(t,(function(t){return[t.x,t.y]})):[t.x,t.y]},e.toCoordinates=function(t){if(m(t[0])&&m(t[1]))return new e(t);for(var n=[],r=0,i=t.length;r<i;r++){var o=t[r];Array.isArray(o)?m(o[0])?n.push(new e(o)):n.push(e.toCoordinates(o)):n.push(new e(o))}return n},e}(pe),Rn=function(){function t(t,e){this.type=t,this.properties=e}return t.createProj4=function(e){return new t("proj4",{proj:e})},t.fromProjectionCode=function(e){return e&&t[e=e.toUpperCase().replace(":","")]||null},t}();Rn.WGS84=Rn.createProj4("+proj=longlat +datum=WGS84 +no_defs"),Rn.EPSG4326=Rn.WGS84,Rn.EPSG3857=Rn.createProj4("+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 +wktext +no_defs"),Rn.IDENTITY=Rn.createProj4("+proj=identity +no_defs"),Rn.CGCS2000=Rn.createProj4("+proj=longlat +datum=CGCS2000"),Rn.EPSG4490=Rn.CGCS2000,Rn.BD09LL=Rn.createProj4("+proj=longlat +datum=BD09"),Rn.GCJ02=Rn.createProj4("+proj=longlat +datum=GCJ02");var On,kn=new me(0,0),Bn=new Ln(0,0),Dn=new Ln(0,0),Fn=new Ln(0,0),jn=new Ln(0,0),Un=new Ln(0,0),Nn=new Ln(0,0),zn=new Ln(0,0),Gn=new Ln(0,0),Hn=[],Wn=[],Vn=function(){function t(t,e,n,r){this._clazz=Ln;var i=arguments.length,o=i>0?arguments[i-1]:null;o&&o.unproject&&(this.projection=arguments[i-1]),this._dirty=!0,this._initialize(t,e,n,r)}var e=t.prototype;return e._initialize=function(t,e,n,r){if(this.xmin=null,this.xmax=null,this.ymin=null,this.ymax=null,!p(t)){var i=this.projection;m(t)&&m(e)&&m(n)&&m(r)?i?this.set(t,e,n,r):this.set(Math.min(t,n),Math.min(e,r),Math.max(t,n),Math.max(e,r)):Array.isArray(t)?i?this.set(t[0],t[1],t[2],t[3]):this.set(Math.min(t[0],t[2]),Math.min(t[1],t[3]),Math.max(t[0],t[2]),Math.max(t[1],t[3])):m(t.x)&&m(e.x)&&m(t.y)&&m(e.y)?i?this.set(t.x,t.y,e.x,e.y):(t.x>e.x?(this.xmin=e.x,this.xmax=t.x):(this.xmin=t.x,this.xmax=e.x),t.y>e.y?(this.ymin=e.y,this.ymax=t.y):(this.ymin=t.y,this.ymax=e.y)):m(t.xmin)&&m(t.xmax)&&m(t.ymin)&&m(t.ymax)&&this.set(t.xmin,t.ymin,t.xmax,t.ymax)}},e._add=function(t){return this._dirty=!0,p(t.x)?p(t.xmin)?p(t[0])||(this.xmin+=t[0],this.ymin+=t[1],this.xmax+=t[0],this.ymax+=t[1]):(this.xmin+=t.xmin,this.ymin+=t.ymin,this.xmax+=t.xmax,this.ymax+=t.ymax):(this.xmin+=t.x,this.ymin+=t.y,this.xmax+=t.x,this.ymax+=t.y),this},e.add=function(){var t=new this.constructor(this.xmin,this.ymin,this.xmax,this.ymax,this.projection);return t._add.apply(t,arguments)},e._scale=function(t){return this._dirty=!0,this.xmin*=t,this.ymin*=t,this.xmax*=t,this.ymax*=t,this},e._sub=function(t){return this._dirty=!0,p(t.x)?p(t.xmin)?p(t[0])||(this.xmin-=t[0],this.ymin-=t[1],this.xmax-=t[0],this.ymax-=t[1]):(this.xmin-=t.xmin,this.ymin-=t.ymin,this.xmax-=t.xmax,this.ymax-=t.ymax):(this.xmin-=t.x,this.ymin-=t.y,this.xmax-=t.x,this.ymax-=t.y),this},e._substract=function(){return this._sub.apply(this,arguments)},e.sub=function(){var t=new this.constructor(this.xmin,this.ymin,this.xmax,this.ymax,this.projection);return t._sub.apply(t,arguments)},e.substract=function(){return this.sub.apply(this,arguments)},e.round=function(){return new this.constructor(Math.round(this.xmin),Math.round(this.ymin),Math.round(this.xmax),Math.round(this.ymax),this.projection)},e._round=function(){return this._dirty=!0,this.xmin=Math.round(this.xmin),this.ymin=Math.round(this.ymin),this.xmax=Math.round(this.xmax),this.ymax=Math.round(this.ymax),this},e.getMin=function(t){return t?(t.set(this.xmin,this.ymin),t):new this._clazz(this.xmin,this.ymin)},e.getMax=function(t){return t?(t.set(this.xmax,this.ymax),t):new this._clazz(this.xmax,this.ymax)},e.getCenter=function(t){var e=(this.xmin+this.xmax)/2,n=(this.ymin+this.ymax)/2;return t?(t.set(e,n),t):new this._clazz(e,n)},e.isValid=function(){return!(p(this.xmin)||p(this.ymin)||p(this.xmax)||p(this.ymax))},e.equals=function(t){return this.xmin===t.xmin&&this.xmax===t.xmax&&this.ymin===t.ymin&&this.ymax===t.ymax},e.intersects=function(t){this._project(this),this._project(t);var e=Math.max(this.pxmin,t.pxmin),n=Math.max(this.pymin,t.pymin),r=Math.min(this.pxmax,t.pxmax),i=Math.min(this.pymax,t.pymax);return!(e>r||n>i)},e.within=function(t){return this._project(this),this._project(t),this.pxmin>=t.pxmin&&this.pxmax<=t.pxmax&&this.pymin>=t.pymin&&this.pymax<=t.pymax},e.contains=function(t){if(!t)return!1;this._project(this);var e=this.projection;if(e)if(void 0!==t.x){var n=Bn;Array.isArray(t)?(n.x=t[0],n.y=t[1]):(n.x=t.x,n.y=t.y),t=e.project(n,n)}else void 0!==t.xmin&&this._project(t);return(t.x||t.pxmin||0)>=this.pxmin&&(t.x||t.pxmax||0)<=this.pxmax&&(t.y||t.pymin||0)>=this.pymin&&(t.y||t.pymax||0)<=this.pymax},e.getWidth=function(){return Math.abs(this.xmax-this.xmin)},e.getHeight=function(){return Math.abs(this.ymax-this.ymin)},e.getSize=function(){return new ge(this.getWidth(),this.getHeight())},e.set=function(t,e,n,r){return this.xmin=t,this.ymin=e,this.xmax=n,this.ymax=r,this._dirty=!0,this},e.__combine=function(t){var e,n,r,i;void 0!==t.x&&(On.xmin=On.xmax=t.x,On.ymin=On.ymax=t.y,t=On),this._project(t),this._project(this),m(this.pxmin)?(e=Math.min(this.pxmin,t.pxmin),n=Math.min(this.pymin,t.pymin),r=Math.max(this.pxmax,t.pxmax),i=Math.max(this.pymax,t.pymax)):(e=t.pxmin,n=t.pymin,r=t.pxmax,i=t.pymax);var o=this.projection;if(o){Dn.set(e,n),Fn.set(r,i);var a=o.unproject(Dn,Dn),s=o.unproject(Fn,Fn);e=a.x,n=a.y,r=s.x,i=s.y}return Wn[0]=e,Wn[1]=n,Wn[2]=r,Wn[3]=i,Wn},e._combine=function(t){if(!t||t.isValid&&!t.isValid())return this;var e=this.__combine(t);return this.set(e[0],e[1],e[2],e[3]),this._dirty=!0,this},e.combine=function(t){if(!t||t.isValid&&!t.isValid())return this;var e=this.__combine(t);return new this.constructor(e[0],e[1],e[2],e[3],this.projection)},e.intersection=function(t){if(!this.intersects(t))return null;jn.x=Math.max(this.pxmin,t.pxmin),jn.y=Math.max(this.pymin,t.pymin),Un.x=Math.min(this.pxmax,t.pxmax),Un.y=Math.min(this.pymax,t.pymax);var e=jn,n=Un,r=this.projection;return r&&(e=r.unproject(e,e),n=r.unproject(n,n)),new this.constructor(e,n,r)},e.expand=function(t){var e,n;return m(t)?e=n=t:(e=t.width||t.x||t[0]||0,n=t.height||t.y||t[1]||0),new this.constructor(this.xmin-e,this.ymin-n,this.xmax+e,this.ymax+n,this.projection)},e._expand=function(t){var e,n;return m(t)?e=n=t:(e=t.width||t.x||t[0]||0,n=t.height||t.y||t[1]||0),this.xmin-=e,this.ymin-=n,this.xmax+=e,this.ymax+=n,this._dirty=!0,this},e.toJSON=function(){return{xmin:this.xmin,ymin:this.ymin,xmax:this.xmax,ymax:this.ymax}},e.toArray=function(){var t=this.xmin,e=this.ymin,n=this.xmax,r=this.ymax;return[new this._clazz([t,r]),new this._clazz([n,r]),new this._clazz([n,e]),new this._clazz([t,e]),new this._clazz([t,r])]},e.toString=function(){return this.xmin+","+this.ymin+","+this.xmax+","+this.ymax},e.copy=function(){return new this.constructor(this.xmin,this.ymin,this.xmax,this.ymax,this.projection)},e.convertTo=function(t,e){if(!this.isValid())return null;var n,r=e||new this.constructor;return e&&r.set(null,null,null,null),this._clazz===Ln?n=Nn:this._clazz===me&&(n=kn),n.x=this.xmin,n.y=this.ymax,r._combine(t(n)),n.x=this.xmax,r._combine(t(n)),n.y=this.ymin,r._combine(t(n)),n.x=this.xmin,r._combine(t(n)),r},e._project=function(t){if(t&&t.isValid()){var e=this.projection;if(e){if(t._dirty){zn.set(t.xmax,t.ymin),Gn.set(t.xmin,t.ymax),Hn[0]=zn,Hn[1]=Gn;var n=e.projectCoords(Hn),r=n[0],i=n[1];t.pxmin=Math.min(r.x,i.x),t.pymin=Math.min(r.y,i.y),t.pxmax=Math.max(r.x,i.x),t.pymax=Math.max(r.y,i.y)}delete t._dirty}else t.pxmin=t.xmin,t.pxmax=t.xmax,t.pymin=t.ymin,t.pymax=t.ymax}else t&&(t.pxmin=t.pxmax=t.pymin=t.pymax=null)},t}();On=new Vn(0,0,0,0);var Zn=function(t){function e(e,n,r,i){var o;return(o=t.call(this,e,n,r,i)||this)._clazz=me,o}return fe(e,t),e}(Vn),Qn=function(){function t(t){this.matrix=t}var e=t.prototype;return e.transform=function(t,e,n){var r=this.matrix[0]*(t.x-this.matrix[2])/e,i=-this.matrix[1]*(t.y-this.matrix[3])/e;return n?(n.x=r,n.y=i,n):new me(r,i)},e.untransform=function(t,e,n){var r=t.x*e/this.matrix[0]+this.matrix[2],i=t.y*e/-this.matrix[1]+this.matrix[3];return n?(n.x=r,n.y=i,n):new Ln(r,i)},t}(),Xn={project:function(){},unproject:function(){},projectCoords:function(t){var e=this;if(!t)return[];if(!Array.isArray(t))return this.project(t);if(0===t.length)return[];if(!this.isSphere())return D(t,this.project,this);if(Array.isArray(t[0]))return t.map((function(t){return e.projectCoords(t)}));for(var n,r,i,o,a,s,c=this.getCircum(),u=this.getSphereExtent(),l=u.sx,h=u.sy,f=t[0],d=[this.project(f)],p=1,m=t.length;p<m;p++)o=(i=t[p]).x-f.x,a=i.y-f.y,s=this.project(i),Math.abs(o)>180&&(void 0===n&&(n=i.x>f.x),n&&(s._add(-c.x*j(o)*l,0),i._add(-360*j(o),0))),Math.abs(a)>90&&(void 0===r&&(r=i.y<f.y),r&&(s._add(0,-c.y*j(a)*h),i._add(0,-180*j(a)))),f=i,d.push(s);return d},unprojectCoords:function(t){return t?Array.isArray(t)?D(t,this.unproject,this):this.unproject(t):[]},isSphere:function(){return!!this.sphere},isOutSphere:function(t){return!!this.isSphere()&&!this.getSphereExtent().contains(t)},wrapCoord:function(t){if(!this.isSphere())return t;var e=this.getSphereExtent(),n=new Ln(t);return e.contains(n)||(n.x=z(t.x,e.xmin,e.xmax),n.y=z(t.y,e.ymin,e.ymax)),n},getCircum:function(){if(!this.circum&&this.isSphere()){var t=this.getSphereExtent();this.circum={x:t.getWidth(),y:t.getHeight()}}return this.circum},getSphereExtent:function(){if(!this.extent&&this.isSphere()){var t=this.project(new Ln(180,90)),e=this.project(new Ln(-180,-90));this.extent=new Vn(e,t,this),this.extent.sx=t.x>e.x?1:-1,this.extent.sy=t.y>e.y?1:-1}return this.extent}},Yn={measureLength:function(t,e){if(!Array.isArray(t))return this.measureLenBetween(t,e);for(var n=0,r=0,i=t.length;r<i-1;r++)n+=this.measureLenBetween(t[r],t[r+1]);return n}},Jn=d({measure:"IDENTITY",measureLenBetween:function(t,e){if(!t||!e)return 0;try{return Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2))}catch(t){return 0}},measureArea:function(t){if(!Array.isArray(t))return 0;for(var e=0,n=0,r=t.length;n<r;n++){var i,o=t[n];i=n===r-1?t[0]:t[n+1],e+=o.x*i.y-o.y*i.x}return Math.abs(e/2)},locate:function(t,e,n){return t=new Ln(t.x,t.y),this._locate(t,e,n)},_locate:function(t,e,n){return t?(e||(e=0),n||(n=0),e||n?(t.x=t.x+e,t.y=t.y+n,t):t):null},rotate:function(t,e,n){return t=new Ln(t.x,t.y),this._rotate(t,e,n)},_rotate:function(){var t=new me(0,0);return function(e,n,r){return t.x=e.x-n.x,t.y=e.y-n.y,t._rotate(r*Math.PI/180),e.x=n.x+t.x,e.y=n.y+t.y,e}}()},Yn),qn=function(){function t(t){this.radius=t}var e=t.prototype;return e.measureLenBetween=function(t,e){if(!t||!e)return 0;var n=M(t.y),r=M(e.y),i=n-r,o=M(t.x)-M(e.x);return n=2*Math.asin(Math.sqrt(Math.pow(Math.sin(i/2),2)+Math.cos(n)*Math.cos(r)*Math.pow(Math.sin(o/2),2))),n*=this.radius,Math.round(1e5*n)/1e5},e.measureArea=function(t){var e,n=M(this.radius),r=0,i=t,o=i.length;if(o<3)return 0;for(e=0;e<o-1;e++){var a=i[e],s=i[e+1];r+=a.x*n*Math.cos(M(a.y))*s.y*n-s.x*n*Math.cos(M(s.y))*a.y*n}return o=i[e],i=i[0],r+=o.x*n*Math.cos(M(o.y))*i.y*n-i.x*n*Math.cos(M(i.y))*o.y*n,.5*Math.abs(r)},e.locate=function(t,e,n){return t=new Ln(t.x,t.y),this._locate(t,e,n)},e._locate=function(t,e,n){if(!t)return null;if(e||(e=0),n||(n=0),!e&&!n)return t;var r,i,o=M(t.y);if(0!==n){var a=Math.abs(n);i=z(180*(o+=2*Math.sin(a/(2*this.radius))*(n>0?1:-1))/Math.PI,-90,90)}else i=t.y;if(0!==e){var s=Math.abs(e),c=M(t.x);r=z(180*(c+=2*Math.sqrt(Math.pow(Math.sin(s/(2*this.radius)),2)/Math.pow(Math.cos(o),2))*(e>0?1:-1))/Math.PI,-180,180)}else r=t.x;return t.x=r,t.y=i,t},e.rotate=function(t,e,n){return t=new Ln(t),this._rotate(t,e,n)},e._rotate=function(t,e,n){var r=function(t,e,n){var r;return void 0===n&&(n={}),(r=n.final?Kn(e,t):Kn(t,e))>180?-(360-r):r}(e,t)-n,i=this.measureLenBetween(e,t);return t.x=e.x,t.y=e.y,function(t,e,n,r){var i=e/r,o=t.x*Math.PI/180,a=M(t.y),s=M(n),c=i*Math.cos(s),u=a+c;Math.abs(u)>Math.PI/2&&(u=u>0?Math.PI-u:-Math.PI-u);var l=Math.log(Math.tan(u/2+Math.PI/4)/Math.tan(a/2+Math.PI/4)),h=Math.abs(l)>1e-11?c/l:Math.cos(a),f=i*Math.sin(s)/h,d=o+f;return t.x=(180*d/Math.PI+540)%360-180,t.y=180*u/Math.PI,t}(t,i,r,this.radius)},t}();function Kn(t,e){var n=M(t.y),r=M(e.y),i=M(e.x-t.x);i>Math.PI&&(i-=2*Math.PI),i<-Math.PI&&(i+=2*Math.PI);var o=Math.log(Math.tan(r/2+Math.PI/4)/Math.tan(n/2+Math.PI/4));return(S(Math.atan2(i,o))+360)%360}var $n=d({measure:"EPSG:4326",sphere:new qn(6378137),measureLenBetween:function(){return this.sphere.measureLenBetween.apply(this.sphere,arguments)},measureArea:function(){return this.sphere.measureArea.apply(this.sphere,arguments)},_locate:function(){return this.sphere._locate.apply(this.sphere,arguments)},locate:function(){return this.sphere.locate.apply(this.sphere,arguments)},_rotate:function(){return this.sphere._rotate.apply(this.sphere,arguments)},rotate:function(){return this.sphere.rotate.apply(this.sphere,arguments)}},Yn),tr=d({measure:"BAIDU",sphere:new qn(6370996.81),measureLenBetween:function(){return this.sphere.measureLenBetween.apply(this.sphere,arguments)},measureArea:function(){return this.sphere.measureArea.apply(this.sphere,arguments)},_locate:function(){return this.sphere._locate.apply(this.sphere,arguments)},locate:function(){return this.sphere.locate.apply(this.sphere,arguments)},_rotate:function(){return this.sphere._rotate.apply(this.sphere,arguments)},rotate:function(){return this.sphere.rotate.apply(this.sphere,arguments)}},Yn),er=$n,nr={};function rr(t){nr[t.measure]=t}rr(Jn),rr($n),rr(tr);var ir,or={getInstance:function(t){if(!t)return er;for(var e in nr)if(x(nr,e)){var n=nr[e].measure;if(!n)continue;if(t.toLowerCase()===n.toLowerCase())return nr[e]}return null}},ar=Object.freeze({Identity:Jn,DEFAULT:er,Measurer:or,WGS84Sphere:$n,BaiduSphere:tr}),sr=d({},Xn,{code:"EPSG:3857",rad:Math.PI/180,metersPerDegree:6378137*Math.PI/180,maxLatitude:85.0511287798,project:function(t,e){var n=this.rad,r=this.metersPerDegree,i=this.maxLatitude,o=t.x,a=Math.max(Math.min(i,t.y),-i),s=o*r,c=(0===a?0:Math.log(Math.tan((90+a)*n/2))/n)*r;return e?(e.x=s,e.y=c,e):new Ln(s,c)},unproject:function(t,e){var n,r=this.rad,i=this.metersPerDegree,o=t.x/i,a=t.y;0===a?n=0:(n=a/i,n=(2*Math.atan(Math.exp(n*r))-Math.PI/2)/r),Math.abs(Math.abs(o)-180)<1e-7&&(o=180*j(o)),Math.abs(Math.abs(n)-this.maxLatitude)<1e-7&&(n=j(n)*this.maxLatitude);var s=z(o,-180,180),c=z(n,-this.maxLatitude,this.maxLatitude);return e?(e.x=s,e.y=c,e):new Ln(s,c)}},$n),cr=d({},Xn,{code:"EPSG:4326",project:function(t,e){return e?(e.x=t.x,e.y=t.y,e):new Ln(t)},unproject:function(t,e){return e?(e.x=t.x,e.y=t.y,e):new Ln(t)}},$n),ur=d({},cr,{code:"EPSG:4490"}),lr=d({},Xn,{code:"BAIDU",project:function(t,e){return this.convertLL2MC(t,e)},unproject:function(t,e){return this.convertMC2LL(t,e)}},tr,{EARTHRADIUS:6370996.81,MCBAND:[12890594.86,8362377.87,5591021,3481989.83,1678043.12,0],LLBAND:[75,60,45,30,15,0],MC2LL:[[1.410526172116255e-8,898305509648872e-20,-1.9939833816331,200.9824383106796,-187.2403703815547,91.6087516669843,-23.38765649603339,2.57121317296198,-.03801003308653,17337981.2],[-7.435856389565537e-9,8983055097726239e-21,-.78625201886289,96.32687599759846,-1.85204757529826,-59.36935905485877,47.40033549296737,-16.50741931063887,2.28786674699375,10260144.86],[-3.030883460898826e-8,898305509983578e-20,.30071316287616,59.74293618442277,7.357984074871,-25.38371002664745,13.45380521110908,-3.29883767235584,.32710905363475,6856817.37],[-1.981981304930552e-8,8983055099779535e-21,.03278182852591,40.31678527705744,.65659298677277,-4.44255534477492,.85341911805263,.12923347998204,-.04625736007561,4482777.06],[3.09191371068437e-9,8983055096812155e-21,6995724062e-14,23.10934304144901,-.00023663490511,-.6321817810242,-.00663494467273,.03430082397953,-.00466043876332,2555164.4],[2.890871144776878e-9,8983055095805407e-21,-3.068298e-8,7.47137025468032,-353937994e-14,-.02145144861037,-1234426596e-14,.00010322952773,-323890364e-14,826088.5]],LL2MC:[[-.0015702102444,111320.7020616939,0x60e374c3105a3,-0x24bb4115e2e164,0x5cc55543bb0ae8,-0x7ce070193f3784,0x5e7ca61ddf8150,-0x261a578d8b24d0,0x665d60f3742ca,82.5],[.0008277824516172526,111320.7020463578,647795574.6671607,-4082003173.641316,10774905663.51142,-15171875531.51559,12053065338.62167,-5124939663.577472,913311935.9512032,67.5],[.00337398766765,111320.7020202162,4481351.045890365,-23393751.19931662,79682215.47186455,-115964993.2797253,97236711.15602145,-43661946.33752821,8477230.501135234,52.5],[.00220636496208,111320.7020209128,51751.86112841131,3796837.749470245,992013.7397791013,-1221952.21711287,1340652.697009075,-620943.6990984312,144416.9293806241,37.5],[-.0003441963504368392,111320.7020576856,278.2353980772752,2485758.690035394,6070.750963243378,54821.18345352118,9540.606633304236,-2710.55326746645,1405.483844121726,22.5],[-.0003218135878613132,111320.7020701615,.00369383431289,823725.6402795718,.46104986909093,2351.343141331292,1.58060784298199,8.77738589078284,.37238884252424,7.45]],convertMC2LL:function(t,e){for(var n,r=0,i=this.MCBAND.length;r<i;r++)if(Math.abs(t.y)>=this.MCBAND[r]){n=this.MC2LL[r];break}return this.convertor(t,n,e)},convertLL2MC:function(t,e){var n,r,i;t.x=this.getLoop(t.x,-180,180),t.y=this.getRange(t.y,-74,74);var o=new Ln(t.x,t.y);for(r=0,i=this.LLBAND.length;r<i;r++)if(o.y>=this.LLBAND[r]){n=this.LL2MC[r];break}if(!n)for(r=this.LLBAND.length-1;r>=0;r--)if(o.y<=-this.LLBAND[r]){n=this.LL2MC[r];break}return this.convertor(t,n,e)},convertor:function(t,e,n){if(!t||!e)return null;var r=e[0]+e[1]*Math.abs(t.x),i=Math.abs(t.y)/e[9],o=e[2]+e[3]*i+e[4]*i*i+e[5]*i*i*i+e[6]*i*i*i*i+e[7]*i*i*i*i*i+e[8]*i*i*i*i*i*i;return r*=t.x<0?-1:1,o*=t.y<0?-1:1,n?(n.x=r,n.y=o,n):new Ln(r,o)},toRadians:function(t){return Math.PI*t/180},toDegrees:function(t){return 180*t/Math.PI},getRange:function(t,e,n){return null!=e&&(t=Math.max(t,e)),null!=n&&(t=Math.min(t,n)),t},getLoop:function(t,e,n){if(t===1/0)return n;if(t===-1/0)return e;for(;t>n;)t-=n-e;for(;t<e;)t+=n-e;return t}}),hr=d({},Xn,{code:"IDENTITY",project:function(t,e){return e?(e.x=t.x,e.y=t.y,e):t.copy()},unproject:function(t,e){return e?(e.x=t.x,e.y=t.y,e):t.copy()}},Jn),fr=sr,dr=Object.freeze({EPSG3857:sr,DEFAULT:fr,EPSG4326:cr,EPSG4490:ur,BAIDU:lr,IDENTITY:hr,Common:Xn}),pr=function(t){return function(t){function e(){return t.apply(this,arguments)||this}return fe(e,t),e.registerRenderer=function(t,e){var n=this.prototype,r=Object.getPrototypeOf(n);return n._rendererClasses&&n._rendererClasses!==r._rendererClasses||(n._rendererClasses=n._rendererClasses?Object.create(n._rendererClasses):{}),n._rendererClasses[t.toLowerCase()]=e,this},e.getRendererClass=function(t){var e=this.prototype;return e._rendererClasses?e._rendererClasses[t.toLowerCase()]:null},e}(t)},mr=function(t){function e(e){var n;return(n=t.call(this)||this).layer=e,n._painted=!1,n._drawTime=0,n.setToRedraw(),n}fe(e,t);var n=e.prototype;return n.render=function(t){this.prepareRender(),this.getMap()&&this.layer.isVisible()&&(this.resources||(this.resources=new gr),this.checkAndDraw(this._tryToDraw,t))},n.checkAndDraw=function(t){for(var e=this,n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];if(this.checkResources){var o=this.checkResources();o.length>0?(this._loadingResource=!0,this.loadResources(o).then((function(){e._loadingResource=!1,e.layer&&(e.layer.fire("resourceload"),e.setToRedraw())}))):t.call.apply(t,[this].concat(r))}else t.call.apply(t,[this].concat(r))},n.testIfNeedRedraw=function(){var t=this.getMap();return!(this._loadingResource||!this._toRedraw&&(t.isInteracting()&&!this.drawOnInteracting||!this.needToRedraw()))},n.needToRedraw=function(){var t=this.getMap();return!(!t.isInteracting()&&!t.getRenderer().isViewChanged()||!t.getPitch()&&t.isMoving()&&!t.isZooming()&&!t.isRotating()&&!this.layer.options.forceRenderOnMoving)},n.onSkipDrawOnInteracting=function(){},n.isLoadingResource=function(){return this._loadingResource},n.isRenderComplete=function(){return!!this._renderComplete},n.mustRenderOnInteracting=function(){return!this._painted},n.setToRedraw=function(){return this._toRedraw=!0,this},n.setCanvasUpdated=function(){return this._canvasUpdated=!0,this},n.isCanvasUpdated=function(){return!!this._canvasUpdated},n.remove=function(){this.onRemove(),delete this._loadingResource,delete this.southWest,delete this.canvas,delete this.context,delete this.canvasExtent2D,delete this._extent2D,delete this.resources,delete this.layer},n.onRemove=function(){},n.onAdd=function(){},n.getMap=function(){return this.layer?this.layer.getMap():null},n.getCanvasImage=function(){var t=this.getMap();if(this._canvasUpdated=!1,this._renderZoom!==t.getZoom()||!this.canvas||!this._extent2D)return null;if(this.isBlank())return null;if(this.layer.isEmpty&&this.layer.isEmpty())return null;var e=t._pointToContainerPoint(this.southWest)._add(0,-t.height);return{image:this.canvas,layer:this.layer,point:e}},n.clear=function(){this.clearCanvas()},n.isBlank=function(){return!this._painted},n.show=function(){this.setToRedraw()},n.hide=function(){this.clear(),this.setToRedraw()},n.setZIndex=function(){this.setToRedraw()},n.hitDetect=function(t){if(!this.context||this.layer.isEmpty&&this.layer.isEmpty()||this.isBlank()||this._errorThrown)return!1;var e=this.getMap(),n=e.getDevicePixelRatio(),r=e.getSize();if(t.x<0||t.x>r.width*n||t.y<0||t.y>r.height*n)return!1;try{if(this.context.getImageData(n*t.x,n*t.y,1,1).data[3]>0)return!0}catch(t){return this._errorThrown||(console&&console.warn("hit detect failed with tainted canvas, some geometries have external resources in another domain:\n",t),this._errorThrown=!0),!1}return!1},n.loadResources=function(t){this.resources||(this.resources=new gr);var e=this.resources,n=[];if(H(t))for(var r={},i=t.length-1;i>=0;i--){var o=t[i];o&&o.length&&!r[o.join("-")]&&(r[o.join("-")]=1,e.isResourceLoaded(o,!0)||n.push(new _n(this._promiseResource(o))))}return _n.all(n)},n.prepareRender=function(){delete this._renderComplete;var t=this.getMap();this._renderZoom=t.getZoom(),this.canvasExtent2D=this._extent2D=t._get2DExtent(),this.southWest=t._containerPointToPoint(new me(0,t.height))},n.createCanvas=function(){if(!this.canvas){var t=this.getMap(),e=t.getSize(),n=t.getDevicePixelRatio(),r=n*e.width,i=n*e.height;if(this.layer._canvas){var o=this.layer._canvas;o.width=r,o.height=i,o.style&&(o.style.width=e.width+"px",o.style.height=e.height+"px"),this.canvas=this.layer._canvas}else this.canvas=hn.createCanvas(r,i,t.CanvasClass);this.onCanvasCreate()}},n.onCanvasCreate=function(){},n.createContext=function(){if(!(this.gl&&this.gl.canvas===this.canvas||this.context)&&(this.context=this.canvas.getContext("2d"),this.context)){this.layer.options.globalCompositeOperation&&(this.context.globalCompositeOperation=this.layer.options.globalCompositeOperation);var t=this.getMap().getDevicePixelRatio();1!==t&&this.context.scale(t,t)}},n.resetCanvasTransform=function(){if(this.context){var t=this.getMap().getDevicePixelRatio();this.context.setTransform(t,0,0,t,0,0)}},n.resizeCanvas=function(t){var e=this.canvas;if(e){var n=t||this.getMap().getSize(),r=this.getMap().getDevicePixelRatio();e.width===r*n.width&&e.height===r*n.height||(e.height=r*n.height,e.width=r*n.width,1!==r&&this.context&&this.context.scale(r,r),this.layer._canvas&&e.style&&(e.style.width=n.width+"px",e.style.height=n.height+"px"))}},n.clearCanvas=function(){this.context&&hn.clearRect(this.context,0,0,this.canvas.width,this.canvas.height)},n.prepareCanvas=function(){this.canvas?(this.resetCanvasTransform(),this.clearCanvas(),this.resizeCanvas()):(this.createCanvas(),this.createContext(),this.layer.onCanvasCreate(),this.layer.fire("canvascreate",{context:this.context,gl:this.gl})),delete this._maskExtent;var t=this.layer.getMask();if(!t)return this.layer.fire("renderstart",{context:this.context,gl:this.gl}),null;var e=this._maskExtent=t._getMaskPainter().get2DExtent();return e.intersects(this._extent2D),this.layer.fire("renderstart",{context:this.context,gl:this.gl}),e},n.clipCanvas=function(t){var e=this.layer.getMask();if(!e)return!1;var n=this.southWest,r=this.getMap();this.southWest=r._containerPointToPoint(new me(0,r.height)),t.save();var i=r.getDevicePixelRatio();if(1!==i&&(t.save(),t.scale(i,i)),e.getGeometries){t.isMultiClip=!0;var o=e.getGeometries()||[];t.beginPath(),o.forEach((function(e){e._getMaskPainter().paint(null,t)})),t.stroke(),delete t.isMultiClip}else e._getMaskPainter().paint(null,t);return 1!==i&&t.restore(),t.clip(),this.southWest=n,!0},n.getViewExtent=function(){return{extent:this._extent2D,maskExtent:this._maskExtent,zoom:this._renderZoom,southWest:this.southWest}},n.completeRender=function(){this.getMap()&&(this._renderComplete=!0,this.layer.fire("renderend",{context:this.context,gl:this.gl}),this.setCanvasUpdated())},n.getEvents=function(){return{_zoomstart:this.onZoomStart,_zooming:this.onZooming,_zoomend:this.onZoomEnd,_resize:this.onResize,_movestart:this.onMoveStart,_moving:this.onMoving,_moveend:this.onMoveEnd,_dragrotatestart:this.onDragRotateStart,_dragrotating:this.onDragRotating,_dragrotateend:this.onDragRotateEnd,_spatialreferencechange:this.onSpatialReferenceChange}},n.onZoomStart=function(){},n.onZoomEnd=function(){this.setToRedraw()},n.onZooming=function(){},n.onMoveStart=function(){},n.onMoving=function(){},n.onMoveEnd=function(){this.setToRedraw()},n.onResize=function(){delete this._extent2D,this.resizeCanvas(),this.setToRedraw()},n.onDragRotateStart=function(){},n.onDragRotating=function(){},n.onDragRotateEnd=function(){this.setToRedraw()},n.onSpatialReferenceChange=function(){},n.getDrawTime=function(){return this._drawTime},n._tryToDraw=function(t){this._toRedraw=!1,!this.canvas&&this.layer.isEmpty&&this.layer.isEmpty()?this._renderComplete=!0:this._drawAndRecord(t)},n._drawAndRecord=function(t){if(this.getMap()){var e=this._painted;this._painted=!0;var n=f();this.draw(t),n=f()-n,this._drawTime=e?n:n/2,e&&this.layer&&this.layer.options.logDrawTime&&console.log(this.layer.getId(),"frameTimeStamp:",t,"drawTime:",this._drawTime)}},n._promiseResource=function(t){var e=this,n=this.resources,r=this.layer.options.crossOrigin;return function(i){if(n.isResourceLoaded(t,!0))i(t);else{var o=new Image;p(r)||(o.crossOrigin=r),T(t[0])&&!C&&(t[1]&&(t[1]*=2),t[2]&&(t[2]*=2)),o.onload=function(){e._cacheResource(t,o),i(t)},o.onabort=function(e){console&&console.warn("image loading aborted: "+t[0]),e&&console&&console.warn(e),i(t)},o.onerror=function(e){e&&"undefined"!=typeof console&&console.warn(e),n.markErrorResource(t),i(t)},I(o,t)}}},n._cacheResource=function(t,e){if(this.layer&&this.resources){var n=t[1],r=t[2];if(this.layer.options.cacheSvgOnCanvas&&1===T(t[0])&&(he.edge||he.ie)){p(n)&&(n=e.width||this.layer.options.defaultIconSize[0]),p(r)&&(r=e.height||this.layer.options.defaultIconSize[1]);var i=hn.createCanvas(n,r);hn.image(i.getContext("2d"),e,0,0,n,r),e=i}this.resources.addResource(t,e)}},e}(Mn),gr=function(){function t(){this.resources={},this._errors={}}var e=t.prototype;return e.addResource=function(t,e){this.resources[t[0]]={image:e,width:+t[1],height:+t[2]}},e.isResourceLoaded=function(t,e){if(!t)return!1;var n=this._getImgUrl(t);if(this._errors[n])return!0;var r=this.resources[n];return!(!r||e&&T(t[0])&&(+t[1]>r.width||+t[2]>r.height))},e.getImage=function(t){var e=this._getImgUrl(t);return!this.isResourceLoaded(t)||this._errors[e]?null:this.resources[e].image},e.markErrorResource=function(t){this._errors[this._getImgUrl(t)]=1},e.merge=function(t){if(!t)return this;for(var e in t.resources){var n=t.resources[e];this.addResource([e,n.width,n.height],n.image)}return this},e.forEach=function(t){if(!this.resources)return this;for(var e in this.resources)x(this.resources,e)&&t(e,this.resources[e]);return this},e._getImgUrl=function(t){return Array.isArray(t)?t[0]:t},t}();function vr(t,e,n,r){for(var i,o=[],a=0,s=0,c=t.length;s<c-1;s++)(i=yr(t[s],t[s+1],e,s,n,r))&&(o[a]=o[a]||[],o[a].push({point:i[0],index:s}),i[1]===t[s+1]&&s!==c-2||(o[a].push({point:i[1],index:s+1}),a++));return o}function yr(t,e,n,r,i,o){var a,s,c,u=r?ir:xr(t,n),l=xr(e,n);for(ir=l;;){if(!(u|l))return[t,e];if(u&l)return!1;if(o)return[t,e];c=xr(s=br(t,e,a=u||l,n,i),n),a===u?(t=s,u=c):(e=s,l=c)}}function _r(t,e,n){var r,i,o,a,s,c,u,l,h,f=[1,4,2,8];for(i=0,u=t.length;i<u;i++)t[i]._code=xr(t[i],e);for(a=0;a<4;a++){for(l=f[a],r=[],i=0,o=(u=t.length)-1;i<u;o=i++)s=t[i],c=t[o],s._code&l?c._code&l||((h=br(c,s,l,e,n))._code=xr(h,e),r.push(h)):(c._code&l&&((h=br(c,s,l,e,n))._code=xr(h,e),r.push(h)),r.push(s));t=r}return t}function br(t,e,n,r,i){var o,a,s=e.x-t.x,c=e.y-t.y,u=r.getMin(),l=r.getMax();8&n?(o=t.x+s*(l.y-t.y)/c,a=l.y):4&n?(o=t.x+s*(u.y-t.y)/c,a=u.y):2&n?(o=l.x,a=t.y+c*(l.x-t.x)/s):1&n&&(o=u.x,a=t.y+c*(u.x-t.x)/s);var h=new me(o,a);return i&&h._round(),h}function xr(t,e){var n=0;return t.x<e.getMin().x?n|=1:t.x>e.getMax().x&&(n|=2),t.y<e.getMin().y?n|=4:t.y>e.getMax().y&&(n|=8),n}function wr(t,e,n,r){t=new me(t);var i,o,a,s=Math.abs(n.x-e.x),c=Math.abs(n.y-e.y),u=Math.sqrt(Math.abs(s*s-c*c));return s>=c?(i=new me(e.x-u,e.y),o=new me(e.x+u,e.y),a=2*s):(i=new me(e.x,e.y-u),o=new me(e.x,e.y+u),a=2*c),t.distanceTo(i)+t.distanceTo(o)<=a+2*r}var Mr=function(){function t(){}var e=t.prototype;return e.getMap=function(){return this.geometry.getMap()},e.getPainter=function(){return this.painter},e.isDynamicSize=function(){return!1},t.testColor=function(t){return!(!t||!y(t))&&l.indexOf(t)>=0},t}(),Sr=function(t){function e(){return t.apply(this,arguments)||this}fe(e,t);var n=e.prototype;return n._prepareContext=function(t){m(this.symbol.opacity)?t.globalAlpha!==this.symbol.opacity&&(t.globalAlpha=this.symbol.opacity):1!==t.globalAlpha&&(t.globalAlpha=1)},n.prepareCanvas=function(t,e,n){hn.prepareCanvas(t,e,n,this.getPainter().isHitTesting())},n.remove=function(){},n.setZIndex=function(){},n.show=function(){},n.hide=function(){},n._defineStyle=function(t){return function(){var e=this,n=[],r={};return Mt(t,(function(){var t=e.getMap();return function(t,e,n){return t[0]=e,t[1]=n,t}(n,t.getZoom(),d({},e.geometry.getProperties(),function(t,e,n,r){return t["{bearing}"]=e,t["{pitch}"]=n,t["{zoom}"]=r,t}(r,t.getBearing(),t.getPitch(),t.getZoom())))}))}.bind(this)()},e}(Mr),Ar=new me(0,0),Er=new me(0,0),Cr=function(t){function e(e,n,r){var i;return(i=t.call(this)||this).symbol=e,i.geometry=n,i.painter=r,i}fe(e,t);var n=e.prototype;return n.get2DExtent=function(){for(var t=this.getMap(),e=t.getGLZoom(),n=new Zn,r=this._getRenderPoints()[0],i=r.length-1;i>=0;i--)r[i]&&n._combine(t._pointToPoint(r[i],e));return n},n.isDynamicSize=function(){var t=this.symbol;return bt(t.markerWidth)||bt(t.markerHeight)||bt(t.textSize)},n._rotateExtent=function(t,e){return t.convertTo((function(t){return t._rotate(e)}))},n._getRenderPoints=function(){var t=this.getPainter().isSpriting()?"center":this.getPlacement();return this.getPainter().getRenderPoints(t)},n._getRenderContainerPoints=function(t){var e=this.getPainter(),n=this._getRenderPoints()[0];if(e.isSpriting())return n;var r=this.getDxDy(),i=this.painter._pointContainerPoints(n,r.x,r.y,t,!0,this.getPlacement());if(!i||!Array.isArray(i[0]))return i;for(var o=[],a=0,s=i.length;a<s;a++)for(var c=0,u=i[a].length;c<u;c++)o.push(i[a][c]);return o},n._getRotationAt=function(t){var e=this.getRotation();e||(e=0);var n=this._getRenderPoints()[1];if(!n||!n[t])return e;var r=this.getMap(),i=n[t][0],o=n[t][1];if(r.isTransforming()){var a=r.getGLZoom();return i=r._pointToContainerPoint(n[t][0],a,0,Ar),o=r._pointToContainerPoint(n[t][1],a,0,Er),e+q(i.x,i.y,o.x,o.y)}return e+-q(i.x,i.y,o.x,o.y)},n._rotate=function(t,e,n){if(n){var r=this.getDxDy(),i=e.sub(r);return t.save(),t.translate(i.x,i.y),t.rotate(n),this.getDxDy()}return null},e}(Sr),Tr=function(t){function e(n,r,i){var o;(o=t.call(this,n,r,i)||this)._dynamic=xt(n),o.style=o._defineStyle(o.translate()),o.strokeAndFill=o._defineStyle(e.translateLineAndFill(o.style));var a=o.strokeAndFill.lineWidth;return o.padding=a%2==0?2:1.5,o}fe(e,t),e.test=function(t){return!!t&&!(!p(t.markerFile)||p(t.markerType)||"path"===t.markerType)};var n=e.prototype;return n.symbolize=function(t,e){var n=this.style;if(this.painter.isHitTesting()||0!==n.markerWidth&&0!==n.markerHeight&&(0!==n.polygonOpacity||0!==n.lineOpacity)){var r=this._getRenderContainerPoints();H(r)&&(this._prepareContext(t),this.getPainter().isSpriting()||this.geometry.getLayer().getMask()===this.geometry||this._dynamic||!1===this.geometry.getLayer().options.cacheVectorOnCanvas?this._drawMarkers(t,r,e):this._drawMarkersWithCache(t,r,e))}},n.getDxDy=function(){var t=this.style,e=t.markerDx,n=t.markerDy;return new me(e,n)},n._drawMarkers=function(t,e,n){var r=this.strokeAndFill;Rt(r.lineColor)||Rt(r.polygonFill)||this.prepareCanvas(t,r,n);for(var i=e.length-1;i>=0;i--){var o=e[i],a=this._rotate(t,o,this._getRotationAt(i));a&&(o=a),this._drawVectorMarker(t,o,n),a&&t.restore()}},n._drawMarkersWithCache=function(t,e,n){var r=this._stampSymbol(),i=n.getImage(r);i||(i=this._createMarkerImage(t,n),n.addResource([r,i.width,i.height],i));for(var o=this._getAnchor(i.width,i.height),a=e.length-1;a>=0;a--){var s=e[a],c=this._rotate(t,s,this._getRotationAt(a));c&&(s=c),hn.image(t,i,s.x+o.x,s.y+o.y),c&&t.restore()}},n._calMarkerSize=function(){if(!this._size){var t=this.strokeAndFill.lineWidth,e=2*(this.symbol.shadowBlur||0),n=Math.round(this.style.markerWidth+t+2*e+2*this.padding),r=Math.round(this.style.markerHeight+t+2*e+2*this.padding);if(bt(this.symbol.markerWidth)||bt(this.symbol.markerHeight))return[n,r];this._size=[n,r]}return this._size},n._createMarkerImage=function(t,e){var n=t.canvas.constructor,r=this._calMarkerSize(),i=hn.createCanvas(r[0],r[1],n),o=this._getCacheImageAnchor(r[0],r[1]),a=i.getContext("2d");return Rt(this.strokeAndFill.lineColor)||Rt(this.strokeAndFill.polygonFill)||this.prepareCanvas(a,this.strokeAndFill,e),this._drawVectorMarker(a,o,e),i},n._stampSymbol=function(){return this._stamp||(this._stamp=[this.style.markerType,Rt(this.style.markerFill)?Ot(this.style.markerFill):this.style.markerFill,this.style.markerFillOpacity,this.style.markerFillPatternFile,Rt(this.style.markerLineColor)?Ot(this.style.markerLineColor):this.style.markerLineColor,this.style.markerLineWidth,this.style.markerLineOpacity,this.style.markerLineDasharray?this.style.markerLineDasharray.join(","):"",this.style.markerLinePatternFile,this.style.markerWidth,this.style.markerHeight,this.style.markerHorizontalAlignment,this.style.markerVerticalAlignment].join("_")),this._stamp},n._getAnchor=function(t,e){var n=2*(this.symbol.shadowBlur||0)+this.padding,r=Ce(new ge(t,e),this.style.markerHorizontalAlignment,this.style.markerVerticalAlignment);return r.x!==-t/2&&(r.x-=j(r.x+t/2)*n),r.y!==-e/2&&(r.y-=j(r.y+e/2)*n),r},n._getCacheImageAnchor=function(t,e){var n=2*(this.symbol.shadowBlur||0)+this.padding,r=this.style.markerType;return"bar"===r||"pie"===r||"pin"===r?new me(t/2,e-n):"rectangle"===r?new me(n,n):new me(t/2,e/2)},n._getGraidentExtent=function(t){var e=new Zn,n=this.getDxDy(),r=this.getFixedExtent();if(Array.isArray(t))for(var i=t.length-1;i>=0;i--)e._combine(t[i]);else e._combine(t);return e.xmin+=r.xmin-n.x,e.ymin+=r.ymin-n.y,e.xmax+=r.xmax-n.x,e.ymax+=r.ymax-n.y,e},n._drawVectorMarker=function(t,n,r){var i,o=this.style,a=this.strokeAndFill,s=o.markerType.toLowerCase(),c=e._getVectorPoints(s,o.markerWidth,o.markerHeight),u=a.lineOpacity,l=a.polygonOpacity;(Rt(a.lineColor)||Rt(a.polygonFill))&&(Rt(a.lineColor)&&(i=this._getGraidentExtent(n),a.lineGradientExtent=i.expand(a.lineWidth)),Rt(a.polygonFill)&&(i||(i=this._getGraidentExtent(n)),a.polygonGradientExtent=i),this.prepareCanvas(t,a,r));var h=o.markerWidth,f=o.markerHeight,d=o.markerLineWidth/2;if("ellipse"===s)hn.ellipse(t,n,h/2,f/2,f/2,u,l);else if("cross"===s||"x"===s){for(var p=c.length-1;p>=0;p--)c[p]._add(n);hn.path(t,c.slice(0,2),u),hn.path(t,c.slice(2,4),u)}else if("diamond"===s||"bar"===s||"square"===s||"rectangle"===s||"triangle"===s){"bar"===s?n=n.add(0,-d):"rectangle"===s&&(n=n.add(d,d));for(var m=c.length-1;m>=0;m--)c[m]._add(n);hn.polygon(t,c,u,l)}else if("pin"===s){n=n.add(0,-d);for(var g=c.length-1;g>=0;g--)c[g]._add(n);var v=t.lineCap;t.lineCap="round",hn.bezierCurveAndFill(t,c,u,l),t.lineCap=v}else{if("pie"!==s)throw new Error("unsupported markerType: "+s);n=n.add(0,d);var y=180*Math.atan(h/2/f)/Math.PI,_=t.lineCap;t.lineCap="round",hn.sector(t,n,f,[90-y,90+y],u,l),t.lineCap=_}},n.getPlacement=function(){return this.symbol.markerPlacement},n.getRotation=function(){var t=this.style.markerRotation;return m(t)?-t*Math.PI/180:null},n.getFixedExtent=function(){var t=this.getDxDy(),e=2*this.padding,n=this._calMarkerSize().map((function(t){return t-e})),r=this._getAnchor(n[0],n[1]),i=new Zn(t.add(0,0),t.add(n[0],n[1]));i._add(r);var o=this.getRotation();return o&&(i=this._rotateExtent(i,o)),i},n.translate=function(){var t,e,n=this.symbol,r={markerType:F(n.markerType,"ellipse"),markerFill:F(n.markerFill,"#00f"),markerFillOpacity:F(n.markerFillOpacity,1),markerFillPatternFile:F(n.markerFillPatternFile,null),markerLineColor:F(n.markerLineColor,"#000"),markerLineWidth:F(n.markerLineWidth,1),markerLineOpacity:F(n.markerLineOpacity,1),markerLineDasharray:F(n.markerLineDasharray,[]),markerLinePatternFile:F(n.markerLinePatternFile,null),markerDx:F(n.markerDx,0),markerDy:F(n.markerDy,0),markerWidth:F(n.markerWidth,10),markerHeight:F(n.markerHeight,10),markerRotation:F(n.markerRotation,0)},i=r.markerType;return"bar"===i||"pie"===i||"pin"===i?(t="middle",e="top"):"rectangle"===i?(t="right",e="bottom"):(t="middle",e="middle"),r.markerHorizontalAlignment=F(n.markerHorizontalAlignment,t),r.markerVerticalAlignment=F(n.markerVerticalAlignment,e),m(n.markerOpacity)&&(m(n.markerFillOpacity)&&(r.markerFillOpacity*=n.markerOpacity),m(n.markerLineOpacity)&&(r.markerLineOpacity*=n.markerOpacity)),r},e.translateLineAndFill=function(t){var e={lineColor:t.markerLineColor,linePatternFile:t.markerLinePatternFile,lineWidth:t.markerLineWidth,lineOpacity:t.markerLineOpacity,lineDasharray:t.markerLineDasharray,lineCap:"butt",lineJoin:"round",polygonFill:t.markerFill,polygonPatternFile:t.markerFillPatternFile,polygonOpacity:t.markerFillOpacity};return 0===e.lineWidth&&(e.lineOpacity=0),e},e._getVectorPoints=function(t,e,n){var r,i,o,a,s=n/2,c=e/2;if("triangle"===t)return[r=new me(0,0-s),i=new me(0-c,0+s),o=new me(0+c,0+s)];if("cross"===t)return[r=new me(0-c,0),i=new me(0+c,0),o=new me(0,0-s),a=new me(0,0+s)];if("diamond"===t)return[r=new me(0-c,0),i=new me(0,0-s),o=new me(0+c,0),a=new me(0,0+s)];if("square"===t)return[r=new me(0-c,0+s),i=new me(0+c,0+s),o=new me(0+c,0-s),a=new me(0-c,0-s)];if("rectangle"===t)return i=(r=new me(0,0)).add(e,0),o=r.add(e,n),a=r.add(0,n),[r,i,o,a];if("x"===t)return[r=new me(0-c,0+s),i=new me(0+c,0-s),o=new me(0+c,0+s),a=new me(0-c,0-s)];if("bar"===t)return[r=new me(0-c,0-n),i=new me(0+c,0-n),o=new me(0+c,0),a=new me(0-c,0)];if("pin"===t){var u=n*Math.atan(c/s);return[r=new me(0,0),i=new me(0-u,0-n),o=new me(0+u,0-n),a=new me(0,0)]}return[]},e}(Cr),Ir=function(t){function e(){return t.apply(this,arguments)||this}fe(e,t);var n=e.prototype;return n.getPlacement=function(){return"point"},n.getDxDy=function(){return new me(0,0)},n.symbolize=function(t){var e=this.geometry,n=e.getLayer();if(e.options.debug||!n||n.options.debug){var r=this.getMap();if(r&&!r.isZooming()){var i=n.options.debugOutline;t.strokeStyle=i,t.fillStyle=i;var o=this.getPainter().getContainerExtent().toArray();hn.polygon(t,[o],1,0);for(var a=this._getRenderContainerPoints(),s=this.geometry.getId(),c=Tr._getVectorPoints("cross",10,10),u=0;u<a.length;u++){var l=a[u];p(s)||hn.fillText(t,s,l.add(8,-4),i);for(var h=[],f=0;f<c.length;f++)h.push(c[f].add(l));hn.path(t,h.slice(0,2),1),hn.path(t,h.slice(2,4),1)}}}},e}(Cr),Pr=function(t){function e(e,n,r){var i;return(i=t.call(this,e,n,r)||this).style=i._defineStyle(i.translate()),i}fe(e,t),e.test=function(t){return!!t&&!p(t.markerFile)};var n=e.prototype;return n.symbolize=function(t,e){var n=this.style;if(this.painter.isHitTesting()||0!==n.markerWidth&&0!==n.markerHeight&&0!==n.markerOpacity){var r=this._getRenderContainerPoints();if(H(r)){var i=this._getImage(e);if(i){this._prepareContext(t);var o,a=n.markerWidth,s=n.markerHeight;if(!m(a)||!m(s)){a=i.width,s=i.height,n.markerWidth=a,n.markerHeight=s;var c=[n.markerFile,n.markerWidth,n.markerHeight];e.isResourceLoaded(c)||e.addResource(c,i);var u=this.getPainter();u.isSpriting()||u.removeCache()}"path"!==this.symbol.markerType&&m(n.markerOpacity)&&n.markerOpacity<1&&(o=t.globalAlpha,t.globalAlpha*=n.markerOpacity);for(var l=Ce(new ge(a,s),n.markerHorizontalAlignment,n.markerVerticalAlignment),h=0,f=r.length;h<f;h++){var d=r[h],p=this._rotate(t,d,this._getRotationAt(h));p&&(d=p),hn.image(t,i,d.x+l.x,d.y+l.y,a,s),p&&t.restore()}void 0!==o&&(t.globalAlpha=o)}else"undefined"!=typeof console&&console.warn("no img found for "+(this.style.markerFile||this._url[0]))}}},n._getImage=function(t){return t?t.getImage([this.style.markerFile,this.style.markerWidth,this.style.markerHeight]):null},n.getPlacement=function(){return this.symbol.markerPlacement},n.getRotation=function(){var t=this.style.markerRotation;return m(t)?-t*Math.PI/180:null},n.getDxDy=function(){var t=this.style,e=t.markerDx,n=t.markerDy;return new me(e,n)},n.getFixedExtent=function(t){var e=this.style,n=e.markerFile,r=t?t.getImage(n):null,i=e.markerWidth||(r?r.width:0),o=e.markerHeight||(r?r.height:0),a=this.getDxDy(),s=Ce(new ge(i,o),e.markerHorizontalAlignment,e.markerVerticalAlignment),c=new Zn(a.add(0,0),a.add(i,o));c._add(s);var u=this.getRotation();return u&&(c=this._rotateExtent(c,u)),c},n.translate=function(){var t=this.symbol;return{markerFile:t.markerFile,markerOpacity:F(t.markerOpacity,1),markerWidth:F(t.markerWidth,null),markerHeight:F(t.markerHeight,null),markerRotation:F(t.markerRotation,0),markerDx:F(t.markerDx,0),markerDy:F(t.markerDy,0),markerHorizontalAlignment:F(t.markerHorizontalAlignment,"middle"),markerVerticalAlignment:F(t.markerVerticalAlignment,"top")}},e}(Cr),Lr=new Ln(0,0),Rr=new Ln(0,0),Or=function(t){function e(e,n,r){var i;return(i=t.call(this)||this).symbol=e,i.geometry=n,i.painter=r,"Point"===n.type?de(i):(i.style=i._defineStyle(i.translate()),i)}fe(e,t),e.test=function(t,e){if(!t)return!1;if(e&&"Point"===e.type)return!1;for(var n in t){var r=n.slice(0,4);if("line"===r||"poly"===r)return!0}return!1};var n=e.prototype;return n.symbolize=function(t,e){var n=this.style;if(0!==n.polygonOpacity||0!==n.lineOpacity||this.painter.isHitTesting()){var r=this._getPaintParams();if(r){this._prepareContext(t);var i=Rt(n.lineColor),o="Polygon"===this.geometry.getJSONType()||"LineString"===this.geometry.type;!i||!n.lineColor.places&&o||(n.lineGradientExtent=this.getPainter().getContainerExtent()._expand(n.lineWidth)),Rt(n.polygonFill)&&(n.polygonGradientExtent=this.getPainter().getContainerExtent());var a=r[0];if("Polygon"===this.geometry.getJSONType()&&a.length>0&&Array.isArray(a[0][0])||"LineString"===this.geometry.type&&a.length>0&&Array.isArray(a[0]))for(var s=0;s<a.length;s++){this.prepareCanvas(t,n,e),i&&o&&!n.lineColor.places&&this._createGradient(t,a[s],n.lineColor);var c=[t,a[s]];r.length>1&&c.push.apply(c,r.slice(1)),c.push(n.lineOpacity,n.polygonOpacity,n.lineDasharray),this.geometry._paintOn.apply(this.geometry,c)}else{this.prepareCanvas(t,n,e),i&&o&&!n.lineColor.places&&this._createGradient(t,a,n.lineColor);var u=[t];u.push.apply(u,r),u.push(n.lineOpacity,n.polygonOpacity,n.lineDasharray),this.geometry._paintOn.apply(this.geometry,u)}t.setLineDash&&Array.isArray(n.lineDasharray)&&t.setLineDash([])}}},n.get2DExtent=function(){var t=this.getMap(),e=this.geometry._getPrjExtent();if(!e)return null;this._extMin&&this._extMax||(this._extMin=new Ln(0,0),this._extMax=new Ln(0,0)),this._extMin.x=e.xmin,this._extMin.y=e.ymin,this._extMax.x=e.xmax,this._extMax.y=e.ymax;var n=t._prjToPoint(this._extMin,void 0,Lr),r=t._prjToPoint(this._extMax,void 0,Rr);return this._pxExtent?this._pxExtent.set(Math.min(n.x,r.x),Math.min(n.y,r.y),Math.max(n.x,r.x),Math.max(n.y,r.y)):this._pxExtent=new Zn(n,r),this._pxExtent},n.getFixedExtent=function(){var t=this.style.lineWidth/2;return new Zn(-t,-t,t,t)},n._getPaintParams=function(){return this.getPainter().getPaintParams(this.style.lineDx,this.style.lineDy)},n.translate=function(){var t=this.symbol,e={lineColor:F(t.lineColor,"#000"),lineWidth:F(t.lineWidth,2),lineOpacity:F(t.lineOpacity,1),lineDasharray:F(t.lineDasharray,[]),lineCap:F(t.lineCap,"butt"),lineJoin:F(t.lineJoin,"miter"),linePatternFile:F(t.linePatternFile,null),lineDx:F(t.lineDx,0),lineDy:F(t.lineDy,0),polygonFill:F(t.polygonFill,null),polygonOpacity:F(t.polygonOpacity,1),polygonPatternFile:F(t.polygonPatternFile,null),polygonPatternDx:F(t.polygonPatternDx,0),polygonPatternDy:F(t.polygonPatternDy,0),linePatternDx:F(t.linePatternDx,0),linePatternDy:F(t.linePatternDy,0)};return 0===e.lineWidth&&(e.lineOpacity=0),"LineString"!==this.geometry.type||e.polygonFill||(e.polygonFill=e.lineColor),e},n._createGradient=function(t,e,n){if(Array.isArray(e)&&e.length){var r=e.length,i=t.createLinearGradient(e[0].x,e[0].y,e[r-1].x,e[r-1].y);n.colorStops.forEach((function(t){i.addColorStop.apply(i,t)})),t.strokeStyle=i}},e}(Sr),kr="___text_symbol_cache",Br=function(t){function e(e,n,r){var i;if((i=t.call(this,e,n,r)||this)._dynamic=xt(e),i.style=i._defineStyle(i.translate()),0===i.style.textWrapWidth)return de(i);i.strokeAndFill=i._defineStyle(i.translateLineAndFill(i.style));var o=Ee(i.style.textName,i.geometry.getProperties());return i._dynamic||(i._cacheKey=function(t,e){var n=[t];for(var r in e)e.hasOwnProperty(r)&&r.length>4&&"text"===r.substring(0,4)&&n.push(r+"="+e[r]);return n.join("-")}(o,i.style)),i._descText(o),i}fe(e,t),e.test=function(t){return!!t&&!p(t.textName)};var n=e.prototype;return n.symbolize=function(t,e){if(this.painter.isHitTesting()||0!==this.style.textSize&&(this.style.textOpacity||this.style.textHaloRadius&&this.style.textHaloOpacity)&&0!==this.style.textWrapWidth){var n=this._getRenderContainerPoints();if(H(n)){var r=this.style,i=this.strokeAndFill,o=Ee(this.style.textName,this.geometry.getProperties());this._descText(o),this._prepareContext(t),this.prepareCanvas(t,i,e),hn.prepareCanvasFont(t,r);for(var a=0,s=n.length;a<s;a++){var c=n[a],u=this._rotate(t,c,this._getRotationAt(a));u&&(c=u),hn.text(t,o,c,r,this.textDesc),u&&t.restore()}}}},n.getPlacement=function(){return this.symbol.textPlacement},n.getRotation=function(){var t=this.style.textRotation;return m(t)?-t*Math.PI/180:null},n.getDxDy=function(){var t=this.style;return new me(t.textDx,t.textDy)},n.getFixedExtent=function(){var t=this.getDxDy(),e=this.style,n=this.textDesc.size,r=Ce(n,e.textHorizontalAlignment,e.textVerticalAlignment),i=r.x,o=r.y;if(e.textHaloRadius){var a=e.textHaloRadius;n=n.add(2*a,2*a)}var s=new Zn(t.add(i,o),t.add(i+n.width,o+n.height)),c=this.getRotation();return c&&(s=this._rotateExtent(s,c)),s},n.translate=function(){var t=this.symbol,e={textName:t.textName,textFaceName:F(t.textFaceName,"monospace"),textWeight:F(t.textWeight,"normal"),textStyle:F(t.textStyle,"normal"),textSize:F(t.textSize,h),textFont:F(t.textFont,null),textFill:F(t.textFill,"#000"),textOpacity:F(t.textOpacity,1),textHaloFill:F(t.textHaloFill,"#ffffff"),textHaloRadius:F(t.textHaloRadius,0),textHaloOpacity:F(t.textHaloOpacity,1),textWrapWidth:F(t.textWrapWidth,null),textWrapCharacter:F(t.textWrapCharacter,"\n"),textLineSpacing:F(t.textLineSpacing,0),textDx:F(t.textDx,0),textDy:F(t.textDy,0),textHorizontalAlignment:F(t.textHorizontalAlignment,"middle"),textVerticalAlignment:F(t.textVerticalAlignment,"middle"),textAlign:F(t.textAlign,"center"),textRotation:F(t.textRotation,0),textMaxWidth:F(t.textMaxWidth,0),textMaxHeight:F(t.textMaxHeight,0)};return e.textMaxWidth>0&&(!e.textWrapWidth||e.textWrapWidth>e.textMaxWidth)&&(e.textWrapWidth||(e.textMaxHeight=1),e.textWrapWidth=e.textMaxWidth),e},n.translateLineAndFill=function(t){return{lineColor:t.textHaloRadius?t.textHaloFill:t.textFill,lineWidth:t.textHaloRadius,lineOpacity:t.textOpacity,lineDasharray:null,lineCap:"butt",lineJoin:"round",polygonFill:t.textFill,polygonOpacity:t.textOpacity}},n._descText=function(t){this._dynamic?this.textDesc=this._measureText(t):(this.textDesc=this._loadFromCache(),this.textDesc||(this.textDesc=this._measureText(t),this._storeToCache(this.textDesc)))},n._measureText=function(t){var e=this.style.textMaxHeight,n=Ie(t,this.style);return e&&e<n.size.height&&(n.size.height=e),n},n._storeToCache=function(t){C||(this.geometry[kr]||(this.geometry[kr]={}),this.geometry[kr][this._cacheKey]={desc:t,active:!0})},n._loadFromCache=function(){if(!this.geometry[kr])return null;var t=this.geometry[kr][this._cacheKey];return t?(t.active=!0,t.desc):null},e}(Cr);Br.CACHE_KEY=kr;var Dr,Fr=function(t){function e(e,n,r){var i;p(e.markerWidth)&&(e.markerWidth=80),p(e.markerHeight)&&(e.markerHeight=80),e=d(e,(i=t.call(this,e,n,r)||this).translate());var o=i.style=i._defineStyle(e);return he.gecko?i._url=[Tt(o,o.markerWidth,o.markerHeight),o.markerWidth,o.markerHeight]:i._url=[Tt(o),o.markerWidth,o.markerHeight],i}fe(e,t),e.test=function(t){return!!t&&!(!p(t.markerFile)||"path"!==t.markerType)};var n=e.prototype;return n._prepareContext=function(){},n._getImage=function(t){var e=this;if(t&&t.isResourceLoaded(this._url))return t.getImage(this._url);var n=this.painter,r=new Image;return r.onload=function(){var t=n.getLayer()&&n.getLayer().getRenderer();t&&t.setToRedraw()},r.onerror=function(n){n&&"undefined"!=typeof console&&console.warn(n),t.markErrorResource(e._url)},r.src=this._url[0],t&&t.addResource(this._url,r),r},e}(Pr),jr={lineWidth:1,polygonFill:"#fff",polygonOpacity:.5},Ur=function(t){function e(e,n,r){var i;return(i=t.call(this,e,n,r)||this).style=n.getLayer().options.drawAltitude,i.style&&v(i.style)||(i.style={lineWidth:2}),i.style.lineWidth||(i.style.lineWidth=0),i.dxdy=i._defineStyle({dx:e.textDx||e.markerDx,dy:e.textDy||e.markerDy}),i}fe(e,t),e.test=function(t,e){if(!e.getLayer())return!1;var n=e.getJSONType();return"Marker"===n||"LineString"===n};var n=e.prototype;return n.symbolize=function(t){var e=this.geometry.getLayer();if(e.options.drawAltitude){var n=this.geometry.getProperties();if(n&&n[e.options.altitudeProperty]){var r=this._getStyle();if(this._prepareContext(t),"LineString"===this.geometry.type){var i=this._getPaintParams(r.lineDx,r.lineDy);if(!i)return;var o=this.getPainter().getPaintParams(r.lineDx,r.lineDy,!0)[0];this._drawLineAltitude(t,i[0],o)}else{var a=this._getRenderContainerPoints(),s=this._getRenderContainerPoints(!0);if(!a||0===a.length)return;this._drawMarkerAltitude(t,a[0],s[0])}}}},n.getDxDy=function(){var t=this.dxdy;return new me(t.dx||0,t.dy||0)},n.get2DExtent=function(){return"LineString"===this.geometry.type?Or.prototype.get2DExtent.apply(this):t.prototype.get2DExtent.call(this)},n.getPlacement=function(){return"point"},n._getPaintParams=function(t,e){return this.getPainter().getPaintParams(t||0,e||0)},n._drawMarkerAltitude=function(t,e,n){var r=this._getStyle();this.prepareCanvas(t,r),hn.path(t,[e,n],r.lineOpacity,null,r.lineDasharray)},n._drawLineAltitude=function(t,e,n){var r=this._getStyle();if(e.length>0&&Array.isArray(e[0]))for(var i=0;i<e.length;i++)this._drawLine(t,e[i],n[i]);else this._drawLine(t,e,n);t.setLineDash&&Array.isArray(r.lineDasharray)&&t.setLineDash([])},n._drawLine=function(t,e,n){var r=this._getStyle();this.prepareCanvas(t,r);for(var i=0,o=e.length-1;i<o;i++)hn.polygon(t,[e[i],e[i+1],n[i+1],n[i]],r.lineOpacity,r.polygonOpacity,r.lineDasharray)},n._getStyle=function(){var t=this.geometry.getLayer().options.drawAltitude;return v(t)||(t=jr),t.lineWidth||(t.lineWidth=0,t.lineOpacity=0),t},e}(Cr),Nr=Object.freeze({Symbolizer:Mr,CanvasSymbolizer:Sr,DebugSymbolizer:Ir,ImageMarkerSymbolizer:Pr,PointSymbolizer:Cr,StrokeAndFillSymbolizer:Or,TextMarkerSymbolizer:Br,VectorMarkerSymbolizer:Tr,VectorPathMarkerSymbolizer:Fr,DrawAltitudeSymbolizer:Ur}),zr=[Ur,Or,Pr,Fr,Tr,Br],Gr=new me(0,0),Hr=new Zn,Wr=new Zn,Vr=new Zn,Zr=new Zn,Qr=new Zn,Xr=function(t){function e(e){var n;return(n=t.call(this)||this).geometry=e,n.symbolizers=n._createSymbolizers(),n._altAtGLZoom=n._getGeometryAltitude(),n}fe(e,t);var n=e.prototype;return n.getMap=function(){return this.geometry.getMap()},n.getLayer=function(){return this.geometry.getLayer()},n._createSymbolizers=function(){var t=this.getSymbol(),e=[],n=zr,r=t;Array.isArray(t)||(r=[t]);for(var i=r.length-1;i>=0;i--)for(var o=r[i],a=n.length-1;a>=0;a--)if(n[a].test(o,this.geometry)){var s=new n[a](o,this.geometry,this);e.push(s),s instanceof Cr&&(this._hasPoint=!0)}if(!e.length&&console){var c=this.geometry.getId();console.warn("invalid symbol for geometry("+(this.geometry?this.geometry.getType()+(c?":"+c:""):"")+") to draw : "+JSON.stringify(t))}return this._debugSymbolizer=new Ir(t,this.geometry,this),e},n.hasPoint=function(){return!!this._hasPoint},n.getRenderPoints=function(t){return this._renderPoints||(this._renderPoints={}),t||(t="center"),this._renderPoints[t]||(this._renderPoints[t]=this.geometry._getRenderPoints(t)),this._renderPoints[t]},n.getPaintParams=function(t,e,n){var r=this.getMap(),i=this.geometry,o=r.getResolution(),a=0!==r.getPitch(),s=0!==r.getBearing(),c=this._cachedParams,u=i._paintAsPath&&i._paintAsPath();if(u&&this._unsimpledParams&&o<=this._unsimpledParams._res)c=this._unsimpledParams;else if(!c||c._res!==r.getResolution()||this._pitched!==a&&i._redrawWhenPitch()||this._rotated!==s&&i._redrawWhenRotate()){if(!(c=i._getPaintParams()))return null;c._res=o,!i._simplified&&u&&(this._unsimpledParams||(this._unsimpledParams=c),o>this._unsimpledParams._res&&(this._unsimpledParams._res=o)),this._cachedParams=c}if(!c)return null;this._pitched=a,this._rotated=s;var l=r.getGLScale(),h=[],f=c[0],d=r.getContainerExtent(),p=this._pointContainerPoints(f,t,e,n,this._hitPoint&&!d.contains(this._hitPoint));if(!p)return null;h.push(p);for(var g=1,v=c.length;g<v;g++)m(c[g])||c[g]instanceof ge?m(c[g])?h.push(c[g]/l):h.push(c[g].multi(1/l)):h.push(c[g]);return h},n._pointContainerPoints=function(t,e,n,r,i,o){if(this._aboveCamera())return null;var a,s=this.getMap(),c=s.getGLZoom(),u=this.containerOffset;function l(t,r){var i=s._pointToContainerPoint(t,c,r)._sub(u);return(e||n)&&i._add(e||0,n||0),i}var h=this.getAltitude();if(Array.isArray(t)){var f,d=this.geometry,p=(f=!i&&d.options.enableClip?this._clip(t,h):{points:t,altitude:h}).points;h=f.altitude,r&&(h=0);var m=h;a=[];for(var g=0,v=p.length;g<v;g++){var y=p[g];if(Array.isArray(y)){for(var _=[],b=0,x=y.length;b<x;b++){var w=y[b];Array.isArray(h)&&(m=h[g]?h[g][b]:0),_.push(l(w,m))}a.push(_)}else Array.isArray(h)&&(m="vertex-last"===o?h[h.length-1-g]:"line"===o?(h[g]+h[g+1])/2:h[g]),a.push(l(y,m))}}else t instanceof me&&(r&&(h=0),a=s._pointToContainerPoint(t,c,h)._sub(u),(e||n)&&a._add(e,n));return a},n._clip=function(t,e){var n=this.getMap(),r=this.geometry,i=this.getSymbol().lineWidth;m(i)||(i=4);var o=n._get2DExtent(void 0,Zr)._expand(i);if(n.getPitch()>0&&e){var a=n.cameraLookAt,s=n.cameraPosition;Gr.set(s.x,s.y),o=o._combine(Gr._add(j(a[0]-s[0]),j(a[1]-s[1])))}var c=t;if(this.get2DExtent(null,Qr).within(o))return{points:c,altitude:e};var u=n._get2DExtent(n.getGLZoom(),Zr)._expand(i*n._glScale),l=r.options.smoothness;if(r.getShell&&this.geometry.getHoles&&!l)if(Array.isArray(t[0])){c=[];for(var h=0;h<t.length;h++){var f=_r(t[h],u);f.length&&c.push(f)}}else c=_r(t,u);else if("LineString"===r.getJSONType()&&!l){if(Array.isArray(t[0])){c=[];for(var d=0;d<t.length;d++)k(c,vr(t[d],u,!1,!!l))}else c=vr(t,u,!1,!!l);return this._interpolateSegAlt(c,t,e)}return{points:c,altitude:e}},n._interpolateSegAlt=function(t,e,n){if(!Array.isArray(n)){var r=function(t){return t.point};return{points:t.map((function(t){return Array.isArray(t)?t.map(r):t.point})),altitude:n}}var i=function t(e,n,r){if(!Array.isArray(r))return e;for(var i=[],o=0,a=e.length;o<a;o++)if(Array.isArray(e[o]))i.push(t(e[o],n,r));else{var s=e[o];if(s.point.equals(n[s.index]))s.altitude=r[s.index],i.push(s);else{var c=void 0,u=void 0;0===s.index?(c=s.index,u=s.index+1):(c=s.index-1,u=s.index);var l=s.point.distanceTo(n[u]),h=l/(l+n[c].distanceTo(s.point)),f=N(r[c],r[u],1-h);s.altitude=f,i.push(s)}}return i}(t,e,n);return n=[],{points:i.map((function(t){if(Array.isArray(t)){var e=[],r=t.map((function(t){return e.push(t.altitude),t.point}));return n.push(e),r}return n.push(t.altitude),t.point})),altitude:n}},n.getSymbol=function(){return this.geometry._getInternalSymbol()},n.paint=function(t,e,n){if(this.symbolizers){var r=this.getLayer()._getRenderer();if(r&&(r.context||e)&&(!t||t.intersects(this.get2DExtent(r.resources,Hr)))){var i=this.getMap(),o=this.getMinAltitude(),a=i.getFrustumAltitude();if(!(o&&a&&a<o)){this.containerOffset=n||i._pointToContainerPoint(r.southWest)._add(0,-i.height),this._beforePaint();for(var s=e||r.context,c=[s,r.resources],u=this.symbolizers.length-1;u>=0;u--)this._prepareShadow(s,this.symbolizers[u].symbol),this.symbolizers[u].symbolize.apply(this.symbolizers[u],c);this._afterPaint(),this._painted=!0,this._debugSymbolizer.symbolize.apply(this._debugSymbolizer,c)}}}},n.getSprite=function(t,e){if("Point"!==this.geometry.type)return null;if(this._spriting=!0,!this._sprite&&this.symbolizers.length>0){var n=new Zn;this.symbolizers.forEach((function(e){var r=e.getFixedExtent(t);n._combine(r)}));var r,i=n.getMin().multi(-1),o=e||(this.getMap()?this.getMap().CanvasClass:null),a=hn.createCanvas(n.getWidth(),n.getHeight(),o);this._renderPoints&&(r=this._renderPoints);for(var s=a.getContext("2d"),c=[s,t],u=this.symbolizers.length-1;u>=0;u--){var l=this.symbolizers[u].getDxDy();this._renderPoints={center:[[i.add(l)]]},this._prepareShadow(s,this.symbolizers[u].symbol),this.symbolizers[u].symbolize.apply(this.symbolizers[u],c)}r&&(this._renderPoints=r),this._sprite={canvas:a,offset:n.getCenter()}}return this._spriting=!1,this._sprite},n.isSpriting=function(){return!!this._spriting},n.hitTest=function(t,e){(!e||e<.5)&&(e=.5),Dr||(Dr=hn.createCanvas(1,1)),hn.setHitTesting(!0),Dr.width=Dr.height=2*e;var n=Dr.getContext("2d");this._hitPoint=t.sub(e,e);try{this.paint(null,n,this._hitPoint)}catch(t){throw t}finally{hn.setHitTesting(!1)}delete this._hitPoint;for(var r=n.getImageData(0,0,Dr.width,Dr.height).data,i=3,o=r.length;i<o;i+=4)if(r[i]>0)return!0;return!1},n.isHitTesting=function(){return!!this._hitPoint},n._prepareShadow=function(t,e){e.shadowBlur?(t.shadowBlur=this.isHitTesting()?0:e.shadowBlur,t.shadowColor=e.shadowColor||"#000",t.shadowOffsetX=e.shadowOffsetX||0,t.shadowOffsetY=e.shadowOffsetY||0):t.shadowBlur&&(t.shadowBlur=null,t.shadowColor=null,t.shadowOffsetX=null,t.shadowOffsetY=null)},n._eachSymbolizer=function(t,e){if(this.symbolizers){e||(e=this);for(var n=this.symbolizers.length-1;n>=0;n--)t.apply(e,[this.symbolizers[n]])}},n.get2DExtent=function(t,e){this._verifyProjection();var n=this.getMap();t=t||this.getLayer()._getRenderer().resources;var r=n.getZoom(),i=this._isDynamicSize();if(this._extent2D&&this._extent2D._zoom===r&&this._fixedExtent||(this._extent2D&&this._extent2D._zoom!==r&&delete this._extent2D,this.symbolizers&&(this._extent2D||(this._extent2D=this._computeExtent2D(new Zn),this._extent2D._zoom=r),this._fixedExtent||(this._fixedExtent=this._computeFixedExtent(t,new Zn)))),!this._extent2D)return i&&delete this._fixedExtent,null;var o=this._fixedExtent,a=o.xmin,s=o.ymin,c=o.xmax,u=o.ymax;return i&&delete this._fixedExtent,Vr.set(a,-u,c,-s),e?(e.set(this._extent2D.xmin,this._extent2D.ymin,this._extent2D.xmax,this._extent2D.ymax),e._add(Vr),e):this._extent2D.add(Vr)},n._computeExtent2D=function(t){for(var e=this.symbolizers.length-1;e>=0;e--){var n=this.symbolizers[e];t._combine(n.get2DExtent())}return t},n._computeFixedExtent=function(t,e){for(var n=this.symbolizers.length-1;n>=0;n--){var r=this.symbolizers[n];r.getFixedExtent&&e._combine(r.getFixedExtent(t))}return e},n._isDynamicSize=function(){for(var t=this.symbolizers.length-1;t>=0;t--)if(this.symbolizers[t].isDynamicSize())return!0;return!1},n.getContainerExtent=function(t){if(this._aboveCamera())return null;this._verifyProjection();var e=this.getMap(),n=e.getZoom(),r=e._glScale;this._extent2D&&this._extent2D._zoom===n||this.get2DExtent(null,Wr);var i=this.getMinAltitude(),o=this._extent2D.convertTo((function(t){return e._pointToContainerPoint(t,n,i/r,Gr)}),t),a=this.getMaxAltitude();if(a!==i){var s=this._extent2D.convertTo((function(t){return e._pointToContainerPoint(t,n,a/r,Gr)}),Wr);o._combine(s)}var c=this.geometry.getLayer();if("LineString"===this.geometry.type&&a&&c.options.drawAltitude){var u=this._extent2D.convertTo((function(t){return e._pointToContainerPoint(t,n,0,Gr)}),Wr);o._combine(u)}return o&&o._add(this._fixedExtent||this._computeFixedExtent(null,new Zn)),this.geometry.options.smoothness&&o._expand(.15*o.getWidth()),o},n._aboveCamera=function(){var t=this.getMinAltitude(),e=this.getMap().getFrustumAltitude();return t&&e&&e<t},n.getFixedExtent=function(){var t=this.getMap().getZoom();return this._isDynamicSize()?this._computeFixedExtent(null,new Zn):(this._extent2D&&this._extent2D._zoom===t||this.get2DExtent(null,Vr),this._fixedExtent)},n.setZIndex=function(t){this._eachSymbolizer((function(e){e.setZIndex(t)}))},n.show=function(){this._painted?(this.removeCache(),this._eachSymbolizer((function(t){t.show()}))):this.getLayer().isCanvasRender()||this.paint()},n.hide=function(){this._eachSymbolizer((function(t){t.hide()}))},n.repaint=function(){this._altAtGLZoom=this._getGeometryAltitude(),this.removeCache();var t=this.getLayer();if(t){var e=t.getRenderer();e&&e.setToRedraw()&&e.setToRedraw()}},n.refreshSymbol=function(){this.removeCache(),this._removeSymbolizers(),this.symbolizers=this._createSymbolizers()},n.remove=function(){this.removeCache(),this._removeSymbolizers()},n._removeSymbolizers=function(){this._eachSymbolizer((function(t){delete t.painter,t.remove()})),delete this.symbolizers},n.removeCache=function(){delete this._renderPoints,delete this._paintParams,delete this._sprite,delete this._extent2D,delete this._fixedExtent,delete this._cachedParams,delete this._unsimpledParams,this.geometry&&delete this.geometry[Br.CACHE_KEY]},n.getAltitude=function(){return this.geometry.getAltitude()!==this._propAlt&&(this._altAtGLZoom=this._getGeometryAltitude()),this._altAtGLZoom?this._altAtGLZoom:0},n.getMinAltitude=function(){return this.minAltitude?this.minAltitude:0},n.getMaxAltitude=function(){return this.maxAltitude?this.maxAltitude:0},n._getGeometryAltitude=function(){var t=this;if(!this.getMap())return 0;var e=this.geometry.getAltitude();if(this._propAlt=e,!e)return this.minAltitude=this.maxAltitude=0,0;var n=this.geometry.getCenter();return n?Array.isArray(e)?(this.minAltitude=Number.MAX_VALUE,this.maxAltitude=Number.MIN_VALUE,e.map((function(e){var r=t._meterToPoint(n,e);return r<t.minAltitude&&(t.minAltitude=r),r>t.maxAltitude&&(t.maxAltitude=r),r}))):(this.minAltitude=this.maxAltitude=this._meterToPoint(n,e),this.minAltitude):0},n._meterToPoint=function(t,e){var n=this.getMap(),r=n.getGLZoom();return n.distanceToPoint(e,0,r,t).x*j(e)},n._verifyProjection=function(){var t=this.geometry._getProjection();this._projCode&&this._projCode!==t.code&&this.removeCache(),this._projCode=t.code},n._beforePaint=function(){var t=this.geometry[Br.CACHE_KEY];if(t)for(var e in t)x(t,e)&&(t[e].active=!1)},n._afterPaint=function(){var t=this.geometry[Br.CACHE_KEY];if(t)for(var e in t)x(t,e)&&(t[e].active||delete t[e])},e}(Mn),Yr=new Zn,Jr=function(t){function e(e,n){var r;return(r=t.call(this)||this).geometry=e,r.isMask=n,r}fe(e,t);var n=e.prototype;return n._eachPainter=function(t){for(var e,n=this.geometry.getGeometries(),r=0,i=n.length;r<i&&(!(e=this.isMask?n[r]._getMaskPainter():n[r]._getPainter())||!e||!1!==t.call(this,e));r++);},n.paint=function(t){this.geometry&&this._eachPainter((function(e){e.paint(t)}))},n.get2DExtent=function(t,e){e&&e.set(null,null,null,null);var n=e||new Zn;return this._eachPainter((function(e){n=n._combine(e.get2DExtent(t,Yr))})),n},n.getContainerExtent=function(){var t=new Zn;return this._eachPainter((function(e){t=t.combine(e.getContainerExtent())})),t},n.remove=function(){var t=arguments;this._eachPainter((function(e){e.remove.apply(e,t)}))},n.setZIndex=function(){var t=arguments;this._eachPainter((function(e){e.setZIndex.apply(e,t)}))},n.show=function(){var t=arguments;this._eachPainter((function(e){e.show.apply(e,t)}))},n.hide=function(){var t=arguments;this._eachPainter((function(e){e.hide.apply(e,t)}))},n.repaint=function(){var t=arguments;this._eachPainter((function(e){e.repaint.apply(e,t)}))},n.refreshSymbol=function(){var t=arguments;this._eachPainter((function(e){e.refreshSymbol.apply(e,t)}))},n.hasPoint=function(){var t=!1;return this._eachPainter((function(e){return!e.hasPoint()||(t=!0,!1)})),t},n.getMinAltitude=function(){var t=!0,e=0;return this._eachPainter((function(n){var r=n.getMinAltitude();(t||r<e)&&(t=!1,e=r)})),e},n.getMaxAltitude=function(){var t=0;return this._eachPainter((function(e){var n=e.getMaxAltitude();n>t&&(t=n)})),t},e}(Mn),qr={"EPSG:3857":{resolutions:function(){for(var t=[],e=12756274*Math.PI,n=0;n<21;n++)t[n]=e/(256*Math.pow(2,n));return t}(),fullExtent:{top:6378137*Math.PI,left:-6378137*Math.PI,bottom:-6378137*Math.PI,right:6378137*Math.PI}},"EPSG:4326":{fullExtent:{top:90,left:-180,bottom:-90,right:180},resolutions:function(){for(var t=[],e=0;e<20;e++)t[e]=180/(128*Math.pow(2,e));return t}()},BAIDU:{resolutions:function(){for(var t=Math.pow(2,18),e=[],n=0;n<20;n++)e[n]=t,t*=.5;return e}(),fullExtent:{top:33554432,left:-33554432,bottom:-33554432,right:33554432}},IDENTITY:{resolutions:function(){for(var t=Math.pow(2,8),e=[],n=0;n<18;n++)e[n]=t,t*=.5;return e}(),fullExtent:{top:2e5,left:-2e5,bottom:-2e5,right:2e5}}};qr["EPSG:4490"]=qr["EPSG:4326"];var Kr=function(){function t(t){void 0===t&&(t={}),this.options=t,this._initSpatialRef()}t.getProjectionInstance=function(t){if(!t)return null;if(v(t))return t;for(var e in t=(t+"").toLowerCase(),dr)if(x(dr,e)){var n=dr[e].code;if(n&&n.toLowerCase()===t)return dr[e]}return null},t.equals=function(t,e){if(!t&&!e)return!0;if(!t||!e)return!1;if(t.projection!==e.projection)return!1;var n=t.fullExtent,r=e.fullExtent;if(n&&!r||!n&&r)return!1;if(n&&r&&(n.top!==r.top||n.bottom!==r.bottom||n.left!==r.left||n.right!==r.right))return!1;var i=t.resolutions,o=e.resolutions;if(i&&o){if(i.length!==o.length)return!1;for(var a=0;a<i.length;a++)if(i[a]!==o[a])return!1}return!0};var e=t.prototype;return e._initSpatialRef=function(){var e=this.options.projection;if(!(e=e?t.getProjectionInstance(e):fr))throw new Error("must provide a valid projection in map's spatial reference.");(e=d({},Xn,e)).measureLength||d(e,or.DEFAULT),this._projection=e;var n,r=this.options.resolutions;if(!r&&(e.code&&(n=qr[e.code])&&(r=n.resolutions,this.isEPSG="IDENTITY"!==e.code),!r))throw new Error("must provide valid resolutions in map's spatial reference.");this._resolutions=r;var i=this.options.fullExtent;if(!i&&(e.code&&(n=qr[e.code])&&(i=n.fullExtent),!i))throw new Error("must provide a valid fullExtent in map's spatial reference.");if(p(i.left)?(this._fullExtent=new Vn(i),i.left=i.xmin,i.right=i.xmax,i.top=i.ymax,i.bottom=i.ymin):this._fullExtent=new Vn(new Ln(i.left,i.top),new Ln(i.right,i.bottom)),p(i.top)||p(i.bottom)||p(i.left)||p(i.right))throw new Error("must provide valid top/bottom/left/right in fullExtent.");d(this._fullExtent,i),this._projection.fullExtent=i;var o=i.right>=i.left?1:-1,a=i.top>=i.bottom?-1:1;this._transformation=new Qn([o,a,0,0])},e.getResolutions=function(){return this._resolutions||[]},e.getResolution=function(t){var e=0|t;e<0?e=0:e>this._resolutions.length-1&&(e=this._resolutions.length-1);var n=this._resolutions[e];return e!==t&&t>0&&e<this._resolutions.length-1?n+(this._resolutions[e+1]-n)*(t-e):n},e.getProjection=function(){return this._projection},e.getFullExtent=function(){return this._fullExtent},e.getTransformation=function(){return this._transformation},e.getMinZoom=function(){for(var t=0;t<this._resolutions.length;t++)if(!p(this._resolutions[t]))return t;return 0},e.getMaxZoom=function(){for(var t=this._resolutions.length-1;t>=0;t--)if(!p(this._resolutions[t]))return t;return this._resolutions.length-1},e.getZoomDirection=function(){return j(this._resolutions[this.getMinZoom()]-this._resolutions[this.getMaxZoom()])},e.toJSON=function(){return this.json||(this.json={resolutions:this._resolutions,fullExtent:{top:this._fullExtent.top,left:this._fullExtent.left,bottom:this._fullExtent.bottom,right:this._fullExtent.right},projection:this._projection.code}),this.json},t}(),$r=function(t){function e(e){var n,r=d({},e),i=r.symbol,o=r.properties,a=r.id;return delete r.symbol,delete r.id,delete r.properties,n=t.call(this,r)||this,i&&n.setSymbol(i),o&&n.setProperties(o),p(a)||n.setId(a),n}fe(e,t);var n=e.prototype;return n.getFirstCoordinate=function(){if("GeometryCollection"===this.type){var t=this.getGeometries();return t.length?t[0].getFirstCoordinate():null}var e=this.getCoordinates();if(!Array.isArray(e))return e;do{e=e[0]}while(Array.isArray(e)&&e.length>0);return e},n.getLastCoordinate=function(){if("GeometryCollection"===this.type){var t=this.getGeometries();return t.length?t[t.length-1].getLastCoordinate():null}var e=this.getCoordinates();if(!Array.isArray(e))return e;do{e=e[e.length-1]}while(Array.isArray(e)&&e.length>0);return e},n.addTo=function(t,e){return t.addGeometry(this,e),this},n.getLayer=function(){return this._layer?this._layer:null},n.getMap=function(){return this._layer?this._layer.getMap():null},n.getId=function(){return this._id},n.setId=function(t){var e=this.getId();return this._id=t,this._fireEvent("idchange",{old:e,new:t}),this},n.getProperties=function(){return this.properties?this.properties:this._getParent()?this._getParent().getProperties():null},n.setProperties=function(t){var e=this.properties;return this.properties=v(t)?d({},t):t,this._repaint(),this._fireEvent("propertieschange",{old:e,new:t}),this},n.getType=function(){return this.type},n.getSymbol=function(){var t=this._symbol;return t?Array.isArray(t)?Bt(t):d({},t):null},n.setSymbol=function(t){return this._symbol=this._prepareSymbol(t),this.onSymbolChanged(),this},n.updateSymbol=function(t){if(!t)return this;var e=this._getSymbol();return e=Bt(e||this._getInternalSymbol(),t),this._eventSymbolProperties=t,this.setSymbol(e)},n.getCenter=function(){return this._computeCenter(this._getMeasurer())},n.getExtent=function(){var t=this._getPrjExtent(),e=this._getProjection();if(t&&e){var n=e.unproject(new Ln(t.xmin,t.ymin)),r=e.unproject(new Ln(t.xmax,t.ymax));return new Vn(n,r,e)}return this._computeExtent(this._getMeasurer())},n.getContainerExtent=function(t){var e=this._getPainter();return e?e.getContainerExtent(t):null},n.getSize=function(){var t=this.getContainerExtent();return t?t.getSize():null},n.containsPoint=function(t,e){if(!this.getMap())throw new Error('The geometry is required to be added on a map to perform "containsPoint".');return t instanceof Ln&&(t=this.getMap().coordToContainerPoint(t)),this._containsPoint(t,e)},n._containsPoint=function(t,e){var n=this._getPainter();return!!n&&(p(e)&&this._hitTestTolerance&&(e=this._hitTestTolerance()),n.hitTest(t,e))},n.show=function(){if(this.options.visible=!0,this.getMap()){var t=this._getPainter();t&&t.show(),this._fireEvent("show")}return this},n.hide=function(){if(this.options.visible=!1,this.getMap()){this.onHide();var t=this._getPainter();t&&t.hide(),this._fireEvent("hide")}return this},n.isVisible=function(){if(!this.options.visible)return!1;var t=this._getInternalSymbol();if(!t)return!0;if(Array.isArray(t)){if(!t.length)return!0;for(var e=0,n=t.length;e<n;e++)if(p(t[e].opacity)||t[e].opacity>0)return!0;return!1}return p(t.opacity)||m(t.opacity)&&t.opacity>0},n.getZIndex=function(){return this.options.zIndex||0},n.setZIndex=function(t){var e=this.options.zIndex;return this.options.zIndex=t,this._fireEvent("zindexchange",{old:e,new:t}),this},n.setZIndexSilently=function(t){return this.options.zIndex=t,this},n.bringToFront=function(){var t=this.getLayer();if(!t||!t.getGeoMaxZIndex)return this;var e=t.getGeoMaxZIndex();return this.setZIndex(e+1),this},n.bringToBack=function(){var t=this.getLayer();if(!t||!t.getGeoMinZIndex)return this;var e=t.getGeoMinZIndex();return this.setZIndex(e-1),this},n.translate=function(t,e){if(p(t))return this;var n=new Ln(t,e);if(0===n.x&&0===n.y)return this;var r=this.getCoordinates();if(r)if(Array.isArray(r)){var i=D(r,(function(t){return t.add(n)}));this.setCoordinates(i)}else this.setCoordinates(r.add(n));return this},n.flash=function(t,e,n,r){return et.call(this,t,e,n,r)},n.copy=function(){var t=this.toJSON(),n=e.fromJSON(t);return n.options.visible=!0,n},n.remove=function(){return this.getLayer()?(this._fireEvent("removestart"),this._unbind(),this._fireEvent("removeend"),this._fireEvent("remove"),this):this},n.toGeoJSONGeometry=function(){return this._exportGeoJSONGeometry()},n.toGeoJSON=function(t){t||(t={});var e={type:"Feature",geometry:null};if(p(t.geometry)||t.geometry){var n=this._exportGeoJSONGeometry();e.geometry=n}var r,i=this.getId();return p(i)||(e.id=i),(p(t.properties)||t.properties)&&(r=this._exportProperties()),e.properties=r,e},n.toJSON=function(t){t||(t={});var e=this._toJSON(t);return d(e,this._exportGraphicOptions(t)),e},n.getLength=function(){return this._computeGeodesicLength(this._getMeasurer())},n.getArea=function(){return this._computeGeodesicArea(this._getMeasurer())},n.rotate=function(t,e){if("GeometryCollection"===this.type)return this.getGeometries().forEach((function(n){return n.rotate(t,e)})),this;e=e?new Ln(e):this.getCenter();var n=this._getMeasurer(),r=this.getCoordinates();if(!Array.isArray(r)){if(e.x!==r.x||e.y!==r.y){var i=n._rotate(r,e,t);this.setCoordinates(i)}return this}return D(r,(function(r){return n._rotate(r,e,t)})),this.setCoordinates(r),this},n._getConnectPoints=function(){return[this.getCenter()]},n._initOptions=function(t){var e=d({},t),n=e.symbol,r=e.properties,i=e.id;delete e.symbol,delete e.id,delete e.properties,this.setOptions(e),n&&this.setSymbol(n),r&&this.setProperties(r),p(i)||this.setId(i)},n._bindLayer=function(t){if(this.getLayer())throw new Error("Geometry cannot be added to two or more layers at the same time.");this._layer=t,this._clearCache()},n._prepareSymbol=function(t){if(Array.isArray(t)){for(var e=[],n=0;n<t.length;n++)e.push(Pt(this._checkAndCopySymbol(t[n])));return e}return t?Pt(t=this._checkAndCopySymbol(t)):null},n._checkAndCopySymbol=function(t){var e={};for(var n in t)u[n]&&y(t[n])?e[n]=+t[n]:e[n]=t[n];return e},n._getSymbol=function(){return this._symbol},n._setExternSymbol=function(t){return this._eventSymbolProperties=t,this._externSymbol=this._prepareSymbol(t),this.onSymbolChanged(),this},n._getInternalSymbol=function(){return this._symbol?this._symbol:this._externSymbol?this._externSymbol:this.options.symbol?this.options.symbol:null},n._getPrjExtent=function(){var t=this._getProjection();return this._verifyProjection(),!this._extent&&t&&(this._extent=this._computePrjExtent(t)),this._extent},n._unbind=function(){var t=this.getLayer();t&&(this._animPlayer&&this._animPlayer.finish(),this._clearHandlers(),this._unbindMenu(),this._unbindInfoWindow(),this.isEditing()&&this.endEdit(),this._removePainter(),this.onRemove&&this.onRemove(),t.onRemoveGeometry&&t.onRemoveGeometry(this),delete this._layer,delete this._internalId,delete this._extent)},n._getInternalId=function(){return this._internalId},n._setInternalId=function(t){this._internalId=t},n._getMeasurer=function(){return this._getProjection()?this._getProjection():Kr.getProjectionInstance(this.options.defaultProjection)},n._getProjection=function(){var t=this.getMap();return t?t.getProjection():null},n._verifyProjection=function(){var t=this._getProjection();this._projCode&&t&&this._projCode!==t.code&&this._clearProjection(),this._projCode=t?t.code:this._projCode},n._getExternalResources=function(){return It(this._getInternalSymbol())},n._getPainter=function(){var t=this.getLayer();if(!this._painter&&t)if(-1!==o.indexOf(this.type)){if(t.constructor.getCollectionPainterClass){var e=t.constructor.getCollectionPainterClass();this._painter=new e(this)}}else if(t.constructor.getPainterClass){var n=t.constructor.getPainterClass();this._painter=new n(this)}return this._painter},n._getMaskPainter=function(){return this._maskPainter||(this._maskPainter=this.getGeometries&&this.getGeometries()?new Jr(this,!0):new Xr(this)),this._maskPainter},n._removePainter=function(){this._painter&&this._painter.remove(),delete this._painter},n._paint=function(t){this._painter&&this._painter.paint(t)},n._clearCache=function(){delete this._extent},n._clearProjection=function(){delete this._extent},n._repaint=function(){this._painter&&this._painter.repaint()},n.onHide=function(){this.closeMenu(),this.closeInfoWindow()},n.onShapeChanged=function(){this._clearCache(),this._repaint(),this._fireEvent("shapechange")},n.onPositionChanged=function(){this._clearCache(),this._repaint(),this._fireEvent("positionchange")},n.onSymbolChanged=function(){this._painter&&this._painter.refreshSymbol();var t={};this._eventSymbolProperties&&(t.properties=d({},this._eventSymbolProperties),delete this._eventSymbolProperties),this._fireEvent("symbolchange",t)},n.onConfig=function(t){var e;t.properties&&(e=t.properties,delete t.properties);var n=!1;for(var r in t)if(t.hasOwnProperty(r)){var i=r.slice(0,5);if("arrow"===i||"smoot"===i){n=!0;break}}e?(this.setProperties(e),this._repaint()):n&&this._repaint()},n._setParent=function(t){t&&(this._parent=t)},n._getParent=function(){return this._parent},n._fireEvent=function(t,e){this.getLayer()&&this.getLayer()._onGeometryEvent&&(e||(e={}),e.type=t,e.target=this,this.getLayer()._onGeometryEvent(e)),this.fire(t,e)},n._toJSON=function(t){return{feature:this.toGeoJSON(t)}},n._exportGraphicOptions=function(t){var e={};return(p(t.options)||t.options)&&(e.options=this.config()),(p(t.symbol)||t.symbol)&&(e.symbol=this.getSymbol()),(p(t.infoWindow)||t.infoWindow)&&this._infoWinOptions&&(e.infoWindow=this._infoWinOptions),e},n._exportGeoJSONGeometry=function(){var t=this.getCoordinates(),e=Ln.toNumberArrays(t);return{type:this.getType(),coordinates:e}},n._exportProperties=function(){var t=null,e=this.getProperties();return p(e)||(t=v(e)?d({},e):e),t},n.getAltitude=function(){var t=this.getLayer();if(!t)return 0;var e=t.options,n=this.getProperties(),r=e.enableAltitude&&n?n[e.altitudeProperty]:0,i=t.getAltitude?t.getAltitude():0;return Array.isArray(r)?r.map((function(t){return t+i})):r+i},e}(An(bn(En(Mn))));$r.mergeOptions({id:null,visible:!0,interactive:!0,editable:!0,cursor:null,defaultProjection:"EPSG:4326"});var ti={attribution:null,minZoom:null,maxZoom:null,visible:!0,opacity:1,globalCompositeOperation:null,renderer:"canvas",debugOutline:"#0f0",cssFilter:null,forceRenderOnMoving:!1,forceRenderOnZooming:!1,forceRenderOnRotating:!1,hitDetect:!he.mobile},ei=function(t){function e(e,n){var r,i;return n&&(i=n.canvas,delete n.canvas),(r=t.call(this,n)||this)._canvas=i,r.setId(e),n&&(r.setZIndex(n.zIndex),n.mask&&r.setMask($r.fromJSON(n.mask))),r}fe(e,t);var n=e.prototype;return n.load=function(){if(!this.getMap())return this;if(this.onLoad()){this._initRenderer();var t=this.getZIndex();p(t)||(this._renderer.setZIndex(t),this.isCanvasRender()||this._renderer.render()),this.onLoadEnd()}return this},n.getId=function(){return this._id},n.setId=function(t){var e=this._id;return p(t)||(t+=""),this._id=t,this.fire("idchange",{old:e,new:t}),this},n.addTo=function(t){return t.addLayer(this),this},n.setZIndex=function(t){return this._zIndex=t,p(t)?delete this.options.zIndex:this.options.zIndex=t,this.map&&this.map._sortLayersByZIndex(),this._renderer&&this._renderer.setZIndex(t),this},n.getZIndex=function(){return this._zIndex||0},n.getMinZoom=function(){var t=this.getMap(),e=this.options.minZoom;return t?Math.max(t.getMinZoom(),e||0):e},n.getMaxZoom=function(){var t=this.getMap(),e=this.options.maxZoom;return t?Math.min(t.getMaxZoom(),p(e)?1/0:e):e},n.getOpacity=function(){return this.options.opacity},n.setOpacity=function(t){return this.config("opacity",t),this},n.isCanvasRender=function(){var t=this._getRenderer();return t&&t instanceof mr},n.getMap=function(){return this.map?this.map:null},n.getProjection=function(){var t=this.getMap();return t?t.getProjection():null},n.bringToFront=function(){var t=this._getLayerList();if(!t.length)return this;var e=t[t.length-1];if(1===t.length||e===this)return this;var n=e.getZIndex();return this.setZIndex(n+1),this},n.bringToBack=function(){var t=this._getLayerList();if(!t.length)return this;var e=t[0];if(1===t.length||e===this)return this;var n=e.getZIndex();return this.setZIndex(n-1),this},n.show=function(){var t=this;if(!this.options.visible){this.options.visible=!0;var e=this.getRenderer();e&&e.show();var n=this.getMap();e&&n?n.once("renderend",(function(){t.fire("show")})):this.fire("show")}return this},n.hide=function(){var t=this;if(this.options.visible){this.options.visible=!1;var e=this.getRenderer();e&&e.hide();var n=this.getMap();e&&n?n.once("renderend",(function(){t.fire("hide")})):this.fire("hide")}return this},n.isVisible=function(){if(m(this.options.opacity)&&this.options.opacity<=0)return!1;var t=this.getMap();if(t){var e=t.getZoom();if(!p(this.options.maxZoom)&&this.options.maxZoom<e||!p(this.options.minZoom)&&this.options.minZoom>e)return!1}return p(this.options.visible)&&(this.options.visible=!0),this.options.visible},n.remove=function(){return this.map&&this.map.removeLayer(this),this},n.getMask=function(){return this._mask},n.setMask=function(t){if(!("Point"===t.type&&t._isVectorMarker()||"Polygon"===t.type||"MultiPolygon"===t.type))throw new Error("Mask for a layer must be a marker with vector marker symbol or a Polygon(MultiPolygon).");if(t._bindLayer(this),"Point"===t.type?t.updateSymbol({markerLineColor:"rgba(0, 0, 0, 0)",markerFillOpacity:0}):t.setSymbol({lineColor:"rgba(0, 0, 0, 0)",polygonOpacity:0}),this._mask=t,this.options.mask=t.toJSON(),!this.getMap()||this.getMap().isZooming())return this;var e=this._getRenderer();return e&&e.setToRedraw&&this._getRenderer().setToRedraw(),this},n.removeMask=function(){if(delete this._mask,delete this.options.mask,!this.getMap()||this.getMap().isZooming())return this;var t=this._getRenderer();return t&&t.setToRedraw&&this._getRenderer().setToRedraw(),this},n.onLoad=function(){return!0},n.onLoadEnd=function(){},n.isLoaded=function(){return!!this._loaded},n.getRenderer=function(){return this._getRenderer()},n.onConfig=function(t){if(m(t.opacity)||t.cssFilter){var e=this.getRenderer();e&&e.setToRedraw()}},n.onAdd=function(){},n.onRendererCreate=function(){},n.onCanvasCreate=function(){},n.onRemove=function(){},n._bindMap=function(t,e){t&&(this.map=t,p(e)||this.setZIndex(e),this._switchEvents("on",this),this.onAdd(),this.fire("add"))},n._initRenderer=function(){var t=this.options.renderer;if(this.constructor.getRendererClass){var e=this.constructor.getRendererClass(t);if(!e)throw new Error("Invalid renderer for Layer("+this.getId()+"):"+t);this._renderer=new e(this),this._renderer.layer=this,this._renderer.setZIndex(this.getZIndex()),this._switchEvents("on",this._renderer),this._renderer.onAdd&&this._renderer.onAdd(),this.onRendererCreate(),this.fire("renderercreate",{renderer:this._renderer})}},n._doRemove=function(){this._loaded=!1,this.onRemove(),this._switchEvents("off",this),this._renderer&&(this._switchEvents("off",this._renderer),this._renderer.remove(),delete this._renderer),delete this.map},n._switchEvents=function(t,e){e&&e.getEvents&&this.getMap()[t](e.getEvents(),e)},n._getRenderer=function(){return this._renderer},n._getLayerList=function(){return this.map?this.map._layers:[]},n._getMask2DExtent=function(){if(!this._mask||!this.getMap())return null;var t=this._mask._getMaskPainter();return t?t.get2DExtent():null},e}(An(bn(pr(Mn))));ei.mergeOptions(ti);var ni=ei.prototype.fire;ei.prototype.fire=function(t,e){return"layerload"===t&&(this._loaded=!0),this.map&&(e||(e={}),e.type=t,e.target=this,this.map._onLayerEvent(e)),ni.apply(this,arguments)};var ri={maxVisualPitch:70,maxPitch:80,centerCross:!1,zoomInCenter:!1,zoomOrigin:null,zoomAnimation:!C,zoomAnimationDuration:330,panAnimation:!C,panAnimationDuration:600,zoomable:!0,enableInfoWindow:!0,hitDetect:!he.mobile,hitDetectLimit:5,fpsOnInteracting:25,layerCanvasLimitOnInteracting:-1,maxZoom:null,minZoom:null,maxExtent:null,fixCenterOnResize:!0,checkSize:!0,checkSizeInterval:1e3,renderer:"canvas",cascadePitches:[10,60]},ii=function(t){function e(n,r){var i;if(!r)throw new Error("Invalid options when creating map.");if(!r.center)throw new Error("Invalid center when creating map.");var o=d({},r),a=o.zoom;delete o.zoom;var s=new Ln(o.center);delete o.center;var c=o.baseLayer;delete o.baseLayer;var u=o.layers;return delete o.layers,(i=t.call(this,o)||this).VERSION=e.VERSION,Object.defineProperty(de(de(i)),"id",{value:L(),writable:!1}),i._loaded=!1,i._initContainer(n),i._panels={},i._baseLayer=null,i._layers=[],i._zoomLevel=a,i._center=s,i.setSpatialReference(o.spatialReference||o.view),i.setMaxExtent(o.maxExtent),i._mapViewPoint=new me(0,0),i._initRenderer(),i._updateMapSize(i._getContainerDomSize()),c&&i.setBaseLayer(c),u&&i.addLayer(u),i._Load(),i}fe(e,t),e.addOnLoadHook=function(t){var e=Array.prototype.slice.call(arguments,1),n="function"==typeof t?t:function(){this[t].apply(this,e)};return this.prototype._onLoadHooks=this.prototype._onLoadHooks||[],this.prototype._onLoadHooks.push(n),this};var n=e.prototype;return n.isLoaded=function(){return!!this._loaded},n.getContainer=function(){return this._containerDOM},n.getSpatialReference=function(){return this._spatialReference},n.setSpatialReference=function(t){var e=this.options.spatialReference;return this._loaded&&Kr.equals(e,t)||this._updateSpatialReference(t,e),this},n._updateSpatialReference=function(t,e){if(t=d({},t),this._center=this.getCenter(),this.options.spatialReference=t,this._spatialReference=new Kr(t),this.options.spatialReference&&_(this.options.spatialReference.projection)){var n=this._spatialReference.getProjection();this.options.spatialReference.projection=n.code}return this._resetMapStatus(),this._fireEvent("spatialreferencechange",{old:e,new:d({},this.options.spatialReference)}),this},n.onConfig=function(t){var e=t.spatialReference||t.view;return p(e)||this._updateSpatialReference(e,null),this},n.getProjection=function(){return this._spatialReference?this._spatialReference.getProjection():null},n.getFullExtent=function(){return this._spatialReference?this._spatialReference.getFullExtent():null},n.setCursor=function(t){return delete this._cursor,this._trySetCursor(t),this._cursor=t,this},n.resetCursor=function(){return this.setCursor(null)},n.getCenter=function(){return this._loaded&&this._prjCenter?this.getProjection().unproject(this._prjCenter):this._center},n.setCenter=function(t){if(!t)return this;t=new Ln(t);var e=this.getProjection().project(t);return this._verifyExtent(e)?this._loaded?(this.onMoveStart(),this._setPrjCenter(e),this.onMoveEnd(this._parseEventFromCoord(this.getCenter())),this):(this._center=t,this):this},n.getSize=function(){return p(this.width)||p(this.height)?this._getContainerDomSize():new ge(this.width,this.height)},n.getContainerExtent=function(){var t=this.height,e=this.getPitch(),n=this.options.maxVisualPitch;return n&&e>n&&(t=this._getVisualHeight(n)),new Zn(0,this.height-t,this.width,this.height)},n._getVisualHeight=function(t){t=t||.01;var e=(90-this.getPitch())*Math.PI/180,n=this.getFov()*Math.PI/180;t*=Math.PI/180;var r=this.cameraCenterDistance/this.getGLScale(),i=Math.tan(n/2),o=r*i/(1/Math.tan(t)-i)/Math.sin(t),a=r*(Math.sin(e)*o/(r+Math.cos(e)*o));return this.height/2+a},n.getExtent=function(){return this._pointToExtent(this._get2DExtent())},n.getProjExtent=function(){var t=this._get2DExtent();return new Vn(this._pointToPrj(t.getMin()),this._pointToPrj(t.getMax()))},n.getPrjExtent=function(){return this.getProjExtent()},n.getMaxExtent=function(){return this.options.maxExtent?new Vn(this.options.maxExtent,this.getProjection()):null},n.setMaxExtent=function(t){if(t){var e=new Vn(t,this.getProjection());this.options.maxExtent=e,this._verifyExtent(this._getPrjCenter())||this._panTo(this._prjMaxExtent().getCenter());var n=this.getProjection();this._prjMaxExtent=e.convertTo((function(t){return n.project(t)}))}else delete this.options.maxExtent,delete this._prjMaxExtent;return this},n.getZoom=function(){return this._zoomLevel},n.getZoomForScale=function(t,e,n){var r=this.getZoom();if(p(e)&&(e=r),1===t&&e===r)return r;var i=this._getResolution(e)/t,o=this.getZoomFromRes(i);if(n)return o;var a=1e-6;return this.getSpatialReference().getZoomDirection()<0?Math.ceil(o-a):Math.floor(o+a)},n.getZoomFromRes=function(t){var e=this._getResolutions(),n=this._getResolution(this.getMinZoom()),r=this._getResolution(this.getMaxZoom());if(n<=r){if(t<=n)return this.getMinZoom();if(t>=r)return this.getMaxZoom()}else{if(t>=n)return this.getMinZoom();if(t<=r)return this.getMaxZoom()}for(var i=e.length,o=0;o<i-1;o++)if(e[o]){var a=e[o+1]-e[o],s=t-e[o];if(j(a)===j(s)&&Math.abs(a)>=Math.abs(s))return o+s/a}return i-1},n.setZoom=function(t,e){return void 0===e&&(e={animation:!0}),isNaN(t)||p(t)||(t=+t,this._loaded&&this.options.zoomAnimation&&e.animation?this._zoomAnimation(t):this._zoom(t)),this},n.getMaxZoom=function(){return p(this.options.maxZoom)?this.getMaxNativeZoom():this.options.maxZoom},n.setMaxZoom=function(t){var e=this.getMaxNativeZoom();return t>e&&(t=e),null!==t&&t<this._zoomLevel&&(this.setZoom(t),t=+t),this.options.maxZoom=t,this},n.getMinZoom=function(){return p(this.options.minZoom)?this._spatialReference.getMinZoom():this.options.minZoom},n.setMinZoom=function(t){if(null!==t){t=+t;var e=this._spatialReference.getMinZoom();t<e&&(t=e),t>this._zoomLevel&&this.setZoom(t)}return this.options.minZoom=t,this},n.getMaxNativeZoom=function(){var t=this.getSpatialReference();return t?t.getMaxZoom():null},n.getGLZoom=function(){return this.getMaxNativeZoom()/2},n.getGLScale=function(t){return p(t)&&(t=this.getZoom()),this._getResolution(t)/this._getResolution(this.getGLZoom())},n.zoomIn=function(){return this.setZoom(this.getZoom()+1)},n.zoomOut=function(){return this.setZoom(this.getZoom()-1)},n.isZooming=function(){return!!this._zooming},n.isInteracting=function(){return this.isZooming()||this.isMoving()||this.isRotating()},n.setCenterAndZoom=function(t,e){return p(e)||this._zoomLevel===e?this.setCenter(t):(this.setCenter(t),this.setZoom(e,{animation:!1})),this},n.getFitZoom=function(t,e){var n=this;if(!(t&&t instanceof Vn))return this._zoomLevel;if(t.xmin===t.xmax&&t.ymin===t.ymax)return this.getMaxZoom();var r=this.getSize(),i=t.convertTo((function(t){return n.coordToContainerPoint(t)})),o=i.getWidth(),a=i.getHeight(),s=r.width/o,c=r.height/a,u=this.getSpatialReference().getZoomDirection()<0?Math.max(s,c):Math.min(s,c);return this.getZoomForScale(u,null,e)},n.getView=function(){return{center:this.getCenter().toArray(),zoom:this.getZoom(),pitch:this.getPitch(),bearing:this.getBearing()}},n.setView=function(t){return t?(t.center&&this.setCenter(t.center),null===t.zoom||isNaN(+t.zoom)||this.setZoom(+t.zoom,{animation:!1}),null===t.pitch||isNaN(+t.pitch)||this.setPitch(+t.pitch),null===t.pitch||isNaN(+t.bearing)||this.setBearing(+t.bearing),this):this},n.getResolution=function(t){return this._getResolution(t)},n.getScale=function(t){var e=p(t)?this.getZoom():t,n=this._getResolution(this.getMaxNativeZoom());return this._getResolution(e)/n},n.fitExtent=function(t,e,n,r){if(void 0===n&&(n={}),!t)return this;t=new Vn(t,this.getProjection());var i=this.getFitZoom(t)+(e||0),o=t.getCenter();return void 0===n.animation||n.animation?this._animateTo({center:o,zoom:i},{duration:n.duration||this.options.zoomAnimationDuration,easing:n.easing||"out"},r):this.setCenterAndZoom(o,i)},n.getBaseLayer=function(){return this._baseLayer},n.setBaseLayer=function(t){var e=!1;return this._baseLayer&&(e=!0,this._fireEvent("baselayerchangestart"),this._baseLayer.remove()),t?(this._baseLayer=t,t._bindMap(this,-1),this._baseLayer.on("layerload",(function(){this._fireEvent("baselayerload"),e&&(e=!1,this._fireEvent("baselayerchangeend"))}),this),this._loaded&&this._baseLayer.load(),this._fireEvent("setbaselayer"),this):(delete this._baseLayer,this._fireEvent("baselayerchangeend"),this._fireEvent("setbaselayer"),this)},n.removeBaseLayer=function(){return this._baseLayer&&(this._baseLayer.remove(),delete this._baseLayer,this._fireEvent("baselayerremove")),this},n.getLayers=function(t){return this._getLayers((function(e){return!(e===this._baseLayer||e.getId().indexOf(i)>=0)&&(!t||t(e))}))},n.getLayer=function(t){if(!t)return null;var e=this._layerCache?this._layerCache[t]:null;if(e)return e;var n=this.getBaseLayer();return n&&n.getId()===t?n:null},n.addLayer=function(t){if(!t)return this;if(!Array.isArray(t))return t=Array.prototype.slice.call(arguments,0),this.addLayer(t);this._layerCache||(this._layerCache={});for(var e=this._layers,n=0,r=t.length;n<r;n++){var i=t[n],o=i.getId();if(p(o))throw new Error("Invalid id for the layer: "+o);if(i.getMap()!==this){if(this._layerCache[o])throw new Error("Duplicate layer id in the map: "+o);this._layerCache[o]=i,i._bindMap(this),e.push(i),this._loaded&&i.load()}}return this._sortLayersByZIndex(),this._fireEvent("addlayer",{layers:t}),this},n.removeLayer=function(t){if(!t)return this;if(!Array.isArray(t))return this.removeLayer([t]);for(var e=[],n=0,r=t.length;n<r;n++){var i=t[n];if(i instanceof ei||(i=this.getLayer(i)),i){var o=i.getMap();if(o&&o===this){e.push(i),this._removeLayer(i,this._layers),this._loaded&&i._doRemove();var a=i.getId();this._layerCache&&delete this._layerCache[a]}}}if(e.length>0){var s=this.getRenderer();s&&s.setLayerCanvasUpdated(),this.once("frameend",(function(){e.forEach((function(t){t.fire("remove")}))}))}return this._fireEvent("removelayer",{layers:t}),this},n.sortLayers=function(t){if(!t||!Array.isArray(t))return this;for(var e=[],n=Number.MAX_VALUE,r=0,i=t.length;r<i;r++){var o=t[r];if(y(t[r])&&(o=this.getLayer(o)),!(o instanceof ei&&o.getMap()&&o.getMap()===this))throw new Error("It must be a layer added to this map to order.");o.getZIndex()<n&&(n=o.getZIndex()),e.push(o)}for(var a=0,s=e.length;a<s;a++)e[a].setZIndex(n+a);return this},n.toDataURL=function(t){t||(t={});var e=t.mimeType;e||(e="image/png");var n=t.save,r=this._getRenderer();if(r&&r.toDataURL){var i=t.fileName;i||(i="export");var o=r.toDataURL(e);if(n&&o){var a;if("undefined"!=typeof Blob&&"undefined"!=typeof atob){var s=J(o.replace(/^data:image\/(png|jpeg|jpg);base64,/,""),e);a=URL.createObjectURL(s)}else a=o;var c=document.createElement("a");c.download=i,c.href=a,document.body.appendChild(c),c.click(),document.body.removeChild(c)}return o}return null},n.coordToPoint=function(t,e,n){return this.coordinateToPoint(t,e,n)},n.pointToCoord=function(t,e,n){return this.pointToCoordinate(t,e,n)},n.coordToViewPoint=function(t,e,n){return this.coordinateToViewPoint(t,e,n)},n.viewPointToCoord=function(t,e){return this.viewPointToCoordinate(t,e)},n.coordToContainerPoint=function(t,e,n){return this.coordinateToContainerPoint(t,e,n)},n.containerPointToCoord=function(t,e){return this.containerPointToCoordinate(t,e)},n.containerPointToViewPoint=function(t,e){return e?e.set(t.x,t.y):e=t.copy(),e._sub(this.getViewPoint())},n.viewPointToContainerPoint=function(t,e){return e?e.set(t.x,t.y):e=t.copy(),e._add(this.getViewPoint())},n.checkSize=function(){var t=f()-this._initTime<1500&&0===this.width||0===this.height,e=this._getContainerDomSize(),n=this.height,r=this.width;if(e.width===r&&e.height===n)return this;var i=this.getCenter();if(this.options.fixCenterOnResize)this._updateMapSize(e);else{var o=this._getVisualHeight(this.getPitch()),a=new me(0,this.height-o),s=this._containerPointToPrj(a);this._updateMapSize(e);var c=this._getVisualHeight(this.getPitch()),u=new me(0,this.height-c);this._setPrjCoordAtContainerPoint(s,u),this._mapViewCoord=this._getPrjCenter()}var l=0===e.width||0===e.height||0===r||0===n;return(t||l)&&(this._eventSilence=!0,this.setCenter(i),delete this._eventSilence),this._fireEvent("resize"),this},n.locate=function(t,e,n){return this.getProjection()._locate(new Ln(t),e,n)},n.getMainPanel=function(){return this._getRenderer().getMainPanel()},n.getPanels=function(){return this._panels},n.remove=function(){var t=this;if(this.isRemoved())return this;this._fireEvent("removestart"),this._removeDomEvents(),this._clearHandlers(),this.removeBaseLayer();for(var e=this.getLayers(),n=0;n<e.length;n++)e[n].remove();return this._getRenderer()&&this._getRenderer().remove(),this._containerDOM.childNodes&&this._containerDOM.childNodes.length>0&&Array.prototype.slice.call(this._containerDOM.childNodes,0).filter((function(t){return"maptalks-wrapper"===t.className})).forEach((function(e){return t._containerDOM.removeChild(e)})),delete this._panels,delete this._containerDOM,delete this.renderer,this._fireEvent("removeend"),this._clearAllListeners(),this},n.isRemoved=function(){return!this._containerDOM},n.isMoving=function(){return!!this._moving},n.onMoveStart=function(t){var e=this._getPrjCenter();this._originCenter&&!this._verifyExtent(e)||(this._originCenter=e),this._moving=!0,this._trySetCursor("move"),this._fireEvent("movestart",this._parseEvent(t?t.domEvent:null,"movestart"))},n.onMoving=function(t){this._fireEvent("moving",this._parseEvent(t?t.domEvent:null,"moving"))},n.onMoveEnd=function(t){if(this._moving=!1,this._trySetCursor("default"),this._fireEvent("moveend",t&&t.domEvent?this._parseEvent(t.domEvent,"moveend"):t),!this._verifyExtent(this._getPrjCenter())&&this._originCenter){var e=this._originCenter;this._panTo(e)}},n.onDragRotateStart=function(t){this._dragRotating=!0,this._fireEvent("dragrotatestart",this._parseEvent(t?t.domEvent:null,"dragrotatestart"))},n.onDragRotating=function(t){this._fireEvent("dragrotating",this._parseEvent(t?t.domEvent:null,"dragrotating"))},n.onDragRotateEnd=function(t){this._dragRotating=!1,this._fireEvent("dragrotateend",this._parseEvent(t?t.domEvent:null,"dragrotateend"))},n.isDragRotating=function(){return!!this._dragRotating},n.getRenderer=function(){return this._getRenderer()},n.getDevicePixelRatio=function(){return this.options.devicePixelRatio||he.devicePixelRatio||1},n._initContainer=function(t){if(y(t)){if(this._containerDOM=document.getElementById(t),!this._containerDOM)throw new Error("Invalid container when creating map: '"+t+"'")}else this._containerDOM=t,C&&(this.CanvasClass=this._containerDOM.constructor);if(this._containerDOM.childNodes&&this._containerDOM.childNodes.length>0&&"maptalks-wrapper"===this._containerDOM.childNodes[0].className)throw new Error("Container is already loaded with another map instance, use map.remove() to clear it.")},n._trySetCursor=function(t){return this._cursor||this._priorityCursor||(t||(t="default"),this._setCursorToPanel(t)),this},n._setPriorityCursor=function(t){if(t)this._priorityCursor=t,this._setCursorToPanel(t);else{var e=!1;this._priorityCursor&&(e=!0),delete this._priorityCursor,e&&this.setCursor(this._cursor)}return this},n._setCursorToPanel=function(t){var e=this.getMainPanel();e&&e.style&&e.style.cursor!==t&&(e.style.cursor=t)},n._removeLayer=function(t,e){if(t&&e){var n=e.indexOf(t);n>-1&&e.splice(n,1)}},n._sortLayersByZIndex=function(){if(this._layers){for(var t=0,e=this._layers.length;t<e;t++)this._layers[t]._order=t;this._layers.sort((function(t,e){var n=t.getZIndex()-e.getZIndex();return 0===n?t._order-e._order:n}))}},n._fireEvent=function(t,e){this._eventSilence||(this.fire("_"+t,e),this.fire(t,e))},n._Load=function(){this._resetMapStatus(),this.options.pitch&&(this.setPitch(this.options.pitch),delete this.options.pitch),this.options.bearing&&(this.setBearing(this.options.bearing),delete this.options.bearing),this._loadAllLayers(),this._getRenderer().onLoad(),this._loaded=!0,this._callOnLoadHooks(),this._initTime=f()},n._initRenderer=function(){var t=this.options.renderer,n=e.getRendererClass(t);this._renderer=new n(this),this._renderer.load()},n._getRenderer=function(){return this._renderer},n._loadAllLayers=function(){this._baseLayer&&this._baseLayer.load(),this._eachLayer((function(t){t&&t.load()}),this.getLayers())},n._getLayers=function(t){for(var e=this._baseLayer?[this._baseLayer].concat(this._layers):this._layers,n=[],r=0;r<e.length;r++)t&&!t.call(this,e[r])||n.push(e[r]);return n},n._eachLayer=function(t){if(!(arguments.length<2)){var e=Array.prototype.slice.call(arguments,1);e&&!Array.isArray(e)&&(e=[e]);for(var n=[],r=0,i=e.length;r<i;r++)n=n.concat(e[r]);for(var o=0,a=n.length;o<a;o++)t.call(t,n[o])}},n._onLayerEvent=function(t){t&&"idchange"===t.type&&(delete this._layerCache[t.old],this._layerCache[t.new]=t.target)},n._resetMapStatus=function(){var t=this.getMaxZoom(),e=this.getMinZoom(),n=this._spatialReference.getMaxZoom(),r=this._spatialReference.getMinZoom();(p(t)||-1===t||t>n)&&this.setMaxZoom(n),(p(e)||-1===e||e<r)&&this.setMinZoom(r),(t=this.getMaxZoom())<(e=this.getMinZoom())&&this.setMaxZoom(e),(p(this._zoomLevel)||this._zoomLevel>t)&&(this._zoomLevel=t),this._zoomLevel<e&&(this._zoomLevel=e),delete this._prjCenter;var i=this.getProjection();this._prjCenter=i.project(this._center),this._calcMatrices();var o=this._getRenderer();o&&o.resetContainer()},n._getContainerDomSize=function(){if(!this._containerDOM)return null;var t,e,n=this._containerDOM;if(p(n.width)||p(n.height)){if(p(n.clientWidth)||p(n.clientHeight))throw new Error("can not get size of container");t=parseInt(n.clientWidth,0),e=parseInt(n.clientHeight,0)}else{t=n.width,e=n.height;var r=this.getDevicePixelRatio();1!==r&&n.layer&&(t/=r,e/=r)}return new ge(t,e)},n._updateMapSize=function(t){return this.width=t.width,this.height=t.height,this._getRenderer().updateMapSize(t),this._calcMatrices(),this},n._getPrjCenter=function(){return this._prjCenter},n._setPrjCenter=function(t){this._prjCenter=t,this.isInteracting()&&!this.isMoving()&&(this._mapViewCoord=t),this._calcMatrices()},n._setPrjCoordAtContainerPoint=function(t,e){if(e.x===this.width/2&&e.y===this.height/2)return this;var n=this._containerPointToPoint(e)._sub(this._prjToPoint(this._getPrjCenter())),r=this._pointToPrj(this._prjToPoint(t).sub(n));return this._setPrjCenter(r),this},n._verifyExtent=function(t){if(!t)return!1;var e=this._prjMaxExtent;return!e||e.contains(t)},n._offsetCenterByPixel=function(t){var e=new me(this.width/2-t.x,this.height/2-t.y),n=this._containerPointToPrj(e);return this._setPrjCenter(n),n},n.offsetPlatform=function(t){return t?(this._getRenderer().offsetPlatform(t),this._mapViewCoord=this._getPrjCenter(),this._mapViewPoint=this._mapViewPoint.add(t),this):this._mapViewPoint},n.getViewPoint=function(){var t=this._getViewPointFrameOffset(),e=this.offsetPlatform();return t&&(e=e.add(t)),e},n._resetMapViewPoint=function(){this._mapViewPoint=new me(0,0),this._mapViewCoord=this._getPrjCenter()},n._getResolution=function(t){return void 0!==t&&t!==this._zoomLevel||void 0===this._mapRes?t===this.getGLZoom()&&void 0!==this._mapGlRes?this._mapGlRes:(p(t)&&(t=this._zoomLevel),this._spatialReference.getResolution(t)):this._mapRes},n._getResolutions=function(){return this._spatialReference.getResolutions()},n._prjToPoint=function(t,e,n){return e=p(e)?this.getZoom():e,this._spatialReference.getTransformation().transform(t,this._getResolution(e),n)},n._pointToPrj=function(t,e,n){return e=p(e)?this.getZoom():e,this._spatialReference.getTransformation().untransform(t,this._getResolution(e),n)},n._pointToPoint=function(t,e,n){return n?(n.x=t.x,n.y=t.y):n=t.copy(),p(e)?n:n._multi(this._getResolution(e)/this._getResolution())},n._pointToPointAtZoom=function(t,e,n){return n?(n.x=t.x,n.y=t.y):n=t.copy(),p(e)?n:n._multi(this._getResolution()/this._getResolution(e))},n._containerPointToPrj=function(t,e){return this._pointToPrj(this._containerPointToPoint(t,void 0,e),void 0,e)},n._callOnLoadHooks=function(){var t=e.prototype;if(t._onLoadHooks)for(var n=0,r=t._onLoadHooks.length;n<r;n++)t._onLoadHooks[n].call(this)},e}(En(bn(pr(Mn))));ii.include({coordinateToPoint:function(){var t=new Ln(0,0);return function(e,n,r){var i=this.getProjection().project(e,t);return this._prjToPoint(i,n,r)}}(),pointToCoordinate:function(){var t=new Ln(0,0);return function(e,n,r){var i=this._pointToPrj(e,n,t);return this.getProjection().unproject(i,r)}}(),coordinateToViewPoint:function(){var t=new Ln(0,0);return function(e,n,r){return this._prjToViewPoint(this.getProjection().project(e,t),n,r)}}(),viewPointToCoordinate:function(){var t=new Ln(0,0);return function(e,n){return this.getProjection().unproject(this._viewPointToPrj(e,t),n)}}(),coordinateToContainerPoint:function(){var t=new Ln(0,0);return function(e,n,r){var i=this.getProjection().project(e,t);return this._prjToContainerPoint(i,n,r)}}(),containerPointToCoordinate:function(){var t=new Ln(0,0);return function(e,n){var r=this._containerPointToPrj(e,t);return this.getProjection().unproject(r,n)}}(),containerToExtent:function(){var t=new me(0,0),e=new me(0,0);return function(n){var r=new Zn(this._containerPointToPoint(n.getMin(t),void 0,t),this._containerPointToPoint(n.getMax(e),void 0,e));return this._pointToExtent(r)}}(),distanceToPixel:function(){var t=new me(0,0),e=new me(0,0);return function(n,r,i){var o=this.getProjection();if(!o)return null;var a=this.getScale()/this.getScale(i),s=this.getCenter(),c=o.locate(s,n,r),u=this.coordToContainerPoint(s,void 0,t),l=this.coordToContainerPoint(c,void 0,e);return l._sub(u)._multi(a)._abs(),new ge(l.x,l.y)}}(),distanceToPoint:function(){var t=new me(0,0);return function(e,n,r,i){var o=this.getProjection();if(!o)return null;var a=i||this.getCenter(),s=o.locate(a,e,n),c=this.coordToPoint(a,r,t),u=this.coordToPoint(s,r);return u._sub(c)._abs(),u}}(),pixelToDistance:function(){var t=new Ln(0,0),e=new Ln(0,0);return function(n,r){var i=this.getProjection();if(!i)return null;var o=this.getFullExtent(),a=o.top>o.bottom?-1:1,s=t.set(this.width/2+n,this.height/2+a*r),c=this.containerPointToCoord(s,e);return i.measureLength(this.getCenter(),c)}}(),pointToDistance:function(){var t=new me(0,0),e=new Ln(0,0);return function(n,r,i){var o=this.getProjection();if(!o)return null;var a=this._prjToPoint(this._getPrjCenter(),i,t);a._add(n,r);var s=this.pointToCoord(a,i,e);return o.measureLength(this.getCenter(),s)}}(),locateByPoint:function(){var t=new me(0,0);return function(e,n,r){var i=this.coordToContainerPoint(e,void 0,t);return this.containerPointToCoord(i._add(n,r))}}(),_get2DExtent:function(){var t=new me(0,0);return function(e,n){var r,i=this;return void 0!==e&&e!==this._zoomLevel||!this._mapExtent2D?e===this.getGLZoom()&&this._mapGlExtent2D&&(r=this._mapGlExtent2D):r=this._mapExtent2D,r?n?(n.set(r.xmin,r.ymin,r.xmax,r.ymax),n):r.copy():this.getContainerExtent().convertTo((function(n){return i._containerPointToPoint(n,e,t)}),n)}}(),_pointToExtent:function(){var t=new Ln(0,0),e=new Ln(0,0);return function(n){var r=n.getMin(),i=n.getMax(),o=this.getFullExtent(),a=!o||o.left<=o.right?[r.x,i.x]:[i.x,r.x],s=a[0],c=a[1],u=!o||o.top>o.bottom?[i.y,r.y]:[r.y,i.y],l=u[0],h=u[1],f=r.set(s,h),d=i.set(c,l);return new Vn(this.pointToCoord(f,void 0,t),this.pointToCoord(d,void 0,e),this.getProjection())}}(),_getViewPointFrameOffset:function(){var t=new me(0,0);return function(){if(this.isZooming())return null;var e=this._getPrjCenter();return this._mapViewCoord&&!this._mapViewCoord.equals(e)?this._prjToContainerPoint(this._mapViewCoord)._sub(this._prjToContainerPoint(e,void 0,t)):null}}(),_viewPointToPrj:function(){var t=new me(0,0);return function(e,n){return this._containerPointToPrj(this.viewPointToContainerPoint(e,t),n)}}(),_prjToContainerPoint:function(){var t=new me(0,0);return function(e,n,r,i){return this._pointToContainerPoint(this._prjToPoint(e,n,t),n,i||0,r)}}(),_prjToViewPoint:function(){var t=new me(0,0);return function(e,n,r){var i=this._prjToContainerPoint(e,void 0,t,r);return this.containerPointToViewPoint(i,n)}}(),_viewPointToPoint:function(){var t=new me(0,0);return function(e,n,r){return this._containerPointToPoint(this.viewPointToContainerPoint(e,t),n,r)}}(),_pointToViewPoint:function(){var t=new Ln(0,0);return function(e,n,r){return this._prjToViewPoint(this._pointToPrj(e,n,t),r)}}()}),ii.mergeOptions(ri);var oi=function(t){function e(){return t.apply(this,arguments)||this}fe(e,t);var n=e.prototype;return n.addHooks=function(){this.target&&this.target.on("_dblclick",this._onDoubleClick,this)},n.removeHooks=function(){this.target&&this.target.off("_dblclick",this._onDoubleClick,this)},n._onDoubleClick=function(t){var e=this.target;if(e.options.doubleClickZoom){var n=e.getZoom(),r=t.domEvent.shiftKey?Math.ceil(n)-1:Math.floor(n)+1;e._zoomAnimation(r,t.containerPoint)}},e}(wn);ii.mergeOptions({doubleClickZoom:!0}),ii.addOnLoadHook("addHandler","doubleClickZoom",oi);var ai=function(t){function e(){return t.apply(this,arguments)||this}fe(e,t);var n=e.prototype;return n.addHooks=function(){var t=this.target;if(t){var e=t._panels.mapWrapper||t._containerDOM;this._dragHandler=new Pn(e,{cancelOn:this._cancelOn.bind(this),rightclick:!0}),this._dragHandler.on("mousedown",this._onMouseDown,this).on("dragstart",this._onDragStart,this).on("dragging",this._onDragging,this).on("dragend",this._onDragEnd,this).enable()}},n.removeHooks=function(){this._dragHandler.off("mousedown",this._onMouseDown,this).off("dragstart",this._onDragStart,this).off("dragging",this._onDragging,this).off("dragend",this._onDragEnd,this),this._dragHandler.remove(),delete this._dragHandler},n._cancelOn=function(t){return!(!this.target.isZooming()&&!this._ignore(t))},n._ignore=function(t){return!!t&&(t.domEvent&&(t=t.domEvent),this.target._ignoreEvent(t))},n._onMouseDown=function(t){delete this.startDragTime,delete this._mode,2===t.domEvent.button||t.domEvent.ctrlKey?(this.target.options.dragRotate||this.target.options.dragPitch)&&(this._mode="rotatePitch"):this.target.options.dragPan&&(this._mode="move"),this.target._stopAnim(this.target._mapAnimPlayer),Ge(t.domEvent)},n._onDragStart=function(t){this.startDragTime=f(),"move"===this._mode?this._moveStart(t):"rotatePitch"===this._mode&&this._rotateStart(t)},n._onDragging=function(t){this.target._isEventOutMap(t.domEvent)||("move"===this._mode?this._moving(t):"rotatePitch"===this._mode&&this._rotating(t))},n._onDragEnd=function(t){"move"===this._mode?this._moveEnd(t):"rotatePitch"===this._mode&&this._rotateEnd(t),delete this.startDragTime,delete this.startBearing},n._start=function(t){this.preX=t.mousePos.x,this.preY=t.mousePos.y,this.startX=this.preX,this.startY=this.preY},n._moveStart=function(t){this._start(t);var e=this.target;e.onMoveStart(t);var n=Qe(e._getActualEvent(t.domEvent),e.getContainer());this.startPrjCoord=e._containerPointToPrj(n)},n._moving=function(t){if(this.startDragTime){var e=this.target,n=Qe(e._getActualEvent(t.domEvent),e.getContainer());e._setPrjCoordAtContainerPoint(this.startPrjCoord,n),e.onMoving(t)}},n._moveEnd=function(t){if(this.startDragTime){var e=this.target,n=f()-this.startDragTime,r=t.mousePos.x,i=t.mousePos.y,o=r-this.startX,a=i-this.startY;this._clear(),e.options.panAnimation&&!t.interupted&&e._verifyExtent(e._getPrjCenter())&&n<280&&Math.abs(a)+Math.abs(o)>5?(n=5*n*(Math.abs(o)+Math.abs(a))/500,e.panBy(new me(o,a),{duration:n})):e.onMoveEnd(t)}},n._rotateStart=function(t){this._start(t),delete this._rotateMode,this.startBearing=this.target.getBearing(),this.target.onDragRotateStart(t),this._db=0},n._rotating=function(t){var e=this.target,n=t.mousePos.x,r=t.mousePos.y,i=e.getPitch(),o=e.getBearing(),a=Math.abs(n-this.preX),s=Math.abs(r-this.preY);if(this._rotateMode||(e.options.dragRotatePitch?this._rotateMode="rotate_pitch":this._rotateMode=a>s?"rotate":a<s?"pitch":"rotate"),!("pitch"===this._rotateMode&&0===i&&s<10)){if(this._rotateMode.indexOf("rotate")>=0&&e.options.dragRotate){var c;c=e.options.dragPitch||a>s?-.6*(this.preX-n):n>e.width/2?.6*(this.preY-r):-.6*(this.preY-r);var u=e.getBearing()+c;this._db=this._db||0,this._db+=c,e.setBearing(u)}this._rotateMode.indexOf("pitch")>=0&&e.options.dragPitch&&e.setPitch(e.getPitch()+.4*(this.preY-r)),this.preX=n,this.preY=r,e.getBearing()===o&&e.getPitch()===i||e.onDragRotating(t)}},n._rotateEnd=function(t){var e=this.target,n=e.getBearing();this._clear();var r=f()-this.startDragTime;if(e.onDragRotateEnd(t),Math.abs(n-this.startBearing)>20&&("rotate"===this._rotateMode||"rotate_pitch"===this._rotateMode)&&!t.interupted&&r<400){var i=e.getBearing();e._animateTo({bearing:i+this._db/2},{easing:"out",duration:800})}},n._clear=function(){delete this.startPrjCoord,delete this.preX,delete this.preY,delete this.startX,delete this.startY},e}(wn);ii.mergeOptions({draggable:!0,dragPan:!0,dragRotatePitch:!0,dragRotate:!0,dragPitch:!0}),ii.addOnLoadHook("addHandler","draggable",ai);var si="mousedown mouseup mousemove click dblclick contextmenu touchstart touchmove touchend",ci=function(t){function e(){return t.apply(this,arguments)||this}fe(e,t);var n=e.prototype;return n.addHooks=function(){var t=this.target,e=t._panels.allLayers||t._containerDOM;rn(e,si,this._identifyGeometryEvents,this)},n.removeHooks=function(){var t=this.target,e=t._panels.allLayers||t._containerDOM;on(e,si,this._identifyGeometryEvents,this)},n._identifyGeometryEvents=function(t,e){var n=this.target;if(!n.isInteracting()&&!n._ignoreEvent(t)){var r=n._getLayers((function(t){return!(!t.identify||!t.options.geometryEvents)}));if(r.length){var i=null,o=e||t.type;if("mousedown"===o||"touchstart"===o&&1===t.touches.length)this._mouseDownTime=f();else if(("click"===o||"touchend"===o)&&this._mouseDownTime){var a=this._mouseDownTime;if(delete this._mouseDownTime,f()-a>300){if("click"===o)return}else"touchend"===o&&(i="click")}var s=t.touches&&t.touches.length>0?t.touches[0]:t.changedTouches&&t.changedTouches.length>0?t.changedTouches[0]:t;if(s){var c=Qe(s,n._containerDOM),u=n.containerPointToCoordinate(c);"touchstart"===o&&Ge(t);var l=null,h={includeInternals:!0,filter:function(e){if(!(e instanceof $r))return!1;var n=e._getEventTypeToFire(t);if("mousemove"===o){if(!l&&e.options.cursor&&(l=e.options.cursor),!e.listens("mousemove")&&!e.listens("mouseover")&&!e.listens("mouseenter"))return!1}else if(!e.listens(n)&&!e.listens(i))return!1;return!0},count:1,coordinate:u,onlyVisible:n.options.onlyVisibleGeometryEvents,layers:r},d=function(e){var r=!0;if("mousemove"===o){var a={};if(e.length>0)for(var s=e.length-1;s>=0;s--){var c=e[s];if(c instanceof $r){var u=c._getInternalId();a[u]=c,c._onEvent(t),this._prevOverGeos&&this._prevOverGeos.geomap[u]||c._onEvent(t,"mouseenter"),r=c._onEvent(t,"mouseover")}}n._setPriorityCursor(l);var h=this._prevOverGeos&&this._prevOverGeos.geos;if(this._prevOverGeos={geos:e,geomap:a},h&&h.length>0)for(var f=h.length-1;f>=0;f--){var d=h[f];if(d instanceof $r){var p=h[f]._getInternalId();a[p]||(r=d._onEvent(t,"mouseout"))}}}else{if(!e||!e.length)return;for(var m=e.length-1;m>=0;m--)if(e[m]instanceof $r){r=e[m]._onEvent(t),i&&e[m]._onEvent(t,i);break}}!1===r&&He(t)}.bind(this);"mousemove"===o||"touchmove"===o?this._queryIdentifyTimeout=n.getRenderer().callInNextFrame((function(){n.isInteracting()||n.identify(h,d)})):n.identify(h,d)}}}},e}(wn);ii.mergeOptions({geometryEvents:!0,onlyVisibleGeometryEvents:!0}),ii.addOnLoadHook("addHandler","geometryEvents",ci);var ui=4.000244140625,li=function(t){function e(e){var n;return(n=t.call(this,e)||this)._thisScrollZoom=n._scrollZoom.bind(de(de(n))),n._wheelZoomRate=1/450,n._defaultZoomRate=.01,n._delta=0,n}fe(e,t);var n=e.prototype;return n.addHooks=function(){Ue(this.target._containerDOM,"wheel",this._onWheelScroll,this)},n.removeHooks=function(){Ne(this.target._containerDOM,"wheel",this._onWheelScroll)},n._onWheelScroll=function(t){Ge(t),He(t);var e=this.target;if(e._ignoreEvent(t)||!e.options.zoomable)return!1;var n=e._containerDOM,r=e._checkZoomOrigin(Qe(t,n));return e.options.seamlessZoom?(this._zooming||(this._trackPadSuspect=0,this._ensureTrackpad=!1),this._seamless(t,r)):this._interval(t,r)},n._seamless=function(t,e){var n=t.deltaMode===window.WheelEvent.DOM_DELTA_LINE?60*t.deltaY:t.deltaY;if(n%ui!=0&&(this._ensureTrackpad||(Math.abs(n)<60?this._trackPadSuspect++:this._trackPadSuspect=0,this._trackPadSuspect>=2&&(this._ensureTrackpad=!0)),this._ensureTrackpad&&(n*=14)),t.shiftKey&&n&&(n/=4),this._lastWheelEvent=t,this._delta-=n,!this._zooming&&this._delta){var r=this.target;this._zoomOrigin=e,r.onZoomStart(null,e)}this._start()},n._start=function(){if(this._delta){this._zooming=!0;var t=this.target;this._active||(t.getRenderer().callInNextFrame(this._thisScrollZoom),this._active=!0)}},n._scrollZoom=function(){var t=this;if(this._active=!1,this._delta){var e=Math.abs(this._delta)>ui?this._wheelZoomRate:this._defaultZoomRate,n=2/(1+Math.exp(-Math.abs(this._delta*e)));this._delta<0&&0!==n&&(n=1/n);var r=this.target,i=r.getZoom(),o=r.getZoomForScale(n,i,!0);this._delta=0,r.onZooming(o,this._zoomOrigin),this._timeout&&clearTimeout(this._timeout),this._timeout=setTimeout((function(){t._zooming=!1,delete t._timeout,r.onZoomEnd(r.getZoom(),t._zoomOrigin)}),210)}},n._interval=function(t,e){var n=this,r=this.target;if(this._zooming)return this._requesting++,!1;this._requesting=0;var i=(t.deltaY?-1*t.deltaY:t.wheelDelta?t.wheelDelta:t.detail)>0?1:-1;t.detail&&(i*=-1);var o=r.getZoom(),a=o+i;return(a=r._checkZoom(i>0?Math.ceil(a):Math.floor(a)))===o||(this._zooming=!0,this._delta||(r.onZoomStart(null,e),this._origin=e,this._delta=i,this._startZoom=r.getZoom()),r._animateTo({zoom:a-1*this._delta/2,around:this._origin},{continueOnViewChanged:!0,easing:"linear",duration:90,wheelZoom:!0},(function(e){"finished"===e.state.playState?n._requesting<1||Math.abs(a-n._startZoom)>2||a===r.getMaxZoom()||a===r.getMinZoom()?(r._animateTo({zoom:a,around:n._origin},{continueOnViewChanged:!0,duration:100},(function(t){"running"!==t.state.playState&&(delete n._zooming,delete n._requesting)})),delete n._startZoom,delete n._origin,delete n._delta,n._requesting=0):p(n._requesting)||(delete n._zooming,n._onWheelScroll(t)):"running"!==e.state.playState&&(delete n._zooming,delete n._requesting)}))),!1},e}(wn);ii.mergeOptions({scrollWheelZoom:!0,seamlessZoom:!1}),ii.addOnLoadHook("addHandler","scrollWheelZoom",li);var hi=function(t){function e(){return t.apply(this,arguments)||this}fe(e,t);var n=e.prototype;return n.addHooks=function(){Ue(this.target.getContainer(),"touchstart",this._onTouchStart,this)},n.removeHooks=function(){Ne(this.target.getContainer(),"touchstart",this._onTouchStart)},n._onTouchStart=function(t){var e=this.target;if(t.touches&&!(t.touches.length<2)){var n=e.getContainer(),r=Qe(t.touches[0],n),i=Qe(t.touches[1],n);this.preY=r.y,this._startP1=r,this._startP2=i,this._startDist=r.distanceTo(i),this._startVector=r.sub(i),this._startZoom=e.getZoom(),this._startBearing=e.getBearing(),on(document,"touchmove",this._onTouchMove,this),on(document,"touchend",this._onTouchEnd,this),Ue(document,"touchmove",this._onTouchMove,this),Ue(document,"touchend",this._onTouchEnd,this),Ge(t),e._fireEvent("touchactstart")}},n._onTouchMove=function(t){var e=this.target;if(t.touches&&!(t.touches.length<2)){var n=e.getContainer(),r=Qe(t.touches[0],n),i=Qe(t.touches[1],n),o=r.sub(this._startP1),a=i.sub(this._startP2),s=r.sub(i),c=r.distanceTo(i)/this._startDist,u=180*s.angleWith(this._startVector)/Math.PI,l=.4*((this.preY||r.y)-r.y);this.preY=r.y;var h={domEvent:t,mousePos:[r,i]};if(this.mode||(e.options.touchRotate&&Math.abs(u)>8?this.mode=e.options.touchZoomRotate?"rotate_zoom":"rotate":e.options.touchPitch&&o.y*a.y>0&&Math.abs(o.y)>10&&Math.abs(a.y)>10?this.mode="pitch":e.options.zoomable&&e.options.touchZoom&&Math.abs(1-c)>.15&&(this.mode=e.options.touchZoomRotate&&e.options.touchRotate?"rotate_zoom":"zoom"),this._startTouching(h)),"zoom"===this.mode||"rotate_zoom"===this.mode){this._scale=c;var f=e._getResolution(this._startZoom)/c,d=e.getZoomFromRes(f);e.onZooming(d,this._Origin)}"rotate"===this.mode||"rotate_zoom"===this.mode?(e.setBearing(this._startBearing+u),e.onDragRotating(h)):"pitch"===this.mode&&(e.setPitch(e.getPitch()+l),e.onDragRotating(h)),e._fireEvent("touchactinging")}},n._startTouching=function(t){var e=this.target;if("zoom"===this.mode||"rotate_zoom"===this.mode){var n=e.getSize();this._Origin=new me(n.width/2,n.height/2),e.onZoomStart(null,this._Origin)}"rotate"!==this.mode&&"pitch"!==this.mode&&"rotate_zoom"!==this.mode||e.onDragRotateStart(t)},n._onTouchEnd=function(t){delete this.preY;var e=this.target;if(on(document,"touchmove",this._onTouchMove,this),on(document,"touchend",this._onTouchEnd,this),"zoom"===this.mode||"rotate_zoom"===this.mode){var n=this._scale,r=e._getResolution(this._startZoom)/n,i=e.getZoomFromRes(r);e.onZoomEnd(i,this._Origin)}"pitch"!==this.mode&&"rotate"!==this.mode&&"rotate_zoom"!==this.mode||e.onDragRotateEnd({domEvent:t}),delete this.mode,e._fireEvent("touchactend")},e}(wn);ii.mergeOptions({touchGesture:!0,touchZoom:!0,touchPitch:!0,touchRotate:!0,touchZoomRotate:!1}),ii.addOnLoadHook("addHandler","touchGesture",hi);var fi="__anim_player",di={in:function(t){return Math.pow(t,2)},out:function(t){return 1-di.in(1-t)},inAndOut:function(t){return 3*t*t-2*t*t*t},linear:function(t){return t},upAndDown:function(t){return t<.5?di.inAndOut(2*t):1-di.inAndOut(2*(t-.5))}},pi=function(t,e){this.state=t,this.styles=e},mi=function(t,e,n,r){this._animation=t,this.options=e,this._onFrame=n,this.playState="idle",this.ready=!0,this.finished=!1,this.target=r},gi={speed:{slow:2e3,normal:1e3,fast:500},_resolveStyles:function(t){if(!t)return null;function e(t){if(!Array.isArray(t))return gi._resolveStyles(t);for(var e=[],n=[],r=[],i=0;i<t.length;i++){var o=gi._resolveStyles(t[i]);o&&(e.push(o[0]),n.push(o[1]),r.push(o[2]))}return e.length?[e,n,r]:null}function n(t){var e,n=t;Array.isArray(t)||(n=m(t)?[0,t]:t instanceof me||t instanceof Ln?[new(e=t.constructor)(0,0),t]:[t,t]);var r=n[0],i=n[1];return m(r)&&m(i)?r===i?null:[r,i-r,i]:Array.isArray(r)&&m(r[0])||r instanceof Ln||r instanceof me?(Array.isArray(r)?(r=new Ln(r),i=new Ln(i)):(r=new(e=r.constructor)(r),i=new e(i)),r.equals(i)?null:[r,i.sub(r),i]):[r,i,i]}function r(t){return!Array.isArray(t)&&t.constructor===Object||!(!Array.isArray(t)||t[0].constructor!==Object)}var i={},o={},a={};for(var s in t)if(t.hasOwnProperty(s)){var c,u=t[s];if(!u)continue;if(Array.isArray(u)&&(p(u[0])||p(u[1])))continue;(c=r(u)?e(u):n(u))&&(o[s]=c[0],i[s]=c[1],a[s]=c[2])}return[o,i,a]},framing:function(t,e){e||(e={});var n,r,i,o=e.easing?di[e.easing]:di.linear;return o||(o=di.linear),(t=gi._resolveStyles(t))&&(r=t[0],n=t[1],i=t[2]),function(t,e){var a,s;if(t<0)a={playState:"idle",delta:0},s=r;else if(t<e){var c=o(t/e);a={playState:"running",delta:c},s=function t(e,n,r){if(!n||!r)return null;var o={};for(var a in r)if(r.hasOwnProperty(a)){if(n[a]===i[a]){o[a]=n[a];continue}var s=n[a],c=r[a];if(m(c))o[a]=s+e*c;else if(Array.isArray(c)){for(var u=[],l=0;l<c.length;l++)u.push(t(e,s[l],c[l]));o[a]=u}else{var h=c.constructor;o[a]=h===Object?t(e,s,c):s instanceof me||s instanceof Ln?s.add(c.multi(e)):c}}return o}(c,r,n)}else a={playState:"finished",delta:1},s=i;return a.startStyles=r,a.destStyles=i,a.progress=t,a.remainingMs=e-t,new pi(a,s)}},_requestAnimFrame:function(t){this._frameQueue||(this._frameQueue=[]),this._frameQueue.push(t),this._a()},_a:function(){this._animationFrameId||(this._animationFrameId=A(gi._frameFn))},_run:function(){if(this._frameQueue.length){var t=this._frameQueue;this._frameQueue=[];for(var e=0,n=t.length;e<n;e++)t[e]();this._frameQueue.length?this._animationFrameId=A(gi._frameFn):delete this._animationFrameId}},animate:function(t,e,n,r){e||(e={});var i=gi.framing(t,e);return new mi(i,e,n,r)}};gi._frameFn=gi._run.bind(gi),d(mi.prototype,{_prepare:function(){var t=this.options,e=t.speed||t.duration;y(e)&&((e=gi.speed[e])||(e=+e)),e||(e=gi.speed.normal),this.duration=e,this._framer=t.framer||gi._requestAnimFrame.bind(gi)},play:function(){if("idle"!==this.playState&&"paused"!==this.playState||this.target&&this.target[fi])return this;this.target&&(this.target[fi]=1),"idle"===this.playState&&(this.currentTime=0,this._prepare());var t=f();if(!this.startTime){var e=this.options;this.startTime=e.startTime?e.startTime:t}return this._playStartTime=Math.max(t,this.startTime),"paused"===this.playState&&(this._playStartTime-=this.currentTime),this.playState="running",this._run(),this},pause:function(){return"paused"===this.playState||(this.playState="paused",this._run()),this},cancel:function(){return"idle"===this.playState||(this.playState="idle",this.finished=!1,this._run()),this},finish:function(){return"finished"===this.playState||(this.playState="finished",this.finished=!0,this._run()),this},reverse:function(){},_run:function(){var t=this,e=this._onFrame,n=f(),r=n-this._playStartTime;if(this.options.repeat&&r>=this.duration&&(this._playStartTime=n,r=0),"running"===this.playState){var i=this._animation(r,this.duration);this.playState=i.state.playState,"running"!==this.playState&&this.target&&delete this.target[fi],"idle"===this.playState?this.startTime>n&&setTimeout(this._run.bind(this),this.startTime-n):"running"===this.playState?this._framer((function(){"running"===t.playState&&(t.currentTime=r,e&&e(i),t._run())})):"finished"===this.playState&&(this.finished=!0,e&&e(i))}else if(this.target&&delete this.target[fi],e){"finished"===this.playState?r=this.duration:"idle"===this.playState&&(r=0);var o=this._animation(r,this.duration);o.state.playState=this.playState,e(o)}}});var vi=Object.freeze({Animation:gi,Easing:di,Player:mi,Frame:pi}),yi=vn((function(t){!function(){function e(t,e){var n=t.x-e.x,r=t.y-e.y;return n*n+r*r}function n(t,e,n){var r=e.x,i=e.y,o=n.x-r,a=n.y-i;if(0!==o||0!==a){var s=((t.x-r)*o+(t.y-i)*a)/(o*o+a*a);s>1?(r=n.x,i=n.y):s>0&&(r+=o*s,i+=a*s)}return(o=t.x-r)*o+(a=t.y-i)*a}function r(t,n){for(var r,i=t[0],o=[i],a=1,s=t.length;a<s;a++)e(r=t[a],i)>n&&(o.push(r),i=r);return i!==r&&o.push(r),o}function i(t,e,r,o,a){for(var s,c=o,u=e+1;u<r;u++){var l=n(t[u],t[e],t[r]);l>c&&(s=u,c=l)}c>o&&(s-e>1&&i(t,e,s,o,a),a.push(t[s]),r-s>1&&i(t,s,r,o,a))}function o(t,e){var n=t.length-1,r=[t[0]];return i(t,0,n,e,r),r.push(t[n]),r}function a(t,e,n){if(t.length<=2)return t;var i=void 0!==e?e*e:1;return t=o(t=n?t:r(t,i),i)}t.exports=a,t.exports.default=a}()})),_i=function(t){function e(){return t.apply(this,arguments)||this}fe(e,t);var n=e.prototype;return n.getOutline=function(){if(!this._getPainter())return null;var t=this.getExtent();return new xi(t.toArray(),{symbol:{lineWidth:1,lineColor:"6b707b"}})},n.animateShow=function(t,e){var n=this;void 0===t&&(t={}),this._showPlayer&&this._showPlayer.finish(),_(t)&&(e=t={});var r=this.getCoordinates();if(0===r.length)return this;this._animIdx=0,this._animLenSoFar=0,this.show();var i=this.getShell?this.getShell().concat(this.getShell()[0]):this.getCoordinates(),o=this._getProjection(),a=o.projectCoords(i);this._prjAniShowCenter=this._getPrjExtent().getCenter(),this._aniShowCenter=o.unproject(this._prjAniShowCenter);var s=t.duration||1e3,c=t.easing||"out";this.setCoordinates([]);for(var u=0,l=1;l<a.length;l++)u+=a[l].distanceTo(a[l-1]);var h=this._showPlayer=gi.animate({t:s},{duration:s,easing:c},(function(t){if(n.getMap()){var o=n._drawAnimShowFrame(t.styles.t,s,u,i,a);"finished"===t.state.playState&&(delete n._showPlayer,delete n._aniShowCenter,delete n._prjAniShowCenter,delete n._animIdx,delete n._animLenSoFar,delete n._animTailRatio,n.setCoordinates(r)),e&&e(t,o)}else if("finished"!==h.playState&&(h.finish(),e)){var c=n.getCoordinates();e(t,c[c.length-1])}}),this);return h.play(),h},n._drawAnimShowFrame=function(t,e,n,r,i){if(0===t)return r[0];var o,a,s=this._getProjection(),c=t/e*n,u=0;for(o=this._animIdx,a=i.length;o<a-1&&(u=i[o].distanceTo(i[o+1]),!(this._animLenSoFar+u>c));o++)this._animLenSoFar+=u;if(this._animIdx=o,this._animIdx>=a-1)return this.setCoordinates(r),r[r.length-1];var l=this._animIdx,h=i[l],f=i[l+1],d=(c-this._animLenSoFar)/u;this._animTailRatio=d;var p=h.x+(f.x-h.x)*d,m=h.y+(f.y-h.y)*d,g=new Ln(p,m),v=s.unproject(g),y=!!this.getShell;if(!y&&this.options.smoothness>0){var _=r.slice(0,this._animIdx+3);this.setCoordinates(_);var b=i.slice(0,this._animIdx+3);this._setPrjCoordinates(b)}else{var x=r.slice(0,this._animIdx+1);x.push(v);var w=i.slice(0,this._animIdx+1);w.push(g),y?(this.setCoordinates([this._aniShowCenter].concat(x)),this._setPrjCoordinates([this._prjAniShowCenter].concat(w))):(this.setCoordinates(x),this._setPrjCoordinates(w))}return v},n._getCenterInExtent=function(t,e,n){var r=this.getExtent();if(!t.intersects(r))return null;var i=n(e,t);if(0===i.length)return null;var o=0,a=0,s=0;i.forEach((function(t){Array.isArray(t)?t.forEach((function(t){t.point&&(t=t.point),o+=t.x,a+=t.y,s++})):(t.point&&(t=t.point),o+=t.x,a+=t.y,s++)}));var c=new Ln(o,a)._multi(1/s);return c.count=s,c},n._getPath2DPoints=function(t,e,n){if(!H(t))return[];var r=this.getMap(),i=!e&&this._shouldSimplify(),o=this.options.simplifyTolerance*r._getResolution(),a=Array.isArray(t[0]);if(delete this._simplified,i&&!a){var s=t.length;t=yi(t,o,!1),this._simplified=t.length<s}return p(n)&&(n=r.getZoom()),D(t,(function(t){return r._prjToPoint(t,n)}))},n._shouldSimplify=function(){var t=this.getLayer(),e=this.getProperties(),n=e&&t.options.enableAltitude&&!p(e[t.options.altitudeProperty]);return t&&t.options.enableSimplify&&!n&&this.options.enableSimplify&&!this._showPlayer},n._setPrjCoordinates=function(t){this._prjCoords=t,this.onShapeChanged()},n._getPrjCoordinates=function(){return this._verifyProjection(),!this._prjCoords&&this._getProjection()&&(this._prjCoords=this._projectCoords(this._coordinates)),this._prjCoords},n._updateCache=function(){this._clearCache(),this._getProjection()&&this._prjCoords&&(this._coordinates=this._unprojectCoords(this._getPrjCoordinates()))},n._clearProjection=function(){this._prjCoords=null,t.prototype._clearProjection.call(this)},n._projectCoords=function(t){var e=this._getProjection();return e?e.projectCoords(t):[]},n._unprojectCoords=function(t){var e=this._getProjection();return e?e.unprojectCoords(t):[]},n._computeCenter=function(){var t=this._coordinates;if(!H(t))return null;for(var e=0,n=0,r=0,i=t.length,o=0;o<i;o++)t[o]&&m(t[o].x)&&m(t[o].y)&&(e+=t[o].x,n+=t[o].y,r++);return new Ln(e/r,n/r)},n._computeExtent=function(){var t=this._coordinates;if(!H(t))return null;var e=[t];return this.hasHoles&&this.hasHoles()&&e.push.apply(e,this.getHoles()),this._coords2Extent(e,this._getProjection())},n._computePrjExtent=function(){var t=[this._getPrjCoordinates()];return this.hasHoles&&this.hasHoles()&&t.push.apply(t,this._getPrjHoles()),this._coords2Extent(t)},n._get2DLength=function(){for(var t=this._getPath2DPoints(this._getPrjCoordinates(),!0),e=0,n=1,r=t.length;n<r;n++)e+=t[n].distanceTo(t[n-1]);return e},n._hitTestTolerance=function(){var t,e=this._getInternalSymbol();if(Array.isArray(e)){t=0;for(var n=0;n<e.length;n++)m(e[n].lineWidth)&&e[n].lineWidth>t&&(t=e[n].lineWidth)}else t=e.lineWidth;return m(t)?t/2:1.5},n._coords2Extent=function(t,e){for(var n=new Vn(e),r=0,i=t.length;r<i;r++)for(var o=0,a=t[r].length;o<a;o++)n._combine(t[r][o]);return n},e}($r);_i.mergeOptions({smoothness:0,enableClip:!0,enableSimplify:!0,simplifyTolerance:2,symbol:{lineColor:"#000",lineWidth:2,lineOpacity:1,polygonFill:"#fff",polygonOpacity:1,opacity:1}});var bi="Polygon",xi=function(t){function e(e,n){var r;return(r=t.call(this,n)||this).type="Polygon",e&&r.setCoordinates(e),r}fe(e,t);var n=e.prototype;return n.setCoordinates=function(t){if(!t)return this._coordinates=null,this._holes=null,this._projectRings(),this;var e=Ln.toCoordinates(t),n=e.length;if(Array.isArray(e[0])){if(this._coordinates=this._trimRing(e[0]),n>1){for(var r=[],i=1;i<n;i++)e[i]&&r.push(this._trimRing(e[i]));this._holes=r}}else this._coordinates=this._trimRing(e);return this._projectRings(),this},n.getCoordinates=function(){if(!this._coordinates)return[];for(var t=this.getHoles(),e=[this._copyAndCloseRing(this._coordinates)],n=0,r=t.length;n<r;n++)e.push(this._copyAndCloseRing(t[n]));return e},n.getCenterInExtent=function(t){return this._getCenterInExtent(t,this.getShell(),_r)},n.getShell=function(){return this._coordinates||[]},n.getHoles=function(){return this._holes||[]},n.hasHoles=function(){return this.getHoles().length>0},n._projectRings=function(){this.getMap()?(this._prjCoords=this._projectCoords(this._coordinates),this._prjHoles=this._projectCoords(this._holes),this.onShapeChanged()):this.onShapeChanged()},n._setPrjCoordinates=function(t){this._prjCoords=t,this.onShapeChanged()},n._cleanRing=function(t){for(var e=t.length-1;e>=0;e--)t[e]||t.splice(e,1)},n._checkRing=function(t){if(this._cleanRing(t),!t||!H(t))return!1;var e=t[t.length-1],n=!0;return t[0].x===e.x&&t[0].y===e.y||(n=!1),n},n._trimRing=function(t){var e=this._checkRing(t);return H(t)&&e&&t.splice(t.length-1,1),t},n._copyAndCloseRing=function(t){t=t.slice(0);var e=this._checkRing(t);return H(t)&&!e?(t.push(t[0].copy()),t):t},n._getPrjShell=function(){return this.getJSONType()===bi?this._getPrjCoordinates():(this._verifyProjection(),this._getProjection()&&!this._prjShell&&(this._prjShell=this._projectCoords(this.getShell())),this._prjShell)},n._getPrjHoles=function(){var t=this._getProjection();return this._verifyProjection(),t&&!this._prjHoles&&(this._prjHoles=this._projectCoords(this.getHoles())),this._prjHoles},n._computeGeodesicLength=function(t){var e=this.getCoordinates();if(!H(e))return 0;for(var n=0,r=0,i=e.length;r<i;r++)n+=t.measureLength(e[r]);return n},n._computeGeodesicArea=function(t){var e=this.getCoordinates();if(!H(e))return 0;for(var n=t.measureArea(e[0]),r=1,i=e.length;r<i;r++)n-=t.measureArea(e[r]);return n},n._updateCache=function(){t.prototype._updateCache.call(this),this._prjHoles&&(this._holes=this._unprojectCoords(this._getPrjHoles()))},n._clearCache=function(){return delete this._prjShell,t.prototype._clearCache.call(this)},n._clearProjection=function(){this._prjHoles&&(this._prjHoles=null),this._prjShell&&(this._prjShell=null),t.prototype._clearProjection.call(this)},e}(_i);function wi(t){return function(t){function e(){return t.apply(this,arguments)||this}fe(e,t);var n=e.prototype;return n.getCoordinates=function(){return this._coordinates},n.setCoordinates=function(t){var e=t instanceof Ln?t:new Ln(t);if(e.equals(this._coordinates))return this;if(this._coordinates=e,!this.getMap())return this.onPositionChanged(),this;var n=this._getProjection();return this._setPrjCoordinates(n.project(this._coordinates)),this},n._getCenter2DPoint=function(t){var e=this.getMap();if(!e)return null;var n=p(t)?e.getZoom():e.getGLZoom(),r=this._getPrjCoordinates();return r?e._prjToPoint(r,n):null},n._getPrjCoordinates=function(){var t=this._getProjection();return this._verifyProjection(),!this._pcenter&&t&&this._coordinates&&(this._pcenter=t.project(this._coordinates)),this._pcenter},n._setPrjCoordinates=function(t){this._pcenter=t,this.onPositionChanged()},n._updateCache=function(){this._clearCache();var t=this._getProjection();this._pcenter&&t&&(this._coordinates=t.unproject(this._pcenter))},n._clearProjection=function(){this._pcenter=null,t.prototype._clearProjection.call(this)},n._computeCenter=function(){return this._coordinates?this._coordinates.copy():null},e}(t)}xi.registerJSONType(bi);var Mi=function(t){function e(e,n){var r;return(r=t.call(this,n)||this).type="Point",e&&r.setCoordinates(e),r}fe(e,t);var n=e.prototype;return n.getOutline=function(){var t=this._getPainter();if(!t)return null;var n=this.getCoordinates(),r=t.getContainerExtent(),i=this.getMap().coordToContainerPoint(n);return new e(n,{symbol:{markerType:"square",markerWidth:r.getWidth(),markerHeight:r.getHeight(),markerLineWidth:1,markerLineColor:"6b707b",markerFill:"rgba(0, 0, 0, 0)",markerDx:r.xmin-(i.x-r.getWidth()/2),markerDy:r.ymin-(i.y-r.getHeight()/2)}})},n._isVectorMarker=function(){var t=this._getInternalSymbol();return!Array.isArray(t)&&Tr.test(t)},n._canEdit=function(){var t=this._getInternalSymbol();return!Array.isArray(t)&&(Tr.test(t)||Fr.test(t)||Pr.test(t))},n._containsPoint=function(e,n){var r=this.getContainerExtent();return n&&(r=r.expand(n)),!!r.contains(e)&&(!this.options.hitTestForEvent||t.prototype._containsPoint.call(this,e,n))},n._computeExtent=function(){return Si.call(this,"getCenter")},n._computePrjExtent=function(){return Si.call(this,"_getPrjCoordinates")},n._computeGeodesicLength=function(){return 0},n._computeGeodesicArea=function(){return 0},n._getSprite=function(t,e){return this._getPainter()?this._getPainter().getSprite(t,e):new Xr(this).getSprite(t,e)},e}(wi($r));function Si(t){var e=this[t]();return e?new Vn(e,e,this._getProjection()):null}Mi.mergeOptions({symbol:{markerType:"path",markerPath:[{path:"M8 23l0 0 0 0 0 0 0 0 0 0c-4,-5 -8,-10 -8,-14 0,-5 4,-9 8,-9l0 0 0 0c4,0 8,4 8,9 0,4 -4,9 -8,14z M3,9 a5,5 0,1,0,0,-0.9Z",fill:"#DE3333"}],markerPathWidth:16,markerPathHeight:23,markerWidth:24,markerHeight:34},hitTestForEvent:!1}),Mi.registerJSONType("Marker");var Ai=function(t){function e(e,n){var r;return(r=t.call(this,n)||this).type="LineString",e&&r.setCoordinates(e),r}fe(e,t);var n=e.prototype;return n.setCoordinates=function(t){return t?(this._coordinates=Ln.toCoordinates(t),this.getMap()?this._setPrjCoordinates(this._projectCoords(this._coordinates)):this.onShapeChanged(),this):(this._coordinates=null,this._setPrjCoordinates(null),this)},n.getCoordinates=function(){return this._coordinates||[]},n.getCenterInExtent=function(t){return this._getCenterInExtent(t,this.getCoordinates(),vr)},n._computeGeodesicLength=function(t){return t.measureLength(this.getCoordinates())},n._computeGeodesicArea=function(){return 0},e}(_i);Ai.mergeOptions({arrowStyle:null,arrowPlacement:"vertex-last"}),Ai.registerJSONType("LineString");var Ei=function(t){function e(e,n){var r;return(r=t.call(this,n)||this).type="GeometryCollection",r.setGeometries(e),r}fe(e,t);var n=e.prototype;return n.setGeometries=function(t){for(var e=this._checkGeometries(t||[]),n=this._getSymbol(),r=this.config(),i=e.length-1;i>=0;i--)e[i]._initOptions(r),e[i]._setParent(this),e[i]._setEventParent(this),n&&e[i].setSymbol(n);return this._geometries=e,this.getLayer()&&(this._bindGeometriesToLayer(),this.onShapeChanged()),this},n.getGeometries=function(){return this._geometries||[]},n.forEach=function(t,e){for(var n=this.getGeometries(),r=0,i=n.length;r<i;r++)n[r]&&(e?t.call(e,n[r],r):t(n[r],r));return this},n.filter=function(t,n){if(!t)return new e;var r=[],i=_(t),o=i?t:rt(t);return this.forEach((function(t){var e=i?t:ft(t);(n?o.call(n,e):o(e))&&r.push(t)}),this),new e(r)},n.translate=function(t){if(!t)return this;if(this.isEmpty())return this;var e=arguments;return this.forEach((function(t){t&&t.translate&&t.translate.apply(t,e)})),this},n.isEmpty=function(){return!H(this.getGeometries())},n.remove=function(){return this.forEach((function(t){t._unbind()})),$r.prototype.remove.apply(this,arguments)},n.show=function(){return this.options.visible=!0,this.forEach((function(t){t.show()})),this},n.hide=function(){return this.options.visible=!1,this.forEach((function(t){t.hide()})),this},n.onConfig=function(t){this.forEach((function(e){e.config(t)}))},n.getSymbol=function(){var e=t.prototype.getSymbol.call(this);if(!e){var n=[],r=!1;this.forEach((function(t){t.getSymbol()&&!r&&(r=!0),n.push(t.getSymbol())})),r&&(e={children:n})}return e},n.setSymbol=function(t){if(t&&t.children)this._symbol=null,this.forEach((function(e,n){e.setSymbol(t.children[n])}));else{var e=this._prepareSymbol(t);this._symbol=e,this.forEach((function(t){t.setSymbol(e)}))}return this.onSymbolChanged(),this},n._setExternSymbol=function(t){return t=this._prepareSymbol(t),this._externSymbol=t,this.forEach((function(e){e._setExternSymbol(t)})),this.onSymbolChanged(),this},n._bindLayer=function(){t.prototype._bindLayer.apply(this,arguments),this._bindGeometriesToLayer()},n._bindGeometriesToLayer=function(){var t=this.getLayer();this.forEach((function(e){e._bindLayer(t)}))},n._checkGeometries=function(t){var e="The geometry added to collection is invalid.";if(t&&!Array.isArray(t)){if(t instanceof $r)return[t];throw new Error(e)}for(var n=0,r=t.length;n<r;n++)if(!this._checkGeo(t[n]))throw new Error(e+" Index: "+n);return t},n._checkGeo=function(t){return t instanceof $r},n._updateCache=function(){this._clearCache(),this.isEmpty()||this.forEach((function(t){t&&t._updateCache&&t._updateCache()}))},n._removePainter=function(){this._painter&&this._painter.remove(),delete this._painter,this.forEach((function(t){t._removePainter()}))},n._computeCenter=function(t){if(!t||this.isEmpty())return null;for(var e=0,n=0,r=0,i=this.getGeometries(),o=0,a=i.length;o<a;o++)if(i[o]){var s=i[o]._computeCenter(t);s&&(e+=s.x,n+=s.y,r++)}return 0===r?null:new Ln(e/r,n/r)},n._containsPoint=function(t,e){if(this.isEmpty())return!1;for(var n=this.getGeometries(),r=0,i=n.length;r<i;r++)if(n[r]._containsPoint(t,e))return!0;return!1},n._computeExtent=function(t){return Ci.call(this,t,"_computeExtent")},n._computePrjExtent=function(t){return Ci.call(this,t,"_computePrjExtent")},n._computeGeodesicLength=function(t){if(!t||this.isEmpty())return 0;for(var e=this.getGeometries(),n=0,r=0,i=e.length;r<i;r++)e[r]&&(n+=e[r]._computeGeodesicLength(t));return n},n._computeGeodesicArea=function(t){if(!t||this.isEmpty())return 0;for(var e=this.getGeometries(),n=0,r=0,i=e.length;r<i;r++)e[r]&&(n+=e[r]._computeGeodesicArea(t));return n},n._exportGeoJSONGeometry=function(){var t=[];if(!this.isEmpty())for(var e=this.getGeometries(),n=0,r=e.length;n<r;n++)e[n]&&t.push(e[n]._exportGeoJSONGeometry());return{type:"GeometryCollection",geometries:t}},n._clearProjection=function(){if(!this.isEmpty())for(var t=this.getGeometries(),e=0,n=t.length;e<n;e++)t[e]&&t[e]._clearProjection()},n._getConnectPoints=function(){var t=this.getExtent();return[new Ln(t.xmin,t.ymax),new Ln(t.xmax,t.ymin),new Ln(t.xmin,t.ymin),new Ln(t.xmax,t.ymax)]},n._getExternalResources=function(){if(this.isEmpty())return[];for(var t,e,n=this.getGeometries(),r=[],i={},o=0,a=n.length;o<a;o++)if(n[o])for(var s=0,c=(t=It(n[o]._getInternalSymbol())).length;s<c;s++)i[e=t[s].join()]||(r.push(t[s]),i[e]=1);return r},n.startEdit=function(t){var e=this;if(this.isEmpty())return this;t||(t={}),t.symbol&&(this._originalSymbol=this.getSymbol(),this.setSymbol(t.symbol)),this._draggbleBeforeEdit=this.options.draggable,this.config("draggable",!1);for(var n=this.getGeometries(),r=0,i=n.length;r<i;r++)n[r].startEdit(t);return this._editing=!0,this.hide(),setTimeout((function(){e.fire("editstart")}),1),this},n.endEdit=function(){if(this.isEmpty())return this;for(var t=this.getGeometries(),e=0,n=t.length;e<n;e++)t[e].endEdit();return this._originalSymbol&&(this.setSymbol(this._originalSymbol),delete this._originalSymbol),this._editing=!1,this.show(),this.config("draggable",this._draggbleBeforeEdit),this.fire("editend"),this},n.isEditing=function(){return!!this._editing},e}($r);function Ci(t,e){if(this.isEmpty())return null;for(var n=this.getGeometries(),r=null,i=0,o=n.length;i<o;i++){var a=n[i];if(a){var s=a[e](t);s&&(r=s.combine(r))}}return r}Ei.registerJSONType("GeometryCollection");var Ti=function(t){function e(e,n,r,i){var o;return(o=t.call(this,null,i)||this).GeometryType=e,o.type=n,o._initData(r),o}fe(e,t);var n=e.prototype;return n.getCoordinates=function(){for(var t=[],e=this.getGeometries(),n=0,r=e.length;n<r;n++){var i=e[n];t.push(i.getShell&&"Polygon"!==i.getJSONType()?[i.getShell()]:i.getCoordinates())}return t},n.setCoordinates=function(t){for(var e=[],n=0,r=(t=t||[]).length;n<r;n++){var i=new this.GeometryType(t[n],this.config());e.push(i)}return this.setGeometries(e),this},n._initData=function(t){(t=t||[]).length&&(t[0]instanceof this.GeometryType?this.setGeometries(t):this.setCoordinates(t))},n._checkGeo=function(t){return t instanceof this.GeometryType},n._exportGeoJSONGeometry=function(){var t=this.getCoordinates(),e=Ln.toNumberArrays(t);return{type:this.getType(),coordinates:e}},e}(Ei),Ii=function(t){function e(e,n){return t.call(this,Mi,"MultiPoint",e,n)||this}return fe(e,t),e.prototype.findClosest=function(t){if(!t)return null;var e=this.getCoordinates(),n=null,r=1/0;return e.forEach((function(e){var i=function(t,e){var n=e.x-t.x,r=e.y-t.y;return Math.sqrt(n*n+r*r)}(e,t);i<r&&(n=e,r=i)})),n},e}(Ti);Ii.registerJSONType("MultiPoint");var Pi=function(t){function e(){return t.apply(this,arguments)||this}return fe(e,t),e.prototype.getCenterInExtent=function(t){var e=this.getGeometries(),n=0,r=0,i=0;return e.forEach((function(e){var o=e.getCenterInExtent(t);o&&(n+=o.x*o.count,r+=o.y*o.count,i+=o.count)})),0===i?null:new Ln(n,r)._multi(1/i)},e}(Ti),Li=function(t){function e(e,n){return t.call(this,Ai,"MultiLineString",e,n)||this}return fe(e,t),e}(Pi);Li.registerJSONType("MultiLineString");var Ri=function(t){function e(e,n){return t.call(this,xi,"MultiPolygon",e,n)||this}return fe(e,t),e}(Pi);Ri.registerJSONType("MultiPolygon");var Oi={Marker:Mi,LineString:Ai,Polygon:xi,MultiPoint:Ii,MultiLineString:Li,MultiPolygon:Ri},ki={toGeometry:function(t,e){if(y(t)&&(t=O(t)),Array.isArray(t)){for(var n=[],r=0,i=t.length;r<i;r++){var o=ki._convert(t[r],e);Array.isArray(o)?k(n,o):n.push(o)}return n}return ki._convert(t,e)},_convert:function(t,e){if(!t||p(t.type))return null;var n=t.type;if("Feature"===n){var r=t.geometry,i=ki._convert(r);return i?(i.setId(t.id),i.setProperties(t.properties),e&&e(i),i):null}if("FeatureCollection"===n){var o=t.features;return o?ki.toGeometry(o,e):null}if(["Point","LineString","Polygon","MultiPoint","MultiLineString","MultiPolygon"].indexOf(n)>=0){var a=new Oi["Point"===n?"Marker":n](t.coordinates);return e&&e(a),a}if("GeometryCollection"===n){var s=t.geometries;if(!H(s)){var c=new Ei;return e&&e(c),c}for(var u=[],l=s.length,h=0;h<l;h++)u.push(ki._convert(s[h]));var f=new Ei(u);return e&&e(f),f}return null}},Bi=function(t){function e(e,n,r){var i;return i=t.call(this,null,r)||this,e&&i.setCoordinates(e),i._radius=n,i}fe(e,t),e.fromJSON=function(t){var n=t.feature,r=new e(t.coordinates,t.radius,t.options);return r.setProperties(n.properties),r};var n=e.prototype;return n.getRadius=function(){return this._radius},n.setRadius=function(t){return this._radius=t,this.onShapeChanged(),this},n.getShell=function(){for(var t,e,n,r=this._getMeasurer(),i=this.getCoordinates(),o=this.options.numberOfShellPoints,a=this.getRadius(),s=[],c=0,u=o-1;c<u;c++){t=360*c/u*Math.PI/180,e=a*Math.cos(t),n=a*Math.sin(t);var l=r.locate(i,e,n);s.push(l)}return s.push(s[0]),s},n.getHoles=function(){return[]},n.animateShow=function(){return this.show()},n._containsPoint=function(e,n){var r=this.getMap();if(r.getPitch())return t.prototype._containsPoint.call(this,e,n);var i=r._pointToContainerPoint(this._getCenter2DPoint()),o=this.getSize(),a=p(n)?this._hitTestTolerance():n,s=i.add(o.width/2,o.height/2);return wr(e,i,s,a)},n._computePrjExtent=function(t){var e=this._getMinMax(t);if(!e)return null;var n=this._getPrjCoordinates(),r=e.map((function(e){return t.project(e)})),i=r[0].x-n.x,o=r[1].x-n.x,a=r[2].y-n.y,s=r[3].y-n.y;return new Vn(n.add(i,a),n.add(o,s))},n._computeExtent=function(t){var e=this._getMinMax(t);return e?new Vn(e[0].x,e[2].y,e[1].x,e[3].y,this._getProjection()):null},n._getMinMax=function(t){if(!t||!this._coordinates||p(this._radius))return null;var e=this._radius;return[t.locate(this._coordinates,-e,0),t.locate(this._coordinates,e,0),t.locate(this._coordinates,0,e),t.locate(this._coordinates,0,-e)]},n._computeGeodesicLength=function(){return p(this._radius)?0:2*Math.PI*this._radius},n._computeGeodesicArea=function(){return p(this._radius)?0:Math.PI*Math.pow(this._radius,2)},n._exportGeoJSONGeometry=function(){return{type:"Polygon",coordinates:Ln.toNumberArrays([this.getShell()])}},n._toJSON=function(t){var e=this.getCenter(),n=d({},t);n.geometry=!1;var r=this.toGeoJSON(n);return r.geometry={type:"Polygon"},{feature:r,subType:"Circle",coordinates:[e.x,e.y],radius:this.getRadius()}},e}(wi(xi));Bi.mergeOptions({numberOfShellPoints:60}),Bi.registerJSONType("Circle");var Di=function(t){function e(e,n,r,i){var o;return o=t.call(this,null,i)||this,e&&o.setCoordinates(e),o.width=n,o.height=r,o}fe(e,t),e.fromJSON=function(t){var n=t.feature,r=new e(t.coordinates,t.width,t.height,t.options);return r.setProperties(n.properties),r};var n=e.prototype;return n.getWidth=function(){return this.width},n.setWidth=function(t){return this.width=t,this.onShapeChanged(),this},n.getHeight=function(){return this.height},n.setHeight=function(t){return this.height=t,this.onShapeChanged(),this},n.getShell=function(){for(var t,e,n,r,i=this._getMeasurer(),o=this.getCoordinates(),a=this.options.numberOfShellPoints,s=this.getWidth(),c=this.getHeight(),u=[],l=Math.pow(s/2,2)*Math.pow(c/2,2),h=Math.pow(s/2,2),f=Math.pow(c/2,2),d=0;d<a;d++){e=(t=360*d/a)*Math.PI/180,n=Math.sqrt(l/(h*Math.pow(Math.tan(e),2)+f)),r=Math.sqrt(l/(f*Math.pow(1/Math.tan(e),2)+h)),t>90&&t<270&&(n*=-1),t>180&&t<360&&(r*=-1);var p=i.locate(o,n,r);u.push(p)}return u},n.getHoles=function(){return[]},n.animateShow=function(){return this.show()},n._containsPoint=function(e,n){var r=this.getMap();if(r.isTransforming())return t.prototype._containsPoint.call(this,e,n);var i=r.getProjection(),o=p(n)?this._hitTestTolerance():n,a=i.projectCoords([this._coordinates,r.locate(this._coordinates,this.getWidth()/2,this.getHeight()/2)]);return wr(e,r._prjToContainerPoint(a[0]),r._prjToContainerPoint(a[1]),o)},n._computePrjExtent=function(){return Bi.prototype._computePrjExtent.apply(this,arguments)},n._computeExtent=function(){return Bi.prototype._computeExtent.apply(this,arguments)},n._getMinMax=function(t){if(!t||!this._coordinates||p(this.width)||p(this.height))return null;var e=this.getWidth(),n=this.getHeight();return[t.locate(this._coordinates,-e/2,0),t.locate(this._coordinates,e/2,0),t.locate(this._coordinates,0,-n/2),t.locate(this._coordinates,0,n/2)]},n._computeGeodesicLength=function(){if(p(this.width)||p(this.height))return 0;var t=this.width>this.height?this.width:this.height;return 2*Math.PI*t/2-4*Math.abs(this.width-this.height)},n._computeGeodesicArea=function(){return p(this.width)||p(this.height)?0:Math.PI*this.width*this.height/4},n._exportGeoJSONGeometry=function(){return{type:"Polygon",coordinates:Ln.toNumberArrays([this.getShell()])}},n._toJSON=function(t){var e=d({},t),n=this.getCenter();e.geometry=!1;var r=this.toGeoJSON(e);return r.geometry={type:"Polygon"},{feature:r,subType:"Ellipse",coordinates:[n.x,n.y],width:this.getWidth(),height:this.getHeight()}},e}(wi(xi));Di.mergeOptions({numberOfShellPoints:80}),Di.registerJSONType("Ellipse");var Fi=function(t){function e(e,n,r,i){var o;return o=t.call(this,null,i)||this,e&&o.setCoordinates(e),o._width=n,o._height=r,o}fe(e,t),e.fromJSON=function(t){var n=t.feature,r=new e(t.coordinates,t.width,t.height,t.options);return r.setProperties(n.properties),r};var n=e.prototype;return n.getCoordinates=function(){return this._coordinates},n.setCoordinates=function(t){if(this._coordinates=t instanceof Ln?t:new Ln(t),!this._coordinates||!this.getMap())return this.onPositionChanged(),this;var e=this._getProjection();return this._setPrjCoordinates(e.project(this._coordinates)),this},n.getWidth=function(){return this._width},n.setWidth=function(t){return this._width=t,this.onShapeChanged(),this},n.getHeight=function(){return this._height},n.setHeight=function(t){return this._height=t,this.onShapeChanged(),this},n.getShell=function(){var t=this._getMeasurer(),e=this._coordinates,n=this.getMap(),r=1,i=-1;if(n){var o=n.getFullExtent();o.left>o.right&&(r=-1),o.bottom>o.top&&(i=1)}var a=[];return a.push(e),a.push(t.locate(e,r*this._width,0)),a.push(t.locate(e,r*this._width,i*this._height)),a.push(t.locate(e,0,i*this._height)),a.push(e),a},n.getHoles=function(){return[]},n.animateShow=function(){return this.show()},n._getPrjCoordinates=function(){var t=this._getProjection();return this._verifyProjection(),!this._pnw&&t&&this._coordinates&&(this._pnw=t.project(this._coordinates)),this._pnw},n._setPrjCoordinates=function(t){this._pnw=t,this.onPositionChanged()},n._getPrjShell=function(){var e=t.prototype._getPrjShell.call(this),n=this._getProjection();if(!n.isSphere())return e;for(var r=n.getSphereExtent(),i=r.sx,o=r.sy,a=this._getProjection().getCircum(),s=e[0],c=1,u=e.length;c<u;c++){var l=e[c],h=0,f=0;i*(s.x-l.x)>0&&(h=a.x*i),o*(s.y-l.y)<0&&(f=a.y*o),e[c]._add(h,f)}return e},n._updateCache=function(){this._clearCache();var t=this._getProjection();this._pnw&&t&&(this._coordinates=t.unproject(this._pnw))},n._clearProjection=function(){this._pnw=null,t.prototype._clearProjection.call(this)},n._computeCenter=function(t){return t.locate(this._coordinates,this._width/2,-this._height/2)},n._containsPoint=function(e,n){var r=this.getMap();if(r.isTransforming())return t.prototype._containsPoint.call(this,e,n);var i=p(n)?this._hitTestTolerance():n,o=r._getResolution()*i,a=this._getPrjExtent().expand(o),s=r._containerPointToPrj(e);return a.contains(s)},n._computePrjExtent=function(t){var e=this._getSouthEast(t);if(!e)return null;var n=t.projectCoords([new Ln(this._coordinates.x,e.y),new Ln(e.x,this._coordinates.y)]);return new Vn(n[0],n[1])},n._computeExtent=function(t){var e=this._getSouthEast(t);return e?new Vn(this._coordinates,e,this._getProjection()):null},n._getSouthEast=function(t){if(!t||!this._coordinates||p(this._width)||p(this._height))return null;var e=this.getWidth(),n=-this.getHeight();if(t.fullExtent){var r=t.fullExtent;e*=r.right>r.left?1:-1,n*=r.top>r.bottom?1:-1}return t.locate(this._coordinates,e,n)},n._computeGeodesicLength=function(){return p(this._width)||p(this._height)?0:2*(this._width+this._height)},n._computeGeodesicArea=function(){return p(this._width)||p(this._height)?0:this._width*this._height},n._exportGeoJSONGeometry=function(){return{type:"Polygon",coordinates:Ln.toNumberArrays([this.getShell()])}},n._toJSON=function(t){var e=d({},t),n=this.getCoordinates();e.geometry=!1;var r=this.toGeoJSON(e);return r.geometry={type:"Polygon"},{feature:r,subType:"Rectangle",coordinates:[n.x,n.y],width:this.getWidth(),height:this.getHeight()}},e}(xi);Fi.registerJSONType("Rectangle");var ji=function(t){function e(e,n,r,i,o){var a;return(a=t.call(this,e,n,o)||this).startAngle=r,a.endAngle=i,a}fe(e,t),e.fromJSON=function(t){var n=t.feature,r=new e(t.coordinates,t.radius,t.startAngle,t.endAngle,t.options);return r.setProperties(n.properties),r};var n=e.prototype;return n.getStartAngle=function(){return this.startAngle},n.setStartAngle=function(t){return this.startAngle=t,this.onShapeChanged(),this},n.getEndAngle=function(){return this.endAngle},n.setEndAngle=function(t){return this.endAngle=t,this.onShapeChanged(),this},n.getShell=function(){for(var t,e,n,r=this._getMeasurer(),i=this.getCoordinates(),o=this.options.numberOfShellPoints-2,a=this.getRadius(),s=[i.copy()],c=this.getStartAngle(),u=this.getEndAngle()-c,l=0;l<o;l++){t=(u*l/(o-1)+c)*Math.PI/180,e=a*Math.cos(t),n=a*Math.sin(t);var h=r.locate(i,e,n);s.push(h)}return s.push(i.copy()),s},n._containsPoint=function(e,n){var r=this.getMap();if(r.isTransforming())return t.prototype._containsPoint.call(this,e,n);var i,o=r._pointToContainerPoint(this._getCenter2DPoint()),a=p(n)?this._hitTestTolerance():n,s=this.getSize(),c=o,u=e,l=u.x-c.x,h=c.y-u.y,f=Math.atan2(h,l),d=f<0?360*(f+2*Math.PI)/(2*Math.PI):360*f/(2*Math.PI),m=this.startAngle%360,g=this.endAngle%360;return i=m>g?!(d>g&&d<m):d>=m&&d<=g,u.distanceTo(c)<=s.width/2+a&&i},n._computeGeodesicLength=function(){return p(this._radius)?0:2*Math.PI*this._radius*Math.abs(this.startAngle-this.endAngle)/360+2*this._radius},n._computeGeodesicArea=function(){return p(this._radius)?0:Math.PI*Math.pow(this._radius,2)*Math.abs(this.startAngle-this.endAngle)/360},n._toJSON=function(t){var e=d({},t),n=this.getCenter();e.geometry=!1;var r=this.toGeoJSON(e);return r.geometry={type:"Polygon"},{feature:r,subType:"Sector",coordinates:[n.x,n.y],radius:this.getRadius(),startAngle:this.getStartAngle(),endAngle:this.getEndAngle()}},e}(Bi);ji.mergeOptions({numberOfShellPoints:60}),ji.registerJSONType("Sector");var Ui=function(t){function e(){return t.apply(this,arguments)||this}fe(e,t);var n=e.prototype;return n._arc=function(t,e,n){for(var r=this.options.arcDegree*Math.PI/180,i=1,o=e.length;i<o;i++){var a=hn._arcBetween(t,e[i-1],e[i],r),s=[e[i-1].x+e[i].x-a[0],e[i-1].y+e[i].y-a[1]];e[i-1].nextCtrlPoint=s,e[i].prevCtrlPoint=s,hn._stroke(t,n)}},n._quadraticCurve=function(t,e){if(e.length<=2)hn._path(t,e);else{var n,r;for(n=2,r=e.length;n<r;n+=2)t.quadraticCurveTo(e[n-1].x,e[n-1].y,e[n].x,e[n].y);if((n-=1)<r)for(;n<r;n++)t.lineTo(e[n].x,e[n].y)}},n._bezierCurve=function(t,e){if(e.length<=3)hn._path(t,e);else{var n,r;for(n=1,r=e.length;n+2<r;n+=3)t.bezierCurveTo(e[n].x,e[n].y,e[n+1].x,e[n+1].y,e[n+2].x,e[n+2].y);if(n<r)for(;n<r;n++)t.lineTo(e[n].x,e[n].y)}},n._getCurveArrowPoints=function(t,e,n,r,i,o){var a,s=e.length;for(a=o;a<s;a+=o){var c=this._getArrowShape(e[a-1],e[a],n,r,i);c&&t.push(c)}if((a-=o)<s-1)for(a+=1;a<s;a++){var u=this._getArrowShape(e[a-1],e[a],n,r,i);u&&t.push(u)}},e}(Ai);Ui.mergeOptions({enableSimplify:!1,enableClip:!1});var Ni=function(t){function e(){return t.apply(this,arguments)||this}fe(e,t);var n=e.prototype;return n._toJSON=function(t){return{feature:this.toGeoJSON(t),subType:"ArcCurve"}},n._paintOn=function(t,e,n){t.beginPath(),this._arc(t,e,n),hn._stroke(t,n),this._paintArrow(t,e,n)},e.fromJSON=function(t){var n=t.feature,r=new e(n.geometry.coordinates,t.options);return r.setProperties(n.properties),r},e}(Ui);Ni.registerJSONType("ArcCurve"),Ni.mergeOptions({arcDegree:90});var zi=function(t){function e(){return t.apply(this,arguments)||this}fe(e,t),e.fromJSON=function(t){var n=t.feature,r=new e(n.geometry.coordinates,t.options);return r.setProperties(n.properties),r};var n=e.prototype;return n._toJSON=function(t){return{feature:this.toGeoJSON(t),subType:"CubicBezierCurve"}},n._paintOn=function(t,e,n){t.beginPath(),t.moveTo(e[0].x,e[0].y),this._bezierCurve(t,e),hn._stroke(t,n),this._paintArrow(t,e,n)},n._getArrowPoints=function(t,e,n,r,i){return this._getCurveArrowPoints(t,e,n,r,i,3)},e}(Ui);zi.registerJSONType("CubicBezierCurve");var Gi=function(t){function e(){return t.apply(this,arguments)||this}fe(e,t),e.fromJSON=function(t){var n=t.feature,r=new e(n.geometry.coordinates,t.options);return r.setProperties(n.properties),r};var n=e.prototype;return n._toJSON=function(t){return{feature:this.toGeoJSON(t),subType:"QuadBezierCurve"}},n._paintOn=function(t,e,n){t.beginPath(),t.moveTo(e[0].x,e[0].y),this._quadraticCurve(t,e,n),hn._stroke(t,n),this._paintArrow(t,e,n)},n._getArrowPoints=function(t,e,n,r,i){return this._getCurveArrowPoints(t,e,n,r,i,2)},e}(Ui);Gi.registerJSONType("QuadBezierCurve");var Hi={textFaceName:"monospace",textSize:12,textLineSpacing:8,textWrapCharacter:"\n",textHorizontalAlignment:"middle",textVerticalAlignment:"middle"},Wi={markerType:"square",markerLineColor:"#000",markerLineWidth:2,markerLineOpacity:1,markerFill:"#fff",markerOpacity:1},Vi=function(t){function e(){return t.apply(this,arguments)||this}fe(e,t);var n=e.prototype;return n.getContent=function(){return this._content},n.setContent=function(t){var e=this._content;return this._content=_e(t),this._refresh(),this._fireEvent("contentchange",{old:e,new:t}),this},n.onAdd=function(){this._refresh()},n.toJSON=function(){var e=t.prototype.toJSON.call(this);return delete e.symbol,e},n.setSymbol=function(e){if(this._refreshing||!e)return t.prototype.setSymbol.call(this,e);var n=this._parseSymbol(e);if(this.setTextStyle){var r=this.getTextStyle()||{};r.symbol=n[0],this.setTextStyle(r)}else this.setTextSymbol&&this.setTextSymbol(n[0]);if(this.setBoxStyle){var i=this.getBoxStyle()||{};i.symbol=n[1],this.setBoxStyle(i)}else this.setBoxSymbol&&this.setBoxSymbol(n[1]);return this},n._parseSymbol=function(t){var e={},n={};for(var r in t)x(t,r)&&(0===r.indexOf("text")?e[r]=t[r]:n[r]=t[r]);return[e,n]},n._getTextSize=function(t){return Ie(this._content,t).size},n._getInternalSymbol=function(){return this._symbol},n._getDefaultTextSymbol=function(){return d({},Hi)},n._getDefaultBoxSymbol=function(){return d({},Wi)},n._getDefaultPadding=function(){return[12,8]},e}(Mi),Zi=function(t){function e(e,n,r,i,o){var a;return void 0===o&&(o={}),(a=t.call(this,n,o)||this)._content=_e(e),a._width=p(r)?100:r,a._height=p(i)?40:i,o.boxSymbol&&a.setBoxSymbol(o.boxSymbol),o.textStyle&&a.setTextStyle(o.textStyle),a._refresh(),a}fe(e,t);var n=e.prototype;return n.getWidth=function(){return this._width},n.setWidth=function(t){return this._width=t,this._refresh(),this},n.getHeight=function(){return this._height},n.setHeight=function(t){return this._height=t,this._refresh(),this},n.getBoxSymbol=function(){return d({},this.options.boxSymbol)},n.setBoxSymbol=function(t){return this.options.boxSymbol=t?d({},t):t,this.getSymbol()&&this._refresh(),this},n.getTextStyle=function(){return this.options.textStyle?d({},this.options.textStyle):null},n.setTextStyle=function(t){return this.options.textStyle=t?d({},t):t,this.getSymbol()&&this._refresh(),this},e.fromJSON=function(t){var n=t.feature,r=new e(t.content,n.geometry.coordinates,t.width,t.height,t.options);return r.setProperties(n.properties),r.setId(n.id),t.symbol&&r.setSymbol(t.symbol),r},n._toJSON=function(t){return{feature:this.toGeoJSON(t),width:this.getWidth(),height:this.getHeight(),subType:"TextBox",content:this._content}},n._refresh=function(){var t=this.getTextStyle()||{},e=t.padding||[12,8],n=this._width-2*e[0],r=this._height-2*e[1],i=d({},t.symbol||this._getDefaultTextSymbol(),this.options.boxSymbol||this._getDefaultBoxSymbol(),{textName:this._content,markerWidth:this._width,markerHeight:this._height,textHorizontalAlignment:"middle",textVerticalAlignment:"middle",textMaxWidth:n,textMaxHeight:r});t.wrap&&!i.textWrapWidth&&(i.textWrapWidth=n);var o=t.horizontalAlignment;i.textDx=i.markerDx||0;var a=i.markerWidth/2-e[0];"left"===o?(i.textHorizontalAlignment="right",i.textDx=i.textDx-a):"right"===o&&(i.textHorizontalAlignment="left",i.textDx=i.textDx+a);var s=t.verticalAlignment;i.textDy=i.markerDy||0;var c=i.markerHeight/2-e[1];"top"===s?(i.textVerticalAlignment="bottom",i.textDy-=c):"bottom"===s&&(i.textVerticalAlignment="top",i.textDy+=c),this._refreshing=!0,this.updateSymbol(i),delete this._refreshing},e}(Vi);Zi.mergeOptions({textStyle:{wrap:!0,padding:[12,8],verticalAlignment:"middle",horizontalAlignment:"middle"},boxSymbol:null}),Zi.registerJSONType("TextBox");var Qi=function(t){function e(e,n,r){var i;return void 0===r&&(r={}),i=t.call(this,n,r)||this,r.textSymbol&&i.setTextSymbol(r.textSymbol),r.boxStyle&&i.setBoxStyle(r.boxStyle),i._content=_e(e),i._refresh(),i}fe(e,t);var n=e.prototype;return n.getBoxStyle=function(){return this.options.boxStyle?d({},this.options.boxStyle):null},n.setBoxStyle=function(t){return this.options.boxStyle=t?d({},t):t,this._refresh(),this},n.getTextSymbol=function(){return d({},this._getDefaultTextSymbol(),this.options.textSymbol)},n.setTextSymbol=function(t){return this.options.textSymbol=t?d({},t):t,this._refresh(),this},e.fromJSON=function(t){var n=t.feature,r=new e(t.content,n.geometry.coordinates,t.options);return r.setProperties(n.properties),r.setId(n.id),t.symbol&&r.setSymbol(t.symbol),r},n._canEdit=function(){return!1},n._toJSON=function(t){return{feature:this.toGeoJSON(t),subType:"Label",content:this._content}},n._refresh=function(){var t=d({},this.getTextSymbol(),{textName:this._content}),e=this.getBoxStyle();if(e){d(t,e.symbol);var n=this._getBoxSize(t),r=n[1],i=e.padding||this._getDefaultPadding(),o=n[0];t.markerWidth=o.width,t.markerHeight=o.height;var a=t.textDx||0,s=t.textDy||0,c=Ce(r,t.textHorizontalAlignment,t.textVerticalAlignment)._add(a,s),u=e.horizontalAlignment||"middle";t.markerDx=c.x,"left"===u?t.markerDx+=t.markerWidth/2-i[0]:"right"===u?t.markerDx-=t.markerWidth/2-r.width-i[0]:t.markerDx+=r.width/2;var l=e.verticalAlignment||"middle";t.markerDy=c.y,"top"===l?t.markerDy+=t.markerHeight/2-i[1]:"bottom"===l?t.markerDy-=t.markerHeight/2-r.height-i[1]:t.markerDy+=r.height/2}this._refreshing=!0,this.updateSymbol(t),delete this._refreshing},n._getBoxSize=function(t){t.markerType||(t.markerType="square");var e,n,r=this.getBoxStyle(),i=this._getTextSize(t),o=r.padding||this._getDefaultPadding();return e=i.width+2*o[0],n=i.height+2*o[1],r.minWidth&&(!e||e<r.minWidth)&&(e=r.minWidth),r.minHeight&&(!n||n<r.minHeight)&&(n=r.minHeight),[new ge(e,n),i]},e}(Vi);Qi.mergeOptions({boxStyle:null,textSymbol:null}),Qi.registerJSONType("Label");var Xi=function(t){return function(t){function e(){return t.apply(this,arguments)||this}fe(e,t),e._hasConnectors=function(t){return!p(t.__connectors)&&t.__connectors.length>0},e._getConnectors=function(t){return t.__connectors};var n=e.prototype;return n.getConnectSource=function(){return this._connSource},n.setConnectSource=function(t){var e=this._connTarget;return this.onRemove(),this._connSource=t,this._connTarget=e,this.onAdd(),this},n.getConnectTarget=function(){return this._connTarget},n.setConnectTarget=function(t){var e=this._connSource;return this.onRemove(),this._connSource=e,this._connTarget=t,this._updateCoordinates(),this._registerEvents(),this},n._updateCoordinates=function(){var t=this.getMap();if(!t&&this._connSource&&(t=this._connSource.getMap()),!t&&this._connTarget&&(t=this._connTarget.getMap()),t&&this._connSource&&this._connTarget){for(var e,n,r=this._connSource._getConnectPoints(),i=this._connTarget._getConnectPoints(),o=0,a=this.getCoordinates(),s=0,c=r.length;s<c;s++)for(var u=r[s],l=0,h=i.length;l<h;l++){var f=i[l],d=t.computeLength(u,f);0===s&&0===l?(e=u,n=f,o=d):d<o&&(e=u,n=f)}H(a)&&a[0].equals(e)&&a[1].equals(n)||this.setCoordinates([e,n])}},n.onAdd=function(){this._registerEvents(),this._updateCoordinates()},n.onRemove=function(){if(this._connSource&&(this._connSource.__connectors&&B(this,this._connSource.__connectors),this._connSource.off("dragging positionchange",this._updateCoordinates,this).off("remove",this.onRemove,this),this._connSource.off("dragstart mousedown mouseover",this._showConnect,this),this._connSource.off("dragend mouseup mouseout",this.hide,this),this._connSource.off("show",this._showConnect,this).off("hide",this.hide,this),delete this._connSource),this._connTarget&&(B(this,this._connTarget.__connectors),this._connTarget.off("dragging positionchange",this._updateCoordinates,this).off("remove",this.onRemove,this),this._connTarget.off("show",this._showConnect,this).off("hide",this.hide,this),delete this._connTarget),!(this._connSource instanceof $r&&this._connTarget instanceof $r)){var t=this.getMap();t&&t.off("movestart moving moveend zoomstart zooming zoomend rotate pitch fovchange spatialreferencechange",this._updateCoordinates,this)}},n._showConnect=function(){this._connSource&&this._connTarget&&this._connSource.isVisible()&&this._connTarget.isVisible()&&(this._updateCoordinates(),this.show())},n._registerEvents=function(){if(this._connSource&&this._connTarget){this._connSource.__connectors||(this._connSource.__connectors=[]),this._connTarget.__connectors||(this._connTarget.__connectors=[]),this._connSource.__connectors.push(this),this._connTarget.__connectors.push(this),this._connSource.on("dragging positionchange",this._updateCoordinates,this).on("remove",this.remove,this),this._connTarget.on("dragging positionchange",this._updateCoordinates,this).on("remove",this.remove,this),this._connSource.on("show",this._showConnect,this).on("hide",this.hide,this),this._connTarget.on("show",this._showConnect,this).on("hide",this.hide,this);var t=this.options.showOn;if(this.hide(),"moving"===t?(this._connSource.on("dragstart",this._showConnect,this).on("dragend",this.hide,this),this._connTarget.on("dragstart",this._showConnect,this).on("dragend",this.hide,this)):"click"===t?(this._connSource.on("mousedown",this._showConnect,this).on("mouseup",this.hide,this),this._connTarget.on("mousedown",this._showConnect,this).on("mouseup",this.hide,this)):"mouseover"===t?(this._connSource.on("mouseover",this._showConnect,this).on("mouseout",this.hide,this),this._connTarget.on("mouseover",this._showConnect,this).on("mouseout",this.hide,this)):this._showConnect(),!(this._connSource instanceof $r&&this._connTarget instanceof $r)){var e=this.getMap();e&&e.on("movestart moving moveend zoomstart zooming zoomend rotate pitch fovchange spatialreferencechange",this._updateCoordinates,this)}}},e}(t)},Yi={showOn:"always"},Ji=function(t){function e(e,n,r){var i;return i=t.call(this,null,r)||this,1===arguments.length&&(r=e,e=null,n=null),i._connSource=e,i._connTarget=n,i}return fe(e,t),e}(Xi(Ai));Ji.mergeOptions(Yi),Ji.registerJSONType("ConnectorLine");var qi=function(t){function e(e,n,r){var i;return i=t.call(this,null,r)||this,1===arguments.length&&(r=e,e=null,n=null),i._connSource=e,i._connTarget=n,i}return fe(e,t),e}(Xi(Ni));qi.mergeOptions(Yi),qi.registerJSONType("ArcConnectorLine");var Ki=function(t){function e(e,n,r){var i;n&&!(n instanceof $r)&&!Array.isArray(n)&&a.indexOf(n.type)<0&&(r=n,n=null),(i=t.call(this,e,r)||this)._maxZIndex=0,i._minZIndex=0,i._initCache(),n&&i.addGeometry(n);var o=i.options.style;return o&&i.setStyle(o),i}fe(e,t);var n=e.prototype;return n.getGeometryById=function(t){return p(t)||""===t?null:this._geoMap[t]?this._geoMap[t]:null},n.getGeometries=function(t,e){if(!t)return this._geoList.slice(0);for(var n,r=[],i=0,o=this._geoList.length;i<o;i++)n=this._geoList[i],(e?t.call(e,n):t(n))&&r.push(n);return r},n.getFirstGeometry=function(){return this._geoList.length?this._geoList[0]:null},n.getLastGeometry=function(){var t=this._geoList.length;return 0===t?null:this._geoList[t-1]},n.getCount=function(){return this._geoList.length},n.getExtent=function(){if(0===this.getCount())return null;var t=new Vn(this.getProjection());return this.forEach((function(e){t._combine(e.getExtent())})),t},n.forEach=function(t,e){for(var n=this._geoList.slice(0),r=0,i=n.length;r<i;r++)e?t.call(e,n[r],r):t(n[r],r);return this},n.filter=function(t,e){var n=[],r=_(t),i=r?t:rt(t);return this.forEach((function(t){var o=r?t:ft(t);(e?i.call(e,o):i(o))&&n.push(t)}),this),n},n.isEmpty=function(){return!this._geoList.length},n.addGeometry=function(t,e){if(!t)return this;if("FeatureCollection"===t.type)return this.addGeometry(ki.toGeometry(t),e);if(!Array.isArray(t)){var n=arguments.length,r=arguments[n-1];return t=Array.prototype.slice.call(arguments,0,n-1),e=r,r&&v(r)&&("type"in r||r instanceof $r)&&(t.push(r),e=!1),this.addGeometry(t,e)}if(0===t.length)return this;var i;this._initCache(),e&&(i=new Vn),this._toSort=this._maxZIndex>0;for(var o=[],a=0,s=t.length;a<s;a++){var c=t[a];if(!c)throw new Error("Invalid geometry to add to layer("+this.getId()+") at index:"+a);if(!(c instanceof $r)&&(c=$r.fromJSON(c),Array.isArray(c)))for(var u=0,l=c.length;u<l;u++)this._add(c[u],i,a),o.push(c[u]);Array.isArray(c)||(this._add(c,i,a),o.push(c))}var h=this.getMap();if(h&&(this._getRenderer().onGeometryAdd(o),i&&!p(i.xmin))){var f=i.getCenter(),m=h.getFitZoom(i);if(v(e)){var g=_(e.step)?e.step:function(){};h.animateTo({center:f,zoom:m},d({duration:h.options.zoomAnimationDuration,easing:"out"},e),g)}else!0===e&&h.setCenterAndZoom(f,m)}return this.fire("addgeo",{geometries:t}),this},n.getGeoMinZIndex=function(){return this._minZIndex},n.getGeoMaxZIndex=function(){return this._maxZIndex},n._add=function(t,e,n){this._toSort||(this._toSort=0!==t.getZIndex()),this._updateZIndex(t.getZIndex());var r=t.getId();if(!p(r)){if(!p(this._geoMap[r]))throw new Error("Duplicate geometry id in layer("+this.getId()+"):"+r+", at index:"+n);this._geoMap[r]=t}var i=L();t._setInternalId(i),this._geoList.push(t),this.onAddGeometry(t),t._bindLayer(this),t.onAdd&&t.onAdd(),e&&e._combine(t.getExtent()),t._fireEvent("add",{layer:this}),this._cookedStyles&&this._styleGeometry(t)},n.removeGeometry=function(t){if(!Array.isArray(t))return this.removeGeometry([t]);for(var e=t.length-1;e>=0;e--)t[e]instanceof $r||(t[e]=this.getGeometryById(t[e])),t[e]&&this===t[e].getLayer()&&t[e].remove();return this.fire("removegeo",{geometries:t}),this},n.clear=function(){this._clearing=!0,this.forEach((function(t){t.remove()})),this._geoMap={};var t=this._geoList;return this._geoList=[],this._getRenderer()&&this._getRenderer().onGeometryRemove(t),this._clearing=!1,this.fire("clear"),this},n.onRemoveGeometry=function(t){if(t&&!this._clearing&&this===t.getLayer()&&!p(t._getInternalId())){var e=t.getId();p(e)||delete this._geoMap[e];var n=this._findInList(t);n>=0&&this._geoList.splice(n,1),this._getRenderer()&&this._getRenderer().onGeometryRemove([t])}},n.getStyle=function(){return this.options.style?this.options.style:null},n.setStyle=function(t){return this.options.style=t,t=Dt(t),this._cookedStyles=dt(t),this.forEach((function(t){this._styleGeometry(t)}),this),this.fire("setstyle",{style:t}),this},n._styleGeometry=function(t){if(!this._cookedStyles)return!1;for(var e=ft(t),n=0,r=this._cookedStyles.length;n<r;n++)if(!0===this._cookedStyles[n].filter(e))return t._setExternSymbol(this._cookedStyles[n].symbol),!0;return!1},n.removeStyle=function(){return this.options.style?(delete this.options.style,delete this._cookedStyles,this.forEach((function(t){t._setExternSymbol(null)}),this),this.fire("removestyle"),this):this},n.onAddGeometry=function(t){this.getStyle()&&this._styleGeometry(t)},n.hide=function(){for(var t=0,e=this._geoList.length;t<e;t++)this._geoList[t].onHide();return ei.prototype.hide.call(this)},n._initCache=function(){this._geoList||(this._geoList=[],this._geoMap={})},n._updateZIndex=function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];this._maxZIndex=Math.max(this._maxZIndex,Math.max.apply(Math,e)),this._minZIndex=Math.min(this._minZIndex,Math.min.apply(Math,e))},n._sortGeometries=function(){var t=this;this._toSort&&(this._maxZIndex=0,this._minZIndex=0,this._geoList.sort((function(e,n){return t._updateZIndex(e.getZIndex(),n.getZIndex()),t._compare(e,n)})),this._toSort=!1)},n._compare=function(t,e){return t.getZIndex()===e.getZIndex()?t._getInternalId()-e._getInternalId():t.getZIndex()-e.getZIndex()},n._findInList=function(t){var e=this._geoList.length;if(0===e)return-1;this._sortGeometries();for(var n,r=0,i=e-1;r<=i;){if(n=Math.floor((r+i)/2),this._geoList[n]===t)return n;this._compare(this._geoList[n],t)>0?i=n-1:r=n+1}return-1},n._onGeometryEvent=function(t){if(t&&t.target){var e=t.type;"idchange"===e?this._onGeometryIdChange(t):"zindexchange"===e?this._onGeometryZIndexChange(t):"positionchange"===e?this._onGeometryPositionChange(t):"shapechange"===e?this._onGeometryShapeChange(t):"symbolchange"===e?this._onGeometrySymbolChange(t):"show"===e?this._onGeometryShow(t):"hide"===e?this._onGeometryHide(t):"propertieschange"===e&&this._onGeometryPropertiesChange(t)}},n._onGeometryIdChange=function(t){if(t.new!==t.old||!this._geoMap[t.old]||this._geoMap[t.old]!==t.target){if(!p(t.new)){if(this._geoMap[t.new])throw new Error("Duplicate geometry id in layer("+this.getId()+"):"+t.new);this._geoMap[t.new]=t.target}p(t.old)||t.new===t.old||delete this._geoMap[t.old]}},n._onGeometryZIndexChange=function(t){t.old!==t.new&&(this._updateZIndex(t.new),this._toSort=!0,this._getRenderer()&&this._getRenderer().onGeometryZIndexChange(t))},n._onGeometryPositionChange=function(t){this._getRenderer()&&this._getRenderer().onGeometryPositionChange(t)},n._onGeometryShapeChange=function(t){this._getRenderer()&&this._getRenderer().onGeometryShapeChange(t)},n._onGeometrySymbolChange=function(t){this._getRenderer()&&this._getRenderer().onGeometrySymbolChange(t)},n._onGeometryShow=function(t){this._getRenderer()&&this._getRenderer().onGeometryShow(t)},n._onGeometryHide=function(t){this._getRenderer()&&this._getRenderer().onGeometryHide(t)},n._onGeometryPropertiesChange=function(t){this._getRenderer()&&this._getRenderer().onGeometryPropertiesChange(t)},e}(ei);Ki.mergeOptions({drawImmediate:!1});var $i=new Zn,to={debug:!1,enableSimplify:!0,geometryEvents:!0,defaultIconSize:[20,20],cacheVectorOnCanvas:!0,cacheSvgOnCanvas:he.gecko,enableAltitude:!1,altitudeProperty:"altitude",drawAltitude:!1,altitude:0},eo=function(t){function e(e,n,r){return t.call(this,e,n,r)||this}fe(e,t);var n=e.prototype;return n.onConfig=function(e){if(t.prototype.onConfig.call(this,e),e.enableAltitude||e.drawAltitude||e.altitudeProperty){var n=this.getRenderer();n&&n.setToRedraw&&n.setToRedraw()}},n.identify=function(t,e){void 0===e&&(e={});var n=this.getRenderer();return e.onlyVisible&&n&&n.identify?n.identify(t,e):(t instanceof Ln||(t=new Ln(t)),this._hitGeos(this._geoList,t,e))},n._hitGeos=function(t,e,n){void 0===n&&(n={});for(var r=n.filter,i=n.tolerance,o=[],a=this.getMap(),s=a.coordToPoint(e),c=a._pointToContainerPoint(s,void 0,0,s),u=t.length-1;u>=0;u--){var l=t[u];if(l&&l.isVisible()&&l._getPainter()&&l.options.interactive){if(!(l instanceof Ai&&(l._getArrowStyle()||l instanceof Ui))){var h=l.getContainerExtent($i);if(i&&(h=h._expand(i)),!h||!h.contains(c))continue}if(l._containsPoint(c,i)&&(!r||r(l))&&(o.push(l),n.count&&o.length>=n.count))break}}return o},n.getAltitude=function(){return this.options.altitude||0},n.toJSON=function(t){t||(t={});var e={type:this.getJSONType(),id:this.getId(),options:this.config()};if(p(t.geometries)||t.geometries){var n;if(t.clipExtent){var r=this.getMap(),i=r?r.getProjection():null;n=new Vn(t.clipExtent,i)}for(var o=[],a=this.getGeometries(),s=0,c=a.length;s<c;s++){var u=a[s],l=u.getExtent();if(l&&(!n||n.intersects(l))){var h=u.toJSON(t.geometries);o.push(h)}}e.geometries=o}return e},e.fromJSON=function(t){if(!t||"VectorLayer"!==t.type)return null;for(var n=new e(t.id,t.options),r=t.geometries,i=[],o=0;o<r.length;o++){var a=$r.fromJSON(r[o]);a&&i.push(a)}return n.addGeometry(i),n},e.getPainterClass=function(){return Xr},e.getCollectionPainterClass=function(){return Jr},e}(Ki);eo.mergeOptions(to),eo.registerJSONType("VectorLayer");var no="_map_tool",ro=function(t){function e(){return t.apply(this,arguments)||this}fe(e,t);var n=e.prototype;return n.addTo=function(t){return t?(this._map=t,t[no]&&t[no].disable(),this.onAdd&&this.onAdd(),this.enable(),t[no]=this,this._fireEvent("add"),this):this},n.getMap=function(){return this._map},n.enable=function(){return!this._map||this._enabled||(this._enabled=!0,this._switchEvents("off"),this._registerEvents(),this.onEnable&&this.onEnable(),this._fireEvent("enable")),this},n.disable=function(){return this._enabled&&this._map?(this._enabled=!1,this._switchEvents("off"),this.onDisable&&this.onDisable(),this._fireEvent("disable"),this):this},n.isEnabled=function(){return!!this._enabled},n.remove=function(){return this._map?(this.disable(),this._map&&(delete this._map[no],delete this._map),this._fireEvent("remove"),this):this},n._registerEvents=function(){this._switchEvents("on")},n._switchEvents=function(t){var e=this.getEvents();e&&this._map[t](e,this)},n._fireEvent=function(t,e){e||(e={}),this.fire(t,e)},e}(bn(Mn)),io={},oo=function(t){function e(e){var n;return(n=t.call(this,e)||this)._checkMode(),n._events={click:n._clickHandler,mousemove:n._mouseMoveHandler,dblclick:n._doubleClickHandler,mousedown:n._mouseDownHandler,mouseup:n._mouseUpHandler},n}fe(e,t),e.registerMode=function(t,e){io[t.toLowerCase()]=e},e.getRegisterMode=function(t){return io[t.toLowerCase()]};var n=e.prototype;return n.getMode=function(){return this.options.mode?this.options.mode.toLowerCase():null},n.setMode=function(t){return this._geometry&&(this._geometry.remove(),delete this._geometry),this._clearStage(),this._switchEvents("off"),this.options.mode=t,this._checkMode(),this.isEnabled()&&(this._switchEvents("on"),this._restoreMapCfg(),this._saveMapCfg()),this},n.getSymbol=function(){return Bt(this.options.symbol||this.options.symbol)},n.setSymbol=function(t){return t?(this.options.symbol=t,this._geometry&&this._geometry.setSymbol(t),this):this},n.getCurrentGeometry=function(){return this._geometry},n.onAdd=function(){this._checkMode()},n.onEnable=function(){if(this._saveMapCfg(),this._drawToolLayer=this._getDrawLayer(),this._clearStage(),this._loadResources(),this.options.autoPanAtEdge){var t=this.getMap();this._mapAutoPanAtEdge=t.options.autoPanAtEdge,this._mapAutoPanAtEdge||t.config({autoPanAtEdge:!0})}return this},n.onDisable=function(){var t=this.getMap();return this._restoreMapCfg(),this.endDraw(),this._map&&(t.removeLayer(this._getDrawLayer()),this.options.autoPanAtEdge&&(this._mapAutoPanAtEdge||t.config({autoPanAtEdge:!1}))),this},n.undo=function(){var t=this._getRegisterMode(),e=t.action;if(!this._shouldRecordHistory(e)||!this._historyPointer)return this;var n=this._clickCoords.slice(0,--this._historyPointer);return t.update(this.getMap().getProjection(),n,this._geometry),this},n.redo=function(){var t=this._getRegisterMode(),e=t.action;if(!this._shouldRecordHistory(e)||p(this._historyPointer)||this._historyPointer===this._clickCoords.length)return this;var n=this._clickCoords.slice(0,++this._historyPointer);return t.update(this.getMap().getProjection(),n,this._geometry),this},n._shouldRecordHistory=function(t){return Array.isArray(t)&&"click"===t[0]&&"mousemove"===t[1]&&"dblclick"===t[2]},n._checkMode=function(){this._getRegisterMode()},n._saveMapCfg=function(){var t=this.getMap();if(this._mapDoubleClickZoom=t.options.doubleClickZoom,t.config({doubleClickZoom:this.options.doubleClickZoom}),this._getRegisterMode().action.indexOf("mousedown")>-1){var e=this.getMap();this._mapDraggable=e.options.draggable,e.config({draggable:!1})}},n._restoreMapCfg=function(){var t=this.getMap();t.config({doubleClickZoom:this._mapDoubleClickZoom}),p(this._mapDraggable)||t.config("draggable",this._mapDraggable),delete this._mapDraggable,delete this._mapDoubleClickZoom},n._loadResources=function(){var t=It(this.getSymbol());t.length>0&&this._drawToolLayer._getRenderer().loadResources(t)},n._getProjection=function(){return this._map.getProjection()},n._getRegisterMode=function(){var t=this.getMode(),n=e.getRegisterMode(t);if(!n)throw new Error(t+" is not a valid mode of DrawTool.");return n},n.getEvents=function(){var t=this._getRegisterMode().action,e={};if(Array.isArray(t)){for(var n=0;n<t.length;n++)e[t[n]]=this._events[t[n]];return e}return null},n._mouseDownHandler=function(t){this._createGeometry(t)},n._mouseUpHandler=function(t){this.endDraw(t)},n._clickHandler=function(t){var e=this._getRegisterMode();if(this._geometry){var n=this.getMap()._pointToPrj(t.point2d);p(this._historyPointer)||(this._clickCoords=this._clickCoords.slice(0,this._historyPointer)),this._clickCoords.push(n),this._historyPointer=this._clickCoords.length,t.drawTool=this,e.update(this.getMap().getProjection(),this._clickCoords,this._geometry,t),this._fireEvent("drawvertex",t),e.clickLimit&&e.clickLimit===this._historyPointer&&this.endDraw(t)}else this._createGeometry(t)},n._createGeometry=function(t){var e=this.getMode(),n=this._getRegisterMode(),r=this.getMap()._pointToPrj(t.point2d),i=this.getSymbol();this._geometry||(this._clickCoords=[r],t.drawTool=this,this._geometry=n.create(this.getMap().getProjection(),this._clickCoords,t),i&&"point"!==e?this._geometry.setSymbol(i):this.options.hasOwnProperty("symbol")&&this._geometry.setSymbol(this.options.symbol),this._addGeometryToStage(this._geometry),this._fireEvent("drawstart",t)),"point"===e&&this.endDraw(t)},n._mouseMoveHandler=function(t){var e=this.getMap();if(this._geometry&&e&&!e.isInteracting()){var n=this._getMouseContainerPoint(t);if(this._isValidContainerPoint(n)){var r=this.getMap()._pointToPrj(t.point2d),i=e.getProjection();t.drawTool=this;var o=this._getRegisterMode();if(this._shouldRecordHistory(o.action)){var a=this._clickCoords.slice(0,this._historyPointer);if(a&&a.length>0&&r.equals(a[a.length-1]))return;o.update(i,a.concat([r]),this._geometry,t)}else o.update(i,r,this._geometry,t);this._fireEvent("mousemove",t)}}},n._doubleClickHandler=function(t){if(this._geometry){var e=this._getMouseContainerPoint(t);if(this._isValidContainerPoint(e)){var n=this._getRegisterMode(),r=this._clickCoords;if(!(r.length<2)){for(var i=this.getMap().getProjection(),o=[r[0]],a=1,s=r.length;a<s;a++)r[a].x===r[a-1].x&&r[a].y===r[a-1].y||o.push(r[a]);o.length<2||this._geometry&&this._geometry instanceof xi&&o.length<3||(t.drawTool=this,n.update(i,o,this._geometry,t),this.endDraw(t))}}}},n._addGeometryToStage=function(t){this._getDrawLayer().addGeometry(t)},n.endDraw=function(t){if(!this._geometry||this._ending)return this;this._ending=!0;var e=this._geometry;return this._clearStage(),t=t||{},this._geometry=e,this._fireEvent("drawend",t),delete this._geometry,this.options.once&&this.disable(),delete this._ending,delete this._historyPointer,this},n._clearStage=function(){this._getDrawLayer().clear(),delete this._geometry,delete this._clickCoords},n._getMouseContainerPoint=function(t){return"mousedown"===this._getRegisterMode().action&&He(t.domEvent),t.containerPoint},n._isValidContainerPoint=function(t){var e=this._map.getSize(),n=e.width,r=e.height;return!(t.x<0||t.y<0||t.x>n||t.y>r)},n._getDrawLayer=function(){var t=i+"drawtool",e=this._map.getLayer(t);return e||(e=new eo(t,{enableSimplify:!1}),this._map.addLayer(e)),e},n._fireEvent=function(t,e){e||(e={}),this._geometry&&(e.geometry=this._getRegisterMode().generate(this._geometry,{drawTool:this})),ro.prototype._fireEvent.call(this,t,e)},e}(ro);oo.mergeOptions({symbol:{lineColor:"#000",lineWidth:2,lineOpacity:1,polygonFill:"#fff",polygonOpacity:.3},doubleClickZoom:!1,mode:null,once:!1,autoPanAtEdge:!1,ignoreMouseleave:!0});var ao=function(t){function e(e){var n;return(n=t.call(this,e)||this).drawTool=new oo({mode:"boxZoom",ignoreMouseleave:!1}),n}fe(e,t);var n=e.prototype;return n.addHooks=function(){this.target.on("_mousedown",this._onMouseDown,this)},n.removeHooks=function(){this.target.off("_mousedown",this._onMouseDown,this),this.drawTool.isEnabled()&&this.drawTool.remove()},n._onMouseDown=function(t){this.target.options.boxZoom&&t.domEvent.shiftKey&&this.drawTool.setSymbol(this.target.options.boxZoomSymbol).on("drawend",this._boxZoom,this).addTo(this.target)},n._boxZoom=function(t){var e=this.target;this.drawTool.remove();var n=t.geometry,r=n.getCenter(),i=n.getSymbol(),o=i.markerWidth,a=i.markerHeight,s=new Vn(r,e.locateByPoint(r,o,a),e.getProjection()),c=e.getFitZoom(s);e._animateTo({center:s.getCenter(),zoom:c})},e}(wn);ii.mergeOptions({boxZoom:!0,boxZoomSymbol:{markerType:"rectangle",markerLineWidth:3,markerLineColor:"#1bbc9b",markerLineDasharray:[10,5],markerFillOpacity:.1,markerFill:"#1bbc9b",markerWidth:1,markerHeight:1}}),ii.addOnLoadHook("addHandler","boxZoom",ao);var so=function(t){function e(){return t.apply(this,arguments)||this}fe(e,t);var n=e.prototype;return n.addHooks=function(){this.target&&this.target.on("_mousemove",this._onMouseMove,this)},n.removeHooks=function(){this.target&&this.target.off("_mousemove",this._onMouseMove,this)},n._onMouseMove=function(t){var e=this.target;if(e.options.autoPanAtEdge){var n=t.containerPoint,r=e.getContainerExtent();if(r){var i,o=n.x,a=n.y,s=r.xmax,c=r.ymax;o<30&&(i=[Math.abs(o-30),0]),a<30&&(i=[0,Math.abs(a-30)]),o+30>s&&(i=[-Math.abs(o+30-s),0]),a+30>c&&(i=[0,-Math.abs(a+30-c)]),i&&e.panBy(i,{duration:1})}}},e}(wn);ii.mergeOptions({autoPanAtEdge:!1}),ii.addOnLoadHook("addHandler","autoPanAtEdge",so),ii.include({animateTo:function(t,e,n){var r=this;void 0===e&&(e={}),_(e)&&(n=e,e={});var i=this.getProjection(),o=this.getView(),a={},s=!0;for(var c in t)if(x(t,c)&&!p(t[c])&&("prjCenter"===c||!p(o[c])))if(s=!1,"center"===c){var u=new Ln(o[c]).toFixed(7),l=new Ln(t[c]).toFixed(7);u.equals(l)||(a.center=[u,l])}else if("prjCenter"===c){var h=new Ln(this._getPrjCenter()),f=new Ln(t[c]);h.equals(f)||(a.prjCenter=[h,f])}else o[c]!==t[c]&&"around"!==c&&(a[c]=[o[c],t[c]]);if(s)return null;this._animPlayer&&(this._isInternalAnimation?"running"===this._animPlayer.playState&&(this._animPlayer.pause(),this._prevAnimPlayer=this._animPlayer):(delete this._prevAnimPlayer,this._stopAnim(this._animPlayer)));var d=t.around||new me(this.width/2,this.height/2),m=this._getRenderer(),g=this._animPlayer=gi.animate(a,{easing:e.easing||"out",duration:e.duration||this.options.zoomAnimationDuration,framer:function(t){m.callInNextFrame(t)}},(function(t){if(r.isRemoved())g.finish();else{if("running"===g.playState){if(t.styles.center){var o=t.styles.center;r._setPrjCenter(i.project(o)),r.onMoving(r._parseEventFromCoord(r.getCenter()))}else if(t.styles.prjCenter){var s=t.styles.prjCenter;r._setPrjCenter(s),r.onMoving(r._parseEventFromCoord(r.getCenter()))}p(t.styles.zoom)||r.onZooming(t.styles.zoom,d),p(t.styles.pitch)||r.setPitch(t.styles.pitch),p(t.styles.bearing)||r.setBearing(t.styles.bearing),r._fireEvent("animating")}else"paused"===g.playState&&g!==r._mapAnimPlayer||(g._interupted||(a.center?r._setPrjCenter(i.project(a.center[1])):a.prjCenter&&r._setPrjCenter(a.prjCenter[1]),p(a.pitch)||r.setPitch(a.pitch[1]),p(a.bearing)||r.setBearing(a.bearing[1])),r._endAnim(g,a,d,e));n&&n(t)}}),this);return this._startAnim(a,d),g},_animateTo:function(t,e,n){return void 0===e&&(e={}),this._mapAnimPlayer&&this._stopAnim(this._mapAnimPlayer),this._isInternalAnimation=!0,this._mapAnimPlayer=this.animateTo(t,e,n),delete this._isInternalAnimation,this._mapAnimPlayer},isAnimating:function(){return!!this._animPlayer},isRotating:function(){return this.isDragRotating()||!!this._animRotating},_endAnim:function(t,e,n,r){delete this._animRotating;var i,o=t._interupted?"animateinterrupted":"animateend";if(t===this._animPlayer&&delete this._animPlayer,t===this._mapAnimPlayer&&delete this._mapAnimPlayer,e.center)i=t._interupted?this.getCenter():e.center[1],this.onMoveEnd(this._parseEventFromCoord(i));else if(e.prjCenter){var a;a=t._interupted?this._getPrjCenter():e.prjCenter[1];var s=this._parseEventFromCoord(this.getProjection().unproject(a));s.point2d=this._prjToPoint(a),this.onMoveEnd(s)}p(e.zoom)||(t._interupted?this.onZoomEnd(this.getZoom(),n):r.wheelZoom?this.onZooming(e.zoom[1],n):this.onZoomEnd(e.zoom[1],n)),o&&this._fireEvent(o),p(e.pitch)||this.getPitch()||this.getRenderer().setToRedraw(),this._resumePrev(t)},_startAnim:function(t,e){this._animPlayer&&(t.center&&this.onMoveStart(),t.zoom&&!this.isZooming()&&this.onZoomStart(t.zoom[1],e),(t.pitch||t.bearing)&&(this._animRotating=!0),this._fireEvent("animatestart"),this._animPlayer.play())},_stopAnim:function(t){t&&(delete this._animRotating,"finished"!==t.playState&&(t._interupted=!0,t.cancel()),t===this._animPlayer&&delete this._animPlayer,t===this._mapAnimPlayer&&delete this._mapAnimPlayer)},_resumePrev:function(t){if(this._prevAnimPlayer){var e=this._prevAnimPlayer;"paused"!==e.playState&&delete this._prevAnimPlayer,t!==e&&(this._animPlayer=e,e.play())}}});var co="mousedown mouseup mouseover mouseout mouseenter mouseleave mousemove click dblclick contextmenu keypress touchstart touchmove touchend ";function uo(t,e,n,r,i){var o=1/Math.tan(e/2),a=1/(r-i);return t[0]=o/n,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=o,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=(i+r)*a,t[11]=-1,t[12]=0,t[13]=0,t[14]=2*i*r*a,t[15]=0,t}function lo(t,e,n){var r,i,o,a,s,c,u,l,h,f,d,p,m=n[0],g=n[1],v=n[2];return e===t?(t[12]=e[0]*m+e[4]*g+e[8]*v+e[12],t[13]=e[1]*m+e[5]*g+e[9]*v+e[13],t[14]=e[2]*m+e[6]*g+e[10]*v+e[14],t[15]=e[3]*m+e[7]*g+e[11]*v+e[15]):(r=e[0],i=e[1],o=e[2],a=e[3],s=e[4],c=e[5],u=e[6],l=e[7],h=e[8],f=e[9],d=e[10],p=e[11],t[0]=r,t[1]=i,t[2]=o,t[3]=a,t[4]=s,t[5]=c,t[6]=u,t[7]=l,t[8]=h,t[9]=f,t[10]=d,t[11]=p,t[12]=r*m+s*g+h*v+e[12],t[13]=i*m+c*g+f*v+e[13],t[14]=o*m+u*g+d*v+e[14],t[15]=a*m+l*g+p*v+e[15]),t}function ho(t,e,n){var r=n[0],i=n[1],o=n[2];return t[0]=e[0]*r,t[1]=e[1]*r,t[2]=e[2]*r,t[3]=e[3]*r,t[4]=e[4]*i,t[5]=e[5]*i,t[6]=e[6]*i,t[7]=e[7]*i,t[8]=e[8]*o,t[9]=e[9]*o,t[10]=e[10]*o,t[11]=e[11]*o,t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15],t}function fo(t,e,n){var r=e[0],i=e[1],o=e[2],a=e[3],s=e[4],c=e[5],u=e[6],l=e[7],h=e[8],f=e[9],d=e[10],p=e[11],m=e[12],g=e[13],v=e[14],y=e[15],_=n[0],b=n[1],x=n[2],w=n[3];return t[0]=_*r+b*s+x*h+w*m,t[1]=_*i+b*c+x*f+w*g,t[2]=_*o+b*u+x*d+w*v,t[3]=_*a+b*l+x*p+w*y,_=n[4],b=n[5],x=n[6],w=n[7],t[4]=_*r+b*s+x*h+w*m,t[5]=_*i+b*c+x*f+w*g,t[6]=_*o+b*u+x*d+w*v,t[7]=_*a+b*l+x*p+w*y,_=n[8],b=n[9],x=n[10],w=n[11],t[8]=_*r+b*s+x*h+w*m,t[9]=_*i+b*c+x*f+w*g,t[10]=_*o+b*u+x*d+w*v,t[11]=_*a+b*l+x*p+w*y,_=n[12],b=n[13],x=n[14],w=n[15],t[12]=_*r+b*s+x*h+w*m,t[13]=_*i+b*c+x*f+w*g,t[14]=_*o+b*u+x*d+w*v,t[15]=_*a+b*l+x*p+w*y,t}function po(t,e){var n=e[0],r=e[1],i=e[2],o=e[3],a=e[4],s=e[5],c=e[6],u=e[7],l=e[8],h=e[9],f=e[10],d=e[11],p=e[12],m=e[13],g=e[14],v=e[15],y=n*s-r*a,_=n*c-i*a,b=n*u-o*a,x=r*c-i*s,w=r*u-o*s,M=i*u-o*c,S=l*m-h*p,A=l*g-f*p,E=l*v-d*p,C=h*g-f*m,T=h*v-d*m,I=f*v-d*g,P=y*I-_*T+b*C+x*E-w*A+M*S;return P?(P=1/P,t[0]=(s*I-c*T+u*C)*P,t[1]=(i*T-r*I-o*C)*P,t[2]=(m*M-g*w+v*x)*P,t[3]=(f*w-h*M-d*x)*P,t[4]=(c*E-a*I-u*A)*P,t[5]=(n*I-i*E+o*A)*P,t[6]=(g*b-p*M-v*_)*P,t[7]=(l*M-f*b+d*_)*P,t[8]=(a*T-s*E+u*S)*P,t[9]=(r*E-n*T-o*S)*P,t[10]=(p*w-m*b+v*y)*P,t[11]=(h*b-l*w-d*y)*P,t[12]=(s*A-a*C-c*S)*P,t[13]=(n*C-r*A+i*S)*P,t[14]=(m*_-p*x-g*y)*P,t[15]=(l*x-h*_+f*y)*P,t):null}function mo(t){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}function go(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t[8]=e[8],t[9]=e[9],t[10]=e[10],t[11]=e[11],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15],t}function vo(t,e,n,r){return t[0]=e,t[1]=n,t[2]=r,t}function yo(t,e,n){return t[0]=e[0]-n[0],t[1]=e[1]-n[1],t[2]=e[2]-n[2],t}function _o(t){var e=t[0],n=t[1],r=t[2];return Math.sqrt(e*e+n*n+r*r)}function bo(t,e){var n=e[0],r=e[1],i=e[2],o=n*n+r*r+i*i;return o>0&&(o=1/Math.sqrt(o),t[0]=e[0]*o,t[1]=e[1]*o,t[2]=e[2]*o),t}function xo(t,e,n){var r=e[0],i=e[1],o=e[2],a=n[0],s=n[1],c=n[2];return t[0]=i*c-o*s,t[1]=o*a-r*c,t[2]=r*s-i*a,t}function wo(t,e){var n=e[0]-t[0],r=e[1]-t[1],i=e[2]-t[2];return Math.hypot?Math.hypot(n,r,i):function(){for(var t=0,e=arguments.length;e--;)t+=arguments[e]*arguments[e];return Math.sqrt(t)}(n,r,i)}function Mo(t,e,n){var r=e[0],i=e[1],o=e[2],a=1/(n[3]*r+n[7]*i+n[11]*o+n[15]);return t[0]=(n[0]*r+n[4]*i+n[8]*o+n[12])*a,t[1]=(n[1]*r+n[5]*i+n[9]*o+n[13])*a,t[2]=(n[2]*r+n[6]*i+n[10]*o+n[14])*a,t}ii.include({_registerDomEvents:function(){Ue(this._panels.mapWrapper||this._containerDOM,co,this._handleDOMEvent,this)},_removeDomEvents:function(){Ne(this._panels.mapWrapper||this._containerDOM,co,this._handleDOMEvent)},_handleDOMEvent:function(t){var e=t.type;if("contextmenu"===e&&Ge(t),!this._ignoreEvent(t)){var n=!1;if("mousedown"===e||"touchstart"===e&&1===t.touches.length)this._mouseDownTime=f();else if("click"===e||"touchend"===e||"contextmenu"===e){if(!this._mouseDownTime)return;var r=this._mouseDownTime;if(delete this._mouseDownTime,f()-r>300){if("click"===e||"contextmenu"===e)return}else"touchend"===e&&(n=!0)}this._fireDOMEvent(this,t,e),n&&(this._clickTime&&f()-this._clickTime<=300?(delete this._clickTime,this._fireDOMEvent(this,t,"dblclick")):(this._clickTime=f(),this._fireDOMEvent(this,t,"click")))}},_ignoreEvent:function(t){if(!t||!this._panels.control)return!1;if(this._isEventOutMap(t))return!0;var e,n=t.srcElement||t.target;if(n)for(;n&&n!==this._containerDOM;){if(n.className&&n.className.indexOf&&(n.className.indexOf("maptalks-control")>=0||n.className.indexOf("maptalks-ui")>=0&&!e.eventsPropagation))return!0;e=n,n=n.parentNode}return!1},_isEventOutMap:function(t){if(this.getPitch()>this.options.maxVisualPitch){var e=Qe(this._getActualEvent(t),this._containerDOM);if(!this.getContainerExtent().contains(e))return!0}return!1},_parseEvent:function(t,e){if(!t)return null;var n={domEvent:t};if("keypress"!==e){var r=this._getActualEvent(t);if(r){var i=Qe(r,this._containerDOM);n=d(n,{coordinate:this.containerPointToCoord(i),containerPoint:i,viewPoint:this.containerPointToViewPoint(i),point2d:this._containerPointToPoint(i)})}}return n},_parseEventFromCoord:function(t){var e=this.coordToContainerPoint(t);return{coordinate:t,containerPoint:e,viewPoint:this.containerPointToViewPoint(e),point2d:this.coordToPoint(t)}},_getActualEvent:function(t){return t.touches&&t.touches.length>0?t.touches[0]:t.changedTouches&&t.changedTouches.length>0?t.changedTouches[0]:t},_fireDOMEvent:function(t,e,n){if(!this.isRemoved()){var r=this._parseEvent(e,n);this._fireEvent(n,r)}}}),ii.addOnLoadHook("_registerDomEvents"),ii.include({isFullScreen:function(){return!!(document.webkitIsFullScreen||document.mozFullScreen||document.msFullscreenElement||document.fullscreenElement)},requestFullScreen:function(t){return this._fireEvent("fullscreenstart"),this._requestFullScreen(t||this._containerDOM),this._fireEvent("fullscreenend"),this},cancelFullScreen:function(){return this._cancelFullScreen(),this._fireEvent("cancelfullscreen"),this},_requestFullScreen:function(t){if(t.requestFullscreen)t.requestFullscreen();else if(t.mozRequestFullScreen)t.mozRequestFullScreen();else if(t.webkitRequestFullScreen)t.webkitRequestFullScreen();else if(t.msRequestFullScreen)t.msRequestFullScreen();else{var e="fullscreen=1,status=no,resizable=yes,top=0,left=0,scrollbars=no,titlebar=no,menubar=no,location=no,toolbar=no,z-look=yes,width="+(screen.availWidth-8)+",height="+(screen.availHeight-45);null!==window.open(location.href,"_blank",e)&&(window.opener=null,window.close())}},_cancelFullScreen:function(){document.exitFullscreen?document.exitFullscreen():document.mozCancelFullScreen?document.mozCancelFullScreen():document.webkitCancelFullScreen?document.webkitCancelFullScreen():null!==window.open(location.href,"_blank","fullscreen=no,status=yes,resizable=yes,scrollbars=no,titlebar=no,menubar=yes,location=yes,toolbar=yes,z-look=yes")&&(window.opener=null,window.close())}}),ii.include({panTo:function(t,e,n){if(void 0===e&&(e={}),!t)return this;if(_(e)&&(n=e,e={}),t=new Ln(t),void 0===e.animation||e.animation){var r=this.getProjection().project(t);return this._panAnimation(r,e.duration,n)}return this.setCenter(t),this},_panTo:function(t,e){return void 0===e&&(e={}),void 0===e.animation||e.animation?this._panAnimation(t,e.duration):(this.onMoveStart(),this._setPrjCenter(t),this.onMoveEnd(this._parseEventFromCoord(this.getCenter())),this)},panBy:function(t,e,n){if(void 0===e&&(e={}),!t)return this;if(_(e)&&(n=e,e={}),t=new me(t),this.getContainerExtent().ymin>0&&t.y>30){var r=t.y;t.y=30,t.x=30*t.x/r,console.warn("offset is limited to panBy when pitch is above maxPitch")}if(this.onMoveStart(),void 0===e.animation||e.animation){t=t.multi(-1);var i=this._containerPointToPrj(new me(this.width/2+t.x,this.height/2+t.y));this._panAnimation(i,e.duration,n)}else this._offsetCenterByPixel(t),this.onMoveEnd(this._parseEventFromCoord(this.getCenter()));return this},_panAnimation:function(t,e,n){return this._animateTo({prjCenter:t},{duration:e||this.options.panAnimationDuration},n)}}),$r.fromJSON=function(t){if(Array.isArray(t)){for(var e=[],n=0,r=t.length;n<r;n++){var i=$r.fromJSON(t[n]);Array.isArray(t)?e=e.concat(i):e.push(i)}return e}return t&&!t.feature?ki.toGeometry(t):(t.subType?(o=$r.getJSONClass(t.subType).fromJSON(t),p(t.feature.id)||o.setId(t.feature.id)):(o=ki.toGeometry(t.feature),t.options&&o.config(t.options)),t.symbol&&o.setSymbol(t.symbol),t.infoWindow&&o.setInfoWindow(t.infoWindow),o);var o},ei.fromJSON=function(t){if(!t)return null;var e=t.type,n=ei.getJSONClass(e);if(!n||!n.fromJSON)throw new Error("unsupported layer type:"+e);return n.fromJSON(t)},ii.include({JSON_VERSION:"1.0",toJSON:function(t){t||(t={});var e={jsonVersion:this.JSON_VERSION,version:this.VERSION,extent:this.getExtent().toJSON()};e.options=this.config(),e.options.center=this.getCenter(),e.options.zoom=this.getZoom(),e.options.bearing=this.getBearing(),e.options.pitch=this.getPitch();var n=this.getBaseLayer();(p(t.baseLayer)||t.baseLayer)&&n&&(e.baseLayer=n.toJSON(t.baseLayer));var r={};t.clipExtent&&(!0===t.clipExtent?r.clipExtent=this.getExtent():r.clipExtent=t.clipExtent);var i=[];if(p(t.layers)||t.layers&&!Array.isArray(t.layers)){for(var o=this.getLayers(),a=0,s=o.length;a<s;a++)if(o[a].toJSON){var c=d({},v(t.layers)?t.layers:{},r);i.push(o[a].toJSON(c))}e.layers=i}else if(H(t.layers)){for(var u=t.layers,l=0;l<u.length;l++){var h=u[l],f=this.getLayer(h.id);if(f.toJSON){var m=d({},h.options,r);i.push(f.toJSON(m))}}e.layers=i}else e.layers=[];return e}}),ii.fromJSON=function(t,e,n){if(!t||!e)return null;n||(n={});var r=new ii(t,e.options);if(p(n.baseLayer)||n.baseLayer){var i=ei.fromJSON(e.baseLayer);i&&r.setBaseLayer(i)}if(p(n.layers)||n.layers){for(var o=[],a=e.layers,s=0;s<a.length;s++){var c=ei.fromJSON(a[s]);o.push(c)}r.addLayer(o)}return r},ii.include({computeLength:function(t,e){if(!this.getProjection())return null;var n=new Ln(t),r=new Ln(e);return n.equals(r)?0:this.getProjection().measureLength(n,r)},computeGeometryLength:function(t){return t._computeGeodesicLength(this.getProjection())},computeGeometryArea:function(t){return t._computeGeodesicArea(this.getProjection())},identify:function(t,e){if(!t)return this;var n=t.layers;if(!H(n))return this;for(var r=[],o=0,a=n.length;o<a;o++)y(n[o])?r.push(this.getLayer(n[o])):r.push(n[o]);for(var s=new Ln(t.coordinate),c=d({},t),u=[],l=r.length-1;l>=0&&!(t.count&&u.length>=t.count);l--){var h=r[l];if(h&&h.getMap()&&(t.includeInvisible||h.isVisible())&&(t.includeInternals||!(h.getId().indexOf(i)>=0))){var f=h.identify(s,c);f&&(Array.isArray(f)?k(u,f):u.push(f))}}return e.call(this,u),this}}),ii.include({_zoom:function(t,e){this.options.zoomable&&!this.isZooming()&&(e=this._checkZoomOrigin(e),t=this._checkZoom(t),this.onZoomStart(t,e),this._frameZoom=this.getZoom(),this.onZoomEnd(t,e))},_zoomAnimation:function(t,e,n){this.options.zoomable&&!this.isZooming()&&(t=this._checkZoom(t),this.getZoom()!==t&&(e=this._checkZoomOrigin(e),this._startZoomAnim(t,e,n)))},_checkZoomOrigin:function(t){return t&&!this.options.zoomInCenter||(t=new me(this.width/2,this.height/2)),this.options.zoomOrigin&&(t=new me(this.options.zoomOrigin)),t},_startZoomAnim:function(t,e,n){p(n)&&(n=1);var r=this._getResolution(this._startZoomVal)/this._getResolution(t),i=this.options.zoomAnimationDuration*Math.abs(r-n)/Math.abs(r-1);this._frameZoom=this._startZoomVal,this._animateTo({zoom:t,around:e},{continueOnViewChanged:!0,duration:i})},onZoomStart:function(t,e){this.options.zoomable&&!this.isZooming()&&(this._mapAnimPlayer&&this._stopAnim(this._mapAnimPlayer),this._zooming=!0,this._startZoomVal=this.getZoom(),this._startZoomCoord=this._containerPointToPrj(e),this._fireEvent("zoomstart",{from:this._startZoomVal,to:t}))},onZooming:function(t,e,n){if(this.options.zoomable&&this._frameZoom!==t){p(n)&&(n=1),this._zoomTo(t,e);var r=this.getResolution(t),i=this.getResolution(this._startZoomVal)/r/n,o=this._prjToContainerPoint(this._startZoomCoord,this._startZoomVal),a=this.getViewPoint();if(!this.isRotating()&&!o.equals(e)&&1!==i){var s=this.getPitch(),c=o._sub(e)._multi(1/(1-i));s&&(c.y/=Math.cos(s*Math.PI/180)),e=e.add(c)}var u={view:[i,0,0,i,(e.x-a.x)*(1-i),(e.y-a.y)*(1-i)]},l=this.getDevicePixelRatio();1!==l&&(e=e.multi(l)),u.container=[i,0,0,i,e.x*(1-i),e.y*(1-i)],this._fireEvent("zooming",{from:this._startZoomVal,to:t,origin:e,matrix:u}),this._frameZoom=t}},onZoomEnd:function(t,e){if(this.options.zoomable){var n=this._startZoomVal;this._zoomTo(t,e),this._zooming=!1,this._getRenderer().onZoomEnd(),this._fireEvent("zoomend",{from:n,to:t}),this._verifyExtent(this._getPrjCenter())||this._panTo(this._prjMaxExtent.getCenter())}},_zoomTo:function(t,e){this._zoomLevel=t,this._calcMatrices(),e&&this._setPrjCoordAtContainerPoint(this._startZoomCoord,e)},_checkZoom:function(t){var e=this.getMaxZoom(),n=this.getMinZoom();return t<n&&(t=n),t>e&&(t=e),t}});var So=Math.PI/180,Ao=new Ln(0,0);function Eo(){return mo(new Array(16))}ii.include({getFov:function(){return this._fov||(this._fov=.6435011087932844),this._fov/So},setFov:function(t){if(this.isZooming())return this;if(t=Math.max(.01,Math.min(60,t)),this._fov===t)return this;var e=this.getFov();return this._fov=t*So,this._calcMatrices(),this._renderLayers(),this._fireEvent("fovchange",{from:e,to:this.getFov()}),this},getBearing:function(){return this._angle?-this._angle/So:0},setBearing:function(t){if(he.ie9)throw new Error("map can't rotate in IE9.");var e=-z(t,-180,180)*So;if(this._angle===e)return this;var n=this.getBearing();return this._fireEvent("rotatestart",{from:n,to:e}),this._angle=e,this._calcMatrices(),this._renderLayers(),this._fireEvent("rotate",{from:n,to:e}),this._fireEvent("rotateend",{from:n,to:e}),this},getPitch:function(){return this._pitch?this._pitch/Math.PI*180:0},setPitch:function(t){if(he.ie9)throw new Error("map can't tilt in IE9.");var e=G(t,0,this.options.maxPitch)*So;if(this._pitch===e)return this;var n=this.getPitch();return this._fireEvent("pitchstart",{from:n,to:e}),this._pitch=e,this._calcMatrices(),this._renderLayers(),this._fireEvent("pitch",{from:n,to:e}),this._fireEvent("pitchend",{from:n,to:e}),this},isTransforming:function(){return!(!this._pitch&&!this._angle)},getFrustumAltitude:function(){return this._frustumAltitude},_calcFrustumAltitude:function(){var t=90-this.getPitch(),e=this.getFov()/2,n=this.cameraPosition?this.cameraPosition[2]:0;if(e<=t)return n;e=Math.PI*e/180;var r=new me(this.cameraPosition).distanceTo(new me(this.cameraLookAt)),i=n*Math.tan(2*e);return n+Math.tan(e)*(r+i)},_pointToContainerPoint:function(){var t=[0,0,0];return function(e,n,r,i){if(void 0===r&&(r=0),e=this._pointToPoint(e,n,i),this.isTransforming()||r){r*=this._getResolution(n)/this._getResolution();var o=this._glScale;vo(t,e.x*o,e.y*o,r*o);var a=this._projIfBehindCamera(t,this.cameraPosition,this.cameraForward);Mo(a,a,this.projViewMatrix);var s=this.width/2,c=this.height/2;return a[0]=a[0]*s+s,a[1]=-a[1]*c+c,i?(i.x=a[0],i.y=a[1],i):new me(a[0],a[1])}var u=this._prjToPoint(this._getPrjCenter(),void 0,Ao);return i?(i.x=e.x,i.y=e.y):i=e,i._sub(u.x,u.y),i.set(i.x,-i.y),i._add(this.width/2,this.height/2)}}(),_projIfBehindCamera:function(){var t=new Array(3),e=new Array(3),n=new Array(3);return function(r,i,o){yo(t,r,i);var a=function(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]}(o,t);return a<=0&&(function(t,e,n){t[0]=e[0]*n,t[1]=e[1]*n,t[2]=e[2]*n}(e,o,1.01*a),function(t,e,n){t[0]=e[0]+n[0],t[1]=e[1]+n[1],t[2]=e[2]+n[2]}(r,i,yo(n,t,e))),r}}(),_containerPointToPoint:function(){var t=[0,0,0],e=[0,0,0,1],n=[0,0,0,1];return function(r,i,o){if(this.isTransforming()){var a=this.width/2||1,s=this.height/2||1;vo(t,(r.x-a)/a,(s-r.y)/s,0),vo(e,t[0],t[1],0),vo(n,t[0],t[1],1),e[3]=n[3]=1,Mo(e,e,this.projViewMatrixInverse),Mo(n,n,this.projViewMatrixInverse);var c=e[0],u=n[0],l=e[1],h=n[1],f=e[2],d=n[2],p=f===d?0:(0-f)/(d-f),m=N(c,u,p),g=N(l,h,p);return o?(o.x=m,o.y=g):o=new me(m,g),o._multi(1/this._glScale),void 0===i||this.getZoom()===i?o:this._pointToPointAtZoom(o,i,o)}var v=this._prjToPoint(this._getPrjCenter(),i,o),y=void 0!==i?this._getResolution()/this._getResolution(i):1,_=y*(r.x-this.width/2),b=y*(r.y-this.height/2);return v._add(_,-b)}}(),_calcMatrices:function(){var t=Eo();return function(){delete this._mapRes,delete this._mapGlRes,delete this._mapExtent2D,delete this._mapGlExtent2D;var e=this.getSize(),n=e.width||1,r=e.height||1;this._glScale=this.getGLScale();var i=this.getPitch()*Math.PI/180,o=this._getCameraWorldMatrix(),a=this.getFov()*Math.PI/180,s=this._getCameraFar(a,this.getPitch());this.cameraFar=s,this.cameraNear=Math.max(this._glScale*this.getResolution(this.getGLZoom())*Math.cos(i),.1);var c=this.projMatrix||Eo();uo(c,a,n/r,this.cameraNear,s),this.projMatrix=c,this.viewMatrix=po(this.viewMatrix||Eo(),o),this.projViewMatrix=fo(this.projViewMatrix||Eo(),c,this.viewMatrix),this._calcCascadeMatrixes(),this.projViewMatrixInverse=fo(this.projViewMatrixInverse||Eo(),o,po(t,c)),this.domCssMatrix=this._calcDomMatrix(),this._frustumAltitude=this._calcFrustumAltitude(),this._mapRes=this._getResolution(),this._mapGlRes=this._getResolution(this.getGLZoom()),this._mapExtent2D=this._get2DExtent(),this._mapGlExtent2D=this._get2DExtent(this.getGLZoom())}}(),_getCameraFar:function(t,e){var n=this.cameraCenterDistance=wo(this.cameraPosition,this.cameraLookAt),r=n;if(e>0){var i;if(e=e*Math.PI/180,2/Math.PI-e<=t/2)i=4*n;else{var o=Math.tan(t/2);i=n*o/(1/Math.tan(e)-o)}r+=i}return r+1},_calcCascadeMatrixes:function(){var t=Eo();function e(e,n,r){var i=this.width,o=this.height,a=this.getFov()*Math.PI/180,s=this._getCameraFar(a,n),c=this.cameraCenterDistance;s=c+(s-c)/Math.cos((90-n)*Math.PI/180)*Math.cos((90-e)*Math.PI/180),uo(t,a,i/o,.1,s);var u=this.viewMatrix;return fo(r,t,u)}return function(){var t=this.getPitch(),n=this.options.cascadePitches[0],r=this.options.cascadePitches[1],i=this.cascadeFrustumMatrix0=this.cascadeFrustumMatrix0||Eo(),o=this.cascadeFrustumMatrix1=this.cascadeFrustumMatrix1||Eo();t>n?e.call(this,t,n,i):go(this.cascadeFrustumMatrix0,this.projViewMatrix),t>r?e.call(this,t,r,o):go(this.cascadeFrustumMatrix1,this.cascadeFrustumMatrix0)}}(),_calcDomMatrix:function(){var t=Eo(),e=Eo(),n=[1,-1,1],r=[0,0,0];return function(){var i=this.width||1,o=this.height||1,a=.5/Math.tan(this._fov/2)*o;return ho(t,this.projMatrix,n),lo(t,t,vo(r,0,0,-a)),this._pitch&&function(t,e,n){var r=Math.sin(n),i=Math.cos(n),o=e[4],a=e[5],s=e[6],c=e[7],u=e[8],l=e[9],h=e[10],f=e[11];e!==t&&(t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]),t[4]=o*i+u*r,t[5]=a*i+l*r,t[6]=s*i+h*r,t[7]=c*i+f*r,t[8]=u*i-o*r,t[9]=l*i-a*r,t[10]=h*i-s*r,t[11]=f*i-c*r}(t,t,this._pitch),this._angle&&function(t,e,n){var r=Math.sin(n),i=Math.cos(n),o=e[0],a=e[1],s=e[2],c=e[3],u=e[4],l=e[5],h=e[6],f=e[7];e!==t&&(t[8]=e[8],t[9]=e[9],t[10]=e[10],t[11]=e[11],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]),t[0]=o*i+u*r,t[1]=a*i+l*r,t[2]=s*i+h*r,t[3]=c*i+f*r,t[4]=u*i-o*r,t[5]=l*i-a*r,t[6]=h*i-s*r,t[7]=f*i-c*r}(t,t,this._angle),mo(e),ho(e,e,vo(r,i/2,-o/2,1)),fo(this.domCssMatrix||Eo(),e,t)}}(),_getCameraWorldMatrix:function(){var t={};return function(){var e=this.getGLZoom(),n=this.getSize(),r=this.getGLScale(),i=this._prjToPoint(this._prjCenter,e);this.cameraLookAt=vo(this.cameraLookAt||[0,0,0],i.x,i.y,0);var o=this.getPitch()*So,a=this.getBearing()*So,s=this._getFovRatio(),c=r*(n.height||1)/2/s,u=c*Math.cos(o),l=Math.sin(o)*c,h=i.x-l*Math.sin(a),f=i.y-l*Math.cos(a);this.cameraPosition=vo(this.cameraPosition||[0,0,0],h,f,u);var d=l||1,p=this.cameraUp=vo(this.cameraUp||[0,0,0],Math.sin(a)*d,Math.cos(a)*d,0),m=this.cameraWorldMatrix=this.cameraWorldMatrix||Eo();!function(t,e,n,r){var i=[0,0,0],o=[0,0,0],a=[0,0,0];yo(a,e,n),0===_o(a)&&(a[2]=1),bo(a,a),xo(i,r,a),0===_o(a)&&(1===Math.abs(r[2])?a[0]+=1e-4:a[2]+=1e-4,bo(a,a),xo(i,r,a)),bo(i,i),xo(o,a,i),t[0]=i[0],t[4]=o[0],t[8]=a[0],t[1]=i[1],t[5]=o[1],t[9]=a[1],t[2]=i[2],t[6]=o[2],t[10]=a[2]}(m,this.cameraPosition,this.cameraLookAt,p);var g=this.cameraForward||[0,0,0];return yo(g,this.cameraLookAt,this.cameraPosition),this.cameraForward=bo(g,g),function(t,e){var n,r=e[0],i=e[4],o=e[8],a=e[1],s=e[5],c=e[9],u=e[2],l=e[6],h=e[10],f=r+s+h;f>0?(n=.5/Math.sqrt(f+1),t.w=.25/n,t.x=(l-c)*n,t.y=(o-u)*n,t.z=(a-i)*n):r>s&&r>h?(n=2*Math.sqrt(1+r-s-h),t.w=(l-c)/n,t.x=.25*n,t.y=(i+a)/n,t.z=(o+u)/n):s>h?(n=2*Math.sqrt(1+s-r-h),t.w=(o-u)/n,t.x=(i+a)/n,t.y=.25*n,t.z=(c+l)/n):(n=2*Math.sqrt(1+h-r-s),t.w=(a-i)/n,t.x=(o+u)/n,t.y=(c+l)/n,t.z=.25*n)}(t,m),function(t,e){var n=t,r=e.x,i=e.y,o=e.z,a=e.w,s=r+r,c=i+i,u=o+o,l=r*s,h=r*c,f=r*u,d=i*c,p=i*u,m=o*u,g=a*s,v=a*c,y=a*u;n[0]=1-(d+m),n[4]=h-y,n[8]=f+v,n[1]=h+y,n[5]=1-(l+m),n[9]=p-g,n[2]=f-v,n[6]=p+g,n[10]=1-(l+d),n[3]=0,n[7]=0,n[11]=0,n[12]=0,n[13]=0,n[14]=0,n[15]=1}(m,t),function(t,e){var n=t;n[12]=e[0],n[13]=e[1],n[14]=e[2]}(m,this.cameraPosition),m}}(),_getFovRatio:function(){var t=this.getFov();return Math.tan(t/2*So)},_renderLayers:function(){this.isInteracting()||this._getLayers().forEach((function(t){if(t){var e=t._getRenderer();e&&e.setToRedraw&&e.setToRedraw()}}))}}),ii.include({_onViewChange:function(t){this._viewHistory||(this._viewHistory=[],this._viewHistoryPointer=0);for(var e=this._getCurrentView(),n=this._viewHistory.length-1;n>=0;n--)if($(t,this._viewHistory[n]))return this._viewHistoryPointer=n,void this._fireViewChange(e,t);this._viewHistoryPointer<this._viewHistory.length-1&&this._viewHistory.splice(this._viewHistoryPointer+1),this._viewHistory.push(t);var r=this.options.viewHistoryCount;r>0&&this._viewHistory.length>r&&this._viewHistory.splice(0,this._viewHistory.length-r),this._viewHistoryPointer=this._viewHistory.length-1,this._fireViewChange(e,t)},zoomToPreviousView:function(t){if(void 0===t&&(t={}),!this.hasPreviousView())return null;var e=this._viewHistory[--this._viewHistoryPointer];return this._zoomToView(e,t),e},hasPreviousView:function(){return!(!this._viewHistory||0===this._viewHistoryPointer)},zoomToNextView:function(t){if(void 0===t&&(t={}),!this.hasNextView())return null;var e=this._viewHistory[++this._viewHistoryPointer];return this._zoomToView(e,t),e},hasNextView:function(){return!(!this._viewHistory||this._viewHistoryPointer===this._viewHistory.length-1)},_zoomToView:function(t,e){var n=this,r=this.getView();e.animation?this._animateTo(t,{duration:e.duration},(function(e){"finished"===e.state.playState&&n._fireViewChange(r,t)})):(this.setView(t),this._fireViewChange(r,t))},getViewHistory:function(){return this._viewHistory},_fireViewChange:function(t,e){this._fireEvent("viewchange",{old:t,new:e})},_getCurrentView:function(){return this._viewHistory?this._viewHistory[this._viewHistoryPointer]:null}}),ii.mergeOptions({viewHistory:!0,viewHistoryCount:10});var Co=function(t){function e(e){var n;return(n=t.call(this,e)||this).on("enable",n._afterEnable,de(de(n))).on("disable",n._afterDisable,de(de(n))),n._measureLayers=[],n}fe(e,t);var n=e.prototype;return n.clear=function(){if(H(this._measureLayers))for(var t=0;t<this._measureLayers.length;t++)this._measureLayers[t].remove();return delete this._lastMeasure,delete this._lastVertex,this._measureLayers=[],this},n.getMeasureLayers=function(){return this._measureLayers},n.getLastMeasure=function(){return this._lastMeasure?this._lastMeasure:0},n.undo=function(){t.prototype.undo.call(this);var e=this._historyPointer;if(e!==this._vertexes.length)for(var n=e;n<this._vertexes.length;n++)this._vertexes[n].label&&this._vertexes[n].label.remove(),this._vertexes[n].marker.remove();return this},n.redo=function(){t.prototype.redo.call(this);var e=this._historyPointer-1;return this._vertexes[e]&&(this._vertexes[e].marker.getLayer()||(this._vertexes[e].label&&this._vertexes[e].label.addTo(this._measureMarkerLayer),this._vertexes[e].marker.addTo(this._measureMarkerLayer))),this},n._measure=function(t){var e,n,r=this.getMap();t instanceof $r?e=r.computeGeometryLength(t):Array.isArray(t)&&(e=r.getProjection().measureLength(t)),this._lastMeasure=e,n="zh-CN"===this.options.language?[" 米"," 公里"," 英尺"," 英里"]:[" m"," km"," feet"," mile"];var i="";return this.options.metric&&(i+=e<1e3?e.toFixed(0)+n[0]:(e/1e3).toFixed(2)+n[1]),this.options.imperial&&(e*=3.2808399,i.length>0&&(i+="\n"),i+=e<5280?e.toFixed(0)+n[2]:(e/5280).toFixed(2)+n[3]),i},n._registerMeasureEvents=function(){this.on("drawstart",this._msOnDrawStart,this).on("drawvertex",this._msOnDrawVertex,this).on("mousemove",this._msOnMouseMove,this).on("drawend",this._msOnDrawEnd,this)},n._afterEnable=function(){this._registerMeasureEvents()},n._afterDisable=function(){this.off("drawstart",this._msOnDrawStart,this).off("drawvertex",this._msOnDrawVertex,this).off("mousemove",this._msOnMouseMove,this).off("drawend",this._msOnDrawEnd,this)},n._msOnDrawStart=function(t){var e=this.getMap(),n=e._pointToPrj(t.point2d),r=L(),i="distancetool_"+r,o="distancetool_markers_"+r;e.getLayer(i)?(this._measureLineLayer=e.getLayer(i),this._measureMarkerLayer=e.getLayer(o)):(this._measureLineLayer=new eo(i).addTo(e),this._measureMarkerLayer=new eo(o).addTo(e)),this._measureLayers.push(this._measureLineLayer),this._measureLayers.push(this._measureMarkerLayer);var a=new Mi(t.coordinate,{symbol:this.options.vertexSymbol});a._setPrjCoordinates(n);var s="zh-CN"===this.options.language?"起点":"start",c=new Qi(s,t.coordinate,this.options.labelOptions);c._setPrjCoordinates(n),this._lastVertex=c,this._addVertexMarker(a,c)},n._msOnMouseMove=function(t){var e=this._measure(this._msGetCoordsToMeasure(t));if(!this._tailMarker){var n=Bt(this.options.vertexSymbol);n.markerWidth/=2,n.markerHeight/=2,this._tailMarker=new Mi(t.coordinate,{symbol:n}).addTo(this._measureMarkerLayer),this._tailLabel=new Qi(e,t.coordinate,this.options.labelOptions).addTo(this._measureMarkerLayer)}var r=this._geometry._getPrjCoordinates(),i=r[r.length-1];this._tailMarker.setCoordinates(t.coordinate),this._tailMarker._setPrjCoordinates(i),this._tailLabel.setContent(e),this._tailLabel.setCoordinates(t.coordinate),this._tailLabel._setPrjCoordinates(i)},n._msGetCoordsToMeasure=function(t){return t.geometry.getCoordinates().concat([t.coordinate])},n._msOnDrawVertex=function(t){var e=this._geometry._getPrjCoordinates(),n=e[e.length-1],r=t.geometry,i=new Mi(t.coordinate,{symbol:this.options.vertexSymbol}),o=this._measure(r),a=new Qi(o,t.coordinate,this.options.labelOptions);this._addVertexMarker(i,a),a._setPrjCoordinates(n),i._setPrjCoordinates(n),this._lastVertex=a},n._addVertexMarker=function(t,e){this._vertexes||(this._vertexes=[]),this._vertexes.push({label:e,marker:t}),void 0!==this._historyPointer&&(this._vertexes.length=this._historyPointer),this._measureMarkerLayer.addGeometry(t),e&&this._measureMarkerLayer.addGeometry(e)},n._msOnDrawEnd=function(t){this._clearTailMarker();var e=this._lastVertex.getSize();e||(e=new ge(10,10)),this._addClearMarker(this._lastVertex.getCoordinates(),this._lastVertex._getPrjCoordinates(),e.width);var n=t.geometry.copy();n._setPrjCoordinates(t.geometry._getPrjCoordinates()),n.addTo(this._measureLineLayer),this._lastMeasure=n.getLength()},n._addClearMarker=function(t,e,n){var r=this.options.clearButtonSymbol,i={markerDx:(r.markerDx||0)+n,textDx:(r.textDx||0)+n};Array.isArray(r)&&(i=r.map((function(t){return t?{markerDx:(t.markerDx||0)+n,textDx:(t.textDx||0)+n}:null}))),r=Bt(r,i);var o=new Mi(t,{symbol:r}),a=this._measureLineLayer,s=this._measureMarkerLayer;o.on("click",(function(){return a.remove(),s.remove(),!1}),this),o.addTo(this._measureMarkerLayer),o._setPrjCoordinates(e)},n._clearTailMarker=function(){this._tailMarker&&(this._tailMarker.remove(),delete this._tailMarker),this._tailLabel&&(this._tailLabel.remove(),delete this._tailLabel)},e}(oo);Co.mergeOptions({mode:"LineString",language:"zh-CN",metric:!0,imperial:!1,symbol:{lineColor:"#000",lineWidth:3,lineOpacity:1},vertexSymbol:{markerType:"ellipse",markerFill:"#fff",markerLineColor:"#000",markerLineWidth:3,markerWidth:11,markerHeight:11},labelOptions:{textSymbol:{textFaceName:"monospace",textLineSpacing:1,textHorizontalAlignment:"right",textDx:15},boxStyle:{padding:[6,2],symbol:{markerType:"square",markerFill:"#fff",markerFillOpacity:.9,markerLineColor:"#b4b3b3"}}},clearButtonSymbol:[{markerType:"square",markerFill:"#fff",markerLineColor:"#b4b3b3",markerLineWidth:2,markerWidth:15,markerHeight:15,markerDx:20},{markerType:"x",markerWidth:10,markerHeight:10,markerDx:20}]});var To=function(t){function e(e){var n;return(n=t.call(this,e)||this).on("enable",n._afterEnable,de(de(n))).on("disable",n._afterDisable,de(de(n))),n._measureLayers=[],n}fe(e,t);var n=e.prototype;return n._measure=function(t){var e,n,r=this.getMap();t instanceof $r?e=r.computeGeometryArea(t):Array.isArray(t)&&(e=r.getProjection().measureArea(t)),this._lastMeasure=e,n="zh-CN"===this.options.language?[" 平方米"," 平方公里"," 平方英尺"," 平方英里"]:[" sq.m"," sq.km"," sq.ft"," sq.mi"];var i="";if(this.options.metric&&(i+=e<1e6?e.toFixed(0)+n[0]:(e/1e6).toFixed(2)+n[1]),this.options.imperial){e*=3.2808399,i.length>0&&(i+="\n");var o=27878400;i+=e<o?e.toFixed(0)+n[2]:(e/o).toFixed(2)+n[3]}return i},n._msGetCoordsToMeasure=function(t){return t.geometry.getShell().concat([t.coordinate])},n._msOnDrawVertex=function(t){var e=this.getMap()._pointToPrj(t.point2d),n=new Mi(t.coordinate,{symbol:this.options.vertexSymbol});n._setPrjCoordinates(e),this._measure(t.geometry),this._lastVertex=n,this._addVertexMarker(n)},n._msOnDrawEnd=function(t){this._clearTailMarker();var e=this.getMap()._pointToPrj(t.point2d),n=this._measure(t.geometry),r=new Qi(n,t.coordinate,this.options.labelOptions).addTo(this._measureMarkerLayer);r._setPrjCoordinates(e);var i=r.getSize();i||(i=new ge(10,10)),this._addClearMarker(t.coordinate,e,i.width);var o=t.geometry.copy();o._setPrjCoordinates(t.geometry._getPrjCoordinates()),o.addTo(this._measureLineLayer),this._lastMeasure=o.getArea()},e}(Co);To.mergeOptions({mode:"Polygon",symbol:{lineColor:"#000000",lineWidth:2,lineOpacity:1,lineDasharray:"",polygonFill:"#ffffff",polygonOpacity:.5}});var Io={create:function(t,e){var n=t.unproject(e[0]),r=new Bi(n,0);return r._setPrjCoordinates(e[0]),r},update:function(t,e,n){var r=n.getMap(),i=Array.isArray(e)?e[e.length-1]:e,o=t.unproject(i),a=r.computeLength(n.getCenter(),o);n.setRadius(a)},generate:function(t){return t}};oo.registerMode("circle",d({clickLimit:2,action:["click","mousemove","click"]},Io)),oo.registerMode("freeHandCircle",d({action:["mousedown","mousemove","mouseup"]},Io));var Po={create:function(t,e){var n=t.unproject(e[0]),r=new Di(n,0,0);return r._setPrjCoordinates(e[0]),r},update:function(t,e,n){var r=n.getMap(),i=n.getCenter(),o=Array.isArray(e)?e[e.length-1]:e,a=t.unproject(o),s=r.computeLength(i,new Ln({x:a.x,y:i.y})),c=r.computeLength(i,new Ln({x:i.x,y:a.y}));n.setWidth(2*s),n.setHeight(2*c)},generate:function(t){return t}};oo.registerMode("ellipse",d({clickLimit:2,action:["click","mousemove","click"]},Po)),oo.registerMode("freeHandEllipse",d({action:["mousedown","mousemove","mouseup"]},Po));var Lo={create:function(t,e){var n=new xi([]);return n._firstClick=e[0],n},update:function(t,e,n,r){var i=n.getMap(),o=r.containerPoint,a=i._prjToContainerPoint(n._firstClick),s=[[a.x,a.y],[o.x,a.y],[o.x,o.y],[a.x,o.y]];n.setCoordinates(s.map((function(t){return i.containerPointToCoord(new me(t))}))),n._setPrjCoordinates(s.map((function(t){return i._containerPointToPrj(new me(t))})))},generate:function(t){return t}};oo.registerMode("rectangle",d({clickLimit:2,action:["click","mousemove","click"]},Lo)),oo.registerMode("freeHandRectangle",d({action:["mousedown","mousemove","mouseup"]},Lo)),oo.registerMode("point",{clickLimit:1,action:["click"],create:function(t,e){var n=t.unproject(e[0]),r=new Mi(n);return r._setPrjCoordinates(e[0]),r},generate:function(t){return t}});var Ro={create:function(t,e){var n=e.map((function(e){return t.unproject(e)})),r=new Ai(n);return r._setPrjCoordinates(e),r},update:function(t,e,n){var r,i=n.getSymbol();Array.isArray(e)?r=e:(r=n._getPrjCoordinates()).push(e);var o=r.map((function(e){return t.unproject(e)}));n.setCoordinates(o),n._setPrjCoordinates(r);var a=n.getLayer();if(a){var s=a.getGeometryById("polygon");if(!s&&r.length>=3){if(s=new xi([o],{id:"polygon"}),i){var c=Bt(i,{lineOpacity:0});s.setSymbol(c)}s.addTo(a)}s&&s._setPrjCoordinates(r)}},generate:function(t){var e=new xi(t.getCoordinates(),{symbol:t.getSymbol()});return e._setPrjCoordinates(t._getPrjCoordinates()),e._projCode=t._projCode,e}};oo.registerMode("polygon",d({action:["click","mousemove","dblclick"]},Ro)),oo.registerMode("freeHandPolygon",d({action:["mousedown","mousemove","mouseup"]},Ro));var Oo={create:function(t,e){var n=e.map((function(e){return t.unproject(e)})),r=new Ai(n);return r._setPrjCoordinates(e),r},update:function(t,e,n){var r;Array.isArray(e)?r=e:(r=n._getPrjCoordinates()).push(e);var i=r.map((function(e){return t.unproject(e)}));n.setCoordinates(i),n._setPrjCoordinates(r)},generate:function(t){return t}};function ko(t){for(var e=t.tileInfo,n=[e.cols,e.rows],r=[],i=e.lods,o=0,a=i.length;o<a;o++)r.push(i[o].resolution);var s=t.fullExtent,c=e.origin,u=[1,-1,c.x,c.y];return delete s.spatialReference,{spatialReference:{resolutions:r,fullExtent:s},tileSystem:u,tileSize:n}}function Bo(t,e){return void 0===e&&(e=[]),e.forEach((function(e){var n=e[0],r=e[1];t=t.replace(n,r)})),t}function Do(t,e,n){void 0===n&&(n={});var r,i,o=t[e],a=o.getElementsByTagName("TileMatrix"),s=[],c=[],u=[];if(!r){var l=o.getElementsByTagName("ows:SupportedCRS")[0];if(l){for(r=(r=l.textContent).split("EPSG")[1];r.indexOf(":")>-1;)r=r.replace(":","");r=function(t){var e=t.indexOf("EPSG")>-1?t:"EPSG:"+t;return e=Bo(e,[["4490","4326"],["102100","3857"],["900913","3857"]])}(r)}}i||(i=o.getElementsByTagName("ows:Identifier")[0])&&(i=i.textContent);var h=.0002645833333333333;n.isArcgis&&(h=28e-5),r&&r.indexOf("4326")>-1&&(h=2.3767925226029154e-9,n.isArcgis&&(h=2.518101729011901e-9));for(var f=1/0,d=0;d<a.length;d++){var p=a[d],m=p.getElementsByTagName("ows:Identifier")[0].textContent;m=parseInt(m),f=Math.min(f,m);var g=p.getElementsByTagName("ScaleDenominator")[0].textContent,v=p.getElementsByTagName("TopLeftCorner")[0].textContent,y=p.getElementsByTagName("TileWidth")[0].textContent,_=p.getElementsByTagName("TileHeight")[0].textContent;if(0===u.length&&u.push(parseInt(y),parseInt(_)),0===c.length){var b=v.split(" ").filter((function(t){return""!==t})).map((function(t){return parseFloat(t)})),x=b[0],w=b[1];x>0?c.push(1,-1,w,x):c.push(1,-1,x,w)}var M=parseFloat(g)*h;s.push(M)}if(f>0)for(var S=s[0],A=f-1;A>=0;A--)S*=2,s.splice(0,0,S);return{resolutions:s,tileSize:u,tileSystem:c,projection:r,TileMatrixSet:i}}oo.registerMode("linestring",d({action:["click","mousemove","dblclick"]},Oo)),oo.registerMode("freeHandLinestring",d({action:["mousedown","mousemove","mouseup"]},Oo)),oo.registerMode("arccurve",{action:["click","mousemove","dblclick"],create:function(t,e){var n=e.map((function(e){return t.unproject(e)})),r=new Ni(n);return r._setPrjCoordinates(e),r},update:Oo.update,generate:function(t){return t}}),oo.registerMode("quadbeziercurve",{action:["click","mousemove","dblclick"],create:function(t,e){var n=e.map((function(e){return t.unproject(e)})),r=new Gi(n);return r._setPrjCoordinates(e),r},update:Oo.update,generate:function(t){return t}}),oo.registerMode("cubicbeziercurve",{action:["click","mousemove","dblclick"],create:function(t,e){var n=e.map((function(e){return t.unproject(e)})),r=new zi(n);return r._setPrjCoordinates(e),r},update:Oo.update,generate:function(t){return t}}),oo.registerMode("boxZoom",{action:["mousedown","mousemove","mouseup"],create:function(t,e){e=e[0];var n=t.unproject(e),r=new Mi(n);return r._firstClick=e,r},update:function(t,e,n,r){var i=n.getMap(),o=i._prjToContainerPoint(n._firstClick),a=r.containerPoint;e=i._containerPointToPrj(new Ln(Math.min(o.x,a.x),Math.min(o.y,a.y)));var s=t.unproject(e);n.setCoordinates(s)._setPrjCoordinates(e),n.updateSymbol({markerWidth:Math.abs(o.x-a.x),markerHeight:Math.abs(o.y-a.y)})},generate:function(t){return t}}),Kr.loadArcgis=function(t,e,n){if(void 0===n&&(n={jsonp:!0}),y(t)&&"{"!==t.substring(0,1))sn.getJSON(t,(function(t,n){if(t)e(t);else{var r=ko(n);e(null,r)}}),n);else{y(t)&&(t=O(t));var r=ko(t);e(null,r)}return this},Kr.loadWMTS=function(t,e,n){return void 0===n&&(n={jsonp:!0}),y(t)&&sn.get(t,(function(r,i){if(r)e(r);else{var o=function(t,e,n){var r=(new DOMParser).parseFromString(t,"text/xml").querySelectorAll("Contents")[0];if(!r)return[];var i=r.getElementsByTagName("Layer");if(!i.length)return[];for(var o=[],a=0,s=r.childNodes.length;a<s;a++)"TileMatrixSet"===r.childNodes[a].nodeName&&o.push(r.childNodes[a]);if(!o.length)return[];for(var c=[],u=0,l=i.length;u<l;u++){var h=i[u],f=h.querySelectorAll("Style")[0];f&&(f=f.getElementsByTagName("ows:Identifier")[0])&&(f=f.textContent);var d=h.getElementsByTagName("ows:Identifier")[0];d&&(d=d.textContent);var p=h.querySelectorAll("ResourceURL")[0],m="";p&&(m=p.attributes.template.value);var g=Do(o,u,n),v=g.resolutions,y=g.tileSize,_=g.tileSystem,b=g.projection,x=g.TileMatrixSet;m.length||(m=e.substr(0,e.lastIndexOf("?")),m+="?SERVICE=WMTS&REQUEST=GetTile&VERSION=1.0.0&LAYER={LAYER}&STYLE={Style}&TILEMATRIXSET={TileMatrixSet}&FORMAT=tiles&TILEMATRIX={TileMatrix}&TILEROW={TileRow}&TILECOL={TileCol}");var w=Bo(m,[["{LAYER}",d],["{Layer}",d],["{layer}",d],["{STYLE}",f],["{Style}",f],["{style}",f],["{TileMatrixSet}",x],["{TileMatrix}","{z}"],["{TileRow}","{y}"],["{TileCol}","{x}"]]);c.push({tileSize:y,tileSystem:_,spatialReference:{resolutions:v,projection:b},urlTemplate:w,info:{layerName:d,TileMatrixSet:x,style:f,tileSize:y,tileSystem:_,resolutions:v,projection:b,urlTemplate:w}})}return c}(i,t,n);e(null,o)}}),n),this};var Fo=function(t){function e(e){return t.call(this,e)||this}fe(e,t);var n=e.prototype;return n.addTo=function(t){return this._owner=t,this._switchEvents("on"),this.onAdd&&this.onAdd(),this.fire("add"),this},n.getMap=function(){return this._owner?this._owner.getBaseLayer?this._owner:this._owner.getMap():null},n.show=function(t){var e=this.getMap();if(!e)return this;this._mapEventsOn||this._switchMapEvents("on"),t=t||this._coordinate||this._owner.getCenter();var n=this.isVisible();this.fire("showstart");var r=this._getUIContainer();this._coordinate=t,this._removePrevDOM();var i=this.__uiDOM=this.buildOn(e);if(i.eventsPropagation=this.options.eventsPropagation,!i)return this.fire("showend"),this;this._measureSize(i),this._singleton()&&(e[this._uiDomKey()]=i),this._setPosition(),i.style[ke]=null,r.appendChild(i);var o=this._getAnimation();if(n&&(o.ok=!1),o.ok&&(o.fade&&(i.style.opacity=0),o.scale)){if(this.getTransformOrigin){var a=this.getTransformOrigin();i.style[Oe]=a}i.style[Re]=this._toCSSTranslate(this._pos)+" scale(0)"}i.style.display="",this.options.eventsToStop&&rn(i,this.options.eventsToStop,He),this.options.autoPan&&this._autoPan();var s=o.transition;return o.ok&&s&&(i.offsetHeight,s&&(i.style[ke]=s),o.fade&&(i.style.opacity=1),o.scale&&(i.style[Re]=this._toCSSTranslate(this._pos)+" scale(1)")),this.fire("showend"),this},n.hide=function(){var t=this;if(!this.getDOM()||!this.getMap())return this;var e=this._getAnimation(),n=this.getDOM();return this.options.animationOnHide||(e.ok=!1),e.ok?(n.offsetHeight,n.style[ke]=e.transition,setTimeout((function(){n.style.display="none",t.fire("hide")}),this.options.animationDuration)):(n.style.display="none",this.fire("hide")),e.fade&&(n.style.opacity=0),e.scale&&(n.style[Re]=this._toCSSTranslate(this._pos)+" scale(0)"),this},n.isVisible=function(){var t=this.getDOM();return this.getMap()&&t&&t.parentNode&&"none"!==t.style.display},n.remove=function(){return delete this._mapEventsOn,this._owner?(this.hide(),this._switchEvents("off"),this.onRemove&&this.onRemove(),!this._singleton()&&this.__uiDOM&&this._removePrevDOM(),delete this._owner,this.fire("remove"),this):this},n.getSize=function(){return this._size?this._size.copy():null},n.getOwner=function(){return this._owner},n.getDOM=function(){return this.__uiDOM},n.getPosition=function(){if(!this.getMap())return null;var t=this._getViewPoint()._round();if(this.getOffset){var e=this.getOffset()._round();e&&t._add(e)}return t},n._getAnimation=function(){for(var t={fade:!1,scale:!1},e=this.options.animation?this.options.animation.split(","):[],n=0;n<e.length;n++){var r=ve(e[n]);"fade"===r?t.fade=!0:"scale"===r&&(t.scale=!0)}var i=null;return t.fade&&(i="opacity "+this.options.animationDuration+"ms"),t.scale&&(i=i?i+",":"",i+=Re+" "+this.options.animationDuration+"ms"),t.transition=i,t.ok=null!==i,t},n._getViewPoint=function(){var t=0;if(this._owner&&this._owner.getAltitude){var e=this._owner.getAltitude();e>0&&(t=this._meterToPoint(this._coordinate,e))}return this.getMap().coordToViewPoint(this._coordinate,void 0,t)._add(this.options.dx,this.options.dy)},n._meterToPoint=function(t,e){return this.getMap().distanceToPoint(e,0,void 0,t).x*j(e)},n._autoPan=function(){var t=this.getMap(),e=this.getDOM();if(!t.isMoving()){var n=this._pos,r=t.getSize(),i=r.width,o=r.height,a=t.viewPointToContainerPoint(n),s=parseInt(e.clientWidth),c=parseInt(e.clientHeight),u=0,l=0;a.x<0?u=-(a.x-s/2):a.x+s-35>i&&(u=i-(a.x+3*s/2)),a.y-c<0?l=50-(a.y-c):a.y>o&&(l=o-a.y-c-30),0===l&&0===u||t.panBy(new me(u,l),{duration:this.options.autoPanDuration})}},n._measureSize=function(t){var e=this._getUIContainer();t.style.position="absolute",t.style.left="-99999px";var n=t.style.bottom?"bottom":"top";return t.style[n]="-99999px",t.style.display="",e.appendChild(t),this._size=new ge(t.clientWidth,t.clientHeight),t.style.display="none",t.style.left="0px",t.style[n]="0px",this._size},n._removePrevDOM=function(){this.onDomRemove&&this.onDomRemove();var t=this.options.eventsToStop;if(this._singleton()){var e=this.getMap(),n=this._uiDomKey();e[n]&&(t&&on(e[n],t,He),je(e[n]),delete e[n]),delete this.__uiDOM}else this.__uiDOM&&(t&&on(this.__uiDOM,t,He),je(this.__uiDOM),delete this.__uiDOM)},n._uiDomKey=function(){return"__ui_"+this._getClassName()},n._singleton=function(){return this.options.single},n._getUIContainer=function(){return this.getMap()._panels.ui},n._getClassName=function(){return"UIComponent"},n._switchMapEvents=function(t){var e=this.getMap();if(e){this._mapEventsOn="on"===t;var n=this._getDefaultEvents();if(this.getEvents&&d(n,this.getEvents()),n)for(var r in n)n.hasOwnProperty(r)&&e[t](r,n[r],this)}},n._switchEvents=function(t){this._switchMapEvents(t);var e=this._getOwnerEvents();if(this._owner)for(var n in e)e.hasOwnProperty(n)&&this._owner[t](n,e[n],this)},n._getDefaultEvents=function(){return{"zooming rotate pitch":this.onEvent,zoomend:this.onZoomEnd,moving:this.onMoving,resize:this.onResize}},n._getOwnerEvents=function(){var t={};return this._owner&&this._owner instanceof $r&&(t.positionchange=this.onGeometryPositionChange),this.getOwnerEvents&&d(t,this.getOwnerEvents()),t},n.onGeometryPositionChange=function(t){this._owner&&this.isVisible()&&this.show(t.target.getCenter())},n.onMoving=function(){this.isVisible()&&this.getMap().isTransforming()&&this._updatePosition()},n.onEvent=function(){this.isVisible()&&this._updatePosition()},n.onZoomEnd=function(){this.isVisible()&&this._setPosition()},n.onResize=function(){this.isVisible()&&this._setPosition()},n._updatePosition=function(){this.getMap()._getRenderer().callInNextFrame(this._setPosition.bind(this))},n._setPosition=function(){var t=this.getDOM();if(t){t.style[ke]=null;var e=this.getPosition();this._pos=e,t.style[Re]=this._toCSSTranslate(e)+" scale(1)"}},n._toCSSTranslate=function(t){if(!t)return"";if(he.any3d){var e=this.getMap(),n=e?e.getBearing():0,r=e?e.getPitch():0,i="";return this.options.pitchWithMap&&r&&(i+=" rotateX("+Math.round(r)+"deg)"),this.options.rotateWithMap&&n&&(i+=" rotateZ("+Math.round(-n)+"deg)"),"translate3d("+t.x+"px,"+t.y+"px, 0px)"+i}return"translate("+t.x+"px,"+t.y+"px)"},e.isSupport=function(t){return!!(t&&_(t.on)&&_(t.off)&&_(t.getCenter))},e}(bn(Mn));Fo.mergeOptions({eventsPropagation:!1,eventsToStop:null,dx:0,dy:0,autoPan:!1,autoPanDuration:600,single:!0,animation:"scale",animationOnHide:!0,animationDuration:500,pitchWithMap:!1,rotateWithMap:!1});var jo="mousedown mouseup mouseenter mouseover mouseout mousemove click dblclick contextmenu keypress touchstart touchmove touchend",Uo=function(t){function e(e,n){var r;return(r=t.call(this,n)||this)._markerCoord=new Ln(e),r}fe(e,t);var n=e.prototype;return n._getClassName=function(){return"UIMarker"},n.setCoordinates=function(t){return this._markerCoord=t,this.fire("positionchange"),this.isVisible()&&(this._coordinate=this._markerCoord,this._setPosition()),this},n.getCoordinates=function(){return this._markerCoord},n.setContent=function(t){var e=this.options.content;return this.options.content=t,this.fire("contentchange",{old:e,new:t}),this.isVisible()&&this.show(),this},n.getContent=function(){return this.options.content},n.onAdd=function(){this.show()},n.show=function(){return t.prototype.show.call(this,this._markerCoord)},n.flash=function(t,e,n,r){return et.call(this,t,e,n,r)},n.buildOn=function(){var t;return y(this.options.content)?(t=De("div")).innerHTML=this.options.content:t=this.options.content,this.options.containerClass&&(t.className=this.options.containerClass),this._registerDOMEvents(t),t},n.getOffset=function(){var t=this.getSize();return new me(-t.width/2,-t.height/2)},n.getTransformOrigin=function(){return"center center"},n.onDomRemove=function(){var t=this.getDOM();this._removeDOMEvents(t)},n.isDragging=function(){return!!this.draggable&&this.draggable.isDragging()},n._registerDOMEvents=function(t){rn(t,jo,this._onDomEvents,this)},n._onDomEvents=function(t){var e=this.getMap()._parseEvent(t,t.type);this.fire(t.type,e)},n._removeDOMEvents=function(t){on(t,jo,this._onDomEvents,this)},n._getConnectPoints=function(){var t=this.getMap(),e=t.coordToContainerPoint(this.getCoordinates()),n=this.getSize(),r=n.width,i=n.height;return[t.containerPointToCoordinate(e.add(-r/2,0)),t.containerPointToCoordinate(e.add(r/2,0)),t.containerPointToCoordinate(e.add(0,i/2)),t.containerPointToCoordinate(e.add(0,-i/2))]},e}(En(Fo));Uo.mergeOptions({containerClass:null,eventsPropagation:!0,draggable:!1,single:!1,content:null});var No=he.touch?"touchstart mousedown":"mousedown",zo=function(t){function e(e){return t.call(this,e)||this}fe(e,t);var n=e.prototype;return n.addHooks=function(){this.target.on(No,this._startDrag,this)},n.removeHooks=function(){this.target.off(No,this._startDrag,this)},n._startDrag=function(t){var e=t.domEvent;e.touches&&e.touches.length>1||2===e.button||this.isDragging()||(this.target.on("click",this._endDrag,this),this._lastCoord=t.coordinate,this._lastPoint=t.containerPoint,this._prepareDragHandler(),this._dragHandler.onMouseDown(t.domEvent),this.target.fire("dragstart",t))},n._prepareDragHandler=function(){this._dragHandler=new Pn(this.target.getDOM(),{cancelOn:this._cancelOn.bind(this),ignoreMouseleave:!0}),this._dragHandler.on("mousedown",this._onMouseDown,this),this._dragHandler.on("dragging",this._dragging,this),this._dragHandler.on("mouseup",this._endDrag,this),this._dragHandler.enable()},n._cancelOn=function(t){var e=(t.srcElement||t.target).tagName.toLowerCase();return"button"===e||"input"===e||"select"===e||"option"===e||"textarea"===e},n._onMouseDown=function(t){He(t.domEvent)},n._dragging=function(t){var e=this.target,n=e.getMap()._parseEvent(t.domEvent),r=n.domEvent;if(!(r.touches&&r.touches.length>1))if(this._isDragging){var i=n.coordinate,o=n.containerPoint;this._lastCoord||(this._lastCoord=i),this._lastPoint||(this._lastPoint=o);var a=i.sub(this._lastCoord),s=o.sub(this._lastPoint);this._lastCoord=i,this._lastPoint=o,this.target.setCoordinates(this.target.getCoordinates().add(a)),n.coordOffset=a,n.pointOffset=s,e.fire("dragging",n)}else this._isDragging=!0},n._endDrag=function(t){var e=this.target,n=e.getMap();if(this._dragHandler&&(e.off("click",this._endDrag,this),this._dragHandler.disable(),delete this._dragHandler),delete this._lastCoord,delete this._lastPoint,this._isDragging=!1,n){var r=n._parseEvent(t.domEvent);e.fire("dragend",r)}},n.isDragging=function(){return!!this._isDragging},e}(wn);Uo.addInitHook("addHandler","draggable",zo);var Go=function(t){function e(){return t.apply(this,arguments)||this}fe(e,t);var n=e.prototype;return n._getClassName=function(){return"InfoWindow"},n.addTo=function(e){return e instanceof $r&&(e.getInfoWindow()&&e.getInfoWindow()!==this&&e.removeInfoWindow(),e._infoWindow=this),t.prototype.addTo.call(this,e)},n.setContent=function(t){var e=this.options.content;return this.options.content=t,this.fire("contentchange",{old:e,new:t}),this.isVisible()&&this.show(this._coordinate),this},n.getContent=function(){return this.options.content},n.setTitle=function(t){var e=t;return this.options.title=t,this.fire("contentchange",{old:e,new:t}),this.isVisible()&&this.show(this._coordinate),this},n.getTitle=function(){return this.options.title},n.buildOn=function(){if(this.options.custom){if(y(this.options.content)){var t=De("div");return t.innerHTML=this.options.content,t}return this.options.content}var e=De("div");this.options.containerClass&&(e.className=this.options.containerClass),e.style.width=this._getWindowWidth()+"px",e.style.bottom="0px";var n='<em class="maptalks-ico"></em>';this.options.title&&(n+="<h2>"+this.options.title+"</h2>"),n+='<a href="javascript:void(0);" class="maptalks-close"></a><div class="maptalks-msgContent"></div>',e.innerHTML=n;var r=e.querySelector(".maptalks-msgContent");return y(this.options.content)?r.innerHTML=this.options.content:r.appendChild(this.options.content),this._onCloseBtnClick=this.hide.bind(this),Ue(e.querySelector(".maptalks-close"),"click touchend",this._onCloseBtnClick),e},n.getTransformOrigin=function(){return this.getSize().width/2+"px bottom"},n.getOffset=function(){var t=this.getSize(),e=new me(-t.width/2,0);this.options.custom?e._sub(0,t.height):e._sub(4,12);var n=this.getOwner();if(n instanceof Mi||n instanceof Ii){var r,i;if(n instanceof Mi)r=n._getPainter(),i=n.getSize();else{var o=n.getGeometries();if(!o||!o.length)return e;r=o[0]._getPainter(),i=o[0].getSize()}if(r){var a=r.getFixedExtent();e._add(a.xmax-i.width/2,a.ymin)}else e._add(0,-i.height)}return e},n.show=function(e){return this.getMap()&&this.getMap().options.enableInfoWindow?t.prototype.show.call(this,e):this},n.getEvents=function(){if(!this.options.autoCloseOn)return null;var t={};return t[this.options.autoCloseOn]=this.hide,t},n.getOwnerEvents=function(){var t=this.getOwner();if(!this.options.autoOpenOn||!t)return null;var e={};return e[this.options.autoOpenOn]=this._onAutoOpen,e},n.onRemove=function(){this.onDomRemove()},n.onDomRemove=function(){this._onCloseBtnClick&&(Ne(this.getDOM().childNodes[2],"click touchend",this._onCloseBtnClick),delete this._onCloseBtnClick)},n._onAutoOpen=function(t){var e=this,n=this.getOwner();setTimeout((function(){n instanceof Mi||n instanceof Fo?e.show(n.getCoordinates()):n instanceof Ii?e.show(n.findClosest(t.coordinate)):n instanceof Ai||n instanceof Li?(e.getMap().getScale()>=8&&(t.coordinate=e._rectifyMouseCoordinte(n,t.coordinate)),e.show(t.coordinate)):e.show(t.coordinate)}),1)},n._rectifyMouseCoordinte=function(t,e){var n=this;return t instanceof Ai?this._rectifyLineStringMouseCoordinate(t,e).coordinate:t instanceof Li?t.getGeometries().map((function(t){return n._rectifyLineStringMouseCoordinate(t,e)})).sort((function(t,e){return t.dis-e.dis}))[0].coordinate:e},n._rectifyLineStringMouseCoordinate=function(t,e){for(var n=this,r=t.getCoordinates().map((function(t){return n.getMap().coordToContainerPoint(t)})),i=this.getMap().coordToContainerPoint(e),o=1/0,a=-1,s=0,c=r.length;s<c;s++){var u=r[s],l=i.distanceTo(u);l<o&&(o=l,a=s)}var h=[];0===a?h.push(r[0],r[1]):a===r.length-1?h.push(r[a-1],r[a]):h.push(r[a-1],r[a],r[a+1]);for(var f=[],d=this.getMap().getSize(),p=d.width,m=d.height,g=0,v=h.length-1;g<v;g++){var y=h[g],_=h[g+1];if(y.x===_.x)for(var b=Math.max(0,Math.min(y.y,_.y)),x=Math.min(m,Math.max(y.y,_.y)),w=b;w<=x;w++)f.push(new me(y.x,w));else for(var M=(_.y-y.y)/(_.x-y.x),S=Math.max(0,Math.min(y.x,_.x)),A=Math.min(p,Math.max(y.x,_.x)),E=S;E<=A;E++){var C=M*(E-y.x)+y.y;f.push(new me(E,C))}}for(var T=1/0,I=-1,P=0,L=f.length;P<L;P++){var R=f[P],O=i.distanceTo(R);O<T&&(T=O,I=P)}return{dis:T,coordinate:I<0?e:this.getMap().containerPointToCoord(f[I])}},n._getWindowWidth=function(){var t=this.options.width;return t||(t=300),t},e}(Fo);Go.mergeOptions({containerClass:"maptalks-msgBox",autoPan:!0,autoCloseOn:null,autoOpenOn:"click",width:300,minHeight:120,custom:!1,title:null,content:null});var Ho=function(t){fe(n,t);var e=n.prototype;function n(e,n){var r;return void 0===n&&(n={}),(r=t.call(this,n)||this)._content=e,r}return e._getClassName=function(){return"ToolTip"},e.addTo=function(e){if(n.isSupport(e))return e.on("mousemove",this.onMouseMove,this),e.on("mouseout",this.onMouseOut,this),t.prototype.addTo.call(this,e);throw new Error("Invalid geometry or UIMarker the tooltip is added to.")},e.setStyle=function(t){return this.options.containerClass=t,this},e.getStyle=function(){return this.options.containerClass},e.getContent=function(){return this._content},e.buildOn=function(){var t=De("div"),e=this.options||{};e.height&&(t.style.height=e.height+"px"),e.width&&(t.style.width=e.width+"px");var n=e.containerClass||e.cssName;return!n&&e.height&&(t.style.lineHeight=e.height+"px"),t.innerHTML='<div class="'+n+'">'+this._content+"</div>",t},e.onMouseOut=function(){clearTimeout(this._timeout),this.isVisible()&&this._removePrevDOM()},e.onMouseMove=function(t){var e=this;clearTimeout(this._timeout);var n=this.getMap();if(n){var r=n.locateByPoint(t.coordinate,-5,25);0===this.options.showTimeout?this.show(r):this._timeout=setTimeout((function(){n&&e.show(r)}),this.options.showTimeout)}},e.onRemove=function(){clearTimeout(this._timeout),this._owner&&(this._owner.off("mouseover",this.onMouseOver,this),this._owner.off("mouseout",this.onMouseOut,this))},e._getViewPoint=function(){return this.getMap().coordToViewPoint(this._coordinate,void 0,0)._add(this.options.dx,this.options.dy)},n}(Fo);Ho.mergeOptions({width:0,height:0,animation:"fade",containerClass:"maptalks-tooltip",showTimeout:400});var Wo=function(t){function e(e){return t.call(this,e)||this}fe(e,t);var n=e.prototype;return n._getClassName=function(){return"Menu"},n.addTo=function(t){return t._menu&&t._menu!==this&&t.removeMenu(),t._menu=this,Fo.prototype.addTo.apply(this,arguments)},n.setItems=function(t){return this.options.items=t,this},n.getItems=function(){return this.options.items||[]},n.buildOn=function(){if(this.options.custom){if(y(this.options.items)){var t=De("div");return t.innerHTML=this.options.items,t}return this.options.items}var e=De("div");this.options.containerClass&&Je(e,this.options.containerClass),e.style.width=this._getMenuWidth()+"px";var n=this._createMenuItemDom();return e.appendChild(n),rn(e,"contextmenu",Ge),e},n.getOffset=function(){if(!this.getMap())return null;var t=this.getMap().getSize(),e=this.getMap().viewPointToContainerPoint(this._getViewPoint()),n=this.getSize(),r=0,i=0;return e.x+n.width>t.width&&(r=-n.width),e.y+n.height>t.height&&(i=-n.height),new me(r,i)},n.getTransformOrigin=function(){var t=this.getOffset()._multi(-1);return t.x+"px "+t.y+"px"},n.getEvents=function(){return{"_zoomstart _zoomend _movestart _dblclick _click":this._removePrevDOM}},n._createMenuItemDom=function(){var t=this,e=this.getMap(),n=De("ul");Je(n,"maptalks-menu-items");var r,i,o=this.getItems();function a(n){return function(r){var i=e._parseEvent(r,"click");i.target=t,i.owner=t._owner,i.index=n,!1!==this._callback(i)&&t.hide()}}for(var s=0,c=o.length;s<c;s++){if("-"===(r=o[s])||"_"===r)Je(i=De("li"),"maptalks-menu-splitter");else{i=De("li");var u=r.item;_(u)&&(u=u({owner:this._owner,index:s})),i.innerHTML=u,i._callback=r.click,rn(i,"click",a(s))}n.appendChild(i)}var l=this.options.maxHeight||0;return l>0&&Xe(n,"max-height: "+l+"px; overflow-y: auto;"),n},n._getMenuWidth=function(){return this.options.width||160},e}(Fo);Wo.mergeOptions({containerClass:"maptalks-menu",animation:null,animationDelay:10,animationOnHide:!1,autoPan:!1,width:160,maxHeight:0,custom:!1,items:[]});var Vo={setMenu:function(t){return this._menuOptions=t,this._menu?this._menu.setOptions(t):this.on("contextmenu",this._defaultOpenMenu,this),this},openMenu:function(t){var e=this instanceof ii?this:this.getMap();return t||(t=this.getCenter()),this._menu?this._menu.show(t):this._menuOptions&&e&&(this._bindMenu(this._menuOptions),this._menu.show(t)),this},setMenuItems:function(t){return this._menuOptions||(this._menuOptions={}),Array.isArray(t)&&(this._menuOptions.custom=!1),this._menuOptions.items=t,this.setMenu(this._menuOptions),this},getMenuItems:function(){return this._menu?this._menu.getItems():this._menuOptions&&this._menuOptions.items||[]},closeMenu:function(){return this._menu&&this._menu.hide(),this},removeMenu:function(){return this.off("contextmenu",this._defaultOpenMenu,this),this._unbindMenu(),delete this._menuOptions,this},_bindMenu:function(t){return this._menu=new Wo(t),this._menu.addTo(this),this},_unbindMenu:function(){return this._menu&&(this.closeMenu(),this._menu.remove(),delete this._menu),this},_defaultOpenMenu:function(t){return this.listens("contextmenu")>1||(this.openMenu(t.coordinate),!1)}};ii.include(Vo),$r.include(Vo);var Zo=Object.freeze({UIComponent:Fo,UIMarker:Uo,InfoWindow:Go,ToolTip:Ho,Menuable:Vo,Menu:Wo}),Qo=function(t){function e(e){return e&&e.position&&!y(e.position)&&(e.position=d({},e.position)),t.call(this,e)||this}fe(e,t);var n=e.prototype;return n.addTo=function(t){if(this.remove(),!t.options.control)return this;this._map=t;var e=t._panels.control;return this.__ctrlContainer=De("div"),Xe(this.__ctrlContainer,"position:absolute;overflow:visible;"),this.update(),e.appendChild(this.__ctrlContainer),this.onAdd&&this.onAdd(),this.fire("add",{dom:e}),this},n.update=function(){return this.__ctrlContainer.innerHTML="",this._controlDom=this.buildOn(this.getMap()),this._controlDom&&(this._updatePosition(),this.__ctrlContainer.appendChild(this._controlDom)),this},n.getMap=function(){return this._map},n.getPosition=function(){return d({},this._parse(this.options.position))},n.setPosition=function(t){return y(t)?this.options.position=t:this.options.position=d({},t),this._updatePosition(),this},n.getContainerPoint=function(){var t,e,n=this.getPosition(),r=this.getMap().getSize();return p(n.left)?p(n.right)||(t=r.width-parseInt(n.right)):t=parseInt(n.left),p(n.top)?p(n.bottom)||(e=r.height-parseInt(n.bottom)):e=parseInt(n.top),new me(t,e)},n.getContainer=function(){return this.__ctrlContainer},n.getDOM=function(){return this._controlDom},n.show=function(){return this.__ctrlContainer.style.display="",this},n.hide=function(){return this.__ctrlContainer.style.display="none",this},n.isVisible=function(){return this.__ctrlContainer&&""===this.__ctrlContainer.style.display},n.remove=function(){return this._map?(je(this.__ctrlContainer),this.onRemove&&this.onRemove(),delete this._map,delete this.__ctrlContainer,delete this._controlDom,this.fire("remove"),this):this},n._parse=function(t){var n=t;return y(t)&&(n=e.positions[n]),n},n._updatePosition=function(){var t=this.getPosition();for(var e in t||(t={top:20,left:20}),t)t.hasOwnProperty(e)&&(t[e]=parseInt(t[e]),this.__ctrlContainer.style[e]=t[e]+"px");this.fire("positionchange",{position:d({},t)})},e}(bn(Mn));Qo.positions={"top-left":{top:20,left:20},"top-right":{top:20,right:20},"bottom-left":{bottom:20,left:20},"bottom-right":{bottom:20,right:20}},ii.mergeOptions({control:!0}),ii.include({addControl:function(t){return this._containerDOM.getContext||t.addTo(this),this},removeControl:function(t){return t&&t.getMap()===this?(t.remove(),this):this}});var Xo="addlayer removelayer setbaselayer baselayerremove",Yo=function(t){function e(){return t.apply(this,arguments)||this}fe(e,t);var n=e.prototype;return n.buildOn=function(){return this._attributionContainer=De("div"),this._attributionContainer.className="maptalks-attribution",this._update(),this._attributionContainer},n.onAdd=function(){this.getMap().on(Xo,this._update,this)},n.onRemove=function(){this.getMap().off(Xo,this._update,this)},n._update=function(){var t=this.getMap();if(t){var e=t._getLayers((function(t){return t.options.attribution})).reverse().map((function(t){return t.options.attribution})),n=this.options.content+(e.length>0?" - "+e.join(", "):"");this._attributionContainer.innerHTML='<span style="padding:0px 4px">'+n+"</span>"}},e}(Qo);Yo.mergeOptions({position:{bottom:0,left:0},content:'<a href="http://maptalks.org" target="_blank">maptalks</a>'}),ii.mergeOptions({attribution:!0}),ii.addOnLoadHook((function(){var t=this.options.attribution||this.options.attributionControl;t&&(this.attributionControl=new Yo(t),this.addControl(this.attributionControl))}));var Jo=function(t){function e(){return t.apply(this,arguments)||this}fe(e,t);var n=e.prototype;return n.buildOn=function(){var t=this.container=De("div",this.options.containerClass),e=this.panel=De("div","panel"),n=this.button=De("button");return t.appendChild(n),t.appendChild(e),t},n.onAdd=function(){rn(this.button,"mouseover",this._show,this),rn(this.panel,"mouseleave",this._hide,this),rn(this.getMap(),"click",this._hide,this)},n.onRemove=function(){this.panel&&(on(this.button,"mouseover",this._show,this),on(this.panel,"mouseleave",this._hide,this),on(this.getMap(),"click",this._hide,this),je(this.panel),je(this.button),delete this.panel,delete this.button,delete this.container)},n._show=function(){Ye(this.container,"shown")||(Je(this.container,"shown"),this._createPanel())},n._hide=function(t){this.panel.contains(t.toElement||t.relatedTarget)||qe(this.container,this.options.containerClass)},n._createPanel=function(){this.panel.innerHTML="";var t=De("ul");this.panel.appendChild(t),this._renderLayers(this.getMap(),t)},n._renderLayers=function(t,e){var n=t.getBaseLayer(),r=t.getLayers(),i=r.length;if(n){var o=n.layers||[n],a=De("li","group"),s=De("ul"),c=De("label");c.innerHTML=this.options.baseTitle,a.appendChild(c);for(var u=0,l=o.length;u<l;u++){var h=o[u];this._isExcluded(h)&&(s.appendChild(this._renderLayer(o[u],!0)),a.appendChild(s),e.appendChild(a))}}if(i){var f=De("li","group"),d=De("ul"),p=De("label");p.innerHTML=this.options.overlayTitle,f.appendChild(p);for(var m=0;m<i;m++){var g=r[m];this._isExcluded(g)&&d.appendChild(this._renderLayer(g))}f.appendChild(d),e.appendChild(f)}},n._isExcluded=function(t){var e=t.getId(),n=this.options.excludeLayers;return!(n.length&&n.indexOf(e)>=0)},n._renderLayer=function(t,e){var n=this,r=De("li","layer"),i=De("label"),o=De("input"),a=this.getMap(),s=t.options.visible;t.options.visible=!0;var c=t.isVisible();return t.options.visible=s,r.className="layer",e?(o.type="radio",o.name="base"):o.type="checkbox",o.checked=s&&c,c||o.setAttribute("disabled","disabled"),o.onchange=function(e){if("radio"===e.target.type){var r=a.getBaseLayer(),i=r.layers;if(i)for(var o=0,s=i.length;o<s;o++){var c=i[o];c[c===t?"show":"hide"]()}else r.isVisible()||r.show();a._fireEvent("setbaselayer")}else t[e.target.checked?"show":"hide"]();n.fire("layerchange",{target:t})},r.appendChild(o),i.innerHTML=t.getId(),r.appendChild(i),r},e}(Qo);Jo.mergeOptions({position:"top-right",baseTitle:"Base Layers",overlayTitle:"Layers",excludeLayers:[],containerClass:"maptalks-layer-switcher"}),ii.mergeOptions({layerSwitcherControl:!1}),ii.addOnLoadHook((function(){this.options.layerSwitcherControl&&(this.layerSwitcherControl=new Jo(this.options.layerSwitcherControl),this.addControl(this.layerSwitcherControl))}));var qo=function(t){function e(){return t.apply(this,arguments)||this}fe(e,t);var n=e.prototype;return n.buildOn=function(){var t=this.options.size;this.options.maximize||(t=[0,0]);var e=De("div"),n=this.mapContainer=De("div");n.style.width=t[0]+"px",n.style.height=t[1]+"px",n.className=this.options.containerClass;var r=this.button=De("div");return r.className=this.options.buttonClass,e.appendChild(n),e.appendChild(r),e},n.onAdd=function(){this.options.maximize&&this._createOverview(),this.getMap().on("resize moving zooming rotate dragrotating viewchange",this._update,this).on("setbaselayer",this._updateBaseLayer,this).on("spatialreferencechange",this._updateSpatialReference,this),rn(this.button,"click",this._onButtonClick,this),this._updateButtonText()},n.onRemove=function(){this.getMap().off("resize moving zooming rotate dragrotating viewchange",this._update,this).off("setbaselayer",this._updateBaseLayer,this).off("spatialreferencechange",this._updateSpatialReference,this),this._overview&&(this._overview.remove(),delete this._overview,delete this._perspective),on(this.button,"click",this._onButtonClick,this)},n.maxmize=function(){var t=this.options.size,e=this.mapContainer;return e.style.width=t[0]+"px",e.style.height=t[1]+"px",this._createOverview(),this},n.minimize=function(){this._overview&&this._overview.remove(),delete this._overview,delete this._perspective;var t=this.mapContainer;return t.style.width="0px",t.style.height="0px",this},n.getOverviewMap=function(){return this._overview},n._onButtonClick=function(){this._overview?this.minimize():this.maxmize(),this._updateButtonText()},n._updateButtonText=function(){this._overview?this.button.innerHTML="-":this.button.innerHTML="+"},n._createOverview=function(){var t=this.getMap(),e=this.mapContainer,n=t.config();d(n,{center:t.getCenter(),zoom:this._getOverviewZoom(),zoomAnimationDuration:150,pitch:0,bearing:0,scrollWheelZoom:!1,checkSize:!1,doubleClickZoom:!1,touchZoom:!1,control:!1,draggable:!1,maxExtent:null}),this._overview=new ii(e,n),this._updateBaseLayer(),this._perspective=new xi(this._getPerspectiveCoords(),{draggable:!0,cursor:"move",symbol:this.options.symbol}).on("dragend",this._onDragEnd,this),new eo("perspective_layer",this._perspective).addTo(this._overview),this.fire("load")},n._getOverviewZoom=function(){var t=this.getMap(),e=t.getZoom(),n=t.getMinZoom(),r=this.options.level;if(r>0){for(var i=r;i>0;i--)if(e-i>=n)return e-i}else for(var o=r;o<0;o++)if(e-o>=n)return e-o;return e},n._onDragEnd=function(){var t=this._perspective.getCenter();this._overview.setCenter(t),this.getMap().panTo(t)},n._getPerspectiveCoords=function(){var t=this.getMap();return t.getContainerExtent().toArray().map((function(e){return t.containerPointToCoordinate(e)}))},n._update=function(){if(this._overview){Ze(this._overview._containerDOM);var t=this._getPerspectiveCoords();this._perspective.setCoordinates(t),this._overview.setCenterAndZoom(this.getMap().getCenter(),this._getOverviewZoom())}},n._updateSpatialReference=function(){if(this._overview){var t=this.getMap().options.spatialReference;this._overview.setSpatialReference(t)}},n._updateBaseLayer=function(){if(this._overview){var t=this.getMap().getBaseLayer();if(t){var e=t.layers,n=0;if(e)for(var r=0,i=e.length;r<i;r++)if(e[r].isVisible()){n=r;break}var o=t.toJSON(),a=null;e?(a=o.layers[n].options).visible=!0:a=o.options,this._overview.setMinZoom(a.minZoom||null).setMaxZoom(a.maxZoom||null),delete a.minZoom,delete a.maxZoom,delete o.options.canvas,o.options.visible=!0,o.options.renderer="canvas";var s=ei.fromJSON(o);for(var c in t)_(t[c])&&t.hasOwnProperty(c)&&t[c]!==t.constructor.prototype[c]&&(s[c]=t[c]);this._overview.setBaseLayer(s)}else this._overview.setBaseLayer(null)}},e}(Qo);qo.mergeOptions({level:4,position:{right:1,bottom:1},size:[300,200],maximize:!0,symbol:{lineWidth:3,lineColor:"#1bbc9b",polygonFill:"#1bbc9b",polygonOpacity:.4},containerClass:"maptalks-overview",buttonClass:"maptalks-overview-button"}),ii.mergeOptions({overviewControl:!1}),ii.addOnLoadHook((function(){this.options.overviewControl&&(this.overviewControl=new qo(this.options.overviewControl),this.addControl(this.overviewControl))}));var Ko=function(t){function e(){return t.apply(this,arguments)||this}fe(e,t);var n=e.prototype;return n.buildOn=function(){var t;if(this.options.custom)y(this.options.content)?(t=De("div")).innerHTML=this.options.content:t=this.options.content;else{if(t=De("div","maptalks-panel"),this.options.closeButton){var e=De("a","maptalks-close");e.href="javascript:;",e.onclick=function(){t.style.display="none"},t.appendChild(e)}var n=De("div","maptalks-panel-content");n.innerHTML=this.options.content,t.appendChild(n)}return this.draggable=new Pn(t,{cancelOn:this._cancelOn.bind(this),ignoreMouseleave:!0}),this.draggable.on("dragstart",this._onDragStart,this).on("dragging",this._onDragging,this).on("dragend",this._onDragEnd,this),this.options.draggable&&this.draggable.enable(),t},n.update=function(){return this.draggable&&(this.draggable.disable(),delete this.draggable),Qo.prototype.update.call(this)},n.setContent=function(t){var e=this.options.content;return this.options.content=t,this.fire("contentchange",{old:e,new:t}),this.isVisible()&&this.update(),this},n.getContent=function(){return this.options.content},n._cancelOn=function(t){var e=(t.srcElement||t.target).tagName.toLowerCase();return"button"===e||"input"===e||"select"===e||"option"===e||"textarea"===e},n._onDragStart=function(t){this._startPos=t.mousePos,this._startPosition=d({},this.getPosition()),this.fire("dragstart",t)},n._onDragging=function(t){var e=t.mousePos.sub(this._startPos),n=this._startPosition,r=this.getPosition();p(r.top)||(r.top=parseInt(n.top)+e.y),p(r.bottom)||(r.bottom=parseInt(n.bottom)-e.y),p(r.left)||(r.left=parseInt(n.left)+e.x),p(r.right)||(r.right=parseInt(n.right)-e.x),this.setPosition(r),this.fire("dragging",t)},n._onDragEnd=function(t){delete this._startPos,delete this._startPosition,this.fire("dragend",t)},n._getConnectPoints=function(){var t=this.getMap(),e=this.getContainerPoint(),n=this.getDOM(),r=parseInt(n.clientWidth),i=parseInt(n.clientHeight);return[t.containerPointToCoordinate(e.add(r/2,0)),t.containerPointToCoordinate(e.add(r,i/2)),t.containerPointToCoordinate(e.add(r/2,i)),t.containerPointToCoordinate(e.add(0,i/2))]},e}(Qo);Ko.mergeOptions({position:"top-right",draggable:!0,custom:!1,content:"",closeButton:!0});var $o=function(t){function e(){return t.apply(this,arguments)||this}fe(e,t);var n=e.prototype;return n.buildOn=function(t){return this._map=t,this._scaleContainer=De("div",this.options.containerClass),this._addScales(),t.on("zoomend",this._update,this),this._map._loaded&&this._update(),this._scaleContainer},n.onRemove=function(){this.getMap().off("zoomend",this._update,this)},n._addScales=function(){var t="border: 2px solid #000000;border-top: none;line-height: 1.1;padding: 0px;color: #000000;font-size: 11px;text-align:center;white-space: nowrap;overflow: hidden;-moz-box-sizing: content-box;box-sizing: content-box;background: #fff; background: rgba(255, 255, 255, 0);";this.options.metric&&(this._mScale=Fe("div",this.options.containerClass?null:t,this._scaleContainer)),this.options.imperial&&(this._iScale=Fe("div",this.options.containerClass?null:t,this._scaleContainer))},n._update=function(){var t=this._map.pixelToDistance(this.options.maxWidth,0);this._updateScales(t)},n._updateScales=function(t){this.options.metric&&t&&this._updateMetric(t),this.options.imperial&&t&&this._updateImperial(t)},n._updateMetric=function(t){var e=this._getRoundNum(t),n=e<1e3?e+" m":e/1e3+" km";this._updateScale(this._mScale,n,e/t)},n._updateImperial=function(t){var e,n,r,i=3.2808399*t;i>5280?(e=i/5280,n=this._getRoundNum(e),this._updateScale(this._iScale,n+" mile",n/e)):(r=this._getRoundNum(i),this._updateScale(this._iScale,r+" feet",r/i))},n._updateScale=function(t,e,n){t.style.width=Math.round(this.options.maxWidth*n)+"px",t.innerHTML=e},n._getRoundNum=function(t){var e=Math.pow(10,(Math.floor(t)+"").length-1),n=t/e;return e*(n=n>=10?10:n>=5?5:n>=3?3:n>=2?2:1)},e}(Qo);$o.mergeOptions({position:"bottom-left",maxWidth:100,metric:!0,imperial:!1,containerClass:null}),ii.mergeOptions({scaleControl:!1}),ii.addOnLoadHook((function(){this.options.scaleControl&&(this.scaleControl=new $o(this.options.scaleControl),this.addControl(this.scaleControl))}));var ta=function(t){function e(){return t.apply(this,arguments)||this}fe(e,t);var n=e.prototype;return n.buildOn=function(t){this._map=t;var e=De("div"),n=De("ul","maptalks-toolbar-hx");e.appendChild(n),this.options.vertical?Je(e,"maptalks-toolbar-vertical"):Je(e,"maptalks-toolbar-horizonal");var r=this;function i(t,e,n,i){var o=r._getItems()[e];return function(r){return He(r),t({target:o,index:e,childIndex:n,dom:i})}}var o=this.options.items;if(H(o))for(var a=0,s=o.length;a<s;a++){var c=o[a],u=De("li");if(28!==this.options.height&&(u.style.lineHeight=this.options.height+"px"),u.style.height=this.options.height+"px",u.style.cursor="pointer",tn(c.item)){u.style.textAlign="center";var l=en("div",c.item);u.innerHTML='<div style="margin-top:'+(this.options.height-l.height)/2+'px;">'+c.item+"</div>"}else u.innerHTML=c.item;if(c.click&&rn(u,"click",i(c.click,a,null,u)),H(c.children)){var h=this._createDropMenu(a);u.appendChild(h),u._menu=h,rn(u,"mouseover",(function(){this._menu.style.display=""})),rn(u,"mouseout",(function(){this._menu.style.display="none"}))}n.appendChild(u)}return e},n._createDropMenu=function(t){var e=this;function n(t,n,r){var i=e._getItems()[n].children[r];return function(e){return He(e),t({target:i,index:n,childIndex:r})}}var r=De("div","maptalks-dropMenu"),i=this._getItems(),o=i.length,a=De("ul"),s=i[t].children;t===o-1&&s&&(r.style.cssText="right: 0px;",a.style.cssText="right: 0px;position: absolute;",this.options.reverseMenu&&(a.style.bottom=0)),r.appendChild(De("em","maptalks-ico"));for(var c=0,u=0,l=s.length;u<l;u++){var h=Me(s[u].item,"12px");h.width>c&&(c=h.width)}for(var f=0,d=s.length;f<d;f++){var p=s[f],m=De("li");m.innerHTML='<a href="javascript:;">'+p.item+"</a>",m.style.cursor="pointer",m.style.width=c+24+"px",rn(m.childNodes[0],"click",n(p.click,t,f)),a.appendChild(m)}if(this.options.vertical){var g=c<95?95:c;this.options.reverseMenu?r.style.right=-(g+20)+"px":r.style.left=-(g+20)+"px"}else this.options.reverseMenu?r.style.bottom="28px":r.style.top="28px";return r.appendChild(a),r.style.display="none",r},n._getItems=function(){return this.options.items||[]},e}(Qo);ta.mergeOptions({height:28,vertical:!1,position:"top-right",reverseMenu:!1,items:{}});var ea=function(t){function e(){return t.apply(this,arguments)||this}fe(e,t);var n=e.prototype;return n.buildOn=function(t){var e=this.options,n=De("div","maptalks-zoom");if(e.zoomLevel){var r=De("span","maptalks-zoom-zoomlevel");n.appendChild(r),this._levelDOM=r}var i=De("div","maptalks-zoom-slider"),o=De("a","maptalks-zoom-zoomin");if(o.href="javascript:;",o.innerHTML="+",i.appendChild(o),this._zoomInButton=o,e.slider){var a=De("div","maptalks-zoom-slider-box"),s=De("div","maptalks-zoom-slider-ruler"),c=De("span","maptalks-zoom-slider-reading"),u=De("span","maptalks-zoom-slider-dot");s.appendChild(c),a.appendChild(s),a.appendChild(u),i.appendChild(a),this._sliderBox=a,this._sliderRuler=s,this._sliderReading=c,this._sliderDot=u}var l=De("a","maptalks-zoom-zoomout");return l.href="javascript:;",l.innerHTML="-",i.appendChild(l),this._zoomOutButton=l,n.appendChild(i),t.on("_zoomend _zooming _zoomstart _spatialreferencechange",this._update,this),this._update(),this._registerDomEvents(),n},n.onRemove=function(){this.getMap().off("_zoomend _zooming _zoomstart _spatialreferencechange",this._update,this),this._zoomInButton&&on(this._zoomInButton,"click",this._onZoomInClick,this),this._zoomOutButton&&on(this._zoomOutButton,"click",this._onZoomOutClick,this),this._sliderRuler&&(on(this._sliderRuler,"click",this._onClickRuler,this),this.dotDragger.disable(),delete this.dotDragger)},n._update=function(){var t=this.getMap();if(this._sliderBox){var e=10*(t.getMaxZoom()-t.getMinZoom());this._sliderBox.style.height=e+16+"px",this._sliderRuler.style.height=e+8+"px",this._sliderRuler.style.cursor="pointer";var n=10*(t.getMaxZoom()-t.getZoom());this._sliderReading.style.height=10*(t.getZoom()-t.getMinZoom()+1)+"px",this._sliderDot.style.top=n+"px"}this._updateText()},n._updateText=function(){if(this._levelDOM){var t=this.getMap().getZoom();g(t)||(t=Math.floor(10*t)/10),this._levelDOM.innerHTML=t}},n._registerDomEvents=function(){this._zoomInButton&&rn(this._zoomInButton,"click",this._onZoomInClick,this),this._zoomOutButton&&rn(this._zoomOutButton,"click",this._onZoomOutClick,this),this._sliderRuler&&(rn(this._sliderRuler,"click",this._onClickRuler,this),this.dotDragger=new Pn(this._sliderDot,{ignoreMouseleave:!0}),this.dotDragger.on("dragstart",this._onDotDragstart,this).on("dragging dragend",this._onDotDrag,this).enable())},n._onZoomInClick=function(t){Ge(t),this.getMap().zoomIn()},n._onZoomOutClick=function(t){Ge(t),this.getMap().zoomOut()},n._onClickRuler=function(t){Ge(t);var e=this.getMap(),n=Qe(t,this._sliderRuler).y,r=e.getMaxZoom(),i=Math.floor(r-n/10);e.setZoom(i)},n._onDotDragstart=function(t){Ge(t.domEvent);var e=this.getMap(),n=e.getSize().toPoint()._multi(.5);e.onZoomStart(e.getZoom(),n)},n._onDotDrag=function(t){Ge(t.domEvent);var e=this.getMap(),n=e.getSize().toPoint()._multi(.5),r=Qe(t.domEvent,this._sliderRuler),i=e.getMaxZoom(),o=e.getMinZoom(),a=r.y,s=i-a/10;i<s?(s=i,a=0):o>s&&(s=o,a=10*(i-o)),"dragging"===t.type?e.onZooming(s,n,1):"dragend"===t.type&&(this.options.seamless?e.onZoomEnd(s,n):e.onZoomEnd(Math.round(s),n)),this._sliderDot.style.top=a+"px",this._sliderReading.style.height=10*(e.getZoom()-o+1)+"px",this._updateText()},e}(Qo);ea.mergeOptions({position:"top-left",slider:!0,zoomLevel:!0,seamless:!1}),ii.mergeOptions({zoomControl:!1}),ii.addOnLoadHook((function(){this.options.zoomControl&&(this.zoomControl=new ea(this.options.zoomControl),this.addControl(this.zoomControl))}));var na=Object.freeze({Control:Qo,Attribution:Yo,LayerSwitcher:Jo,Overview:qo,Panel:Ko,Scale:$o,Toolbar:ta,Zoom:ea}),ra=function(){function t(t,e,n,r){Array.isArray(t)?(this.scale={x:t[0],y:t[1]},this.origin={x:t[2],y:t[3]}):(this.scale={x:t,y:e},this.origin={x:n,y:r})}return t.getDefault=function(t){return"baidu"===t.code.toLowerCase()?"baidu":t.code.toLowerCase()==="EPSG:4326".toLowerCase()?"tms-global-geodetic":"identity"===t.code.toLowerCase()?[1,-1,0,0]:"web-mercator"},t}(),ia=6378137*Math.PI;d(ra,{"web-mercator":new ra([1,-1,-ia,ia]),"tms-global-mercator":new ra([1,1,-ia,-ia]),"tms-global-geodetic":new ra([1,1,-180,-90]),baidu:new ra([1,1,0,0])});for(var oa=function(){function t(t,e,n,r){this.map=t,this.tileSize=r,this.fullExtent=n,this.prepareTileInfo(e,n),this._xScale=n.right>=n.left?1:-1,this._yScale=n.top>=n.bottom?1:-1,this._pointOrigin=t._prjToPoint(new me(this.tileSystem.origin),t.getGLZoom()),this._glRes=t.getResolution(t.getGLZoom())}var e=t.prototype;return e.prepareTileInfo=function(t,e){if(y(t)?t=ra[t.toLowerCase()]:Array.isArray(t)&&(t=new ra(t)),!t)throw new Error("Invalid TileSystem");this.tileSystem=t;var n=e.right>e.left?1:-1,r=e.top>e.bottom?-1:1,i=t.origin.x,o=t.origin.y;this.transformation=new Qn([n,r,i,o])},e._getTileNum=function(t,e){var n=this.tileSystem,r=this.tileSize,i=Math.floor(1e-7*n.scale.x+t.x/(r.width*e)),o=Math.ceil(1e-7*n.scale.y+t.y/(r.height*e));return{x:n.scale.x*i,y:n.scale.y*o}},e.getTileIndex=function(t,e,n){var r=this.tileSystem,i=this.transformation.transform(t,1),o=this._getTileNum(i,e);return r.scale.x<0&&(o.x-=1),r.scale.y>0&&(o.y-=1),this.getNeighorTileIndex(o.x,o.y,0,0,e,n)},e.getNeighorTileIndex=function(t,e,n,r,i,o){var a=this.tileSystem,s=t+a.scale.x*n,c=e-a.scale.y*r,u=!1,l=s,h=c,f=this._getTileFullIndex(i);return o&&(!0!==o&&"x"!==o||(f.xmax===f.xmin?s=f.xmin:s<f.xmin?(s=f.xmax-(f.xmin-s)%(f.xmax-f.xmin))===f.xmax&&(s=f.xmin):s>=f.xmax&&(s=f.xmin+(s-f.xmin)%(f.xmax-f.xmin))),!0!==o&&"y"!==o||(f.ymax===f.ymin?c=f.ymin:c>=f.ymax?c=f.ymin+(c-f.ymin)%(f.ymax-f.ymin):c<f.ymin&&(c=f.ymax-(f.ymin-c)%(f.ymax-f.ymin))===f.ymax&&(c=f.ymin))),(s<f.xmin||s>f.xmax||c>f.ymax||c<f.ymin)&&(u=!0),{x:s,y:c,idx:l,idy:h,out:u}},e._getTileFullIndex=function(t){if(this._tileFullIndex||(this._tileFullIndex={}),this._tileFullIndex[t])return this._tileFullIndex[t];var e=this.fullExtent,n=this.transformation,r=this._getTileNum(n.transform(new Ln(e.left,e.top),1),t),i=this._getTileNum(n.transform(new Ln(e.right,e.bottom),1),t),o=this.tileSystem;return o.scale.x<0&&(r.x-=1,i.x-=1),o.scale.y>0&&(r.y-=1,i.y-=1),this._tileFullIndex[t]=new Vn(r,i),this._tileFullIndex[t]},e.getTilePrjNW=function(t,e,n){var r=this.tileSystem,i=this.tileSize,o=r.origin.y+this._yScale*r.scale.y*(e+(1===r.scale.y?1:0))*n*i.height,a=r.origin.x+this._xScale*r.scale.x*(t+(1===r.scale.x?0:1))*n*i.width;return new Ln(a,o)},e.getTilePointNW=function(t,e,n){var r=this._glRes/n,i=this.tileSystem,o=this.tileSize,a=this._pointOrigin.y*r+this._yScale*i.scale.y*(e+(1===i.scale.y?1:0))*o.height,s=this._pointOrigin.x*r+this._xScale*i.scale.x*(t+(1===i.scale.x?0:1))*o.width;return new me(s,a)},e.getTilePrjSE=function(t,e,n){var r=this.tileSystem,i=this.tileSize,o=r.origin.y+this._yScale*r.scale.y*(e+(1===r.scale.y?0:1))*n*i.height,a=r.origin.x+this._xScale*r.scale.x*(t+(1===r.scale.x?1:0))*n*i.width;return new Ln(a,o)},e.getTilePointSE=function(t,e,n){var r=this._glRes/n,i=this.tileSystem,o=this.tileSize,a=this._pointOrigin.y*r+this._yScale*i.scale.y*(e+(1===i.scale.y?0:1))*o.height,s=this._pointOrigin.x*r+this._xScale*i.scale.x*(t+(1===i.scale.x?1:0))*o.width;return new me(s,a)},e.getTilePrjExtent=function(t,e,n){var r=this.getTilePrjNW(t,e,n),i=this.getTilePrjSE(t,e,n);return new Vn(r,i)},t}(),aa=[],sa=0;sa<6;sa++)aa[sa]=[];var ca=[];function ua(t,e,n){!function(t){var e=t,n=e[0],r=e[1],i=e[2],o=e[3],a=e[4],s=e[5],c=e[6],u=e[7],l=e[8],h=e[9],f=e[10],d=e[11],p=e[12],m=e[13],g=e[14],v=e[15];la(aa[0],o-n,u-a,d-l,v-p),la(aa[1],o+n,u+a,d+l,v+p),la(aa[2],o+r,u+s,d+h,v+m),la(aa[3],o-r,u-s,d-h,v-m),la(aa[4],o-i,u-c,d-f,v-g),la(aa[5],o+i,u+c,d+f,v+g)}(t);for(var r=0;r<6;r++)if(!n||"0"!==n.charAt(r)){var i=aa[r];if(ca[0]=i[0]>0?e[1][0]:e[0][0],ca[1]=i[1]>0?e[1][1]:e[0][1],ca[2]=i[2]>0?e[1][2]:e[0][2],ha(i,ca)<0)return!1}return!0}function la(t,e,n,r,i){return t[0]=e*(1/6),t[1]=n*(1/6),t[2]=r*(1/6),t[3]=i*(1/6),t}function ha(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]+t[3]}var fa="undefined"!=typeof Set,da=function(){function t(){this._table=fa?new Set:{}}var e=t.prototype;return e.add=function(t){fa?this._table.add(t):this._table[t]=!0},e.has=function(t){return fa?this._table.has(t):this._table[t]},e.reset=function(){fa?this._table.clear():this._table={}},t}(),pa={urlTemplate:null,subdomains:null,errorUrl:null,repeatWorld:!0,background:!0,backgroundZoomDiff:6,loadingLimitOnInteracting:3,tileRetryCount:0,placeholder:!1,crossOrigin:null,tileSize:[256,256],offset:[0,0],tileSystem:null,fadeAnimation:!C,debug:!1,spatialReference:null,maxCacheSize:256,renderer:he.webgl?"gl":"canvas",clipByPitch:!0,maxAvailableZoom:null,cascadeTiles:!0,zoomOffset:0},ma=/\{ *([\w_]+) *\}/g,ga=new me(0,0),va=new me(0,0),ya=new me(0,0),_a=new me(0,0),ba=new me(0,0),xa=new me(0,0),wa=new me(0,0),Ma=[[0,0,0],[0,0,0]],Sa=[],Aa=function(t){function e(){return t.apply(this,arguments)||this}fe(e,t),e.fromJSON=function(t){return t&&"TileLayer"===t.type?new e(t.id,t.options):null};var n=e.prototype;return n.getTileSize=function(){if(this._tileSize)return this._tileSize;var t=this.options.tileSize;return m(t)&&(t=[t,t]),this._tileSize=new ge(t),this._tileSize},n.getTiles=function(t,e){var n=this.getMap(),r=n.getPitch(),i=e&&e.getRenderer(),o=n.getContainerExtent(),a=[],s=0,c=this.getMinZoom(),u=n.options.cascadePitches[0],l=n.options.cascadePitches[1],h=Math.floor(n._getVisualHeight(l)),f=p(t)?this._getTileZoom(n.getZoom()):t;if(this._visitedTiles=new da,this._coordCache={},!p(t)||!this.options.cascadeTiles||r<=u||!p(c)&&f<=c){var d=r<=l?o:new Zn(0,n.height-h,n.width,n.height),m=this._getTiles(f,d,2,i);return m&&(s+=m.tiles.length,a.push(m)),{tileGrids:a,count:s}}var g=Math.floor(n._getVisualHeight(u)),v=new Zn(0,n.height-g,n.width,n.height),y=this._getTiles(f,v,0,i);s+=y?y.tiles.length:0,a.push(y);var _,b,x=v.ymin,w=n.getSpatialReference().getZoomDirection(),M=w;if(r>l){f-M<=c&&(M=0);var S=new Zn(0,n.height-h,n.width,x);s+=(_=this._getTiles(f-M,S,1,i))?_.tiles.length:0,x=S.ymin,M+=4*w}if(f-M>=c){var A=new Zn(0,o.ymin,n.width,x);s+=(b=this._getTiles(f-M,A,2,i))?b.tiles.length:0,a.push(b)}return _&&b&&(a[1]=b,a[2]=_),{tileGrids:a,count:s}},n.getTileUrl=function(t,e,n){var r=this.options.urlTemplate,i="";if(this.options.subdomains){var o=this.options.subdomains;if(H(o)){var a=(t+e)%o.length;a<0&&(a=0),i=o[a]}}if(_(r))return r(t,e,n,i);var s={x:t,y:e,z:n,s:i};return r.replace(ma,(function(t,e){var n=s[e];if(void 0===n)throw new Error("No value provided for variable "+t);return"function"==typeof n&&(n=n(s)),n}))},n.clear=function(){return this._renderer&&this._renderer.clear(),this.fire("clear"),this},n.toJSON=function(){return{type:this.getJSONType(),id:this.getId(),options:this.config()}},n.getSpatialReference=function(){var t=this.getMap();return!t||this.options.spatialReference&&!Kr.equals(this.options.spatialReference,t.options.spatialReference)?(this._sr=this._sr||new Kr(this.options.spatialReference),void 0===this._srMinZoom&&(this._srMinZoom=this._sr.getMinZoom(),this._srMaxZoom=this._sr.getMaxZoom()),this._sr):t.getSpatialReference()},n.getMinZoom=function(){return this.getSpatialReference()!==this.getMap().getSpatialReference()?Math.max(t.prototype.getMinZoom.call(this),this._srMinZoom):t.prototype.getMinZoom.call(this)},n.getMaxZoom=function(){return this.getSpatialReference()!==this.getMap().getSpatialReference()?Math.min(t.prototype.getMaxZoom.call(this),this._srMaxZoom):t.prototype.getMaxZoom.call(this)},n._getTileZoom=function(t){g(t)||(t=Math.round(t));var e=this.options.maxAvailableZoom;return!p(e)&&t>e&&(t=e),t},n._getTiles=function(t,e,n,r){var i=this,o=this.getMap(),a=t,s=o.projViewMatrix;n<2&&(0===n&&(a-=1),s=0===n?o.cascadeFrustumMatrix0:1===n?o.cascadeFrustumMatrix1:o.projViewMatrix);var c=a+this.options.zoomOffset,u=this._getTileOffset(c),l=u[0]||u[1],h={zoom:a,extent:null,offset:u,tiles:[]};if(c<0)return h;var f=this.getMinZoom(),d=this.getMaxZoom();if(!(o&&this.isVisible()&&o.width&&o.height))return h;if(!p(f)&&a<f||!p(d)&&a>d)return h;var m=this._getTileConfig();if(!m)return h;var g={zoom:u},v=this.getSpatialReference(),y=o.getSpatialReference(),_=v.getResolution(c),b=o.getGLScale(a),x=v===y&&this.options.repeatWorld,w=e.convertTo((function(t){if(t.y>0&&t.y<o.height){var e=(0===t.x?0:1)+t.y;i._coordCache[e]||(i._coordCache[e]=o._containerPointToPoint(t)),i._coordCache[e]}return o._containerPointToPoint(t,void 0,ga)})),M=this._getMask2DExtent();if(M){var S=M.intersection(w);if(!S)return h;e=S.convertTo((function(t){return o._pointToContainerPoint(t,void 0,0,ga)}))}var A,E=o._containerPointToPrj(e.getCenter(),va),C=o._prjToPoint(E,c,ya);A=l?this._project(o._pointToPrj(C._add(u),c,ya),ya):this._project(E,ya);var T=o.getGLScale()/o.getGLScale(c);_a.x=w.xmin*T,_a.y=w.ymax*T,ba.x=w.xmax*T,ba.y=w.ymin*T;for(var I=this._project(o._pointToPrj(_a._add(u),c,_a),_a),P=this._project(o._pointToPrj(ba._add(u),c,ba),ba),L=m.getTileIndex(A,_,x),R=m.getTileIndex(I,_,x),O=m.getTileIndex(P,_,x),k=Math.ceil(Math.abs(L.idy-R.idy)),B=Math.ceil(Math.abs(L.idx-R.idx)),D=Math.ceil(Math.abs(L.idy-O.idy)),F=Math.ceil(Math.abs(L.idx-O.idx)),j=(k+D+1)*(B+F+1),U=this.getTileSize(),N=this.getRenderer()||r,z=this._getTileConfig().tileSystem.scale,G=[],H=new Zn,W=new me(0,0),V=-k;V<=D;V++)for(var Z=-B,Q=-1/0,X=!1;Z>=Q&&Z<=F;){var Y=m.getNeighorTileIndex(L.idx,L.idy,Z,V,_,x);Q===-1/0?Z++:Z--;var J=this._getTileId(Y.idx,Y.idy,a);if(!(Y.out||this._visitedTiles&&this._visitedTiles.has(J))){var q=N&&N.isTileCachedOrLoading(J);q&&(q=q.info);var K=void 0;if(q){var $=q.extent2d;W.set($.xmin,$.ymax),K=W}else if(this._hasOwnSR){var tt=m.getTilePrjNW(Y.x,Y.y,_);K=o._prjToPoint(this._unproject(tt,ba),a)}else K=m.getTilePointNW(Y.x,Y.y,_);var et=void 0,nt=void 0;if(v===y)et=U.width,nt=U.height;else{var rt=void 0;if(this._hasOwnSR){var it=m.getTilePrjSE(Y.x,Y.y,_);rt=o._prjToPoint(this._unproject(it,ba),a,ba)}else rt=m.getTilePointSE(Y.x,Y.y,_);et=Math.ceil(Math.abs(rt.x-K.x)),nt=Math.ceil(Math.abs(rt.y-K.y))}var ot=z.x*(Y.idx-Y.x)*et,at=z.y*(Y.idy-Y.y)*nt;q||!ot&&!at||K._add(ot,at);var st=q&&q.extent2d||new Zn(K.x,K.y-nt,K.x+et,K.y);(j<=4||X||this._isTileInExtent(s,st,u,b))&&(this._visitedTiles&&0===n&&this._visitedTiles.add(J),0===n?(this._splitTiles(s,G,N,Y,a+1,st,ot,at,g,r),H._combine(st)):(q?(q.offset[0]=u[0],q.offset[1]=u[1]):(q={z:a,x:Y.x,y:Y.y,extent2d:st,offset:u,id:J,url:this.getTileUrl(Y.x,Y.y,a)},r&&(q.layer=this.getId())),G.push(q),H._combine(st)),Q===-1/0?(Q=Z,Z=F):X||(X=!0))}}if(G.length){var ct=o._containerPointToPoint(e.getCenter(),a,ga)._add(u),ut=new me(0,0),lt=new me(0,0);G.sort((function(t,e){return ut.set((t.extent2d.xmin+t.extent2d.xmax)/2,(t.extent2d.ymin+t.extent2d.ymax)/2),lt.set((e.extent2d.xmin+e.extent2d.xmax)/2,(e.extent2d.ymin+e.extent2d.ymax)/2),ut.distanceTo(ct)-lt.distanceTo(ct)}))}return{offset:u,zoom:t,extent:H,tiles:G}},n._splitTiles=function(t,e,n,r,i,o,a,s,c,u){var l=this._getTileConfig().tileSystem.scale.y,h=this.getMap().getGLScale(i),f=xa.set(2*o.xmin,l<0?2*o.ymax:2*o.ymin),d=o.getWidth(),p=o.getHeight(),m=2*r.idx,g=2*r.idy,v=2*r.x,y=2*r.y,_=this._checkAndAddTile(t,n,m,g,v,y,i,0,0,d,p,f,h,c,u);_&&e.push(_),(_=this._checkAndAddTile(t,n,m,g,v,y,i,0,1,d,p,f,h,c,u))&&e.push(_),(_=this._checkAndAddTile(t,n,m,g,v,y,i,1,0,d,p,f,h,c,u))&&e.push(_),(_=this._checkAndAddTile(t,n,m,g,v,y,i,1,1,d,p,f,h,c,u))&&e.push(_)},n._checkAndAddTile=function(t,e,n,r,i,o,a,s,c,u,l,h,f,d,p){var m=this._getTileId(n+s,r+c,a);if(this._visitedTiles&&this._visitedTiles.has(m))return null;var g=d[a];g||(g=d[a]=this._getTileOffset(a));var v=this._getTileConfig().tileSystem.scale.y,y=new Zn(h.x+s*u,h.y+v*c*l,h.x+(s+1)*u,h.y+v*(c+1)*l);if(!this._isSplittedTileInExtent(t,y,g,f))return null;var _=e&&e.isTileCachedOrLoading(m);return _?_=_.info:(_={z:a,x:i+s,y:o+c,extent2d:y,id:m,offset:g,url:this.getTileUrl(i+s,o+c,a+this.options.zoomOffset)},p&&(_.layer=this.getId())),_},n._getTileOffset=function(t){var e=this.options.offset;return _(e)&&(e=e(t)),e},n._getTileId=function(t,e,n,r){return(r||this.getId())+"_"+e+"_"+t+"_"+n},n._project=function(t,e){if(this._hasOwnSR){var n=this.getMap().getProjection();return this.getSpatialReference().getProjection().project(n.unproject(t,e),e)}return t},n._unproject=function(t,e){if(this._hasOwnSR){var n=this.getMap(),r=this.getSpatialReference(),i=n.getProjection(),o=r.getProjection();return i.project(o.unproject(t,e),e)}return t},n._initTileConfig=function(){var t=this.getMap(),e=this.getTileSize(),n=this.getSpatialReference(),r=n.getProjection(),i=n.getFullExtent();this._defaultTileConfig=new oa(t,ra.getDefault(r),i,e),this.options.tileSystem&&(this._tileConfig=new oa(t,this.options.tileSystem,i,e)),this._hasOwnSR=n!==t.getSpatialReference()},n._getTileConfig=function(){return this._defaultTileConfig||this._initTileConfig(),this._tileConfig||this._defaultTileConfig},n._bindMap=function(e){var n=e.getBaseLayer();return n===this&&(n.options.hasOwnProperty("forceRenderOnMoving")||this.config({forceRenderOnMoving:!0})),t.prototype._bindMap.apply(this,arguments)},n._isTileInExtent=function(t,e,n,r){var i,o=this.getMap();if(t!==o.projViewMatrix){var a=e.getCenter(wa)._sub(n[0],n[1])._multi(r);vo(Sa,a.x,a.y,0),i=function(t,e,n){var r=e[0],i=e[1],o=e[2],a=n[3]*r+n[7]*i+n[11]*o+n[15];return a=a||1,t[0]=(n[0]*r+n[4]*i+n[8]*o+n[12])/a,t[1]=(n[1]*r+n[5]*i+n[9]*o+n[13])/a,t[2]=(n[2]*r+n[6]*i+n[10]*o+n[14])/a,t}(Sa,Sa,o.projViewMatrix)[1]<0?o.projViewMatrix:t}else i=o.projViewMatrix;return Ma[0][0]=(e.xmin-n[0])*r,Ma[0][1]=(e.ymin-n[1])*r,Ma[1][0]=(e.xmax-n[0])*r,Ma[1][1]=(e.ymax-n[1])*r,ua(i,Ma)},n._isSplittedTileInExtent=function(t,e,n,r){var i=this.getMap();return Ma[0][0]=(e.xmin-n[0])*r,Ma[0][1]=(e.ymin-n[1])*r,Ma[1][0]=(e.xmax-n[0])*r,Ma[1][1]=(e.ymax-n[1])*r,ua(i.projViewMatrix,Ma)},n.getEvents=function(){return{spatialreferencechange:this._onSpatialReferenceChange}},n._onSpatialReferenceChange=function(){delete this._tileConfig,delete this._defaultTileConfig,delete this._sr;var t=this.getRenderer();t&&t.clear()},e}(ei);Aa.registerJSONType("TileLayer"),Aa.mergeOptions(pa);var Ea=function(t){function e(e,n,r){var i;return(i=t.call(this,e,r)||this).layers=n||[],i._checkChildren(),i.layerMap={},i._groupChildren=[],i}fe(e,t),e.fromJSON=function(t){if(!t||"GroupTileLayer"!==t.type)return null;var n=t.layers.map((function(t){return ei.fromJSON(t)}));return new e(t.id,n,t.options)};var n=e.prototype;return n.getLayers=function(){return this.layers},n.toJSON=function(){return{type:this.getJSONType(),id:this.getId(),layers:this.layers.map((function(t){return t.toJSON()})),options:this.config()}},n.getTiles=function(t){for(var e=this.layers,n=[],r=0,i=0,o=e.length;i<o;i++){var a=e[i];if(a.options.visible){var s=a.getTiles(t,this);s&&0!==s.count&&(r+=s.count,k(n,s.tileGrids))}}return{count:r,tileGrids:n}},n.onAdd=function(){var e=this,n=this.getMap();this.layers.forEach((function(t){e.layerMap[t.getId()]=t,t.getChildLayer&&e._groupChildren.push(t),t._bindMap(n),t.on("show hide",e._onLayerShowHide,e)})),t.prototype.onAdd.call(this)},n.onRemove=function(){var e=this;this.layers.forEach((function(t){t._doRemove(),t.off("show hide",e._onLayerShowHide,e)})),this.layerMap={},this._groupChildren=[],t.prototype.onRemove.call(this)},n.getChildLayer=function(t){var e=this.layerMap[t];if(e)return e;for(var n=0;n<this._groupChildren.length;n++){var r=this._groupChildren[n].getChildLayer(t);if(r)return r}return null},n._onLayerShowHide=function(){var t=this.getRenderer();t&&t.setToRedraw()},n.isVisible=function(){if(!t.prototype.isVisible.call(this))return!1;for(var e=this.layers,n=0,r=e.length;n<r;n++)if(e[n].isVisible())return!0;return!1},n._checkChildren=function(){var t=this,e={};this.layers.forEach((function(n){var r=n.getId();if(e[r])throw new Error("Duplicate child layer id ("+r+") in the GroupTileLayer ("+t.getId()+")");e[r]=1}))},e}(Aa);Ea.registerJSONType("GroupTileLayer");var Ca={crs:null,uppercase:!1,detectRetina:!1},Ta={service:"WMS",request:"GetMap",layers:"",styles:"",format:"image/jpeg",transparent:!1,version:"1.1.1"},Ia=function(t){function e(e,n){var r;r=t.call(this,e)||this;var i=d({},Ta);for(var o in n)o in r.options||(i[o]=n[o]);r.setOptions(n),r.setZIndex(n.zIndex);var a=r.getTileSize();return i.width=a.width,i.height=a.height,r.wmsParams=i,r._wmsVersion=parseFloat(i.version),r}fe(e,t);var n=e.prototype;return n.onAdd=function(){var e=this.getMap().getDevicePixelRatio(),n=Ca.detectRetina?e:1;this.wmsParams.width*=n,this.wmsParams.height*=n;var r=this.options.crs||this.getMap().getProjection().code,i=this._wmsVersion>=1.3?"crs":"srs";this.wmsParams[i]=r,t.prototype.onAdd.call(this)},n.getTileUrl=function(e,n,r){var i=this.getSpatialReference().getResolution(r),o=this._getTileConfig().getTilePrjExtent(e,n,i),a=o.getMax(),s=o.getMin(),c=(this._wmsVersion>=1.3&&"EPSG:4326"===this.wmsParams.crs?[s.y,s.x,a.y,a.x]:[s.x,s.y,a.x,a.y]).join(","),u=t.prototype.getTileUrl.call(this,e,n,r);return u+function(t,e,n){var r=[];for(var i in t)r.push(encodeURIComponent(n?i.toUpperCase():i)+"="+encodeURIComponent(t[i]));return(e&&-1!==e.indexOf("?")?"&":"?")+r.join("&")}(this.wmsParams,u,this.options.uppercase)+(this.options.uppercase?"&BBOX=":"&bbox=")+c},n.toJSON=function(){return{type:"WMSTileLayer",id:this.getId(),options:this.config()}},e.fromJSON=function(t){return t&&"WMSTileLayer"===t.type?new e(t.id,t.options):null},e}(Aa);Ia.registerJSONType("WMSTileLayer"),Ia.mergeOptions(Ca);var Pa=function(t){function e(e,n){var r;return(r=t.call(this,e,n)||this).options.hasOwnProperty("forceRenderOnMoving")||(r.options.forceRenderOnMoving=!1),r}fe(e,t);var n=e.prototype;return n.drawTile=function(){},n.toJSON=function(){return{type:"CanvasTileLayer",id:this.getId(),options:this.config()}},e.fromJSON=function(t){return t&&"CanvasTileLayer"===t.type?new e(t.id,t.options):null},e}(Aa);function La(t,e,n){var r=t.createShader(e);if(t.shaderSource(r,n),t.compileShader(r),!t.getShaderParameter(r,t.COMPILE_STATUS)){var i=t.getShaderInfoLog(r);throw t.deleteShader(r),new Error("Failed to compile shader: "+i)}return r}Pa.registerJSONType("CanvasTileLayer");var Ra="\n attribute vec2 a_position;\n\n attribute vec2 a_texCoord;\n\n uniform mat4 u_matrix;\n\n varying vec2 v_texCoord;\n\n void main() {\n gl_Position = u_matrix * vec4(a_position, 0., 1.);\n\n v_texCoord = a_texCoord;\n }\n ",Oa="\n precision mediump float;\n\n uniform sampler2D u_image;\n\n uniform float u_opacity;\n uniform float u_debug_line;\n\n varying vec2 v_texCoord;\n\n void main() {\n if (u_debug_line == 1.) {\n gl_FragColor = vec4(0., 1., 0., 1.);\n } else {\n gl_FragColor = texture2D(u_image, v_texCoord) * u_opacity;\n }\n }\n ",ka=[0,0],Ba=[0,0,0],Da=new Array(16),Fa=new me(20,20),ja=function(t){var e=function(t){function e(){return t.apply(this,arguments)||this}fe(e,t);var n=e.prototype;return n.drawGLImage=function(t,e,n,r,i,o,a,s){this.gl.program!==this.program&&this.useProgram(this.program);var c=this.gl;this.loadTexture(t),Ba[0]=e||0,Ba[1]=n||0;var u=mo(Da);lo(u,u,Ba),ho(u,u,[o,o,1]),fo(u,this.getMap().projViewMatrix,u),c.uniformMatrix4fv(this.program.u_matrix,!1,u),c.uniform1f(this.program.u_opacity,a),c.uniform1f(this.program.u_debug_line,0);var l=t.glBuffer;!l||l.width===r&&l.height===i||(this.saveImageBuffer(l),delete t.glBuffer),t.glBuffer?c.bindBuffer(c.ARRAY_BUFFER,l):t.glBuffer=this.bufferTileData(0,0,r,i),ka[0]="a_position",ka[1]=2,ka[2]=t.glBuffer.type,this.enableVertexAttrib(ka),c.drawArrays(c.TRIANGLE_STRIP,0,4),s&&this.drawDebug(u,ka,0,0,r,i,s)},n.drawDebug=function(t,e,n,r,i,o,a){var s=this.gl;s.bindBuffer(s.ARRAY_BUFFER,this._debugBuffer),this.enableVertexAttrib(["a_position",2,"FLOAT"]),s.bufferData(s.ARRAY_BUFFER,new Float32Array([n,r,n+i,r,n+i,r-o,n,r-o,n,r]),s.DYNAMIC_DRAW),s.uniformMatrix4fv(this.program.u_matrix,!1,t),s.uniform1f(this.program.u_debug_line,1),s.drawArrays(s.LINE_STRIP,0,5);var c=this._debugInfoCanvas;if(!c){var u=this.getMap().getDevicePixelRatio()>1?2:1;(c=this._debugInfoCanvas=document.createElement("canvas")).width=256*u,c.height=32*u;var l=c.getContext("2d");l.font="20px monospace",l.scale(u,u)}var h=c.getContext("2d");h.clearRect(0,0,c.width,c.height);var f=this.layer.options.debugOutline;hn.fillText(h,a,Fa,f),this.loadTexture(c),s.texImage2D(s.TEXTURE_2D,0,s.RGBA,s.RGBA,s.UNSIGNED_BYTE,c);var d=n,p=n+(i=256),m=r,g=r-(o=32);s.bufferData(s.ARRAY_BUFFER,this.set8(d,m,d,g,p,m,p,g),s.DYNAMIC_DRAW),s.uniform1f(this.program.u_debug_line,0),s.drawArrays(s.TRIANGLE_STRIP,0,4)},n.bufferTileData=function(t,e,n,r,i){var o,a=t,s=t+n,c=e,u=e-r;o=g(a)&&g(s)&&g(c)&&g(u)?this.set8Int(a,c,a,u,s,c,s,u):this.set8(a,c,a,u,s,c,s,u);var l=this.loadImageBuffer(o,i);return l.width=n,l.height=r,l.type=o instanceof Int16Array?"SHORT":"FLOAT",l},n.drawTinImage=function(t,e,n,r,i){var o=this.gl;this.loadTexture(t),o.uniformMatrix4fv(this.program.u_matrix,!1,this.getMap().projViewMatrix),o.uniform1f(this.program.u_opacity,i),o.bindBuffer(o.ARRAY_BUFFER,this.posBuffer),this.enableVertexAttrib(["a_position",3]),o.bufferData(o.ARRAY_BUFFER,new Float32Array(e),o.DYNAMIC_DRAW),o.bindBuffer(o.ARRAY_BUFFER,this.texBuffer),this.enableVertexAttrib(["a_texCoord",2]),o.bufferData(o.ARRAY_BUFFER,new Float32Array(n),o.DYNAMIC_DRAW),o.bufferData(o.ELEMENT_ARRAY_BUFFER,new Uint16Array(r),o.DYNAMIC_DRAW),o.drawElements(o.TRIANGLES,r.length,o.UNSIGNED_SHORT,0)},n.createCanvas2=function(){this.canvas2=hn.createCanvas(this.canvas.width,this.canvas.height)},n.createGLContext=function(){this.canvas.gl&&this.canvas.gl.wrap?this.gl=this.canvas.gl.wrap():this.gl=function(t,e){for(var n={alpha:!0,stencil:!0,preserveDrawingBuffer:!0,antialias:!1},r=["webgl","experimental-webgl"],i=null,o=0;o<r.length;++o){try{i=t.getContext(r[o],e||n)}catch(t){}if(i)break}return i}(this.canvas2||this.canvas,this.layer.options.glOptions);var t=this.gl;t.clearColor(0,0,0,0),t.disable(t.DEPTH_TEST),t.enable(t.STENCIL_TEST),t.enable(t.BLEND),t.blendFunc(t.ONE,t.ONE_MINUS_SRC_ALPHA),this.program=this.createProgram(Ra,this.layer.options.fragmentShader||Oa,["u_matrix","u_image","u_opacity","u_debug_line"]),this._debugBuffer=this.createBuffer(),this.useProgram(this.program),this.texBuffer=this.createBuffer(),t.bindBuffer(t.ARRAY_BUFFER,this.texBuffer),this.enableVertexAttrib(["a_texCoord",2,"UNSIGNED_BYTE"]),t.bufferData(t.ARRAY_BUFFER,new Uint8Array([0,0,0,1,1,0,1,1]),t.STATIC_DRAW),this.enableSampler("u_image"),t.activeTexture(t.TEXTURE0),t.pixelStorei(t.UNPACK_PREMULTIPLY_ALPHA_WEBGL,!0)},n.resizeGLCanvas=function(){this.gl&&this.gl.viewport(0,0,this.canvas.width,this.canvas.height),this.canvas2&&(this.canvas2.width===this.canvas.width&&this.canvas2.height===this.canvas.height||(this.canvas2.width=this.canvas.width,this.canvas2.height=this.canvas.height))},n.clearGLCanvas=function(){this.gl&&this.gl.clear(this.gl.COLOR_BUFFER_BIT|this.gl.STENCIL_BUFFER_BIT)},n.disposeImage=function(t){t&&(t.texture&&this.saveTexture(t.texture),t.glBuffer&&this.saveImageBuffer(t.glBuffer),delete t.texture,delete t.glBuffer)},n._createTexture=function(t){var e=this.gl,n=this.getTexture()||e.createTexture();return e.bindTexture(e.TEXTURE_2D,n),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MIN_FILTER,e.LINEAR),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MAG_FILTER,e.LINEAR),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_S,e.CLAMP_TO_EDGE),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_T,e.CLAMP_TO_EDGE),e.texImage2D(e.TEXTURE_2D,0,e.RGBA,e.RGBA,e.UNSIGNED_BYTE,t),g(U(t.width))&&g(U(t.width))&&e.generateMipmap(e.TEXTURE_2D),n},n.getTexture=function(){this._textures||(this._textures=[]);var t=this._textures;return t&&t.length>0?t.pop():null},n.saveTexture=function(t){this._textures.push(t)},n.loadTexture=function(t){var e=this.gl,n=t.texture;return n||(n=this._createTexture(t),t.texture=n),e.bindTexture(e.TEXTURE_2D,n),n},n.getImageBuffer=function(){this._imageBuffers||(this._imageBuffers=[]);var t=this._imageBuffers;return t&&t.length>0?t.pop():null},n.saveImageBuffer=function(t){this._imageBuffers.push(t)},n.loadImageBuffer=function(t,e){var n=this.gl,r=e||this.createImageBuffer();return n.bindBuffer(n.ARRAY_BUFFER,r),n.bufferData(n.ARRAY_BUFFER,t,n.STATIC_DRAW),r},n.createImageBuffer=function(){return this.getImageBuffer()||this.createBuffer()},n.removeGLCanvas=function(){var t=this.gl;if(t){if(this._debugBuffer&&(t.deleteBuffer(this._debugBuffer),delete this._debugBuffer),this._buffers&&(this._buffers.forEach((function(e){t.deleteBuffer(e)})),delete this._buffers),this._textures&&(this._textures.forEach((function(e){return t.deleteTexture(e)})),delete this._textures),this._debugInfoCanvas){var e=this._debugInfoCanvas.texture;e&&t.deleteTexture(e),delete this._debugInfoCanvas.texture,delete this._debugInfoCanvas}var n=t.program;t.deleteShader(n.fragmentShader),t.deleteShader(n.vertexShader),t.deleteProgram(n),delete this.gl,delete this.canvas2}},n.createBuffer=function(){var t=this.gl.createBuffer();if(!t)throw new Error("Failed to create the buffer object");return this._buffers||(this._buffers=[]),this._buffers.push(t),t},n.enableVertexAttrib=function(t){!function(t,e,n){if(Array.isArray(n[0])){for(var r=Float32Array.BYTES_PER_ELEMENT,i=0,o=0;o<n.length;o++)i+=n[o][1]||0;for(var a=0,s=0;s<n.length;s++){var c=t.getAttribLocation(e,n[s][0]);if(c<0)throw new Error("Failed to get the storage location of "+n[s][0]);t.vertexAttribPointer(c,n[s][1],t[n[s][2]||"FLOAT"],!1,r*i,r*a),a+=n[s][1]||0,t.enableVertexAttribArray(c)}}else{var u=t.getAttribLocation(e,n[0]);t.vertexAttribPointer(u,n[1],t[n[2]||"FLOAT"],!1,0,0),t.enableVertexAttribArray(u)}}(this.gl,this.gl.program,t)},n.createProgram=function(t,e,n){var r=function(t,e,n){var r=La(t,t.VERTEX_SHADER,e),i=La(t,t.FRAGMENT_SHADER,n);if(!r||!i)return null;var o=t.createProgram();return o?(t.attachShader(o,r),t.attachShader(o,i),t.linkProgram(o),{program:o,vertexShader:r,fragmentShader:i}):null}(this.gl,t,e),i=r.program,o=r.vertexShader,a=r.fragmentShader;return i.vertexShader=o,i.fragmentShader=a,this._initUniforms(i,n),i},n.useProgram=function(t){var e=this.gl;return e.useProgram(t),e.program=t,this},n.enableSampler=function(t,e){var n=this.gl,r=this._getUniform(n.program,t);return e||(e=0),n.uniform1i(r,e),r},n._initUniforms=function(t,e){for(var n=0;n<e.length;n++){var r=e[n],i=e[n],o=r.indexOf("[");o>=0&&(r=r.substring(0,o),C||(i=i.substring(0,o))),t[r]=this._getUniform(t,i)}},n._getUniform=function(t,e){var n=this.gl.getUniformLocation(t,e);if(!n)throw new Error("Failed to get the storage location of "+e);return n},e}(t);return d(e.prototype,{set8:function(){var t=he.ie9?null:new Float32Array(8);return function(e,n,r,i,o,a,s,c){return t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=o,t[5]=a,t[6]=s,t[7]=c,t}}(),set8Int:function(){var t=he.ie9?null:new Int16Array(8);return function(e,n,r,i,o,a,s,c){return t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=o,t[5]=a,t[6]=s,t[7]=c,t}}()}),e},Ua={renderer:he.webgl?"gl":"canvas",crossOrigin:null},Na=new me(0,0),za=function(t){function e(e,n,r){var i;return!n||Array.isArray(n)||n.url||(r=n,n=null),(i=t.call(this,e,r)||this)._images=n,i}fe(e,t);var n=e.prototype;return n.onAdd=function(){this._prepareImages(this._images)},n.setImages=function(t){return this._images=t,this._prepareImages(t),this},n.getImages=function(){return this._images},n._prepareImages=function(t){t=t||[],Array.isArray(t)||(t=[t]);var e=this.getMap();this._imageData=t.map((function(t){var n=new Vn(t.extent);return d({},t,{extent:n,extent2d:n.convertTo((function(t){return e.coordToPoint(t,e.getGLZoom())}))})})),this._images=t;var n=this.getRenderer();n&&n.refreshImages()},e}(ei);za.mergeOptions(Ua);var Ga=[],Ha=function(t){function e(){return t.apply(this,arguments)||this}fe(e,t);var n=e.prototype;return n.isDrawable=function(){return!this.getMap().getPitch()||(console&&console.warn("ImageLayer with canvas renderer can't be pitched, use gl renderer ('renderer' : 'gl') instead."),!1)},n.checkResources=function(){var t=this;if(this._imageLoaded)return Ga;var e=this.layer._imageData.map((function(t){return[t.url,null,null]}));if(this.resources){var n=[],r=new gr;e.forEach((function(e){if(t.resources.isResourceLoaded(e)){var i=t.resources.getImage(e);r.addResource(e,i)}else n.push(e)})),this.resources.forEach((function(e,n){r.isResourceLoaded(e)||t.retireImage(n.image)})),this.resources=r,e=n}return this._imageLoaded=!0,e},n.retireImage=function(){},n.refreshImages=function(){this._imageLoaded=!1,this.setToRedraw()},n.needToRedraw=function(){var e=this.getMap();return!(e.isZooming()&&!e.getPitch())&&t.prototype.needToRedraw.call(this)},n.draw=function(){this.isDrawable()&&(this.prepareCanvas(),this._painted=!1,this._drawImages(),this.completeRender())},n._drawImages=function(){var t=this.layer._imageData,e=this.getMap(),n=e._get2DExtent(e.getGLZoom());if(t&&t.length)for(var r=0;r<t.length;r++){var i=t[r].extent2d,o=this.resources&&this.resources.getImage(t[r].url);o&&n.intersects(i)&&(this._painted=!0,this._drawImage(o,i,t[r].opacity||1))}},n._drawImage=function(t,e,n){var r=0,i=this.context;n<1&&(r=i.globalAlpha,i.globalAlpha=n);var o=this.getMap(),a=Na.set(e.xmin,e.ymax),s=o._pointToContainerPoint(a,o.getGLZoom()),c=s.x,u=s.y,l=o.getBearing();l&&(i.save(),i.translate(c,u),l&&i.rotate(-l*Math.PI/180),c=u=0);var h=o.getGLScale();i.drawImage(t,c,u,e.getWidth()/h,e.getHeight()/h),l&&i.restore(),r&&(i.globalAlpha=r)},n.drawOnInteracting=function(){this.draw()},e}(mr),Wa=function(t){function e(){return t.apply(this,arguments)||this}fe(e,t);var n=e.prototype;return n.isDrawable=function(){return!0},n._drawImage=function(t,e,n){this.drawGLImage(t,e.xmin,e.ymax,e.getWidth(),e.getHeight(),1,n)},n.createContext=function(){this.createGLContext()},n.resizeCanvas=function(e){this.canvas&&(t.prototype.resizeCanvas.call(this,e),this.resizeGLCanvas())},n.clearCanvas=function(){this.canvas&&(t.prototype.clearCanvas.call(this),this.clearGLCanvas())},n.retireImage=function(t){this.disposeImage(t)},n.onRemove=function(){this.removeGLCanvas(),t.prototype.onRemove.call(this)},e}(ja(Ha));za.registerRenderer("canvas",Ha),za.registerRenderer("gl",Wa);var Va=function(t){function e(){return t.apply(this,arguments)||this}fe(e,t);var n=e.prototype;return n.getPrepareParams=function(){return[]},n.getDrawParams=function(){return[]},n.onCanvasCreate=function(){this.canvas&&this.layer.options.doubleBuffer&&(this.buffer=hn.createCanvas(this.canvas.width,this.canvas.height,this.getMap().CanvasClass))},n.needToRedraw=function(){return!!this.layer.options.animation||!(this.getMap().isInteracting()&&!this.layer.drawOnInteracting)&&t.prototype.needToRedraw.call(this)},n.draw=function(){this.prepareCanvas(),this.prepareDrawContext(),this._drawLayer()},n.drawOnInteracting=function(){this._drawLayerOnInteracting()},n.getCanvasImage=function(){var e=t.prototype.getCanvasImage.call(this);if(e&&e.image&&this.layer.options.doubleBuffer){var n=e.image;this.buffer.width===n.width&&this.buffer.height===n.height||(this.buffer.width=n.width,this.buffer.height=n.height);var r=this.buffer.getContext("2d"),i=this.layer.doubleBuffer(r,this.context);(void 0===i||i)&&(hn.image(r,n,0,0),e.image=this.buffer)}return e},n.remove=function(){return delete this._drawContext,t.prototype.remove.call(this)},n.onZoomStart=function(e){this.layer.onZoomStart(e),t.prototype.onZoomStart.call(this,e)},n.onZooming=function(e){this.layer.onZooming(e),t.prototype.onZooming.call(this,e)},n.onZoomEnd=function(e){this.layer.onZoomEnd(e),t.prototype.onZoomEnd.call(this,e)},n.onMoveStart=function(e){this.layer.onMoveStart(e),t.prototype.onMoveStart.call(this,e)},n.onMoving=function(e){this.layer.onMoving(e),t.prototype.onMoving.call(this,e)},n.onMoveEnd=function(e){this.layer.onMoveEnd(e),t.prototype.onMoveEnd.call(this,e)},n.onResize=function(e){this.layer.onResize(e),t.prototype.onResize.call(this,e)},n.prepareDrawContext=function(){if(!this._predrawed){var t=Za(this.getPrepareParams());this._drawContext=this.layer.prepareToDraw.apply(this.layer,[this.context].concat(t)),this._drawContext||(this._drawContext=[]),Array.isArray(this._drawContext)||(this._drawContext=[this._drawContext]),this._predrawed=!0}},n._prepareDrawParams=function(){if(!this.getMap())return null;var t=this.getViewExtent();if(t.maskExtent&&!t.extent.intersects(t.maskExtent))return this.completeRender(),null;var e=[this.context,t],n=Za(this.getDrawParams());return e.push.apply(e,n),e.push.apply(e,this._drawContext),e},n._drawLayer=function(){var t=this._prepareDrawParams();t&&(this.layer.draw.apply(this.layer,t),this.completeRender())},n._drawLayerOnInteracting=function(){if(this.layer.drawOnInteracting){var t=this._prepareDrawParams();t&&(this.layer.drawOnInteracting.apply(this.layer,t),this.completeRender())}},e}(mr);function Za(t){return t||(t=[]),Array.isArray(t)||(t=[t]),t}var Qa=function(t){function e(){return t.apply(this,arguments)||this}fe(e,t);var n=e.prototype;return n.isCanvasRender=function(){return!0},n.prepareToDraw=function(){},n.draw=function(){},n.redraw=function(){return this._getRenderer()&&this._getRenderer().setToRedraw(),this},n.play=function(){return this.config("animation",!0),this},n.pause=function(){return this.config("animation",!1),this},n.isPlaying=function(){return this.options.animation},n.clearCanvas=function(){return this._getRenderer()&&this._getRenderer().clearCanvas(),this},n.requestMapToRender=function(){return this._getRenderer()&&this._getRenderer().requestMapToRender(),this},n.completeRender=function(){return this._getRenderer()&&this._getRenderer().completeRender(),this},n.onCanvasCreate=function(){return this},n.onZoomStart=function(){},n.onZooming=function(){},n.onZoomEnd=function(){},n.onMoveStart=function(){},n.onMoving=function(){},n.onMoveEnd=function(){},n.onResize=function(){},n.doubleBuffer=function(t){return t.clearRect(0,0,t.canvas.width,t.canvas.height),this},e}(ei);Qa.mergeOptions({doubleBuffer:!1,animation:!1}),Qa.registerRenderer("canvas",Va);var Xa=new me(0,0),Ya=function(t){function e(){return t.apply(this,arguments)||this}fe(e,t);var n=e.prototype;return n.getParticles=function(){},n.draw=function(t,e){var n=this.getParticles(f());if(n&&0!==n.length){var r=this.getMap(),i=e.extent;e.maskExtent&&(i=e.extent.intersection(e.maskExtent)),i=i.convertTo((function(t){return r._pointToContainerPoint(t,void 0,0,Xa)}));for(var o=2*Math.PI,a=0,s=n.length;a<s;a++){var c=n[a].point;if(i.contains(c)){var u=n[a].color||this.options.lineColor||"#fff",l=n[a].r;t.fillStyle!==u&&(t.fillStyle=u),l<=2?t.fillRect(c.x-l/2,c.y-l/2,l,l):(t.beginPath(),t.arc(c.x,c.y,l/2,0,o),t.fill())}}this._fillCanvas(t)}else this._getRenderer()&&(this._getRenderer()._shouldClear=!0)},n._fillCanvas=function(t){var e=t.globalCompositeOperation;t.globalCompositeOperation="destination-out";var n=this.options.trail||30;t.fillStyle="rgba(0, 0, 0, "+1/n+")",t.fillRect(0,0,t.canvas.width,t.canvas.height),t.globalCompositeOperation=e},e}(Qa);Ya.mergeOptions({animation:!0}),Ya.registerRenderer("canvas",function(t){function e(){return t.apply(this,arguments)||this}fe(e,t);var n=e.prototype;return n.draw=function(){this.canvas&&this.layer.options.animation&&!this._shouldClear||(this.prepareCanvas(),this._shouldClear=!1),this.prepareDrawContext(),this._drawLayer()},n.drawOnInteracting=function(){this.draw(),this._shouldClear=!1},n.onSkipDrawOnInteracting=function(){this._shouldClear=!0},e}(Va));var Ja=i+"_edit_stage_";function qa(t,e){return{markerType:t,markerFill:"#fff",markerLineColor:"#000",markerLineWidth:2,markerWidth:10,markerHeight:10,opacity:e}}var Ka={fixAspectRatio:!1,symbol:null,removeVertexOn:"contextmenu",centerHandleSymbol:qa("ellipse",1),vertexHandleSymbol:qa("square",1),newVertexHandleSymbol:qa("square",.4)},$a=function(t){function e(e,n){var r;return(r=t.call(this,n)||this)._geometry=e,r._geometry?r:de(r)}fe(e,t);var n=e.prototype;return n.getMap=function(){return this._geometry.getMap()},n.prepare=function(){this.getMap()&&(this.options.symbol&&(this._originalSymbol=this._geometry.getSymbol(),this._geometry.setSymbol(this.options.symbol)),this._prepareEditStageLayer())},n._prepareEditStageLayer=function(){var t=this.getMap(),e=L(),n=Ja+e,r=Ja+e+"_shadow";this._editStageLayer=t.getLayer(n),this._shadowLayer=t.getLayer(r),this._editStageLayer||(this._editStageLayer=new eo(n),t.addLayer(this._editStageLayer)),this._shadowLayer||(this._shadowLayer=new eo(r),t.addLayer(this._shadowLayer))},n.start=function(){var t=this;if(this._geometry&&this._geometry.getMap()&&!this._geometry.editing){var e=this.getMap();this.editing=!0;var n=this._geometry;this._geometryDraggble=n.options.draggable,n.config("draggable",!1),this.prepare();var r=n.copy();r.setSymbol(n._getInternalSymbol()),r.copyEventListeners(n),n._getParent()&&r.copyEventListeners(n._getParent()),r._setEventTarget(n),r.setId(null).config({draggable:!1}),this._shadow=r,this._switchGeometryEvents("on"),n.hide(),(n instanceof Mi||n instanceof Bi||n instanceof Fi||n instanceof Di)&&this._createOrRefreshOutline(),this._shadowLayer.bringToFront().addGeometry(r),this._editStageLayer.bringToFront(),this._addListener([e,"zoomstart",function(){t._editStageLayer.hide()}]),this._addListener([e,"zoomend",function(){t._editStageLayer.show()}]),n instanceof Mi?(r.config("draggable",!0),r.on("dragend",this._onMarkerDragEnd,this)):this._createCenterHandle(),n instanceof Mi?this.createMarkerEditor():n instanceof Bi?this.createCircleEditor():n instanceof Fi||n instanceof Di?this.createEllipseOrRectEditor():n instanceof ji||(n instanceof xi||n instanceof Ai)&&this.createPolygonEditor()}},n.stop=function(){delete this._history,delete this._historyPointer,delete this._editOutline,this._switchGeometryEvents("off"),this.getMap()&&(delete this._shadow,this._geometry.config("draggable",this._geometryDraggble),delete this._geometryDraggble,this._geometry.show(),this._editStageLayer.remove(),this._shadowLayer.remove(),this._clearAllListeners(),this._refreshHooks=[],this.options.symbol&&(this._geometry.setSymbol(this._originalSymbol),delete this._originalSymbol),this.editing=!1)},n.isEditing=function(){return!p(this.editing)&&this.editing},n._getGeometryEvents=function(){return{symbolchange:this._onGeoSymbolChange,"positionchange shapechange":this._exeAndReset}},n._switchGeometryEvents=function(t){if(this._geometry){var e=this._getGeometryEvents();for(var n in e)this._geometry[t](n,e[n],this)}},n._onGeoSymbolChange=function(t){this._shadow&&this._shadow.setSymbol(t.target._getInternalSymbol())},n._onMarkerDragEnd=function(){this._update("setCoordinates",this._shadow.getCoordinates().toArray()),this._refresh()},n._createOrRefreshOutline=function(){var t=this._geometry,e=this._editOutline;return e?(e.remove(),this._editOutline=e=t.getOutline(),this._editStageLayer.addGeometry(e)):(e=t.getOutline(),this._editStageLayer.addGeometry(e),this._editOutline=e,this._addRefreshHook(this._createOrRefreshOutline)),e},n._createCenterHandle=function(){var t,e=this,n=this._shadow.getCenter(),r=this.options.centerHandleSymbol,i=this.createHandle(n,{symbol:r,cursor:"move",onDown:function(){var n=kt((t=e._shadow.copy())._getInternalSymbol(),.5);t.setSymbol(n).addTo(e._editStageLayer)},onMove:function(e,n){var r=n.coordOffset;t.translate(r)},onUp:function(){e._update("setCoordinates",Ln.toNumberArrays(t.getCoordinates())),t.remove(),e._refresh()}});this._addRefreshHook((function(){var t=e._shadow.getCenter();i.setCoordinates(t)}))},n._createHandleInstance=function(t,e){var n=e.symbol;return new Mi(t,{draggable:!0,dragShadow:!1,dragOnAxis:e.axis,cursor:e.cursor,symbol:n})},n.createHandle=function(t,e){e||(e={});var n=this.getMap(),r=this._createHandleInstance(t,e),i=this;function o(t){return e.onDown&&(this._geometry.fire("handledragstart"),e.onDown.call(i,t.viewPoint,t)),!1}function a(t){i._hideContext();var o=n._prjToViewPoint(r._getPrjCoordinates());return e.onMove&&(this._geometry.fire("handledragging"),e.onMove.call(i,o,t)),!1}function s(t){return e.onUp&&(this._geometry.fire("handledragend"),e.onUp.call(i,t)),!1}return r.on("dragstart",o,this),r.on("dragging",a,this),r.on("dragend",s,this),r.on("removestart",(function t(){r.config("draggable",!1),r.off("dragstart",o,i),r.off("dragging",a,i),r.off("dragend",s,i),r.off("removestart",t,i),delete r["maptalks--editor-refresh-fn"]}),this),e.onRefresh&&(r["maptalks--editor-refresh-fn"]=e.onRefresh),this._editStageLayer.addGeometry(r),r},n._createResizeHandles=function(t,e,n){var r=this,i=["nw-resize","n-resize","ne-resize","w-resize","e-resize","sw-resize","s-resize","se-resize"],o=[null,"y",null,"x","x",null,"y",null],a=this._geometry;t||(t=[]);var s=this,c=[],u={},l=this.getMap(),h=this.options.vertexHandleSymbol,f=function(){for(var f=function(t){return[new me(t.xmin,t.ymax),new me((t.xmax+t.xmin)/2,t.ymax),new me(t.xmax,t.ymax),new me(t.xmin,(t.ymax+t.ymin)/2),new me(t.xmax,(t.ymax+t.ymin)/2),new me(t.xmin,t.ymin),new me((t.xmax+t.xmin)/2,t.ymin),new me(t.xmax,t.ymin)]}(a._getPainter().get2DExtent()),d=function(d){if(Array.isArray(t)&&t.some((function(t){return t===d})))return"continue";var p=f[d],m=l.pointToCoordinate(p);if(c.length<f.length-t.length){var g=r.createHandle(m,{symbol:h,cursor:i[d],axis:o[d],onMove:function(t){return function(n){s._updating=!0,e(n,t),a.fire("resizing")}}(d),onUp:function(){s._updating=!1,n(),r._refresh()}});g.setId(d),u[d]=c.length,c.push(g)}else c[u[d]].setCoordinates(m)},p=0;p<f.length;p++)d(p)};return f(),this._addRefreshHook(f),c},n.createMarkerEditor=function(){var t=this,e=this._geometry,n=this._shadow,r=this.getMap();if(n._canEdit()){this._history||this._recordHistory(h());var i=n._getInternalSymbol(),o=new me(0,0);m(i.markerDx)&&(o.x=i.markerDx),m(i.markerDy)&&(o.y=i.markerDy);var a=null;Tr.test(i)?"pin"!==i.markerType&&"pie"!==i.markerType&&"bar"!==i.markerType||(a=[5,6,7]):(Pr.test(i)||Fr.test(i))&&(a=[5,6,7]);var s,c=[2,1,2,0,0,2,1,2];if(this.options.fixAspectRatio){var u=n.getSize();s=u.width/u.height}var l=this._createResizeHandles(null,(function(i,u){if(a&&a.indexOf(u)>=0){var h=r.viewPointToCoordinate(i.sub(o)),f=n.getCoordinates();h.x=f.x,n.setCoordinates(h),t._updateCoordFromShadow(!0);var d=l[l.length-1-u];i=r.coordToViewPoint(d.getCoordinates())}var p=r._pointToViewPoint(n._getCenter2DPoint()).add(o),m=n._getInternalSymbol(),g=i.sub(p);a&&i.y>p.y&&(g.y=0);var v=a?1:2,y=2*Math.abs(g.x),_=Math.abs(g.y)*v;s&&(_=(y=Math.max(y,_*s))/s);var b=c[u];n instanceof Zi?((s||0===b||2===b)&&(n.setWidth(y),e.setWidth(y)),(s||1===b||2===b)&&(n.setHeight(_),e.setHeight(_))):((s||0===b||2===b)&&(m.markerWidth=y),(s||1===b||2===b)&&(m.markerHeight=_),n.setSymbol(m),e.setSymbol(m))}),(function(){t._update(h())}));this._addListener([r,"zoomend",function(){this._refresh()}])}else console&&console.warn("A marker can't be resized with symbol:",n.getSymbol());function h(){var t=[["setCoordinates",n.getCoordinates().toArray()]];return n instanceof Zi?(t.push(["setWidth",n.getWidth()]),t.push(["setHeight",n.getHeight()])):t.push(["setSymbol",n.getSymbol()]),t}},n.createCircleEditor=function(){var t=this,e=this._geometry,n=this._shadow,r=this.getMap();this._history||this._recordHistory([["setCoordinates",n.getCoordinates().toArray()],["setRadius",n.getRadius()]]),this._createResizeHandles(null,(function(t){var i=e.getCenter(),o=r.viewPointToCoordinate(t),a=new Ai([[i.x,i.y],[o.x,i.y]]),s=new Ai([[i.x,i.y],[i.x,o.y]]),c=Math.max(r.computeGeometryLength(a),r.computeGeometryLength(s));n.setRadius(c),e.setRadius(c)}),(function(){t._update("setRadius",n.getRadius())}))},n.createEllipseOrRectEditor=function(){var t=this,e=[2,1,2,0,0,2,1,2],n=this._geometry,r=this._shadow;this._history||this._recordHistory(c());var i,o=this.getMap(),a=this._geometry instanceof Fi;this.options.fixAspectRatio&&(i=n.getWidth()/n.getHeight());var s=this._createResizeHandles(null,(function(c,u){var l,h,f,d=a?1:2,p=c,m=e[u];if(a){var g=s[7-u],v=o.coordToViewPoint(g.getCoordinates()),y=(l=p.sub(v)).abs();h=o.pixelToDistance(y.x,0),f=o.pixelToDistance(0,y.y);var _=n.getSize(),b=s[0].getCoordinates(),x=o.viewPointToCoordinate(c),w=g.getCoordinates(),M=new Ai([[w.x,w.y],[x.x,w.y]]),S=new Ai([[w.x,w.y],[w.x,x.y]]);h=o.computeGeometryLength(M),f=o.computeGeometryLength(S),0===m?(i&&(y.y=y.x/i,_.height=Math.abs(y.y),f=h/i),p.y=v.y-_.height/2,x.y=b.y,x.x=4===u?Math.min(x.x,b.x):Math.min(x.x,w.x)):1===m?(i&&(y.x=y.y*i,_.width=Math.abs(y.x),h=f*i),p.x=v.x-_.width/2,x.x=b.x,x.y=Math.max(x.y,w.y)):(i&&(h>f*i?(f=h/i,p.y=v.y+y.x*j(l.y)/i):(h=f*i,p.x=v.x+y.y*j(l.x)*i)),x.x=Math.min(x.x,w.x),x.y=Math.max(x.y,w.y)),r.setCoordinates(x),t._updateCoordFromShadow(!0)}else{var A=n.getCenter(),E=o.viewPointToCoordinate(p),C=new Ai([[A.x,A.y],[E.x,A.y]]),T=new Ai([[A.x,A.y],[A.x,E.y]]);h=o.computeGeometryLength(C),f=o.computeGeometryLength(T),i&&(f=(h=Math.max(h,f*i))/i)}(i||0===m||2===m)&&(r.setWidth(h*d),n.setWidth(h*d)),(i||1===m||2===m)&&(r.setHeight(f*d),n.setHeight(f*d))}),(function(){t._update(c())}));function c(){return[["setCoordinates",r.getCoordinates().toArray()],["setWidth",r.getWidth()],["setHeight",r.getHeight()]]}},n.createPolygonEditor=function(){var t=this.getMap(),e=this._shadow,n=this,r=t.getProjection();this._history||this._recordHistory("setCoordinates",Ln.toNumberArrays(e.getCoordinates()));var i=e instanceof xi?3:2,o="maptalks--editor-refresh-fn",a="maptalks--editor-vertex-index",s={0:[]},c={0:[]};function u(t){if(void 0===t&&(t=0),e instanceof xi){var n=e.getCoordinates()[t]||[];return n.slice(0,n.length-1)}return e.getCoordinates()}function l(t){return void 0===t&&(t=0),0===t?e._getPrjCoordinates():e._getPrjHoles()[t-1]}function h(){for(var t in s){for(var e=s[t].length-1;e>=0;e--)s[t][e][a]=e;for(var r=c[t].length-1;r>=0;r--)c[t][r][a]=r}n._updateCoordFromShadow()}function f(t){var r,o=t.target,u=o[a],f=m(o._ringIndex)?o._ringIndex:0,d=l(f);d.length<=i||(d.splice(u,1),f>0?e._prjHoles[f-1]=d:e._setPrjCoordinates(d),e._updateCache(),s[f].splice(u,1)[0].remove(),u<c[f].length&&c[f].splice(u,1)[0].remove(),r=0===u?c[f].length-1:u-1,c[f].splice(r,1)[0].remove(),c[f].splice(r,0,g.call(n,r,f)),h(),n._refresh())}function d(r,i,a){void 0===a&&(a=0);var s,u=l(a),h=t._viewPointToPrj(r),f=u[i];f.x=h.x,f.y=h.y,e._updateCache(),e.onShapeChanged(),n._updateCoordFromShadow(!0),s=0===i?c[a].length-1:i-1,c[a][i]&&c[a][i][o](),c[a][s]&&c[a][s][o]()}function p(t,e){void 0===e&&(e=0);var r=u(e)[t],i=n.createHandle(r,{symbol:n.options.vertexHandleSymbol,cursor:"pointer",axis:null,onMove:function(t){d(t,i[a],e)},onRefresh:function(){r=u(e)[i[a]],i.setCoordinates(r)},onUp:function(){n._refresh(),n._updateCoordFromShadow()},onDown:function(t,e){!e||!e.domEvent||e.domEvent.button}});return i[a]=t,i._ringIndex=e,i.on(n.options.removeVertexOn,f),i}function g(t,i){void 0===i&&(i=0);var o,f=u(i);o=t+1>=f.length?f[0]:f[t+1];var m=f[t].add(o).multi(.5),v=n.createHandle(m,{symbol:n.options.newVertexHandleSymbol,cursor:"pointer",axis:null,onDown:function(t,o){if(!o||!o.domEvent||2!==o.domEvent.button){var s=l(i),u=v[a],h=r.project(v.getCoordinates());s.splice(u+1,0,h),i>0?e._prjHoles[i-1]=s:e._setPrjCoordinates(s),e._updateCache();var f=v.getSymbol();delete f.opacity,v.setSymbol(f),c[i].splice(u,0,g.call(n,u,i),g.call(n,u+1,i))}},onMove:function(t){d(t,v[a]+1,i)},onUp:function(t){if(!t||!t.domEvent||2!==t.domEvent.button){var e=v[a];B(v,c[i]),v.remove(),s[i].splice(e+1,0,p.call(n,e+1,i)),h(),n._updateCoordFromShadow(),n._refresh()}},onRefresh:function(){f=u(i);var t,e=v[a];t=e===f.length-1?0:e+1;var n=f[e].add(f[t]).multi(.5);v.setCoordinates(n)}});return v[a]=t,v}if(e instanceof xi)for(var v=e.getHoles().length+1,y=0;y<v;y++){s[y]=[],c[y]=[];for(var _=u(y),b=0,x=_.length;b<x;b++)s[y].push(p.call(this,b,y)),b<x-1&&c[y].push(g.call(this,b,y));c[y].push(g.call(this,_.length-1,y))}else for(var w=0,M=u(0).length;w<M;w++)s[0].push(p.call(this,w,0)),w<M-1&&c[0].push(g.call(this,w,0));this._addRefreshHook((function(){for(var t in c)for(var e=c[t].length-1;e>=0;e--)c[t][e][o](t);for(var n in s)for(var r=s[n].length-1;r>=0;r--)s[n][r][o](n)}))},n._refresh=function(){if(this._refreshHooks)for(var t=this._refreshHooks.length-1;t>=0;t--)this._refreshHooks[t].call(this)},n._hideContext=function(){this._geometry&&(this._geometry.closeMenu(),this._geometry.closeInfoWindow())},n._addListener=function(t){this._eventListeners||(this._eventListeners=[]),this._eventListeners.push(t),t[0].on(t[1],t[2],this)},n._clearAllListeners=function(){if(this._eventListeners&&this._eventListeners.length>0){for(var t=this._eventListeners.length-1;t>=0;t--){var e=this._eventListeners[t];e[0].off(e[1],e[2],this)}this._eventListeners=[]}},n._addRefreshHook=function(t){t&&(this._refreshHooks||(this._refreshHooks=[]),this._refreshHooks.push(t))},n._update=function(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];this._exeHistory([t,n]),this._recordHistory.apply(this,[t].concat(n))},n._updateCoordFromShadow=function(t){if(this._shadow){var e=this._shadow.getCoordinates(),n=this._geometry,r=this._updating;this._updating=!0,n.setCoordinates(e),t||this._recordHistory("setCoordinates",Ln.toNumberArrays(n.getCoordinates())),this._updating=r}},n._recordHistory=function(t){this._history||(this._history=[],this._historyPointer=0);for(var e=arguments.length,n=new Array(e>1?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];if(this._history.length){var i=this._history[this._history.length-1];if(i[0]===t&&JSON.stringify(i[1])===JSON.stringify(n))return}this._historyPointer<this._history.length-1&&this._history.splice(this._historyPointer+1),this._history.push([t,n]),this._historyPointer=this._history.length-1,this._geometry.fire("editrecord")},n.cancel=function(){if(!this._history||0===this._historyPointer)return this;this._historyPointer=0;var t=this._history[0];return this._exeAndReset(t),this},n.undo=function(){if(!this._history||0===this._historyPointer)return this;var t=this._history[--this._historyPointer];return this._exeAndReset(t),this},n.redo=function(){if(!this._history||this._historyPointer===this._history.length-1)return this;var t=this._history[++this._historyPointer];return this._exeAndReset(t),this},n._exeAndReset=function(t){if(!this._updating){this._exeHistory(t);var e=this._history,n=this._historyPointer;this.stop(),this._history=e,this._historyPointer=n,this.start()}},n._exeHistory=function(t){var e=this;if(Array.isArray(t)){var n=this._updating;this._updating=!0;var r=this._geometry;Array.isArray(t[0])?t[0].forEach((function(t){var n=t[0],i=t.slice(1);e._shadow[n].apply(e._shadow,i),r[n].apply(r,i)})):(this._shadow[t[0]].apply(this._shadow,t[1]),r[t[0]].apply(r,t[1])),this._updating=n}},e}(bn(Mn));$a.mergeOptions(Ka);var ts={startEditText:function(){return this.getMap()?(this.hide(),this.endEditText(),this._prepareEditor(),this._fireEvent("edittextstart"),this):this},endEditText:function(){if(this._textEditor){var t=this._textEditor.innerHTML;t=t.replace(/<p>/gi,"").replace(/<\/p>/gi,"<br/>"),this._textEditor.innerHTML=t;var e=this._textEditor.innerText.replace(/[\r\n]+$/gi,"");this.setContent(e),on(this._textEditor,"mousedown dblclick",He),this.getMap().off("mousedown",this.endEditText,this),this._editUIMarker.remove(),delete this._editUIMarker,this._textEditor.onkeyup=null,delete this._textEditor,this.show(),this._fireEvent("edittextend")}return this},isEditingText:function(){return!!this._textEditor},getTextEditor:function(){return this._editUIMarker},_prepareEditor:function(){var t=this.getMap(),e=this._createEditor();this._textEditor=e,t.on("mousedown",this.endEditText,this);var n=this._getEditorOffset();this._editUIMarker=new Uo(this.getCoordinates(),{animation:null,content:e,dx:n.dx,dy:n.dy}).addTo(t),this._setCursorToLast(this._textEditor)},_getEditorOffset:function(){var t=this._getInternalSymbol()||{},e=0,n=0,r=t.textHorizontalAlignment;return"middle"===r||p(r)?(e=(t.textDx||0)-2,n=(t.textDy||0)-2):(e=(t.markerDx||0)-2,n=(t.markerDy||0)-2),{dx:e,dy:n}},_createEditor:function(){var t=this.getContent(),e=this.getSize(),n=this._getInternalSymbol()||{},r=e.width,i=n.textFill||"#000000",o=n.textSize||12,a=e.height,s=n.markerLineColor||"#000",c=n.markerFill||"#3398CC",u=n.textLineSpacing||0,l=De("div");return l.contentEditable=!0,l.style.cssText="background:"+c+"; border:1px solid "+s+";\n color:"+i+";font-size:"+o+"px;width:"+(r-2)+"px;height:"+(a-2)+"px;margin: auto;\n line-height:"+(o+u)+"px;outline: 0; padding:0; margin:0;word-wrap: break-word;\n overflow: hidden;-webkit-user-modify: read-write-plaintext-only;",l.innerText=t,rn(l,"mousedown dblclick",He),l.onkeyup=function(t){var e=l.style.height||0;13===t.keyCode&&(l.style.height=parseInt(e)+o/2+"px")},l},_setCursorToLast:function(t){var e;window.getSelection?(t.focus(),(e=window.getSelection()).selectAllChildren(t),e.collapseToEnd()):document.selection&&((e=document.selection.createRange()).moveToElementText(t),e.collapse(!1),e.select())}};Vi.include(ts),$r.include({animate:function(t,e,n){var r=this;this._animPlayer&&this._animPlayer.finish(),_(e)&&(n=e),e||(e={});var i,o=this.getMap(),a=this._getProjection(),s=this.getSymbol()||{},c=this._prepareAnimationStyles(t),u=e.focus;if(delete this._animationStarted,o){var l=o._getRenderer();e.framer=function(t){l.callInNextFrame(t)}}var h=gi.animate(c,e,(function(t){if(o&&o.isRemoved())h.finish();else{o&&!r._animationStarted&&u&&o.onMoveStart();var e=t.styles;for(var c in e)if("symbol"!==c&&"translate"!==c&&e.hasOwnProperty(c)){var l="set"+c[0].toUpperCase()+c.slice(1);r[l](e[c])}var f=e.translate;if(f){var d=f;i&&(d=f.sub(i)),i=f,r.translate(d)}var p=e.symbol;if(p&&r.setSymbol(Bt(s,p)),o&&u){var m=a.project(r.getCenter());o._setPrjCenter(m);var g=o._parseEventFromCoord(a.unproject(m));"running"!==h.playState?o.onMoveEnd(g):o.onMoving(g)}r._fireAnimateEvent(h.playState),n&&n(t)}}),this);return this._animPlayer=h,this._animPlayer.play()},_prepareAnimationStyles:function(t){var e=this._getInternalSymbol(),n={};for(var r in t)if(t.hasOwnProperty(r)){var i=t[r];if("translate"!==r&&"symbol"!==r){var o=this["get"+r[0].toUpperCase()+r.substring(1)]();n[r]=[o,i]}else if("symbol"===r){var a=void 0;if(Array.isArray(t.symbol)){if(!Array.isArray(e))throw new Error("geometry'symbol isn't a composite symbol, while the symbol in styles is.");a=[];for(var s=t.symbol,c=0;c<s.length;c++)if(s[c]){var u={};for(var l in s[c])s[c].hasOwnProperty(l)&&(u[l]=[e[c][l],s[c][l]]);a.push(u)}else a.push(null)}else{if(Array.isArray(e))throw new Error("geometry'symbol is a composite symbol, while the symbol in styles isn't.");for(var h in a={},i)i.hasOwnProperty(h)&&(a[h]=[e[h],i[h]])}n.symbol=a}else"translate"===r&&(n.translate=new Ln(i))}return n},_fireAnimateEvent:function(t){"finished"===t?(delete this._animationStarted,this._fireEvent("animateend")):"running"===t&&(this._animationStarted?this._fireEvent("animating"):(this._fireEvent("animatestart"),this._animationStarted=!0))}});var es=i+"_drag_stage",ns=he.touch?"touchstart mousedown":"mousedown",rs=function(t){function e(e){return t.call(this,e)||this}fe(e,t);var n=e.prototype;return n.addHooks=function(){this.target.on(ns,this._startDrag,this)},n.removeHooks=function(){this._endDrag(),this.target.off(ns,this._startDrag,this),delete this.container},n._prepareDragHandler=function(){this._dragHandler=new Pn(this.container),this._dragHandler.on("dragging",this._dragging,this).on("mouseup",this._endDrag,this).enable()},n._prepareShadow=function(){var t=this,e=this.target;this._prepareDragStageLayer(),this._shadow&&this._shadow.remove();var n=this._shadow=e.copy();if(n.getGeometries){var r=n.getGeometries(),i=e.getGeometries();r.forEach((function(e,n){t._updateShadowSymbol(e,i[n])}))}else this._updateShadowSymbol(n,e);n.setId(null),this._prepareShadowConnectors()},n._updateShadowSymbol=function(t,e){if(t.setSymbol(e._getInternalSymbol()),e.options.dragShadow){var n=kt(t._getInternalSymbol(),.5);t.setSymbol(n)}},n._prepareShadowConnectors=function(){var t=this.target,e=this._shadow,n=this._dragStageLayer._getRenderer().resources,r=[];if(Ji._hasConnectors(t))for(var i=Ji._getConnectors(t),o=0,a=i.length;o<a;o++){var s,c=i[o],u=c.config(),l=c._getInternalSymbol();u.symbol=kt(l,.5),s=c.getConnectSource()===t?new c.constructor(e,c.getConnectTarget(),u):new c.constructor(c.getConnectSource(),e,u),r.push(s),c.getLayer()&&c.getLayer()._getRenderer()&&n.merge(c.getLayer()._getRenderer().resources)}this._shadowConnectors=r,r.push(e),this._dragStageLayer.bringToFront().addGeometry(r)},n._onTargetUpdated=function(){this._shadow&&this._shadow.setSymbol(this.target._getSymbol())},n._prepareDragStageLayer=function(){var t=this.target.getMap(),e=this.target.getLayer();this._dragStageLayer=t.getLayer(es),this._dragStageLayer||(this._dragStageLayer=new eo(es,{enableAltitude:e.options.enableAltitude,altitudeProperty:e.options.altitudeProperty}),t.addLayer(this._dragStageLayer));var n=new gr;n.merge(e._getRenderer().resources),this._dragStageLayer._getRenderer().resources=n},n._startDrag=function(t){var e=this.target.getMap();if(e&&!this.target._getParent()&&!this.isDragging()){var n=t.domEvent;n.touches&&n.touches.length>1||2===n.button||(this.container=e._panels.mapWrapper||e._containerDOM,this.target.on("click",this._endDrag,this),this._lastCoord=this._correctCoord(t.coordinate),this._lastPoint=t.containerPoint,this._prepareDragHandler(),this._dragHandler.onMouseDown(t.domEvent),rn(this.container,"mouseleave",this._endDrag,this),this._startParam=t,this._moved=!1)}},n._dragging=function(t){var e=this.target,n=e.getMap()._parseEvent(t.domEvent),r=n.domEvent;if(!(r.touches&&r.touches.length>1)){if(!this._moved)return this._moved=!0,e.on("symbolchange",this._onTargetUpdated,this),this._isDragging=!0,this._prepareShadow(),e.options.dragShadow||e.hide(),this._shadow._fireEvent("dragstart",n),this.target._fireEvent("dragstart",this._startParam||n),void delete this._startParam;if(this._shadow){var i=this._shadow.options.dragOnAxis,o=this._correctCoord(n.coordinate),a=n.containerPoint;this._lastPoint=this._lastPoint||a,this._lastCoord=this._lastCoord||o;var s=a.sub(this._lastPoint),c=o.sub(this._lastCoord);"x"===i?s.y=c.y=0:"y"===i&&(s.x=c.x=0),this._lastPoint=a,this._lastCoord=o,this._shadow.translate(c),e.options.dragShadow||e.translate(c),n.coordOffset=c,n.pointOffset=s,this._shadow._fireEvent("dragging",n),e._fireEvent("dragging",n)}}},n._endDrag=function(t){if(this._dragHandler&&(this._dragHandler.disable(),delete this._dragHandler),this.container&&on(this.container,"mouseleave",this._endDrag,this),this.target){var e=this.target;e.off("click",this._endDrag,this),e.off("symbolchange",this._onTargetUpdated,this),delete this._lastCoord,delete this._lastPoint,this._isDragging=!1;var n=e.getMap();if(this.enabled()&&n){var r=n._parseEvent(t?t.domEvent:null);this._updateTargetAndRemoveShadow(r),this._moved&&e._fireEvent("dragend",r)}}},n.isDragging=function(){return!!this._isDragging},n._updateTargetAndRemoveShadow=function(t){var e=this.target,n=e.getMap();e.options.dragShadow||e.show();var r=this._shadow;if(r){if(e.options.dragShadow)if(e.getGeometries){var i=r.getGeometries(),o=e.getGeometries();i.forEach((function(t,e){o[e].setCoordinates(i[e].getCoordinates())}))}else e.setCoordinates(r.getCoordinates());r._fireEvent("dragend",t),r.remove(),delete this._shadow}this._shadowConnectors&&(n.getLayer(es).removeGeometry(this._shadowConnectors),delete this._shadowConnectors),this._dragStageLayer&&this._dragStageLayer.remove()},n._correctCoord=function(t){var e=this.target.getMap();if(!e.getPitch())return t;var n=this.target._getPainter();if(!n.getMinAltitude())return t;var r=(n.getMinAltitude()+n.getMaxAltitude())/2;return e.locateByPoint(t,0,-r)},e}(wn);$r.mergeOptions({draggable:!1,dragShadow:!0,dragOnAxis:null}),$r.addInitHook("addHandler","draggable",rs),$r.include({isDragging:function(){return this._getParent()?this._getParent().isDragging():!!this.draggable&&this.draggable.isDragging()}}),$r.include({startEdit:function(t){return this.getMap()&&this.options.editable?(this.endEdit(),this._editor=new $a(this,t),this._editor.start(),this.fire("editstart"),this):this},endEdit:function(){return this._editor&&(this._editor.stop(),delete this._editor,this.fire("editend")),this},redoEdit:function(){return this.isEditing()?(this._editor.redo(),this.fire("redoedit"),this):this},undoEdit:function(){return this.isEditing()?(this._editor.undo(),this.fire("undoedit"),this):this},cancelEdit:function(){return this.isEditing()?(this._editor.cancel(),this.fire("canceledit"),this):this},isEditing:function(){return!!this._editor&&this._editor.isEditing()}}),$r.include({_onEvent:function(t,e){if(this.getMap()){var n=e||this._getEventTypeToFire(t);"contextmenu"===n&&this.listens("contextmenu")&&(He(t),Ge(t));var r=this._getEventParams(t);this._fireEvent(n,r)}},_getEventTypeToFire:function(t){return t.type},_getEventParams:function(t){var e=this.getMap(),n={domEvent:t},r=t.touches&&t.touches.length>0?t.touches[0]:t.changedTouches&&t.changedTouches.length>0?t.changedTouches[0]:t;if(r){var i=Qe(r,e._containerDOM);n.coordinate=e.containerPointToCoordinate(i),n.containerPoint=i,n.viewPoint=e.containerPointToViewPoint(i),n.pont2d=e._containerPointToPoint(i)}return n}}),$r.include({setInfoWindow:function(t){return this.removeInfoWindow(),t instanceof Go?(this._infoWindow=t,this._infoWinOptions=d({},this._infoWindow.options),this._infoWindow.addTo(this),this):(this._infoWinOptions=d({},t),this._infoWindow?this._infoWindow.setOptions(t):this.getMap()&&this._bindInfoWindow(this._infoWinOptions),this)},getInfoWindow:function(){return this._infoWindow?this._infoWindow:null},openInfoWindow:function(t){return this.getMap()?(t||(t=this.getCenter()),this._infoWindow?this._infoWindow.show(t):this._infoWinOptions&&this.getMap()&&(this._bindInfoWindow(this._infoWinOptions),this._infoWindow.show(t)),this):this},closeInfoWindow:function(){return this._infoWindow&&this._infoWindow.hide(),this},removeInfoWindow:function(){return this._unbindInfoWindow(),delete this._infoWinOptions,delete this._infoWindow,this},_bindInfoWindow:function(t){return this._infoWindow=new Go(t),this._infoWindow.addTo(this),this},_unbindInfoWindow:function(){return this._infoWindow&&(this.closeInfoWindow(),this._infoWindow.remove(),delete this._infoWindow),this}});var is=function(){function t(t,e){this.max=t,this.onRemove=e,this.reset()}var e=t.prototype;return e.reset=function(){for(var t in this.data)this.onRemove(this.data[t]);return this.data={},this.order=[],this},e.clear=function(){this.reset(),delete this.onRemove},e.add=function(t,e){if(this.has(t))this.order.splice(this.order.indexOf(t),1),this.data[t]=e,this.order.push(t);else if(this.data[t]=e,this.order.push(t),this.order.length>this.max){var n=this.getAndRemove(this.order[0]);n&&this.onRemove(n)}return this},e.has=function(t){return t in this.data},e.keys=function(){return this.order},e.getAndRemove=function(t){if(!this.has(t))return null;var e=this.data[t];return delete this.data[t],this.order.splice(this.order.indexOf(t),1),e},e.get=function(t){return this.has(t)?this.data[t]:null},e.remove=function(t){if(!this.has(t))return this;var e=this.data[t];return delete this.data[t],this.onRemove(e),this.order.splice(this.order.indexOf(t),1),this},e.setMaxSize=function(t){for(this.max=t;this.order.length>this.max;){var e=this.getAndRemove(this.order[0]);e&&this.onRemove(e)}return this},t}(),os=new me(0,0),as=new me(0,0),ss=new me(0,0),cs=new me(0,0),us=function(t){function e(e){var n;return(n=t.call(this,e)||this).tilesInView={},n.tilesLoading={},n._parentTiles=[],n._childTiles=[],n.tileCache=new is(e.options.maxCacheSize,n.deleteTile.bind(de(de(n)))),n}fe(e,t);var n=e.prototype;return n.getCurrentTileZoom=function(){return this._tileZoom},n.draw=function(){var t=this.getMap();if(this.isDrawable()){var e=this.prepareCanvas();if(!e||e.intersects(this.canvasExtent2D)){var n=this.layer.getTiles().tileGrids;if(n&&n.length){var r=0,i=!1,o={},a=[],s=[],c={},u=[],l={},h=[],f={},d={},p=this._markTiles(),m=this._getLoadLimit(),g=n.length;this._tileZoom=n[0].zoom;for(var v=0;v<g;v++)for(var y=n[v],_=y.tiles,b=this._generatePlaceHolder(y.zoom),x=0,w=_.length;x<w;x++){var M=_[x],S=M.id,A=!1;if(this._isLoadingTile(S))A=i=!0,this.tilesLoading[S].current=!0;else{var E=this._getCachedTile(S);E?(E.image&&this.getTileOpacity(E.image)<1&&(A=i=!0),a.push(E)):(A=i=!0,m&&r+p[0]>m||t.isInteracting()&&!t.isMoving()&&!t.isRotating()||(r++,d[S]=M))}if(A&&!o[S]){o[S]=1,b&&!f[S]&&(M.cache=!1,h.push({image:b,info:M}),f[S]=1);var C=this._findParentTile(M);if(C){var T=C.info.id;void 0===c[T]&&(c[T]=s.length,s.push(C))}else if(!s.length){var I=this._findChildTiles(M);I.length&&I.forEach((function(t){l[t.info.id]||(u.push(t),l[t.info.id]=1)}))}}}s.length&&(u.length=0,this._childTiles.length=0),this._drawTiles(a,s,u,h),r?this.loadTileQueue(d):i||(t.isAnimating()||!this._parentTiles.length&&!this._childTiles.length||(this._parentTiles=[],this._childTiles=[],this.setToRedraw()),this.completeRender()),this._retireTiles()}else this.completeRender()}else this.completeRender()}},n.isTileCachedOrLoading=function(t){return this.tilesLoading[t]||this.tilesInView[t]||this.tileCache.get(t)},n._drawTiles=function(t,e,n,r){var i=this;e.length&&(e.sort((function(t,e){return Math.abs(e.info.z-i._tileZoom)-Math.abs(t.info.z-i._tileZoom)})),this._parentTiles=e),n.length&&(this._childTiles=n);var o={tiles:t,parentTiles:this._parentTiles,childTiles:this._childTiles};this.onDrawTileStart(o),this._parentTiles.forEach((function(t){return i._drawTileAndCache(t)})),this._childTiles.forEach((function(t){return i._drawTile(t.info,t.image)})),r.forEach((function(t){return i._drawTile(t.info,t.image)}));var a=this.layer,s=this.getMap();if(!a.options.cascadeTiles||s.getPitch()<=s.options.cascadePitches[0])t.forEach((function(t){return i._drawTileAndCache(t)}));else{this.writeZoomStencil();for(var c=!1,u=0,l=t.length;u<l;u++)t[u].info.z!==this._tileZoom?c?this.resumeZoomStencilTest():(this.startZoomStencilTest(),c=!0):c&&this.pauseZoomStencilTest(),this._drawTileAndCache(t[u]);this.endZoomStencilTest()}this.onDrawTileEnd(o)},n.writeZoomStencil=function(){},n.startZoomStencilTest=function(){},n.endZoomStencilTest=function(){},n.pauseZoomStencilTest=function(){},n.resumeZoomStencilTest=function(){},n.onDrawTileStart=function(){},n.onDrawTileEnd=function(){},n._drawTile=function(t,e){e&&this.drawTile(t,e)},n._drawTileAndCache=function(t){t.current=!0,this.tilesInView[t.info.id]=t,this._drawTile(t.info,t.image),this.tileCache.add(t.info.id,t)},n.drawOnInteracting=function(){this.draw()},n.needToRedraw=function(){var e=this.getMap();return e.getPitch()?t.prototype.needToRedraw.call(this):!(!e.isRotating()&&!e.isZooming())||(e.isMoving()?!!this.layer.options.forceRenderOnMoving:t.prototype.needToRedraw.call(this))},n.hitDetect=function(){return!1},n._getLoadLimit=function(){return this.getMap().isInteracting()?this.layer.options.loadingLimitOnInteracting:0},n.isDrawable=function(){return!this.getMap().getPitch()||(console&&console.warn("TileLayer with canvas renderer can't be pitched, use gl renderer ('renderer' : 'gl') instead."),this.clear(),!1)},n.clear=function(){this._retireTiles(!0),this.tileCache.reset(),this.tilesInView={},this.tilesLoading={},this._parentTiles=[],this._childTiles=[],t.prototype.clear.call(this)},n._isLoadingTile=function(t){return!!this.tilesLoading[t]},n.clipCanvas=function(e){return t.prototype.clipCanvas.call(this,e)},n._clipByPitch=function(t){var e=this.getMap();if(e.getPitch()<=e.options.maxVisualPitch)return!1;if(!this.layer.options.clipByPitch)return!1;var n=e.getContainerExtent(),r=e.getDevicePixelRatio();return t.save(),t.strokeStyle="rgba(0, 0, 0, 0)",t.beginPath(),t.rect(0,Math.ceil(n.ymin)*r,Math.ceil(n.getWidth())*r,Math.ceil(n.getHeight())*r),t.stroke(),t.clip(),!0},n.loadTileQueue=function(t){for(var e in t)if(t.hasOwnProperty(e)){var n=t[e],r=this.loadTile(n);void 0===r.loadTime&&(this.tilesLoading[n.id]={image:r,current:!0,info:n})}},n.loadTile=function(t){var e=this.layer.getTileSize(),n=new Image;return n.width=e.width,n.height=e.height,n.onload=this.onTileLoad.bind(this,n,t),n.onerror=this.onTileError.bind(this,n,t),this.loadTileImage(n,t.url),n},n.loadTileImage=function(t,e){var n=this.layer.options.crossOrigin;return p(n)||(t.crossOrigin=n),I(t,[e])},n.abortTileLoading=function(t){t&&(t.onload=ls,t.onerror=ls,t.src=K)},n.onTileLoad=function(t,e){if(this.layer){var n=e.id;if(this.tilesInView){var r={tile:e,tileImage:t};this.layer.fire("tileload",r),(t=r.tileImage).loadTime=f(),delete this.tilesLoading[n],this._addTileToCache(e,t),this.setToRedraw()}}},n.onTileError=function(t,e){if(this.layer){if(t.onerrorTick=t.onerrorTick||0,this.layer.options.tileRetryCount>t.onerrorTick)return t.onerrorTick++,void(t.src=e.url);if(t instanceof Image){var n=this.layer.options.errorUrl;if(n&&t.src!==n)return void(t.src=n);this.abortTileLoading(t,e)}t.loadTime=0,delete this.tilesLoading[e.id],this._addTileToCache(e,t),this.setToRedraw(),this.layer.fire("tileerror",{tile:e})}},n.drawTile=function(t,e){if(e&&this.getMap()){var n=t.extent2d,r=t.offset,i=os.set(n.xmin-r[0],n.ymax-r[1]),o=t.z,a=t.id,s=this.getMap(),c=this.layer.getTileSize(),u=s.getZoom(),l=this.context,h=s._pointToContainerPoint(i,o,0,as),f=s.getBearing(),d=f||u!==o,p=this.getTileOpacity(e),m=l.globalAlpha;p<1&&(l.globalAlpha=p,this.setToRedraw()),d||h._round();var g=h.x,v=h.y,y=c.width,_=c.height;if(d){if(l.save(),l.translate(g,v),f&&(l.rotate(-f*Math.PI/180),y+=.1,_+=.1),u!==o){var b=s._getResolution(o)/s._getResolution();l.scale(b,b)}g=v=0}if(hn.image(l,e,g,v,y,_),this.layer.options.debug){var x=this.layer.options.debugOutline;l.save(),l.strokeStyle=x,l.fillStyle=x,l.strokeWidth=10,l.font="20px monospace";var w=new me(g,v);hn.rectangle(l,w,{width:y,height:_},1,0),hn.fillText(l,this.getDebugInfo(a),w._add(10,20),x),hn.drawCross(l,g+y/2,v+_/2,2,x),l.restore()}d&&l.restore(),l.globalAlpha!==m&&(l.globalAlpha=m),this.setCanvasUpdated()}},n.getDebugInfo=function(t){var e=t.split("_"),n=e.length;return"x:"+e[n-2]+", y:"+e[n-3]+", z:"+e[n-1]},n._findChildTiles=function(t){var e=this._getLayerOfTile(t.layer);if(!e.options.background)return[];for(var n=this.getMap(),r=[],i=t.extent2d.getMin(),o=t.extent2d.getMax(),a=t.offset,s=e._project(n._pointToPrj(i,t.z,ss),ss),c=e._project(n._pointToPrj(o,t.z,cs),cs),u=1;u<2;u++)this._findChildTilesAt(r,s,c,e,t.z+u,a);return r},n._findChildTilesAt=function(t,e,n,r,i,o){var a=r.options.zoomOffset,s=r.getId(),c=r.getSpatialReference().getResolution(i+a);if(c)for(var u,l,h=r._getTileConfig().getTileIndex(e,c,o),f=r._getTileConfig().getTileIndex(n,c,o),d=Math.min(h.idx,f.idx),p=Math.max(h.idx,f.idx),m=Math.min(h.idy,f.idy),g=Math.max(h.idy,f.idy),v=d;v<p;v++)for(var y=m;y<g;y++)u=r._getTileId(v,y,i+a,s),this.tileCache.has(u)&&(l=this.tileCache.getAndRemove(u),t.push(l),this.tileCache.add(u,l))},n._findParentTile=function(t){var e=this.getMap(),n=this._getLayerOfTile(t.layer);if(!n.options.background)return null;for(var r=n.getSpatialReference(),i=r.getZoomDirection(),o=n.options.zoomOffset,a=n.options.backgroundZoomDiff,s=t.extent2d.getCenter(),c=t.offset,u=n._project(e._pointToPrj(s,t.z)),l=1;l<=a;l++){var h=t.z-i*l,f=r.getResolution(h+o);if(f){var d=n._getTileConfig().getTileIndex(u,f,c),p=n._getTileId(d.x,d.y,h+o,t.layer);if(this.tileCache.has(p)){var m=this.tileCache.getAndRemove(p);return this.tileCache.add(p,m),m}}}return null},n._getLayerOfTile=function(t){return this.layer.getChildLayer?this.layer.getChildLayer(t):this.layer},n._getCachedTile=function(t){var e=this.tilesInView,n=this.tileCache.getAndRemove(t);if(n){e[t]=n;var r=this.tilesLoading;if(r&&r[t]){r[t].current=!1;var i=r[t],o=i.image,a=i.info;this.abortTileLoading(o,a),delete r[t]}}else n=e[t];return n},n._addTileToCache=function(t,e){this.tilesInView[t.id]={image:e,current:!0,info:t}},n.getTileOpacity=function(t){return this.layer.options.fadeAnimation&&t.loadTime?Math.min(1,(f()-t.loadTime)/(1e3/60*10)):1},n.onRemove=function(){this.clear(),delete this.tileCache,delete this._tilePlaceHolder,t.prototype.onRemove.call(this)},n._markTiles=function(){var t=0,e=0;if(this.tilesLoading)for(var n in this.tilesLoading)this.tilesLoading[n].current=!1,t++;if(this.tilesInView)for(var r in this.tilesInView)this.tilesInView[r].current=!1,e++;return[t,e]},n._retireTiles=function(t){for(var e in this.tilesLoading){var n=this.tilesLoading[e];!t&&n.current||(n.image&&this.abortTileLoading(n.image,n.info),this.deleteTile(n),delete this.tilesLoading[e])}for(var r in this.tilesInView){var i=this.tilesInView[r];i.current||(delete this.tilesInView[r],this.tileCache.has(r)||this.deleteTile(i))}},n.deleteTile=function(t){t&&t.image&&(t.image.onload=null,t.image.onerror=null)},n._generatePlaceHolder=function(t){var e=this.getMap(),n=this.layer.options.placeholder;if(!n||e.getPitch())return null;var r=this.layer.getTileSize(),i=e._getResolution(t)/e._getResolution(),o=this._tilePlaceHolder=this._tilePlaceHolder||hn.createCanvas(1,1,e.CanvasClass);return o.width=r.width*i,o.height=r.height*i,_(n)?n(o):function(t){var e=t.getContext("2d"),n=t.width,r=t.height,i=n/16,o=r/16;e.beginPath();for(var a=0;a<16;a++)e.moveTo(0,a*o),e.lineTo(n,a*o),e.moveTo(a*i,0),e.lineTo(a*i,r);e.strokeStyle="rgba(180, 180, 180, 0.1)",e.lineWidth=1,e.stroke(),e.beginPath();for(var s=[[0,0],[n,0],[0,r],[n,r],[0,0],[0,r],[n,0],[n,r],[0,r/2],[n,r/2],[n/2,0],[n/2,r]],c=1;c<s.length;c+=2)e.moveTo(s[c-1][0],s[c-1][1]),e.lineTo(s[c][0],s[c][1]);e.lineWidth=4,e.stroke()}(o),o},e}(mr);function ls(){return!1}Aa.registerRenderer("canvas",us);var hs=new me(0,0),fs=function(t){function e(){return t.apply(this,arguments)||this}fe(e,t);var n=e.prototype;return n.isDrawable=function(){return!0},n.needToRedraw=function(){var e=this.getMap();return!(!this._gl()||e.getPitch()||!e.isZooming()||e.isMoving()||e.isRotating())||t.prototype.needToRedraw.call(this)},n.drawTile=function(e,n){var r=this.getMap();if(e&&r&&n){var i=e._glScale=e._glScale||r.getGLScale(e.z),o=this.layer.getTileSize(),a=o.width,s=o.height;if(!1!==e.cache&&this._bindGLBuffer(n,a,s),this._gl()){var c=e.extent2d,u=e.offset,l=hs.set(c.xmin-u[0],e.extent2d.ymax-u[1]),h=l.x*i,f=l.y*i,d=this.getTileOpacity(n),p=null;this.layer.options.debug&&(p=this.getDebugInfo(e.id)),this.drawGLImage(n,h,f,a,s,i,d,p),d<1?this.setToRedraw():this.setCanvasUpdated()}else t.prototype.drawTile.call(this,e,n)}},n.writeZoomStencil=function(){var t=this.gl;t.stencilFunc(t.ALWAYS,1,255),t.stencilOp(t.KEEP,t.KEEP,t.REPLACE)},n.startZoomStencilTest=function(){var t=this.gl;t.stencilOp(t.KEEP,t.KEEP,t.KEEP),t.stencilFunc(t.EQUAL,0,255)},n.endZoomStencilTest=function(){this.pauseZoomStencilTest()},n.pauseZoomStencilTest=function(){var t=this.gl;t.stencilFunc(t.ALWAYS,1,255)},n.resumeZoomStencilTest=function(){var t=this.gl;t.stencilFunc(t.EQUAL,0,255)},n._bindGLBuffer=function(t,e,n){t.glBuffer||(t.glBuffer=this.bufferTileData(0,0,e,n))},n.loadTileImage=function(t,e){var n=this.layer.options.crossOrigin;t.crossOrigin=null!==n?n:"",t.src=e},n.onCanvasCreate=function(){this.canvas.gl&&this.canvas.gl.wrap||this.createCanvas2()},n.createContext=function(){t.prototype.createContext.call(this),this.createGLContext()},n.resizeCanvas=function(e){this.canvas&&(t.prototype.resizeCanvas.call(this,e),this.resizeGLCanvas())},n.clearCanvas=function(){this.canvas&&(t.prototype.clearCanvas.call(this),this.clearGLCanvas())},n.getCanvasImage=function(){if(!this._gl()||!this.canvas2)return t.prototype.getCanvasImage.call(this);var e=t.prototype.getCanvasImage.call(this);return e&&(e.image=this.canvas2),e},n._gl=function(){if(this.canvas.gl&&this.canvas.gl.wrap)return!0;var t=this.getMap();return t&&(t.getPitch()||t.getBearing())||this.layer&&!!this.layer.options.fragmentShader},n.deleteTile=function(e){t.prototype.deleteTile.call(this,e),e&&e.image&&this.disposeImage(e.image),delete e.image},n.onRemove=function(){t.prototype.onRemove.call(this),this.removeGLCanvas()},e}(ja(us));function ds(t){var e=this.layer.getTileSize(),n=this.canvas.constructor,r=this.getMap(),i=r.getDevicePixelRatio(),o=hn.createCanvas(e.width*i,e.height*i,n);o.layer=this.layer;var a=this,s=new me(t.extent2d.xmin,t.extent2d.ymax),c=new Vn(r.pointToCoordinate(s),r.pointToCoordinate(s.add(e.width,e.height)),r.getProjection());return this.layer.drawTile(o,{url:t.url,point:s,center:r.pointToCoordinate(s.add(e.width/2,e.height/2)),extent:c,z:t.z,x:t.x,y:t.y},(function(e){e?a.onTileError(o,t):a.onTileLoad(o,t)})),o}Aa.registerRenderer("gl",fs);var ps=function(t){function e(){return t.apply(this,arguments)||this}return fe(e,t),e.prototype.loadTile=function(){return ds.apply(this,arguments)},e}(us),ms=function(t){function e(){return t.apply(this,arguments)||this}return fe(e,t),e.prototype.loadTile=function(){return ds.apply(this,arguments)},e}(fs);Pa.registerRenderer("canvas",ps),Pa.registerRenderer("gl",ms);var gs=function(t){function e(){return t.apply(this,arguments)||this}fe(e,t);var n=e.prototype;return n.checkResources=function(){var t=this._geosToCheck;if(this._resourceChecked||t||(t=this.layer._geoList),!H(t))return[];for(var e=[],n={},r=t.length-1;r>=0;r--){var i=t[r]._getExternalResources();if(i.length)if(this.resources)for(var o=0;o<i.length;o++){var a=i[o][0];this.resources.isResourceLoaded(i[o])||n[a]||(e.push(i[o]),n[a]=1)}else e.push.apply(e,i)}return this._resourceChecked=!0,delete this._geosToCheck,e},n.render=function(){return this.layer._sortGeometries(),t.prototype.render.apply(this,arguments)},n._addGeoToCheckRes=function(t){t&&(Array.isArray(t)||(t=[t]),this._geosToCheck||(this._geosToCheck=[]),k(this._geosToCheck,t))},n.onGeometryAdd=function(t){this._addGeoToCheckRes(t),vs(this)},n.onGeometryRemove=function(){vs(this)},n.onGeometrySymbolChange=function(t){this._addGeoToCheckRes(t.target),vs(this)},n.onGeometryShapeChange=function(){vs(this)},n.onGeometryPositionChange=function(){vs(this)},n.onGeometryZIndexChange=function(){vs(this)},n.onGeometryShow=function(){vs(this)},n.onGeometryHide=function(){vs(this)},n.onGeometryPropertiesChange=function(){vs(this)},e}(mr);function vs(t){t.layer.options.drawImmediate&&t.render(),t.setToRedraw()}var ys=new Zn,_s=function(t){function e(){return t.apply(this,arguments)||this}fe(e,t);var n=e.prototype;return n.checkResources=function(){var e=this,n=t.prototype.checkResources.apply(this,arguments),r=this.layer.getStyle();return r&&(Array.isArray(r)||(r=[r]),r.forEach((function(t){for(var r=It(t.symbol,!0),i=0,o=r.length;i<o;i++)e.resources.isResourceLoaded(r[i])||n.push(r[i])}))),n},n.needToRedraw=function(){var e=this.getMap();return!(!e.isInteracting()||!this.layer.options.enableAltitude)||!(e.isZooming()&&!e.isRotating()&&!e.getPitch()&&!this._hasPoint&&this.layer.constructor===eo)&&t.prototype.needToRedraw.call(this)},n.draw=function(){if(this.getMap()){if(!this.layer.isVisible()||this.layer.isEmpty())return this.clearCanvas(),void this.completeRender();this.prepareCanvas(),this.drawGeos(),this.completeRender()}},n.isBlank=function(){return!!this.context&&!this.context.canvas._drawn},n.drawOnInteracting=function(){if(this._geosToDraw){this._updateDisplayExtent();var t=this.getMap(),e=this.layer.getCount(),n=this.getMap().getResolution();(t.isZooming()&&t.options.seamlessZoom&&void 0!==this._drawnRes&&n>1.5*this._drawnRes&&this._geosToDraw.length<e||t.isMoving()||t.isInteracting())&&(this.prepareToDraw(),this.forEachGeo(this.checkGeo,this),this._drawnRes=n);for(var r=0,i=this._geosToDraw.length;r<i;r++){var o=this._geosToDraw[r];o.isVisible()&&o._paint(this._displayExtent)}}},n.show=function(){this.layer.forEach((function(t){t._repaint()})),t.prototype.show.apply(this,arguments)},n.forEachGeo=function(t,e){this.layer.forEach(t,e)},n.drawGeos=function(){this._drawnRes=this.getMap().getResolution(),this._updateDisplayExtent(),this.prepareToDraw(),this.forEachGeo(this.checkGeo,this);for(var t=0,e=this._geosToDraw.length;t<e;t++)this._geosToDraw[t]._paint()},n.prepareToDraw=function(){this._hasPoint=!1,this._geosToDraw=[]},n.checkGeo=function(t){if(t&&t.isVisible()&&t.getMap()&&t.getLayer()&&t.getLayer().isCanvasRender()){var e=t._getPainter(),n=e.get2DExtent(this.resources,ys);n&&n.intersects(this._displayExtent)&&(e.hasPoint()&&(this._hasPoint=!0),this._geosToDraw.push(t))}},n.onZoomEnd=function(){delete this.canvasExtent2D,t.prototype.onZoomEnd.apply(this,arguments)},n.onRemove=function(){this.forEachGeo((function(t){t.onHide()})),delete this._geosToDraw},n.onGeometryPropertiesChange=function(e){e&&this.layer._styleGeometry(e.target),t.prototype.onGeometryPropertiesChange.call(this,e)},n._updateDisplayExtent=function(){var t=this.canvasExtent2D;if(this._maskExtent){if(!this._maskExtent.intersects(t))return void this.completeRender();t=t.intersection(this._maskExtent)}this._displayExtent=t},n.identify=function(t,e){void 0===e&&(e={});var n=this._geosToDraw;return n?this.layer._hitGeos(n,t,e):[]},e}(gs);eo.registerRenderer("canvas",_s);var bs=function(t){function e(e){var n;return(n=t.call(this)||this).map=e,n._handlerQueue={},n}fe(e,t);var n=e.prototype;return n.callInNextFrame=function(t){this._handlerQueue.push(t)},n.executeFrameCallbacks=function(){var t=this._handlerQueue;this._handlerQueue=[];for(var e=0,n=t.length;e<n;e++)t[e]()},n.offsetPlatform=function(t,e){if(!this.map._panels.front)return this;if(!e&&0===t.x&&0===t.y)return this;var n=this.map._panels,r=this._frontCount=n.back.layerDOM.childElementCount,i=this._backCount=n.front.layerDOM.childElementCount,o=this._uiCount=n.front.uiDOM.childElementCount;if(r||i||o){var a=this.map.offsetPlatform();a=t?a.add(t)._round():a.round(),i&&Ve(n.back,a),(r||o)&&Ve(n.front,a)}return this},n.domChanged=function(){var t=this.map._panels;if(!t.front)return!1;var e=t.back.layerDOM.childElementCount;if(void 0===this._frontCount||this._frontCount!==e)return!0;var n=t.front.layerDOM.childElementCount;if(void 0===this._backCount||this._backCount!==n)return!0;var r=t.front.uiDOM.childElementCount;return void 0===this._uiCount||this._uiCount!==r},n.resetContainer=function(){if(this.map&&(this.map._resetMapViewPoint(),this.map._panels.front)){var t=new me(0,0);Ve(this.map._panels.back,t),Ve(this.map._panels.front,t)}},n.onZoomEnd=function(){this.resetContainer()},n.onLoad=function(){this._frameLoop()},e}(Mn),xs=function(t){function e(e){var n;return(n=t.call(this,e)||this)._containerIsCanvas=!!e._containerDOM.getContext,n._thisVisibilitychange=n._onVisibilitychange.bind(de(de(n))),n._registerEvents(),n._loopTime=0,n}fe(e,t);var n=e.prototype;return n.load=function(){this.initContainer()},n.renderFrame=function(t){if(!this.map)return!1;delete this._isViewChanged;var e=this.map;e._fireEvent("framestart"),this.updateMapDOM();var n=this._getAllLayerToRender();return this.drawLayers(n,t),this.drawLayerCanvas(n)&&this._drawCenterCross(),e._fireEvent("frameend"),this._recordView(),this._mapview=this._getMapView(),delete this._spatialRefChanged,this._fireLayerLoadEvents(),this.executeFrameCallbacks(),this._canvasUpdated=!1,!0},n.updateMapDOM=function(){var t=this.map;if(!t.isZooming()){var e=t._getViewPointFrameOffset();e?t.offsetPlatform(e):this.domChanged()&&this.offsetPlatform(null,!0)}},n.drawLayers=function(t,e){for(var n=this.map,r=n.isInteracting(),i=[],o=[],a=n.options.fpsOnInteracting||0,s=0===a?0:1e3/a,c=this.map.options.layerCanvasLimitOnInteracting,u=t.length,l=n.getBaseLayer(),h=0,f=0;f<u;f++){var d=t[f];if(d.isVisible()){var p=d.isCanvasRender();p&&i.push(d.getId());var m=d._getRenderer();if(m){var g=this._checkLayerRedraw(d);p&&m.isCanvasUpdated()&&(g||o.push(d.getId()),this.setLayerCanvasUpdated());var v=m.__zoomTransformMatrix;if(delete m.__zoomTransformMatrix,g){if(r&&p){if(c>0&&u-1-f>c&&d!==l){d._getRenderer().clearCanvas();continue}h+=this._drawCanvasLayerOnInteracting(d,h,s,e)}else r&&m.drawOnInteracting?(m.prepareRender&&m.prepareRender(),m.checkAndDraw?m.checkAndDraw(m.drawOnInteracting,this._eventParam,e):m.drawOnInteracting(this._eventParam,e)):(m.render(e),p&&v&&m.isLoadingResource()&&(m.__zoomTransformMatrix=v));p&&(o.push(d.getId()),this.setLayerCanvasUpdated())}else p&&r&&(n.isZooming()&&!n.getPitch()?(m.prepareRender(),m.__zoomTransformMatrix=this._zoomMatrix):(n.getPitch()||n.isRotating())&&m.clearCanvas())}}}var y=this._canvasIds||[],_=this._updatedIds||[];if(this._canvasIds=i,this._updatedIds=o,!this.isLayerCanvasUpdated()){var b="---";y.join(b)===i.join(b)&&_.join(b)===o.join(b)||this.setLayerCanvasUpdated()}},n._checkLayerRedraw=function(t){if(this.isSpatialReferenceChanged())return!0;var e=this.map,n=t._getRenderer();return t.isCanvasRender()?n.testIfNeedRedraw():!(!n.needToRedraw||!n.needToRedraw())||e.isInteracting()||this.isViewChanged()},n._drawCanvasLayerOnInteracting=function(t,e,n,r){var i=this.map,o=t._getRenderer(),a=o.getDrawTime(),s=0===n||n>0&&e+a<=n;if(o.mustRenderOnInteracting&&o.mustRenderOnInteracting())o.render(r);else{if(o.drawOnInteracting&&(t===i.getBaseLayer()||s||i.isZooming()&&t.options.forceRenderOnZooming||i.isMoving()&&t.options.forceRenderOnMoving||i.isRotating()&&t.options.forceRenderOnRotating))return o.prepareRender(),o.prepareCanvas(),o.checkAndDraw?o.checkAndDraw(o.drawOnInteracting,this._eventParam,r):o.drawOnInteracting(this._eventParam,r),a;!i.isZooming()||i.getPitch()||i.isRotating()?(i.getPitch()||i.isRotating())&&o.clearCanvas():(o.prepareRender(),o.__zoomTransformMatrix=this._zoomMatrix)}return o.drawOnInteracting&&!s&&o.onSkipDrawOnInteracting(this._eventParam,r),0},n._fireLayerLoadEvents=function(){if(this._updatedIds&&this._updatedIds.length>0){var t=this.map;this._updatedIds.reverse().forEach((function(e){var n=t.getLayer(e);if(n){var r=n._getRenderer();r&&r.isRenderComplete()&&n.fire("layerload")}}))}},n.isLayerCanvasUpdated=function(){return this._canvasUpdated},n.setLayerCanvasUpdated=function(){this._canvasUpdated=!0},n.drawLayerCanvas=function(t){var e=this.map;if(!e)return!1;if(!this.isLayerCanvasUpdated()&&!this.isViewChanged())return!1;this.canvas||this.createCanvas(),e._fireEvent("renderstart",{context:this.context}),this._updateCanvasSize()||this.clearCanvas();for(var n,r=e.isInteracting(),i=e.options.layerCanvasLimitOnInteracting,o=t.length,a=[],s=0;s<o;s++)if(t[s].isVisible()&&t[s].isCanvasRender()&&t[s]._getRenderer()){var c=this._getLayerImage(t[s]);c&&c.image&&(t[s]===e.getBaseLayer()?n=[t[s],c]:a.push([t[s],c]))}n&&(this._drawLayerCanvasImage(n[0],n[1]),this._drawFog()),o=a.length;for(var u=r&&i>=0&&o>i?o-i:0;u<o;u++)this._drawLayerCanvasImage(a[u][0],a[u][1]);return e._fireEvent("renderend",{context:this.context}),!0},n.setToRedraw=function(){for(var t=this._getAllLayerToRender(),e=0,n=t.length;e<n;e++){var r=t[e].getRenderer();r&&r.canvas&&r.setToRedraw&&r.setToRedraw()}},n.updateMapSize=function(t){if(t&&!this._containerIsCanvas){var e=t.width+"px",n=t.height+"px",r=this.map._panels;r.mapWrapper.style.width=e,r.mapWrapper.style.height=n,this._updateCanvasSize()}},n.getMainPanel=function(){return this.map?this._containerIsCanvas?this.map._containerDOM:this.map._panels?this.map._panels.mapWrapper:null:null},n.toDataURL=function(t){return this.canvas?this.canvas.toDataURL(t):null},n.remove=function(){he.webgl&&"undefined"!=typeof document&&Ne(document,"visibilitychange",this._thisVisibilitychange),this._resizeInterval&&clearInterval(this._resizeInterval),delete this.context,delete this.canvas,delete this.map,delete this._spatialRefChanged,this._cancelFrameLoop()},n.hitDetect=function(t){var e=this.map;if(e&&e.options.hitDetect&&!e.isInteracting()){for(var n=e._getLayers(),r="default",i=e.options.hitDetectLimit||0,o=0,a=n.length-1;a>=0;a--){var s=n[a];if(!(!s.options.hitDetect||s.isEmpty&&s.isEmpty())){var c=s._getRenderer();if(c&&c.hitDetect&&(!c.isBlank||!c.isBlank())){if("default"!==s.options.cursor&&c.hitDetect(t)){r=s.options.cursor||"pointer";break}if(o++,i>0&&o>i)break}}}e._trySetCursor(r)}},n._getLayerImage=function(t){var e=t._getRenderer();return e.getCanvasImage?e.getCanvasImage():null},n.initContainer=function(){var t=this.map._panels;function e(e,n,r,i){var o=De("div",n);return r&&(o.style.cssText=r),t[e]=o,i||We(o),o}var n=this.map._containerDOM;if(!this._containerIsCanvas){n.innerHTML="";var r="position:absolute;top:0px;left:0px;",i=e("mapWrapper","maptalks-wrapper","position:absolute;overflow:hidden;",!0),o=e("allLayers","maptalks-all-layers",r+"padding:0px;margin:0px;z-index:0;overflow:visible;",!0),a=e("backStatic","maptalks-back-static",r+"z-index:0;",!0),s=e("back","maptalks-back",r+"z-index:1;"),c=e("backLayer","maptalks-back-layer",r),u=e("canvasContainer","maptalks-canvas-layer",r+"border:none;z-index:2;"),l=e("frontStatic","maptalks-front-static",r+"z-index:3;",!0),h=e("front","maptalks-front",r+"z-index:4;",!0),f=e("frontLayer","maptalks-front-layer",r+"z-index:0;"),d=e("ui","maptalks-ui",r+"border:none;z-index:1;",!0),p=e("control","maptalks-control","z-index:1",!0);n.appendChild(i),o.appendChild(a),s.appendChild(c),s.layerDOM=c,o.appendChild(s),o.appendChild(u),h.appendChild(f),h.layerDOM=f,h.uiDOM=d,o.appendChild(l),o.appendChild(h),h.appendChild(d),i.appendChild(o),i.appendChild(p),this.createCanvas(),this.resetContainer();var m=this.map._getContainerDomSize();this.updateMapSize(m)}},n.isViewChanged=function(){if(void 0!==this._isViewChanged)return this._isViewChanged;var t=this._mapview,e=this._getMapView();return this._isViewChanged=!t||!$(t,e),this._isViewChanged},n._recordView=function(){var t=this.map;!t._onViewChange||t.isInteracting()||t.isAnimating()||$(t.getView(),t._getCurrentView())||t._onViewChange(t.getView())},n.isSpatialReferenceChanged=function(){return this._spatialRefChanged},n._getMapView=function(){var t=this.map,e=t._getPrjCenter();return{x:e.x,y:e.y,zoom:t.getZoom(),pitch:t.getPitch(),bearing:t.getBearing(),width:t.width,height:t.height}},n._frameLoop=function(t){var e=this;this.map?(this.renderFrame(t),this._animationFrame=A((function(t){e._frameLoop(t)}))):this._cancelFrameLoop()},n._cancelFrameLoop=function(){this._animationFrame&&E(this._animationFrame)},n._drawLayerCanvasImage=function(t,e){var n=this.context,r=e.point.round(),i=this.map.getDevicePixelRatio();1!==i&&r._multi(i);var o=e.image,a=o.width,s=o.height;if(!(r.x+a<=0||r.y+s<=0)){var c=t.options.opacity;if(m(c)||(c=1),!(c<=0)){var u=e.opacity;if(m(u)||(u=1),!(u<=0)){var l=n.globalAlpha;c<1&&(n.globalAlpha*=c),u<1&&(n.globalAlpha*=u),t.options.cssFilter&&(n.filter=t.options.cssFilter);var h=t.getRenderer(),f=h.__zoomTransformMatrix,d=h.clipCanvas(this.context);f&&(n.save(),n.setTransform.apply(n,f)),n.drawImage(o,0,0,a,s,r.x,r.y,a,s),f&&n.restore(),d&&n.restore(),"none"!==n.filter&&(n.filter="none"),n.globalAlpha=l}}}},n._drawCenterCross=function(){var t=this.map.options.centerCross;if(t){var e=this.context,n=new me(this.canvas.width/2,this.canvas.height/2);_(t)?t(e,n):hn.drawCross(this.context,n.x,n.y,2,"#f00")}},n._drawContainerExtent=function(){var t=this.map.options.cascadePitches,e=this.map.height-this.map._getVisualHeight(t[0]),n=this.map.height-this.map._getVisualHeight(t[1]),r=this.map.getContainerExtent(),i=this.context;i.beginPath(),i.moveTo(0,r.ymin),i.lineTo(r.xmax,r.ymin),i.stroke(),i.beginPath(),i.moveTo(0,e),i.lineTo(r.xmax,e),i.stroke(),i.beginPath(),i.moveTo(0,n),i.lineTo(r.xmax,n),i.stroke()},n._drawFog=function(){var t=this.map;if(!(t.getPitch()<=t.options.maxVisualPitch)&&t.options.fog){var e=t.getDevicePixelRatio(),n=this.context,r=t.getContainerExtent(),i=(t.height-t._getVisualHeight(75))*e;i<0&&(i=0);var o=r.ymin*e,a=Math.ceil(o-i),s=t.options.fogColor.join(),c=n.createLinearGradient(0,i,0,o+30),u=1-30/(a+30);c.addColorStop(0,"rgba("+s+", 0)"),c.addColorStop(.3,"rgba("+s+", 0.3)"),c.addColorStop(u,"rgba("+s+", 1)"),c.addColorStop(1,"rgba("+s+", 0)"),n.beginPath(),n.fillStyle=c,n.fillRect(0,i,Math.ceil(r.getWidth())*e,Math.ceil(a+30))}},n._getAllLayerToRender=function(){return this.map._getLayers()},n.clearCanvas=function(){this.canvas&&hn.clearRect(this.context,0,0,this.canvas.width,this.canvas.height)},n._updateCanvasSize=function(){if(!this.canvas||this._containerIsCanvas)return!1;var t=this.map,e=t.getSize(),n=this.canvas,r=t.getDevicePixelRatio();return(e.width*r!==n.width||e.height*r!==n.height)&&(n.height=r*e.height,n.width=r*e.width,n.style&&(n.style.width=e.width+"px",n.style.height=e.height+"px"),!0)},n.createCanvas=function(){this._containerIsCanvas?this.canvas=this.map._containerDOM:(this.canvas=De("canvas"),this._updateCanvasSize(),this.map._panels.canvasContainer.appendChild(this.canvas)),this.context=this.canvas.getContext("2d")},n._checkSize=function(){this.map&&!this.map.isInteracting()&&(Ze(this.map._containerDOM),this.map.checkSize())},n._setCheckSizeInterval=function(t){var e=this;clearInterval(this._resizeInterval),this._checkSizeInterval=t,this._resizeInterval=setInterval((function(){!e.map||e.map.isRemoved()?clearInterval(e._resizeInterval):e._checkSize()}),this._checkSizeInterval)},n._registerEvents=function(){var t=this,e=this.map;e.options.checkSize&&!C&&"undefined"!=typeof window&&this._setCheckSizeInterval(e.options.checkSizeInterval),he.mobile||e.on("_mousemove",this._onMapMouseMove,this),e.on("_dragrotatestart _dragrotating _dragrotateend _movestart _moving _moveend _zoomstart",(function(e){t._eventParam=e})),e.on("_zooming",(function(n){e.getPitch()||(t._zoomMatrix=n.matrix.container),t._eventParam=n})),e.on("_zoomend",(function(e){t._eventParam=e,delete t._zoomMatrix})),e.on("_spatialreferencechange",(function(){t._spatialRefChanged=!0})),he.webgl&&"undefined"!=typeof document&&Ue(document,"visibilitychange",this._thisVisibilitychange,this)},n._onMapMouseMove=function(t){var e=this,n=this.map;!n.isInteracting()&&n.options.hitDetect&&(this._hitDetectFrame&&E(this._hitDetectFrame),this._hitDetectFrame=A((function(){e.hitDetect(t.containerPoint)})))},n._getCanvasLayers=function(){return this.map._getLayers((function(t){return t.isCanvasRender()}))},n._onVisibilitychange=function(){"visible"===document.visibilityState&&this.setToRedraw()},e}(bs);ii.registerRenderer("canvas",xs),ii.mergeOptions({fog:!1,fogColor:[233,233,233]});var ws=Object.freeze({ResourceCache:gr,CanvasRenderer:mr,ImageGLRenderable:ja,MapRenderer:bs,MapCanvasRenderer:xs,Renderable:pr,ImageLayerCanvasRenderer:Ha,ImageLayerGLRenderer:Wa,TileLayerCanvasRenderer:us,TileLayerGLRenderer:fs,CanvasTileLayerCanvasRenderer:ps,CanvasTileLayerGLRenderer:ms,OverlayLayerCanvasRenderer:gs,VectorLayerCanvasRenderer:_s,CanvasLayerRenderer:Va}),Ms={_getRenderPoints:function(){return[[this._getCenter2DPoint(this.getMap().getGLZoom())],null]}};Mi.include(Ms),Di.include(Ms),Bi.include(Ms),ji.include(Ms),Fi.include({_getRenderPoints:function(t){var e=this.getMap();if("vertex"===t){for(var n=this._trimRing(this.getShell()),r=[],i=0,o=n.length;i<o;i++)r.push(e.coordToPoint(n[i],e.getGLZoom()));return[r,null]}return[[e.coordToPoint(this.getCenter(),e.getGLZoom())],null]}});var Ss={_getRenderPoints:function(t){var e,n=this.getMap(),r=n.getGLZoom(),i=null;if("point"===t)(e=this._getPath2DPoints(this._getPrjCoordinates(),!1,r))&&e.length>0&&Array.isArray(e[0])&&(e=e[0].concat(e[1]));else if("vertex"===t)if(i=[],(e=this._getPath2DPoints(this._getPrjCoordinates(),!1,r))&&e.length>0&&Array.isArray(e[0])){for(var o=0,a=e.length;o<a;o++)for(var s=0,c=e[o].length;s<c;s++)0===s?i.push([e[o][s],e[o][s+1]]):i.push([e[o][s-1],e[o][s]]);e=e[0].concat(e[1])}else for(var u=0,l=e.length;u<l;u++)0===u?i.push([e[u],e[u+1]]):i.push([e[u-1],e[u]]);else if("line"===t){e=[],i=[];var h=this._getPath2DPoints(this._getPrjCoordinates(),!1,r);if(h.length>0&&Array.isArray(h[0]))for(var f,d=1,p=h.length;d<p;d++){f=h[d],this instanceof xi&&f.length>0&&!f[0].equals(f[f.length-1])&&f.push(f[0]);for(var m=1,g=f.length;m<g;m++)e.push(f[m].add(f[m-1])._multi(.5)),i.push([f[m-1],f[m]])}else{this instanceof xi&&h.length>0&&!h[0].equals(h[h.length-1])&&h.push(h[0]);for(var v=1,y=h.length;v<y;v++)e.push(h[v].add(h[v-1])._multi(.5)),i.push([h[v-1],h[v]])}}else if("vertex-first"===t){var _=this._getPrjCoordinates();e=_.length?[n._prjToPoint(_[0],r)]:[],i=_.length?[[n._prjToPoint(_[0],r),n._prjToPoint(_[1],r)]]:[]}else if("vertex-last"===t){var b=this._getPrjCoordinates(),x=b.length;e=x?[n._prjToPoint(b[x-1],r)]:[];var w=x-1,M=x>1?x-2:x-1;i=x?[[n._prjToPoint(b[M],r),n._prjToPoint(b[w],r)]]:[]}else{var S=this._getProjection().project(this.getCenter());e=[n._prjToPoint(S,r)]}return[e,i]}};Ai.include(Ss),xi.include(Ss),$r.include({_redrawWhenPitch:function(){return!1},_redrawWhenRotate:function(){return!1}});var As={_redrawWhenPitch:function(){return!0},_redrawWhenRotate:function(){return this instanceof Di||this instanceof ji},_paintAsPath:function(){var t=this.getMap();return this.getAltitude()>0||t.getPitch()||this instanceof Di&&t.getBearing()},_getPaintParams:function(){var t=this.getMap();if(this._paintAsPath())return xi.prototype._getPaintParams.call(this,!0);var e=this._getPrjCoordinates(),n=t._prjToPoint(e,t.getGLZoom()),r=this._getRenderSize(n);return[n].concat(r)},_paintOn:function(){return this._paintAsPath()?hn.polygon.apply(hn,arguments):hn.ellipse.apply(hn,arguments)},_getRenderSize:function(t){var e=this.getMap(),n=e.getGLZoom(),r=this._getPrjExtent(),i=e._prjToPoint(r.getMin(),n),o=e._prjToPoint(r.getMax(),n);return[Math.abs(o.x-i.x)/2,Math.abs(o.y-t.y),Math.abs(t.y-i.y)]}};Di.include(As),Bi.include(As),Fi.include({_getPaintParams:function(){var t=this.getMap().getGLZoom(),e=this._getPrjShell();return[this._getPath2DPoints(e,!1,t)]},_paintOn:hn.polygon}),ji.include(As,{_redrawWhenPitch:function(){return!0},_getPaintParams:function(){if(this._paintAsPath())return xi.prototype._getPaintParams.call(this,!0);var t=this.getMap(),e=t._prjToPoint(this._getPrjCoordinates(),t.getGLZoom());return[e,this._getRenderSize(e)[0],[this.getStartAngle(),this.getEndAngle()]]},_paintOn:function(){if(this._paintAsPath())return hn.polygon.apply(hn,arguments);var t=this.getMap().getBearing(),e=arguments;return t&&(e[3]=e[3].slice(0),e[3][0]+=t,e[3][1]+=t),hn.sector.apply(hn,e)}}),_i.include({_paintAsPath:function(){return!0}}),Ai.include({arrowStyles:{classic:[3,4]},_getArrowShape:function(t,e,n,r,i){if(!t||!e||t.equals(e))return null;i||(i=0);var o,a=n*r[0],s=n*r[1]+i,c=a/2+i;(o=e.nextCtrlPoint||e.prevCtrlPoint?e.prevCtrlPoint?e.sub(new me(e.prevCtrlPoint)):e.sub(new me(e.nextCtrlPoint)):e.sub(t))._unit();var u=e.sub(o.multi(s));o._perp();var l=u.add(o.multi(c));return o._multi(-1),[l,e,u.add(o.multi(c)),l]},_getPaintParams:function(){var t=this._getPrjCoordinates();return[this._getPath2DPoints(t,!1,this.getMap().getGLZoom())]},_paintOn:function(t,e,n,r,i){this.options.smoothness?hn.paintSmoothLine(t,e,n,this.options.smoothness,!1,this._animIdx,this._animTailRatio):hn.path(t,e,n,null,i),this._paintArrow(t,e,n)},_getArrowPlacement:function(){return this.options.arrowPlacement},_getArrowStyle:function(){var t=this.options.arrowStyle;return t?Array.isArray(t)?t:this.arrowStyles[t]:null},_getArrows:function(t,e,n){var r=this._getArrowStyle();if(!r||t.length<2)return[];for(var i=t.length>0&&Array.isArray(t[0])?t:[t],o=this._getArrowPlacement(),a=[],s=this.getMap(),c=s.coordToContainerPoint(this.getFirstCoordinate()),u=s.coordToContainerPoint(this.getLastCoordinate()),l=i.length-1;l>=0;l--){if("vertex-first"===o||"vertex-firstlast"===o&&i[l][0].closeTo(c,.01)){var h=this._getArrowShape(i[l][1],i[l][0],e,r,n);h&&a.push(h)}if("vertex-last"===o||"vertex-firstlast"===o&&i[l][i[l].length-1].closeTo(u,.01)){var f=this._getArrowShape(i[l][i[l].length-2],i[l][i[l].length-1],e,r,n);f&&a.push(f)}else"point"===o&&this._getArrowPoints(a,i[l],e,r,n)}return a},_getArrowPoints:function(t,e,n,r,i){for(var o=0,a=e.length-1;o<a;o++){var s=this._getArrowShape(e[o],e[o+1],n,r,i);s&&t.push(s)}},_paintArrow:function(t,e,n){var r=this._getInternalSymbol().lineWidth;(!m(r)||r<3)&&(r=3);var i=this._getArrows(e,r);if(i.length){t.setLineDash&&t.setLineDash([]);for(var o=i.length-1;o>=0;o--)t.fillStyle=t.strokeStyle,hn.polygon(t,i[o],n,n)}}}),xi.include({_getPaintParams:function(t){var e=this.getMap().getGLZoom(),n=this._getPrjShell(),r=this._getPath2DPoints(n,t,e),i=r.length>0&&Array.isArray(r[0]);i&&(r=[[r[0]],[r[1]]]);var o=this._getPrjHoles(),a=[];if(o&&o.length>0){for(var s=this._simplified,c=0;c<o.length;c++){var u=this._getPath2DPoints(o[c],t,e);Array.isArray(u)&&i?Array.isArray(u[0])?(r[0].push(u[0]),r[1].push(u[1])):r[0].push(u):a.push(u)}s&&(this._simplified=s)}return i||k(r=[r],a),[r]},_paintOn:function(t,e,n,r,i){hn.polygon(t,e,n,r,i,this.options.smoothness)}}),ii.VERSION="0.49.4"}.call(this,n("4362"),n("c8ba"))},ee7c:function(t,e){var n="expire_mixin";t.exports=function(){var t=this.createStore(this.storage,null,this._namespacePrefix+n);return{set:function(e,r,i,o){return this.hasNamespace(n)||t.set(r,o),e()},get:function(t,r){return this.hasNamespace(n)||e.call(this,r),t()},remove:function(e,r){return this.hasNamespace(n)||t.remove(r),e()},getExpiration:function(e,n){return t.get(n)},removeExpiredKeys:function(t){var n=[];this.each((function(t,e){n.push(e)}));for(var r=0;r<n.length;r++)e.call(this,n[r])}};function e(e){t.get(e,Number.MAX_VALUE)<=(new Date).getTime()&&(this.raw.remove(e),t.remove(e))}}},eec4:function(t,e,n){"use strict";var r=n("b770").forEach,i=n("5be5"),o=n("49ad"),a=n("2cef"),s=n("5058"),c=n("abb4"),u=n("18e9"),l=n("c274"),h=n("d6eb"),f=n("18d2"),d=n("c946");function p(t){return Array.isArray(t)||void 0!==t.length}function m(t){if(Array.isArray(t))return t;var e=[];return r(t,(function(t){e.push(t)})),e}function g(t){return t&&1===t.nodeType}function v(t,e,n){var r=t[e];return null!=r||void 0===n?r:n}t.exports=function(t){var e;if((t=t||{}).idHandler)e={get:function(e){return t.idHandler.get(e,!0)},set:t.idHandler.set};else{var n=a(),y=s({idGenerator:n,stateHandler:h});e=y}var _=t.reporter;_||(_=c(!1===_));var b=v(t,"batchProcessor",l({reporter:_})),x={};x.callOnAdd=!!v(t,"callOnAdd",!0),x.debug=!!v(t,"debug",!1);var w,M=o(e),S=i({stateHandler:h}),A=v(t,"strategy","object"),E=v(t,"important",!1),C={reporter:_,batchProcessor:b,stateHandler:h,idHandler:e,important:E};if("scroll"===A&&(u.isLegacyOpera()?(_.warn("Scroll strategy is not supported on legacy Opera. Changing to object strategy."),A="object"):u.isIE(9)&&(_.warn("Scroll strategy is not supported on IE9. Changing to object strategy."),A="object")),"scroll"===A)w=d(C);else{if("object"!==A)throw new Error("Invalid strategy name: "+A);w=f(C)}var T={};return{listenTo:function(t,n,i){function o(t){var e=M.get(t);r(e,(function(e){e(t)}))}function a(t,e,n){M.add(e,n),t&&n(e)}if(i||(i=n,n=t,t={}),!n)throw new Error("At least one element required.");if(!i)throw new Error("Listener required.");if(g(n))n=[n];else{if(!p(n))return _.error("Invalid arguments. Must be a DOM element or a collection of DOM elements.");n=m(n)}var s=0,c=v(t,"callOnAdd",x.callOnAdd),u=v(t,"onReady",(function(){})),l=v(t,"debug",x.debug);r(n,(function(t){h.getState(t)||(h.initState(t),e.set(t));var f=e.get(t);if(l&&_.log("Attaching listener to element",f,t),!S.isDetectable(t))return l&&_.log(f,"Not detectable."),S.isBusy(t)?(l&&_.log(f,"System busy making it detectable"),a(c,t,i),T[f]=T[f]||[],void T[f].push((function(){++s===n.length&&u()}))):(l&&_.log(f,"Making detectable..."),S.markBusy(t,!0),w.makeDetectable({debug:l,important:E},t,(function(t){if(l&&_.log(f,"onElementDetectable"),h.getState(t)){S.markAsDetectable(t),S.markBusy(t,!1),w.addListener(t,o),a(c,t,i);var e=h.getState(t);if(e&&e.startSize){var d=t.offsetWidth,p=t.offsetHeight;e.startSize.width===d&&e.startSize.height===p||o(t)}T[f]&&r(T[f],(function(t){t()}))}else l&&_.log(f,"Element uninstalled before being detectable.");delete T[f],++s===n.length&&u()})));l&&_.log(f,"Already detecable, adding listener."),a(c,t,i),s++})),s===n.length&&u()},removeListener:M.removeListener,removeAllListeners:M.removeAllListeners,uninstall:function(t){if(!t)return _.error("At least one element is required.");if(g(t))t=[t];else{if(!p(t))return _.error("Invalid arguments. Must be a DOM element or a collection of DOM elements.");t=m(t)}r(t,(function(t){M.removeAllListeners(t),w.uninstall(t),h.cleanState(t)}))},initDocument:function(t){w.initDocument&&w.initDocument(t)}}}},f069:function(t,e,n){"use strict";var r=n("59ed"),i=function(t){var e,n;this.promise=new t((function(t,r){if(void 0!==e||void 0!==n)throw TypeError("Bad Promise constructor");e=t,n=r})),this.resolve=r(e),this.reject=r(n)};t.exports.f=function(t){return new i(t)}},f22b:function(t,e,n){"use strict";var r=n("23e7"),i=n("c65b"),o=n("f069");r({target:"Promise",stat:!0,forced:n("4738").CONSTRUCTOR},{reject:function(t){var e=o.f(this);return i(e.reject,void 0,t),e.promise}})},f36a:function(t,e,n){var r=n("e330");t.exports=r([].slice)},f5df:function(t,e,n){var r=n("da84"),i=n("00ee"),o=n("1626"),a=n("c6b6"),s=n("b622")("toStringTag"),c=r.Object,u="Arguments"==a(function(){return arguments}());t.exports=i?a:function(t){var e,n,r;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(n=function(t,e){try{return t[e]}catch(t){}}(e=c(t),s))?n:u?a(e):"Object"==(r=a(e))&&o(e.callee)?"Arguments":r}},f62a:function(t,e,n){"use strict";var r=n("1da1"),i=n("d4ec"),o=n("bee2"),a=(n("96cf"),n("d81d"),n("fb6a"),n("b0c0"),n("d9e2"),n("d3b7"),n("159b"),n("caad"),n("2532"),n("4de4"),n("ac1f"),n("841c"),n("4e82"),n("99af"),n("0481"),n("4069"),n("5a89")),s=n("ec60"),c=n("25a5"),u=n.n(c),l=n("bb7e"),h=function(){function t(e,n,r){var o=this;Object(i.a)(this,t);var c=n.altitude,l=n.isLabel,h=n.labelMinZoom,f=n.labelMaxZoom,d=n.labelLayerName,p=n.labelVisible,m=n.canvasSize,g=n.markSize,v=n.pointMinZoom,y=n.pointOrder,_=n.isToolTip,b=n.isPointNum,x=(n.sizeType,n.iconFile);if(0!=e.length){var w=new a.PointsMaterial({sizeAttenuation:!1,transparent:!0,depthTest:!1});l&&d&&(this.layerLabel=new s.VectorLayer(d,{minZoom:h||15,maxZoom:n.pointMaxZoom||20,geometryEvents:!1,hitDetect:!1,visible:p||!1}).addTo(r.map),this.all_labels=[]);var M=[];if(this.typeValues={},this.initTypeValue=-.9,this.canvasSize=m||48,this.markSize=g||40,this._initChildVar(n,r),e.slice(0,1/0).map((function(t){if(1*t.longitude>70&&1*t.longitude<138&&1*t.latitude>0&&1*t.latitude<56){var e=o._getImgType(t.businessType,t.imgSrc,t);if(o._bindDataItem(M,t,e),o.layerLabel){var r=new s.Marker([parseFloat(t.longitude),parseFloat(t.latitude)],{properties:{name:t.name,type:t.businessType,code:t.code,status:1},symbol:{textFaceName:n.nameFaceName||"microsoft yahei",textName:"{name}",textSize:n.nameFontSize||12,textFill:n.nameFontColor||"#cbd3ff",textDx:n.nameDy||0,textDy:n.nameDx||30}});1==t.visibility&&o.layerLabel.addGeometry(r),o.all_labels.push(r)}}})),this.textures=null,this.threeLayer=r,this.map=r.map,this.m=w,this.dataItems=M,this.point=null,this.shader=null,this.minZoom=v||8,this.maxZoom=n.pointMaxZoom||20,this.order=y||0,this.isToolTip=_||!1,this.customTooltip=n.customTooltip||!1,this.clickFunc=n.clickFunc||null,this.mouseMoveFunc=n.mouseMoveFunc||null,this.mouseOutFunc=n.mouseOutFunc||null,this.clickInfoFlag=void 0!==n.clickInfoFlag&&n.clickInfoFlag,this.iconFile=x||null,this.iconW=n.iconW||48,this.iconH=n.iconH||48,this.iconDx=n.iconDx||0,this.iconDy=n.iconDy||0,this.isPointNum=b||!1,this.iconFile&&(this.Infolayer=this.map.getLayer("infoLayer"),this.Infolayer||(this.Infolayer=new s.VectorLayer("infoLayer",{geometryEvents:!1,hitDetect:!1,zIndex:1001,iconCode:null}).addTo(r.map))),this.clickInfoFlag){var S={custom:!0,dy:n.infoDy||-48,content:"",animation:!1,autoOpenOn:null};this.infoWindow=new s.ui.InfoWindow(S).addTo(this.map)}this.layerPointNumLabel=new s.VectorLayer(s.Util.GUID(),{hitDetect:!1,zIndex:1001}).addTo(r.map),this.selectItems=[],this.funcsNew={},this.fitZoom=null,this.isCtrol=!0,this.selectMesh=[],this.rbush=new u.a,this.GLOBALSCALE=32768,this.XMAX=178,this.YMAX=85,this.MAXZOOM=31,this.SCALES=[];for(var A=0;A<this.MAXZOOM;A++)this.SCALES.push(129202.08021/Math.pow(2,A));this.clusterItemsCache={},this.clusterMinZoom=9,this.clusterMaxZoom=18,this.altitude=c,this.labelMaxZoom=f}else console.error("需要绘制的点位数量为0")}return Object(o.a)(t,[{key:"_initChildVar",value:function(t,e){throw new Error(e,"需要在派生类中实现")}},{key:"_bindMapEvents",value:function(){this.map.on("zooming zoomend",this._setSizeOn,this),this.point&&this.point.on("click empty mousemove mouseout",this._setPointEvent,this)}},{key:"_setSizeOn",value:function(){var t=this._getRate();for(var e in this.shader&&(this.shader.uniforms.size1.value=this.markSize*t),this.highlightmaterial&&(this.highlightmaterial.uniforms.size1.value=this.selectMarkSize*t),this.funcsNew)this.funcsNew[e]()}},{key:"_addIcon",value:function(t){this.Infolayer&&(this.Infolayer.clear(),new s.Marker([t.coordinate[0],t.coordinate[1]],{symbol:{markerFile:this.iconFile,markerWidth:this.iconW,markerHeight:this.iconH,markerDx:this.iconDx,markerDy:this.iconDy,markerOpacity:1}}).addTo(this.Infolayer),this.Infolayer.options.iconCode=t.code)}},{key:"addMouseOutFunc",value:function(){var t=Object(r.a)(regeneratorRuntime.mark((function t(e){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.mouseOutFunc(e);case 2:case"end":return t.stop()}}),t,this)})));return function(e){return t.apply(this,arguments)}}()},{key:"addMouseMoveFunc",value:function(){var t=Object(r.a)(regeneratorRuntime.mark((function t(e){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!this.clickInfoFlag){t.next=5;break}return t.next=3,this.mouseMoveFunc(this.infoWindow,e);case 3:t.next=7;break;case 5:return t.next=7,this.mouseMoveFunc(e);case 7:this.clickInfoFlag&&(!1===this.infosCustom&&this.hideInfoWindows(),this.infoWindow.show({x:e.coordinate[0],y:e.coordinate[1]}));case 8:case"end":return t.stop()}}),t,this)})));return function(e){return t.apply(this,arguments)}}()},{key:"addContent",value:function(){var t=Object(r.a)(regeneratorRuntime.mark((function t(e){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!this.clickInfoFlag||this.customTooltip){t.next=5;break}return t.next=3,this.clickFunc(this.infoWindow,e);case 3:t.next=7;break;case 5:return t.next=7,this.clickFunc(e);case 7:this.iconFile&&this._addIcon(e),this.clickInfoFlag&&!this.customTooltip&&(!1===this.infosCustom&&this.hideInfoWindows(),this.infoWindow.show({x:e.coordinate[0],y:e.coordinate[1]}));case 9:case"end":return t.stop()}}),t,this)})));return function(e){return t.apply(this,arguments)}}()},{key:"destroySecObjects",value:function(){for(var t=0;t<this.selectMesh.length;t++){var e=this.selectMesh[t];e.object3d.geometry&&e.object3d.geometry.dispose()}this.selectMesh=[]}},{key:"_setPointEvent",value:function(t){var e,n=t.selectMesh;if(n){e=n.data;var r=n.baseObject;r&&!r.isAdd&&this.highlightmaterial&&(r.setSymbol(this.highlightmaterial),this.threeLayer.addMesh(r),this.selectMesh.push(r))}if("empty"===t.type&&this.selectMesh.length&&(this.threeLayer.removeMesh(this.selectMesh),this.destroySecObjects()),"mousemove"===t.type&&e){var i=e.value;this.isToolTip&&(this.point.getToolTip()._content="".concat(i)),this.customTooltip&&this.mouseMoveFunc&&this.addMouseMoveFunc(e)}"mouseout"===t.type&&this.customTooltip&&(this.infoWindow.hide(),this.mouseOutFunc&&this.addMouseOutFunc(e)),"click"===t.type&&e&&this.clickFunc&&this.addContent(e)}},{key:"_bindDataItem",value:function(t,e,n){throw new Error(t,e,n,"需要在派生类中实现")}},{key:"_getImgType",value:function(t,e,n){throw new Error(t,e,"需要在派生类中实现")}},{key:"_deleteFunsKey",value:function(t){if(t){for(var e in this.funcsNew)if(t&&t===e){delete this.funcsNew[e];break}}else for(var n in this.funcsNew)delete this.funcsNew[n]}},{key:"dispose",value:function(){for(var t in this.isToolTip&&this.point&&this.point.removeToolTip(),this.clearIcon(),this.rbush&&(this.rbush.clear(),delete this.rbush),this.layerLabel&&(this.map.removeLayer(this.layerLabel),delete this.layerLabel,this.all_labels=[]),this.layerPointNumLabel&&this.map&&(this.map.removeLayer(this.layerPointNumLabel),delete this.layerPointNumLabel),this._closeEvent(),this._deleteFunsKey(),this.typeValues)delete this.typeValues[t];if(this.typeValues={},this.point){if(this.threeLayer.removeMesh(this.point),this.point.object3d.geometry&&this.point.object3d.geometry.dispose(),this.point.object3d.material&&this.point.object3d.material.dispose(),this.point._indexs_hide){for(var e in this.point._indexs_hide)delete this.point._indexs_hide[e];delete this.point._indexs_hide}this.point._datas=[],this.point._geometriesAttributes=[],this.point._grids=[],delete this.point.object3d,this.point.toolTip&&delete this.point.toolTip,this.point.options.points=[],this.point.options.positions=[],delete this.point}this.infoWindow&&(this.infoWindow.remove(),delete this.infoWindow),this.clickFunc&&delete this.clickFunc,this.mouseMoveFunc&&delete this.mouseMoveFunc,this.mouseOutFunc&&delete this.mouseOutFunc,this.textures&&this.textures.length>0&&(this.textures.forEach((function(t){t.dispose()})),delete this.textures),this.dataItems=[],this.threeLayer=null,this.map=null,delete this.shader,this.m&&(this.m.dispose(),delete this.m),this.selectItems=[]}},{key:"findItemByCode",value:function(t){for(var e=0;e<this.dataItems.length;e++)if(this.dataItems[e].code===t)return e}},{key:"changePointMinZoom",value:function(t){this.point&&(this.point.options.minZoom=t)}},{key:"_closeEvent",value:function(){this.point&&this.map.off("zooming zoomend",this._setSizeOn,this),this.point&&this.point.off("click empty mousemove mouseout",this._setPointEvent,this)}},{key:"clearIcon",value:function(t){void 0!==t&&!0!==t||this.Infolayer&&(this.Infolayer.clear(),this.Infolayer.options.iconCode=null),this.infoWindow&&this.infoWindow.hide()}},{key:"hideInfoWindows",value:function(t){throw new Error("需要在派生类中实现")}},{key:"_loadTexture",value:function(){var t=Object(r.a)(regeneratorRuntime.mark((function t(){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:throw new Error("需要在派生类中实现");case 1:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}()},{key:"pointShowHide",value:function(t,e,n,r,i){this.point&&(this.layerPointNumLabel&&this.layerPointNumLabel.clear(),this.layerLabel&&this.layerLabel.clear(),this.bzlayerNum&&this.bzlayerNum.clear(),this._deleteFunsKey(),this.selectItems=[],this.point.show(),this._pointShowHide(t,e,n,r,i))}},{key:"_pointShowHide",value:function(t,e,n,r,i){throw new Error(t,e,n,r,i,"需要在派生类中实现")}},{key:"_changePtVisible",value:function(t){var e=this;this.layerLabel&&this.layerLabel.clear();var n=this.point.object3d.geometry.attributes.visibility.array;if(0===t.length)for(var r=0;r<this.dataItems.length;r++)1===this.dataItems[r].visibility?(n[r]=1,this.point._indexs_hide[r]=!0,this.layerLabel&&this.layerLabel.addGeometry(this.all_labels[r]),this.bzlayerNum&&this.bzlayerNum.addGeometry(this.bz_all_nums[r])):(n[r]=.1,this.point._indexs_hide[r]=!1);else{this.dataItems.forEach((function(t){t.visibility=.1})),t.forEach((function(t){e.dataItems[t].visibility=1}));for(var i=0;i<this.dataItems.length;i++)1===this.dataItems[i].visibility?(n[i]=1,this.point._indexs_hide[i]=!0,this.layerLabel&&this.layerLabel.addGeometry(this.all_labels[i]),this.bzlayerNum&&this.bzlayerNum.addGeometry(this.bz_all_nums[i])):(n[i]=.1,this.point._indexs_hide[i]=!1)}this.point.object3d.geometry.attributes.visibility.needsUpdate=!0}},{key:"pointShowHideByCode",value:function(t,e){if(this.point){this.layerPointNumLabel&&this.layerPointNumLabel.clear(),this.layerLabel&&this.layerLabel.clear(),this.bzlayerNum&&this.bzlayerNum.clear(),this._deleteFunsKey(),this.point.show();for(var n=1/0,r=1/0,i=-1/0,o=-1/0,a=0;a<this.dataItems.length;a++){var c=this.dataItems[a];t.includes(c.code)?(n=Math.min(n,this.dataItems[a].coordinate[0]),r=Math.min(r,this.dataItems[a].coordinate[1]),i=Math.max(i,this.dataItems[a].coordinate[0]),o=Math.max(o,this.dataItems[a].coordinate[1]),c.visibility=1):c.visibility=.1}this._changePtVisible([]),e&&this.map.fitExtent(new s.Extent(n,r,i,o),0)}}},{key:"_itemHide",value:function(t,e,n,r,i,o){var a,s=null==n||n,c=null==r||r;e&&"MultiPolygon"===e.getType()&&(a=e.toGeoJSON());var u=this.point.object3d.geometry.attributes.visibility.array;if(t.length>0){for(var h=0;h<this.dataItems.length;h++){var f=this.dataItems[h],d=!0;if(1*f.status==1?d=!0===s:1*f.status==0&&(d=!0===c),e&&(d&=!!("MultiPolygon"===e.getType()?l.a.containsCoordinate2(this.dataItems[h].coordinate,a):l.a.containsCoordinate1(this.dataItems[h].coordinate,e))),i&&i.rangeArr.length>0){var p=1*this.dataItems[h].pvalue;d&=!!l.a.isInLevels(i,p)}f.imgflag==o&&(d?(u[h]=1,this.point._indexs_hide[h]=!0,this.selectItems.push(h),this.layerLabel&&this.layerLabel.addGeometry(this.all_labels[h]),this.bzlayerNum&&this.bzlayerNum.addGeometry(this.bz_all_nums[h])):(u[h]=.1,this.point._indexs_hide[h]=!1))}this.point.object3d.geometry.attributes.visibility.needsUpdate=!0}else{for(var m=0;m<this.dataItems.length;m++)this.dataItems[m].imgflag==o&&(u[m]=.1,this.point._indexs_hide[m]=!1);this.point.object3d.geometry.attributes.visibility.needsUpdate=!0}}},{key:"_getRate",value:function(){var t=this.map.getZoom()-8;return.2*(t=t>4?4:t)+.2}},{key:"_getMarkSize",value:function(t){var e=t.parent;return e.markSize*e._getRate()}},{key:"addPoint",value:function(){var t=Object(r.a)(regeneratorRuntime.mark((function t(){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:throw new Error("需要在派生类中实现");case 1:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}()},{key:"pointShowHideShowNumSingle",value:function(t,e,n){var r=this,i=n||12;this.layerPointNumLabel.clear(),this.layerPointNumLabel.show(),this._deleteFunsKey(),this.selectItems=[],this._pointShowHide(t,e);var o=1/0,a=1/0,c=-1/0,u=-1/0;this.selectItems.forEach((function(t){o=Math.min(o,r.dataItems[t].coordinate[0]),a=Math.min(a,r.dataItems[t].coordinate[1]),c=Math.max(c,r.dataItems[t].coordinate[0]),u=Math.max(u,r.dataItems[t].coordinate[1])}));var l=[(o+c)/2,(a+u)/2];this._addClusterLabel(l,this.selectItems.length,{}).on("click",(function(){r.layerPointNumLabel.hide(),r.map.fitExtent(new s.Extent(o,a,c,u),0),setTimeout((function(){r.point.show()}),500)})),this.point.hide(),this.funcsNew.a=function(){r.map.getZoom()<i?(r.point.hide(),r.layerPointNumLabel.show()):(r.point.show(),r.layerPointNumLabel.hide())}}},{key:"_clearClusterCache",value:function(){for(var t in this.clusterItemsCache)delete this.clusterItemsCache[t];this.clusterItemsCache={}}},{key:"pointShowHideShowNumbyCodeMultiple",value:function(t,e){var n=this;this.layerPointNumLabel.clear(),this.layerPointNumLabel.show(),this._deleteFunsKey();for(var r=[],i=[],o=0;o<e.length;o++)r.push({code:o,geo:e[o],geojson:e[o].toGeoJSON(),ptnum:0,val:t,ptids:[]});this.dataItems.forEach((function(t){t.visibility=.1})),r.forEach((function(e){for(var r=0;r<n.dataItems.length;r++){var o=n.dataItems[r];t.includes(o.code)&&l.a.containsCoordinate2(n.dataItems[r].coordinate,e.geojson)&&(e.ptnum+=1,e.ptids.push(r),i.push(r),o.visibility=1)}})),r.forEach((function(t){n._addClusterLabel(t.geo.getCenter(),t.ptnum,t).on("click",(function(t){n.selectItems=[];var e=t.target.properties.item;e.ptnum>0&&(setTimeout((function(){n.point.show()}),500),n._changePtVisible(e.ptids),n._zoomSelect1(e.ptids,e.geo,i))}))})),this._changePtVisible(i),this.map.getZoom()<9.4?this.point.hide():(this.point.show(),this.layerPointNumLabel.hide()),this.funcsNew.b=function(){n.isCtrol&&(n.map.getZoom()<9.4?(n.point.hide(),n.layerPointNumLabel.show()):(n.point.show(),n.layerPointNumLabel.hide()))}}},{key:"pointShowHideShowNumMultiple",value:function(t,e){var n=this;this.layerPointNumLabel.clear(),this.layerPointNumLabel.show(),this._deleteFunsKey();for(var r=[],i=[],o=0;o<e.length;o++)r.push({code:o,geo:e[o],geojson:e[o].toGeoJSON(),ptnum:0,val:t,ptids:[]});this.dataItems.forEach((function(t){t.visibility=.1})),r.forEach((function(e){for(var r=function(r){var o=n.dataItems[r];t.filter((function(t){return t===o.type})).length>0&&l.a.containsCoordinate2(n.dataItems[r].coordinate,e.geojson)&&(e.ptnum+=1,e.ptids.push(r),i.push(r),o.visibility=1)},o=0;o<n.dataItems.length;o++)r(o)})),r.forEach((function(t){n._addClusterLabel(t.geo.getCenter(),t.ptnum,t).on("click",(function(t){n.selectItems=[];var e=t.target.properties.item;e.ptnum>0&&(setTimeout((function(){n.point.show()}),500),n._changePtVisible(e.ptids),n._zoomSelect1(e.ptids,e.geo,i))}))})),this._changePtVisible(i),this.map.getZoom()<9.4?this.point.hide():(this.point.show(),this.layerPointNumLabel.hide()),this.funcsNew.b=function(){n.isCtrol&&(n.map.getZoom()<9.4?(n.point.hide(),n.layerPointNumLabel.show()):(n.point.show(),n.layerPointNumLabel.hide()))}}},{key:"_zoomSelect1",value:function(t,e,n){var r=this,i=1/0,o=1/0,a=-1/0,c=-1/0;t.forEach((function(t){i=Math.min(i,r.dataItems[t].coordinate[0]),o=Math.min(o,r.dataItems[t].coordinate[1]),a=Math.max(a,r.dataItems[t].coordinate[0]),c=Math.max(c,r.dataItems[t].coordinate[1])})),this.layerPointNumLabel.hide(),this.map.fitExtent(new s.Extent(i,o,a,c),0),this.isCtrol=!1,setTimeout((function(){r.funcsNew.a=function(){r.fitZoom||(r.fitZoom=r.map.getZoom()),r.map.getZoom()<r.fitZoom-.5&&(r.point.hide(),r.layerPointNumLabel.show(),r._deleteFunsKey("a"),r.fitZoom=null,r.isCtrol=!0,r._changePtVisible(n))}}),500)}},{key:"_addClusterLabelSmall",value:function(t,e,n,r,i){var o=r||"#50fcfc",a=i||"#000",c=new s.Marker(t,{properties:{item:n},symbol:[{type:"1",markerType:"ellipse",markerFill:o,markerFillOpacity:1,markerLineWidth:0,markerLineOpacity:1,markerWidth:{stops:[[9,32],[12,52]]},markerHeight:{stops:[[9,32],[12,52]]}}]});return this.layerPointNumLabel.addGeometry(c),new s.Marker(t,{properties:{name:e},symbol:{textFaceName:"sans-serif",textName:"{name}",textSize:{stops:[[9,12],[12,18],[15,24]]},textFill:a}}).addTo(this.layerPointNumLabel),c}},{key:"_addClusterLabel",value:function(t,e,n,r,i){var o=r||"#50fcfc",a=i||"#000",c=new s.Marker(t,{properties:{item:n},symbol:[{type:"1",markerType:"ellipse",markerFill:o,markerFillOpacity:1,markerLineWidth:0,markerLineOpacity:1,markerWidth:{stops:[[9,32],[12,52],[15,82]]},markerHeight:{stops:[[9,32],[12,52],[15,82]]}},{type:"2",markerType:"ellipse",markerFill:o,markerFillOpacity:"0.4",markerLineWidth:0,markerLineOpacity:1,markerWidth:{stops:[[9,54],[12,74],[15,104]]},markerHeight:{stops:[[9,54],[12,74],[15,104]]}}]});return this.layerPointNumLabel.addGeometry(c),new s.Marker(t,{properties:{name:e},symbol:{textFaceName:"sans-serif",textName:"{name}",textSize:{stops:[[9,12],[12,18],[15,24]]},textFill:a}}).addTo(this.layerPointNumLabel),c}},{key:"getClosestZoom",value:function(t){for(var e=0;e<this.MAXZOOM-1;e++){var n=this.SCALES[e],r=this.SCALES[e+1];if(n===t)return e;if(r===t)return e+1;if(t<n&&r<t)return Math.abs(t-n)<=Math.abs(t-r)?e:e+1}}},{key:"calColNum",value:function(t,e,n){var r=this;this.rbush.clear();for(var i=[],o=[],a=0;a<this.dataItems.length;a++)if(e&&e.length>0&&e.includes(a)){var s=this.getRect(this.dataItems[a],a);this.rbush.insert(s)}for(var c=0;c<this.dataItems.length;c++)if(e.includes(c))if(t>=18){var u=[c];o.push(u)}else i.includes(c)||function(){var t=r.getRect(r.dataItems[c]),e=r.rbush.search(t),n=[];if(e.forEach((function(t){n.push(t.idx)})),o.length>0){for(var a=[],s=0;s<o.length;s++)o[s].filter((function(t){return n.includes(t)})).length>0&&a.push(s);if(0===a.length)o.push(n.sort((function(t,e){return t-e})));else if(1===a.length){var u=o[a[0]].concat(n.filter((function(t){return!o[a[0]].includes(t)})));o[a[0]]=u.sort((function(t,e){return t-e}))}else{for(var l=[],h=[],f=0;f<o.length;f++)a.includes(f)?h.push(o[f]):l.push(o[f]);var d=h.flat(),p=d.concat(n.filter((function(t){return!d.includes(t)})));o=[],l.forEach((function(t){o.push(t)})),o.push(p)}}else o.push(n);i=o.flat()}();n.push(o)}},{key:"testCluster",value:function(t){var e=this;this.layerPointNumLabel.clear(),t.forEach((function(t){if(t.length>1){var n=1/0,r=1/0,i=-1/0,o=-1/0;t.forEach((function(t){n=Math.min(n,e.dataItems[t].coordinate[0]),r=Math.min(r,e.dataItems[t].coordinate[1]),i=Math.max(i,e.dataItems[t].coordinate[0]),o=Math.max(o,e.dataItems[t].coordinate[1]),e.dataItems[t].visibility=.1}));var a=[(n+i)/2,(r+o)/2];e._addClusterLabelSmall(a,t.length,{})}else e.dataItems[t[0]].visibility=1})),this._changePtVisible([])}},{key:"testMinClusterZoom",value:function(t){var e=this;this.layerPointNumLabel.clear(),t.forEach((function(t){e._addClusterLabel(t.geo.getCenter(),t.ptnum,t)})),this.dataItems.forEach((function(t){t.visibility=.1})),this._changePtVisible([])}},{key:"getRect",value:function(t,e){var n=this.threeLayer.coordinateToVector3(t.coordinate,0),r=this.getPixel(n),i=r.x,o=r.y,a=this._getRate(),s=this.markSize*a;return{minX:i-s/2,minY:o-s/2,maxX:i+s/2,maxY:o+s/2,idx:e}}},{key:"getPixel",value:function(t){var e=this.map.getSize(),n=this.threeLayer.getCamera();return l.a.vector2Pixel(t,e,n)}}]),t}();e.a=h},f772:function(t,e,n){var r=n("5692"),i=n("90e3"),o=r("keys");t.exports=function(t){return o[t]||(o[t]=i(t))}},f7e7:function(t,e,n){"use strict";n("b1eb")},f8c9:function(t,e,n){var r=n("23e7"),i=n("da84"),o=n("d44e");r({global:!0},{Reflect:{}}),o(i.Reflect,"Reflect",!0)},f8cd:function(t,e,n){var r=n("da84"),i=n("5926"),o=r.RangeError;t.exports=function(t){var e=i(t);if(e<0)throw o("The argument can't be less than 0");return e}},fb2c:function(t,e,n){n("74e8")("Uint32",(function(t){return function(e,n,r){return t(this,e,n,r)}}))},fb6a:function(t,e,n){"use strict";var r=n("23e7"),i=n("da84"),o=n("e8b5"),a=n("68ee"),s=n("861d"),c=n("23cb"),u=n("07fa"),l=n("fc6a"),h=n("8418"),f=n("b622"),d=n("1dde"),p=n("f36a"),m=d("slice"),g=f("species"),v=i.Array,y=Math.max;r({target:"Array",proto:!0,forced:!m},{slice:function(t,e){var n,r,i,f=l(this),d=u(f),m=c(t,d),_=c(void 0===e?d:e,d);if(o(f)&&(n=f.constructor,(a(n)&&(n===v||o(n.prototype))||s(n)&&null===(n=n[g]))&&(n=void 0),n===v||void 0===n))return p(f,m,_);for(r=new(void 0===n?v:n)(y(_-m,0)),i=0;m<_;m++,i++)m in f&&h(r,i,f[m]);return r.length=i,r}})},fc6a:function(t,e,n){var r=n("44ad"),i=n("1d80");t.exports=function(t){return r(i(t))}},fce3:function(t,e,n){var r=n("d039"),i=n("da84").RegExp;t.exports=r((function(){var t=i(".","s");return!(t.dotAll&&t.exec("\n")&&"s"===t.flags)}))},fdbc:function(t,e){t.exports={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0}},fdbf:function(t,e,n){var r=n("4930");t.exports=r&&!Symbol.sham&&"symbol"==typeof Symbol.iterator}})},module.exports=e()}).call(this,__webpack_require__(118).setImmediate)},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(2),i=n(3),o=l(n(12)),a=l(n(55)),s=(l(n(156)),l(n(360))),c=l(n(361)),u=l(n(61));function l(t){return t&&t.__esModule?t:{default:t}}e.default={name:"Sidebar",computed:{nav:function(){return this.$store.state.user.addRouters},openSidebar:function(){return this.$store.state.user.openSidebar}},props:{theme:{type:String,default:"light"},sidebarList:{type:Array,default:function(){return[]}}},data:function(){return{currentSelect:[],openKeys:[],currentOpen:[],isOpenSideBar:!0,collapsed:!1,menuWidth:0}},mounted:function(){var t=this;this.$watch("$route",(function(e){e.path&&t.highMenu(e)}),{immediate:!0,deep:!0}),this.$watch("openSidebar",(function(e){t.isOpenSideBar=e}),{deep:!0})},methods:{toggleCollapsed:function(){this.collapsed=!this.collapsed},findParent:function(t,e){var n=[];return function e(r,i){for(var o=0;o<r.length;o++){var a=r[o];if(a.name===i){n.push(a),e(t,a.meta.parentId);break}a.children&&e(a.children,i)}}(t,e),n},highMenu:function(t){try{var e=this.findParent(this.nav[0].children,t.name),n=(0,i.find)(e,{type:1});this.currentSelect=[n.name],this.openKeys=e.map((function(t){return t.name})),(0,i.isEmpty)(t.meta.subType)||(0,i.isEmpty)(t.meta.parentSubType)||!t.meta.parentSubType.includes("fullPage")?!(0,i.isEmpty)(t.meta.subType)&&(0,i.isEmpty)(t.meta.parentSubType)&&t.meta.subType.includes("fullPage")?this.flagSlideBar(t.meta.subType):(0,i.isEmpty)(t.meta.subType)&&!(0,i.isEmpty)(t.meta.parentSubType)&&t.meta.parentSubType.includes("fullPage")?this.flagSlideBar(t.meta.parentSubType):(0,i.isEmpty)(t.meta.subType)||(0,i.isEmpty)(t.meta.parentSubType)||t.meta.parentSubType.includes("fullPage")||t.meta.subType.includes("fullPage")?this.isOpenSideBar=!0:this.isOpenSideBar=!1:this.flagSlideBar(t.meta.parentSubType),this.$emit("change",this.isOpenSideBar)}catch(t){console.warn(t)}},flagSlideBar:function(t){if(!(0,i.isEmpty)(t)){var e=JSON.parse(t);e&&"1"===e.fullPage?this.isOpenSideBar=!1:this.isOpenSideBar=!0}},findCurrentNodes:function(t,e,n){var r=this;return t.forEach((function(t){t.name===e?n.push(t):t.children&&r.findCurrentNodes(t.children,e,n)})),n},handleOpenChange:function(t){this.openKeys=t},handleTitleClick:function(t){var e=this.findParent(this.nav[0].children,t);this.openKeys=e.map((function(t){return t.name}))},handleNav:function(t){var e=this,n=t.item,r=t.key,o=t.keyPath;if(!r)return!1;var a=[];if(this.findCurrentNodes(this.nav[0].children,r,a),this.$store.commit("user/SET_MENI_EVENT",{item:n,key:r,keyPath:o,vNodes:(0,i.isEmpty)(a)?"":a[0]}),!(0,i.isEmpty)(a))if(1===a[0].meta.chainType){var s=a[0].meta.path.indexOf("http")>-1?a[0].meta.path:"http://"+a[0].meta.path;window.open(s),1!==a[0].meta.functionType&&(0,u.default)(this,{},null,!1)}else this.currentSelect=[r],this.$router.push({name:r}).then((function(t){1!==a[0].meta.functionType&&(0,u.default)(e,{},null,!1)}))},renderIcon:function(t){var e=this.$createElement;return t?e("i",{class:(0,o.default)(["icon","iconfont",t,r.prefixCls+"-normal-icon"])}):null},getChildrenType1:function(t){return t.children.every((function(t){return 3===t.type}))},renderMenu:function(){var t=this,e=this.$createElement,n=this.sidebarList&&!(0,i.isEmpty)(this.sidebarList)?this.sidebarList.map((function(n){return n.meta&&n.meta.subType?null:!n.children||t.getChildrenType1(n)?e("a-menu-item",{key:n.name},[t.renderIcon(n.meta.icon),e("span",[n.meta.title])]):function n(r){if(r){if(t.getChildrenType1(r)&&"CustomWrapper"!==r.layout)return e("a-menu-item",{key:r.name},[t.renderIcon(r.meta.icon),e("span",{style:{"--left":r.meta.icon?"":"16px"}},[r.meta.title])]);var i=r.children.map((function(r){return r.children?n(r):1===r.type?e("a-menu-item",{key:r.name},[t.renderIcon(r.meta.icon),e("span",{style:{"--left":r.meta.icon?"":"16px"}},[r.meta.title])]):null}));return"CustomWrapper"!==r.layout?e("a-sub-menu",{key:r.name,on:{titleClick:t.handleTitleClick}},[e("span",{slot:"title"},[t.renderIcon(r.meta.icon),e("span",[r.meta.title])]),i]):null}return[]}(n)})):null,r={props:{mode:"inline",inlineIndent:20,forceSubMenuRender:!0,theme:this.theme,inlineCollapsed:this.collapsed,selectedKeys:this.currentSelect,openKeys:this.openKeys},on:{click:this.handleNav,openChange:this.handleOpenChange}};return e("a-menu",r,[n])}},render:function(){var t=arguments[0],e=document.documentElement.style.fontSize?parseFloat(document.documentElement.style.fontSize)/100:1;return this.isOpenSideBar?this.collapsed?this.menuWidth=60*e:this.menuWidth=250*e:this.menuWidth=0,t("a-layout-sider",{class:r.prefixCls+"-slider",attrs:{width:this.menuWidth,trigger:null,collapsible:!0,collapsed:this.collapsed}},[t("div",{class:r.prefixCls+"-slider-inner"},[t("div",{class:r.prefixCls+"-slider-inner-header"},[t(a.default,[this.renderMenu()])]),t("div",{class:r.prefixCls+"-slider-inner-footer"},[t("span",{on:{click:this.toggleCollapsed}},[this.collapsed?t(c.default):t(s.default)])])])])}}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=s(n(48)),i=s(n(27)),o=s(n(28)),a=n(101);function s(t){return t&&t.__esModule?t:{default:t}}var c=function(){function t(){(0,i.default)(this,t)}return(0,o.default)(t,[{key:"saveIndexDb",value:function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"rk_db";return new r.default((function(r,i){(new t).initIndexedDb().then((function(t){var o=t.transaction(n,"readwrite").objectStore(n);"array"===(0,a.toType)(e)?e.map((function(t){o.put(t)})):o.put(e),t.onsuccess=function(e){r(t)},t.onerror=function(t){i(t)}}))}))}},{key:"initIndexedDb",value:function(){return new r.default((function(t,e){var n=window.indexedDB.open("rk-web-core",1);n.onupgradeneeded=function(e){var n=e.target.result;if(!n.objectStoreNames.contains("app_db")){var r=n.createObjectStore("app_db",{keyPath:"tag"});r.createIndex("tag","tag",{unique:!0}),r.createIndex("value","value",{unique:!1}),r.createIndex("remarks","remarks",{unique:!1})}if(n.objectStoreNames.contains("rk_db"))t(n);else{var i=n.createObjectStore("rk_db",{keyPath:"tag"});i.createIndex("tag","tag",{unique:!0}),i.createIndex("val","val",{unique:!1}),i.createIndex("desc","desc",{unique:!1}),i.createIndex("created","created",{unique:!1}),i.createIndex("isTop","isTop",{unique:!1}),t(n)}},n.onsuccess=function(e){var n=e.target.result;t(n)},n.onerror=function(t){e(t)},n.onerror=function(t){console.log("Can not open indexedDB",t)}}))}},{key:"getLocalRecord",value:function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"rk_db";return new r.default((function(r){(new t).initIndexedDb().then((function(t){var i=t.transaction(n,"readwrite").objectStore(n).get(e);i.onsuccess=function(t){r(t.target.result)},i.onerror=function(t){r()}}))}))}}]),t}();e.default=new c},function(t,e,n){"use strict";n.d(e,"a",(function(){return r})),n.d(e,"b",(function(){return i}));var r=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("transition",{attrs:{name:"el-loading-fade"},on:{"after-leave":t.handleAfterLeave}},[n("div",{directives:[{name:"show",rawName:"v-show",value:t.visible,expression:"visible"}],staticClass:"el-loading-mask",class:[t.customClass,{"is-fullscreen":t.fullscreen}],style:{backgroundColor:t.background||""}},[n("div",{staticClass:"el-loading-spinner"},[t.spinner?n("i",{class:t.spinner}):n("svg",{staticClass:"circular",attrs:{viewBox:"25 25 50 50"}},[n("circle",{staticClass:"path",attrs:{cx:"50",cy:"50",r:"20",fill:"none"}})]),t._v(" "),t.text?n("p",{staticClass:"el-loading-text"},[t._v(t._s(t.text))]):t._e()])])])},i=[]},function(t,e,n){"use strict";n.r(e);var r=n(99),i=n(62);for(var o in i)["default"].indexOf(o)<0&&function(t){n.d(e,t,(function(){return i[t]}))}(o);var a=n(147),s=Object(a.a)(i.default,r.a,r.b,!1,null,null,null);e.default=s.exports},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.RkVersionList=e.BlockView=e.appTrack=e.frameInterface=e.Request=e.GMap=e.AppLayout=e.install=e.toType=void 0;var r=R(n(64)),i=R(n(9)),o=R(n(19)),a=R(n(27)),s=R(n(28)),c=n(3),u=n(174),l=R(n(175)),h=n(176),f=R(n(312)),d=n(315),p=R(n(35)),m=n(367),g=n(50),v=R(n(126)),y=R(n(368));n(372);var _=n(96),b=R(_),x=n(386),w=R(x),M=R(n(388)),S=R(n(389)),A=R(n(390)),E=R(n(37)),C=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}(n(17)),T=R(n(61)),I=R(n(98)),P=R(n(391)),L=R(n(393));R(n(51));function R(t){return t&&t.__esModule?t:{default:t}}var O=e.toType=function(t){return Object.prototype.toString.call(t).slice(8,-1).toLowerCase()},k={loadView:void 0,store:{},filters:[],vueConfig:{},authToken:void 0,svgFile:"https://at.alicdn.com/t/font_614860_f0motpq03e.js",isNeedMapTalks:!1,mapOptions:{},routerOptions:{},microOptions:{},extension:!1,depositRouter:!0,requestLoading:!1,routes:[],routesWhiteList:[],requestError:function(){}},B=function(){function t(e,n){(0,a.default)(this,t),e&&n&&(this.vueInstance=e,this.basicRouter=l.default,this.initOptions(n))}return(0,s.default)(t,[{key:"initOptions",value:function(t){var e=(0,o.default)(k);this.basicOptions=(0,c.pick)((0,g.mergeProps)(k,t),e),this.storeInstance=this.basicOptions.store,this.useInstance(),this.filterInstance(),this.vueConfigPick()}},{key:"getRequestInstance",value:function(){return p.default}},{key:"useInstance",value:function(){var t=this;if(this.vueInstance.use(this.basicRouter),this.vueInstance.use(M.default),this.storeInstance.registerModule("user",f.default),this.routerInstance=(0,h.routerInit)(this.basicRouter,this.basicOptions.routerOptions),this.vueInstance.prototype.$isExtension=this.basicOptions.extension,this.vueInstance.prototype.$getDb=I.default.getLocalRecord,window.$requestError=this.basicOptions.requestError,window.$requestLoading=this.basicOptions.requestLoading,this.vueInstance.prototype.$saveDb=I.default.saveIndexDb,this.vueInstance.prototype.$dynamicChangeRouter=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"replace",n=E.default.parse(window.location.search.replace("?",""));if("object"===O(t)){var r=E.default.stringify((0,i.default)(n,t)),o=window.location,a=o.origin,s=o.pathname,c=a+s;"replace"===e?window.history.replaceState("",document.title,c+"?"+r):window.history.pushState("",document.title,c+"?"+r)}},this.vueInstance.prototype.$clearDynamicRouteParams=function(){var t=window.location,e=t.origin+t.pathname;window.history.replaceState("",document.title,e)},this.vueInstance.prototype.$getDynamicRouteParams=function(){return E.default.parse(window.location.search.replace("?",""))},this.tempPkRouter=(0,h.pkRouter)(this.basicRouter,this.basicOptions.routerOptions),!(0,c.isEmpty)(this.basicOptions.routesWhiteList)){var e=this.basicOptions.routesWhiteList.map((function(e){return{path:e,component:t.basicOptions.loadView?t.basicOptions.loadView(e):(0,g.loadView)(e,t.basicOptions.routerPathPrefix,t.basicOptions.routerContext)}}));this.tempPkRouter,this.routerInstance.addRoutes([].concat((0,r.default)(e)))}this.vueInstance.prototype.$pkRouter=this.tempPkRouter,this.vueInstance.prototype.$basicOptions=this.basicOptions,(0,d.registerPermission)(this,this.tempPkRouter),this.basicOptions.isNeedMapTalks&&this.loadAMap()}},{key:"loadAMap",value:function(){var t=this;this.routerInstance.onReady((function(){(0,b.default)((0,g.mergeProps)({svgFile:t.basicOptions.svgFile,zoom:9.6},t.basicOptions.mapOptions))}))}},{key:"filterInstance",value:function(){var t=this;(0,o.default)(this.basicOptions.filters).forEach((function(e){t.vueInstance.filter(e,t.basicOptions.filters[e])}))}},{key:"vueConfigPick",value:function(){var t=this;(0,o.default)(this.basicOptions.vueConfig).forEach((function(e){t.vueInstance.config[e]=t.basicOptions.vueConfig[e]}))}},{key:"mount",value:function(){return(0,A.default)("RK-WEB-CORE",u.version),{version:u.version,router:this.routerInstance,store:this.storeInstance,resetRouter:(0,h.pkRouter)(this.basicRouter),request:this.getRequestInstance(),axios:v.default,vueInstance:this.vueInstance,bootstrap:(0,m.noLogin)(this.routerInstance,this.basicOptions.authToken),action:M.default,utils:(0,S.default)(this.storeInstance,this.routerInstance,this.vueInstance)}}},{key:"loadMicro",value:function(){return{micro:w.default,microOne:x.microOne,microTwo:x.microTwo,microThree:x.microThree}}}]),t}(),D=function(t){t.use(y.default),t.use(P.default)};"undefined"!=typeof window&&window.Vue&&D(window.Vue),y.default.install=function(t){t.component(y.default.name,y.default)},P.default.install=function(t){t.component(P.default.name,P.default)};e.install=D,e.AppLayout=y.default,e.GMap=_.GMap,e.Request=p.default,e.frameInterface=C,e.appTrack=function(t,e){return(0,T.default)(t,e,null,!1)},e.BlockView=L.default,e.RkVersionList=P.default,e.default=function(t,e){return new B(t,e)}},function(t,e,n){t.exports={default:n(157),__esModule:!0}},function(t,e,n){t.exports=!n(11)&&!n(23)((function(){return 7!=Object.defineProperty(n(68)("div"),"a",{get:function(){return 7}}).a}))},function(t,e,n){t.exports=n(21)},function(t,e,n){var r=n(24),i=n(25),o=n(161)(!1),a=n(72)("IE_PROTO");t.exports=function(t,e){var n,s=i(t),c=0,u=[];for(n in s)n!=a&&r(s,n)&&u.push(n);for(;e.length>c;)r(s,n=e[c++])&&(~o(u,n)||u.push(n));return u}},function(t,e,n){var r=n(7).document;t.exports=r&&r.documentElement},function(t,e,n){var r=n(24),i=n(26),o=n(72)("IE_PROTO"),a=Object.prototype;t.exports=Object.getPrototypeOf||function(t){return t=i(t),r(t,o)?t[o]:"function"==typeof t.constructor&&t instanceof t.constructor?t.constructor.prototype:t instanceof Object?a:null}},function(t,e,n){var r=n(18);t.exports=function(t,e,n,i){try{return i?e(r(n)[0],n[1]):e(n)}catch(e){var o=t.return;throw void 0!==o&&r(o.call(t)),e}}},function(t,e,n){var r=n(32),i=n(8)("iterator"),o=Array.prototype;t.exports=function(t){return void 0!==t&&(r.Array===t||o[i]===t)}},function(t,e,n){var r=n(8)("iterator"),i=!1;try{var o=[7][r]();o.return=function(){i=!0},Array.from(o,(function(){throw 2}))}catch(t){}t.exports=function(t,e){if(!e&&!i)return!1;var n=!1;try{var o=[7],a=o[r]();a.next=function(){return{done:n=!0}},o[r]=function(){return a},t(o)}catch(t){}return n}},function(t,e,n){var r=n(4),i=n(1),o=n(23);t.exports=function(t,e){var n=(i.Object||{})[t]||Object[t],a={};a[t]=e(n),r(r.S+r.F*o((function(){n(1)})),"Object",a)}},function(t,e,n){t.exports={default:n(171),__esModule:!0}},function(t,e){t.exports=function(t,e){return{value:e,done:!!t}}},function(t,e,n){var r=n(44);t.exports=Array.isArray||function(t){return"Array"==r(t)}},function(t,e,n){var r=n(105),i=n(74).concat("length","prototype");e.f=Object.getOwnPropertyNames||function(t){return r(t,i)}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=a(n(197)),i=a(n(200)),o=a(n(201));function a(t){return t&&t.__esModule?t:{default:t}}e.default=function(t){if(!(0,o.default)(t)||"[object Object]"!=(0,i.default)(t))return!1;if(null===(0,r.default)(t))return!0;for(var e=t;null!==(0,r.default)(e);)e=(0,r.default)(e);return(0,r.default)(t)===e}},function(t,e,n){"use strict";n.r(e),function(t){var n=function(){if("undefined"!=typeof Map)return Map;function t(t,e){var n=-1;return t.some((function(t,r){return t[0]===e&&(n=r,!0)})),n}return function(){function e(){this.__entries__=[]}return Object.defineProperty(e.prototype,"size",{get:function(){return this.__entries__.length},enumerable:!0,configurable:!0}),e.prototype.get=function(e){var n=t(this.__entries__,e),r=this.__entries__[n];return r&&r[1]},e.prototype.set=function(e,n){var r=t(this.__entries__,e);~r?this.__entries__[r][1]=n:this.__entries__.push([e,n])},e.prototype.delete=function(e){var n=this.__entries__,r=t(n,e);~r&&n.splice(r,1)},e.prototype.has=function(e){return!!~t(this.__entries__,e)},e.prototype.clear=function(){this.__entries__.splice(0)},e.prototype.forEach=function(t,e){void 0===e&&(e=null);for(var n=0,r=this.__entries__;n<r.length;n++){var i=r[n];t.call(e,i[1],i[0])}},e}()}(),r="undefined"!=typeof window&&"undefined"!=typeof document&&window.document===document,i=void 0!==t&&t.Math===Math?t:"undefined"!=typeof self&&self.Math===Math?self:"undefined"!=typeof window&&window.Math===Math?window:Function("return this")(),o="function"==typeof requestAnimationFrame?requestAnimationFrame.bind(i):function(t){return setTimeout((function(){return t(Date.now())}),1e3/60)};var a=["top","right","bottom","left","width","height","size","weight"],s="undefined"!=typeof MutationObserver,c=function(){function t(){this.connected_=!1,this.mutationEventsAdded_=!1,this.mutationsObserver_=null,this.observers_=[],this.onTransitionEnd_=this.onTransitionEnd_.bind(this),this.refresh=function(t,e){var n=!1,r=!1,i=0;function a(){n&&(n=!1,t()),r&&c()}function s(){o(a)}function c(){var t=Date.now();if(n){if(t-i<2)return;r=!0}else n=!0,r=!1,setTimeout(s,e);i=t}return c}(this.refresh.bind(this),20)}return t.prototype.addObserver=function(t){~this.observers_.indexOf(t)||this.observers_.push(t),this.connected_||this.connect_()},t.prototype.removeObserver=function(t){var e=this.observers_,n=e.indexOf(t);~n&&e.splice(n,1),!e.length&&this.connected_&&this.disconnect_()},t.prototype.refresh=function(){this.updateObservers_()&&this.refresh()},t.prototype.updateObservers_=function(){var t=this.observers_.filter((function(t){return t.gatherActive(),t.hasActive()}));return t.forEach((function(t){return t.broadcastActive()})),t.length>0},t.prototype.connect_=function(){r&&!this.connected_&&(document.addEventListener("transitionend",this.onTransitionEnd_),window.addEventListener("resize",this.refresh),s?(this.mutationsObserver_=new MutationObserver(this.refresh),this.mutationsObserver_.observe(document,{attributes:!0,childList:!0,characterData:!0,subtree:!0})):(document.addEventListener("DOMSubtreeModified",this.refresh),this.mutationEventsAdded_=!0),this.connected_=!0)},t.prototype.disconnect_=function(){r&&this.connected_&&(document.removeEventListener("transitionend",this.onTransitionEnd_),window.removeEventListener("resize",this.refresh),this.mutationsObserver_&&this.mutationsObserver_.disconnect(),this.mutationEventsAdded_&&document.removeEventListener("DOMSubtreeModified",this.refresh),this.mutationsObserver_=null,this.mutationEventsAdded_=!1,this.connected_=!1)},t.prototype.onTransitionEnd_=function(t){var e=t.propertyName,n=void 0===e?"":e;a.some((function(t){return!!~n.indexOf(t)}))&&this.refresh()},t.getInstance=function(){return this.instance_||(this.instance_=new t),this.instance_},t.instance_=null,t}(),u=function(t,e){for(var n=0,r=Object.keys(e);n<r.length;n++){var i=r[n];Object.defineProperty(t,i,{value:e[i],enumerable:!1,writable:!1,configurable:!0})}return t},l=function(t){return t&&t.ownerDocument&&t.ownerDocument.defaultView||i},h=v(0,0,0,0);function f(t){return parseFloat(t)||0}function d(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];return e.reduce((function(e,n){return e+f(t["border-"+n+"-width"])}),0)}function p(t){var e=t.clientWidth,n=t.clientHeight;if(!e&&!n)return h;var r=l(t).getComputedStyle(t),i=function(t){for(var e={},n=0,r=["top","right","bottom","left"];n<r.length;n++){var i=r[n],o=t["padding-"+i];e[i]=f(o)}return e}(r),o=i.left+i.right,a=i.top+i.bottom,s=f(r.width),c=f(r.height);if("border-box"===r.boxSizing&&(Math.round(s+o)!==e&&(s-=d(r,"left","right")+o),Math.round(c+a)!==n&&(c-=d(r,"top","bottom")+a)),!function(t){return t===l(t).document.documentElement}(t)){var u=Math.round(s+o)-e,p=Math.round(c+a)-n;1!==Math.abs(u)&&(s-=u),1!==Math.abs(p)&&(c-=p)}return v(i.left,i.top,s,c)}var m="undefined"!=typeof SVGGraphicsElement?function(t){return t instanceof l(t).SVGGraphicsElement}:function(t){return t instanceof l(t).SVGElement&&"function"==typeof t.getBBox};function g(t){return r?m(t)?function(t){var e=t.getBBox();return v(0,0,e.width,e.height)}(t):p(t):h}function v(t,e,n,r){return{x:t,y:e,width:n,height:r}}var y=function(){function t(t){this.broadcastWidth=0,this.broadcastHeight=0,this.contentRect_=v(0,0,0,0),this.target=t}return t.prototype.isActive=function(){var t=g(this.target);return this.contentRect_=t,t.width!==this.broadcastWidth||t.height!==this.broadcastHeight},t.prototype.broadcastRect=function(){var t=this.contentRect_;return this.broadcastWidth=t.width,this.broadcastHeight=t.height,t},t}(),_=function(t,e){var n,r,i,o,a,s,c,l=(r=(n=e).x,i=n.y,o=n.width,a=n.height,s="undefined"!=typeof DOMRectReadOnly?DOMRectReadOnly:Object,c=Object.create(s.prototype),u(c,{x:r,y:i,width:o,height:a,top:i,right:r+o,bottom:a+i,left:r}),c);u(this,{target:t,contentRect:l})},b=function(){function t(t,e,r){if(this.activeObservations_=[],this.observations_=new n,"function"!=typeof t)throw new TypeError("The callback provided as parameter 1 is not a function.");this.callback_=t,this.controller_=e,this.callbackCtx_=r}return t.prototype.observe=function(t){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if("undefined"!=typeof Element&&Element instanceof Object){if(!(t instanceof l(t).Element))throw new TypeError('parameter 1 is not of type "Element".');var e=this.observations_;e.has(t)||(e.set(t,new y(t)),this.controller_.addObserver(this),this.controller_.refresh())}},t.prototype.unobserve=function(t){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if("undefined"!=typeof Element&&Element instanceof Object){if(!(t instanceof l(t).Element))throw new TypeError('parameter 1 is not of type "Element".');var e=this.observations_;e.has(t)&&(e.delete(t),e.size||this.controller_.removeObserver(this))}},t.prototype.disconnect=function(){this.clearActive(),this.observations_.clear(),this.controller_.removeObserver(this)},t.prototype.gatherActive=function(){var t=this;this.clearActive(),this.observations_.forEach((function(e){e.isActive()&&t.activeObservations_.push(e)}))},t.prototype.broadcastActive=function(){if(this.hasActive()){var t=this.callbackCtx_,e=this.activeObservations_.map((function(t){return new _(t.target,t.broadcastRect())}));this.callback_.call(t,e,t),this.clearActive()}},t.prototype.clearActive=function(){this.activeObservations_.splice(0)},t.prototype.hasActive=function(){return this.activeObservations_.length>0},t}(),x="undefined"!=typeof WeakMap?new WeakMap:new n,w=function t(e){if(!(this instanceof t))throw new TypeError("Cannot call a class as a function.");if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");var n=c.getInstance(),r=new b(e,n,this);x.set(this,r)};["observe","unobserve","disconnect"].forEach((function(t){w.prototype[t]=function(){var e;return(e=x.get(this))[t].apply(e,arguments)}}));var M=void 0!==i.ResizeObserver?i.ResizeObserver:w;e.default=M}.call(this,n(15))},function(t,e,n){(function(t){var r=void 0!==t&&t||"undefined"!=typeof self&&self||window,i=Function.prototype.apply;function o(t,e){this._id=t,this._clearFn=e}e.setTimeout=function(){return new o(i.call(setTimeout,r,arguments),clearTimeout)},e.setInterval=function(){return new o(i.call(setInterval,r,arguments),clearInterval)},e.clearTimeout=e.clearInterval=function(t){t&&t.close()},o.prototype.unref=o.prototype.ref=function(){},o.prototype.close=function(){this._clearFn.call(r,this._id)},e.enroll=function(t,e){clearTimeout(t._idleTimeoutId),t._idleTimeout=e},e.unenroll=function(t){clearTimeout(t._idleTimeoutId),t._idleTimeout=-1},e._unrefActive=e.active=function(t){clearTimeout(t._idleTimeoutId);var e=t._idleTimeout;e>=0&&(t._idleTimeoutId=setTimeout((function(){t._onTimeout&&t._onTimeout()}),e))},n(212),e.setImmediate="undefined"!=typeof self&&self.setImmediate||void 0!==t&&t.setImmediate||this&&this.setImmediate,e.clearImmediate="undefined"!=typeof self&&self.clearImmediate||void 0!==t&&t.clearImmediate||this&&this.clearImmediate}).call(this,n(15))},function(t,e){var n,r,i=t.exports={};function o(){throw new Error("setTimeout has not been defined")}function a(){throw new Error("clearTimeout has not been defined")}function s(t){if(n===setTimeout)return setTimeout(t,0);if((n===o||!n)&&setTimeout)return n=setTimeout,setTimeout(t,0);try{return n(t,0)}catch(e){try{return n.call(null,t,0)}catch(e){return n.call(this,t,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:o}catch(t){n=o}try{r="function"==typeof clearTimeout?clearTimeout:a}catch(t){r=a}}();var c,u=[],l=!1,h=-1;function f(){l&&c&&(l=!1,c.length?u=c.concat(u):h=-1,u.length&&d())}function d(){if(!l){var t=s(f);l=!0;for(var e=u.length;e;){for(c=u,u=[];++h<e;)c&&c[h].run();h=-1,e=u.length}c=null,l=!1,function(t){if(r===clearTimeout)return clearTimeout(t);if((r===a||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(t);try{r(t)}catch(e){try{return r.call(null,t)}catch(e){return r.call(this,t)}}}(t)}}function p(t,e){this.fun=t,this.array=e}function m(){}i.nextTick=function(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)e[n-1]=arguments[n];u.push(new p(t,e)),1!==u.length||l||s(d)},p.prototype.run=function(){this.fun.apply(null,this.array)},i.title="browser",i.browser=!0,i.env={},i.argv=[],i.version="",i.versions={},i.on=m,i.addListener=m,i.once=m,i.off=m,i.removeListener=m,i.removeAllListeners=m,i.emit=m,i.prependListener=m,i.prependOnceListener=m,i.listeners=function(t){return[]},i.binding=function(t){throw new Error("process.binding is not supported")},i.cwd=function(){return"/"},i.chdir=function(t){throw new Error("process.chdir is not supported")},i.umask=function(){return 0}},function(t,e,n){t.exports={default:n(214),__esModule:!0}},function(t,e,n){var r=n(18),i=n(42),o=n(8)("species");t.exports=function(t,e){var n,a=r(t).constructor;return void 0===a||null==(n=r(a)[o])?e:i(n)}},function(t,e,n){var r,i,o,a=n(20),s=n(222),c=n(106),u=n(68),l=n(7),h=l.process,f=l.setImmediate,d=l.clearImmediate,p=l.MessageChannel,m=l.Dispatch,g=0,v={},y=function(){var t=+this;if(v.hasOwnProperty(t)){var e=v[t];delete v[t],e()}},_=function(t){y.call(t.data)};f&&d||(f=function(t){for(var e=[],n=1;arguments.length>n;)e.push(arguments[n++]);return v[++g]=function(){s("function"==typeof t?t:Function(t),e)},r(g),g},d=function(t){delete v[t]},"process"==n(44)(h)?r=function(t){h.nextTick(a(y,t,1))}:m&&m.now?r=function(t){m.now(a(y,t,1))}:p?(o=(i=new p).port2,i.port1.onmessage=_,r=a(o.postMessage,o,1)):l.addEventListener&&"function"==typeof postMessage&&!l.importScripts?(r=function(t){l.postMessage(t+"","*")},l.addEventListener("message",_,!1)):r="onreadystatechange"in u("script")?function(t){c.appendChild(u("script")).onreadystatechange=function(){c.removeChild(this),y.call(t)}}:function(t){setTimeout(a(y,t,1),0)}),t.exports={set:f,clear:d}},function(t,e){t.exports=function(t){try{return{e:!1,v:t()}}catch(t){return{e:!0,v:t}}}},function(t,e,n){var r=n(18),i=n(14),o=n(82);t.exports=function(t,e){if(r(t),i(e)&&e.constructor===t)return e;var n=o.f(t);return(0,n.resolve)(e),n.promise}},function(t,e,n){"use strict";var r=n(7),i=n(1),o=n(13),a=n(11),s=n(8)("species");t.exports=function(t){var e="function"==typeof i[t]?i[t]:r[t];a&&e&&!e[s]&&o.f(e,s,{configurable:!0,get:function(){return this}})}},function(t,e,n){t.exports=n(227)},function(t,e,n){"use strict";t.exports=function(t,e){return function(){for(var n=new Array(arguments.length),r=0;r<n.length;r++)n[r]=arguments[r];return t.apply(e,n)}}},function(t,e,n){"use strict";var r=n(5);function i(t){return encodeURIComponent(t).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}t.exports=function(t,e,n){if(!e)return t;var o;if(n)o=n(e);else if(r.isURLSearchParams(e))o=e.toString();else{var a=[];r.forEach(e,(function(t,e){null!=t&&(r.isArray(t)?e+="[]":t=[t],r.forEach(t,(function(t){r.isDate(t)?t=t.toISOString():r.isObject(t)&&(t=JSON.stringify(t)),a.push(i(e)+"="+i(t))})))})),o=a.join("&")}if(o){var s=t.indexOf("#");-1!==s&&(t=t.slice(0,s)),t+=(-1===t.indexOf("?")?"?":"&")+o}return t}},function(t,e,n){"use strict";t.exports={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1}},function(t,e,n){"use strict";(function(e){var r=n(5);t.exports=function(t,n){n=n||new FormData;var i=[];function o(t){return null===t?"":r.isDate(t)?t.toISOString():r.isArrayBuffer(t)||r.isTypedArray(t)?"function"==typeof Blob?new Blob([t]):e.from(t):t}return function t(e,a){if(r.isPlainObject(e)||r.isArray(e)){if(-1!==i.indexOf(e))throw Error("Circular reference detected in "+a);i.push(e),r.forEach(e,(function(e,i){if(!r.isUndefined(e)){var s,c=a?a+"."+i:i;if(e&&!a&&"object"==typeof e)if(r.endsWith(i,"{}"))e=JSON.stringify(e);else if(r.endsWith(i,"[]")&&(s=r.toArray(e)))return void s.forEach((function(t){!r.isUndefined(t)&&n.append(c,o(t))}));t(e,c)}})),i.pop()}else n.append(a,o(e))}(t),n}}).call(this,n(233).Buffer)},function(t,e,n){"use strict";var r=n(5),i=n(237),o=n(238),a=n(128),s=n(132),c=n(241),u=n(242),l=n(129),h=n(36),f=n(56),d=n(243);t.exports=function(t){return new Promise((function(e,n){var p,m=t.data,g=t.headers,v=t.responseType;function y(){t.cancelToken&&t.cancelToken.unsubscribe(p),t.signal&&t.signal.removeEventListener("abort",p)}r.isFormData(m)&&r.isStandardBrowserEnv()&&delete g["Content-Type"];var _=new XMLHttpRequest;if(t.auth){var b=t.auth.username||"",x=t.auth.password?unescape(encodeURIComponent(t.auth.password)):"";g.Authorization="Basic "+btoa(b+":"+x)}var w=s(t.baseURL,t.url);function M(){if(_){var r="getAllResponseHeaders"in _?c(_.getAllResponseHeaders()):null,o={data:v&&"text"!==v&&"json"!==v?_.response:_.responseText,status:_.status,statusText:_.statusText,headers:r,config:t,request:_};i((function(t){e(t),y()}),(function(t){n(t),y()}),o),_=null}}if(_.open(t.method.toUpperCase(),a(w,t.params,t.paramsSerializer),!0),_.timeout=t.timeout,"onloadend"in _?_.onloadend=M:_.onreadystatechange=function(){_&&4===_.readyState&&(0!==_.status||_.responseURL&&0===_.responseURL.indexOf("file:"))&&setTimeout(M)},_.onabort=function(){_&&(n(new h("Request aborted",h.ECONNABORTED,t,_)),_=null)},_.onerror=function(){n(new h("Network Error",h.ERR_NETWORK,t,_,_)),_=null},_.ontimeout=function(){var e=t.timeout?"timeout of "+t.timeout+"ms exceeded":"timeout exceeded",r=t.transitional||l;t.timeoutErrorMessage&&(e=t.timeoutErrorMessage),n(new h(e,r.clarifyTimeoutError?h.ETIMEDOUT:h.ECONNABORTED,t,_)),_=null},r.isStandardBrowserEnv()){var S=(t.withCredentials||u(w))&&t.xsrfCookieName?o.read(t.xsrfCookieName):void 0;S&&(g[t.xsrfHeaderName]=S)}"setRequestHeader"in _&&r.forEach(g,(function(t,e){void 0===m&&"content-type"===e.toLowerCase()?delete g[e]:_.setRequestHeader(e,t)})),r.isUndefined(t.withCredentials)||(_.withCredentials=!!t.withCredentials),v&&"json"!==v&&(_.responseType=t.responseType),"function"==typeof t.onDownloadProgress&&_.addEventListener("progress",t.onDownloadProgress),"function"==typeof t.onUploadProgress&&_.upload&&_.upload.addEventListener("progress",t.onUploadProgress),(t.cancelToken||t.signal)&&(p=function(t){_&&(n(!t||t&&t.type?new f:t),_.abort(),_=null)},t.cancelToken&&t.cancelToken.subscribe(p),t.signal&&(t.signal.aborted?p():t.signal.addEventListener("abort",p))),m||(m=null);var A=d(w);A&&-1===["http","https","file"].indexOf(A)?n(new h("Unsupported protocol "+A+":",h.ERR_BAD_REQUEST,t)):_.send(m)}))}},function(t,e,n){"use strict";var r=n(239),i=n(240);t.exports=function(t,e){return t&&!r(e)?i(t,e):e}},function(t,e,n){"use strict";t.exports=function(t){return!(!t||!t.__CANCEL__)}},function(t,e,n){"use strict";var r=n(5);t.exports=function(t,e){e=e||{};var n={};function i(t,e){return r.isPlainObject(t)&&r.isPlainObject(e)?r.merge(t,e):r.isPlainObject(e)?r.merge({},e):r.isArray(e)?e.slice():e}function o(n){return r.isUndefined(e[n])?r.isUndefined(t[n])?void 0:i(void 0,t[n]):i(t[n],e[n])}function a(t){if(!r.isUndefined(e[t]))return i(void 0,e[t])}function s(n){return r.isUndefined(e[n])?r.isUndefined(t[n])?void 0:i(void 0,t[n]):i(void 0,e[n])}function c(n){return n in e?i(t[n],e[n]):n in t?i(void 0,t[n]):void 0}var u={url:a,method:a,data:a,baseURL:s,transformRequest:s,transformResponse:s,paramsSerializer:s,timeout:s,timeoutMessage:s,withCredentials:s,adapter:s,responseType:s,xsrfCookieName:s,xsrfHeaderName:s,onUploadProgress:s,onDownloadProgress:s,decompress:s,maxContentLength:s,maxBodyLength:s,beforeRedirect:s,transport:s,httpAgent:s,httpsAgent:s,cancelToken:s,socketPath:s,responseEncoding:s,validateStatus:c};return r.forEach(Object.keys(t).concat(Object.keys(e)),(function(t){var e=u[t]||o,i=e(t);r.isUndefined(i)&&e!==c||(n[t]=i)})),n}},function(t,e){t.exports={version:"0.27.2"}},function(t,e,n){"use strict";var r=n(87),i=Object.prototype.hasOwnProperty,o=Array.isArray,a=function(){for(var t=[],e=0;e<256;++e)t.push("%"+((e<16?"0":"")+e.toString(16)).toUpperCase());return t}(),s=function(t,e){for(var n=e&&e.plainObjects?Object.create(null):{},r=0;r<t.length;++r)void 0!==t[r]&&(n[r]=t[r]);return n};t.exports={arrayToObject:s,assign:function(t,e){return Object.keys(e).reduce((function(t,n){return t[n]=e[n],t}),t)},combine:function(t,e){return[].concat(t,e)},compact:function(t){for(var e=[{obj:{o:t},prop:"o"}],n=[],r=0;r<e.length;++r)for(var i=e[r],a=i.obj[i.prop],s=Object.keys(a),c=0;c<s.length;++c){var u=s[c],l=a[u];"object"==typeof l&&null!==l&&-1===n.indexOf(l)&&(e.push({obj:a,prop:u}),n.push(l))}return function(t){for(;t.length>1;){var e=t.pop(),n=e.obj[e.prop];if(o(n)){for(var r=[],i=0;i<n.length;++i)void 0!==n[i]&&r.push(n[i]);e.obj[e.prop]=r}}}(e),t},decode:function(t,e,n){var r=t.replace(/\+/g," ");if("iso-8859-1"===n)return r.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(r)}catch(t){return r}},encode:function(t,e,n,i,o){if(0===t.length)return t;var s=t;if("symbol"==typeof t?s=Symbol.prototype.toString.call(t):"string"!=typeof t&&(s=String(t)),"iso-8859-1"===n)return escape(s).replace(/%u[0-9a-f]{4}/gi,(function(t){return"%26%23"+parseInt(t.slice(2),16)+"%3B"}));for(var c="",u=0;u<s.length;++u){var l=s.charCodeAt(u);45===l||46===l||95===l||126===l||l>=48&&l<=57||l>=65&&l<=90||l>=97&&l<=122||o===r.RFC1738&&(40===l||41===l)?c+=s.charAt(u):l<128?c+=a[l]:l<2048?c+=a[192|l>>6]+a[128|63&l]:l<55296||l>=57344?c+=a[224|l>>12]+a[128|l>>6&63]+a[128|63&l]:(u+=1,l=65536+((1023&l)<<10|1023&s.charCodeAt(u)),c+=a[240|l>>18]+a[128|l>>12&63]+a[128|l>>6&63]+a[128|63&l])}return c},isBuffer:function(t){return!(!t||"object"!=typeof t)&&!!(t.constructor&&t.constructor.isBuffer&&t.constructor.isBuffer(t))},isRegExp:function(t){return"[object RegExp]"===Object.prototype.toString.call(t)},maybeMap:function(t,e){if(o(t)){for(var n=[],r=0;r<t.length;r+=1)n.push(e(t[r]));return n}return e(t)},merge:function t(e,n,r){if(!n)return e;if("object"!=typeof n){if(o(e))e.push(n);else{if(!e||"object"!=typeof e)return[e,n];(r&&(r.plainObjects||r.allowPrototypes)||!i.call(Object.prototype,n))&&(e[n]=!0)}return e}if(!e||"object"!=typeof e)return[e].concat(n);var a=e;return o(e)&&!o(n)&&(a=s(e,r)),o(e)&&o(n)?(n.forEach((function(n,o){if(i.call(e,o)){var a=e[o];a&&"object"==typeof a&&n&&"object"==typeof n?e[o]=t(a,n,r):e.push(n)}else e[o]=n})),e):Object.keys(n).reduce((function(e,o){var a=n[o];return i.call(e,o)?e[o]=t(e[o],a,r):e[o]=a,e}),a)}}},function(t,e,n){var r=n(38),i=r.slice,o=r.pluck,a=r.each,s=r.bind,c=r.create,u=r.isList,l=r.isFunction,h=r.isObject;t.exports={createStore:d};var f={version:"2.0.12",enabled:!1,get:function(t,e){var n=this.storage.read(this._namespacePrefix+t);return this._deserialize(n,e)},set:function(t,e){return void 0===e?this.remove(t):(this.storage.write(this._namespacePrefix+t,this._serialize(e)),e)},remove:function(t){this.storage.remove(this._namespacePrefix+t)},each:function(t){var e=this;this.storage.each((function(n,r){t.call(e,e._deserialize(n),(r||"").replace(e._namespaceRegexp,""))}))},clearAll:function(){this.storage.clearAll()},hasNamespace:function(t){return this._namespacePrefix=="__storejs_"+t+"_"},createStore:function(){return d.apply(this,arguments)},addPlugin:function(t){this._addPlugin(t)},namespace:function(t){return d(this.storage,this.plugins,t)}};function d(t,e,n){n||(n=""),t&&!u(t)&&(t=[t]),e&&!u(e)&&(e=[e]);var r=n?"__storejs_"+n+"_":"",d=n?new RegExp("^"+r):null;if(!/^[a-zA-Z0-9_\-]*$/.test(n))throw new Error("store.js namespaces can only have alphanumerics + underscores and dashes");var p=c({_namespacePrefix:r,_namespaceRegexp:d,_testStorage:function(t){try{var e="__storejs__test__";t.write(e,e);var n=t.read(e)===e;return t.remove(e),n}catch(t){return!1}},_assignPluginFnProp:function(t,e){var n=this[e];this[e]=function(){var e=i(arguments,0),r=this;function o(){if(n)return a(arguments,(function(t,n){e[n]=t})),n.apply(r,e)}var s=[o].concat(e);return t.apply(r,s)}},_serialize:function(t){return JSON.stringify(t)},_deserialize:function(t,e){if(!t)return e;var n="";try{n=JSON.parse(t)}catch(e){n=t}return void 0!==n?n:e},_addStorage:function(t){this.enabled||this._testStorage(t)&&(this.storage=t,this.enabled=!0)},_addPlugin:function(t){var e=this;if(u(t))a(t,(function(t){e._addPlugin(t)}));else if(!o(this.plugins,(function(e){return t===e}))){if(this.plugins.push(t),!l(t))throw new Error("Plugins must be function values that return objects");var n=t.call(this);if(!h(n))throw new Error("Plugins must return an object of function properties");a(n,(function(n,r){if(!l(n))throw new Error("Bad plugin property: "+r+" from plugin "+t.name+". Plugins should only return functions.");e._assignPluginFnProp(n,r)}))}},addStorage:function(t){!function(){var t="undefined"==typeof console?null:console;if(t){var e=t.warn?t.warn:t.log;e.apply(t,arguments)}}("store.addStorage(storage) is deprecated. Use createStore([storages])"),this._addStorage(t)}},f,{plugins:[]});return p.raw={},a(p,(function(t,e){l(t)&&(p.raw[e]=s(p,t))})),a(t,(function(t){p._addStorage(t)})),a(e,(function(t){p._addPlugin(t)})),p}},function(t,e,n){var r=n(137),i=n(260),o=[n(264)];t.exports=r.createStore(i,o)},function(t,e,n){var r=n(38).Global;function i(){return r.localStorage}function o(t){return i().getItem(t)}t.exports={name:"localStorage",read:o,write:function(t,e){return i().setItem(t,e)},each:function(t){for(var e=i().length-1;e>=0;e--){var n=i().key(e);t(o(n),n)}},remove:function(t){return i().removeItem(t)},clearAll:function(){return i().clear()}}},function(t,e,n){var r=n(38),i=r.Global,o=r.trim;t.exports={name:"cookieStorage",read:function(t){if(!t||!u(t))return null;var e="(?:^|.*;\\s*)"+escape(t).replace(/[\-\.\+\*]/g,"\\$&")+"\\s*\\=\\s*((?:[^;](?!;))*[^;]?).*";return unescape(a.cookie.replace(new RegExp(e),"$1"))},write:function(t,e){if(!t)return;a.cookie=escape(t)+"="+escape(e)+"; expires=Tue, 19 Jan 2038 03:14:07 GMT; path=/"},each:s,remove:c,clearAll:function(){s((function(t,e){c(e)}))}};var a=i.document;function s(t){for(var e=a.cookie.split(/; ?/g),n=e.length-1;n>=0;n--)if(o(e[n])){var r=e[n].split("="),i=unescape(r[0]);t(unescape(r[1]),i)}}function c(t){t&&u(t)&&(a.cookie=escape(t)+"=; expires=Thu, 01 Jan 1970 00:00:00 GMT; path=/")}function u(t){return new RegExp("(?:^|;\\s*)"+escape(t).replace(/[\-\.\+\*]/g,"\\$&")+"\\s*\\=").test(a.cookie)}},function(t,e,n){var r=n(38).Global;function i(){return r.sessionStorage}function o(t){return i().getItem(t)}t.exports={name:"sessionStorage",read:o,write:function(t,e){return i().setItem(t,e)},each:function(t){for(var e=i().length-1;e>=0;e--){var n=i().key(e);t(o(n),n)}},remove:function(t){return i().removeItem(t)},clearAll:function(){return i().clear()}}},function(t,e,n){t.exports={default:n(267),__esModule:!0}},function(t,e,n){var r=n(11),i=n(33),o=n(25),a=n(46).f;t.exports=function(t){return function(e){for(var n,s=o(e),c=i(s),u=c.length,l=0,h=[];u>l;)n=c[l++],r&&!a.call(s,n)||h.push(t?[n,s[n]]:s[n]);return h}}},function(t,e,n){"use strict";e.__esModule=!0;var r=o(n(269)),i=o(n(34));function o(t){return t&&t.__esModule?t:{default:t}}e.default=function(t,e){if(Array.isArray(t))return t;if((0,r.default)(Object(t)))return function(t,e){var n=[],r=!0,o=!1,a=void 0;try{for(var s,c=(0,i.default)(t);!(r=(s=c.next()).done)&&(n.push(s.value),!e||n.length!==e);r=!0);}catch(t){o=!0,a=t}finally{try{!r&&c.return&&c.return()}finally{if(o)throw a}}return n}(t,e);throw new TypeError("Invalid attempt to destructure non-iterable instance")}},function(t,e,n){var r=n(272),i=n(277),o=n(279),a=Function.prototype,s=Object.prototype,c=a.toString,u=s.hasOwnProperty,l=c.call(Object);t.exports=function(t){if(!o(t)||"[object Object]"!=r(t))return!1;var e=i(t);if(null===e)return!0;var n=u.call(e,"constructor")&&e.constructor;return"function"==typeof n&&n instanceof n&&c.call(n)==l}},function(t,e,n){var r=n(273).Symbol;t.exports=r},function(t,e,n){"use strict";function r(t,e,n,r,i,o,a,s){var c,u="function"==typeof t?t.options:t;if(e&&(u.render=e,u.staticRenderFns=n,u._compiled=!0),r&&(u.functional=!0),o&&(u._scopeId="data-v-"+o),a?(c=function(t){(t=t||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext)||"undefined"==typeof __VUE_SSR_CONTEXT__||(t=__VUE_SSR_CONTEXT__),i&&i.call(this,t),t&&t._registeredComponents&&t._registeredComponents.add(a)},u._ssrRegister=c):i&&(c=s?function(){i.call(this,(u.functional?this.parent:this).$root.$options.shadowRoot)}:i),c)if(u.functional){u._injectStyles=c;var l=u.render;u.render=function(t,e){return c.call(e),l(t,e)}}else{var h=u.beforeCreate;u.beforeCreate=h?[].concat(h,c):[c]}return{exports:t,options:u}}n.d(e,"a",(function(){return r}))},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.PopupManager=void 0;var r=c(n(16)),i=c(n(149)),o=c(n(282)),a=c(n(283)),s=n(57);function c(t){return t&&t.__esModule?t:{default:t}}var u=1,l=void 0;e.default={props:{visible:{type:Boolean,default:!1},openDelay:{},closeDelay:{},zIndex:{},modal:{type:Boolean,default:!1},modalFade:{type:Boolean,default:!0},modalClass:{},modalAppendToBody:{type:Boolean,default:!1},lockScroll:{type:Boolean,default:!0},closeOnPressEscape:{type:Boolean,default:!1},closeOnClickModal:{type:Boolean,default:!1}},beforeMount:function(){this._popupId="popup-"+u++,o.default.register(this._popupId,this)},beforeDestroy:function(){o.default.deregister(this._popupId),o.default.closeModal(this._popupId),this.restoreBodyStyle()},data:function(){return{opened:!1,bodyPaddingRight:null,computedBodyPaddingRight:0,withoutHiddenClass:!0,rendered:!1}},watch:{visible:function(t){var e=this;if(t){if(this._opening)return;this.rendered?this.open():(this.rendered=!0,r.default.nextTick((function(){e.open()})))}else this.close()}},methods:{open:function(t){var e=this;this.rendered||(this.rendered=!0);var n=(0,i.default)({},this.$props||this,t);this._closeTimer&&(clearTimeout(this._closeTimer),this._closeTimer=null),clearTimeout(this._openTimer);var r=Number(n.openDelay);r>0?this._openTimer=setTimeout((function(){e._openTimer=null,e.doOpen(n)}),r):this.doOpen(n)},doOpen:function(t){if(!this.$isServer&&(!this.willOpen||this.willOpen())&&!this.opened){this._opening=!0;var e=this.$el,n=t.modal,r=t.zIndex;if(r&&(o.default.zIndex=r),n&&(this._closing&&(o.default.closeModal(this._popupId),this._closing=!1),o.default.openModal(this._popupId,o.default.nextZIndex(),this.modalAppendToBody?void 0:e,t.modalClass,t.modalFade),t.lockScroll)){this.withoutHiddenClass=!(0,s.hasClass)(document.body,"el-popup-parent--hidden"),this.withoutHiddenClass&&(this.bodyPaddingRight=document.body.style.paddingRight,this.computedBodyPaddingRight=parseInt((0,s.getStyle)(document.body,"paddingRight"),10)),l=(0,a.default)();var i=document.documentElement.clientHeight<document.body.scrollHeight,c=(0,s.getStyle)(document.body,"overflowY");l>0&&(i||"scroll"===c)&&this.withoutHiddenClass&&(document.body.style.paddingRight=this.computedBodyPaddingRight+l+"px"),(0,s.addClass)(document.body,"el-popup-parent--hidden")}"static"===getComputedStyle(e).position&&(e.style.position="absolute"),e.style.zIndex=o.default.nextZIndex(),this.opened=!0,this.onOpen&&this.onOpen(),this.doAfterOpen()}},doAfterOpen:function(){this._opening=!1},close:function(){var t=this;if(!this.willClose||this.willClose()){null!==this._openTimer&&(clearTimeout(this._openTimer),this._openTimer=null),clearTimeout(this._closeTimer);var e=Number(this.closeDelay);e>0?this._closeTimer=setTimeout((function(){t._closeTimer=null,t.doClose()}),e):this.doClose()}},doClose:function(){this._closing=!0,this.onClose&&this.onClose(),this.lockScroll&&setTimeout(this.restoreBodyStyle,200),this.opened=!1,this.doAfterClose()},doAfterClose:function(){o.default.closeModal(this._popupId),this._closing=!1},restoreBodyStyle:function(){this.modal&&this.withoutHiddenClass&&(document.body.style.paddingRight=this.bodyPaddingRight,(0,s.removeClass)(document.body,"el-popup-parent--hidden")),this.withoutHiddenClass=!0}}},e.PopupManager=o.default},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t){for(var e=1,n=arguments.length;e<n;e++){var r=arguments[e]||{};for(var i in r)if(r.hasOwnProperty(i)){var o=r[i];void 0!==o&&(t[i]=o)}}return t}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:300,r=arguments.length>3&&void 0!==arguments[3]&&arguments[3];if(!t||!e)throw new Error("instance & callback is required");var i=!1,o=function(){i||(i=!0,e&&e.apply(null,arguments))};r?t.$once("after-leave",o):t.$on("after-leave",o),setTimeout((function(){o()}),n+100)}},function(t,e,n){var r;t.exports=(r=n(0),function(t){var e=r,n=e.lib,i=n.WordArray,o=n.Hasher,a=e.algo,s=[],c=[];!function(){function e(e){for(var n=t.sqrt(e),r=2;r<=n;r++)if(!(e%r))return!1;return!0}function n(t){return 4294967296*(t-(0|t))|0}for(var r=2,i=0;i<64;)e(r)&&(i<8&&(s[i]=n(t.pow(r,.5))),c[i]=n(t.pow(r,1/3)),i++),r++}();var u=[],l=a.SHA256=o.extend({_doReset:function(){this._hash=new i.init(s.slice(0))},_doProcessBlock:function(t,e){for(var n=this._hash.words,r=n[0],i=n[1],o=n[2],a=n[3],s=n[4],l=n[5],h=n[6],f=n[7],d=0;d<64;d++){if(d<16)u[d]=0|t[e+d];else{var p=u[d-15],m=(p<<25|p>>>7)^(p<<14|p>>>18)^p>>>3,g=u[d-2],v=(g<<15|g>>>17)^(g<<13|g>>>19)^g>>>10;u[d]=m+u[d-7]+v+u[d-16]}var y=r&i^r&o^i&o,_=(r<<30|r>>>2)^(r<<19|r>>>13)^(r<<10|r>>>22),b=f+((s<<26|s>>>6)^(s<<21|s>>>11)^(s<<7|s>>>25))+(s&l^~s&h)+c[d]+u[d];f=h,h=l,l=s,s=a+b|0,a=o,o=i,i=r,r=b+(_+y)|0}n[0]=n[0]+r|0,n[1]=n[1]+i|0,n[2]=n[2]+o|0,n[3]=n[3]+a|0,n[4]=n[4]+s|0,n[5]=n[5]+l|0,n[6]=n[6]+h|0,n[7]=n[7]+f|0},_doFinalize:function(){var e=this._data,n=e.words,r=8*this._nDataBytes,i=8*e.sigBytes;return n[i>>>5]|=128<<24-i%32,n[14+(i+64>>>9<<4)]=t.floor(r/4294967296),n[15+(i+64>>>9<<4)]=r,e.sigBytes=4*n.length,this._process(),this._hash},clone:function(){var t=o.clone.call(this);return t._hash=this._hash.clone(),t}});e.SHA256=o._createHelper(l),e.HmacSHA256=o._createHmacHelper(l)}(Math),r.SHA256)},function(t,e,n){var r;t.exports=(r=n(0),n(58),function(){var t=r,e=t.lib.Hasher,n=t.x64,i=n.Word,o=n.WordArray,a=t.algo;function s(){return i.create.apply(i,arguments)}var c=[s(1116352408,3609767458),s(1899447441,602891725),s(3049323471,3964484399),s(3921009573,2173295548),s(961987163,4081628472),s(1508970993,3053834265),s(2453635748,2937671579),s(2870763221,3664609560),s(3624381080,2734883394),s(310598401,1164996542),s(607225278,1323610764),s(1426881987,3590304994),s(1925078388,4068182383),s(2162078206,991336113),s(2614888103,633803317),s(3248222580,3479774868),s(3835390401,2666613458),s(4022224774,944711139),s(264347078,2341262773),s(604807628,2007800933),s(770255983,1495990901),s(1249150122,1856431235),s(1555081692,3175218132),s(1996064986,2198950837),s(2554220882,3999719339),s(2821834349,766784016),s(2952996808,2566594879),s(3210313671,3203337956),s(3336571891,1034457026),s(3584528711,2466948901),s(113926993,3758326383),s(338241895,168717936),s(666307205,1188179964),s(773529912,1546045734),s(1294757372,1522805485),s(1396182291,2643833823),s(1695183700,2343527390),s(1986661051,1014477480),s(2177026350,1206759142),s(2456956037,344077627),s(2730485921,1290863460),s(2820302411,3158454273),s(3259730800,3505952657),s(3345764771,106217008),s(3516065817,3606008344),s(3600352804,1432725776),s(4094571909,1467031594),s(275423344,851169720),s(430227734,3100823752),s(506948616,1363258195),s(659060556,3750685593),s(883997877,3785050280),s(958139571,3318307427),s(1322822218,3812723403),s(1537002063,2003034995),s(1747873779,3602036899),s(1955562222,1575990012),s(2024104815,1125592928),s(2227730452,2716904306),s(2361852424,442776044),s(2428436474,593698344),s(2756734187,3733110249),s(3204031479,2999351573),s(3329325298,3815920427),s(3391569614,3928383900),s(3515267271,566280711),s(3940187606,3454069534),s(4118630271,4000239992),s(116418474,1914138554),s(174292421,2731055270),s(289380356,3203993006),s(460393269,320620315),s(685471733,587496836),s(852142971,1086792851),s(1017036298,365543100),s(1126000580,2618297676),s(1288033470,3409855158),s(1501505948,4234509866),s(1607167915,987167468),s(1816402316,1246189591)],u=[];!function(){for(var t=0;t<80;t++)u[t]=s()}();var l=a.SHA512=e.extend({_doReset:function(){this._hash=new o.init([new i.init(1779033703,4089235720),new i.init(3144134277,2227873595),new i.init(1013904242,4271175723),new i.init(2773480762,1595750129),new i.init(1359893119,2917565137),new i.init(2600822924,725511199),new i.init(528734635,4215389547),new i.init(1541459225,327033209)])},_doProcessBlock:function(t,e){for(var n=this._hash.words,r=n[0],i=n[1],o=n[2],a=n[3],s=n[4],l=n[5],h=n[6],f=n[7],d=r.high,p=r.low,m=i.high,g=i.low,v=o.high,y=o.low,_=a.high,b=a.low,x=s.high,w=s.low,M=l.high,S=l.low,A=h.high,E=h.low,C=f.high,T=f.low,I=d,P=p,L=m,R=g,O=v,k=y,B=_,D=b,F=x,j=w,U=M,N=S,z=A,G=E,H=C,W=T,V=0;V<80;V++){var Z,Q,X=u[V];if(V<16)Q=X.high=0|t[e+2*V],Z=X.low=0|t[e+2*V+1];else{var Y=u[V-15],J=Y.high,q=Y.low,K=(J>>>1|q<<31)^(J>>>8|q<<24)^J>>>7,$=(q>>>1|J<<31)^(q>>>8|J<<24)^(q>>>7|J<<25),tt=u[V-2],et=tt.high,nt=tt.low,rt=(et>>>19|nt<<13)^(et<<3|nt>>>29)^et>>>6,it=(nt>>>19|et<<13)^(nt<<3|et>>>29)^(nt>>>6|et<<26),ot=u[V-7],at=ot.high,st=ot.low,ct=u[V-16],ut=ct.high,lt=ct.low;Q=(Q=(Q=K+at+((Z=$+st)>>>0<$>>>0?1:0))+rt+((Z+=it)>>>0<it>>>0?1:0))+ut+((Z+=lt)>>>0<lt>>>0?1:0),X.high=Q,X.low=Z}var ht,ft=F&U^~F&z,dt=j&N^~j&G,pt=I&L^I&O^L&O,mt=P&R^P&k^R&k,gt=(I>>>28|P<<4)^(I<<30|P>>>2)^(I<<25|P>>>7),vt=(P>>>28|I<<4)^(P<<30|I>>>2)^(P<<25|I>>>7),yt=(F>>>14|j<<18)^(F>>>18|j<<14)^(F<<23|j>>>9),_t=(j>>>14|F<<18)^(j>>>18|F<<14)^(j<<23|F>>>9),bt=c[V],xt=bt.high,wt=bt.low,Mt=H+yt+((ht=W+_t)>>>0<W>>>0?1:0),St=vt+mt;H=z,W=G,z=U,G=N,U=F,N=j,F=B+(Mt=(Mt=(Mt=Mt+ft+((ht+=dt)>>>0<dt>>>0?1:0))+xt+((ht+=wt)>>>0<wt>>>0?1:0))+Q+((ht+=Z)>>>0<Z>>>0?1:0))+((j=D+ht|0)>>>0<D>>>0?1:0)|0,B=O,D=k,O=L,k=R,L=I,R=P,I=Mt+(gt+pt+(St>>>0<vt>>>0?1:0))+((P=ht+St|0)>>>0<ht>>>0?1:0)|0}p=r.low=p+P,r.high=d+I+(p>>>0<P>>>0?1:0),g=i.low=g+R,i.high=m+L+(g>>>0<R>>>0?1:0),y=o.low=y+k,o.high=v+O+(y>>>0<k>>>0?1:0),b=a.low=b+D,a.high=_+B+(b>>>0<D>>>0?1:0),w=s.low=w+j,s.high=x+F+(w>>>0<j>>>0?1:0),S=l.low=S+N,l.high=M+U+(S>>>0<N>>>0?1:0),E=h.low=E+G,h.high=A+z+(E>>>0<G>>>0?1:0),T=f.low=T+W,f.high=C+H+(T>>>0<W>>>0?1:0)},_doFinalize:function(){var t=this._data,e=t.words,n=8*this._nDataBytes,r=8*t.sigBytes;return e[r>>>5]|=128<<24-r%32,e[30+(r+128>>>10<<5)]=Math.floor(n/4294967296),e[31+(r+128>>>10<<5)]=n,t.sigBytes=4*e.length,this._process(),this._hash.toX32()},clone:function(){var t=e.clone.call(this);return t._hash=this._hash.clone(),t},blockSize:32});t.SHA512=e._createHelper(l),t.HmacSHA512=e._createHmacHelper(l)}(),r.SHA512)},function(t,e,n){var r=n(14);t.exports=function(t,e){if(!r(t)||t._t!==e)throw TypeError("Incompatible receiver, "+e+" required!");return t}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=p(n(12)),i=n(2),o=p(n(92)),a=n(3),s=p(n(93)),c=p(n(94)),u=p(n(348)),l=p(n(156)),h=p(n(353)),f=p(n(61)),d=p(n(155));function p(t){return t&&t.__esModule?t:{default:t}}e.default={name:"MapAndBasicHeader",inject:["slotsList","propsList"],props:{theme:{type:String,default:"light"},fixed:{type:Boolean,default:!1},navList:{type:Array,default:function(){return[]}}},data:function(){return{currentPath:void 0,currentIndex:0,overflowedItems:[],menuItemSizes:[]}},computed:{skin:function(){return this.$store.state.user.skin.color}},mounted:function(){var t=this;this.$watch("$route",(function(e){var n=e.matched;if(t.navList&&!(0,a.isEmpty)(t.navList)&&n.length){var r=(0,i.treeFindPath)(t.navList,(function(t){return t.meta.id===n[n.length-1].meta.id}));t.currentPath=r[0].path;var o=t.navList.findIndex((function(e){return e.path===t.currentPath}));t.currentIndex=o>-1?o:0}}),{immediate:!0,deep:!0})},watch:{skin:{handler:function(t){this.propsList.nav&&this.renderNavActive(t,d.default.toNum3(t))},immediate:!0}},methods:{setChildrenWidthAndResize:function(){if(this.navList&&!(0,a.isEmpty)(this.navList)){var t=this.navList.filter((function(t){return 1===t.type}));this.menuItemSizes=t,this.overflowedItems=[]}},onResize:function(t){var e=parseFloat(document.documentElement.style.fontSize)/100*120;if(this.navList&&!(0,a.isEmpty)(this.navList)){var n=this.navList.filter((function(t){return 1===t.type}));if(e*n.length-10>t.width){var r=Math.round(t.width/e);r>0?(this.menuItemSizes=n.slice(0,r-1),this.overflowedItems=n.slice(r-1,n.length)):(this.menuItemSizes=n,this.overflowedItems=[])}else this.menuItemSizes=n,this.overflowedItems=[];this.renderNavActive("#0F6EFF",[15,110,255])}},renderNavActive:function(t,e){var n=this;(0,a.isEmpty)(this.menuItemSizes)&&this.menuItemSizes.length<=1||this.$nextTick((function(){u.default.drawNav({index:n.currentIndex,canvas:document.getElementById("navCanvas"),navItem:document.querySelector(".rk-web-core-header-right-nav-item"),navCount:n.menuItemSizes.length,color:t,rgb:e})}))},renderNav:function(){var t=this,e=this.$createElement;return this.menuItemSizes&&!(0,a.isEmpty)(this.menuItemSizes)?this.menuItemSizes.map((function(n,o){var a="dark"!==t.theme?(0,r.default)([i.prefixCls+"-header-right-nav-item",n.path===t.currentPath?i.prefixCls+"-header-right-nav-active":""]):(0,r.default)([i.prefixCls+"-header-right-nav-item",i.prefixCls+"-header-dark-nav-item",n.path===t.currentPath?i.prefixCls+"-header-dark-nav-active":""]);return e("div",{class:a,ref:"navItem",on:{click:function(){return t.handleTap(n,o)}}},[n.meta.title])})):null},handleTap:function(t,e){var n=this;if(1===t.meta.chainType){var r=t.path.indexOf("http")>-1?t.path:"http://"+t.path;1!==t.meta.functionType&&(0,f.default)(this,{},null,!1),window.open(r)}else this.currentPath=t.path,this.$store.commit("user/SET_NAV_INDEX",e),this.$router.push(t.path).then((function(e){n.propsList.nav&&u.default._toggle(n.currentIndex),1!==t.meta.functionType&&(0,f.default)(n,{},null,!1)})),this.$emit("change",t)}},render:function(){var t=this,e=arguments[0],n=this.theme,u=this.fixed,f=this.slotsList,d=this.propsList,p=(0,r.default)([i.prefixCls+"-header",i.prefixCls+"-header-"+n,u?i.prefixCls+"-header-fixed":""]);return e("a-layout-header",{class:p},[e("div",{class:[i.prefixCls+"-header-"+n+"-inner",i.prefixCls+"-header-inner"]},[f.logo?f.logo:e(o.default,{attrs:{prefix:"basic",theme:n}}),f.prefix,e("div",{class:i.prefixCls+"-header-right",ref:"rightDom"},[d.nav?e(l.default,{on:{resize:function(e){return t.onResize(e)}}},[e("div",{class:[i.prefixCls+"-header-right-nav","dark"===n?i.prefixCls+"-header-dark":""]},[e("canvas",{attrs:{id:"navCanvas"},style:"position: absolute; z-index: -1"}),this.renderNav(),(0,a.isEmpty)(this.overflowedItems)?null:e(h.default,{attrs:{columns:this.overflowedItems}})])]):null,d.right?e("div",{class:i.prefixCls+"-header-right-extra"},[f.header,e(s.default,{attrs:{theme:n}}),f.extends,e(c.default,{attrs:{theme:n}})]):null]),f.suffix]),this.slotsList.headerBottom])}}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=o(n(27)),i=o(n(28));function o(t){return t&&t.__esModule?t:{default:t}}var a={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dodgerblue:"#1e90ff",feldspar:"#d19275",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",gold:"#ffd700",goldenrod:"#daa520",gray:"#808080",green:"#008000",greenyellow:"#adff2f",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavender:"#e6e6fa",lavenderblush:"#fff0f5",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgrey:"#d3d3d3",lightgreen:"#90ee90",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslateblue:"#8470ff",lightslategray:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370d8",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#d87093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",violetred:"#d02090",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"},s=function(){function t(){(0,r.default)(this,t)}return(0,i.default)(t,[{key:"formatColor",value:function(t,e){return t.indexOf("#")>-1?"rgba("+this.toNum3(t).toString()+","+e+")":a[t]?"rgba("+this.toNum3(a[t]).toString()+","+e+")":"rgba("+this.toNum3(t).toString()+","+e+")"}},{key:"isHex",value:function(t){return t.length>=4&&"#"===t[0]}},{key:"isRgb",value:function(t){return t.length>=10&&"rgb"===t.slice(0,3)}},{key:"isRgba",value:function(t){return t.length>=13&&"rgba"===t.slice(0,4)}},{key:"pad2",value:function(t){var e=t.toString(16);return 1===e.length&&(e="0"+e),e}},{key:"lighten",value:function(t,e){return this.mix("fff",t,e)}},{key:"darken",value:function(t,e){return this.mix("000",t,e)}},{key:"mix",value:function(t,e,n,r,i){t=this.dropPrefix(t),e=this.dropPrefix(e),void 0===n&&(n=.5),void 0===r&&(r=1),void 0===i&&(i=1);var o=2*n-1,a=r-i,s=((o*a==-1?o:(o+a)/(1+o*a))+1)/2,c=1-s,u=this.toNum3(t),l=this.toNum3(e),h=Math.round(s*u[0]+c*l[0]),f=Math.round(s*u[1]+c*l[1]),d=Math.round(s*u[2]+c*l[2]);return"#"+this.pad2(h)+this.pad2(f)+this.pad2(d)}},{key:"rgbaToRgb",value:function(t,e,n){return this.mix(t,n||"fff",.5,e,1-e)}},{key:"toNum3",value:function(t){return 3===(t=this.dropPrefix(t)).length&&(t=t[0]+t[0]+t[1]+t[1]+t[2]+t[2]),[parseInt(t.slice(0,2),16),parseInt(t.slice(2,4),16),parseInt(t.slice(4,6),16)]}},{key:"dropPrefix",value:function(t){return t.replace("#","")}},{key:"rrggbbToHsl",value:function(t){var e=this.toNum3(t),n=this.rgbToHsl.apply(0,e);return[n[0].toFixed(0),(100*n[1]).toFixed(3)+"%",(100*n[2]).toFixed(3)+"%"].join(",")}},{key:"rgbToHsl",value:function(t,e,n){var r=t/255,i=e/255,o=n/255,a=Math.max(r,i,o),s=Math.min(r,i,o),c=a-s,u=(a+s)/2,l=0,h=0;if(Math.abs(c)>1e-5){h=u<=.5?c/(a+s):c/(2-a-s);var f=(a-r)/c,d=(a-i)/c,p=(a-o)/c;l=r==a?p-d:i==a?2+f-p:4+d-f,(l*=60)<0&&(l+=360)}return[l,h,u]}}]),t}();e.default=new s},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r,i=n(117),o=(r=i)&&r.__esModule?r:{default:r},a=n(3);var s={name:"IepResizeObserver",props:{disabled:Boolean},data:function(){return this.currentElement=null,this.resizeObserver=null,{width:0,height:0}},mounted:function(){this.onComponentUpdated()},updated:function(){this.onComponentUpdated()},beforeDestroy:function(){this.destroyObserver()},methods:{onComponentUpdated:function(){if(this.$props.disabled)this.destroyObserver();else{var t=this.$el;t!==this.currentElement&&(this.destroyObserver(),this.currentElement=t),!this.resizeObserver&&t&&(this.resizeObserver=new o.default((0,a.debounce)(this.onResize,300)),this.resizeObserver.observe(t))}},onResize:function(t){var e=t[0].target.getBoundingClientRect(),n=e.width,r=e.height,i=Math.floor(n),o=Math.floor(r);if(this.width!==i||this.height!==o){var a={width:i,height:o};this.width=i,this.height=o,this.$emit("resize",a)}},destroyObserver:function(){this.resizeObserver&&(this.resizeObserver.disconnect(),this.resizeObserver=null)}},render:function(){return this.$slots.default[0]}};e.default=s},function(t,e,n){n(31),n(163),t.exports=n(1).Array.from},function(t,e,n){var r=n(65),i=n(66);t.exports=function(t){return function(e,n){var o,a,s=String(i(e)),c=r(n),u=s.length;return c<0||c>=u?t?"":void 0:(o=s.charCodeAt(c))<55296||o>56319||c+1===u||(a=s.charCodeAt(c+1))<56320||a>57343?t?s.charAt(c):o:t?s.slice(c,c+2):a-56320+(o-55296<<10)+65536}}},function(t,e,n){"use strict";var r=n(70),i=n(43),o=n(45),a={};n(21)(a,n(8)("iterator"),(function(){return this})),t.exports=function(t,e,n){t.prototype=r(a,{next:i(1,n)}),o(t,e+" Iterator")}},function(t,e,n){var r=n(13),i=n(18),o=n(33);t.exports=n(11)?Object.defineProperties:function(t,e){i(t);for(var n,a=o(e),s=a.length,c=0;s>c;)r.f(t,n=a[c++],e[n]);return t}},function(t,e,n){var r=n(25),i=n(52),o=n(162);t.exports=function(t){return function(e,n,a){var s,c=r(e),u=i(c.length),l=o(a,u);if(t&&n!=n){for(;u>l;)if((s=c[l++])!=s)return!0}else for(;u>l;l++)if((t||l in c)&&c[l]===n)return t||l||0;return!t&&-1}}},function(t,e,n){var r=n(65),i=Math.max,o=Math.min;t.exports=function(t,e){return(t=r(t))<0?i(t+e,0):o(t,e)}},function(t,e,n){"use strict";var r=n(20),i=n(4),o=n(26),a=n(108),s=n(109),c=n(52),u=n(164),l=n(75);i(i.S+i.F*!n(110)((function(t){Array.from(t)})),"Array",{from:function(t){var e,n,i,h,f=o(t),d="function"==typeof this?this:Array,p=arguments.length,m=p>1?arguments[1]:void 0,g=void 0!==m,v=0,y=l(f);if(g&&(m=r(m,p>2?arguments[2]:void 0,2)),null==y||d==Array&&s(y))for(n=new d(e=c(f.length));e>v;v++)u(n,v,g?m(f[v],v):f[v]);else for(h=y.call(f),n=new d;!(i=h.next()).done;v++)u(n,v,g?a(h,m,[i.value,v],!0):i.value);return n.length=v,n}})},function(t,e,n){"use strict";var r=n(13),i=n(43);t.exports=function(t,e,n){e in t?r.f(t,e,i(0,n)):t[e]=n}},function(t,e,n){t.exports={default:n(166),__esModule:!0}},function(t,e,n){n(167),t.exports=n(1).Object.assign},function(t,e,n){var r=n(4);r(r.S+r.F,"Object",{assign:n(168)})},function(t,e,n){"use strict";var r=n(11),i=n(33),o=n(76),a=n(46),s=n(26),c=n(71),u=Object.assign;t.exports=!u||n(23)((function(){var t={},e={},n=Symbol(),r="abcdefghijklmnopqrst";return t[n]=7,r.split("").forEach((function(t){e[t]=t})),7!=u({},t)[n]||Object.keys(u({},e)).join("")!=r}))?function(t,e){for(var n=s(t),u=arguments.length,l=1,h=o.f,f=a.f;u>l;)for(var d,p=c(arguments[l++]),m=h?i(p).concat(h(p)):i(p),g=m.length,v=0;g>v;)d=m[v++],r&&!f.call(p,d)||(n[d]=p[d]);return n}:u},function(t,e,n){n(170),t.exports=n(1).Object.keys},function(t,e,n){var r=n(26),i=n(33);n(111)("keys",(function(){return function(t){return i(r(t))}}))},function(t,e,n){n(172);var r=n(1).Object;t.exports=function(t,e,n){return r.defineProperty(t,e,n)}},function(t,e,n){var r=n(4);r(r.S+r.F*!n(11),"Object",{defineProperty:n(13).f})},function(t,e){t.exports=function(t){return t.webpackPolyfill||(t.deprecate=function(){},t.paths=[],t.children||(t.children=[]),Object.defineProperty(t,"loaded",{enumerable:!0,get:function(){return t.l}}),Object.defineProperty(t,"id",{enumerable:!0,get:function(){return t.i}}),t.webpackPolyfill=1),t}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.version="0.11.20"},function(t,e,n){"use strict";function r(t,e){for(var n in e)t[n]=e[n];return t}n.r(e);var i=/[!'()*]/g,o=function(t){return"%"+t.charCodeAt(0).toString(16)},a=/%2C/g,s=function(t){return encodeURIComponent(t).replace(i,o).replace(a,",")};function c(t){try{return decodeURIComponent(t)}catch(t){0}return t}var u=function(t){return null==t||"object"==typeof t?t:String(t)};function l(t){var e={};return(t=t.trim().replace(/^(\?|#|&)/,""))?(t.split("&").forEach((function(t){var n=t.replace(/\+/g," ").split("="),r=c(n.shift()),i=n.length>0?c(n.join("=")):null;void 0===e[r]?e[r]=i:Array.isArray(e[r])?e[r].push(i):e[r]=[e[r],i]})),e):e}function h(t){var e=t?Object.keys(t).map((function(e){var n=t[e];if(void 0===n)return"";if(null===n)return s(e);if(Array.isArray(n)){var r=[];return n.forEach((function(t){void 0!==t&&(null===t?r.push(s(e)):r.push(s(e)+"="+s(t)))})),r.join("&")}return s(e)+"="+s(n)})).filter((function(t){return t.length>0})).join("&"):null;return e?"?"+e:""}var f=/\/?$/;function d(t,e,n,r){var i=r&&r.options.stringifyQuery,o=e.query||{};try{o=p(o)}catch(t){}var a={name:e.name||t&&t.name,meta:t&&t.meta||{},path:e.path||"/",hash:e.hash||"",query:o,params:e.params||{},fullPath:v(e,i),matched:t?g(t):[]};return n&&(a.redirectedFrom=v(n,i)),Object.freeze(a)}function p(t){if(Array.isArray(t))return t.map(p);if(t&&"object"==typeof t){var e={};for(var n in t)e[n]=p(t[n]);return e}return t}var m=d(null,{path:"/"});function g(t){for(var e=[];t;)e.unshift(t),t=t.parent;return e}function v(t,e){var n=t.path,r=t.query;void 0===r&&(r={});var i=t.hash;return void 0===i&&(i=""),(n||"/")+(e||h)(r)+i}function y(t,e,n){return e===m?t===e:!!e&&(t.path&&e.path?t.path.replace(f,"")===e.path.replace(f,"")&&(n||t.hash===e.hash&&_(t.query,e.query)):!(!t.name||!e.name)&&(t.name===e.name&&(n||t.hash===e.hash&&_(t.query,e.query)&&_(t.params,e.params))))}function _(t,e){if(void 0===t&&(t={}),void 0===e&&(e={}),!t||!e)return t===e;var n=Object.keys(t).sort(),r=Object.keys(e).sort();return n.length===r.length&&n.every((function(n,i){var o=t[n];if(r[i]!==n)return!1;var a=e[n];return null==o||null==a?o===a:"object"==typeof o&&"object"==typeof a?_(o,a):String(o)===String(a)}))}function b(t){for(var e=0;e<t.matched.length;e++){var n=t.matched[e];for(var r in n.instances){var i=n.instances[r],o=n.enteredCbs[r];if(i&&o){delete n.enteredCbs[r];for(var a=0;a<o.length;a++)i._isBeingDestroyed||o[a](i)}}}}var x={name:"RouterView",functional:!0,props:{name:{type:String,default:"default"}},render:function(t,e){var n=e.props,i=e.children,o=e.parent,a=e.data;a.routerView=!0;for(var s=o.$createElement,c=n.name,u=o.$route,l=o._routerViewCache||(o._routerViewCache={}),h=0,f=!1;o&&o._routerRoot!==o;){var d=o.$vnode?o.$vnode.data:{};d.routerView&&h++,d.keepAlive&&o._directInactive&&o._inactive&&(f=!0),o=o.$parent}if(a.routerViewDepth=h,f){var p=l[c],m=p&&p.component;return m?(p.configProps&&w(m,a,p.route,p.configProps),s(m,a,i)):s()}var g=u.matched[h],v=g&&g.components[c];if(!g||!v)return l[c]=null,s();l[c]={component:v},a.registerRouteInstance=function(t,e){var n=g.instances[c];(e&&n!==t||!e&&n===t)&&(g.instances[c]=e)},(a.hook||(a.hook={})).prepatch=function(t,e){g.instances[c]=e.componentInstance},a.hook.init=function(t){t.data.keepAlive&&t.componentInstance&&t.componentInstance!==g.instances[c]&&(g.instances[c]=t.componentInstance),b(u)};var y=g.props&&g.props[c];return y&&(r(l[c],{route:u,configProps:y}),w(v,a,u,y)),s(v,a,i)}};function w(t,e,n,i){var o=e.props=function(t,e){switch(typeof e){case"undefined":return;case"object":return e;case"function":return e(t);case"boolean":return e?t.params:void 0;default:0}}(n,i);if(o){o=e.props=r({},o);var a=e.attrs=e.attrs||{};for(var s in o)t.props&&s in t.props||(a[s]=o[s],delete o[s])}}function M(t,e,n){var r=t.charAt(0);if("/"===r)return t;if("?"===r||"#"===r)return e+t;var i=e.split("/");n&&i[i.length-1]||i.pop();for(var o=t.replace(/^\//,"").split("/"),a=0;a<o.length;a++){var s=o[a];".."===s?i.pop():"."!==s&&i.push(s)}return""!==i[0]&&i.unshift(""),i.join("/")}function S(t){return t.replace(/\/+/g,"/")}var A=Array.isArray||function(t){return"[object Array]"==Object.prototype.toString.call(t)},E=N,C=R,T=function(t,e){return k(R(t,e),e)},I=k,P=U,L=new RegExp(["(\\\\.)","([\\/.])?(?:(?:\\:(\\w+)(?:\\(((?:\\\\.|[^\\\\()])+)\\))?|\\(((?:\\\\.|[^\\\\()])+)\\))([+*?])?|(\\*))"].join("|"),"g");function R(t,e){for(var n,r=[],i=0,o=0,a="",s=e&&e.delimiter||"/";null!=(n=L.exec(t));){var c=n[0],u=n[1],l=n.index;if(a+=t.slice(o,l),o=l+c.length,u)a+=u[1];else{var h=t[o],f=n[2],d=n[3],p=n[4],m=n[5],g=n[6],v=n[7];a&&(r.push(a),a="");var y=null!=f&&null!=h&&h!==f,_="+"===g||"*"===g,b="?"===g||"*"===g,x=n[2]||s,w=p||m;r.push({name:d||i++,prefix:f||"",delimiter:x,optional:b,repeat:_,partial:y,asterisk:!!v,pattern:w?D(w):v?".*":"[^"+B(x)+"]+?"})}}return o<t.length&&(a+=t.substr(o)),a&&r.push(a),r}function O(t){return encodeURI(t).replace(/[\/?#]/g,(function(t){return"%"+t.charCodeAt(0).toString(16).toUpperCase()}))}function k(t,e){for(var n=new Array(t.length),r=0;r<t.length;r++)"object"==typeof t[r]&&(n[r]=new RegExp("^(?:"+t[r].pattern+")$",j(e)));return function(e,r){for(var i="",o=e||{},a=(r||{}).pretty?O:encodeURIComponent,s=0;s<t.length;s++){var c=t[s];if("string"!=typeof c){var u,l=o[c.name];if(null==l){if(c.optional){c.partial&&(i+=c.prefix);continue}throw new TypeError('Expected "'+c.name+'" to be defined')}if(A(l)){if(!c.repeat)throw new TypeError('Expected "'+c.name+'" to not repeat, but received `'+JSON.stringify(l)+"`");if(0===l.length){if(c.optional)continue;throw new TypeError('Expected "'+c.name+'" to not be empty')}for(var h=0;h<l.length;h++){if(u=a(l[h]),!n[s].test(u))throw new TypeError('Expected all "'+c.name+'" to match "'+c.pattern+'", but received `'+JSON.stringify(u)+"`");i+=(0===h?c.prefix:c.delimiter)+u}}else{if(u=c.asterisk?encodeURI(l).replace(/[?#]/g,(function(t){return"%"+t.charCodeAt(0).toString(16).toUpperCase()})):a(l),!n[s].test(u))throw new TypeError('Expected "'+c.name+'" to match "'+c.pattern+'", but received "'+u+'"');i+=c.prefix+u}}else i+=c}return i}}function B(t){return t.replace(/([.+*?=^!:${}()[\]|\/\\])/g,"\\$1")}function D(t){return t.replace(/([=!:$\/()])/g,"\\$1")}function F(t,e){return t.keys=e,t}function j(t){return t&&t.sensitive?"":"i"}function U(t,e,n){A(e)||(n=e||n,e=[]);for(var r=(n=n||{}).strict,i=!1!==n.end,o="",a=0;a<t.length;a++){var s=t[a];if("string"==typeof s)o+=B(s);else{var c=B(s.prefix),u="(?:"+s.pattern+")";e.push(s),s.repeat&&(u+="(?:"+c+u+")*"),o+=u=s.optional?s.partial?c+"("+u+")?":"(?:"+c+"("+u+"))?":c+"("+u+")"}}var l=B(n.delimiter||"/"),h=o.slice(-l.length)===l;return r||(o=(h?o.slice(0,-l.length):o)+"(?:"+l+"(?=$))?"),o+=i?"$":r&&h?"":"(?="+l+"|$)",F(new RegExp("^"+o,j(n)),e)}function N(t,e,n){return A(e)||(n=e||n,e=[]),n=n||{},t instanceof RegExp?function(t,e){var n=t.source.match(/\((?!\?)/g);if(n)for(var r=0;r<n.length;r++)e.push({name:r,prefix:null,delimiter:null,optional:!1,repeat:!1,partial:!1,asterisk:!1,pattern:null});return F(t,e)}(t,e):A(t)?function(t,e,n){for(var r=[],i=0;i<t.length;i++)r.push(N(t[i],e,n).source);return F(new RegExp("(?:"+r.join("|")+")",j(n)),e)}(t,e,n):function(t,e,n){return U(R(t,n),e,n)}(t,e,n)}E.parse=C,E.compile=T,E.tokensToFunction=I,E.tokensToRegExp=P;var z=Object.create(null);function G(t,e,n){e=e||{};try{var r=z[t]||(z[t]=E.compile(t));return"string"==typeof e.pathMatch&&(e[0]=e.pathMatch),r(e,{pretty:!0})}catch(t){return""}finally{delete e[0]}}function H(t,e,n,i){var o="string"==typeof t?{path:t}:t;if(o._normalized)return o;if(o.name){var a=(o=r({},t)).params;return a&&"object"==typeof a&&(o.params=r({},a)),o}if(!o.path&&o.params&&e){(o=r({},o))._normalized=!0;var s=r(r({},e.params),o.params);if(e.name)o.name=e.name,o.params=s;else if(e.matched.length){var c=e.matched[e.matched.length-1].path;o.path=G(c,s,e.path)}else 0;return o}var h=function(t){var e="",n="",r=t.indexOf("#");r>=0&&(e=t.slice(r),t=t.slice(0,r));var i=t.indexOf("?");return i>=0&&(n=t.slice(i+1),t=t.slice(0,i)),{path:t,query:n,hash:e}}(o.path||""),f=e&&e.path||"/",d=h.path?M(h.path,f,n||o.append):f,p=function(t,e,n){void 0===e&&(e={});var r,i=n||l;try{r=i(t||"")}catch(t){r={}}for(var o in e){var a=e[o];r[o]=Array.isArray(a)?a.map(u):u(a)}return r}(h.query,o.query,i&&i.options.parseQuery),m=o.hash||h.hash;return m&&"#"!==m.charAt(0)&&(m="#"+m),{_normalized:!0,path:d,query:p,hash:m}}var W,V=function(){},Z={name:"RouterLink",props:{to:{type:[String,Object],required:!0},tag:{type:String,default:"a"},custom:Boolean,exact:Boolean,exactPath:Boolean,append:Boolean,replace:Boolean,activeClass:String,exactActiveClass:String,ariaCurrentValue:{type:String,default:"page"},event:{type:[String,Array],default:"click"}},render:function(t){var e=this,n=this.$router,i=this.$route,o=n.resolve(this.to,i,this.append),a=o.location,s=o.route,c=o.href,u={},l=n.options.linkActiveClass,h=n.options.linkExactActiveClass,p=null==l?"router-link-active":l,m=null==h?"router-link-exact-active":h,g=null==this.activeClass?p:this.activeClass,v=null==this.exactActiveClass?m:this.exactActiveClass,_=s.redirectedFrom?d(null,H(s.redirectedFrom),null,n):s;u[v]=y(i,_,this.exactPath),u[g]=this.exact||this.exactPath?u[v]:function(t,e){return 0===t.path.replace(f,"/").indexOf(e.path.replace(f,"/"))&&(!e.hash||t.hash===e.hash)&&function(t,e){for(var n in e)if(!(n in t))return!1;return!0}(t.query,e.query)}(i,_);var b=u[v]?this.ariaCurrentValue:null,x=function(t){Q(t)&&(e.replace?n.replace(a,V):n.push(a,V))},w={click:Q};Array.isArray(this.event)?this.event.forEach((function(t){w[t]=x})):w[this.event]=x;var M={class:u},S=!this.$scopedSlots.$hasNormal&&this.$scopedSlots.default&&this.$scopedSlots.default({href:c,route:s,navigate:x,isActive:u[g],isExactActive:u[v]});if(S){if(1===S.length)return S[0];if(S.length>1||!S.length)return 0===S.length?t():t("span",{},S)}if("a"===this.tag)M.on=w,M.attrs={href:c,"aria-current":b};else{var A=function t(e){var n;if(e)for(var r=0;r<e.length;r++){if("a"===(n=e[r]).tag)return n;if(n.children&&(n=t(n.children)))return n}}(this.$slots.default);if(A){A.isStatic=!1;var E=A.data=r({},A.data);for(var C in E.on=E.on||{},E.on){var T=E.on[C];C in w&&(E.on[C]=Array.isArray(T)?T:[T])}for(var I in w)I in E.on?E.on[I].push(w[I]):E.on[I]=x;var P=A.data.attrs=r({},A.data.attrs);P.href=c,P["aria-current"]=b}else M.on=w}return t(this.tag,M,this.$slots.default)}};function Q(t){if(!(t.metaKey||t.altKey||t.ctrlKey||t.shiftKey||t.defaultPrevented||void 0!==t.button&&0!==t.button)){if(t.currentTarget&&t.currentTarget.getAttribute){var e=t.currentTarget.getAttribute("target");if(/\b_blank\b/i.test(e))return}return t.preventDefault&&t.preventDefault(),!0}}var X="undefined"!=typeof window;function Y(t,e,n,r,i){var o=e||[],a=n||Object.create(null),s=r||Object.create(null);t.forEach((function(t){!function t(e,n,r,i,o,a){var s=i.path,c=i.name;0;var u=i.pathToRegexpOptions||{},l=function(t,e,n){n||(t=t.replace(/\/$/,""));if("/"===t[0])return t;if(null==e)return t;return S(e.path+"/"+t)}(s,o,u.strict);"boolean"==typeof i.caseSensitive&&(u.sensitive=i.caseSensitive);var h={path:l,regex:J(l,u),components:i.components||{default:i.component},alias:i.alias?"string"==typeof i.alias?[i.alias]:i.alias:[],instances:{},enteredCbs:{},name:c,parent:o,matchAs:a,redirect:i.redirect,beforeEnter:i.beforeEnter,meta:i.meta||{},props:null==i.props?{}:i.components?i.props:{default:i.props}};i.children&&i.children.forEach((function(i){var o=a?S(a+"/"+i.path):void 0;t(e,n,r,i,h,o)}));n[h.path]||(e.push(h.path),n[h.path]=h);if(void 0!==i.alias)for(var f=Array.isArray(i.alias)?i.alias:[i.alias],d=0;d<f.length;++d){0;var p={path:f[d],children:i.children};t(e,n,r,p,o,h.path||"/")}c&&(r[c]||(r[c]=h))}(o,a,s,t,i)}));for(var c=0,u=o.length;c<u;c++)"*"===o[c]&&(o.push(o.splice(c,1)[0]),u--,c--);return{pathList:o,pathMap:a,nameMap:s}}function J(t,e){return E(t,[],e)}function q(t,e){var n=Y(t),r=n.pathList,i=n.pathMap,o=n.nameMap;function a(t,n,a){var s=H(t,n,!1,e),u=s.name;if(u){var l=o[u];if(!l)return c(null,s);var h=l.regex.keys.filter((function(t){return!t.optional})).map((function(t){return t.name}));if("object"!=typeof s.params&&(s.params={}),n&&"object"==typeof n.params)for(var f in n.params)!(f in s.params)&&h.indexOf(f)>-1&&(s.params[f]=n.params[f]);return s.path=G(l.path,s.params),c(l,s,a)}if(s.path){s.params={};for(var d=0;d<r.length;d++){var p=r[d],m=i[p];if(K(m.regex,s.path,s.params))return c(m,s,a)}}return c(null,s)}function s(t,n){var r=t.redirect,i="function"==typeof r?r(d(t,n,null,e)):r;if("string"==typeof i&&(i={path:i}),!i||"object"!=typeof i)return c(null,n);var s=i,u=s.name,l=s.path,h=n.query,f=n.hash,p=n.params;if(h=s.hasOwnProperty("query")?s.query:h,f=s.hasOwnProperty("hash")?s.hash:f,p=s.hasOwnProperty("params")?s.params:p,u){o[u];return a({_normalized:!0,name:u,query:h,hash:f,params:p},void 0,n)}if(l){var m=function(t,e){return M(t,e.parent?e.parent.path:"/",!0)}(l,t);return a({_normalized:!0,path:G(m,p),query:h,hash:f},void 0,n)}return c(null,n)}function c(t,n,r){return t&&t.redirect?s(t,r||n):t&&t.matchAs?function(t,e,n){var r=a({_normalized:!0,path:G(n,e.params)});if(r){var i=r.matched,o=i[i.length-1];return e.params=r.params,c(o,e)}return c(null,e)}(0,n,t.matchAs):d(t,n,r,e)}return{match:a,addRoute:function(t,e){var n="object"!=typeof t?o[t]:void 0;Y([e||t],r,i,o,n),n&&n.alias.length&&Y(n.alias.map((function(t){return{path:t,children:[e]}})),r,i,o,n)},getRoutes:function(){return r.map((function(t){return i[t]}))},addRoutes:function(t){Y(t,r,i,o)}}}function K(t,e,n){var r=e.match(t);if(!r)return!1;if(!n)return!0;for(var i=1,o=r.length;i<o;++i){var a=t.keys[i-1];a&&(n[a.name||"pathMatch"]="string"==typeof r[i]?c(r[i]):r[i])}return!0}var $=X&&window.performance&&window.performance.now?window.performance:Date;function tt(){return $.now().toFixed(3)}var et=tt();function nt(){return et}function rt(t){return et=t}var it=Object.create(null);function ot(){"scrollRestoration"in window.history&&(window.history.scrollRestoration="manual");var t=window.location.protocol+"//"+window.location.host,e=window.location.href.replace(t,""),n=r({},window.history.state);return n.key=nt(),window.history.replaceState(n,"",e),window.addEventListener("popstate",ct),function(){window.removeEventListener("popstate",ct)}}function at(t,e,n,r){if(t.app){var i=t.options.scrollBehavior;i&&t.app.$nextTick((function(){var o=function(){var t=nt();if(t)return it[t]}(),a=i.call(t,e,n,r?o:null);a&&("function"==typeof a.then?a.then((function(t){dt(t,o)})).catch((function(t){0})):dt(a,o))}))}}function st(){var t=nt();t&&(it[t]={x:window.pageXOffset,y:window.pageYOffset})}function ct(t){st(),t.state&&t.state.key&&rt(t.state.key)}function ut(t){return ht(t.x)||ht(t.y)}function lt(t){return{x:ht(t.x)?t.x:window.pageXOffset,y:ht(t.y)?t.y:window.pageYOffset}}function ht(t){return"number"==typeof t}var ft=/^#\d/;function dt(t,e){var n,r="object"==typeof t;if(r&&"string"==typeof t.selector){var i=ft.test(t.selector)?document.getElementById(t.selector.slice(1)):document.querySelector(t.selector);if(i){var o=t.offset&&"object"==typeof t.offset?t.offset:{};e=function(t,e){var n=document.documentElement.getBoundingClientRect(),r=t.getBoundingClientRect();return{x:r.left-n.left-e.x,y:r.top-n.top-e.y}}(i,o={x:ht((n=o).x)?n.x:0,y:ht(n.y)?n.y:0})}else ut(t)&&(e=lt(t))}else r&&ut(t)&&(e=lt(t));e&&("scrollBehavior"in document.documentElement.style?window.scrollTo({left:e.x,top:e.y,behavior:t.behavior}):window.scrollTo(e.x,e.y))}var pt,mt=X&&((-1===(pt=window.navigator.userAgent).indexOf("Android 2.")&&-1===pt.indexOf("Android 4.0")||-1===pt.indexOf("Mobile Safari")||-1!==pt.indexOf("Chrome")||-1!==pt.indexOf("Windows Phone"))&&window.history&&"function"==typeof window.history.pushState);function gt(t,e){st();var n=window.history;try{if(e){var i=r({},n.state);i.key=nt(),n.replaceState(i,"",t)}else n.pushState({key:rt(tt())},"",t)}catch(n){window.location[e?"replace":"assign"](t)}}function vt(t){gt(t,!0)}function yt(t,e,n){var r=function(i){i>=t.length?n():t[i]?e(t[i],(function(){r(i+1)})):r(i+1)};r(0)}var _t={redirected:2,aborted:4,cancelled:8,duplicated:16};function bt(t,e){return wt(t,e,_t.redirected,'Redirected when going from "'+t.fullPath+'" to "'+function(t){if("string"==typeof t)return t;if("path"in t)return t.path;var e={};return Mt.forEach((function(n){n in t&&(e[n]=t[n])})),JSON.stringify(e,null,2)}(e)+'" via a navigation guard.')}function xt(t,e){return wt(t,e,_t.cancelled,'Navigation cancelled from "'+t.fullPath+'" to "'+e.fullPath+'" with a new navigation.')}function wt(t,e,n,r){var i=new Error(r);return i._isRouter=!0,i.from=t,i.to=e,i.type=n,i}var Mt=["params","query","hash"];function St(t){return Object.prototype.toString.call(t).indexOf("Error")>-1}function At(t,e){return St(t)&&t._isRouter&&(null==e||t.type===e)}function Et(t){return function(e,n,r){var i=!1,o=0,a=null;Ct(t,(function(t,e,n,s){if("function"==typeof t&&void 0===t.cid){i=!0,o++;var c,u=Pt((function(e){var i;((i=e).__esModule||It&&"Module"===i[Symbol.toStringTag])&&(e=e.default),t.resolved="function"==typeof e?e:W.extend(e),n.components[s]=e,--o<=0&&r()})),l=Pt((function(t){var e="Failed to resolve async component "+s+": "+t;a||(a=St(t)?t:new Error(e),r(a))}));try{c=t(u,l)}catch(t){l(t)}if(c)if("function"==typeof c.then)c.then(u,l);else{var h=c.component;h&&"function"==typeof h.then&&h.then(u,l)}}})),i||r()}}function Ct(t,e){return Tt(t.map((function(t){return Object.keys(t.components).map((function(n){return e(t.components[n],t.instances[n],t,n)}))})))}function Tt(t){return Array.prototype.concat.apply([],t)}var It="function"==typeof Symbol&&"symbol"==typeof Symbol.toStringTag;function Pt(t){var e=!1;return function(){for(var n=[],r=arguments.length;r--;)n[r]=arguments[r];if(!e)return e=!0,t.apply(this,n)}}var Lt=function(t,e){this.router=t,this.base=function(t){if(!t)if(X){var e=document.querySelector("base");t=(t=e&&e.getAttribute("href")||"/").replace(/^https?:\/\/[^\/]+/,"")}else t="/";"/"!==t.charAt(0)&&(t="/"+t);return t.replace(/\/$/,"")}(e),this.current=m,this.pending=null,this.ready=!1,this.readyCbs=[],this.readyErrorCbs=[],this.errorCbs=[],this.listeners=[]};function Rt(t,e,n,r){var i=Ct(t,(function(t,r,i,o){var a=function(t,e){"function"!=typeof t&&(t=W.extend(t));return t.options[e]}(t,e);if(a)return Array.isArray(a)?a.map((function(t){return n(t,r,i,o)})):n(a,r,i,o)}));return Tt(r?i.reverse():i)}function Ot(t,e){if(e)return function(){return t.apply(e,arguments)}}Lt.prototype.listen=function(t){this.cb=t},Lt.prototype.onReady=function(t,e){this.ready?t():(this.readyCbs.push(t),e&&this.readyErrorCbs.push(e))},Lt.prototype.onError=function(t){this.errorCbs.push(t)},Lt.prototype.transitionTo=function(t,e,n){var r,i=this;try{r=this.router.match(t,this.current)}catch(t){throw this.errorCbs.forEach((function(e){e(t)})),t}var o=this.current;this.confirmTransition(r,(function(){i.updateRoute(r),e&&e(r),i.ensureURL(),i.router.afterHooks.forEach((function(t){t&&t(r,o)})),i.ready||(i.ready=!0,i.readyCbs.forEach((function(t){t(r)})))}),(function(t){n&&n(t),t&&!i.ready&&(At(t,_t.redirected)&&o===m||(i.ready=!0,i.readyErrorCbs.forEach((function(e){e(t)}))))}))},Lt.prototype.confirmTransition=function(t,e,n){var r=this,i=this.current;this.pending=t;var o,a,s=function(t){!At(t)&&St(t)&&(r.errorCbs.length?r.errorCbs.forEach((function(e){e(t)})):console.error(t)),n&&n(t)},c=t.matched.length-1,u=i.matched.length-1;if(y(t,i)&&c===u&&t.matched[c]===i.matched[u])return this.ensureURL(),t.hash&&at(this.router,i,t,!1),s(((a=wt(o=i,t,_t.duplicated,'Avoided redundant navigation to current location: "'+o.fullPath+'".')).name="NavigationDuplicated",a));var l=function(t,e){var n,r=Math.max(t.length,e.length);for(n=0;n<r&&t[n]===e[n];n++);return{updated:e.slice(0,n),activated:e.slice(n),deactivated:t.slice(n)}}(this.current.matched,t.matched),h=l.updated,f=l.deactivated,d=l.activated,p=[].concat(function(t){return Rt(t,"beforeRouteLeave",Ot,!0)}(f),this.router.beforeHooks,function(t){return Rt(t,"beforeRouteUpdate",Ot)}(h),d.map((function(t){return t.beforeEnter})),Et(d)),m=function(e,n){if(r.pending!==t)return s(xt(i,t));try{e(t,i,(function(e){!1===e?(r.ensureURL(!0),s(function(t,e){return wt(t,e,_t.aborted,'Navigation aborted from "'+t.fullPath+'" to "'+e.fullPath+'" via a navigation guard.')}(i,t))):St(e)?(r.ensureURL(!0),s(e)):"string"==typeof e||"object"==typeof e&&("string"==typeof e.path||"string"==typeof e.name)?(s(bt(i,t)),"object"==typeof e&&e.replace?r.replace(e):r.push(e)):n(e)}))}catch(t){s(t)}};yt(p,m,(function(){yt(function(t){return Rt(t,"beforeRouteEnter",(function(t,e,n,r){return function(t,e,n){return function(r,i,o){return t(r,i,(function(t){"function"==typeof t&&(e.enteredCbs[n]||(e.enteredCbs[n]=[]),e.enteredCbs[n].push(t)),o(t)}))}}(t,n,r)}))}(d).concat(r.router.resolveHooks),m,(function(){if(r.pending!==t)return s(xt(i,t));r.pending=null,e(t),r.router.app&&r.router.app.$nextTick((function(){b(t)}))}))}))},Lt.prototype.updateRoute=function(t){this.current=t,this.cb&&this.cb(t)},Lt.prototype.setupListeners=function(){},Lt.prototype.teardown=function(){this.listeners.forEach((function(t){t()})),this.listeners=[],this.current=m,this.pending=null};var kt=function(t){function e(e,n){t.call(this,e,n),this._startLocation=Bt(this.base)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.setupListeners=function(){var t=this;if(!(this.listeners.length>0)){var e=this.router,n=e.options.scrollBehavior,r=mt&&n;r&&this.listeners.push(ot());var i=function(){var n=t.current,i=Bt(t.base);t.current===m&&i===t._startLocation||t.transitionTo(i,(function(t){r&&at(e,t,n,!0)}))};window.addEventListener("popstate",i),this.listeners.push((function(){window.removeEventListener("popstate",i)}))}},e.prototype.go=function(t){window.history.go(t)},e.prototype.push=function(t,e,n){var r=this,i=this.current;this.transitionTo(t,(function(t){gt(S(r.base+t.fullPath)),at(r.router,t,i,!1),e&&e(t)}),n)},e.prototype.replace=function(t,e,n){var r=this,i=this.current;this.transitionTo(t,(function(t){vt(S(r.base+t.fullPath)),at(r.router,t,i,!1),e&&e(t)}),n)},e.prototype.ensureURL=function(t){if(Bt(this.base)!==this.current.fullPath){var e=S(this.base+this.current.fullPath);t?gt(e):vt(e)}},e.prototype.getCurrentLocation=function(){return Bt(this.base)},e}(Lt);function Bt(t){var e=window.location.pathname,n=e.toLowerCase(),r=t.toLowerCase();return!t||n!==r&&0!==n.indexOf(S(r+"/"))||(e=e.slice(t.length)),(e||"/")+window.location.search+window.location.hash}var Dt=function(t){function e(e,n,r){t.call(this,e,n),r&&function(t){var e=Bt(t);if(!/^\/#/.test(e))return window.location.replace(S(t+"/#"+e)),!0}(this.base)||Ft()}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.setupListeners=function(){var t=this;if(!(this.listeners.length>0)){var e=this.router.options.scrollBehavior,n=mt&&e;n&&this.listeners.push(ot());var r=function(){var e=t.current;Ft()&&t.transitionTo(jt(),(function(r){n&&at(t.router,r,e,!0),mt||zt(r.fullPath)}))},i=mt?"popstate":"hashchange";window.addEventListener(i,r),this.listeners.push((function(){window.removeEventListener(i,r)}))}},e.prototype.push=function(t,e,n){var r=this,i=this.current;this.transitionTo(t,(function(t){Nt(t.fullPath),at(r.router,t,i,!1),e&&e(t)}),n)},e.prototype.replace=function(t,e,n){var r=this,i=this.current;this.transitionTo(t,(function(t){zt(t.fullPath),at(r.router,t,i,!1),e&&e(t)}),n)},e.prototype.go=function(t){window.history.go(t)},e.prototype.ensureURL=function(t){var e=this.current.fullPath;jt()!==e&&(t?Nt(e):zt(e))},e.prototype.getCurrentLocation=function(){return jt()},e}(Lt);function Ft(){var t=jt();return"/"===t.charAt(0)||(zt("/"+t),!1)}function jt(){var t=window.location.href,e=t.indexOf("#");return e<0?"":t=t.slice(e+1)}function Ut(t){var e=window.location.href,n=e.indexOf("#");return(n>=0?e.slice(0,n):e)+"#"+t}function Nt(t){mt?gt(Ut(t)):window.location.hash=t}function zt(t){mt?vt(Ut(t)):window.location.replace(Ut(t))}var Gt=function(t){function e(e,n){t.call(this,e,n),this.stack=[],this.index=-1}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.push=function(t,e,n){var r=this;this.transitionTo(t,(function(t){r.stack=r.stack.slice(0,r.index+1).concat(t),r.index++,e&&e(t)}),n)},e.prototype.replace=function(t,e,n){var r=this;this.transitionTo(t,(function(t){r.stack=r.stack.slice(0,r.index).concat(t),e&&e(t)}),n)},e.prototype.go=function(t){var e=this,n=this.index+t;if(!(n<0||n>=this.stack.length)){var r=this.stack[n];this.confirmTransition(r,(function(){var t=e.current;e.index=n,e.updateRoute(r),e.router.afterHooks.forEach((function(e){e&&e(r,t)}))}),(function(t){At(t,_t.duplicated)&&(e.index=n)}))}},e.prototype.getCurrentLocation=function(){var t=this.stack[this.stack.length-1];return t?t.fullPath:"/"},e.prototype.ensureURL=function(){},e}(Lt),Ht=function(t){void 0===t&&(t={}),this.app=null,this.apps=[],this.options=t,this.beforeHooks=[],this.resolveHooks=[],this.afterHooks=[],this.matcher=q(t.routes||[],this);var e=t.mode||"hash";switch(this.fallback="history"===e&&!mt&&!1!==t.fallback,this.fallback&&(e="hash"),X||(e="abstract"),this.mode=e,e){case"history":this.history=new kt(this,t.base);break;case"hash":this.history=new Dt(this,t.base,this.fallback);break;case"abstract":this.history=new Gt(this,t.base);break;default:0}},Wt={currentRoute:{configurable:!0}};function Vt(t,e){return t.push(e),function(){var n=t.indexOf(e);n>-1&&t.splice(n,1)}}Ht.prototype.match=function(t,e,n){return this.matcher.match(t,e,n)},Wt.currentRoute.get=function(){return this.history&&this.history.current},Ht.prototype.init=function(t){var e=this;if(this.apps.push(t),t.$once("hook:destroyed",(function(){var n=e.apps.indexOf(t);n>-1&&e.apps.splice(n,1),e.app===t&&(e.app=e.apps[0]||null),e.app||e.history.teardown()})),!this.app){this.app=t;var n=this.history;if(n instanceof kt||n instanceof Dt){var r=function(t){n.setupListeners(),function(t){var r=n.current,i=e.options.scrollBehavior;mt&&i&&"fullPath"in t&&at(e,t,r,!1)}(t)};n.transitionTo(n.getCurrentLocation(),r,r)}n.listen((function(t){e.apps.forEach((function(e){e._route=t}))}))}},Ht.prototype.beforeEach=function(t){return Vt(this.beforeHooks,t)},Ht.prototype.beforeResolve=function(t){return Vt(this.resolveHooks,t)},Ht.prototype.afterEach=function(t){return Vt(this.afterHooks,t)},Ht.prototype.onReady=function(t,e){this.history.onReady(t,e)},Ht.prototype.onError=function(t){this.history.onError(t)},Ht.prototype.push=function(t,e,n){var r=this;if(!e&&!n&&"undefined"!=typeof Promise)return new Promise((function(e,n){r.history.push(t,e,n)}));this.history.push(t,e,n)},Ht.prototype.replace=function(t,e,n){var r=this;if(!e&&!n&&"undefined"!=typeof Promise)return new Promise((function(e,n){r.history.replace(t,e,n)}));this.history.replace(t,e,n)},Ht.prototype.go=function(t){this.history.go(t)},Ht.prototype.back=function(){this.go(-1)},Ht.prototype.forward=function(){this.go(1)},Ht.prototype.getMatchedComponents=function(t){var e=t?t.matched?t:this.resolve(t).route:this.currentRoute;return e?[].concat.apply([],e.matched.map((function(t){return Object.keys(t.components).map((function(e){return t.components[e]}))}))):[]},Ht.prototype.resolve=function(t,e,n){var r=H(t,e=e||this.history.current,n,this),i=this.match(r,e),o=i.redirectedFrom||i.fullPath;return{location:r,route:i,href:function(t,e,n){var r="hash"===n?"#"+e:e;return t?S(t+"/"+r):r}(this.history.base,o,this.mode),normalizedTo:r,resolved:i}},Ht.prototype.getRoutes=function(){return this.matcher.getRoutes()},Ht.prototype.addRoute=function(t,e){this.matcher.addRoute(t,e),this.history.current!==m&&this.history.transitionTo(this.history.getCurrentLocation())},Ht.prototype.addRoutes=function(t){this.matcher.addRoutes(t),this.history.current!==m&&this.history.transitionTo(this.history.getCurrentLocation())},Object.defineProperties(Ht.prototype,Wt),Ht.install=function t(e){if(!t.installed||W!==e){t.installed=!0,W=e;var n=function(t){return void 0!==t},r=function(t,e){var r=t.$options._parentVnode;n(r)&&n(r=r.data)&&n(r=r.registerRouteInstance)&&r(t,e)};e.mixin({beforeCreate:function(){n(this.$options.router)?(this._routerRoot=this,this._router=this.$options.router,this._router.init(this),e.util.defineReactive(this,"_route",this._router.history.current)):this._routerRoot=this.$parent&&this.$parent._routerRoot||this,r(this,this)},destroyed:function(){r(this)}}),Object.defineProperty(e.prototype,"$router",{get:function(){return this._routerRoot._router}}),Object.defineProperty(e.prototype,"$route",{get:function(){return this._routerRoot._route}}),e.component("RouterView",x),e.component("RouterLink",Z);var i=e.config.optionMergeStrategies;i.beforeRouteEnter=i.beforeRouteLeave=i.beforeRouteUpdate=i.created}},Ht.version="3.5.3",Ht.isNavigationFailure=At,Ht.NavigationFailureType=_t,Ht.START_LOCATION=m,X&&window.Vue&&window.Vue.use(Ht),e.default=Ht},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.pkRouter=e.routerInit=void 0;var r=s(n(9)),i=s(n(177)),o=s(n(178)),a=s(n(311));n(3);function s(t){return t&&t.__esModule?t:{default:t}}e.routerInit=function(t,e){var n=t.prototype.push,r=t.prototype.replace;t.prototype.push=function(t,e,r){return e||r?n.call(this,t,e,r):n.call(this,t).catch((function(t){return t}))},t.prototype.replace=function(t,e,n){return e||n?r.call(this,t,e,n):r.call(this,t).catch((function(t){return t}))};var i=c(t,e);return u(i),i};var c=e.pkRouter=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=[{path:"/404",component:i.default},{path:"/noAllow",component:o.default},{path:"/refresh",component:a.default,hidden:!0}],s=function(){return new t((0,r.default)({},e,{mode:"history",routes:n,scrollBehavior:function(t,e,n){return n||{x:0,y:0}}}))},c=s(),u=s();return c.matcher=u.matcher,c},u=function(t){t.onError((function(e){console.log("\n *************************ROUTER ERROR BEGIN**********************************\n\n "+e+"\n\n *************************ROUTER ERROR FINAL**********************************\n ");var n=e.message.match(/Loading chunk (\w)+ failed/g),r=t.history.pending.fullPath;n&&t.replace(r).then()}))}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default={render:function(){var t=arguments[0];return t("a-result",{attrs:{status:"404",title:"404","sub-title":"Sorry, the page you visited does not exist."}},[t("a-button",{attrs:{type:"primary"},slot:"extra",on:{click:this.toHome}},["Back Home"])])},methods:{toHome:function(){return this.$router.replace({path:"/"}),!1}}}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=d(n(9));n(179);var i=n(180),o=n(2),a=d(n(185)),s=d(n(186)),c=n(17),u=n(10),l=n(3),h=d(n(88)),f=n(35);function d(t){return t&&t.__esModule?t:{default:t}}var p={1:{text:"您访问的该页面暂无权限!",iconGroup:["login"]},2:{text:"您访问的“%”暂无权限!",iconGroup:["project","login"]}};e.default={name:"NoAllow",data:function(){return{status:1,visible:!1,projectList:[],currentProjectInfo:{}}},created:function(){this.SET_IS_IN_NO_AUTH(!0)},beforeDestroy:function(){this.SET_IS_IN_NO_AUTH(!1)},mounted:function(){this.getAllProject()},computed:{currentProject:function(){try{var t=u.localStore.get("APP_PROJECT");if(t){var e=h.default.decrypt(t);return e?JSON.parse(e):{}}return{}}catch(t){console.error(t)}},userAllInfo:function(){return u.localStore.get("userAllInfo")}},methods:(0,r.default)({},(0,i.mapMutations)("user",["SET_IS_IN_NO_AUTH"]),{handleTap:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"login";switch(t){case"login":(0,f.logOut)();break;case"project":this.visible=!0}},handleModalTap:function(t,e){var n=this;2===t?(0,c.postConsumer)(e.id).then((function(t){if(0===t.code){n.visible=!1;var r=t.data;localStorage.removeItem("menuList"),localStorage.removeItem("consumer"),localStorage.removeItem("currentProject"),localStorage.removeItem("consumerExtList"),localStorage.removeItem("userMessage"),u.localStore.set("currentProject",e);var i=u.localStore.get("IAM_OATH_TYPE");if(!(0,l.isEmpty)(r)){localStorage.removeItem("access_token"),u.localStore.set("access_token",r.access_token),u.localStore.set("refresh_token",r.refresh_token);var o=new Date;u.localStore.set("token_expires_in",new Date(o.setSeconds(o.getSeconds()+parseInt(r.expires_in))).getTime()),i&&(u.localStore.set("idp_access_token",r.idp_access_token),u.localStore.set("idp_refresh_token",r.idp_refresh_token)),n.$router.replace("/").then((function(){}))}}else n.$message.error(t.msg)})):this.visible=!1},getAllProject:function(){var t=this;(0,c.getBelongList)().then((function(e){if((0,l.isEmpty)(e.data))t.status=1;else if(t.status=e.data.length>1?2:1,t.projectList=e.data,!(0,l.isEmpty)(t.userAllInfo)&&!(0,l.isEmpty)(t.userAllInfo.consumer)){var n=(0,l.find)(t.projectList,["id",t.userAllInfo.consumer.id]);(0,l.isEmpty)(n)||(t.currentProjectInfo=n)}}))}}),render:function(){var t=this,e=arguments[0],n={login:e("a-button",{attrs:{type:"primary"},on:{click:function(){return t.handleTap("login")}}},["返回登录页"]),project:e("a-button",{attrs:{type:"primary",ghost:!0},on:{click:function(){return t.handleTap("project")}}},["切换其他项目"])},r=p[this.status].iconGroup.map((function(t){return n[t]}));return e("div",{class:o.prefixCls+"-no-allow"},[e("div",{class:o.prefixCls+"-no-allow-icon"},[e(a.default)]),e("div",{class:o.prefixCls+"-no-allow-info"},[e("div",{class:o.prefixCls+"-no-allow-info-desc"},[e("span",[(0,l.isEmpty)(this.userAllInfo)||(0,l.isEmpty)(this.userAllInfo.consumer)?p[this.status].text:p[this.status].text.replace("%",this.userAllInfo.consumer.name)])]),e("div",{class:o.prefixCls+"-no-allow-info-btn"},[e("a-space",{attrs:{size:22}},[r])])]),e(s.default,{attrs:{visible:this.visible,projectList:this.projectList,choiceInfo:this.currentProjectInfo},on:{tap:function(e,n){return t.handleModalTap(e,n)}}})])}}},function(t,e,n){},function(t,e,n){"use strict";n.r(e),function(t){n.d(e,"Store",(function(){return h})),n.d(e,"createLogger",(function(){return T})),n.d(e,"createNamespacedHelpers",(function(){return S})),n.d(e,"install",(function(){return _})),n.d(e,"mapActions",(function(){return M})),n.d(e,"mapGetters",(function(){return w})),n.d(e,"mapMutations",(function(){return x})),n.d(e,"mapState",(function(){return b}));var r=("undefined"!=typeof window?window:void 0!==t?t:{}).__VUE_DEVTOOLS_GLOBAL_HOOK__;function i(t,e){if(void 0===e&&(e=[]),null===t||"object"!=typeof t)return t;var n,r=(n=function(e){return e.original===t},e.filter(n)[0]);if(r)return r.copy;var o=Array.isArray(t)?[]:{};return e.push({original:t,copy:o}),Object.keys(t).forEach((function(n){o[n]=i(t[n],e)})),o}function o(t,e){Object.keys(t).forEach((function(n){return e(t[n],n)}))}function a(t){return null!==t&&"object"==typeof t}var s=function(t,e){this.runtime=e,this._children=Object.create(null),this._rawModule=t;var n=t.state;this.state=("function"==typeof n?n():n)||{}},c={namespaced:{configurable:!0}};c.namespaced.get=function(){return!!this._rawModule.namespaced},s.prototype.addChild=function(t,e){this._children[t]=e},s.prototype.removeChild=function(t){delete this._children[t]},s.prototype.getChild=function(t){return this._children[t]},s.prototype.hasChild=function(t){return t in this._children},s.prototype.update=function(t){this._rawModule.namespaced=t.namespaced,t.actions&&(this._rawModule.actions=t.actions),t.mutations&&(this._rawModule.mutations=t.mutations),t.getters&&(this._rawModule.getters=t.getters)},s.prototype.forEachChild=function(t){o(this._children,t)},s.prototype.forEachGetter=function(t){this._rawModule.getters&&o(this._rawModule.getters,t)},s.prototype.forEachAction=function(t){this._rawModule.actions&&o(this._rawModule.actions,t)},s.prototype.forEachMutation=function(t){this._rawModule.mutations&&o(this._rawModule.mutations,t)},Object.defineProperties(s.prototype,c);var u=function(t){this.register([],t,!1)};u.prototype.get=function(t){return t.reduce((function(t,e){return t.getChild(e)}),this.root)},u.prototype.getNamespace=function(t){var e=this.root;return t.reduce((function(t,n){return t+((e=e.getChild(n)).namespaced?n+"/":"")}),"")},u.prototype.update=function(t){!function t(e,n,r){0;if(n.update(r),r.modules)for(var i in r.modules){if(!n.getChild(i))return void 0;t(e.concat(i),n.getChild(i),r.modules[i])}}([],this.root,t)},u.prototype.register=function(t,e,n){var r=this;void 0===n&&(n=!0);var i=new s(e,n);0===t.length?this.root=i:this.get(t.slice(0,-1)).addChild(t[t.length-1],i);e.modules&&o(e.modules,(function(e,i){r.register(t.concat(i),e,n)}))},u.prototype.unregister=function(t){var e=this.get(t.slice(0,-1)),n=t[t.length-1],r=e.getChild(n);r&&r.runtime&&e.removeChild(n)},u.prototype.isRegistered=function(t){var e=this.get(t.slice(0,-1)),n=t[t.length-1];return!!e&&e.hasChild(n)};var l;var h=function(t){var e=this;void 0===t&&(t={}),!l&&"undefined"!=typeof window&&window.Vue&&_(window.Vue);var n=t.plugins;void 0===n&&(n=[]);var i=t.strict;void 0===i&&(i=!1),this._committing=!1,this._actions=Object.create(null),this._actionSubscribers=[],this._mutations=Object.create(null),this._wrappedGetters=Object.create(null),this._modules=new u(t),this._modulesNamespaceMap=Object.create(null),this._subscribers=[],this._watcherVM=new l,this._makeLocalGettersCache=Object.create(null);var o=this,a=this.dispatch,s=this.commit;this.dispatch=function(t,e){return a.call(o,t,e)},this.commit=function(t,e,n){return s.call(o,t,e,n)},this.strict=i;var c=this._modules.root.state;g(this,c,[],this._modules.root),m(this,c),n.forEach((function(t){return t(e)})),(void 0!==t.devtools?t.devtools:l.config.devtools)&&function(t){r&&(t._devtoolHook=r,r.emit("vuex:init",t),r.on("vuex:travel-to-state",(function(e){t.replaceState(e)})),t.subscribe((function(t,e){r.emit("vuex:mutation",t,e)}),{prepend:!0}),t.subscribeAction((function(t,e){r.emit("vuex:action",t,e)}),{prepend:!0}))}(this)},f={state:{configurable:!0}};function d(t,e,n){return e.indexOf(t)<0&&(n&&n.prepend?e.unshift(t):e.push(t)),function(){var n=e.indexOf(t);n>-1&&e.splice(n,1)}}function p(t,e){t._actions=Object.create(null),t._mutations=Object.create(null),t._wrappedGetters=Object.create(null),t._modulesNamespaceMap=Object.create(null);var n=t.state;g(t,n,[],t._modules.root,!0),m(t,n,e)}function m(t,e,n){var r=t._vm;t.getters={},t._makeLocalGettersCache=Object.create(null);var i=t._wrappedGetters,a={};o(i,(function(e,n){a[n]=function(t,e){return function(){return t(e)}}(e,t),Object.defineProperty(t.getters,n,{get:function(){return t._vm[n]},enumerable:!0})}));var s=l.config.silent;l.config.silent=!0,t._vm=new l({data:{$$state:e},computed:a}),l.config.silent=s,t.strict&&function(t){t._vm.$watch((function(){return this._data.$$state}),(function(){0}),{deep:!0,sync:!0})}(t),r&&(n&&t._withCommit((function(){r._data.$$state=null})),l.nextTick((function(){return r.$destroy()})))}function g(t,e,n,r,i){var o=!n.length,a=t._modules.getNamespace(n);if(r.namespaced&&(t._modulesNamespaceMap[a],t._modulesNamespaceMap[a]=r),!o&&!i){var s=v(e,n.slice(0,-1)),c=n[n.length-1];t._withCommit((function(){l.set(s,c,r.state)}))}var u=r.context=function(t,e,n){var r=""===e,i={dispatch:r?t.dispatch:function(n,r,i){var o=y(n,r,i),a=o.payload,s=o.options,c=o.type;return s&&s.root||(c=e+c),t.dispatch(c,a)},commit:r?t.commit:function(n,r,i){var o=y(n,r,i),a=o.payload,s=o.options,c=o.type;s&&s.root||(c=e+c),t.commit(c,a,s)}};return Object.defineProperties(i,{getters:{get:r?function(){return t.getters}:function(){return function(t,e){if(!t._makeLocalGettersCache[e]){var n={},r=e.length;Object.keys(t.getters).forEach((function(i){if(i.slice(0,r)===e){var o=i.slice(r);Object.defineProperty(n,o,{get:function(){return t.getters[i]},enumerable:!0})}})),t._makeLocalGettersCache[e]=n}return t._makeLocalGettersCache[e]}(t,e)}},state:{get:function(){return v(t.state,n)}}}),i}(t,a,n);r.forEachMutation((function(e,n){!function(t,e,n,r){(t._mutations[e]||(t._mutations[e]=[])).push((function(e){n.call(t,r.state,e)}))}(t,a+n,e,u)})),r.forEachAction((function(e,n){var r=e.root?n:a+n,i=e.handler||e;!function(t,e,n,r){(t._actions[e]||(t._actions[e]=[])).push((function(e){var i,o=n.call(t,{dispatch:r.dispatch,commit:r.commit,getters:r.getters,state:r.state,rootGetters:t.getters,rootState:t.state},e);return(i=o)&&"function"==typeof i.then||(o=Promise.resolve(o)),t._devtoolHook?o.catch((function(e){throw t._devtoolHook.emit("vuex:error",e),e})):o}))}(t,r,i,u)})),r.forEachGetter((function(e,n){!function(t,e,n,r){if(t._wrappedGetters[e])return void 0;t._wrappedGetters[e]=function(t){return n(r.state,r.getters,t.state,t.getters)}}(t,a+n,e,u)})),r.forEachChild((function(r,o){g(t,e,n.concat(o),r,i)}))}function v(t,e){return e.reduce((function(t,e){return t[e]}),t)}function y(t,e,n){return a(t)&&t.type&&(n=e,e=t,t=t.type),{type:t,payload:e,options:n}}function _(t){l&&t===l||
134
+ var i="_maptalks__internal_layer_",o=["MultiPoint","MultiLineString","MultiPolygon","GeometryCollection"],a=["FeatureCollection","Feature","Point","LineString","Polygon"].concat(o),s=["markerFile","polygonPatternFile","linePatternFile","markerFillPatternFile","markerLinePatternFile"],c=[["markerWidth","markerHeight"],[],[null,"lineWidth"],[],[null,"markerLineWidth"]],u={lineWidth:1,lineOpacity:1,lineDx:1,lineDy:1,polygonOpacity:1,markerWidth:1,markerHeight:1,markerDx:1,markerDy:1,markerOpacity:1,markerFillOpacity:1,markerLineWidth:1,markerLineOpacity:1,textSize:1,textOpacity:1,textHaloRadius:1,textWrapWidth:1,textLineSpacing:1,textDx:1,textDy:1},l=["lineColor","polygonFill","markerFill","markerLineColor","textFill"],h=14;function f(){return Date.now()}function d(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)t[r]=n[r]}return t}function p(t){return null==t}function m(t){return"number"==typeof t&&!isNaN(t)}function g(t){return(0|t)===t}function v(t){return"object"==typeof t&&!!t}function y(t){return!p(t)&&("string"==typeof t||null!==t.constructor&&t.constructor===String)}function _(t){return!p(t)&&("function"==typeof t||null!==t.constructor&&t.constructor===Function)}var b=Object.prototype.hasOwnProperty;function x(t,e){return b.call(t,e)}var w=Math.PI/180;function M(t){return t*w}function S(t){return t/w}var A,E,C="[object process]"===Object.prototype.toString.call(void 0!==t?t:0)&&!t.versions.electron&&!t.versions.nw&&!t.versions["node-webkit"];function T(t){var e="data:image/svg+xml";return t.length>4&&".svg"===t.slice(-4)?1:t.slice(0,e.length)===e?2:0}function I(t,e){C&&I.node?I.node(t,e):t.src=e[0]}!function(){if(C)return A=function(t){return setTimeout(t,16)},void(E=clearTimeout);var t,e;function n(t){return setTimeout(t,1e3/30)}function r(t){return window["webkit"+t]||window["moz"+t]||window["ms"+t]}"undefined"!=typeof window?(t=window.requestAnimationFrame||r("RequestAnimationFrame")||n,e=window.cancelAnimationFrame||r("CancelAnimationFrame")||r("CancelRequestAnimationFrame")||function(t){window.clearTimeout(t)}):(t=n,e=clearTimeout),A=function(e){return t(e)},E=function(t){t&&e(t)}}();var P=0;function L(){return P++}var R=L;function O(t){return t&&y(t)?JSON.parse(t):t}function k(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];if(n)for(var r=0,i=n.length;r<i;r++)t.push(n[r])}return t.length}function B(t,e){var n=e.indexOf(t);n>-1&&e.splice(n,1)}function D(t,e,n){if(!Array.isArray(t))return n?e.call(n,t):e(t);for(var r,i,o=[],a=0,s=t.length;a<s;a++)p(r=t[a])?o.push(null):Array.isArray(r)?o.push(D(r,e,n)):(i=n?e.call(n,r):e(r),o.push(i));return o}function F(t,e){return void 0===t?e:t}function j(t){return Math.sign?Math.sign(t):0==(t=+t)||isNaN(t)?Number(t):t>0?1:-1}function U(t){if(Math.log2)return Math.log2(t);var e=Math.log(t)*Math.LOG2E,n=Math.round(e);return Math.abs(n-e)<1e-14?n:e}function N(t,e,n){return t*(1-n)+e*n}function z(t,e,n){if(t===n||t===e)return t;var r=n-e;return((t-e)%r+r)%r+e}function G(t,e,n){return Math.min(n,Math.max(e,t))}function H(t){return Array.isArray(t)&&t.length>0}var W=/^([a-z][a-z\d+\-.]*:)?\/\//i,V=/^url\((['"])(.+)\1\)$/i,Z=/^url\(([^'"].*[^'"])\)$/i;function Q(t){return y(t)?Z.test(t)?1:V.test(t)?2:3:0}function X(t){var e=Q(t);return 3===e?t:1===e?Z.exec(t)[1]:2===e?V.exec(t)[2]:t}function Y(t){if("undefined"!=typeof window&&window.btoa)return window.btoa(t);for(var e,n,r=String(t),i="",o=0,a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";r.charAt(0|o)||(a="=",o%1);i+=a.charAt(63&e>>8-o%1*8)){if((n=r.charCodeAt(o+=3/4))>255)throw new Error("'btoa' failed: The string to be encoded contains characters outside of the Latin1 range.");e=e<<8|n}return i}function J(t,e){for(var n=atob(t),r=new ArrayBuffer(n.length),i=new Uint8Array(r),o=0;o<n.length;o++)i[o]=255&n.charCodeAt(o);return new Blob([r],{type:e})}function q(t,e,n,r){var i=n-t,o=r-e;return Math.atan2(o,i)}var K="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7";function $(t,e){if(!t&&!e)return!0;if(!t||!e)return!1;for(var n in t)if("center"===n){if(!e[n]||!tt(t[n][0],e[n][0])||!tt(t[n][1],e[n][1]))return!1}else if(t[n]!==e[n])return!1;return!0}function tt(t,e,n){return null==n&&(n=1e-6),t>=e-n&&t<=e+n}function et(t,e,n,r){t||(t=100),e||(e=4);var i=this;return e*=2,this._flashTimeout&&clearTimeout(this._flashTimeout),this._flashTimeout=setTimeout((function o(){if(0===e)return i.show(),void(n&&(r?n.call(r):n()));e%2==0?i.hide():i.show(),e--,i._flashTimeout=setTimeout(o,t)}),t),this}var nt=["Unknown","Point","LineString","Polygon","MultiPoint","MultiLineString","MultiPolygon","GeometryCollection"];function rt(t){return new Function("f","var p = (f && f.properties || {}); return "+it(t))}function it(t){if(!t)return"true";var e=t[0];return t.length<=1?"any"===e?"false":"true":"("+("=="===e?at(t[1],t[2],"===",!1):"!="===e?at(t[1],t[2],"!==",!1):"<"===e||">"===e||"<="===e||">="===e?at(t[1],t[2],e,!0):"any"===e?st(t.slice(1),"||"):"all"===e?st(t.slice(1),"&&"):"none"===e?lt(st(t.slice(1),"||")):"in"===e?ct(t[1],t.slice(2)):"!in"===e?lt(ct(t[1],t.slice(2))):"has"===e?ut(t[1]):"!has"===e?lt(ut(t[1])):"true")+")"}function ot(t){return"$"===t[0]?"f."+t.substring(1):"p["+JSON.stringify(t)+"]"}function at(t,e,n,r){var i=ot(t),o="$type"===t?nt.indexOf(e):JSON.stringify(e);return(r?"typeof "+i+"=== typeof "+o+"&&":"")+i+n+o}function st(t,e){return t.map(it).join(e)}function ct(t,e){"$type"===t&&(e=e.map((function(t){return nt.indexOf(t)})));var n=JSON.stringify(e.sort(ht)),r=ot(t);return e.length<=200?n+".indexOf("+r+") !== -1":"function(v, a, i, j) {\n while (i <= j) { var m = (i + j) >> 1;\n if (a[m] === v) return true; if (a[m] > v) j = m - 1; else i = m + 1;\n }\n return false; }("+r+", "+n+",0,"+(e.length-1)+")"}function ut(t){return"$id"===t?'"id" in f':JSON.stringify(t)+" in p"}function lt(t){return"!("+t+")"}function ht(t,e){return t<e?-1:t>e?1:0}function ft(t){var e=t._toJSON(),n=e.feature;return n.type=nt.indexOf(n.geometry.type),n.subType=e.subType,n}function dt(t){if(!Array.isArray(t))return dt([t]);for(var e=[],n=0;n<t.length;n++){var r;r=!0===t[n].filter?function(){return!0}:rt(t[n].filter),e.push(pt({},t[n],{filter:r}))}return e}function pt(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)t[r]=n[r]}return t}function mt(t,e){for(var n=0;n<t.stops.length;n++)if(e===t.stops[n][0])return t.stops[n][1];return t.default}function gt(t,e){for(var n=0;n<t.stops.length&&!(e<t.stops[n][0]);n++);return t.stops[Math.max(n-1,0)][1]}function vt(t,e){for(var n=void 0!==t.base?t.base:1,r=0;!(r>=t.stops.length||e<=t.stops[r][0]);)r++;return 0===r?t.stops[r][1]:r===t.stops.length?t.stops[r-1][1]:function t(e,n,r,i,o,a){return"function"==typeof o?function(){var s=o.apply(void 0,arguments),c=a.apply(void 0,arguments);return t(e,n,r,i,s,c)}:o.length?function(t,e,n,r,i,o){for(var a=[],s=0;s<i.length;s++)a[s]=_t(t,e,n,r,i[s],o[s]);return a}(e,n,r,i,o,a):_t(e,n,r,i,o,a)}(e,n,t.stops[r-1][0],t.stops[r][0],t.stops[r-1][1],t.stops[r][1])}function yt(t,e){return function(t,e,n){return void 0!==t?t:void 0!==e?e:void 0!==n?n:null}(e,t.default)}function _t(t,e,n,r,i,o){var a,s=r-n,c=t-n;return i*(1-(a=1===e?c/s:(Math.pow(e,c)-1)/(Math.pow(e,s)-1)))+o*a}function bt(t){return t&&"object"==typeof t&&(t.stops||t.property&&"identity"===t.type)}function xt(t){for(var e in t)if(bt(t[e]))return!0;return!1}function wt(t){return At(t,"exponential")}function Mt(t,e){if(!t)return null;var n=!1;if(Array.isArray(t)){for(var r,i=[],o=0;o<t.length;o++)(r=Mt(t[o],e))?(i.push(r),n=!0):i.push(t[o]);return n?i:t}var a,s={__fn_types_loaded:!0},c=[];for(a in t)t.hasOwnProperty(a)&&c.push(a);for(var u=function(t){Object.defineProperty(s,t,{get:function(){return this["__fn_"+t]||(this["__fn_"+t]=wt(this["_"+t])),this["__fn_"+t].apply(this,e())},set:function(e){this["_"+t]=e},configurable:!0,enumerable:!0})},l=0,h=c.length;l<h;l++)bt(t[a=c[l]])?(n=!0,s["_"+a]=t[a],u(a)):s[a]=t[a];return n?s:t}function St(t){if(!t||!t.stops)return[];for(var e=[],n=0,r=t.stops.length;n<r;n++)e.push(t.stops[n][1]);return e}function At(t,e){if(!bt(t))return function(){return t};var n=!0,r=!0,i=(t=JSON.parse(JSON.stringify(t))).stops;if(i)for(var o=0;o<i.length;o++)if(bt(i[o][1])){var a=At(i[o][1],e);n=n&&a.isZoomConstant,r=r&&a.isFeatureConstant,i[o]=[i[o][0],a]}var s=function t(e,n){var r,i,o;if(bt(e)){var a,s=e.stops&&"object"==typeof e.stops[0][0],c=s||void 0!==e.property,u=s||!c,l=e.type||n||"exponential";if("exponential"===l)a=vt;else if("interval"===l)a=gt;else if("categorical"===l)a=mt;else{if("identity"!==l)throw new Error('Unknown function type "'+l+'"');a=yt}if(s){for(var h={},f=[],d=0;d<e.stops.length;d++){var p=e.stops[d];void 0===h[p[0].zoom]&&(h[p[0].zoom]={zoom:p[0].zoom,type:e.type,property:e.property,default:e.default,stops:[]}),h[p[0].zoom].stops.push([p[0].value,p[1]])}for(var m in h)f.push([h[m].zoom,t(h[m])]);r=function(t,n){var r=vt({stops:f,base:e.base},t)(t,n);return"function"==typeof r?r(t,n):r},i=!1,o=!1}else u?(r=function(t){var n=a(e,t);return"function"==typeof n?n(t):n},i=!0,o=!1):(r=function(t,n){var r=a(e,n?n[e.property]:null);return"function"==typeof r?r(t,n):r},i=!1,o=!0)}else r=function(){return e},i=!0,o=!0;return r.isZoomConstant=o,r.isFeatureConstant=i,r}(t,e);return s.isZoomConstant=n&&s.isZoomConstant,s.isFeatureConstant=r&&s.isFeatureConstant,s}var Et=Object.freeze({createFilter:rt,getFilterFeature:ft,compileStyle:dt,isFunctionDefinition:bt,hasFunctionDefinition:xt,interpolated:wt,piecewiseConstant:function(t){return At(t,"interval")},loadFunctionTypes:Mt,getFunctionTypeResources:St});function Ct(t){var e={stroke:{stroke:t.markerLineColor,"stroke-width":t.markerLineWidth,"stroke-opacity":t.markerLineOpacity,"stroke-dasharray":null,"stroke-linecap":"butt","stroke-linejoin":"round"},fill:{fill:t.markerFill,"fill-opacity":t.markerFillOpacity}};return 0===e.stroke["stroke-width"]&&(e.stroke["stroke-opacity"]=0),e}function Tt(t,e,n){if(!t.markerPath)return null;var r=1,i=Ct(t);m(t.markerOpacity)&&(r=t.markerOpacity),m(t.opacity)&&(r*=t.opacity);var o={};if(i){for(var a in i.stroke)i.stroke.hasOwnProperty(a)&&(p(i.stroke[a])||(o[a]=i.stroke[a]));for(var s in i.fill)i.fill.hasOwnProperty(s)&&(p(i.fill[s])||(o[s]=i.fill[s]))}for(var c,u=Array.isArray(t.markerPath)?t.markerPath:[t.markerPath],l=[],h=0;h<u.length;h++)(c=d({},c=y(u[h])?{path:u[h]}:u[h],o)).d=c.path,delete c.path,l.push(c);var f=['<svg version="1.1"','xmlns="http://www.w3.org/2000/svg"'];r<1&&f.push('opacity="'+r+'"'),t.markerPathWidth&&t.markerPathHeight&&f.push('viewBox="0 0 '+t.markerPathWidth+" "+t.markerPathHeight+'"'),f.push('preserveAspectRatio="none"'),e&&f.push('width="'+e+'"'),n&&f.push('height="'+n+'"'),f.push("><defs></defs>");for(var g=0;g<l.length;g++){var v="<path ";for(var _ in l[g])l[g].hasOwnProperty(_)&&(v+=" "+_+'="'+l[g][_]+'"');v+="></path>",f.push(v)}return f.push("</svg>"),"data:image/svg+xml;base64,"+Y(f.join(" "))}function It(t,e){if(!t)return[];var n=t;Array.isArray(t)||(n=[t]);for(var r,i,o,a,u=[],l=s,h=n.length-1;h>=0;h--)if(t=n[h]){e&&(t=Pt(t));for(var f=0;f<l.length;f++)if(bt(r=t[l[f]])&&(r=St(r)),r){Array.isArray(r)||(r=[r]);for(var d=0;d<r.length;d++)"url("===r[d].slice(0,4)&&(r[d]=X(r[d])),i=c[f],u.push([r[d],t[i[0]],t[i[1]]])}if("path"===t.markerType&&t.markerPath)if(o=bt(t.markerWidth)?200:t.markerWidth,a=bt(t.markerHeight)?200:t.markerHeight,bt(t.markerPath)){r=St(t.markerPath);for(var p=t.markerPath,m=0;m<r.length;m++)t.markerPath=r[m],u.push([Tt(t),o,a]);t.markerPath=p}else u.push([Tt(t),o,a])}return u}function Pt(t){if(!t)return null;var e=t;if(C)return e;for(var n,r=s,i=0,o=r.length;i<o;i++)(n=e[r[i]])&&(e[r[i]]=Lt(n));return e}function Lt(t){if(bt(t)){for(var e=t.stops,n=0;n<e.length;n++)e[n][1]=Lt(e[n][1]);return t}return"url("===t.slice(0,4)&&(t=X(t)),t}function Rt(t){return t&&t.colorStops}function Ot(t){var e=[t.type];if(t.places&&e.push(t.places.join()),t.colorStops){for(var n=[],r=t.colorStops.length-1;r>=0;r--)n.push(t.colorStops[r].join());e.push(n.join(","))}return e.join("_")}function kt(t,e){function n(t,e){p(t.opacity)?t.opacity=e:t.opacity*=e}var r;if(Array.isArray(t)){r=[];for(var i=0;i<t.length;i++){var o=d({},t[i]);n(o,e),r.push(o)}}else n(r=d({},t),e);return r}function Bt(t){var e=Array.prototype.slice.call(arguments,1);if(e&&e.length||(e=[{}]),Array.isArray(t)){for(var n,r,i=[],o=0,a=t.length;o<a;o++){n=t[o],r={};for(var s=0,c=e.length;s<c;s++)Array.isArray(e[s])?p(e[s][o])?d(r,n||{}):d(r,n,e[s][o]):d(r,n,e[s]?e[s]:{});i.push(r)}return i}var u=[{},t];return u.push.apply(u,e),d.apply(this,u)}function Dt(t){if(t.symbol&&(t=[t]),Array.isArray(t))return t;var e=t.$root,n=t.$iconset;return t=t.style,(e||n)&&(e&&"/"===e[e.length-1]&&(e=e.substring(0,e.length-1)),n&&"/"===n[n.length-1]&&(n=n.substring(0,n.length-1)),t=Ft(t,(function(t){return"{$root}"===t?e:"{$iconset}"===t?n:null}))),t}function Ft(t,e){for(var n=0;n<t.length;n++){var r=t[n].symbol;r&&Ut(r,e)}}var jt=/(\{\$root\}|\{\$iconset\})/g;function Ut(t,e){for(var n in t)t.hasOwnProperty(n)&&"textName"!==n&&(y(t[n])&&t[n].length>2?t[n]=t[n].replace(jt,e):bt(t[n])?t[n]=Nt(t[n],e):v(t[n])&&Ut(t[n],e))}function Nt(t,e){var n=t.default;y(n)&&(t.default=n.replace(jt,e));for(var r=t.stops,i=0;i<r.length;i++)Array.isArray(r[i])&&(y(r[i][1])?r[i][1]=r[i][1].replace(jt,e):bt(r[i][1])&&(r[i][1]=Nt(r[i][1],e)));return t}var zt=Object.freeze({now:f,extend:d,isNil:p,isNumber:m,isInteger:g,isObject:v,isString:y,isFunction:_,hasOwn:x,join:function(t,e){return t.join?t.join(e||","):Array.prototype.join.call(t,e||",")},isEmpty:function(t){var e;for(e in t)return!1;return!e},toRadian:M,toDegree:S,IS_NODE:C,get requestAnimFrame(){return A},get cancelAnimFrame(){return E},isSVG:T,loadImage:I,UID:L,GUID:R,parseJSON:O,pushIn:k,removeFromArray:B,forEachCoord:D,getValueOrDefault:F,sign:j,log2:U,interpolate:N,wrap:z,clamp:G,isArrayHasData:H,isURL:function(t){return W.test(t)},isCssUrl:Q,extractCssUrl:X,btoa:Y,b64toBlob:J,computeDegree:q,emptyImageUrl:K,equalMapView:$,flash:et,_defaults:function(t,e){for(var n=Object.getOwnPropertyNames(e),r=0;r<n.length;r++){var i=n[r],o=Object.getOwnPropertyDescriptor(e,i);o&&o.configurable&&void 0===t[i]&&Object.defineProperty(t,i,o)}return t},translateToSVGStyles:Ct,getMarkerPathBase64:Tt,getExternalResources:It,convertResourceUrl:Pt,isGradient:Rt,getGradientStamp:Ot,getSymbolStamp:function t(e){var n=[];if(Array.isArray(e)){for(var r=0;r<e.length;r++)n.push(t(e[r]));return"[ "+n.join(" , ")+" ]"}for(var i in e)x(e,i)&&(_(e[i])||(Rt(e[i])?n.push(i+"="+Ot(e[i])):n.push(i+"="+e[i])));return n.join(";")},lowerSymbolOpacity:kt,extendSymbol:Bt,parseStyleRootPath:Dt,convertStylePath:Ft}),Gt={};if(!C){var Ht=navigator.userAgent.toLowerCase(),Wt=document.documentElement,Vt="ActiveXObject"in window,Zt=-1!==Ht.indexOf("webkit"),Qt=-1!==Ht.indexOf("phantom"),Xt=-1!==Ht.search("android [23]"),Yt=-1!==Ht.indexOf("chrome"),Jt=-1!==Ht.indexOf("gecko")&&!Zt&&!window.opera&&!Vt,qt="undefined"!=typeof orientation||-1!==Ht.indexOf("mobile"),Kt=!window.PointerEvent&&window.MSPointerEvent,$t=window.PointerEvent&&navigator.pointerEnabled||Kt,te=Vt&&"transition"in Wt.style,ee="WebKitCSSMatrix"in window&&"m11"in new window.WebKitCSSMatrix&&!Xt,ne="MozPerspective"in Wt.style,re="OTransition"in Wt.style,ie=(te||ee||ne)&&!re&&!Qt,oe=0;Yt&&(oe=Ht.match(/chrome\/([\d.]+)/)[1]);var ae,se=!Qt&&($t||"ontouchstart"in window||window.DocumentTouch&&document instanceof window.DocumentTouch);try{var ce=document.createElement("canvas"),ue=ce.getContext("webgl")||ce.getContext("experimental-webgl");ae=ue&&ue instanceof WebGLRenderingContext}catch(t){ae=!1}var le=window.devicePixelRatio||window.screen.deviceXDPI/window.screen.logicalXDPI;Gt={ie:Vt,ielt9:Vt&&!document.addEventListener,edge:"msLaunchUri"in navigator&&!("documentMode"in document),webkit:Zt,gecko:Jt,android:-1!==Ht.indexOf("android"),android23:Xt,chrome:Yt,chromeVersion:oe,safari:!Yt&&-1!==Ht.indexOf("safari"),phantomjs:Qt,ie3d:te,webkit3d:ee,gecko3d:ne,opera12:re,any3d:ie,mobile:qt,mobileWebkit:qt&&Zt,mobileWebkit3d:qt&&ee,mobileOpera:qt&&window.opera,mobileGecko:qt&&Jt,touch:!!se,msPointer:!!Kt,pointer:!!$t,retina:le>1,devicePixelRatio:le,language:navigator.browserLanguage?navigator.browserLanguage:navigator.language,ie9:Vt&&9===document.documentMode,ie10:Vt&&10===document.documentMode,webgl:ae}}var he=Gt;function fe(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,t.__proto__=e}function de(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}var pe=function(){function t(t,e){if(p(t)||p(e)?p(t.x)||p(t.y)?Array.isArray(t)&&(this.x=+t[0],this.y=+t[1]):(this.x=+t.x,this.y=+t.y):(this.x=+t,this.y=+e),this._isNaN())throw new Error("Position is NaN")}var e=t.prototype;return e.set=function(t,e){return this.x=t,this.y=e,this},e.abs=function(){return new this.constructor(Math.abs(this.x),Math.abs(this.y))},e._abs=function(){return this.x=Math.abs(this.x),this.y=Math.abs(this.y),this},e._round=function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this},e.round=function(){return new this.constructor(Math.round(this.x),Math.round(this.y))},e._ceil=function(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this},e.ceil=function(){return new this.constructor(Math.ceil(this.x),Math.ceil(this.y))},e.distanceTo=function(t){var e=t.x-this.x,n=t.y-this.y;return Math.sqrt(e*e+n*n)},e._floor=function(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this},e.floor=function(){return new this.constructor(Math.floor(this.x),Math.floor(this.y))},e.copy=function(){return new this.constructor(this.x,this.y)},e._add=function(t,e){return p(t.x)?p(t[0])?(this.x+=t,this.y+=e):(this.x+=t[0],this.y+=t[1]):(this.x+=t.x,this.y+=t.y),this},e.add=function(t,e){var n,r;return p(t.x)?p(t[0])?(n=this.x+t,r=this.y+e):(n=this.x+t[0],r=this.y+t[1]):(n=this.x+t.x,r=this.y+t.y),new this.constructor(n,r)},e._sub=function(t,e){return p(t.x)?p(t[0])?(this.x-=t,this.y-=e):(this.x-=t[0],this.y-=t[1]):(this.x-=t.x,this.y-=t.y),this},e._substract=function(){return this._sub.apply(this,arguments)},e.sub=function(t,e){var n,r;return p(t.x)?p(t[0])?(n=this.x-t,r=this.y-e):(n=this.x-t[0],r=this.y-t[1]):(n=this.x-t.x,r=this.y-t.y),new this.constructor(n,r)},e.substract=function(){return this.sub.apply(this,arguments)},e.multi=function(t){return new this.constructor(this.x*t,this.y*t)},e._multi=function(t){return this.x*=t,this.y*=t,this},e.div=function(t){return this.multi(1/t)},e._div=function(t){return this._multi(1/t)},e.equals=function(t){return t instanceof this.constructor&&this.x===t.x&&this.y===t.y},e._isNaN=function(){return isNaN(this.x)||isNaN(this.y)},e.isZero=function(){return 0===this.x&&0===this.y},e.toArray=function(){return[this.x,this.y]},e.toFixed=function(t){return new this.constructor(this.x.toFixed(t),this.y.toFixed(t))},e.toJSON=function(){return{x:this.x,y:this.y}},t}(),me=function(t){function e(){return t.apply(this,arguments)||this}fe(e,t);var n=e.prototype;return n.closeTo=function(t,e){return e||(e=0),this.x>=t.x-e&&this.x<=t.x+e&&this.y>=t.y-e&&this.y<=t.y+e},n.mag=function(){return Math.sqrt(this.x*this.x+this.y*this.y)},n.unit=function(){return this.copy()._unit()},n._unit=function(){return this._div(this.mag()),this},n.perp=function(){return this.copy()._perp()},n._perp=function(){var t=this.y;return this.y=this.x,this.x=-t,this},n.angleWith=function(t){return this.angleWithSep(t.x,t.y)},n.angleWithSep=function(t,e){return Math.atan2(this.x*e-this.y*t,this.x*t+this.y*e)},n._rotate=function(t){var e=Math.cos(t),n=Math.sin(t),r=e*this.x-n*this.y,i=n*this.x+e*this.y;return this.x=r,this.y=i,this},n.rotate=function(t){return this.copy()._rotate(t)},e}(pe),ge=function(){function t(t,e){m(t)&&m(e)?(this.width=t,this.height=e):m(t.width)?(this.width=t.width,this.height=t.height):Array.isArray(t)&&(this.width=t[0],this.height=t[1])}var e=t.prototype;return e.copy=function(){return new t(this.width,this.height)},e.add=function(e,n){var r,i;return e instanceof t?(r=this.width+e.width,i=this.height+e.height):(r=this.width+e,i=this.height+n),new t(r,i)},e.equals=function(t){return this.width===t.width&&this.height===t.height},e.multi=function(e){return new t(this.width*e,this.height*e)},e._multi=function(t){return this.width*=t,this.height*=t,this},e._round=function(){return this.width=Math.round(this.width),this.height=Math.round(this.height),this},e.toPoint=function(){return new me(this.width,this.height)},e.toArray=function(){return[this.width,this.height]},e.toJSON=function(){return{width:this.width,height:this.height}},t}();function ve(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}var ye=/[\b\t\r\v\f]/gim;function _e(t){return y(t)?t.replace(ye,""):t}function be(t){return ve(t).split(/\s+/)}var xe="undefined"!=typeof document?document.createElement("canvas").getContext("2d"):null;function we(t,e){return we.node?we.node(t,e):(xe.font=e,xe.measureText(t).width)}function Me(t,e,n){var r=we(t,e);return new ge(r,n||h)}function Se(t,e,n,r){if(!t||0===t.length)return[{text:"",width:0}];var i=p(r)?we(t,e):r,o=i/t.length,a=Math.floor(n/o/2);if(o>=n||a<=0)return[{text:"",width:n}];if(i<=n)return[{text:t,width:i}];for(var s=[],c=t.substring(0,a),u=o*a,l=a,h=t.length;l<h;l++){var f=t[l],d=we(c+f);d>=n?(s.push({text:c,width:u}),c=t.substring(l,a+l),l+=a-1,u=o*a):(c+=f,u=d),l>=h-1&&(u=we(c),s.push({text:c,width:u}))}return s}var Ae=/\{([\w_]+)\}/g;function Ee(t,e){return y(t)?t.replace(Ae,(function(t,n){if(!e)return"";var r=e[n];return p(r)?"":Array.isArray(r)?r.join():r})):t}function Ce(t,e,n){var r=t.width,i=t.height;return new me("left"===e?-r:"right"===e?0:-r/2,"top"===n?-i:"bottom"===n?0:-i/2)}function Te(t){return t.textFont?t.textFont:(t.textStyle&&"normal"!==t.textStyle?t.textStyle+" ":"")+(t.textWeight&&"normal"!==t.textWeight?t.textWeight+" ":"")+t.textSize+"px "+(t.textFaceName?'"'===t.textFaceName[0]?t.textFaceName:'"'+t.textFaceName+'"':"monospace")}function Ie(t,e){var n=Te(e),r=e.textLineSpacing||0,i=Me(t,n,e.textSize),o=i.width,a=i.height,s=e.textWrapCharacter,c=[],u=e.textWrapWidth;(!u||u>o)&&(u=o),y(t)||(t+="");var l=0;if(s&&t.indexOf(s)>=0)for(var h=t.split(s),f=0,d=h.length;f<d;f++){var p=h[f],m=we(p,n);if(m>u)for(var g=Se(p,n,u,m),v=0,_=g.length;v<_;v++){var b=g[v].width;b>l&&(l=b),c.push({text:g[v].text,size:new ge(b,a)})}else m>l&&(l=m),c.push({text:p,size:new ge(m,a)})}else if(o>u)for(var x=Se(t,n,u,o),w=0;w<x.length;w++){var M=x[w].width;M>l&&(l=M),c.push({text:x[w].text,size:new ge(M,a)})}else o>l&&(l=o),c.push({text:t,size:i});var S=c.length;return{total:S,size:new ge(l,a*S+r*(S-1)),rows:c,rawSize:i}}var Pe=Object.freeze({trim:ve,escapeSpecialChars:_e,splitWords:be,stringWidth:we,stringLength:Me,getFontHeight:function(t){var e=nn("span");"_default_"!==t&&(e.style.font=t),e.innerHTML="秦";var n=e.clientHeight;return je(e),n},splitContent:Se,replaceVariable:Ee,getAlignPoint:Ce,getFont:Te,splitTextToRow:Ie}),Le=C?function(t){return t[0]}:function(t){for(var e=document.documentElement.style,n=0;n<t.length;n++)if(t[n]in e)return t[n];return!1},Re=Le(["transform","WebkitTransform","OTransform","MozTransform","msTransform"]),Oe=Le(["transformOrigin","WebkitTransformOrigin","OTransformOrigin","MozTransformOrigin","msTransformOrigin"]),ke=Le(["transition","WebkitTransition","OTransition","MozTransition","msTransition"]),Be=Le(["filter","WebkitFilter","OFilter","MozFilter","msFilter"]);function De(t,e){var n=document.createElement(t);return e&&qe(n,e),n}function Fe(t,e,n){var r=De(t);return e&&Xe(r,e),n&&n.appendChild(r),r}function je(t){if(!t)return this;if(he.ielt9||he.ie9){var e=De("div");e.appendChild(t),e.innerHTML="",e=null}else t.parentNode&&t.parentNode.removeChild(t);return this}function Ue(t,e,n,r){if(!(t&&t.addEventListener&&e&&n))return this;for(var i=function(e){e||(e=window.event),n.call(r||t,e)},o=e.split(" "),a=o.length-1;a>=0;a--){var s=o[a];s&&(t["Z__"+s]||(t["Z__"+s]=[]),ze(t,s,n)>=0&&Ne(t,s,n),t["Z__"+s].push({callback:i,src:n}),he.ie?t.addEventListener(s,i,!1):t.addEventListener(s,i,{capture:!1,passive:!1}))}return this}function Ne(t,e,n){function r(e,n){"mousewheel"===e&&he.gecko&&(e="DOMMouseScroll"),t.removeEventListener(e,n,!1)}if(!t||!t.removeEventListener||!e)return this;for(var i=e.split(" "),o=i.length-1;o>=0;o--){var a=i[o];if(a){if(!n&&t["Z__"+a]){for(var s=t["Z__"+a],c=0,u=s.length;c<u;c++)r(s[c].callback);return delete t["Z__"+a],this}var l=ze(t,a,n);if(l<0)return this;r(a,t["Z__"+a][l].callback),t["Z__"+a].splice(l,1)}}return this}function ze(t,e,n){if(!t||!t["Z__"+e]||!n)return-1;for(var r=t["Z__"+e],i=0,o=r.length;i<o;i++)if(r[i].src===n)return i;return-1}function Ge(t){return t.preventDefault?t.preventDefault():t.returnValue=!1,this}function He(t){return t.stopPropagation?t.stopPropagation():t.cancelBubble=!0,this}function We(t){return t.onselectstart=function(){return!1},t.ondragstart=function(){return!1},t.setAttribute("unselectable","on"),this}function Ve(t,e){return t?(he.any3d?$e(t,e):(t.style.left=e.x+"px",t.style.top=e.y+"px"),e):null}function Ze(t){var e=window.getComputedStyle(t),n=[parseInt(e["padding-left"]),parseInt(e["padding-top"])],r=t.getBoundingClientRect(),i=t.offsetWidth,o=t.offsetHeight,a=i?r.width/i:1,s=o?r.height/o:1;return t.__position=[r.left+n[0],r.top+n[1],a,s],t.__position}function Qe(t,e){t||(t=window.event);var n=e.__position;return n||(n=Ze(e)),new me((t.clientX-n[0]-e.clientLeft)/n[2],(t.clientY-n[1]-e.clientTop)/n[3])}function Xe(t,e){var n=t.style.cssText;return function(t,e){var n=t.length-e.length;return n>=0&&t.indexOf(e,n)===n}(n,";")||(n+=";"),t.style.cssText=n+e,this}function Ye(t,e){if(void 0!==t.classList)return t.classList.contains(e);var n=Ke(t);return n.length>0&&new RegExp("(^|\\s)"+e+"(\\s|$)").test(n)}function Je(t,e){if(void 0===t.classList||Ye(t,e)){var n=Ke(t);qe(t,(n?n+" ":"")+e)}else for(var r=be(e),i=0,o=r.length;i<o;i++)t.classList.add(r[i]);return this}function qe(t,e){return p(t.className.baseVal)?t.className=e:t.className.baseVal=e,this}function Ke(t){return p(t.className.baseVal)?t.className:t.className.baseVal}function $e(t,e){var n=e||new me(0,0);return t.style[Re]=he.any3d?"translate3d("+n.x+"px,"+n.y+"px,0px)":"translate("+n.x+"px,"+n.y+"px)",this}function tn(t){return/<[a-z\][\s\S]*>/i.test(t)}function en(t,e){var n=nn(t);y(e)?n.innerHTML=e:n.appendChild(e);var r=new ge(n.clientWidth,n.clientHeight);return je(n),r}function nn(t){var e=document.createElement(t);return e.style.cssText="position:absolute;left:-10000px;top:-10000px;",document.body.appendChild(e),e}var rn=Ue,on=Ne,an=Object.freeze({TRANSFORM:Re,TRANSFORMORIGIN:Oe,TRANSITION:ke,CSSFILTER:Be,createEl:De,createElOn:Fe,removeDomNode:je,addDomEvent:Ue,removeDomEvent:Ne,listensDomEvent:ze,preventDefault:Ge,stopPropagation:He,preventSelection:We,offsetDom:Ve,computeDomPosition:Ze,getEventContainerPoint:Qe,setStyle:Xe,hasClass:Ye,addClass:Je,setClass:qe,getClass:Ke,setOpacity:function(t,e){return t.style.opacity=e,this},setTransform:$e,setTransformMatrix:function(t,e){var n="matrix("+(y(e)?e:e.join())+")";return t.style[Re]!==n&&(t.style[Re]=n),this},removeTransform:function(t){return t.style[Re]&&(t.style[Re]=""),this},isHTML:tn,measureDom:en,getDomRuler:nn,on:rn,off:on}),sn={jsonp:function(t,e){var n="_maptalks_jsonp_"+L();t.match(/\?/)?t+="&callback="+n:t+="?callback="+n;var r=document.createElement("script");return r.type="text/javascript",r.src=t,window[n]=function(t){e(null,t),document.getElementsByTagName("head")[0].removeChild(r),r=null,delete window[n]},document.getElementsByTagName("head")[0].appendChild(r),this},get:function(t,e,n){if(_(e)){var r=n;n=e,e=r}if(C&&sn.get.node)return sn.get.node(t,n,e);var i=sn._getClient(n);if(i.open("GET",t,!0),e){for(var o in e.headers)i.setRequestHeader(o,e.headers[o]);i.withCredentials="include"===e.credentials,e.responseType&&(i.responseType=e.responseType)}return i.send(null),i},post:function(t,e,n){var r;if(y(t)){if(_(e)){var i=n;n=e,e=i}r=(e=e||{}).postData}else{var o=n;r=e,t=(e=t).url,n=o}if(C&&sn.post.node)return e.url=t,sn.post.node(e,r,n);var a=sn._getClient(n);if(a.open("POST",e.url,!0),e.headers||(e.headers={}),e.headers["Content-Type"]||(e.headers["Content-Type"]="application/x-www-form-urlencoded"),"setRequestHeader"in a)for(var s in e.headers)e.headers.hasOwnProperty(s)&&a.setRequestHeader(s,e.headers[s]);return y(r)||(r=JSON.stringify(r)),a.send(r),a},_wrapCallback:function(t,e){return function(){4===t.readyState&&(200===t.status?"arraybuffer"===t.responseType?0===t.response.byteLength?e(new Error("http status 200 returned without content.")):e(null,{data:t.response,cacheControl:t.getResponseHeader("Cache-Control"),expires:t.getResponseHeader("Expires"),contentType:t.getResponseHeader("Content-Type")}):e(null,t.responseText):e(new Error(t.statusText+","+t.status)))}},_getClient:function(t){var e;try{e=new XMLHttpRequest}catch(t){try{e=new ActiveXObject("Msxml2.XMLHTTP")}catch(t){try{e=new ActiveXObject("Microsoft.XMLHTTP")}catch(t){}}}return e.onreadystatechange=sn._wrapCallback(e,t),e},getArrayBuffer:function(t,e,n){if(_(e)){var r=n;n=e,e=r}return e||(e={}),e.responseType="arraybuffer",sn.get(t,e,n)},getImage:function(t,e,n){return sn.getArrayBuffer(e,n,(function(e,n){if(e)t.onerror&&t.onerror(e);else if(n){var r=window.URL||window.webkitURL,i=t.onload;t.onload=function(){i&&i(),r.revokeObjectURL(t.src)};var o=new Blob([new Uint8Array(n.data)],{type:n.contentType});t.cacheControl=n.cacheControl,t.expires=n.expires,t.src=n.data.byteLength?r.createObjectURL(o):K}}))},getJSON:function(t,e,n){if(_(e)){var r=n;n=e,e=r}var i=function(t,e){var r=e?O(e):null;n(t,r)};return e&&e.jsonp?sn.jsonp(t,i):sn.get(t,e,i)}},cn=!1,un=null,ln=Math.PI/180,hn={setHitTesting:function(t){cn=t},createCanvas:function(t,e,n){var r;return C?r=new n(t,e):((r=De("canvas")).width=t,r.height=e),r},prepareCanvasFont:function(t,e){t.textBaseline="top",t.font=Te(e);var n=e.textFill;n||(n="#000"),t.fillStyle=hn.getRgba(n,e.textOpacity)},prepareCanvas:function(t,e,n,r){if(e){var i=e.lineWidth;p(i)||t.lineWidth===i||(t.lineWidth=i);var o=e.linePatternFile,a=e.lineColor||"#000";if(r)t.strokeStyle="#000";else if(o&&n){var s;(e.linePatternDx||e.linePatternDy)&&(s=[e.linePatternDx,e.linePatternDy]),hn._setStrokePattern(t,o,i,s,n),e.lineDasharray=[]}else Rt(a)?e.lineGradientExtent?t.strokeStyle=hn._createGradient(t,a,e.lineGradientExtent):t.strokeStyle="#000":t.strokeStyle=a;e.lineJoin&&(t.lineJoin=e.lineJoin),e.lineCap&&(t.lineCap=e.lineCap),t.setLineDash&&H(e.lineDasharray)&&t.setLineDash(e.lineDasharray);var c=e.polygonPatternFile,u=e.polygonFill||"rgba(255,255,255,0)";if(r)t.fillStyle="#000";else if(c&&n){var l=pn(c),h=n.getImage([l,null,null]);if(h||(h=n.getImage([l+"-texture",null,i])),T(l)&&h instanceof Image&&(he.edge||he.ie)){var f=h.width||20,d=h.height||20,m=hn.createCanvas(f,d);hn.image(m.getContext("2d"),h,0,0,f,d),h=m}h?(t.fillStyle=t.createPattern(h,"repeat"),(e.polygonPatternDx||e.polygonPatternDy)&&(t.fillStyle.polygonPatternOffset=[e.polygonPatternDx,e.polygonPatternDy])):"undefined"!=typeof console&&console.warn("img not found for",l)}else Rt(u)?e.polygonGradientExtent?t.fillStyle=hn._createGradient(t,u,e.polygonGradientExtent):t.fillStyle="rgba(255,255,255,0)":t.fillStyle=u}},_createGradient:function(t,e,n){var r=null,i=e.places,o=n.getMin(),a=n.getMax(),s=n.getWidth(),c=n.getHeight();if(e.type&&"linear"!==e.type){if("radial"===e.type){if(i){if(6!==i.length)throw new Error("A radial gradient's places should have 6 numbers.");i=[o.x+i[0]*s,o.y+i[1]*c,s*i[2],o.x+i[3]*s,o.y+i[4]*c,s*i[5]]}else{var u=n.getCenter()._round();i=[u.x,u.y,Math.abs(u.x-o.x),u.x,u.y,0]}r=t.createRadialGradient.apply(t,i)}}else{if(i){if(4!==i.length)throw new Error("A linear gradient's places should have 4 numbers.");i=[o.x+i[0]*s,o.y+i[1]*c,o.x+i[2]*s,o.y+i[3]*c]}else i=[o.x,o.y,a.x,o.y];r=t.createLinearGradient.apply(t,i)}return e.colorStops.forEach((function(t){r.addColorStop.apply(r,t)})),r},_setStrokePattern:function(t,e,n,r,i){var o,a=pn(e);if(C)o=i.getImage([a,null,n]);else{var s=a+"-texture-"+n;if(!(o=i.getImage(s))){var c=i.getImage([a,null,null]);if(c){var u;u=c.width&&c.height?Math.round(c.width*n/c.height):n;var l=hn.createCanvas(u,n,t.canvas.constructor);hn.image(l.getContext("2d"),c,0,0,u,n),i.addResource([s,null,n],l),o=l}}}o?(t.strokeStyle=t.createPattern(o,"repeat"),t.strokeStyle.linePatternOffset=r):"undefined"!=typeof console&&console.warn("img not found for",a)},clearRect:function(t,e,n,r,i){t.canvas._drawn=!1,t.clearRect(e,n,r,i)},fillCanvas:function(t,e,n,r){if(cn&&(e=1),t.canvas._drawn=!0,0!==e){var i,o=hn._isPattern(t.fillStyle),a=t.fillStyle&&t.fillStyle.polygonPatternOffset,s=a?a[0]:0,c=a?a[1]:0;p(e)&&(e=1),e<1&&(i=t.globalAlpha,t.globalAlpha*=e),o&&(n=n||0,r=r||0,t.translate(n+s,r+c)),t.fill(),o&&t.translate(-n-s,-r-c),e<1&&(t.globalAlpha=i)}},getRgba:function(t,e){return p(e)&&(e=1),"#"!==t[0]?t:(7===t.length?(n=parseInt(t.substring(1,3),16),r=parseInt(t.substring(3,5),16),i=parseInt(t.substring(5,7),16)):(n=17*parseInt(t.substring(1,2),16),r=17*parseInt(t.substring(2,3),16),i=17*parseInt(t.substring(3,4),16)),"rgba("+n+","+r+","+i+","+e+")");var n,r,i},image:function(t,e,n,r,i,o){t.canvas._drawn=!0;try{m(i)&&m(o)?t.drawImage(e,n,r,i,o):t.drawImage(e,n,r)}catch(t){console&&(console.warn("error when drawing image on canvas:",t),console.warn(e))}},text:function(t,e,n,r,i){hn._textOnMultiRow(t,i.rows,r,n,i.size,i.rawSize)},_textOnMultiRow:function(t,e,n,r,i,o){for(var a,s,c=Ce(i,n.textHorizontalAlignment,n.textVerticalAlignment),u=o.height+n.textLineSpacing,l=r.add(0,c.y),h=n.textMaxHeight,f=0,d=0,p=e.length;d<p&&(a=e[d].text,s=Ce(e[d].size,n.textHorizontalAlignment,n.textVerticalAlignment),hn._textOnLine(t,a,l.add(s.x,d*u),n.textHaloRadius,n.textHaloFill,n.textHaloOpacity),!(h>0&&(f+=u,f+o.height>=h)));d++);},_textOnLine:function(t,e,n,r,i,o){cn&&(o=1);var a,s,c=0!==o&&0!==r;t.textBaseline="top";var u=t.shadowBlur,l=t.shadowOffsetX,h=t.shadowOffsetY;if(c){var f=t.globalAlpha;t.globalAlpha*=o,t.miterLimit=2,t.lineJoin="round",t.lineCap="round",t.lineWidth=2*r,t.strokeStyle=i,t.strokeText(e,n.x,n.y+1),t.miterLimit=10,t.globalAlpha=f,a=t.globalCompositeOperation,t.globalCompositeOperation="destination-out",s=t.fillStyle,t.fillStyle="#000"}u&&c&&(t.shadowBlur=t.shadowOffsetX=t.shadowOffsetY=0),hn.fillText(t,e,n),a&&(t.globalCompositeOperation=a,hn.fillText(t,e,n,s),u&&(t.shadowBlur=u,t.shadowOffsetX=l,t.shadowOffsetY=h))},fillText:function(t,e,n,r){t.canvas._drawn=!0,r&&(t.fillStyle=r),t.fillText(e,n.x,n.y+1)},_stroke:function(t,e,n,r){if(cn&&(e=1),t.canvas._drawn=!0,0!==e){var i,o=t.strokeStyle&&t.strokeStyle.linePatternOffset,a=o?o[0]:0,s=o?o[1]:0,c=hn._isPattern(t.strokeStyle)&&(!p(n)&&!p(r)||!p(a)&&!p(s));p(e)&&(e=1),e<1&&(i=t.globalAlpha,t.globalAlpha*=e),c&&(n=n||0,r=r||0,t.translate(n+a,r+s)),t.stroke(),c&&t.translate(-n-a,-r-s),e<1&&(t.globalAlpha=i)}},_path:function(t,e,n,r,i){if(H(e))for(var o,a,s=H(n),c=!0!==i&&hn._isPattern(t.strokeStyle),u=0,l=e.length;u<l;u++)if(o=e[u],!s||t.setLineDash)t.lineTo(o.x,o.y),c&&u>0&&(h(e[u-1],o),t.beginPath(),t.moveTo(o.x,o.y));else if(s){if(u===l-1)break;a=e[u+1],fn(t,o,a,n)}function h(e,n){var i=q(e.x,e.y,n.x,n.y);t.save();var o=Math.cos(i);Math.abs(o)<1e-7?t.translate(e.x-t.lineWidth/2,e.y):t.translate(e.x,e.y-t.lineWidth/2/o),t.rotate(i),hn._stroke(t,r),t.restore()}},path:function(t,e,n,r,i){H(e)&&(t.beginPath(),t.moveTo(e[0].x,e[0].y),hn._path(t,e,i,n),hn._stroke(t,n))},_multiClip:function(t,e){if(e&&0!==e.length)for(var n=0,r=(e=e[0]).length;n<r;n++){var i=e[n],o=i.x,a=i.y;0===n?t.moveTo(o,a):t.lineTo(o,a),n===r-1&&(o=e[0].x,a=e[0].y,t.lineTo(o,a))}},polygon:function(t,e,n,r,i,o){if(t.isMultiClip)hn._multiClip(t,e);else if(H(e)){var a=hn._isPattern(t.strokeStyle),s=H(i)&&!t.setLineDash||a&&!o;H(e[0])||(e=[e]);var c,u,l,h=t;if(e.length>1&&!C&&(un||(un=hn.createCanvas(1,1)),t.canvas._drawn=!1,un.width=t.canvas.width,un.height=t.canvas.height,mn(t=un.getContext("2d"),h)),s){for(t.save(),u=0,l=e.length;u<l;u++)H(e[u])&&(hn._ring(t,e[u],null,0,!0),c=r,u>0&&(t.globalCompositeOperation="destination-out",c=1),hn.fillCanvas(t,c,e[u][0].x,e[u][0].y),u>0?t.globalCompositeOperation="source-over":l>1&&(t.fillStyle="#fff"),hn._stroke(t,0));t.restore()}for(u=0,l=e.length;u<l;u++)H(e[u])&&(o?(hn.paintSmoothLine(t,e[u],n,o,!0),t.closePath()):hn._ring(t,e[u],i,n),s||(c=r,u>0&&(t.globalCompositeOperation="destination-out",c=1),hn.fillCanvas(t,c,e[u][0].x,e[u][0].y),u>0?t.globalCompositeOperation="source-over":l>1&&(t.fillStyle="#fff")),hn._stroke(t,n));e.length>1&&!C&&(h.drawImage(un,0,0),h.canvas._drawn=t.canvas._drawn,mn(h,t))}},_ring:function(t,e,n,r,i){var o=hn._isPattern(t.strokeStyle);i||!o||e[0].equals(e[e.length-1])||(e=e.concat([e[0]])),t.beginPath(),t.moveTo(e[0].x,e[0].y),hn._path(t,e,n,r,i),o||t.closePath()},paintSmoothLine:function(t,e,n,r,i,o,a){if(e)if(e.length<=2||!r)hn.path(t,e,n);else{var s,c=e.length,u=i?c:c-1;t.beginPath(),t.moveTo(e[0].x,e[0].y),void 0!==a&&(u-=Math.max(u-o-1,0));for(var l=0;l<u;l++){var h=e[l].x,f=e[l].y,d=void 0,p=void 0,m=void 0,g=void 0,v=void 0,y=void 0;l-1<0?i?(d=e[u-1].x,p=e[u-1].y):(d=e[l+1].x,p=e[l+1].y):(d=e[l-1].x,p=e[l-1].y),l+1<c?(m=e[l+1].x,g=e[l+1].y):(m=e[l+1-c].x,g=e[l+1-c].y),l+2<c?(v=e[l+2].x,y=e[l+2].y):i?(v=e[l+2-c].x,y=e[l+2-c].y):(v=e[l].x,y=e[l].y);var _=x(d,p,h,f,m,g,v,y,r,l===u-1?a:1);if(l===u-1&&a>=0&&a<1){t.bezierCurveTo(_[0],_[1],_[2],_[3],_[4],_[5]),e.splice(u-1,c-(u-1)-1);var b=new me(_[4],_[5]);b.prevCtrlPoint=new me(_[2],_[3]),e.push(b),c=e.length}else t.bezierCurveTo(_[0],_[1],_[2],_[3],m,g);e[l].nextCtrlPoint=_.slice(0,2),e[l].prevCtrlPoint=s?s.slice(2):null,s=_}!i&&e[1].prevCtrlPoint&&(e[0].nextCtrlPoint=e[1].prevCtrlPoint,delete e[0].prevCtrlPoint),e[c-1].prevCtrlPoint||(e[c-1].prevCtrlPoint=e[c-2].nextCtrlPoint),hn._stroke(t,n)}function x(t,e,n,r,i,o,a,s,c,u){var l=(t+n)/2,h=(e+r)/2,f=(n+i)/2,d=(r+o)/2,p=(i+a)/2,m=(o+s)/2,g=Math.sqrt((n-t)*(n-t)+(r-e)*(r-e)),v=Math.sqrt((i-n)*(i-n)+(o-r)*(o-r)),y=g/(g+v),_=v/(v+Math.sqrt((a-i)*(a-i)+(s-o)*(s-o))),b=l+(f-l)*y,x=h+(d-h)*y,w=f+(p-f)*_,M=d+(m-d)*_,S=b+(f-b)*c+n-b,A=x+(d-x)*c+r-x,E=w+(f-w)*c+i-w,C=M+(d-M)*c+o-M,T=[S,A,E,C];return u<1?function(t,e,n,r,i,o,a,s,c,u){var l=1-t,h=1-e,f=n*h*h+2*i*e*h+a*e*e,d=i*h*h+2*a*e*h+c*e*e,p=r*h*h+2*o*e*h+s*e*e,m=o*h*h+2*s*e*h+u*e*e;return[(n*l*l+2*i*t*l+a*t*t)*h+(i*l*l+2*a*t*l+c*t*t)*e,(r*l*l+2*o*t*l+s*t*t)*h+(o*l*l+2*s*t*l+u*t*t)*e,f*l+d*t,p*l+m*t,f*h+d*e,p*h+m*e]}(0,u,n,r,S,A,E,C,i,o):T}},_arcBetween:function(t,e,n,r){var i=r,o=e.distanceTo(n),a=o/2/Math.sin(i/2),s=Math.asin((n.y-e.y)/o);e.x>n.x&&(s=Math.PI-s);var c=s-(90*ln-i/2),u=Math.cos(c)*a,l=Math.sin(c)*a,h=e.x+u,f=e.y+l,d=Math.asin((n.y-f)/a);h>n.x&&(d=Math.PI-d);var p=d+i;return t.beginPath(),t.arc(h,f,a,d,p),[h,f]},_lineTo:function(t,e){t.lineTo(e.x,e.y)},bezierCurveAndFill:function(t,e,n,r){t.beginPath();var i=e[0];t.moveTo(i.x,i.y);var o=[t];o.push.apply(o,e.splice(1)),hn._bezierCurveTo.apply(hn,o),hn.fillCanvas(t,r),hn._stroke(t,n)},_bezierCurveTo:function(t,e,n,r){t.bezierCurveTo(e.x,e.y,n.x,n.y,r.x,r.y)},ellipse:function(t,e,n,r,i,o,a){t.beginPath(),n===r&&n===i?t.arc(e.x,e.y,n,0,2*Math.PI):t.ellipse?r!==i?(t.ellipse(e.x,e.y,n,r,0,180*ln,360*ln,!1),t.ellipse(e.x,e.y,n,i,0,0,180*ln,!1)):t.ellipse(e.x,e.y,n,r,0,0,360*ln,!1):function(e,n,r,i,o){var a=.5522848,s=r*a,c=i*a,u=o*a;t.moveTo(e-r,n),t.bezierCurveTo(e-r,n-c,e-s,n-i,e,n-i),t.bezierCurveTo(e+s,n-i,e+r,n-c,e+r,n),t.bezierCurveTo(e+r,n+u,e+s,n+o,e,n+o),t.bezierCurveTo(e-s,n+o,e-r,n+u,e-r,n),t.closePath()}(e.x,e.y,n,r,i),hn.fillCanvas(t,a,e.x-n,e.y-r),hn._stroke(t,o,e.x-n,e.y-r)},rectangle:function(t,e,n,r,i){var o=e.x,a=e.y;t.beginPath(),t.rect(o,a,n.width,n.height),hn.fillCanvas(t,i,o,a),hn._stroke(t,r,o,a)},sector:function(t,e,n,r,i,o){var a=ln,s=r[0],c=r[1];!function(t,e,n,r,s,c){var u=a*-c,l=a*-s;t.beginPath(),t.moveTo(e,n),t.arc(e,n,r,u,l),t.lineTo(e,n),hn.fillCanvas(t,o,e-r,n-r),hn._stroke(t,i,e-r,n-r)}(t,e.x,e.y,n,s,c)},_isPattern:function(t){return!y(t)&&!("addColorStop"in t)},drawCross:function(t,e,n,r,i){t.canvas._drawn=!0,t.strokeStyle=i,t.lineWidth=r,t.beginPath(),t.moveTo(e-5,n),t.lineTo(e+5,n),t.moveTo(e,n-5),t.lineTo(e,n+5),t.stroke()},copy:function(t,e){var n=e||De("canvas");return n.width=t.width,n.height=t.height,n.getContext("2d").drawImage(t,0,0),n}};function fn(t,e,n,r){var i=e.x,o=e.y,a=n.x,s=n.y,c=r,u=function(t,e){return t<=e},l=function(t,e){return t>=e},h=function(t,e){return Math.min(t,e)},f=function(t,e){return Math.max(t,e)},d={thereYet:l,cap:h},p={thereYet:l,cap:h};o-s>0&&(p.thereYet=u,p.cap=f),i-a>0&&(d.thereYet=u,d.cap=f),t.moveTo(i,o);for(var m,g,v=i,y=o,_=0,b=!0;!d.thereYet(v,a)||!p.thereYet(y,s);)m=Math.atan2(s-o,a-i),g=c[_],v=d.cap(a,v+Math.cos(m)*g),y=p.cap(s,y+Math.sin(m)*g),b?t.lineTo(v,y):t.moveTo(v,y),_=(_+1)%c.length,b=!b}var dn="data:image/";function pn(t){return t.substring(0,dn.length)===dn?t:X(t)}function mn(t,e){t.filter=e.filter,t.fillStyle=e.fillStyle,t.globalAlpha=e.globalAlpha,t.lineCap=e.lineCap,t.lineDashOffset=e.lineDashOffset,t.lineJoin=e.lineJoin,t.lineWidth=e.lineWidth,t.shadowBlur=e.shadowBlur,t.shadowColor=e.shadowColor,t.shadowOffsetX=e.shadowOffsetX,t.shadowOffsetY=e.shadowOffsetY,t.strokeStyle=e.strokeStyle}var gn="undefined"!=typeof window?window:void 0!==r?r:"undefined"!=typeof self?self:{};function vn(t,e){return t(e={exports:{}},e.exports),e.exports}var yn=vn((function(t){!function(e){function n(t){if(t){var e=this;t((function(t){e.resolve(t)}),(function(t){e.reject(t)}))}}function r(t,e){if("function"==typeof t.y)try{var n=t.y.call(a,e);t.p.resolve(n)}catch(e){t.p.reject(e)}else t.p.resolve(e)}function i(t,e){if("function"==typeof t.n)try{var n=t.n.call(a,e);t.p.resolve(n)}catch(e){t.p.reject(e)}else t.p.reject(e)}var o,a,s="fulfilled",c="undefined",u=function(){function t(){for(;n.length-r;){try{n[r]()}catch(t){e.console&&e.console.error(t)}n[r++]=a,r==i&&(n.splice(0,i),r=0)}}var n=[],r=0,i=1024,o=function(){if(typeof MutationObserver!==c){var e=document.createElement("div");return new MutationObserver(t).observe(e,{attributes:!0}),function(){e.setAttribute("a",0)}}return typeof setImmediate!==c?function(){setImmediate(t)}:function(){setTimeout(t,0)}}();return function(t){n.push(t),n.length-r==1&&o()}}();n.prototype={resolve:function(t){if(this.state===o){if(t===this)return this.reject(new TypeError("Attempt to resolve promise with self"));var e=this;if(t&&("function"==typeof t||"object"==typeof t))try{var n=!0,i=t.then;if("function"==typeof i)return void i.call(t,(function(t){n&&(n=!1,e.resolve(t))}),(function(t){n&&(n=!1,e.reject(t))}))}catch(t){return void(n&&this.reject(t))}this.state=s,this.v=t,e.c&&u((function(){for(var n=0,i=e.c.length;i>n;n++)r(e.c[n],t)}))}},reject:function(t){if(this.state===o){this.state="rejected",this.v=t;var r=this.c;r?u((function(){for(var e=0,n=r.length;n>e;e++)i(r[e],t)})):!n.suppressUncaughtRejectionError&&e.console&&e.console.log("You upset Zousan. Please catch rejections: ",t,t?t.stack:null)}},then:function(t,e){var a=new n,c={y:t,n:e,p:a};if(this.state===o)this.c?this.c.push(c):this.c=[c];else{var l=this.state,h=this.v;u((function(){l===s?r(c,h):i(c,h)}))}return a},catch:function(t){return this.then(null,t)},finally:function(t){return this.then(t,t)},timeout:function(t,e){e=e||"Timeout";var r=this;return new n((function(n,i){setTimeout((function(){i(Error(e))}),t),r.then((function(t){n(t)}),(function(t){i(t)}))}))}},n.resolve=function(t){var e=new n;return e.resolve(t),e},n.reject=function(t){var e=new n;return e.reject(t),e},n.all=function(t){function e(e,a){e&&"function"==typeof e.then||(e=n.resolve(e)),e.then((function(e){r[a]=e,++i==t.length&&o.resolve(r)}),(function(t){o.reject(t)}))}for(var r=[],i=0,o=new n,a=0;a<t.length;a++)e(t[a],a);return t.length||o.resolve(r),o},t.exports&&(t.exports=n),e.define&&e.define.amd&&e.define([],(function(){return n})),e.Zousan=n,n.soon=u}(gn)})),_n="undefined"!=typeof Promise?Promise:yn,bn=function(t){return function(t){function e(){return t.apply(this,arguments)||this}fe(e,t);var n=e.prototype;return n.on=function(t,e,n){if(!t)return this;if(!y(t))return this._switch("on",t,e);if(!e)return this;this._eventMap||(this._eventMap={});var r,i,o=t.toLowerCase().split(" ");n||(n=this);for(var a=0,s=o.length;a<s;a++){r=o[a],(i=this._eventMap[r])||(i=[],this._eventMap[r]=i);var c=i.length;if(c>0)for(var u=0;u<c;u++)if(e===i[u].handler&&i[u].context===n)return this;i.push({handler:e,context:n})}return this},n.addEventListener=function(){return this.on.apply(this,arguments)},n.once=function(t,e,n){if(!y(t)){var r={};for(var i in t)t.hasOwnProperty(i)&&(r[i]=this._wrapOnceHandler(i,t[i],n));return this._switch("on",r)}for(var o=t.split(" "),a=0,s=o.length;a<s;a++)this.on(o[a],this._wrapOnceHandler(o[a],e,n));return this},n.off=function(t,e,n){if(!this._eventMap||!t)return this;if(!y(t))return this._switch("off",t,e);if(!e)return this;var r,i,o,a=t.split(" ");n||(n=this);for(var s=0,c=a.length;s<c;s++){if(o="Z__"+(r=a[s].toLowerCase()),!(i=this._eventMap[r]))return this;for(var u=i.length-1;u>=0;u--){var l=i[u];e!==l.handler&&e!==l.handler[o]||l.context!==n||(delete l.handler[o],i.splice(u,1))}i.length||delete this._eventMap[r]}return this},n.removeEventListener=function(){return this.off.apply(this,arguments)},n.listens=function(t,e,n){if(!this._eventMap||!y(t))return 0;var r=this._eventMap[t.toLowerCase()];if(!r||!r.length)return 0;if(!e)return r.length;for(var i=0,o=r.length;i<o;i++)if(e===r[i].handler&&(p(n)||r[i].context===n))return 1;return 0},n.getListeningEvents=function(){return this._eventMap?Object.keys(this._eventMap):[]},n.copyEventListeners=function(t){var e,n=t._eventMap;if(!n)return this;for(var r in n)for(var i=0,o=(e=n[r]).length;i<o;i++)this.on(r,e[i].handler,e[i].context);return this},n.fire=function(){return this._eventParent?this._eventParent.fire.apply(this._eventParent,arguments):this._fire.apply(this,arguments)},n._wrapOnceHandler=function(t,e,n){var r=this,i="Z__"+t,o=!1,a=function s(){o||(delete a[i],o=!0,n?e.apply(n,arguments):e.apply(this,arguments),r.off(t,s,this))};return a[i]=e,a},n._switch=function(t,e,n){for(var r in e)e.hasOwnProperty(r)&&this[t](r,e[r],n);return this},n._clearListeners=function(t){this._eventMap&&y(t)&&this._eventMap[t.toLowerCase()]&&(this._eventMap[t]=null)},n._clearAllListeners=function(){this._eventMap=null},n._setEventParent=function(t){return this._eventParent=t,this},n._setEventTarget=function(t){return this._eventTarget=t,this},n._fire=function(t,e){if(!this._eventMap)return this;var n=this._eventMap[t.toLowerCase()];if(!n)return this;e||(e={}),e.type=t,e.target=this._eventTarget||this;for(var r,i,o=n.slice(0),a=0,s=o.length;a<s;a++)o[a]&&(r=o[a].context,i=d({},e),!1===(r?o[a].handler.call(r,i):o[a].handler(i))&&e.domEvent&&He(e.domEvent));return this},e}(t)},xn=function(){function t(t){this.target=t}var e=t.prototype;return e.enable=function(){return this._enabled||(this._enabled=!0,this.addHooks()),this},e.disable=function(){return this._enabled?(this._enabled=!1,this.removeHooks(),this):this},e.enabled=function(){return!!this._enabled},e.remove=function(){this.disable(),delete this.target,delete this.dom},t}(),wn=bn(xn),Mn=function(){function t(t){if(!this||!this.setOptions)throw new Error('Class instance is being created without "new" operator.');this.setOptions(t),this.callInitHooks()}var e=t.prototype;return e.callInitHooks=function(){var t=Object.getPrototypeOf(this);return this._visitInitHooks(t),this},e.setOptions=function(t){if(this.hasOwnProperty("options")||(this.options=this.options?Object.create(this.options):{}),!t)return this;for(var e in t)this.options[e]=t[e];return this},e.config=function(t){if(!t){var e={};for(var n in this.options)this.options.hasOwnProperty(n)&&(e[n]=this.options[n]);return e}if(2===arguments.length){var r={};r[t]=arguments[1],t=r}for(var i in t)this.options[i]=t[i],this[i]&&this[i]instanceof wn&&(t[i]?this[i].enable():this[i].disable());return this.onConfig(t),this},e.onConfig=function(){},e._visitInitHooks=function(t){if(!this._initHooksCalled){var e=Object.getPrototypeOf(t);e._visitInitHooks&&e._visitInitHooks.call(this,e),this._initHooksCalled=!0;var n=t._initHooks;if(n&&n!==e._initHooks)for(var r=0;r<n.length;r++)n[r].call(this)}},t.addInitHook=function(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];var i="function"==typeof t?t:function(){this[t].apply(this,n)},o=this.prototype,a=Object.getPrototypeOf(o);return o._initHooks&&o._initHooks!==a._initHooks||(o._initHooks=[]),o._initHooks.push(i),this},t.include=function(){for(var t=0;t<arguments.length;t++)d(this.prototype,t<0||arguments.length<=t?void 0:arguments[t]);return this},t.mergeOptions=function(t){var e=this.prototype,n=Object.getPrototypeOf(e);return e.options&&e.options!==n.options||(e.options=e.options?Object.create(e.options):{}),d(e.options,t),this},t}(),Sn={},An=function(t){return function(t){function e(){return t.apply(this,arguments)||this}return fe(e,t),e.registerJSONType=function(t){return t?(Sn[t]=this,this):this},e.getJSONClass=function(t){return t?Sn[t]:null},e.prototype.getJSONType=function(){if(void 0===this._jsonType){var t=Object.getPrototypeOf(this).constructor;for(var e in Sn)if(Sn[e]===t){this._jsonType=e;break}}if(!this._jsonType)throw new Error("Found an unregistered geometry class!");return this._jsonType},e}(t)};function En(t){return function(t){function e(){return t.apply(this,arguments)||this}fe(e,t);var n=e.prototype;return n.addHandler=function(t,e){if(!e)return this;if(this._handlers||(this._handlers=[]),this[t])return this[t].enable(),this;var n=this[t]=new e(this);return this._handlers.push(n),this.options[t]&&n.enable(),this},n.removeHandler=function(t){if(!t)return this;var e=this[t];if(e){var n=this._handlers.indexOf(e);n>=0&&this._handlers.splice(n,1),this[t].remove(),delete this[t]}return this},n._clearHandlers=function(){for(var t=0,e=this._handlers.length;t<e;t++)this._handlers[t].remove();this._handlers=[]},e}(t)}var Cn="touchstart mousedown",Tn={mousedown:"mousemove",touchstart:"touchmove",pointerdown:"touchmove",MSPointerDown:"touchmove"},In={mousedown:"mouseup",touchstart:"touchend",pointerdown:"touchend",MSPointerDown:"touchend"},Pn=function(t){function e(e,n){var r;return void 0===n&&(n={}),(r=t.call(this,null)||this).dom=e,r.options=n,r}fe(e,t);var n=e.prototype;return n.enable=function(){return this.dom?(this._onMouseDown=function(t){return this.onMouseDown(t)},rn(this.dom,Cn,this._onMouseDown,this),this):this},n.disable=function(){return this.dom?(this._offEvents(),on(this.dom,Cn,this._onMouseDown),delete this._onMouseDown,this):this},n.onMouseDown=function(t){if((this.options.rightclick||2!==t.button)&&!(t.touches&&t.touches.length>1)&&(!this.options.cancelOn||!0!==this.options.cancelOn(t))){var e=this.dom;e.setCapture?e.setCapture():window.captureEvents&&window.captureEvents(window.Event.MOUSEMOVE|window.Event.MOUSEUP),e.ondragstart=function(){return!1},delete this.moved;var n=t.touches?t.touches[0]:t;this.startPos=new me(n.clientX,n.clientY),rn(document,Tn[t.type],this.onMouseMove,this),rn(document,In[t.type],this.onMouseUp,this),this.options.ignoreMouseleave||rn(this.dom,"mouseleave",this.onMouseUp,this),this.fire("mousedown",{domEvent:t,mousePos:new me(n.clientX,n.clientY)})}},n.onMouseMove=function(t){if(t.touches&&t.touches.length>1)this.moved&&(this.interupted=!0,this.onMouseUp(t));else{var e=t.touches?t.touches[0]:t,n=new me(e.clientX,e.clientY).sub(this.startPos);(n.x||n.y)&&(this.moved?this.fire("dragging",{domEvent:t,mousePos:new me(e.clientX,e.clientY)}):(this.fire("dragstart",{domEvent:t,mousePos:this.startPos.copy()}),this.moved=!0))}},n.onMouseUp=function(t){var e=t.changedTouches?t.changedTouches[0]:t;this._offEvents();var n={domEvent:t};m(e.clientX)&&(n.mousePos=new me(parseInt(e.clientX,0),parseInt(e.clientY,0))),this.moved&&(n.interupted=this.interupted,this.fire("dragend",n),delete this.interupted,delete this.moved),this.fire("mouseup",n)},n._offEvents=function(){var t=this.dom;if(on(t,"mouseleave",this.onMouseUp,this),"undefined"!=typeof document&&"undefined"!=typeof window){for(var e in Tn)on(document,Tn[e],this.onMouseMove,this),on(document,In[e],this.onMouseUp,this);t.releaseCapture?t.releaseCapture():window.captureEvents&&window.captureEvents(window.Event.MOUSEMOVE|window.Event.MOUSEUP)}},e}(wn),Ln=function(t){function e(){return t.apply(this,arguments)||this}return fe(e,t),e.toNumberArrays=function(t){return Array.isArray(t)?D(t,(function(t){return[t.x,t.y]})):[t.x,t.y]},e.toCoordinates=function(t){if(m(t[0])&&m(t[1]))return new e(t);for(var n=[],r=0,i=t.length;r<i;r++){var o=t[r];Array.isArray(o)?m(o[0])?n.push(new e(o)):n.push(e.toCoordinates(o)):n.push(new e(o))}return n},e}(pe),Rn=function(){function t(t,e){this.type=t,this.properties=e}return t.createProj4=function(e){return new t("proj4",{proj:e})},t.fromProjectionCode=function(e){return e&&t[e=e.toUpperCase().replace(":","")]||null},t}();Rn.WGS84=Rn.createProj4("+proj=longlat +datum=WGS84 +no_defs"),Rn.EPSG4326=Rn.WGS84,Rn.EPSG3857=Rn.createProj4("+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 +wktext +no_defs"),Rn.IDENTITY=Rn.createProj4("+proj=identity +no_defs"),Rn.CGCS2000=Rn.createProj4("+proj=longlat +datum=CGCS2000"),Rn.EPSG4490=Rn.CGCS2000,Rn.BD09LL=Rn.createProj4("+proj=longlat +datum=BD09"),Rn.GCJ02=Rn.createProj4("+proj=longlat +datum=GCJ02");var On,kn=new me(0,0),Bn=new Ln(0,0),Dn=new Ln(0,0),Fn=new Ln(0,0),jn=new Ln(0,0),Un=new Ln(0,0),Nn=new Ln(0,0),zn=new Ln(0,0),Gn=new Ln(0,0),Hn=[],Wn=[],Vn=function(){function t(t,e,n,r){this._clazz=Ln;var i=arguments.length,o=i>0?arguments[i-1]:null;o&&o.unproject&&(this.projection=arguments[i-1]),this._dirty=!0,this._initialize(t,e,n,r)}var e=t.prototype;return e._initialize=function(t,e,n,r){if(this.xmin=null,this.xmax=null,this.ymin=null,this.ymax=null,!p(t)){var i=this.projection;m(t)&&m(e)&&m(n)&&m(r)?i?this.set(t,e,n,r):this.set(Math.min(t,n),Math.min(e,r),Math.max(t,n),Math.max(e,r)):Array.isArray(t)?i?this.set(t[0],t[1],t[2],t[3]):this.set(Math.min(t[0],t[2]),Math.min(t[1],t[3]),Math.max(t[0],t[2]),Math.max(t[1],t[3])):m(t.x)&&m(e.x)&&m(t.y)&&m(e.y)?i?this.set(t.x,t.y,e.x,e.y):(t.x>e.x?(this.xmin=e.x,this.xmax=t.x):(this.xmin=t.x,this.xmax=e.x),t.y>e.y?(this.ymin=e.y,this.ymax=t.y):(this.ymin=t.y,this.ymax=e.y)):m(t.xmin)&&m(t.xmax)&&m(t.ymin)&&m(t.ymax)&&this.set(t.xmin,t.ymin,t.xmax,t.ymax)}},e._add=function(t){return this._dirty=!0,p(t.x)?p(t.xmin)?p(t[0])||(this.xmin+=t[0],this.ymin+=t[1],this.xmax+=t[0],this.ymax+=t[1]):(this.xmin+=t.xmin,this.ymin+=t.ymin,this.xmax+=t.xmax,this.ymax+=t.ymax):(this.xmin+=t.x,this.ymin+=t.y,this.xmax+=t.x,this.ymax+=t.y),this},e.add=function(){var t=new this.constructor(this.xmin,this.ymin,this.xmax,this.ymax,this.projection);return t._add.apply(t,arguments)},e._scale=function(t){return this._dirty=!0,this.xmin*=t,this.ymin*=t,this.xmax*=t,this.ymax*=t,this},e._sub=function(t){return this._dirty=!0,p(t.x)?p(t.xmin)?p(t[0])||(this.xmin-=t[0],this.ymin-=t[1],this.xmax-=t[0],this.ymax-=t[1]):(this.xmin-=t.xmin,this.ymin-=t.ymin,this.xmax-=t.xmax,this.ymax-=t.ymax):(this.xmin-=t.x,this.ymin-=t.y,this.xmax-=t.x,this.ymax-=t.y),this},e._substract=function(){return this._sub.apply(this,arguments)},e.sub=function(){var t=new this.constructor(this.xmin,this.ymin,this.xmax,this.ymax,this.projection);return t._sub.apply(t,arguments)},e.substract=function(){return this.sub.apply(this,arguments)},e.round=function(){return new this.constructor(Math.round(this.xmin),Math.round(this.ymin),Math.round(this.xmax),Math.round(this.ymax),this.projection)},e._round=function(){return this._dirty=!0,this.xmin=Math.round(this.xmin),this.ymin=Math.round(this.ymin),this.xmax=Math.round(this.xmax),this.ymax=Math.round(this.ymax),this},e.getMin=function(t){return t?(t.set(this.xmin,this.ymin),t):new this._clazz(this.xmin,this.ymin)},e.getMax=function(t){return t?(t.set(this.xmax,this.ymax),t):new this._clazz(this.xmax,this.ymax)},e.getCenter=function(t){var e=(this.xmin+this.xmax)/2,n=(this.ymin+this.ymax)/2;return t?(t.set(e,n),t):new this._clazz(e,n)},e.isValid=function(){return!(p(this.xmin)||p(this.ymin)||p(this.xmax)||p(this.ymax))},e.equals=function(t){return this.xmin===t.xmin&&this.xmax===t.xmax&&this.ymin===t.ymin&&this.ymax===t.ymax},e.intersects=function(t){this._project(this),this._project(t);var e=Math.max(this.pxmin,t.pxmin),n=Math.max(this.pymin,t.pymin),r=Math.min(this.pxmax,t.pxmax),i=Math.min(this.pymax,t.pymax);return!(e>r||n>i)},e.within=function(t){return this._project(this),this._project(t),this.pxmin>=t.pxmin&&this.pxmax<=t.pxmax&&this.pymin>=t.pymin&&this.pymax<=t.pymax},e.contains=function(t){if(!t)return!1;this._project(this);var e=this.projection;if(e)if(void 0!==t.x){var n=Bn;Array.isArray(t)?(n.x=t[0],n.y=t[1]):(n.x=t.x,n.y=t.y),t=e.project(n,n)}else void 0!==t.xmin&&this._project(t);return(t.x||t.pxmin||0)>=this.pxmin&&(t.x||t.pxmax||0)<=this.pxmax&&(t.y||t.pymin||0)>=this.pymin&&(t.y||t.pymax||0)<=this.pymax},e.getWidth=function(){return Math.abs(this.xmax-this.xmin)},e.getHeight=function(){return Math.abs(this.ymax-this.ymin)},e.getSize=function(){return new ge(this.getWidth(),this.getHeight())},e.set=function(t,e,n,r){return this.xmin=t,this.ymin=e,this.xmax=n,this.ymax=r,this._dirty=!0,this},e.__combine=function(t){var e,n,r,i;void 0!==t.x&&(On.xmin=On.xmax=t.x,On.ymin=On.ymax=t.y,t=On),this._project(t),this._project(this),m(this.pxmin)?(e=Math.min(this.pxmin,t.pxmin),n=Math.min(this.pymin,t.pymin),r=Math.max(this.pxmax,t.pxmax),i=Math.max(this.pymax,t.pymax)):(e=t.pxmin,n=t.pymin,r=t.pxmax,i=t.pymax);var o=this.projection;if(o){Dn.set(e,n),Fn.set(r,i);var a=o.unproject(Dn,Dn),s=o.unproject(Fn,Fn);e=a.x,n=a.y,r=s.x,i=s.y}return Wn[0]=e,Wn[1]=n,Wn[2]=r,Wn[3]=i,Wn},e._combine=function(t){if(!t||t.isValid&&!t.isValid())return this;var e=this.__combine(t);return this.set(e[0],e[1],e[2],e[3]),this._dirty=!0,this},e.combine=function(t){if(!t||t.isValid&&!t.isValid())return this;var e=this.__combine(t);return new this.constructor(e[0],e[1],e[2],e[3],this.projection)},e.intersection=function(t){if(!this.intersects(t))return null;jn.x=Math.max(this.pxmin,t.pxmin),jn.y=Math.max(this.pymin,t.pymin),Un.x=Math.min(this.pxmax,t.pxmax),Un.y=Math.min(this.pymax,t.pymax);var e=jn,n=Un,r=this.projection;return r&&(e=r.unproject(e,e),n=r.unproject(n,n)),new this.constructor(e,n,r)},e.expand=function(t){var e,n;return m(t)?e=n=t:(e=t.width||t.x||t[0]||0,n=t.height||t.y||t[1]||0),new this.constructor(this.xmin-e,this.ymin-n,this.xmax+e,this.ymax+n,this.projection)},e._expand=function(t){var e,n;return m(t)?e=n=t:(e=t.width||t.x||t[0]||0,n=t.height||t.y||t[1]||0),this.xmin-=e,this.ymin-=n,this.xmax+=e,this.ymax+=n,this._dirty=!0,this},e.toJSON=function(){return{xmin:this.xmin,ymin:this.ymin,xmax:this.xmax,ymax:this.ymax}},e.toArray=function(){var t=this.xmin,e=this.ymin,n=this.xmax,r=this.ymax;return[new this._clazz([t,r]),new this._clazz([n,r]),new this._clazz([n,e]),new this._clazz([t,e]),new this._clazz([t,r])]},e.toString=function(){return this.xmin+","+this.ymin+","+this.xmax+","+this.ymax},e.copy=function(){return new this.constructor(this.xmin,this.ymin,this.xmax,this.ymax,this.projection)},e.convertTo=function(t,e){if(!this.isValid())return null;var n,r=e||new this.constructor;return e&&r.set(null,null,null,null),this._clazz===Ln?n=Nn:this._clazz===me&&(n=kn),n.x=this.xmin,n.y=this.ymax,r._combine(t(n)),n.x=this.xmax,r._combine(t(n)),n.y=this.ymin,r._combine(t(n)),n.x=this.xmin,r._combine(t(n)),r},e._project=function(t){if(t&&t.isValid()){var e=this.projection;if(e){if(t._dirty){zn.set(t.xmax,t.ymin),Gn.set(t.xmin,t.ymax),Hn[0]=zn,Hn[1]=Gn;var n=e.projectCoords(Hn),r=n[0],i=n[1];t.pxmin=Math.min(r.x,i.x),t.pymin=Math.min(r.y,i.y),t.pxmax=Math.max(r.x,i.x),t.pymax=Math.max(r.y,i.y)}delete t._dirty}else t.pxmin=t.xmin,t.pxmax=t.xmax,t.pymin=t.ymin,t.pymax=t.ymax}else t&&(t.pxmin=t.pxmax=t.pymin=t.pymax=null)},t}();On=new Vn(0,0,0,0);var Zn=function(t){function e(e,n,r,i){var o;return(o=t.call(this,e,n,r,i)||this)._clazz=me,o}return fe(e,t),e}(Vn),Qn=function(){function t(t){this.matrix=t}var e=t.prototype;return e.transform=function(t,e,n){var r=this.matrix[0]*(t.x-this.matrix[2])/e,i=-this.matrix[1]*(t.y-this.matrix[3])/e;return n?(n.x=r,n.y=i,n):new me(r,i)},e.untransform=function(t,e,n){var r=t.x*e/this.matrix[0]+this.matrix[2],i=t.y*e/-this.matrix[1]+this.matrix[3];return n?(n.x=r,n.y=i,n):new Ln(r,i)},t}(),Xn={project:function(){},unproject:function(){},projectCoords:function(t){var e=this;if(!t)return[];if(!Array.isArray(t))return this.project(t);if(0===t.length)return[];if(!this.isSphere())return D(t,this.project,this);if(Array.isArray(t[0]))return t.map((function(t){return e.projectCoords(t)}));for(var n,r,i,o,a,s,c=this.getCircum(),u=this.getSphereExtent(),l=u.sx,h=u.sy,f=t[0],d=[this.project(f)],p=1,m=t.length;p<m;p++)o=(i=t[p]).x-f.x,a=i.y-f.y,s=this.project(i),Math.abs(o)>180&&(void 0===n&&(n=i.x>f.x),n&&(s._add(-c.x*j(o)*l,0),i._add(-360*j(o),0))),Math.abs(a)>90&&(void 0===r&&(r=i.y<f.y),r&&(s._add(0,-c.y*j(a)*h),i._add(0,-180*j(a)))),f=i,d.push(s);return d},unprojectCoords:function(t){return t?Array.isArray(t)?D(t,this.unproject,this):this.unproject(t):[]},isSphere:function(){return!!this.sphere},isOutSphere:function(t){return!!this.isSphere()&&!this.getSphereExtent().contains(t)},wrapCoord:function(t){if(!this.isSphere())return t;var e=this.getSphereExtent(),n=new Ln(t);return e.contains(n)||(n.x=z(t.x,e.xmin,e.xmax),n.y=z(t.y,e.ymin,e.ymax)),n},getCircum:function(){if(!this.circum&&this.isSphere()){var t=this.getSphereExtent();this.circum={x:t.getWidth(),y:t.getHeight()}}return this.circum},getSphereExtent:function(){if(!this.extent&&this.isSphere()){var t=this.project(new Ln(180,90)),e=this.project(new Ln(-180,-90));this.extent=new Vn(e,t,this),this.extent.sx=t.x>e.x?1:-1,this.extent.sy=t.y>e.y?1:-1}return this.extent}},Yn={measureLength:function(t,e){if(!Array.isArray(t))return this.measureLenBetween(t,e);for(var n=0,r=0,i=t.length;r<i-1;r++)n+=this.measureLenBetween(t[r],t[r+1]);return n}},Jn=d({measure:"IDENTITY",measureLenBetween:function(t,e){if(!t||!e)return 0;try{return Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2))}catch(t){return 0}},measureArea:function(t){if(!Array.isArray(t))return 0;for(var e=0,n=0,r=t.length;n<r;n++){var i,o=t[n];i=n===r-1?t[0]:t[n+1],e+=o.x*i.y-o.y*i.x}return Math.abs(e/2)},locate:function(t,e,n){return t=new Ln(t.x,t.y),this._locate(t,e,n)},_locate:function(t,e,n){return t?(e||(e=0),n||(n=0),e||n?(t.x=t.x+e,t.y=t.y+n,t):t):null},rotate:function(t,e,n){return t=new Ln(t.x,t.y),this._rotate(t,e,n)},_rotate:function(){var t=new me(0,0);return function(e,n,r){return t.x=e.x-n.x,t.y=e.y-n.y,t._rotate(r*Math.PI/180),e.x=n.x+t.x,e.y=n.y+t.y,e}}()},Yn),qn=function(){function t(t){this.radius=t}var e=t.prototype;return e.measureLenBetween=function(t,e){if(!t||!e)return 0;var n=M(t.y),r=M(e.y),i=n-r,o=M(t.x)-M(e.x);return n=2*Math.asin(Math.sqrt(Math.pow(Math.sin(i/2),2)+Math.cos(n)*Math.cos(r)*Math.pow(Math.sin(o/2),2))),n*=this.radius,Math.round(1e5*n)/1e5},e.measureArea=function(t){var e,n=M(this.radius),r=0,i=t,o=i.length;if(o<3)return 0;for(e=0;e<o-1;e++){var a=i[e],s=i[e+1];r+=a.x*n*Math.cos(M(a.y))*s.y*n-s.x*n*Math.cos(M(s.y))*a.y*n}return o=i[e],i=i[0],r+=o.x*n*Math.cos(M(o.y))*i.y*n-i.x*n*Math.cos(M(i.y))*o.y*n,.5*Math.abs(r)},e.locate=function(t,e,n){return t=new Ln(t.x,t.y),this._locate(t,e,n)},e._locate=function(t,e,n){if(!t)return null;if(e||(e=0),n||(n=0),!e&&!n)return t;var r,i,o=M(t.y);if(0!==n){var a=Math.abs(n);i=z(180*(o+=2*Math.sin(a/(2*this.radius))*(n>0?1:-1))/Math.PI,-90,90)}else i=t.y;if(0!==e){var s=Math.abs(e),c=M(t.x);r=z(180*(c+=2*Math.sqrt(Math.pow(Math.sin(s/(2*this.radius)),2)/Math.pow(Math.cos(o),2))*(e>0?1:-1))/Math.PI,-180,180)}else r=t.x;return t.x=r,t.y=i,t},e.rotate=function(t,e,n){return t=new Ln(t),this._rotate(t,e,n)},e._rotate=function(t,e,n){var r=function(t,e,n){var r;return void 0===n&&(n={}),(r=n.final?Kn(e,t):Kn(t,e))>180?-(360-r):r}(e,t)-n,i=this.measureLenBetween(e,t);return t.x=e.x,t.y=e.y,function(t,e,n,r){var i=e/r,o=t.x*Math.PI/180,a=M(t.y),s=M(n),c=i*Math.cos(s),u=a+c;Math.abs(u)>Math.PI/2&&(u=u>0?Math.PI-u:-Math.PI-u);var l=Math.log(Math.tan(u/2+Math.PI/4)/Math.tan(a/2+Math.PI/4)),h=Math.abs(l)>1e-11?c/l:Math.cos(a),f=i*Math.sin(s)/h,d=o+f;return t.x=(180*d/Math.PI+540)%360-180,t.y=180*u/Math.PI,t}(t,i,r,this.radius)},t}();function Kn(t,e){var n=M(t.y),r=M(e.y),i=M(e.x-t.x);i>Math.PI&&(i-=2*Math.PI),i<-Math.PI&&(i+=2*Math.PI);var o=Math.log(Math.tan(r/2+Math.PI/4)/Math.tan(n/2+Math.PI/4));return(S(Math.atan2(i,o))+360)%360}var $n=d({measure:"EPSG:4326",sphere:new qn(6378137),measureLenBetween:function(){return this.sphere.measureLenBetween.apply(this.sphere,arguments)},measureArea:function(){return this.sphere.measureArea.apply(this.sphere,arguments)},_locate:function(){return this.sphere._locate.apply(this.sphere,arguments)},locate:function(){return this.sphere.locate.apply(this.sphere,arguments)},_rotate:function(){return this.sphere._rotate.apply(this.sphere,arguments)},rotate:function(){return this.sphere.rotate.apply(this.sphere,arguments)}},Yn),tr=d({measure:"BAIDU",sphere:new qn(6370996.81),measureLenBetween:function(){return this.sphere.measureLenBetween.apply(this.sphere,arguments)},measureArea:function(){return this.sphere.measureArea.apply(this.sphere,arguments)},_locate:function(){return this.sphere._locate.apply(this.sphere,arguments)},locate:function(){return this.sphere.locate.apply(this.sphere,arguments)},_rotate:function(){return this.sphere._rotate.apply(this.sphere,arguments)},rotate:function(){return this.sphere.rotate.apply(this.sphere,arguments)}},Yn),er=$n,nr={};function rr(t){nr[t.measure]=t}rr(Jn),rr($n),rr(tr);var ir,or={getInstance:function(t){if(!t)return er;for(var e in nr)if(x(nr,e)){var n=nr[e].measure;if(!n)continue;if(t.toLowerCase()===n.toLowerCase())return nr[e]}return null}},ar=Object.freeze({Identity:Jn,DEFAULT:er,Measurer:or,WGS84Sphere:$n,BaiduSphere:tr}),sr=d({},Xn,{code:"EPSG:3857",rad:Math.PI/180,metersPerDegree:6378137*Math.PI/180,maxLatitude:85.0511287798,project:function(t,e){var n=this.rad,r=this.metersPerDegree,i=this.maxLatitude,o=t.x,a=Math.max(Math.min(i,t.y),-i),s=o*r,c=(0===a?0:Math.log(Math.tan((90+a)*n/2))/n)*r;return e?(e.x=s,e.y=c,e):new Ln(s,c)},unproject:function(t,e){var n,r=this.rad,i=this.metersPerDegree,o=t.x/i,a=t.y;0===a?n=0:(n=a/i,n=(2*Math.atan(Math.exp(n*r))-Math.PI/2)/r),Math.abs(Math.abs(o)-180)<1e-7&&(o=180*j(o)),Math.abs(Math.abs(n)-this.maxLatitude)<1e-7&&(n=j(n)*this.maxLatitude);var s=z(o,-180,180),c=z(n,-this.maxLatitude,this.maxLatitude);return e?(e.x=s,e.y=c,e):new Ln(s,c)}},$n),cr=d({},Xn,{code:"EPSG:4326",project:function(t,e){return e?(e.x=t.x,e.y=t.y,e):new Ln(t)},unproject:function(t,e){return e?(e.x=t.x,e.y=t.y,e):new Ln(t)}},$n),ur=d({},cr,{code:"EPSG:4490"}),lr=d({},Xn,{code:"BAIDU",project:function(t,e){return this.convertLL2MC(t,e)},unproject:function(t,e){return this.convertMC2LL(t,e)}},tr,{EARTHRADIUS:6370996.81,MCBAND:[12890594.86,8362377.87,5591021,3481989.83,1678043.12,0],LLBAND:[75,60,45,30,15,0],MC2LL:[[1.410526172116255e-8,898305509648872e-20,-1.9939833816331,200.9824383106796,-187.2403703815547,91.6087516669843,-23.38765649603339,2.57121317296198,-.03801003308653,17337981.2],[-7.435856389565537e-9,8983055097726239e-21,-.78625201886289,96.32687599759846,-1.85204757529826,-59.36935905485877,47.40033549296737,-16.50741931063887,2.28786674699375,10260144.86],[-3.030883460898826e-8,898305509983578e-20,.30071316287616,59.74293618442277,7.357984074871,-25.38371002664745,13.45380521110908,-3.29883767235584,.32710905363475,6856817.37],[-1.981981304930552e-8,8983055099779535e-21,.03278182852591,40.31678527705744,.65659298677277,-4.44255534477492,.85341911805263,.12923347998204,-.04625736007561,4482777.06],[3.09191371068437e-9,8983055096812155e-21,6995724062e-14,23.10934304144901,-.00023663490511,-.6321817810242,-.00663494467273,.03430082397953,-.00466043876332,2555164.4],[2.890871144776878e-9,8983055095805407e-21,-3.068298e-8,7.47137025468032,-353937994e-14,-.02145144861037,-1234426596e-14,.00010322952773,-323890364e-14,826088.5]],LL2MC:[[-.0015702102444,111320.7020616939,0x60e374c3105a3,-0x24bb4115e2e164,0x5cc55543bb0ae8,-0x7ce070193f3784,0x5e7ca61ddf8150,-0x261a578d8b24d0,0x665d60f3742ca,82.5],[.0008277824516172526,111320.7020463578,647795574.6671607,-4082003173.641316,10774905663.51142,-15171875531.51559,12053065338.62167,-5124939663.577472,913311935.9512032,67.5],[.00337398766765,111320.7020202162,4481351.045890365,-23393751.19931662,79682215.47186455,-115964993.2797253,97236711.15602145,-43661946.33752821,8477230.501135234,52.5],[.00220636496208,111320.7020209128,51751.86112841131,3796837.749470245,992013.7397791013,-1221952.21711287,1340652.697009075,-620943.6990984312,144416.9293806241,37.5],[-.0003441963504368392,111320.7020576856,278.2353980772752,2485758.690035394,6070.750963243378,54821.18345352118,9540.606633304236,-2710.55326746645,1405.483844121726,22.5],[-.0003218135878613132,111320.7020701615,.00369383431289,823725.6402795718,.46104986909093,2351.343141331292,1.58060784298199,8.77738589078284,.37238884252424,7.45]],convertMC2LL:function(t,e){for(var n,r=0,i=this.MCBAND.length;r<i;r++)if(Math.abs(t.y)>=this.MCBAND[r]){n=this.MC2LL[r];break}return this.convertor(t,n,e)},convertLL2MC:function(t,e){var n,r,i;t.x=this.getLoop(t.x,-180,180),t.y=this.getRange(t.y,-74,74);var o=new Ln(t.x,t.y);for(r=0,i=this.LLBAND.length;r<i;r++)if(o.y>=this.LLBAND[r]){n=this.LL2MC[r];break}if(!n)for(r=this.LLBAND.length-1;r>=0;r--)if(o.y<=-this.LLBAND[r]){n=this.LL2MC[r];break}return this.convertor(t,n,e)},convertor:function(t,e,n){if(!t||!e)return null;var r=e[0]+e[1]*Math.abs(t.x),i=Math.abs(t.y)/e[9],o=e[2]+e[3]*i+e[4]*i*i+e[5]*i*i*i+e[6]*i*i*i*i+e[7]*i*i*i*i*i+e[8]*i*i*i*i*i*i;return r*=t.x<0?-1:1,o*=t.y<0?-1:1,n?(n.x=r,n.y=o,n):new Ln(r,o)},toRadians:function(t){return Math.PI*t/180},toDegrees:function(t){return 180*t/Math.PI},getRange:function(t,e,n){return null!=e&&(t=Math.max(t,e)),null!=n&&(t=Math.min(t,n)),t},getLoop:function(t,e,n){if(t===1/0)return n;if(t===-1/0)return e;for(;t>n;)t-=n-e;for(;t<e;)t+=n-e;return t}}),hr=d({},Xn,{code:"IDENTITY",project:function(t,e){return e?(e.x=t.x,e.y=t.y,e):t.copy()},unproject:function(t,e){return e?(e.x=t.x,e.y=t.y,e):t.copy()}},Jn),fr=sr,dr=Object.freeze({EPSG3857:sr,DEFAULT:fr,EPSG4326:cr,EPSG4490:ur,BAIDU:lr,IDENTITY:hr,Common:Xn}),pr=function(t){return function(t){function e(){return t.apply(this,arguments)||this}return fe(e,t),e.registerRenderer=function(t,e){var n=this.prototype,r=Object.getPrototypeOf(n);return n._rendererClasses&&n._rendererClasses!==r._rendererClasses||(n._rendererClasses=n._rendererClasses?Object.create(n._rendererClasses):{}),n._rendererClasses[t.toLowerCase()]=e,this},e.getRendererClass=function(t){var e=this.prototype;return e._rendererClasses?e._rendererClasses[t.toLowerCase()]:null},e}(t)},mr=function(t){function e(e){var n;return(n=t.call(this)||this).layer=e,n._painted=!1,n._drawTime=0,n.setToRedraw(),n}fe(e,t);var n=e.prototype;return n.render=function(t){this.prepareRender(),this.getMap()&&this.layer.isVisible()&&(this.resources||(this.resources=new gr),this.checkAndDraw(this._tryToDraw,t))},n.checkAndDraw=function(t){for(var e=this,n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];if(this.checkResources){var o=this.checkResources();o.length>0?(this._loadingResource=!0,this.loadResources(o).then((function(){e._loadingResource=!1,e.layer&&(e.layer.fire("resourceload"),e.setToRedraw())}))):t.call.apply(t,[this].concat(r))}else t.call.apply(t,[this].concat(r))},n.testIfNeedRedraw=function(){var t=this.getMap();return!(this._loadingResource||!this._toRedraw&&(t.isInteracting()&&!this.drawOnInteracting||!this.needToRedraw()))},n.needToRedraw=function(){var t=this.getMap();return!(!t.isInteracting()&&!t.getRenderer().isViewChanged()||!t.getPitch()&&t.isMoving()&&!t.isZooming()&&!t.isRotating()&&!this.layer.options.forceRenderOnMoving)},n.onSkipDrawOnInteracting=function(){},n.isLoadingResource=function(){return this._loadingResource},n.isRenderComplete=function(){return!!this._renderComplete},n.mustRenderOnInteracting=function(){return!this._painted},n.setToRedraw=function(){return this._toRedraw=!0,this},n.setCanvasUpdated=function(){return this._canvasUpdated=!0,this},n.isCanvasUpdated=function(){return!!this._canvasUpdated},n.remove=function(){this.onRemove(),delete this._loadingResource,delete this.southWest,delete this.canvas,delete this.context,delete this.canvasExtent2D,delete this._extent2D,delete this.resources,delete this.layer},n.onRemove=function(){},n.onAdd=function(){},n.getMap=function(){return this.layer?this.layer.getMap():null},n.getCanvasImage=function(){var t=this.getMap();if(this._canvasUpdated=!1,this._renderZoom!==t.getZoom()||!this.canvas||!this._extent2D)return null;if(this.isBlank())return null;if(this.layer.isEmpty&&this.layer.isEmpty())return null;var e=t._pointToContainerPoint(this.southWest)._add(0,-t.height);return{image:this.canvas,layer:this.layer,point:e}},n.clear=function(){this.clearCanvas()},n.isBlank=function(){return!this._painted},n.show=function(){this.setToRedraw()},n.hide=function(){this.clear(),this.setToRedraw()},n.setZIndex=function(){this.setToRedraw()},n.hitDetect=function(t){if(!this.context||this.layer.isEmpty&&this.layer.isEmpty()||this.isBlank()||this._errorThrown)return!1;var e=this.getMap(),n=e.getDevicePixelRatio(),r=e.getSize();if(t.x<0||t.x>r.width*n||t.y<0||t.y>r.height*n)return!1;try{if(this.context.getImageData(n*t.x,n*t.y,1,1).data[3]>0)return!0}catch(t){return this._errorThrown||(console&&console.warn("hit detect failed with tainted canvas, some geometries have external resources in another domain:\n",t),this._errorThrown=!0),!1}return!1},n.loadResources=function(t){this.resources||(this.resources=new gr);var e=this.resources,n=[];if(H(t))for(var r={},i=t.length-1;i>=0;i--){var o=t[i];o&&o.length&&!r[o.join("-")]&&(r[o.join("-")]=1,e.isResourceLoaded(o,!0)||n.push(new _n(this._promiseResource(o))))}return _n.all(n)},n.prepareRender=function(){delete this._renderComplete;var t=this.getMap();this._renderZoom=t.getZoom(),this.canvasExtent2D=this._extent2D=t._get2DExtent(),this.southWest=t._containerPointToPoint(new me(0,t.height))},n.createCanvas=function(){if(!this.canvas){var t=this.getMap(),e=t.getSize(),n=t.getDevicePixelRatio(),r=n*e.width,i=n*e.height;if(this.layer._canvas){var o=this.layer._canvas;o.width=r,o.height=i,o.style&&(o.style.width=e.width+"px",o.style.height=e.height+"px"),this.canvas=this.layer._canvas}else this.canvas=hn.createCanvas(r,i,t.CanvasClass);this.onCanvasCreate()}},n.onCanvasCreate=function(){},n.createContext=function(){if(!(this.gl&&this.gl.canvas===this.canvas||this.context)&&(this.context=this.canvas.getContext("2d"),this.context)){this.layer.options.globalCompositeOperation&&(this.context.globalCompositeOperation=this.layer.options.globalCompositeOperation);var t=this.getMap().getDevicePixelRatio();1!==t&&this.context.scale(t,t)}},n.resetCanvasTransform=function(){if(this.context){var t=this.getMap().getDevicePixelRatio();this.context.setTransform(t,0,0,t,0,0)}},n.resizeCanvas=function(t){var e=this.canvas;if(e){var n=t||this.getMap().getSize(),r=this.getMap().getDevicePixelRatio();e.width===r*n.width&&e.height===r*n.height||(e.height=r*n.height,e.width=r*n.width,1!==r&&this.context&&this.context.scale(r,r),this.layer._canvas&&e.style&&(e.style.width=n.width+"px",e.style.height=n.height+"px"))}},n.clearCanvas=function(){this.context&&hn.clearRect(this.context,0,0,this.canvas.width,this.canvas.height)},n.prepareCanvas=function(){this.canvas?(this.resetCanvasTransform(),this.clearCanvas(),this.resizeCanvas()):(this.createCanvas(),this.createContext(),this.layer.onCanvasCreate(),this.layer.fire("canvascreate",{context:this.context,gl:this.gl})),delete this._maskExtent;var t=this.layer.getMask();if(!t)return this.layer.fire("renderstart",{context:this.context,gl:this.gl}),null;var e=this._maskExtent=t._getMaskPainter().get2DExtent();return e.intersects(this._extent2D),this.layer.fire("renderstart",{context:this.context,gl:this.gl}),e},n.clipCanvas=function(t){var e=this.layer.getMask();if(!e)return!1;var n=this.southWest,r=this.getMap();this.southWest=r._containerPointToPoint(new me(0,r.height)),t.save();var i=r.getDevicePixelRatio();if(1!==i&&(t.save(),t.scale(i,i)),e.getGeometries){t.isMultiClip=!0;var o=e.getGeometries()||[];t.beginPath(),o.forEach((function(e){e._getMaskPainter().paint(null,t)})),t.stroke(),delete t.isMultiClip}else e._getMaskPainter().paint(null,t);return 1!==i&&t.restore(),t.clip(),this.southWest=n,!0},n.getViewExtent=function(){return{extent:this._extent2D,maskExtent:this._maskExtent,zoom:this._renderZoom,southWest:this.southWest}},n.completeRender=function(){this.getMap()&&(this._renderComplete=!0,this.layer.fire("renderend",{context:this.context,gl:this.gl}),this.setCanvasUpdated())},n.getEvents=function(){return{_zoomstart:this.onZoomStart,_zooming:this.onZooming,_zoomend:this.onZoomEnd,_resize:this.onResize,_movestart:this.onMoveStart,_moving:this.onMoving,_moveend:this.onMoveEnd,_dragrotatestart:this.onDragRotateStart,_dragrotating:this.onDragRotating,_dragrotateend:this.onDragRotateEnd,_spatialreferencechange:this.onSpatialReferenceChange}},n.onZoomStart=function(){},n.onZoomEnd=function(){this.setToRedraw()},n.onZooming=function(){},n.onMoveStart=function(){},n.onMoving=function(){},n.onMoveEnd=function(){this.setToRedraw()},n.onResize=function(){delete this._extent2D,this.resizeCanvas(),this.setToRedraw()},n.onDragRotateStart=function(){},n.onDragRotating=function(){},n.onDragRotateEnd=function(){this.setToRedraw()},n.onSpatialReferenceChange=function(){},n.getDrawTime=function(){return this._drawTime},n._tryToDraw=function(t){this._toRedraw=!1,!this.canvas&&this.layer.isEmpty&&this.layer.isEmpty()?this._renderComplete=!0:this._drawAndRecord(t)},n._drawAndRecord=function(t){if(this.getMap()){var e=this._painted;this._painted=!0;var n=f();this.draw(t),n=f()-n,this._drawTime=e?n:n/2,e&&this.layer&&this.layer.options.logDrawTime&&console.log(this.layer.getId(),"frameTimeStamp:",t,"drawTime:",this._drawTime)}},n._promiseResource=function(t){var e=this,n=this.resources,r=this.layer.options.crossOrigin;return function(i){if(n.isResourceLoaded(t,!0))i(t);else{var o=new Image;p(r)||(o.crossOrigin=r),T(t[0])&&!C&&(t[1]&&(t[1]*=2),t[2]&&(t[2]*=2)),o.onload=function(){e._cacheResource(t,o),i(t)},o.onabort=function(e){console&&console.warn("image loading aborted: "+t[0]),e&&console&&console.warn(e),i(t)},o.onerror=function(e){e&&"undefined"!=typeof console&&console.warn(e),n.markErrorResource(t),i(t)},I(o,t)}}},n._cacheResource=function(t,e){if(this.layer&&this.resources){var n=t[1],r=t[2];if(this.layer.options.cacheSvgOnCanvas&&1===T(t[0])&&(he.edge||he.ie)){p(n)&&(n=e.width||this.layer.options.defaultIconSize[0]),p(r)&&(r=e.height||this.layer.options.defaultIconSize[1]);var i=hn.createCanvas(n,r);hn.image(i.getContext("2d"),e,0,0,n,r),e=i}this.resources.addResource(t,e)}},e}(Mn),gr=function(){function t(){this.resources={},this._errors={}}var e=t.prototype;return e.addResource=function(t,e){this.resources[t[0]]={image:e,width:+t[1],height:+t[2]}},e.isResourceLoaded=function(t,e){if(!t)return!1;var n=this._getImgUrl(t);if(this._errors[n])return!0;var r=this.resources[n];return!(!r||e&&T(t[0])&&(+t[1]>r.width||+t[2]>r.height))},e.getImage=function(t){var e=this._getImgUrl(t);return!this.isResourceLoaded(t)||this._errors[e]?null:this.resources[e].image},e.markErrorResource=function(t){this._errors[this._getImgUrl(t)]=1},e.merge=function(t){if(!t)return this;for(var e in t.resources){var n=t.resources[e];this.addResource([e,n.width,n.height],n.image)}return this},e.forEach=function(t){if(!this.resources)return this;for(var e in this.resources)x(this.resources,e)&&t(e,this.resources[e]);return this},e._getImgUrl=function(t){return Array.isArray(t)?t[0]:t},t}();function vr(t,e,n,r){for(var i,o=[],a=0,s=0,c=t.length;s<c-1;s++)(i=yr(t[s],t[s+1],e,s,n,r))&&(o[a]=o[a]||[],o[a].push({point:i[0],index:s}),i[1]===t[s+1]&&s!==c-2||(o[a].push({point:i[1],index:s+1}),a++));return o}function yr(t,e,n,r,i,o){var a,s,c,u=r?ir:xr(t,n),l=xr(e,n);for(ir=l;;){if(!(u|l))return[t,e];if(u&l)return!1;if(o)return[t,e];c=xr(s=br(t,e,a=u||l,n,i),n),a===u?(t=s,u=c):(e=s,l=c)}}function _r(t,e,n){var r,i,o,a,s,c,u,l,h,f=[1,4,2,8];for(i=0,u=t.length;i<u;i++)t[i]._code=xr(t[i],e);for(a=0;a<4;a++){for(l=f[a],r=[],i=0,o=(u=t.length)-1;i<u;o=i++)s=t[i],c=t[o],s._code&l?c._code&l||((h=br(c,s,l,e,n))._code=xr(h,e),r.push(h)):(c._code&l&&((h=br(c,s,l,e,n))._code=xr(h,e),r.push(h)),r.push(s));t=r}return t}function br(t,e,n,r,i){var o,a,s=e.x-t.x,c=e.y-t.y,u=r.getMin(),l=r.getMax();8&n?(o=t.x+s*(l.y-t.y)/c,a=l.y):4&n?(o=t.x+s*(u.y-t.y)/c,a=u.y):2&n?(o=l.x,a=t.y+c*(l.x-t.x)/s):1&n&&(o=u.x,a=t.y+c*(u.x-t.x)/s);var h=new me(o,a);return i&&h._round(),h}function xr(t,e){var n=0;return t.x<e.getMin().x?n|=1:t.x>e.getMax().x&&(n|=2),t.y<e.getMin().y?n|=4:t.y>e.getMax().y&&(n|=8),n}function wr(t,e,n,r){t=new me(t);var i,o,a,s=Math.abs(n.x-e.x),c=Math.abs(n.y-e.y),u=Math.sqrt(Math.abs(s*s-c*c));return s>=c?(i=new me(e.x-u,e.y),o=new me(e.x+u,e.y),a=2*s):(i=new me(e.x,e.y-u),o=new me(e.x,e.y+u),a=2*c),t.distanceTo(i)+t.distanceTo(o)<=a+2*r}var Mr=function(){function t(){}var e=t.prototype;return e.getMap=function(){return this.geometry.getMap()},e.getPainter=function(){return this.painter},e.isDynamicSize=function(){return!1},t.testColor=function(t){return!(!t||!y(t))&&l.indexOf(t)>=0},t}(),Sr=function(t){function e(){return t.apply(this,arguments)||this}fe(e,t);var n=e.prototype;return n._prepareContext=function(t){m(this.symbol.opacity)?t.globalAlpha!==this.symbol.opacity&&(t.globalAlpha=this.symbol.opacity):1!==t.globalAlpha&&(t.globalAlpha=1)},n.prepareCanvas=function(t,e,n){hn.prepareCanvas(t,e,n,this.getPainter().isHitTesting())},n.remove=function(){},n.setZIndex=function(){},n.show=function(){},n.hide=function(){},n._defineStyle=function(t){return function(){var e=this,n=[],r={};return Mt(t,(function(){var t=e.getMap();return function(t,e,n){return t[0]=e,t[1]=n,t}(n,t.getZoom(),d({},e.geometry.getProperties(),function(t,e,n,r){return t["{bearing}"]=e,t["{pitch}"]=n,t["{zoom}"]=r,t}(r,t.getBearing(),t.getPitch(),t.getZoom())))}))}.bind(this)()},e}(Mr),Ar=new me(0,0),Er=new me(0,0),Cr=function(t){function e(e,n,r){var i;return(i=t.call(this)||this).symbol=e,i.geometry=n,i.painter=r,i}fe(e,t);var n=e.prototype;return n.get2DExtent=function(){for(var t=this.getMap(),e=t.getGLZoom(),n=new Zn,r=this._getRenderPoints()[0],i=r.length-1;i>=0;i--)r[i]&&n._combine(t._pointToPoint(r[i],e));return n},n.isDynamicSize=function(){var t=this.symbol;return bt(t.markerWidth)||bt(t.markerHeight)||bt(t.textSize)},n._rotateExtent=function(t,e){return t.convertTo((function(t){return t._rotate(e)}))},n._getRenderPoints=function(){var t=this.getPainter().isSpriting()?"center":this.getPlacement();return this.getPainter().getRenderPoints(t)},n._getRenderContainerPoints=function(t){var e=this.getPainter(),n=this._getRenderPoints()[0];if(e.isSpriting())return n;var r=this.getDxDy(),i=this.painter._pointContainerPoints(n,r.x,r.y,t,!0,this.getPlacement());if(!i||!Array.isArray(i[0]))return i;for(var o=[],a=0,s=i.length;a<s;a++)for(var c=0,u=i[a].length;c<u;c++)o.push(i[a][c]);return o},n._getRotationAt=function(t){var e=this.getRotation();e||(e=0);var n=this._getRenderPoints()[1];if(!n||!n[t])return e;var r=this.getMap(),i=n[t][0],o=n[t][1];if(r.isTransforming()){var a=r.getGLZoom();return i=r._pointToContainerPoint(n[t][0],a,0,Ar),o=r._pointToContainerPoint(n[t][1],a,0,Er),e+q(i.x,i.y,o.x,o.y)}return e+-q(i.x,i.y,o.x,o.y)},n._rotate=function(t,e,n){if(n){var r=this.getDxDy(),i=e.sub(r);return t.save(),t.translate(i.x,i.y),t.rotate(n),this.getDxDy()}return null},e}(Sr),Tr=function(t){function e(n,r,i){var o;(o=t.call(this,n,r,i)||this)._dynamic=xt(n),o.style=o._defineStyle(o.translate()),o.strokeAndFill=o._defineStyle(e.translateLineAndFill(o.style));var a=o.strokeAndFill.lineWidth;return o.padding=a%2==0?2:1.5,o}fe(e,t),e.test=function(t){return!!t&&!(!p(t.markerFile)||p(t.markerType)||"path"===t.markerType)};var n=e.prototype;return n.symbolize=function(t,e){var n=this.style;if(this.painter.isHitTesting()||0!==n.markerWidth&&0!==n.markerHeight&&(0!==n.polygonOpacity||0!==n.lineOpacity)){var r=this._getRenderContainerPoints();H(r)&&(this._prepareContext(t),this.getPainter().isSpriting()||this.geometry.getLayer().getMask()===this.geometry||this._dynamic||!1===this.geometry.getLayer().options.cacheVectorOnCanvas?this._drawMarkers(t,r,e):this._drawMarkersWithCache(t,r,e))}},n.getDxDy=function(){var t=this.style,e=t.markerDx,n=t.markerDy;return new me(e,n)},n._drawMarkers=function(t,e,n){var r=this.strokeAndFill;Rt(r.lineColor)||Rt(r.polygonFill)||this.prepareCanvas(t,r,n);for(var i=e.length-1;i>=0;i--){var o=e[i],a=this._rotate(t,o,this._getRotationAt(i));a&&(o=a),this._drawVectorMarker(t,o,n),a&&t.restore()}},n._drawMarkersWithCache=function(t,e,n){var r=this._stampSymbol(),i=n.getImage(r);i||(i=this._createMarkerImage(t,n),n.addResource([r,i.width,i.height],i));for(var o=this._getAnchor(i.width,i.height),a=e.length-1;a>=0;a--){var s=e[a],c=this._rotate(t,s,this._getRotationAt(a));c&&(s=c),hn.image(t,i,s.x+o.x,s.y+o.y),c&&t.restore()}},n._calMarkerSize=function(){if(!this._size){var t=this.strokeAndFill.lineWidth,e=2*(this.symbol.shadowBlur||0),n=Math.round(this.style.markerWidth+t+2*e+2*this.padding),r=Math.round(this.style.markerHeight+t+2*e+2*this.padding);if(bt(this.symbol.markerWidth)||bt(this.symbol.markerHeight))return[n,r];this._size=[n,r]}return this._size},n._createMarkerImage=function(t,e){var n=t.canvas.constructor,r=this._calMarkerSize(),i=hn.createCanvas(r[0],r[1],n),o=this._getCacheImageAnchor(r[0],r[1]),a=i.getContext("2d");return Rt(this.strokeAndFill.lineColor)||Rt(this.strokeAndFill.polygonFill)||this.prepareCanvas(a,this.strokeAndFill,e),this._drawVectorMarker(a,o,e),i},n._stampSymbol=function(){return this._stamp||(this._stamp=[this.style.markerType,Rt(this.style.markerFill)?Ot(this.style.markerFill):this.style.markerFill,this.style.markerFillOpacity,this.style.markerFillPatternFile,Rt(this.style.markerLineColor)?Ot(this.style.markerLineColor):this.style.markerLineColor,this.style.markerLineWidth,this.style.markerLineOpacity,this.style.markerLineDasharray?this.style.markerLineDasharray.join(","):"",this.style.markerLinePatternFile,this.style.markerWidth,this.style.markerHeight,this.style.markerHorizontalAlignment,this.style.markerVerticalAlignment].join("_")),this._stamp},n._getAnchor=function(t,e){var n=2*(this.symbol.shadowBlur||0)+this.padding,r=Ce(new ge(t,e),this.style.markerHorizontalAlignment,this.style.markerVerticalAlignment);return r.x!==-t/2&&(r.x-=j(r.x+t/2)*n),r.y!==-e/2&&(r.y-=j(r.y+e/2)*n),r},n._getCacheImageAnchor=function(t,e){var n=2*(this.symbol.shadowBlur||0)+this.padding,r=this.style.markerType;return"bar"===r||"pie"===r||"pin"===r?new me(t/2,e-n):"rectangle"===r?new me(n,n):new me(t/2,e/2)},n._getGraidentExtent=function(t){var e=new Zn,n=this.getDxDy(),r=this.getFixedExtent();if(Array.isArray(t))for(var i=t.length-1;i>=0;i--)e._combine(t[i]);else e._combine(t);return e.xmin+=r.xmin-n.x,e.ymin+=r.ymin-n.y,e.xmax+=r.xmax-n.x,e.ymax+=r.ymax-n.y,e},n._drawVectorMarker=function(t,n,r){var i,o=this.style,a=this.strokeAndFill,s=o.markerType.toLowerCase(),c=e._getVectorPoints(s,o.markerWidth,o.markerHeight),u=a.lineOpacity,l=a.polygonOpacity;(Rt(a.lineColor)||Rt(a.polygonFill))&&(Rt(a.lineColor)&&(i=this._getGraidentExtent(n),a.lineGradientExtent=i.expand(a.lineWidth)),Rt(a.polygonFill)&&(i||(i=this._getGraidentExtent(n)),a.polygonGradientExtent=i),this.prepareCanvas(t,a,r));var h=o.markerWidth,f=o.markerHeight,d=o.markerLineWidth/2;if("ellipse"===s)hn.ellipse(t,n,h/2,f/2,f/2,u,l);else if("cross"===s||"x"===s){for(var p=c.length-1;p>=0;p--)c[p]._add(n);hn.path(t,c.slice(0,2),u),hn.path(t,c.slice(2,4),u)}else if("diamond"===s||"bar"===s||"square"===s||"rectangle"===s||"triangle"===s){"bar"===s?n=n.add(0,-d):"rectangle"===s&&(n=n.add(d,d));for(var m=c.length-1;m>=0;m--)c[m]._add(n);hn.polygon(t,c,u,l)}else if("pin"===s){n=n.add(0,-d);for(var g=c.length-1;g>=0;g--)c[g]._add(n);var v=t.lineCap;t.lineCap="round",hn.bezierCurveAndFill(t,c,u,l),t.lineCap=v}else{if("pie"!==s)throw new Error("unsupported markerType: "+s);n=n.add(0,d);var y=180*Math.atan(h/2/f)/Math.PI,_=t.lineCap;t.lineCap="round",hn.sector(t,n,f,[90-y,90+y],u,l),t.lineCap=_}},n.getPlacement=function(){return this.symbol.markerPlacement},n.getRotation=function(){var t=this.style.markerRotation;return m(t)?-t*Math.PI/180:null},n.getFixedExtent=function(){var t=this.getDxDy(),e=2*this.padding,n=this._calMarkerSize().map((function(t){return t-e})),r=this._getAnchor(n[0],n[1]),i=new Zn(t.add(0,0),t.add(n[0],n[1]));i._add(r);var o=this.getRotation();return o&&(i=this._rotateExtent(i,o)),i},n.translate=function(){var t,e,n=this.symbol,r={markerType:F(n.markerType,"ellipse"),markerFill:F(n.markerFill,"#00f"),markerFillOpacity:F(n.markerFillOpacity,1),markerFillPatternFile:F(n.markerFillPatternFile,null),markerLineColor:F(n.markerLineColor,"#000"),markerLineWidth:F(n.markerLineWidth,1),markerLineOpacity:F(n.markerLineOpacity,1),markerLineDasharray:F(n.markerLineDasharray,[]),markerLinePatternFile:F(n.markerLinePatternFile,null),markerDx:F(n.markerDx,0),markerDy:F(n.markerDy,0),markerWidth:F(n.markerWidth,10),markerHeight:F(n.markerHeight,10),markerRotation:F(n.markerRotation,0)},i=r.markerType;return"bar"===i||"pie"===i||"pin"===i?(t="middle",e="top"):"rectangle"===i?(t="right",e="bottom"):(t="middle",e="middle"),r.markerHorizontalAlignment=F(n.markerHorizontalAlignment,t),r.markerVerticalAlignment=F(n.markerVerticalAlignment,e),m(n.markerOpacity)&&(m(n.markerFillOpacity)&&(r.markerFillOpacity*=n.markerOpacity),m(n.markerLineOpacity)&&(r.markerLineOpacity*=n.markerOpacity)),r},e.translateLineAndFill=function(t){var e={lineColor:t.markerLineColor,linePatternFile:t.markerLinePatternFile,lineWidth:t.markerLineWidth,lineOpacity:t.markerLineOpacity,lineDasharray:t.markerLineDasharray,lineCap:"butt",lineJoin:"round",polygonFill:t.markerFill,polygonPatternFile:t.markerFillPatternFile,polygonOpacity:t.markerFillOpacity};return 0===e.lineWidth&&(e.lineOpacity=0),e},e._getVectorPoints=function(t,e,n){var r,i,o,a,s=n/2,c=e/2;if("triangle"===t)return[r=new me(0,0-s),i=new me(0-c,0+s),o=new me(0+c,0+s)];if("cross"===t)return[r=new me(0-c,0),i=new me(0+c,0),o=new me(0,0-s),a=new me(0,0+s)];if("diamond"===t)return[r=new me(0-c,0),i=new me(0,0-s),o=new me(0+c,0),a=new me(0,0+s)];if("square"===t)return[r=new me(0-c,0+s),i=new me(0+c,0+s),o=new me(0+c,0-s),a=new me(0-c,0-s)];if("rectangle"===t)return i=(r=new me(0,0)).add(e,0),o=r.add(e,n),a=r.add(0,n),[r,i,o,a];if("x"===t)return[r=new me(0-c,0+s),i=new me(0+c,0-s),o=new me(0+c,0+s),a=new me(0-c,0-s)];if("bar"===t)return[r=new me(0-c,0-n),i=new me(0+c,0-n),o=new me(0+c,0),a=new me(0-c,0)];if("pin"===t){var u=n*Math.atan(c/s);return[r=new me(0,0),i=new me(0-u,0-n),o=new me(0+u,0-n),a=new me(0,0)]}return[]},e}(Cr),Ir=function(t){function e(){return t.apply(this,arguments)||this}fe(e,t);var n=e.prototype;return n.getPlacement=function(){return"point"},n.getDxDy=function(){return new me(0,0)},n.symbolize=function(t){var e=this.geometry,n=e.getLayer();if(e.options.debug||!n||n.options.debug){var r=this.getMap();if(r&&!r.isZooming()){var i=n.options.debugOutline;t.strokeStyle=i,t.fillStyle=i;var o=this.getPainter().getContainerExtent().toArray();hn.polygon(t,[o],1,0);for(var a=this._getRenderContainerPoints(),s=this.geometry.getId(),c=Tr._getVectorPoints("cross",10,10),u=0;u<a.length;u++){var l=a[u];p(s)||hn.fillText(t,s,l.add(8,-4),i);for(var h=[],f=0;f<c.length;f++)h.push(c[f].add(l));hn.path(t,h.slice(0,2),1),hn.path(t,h.slice(2,4),1)}}}},e}(Cr),Pr=function(t){function e(e,n,r){var i;return(i=t.call(this,e,n,r)||this).style=i._defineStyle(i.translate()),i}fe(e,t),e.test=function(t){return!!t&&!p(t.markerFile)};var n=e.prototype;return n.symbolize=function(t,e){var n=this.style;if(this.painter.isHitTesting()||0!==n.markerWidth&&0!==n.markerHeight&&0!==n.markerOpacity){var r=this._getRenderContainerPoints();if(H(r)){var i=this._getImage(e);if(i){this._prepareContext(t);var o,a=n.markerWidth,s=n.markerHeight;if(!m(a)||!m(s)){a=i.width,s=i.height,n.markerWidth=a,n.markerHeight=s;var c=[n.markerFile,n.markerWidth,n.markerHeight];e.isResourceLoaded(c)||e.addResource(c,i);var u=this.getPainter();u.isSpriting()||u.removeCache()}"path"!==this.symbol.markerType&&m(n.markerOpacity)&&n.markerOpacity<1&&(o=t.globalAlpha,t.globalAlpha*=n.markerOpacity);for(var l=Ce(new ge(a,s),n.markerHorizontalAlignment,n.markerVerticalAlignment),h=0,f=r.length;h<f;h++){var d=r[h],p=this._rotate(t,d,this._getRotationAt(h));p&&(d=p),hn.image(t,i,d.x+l.x,d.y+l.y,a,s),p&&t.restore()}void 0!==o&&(t.globalAlpha=o)}else"undefined"!=typeof console&&console.warn("no img found for "+(this.style.markerFile||this._url[0]))}}},n._getImage=function(t){return t?t.getImage([this.style.markerFile,this.style.markerWidth,this.style.markerHeight]):null},n.getPlacement=function(){return this.symbol.markerPlacement},n.getRotation=function(){var t=this.style.markerRotation;return m(t)?-t*Math.PI/180:null},n.getDxDy=function(){var t=this.style,e=t.markerDx,n=t.markerDy;return new me(e,n)},n.getFixedExtent=function(t){var e=this.style,n=e.markerFile,r=t?t.getImage(n):null,i=e.markerWidth||(r?r.width:0),o=e.markerHeight||(r?r.height:0),a=this.getDxDy(),s=Ce(new ge(i,o),e.markerHorizontalAlignment,e.markerVerticalAlignment),c=new Zn(a.add(0,0),a.add(i,o));c._add(s);var u=this.getRotation();return u&&(c=this._rotateExtent(c,u)),c},n.translate=function(){var t=this.symbol;return{markerFile:t.markerFile,markerOpacity:F(t.markerOpacity,1),markerWidth:F(t.markerWidth,null),markerHeight:F(t.markerHeight,null),markerRotation:F(t.markerRotation,0),markerDx:F(t.markerDx,0),markerDy:F(t.markerDy,0),markerHorizontalAlignment:F(t.markerHorizontalAlignment,"middle"),markerVerticalAlignment:F(t.markerVerticalAlignment,"top")}},e}(Cr),Lr=new Ln(0,0),Rr=new Ln(0,0),Or=function(t){function e(e,n,r){var i;return(i=t.call(this)||this).symbol=e,i.geometry=n,i.painter=r,"Point"===n.type?de(i):(i.style=i._defineStyle(i.translate()),i)}fe(e,t),e.test=function(t,e){if(!t)return!1;if(e&&"Point"===e.type)return!1;for(var n in t){var r=n.slice(0,4);if("line"===r||"poly"===r)return!0}return!1};var n=e.prototype;return n.symbolize=function(t,e){var n=this.style;if(0!==n.polygonOpacity||0!==n.lineOpacity||this.painter.isHitTesting()){var r=this._getPaintParams();if(r){this._prepareContext(t);var i=Rt(n.lineColor),o="Polygon"===this.geometry.getJSONType()||"LineString"===this.geometry.type;!i||!n.lineColor.places&&o||(n.lineGradientExtent=this.getPainter().getContainerExtent()._expand(n.lineWidth)),Rt(n.polygonFill)&&(n.polygonGradientExtent=this.getPainter().getContainerExtent());var a=r[0];if("Polygon"===this.geometry.getJSONType()&&a.length>0&&Array.isArray(a[0][0])||"LineString"===this.geometry.type&&a.length>0&&Array.isArray(a[0]))for(var s=0;s<a.length;s++){this.prepareCanvas(t,n,e),i&&o&&!n.lineColor.places&&this._createGradient(t,a[s],n.lineColor);var c=[t,a[s]];r.length>1&&c.push.apply(c,r.slice(1)),c.push(n.lineOpacity,n.polygonOpacity,n.lineDasharray),this.geometry._paintOn.apply(this.geometry,c)}else{this.prepareCanvas(t,n,e),i&&o&&!n.lineColor.places&&this._createGradient(t,a,n.lineColor);var u=[t];u.push.apply(u,r),u.push(n.lineOpacity,n.polygonOpacity,n.lineDasharray),this.geometry._paintOn.apply(this.geometry,u)}t.setLineDash&&Array.isArray(n.lineDasharray)&&t.setLineDash([])}}},n.get2DExtent=function(){var t=this.getMap(),e=this.geometry._getPrjExtent();if(!e)return null;this._extMin&&this._extMax||(this._extMin=new Ln(0,0),this._extMax=new Ln(0,0)),this._extMin.x=e.xmin,this._extMin.y=e.ymin,this._extMax.x=e.xmax,this._extMax.y=e.ymax;var n=t._prjToPoint(this._extMin,void 0,Lr),r=t._prjToPoint(this._extMax,void 0,Rr);return this._pxExtent?this._pxExtent.set(Math.min(n.x,r.x),Math.min(n.y,r.y),Math.max(n.x,r.x),Math.max(n.y,r.y)):this._pxExtent=new Zn(n,r),this._pxExtent},n.getFixedExtent=function(){var t=this.style.lineWidth/2;return new Zn(-t,-t,t,t)},n._getPaintParams=function(){return this.getPainter().getPaintParams(this.style.lineDx,this.style.lineDy)},n.translate=function(){var t=this.symbol,e={lineColor:F(t.lineColor,"#000"),lineWidth:F(t.lineWidth,2),lineOpacity:F(t.lineOpacity,1),lineDasharray:F(t.lineDasharray,[]),lineCap:F(t.lineCap,"butt"),lineJoin:F(t.lineJoin,"miter"),linePatternFile:F(t.linePatternFile,null),lineDx:F(t.lineDx,0),lineDy:F(t.lineDy,0),polygonFill:F(t.polygonFill,null),polygonOpacity:F(t.polygonOpacity,1),polygonPatternFile:F(t.polygonPatternFile,null),polygonPatternDx:F(t.polygonPatternDx,0),polygonPatternDy:F(t.polygonPatternDy,0),linePatternDx:F(t.linePatternDx,0),linePatternDy:F(t.linePatternDy,0)};return 0===e.lineWidth&&(e.lineOpacity=0),"LineString"!==this.geometry.type||e.polygonFill||(e.polygonFill=e.lineColor),e},n._createGradient=function(t,e,n){if(Array.isArray(e)&&e.length){var r=e.length,i=t.createLinearGradient(e[0].x,e[0].y,e[r-1].x,e[r-1].y);n.colorStops.forEach((function(t){i.addColorStop.apply(i,t)})),t.strokeStyle=i}},e}(Sr),kr="___text_symbol_cache",Br=function(t){function e(e,n,r){var i;if((i=t.call(this,e,n,r)||this)._dynamic=xt(e),i.style=i._defineStyle(i.translate()),0===i.style.textWrapWidth)return de(i);i.strokeAndFill=i._defineStyle(i.translateLineAndFill(i.style));var o=Ee(i.style.textName,i.geometry.getProperties());return i._dynamic||(i._cacheKey=function(t,e){var n=[t];for(var r in e)e.hasOwnProperty(r)&&r.length>4&&"text"===r.substring(0,4)&&n.push(r+"="+e[r]);return n.join("-")}(o,i.style)),i._descText(o),i}fe(e,t),e.test=function(t){return!!t&&!p(t.textName)};var n=e.prototype;return n.symbolize=function(t,e){if(this.painter.isHitTesting()||0!==this.style.textSize&&(this.style.textOpacity||this.style.textHaloRadius&&this.style.textHaloOpacity)&&0!==this.style.textWrapWidth){var n=this._getRenderContainerPoints();if(H(n)){var r=this.style,i=this.strokeAndFill,o=Ee(this.style.textName,this.geometry.getProperties());this._descText(o),this._prepareContext(t),this.prepareCanvas(t,i,e),hn.prepareCanvasFont(t,r);for(var a=0,s=n.length;a<s;a++){var c=n[a],u=this._rotate(t,c,this._getRotationAt(a));u&&(c=u),hn.text(t,o,c,r,this.textDesc),u&&t.restore()}}}},n.getPlacement=function(){return this.symbol.textPlacement},n.getRotation=function(){var t=this.style.textRotation;return m(t)?-t*Math.PI/180:null},n.getDxDy=function(){var t=this.style;return new me(t.textDx,t.textDy)},n.getFixedExtent=function(){var t=this.getDxDy(),e=this.style,n=this.textDesc.size,r=Ce(n,e.textHorizontalAlignment,e.textVerticalAlignment),i=r.x,o=r.y;if(e.textHaloRadius){var a=e.textHaloRadius;n=n.add(2*a,2*a)}var s=new Zn(t.add(i,o),t.add(i+n.width,o+n.height)),c=this.getRotation();return c&&(s=this._rotateExtent(s,c)),s},n.translate=function(){var t=this.symbol,e={textName:t.textName,textFaceName:F(t.textFaceName,"monospace"),textWeight:F(t.textWeight,"normal"),textStyle:F(t.textStyle,"normal"),textSize:F(t.textSize,h),textFont:F(t.textFont,null),textFill:F(t.textFill,"#000"),textOpacity:F(t.textOpacity,1),textHaloFill:F(t.textHaloFill,"#ffffff"),textHaloRadius:F(t.textHaloRadius,0),textHaloOpacity:F(t.textHaloOpacity,1),textWrapWidth:F(t.textWrapWidth,null),textWrapCharacter:F(t.textWrapCharacter,"\n"),textLineSpacing:F(t.textLineSpacing,0),textDx:F(t.textDx,0),textDy:F(t.textDy,0),textHorizontalAlignment:F(t.textHorizontalAlignment,"middle"),textVerticalAlignment:F(t.textVerticalAlignment,"middle"),textAlign:F(t.textAlign,"center"),textRotation:F(t.textRotation,0),textMaxWidth:F(t.textMaxWidth,0),textMaxHeight:F(t.textMaxHeight,0)};return e.textMaxWidth>0&&(!e.textWrapWidth||e.textWrapWidth>e.textMaxWidth)&&(e.textWrapWidth||(e.textMaxHeight=1),e.textWrapWidth=e.textMaxWidth),e},n.translateLineAndFill=function(t){return{lineColor:t.textHaloRadius?t.textHaloFill:t.textFill,lineWidth:t.textHaloRadius,lineOpacity:t.textOpacity,lineDasharray:null,lineCap:"butt",lineJoin:"round",polygonFill:t.textFill,polygonOpacity:t.textOpacity}},n._descText=function(t){this._dynamic?this.textDesc=this._measureText(t):(this.textDesc=this._loadFromCache(),this.textDesc||(this.textDesc=this._measureText(t),this._storeToCache(this.textDesc)))},n._measureText=function(t){var e=this.style.textMaxHeight,n=Ie(t,this.style);return e&&e<n.size.height&&(n.size.height=e),n},n._storeToCache=function(t){C||(this.geometry[kr]||(this.geometry[kr]={}),this.geometry[kr][this._cacheKey]={desc:t,active:!0})},n._loadFromCache=function(){if(!this.geometry[kr])return null;var t=this.geometry[kr][this._cacheKey];return t?(t.active=!0,t.desc):null},e}(Cr);Br.CACHE_KEY=kr;var Dr,Fr=function(t){function e(e,n,r){var i;p(e.markerWidth)&&(e.markerWidth=80),p(e.markerHeight)&&(e.markerHeight=80),e=d(e,(i=t.call(this,e,n,r)||this).translate());var o=i.style=i._defineStyle(e);return he.gecko?i._url=[Tt(o,o.markerWidth,o.markerHeight),o.markerWidth,o.markerHeight]:i._url=[Tt(o),o.markerWidth,o.markerHeight],i}fe(e,t),e.test=function(t){return!!t&&!(!p(t.markerFile)||"path"!==t.markerType)};var n=e.prototype;return n._prepareContext=function(){},n._getImage=function(t){var e=this;if(t&&t.isResourceLoaded(this._url))return t.getImage(this._url);var n=this.painter,r=new Image;return r.onload=function(){var t=n.getLayer()&&n.getLayer().getRenderer();t&&t.setToRedraw()},r.onerror=function(n){n&&"undefined"!=typeof console&&console.warn(n),t.markErrorResource(e._url)},r.src=this._url[0],t&&t.addResource(this._url,r),r},e}(Pr),jr={lineWidth:1,polygonFill:"#fff",polygonOpacity:.5},Ur=function(t){function e(e,n,r){var i;return(i=t.call(this,e,n,r)||this).style=n.getLayer().options.drawAltitude,i.style&&v(i.style)||(i.style={lineWidth:2}),i.style.lineWidth||(i.style.lineWidth=0),i.dxdy=i._defineStyle({dx:e.textDx||e.markerDx,dy:e.textDy||e.markerDy}),i}fe(e,t),e.test=function(t,e){if(!e.getLayer())return!1;var n=e.getJSONType();return"Marker"===n||"LineString"===n};var n=e.prototype;return n.symbolize=function(t){var e=this.geometry.getLayer();if(e.options.drawAltitude){var n=this.geometry.getProperties();if(n&&n[e.options.altitudeProperty]){var r=this._getStyle();if(this._prepareContext(t),"LineString"===this.geometry.type){var i=this._getPaintParams(r.lineDx,r.lineDy);if(!i)return;var o=this.getPainter().getPaintParams(r.lineDx,r.lineDy,!0)[0];this._drawLineAltitude(t,i[0],o)}else{var a=this._getRenderContainerPoints(),s=this._getRenderContainerPoints(!0);if(!a||0===a.length)return;this._drawMarkerAltitude(t,a[0],s[0])}}}},n.getDxDy=function(){var t=this.dxdy;return new me(t.dx||0,t.dy||0)},n.get2DExtent=function(){return"LineString"===this.geometry.type?Or.prototype.get2DExtent.apply(this):t.prototype.get2DExtent.call(this)},n.getPlacement=function(){return"point"},n._getPaintParams=function(t,e){return this.getPainter().getPaintParams(t||0,e||0)},n._drawMarkerAltitude=function(t,e,n){var r=this._getStyle();this.prepareCanvas(t,r),hn.path(t,[e,n],r.lineOpacity,null,r.lineDasharray)},n._drawLineAltitude=function(t,e,n){var r=this._getStyle();if(e.length>0&&Array.isArray(e[0]))for(var i=0;i<e.length;i++)this._drawLine(t,e[i],n[i]);else this._drawLine(t,e,n);t.setLineDash&&Array.isArray(r.lineDasharray)&&t.setLineDash([])},n._drawLine=function(t,e,n){var r=this._getStyle();this.prepareCanvas(t,r);for(var i=0,o=e.length-1;i<o;i++)hn.polygon(t,[e[i],e[i+1],n[i+1],n[i]],r.lineOpacity,r.polygonOpacity,r.lineDasharray)},n._getStyle=function(){var t=this.geometry.getLayer().options.drawAltitude;return v(t)||(t=jr),t.lineWidth||(t.lineWidth=0,t.lineOpacity=0),t},e}(Cr),Nr=Object.freeze({Symbolizer:Mr,CanvasSymbolizer:Sr,DebugSymbolizer:Ir,ImageMarkerSymbolizer:Pr,PointSymbolizer:Cr,StrokeAndFillSymbolizer:Or,TextMarkerSymbolizer:Br,VectorMarkerSymbolizer:Tr,VectorPathMarkerSymbolizer:Fr,DrawAltitudeSymbolizer:Ur}),zr=[Ur,Or,Pr,Fr,Tr,Br],Gr=new me(0,0),Hr=new Zn,Wr=new Zn,Vr=new Zn,Zr=new Zn,Qr=new Zn,Xr=function(t){function e(e){var n;return(n=t.call(this)||this).geometry=e,n.symbolizers=n._createSymbolizers(),n._altAtGLZoom=n._getGeometryAltitude(),n}fe(e,t);var n=e.prototype;return n.getMap=function(){return this.geometry.getMap()},n.getLayer=function(){return this.geometry.getLayer()},n._createSymbolizers=function(){var t=this.getSymbol(),e=[],n=zr,r=t;Array.isArray(t)||(r=[t]);for(var i=r.length-1;i>=0;i--)for(var o=r[i],a=n.length-1;a>=0;a--)if(n[a].test(o,this.geometry)){var s=new n[a](o,this.geometry,this);e.push(s),s instanceof Cr&&(this._hasPoint=!0)}if(!e.length&&console){var c=this.geometry.getId();console.warn("invalid symbol for geometry("+(this.geometry?this.geometry.getType()+(c?":"+c:""):"")+") to draw : "+JSON.stringify(t))}return this._debugSymbolizer=new Ir(t,this.geometry,this),e},n.hasPoint=function(){return!!this._hasPoint},n.getRenderPoints=function(t){return this._renderPoints||(this._renderPoints={}),t||(t="center"),this._renderPoints[t]||(this._renderPoints[t]=this.geometry._getRenderPoints(t)),this._renderPoints[t]},n.getPaintParams=function(t,e,n){var r=this.getMap(),i=this.geometry,o=r.getResolution(),a=0!==r.getPitch(),s=0!==r.getBearing(),c=this._cachedParams,u=i._paintAsPath&&i._paintAsPath();if(u&&this._unsimpledParams&&o<=this._unsimpledParams._res)c=this._unsimpledParams;else if(!c||c._res!==r.getResolution()||this._pitched!==a&&i._redrawWhenPitch()||this._rotated!==s&&i._redrawWhenRotate()){if(!(c=i._getPaintParams()))return null;c._res=o,!i._simplified&&u&&(this._unsimpledParams||(this._unsimpledParams=c),o>this._unsimpledParams._res&&(this._unsimpledParams._res=o)),this._cachedParams=c}if(!c)return null;this._pitched=a,this._rotated=s;var l=r.getGLScale(),h=[],f=c[0],d=r.getContainerExtent(),p=this._pointContainerPoints(f,t,e,n,this._hitPoint&&!d.contains(this._hitPoint));if(!p)return null;h.push(p);for(var g=1,v=c.length;g<v;g++)m(c[g])||c[g]instanceof ge?m(c[g])?h.push(c[g]/l):h.push(c[g].multi(1/l)):h.push(c[g]);return h},n._pointContainerPoints=function(t,e,n,r,i,o){if(this._aboveCamera())return null;var a,s=this.getMap(),c=s.getGLZoom(),u=this.containerOffset;function l(t,r){var i=s._pointToContainerPoint(t,c,r)._sub(u);return(e||n)&&i._add(e||0,n||0),i}var h=this.getAltitude();if(Array.isArray(t)){var f,d=this.geometry,p=(f=!i&&d.options.enableClip?this._clip(t,h):{points:t,altitude:h}).points;h=f.altitude,r&&(h=0);var m=h;a=[];for(var g=0,v=p.length;g<v;g++){var y=p[g];if(Array.isArray(y)){for(var _=[],b=0,x=y.length;b<x;b++){var w=y[b];Array.isArray(h)&&(m=h[g]?h[g][b]:0),_.push(l(w,m))}a.push(_)}else Array.isArray(h)&&(m="vertex-last"===o?h[h.length-1-g]:"line"===o?(h[g]+h[g+1])/2:h[g]),a.push(l(y,m))}}else t instanceof me&&(r&&(h=0),a=s._pointToContainerPoint(t,c,h)._sub(u),(e||n)&&a._add(e,n));return a},n._clip=function(t,e){var n=this.getMap(),r=this.geometry,i=this.getSymbol().lineWidth;m(i)||(i=4);var o=n._get2DExtent(void 0,Zr)._expand(i);if(n.getPitch()>0&&e){var a=n.cameraLookAt,s=n.cameraPosition;Gr.set(s.x,s.y),o=o._combine(Gr._add(j(a[0]-s[0]),j(a[1]-s[1])))}var c=t;if(this.get2DExtent(null,Qr).within(o))return{points:c,altitude:e};var u=n._get2DExtent(n.getGLZoom(),Zr)._expand(i*n._glScale),l=r.options.smoothness;if(r.getShell&&this.geometry.getHoles&&!l)if(Array.isArray(t[0])){c=[];for(var h=0;h<t.length;h++){var f=_r(t[h],u);f.length&&c.push(f)}}else c=_r(t,u);else if("LineString"===r.getJSONType()&&!l){if(Array.isArray(t[0])){c=[];for(var d=0;d<t.length;d++)k(c,vr(t[d],u,!1,!!l))}else c=vr(t,u,!1,!!l);return this._interpolateSegAlt(c,t,e)}return{points:c,altitude:e}},n._interpolateSegAlt=function(t,e,n){if(!Array.isArray(n)){var r=function(t){return t.point};return{points:t.map((function(t){return Array.isArray(t)?t.map(r):t.point})),altitude:n}}var i=function t(e,n,r){if(!Array.isArray(r))return e;for(var i=[],o=0,a=e.length;o<a;o++)if(Array.isArray(e[o]))i.push(t(e[o],n,r));else{var s=e[o];if(s.point.equals(n[s.index]))s.altitude=r[s.index],i.push(s);else{var c=void 0,u=void 0;0===s.index?(c=s.index,u=s.index+1):(c=s.index-1,u=s.index);var l=s.point.distanceTo(n[u]),h=l/(l+n[c].distanceTo(s.point)),f=N(r[c],r[u],1-h);s.altitude=f,i.push(s)}}return i}(t,e,n);return n=[],{points:i.map((function(t){if(Array.isArray(t)){var e=[],r=t.map((function(t){return e.push(t.altitude),t.point}));return n.push(e),r}return n.push(t.altitude),t.point})),altitude:n}},n.getSymbol=function(){return this.geometry._getInternalSymbol()},n.paint=function(t,e,n){if(this.symbolizers){var r=this.getLayer()._getRenderer();if(r&&(r.context||e)&&(!t||t.intersects(this.get2DExtent(r.resources,Hr)))){var i=this.getMap(),o=this.getMinAltitude(),a=i.getFrustumAltitude();if(!(o&&a&&a<o)){this.containerOffset=n||i._pointToContainerPoint(r.southWest)._add(0,-i.height),this._beforePaint();for(var s=e||r.context,c=[s,r.resources],u=this.symbolizers.length-1;u>=0;u--)this._prepareShadow(s,this.symbolizers[u].symbol),this.symbolizers[u].symbolize.apply(this.symbolizers[u],c);this._afterPaint(),this._painted=!0,this._debugSymbolizer.symbolize.apply(this._debugSymbolizer,c)}}}},n.getSprite=function(t,e){if("Point"!==this.geometry.type)return null;if(this._spriting=!0,!this._sprite&&this.symbolizers.length>0){var n=new Zn;this.symbolizers.forEach((function(e){var r=e.getFixedExtent(t);n._combine(r)}));var r,i=n.getMin().multi(-1),o=e||(this.getMap()?this.getMap().CanvasClass:null),a=hn.createCanvas(n.getWidth(),n.getHeight(),o);this._renderPoints&&(r=this._renderPoints);for(var s=a.getContext("2d"),c=[s,t],u=this.symbolizers.length-1;u>=0;u--){var l=this.symbolizers[u].getDxDy();this._renderPoints={center:[[i.add(l)]]},this._prepareShadow(s,this.symbolizers[u].symbol),this.symbolizers[u].symbolize.apply(this.symbolizers[u],c)}r&&(this._renderPoints=r),this._sprite={canvas:a,offset:n.getCenter()}}return this._spriting=!1,this._sprite},n.isSpriting=function(){return!!this._spriting},n.hitTest=function(t,e){(!e||e<.5)&&(e=.5),Dr||(Dr=hn.createCanvas(1,1)),hn.setHitTesting(!0),Dr.width=Dr.height=2*e;var n=Dr.getContext("2d");this._hitPoint=t.sub(e,e);try{this.paint(null,n,this._hitPoint)}catch(t){throw t}finally{hn.setHitTesting(!1)}delete this._hitPoint;for(var r=n.getImageData(0,0,Dr.width,Dr.height).data,i=3,o=r.length;i<o;i+=4)if(r[i]>0)return!0;return!1},n.isHitTesting=function(){return!!this._hitPoint},n._prepareShadow=function(t,e){e.shadowBlur?(t.shadowBlur=this.isHitTesting()?0:e.shadowBlur,t.shadowColor=e.shadowColor||"#000",t.shadowOffsetX=e.shadowOffsetX||0,t.shadowOffsetY=e.shadowOffsetY||0):t.shadowBlur&&(t.shadowBlur=null,t.shadowColor=null,t.shadowOffsetX=null,t.shadowOffsetY=null)},n._eachSymbolizer=function(t,e){if(this.symbolizers){e||(e=this);for(var n=this.symbolizers.length-1;n>=0;n--)t.apply(e,[this.symbolizers[n]])}},n.get2DExtent=function(t,e){this._verifyProjection();var n=this.getMap();t=t||this.getLayer()._getRenderer().resources;var r=n.getZoom(),i=this._isDynamicSize();if(this._extent2D&&this._extent2D._zoom===r&&this._fixedExtent||(this._extent2D&&this._extent2D._zoom!==r&&delete this._extent2D,this.symbolizers&&(this._extent2D||(this._extent2D=this._computeExtent2D(new Zn),this._extent2D._zoom=r),this._fixedExtent||(this._fixedExtent=this._computeFixedExtent(t,new Zn)))),!this._extent2D)return i&&delete this._fixedExtent,null;var o=this._fixedExtent,a=o.xmin,s=o.ymin,c=o.xmax,u=o.ymax;return i&&delete this._fixedExtent,Vr.set(a,-u,c,-s),e?(e.set(this._extent2D.xmin,this._extent2D.ymin,this._extent2D.xmax,this._extent2D.ymax),e._add(Vr),e):this._extent2D.add(Vr)},n._computeExtent2D=function(t){for(var e=this.symbolizers.length-1;e>=0;e--){var n=this.symbolizers[e];t._combine(n.get2DExtent())}return t},n._computeFixedExtent=function(t,e){for(var n=this.symbolizers.length-1;n>=0;n--){var r=this.symbolizers[n];r.getFixedExtent&&e._combine(r.getFixedExtent(t))}return e},n._isDynamicSize=function(){for(var t=this.symbolizers.length-1;t>=0;t--)if(this.symbolizers[t].isDynamicSize())return!0;return!1},n.getContainerExtent=function(t){if(this._aboveCamera())return null;this._verifyProjection();var e=this.getMap(),n=e.getZoom(),r=e._glScale;this._extent2D&&this._extent2D._zoom===n||this.get2DExtent(null,Wr);var i=this.getMinAltitude(),o=this._extent2D.convertTo((function(t){return e._pointToContainerPoint(t,n,i/r,Gr)}),t),a=this.getMaxAltitude();if(a!==i){var s=this._extent2D.convertTo((function(t){return e._pointToContainerPoint(t,n,a/r,Gr)}),Wr);o._combine(s)}var c=this.geometry.getLayer();if("LineString"===this.geometry.type&&a&&c.options.drawAltitude){var u=this._extent2D.convertTo((function(t){return e._pointToContainerPoint(t,n,0,Gr)}),Wr);o._combine(u)}return o&&o._add(this._fixedExtent||this._computeFixedExtent(null,new Zn)),this.geometry.options.smoothness&&o._expand(.15*o.getWidth()),o},n._aboveCamera=function(){var t=this.getMinAltitude(),e=this.getMap().getFrustumAltitude();return t&&e&&e<t},n.getFixedExtent=function(){var t=this.getMap().getZoom();return this._isDynamicSize()?this._computeFixedExtent(null,new Zn):(this._extent2D&&this._extent2D._zoom===t||this.get2DExtent(null,Vr),this._fixedExtent)},n.setZIndex=function(t){this._eachSymbolizer((function(e){e.setZIndex(t)}))},n.show=function(){this._painted?(this.removeCache(),this._eachSymbolizer((function(t){t.show()}))):this.getLayer().isCanvasRender()||this.paint()},n.hide=function(){this._eachSymbolizer((function(t){t.hide()}))},n.repaint=function(){this._altAtGLZoom=this._getGeometryAltitude(),this.removeCache();var t=this.getLayer();if(t){var e=t.getRenderer();e&&e.setToRedraw()&&e.setToRedraw()}},n.refreshSymbol=function(){this.removeCache(),this._removeSymbolizers(),this.symbolizers=this._createSymbolizers()},n.remove=function(){this.removeCache(),this._removeSymbolizers()},n._removeSymbolizers=function(){this._eachSymbolizer((function(t){delete t.painter,t.remove()})),delete this.symbolizers},n.removeCache=function(){delete this._renderPoints,delete this._paintParams,delete this._sprite,delete this._extent2D,delete this._fixedExtent,delete this._cachedParams,delete this._unsimpledParams,this.geometry&&delete this.geometry[Br.CACHE_KEY]},n.getAltitude=function(){return this.geometry.getAltitude()!==this._propAlt&&(this._altAtGLZoom=this._getGeometryAltitude()),this._altAtGLZoom?this._altAtGLZoom:0},n.getMinAltitude=function(){return this.minAltitude?this.minAltitude:0},n.getMaxAltitude=function(){return this.maxAltitude?this.maxAltitude:0},n._getGeometryAltitude=function(){var t=this;if(!this.getMap())return 0;var e=this.geometry.getAltitude();if(this._propAlt=e,!e)return this.minAltitude=this.maxAltitude=0,0;var n=this.geometry.getCenter();return n?Array.isArray(e)?(this.minAltitude=Number.MAX_VALUE,this.maxAltitude=Number.MIN_VALUE,e.map((function(e){var r=t._meterToPoint(n,e);return r<t.minAltitude&&(t.minAltitude=r),r>t.maxAltitude&&(t.maxAltitude=r),r}))):(this.minAltitude=this.maxAltitude=this._meterToPoint(n,e),this.minAltitude):0},n._meterToPoint=function(t,e){var n=this.getMap(),r=n.getGLZoom();return n.distanceToPoint(e,0,r,t).x*j(e)},n._verifyProjection=function(){var t=this.geometry._getProjection();this._projCode&&this._projCode!==t.code&&this.removeCache(),this._projCode=t.code},n._beforePaint=function(){var t=this.geometry[Br.CACHE_KEY];if(t)for(var e in t)x(t,e)&&(t[e].active=!1)},n._afterPaint=function(){var t=this.geometry[Br.CACHE_KEY];if(t)for(var e in t)x(t,e)&&(t[e].active||delete t[e])},e}(Mn),Yr=new Zn,Jr=function(t){function e(e,n){var r;return(r=t.call(this)||this).geometry=e,r.isMask=n,r}fe(e,t);var n=e.prototype;return n._eachPainter=function(t){for(var e,n=this.geometry.getGeometries(),r=0,i=n.length;r<i&&(!(e=this.isMask?n[r]._getMaskPainter():n[r]._getPainter())||!e||!1!==t.call(this,e));r++);},n.paint=function(t){this.geometry&&this._eachPainter((function(e){e.paint(t)}))},n.get2DExtent=function(t,e){e&&e.set(null,null,null,null);var n=e||new Zn;return this._eachPainter((function(e){n=n._combine(e.get2DExtent(t,Yr))})),n},n.getContainerExtent=function(){var t=new Zn;return this._eachPainter((function(e){t=t.combine(e.getContainerExtent())})),t},n.remove=function(){var t=arguments;this._eachPainter((function(e){e.remove.apply(e,t)}))},n.setZIndex=function(){var t=arguments;this._eachPainter((function(e){e.setZIndex.apply(e,t)}))},n.show=function(){var t=arguments;this._eachPainter((function(e){e.show.apply(e,t)}))},n.hide=function(){var t=arguments;this._eachPainter((function(e){e.hide.apply(e,t)}))},n.repaint=function(){var t=arguments;this._eachPainter((function(e){e.repaint.apply(e,t)}))},n.refreshSymbol=function(){var t=arguments;this._eachPainter((function(e){e.refreshSymbol.apply(e,t)}))},n.hasPoint=function(){var t=!1;return this._eachPainter((function(e){return!e.hasPoint()||(t=!0,!1)})),t},n.getMinAltitude=function(){var t=!0,e=0;return this._eachPainter((function(n){var r=n.getMinAltitude();(t||r<e)&&(t=!1,e=r)})),e},n.getMaxAltitude=function(){var t=0;return this._eachPainter((function(e){var n=e.getMaxAltitude();n>t&&(t=n)})),t},e}(Mn),qr={"EPSG:3857":{resolutions:function(){for(var t=[],e=12756274*Math.PI,n=0;n<21;n++)t[n]=e/(256*Math.pow(2,n));return t}(),fullExtent:{top:6378137*Math.PI,left:-6378137*Math.PI,bottom:-6378137*Math.PI,right:6378137*Math.PI}},"EPSG:4326":{fullExtent:{top:90,left:-180,bottom:-90,right:180},resolutions:function(){for(var t=[],e=0;e<20;e++)t[e]=180/(128*Math.pow(2,e));return t}()},BAIDU:{resolutions:function(){for(var t=Math.pow(2,18),e=[],n=0;n<20;n++)e[n]=t,t*=.5;return e}(),fullExtent:{top:33554432,left:-33554432,bottom:-33554432,right:33554432}},IDENTITY:{resolutions:function(){for(var t=Math.pow(2,8),e=[],n=0;n<18;n++)e[n]=t,t*=.5;return e}(),fullExtent:{top:2e5,left:-2e5,bottom:-2e5,right:2e5}}};qr["EPSG:4490"]=qr["EPSG:4326"];var Kr=function(){function t(t){void 0===t&&(t={}),this.options=t,this._initSpatialRef()}t.getProjectionInstance=function(t){if(!t)return null;if(v(t))return t;for(var e in t=(t+"").toLowerCase(),dr)if(x(dr,e)){var n=dr[e].code;if(n&&n.toLowerCase()===t)return dr[e]}return null},t.equals=function(t,e){if(!t&&!e)return!0;if(!t||!e)return!1;if(t.projection!==e.projection)return!1;var n=t.fullExtent,r=e.fullExtent;if(n&&!r||!n&&r)return!1;if(n&&r&&(n.top!==r.top||n.bottom!==r.bottom||n.left!==r.left||n.right!==r.right))return!1;var i=t.resolutions,o=e.resolutions;if(i&&o){if(i.length!==o.length)return!1;for(var a=0;a<i.length;a++)if(i[a]!==o[a])return!1}return!0};var e=t.prototype;return e._initSpatialRef=function(){var e=this.options.projection;if(!(e=e?t.getProjectionInstance(e):fr))throw new Error("must provide a valid projection in map's spatial reference.");(e=d({},Xn,e)).measureLength||d(e,or.DEFAULT),this._projection=e;var n,r=this.options.resolutions;if(!r&&(e.code&&(n=qr[e.code])&&(r=n.resolutions,this.isEPSG="IDENTITY"!==e.code),!r))throw new Error("must provide valid resolutions in map's spatial reference.");this._resolutions=r;var i=this.options.fullExtent;if(!i&&(e.code&&(n=qr[e.code])&&(i=n.fullExtent),!i))throw new Error("must provide a valid fullExtent in map's spatial reference.");if(p(i.left)?(this._fullExtent=new Vn(i),i.left=i.xmin,i.right=i.xmax,i.top=i.ymax,i.bottom=i.ymin):this._fullExtent=new Vn(new Ln(i.left,i.top),new Ln(i.right,i.bottom)),p(i.top)||p(i.bottom)||p(i.left)||p(i.right))throw new Error("must provide valid top/bottom/left/right in fullExtent.");d(this._fullExtent,i),this._projection.fullExtent=i;var o=i.right>=i.left?1:-1,a=i.top>=i.bottom?-1:1;this._transformation=new Qn([o,a,0,0])},e.getResolutions=function(){return this._resolutions||[]},e.getResolution=function(t){var e=0|t;e<0?e=0:e>this._resolutions.length-1&&(e=this._resolutions.length-1);var n=this._resolutions[e];return e!==t&&t>0&&e<this._resolutions.length-1?n+(this._resolutions[e+1]-n)*(t-e):n},e.getProjection=function(){return this._projection},e.getFullExtent=function(){return this._fullExtent},e.getTransformation=function(){return this._transformation},e.getMinZoom=function(){for(var t=0;t<this._resolutions.length;t++)if(!p(this._resolutions[t]))return t;return 0},e.getMaxZoom=function(){for(var t=this._resolutions.length-1;t>=0;t--)if(!p(this._resolutions[t]))return t;return this._resolutions.length-1},e.getZoomDirection=function(){return j(this._resolutions[this.getMinZoom()]-this._resolutions[this.getMaxZoom()])},e.toJSON=function(){return this.json||(this.json={resolutions:this._resolutions,fullExtent:{top:this._fullExtent.top,left:this._fullExtent.left,bottom:this._fullExtent.bottom,right:this._fullExtent.right},projection:this._projection.code}),this.json},t}(),$r=function(t){function e(e){var n,r=d({},e),i=r.symbol,o=r.properties,a=r.id;return delete r.symbol,delete r.id,delete r.properties,n=t.call(this,r)||this,i&&n.setSymbol(i),o&&n.setProperties(o),p(a)||n.setId(a),n}fe(e,t);var n=e.prototype;return n.getFirstCoordinate=function(){if("GeometryCollection"===this.type){var t=this.getGeometries();return t.length?t[0].getFirstCoordinate():null}var e=this.getCoordinates();if(!Array.isArray(e))return e;do{e=e[0]}while(Array.isArray(e)&&e.length>0);return e},n.getLastCoordinate=function(){if("GeometryCollection"===this.type){var t=this.getGeometries();return t.length?t[t.length-1].getLastCoordinate():null}var e=this.getCoordinates();if(!Array.isArray(e))return e;do{e=e[e.length-1]}while(Array.isArray(e)&&e.length>0);return e},n.addTo=function(t,e){return t.addGeometry(this,e),this},n.getLayer=function(){return this._layer?this._layer:null},n.getMap=function(){return this._layer?this._layer.getMap():null},n.getId=function(){return this._id},n.setId=function(t){var e=this.getId();return this._id=t,this._fireEvent("idchange",{old:e,new:t}),this},n.getProperties=function(){return this.properties?this.properties:this._getParent()?this._getParent().getProperties():null},n.setProperties=function(t){var e=this.properties;return this.properties=v(t)?d({},t):t,this._repaint(),this._fireEvent("propertieschange",{old:e,new:t}),this},n.getType=function(){return this.type},n.getSymbol=function(){var t=this._symbol;return t?Array.isArray(t)?Bt(t):d({},t):null},n.setSymbol=function(t){return this._symbol=this._prepareSymbol(t),this.onSymbolChanged(),this},n.updateSymbol=function(t){if(!t)return this;var e=this._getSymbol();return e=Bt(e||this._getInternalSymbol(),t),this._eventSymbolProperties=t,this.setSymbol(e)},n.getCenter=function(){return this._computeCenter(this._getMeasurer())},n.getExtent=function(){var t=this._getPrjExtent(),e=this._getProjection();if(t&&e){var n=e.unproject(new Ln(t.xmin,t.ymin)),r=e.unproject(new Ln(t.xmax,t.ymax));return new Vn(n,r,e)}return this._computeExtent(this._getMeasurer())},n.getContainerExtent=function(t){var e=this._getPainter();return e?e.getContainerExtent(t):null},n.getSize=function(){var t=this.getContainerExtent();return t?t.getSize():null},n.containsPoint=function(t,e){if(!this.getMap())throw new Error('The geometry is required to be added on a map to perform "containsPoint".');return t instanceof Ln&&(t=this.getMap().coordToContainerPoint(t)),this._containsPoint(t,e)},n._containsPoint=function(t,e){var n=this._getPainter();return!!n&&(p(e)&&this._hitTestTolerance&&(e=this._hitTestTolerance()),n.hitTest(t,e))},n.show=function(){if(this.options.visible=!0,this.getMap()){var t=this._getPainter();t&&t.show(),this._fireEvent("show")}return this},n.hide=function(){if(this.options.visible=!1,this.getMap()){this.onHide();var t=this._getPainter();t&&t.hide(),this._fireEvent("hide")}return this},n.isVisible=function(){if(!this.options.visible)return!1;var t=this._getInternalSymbol();if(!t)return!0;if(Array.isArray(t)){if(!t.length)return!0;for(var e=0,n=t.length;e<n;e++)if(p(t[e].opacity)||t[e].opacity>0)return!0;return!1}return p(t.opacity)||m(t.opacity)&&t.opacity>0},n.getZIndex=function(){return this.options.zIndex||0},n.setZIndex=function(t){var e=this.options.zIndex;return this.options.zIndex=t,this._fireEvent("zindexchange",{old:e,new:t}),this},n.setZIndexSilently=function(t){return this.options.zIndex=t,this},n.bringToFront=function(){var t=this.getLayer();if(!t||!t.getGeoMaxZIndex)return this;var e=t.getGeoMaxZIndex();return this.setZIndex(e+1),this},n.bringToBack=function(){var t=this.getLayer();if(!t||!t.getGeoMinZIndex)return this;var e=t.getGeoMinZIndex();return this.setZIndex(e-1),this},n.translate=function(t,e){if(p(t))return this;var n=new Ln(t,e);if(0===n.x&&0===n.y)return this;var r=this.getCoordinates();if(r)if(Array.isArray(r)){var i=D(r,(function(t){return t.add(n)}));this.setCoordinates(i)}else this.setCoordinates(r.add(n));return this},n.flash=function(t,e,n,r){return et.call(this,t,e,n,r)},n.copy=function(){var t=this.toJSON(),n=e.fromJSON(t);return n.options.visible=!0,n},n.remove=function(){return this.getLayer()?(this._fireEvent("removestart"),this._unbind(),this._fireEvent("removeend"),this._fireEvent("remove"),this):this},n.toGeoJSONGeometry=function(){return this._exportGeoJSONGeometry()},n.toGeoJSON=function(t){t||(t={});var e={type:"Feature",geometry:null};if(p(t.geometry)||t.geometry){var n=this._exportGeoJSONGeometry();e.geometry=n}var r,i=this.getId();return p(i)||(e.id=i),(p(t.properties)||t.properties)&&(r=this._exportProperties()),e.properties=r,e},n.toJSON=function(t){t||(t={});var e=this._toJSON(t);return d(e,this._exportGraphicOptions(t)),e},n.getLength=function(){return this._computeGeodesicLength(this._getMeasurer())},n.getArea=function(){return this._computeGeodesicArea(this._getMeasurer())},n.rotate=function(t,e){if("GeometryCollection"===this.type)return this.getGeometries().forEach((function(n){return n.rotate(t,e)})),this;e=e?new Ln(e):this.getCenter();var n=this._getMeasurer(),r=this.getCoordinates();if(!Array.isArray(r)){if(e.x!==r.x||e.y!==r.y){var i=n._rotate(r,e,t);this.setCoordinates(i)}return this}return D(r,(function(r){return n._rotate(r,e,t)})),this.setCoordinates(r),this},n._getConnectPoints=function(){return[this.getCenter()]},n._initOptions=function(t){var e=d({},t),n=e.symbol,r=e.properties,i=e.id;delete e.symbol,delete e.id,delete e.properties,this.setOptions(e),n&&this.setSymbol(n),r&&this.setProperties(r),p(i)||this.setId(i)},n._bindLayer=function(t){if(this.getLayer())throw new Error("Geometry cannot be added to two or more layers at the same time.");this._layer=t,this._clearCache()},n._prepareSymbol=function(t){if(Array.isArray(t)){for(var e=[],n=0;n<t.length;n++)e.push(Pt(this._checkAndCopySymbol(t[n])));return e}return t?Pt(t=this._checkAndCopySymbol(t)):null},n._checkAndCopySymbol=function(t){var e={};for(var n in t)u[n]&&y(t[n])?e[n]=+t[n]:e[n]=t[n];return e},n._getSymbol=function(){return this._symbol},n._setExternSymbol=function(t){return this._eventSymbolProperties=t,this._externSymbol=this._prepareSymbol(t),this.onSymbolChanged(),this},n._getInternalSymbol=function(){return this._symbol?this._symbol:this._externSymbol?this._externSymbol:this.options.symbol?this.options.symbol:null},n._getPrjExtent=function(){var t=this._getProjection();return this._verifyProjection(),!this._extent&&t&&(this._extent=this._computePrjExtent(t)),this._extent},n._unbind=function(){var t=this.getLayer();t&&(this._animPlayer&&this._animPlayer.finish(),this._clearHandlers(),this._unbindMenu(),this._unbindInfoWindow(),this.isEditing()&&this.endEdit(),this._removePainter(),this.onRemove&&this.onRemove(),t.onRemoveGeometry&&t.onRemoveGeometry(this),delete this._layer,delete this._internalId,delete this._extent)},n._getInternalId=function(){return this._internalId},n._setInternalId=function(t){this._internalId=t},n._getMeasurer=function(){return this._getProjection()?this._getProjection():Kr.getProjectionInstance(this.options.defaultProjection)},n._getProjection=function(){var t=this.getMap();return t?t.getProjection():null},n._verifyProjection=function(){var t=this._getProjection();this._projCode&&t&&this._projCode!==t.code&&this._clearProjection(),this._projCode=t?t.code:this._projCode},n._getExternalResources=function(){return It(this._getInternalSymbol())},n._getPainter=function(){var t=this.getLayer();if(!this._painter&&t)if(-1!==o.indexOf(this.type)){if(t.constructor.getCollectionPainterClass){var e=t.constructor.getCollectionPainterClass();this._painter=new e(this)}}else if(t.constructor.getPainterClass){var n=t.constructor.getPainterClass();this._painter=new n(this)}return this._painter},n._getMaskPainter=function(){return this._maskPainter||(this._maskPainter=this.getGeometries&&this.getGeometries()?new Jr(this,!0):new Xr(this)),this._maskPainter},n._removePainter=function(){this._painter&&this._painter.remove(),delete this._painter},n._paint=function(t){this._painter&&this._painter.paint(t)},n._clearCache=function(){delete this._extent},n._clearProjection=function(){delete this._extent},n._repaint=function(){this._painter&&this._painter.repaint()},n.onHide=function(){this.closeMenu(),this.closeInfoWindow()},n.onShapeChanged=function(){this._clearCache(),this._repaint(),this._fireEvent("shapechange")},n.onPositionChanged=function(){this._clearCache(),this._repaint(),this._fireEvent("positionchange")},n.onSymbolChanged=function(){this._painter&&this._painter.refreshSymbol();var t={};this._eventSymbolProperties&&(t.properties=d({},this._eventSymbolProperties),delete this._eventSymbolProperties),this._fireEvent("symbolchange",t)},n.onConfig=function(t){var e;t.properties&&(e=t.properties,delete t.properties);var n=!1;for(var r in t)if(t.hasOwnProperty(r)){var i=r.slice(0,5);if("arrow"===i||"smoot"===i){n=!0;break}}e?(this.setProperties(e),this._repaint()):n&&this._repaint()},n._setParent=function(t){t&&(this._parent=t)},n._getParent=function(){return this._parent},n._fireEvent=function(t,e){this.getLayer()&&this.getLayer()._onGeometryEvent&&(e||(e={}),e.type=t,e.target=this,this.getLayer()._onGeometryEvent(e)),this.fire(t,e)},n._toJSON=function(t){return{feature:this.toGeoJSON(t)}},n._exportGraphicOptions=function(t){var e={};return(p(t.options)||t.options)&&(e.options=this.config()),(p(t.symbol)||t.symbol)&&(e.symbol=this.getSymbol()),(p(t.infoWindow)||t.infoWindow)&&this._infoWinOptions&&(e.infoWindow=this._infoWinOptions),e},n._exportGeoJSONGeometry=function(){var t=this.getCoordinates(),e=Ln.toNumberArrays(t);return{type:this.getType(),coordinates:e}},n._exportProperties=function(){var t=null,e=this.getProperties();return p(e)||(t=v(e)?d({},e):e),t},n.getAltitude=function(){var t=this.getLayer();if(!t)return 0;var e=t.options,n=this.getProperties(),r=e.enableAltitude&&n?n[e.altitudeProperty]:0,i=t.getAltitude?t.getAltitude():0;return Array.isArray(r)?r.map((function(t){return t+i})):r+i},e}(An(bn(En(Mn))));$r.mergeOptions({id:null,visible:!0,interactive:!0,editable:!0,cursor:null,defaultProjection:"EPSG:4326"});var ti={attribution:null,minZoom:null,maxZoom:null,visible:!0,opacity:1,globalCompositeOperation:null,renderer:"canvas",debugOutline:"#0f0",cssFilter:null,forceRenderOnMoving:!1,forceRenderOnZooming:!1,forceRenderOnRotating:!1,hitDetect:!he.mobile},ei=function(t){function e(e,n){var r,i;return n&&(i=n.canvas,delete n.canvas),(r=t.call(this,n)||this)._canvas=i,r.setId(e),n&&(r.setZIndex(n.zIndex),n.mask&&r.setMask($r.fromJSON(n.mask))),r}fe(e,t);var n=e.prototype;return n.load=function(){if(!this.getMap())return this;if(this.onLoad()){this._initRenderer();var t=this.getZIndex();p(t)||(this._renderer.setZIndex(t),this.isCanvasRender()||this._renderer.render()),this.onLoadEnd()}return this},n.getId=function(){return this._id},n.setId=function(t){var e=this._id;return p(t)||(t+=""),this._id=t,this.fire("idchange",{old:e,new:t}),this},n.addTo=function(t){return t.addLayer(this),this},n.setZIndex=function(t){return this._zIndex=t,p(t)?delete this.options.zIndex:this.options.zIndex=t,this.map&&this.map._sortLayersByZIndex(),this._renderer&&this._renderer.setZIndex(t),this},n.getZIndex=function(){return this._zIndex||0},n.getMinZoom=function(){var t=this.getMap(),e=this.options.minZoom;return t?Math.max(t.getMinZoom(),e||0):e},n.getMaxZoom=function(){var t=this.getMap(),e=this.options.maxZoom;return t?Math.min(t.getMaxZoom(),p(e)?1/0:e):e},n.getOpacity=function(){return this.options.opacity},n.setOpacity=function(t){return this.config("opacity",t),this},n.isCanvasRender=function(){var t=this._getRenderer();return t&&t instanceof mr},n.getMap=function(){return this.map?this.map:null},n.getProjection=function(){var t=this.getMap();return t?t.getProjection():null},n.bringToFront=function(){var t=this._getLayerList();if(!t.length)return this;var e=t[t.length-1];if(1===t.length||e===this)return this;var n=e.getZIndex();return this.setZIndex(n+1),this},n.bringToBack=function(){var t=this._getLayerList();if(!t.length)return this;var e=t[0];if(1===t.length||e===this)return this;var n=e.getZIndex();return this.setZIndex(n-1),this},n.show=function(){var t=this;if(!this.options.visible){this.options.visible=!0;var e=this.getRenderer();e&&e.show();var n=this.getMap();e&&n?n.once("renderend",(function(){t.fire("show")})):this.fire("show")}return this},n.hide=function(){var t=this;if(this.options.visible){this.options.visible=!1;var e=this.getRenderer();e&&e.hide();var n=this.getMap();e&&n?n.once("renderend",(function(){t.fire("hide")})):this.fire("hide")}return this},n.isVisible=function(){if(m(this.options.opacity)&&this.options.opacity<=0)return!1;var t=this.getMap();if(t){var e=t.getZoom();if(!p(this.options.maxZoom)&&this.options.maxZoom<e||!p(this.options.minZoom)&&this.options.minZoom>e)return!1}return p(this.options.visible)&&(this.options.visible=!0),this.options.visible},n.remove=function(){return this.map&&this.map.removeLayer(this),this},n.getMask=function(){return this._mask},n.setMask=function(t){if(!("Point"===t.type&&t._isVectorMarker()||"Polygon"===t.type||"MultiPolygon"===t.type))throw new Error("Mask for a layer must be a marker with vector marker symbol or a Polygon(MultiPolygon).");if(t._bindLayer(this),"Point"===t.type?t.updateSymbol({markerLineColor:"rgba(0, 0, 0, 0)",markerFillOpacity:0}):t.setSymbol({lineColor:"rgba(0, 0, 0, 0)",polygonOpacity:0}),this._mask=t,this.options.mask=t.toJSON(),!this.getMap()||this.getMap().isZooming())return this;var e=this._getRenderer();return e&&e.setToRedraw&&this._getRenderer().setToRedraw(),this},n.removeMask=function(){if(delete this._mask,delete this.options.mask,!this.getMap()||this.getMap().isZooming())return this;var t=this._getRenderer();return t&&t.setToRedraw&&this._getRenderer().setToRedraw(),this},n.onLoad=function(){return!0},n.onLoadEnd=function(){},n.isLoaded=function(){return!!this._loaded},n.getRenderer=function(){return this._getRenderer()},n.onConfig=function(t){if(m(t.opacity)||t.cssFilter){var e=this.getRenderer();e&&e.setToRedraw()}},n.onAdd=function(){},n.onRendererCreate=function(){},n.onCanvasCreate=function(){},n.onRemove=function(){},n._bindMap=function(t,e){t&&(this.map=t,p(e)||this.setZIndex(e),this._switchEvents("on",this),this.onAdd(),this.fire("add"))},n._initRenderer=function(){var t=this.options.renderer;if(this.constructor.getRendererClass){var e=this.constructor.getRendererClass(t);if(!e)throw new Error("Invalid renderer for Layer("+this.getId()+"):"+t);this._renderer=new e(this),this._renderer.layer=this,this._renderer.setZIndex(this.getZIndex()),this._switchEvents("on",this._renderer),this._renderer.onAdd&&this._renderer.onAdd(),this.onRendererCreate(),this.fire("renderercreate",{renderer:this._renderer})}},n._doRemove=function(){this._loaded=!1,this.onRemove(),this._switchEvents("off",this),this._renderer&&(this._switchEvents("off",this._renderer),this._renderer.remove(),delete this._renderer),delete this.map},n._switchEvents=function(t,e){e&&e.getEvents&&this.getMap()[t](e.getEvents(),e)},n._getRenderer=function(){return this._renderer},n._getLayerList=function(){return this.map?this.map._layers:[]},n._getMask2DExtent=function(){if(!this._mask||!this.getMap())return null;var t=this._mask._getMaskPainter();return t?t.get2DExtent():null},e}(An(bn(pr(Mn))));ei.mergeOptions(ti);var ni=ei.prototype.fire;ei.prototype.fire=function(t,e){return"layerload"===t&&(this._loaded=!0),this.map&&(e||(e={}),e.type=t,e.target=this,this.map._onLayerEvent(e)),ni.apply(this,arguments)};var ri={maxVisualPitch:70,maxPitch:80,centerCross:!1,zoomInCenter:!1,zoomOrigin:null,zoomAnimation:!C,zoomAnimationDuration:330,panAnimation:!C,panAnimationDuration:600,zoomable:!0,enableInfoWindow:!0,hitDetect:!he.mobile,hitDetectLimit:5,fpsOnInteracting:25,layerCanvasLimitOnInteracting:-1,maxZoom:null,minZoom:null,maxExtent:null,fixCenterOnResize:!0,checkSize:!0,checkSizeInterval:1e3,renderer:"canvas",cascadePitches:[10,60]},ii=function(t){function e(n,r){var i;if(!r)throw new Error("Invalid options when creating map.");if(!r.center)throw new Error("Invalid center when creating map.");var o=d({},r),a=o.zoom;delete o.zoom;var s=new Ln(o.center);delete o.center;var c=o.baseLayer;delete o.baseLayer;var u=o.layers;return delete o.layers,(i=t.call(this,o)||this).VERSION=e.VERSION,Object.defineProperty(de(de(i)),"id",{value:L(),writable:!1}),i._loaded=!1,i._initContainer(n),i._panels={},i._baseLayer=null,i._layers=[],i._zoomLevel=a,i._center=s,i.setSpatialReference(o.spatialReference||o.view),i.setMaxExtent(o.maxExtent),i._mapViewPoint=new me(0,0),i._initRenderer(),i._updateMapSize(i._getContainerDomSize()),c&&i.setBaseLayer(c),u&&i.addLayer(u),i._Load(),i}fe(e,t),e.addOnLoadHook=function(t){var e=Array.prototype.slice.call(arguments,1),n="function"==typeof t?t:function(){this[t].apply(this,e)};return this.prototype._onLoadHooks=this.prototype._onLoadHooks||[],this.prototype._onLoadHooks.push(n),this};var n=e.prototype;return n.isLoaded=function(){return!!this._loaded},n.getContainer=function(){return this._containerDOM},n.getSpatialReference=function(){return this._spatialReference},n.setSpatialReference=function(t){var e=this.options.spatialReference;return this._loaded&&Kr.equals(e,t)||this._updateSpatialReference(t,e),this},n._updateSpatialReference=function(t,e){if(t=d({},t),this._center=this.getCenter(),this.options.spatialReference=t,this._spatialReference=new Kr(t),this.options.spatialReference&&_(this.options.spatialReference.projection)){var n=this._spatialReference.getProjection();this.options.spatialReference.projection=n.code}return this._resetMapStatus(),this._fireEvent("spatialreferencechange",{old:e,new:d({},this.options.spatialReference)}),this},n.onConfig=function(t){var e=t.spatialReference||t.view;return p(e)||this._updateSpatialReference(e,null),this},n.getProjection=function(){return this._spatialReference?this._spatialReference.getProjection():null},n.getFullExtent=function(){return this._spatialReference?this._spatialReference.getFullExtent():null},n.setCursor=function(t){return delete this._cursor,this._trySetCursor(t),this._cursor=t,this},n.resetCursor=function(){return this.setCursor(null)},n.getCenter=function(){return this._loaded&&this._prjCenter?this.getProjection().unproject(this._prjCenter):this._center},n.setCenter=function(t){if(!t)return this;t=new Ln(t);var e=this.getProjection().project(t);return this._verifyExtent(e)?this._loaded?(this.onMoveStart(),this._setPrjCenter(e),this.onMoveEnd(this._parseEventFromCoord(this.getCenter())),this):(this._center=t,this):this},n.getSize=function(){return p(this.width)||p(this.height)?this._getContainerDomSize():new ge(this.width,this.height)},n.getContainerExtent=function(){var t=this.height,e=this.getPitch(),n=this.options.maxVisualPitch;return n&&e>n&&(t=this._getVisualHeight(n)),new Zn(0,this.height-t,this.width,this.height)},n._getVisualHeight=function(t){t=t||.01;var e=(90-this.getPitch())*Math.PI/180,n=this.getFov()*Math.PI/180;t*=Math.PI/180;var r=this.cameraCenterDistance/this.getGLScale(),i=Math.tan(n/2),o=r*i/(1/Math.tan(t)-i)/Math.sin(t),a=r*(Math.sin(e)*o/(r+Math.cos(e)*o));return this.height/2+a},n.getExtent=function(){return this._pointToExtent(this._get2DExtent())},n.getProjExtent=function(){var t=this._get2DExtent();return new Vn(this._pointToPrj(t.getMin()),this._pointToPrj(t.getMax()))},n.getPrjExtent=function(){return this.getProjExtent()},n.getMaxExtent=function(){return this.options.maxExtent?new Vn(this.options.maxExtent,this.getProjection()):null},n.setMaxExtent=function(t){if(t){var e=new Vn(t,this.getProjection());this.options.maxExtent=e,this._verifyExtent(this._getPrjCenter())||this._panTo(this._prjMaxExtent().getCenter());var n=this.getProjection();this._prjMaxExtent=e.convertTo((function(t){return n.project(t)}))}else delete this.options.maxExtent,delete this._prjMaxExtent;return this},n.getZoom=function(){return this._zoomLevel},n.getZoomForScale=function(t,e,n){var r=this.getZoom();if(p(e)&&(e=r),1===t&&e===r)return r;var i=this._getResolution(e)/t,o=this.getZoomFromRes(i);if(n)return o;var a=1e-6;return this.getSpatialReference().getZoomDirection()<0?Math.ceil(o-a):Math.floor(o+a)},n.getZoomFromRes=function(t){var e=this._getResolutions(),n=this._getResolution(this.getMinZoom()),r=this._getResolution(this.getMaxZoom());if(n<=r){if(t<=n)return this.getMinZoom();if(t>=r)return this.getMaxZoom()}else{if(t>=n)return this.getMinZoom();if(t<=r)return this.getMaxZoom()}for(var i=e.length,o=0;o<i-1;o++)if(e[o]){var a=e[o+1]-e[o],s=t-e[o];if(j(a)===j(s)&&Math.abs(a)>=Math.abs(s))return o+s/a}return i-1},n.setZoom=function(t,e){return void 0===e&&(e={animation:!0}),isNaN(t)||p(t)||(t=+t,this._loaded&&this.options.zoomAnimation&&e.animation?this._zoomAnimation(t):this._zoom(t)),this},n.getMaxZoom=function(){return p(this.options.maxZoom)?this.getMaxNativeZoom():this.options.maxZoom},n.setMaxZoom=function(t){var e=this.getMaxNativeZoom();return t>e&&(t=e),null!==t&&t<this._zoomLevel&&(this.setZoom(t),t=+t),this.options.maxZoom=t,this},n.getMinZoom=function(){return p(this.options.minZoom)?this._spatialReference.getMinZoom():this.options.minZoom},n.setMinZoom=function(t){if(null!==t){t=+t;var e=this._spatialReference.getMinZoom();t<e&&(t=e),t>this._zoomLevel&&this.setZoom(t)}return this.options.minZoom=t,this},n.getMaxNativeZoom=function(){var t=this.getSpatialReference();return t?t.getMaxZoom():null},n.getGLZoom=function(){return this.getMaxNativeZoom()/2},n.getGLScale=function(t){return p(t)&&(t=this.getZoom()),this._getResolution(t)/this._getResolution(this.getGLZoom())},n.zoomIn=function(){return this.setZoom(this.getZoom()+1)},n.zoomOut=function(){return this.setZoom(this.getZoom()-1)},n.isZooming=function(){return!!this._zooming},n.isInteracting=function(){return this.isZooming()||this.isMoving()||this.isRotating()},n.setCenterAndZoom=function(t,e){return p(e)||this._zoomLevel===e?this.setCenter(t):(this.setCenter(t),this.setZoom(e,{animation:!1})),this},n.getFitZoom=function(t,e){var n=this;if(!(t&&t instanceof Vn))return this._zoomLevel;if(t.xmin===t.xmax&&t.ymin===t.ymax)return this.getMaxZoom();var r=this.getSize(),i=t.convertTo((function(t){return n.coordToContainerPoint(t)})),o=i.getWidth(),a=i.getHeight(),s=r.width/o,c=r.height/a,u=this.getSpatialReference().getZoomDirection()<0?Math.max(s,c):Math.min(s,c);return this.getZoomForScale(u,null,e)},n.getView=function(){return{center:this.getCenter().toArray(),zoom:this.getZoom(),pitch:this.getPitch(),bearing:this.getBearing()}},n.setView=function(t){return t?(t.center&&this.setCenter(t.center),null===t.zoom||isNaN(+t.zoom)||this.setZoom(+t.zoom,{animation:!1}),null===t.pitch||isNaN(+t.pitch)||this.setPitch(+t.pitch),null===t.pitch||isNaN(+t.bearing)||this.setBearing(+t.bearing),this):this},n.getResolution=function(t){return this._getResolution(t)},n.getScale=function(t){var e=p(t)?this.getZoom():t,n=this._getResolution(this.getMaxNativeZoom());return this._getResolution(e)/n},n.fitExtent=function(t,e,n,r){if(void 0===n&&(n={}),!t)return this;t=new Vn(t,this.getProjection());var i=this.getFitZoom(t)+(e||0),o=t.getCenter();return void 0===n.animation||n.animation?this._animateTo({center:o,zoom:i},{duration:n.duration||this.options.zoomAnimationDuration,easing:n.easing||"out"},r):this.setCenterAndZoom(o,i)},n.getBaseLayer=function(){return this._baseLayer},n.setBaseLayer=function(t){var e=!1;return this._baseLayer&&(e=!0,this._fireEvent("baselayerchangestart"),this._baseLayer.remove()),t?(this._baseLayer=t,t._bindMap(this,-1),this._baseLayer.on("layerload",(function(){this._fireEvent("baselayerload"),e&&(e=!1,this._fireEvent("baselayerchangeend"))}),this),this._loaded&&this._baseLayer.load(),this._fireEvent("setbaselayer"),this):(delete this._baseLayer,this._fireEvent("baselayerchangeend"),this._fireEvent("setbaselayer"),this)},n.removeBaseLayer=function(){return this._baseLayer&&(this._baseLayer.remove(),delete this._baseLayer,this._fireEvent("baselayerremove")),this},n.getLayers=function(t){return this._getLayers((function(e){return!(e===this._baseLayer||e.getId().indexOf(i)>=0)&&(!t||t(e))}))},n.getLayer=function(t){if(!t)return null;var e=this._layerCache?this._layerCache[t]:null;if(e)return e;var n=this.getBaseLayer();return n&&n.getId()===t?n:null},n.addLayer=function(t){if(!t)return this;if(!Array.isArray(t))return t=Array.prototype.slice.call(arguments,0),this.addLayer(t);this._layerCache||(this._layerCache={});for(var e=this._layers,n=0,r=t.length;n<r;n++){var i=t[n],o=i.getId();if(p(o))throw new Error("Invalid id for the layer: "+o);if(i.getMap()!==this){if(this._layerCache[o])throw new Error("Duplicate layer id in the map: "+o);this._layerCache[o]=i,i._bindMap(this),e.push(i),this._loaded&&i.load()}}return this._sortLayersByZIndex(),this._fireEvent("addlayer",{layers:t}),this},n.removeLayer=function(t){if(!t)return this;if(!Array.isArray(t))return this.removeLayer([t]);for(var e=[],n=0,r=t.length;n<r;n++){var i=t[n];if(i instanceof ei||(i=this.getLayer(i)),i){var o=i.getMap();if(o&&o===this){e.push(i),this._removeLayer(i,this._layers),this._loaded&&i._doRemove();var a=i.getId();this._layerCache&&delete this._layerCache[a]}}}if(e.length>0){var s=this.getRenderer();s&&s.setLayerCanvasUpdated(),this.once("frameend",(function(){e.forEach((function(t){t.fire("remove")}))}))}return this._fireEvent("removelayer",{layers:t}),this},n.sortLayers=function(t){if(!t||!Array.isArray(t))return this;for(var e=[],n=Number.MAX_VALUE,r=0,i=t.length;r<i;r++){var o=t[r];if(y(t[r])&&(o=this.getLayer(o)),!(o instanceof ei&&o.getMap()&&o.getMap()===this))throw new Error("It must be a layer added to this map to order.");o.getZIndex()<n&&(n=o.getZIndex()),e.push(o)}for(var a=0,s=e.length;a<s;a++)e[a].setZIndex(n+a);return this},n.toDataURL=function(t){t||(t={});var e=t.mimeType;e||(e="image/png");var n=t.save,r=this._getRenderer();if(r&&r.toDataURL){var i=t.fileName;i||(i="export");var o=r.toDataURL(e);if(n&&o){var a;if("undefined"!=typeof Blob&&"undefined"!=typeof atob){var s=J(o.replace(/^data:image\/(png|jpeg|jpg);base64,/,""),e);a=URL.createObjectURL(s)}else a=o;var c=document.createElement("a");c.download=i,c.href=a,document.body.appendChild(c),c.click(),document.body.removeChild(c)}return o}return null},n.coordToPoint=function(t,e,n){return this.coordinateToPoint(t,e,n)},n.pointToCoord=function(t,e,n){return this.pointToCoordinate(t,e,n)},n.coordToViewPoint=function(t,e,n){return this.coordinateToViewPoint(t,e,n)},n.viewPointToCoord=function(t,e){return this.viewPointToCoordinate(t,e)},n.coordToContainerPoint=function(t,e,n){return this.coordinateToContainerPoint(t,e,n)},n.containerPointToCoord=function(t,e){return this.containerPointToCoordinate(t,e)},n.containerPointToViewPoint=function(t,e){return e?e.set(t.x,t.y):e=t.copy(),e._sub(this.getViewPoint())},n.viewPointToContainerPoint=function(t,e){return e?e.set(t.x,t.y):e=t.copy(),e._add(this.getViewPoint())},n.checkSize=function(){var t=f()-this._initTime<1500&&0===this.width||0===this.height,e=this._getContainerDomSize(),n=this.height,r=this.width;if(e.width===r&&e.height===n)return this;var i=this.getCenter();if(this.options.fixCenterOnResize)this._updateMapSize(e);else{var o=this._getVisualHeight(this.getPitch()),a=new me(0,this.height-o),s=this._containerPointToPrj(a);this._updateMapSize(e);var c=this._getVisualHeight(this.getPitch()),u=new me(0,this.height-c);this._setPrjCoordAtContainerPoint(s,u),this._mapViewCoord=this._getPrjCenter()}var l=0===e.width||0===e.height||0===r||0===n;return(t||l)&&(this._eventSilence=!0,this.setCenter(i),delete this._eventSilence),this._fireEvent("resize"),this},n.locate=function(t,e,n){return this.getProjection()._locate(new Ln(t),e,n)},n.getMainPanel=function(){return this._getRenderer().getMainPanel()},n.getPanels=function(){return this._panels},n.remove=function(){var t=this;if(this.isRemoved())return this;this._fireEvent("removestart"),this._removeDomEvents(),this._clearHandlers(),this.removeBaseLayer();for(var e=this.getLayers(),n=0;n<e.length;n++)e[n].remove();return this._getRenderer()&&this._getRenderer().remove(),this._containerDOM.childNodes&&this._containerDOM.childNodes.length>0&&Array.prototype.slice.call(this._containerDOM.childNodes,0).filter((function(t){return"maptalks-wrapper"===t.className})).forEach((function(e){return t._containerDOM.removeChild(e)})),delete this._panels,delete this._containerDOM,delete this.renderer,this._fireEvent("removeend"),this._clearAllListeners(),this},n.isRemoved=function(){return!this._containerDOM},n.isMoving=function(){return!!this._moving},n.onMoveStart=function(t){var e=this._getPrjCenter();this._originCenter&&!this._verifyExtent(e)||(this._originCenter=e),this._moving=!0,this._trySetCursor("move"),this._fireEvent("movestart",this._parseEvent(t?t.domEvent:null,"movestart"))},n.onMoving=function(t){this._fireEvent("moving",this._parseEvent(t?t.domEvent:null,"moving"))},n.onMoveEnd=function(t){if(this._moving=!1,this._trySetCursor("default"),this._fireEvent("moveend",t&&t.domEvent?this._parseEvent(t.domEvent,"moveend"):t),!this._verifyExtent(this._getPrjCenter())&&this._originCenter){var e=this._originCenter;this._panTo(e)}},n.onDragRotateStart=function(t){this._dragRotating=!0,this._fireEvent("dragrotatestart",this._parseEvent(t?t.domEvent:null,"dragrotatestart"))},n.onDragRotating=function(t){this._fireEvent("dragrotating",this._parseEvent(t?t.domEvent:null,"dragrotating"))},n.onDragRotateEnd=function(t){this._dragRotating=!1,this._fireEvent("dragrotateend",this._parseEvent(t?t.domEvent:null,"dragrotateend"))},n.isDragRotating=function(){return!!this._dragRotating},n.getRenderer=function(){return this._getRenderer()},n.getDevicePixelRatio=function(){return this.options.devicePixelRatio||he.devicePixelRatio||1},n._initContainer=function(t){if(y(t)){if(this._containerDOM=document.getElementById(t),!this._containerDOM)throw new Error("Invalid container when creating map: '"+t+"'")}else this._containerDOM=t,C&&(this.CanvasClass=this._containerDOM.constructor);if(this._containerDOM.childNodes&&this._containerDOM.childNodes.length>0&&"maptalks-wrapper"===this._containerDOM.childNodes[0].className)throw new Error("Container is already loaded with another map instance, use map.remove() to clear it.")},n._trySetCursor=function(t){return this._cursor||this._priorityCursor||(t||(t="default"),this._setCursorToPanel(t)),this},n._setPriorityCursor=function(t){if(t)this._priorityCursor=t,this._setCursorToPanel(t);else{var e=!1;this._priorityCursor&&(e=!0),delete this._priorityCursor,e&&this.setCursor(this._cursor)}return this},n._setCursorToPanel=function(t){var e=this.getMainPanel();e&&e.style&&e.style.cursor!==t&&(e.style.cursor=t)},n._removeLayer=function(t,e){if(t&&e){var n=e.indexOf(t);n>-1&&e.splice(n,1)}},n._sortLayersByZIndex=function(){if(this._layers){for(var t=0,e=this._layers.length;t<e;t++)this._layers[t]._order=t;this._layers.sort((function(t,e){var n=t.getZIndex()-e.getZIndex();return 0===n?t._order-e._order:n}))}},n._fireEvent=function(t,e){this._eventSilence||(this.fire("_"+t,e),this.fire(t,e))},n._Load=function(){this._resetMapStatus(),this.options.pitch&&(this.setPitch(this.options.pitch),delete this.options.pitch),this.options.bearing&&(this.setBearing(this.options.bearing),delete this.options.bearing),this._loadAllLayers(),this._getRenderer().onLoad(),this._loaded=!0,this._callOnLoadHooks(),this._initTime=f()},n._initRenderer=function(){var t=this.options.renderer,n=e.getRendererClass(t);this._renderer=new n(this),this._renderer.load()},n._getRenderer=function(){return this._renderer},n._loadAllLayers=function(){this._baseLayer&&this._baseLayer.load(),this._eachLayer((function(t){t&&t.load()}),this.getLayers())},n._getLayers=function(t){for(var e=this._baseLayer?[this._baseLayer].concat(this._layers):this._layers,n=[],r=0;r<e.length;r++)t&&!t.call(this,e[r])||n.push(e[r]);return n},n._eachLayer=function(t){if(!(arguments.length<2)){var e=Array.prototype.slice.call(arguments,1);e&&!Array.isArray(e)&&(e=[e]);for(var n=[],r=0,i=e.length;r<i;r++)n=n.concat(e[r]);for(var o=0,a=n.length;o<a;o++)t.call(t,n[o])}},n._onLayerEvent=function(t){t&&"idchange"===t.type&&(delete this._layerCache[t.old],this._layerCache[t.new]=t.target)},n._resetMapStatus=function(){var t=this.getMaxZoom(),e=this.getMinZoom(),n=this._spatialReference.getMaxZoom(),r=this._spatialReference.getMinZoom();(p(t)||-1===t||t>n)&&this.setMaxZoom(n),(p(e)||-1===e||e<r)&&this.setMinZoom(r),(t=this.getMaxZoom())<(e=this.getMinZoom())&&this.setMaxZoom(e),(p(this._zoomLevel)||this._zoomLevel>t)&&(this._zoomLevel=t),this._zoomLevel<e&&(this._zoomLevel=e),delete this._prjCenter;var i=this.getProjection();this._prjCenter=i.project(this._center),this._calcMatrices();var o=this._getRenderer();o&&o.resetContainer()},n._getContainerDomSize=function(){if(!this._containerDOM)return null;var t,e,n=this._containerDOM;if(p(n.width)||p(n.height)){if(p(n.clientWidth)||p(n.clientHeight))throw new Error("can not get size of container");t=parseInt(n.clientWidth,0),e=parseInt(n.clientHeight,0)}else{t=n.width,e=n.height;var r=this.getDevicePixelRatio();1!==r&&n.layer&&(t/=r,e/=r)}return new ge(t,e)},n._updateMapSize=function(t){return this.width=t.width,this.height=t.height,this._getRenderer().updateMapSize(t),this._calcMatrices(),this},n._getPrjCenter=function(){return this._prjCenter},n._setPrjCenter=function(t){this._prjCenter=t,this.isInteracting()&&!this.isMoving()&&(this._mapViewCoord=t),this._calcMatrices()},n._setPrjCoordAtContainerPoint=function(t,e){if(e.x===this.width/2&&e.y===this.height/2)return this;var n=this._containerPointToPoint(e)._sub(this._prjToPoint(this._getPrjCenter())),r=this._pointToPrj(this._prjToPoint(t).sub(n));return this._setPrjCenter(r),this},n._verifyExtent=function(t){if(!t)return!1;var e=this._prjMaxExtent;return!e||e.contains(t)},n._offsetCenterByPixel=function(t){var e=new me(this.width/2-t.x,this.height/2-t.y),n=this._containerPointToPrj(e);return this._setPrjCenter(n),n},n.offsetPlatform=function(t){return t?(this._getRenderer().offsetPlatform(t),this._mapViewCoord=this._getPrjCenter(),this._mapViewPoint=this._mapViewPoint.add(t),this):this._mapViewPoint},n.getViewPoint=function(){var t=this._getViewPointFrameOffset(),e=this.offsetPlatform();return t&&(e=e.add(t)),e},n._resetMapViewPoint=function(){this._mapViewPoint=new me(0,0),this._mapViewCoord=this._getPrjCenter()},n._getResolution=function(t){return void 0!==t&&t!==this._zoomLevel||void 0===this._mapRes?t===this.getGLZoom()&&void 0!==this._mapGlRes?this._mapGlRes:(p(t)&&(t=this._zoomLevel),this._spatialReference.getResolution(t)):this._mapRes},n._getResolutions=function(){return this._spatialReference.getResolutions()},n._prjToPoint=function(t,e,n){return e=p(e)?this.getZoom():e,this._spatialReference.getTransformation().transform(t,this._getResolution(e),n)},n._pointToPrj=function(t,e,n){return e=p(e)?this.getZoom():e,this._spatialReference.getTransformation().untransform(t,this._getResolution(e),n)},n._pointToPoint=function(t,e,n){return n?(n.x=t.x,n.y=t.y):n=t.copy(),p(e)?n:n._multi(this._getResolution(e)/this._getResolution())},n._pointToPointAtZoom=function(t,e,n){return n?(n.x=t.x,n.y=t.y):n=t.copy(),p(e)?n:n._multi(this._getResolution()/this._getResolution(e))},n._containerPointToPrj=function(t,e){return this._pointToPrj(this._containerPointToPoint(t,void 0,e),void 0,e)},n._callOnLoadHooks=function(){var t=e.prototype;if(t._onLoadHooks)for(var n=0,r=t._onLoadHooks.length;n<r;n++)t._onLoadHooks[n].call(this)},e}(En(bn(pr(Mn))));ii.include({coordinateToPoint:function(){var t=new Ln(0,0);return function(e,n,r){var i=this.getProjection().project(e,t);return this._prjToPoint(i,n,r)}}(),pointToCoordinate:function(){var t=new Ln(0,0);return function(e,n,r){var i=this._pointToPrj(e,n,t);return this.getProjection().unproject(i,r)}}(),coordinateToViewPoint:function(){var t=new Ln(0,0);return function(e,n,r){return this._prjToViewPoint(this.getProjection().project(e,t),n,r)}}(),viewPointToCoordinate:function(){var t=new Ln(0,0);return function(e,n){return this.getProjection().unproject(this._viewPointToPrj(e,t),n)}}(),coordinateToContainerPoint:function(){var t=new Ln(0,0);return function(e,n,r){var i=this.getProjection().project(e,t);return this._prjToContainerPoint(i,n,r)}}(),containerPointToCoordinate:function(){var t=new Ln(0,0);return function(e,n){var r=this._containerPointToPrj(e,t);return this.getProjection().unproject(r,n)}}(),containerToExtent:function(){var t=new me(0,0),e=new me(0,0);return function(n){var r=new Zn(this._containerPointToPoint(n.getMin(t),void 0,t),this._containerPointToPoint(n.getMax(e),void 0,e));return this._pointToExtent(r)}}(),distanceToPixel:function(){var t=new me(0,0),e=new me(0,0);return function(n,r,i){var o=this.getProjection();if(!o)return null;var a=this.getScale()/this.getScale(i),s=this.getCenter(),c=o.locate(s,n,r),u=this.coordToContainerPoint(s,void 0,t),l=this.coordToContainerPoint(c,void 0,e);return l._sub(u)._multi(a)._abs(),new ge(l.x,l.y)}}(),distanceToPoint:function(){var t=new me(0,0);return function(e,n,r,i){var o=this.getProjection();if(!o)return null;var a=i||this.getCenter(),s=o.locate(a,e,n),c=this.coordToPoint(a,r,t),u=this.coordToPoint(s,r);return u._sub(c)._abs(),u}}(),pixelToDistance:function(){var t=new Ln(0,0),e=new Ln(0,0);return function(n,r){var i=this.getProjection();if(!i)return null;var o=this.getFullExtent(),a=o.top>o.bottom?-1:1,s=t.set(this.width/2+n,this.height/2+a*r),c=this.containerPointToCoord(s,e);return i.measureLength(this.getCenter(),c)}}(),pointToDistance:function(){var t=new me(0,0),e=new Ln(0,0);return function(n,r,i){var o=this.getProjection();if(!o)return null;var a=this._prjToPoint(this._getPrjCenter(),i,t);a._add(n,r);var s=this.pointToCoord(a,i,e);return o.measureLength(this.getCenter(),s)}}(),locateByPoint:function(){var t=new me(0,0);return function(e,n,r){var i=this.coordToContainerPoint(e,void 0,t);return this.containerPointToCoord(i._add(n,r))}}(),_get2DExtent:function(){var t=new me(0,0);return function(e,n){var r,i=this;return void 0!==e&&e!==this._zoomLevel||!this._mapExtent2D?e===this.getGLZoom()&&this._mapGlExtent2D&&(r=this._mapGlExtent2D):r=this._mapExtent2D,r?n?(n.set(r.xmin,r.ymin,r.xmax,r.ymax),n):r.copy():this.getContainerExtent().convertTo((function(n){return i._containerPointToPoint(n,e,t)}),n)}}(),_pointToExtent:function(){var t=new Ln(0,0),e=new Ln(0,0);return function(n){var r=n.getMin(),i=n.getMax(),o=this.getFullExtent(),a=!o||o.left<=o.right?[r.x,i.x]:[i.x,r.x],s=a[0],c=a[1],u=!o||o.top>o.bottom?[i.y,r.y]:[r.y,i.y],l=u[0],h=u[1],f=r.set(s,h),d=i.set(c,l);return new Vn(this.pointToCoord(f,void 0,t),this.pointToCoord(d,void 0,e),this.getProjection())}}(),_getViewPointFrameOffset:function(){var t=new me(0,0);return function(){if(this.isZooming())return null;var e=this._getPrjCenter();return this._mapViewCoord&&!this._mapViewCoord.equals(e)?this._prjToContainerPoint(this._mapViewCoord)._sub(this._prjToContainerPoint(e,void 0,t)):null}}(),_viewPointToPrj:function(){var t=new me(0,0);return function(e,n){return this._containerPointToPrj(this.viewPointToContainerPoint(e,t),n)}}(),_prjToContainerPoint:function(){var t=new me(0,0);return function(e,n,r,i){return this._pointToContainerPoint(this._prjToPoint(e,n,t),n,i||0,r)}}(),_prjToViewPoint:function(){var t=new me(0,0);return function(e,n,r){var i=this._prjToContainerPoint(e,void 0,t,r);return this.containerPointToViewPoint(i,n)}}(),_viewPointToPoint:function(){var t=new me(0,0);return function(e,n,r){return this._containerPointToPoint(this.viewPointToContainerPoint(e,t),n,r)}}(),_pointToViewPoint:function(){var t=new Ln(0,0);return function(e,n,r){return this._prjToViewPoint(this._pointToPrj(e,n,t),r)}}()}),ii.mergeOptions(ri);var oi=function(t){function e(){return t.apply(this,arguments)||this}fe(e,t);var n=e.prototype;return n.addHooks=function(){this.target&&this.target.on("_dblclick",this._onDoubleClick,this)},n.removeHooks=function(){this.target&&this.target.off("_dblclick",this._onDoubleClick,this)},n._onDoubleClick=function(t){var e=this.target;if(e.options.doubleClickZoom){var n=e.getZoom(),r=t.domEvent.shiftKey?Math.ceil(n)-1:Math.floor(n)+1;e._zoomAnimation(r,t.containerPoint)}},e}(wn);ii.mergeOptions({doubleClickZoom:!0}),ii.addOnLoadHook("addHandler","doubleClickZoom",oi);var ai=function(t){function e(){return t.apply(this,arguments)||this}fe(e,t);var n=e.prototype;return n.addHooks=function(){var t=this.target;if(t){var e=t._panels.mapWrapper||t._containerDOM;this._dragHandler=new Pn(e,{cancelOn:this._cancelOn.bind(this),rightclick:!0}),this._dragHandler.on("mousedown",this._onMouseDown,this).on("dragstart",this._onDragStart,this).on("dragging",this._onDragging,this).on("dragend",this._onDragEnd,this).enable()}},n.removeHooks=function(){this._dragHandler.off("mousedown",this._onMouseDown,this).off("dragstart",this._onDragStart,this).off("dragging",this._onDragging,this).off("dragend",this._onDragEnd,this),this._dragHandler.remove(),delete this._dragHandler},n._cancelOn=function(t){return!(!this.target.isZooming()&&!this._ignore(t))},n._ignore=function(t){return!!t&&(t.domEvent&&(t=t.domEvent),this.target._ignoreEvent(t))},n._onMouseDown=function(t){delete this.startDragTime,delete this._mode,2===t.domEvent.button||t.domEvent.ctrlKey?(this.target.options.dragRotate||this.target.options.dragPitch)&&(this._mode="rotatePitch"):this.target.options.dragPan&&(this._mode="move"),this.target._stopAnim(this.target._mapAnimPlayer),Ge(t.domEvent)},n._onDragStart=function(t){this.startDragTime=f(),"move"===this._mode?this._moveStart(t):"rotatePitch"===this._mode&&this._rotateStart(t)},n._onDragging=function(t){this.target._isEventOutMap(t.domEvent)||("move"===this._mode?this._moving(t):"rotatePitch"===this._mode&&this._rotating(t))},n._onDragEnd=function(t){"move"===this._mode?this._moveEnd(t):"rotatePitch"===this._mode&&this._rotateEnd(t),delete this.startDragTime,delete this.startBearing},n._start=function(t){this.preX=t.mousePos.x,this.preY=t.mousePos.y,this.startX=this.preX,this.startY=this.preY},n._moveStart=function(t){this._start(t);var e=this.target;e.onMoveStart(t);var n=Qe(e._getActualEvent(t.domEvent),e.getContainer());this.startPrjCoord=e._containerPointToPrj(n)},n._moving=function(t){if(this.startDragTime){var e=this.target,n=Qe(e._getActualEvent(t.domEvent),e.getContainer());e._setPrjCoordAtContainerPoint(this.startPrjCoord,n),e.onMoving(t)}},n._moveEnd=function(t){if(this.startDragTime){var e=this.target,n=f()-this.startDragTime,r=t.mousePos.x,i=t.mousePos.y,o=r-this.startX,a=i-this.startY;this._clear(),e.options.panAnimation&&!t.interupted&&e._verifyExtent(e._getPrjCenter())&&n<280&&Math.abs(a)+Math.abs(o)>5?(n=5*n*(Math.abs(o)+Math.abs(a))/500,e.panBy(new me(o,a),{duration:n})):e.onMoveEnd(t)}},n._rotateStart=function(t){this._start(t),delete this._rotateMode,this.startBearing=this.target.getBearing(),this.target.onDragRotateStart(t),this._db=0},n._rotating=function(t){var e=this.target,n=t.mousePos.x,r=t.mousePos.y,i=e.getPitch(),o=e.getBearing(),a=Math.abs(n-this.preX),s=Math.abs(r-this.preY);if(this._rotateMode||(e.options.dragRotatePitch?this._rotateMode="rotate_pitch":this._rotateMode=a>s?"rotate":a<s?"pitch":"rotate"),!("pitch"===this._rotateMode&&0===i&&s<10)){if(this._rotateMode.indexOf("rotate")>=0&&e.options.dragRotate){var c;c=e.options.dragPitch||a>s?-.6*(this.preX-n):n>e.width/2?.6*(this.preY-r):-.6*(this.preY-r);var u=e.getBearing()+c;this._db=this._db||0,this._db+=c,e.setBearing(u)}this._rotateMode.indexOf("pitch")>=0&&e.options.dragPitch&&e.setPitch(e.getPitch()+.4*(this.preY-r)),this.preX=n,this.preY=r,e.getBearing()===o&&e.getPitch()===i||e.onDragRotating(t)}},n._rotateEnd=function(t){var e=this.target,n=e.getBearing();this._clear();var r=f()-this.startDragTime;if(e.onDragRotateEnd(t),Math.abs(n-this.startBearing)>20&&("rotate"===this._rotateMode||"rotate_pitch"===this._rotateMode)&&!t.interupted&&r<400){var i=e.getBearing();e._animateTo({bearing:i+this._db/2},{easing:"out",duration:800})}},n._clear=function(){delete this.startPrjCoord,delete this.preX,delete this.preY,delete this.startX,delete this.startY},e}(wn);ii.mergeOptions({draggable:!0,dragPan:!0,dragRotatePitch:!0,dragRotate:!0,dragPitch:!0}),ii.addOnLoadHook("addHandler","draggable",ai);var si="mousedown mouseup mousemove click dblclick contextmenu touchstart touchmove touchend",ci=function(t){function e(){return t.apply(this,arguments)||this}fe(e,t);var n=e.prototype;return n.addHooks=function(){var t=this.target,e=t._panels.allLayers||t._containerDOM;rn(e,si,this._identifyGeometryEvents,this)},n.removeHooks=function(){var t=this.target,e=t._panels.allLayers||t._containerDOM;on(e,si,this._identifyGeometryEvents,this)},n._identifyGeometryEvents=function(t,e){var n=this.target;if(!n.isInteracting()&&!n._ignoreEvent(t)){var r=n._getLayers((function(t){return!(!t.identify||!t.options.geometryEvents)}));if(r.length){var i=null,o=e||t.type;if("mousedown"===o||"touchstart"===o&&1===t.touches.length)this._mouseDownTime=f();else if(("click"===o||"touchend"===o)&&this._mouseDownTime){var a=this._mouseDownTime;if(delete this._mouseDownTime,f()-a>300){if("click"===o)return}else"touchend"===o&&(i="click")}var s=t.touches&&t.touches.length>0?t.touches[0]:t.changedTouches&&t.changedTouches.length>0?t.changedTouches[0]:t;if(s){var c=Qe(s,n._containerDOM),u=n.containerPointToCoordinate(c);"touchstart"===o&&Ge(t);var l=null,h={includeInternals:!0,filter:function(e){if(!(e instanceof $r))return!1;var n=e._getEventTypeToFire(t);if("mousemove"===o){if(!l&&e.options.cursor&&(l=e.options.cursor),!e.listens("mousemove")&&!e.listens("mouseover")&&!e.listens("mouseenter"))return!1}else if(!e.listens(n)&&!e.listens(i))return!1;return!0},count:1,coordinate:u,onlyVisible:n.options.onlyVisibleGeometryEvents,layers:r},d=function(e){var r=!0;if("mousemove"===o){var a={};if(e.length>0)for(var s=e.length-1;s>=0;s--){var c=e[s];if(c instanceof $r){var u=c._getInternalId();a[u]=c,c._onEvent(t),this._prevOverGeos&&this._prevOverGeos.geomap[u]||c._onEvent(t,"mouseenter"),r=c._onEvent(t,"mouseover")}}n._setPriorityCursor(l);var h=this._prevOverGeos&&this._prevOverGeos.geos;if(this._prevOverGeos={geos:e,geomap:a},h&&h.length>0)for(var f=h.length-1;f>=0;f--){var d=h[f];if(d instanceof $r){var p=h[f]._getInternalId();a[p]||(r=d._onEvent(t,"mouseout"))}}}else{if(!e||!e.length)return;for(var m=e.length-1;m>=0;m--)if(e[m]instanceof $r){r=e[m]._onEvent(t),i&&e[m]._onEvent(t,i);break}}!1===r&&He(t)}.bind(this);"mousemove"===o||"touchmove"===o?this._queryIdentifyTimeout=n.getRenderer().callInNextFrame((function(){n.isInteracting()||n.identify(h,d)})):n.identify(h,d)}}}},e}(wn);ii.mergeOptions({geometryEvents:!0,onlyVisibleGeometryEvents:!0}),ii.addOnLoadHook("addHandler","geometryEvents",ci);var ui=4.000244140625,li=function(t){function e(e){var n;return(n=t.call(this,e)||this)._thisScrollZoom=n._scrollZoom.bind(de(de(n))),n._wheelZoomRate=1/450,n._defaultZoomRate=.01,n._delta=0,n}fe(e,t);var n=e.prototype;return n.addHooks=function(){Ue(this.target._containerDOM,"wheel",this._onWheelScroll,this)},n.removeHooks=function(){Ne(this.target._containerDOM,"wheel",this._onWheelScroll)},n._onWheelScroll=function(t){Ge(t),He(t);var e=this.target;if(e._ignoreEvent(t)||!e.options.zoomable)return!1;var n=e._containerDOM,r=e._checkZoomOrigin(Qe(t,n));return e.options.seamlessZoom?(this._zooming||(this._trackPadSuspect=0,this._ensureTrackpad=!1),this._seamless(t,r)):this._interval(t,r)},n._seamless=function(t,e){var n=t.deltaMode===window.WheelEvent.DOM_DELTA_LINE?60*t.deltaY:t.deltaY;if(n%ui!=0&&(this._ensureTrackpad||(Math.abs(n)<60?this._trackPadSuspect++:this._trackPadSuspect=0,this._trackPadSuspect>=2&&(this._ensureTrackpad=!0)),this._ensureTrackpad&&(n*=14)),t.shiftKey&&n&&(n/=4),this._lastWheelEvent=t,this._delta-=n,!this._zooming&&this._delta){var r=this.target;this._zoomOrigin=e,r.onZoomStart(null,e)}this._start()},n._start=function(){if(this._delta){this._zooming=!0;var t=this.target;this._active||(t.getRenderer().callInNextFrame(this._thisScrollZoom),this._active=!0)}},n._scrollZoom=function(){var t=this;if(this._active=!1,this._delta){var e=Math.abs(this._delta)>ui?this._wheelZoomRate:this._defaultZoomRate,n=2/(1+Math.exp(-Math.abs(this._delta*e)));this._delta<0&&0!==n&&(n=1/n);var r=this.target,i=r.getZoom(),o=r.getZoomForScale(n,i,!0);this._delta=0,r.onZooming(o,this._zoomOrigin),this._timeout&&clearTimeout(this._timeout),this._timeout=setTimeout((function(){t._zooming=!1,delete t._timeout,r.onZoomEnd(r.getZoom(),t._zoomOrigin)}),210)}},n._interval=function(t,e){var n=this,r=this.target;if(this._zooming)return this._requesting++,!1;this._requesting=0;var i=(t.deltaY?-1*t.deltaY:t.wheelDelta?t.wheelDelta:t.detail)>0?1:-1;t.detail&&(i*=-1);var o=r.getZoom(),a=o+i;return(a=r._checkZoom(i>0?Math.ceil(a):Math.floor(a)))===o||(this._zooming=!0,this._delta||(r.onZoomStart(null,e),this._origin=e,this._delta=i,this._startZoom=r.getZoom()),r._animateTo({zoom:a-1*this._delta/2,around:this._origin},{continueOnViewChanged:!0,easing:"linear",duration:90,wheelZoom:!0},(function(e){"finished"===e.state.playState?n._requesting<1||Math.abs(a-n._startZoom)>2||a===r.getMaxZoom()||a===r.getMinZoom()?(r._animateTo({zoom:a,around:n._origin},{continueOnViewChanged:!0,duration:100},(function(t){"running"!==t.state.playState&&(delete n._zooming,delete n._requesting)})),delete n._startZoom,delete n._origin,delete n._delta,n._requesting=0):p(n._requesting)||(delete n._zooming,n._onWheelScroll(t)):"running"!==e.state.playState&&(delete n._zooming,delete n._requesting)}))),!1},e}(wn);ii.mergeOptions({scrollWheelZoom:!0,seamlessZoom:!1}),ii.addOnLoadHook("addHandler","scrollWheelZoom",li);var hi=function(t){function e(){return t.apply(this,arguments)||this}fe(e,t);var n=e.prototype;return n.addHooks=function(){Ue(this.target.getContainer(),"touchstart",this._onTouchStart,this)},n.removeHooks=function(){Ne(this.target.getContainer(),"touchstart",this._onTouchStart)},n._onTouchStart=function(t){var e=this.target;if(t.touches&&!(t.touches.length<2)){var n=e.getContainer(),r=Qe(t.touches[0],n),i=Qe(t.touches[1],n);this.preY=r.y,this._startP1=r,this._startP2=i,this._startDist=r.distanceTo(i),this._startVector=r.sub(i),this._startZoom=e.getZoom(),this._startBearing=e.getBearing(),on(document,"touchmove",this._onTouchMove,this),on(document,"touchend",this._onTouchEnd,this),Ue(document,"touchmove",this._onTouchMove,this),Ue(document,"touchend",this._onTouchEnd,this),Ge(t),e._fireEvent("touchactstart")}},n._onTouchMove=function(t){var e=this.target;if(t.touches&&!(t.touches.length<2)){var n=e.getContainer(),r=Qe(t.touches[0],n),i=Qe(t.touches[1],n),o=r.sub(this._startP1),a=i.sub(this._startP2),s=r.sub(i),c=r.distanceTo(i)/this._startDist,u=180*s.angleWith(this._startVector)/Math.PI,l=.4*((this.preY||r.y)-r.y);this.preY=r.y;var h={domEvent:t,mousePos:[r,i]};if(this.mode||(e.options.touchRotate&&Math.abs(u)>8?this.mode=e.options.touchZoomRotate?"rotate_zoom":"rotate":e.options.touchPitch&&o.y*a.y>0&&Math.abs(o.y)>10&&Math.abs(a.y)>10?this.mode="pitch":e.options.zoomable&&e.options.touchZoom&&Math.abs(1-c)>.15&&(this.mode=e.options.touchZoomRotate&&e.options.touchRotate?"rotate_zoom":"zoom"),this._startTouching(h)),"zoom"===this.mode||"rotate_zoom"===this.mode){this._scale=c;var f=e._getResolution(this._startZoom)/c,d=e.getZoomFromRes(f);e.onZooming(d,this._Origin)}"rotate"===this.mode||"rotate_zoom"===this.mode?(e.setBearing(this._startBearing+u),e.onDragRotating(h)):"pitch"===this.mode&&(e.setPitch(e.getPitch()+l),e.onDragRotating(h)),e._fireEvent("touchactinging")}},n._startTouching=function(t){var e=this.target;if("zoom"===this.mode||"rotate_zoom"===this.mode){var n=e.getSize();this._Origin=new me(n.width/2,n.height/2),e.onZoomStart(null,this._Origin)}"rotate"!==this.mode&&"pitch"!==this.mode&&"rotate_zoom"!==this.mode||e.onDragRotateStart(t)},n._onTouchEnd=function(t){delete this.preY;var e=this.target;if(on(document,"touchmove",this._onTouchMove,this),on(document,"touchend",this._onTouchEnd,this),"zoom"===this.mode||"rotate_zoom"===this.mode){var n=this._scale,r=e._getResolution(this._startZoom)/n,i=e.getZoomFromRes(r);e.onZoomEnd(i,this._Origin)}"pitch"!==this.mode&&"rotate"!==this.mode&&"rotate_zoom"!==this.mode||e.onDragRotateEnd({domEvent:t}),delete this.mode,e._fireEvent("touchactend")},e}(wn);ii.mergeOptions({touchGesture:!0,touchZoom:!0,touchPitch:!0,touchRotate:!0,touchZoomRotate:!1}),ii.addOnLoadHook("addHandler","touchGesture",hi);var fi="__anim_player",di={in:function(t){return Math.pow(t,2)},out:function(t){return 1-di.in(1-t)},inAndOut:function(t){return 3*t*t-2*t*t*t},linear:function(t){return t},upAndDown:function(t){return t<.5?di.inAndOut(2*t):1-di.inAndOut(2*(t-.5))}},pi=function(t,e){this.state=t,this.styles=e},mi=function(t,e,n,r){this._animation=t,this.options=e,this._onFrame=n,this.playState="idle",this.ready=!0,this.finished=!1,this.target=r},gi={speed:{slow:2e3,normal:1e3,fast:500},_resolveStyles:function(t){if(!t)return null;function e(t){if(!Array.isArray(t))return gi._resolveStyles(t);for(var e=[],n=[],r=[],i=0;i<t.length;i++){var o=gi._resolveStyles(t[i]);o&&(e.push(o[0]),n.push(o[1]),r.push(o[2]))}return e.length?[e,n,r]:null}function n(t){var e,n=t;Array.isArray(t)||(n=m(t)?[0,t]:t instanceof me||t instanceof Ln?[new(e=t.constructor)(0,0),t]:[t,t]);var r=n[0],i=n[1];return m(r)&&m(i)?r===i?null:[r,i-r,i]:Array.isArray(r)&&m(r[0])||r instanceof Ln||r instanceof me?(Array.isArray(r)?(r=new Ln(r),i=new Ln(i)):(r=new(e=r.constructor)(r),i=new e(i)),r.equals(i)?null:[r,i.sub(r),i]):[r,i,i]}function r(t){return!Array.isArray(t)&&t.constructor===Object||!(!Array.isArray(t)||t[0].constructor!==Object)}var i={},o={},a={};for(var s in t)if(t.hasOwnProperty(s)){var c,u=t[s];if(!u)continue;if(Array.isArray(u)&&(p(u[0])||p(u[1])))continue;(c=r(u)?e(u):n(u))&&(o[s]=c[0],i[s]=c[1],a[s]=c[2])}return[o,i,a]},framing:function(t,e){e||(e={});var n,r,i,o=e.easing?di[e.easing]:di.linear;return o||(o=di.linear),(t=gi._resolveStyles(t))&&(r=t[0],n=t[1],i=t[2]),function(t,e){var a,s;if(t<0)a={playState:"idle",delta:0},s=r;else if(t<e){var c=o(t/e);a={playState:"running",delta:c},s=function t(e,n,r){if(!n||!r)return null;var o={};for(var a in r)if(r.hasOwnProperty(a)){if(n[a]===i[a]){o[a]=n[a];continue}var s=n[a],c=r[a];if(m(c))o[a]=s+e*c;else if(Array.isArray(c)){for(var u=[],l=0;l<c.length;l++)u.push(t(e,s[l],c[l]));o[a]=u}else{var h=c.constructor;o[a]=h===Object?t(e,s,c):s instanceof me||s instanceof Ln?s.add(c.multi(e)):c}}return o}(c,r,n)}else a={playState:"finished",delta:1},s=i;return a.startStyles=r,a.destStyles=i,a.progress=t,a.remainingMs=e-t,new pi(a,s)}},_requestAnimFrame:function(t){this._frameQueue||(this._frameQueue=[]),this._frameQueue.push(t),this._a()},_a:function(){this._animationFrameId||(this._animationFrameId=A(gi._frameFn))},_run:function(){if(this._frameQueue.length){var t=this._frameQueue;this._frameQueue=[];for(var e=0,n=t.length;e<n;e++)t[e]();this._frameQueue.length?this._animationFrameId=A(gi._frameFn):delete this._animationFrameId}},animate:function(t,e,n,r){e||(e={});var i=gi.framing(t,e);return new mi(i,e,n,r)}};gi._frameFn=gi._run.bind(gi),d(mi.prototype,{_prepare:function(){var t=this.options,e=t.speed||t.duration;y(e)&&((e=gi.speed[e])||(e=+e)),e||(e=gi.speed.normal),this.duration=e,this._framer=t.framer||gi._requestAnimFrame.bind(gi)},play:function(){if("idle"!==this.playState&&"paused"!==this.playState||this.target&&this.target[fi])return this;this.target&&(this.target[fi]=1),"idle"===this.playState&&(this.currentTime=0,this._prepare());var t=f();if(!this.startTime){var e=this.options;this.startTime=e.startTime?e.startTime:t}return this._playStartTime=Math.max(t,this.startTime),"paused"===this.playState&&(this._playStartTime-=this.currentTime),this.playState="running",this._run(),this},pause:function(){return"paused"===this.playState||(this.playState="paused",this._run()),this},cancel:function(){return"idle"===this.playState||(this.playState="idle",this.finished=!1,this._run()),this},finish:function(){return"finished"===this.playState||(this.playState="finished",this.finished=!0,this._run()),this},reverse:function(){},_run:function(){var t=this,e=this._onFrame,n=f(),r=n-this._playStartTime;if(this.options.repeat&&r>=this.duration&&(this._playStartTime=n,r=0),"running"===this.playState){var i=this._animation(r,this.duration);this.playState=i.state.playState,"running"!==this.playState&&this.target&&delete this.target[fi],"idle"===this.playState?this.startTime>n&&setTimeout(this._run.bind(this),this.startTime-n):"running"===this.playState?this._framer((function(){"running"===t.playState&&(t.currentTime=r,e&&e(i),t._run())})):"finished"===this.playState&&(this.finished=!0,e&&e(i))}else if(this.target&&delete this.target[fi],e){"finished"===this.playState?r=this.duration:"idle"===this.playState&&(r=0);var o=this._animation(r,this.duration);o.state.playState=this.playState,e(o)}}});var vi=Object.freeze({Animation:gi,Easing:di,Player:mi,Frame:pi}),yi=vn((function(t){!function(){function e(t,e){var n=t.x-e.x,r=t.y-e.y;return n*n+r*r}function n(t,e,n){var r=e.x,i=e.y,o=n.x-r,a=n.y-i;if(0!==o||0!==a){var s=((t.x-r)*o+(t.y-i)*a)/(o*o+a*a);s>1?(r=n.x,i=n.y):s>0&&(r+=o*s,i+=a*s)}return(o=t.x-r)*o+(a=t.y-i)*a}function r(t,n){for(var r,i=t[0],o=[i],a=1,s=t.length;a<s;a++)e(r=t[a],i)>n&&(o.push(r),i=r);return i!==r&&o.push(r),o}function i(t,e,r,o,a){for(var s,c=o,u=e+1;u<r;u++){var l=n(t[u],t[e],t[r]);l>c&&(s=u,c=l)}c>o&&(s-e>1&&i(t,e,s,o,a),a.push(t[s]),r-s>1&&i(t,s,r,o,a))}function o(t,e){var n=t.length-1,r=[t[0]];return i(t,0,n,e,r),r.push(t[n]),r}function a(t,e,n){if(t.length<=2)return t;var i=void 0!==e?e*e:1;return t=o(t=n?t:r(t,i),i)}t.exports=a,t.exports.default=a}()})),_i=function(t){function e(){return t.apply(this,arguments)||this}fe(e,t);var n=e.prototype;return n.getOutline=function(){if(!this._getPainter())return null;var t=this.getExtent();return new xi(t.toArray(),{symbol:{lineWidth:1,lineColor:"6b707b"}})},n.animateShow=function(t,e){var n=this;void 0===t&&(t={}),this._showPlayer&&this._showPlayer.finish(),_(t)&&(e=t={});var r=this.getCoordinates();if(0===r.length)return this;this._animIdx=0,this._animLenSoFar=0,this.show();var i=this.getShell?this.getShell().concat(this.getShell()[0]):this.getCoordinates(),o=this._getProjection(),a=o.projectCoords(i);this._prjAniShowCenter=this._getPrjExtent().getCenter(),this._aniShowCenter=o.unproject(this._prjAniShowCenter);var s=t.duration||1e3,c=t.easing||"out";this.setCoordinates([]);for(var u=0,l=1;l<a.length;l++)u+=a[l].distanceTo(a[l-1]);var h=this._showPlayer=gi.animate({t:s},{duration:s,easing:c},(function(t){if(n.getMap()){var o=n._drawAnimShowFrame(t.styles.t,s,u,i,a);"finished"===t.state.playState&&(delete n._showPlayer,delete n._aniShowCenter,delete n._prjAniShowCenter,delete n._animIdx,delete n._animLenSoFar,delete n._animTailRatio,n.setCoordinates(r)),e&&e(t,o)}else if("finished"!==h.playState&&(h.finish(),e)){var c=n.getCoordinates();e(t,c[c.length-1])}}),this);return h.play(),h},n._drawAnimShowFrame=function(t,e,n,r,i){if(0===t)return r[0];var o,a,s=this._getProjection(),c=t/e*n,u=0;for(o=this._animIdx,a=i.length;o<a-1&&(u=i[o].distanceTo(i[o+1]),!(this._animLenSoFar+u>c));o++)this._animLenSoFar+=u;if(this._animIdx=o,this._animIdx>=a-1)return this.setCoordinates(r),r[r.length-1];var l=this._animIdx,h=i[l],f=i[l+1],d=(c-this._animLenSoFar)/u;this._animTailRatio=d;var p=h.x+(f.x-h.x)*d,m=h.y+(f.y-h.y)*d,g=new Ln(p,m),v=s.unproject(g),y=!!this.getShell;if(!y&&this.options.smoothness>0){var _=r.slice(0,this._animIdx+3);this.setCoordinates(_);var b=i.slice(0,this._animIdx+3);this._setPrjCoordinates(b)}else{var x=r.slice(0,this._animIdx+1);x.push(v);var w=i.slice(0,this._animIdx+1);w.push(g),y?(this.setCoordinates([this._aniShowCenter].concat(x)),this._setPrjCoordinates([this._prjAniShowCenter].concat(w))):(this.setCoordinates(x),this._setPrjCoordinates(w))}return v},n._getCenterInExtent=function(t,e,n){var r=this.getExtent();if(!t.intersects(r))return null;var i=n(e,t);if(0===i.length)return null;var o=0,a=0,s=0;i.forEach((function(t){Array.isArray(t)?t.forEach((function(t){t.point&&(t=t.point),o+=t.x,a+=t.y,s++})):(t.point&&(t=t.point),o+=t.x,a+=t.y,s++)}));var c=new Ln(o,a)._multi(1/s);return c.count=s,c},n._getPath2DPoints=function(t,e,n){if(!H(t))return[];var r=this.getMap(),i=!e&&this._shouldSimplify(),o=this.options.simplifyTolerance*r._getResolution(),a=Array.isArray(t[0]);if(delete this._simplified,i&&!a){var s=t.length;t=yi(t,o,!1),this._simplified=t.length<s}return p(n)&&(n=r.getZoom()),D(t,(function(t){return r._prjToPoint(t,n)}))},n._shouldSimplify=function(){var t=this.getLayer(),e=this.getProperties(),n=e&&t.options.enableAltitude&&!p(e[t.options.altitudeProperty]);return t&&t.options.enableSimplify&&!n&&this.options.enableSimplify&&!this._showPlayer},n._setPrjCoordinates=function(t){this._prjCoords=t,this.onShapeChanged()},n._getPrjCoordinates=function(){return this._verifyProjection(),!this._prjCoords&&this._getProjection()&&(this._prjCoords=this._projectCoords(this._coordinates)),this._prjCoords},n._updateCache=function(){this._clearCache(),this._getProjection()&&this._prjCoords&&(this._coordinates=this._unprojectCoords(this._getPrjCoordinates()))},n._clearProjection=function(){this._prjCoords=null,t.prototype._clearProjection.call(this)},n._projectCoords=function(t){var e=this._getProjection();return e?e.projectCoords(t):[]},n._unprojectCoords=function(t){var e=this._getProjection();return e?e.unprojectCoords(t):[]},n._computeCenter=function(){var t=this._coordinates;if(!H(t))return null;for(var e=0,n=0,r=0,i=t.length,o=0;o<i;o++)t[o]&&m(t[o].x)&&m(t[o].y)&&(e+=t[o].x,n+=t[o].y,r++);return new Ln(e/r,n/r)},n._computeExtent=function(){var t=this._coordinates;if(!H(t))return null;var e=[t];return this.hasHoles&&this.hasHoles()&&e.push.apply(e,this.getHoles()),this._coords2Extent(e,this._getProjection())},n._computePrjExtent=function(){var t=[this._getPrjCoordinates()];return this.hasHoles&&this.hasHoles()&&t.push.apply(t,this._getPrjHoles()),this._coords2Extent(t)},n._get2DLength=function(){for(var t=this._getPath2DPoints(this._getPrjCoordinates(),!0),e=0,n=1,r=t.length;n<r;n++)e+=t[n].distanceTo(t[n-1]);return e},n._hitTestTolerance=function(){var t,e=this._getInternalSymbol();if(Array.isArray(e)){t=0;for(var n=0;n<e.length;n++)m(e[n].lineWidth)&&e[n].lineWidth>t&&(t=e[n].lineWidth)}else t=e.lineWidth;return m(t)?t/2:1.5},n._coords2Extent=function(t,e){for(var n=new Vn(e),r=0,i=t.length;r<i;r++)for(var o=0,a=t[r].length;o<a;o++)n._combine(t[r][o]);return n},e}($r);_i.mergeOptions({smoothness:0,enableClip:!0,enableSimplify:!0,simplifyTolerance:2,symbol:{lineColor:"#000",lineWidth:2,lineOpacity:1,polygonFill:"#fff",polygonOpacity:1,opacity:1}});var bi="Polygon",xi=function(t){function e(e,n){var r;return(r=t.call(this,n)||this).type="Polygon",e&&r.setCoordinates(e),r}fe(e,t);var n=e.prototype;return n.setCoordinates=function(t){if(!t)return this._coordinates=null,this._holes=null,this._projectRings(),this;var e=Ln.toCoordinates(t),n=e.length;if(Array.isArray(e[0])){if(this._coordinates=this._trimRing(e[0]),n>1){for(var r=[],i=1;i<n;i++)e[i]&&r.push(this._trimRing(e[i]));this._holes=r}}else this._coordinates=this._trimRing(e);return this._projectRings(),this},n.getCoordinates=function(){if(!this._coordinates)return[];for(var t=this.getHoles(),e=[this._copyAndCloseRing(this._coordinates)],n=0,r=t.length;n<r;n++)e.push(this._copyAndCloseRing(t[n]));return e},n.getCenterInExtent=function(t){return this._getCenterInExtent(t,this.getShell(),_r)},n.getShell=function(){return this._coordinates||[]},n.getHoles=function(){return this._holes||[]},n.hasHoles=function(){return this.getHoles().length>0},n._projectRings=function(){this.getMap()?(this._prjCoords=this._projectCoords(this._coordinates),this._prjHoles=this._projectCoords(this._holes),this.onShapeChanged()):this.onShapeChanged()},n._setPrjCoordinates=function(t){this._prjCoords=t,this.onShapeChanged()},n._cleanRing=function(t){for(var e=t.length-1;e>=0;e--)t[e]||t.splice(e,1)},n._checkRing=function(t){if(this._cleanRing(t),!t||!H(t))return!1;var e=t[t.length-1],n=!0;return t[0].x===e.x&&t[0].y===e.y||(n=!1),n},n._trimRing=function(t){var e=this._checkRing(t);return H(t)&&e&&t.splice(t.length-1,1),t},n._copyAndCloseRing=function(t){t=t.slice(0);var e=this._checkRing(t);return H(t)&&!e?(t.push(t[0].copy()),t):t},n._getPrjShell=function(){return this.getJSONType()===bi?this._getPrjCoordinates():(this._verifyProjection(),this._getProjection()&&!this._prjShell&&(this._prjShell=this._projectCoords(this.getShell())),this._prjShell)},n._getPrjHoles=function(){var t=this._getProjection();return this._verifyProjection(),t&&!this._prjHoles&&(this._prjHoles=this._projectCoords(this.getHoles())),this._prjHoles},n._computeGeodesicLength=function(t){var e=this.getCoordinates();if(!H(e))return 0;for(var n=0,r=0,i=e.length;r<i;r++)n+=t.measureLength(e[r]);return n},n._computeGeodesicArea=function(t){var e=this.getCoordinates();if(!H(e))return 0;for(var n=t.measureArea(e[0]),r=1,i=e.length;r<i;r++)n-=t.measureArea(e[r]);return n},n._updateCache=function(){t.prototype._updateCache.call(this),this._prjHoles&&(this._holes=this._unprojectCoords(this._getPrjHoles()))},n._clearCache=function(){return delete this._prjShell,t.prototype._clearCache.call(this)},n._clearProjection=function(){this._prjHoles&&(this._prjHoles=null),this._prjShell&&(this._prjShell=null),t.prototype._clearProjection.call(this)},e}(_i);function wi(t){return function(t){function e(){return t.apply(this,arguments)||this}fe(e,t);var n=e.prototype;return n.getCoordinates=function(){return this._coordinates},n.setCoordinates=function(t){var e=t instanceof Ln?t:new Ln(t);if(e.equals(this._coordinates))return this;if(this._coordinates=e,!this.getMap())return this.onPositionChanged(),this;var n=this._getProjection();return this._setPrjCoordinates(n.project(this._coordinates)),this},n._getCenter2DPoint=function(t){var e=this.getMap();if(!e)return null;var n=p(t)?e.getZoom():e.getGLZoom(),r=this._getPrjCoordinates();return r?e._prjToPoint(r,n):null},n._getPrjCoordinates=function(){var t=this._getProjection();return this._verifyProjection(),!this._pcenter&&t&&this._coordinates&&(this._pcenter=t.project(this._coordinates)),this._pcenter},n._setPrjCoordinates=function(t){this._pcenter=t,this.onPositionChanged()},n._updateCache=function(){this._clearCache();var t=this._getProjection();this._pcenter&&t&&(this._coordinates=t.unproject(this._pcenter))},n._clearProjection=function(){this._pcenter=null,t.prototype._clearProjection.call(this)},n._computeCenter=function(){return this._coordinates?this._coordinates.copy():null},e}(t)}xi.registerJSONType(bi);var Mi=function(t){function e(e,n){var r;return(r=t.call(this,n)||this).type="Point",e&&r.setCoordinates(e),r}fe(e,t);var n=e.prototype;return n.getOutline=function(){var t=this._getPainter();if(!t)return null;var n=this.getCoordinates(),r=t.getContainerExtent(),i=this.getMap().coordToContainerPoint(n);return new e(n,{symbol:{markerType:"square",markerWidth:r.getWidth(),markerHeight:r.getHeight(),markerLineWidth:1,markerLineColor:"6b707b",markerFill:"rgba(0, 0, 0, 0)",markerDx:r.xmin-(i.x-r.getWidth()/2),markerDy:r.ymin-(i.y-r.getHeight()/2)}})},n._isVectorMarker=function(){var t=this._getInternalSymbol();return!Array.isArray(t)&&Tr.test(t)},n._canEdit=function(){var t=this._getInternalSymbol();return!Array.isArray(t)&&(Tr.test(t)||Fr.test(t)||Pr.test(t))},n._containsPoint=function(e,n){var r=this.getContainerExtent();return n&&(r=r.expand(n)),!!r.contains(e)&&(!this.options.hitTestForEvent||t.prototype._containsPoint.call(this,e,n))},n._computeExtent=function(){return Si.call(this,"getCenter")},n._computePrjExtent=function(){return Si.call(this,"_getPrjCoordinates")},n._computeGeodesicLength=function(){return 0},n._computeGeodesicArea=function(){return 0},n._getSprite=function(t,e){return this._getPainter()?this._getPainter().getSprite(t,e):new Xr(this).getSprite(t,e)},e}(wi($r));function Si(t){var e=this[t]();return e?new Vn(e,e,this._getProjection()):null}Mi.mergeOptions({symbol:{markerType:"path",markerPath:[{path:"M8 23l0 0 0 0 0 0 0 0 0 0c-4,-5 -8,-10 -8,-14 0,-5 4,-9 8,-9l0 0 0 0c4,0 8,4 8,9 0,4 -4,9 -8,14z M3,9 a5,5 0,1,0,0,-0.9Z",fill:"#DE3333"}],markerPathWidth:16,markerPathHeight:23,markerWidth:24,markerHeight:34},hitTestForEvent:!1}),Mi.registerJSONType("Marker");var Ai=function(t){function e(e,n){var r;return(r=t.call(this,n)||this).type="LineString",e&&r.setCoordinates(e),r}fe(e,t);var n=e.prototype;return n.setCoordinates=function(t){return t?(this._coordinates=Ln.toCoordinates(t),this.getMap()?this._setPrjCoordinates(this._projectCoords(this._coordinates)):this.onShapeChanged(),this):(this._coordinates=null,this._setPrjCoordinates(null),this)},n.getCoordinates=function(){return this._coordinates||[]},n.getCenterInExtent=function(t){return this._getCenterInExtent(t,this.getCoordinates(),vr)},n._computeGeodesicLength=function(t){return t.measureLength(this.getCoordinates())},n._computeGeodesicArea=function(){return 0},e}(_i);Ai.mergeOptions({arrowStyle:null,arrowPlacement:"vertex-last"}),Ai.registerJSONType("LineString");var Ei=function(t){function e(e,n){var r;return(r=t.call(this,n)||this).type="GeometryCollection",r.setGeometries(e),r}fe(e,t);var n=e.prototype;return n.setGeometries=function(t){for(var e=this._checkGeometries(t||[]),n=this._getSymbol(),r=this.config(),i=e.length-1;i>=0;i--)e[i]._initOptions(r),e[i]._setParent(this),e[i]._setEventParent(this),n&&e[i].setSymbol(n);return this._geometries=e,this.getLayer()&&(this._bindGeometriesToLayer(),this.onShapeChanged()),this},n.getGeometries=function(){return this._geometries||[]},n.forEach=function(t,e){for(var n=this.getGeometries(),r=0,i=n.length;r<i;r++)n[r]&&(e?t.call(e,n[r],r):t(n[r],r));return this},n.filter=function(t,n){if(!t)return new e;var r=[],i=_(t),o=i?t:rt(t);return this.forEach((function(t){var e=i?t:ft(t);(n?o.call(n,e):o(e))&&r.push(t)}),this),new e(r)},n.translate=function(t){if(!t)return this;if(this.isEmpty())return this;var e=arguments;return this.forEach((function(t){t&&t.translate&&t.translate.apply(t,e)})),this},n.isEmpty=function(){return!H(this.getGeometries())},n.remove=function(){return this.forEach((function(t){t._unbind()})),$r.prototype.remove.apply(this,arguments)},n.show=function(){return this.options.visible=!0,this.forEach((function(t){t.show()})),this},n.hide=function(){return this.options.visible=!1,this.forEach((function(t){t.hide()})),this},n.onConfig=function(t){this.forEach((function(e){e.config(t)}))},n.getSymbol=function(){var e=t.prototype.getSymbol.call(this);if(!e){var n=[],r=!1;this.forEach((function(t){t.getSymbol()&&!r&&(r=!0),n.push(t.getSymbol())})),r&&(e={children:n})}return e},n.setSymbol=function(t){if(t&&t.children)this._symbol=null,this.forEach((function(e,n){e.setSymbol(t.children[n])}));else{var e=this._prepareSymbol(t);this._symbol=e,this.forEach((function(t){t.setSymbol(e)}))}return this.onSymbolChanged(),this},n._setExternSymbol=function(t){return t=this._prepareSymbol(t),this._externSymbol=t,this.forEach((function(e){e._setExternSymbol(t)})),this.onSymbolChanged(),this},n._bindLayer=function(){t.prototype._bindLayer.apply(this,arguments),this._bindGeometriesToLayer()},n._bindGeometriesToLayer=function(){var t=this.getLayer();this.forEach((function(e){e._bindLayer(t)}))},n._checkGeometries=function(t){var e="The geometry added to collection is invalid.";if(t&&!Array.isArray(t)){if(t instanceof $r)return[t];throw new Error(e)}for(var n=0,r=t.length;n<r;n++)if(!this._checkGeo(t[n]))throw new Error(e+" Index: "+n);return t},n._checkGeo=function(t){return t instanceof $r},n._updateCache=function(){this._clearCache(),this.isEmpty()||this.forEach((function(t){t&&t._updateCache&&t._updateCache()}))},n._removePainter=function(){this._painter&&this._painter.remove(),delete this._painter,this.forEach((function(t){t._removePainter()}))},n._computeCenter=function(t){if(!t||this.isEmpty())return null;for(var e=0,n=0,r=0,i=this.getGeometries(),o=0,a=i.length;o<a;o++)if(i[o]){var s=i[o]._computeCenter(t);s&&(e+=s.x,n+=s.y,r++)}return 0===r?null:new Ln(e/r,n/r)},n._containsPoint=function(t,e){if(this.isEmpty())return!1;for(var n=this.getGeometries(),r=0,i=n.length;r<i;r++)if(n[r]._containsPoint(t,e))return!0;return!1},n._computeExtent=function(t){return Ci.call(this,t,"_computeExtent")},n._computePrjExtent=function(t){return Ci.call(this,t,"_computePrjExtent")},n._computeGeodesicLength=function(t){if(!t||this.isEmpty())return 0;for(var e=this.getGeometries(),n=0,r=0,i=e.length;r<i;r++)e[r]&&(n+=e[r]._computeGeodesicLength(t));return n},n._computeGeodesicArea=function(t){if(!t||this.isEmpty())return 0;for(var e=this.getGeometries(),n=0,r=0,i=e.length;r<i;r++)e[r]&&(n+=e[r]._computeGeodesicArea(t));return n},n._exportGeoJSONGeometry=function(){var t=[];if(!this.isEmpty())for(var e=this.getGeometries(),n=0,r=e.length;n<r;n++)e[n]&&t.push(e[n]._exportGeoJSONGeometry());return{type:"GeometryCollection",geometries:t}},n._clearProjection=function(){if(!this.isEmpty())for(var t=this.getGeometries(),e=0,n=t.length;e<n;e++)t[e]&&t[e]._clearProjection()},n._getConnectPoints=function(){var t=this.getExtent();return[new Ln(t.xmin,t.ymax),new Ln(t.xmax,t.ymin),new Ln(t.xmin,t.ymin),new Ln(t.xmax,t.ymax)]},n._getExternalResources=function(){if(this.isEmpty())return[];for(var t,e,n=this.getGeometries(),r=[],i={},o=0,a=n.length;o<a;o++)if(n[o])for(var s=0,c=(t=It(n[o]._getInternalSymbol())).length;s<c;s++)i[e=t[s].join()]||(r.push(t[s]),i[e]=1);return r},n.startEdit=function(t){var e=this;if(this.isEmpty())return this;t||(t={}),t.symbol&&(this._originalSymbol=this.getSymbol(),this.setSymbol(t.symbol)),this._draggbleBeforeEdit=this.options.draggable,this.config("draggable",!1);for(var n=this.getGeometries(),r=0,i=n.length;r<i;r++)n[r].startEdit(t);return this._editing=!0,this.hide(),setTimeout((function(){e.fire("editstart")}),1),this},n.endEdit=function(){if(this.isEmpty())return this;for(var t=this.getGeometries(),e=0,n=t.length;e<n;e++)t[e].endEdit();return this._originalSymbol&&(this.setSymbol(this._originalSymbol),delete this._originalSymbol),this._editing=!1,this.show(),this.config("draggable",this._draggbleBeforeEdit),this.fire("editend"),this},n.isEditing=function(){return!!this._editing},e}($r);function Ci(t,e){if(this.isEmpty())return null;for(var n=this.getGeometries(),r=null,i=0,o=n.length;i<o;i++){var a=n[i];if(a){var s=a[e](t);s&&(r=s.combine(r))}}return r}Ei.registerJSONType("GeometryCollection");var Ti=function(t){function e(e,n,r,i){var o;return(o=t.call(this,null,i)||this).GeometryType=e,o.type=n,o._initData(r),o}fe(e,t);var n=e.prototype;return n.getCoordinates=function(){for(var t=[],e=this.getGeometries(),n=0,r=e.length;n<r;n++){var i=e[n];t.push(i.getShell&&"Polygon"!==i.getJSONType()?[i.getShell()]:i.getCoordinates())}return t},n.setCoordinates=function(t){for(var e=[],n=0,r=(t=t||[]).length;n<r;n++){var i=new this.GeometryType(t[n],this.config());e.push(i)}return this.setGeometries(e),this},n._initData=function(t){(t=t||[]).length&&(t[0]instanceof this.GeometryType?this.setGeometries(t):this.setCoordinates(t))},n._checkGeo=function(t){return t instanceof this.GeometryType},n._exportGeoJSONGeometry=function(){var t=this.getCoordinates(),e=Ln.toNumberArrays(t);return{type:this.getType(),coordinates:e}},e}(Ei),Ii=function(t){function e(e,n){return t.call(this,Mi,"MultiPoint",e,n)||this}return fe(e,t),e.prototype.findClosest=function(t){if(!t)return null;var e=this.getCoordinates(),n=null,r=1/0;return e.forEach((function(e){var i=function(t,e){var n=e.x-t.x,r=e.y-t.y;return Math.sqrt(n*n+r*r)}(e,t);i<r&&(n=e,r=i)})),n},e}(Ti);Ii.registerJSONType("MultiPoint");var Pi=function(t){function e(){return t.apply(this,arguments)||this}return fe(e,t),e.prototype.getCenterInExtent=function(t){var e=this.getGeometries(),n=0,r=0,i=0;return e.forEach((function(e){var o=e.getCenterInExtent(t);o&&(n+=o.x*o.count,r+=o.y*o.count,i+=o.count)})),0===i?null:new Ln(n,r)._multi(1/i)},e}(Ti),Li=function(t){function e(e,n){return t.call(this,Ai,"MultiLineString",e,n)||this}return fe(e,t),e}(Pi);Li.registerJSONType("MultiLineString");var Ri=function(t){function e(e,n){return t.call(this,xi,"MultiPolygon",e,n)||this}return fe(e,t),e}(Pi);Ri.registerJSONType("MultiPolygon");var Oi={Marker:Mi,LineString:Ai,Polygon:xi,MultiPoint:Ii,MultiLineString:Li,MultiPolygon:Ri},ki={toGeometry:function(t,e){if(y(t)&&(t=O(t)),Array.isArray(t)){for(var n=[],r=0,i=t.length;r<i;r++){var o=ki._convert(t[r],e);Array.isArray(o)?k(n,o):n.push(o)}return n}return ki._convert(t,e)},_convert:function(t,e){if(!t||p(t.type))return null;var n=t.type;if("Feature"===n){var r=t.geometry,i=ki._convert(r);return i?(i.setId(t.id),i.setProperties(t.properties),e&&e(i),i):null}if("FeatureCollection"===n){var o=t.features;return o?ki.toGeometry(o,e):null}if(["Point","LineString","Polygon","MultiPoint","MultiLineString","MultiPolygon"].indexOf(n)>=0){var a=new Oi["Point"===n?"Marker":n](t.coordinates);return e&&e(a),a}if("GeometryCollection"===n){var s=t.geometries;if(!H(s)){var c=new Ei;return e&&e(c),c}for(var u=[],l=s.length,h=0;h<l;h++)u.push(ki._convert(s[h]));var f=new Ei(u);return e&&e(f),f}return null}},Bi=function(t){function e(e,n,r){var i;return i=t.call(this,null,r)||this,e&&i.setCoordinates(e),i._radius=n,i}fe(e,t),e.fromJSON=function(t){var n=t.feature,r=new e(t.coordinates,t.radius,t.options);return r.setProperties(n.properties),r};var n=e.prototype;return n.getRadius=function(){return this._radius},n.setRadius=function(t){return this._radius=t,this.onShapeChanged(),this},n.getShell=function(){for(var t,e,n,r=this._getMeasurer(),i=this.getCoordinates(),o=this.options.numberOfShellPoints,a=this.getRadius(),s=[],c=0,u=o-1;c<u;c++){t=360*c/u*Math.PI/180,e=a*Math.cos(t),n=a*Math.sin(t);var l=r.locate(i,e,n);s.push(l)}return s.push(s[0]),s},n.getHoles=function(){return[]},n.animateShow=function(){return this.show()},n._containsPoint=function(e,n){var r=this.getMap();if(r.getPitch())return t.prototype._containsPoint.call(this,e,n);var i=r._pointToContainerPoint(this._getCenter2DPoint()),o=this.getSize(),a=p(n)?this._hitTestTolerance():n,s=i.add(o.width/2,o.height/2);return wr(e,i,s,a)},n._computePrjExtent=function(t){var e=this._getMinMax(t);if(!e)return null;var n=this._getPrjCoordinates(),r=e.map((function(e){return t.project(e)})),i=r[0].x-n.x,o=r[1].x-n.x,a=r[2].y-n.y,s=r[3].y-n.y;return new Vn(n.add(i,a),n.add(o,s))},n._computeExtent=function(t){var e=this._getMinMax(t);return e?new Vn(e[0].x,e[2].y,e[1].x,e[3].y,this._getProjection()):null},n._getMinMax=function(t){if(!t||!this._coordinates||p(this._radius))return null;var e=this._radius;return[t.locate(this._coordinates,-e,0),t.locate(this._coordinates,e,0),t.locate(this._coordinates,0,e),t.locate(this._coordinates,0,-e)]},n._computeGeodesicLength=function(){return p(this._radius)?0:2*Math.PI*this._radius},n._computeGeodesicArea=function(){return p(this._radius)?0:Math.PI*Math.pow(this._radius,2)},n._exportGeoJSONGeometry=function(){return{type:"Polygon",coordinates:Ln.toNumberArrays([this.getShell()])}},n._toJSON=function(t){var e=this.getCenter(),n=d({},t);n.geometry=!1;var r=this.toGeoJSON(n);return r.geometry={type:"Polygon"},{feature:r,subType:"Circle",coordinates:[e.x,e.y],radius:this.getRadius()}},e}(wi(xi));Bi.mergeOptions({numberOfShellPoints:60}),Bi.registerJSONType("Circle");var Di=function(t){function e(e,n,r,i){var o;return o=t.call(this,null,i)||this,e&&o.setCoordinates(e),o.width=n,o.height=r,o}fe(e,t),e.fromJSON=function(t){var n=t.feature,r=new e(t.coordinates,t.width,t.height,t.options);return r.setProperties(n.properties),r};var n=e.prototype;return n.getWidth=function(){return this.width},n.setWidth=function(t){return this.width=t,this.onShapeChanged(),this},n.getHeight=function(){return this.height},n.setHeight=function(t){return this.height=t,this.onShapeChanged(),this},n.getShell=function(){for(var t,e,n,r,i=this._getMeasurer(),o=this.getCoordinates(),a=this.options.numberOfShellPoints,s=this.getWidth(),c=this.getHeight(),u=[],l=Math.pow(s/2,2)*Math.pow(c/2,2),h=Math.pow(s/2,2),f=Math.pow(c/2,2),d=0;d<a;d++){e=(t=360*d/a)*Math.PI/180,n=Math.sqrt(l/(h*Math.pow(Math.tan(e),2)+f)),r=Math.sqrt(l/(f*Math.pow(1/Math.tan(e),2)+h)),t>90&&t<270&&(n*=-1),t>180&&t<360&&(r*=-1);var p=i.locate(o,n,r);u.push(p)}return u},n.getHoles=function(){return[]},n.animateShow=function(){return this.show()},n._containsPoint=function(e,n){var r=this.getMap();if(r.isTransforming())return t.prototype._containsPoint.call(this,e,n);var i=r.getProjection(),o=p(n)?this._hitTestTolerance():n,a=i.projectCoords([this._coordinates,r.locate(this._coordinates,this.getWidth()/2,this.getHeight()/2)]);return wr(e,r._prjToContainerPoint(a[0]),r._prjToContainerPoint(a[1]),o)},n._computePrjExtent=function(){return Bi.prototype._computePrjExtent.apply(this,arguments)},n._computeExtent=function(){return Bi.prototype._computeExtent.apply(this,arguments)},n._getMinMax=function(t){if(!t||!this._coordinates||p(this.width)||p(this.height))return null;var e=this.getWidth(),n=this.getHeight();return[t.locate(this._coordinates,-e/2,0),t.locate(this._coordinates,e/2,0),t.locate(this._coordinates,0,-n/2),t.locate(this._coordinates,0,n/2)]},n._computeGeodesicLength=function(){if(p(this.width)||p(this.height))return 0;var t=this.width>this.height?this.width:this.height;return 2*Math.PI*t/2-4*Math.abs(this.width-this.height)},n._computeGeodesicArea=function(){return p(this.width)||p(this.height)?0:Math.PI*this.width*this.height/4},n._exportGeoJSONGeometry=function(){return{type:"Polygon",coordinates:Ln.toNumberArrays([this.getShell()])}},n._toJSON=function(t){var e=d({},t),n=this.getCenter();e.geometry=!1;var r=this.toGeoJSON(e);return r.geometry={type:"Polygon"},{feature:r,subType:"Ellipse",coordinates:[n.x,n.y],width:this.getWidth(),height:this.getHeight()}},e}(wi(xi));Di.mergeOptions({numberOfShellPoints:80}),Di.registerJSONType("Ellipse");var Fi=function(t){function e(e,n,r,i){var o;return o=t.call(this,null,i)||this,e&&o.setCoordinates(e),o._width=n,o._height=r,o}fe(e,t),e.fromJSON=function(t){var n=t.feature,r=new e(t.coordinates,t.width,t.height,t.options);return r.setProperties(n.properties),r};var n=e.prototype;return n.getCoordinates=function(){return this._coordinates},n.setCoordinates=function(t){if(this._coordinates=t instanceof Ln?t:new Ln(t),!this._coordinates||!this.getMap())return this.onPositionChanged(),this;var e=this._getProjection();return this._setPrjCoordinates(e.project(this._coordinates)),this},n.getWidth=function(){return this._width},n.setWidth=function(t){return this._width=t,this.onShapeChanged(),this},n.getHeight=function(){return this._height},n.setHeight=function(t){return this._height=t,this.onShapeChanged(),this},n.getShell=function(){var t=this._getMeasurer(),e=this._coordinates,n=this.getMap(),r=1,i=-1;if(n){var o=n.getFullExtent();o.left>o.right&&(r=-1),o.bottom>o.top&&(i=1)}var a=[];return a.push(e),a.push(t.locate(e,r*this._width,0)),a.push(t.locate(e,r*this._width,i*this._height)),a.push(t.locate(e,0,i*this._height)),a.push(e),a},n.getHoles=function(){return[]},n.animateShow=function(){return this.show()},n._getPrjCoordinates=function(){var t=this._getProjection();return this._verifyProjection(),!this._pnw&&t&&this._coordinates&&(this._pnw=t.project(this._coordinates)),this._pnw},n._setPrjCoordinates=function(t){this._pnw=t,this.onPositionChanged()},n._getPrjShell=function(){var e=t.prototype._getPrjShell.call(this),n=this._getProjection();if(!n.isSphere())return e;for(var r=n.getSphereExtent(),i=r.sx,o=r.sy,a=this._getProjection().getCircum(),s=e[0],c=1,u=e.length;c<u;c++){var l=e[c],h=0,f=0;i*(s.x-l.x)>0&&(h=a.x*i),o*(s.y-l.y)<0&&(f=a.y*o),e[c]._add(h,f)}return e},n._updateCache=function(){this._clearCache();var t=this._getProjection();this._pnw&&t&&(this._coordinates=t.unproject(this._pnw))},n._clearProjection=function(){this._pnw=null,t.prototype._clearProjection.call(this)},n._computeCenter=function(t){return t.locate(this._coordinates,this._width/2,-this._height/2)},n._containsPoint=function(e,n){var r=this.getMap();if(r.isTransforming())return t.prototype._containsPoint.call(this,e,n);var i=p(n)?this._hitTestTolerance():n,o=r._getResolution()*i,a=this._getPrjExtent().expand(o),s=r._containerPointToPrj(e);return a.contains(s)},n._computePrjExtent=function(t){var e=this._getSouthEast(t);if(!e)return null;var n=t.projectCoords([new Ln(this._coordinates.x,e.y),new Ln(e.x,this._coordinates.y)]);return new Vn(n[0],n[1])},n._computeExtent=function(t){var e=this._getSouthEast(t);return e?new Vn(this._coordinates,e,this._getProjection()):null},n._getSouthEast=function(t){if(!t||!this._coordinates||p(this._width)||p(this._height))return null;var e=this.getWidth(),n=-this.getHeight();if(t.fullExtent){var r=t.fullExtent;e*=r.right>r.left?1:-1,n*=r.top>r.bottom?1:-1}return t.locate(this._coordinates,e,n)},n._computeGeodesicLength=function(){return p(this._width)||p(this._height)?0:2*(this._width+this._height)},n._computeGeodesicArea=function(){return p(this._width)||p(this._height)?0:this._width*this._height},n._exportGeoJSONGeometry=function(){return{type:"Polygon",coordinates:Ln.toNumberArrays([this.getShell()])}},n._toJSON=function(t){var e=d({},t),n=this.getCoordinates();e.geometry=!1;var r=this.toGeoJSON(e);return r.geometry={type:"Polygon"},{feature:r,subType:"Rectangle",coordinates:[n.x,n.y],width:this.getWidth(),height:this.getHeight()}},e}(xi);Fi.registerJSONType("Rectangle");var ji=function(t){function e(e,n,r,i,o){var a;return(a=t.call(this,e,n,o)||this).startAngle=r,a.endAngle=i,a}fe(e,t),e.fromJSON=function(t){var n=t.feature,r=new e(t.coordinates,t.radius,t.startAngle,t.endAngle,t.options);return r.setProperties(n.properties),r};var n=e.prototype;return n.getStartAngle=function(){return this.startAngle},n.setStartAngle=function(t){return this.startAngle=t,this.onShapeChanged(),this},n.getEndAngle=function(){return this.endAngle},n.setEndAngle=function(t){return this.endAngle=t,this.onShapeChanged(),this},n.getShell=function(){for(var t,e,n,r=this._getMeasurer(),i=this.getCoordinates(),o=this.options.numberOfShellPoints-2,a=this.getRadius(),s=[i.copy()],c=this.getStartAngle(),u=this.getEndAngle()-c,l=0;l<o;l++){t=(u*l/(o-1)+c)*Math.PI/180,e=a*Math.cos(t),n=a*Math.sin(t);var h=r.locate(i,e,n);s.push(h)}return s.push(i.copy()),s},n._containsPoint=function(e,n){var r=this.getMap();if(r.isTransforming())return t.prototype._containsPoint.call(this,e,n);var i,o=r._pointToContainerPoint(this._getCenter2DPoint()),a=p(n)?this._hitTestTolerance():n,s=this.getSize(),c=o,u=e,l=u.x-c.x,h=c.y-u.y,f=Math.atan2(h,l),d=f<0?360*(f+2*Math.PI)/(2*Math.PI):360*f/(2*Math.PI),m=this.startAngle%360,g=this.endAngle%360;return i=m>g?!(d>g&&d<m):d>=m&&d<=g,u.distanceTo(c)<=s.width/2+a&&i},n._computeGeodesicLength=function(){return p(this._radius)?0:2*Math.PI*this._radius*Math.abs(this.startAngle-this.endAngle)/360+2*this._radius},n._computeGeodesicArea=function(){return p(this._radius)?0:Math.PI*Math.pow(this._radius,2)*Math.abs(this.startAngle-this.endAngle)/360},n._toJSON=function(t){var e=d({},t),n=this.getCenter();e.geometry=!1;var r=this.toGeoJSON(e);return r.geometry={type:"Polygon"},{feature:r,subType:"Sector",coordinates:[n.x,n.y],radius:this.getRadius(),startAngle:this.getStartAngle(),endAngle:this.getEndAngle()}},e}(Bi);ji.mergeOptions({numberOfShellPoints:60}),ji.registerJSONType("Sector");var Ui=function(t){function e(){return t.apply(this,arguments)||this}fe(e,t);var n=e.prototype;return n._arc=function(t,e,n){for(var r=this.options.arcDegree*Math.PI/180,i=1,o=e.length;i<o;i++){var a=hn._arcBetween(t,e[i-1],e[i],r),s=[e[i-1].x+e[i].x-a[0],e[i-1].y+e[i].y-a[1]];e[i-1].nextCtrlPoint=s,e[i].prevCtrlPoint=s,hn._stroke(t,n)}},n._quadraticCurve=function(t,e){if(e.length<=2)hn._path(t,e);else{var n,r;for(n=2,r=e.length;n<r;n+=2)t.quadraticCurveTo(e[n-1].x,e[n-1].y,e[n].x,e[n].y);if((n-=1)<r)for(;n<r;n++)t.lineTo(e[n].x,e[n].y)}},n._bezierCurve=function(t,e){if(e.length<=3)hn._path(t,e);else{var n,r;for(n=1,r=e.length;n+2<r;n+=3)t.bezierCurveTo(e[n].x,e[n].y,e[n+1].x,e[n+1].y,e[n+2].x,e[n+2].y);if(n<r)for(;n<r;n++)t.lineTo(e[n].x,e[n].y)}},n._getCurveArrowPoints=function(t,e,n,r,i,o){var a,s=e.length;for(a=o;a<s;a+=o){var c=this._getArrowShape(e[a-1],e[a],n,r,i);c&&t.push(c)}if((a-=o)<s-1)for(a+=1;a<s;a++){var u=this._getArrowShape(e[a-1],e[a],n,r,i);u&&t.push(u)}},e}(Ai);Ui.mergeOptions({enableSimplify:!1,enableClip:!1});var Ni=function(t){function e(){return t.apply(this,arguments)||this}fe(e,t);var n=e.prototype;return n._toJSON=function(t){return{feature:this.toGeoJSON(t),subType:"ArcCurve"}},n._paintOn=function(t,e,n){t.beginPath(),this._arc(t,e,n),hn._stroke(t,n),this._paintArrow(t,e,n)},e.fromJSON=function(t){var n=t.feature,r=new e(n.geometry.coordinates,t.options);return r.setProperties(n.properties),r},e}(Ui);Ni.registerJSONType("ArcCurve"),Ni.mergeOptions({arcDegree:90});var zi=function(t){function e(){return t.apply(this,arguments)||this}fe(e,t),e.fromJSON=function(t){var n=t.feature,r=new e(n.geometry.coordinates,t.options);return r.setProperties(n.properties),r};var n=e.prototype;return n._toJSON=function(t){return{feature:this.toGeoJSON(t),subType:"CubicBezierCurve"}},n._paintOn=function(t,e,n){t.beginPath(),t.moveTo(e[0].x,e[0].y),this._bezierCurve(t,e),hn._stroke(t,n),this._paintArrow(t,e,n)},n._getArrowPoints=function(t,e,n,r,i){return this._getCurveArrowPoints(t,e,n,r,i,3)},e}(Ui);zi.registerJSONType("CubicBezierCurve");var Gi=function(t){function e(){return t.apply(this,arguments)||this}fe(e,t),e.fromJSON=function(t){var n=t.feature,r=new e(n.geometry.coordinates,t.options);return r.setProperties(n.properties),r};var n=e.prototype;return n._toJSON=function(t){return{feature:this.toGeoJSON(t),subType:"QuadBezierCurve"}},n._paintOn=function(t,e,n){t.beginPath(),t.moveTo(e[0].x,e[0].y),this._quadraticCurve(t,e,n),hn._stroke(t,n),this._paintArrow(t,e,n)},n._getArrowPoints=function(t,e,n,r,i){return this._getCurveArrowPoints(t,e,n,r,i,2)},e}(Ui);Gi.registerJSONType("QuadBezierCurve");var Hi={textFaceName:"monospace",textSize:12,textLineSpacing:8,textWrapCharacter:"\n",textHorizontalAlignment:"middle",textVerticalAlignment:"middle"},Wi={markerType:"square",markerLineColor:"#000",markerLineWidth:2,markerLineOpacity:1,markerFill:"#fff",markerOpacity:1},Vi=function(t){function e(){return t.apply(this,arguments)||this}fe(e,t);var n=e.prototype;return n.getContent=function(){return this._content},n.setContent=function(t){var e=this._content;return this._content=_e(t),this._refresh(),this._fireEvent("contentchange",{old:e,new:t}),this},n.onAdd=function(){this._refresh()},n.toJSON=function(){var e=t.prototype.toJSON.call(this);return delete e.symbol,e},n.setSymbol=function(e){if(this._refreshing||!e)return t.prototype.setSymbol.call(this,e);var n=this._parseSymbol(e);if(this.setTextStyle){var r=this.getTextStyle()||{};r.symbol=n[0],this.setTextStyle(r)}else this.setTextSymbol&&this.setTextSymbol(n[0]);if(this.setBoxStyle){var i=this.getBoxStyle()||{};i.symbol=n[1],this.setBoxStyle(i)}else this.setBoxSymbol&&this.setBoxSymbol(n[1]);return this},n._parseSymbol=function(t){var e={},n={};for(var r in t)x(t,r)&&(0===r.indexOf("text")?e[r]=t[r]:n[r]=t[r]);return[e,n]},n._getTextSize=function(t){return Ie(this._content,t).size},n._getInternalSymbol=function(){return this._symbol},n._getDefaultTextSymbol=function(){return d({},Hi)},n._getDefaultBoxSymbol=function(){return d({},Wi)},n._getDefaultPadding=function(){return[12,8]},e}(Mi),Zi=function(t){function e(e,n,r,i,o){var a;return void 0===o&&(o={}),(a=t.call(this,n,o)||this)._content=_e(e),a._width=p(r)?100:r,a._height=p(i)?40:i,o.boxSymbol&&a.setBoxSymbol(o.boxSymbol),o.textStyle&&a.setTextStyle(o.textStyle),a._refresh(),a}fe(e,t);var n=e.prototype;return n.getWidth=function(){return this._width},n.setWidth=function(t){return this._width=t,this._refresh(),this},n.getHeight=function(){return this._height},n.setHeight=function(t){return this._height=t,this._refresh(),this},n.getBoxSymbol=function(){return d({},this.options.boxSymbol)},n.setBoxSymbol=function(t){return this.options.boxSymbol=t?d({},t):t,this.getSymbol()&&this._refresh(),this},n.getTextStyle=function(){return this.options.textStyle?d({},this.options.textStyle):null},n.setTextStyle=function(t){return this.options.textStyle=t?d({},t):t,this.getSymbol()&&this._refresh(),this},e.fromJSON=function(t){var n=t.feature,r=new e(t.content,n.geometry.coordinates,t.width,t.height,t.options);return r.setProperties(n.properties),r.setId(n.id),t.symbol&&r.setSymbol(t.symbol),r},n._toJSON=function(t){return{feature:this.toGeoJSON(t),width:this.getWidth(),height:this.getHeight(),subType:"TextBox",content:this._content}},n._refresh=function(){var t=this.getTextStyle()||{},e=t.padding||[12,8],n=this._width-2*e[0],r=this._height-2*e[1],i=d({},t.symbol||this._getDefaultTextSymbol(),this.options.boxSymbol||this._getDefaultBoxSymbol(),{textName:this._content,markerWidth:this._width,markerHeight:this._height,textHorizontalAlignment:"middle",textVerticalAlignment:"middle",textMaxWidth:n,textMaxHeight:r});t.wrap&&!i.textWrapWidth&&(i.textWrapWidth=n);var o=t.horizontalAlignment;i.textDx=i.markerDx||0;var a=i.markerWidth/2-e[0];"left"===o?(i.textHorizontalAlignment="right",i.textDx=i.textDx-a):"right"===o&&(i.textHorizontalAlignment="left",i.textDx=i.textDx+a);var s=t.verticalAlignment;i.textDy=i.markerDy||0;var c=i.markerHeight/2-e[1];"top"===s?(i.textVerticalAlignment="bottom",i.textDy-=c):"bottom"===s&&(i.textVerticalAlignment="top",i.textDy+=c),this._refreshing=!0,this.updateSymbol(i),delete this._refreshing},e}(Vi);Zi.mergeOptions({textStyle:{wrap:!0,padding:[12,8],verticalAlignment:"middle",horizontalAlignment:"middle"},boxSymbol:null}),Zi.registerJSONType("TextBox");var Qi=function(t){function e(e,n,r){var i;return void 0===r&&(r={}),i=t.call(this,n,r)||this,r.textSymbol&&i.setTextSymbol(r.textSymbol),r.boxStyle&&i.setBoxStyle(r.boxStyle),i._content=_e(e),i._refresh(),i}fe(e,t);var n=e.prototype;return n.getBoxStyle=function(){return this.options.boxStyle?d({},this.options.boxStyle):null},n.setBoxStyle=function(t){return this.options.boxStyle=t?d({},t):t,this._refresh(),this},n.getTextSymbol=function(){return d({},this._getDefaultTextSymbol(),this.options.textSymbol)},n.setTextSymbol=function(t){return this.options.textSymbol=t?d({},t):t,this._refresh(),this},e.fromJSON=function(t){var n=t.feature,r=new e(t.content,n.geometry.coordinates,t.options);return r.setProperties(n.properties),r.setId(n.id),t.symbol&&r.setSymbol(t.symbol),r},n._canEdit=function(){return!1},n._toJSON=function(t){return{feature:this.toGeoJSON(t),subType:"Label",content:this._content}},n._refresh=function(){var t=d({},this.getTextSymbol(),{textName:this._content}),e=this.getBoxStyle();if(e){d(t,e.symbol);var n=this._getBoxSize(t),r=n[1],i=e.padding||this._getDefaultPadding(),o=n[0];t.markerWidth=o.width,t.markerHeight=o.height;var a=t.textDx||0,s=t.textDy||0,c=Ce(r,t.textHorizontalAlignment,t.textVerticalAlignment)._add(a,s),u=e.horizontalAlignment||"middle";t.markerDx=c.x,"left"===u?t.markerDx+=t.markerWidth/2-i[0]:"right"===u?t.markerDx-=t.markerWidth/2-r.width-i[0]:t.markerDx+=r.width/2;var l=e.verticalAlignment||"middle";t.markerDy=c.y,"top"===l?t.markerDy+=t.markerHeight/2-i[1]:"bottom"===l?t.markerDy-=t.markerHeight/2-r.height-i[1]:t.markerDy+=r.height/2}this._refreshing=!0,this.updateSymbol(t),delete this._refreshing},n._getBoxSize=function(t){t.markerType||(t.markerType="square");var e,n,r=this.getBoxStyle(),i=this._getTextSize(t),o=r.padding||this._getDefaultPadding();return e=i.width+2*o[0],n=i.height+2*o[1],r.minWidth&&(!e||e<r.minWidth)&&(e=r.minWidth),r.minHeight&&(!n||n<r.minHeight)&&(n=r.minHeight),[new ge(e,n),i]},e}(Vi);Qi.mergeOptions({boxStyle:null,textSymbol:null}),Qi.registerJSONType("Label");var Xi=function(t){return function(t){function e(){return t.apply(this,arguments)||this}fe(e,t),e._hasConnectors=function(t){return!p(t.__connectors)&&t.__connectors.length>0},e._getConnectors=function(t){return t.__connectors};var n=e.prototype;return n.getConnectSource=function(){return this._connSource},n.setConnectSource=function(t){var e=this._connTarget;return this.onRemove(),this._connSource=t,this._connTarget=e,this.onAdd(),this},n.getConnectTarget=function(){return this._connTarget},n.setConnectTarget=function(t){var e=this._connSource;return this.onRemove(),this._connSource=e,this._connTarget=t,this._updateCoordinates(),this._registerEvents(),this},n._updateCoordinates=function(){var t=this.getMap();if(!t&&this._connSource&&(t=this._connSource.getMap()),!t&&this._connTarget&&(t=this._connTarget.getMap()),t&&this._connSource&&this._connTarget){for(var e,n,r=this._connSource._getConnectPoints(),i=this._connTarget._getConnectPoints(),o=0,a=this.getCoordinates(),s=0,c=r.length;s<c;s++)for(var u=r[s],l=0,h=i.length;l<h;l++){var f=i[l],d=t.computeLength(u,f);0===s&&0===l?(e=u,n=f,o=d):d<o&&(e=u,n=f)}H(a)&&a[0].equals(e)&&a[1].equals(n)||this.setCoordinates([e,n])}},n.onAdd=function(){this._registerEvents(),this._updateCoordinates()},n.onRemove=function(){if(this._connSource&&(this._connSource.__connectors&&B(this,this._connSource.__connectors),this._connSource.off("dragging positionchange",this._updateCoordinates,this).off("remove",this.onRemove,this),this._connSource.off("dragstart mousedown mouseover",this._showConnect,this),this._connSource.off("dragend mouseup mouseout",this.hide,this),this._connSource.off("show",this._showConnect,this).off("hide",this.hide,this),delete this._connSource),this._connTarget&&(B(this,this._connTarget.__connectors),this._connTarget.off("dragging positionchange",this._updateCoordinates,this).off("remove",this.onRemove,this),this._connTarget.off("show",this._showConnect,this).off("hide",this.hide,this),delete this._connTarget),!(this._connSource instanceof $r&&this._connTarget instanceof $r)){var t=this.getMap();t&&t.off("movestart moving moveend zoomstart zooming zoomend rotate pitch fovchange spatialreferencechange",this._updateCoordinates,this)}},n._showConnect=function(){this._connSource&&this._connTarget&&this._connSource.isVisible()&&this._connTarget.isVisible()&&(this._updateCoordinates(),this.show())},n._registerEvents=function(){if(this._connSource&&this._connTarget){this._connSource.__connectors||(this._connSource.__connectors=[]),this._connTarget.__connectors||(this._connTarget.__connectors=[]),this._connSource.__connectors.push(this),this._connTarget.__connectors.push(this),this._connSource.on("dragging positionchange",this._updateCoordinates,this).on("remove",this.remove,this),this._connTarget.on("dragging positionchange",this._updateCoordinates,this).on("remove",this.remove,this),this._connSource.on("show",this._showConnect,this).on("hide",this.hide,this),this._connTarget.on("show",this._showConnect,this).on("hide",this.hide,this);var t=this.options.showOn;if(this.hide(),"moving"===t?(this._connSource.on("dragstart",this._showConnect,this).on("dragend",this.hide,this),this._connTarget.on("dragstart",this._showConnect,this).on("dragend",this.hide,this)):"click"===t?(this._connSource.on("mousedown",this._showConnect,this).on("mouseup",this.hide,this),this._connTarget.on("mousedown",this._showConnect,this).on("mouseup",this.hide,this)):"mouseover"===t?(this._connSource.on("mouseover",this._showConnect,this).on("mouseout",this.hide,this),this._connTarget.on("mouseover",this._showConnect,this).on("mouseout",this.hide,this)):this._showConnect(),!(this._connSource instanceof $r&&this._connTarget instanceof $r)){var e=this.getMap();e&&e.on("movestart moving moveend zoomstart zooming zoomend rotate pitch fovchange spatialreferencechange",this._updateCoordinates,this)}}},e}(t)},Yi={showOn:"always"},Ji=function(t){function e(e,n,r){var i;return i=t.call(this,null,r)||this,1===arguments.length&&(r=e,e=null,n=null),i._connSource=e,i._connTarget=n,i}return fe(e,t),e}(Xi(Ai));Ji.mergeOptions(Yi),Ji.registerJSONType("ConnectorLine");var qi=function(t){function e(e,n,r){var i;return i=t.call(this,null,r)||this,1===arguments.length&&(r=e,e=null,n=null),i._connSource=e,i._connTarget=n,i}return fe(e,t),e}(Xi(Ni));qi.mergeOptions(Yi),qi.registerJSONType("ArcConnectorLine");var Ki=function(t){function e(e,n,r){var i;n&&!(n instanceof $r)&&!Array.isArray(n)&&a.indexOf(n.type)<0&&(r=n,n=null),(i=t.call(this,e,r)||this)._maxZIndex=0,i._minZIndex=0,i._initCache(),n&&i.addGeometry(n);var o=i.options.style;return o&&i.setStyle(o),i}fe(e,t);var n=e.prototype;return n.getGeometryById=function(t){return p(t)||""===t?null:this._geoMap[t]?this._geoMap[t]:null},n.getGeometries=function(t,e){if(!t)return this._geoList.slice(0);for(var n,r=[],i=0,o=this._geoList.length;i<o;i++)n=this._geoList[i],(e?t.call(e,n):t(n))&&r.push(n);return r},n.getFirstGeometry=function(){return this._geoList.length?this._geoList[0]:null},n.getLastGeometry=function(){var t=this._geoList.length;return 0===t?null:this._geoList[t-1]},n.getCount=function(){return this._geoList.length},n.getExtent=function(){if(0===this.getCount())return null;var t=new Vn(this.getProjection());return this.forEach((function(e){t._combine(e.getExtent())})),t},n.forEach=function(t,e){for(var n=this._geoList.slice(0),r=0,i=n.length;r<i;r++)e?t.call(e,n[r],r):t(n[r],r);return this},n.filter=function(t,e){var n=[],r=_(t),i=r?t:rt(t);return this.forEach((function(t){var o=r?t:ft(t);(e?i.call(e,o):i(o))&&n.push(t)}),this),n},n.isEmpty=function(){return!this._geoList.length},n.addGeometry=function(t,e){if(!t)return this;if("FeatureCollection"===t.type)return this.addGeometry(ki.toGeometry(t),e);if(!Array.isArray(t)){var n=arguments.length,r=arguments[n-1];return t=Array.prototype.slice.call(arguments,0,n-1),e=r,r&&v(r)&&("type"in r||r instanceof $r)&&(t.push(r),e=!1),this.addGeometry(t,e)}if(0===t.length)return this;var i;this._initCache(),e&&(i=new Vn),this._toSort=this._maxZIndex>0;for(var o=[],a=0,s=t.length;a<s;a++){var c=t[a];if(!c)throw new Error("Invalid geometry to add to layer("+this.getId()+") at index:"+a);if(!(c instanceof $r)&&(c=$r.fromJSON(c),Array.isArray(c)))for(var u=0,l=c.length;u<l;u++)this._add(c[u],i,a),o.push(c[u]);Array.isArray(c)||(this._add(c,i,a),o.push(c))}var h=this.getMap();if(h&&(this._getRenderer().onGeometryAdd(o),i&&!p(i.xmin))){var f=i.getCenter(),m=h.getFitZoom(i);if(v(e)){var g=_(e.step)?e.step:function(){};h.animateTo({center:f,zoom:m},d({duration:h.options.zoomAnimationDuration,easing:"out"},e),g)}else!0===e&&h.setCenterAndZoom(f,m)}return this.fire("addgeo",{geometries:t}),this},n.getGeoMinZIndex=function(){return this._minZIndex},n.getGeoMaxZIndex=function(){return this._maxZIndex},n._add=function(t,e,n){this._toSort||(this._toSort=0!==t.getZIndex()),this._updateZIndex(t.getZIndex());var r=t.getId();if(!p(r)){if(!p(this._geoMap[r]))throw new Error("Duplicate geometry id in layer("+this.getId()+"):"+r+", at index:"+n);this._geoMap[r]=t}var i=L();t._setInternalId(i),this._geoList.push(t),this.onAddGeometry(t),t._bindLayer(this),t.onAdd&&t.onAdd(),e&&e._combine(t.getExtent()),t._fireEvent("add",{layer:this}),this._cookedStyles&&this._styleGeometry(t)},n.removeGeometry=function(t){if(!Array.isArray(t))return this.removeGeometry([t]);for(var e=t.length-1;e>=0;e--)t[e]instanceof $r||(t[e]=this.getGeometryById(t[e])),t[e]&&this===t[e].getLayer()&&t[e].remove();return this.fire("removegeo",{geometries:t}),this},n.clear=function(){this._clearing=!0,this.forEach((function(t){t.remove()})),this._geoMap={};var t=this._geoList;return this._geoList=[],this._getRenderer()&&this._getRenderer().onGeometryRemove(t),this._clearing=!1,this.fire("clear"),this},n.onRemoveGeometry=function(t){if(t&&!this._clearing&&this===t.getLayer()&&!p(t._getInternalId())){var e=t.getId();p(e)||delete this._geoMap[e];var n=this._findInList(t);n>=0&&this._geoList.splice(n,1),this._getRenderer()&&this._getRenderer().onGeometryRemove([t])}},n.getStyle=function(){return this.options.style?this.options.style:null},n.setStyle=function(t){return this.options.style=t,t=Dt(t),this._cookedStyles=dt(t),this.forEach((function(t){this._styleGeometry(t)}),this),this.fire("setstyle",{style:t}),this},n._styleGeometry=function(t){if(!this._cookedStyles)return!1;for(var e=ft(t),n=0,r=this._cookedStyles.length;n<r;n++)if(!0===this._cookedStyles[n].filter(e))return t._setExternSymbol(this._cookedStyles[n].symbol),!0;return!1},n.removeStyle=function(){return this.options.style?(delete this.options.style,delete this._cookedStyles,this.forEach((function(t){t._setExternSymbol(null)}),this),this.fire("removestyle"),this):this},n.onAddGeometry=function(t){this.getStyle()&&this._styleGeometry(t)},n.hide=function(){for(var t=0,e=this._geoList.length;t<e;t++)this._geoList[t].onHide();return ei.prototype.hide.call(this)},n._initCache=function(){this._geoList||(this._geoList=[],this._geoMap={})},n._updateZIndex=function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];this._maxZIndex=Math.max(this._maxZIndex,Math.max.apply(Math,e)),this._minZIndex=Math.min(this._minZIndex,Math.min.apply(Math,e))},n._sortGeometries=function(){var t=this;this._toSort&&(this._maxZIndex=0,this._minZIndex=0,this._geoList.sort((function(e,n){return t._updateZIndex(e.getZIndex(),n.getZIndex()),t._compare(e,n)})),this._toSort=!1)},n._compare=function(t,e){return t.getZIndex()===e.getZIndex()?t._getInternalId()-e._getInternalId():t.getZIndex()-e.getZIndex()},n._findInList=function(t){var e=this._geoList.length;if(0===e)return-1;this._sortGeometries();for(var n,r=0,i=e-1;r<=i;){if(n=Math.floor((r+i)/2),this._geoList[n]===t)return n;this._compare(this._geoList[n],t)>0?i=n-1:r=n+1}return-1},n._onGeometryEvent=function(t){if(t&&t.target){var e=t.type;"idchange"===e?this._onGeometryIdChange(t):"zindexchange"===e?this._onGeometryZIndexChange(t):"positionchange"===e?this._onGeometryPositionChange(t):"shapechange"===e?this._onGeometryShapeChange(t):"symbolchange"===e?this._onGeometrySymbolChange(t):"show"===e?this._onGeometryShow(t):"hide"===e?this._onGeometryHide(t):"propertieschange"===e&&this._onGeometryPropertiesChange(t)}},n._onGeometryIdChange=function(t){if(t.new!==t.old||!this._geoMap[t.old]||this._geoMap[t.old]!==t.target){if(!p(t.new)){if(this._geoMap[t.new])throw new Error("Duplicate geometry id in layer("+this.getId()+"):"+t.new);this._geoMap[t.new]=t.target}p(t.old)||t.new===t.old||delete this._geoMap[t.old]}},n._onGeometryZIndexChange=function(t){t.old!==t.new&&(this._updateZIndex(t.new),this._toSort=!0,this._getRenderer()&&this._getRenderer().onGeometryZIndexChange(t))},n._onGeometryPositionChange=function(t){this._getRenderer()&&this._getRenderer().onGeometryPositionChange(t)},n._onGeometryShapeChange=function(t){this._getRenderer()&&this._getRenderer().onGeometryShapeChange(t)},n._onGeometrySymbolChange=function(t){this._getRenderer()&&this._getRenderer().onGeometrySymbolChange(t)},n._onGeometryShow=function(t){this._getRenderer()&&this._getRenderer().onGeometryShow(t)},n._onGeometryHide=function(t){this._getRenderer()&&this._getRenderer().onGeometryHide(t)},n._onGeometryPropertiesChange=function(t){this._getRenderer()&&this._getRenderer().onGeometryPropertiesChange(t)},e}(ei);Ki.mergeOptions({drawImmediate:!1});var $i=new Zn,to={debug:!1,enableSimplify:!0,geometryEvents:!0,defaultIconSize:[20,20],cacheVectorOnCanvas:!0,cacheSvgOnCanvas:he.gecko,enableAltitude:!1,altitudeProperty:"altitude",drawAltitude:!1,altitude:0},eo=function(t){function e(e,n,r){return t.call(this,e,n,r)||this}fe(e,t);var n=e.prototype;return n.onConfig=function(e){if(t.prototype.onConfig.call(this,e),e.enableAltitude||e.drawAltitude||e.altitudeProperty){var n=this.getRenderer();n&&n.setToRedraw&&n.setToRedraw()}},n.identify=function(t,e){void 0===e&&(e={});var n=this.getRenderer();return e.onlyVisible&&n&&n.identify?n.identify(t,e):(t instanceof Ln||(t=new Ln(t)),this._hitGeos(this._geoList,t,e))},n._hitGeos=function(t,e,n){void 0===n&&(n={});for(var r=n.filter,i=n.tolerance,o=[],a=this.getMap(),s=a.coordToPoint(e),c=a._pointToContainerPoint(s,void 0,0,s),u=t.length-1;u>=0;u--){var l=t[u];if(l&&l.isVisible()&&l._getPainter()&&l.options.interactive){if(!(l instanceof Ai&&(l._getArrowStyle()||l instanceof Ui))){var h=l.getContainerExtent($i);if(i&&(h=h._expand(i)),!h||!h.contains(c))continue}if(l._containsPoint(c,i)&&(!r||r(l))&&(o.push(l),n.count&&o.length>=n.count))break}}return o},n.getAltitude=function(){return this.options.altitude||0},n.toJSON=function(t){t||(t={});var e={type:this.getJSONType(),id:this.getId(),options:this.config()};if(p(t.geometries)||t.geometries){var n;if(t.clipExtent){var r=this.getMap(),i=r?r.getProjection():null;n=new Vn(t.clipExtent,i)}for(var o=[],a=this.getGeometries(),s=0,c=a.length;s<c;s++){var u=a[s],l=u.getExtent();if(l&&(!n||n.intersects(l))){var h=u.toJSON(t.geometries);o.push(h)}}e.geometries=o}return e},e.fromJSON=function(t){if(!t||"VectorLayer"!==t.type)return null;for(var n=new e(t.id,t.options),r=t.geometries,i=[],o=0;o<r.length;o++){var a=$r.fromJSON(r[o]);a&&i.push(a)}return n.addGeometry(i),n},e.getPainterClass=function(){return Xr},e.getCollectionPainterClass=function(){return Jr},e}(Ki);eo.mergeOptions(to),eo.registerJSONType("VectorLayer");var no="_map_tool",ro=function(t){function e(){return t.apply(this,arguments)||this}fe(e,t);var n=e.prototype;return n.addTo=function(t){return t?(this._map=t,t[no]&&t[no].disable(),this.onAdd&&this.onAdd(),this.enable(),t[no]=this,this._fireEvent("add"),this):this},n.getMap=function(){return this._map},n.enable=function(){return!this._map||this._enabled||(this._enabled=!0,this._switchEvents("off"),this._registerEvents(),this.onEnable&&this.onEnable(),this._fireEvent("enable")),this},n.disable=function(){return this._enabled&&this._map?(this._enabled=!1,this._switchEvents("off"),this.onDisable&&this.onDisable(),this._fireEvent("disable"),this):this},n.isEnabled=function(){return!!this._enabled},n.remove=function(){return this._map?(this.disable(),this._map&&(delete this._map[no],delete this._map),this._fireEvent("remove"),this):this},n._registerEvents=function(){this._switchEvents("on")},n._switchEvents=function(t){var e=this.getEvents();e&&this._map[t](e,this)},n._fireEvent=function(t,e){e||(e={}),this.fire(t,e)},e}(bn(Mn)),io={},oo=function(t){function e(e){var n;return(n=t.call(this,e)||this)._checkMode(),n._events={click:n._clickHandler,mousemove:n._mouseMoveHandler,dblclick:n._doubleClickHandler,mousedown:n._mouseDownHandler,mouseup:n._mouseUpHandler},n}fe(e,t),e.registerMode=function(t,e){io[t.toLowerCase()]=e},e.getRegisterMode=function(t){return io[t.toLowerCase()]};var n=e.prototype;return n.getMode=function(){return this.options.mode?this.options.mode.toLowerCase():null},n.setMode=function(t){return this._geometry&&(this._geometry.remove(),delete this._geometry),this._clearStage(),this._switchEvents("off"),this.options.mode=t,this._checkMode(),this.isEnabled()&&(this._switchEvents("on"),this._restoreMapCfg(),this._saveMapCfg()),this},n.getSymbol=function(){return Bt(this.options.symbol||this.options.symbol)},n.setSymbol=function(t){return t?(this.options.symbol=t,this._geometry&&this._geometry.setSymbol(t),this):this},n.getCurrentGeometry=function(){return this._geometry},n.onAdd=function(){this._checkMode()},n.onEnable=function(){if(this._saveMapCfg(),this._drawToolLayer=this._getDrawLayer(),this._clearStage(),this._loadResources(),this.options.autoPanAtEdge){var t=this.getMap();this._mapAutoPanAtEdge=t.options.autoPanAtEdge,this._mapAutoPanAtEdge||t.config({autoPanAtEdge:!0})}return this},n.onDisable=function(){var t=this.getMap();return this._restoreMapCfg(),this.endDraw(),this._map&&(t.removeLayer(this._getDrawLayer()),this.options.autoPanAtEdge&&(this._mapAutoPanAtEdge||t.config({autoPanAtEdge:!1}))),this},n.undo=function(){var t=this._getRegisterMode(),e=t.action;if(!this._shouldRecordHistory(e)||!this._historyPointer)return this;var n=this._clickCoords.slice(0,--this._historyPointer);return t.update(this.getMap().getProjection(),n,this._geometry),this},n.redo=function(){var t=this._getRegisterMode(),e=t.action;if(!this._shouldRecordHistory(e)||p(this._historyPointer)||this._historyPointer===this._clickCoords.length)return this;var n=this._clickCoords.slice(0,++this._historyPointer);return t.update(this.getMap().getProjection(),n,this._geometry),this},n._shouldRecordHistory=function(t){return Array.isArray(t)&&"click"===t[0]&&"mousemove"===t[1]&&"dblclick"===t[2]},n._checkMode=function(){this._getRegisterMode()},n._saveMapCfg=function(){var t=this.getMap();if(this._mapDoubleClickZoom=t.options.doubleClickZoom,t.config({doubleClickZoom:this.options.doubleClickZoom}),this._getRegisterMode().action.indexOf("mousedown")>-1){var e=this.getMap();this._mapDraggable=e.options.draggable,e.config({draggable:!1})}},n._restoreMapCfg=function(){var t=this.getMap();t.config({doubleClickZoom:this._mapDoubleClickZoom}),p(this._mapDraggable)||t.config("draggable",this._mapDraggable),delete this._mapDraggable,delete this._mapDoubleClickZoom},n._loadResources=function(){var t=It(this.getSymbol());t.length>0&&this._drawToolLayer._getRenderer().loadResources(t)},n._getProjection=function(){return this._map.getProjection()},n._getRegisterMode=function(){var t=this.getMode(),n=e.getRegisterMode(t);if(!n)throw new Error(t+" is not a valid mode of DrawTool.");return n},n.getEvents=function(){var t=this._getRegisterMode().action,e={};if(Array.isArray(t)){for(var n=0;n<t.length;n++)e[t[n]]=this._events[t[n]];return e}return null},n._mouseDownHandler=function(t){this._createGeometry(t)},n._mouseUpHandler=function(t){this.endDraw(t)},n._clickHandler=function(t){var e=this._getRegisterMode();if(this._geometry){var n=this.getMap()._pointToPrj(t.point2d);p(this._historyPointer)||(this._clickCoords=this._clickCoords.slice(0,this._historyPointer)),this._clickCoords.push(n),this._historyPointer=this._clickCoords.length,t.drawTool=this,e.update(this.getMap().getProjection(),this._clickCoords,this._geometry,t),this._fireEvent("drawvertex",t),e.clickLimit&&e.clickLimit===this._historyPointer&&this.endDraw(t)}else this._createGeometry(t)},n._createGeometry=function(t){var e=this.getMode(),n=this._getRegisterMode(),r=this.getMap()._pointToPrj(t.point2d),i=this.getSymbol();this._geometry||(this._clickCoords=[r],t.drawTool=this,this._geometry=n.create(this.getMap().getProjection(),this._clickCoords,t),i&&"point"!==e?this._geometry.setSymbol(i):this.options.hasOwnProperty("symbol")&&this._geometry.setSymbol(this.options.symbol),this._addGeometryToStage(this._geometry),this._fireEvent("drawstart",t)),"point"===e&&this.endDraw(t)},n._mouseMoveHandler=function(t){var e=this.getMap();if(this._geometry&&e&&!e.isInteracting()){var n=this._getMouseContainerPoint(t);if(this._isValidContainerPoint(n)){var r=this.getMap()._pointToPrj(t.point2d),i=e.getProjection();t.drawTool=this;var o=this._getRegisterMode();if(this._shouldRecordHistory(o.action)){var a=this._clickCoords.slice(0,this._historyPointer);if(a&&a.length>0&&r.equals(a[a.length-1]))return;o.update(i,a.concat([r]),this._geometry,t)}else o.update(i,r,this._geometry,t);this._fireEvent("mousemove",t)}}},n._doubleClickHandler=function(t){if(this._geometry){var e=this._getMouseContainerPoint(t);if(this._isValidContainerPoint(e)){var n=this._getRegisterMode(),r=this._clickCoords;if(!(r.length<2)){for(var i=this.getMap().getProjection(),o=[r[0]],a=1,s=r.length;a<s;a++)r[a].x===r[a-1].x&&r[a].y===r[a-1].y||o.push(r[a]);o.length<2||this._geometry&&this._geometry instanceof xi&&o.length<3||(t.drawTool=this,n.update(i,o,this._geometry,t),this.endDraw(t))}}}},n._addGeometryToStage=function(t){this._getDrawLayer().addGeometry(t)},n.endDraw=function(t){if(!this._geometry||this._ending)return this;this._ending=!0;var e=this._geometry;return this._clearStage(),t=t||{},this._geometry=e,this._fireEvent("drawend",t),delete this._geometry,this.options.once&&this.disable(),delete this._ending,delete this._historyPointer,this},n._clearStage=function(){this._getDrawLayer().clear(),delete this._geometry,delete this._clickCoords},n._getMouseContainerPoint=function(t){return"mousedown"===this._getRegisterMode().action&&He(t.domEvent),t.containerPoint},n._isValidContainerPoint=function(t){var e=this._map.getSize(),n=e.width,r=e.height;return!(t.x<0||t.y<0||t.x>n||t.y>r)},n._getDrawLayer=function(){var t=i+"drawtool",e=this._map.getLayer(t);return e||(e=new eo(t,{enableSimplify:!1}),this._map.addLayer(e)),e},n._fireEvent=function(t,e){e||(e={}),this._geometry&&(e.geometry=this._getRegisterMode().generate(this._geometry,{drawTool:this})),ro.prototype._fireEvent.call(this,t,e)},e}(ro);oo.mergeOptions({symbol:{lineColor:"#000",lineWidth:2,lineOpacity:1,polygonFill:"#fff",polygonOpacity:.3},doubleClickZoom:!1,mode:null,once:!1,autoPanAtEdge:!1,ignoreMouseleave:!0});var ao=function(t){function e(e){var n;return(n=t.call(this,e)||this).drawTool=new oo({mode:"boxZoom",ignoreMouseleave:!1}),n}fe(e,t);var n=e.prototype;return n.addHooks=function(){this.target.on("_mousedown",this._onMouseDown,this)},n.removeHooks=function(){this.target.off("_mousedown",this._onMouseDown,this),this.drawTool.isEnabled()&&this.drawTool.remove()},n._onMouseDown=function(t){this.target.options.boxZoom&&t.domEvent.shiftKey&&this.drawTool.setSymbol(this.target.options.boxZoomSymbol).on("drawend",this._boxZoom,this).addTo(this.target)},n._boxZoom=function(t){var e=this.target;this.drawTool.remove();var n=t.geometry,r=n.getCenter(),i=n.getSymbol(),o=i.markerWidth,a=i.markerHeight,s=new Vn(r,e.locateByPoint(r,o,a),e.getProjection()),c=e.getFitZoom(s);e._animateTo({center:s.getCenter(),zoom:c})},e}(wn);ii.mergeOptions({boxZoom:!0,boxZoomSymbol:{markerType:"rectangle",markerLineWidth:3,markerLineColor:"#1bbc9b",markerLineDasharray:[10,5],markerFillOpacity:.1,markerFill:"#1bbc9b",markerWidth:1,markerHeight:1}}),ii.addOnLoadHook("addHandler","boxZoom",ao);var so=function(t){function e(){return t.apply(this,arguments)||this}fe(e,t);var n=e.prototype;return n.addHooks=function(){this.target&&this.target.on("_mousemove",this._onMouseMove,this)},n.removeHooks=function(){this.target&&this.target.off("_mousemove",this._onMouseMove,this)},n._onMouseMove=function(t){var e=this.target;if(e.options.autoPanAtEdge){var n=t.containerPoint,r=e.getContainerExtent();if(r){var i,o=n.x,a=n.y,s=r.xmax,c=r.ymax;o<30&&(i=[Math.abs(o-30),0]),a<30&&(i=[0,Math.abs(a-30)]),o+30>s&&(i=[-Math.abs(o+30-s),0]),a+30>c&&(i=[0,-Math.abs(a+30-c)]),i&&e.panBy(i,{duration:1})}}},e}(wn);ii.mergeOptions({autoPanAtEdge:!1}),ii.addOnLoadHook("addHandler","autoPanAtEdge",so),ii.include({animateTo:function(t,e,n){var r=this;void 0===e&&(e={}),_(e)&&(n=e,e={});var i=this.getProjection(),o=this.getView(),a={},s=!0;for(var c in t)if(x(t,c)&&!p(t[c])&&("prjCenter"===c||!p(o[c])))if(s=!1,"center"===c){var u=new Ln(o[c]).toFixed(7),l=new Ln(t[c]).toFixed(7);u.equals(l)||(a.center=[u,l])}else if("prjCenter"===c){var h=new Ln(this._getPrjCenter()),f=new Ln(t[c]);h.equals(f)||(a.prjCenter=[h,f])}else o[c]!==t[c]&&"around"!==c&&(a[c]=[o[c],t[c]]);if(s)return null;this._animPlayer&&(this._isInternalAnimation?"running"===this._animPlayer.playState&&(this._animPlayer.pause(),this._prevAnimPlayer=this._animPlayer):(delete this._prevAnimPlayer,this._stopAnim(this._animPlayer)));var d=t.around||new me(this.width/2,this.height/2),m=this._getRenderer(),g=this._animPlayer=gi.animate(a,{easing:e.easing||"out",duration:e.duration||this.options.zoomAnimationDuration,framer:function(t){m.callInNextFrame(t)}},(function(t){if(r.isRemoved())g.finish();else{if("running"===g.playState){if(t.styles.center){var o=t.styles.center;r._setPrjCenter(i.project(o)),r.onMoving(r._parseEventFromCoord(r.getCenter()))}else if(t.styles.prjCenter){var s=t.styles.prjCenter;r._setPrjCenter(s),r.onMoving(r._parseEventFromCoord(r.getCenter()))}p(t.styles.zoom)||r.onZooming(t.styles.zoom,d),p(t.styles.pitch)||r.setPitch(t.styles.pitch),p(t.styles.bearing)||r.setBearing(t.styles.bearing),r._fireEvent("animating")}else"paused"===g.playState&&g!==r._mapAnimPlayer||(g._interupted||(a.center?r._setPrjCenter(i.project(a.center[1])):a.prjCenter&&r._setPrjCenter(a.prjCenter[1]),p(a.pitch)||r.setPitch(a.pitch[1]),p(a.bearing)||r.setBearing(a.bearing[1])),r._endAnim(g,a,d,e));n&&n(t)}}),this);return this._startAnim(a,d),g},_animateTo:function(t,e,n){return void 0===e&&(e={}),this._mapAnimPlayer&&this._stopAnim(this._mapAnimPlayer),this._isInternalAnimation=!0,this._mapAnimPlayer=this.animateTo(t,e,n),delete this._isInternalAnimation,this._mapAnimPlayer},isAnimating:function(){return!!this._animPlayer},isRotating:function(){return this.isDragRotating()||!!this._animRotating},_endAnim:function(t,e,n,r){delete this._animRotating;var i,o=t._interupted?"animateinterrupted":"animateend";if(t===this._animPlayer&&delete this._animPlayer,t===this._mapAnimPlayer&&delete this._mapAnimPlayer,e.center)i=t._interupted?this.getCenter():e.center[1],this.onMoveEnd(this._parseEventFromCoord(i));else if(e.prjCenter){var a;a=t._interupted?this._getPrjCenter():e.prjCenter[1];var s=this._parseEventFromCoord(this.getProjection().unproject(a));s.point2d=this._prjToPoint(a),this.onMoveEnd(s)}p(e.zoom)||(t._interupted?this.onZoomEnd(this.getZoom(),n):r.wheelZoom?this.onZooming(e.zoom[1],n):this.onZoomEnd(e.zoom[1],n)),o&&this._fireEvent(o),p(e.pitch)||this.getPitch()||this.getRenderer().setToRedraw(),this._resumePrev(t)},_startAnim:function(t,e){this._animPlayer&&(t.center&&this.onMoveStart(),t.zoom&&!this.isZooming()&&this.onZoomStart(t.zoom[1],e),(t.pitch||t.bearing)&&(this._animRotating=!0),this._fireEvent("animatestart"),this._animPlayer.play())},_stopAnim:function(t){t&&(delete this._animRotating,"finished"!==t.playState&&(t._interupted=!0,t.cancel()),t===this._animPlayer&&delete this._animPlayer,t===this._mapAnimPlayer&&delete this._mapAnimPlayer)},_resumePrev:function(t){if(this._prevAnimPlayer){var e=this._prevAnimPlayer;"paused"!==e.playState&&delete this._prevAnimPlayer,t!==e&&(this._animPlayer=e,e.play())}}});var co="mousedown mouseup mouseover mouseout mouseenter mouseleave mousemove click dblclick contextmenu keypress touchstart touchmove touchend ";function uo(t,e,n,r,i){var o=1/Math.tan(e/2),a=1/(r-i);return t[0]=o/n,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=o,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=(i+r)*a,t[11]=-1,t[12]=0,t[13]=0,t[14]=2*i*r*a,t[15]=0,t}function lo(t,e,n){var r,i,o,a,s,c,u,l,h,f,d,p,m=n[0],g=n[1],v=n[2];return e===t?(t[12]=e[0]*m+e[4]*g+e[8]*v+e[12],t[13]=e[1]*m+e[5]*g+e[9]*v+e[13],t[14]=e[2]*m+e[6]*g+e[10]*v+e[14],t[15]=e[3]*m+e[7]*g+e[11]*v+e[15]):(r=e[0],i=e[1],o=e[2],a=e[3],s=e[4],c=e[5],u=e[6],l=e[7],h=e[8],f=e[9],d=e[10],p=e[11],t[0]=r,t[1]=i,t[2]=o,t[3]=a,t[4]=s,t[5]=c,t[6]=u,t[7]=l,t[8]=h,t[9]=f,t[10]=d,t[11]=p,t[12]=r*m+s*g+h*v+e[12],t[13]=i*m+c*g+f*v+e[13],t[14]=o*m+u*g+d*v+e[14],t[15]=a*m+l*g+p*v+e[15]),t}function ho(t,e,n){var r=n[0],i=n[1],o=n[2];return t[0]=e[0]*r,t[1]=e[1]*r,t[2]=e[2]*r,t[3]=e[3]*r,t[4]=e[4]*i,t[5]=e[5]*i,t[6]=e[6]*i,t[7]=e[7]*i,t[8]=e[8]*o,t[9]=e[9]*o,t[10]=e[10]*o,t[11]=e[11]*o,t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15],t}function fo(t,e,n){var r=e[0],i=e[1],o=e[2],a=e[3],s=e[4],c=e[5],u=e[6],l=e[7],h=e[8],f=e[9],d=e[10],p=e[11],m=e[12],g=e[13],v=e[14],y=e[15],_=n[0],b=n[1],x=n[2],w=n[3];return t[0]=_*r+b*s+x*h+w*m,t[1]=_*i+b*c+x*f+w*g,t[2]=_*o+b*u+x*d+w*v,t[3]=_*a+b*l+x*p+w*y,_=n[4],b=n[5],x=n[6],w=n[7],t[4]=_*r+b*s+x*h+w*m,t[5]=_*i+b*c+x*f+w*g,t[6]=_*o+b*u+x*d+w*v,t[7]=_*a+b*l+x*p+w*y,_=n[8],b=n[9],x=n[10],w=n[11],t[8]=_*r+b*s+x*h+w*m,t[9]=_*i+b*c+x*f+w*g,t[10]=_*o+b*u+x*d+w*v,t[11]=_*a+b*l+x*p+w*y,_=n[12],b=n[13],x=n[14],w=n[15],t[12]=_*r+b*s+x*h+w*m,t[13]=_*i+b*c+x*f+w*g,t[14]=_*o+b*u+x*d+w*v,t[15]=_*a+b*l+x*p+w*y,t}function po(t,e){var n=e[0],r=e[1],i=e[2],o=e[3],a=e[4],s=e[5],c=e[6],u=e[7],l=e[8],h=e[9],f=e[10],d=e[11],p=e[12],m=e[13],g=e[14],v=e[15],y=n*s-r*a,_=n*c-i*a,b=n*u-o*a,x=r*c-i*s,w=r*u-o*s,M=i*u-o*c,S=l*m-h*p,A=l*g-f*p,E=l*v-d*p,C=h*g-f*m,T=h*v-d*m,I=f*v-d*g,P=y*I-_*T+b*C+x*E-w*A+M*S;return P?(P=1/P,t[0]=(s*I-c*T+u*C)*P,t[1]=(i*T-r*I-o*C)*P,t[2]=(m*M-g*w+v*x)*P,t[3]=(f*w-h*M-d*x)*P,t[4]=(c*E-a*I-u*A)*P,t[5]=(n*I-i*E+o*A)*P,t[6]=(g*b-p*M-v*_)*P,t[7]=(l*M-f*b+d*_)*P,t[8]=(a*T-s*E+u*S)*P,t[9]=(r*E-n*T-o*S)*P,t[10]=(p*w-m*b+v*y)*P,t[11]=(h*b-l*w-d*y)*P,t[12]=(s*A-a*C-c*S)*P,t[13]=(n*C-r*A+i*S)*P,t[14]=(m*_-p*x-g*y)*P,t[15]=(l*x-h*_+f*y)*P,t):null}function mo(t){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}function go(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t[8]=e[8],t[9]=e[9],t[10]=e[10],t[11]=e[11],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15],t}function vo(t,e,n,r){return t[0]=e,t[1]=n,t[2]=r,t}function yo(t,e,n){return t[0]=e[0]-n[0],t[1]=e[1]-n[1],t[2]=e[2]-n[2],t}function _o(t){var e=t[0],n=t[1],r=t[2];return Math.sqrt(e*e+n*n+r*r)}function bo(t,e){var n=e[0],r=e[1],i=e[2],o=n*n+r*r+i*i;return o>0&&(o=1/Math.sqrt(o),t[0]=e[0]*o,t[1]=e[1]*o,t[2]=e[2]*o),t}function xo(t,e,n){var r=e[0],i=e[1],o=e[2],a=n[0],s=n[1],c=n[2];return t[0]=i*c-o*s,t[1]=o*a-r*c,t[2]=r*s-i*a,t}function wo(t,e){var n=e[0]-t[0],r=e[1]-t[1],i=e[2]-t[2];return Math.hypot?Math.hypot(n,r,i):function(){for(var t=0,e=arguments.length;e--;)t+=arguments[e]*arguments[e];return Math.sqrt(t)}(n,r,i)}function Mo(t,e,n){var r=e[0],i=e[1],o=e[2],a=1/(n[3]*r+n[7]*i+n[11]*o+n[15]);return t[0]=(n[0]*r+n[4]*i+n[8]*o+n[12])*a,t[1]=(n[1]*r+n[5]*i+n[9]*o+n[13])*a,t[2]=(n[2]*r+n[6]*i+n[10]*o+n[14])*a,t}ii.include({_registerDomEvents:function(){Ue(this._panels.mapWrapper||this._containerDOM,co,this._handleDOMEvent,this)},_removeDomEvents:function(){Ne(this._panels.mapWrapper||this._containerDOM,co,this._handleDOMEvent)},_handleDOMEvent:function(t){var e=t.type;if("contextmenu"===e&&Ge(t),!this._ignoreEvent(t)){var n=!1;if("mousedown"===e||"touchstart"===e&&1===t.touches.length)this._mouseDownTime=f();else if("click"===e||"touchend"===e||"contextmenu"===e){if(!this._mouseDownTime)return;var r=this._mouseDownTime;if(delete this._mouseDownTime,f()-r>300){if("click"===e||"contextmenu"===e)return}else"touchend"===e&&(n=!0)}this._fireDOMEvent(this,t,e),n&&(this._clickTime&&f()-this._clickTime<=300?(delete this._clickTime,this._fireDOMEvent(this,t,"dblclick")):(this._clickTime=f(),this._fireDOMEvent(this,t,"click")))}},_ignoreEvent:function(t){if(!t||!this._panels.control)return!1;if(this._isEventOutMap(t))return!0;var e,n=t.srcElement||t.target;if(n)for(;n&&n!==this._containerDOM;){if(n.className&&n.className.indexOf&&(n.className.indexOf("maptalks-control")>=0||n.className.indexOf("maptalks-ui")>=0&&!e.eventsPropagation))return!0;e=n,n=n.parentNode}return!1},_isEventOutMap:function(t){if(this.getPitch()>this.options.maxVisualPitch){var e=Qe(this._getActualEvent(t),this._containerDOM);if(!this.getContainerExtent().contains(e))return!0}return!1},_parseEvent:function(t,e){if(!t)return null;var n={domEvent:t};if("keypress"!==e){var r=this._getActualEvent(t);if(r){var i=Qe(r,this._containerDOM);n=d(n,{coordinate:this.containerPointToCoord(i),containerPoint:i,viewPoint:this.containerPointToViewPoint(i),point2d:this._containerPointToPoint(i)})}}return n},_parseEventFromCoord:function(t){var e=this.coordToContainerPoint(t);return{coordinate:t,containerPoint:e,viewPoint:this.containerPointToViewPoint(e),point2d:this.coordToPoint(t)}},_getActualEvent:function(t){return t.touches&&t.touches.length>0?t.touches[0]:t.changedTouches&&t.changedTouches.length>0?t.changedTouches[0]:t},_fireDOMEvent:function(t,e,n){if(!this.isRemoved()){var r=this._parseEvent(e,n);this._fireEvent(n,r)}}}),ii.addOnLoadHook("_registerDomEvents"),ii.include({isFullScreen:function(){return!!(document.webkitIsFullScreen||document.mozFullScreen||document.msFullscreenElement||document.fullscreenElement)},requestFullScreen:function(t){return this._fireEvent("fullscreenstart"),this._requestFullScreen(t||this._containerDOM),this._fireEvent("fullscreenend"),this},cancelFullScreen:function(){return this._cancelFullScreen(),this._fireEvent("cancelfullscreen"),this},_requestFullScreen:function(t){if(t.requestFullscreen)t.requestFullscreen();else if(t.mozRequestFullScreen)t.mozRequestFullScreen();else if(t.webkitRequestFullScreen)t.webkitRequestFullScreen();else if(t.msRequestFullScreen)t.msRequestFullScreen();else{var e="fullscreen=1,status=no,resizable=yes,top=0,left=0,scrollbars=no,titlebar=no,menubar=no,location=no,toolbar=no,z-look=yes,width="+(screen.availWidth-8)+",height="+(screen.availHeight-45);null!==window.open(location.href,"_blank",e)&&(window.opener=null,window.close())}},_cancelFullScreen:function(){document.exitFullscreen?document.exitFullscreen():document.mozCancelFullScreen?document.mozCancelFullScreen():document.webkitCancelFullScreen?document.webkitCancelFullScreen():null!==window.open(location.href,"_blank","fullscreen=no,status=yes,resizable=yes,scrollbars=no,titlebar=no,menubar=yes,location=yes,toolbar=yes,z-look=yes")&&(window.opener=null,window.close())}}),ii.include({panTo:function(t,e,n){if(void 0===e&&(e={}),!t)return this;if(_(e)&&(n=e,e={}),t=new Ln(t),void 0===e.animation||e.animation){var r=this.getProjection().project(t);return this._panAnimation(r,e.duration,n)}return this.setCenter(t),this},_panTo:function(t,e){return void 0===e&&(e={}),void 0===e.animation||e.animation?this._panAnimation(t,e.duration):(this.onMoveStart(),this._setPrjCenter(t),this.onMoveEnd(this._parseEventFromCoord(this.getCenter())),this)},panBy:function(t,e,n){if(void 0===e&&(e={}),!t)return this;if(_(e)&&(n=e,e={}),t=new me(t),this.getContainerExtent().ymin>0&&t.y>30){var r=t.y;t.y=30,t.x=30*t.x/r,console.warn("offset is limited to panBy when pitch is above maxPitch")}if(this.onMoveStart(),void 0===e.animation||e.animation){t=t.multi(-1);var i=this._containerPointToPrj(new me(this.width/2+t.x,this.height/2+t.y));this._panAnimation(i,e.duration,n)}else this._offsetCenterByPixel(t),this.onMoveEnd(this._parseEventFromCoord(this.getCenter()));return this},_panAnimation:function(t,e,n){return this._animateTo({prjCenter:t},{duration:e||this.options.panAnimationDuration},n)}}),$r.fromJSON=function(t){if(Array.isArray(t)){for(var e=[],n=0,r=t.length;n<r;n++){var i=$r.fromJSON(t[n]);Array.isArray(t)?e=e.concat(i):e.push(i)}return e}return t&&!t.feature?ki.toGeometry(t):(t.subType?(o=$r.getJSONClass(t.subType).fromJSON(t),p(t.feature.id)||o.setId(t.feature.id)):(o=ki.toGeometry(t.feature),t.options&&o.config(t.options)),t.symbol&&o.setSymbol(t.symbol),t.infoWindow&&o.setInfoWindow(t.infoWindow),o);var o},ei.fromJSON=function(t){if(!t)return null;var e=t.type,n=ei.getJSONClass(e);if(!n||!n.fromJSON)throw new Error("unsupported layer type:"+e);return n.fromJSON(t)},ii.include({JSON_VERSION:"1.0",toJSON:function(t){t||(t={});var e={jsonVersion:this.JSON_VERSION,version:this.VERSION,extent:this.getExtent().toJSON()};e.options=this.config(),e.options.center=this.getCenter(),e.options.zoom=this.getZoom(),e.options.bearing=this.getBearing(),e.options.pitch=this.getPitch();var n=this.getBaseLayer();(p(t.baseLayer)||t.baseLayer)&&n&&(e.baseLayer=n.toJSON(t.baseLayer));var r={};t.clipExtent&&(!0===t.clipExtent?r.clipExtent=this.getExtent():r.clipExtent=t.clipExtent);var i=[];if(p(t.layers)||t.layers&&!Array.isArray(t.layers)){for(var o=this.getLayers(),a=0,s=o.length;a<s;a++)if(o[a].toJSON){var c=d({},v(t.layers)?t.layers:{},r);i.push(o[a].toJSON(c))}e.layers=i}else if(H(t.layers)){for(var u=t.layers,l=0;l<u.length;l++){var h=u[l],f=this.getLayer(h.id);if(f.toJSON){var m=d({},h.options,r);i.push(f.toJSON(m))}}e.layers=i}else e.layers=[];return e}}),ii.fromJSON=function(t,e,n){if(!t||!e)return null;n||(n={});var r=new ii(t,e.options);if(p(n.baseLayer)||n.baseLayer){var i=ei.fromJSON(e.baseLayer);i&&r.setBaseLayer(i)}if(p(n.layers)||n.layers){for(var o=[],a=e.layers,s=0;s<a.length;s++){var c=ei.fromJSON(a[s]);o.push(c)}r.addLayer(o)}return r},ii.include({computeLength:function(t,e){if(!this.getProjection())return null;var n=new Ln(t),r=new Ln(e);return n.equals(r)?0:this.getProjection().measureLength(n,r)},computeGeometryLength:function(t){return t._computeGeodesicLength(this.getProjection())},computeGeometryArea:function(t){return t._computeGeodesicArea(this.getProjection())},identify:function(t,e){if(!t)return this;var n=t.layers;if(!H(n))return this;for(var r=[],o=0,a=n.length;o<a;o++)y(n[o])?r.push(this.getLayer(n[o])):r.push(n[o]);for(var s=new Ln(t.coordinate),c=d({},t),u=[],l=r.length-1;l>=0&&!(t.count&&u.length>=t.count);l--){var h=r[l];if(h&&h.getMap()&&(t.includeInvisible||h.isVisible())&&(t.includeInternals||!(h.getId().indexOf(i)>=0))){var f=h.identify(s,c);f&&(Array.isArray(f)?k(u,f):u.push(f))}}return e.call(this,u),this}}),ii.include({_zoom:function(t,e){this.options.zoomable&&!this.isZooming()&&(e=this._checkZoomOrigin(e),t=this._checkZoom(t),this.onZoomStart(t,e),this._frameZoom=this.getZoom(),this.onZoomEnd(t,e))},_zoomAnimation:function(t,e,n){this.options.zoomable&&!this.isZooming()&&(t=this._checkZoom(t),this.getZoom()!==t&&(e=this._checkZoomOrigin(e),this._startZoomAnim(t,e,n)))},_checkZoomOrigin:function(t){return t&&!this.options.zoomInCenter||(t=new me(this.width/2,this.height/2)),this.options.zoomOrigin&&(t=new me(this.options.zoomOrigin)),t},_startZoomAnim:function(t,e,n){p(n)&&(n=1);var r=this._getResolution(this._startZoomVal)/this._getResolution(t),i=this.options.zoomAnimationDuration*Math.abs(r-n)/Math.abs(r-1);this._frameZoom=this._startZoomVal,this._animateTo({zoom:t,around:e},{continueOnViewChanged:!0,duration:i})},onZoomStart:function(t,e){this.options.zoomable&&!this.isZooming()&&(this._mapAnimPlayer&&this._stopAnim(this._mapAnimPlayer),this._zooming=!0,this._startZoomVal=this.getZoom(),this._startZoomCoord=this._containerPointToPrj(e),this._fireEvent("zoomstart",{from:this._startZoomVal,to:t}))},onZooming:function(t,e,n){if(this.options.zoomable&&this._frameZoom!==t){p(n)&&(n=1),this._zoomTo(t,e);var r=this.getResolution(t),i=this.getResolution(this._startZoomVal)/r/n,o=this._prjToContainerPoint(this._startZoomCoord,this._startZoomVal),a=this.getViewPoint();if(!this.isRotating()&&!o.equals(e)&&1!==i){var s=this.getPitch(),c=o._sub(e)._multi(1/(1-i));s&&(c.y/=Math.cos(s*Math.PI/180)),e=e.add(c)}var u={view:[i,0,0,i,(e.x-a.x)*(1-i),(e.y-a.y)*(1-i)]},l=this.getDevicePixelRatio();1!==l&&(e=e.multi(l)),u.container=[i,0,0,i,e.x*(1-i),e.y*(1-i)],this._fireEvent("zooming",{from:this._startZoomVal,to:t,origin:e,matrix:u}),this._frameZoom=t}},onZoomEnd:function(t,e){if(this.options.zoomable){var n=this._startZoomVal;this._zoomTo(t,e),this._zooming=!1,this._getRenderer().onZoomEnd(),this._fireEvent("zoomend",{from:n,to:t}),this._verifyExtent(this._getPrjCenter())||this._panTo(this._prjMaxExtent.getCenter())}},_zoomTo:function(t,e){this._zoomLevel=t,this._calcMatrices(),e&&this._setPrjCoordAtContainerPoint(this._startZoomCoord,e)},_checkZoom:function(t){var e=this.getMaxZoom(),n=this.getMinZoom();return t<n&&(t=n),t>e&&(t=e),t}});var So=Math.PI/180,Ao=new Ln(0,0);function Eo(){return mo(new Array(16))}ii.include({getFov:function(){return this._fov||(this._fov=.6435011087932844),this._fov/So},setFov:function(t){if(this.isZooming())return this;if(t=Math.max(.01,Math.min(60,t)),this._fov===t)return this;var e=this.getFov();return this._fov=t*So,this._calcMatrices(),this._renderLayers(),this._fireEvent("fovchange",{from:e,to:this.getFov()}),this},getBearing:function(){return this._angle?-this._angle/So:0},setBearing:function(t){if(he.ie9)throw new Error("map can't rotate in IE9.");var e=-z(t,-180,180)*So;if(this._angle===e)return this;var n=this.getBearing();return this._fireEvent("rotatestart",{from:n,to:e}),this._angle=e,this._calcMatrices(),this._renderLayers(),this._fireEvent("rotate",{from:n,to:e}),this._fireEvent("rotateend",{from:n,to:e}),this},getPitch:function(){return this._pitch?this._pitch/Math.PI*180:0},setPitch:function(t){if(he.ie9)throw new Error("map can't tilt in IE9.");var e=G(t,0,this.options.maxPitch)*So;if(this._pitch===e)return this;var n=this.getPitch();return this._fireEvent("pitchstart",{from:n,to:e}),this._pitch=e,this._calcMatrices(),this._renderLayers(),this._fireEvent("pitch",{from:n,to:e}),this._fireEvent("pitchend",{from:n,to:e}),this},isTransforming:function(){return!(!this._pitch&&!this._angle)},getFrustumAltitude:function(){return this._frustumAltitude},_calcFrustumAltitude:function(){var t=90-this.getPitch(),e=this.getFov()/2,n=this.cameraPosition?this.cameraPosition[2]:0;if(e<=t)return n;e=Math.PI*e/180;var r=new me(this.cameraPosition).distanceTo(new me(this.cameraLookAt)),i=n*Math.tan(2*e);return n+Math.tan(e)*(r+i)},_pointToContainerPoint:function(){var t=[0,0,0];return function(e,n,r,i){if(void 0===r&&(r=0),e=this._pointToPoint(e,n,i),this.isTransforming()||r){r*=this._getResolution(n)/this._getResolution();var o=this._glScale;vo(t,e.x*o,e.y*o,r*o);var a=this._projIfBehindCamera(t,this.cameraPosition,this.cameraForward);Mo(a,a,this.projViewMatrix);var s=this.width/2,c=this.height/2;return a[0]=a[0]*s+s,a[1]=-a[1]*c+c,i?(i.x=a[0],i.y=a[1],i):new me(a[0],a[1])}var u=this._prjToPoint(this._getPrjCenter(),void 0,Ao);return i?(i.x=e.x,i.y=e.y):i=e,i._sub(u.x,u.y),i.set(i.x,-i.y),i._add(this.width/2,this.height/2)}}(),_projIfBehindCamera:function(){var t=new Array(3),e=new Array(3),n=new Array(3);return function(r,i,o){yo(t,r,i);var a=function(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]}(o,t);return a<=0&&(function(t,e,n){t[0]=e[0]*n,t[1]=e[1]*n,t[2]=e[2]*n}(e,o,1.01*a),function(t,e,n){t[0]=e[0]+n[0],t[1]=e[1]+n[1],t[2]=e[2]+n[2]}(r,i,yo(n,t,e))),r}}(),_containerPointToPoint:function(){var t=[0,0,0],e=[0,0,0,1],n=[0,0,0,1];return function(r,i,o){if(this.isTransforming()){var a=this.width/2||1,s=this.height/2||1;vo(t,(r.x-a)/a,(s-r.y)/s,0),vo(e,t[0],t[1],0),vo(n,t[0],t[1],1),e[3]=n[3]=1,Mo(e,e,this.projViewMatrixInverse),Mo(n,n,this.projViewMatrixInverse);var c=e[0],u=n[0],l=e[1],h=n[1],f=e[2],d=n[2],p=f===d?0:(0-f)/(d-f),m=N(c,u,p),g=N(l,h,p);return o?(o.x=m,o.y=g):o=new me(m,g),o._multi(1/this._glScale),void 0===i||this.getZoom()===i?o:this._pointToPointAtZoom(o,i,o)}var v=this._prjToPoint(this._getPrjCenter(),i,o),y=void 0!==i?this._getResolution()/this._getResolution(i):1,_=y*(r.x-this.width/2),b=y*(r.y-this.height/2);return v._add(_,-b)}}(),_calcMatrices:function(){var t=Eo();return function(){delete this._mapRes,delete this._mapGlRes,delete this._mapExtent2D,delete this._mapGlExtent2D;var e=this.getSize(),n=e.width||1,r=e.height||1;this._glScale=this.getGLScale();var i=this.getPitch()*Math.PI/180,o=this._getCameraWorldMatrix(),a=this.getFov()*Math.PI/180,s=this._getCameraFar(a,this.getPitch());this.cameraFar=s,this.cameraNear=Math.max(this._glScale*this.getResolution(this.getGLZoom())*Math.cos(i),.1);var c=this.projMatrix||Eo();uo(c,a,n/r,this.cameraNear,s),this.projMatrix=c,this.viewMatrix=po(this.viewMatrix||Eo(),o),this.projViewMatrix=fo(this.projViewMatrix||Eo(),c,this.viewMatrix),this._calcCascadeMatrixes(),this.projViewMatrixInverse=fo(this.projViewMatrixInverse||Eo(),o,po(t,c)),this.domCssMatrix=this._calcDomMatrix(),this._frustumAltitude=this._calcFrustumAltitude(),this._mapRes=this._getResolution(),this._mapGlRes=this._getResolution(this.getGLZoom()),this._mapExtent2D=this._get2DExtent(),this._mapGlExtent2D=this._get2DExtent(this.getGLZoom())}}(),_getCameraFar:function(t,e){var n=this.cameraCenterDistance=wo(this.cameraPosition,this.cameraLookAt),r=n;if(e>0){var i;if(e=e*Math.PI/180,2/Math.PI-e<=t/2)i=4*n;else{var o=Math.tan(t/2);i=n*o/(1/Math.tan(e)-o)}r+=i}return r+1},_calcCascadeMatrixes:function(){var t=Eo();function e(e,n,r){var i=this.width,o=this.height,a=this.getFov()*Math.PI/180,s=this._getCameraFar(a,n),c=this.cameraCenterDistance;s=c+(s-c)/Math.cos((90-n)*Math.PI/180)*Math.cos((90-e)*Math.PI/180),uo(t,a,i/o,.1,s);var u=this.viewMatrix;return fo(r,t,u)}return function(){var t=this.getPitch(),n=this.options.cascadePitches[0],r=this.options.cascadePitches[1],i=this.cascadeFrustumMatrix0=this.cascadeFrustumMatrix0||Eo(),o=this.cascadeFrustumMatrix1=this.cascadeFrustumMatrix1||Eo();t>n?e.call(this,t,n,i):go(this.cascadeFrustumMatrix0,this.projViewMatrix),t>r?e.call(this,t,r,o):go(this.cascadeFrustumMatrix1,this.cascadeFrustumMatrix0)}}(),_calcDomMatrix:function(){var t=Eo(),e=Eo(),n=[1,-1,1],r=[0,0,0];return function(){var i=this.width||1,o=this.height||1,a=.5/Math.tan(this._fov/2)*o;return ho(t,this.projMatrix,n),lo(t,t,vo(r,0,0,-a)),this._pitch&&function(t,e,n){var r=Math.sin(n),i=Math.cos(n),o=e[4],a=e[5],s=e[6],c=e[7],u=e[8],l=e[9],h=e[10],f=e[11];e!==t&&(t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]),t[4]=o*i+u*r,t[5]=a*i+l*r,t[6]=s*i+h*r,t[7]=c*i+f*r,t[8]=u*i-o*r,t[9]=l*i-a*r,t[10]=h*i-s*r,t[11]=f*i-c*r}(t,t,this._pitch),this._angle&&function(t,e,n){var r=Math.sin(n),i=Math.cos(n),o=e[0],a=e[1],s=e[2],c=e[3],u=e[4],l=e[5],h=e[6],f=e[7];e!==t&&(t[8]=e[8],t[9]=e[9],t[10]=e[10],t[11]=e[11],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]),t[0]=o*i+u*r,t[1]=a*i+l*r,t[2]=s*i+h*r,t[3]=c*i+f*r,t[4]=u*i-o*r,t[5]=l*i-a*r,t[6]=h*i-s*r,t[7]=f*i-c*r}(t,t,this._angle),mo(e),ho(e,e,vo(r,i/2,-o/2,1)),fo(this.domCssMatrix||Eo(),e,t)}}(),_getCameraWorldMatrix:function(){var t={};return function(){var e=this.getGLZoom(),n=this.getSize(),r=this.getGLScale(),i=this._prjToPoint(this._prjCenter,e);this.cameraLookAt=vo(this.cameraLookAt||[0,0,0],i.x,i.y,0);var o=this.getPitch()*So,a=this.getBearing()*So,s=this._getFovRatio(),c=r*(n.height||1)/2/s,u=c*Math.cos(o),l=Math.sin(o)*c,h=i.x-l*Math.sin(a),f=i.y-l*Math.cos(a);this.cameraPosition=vo(this.cameraPosition||[0,0,0],h,f,u);var d=l||1,p=this.cameraUp=vo(this.cameraUp||[0,0,0],Math.sin(a)*d,Math.cos(a)*d,0),m=this.cameraWorldMatrix=this.cameraWorldMatrix||Eo();!function(t,e,n,r){var i=[0,0,0],o=[0,0,0],a=[0,0,0];yo(a,e,n),0===_o(a)&&(a[2]=1),bo(a,a),xo(i,r,a),0===_o(a)&&(1===Math.abs(r[2])?a[0]+=1e-4:a[2]+=1e-4,bo(a,a),xo(i,r,a)),bo(i,i),xo(o,a,i),t[0]=i[0],t[4]=o[0],t[8]=a[0],t[1]=i[1],t[5]=o[1],t[9]=a[1],t[2]=i[2],t[6]=o[2],t[10]=a[2]}(m,this.cameraPosition,this.cameraLookAt,p);var g=this.cameraForward||[0,0,0];return yo(g,this.cameraLookAt,this.cameraPosition),this.cameraForward=bo(g,g),function(t,e){var n,r=e[0],i=e[4],o=e[8],a=e[1],s=e[5],c=e[9],u=e[2],l=e[6],h=e[10],f=r+s+h;f>0?(n=.5/Math.sqrt(f+1),t.w=.25/n,t.x=(l-c)*n,t.y=(o-u)*n,t.z=(a-i)*n):r>s&&r>h?(n=2*Math.sqrt(1+r-s-h),t.w=(l-c)/n,t.x=.25*n,t.y=(i+a)/n,t.z=(o+u)/n):s>h?(n=2*Math.sqrt(1+s-r-h),t.w=(o-u)/n,t.x=(i+a)/n,t.y=.25*n,t.z=(c+l)/n):(n=2*Math.sqrt(1+h-r-s),t.w=(a-i)/n,t.x=(o+u)/n,t.y=(c+l)/n,t.z=.25*n)}(t,m),function(t,e){var n=t,r=e.x,i=e.y,o=e.z,a=e.w,s=r+r,c=i+i,u=o+o,l=r*s,h=r*c,f=r*u,d=i*c,p=i*u,m=o*u,g=a*s,v=a*c,y=a*u;n[0]=1-(d+m),n[4]=h-y,n[8]=f+v,n[1]=h+y,n[5]=1-(l+m),n[9]=p-g,n[2]=f-v,n[6]=p+g,n[10]=1-(l+d),n[3]=0,n[7]=0,n[11]=0,n[12]=0,n[13]=0,n[14]=0,n[15]=1}(m,t),function(t,e){var n=t;n[12]=e[0],n[13]=e[1],n[14]=e[2]}(m,this.cameraPosition),m}}(),_getFovRatio:function(){var t=this.getFov();return Math.tan(t/2*So)},_renderLayers:function(){this.isInteracting()||this._getLayers().forEach((function(t){if(t){var e=t._getRenderer();e&&e.setToRedraw&&e.setToRedraw()}}))}}),ii.include({_onViewChange:function(t){this._viewHistory||(this._viewHistory=[],this._viewHistoryPointer=0);for(var e=this._getCurrentView(),n=this._viewHistory.length-1;n>=0;n--)if($(t,this._viewHistory[n]))return this._viewHistoryPointer=n,void this._fireViewChange(e,t);this._viewHistoryPointer<this._viewHistory.length-1&&this._viewHistory.splice(this._viewHistoryPointer+1),this._viewHistory.push(t);var r=this.options.viewHistoryCount;r>0&&this._viewHistory.length>r&&this._viewHistory.splice(0,this._viewHistory.length-r),this._viewHistoryPointer=this._viewHistory.length-1,this._fireViewChange(e,t)},zoomToPreviousView:function(t){if(void 0===t&&(t={}),!this.hasPreviousView())return null;var e=this._viewHistory[--this._viewHistoryPointer];return this._zoomToView(e,t),e},hasPreviousView:function(){return!(!this._viewHistory||0===this._viewHistoryPointer)},zoomToNextView:function(t){if(void 0===t&&(t={}),!this.hasNextView())return null;var e=this._viewHistory[++this._viewHistoryPointer];return this._zoomToView(e,t),e},hasNextView:function(){return!(!this._viewHistory||this._viewHistoryPointer===this._viewHistory.length-1)},_zoomToView:function(t,e){var n=this,r=this.getView();e.animation?this._animateTo(t,{duration:e.duration},(function(e){"finished"===e.state.playState&&n._fireViewChange(r,t)})):(this.setView(t),this._fireViewChange(r,t))},getViewHistory:function(){return this._viewHistory},_fireViewChange:function(t,e){this._fireEvent("viewchange",{old:t,new:e})},_getCurrentView:function(){return this._viewHistory?this._viewHistory[this._viewHistoryPointer]:null}}),ii.mergeOptions({viewHistory:!0,viewHistoryCount:10});var Co=function(t){function e(e){var n;return(n=t.call(this,e)||this).on("enable",n._afterEnable,de(de(n))).on("disable",n._afterDisable,de(de(n))),n._measureLayers=[],n}fe(e,t);var n=e.prototype;return n.clear=function(){if(H(this._measureLayers))for(var t=0;t<this._measureLayers.length;t++)this._measureLayers[t].remove();return delete this._lastMeasure,delete this._lastVertex,this._measureLayers=[],this},n.getMeasureLayers=function(){return this._measureLayers},n.getLastMeasure=function(){return this._lastMeasure?this._lastMeasure:0},n.undo=function(){t.prototype.undo.call(this);var e=this._historyPointer;if(e!==this._vertexes.length)for(var n=e;n<this._vertexes.length;n++)this._vertexes[n].label&&this._vertexes[n].label.remove(),this._vertexes[n].marker.remove();return this},n.redo=function(){t.prototype.redo.call(this);var e=this._historyPointer-1;return this._vertexes[e]&&(this._vertexes[e].marker.getLayer()||(this._vertexes[e].label&&this._vertexes[e].label.addTo(this._measureMarkerLayer),this._vertexes[e].marker.addTo(this._measureMarkerLayer))),this},n._measure=function(t){var e,n,r=this.getMap();t instanceof $r?e=r.computeGeometryLength(t):Array.isArray(t)&&(e=r.getProjection().measureLength(t)),this._lastMeasure=e,n="zh-CN"===this.options.language?[" 米"," 公里"," 英尺"," 英里"]:[" m"," km"," feet"," mile"];var i="";return this.options.metric&&(i+=e<1e3?e.toFixed(0)+n[0]:(e/1e3).toFixed(2)+n[1]),this.options.imperial&&(e*=3.2808399,i.length>0&&(i+="\n"),i+=e<5280?e.toFixed(0)+n[2]:(e/5280).toFixed(2)+n[3]),i},n._registerMeasureEvents=function(){this.on("drawstart",this._msOnDrawStart,this).on("drawvertex",this._msOnDrawVertex,this).on("mousemove",this._msOnMouseMove,this).on("drawend",this._msOnDrawEnd,this)},n._afterEnable=function(){this._registerMeasureEvents()},n._afterDisable=function(){this.off("drawstart",this._msOnDrawStart,this).off("drawvertex",this._msOnDrawVertex,this).off("mousemove",this._msOnMouseMove,this).off("drawend",this._msOnDrawEnd,this)},n._msOnDrawStart=function(t){var e=this.getMap(),n=e._pointToPrj(t.point2d),r=L(),i="distancetool_"+r,o="distancetool_markers_"+r;e.getLayer(i)?(this._measureLineLayer=e.getLayer(i),this._measureMarkerLayer=e.getLayer(o)):(this._measureLineLayer=new eo(i).addTo(e),this._measureMarkerLayer=new eo(o).addTo(e)),this._measureLayers.push(this._measureLineLayer),this._measureLayers.push(this._measureMarkerLayer);var a=new Mi(t.coordinate,{symbol:this.options.vertexSymbol});a._setPrjCoordinates(n);var s="zh-CN"===this.options.language?"起点":"start",c=new Qi(s,t.coordinate,this.options.labelOptions);c._setPrjCoordinates(n),this._lastVertex=c,this._addVertexMarker(a,c)},n._msOnMouseMove=function(t){var e=this._measure(this._msGetCoordsToMeasure(t));if(!this._tailMarker){var n=Bt(this.options.vertexSymbol);n.markerWidth/=2,n.markerHeight/=2,this._tailMarker=new Mi(t.coordinate,{symbol:n}).addTo(this._measureMarkerLayer),this._tailLabel=new Qi(e,t.coordinate,this.options.labelOptions).addTo(this._measureMarkerLayer)}var r=this._geometry._getPrjCoordinates(),i=r[r.length-1];this._tailMarker.setCoordinates(t.coordinate),this._tailMarker._setPrjCoordinates(i),this._tailLabel.setContent(e),this._tailLabel.setCoordinates(t.coordinate),this._tailLabel._setPrjCoordinates(i)},n._msGetCoordsToMeasure=function(t){return t.geometry.getCoordinates().concat([t.coordinate])},n._msOnDrawVertex=function(t){var e=this._geometry._getPrjCoordinates(),n=e[e.length-1],r=t.geometry,i=new Mi(t.coordinate,{symbol:this.options.vertexSymbol}),o=this._measure(r),a=new Qi(o,t.coordinate,this.options.labelOptions);this._addVertexMarker(i,a),a._setPrjCoordinates(n),i._setPrjCoordinates(n),this._lastVertex=a},n._addVertexMarker=function(t,e){this._vertexes||(this._vertexes=[]),this._vertexes.push({label:e,marker:t}),void 0!==this._historyPointer&&(this._vertexes.length=this._historyPointer),this._measureMarkerLayer.addGeometry(t),e&&this._measureMarkerLayer.addGeometry(e)},n._msOnDrawEnd=function(t){this._clearTailMarker();var e=this._lastVertex.getSize();e||(e=new ge(10,10)),this._addClearMarker(this._lastVertex.getCoordinates(),this._lastVertex._getPrjCoordinates(),e.width);var n=t.geometry.copy();n._setPrjCoordinates(t.geometry._getPrjCoordinates()),n.addTo(this._measureLineLayer),this._lastMeasure=n.getLength()},n._addClearMarker=function(t,e,n){var r=this.options.clearButtonSymbol,i={markerDx:(r.markerDx||0)+n,textDx:(r.textDx||0)+n};Array.isArray(r)&&(i=r.map((function(t){return t?{markerDx:(t.markerDx||0)+n,textDx:(t.textDx||0)+n}:null}))),r=Bt(r,i);var o=new Mi(t,{symbol:r}),a=this._measureLineLayer,s=this._measureMarkerLayer;o.on("click",(function(){return a.remove(),s.remove(),!1}),this),o.addTo(this._measureMarkerLayer),o._setPrjCoordinates(e)},n._clearTailMarker=function(){this._tailMarker&&(this._tailMarker.remove(),delete this._tailMarker),this._tailLabel&&(this._tailLabel.remove(),delete this._tailLabel)},e}(oo);Co.mergeOptions({mode:"LineString",language:"zh-CN",metric:!0,imperial:!1,symbol:{lineColor:"#000",lineWidth:3,lineOpacity:1},vertexSymbol:{markerType:"ellipse",markerFill:"#fff",markerLineColor:"#000",markerLineWidth:3,markerWidth:11,markerHeight:11},labelOptions:{textSymbol:{textFaceName:"monospace",textLineSpacing:1,textHorizontalAlignment:"right",textDx:15},boxStyle:{padding:[6,2],symbol:{markerType:"square",markerFill:"#fff",markerFillOpacity:.9,markerLineColor:"#b4b3b3"}}},clearButtonSymbol:[{markerType:"square",markerFill:"#fff",markerLineColor:"#b4b3b3",markerLineWidth:2,markerWidth:15,markerHeight:15,markerDx:20},{markerType:"x",markerWidth:10,markerHeight:10,markerDx:20}]});var To=function(t){function e(e){var n;return(n=t.call(this,e)||this).on("enable",n._afterEnable,de(de(n))).on("disable",n._afterDisable,de(de(n))),n._measureLayers=[],n}fe(e,t);var n=e.prototype;return n._measure=function(t){var e,n,r=this.getMap();t instanceof $r?e=r.computeGeometryArea(t):Array.isArray(t)&&(e=r.getProjection().measureArea(t)),this._lastMeasure=e,n="zh-CN"===this.options.language?[" 平方米"," 平方公里"," 平方英尺"," 平方英里"]:[" sq.m"," sq.km"," sq.ft"," sq.mi"];var i="";if(this.options.metric&&(i+=e<1e6?e.toFixed(0)+n[0]:(e/1e6).toFixed(2)+n[1]),this.options.imperial){e*=3.2808399,i.length>0&&(i+="\n");var o=27878400;i+=e<o?e.toFixed(0)+n[2]:(e/o).toFixed(2)+n[3]}return i},n._msGetCoordsToMeasure=function(t){return t.geometry.getShell().concat([t.coordinate])},n._msOnDrawVertex=function(t){var e=this.getMap()._pointToPrj(t.point2d),n=new Mi(t.coordinate,{symbol:this.options.vertexSymbol});n._setPrjCoordinates(e),this._measure(t.geometry),this._lastVertex=n,this._addVertexMarker(n)},n._msOnDrawEnd=function(t){this._clearTailMarker();var e=this.getMap()._pointToPrj(t.point2d),n=this._measure(t.geometry),r=new Qi(n,t.coordinate,this.options.labelOptions).addTo(this._measureMarkerLayer);r._setPrjCoordinates(e);var i=r.getSize();i||(i=new ge(10,10)),this._addClearMarker(t.coordinate,e,i.width);var o=t.geometry.copy();o._setPrjCoordinates(t.geometry._getPrjCoordinates()),o.addTo(this._measureLineLayer),this._lastMeasure=o.getArea()},e}(Co);To.mergeOptions({mode:"Polygon",symbol:{lineColor:"#000000",lineWidth:2,lineOpacity:1,lineDasharray:"",polygonFill:"#ffffff",polygonOpacity:.5}});var Io={create:function(t,e){var n=t.unproject(e[0]),r=new Bi(n,0);return r._setPrjCoordinates(e[0]),r},update:function(t,e,n){var r=n.getMap(),i=Array.isArray(e)?e[e.length-1]:e,o=t.unproject(i),a=r.computeLength(n.getCenter(),o);n.setRadius(a)},generate:function(t){return t}};oo.registerMode("circle",d({clickLimit:2,action:["click","mousemove","click"]},Io)),oo.registerMode("freeHandCircle",d({action:["mousedown","mousemove","mouseup"]},Io));var Po={create:function(t,e){var n=t.unproject(e[0]),r=new Di(n,0,0);return r._setPrjCoordinates(e[0]),r},update:function(t,e,n){var r=n.getMap(),i=n.getCenter(),o=Array.isArray(e)?e[e.length-1]:e,a=t.unproject(o),s=r.computeLength(i,new Ln({x:a.x,y:i.y})),c=r.computeLength(i,new Ln({x:i.x,y:a.y}));n.setWidth(2*s),n.setHeight(2*c)},generate:function(t){return t}};oo.registerMode("ellipse",d({clickLimit:2,action:["click","mousemove","click"]},Po)),oo.registerMode("freeHandEllipse",d({action:["mousedown","mousemove","mouseup"]},Po));var Lo={create:function(t,e){var n=new xi([]);return n._firstClick=e[0],n},update:function(t,e,n,r){var i=n.getMap(),o=r.containerPoint,a=i._prjToContainerPoint(n._firstClick),s=[[a.x,a.y],[o.x,a.y],[o.x,o.y],[a.x,o.y]];n.setCoordinates(s.map((function(t){return i.containerPointToCoord(new me(t))}))),n._setPrjCoordinates(s.map((function(t){return i._containerPointToPrj(new me(t))})))},generate:function(t){return t}};oo.registerMode("rectangle",d({clickLimit:2,action:["click","mousemove","click"]},Lo)),oo.registerMode("freeHandRectangle",d({action:["mousedown","mousemove","mouseup"]},Lo)),oo.registerMode("point",{clickLimit:1,action:["click"],create:function(t,e){var n=t.unproject(e[0]),r=new Mi(n);return r._setPrjCoordinates(e[0]),r},generate:function(t){return t}});var Ro={create:function(t,e){var n=e.map((function(e){return t.unproject(e)})),r=new Ai(n);return r._setPrjCoordinates(e),r},update:function(t,e,n){var r,i=n.getSymbol();Array.isArray(e)?r=e:(r=n._getPrjCoordinates()).push(e);var o=r.map((function(e){return t.unproject(e)}));n.setCoordinates(o),n._setPrjCoordinates(r);var a=n.getLayer();if(a){var s=a.getGeometryById("polygon");if(!s&&r.length>=3){if(s=new xi([o],{id:"polygon"}),i){var c=Bt(i,{lineOpacity:0});s.setSymbol(c)}s.addTo(a)}s&&s._setPrjCoordinates(r)}},generate:function(t){var e=new xi(t.getCoordinates(),{symbol:t.getSymbol()});return e._setPrjCoordinates(t._getPrjCoordinates()),e._projCode=t._projCode,e}};oo.registerMode("polygon",d({action:["click","mousemove","dblclick"]},Ro)),oo.registerMode("freeHandPolygon",d({action:["mousedown","mousemove","mouseup"]},Ro));var Oo={create:function(t,e){var n=e.map((function(e){return t.unproject(e)})),r=new Ai(n);return r._setPrjCoordinates(e),r},update:function(t,e,n){var r;Array.isArray(e)?r=e:(r=n._getPrjCoordinates()).push(e);var i=r.map((function(e){return t.unproject(e)}));n.setCoordinates(i),n._setPrjCoordinates(r)},generate:function(t){return t}};function ko(t){for(var e=t.tileInfo,n=[e.cols,e.rows],r=[],i=e.lods,o=0,a=i.length;o<a;o++)r.push(i[o].resolution);var s=t.fullExtent,c=e.origin,u=[1,-1,c.x,c.y];return delete s.spatialReference,{spatialReference:{resolutions:r,fullExtent:s},tileSystem:u,tileSize:n}}function Bo(t,e){return void 0===e&&(e=[]),e.forEach((function(e){var n=e[0],r=e[1];t=t.replace(n,r)})),t}function Do(t,e,n){void 0===n&&(n={});var r,i,o=t[e],a=o.getElementsByTagName("TileMatrix"),s=[],c=[],u=[];if(!r){var l=o.getElementsByTagName("ows:SupportedCRS")[0];if(l){for(r=(r=l.textContent).split("EPSG")[1];r.indexOf(":")>-1;)r=r.replace(":","");r=function(t){var e=t.indexOf("EPSG")>-1?t:"EPSG:"+t;return e=Bo(e,[["4490","4326"],["102100","3857"],["900913","3857"]])}(r)}}i||(i=o.getElementsByTagName("ows:Identifier")[0])&&(i=i.textContent);var h=.0002645833333333333;n.isArcgis&&(h=28e-5),r&&r.indexOf("4326")>-1&&(h=2.3767925226029154e-9,n.isArcgis&&(h=2.518101729011901e-9));for(var f=1/0,d=0;d<a.length;d++){var p=a[d],m=p.getElementsByTagName("ows:Identifier")[0].textContent;m=parseInt(m),f=Math.min(f,m);var g=p.getElementsByTagName("ScaleDenominator")[0].textContent,v=p.getElementsByTagName("TopLeftCorner")[0].textContent,y=p.getElementsByTagName("TileWidth")[0].textContent,_=p.getElementsByTagName("TileHeight")[0].textContent;if(0===u.length&&u.push(parseInt(y),parseInt(_)),0===c.length){var b=v.split(" ").filter((function(t){return""!==t})).map((function(t){return parseFloat(t)})),x=b[0],w=b[1];x>0?c.push(1,-1,w,x):c.push(1,-1,x,w)}var M=parseFloat(g)*h;s.push(M)}if(f>0)for(var S=s[0],A=f-1;A>=0;A--)S*=2,s.splice(0,0,S);return{resolutions:s,tileSize:u,tileSystem:c,projection:r,TileMatrixSet:i}}oo.registerMode("linestring",d({action:["click","mousemove","dblclick"]},Oo)),oo.registerMode("freeHandLinestring",d({action:["mousedown","mousemove","mouseup"]},Oo)),oo.registerMode("arccurve",{action:["click","mousemove","dblclick"],create:function(t,e){var n=e.map((function(e){return t.unproject(e)})),r=new Ni(n);return r._setPrjCoordinates(e),r},update:Oo.update,generate:function(t){return t}}),oo.registerMode("quadbeziercurve",{action:["click","mousemove","dblclick"],create:function(t,e){var n=e.map((function(e){return t.unproject(e)})),r=new Gi(n);return r._setPrjCoordinates(e),r},update:Oo.update,generate:function(t){return t}}),oo.registerMode("cubicbeziercurve",{action:["click","mousemove","dblclick"],create:function(t,e){var n=e.map((function(e){return t.unproject(e)})),r=new zi(n);return r._setPrjCoordinates(e),r},update:Oo.update,generate:function(t){return t}}),oo.registerMode("boxZoom",{action:["mousedown","mousemove","mouseup"],create:function(t,e){e=e[0];var n=t.unproject(e),r=new Mi(n);return r._firstClick=e,r},update:function(t,e,n,r){var i=n.getMap(),o=i._prjToContainerPoint(n._firstClick),a=r.containerPoint;e=i._containerPointToPrj(new Ln(Math.min(o.x,a.x),Math.min(o.y,a.y)));var s=t.unproject(e);n.setCoordinates(s)._setPrjCoordinates(e),n.updateSymbol({markerWidth:Math.abs(o.x-a.x),markerHeight:Math.abs(o.y-a.y)})},generate:function(t){return t}}),Kr.loadArcgis=function(t,e,n){if(void 0===n&&(n={jsonp:!0}),y(t)&&"{"!==t.substring(0,1))sn.getJSON(t,(function(t,n){if(t)e(t);else{var r=ko(n);e(null,r)}}),n);else{y(t)&&(t=O(t));var r=ko(t);e(null,r)}return this},Kr.loadWMTS=function(t,e,n){return void 0===n&&(n={jsonp:!0}),y(t)&&sn.get(t,(function(r,i){if(r)e(r);else{var o=function(t,e,n){var r=(new DOMParser).parseFromString(t,"text/xml").querySelectorAll("Contents")[0];if(!r)return[];var i=r.getElementsByTagName("Layer");if(!i.length)return[];for(var o=[],a=0,s=r.childNodes.length;a<s;a++)"TileMatrixSet"===r.childNodes[a].nodeName&&o.push(r.childNodes[a]);if(!o.length)return[];for(var c=[],u=0,l=i.length;u<l;u++){var h=i[u],f=h.querySelectorAll("Style")[0];f&&(f=f.getElementsByTagName("ows:Identifier")[0])&&(f=f.textContent);var d=h.getElementsByTagName("ows:Identifier")[0];d&&(d=d.textContent);var p=h.querySelectorAll("ResourceURL")[0],m="";p&&(m=p.attributes.template.value);var g=Do(o,u,n),v=g.resolutions,y=g.tileSize,_=g.tileSystem,b=g.projection,x=g.TileMatrixSet;m.length||(m=e.substr(0,e.lastIndexOf("?")),m+="?SERVICE=WMTS&REQUEST=GetTile&VERSION=1.0.0&LAYER={LAYER}&STYLE={Style}&TILEMATRIXSET={TileMatrixSet}&FORMAT=tiles&TILEMATRIX={TileMatrix}&TILEROW={TileRow}&TILECOL={TileCol}");var w=Bo(m,[["{LAYER}",d],["{Layer}",d],["{layer}",d],["{STYLE}",f],["{Style}",f],["{style}",f],["{TileMatrixSet}",x],["{TileMatrix}","{z}"],["{TileRow}","{y}"],["{TileCol}","{x}"]]);c.push({tileSize:y,tileSystem:_,spatialReference:{resolutions:v,projection:b},urlTemplate:w,info:{layerName:d,TileMatrixSet:x,style:f,tileSize:y,tileSystem:_,resolutions:v,projection:b,urlTemplate:w}})}return c}(i,t,n);e(null,o)}}),n),this};var Fo=function(t){function e(e){return t.call(this,e)||this}fe(e,t);var n=e.prototype;return n.addTo=function(t){return this._owner=t,this._switchEvents("on"),this.onAdd&&this.onAdd(),this.fire("add"),this},n.getMap=function(){return this._owner?this._owner.getBaseLayer?this._owner:this._owner.getMap():null},n.show=function(t){var e=this.getMap();if(!e)return this;this._mapEventsOn||this._switchMapEvents("on"),t=t||this._coordinate||this._owner.getCenter();var n=this.isVisible();this.fire("showstart");var r=this._getUIContainer();this._coordinate=t,this._removePrevDOM();var i=this.__uiDOM=this.buildOn(e);if(i.eventsPropagation=this.options.eventsPropagation,!i)return this.fire("showend"),this;this._measureSize(i),this._singleton()&&(e[this._uiDomKey()]=i),this._setPosition(),i.style[ke]=null,r.appendChild(i);var o=this._getAnimation();if(n&&(o.ok=!1),o.ok&&(o.fade&&(i.style.opacity=0),o.scale)){if(this.getTransformOrigin){var a=this.getTransformOrigin();i.style[Oe]=a}i.style[Re]=this._toCSSTranslate(this._pos)+" scale(0)"}i.style.display="",this.options.eventsToStop&&rn(i,this.options.eventsToStop,He),this.options.autoPan&&this._autoPan();var s=o.transition;return o.ok&&s&&(i.offsetHeight,s&&(i.style[ke]=s),o.fade&&(i.style.opacity=1),o.scale&&(i.style[Re]=this._toCSSTranslate(this._pos)+" scale(1)")),this.fire("showend"),this},n.hide=function(){var t=this;if(!this.getDOM()||!this.getMap())return this;var e=this._getAnimation(),n=this.getDOM();return this.options.animationOnHide||(e.ok=!1),e.ok?(n.offsetHeight,n.style[ke]=e.transition,setTimeout((function(){n.style.display="none",t.fire("hide")}),this.options.animationDuration)):(n.style.display="none",this.fire("hide")),e.fade&&(n.style.opacity=0),e.scale&&(n.style[Re]=this._toCSSTranslate(this._pos)+" scale(0)"),this},n.isVisible=function(){var t=this.getDOM();return this.getMap()&&t&&t.parentNode&&"none"!==t.style.display},n.remove=function(){return delete this._mapEventsOn,this._owner?(this.hide(),this._switchEvents("off"),this.onRemove&&this.onRemove(),!this._singleton()&&this.__uiDOM&&this._removePrevDOM(),delete this._owner,this.fire("remove"),this):this},n.getSize=function(){return this._size?this._size.copy():null},n.getOwner=function(){return this._owner},n.getDOM=function(){return this.__uiDOM},n.getPosition=function(){if(!this.getMap())return null;var t=this._getViewPoint()._round();if(this.getOffset){var e=this.getOffset()._round();e&&t._add(e)}return t},n._getAnimation=function(){for(var t={fade:!1,scale:!1},e=this.options.animation?this.options.animation.split(","):[],n=0;n<e.length;n++){var r=ve(e[n]);"fade"===r?t.fade=!0:"scale"===r&&(t.scale=!0)}var i=null;return t.fade&&(i="opacity "+this.options.animationDuration+"ms"),t.scale&&(i=i?i+",":"",i+=Re+" "+this.options.animationDuration+"ms"),t.transition=i,t.ok=null!==i,t},n._getViewPoint=function(){var t=0;if(this._owner&&this._owner.getAltitude){var e=this._owner.getAltitude();e>0&&(t=this._meterToPoint(this._coordinate,e))}return this.getMap().coordToViewPoint(this._coordinate,void 0,t)._add(this.options.dx,this.options.dy)},n._meterToPoint=function(t,e){return this.getMap().distanceToPoint(e,0,void 0,t).x*j(e)},n._autoPan=function(){var t=this.getMap(),e=this.getDOM();if(!t.isMoving()){var n=this._pos,r=t.getSize(),i=r.width,o=r.height,a=t.viewPointToContainerPoint(n),s=parseInt(e.clientWidth),c=parseInt(e.clientHeight),u=0,l=0;a.x<0?u=-(a.x-s/2):a.x+s-35>i&&(u=i-(a.x+3*s/2)),a.y-c<0?l=50-(a.y-c):a.y>o&&(l=o-a.y-c-30),0===l&&0===u||t.panBy(new me(u,l),{duration:this.options.autoPanDuration})}},n._measureSize=function(t){var e=this._getUIContainer();t.style.position="absolute",t.style.left="-99999px";var n=t.style.bottom?"bottom":"top";return t.style[n]="-99999px",t.style.display="",e.appendChild(t),this._size=new ge(t.clientWidth,t.clientHeight),t.style.display="none",t.style.left="0px",t.style[n]="0px",this._size},n._removePrevDOM=function(){this.onDomRemove&&this.onDomRemove();var t=this.options.eventsToStop;if(this._singleton()){var e=this.getMap(),n=this._uiDomKey();e[n]&&(t&&on(e[n],t,He),je(e[n]),delete e[n]),delete this.__uiDOM}else this.__uiDOM&&(t&&on(this.__uiDOM,t,He),je(this.__uiDOM),delete this.__uiDOM)},n._uiDomKey=function(){return"__ui_"+this._getClassName()},n._singleton=function(){return this.options.single},n._getUIContainer=function(){return this.getMap()._panels.ui},n._getClassName=function(){return"UIComponent"},n._switchMapEvents=function(t){var e=this.getMap();if(e){this._mapEventsOn="on"===t;var n=this._getDefaultEvents();if(this.getEvents&&d(n,this.getEvents()),n)for(var r in n)n.hasOwnProperty(r)&&e[t](r,n[r],this)}},n._switchEvents=function(t){this._switchMapEvents(t);var e=this._getOwnerEvents();if(this._owner)for(var n in e)e.hasOwnProperty(n)&&this._owner[t](n,e[n],this)},n._getDefaultEvents=function(){return{"zooming rotate pitch":this.onEvent,zoomend:this.onZoomEnd,moving:this.onMoving,resize:this.onResize}},n._getOwnerEvents=function(){var t={};return this._owner&&this._owner instanceof $r&&(t.positionchange=this.onGeometryPositionChange),this.getOwnerEvents&&d(t,this.getOwnerEvents()),t},n.onGeometryPositionChange=function(t){this._owner&&this.isVisible()&&this.show(t.target.getCenter())},n.onMoving=function(){this.isVisible()&&this.getMap().isTransforming()&&this._updatePosition()},n.onEvent=function(){this.isVisible()&&this._updatePosition()},n.onZoomEnd=function(){this.isVisible()&&this._setPosition()},n.onResize=function(){this.isVisible()&&this._setPosition()},n._updatePosition=function(){this.getMap()._getRenderer().callInNextFrame(this._setPosition.bind(this))},n._setPosition=function(){var t=this.getDOM();if(t){t.style[ke]=null;var e=this.getPosition();this._pos=e,t.style[Re]=this._toCSSTranslate(e)+" scale(1)"}},n._toCSSTranslate=function(t){if(!t)return"";if(he.any3d){var e=this.getMap(),n=e?e.getBearing():0,r=e?e.getPitch():0,i="";return this.options.pitchWithMap&&r&&(i+=" rotateX("+Math.round(r)+"deg)"),this.options.rotateWithMap&&n&&(i+=" rotateZ("+Math.round(-n)+"deg)"),"translate3d("+t.x+"px,"+t.y+"px, 0px)"+i}return"translate("+t.x+"px,"+t.y+"px)"},e.isSupport=function(t){return!!(t&&_(t.on)&&_(t.off)&&_(t.getCenter))},e}(bn(Mn));Fo.mergeOptions({eventsPropagation:!1,eventsToStop:null,dx:0,dy:0,autoPan:!1,autoPanDuration:600,single:!0,animation:"scale",animationOnHide:!0,animationDuration:500,pitchWithMap:!1,rotateWithMap:!1});var jo="mousedown mouseup mouseenter mouseover mouseout mousemove click dblclick contextmenu keypress touchstart touchmove touchend",Uo=function(t){function e(e,n){var r;return(r=t.call(this,n)||this)._markerCoord=new Ln(e),r}fe(e,t);var n=e.prototype;return n._getClassName=function(){return"UIMarker"},n.setCoordinates=function(t){return this._markerCoord=t,this.fire("positionchange"),this.isVisible()&&(this._coordinate=this._markerCoord,this._setPosition()),this},n.getCoordinates=function(){return this._markerCoord},n.setContent=function(t){var e=this.options.content;return this.options.content=t,this.fire("contentchange",{old:e,new:t}),this.isVisible()&&this.show(),this},n.getContent=function(){return this.options.content},n.onAdd=function(){this.show()},n.show=function(){return t.prototype.show.call(this,this._markerCoord)},n.flash=function(t,e,n,r){return et.call(this,t,e,n,r)},n.buildOn=function(){var t;return y(this.options.content)?(t=De("div")).innerHTML=this.options.content:t=this.options.content,this.options.containerClass&&(t.className=this.options.containerClass),this._registerDOMEvents(t),t},n.getOffset=function(){var t=this.getSize();return new me(-t.width/2,-t.height/2)},n.getTransformOrigin=function(){return"center center"},n.onDomRemove=function(){var t=this.getDOM();this._removeDOMEvents(t)},n.isDragging=function(){return!!this.draggable&&this.draggable.isDragging()},n._registerDOMEvents=function(t){rn(t,jo,this._onDomEvents,this)},n._onDomEvents=function(t){var e=this.getMap()._parseEvent(t,t.type);this.fire(t.type,e)},n._removeDOMEvents=function(t){on(t,jo,this._onDomEvents,this)},n._getConnectPoints=function(){var t=this.getMap(),e=t.coordToContainerPoint(this.getCoordinates()),n=this.getSize(),r=n.width,i=n.height;return[t.containerPointToCoordinate(e.add(-r/2,0)),t.containerPointToCoordinate(e.add(r/2,0)),t.containerPointToCoordinate(e.add(0,i/2)),t.containerPointToCoordinate(e.add(0,-i/2))]},e}(En(Fo));Uo.mergeOptions({containerClass:null,eventsPropagation:!0,draggable:!1,single:!1,content:null});var No=he.touch?"touchstart mousedown":"mousedown",zo=function(t){function e(e){return t.call(this,e)||this}fe(e,t);var n=e.prototype;return n.addHooks=function(){this.target.on(No,this._startDrag,this)},n.removeHooks=function(){this.target.off(No,this._startDrag,this)},n._startDrag=function(t){var e=t.domEvent;e.touches&&e.touches.length>1||2===e.button||this.isDragging()||(this.target.on("click",this._endDrag,this),this._lastCoord=t.coordinate,this._lastPoint=t.containerPoint,this._prepareDragHandler(),this._dragHandler.onMouseDown(t.domEvent),this.target.fire("dragstart",t))},n._prepareDragHandler=function(){this._dragHandler=new Pn(this.target.getDOM(),{cancelOn:this._cancelOn.bind(this),ignoreMouseleave:!0}),this._dragHandler.on("mousedown",this._onMouseDown,this),this._dragHandler.on("dragging",this._dragging,this),this._dragHandler.on("mouseup",this._endDrag,this),this._dragHandler.enable()},n._cancelOn=function(t){var e=(t.srcElement||t.target).tagName.toLowerCase();return"button"===e||"input"===e||"select"===e||"option"===e||"textarea"===e},n._onMouseDown=function(t){He(t.domEvent)},n._dragging=function(t){var e=this.target,n=e.getMap()._parseEvent(t.domEvent),r=n.domEvent;if(!(r.touches&&r.touches.length>1))if(this._isDragging){var i=n.coordinate,o=n.containerPoint;this._lastCoord||(this._lastCoord=i),this._lastPoint||(this._lastPoint=o);var a=i.sub(this._lastCoord),s=o.sub(this._lastPoint);this._lastCoord=i,this._lastPoint=o,this.target.setCoordinates(this.target.getCoordinates().add(a)),n.coordOffset=a,n.pointOffset=s,e.fire("dragging",n)}else this._isDragging=!0},n._endDrag=function(t){var e=this.target,n=e.getMap();if(this._dragHandler&&(e.off("click",this._endDrag,this),this._dragHandler.disable(),delete this._dragHandler),delete this._lastCoord,delete this._lastPoint,this._isDragging=!1,n){var r=n._parseEvent(t.domEvent);e.fire("dragend",r)}},n.isDragging=function(){return!!this._isDragging},e}(wn);Uo.addInitHook("addHandler","draggable",zo);var Go=function(t){function e(){return t.apply(this,arguments)||this}fe(e,t);var n=e.prototype;return n._getClassName=function(){return"InfoWindow"},n.addTo=function(e){return e instanceof $r&&(e.getInfoWindow()&&e.getInfoWindow()!==this&&e.removeInfoWindow(),e._infoWindow=this),t.prototype.addTo.call(this,e)},n.setContent=function(t){var e=this.options.content;return this.options.content=t,this.fire("contentchange",{old:e,new:t}),this.isVisible()&&this.show(this._coordinate),this},n.getContent=function(){return this.options.content},n.setTitle=function(t){var e=t;return this.options.title=t,this.fire("contentchange",{old:e,new:t}),this.isVisible()&&this.show(this._coordinate),this},n.getTitle=function(){return this.options.title},n.buildOn=function(){if(this.options.custom){if(y(this.options.content)){var t=De("div");return t.innerHTML=this.options.content,t}return this.options.content}var e=De("div");this.options.containerClass&&(e.className=this.options.containerClass),e.style.width=this._getWindowWidth()+"px",e.style.bottom="0px";var n='<em class="maptalks-ico"></em>';this.options.title&&(n+="<h2>"+this.options.title+"</h2>"),n+='<a href="javascript:void(0);" class="maptalks-close"></a><div class="maptalks-msgContent"></div>',e.innerHTML=n;var r=e.querySelector(".maptalks-msgContent");return y(this.options.content)?r.innerHTML=this.options.content:r.appendChild(this.options.content),this._onCloseBtnClick=this.hide.bind(this),Ue(e.querySelector(".maptalks-close"),"click touchend",this._onCloseBtnClick),e},n.getTransformOrigin=function(){return this.getSize().width/2+"px bottom"},n.getOffset=function(){var t=this.getSize(),e=new me(-t.width/2,0);this.options.custom?e._sub(0,t.height):e._sub(4,12);var n=this.getOwner();if(n instanceof Mi||n instanceof Ii){var r,i;if(n instanceof Mi)r=n._getPainter(),i=n.getSize();else{var o=n.getGeometries();if(!o||!o.length)return e;r=o[0]._getPainter(),i=o[0].getSize()}if(r){var a=r.getFixedExtent();e._add(a.xmax-i.width/2,a.ymin)}else e._add(0,-i.height)}return e},n.show=function(e){return this.getMap()&&this.getMap().options.enableInfoWindow?t.prototype.show.call(this,e):this},n.getEvents=function(){if(!this.options.autoCloseOn)return null;var t={};return t[this.options.autoCloseOn]=this.hide,t},n.getOwnerEvents=function(){var t=this.getOwner();if(!this.options.autoOpenOn||!t)return null;var e={};return e[this.options.autoOpenOn]=this._onAutoOpen,e},n.onRemove=function(){this.onDomRemove()},n.onDomRemove=function(){this._onCloseBtnClick&&(Ne(this.getDOM().childNodes[2],"click touchend",this._onCloseBtnClick),delete this._onCloseBtnClick)},n._onAutoOpen=function(t){var e=this,n=this.getOwner();setTimeout((function(){n instanceof Mi||n instanceof Fo?e.show(n.getCoordinates()):n instanceof Ii?e.show(n.findClosest(t.coordinate)):n instanceof Ai||n instanceof Li?(e.getMap().getScale()>=8&&(t.coordinate=e._rectifyMouseCoordinte(n,t.coordinate)),e.show(t.coordinate)):e.show(t.coordinate)}),1)},n._rectifyMouseCoordinte=function(t,e){var n=this;return t instanceof Ai?this._rectifyLineStringMouseCoordinate(t,e).coordinate:t instanceof Li?t.getGeometries().map((function(t){return n._rectifyLineStringMouseCoordinate(t,e)})).sort((function(t,e){return t.dis-e.dis}))[0].coordinate:e},n._rectifyLineStringMouseCoordinate=function(t,e){for(var n=this,r=t.getCoordinates().map((function(t){return n.getMap().coordToContainerPoint(t)})),i=this.getMap().coordToContainerPoint(e),o=1/0,a=-1,s=0,c=r.length;s<c;s++){var u=r[s],l=i.distanceTo(u);l<o&&(o=l,a=s)}var h=[];0===a?h.push(r[0],r[1]):a===r.length-1?h.push(r[a-1],r[a]):h.push(r[a-1],r[a],r[a+1]);for(var f=[],d=this.getMap().getSize(),p=d.width,m=d.height,g=0,v=h.length-1;g<v;g++){var y=h[g],_=h[g+1];if(y.x===_.x)for(var b=Math.max(0,Math.min(y.y,_.y)),x=Math.min(m,Math.max(y.y,_.y)),w=b;w<=x;w++)f.push(new me(y.x,w));else for(var M=(_.y-y.y)/(_.x-y.x),S=Math.max(0,Math.min(y.x,_.x)),A=Math.min(p,Math.max(y.x,_.x)),E=S;E<=A;E++){var C=M*(E-y.x)+y.y;f.push(new me(E,C))}}for(var T=1/0,I=-1,P=0,L=f.length;P<L;P++){var R=f[P],O=i.distanceTo(R);O<T&&(T=O,I=P)}return{dis:T,coordinate:I<0?e:this.getMap().containerPointToCoord(f[I])}},n._getWindowWidth=function(){var t=this.options.width;return t||(t=300),t},e}(Fo);Go.mergeOptions({containerClass:"maptalks-msgBox",autoPan:!0,autoCloseOn:null,autoOpenOn:"click",width:300,minHeight:120,custom:!1,title:null,content:null});var Ho=function(t){fe(n,t);var e=n.prototype;function n(e,n){var r;return void 0===n&&(n={}),(r=t.call(this,n)||this)._content=e,r}return e._getClassName=function(){return"ToolTip"},e.addTo=function(e){if(n.isSupport(e))return e.on("mousemove",this.onMouseMove,this),e.on("mouseout",this.onMouseOut,this),t.prototype.addTo.call(this,e);throw new Error("Invalid geometry or UIMarker the tooltip is added to.")},e.setStyle=function(t){return this.options.containerClass=t,this},e.getStyle=function(){return this.options.containerClass},e.getContent=function(){return this._content},e.buildOn=function(){var t=De("div"),e=this.options||{};e.height&&(t.style.height=e.height+"px"),e.width&&(t.style.width=e.width+"px");var n=e.containerClass||e.cssName;return!n&&e.height&&(t.style.lineHeight=e.height+"px"),t.innerHTML='<div class="'+n+'">'+this._content+"</div>",t},e.onMouseOut=function(){clearTimeout(this._timeout),this.isVisible()&&this._removePrevDOM()},e.onMouseMove=function(t){var e=this;clearTimeout(this._timeout);var n=this.getMap();if(n){var r=n.locateByPoint(t.coordinate,-5,25);0===this.options.showTimeout?this.show(r):this._timeout=setTimeout((function(){n&&e.show(r)}),this.options.showTimeout)}},e.onRemove=function(){clearTimeout(this._timeout),this._owner&&(this._owner.off("mouseover",this.onMouseOver,this),this._owner.off("mouseout",this.onMouseOut,this))},e._getViewPoint=function(){return this.getMap().coordToViewPoint(this._coordinate,void 0,0)._add(this.options.dx,this.options.dy)},n}(Fo);Ho.mergeOptions({width:0,height:0,animation:"fade",containerClass:"maptalks-tooltip",showTimeout:400});var Wo=function(t){function e(e){return t.call(this,e)||this}fe(e,t);var n=e.prototype;return n._getClassName=function(){return"Menu"},n.addTo=function(t){return t._menu&&t._menu!==this&&t.removeMenu(),t._menu=this,Fo.prototype.addTo.apply(this,arguments)},n.setItems=function(t){return this.options.items=t,this},n.getItems=function(){return this.options.items||[]},n.buildOn=function(){if(this.options.custom){if(y(this.options.items)){var t=De("div");return t.innerHTML=this.options.items,t}return this.options.items}var e=De("div");this.options.containerClass&&Je(e,this.options.containerClass),e.style.width=this._getMenuWidth()+"px";var n=this._createMenuItemDom();return e.appendChild(n),rn(e,"contextmenu",Ge),e},n.getOffset=function(){if(!this.getMap())return null;var t=this.getMap().getSize(),e=this.getMap().viewPointToContainerPoint(this._getViewPoint()),n=this.getSize(),r=0,i=0;return e.x+n.width>t.width&&(r=-n.width),e.y+n.height>t.height&&(i=-n.height),new me(r,i)},n.getTransformOrigin=function(){var t=this.getOffset()._multi(-1);return t.x+"px "+t.y+"px"},n.getEvents=function(){return{"_zoomstart _zoomend _movestart _dblclick _click":this._removePrevDOM}},n._createMenuItemDom=function(){var t=this,e=this.getMap(),n=De("ul");Je(n,"maptalks-menu-items");var r,i,o=this.getItems();function a(n){return function(r){var i=e._parseEvent(r,"click");i.target=t,i.owner=t._owner,i.index=n,!1!==this._callback(i)&&t.hide()}}for(var s=0,c=o.length;s<c;s++){if("-"===(r=o[s])||"_"===r)Je(i=De("li"),"maptalks-menu-splitter");else{i=De("li");var u=r.item;_(u)&&(u=u({owner:this._owner,index:s})),i.innerHTML=u,i._callback=r.click,rn(i,"click",a(s))}n.appendChild(i)}var l=this.options.maxHeight||0;return l>0&&Xe(n,"max-height: "+l+"px; overflow-y: auto;"),n},n._getMenuWidth=function(){return this.options.width||160},e}(Fo);Wo.mergeOptions({containerClass:"maptalks-menu",animation:null,animationDelay:10,animationOnHide:!1,autoPan:!1,width:160,maxHeight:0,custom:!1,items:[]});var Vo={setMenu:function(t){return this._menuOptions=t,this._menu?this._menu.setOptions(t):this.on("contextmenu",this._defaultOpenMenu,this),this},openMenu:function(t){var e=this instanceof ii?this:this.getMap();return t||(t=this.getCenter()),this._menu?this._menu.show(t):this._menuOptions&&e&&(this._bindMenu(this._menuOptions),this._menu.show(t)),this},setMenuItems:function(t){return this._menuOptions||(this._menuOptions={}),Array.isArray(t)&&(this._menuOptions.custom=!1),this._menuOptions.items=t,this.setMenu(this._menuOptions),this},getMenuItems:function(){return this._menu?this._menu.getItems():this._menuOptions&&this._menuOptions.items||[]},closeMenu:function(){return this._menu&&this._menu.hide(),this},removeMenu:function(){return this.off("contextmenu",this._defaultOpenMenu,this),this._unbindMenu(),delete this._menuOptions,this},_bindMenu:function(t){return this._menu=new Wo(t),this._menu.addTo(this),this},_unbindMenu:function(){return this._menu&&(this.closeMenu(),this._menu.remove(),delete this._menu),this},_defaultOpenMenu:function(t){return this.listens("contextmenu")>1||(this.openMenu(t.coordinate),!1)}};ii.include(Vo),$r.include(Vo);var Zo=Object.freeze({UIComponent:Fo,UIMarker:Uo,InfoWindow:Go,ToolTip:Ho,Menuable:Vo,Menu:Wo}),Qo=function(t){function e(e){return e&&e.position&&!y(e.position)&&(e.position=d({},e.position)),t.call(this,e)||this}fe(e,t);var n=e.prototype;return n.addTo=function(t){if(this.remove(),!t.options.control)return this;this._map=t;var e=t._panels.control;return this.__ctrlContainer=De("div"),Xe(this.__ctrlContainer,"position:absolute;overflow:visible;"),this.update(),e.appendChild(this.__ctrlContainer),this.onAdd&&this.onAdd(),this.fire("add",{dom:e}),this},n.update=function(){return this.__ctrlContainer.innerHTML="",this._controlDom=this.buildOn(this.getMap()),this._controlDom&&(this._updatePosition(),this.__ctrlContainer.appendChild(this._controlDom)),this},n.getMap=function(){return this._map},n.getPosition=function(){return d({},this._parse(this.options.position))},n.setPosition=function(t){return y(t)?this.options.position=t:this.options.position=d({},t),this._updatePosition(),this},n.getContainerPoint=function(){var t,e,n=this.getPosition(),r=this.getMap().getSize();return p(n.left)?p(n.right)||(t=r.width-parseInt(n.right)):t=parseInt(n.left),p(n.top)?p(n.bottom)||(e=r.height-parseInt(n.bottom)):e=parseInt(n.top),new me(t,e)},n.getContainer=function(){return this.__ctrlContainer},n.getDOM=function(){return this._controlDom},n.show=function(){return this.__ctrlContainer.style.display="",this},n.hide=function(){return this.__ctrlContainer.style.display="none",this},n.isVisible=function(){return this.__ctrlContainer&&""===this.__ctrlContainer.style.display},n.remove=function(){return this._map?(je(this.__ctrlContainer),this.onRemove&&this.onRemove(),delete this._map,delete this.__ctrlContainer,delete this._controlDom,this.fire("remove"),this):this},n._parse=function(t){var n=t;return y(t)&&(n=e.positions[n]),n},n._updatePosition=function(){var t=this.getPosition();for(var e in t||(t={top:20,left:20}),t)t.hasOwnProperty(e)&&(t[e]=parseInt(t[e]),this.__ctrlContainer.style[e]=t[e]+"px");this.fire("positionchange",{position:d({},t)})},e}(bn(Mn));Qo.positions={"top-left":{top:20,left:20},"top-right":{top:20,right:20},"bottom-left":{bottom:20,left:20},"bottom-right":{bottom:20,right:20}},ii.mergeOptions({control:!0}),ii.include({addControl:function(t){return this._containerDOM.getContext||t.addTo(this),this},removeControl:function(t){return t&&t.getMap()===this?(t.remove(),this):this}});var Xo="addlayer removelayer setbaselayer baselayerremove",Yo=function(t){function e(){return t.apply(this,arguments)||this}fe(e,t);var n=e.prototype;return n.buildOn=function(){return this._attributionContainer=De("div"),this._attributionContainer.className="maptalks-attribution",this._update(),this._attributionContainer},n.onAdd=function(){this.getMap().on(Xo,this._update,this)},n.onRemove=function(){this.getMap().off(Xo,this._update,this)},n._update=function(){var t=this.getMap();if(t){var e=t._getLayers((function(t){return t.options.attribution})).reverse().map((function(t){return t.options.attribution})),n=this.options.content+(e.length>0?" - "+e.join(", "):"");this._attributionContainer.innerHTML='<span style="padding:0px 4px">'+n+"</span>"}},e}(Qo);Yo.mergeOptions({position:{bottom:0,left:0},content:'<a href="http://maptalks.org" target="_blank">maptalks</a>'}),ii.mergeOptions({attribution:!0}),ii.addOnLoadHook((function(){var t=this.options.attribution||this.options.attributionControl;t&&(this.attributionControl=new Yo(t),this.addControl(this.attributionControl))}));var Jo=function(t){function e(){return t.apply(this,arguments)||this}fe(e,t);var n=e.prototype;return n.buildOn=function(){var t=this.container=De("div",this.options.containerClass),e=this.panel=De("div","panel"),n=this.button=De("button");return t.appendChild(n),t.appendChild(e),t},n.onAdd=function(){rn(this.button,"mouseover",this._show,this),rn(this.panel,"mouseleave",this._hide,this),rn(this.getMap(),"click",this._hide,this)},n.onRemove=function(){this.panel&&(on(this.button,"mouseover",this._show,this),on(this.panel,"mouseleave",this._hide,this),on(this.getMap(),"click",this._hide,this),je(this.panel),je(this.button),delete this.panel,delete this.button,delete this.container)},n._show=function(){Ye(this.container,"shown")||(Je(this.container,"shown"),this._createPanel())},n._hide=function(t){this.panel.contains(t.toElement||t.relatedTarget)||qe(this.container,this.options.containerClass)},n._createPanel=function(){this.panel.innerHTML="";var t=De("ul");this.panel.appendChild(t),this._renderLayers(this.getMap(),t)},n._renderLayers=function(t,e){var n=t.getBaseLayer(),r=t.getLayers(),i=r.length;if(n){var o=n.layers||[n],a=De("li","group"),s=De("ul"),c=De("label");c.innerHTML=this.options.baseTitle,a.appendChild(c);for(var u=0,l=o.length;u<l;u++){var h=o[u];this._isExcluded(h)&&(s.appendChild(this._renderLayer(o[u],!0)),a.appendChild(s),e.appendChild(a))}}if(i){var f=De("li","group"),d=De("ul"),p=De("label");p.innerHTML=this.options.overlayTitle,f.appendChild(p);for(var m=0;m<i;m++){var g=r[m];this._isExcluded(g)&&d.appendChild(this._renderLayer(g))}f.appendChild(d),e.appendChild(f)}},n._isExcluded=function(t){var e=t.getId(),n=this.options.excludeLayers;return!(n.length&&n.indexOf(e)>=0)},n._renderLayer=function(t,e){var n=this,r=De("li","layer"),i=De("label"),o=De("input"),a=this.getMap(),s=t.options.visible;t.options.visible=!0;var c=t.isVisible();return t.options.visible=s,r.className="layer",e?(o.type="radio",o.name="base"):o.type="checkbox",o.checked=s&&c,c||o.setAttribute("disabled","disabled"),o.onchange=function(e){if("radio"===e.target.type){var r=a.getBaseLayer(),i=r.layers;if(i)for(var o=0,s=i.length;o<s;o++){var c=i[o];c[c===t?"show":"hide"]()}else r.isVisible()||r.show();a._fireEvent("setbaselayer")}else t[e.target.checked?"show":"hide"]();n.fire("layerchange",{target:t})},r.appendChild(o),i.innerHTML=t.getId(),r.appendChild(i),r},e}(Qo);Jo.mergeOptions({position:"top-right",baseTitle:"Base Layers",overlayTitle:"Layers",excludeLayers:[],containerClass:"maptalks-layer-switcher"}),ii.mergeOptions({layerSwitcherControl:!1}),ii.addOnLoadHook((function(){this.options.layerSwitcherControl&&(this.layerSwitcherControl=new Jo(this.options.layerSwitcherControl),this.addControl(this.layerSwitcherControl))}));var qo=function(t){function e(){return t.apply(this,arguments)||this}fe(e,t);var n=e.prototype;return n.buildOn=function(){var t=this.options.size;this.options.maximize||(t=[0,0]);var e=De("div"),n=this.mapContainer=De("div");n.style.width=t[0]+"px",n.style.height=t[1]+"px",n.className=this.options.containerClass;var r=this.button=De("div");return r.className=this.options.buttonClass,e.appendChild(n),e.appendChild(r),e},n.onAdd=function(){this.options.maximize&&this._createOverview(),this.getMap().on("resize moving zooming rotate dragrotating viewchange",this._update,this).on("setbaselayer",this._updateBaseLayer,this).on("spatialreferencechange",this._updateSpatialReference,this),rn(this.button,"click",this._onButtonClick,this),this._updateButtonText()},n.onRemove=function(){this.getMap().off("resize moving zooming rotate dragrotating viewchange",this._update,this).off("setbaselayer",this._updateBaseLayer,this).off("spatialreferencechange",this._updateSpatialReference,this),this._overview&&(this._overview.remove(),delete this._overview,delete this._perspective),on(this.button,"click",this._onButtonClick,this)},n.maxmize=function(){var t=this.options.size,e=this.mapContainer;return e.style.width=t[0]+"px",e.style.height=t[1]+"px",this._createOverview(),this},n.minimize=function(){this._overview&&this._overview.remove(),delete this._overview,delete this._perspective;var t=this.mapContainer;return t.style.width="0px",t.style.height="0px",this},n.getOverviewMap=function(){return this._overview},n._onButtonClick=function(){this._overview?this.minimize():this.maxmize(),this._updateButtonText()},n._updateButtonText=function(){this._overview?this.button.innerHTML="-":this.button.innerHTML="+"},n._createOverview=function(){var t=this.getMap(),e=this.mapContainer,n=t.config();d(n,{center:t.getCenter(),zoom:this._getOverviewZoom(),zoomAnimationDuration:150,pitch:0,bearing:0,scrollWheelZoom:!1,checkSize:!1,doubleClickZoom:!1,touchZoom:!1,control:!1,draggable:!1,maxExtent:null}),this._overview=new ii(e,n),this._updateBaseLayer(),this._perspective=new xi(this._getPerspectiveCoords(),{draggable:!0,cursor:"move",symbol:this.options.symbol}).on("dragend",this._onDragEnd,this),new eo("perspective_layer",this._perspective).addTo(this._overview),this.fire("load")},n._getOverviewZoom=function(){var t=this.getMap(),e=t.getZoom(),n=t.getMinZoom(),r=this.options.level;if(r>0){for(var i=r;i>0;i--)if(e-i>=n)return e-i}else for(var o=r;o<0;o++)if(e-o>=n)return e-o;return e},n._onDragEnd=function(){var t=this._perspective.getCenter();this._overview.setCenter(t),this.getMap().panTo(t)},n._getPerspectiveCoords=function(){var t=this.getMap();return t.getContainerExtent().toArray().map((function(e){return t.containerPointToCoordinate(e)}))},n._update=function(){if(this._overview){Ze(this._overview._containerDOM);var t=this._getPerspectiveCoords();this._perspective.setCoordinates(t),this._overview.setCenterAndZoom(this.getMap().getCenter(),this._getOverviewZoom())}},n._updateSpatialReference=function(){if(this._overview){var t=this.getMap().options.spatialReference;this._overview.setSpatialReference(t)}},n._updateBaseLayer=function(){if(this._overview){var t=this.getMap().getBaseLayer();if(t){var e=t.layers,n=0;if(e)for(var r=0,i=e.length;r<i;r++)if(e[r].isVisible()){n=r;break}var o=t.toJSON(),a=null;e?(a=o.layers[n].options).visible=!0:a=o.options,this._overview.setMinZoom(a.minZoom||null).setMaxZoom(a.maxZoom||null),delete a.minZoom,delete a.maxZoom,delete o.options.canvas,o.options.visible=!0,o.options.renderer="canvas";var s=ei.fromJSON(o);for(var c in t)_(t[c])&&t.hasOwnProperty(c)&&t[c]!==t.constructor.prototype[c]&&(s[c]=t[c]);this._overview.setBaseLayer(s)}else this._overview.setBaseLayer(null)}},e}(Qo);qo.mergeOptions({level:4,position:{right:1,bottom:1},size:[300,200],maximize:!0,symbol:{lineWidth:3,lineColor:"#1bbc9b",polygonFill:"#1bbc9b",polygonOpacity:.4},containerClass:"maptalks-overview",buttonClass:"maptalks-overview-button"}),ii.mergeOptions({overviewControl:!1}),ii.addOnLoadHook((function(){this.options.overviewControl&&(this.overviewControl=new qo(this.options.overviewControl),this.addControl(this.overviewControl))}));var Ko=function(t){function e(){return t.apply(this,arguments)||this}fe(e,t);var n=e.prototype;return n.buildOn=function(){var t;if(this.options.custom)y(this.options.content)?(t=De("div")).innerHTML=this.options.content:t=this.options.content;else{if(t=De("div","maptalks-panel"),this.options.closeButton){var e=De("a","maptalks-close");e.href="javascript:;",e.onclick=function(){t.style.display="none"},t.appendChild(e)}var n=De("div","maptalks-panel-content");n.innerHTML=this.options.content,t.appendChild(n)}return this.draggable=new Pn(t,{cancelOn:this._cancelOn.bind(this),ignoreMouseleave:!0}),this.draggable.on("dragstart",this._onDragStart,this).on("dragging",this._onDragging,this).on("dragend",this._onDragEnd,this),this.options.draggable&&this.draggable.enable(),t},n.update=function(){return this.draggable&&(this.draggable.disable(),delete this.draggable),Qo.prototype.update.call(this)},n.setContent=function(t){var e=this.options.content;return this.options.content=t,this.fire("contentchange",{old:e,new:t}),this.isVisible()&&this.update(),this},n.getContent=function(){return this.options.content},n._cancelOn=function(t){var e=(t.srcElement||t.target).tagName.toLowerCase();return"button"===e||"input"===e||"select"===e||"option"===e||"textarea"===e},n._onDragStart=function(t){this._startPos=t.mousePos,this._startPosition=d({},this.getPosition()),this.fire("dragstart",t)},n._onDragging=function(t){var e=t.mousePos.sub(this._startPos),n=this._startPosition,r=this.getPosition();p(r.top)||(r.top=parseInt(n.top)+e.y),p(r.bottom)||(r.bottom=parseInt(n.bottom)-e.y),p(r.left)||(r.left=parseInt(n.left)+e.x),p(r.right)||(r.right=parseInt(n.right)-e.x),this.setPosition(r),this.fire("dragging",t)},n._onDragEnd=function(t){delete this._startPos,delete this._startPosition,this.fire("dragend",t)},n._getConnectPoints=function(){var t=this.getMap(),e=this.getContainerPoint(),n=this.getDOM(),r=parseInt(n.clientWidth),i=parseInt(n.clientHeight);return[t.containerPointToCoordinate(e.add(r/2,0)),t.containerPointToCoordinate(e.add(r,i/2)),t.containerPointToCoordinate(e.add(r/2,i)),t.containerPointToCoordinate(e.add(0,i/2))]},e}(Qo);Ko.mergeOptions({position:"top-right",draggable:!0,custom:!1,content:"",closeButton:!0});var $o=function(t){function e(){return t.apply(this,arguments)||this}fe(e,t);var n=e.prototype;return n.buildOn=function(t){return this._map=t,this._scaleContainer=De("div",this.options.containerClass),this._addScales(),t.on("zoomend",this._update,this),this._map._loaded&&this._update(),this._scaleContainer},n.onRemove=function(){this.getMap().off("zoomend",this._update,this)},n._addScales=function(){var t="border: 2px solid #000000;border-top: none;line-height: 1.1;padding: 0px;color: #000000;font-size: 11px;text-align:center;white-space: nowrap;overflow: hidden;-moz-box-sizing: content-box;box-sizing: content-box;background: #fff; background: rgba(255, 255, 255, 0);";this.options.metric&&(this._mScale=Fe("div",this.options.containerClass?null:t,this._scaleContainer)),this.options.imperial&&(this._iScale=Fe("div",this.options.containerClass?null:t,this._scaleContainer))},n._update=function(){var t=this._map.pixelToDistance(this.options.maxWidth,0);this._updateScales(t)},n._updateScales=function(t){this.options.metric&&t&&this._updateMetric(t),this.options.imperial&&t&&this._updateImperial(t)},n._updateMetric=function(t){var e=this._getRoundNum(t),n=e<1e3?e+" m":e/1e3+" km";this._updateScale(this._mScale,n,e/t)},n._updateImperial=function(t){var e,n,r,i=3.2808399*t;i>5280?(e=i/5280,n=this._getRoundNum(e),this._updateScale(this._iScale,n+" mile",n/e)):(r=this._getRoundNum(i),this._updateScale(this._iScale,r+" feet",r/i))},n._updateScale=function(t,e,n){t.style.width=Math.round(this.options.maxWidth*n)+"px",t.innerHTML=e},n._getRoundNum=function(t){var e=Math.pow(10,(Math.floor(t)+"").length-1),n=t/e;return e*(n=n>=10?10:n>=5?5:n>=3?3:n>=2?2:1)},e}(Qo);$o.mergeOptions({position:"bottom-left",maxWidth:100,metric:!0,imperial:!1,containerClass:null}),ii.mergeOptions({scaleControl:!1}),ii.addOnLoadHook((function(){this.options.scaleControl&&(this.scaleControl=new $o(this.options.scaleControl),this.addControl(this.scaleControl))}));var ta=function(t){function e(){return t.apply(this,arguments)||this}fe(e,t);var n=e.prototype;return n.buildOn=function(t){this._map=t;var e=De("div"),n=De("ul","maptalks-toolbar-hx");e.appendChild(n),this.options.vertical?Je(e,"maptalks-toolbar-vertical"):Je(e,"maptalks-toolbar-horizonal");var r=this;function i(t,e,n,i){var o=r._getItems()[e];return function(r){return He(r),t({target:o,index:e,childIndex:n,dom:i})}}var o=this.options.items;if(H(o))for(var a=0,s=o.length;a<s;a++){var c=o[a],u=De("li");if(28!==this.options.height&&(u.style.lineHeight=this.options.height+"px"),u.style.height=this.options.height+"px",u.style.cursor="pointer",tn(c.item)){u.style.textAlign="center";var l=en("div",c.item);u.innerHTML='<div style="margin-top:'+(this.options.height-l.height)/2+'px;">'+c.item+"</div>"}else u.innerHTML=c.item;if(c.click&&rn(u,"click",i(c.click,a,null,u)),H(c.children)){var h=this._createDropMenu(a);u.appendChild(h),u._menu=h,rn(u,"mouseover",(function(){this._menu.style.display=""})),rn(u,"mouseout",(function(){this._menu.style.display="none"}))}n.appendChild(u)}return e},n._createDropMenu=function(t){var e=this;function n(t,n,r){var i=e._getItems()[n].children[r];return function(e){return He(e),t({target:i,index:n,childIndex:r})}}var r=De("div","maptalks-dropMenu"),i=this._getItems(),o=i.length,a=De("ul"),s=i[t].children;t===o-1&&s&&(r.style.cssText="right: 0px;",a.style.cssText="right: 0px;position: absolute;",this.options.reverseMenu&&(a.style.bottom=0)),r.appendChild(De("em","maptalks-ico"));for(var c=0,u=0,l=s.length;u<l;u++){var h=Me(s[u].item,"12px");h.width>c&&(c=h.width)}for(var f=0,d=s.length;f<d;f++){var p=s[f],m=De("li");m.innerHTML='<a href="javascript:;">'+p.item+"</a>",m.style.cursor="pointer",m.style.width=c+24+"px",rn(m.childNodes[0],"click",n(p.click,t,f)),a.appendChild(m)}if(this.options.vertical){var g=c<95?95:c;this.options.reverseMenu?r.style.right=-(g+20)+"px":r.style.left=-(g+20)+"px"}else this.options.reverseMenu?r.style.bottom="28px":r.style.top="28px";return r.appendChild(a),r.style.display="none",r},n._getItems=function(){return this.options.items||[]},e}(Qo);ta.mergeOptions({height:28,vertical:!1,position:"top-right",reverseMenu:!1,items:{}});var ea=function(t){function e(){return t.apply(this,arguments)||this}fe(e,t);var n=e.prototype;return n.buildOn=function(t){var e=this.options,n=De("div","maptalks-zoom");if(e.zoomLevel){var r=De("span","maptalks-zoom-zoomlevel");n.appendChild(r),this._levelDOM=r}var i=De("div","maptalks-zoom-slider"),o=De("a","maptalks-zoom-zoomin");if(o.href="javascript:;",o.innerHTML="+",i.appendChild(o),this._zoomInButton=o,e.slider){var a=De("div","maptalks-zoom-slider-box"),s=De("div","maptalks-zoom-slider-ruler"),c=De("span","maptalks-zoom-slider-reading"),u=De("span","maptalks-zoom-slider-dot");s.appendChild(c),a.appendChild(s),a.appendChild(u),i.appendChild(a),this._sliderBox=a,this._sliderRuler=s,this._sliderReading=c,this._sliderDot=u}var l=De("a","maptalks-zoom-zoomout");return l.href="javascript:;",l.innerHTML="-",i.appendChild(l),this._zoomOutButton=l,n.appendChild(i),t.on("_zoomend _zooming _zoomstart _spatialreferencechange",this._update,this),this._update(),this._registerDomEvents(),n},n.onRemove=function(){this.getMap().off("_zoomend _zooming _zoomstart _spatialreferencechange",this._update,this),this._zoomInButton&&on(this._zoomInButton,"click",this._onZoomInClick,this),this._zoomOutButton&&on(this._zoomOutButton,"click",this._onZoomOutClick,this),this._sliderRuler&&(on(this._sliderRuler,"click",this._onClickRuler,this),this.dotDragger.disable(),delete this.dotDragger)},n._update=function(){var t=this.getMap();if(this._sliderBox){var e=10*(t.getMaxZoom()-t.getMinZoom());this._sliderBox.style.height=e+16+"px",this._sliderRuler.style.height=e+8+"px",this._sliderRuler.style.cursor="pointer";var n=10*(t.getMaxZoom()-t.getZoom());this._sliderReading.style.height=10*(t.getZoom()-t.getMinZoom()+1)+"px",this._sliderDot.style.top=n+"px"}this._updateText()},n._updateText=function(){if(this._levelDOM){var t=this.getMap().getZoom();g(t)||(t=Math.floor(10*t)/10),this._levelDOM.innerHTML=t}},n._registerDomEvents=function(){this._zoomInButton&&rn(this._zoomInButton,"click",this._onZoomInClick,this),this._zoomOutButton&&rn(this._zoomOutButton,"click",this._onZoomOutClick,this),this._sliderRuler&&(rn(this._sliderRuler,"click",this._onClickRuler,this),this.dotDragger=new Pn(this._sliderDot,{ignoreMouseleave:!0}),this.dotDragger.on("dragstart",this._onDotDragstart,this).on("dragging dragend",this._onDotDrag,this).enable())},n._onZoomInClick=function(t){Ge(t),this.getMap().zoomIn()},n._onZoomOutClick=function(t){Ge(t),this.getMap().zoomOut()},n._onClickRuler=function(t){Ge(t);var e=this.getMap(),n=Qe(t,this._sliderRuler).y,r=e.getMaxZoom(),i=Math.floor(r-n/10);e.setZoom(i)},n._onDotDragstart=function(t){Ge(t.domEvent);var e=this.getMap(),n=e.getSize().toPoint()._multi(.5);e.onZoomStart(e.getZoom(),n)},n._onDotDrag=function(t){Ge(t.domEvent);var e=this.getMap(),n=e.getSize().toPoint()._multi(.5),r=Qe(t.domEvent,this._sliderRuler),i=e.getMaxZoom(),o=e.getMinZoom(),a=r.y,s=i-a/10;i<s?(s=i,a=0):o>s&&(s=o,a=10*(i-o)),"dragging"===t.type?e.onZooming(s,n,1):"dragend"===t.type&&(this.options.seamless?e.onZoomEnd(s,n):e.onZoomEnd(Math.round(s),n)),this._sliderDot.style.top=a+"px",this._sliderReading.style.height=10*(e.getZoom()-o+1)+"px",this._updateText()},e}(Qo);ea.mergeOptions({position:"top-left",slider:!0,zoomLevel:!0,seamless:!1}),ii.mergeOptions({zoomControl:!1}),ii.addOnLoadHook((function(){this.options.zoomControl&&(this.zoomControl=new ea(this.options.zoomControl),this.addControl(this.zoomControl))}));var na=Object.freeze({Control:Qo,Attribution:Yo,LayerSwitcher:Jo,Overview:qo,Panel:Ko,Scale:$o,Toolbar:ta,Zoom:ea}),ra=function(){function t(t,e,n,r){Array.isArray(t)?(this.scale={x:t[0],y:t[1]},this.origin={x:t[2],y:t[3]}):(this.scale={x:t,y:e},this.origin={x:n,y:r})}return t.getDefault=function(t){return"baidu"===t.code.toLowerCase()?"baidu":t.code.toLowerCase()==="EPSG:4326".toLowerCase()?"tms-global-geodetic":"identity"===t.code.toLowerCase()?[1,-1,0,0]:"web-mercator"},t}(),ia=6378137*Math.PI;d(ra,{"web-mercator":new ra([1,-1,-ia,ia]),"tms-global-mercator":new ra([1,1,-ia,-ia]),"tms-global-geodetic":new ra([1,1,-180,-90]),baidu:new ra([1,1,0,0])});for(var oa=function(){function t(t,e,n,r){this.map=t,this.tileSize=r,this.fullExtent=n,this.prepareTileInfo(e,n),this._xScale=n.right>=n.left?1:-1,this._yScale=n.top>=n.bottom?1:-1,this._pointOrigin=t._prjToPoint(new me(this.tileSystem.origin),t.getGLZoom()),this._glRes=t.getResolution(t.getGLZoom())}var e=t.prototype;return e.prepareTileInfo=function(t,e){if(y(t)?t=ra[t.toLowerCase()]:Array.isArray(t)&&(t=new ra(t)),!t)throw new Error("Invalid TileSystem");this.tileSystem=t;var n=e.right>e.left?1:-1,r=e.top>e.bottom?-1:1,i=t.origin.x,o=t.origin.y;this.transformation=new Qn([n,r,i,o])},e._getTileNum=function(t,e){var n=this.tileSystem,r=this.tileSize,i=Math.floor(1e-7*n.scale.x+t.x/(r.width*e)),o=Math.ceil(1e-7*n.scale.y+t.y/(r.height*e));return{x:n.scale.x*i,y:n.scale.y*o}},e.getTileIndex=function(t,e,n){var r=this.tileSystem,i=this.transformation.transform(t,1),o=this._getTileNum(i,e);return r.scale.x<0&&(o.x-=1),r.scale.y>0&&(o.y-=1),this.getNeighorTileIndex(o.x,o.y,0,0,e,n)},e.getNeighorTileIndex=function(t,e,n,r,i,o){var a=this.tileSystem,s=t+a.scale.x*n,c=e-a.scale.y*r,u=!1,l=s,h=c,f=this._getTileFullIndex(i);return o&&(!0!==o&&"x"!==o||(f.xmax===f.xmin?s=f.xmin:s<f.xmin?(s=f.xmax-(f.xmin-s)%(f.xmax-f.xmin))===f.xmax&&(s=f.xmin):s>=f.xmax&&(s=f.xmin+(s-f.xmin)%(f.xmax-f.xmin))),!0!==o&&"y"!==o||(f.ymax===f.ymin?c=f.ymin:c>=f.ymax?c=f.ymin+(c-f.ymin)%(f.ymax-f.ymin):c<f.ymin&&(c=f.ymax-(f.ymin-c)%(f.ymax-f.ymin))===f.ymax&&(c=f.ymin))),(s<f.xmin||s>f.xmax||c>f.ymax||c<f.ymin)&&(u=!0),{x:s,y:c,idx:l,idy:h,out:u}},e._getTileFullIndex=function(t){if(this._tileFullIndex||(this._tileFullIndex={}),this._tileFullIndex[t])return this._tileFullIndex[t];var e=this.fullExtent,n=this.transformation,r=this._getTileNum(n.transform(new Ln(e.left,e.top),1),t),i=this._getTileNum(n.transform(new Ln(e.right,e.bottom),1),t),o=this.tileSystem;return o.scale.x<0&&(r.x-=1,i.x-=1),o.scale.y>0&&(r.y-=1,i.y-=1),this._tileFullIndex[t]=new Vn(r,i),this._tileFullIndex[t]},e.getTilePrjNW=function(t,e,n){var r=this.tileSystem,i=this.tileSize,o=r.origin.y+this._yScale*r.scale.y*(e+(1===r.scale.y?1:0))*n*i.height,a=r.origin.x+this._xScale*r.scale.x*(t+(1===r.scale.x?0:1))*n*i.width;return new Ln(a,o)},e.getTilePointNW=function(t,e,n){var r=this._glRes/n,i=this.tileSystem,o=this.tileSize,a=this._pointOrigin.y*r+this._yScale*i.scale.y*(e+(1===i.scale.y?1:0))*o.height,s=this._pointOrigin.x*r+this._xScale*i.scale.x*(t+(1===i.scale.x?0:1))*o.width;return new me(s,a)},e.getTilePrjSE=function(t,e,n){var r=this.tileSystem,i=this.tileSize,o=r.origin.y+this._yScale*r.scale.y*(e+(1===r.scale.y?0:1))*n*i.height,a=r.origin.x+this._xScale*r.scale.x*(t+(1===r.scale.x?1:0))*n*i.width;return new Ln(a,o)},e.getTilePointSE=function(t,e,n){var r=this._glRes/n,i=this.tileSystem,o=this.tileSize,a=this._pointOrigin.y*r+this._yScale*i.scale.y*(e+(1===i.scale.y?0:1))*o.height,s=this._pointOrigin.x*r+this._xScale*i.scale.x*(t+(1===i.scale.x?1:0))*o.width;return new me(s,a)},e.getTilePrjExtent=function(t,e,n){var r=this.getTilePrjNW(t,e,n),i=this.getTilePrjSE(t,e,n);return new Vn(r,i)},t}(),aa=[],sa=0;sa<6;sa++)aa[sa]=[];var ca=[];function ua(t,e,n){!function(t){var e=t,n=e[0],r=e[1],i=e[2],o=e[3],a=e[4],s=e[5],c=e[6],u=e[7],l=e[8],h=e[9],f=e[10],d=e[11],p=e[12],m=e[13],g=e[14],v=e[15];la(aa[0],o-n,u-a,d-l,v-p),la(aa[1],o+n,u+a,d+l,v+p),la(aa[2],o+r,u+s,d+h,v+m),la(aa[3],o-r,u-s,d-h,v-m),la(aa[4],o-i,u-c,d-f,v-g),la(aa[5],o+i,u+c,d+f,v+g)}(t);for(var r=0;r<6;r++)if(!n||"0"!==n.charAt(r)){var i=aa[r];if(ca[0]=i[0]>0?e[1][0]:e[0][0],ca[1]=i[1]>0?e[1][1]:e[0][1],ca[2]=i[2]>0?e[1][2]:e[0][2],ha(i,ca)<0)return!1}return!0}function la(t,e,n,r,i){return t[0]=e*(1/6),t[1]=n*(1/6),t[2]=r*(1/6),t[3]=i*(1/6),t}function ha(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]+t[3]}var fa="undefined"!=typeof Set,da=function(){function t(){this._table=fa?new Set:{}}var e=t.prototype;return e.add=function(t){fa?this._table.add(t):this._table[t]=!0},e.has=function(t){return fa?this._table.has(t):this._table[t]},e.reset=function(){fa?this._table.clear():this._table={}},t}(),pa={urlTemplate:null,subdomains:null,errorUrl:null,repeatWorld:!0,background:!0,backgroundZoomDiff:6,loadingLimitOnInteracting:3,tileRetryCount:0,placeholder:!1,crossOrigin:null,tileSize:[256,256],offset:[0,0],tileSystem:null,fadeAnimation:!C,debug:!1,spatialReference:null,maxCacheSize:256,renderer:he.webgl?"gl":"canvas",clipByPitch:!0,maxAvailableZoom:null,cascadeTiles:!0,zoomOffset:0},ma=/\{ *([\w_]+) *\}/g,ga=new me(0,0),va=new me(0,0),ya=new me(0,0),_a=new me(0,0),ba=new me(0,0),xa=new me(0,0),wa=new me(0,0),Ma=[[0,0,0],[0,0,0]],Sa=[],Aa=function(t){function e(){return t.apply(this,arguments)||this}fe(e,t),e.fromJSON=function(t){return t&&"TileLayer"===t.type?new e(t.id,t.options):null};var n=e.prototype;return n.getTileSize=function(){if(this._tileSize)return this._tileSize;var t=this.options.tileSize;return m(t)&&(t=[t,t]),this._tileSize=new ge(t),this._tileSize},n.getTiles=function(t,e){var n=this.getMap(),r=n.getPitch(),i=e&&e.getRenderer(),o=n.getContainerExtent(),a=[],s=0,c=this.getMinZoom(),u=n.options.cascadePitches[0],l=n.options.cascadePitches[1],h=Math.floor(n._getVisualHeight(l)),f=p(t)?this._getTileZoom(n.getZoom()):t;if(this._visitedTiles=new da,this._coordCache={},!p(t)||!this.options.cascadeTiles||r<=u||!p(c)&&f<=c){var d=r<=l?o:new Zn(0,n.height-h,n.width,n.height),m=this._getTiles(f,d,2,i);return m&&(s+=m.tiles.length,a.push(m)),{tileGrids:a,count:s}}var g=Math.floor(n._getVisualHeight(u)),v=new Zn(0,n.height-g,n.width,n.height),y=this._getTiles(f,v,0,i);s+=y?y.tiles.length:0,a.push(y);var _,b,x=v.ymin,w=n.getSpatialReference().getZoomDirection(),M=w;if(r>l){f-M<=c&&(M=0);var S=new Zn(0,n.height-h,n.width,x);s+=(_=this._getTiles(f-M,S,1,i))?_.tiles.length:0,x=S.ymin,M+=4*w}if(f-M>=c){var A=new Zn(0,o.ymin,n.width,x);s+=(b=this._getTiles(f-M,A,2,i))?b.tiles.length:0,a.push(b)}return _&&b&&(a[1]=b,a[2]=_),{tileGrids:a,count:s}},n.getTileUrl=function(t,e,n){var r=this.options.urlTemplate,i="";if(this.options.subdomains){var o=this.options.subdomains;if(H(o)){var a=(t+e)%o.length;a<0&&(a=0),i=o[a]}}if(_(r))return r(t,e,n,i);var s={x:t,y:e,z:n,s:i};return r.replace(ma,(function(t,e){var n=s[e];if(void 0===n)throw new Error("No value provided for variable "+t);return"function"==typeof n&&(n=n(s)),n}))},n.clear=function(){return this._renderer&&this._renderer.clear(),this.fire("clear"),this},n.toJSON=function(){return{type:this.getJSONType(),id:this.getId(),options:this.config()}},n.getSpatialReference=function(){var t=this.getMap();return!t||this.options.spatialReference&&!Kr.equals(this.options.spatialReference,t.options.spatialReference)?(this._sr=this._sr||new Kr(this.options.spatialReference),void 0===this._srMinZoom&&(this._srMinZoom=this._sr.getMinZoom(),this._srMaxZoom=this._sr.getMaxZoom()),this._sr):t.getSpatialReference()},n.getMinZoom=function(){return this.getSpatialReference()!==this.getMap().getSpatialReference()?Math.max(t.prototype.getMinZoom.call(this),this._srMinZoom):t.prototype.getMinZoom.call(this)},n.getMaxZoom=function(){return this.getSpatialReference()!==this.getMap().getSpatialReference()?Math.min(t.prototype.getMaxZoom.call(this),this._srMaxZoom):t.prototype.getMaxZoom.call(this)},n._getTileZoom=function(t){g(t)||(t=Math.round(t));var e=this.options.maxAvailableZoom;return!p(e)&&t>e&&(t=e),t},n._getTiles=function(t,e,n,r){var i=this,o=this.getMap(),a=t,s=o.projViewMatrix;n<2&&(0===n&&(a-=1),s=0===n?o.cascadeFrustumMatrix0:1===n?o.cascadeFrustumMatrix1:o.projViewMatrix);var c=a+this.options.zoomOffset,u=this._getTileOffset(c),l=u[0]||u[1],h={zoom:a,extent:null,offset:u,tiles:[]};if(c<0)return h;var f=this.getMinZoom(),d=this.getMaxZoom();if(!(o&&this.isVisible()&&o.width&&o.height))return h;if(!p(f)&&a<f||!p(d)&&a>d)return h;var m=this._getTileConfig();if(!m)return h;var g={zoom:u},v=this.getSpatialReference(),y=o.getSpatialReference(),_=v.getResolution(c),b=o.getGLScale(a),x=v===y&&this.options.repeatWorld,w=e.convertTo((function(t){if(t.y>0&&t.y<o.height){var e=(0===t.x?0:1)+t.y;i._coordCache[e]||(i._coordCache[e]=o._containerPointToPoint(t)),i._coordCache[e]}return o._containerPointToPoint(t,void 0,ga)})),M=this._getMask2DExtent();if(M){var S=M.intersection(w);if(!S)return h;e=S.convertTo((function(t){return o._pointToContainerPoint(t,void 0,0,ga)}))}var A,E=o._containerPointToPrj(e.getCenter(),va),C=o._prjToPoint(E,c,ya);A=l?this._project(o._pointToPrj(C._add(u),c,ya),ya):this._project(E,ya);var T=o.getGLScale()/o.getGLScale(c);_a.x=w.xmin*T,_a.y=w.ymax*T,ba.x=w.xmax*T,ba.y=w.ymin*T;for(var I=this._project(o._pointToPrj(_a._add(u),c,_a),_a),P=this._project(o._pointToPrj(ba._add(u),c,ba),ba),L=m.getTileIndex(A,_,x),R=m.getTileIndex(I,_,x),O=m.getTileIndex(P,_,x),k=Math.ceil(Math.abs(L.idy-R.idy)),B=Math.ceil(Math.abs(L.idx-R.idx)),D=Math.ceil(Math.abs(L.idy-O.idy)),F=Math.ceil(Math.abs(L.idx-O.idx)),j=(k+D+1)*(B+F+1),U=this.getTileSize(),N=this.getRenderer()||r,z=this._getTileConfig().tileSystem.scale,G=[],H=new Zn,W=new me(0,0),V=-k;V<=D;V++)for(var Z=-B,Q=-1/0,X=!1;Z>=Q&&Z<=F;){var Y=m.getNeighorTileIndex(L.idx,L.idy,Z,V,_,x);Q===-1/0?Z++:Z--;var J=this._getTileId(Y.idx,Y.idy,a);if(!(Y.out||this._visitedTiles&&this._visitedTiles.has(J))){var q=N&&N.isTileCachedOrLoading(J);q&&(q=q.info);var K=void 0;if(q){var $=q.extent2d;W.set($.xmin,$.ymax),K=W}else if(this._hasOwnSR){var tt=m.getTilePrjNW(Y.x,Y.y,_);K=o._prjToPoint(this._unproject(tt,ba),a)}else K=m.getTilePointNW(Y.x,Y.y,_);var et=void 0,nt=void 0;if(v===y)et=U.width,nt=U.height;else{var rt=void 0;if(this._hasOwnSR){var it=m.getTilePrjSE(Y.x,Y.y,_);rt=o._prjToPoint(this._unproject(it,ba),a,ba)}else rt=m.getTilePointSE(Y.x,Y.y,_);et=Math.ceil(Math.abs(rt.x-K.x)),nt=Math.ceil(Math.abs(rt.y-K.y))}var ot=z.x*(Y.idx-Y.x)*et,at=z.y*(Y.idy-Y.y)*nt;q||!ot&&!at||K._add(ot,at);var st=q&&q.extent2d||new Zn(K.x,K.y-nt,K.x+et,K.y);(j<=4||X||this._isTileInExtent(s,st,u,b))&&(this._visitedTiles&&0===n&&this._visitedTiles.add(J),0===n?(this._splitTiles(s,G,N,Y,a+1,st,ot,at,g,r),H._combine(st)):(q?(q.offset[0]=u[0],q.offset[1]=u[1]):(q={z:a,x:Y.x,y:Y.y,extent2d:st,offset:u,id:J,url:this.getTileUrl(Y.x,Y.y,a)},r&&(q.layer=this.getId())),G.push(q),H._combine(st)),Q===-1/0?(Q=Z,Z=F):X||(X=!0))}}if(G.length){var ct=o._containerPointToPoint(e.getCenter(),a,ga)._add(u),ut=new me(0,0),lt=new me(0,0);G.sort((function(t,e){return ut.set((t.extent2d.xmin+t.extent2d.xmax)/2,(t.extent2d.ymin+t.extent2d.ymax)/2),lt.set((e.extent2d.xmin+e.extent2d.xmax)/2,(e.extent2d.ymin+e.extent2d.ymax)/2),ut.distanceTo(ct)-lt.distanceTo(ct)}))}return{offset:u,zoom:t,extent:H,tiles:G}},n._splitTiles=function(t,e,n,r,i,o,a,s,c,u){var l=this._getTileConfig().tileSystem.scale.y,h=this.getMap().getGLScale(i),f=xa.set(2*o.xmin,l<0?2*o.ymax:2*o.ymin),d=o.getWidth(),p=o.getHeight(),m=2*r.idx,g=2*r.idy,v=2*r.x,y=2*r.y,_=this._checkAndAddTile(t,n,m,g,v,y,i,0,0,d,p,f,h,c,u);_&&e.push(_),(_=this._checkAndAddTile(t,n,m,g,v,y,i,0,1,d,p,f,h,c,u))&&e.push(_),(_=this._checkAndAddTile(t,n,m,g,v,y,i,1,0,d,p,f,h,c,u))&&e.push(_),(_=this._checkAndAddTile(t,n,m,g,v,y,i,1,1,d,p,f,h,c,u))&&e.push(_)},n._checkAndAddTile=function(t,e,n,r,i,o,a,s,c,u,l,h,f,d,p){var m=this._getTileId(n+s,r+c,a);if(this._visitedTiles&&this._visitedTiles.has(m))return null;var g=d[a];g||(g=d[a]=this._getTileOffset(a));var v=this._getTileConfig().tileSystem.scale.y,y=new Zn(h.x+s*u,h.y+v*c*l,h.x+(s+1)*u,h.y+v*(c+1)*l);if(!this._isSplittedTileInExtent(t,y,g,f))return null;var _=e&&e.isTileCachedOrLoading(m);return _?_=_.info:(_={z:a,x:i+s,y:o+c,extent2d:y,id:m,offset:g,url:this.getTileUrl(i+s,o+c,a+this.options.zoomOffset)},p&&(_.layer=this.getId())),_},n._getTileOffset=function(t){var e=this.options.offset;return _(e)&&(e=e(t)),e},n._getTileId=function(t,e,n,r){return(r||this.getId())+"_"+e+"_"+t+"_"+n},n._project=function(t,e){if(this._hasOwnSR){var n=this.getMap().getProjection();return this.getSpatialReference().getProjection().project(n.unproject(t,e),e)}return t},n._unproject=function(t,e){if(this._hasOwnSR){var n=this.getMap(),r=this.getSpatialReference(),i=n.getProjection(),o=r.getProjection();return i.project(o.unproject(t,e),e)}return t},n._initTileConfig=function(){var t=this.getMap(),e=this.getTileSize(),n=this.getSpatialReference(),r=n.getProjection(),i=n.getFullExtent();this._defaultTileConfig=new oa(t,ra.getDefault(r),i,e),this.options.tileSystem&&(this._tileConfig=new oa(t,this.options.tileSystem,i,e)),this._hasOwnSR=n!==t.getSpatialReference()},n._getTileConfig=function(){return this._defaultTileConfig||this._initTileConfig(),this._tileConfig||this._defaultTileConfig},n._bindMap=function(e){var n=e.getBaseLayer();return n===this&&(n.options.hasOwnProperty("forceRenderOnMoving")||this.config({forceRenderOnMoving:!0})),t.prototype._bindMap.apply(this,arguments)},n._isTileInExtent=function(t,e,n,r){var i,o=this.getMap();if(t!==o.projViewMatrix){var a=e.getCenter(wa)._sub(n[0],n[1])._multi(r);vo(Sa,a.x,a.y,0),i=function(t,e,n){var r=e[0],i=e[1],o=e[2],a=n[3]*r+n[7]*i+n[11]*o+n[15];return a=a||1,t[0]=(n[0]*r+n[4]*i+n[8]*o+n[12])/a,t[1]=(n[1]*r+n[5]*i+n[9]*o+n[13])/a,t[2]=(n[2]*r+n[6]*i+n[10]*o+n[14])/a,t}(Sa,Sa,o.projViewMatrix)[1]<0?o.projViewMatrix:t}else i=o.projViewMatrix;return Ma[0][0]=(e.xmin-n[0])*r,Ma[0][1]=(e.ymin-n[1])*r,Ma[1][0]=(e.xmax-n[0])*r,Ma[1][1]=(e.ymax-n[1])*r,ua(i,Ma)},n._isSplittedTileInExtent=function(t,e,n,r){var i=this.getMap();return Ma[0][0]=(e.xmin-n[0])*r,Ma[0][1]=(e.ymin-n[1])*r,Ma[1][0]=(e.xmax-n[0])*r,Ma[1][1]=(e.ymax-n[1])*r,ua(i.projViewMatrix,Ma)},n.getEvents=function(){return{spatialreferencechange:this._onSpatialReferenceChange}},n._onSpatialReferenceChange=function(){delete this._tileConfig,delete this._defaultTileConfig,delete this._sr;var t=this.getRenderer();t&&t.clear()},e}(ei);Aa.registerJSONType("TileLayer"),Aa.mergeOptions(pa);var Ea=function(t){function e(e,n,r){var i;return(i=t.call(this,e,r)||this).layers=n||[],i._checkChildren(),i.layerMap={},i._groupChildren=[],i}fe(e,t),e.fromJSON=function(t){if(!t||"GroupTileLayer"!==t.type)return null;var n=t.layers.map((function(t){return ei.fromJSON(t)}));return new e(t.id,n,t.options)};var n=e.prototype;return n.getLayers=function(){return this.layers},n.toJSON=function(){return{type:this.getJSONType(),id:this.getId(),layers:this.layers.map((function(t){return t.toJSON()})),options:this.config()}},n.getTiles=function(t){for(var e=this.layers,n=[],r=0,i=0,o=e.length;i<o;i++){var a=e[i];if(a.options.visible){var s=a.getTiles(t,this);s&&0!==s.count&&(r+=s.count,k(n,s.tileGrids))}}return{count:r,tileGrids:n}},n.onAdd=function(){var e=this,n=this.getMap();this.layers.forEach((function(t){e.layerMap[t.getId()]=t,t.getChildLayer&&e._groupChildren.push(t),t._bindMap(n),t.on("show hide",e._onLayerShowHide,e)})),t.prototype.onAdd.call(this)},n.onRemove=function(){var e=this;this.layers.forEach((function(t){t._doRemove(),t.off("show hide",e._onLayerShowHide,e)})),this.layerMap={},this._groupChildren=[],t.prototype.onRemove.call(this)},n.getChildLayer=function(t){var e=this.layerMap[t];if(e)return e;for(var n=0;n<this._groupChildren.length;n++){var r=this._groupChildren[n].getChildLayer(t);if(r)return r}return null},n._onLayerShowHide=function(){var t=this.getRenderer();t&&t.setToRedraw()},n.isVisible=function(){if(!t.prototype.isVisible.call(this))return!1;for(var e=this.layers,n=0,r=e.length;n<r;n++)if(e[n].isVisible())return!0;return!1},n._checkChildren=function(){var t=this,e={};this.layers.forEach((function(n){var r=n.getId();if(e[r])throw new Error("Duplicate child layer id ("+r+") in the GroupTileLayer ("+t.getId()+")");e[r]=1}))},e}(Aa);Ea.registerJSONType("GroupTileLayer");var Ca={crs:null,uppercase:!1,detectRetina:!1},Ta={service:"WMS",request:"GetMap",layers:"",styles:"",format:"image/jpeg",transparent:!1,version:"1.1.1"},Ia=function(t){function e(e,n){var r;r=t.call(this,e)||this;var i=d({},Ta);for(var o in n)o in r.options||(i[o]=n[o]);r.setOptions(n),r.setZIndex(n.zIndex);var a=r.getTileSize();return i.width=a.width,i.height=a.height,r.wmsParams=i,r._wmsVersion=parseFloat(i.version),r}fe(e,t);var n=e.prototype;return n.onAdd=function(){var e=this.getMap().getDevicePixelRatio(),n=Ca.detectRetina?e:1;this.wmsParams.width*=n,this.wmsParams.height*=n;var r=this.options.crs||this.getMap().getProjection().code,i=this._wmsVersion>=1.3?"crs":"srs";this.wmsParams[i]=r,t.prototype.onAdd.call(this)},n.getTileUrl=function(e,n,r){var i=this.getSpatialReference().getResolution(r),o=this._getTileConfig().getTilePrjExtent(e,n,i),a=o.getMax(),s=o.getMin(),c=(this._wmsVersion>=1.3&&"EPSG:4326"===this.wmsParams.crs?[s.y,s.x,a.y,a.x]:[s.x,s.y,a.x,a.y]).join(","),u=t.prototype.getTileUrl.call(this,e,n,r);return u+function(t,e,n){var r=[];for(var i in t)r.push(encodeURIComponent(n?i.toUpperCase():i)+"="+encodeURIComponent(t[i]));return(e&&-1!==e.indexOf("?")?"&":"?")+r.join("&")}(this.wmsParams,u,this.options.uppercase)+(this.options.uppercase?"&BBOX=":"&bbox=")+c},n.toJSON=function(){return{type:"WMSTileLayer",id:this.getId(),options:this.config()}},e.fromJSON=function(t){return t&&"WMSTileLayer"===t.type?new e(t.id,t.options):null},e}(Aa);Ia.registerJSONType("WMSTileLayer"),Ia.mergeOptions(Ca);var Pa=function(t){function e(e,n){var r;return(r=t.call(this,e,n)||this).options.hasOwnProperty("forceRenderOnMoving")||(r.options.forceRenderOnMoving=!1),r}fe(e,t);var n=e.prototype;return n.drawTile=function(){},n.toJSON=function(){return{type:"CanvasTileLayer",id:this.getId(),options:this.config()}},e.fromJSON=function(t){return t&&"CanvasTileLayer"===t.type?new e(t.id,t.options):null},e}(Aa);function La(t,e,n){var r=t.createShader(e);if(t.shaderSource(r,n),t.compileShader(r),!t.getShaderParameter(r,t.COMPILE_STATUS)){var i=t.getShaderInfoLog(r);throw t.deleteShader(r),new Error("Failed to compile shader: "+i)}return r}Pa.registerJSONType("CanvasTileLayer");var Ra="\n attribute vec2 a_position;\n\n attribute vec2 a_texCoord;\n\n uniform mat4 u_matrix;\n\n varying vec2 v_texCoord;\n\n void main() {\n gl_Position = u_matrix * vec4(a_position, 0., 1.);\n\n v_texCoord = a_texCoord;\n }\n ",Oa="\n precision mediump float;\n\n uniform sampler2D u_image;\n\n uniform float u_opacity;\n uniform float u_debug_line;\n\n varying vec2 v_texCoord;\n\n void main() {\n if (u_debug_line == 1.) {\n gl_FragColor = vec4(0., 1., 0., 1.);\n } else {\n gl_FragColor = texture2D(u_image, v_texCoord) * u_opacity;\n }\n }\n ",ka=[0,0],Ba=[0,0,0],Da=new Array(16),Fa=new me(20,20),ja=function(t){var e=function(t){function e(){return t.apply(this,arguments)||this}fe(e,t);var n=e.prototype;return n.drawGLImage=function(t,e,n,r,i,o,a,s){this.gl.program!==this.program&&this.useProgram(this.program);var c=this.gl;this.loadTexture(t),Ba[0]=e||0,Ba[1]=n||0;var u=mo(Da);lo(u,u,Ba),ho(u,u,[o,o,1]),fo(u,this.getMap().projViewMatrix,u),c.uniformMatrix4fv(this.program.u_matrix,!1,u),c.uniform1f(this.program.u_opacity,a),c.uniform1f(this.program.u_debug_line,0);var l=t.glBuffer;!l||l.width===r&&l.height===i||(this.saveImageBuffer(l),delete t.glBuffer),t.glBuffer?c.bindBuffer(c.ARRAY_BUFFER,l):t.glBuffer=this.bufferTileData(0,0,r,i),ka[0]="a_position",ka[1]=2,ka[2]=t.glBuffer.type,this.enableVertexAttrib(ka),c.drawArrays(c.TRIANGLE_STRIP,0,4),s&&this.drawDebug(u,ka,0,0,r,i,s)},n.drawDebug=function(t,e,n,r,i,o,a){var s=this.gl;s.bindBuffer(s.ARRAY_BUFFER,this._debugBuffer),this.enableVertexAttrib(["a_position",2,"FLOAT"]),s.bufferData(s.ARRAY_BUFFER,new Float32Array([n,r,n+i,r,n+i,r-o,n,r-o,n,r]),s.DYNAMIC_DRAW),s.uniformMatrix4fv(this.program.u_matrix,!1,t),s.uniform1f(this.program.u_debug_line,1),s.drawArrays(s.LINE_STRIP,0,5);var c=this._debugInfoCanvas;if(!c){var u=this.getMap().getDevicePixelRatio()>1?2:1;(c=this._debugInfoCanvas=document.createElement("canvas")).width=256*u,c.height=32*u;var l=c.getContext("2d");l.font="20px monospace",l.scale(u,u)}var h=c.getContext("2d");h.clearRect(0,0,c.width,c.height);var f=this.layer.options.debugOutline;hn.fillText(h,a,Fa,f),this.loadTexture(c),s.texImage2D(s.TEXTURE_2D,0,s.RGBA,s.RGBA,s.UNSIGNED_BYTE,c);var d=n,p=n+(i=256),m=r,g=r-(o=32);s.bufferData(s.ARRAY_BUFFER,this.set8(d,m,d,g,p,m,p,g),s.DYNAMIC_DRAW),s.uniform1f(this.program.u_debug_line,0),s.drawArrays(s.TRIANGLE_STRIP,0,4)},n.bufferTileData=function(t,e,n,r,i){var o,a=t,s=t+n,c=e,u=e-r;o=g(a)&&g(s)&&g(c)&&g(u)?this.set8Int(a,c,a,u,s,c,s,u):this.set8(a,c,a,u,s,c,s,u);var l=this.loadImageBuffer(o,i);return l.width=n,l.height=r,l.type=o instanceof Int16Array?"SHORT":"FLOAT",l},n.drawTinImage=function(t,e,n,r,i){var o=this.gl;this.loadTexture(t),o.uniformMatrix4fv(this.program.u_matrix,!1,this.getMap().projViewMatrix),o.uniform1f(this.program.u_opacity,i),o.bindBuffer(o.ARRAY_BUFFER,this.posBuffer),this.enableVertexAttrib(["a_position",3]),o.bufferData(o.ARRAY_BUFFER,new Float32Array(e),o.DYNAMIC_DRAW),o.bindBuffer(o.ARRAY_BUFFER,this.texBuffer),this.enableVertexAttrib(["a_texCoord",2]),o.bufferData(o.ARRAY_BUFFER,new Float32Array(n),o.DYNAMIC_DRAW),o.bufferData(o.ELEMENT_ARRAY_BUFFER,new Uint16Array(r),o.DYNAMIC_DRAW),o.drawElements(o.TRIANGLES,r.length,o.UNSIGNED_SHORT,0)},n.createCanvas2=function(){this.canvas2=hn.createCanvas(this.canvas.width,this.canvas.height)},n.createGLContext=function(){this.canvas.gl&&this.canvas.gl.wrap?this.gl=this.canvas.gl.wrap():this.gl=function(t,e){for(var n={alpha:!0,stencil:!0,preserveDrawingBuffer:!0,antialias:!1},r=["webgl","experimental-webgl"],i=null,o=0;o<r.length;++o){try{i=t.getContext(r[o],e||n)}catch(t){}if(i)break}return i}(this.canvas2||this.canvas,this.layer.options.glOptions);var t=this.gl;t.clearColor(0,0,0,0),t.disable(t.DEPTH_TEST),t.enable(t.STENCIL_TEST),t.enable(t.BLEND),t.blendFunc(t.ONE,t.ONE_MINUS_SRC_ALPHA),this.program=this.createProgram(Ra,this.layer.options.fragmentShader||Oa,["u_matrix","u_image","u_opacity","u_debug_line"]),this._debugBuffer=this.createBuffer(),this.useProgram(this.program),this.texBuffer=this.createBuffer(),t.bindBuffer(t.ARRAY_BUFFER,this.texBuffer),this.enableVertexAttrib(["a_texCoord",2,"UNSIGNED_BYTE"]),t.bufferData(t.ARRAY_BUFFER,new Uint8Array([0,0,0,1,1,0,1,1]),t.STATIC_DRAW),this.enableSampler("u_image"),t.activeTexture(t.TEXTURE0),t.pixelStorei(t.UNPACK_PREMULTIPLY_ALPHA_WEBGL,!0)},n.resizeGLCanvas=function(){this.gl&&this.gl.viewport(0,0,this.canvas.width,this.canvas.height),this.canvas2&&(this.canvas2.width===this.canvas.width&&this.canvas2.height===this.canvas.height||(this.canvas2.width=this.canvas.width,this.canvas2.height=this.canvas.height))},n.clearGLCanvas=function(){this.gl&&this.gl.clear(this.gl.COLOR_BUFFER_BIT|this.gl.STENCIL_BUFFER_BIT)},n.disposeImage=function(t){t&&(t.texture&&this.saveTexture(t.texture),t.glBuffer&&this.saveImageBuffer(t.glBuffer),delete t.texture,delete t.glBuffer)},n._createTexture=function(t){var e=this.gl,n=this.getTexture()||e.createTexture();return e.bindTexture(e.TEXTURE_2D,n),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MIN_FILTER,e.LINEAR),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MAG_FILTER,e.LINEAR),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_S,e.CLAMP_TO_EDGE),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_T,e.CLAMP_TO_EDGE),e.texImage2D(e.TEXTURE_2D,0,e.RGBA,e.RGBA,e.UNSIGNED_BYTE,t),g(U(t.width))&&g(U(t.width))&&e.generateMipmap(e.TEXTURE_2D),n},n.getTexture=function(){this._textures||(this._textures=[]);var t=this._textures;return t&&t.length>0?t.pop():null},n.saveTexture=function(t){this._textures.push(t)},n.loadTexture=function(t){var e=this.gl,n=t.texture;return n||(n=this._createTexture(t),t.texture=n),e.bindTexture(e.TEXTURE_2D,n),n},n.getImageBuffer=function(){this._imageBuffers||(this._imageBuffers=[]);var t=this._imageBuffers;return t&&t.length>0?t.pop():null},n.saveImageBuffer=function(t){this._imageBuffers.push(t)},n.loadImageBuffer=function(t,e){var n=this.gl,r=e||this.createImageBuffer();return n.bindBuffer(n.ARRAY_BUFFER,r),n.bufferData(n.ARRAY_BUFFER,t,n.STATIC_DRAW),r},n.createImageBuffer=function(){return this.getImageBuffer()||this.createBuffer()},n.removeGLCanvas=function(){var t=this.gl;if(t){if(this._debugBuffer&&(t.deleteBuffer(this._debugBuffer),delete this._debugBuffer),this._buffers&&(this._buffers.forEach((function(e){t.deleteBuffer(e)})),delete this._buffers),this._textures&&(this._textures.forEach((function(e){return t.deleteTexture(e)})),delete this._textures),this._debugInfoCanvas){var e=this._debugInfoCanvas.texture;e&&t.deleteTexture(e),delete this._debugInfoCanvas.texture,delete this._debugInfoCanvas}var n=t.program;t.deleteShader(n.fragmentShader),t.deleteShader(n.vertexShader),t.deleteProgram(n),delete this.gl,delete this.canvas2}},n.createBuffer=function(){var t=this.gl.createBuffer();if(!t)throw new Error("Failed to create the buffer object");return this._buffers||(this._buffers=[]),this._buffers.push(t),t},n.enableVertexAttrib=function(t){!function(t,e,n){if(Array.isArray(n[0])){for(var r=Float32Array.BYTES_PER_ELEMENT,i=0,o=0;o<n.length;o++)i+=n[o][1]||0;for(var a=0,s=0;s<n.length;s++){var c=t.getAttribLocation(e,n[s][0]);if(c<0)throw new Error("Failed to get the storage location of "+n[s][0]);t.vertexAttribPointer(c,n[s][1],t[n[s][2]||"FLOAT"],!1,r*i,r*a),a+=n[s][1]||0,t.enableVertexAttribArray(c)}}else{var u=t.getAttribLocation(e,n[0]);t.vertexAttribPointer(u,n[1],t[n[2]||"FLOAT"],!1,0,0),t.enableVertexAttribArray(u)}}(this.gl,this.gl.program,t)},n.createProgram=function(t,e,n){var r=function(t,e,n){var r=La(t,t.VERTEX_SHADER,e),i=La(t,t.FRAGMENT_SHADER,n);if(!r||!i)return null;var o=t.createProgram();return o?(t.attachShader(o,r),t.attachShader(o,i),t.linkProgram(o),{program:o,vertexShader:r,fragmentShader:i}):null}(this.gl,t,e),i=r.program,o=r.vertexShader,a=r.fragmentShader;return i.vertexShader=o,i.fragmentShader=a,this._initUniforms(i,n),i},n.useProgram=function(t){var e=this.gl;return e.useProgram(t),e.program=t,this},n.enableSampler=function(t,e){var n=this.gl,r=this._getUniform(n.program,t);return e||(e=0),n.uniform1i(r,e),r},n._initUniforms=function(t,e){for(var n=0;n<e.length;n++){var r=e[n],i=e[n],o=r.indexOf("[");o>=0&&(r=r.substring(0,o),C||(i=i.substring(0,o))),t[r]=this._getUniform(t,i)}},n._getUniform=function(t,e){var n=this.gl.getUniformLocation(t,e);if(!n)throw new Error("Failed to get the storage location of "+e);return n},e}(t);return d(e.prototype,{set8:function(){var t=he.ie9?null:new Float32Array(8);return function(e,n,r,i,o,a,s,c){return t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=o,t[5]=a,t[6]=s,t[7]=c,t}}(),set8Int:function(){var t=he.ie9?null:new Int16Array(8);return function(e,n,r,i,o,a,s,c){return t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=o,t[5]=a,t[6]=s,t[7]=c,t}}()}),e},Ua={renderer:he.webgl?"gl":"canvas",crossOrigin:null},Na=new me(0,0),za=function(t){function e(e,n,r){var i;return!n||Array.isArray(n)||n.url||(r=n,n=null),(i=t.call(this,e,r)||this)._images=n,i}fe(e,t);var n=e.prototype;return n.onAdd=function(){this._prepareImages(this._images)},n.setImages=function(t){return this._images=t,this._prepareImages(t),this},n.getImages=function(){return this._images},n._prepareImages=function(t){t=t||[],Array.isArray(t)||(t=[t]);var e=this.getMap();this._imageData=t.map((function(t){var n=new Vn(t.extent);return d({},t,{extent:n,extent2d:n.convertTo((function(t){return e.coordToPoint(t,e.getGLZoom())}))})})),this._images=t;var n=this.getRenderer();n&&n.refreshImages()},e}(ei);za.mergeOptions(Ua);var Ga=[],Ha=function(t){function e(){return t.apply(this,arguments)||this}fe(e,t);var n=e.prototype;return n.isDrawable=function(){return!this.getMap().getPitch()||(console&&console.warn("ImageLayer with canvas renderer can't be pitched, use gl renderer ('renderer' : 'gl') instead."),!1)},n.checkResources=function(){var t=this;if(this._imageLoaded)return Ga;var e=this.layer._imageData.map((function(t){return[t.url,null,null]}));if(this.resources){var n=[],r=new gr;e.forEach((function(e){if(t.resources.isResourceLoaded(e)){var i=t.resources.getImage(e);r.addResource(e,i)}else n.push(e)})),this.resources.forEach((function(e,n){r.isResourceLoaded(e)||t.retireImage(n.image)})),this.resources=r,e=n}return this._imageLoaded=!0,e},n.retireImage=function(){},n.refreshImages=function(){this._imageLoaded=!1,this.setToRedraw()},n.needToRedraw=function(){var e=this.getMap();return!(e.isZooming()&&!e.getPitch())&&t.prototype.needToRedraw.call(this)},n.draw=function(){this.isDrawable()&&(this.prepareCanvas(),this._painted=!1,this._drawImages(),this.completeRender())},n._drawImages=function(){var t=this.layer._imageData,e=this.getMap(),n=e._get2DExtent(e.getGLZoom());if(t&&t.length)for(var r=0;r<t.length;r++){var i=t[r].extent2d,o=this.resources&&this.resources.getImage(t[r].url);o&&n.intersects(i)&&(this._painted=!0,this._drawImage(o,i,t[r].opacity||1))}},n._drawImage=function(t,e,n){var r=0,i=this.context;n<1&&(r=i.globalAlpha,i.globalAlpha=n);var o=this.getMap(),a=Na.set(e.xmin,e.ymax),s=o._pointToContainerPoint(a,o.getGLZoom()),c=s.x,u=s.y,l=o.getBearing();l&&(i.save(),i.translate(c,u),l&&i.rotate(-l*Math.PI/180),c=u=0);var h=o.getGLScale();i.drawImage(t,c,u,e.getWidth()/h,e.getHeight()/h),l&&i.restore(),r&&(i.globalAlpha=r)},n.drawOnInteracting=function(){this.draw()},e}(mr),Wa=function(t){function e(){return t.apply(this,arguments)||this}fe(e,t);var n=e.prototype;return n.isDrawable=function(){return!0},n._drawImage=function(t,e,n){this.drawGLImage(t,e.xmin,e.ymax,e.getWidth(),e.getHeight(),1,n)},n.createContext=function(){this.createGLContext()},n.resizeCanvas=function(e){this.canvas&&(t.prototype.resizeCanvas.call(this,e),this.resizeGLCanvas())},n.clearCanvas=function(){this.canvas&&(t.prototype.clearCanvas.call(this),this.clearGLCanvas())},n.retireImage=function(t){this.disposeImage(t)},n.onRemove=function(){this.removeGLCanvas(),t.prototype.onRemove.call(this)},e}(ja(Ha));za.registerRenderer("canvas",Ha),za.registerRenderer("gl",Wa);var Va=function(t){function e(){return t.apply(this,arguments)||this}fe(e,t);var n=e.prototype;return n.getPrepareParams=function(){return[]},n.getDrawParams=function(){return[]},n.onCanvasCreate=function(){this.canvas&&this.layer.options.doubleBuffer&&(this.buffer=hn.createCanvas(this.canvas.width,this.canvas.height,this.getMap().CanvasClass))},n.needToRedraw=function(){return!!this.layer.options.animation||!(this.getMap().isInteracting()&&!this.layer.drawOnInteracting)&&t.prototype.needToRedraw.call(this)},n.draw=function(){this.prepareCanvas(),this.prepareDrawContext(),this._drawLayer()},n.drawOnInteracting=function(){this._drawLayerOnInteracting()},n.getCanvasImage=function(){var e=t.prototype.getCanvasImage.call(this);if(e&&e.image&&this.layer.options.doubleBuffer){var n=e.image;this.buffer.width===n.width&&this.buffer.height===n.height||(this.buffer.width=n.width,this.buffer.height=n.height);var r=this.buffer.getContext("2d"),i=this.layer.doubleBuffer(r,this.context);(void 0===i||i)&&(hn.image(r,n,0,0),e.image=this.buffer)}return e},n.remove=function(){return delete this._drawContext,t.prototype.remove.call(this)},n.onZoomStart=function(e){this.layer.onZoomStart(e),t.prototype.onZoomStart.call(this,e)},n.onZooming=function(e){this.layer.onZooming(e),t.prototype.onZooming.call(this,e)},n.onZoomEnd=function(e){this.layer.onZoomEnd(e),t.prototype.onZoomEnd.call(this,e)},n.onMoveStart=function(e){this.layer.onMoveStart(e),t.prototype.onMoveStart.call(this,e)},n.onMoving=function(e){this.layer.onMoving(e),t.prototype.onMoving.call(this,e)},n.onMoveEnd=function(e){this.layer.onMoveEnd(e),t.prototype.onMoveEnd.call(this,e)},n.onResize=function(e){this.layer.onResize(e),t.prototype.onResize.call(this,e)},n.prepareDrawContext=function(){if(!this._predrawed){var t=Za(this.getPrepareParams());this._drawContext=this.layer.prepareToDraw.apply(this.layer,[this.context].concat(t)),this._drawContext||(this._drawContext=[]),Array.isArray(this._drawContext)||(this._drawContext=[this._drawContext]),this._predrawed=!0}},n._prepareDrawParams=function(){if(!this.getMap())return null;var t=this.getViewExtent();if(t.maskExtent&&!t.extent.intersects(t.maskExtent))return this.completeRender(),null;var e=[this.context,t],n=Za(this.getDrawParams());return e.push.apply(e,n),e.push.apply(e,this._drawContext),e},n._drawLayer=function(){var t=this._prepareDrawParams();t&&(this.layer.draw.apply(this.layer,t),this.completeRender())},n._drawLayerOnInteracting=function(){if(this.layer.drawOnInteracting){var t=this._prepareDrawParams();t&&(this.layer.drawOnInteracting.apply(this.layer,t),this.completeRender())}},e}(mr);function Za(t){return t||(t=[]),Array.isArray(t)||(t=[t]),t}var Qa=function(t){function e(){return t.apply(this,arguments)||this}fe(e,t);var n=e.prototype;return n.isCanvasRender=function(){return!0},n.prepareToDraw=function(){},n.draw=function(){},n.redraw=function(){return this._getRenderer()&&this._getRenderer().setToRedraw(),this},n.play=function(){return this.config("animation",!0),this},n.pause=function(){return this.config("animation",!1),this},n.isPlaying=function(){return this.options.animation},n.clearCanvas=function(){return this._getRenderer()&&this._getRenderer().clearCanvas(),this},n.requestMapToRender=function(){return this._getRenderer()&&this._getRenderer().requestMapToRender(),this},n.completeRender=function(){return this._getRenderer()&&this._getRenderer().completeRender(),this},n.onCanvasCreate=function(){return this},n.onZoomStart=function(){},n.onZooming=function(){},n.onZoomEnd=function(){},n.onMoveStart=function(){},n.onMoving=function(){},n.onMoveEnd=function(){},n.onResize=function(){},n.doubleBuffer=function(t){return t.clearRect(0,0,t.canvas.width,t.canvas.height),this},e}(ei);Qa.mergeOptions({doubleBuffer:!1,animation:!1}),Qa.registerRenderer("canvas",Va);var Xa=new me(0,0),Ya=function(t){function e(){return t.apply(this,arguments)||this}fe(e,t);var n=e.prototype;return n.getParticles=function(){},n.draw=function(t,e){var n=this.getParticles(f());if(n&&0!==n.length){var r=this.getMap(),i=e.extent;e.maskExtent&&(i=e.extent.intersection(e.maskExtent)),i=i.convertTo((function(t){return r._pointToContainerPoint(t,void 0,0,Xa)}));for(var o=2*Math.PI,a=0,s=n.length;a<s;a++){var c=n[a].point;if(i.contains(c)){var u=n[a].color||this.options.lineColor||"#fff",l=n[a].r;t.fillStyle!==u&&(t.fillStyle=u),l<=2?t.fillRect(c.x-l/2,c.y-l/2,l,l):(t.beginPath(),t.arc(c.x,c.y,l/2,0,o),t.fill())}}this._fillCanvas(t)}else this._getRenderer()&&(this._getRenderer()._shouldClear=!0)},n._fillCanvas=function(t){var e=t.globalCompositeOperation;t.globalCompositeOperation="destination-out";var n=this.options.trail||30;t.fillStyle="rgba(0, 0, 0, "+1/n+")",t.fillRect(0,0,t.canvas.width,t.canvas.height),t.globalCompositeOperation=e},e}(Qa);Ya.mergeOptions({animation:!0}),Ya.registerRenderer("canvas",function(t){function e(){return t.apply(this,arguments)||this}fe(e,t);var n=e.prototype;return n.draw=function(){this.canvas&&this.layer.options.animation&&!this._shouldClear||(this.prepareCanvas(),this._shouldClear=!1),this.prepareDrawContext(),this._drawLayer()},n.drawOnInteracting=function(){this.draw(),this._shouldClear=!1},n.onSkipDrawOnInteracting=function(){this._shouldClear=!0},e}(Va));var Ja=i+"_edit_stage_";function qa(t,e){return{markerType:t,markerFill:"#fff",markerLineColor:"#000",markerLineWidth:2,markerWidth:10,markerHeight:10,opacity:e}}var Ka={fixAspectRatio:!1,symbol:null,removeVertexOn:"contextmenu",centerHandleSymbol:qa("ellipse",1),vertexHandleSymbol:qa("square",1),newVertexHandleSymbol:qa("square",.4)},$a=function(t){function e(e,n){var r;return(r=t.call(this,n)||this)._geometry=e,r._geometry?r:de(r)}fe(e,t);var n=e.prototype;return n.getMap=function(){return this._geometry.getMap()},n.prepare=function(){this.getMap()&&(this.options.symbol&&(this._originalSymbol=this._geometry.getSymbol(),this._geometry.setSymbol(this.options.symbol)),this._prepareEditStageLayer())},n._prepareEditStageLayer=function(){var t=this.getMap(),e=L(),n=Ja+e,r=Ja+e+"_shadow";this._editStageLayer=t.getLayer(n),this._shadowLayer=t.getLayer(r),this._editStageLayer||(this._editStageLayer=new eo(n),t.addLayer(this._editStageLayer)),this._shadowLayer||(this._shadowLayer=new eo(r),t.addLayer(this._shadowLayer))},n.start=function(){var t=this;if(this._geometry&&this._geometry.getMap()&&!this._geometry.editing){var e=this.getMap();this.editing=!0;var n=this._geometry;this._geometryDraggble=n.options.draggable,n.config("draggable",!1),this.prepare();var r=n.copy();r.setSymbol(n._getInternalSymbol()),r.copyEventListeners(n),n._getParent()&&r.copyEventListeners(n._getParent()),r._setEventTarget(n),r.setId(null).config({draggable:!1}),this._shadow=r,this._switchGeometryEvents("on"),n.hide(),(n instanceof Mi||n instanceof Bi||n instanceof Fi||n instanceof Di)&&this._createOrRefreshOutline(),this._shadowLayer.bringToFront().addGeometry(r),this._editStageLayer.bringToFront(),this._addListener([e,"zoomstart",function(){t._editStageLayer.hide()}]),this._addListener([e,"zoomend",function(){t._editStageLayer.show()}]),n instanceof Mi?(r.config("draggable",!0),r.on("dragend",this._onMarkerDragEnd,this)):this._createCenterHandle(),n instanceof Mi?this.createMarkerEditor():n instanceof Bi?this.createCircleEditor():n instanceof Fi||n instanceof Di?this.createEllipseOrRectEditor():n instanceof ji||(n instanceof xi||n instanceof Ai)&&this.createPolygonEditor()}},n.stop=function(){delete this._history,delete this._historyPointer,delete this._editOutline,this._switchGeometryEvents("off"),this.getMap()&&(delete this._shadow,this._geometry.config("draggable",this._geometryDraggble),delete this._geometryDraggble,this._geometry.show(),this._editStageLayer.remove(),this._shadowLayer.remove(),this._clearAllListeners(),this._refreshHooks=[],this.options.symbol&&(this._geometry.setSymbol(this._originalSymbol),delete this._originalSymbol),this.editing=!1)},n.isEditing=function(){return!p(this.editing)&&this.editing},n._getGeometryEvents=function(){return{symbolchange:this._onGeoSymbolChange,"positionchange shapechange":this._exeAndReset}},n._switchGeometryEvents=function(t){if(this._geometry){var e=this._getGeometryEvents();for(var n in e)this._geometry[t](n,e[n],this)}},n._onGeoSymbolChange=function(t){this._shadow&&this._shadow.setSymbol(t.target._getInternalSymbol())},n._onMarkerDragEnd=function(){this._update("setCoordinates",this._shadow.getCoordinates().toArray()),this._refresh()},n._createOrRefreshOutline=function(){var t=this._geometry,e=this._editOutline;return e?(e.remove(),this._editOutline=e=t.getOutline(),this._editStageLayer.addGeometry(e)):(e=t.getOutline(),this._editStageLayer.addGeometry(e),this._editOutline=e,this._addRefreshHook(this._createOrRefreshOutline)),e},n._createCenterHandle=function(){var t,e=this,n=this._shadow.getCenter(),r=this.options.centerHandleSymbol,i=this.createHandle(n,{symbol:r,cursor:"move",onDown:function(){var n=kt((t=e._shadow.copy())._getInternalSymbol(),.5);t.setSymbol(n).addTo(e._editStageLayer)},onMove:function(e,n){var r=n.coordOffset;t.translate(r)},onUp:function(){e._update("setCoordinates",Ln.toNumberArrays(t.getCoordinates())),t.remove(),e._refresh()}});this._addRefreshHook((function(){var t=e._shadow.getCenter();i.setCoordinates(t)}))},n._createHandleInstance=function(t,e){var n=e.symbol;return new Mi(t,{draggable:!0,dragShadow:!1,dragOnAxis:e.axis,cursor:e.cursor,symbol:n})},n.createHandle=function(t,e){e||(e={});var n=this.getMap(),r=this._createHandleInstance(t,e),i=this;function o(t){return e.onDown&&(this._geometry.fire("handledragstart"),e.onDown.call(i,t.viewPoint,t)),!1}function a(t){i._hideContext();var o=n._prjToViewPoint(r._getPrjCoordinates());return e.onMove&&(this._geometry.fire("handledragging"),e.onMove.call(i,o,t)),!1}function s(t){return e.onUp&&(this._geometry.fire("handledragend"),e.onUp.call(i,t)),!1}return r.on("dragstart",o,this),r.on("dragging",a,this),r.on("dragend",s,this),r.on("removestart",(function t(){r.config("draggable",!1),r.off("dragstart",o,i),r.off("dragging",a,i),r.off("dragend",s,i),r.off("removestart",t,i),delete r["maptalks--editor-refresh-fn"]}),this),e.onRefresh&&(r["maptalks--editor-refresh-fn"]=e.onRefresh),this._editStageLayer.addGeometry(r),r},n._createResizeHandles=function(t,e,n){var r=this,i=["nw-resize","n-resize","ne-resize","w-resize","e-resize","sw-resize","s-resize","se-resize"],o=[null,"y",null,"x","x",null,"y",null],a=this._geometry;t||(t=[]);var s=this,c=[],u={},l=this.getMap(),h=this.options.vertexHandleSymbol,f=function(){for(var f=function(t){return[new me(t.xmin,t.ymax),new me((t.xmax+t.xmin)/2,t.ymax),new me(t.xmax,t.ymax),new me(t.xmin,(t.ymax+t.ymin)/2),new me(t.xmax,(t.ymax+t.ymin)/2),new me(t.xmin,t.ymin),new me((t.xmax+t.xmin)/2,t.ymin),new me(t.xmax,t.ymin)]}(a._getPainter().get2DExtent()),d=function(d){if(Array.isArray(t)&&t.some((function(t){return t===d})))return"continue";var p=f[d],m=l.pointToCoordinate(p);if(c.length<f.length-t.length){var g=r.createHandle(m,{symbol:h,cursor:i[d],axis:o[d],onMove:function(t){return function(n){s._updating=!0,e(n,t),a.fire("resizing")}}(d),onUp:function(){s._updating=!1,n(),r._refresh()}});g.setId(d),u[d]=c.length,c.push(g)}else c[u[d]].setCoordinates(m)},p=0;p<f.length;p++)d(p)};return f(),this._addRefreshHook(f),c},n.createMarkerEditor=function(){var t=this,e=this._geometry,n=this._shadow,r=this.getMap();if(n._canEdit()){this._history||this._recordHistory(h());var i=n._getInternalSymbol(),o=new me(0,0);m(i.markerDx)&&(o.x=i.markerDx),m(i.markerDy)&&(o.y=i.markerDy);var a=null;Tr.test(i)?"pin"!==i.markerType&&"pie"!==i.markerType&&"bar"!==i.markerType||(a=[5,6,7]):(Pr.test(i)||Fr.test(i))&&(a=[5,6,7]);var s,c=[2,1,2,0,0,2,1,2];if(this.options.fixAspectRatio){var u=n.getSize();s=u.width/u.height}var l=this._createResizeHandles(null,(function(i,u){if(a&&a.indexOf(u)>=0){var h=r.viewPointToCoordinate(i.sub(o)),f=n.getCoordinates();h.x=f.x,n.setCoordinates(h),t._updateCoordFromShadow(!0);var d=l[l.length-1-u];i=r.coordToViewPoint(d.getCoordinates())}var p=r._pointToViewPoint(n._getCenter2DPoint()).add(o),m=n._getInternalSymbol(),g=i.sub(p);a&&i.y>p.y&&(g.y=0);var v=a?1:2,y=2*Math.abs(g.x),_=Math.abs(g.y)*v;s&&(_=(y=Math.max(y,_*s))/s);var b=c[u];n instanceof Zi?((s||0===b||2===b)&&(n.setWidth(y),e.setWidth(y)),(s||1===b||2===b)&&(n.setHeight(_),e.setHeight(_))):((s||0===b||2===b)&&(m.markerWidth=y),(s||1===b||2===b)&&(m.markerHeight=_),n.setSymbol(m),e.setSymbol(m))}),(function(){t._update(h())}));this._addListener([r,"zoomend",function(){this._refresh()}])}else console&&console.warn("A marker can't be resized with symbol:",n.getSymbol());function h(){var t=[["setCoordinates",n.getCoordinates().toArray()]];return n instanceof Zi?(t.push(["setWidth",n.getWidth()]),t.push(["setHeight",n.getHeight()])):t.push(["setSymbol",n.getSymbol()]),t}},n.createCircleEditor=function(){var t=this,e=this._geometry,n=this._shadow,r=this.getMap();this._history||this._recordHistory([["setCoordinates",n.getCoordinates().toArray()],["setRadius",n.getRadius()]]),this._createResizeHandles(null,(function(t){var i=e.getCenter(),o=r.viewPointToCoordinate(t),a=new Ai([[i.x,i.y],[o.x,i.y]]),s=new Ai([[i.x,i.y],[i.x,o.y]]),c=Math.max(r.computeGeometryLength(a),r.computeGeometryLength(s));n.setRadius(c),e.setRadius(c)}),(function(){t._update("setRadius",n.getRadius())}))},n.createEllipseOrRectEditor=function(){var t=this,e=[2,1,2,0,0,2,1,2],n=this._geometry,r=this._shadow;this._history||this._recordHistory(c());var i,o=this.getMap(),a=this._geometry instanceof Fi;this.options.fixAspectRatio&&(i=n.getWidth()/n.getHeight());var s=this._createResizeHandles(null,(function(c,u){var l,h,f,d=a?1:2,p=c,m=e[u];if(a){var g=s[7-u],v=o.coordToViewPoint(g.getCoordinates()),y=(l=p.sub(v)).abs();h=o.pixelToDistance(y.x,0),f=o.pixelToDistance(0,y.y);var _=n.getSize(),b=s[0].getCoordinates(),x=o.viewPointToCoordinate(c),w=g.getCoordinates(),M=new Ai([[w.x,w.y],[x.x,w.y]]),S=new Ai([[w.x,w.y],[w.x,x.y]]);h=o.computeGeometryLength(M),f=o.computeGeometryLength(S),0===m?(i&&(y.y=y.x/i,_.height=Math.abs(y.y),f=h/i),p.y=v.y-_.height/2,x.y=b.y,x.x=4===u?Math.min(x.x,b.x):Math.min(x.x,w.x)):1===m?(i&&(y.x=y.y*i,_.width=Math.abs(y.x),h=f*i),p.x=v.x-_.width/2,x.x=b.x,x.y=Math.max(x.y,w.y)):(i&&(h>f*i?(f=h/i,p.y=v.y+y.x*j(l.y)/i):(h=f*i,p.x=v.x+y.y*j(l.x)*i)),x.x=Math.min(x.x,w.x),x.y=Math.max(x.y,w.y)),r.setCoordinates(x),t._updateCoordFromShadow(!0)}else{var A=n.getCenter(),E=o.viewPointToCoordinate(p),C=new Ai([[A.x,A.y],[E.x,A.y]]),T=new Ai([[A.x,A.y],[A.x,E.y]]);h=o.computeGeometryLength(C),f=o.computeGeometryLength(T),i&&(f=(h=Math.max(h,f*i))/i)}(i||0===m||2===m)&&(r.setWidth(h*d),n.setWidth(h*d)),(i||1===m||2===m)&&(r.setHeight(f*d),n.setHeight(f*d))}),(function(){t._update(c())}));function c(){return[["setCoordinates",r.getCoordinates().toArray()],["setWidth",r.getWidth()],["setHeight",r.getHeight()]]}},n.createPolygonEditor=function(){var t=this.getMap(),e=this._shadow,n=this,r=t.getProjection();this._history||this._recordHistory("setCoordinates",Ln.toNumberArrays(e.getCoordinates()));var i=e instanceof xi?3:2,o="maptalks--editor-refresh-fn",a="maptalks--editor-vertex-index",s={0:[]},c={0:[]};function u(t){if(void 0===t&&(t=0),e instanceof xi){var n=e.getCoordinates()[t]||[];return n.slice(0,n.length-1)}return e.getCoordinates()}function l(t){return void 0===t&&(t=0),0===t?e._getPrjCoordinates():e._getPrjHoles()[t-1]}function h(){for(var t in s){for(var e=s[t].length-1;e>=0;e--)s[t][e][a]=e;for(var r=c[t].length-1;r>=0;r--)c[t][r][a]=r}n._updateCoordFromShadow()}function f(t){var r,o=t.target,u=o[a],f=m(o._ringIndex)?o._ringIndex:0,d=l(f);d.length<=i||(d.splice(u,1),f>0?e._prjHoles[f-1]=d:e._setPrjCoordinates(d),e._updateCache(),s[f].splice(u,1)[0].remove(),u<c[f].length&&c[f].splice(u,1)[0].remove(),r=0===u?c[f].length-1:u-1,c[f].splice(r,1)[0].remove(),c[f].splice(r,0,g.call(n,r,f)),h(),n._refresh())}function d(r,i,a){void 0===a&&(a=0);var s,u=l(a),h=t._viewPointToPrj(r),f=u[i];f.x=h.x,f.y=h.y,e._updateCache(),e.onShapeChanged(),n._updateCoordFromShadow(!0),s=0===i?c[a].length-1:i-1,c[a][i]&&c[a][i][o](),c[a][s]&&c[a][s][o]()}function p(t,e){void 0===e&&(e=0);var r=u(e)[t],i=n.createHandle(r,{symbol:n.options.vertexHandleSymbol,cursor:"pointer",axis:null,onMove:function(t){d(t,i[a],e)},onRefresh:function(){r=u(e)[i[a]],i.setCoordinates(r)},onUp:function(){n._refresh(),n._updateCoordFromShadow()},onDown:function(t,e){!e||!e.domEvent||e.domEvent.button}});return i[a]=t,i._ringIndex=e,i.on(n.options.removeVertexOn,f),i}function g(t,i){void 0===i&&(i=0);var o,f=u(i);o=t+1>=f.length?f[0]:f[t+1];var m=f[t].add(o).multi(.5),v=n.createHandle(m,{symbol:n.options.newVertexHandleSymbol,cursor:"pointer",axis:null,onDown:function(t,o){if(!o||!o.domEvent||2!==o.domEvent.button){var s=l(i),u=v[a],h=r.project(v.getCoordinates());s.splice(u+1,0,h),i>0?e._prjHoles[i-1]=s:e._setPrjCoordinates(s),e._updateCache();var f=v.getSymbol();delete f.opacity,v.setSymbol(f),c[i].splice(u,0,g.call(n,u,i),g.call(n,u+1,i))}},onMove:function(t){d(t,v[a]+1,i)},onUp:function(t){if(!t||!t.domEvent||2!==t.domEvent.button){var e=v[a];B(v,c[i]),v.remove(),s[i].splice(e+1,0,p.call(n,e+1,i)),h(),n._updateCoordFromShadow(),n._refresh()}},onRefresh:function(){f=u(i);var t,e=v[a];t=e===f.length-1?0:e+1;var n=f[e].add(f[t]).multi(.5);v.setCoordinates(n)}});return v[a]=t,v}if(e instanceof xi)for(var v=e.getHoles().length+1,y=0;y<v;y++){s[y]=[],c[y]=[];for(var _=u(y),b=0,x=_.length;b<x;b++)s[y].push(p.call(this,b,y)),b<x-1&&c[y].push(g.call(this,b,y));c[y].push(g.call(this,_.length-1,y))}else for(var w=0,M=u(0).length;w<M;w++)s[0].push(p.call(this,w,0)),w<M-1&&c[0].push(g.call(this,w,0));this._addRefreshHook((function(){for(var t in c)for(var e=c[t].length-1;e>=0;e--)c[t][e][o](t);for(var n in s)for(var r=s[n].length-1;r>=0;r--)s[n][r][o](n)}))},n._refresh=function(){if(this._refreshHooks)for(var t=this._refreshHooks.length-1;t>=0;t--)this._refreshHooks[t].call(this)},n._hideContext=function(){this._geometry&&(this._geometry.closeMenu(),this._geometry.closeInfoWindow())},n._addListener=function(t){this._eventListeners||(this._eventListeners=[]),this._eventListeners.push(t),t[0].on(t[1],t[2],this)},n._clearAllListeners=function(){if(this._eventListeners&&this._eventListeners.length>0){for(var t=this._eventListeners.length-1;t>=0;t--){var e=this._eventListeners[t];e[0].off(e[1],e[2],this)}this._eventListeners=[]}},n._addRefreshHook=function(t){t&&(this._refreshHooks||(this._refreshHooks=[]),this._refreshHooks.push(t))},n._update=function(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];this._exeHistory([t,n]),this._recordHistory.apply(this,[t].concat(n))},n._updateCoordFromShadow=function(t){if(this._shadow){var e=this._shadow.getCoordinates(),n=this._geometry,r=this._updating;this._updating=!0,n.setCoordinates(e),t||this._recordHistory("setCoordinates",Ln.toNumberArrays(n.getCoordinates())),this._updating=r}},n._recordHistory=function(t){this._history||(this._history=[],this._historyPointer=0);for(var e=arguments.length,n=new Array(e>1?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];if(this._history.length){var i=this._history[this._history.length-1];if(i[0]===t&&JSON.stringify(i[1])===JSON.stringify(n))return}this._historyPointer<this._history.length-1&&this._history.splice(this._historyPointer+1),this._history.push([t,n]),this._historyPointer=this._history.length-1,this._geometry.fire("editrecord")},n.cancel=function(){if(!this._history||0===this._historyPointer)return this;this._historyPointer=0;var t=this._history[0];return this._exeAndReset(t),this},n.undo=function(){if(!this._history||0===this._historyPointer)return this;var t=this._history[--this._historyPointer];return this._exeAndReset(t),this},n.redo=function(){if(!this._history||this._historyPointer===this._history.length-1)return this;var t=this._history[++this._historyPointer];return this._exeAndReset(t),this},n._exeAndReset=function(t){if(!this._updating){this._exeHistory(t);var e=this._history,n=this._historyPointer;this.stop(),this._history=e,this._historyPointer=n,this.start()}},n._exeHistory=function(t){var e=this;if(Array.isArray(t)){var n=this._updating;this._updating=!0;var r=this._geometry;Array.isArray(t[0])?t[0].forEach((function(t){var n=t[0],i=t.slice(1);e._shadow[n].apply(e._shadow,i),r[n].apply(r,i)})):(this._shadow[t[0]].apply(this._shadow,t[1]),r[t[0]].apply(r,t[1])),this._updating=n}},e}(bn(Mn));$a.mergeOptions(Ka);var ts={startEditText:function(){return this.getMap()?(this.hide(),this.endEditText(),this._prepareEditor(),this._fireEvent("edittextstart"),this):this},endEditText:function(){if(this._textEditor){var t=this._textEditor.innerHTML;t=t.replace(/<p>/gi,"").replace(/<\/p>/gi,"<br/>"),this._textEditor.innerHTML=t;var e=this._textEditor.innerText.replace(/[\r\n]+$/gi,"");this.setContent(e),on(this._textEditor,"mousedown dblclick",He),this.getMap().off("mousedown",this.endEditText,this),this._editUIMarker.remove(),delete this._editUIMarker,this._textEditor.onkeyup=null,delete this._textEditor,this.show(),this._fireEvent("edittextend")}return this},isEditingText:function(){return!!this._textEditor},getTextEditor:function(){return this._editUIMarker},_prepareEditor:function(){var t=this.getMap(),e=this._createEditor();this._textEditor=e,t.on("mousedown",this.endEditText,this);var n=this._getEditorOffset();this._editUIMarker=new Uo(this.getCoordinates(),{animation:null,content:e,dx:n.dx,dy:n.dy}).addTo(t),this._setCursorToLast(this._textEditor)},_getEditorOffset:function(){var t=this._getInternalSymbol()||{},e=0,n=0,r=t.textHorizontalAlignment;return"middle"===r||p(r)?(e=(t.textDx||0)-2,n=(t.textDy||0)-2):(e=(t.markerDx||0)-2,n=(t.markerDy||0)-2),{dx:e,dy:n}},_createEditor:function(){var t=this.getContent(),e=this.getSize(),n=this._getInternalSymbol()||{},r=e.width,i=n.textFill||"#000000",o=n.textSize||12,a=e.height,s=n.markerLineColor||"#000",c=n.markerFill||"#3398CC",u=n.textLineSpacing||0,l=De("div");return l.contentEditable=!0,l.style.cssText="background:"+c+"; border:1px solid "+s+";\n color:"+i+";font-size:"+o+"px;width:"+(r-2)+"px;height:"+(a-2)+"px;margin: auto;\n line-height:"+(o+u)+"px;outline: 0; padding:0; margin:0;word-wrap: break-word;\n overflow: hidden;-webkit-user-modify: read-write-plaintext-only;",l.innerText=t,rn(l,"mousedown dblclick",He),l.onkeyup=function(t){var e=l.style.height||0;13===t.keyCode&&(l.style.height=parseInt(e)+o/2+"px")},l},_setCursorToLast:function(t){var e;window.getSelection?(t.focus(),(e=window.getSelection()).selectAllChildren(t),e.collapseToEnd()):document.selection&&((e=document.selection.createRange()).moveToElementText(t),e.collapse(!1),e.select())}};Vi.include(ts),$r.include({animate:function(t,e,n){var r=this;this._animPlayer&&this._animPlayer.finish(),_(e)&&(n=e),e||(e={});var i,o=this.getMap(),a=this._getProjection(),s=this.getSymbol()||{},c=this._prepareAnimationStyles(t),u=e.focus;if(delete this._animationStarted,o){var l=o._getRenderer();e.framer=function(t){l.callInNextFrame(t)}}var h=gi.animate(c,e,(function(t){if(o&&o.isRemoved())h.finish();else{o&&!r._animationStarted&&u&&o.onMoveStart();var e=t.styles;for(var c in e)if("symbol"!==c&&"translate"!==c&&e.hasOwnProperty(c)){var l="set"+c[0].toUpperCase()+c.slice(1);r[l](e[c])}var f=e.translate;if(f){var d=f;i&&(d=f.sub(i)),i=f,r.translate(d)}var p=e.symbol;if(p&&r.setSymbol(Bt(s,p)),o&&u){var m=a.project(r.getCenter());o._setPrjCenter(m);var g=o._parseEventFromCoord(a.unproject(m));"running"!==h.playState?o.onMoveEnd(g):o.onMoving(g)}r._fireAnimateEvent(h.playState),n&&n(t)}}),this);return this._animPlayer=h,this._animPlayer.play()},_prepareAnimationStyles:function(t){var e=this._getInternalSymbol(),n={};for(var r in t)if(t.hasOwnProperty(r)){var i=t[r];if("translate"!==r&&"symbol"!==r){var o=this["get"+r[0].toUpperCase()+r.substring(1)]();n[r]=[o,i]}else if("symbol"===r){var a=void 0;if(Array.isArray(t.symbol)){if(!Array.isArray(e))throw new Error("geometry'symbol isn't a composite symbol, while the symbol in styles is.");a=[];for(var s=t.symbol,c=0;c<s.length;c++)if(s[c]){var u={};for(var l in s[c])s[c].hasOwnProperty(l)&&(u[l]=[e[c][l],s[c][l]]);a.push(u)}else a.push(null)}else{if(Array.isArray(e))throw new Error("geometry'symbol is a composite symbol, while the symbol in styles isn't.");for(var h in a={},i)i.hasOwnProperty(h)&&(a[h]=[e[h],i[h]])}n.symbol=a}else"translate"===r&&(n.translate=new Ln(i))}return n},_fireAnimateEvent:function(t){"finished"===t?(delete this._animationStarted,this._fireEvent("animateend")):"running"===t&&(this._animationStarted?this._fireEvent("animating"):(this._fireEvent("animatestart"),this._animationStarted=!0))}});var es=i+"_drag_stage",ns=he.touch?"touchstart mousedown":"mousedown",rs=function(t){function e(e){return t.call(this,e)||this}fe(e,t);var n=e.prototype;return n.addHooks=function(){this.target.on(ns,this._startDrag,this)},n.removeHooks=function(){this._endDrag(),this.target.off(ns,this._startDrag,this),delete this.container},n._prepareDragHandler=function(){this._dragHandler=new Pn(this.container),this._dragHandler.on("dragging",this._dragging,this).on("mouseup",this._endDrag,this).enable()},n._prepareShadow=function(){var t=this,e=this.target;this._prepareDragStageLayer(),this._shadow&&this._shadow.remove();var n=this._shadow=e.copy();if(n.getGeometries){var r=n.getGeometries(),i=e.getGeometries();r.forEach((function(e,n){t._updateShadowSymbol(e,i[n])}))}else this._updateShadowSymbol(n,e);n.setId(null),this._prepareShadowConnectors()},n._updateShadowSymbol=function(t,e){if(t.setSymbol(e._getInternalSymbol()),e.options.dragShadow){var n=kt(t._getInternalSymbol(),.5);t.setSymbol(n)}},n._prepareShadowConnectors=function(){var t=this.target,e=this._shadow,n=this._dragStageLayer._getRenderer().resources,r=[];if(Ji._hasConnectors(t))for(var i=Ji._getConnectors(t),o=0,a=i.length;o<a;o++){var s,c=i[o],u=c.config(),l=c._getInternalSymbol();u.symbol=kt(l,.5),s=c.getConnectSource()===t?new c.constructor(e,c.getConnectTarget(),u):new c.constructor(c.getConnectSource(),e,u),r.push(s),c.getLayer()&&c.getLayer()._getRenderer()&&n.merge(c.getLayer()._getRenderer().resources)}this._shadowConnectors=r,r.push(e),this._dragStageLayer.bringToFront().addGeometry(r)},n._onTargetUpdated=function(){this._shadow&&this._shadow.setSymbol(this.target._getSymbol())},n._prepareDragStageLayer=function(){var t=this.target.getMap(),e=this.target.getLayer();this._dragStageLayer=t.getLayer(es),this._dragStageLayer||(this._dragStageLayer=new eo(es,{enableAltitude:e.options.enableAltitude,altitudeProperty:e.options.altitudeProperty}),t.addLayer(this._dragStageLayer));var n=new gr;n.merge(e._getRenderer().resources),this._dragStageLayer._getRenderer().resources=n},n._startDrag=function(t){var e=this.target.getMap();if(e&&!this.target._getParent()&&!this.isDragging()){var n=t.domEvent;n.touches&&n.touches.length>1||2===n.button||(this.container=e._panels.mapWrapper||e._containerDOM,this.target.on("click",this._endDrag,this),this._lastCoord=this._correctCoord(t.coordinate),this._lastPoint=t.containerPoint,this._prepareDragHandler(),this._dragHandler.onMouseDown(t.domEvent),rn(this.container,"mouseleave",this._endDrag,this),this._startParam=t,this._moved=!1)}},n._dragging=function(t){var e=this.target,n=e.getMap()._parseEvent(t.domEvent),r=n.domEvent;if(!(r.touches&&r.touches.length>1)){if(!this._moved)return this._moved=!0,e.on("symbolchange",this._onTargetUpdated,this),this._isDragging=!0,this._prepareShadow(),e.options.dragShadow||e.hide(),this._shadow._fireEvent("dragstart",n),this.target._fireEvent("dragstart",this._startParam||n),void delete this._startParam;if(this._shadow){var i=this._shadow.options.dragOnAxis,o=this._correctCoord(n.coordinate),a=n.containerPoint;this._lastPoint=this._lastPoint||a,this._lastCoord=this._lastCoord||o;var s=a.sub(this._lastPoint),c=o.sub(this._lastCoord);"x"===i?s.y=c.y=0:"y"===i&&(s.x=c.x=0),this._lastPoint=a,this._lastCoord=o,this._shadow.translate(c),e.options.dragShadow||e.translate(c),n.coordOffset=c,n.pointOffset=s,this._shadow._fireEvent("dragging",n),e._fireEvent("dragging",n)}}},n._endDrag=function(t){if(this._dragHandler&&(this._dragHandler.disable(),delete this._dragHandler),this.container&&on(this.container,"mouseleave",this._endDrag,this),this.target){var e=this.target;e.off("click",this._endDrag,this),e.off("symbolchange",this._onTargetUpdated,this),delete this._lastCoord,delete this._lastPoint,this._isDragging=!1;var n=e.getMap();if(this.enabled()&&n){var r=n._parseEvent(t?t.domEvent:null);this._updateTargetAndRemoveShadow(r),this._moved&&e._fireEvent("dragend",r)}}},n.isDragging=function(){return!!this._isDragging},n._updateTargetAndRemoveShadow=function(t){var e=this.target,n=e.getMap();e.options.dragShadow||e.show();var r=this._shadow;if(r){if(e.options.dragShadow)if(e.getGeometries){var i=r.getGeometries(),o=e.getGeometries();i.forEach((function(t,e){o[e].setCoordinates(i[e].getCoordinates())}))}else e.setCoordinates(r.getCoordinates());r._fireEvent("dragend",t),r.remove(),delete this._shadow}this._shadowConnectors&&(n.getLayer(es).removeGeometry(this._shadowConnectors),delete this._shadowConnectors),this._dragStageLayer&&this._dragStageLayer.remove()},n._correctCoord=function(t){var e=this.target.getMap();if(!e.getPitch())return t;var n=this.target._getPainter();if(!n.getMinAltitude())return t;var r=(n.getMinAltitude()+n.getMaxAltitude())/2;return e.locateByPoint(t,0,-r)},e}(wn);$r.mergeOptions({draggable:!1,dragShadow:!0,dragOnAxis:null}),$r.addInitHook("addHandler","draggable",rs),$r.include({isDragging:function(){return this._getParent()?this._getParent().isDragging():!!this.draggable&&this.draggable.isDragging()}}),$r.include({startEdit:function(t){return this.getMap()&&this.options.editable?(this.endEdit(),this._editor=new $a(this,t),this._editor.start(),this.fire("editstart"),this):this},endEdit:function(){return this._editor&&(this._editor.stop(),delete this._editor,this.fire("editend")),this},redoEdit:function(){return this.isEditing()?(this._editor.redo(),this.fire("redoedit"),this):this},undoEdit:function(){return this.isEditing()?(this._editor.undo(),this.fire("undoedit"),this):this},cancelEdit:function(){return this.isEditing()?(this._editor.cancel(),this.fire("canceledit"),this):this},isEditing:function(){return!!this._editor&&this._editor.isEditing()}}),$r.include({_onEvent:function(t,e){if(this.getMap()){var n=e||this._getEventTypeToFire(t);"contextmenu"===n&&this.listens("contextmenu")&&(He(t),Ge(t));var r=this._getEventParams(t);this._fireEvent(n,r)}},_getEventTypeToFire:function(t){return t.type},_getEventParams:function(t){var e=this.getMap(),n={domEvent:t},r=t.touches&&t.touches.length>0?t.touches[0]:t.changedTouches&&t.changedTouches.length>0?t.changedTouches[0]:t;if(r){var i=Qe(r,e._containerDOM);n.coordinate=e.containerPointToCoordinate(i),n.containerPoint=i,n.viewPoint=e.containerPointToViewPoint(i),n.pont2d=e._containerPointToPoint(i)}return n}}),$r.include({setInfoWindow:function(t){return this.removeInfoWindow(),t instanceof Go?(this._infoWindow=t,this._infoWinOptions=d({},this._infoWindow.options),this._infoWindow.addTo(this),this):(this._infoWinOptions=d({},t),this._infoWindow?this._infoWindow.setOptions(t):this.getMap()&&this._bindInfoWindow(this._infoWinOptions),this)},getInfoWindow:function(){return this._infoWindow?this._infoWindow:null},openInfoWindow:function(t){return this.getMap()?(t||(t=this.getCenter()),this._infoWindow?this._infoWindow.show(t):this._infoWinOptions&&this.getMap()&&(this._bindInfoWindow(this._infoWinOptions),this._infoWindow.show(t)),this):this},closeInfoWindow:function(){return this._infoWindow&&this._infoWindow.hide(),this},removeInfoWindow:function(){return this._unbindInfoWindow(),delete this._infoWinOptions,delete this._infoWindow,this},_bindInfoWindow:function(t){return this._infoWindow=new Go(t),this._infoWindow.addTo(this),this},_unbindInfoWindow:function(){return this._infoWindow&&(this.closeInfoWindow(),this._infoWindow.remove(),delete this._infoWindow),this}});var is=function(){function t(t,e){this.max=t,this.onRemove=e,this.reset()}var e=t.prototype;return e.reset=function(){for(var t in this.data)this.onRemove(this.data[t]);return this.data={},this.order=[],this},e.clear=function(){this.reset(),delete this.onRemove},e.add=function(t,e){if(this.has(t))this.order.splice(this.order.indexOf(t),1),this.data[t]=e,this.order.push(t);else if(this.data[t]=e,this.order.push(t),this.order.length>this.max){var n=this.getAndRemove(this.order[0]);n&&this.onRemove(n)}return this},e.has=function(t){return t in this.data},e.keys=function(){return this.order},e.getAndRemove=function(t){if(!this.has(t))return null;var e=this.data[t];return delete this.data[t],this.order.splice(this.order.indexOf(t),1),e},e.get=function(t){return this.has(t)?this.data[t]:null},e.remove=function(t){if(!this.has(t))return this;var e=this.data[t];return delete this.data[t],this.onRemove(e),this.order.splice(this.order.indexOf(t),1),this},e.setMaxSize=function(t){for(this.max=t;this.order.length>this.max;){var e=this.getAndRemove(this.order[0]);e&&this.onRemove(e)}return this},t}(),os=new me(0,0),as=new me(0,0),ss=new me(0,0),cs=new me(0,0),us=function(t){function e(e){var n;return(n=t.call(this,e)||this).tilesInView={},n.tilesLoading={},n._parentTiles=[],n._childTiles=[],n.tileCache=new is(e.options.maxCacheSize,n.deleteTile.bind(de(de(n)))),n}fe(e,t);var n=e.prototype;return n.getCurrentTileZoom=function(){return this._tileZoom},n.draw=function(){var t=this.getMap();if(this.isDrawable()){var e=this.prepareCanvas();if(!e||e.intersects(this.canvasExtent2D)){var n=this.layer.getTiles().tileGrids;if(n&&n.length){var r=0,i=!1,o={},a=[],s=[],c={},u=[],l={},h=[],f={},d={},p=this._markTiles(),m=this._getLoadLimit(),g=n.length;this._tileZoom=n[0].zoom;for(var v=0;v<g;v++)for(var y=n[v],_=y.tiles,b=this._generatePlaceHolder(y.zoom),x=0,w=_.length;x<w;x++){var M=_[x],S=M.id,A=!1;if(this._isLoadingTile(S))A=i=!0,this.tilesLoading[S].current=!0;else{var E=this._getCachedTile(S);E?(E.image&&this.getTileOpacity(E.image)<1&&(A=i=!0),a.push(E)):(A=i=!0,m&&r+p[0]>m||t.isInteracting()&&!t.isMoving()&&!t.isRotating()||(r++,d[S]=M))}if(A&&!o[S]){o[S]=1,b&&!f[S]&&(M.cache=!1,h.push({image:b,info:M}),f[S]=1);var C=this._findParentTile(M);if(C){var T=C.info.id;void 0===c[T]&&(c[T]=s.length,s.push(C))}else if(!s.length){var I=this._findChildTiles(M);I.length&&I.forEach((function(t){l[t.info.id]||(u.push(t),l[t.info.id]=1)}))}}}s.length&&(u.length=0,this._childTiles.length=0),this._drawTiles(a,s,u,h),r?this.loadTileQueue(d):i||(t.isAnimating()||!this._parentTiles.length&&!this._childTiles.length||(this._parentTiles=[],this._childTiles=[],this.setToRedraw()),this.completeRender()),this._retireTiles()}else this.completeRender()}else this.completeRender()}},n.isTileCachedOrLoading=function(t){return this.tilesLoading[t]||this.tilesInView[t]||this.tileCache.get(t)},n._drawTiles=function(t,e,n,r){var i=this;e.length&&(e.sort((function(t,e){return Math.abs(e.info.z-i._tileZoom)-Math.abs(t.info.z-i._tileZoom)})),this._parentTiles=e),n.length&&(this._childTiles=n);var o={tiles:t,parentTiles:this._parentTiles,childTiles:this._childTiles};this.onDrawTileStart(o),this._parentTiles.forEach((function(t){return i._drawTileAndCache(t)})),this._childTiles.forEach((function(t){return i._drawTile(t.info,t.image)})),r.forEach((function(t){return i._drawTile(t.info,t.image)}));var a=this.layer,s=this.getMap();if(!a.options.cascadeTiles||s.getPitch()<=s.options.cascadePitches[0])t.forEach((function(t){return i._drawTileAndCache(t)}));else{this.writeZoomStencil();for(var c=!1,u=0,l=t.length;u<l;u++)t[u].info.z!==this._tileZoom?c?this.resumeZoomStencilTest():(this.startZoomStencilTest(),c=!0):c&&this.pauseZoomStencilTest(),this._drawTileAndCache(t[u]);this.endZoomStencilTest()}this.onDrawTileEnd(o)},n.writeZoomStencil=function(){},n.startZoomStencilTest=function(){},n.endZoomStencilTest=function(){},n.pauseZoomStencilTest=function(){},n.resumeZoomStencilTest=function(){},n.onDrawTileStart=function(){},n.onDrawTileEnd=function(){},n._drawTile=function(t,e){e&&this.drawTile(t,e)},n._drawTileAndCache=function(t){t.current=!0,this.tilesInView[t.info.id]=t,this._drawTile(t.info,t.image),this.tileCache.add(t.info.id,t)},n.drawOnInteracting=function(){this.draw()},n.needToRedraw=function(){var e=this.getMap();return e.getPitch()?t.prototype.needToRedraw.call(this):!(!e.isRotating()&&!e.isZooming())||(e.isMoving()?!!this.layer.options.forceRenderOnMoving:t.prototype.needToRedraw.call(this))},n.hitDetect=function(){return!1},n._getLoadLimit=function(){return this.getMap().isInteracting()?this.layer.options.loadingLimitOnInteracting:0},n.isDrawable=function(){return!this.getMap().getPitch()||(console&&console.warn("TileLayer with canvas renderer can't be pitched, use gl renderer ('renderer' : 'gl') instead."),this.clear(),!1)},n.clear=function(){this._retireTiles(!0),this.tileCache.reset(),this.tilesInView={},this.tilesLoading={},this._parentTiles=[],this._childTiles=[],t.prototype.clear.call(this)},n._isLoadingTile=function(t){return!!this.tilesLoading[t]},n.clipCanvas=function(e){return t.prototype.clipCanvas.call(this,e)},n._clipByPitch=function(t){var e=this.getMap();if(e.getPitch()<=e.options.maxVisualPitch)return!1;if(!this.layer.options.clipByPitch)return!1;var n=e.getContainerExtent(),r=e.getDevicePixelRatio();return t.save(),t.strokeStyle="rgba(0, 0, 0, 0)",t.beginPath(),t.rect(0,Math.ceil(n.ymin)*r,Math.ceil(n.getWidth())*r,Math.ceil(n.getHeight())*r),t.stroke(),t.clip(),!0},n.loadTileQueue=function(t){for(var e in t)if(t.hasOwnProperty(e)){var n=t[e],r=this.loadTile(n);void 0===r.loadTime&&(this.tilesLoading[n.id]={image:r,current:!0,info:n})}},n.loadTile=function(t){var e=this.layer.getTileSize(),n=new Image;return n.width=e.width,n.height=e.height,n.onload=this.onTileLoad.bind(this,n,t),n.onerror=this.onTileError.bind(this,n,t),this.loadTileImage(n,t.url),n},n.loadTileImage=function(t,e){var n=this.layer.options.crossOrigin;return p(n)||(t.crossOrigin=n),I(t,[e])},n.abortTileLoading=function(t){t&&(t.onload=ls,t.onerror=ls,t.src=K)},n.onTileLoad=function(t,e){if(this.layer){var n=e.id;if(this.tilesInView){var r={tile:e,tileImage:t};this.layer.fire("tileload",r),(t=r.tileImage).loadTime=f(),delete this.tilesLoading[n],this._addTileToCache(e,t),this.setToRedraw()}}},n.onTileError=function(t,e){if(this.layer){if(t.onerrorTick=t.onerrorTick||0,this.layer.options.tileRetryCount>t.onerrorTick)return t.onerrorTick++,void(t.src=e.url);if(t instanceof Image){var n=this.layer.options.errorUrl;if(n&&t.src!==n)return void(t.src=n);this.abortTileLoading(t,e)}t.loadTime=0,delete this.tilesLoading[e.id],this._addTileToCache(e,t),this.setToRedraw(),this.layer.fire("tileerror",{tile:e})}},n.drawTile=function(t,e){if(e&&this.getMap()){var n=t.extent2d,r=t.offset,i=os.set(n.xmin-r[0],n.ymax-r[1]),o=t.z,a=t.id,s=this.getMap(),c=this.layer.getTileSize(),u=s.getZoom(),l=this.context,h=s._pointToContainerPoint(i,o,0,as),f=s.getBearing(),d=f||u!==o,p=this.getTileOpacity(e),m=l.globalAlpha;p<1&&(l.globalAlpha=p,this.setToRedraw()),d||h._round();var g=h.x,v=h.y,y=c.width,_=c.height;if(d){if(l.save(),l.translate(g,v),f&&(l.rotate(-f*Math.PI/180),y+=.1,_+=.1),u!==o){var b=s._getResolution(o)/s._getResolution();l.scale(b,b)}g=v=0}if(hn.image(l,e,g,v,y,_),this.layer.options.debug){var x=this.layer.options.debugOutline;l.save(),l.strokeStyle=x,l.fillStyle=x,l.strokeWidth=10,l.font="20px monospace";var w=new me(g,v);hn.rectangle(l,w,{width:y,height:_},1,0),hn.fillText(l,this.getDebugInfo(a),w._add(10,20),x),hn.drawCross(l,g+y/2,v+_/2,2,x),l.restore()}d&&l.restore(),l.globalAlpha!==m&&(l.globalAlpha=m),this.setCanvasUpdated()}},n.getDebugInfo=function(t){var e=t.split("_"),n=e.length;return"x:"+e[n-2]+", y:"+e[n-3]+", z:"+e[n-1]},n._findChildTiles=function(t){var e=this._getLayerOfTile(t.layer);if(!e.options.background)return[];for(var n=this.getMap(),r=[],i=t.extent2d.getMin(),o=t.extent2d.getMax(),a=t.offset,s=e._project(n._pointToPrj(i,t.z,ss),ss),c=e._project(n._pointToPrj(o,t.z,cs),cs),u=1;u<2;u++)this._findChildTilesAt(r,s,c,e,t.z+u,a);return r},n._findChildTilesAt=function(t,e,n,r,i,o){var a=r.options.zoomOffset,s=r.getId(),c=r.getSpatialReference().getResolution(i+a);if(c)for(var u,l,h=r._getTileConfig().getTileIndex(e,c,o),f=r._getTileConfig().getTileIndex(n,c,o),d=Math.min(h.idx,f.idx),p=Math.max(h.idx,f.idx),m=Math.min(h.idy,f.idy),g=Math.max(h.idy,f.idy),v=d;v<p;v++)for(var y=m;y<g;y++)u=r._getTileId(v,y,i+a,s),this.tileCache.has(u)&&(l=this.tileCache.getAndRemove(u),t.push(l),this.tileCache.add(u,l))},n._findParentTile=function(t){var e=this.getMap(),n=this._getLayerOfTile(t.layer);if(!n.options.background)return null;for(var r=n.getSpatialReference(),i=r.getZoomDirection(),o=n.options.zoomOffset,a=n.options.backgroundZoomDiff,s=t.extent2d.getCenter(),c=t.offset,u=n._project(e._pointToPrj(s,t.z)),l=1;l<=a;l++){var h=t.z-i*l,f=r.getResolution(h+o);if(f){var d=n._getTileConfig().getTileIndex(u,f,c),p=n._getTileId(d.x,d.y,h+o,t.layer);if(this.tileCache.has(p)){var m=this.tileCache.getAndRemove(p);return this.tileCache.add(p,m),m}}}return null},n._getLayerOfTile=function(t){return this.layer.getChildLayer?this.layer.getChildLayer(t):this.layer},n._getCachedTile=function(t){var e=this.tilesInView,n=this.tileCache.getAndRemove(t);if(n){e[t]=n;var r=this.tilesLoading;if(r&&r[t]){r[t].current=!1;var i=r[t],o=i.image,a=i.info;this.abortTileLoading(o,a),delete r[t]}}else n=e[t];return n},n._addTileToCache=function(t,e){this.tilesInView[t.id]={image:e,current:!0,info:t}},n.getTileOpacity=function(t){return this.layer.options.fadeAnimation&&t.loadTime?Math.min(1,(f()-t.loadTime)/(1e3/60*10)):1},n.onRemove=function(){this.clear(),delete this.tileCache,delete this._tilePlaceHolder,t.prototype.onRemove.call(this)},n._markTiles=function(){var t=0,e=0;if(this.tilesLoading)for(var n in this.tilesLoading)this.tilesLoading[n].current=!1,t++;if(this.tilesInView)for(var r in this.tilesInView)this.tilesInView[r].current=!1,e++;return[t,e]},n._retireTiles=function(t){for(var e in this.tilesLoading){var n=this.tilesLoading[e];!t&&n.current||(n.image&&this.abortTileLoading(n.image,n.info),this.deleteTile(n),delete this.tilesLoading[e])}for(var r in this.tilesInView){var i=this.tilesInView[r];i.current||(delete this.tilesInView[r],this.tileCache.has(r)||this.deleteTile(i))}},n.deleteTile=function(t){t&&t.image&&(t.image.onload=null,t.image.onerror=null)},n._generatePlaceHolder=function(t){var e=this.getMap(),n=this.layer.options.placeholder;if(!n||e.getPitch())return null;var r=this.layer.getTileSize(),i=e._getResolution(t)/e._getResolution(),o=this._tilePlaceHolder=this._tilePlaceHolder||hn.createCanvas(1,1,e.CanvasClass);return o.width=r.width*i,o.height=r.height*i,_(n)?n(o):function(t){var e=t.getContext("2d"),n=t.width,r=t.height,i=n/16,o=r/16;e.beginPath();for(var a=0;a<16;a++)e.moveTo(0,a*o),e.lineTo(n,a*o),e.moveTo(a*i,0),e.lineTo(a*i,r);e.strokeStyle="rgba(180, 180, 180, 0.1)",e.lineWidth=1,e.stroke(),e.beginPath();for(var s=[[0,0],[n,0],[0,r],[n,r],[0,0],[0,r],[n,0],[n,r],[0,r/2],[n,r/2],[n/2,0],[n/2,r]],c=1;c<s.length;c+=2)e.moveTo(s[c-1][0],s[c-1][1]),e.lineTo(s[c][0],s[c][1]);e.lineWidth=4,e.stroke()}(o),o},e}(mr);function ls(){return!1}Aa.registerRenderer("canvas",us);var hs=new me(0,0),fs=function(t){function e(){return t.apply(this,arguments)||this}fe(e,t);var n=e.prototype;return n.isDrawable=function(){return!0},n.needToRedraw=function(){var e=this.getMap();return!(!this._gl()||e.getPitch()||!e.isZooming()||e.isMoving()||e.isRotating())||t.prototype.needToRedraw.call(this)},n.drawTile=function(e,n){var r=this.getMap();if(e&&r&&n){var i=e._glScale=e._glScale||r.getGLScale(e.z),o=this.layer.getTileSize(),a=o.width,s=o.height;if(!1!==e.cache&&this._bindGLBuffer(n,a,s),this._gl()){var c=e.extent2d,u=e.offset,l=hs.set(c.xmin-u[0],e.extent2d.ymax-u[1]),h=l.x*i,f=l.y*i,d=this.getTileOpacity(n),p=null;this.layer.options.debug&&(p=this.getDebugInfo(e.id)),this.drawGLImage(n,h,f,a,s,i,d,p),d<1?this.setToRedraw():this.setCanvasUpdated()}else t.prototype.drawTile.call(this,e,n)}},n.writeZoomStencil=function(){var t=this.gl;t.stencilFunc(t.ALWAYS,1,255),t.stencilOp(t.KEEP,t.KEEP,t.REPLACE)},n.startZoomStencilTest=function(){var t=this.gl;t.stencilOp(t.KEEP,t.KEEP,t.KEEP),t.stencilFunc(t.EQUAL,0,255)},n.endZoomStencilTest=function(){this.pauseZoomStencilTest()},n.pauseZoomStencilTest=function(){var t=this.gl;t.stencilFunc(t.ALWAYS,1,255)},n.resumeZoomStencilTest=function(){var t=this.gl;t.stencilFunc(t.EQUAL,0,255)},n._bindGLBuffer=function(t,e,n){t.glBuffer||(t.glBuffer=this.bufferTileData(0,0,e,n))},n.loadTileImage=function(t,e){var n=this.layer.options.crossOrigin;t.crossOrigin=null!==n?n:"",t.src=e},n.onCanvasCreate=function(){this.canvas.gl&&this.canvas.gl.wrap||this.createCanvas2()},n.createContext=function(){t.prototype.createContext.call(this),this.createGLContext()},n.resizeCanvas=function(e){this.canvas&&(t.prototype.resizeCanvas.call(this,e),this.resizeGLCanvas())},n.clearCanvas=function(){this.canvas&&(t.prototype.clearCanvas.call(this),this.clearGLCanvas())},n.getCanvasImage=function(){if(!this._gl()||!this.canvas2)return t.prototype.getCanvasImage.call(this);var e=t.prototype.getCanvasImage.call(this);return e&&(e.image=this.canvas2),e},n._gl=function(){if(this.canvas.gl&&this.canvas.gl.wrap)return!0;var t=this.getMap();return t&&(t.getPitch()||t.getBearing())||this.layer&&!!this.layer.options.fragmentShader},n.deleteTile=function(e){t.prototype.deleteTile.call(this,e),e&&e.image&&this.disposeImage(e.image),delete e.image},n.onRemove=function(){t.prototype.onRemove.call(this),this.removeGLCanvas()},e}(ja(us));function ds(t){var e=this.layer.getTileSize(),n=this.canvas.constructor,r=this.getMap(),i=r.getDevicePixelRatio(),o=hn.createCanvas(e.width*i,e.height*i,n);o.layer=this.layer;var a=this,s=new me(t.extent2d.xmin,t.extent2d.ymax),c=new Vn(r.pointToCoordinate(s),r.pointToCoordinate(s.add(e.width,e.height)),r.getProjection());return this.layer.drawTile(o,{url:t.url,point:s,center:r.pointToCoordinate(s.add(e.width/2,e.height/2)),extent:c,z:t.z,x:t.x,y:t.y},(function(e){e?a.onTileError(o,t):a.onTileLoad(o,t)})),o}Aa.registerRenderer("gl",fs);var ps=function(t){function e(){return t.apply(this,arguments)||this}return fe(e,t),e.prototype.loadTile=function(){return ds.apply(this,arguments)},e}(us),ms=function(t){function e(){return t.apply(this,arguments)||this}return fe(e,t),e.prototype.loadTile=function(){return ds.apply(this,arguments)},e}(fs);Pa.registerRenderer("canvas",ps),Pa.registerRenderer("gl",ms);var gs=function(t){function e(){return t.apply(this,arguments)||this}fe(e,t);var n=e.prototype;return n.checkResources=function(){var t=this._geosToCheck;if(this._resourceChecked||t||(t=this.layer._geoList),!H(t))return[];for(var e=[],n={},r=t.length-1;r>=0;r--){var i=t[r]._getExternalResources();if(i.length)if(this.resources)for(var o=0;o<i.length;o++){var a=i[o][0];this.resources.isResourceLoaded(i[o])||n[a]||(e.push(i[o]),n[a]=1)}else e.push.apply(e,i)}return this._resourceChecked=!0,delete this._geosToCheck,e},n.render=function(){return this.layer._sortGeometries(),t.prototype.render.apply(this,arguments)},n._addGeoToCheckRes=function(t){t&&(Array.isArray(t)||(t=[t]),this._geosToCheck||(this._geosToCheck=[]),k(this._geosToCheck,t))},n.onGeometryAdd=function(t){this._addGeoToCheckRes(t),vs(this)},n.onGeometryRemove=function(){vs(this)},n.onGeometrySymbolChange=function(t){this._addGeoToCheckRes(t.target),vs(this)},n.onGeometryShapeChange=function(){vs(this)},n.onGeometryPositionChange=function(){vs(this)},n.onGeometryZIndexChange=function(){vs(this)},n.onGeometryShow=function(){vs(this)},n.onGeometryHide=function(){vs(this)},n.onGeometryPropertiesChange=function(){vs(this)},e}(mr);function vs(t){t.layer.options.drawImmediate&&t.render(),t.setToRedraw()}var ys=new Zn,_s=function(t){function e(){return t.apply(this,arguments)||this}fe(e,t);var n=e.prototype;return n.checkResources=function(){var e=this,n=t.prototype.checkResources.apply(this,arguments),r=this.layer.getStyle();return r&&(Array.isArray(r)||(r=[r]),r.forEach((function(t){for(var r=It(t.symbol,!0),i=0,o=r.length;i<o;i++)e.resources.isResourceLoaded(r[i])||n.push(r[i])}))),n},n.needToRedraw=function(){var e=this.getMap();return!(!e.isInteracting()||!this.layer.options.enableAltitude)||!(e.isZooming()&&!e.isRotating()&&!e.getPitch()&&!this._hasPoint&&this.layer.constructor===eo)&&t.prototype.needToRedraw.call(this)},n.draw=function(){if(this.getMap()){if(!this.layer.isVisible()||this.layer.isEmpty())return this.clearCanvas(),void this.completeRender();this.prepareCanvas(),this.drawGeos(),this.completeRender()}},n.isBlank=function(){return!!this.context&&!this.context.canvas._drawn},n.drawOnInteracting=function(){if(this._geosToDraw){this._updateDisplayExtent();var t=this.getMap(),e=this.layer.getCount(),n=this.getMap().getResolution();(t.isZooming()&&t.options.seamlessZoom&&void 0!==this._drawnRes&&n>1.5*this._drawnRes&&this._geosToDraw.length<e||t.isMoving()||t.isInteracting())&&(this.prepareToDraw(),this.forEachGeo(this.checkGeo,this),this._drawnRes=n);for(var r=0,i=this._geosToDraw.length;r<i;r++){var o=this._geosToDraw[r];o.isVisible()&&o._paint(this._displayExtent)}}},n.show=function(){this.layer.forEach((function(t){t._repaint()})),t.prototype.show.apply(this,arguments)},n.forEachGeo=function(t,e){this.layer.forEach(t,e)},n.drawGeos=function(){this._drawnRes=this.getMap().getResolution(),this._updateDisplayExtent(),this.prepareToDraw(),this.forEachGeo(this.checkGeo,this);for(var t=0,e=this._geosToDraw.length;t<e;t++)this._geosToDraw[t]._paint()},n.prepareToDraw=function(){this._hasPoint=!1,this._geosToDraw=[]},n.checkGeo=function(t){if(t&&t.isVisible()&&t.getMap()&&t.getLayer()&&t.getLayer().isCanvasRender()){var e=t._getPainter(),n=e.get2DExtent(this.resources,ys);n&&n.intersects(this._displayExtent)&&(e.hasPoint()&&(this._hasPoint=!0),this._geosToDraw.push(t))}},n.onZoomEnd=function(){delete this.canvasExtent2D,t.prototype.onZoomEnd.apply(this,arguments)},n.onRemove=function(){this.forEachGeo((function(t){t.onHide()})),delete this._geosToDraw},n.onGeometryPropertiesChange=function(e){e&&this.layer._styleGeometry(e.target),t.prototype.onGeometryPropertiesChange.call(this,e)},n._updateDisplayExtent=function(){var t=this.canvasExtent2D;if(this._maskExtent){if(!this._maskExtent.intersects(t))return void this.completeRender();t=t.intersection(this._maskExtent)}this._displayExtent=t},n.identify=function(t,e){void 0===e&&(e={});var n=this._geosToDraw;return n?this.layer._hitGeos(n,t,e):[]},e}(gs);eo.registerRenderer("canvas",_s);var bs=function(t){function e(e){var n;return(n=t.call(this)||this).map=e,n._handlerQueue={},n}fe(e,t);var n=e.prototype;return n.callInNextFrame=function(t){this._handlerQueue.push(t)},n.executeFrameCallbacks=function(){var t=this._handlerQueue;this._handlerQueue=[];for(var e=0,n=t.length;e<n;e++)t[e]()},n.offsetPlatform=function(t,e){if(!this.map._panels.front)return this;if(!e&&0===t.x&&0===t.y)return this;var n=this.map._panels,r=this._frontCount=n.back.layerDOM.childElementCount,i=this._backCount=n.front.layerDOM.childElementCount,o=this._uiCount=n.front.uiDOM.childElementCount;if(r||i||o){var a=this.map.offsetPlatform();a=t?a.add(t)._round():a.round(),i&&Ve(n.back,a),(r||o)&&Ve(n.front,a)}return this},n.domChanged=function(){var t=this.map._panels;if(!t.front)return!1;var e=t.back.layerDOM.childElementCount;if(void 0===this._frontCount||this._frontCount!==e)return!0;var n=t.front.layerDOM.childElementCount;if(void 0===this._backCount||this._backCount!==n)return!0;var r=t.front.uiDOM.childElementCount;return void 0===this._uiCount||this._uiCount!==r},n.resetContainer=function(){if(this.map&&(this.map._resetMapViewPoint(),this.map._panels.front)){var t=new me(0,0);Ve(this.map._panels.back,t),Ve(this.map._panels.front,t)}},n.onZoomEnd=function(){this.resetContainer()},n.onLoad=function(){this._frameLoop()},e}(Mn),xs=function(t){function e(e){var n;return(n=t.call(this,e)||this)._containerIsCanvas=!!e._containerDOM.getContext,n._thisVisibilitychange=n._onVisibilitychange.bind(de(de(n))),n._registerEvents(),n._loopTime=0,n}fe(e,t);var n=e.prototype;return n.load=function(){this.initContainer()},n.renderFrame=function(t){if(!this.map)return!1;delete this._isViewChanged;var e=this.map;e._fireEvent("framestart"),this.updateMapDOM();var n=this._getAllLayerToRender();return this.drawLayers(n,t),this.drawLayerCanvas(n)&&this._drawCenterCross(),e._fireEvent("frameend"),this._recordView(),this._mapview=this._getMapView(),delete this._spatialRefChanged,this._fireLayerLoadEvents(),this.executeFrameCallbacks(),this._canvasUpdated=!1,!0},n.updateMapDOM=function(){var t=this.map;if(!t.isZooming()){var e=t._getViewPointFrameOffset();e?t.offsetPlatform(e):this.domChanged()&&this.offsetPlatform(null,!0)}},n.drawLayers=function(t,e){for(var n=this.map,r=n.isInteracting(),i=[],o=[],a=n.options.fpsOnInteracting||0,s=0===a?0:1e3/a,c=this.map.options.layerCanvasLimitOnInteracting,u=t.length,l=n.getBaseLayer(),h=0,f=0;f<u;f++){var d=t[f];if(d.isVisible()){var p=d.isCanvasRender();p&&i.push(d.getId());var m=d._getRenderer();if(m){var g=this._checkLayerRedraw(d);p&&m.isCanvasUpdated()&&(g||o.push(d.getId()),this.setLayerCanvasUpdated());var v=m.__zoomTransformMatrix;if(delete m.__zoomTransformMatrix,g){if(r&&p){if(c>0&&u-1-f>c&&d!==l){d._getRenderer().clearCanvas();continue}h+=this._drawCanvasLayerOnInteracting(d,h,s,e)}else r&&m.drawOnInteracting?(m.prepareRender&&m.prepareRender(),m.checkAndDraw?m.checkAndDraw(m.drawOnInteracting,this._eventParam,e):m.drawOnInteracting(this._eventParam,e)):(m.render(e),p&&v&&m.isLoadingResource()&&(m.__zoomTransformMatrix=v));p&&(o.push(d.getId()),this.setLayerCanvasUpdated())}else p&&r&&(n.isZooming()&&!n.getPitch()?(m.prepareRender(),m.__zoomTransformMatrix=this._zoomMatrix):(n.getPitch()||n.isRotating())&&m.clearCanvas())}}}var y=this._canvasIds||[],_=this._updatedIds||[];if(this._canvasIds=i,this._updatedIds=o,!this.isLayerCanvasUpdated()){var b="---";y.join(b)===i.join(b)&&_.join(b)===o.join(b)||this.setLayerCanvasUpdated()}},n._checkLayerRedraw=function(t){if(this.isSpatialReferenceChanged())return!0;var e=this.map,n=t._getRenderer();return t.isCanvasRender()?n.testIfNeedRedraw():!(!n.needToRedraw||!n.needToRedraw())||e.isInteracting()||this.isViewChanged()},n._drawCanvasLayerOnInteracting=function(t,e,n,r){var i=this.map,o=t._getRenderer(),a=o.getDrawTime(),s=0===n||n>0&&e+a<=n;if(o.mustRenderOnInteracting&&o.mustRenderOnInteracting())o.render(r);else{if(o.drawOnInteracting&&(t===i.getBaseLayer()||s||i.isZooming()&&t.options.forceRenderOnZooming||i.isMoving()&&t.options.forceRenderOnMoving||i.isRotating()&&t.options.forceRenderOnRotating))return o.prepareRender(),o.prepareCanvas(),o.checkAndDraw?o.checkAndDraw(o.drawOnInteracting,this._eventParam,r):o.drawOnInteracting(this._eventParam,r),a;!i.isZooming()||i.getPitch()||i.isRotating()?(i.getPitch()||i.isRotating())&&o.clearCanvas():(o.prepareRender(),o.__zoomTransformMatrix=this._zoomMatrix)}return o.drawOnInteracting&&!s&&o.onSkipDrawOnInteracting(this._eventParam,r),0},n._fireLayerLoadEvents=function(){if(this._updatedIds&&this._updatedIds.length>0){var t=this.map;this._updatedIds.reverse().forEach((function(e){var n=t.getLayer(e);if(n){var r=n._getRenderer();r&&r.isRenderComplete()&&n.fire("layerload")}}))}},n.isLayerCanvasUpdated=function(){return this._canvasUpdated},n.setLayerCanvasUpdated=function(){this._canvasUpdated=!0},n.drawLayerCanvas=function(t){var e=this.map;if(!e)return!1;if(!this.isLayerCanvasUpdated()&&!this.isViewChanged())return!1;this.canvas||this.createCanvas(),e._fireEvent("renderstart",{context:this.context}),this._updateCanvasSize()||this.clearCanvas();for(var n,r=e.isInteracting(),i=e.options.layerCanvasLimitOnInteracting,o=t.length,a=[],s=0;s<o;s++)if(t[s].isVisible()&&t[s].isCanvasRender()&&t[s]._getRenderer()){var c=this._getLayerImage(t[s]);c&&c.image&&(t[s]===e.getBaseLayer()?n=[t[s],c]:a.push([t[s],c]))}n&&(this._drawLayerCanvasImage(n[0],n[1]),this._drawFog()),o=a.length;for(var u=r&&i>=0&&o>i?o-i:0;u<o;u++)this._drawLayerCanvasImage(a[u][0],a[u][1]);return e._fireEvent("renderend",{context:this.context}),!0},n.setToRedraw=function(){for(var t=this._getAllLayerToRender(),e=0,n=t.length;e<n;e++){var r=t[e].getRenderer();r&&r.canvas&&r.setToRedraw&&r.setToRedraw()}},n.updateMapSize=function(t){if(t&&!this._containerIsCanvas){var e=t.width+"px",n=t.height+"px",r=this.map._panels;r.mapWrapper.style.width=e,r.mapWrapper.style.height=n,this._updateCanvasSize()}},n.getMainPanel=function(){return this.map?this._containerIsCanvas?this.map._containerDOM:this.map._panels?this.map._panels.mapWrapper:null:null},n.toDataURL=function(t){return this.canvas?this.canvas.toDataURL(t):null},n.remove=function(){he.webgl&&"undefined"!=typeof document&&Ne(document,"visibilitychange",this._thisVisibilitychange),this._resizeInterval&&clearInterval(this._resizeInterval),delete this.context,delete this.canvas,delete this.map,delete this._spatialRefChanged,this._cancelFrameLoop()},n.hitDetect=function(t){var e=this.map;if(e&&e.options.hitDetect&&!e.isInteracting()){for(var n=e._getLayers(),r="default",i=e.options.hitDetectLimit||0,o=0,a=n.length-1;a>=0;a--){var s=n[a];if(!(!s.options.hitDetect||s.isEmpty&&s.isEmpty())){var c=s._getRenderer();if(c&&c.hitDetect&&(!c.isBlank||!c.isBlank())){if("default"!==s.options.cursor&&c.hitDetect(t)){r=s.options.cursor||"pointer";break}if(o++,i>0&&o>i)break}}}e._trySetCursor(r)}},n._getLayerImage=function(t){var e=t._getRenderer();return e.getCanvasImage?e.getCanvasImage():null},n.initContainer=function(){var t=this.map._panels;function e(e,n,r,i){var o=De("div",n);return r&&(o.style.cssText=r),t[e]=o,i||We(o),o}var n=this.map._containerDOM;if(!this._containerIsCanvas){n.innerHTML="";var r="position:absolute;top:0px;left:0px;",i=e("mapWrapper","maptalks-wrapper","position:absolute;overflow:hidden;",!0),o=e("allLayers","maptalks-all-layers",r+"padding:0px;margin:0px;z-index:0;overflow:visible;",!0),a=e("backStatic","maptalks-back-static",r+"z-index:0;",!0),s=e("back","maptalks-back",r+"z-index:1;"),c=e("backLayer","maptalks-back-layer",r),u=e("canvasContainer","maptalks-canvas-layer",r+"border:none;z-index:2;"),l=e("frontStatic","maptalks-front-static",r+"z-index:3;",!0),h=e("front","maptalks-front",r+"z-index:4;",!0),f=e("frontLayer","maptalks-front-layer",r+"z-index:0;"),d=e("ui","maptalks-ui",r+"border:none;z-index:1;",!0),p=e("control","maptalks-control","z-index:1",!0);n.appendChild(i),o.appendChild(a),s.appendChild(c),s.layerDOM=c,o.appendChild(s),o.appendChild(u),h.appendChild(f),h.layerDOM=f,h.uiDOM=d,o.appendChild(l),o.appendChild(h),h.appendChild(d),i.appendChild(o),i.appendChild(p),this.createCanvas(),this.resetContainer();var m=this.map._getContainerDomSize();this.updateMapSize(m)}},n.isViewChanged=function(){if(void 0!==this._isViewChanged)return this._isViewChanged;var t=this._mapview,e=this._getMapView();return this._isViewChanged=!t||!$(t,e),this._isViewChanged},n._recordView=function(){var t=this.map;!t._onViewChange||t.isInteracting()||t.isAnimating()||$(t.getView(),t._getCurrentView())||t._onViewChange(t.getView())},n.isSpatialReferenceChanged=function(){return this._spatialRefChanged},n._getMapView=function(){var t=this.map,e=t._getPrjCenter();return{x:e.x,y:e.y,zoom:t.getZoom(),pitch:t.getPitch(),bearing:t.getBearing(),width:t.width,height:t.height}},n._frameLoop=function(t){var e=this;this.map?(this.renderFrame(t),this._animationFrame=A((function(t){e._frameLoop(t)}))):this._cancelFrameLoop()},n._cancelFrameLoop=function(){this._animationFrame&&E(this._animationFrame)},n._drawLayerCanvasImage=function(t,e){var n=this.context,r=e.point.round(),i=this.map.getDevicePixelRatio();1!==i&&r._multi(i);var o=e.image,a=o.width,s=o.height;if(!(r.x+a<=0||r.y+s<=0)){var c=t.options.opacity;if(m(c)||(c=1),!(c<=0)){var u=e.opacity;if(m(u)||(u=1),!(u<=0)){var l=n.globalAlpha;c<1&&(n.globalAlpha*=c),u<1&&(n.globalAlpha*=u),t.options.cssFilter&&(n.filter=t.options.cssFilter);var h=t.getRenderer(),f=h.__zoomTransformMatrix,d=h.clipCanvas(this.context);f&&(n.save(),n.setTransform.apply(n,f)),n.drawImage(o,0,0,a,s,r.x,r.y,a,s),f&&n.restore(),d&&n.restore(),"none"!==n.filter&&(n.filter="none"),n.globalAlpha=l}}}},n._drawCenterCross=function(){var t=this.map.options.centerCross;if(t){var e=this.context,n=new me(this.canvas.width/2,this.canvas.height/2);_(t)?t(e,n):hn.drawCross(this.context,n.x,n.y,2,"#f00")}},n._drawContainerExtent=function(){var t=this.map.options.cascadePitches,e=this.map.height-this.map._getVisualHeight(t[0]),n=this.map.height-this.map._getVisualHeight(t[1]),r=this.map.getContainerExtent(),i=this.context;i.beginPath(),i.moveTo(0,r.ymin),i.lineTo(r.xmax,r.ymin),i.stroke(),i.beginPath(),i.moveTo(0,e),i.lineTo(r.xmax,e),i.stroke(),i.beginPath(),i.moveTo(0,n),i.lineTo(r.xmax,n),i.stroke()},n._drawFog=function(){var t=this.map;if(!(t.getPitch()<=t.options.maxVisualPitch)&&t.options.fog){var e=t.getDevicePixelRatio(),n=this.context,r=t.getContainerExtent(),i=(t.height-t._getVisualHeight(75))*e;i<0&&(i=0);var o=r.ymin*e,a=Math.ceil(o-i),s=t.options.fogColor.join(),c=n.createLinearGradient(0,i,0,o+30),u=1-30/(a+30);c.addColorStop(0,"rgba("+s+", 0)"),c.addColorStop(.3,"rgba("+s+", 0.3)"),c.addColorStop(u,"rgba("+s+", 1)"),c.addColorStop(1,"rgba("+s+", 0)"),n.beginPath(),n.fillStyle=c,n.fillRect(0,i,Math.ceil(r.getWidth())*e,Math.ceil(a+30))}},n._getAllLayerToRender=function(){return this.map._getLayers()},n.clearCanvas=function(){this.canvas&&hn.clearRect(this.context,0,0,this.canvas.width,this.canvas.height)},n._updateCanvasSize=function(){if(!this.canvas||this._containerIsCanvas)return!1;var t=this.map,e=t.getSize(),n=this.canvas,r=t.getDevicePixelRatio();return(e.width*r!==n.width||e.height*r!==n.height)&&(n.height=r*e.height,n.width=r*e.width,n.style&&(n.style.width=e.width+"px",n.style.height=e.height+"px"),!0)},n.createCanvas=function(){this._containerIsCanvas?this.canvas=this.map._containerDOM:(this.canvas=De("canvas"),this._updateCanvasSize(),this.map._panels.canvasContainer.appendChild(this.canvas)),this.context=this.canvas.getContext("2d")},n._checkSize=function(){this.map&&!this.map.isInteracting()&&(Ze(this.map._containerDOM),this.map.checkSize())},n._setCheckSizeInterval=function(t){var e=this;clearInterval(this._resizeInterval),this._checkSizeInterval=t,this._resizeInterval=setInterval((function(){!e.map||e.map.isRemoved()?clearInterval(e._resizeInterval):e._checkSize()}),this._checkSizeInterval)},n._registerEvents=function(){var t=this,e=this.map;e.options.checkSize&&!C&&"undefined"!=typeof window&&this._setCheckSizeInterval(e.options.checkSizeInterval),he.mobile||e.on("_mousemove",this._onMapMouseMove,this),e.on("_dragrotatestart _dragrotating _dragrotateend _movestart _moving _moveend _zoomstart",(function(e){t._eventParam=e})),e.on("_zooming",(function(n){e.getPitch()||(t._zoomMatrix=n.matrix.container),t._eventParam=n})),e.on("_zoomend",(function(e){t._eventParam=e,delete t._zoomMatrix})),e.on("_spatialreferencechange",(function(){t._spatialRefChanged=!0})),he.webgl&&"undefined"!=typeof document&&Ue(document,"visibilitychange",this._thisVisibilitychange,this)},n._onMapMouseMove=function(t){var e=this,n=this.map;!n.isInteracting()&&n.options.hitDetect&&(this._hitDetectFrame&&E(this._hitDetectFrame),this._hitDetectFrame=A((function(){e.hitDetect(t.containerPoint)})))},n._getCanvasLayers=function(){return this.map._getLayers((function(t){return t.isCanvasRender()}))},n._onVisibilitychange=function(){"visible"===document.visibilityState&&this.setToRedraw()},e}(bs);ii.registerRenderer("canvas",xs),ii.mergeOptions({fog:!1,fogColor:[233,233,233]});var ws=Object.freeze({ResourceCache:gr,CanvasRenderer:mr,ImageGLRenderable:ja,MapRenderer:bs,MapCanvasRenderer:xs,Renderable:pr,ImageLayerCanvasRenderer:Ha,ImageLayerGLRenderer:Wa,TileLayerCanvasRenderer:us,TileLayerGLRenderer:fs,CanvasTileLayerCanvasRenderer:ps,CanvasTileLayerGLRenderer:ms,OverlayLayerCanvasRenderer:gs,VectorLayerCanvasRenderer:_s,CanvasLayerRenderer:Va}),Ms={_getRenderPoints:function(){return[[this._getCenter2DPoint(this.getMap().getGLZoom())],null]}};Mi.include(Ms),Di.include(Ms),Bi.include(Ms),ji.include(Ms),Fi.include({_getRenderPoints:function(t){var e=this.getMap();if("vertex"===t){for(var n=this._trimRing(this.getShell()),r=[],i=0,o=n.length;i<o;i++)r.push(e.coordToPoint(n[i],e.getGLZoom()));return[r,null]}return[[e.coordToPoint(this.getCenter(),e.getGLZoom())],null]}});var Ss={_getRenderPoints:function(t){var e,n=this.getMap(),r=n.getGLZoom(),i=null;if("point"===t)(e=this._getPath2DPoints(this._getPrjCoordinates(),!1,r))&&e.length>0&&Array.isArray(e[0])&&(e=e[0].concat(e[1]));else if("vertex"===t)if(i=[],(e=this._getPath2DPoints(this._getPrjCoordinates(),!1,r))&&e.length>0&&Array.isArray(e[0])){for(var o=0,a=e.length;o<a;o++)for(var s=0,c=e[o].length;s<c;s++)0===s?i.push([e[o][s],e[o][s+1]]):i.push([e[o][s-1],e[o][s]]);e=e[0].concat(e[1])}else for(var u=0,l=e.length;u<l;u++)0===u?i.push([e[u],e[u+1]]):i.push([e[u-1],e[u]]);else if("line"===t){e=[],i=[];var h=this._getPath2DPoints(this._getPrjCoordinates(),!1,r);if(h.length>0&&Array.isArray(h[0]))for(var f,d=1,p=h.length;d<p;d++){f=h[d],this instanceof xi&&f.length>0&&!f[0].equals(f[f.length-1])&&f.push(f[0]);for(var m=1,g=f.length;m<g;m++)e.push(f[m].add(f[m-1])._multi(.5)),i.push([f[m-1],f[m]])}else{this instanceof xi&&h.length>0&&!h[0].equals(h[h.length-1])&&h.push(h[0]);for(var v=1,y=h.length;v<y;v++)e.push(h[v].add(h[v-1])._multi(.5)),i.push([h[v-1],h[v]])}}else if("vertex-first"===t){var _=this._getPrjCoordinates();e=_.length?[n._prjToPoint(_[0],r)]:[],i=_.length?[[n._prjToPoint(_[0],r),n._prjToPoint(_[1],r)]]:[]}else if("vertex-last"===t){var b=this._getPrjCoordinates(),x=b.length;e=x?[n._prjToPoint(b[x-1],r)]:[];var w=x-1,M=x>1?x-2:x-1;i=x?[[n._prjToPoint(b[M],r),n._prjToPoint(b[w],r)]]:[]}else{var S=this._getProjection().project(this.getCenter());e=[n._prjToPoint(S,r)]}return[e,i]}};Ai.include(Ss),xi.include(Ss),$r.include({_redrawWhenPitch:function(){return!1},_redrawWhenRotate:function(){return!1}});var As={_redrawWhenPitch:function(){return!0},_redrawWhenRotate:function(){return this instanceof Di||this instanceof ji},_paintAsPath:function(){var t=this.getMap();return this.getAltitude()>0||t.getPitch()||this instanceof Di&&t.getBearing()},_getPaintParams:function(){var t=this.getMap();if(this._paintAsPath())return xi.prototype._getPaintParams.call(this,!0);var e=this._getPrjCoordinates(),n=t._prjToPoint(e,t.getGLZoom()),r=this._getRenderSize(n);return[n].concat(r)},_paintOn:function(){return this._paintAsPath()?hn.polygon.apply(hn,arguments):hn.ellipse.apply(hn,arguments)},_getRenderSize:function(t){var e=this.getMap(),n=e.getGLZoom(),r=this._getPrjExtent(),i=e._prjToPoint(r.getMin(),n),o=e._prjToPoint(r.getMax(),n);return[Math.abs(o.x-i.x)/2,Math.abs(o.y-t.y),Math.abs(t.y-i.y)]}};Di.include(As),Bi.include(As),Fi.include({_getPaintParams:function(){var t=this.getMap().getGLZoom(),e=this._getPrjShell();return[this._getPath2DPoints(e,!1,t)]},_paintOn:hn.polygon}),ji.include(As,{_redrawWhenPitch:function(){return!0},_getPaintParams:function(){if(this._paintAsPath())return xi.prototype._getPaintParams.call(this,!0);var t=this.getMap(),e=t._prjToPoint(this._getPrjCoordinates(),t.getGLZoom());return[e,this._getRenderSize(e)[0],[this.getStartAngle(),this.getEndAngle()]]},_paintOn:function(){if(this._paintAsPath())return hn.polygon.apply(hn,arguments);var t=this.getMap().getBearing(),e=arguments;return t&&(e[3]=e[3].slice(0),e[3][0]+=t,e[3][1]+=t),hn.sector.apply(hn,e)}}),_i.include({_paintAsPath:function(){return!0}}),Ai.include({arrowStyles:{classic:[3,4]},_getArrowShape:function(t,e,n,r,i){if(!t||!e||t.equals(e))return null;i||(i=0);var o,a=n*r[0],s=n*r[1]+i,c=a/2+i;(o=e.nextCtrlPoint||e.prevCtrlPoint?e.prevCtrlPoint?e.sub(new me(e.prevCtrlPoint)):e.sub(new me(e.nextCtrlPoint)):e.sub(t))._unit();var u=e.sub(o.multi(s));o._perp();var l=u.add(o.multi(c));return o._multi(-1),[l,e,u.add(o.multi(c)),l]},_getPaintParams:function(){var t=this._getPrjCoordinates();return[this._getPath2DPoints(t,!1,this.getMap().getGLZoom())]},_paintOn:function(t,e,n,r,i){this.options.smoothness?hn.paintSmoothLine(t,e,n,this.options.smoothness,!1,this._animIdx,this._animTailRatio):hn.path(t,e,n,null,i),this._paintArrow(t,e,n)},_getArrowPlacement:function(){return this.options.arrowPlacement},_getArrowStyle:function(){var t=this.options.arrowStyle;return t?Array.isArray(t)?t:this.arrowStyles[t]:null},_getArrows:function(t,e,n){var r=this._getArrowStyle();if(!r||t.length<2)return[];for(var i=t.length>0&&Array.isArray(t[0])?t:[t],o=this._getArrowPlacement(),a=[],s=this.getMap(),c=s.coordToContainerPoint(this.getFirstCoordinate()),u=s.coordToContainerPoint(this.getLastCoordinate()),l=i.length-1;l>=0;l--){if("vertex-first"===o||"vertex-firstlast"===o&&i[l][0].closeTo(c,.01)){var h=this._getArrowShape(i[l][1],i[l][0],e,r,n);h&&a.push(h)}if("vertex-last"===o||"vertex-firstlast"===o&&i[l][i[l].length-1].closeTo(u,.01)){var f=this._getArrowShape(i[l][i[l].length-2],i[l][i[l].length-1],e,r,n);f&&a.push(f)}else"point"===o&&this._getArrowPoints(a,i[l],e,r,n)}return a},_getArrowPoints:function(t,e,n,r,i){for(var o=0,a=e.length-1;o<a;o++){var s=this._getArrowShape(e[o],e[o+1],n,r,i);s&&t.push(s)}},_paintArrow:function(t,e,n){var r=this._getInternalSymbol().lineWidth;(!m(r)||r<3)&&(r=3);var i=this._getArrows(e,r);if(i.length){t.setLineDash&&t.setLineDash([]);for(var o=i.length-1;o>=0;o--)t.fillStyle=t.strokeStyle,hn.polygon(t,i[o],n,n)}}}),xi.include({_getPaintParams:function(t){var e=this.getMap().getGLZoom(),n=this._getPrjShell(),r=this._getPath2DPoints(n,t,e),i=r.length>0&&Array.isArray(r[0]);i&&(r=[[r[0]],[r[1]]]);var o=this._getPrjHoles(),a=[];if(o&&o.length>0){for(var s=this._simplified,c=0;c<o.length;c++){var u=this._getPath2DPoints(o[c],t,e);Array.isArray(u)&&i?Array.isArray(u[0])?(r[0].push(u[0]),r[1].push(u[1])):r[0].push(u):a.push(u)}s&&(this._simplified=s)}return i||k(r=[r],a),[r]},_paintOn:function(t,e,n,r,i){hn.polygon(t,e,n,r,i,this.options.smoothness)}}),ii.VERSION="0.49.4"}.call(this,n("4362"),n("c8ba"))},ee7c:function(t,e){var n="expire_mixin";t.exports=function(){var t=this.createStore(this.storage,null,this._namespacePrefix+n);return{set:function(e,r,i,o){return this.hasNamespace(n)||t.set(r,o),e()},get:function(t,r){return this.hasNamespace(n)||e.call(this,r),t()},remove:function(e,r){return this.hasNamespace(n)||t.remove(r),e()},getExpiration:function(e,n){return t.get(n)},removeExpiredKeys:function(t){var n=[];this.each((function(t,e){n.push(e)}));for(var r=0;r<n.length;r++)e.call(this,n[r])}};function e(e){t.get(e,Number.MAX_VALUE)<=(new Date).getTime()&&(this.raw.remove(e),t.remove(e))}}},eec4:function(t,e,n){"use strict";var r=n("b770").forEach,i=n("5be5"),o=n("49ad"),a=n("2cef"),s=n("5058"),c=n("abb4"),u=n("18e9"),l=n("c274"),h=n("d6eb"),f=n("18d2"),d=n("c946");function p(t){return Array.isArray(t)||void 0!==t.length}function m(t){if(Array.isArray(t))return t;var e=[];return r(t,(function(t){e.push(t)})),e}function g(t){return t&&1===t.nodeType}function v(t,e,n){var r=t[e];return null!=r||void 0===n?r:n}t.exports=function(t){var e;if((t=t||{}).idHandler)e={get:function(e){return t.idHandler.get(e,!0)},set:t.idHandler.set};else{var n=a(),y=s({idGenerator:n,stateHandler:h});e=y}var _=t.reporter;_||(_=c(!1===_));var b=v(t,"batchProcessor",l({reporter:_})),x={};x.callOnAdd=!!v(t,"callOnAdd",!0),x.debug=!!v(t,"debug",!1);var w,M=o(e),S=i({stateHandler:h}),A=v(t,"strategy","object"),E=v(t,"important",!1),C={reporter:_,batchProcessor:b,stateHandler:h,idHandler:e,important:E};if("scroll"===A&&(u.isLegacyOpera()?(_.warn("Scroll strategy is not supported on legacy Opera. Changing to object strategy."),A="object"):u.isIE(9)&&(_.warn("Scroll strategy is not supported on IE9. Changing to object strategy."),A="object")),"scroll"===A)w=d(C);else{if("object"!==A)throw new Error("Invalid strategy name: "+A);w=f(C)}var T={};return{listenTo:function(t,n,i){function o(t){var e=M.get(t);r(e,(function(e){e(t)}))}function a(t,e,n){M.add(e,n),t&&n(e)}if(i||(i=n,n=t,t={}),!n)throw new Error("At least one element required.");if(!i)throw new Error("Listener required.");if(g(n))n=[n];else{if(!p(n))return _.error("Invalid arguments. Must be a DOM element or a collection of DOM elements.");n=m(n)}var s=0,c=v(t,"callOnAdd",x.callOnAdd),u=v(t,"onReady",(function(){})),l=v(t,"debug",x.debug);r(n,(function(t){h.getState(t)||(h.initState(t),e.set(t));var f=e.get(t);if(l&&_.log("Attaching listener to element",f,t),!S.isDetectable(t))return l&&_.log(f,"Not detectable."),S.isBusy(t)?(l&&_.log(f,"System busy making it detectable"),a(c,t,i),T[f]=T[f]||[],void T[f].push((function(){++s===n.length&&u()}))):(l&&_.log(f,"Making detectable..."),S.markBusy(t,!0),w.makeDetectable({debug:l,important:E},t,(function(t){if(l&&_.log(f,"onElementDetectable"),h.getState(t)){S.markAsDetectable(t),S.markBusy(t,!1),w.addListener(t,o),a(c,t,i);var e=h.getState(t);if(e&&e.startSize){var d=t.offsetWidth,p=t.offsetHeight;e.startSize.width===d&&e.startSize.height===p||o(t)}T[f]&&r(T[f],(function(t){t()}))}else l&&_.log(f,"Element uninstalled before being detectable.");delete T[f],++s===n.length&&u()})));l&&_.log(f,"Already detecable, adding listener."),a(c,t,i),s++})),s===n.length&&u()},removeListener:M.removeListener,removeAllListeners:M.removeAllListeners,uninstall:function(t){if(!t)return _.error("At least one element is required.");if(g(t))t=[t];else{if(!p(t))return _.error("Invalid arguments. Must be a DOM element or a collection of DOM elements.");t=m(t)}r(t,(function(t){M.removeAllListeners(t),w.uninstall(t),h.cleanState(t)}))},initDocument:function(t){w.initDocument&&w.initDocument(t)}}}},f069:function(t,e,n){"use strict";var r=n("59ed"),i=function(t){var e,n;this.promise=new t((function(t,r){if(void 0!==e||void 0!==n)throw TypeError("Bad Promise constructor");e=t,n=r})),this.resolve=r(e),this.reject=r(n)};t.exports.f=function(t){return new i(t)}},f22b:function(t,e,n){"use strict";var r=n("23e7"),i=n("c65b"),o=n("f069");r({target:"Promise",stat:!0,forced:n("4738").CONSTRUCTOR},{reject:function(t){var e=o.f(this);return i(e.reject,void 0,t),e.promise}})},f36a:function(t,e,n){var r=n("e330");t.exports=r([].slice)},f5df:function(t,e,n){var r=n("da84"),i=n("00ee"),o=n("1626"),a=n("c6b6"),s=n("b622")("toStringTag"),c=r.Object,u="Arguments"==a(function(){return arguments}());t.exports=i?a:function(t){var e,n,r;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(n=function(t,e){try{return t[e]}catch(t){}}(e=c(t),s))?n:u?a(e):"Object"==(r=a(e))&&o(e.callee)?"Arguments":r}},f62a:function(t,e,n){"use strict";var r=n("1da1"),i=n("d4ec"),o=n("bee2"),a=(n("96cf"),n("d81d"),n("fb6a"),n("b0c0"),n("d9e2"),n("d3b7"),n("159b"),n("caad"),n("2532"),n("4de4"),n("ac1f"),n("841c"),n("4e82"),n("99af"),n("0481"),n("4069"),n("5a89")),s=n("ec60"),c=n("25a5"),u=n.n(c),l=n("bb7e"),h=function(){function t(e,n,r){var o=this;Object(i.a)(this,t);var c=n.altitude,l=n.isLabel,h=n.labelMinZoom,f=n.labelMaxZoom,d=n.labelLayerName,p=n.labelVisible,m=n.canvasSize,g=n.markSize,v=n.pointMinZoom,y=n.pointOrder,_=n.isToolTip,b=n.isPointNum,x=(n.sizeType,n.iconFile);if(0!=e.length){var w=new a.PointsMaterial({sizeAttenuation:!1,transparent:!0,depthTest:!1});l&&d&&(this.layerLabel=new s.VectorLayer(d,{minZoom:h||15,maxZoom:n.pointMaxZoom||20,geometryEvents:!1,hitDetect:!1,visible:p||!1}).addTo(r.map),this.all_labels=[]);var M=[];if(this.typeValues={},this.initTypeValue=-.9,this.canvasSize=m||48,this.markSize=g||40,this._initChildVar(n,r),e.slice(0,1/0).map((function(t){if(1*t.longitude>70&&1*t.longitude<138&&1*t.latitude>0&&1*t.latitude<56){var e=o._getImgType(t.businessType,t.imgSrc,t);if(o._bindDataItem(M,t,e),o.layerLabel){var r=new s.Marker([parseFloat(t.longitude),parseFloat(t.latitude)],{properties:{name:t.name,type:t.businessType,code:t.code,status:1},symbol:{textFaceName:n.nameFaceName||"microsoft yahei",textName:"{name}",textSize:n.nameFontSize||12,textFill:n.nameFontColor||"#cbd3ff",textDx:n.nameDy||0,textDy:n.nameDx||30}});1==t.visibility&&o.layerLabel.addGeometry(r),o.all_labels.push(r)}}})),this.textures=null,this.threeLayer=r,this.map=r.map,this.m=w,this.dataItems=M,this.point=null,this.shader=null,this.minZoom=v||8,this.maxZoom=n.pointMaxZoom||20,this.order=y||0,this.isToolTip=_||!1,this.customTooltip=n.customTooltip||!1,this.clickFunc=n.clickFunc||null,this.mouseMoveFunc=n.mouseMoveFunc||null,this.mouseOutFunc=n.mouseOutFunc||null,this.clickInfoFlag=void 0!==n.clickInfoFlag&&n.clickInfoFlag,this.iconFile=x||null,this.iconW=n.iconW||48,this.iconH=n.iconH||48,this.iconDx=n.iconDx||0,this.iconDy=n.iconDy||0,this.isPointNum=b||!1,this.iconFile&&(this.Infolayer=this.map.getLayer("infoLayer"),this.Infolayer||(this.Infolayer=new s.VectorLayer("infoLayer",{geometryEvents:!1,hitDetect:!1,zIndex:1001,iconCode:null}).addTo(r.map))),this.clickInfoFlag){var S={custom:!0,dy:n.infoDy||-48,content:"",animation:!1,autoOpenOn:null};this.infoWindow=new s.ui.InfoWindow(S).addTo(this.map)}this.layerPointNumLabel=new s.VectorLayer(s.Util.GUID(),{hitDetect:!1,zIndex:1001}).addTo(r.map),this.selectItems=[],this.funcsNew={},this.fitZoom=null,this.isCtrol=!0,this.selectMesh=[],this.rbush=new u.a,this.GLOBALSCALE=32768,this.XMAX=178,this.YMAX=85,this.MAXZOOM=31,this.SCALES=[];for(var A=0;A<this.MAXZOOM;A++)this.SCALES.push(129202.08021/Math.pow(2,A));this.clusterItemsCache={},this.clusterMinZoom=9,this.clusterMaxZoom=18,this.altitude=c,this.labelMaxZoom=f}else console.error("需要绘制的点位数量为0")}return Object(o.a)(t,[{key:"_initChildVar",value:function(t,e){throw new Error(e,"需要在派生类中实现")}},{key:"_bindMapEvents",value:function(){this.map.on("zooming zoomend",this._setSizeOn,this),this.point&&this.point.on("click empty mousemove mouseout",this._setPointEvent,this)}},{key:"_setSizeOn",value:function(){var t=this._getRate();for(var e in this.shader&&(this.shader.uniforms.size1.value=this.markSize*t),this.highlightmaterial&&(this.highlightmaterial.uniforms.size1.value=this.selectMarkSize*t),this.funcsNew)this.funcsNew[e]()}},{key:"_addIcon",value:function(t){this.Infolayer&&(this.Infolayer.clear(),new s.Marker([t.coordinate[0],t.coordinate[1]],{symbol:{markerFile:this.iconFile,markerWidth:this.iconW,markerHeight:this.iconH,markerDx:this.iconDx,markerDy:this.iconDy,markerOpacity:1}}).addTo(this.Infolayer),this.Infolayer.options.iconCode=t.code)}},{key:"addMouseOutFunc",value:function(){var t=Object(r.a)(regeneratorRuntime.mark((function t(e){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.mouseOutFunc(e);case 2:case"end":return t.stop()}}),t,this)})));return function(e){return t.apply(this,arguments)}}()},{key:"addMouseMoveFunc",value:function(){var t=Object(r.a)(regeneratorRuntime.mark((function t(e){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!this.clickInfoFlag){t.next=5;break}return t.next=3,this.mouseMoveFunc(this.infoWindow,e);case 3:t.next=7;break;case 5:return t.next=7,this.mouseMoveFunc(e);case 7:this.clickInfoFlag&&(!1===this.infosCustom&&this.hideInfoWindows(),this.infoWindow.show({x:e.coordinate[0],y:e.coordinate[1]}));case 8:case"end":return t.stop()}}),t,this)})));return function(e){return t.apply(this,arguments)}}()},{key:"addContent",value:function(){var t=Object(r.a)(regeneratorRuntime.mark((function t(e){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!this.clickInfoFlag||this.customTooltip){t.next=5;break}return t.next=3,this.clickFunc(this.infoWindow,e);case 3:t.next=7;break;case 5:return t.next=7,this.clickFunc(e);case 7:this.iconFile&&this._addIcon(e),this.clickInfoFlag&&!this.customTooltip&&(!1===this.infosCustom&&this.hideInfoWindows(),this.infoWindow.show({x:e.coordinate[0],y:e.coordinate[1]}));case 9:case"end":return t.stop()}}),t,this)})));return function(e){return t.apply(this,arguments)}}()},{key:"destroySecObjects",value:function(){for(var t=0;t<this.selectMesh.length;t++){var e=this.selectMesh[t];e.object3d.geometry&&e.object3d.geometry.dispose()}this.selectMesh=[]}},{key:"_setPointEvent",value:function(t){var e,n=t.selectMesh;if(n){e=n.data;var r=n.baseObject;r&&!r.isAdd&&this.highlightmaterial&&(r.setSymbol(this.highlightmaterial),this.threeLayer.addMesh(r),this.selectMesh.push(r))}if("empty"===t.type&&this.selectMesh.length&&(this.threeLayer.removeMesh(this.selectMesh),this.destroySecObjects()),"mousemove"===t.type&&e){var i=e.value;this.isToolTip&&(this.point.getToolTip()._content="".concat(i)),this.customTooltip&&this.mouseMoveFunc&&this.addMouseMoveFunc(e)}"mouseout"===t.type&&this.customTooltip&&(this.infoWindow.hide(),this.mouseOutFunc&&this.addMouseOutFunc(e)),"click"===t.type&&e&&this.clickFunc&&this.addContent(e)}},{key:"_bindDataItem",value:function(t,e,n){throw new Error(t,e,n,"需要在派生类中实现")}},{key:"_getImgType",value:function(t,e,n){throw new Error(t,e,"需要在派生类中实现")}},{key:"_deleteFunsKey",value:function(t){if(t){for(var e in this.funcsNew)if(t&&t===e){delete this.funcsNew[e];break}}else for(var n in this.funcsNew)delete this.funcsNew[n]}},{key:"dispose",value:function(){for(var t in this.isToolTip&&this.point&&this.point.removeToolTip(),this.clearIcon(),this.rbush&&(this.rbush.clear(),delete this.rbush),this.layerLabel&&(this.map.removeLayer(this.layerLabel),delete this.layerLabel,this.all_labels=[]),this.layerPointNumLabel&&this.map&&(this.map.removeLayer(this.layerPointNumLabel),delete this.layerPointNumLabel),this._closeEvent(),this._deleteFunsKey(),this.typeValues)delete this.typeValues[t];if(this.typeValues={},this.point){if(this.threeLayer.removeMesh(this.point),this.point.object3d.geometry&&this.point.object3d.geometry.dispose(),this.point.object3d.material&&this.point.object3d.material.dispose(),this.point._indexs_hide){for(var e in this.point._indexs_hide)delete this.point._indexs_hide[e];delete this.point._indexs_hide}this.point._datas=[],this.point._geometriesAttributes=[],this.point._grids=[],delete this.point.object3d,this.point.toolTip&&delete this.point.toolTip,this.point.options.points=[],this.point.options.positions=[],delete this.point}this.infoWindow&&(this.infoWindow.remove(),delete this.infoWindow),this.clickFunc&&delete this.clickFunc,this.mouseMoveFunc&&delete this.mouseMoveFunc,this.mouseOutFunc&&delete this.mouseOutFunc,this.textures&&this.textures.length>0&&(this.textures.forEach((function(t){t.dispose()})),delete this.textures),this.dataItems=[],this.threeLayer=null,this.map=null,delete this.shader,this.m&&(this.m.dispose(),delete this.m),this.selectItems=[]}},{key:"findItemByCode",value:function(t){for(var e=0;e<this.dataItems.length;e++)if(this.dataItems[e].code===t)return e}},{key:"changePointMinZoom",value:function(t){this.point&&(this.point.options.minZoom=t)}},{key:"_closeEvent",value:function(){this.point&&this.map.off("zooming zoomend",this._setSizeOn,this),this.point&&this.point.off("click empty mousemove mouseout",this._setPointEvent,this)}},{key:"clearIcon",value:function(t){void 0!==t&&!0!==t||this.Infolayer&&(this.Infolayer.clear(),this.Infolayer.options.iconCode=null),this.infoWindow&&this.infoWindow.hide()}},{key:"hideInfoWindows",value:function(t){throw new Error("需要在派生类中实现")}},{key:"_loadTexture",value:function(){var t=Object(r.a)(regeneratorRuntime.mark((function t(){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:throw new Error("需要在派生类中实现");case 1:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}()},{key:"pointShowHide",value:function(t,e,n,r,i){this.point&&(this.layerPointNumLabel&&this.layerPointNumLabel.clear(),this.layerLabel&&this.layerLabel.clear(),this.bzlayerNum&&this.bzlayerNum.clear(),this._deleteFunsKey(),this.selectItems=[],this.point.show(),this._pointShowHide(t,e,n,r,i))}},{key:"_pointShowHide",value:function(t,e,n,r,i){throw new Error(t,e,n,r,i,"需要在派生类中实现")}},{key:"_changePtVisible",value:function(t){var e=this;this.layerLabel&&this.layerLabel.clear();var n=this.point.object3d.geometry.attributes.visibility.array;if(0===t.length)for(var r=0;r<this.dataItems.length;r++)1===this.dataItems[r].visibility?(n[r]=1,this.point._indexs_hide[r]=!0,this.layerLabel&&this.layerLabel.addGeometry(this.all_labels[r]),this.bzlayerNum&&this.bzlayerNum.addGeometry(this.bz_all_nums[r])):(n[r]=.1,this.point._indexs_hide[r]=!1);else{this.dataItems.forEach((function(t){t.visibility=.1})),t.forEach((function(t){e.dataItems[t].visibility=1}));for(var i=0;i<this.dataItems.length;i++)1===this.dataItems[i].visibility?(n[i]=1,this.point._indexs_hide[i]=!0,this.layerLabel&&this.layerLabel.addGeometry(this.all_labels[i]),this.bzlayerNum&&this.bzlayerNum.addGeometry(this.bz_all_nums[i])):(n[i]=.1,this.point._indexs_hide[i]=!1)}this.point.object3d.geometry.attributes.visibility.needsUpdate=!0}},{key:"pointShowHideByCode",value:function(t,e){if(this.point){this.layerPointNumLabel&&this.layerPointNumLabel.clear(),this.layerLabel&&this.layerLabel.clear(),this.bzlayerNum&&this.bzlayerNum.clear(),this._deleteFunsKey(),this.point.show();for(var n=1/0,r=1/0,i=-1/0,o=-1/0,a=0;a<this.dataItems.length;a++){var c=this.dataItems[a];t.includes(c.code)?(n=Math.min(n,this.dataItems[a].coordinate[0]),r=Math.min(r,this.dataItems[a].coordinate[1]),i=Math.max(i,this.dataItems[a].coordinate[0]),o=Math.max(o,this.dataItems[a].coordinate[1]),c.visibility=1):c.visibility=.1}this._changePtVisible([]),e&&this.map.fitExtent(new s.Extent(n,r,i,o),0)}}},{key:"_itemHide",value:function(t,e,n,r,i,o){var a,s=null==n||n,c=null==r||r;e&&"MultiPolygon"===e.getType()&&(a=e.toGeoJSON());var u=this.point.object3d.geometry.attributes.visibility.array;if(t.length>0){for(var h=0;h<this.dataItems.length;h++){var f=this.dataItems[h],d=!0;if(1*f.status==1?d=!0===s:1*f.status==0&&(d=!0===c),e&&(d&=!!("MultiPolygon"===e.getType()?l.a.containsCoordinate2(this.dataItems[h].coordinate,a):l.a.containsCoordinate1(this.dataItems[h].coordinate,e))),i&&i.rangeArr.length>0){var p=1*this.dataItems[h].pvalue;d&=!!l.a.isInLevels(i,p)}f.imgflag==o&&(d?(u[h]=1,this.point._indexs_hide[h]=!0,this.selectItems.push(h),this.layerLabel&&this.layerLabel.addGeometry(this.all_labels[h]),this.bzlayerNum&&this.bzlayerNum.addGeometry(this.bz_all_nums[h])):(u[h]=.1,this.point._indexs_hide[h]=!1))}this.point.object3d.geometry.attributes.visibility.needsUpdate=!0}else{for(var m=0;m<this.dataItems.length;m++)this.dataItems[m].imgflag==o&&(u[m]=.1,this.point._indexs_hide[m]=!1);this.point.object3d.geometry.attributes.visibility.needsUpdate=!0}}},{key:"_getRate",value:function(){var t=this.map.getZoom()-8;return.2*(t=t>4?4:t)+.2}},{key:"_getMarkSize",value:function(t){var e=t.parent;return e.markSize*e._getRate()}},{key:"addPoint",value:function(){var t=Object(r.a)(regeneratorRuntime.mark((function t(){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:throw new Error("需要在派生类中实现");case 1:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}()},{key:"pointShowHideShowNumSingle",value:function(t,e,n){var r=this,i=n||12;this.layerPointNumLabel.clear(),this.layerPointNumLabel.show(),this._deleteFunsKey(),this.selectItems=[],this._pointShowHide(t,e);var o=1/0,a=1/0,c=-1/0,u=-1/0;this.selectItems.forEach((function(t){o=Math.min(o,r.dataItems[t].coordinate[0]),a=Math.min(a,r.dataItems[t].coordinate[1]),c=Math.max(c,r.dataItems[t].coordinate[0]),u=Math.max(u,r.dataItems[t].coordinate[1])}));var l=[(o+c)/2,(a+u)/2];this._addClusterLabel(l,this.selectItems.length,{}).on("click",(function(){r.layerPointNumLabel.hide(),r.map.fitExtent(new s.Extent(o,a,c,u),0),setTimeout((function(){r.point.show()}),500)})),this.point.hide(),this.funcsNew.a=function(){r.map.getZoom()<i?(r.point.hide(),r.layerPointNumLabel.show()):(r.point.show(),r.layerPointNumLabel.hide())}}},{key:"_clearClusterCache",value:function(){for(var t in this.clusterItemsCache)delete this.clusterItemsCache[t];this.clusterItemsCache={}}},{key:"pointShowHideShowNumbyCodeMultiple",value:function(t,e){var n=this;this.layerPointNumLabel.clear(),this.layerPointNumLabel.show(),this._deleteFunsKey();for(var r=[],i=[],o=0;o<e.length;o++)r.push({code:o,geo:e[o],geojson:e[o].toGeoJSON(),ptnum:0,val:t,ptids:[]});this.dataItems.forEach((function(t){t.visibility=.1})),r.forEach((function(e){for(var r=0;r<n.dataItems.length;r++){var o=n.dataItems[r];t.includes(o.code)&&l.a.containsCoordinate2(n.dataItems[r].coordinate,e.geojson)&&(e.ptnum+=1,e.ptids.push(r),i.push(r),o.visibility=1)}})),r.forEach((function(t){n._addClusterLabel(t.geo.getCenter(),t.ptnum,t).on("click",(function(t){n.selectItems=[];var e=t.target.properties.item;e.ptnum>0&&(setTimeout((function(){n.point.show()}),500),n._changePtVisible(e.ptids),n._zoomSelect1(e.ptids,e.geo,i))}))})),this._changePtVisible(i),this.map.getZoom()<9.4?this.point.hide():(this.point.show(),this.layerPointNumLabel.hide()),this.funcsNew.b=function(){n.isCtrol&&(n.map.getZoom()<9.4?(n.point.hide(),n.layerPointNumLabel.show()):(n.point.show(),n.layerPointNumLabel.hide()))}}},{key:"pointShowHideShowNumMultiple",value:function(t,e){var n=this;this.layerPointNumLabel.clear(),this.layerPointNumLabel.show(),this._deleteFunsKey();for(var r=[],i=[],o=0;o<e.length;o++)r.push({code:o,geo:e[o],geojson:e[o].toGeoJSON(),ptnum:0,val:t,ptids:[]});this.dataItems.forEach((function(t){t.visibility=.1})),r.forEach((function(e){for(var r=function(r){var o=n.dataItems[r];t.filter((function(t){return t===o.type})).length>0&&l.a.containsCoordinate2(n.dataItems[r].coordinate,e.geojson)&&(e.ptnum+=1,e.ptids.push(r),i.push(r),o.visibility=1)},o=0;o<n.dataItems.length;o++)r(o)})),r.forEach((function(t){n._addClusterLabel(t.geo.getCenter(),t.ptnum,t).on("click",(function(t){n.selectItems=[];var e=t.target.properties.item;e.ptnum>0&&(setTimeout((function(){n.point.show()}),500),n._changePtVisible(e.ptids),n._zoomSelect1(e.ptids,e.geo,i))}))})),this._changePtVisible(i),this.map.getZoom()<9.4?this.point.hide():(this.point.show(),this.layerPointNumLabel.hide()),this.funcsNew.b=function(){n.isCtrol&&(n.map.getZoom()<9.4?(n.point.hide(),n.layerPointNumLabel.show()):(n.point.show(),n.layerPointNumLabel.hide()))}}},{key:"_zoomSelect1",value:function(t,e,n){var r=this,i=1/0,o=1/0,a=-1/0,c=-1/0;t.forEach((function(t){i=Math.min(i,r.dataItems[t].coordinate[0]),o=Math.min(o,r.dataItems[t].coordinate[1]),a=Math.max(a,r.dataItems[t].coordinate[0]),c=Math.max(c,r.dataItems[t].coordinate[1])})),this.layerPointNumLabel.hide(),this.map.fitExtent(new s.Extent(i,o,a,c),0),this.isCtrol=!1,setTimeout((function(){r.funcsNew.a=function(){r.fitZoom||(r.fitZoom=r.map.getZoom()),r.map.getZoom()<r.fitZoom-.5&&(r.point.hide(),r.layerPointNumLabel.show(),r._deleteFunsKey("a"),r.fitZoom=null,r.isCtrol=!0,r._changePtVisible(n))}}),500)}},{key:"_addClusterLabelSmall",value:function(t,e,n,r,i){var o=r||"#50fcfc",a=i||"#000",c=new s.Marker(t,{properties:{item:n},symbol:[{type:"1",markerType:"ellipse",markerFill:o,markerFillOpacity:1,markerLineWidth:0,markerLineOpacity:1,markerWidth:{stops:[[9,32],[12,52]]},markerHeight:{stops:[[9,32],[12,52]]}}]});return this.layerPointNumLabel.addGeometry(c),new s.Marker(t,{properties:{name:e},symbol:{textFaceName:"sans-serif",textName:"{name}",textSize:{stops:[[9,12],[12,18],[15,24]]},textFill:a}}).addTo(this.layerPointNumLabel),c}},{key:"_addClusterLabel",value:function(t,e,n,r,i){var o=r||"#50fcfc",a=i||"#000",c=new s.Marker(t,{properties:{item:n},symbol:[{type:"1",markerType:"ellipse",markerFill:o,markerFillOpacity:1,markerLineWidth:0,markerLineOpacity:1,markerWidth:{stops:[[9,32],[12,52],[15,82]]},markerHeight:{stops:[[9,32],[12,52],[15,82]]}},{type:"2",markerType:"ellipse",markerFill:o,markerFillOpacity:"0.4",markerLineWidth:0,markerLineOpacity:1,markerWidth:{stops:[[9,54],[12,74],[15,104]]},markerHeight:{stops:[[9,54],[12,74],[15,104]]}}]});return this.layerPointNumLabel.addGeometry(c),new s.Marker(t,{properties:{name:e},symbol:{textFaceName:"sans-serif",textName:"{name}",textSize:{stops:[[9,12],[12,18],[15,24]]},textFill:a}}).addTo(this.layerPointNumLabel),c}},{key:"getClosestZoom",value:function(t){for(var e=0;e<this.MAXZOOM-1;e++){var n=this.SCALES[e],r=this.SCALES[e+1];if(n===t)return e;if(r===t)return e+1;if(t<n&&r<t)return Math.abs(t-n)<=Math.abs(t-r)?e:e+1}}},{key:"calColNum",value:function(t,e,n){var r=this;this.rbush.clear();for(var i=[],o=[],a=0;a<this.dataItems.length;a++)if(e&&e.length>0&&e.includes(a)){var s=this.getRect(this.dataItems[a],a);this.rbush.insert(s)}for(var c=0;c<this.dataItems.length;c++)if(e.includes(c))if(t>=18){var u=[c];o.push(u)}else i.includes(c)||function(){var t=r.getRect(r.dataItems[c]),e=r.rbush.search(t),n=[];if(e.forEach((function(t){n.push(t.idx)})),o.length>0){for(var a=[],s=0;s<o.length;s++)o[s].filter((function(t){return n.includes(t)})).length>0&&a.push(s);if(0===a.length)o.push(n.sort((function(t,e){return t-e})));else if(1===a.length){var u=o[a[0]].concat(n.filter((function(t){return!o[a[0]].includes(t)})));o[a[0]]=u.sort((function(t,e){return t-e}))}else{for(var l=[],h=[],f=0;f<o.length;f++)a.includes(f)?h.push(o[f]):l.push(o[f]);var d=h.flat(),p=d.concat(n.filter((function(t){return!d.includes(t)})));o=[],l.forEach((function(t){o.push(t)})),o.push(p)}}else o.push(n);i=o.flat()}();n.push(o)}},{key:"testCluster",value:function(t){var e=this;this.layerPointNumLabel.clear(),t.forEach((function(t){if(t.length>1){var n=1/0,r=1/0,i=-1/0,o=-1/0;t.forEach((function(t){n=Math.min(n,e.dataItems[t].coordinate[0]),r=Math.min(r,e.dataItems[t].coordinate[1]),i=Math.max(i,e.dataItems[t].coordinate[0]),o=Math.max(o,e.dataItems[t].coordinate[1]),e.dataItems[t].visibility=.1}));var a=[(n+i)/2,(r+o)/2];e._addClusterLabelSmall(a,t.length,{})}else e.dataItems[t[0]].visibility=1})),this._changePtVisible([])}},{key:"testMinClusterZoom",value:function(t){var e=this;this.layerPointNumLabel.clear(),t.forEach((function(t){e._addClusterLabel(t.geo.getCenter(),t.ptnum,t)})),this.dataItems.forEach((function(t){t.visibility=.1})),this._changePtVisible([])}},{key:"getRect",value:function(t,e){var n=this.threeLayer.coordinateToVector3(t.coordinate,0),r=this.getPixel(n),i=r.x,o=r.y,a=this._getRate(),s=this.markSize*a;return{minX:i-s/2,minY:o-s/2,maxX:i+s/2,maxY:o+s/2,idx:e}}},{key:"getPixel",value:function(t){var e=this.map.getSize(),n=this.threeLayer.getCamera();return l.a.vector2Pixel(t,e,n)}}]),t}();e.a=h},f772:function(t,e,n){var r=n("5692"),i=n("90e3"),o=r("keys");t.exports=function(t){return o[t]||(o[t]=i(t))}},f7e7:function(t,e,n){"use strict";n("b1eb")},f8c9:function(t,e,n){var r=n("23e7"),i=n("da84"),o=n("d44e");r({global:!0},{Reflect:{}}),o(i.Reflect,"Reflect",!0)},f8cd:function(t,e,n){var r=n("da84"),i=n("5926"),o=r.RangeError;t.exports=function(t){var e=i(t);if(e<0)throw o("The argument can't be less than 0");return e}},fb2c:function(t,e,n){n("74e8")("Uint32",(function(t){return function(e,n,r){return t(this,e,n,r)}}))},fb6a:function(t,e,n){"use strict";var r=n("23e7"),i=n("da84"),o=n("e8b5"),a=n("68ee"),s=n("861d"),c=n("23cb"),u=n("07fa"),l=n("fc6a"),h=n("8418"),f=n("b622"),d=n("1dde"),p=n("f36a"),m=d("slice"),g=f("species"),v=i.Array,y=Math.max;r({target:"Array",proto:!0,forced:!m},{slice:function(t,e){var n,r,i,f=l(this),d=u(f),m=c(t,d),_=c(void 0===e?d:e,d);if(o(f)&&(n=f.constructor,(a(n)&&(n===v||o(n.prototype))||s(n)&&null===(n=n[g]))&&(n=void 0),n===v||void 0===n))return p(f,m,_);for(r=new(void 0===n?v:n)(y(_-m,0)),i=0;m<_;m++,i++)m in f&&h(r,i,f[m]);return r.length=i,r}})},fc6a:function(t,e,n){var r=n("44ad"),i=n("1d80");t.exports=function(t){return r(i(t))}},fce3:function(t,e,n){var r=n("d039"),i=n("da84").RegExp;t.exports=r((function(){var t=i(".","s");return!(t.dotAll&&t.exec("\n")&&"s"===t.flags)}))},fdbc:function(t,e){t.exports={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0}},fdbf:function(t,e,n){var r=n("4930");t.exports=r&&!Symbol.sham&&"symbol"==typeof Symbol.iterator}})},module.exports=e()}).call(this,__webpack_require__(118).setImmediate)},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(2),i=n(3),o=l(n(12)),a=l(n(55)),s=(l(n(156)),l(n(360))),c=l(n(361)),u=l(n(61));function l(t){return t&&t.__esModule?t:{default:t}}e.default={name:"Sidebar",computed:{nav:function(){return this.$store.state.user.addRouters},openSidebar:function(){return this.$store.state.user.openSidebar}},props:{theme:{type:String,default:"light"},sidebarList:{type:Array,default:function(){return[]}}},data:function(){return{currentSelect:[],openKeys:[],currentOpen:[],isOpenSideBar:!0,collapsed:!1,menuWidth:0}},mounted:function(){var t=this;this.$watch("$route",(function(e){e.path&&t.highMenu(e)}),{immediate:!0,deep:!0}),this.$watch("openSidebar",(function(e){t.isOpenSideBar=e}),{deep:!0})},methods:{toggleCollapsed:function(){this.collapsed=!this.collapsed},findParent:function(t,e){var n=[];return function e(r,i){for(var o=0;o<r.length;o++){var a=r[o];if(a.name===i){n.push(a),e(t,a.meta.parentId);break}a.children&&e(a.children,i)}}(t,e),n},highMenu:function(t){try{var e=this.findParent(this.nav[0].children,t.name),n=(0,i.find)(e,{type:1});this.currentSelect=[n.name],this.openKeys=e.map((function(t){return t.name})),(0,i.isEmpty)(t.meta.subType)||(0,i.isEmpty)(t.meta.parentSubType)||!t.meta.parentSubType.includes("fullPage")?!(0,i.isEmpty)(t.meta.subType)&&(0,i.isEmpty)(t.meta.parentSubType)&&t.meta.subType.includes("fullPage")?this.flagSlideBar(t.meta.subType):(0,i.isEmpty)(t.meta.subType)&&!(0,i.isEmpty)(t.meta.parentSubType)&&t.meta.parentSubType.includes("fullPage")?this.flagSlideBar(t.meta.parentSubType):(0,i.isEmpty)(t.meta.subType)||(0,i.isEmpty)(t.meta.parentSubType)||t.meta.parentSubType.includes("fullPage")||t.meta.subType.includes("fullPage")?this.isOpenSideBar=!0:this.isOpenSideBar=!1:this.flagSlideBar(t.meta.parentSubType),this.$emit("change",this.isOpenSideBar)}catch(t){console.warn(t)}},flagSlideBar:function(t){if(!(0,i.isEmpty)(t)){var e=JSON.parse(t);e&&"1"===e.fullPage?this.isOpenSideBar=!1:this.isOpenSideBar=!0}},findCurrentNodes:function(t,e,n){var r=this;return t.forEach((function(t){t.name===e?n.push(t):t.children&&r.findCurrentNodes(t.children,e,n)})),n},handleOpenChange:function(t){this.openKeys=t},handleTitleClick:function(t){var e=this.findParent(this.nav[0].children,t);this.openKeys=e.map((function(t){return t.name}))},handleNav:function(t){var e=this,n=t.item,r=t.key,o=t.keyPath;if(!r)return!1;var a=[];if(this.findCurrentNodes(this.nav[0].children,r,a),this.$store.commit("user/SET_MENI_EVENT",{item:n,key:r,keyPath:o,vNodes:(0,i.isEmpty)(a)?"":a[0]}),!(0,i.isEmpty)(a))if(1===a[0].meta.chainType){var s=a[0].meta.path.indexOf("http")>-1?a[0].meta.path:"http://"+a[0].meta.path;window.open(s),1!==a[0].meta.functionType&&(0,u.default)(this,{},null,!1)}else this.currentSelect=[r],this.$router.push({name:r}).then((function(t){1!==a[0].meta.functionType&&(0,u.default)(e,{},null,!1)}))},renderIcon:function(t){var e=this.$createElement;return t?e("i",{class:(0,o.default)(["icon","iconfont",t,r.prefixCls+"-normal-icon"])}):null},getChildrenType1:function(t){return t.children.every((function(t){return 3===t.type}))},renderMenu:function(){var t=this,e=this.$createElement,n=this.sidebarList&&!(0,i.isEmpty)(this.sidebarList)?this.sidebarList.map((function(n){return n.meta&&n.meta.subType?null:!n.children||t.getChildrenType1(n)?e("a-menu-item",{key:n.name},[t.renderIcon(n.meta.icon),e("span",[n.meta.title])]):function n(r){if(r){if(t.getChildrenType1(r)&&"CustomWrapper"!==r.layout)return e("a-menu-item",{key:r.name},[t.renderIcon(r.meta.icon),e("span",{style:{"--left":r.meta.icon?"":"16px"}},[r.meta.title])]);var i=r.children.map((function(r){return r.children?n(r):1===r.type?e("a-menu-item",{key:r.name},[t.renderIcon(r.meta.icon),e("span",{style:{"--left":r.meta.icon?"":"16px"}},[r.meta.title])]):null}));return"CustomWrapper"!==r.layout?e("a-sub-menu",{key:r.name,on:{titleClick:t.handleTitleClick}},[e("span",{slot:"title"},[t.renderIcon(r.meta.icon),e("span",[r.meta.title])]),i]):null}return[]}(n)})):null,r={props:{mode:"inline",inlineIndent:20,forceSubMenuRender:!0,theme:this.theme,inlineCollapsed:this.collapsed,selectedKeys:this.currentSelect,openKeys:this.openKeys},on:{click:this.handleNav,openChange:this.handleOpenChange}};return e("a-menu",r,[n])}},render:function(){var t=arguments[0],e=document.documentElement.style.fontSize?parseFloat(document.documentElement.style.fontSize)/100:1;return this.isOpenSideBar?this.collapsed?this.menuWidth=60*e:this.menuWidth=250*e:this.menuWidth=0,t("a-layout-sider",{class:r.prefixCls+"-slider",attrs:{width:this.menuWidth,trigger:null,collapsible:!0,collapsed:this.collapsed}},[t("div",{class:r.prefixCls+"-slider-inner"},[t("div",{class:r.prefixCls+"-slider-inner-header"},[t(a.default,[this.renderMenu()])]),t("div",{class:r.prefixCls+"-slider-inner-footer"},[t("span",{on:{click:this.toggleCollapsed}},[this.collapsed?t(c.default):t(s.default)])])])])}}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=s(n(48)),i=s(n(27)),o=s(n(28)),a=n(101);function s(t){return t&&t.__esModule?t:{default:t}}var c=function(){function t(){(0,i.default)(this,t)}return(0,o.default)(t,[{key:"saveIndexDb",value:function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"rk_db";return new r.default((function(r,i){(new t).initIndexedDb().then((function(t){var o=t.transaction(n,"readwrite").objectStore(n);"array"===(0,a.toType)(e)?e.map((function(t){o.put(t)})):o.put(e),t.onsuccess=function(e){r(t)},t.onerror=function(t){i(t)}}))}))}},{key:"initIndexedDb",value:function(){return new r.default((function(t,e){var n=window.indexedDB.open("rk-web-core",1);n.onupgradeneeded=function(e){var n=e.target.result;if(!n.objectStoreNames.contains("app_db")){var r=n.createObjectStore("app_db",{keyPath:"tag"});r.createIndex("tag","tag",{unique:!0}),r.createIndex("value","value",{unique:!1}),r.createIndex("remarks","remarks",{unique:!1})}if(n.objectStoreNames.contains("rk_db"))t(n);else{var i=n.createObjectStore("rk_db",{keyPath:"tag"});i.createIndex("tag","tag",{unique:!0}),i.createIndex("val","val",{unique:!1}),i.createIndex("desc","desc",{unique:!1}),i.createIndex("created","created",{unique:!1}),i.createIndex("isTop","isTop",{unique:!1}),t(n)}},n.onsuccess=function(e){var n=e.target.result;t(n)},n.onerror=function(t){e(t)},n.onerror=function(t){console.log("Can not open indexedDB",t)}}))}},{key:"getLocalRecord",value:function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"rk_db";return new r.default((function(r){(new t).initIndexedDb().then((function(t){var i=t.transaction(n,"readwrite").objectStore(n).get(e);i.onsuccess=function(t){r(t.target.result)},i.onerror=function(t){r()}}))}))}}]),t}();e.default=new c},function(t,e,n){"use strict";n.d(e,"a",(function(){return r})),n.d(e,"b",(function(){return i}));var r=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("transition",{attrs:{name:"el-loading-fade"},on:{"after-leave":t.handleAfterLeave}},[n("div",{directives:[{name:"show",rawName:"v-show",value:t.visible,expression:"visible"}],staticClass:"el-loading-mask",class:[t.customClass,{"is-fullscreen":t.fullscreen}],style:{backgroundColor:t.background||""}},[n("div",{staticClass:"el-loading-spinner"},[t.spinner?n("i",{class:t.spinner}):n("svg",{staticClass:"circular",attrs:{viewBox:"25 25 50 50"}},[n("circle",{staticClass:"path",attrs:{cx:"50",cy:"50",r:"20",fill:"none"}})]),t._v(" "),t.text?n("p",{staticClass:"el-loading-text"},[t._v(t._s(t.text))]):t._e()])])])},i=[]},function(t,e,n){"use strict";n.r(e);var r=n(99),i=n(62);for(var o in i)["default"].indexOf(o)<0&&function(t){n.d(e,t,(function(){return i[t]}))}(o);var a=n(147),s=Object(a.a)(i.default,r.a,r.b,!1,null,null,null);e.default=s.exports},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.RkVersionList=e.BlockView=e.appTrack=e.frameInterface=e.Request=e.GMap=e.AppLayout=e.install=e.toType=void 0;var r=R(n(64)),i=R(n(9)),o=R(n(19)),a=R(n(27)),s=R(n(28)),c=n(3),u=n(174),l=R(n(175)),h=n(176),f=R(n(312)),d=n(315),p=R(n(35)),m=n(367),g=n(50),v=R(n(126)),y=R(n(368));n(372);var _=n(96),b=R(_),x=n(386),w=R(x),M=R(n(388)),S=R(n(389)),A=R(n(390)),E=R(n(37)),C=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}(n(17)),T=R(n(61)),I=R(n(98)),P=R(n(391)),L=R(n(393));R(n(51));function R(t){return t&&t.__esModule?t:{default:t}}var O=e.toType=function(t){return Object.prototype.toString.call(t).slice(8,-1).toLowerCase()},k={loadView:void 0,store:{},filters:[],vueConfig:{},authToken:void 0,svgFile:"https://at.alicdn.com/t/font_614860_f0motpq03e.js",isNeedMapTalks:!1,mapOptions:{},routerOptions:{},microOptions:{},extension:!1,depositRouter:!0,requestLoading:!1,routes:[],routesWhiteList:[],requestError:function(){}},B=function(){function t(e,n){(0,a.default)(this,t),e&&n&&(this.vueInstance=e,this.basicRouter=l.default,this.initOptions(n))}return(0,s.default)(t,[{key:"initOptions",value:function(t){var e=(0,o.default)(k);this.basicOptions=(0,c.pick)((0,g.mergeProps)(k,t),e),this.storeInstance=this.basicOptions.store,this.useInstance(),this.filterInstance(),this.vueConfigPick()}},{key:"getRequestInstance",value:function(){return p.default}},{key:"useInstance",value:function(){var t=this;if(this.vueInstance.use(this.basicRouter),this.vueInstance.use(M.default),this.storeInstance.registerModule("user",f.default),this.routerInstance=(0,h.routerInit)(this.basicRouter,this.basicOptions.routerOptions),this.vueInstance.prototype.$isExtension=this.basicOptions.extension,this.vueInstance.prototype.$getDb=I.default.getLocalRecord,window.$requestError=this.basicOptions.requestError,window.$requestLoading=this.basicOptions.requestLoading,this.vueInstance.prototype.$saveDb=I.default.saveIndexDb,this.vueInstance.prototype.$dynamicChangeRouter=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"replace",n=E.default.parse(window.location.search.replace("?",""));if("object"===O(t)){var r=E.default.stringify((0,i.default)(n,t)),o=window.location,a=o.origin,s=o.pathname,c=a+s;"replace"===e?window.history.replaceState("",document.title,c+"?"+r):window.history.pushState("",document.title,c+"?"+r)}},this.vueInstance.prototype.$clearDynamicRouteParams=function(){var t=window.location,e=t.origin+t.pathname;window.history.replaceState("",document.title,e)},this.vueInstance.prototype.$getDynamicRouteParams=function(){return E.default.parse(window.location.search.replace("?",""))},this.tempPkRouter=(0,h.pkRouter)(this.basicRouter,this.basicOptions.routerOptions),!(0,c.isEmpty)(this.basicOptions.routesWhiteList)){var e=this.basicOptions.routesWhiteList.map((function(e){return{path:e,component:t.basicOptions.loadView?t.basicOptions.loadView(e):(0,g.loadView)(e,t.basicOptions.routerPathPrefix,t.basicOptions.routerContext)}}));this.tempPkRouter,this.routerInstance.addRoutes([].concat((0,r.default)(e)))}this.vueInstance.prototype.$pkRouter=this.tempPkRouter,this.vueInstance.prototype.$basicOptions=this.basicOptions,(0,d.registerPermission)(this,this.tempPkRouter),this.basicOptions.isNeedMapTalks&&this.loadAMap()}},{key:"loadAMap",value:function(){var t=this;this.routerInstance.onReady((function(){(0,b.default)((0,g.mergeProps)({svgFile:t.basicOptions.svgFile,zoom:9.6},t.basicOptions.mapOptions))}))}},{key:"filterInstance",value:function(){var t=this;(0,o.default)(this.basicOptions.filters).forEach((function(e){t.vueInstance.filter(e,t.basicOptions.filters[e])}))}},{key:"vueConfigPick",value:function(){var t=this;(0,o.default)(this.basicOptions.vueConfig).forEach((function(e){t.vueInstance.config[e]=t.basicOptions.vueConfig[e]}))}},{key:"mount",value:function(){return(0,A.default)("RK-WEB-CORE",u.version),{version:u.version,router:this.routerInstance,store:this.storeInstance,resetRouter:(0,h.pkRouter)(this.basicRouter),request:this.getRequestInstance(),axios:v.default,vueInstance:this.vueInstance,bootstrap:(0,m.noLogin)(this.routerInstance,this.basicOptions.authToken),action:M.default,utils:(0,S.default)(this.storeInstance,this.routerInstance,this.vueInstance)}}},{key:"loadMicro",value:function(){return{micro:w.default,microOne:x.microOne,microTwo:x.microTwo,microThree:x.microThree}}}]),t}(),D=function(t){t.use(y.default),t.use(P.default)};"undefined"!=typeof window&&window.Vue&&D(window.Vue),y.default.install=function(t){t.component(y.default.name,y.default)},P.default.install=function(t){t.component(P.default.name,P.default)};e.install=D,e.AppLayout=y.default,e.GMap=_.GMap,e.Request=p.default,e.frameInterface=C,e.appTrack=function(t,e){return(0,T.default)(t,e,null,!1)},e.BlockView=L.default,e.RkVersionList=P.default,e.default=function(t,e){return new B(t,e)}},function(t,e,n){t.exports={default:n(157),__esModule:!0}},function(t,e,n){t.exports=!n(11)&&!n(23)((function(){return 7!=Object.defineProperty(n(68)("div"),"a",{get:function(){return 7}}).a}))},function(t,e,n){t.exports=n(21)},function(t,e,n){var r=n(24),i=n(25),o=n(161)(!1),a=n(72)("IE_PROTO");t.exports=function(t,e){var n,s=i(t),c=0,u=[];for(n in s)n!=a&&r(s,n)&&u.push(n);for(;e.length>c;)r(s,n=e[c++])&&(~o(u,n)||u.push(n));return u}},function(t,e,n){var r=n(7).document;t.exports=r&&r.documentElement},function(t,e,n){var r=n(24),i=n(26),o=n(72)("IE_PROTO"),a=Object.prototype;t.exports=Object.getPrototypeOf||function(t){return t=i(t),r(t,o)?t[o]:"function"==typeof t.constructor&&t instanceof t.constructor?t.constructor.prototype:t instanceof Object?a:null}},function(t,e,n){var r=n(18);t.exports=function(t,e,n,i){try{return i?e(r(n)[0],n[1]):e(n)}catch(e){var o=t.return;throw void 0!==o&&r(o.call(t)),e}}},function(t,e,n){var r=n(32),i=n(8)("iterator"),o=Array.prototype;t.exports=function(t){return void 0!==t&&(r.Array===t||o[i]===t)}},function(t,e,n){var r=n(8)("iterator"),i=!1;try{var o=[7][r]();o.return=function(){i=!0},Array.from(o,(function(){throw 2}))}catch(t){}t.exports=function(t,e){if(!e&&!i)return!1;var n=!1;try{var o=[7],a=o[r]();a.next=function(){return{done:n=!0}},o[r]=function(){return a},t(o)}catch(t){}return n}},function(t,e,n){var r=n(4),i=n(1),o=n(23);t.exports=function(t,e){var n=(i.Object||{})[t]||Object[t],a={};a[t]=e(n),r(r.S+r.F*o((function(){n(1)})),"Object",a)}},function(t,e,n){t.exports={default:n(171),__esModule:!0}},function(t,e){t.exports=function(t,e){return{value:e,done:!!t}}},function(t,e,n){var r=n(44);t.exports=Array.isArray||function(t){return"Array"==r(t)}},function(t,e,n){var r=n(105),i=n(74).concat("length","prototype");e.f=Object.getOwnPropertyNames||function(t){return r(t,i)}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=a(n(197)),i=a(n(200)),o=a(n(201));function a(t){return t&&t.__esModule?t:{default:t}}e.default=function(t){if(!(0,o.default)(t)||"[object Object]"!=(0,i.default)(t))return!1;if(null===(0,r.default)(t))return!0;for(var e=t;null!==(0,r.default)(e);)e=(0,r.default)(e);return(0,r.default)(t)===e}},function(t,e,n){"use strict";n.r(e),function(t){var n=function(){if("undefined"!=typeof Map)return Map;function t(t,e){var n=-1;return t.some((function(t,r){return t[0]===e&&(n=r,!0)})),n}return function(){function e(){this.__entries__=[]}return Object.defineProperty(e.prototype,"size",{get:function(){return this.__entries__.length},enumerable:!0,configurable:!0}),e.prototype.get=function(e){var n=t(this.__entries__,e),r=this.__entries__[n];return r&&r[1]},e.prototype.set=function(e,n){var r=t(this.__entries__,e);~r?this.__entries__[r][1]=n:this.__entries__.push([e,n])},e.prototype.delete=function(e){var n=this.__entries__,r=t(n,e);~r&&n.splice(r,1)},e.prototype.has=function(e){return!!~t(this.__entries__,e)},e.prototype.clear=function(){this.__entries__.splice(0)},e.prototype.forEach=function(t,e){void 0===e&&(e=null);for(var n=0,r=this.__entries__;n<r.length;n++){var i=r[n];t.call(e,i[1],i[0])}},e}()}(),r="undefined"!=typeof window&&"undefined"!=typeof document&&window.document===document,i=void 0!==t&&t.Math===Math?t:"undefined"!=typeof self&&self.Math===Math?self:"undefined"!=typeof window&&window.Math===Math?window:Function("return this")(),o="function"==typeof requestAnimationFrame?requestAnimationFrame.bind(i):function(t){return setTimeout((function(){return t(Date.now())}),1e3/60)};var a=["top","right","bottom","left","width","height","size","weight"],s="undefined"!=typeof MutationObserver,c=function(){function t(){this.connected_=!1,this.mutationEventsAdded_=!1,this.mutationsObserver_=null,this.observers_=[],this.onTransitionEnd_=this.onTransitionEnd_.bind(this),this.refresh=function(t,e){var n=!1,r=!1,i=0;function a(){n&&(n=!1,t()),r&&c()}function s(){o(a)}function c(){var t=Date.now();if(n){if(t-i<2)return;r=!0}else n=!0,r=!1,setTimeout(s,e);i=t}return c}(this.refresh.bind(this),20)}return t.prototype.addObserver=function(t){~this.observers_.indexOf(t)||this.observers_.push(t),this.connected_||this.connect_()},t.prototype.removeObserver=function(t){var e=this.observers_,n=e.indexOf(t);~n&&e.splice(n,1),!e.length&&this.connected_&&this.disconnect_()},t.prototype.refresh=function(){this.updateObservers_()&&this.refresh()},t.prototype.updateObservers_=function(){var t=this.observers_.filter((function(t){return t.gatherActive(),t.hasActive()}));return t.forEach((function(t){return t.broadcastActive()})),t.length>0},t.prototype.connect_=function(){r&&!this.connected_&&(document.addEventListener("transitionend",this.onTransitionEnd_),window.addEventListener("resize",this.refresh),s?(this.mutationsObserver_=new MutationObserver(this.refresh),this.mutationsObserver_.observe(document,{attributes:!0,childList:!0,characterData:!0,subtree:!0})):(document.addEventListener("DOMSubtreeModified",this.refresh),this.mutationEventsAdded_=!0),this.connected_=!0)},t.prototype.disconnect_=function(){r&&this.connected_&&(document.removeEventListener("transitionend",this.onTransitionEnd_),window.removeEventListener("resize",this.refresh),this.mutationsObserver_&&this.mutationsObserver_.disconnect(),this.mutationEventsAdded_&&document.removeEventListener("DOMSubtreeModified",this.refresh),this.mutationsObserver_=null,this.mutationEventsAdded_=!1,this.connected_=!1)},t.prototype.onTransitionEnd_=function(t){var e=t.propertyName,n=void 0===e?"":e;a.some((function(t){return!!~n.indexOf(t)}))&&this.refresh()},t.getInstance=function(){return this.instance_||(this.instance_=new t),this.instance_},t.instance_=null,t}(),u=function(t,e){for(var n=0,r=Object.keys(e);n<r.length;n++){var i=r[n];Object.defineProperty(t,i,{value:e[i],enumerable:!1,writable:!1,configurable:!0})}return t},l=function(t){return t&&t.ownerDocument&&t.ownerDocument.defaultView||i},h=v(0,0,0,0);function f(t){return parseFloat(t)||0}function d(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];return e.reduce((function(e,n){return e+f(t["border-"+n+"-width"])}),0)}function p(t){var e=t.clientWidth,n=t.clientHeight;if(!e&&!n)return h;var r=l(t).getComputedStyle(t),i=function(t){for(var e={},n=0,r=["top","right","bottom","left"];n<r.length;n++){var i=r[n],o=t["padding-"+i];e[i]=f(o)}return e}(r),o=i.left+i.right,a=i.top+i.bottom,s=f(r.width),c=f(r.height);if("border-box"===r.boxSizing&&(Math.round(s+o)!==e&&(s-=d(r,"left","right")+o),Math.round(c+a)!==n&&(c-=d(r,"top","bottom")+a)),!function(t){return t===l(t).document.documentElement}(t)){var u=Math.round(s+o)-e,p=Math.round(c+a)-n;1!==Math.abs(u)&&(s-=u),1!==Math.abs(p)&&(c-=p)}return v(i.left,i.top,s,c)}var m="undefined"!=typeof SVGGraphicsElement?function(t){return t instanceof l(t).SVGGraphicsElement}:function(t){return t instanceof l(t).SVGElement&&"function"==typeof t.getBBox};function g(t){return r?m(t)?function(t){var e=t.getBBox();return v(0,0,e.width,e.height)}(t):p(t):h}function v(t,e,n,r){return{x:t,y:e,width:n,height:r}}var y=function(){function t(t){this.broadcastWidth=0,this.broadcastHeight=0,this.contentRect_=v(0,0,0,0),this.target=t}return t.prototype.isActive=function(){var t=g(this.target);return this.contentRect_=t,t.width!==this.broadcastWidth||t.height!==this.broadcastHeight},t.prototype.broadcastRect=function(){var t=this.contentRect_;return this.broadcastWidth=t.width,this.broadcastHeight=t.height,t},t}(),_=function(t,e){var n,r,i,o,a,s,c,l=(r=(n=e).x,i=n.y,o=n.width,a=n.height,s="undefined"!=typeof DOMRectReadOnly?DOMRectReadOnly:Object,c=Object.create(s.prototype),u(c,{x:r,y:i,width:o,height:a,top:i,right:r+o,bottom:a+i,left:r}),c);u(this,{target:t,contentRect:l})},b=function(){function t(t,e,r){if(this.activeObservations_=[],this.observations_=new n,"function"!=typeof t)throw new TypeError("The callback provided as parameter 1 is not a function.");this.callback_=t,this.controller_=e,this.callbackCtx_=r}return t.prototype.observe=function(t){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if("undefined"!=typeof Element&&Element instanceof Object){if(!(t instanceof l(t).Element))throw new TypeError('parameter 1 is not of type "Element".');var e=this.observations_;e.has(t)||(e.set(t,new y(t)),this.controller_.addObserver(this),this.controller_.refresh())}},t.prototype.unobserve=function(t){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if("undefined"!=typeof Element&&Element instanceof Object){if(!(t instanceof l(t).Element))throw new TypeError('parameter 1 is not of type "Element".');var e=this.observations_;e.has(t)&&(e.delete(t),e.size||this.controller_.removeObserver(this))}},t.prototype.disconnect=function(){this.clearActive(),this.observations_.clear(),this.controller_.removeObserver(this)},t.prototype.gatherActive=function(){var t=this;this.clearActive(),this.observations_.forEach((function(e){e.isActive()&&t.activeObservations_.push(e)}))},t.prototype.broadcastActive=function(){if(this.hasActive()){var t=this.callbackCtx_,e=this.activeObservations_.map((function(t){return new _(t.target,t.broadcastRect())}));this.callback_.call(t,e,t),this.clearActive()}},t.prototype.clearActive=function(){this.activeObservations_.splice(0)},t.prototype.hasActive=function(){return this.activeObservations_.length>0},t}(),x="undefined"!=typeof WeakMap?new WeakMap:new n,w=function t(e){if(!(this instanceof t))throw new TypeError("Cannot call a class as a function.");if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");var n=c.getInstance(),r=new b(e,n,this);x.set(this,r)};["observe","unobserve","disconnect"].forEach((function(t){w.prototype[t]=function(){var e;return(e=x.get(this))[t].apply(e,arguments)}}));var M=void 0!==i.ResizeObserver?i.ResizeObserver:w;e.default=M}.call(this,n(15))},function(t,e,n){(function(t){var r=void 0!==t&&t||"undefined"!=typeof self&&self||window,i=Function.prototype.apply;function o(t,e){this._id=t,this._clearFn=e}e.setTimeout=function(){return new o(i.call(setTimeout,r,arguments),clearTimeout)},e.setInterval=function(){return new o(i.call(setInterval,r,arguments),clearInterval)},e.clearTimeout=e.clearInterval=function(t){t&&t.close()},o.prototype.unref=o.prototype.ref=function(){},o.prototype.close=function(){this._clearFn.call(r,this._id)},e.enroll=function(t,e){clearTimeout(t._idleTimeoutId),t._idleTimeout=e},e.unenroll=function(t){clearTimeout(t._idleTimeoutId),t._idleTimeout=-1},e._unrefActive=e.active=function(t){clearTimeout(t._idleTimeoutId);var e=t._idleTimeout;e>=0&&(t._idleTimeoutId=setTimeout((function(){t._onTimeout&&t._onTimeout()}),e))},n(212),e.setImmediate="undefined"!=typeof self&&self.setImmediate||void 0!==t&&t.setImmediate||this&&this.setImmediate,e.clearImmediate="undefined"!=typeof self&&self.clearImmediate||void 0!==t&&t.clearImmediate||this&&this.clearImmediate}).call(this,n(15))},function(t,e){var n,r,i=t.exports={};function o(){throw new Error("setTimeout has not been defined")}function a(){throw new Error("clearTimeout has not been defined")}function s(t){if(n===setTimeout)return setTimeout(t,0);if((n===o||!n)&&setTimeout)return n=setTimeout,setTimeout(t,0);try{return n(t,0)}catch(e){try{return n.call(null,t,0)}catch(e){return n.call(this,t,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:o}catch(t){n=o}try{r="function"==typeof clearTimeout?clearTimeout:a}catch(t){r=a}}();var c,u=[],l=!1,h=-1;function f(){l&&c&&(l=!1,c.length?u=c.concat(u):h=-1,u.length&&d())}function d(){if(!l){var t=s(f);l=!0;for(var e=u.length;e;){for(c=u,u=[];++h<e;)c&&c[h].run();h=-1,e=u.length}c=null,l=!1,function(t){if(r===clearTimeout)return clearTimeout(t);if((r===a||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(t);try{r(t)}catch(e){try{return r.call(null,t)}catch(e){return r.call(this,t)}}}(t)}}function p(t,e){this.fun=t,this.array=e}function m(){}i.nextTick=function(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)e[n-1]=arguments[n];u.push(new p(t,e)),1!==u.length||l||s(d)},p.prototype.run=function(){this.fun.apply(null,this.array)},i.title="browser",i.browser=!0,i.env={},i.argv=[],i.version="",i.versions={},i.on=m,i.addListener=m,i.once=m,i.off=m,i.removeListener=m,i.removeAllListeners=m,i.emit=m,i.prependListener=m,i.prependOnceListener=m,i.listeners=function(t){return[]},i.binding=function(t){throw new Error("process.binding is not supported")},i.cwd=function(){return"/"},i.chdir=function(t){throw new Error("process.chdir is not supported")},i.umask=function(){return 0}},function(t,e,n){t.exports={default:n(214),__esModule:!0}},function(t,e,n){var r=n(18),i=n(42),o=n(8)("species");t.exports=function(t,e){var n,a=r(t).constructor;return void 0===a||null==(n=r(a)[o])?e:i(n)}},function(t,e,n){var r,i,o,a=n(20),s=n(222),c=n(106),u=n(68),l=n(7),h=l.process,f=l.setImmediate,d=l.clearImmediate,p=l.MessageChannel,m=l.Dispatch,g=0,v={},y=function(){var t=+this;if(v.hasOwnProperty(t)){var e=v[t];delete v[t],e()}},_=function(t){y.call(t.data)};f&&d||(f=function(t){for(var e=[],n=1;arguments.length>n;)e.push(arguments[n++]);return v[++g]=function(){s("function"==typeof t?t:Function(t),e)},r(g),g},d=function(t){delete v[t]},"process"==n(44)(h)?r=function(t){h.nextTick(a(y,t,1))}:m&&m.now?r=function(t){m.now(a(y,t,1))}:p?(o=(i=new p).port2,i.port1.onmessage=_,r=a(o.postMessage,o,1)):l.addEventListener&&"function"==typeof postMessage&&!l.importScripts?(r=function(t){l.postMessage(t+"","*")},l.addEventListener("message",_,!1)):r="onreadystatechange"in u("script")?function(t){c.appendChild(u("script")).onreadystatechange=function(){c.removeChild(this),y.call(t)}}:function(t){setTimeout(a(y,t,1),0)}),t.exports={set:f,clear:d}},function(t,e){t.exports=function(t){try{return{e:!1,v:t()}}catch(t){return{e:!0,v:t}}}},function(t,e,n){var r=n(18),i=n(14),o=n(82);t.exports=function(t,e){if(r(t),i(e)&&e.constructor===t)return e;var n=o.f(t);return(0,n.resolve)(e),n.promise}},function(t,e,n){"use strict";var r=n(7),i=n(1),o=n(13),a=n(11),s=n(8)("species");t.exports=function(t){var e="function"==typeof i[t]?i[t]:r[t];a&&e&&!e[s]&&o.f(e,s,{configurable:!0,get:function(){return this}})}},function(t,e,n){t.exports=n(227)},function(t,e,n){"use strict";t.exports=function(t,e){return function(){for(var n=new Array(arguments.length),r=0;r<n.length;r++)n[r]=arguments[r];return t.apply(e,n)}}},function(t,e,n){"use strict";var r=n(5);function i(t){return encodeURIComponent(t).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}t.exports=function(t,e,n){if(!e)return t;var o;if(n)o=n(e);else if(r.isURLSearchParams(e))o=e.toString();else{var a=[];r.forEach(e,(function(t,e){null!=t&&(r.isArray(t)?e+="[]":t=[t],r.forEach(t,(function(t){r.isDate(t)?t=t.toISOString():r.isObject(t)&&(t=JSON.stringify(t)),a.push(i(e)+"="+i(t))})))})),o=a.join("&")}if(o){var s=t.indexOf("#");-1!==s&&(t=t.slice(0,s)),t+=(-1===t.indexOf("?")?"?":"&")+o}return t}},function(t,e,n){"use strict";t.exports={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1}},function(t,e,n){"use strict";(function(e){var r=n(5);t.exports=function(t,n){n=n||new FormData;var i=[];function o(t){return null===t?"":r.isDate(t)?t.toISOString():r.isArrayBuffer(t)||r.isTypedArray(t)?"function"==typeof Blob?new Blob([t]):e.from(t):t}return function t(e,a){if(r.isPlainObject(e)||r.isArray(e)){if(-1!==i.indexOf(e))throw Error("Circular reference detected in "+a);i.push(e),r.forEach(e,(function(e,i){if(!r.isUndefined(e)){var s,c=a?a+"."+i:i;if(e&&!a&&"object"==typeof e)if(r.endsWith(i,"{}"))e=JSON.stringify(e);else if(r.endsWith(i,"[]")&&(s=r.toArray(e)))return void s.forEach((function(t){!r.isUndefined(t)&&n.append(c,o(t))}));t(e,c)}})),i.pop()}else n.append(a,o(e))}(t),n}}).call(this,n(233).Buffer)},function(t,e,n){"use strict";var r=n(5),i=n(237),o=n(238),a=n(128),s=n(132),c=n(241),u=n(242),l=n(129),h=n(36),f=n(56),d=n(243);t.exports=function(t){return new Promise((function(e,n){var p,m=t.data,g=t.headers,v=t.responseType;function y(){t.cancelToken&&t.cancelToken.unsubscribe(p),t.signal&&t.signal.removeEventListener("abort",p)}r.isFormData(m)&&r.isStandardBrowserEnv()&&delete g["Content-Type"];var _=new XMLHttpRequest;if(t.auth){var b=t.auth.username||"",x=t.auth.password?unescape(encodeURIComponent(t.auth.password)):"";g.Authorization="Basic "+btoa(b+":"+x)}var w=s(t.baseURL,t.url);function M(){if(_){var r="getAllResponseHeaders"in _?c(_.getAllResponseHeaders()):null,o={data:v&&"text"!==v&&"json"!==v?_.response:_.responseText,status:_.status,statusText:_.statusText,headers:r,config:t,request:_};i((function(t){e(t),y()}),(function(t){n(t),y()}),o),_=null}}if(_.open(t.method.toUpperCase(),a(w,t.params,t.paramsSerializer),!0),_.timeout=t.timeout,"onloadend"in _?_.onloadend=M:_.onreadystatechange=function(){_&&4===_.readyState&&(0!==_.status||_.responseURL&&0===_.responseURL.indexOf("file:"))&&setTimeout(M)},_.onabort=function(){_&&(n(new h("Request aborted",h.ECONNABORTED,t,_)),_=null)},_.onerror=function(){n(new h("Network Error",h.ERR_NETWORK,t,_,_)),_=null},_.ontimeout=function(){var e=t.timeout?"timeout of "+t.timeout+"ms exceeded":"timeout exceeded",r=t.transitional||l;t.timeoutErrorMessage&&(e=t.timeoutErrorMessage),n(new h(e,r.clarifyTimeoutError?h.ETIMEDOUT:h.ECONNABORTED,t,_)),_=null},r.isStandardBrowserEnv()){var S=(t.withCredentials||u(w))&&t.xsrfCookieName?o.read(t.xsrfCookieName):void 0;S&&(g[t.xsrfHeaderName]=S)}"setRequestHeader"in _&&r.forEach(g,(function(t,e){void 0===m&&"content-type"===e.toLowerCase()?delete g[e]:_.setRequestHeader(e,t)})),r.isUndefined(t.withCredentials)||(_.withCredentials=!!t.withCredentials),v&&"json"!==v&&(_.responseType=t.responseType),"function"==typeof t.onDownloadProgress&&_.addEventListener("progress",t.onDownloadProgress),"function"==typeof t.onUploadProgress&&_.upload&&_.upload.addEventListener("progress",t.onUploadProgress),(t.cancelToken||t.signal)&&(p=function(t){_&&(n(!t||t&&t.type?new f:t),_.abort(),_=null)},t.cancelToken&&t.cancelToken.subscribe(p),t.signal&&(t.signal.aborted?p():t.signal.addEventListener("abort",p))),m||(m=null);var A=d(w);A&&-1===["http","https","file"].indexOf(A)?n(new h("Unsupported protocol "+A+":",h.ERR_BAD_REQUEST,t)):_.send(m)}))}},function(t,e,n){"use strict";var r=n(239),i=n(240);t.exports=function(t,e){return t&&!r(e)?i(t,e):e}},function(t,e,n){"use strict";t.exports=function(t){return!(!t||!t.__CANCEL__)}},function(t,e,n){"use strict";var r=n(5);t.exports=function(t,e){e=e||{};var n={};function i(t,e){return r.isPlainObject(t)&&r.isPlainObject(e)?r.merge(t,e):r.isPlainObject(e)?r.merge({},e):r.isArray(e)?e.slice():e}function o(n){return r.isUndefined(e[n])?r.isUndefined(t[n])?void 0:i(void 0,t[n]):i(t[n],e[n])}function a(t){if(!r.isUndefined(e[t]))return i(void 0,e[t])}function s(n){return r.isUndefined(e[n])?r.isUndefined(t[n])?void 0:i(void 0,t[n]):i(void 0,e[n])}function c(n){return n in e?i(t[n],e[n]):n in t?i(void 0,t[n]):void 0}var u={url:a,method:a,data:a,baseURL:s,transformRequest:s,transformResponse:s,paramsSerializer:s,timeout:s,timeoutMessage:s,withCredentials:s,adapter:s,responseType:s,xsrfCookieName:s,xsrfHeaderName:s,onUploadProgress:s,onDownloadProgress:s,decompress:s,maxContentLength:s,maxBodyLength:s,beforeRedirect:s,transport:s,httpAgent:s,httpsAgent:s,cancelToken:s,socketPath:s,responseEncoding:s,validateStatus:c};return r.forEach(Object.keys(t).concat(Object.keys(e)),(function(t){var e=u[t]||o,i=e(t);r.isUndefined(i)&&e!==c||(n[t]=i)})),n}},function(t,e){t.exports={version:"0.27.2"}},function(t,e,n){"use strict";var r=n(87),i=Object.prototype.hasOwnProperty,o=Array.isArray,a=function(){for(var t=[],e=0;e<256;++e)t.push("%"+((e<16?"0":"")+e.toString(16)).toUpperCase());return t}(),s=function(t,e){for(var n=e&&e.plainObjects?Object.create(null):{},r=0;r<t.length;++r)void 0!==t[r]&&(n[r]=t[r]);return n};t.exports={arrayToObject:s,assign:function(t,e){return Object.keys(e).reduce((function(t,n){return t[n]=e[n],t}),t)},combine:function(t,e){return[].concat(t,e)},compact:function(t){for(var e=[{obj:{o:t},prop:"o"}],n=[],r=0;r<e.length;++r)for(var i=e[r],a=i.obj[i.prop],s=Object.keys(a),c=0;c<s.length;++c){var u=s[c],l=a[u];"object"==typeof l&&null!==l&&-1===n.indexOf(l)&&(e.push({obj:a,prop:u}),n.push(l))}return function(t){for(;t.length>1;){var e=t.pop(),n=e.obj[e.prop];if(o(n)){for(var r=[],i=0;i<n.length;++i)void 0!==n[i]&&r.push(n[i]);e.obj[e.prop]=r}}}(e),t},decode:function(t,e,n){var r=t.replace(/\+/g," ");if("iso-8859-1"===n)return r.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(r)}catch(t){return r}},encode:function(t,e,n,i,o){if(0===t.length)return t;var s=t;if("symbol"==typeof t?s=Symbol.prototype.toString.call(t):"string"!=typeof t&&(s=String(t)),"iso-8859-1"===n)return escape(s).replace(/%u[0-9a-f]{4}/gi,(function(t){return"%26%23"+parseInt(t.slice(2),16)+"%3B"}));for(var c="",u=0;u<s.length;++u){var l=s.charCodeAt(u);45===l||46===l||95===l||126===l||l>=48&&l<=57||l>=65&&l<=90||l>=97&&l<=122||o===r.RFC1738&&(40===l||41===l)?c+=s.charAt(u):l<128?c+=a[l]:l<2048?c+=a[192|l>>6]+a[128|63&l]:l<55296||l>=57344?c+=a[224|l>>12]+a[128|l>>6&63]+a[128|63&l]:(u+=1,l=65536+((1023&l)<<10|1023&s.charCodeAt(u)),c+=a[240|l>>18]+a[128|l>>12&63]+a[128|l>>6&63]+a[128|63&l])}return c},isBuffer:function(t){return!(!t||"object"!=typeof t)&&!!(t.constructor&&t.constructor.isBuffer&&t.constructor.isBuffer(t))},isRegExp:function(t){return"[object RegExp]"===Object.prototype.toString.call(t)},maybeMap:function(t,e){if(o(t)){for(var n=[],r=0;r<t.length;r+=1)n.push(e(t[r]));return n}return e(t)},merge:function t(e,n,r){if(!n)return e;if("object"!=typeof n){if(o(e))e.push(n);else{if(!e||"object"!=typeof e)return[e,n];(r&&(r.plainObjects||r.allowPrototypes)||!i.call(Object.prototype,n))&&(e[n]=!0)}return e}if(!e||"object"!=typeof e)return[e].concat(n);var a=e;return o(e)&&!o(n)&&(a=s(e,r)),o(e)&&o(n)?(n.forEach((function(n,o){if(i.call(e,o)){var a=e[o];a&&"object"==typeof a&&n&&"object"==typeof n?e[o]=t(a,n,r):e.push(n)}else e[o]=n})),e):Object.keys(n).reduce((function(e,o){var a=n[o];return i.call(e,o)?e[o]=t(e[o],a,r):e[o]=a,e}),a)}}},function(t,e,n){var r=n(38),i=r.slice,o=r.pluck,a=r.each,s=r.bind,c=r.create,u=r.isList,l=r.isFunction,h=r.isObject;t.exports={createStore:d};var f={version:"2.0.12",enabled:!1,get:function(t,e){var n=this.storage.read(this._namespacePrefix+t);return this._deserialize(n,e)},set:function(t,e){return void 0===e?this.remove(t):(this.storage.write(this._namespacePrefix+t,this._serialize(e)),e)},remove:function(t){this.storage.remove(this._namespacePrefix+t)},each:function(t){var e=this;this.storage.each((function(n,r){t.call(e,e._deserialize(n),(r||"").replace(e._namespaceRegexp,""))}))},clearAll:function(){this.storage.clearAll()},hasNamespace:function(t){return this._namespacePrefix=="__storejs_"+t+"_"},createStore:function(){return d.apply(this,arguments)},addPlugin:function(t){this._addPlugin(t)},namespace:function(t){return d(this.storage,this.plugins,t)}};function d(t,e,n){n||(n=""),t&&!u(t)&&(t=[t]),e&&!u(e)&&(e=[e]);var r=n?"__storejs_"+n+"_":"",d=n?new RegExp("^"+r):null;if(!/^[a-zA-Z0-9_\-]*$/.test(n))throw new Error("store.js namespaces can only have alphanumerics + underscores and dashes");var p=c({_namespacePrefix:r,_namespaceRegexp:d,_testStorage:function(t){try{var e="__storejs__test__";t.write(e,e);var n=t.read(e)===e;return t.remove(e),n}catch(t){return!1}},_assignPluginFnProp:function(t,e){var n=this[e];this[e]=function(){var e=i(arguments,0),r=this;function o(){if(n)return a(arguments,(function(t,n){e[n]=t})),n.apply(r,e)}var s=[o].concat(e);return t.apply(r,s)}},_serialize:function(t){return JSON.stringify(t)},_deserialize:function(t,e){if(!t)return e;var n="";try{n=JSON.parse(t)}catch(e){n=t}return void 0!==n?n:e},_addStorage:function(t){this.enabled||this._testStorage(t)&&(this.storage=t,this.enabled=!0)},_addPlugin:function(t){var e=this;if(u(t))a(t,(function(t){e._addPlugin(t)}));else if(!o(this.plugins,(function(e){return t===e}))){if(this.plugins.push(t),!l(t))throw new Error("Plugins must be function values that return objects");var n=t.call(this);if(!h(n))throw new Error("Plugins must return an object of function properties");a(n,(function(n,r){if(!l(n))throw new Error("Bad plugin property: "+r+" from plugin "+t.name+". Plugins should only return functions.");e._assignPluginFnProp(n,r)}))}},addStorage:function(t){!function(){var t="undefined"==typeof console?null:console;if(t){var e=t.warn?t.warn:t.log;e.apply(t,arguments)}}("store.addStorage(storage) is deprecated. Use createStore([storages])"),this._addStorage(t)}},f,{plugins:[]});return p.raw={},a(p,(function(t,e){l(t)&&(p.raw[e]=s(p,t))})),a(t,(function(t){p._addStorage(t)})),a(e,(function(t){p._addPlugin(t)})),p}},function(t,e,n){var r=n(137),i=n(260),o=[n(264)];t.exports=r.createStore(i,o)},function(t,e,n){var r=n(38).Global;function i(){return r.localStorage}function o(t){return i().getItem(t)}t.exports={name:"localStorage",read:o,write:function(t,e){return i().setItem(t,e)},each:function(t){for(var e=i().length-1;e>=0;e--){var n=i().key(e);t(o(n),n)}},remove:function(t){return i().removeItem(t)},clearAll:function(){return i().clear()}}},function(t,e,n){var r=n(38),i=r.Global,o=r.trim;t.exports={name:"cookieStorage",read:function(t){if(!t||!u(t))return null;var e="(?:^|.*;\\s*)"+escape(t).replace(/[\-\.\+\*]/g,"\\$&")+"\\s*\\=\\s*((?:[^;](?!;))*[^;]?).*";return unescape(a.cookie.replace(new RegExp(e),"$1"))},write:function(t,e){if(!t)return;a.cookie=escape(t)+"="+escape(e)+"; expires=Tue, 19 Jan 2038 03:14:07 GMT; path=/"},each:s,remove:c,clearAll:function(){s((function(t,e){c(e)}))}};var a=i.document;function s(t){for(var e=a.cookie.split(/; ?/g),n=e.length-1;n>=0;n--)if(o(e[n])){var r=e[n].split("="),i=unescape(r[0]);t(unescape(r[1]),i)}}function c(t){t&&u(t)&&(a.cookie=escape(t)+"=; expires=Thu, 01 Jan 1970 00:00:00 GMT; path=/")}function u(t){return new RegExp("(?:^|;\\s*)"+escape(t).replace(/[\-\.\+\*]/g,"\\$&")+"\\s*\\=").test(a.cookie)}},function(t,e,n){var r=n(38).Global;function i(){return r.sessionStorage}function o(t){return i().getItem(t)}t.exports={name:"sessionStorage",read:o,write:function(t,e){return i().setItem(t,e)},each:function(t){for(var e=i().length-1;e>=0;e--){var n=i().key(e);t(o(n),n)}},remove:function(t){return i().removeItem(t)},clearAll:function(){return i().clear()}}},function(t,e,n){t.exports={default:n(267),__esModule:!0}},function(t,e,n){var r=n(11),i=n(33),o=n(25),a=n(46).f;t.exports=function(t){return function(e){for(var n,s=o(e),c=i(s),u=c.length,l=0,h=[];u>l;)n=c[l++],r&&!a.call(s,n)||h.push(t?[n,s[n]]:s[n]);return h}}},function(t,e,n){"use strict";e.__esModule=!0;var r=o(n(269)),i=o(n(34));function o(t){return t&&t.__esModule?t:{default:t}}e.default=function(t,e){if(Array.isArray(t))return t;if((0,r.default)(Object(t)))return function(t,e){var n=[],r=!0,o=!1,a=void 0;try{for(var s,c=(0,i.default)(t);!(r=(s=c.next()).done)&&(n.push(s.value),!e||n.length!==e);r=!0);}catch(t){o=!0,a=t}finally{try{!r&&c.return&&c.return()}finally{if(o)throw a}}return n}(t,e);throw new TypeError("Invalid attempt to destructure non-iterable instance")}},function(t,e,n){var r=n(272),i=n(277),o=n(279),a=Function.prototype,s=Object.prototype,c=a.toString,u=s.hasOwnProperty,l=c.call(Object);t.exports=function(t){if(!o(t)||"[object Object]"!=r(t))return!1;var e=i(t);if(null===e)return!0;var n=u.call(e,"constructor")&&e.constructor;return"function"==typeof n&&n instanceof n&&c.call(n)==l}},function(t,e,n){var r=n(273).Symbol;t.exports=r},function(t,e,n){"use strict";function r(t,e,n,r,i,o,a,s){var c,u="function"==typeof t?t.options:t;if(e&&(u.render=e,u.staticRenderFns=n,u._compiled=!0),r&&(u.functional=!0),o&&(u._scopeId="data-v-"+o),a?(c=function(t){(t=t||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext)||"undefined"==typeof __VUE_SSR_CONTEXT__||(t=__VUE_SSR_CONTEXT__),i&&i.call(this,t),t&&t._registeredComponents&&t._registeredComponents.add(a)},u._ssrRegister=c):i&&(c=s?function(){i.call(this,(u.functional?this.parent:this).$root.$options.shadowRoot)}:i),c)if(u.functional){u._injectStyles=c;var l=u.render;u.render=function(t,e){return c.call(e),l(t,e)}}else{var h=u.beforeCreate;u.beforeCreate=h?[].concat(h,c):[c]}return{exports:t,options:u}}n.d(e,"a",(function(){return r}))},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.PopupManager=void 0;var r=c(n(16)),i=c(n(149)),o=c(n(282)),a=c(n(283)),s=n(57);function c(t){return t&&t.__esModule?t:{default:t}}var u=1,l=void 0;e.default={props:{visible:{type:Boolean,default:!1},openDelay:{},closeDelay:{},zIndex:{},modal:{type:Boolean,default:!1},modalFade:{type:Boolean,default:!0},modalClass:{},modalAppendToBody:{type:Boolean,default:!1},lockScroll:{type:Boolean,default:!0},closeOnPressEscape:{type:Boolean,default:!1},closeOnClickModal:{type:Boolean,default:!1}},beforeMount:function(){this._popupId="popup-"+u++,o.default.register(this._popupId,this)},beforeDestroy:function(){o.default.deregister(this._popupId),o.default.closeModal(this._popupId),this.restoreBodyStyle()},data:function(){return{opened:!1,bodyPaddingRight:null,computedBodyPaddingRight:0,withoutHiddenClass:!0,rendered:!1}},watch:{visible:function(t){var e=this;if(t){if(this._opening)return;this.rendered?this.open():(this.rendered=!0,r.default.nextTick((function(){e.open()})))}else this.close()}},methods:{open:function(t){var e=this;this.rendered||(this.rendered=!0);var n=(0,i.default)({},this.$props||this,t);this._closeTimer&&(clearTimeout(this._closeTimer),this._closeTimer=null),clearTimeout(this._openTimer);var r=Number(n.openDelay);r>0?this._openTimer=setTimeout((function(){e._openTimer=null,e.doOpen(n)}),r):this.doOpen(n)},doOpen:function(t){if(!this.$isServer&&(!this.willOpen||this.willOpen())&&!this.opened){this._opening=!0;var e=this.$el,n=t.modal,r=t.zIndex;if(r&&(o.default.zIndex=r),n&&(this._closing&&(o.default.closeModal(this._popupId),this._closing=!1),o.default.openModal(this._popupId,o.default.nextZIndex(),this.modalAppendToBody?void 0:e,t.modalClass,t.modalFade),t.lockScroll)){this.withoutHiddenClass=!(0,s.hasClass)(document.body,"el-popup-parent--hidden"),this.withoutHiddenClass&&(this.bodyPaddingRight=document.body.style.paddingRight,this.computedBodyPaddingRight=parseInt((0,s.getStyle)(document.body,"paddingRight"),10)),l=(0,a.default)();var i=document.documentElement.clientHeight<document.body.scrollHeight,c=(0,s.getStyle)(document.body,"overflowY");l>0&&(i||"scroll"===c)&&this.withoutHiddenClass&&(document.body.style.paddingRight=this.computedBodyPaddingRight+l+"px"),(0,s.addClass)(document.body,"el-popup-parent--hidden")}"static"===getComputedStyle(e).position&&(e.style.position="absolute"),e.style.zIndex=o.default.nextZIndex(),this.opened=!0,this.onOpen&&this.onOpen(),this.doAfterOpen()}},doAfterOpen:function(){this._opening=!1},close:function(){var t=this;if(!this.willClose||this.willClose()){null!==this._openTimer&&(clearTimeout(this._openTimer),this._openTimer=null),clearTimeout(this._closeTimer);var e=Number(this.closeDelay);e>0?this._closeTimer=setTimeout((function(){t._closeTimer=null,t.doClose()}),e):this.doClose()}},doClose:function(){this._closing=!0,this.onClose&&this.onClose(),this.lockScroll&&setTimeout(this.restoreBodyStyle,200),this.opened=!1,this.doAfterClose()},doAfterClose:function(){o.default.closeModal(this._popupId),this._closing=!1},restoreBodyStyle:function(){this.modal&&this.withoutHiddenClass&&(document.body.style.paddingRight=this.bodyPaddingRight,(0,s.removeClass)(document.body,"el-popup-parent--hidden")),this.withoutHiddenClass=!0}}},e.PopupManager=o.default},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t){for(var e=1,n=arguments.length;e<n;e++){var r=arguments[e]||{};for(var i in r)if(r.hasOwnProperty(i)){var o=r[i];void 0!==o&&(t[i]=o)}}return t}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:300,r=arguments.length>3&&void 0!==arguments[3]&&arguments[3];if(!t||!e)throw new Error("instance & callback is required");var i=!1,o=function(){i||(i=!0,e&&e.apply(null,arguments))};r?t.$once("after-leave",o):t.$on("after-leave",o),setTimeout((function(){o()}),n+100)}},function(t,e,n){var r;t.exports=(r=n(0),function(t){var e=r,n=e.lib,i=n.WordArray,o=n.Hasher,a=e.algo,s=[],c=[];!function(){function e(e){for(var n=t.sqrt(e),r=2;r<=n;r++)if(!(e%r))return!1;return!0}function n(t){return 4294967296*(t-(0|t))|0}for(var r=2,i=0;i<64;)e(r)&&(i<8&&(s[i]=n(t.pow(r,.5))),c[i]=n(t.pow(r,1/3)),i++),r++}();var u=[],l=a.SHA256=o.extend({_doReset:function(){this._hash=new i.init(s.slice(0))},_doProcessBlock:function(t,e){for(var n=this._hash.words,r=n[0],i=n[1],o=n[2],a=n[3],s=n[4],l=n[5],h=n[6],f=n[7],d=0;d<64;d++){if(d<16)u[d]=0|t[e+d];else{var p=u[d-15],m=(p<<25|p>>>7)^(p<<14|p>>>18)^p>>>3,g=u[d-2],v=(g<<15|g>>>17)^(g<<13|g>>>19)^g>>>10;u[d]=m+u[d-7]+v+u[d-16]}var y=r&i^r&o^i&o,_=(r<<30|r>>>2)^(r<<19|r>>>13)^(r<<10|r>>>22),b=f+((s<<26|s>>>6)^(s<<21|s>>>11)^(s<<7|s>>>25))+(s&l^~s&h)+c[d]+u[d];f=h,h=l,l=s,s=a+b|0,a=o,o=i,i=r,r=b+(_+y)|0}n[0]=n[0]+r|0,n[1]=n[1]+i|0,n[2]=n[2]+o|0,n[3]=n[3]+a|0,n[4]=n[4]+s|0,n[5]=n[5]+l|0,n[6]=n[6]+h|0,n[7]=n[7]+f|0},_doFinalize:function(){var e=this._data,n=e.words,r=8*this._nDataBytes,i=8*e.sigBytes;return n[i>>>5]|=128<<24-i%32,n[14+(i+64>>>9<<4)]=t.floor(r/4294967296),n[15+(i+64>>>9<<4)]=r,e.sigBytes=4*n.length,this._process(),this._hash},clone:function(){var t=o.clone.call(this);return t._hash=this._hash.clone(),t}});e.SHA256=o._createHelper(l),e.HmacSHA256=o._createHmacHelper(l)}(Math),r.SHA256)},function(t,e,n){var r;t.exports=(r=n(0),n(58),function(){var t=r,e=t.lib.Hasher,n=t.x64,i=n.Word,o=n.WordArray,a=t.algo;function s(){return i.create.apply(i,arguments)}var c=[s(1116352408,3609767458),s(1899447441,602891725),s(3049323471,3964484399),s(3921009573,2173295548),s(961987163,4081628472),s(1508970993,3053834265),s(2453635748,2937671579),s(2870763221,3664609560),s(3624381080,2734883394),s(310598401,1164996542),s(607225278,1323610764),s(1426881987,3590304994),s(1925078388,4068182383),s(2162078206,991336113),s(2614888103,633803317),s(3248222580,3479774868),s(3835390401,2666613458),s(4022224774,944711139),s(264347078,2341262773),s(604807628,2007800933),s(770255983,1495990901),s(1249150122,1856431235),s(1555081692,3175218132),s(1996064986,2198950837),s(2554220882,3999719339),s(2821834349,766784016),s(2952996808,2566594879),s(3210313671,3203337956),s(3336571891,1034457026),s(3584528711,2466948901),s(113926993,3758326383),s(338241895,168717936),s(666307205,1188179964),s(773529912,1546045734),s(1294757372,1522805485),s(1396182291,2643833823),s(1695183700,2343527390),s(1986661051,1014477480),s(2177026350,1206759142),s(2456956037,344077627),s(2730485921,1290863460),s(2820302411,3158454273),s(3259730800,3505952657),s(3345764771,106217008),s(3516065817,3606008344),s(3600352804,1432725776),s(4094571909,1467031594),s(275423344,851169720),s(430227734,3100823752),s(506948616,1363258195),s(659060556,3750685593),s(883997877,3785050280),s(958139571,3318307427),s(1322822218,3812723403),s(1537002063,2003034995),s(1747873779,3602036899),s(1955562222,1575990012),s(2024104815,1125592928),s(2227730452,2716904306),s(2361852424,442776044),s(2428436474,593698344),s(2756734187,3733110249),s(3204031479,2999351573),s(3329325298,3815920427),s(3391569614,3928383900),s(3515267271,566280711),s(3940187606,3454069534),s(4118630271,4000239992),s(116418474,1914138554),s(174292421,2731055270),s(289380356,3203993006),s(460393269,320620315),s(685471733,587496836),s(852142971,1086792851),s(1017036298,365543100),s(1126000580,2618297676),s(1288033470,3409855158),s(1501505948,4234509866),s(1607167915,987167468),s(1816402316,1246189591)],u=[];!function(){for(var t=0;t<80;t++)u[t]=s()}();var l=a.SHA512=e.extend({_doReset:function(){this._hash=new o.init([new i.init(1779033703,4089235720),new i.init(3144134277,2227873595),new i.init(1013904242,4271175723),new i.init(2773480762,1595750129),new i.init(1359893119,2917565137),new i.init(2600822924,725511199),new i.init(528734635,4215389547),new i.init(1541459225,327033209)])},_doProcessBlock:function(t,e){for(var n=this._hash.words,r=n[0],i=n[1],o=n[2],a=n[3],s=n[4],l=n[5],h=n[6],f=n[7],d=r.high,p=r.low,m=i.high,g=i.low,v=o.high,y=o.low,_=a.high,b=a.low,x=s.high,w=s.low,M=l.high,S=l.low,A=h.high,E=h.low,C=f.high,T=f.low,I=d,P=p,L=m,R=g,O=v,k=y,B=_,D=b,F=x,j=w,U=M,N=S,z=A,G=E,H=C,W=T,V=0;V<80;V++){var Z,Q,X=u[V];if(V<16)Q=X.high=0|t[e+2*V],Z=X.low=0|t[e+2*V+1];else{var Y=u[V-15],J=Y.high,q=Y.low,K=(J>>>1|q<<31)^(J>>>8|q<<24)^J>>>7,$=(q>>>1|J<<31)^(q>>>8|J<<24)^(q>>>7|J<<25),tt=u[V-2],et=tt.high,nt=tt.low,rt=(et>>>19|nt<<13)^(et<<3|nt>>>29)^et>>>6,it=(nt>>>19|et<<13)^(nt<<3|et>>>29)^(nt>>>6|et<<26),ot=u[V-7],at=ot.high,st=ot.low,ct=u[V-16],ut=ct.high,lt=ct.low;Q=(Q=(Q=K+at+((Z=$+st)>>>0<$>>>0?1:0))+rt+((Z+=it)>>>0<it>>>0?1:0))+ut+((Z+=lt)>>>0<lt>>>0?1:0),X.high=Q,X.low=Z}var ht,ft=F&U^~F&z,dt=j&N^~j&G,pt=I&L^I&O^L&O,mt=P&R^P&k^R&k,gt=(I>>>28|P<<4)^(I<<30|P>>>2)^(I<<25|P>>>7),vt=(P>>>28|I<<4)^(P<<30|I>>>2)^(P<<25|I>>>7),yt=(F>>>14|j<<18)^(F>>>18|j<<14)^(F<<23|j>>>9),_t=(j>>>14|F<<18)^(j>>>18|F<<14)^(j<<23|F>>>9),bt=c[V],xt=bt.high,wt=bt.low,Mt=H+yt+((ht=W+_t)>>>0<W>>>0?1:0),St=vt+mt;H=z,W=G,z=U,G=N,U=F,N=j,F=B+(Mt=(Mt=(Mt=Mt+ft+((ht+=dt)>>>0<dt>>>0?1:0))+xt+((ht+=wt)>>>0<wt>>>0?1:0))+Q+((ht+=Z)>>>0<Z>>>0?1:0))+((j=D+ht|0)>>>0<D>>>0?1:0)|0,B=O,D=k,O=L,k=R,L=I,R=P,I=Mt+(gt+pt+(St>>>0<vt>>>0?1:0))+((P=ht+St|0)>>>0<ht>>>0?1:0)|0}p=r.low=p+P,r.high=d+I+(p>>>0<P>>>0?1:0),g=i.low=g+R,i.high=m+L+(g>>>0<R>>>0?1:0),y=o.low=y+k,o.high=v+O+(y>>>0<k>>>0?1:0),b=a.low=b+D,a.high=_+B+(b>>>0<D>>>0?1:0),w=s.low=w+j,s.high=x+F+(w>>>0<j>>>0?1:0),S=l.low=S+N,l.high=M+U+(S>>>0<N>>>0?1:0),E=h.low=E+G,h.high=A+z+(E>>>0<G>>>0?1:0),T=f.low=T+W,f.high=C+H+(T>>>0<W>>>0?1:0)},_doFinalize:function(){var t=this._data,e=t.words,n=8*this._nDataBytes,r=8*t.sigBytes;return e[r>>>5]|=128<<24-r%32,e[30+(r+128>>>10<<5)]=Math.floor(n/4294967296),e[31+(r+128>>>10<<5)]=n,t.sigBytes=4*e.length,this._process(),this._hash.toX32()},clone:function(){var t=e.clone.call(this);return t._hash=this._hash.clone(),t},blockSize:32});t.SHA512=e._createHelper(l),t.HmacSHA512=e._createHmacHelper(l)}(),r.SHA512)},function(t,e,n){var r=n(14);t.exports=function(t,e){if(!r(t)||t._t!==e)throw TypeError("Incompatible receiver, "+e+" required!");return t}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=p(n(12)),i=n(2),o=p(n(92)),a=n(3),s=p(n(93)),c=p(n(94)),u=p(n(348)),l=p(n(156)),h=p(n(353)),f=p(n(61)),d=p(n(155));function p(t){return t&&t.__esModule?t:{default:t}}e.default={name:"MapAndBasicHeader",inject:["slotsList","propsList"],props:{theme:{type:String,default:"light"},fixed:{type:Boolean,default:!1},navList:{type:Array,default:function(){return[]}}},data:function(){return{currentPath:void 0,currentIndex:0,overflowedItems:[],menuItemSizes:[]}},computed:{skin:function(){return this.$store.state.user.skin.color}},mounted:function(){var t=this;this.$watch("$route",(function(e){var n=e.matched;if(t.navList&&!(0,a.isEmpty)(t.navList)&&n.length){var r=(0,i.treeFindPath)(t.navList,(function(t){return t.meta.id===n[n.length-1].meta.id}));t.currentPath=r[0].path;var o=t.navList.findIndex((function(e){return e.path===t.currentPath}));t.currentIndex=o>-1?o:0}}),{immediate:!0,deep:!0})},watch:{skin:{handler:function(t){this.propsList.nav&&this.renderNavActive(t,d.default.toNum3(t))},immediate:!0}},methods:{setChildrenWidthAndResize:function(){if(this.navList&&!(0,a.isEmpty)(this.navList)){var t=this.navList.filter((function(t){return 1===t.type}));this.menuItemSizes=t,this.overflowedItems=[]}},onResize:function(t){var e=parseFloat(document.documentElement.style.fontSize)/100*120;if(this.navList&&!(0,a.isEmpty)(this.navList)){var n=this.navList.filter((function(t){return 1===t.type}));if(e*n.length-10>t.width){var r=Math.round(t.width/e);r>0?(this.menuItemSizes=n.slice(0,r-1),this.overflowedItems=n.slice(r-1,n.length)):(this.menuItemSizes=n,this.overflowedItems=[])}else this.menuItemSizes=n,this.overflowedItems=[];this.renderNavActive("#0F6EFF",[15,110,255])}},renderNavActive:function(t,e){var n=this;(0,a.isEmpty)(this.menuItemSizes)&&this.menuItemSizes.length<=1||this.$nextTick((function(){u.default.drawNav({index:n.currentIndex,canvas:document.getElementById("navCanvas"),navItem:document.querySelector(".rk-web-core-header-right-nav-item"),navCount:n.menuItemSizes.length,color:t,rgb:e})}))},renderNav:function(){var t=this,e=this.$createElement;return this.menuItemSizes&&!(0,a.isEmpty)(this.menuItemSizes)?this.menuItemSizes.map((function(n,o){var a="dark"!==t.theme?(0,r.default)([i.prefixCls+"-header-right-nav-item",n.path===t.currentPath?i.prefixCls+"-header-right-nav-active":""]):(0,r.default)([i.prefixCls+"-header-right-nav-item",i.prefixCls+"-header-dark-nav-item",n.path===t.currentPath?i.prefixCls+"-header-dark-nav-active":""]);return e("div",{class:a,ref:"navItem",on:{click:function(){return t.handleTap(n,o)}}},[n.meta.title])})):null},handleTap:function(t,e){var n=this;if(1===t.meta.chainType){var r=t.path.indexOf("http")>-1?t.path:"http://"+t.path;1!==t.meta.functionType&&(0,f.default)(this,{},null,!1),window.open(r)}else this.currentPath=t.path,this.$store.commit("user/SET_NAV_INDEX",e),this.$router.push(t.path).then((function(e){n.propsList.nav&&u.default._toggle(n.currentIndex),1!==t.meta.functionType&&(0,f.default)(n,{},null,!1)})),this.$emit("change",t)}},render:function(){var t=this,e=arguments[0],n=this.theme,u=this.fixed,f=this.slotsList,d=this.propsList,p=(0,r.default)([i.prefixCls+"-header",i.prefixCls+"-header-"+n,u?i.prefixCls+"-header-fixed":""]);return e("a-layout-header",{class:p},[e("div",{class:[i.prefixCls+"-header-"+n+"-inner",i.prefixCls+"-header-inner"]},[f.logo?f.logo:e(o.default,{attrs:{prefix:"basic",theme:n}}),f.prefix,e("div",{class:i.prefixCls+"-header-right",ref:"rightDom"},[d.nav?e(l.default,{on:{resize:function(e){return t.onResize(e)}}},[e("div",{class:[i.prefixCls+"-header-right-nav","dark"===n?i.prefixCls+"-header-dark":""]},[e("canvas",{attrs:{id:"navCanvas"},style:"position: absolute; z-index: -1"}),this.renderNav(),(0,a.isEmpty)(this.overflowedItems)?null:e(h.default,{attrs:{columns:this.overflowedItems}})])]):null,d.right?e("div",{class:i.prefixCls+"-header-right-extra"},[f.header,e(s.default,{attrs:{theme:n}}),f.extends,e(c.default,{attrs:{theme:n}})]):null]),f.suffix]),this.slotsList.headerBottom])}}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=o(n(27)),i=o(n(28));function o(t){return t&&t.__esModule?t:{default:t}}var a={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dodgerblue:"#1e90ff",feldspar:"#d19275",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",gold:"#ffd700",goldenrod:"#daa520",gray:"#808080",green:"#008000",greenyellow:"#adff2f",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavender:"#e6e6fa",lavenderblush:"#fff0f5",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgrey:"#d3d3d3",lightgreen:"#90ee90",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslateblue:"#8470ff",lightslategray:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370d8",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#d87093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",violetred:"#d02090",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"},s=function(){function t(){(0,r.default)(this,t)}return(0,i.default)(t,[{key:"formatColor",value:function(t,e){return t.indexOf("#")>-1?"rgba("+this.toNum3(t).toString()+","+e+")":a[t]?"rgba("+this.toNum3(a[t]).toString()+","+e+")":"rgba("+this.toNum3(t).toString()+","+e+")"}},{key:"isHex",value:function(t){return t.length>=4&&"#"===t[0]}},{key:"isRgb",value:function(t){return t.length>=10&&"rgb"===t.slice(0,3)}},{key:"isRgba",value:function(t){return t.length>=13&&"rgba"===t.slice(0,4)}},{key:"pad2",value:function(t){var e=t.toString(16);return 1===e.length&&(e="0"+e),e}},{key:"lighten",value:function(t,e){return this.mix("fff",t,e)}},{key:"darken",value:function(t,e){return this.mix("000",t,e)}},{key:"mix",value:function(t,e,n,r,i){t=this.dropPrefix(t),e=this.dropPrefix(e),void 0===n&&(n=.5),void 0===r&&(r=1),void 0===i&&(i=1);var o=2*n-1,a=r-i,s=((o*a==-1?o:(o+a)/(1+o*a))+1)/2,c=1-s,u=this.toNum3(t),l=this.toNum3(e),h=Math.round(s*u[0]+c*l[0]),f=Math.round(s*u[1]+c*l[1]),d=Math.round(s*u[2]+c*l[2]);return"#"+this.pad2(h)+this.pad2(f)+this.pad2(d)}},{key:"rgbaToRgb",value:function(t,e,n){return this.mix(t,n||"fff",.5,e,1-e)}},{key:"toNum3",value:function(t){return 3===(t=this.dropPrefix(t)).length&&(t=t[0]+t[0]+t[1]+t[1]+t[2]+t[2]),[parseInt(t.slice(0,2),16),parseInt(t.slice(2,4),16),parseInt(t.slice(4,6),16)]}},{key:"dropPrefix",value:function(t){return t.replace("#","")}},{key:"rrggbbToHsl",value:function(t){var e=this.toNum3(t),n=this.rgbToHsl.apply(0,e);return[n[0].toFixed(0),(100*n[1]).toFixed(3)+"%",(100*n[2]).toFixed(3)+"%"].join(",")}},{key:"rgbToHsl",value:function(t,e,n){var r=t/255,i=e/255,o=n/255,a=Math.max(r,i,o),s=Math.min(r,i,o),c=a-s,u=(a+s)/2,l=0,h=0;if(Math.abs(c)>1e-5){h=u<=.5?c/(a+s):c/(2-a-s);var f=(a-r)/c,d=(a-i)/c,p=(a-o)/c;l=r==a?p-d:i==a?2+f-p:4+d-f,(l*=60)<0&&(l+=360)}return[l,h,u]}}]),t}();e.default=new s},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r,i=n(117),o=(r=i)&&r.__esModule?r:{default:r},a=n(3);var s={name:"IepResizeObserver",props:{disabled:Boolean},data:function(){return this.currentElement=null,this.resizeObserver=null,{width:0,height:0}},mounted:function(){this.onComponentUpdated()},updated:function(){this.onComponentUpdated()},beforeDestroy:function(){this.destroyObserver()},methods:{onComponentUpdated:function(){if(this.$props.disabled)this.destroyObserver();else{var t=this.$el;t!==this.currentElement&&(this.destroyObserver(),this.currentElement=t),!this.resizeObserver&&t&&(this.resizeObserver=new o.default((0,a.debounce)(this.onResize,300)),this.resizeObserver.observe(t))}},onResize:function(t){var e=t[0].target.getBoundingClientRect(),n=e.width,r=e.height,i=Math.floor(n),o=Math.floor(r);if(this.width!==i||this.height!==o){var a={width:i,height:o};this.width=i,this.height=o,this.$emit("resize",a)}},destroyObserver:function(){this.resizeObserver&&(this.resizeObserver.disconnect(),this.resizeObserver=null)}},render:function(){return this.$slots.default[0]}};e.default=s},function(t,e,n){n(31),n(163),t.exports=n(1).Array.from},function(t,e,n){var r=n(65),i=n(66);t.exports=function(t){return function(e,n){var o,a,s=String(i(e)),c=r(n),u=s.length;return c<0||c>=u?t?"":void 0:(o=s.charCodeAt(c))<55296||o>56319||c+1===u||(a=s.charCodeAt(c+1))<56320||a>57343?t?s.charAt(c):o:t?s.slice(c,c+2):a-56320+(o-55296<<10)+65536}}},function(t,e,n){"use strict";var r=n(70),i=n(43),o=n(45),a={};n(21)(a,n(8)("iterator"),(function(){return this})),t.exports=function(t,e,n){t.prototype=r(a,{next:i(1,n)}),o(t,e+" Iterator")}},function(t,e,n){var r=n(13),i=n(18),o=n(33);t.exports=n(11)?Object.defineProperties:function(t,e){i(t);for(var n,a=o(e),s=a.length,c=0;s>c;)r.f(t,n=a[c++],e[n]);return t}},function(t,e,n){var r=n(25),i=n(52),o=n(162);t.exports=function(t){return function(e,n,a){var s,c=r(e),u=i(c.length),l=o(a,u);if(t&&n!=n){for(;u>l;)if((s=c[l++])!=s)return!0}else for(;u>l;l++)if((t||l in c)&&c[l]===n)return t||l||0;return!t&&-1}}},function(t,e,n){var r=n(65),i=Math.max,o=Math.min;t.exports=function(t,e){return(t=r(t))<0?i(t+e,0):o(t,e)}},function(t,e,n){"use strict";var r=n(20),i=n(4),o=n(26),a=n(108),s=n(109),c=n(52),u=n(164),l=n(75);i(i.S+i.F*!n(110)((function(t){Array.from(t)})),"Array",{from:function(t){var e,n,i,h,f=o(t),d="function"==typeof this?this:Array,p=arguments.length,m=p>1?arguments[1]:void 0,g=void 0!==m,v=0,y=l(f);if(g&&(m=r(m,p>2?arguments[2]:void 0,2)),null==y||d==Array&&s(y))for(n=new d(e=c(f.length));e>v;v++)u(n,v,g?m(f[v],v):f[v]);else for(h=y.call(f),n=new d;!(i=h.next()).done;v++)u(n,v,g?a(h,m,[i.value,v],!0):i.value);return n.length=v,n}})},function(t,e,n){"use strict";var r=n(13),i=n(43);t.exports=function(t,e,n){e in t?r.f(t,e,i(0,n)):t[e]=n}},function(t,e,n){t.exports={default:n(166),__esModule:!0}},function(t,e,n){n(167),t.exports=n(1).Object.assign},function(t,e,n){var r=n(4);r(r.S+r.F,"Object",{assign:n(168)})},function(t,e,n){"use strict";var r=n(11),i=n(33),o=n(76),a=n(46),s=n(26),c=n(71),u=Object.assign;t.exports=!u||n(23)((function(){var t={},e={},n=Symbol(),r="abcdefghijklmnopqrst";return t[n]=7,r.split("").forEach((function(t){e[t]=t})),7!=u({},t)[n]||Object.keys(u({},e)).join("")!=r}))?function(t,e){for(var n=s(t),u=arguments.length,l=1,h=o.f,f=a.f;u>l;)for(var d,p=c(arguments[l++]),m=h?i(p).concat(h(p)):i(p),g=m.length,v=0;g>v;)d=m[v++],r&&!f.call(p,d)||(n[d]=p[d]);return n}:u},function(t,e,n){n(170),t.exports=n(1).Object.keys},function(t,e,n){var r=n(26),i=n(33);n(111)("keys",(function(){return function(t){return i(r(t))}}))},function(t,e,n){n(172);var r=n(1).Object;t.exports=function(t,e,n){return r.defineProperty(t,e,n)}},function(t,e,n){var r=n(4);r(r.S+r.F*!n(11),"Object",{defineProperty:n(13).f})},function(t,e){t.exports=function(t){return t.webpackPolyfill||(t.deprecate=function(){},t.paths=[],t.children||(t.children=[]),Object.defineProperty(t,"loaded",{enumerable:!0,get:function(){return t.l}}),Object.defineProperty(t,"id",{enumerable:!0,get:function(){return t.i}}),t.webpackPolyfill=1),t}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.version="0.11.22"},function(t,e,n){"use strict";function r(t,e){for(var n in e)t[n]=e[n];return t}n.r(e);var i=/[!'()*]/g,o=function(t){return"%"+t.charCodeAt(0).toString(16)},a=/%2C/g,s=function(t){return encodeURIComponent(t).replace(i,o).replace(a,",")};function c(t){try{return decodeURIComponent(t)}catch(t){0}return t}var u=function(t){return null==t||"object"==typeof t?t:String(t)};function l(t){var e={};return(t=t.trim().replace(/^(\?|#|&)/,""))?(t.split("&").forEach((function(t){var n=t.replace(/\+/g," ").split("="),r=c(n.shift()),i=n.length>0?c(n.join("=")):null;void 0===e[r]?e[r]=i:Array.isArray(e[r])?e[r].push(i):e[r]=[e[r],i]})),e):e}function h(t){var e=t?Object.keys(t).map((function(e){var n=t[e];if(void 0===n)return"";if(null===n)return s(e);if(Array.isArray(n)){var r=[];return n.forEach((function(t){void 0!==t&&(null===t?r.push(s(e)):r.push(s(e)+"="+s(t)))})),r.join("&")}return s(e)+"="+s(n)})).filter((function(t){return t.length>0})).join("&"):null;return e?"?"+e:""}var f=/\/?$/;function d(t,e,n,r){var i=r&&r.options.stringifyQuery,o=e.query||{};try{o=p(o)}catch(t){}var a={name:e.name||t&&t.name,meta:t&&t.meta||{},path:e.path||"/",hash:e.hash||"",query:o,params:e.params||{},fullPath:v(e,i),matched:t?g(t):[]};return n&&(a.redirectedFrom=v(n,i)),Object.freeze(a)}function p(t){if(Array.isArray(t))return t.map(p);if(t&&"object"==typeof t){var e={};for(var n in t)e[n]=p(t[n]);return e}return t}var m=d(null,{path:"/"});function g(t){for(var e=[];t;)e.unshift(t),t=t.parent;return e}function v(t,e){var n=t.path,r=t.query;void 0===r&&(r={});var i=t.hash;return void 0===i&&(i=""),(n||"/")+(e||h)(r)+i}function y(t,e,n){return e===m?t===e:!!e&&(t.path&&e.path?t.path.replace(f,"")===e.path.replace(f,"")&&(n||t.hash===e.hash&&_(t.query,e.query)):!(!t.name||!e.name)&&(t.name===e.name&&(n||t.hash===e.hash&&_(t.query,e.query)&&_(t.params,e.params))))}function _(t,e){if(void 0===t&&(t={}),void 0===e&&(e={}),!t||!e)return t===e;var n=Object.keys(t).sort(),r=Object.keys(e).sort();return n.length===r.length&&n.every((function(n,i){var o=t[n];if(r[i]!==n)return!1;var a=e[n];return null==o||null==a?o===a:"object"==typeof o&&"object"==typeof a?_(o,a):String(o)===String(a)}))}function b(t){for(var e=0;e<t.matched.length;e++){var n=t.matched[e];for(var r in n.instances){var i=n.instances[r],o=n.enteredCbs[r];if(i&&o){delete n.enteredCbs[r];for(var a=0;a<o.length;a++)i._isBeingDestroyed||o[a](i)}}}}var x={name:"RouterView",functional:!0,props:{name:{type:String,default:"default"}},render:function(t,e){var n=e.props,i=e.children,o=e.parent,a=e.data;a.routerView=!0;for(var s=o.$createElement,c=n.name,u=o.$route,l=o._routerViewCache||(o._routerViewCache={}),h=0,f=!1;o&&o._routerRoot!==o;){var d=o.$vnode?o.$vnode.data:{};d.routerView&&h++,d.keepAlive&&o._directInactive&&o._inactive&&(f=!0),o=o.$parent}if(a.routerViewDepth=h,f){var p=l[c],m=p&&p.component;return m?(p.configProps&&w(m,a,p.route,p.configProps),s(m,a,i)):s()}var g=u.matched[h],v=g&&g.components[c];if(!g||!v)return l[c]=null,s();l[c]={component:v},a.registerRouteInstance=function(t,e){var n=g.instances[c];(e&&n!==t||!e&&n===t)&&(g.instances[c]=e)},(a.hook||(a.hook={})).prepatch=function(t,e){g.instances[c]=e.componentInstance},a.hook.init=function(t){t.data.keepAlive&&t.componentInstance&&t.componentInstance!==g.instances[c]&&(g.instances[c]=t.componentInstance),b(u)};var y=g.props&&g.props[c];return y&&(r(l[c],{route:u,configProps:y}),w(v,a,u,y)),s(v,a,i)}};function w(t,e,n,i){var o=e.props=function(t,e){switch(typeof e){case"undefined":return;case"object":return e;case"function":return e(t);case"boolean":return e?t.params:void 0;default:0}}(n,i);if(o){o=e.props=r({},o);var a=e.attrs=e.attrs||{};for(var s in o)t.props&&s in t.props||(a[s]=o[s],delete o[s])}}function M(t,e,n){var r=t.charAt(0);if("/"===r)return t;if("?"===r||"#"===r)return e+t;var i=e.split("/");n&&i[i.length-1]||i.pop();for(var o=t.replace(/^\//,"").split("/"),a=0;a<o.length;a++){var s=o[a];".."===s?i.pop():"."!==s&&i.push(s)}return""!==i[0]&&i.unshift(""),i.join("/")}function S(t){return t.replace(/\/+/g,"/")}var A=Array.isArray||function(t){return"[object Array]"==Object.prototype.toString.call(t)},E=N,C=R,T=function(t,e){return k(R(t,e),e)},I=k,P=U,L=new RegExp(["(\\\\.)","([\\/.])?(?:(?:\\:(\\w+)(?:\\(((?:\\\\.|[^\\\\()])+)\\))?|\\(((?:\\\\.|[^\\\\()])+)\\))([+*?])?|(\\*))"].join("|"),"g");function R(t,e){for(var n,r=[],i=0,o=0,a="",s=e&&e.delimiter||"/";null!=(n=L.exec(t));){var c=n[0],u=n[1],l=n.index;if(a+=t.slice(o,l),o=l+c.length,u)a+=u[1];else{var h=t[o],f=n[2],d=n[3],p=n[4],m=n[5],g=n[6],v=n[7];a&&(r.push(a),a="");var y=null!=f&&null!=h&&h!==f,_="+"===g||"*"===g,b="?"===g||"*"===g,x=n[2]||s,w=p||m;r.push({name:d||i++,prefix:f||"",delimiter:x,optional:b,repeat:_,partial:y,asterisk:!!v,pattern:w?D(w):v?".*":"[^"+B(x)+"]+?"})}}return o<t.length&&(a+=t.substr(o)),a&&r.push(a),r}function O(t){return encodeURI(t).replace(/[\/?#]/g,(function(t){return"%"+t.charCodeAt(0).toString(16).toUpperCase()}))}function k(t,e){for(var n=new Array(t.length),r=0;r<t.length;r++)"object"==typeof t[r]&&(n[r]=new RegExp("^(?:"+t[r].pattern+")$",j(e)));return function(e,r){for(var i="",o=e||{},a=(r||{}).pretty?O:encodeURIComponent,s=0;s<t.length;s++){var c=t[s];if("string"!=typeof c){var u,l=o[c.name];if(null==l){if(c.optional){c.partial&&(i+=c.prefix);continue}throw new TypeError('Expected "'+c.name+'" to be defined')}if(A(l)){if(!c.repeat)throw new TypeError('Expected "'+c.name+'" to not repeat, but received `'+JSON.stringify(l)+"`");if(0===l.length){if(c.optional)continue;throw new TypeError('Expected "'+c.name+'" to not be empty')}for(var h=0;h<l.length;h++){if(u=a(l[h]),!n[s].test(u))throw new TypeError('Expected all "'+c.name+'" to match "'+c.pattern+'", but received `'+JSON.stringify(u)+"`");i+=(0===h?c.prefix:c.delimiter)+u}}else{if(u=c.asterisk?encodeURI(l).replace(/[?#]/g,(function(t){return"%"+t.charCodeAt(0).toString(16).toUpperCase()})):a(l),!n[s].test(u))throw new TypeError('Expected "'+c.name+'" to match "'+c.pattern+'", but received "'+u+'"');i+=c.prefix+u}}else i+=c}return i}}function B(t){return t.replace(/([.+*?=^!:${}()[\]|\/\\])/g,"\\$1")}function D(t){return t.replace(/([=!:$\/()])/g,"\\$1")}function F(t,e){return t.keys=e,t}function j(t){return t&&t.sensitive?"":"i"}function U(t,e,n){A(e)||(n=e||n,e=[]);for(var r=(n=n||{}).strict,i=!1!==n.end,o="",a=0;a<t.length;a++){var s=t[a];if("string"==typeof s)o+=B(s);else{var c=B(s.prefix),u="(?:"+s.pattern+")";e.push(s),s.repeat&&(u+="(?:"+c+u+")*"),o+=u=s.optional?s.partial?c+"("+u+")?":"(?:"+c+"("+u+"))?":c+"("+u+")"}}var l=B(n.delimiter||"/"),h=o.slice(-l.length)===l;return r||(o=(h?o.slice(0,-l.length):o)+"(?:"+l+"(?=$))?"),o+=i?"$":r&&h?"":"(?="+l+"|$)",F(new RegExp("^"+o,j(n)),e)}function N(t,e,n){return A(e)||(n=e||n,e=[]),n=n||{},t instanceof RegExp?function(t,e){var n=t.source.match(/\((?!\?)/g);if(n)for(var r=0;r<n.length;r++)e.push({name:r,prefix:null,delimiter:null,optional:!1,repeat:!1,partial:!1,asterisk:!1,pattern:null});return F(t,e)}(t,e):A(t)?function(t,e,n){for(var r=[],i=0;i<t.length;i++)r.push(N(t[i],e,n).source);return F(new RegExp("(?:"+r.join("|")+")",j(n)),e)}(t,e,n):function(t,e,n){return U(R(t,n),e,n)}(t,e,n)}E.parse=C,E.compile=T,E.tokensToFunction=I,E.tokensToRegExp=P;var z=Object.create(null);function G(t,e,n){e=e||{};try{var r=z[t]||(z[t]=E.compile(t));return"string"==typeof e.pathMatch&&(e[0]=e.pathMatch),r(e,{pretty:!0})}catch(t){return""}finally{delete e[0]}}function H(t,e,n,i){var o="string"==typeof t?{path:t}:t;if(o._normalized)return o;if(o.name){var a=(o=r({},t)).params;return a&&"object"==typeof a&&(o.params=r({},a)),o}if(!o.path&&o.params&&e){(o=r({},o))._normalized=!0;var s=r(r({},e.params),o.params);if(e.name)o.name=e.name,o.params=s;else if(e.matched.length){var c=e.matched[e.matched.length-1].path;o.path=G(c,s,e.path)}else 0;return o}var h=function(t){var e="",n="",r=t.indexOf("#");r>=0&&(e=t.slice(r),t=t.slice(0,r));var i=t.indexOf("?");return i>=0&&(n=t.slice(i+1),t=t.slice(0,i)),{path:t,query:n,hash:e}}(o.path||""),f=e&&e.path||"/",d=h.path?M(h.path,f,n||o.append):f,p=function(t,e,n){void 0===e&&(e={});var r,i=n||l;try{r=i(t||"")}catch(t){r={}}for(var o in e){var a=e[o];r[o]=Array.isArray(a)?a.map(u):u(a)}return r}(h.query,o.query,i&&i.options.parseQuery),m=o.hash||h.hash;return m&&"#"!==m.charAt(0)&&(m="#"+m),{_normalized:!0,path:d,query:p,hash:m}}var W,V=function(){},Z={name:"RouterLink",props:{to:{type:[String,Object],required:!0},tag:{type:String,default:"a"},custom:Boolean,exact:Boolean,exactPath:Boolean,append:Boolean,replace:Boolean,activeClass:String,exactActiveClass:String,ariaCurrentValue:{type:String,default:"page"},event:{type:[String,Array],default:"click"}},render:function(t){var e=this,n=this.$router,i=this.$route,o=n.resolve(this.to,i,this.append),a=o.location,s=o.route,c=o.href,u={},l=n.options.linkActiveClass,h=n.options.linkExactActiveClass,p=null==l?"router-link-active":l,m=null==h?"router-link-exact-active":h,g=null==this.activeClass?p:this.activeClass,v=null==this.exactActiveClass?m:this.exactActiveClass,_=s.redirectedFrom?d(null,H(s.redirectedFrom),null,n):s;u[v]=y(i,_,this.exactPath),u[g]=this.exact||this.exactPath?u[v]:function(t,e){return 0===t.path.replace(f,"/").indexOf(e.path.replace(f,"/"))&&(!e.hash||t.hash===e.hash)&&function(t,e){for(var n in e)if(!(n in t))return!1;return!0}(t.query,e.query)}(i,_);var b=u[v]?this.ariaCurrentValue:null,x=function(t){Q(t)&&(e.replace?n.replace(a,V):n.push(a,V))},w={click:Q};Array.isArray(this.event)?this.event.forEach((function(t){w[t]=x})):w[this.event]=x;var M={class:u},S=!this.$scopedSlots.$hasNormal&&this.$scopedSlots.default&&this.$scopedSlots.default({href:c,route:s,navigate:x,isActive:u[g],isExactActive:u[v]});if(S){if(1===S.length)return S[0];if(S.length>1||!S.length)return 0===S.length?t():t("span",{},S)}if("a"===this.tag)M.on=w,M.attrs={href:c,"aria-current":b};else{var A=function t(e){var n;if(e)for(var r=0;r<e.length;r++){if("a"===(n=e[r]).tag)return n;if(n.children&&(n=t(n.children)))return n}}(this.$slots.default);if(A){A.isStatic=!1;var E=A.data=r({},A.data);for(var C in E.on=E.on||{},E.on){var T=E.on[C];C in w&&(E.on[C]=Array.isArray(T)?T:[T])}for(var I in w)I in E.on?E.on[I].push(w[I]):E.on[I]=x;var P=A.data.attrs=r({},A.data.attrs);P.href=c,P["aria-current"]=b}else M.on=w}return t(this.tag,M,this.$slots.default)}};function Q(t){if(!(t.metaKey||t.altKey||t.ctrlKey||t.shiftKey||t.defaultPrevented||void 0!==t.button&&0!==t.button)){if(t.currentTarget&&t.currentTarget.getAttribute){var e=t.currentTarget.getAttribute("target");if(/\b_blank\b/i.test(e))return}return t.preventDefault&&t.preventDefault(),!0}}var X="undefined"!=typeof window;function Y(t,e,n,r,i){var o=e||[],a=n||Object.create(null),s=r||Object.create(null);t.forEach((function(t){!function t(e,n,r,i,o,a){var s=i.path,c=i.name;0;var u=i.pathToRegexpOptions||{},l=function(t,e,n){n||(t=t.replace(/\/$/,""));if("/"===t[0])return t;if(null==e)return t;return S(e.path+"/"+t)}(s,o,u.strict);"boolean"==typeof i.caseSensitive&&(u.sensitive=i.caseSensitive);var h={path:l,regex:J(l,u),components:i.components||{default:i.component},alias:i.alias?"string"==typeof i.alias?[i.alias]:i.alias:[],instances:{},enteredCbs:{},name:c,parent:o,matchAs:a,redirect:i.redirect,beforeEnter:i.beforeEnter,meta:i.meta||{},props:null==i.props?{}:i.components?i.props:{default:i.props}};i.children&&i.children.forEach((function(i){var o=a?S(a+"/"+i.path):void 0;t(e,n,r,i,h,o)}));n[h.path]||(e.push(h.path),n[h.path]=h);if(void 0!==i.alias)for(var f=Array.isArray(i.alias)?i.alias:[i.alias],d=0;d<f.length;++d){0;var p={path:f[d],children:i.children};t(e,n,r,p,o,h.path||"/")}c&&(r[c]||(r[c]=h))}(o,a,s,t,i)}));for(var c=0,u=o.length;c<u;c++)"*"===o[c]&&(o.push(o.splice(c,1)[0]),u--,c--);return{pathList:o,pathMap:a,nameMap:s}}function J(t,e){return E(t,[],e)}function q(t,e){var n=Y(t),r=n.pathList,i=n.pathMap,o=n.nameMap;function a(t,n,a){var s=H(t,n,!1,e),u=s.name;if(u){var l=o[u];if(!l)return c(null,s);var h=l.regex.keys.filter((function(t){return!t.optional})).map((function(t){return t.name}));if("object"!=typeof s.params&&(s.params={}),n&&"object"==typeof n.params)for(var f in n.params)!(f in s.params)&&h.indexOf(f)>-1&&(s.params[f]=n.params[f]);return s.path=G(l.path,s.params),c(l,s,a)}if(s.path){s.params={};for(var d=0;d<r.length;d++){var p=r[d],m=i[p];if(K(m.regex,s.path,s.params))return c(m,s,a)}}return c(null,s)}function s(t,n){var r=t.redirect,i="function"==typeof r?r(d(t,n,null,e)):r;if("string"==typeof i&&(i={path:i}),!i||"object"!=typeof i)return c(null,n);var s=i,u=s.name,l=s.path,h=n.query,f=n.hash,p=n.params;if(h=s.hasOwnProperty("query")?s.query:h,f=s.hasOwnProperty("hash")?s.hash:f,p=s.hasOwnProperty("params")?s.params:p,u){o[u];return a({_normalized:!0,name:u,query:h,hash:f,params:p},void 0,n)}if(l){var m=function(t,e){return M(t,e.parent?e.parent.path:"/",!0)}(l,t);return a({_normalized:!0,path:G(m,p),query:h,hash:f},void 0,n)}return c(null,n)}function c(t,n,r){return t&&t.redirect?s(t,r||n):t&&t.matchAs?function(t,e,n){var r=a({_normalized:!0,path:G(n,e.params)});if(r){var i=r.matched,o=i[i.length-1];return e.params=r.params,c(o,e)}return c(null,e)}(0,n,t.matchAs):d(t,n,r,e)}return{match:a,addRoute:function(t,e){var n="object"!=typeof t?o[t]:void 0;Y([e||t],r,i,o,n),n&&n.alias.length&&Y(n.alias.map((function(t){return{path:t,children:[e]}})),r,i,o,n)},getRoutes:function(){return r.map((function(t){return i[t]}))},addRoutes:function(t){Y(t,r,i,o)}}}function K(t,e,n){var r=e.match(t);if(!r)return!1;if(!n)return!0;for(var i=1,o=r.length;i<o;++i){var a=t.keys[i-1];a&&(n[a.name||"pathMatch"]="string"==typeof r[i]?c(r[i]):r[i])}return!0}var $=X&&window.performance&&window.performance.now?window.performance:Date;function tt(){return $.now().toFixed(3)}var et=tt();function nt(){return et}function rt(t){return et=t}var it=Object.create(null);function ot(){"scrollRestoration"in window.history&&(window.history.scrollRestoration="manual");var t=window.location.protocol+"//"+window.location.host,e=window.location.href.replace(t,""),n=r({},window.history.state);return n.key=nt(),window.history.replaceState(n,"",e),window.addEventListener("popstate",ct),function(){window.removeEventListener("popstate",ct)}}function at(t,e,n,r){if(t.app){var i=t.options.scrollBehavior;i&&t.app.$nextTick((function(){var o=function(){var t=nt();if(t)return it[t]}(),a=i.call(t,e,n,r?o:null);a&&("function"==typeof a.then?a.then((function(t){dt(t,o)})).catch((function(t){0})):dt(a,o))}))}}function st(){var t=nt();t&&(it[t]={x:window.pageXOffset,y:window.pageYOffset})}function ct(t){st(),t.state&&t.state.key&&rt(t.state.key)}function ut(t){return ht(t.x)||ht(t.y)}function lt(t){return{x:ht(t.x)?t.x:window.pageXOffset,y:ht(t.y)?t.y:window.pageYOffset}}function ht(t){return"number"==typeof t}var ft=/^#\d/;function dt(t,e){var n,r="object"==typeof t;if(r&&"string"==typeof t.selector){var i=ft.test(t.selector)?document.getElementById(t.selector.slice(1)):document.querySelector(t.selector);if(i){var o=t.offset&&"object"==typeof t.offset?t.offset:{};e=function(t,e){var n=document.documentElement.getBoundingClientRect(),r=t.getBoundingClientRect();return{x:r.left-n.left-e.x,y:r.top-n.top-e.y}}(i,o={x:ht((n=o).x)?n.x:0,y:ht(n.y)?n.y:0})}else ut(t)&&(e=lt(t))}else r&&ut(t)&&(e=lt(t));e&&("scrollBehavior"in document.documentElement.style?window.scrollTo({left:e.x,top:e.y,behavior:t.behavior}):window.scrollTo(e.x,e.y))}var pt,mt=X&&((-1===(pt=window.navigator.userAgent).indexOf("Android 2.")&&-1===pt.indexOf("Android 4.0")||-1===pt.indexOf("Mobile Safari")||-1!==pt.indexOf("Chrome")||-1!==pt.indexOf("Windows Phone"))&&window.history&&"function"==typeof window.history.pushState);function gt(t,e){st();var n=window.history;try{if(e){var i=r({},n.state);i.key=nt(),n.replaceState(i,"",t)}else n.pushState({key:rt(tt())},"",t)}catch(n){window.location[e?"replace":"assign"](t)}}function vt(t){gt(t,!0)}function yt(t,e,n){var r=function(i){i>=t.length?n():t[i]?e(t[i],(function(){r(i+1)})):r(i+1)};r(0)}var _t={redirected:2,aborted:4,cancelled:8,duplicated:16};function bt(t,e){return wt(t,e,_t.redirected,'Redirected when going from "'+t.fullPath+'" to "'+function(t){if("string"==typeof t)return t;if("path"in t)return t.path;var e={};return Mt.forEach((function(n){n in t&&(e[n]=t[n])})),JSON.stringify(e,null,2)}(e)+'" via a navigation guard.')}function xt(t,e){return wt(t,e,_t.cancelled,'Navigation cancelled from "'+t.fullPath+'" to "'+e.fullPath+'" with a new navigation.')}function wt(t,e,n,r){var i=new Error(r);return i._isRouter=!0,i.from=t,i.to=e,i.type=n,i}var Mt=["params","query","hash"];function St(t){return Object.prototype.toString.call(t).indexOf("Error")>-1}function At(t,e){return St(t)&&t._isRouter&&(null==e||t.type===e)}function Et(t){return function(e,n,r){var i=!1,o=0,a=null;Ct(t,(function(t,e,n,s){if("function"==typeof t&&void 0===t.cid){i=!0,o++;var c,u=Pt((function(e){var i;((i=e).__esModule||It&&"Module"===i[Symbol.toStringTag])&&(e=e.default),t.resolved="function"==typeof e?e:W.extend(e),n.components[s]=e,--o<=0&&r()})),l=Pt((function(t){var e="Failed to resolve async component "+s+": "+t;a||(a=St(t)?t:new Error(e),r(a))}));try{c=t(u,l)}catch(t){l(t)}if(c)if("function"==typeof c.then)c.then(u,l);else{var h=c.component;h&&"function"==typeof h.then&&h.then(u,l)}}})),i||r()}}function Ct(t,e){return Tt(t.map((function(t){return Object.keys(t.components).map((function(n){return e(t.components[n],t.instances[n],t,n)}))})))}function Tt(t){return Array.prototype.concat.apply([],t)}var It="function"==typeof Symbol&&"symbol"==typeof Symbol.toStringTag;function Pt(t){var e=!1;return function(){for(var n=[],r=arguments.length;r--;)n[r]=arguments[r];if(!e)return e=!0,t.apply(this,n)}}var Lt=function(t,e){this.router=t,this.base=function(t){if(!t)if(X){var e=document.querySelector("base");t=(t=e&&e.getAttribute("href")||"/").replace(/^https?:\/\/[^\/]+/,"")}else t="/";"/"!==t.charAt(0)&&(t="/"+t);return t.replace(/\/$/,"")}(e),this.current=m,this.pending=null,this.ready=!1,this.readyCbs=[],this.readyErrorCbs=[],this.errorCbs=[],this.listeners=[]};function Rt(t,e,n,r){var i=Ct(t,(function(t,r,i,o){var a=function(t,e){"function"!=typeof t&&(t=W.extend(t));return t.options[e]}(t,e);if(a)return Array.isArray(a)?a.map((function(t){return n(t,r,i,o)})):n(a,r,i,o)}));return Tt(r?i.reverse():i)}function Ot(t,e){if(e)return function(){return t.apply(e,arguments)}}Lt.prototype.listen=function(t){this.cb=t},Lt.prototype.onReady=function(t,e){this.ready?t():(this.readyCbs.push(t),e&&this.readyErrorCbs.push(e))},Lt.prototype.onError=function(t){this.errorCbs.push(t)},Lt.prototype.transitionTo=function(t,e,n){var r,i=this;try{r=this.router.match(t,this.current)}catch(t){throw this.errorCbs.forEach((function(e){e(t)})),t}var o=this.current;this.confirmTransition(r,(function(){i.updateRoute(r),e&&e(r),i.ensureURL(),i.router.afterHooks.forEach((function(t){t&&t(r,o)})),i.ready||(i.ready=!0,i.readyCbs.forEach((function(t){t(r)})))}),(function(t){n&&n(t),t&&!i.ready&&(At(t,_t.redirected)&&o===m||(i.ready=!0,i.readyErrorCbs.forEach((function(e){e(t)}))))}))},Lt.prototype.confirmTransition=function(t,e,n){var r=this,i=this.current;this.pending=t;var o,a,s=function(t){!At(t)&&St(t)&&(r.errorCbs.length?r.errorCbs.forEach((function(e){e(t)})):console.error(t)),n&&n(t)},c=t.matched.length-1,u=i.matched.length-1;if(y(t,i)&&c===u&&t.matched[c]===i.matched[u])return this.ensureURL(),t.hash&&at(this.router,i,t,!1),s(((a=wt(o=i,t,_t.duplicated,'Avoided redundant navigation to current location: "'+o.fullPath+'".')).name="NavigationDuplicated",a));var l=function(t,e){var n,r=Math.max(t.length,e.length);for(n=0;n<r&&t[n]===e[n];n++);return{updated:e.slice(0,n),activated:e.slice(n),deactivated:t.slice(n)}}(this.current.matched,t.matched),h=l.updated,f=l.deactivated,d=l.activated,p=[].concat(function(t){return Rt(t,"beforeRouteLeave",Ot,!0)}(f),this.router.beforeHooks,function(t){return Rt(t,"beforeRouteUpdate",Ot)}(h),d.map((function(t){return t.beforeEnter})),Et(d)),m=function(e,n){if(r.pending!==t)return s(xt(i,t));try{e(t,i,(function(e){!1===e?(r.ensureURL(!0),s(function(t,e){return wt(t,e,_t.aborted,'Navigation aborted from "'+t.fullPath+'" to "'+e.fullPath+'" via a navigation guard.')}(i,t))):St(e)?(r.ensureURL(!0),s(e)):"string"==typeof e||"object"==typeof e&&("string"==typeof e.path||"string"==typeof e.name)?(s(bt(i,t)),"object"==typeof e&&e.replace?r.replace(e):r.push(e)):n(e)}))}catch(t){s(t)}};yt(p,m,(function(){yt(function(t){return Rt(t,"beforeRouteEnter",(function(t,e,n,r){return function(t,e,n){return function(r,i,o){return t(r,i,(function(t){"function"==typeof t&&(e.enteredCbs[n]||(e.enteredCbs[n]=[]),e.enteredCbs[n].push(t)),o(t)}))}}(t,n,r)}))}(d).concat(r.router.resolveHooks),m,(function(){if(r.pending!==t)return s(xt(i,t));r.pending=null,e(t),r.router.app&&r.router.app.$nextTick((function(){b(t)}))}))}))},Lt.prototype.updateRoute=function(t){this.current=t,this.cb&&this.cb(t)},Lt.prototype.setupListeners=function(){},Lt.prototype.teardown=function(){this.listeners.forEach((function(t){t()})),this.listeners=[],this.current=m,this.pending=null};var kt=function(t){function e(e,n){t.call(this,e,n),this._startLocation=Bt(this.base)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.setupListeners=function(){var t=this;if(!(this.listeners.length>0)){var e=this.router,n=e.options.scrollBehavior,r=mt&&n;r&&this.listeners.push(ot());var i=function(){var n=t.current,i=Bt(t.base);t.current===m&&i===t._startLocation||t.transitionTo(i,(function(t){r&&at(e,t,n,!0)}))};window.addEventListener("popstate",i),this.listeners.push((function(){window.removeEventListener("popstate",i)}))}},e.prototype.go=function(t){window.history.go(t)},e.prototype.push=function(t,e,n){var r=this,i=this.current;this.transitionTo(t,(function(t){gt(S(r.base+t.fullPath)),at(r.router,t,i,!1),e&&e(t)}),n)},e.prototype.replace=function(t,e,n){var r=this,i=this.current;this.transitionTo(t,(function(t){vt(S(r.base+t.fullPath)),at(r.router,t,i,!1),e&&e(t)}),n)},e.prototype.ensureURL=function(t){if(Bt(this.base)!==this.current.fullPath){var e=S(this.base+this.current.fullPath);t?gt(e):vt(e)}},e.prototype.getCurrentLocation=function(){return Bt(this.base)},e}(Lt);function Bt(t){var e=window.location.pathname,n=e.toLowerCase(),r=t.toLowerCase();return!t||n!==r&&0!==n.indexOf(S(r+"/"))||(e=e.slice(t.length)),(e||"/")+window.location.search+window.location.hash}var Dt=function(t){function e(e,n,r){t.call(this,e,n),r&&function(t){var e=Bt(t);if(!/^\/#/.test(e))return window.location.replace(S(t+"/#"+e)),!0}(this.base)||Ft()}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.setupListeners=function(){var t=this;if(!(this.listeners.length>0)){var e=this.router.options.scrollBehavior,n=mt&&e;n&&this.listeners.push(ot());var r=function(){var e=t.current;Ft()&&t.transitionTo(jt(),(function(r){n&&at(t.router,r,e,!0),mt||zt(r.fullPath)}))},i=mt?"popstate":"hashchange";window.addEventListener(i,r),this.listeners.push((function(){window.removeEventListener(i,r)}))}},e.prototype.push=function(t,e,n){var r=this,i=this.current;this.transitionTo(t,(function(t){Nt(t.fullPath),at(r.router,t,i,!1),e&&e(t)}),n)},e.prototype.replace=function(t,e,n){var r=this,i=this.current;this.transitionTo(t,(function(t){zt(t.fullPath),at(r.router,t,i,!1),e&&e(t)}),n)},e.prototype.go=function(t){window.history.go(t)},e.prototype.ensureURL=function(t){var e=this.current.fullPath;jt()!==e&&(t?Nt(e):zt(e))},e.prototype.getCurrentLocation=function(){return jt()},e}(Lt);function Ft(){var t=jt();return"/"===t.charAt(0)||(zt("/"+t),!1)}function jt(){var t=window.location.href,e=t.indexOf("#");return e<0?"":t=t.slice(e+1)}function Ut(t){var e=window.location.href,n=e.indexOf("#");return(n>=0?e.slice(0,n):e)+"#"+t}function Nt(t){mt?gt(Ut(t)):window.location.hash=t}function zt(t){mt?vt(Ut(t)):window.location.replace(Ut(t))}var Gt=function(t){function e(e,n){t.call(this,e,n),this.stack=[],this.index=-1}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.push=function(t,e,n){var r=this;this.transitionTo(t,(function(t){r.stack=r.stack.slice(0,r.index+1).concat(t),r.index++,e&&e(t)}),n)},e.prototype.replace=function(t,e,n){var r=this;this.transitionTo(t,(function(t){r.stack=r.stack.slice(0,r.index).concat(t),e&&e(t)}),n)},e.prototype.go=function(t){var e=this,n=this.index+t;if(!(n<0||n>=this.stack.length)){var r=this.stack[n];this.confirmTransition(r,(function(){var t=e.current;e.index=n,e.updateRoute(r),e.router.afterHooks.forEach((function(e){e&&e(r,t)}))}),(function(t){At(t,_t.duplicated)&&(e.index=n)}))}},e.prototype.getCurrentLocation=function(){var t=this.stack[this.stack.length-1];return t?t.fullPath:"/"},e.prototype.ensureURL=function(){},e}(Lt),Ht=function(t){void 0===t&&(t={}),this.app=null,this.apps=[],this.options=t,this.beforeHooks=[],this.resolveHooks=[],this.afterHooks=[],this.matcher=q(t.routes||[],this);var e=t.mode||"hash";switch(this.fallback="history"===e&&!mt&&!1!==t.fallback,this.fallback&&(e="hash"),X||(e="abstract"),this.mode=e,e){case"history":this.history=new kt(this,t.base);break;case"hash":this.history=new Dt(this,t.base,this.fallback);break;case"abstract":this.history=new Gt(this,t.base);break;default:0}},Wt={currentRoute:{configurable:!0}};function Vt(t,e){return t.push(e),function(){var n=t.indexOf(e);n>-1&&t.splice(n,1)}}Ht.prototype.match=function(t,e,n){return this.matcher.match(t,e,n)},Wt.currentRoute.get=function(){return this.history&&this.history.current},Ht.prototype.init=function(t){var e=this;if(this.apps.push(t),t.$once("hook:destroyed",(function(){var n=e.apps.indexOf(t);n>-1&&e.apps.splice(n,1),e.app===t&&(e.app=e.apps[0]||null),e.app||e.history.teardown()})),!this.app){this.app=t;var n=this.history;if(n instanceof kt||n instanceof Dt){var r=function(t){n.setupListeners(),function(t){var r=n.current,i=e.options.scrollBehavior;mt&&i&&"fullPath"in t&&at(e,t,r,!1)}(t)};n.transitionTo(n.getCurrentLocation(),r,r)}n.listen((function(t){e.apps.forEach((function(e){e._route=t}))}))}},Ht.prototype.beforeEach=function(t){return Vt(this.beforeHooks,t)},Ht.prototype.beforeResolve=function(t){return Vt(this.resolveHooks,t)},Ht.prototype.afterEach=function(t){return Vt(this.afterHooks,t)},Ht.prototype.onReady=function(t,e){this.history.onReady(t,e)},Ht.prototype.onError=function(t){this.history.onError(t)},Ht.prototype.push=function(t,e,n){var r=this;if(!e&&!n&&"undefined"!=typeof Promise)return new Promise((function(e,n){r.history.push(t,e,n)}));this.history.push(t,e,n)},Ht.prototype.replace=function(t,e,n){var r=this;if(!e&&!n&&"undefined"!=typeof Promise)return new Promise((function(e,n){r.history.replace(t,e,n)}));this.history.replace(t,e,n)},Ht.prototype.go=function(t){this.history.go(t)},Ht.prototype.back=function(){this.go(-1)},Ht.prototype.forward=function(){this.go(1)},Ht.prototype.getMatchedComponents=function(t){var e=t?t.matched?t:this.resolve(t).route:this.currentRoute;return e?[].concat.apply([],e.matched.map((function(t){return Object.keys(t.components).map((function(e){return t.components[e]}))}))):[]},Ht.prototype.resolve=function(t,e,n){var r=H(t,e=e||this.history.current,n,this),i=this.match(r,e),o=i.redirectedFrom||i.fullPath;return{location:r,route:i,href:function(t,e,n){var r="hash"===n?"#"+e:e;return t?S(t+"/"+r):r}(this.history.base,o,this.mode),normalizedTo:r,resolved:i}},Ht.prototype.getRoutes=function(){return this.matcher.getRoutes()},Ht.prototype.addRoute=function(t,e){this.matcher.addRoute(t,e),this.history.current!==m&&this.history.transitionTo(this.history.getCurrentLocation())},Ht.prototype.addRoutes=function(t){this.matcher.addRoutes(t),this.history.current!==m&&this.history.transitionTo(this.history.getCurrentLocation())},Object.defineProperties(Ht.prototype,Wt),Ht.install=function t(e){if(!t.installed||W!==e){t.installed=!0,W=e;var n=function(t){return void 0!==t},r=function(t,e){var r=t.$options._parentVnode;n(r)&&n(r=r.data)&&n(r=r.registerRouteInstance)&&r(t,e)};e.mixin({beforeCreate:function(){n(this.$options.router)?(this._routerRoot=this,this._router=this.$options.router,this._router.init(this),e.util.defineReactive(this,"_route",this._router.history.current)):this._routerRoot=this.$parent&&this.$parent._routerRoot||this,r(this,this)},destroyed:function(){r(this)}}),Object.defineProperty(e.prototype,"$router",{get:function(){return this._routerRoot._router}}),Object.defineProperty(e.prototype,"$route",{get:function(){return this._routerRoot._route}}),e.component("RouterView",x),e.component("RouterLink",Z);var i=e.config.optionMergeStrategies;i.beforeRouteEnter=i.beforeRouteLeave=i.beforeRouteUpdate=i.created}},Ht.version="3.5.3",Ht.isNavigationFailure=At,Ht.NavigationFailureType=_t,Ht.START_LOCATION=m,X&&window.Vue&&window.Vue.use(Ht),e.default=Ht},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.pkRouter=e.routerInit=void 0;var r=s(n(9)),i=s(n(177)),o=s(n(178)),a=s(n(311));n(3);function s(t){return t&&t.__esModule?t:{default:t}}e.routerInit=function(t,e){var n=t.prototype.push,r=t.prototype.replace;t.prototype.push=function(t,e,r){return e||r?n.call(this,t,e,r):n.call(this,t).catch((function(t){return t}))},t.prototype.replace=function(t,e,n){return e||n?r.call(this,t,e,n):r.call(this,t).catch((function(t){return t}))};var i=c(t,e);return u(i),i};var c=e.pkRouter=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=[{path:"/404",component:i.default},{path:"/noAllow",component:o.default},{path:"/refresh",component:a.default,hidden:!0}],s=function(){return new t((0,r.default)({},e,{mode:"history",routes:n,scrollBehavior:function(t,e,n){return n||{x:0,y:0}}}))},c=s(),u=s();return c.matcher=u.matcher,c},u=function(t){t.onError((function(e){console.log("\n *************************ROUTER ERROR BEGIN**********************************\n\n "+e+"\n\n *************************ROUTER ERROR FINAL**********************************\n ");var n=e.message.match(/Loading chunk (\w)+ failed/g),r=t.history.pending.fullPath;n&&t.replace(r).then()}))}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default={render:function(){var t=arguments[0];return t("a-result",{attrs:{status:"404",title:"404","sub-title":"Sorry, the page you visited does not exist."}},[t("a-button",{attrs:{type:"primary"},slot:"extra",on:{click:this.toHome}},["Back Home"])])},methods:{toHome:function(){return this.$router.replace({path:"/"}),!1}}}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=d(n(9));n(179);var i=n(180),o=n(2),a=d(n(185)),s=d(n(186)),c=n(17),u=n(10),l=n(3),h=d(n(88)),f=n(35);function d(t){return t&&t.__esModule?t:{default:t}}var p={1:{text:"您访问的该页面暂无权限!",iconGroup:["login"]},2:{text:"您访问的“%”暂无权限!",iconGroup:["project","login"]}};e.default={name:"NoAllow",data:function(){return{status:1,visible:!1,projectList:[],currentProjectInfo:{}}},created:function(){this.SET_IS_IN_NO_AUTH(!0)},beforeDestroy:function(){this.SET_IS_IN_NO_AUTH(!1)},mounted:function(){this.getAllProject()},computed:{currentProject:function(){try{var t=u.localStore.get("APP_PROJECT");if(t){var e=h.default.decrypt(t);return e?JSON.parse(e):{}}return{}}catch(t){console.error(t)}},userAllInfo:function(){return u.localStore.get("userAllInfo")}},methods:(0,r.default)({},(0,i.mapMutations)("user",["SET_IS_IN_NO_AUTH"]),{handleTap:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"login";switch(t){case"login":(0,f.logOut)();break;case"project":this.visible=!0}},handleModalTap:function(t,e){var n=this;2===t?(0,c.postConsumer)(e.id).then((function(t){if(0===t.code){n.visible=!1;var r=t.data;localStorage.removeItem("menuList"),localStorage.removeItem("consumer"),localStorage.removeItem("currentProject"),localStorage.removeItem("consumerExtList"),localStorage.removeItem("userMessage"),u.localStore.set("currentProject",e);var i=u.localStore.get("IAM_OATH_TYPE");if(!(0,l.isEmpty)(r)){localStorage.removeItem("access_token"),u.localStore.set("access_token",r.access_token),u.localStore.set("refresh_token",r.refresh_token);var o=new Date;u.localStore.set("token_expires_in",new Date(o.setSeconds(o.getSeconds()+parseInt(r.expires_in))).getTime()),i&&(u.localStore.set("idp_access_token",r.idp_access_token),u.localStore.set("idp_refresh_token",r.idp_refresh_token)),n.$router.replace("/").then((function(){}))}}else n.$message.error(t.msg)})):this.visible=!1},getAllProject:function(){var t=this;(0,c.getBelongList)().then((function(e){if((0,l.isEmpty)(e.data))t.status=1;else if(t.status=e.data.length>1?2:1,t.projectList=e.data,!(0,l.isEmpty)(t.userAllInfo)&&!(0,l.isEmpty)(t.userAllInfo.consumer)){var n=(0,l.find)(t.projectList,["id",t.userAllInfo.consumer.id]);(0,l.isEmpty)(n)||(t.currentProjectInfo=n)}}))}}),render:function(){var t=this,e=arguments[0],n={login:e("a-button",{attrs:{type:"primary"},on:{click:function(){return t.handleTap("login")}}},["返回登录页"]),project:e("a-button",{attrs:{type:"primary",ghost:!0},on:{click:function(){return t.handleTap("project")}}},["切换其他项目"])},r=p[this.status].iconGroup.map((function(t){return n[t]}));return e("div",{class:o.prefixCls+"-no-allow"},[e("div",{class:o.prefixCls+"-no-allow-icon"},[e(a.default)]),e("div",{class:o.prefixCls+"-no-allow-info"},[e("div",{class:o.prefixCls+"-no-allow-info-desc"},[e("span",[(0,l.isEmpty)(this.userAllInfo)||(0,l.isEmpty)(this.userAllInfo.consumer)?p[this.status].text:p[this.status].text.replace("%",this.userAllInfo.consumer.name)])]),e("div",{class:o.prefixCls+"-no-allow-info-btn"},[e("a-space",{attrs:{size:22}},[r])])]),e(s.default,{attrs:{visible:this.visible,projectList:this.projectList,choiceInfo:this.currentProjectInfo},on:{tap:function(e,n){return t.handleModalTap(e,n)}}})])}}},function(t,e,n){},function(t,e,n){"use strict";n.r(e),function(t){n.d(e,"Store",(function(){return h})),n.d(e,"createLogger",(function(){return T})),n.d(e,"createNamespacedHelpers",(function(){return S})),n.d(e,"install",(function(){return _})),n.d(e,"mapActions",(function(){return M})),n.d(e,"mapGetters",(function(){return w})),n.d(e,"mapMutations",(function(){return x})),n.d(e,"mapState",(function(){return b}));var r=("undefined"!=typeof window?window:void 0!==t?t:{}).__VUE_DEVTOOLS_GLOBAL_HOOK__;function i(t,e){if(void 0===e&&(e=[]),null===t||"object"!=typeof t)return t;var n,r=(n=function(e){return e.original===t},e.filter(n)[0]);if(r)return r.copy;var o=Array.isArray(t)?[]:{};return e.push({original:t,copy:o}),Object.keys(t).forEach((function(n){o[n]=i(t[n],e)})),o}function o(t,e){Object.keys(t).forEach((function(n){return e(t[n],n)}))}function a(t){return null!==t&&"object"==typeof t}var s=function(t,e){this.runtime=e,this._children=Object.create(null),this._rawModule=t;var n=t.state;this.state=("function"==typeof n?n():n)||{}},c={namespaced:{configurable:!0}};c.namespaced.get=function(){return!!this._rawModule.namespaced},s.prototype.addChild=function(t,e){this._children[t]=e},s.prototype.removeChild=function(t){delete this._children[t]},s.prototype.getChild=function(t){return this._children[t]},s.prototype.hasChild=function(t){return t in this._children},s.prototype.update=function(t){this._rawModule.namespaced=t.namespaced,t.actions&&(this._rawModule.actions=t.actions),t.mutations&&(this._rawModule.mutations=t.mutations),t.getters&&(this._rawModule.getters=t.getters)},s.prototype.forEachChild=function(t){o(this._children,t)},s.prototype.forEachGetter=function(t){this._rawModule.getters&&o(this._rawModule.getters,t)},s.prototype.forEachAction=function(t){this._rawModule.actions&&o(this._rawModule.actions,t)},s.prototype.forEachMutation=function(t){this._rawModule.mutations&&o(this._rawModule.mutations,t)},Object.defineProperties(s.prototype,c);var u=function(t){this.register([],t,!1)};u.prototype.get=function(t){return t.reduce((function(t,e){return t.getChild(e)}),this.root)},u.prototype.getNamespace=function(t){var e=this.root;return t.reduce((function(t,n){return t+((e=e.getChild(n)).namespaced?n+"/":"")}),"")},u.prototype.update=function(t){!function t(e,n,r){0;if(n.update(r),r.modules)for(var i in r.modules){if(!n.getChild(i))return void 0;t(e.concat(i),n.getChild(i),r.modules[i])}}([],this.root,t)},u.prototype.register=function(t,e,n){var r=this;void 0===n&&(n=!0);var i=new s(e,n);0===t.length?this.root=i:this.get(t.slice(0,-1)).addChild(t[t.length-1],i);e.modules&&o(e.modules,(function(e,i){r.register(t.concat(i),e,n)}))},u.prototype.unregister=function(t){var e=this.get(t.slice(0,-1)),n=t[t.length-1],r=e.getChild(n);r&&r.runtime&&e.removeChild(n)},u.prototype.isRegistered=function(t){var e=this.get(t.slice(0,-1)),n=t[t.length-1];return!!e&&e.hasChild(n)};var l;var h=function(t){var e=this;void 0===t&&(t={}),!l&&"undefined"!=typeof window&&window.Vue&&_(window.Vue);var n=t.plugins;void 0===n&&(n=[]);var i=t.strict;void 0===i&&(i=!1),this._committing=!1,this._actions=Object.create(null),this._actionSubscribers=[],this._mutations=Object.create(null),this._wrappedGetters=Object.create(null),this._modules=new u(t),this._modulesNamespaceMap=Object.create(null),this._subscribers=[],this._watcherVM=new l,this._makeLocalGettersCache=Object.create(null);var o=this,a=this.dispatch,s=this.commit;this.dispatch=function(t,e){return a.call(o,t,e)},this.commit=function(t,e,n){return s.call(o,t,e,n)},this.strict=i;var c=this._modules.root.state;g(this,c,[],this._modules.root),m(this,c),n.forEach((function(t){return t(e)})),(void 0!==t.devtools?t.devtools:l.config.devtools)&&function(t){r&&(t._devtoolHook=r,r.emit("vuex:init",t),r.on("vuex:travel-to-state",(function(e){t.replaceState(e)})),t.subscribe((function(t,e){r.emit("vuex:mutation",t,e)}),{prepend:!0}),t.subscribeAction((function(t,e){r.emit("vuex:action",t,e)}),{prepend:!0}))}(this)},f={state:{configurable:!0}};function d(t,e,n){return e.indexOf(t)<0&&(n&&n.prepend?e.unshift(t):e.push(t)),function(){var n=e.indexOf(t);n>-1&&e.splice(n,1)}}function p(t,e){t._actions=Object.create(null),t._mutations=Object.create(null),t._wrappedGetters=Object.create(null),t._modulesNamespaceMap=Object.create(null);var n=t.state;g(t,n,[],t._modules.root,!0),m(t,n,e)}function m(t,e,n){var r=t._vm;t.getters={},t._makeLocalGettersCache=Object.create(null);var i=t._wrappedGetters,a={};o(i,(function(e,n){a[n]=function(t,e){return function(){return t(e)}}(e,t),Object.defineProperty(t.getters,n,{get:function(){return t._vm[n]},enumerable:!0})}));var s=l.config.silent;l.config.silent=!0,t._vm=new l({data:{$$state:e},computed:a}),l.config.silent=s,t.strict&&function(t){t._vm.$watch((function(){return this._data.$$state}),(function(){0}),{deep:!0,sync:!0})}(t),r&&(n&&t._withCommit((function(){r._data.$$state=null})),l.nextTick((function(){return r.$destroy()})))}function g(t,e,n,r,i){var o=!n.length,a=t._modules.getNamespace(n);if(r.namespaced&&(t._modulesNamespaceMap[a],t._modulesNamespaceMap[a]=r),!o&&!i){var s=v(e,n.slice(0,-1)),c=n[n.length-1];t._withCommit((function(){l.set(s,c,r.state)}))}var u=r.context=function(t,e,n){var r=""===e,i={dispatch:r?t.dispatch:function(n,r,i){var o=y(n,r,i),a=o.payload,s=o.options,c=o.type;return s&&s.root||(c=e+c),t.dispatch(c,a)},commit:r?t.commit:function(n,r,i){var o=y(n,r,i),a=o.payload,s=o.options,c=o.type;s&&s.root||(c=e+c),t.commit(c,a,s)}};return Object.defineProperties(i,{getters:{get:r?function(){return t.getters}:function(){return function(t,e){if(!t._makeLocalGettersCache[e]){var n={},r=e.length;Object.keys(t.getters).forEach((function(i){if(i.slice(0,r)===e){var o=i.slice(r);Object.defineProperty(n,o,{get:function(){return t.getters[i]},enumerable:!0})}})),t._makeLocalGettersCache[e]=n}return t._makeLocalGettersCache[e]}(t,e)}},state:{get:function(){return v(t.state,n)}}}),i}(t,a,n);r.forEachMutation((function(e,n){!function(t,e,n,r){(t._mutations[e]||(t._mutations[e]=[])).push((function(e){n.call(t,r.state,e)}))}(t,a+n,e,u)})),r.forEachAction((function(e,n){var r=e.root?n:a+n,i=e.handler||e;!function(t,e,n,r){(t._actions[e]||(t._actions[e]=[])).push((function(e){var i,o=n.call(t,{dispatch:r.dispatch,commit:r.commit,getters:r.getters,state:r.state,rootGetters:t.getters,rootState:t.state},e);return(i=o)&&"function"==typeof i.then||(o=Promise.resolve(o)),t._devtoolHook?o.catch((function(e){throw t._devtoolHook.emit("vuex:error",e),e})):o}))}(t,r,i,u)})),r.forEachGetter((function(e,n){!function(t,e,n,r){if(t._wrappedGetters[e])return void 0;t._wrappedGetters[e]=function(t){return n(r.state,r.getters,t.state,t.getters)}}(t,a+n,e,u)})),r.forEachChild((function(r,o){g(t,e,n.concat(o),r,i)}))}function v(t,e){return e.reduce((function(t,e){return t[e]}),t)}function y(t,e,n){return a(t)&&t.type&&(n=e,e=t,t=t.type),{type:t,payload:e,options:n}}function _(t){l&&t===l||
135
135
  /*!
136
136
  * vuex v3.6.2
137
137
  * (c) 2021 Evan You
@@ -163,6 +163,6 @@ function(t){var e=r,n=e.lib,i=n.WordArray,o=n.Hasher,a=e.algo,s=i.create([0,1,2,
163
163
  * derived from CryptoJS.mode.CTR
164
164
  * Jan Hruby jhruby.web@gmail.com
165
165
  */
166
- r.mode.CTRGladman=function(){var t=r.lib.BlockCipherMode.extend();function e(t){if(255==(t>>24&255)){var e=t>>16&255,n=t>>8&255,r=255&t;255===e?(e=0,255===n?(n=0,255===r?r=0:++r):++n):++e,t=0,t+=e<<16,t+=n<<8,t+=r}else t+=1<<24;return t}var n=t.Encryptor=t.extend({processBlock:function(t,n){var r=this._cipher,i=r.blockSize,o=this._iv,a=this._counter;o&&(a=this._counter=o.slice(0),this._iv=void 0),function(t){0===(t[0]=e(t[0]))&&(t[1]=e(t[1]))}(a);var s=a.slice(0);r.encryptBlock(s,0);for(var c=0;c<i;c++)t[n+c]^=s[c]}});return t.Decryptor=n,t}(),r.mode.CTRGladman)},function(t,e,n){var r,i,o;t.exports=(o=n(0),n(6),o.mode.OFB=(r=o.lib.BlockCipherMode.extend(),i=r.Encryptor=r.extend({processBlock:function(t,e){var n=this._cipher,r=n.blockSize,i=this._iv,o=this._keystream;i&&(o=this._keystream=i.slice(0),this._iv=void 0),n.encryptBlock(o,0);for(var a=0;a<r;a++)t[e+a]^=o[a]}}),r.Decryptor=i,r),o.mode.OFB)},function(t,e,n){var r,i;t.exports=(i=n(0),n(6),i.mode.ECB=((r=i.lib.BlockCipherMode.extend()).Encryptor=r.extend({processBlock:function(t,e){this._cipher.encryptBlock(t,e)}}),r.Decryptor=r.extend({processBlock:function(t,e){this._cipher.decryptBlock(t,e)}}),r),i.mode.ECB)},function(t,e,n){var r;t.exports=(r=n(0),n(6),r.pad.AnsiX923={pad:function(t,e){var n=t.sigBytes,r=4*e,i=r-n%r,o=n+i-1;t.clamp(),t.words[o>>>2]|=i<<24-o%4*8,t.sigBytes+=i},unpad:function(t){var e=255&t.words[t.sigBytes-1>>>2];t.sigBytes-=e}},r.pad.Ansix923)},function(t,e,n){var r;t.exports=(r=n(0),n(6),r.pad.Iso10126={pad:function(t,e){var n=4*e,i=n-t.sigBytes%n;t.concat(r.lib.WordArray.random(i-1)).concat(r.lib.WordArray.create([i<<24],1))},unpad:function(t){var e=255&t.words[t.sigBytes-1>>>2];t.sigBytes-=e}},r.pad.Iso10126)},function(t,e,n){var r;t.exports=(r=n(0),n(6),r.pad.Iso97971={pad:function(t,e){t.concat(r.lib.WordArray.create([2147483648],1)),r.pad.ZeroPadding.pad(t,e)},unpad:function(t){r.pad.ZeroPadding.unpad(t),t.sigBytes--}},r.pad.Iso97971)},function(t,e,n){var r;t.exports=(r=n(0),n(6),r.pad.ZeroPadding={pad:function(t,e){var n=4*e;t.clamp(),t.sigBytes+=n-(t.sigBytes%n||n)},unpad:function(t){var e=t.words,n=t.sigBytes-1;for(n=t.sigBytes-1;n>=0;n--)if(e[n>>>2]>>>24-n%4*8&255){t.sigBytes=n+1;break}}},r.pad.ZeroPadding)},function(t,e,n){var r;t.exports=(r=n(0),n(6),r.pad.NoPadding={pad:function(){},unpad:function(){}},r.pad.NoPadding)},function(t,e,n){var r,i,o,a;t.exports=(a=n(0),n(6),i=(r=a).lib.CipherParams,o=r.enc.Hex,r.format.Hex={stringify:function(t){return t.ciphertext.toString(o)},parse:function(t){var e=o.parse(t);return i.create({ciphertext:e})}},a.format.Hex)},function(t,e,n){var r;t.exports=(r=n(0),n(39),n(40),n(30),n(6),function(){var t=r,e=t.lib.BlockCipher,n=t.algo,i=[],o=[],a=[],s=[],c=[],u=[],l=[],h=[],f=[],d=[];!function(){for(var t=[],e=0;e<256;e++)t[e]=e<128?e<<1:e<<1^283;var n=0,r=0;for(e=0;e<256;e++){var p=r^r<<1^r<<2^r<<3^r<<4;p=p>>>8^255&p^99,i[n]=p,o[p]=n;var m=t[n],g=t[m],v=t[g],y=257*t[p]^16843008*p;a[n]=y<<24|y>>>8,s[n]=y<<16|y>>>16,c[n]=y<<8|y>>>24,u[n]=y,y=16843009*v^65537*g^257*m^16843008*n,l[p]=y<<24|y>>>8,h[p]=y<<16|y>>>16,f[p]=y<<8|y>>>24,d[p]=y,n?(n=m^t[t[t[v^m]]],r^=t[t[r]]):n=r=1}}();var p=[0,1,2,4,8,16,32,64,128,27,54],m=n.AES=e.extend({_doReset:function(){if(!this._nRounds||this._keyPriorReset!==this._key){for(var t=this._keyPriorReset=this._key,e=t.words,n=t.sigBytes/4,r=4*((this._nRounds=n+6)+1),o=this._keySchedule=[],a=0;a<r;a++)a<n?o[a]=e[a]:(u=o[a-1],a%n?n>6&&a%n==4&&(u=i[u>>>24]<<24|i[u>>>16&255]<<16|i[u>>>8&255]<<8|i[255&u]):(u=i[(u=u<<8|u>>>24)>>>24]<<24|i[u>>>16&255]<<16|i[u>>>8&255]<<8|i[255&u],u^=p[a/n|0]<<24),o[a]=o[a-n]^u);for(var s=this._invKeySchedule=[],c=0;c<r;c++){if(a=r-c,c%4)var u=o[a];else u=o[a-4];s[c]=c<4||a<=4?u:l[i[u>>>24]]^h[i[u>>>16&255]]^f[i[u>>>8&255]]^d[i[255&u]]}}},encryptBlock:function(t,e){this._doCryptBlock(t,e,this._keySchedule,a,s,c,u,i)},decryptBlock:function(t,e){var n=t[e+1];t[e+1]=t[e+3],t[e+3]=n,this._doCryptBlock(t,e,this._invKeySchedule,l,h,f,d,o),n=t[e+1],t[e+1]=t[e+3],t[e+3]=n},_doCryptBlock:function(t,e,n,r,i,o,a,s){for(var c=this._nRounds,u=t[e]^n[0],l=t[e+1]^n[1],h=t[e+2]^n[2],f=t[e+3]^n[3],d=4,p=1;p<c;p++){var m=r[u>>>24]^i[l>>>16&255]^o[h>>>8&255]^a[255&f]^n[d++],g=r[l>>>24]^i[h>>>16&255]^o[f>>>8&255]^a[255&u]^n[d++],v=r[h>>>24]^i[f>>>16&255]^o[u>>>8&255]^a[255&l]^n[d++],y=r[f>>>24]^i[u>>>16&255]^o[l>>>8&255]^a[255&h]^n[d++];u=m,l=g,h=v,f=y}m=(s[u>>>24]<<24|s[l>>>16&255]<<16|s[h>>>8&255]<<8|s[255&f])^n[d++],g=(s[l>>>24]<<24|s[h>>>16&255]<<16|s[f>>>8&255]<<8|s[255&u])^n[d++],v=(s[h>>>24]<<24|s[f>>>16&255]<<16|s[u>>>8&255]<<8|s[255&l])^n[d++],y=(s[f>>>24]<<24|s[u>>>16&255]<<16|s[l>>>8&255]<<8|s[255&h])^n[d++],t[e]=m,t[e+1]=g,t[e+2]=v,t[e+3]=y},keySize:8});t.AES=e._createHelper(m)}(),r.AES)},function(t,e,n){var r;t.exports=(r=n(0),n(39),n(40),n(30),n(6),function(){var t=r,e=t.lib,n=e.WordArray,i=e.BlockCipher,o=t.algo,a=[57,49,41,33,25,17,9,1,58,50,42,34,26,18,10,2,59,51,43,35,27,19,11,3,60,52,44,36,63,55,47,39,31,23,15,7,62,54,46,38,30,22,14,6,61,53,45,37,29,21,13,5,28,20,12,4],s=[14,17,11,24,1,5,3,28,15,6,21,10,23,19,12,4,26,8,16,7,27,20,13,2,41,52,31,37,47,55,30,40,51,45,33,48,44,49,39,56,34,53,46,42,50,36,29,32],c=[1,2,4,6,8,10,12,14,15,17,19,21,23,25,27,28],u=[{0:8421888,268435456:32768,536870912:8421378,805306368:2,1073741824:512,1342177280:8421890,1610612736:8389122,1879048192:8388608,2147483648:514,2415919104:8389120,2684354560:33280,2952790016:8421376,3221225472:32770,3489660928:8388610,3758096384:0,4026531840:33282,134217728:0,402653184:8421890,671088640:33282,939524096:32768,1207959552:8421888,1476395008:512,1744830464:8421378,2013265920:2,2281701376:8389120,2550136832:33280,2818572288:8421376,3087007744:8389122,3355443200:8388610,3623878656:32770,3892314112:514,4160749568:8388608,1:32768,268435457:2,536870913:8421888,805306369:8388608,1073741825:8421378,1342177281:33280,1610612737:512,1879048193:8389122,2147483649:8421890,2415919105:8421376,2684354561:8388610,2952790017:33282,3221225473:514,3489660929:8389120,3758096385:32770,4026531841:0,134217729:8421890,402653185:8421376,671088641:8388608,939524097:512,1207959553:32768,1476395009:8388610,1744830465:2,2013265921:33282,2281701377:32770,2550136833:8389122,2818572289:514,3087007745:8421888,3355443201:8389120,3623878657:0,3892314113:33280,4160749569:8421378},{0:1074282512,16777216:16384,33554432:524288,50331648:1074266128,67108864:1073741840,83886080:1074282496,100663296:1073758208,117440512:16,134217728:540672,150994944:1073758224,167772160:1073741824,184549376:540688,201326592:524304,218103808:0,234881024:16400,251658240:1074266112,8388608:1073758208,25165824:540688,41943040:16,58720256:1073758224,75497472:1074282512,92274688:1073741824,109051904:524288,125829120:1074266128,142606336:524304,159383552:0,176160768:16384,192937984:1074266112,209715200:1073741840,226492416:540672,243269632:1074282496,260046848:16400,268435456:0,285212672:1074266128,301989888:1073758224,318767104:1074282496,335544320:1074266112,352321536:16,369098752:540688,385875968:16384,402653184:16400,419430400:524288,436207616:524304,452984832:1073741840,469762048:540672,486539264:1073758208,503316480:1073741824,520093696:1074282512,276824064:540688,293601280:524288,310378496:1074266112,327155712:16384,343932928:1073758208,360710144:1074282512,377487360:16,394264576:1073741824,411041792:1074282496,427819008:1073741840,444596224:1073758224,461373440:524304,478150656:0,494927872:16400,511705088:1074266128,528482304:540672},{0:260,1048576:0,2097152:67109120,3145728:65796,4194304:65540,5242880:67108868,6291456:67174660,7340032:67174400,8388608:67108864,9437184:67174656,10485760:65792,11534336:67174404,12582912:67109124,13631488:65536,14680064:4,15728640:256,524288:67174656,1572864:67174404,2621440:0,3670016:67109120,4718592:67108868,5767168:65536,6815744:65540,7864320:260,8912896:4,9961472:256,11010048:67174400,12058624:65796,13107200:65792,14155776:67109124,15204352:67174660,16252928:67108864,16777216:67174656,17825792:65540,18874368:65536,19922944:67109120,20971520:256,22020096:67174660,23068672:67108868,24117248:0,25165824:67109124,26214400:67108864,27262976:4,28311552:65792,29360128:67174400,30408704:260,31457280:65796,32505856:67174404,17301504:67108864,18350080:260,19398656:67174656,20447232:0,21495808:65540,22544384:67109120,23592960:256,24641536:67174404,25690112:65536,26738688:67174660,27787264:65796,28835840:67108868,29884416:67109124,30932992:67174400,31981568:4,33030144:65792},{0:2151682048,65536:2147487808,131072:4198464,196608:2151677952,262144:0,327680:4198400,393216:2147483712,458752:4194368,524288:2147483648,589824:4194304,655360:64,720896:2147487744,786432:2151678016,851968:4160,917504:4096,983040:2151682112,32768:2147487808,98304:64,163840:2151678016,229376:2147487744,294912:4198400,360448:2151682112,425984:0,491520:2151677952,557056:4096,622592:2151682048,688128:4194304,753664:4160,819200:2147483648,884736:4194368,950272:4198464,1015808:2147483712,1048576:4194368,1114112:4198400,1179648:2147483712,1245184:0,1310720:4160,1376256:2151678016,1441792:2151682048,1507328:2147487808,1572864:2151682112,1638400:2147483648,1703936:2151677952,1769472:4198464,1835008:2147487744,1900544:4194304,1966080:64,2031616:4096,1081344:2151677952,1146880:2151682112,1212416:0,1277952:4198400,1343488:4194368,1409024:2147483648,1474560:2147487808,1540096:64,1605632:2147483712,1671168:4096,1736704:2147487744,1802240:2151678016,1867776:4160,1933312:2151682048,1998848:4194304,2064384:4198464},{0:128,4096:17039360,8192:262144,12288:536870912,16384:537133184,20480:16777344,24576:553648256,28672:262272,32768:16777216,36864:537133056,40960:536871040,45056:553910400,49152:553910272,53248:0,57344:17039488,61440:553648128,2048:17039488,6144:553648256,10240:128,14336:17039360,18432:262144,22528:537133184,26624:553910272,30720:536870912,34816:537133056,38912:0,43008:553910400,47104:16777344,51200:536871040,55296:553648128,59392:16777216,63488:262272,65536:262144,69632:128,73728:536870912,77824:553648256,81920:16777344,86016:553910272,90112:537133184,94208:16777216,98304:553910400,102400:553648128,106496:17039360,110592:537133056,114688:262272,118784:536871040,122880:0,126976:17039488,67584:553648256,71680:16777216,75776:17039360,79872:537133184,83968:536870912,88064:17039488,92160:128,96256:553910272,100352:262272,104448:553910400,108544:0,112640:553648128,116736:16777344,120832:262144,124928:537133056,129024:536871040},{0:268435464,256:8192,512:270532608,768:270540808,1024:268443648,1280:2097152,1536:2097160,1792:268435456,2048:0,2304:268443656,2560:2105344,2816:8,3072:270532616,3328:2105352,3584:8200,3840:270540800,128:270532608,384:270540808,640:8,896:2097152,1152:2105352,1408:268435464,1664:268443648,1920:8200,2176:2097160,2432:8192,2688:268443656,2944:270532616,3200:0,3456:270540800,3712:2105344,3968:268435456,4096:268443648,4352:270532616,4608:270540808,4864:8200,5120:2097152,5376:268435456,5632:268435464,5888:2105344,6144:2105352,6400:0,6656:8,6912:270532608,7168:8192,7424:268443656,7680:270540800,7936:2097160,4224:8,4480:2105344,4736:2097152,4992:268435464,5248:268443648,5504:8200,5760:270540808,6016:270532608,6272:270540800,6528:270532616,6784:8192,7040:2105352,7296:2097160,7552:0,7808:268435456,8064:268443656},{0:1048576,16:33555457,32:1024,48:1049601,64:34604033,80:0,96:1,112:34603009,128:33555456,144:1048577,160:33554433,176:34604032,192:34603008,208:1025,224:1049600,240:33554432,8:34603009,24:0,40:33555457,56:34604032,72:1048576,88:33554433,104:33554432,120:1025,136:1049601,152:33555456,168:34603008,184:1048577,200:1024,216:34604033,232:1,248:1049600,256:33554432,272:1048576,288:33555457,304:34603009,320:1048577,336:33555456,352:34604032,368:1049601,384:1025,400:34604033,416:1049600,432:1,448:0,464:34603008,480:33554433,496:1024,264:1049600,280:33555457,296:34603009,312:1,328:33554432,344:1048576,360:1025,376:34604032,392:33554433,408:34603008,424:0,440:34604033,456:1049601,472:1024,488:33555456,504:1048577},{0:134219808,1:131072,2:134217728,3:32,4:131104,5:134350880,6:134350848,7:2048,8:134348800,9:134219776,10:133120,11:134348832,12:2080,13:0,14:134217760,15:133152,2147483648:2048,2147483649:134350880,2147483650:134219808,2147483651:134217728,2147483652:134348800,2147483653:133120,2147483654:133152,2147483655:32,2147483656:134217760,2147483657:2080,2147483658:131104,2147483659:134350848,2147483660:0,2147483661:134348832,2147483662:134219776,2147483663:131072,16:133152,17:134350848,18:32,19:2048,20:134219776,21:134217760,22:134348832,23:131072,24:0,25:131104,26:134348800,27:134219808,28:134350880,29:133120,30:2080,31:134217728,2147483664:131072,2147483665:2048,2147483666:134348832,2147483667:133152,2147483668:32,2147483669:134348800,2147483670:134217728,2147483671:134219808,2147483672:134350880,2147483673:134217760,2147483674:134219776,2147483675:0,2147483676:133120,2147483677:2080,2147483678:131104,2147483679:134350848}],l=[4160749569,528482304,33030144,2064384,129024,8064,504,2147483679],h=o.DES=i.extend({_doReset:function(){for(var t=this._key.words,e=[],n=0;n<56;n++){var r=a[n]-1;e[n]=t[r>>>5]>>>31-r%32&1}for(var i=this._subKeys=[],o=0;o<16;o++){var u=i[o]=[],l=c[o];for(n=0;n<24;n++)u[n/6|0]|=e[(s[n]-1+l)%28]<<31-n%6,u[4+(n/6|0)]|=e[28+(s[n+24]-1+l)%28]<<31-n%6;for(u[0]=u[0]<<1|u[0]>>>31,n=1;n<7;n++)u[n]=u[n]>>>4*(n-1)+3;u[7]=u[7]<<5|u[7]>>>27}var h=this._invSubKeys=[];for(n=0;n<16;n++)h[n]=i[15-n]},encryptBlock:function(t,e){this._doCryptBlock(t,e,this._subKeys)},decryptBlock:function(t,e){this._doCryptBlock(t,e,this._invSubKeys)},_doCryptBlock:function(t,e,n){this._lBlock=t[e],this._rBlock=t[e+1],f.call(this,4,252645135),f.call(this,16,65535),d.call(this,2,858993459),d.call(this,8,16711935),f.call(this,1,1431655765);for(var r=0;r<16;r++){for(var i=n[r],o=this._lBlock,a=this._rBlock,s=0,c=0;c<8;c++)s|=u[c][((a^i[c])&l[c])>>>0];this._lBlock=a,this._rBlock=o^s}var h=this._lBlock;this._lBlock=this._rBlock,this._rBlock=h,f.call(this,1,1431655765),d.call(this,8,16711935),d.call(this,2,858993459),f.call(this,16,65535),f.call(this,4,252645135),t[e]=this._lBlock,t[e+1]=this._rBlock},keySize:2,ivSize:2,blockSize:2});function f(t,e){var n=(this._lBlock>>>t^this._rBlock)&e;this._rBlock^=n,this._lBlock^=n<<t}function d(t,e){var n=(this._rBlock>>>t^this._lBlock)&e;this._lBlock^=n,this._rBlock^=n<<t}t.DES=i._createHelper(h);var p=o.TripleDES=i.extend({_doReset:function(){var t=this._key.words;if(2!==t.length&&4!==t.length&&t.length<6)throw new Error("Invalid key length - 3DES requires the key length to be 64, 128, 192 or >192.");var e=t.slice(0,2),r=t.length<4?t.slice(0,2):t.slice(2,4),i=t.length<6?t.slice(0,2):t.slice(4,6);this._des1=h.createEncryptor(n.create(e)),this._des2=h.createEncryptor(n.create(r)),this._des3=h.createEncryptor(n.create(i))},encryptBlock:function(t,e){this._des1.encryptBlock(t,e),this._des2.decryptBlock(t,e),this._des3.encryptBlock(t,e)},decryptBlock:function(t,e){this._des3.decryptBlock(t,e),this._des2.encryptBlock(t,e),this._des1.decryptBlock(t,e)},keySize:6,ivSize:2,blockSize:2});t.TripleDES=i._createHelper(p)}(),r.TripleDES)},function(t,e,n){var r;t.exports=(r=n(0),n(39),n(40),n(30),n(6),function(){var t=r,e=t.lib.StreamCipher,n=t.algo,i=n.RC4=e.extend({_doReset:function(){for(var t=this._key,e=t.words,n=t.sigBytes,r=this._S=[],i=0;i<256;i++)r[i]=i;i=0;for(var o=0;i<256;i++){var a=i%n,s=e[a>>>2]>>>24-a%4*8&255;o=(o+r[i]+s)%256;var c=r[i];r[i]=r[o],r[o]=c}this._i=this._j=0},_doProcessBlock:function(t,e){t[e]^=o.call(this)},keySize:8,ivSize:0});function o(){for(var t=this._S,e=this._i,n=this._j,r=0,i=0;i<4;i++){n=(n+t[e=(e+1)%256])%256;var o=t[e];t[e]=t[n],t[n]=o,r|=t[(t[e]+t[n])%256]<<24-8*i}return this._i=e,this._j=n,r}t.RC4=e._createHelper(i);var a=n.RC4Drop=i.extend({cfg:i.cfg.extend({drop:192}),_doReset:function(){i._doReset.call(this);for(var t=this.cfg.drop;t>0;t--)o.call(this)}});t.RC4Drop=e._createHelper(a)}(),r.RC4)},function(t,e,n){var r;t.exports=(r=n(0),n(39),n(40),n(30),n(6),function(){var t=r,e=t.lib.StreamCipher,n=t.algo,i=[],o=[],a=[],s=n.Rabbit=e.extend({_doReset:function(){for(var t=this._key.words,e=this.cfg.iv,n=0;n<4;n++)t[n]=16711935&(t[n]<<8|t[n]>>>24)|4278255360&(t[n]<<24|t[n]>>>8);var r=this._X=[t[0],t[3]<<16|t[2]>>>16,t[1],t[0]<<16|t[3]>>>16,t[2],t[1]<<16|t[0]>>>16,t[3],t[2]<<16|t[1]>>>16],i=this._C=[t[2]<<16|t[2]>>>16,4294901760&t[0]|65535&t[1],t[3]<<16|t[3]>>>16,4294901760&t[1]|65535&t[2],t[0]<<16|t[0]>>>16,4294901760&t[2]|65535&t[3],t[1]<<16|t[1]>>>16,4294901760&t[3]|65535&t[0]];for(this._b=0,n=0;n<4;n++)c.call(this);for(n=0;n<8;n++)i[n]^=r[n+4&7];if(e){var o=e.words,a=o[0],s=o[1],u=16711935&(a<<8|a>>>24)|4278255360&(a<<24|a>>>8),l=16711935&(s<<8|s>>>24)|4278255360&(s<<24|s>>>8),h=u>>>16|4294901760&l,f=l<<16|65535&u;for(i[0]^=u,i[1]^=h,i[2]^=l,i[3]^=f,i[4]^=u,i[5]^=h,i[6]^=l,i[7]^=f,n=0;n<4;n++)c.call(this)}},_doProcessBlock:function(t,e){var n=this._X;c.call(this),i[0]=n[0]^n[5]>>>16^n[3]<<16,i[1]=n[2]^n[7]>>>16^n[5]<<16,i[2]=n[4]^n[1]>>>16^n[7]<<16,i[3]=n[6]^n[3]>>>16^n[1]<<16;for(var r=0;r<4;r++)i[r]=16711935&(i[r]<<8|i[r]>>>24)|4278255360&(i[r]<<24|i[r]>>>8),t[e+r]^=i[r]},blockSize:4,ivSize:2});function c(){for(var t=this._X,e=this._C,n=0;n<8;n++)o[n]=e[n];for(e[0]=e[0]+1295307597+this._b|0,e[1]=e[1]+3545052371+(e[0]>>>0<o[0]>>>0?1:0)|0,e[2]=e[2]+886263092+(e[1]>>>0<o[1]>>>0?1:0)|0,e[3]=e[3]+1295307597+(e[2]>>>0<o[2]>>>0?1:0)|0,e[4]=e[4]+3545052371+(e[3]>>>0<o[3]>>>0?1:0)|0,e[5]=e[5]+886263092+(e[4]>>>0<o[4]>>>0?1:0)|0,e[6]=e[6]+1295307597+(e[5]>>>0<o[5]>>>0?1:0)|0,e[7]=e[7]+3545052371+(e[6]>>>0<o[6]>>>0?1:0)|0,this._b=e[7]>>>0<o[7]>>>0?1:0,n=0;n<8;n++){var r=t[n]+e[n],i=65535&r,s=r>>>16,c=((i*i>>>17)+i*s>>>15)+s*s,u=((4294901760&r)*r|0)+((65535&r)*r|0);a[n]=c^u}t[0]=a[0]+(a[7]<<16|a[7]>>>16)+(a[6]<<16|a[6]>>>16)|0,t[1]=a[1]+(a[0]<<8|a[0]>>>24)+a[7]|0,t[2]=a[2]+(a[1]<<16|a[1]>>>16)+(a[0]<<16|a[0]>>>16)|0,t[3]=a[3]+(a[2]<<8|a[2]>>>24)+a[1]|0,t[4]=a[4]+(a[3]<<16|a[3]>>>16)+(a[2]<<16|a[2]>>>16)|0,t[5]=a[5]+(a[4]<<8|a[4]>>>24)+a[3]|0,t[6]=a[6]+(a[5]<<16|a[5]>>>16)+(a[4]<<16|a[4]>>>16)|0,t[7]=a[7]+(a[6]<<8|a[6]>>>24)+a[5]|0}t.Rabbit=e._createHelper(s)}(),r.Rabbit)},function(t,e,n){var r;t.exports=(r=n(0),n(39),n(40),n(30),n(6),function(){var t=r,e=t.lib.StreamCipher,n=t.algo,i=[],o=[],a=[],s=n.RabbitLegacy=e.extend({_doReset:function(){var t=this._key.words,e=this.cfg.iv,n=this._X=[t[0],t[3]<<16|t[2]>>>16,t[1],t[0]<<16|t[3]>>>16,t[2],t[1]<<16|t[0]>>>16,t[3],t[2]<<16|t[1]>>>16],r=this._C=[t[2]<<16|t[2]>>>16,4294901760&t[0]|65535&t[1],t[3]<<16|t[3]>>>16,4294901760&t[1]|65535&t[2],t[0]<<16|t[0]>>>16,4294901760&t[2]|65535&t[3],t[1]<<16|t[1]>>>16,4294901760&t[3]|65535&t[0]];this._b=0;for(var i=0;i<4;i++)c.call(this);for(i=0;i<8;i++)r[i]^=n[i+4&7];if(e){var o=e.words,a=o[0],s=o[1],u=16711935&(a<<8|a>>>24)|4278255360&(a<<24|a>>>8),l=16711935&(s<<8|s>>>24)|4278255360&(s<<24|s>>>8),h=u>>>16|4294901760&l,f=l<<16|65535&u;for(r[0]^=u,r[1]^=h,r[2]^=l,r[3]^=f,r[4]^=u,r[5]^=h,r[6]^=l,r[7]^=f,i=0;i<4;i++)c.call(this)}},_doProcessBlock:function(t,e){var n=this._X;c.call(this),i[0]=n[0]^n[5]>>>16^n[3]<<16,i[1]=n[2]^n[7]>>>16^n[5]<<16,i[2]=n[4]^n[1]>>>16^n[7]<<16,i[3]=n[6]^n[3]>>>16^n[1]<<16;for(var r=0;r<4;r++)i[r]=16711935&(i[r]<<8|i[r]>>>24)|4278255360&(i[r]<<24|i[r]>>>8),t[e+r]^=i[r]},blockSize:4,ivSize:2});function c(){for(var t=this._X,e=this._C,n=0;n<8;n++)o[n]=e[n];for(e[0]=e[0]+1295307597+this._b|0,e[1]=e[1]+3545052371+(e[0]>>>0<o[0]>>>0?1:0)|0,e[2]=e[2]+886263092+(e[1]>>>0<o[1]>>>0?1:0)|0,e[3]=e[3]+1295307597+(e[2]>>>0<o[2]>>>0?1:0)|0,e[4]=e[4]+3545052371+(e[3]>>>0<o[3]>>>0?1:0)|0,e[5]=e[5]+886263092+(e[4]>>>0<o[4]>>>0?1:0)|0,e[6]=e[6]+1295307597+(e[5]>>>0<o[5]>>>0?1:0)|0,e[7]=e[7]+3545052371+(e[6]>>>0<o[6]>>>0?1:0)|0,this._b=e[7]>>>0<o[7]>>>0?1:0,n=0;n<8;n++){var r=t[n]+e[n],i=65535&r,s=r>>>16,c=((i*i>>>17)+i*s>>>15)+s*s,u=((4294901760&r)*r|0)+((65535&r)*r|0);a[n]=c^u}t[0]=a[0]+(a[7]<<16|a[7]>>>16)+(a[6]<<16|a[6]>>>16)|0,t[1]=a[1]+(a[0]<<8|a[0]>>>24)+a[7]|0,t[2]=a[2]+(a[1]<<16|a[1]>>>16)+(a[0]<<16|a[0]>>>16)|0,t[3]=a[3]+(a[2]<<8|a[2]>>>24)+a[1]|0,t[4]=a[4]+(a[3]<<16|a[3]>>>16)+(a[2]<<16|a[2]>>>16)|0,t[5]=a[5]+(a[4]<<8|a[4]>>>24)+a[3]|0,t[6]=a[6]+(a[5]<<16|a[5]>>>16)+(a[4]<<16|a[4]>>>16)|0,t[7]=a[7]+(a[6]<<8|a[6]>>>24)+a[5]|0}t.RabbitLegacy=e._createHelper(s)}(),r.RabbitLegacy)},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default={name:"Refresh",data:function(){return{}},mounted:function(){console.log("***************refresh*****************")},beforeRouteEnter:function(t,e,n){n((function(t){t.$router.replace({path:e.path,query:e.query})}))},render:function(t,e){var n=arguments[0];return n("div")}}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MENU_LIST=void 0;var r=f(n(59)),i=f(n(60)),o=f(n(48)),a=f(n(37)),s=n(10),c=n(17),u=f(n(88)),l=n(3),h=n(35);function f(t){return t&&t.__esModule?t:{default:t}}var d=e.MENU_LIST="menuList",p={namespaced:!0,state:{menu_list:s.localStore.get(d)||[],addRouters:[],appRouters:[],appCurrentHeader:{},currentMap:{},navIndex:0,timeStamp:{},openSidebar:!0,menuEvent:void 0,temporaryRouter:{},frameIsChange:!1,isInNoAUth:!1,skin:{style:"",color:"#0F6EFF"},requestLoading:!1,currentAppWeather:{},currentAppVersion:{},historyAppVersion:[]},mutations:{SET_CURRENT_APP_WEATHER:function(t,e){t.currentAppWeather=e},SET_CURRENT_APP_VERSION:function(t,e){t.currentAppVersion=e},SET_HISTORY_APP_VERSION:function(t,e){t.historyAppVersion=e},SET_IS_IN_NO_AUTH:function(t,e){t.isInNoAUth=e},SET_SKIN:function(t,e){t.skin=e},SET_FRAME_CHANGE:function(t,e){t.frameIsChange=e,(0,l.defer)((function(){t.frameIsChange=!1}))},SET_TEMPORARY_ROUTER:function(t,e){t.temporaryRouter=e},SET_OPEN_SIDEBAR:function(t,e){t.openSidebar=e},SET_MENU_LIST:function(t,e){t.menu_list=e},SET_ROUTERS:function(t,e){t.addRouters=e},SET_APP_ROUTERS:function(t,e){t.appRouters=e},SET_APP_CURRENT_HEADER:function(t,e){t.appCurrentHeader=e},SET_CURRENT_MAP:function(t,e){t.currentMap=e},SET_NAV_INDEX:function(t,e){t.navIndex=e},SET_TIME_STAMP:function(t,e){t.timeStamp=e},SET_MENI_EVENT:function(t,e){t.menuEvent=e}},actions:{appRouters:function(t,e){(0,t.commit)("SET_ROUTERS",e)},GetUserInfo:function(t,e){var n=this,a=t.commit;return new o.default((function(t,o){var f;(0,c.getUserInfo)(e).then((f=(0,i.default)(r.default.mark((function e(i){var o,f,p,m,g,v,y,_,b,x,w;return r.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(0!==i.code){e.next=42;break}return e.next=3,(0,c.getBySysCodes)([s.sessionStore.get("CLIENT_ID")]);case 3:if(o=e.sent,f=i.data,p=f.id,m=f.phone,g=f.consumer,v=f.menuList,y=f.userName,s.localStore.set("userAllInfo",i.data),o&&o.data[0]&&s.localStore.set("APP_PROJECT",u.default.encrypt(o.data[0])),(0,l.isEmpty)(g)||(0,l.isEmpty)(v)){e.next=37;break}return s.localStore.set(d,v),a("SET_MENU_LIST",v),_={userId:p,userName:y,phone:m},s.localStore.set("userMessage",_),s.localStore.set("consumer",g),s.localStore.set("userName",y),s.localStore.set("currentProject",{id:g.id,name:g.name,regionId:g.regionId}),i.data.consumerExtList&&s.localStore.set("consumerExtList",i.data.consumerExtList),a("SET_FRAME_CHANGE",!0),e.next=19,(0,c.getLatelyVersion)();case 19:return b=e.sent,a("SET_CURRENT_APP_VERSION",(0,l.isEmpty)(b)||0!==b.code?{}:b.data),e.next=23,(0,c.getQueryHistory)();case 23:return x=e.sent,a("SET_HISTORY_APP_VERSION",(0,l.isEmpty)(x)||0!==x.code?{}:x.data),e.prev=25,e.next=28,(0,c.getRegionDataInfo)({areaCode:g.regionId});case 28:w=e.sent,a("SET_CURRENT_APP_WEATHER",(0,l.isEmpty)(w)||0!==w.code?{}:w.data),e.next=35;break;case 32:e.prev=32,e.t0=e.catch(25),console.warn(e.t0);case 35:return t(v),e.abrupt("return");case 37:if(!(0,l.isEmpty)(g)&&!(0,l.isEmpty)(v)){e.next=40;break}return t(),e.abrupt("return");case 40:e.next=43;break;case 42:(0,h.logOut)();case 43:case"end":return e.stop()}}),e,n,[[25,32]])}))),function(t){return f.apply(this,arguments)})).catch((function(){(0,h.logOut)()}))}))},LogOut:function(t){var e=t.commit,n=s.localStore.get("IAM_OATH_TYPE");s.localStore.clearAll(),s.localStore.set("IAM_OATH_TYPE",n),e("SET_MENU_LIST",[]),e("SET_ROUTERS",[]),n?window.open(sessionStorage.getItem("IAM_BASE_URL")+"/iam/v1/sys/oauth/logout?"+a.default.stringify({redirectUri:window.origin,oauthType:n}),"_self"):window.open(sessionStorage.getItem("IAM_BASE_URL")+"/iam/v1/sys/oauth/logout?"+a.default.stringify({redirectUri:window.origin}),"_self")}}};e.default=p},function(t,e,n){var r=function(){return this}()||Function("return this")(),i=r.regeneratorRuntime&&Object.getOwnPropertyNames(r).indexOf("regeneratorRuntime")>=0,o=i&&r.regeneratorRuntime;if(r.regeneratorRuntime=void 0,t.exports=n(314),i)r.regeneratorRuntime=o;else try{delete r.regeneratorRuntime}catch(t){r.regeneratorRuntime=void 0}},function(t,e){!function(e){"use strict";var n=Object.prototype,r=n.hasOwnProperty,i="function"==typeof Symbol?Symbol:{},o=i.iterator||"@@iterator",a=i.asyncIterator||"@@asyncIterator",s=i.toStringTag||"@@toStringTag",c="object"==typeof t,u=e.regeneratorRuntime;if(u)c&&(t.exports=u);else{(u=e.regeneratorRuntime=c?t.exports:{}).wrap=m;var l={},h={};h[o]=function(){return this};var f=Object.getPrototypeOf,d=f&&f(f(E([])));d&&d!==n&&r.call(d,o)&&(h=d);var p=_.prototype=v.prototype=Object.create(h);y.prototype=p.constructor=_,_.constructor=y,_[s]=y.displayName="GeneratorFunction",u.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===y||"GeneratorFunction"===(e.displayName||e.name))},u.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,_):(t.__proto__=_,s in t||(t[s]="GeneratorFunction")),t.prototype=Object.create(p),t},u.awrap=function(t){return{__await:t}},b(x.prototype),x.prototype[a]=function(){return this},u.AsyncIterator=x,u.async=function(t,e,n,r){var i=new x(m(t,e,n,r));return u.isGeneratorFunction(e)?i:i.next().then((function(t){return t.done?t.value:i.next()}))},b(p),p[s]="Generator",p[o]=function(){return this},p.toString=function(){return"[object Generator]"},u.keys=function(t){var e=[];for(var n in t)e.push(n);return e.reverse(),function n(){for(;e.length;){var r=e.pop();if(r in t)return n.value=r,n.done=!1,n}return n.done=!0,n}},u.values=E,A.prototype={constructor:A,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(S),!t)for(var e in this)"t"===e.charAt(0)&&r.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function n(n,r){return a.type="throw",a.arg=t,e.next=n,r&&(e.method="next",e.arg=void 0),!!r}for(var i=this.tryEntries.length-1;i>=0;--i){var o=this.tryEntries[i],a=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var s=r.call(o,"catchLoc"),c=r.call(o,"finallyLoc");if(s&&c){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(s){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&r.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=t,a.arg=e,o?(this.method="next",this.next=o.finallyLoc,l):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),l},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),S(n),l}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var i=r.arg;S(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:E(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=void 0),l}}}function m(t,e,n,r){var i=e&&e.prototype instanceof v?e:v,o=Object.create(i.prototype),a=new A(r||[]);return o._invoke=function(t,e,n){var r="suspendedStart";return function(i,o){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===i)throw o;return C()}for(n.method=i,n.arg=o;;){var a=n.delegate;if(a){var s=w(a,n);if(s){if(s===l)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var c=g(t,e,n);if("normal"===c.type){if(r=n.done?"completed":"suspendedYield",c.arg===l)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(r="completed",n.method="throw",n.arg=c.arg)}}}(t,n,a),o}function g(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}function v(){}function y(){}function _(){}function b(t){["next","throw","return"].forEach((function(e){t[e]=function(t){return this._invoke(e,t)}}))}function x(t){var e;this._invoke=function(n,i){function o(){return new Promise((function(e,o){!function e(n,i,o,a){var s=g(t[n],t,i);if("throw"!==s.type){var c=s.arg,u=c.value;return u&&"object"==typeof u&&r.call(u,"__await")?Promise.resolve(u.__await).then((function(t){e("next",t,o,a)}),(function(t){e("throw",t,o,a)})):Promise.resolve(u).then((function(t){c.value=t,o(c)}),a)}a(s.arg)}(n,i,e,o)}))}return e=e?e.then(o,o):o()}}function w(t,e){var n=t.iterator[e.method];if(void 0===n){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=void 0,w(t,e),"throw"===e.method))return l;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return l}var r=g(n,t.iterator,e.arg);if("throw"===r.type)return e.method="throw",e.arg=r.arg,e.delegate=null,l;var i=r.arg;return i?i.done?(e[t.resultName]=i.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,l):i:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,l)}function M(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function S(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function A(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(M,this),this.reset(!0)}function E(t){if(t){var e=t[o];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,i=function e(){for(;++n<t.length;)if(r.call(t,n))return e.value=t[n],e.done=!1,e;return e.value=void 0,e.done=!0,e};return i.next=i}}return{next:C}}function C(){return{value:void 0,done:!0}}}(function(){return this}()||Function("return this")())},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.registerPermission=void 0;var r=p(n(59)),i=p(n(9)),o=p(n(60)),a=n(17),s=n(10),c=p(n(316));n(317);var u=n(3),l=n(91),h=n(50),f=p(n(37)),d=n(35);p(n(98));function p(t){return t&&t.__esModule?t:{default:t}}e.registerPermission=function(t,e){var n,p=t.routerInstance,g=t.storeInstance,v=t.basicOptions;p.beforeEach((n=(0,o.default)(r.default.mark((function t(n,o,y){var _,b,x,w,M,S,A,E;return r.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(g.commit("user/SET_TEMPORARY_ROUTER",{to:n,from:o}),c.default.start(),n.meta.title&&(_=s.sessionStore.get("SYS_PROJECT_NAME"),document.title=n.meta.title+(_?"-"+_:"")),b=s.localStore.get("access_token"),!n.query||!n.query.error||"unsupported_response_type"!==n.query.error){t.next=7;break}return(0,d.logOut)(),t.abrupt("return");case 7:if(!n.path.includes("/noAllow")){t.next=10;break}return y(),t.abrupt("return");case 10:if((0,u.isEmpty)(v.routesWhiteList)||!v.routesWhiteList.includes(n.path)){t.next=13;break}return y(),t.abrupt("return");case 13:if(!b){t.next=24;break}if((0,u.isEmpty)(g.state.user.addRouters)){t.next=18;break}m(n,o,y),t.next=22;break;case 18:return t.next=20,g.dispatch("user/GetUserInfo",{loadAuth:!0,sysCode:s.sessionStore.get("CLIENT_ID")});case 20:x=t.sent,(0,u.isEmpty)(x)?y({path:"/noAllow",replace:!0}):((0,l.setAsyncRoutes)(p,g,x,e,v),y({path:n.fullPath,replace:!0}));case 22:t.next=26;break;case 24:w=(0,h.getUrlParam)("code"),(0,u.isEmpty)(w)?(M=(0,h.getUrlParam)("oauthType"),S={responseType:w||"code",clientId:s.sessionStore.get("CLIENT_ID"),redirectUri:window.origin,scope:"all",state:"hello"},M?(s.localStore.set("IAM_OATH_TYPE",M),S=(0,i.default)(S,{oauthType:M}),window.open(s.sessionStore.get("IAM_BASE_URL")+"/iam/v1/sys/oauth/authorize?"+f.default.stringify(S),"_self")):window.open(s.sessionStore.get("IAM_BASE_URL")+"/iam/v1/sys/oauth/authorize?"+f.default.stringify(S),"_self")):(A={code:w,grantType:"authorization_code",redirectUri:window.origin,sysCode:s.sessionStore.get("CLIENT_ID"),sysSecret:s.sessionStore.get("SYS_SECRET")},(E=s.localStore.get("IAM_OATH_TYPE"))&&(A=(0,i.default)(A,{oauthType:E})),(0,a.getToken)(A).then((function(t){if(t.data){var e=t.data,r=e.access_token,i=e.refresh_token,o=e.expires_in;s.localStore.set("access_token",r),s.localStore.set("refresh_token",i);var a=new Date;if(s.localStore.set("token_expires_in",new Date(a.setSeconds(a.getSeconds()+parseInt(o))).getTime()),E){var c=t.data,u=c.idp_access_token,l=c.idp_refresh_token;s.localStore.set("idp_access_token",u),s.localStore.set("idp_refresh_token",l)}y({path:n.fullPath,replace:!0})}})));case 26:case"end":return t.stop()}}),t,void 0)}))),function(t,e,r){return n.apply(this,arguments)})),p.afterEach((function(t,e){c.default.done()}))};var m=function(t,e,n){var r=s.localStore.get("test_project");r?t.query.shopId?n():n({path:t.path,query:(0,i.default)({},t.query,{shopId:r.shopId,noLogin:!0,flag:r.flag})}):n()}},function(t,e,n){var r,i;
166
+ r.mode.CTRGladman=function(){var t=r.lib.BlockCipherMode.extend();function e(t){if(255==(t>>24&255)){var e=t>>16&255,n=t>>8&255,r=255&t;255===e?(e=0,255===n?(n=0,255===r?r=0:++r):++n):++e,t=0,t+=e<<16,t+=n<<8,t+=r}else t+=1<<24;return t}var n=t.Encryptor=t.extend({processBlock:function(t,n){var r=this._cipher,i=r.blockSize,o=this._iv,a=this._counter;o&&(a=this._counter=o.slice(0),this._iv=void 0),function(t){0===(t[0]=e(t[0]))&&(t[1]=e(t[1]))}(a);var s=a.slice(0);r.encryptBlock(s,0);for(var c=0;c<i;c++)t[n+c]^=s[c]}});return t.Decryptor=n,t}(),r.mode.CTRGladman)},function(t,e,n){var r,i,o;t.exports=(o=n(0),n(6),o.mode.OFB=(r=o.lib.BlockCipherMode.extend(),i=r.Encryptor=r.extend({processBlock:function(t,e){var n=this._cipher,r=n.blockSize,i=this._iv,o=this._keystream;i&&(o=this._keystream=i.slice(0),this._iv=void 0),n.encryptBlock(o,0);for(var a=0;a<r;a++)t[e+a]^=o[a]}}),r.Decryptor=i,r),o.mode.OFB)},function(t,e,n){var r,i;t.exports=(i=n(0),n(6),i.mode.ECB=((r=i.lib.BlockCipherMode.extend()).Encryptor=r.extend({processBlock:function(t,e){this._cipher.encryptBlock(t,e)}}),r.Decryptor=r.extend({processBlock:function(t,e){this._cipher.decryptBlock(t,e)}}),r),i.mode.ECB)},function(t,e,n){var r;t.exports=(r=n(0),n(6),r.pad.AnsiX923={pad:function(t,e){var n=t.sigBytes,r=4*e,i=r-n%r,o=n+i-1;t.clamp(),t.words[o>>>2]|=i<<24-o%4*8,t.sigBytes+=i},unpad:function(t){var e=255&t.words[t.sigBytes-1>>>2];t.sigBytes-=e}},r.pad.Ansix923)},function(t,e,n){var r;t.exports=(r=n(0),n(6),r.pad.Iso10126={pad:function(t,e){var n=4*e,i=n-t.sigBytes%n;t.concat(r.lib.WordArray.random(i-1)).concat(r.lib.WordArray.create([i<<24],1))},unpad:function(t){var e=255&t.words[t.sigBytes-1>>>2];t.sigBytes-=e}},r.pad.Iso10126)},function(t,e,n){var r;t.exports=(r=n(0),n(6),r.pad.Iso97971={pad:function(t,e){t.concat(r.lib.WordArray.create([2147483648],1)),r.pad.ZeroPadding.pad(t,e)},unpad:function(t){r.pad.ZeroPadding.unpad(t),t.sigBytes--}},r.pad.Iso97971)},function(t,e,n){var r;t.exports=(r=n(0),n(6),r.pad.ZeroPadding={pad:function(t,e){var n=4*e;t.clamp(),t.sigBytes+=n-(t.sigBytes%n||n)},unpad:function(t){var e=t.words,n=t.sigBytes-1;for(n=t.sigBytes-1;n>=0;n--)if(e[n>>>2]>>>24-n%4*8&255){t.sigBytes=n+1;break}}},r.pad.ZeroPadding)},function(t,e,n){var r;t.exports=(r=n(0),n(6),r.pad.NoPadding={pad:function(){},unpad:function(){}},r.pad.NoPadding)},function(t,e,n){var r,i,o,a;t.exports=(a=n(0),n(6),i=(r=a).lib.CipherParams,o=r.enc.Hex,r.format.Hex={stringify:function(t){return t.ciphertext.toString(o)},parse:function(t){var e=o.parse(t);return i.create({ciphertext:e})}},a.format.Hex)},function(t,e,n){var r;t.exports=(r=n(0),n(39),n(40),n(30),n(6),function(){var t=r,e=t.lib.BlockCipher,n=t.algo,i=[],o=[],a=[],s=[],c=[],u=[],l=[],h=[],f=[],d=[];!function(){for(var t=[],e=0;e<256;e++)t[e]=e<128?e<<1:e<<1^283;var n=0,r=0;for(e=0;e<256;e++){var p=r^r<<1^r<<2^r<<3^r<<4;p=p>>>8^255&p^99,i[n]=p,o[p]=n;var m=t[n],g=t[m],v=t[g],y=257*t[p]^16843008*p;a[n]=y<<24|y>>>8,s[n]=y<<16|y>>>16,c[n]=y<<8|y>>>24,u[n]=y,y=16843009*v^65537*g^257*m^16843008*n,l[p]=y<<24|y>>>8,h[p]=y<<16|y>>>16,f[p]=y<<8|y>>>24,d[p]=y,n?(n=m^t[t[t[v^m]]],r^=t[t[r]]):n=r=1}}();var p=[0,1,2,4,8,16,32,64,128,27,54],m=n.AES=e.extend({_doReset:function(){if(!this._nRounds||this._keyPriorReset!==this._key){for(var t=this._keyPriorReset=this._key,e=t.words,n=t.sigBytes/4,r=4*((this._nRounds=n+6)+1),o=this._keySchedule=[],a=0;a<r;a++)a<n?o[a]=e[a]:(u=o[a-1],a%n?n>6&&a%n==4&&(u=i[u>>>24]<<24|i[u>>>16&255]<<16|i[u>>>8&255]<<8|i[255&u]):(u=i[(u=u<<8|u>>>24)>>>24]<<24|i[u>>>16&255]<<16|i[u>>>8&255]<<8|i[255&u],u^=p[a/n|0]<<24),o[a]=o[a-n]^u);for(var s=this._invKeySchedule=[],c=0;c<r;c++){if(a=r-c,c%4)var u=o[a];else u=o[a-4];s[c]=c<4||a<=4?u:l[i[u>>>24]]^h[i[u>>>16&255]]^f[i[u>>>8&255]]^d[i[255&u]]}}},encryptBlock:function(t,e){this._doCryptBlock(t,e,this._keySchedule,a,s,c,u,i)},decryptBlock:function(t,e){var n=t[e+1];t[e+1]=t[e+3],t[e+3]=n,this._doCryptBlock(t,e,this._invKeySchedule,l,h,f,d,o),n=t[e+1],t[e+1]=t[e+3],t[e+3]=n},_doCryptBlock:function(t,e,n,r,i,o,a,s){for(var c=this._nRounds,u=t[e]^n[0],l=t[e+1]^n[1],h=t[e+2]^n[2],f=t[e+3]^n[3],d=4,p=1;p<c;p++){var m=r[u>>>24]^i[l>>>16&255]^o[h>>>8&255]^a[255&f]^n[d++],g=r[l>>>24]^i[h>>>16&255]^o[f>>>8&255]^a[255&u]^n[d++],v=r[h>>>24]^i[f>>>16&255]^o[u>>>8&255]^a[255&l]^n[d++],y=r[f>>>24]^i[u>>>16&255]^o[l>>>8&255]^a[255&h]^n[d++];u=m,l=g,h=v,f=y}m=(s[u>>>24]<<24|s[l>>>16&255]<<16|s[h>>>8&255]<<8|s[255&f])^n[d++],g=(s[l>>>24]<<24|s[h>>>16&255]<<16|s[f>>>8&255]<<8|s[255&u])^n[d++],v=(s[h>>>24]<<24|s[f>>>16&255]<<16|s[u>>>8&255]<<8|s[255&l])^n[d++],y=(s[f>>>24]<<24|s[u>>>16&255]<<16|s[l>>>8&255]<<8|s[255&h])^n[d++],t[e]=m,t[e+1]=g,t[e+2]=v,t[e+3]=y},keySize:8});t.AES=e._createHelper(m)}(),r.AES)},function(t,e,n){var r;t.exports=(r=n(0),n(39),n(40),n(30),n(6),function(){var t=r,e=t.lib,n=e.WordArray,i=e.BlockCipher,o=t.algo,a=[57,49,41,33,25,17,9,1,58,50,42,34,26,18,10,2,59,51,43,35,27,19,11,3,60,52,44,36,63,55,47,39,31,23,15,7,62,54,46,38,30,22,14,6,61,53,45,37,29,21,13,5,28,20,12,4],s=[14,17,11,24,1,5,3,28,15,6,21,10,23,19,12,4,26,8,16,7,27,20,13,2,41,52,31,37,47,55,30,40,51,45,33,48,44,49,39,56,34,53,46,42,50,36,29,32],c=[1,2,4,6,8,10,12,14,15,17,19,21,23,25,27,28],u=[{0:8421888,268435456:32768,536870912:8421378,805306368:2,1073741824:512,1342177280:8421890,1610612736:8389122,1879048192:8388608,2147483648:514,2415919104:8389120,2684354560:33280,2952790016:8421376,3221225472:32770,3489660928:8388610,3758096384:0,4026531840:33282,134217728:0,402653184:8421890,671088640:33282,939524096:32768,1207959552:8421888,1476395008:512,1744830464:8421378,2013265920:2,2281701376:8389120,2550136832:33280,2818572288:8421376,3087007744:8389122,3355443200:8388610,3623878656:32770,3892314112:514,4160749568:8388608,1:32768,268435457:2,536870913:8421888,805306369:8388608,1073741825:8421378,1342177281:33280,1610612737:512,1879048193:8389122,2147483649:8421890,2415919105:8421376,2684354561:8388610,2952790017:33282,3221225473:514,3489660929:8389120,3758096385:32770,4026531841:0,134217729:8421890,402653185:8421376,671088641:8388608,939524097:512,1207959553:32768,1476395009:8388610,1744830465:2,2013265921:33282,2281701377:32770,2550136833:8389122,2818572289:514,3087007745:8421888,3355443201:8389120,3623878657:0,3892314113:33280,4160749569:8421378},{0:1074282512,16777216:16384,33554432:524288,50331648:1074266128,67108864:1073741840,83886080:1074282496,100663296:1073758208,117440512:16,134217728:540672,150994944:1073758224,167772160:1073741824,184549376:540688,201326592:524304,218103808:0,234881024:16400,251658240:1074266112,8388608:1073758208,25165824:540688,41943040:16,58720256:1073758224,75497472:1074282512,92274688:1073741824,109051904:524288,125829120:1074266128,142606336:524304,159383552:0,176160768:16384,192937984:1074266112,209715200:1073741840,226492416:540672,243269632:1074282496,260046848:16400,268435456:0,285212672:1074266128,301989888:1073758224,318767104:1074282496,335544320:1074266112,352321536:16,369098752:540688,385875968:16384,402653184:16400,419430400:524288,436207616:524304,452984832:1073741840,469762048:540672,486539264:1073758208,503316480:1073741824,520093696:1074282512,276824064:540688,293601280:524288,310378496:1074266112,327155712:16384,343932928:1073758208,360710144:1074282512,377487360:16,394264576:1073741824,411041792:1074282496,427819008:1073741840,444596224:1073758224,461373440:524304,478150656:0,494927872:16400,511705088:1074266128,528482304:540672},{0:260,1048576:0,2097152:67109120,3145728:65796,4194304:65540,5242880:67108868,6291456:67174660,7340032:67174400,8388608:67108864,9437184:67174656,10485760:65792,11534336:67174404,12582912:67109124,13631488:65536,14680064:4,15728640:256,524288:67174656,1572864:67174404,2621440:0,3670016:67109120,4718592:67108868,5767168:65536,6815744:65540,7864320:260,8912896:4,9961472:256,11010048:67174400,12058624:65796,13107200:65792,14155776:67109124,15204352:67174660,16252928:67108864,16777216:67174656,17825792:65540,18874368:65536,19922944:67109120,20971520:256,22020096:67174660,23068672:67108868,24117248:0,25165824:67109124,26214400:67108864,27262976:4,28311552:65792,29360128:67174400,30408704:260,31457280:65796,32505856:67174404,17301504:67108864,18350080:260,19398656:67174656,20447232:0,21495808:65540,22544384:67109120,23592960:256,24641536:67174404,25690112:65536,26738688:67174660,27787264:65796,28835840:67108868,29884416:67109124,30932992:67174400,31981568:4,33030144:65792},{0:2151682048,65536:2147487808,131072:4198464,196608:2151677952,262144:0,327680:4198400,393216:2147483712,458752:4194368,524288:2147483648,589824:4194304,655360:64,720896:2147487744,786432:2151678016,851968:4160,917504:4096,983040:2151682112,32768:2147487808,98304:64,163840:2151678016,229376:2147487744,294912:4198400,360448:2151682112,425984:0,491520:2151677952,557056:4096,622592:2151682048,688128:4194304,753664:4160,819200:2147483648,884736:4194368,950272:4198464,1015808:2147483712,1048576:4194368,1114112:4198400,1179648:2147483712,1245184:0,1310720:4160,1376256:2151678016,1441792:2151682048,1507328:2147487808,1572864:2151682112,1638400:2147483648,1703936:2151677952,1769472:4198464,1835008:2147487744,1900544:4194304,1966080:64,2031616:4096,1081344:2151677952,1146880:2151682112,1212416:0,1277952:4198400,1343488:4194368,1409024:2147483648,1474560:2147487808,1540096:64,1605632:2147483712,1671168:4096,1736704:2147487744,1802240:2151678016,1867776:4160,1933312:2151682048,1998848:4194304,2064384:4198464},{0:128,4096:17039360,8192:262144,12288:536870912,16384:537133184,20480:16777344,24576:553648256,28672:262272,32768:16777216,36864:537133056,40960:536871040,45056:553910400,49152:553910272,53248:0,57344:17039488,61440:553648128,2048:17039488,6144:553648256,10240:128,14336:17039360,18432:262144,22528:537133184,26624:553910272,30720:536870912,34816:537133056,38912:0,43008:553910400,47104:16777344,51200:536871040,55296:553648128,59392:16777216,63488:262272,65536:262144,69632:128,73728:536870912,77824:553648256,81920:16777344,86016:553910272,90112:537133184,94208:16777216,98304:553910400,102400:553648128,106496:17039360,110592:537133056,114688:262272,118784:536871040,122880:0,126976:17039488,67584:553648256,71680:16777216,75776:17039360,79872:537133184,83968:536870912,88064:17039488,92160:128,96256:553910272,100352:262272,104448:553910400,108544:0,112640:553648128,116736:16777344,120832:262144,124928:537133056,129024:536871040},{0:268435464,256:8192,512:270532608,768:270540808,1024:268443648,1280:2097152,1536:2097160,1792:268435456,2048:0,2304:268443656,2560:2105344,2816:8,3072:270532616,3328:2105352,3584:8200,3840:270540800,128:270532608,384:270540808,640:8,896:2097152,1152:2105352,1408:268435464,1664:268443648,1920:8200,2176:2097160,2432:8192,2688:268443656,2944:270532616,3200:0,3456:270540800,3712:2105344,3968:268435456,4096:268443648,4352:270532616,4608:270540808,4864:8200,5120:2097152,5376:268435456,5632:268435464,5888:2105344,6144:2105352,6400:0,6656:8,6912:270532608,7168:8192,7424:268443656,7680:270540800,7936:2097160,4224:8,4480:2105344,4736:2097152,4992:268435464,5248:268443648,5504:8200,5760:270540808,6016:270532608,6272:270540800,6528:270532616,6784:8192,7040:2105352,7296:2097160,7552:0,7808:268435456,8064:268443656},{0:1048576,16:33555457,32:1024,48:1049601,64:34604033,80:0,96:1,112:34603009,128:33555456,144:1048577,160:33554433,176:34604032,192:34603008,208:1025,224:1049600,240:33554432,8:34603009,24:0,40:33555457,56:34604032,72:1048576,88:33554433,104:33554432,120:1025,136:1049601,152:33555456,168:34603008,184:1048577,200:1024,216:34604033,232:1,248:1049600,256:33554432,272:1048576,288:33555457,304:34603009,320:1048577,336:33555456,352:34604032,368:1049601,384:1025,400:34604033,416:1049600,432:1,448:0,464:34603008,480:33554433,496:1024,264:1049600,280:33555457,296:34603009,312:1,328:33554432,344:1048576,360:1025,376:34604032,392:33554433,408:34603008,424:0,440:34604033,456:1049601,472:1024,488:33555456,504:1048577},{0:134219808,1:131072,2:134217728,3:32,4:131104,5:134350880,6:134350848,7:2048,8:134348800,9:134219776,10:133120,11:134348832,12:2080,13:0,14:134217760,15:133152,2147483648:2048,2147483649:134350880,2147483650:134219808,2147483651:134217728,2147483652:134348800,2147483653:133120,2147483654:133152,2147483655:32,2147483656:134217760,2147483657:2080,2147483658:131104,2147483659:134350848,2147483660:0,2147483661:134348832,2147483662:134219776,2147483663:131072,16:133152,17:134350848,18:32,19:2048,20:134219776,21:134217760,22:134348832,23:131072,24:0,25:131104,26:134348800,27:134219808,28:134350880,29:133120,30:2080,31:134217728,2147483664:131072,2147483665:2048,2147483666:134348832,2147483667:133152,2147483668:32,2147483669:134348800,2147483670:134217728,2147483671:134219808,2147483672:134350880,2147483673:134217760,2147483674:134219776,2147483675:0,2147483676:133120,2147483677:2080,2147483678:131104,2147483679:134350848}],l=[4160749569,528482304,33030144,2064384,129024,8064,504,2147483679],h=o.DES=i.extend({_doReset:function(){for(var t=this._key.words,e=[],n=0;n<56;n++){var r=a[n]-1;e[n]=t[r>>>5]>>>31-r%32&1}for(var i=this._subKeys=[],o=0;o<16;o++){var u=i[o]=[],l=c[o];for(n=0;n<24;n++)u[n/6|0]|=e[(s[n]-1+l)%28]<<31-n%6,u[4+(n/6|0)]|=e[28+(s[n+24]-1+l)%28]<<31-n%6;for(u[0]=u[0]<<1|u[0]>>>31,n=1;n<7;n++)u[n]=u[n]>>>4*(n-1)+3;u[7]=u[7]<<5|u[7]>>>27}var h=this._invSubKeys=[];for(n=0;n<16;n++)h[n]=i[15-n]},encryptBlock:function(t,e){this._doCryptBlock(t,e,this._subKeys)},decryptBlock:function(t,e){this._doCryptBlock(t,e,this._invSubKeys)},_doCryptBlock:function(t,e,n){this._lBlock=t[e],this._rBlock=t[e+1],f.call(this,4,252645135),f.call(this,16,65535),d.call(this,2,858993459),d.call(this,8,16711935),f.call(this,1,1431655765);for(var r=0;r<16;r++){for(var i=n[r],o=this._lBlock,a=this._rBlock,s=0,c=0;c<8;c++)s|=u[c][((a^i[c])&l[c])>>>0];this._lBlock=a,this._rBlock=o^s}var h=this._lBlock;this._lBlock=this._rBlock,this._rBlock=h,f.call(this,1,1431655765),d.call(this,8,16711935),d.call(this,2,858993459),f.call(this,16,65535),f.call(this,4,252645135),t[e]=this._lBlock,t[e+1]=this._rBlock},keySize:2,ivSize:2,blockSize:2});function f(t,e){var n=(this._lBlock>>>t^this._rBlock)&e;this._rBlock^=n,this._lBlock^=n<<t}function d(t,e){var n=(this._rBlock>>>t^this._lBlock)&e;this._lBlock^=n,this._rBlock^=n<<t}t.DES=i._createHelper(h);var p=o.TripleDES=i.extend({_doReset:function(){var t=this._key.words;if(2!==t.length&&4!==t.length&&t.length<6)throw new Error("Invalid key length - 3DES requires the key length to be 64, 128, 192 or >192.");var e=t.slice(0,2),r=t.length<4?t.slice(0,2):t.slice(2,4),i=t.length<6?t.slice(0,2):t.slice(4,6);this._des1=h.createEncryptor(n.create(e)),this._des2=h.createEncryptor(n.create(r)),this._des3=h.createEncryptor(n.create(i))},encryptBlock:function(t,e){this._des1.encryptBlock(t,e),this._des2.decryptBlock(t,e),this._des3.encryptBlock(t,e)},decryptBlock:function(t,e){this._des3.decryptBlock(t,e),this._des2.encryptBlock(t,e),this._des1.decryptBlock(t,e)},keySize:6,ivSize:2,blockSize:2});t.TripleDES=i._createHelper(p)}(),r.TripleDES)},function(t,e,n){var r;t.exports=(r=n(0),n(39),n(40),n(30),n(6),function(){var t=r,e=t.lib.StreamCipher,n=t.algo,i=n.RC4=e.extend({_doReset:function(){for(var t=this._key,e=t.words,n=t.sigBytes,r=this._S=[],i=0;i<256;i++)r[i]=i;i=0;for(var o=0;i<256;i++){var a=i%n,s=e[a>>>2]>>>24-a%4*8&255;o=(o+r[i]+s)%256;var c=r[i];r[i]=r[o],r[o]=c}this._i=this._j=0},_doProcessBlock:function(t,e){t[e]^=o.call(this)},keySize:8,ivSize:0});function o(){for(var t=this._S,e=this._i,n=this._j,r=0,i=0;i<4;i++){n=(n+t[e=(e+1)%256])%256;var o=t[e];t[e]=t[n],t[n]=o,r|=t[(t[e]+t[n])%256]<<24-8*i}return this._i=e,this._j=n,r}t.RC4=e._createHelper(i);var a=n.RC4Drop=i.extend({cfg:i.cfg.extend({drop:192}),_doReset:function(){i._doReset.call(this);for(var t=this.cfg.drop;t>0;t--)o.call(this)}});t.RC4Drop=e._createHelper(a)}(),r.RC4)},function(t,e,n){var r;t.exports=(r=n(0),n(39),n(40),n(30),n(6),function(){var t=r,e=t.lib.StreamCipher,n=t.algo,i=[],o=[],a=[],s=n.Rabbit=e.extend({_doReset:function(){for(var t=this._key.words,e=this.cfg.iv,n=0;n<4;n++)t[n]=16711935&(t[n]<<8|t[n]>>>24)|4278255360&(t[n]<<24|t[n]>>>8);var r=this._X=[t[0],t[3]<<16|t[2]>>>16,t[1],t[0]<<16|t[3]>>>16,t[2],t[1]<<16|t[0]>>>16,t[3],t[2]<<16|t[1]>>>16],i=this._C=[t[2]<<16|t[2]>>>16,4294901760&t[0]|65535&t[1],t[3]<<16|t[3]>>>16,4294901760&t[1]|65535&t[2],t[0]<<16|t[0]>>>16,4294901760&t[2]|65535&t[3],t[1]<<16|t[1]>>>16,4294901760&t[3]|65535&t[0]];for(this._b=0,n=0;n<4;n++)c.call(this);for(n=0;n<8;n++)i[n]^=r[n+4&7];if(e){var o=e.words,a=o[0],s=o[1],u=16711935&(a<<8|a>>>24)|4278255360&(a<<24|a>>>8),l=16711935&(s<<8|s>>>24)|4278255360&(s<<24|s>>>8),h=u>>>16|4294901760&l,f=l<<16|65535&u;for(i[0]^=u,i[1]^=h,i[2]^=l,i[3]^=f,i[4]^=u,i[5]^=h,i[6]^=l,i[7]^=f,n=0;n<4;n++)c.call(this)}},_doProcessBlock:function(t,e){var n=this._X;c.call(this),i[0]=n[0]^n[5]>>>16^n[3]<<16,i[1]=n[2]^n[7]>>>16^n[5]<<16,i[2]=n[4]^n[1]>>>16^n[7]<<16,i[3]=n[6]^n[3]>>>16^n[1]<<16;for(var r=0;r<4;r++)i[r]=16711935&(i[r]<<8|i[r]>>>24)|4278255360&(i[r]<<24|i[r]>>>8),t[e+r]^=i[r]},blockSize:4,ivSize:2});function c(){for(var t=this._X,e=this._C,n=0;n<8;n++)o[n]=e[n];for(e[0]=e[0]+1295307597+this._b|0,e[1]=e[1]+3545052371+(e[0]>>>0<o[0]>>>0?1:0)|0,e[2]=e[2]+886263092+(e[1]>>>0<o[1]>>>0?1:0)|0,e[3]=e[3]+1295307597+(e[2]>>>0<o[2]>>>0?1:0)|0,e[4]=e[4]+3545052371+(e[3]>>>0<o[3]>>>0?1:0)|0,e[5]=e[5]+886263092+(e[4]>>>0<o[4]>>>0?1:0)|0,e[6]=e[6]+1295307597+(e[5]>>>0<o[5]>>>0?1:0)|0,e[7]=e[7]+3545052371+(e[6]>>>0<o[6]>>>0?1:0)|0,this._b=e[7]>>>0<o[7]>>>0?1:0,n=0;n<8;n++){var r=t[n]+e[n],i=65535&r,s=r>>>16,c=((i*i>>>17)+i*s>>>15)+s*s,u=((4294901760&r)*r|0)+((65535&r)*r|0);a[n]=c^u}t[0]=a[0]+(a[7]<<16|a[7]>>>16)+(a[6]<<16|a[6]>>>16)|0,t[1]=a[1]+(a[0]<<8|a[0]>>>24)+a[7]|0,t[2]=a[2]+(a[1]<<16|a[1]>>>16)+(a[0]<<16|a[0]>>>16)|0,t[3]=a[3]+(a[2]<<8|a[2]>>>24)+a[1]|0,t[4]=a[4]+(a[3]<<16|a[3]>>>16)+(a[2]<<16|a[2]>>>16)|0,t[5]=a[5]+(a[4]<<8|a[4]>>>24)+a[3]|0,t[6]=a[6]+(a[5]<<16|a[5]>>>16)+(a[4]<<16|a[4]>>>16)|0,t[7]=a[7]+(a[6]<<8|a[6]>>>24)+a[5]|0}t.Rabbit=e._createHelper(s)}(),r.Rabbit)},function(t,e,n){var r;t.exports=(r=n(0),n(39),n(40),n(30),n(6),function(){var t=r,e=t.lib.StreamCipher,n=t.algo,i=[],o=[],a=[],s=n.RabbitLegacy=e.extend({_doReset:function(){var t=this._key.words,e=this.cfg.iv,n=this._X=[t[0],t[3]<<16|t[2]>>>16,t[1],t[0]<<16|t[3]>>>16,t[2],t[1]<<16|t[0]>>>16,t[3],t[2]<<16|t[1]>>>16],r=this._C=[t[2]<<16|t[2]>>>16,4294901760&t[0]|65535&t[1],t[3]<<16|t[3]>>>16,4294901760&t[1]|65535&t[2],t[0]<<16|t[0]>>>16,4294901760&t[2]|65535&t[3],t[1]<<16|t[1]>>>16,4294901760&t[3]|65535&t[0]];this._b=0;for(var i=0;i<4;i++)c.call(this);for(i=0;i<8;i++)r[i]^=n[i+4&7];if(e){var o=e.words,a=o[0],s=o[1],u=16711935&(a<<8|a>>>24)|4278255360&(a<<24|a>>>8),l=16711935&(s<<8|s>>>24)|4278255360&(s<<24|s>>>8),h=u>>>16|4294901760&l,f=l<<16|65535&u;for(r[0]^=u,r[1]^=h,r[2]^=l,r[3]^=f,r[4]^=u,r[5]^=h,r[6]^=l,r[7]^=f,i=0;i<4;i++)c.call(this)}},_doProcessBlock:function(t,e){var n=this._X;c.call(this),i[0]=n[0]^n[5]>>>16^n[3]<<16,i[1]=n[2]^n[7]>>>16^n[5]<<16,i[2]=n[4]^n[1]>>>16^n[7]<<16,i[3]=n[6]^n[3]>>>16^n[1]<<16;for(var r=0;r<4;r++)i[r]=16711935&(i[r]<<8|i[r]>>>24)|4278255360&(i[r]<<24|i[r]>>>8),t[e+r]^=i[r]},blockSize:4,ivSize:2});function c(){for(var t=this._X,e=this._C,n=0;n<8;n++)o[n]=e[n];for(e[0]=e[0]+1295307597+this._b|0,e[1]=e[1]+3545052371+(e[0]>>>0<o[0]>>>0?1:0)|0,e[2]=e[2]+886263092+(e[1]>>>0<o[1]>>>0?1:0)|0,e[3]=e[3]+1295307597+(e[2]>>>0<o[2]>>>0?1:0)|0,e[4]=e[4]+3545052371+(e[3]>>>0<o[3]>>>0?1:0)|0,e[5]=e[5]+886263092+(e[4]>>>0<o[4]>>>0?1:0)|0,e[6]=e[6]+1295307597+(e[5]>>>0<o[5]>>>0?1:0)|0,e[7]=e[7]+3545052371+(e[6]>>>0<o[6]>>>0?1:0)|0,this._b=e[7]>>>0<o[7]>>>0?1:0,n=0;n<8;n++){var r=t[n]+e[n],i=65535&r,s=r>>>16,c=((i*i>>>17)+i*s>>>15)+s*s,u=((4294901760&r)*r|0)+((65535&r)*r|0);a[n]=c^u}t[0]=a[0]+(a[7]<<16|a[7]>>>16)+(a[6]<<16|a[6]>>>16)|0,t[1]=a[1]+(a[0]<<8|a[0]>>>24)+a[7]|0,t[2]=a[2]+(a[1]<<16|a[1]>>>16)+(a[0]<<16|a[0]>>>16)|0,t[3]=a[3]+(a[2]<<8|a[2]>>>24)+a[1]|0,t[4]=a[4]+(a[3]<<16|a[3]>>>16)+(a[2]<<16|a[2]>>>16)|0,t[5]=a[5]+(a[4]<<8|a[4]>>>24)+a[3]|0,t[6]=a[6]+(a[5]<<16|a[5]>>>16)+(a[4]<<16|a[4]>>>16)|0,t[7]=a[7]+(a[6]<<8|a[6]>>>24)+a[5]|0}t.RabbitLegacy=e._createHelper(s)}(),r.RabbitLegacy)},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default={name:"Refresh",data:function(){return{}},mounted:function(){console.log("***************refresh*****************")},beforeRouteEnter:function(t,e,n){n((function(t){t.$router.replace({path:e.path,query:e.query})}))},render:function(t,e){var n=arguments[0];return n("div")}}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MENU_LIST=void 0;var r=f(n(59)),i=f(n(60)),o=f(n(48)),a=f(n(37)),s=n(10),c=n(17),u=f(n(88)),l=n(3),h=n(35);function f(t){return t&&t.__esModule?t:{default:t}}var d=e.MENU_LIST="menuList",p={namespaced:!0,state:{menu_list:s.localStore.get(d)||[],addRouters:[],appRouters:[],appCurrentHeader:{},currentMap:{},navIndex:0,timeStamp:{},openSidebar:!0,menuEvent:void 0,temporaryRouter:{},frameIsChange:!1,isInNoAUth:!1,skin:{style:"",color:"#0F6EFF"},requestLoading:!1,currentAppWeather:{},currentAppVersion:{},historyAppVersion:[]},mutations:{SET_CURRENT_APP_WEATHER:function(t,e){t.currentAppWeather=e},SET_CURRENT_APP_VERSION:function(t,e){t.currentAppVersion=e},SET_HISTORY_APP_VERSION:function(t,e){t.historyAppVersion=e},SET_IS_IN_NO_AUTH:function(t,e){t.isInNoAUth=e},SET_SKIN:function(t,e){t.skin=e},SET_FRAME_CHANGE:function(t,e){t.frameIsChange=e,(0,l.defer)((function(){t.frameIsChange=!1}))},SET_TEMPORARY_ROUTER:function(t,e){t.temporaryRouter=e},SET_OPEN_SIDEBAR:function(t,e){t.openSidebar=e},SET_MENU_LIST:function(t,e){t.menu_list=e},SET_ROUTERS:function(t,e){t.addRouters=e},SET_APP_ROUTERS:function(t,e){t.appRouters=e},SET_APP_CURRENT_HEADER:function(t,e){t.appCurrentHeader=e},SET_CURRENT_MAP:function(t,e){t.currentMap=e},SET_NAV_INDEX:function(t,e){t.navIndex=e},SET_TIME_STAMP:function(t,e){t.timeStamp=e},SET_MENI_EVENT:function(t,e){t.menuEvent=e}},actions:{appRouters:function(t,e){(0,t.commit)("SET_ROUTERS",e)},GetUserInfo:function(t,e){var n=this,a=t.commit;return new o.default((function(t,o){var f;(0,c.getUserInfo)(e).then((f=(0,i.default)(r.default.mark((function e(i){var o,f,p,m,g,v,y,_,b,x,w;return r.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(0!==i.code){e.next=42;break}return e.next=3,(0,c.getBySysCodes)([s.sessionStore.get("CLIENT_ID")]);case 3:if(o=e.sent,f=i.data,p=f.id,m=f.phone,g=f.consumer,v=f.menuList,y=f.userName,s.localStore.set("userAllInfo",i.data),o&&o.data[0]&&s.localStore.set("APP_PROJECT",u.default.encrypt(o.data[0])),(0,l.isEmpty)(g)||(0,l.isEmpty)(v)){e.next=37;break}return s.localStore.set(d,v),a("SET_MENU_LIST",v),_={userId:p,userName:y,phone:m},s.localStore.set("userMessage",_),s.localStore.set("consumer",g),s.localStore.set("userName",y),s.localStore.set("currentProject",{id:g.id,name:g.name,regionId:g.regionId}),i.data.consumerExtList&&s.localStore.set("consumerExtList",i.data.consumerExtList),a("SET_FRAME_CHANGE",!0),e.next=19,(0,c.getLatelyVersion)();case 19:return b=e.sent,a("SET_CURRENT_APP_VERSION",(0,l.isEmpty)(b)||0!==b.code?{}:b.data),e.next=23,(0,c.getQueryHistory)();case 23:return x=e.sent,a("SET_HISTORY_APP_VERSION",(0,l.isEmpty)(x)||0!==x.code?{}:x.data),e.prev=25,e.next=28,(0,c.getRegionDataInfo)({areaCode:g.regionId});case 28:w=e.sent,a("SET_CURRENT_APP_WEATHER",(0,l.isEmpty)(w)||0!==w.code?{}:w.data),e.next=35;break;case 32:e.prev=32,e.t0=e.catch(25),console.warn(e.t0);case 35:return t(v),e.abrupt("return");case 37:if(!(0,l.isEmpty)(g)&&!(0,l.isEmpty)(v)){e.next=40;break}return t(),e.abrupt("return");case 40:e.next=43;break;case 42:(0,h.logOut)();case 43:case"end":return e.stop()}}),e,n,[[25,32]])}))),function(t){return f.apply(this,arguments)})).catch((function(){(0,h.logOut)()}))}))},LogOut:function(t){var e=t.commit,n=s.localStore.get("IAM_OATH_TYPE");s.localStore.clearAll(),s.localStore.set("IAM_OATH_TYPE",n),e("SET_MENU_LIST",[]),e("SET_ROUTERS",[]),n?window.open(sessionStorage.getItem("IAM_BASE_URL")+"/iam/v1/sys/oauth/logout?"+a.default.stringify({redirectUri:window.origin,oauthType:n}),"_self"):window.open(sessionStorage.getItem("IAM_BASE_URL")+"/iam/v1/sys/oauth/logout?"+a.default.stringify({redirectUri:window.origin}),"_self")}}};e.default=p},function(t,e,n){var r=function(){return this}()||Function("return this")(),i=r.regeneratorRuntime&&Object.getOwnPropertyNames(r).indexOf("regeneratorRuntime")>=0,o=i&&r.regeneratorRuntime;if(r.regeneratorRuntime=void 0,t.exports=n(314),i)r.regeneratorRuntime=o;else try{delete r.regeneratorRuntime}catch(t){r.regeneratorRuntime=void 0}},function(t,e){!function(e){"use strict";var n=Object.prototype,r=n.hasOwnProperty,i="function"==typeof Symbol?Symbol:{},o=i.iterator||"@@iterator",a=i.asyncIterator||"@@asyncIterator",s=i.toStringTag||"@@toStringTag",c="object"==typeof t,u=e.regeneratorRuntime;if(u)c&&(t.exports=u);else{(u=e.regeneratorRuntime=c?t.exports:{}).wrap=m;var l={},h={};h[o]=function(){return this};var f=Object.getPrototypeOf,d=f&&f(f(E([])));d&&d!==n&&r.call(d,o)&&(h=d);var p=_.prototype=v.prototype=Object.create(h);y.prototype=p.constructor=_,_.constructor=y,_[s]=y.displayName="GeneratorFunction",u.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===y||"GeneratorFunction"===(e.displayName||e.name))},u.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,_):(t.__proto__=_,s in t||(t[s]="GeneratorFunction")),t.prototype=Object.create(p),t},u.awrap=function(t){return{__await:t}},b(x.prototype),x.prototype[a]=function(){return this},u.AsyncIterator=x,u.async=function(t,e,n,r){var i=new x(m(t,e,n,r));return u.isGeneratorFunction(e)?i:i.next().then((function(t){return t.done?t.value:i.next()}))},b(p),p[s]="Generator",p[o]=function(){return this},p.toString=function(){return"[object Generator]"},u.keys=function(t){var e=[];for(var n in t)e.push(n);return e.reverse(),function n(){for(;e.length;){var r=e.pop();if(r in t)return n.value=r,n.done=!1,n}return n.done=!0,n}},u.values=E,A.prototype={constructor:A,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(S),!t)for(var e in this)"t"===e.charAt(0)&&r.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function n(n,r){return a.type="throw",a.arg=t,e.next=n,r&&(e.method="next",e.arg=void 0),!!r}for(var i=this.tryEntries.length-1;i>=0;--i){var o=this.tryEntries[i],a=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var s=r.call(o,"catchLoc"),c=r.call(o,"finallyLoc");if(s&&c){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(s){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&r.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=t,a.arg=e,o?(this.method="next",this.next=o.finallyLoc,l):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),l},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),S(n),l}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var i=r.arg;S(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:E(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=void 0),l}}}function m(t,e,n,r){var i=e&&e.prototype instanceof v?e:v,o=Object.create(i.prototype),a=new A(r||[]);return o._invoke=function(t,e,n){var r="suspendedStart";return function(i,o){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===i)throw o;return C()}for(n.method=i,n.arg=o;;){var a=n.delegate;if(a){var s=w(a,n);if(s){if(s===l)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var c=g(t,e,n);if("normal"===c.type){if(r=n.done?"completed":"suspendedYield",c.arg===l)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(r="completed",n.method="throw",n.arg=c.arg)}}}(t,n,a),o}function g(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}function v(){}function y(){}function _(){}function b(t){["next","throw","return"].forEach((function(e){t[e]=function(t){return this._invoke(e,t)}}))}function x(t){var e;this._invoke=function(n,i){function o(){return new Promise((function(e,o){!function e(n,i,o,a){var s=g(t[n],t,i);if("throw"!==s.type){var c=s.arg,u=c.value;return u&&"object"==typeof u&&r.call(u,"__await")?Promise.resolve(u.__await).then((function(t){e("next",t,o,a)}),(function(t){e("throw",t,o,a)})):Promise.resolve(u).then((function(t){c.value=t,o(c)}),a)}a(s.arg)}(n,i,e,o)}))}return e=e?e.then(o,o):o()}}function w(t,e){var n=t.iterator[e.method];if(void 0===n){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=void 0,w(t,e),"throw"===e.method))return l;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return l}var r=g(n,t.iterator,e.arg);if("throw"===r.type)return e.method="throw",e.arg=r.arg,e.delegate=null,l;var i=r.arg;return i?i.done?(e[t.resultName]=i.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,l):i:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,l)}function M(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function S(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function A(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(M,this),this.reset(!0)}function E(t){if(t){var e=t[o];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,i=function e(){for(;++n<t.length;)if(r.call(t,n))return e.value=t[n],e.done=!1,e;return e.value=void 0,e.done=!0,e};return i.next=i}}return{next:C}}function C(){return{value:void 0,done:!0}}}(function(){return this}()||Function("return this")())},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.registerPermission=void 0;var r=p(n(59)),i=p(n(9)),o=p(n(60)),a=n(17),s=n(10),c=p(n(316));n(317);var u=n(3),l=n(91),h=n(50),f=p(n(37)),d=n(35);p(n(98));function p(t){return t&&t.__esModule?t:{default:t}}e.registerPermission=function(t,e){var n,p=t.routerInstance,g=t.storeInstance,v=t.basicOptions;p.beforeEach((n=(0,o.default)(r.default.mark((function t(n,o,y){var _,b,x,w,M,S,A,E;return r.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(g.commit("user/SET_TEMPORARY_ROUTER",{to:n,from:o}),c.default.start(),n.meta.title&&(_=s.sessionStore.get("SYS_PROJECT_NAME"),document.title=n.meta.title+(_?"-"+_:"")),b=s.localStore.get("access_token"),!n.query||!n.query.error||"unsupported_response_type"!==n.query.error){t.next=7;break}return(0,d.logOut)(),t.abrupt("return");case 7:if(!n.path.includes("/noAllow")){t.next=10;break}return y(),t.abrupt("return");case 10:if((0,u.isEmpty)(v.routesWhiteList)||!v.routesWhiteList.includes(n.path)){t.next=13;break}return y(),t.abrupt("return");case 13:if(!b){t.next=24;break}if((0,u.isEmpty)(g.state.user.addRouters)){t.next=18;break}m(n,o,y),t.next=22;break;case 18:return t.next=20,g.dispatch("user/GetUserInfo",{loadAuth:!0,sysCode:s.sessionStore.get("CLIENT_ID")});case 20:x=t.sent,(0,u.isEmpty)(x)?"/noAllow"===n.path?y():y({path:"/noAllow",replace:!0}):((0,l.setAsyncRoutes)(p,g,x,e,v),y({path:n.fullPath,replace:!0}));case 22:t.next=26;break;case 24:w=(0,h.getUrlParam)("code"),(0,u.isEmpty)(w)?(M=(0,h.getUrlParam)("oauthType"),S={responseType:w||"code",clientId:s.sessionStore.get("CLIENT_ID"),redirectUri:window.origin,scope:"all",state:"hello"},M?(s.localStore.set("IAM_OATH_TYPE",M),S=(0,i.default)(S,{oauthType:M}),window.open(s.sessionStore.get("IAM_BASE_URL")+"/iam/v1/sys/oauth/authorize?"+f.default.stringify(S),"_self")):window.open(s.sessionStore.get("IAM_BASE_URL")+"/iam/v1/sys/oauth/authorize?"+f.default.stringify(S),"_self")):(A={code:w,grantType:"authorization_code",redirectUri:window.origin,sysCode:s.sessionStore.get("CLIENT_ID"),sysSecret:s.sessionStore.get("SYS_SECRET")},(E=s.localStore.get("IAM_OATH_TYPE"))&&(A=(0,i.default)(A,{oauthType:E})),(0,a.getToken)(A).then((function(t){if(t.data){var e=t.data,r=e.access_token,i=e.refresh_token,o=e.expires_in;s.localStore.set("access_token",r),s.localStore.set("refresh_token",i);var a=new Date;if(s.localStore.set("token_expires_in",new Date(a.setSeconds(a.getSeconds()+parseInt(o))).getTime()),E){var c=t.data,u=c.idp_access_token,l=c.idp_refresh_token;s.localStore.set("idp_access_token",u),s.localStore.set("idp_refresh_token",l)}y({path:n.fullPath,replace:!0})}})));case 26:case"end":return t.stop()}}),t,void 0)}))),function(t,e,r){return n.apply(this,arguments)})),p.afterEach((function(t,e){c.default.done()}))};var m=function(t,e,n){var r=s.localStore.get("test_project");r?t.query.shopId?n():n({path:t.path,query:(0,i.default)({},t.query,{shopId:r.shopId,noLogin:!0,flag:r.flag})}):n()}},function(t,e,n){var r,i;
167
167
  /* NProgress, (c) 2013, 2014 Rico Sta. Cruz - http://ricostacruz.com/nprogress
168
168
  * @license MIT */void 0===(i="function"==typeof(r=function(){var t,e,n={version:"0.2.0"},r=n.settings={minimum:.08,easing:"ease",positionUsing:"",speed:200,trickle:!0,trickleRate:.02,trickleSpeed:800,showSpinner:!0,barSelector:'[role="bar"]',spinnerSelector:'[role="spinner"]',parent:"body",template:'<div class="bar" role="bar"><div class="peg"></div></div><div class="spinner" role="spinner"><div class="spinner-icon"></div></div>'};function i(t,e,n){return t<e?e:t>n?n:t}function o(t){return 100*(-1+t)}n.configure=function(t){var e,n;for(e in t)void 0!==(n=t[e])&&t.hasOwnProperty(e)&&(r[e]=n);return this},n.status=null,n.set=function(t){var e=n.isStarted();t=i(t,r.minimum,1),n.status=1===t?null:t;var c=n.render(!e),u=c.querySelector(r.barSelector),l=r.speed,h=r.easing;return c.offsetWidth,a((function(e){""===r.positionUsing&&(r.positionUsing=n.getPositioningCSS()),s(u,function(t,e,n){var i;return(i="translate3d"===r.positionUsing?{transform:"translate3d("+o(t)+"%,0,0)"}:"translate"===r.positionUsing?{transform:"translate("+o(t)+"%,0)"}:{"margin-left":o(t)+"%"}).transition="all "+e+"ms "+n,i}(t,l,h)),1===t?(s(c,{transition:"none",opacity:1}),c.offsetWidth,setTimeout((function(){s(c,{transition:"all "+l+"ms linear",opacity:0}),setTimeout((function(){n.remove(),e()}),l)}),l)):setTimeout(e,l)})),this},n.isStarted=function(){return"number"==typeof n.status},n.start=function(){n.status||n.set(0);var t=function(){setTimeout((function(){n.status&&(n.trickle(),t())}),r.trickleSpeed)};return r.trickle&&t(),this},n.done=function(t){return t||n.status?n.inc(.3+.5*Math.random()).set(1):this},n.inc=function(t){var e=n.status;return e?("number"!=typeof t&&(t=(1-e)*i(Math.random()*e,.1,.95)),e=i(e+t,0,.994),n.set(e)):n.start()},n.trickle=function(){return n.inc(Math.random()*r.trickleRate)},t=0,e=0,n.promise=function(r){return r&&"resolved"!==r.state()?(0===e&&n.start(),t++,e++,r.always((function(){0==--e?(t=0,n.done()):n.set((t-e)/t)})),this):this},n.render=function(t){if(n.isRendered())return document.getElementById("nprogress");u(document.documentElement,"nprogress-busy");var e=document.createElement("div");e.id="nprogress",e.innerHTML=r.template;var i,a=e.querySelector(r.barSelector),c=t?"-100":o(n.status||0),l=document.querySelector(r.parent);return s(a,{transition:"all 0 linear",transform:"translate3d("+c+"%,0,0)"}),r.showSpinner||(i=e.querySelector(r.spinnerSelector))&&f(i),l!=document.body&&u(l,"nprogress-custom-parent"),l.appendChild(e),e},n.remove=function(){l(document.documentElement,"nprogress-busy"),l(document.querySelector(r.parent),"nprogress-custom-parent");var t=document.getElementById("nprogress");t&&f(t)},n.isRendered=function(){return!!document.getElementById("nprogress")},n.getPositioningCSS=function(){var t=document.body.style,e="WebkitTransform"in t?"Webkit":"MozTransform"in t?"Moz":"msTransform"in t?"ms":"OTransform"in t?"O":"";return e+"Perspective"in t?"translate3d":e+"Transform"in t?"translate":"margin"};var a=function(){var t=[];function e(){var n=t.shift();n&&n(e)}return function(n){t.push(n),1==t.length&&e()}}(),s=function(){var t=["Webkit","O","Moz","ms"],e={};function n(n){return n=n.replace(/^-ms-/,"ms-").replace(/-([\da-z])/gi,(function(t,e){return e.toUpperCase()})),e[n]||(e[n]=function(e){var n=document.body.style;if(e in n)return e;for(var r,i=t.length,o=e.charAt(0).toUpperCase()+e.slice(1);i--;)if((r=t[i]+o)in n)return r;return e}(n))}function r(t,e,r){e=n(e),t.style[e]=r}return function(t,e){var n,i,o=arguments;if(2==o.length)for(n in e)void 0!==(i=e[n])&&e.hasOwnProperty(n)&&r(t,n,i);else r(t,o[1],o[2])}}();function c(t,e){return("string"==typeof t?t:h(t)).indexOf(" "+e+" ")>=0}function u(t,e){var n=h(t),r=n+e;c(n,e)||(t.className=r.substring(1))}function l(t,e){var n,r=h(t);c(t,e)&&(n=r.replace(" "+e+" "," "),t.className=n.substring(1,n.length-1))}function h(t){return(" "+(t.className||"")+" ").replace(/\s+/gi," ")}function f(t){t&&t.parentNode&&t.parentNode.removeChild(t)}return n})?r.call(e,n,e,t):r)||(t.exports=i)},function(t,e,n){(e=n(318)(!1)).push([t.i,"/* Make clicks pass-through */\n#nprogress {\n pointer-events: none;\n}\n\n#nprogress .bar {\n background: #29d;\n\n position: fixed;\n z-index: 1031;\n top: 0;\n left: 0;\n\n width: 100%;\n height: 2px;\n}\n\n/* Fancy blur effect */\n#nprogress .peg {\n display: block;\n position: absolute;\n right: 0px;\n width: 100px;\n height: 100%;\n box-shadow: 0 0 10px #29d, 0 0 5px #29d;\n opacity: 1.0;\n\n -webkit-transform: rotate(3deg) translate(0px, -4px);\n -ms-transform: rotate(3deg) translate(0px, -4px);\n transform: rotate(3deg) translate(0px, -4px);\n}\n\n/* Remove these to get rid of the spinner */\n#nprogress .spinner {\n display: block;\n position: fixed;\n z-index: 1031;\n top: 15px;\n right: 15px;\n}\n\n#nprogress .spinner-icon {\n width: 18px;\n height: 18px;\n box-sizing: border-box;\n\n border: solid 2px transparent;\n border-top-color: #29d;\n border-left-color: #29d;\n border-radius: 50%;\n\n -webkit-animation: nprogress-spinner 400ms linear infinite;\n animation: nprogress-spinner 400ms linear infinite;\n}\n\n.nprogress-custom-parent {\n overflow: hidden;\n position: relative;\n}\n\n.nprogress-custom-parent #nprogress .spinner,\n.nprogress-custom-parent #nprogress .bar {\n position: absolute;\n}\n\n@-webkit-keyframes nprogress-spinner {\n 0% { -webkit-transform: rotate(0deg); }\n 100% { -webkit-transform: rotate(360deg); }\n}\n@keyframes nprogress-spinner {\n 0% { transform: rotate(0deg); }\n 100% { transform: rotate(360deg); }\n}\n\n",""]),t.exports=e},function(t,e,n){"use strict";t.exports=function(t){var e=[];return e.toString=function(){return this.map((function(e){var n=function(t,e){var n=t[1]||"",r=t[3];if(!r)return n;if(e&&"function"==typeof btoa){var i=(a=r,s=btoa(unescape(encodeURIComponent(JSON.stringify(a)))),c="sourceMappingURL=data:application/json;charset=utf-8;base64,".concat(s),"/*# ".concat(c," */")),o=r.sources.map((function(t){return"/*# sourceURL=".concat(r.sourceRoot||"").concat(t," */")}));return[n].concat(o).concat([i]).join("\n")}var a,s,c;return[n].join("\n")}(e,t);return e[2]?"@media ".concat(e[2]," {").concat(n,"}"):n})).join("")},e.i=function(t,n,r){"string"==typeof t&&(t=[[null,t,""]]);var i={};if(r)for(var o=0;o<this.length;o++){var a=this[o][0];null!=a&&(i[a]=!0)}for(var s=0;s<t.length;s++){var c=[].concat(t[s]);r&&i[c[0]]||(n&&(c[2]?c[2]="".concat(n," and ").concat(c[2]):c[2]=n),e.push(c))}},e}},function(t,e,n){t.exports={default:n(320),__esModule:!0}},function(t,e,n){n(80),n(31),n(47),n(321),n(327),n(330),n(332),t.exports=n(1).Set},function(t,e,n){"use strict";var r=n(322),i=n(153);t.exports=n(323)("Set",(function(t){return function(){return t(this,arguments.length>0?arguments[0]:void 0)}}),{add:function(t){return r.def(i(this,"Set"),t=0===t?0:t,t)}},r)},function(t,e,n){"use strict";var r=n(13).f,i=n(70),o=n(83),a=n(20),s=n(81),c=n(49),u=n(67),l=n(113),h=n(125),f=n(11),d=n(78).fastKey,p=n(153),m=f?"_s":"size",g=function(t,e){var n,r=d(e);if("F"!==r)return t._i[r];for(n=t._f;n;n=n.n)if(n.k==e)return n};t.exports={getConstructor:function(t,e,n,u){var l=t((function(t,r){s(t,l,e,"_i"),t._t=e,t._i=i(null),t._f=void 0,t._l=void 0,t[m]=0,null!=r&&c(r,n,t[u],t)}));return o(l.prototype,{clear:function(){for(var t=p(this,e),n=t._i,r=t._f;r;r=r.n)r.r=!0,r.p&&(r.p=r.p.n=void 0),delete n[r.i];t._f=t._l=void 0,t[m]=0},delete:function(t){var n=p(this,e),r=g(n,t);if(r){var i=r.n,o=r.p;delete n._i[r.i],r.r=!0,o&&(o.n=i),i&&(i.p=o),n._f==r&&(n._f=i),n._l==r&&(n._l=o),n[m]--}return!!r},forEach:function(t){p(this,e);for(var n,r=a(t,arguments.length>1?arguments[1]:void 0,3);n=n?n.n:this._f;)for(r(n.v,n.k,this);n&&n.r;)n=n.p},has:function(t){return!!g(p(this,e),t)}}),f&&r(l.prototype,"size",{get:function(){return p(this,e)[m]}}),l},def:function(t,e,n){var r,i,o=g(t,e);return o?o.v=n:(t._l=o={i:i=d(e,!0),k:e,v:n,p:r=t._l,n:void 0,r:!1},t._f||(t._f=o),r&&(r.n=o),t[m]++,"F"!==i&&(t._i[i]=o)),t},getEntry:g,setStrong:function(t,e,n){u(t,e,(function(t,n){this._t=p(t,e),this._k=n,this._l=void 0}),(function(){for(var t=this._k,e=this._l;e&&e.r;)e=e.p;return this._t&&(this._l=e=e?e.n:this._t._f)?l(0,"keys"==t?e.k:"values"==t?e.v:[e.k,e.v]):(this._t=void 0,l(1))}),n?"entries":"values",!n,!0),h(e)}}},function(t,e,n){"use strict";var r=n(7),i=n(4),o=n(78),a=n(23),s=n(21),c=n(83),u=n(49),l=n(81),h=n(14),f=n(45),d=n(13).f,p=n(324)(0),m=n(11);t.exports=function(t,e,n,g,v,y){var _=r[t],b=_,x=v?"set":"add",w=b&&b.prototype,M={};return m&&"function"==typeof b&&(y||w.forEach&&!a((function(){(new b).entries().next()})))?(b=e((function(e,n){l(e,b,t,"_c"),e._c=new _,null!=n&&u(n,v,e[x],e)})),p("add,clear,delete,forEach,get,has,set,keys,values,entries,toJSON".split(","),(function(t){var e="add"==t||"set"==t;!(t in w)||y&&"clear"==t||s(b.prototype,t,(function(n,r){if(l(this,b,t),!e&&y&&!h(n))return"get"==t&&void 0;var i=this._c[t](0===n?0:n,r);return e?this:i}))})),y||d(b.prototype,"size",{get:function(){return this._c.size}})):(b=g.getConstructor(e,t,v,x),c(b.prototype,n),o.NEED=!0),f(b,t),M[t]=b,i(i.G+i.W+i.F,M),y||g.setStrong(b,t,v),b}},function(t,e,n){var r=n(20),i=n(71),o=n(26),a=n(52),s=n(325);t.exports=function(t,e){var n=1==t,c=2==t,u=3==t,l=4==t,h=6==t,f=5==t||h,d=e||s;return function(e,s,p){for(var m,g,v=o(e),y=i(v),_=r(s,p,3),b=a(y.length),x=0,w=n?d(e,b):c?d(e,0):void 0;b>x;x++)if((f||x in y)&&(g=_(m=y[x],x,v),t))if(n)w[x]=g;else if(g)switch(t){case 3:return!0;case 5:return m;case 6:return x;case 2:w.push(m)}else if(l)return!1;return h?-1:u||l?l:w}}},function(t,e,n){var r=n(326);t.exports=function(t,e){return new(r(t))(e)}},function(t,e,n){var r=n(14),i=n(114),o=n(8)("species");t.exports=function(t){var e;return i(t)&&("function"!=typeof(e=t.constructor)||e!==Array&&!i(e.prototype)||(e=void 0),r(e)&&null===(e=e[o])&&(e=void 0)),void 0===e?Array:e}},function(t,e,n){var r=n(4);r(r.P+r.R,"Set",{toJSON:n(328)("Set")})},function(t,e,n){var r=n(54),i=n(329);t.exports=function(t){return function(){if(r(this)!=t)throw TypeError(t+"#toJSON isn't generic");return i(this)}}},function(t,e,n){var r=n(49);t.exports=function(t,e){var n=[];return r(t,!1,n.push,n,e),n}},function(t,e,n){n(331)("Set")},function(t,e,n){"use strict";var r=n(4);t.exports=function(t){r(r.S,t,{of:function(){for(var t=arguments.length,e=new Array(t);t--;)e[t]=arguments[t];return new this(e)}})}},function(t,e,n){n(333)("Set")},function(t,e,n){"use strict";var r=n(4),i=n(42),o=n(20),a=n(49);t.exports=function(t){r(r.S,t,{from:function(t){var e,n,r,s,c=arguments[1];return i(this),(e=void 0!==c)&&i(c),null==t?new this:(n=[],e?(r=0,s=o(c,arguments[2],2),a(t,!1,(function(t){n.push(s(t,r++))}))):a(t,!1,n.push,n),new this(n))}})}},function(t,e,n){"use strict";e.__esModule=!0;var r,i=n(112),o=(r=i)&&r.__esModule?r:{default:r};e.default=function(t,e,n){return e in t?(0,o.default)(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=f(n(336)),i=f(n(356)),o=f(n(357)),a=f(n(358)),s=f(n(359)),c=f(n(362)),u=f(n(363)),l=f(n(51)),h=f(n(364));function f(t){return t&&t.__esModule?t:{default:t}}e.default={MapNavLayout:r.default,BasicLayout:i.default,MapWrapper:o.default,NoSidebarWrapper:a.default,SidebarWrapper:s.default,AdminLayout:c.default,FullHeaderLayout:u.default,BlankLayout:l.default,LooseWrapper:h.default}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=c(n(12)),i=n(2),o=c(n(154)),a=c(n(95)),s=n(96);c(s);function c(t){return t&&t.__esModule?t:{default:t}}e.default={name:"MapNavLayout",inject:["slotsList","propsList","instance"],components:{GMap:s.GMap},computed:{nav:function(){return this.$store.state.user.addRouters},appRouter:function(){return this.$store.state.user.appRouters}},data:function(){return{isLoaded:!1}},methods:{handleMapChange:function(t){a.default.$emit("mapChange",t)},mapLoad:function(t){t&&(this.isLoaded=!0),a.default.$emit("loadMap",t)},changeLayout:function(){var t=this.$route.matched;t[1]&&"MapNavLayout"===t[1].components.default.name&&this.$store.commit("user/SET_ROUTERS",[this.appRouter[0].children[0]])}},created:function(){this.changeLayout()},updated:function(){var t=this;this.$nextTick((function(){t.$store.commit("user/SET_TIME_STAMP",{type:"map",timeStamp:""+(new Date).getTime()})}))},render:function(){var t=this,e=arguments[0],n=(0,r.default)([i.prefixCls+"-layout-light",i.prefixCls+"-basic-layout"]),a=function(){return t.propsList.needMap?[t.propsList.keep?e("keep-alive",[e(s.GMap,{on:{load:t.mapLoad,change:function(e){return t.handleMapChange(e)}}})]):e(s.GMap,{on:{load:t.mapLoad,change:function(e){return t.handleMapChange(e)}}}),t.isLoaded?e("router-view",{attrs:{theme:"dark",fixed:!0},ref:"$$coreContent",class:i.prefixCls+"-layout-content"}):null]:e("router-view",{attrs:{theme:"dark",fixed:!0},ref:"$$coreContent",class:i.prefixCls+"-layout-content"})};return e("a-layout",{class:n},[e(o.default,{attrs:{theme:"dark",fixed:!0,"nav-list":this.nav[0].children}}),e("a-layout-content",[this.slotsList.content?this.slotsList.content:null,a()])])}}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=u(n(9)),i=u(n(59)),o=u(n(60)),a=n(17),s=n(10),c=u(n(12));function u(t){return t&&t.__esModule?t:{default:t}}var l,h="data:image/webp;base64,UklGRk4KAABXRUJQVlA4WAoAAAAwAAAAPwAAPwAASUNDUBgCAAAAAAIYAAAAAAQwAABtbnRyUkdCIFhZWiAAAAAAAAAAAAAAAABhY3NwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAA9tYAAQAAAADTLQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAlkZXNjAAAA8AAAAHRyWFlaAAABZAAAABRnWFlaAAABeAAAABRiWFlaAAABjAAAABRyVFJDAAABoAAAAChnVFJDAAABoAAAAChiVFJDAAABoAAAACh3dHB0AAAByAAAABRjcHJ0AAAB3AAAADxtbHVjAAAAAAAAAAEAAAAMZW5VUwAAAFgAAAAcAHMAUgBHAEIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFhZWiAAAAAAAABvogAAOPUAAAOQWFlaIAAAAAAAAGKZAAC3hQAAGNpYWVogAAAAAAAAJKAAAA+EAAC2z3BhcmEAAAAAAAQAAAACZmYAAPKnAAANWQAAE9AAAApbAAAAAAAAAABYWVogAAAAAAAA9tYAAQAAAADTLW1sdWMAAAAAAAAAAQAAAAxlblVTAAAAIAAAABwARwBvAG8AZwBsAGUAIABJAG4AYwAuACAAMgAwADEANkFMUEhMAwAADaAtybZp26rW51rHuLZt27Zt27Zt27Zt27bv4eY11+j9YWnvOX4gIiaA9iUcTTHTDAvNM8vk1QHwV8dnn37y9dc9jsmDflc4E6+58tSJ5kMmm2vueSatjHv20Y6Qop+MxHSbb0NAuKQ6IsImnHHO1Ra+79ofMbw/LMW8uyxMBCEzmkrCEVPsvsZH178u8z6TasP2XwPcJNo2IHyadTd56aJei+gbkVY8knAq9LXkMeKwJc54xoi+MPfDlyMVRn8akZY49vUz3Ly94v8JziC8Sn/LfNgxExzVY96O/T/VebgZJbRIe6584Cjz1qw2xSmkCuWU0ppbHNZh3orSROeRBlBWWVpru326Fc0UOok0gBIXac0Vjvtf0cyPxCuUuvC9hp3TzGorLY4ouTjxzUfM65QmPIhUKV0afNglPYq62Is0gNIXaZmFL6mz2kIrYWRoHP7M2+bADniRg3zElle7rDbj/GS74edfCDYlVfOwNOVSD+ATb4mRqbHPXeNYk8hGMc3CD7EaoVwIrfTcVBOR9XzdMwnlI6YZNhNeZOQTTjofoXwIzbUgImMx9yy5zTpRbpMMJfOByq0g+1Bm//0+PLeeiUIZhbq+njWzrz6cP5tQgw8WMDIVIL76YcIJQqULhQCi+HXUt5qpfCFEA436c1zXPJReNA19As+tpNK1aDwLDy8yVSiTsI43sM6793DLxO0qDO5YYWq3LLza+TRyffnhpuQZehglFDdsNEEog6j8dRNy3N559lC3DNxOx2rUX7HI4qkonVfffJ+Gbh0XHjUsVLIwPxWr1eH22LtHZ3AqSjQOzph491SUKlXv+JoWQ7WjV18lFSVKA16+D3kzwrr222nVZCpJ+ICXr8ASrbqNOmr7VRyVw6svX4XVaN2LH/Zfe9dwK4Grcv39WI12k/UcPslxg5Opn8KrfsoorEb7Lj/9reMWDcf6wbHinROREn0Z2ONnLXn00HCpjyIq/Hvy65gHfRthvZc8t+W6U0YEWBsRYbLOR69FVqPv3fTatV+ussfkiHBJDQI3E4y98mnDItGfjvjqlnsXW23uaScoaCqM3376/Jk3kJTo71ARHQ8/0z1kstnnnnuCISL+6P36869++qcAw4O2AVZQOCC8BAAA0BUAnQEqQABAAD5tLJJGpCIhoTAUCwCADYlsALElQX4Bxr0MfC+aBS/8jsxxs4Vvie+aT7APMh50e5AewtvJHlLXe7+LQSHh39GDPb9SewP+r/pAey30AP1PSO88Jm4eK/divBnLnHrz4CVEn6AxAZjff34I/VSZtrOPtclJYA9AbN52d961SZIkPoPsASAVkvDN9uDDdCn9QGtBQgHej972sJ4ZgA87s4gft5odSw1cDTkFuVIAAP7/OkF2JfyXlUqa8sMsM+cPy8TEO+WtIS+RueaS3TlAr6SNyT/4tfZoEnBzFJz3oxBBvWuXuNpy35PSR/7rhoh0m4xGhyrgqGk+YTGhqIx6dJnMP0/AonghGybbxS+bXsXUU0jdC7adMIFiaAX2SHV37RJkHsmMzcCozzVHVKL5IkRjAJ2jz2NZ3skOvfXA6Ik3OYAhwHkU4bFqp7C5OzpfS+TwA4Z0728VAU2m9uSn8vghqhi1+NIbM5MGl+7NelaUTqvMcT7NMXlH8CpkVExt/N+h11LZy5V9ypUla0IU2j4cQlfnQ+8VzGqtCgxQfxSaV3Z6iJEL8uot3FvIdXJVO0pz1eZT2GKMMDO4E4OHWr0rO5JaZaUIZ4hEACBSHzXfiGelUmyTY7sGf2APWkZs3cKmAoo5zqyWRvo8b73XHT89H76av1P5E8f3w9FFpn3y3ip+fLllYa8uWygj0CR8w8DXN7xUyWVR65gRyo/0Y//54yK/fs8xAW3WtpLgrBPj8Z1R3PaHxsoLC9hcGyiAWW3vi7ZwIex/bknwePmjwbtZkemX9qrWm6OoGs3rydXgLH8PBYZgy06DLr7t3DeMTYudDqk64DUviNPlSIw/QdBTtUu4gCNWGUN1AvNI20NKcVG8AROIBdfNw/EKl5ndo/bdzGLVh5Z/5x6B5aEa7li35K+gIFTUCRY28rbqscfWSIpOKXiOHk8sqM5F/xHcabsuPE8yEDhm3PPPD6r/M2ZJfn/28zq0t7kF0fAz/+/k/01qEldX/pr/3je/h4f/HbtG20fn7/5+P9V/8c0y1BE/9mhkOGb3Kgv4hFi8X/Zjf+qjNsAP/e+/721/qdBPqYg2KDenvxcU8fKcOEhmWP0fGru4dWmba6XnQqvj6yU/uyBXsR7ADCif7pTtpD5nfbO5AnXVP9JUKqqTINt/+4k8+bgfnN2XuUkrOGwcO3Hyw3+r/u6UT6HUIu09yWbBtmFZLqk9my7ZrKWvidcuXKeRxRrq1gpYUXIY7SXNnibsp0NGV3hTTbQb1CwIXH2XbfobV4BpWO6FFYE3EEBMnS2UoIuo+cFw5o7U0UiZu/f4kf5sGHiQey4pEi0aP7r+4Qr9rw1Fu/DZm1NBrCn/rN/YOv6rTvsuq5RuRWj5/WyF/dHtvNXAWBA8p+NgsDkhglrla4Am6BMMg6BqmOhl42xNVUv/5W6seYyqRaqYIc5Jmwjfe7wV948cc6+gzcYbRRo33W3EjCyuX8t9ZlDcb/nE9Pw9E1isHwVJSjdF0v+zRl3FQH+zNKcvK/r99LnWhQWXaowpq8WYUAWYJsjn5AphibAaFwrX7YzpngkGDwv85praR2z/EGqoiMHssNjRWwAA";e.default={name:"HeaderExtend",data:function(){return{projectList:[]}},computed:{currentCode:function(){return s.sessionStore.get("CLIENT_ID")},theme:function(){return this.$store.state.common.theme}},mounted:function(){this.getProject()},methods:{getProject:(l=(0,o.default)(i.default.mark((function t(){var e,n,r=this;return i.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,(0,a.getByCuser)();case 2:e=t.sent,(n=e.data).forEach((function(t,e){r.currentCode===t.code&&n.unshift(n.splice(e,1)[0])})),this.projectList=n;case 6:case"end":return t.stop()}}),t,this)}))),function(){return l.apply(this,arguments)}),goToPage:function(t){var e=s.localStore.get("IAM_OATH_TYPE");if(t.domain)if(t.domain.indexOf("http")>-1||t.domain.indexOf("https")>-1){var n={redirectUri:t.domain,clientId:t.code,scope:"all",state:"hello"};e&&(n=(0,r.default)(n,{oauthType:e})),(0,a.iamRedirect)(n).then((function(t){0===t.code&&window.open(t.data,"_self")}))}else this.$router.push(t.domain)}},render:function(){var t=this,e=arguments[0],n=this.projectList.length?this.projectList.map((function(n){var r=(0,c.default)(["header-extend-content-footer-item",t.currentCode===n.code?"header-extend-content-footer-item-active":""]);return e("div",{class:r,on:{click:function(){return t.goToPage(n)}}},[n.icon?e("img",{attrs:{src:n.icon,alt:""}}):e("a-avatar",{slot:"avatar"}),e("span",[n.name])])})):e("div",{class:"header-extend-content-footer-item"},[e("a-skeleton",{attrs:{avatar:!0,active:!0,paragraph:{rows:0}}})]);return e("div",{class:"header-extend"},[e("a-popover",{attrs:{trigger:"click",placement:"bottomRight",overlayClassName:"header-extend-popover app-dropdown-"+this.theme}},[e("div",{class:"header-extend-content",slot:"content"},[e("div",{class:"header-extend-content-header"},[e("img",{attrs:{src:h,alt:""}}),e("div",{class:"header-extend-content-header-title"},[e("span",["智慧环保"]),e("span",["creative"])])]),e("div",{class:"header-extend-content-footer"},[e("a-scrollbar",[e("div",{class:"header-extend-content-footer-inner"},[n])])])]),e("div",{class:"header-extend-inner"},[e("a-icon",{attrs:{type:"caret-down"}})])])])}}},function(t,e,n){t.exports={default:n(339),__esModule:!0}},function(t,e,n){n(340),t.exports=n(1).Object.values},function(t,e,n){var r=n(4),i=n(143)(!1);r(r.S,"Object",{values:function(t){return i(t)}})},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default={name:"WindIcon",render:function(){var t=arguments[0];return t("svg",{attrs:{t:"1646186453304",viewBox:"0 0 1024 1024",version:"1.1",xmlns:"http://www.w3.org/2000/svg","p-id":"1115",width:"200",height:"200"},class:"rk-web-core-normal-icon"},[t("path",{attrs:{d:"M489.728 787.456a32 32 0 0 0 58.848 0L760.16 296.128a32 32 0 0 0-41.536-42.144l-200 82.368-195.584-84.064a32 32 0 0 0-42.08 41.856z","p-id":"1116"}})])}}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default={render:function(){var t=arguments[0];return t("svg",{attrs:{viewBox:"64 64 896 896","data-icon":"skin",width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true",focusable:"false"}},[t("path",{attrs:{d:"M870 126H663.8c-17.4 0-32.9 11.9-37 29.3C614.3 208.1 567 246 512 246s-102.3-37.9-114.8-90.7a37.93 37.93 0 0 0-37-29.3H154a44 44 0 0 0-44 44v252a44 44 0 0 0 44 44h75v388a44 44 0 0 0 44 44h478a44 44 0 0 0 44-44V466h75a44 44 0 0 0 44-44V170a44 44 0 0 0-44-44zm-28 268H723v432H301V394H182V198h153.3c28.2 71.2 97.5 120 176.7 120s148.5-48.8 176.7-120H842v196z"}})])}}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(2),i=l(n(29)),o=l(n(344)),a=l(n(345)),s=l(n(346)),c=l(n(347)),u=l(n(155));function l(t){return t&&t.__esModule?t:{default:t}}e.default={name:"Skin",props:{visible:i.default.bool.def(!1)},data:function(){return{localVisible:!1,colorList:c.default}},computed:{skin:function(){return this.$store.state.user.skin}},watch:{visible:{handler:function(t){this.localVisible=t},deep:!0,immediate:!0}},methods:{onClose:function(){this.$emit("close")},changeSkin:function(t){this.$store.commit("user/SET_SKIN",{style:this.skin.style===t?"":t,color:this.skin.color}),this.onClose()},changeColor:function(t){document.documentElement.style.setProperty("--antd-wave-shadow-color",t),document.documentElement.style.setProperty("--antd-wave-shadow-color-o",u.default.formatColor(t,.1)),this.$store.commit("user/SET_SKIN",{color:t,style:this.skin.style}),this.onClose()}},render:function(){var t=this,e=arguments[0],n={props:{wrapClassName:r.prefixCls+"-drawer",title:"",placement:"right",closable:!1,visible:this.localVisible},on:{close:function(){return t.onClose()}}},i=this.colorList.map((function(n){return e("a-tooltip",[e("template",{slot:"title"},[n.key]),e("div",{class:[r.prefixCls+"-skin-color-item",t.skin.color===n.color?r.prefixCls+"-skin-active":null],on:{click:function(){return t.changeColor(n.color)}}},[e("span",{style:{backgroundColor:n.color}}),t.skin.color===n.color?e("div",{class:r.prefixCls+"-skin-color-mask"},[e("a-icon",{attrs:{type:"check"}})]):null])])}));return e("a-drawer",n,[e("div",{class:"theme"},[e(o.default,{attrs:{title:"主题风格设置",closable:!0},on:{close:function(){return t.onClose()}}},[e("div",{class:r.prefixCls+"-skin-style"},[e("div",{on:{click:function(){return t.changeSkin("dark")}},class:[r.prefixCls+"-skin-style-item","dark"===this.skin.style?r.prefixCls+"-skin-active":null]},[e("div",{class:r.prefixCls+"-skin-style-item-icon"},[e(a.default),"dark"===this.skin.style?e("div",{class:r.prefixCls+"-skin-style-mask"},[e("a-icon",{attrs:{type:"check"}})]):null]),e("span",["暗色"])]),e("div",{on:{click:function(){return t.changeSkin("light")}},class:[r.prefixCls+"-skin-style-item","light"===this.skin.style?r.prefixCls+"-skin-active":null]},[e("div",{class:r.prefixCls+"-skin-style-item-icon"},[e(s.default),"light"===this.skin.style?e("div",{class:r.prefixCls+"-skin-style-mask"},[e("a-icon",{attrs:{type:"check"}})]):null]),e("span",["亮色"])])])]),e(o.default,{attrs:{title:"系统主色设置"}},[e("div",{class:r.prefixCls+"-skin-color"},[i])])])])}}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r,i=n(2),o=n(29),a=(r=o)&&r.__esModule?r:{default:r};e.default={name:"SkinItem",props:{title:a.default.string,closable:a.default.bool.def(!1)},methods:{onClose:function(){this.$emit("close")}},render:function(){var t=this,e=arguments[0],n=this.$props,r=n.title,o=n.closable;return e("div",{class:i.prefixCls+"-skin-item"},[e("div",{class:i.prefixCls+"-skin-item-header"},[e("div",{class:i.prefixCls+"-skin-item-header-left"},[e("span",[r])]),o?e("div",{class:i.prefixCls+"-skin-item-header-right",on:{click:function(){return t.onClose()}}},[e("a-icon",{attrs:{type:"close"}})]):null]),this.$slots.default?e("div",{class:i.prefixCls+"-skin-item-footer"},[this.$slots.default]):null])}}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default={render:function(){var t=arguments[0];return t("svg",{attrs:{xmlns:"http://www.w3.org/2000/svg",width:"99",height:"69",viewBox:"0 0 99 69"}},[t("defs",[t("filter",{attrs:{id:"矩形_10036",x:"0",y:"0",width:"99",height:"69",filterUnits:"userSpaceOnUse"}},[t("feOffset",{attrs:{dy:"1",input:"SourceAlpha"}}),t("feGaussianBlur",{attrs:{stdDeviation:"1.5",result:"blur"}}),t("feFlood",{attrs:{"flood-opacity":"0.078"}}),t("feComposite",{attrs:{operator:"in",in2:"blur"}}),t("feComposite",{attrs:{in:"SourceGraphic"}})])]),t("g",{attrs:{id:"Dark",transform:"translate(-1834.5 -328.5)"}},[t("g",{attrs:{transform:"matrix(1, 0, 0, 1, 1834.5, 328.5)",filter:"url(#矩形_10036)"}},[t("rect",{attrs:{id:"矩形_10036-2","data-name":"矩形 10036",width:"90",height:"60",rx:"4",transform:"translate(4.5 3.5)",fill:"#fff"}})]),t("path",{attrs:{id:"矩形_10054","data-name":"矩形 10054",d:"M4,0H17a0,0,0,0,1,0,0V60a0,0,0,0,1,0,0H4a4,4,0,0,1-4-4V4A4,4,0,0,1,4,0Z",transform:"translate(1839 332)",fill:"#062846"}}),t("path",{attrs:{id:"矩形_10055","data-name":"矩形 10055",d:"M0,0H69a4,4,0,0,1,4,4V9a0,0,0,0,1,0,0H0A0,0,0,0,1,0,9V0A0,0,0,0,1,0,0Z",transform:"translate(1856 332)",fill:"#062846"}}),t("path",{attrs:{id:"矩形_10056","data-name":"矩形 10056",d:"M0,0H73a0,0,0,0,1,0,0V47a4,4,0,0,1-4,4H0a0,0,0,0,1,0,0V0A0,0,0,0,1,0,0Z",transform:"translate(1856 341)",fill:"#f8f8f8"}})])])}}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default={render:function(){var t=arguments[0];return t("svg",{attrs:{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 99 69",width:"99",height:"69"}},[t("defs",[t("filter",{attrs:{id:"矩形_10037",x:"0",y:"0",width:"99",height:"69",filterUnits:"userSpaceOnUse"}},[t("feOffset",{attrs:{dy:"1",input:"SourceAlpha"}}),t("feGaussianBlur",{attrs:{stdDeviation:"1.5",result:"blur"}}),t("feFlood",{attrs:{"flood-opacity":"0.078"}}),t("feComposite",{attrs:{operator:"in",in2:"blur"}}),t("feComposite",{attrs:{in:"SourceGraphic"}})])]),t("g",{attrs:{id:"Light",transform:"translate(-1944.5 -328.5)"}},[t("g",{attrs:{transform:"matrix(1, 0, 0, 1, 1944.5, 328.5)",filter:"url(#矩形_10037)"}},[t("rect",{attrs:{id:"矩形_10037-2","data-name":"矩形 10037",width:"90",height:"60",rx:"4",transform:"translate(4.5 3.5)",fill:"#fff"}})]),t("path",{attrs:{id:"矩形_10049","data-name":"矩形 10049",d:"M4,0H17a0,0,0,0,1,0,0V60a0,0,0,0,1,0,0H4a4,4,0,0,1-4-4V4A4,4,0,0,1,4,0Z",transform:"translate(1949 332)",fill:"#f8f8f8"}}),t("path",{attrs:{id:"矩形_10050","data-name":"矩形 10050",d:"M0,0H69a4,4,0,0,1,4,4V9a0,0,0,0,1,0,0H0A0,0,0,0,1,0,9V0A0,0,0,0,1,0,0Z",transform:"translate(1966 332)",fill:"#f8f8f8"}}),t("path",{attrs:{id:"矩形_10053","data-name":"矩形 10053",d:"M0,0H73a0,0,0,0,1,0,0V47a4,4,0,0,1-4,4H0a0,0,0,0,1,0,0V0A0,0,0,0,1,0,0Z",transform:"translate(1966 341)",fill:"#fff"}})])])}}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=[{key:"薄暮",color:"#F5222D"},{key:"火山",color:"#FA541C"},{key:"日暮",color:"#FAAD14"},{key:"明青",color:"#13C2C2"},{key:"极光绿",color:"#52C41A"},{key:"拂晓蓝(默认)",color:"#0F6EFF"},{key:"极客蓝",color:"#2F54EB"},{key:"酱紫",color:"#722ED1"}]},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=a(n(349)),i=a(n(27)),o=a(n(28));function a(t){return t&&t.__esModule?t:{default:t}}var s=new(function(){function t(){(0,i.default)(this,t),this.c=Math.min,this.h=r.default,this.m=Math.max,this.n=Math.abs,this.j=.85,this.k=10,this.l=4,this.opt={},this.opt.currentIndex=1}return(0,o.default)(t,[{key:"calcAVGSpeed",value:function(t){var e=(this.l*this.j*t+this.k*(1-this.j)*t)/(this.k*this.l*20);return e=this.m(this.n(e),2.5)*this.h(e)}},{key:"getCurSpeed",value:function(t,e){return this.n(t)>this.n(this.j*e)?this.l*this.opt.avgSpeed:this.k*this.opt.avgSpeed}},{key:"_calCurve",value:function(t,e,n,r,i,o){i.bezierCurveTo(t+o,e,n-o,r,n,r)}},{key:"_initCanvas",value:function(t,e,n){var r=window.devicePixelRatio,i=t.getContext("2d");t.width=e*r,t.height=n*r,t.style.width=e+"px",t.style.height=n+"px",i.scale(r,r)}},{key:"resize",value:function(){this.opt.timer&&cancelAnimationFrame(this.opt.timer),this._initCanvas(this.opt.canvas,this.opt.width,this.opt.height),this.draw(0)}},{key:"_toggle",value:function(t){return void 0!==t&&t!==this.opt.currentIndex&&this.opt.tabWidthList&&this.opt&&this.opt.tabWidthList&&this.opt.tabWidthList.length&&(!this.opt.animating||t!==this.opt.nextIndex)&&(this.opt.animating=!0,this.opt.distance=this.opt.tabWidthList[t]-this.opt.tabWidthList[this.opt.currentIndex],this.opt.avgSpeed=this.calcAVGSpeed(this.opt.distance),this.opt.curDisX=0,this.opt.nextIndex=t),!1}},{key:"_createPattern",value:function(t){var e=document.createElement("canvas");e.width=140,e.height=63,e.style.width="140px",e.style.height="63px";var n=e.getContext("2d");n.scale(1,1),n.lineWidth=.4;for(var r=.8,i=1;30>i;i++)n.strokeStyle="RGBA(22, 120, 160, "+r+")",n.beginPath(),n.moveTo(0,3*i),n.lineTo(140,3*i),n.stroke(),n.closePath(),10<i&&(r-=.1);var o=t.getContext("2d").createPattern(e,"repeat-x");this.opt.pattern=o,e=null}},{key:"_drawHightlight",value:function(t){var e=this.opt.canvas.getContext("2d");e.clearRect(0,0,2*this.opt.width,2*this.opt.height),e.shadowColor="rgba("+this.opt.rgb[0]+","+this.opt.rgb[1]+","+this.opt.rgb[2]+",1)",e.shadowBlur=5,e.strokeStyle=this.opt.color,e.lineWidth=.8,e.fillStyle="none",this._draw(e,!1);var n=e.createLinearGradient(this.opt.tabWidthList[this.opt.currentIndex]-this.opt.tabWidth/2,0,this.opt.tabWidthList[this.opt.currentIndex+1]+this.opt.tabWidth/2,this.opt.height),r=t-.3,i=this.c(1,this.m(0,0+r)),o=this.c(1,this.m(0,0+r+.1)),a=this.c(1,0+r+.3),s=this.c(1,0+r+.3+.1),c=1-i;n.addColorStop(i,"rgba(0,0,0,0)"),n.addColorStop(o,"rgba("+this.opt.rgb[0]+","+this.opt.rgb[1]+","+this.opt.rgb[2]+","+c+")"),n.addColorStop(a,"rgba("+this.opt.rgb[0]+","+this.opt.rgb[1]+","+this.opt.rgb[2]+","+c+")"),n.addColorStop(s,"rgba(0,0,0,0)"),n.addColorStop(1,"rgba(0,0,0,0)"),e.lineWidth=1.5,e.strokeStyle=n,e.fillStyle=this.opt.pattern,this._draw(e,!0)}},{key:"draw",value:function(t){this._drawHightlight(t),this.opt.timer=requestAnimationFrame(function(){this.draw((t+.005)%1.6)}.bind(this))}},{key:"_draw",value:function(t,e){var n=this.opt.currentIndex,r=this.opt.tabHeight,i=.5,o=0,a=this.opt.tabWidthList[n]-(e?this.opt.tabWidth/2:0);if(t.beginPath(),t.moveTo(a,this.opt.height+10),t.lineTo(a,r+i),this.opt.animating){var s=this.getCurSpeed(this.opt.curDisX,this.opt.distance);o=this.c(this.n(this.opt.distance),this.n(this.opt.curDisX+s))*this.h(s)}if(t.lineTo(0+this.opt.tabWidthList[n]+o-20,r+i),this._calCurve(0+this.opt.tabWidthList[n]+o-20,r+i,0+this.opt.tabWidthList[n]+o+20,3,t,20),this.opt.animating){var c=this.opt.tabWidthList[this.opt.nextIndex+1]-this.opt.tabWidthList[this.opt.nextIndex];t.lineTo(0+this.opt.tabWidthList[n]+c+o-20,3),this._calCurve(0+this.opt.tabWidthList[n]+c+o-20,3,0+this.opt.tabWidthList[n]+c+o+20,r+i,t,20)}else t.lineTo(0+this.opt.tabWidthList[n+1]+o-20,3),this._calCurve(0+this.opt.tabWidthList[n+1]+o-20,3,0+this.opt.tabWidthList[n+1]+o+20,r+i,t,20);e&&(t.lineTo(this.opt.tabWidthList[n+1]+this.opt.tabWidth/2,r+i),t.lineTo(this.opt.tabWidthList[n+1]+this.opt.tabWidth/2,this.opt.height)),t.closePath(),t.stroke(),e&&t.fill(),this.opt.animating&&e&&(this.opt.curDisX=o,this.n(o)>=this.n(this.opt.distance)&&(this.opt.animating=!1,this.opt.currentIndex=this.opt.nextIndex))}},{key:"initTabs",value:function(){this.opt.tabHeight=this.opt.navItem.offsetHeight,this.opt.tabWidth=this.opt.navItem.offsetWidth,this.opt.height=.9*this.opt.navItem.offsetHeight,this.opt.width=this.opt.tabWidth*this.opt.navCount+this.opt.tabWidth,this.opt.canvas.style.left=-this.opt.tabWidth/2+"px",this.opt.tabWidthList=[];for(var t=0;t<=this.opt.navCount;t++)this.opt.tabWidthList.push(this.opt.tabWidth/2+t*this.opt.tabWidth)}},{key:"drawNav",value:function(t){this.opt.canvas=t.canvas,this.opt.navItem=t.navItem,this.opt.navCount=t.navCount,this.opt.rgb=t.rgb,this.opt.color=t.color,this.initTabs(),this._toggle(t.index),this._initCanvas(this.opt.canvas,this.opt.width,this.opt.height),this._createPattern(this.opt.canvas),this.draw(0),window.addEventListener("resize",function(){this.initTabs(),this._initCanvas(this.opt.canvas,this.opt.width,this.opt.height),this._createPattern(this.opt.canvas),this.draw(0)}.bind(this),!1)}}]),t}());e.default=s},function(t,e,n){t.exports={default:n(350),__esModule:!0}},function(t,e,n){n(351),t.exports=n(1).Math.sign},function(t,e,n){var r=n(4);r(r.S,"Math",{sign:n(352)})},function(t,e){t.exports=Math.sign||function(t){return 0==(t=+t)||t!=t?t:t<0?-1:1}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(2),i=s(n(12)),o=s(n(354)),a=s(n(355));function s(t){return t&&t.__esModule?t:{default:t}}e.default={name:"Nav",props:{columns:{type:Array,default:function(){return[]}}},data:function(){return{visible:!1}},methods:{handleChange:function(t){this.visible=t},onNavClick:function(){this.visible=!1}},render:function(){var t=this,e=arguments[0],n=this.columns,s=this.visible,c=this.handleChange,u=n&&n.length?n.filter((function(t){return 1===t.type})).map((function(n,r){return e(o.default,{attrs:{index:r,title:n.meta.name,path:n.path,"data-source":n.children},on:{navClick:function(){return t.onNavClick()}}})})):null,l=(0,i.default)([r.prefixCls+"-dropdown-menu",s?r.prefixCls+"-dropdown-menu-actove":""]);return e("a-popover",{attrs:{trigger:["hover"],overlayClassName:r.prefixCls+"-dropdown"},on:{visibleChange:c}},[e("div",{class:l},[e(a.default)]),e("div",{class:r.prefixCls+"-dropdown-content",slot:"content"},[e("a-scrollbar",[e("div",{class:r.prefixCls+"-dropdown-content-inner"},[u])])])])}}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r,i=n(12),o=(r=i)&&r.__esModule?r:{default:r},a=n(2);e.default={name:"NavItem",props:{title:{type:String,default:""},index:{type:Number,default:0},path:{type:String,default:""},dataSource:{type:Array,default:function(){return[]}}},methods:{goToPage:function(t,e){var n=this;if(1===e)this.$router.push(this.path).then((function(t){n.$emit("navClick")}));else if(1===t.meta.chainType){var r=t.path.indexOf("http")>-1?t.path:"http://"+t.path;window.open(r)}else this.$router.push(t.path).then((function(t){n.$emit("navClick")}))}},render:function(){var t=this,e=arguments[0],n=this.dataSource.map((function(n){var r=(0,o.default)([a.prefixCls+"-nav-item-footer-item",n.meta.id===t.$route.meta.id?a.prefixCls+"-nav-item-footer-item-active":""]);return 1===n.type||2===n.type?e("div",{class:r,on:{click:function(){return t.goToPage(n,2)}}},[n.meta.name]):null})),r=(0,o.default)([a.prefixCls+"-nav-item-footer",a.prefixCls+"-nav-item-footer-line"]);return e("div",{class:a.prefixCls+"-nav-item"},[e("div",{class:a.prefixCls+"-nav-item-header",on:{click:function(){return t.goToPage(null,1)}}},[this.title]),e("div",{class:r},[n])])}}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default={render:function(){var t=arguments[0];return t("svg",{attrs:{t:"1651739359806",className:"icon",viewBox:"0 0 1024 1024",version:"1.1",xmlns:"http://www.w3.org/2000/svg","p-id":"10705",width:"200",height:"200"}},[t("path",{attrs:{d:"M171.488 85.856h166.08c60.864 0 110.688 49.824 110.688 110.688v276.768H171.488C110.624 473.312 60.8 423.488 60.8 362.528v-166.08C60.8 135.68 110.624 85.856 171.488 85.856z m0 498.144h276.768v276.768c0 60.864-49.824 110.688-110.688 110.688h-166.08C110.624 971.36 60.8 921.632 60.8 860.672v-166.08C60.8 633.824 110.624 584 171.488 584z m0 0M752.672 556.256L558.944 357.056c-22.176-16.608-33.216-49.824-33.216-77.472s11.04-55.392 33.216-77.472L675.2 85.856C719.456 41.6 791.456 41.6 830.144 85.856l116.256 116.256c22.176 22.176 33.216 49.824 33.216 77.472s-11.04 55.392-33.216 77.472L752.672 556.256z m0-448.32c-16.608 0-27.648 5.568-38.784 16.608l-116.16 116.256c-11.04 11.04-16.608 22.176-16.608 38.784s5.568 27.648 16.608 38.784l154.944 154.944 154.944-154.944c11.04-11.04 16.608-22.176 16.608-38.784s-5.568-27.648-16.608-38.784L791.36 124.544c-11.04-11.04-22.08-16.608-38.688-16.608z m0 0","p-id":"10706"}}),t("path",{attrs:{d:"M558.944 584h276.768c60.864 0 110.688 49.824 110.688 110.688v166.08c0 60.864-49.824 110.688-110.688 110.688h-166.08c-60.864 0-110.688-49.824-110.688-110.688V584z m0 0","p-id":"10707"}})])}}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=s(n(154)),i=n(2),o=s(n(12)),a=n(3);function s(t){return t&&t.__esModule?t:{default:t}}e.default={name:"BasicLayout",inject:["slotsList"],computed:{nav:function(){return this.$store.state.user.addRouters},appRouter:function(){return this.$store.state.user.appRouters}},data:function(){return{layout:"SidebarWrapper"}},methods:{changeLayout:function(){var t=this.$route.matched;t[1]&&"BasicLayout"===t[1].components.default.name&&this.$store.commit("user/SET_ROUTERS",[this.appRouter[0].children[1]])}},created:function(){this.changeLayout()},mounted:function(){var t=this;this.$watch("$route",(function(e){var n=e.matched;if(t.nav&&!(0,a.isEmpty)(t.nav)&&!(0,a.isEmpty)(t.nav[0].children)){var r=(0,i.treeFindPath)(t.nav[0].children,(function(t){return t.meta.id===n[n.length-1].meta.id}));(0,a.isEmpty)(r)||!r.length||(0,a.isFunction)(r[0].component)||(t.layout=r[0].component.name)}}),{immediate:!0,deep:!0})},render:function(){var t=arguments[0],e=(0,o.default)([i.prefixCls+"-layout-light",i.prefixCls+"-basic-layout"]);return t("a-layout",{class:e},[this.nav&&this.nav[0]&&this.nav[0].children?t(r.default,{attrs:{theme:"MapWrapper"===this.layout?"dark":"light",fixed:"MapWrapper"===this.layout,"nav-list":this.nav[0].children}}):null,this.slotsList.interbed,t("a-layout-content",[this.slotsList.content?this.slotsList.content:null,t("router-view",{class:i.prefixCls+"-layout-content"})])])}}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(2),i=s(n(95)),o=n(96),a=(s(o),n(3));function s(t){return t&&t.__esModule?t:{default:t}}e.default={name:"MapWrapper",components:{GMap:o.GMap},data:function(){return{isLoaded:!1,isShowMap:!0}},computed:{nav:function(){return this.$store.state.user.addRouters}},methods:{mapLoad:function(t,e,n){t&&(this.isLoaded=!0),i.default.$emit("loadMap",t)},handleMapChange:function(t){i.default.$emit("mapChange",t)}},watch:{$route:{handler:function(t){var e=t.matched,n=e[e.length-1];(0,a.isEmpty)(n)||(0,a.isEmpty)(n.meta.parentLayout)||"MapWrapper"!==n.meta.parentLayout?this.isShowMap=!1:this.isShowMap=!0},immediate:!0}},render:function(){var t=this,e=arguments[0],n=null;return this.isLoaded?n=e("div",{class:[r.prefixCls+"-layout-content",this.isShowMap?"":r.prefixCls+"-layout-content-map"]},[e("router-view",{attrs:{theme:"dark",fixed:!0},class:r.prefixCls+"-router-view"})]):this.isShowMap||this.isLoaded||(n=e("div",{class:[r.prefixCls+"-layout-content",this.isShowMap?"":r.prefixCls+"-layout-content-map"]},[e("router-view",{attrs:{theme:"dark",fixed:!0},class:r.prefixCls+"-router-view"})])),e("span",[this.isShowMap?e(o.GMap,{on:{load:this.mapLoad,change:function(e){return t.handleMapChange(e)}}}):null,n])}}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default={name:"NoSliderWrapper",render:function(){var t=arguments[0];return t("router-view")}}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=c(n(97)),i=c(n(51)),o=n(2),a=n(3),s=c(n(12));function c(t){return t&&t.__esModule?t:{default:t}}e.default={name:"SliderWrapper",props:{theme:{type:String,default:"light"},fixed:{type:Boolean,default:!1}},computed:{nav:function(){return this.$store.state.user.addRouters}},data:function(){return{sidebarList:[],openKeys:[],selectedKeys:[]}},mounted:function(){var t=this;this.$watch("$route",(function(e){var n=e.matched;if(t.nav&&!(0,a.isEmpty)(t.nav)&&!(0,a.isEmpty)(t.nav[0].children)){var r=(0,o.treeFindPath)(t.nav[0].children,(function(t){return t.meta.id===n[n.length-1].meta.id}));t.sidebarList=r[0].children}}),{immediate:!0})},render:function(){var t=arguments[0],e=(0,s.default)([o.prefixCls+"-slider-"+this.theme,this.fixed?o.prefixCls+"-slider-fixed":""]);return t("a-layout",{class:o.prefixCls+"-full-layout"},[this.fixed?t("a-affix",{attrs:{"offset-top":70}},[t(r.default,{attrs:{sidebarList:this.sidebarList,theme:this.theme},class:e})]):t(r.default,{attrs:{sidebarList:this.sidebarList,theme:this.theme},class:e}),t("a-layout-content",[t("div",{attrs:{id:"microApp"}}),t(i.default)])])}}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default={render:function(){var t=arguments[0];return t("svg",{attrs:{t:"1651886232129",className:"icon",viewBox:"0 0 1024 1024",version:"1.1",xmlns:"http://www.w3.org/2000/svg","p-id":"2428",width:"200",height:"200"}},[t("path",{attrs:{d:"M156.458667 224.256m42.666666 0l625.792 0q42.666667 0 42.666667 42.666667l0 0q0 42.666667-42.666667 42.666666l-625.792 0q-42.666667 0-42.666666-42.666666l0 0q0-42.666667 42.666666-42.666667Z","p-id":"2429"}}),t("path",{attrs:{d:"M476.458667 473.173333m42.666666 0l305.792 0q42.666667 0 42.666667 42.666667l0 0q0 42.666667-42.666667 42.666667l-305.792 0q-42.666667 0-42.666666-42.666667l0 0q0-42.666667 42.666666-42.666667Z","p-id":"2430"}}),t("path",{attrs:{d:"M156.458667 722.048m35.541333 0l640.042667 0q35.541333 0 35.541333 35.541333l0 0.042667q0 35.541333-35.541333 35.541333l-640.042667 0q-35.541333 0-35.541333-35.541333l0-0.042667q0-35.541333 35.541333-35.541333Z","p-id":"2431"}}),t("path",{attrs:{d:"M219.733333 542.848a42.666667 42.666667 0 0 1 0-68.266667l99.541334-74.666666a42.666667 42.666667 0 0 1 68.266666 34.133333v149.333333a42.666667 42.666667 0 0 1-68.266666 34.133334z","p-id":"2432"}})])}}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default={render:function(){var t=arguments[0];return t("svg",{attrs:{t:"1651886218724",className:"icon",viewBox:"0 0 1024 1024",version:"1.1",xmlns:"http://www.w3.org/2000/svg","p-id":"2291",width:"200",height:"200"}},[t("path",{attrs:{d:"M156.458667 206.037333m42.666666 0l625.792 0q42.666667 0 42.666667 42.666667l0 0q0 42.666667-42.666667 42.666667l-625.792 0q-42.666667 0-42.666666-42.666667l0 0q0-42.666667 42.666666-42.666667Z","p-id":"2292"}}),t("path",{attrs:{d:"M156.458667 454.954667m42.666666 0l305.792 0q42.666667 0 42.666667 42.666666l0 0q0 42.666667-42.666667 42.666667l-305.792 0q-42.666667 0-42.666666-42.666667l0 0q0-42.666667 42.666666-42.666666Z","p-id":"2293"}}),t("path",{attrs:{d:"M156.458667 703.829333m35.541333 0l640.042667 0q35.541333 0 35.541333 35.541334l0 0.042666q0 35.541333-35.541333 35.541334l-640.042667 0q-35.541333 0-35.541333-35.541334l0-0.042666q0-35.541333 35.541333-35.541334Z","p-id":"2294"}}),t("path",{attrs:{d:"M804.266667 456.362667a42.666667 42.666667 0 0 1 0 68.266666l-99.541334 74.666667a42.666667 42.666667 0 0 1-68.266666-34.133333v-149.333334a42.666667 42.666667 0 0 1 68.266666-34.133333z","p-id":"2295"}})])}}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=l(n(12)),i=n(2),o=l(n(51)),a=l(n(92)),s=l(n(97)),c=l(n(93)),u=l(n(94));function l(t){return t&&t.__esModule?t:{default:t}}e.default={name:"AdminLayout",inject:["slotsList"],computed:{nav:function(){return this.$store.state.user.addRouters}},data:function(){return{sidebarList:[],openKeys:[],selectedKeys:[],isOpen:!0}},methods:{handleSidebarChange:function(t){this.isOpen=t}},render:function(){var t=this,e=arguments[0],n=(0,r.default)([i.prefixCls+"-layout-light",i.prefixCls+"-basic-layout",i.prefixCls+"-admin-layout"]),l=(0,r.default)([i.prefixCls+"-header",i.prefixCls+"-header-light",i.prefixCls+"-header-light-header",this.isOpen?"":i.prefixCls+"-header-between"]),h=(0,r.default)([i.prefixCls+"-slider-light"]);return e("a-layout",{class:n},[e("a-layout-sider",{class:i.prefixCls+"-slider",attrs:{width:this.isOpen?250:0}},[this.slotsList.logo?this.slotsList.logo:e(a.default,{attrs:{prefix:"basic",theme:"light"}}),e(s.default,{attrs:{sidebarList:this.nav[0].children},class:h,on:{change:function(e){return t.handleSidebarChange(e)}}})]),e("a-layout",[e("a-layout-header",{class:l},[this.isOpen?null:this.slotsList.logo?this.slotsList.logo:e(a.default,{attrs:{prefix:"basic",theme:"light"}}),e("div",{class:[i.prefixCls+"-header-light-inner",i.prefixCls+"-header-inner"]},[this.slotsList.header?this.slotsList.header:null,e(c.default),e(u.default)])]),e("a-layout-content",[e(o.default)])])])}}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=l(n(12)),i=n(2),o=l(n(51)),a=l(n(92)),s=l(n(97)),c=l(n(93)),u=l(n(94));function l(t){return t&&t.__esModule?t:{default:t}}e.default={name:"FullHeaderLayout",inject:["slotsList"],computed:{nav:function(){return this.$store.state.user.addRouters}},data:function(){return{sidebarList:[],openKeys:[],selectedKeys:[]}},render:function(){var t=arguments[0],e=(0,r.default)([i.prefixCls+"-layout-light",i.prefixCls+"-basic-layout",i.prefixCls+"-admin-layout",i.prefixCls+"-fullHeader-layout"]),n=(0,r.default)([i.prefixCls+"-header",i.prefixCls+"-header-light"]),l=(0,r.default)([i.prefixCls+"-slider-light"]);return t("a-layout",{class:e},[t("a-layout-header",{class:n},[t("div",{class:[i.prefixCls+"-header-light-inner",i.prefixCls+"-header-inner"]},[this.slotsList.logo?this.slotsList.logo:t(a.default,{attrs:{prefix:"basic",theme:"light"}}),t("div",{class:i.prefixCls+"-header-right"},[t("div",{class:i.prefixCls+"-header-right-extra"},[this.slotsList.header,t(c.default),t(u.default)])])])]),t("a-layout",[t(s.default,{attrs:{sidebarList:this.nav[0].children},class:l}),t("a-layout-content",[t(o.default)])])])}}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(2);n(365);e.default={name:"LooseWrapper",render:function(){var t=arguments[0];return t("div",{class:r.prefixCls+"-loose-wrapper"},[t("router-view")])}}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getAllChildren=e.getAllProps=e.getSlot=e.getSlots=e.camelize=e.isValidElement=e.initDefaultProps=e.parseStyleText=e.getValueByProp=e.getAttrs=e.getKey=e.getPropsData=e.slotHasProp=e.getSlotOptions=e.getComponentFromProp=e.getOptionProps=e.filterProps=e.hasProp=void 0;var r=h(n(22)),i=h(n(142)),o=h(n(34)),a=h(n(144)),s=h(n(9)),c=h(n(19));e.getEvents=function(t){var e={};t.componentOptions&&t.componentOptions.listeners?e=t.componentOptions.listeners:t.data&&t.data.on&&(e=t.data.on);return(0,s.default)({},e)},e.getDataEvents=function(t){var e={};t.data&&t.data.on&&(e=t.data.on);return(0,s.default)({},e)},e.getListeners=function(t){return(t.$vnode?t.$vnode.componentOptions.listeners:t.$listeners)||{}},e.getClass=function(t){var e={};t.data?e=t.data:t.$vnode&&t.$vnode.data&&(e=t.$vnode.data);var n=e.class||{},r=e.staticClass,i={};r&&r.split(" ").forEach((function(t){i[t.trim()]=!0})),"string"==typeof n?n.split(" ").forEach((function(t){i[t.trim()]=!0})):Array.isArray(n)?(0,l.default)(n).split(" ").forEach((function(t){i[t.trim()]=!0})):i=(0,s.default)({},i,n);return i},e.getStyle=function(t,e){var n={};t.data?n=t.data:t.$vnode&&t.$vnode.data&&(n=t.$vnode.data);var r=n.style||n.staticStyle;if("string"==typeof r)r=p(r,e);else if(e&&r){var i={};return(0,c.default)(r).forEach((function(t){return i[d(t)]=r[t]})),i}return r},e.getComponentName=function(t){return t&&(t.Ctor.options.name||t.tag)},e.isEmptyElement=_,e.isStringElement=function(t){return!t.tag},e.filterEmpty=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return t.filter((function(t){return!_(t)}))},e.mergeProps=function(){var t=[].slice.call(arguments,0),e={};return t.forEach((function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=!0,r=!1,c=void 0;try{for(var l,h=(0,o.default)((0,i.default)(t));!(n=(l=h.next()).done);n=!0){var f=l.value,d=(0,a.default)(f,2),p=d[0],m=d[1];e[p]=e[p]||{},(0,u.default)(m)?(0,s.default)(e[p],m):e[p]=m}}catch(t){r=!0,c=t}finally{try{!n&&h.return&&h.return()}finally{if(r)throw c}}})),e};var u=h(n(145)),l=h(n(12));function h(t){return t&&t.__esModule?t:{default:t}}var f=/-(\w)/g,d=function(t){return t.replace(f,(function(t,e){return e?e.toUpperCase():""}))},p=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",e=arguments[1],n={},r=/;(?![^(]*\))/g,i=/:(.+)/;return t.split(r).forEach((function(t){if(t){var r=t.split(i);if(r.length>1){var o=e?d(r[0].trim()):r[0].trim();n[o]=r[1].trim()}}})),n},m=function(t,e){return e in((t.$options||{}).propsData||{})},g=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n={};return(0,c.default)(t).forEach((function(r){(r in e||void 0!==t[r])&&(n[r]=t[r])})),n},v=function(t){return t.data&&t.data.scopedSlots||{}},y=function(t){var e=t.componentOptions;return t.$vnode&&(e=t.$vnode.componentOptions),e&&e.propsData||{}};function _(t){return!(t.tag||t.text&&""!==t.text.trim())}e.hasProp=m,e.filterProps=g,e.getOptionProps=function(t){if(t.componentOptions){var e=t.componentOptions,n=e.propsData,r=void 0===n?{}:n,c=e.Ctor,u=((void 0===c?{}:c).options||{}).props||{},l={},h=!0,f=!1,d=void 0;try{for(var p,m=(0,o.default)((0,i.default)(u));!(h=(p=m.next()).done);h=!0){var v=p.value,y=(0,a.default)(v,2),_=y[0],b=y[1],x=b.default;void 0!==x&&(l[_]="function"==typeof x&&"Function"!==(w=b.type,M=void 0,(M=w&&w.toString().match(/^\s*function (\w+)/))?M[1]:"")?x.call(t):x)}}catch(t){f=!0,d=t}finally{try{!h&&m.return&&m.return()}finally{if(f)throw d}}return(0,s.default)({},l,r)}var w,M,S=t.$options,A=void 0===S?{}:S,E=t.$props;return g(void 0===E?{}:E,A.propsData)},e.getComponentFromProp=function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:t,r=!(arguments.length>3&&void 0!==arguments[3])||arguments[3];if(t.$createElement){var i=t.$createElement,o=t[e];return void 0!==o?"function"==typeof o&&r?o(i,n):o:t.$scopedSlots[e]&&r&&t.$scopedSlots[e](n)||t.$scopedSlots[e]||t.$slots[e]||void 0}var a=t.context.$createElement,s=y(t)[e];if(void 0!==s)return"function"==typeof s&&r?s(a,n):s;var c=v(t)[e];if(void 0!==c)return"function"==typeof c&&r?c(a,n):c;var u=[],l=t.componentOptions||{};return(l.children||[]).forEach((function(t){t.data&&t.data.slot===e&&(t.data.attrs&&delete t.data.attrs.slot,"template"===t.tag?u.push(t.children):u.push(t))})),u.length?u:void 0},e.getSlotOptions=function(t){if(t.fnOptions)return t.fnOptions;var e=t.componentOptions;return t.$vnode&&(e=t.$vnode.componentOptions),e&&e.Ctor.options||{}},e.slotHasProp=function(t,e){return e in((t.componentOptions||{}).propsData||{})},e.getPropsData=y,e.getKey=function(t){var e=t.key;return t.$vnode&&(e=t.$vnode.key),e},e.getAttrs=function(t){var e=t.data;return t.$vnode&&(e=t.$vnode.data),e&&e.attrs||{}},e.getValueByProp=function(t,e){return y(t)[e]},e.parseStyleText=p,e.initDefaultProps=function(t,e){return(0,c.default)(e).forEach((function(n){if(!t[n])throw new Error("not have "+n+" prop");t[n].def&&(t[n]=t[n].def(e[n]))})),t},e.isValidElement=function(t){return t&&"object"===(void 0===t?"undefined":(0,r.default)(t))&&"componentOptions"in t&&"context"in t&&void 0!==t.tag},e.camelize=d,e.getSlots=function(t){var e=t.componentOptions||{};t.$vnode&&(e=t.$vnode.componentOptions||{});var n=t.children||e.children||[],r={};return n.forEach((function(t){if(!_(t)){var e=t.data&&t.data.slot||"default";r[e]=r[e]||[],r[e].push(t)}})),(0,s.default)({},r,v(t))},e.getSlot=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"default",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return t.$scopedSlots&&t.$scopedSlots[e]&&t.$scopedSlots[e](n)||t.$slots[e]||[]},e.getAllProps=function(t){var e=t.data||{},n=t.componentOptions||{};return t.$vnode&&(e=t.$vnode.data||{},n=t.$vnode.componentOptions||{}),(0,s.default)({},e.props,e.attrs,n.propsData)},e.getAllChildren=function(t){var e=t.componentOptions||{};return t.$vnode&&(e=t.$vnode.componentOptions||{}),t.children||e.children||[]},e.default=m},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=a(n(64)),i=a(n(28)),o=a(n(27));function a(t){return t&&t.__esModule?t:{default:t}}var s=function t(e){(0,o.default)(this,t),this.data=e,this.parent=null,this.children=[]},c=function(){function t(){(0,o.default)(this,t),this._root=null}return(0,i.default)(t,[{key:"traverseDF",value:function(t){var e=[],n=!1;e.unshift(this._root);for(var i=e.shift();!n&&i;)(n=!0===t(i))||(e.unshift.apply(e,(0,r.default)(i.children)),i=e.shift())}},{key:"traverseBF",value:function(t){var e=[],n=!1;e.push(this._root);for(var i=e.shift();!n&&i;)(n=!0===t(i))||(e.push.apply(e,(0,r.default)(i.children)),i=e.shift())}},{key:"contains",value:function(t,e){e.call(this,t)}},{key:"add",value:function(t,e,n){var r=new s(t);if(null===this._root)return this._root=r,this;var i=null;if(this.contains((function(t){if(t.data===e)return i=t,!0}),n),i)return i.children.push(r),r.parent=i,this;throw new Error("Cannot add node to a non-existent parent.")}},{key:"remove",value:function(t,e,n){var r=null;if(this.contains((function(t){if(t.data===e)return r=t,!0}),n),!r)throw new Error("Parent does not exist.");var i=this._findIndex(r.children,t);if(i<0)throw new Error("Node to remove does not exist.");return r.children.splice(i,1)}},{key:"_findIndex",value:function(t,e){for(var n=-1,r=0,i=t.length;r<i;r++)if(t[r].data===e){n=r;break}return n}}]),t}();e.default=c},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.noLogin=void 0;var r=n(50),i=n(10);e.noLogin=function(t,e){return e||console.warn("token is not undefined"),function(){var n=(0,r.getUrlParam)("shopId");n?(i.localStore.set("access_token",e),i.localStore.set("code","demo"),i.localStore.set("test_project",{shopId:(0,r.getUrlParam)("shopId")||i.localStore.get("test_project").shopId,flag:(0,r.getUrlParam)("flag")||i.localStore.get("test_project").flag}),t.replace({path:"/",query:{shopId:n}}).then()):(i.localStore.remove("test_project"),sessionStorage.removeItem("noLogin"))}}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=l(n(95)),i=(n(17),n(10)),o=n(3),a=l(n(29)),s=n(2),c=l(n(369)),u=l(n(98));function l(t){return t&&t.__esModule?t:{default:t}}var h={name:"AppLayout",props:{datetime:a.default.bool.def(!0),weather:a.default.bool.def(!0),wind:a.default.bool.def(!0),keep:a.default.bool.def(!1),needMap:a.default.bool.def(!1),project:a.default.bool.def(!1),nav:a.default.bool.def(!0),right:a.default.bool.def(!0),skin:a.default.bool.def(!1),multiProject:a.default.bool.def(!0)},data:function(){return{mapInstance:null}},computed:{appSkin:function(){return this.$store.state.user.skin},version:function(){return this.$store.state.user.currentAppVersion},historyVersion:function(){return this.$store.state.user.historyAppVersion},currentWeather:function(){return this.$store.state.user.currentAppWeather}},provide:function(){return{slotsList:this.$slots,slotScope:this.$scopedSlots,propsList:this.$props,instance:this}},mounted:function(){var t=this;try{u.default.initIndexedDb()}catch(t){console.warn("db init error")}r.default.$on("loadMap",(function(e){console.log("***************MAPTALKS*****************"),console.log(e),t.mapInstance=e,t.$props.skin&&t.changeMapTheme(t.appSkin),console.log("***************MAPTALKS*****************"),t.$emit("load",e)})),r.default.$on("mapChange",(function(e){t.$emit("change",e)}))},updated:function(){var t=this;this.$nextTick((function(){t.$store.commit("user/SET_TIME_STAMP",{type:"app",timeStamp:""+(new Date).getTime()})}))},beforeDestroy:function(){r.default.$off("loadMap"),r.default.$off("mapChange")},methods:{changeMapTheme:function(t){if(!(0,o.isEmpty)(this.mapInstance)&&!(0,o.isEmpty)(this.mapInstance.instance)){var e=i.sessionStore.get("RK_MAP_STORE_OPTIONS"),n=this.mapInstance.instance.getBaseLayer().getAMap();"light"===t.style?n.setMapStyle("amap://styles/light"):(0,o.isEmpty)(e)||(0,o.isEmpty)(e.aMapStyle)?n.setMapStyle("amap://styles/2fa29a356dbc3a567b473b846fe84ed1"):n.setMapStyle(e.aMapStyle)}}},watch:{appSkin:{handler:function(t){this.$props.skin&&(this.$emit("theme",t),this.changeMapTheme(t))},immediate:!0},version:{handler:function(t){this.$emit("version",t,1===parseInt(t.isTop))}},historyVersion:{handler:function(t){this.$emit("historyVersion",t)}},currentWeather:{handler:function(t){this.$emit("currentWeather",t)}}},render:function(){var t=arguments[0],e=this.$slots;return t("div",{class:[s.prefixCls+"-layout",s.prefixCls+"-layout-theme-"+this.appSkin.style]},[t(c.default),e.default])},install:function(t){t.component(h.name,h)}};e.default=h},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r,i=n(2),o=n(370),a=(r=o)&&r.__esModule?r:{default:r};n(371);var s=n(10),c=n(35),u=n(91),l=n(3);e.default={name:"Extension",data:function(){return{isShow:!1,extensionBtn:[{title:"清除localStorage",key:1},{title:"清除sessionStorage",key:2},{title:"清除全部缓存",key:3},{title:"清除db",key:4},{title:"退出登录",key:5},{title:"重新拉取用户信息",key:6},{title:"刷新页面",key:7},{title:"重新初始化系统",key:8},{title:"reload系统",key:9}]}},computed:{isExtension:function(){return this.$isExtension}},watch:{isExtension:{handler:function(t){var e=this;t&&this.$nextTick((function(){(0,a.default)(e.$refs.extension)}))},immediate:!0}},methods:{handleTap:function(t){var e=this;switch(t){case 1:localStorage.clear();break;case 2:sessionStorage.clear();break;case 3:s.storage.clearAll();break;case 4:indexedDB.deleteDatabase("amap-jsapi"),indexedDB.deleteDatabase("iep_db"),indexedDB.deleteDatabase("rk-web-core");break;case 5:(0,c.logOut)();break;case 6:var n=this.$route.path;this.$store.commit("user/SET_ROUTERS",[]),this.$store.commit("user/SET_APP_ROUTERS",[]),this.$store.commit("user/SET_MENU_LIST",[]),this.$store.dispatch("user/GetUserInfo",{loadAuth:!0,sysCode:s.sessionStore.get("CLIENT_ID")}).then((function(t){(0,l.isEmpty)(t)||((0,u.setAsyncRoutes)(e.$router,e.$store,t,e.$pkRouter,e.$basicOptions),e.$nextTick((function(){e.$router.replace("/").finally((function(){e.$router.replace(n)}))})))}));break;case 7:this.$router.replace("/refresh");break;case 8:this.$router.replace("/");break;case 9:window.location.reload()}}},render:function(){var t=this,e=arguments[0],n=this.extensionBtn.map((function(n){return e("div",{class:i.prefixCls+"-extension-group-item"},[e("a-button",{attrs:{type:"primary",ghost:!0},on:{click:function(){return t.handleTap(n.key)}}},[n.title])])}));return this.isExtension?e("a-tooltip",{attrs:{overlayClassName:i.prefixCls+"-extension-tooltip"}},[e("template",{slot:"title"},[e("div",{class:i.prefixCls+"-extension-group"},[n])]),e("div",{class:i.prefixCls+"-extension",attrs:{title:"调试"},ref:"extension"},[e("a-icon",{attrs:{type:"bug"}})])]):null}}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t){t.style.position="fixed";var e=void 0,n=void 0,r=void 0,i=void 0,o=void 0,a=void 0;if({mobile:!!navigator.userAgent.match(/AppleWebKit.*Mobile.*/)}.mobile){if(null!=t){var s=document.body.clientWidth-t.offsetWidth,c=document.body.clientHeight-t.offsetHeight,u=function(t){t.preventDefault()};t.addEventListener("touchstart",(function(e){var n=(e||window.event).targetTouches[0];r=n.clientX-t.offsetLeft,i=n.clientY-t.offsetTop,document.addEventListener("touchmove",u,!1),t.addEventListener("touchmove",(function(e){var n=(e||window.event).targetTouches[0];o=n.clientX-r,a=n.clientY-i,o<0?o=0:o>=s&&(o=s),a<0?a=0:a>=c&&(a=c),t.style.left=o+"px",t.style.top=a+"px"})),t.addEventListener("touchend",(function(){document.removeEventListener("touchmove",u)}))}))}}else null!==t&&t.addEventListener("mousedown",(function(r){if(r.stopPropagation(),r.preventDefault(),0===r.button&&null!=t){var i=getComputedStyle(t);e=r.pageX-t.offsetLeft+parseInt(i["margin-left"]),n=r.pageY-t.offsetTop+parseInt(i["margin-right"]);var o=function(r){if(r.stopPropagation(),r.preventDefault(),null!=t){var i=r.pageX-e,o=r.pageY-n;i<0?i=0:i>document.documentElement.clientWidth-t.offsetWidth&&(i=document.documentElement.clientWidth-t.offsetWidth),o<0?o=0:o>document.documentElement.clientHeight-t.offsetHeight&&(o=document.documentElement.clientHeight-t.offsetHeight),t.style.left=i+"px",t.style.top=o+"px"}return!1};document.addEventListener("mousemove",o);document.addEventListener("mouseup",(function t(){document.removeEventListener("mousemove",o),document.removeEventListener("mouseup",t)}))}return!1}))}},function(t,e,n){},function(t,e,n){"use strict";n(373),n(374),n(375),n(376),n(377),n(378),n(379),n(380),n(381),n(382),n(383),n(384),n(385)},function(t,e,n){},function(t,e,n){},function(t,e,n){},function(t,e,n){},function(t,e,n){},function(t,e,n){},function(t,e,n){},function(t,e,n){},function(t,e,n){},function(t,e,n){},function(t,e,n){},function(t,e,n){},function(t,e,n){},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=s(n(9)),i=s(n(27)),o=s(n(28));e.microOne=h,e.microTwo=f,e.microThree=function(){window.__MICRO_APP_ENVIRONMENT__?window["micro-app-"+window.__MICRO_APP_NAME__]={mount:h(),unmount:f()}:h()};var a=s(n(387));function s(t){return t&&t.__esModule?t:{default:t}}var c=void 0,u=void 0,l=function(){function t(){(0,i.default)(this,t)}return(0,o.default)(t,[{key:"start",value:function(t){a.default.start((0,r.default)({},t))}},{key:"isMicro",value:function(){return window.__MICRO_APP_ENVIRONMENT__}},{key:"publicPath",value:function(){window.__MICRO_APP_ENVIRONMENT__&&(n.p=window.__MICRO_APP_PUBLIC_PATH__)}},{key:"registerMicro",value:function(t,e){return c=function(){console.log("********************render micro app********************"),u=new t(e).$mount("#app")},window.__MICRO_APP_ENVIRONMENT__||c(),{renderSub:c,subInstance:u,instance:a.default}}}]),t}();function h(){c()}function f(){u.$destroy(),u.$el.innerHTML="",u=null}e.default=new l},function(t,e,n){"use strict";n.r(e),function(t){n.d(e,"EventCenterForMicroApp",(function(){return Pt})),n.d(e,"MicroApp",(function(){return $t})),n.d(e,"getActiveApps",(function(){return Yt})),n.d(e,"getAllApps",(function(){return Jt})),n.d(e,"preFetch",(function(){return Qt})),n.d(e,"pureCreateElement",(function(){return L})),n.d(e,"removeDomScope",(function(){return P})),n.d(e,"unmountAllApps",(function(){return Kt})),n.d(e,"unmountApp",(function(){return qt})),n.d(e,"version",(function(){return r}));const r="0.8.5",i="undefined"!=typeof window,o=void 0!==t?t:"undefined"!=typeof window?window:"undefined"!=typeof self?self:Function("return this")();function a(t){return"string"==typeof t}function s(t){return"boolean"==typeof t}function c(t){return"function"==typeof t}const u=Array.isArray;function l(t){return"[object Object]"===toString.call(t)}function h(t){return"[object Promise]"===toString.call(t)}function f(t){return c(t)&&0===t.name.indexOf("bound ")&&!t.hasOwnProperty("prototype")}const d=Object.defineProperty,p=Object.defineProperties,m=Object.prototype.hasOwnProperty;function g(t,e=null,...n){const r=e&&a(e)?` app ${e}:`:"";a(t)?console.error(`[micro-app]${r} ${t}`,...n):console.error("[micro-app]"+r,t,...n)}function v(t,e=null,...n){const r=e&&a(e)?` app ${e}:`:"";a(t)?console.warn(`[micro-app]${r} ${t}`,...n):console.warn("[micro-app]"+r,t,...n)}function y(t,...e){Promise.resolve().then(t.bind(null,...e))}function _(t){return t.startsWith("//")?`${location.protocol}${t}`:t}function b(t,e=null){if(!a(t)||!t)return"";try{const{origin:e,pathname:n,search:r}=new URL(_(t));if(/\.(\w+)$/.test(n))return`${e}${n}${r}`;const i=`${e}${n}/`.replace(/\/\/$/,"/");return/^https?:\/\//.test(i)?`${i}${r}`:""}catch(t){return g(t,e),""}}function x(t){return a(t)&&t?t.replace(/(^\d+)|([^\w\d-_])/gi,""):""}function w(t){const{origin:e,pathname:n}=new URL(t);if(/\.(\w+)$/.test(n)){const t=`${e}${n}`.split("/");return t.pop(),t.join("/")+"/"}return`${e}${n}/`.replace(/\/\/$/,"/")}function M(t,e){return!t||/^((((ht|f)tps?)|file):)?\/\//.test(t)||/^(data|blob):/.test(t)?t:new URL(t,w(_(e))).toString()}function S(t,e,n,r){let i=0;function o(){++i===t.length&&r&&r()}t.forEach((t,r)=>{h(t)?t.then(t=>{e({data:t,index:r}),o()}).catch(t=>{n({error:t,index:r}),o()}):(e({data:t,index:r}),o())})}const A=o.requestIdleCallback||function(t){const e=Date.now();return setTimeout((function(){t({didTimeout:!1,timeRemaining:()=>Math.max(0,50-(Date.now()-e))})}),50)};let E=null;function C(t){E=t}function T(t){E!==t&&(C(t),y(()=>{C(null)}))}function I(){return E}function P(){C(null)}function L(t,e){const n=document.createElement(t,e);return n.__MICRO_APP_NAME__&&delete n.__MICRO_APP_NAME__,n}function R(t,e,n){if(e.innerHTML="",n){const n=t.cloneNode(!0),r=document.createDocumentFragment();Array.from(n.childNodes).forEach(t=>{r.appendChild(t)}),e.appendChild(r)}else Array.from(t.childNodes).forEach(t=>{e.appendChild(t)})}function O(t){return!t||/(^\d)|([^\w\d-_\u4e00-\u9fa5])/gi.test(t)}function k(t){return/^body$/i.test(t)||/^head$/i.test(t)||/^html$/i.test(t)}function B(t){return function(t){return"undefined"!=typeof ShadowRoot&&t instanceof ShadowRoot}(t)?t.host:t}function D(t){return t?t.replace(/^\s+|\s+$/g,""):""}function F(){return navigator.userAgent.indexOf("Firefox")>-1}var j,U,N,z;!function(t){t.NAME="name",t.URL="url"}(j||(j={})),function(t){t.NOT_LOADED="NOT_LOADED",t.LOADING_SOURCE_CODE="LOADING_SOURCE_CODE",t.LOAD_SOURCE_FINISHED="LOAD_SOURCE_FINISHED",t.LOAD_SOURCE_ERROR="LOAD_SOURCE_ERROR",t.MOUNTING="MOUNTING",t.MOUNTED="MOUNTED",t.UNMOUNT="UNMOUNT"}(U||(U={})),function(t){t.CREATED="created",t.BEFOREMOUNT="beforemount",t.MOUNTED="mounted",t.UNMOUNT="unmount",t.ERROR="error",t.BEFORESHOW="beforeshow",t.AFTERSHOW="aftershow",t.AFTERHIDDEN="afterhidden"}(N||(N={})),function(t){t.KEEP_ALIVE_SHOW="KEEP_ALIVE_SHOW",t.KEEP_ALIVE_HIDDEN="KEEP_ALIVE_HIDDEN"}(z||(z={}));const G="window,self,globalThis,Array,Object,String,Boolean,Math,Number,Symbol,Date,Promise,Function,Proxy,WeakMap,WeakSet,Set,Map,Reflect,Element,Node,Document,RegExp,Error,TypeError,JSON,isNaN,parseFloat,parseInt,performance,console,decodeURI,encodeURI,decodeURIComponent,encodeURIComponent,location,navigator,undefined";function H(t,e=null,n={}){return c(te.fetch)?te.fetch(t,n,e):fetch(t,n).then(t=>t.text())}const W=/(^|\s+)(html|:root)(?=[\s>~[.#:]+|$)/,V=/(^|\s+)((html[\s>~]+body)|body)(?=[\s>~[.#:]+|$)/;function Z(t,e){t=e?`${e} ${t}`:t;const n=new Error(t);throw n.reason=t,e&&(n.filename=e),n}class Q{constructor(){this.cssText="",this.prefix="",this.baseURI="",this.linkPath="",this.result="",this.scopecssDisable=!1,this.scopecssDisableSelectors=[],this.scopecssDisableNextLine=!1,this.mediaRule=this.createMatcherForAtRuleWithChildRule(/^@media *([^{]+)/,"media"),this.supportsRule=this.createMatcherForAtRuleWithChildRule(/^@supports *([^{]+)/,"supports"),this.documentRule=this.createMatcherForAtRuleWithChildRule(/^@([-\w]+)?document *([^{]+)/,"document"),this.hostRule=this.createMatcherForAtRuleWithChildRule(/^@host\s*/,"host"),this.importRule=this.createMatcherForNoneBraceAtRule("import"),this.charsetRule=this.createMatcherForNoneBraceAtRule("charset"),this.namespaceRule=this.createMatcherForNoneBraceAtRule("namespace")}exec(t,e,n,r){return this.cssText=t,this.prefix=e,this.baseURI=n,this.linkPath=r||"",this.matchRules(),F()?decodeURIComponent(this.result):this.result}reset(){this.cssText=this.prefix=this.baseURI=this.linkPath=this.result="",this.scopecssDisable=this.scopecssDisableNextLine=!1,this.scopecssDisableSelectors=[]}matchRules(){for(this.matchLeadingSpaces(),this.matchComments();this.cssText.length&&"}"!==this.cssText.charAt(0)&&(this.matchAtRule()||this.matchStyleRule());)this.matchComments()}matchStyleRule(){const t=this.formatSelector(!0);return this.scopecssDisableNextLine=!1,t?(this.recordResult(t),this.matchComments(),this.styleDeclarations(),this.matchLeadingSpaces(),!0):Z("selector missing",this.linkPath)}formatSelector(t){const e=this.commonMatch(/^([^{]+)/,t);return!!e&&e[0].replace(/(^|,[\n\s]*)([^,]+)/g,(t,e,n)=>(n=D(n),this.scopecssDisableNextLine||this.scopecssDisable&&(!this.scopecssDisableSelectors.length||this.scopecssDisableSelectors.includes(n))||W.test(n)||(n=V.test(n)?n.replace(V,this.prefix+" micro-app-body"):this.prefix+" "+n),e+n))}styleDeclarations(){return this.matchOpenBrace()?(this.matchAllDeclarations(),!!this.matchCloseBrace()||Z("Declaration missing '}'",this.linkPath)):Z("Declaration missing '{'",this.linkPath)}matchAllDeclarations(){let t=this.commonMatch(/^(?:url\(["']?(?:[^)"'}]+)["']?\)|[^}/])*/,!0)[0];if(t&&(this.scopecssDisableNextLine||this.scopecssDisable&&!this.scopecssDisableSelectors.length||(t=t.replace(/url\(["']?([^)"']+)["']?\)/gm,(t,e)=>/^((data|blob):|#)/.test(e)||/^(https?:)?\/\//.test(e)?t:(/^((\.\.?\/)|[^/])/.test(e)&&this.linkPath&&(this.baseURI=function(t){const e=t.split("/");return e.pop(),_(e.join("/")+"/")}(this.linkPath)),`url("${M(e,this.baseURI)}")`))),this.recordResult(t)),this.scopecssDisableNextLine=!1,this.cssText&&"}"!==this.cssText.charAt(0))return"/"===this.cssText.charAt(0)&&"*"===this.cssText.charAt(1)?this.matchComments():this.commonMatch(/\/+/),this.matchAllDeclarations()}matchAtRule(){return"@"===this.cssText[0]&&(this.scopecssDisableNextLine=!1,this.keyframesRule()||this.mediaRule()||this.customMediaRule()||this.supportsRule()||this.importRule()||this.charsetRule()||this.namespaceRule()||this.documentRule()||this.pageRule()||this.hostRule()||this.fontFaceRule())}keyframesRule(){if(!this.commonMatch(/^@([-\w]+)?keyframes\s*/))return!1;if(!this.commonMatch(/^([-\w]+)\s*/))return Z("@keyframes missing name",this.linkPath);if(this.matchComments(),!this.matchOpenBrace())return Z("@keyframes missing '{'",this.linkPath);for(this.matchComments();this.keyframeRule();)this.matchComments();return this.matchCloseBrace()?(this.matchLeadingSpaces(),!0):Z("@keyframes missing '}'",this.linkPath)}keyframeRule(){let t;const e=[];for(;t=this.commonMatch(/^((\d+\.\d+|\.\d+|\d+)%?|[a-z]+)\s*/);)e.push(t[1]),this.commonMatch(/^,\s*/);return!!e.length&&(this.styleDeclarations(),this.matchLeadingSpaces(),!0)}customMediaRule(){return!!this.commonMatch(/^@custom-media\s+(--[^\s]+)\s*([^{;]+);/)&&(this.matchLeadingSpaces(),!0)}pageRule(){return!!this.commonMatch(/^@page */)&&(this.formatSelector(!1),this.scopecssDisableNextLine=!1,this.commonHandlerForAtRuleWithSelfRule("page"))}fontFaceRule(){return!!this.commonMatch(/^@font-face\s*/)&&this.commonHandlerForAtRuleWithSelfRule("font-face")}createMatcherForAtRuleWithChildRule(t,e){return()=>!!this.commonMatch(t)&&(this.matchOpenBrace()?(this.matchComments(),this.matchRules(),this.matchCloseBrace()?(this.matchLeadingSpaces(),!0):Z(`@${e} missing '}'`,this.linkPath)):Z(`@${e} missing '{'`,this.linkPath))}createMatcherForNoneBraceAtRule(t){const e=new RegExp("^@"+t+"\\s*([^;]+);");return()=>!!this.commonMatch(e)&&(this.matchLeadingSpaces(),!0)}commonHandlerForAtRuleWithSelfRule(t){return this.matchOpenBrace()?(this.matchAllDeclarations(),this.matchCloseBrace()?(this.matchLeadingSpaces(),!0):Z(`@${t} missing '}'`,this.linkPath)):Z(`@${t} missing '{'`,this.linkPath)}matchComments(){for(;this.matchComment(););}matchComment(){if("/"!==this.cssText.charAt(0)||"*"!==this.cssText.charAt(1))return!1;this.scopecssDisableNextLine=!1;let t=2;for(;""!==this.cssText.charAt(t)&&("*"!==this.cssText.charAt(t)||"/"!==this.cssText.charAt(t+1));)++t;if(t+=2,""===this.cssText.charAt(t-1))return Z("End of comment missing",this.linkPath);let e=this.cssText.slice(2,t-2);if(this.recordResult(`/*${e}*/`),e=D(e.replace(/^\s*!/,"")),"scopecss-disable-next-line"===e)this.scopecssDisableNextLine=!0;else if(/^scopecss-disable/.test(e))if("scopecss-disable"===e)this.scopecssDisable=!0;else{this.scopecssDisable=!0;e.replace("scopecss-disable","").split(",").forEach(t=>{this.scopecssDisableSelectors.push(D(t))})}else"scopecss-enable"===e&&(this.scopecssDisable=!1,this.scopecssDisableSelectors=[]);return this.cssText=this.cssText.slice(t),this.matchLeadingSpaces(),!0}commonMatch(t,e=!1){const n=t.exec(this.cssText);if(!n)return;const r=n[0];return this.cssText=this.cssText.slice(r.length),e||this.recordResult(r),n}matchOpenBrace(){return this.commonMatch(/^{\s*/)}matchCloseBrace(){return this.commonMatch(/^}/)}matchLeadingSpaces(){this.commonMatch(/^\s*/)}recordResult(t){F()?this.result+=encodeURIComponent(t):this.result+=t}}function X(t,e,n,r,i){if(!t.__MICRO_APP_HAS_SCOPED__){t.__MICRO_APP_HAS_SCOPED__=!0;let o=null;try{o=Y.exec(t.textContent,n,r,i),Y.reset()}catch(t){Y.reset(),g("An error occurred while parsing CSS:\n",e,t)}o&&(t.textContent=o)}}let Y;function J(t,e){if(e.scopecss){const n=`${te.tagName}[name=${e.name}]`;if(Y||(Y=new Q),t.textContent)X(t,e.name,n,e.url,t.__MICRO_APP_LINK_PATH__);else{const r=new MutationObserver((function(){r.disconnect(),t.textContent&&!t.hasAttribute("data-styled")&&X(t,e.name,n,e.url,t.__MICRO_APP_LINK_PATH__)}));r.observe(t,{childList:!0})}}return t}function q(t,e){Object.defineProperties(t,{currentTarget:{get:()=>e},srcElement:{get:()=>e},target:{get:()=>e}})}function K(t){const e=new CustomEvent("load");q(e,t),c(t.onload)?t.onload(e):t.dispatchEvent(e)}function $(t){const e=new CustomEvent("error");q(e,t),c(t.onerror)?t.onerror(e):t.dispatchEvent(e)}const tt=new Map;function et(t,e,n,r=!1){const i=t.getAttribute("rel");let o=t.getAttribute("href"),a=null;if("stylesheet"===i&&o){if(o=M(o,n.url),r)return{url:o,info:{code:"",isGlobal:t.hasAttribute("global")}};a=document.createComment(`link element with href=${o} move to micro-app-head as style element`),n.source.links.set(o,{code:"",placeholder:a,isGlobal:t.hasAttribute("global")})}else i&&["prefetch","preload","prerender","icon","apple-touch-icon"].includes(i)?r?a=document.createComment(`link element with rel=${i}${o?" & href="+o:""} removed by micro-app`):e.removeChild(t):o&&t.setAttribute("href",M(o,n.url));return r?{replaceComment:a}:a?e.replaceChild(a,t):void 0}function nt(t,e,n){const r=Array.from(e.source.links.entries());S(r.map(([t])=>tt.has(t)?tt.get(t):H(t,e.name)),t=>{!function(t,e,n,r,i){e.isGlobal&&!tt.has(t)&&tt.set(t,n);const o=L("style");o.textContent=n,o.__MICRO_APP_LINK_PATH__=t,o.setAttribute("data-origin-href",t),e.placeholder.parentNode?e.placeholder.parentNode.replaceChild(J(o,i),e.placeholder):r.appendChild(J(o,i));e.placeholder=null,e.code=n}(r[t.index][0],r[t.index][1],t.data,n,e)},t=>{g(t,e.name)},()=>{e.onLoad(t)})}const rt=new WeakMap;function it(t,e,n){if(e instanceof HTMLStyleElement){if(e.hasAttribute("exclude")){const t=document.createComment("style element with exclude attribute ignored by micro-app");return rt.set(e,t),t}return n.scopecss&&!e.hasAttribute("ignore")?J(e,n):e}if(e instanceof HTMLLinkElement){if(e.hasAttribute("exclude")){const t=document.createComment("link element with exclude attribute ignored by micro-app");return rt.set(e,t),t}if(e.hasAttribute("ignore"))return e;const{url:r,info:i,replaceComment:o}=et(e,t,n,!0);if(r&&i){const t=L("style");return t.__MICRO_APP_LINK_PATH__=r,function(t,e,n,r,i){if(n.source.links.has(t))return i.textContent=n.source.links.get(t).code,J(i,n),void y(()=>K(r));if(tt.has(t)){const o=tt.get(t);return e.code=o,n.source.links.set(t,e),i.textContent=o,J(i,n),void y(()=>K(r))}H(t,n.name).then(o=>{e.code=o,n.source.links.set(t,e),e.isGlobal&&tt.set(t,o),i.textContent=o,J(i,n),K(r)}).catch(t=>{g(t,n.name),$(r)})}(r,i,n,e,t),rt.set(e,t),t}return o?(rt.set(e,o),o):e}if(e instanceof HTMLScriptElement){const{replaceComment:r,url:i,info:o}=yt(e,t,n,!0)||{};if(i&&o){if(o.isExternal){const t=function(t,e,n,r){const i=()=>K(r);if(n.source.scripts.has(t)){const e=n.source.scripts.get(t);return!e.module&&y(i),bt(t,n,e,!0,i)}if(vt.has(t)){const r=vt.get(t);return e.code=r,n.source.scripts.set(t,e),!e.module&&y(i),bt(t,n,e,!0,i)}let o;o=n.inline||e.module?L("script"):document.createComment(`dynamic script with src='${t}' extract by micro-app`);return H(t,n.name).then(a=>{e.code=a,n.source.scripts.set(t,e),e.isGlobal&&vt.set(t,a);try{a=Mt(t,n,a,e),n.inline||e.module?xt(t,a,e.module,o,i):wt(a,e)}catch(e){console.error(`[micro-app from runDynamicScript] app ${n.name}: `,e,t)}!e.module&&K(r)}).catch(t=>{g(t,n.name),$(r)}),o}(i,o,n,e);return rt.set(e,t),t}{const t=bt(i,n,o,!0);return rt.set(e,t),t}}return r?(rt.set(e,r),r):e}return e}function ot(t,e,n,r,i){if(n===document.head){const o=t.container.querySelector("micro-app-head");return i&&!o.contains(i)?mt.rawAppendChild.call(o,r):e!==mt.rawRemoveChild||o.contains(r)?e===mt.rawAppend||e===mt.rawPrepend?e.call(o,r):e.call(o,r,i):n.contains(r)?e.call(n,r):r}if(n===document.body){const o=t.container.querySelector("micro-app-body");return i&&!o.contains(i)?mt.rawAppendChild.call(o,r):e!==mt.rawRemoveChild||o.contains(r)?e===mt.rawAppend||e===mt.rawPrepend?e.call(o,r):e.call(o,r,i):n.contains(r)?e.call(n,r):r}return e===mt.rawAppend||e===mt.rawPrepend?e.call(n,r):e.call(n,r,i)}function at(t){var e;return null!==(e=rt.get(t))&&void 0!==e?e:t}function st(t,e,n,r){if(null==e?void 0:e.__MICRO_APP_NAME__){const i=Wt.get(e.__MICRO_APP_NAME__);return(null==i?void 0:i.container)?ot(i,r,t,it(t,e,i),n&&at(n)):r===mt.rawAppend||r===mt.rawPrepend?r.call(t,e):r.call(t,e,n)}if(r===mt.rawAppend||r===mt.rawPrepend){const n=I();if(!(e instanceof Node)&&n){const i=Wt.get(n);if(null==i?void 0:i.container){if(t===document.head)return r.call(i.container.querySelector("micro-app-head"),e);if(t===document.body)return r.call(i.container.querySelector("micro-app-body"),e)}}return r.call(t,e)}return r.call(t,e,n)}function ct(){!function(){const t=mt.rawDocument;function e(e){var n,r,i;const o=I();return o&&e&&!k(e)&&t===this?null!==(i=null===(r=null===(n=Wt.get(o))||void 0===n?void 0:n.container)||void 0===r?void 0:r.querySelector(e))&&void 0!==i?i:null:mt.rawQuerySelector.call(this,e)}function n(e){var n,r,i;const o=I();return o&&e&&!k(e)&&t===this?null!==(i=null===(r=null===(n=Wt.get(o))||void 0===n?void 0:n.container)||void 0===r?void 0:r.querySelectorAll(e))&&void 0!==i?i:[]:mt.rawQuerySelectorAll.call(this,e)}Document.prototype.createElement=function(t,e){return ut(mt.rawCreateElement.call(this,t,e))},Document.prototype.createElementNS=function(t,e,n){return ut(mt.rawCreateElementNS.call(this,t,e,n))},Document.prototype.createDocumentFragment=function(){return ut(mt.rawCreateDocumentFragment.call(this))},Document.prototype.querySelector=e,Document.prototype.querySelectorAll=n,Document.prototype.getElementById=function(t){if(!I()||O(t))return mt.rawGetElementById.call(this,t);try{return e.call(this,"#"+t)}catch(e){return mt.rawGetElementById.call(this,t)}},Document.prototype.getElementsByClassName=function(t){if(!I()||O(t))return mt.rawGetElementsByClassName.call(this,t);try{return n.call(this,"."+t)}catch(e){return mt.rawGetElementsByClassName.call(this,t)}},Document.prototype.getElementsByTagName=function(t){var e;const r=I();if(!r||k(t)||O(t)||!(null===(e=Wt.get(r))||void 0===e?void 0:e.inline)&&/^script$/i.test(t))return mt.rawGetElementsByTagName.call(this,t);try{return n.call(this,t)}catch(e){return mt.rawGetElementsByTagName.call(this,t)}},Document.prototype.getElementsByName=function(t){if(!I()||O(t))return mt.rawGetElementsByName.call(this,t);try{return n.call(this,`[name=${t}]`)}catch(e){return mt.rawGetElementsByName.call(this,t)}}}(),Element.prototype.appendChild=function(t){return st(this,t,null,mt.rawAppendChild)},Element.prototype.insertBefore=function(t,e){return st(this,t,e,mt.rawInsertBefore)},Element.prototype.replaceChild=function(t,e){return st(this,t,e,mt.rawReplaceChild)},Element.prototype.append=function(...t){let e=0;const n=t.length;for(;e<n;)st(this,t[e],null,mt.rawAppend),e++},Element.prototype.prepend=function(...t){let e=t.length;for(;e>0;)st(this,t[e-1],null,mt.rawPrepend),e--},Element.prototype.removeChild=function(t){if(null==t?void 0:t.__MICRO_APP_NAME__){const e=Wt.get(t.__MICRO_APP_NAME__);return(null==e?void 0:e.container)?ot(e,mt.rawRemoveChild,this,at(t)):mt.rawRemoveChild.call(this,t)}return mt.rawRemoveChild.call(this,t)},Element.prototype.cloneNode=function(t){const e=mt.rawCloneNode.call(this,t);return this.__MICRO_APP_NAME__&&(e.__MICRO_APP_NAME__=this.__MICRO_APP_NAME__),e}}function ut(t){const e=I();return e&&(t.__MICRO_APP_NAME__=e),t}let lt=!1;function ht(){C(null),Document.prototype.createElement=mt.rawCreateElement,Document.prototype.createElementNS=mt.rawCreateElementNS,Document.prototype.createDocumentFragment=mt.rawCreateDocumentFragment,Document.prototype.querySelector=mt.rawQuerySelector,Document.prototype.querySelectorAll=mt.rawQuerySelectorAll,Document.prototype.getElementById=mt.rawGetElementById,Document.prototype.getElementsByClassName=mt.rawGetElementsByClassName,Document.prototype.getElementsByTagName=mt.rawGetElementsByTagName,Document.prototype.getElementsByName=mt.rawGetElementsByName,Element.prototype.appendChild=mt.rawAppendChild,Element.prototype.insertBefore=mt.rawInsertBefore,Element.prototype.replaceChild=mt.rawReplaceChild,Element.prototype.removeChild=mt.rawRemoveChild,Element.prototype.append=mt.rawAppend,Element.prototype.prepend=mt.rawPrepend,Element.prototype.cloneNode=mt.rawCloneNode}let ft=!1;function dt(){pt(),Wt.forEach(t=>{t.container&&B(t.container).disconnectedCallback()}),!window.__MICRO_APP_UMD_MODE__&&Wt.clear()}function pt(){window.__MICRO_APP_ENVIRONMENT__&&window.removeEventListener("unmount",dt,!1)}const mt={};function gt(){if(i){const t=Element.prototype.setAttribute,e=Element.prototype.appendChild,n=Element.prototype.insertBefore,r=Element.prototype.replaceChild,i=Element.prototype.removeChild,o=Element.prototype.append,a=Element.prototype.prepend,s=Element.prototype.cloneNode,c=Document.prototype.createElement,u=Document.prototype.createElementNS,l=Document.prototype.createDocumentFragment,h=Document.prototype.querySelector,f=Document.prototype.querySelectorAll,d=Document.prototype.getElementById,p=Document.prototype.getElementsByClassName,m=Document.prototype.getElementsByTagName,g=Document.prototype.getElementsByName,v=new Proxy(Image,{construct(t,e){const n=new t(...e);return n.__MICRO_APP_NAME__=I(),n}}),y=Function("return window")(),_=Function("return document")(),b="noModule"in document.createElement("script"),x=y.addEventListener,w=y.removeEventListener,M=y.setInterval,S=y.setTimeout,A=y.clearInterval,E=y.clearTimeout,C=_.addEventListener,T=_.removeEventListener;window.__MICRO_APP_BASE_APPLICATION__=!0,Object.assign(mt,{rawSetAttribute:t,rawAppendChild:e,rawInsertBefore:n,rawReplaceChild:r,rawRemoveChild:i,rawAppend:o,rawPrepend:a,rawCloneNode:s,rawCreateElement:c,rawCreateElementNS:u,rawCreateDocumentFragment:l,rawQuerySelector:h,rawQuerySelectorAll:f,rawGetElementById:d,rawGetElementsByClassName:p,rawGetElementsByTagName:m,rawGetElementsByName:g,ImageProxy:v,rawWindow:y,rawDocument:_,supportModuleScript:b,rawWindowAddEventListener:x,rawWindowRemoveEventListener:w,rawSetInterval:M,rawSetTimeout:S,rawClearInterval:A,rawClearTimeout:E,rawDocumentAddEventListener:C,rawDocumentRemoveEventListener:T}),function(){if(!ft){ft=!0;const t=L("style");mt.rawSetAttribute.call(t,"type","text/css"),t.textContent=`\n${te.tagName}, micro-app-body { display: block; } \nmicro-app-head { display: none; }`,mt.rawDocument.head.appendChild(t)}}(),pt(),window.__MICRO_APP_ENVIRONMENT__&&window.addEventListener("unmount",dt,!1)}}const vt=new Map;function yt(t,e,n,r=!1){let i=null,o=t.getAttribute("src");if(t.hasAttribute("exclude"))i=document.createComment("script element with exclude attribute removed by micro-app");else{if(t.type&&!["text/javascript","text/ecmascript","application/javascript","application/ecmascript","module"].includes(t.type)||t.hasAttribute("ignore"))return null;if(mt.supportModuleScript&&t.noModule||!mt.supportModuleScript&&"module"===t.type)i=document.createComment((t.noModule?"noModule":"module")+" script ignored by micro-app");else if(o){o=M(o,n.url);const e={code:"",isExternal:!0,isDynamic:r,async:t.hasAttribute("async"),defer:t.defer||"module"===t.type,module:"module"===t.type,isGlobal:t.hasAttribute("global")};if(r)return{url:o,info:e};n.source.scripts.set(o,e),i=document.createComment(`script with src='${o}' extract by micro-app`)}else if(t.textContent){const e="inline-"+Math.random().toString(36).substr(2,15),o={code:t.textContent,isExternal:!1,isDynamic:r,async:!1,defer:"module"===t.type,module:"module"===t.type};if(r)return{url:e,info:o};n.source.scripts.set(e,o),i=document.createComment("inline script extract by micro-app")}else r||(i=document.createComment("script element removed by micro-app"))}return r?{replaceComment:i}:e.replaceChild(i,t)}function _t(t,e){const n=Array.from(e.source.scripts.entries()),r=[],i=[];for(const[t,o]of n)if(o.isExternal){const n=vt.get(t);n?o.code=n:(!o.defer&&!o.async||e.isPrefetch)&&(r.push(H(t,e.name)),i.push([t,o]))}r.length?S(r,t=>{!function(t,e,n){e.isGlobal&&!vt.has(t)&&vt.set(t,n);e.code=n}(i[t.index][0],i[t.index][1],t.data)},t=>{g(t,e.name)},()=>{e.onLoad(t)}):e.onLoad(t)}function bt(t,e,n,r,i){var o;try{const a=Mt(t,e,n.code,n);if(e.inline||n.module){const s=L("script");if(xt(t,a,n.module,s,i),r)return s;null===(o=e.container)||void 0===o||o.querySelector("micro-app-body").appendChild(s)}else if(wt(a,n),r)return document.createComment("dynamic script extract by micro-app")}catch(t){console.error(`[micro-app from runScript] app ${e.name}: `,t)}}function xt(t,e,n,r,i){if(n){const t=new Blob([e],{type:"text/javascript"});r.src=URL.createObjectURL(t),r.setAttribute("type","module"),i&&(i.moduleCount&&i.moduleCount--,r.onload=i.bind(r,0===i.moduleCount))}else r.textContent=e;t.startsWith("inline-")||r.setAttribute("data-origin-src",t)}function wt(t,e){e.code2Function||(e.code2Function=new Function(t)),e.code2Function.call(window)}function Mt(t,e,n,r){return l(te.plugins)&&(n=function(t,e,n,r,i){var o;const a=St(r.global,e,t,i);return St(null===(o=r.modules)||void 0===o?void 0:o[n],a,t,i)}(t,n,e.name,te.plugins,r)),e.sandBox&&!r.module?(mt.rawWindow.__MICRO_APP_PROXY_WINDOW__=e.sandBox.proxyWindow,`;(function(proxyWindow){with(proxyWindow.__MICRO_APP_WINDOW__){(function(${G}){;${n}\n}).call(proxyWindow,${G})}})(window.__MICRO_APP_PROXY_WINDOW__);`):n}function St(t,e,n,r){return u(t)?t.reduce((t,e)=>l(e)&&c(e.loader)?e.loader(t,n,e.options,r):t,e):e}function At(t,e){const n=function(t){const e=L("div");return e.innerHTML=t,e}(t),r=n.querySelector("micro-app-head"),i=n.querySelector("micro-app-body");if(!r||!i){const t=`element ${r?"body":"head"} is missing`;return e.onerror(new Error(t)),g(t,e.name)}!function t(e,n,r){const i=Array.from(e.children);i.length&&i.forEach(e=>{t(e,n)});for(const t of i)t instanceof HTMLLinkElement?t.hasAttribute("exclude")?e.replaceChild(document.createComment("link element with exclude attribute ignored by micro-app"),t):t.hasAttribute("ignore")?t.hasAttribute("href")&&t.setAttribute("href",M(t.getAttribute("href"),n.url)):et(t,e,n):t instanceof HTMLStyleElement?t.hasAttribute("exclude")?e.replaceChild(document.createComment("style element with exclude attribute ignored by micro-app"),t):n.scopecss&&!t.hasAttribute("ignore")&&J(t,n):t instanceof HTMLScriptElement?yt(t,e,n):t instanceof HTMLMetaElement||t instanceof HTMLTitleElement?e.removeChild(t):t instanceof HTMLImageElement&&t.hasAttribute("src")&&t.setAttribute("src",M(t.getAttribute("src"),n.url))}(n,e),e.source.links.size?nt(n,e,r):e.onLoad(n),e.source.scripts.size?_t(n,e):e.onLoad(n)}const Et=new class{constructor(){this.eventList=new Map}isLegalName(t){return!!t||(g("event-center: Invalid name"),!1)}on(t,e,n=!1){if(this.isLegalName(t)){if(!c(e))return g("event-center: Invalid callback function");let r=this.eventList.get(t);r?n&&Object.getOwnPropertyNames(r.data).length&&e(r.data):(r={data:{},callbacks:new Set},this.eventList.set(t,r)),r.callbacks.add(e)}}off(t,e){if(this.isLegalName(t)){const n=this.eventList.get(t);n&&(c(e)?n.callbacks.delete(e):n.callbacks.clear())}}dispatch(t,e){if(this.isLegalName(t)){if(!l(e))return g("event-center: data must be object");let n=this.eventList.get(t);if(n){if(n.data!==e){n.data=e;for(const t of n.callbacks)t(e)}}else n={data:e,callbacks:new Set},this.eventList.set(t,n)}}getData(t){var e;const n=this.eventList.get(t);return null!==(e=null==n?void 0:n.data)&&void 0!==e?e:null}};function Ct(t,e){return a(t)&&t?e?`__from_base_app_${t}__`:`__from_micro_app_${t}__`:""}class Tt{addGlobalDataListener(t,e){const n=this.appName;n&&(t.__APP_NAME__=n,t.__AUTO_TRIGGER__=e),Et.on("global",t,e)}removeGlobalDataListener(t){c(t)&&Et.off("global",t)}setGlobalData(t){P(),Et.dispatch("global",t)}getGlobalData(){return Et.getData("global")}clearGlobalDataListener(){const t=this.appName,e=Et.eventList.get("global");if(e)for(const n of e.callbacks)(t&&t===n.__APP_NAME__||!t&&!n.__APP_NAME__)&&e.callbacks.delete(n)}}class It extends Tt{addDataListener(t,e,n){Et.on(Ct(x(t),!1),e,n)}removeDataListener(t,e){c(e)&&Et.off(Ct(x(t),!1),e)}getData(t,e=!1){return Et.getData(Ct(x(t),e))}setData(t,e){Et.dispatch(Ct(x(t),!0),e)}clearDataListener(t){Et.off(Ct(x(t),!1))}}class Pt extends Tt{constructor(t){super(),this.appName=x(t),!this.appName&&g("Invalid appName "+t)}addDataListener(t,e){t.__AUTO_TRIGGER__=e,Et.on(Ct(this.appName,!0),t,e)}removeDataListener(t){c(t)&&Et.off(Ct(this.appName,!0),t)}getData(){return Et.getData(Ct(this.appName,!0))}dispatch(t){P(),Et.dispatch(Ct(this.appName,!1),t);const e=Wt.get(this.appName);if((null==e?void 0:e.container)&&l(t)){const n=new CustomEvent("datachange",{detail:{data:t}});B(e.container).dispatchEvent(n)}}clearDataListener(){Et.off(Ct(this.appName,!0))}}function Lt(t,e){if(e.__MICRO_APP_BOUND_WINDOW_FUNCTION__)return e.__MICRO_APP_BOUND_WINDOW_FUNCTION__;if(!function(t){var e;if(s(t.__MICRO_APP_IS_CONSTRUCTOR__))return t.__MICRO_APP_IS_CONSTRUCTOR__;const n=t.toString(),r=(null===(e=t.prototype)||void 0===e?void 0:e.constructor)===t&&Object.getOwnPropertyNames(t.prototype).length>1||/^function\s+[A-Z]/.test(n)||/^class\s+/.test(n);return t.__MICRO_APP_IS_CONSTRUCTOR__=r}(e)&&!function(t){return s(t.__MICRO_APP_IS_BOUND_FUNCTION__)?t.__MICRO_APP_IS_BOUND_FUNCTION__:t.__MICRO_APP_IS_BOUND_FUNCTION__=f(t)}(e)){const n=e.bind(t);for(const t in e)n[t]=e[t];return e.hasOwnProperty("prototype")&&d(n,"prototype",{value:e.prototype,configurable:!0,enumerable:!1,writable:!0}),e.__MICRO_APP_BOUND_WINDOW_FUNCTION__=n}return e}const Rt=new Map;let Ot=!1;const kt=new Map;function Bt(){const{rawDocument:t,rawDocumentAddEventListener:e,rawDocumentRemoveEventListener:n}=mt;!Ot&&function(){if(Ot=!0,Object.getOwnPropertyDescriptor(document,"onclick"))return v("Cannot redefine document property onclick");const t=document.onclick;document.onclick=null;let e=!1;function n(t){Rt.forEach(e=>{c(e)&&e.call(document,t)})}d(document,"onclick",{configurable:!0,enumerable:!0,get(){const t=I();return t?Rt.get(t):Rt.get("base")},set(t){const r=I();r?Rt.set(r,t):Rt.set("base",t),!e&&c(t)&&(e=!0,mt.rawDocumentAddEventListener.call(mt.rawDocument,"click",n,!1))}}),t&&(document.onclick=t)}(),document.addEventListener=function(n,r,i){var o;const a=I();if(a&&(!(null===(o=Wt.get(a))||void 0===o?void 0:o.umdMode)||!f(r))){const t=kt.get(a);if(t){const e=t.get(n);e?e.add(r):t.set(n,new Set([r]))}else kt.set(a,new Map([[n,new Set([r])]]));r&&(r.__MICRO_APP_MARK_OPTIONS__=i)}e.call(t,n,r,i)},document.removeEventListener=function(e,r,i){var o;const a=I();if(a&&(!(null===(o=Wt.get(a))||void 0===o?void 0:o.umdMode)||!f(r))){const t=kt.get(a);if(t){const n=t.get(e);(null==n?void 0:n.size)&&n.has(r)&&n.delete(r)}}n.call(t,e,r,i)}}const Dt=["unmount","appstate-change"];function Ft(t,e){return Dt.includes(t)?`${t}-${e.__MICRO_APP_NAME__}`:t}const jt=["System","__cjsWrapper"],Ut=["location"],Nt=["window","self","globalThis"];class zt{constructor(t,e){this.scopeProperties=["webpackJsonp","Vue"],this.escapeProperties=[],this.injectedKeys=new Set,this.escapeKeys=new Set,this.active=!1,this.microAppWindow={},this.getSpecialProperties(t),this.proxyWindow=this.createProxyWindow(t),this.initMicroAppWindow(this.microAppWindow,t,e),Object.assign(this,function(t){const e=t.__MICRO_APP_NAME__,n=new Map,r=new Map,i=new Map,{rawWindow:o,rawDocument:a,rawWindowAddEventListener:s,rawWindowRemoveEventListener:c,rawSetInterval:u,rawSetTimeout:l,rawClearInterval:h,rawClearTimeout:f,rawDocumentRemoveEventListener:d}=mt;t.addEventListener=function(e,r,i){e=Ft(e,t);const a=n.get(e);a?a.add(r):n.set(e,new Set([r])),r&&(r.__MICRO_APP_MARK_OPTIONS__=i),s.call(o,e,r,i)},t.removeEventListener=function(e,r,i){e=Ft(e,t);const a=n.get(e);(null==a?void 0:a.size)&&a.has(r)&&a.delete(r),c.call(o,e,r,i)},t.setInterval=function(t,e,...n){const i=u.call(o,t,e,...n);return r.set(i,{handler:t,timeout:e,args:n}),i},t.setTimeout=function(t,e,...n){const r=l.call(o,t,e,...n);return i.set(r,{handler:t,timeout:e,args:n}),r},t.clearInterval=function(t){r.delete(t),h.call(o,t)},t.clearTimeout=function(t){i.delete(t),f.call(o,t)};const p=new Map,m=new Map;let g,v=new Map,y=new Map;return{recordUmdEffect:()=>{n.forEach((t,e)=>{t.size&&p.set(e,new Set(t))}),r.size&&(v=new Map(r)),i.size&&(y=new Map(i)),g=Rt.get(e);const t=kt.get(e);t&&t.forEach((t,e)=>{t.size&&m.set(e,new Set(t))})},rebuildUmdEffect:()=>{p.forEach((e,n)=>{for(const r of e)t.addEventListener(n,r,null==r?void 0:r.__MICRO_APP_MARK_OPTIONS__)}),v.forEach(e=>{t.setInterval(e.handler,e.timeout,...e.args)}),y.forEach(e=>{t.setTimeout(e.handler,e.timeout,...e.args)}),g&&Rt.set(e,g),C(e),m.forEach((t,e)=>{for(const n of t)document.addEventListener(e,n,null==n?void 0:n.__MICRO_APP_MARK_OPTIONS__)}),C(null)},releaseEffect:()=>{n.size&&(n.forEach((t,e)=>{for(const n of t)c.call(o,e,n)}),n.clear()),r.size&&(r.forEach((t,e)=>{h.call(o,e)}),r.clear()),i.size&&(i.forEach((t,e)=>{f.call(o,e)}),i.clear()),Rt.delete(e);const t=kt.get(e);t&&(t.forEach((t,e)=>{for(const n of t)d.call(a,e,n)}),t.clear())}}}(this.microAppWindow))}start(t){this.active||(this.active=!0,this.microAppWindow.__MICRO_APP_BASE_ROUTE__=this.microAppWindow.__MICRO_APP_BASE_URL__=t,mt.rawWindow._babelPolyfill&&(mt.rawWindow._babelPolyfill=!1),1==++zt.activeCount&&(Bt(),ct()))}stop(){this.active&&(this.active=!1,this.releaseEffect(),this.microAppWindow.microApp.clearDataListener(),this.microAppWindow.microApp.clearGlobalDataListener(),this.injectedKeys.forEach(t=>{Reflect.deleteProperty(this.microAppWindow,t)}),this.injectedKeys.clear(),this.escapeKeys.forEach(t=>{Reflect.deleteProperty(mt.rawWindow,t)}),this.escapeKeys.clear(),0==--zt.activeCount&&(document.addEventListener=mt.rawDocumentAddEventListener,document.removeEventListener=mt.rawDocumentRemoveEventListener,ht()))}recordUmdSnapshot(){this.microAppWindow.__MICRO_APP_UMD_MODE__=!0,this.recordUmdEffect(),function(t){const e=t.appName;t.umdDataListeners={global:new Set,normal:new Set};const n=Et.eventList.get("global");if(n)for(const r of n.callbacks)e===r.__APP_NAME__&&t.umdDataListeners.global.add(r);const r=Et.eventList.get(Ct(e,!0));r&&(t.umdDataListeners.normal=new Set(r.callbacks))}(this.microAppWindow.microApp),this.recordUmdInjectedValues=new Map,this.injectedKeys.forEach(t=>{this.recordUmdInjectedValues.set(t,Reflect.get(this.microAppWindow,t))})}rebuildUmdSnapshot(){this.recordUmdInjectedValues.forEach((t,e)=>{Reflect.set(this.proxyWindow,e,t)}),this.rebuildUmdEffect(),function(t){for(const e of t.umdDataListeners.global)t.addGlobalDataListener(e,e.__AUTO_TRIGGER__);for(const e of t.umdDataListeners.normal)t.addDataListener(e,e.__AUTO_TRIGGER__)}(this.microAppWindow.microApp)}getSpecialProperties(t){var e;l(te.plugins)&&(this.commonActionForSpecialProperties(te.plugins.global),this.commonActionForSpecialProperties(null===(e=te.plugins.modules)||void 0===e?void 0:e[t]))}commonActionForSpecialProperties(t){if(u(t))for(const e of t)l(e)&&(u(e.scopeProperties)&&(this.scopeProperties=this.scopeProperties.concat(e.scopeProperties)),u(e.escapeProperties)&&(this.escapeProperties=this.escapeProperties.concat(e.escapeProperties)))}createProxyWindow(t){const e=mt.rawWindow,n=new Map;return new Proxy(this.microAppWindow,{get:(n,r)=>{if(T(t),Reflect.has(n,r)||a(r)&&/^__MICRO_APP_/.test(r)||this.scopeProperties.includes(r))return Reflect.get(n,r);const i=Reflect.get(e,r);return c(i)?Lt(e,i):i},set:(t,n,r)=>{if(this.active){if(Ut.includes(n))Reflect.set(e,n,r);else if(m.call(t,n)||!m.call(e,n)||this.scopeProperties.includes(n))Reflect.set(t,n,r),this.injectedKeys.add(n);else{const i=Object.getOwnPropertyDescriptor(e,n),{configurable:o,enumerable:a,writable:s,set:c}=i;d(t,n,{value:r,configurable:o,enumerable:a,writable:null!=s?s:!!c}),this.injectedKeys.add(n)}(this.escapeProperties.includes(n)||jt.includes(n)&&!Reflect.has(e,n))&&!this.scopeProperties.includes(n)&&(Reflect.set(e,n,r),this.escapeKeys.add(n))}return!0},has:(t,n)=>this.scopeProperties.includes(n)?n in t:n in t||n in e,getOwnPropertyDescriptor:(t,r)=>{if(m.call(t,r))return n.set(r,"target"),Object.getOwnPropertyDescriptor(t,r);if(m.call(e,r)){n.set(r,"rawWindow");const t=Object.getOwnPropertyDescriptor(e,r);return t&&!t.configurable&&(t.configurable=!0),t}},defineProperty:(t,r,i)=>"rawWindow"===n.get(r)?Reflect.defineProperty(e,r,i):Reflect.defineProperty(t,r,i),ownKeys:t=>Reflect.ownKeys(e).concat(Reflect.ownKeys(t)).filter((function(t){return!(t in this)&&(this[t]=!0)}),Object.create(null)),deleteProperty:(t,n)=>!m.call(t,n)||(this.injectedKeys.has(n)&&this.injectedKeys.delete(n),this.escapeKeys.has(n)&&Reflect.deleteProperty(e,n),Reflect.deleteProperty(t,n))})}initMicroAppWindow(t,e,n){t.__MICRO_APP_ENVIRONMENT__=!0,t.__MICRO_APP_NAME__=e,t.__MICRO_APP_PUBLIC_PATH__=w(n),t.__MICRO_APP_WINDOW__=t,t.microApp=Object.assign(new Pt(e),{removeDomScope:P,pureCreateElement:L}),t.rawWindow=mt.rawWindow,t.rawDocument=mt.rawDocument,t.hasOwnProperty=e=>m.call(t,e)||m.call(mt.rawWindow,e),this.setMappingPropertiesWithRawDescriptor(t),this.setHijackProperties(t,e)}setMappingPropertiesWithRawDescriptor(t){let e,n;const r=mt.rawWindow;r===r.parent?e=n=this.proxyWindow:(e=r.top,n=r.parent),d(t,"top",this.createDescriptorForMicroAppWindow("top",e)),d(t,"parent",this.createDescriptorForMicroAppWindow("parent",n)),Nt.forEach(e=>{d(t,e,this.createDescriptorForMicroAppWindow(e,this.proxyWindow))})}createDescriptorForMicroAppWindow(t,e){const{configurable:n=!0,enumerable:r=!0,writable:i,set:o}=Object.getOwnPropertyDescriptor(mt.rawWindow,t)||{writable:!0};return{value:e,configurable:n,enumerable:r,writable:null!=i?i:!!o}}setHijackProperties(t,e){let n,r;p(t,{document:{get:()=>(T(e),mt.rawDocument),configurable:!1,enumerable:!0},eval:{get:()=>(T(e),n||eval),set:t=>{n=t},configurable:!0,enumerable:!1},Image:{get:()=>(T(e),r||mt.ImageProxy),set:t=>{r=t},configurable:!0,enumerable:!1}})}}function Gt(t,e,n,r){var i;if(!t)return g("element does not exist in lifecycle "+n,e);t=B(t),P();const o=Object.assign({name:e,container:t},r&&{error:r}),a=new CustomEvent(n,{detail:o});!function(t,e){Object.defineProperties(t,{currentTarget:{get:()=>e},target:{get:()=>e}})}(a,t),c(null===(i=te.lifeCycles)||void 0===i?void 0:i[n])&&te.lifeCycles[n](a),t.dispatchEvent(a)}function Ht(t,e,n={}){const r=new CustomEvent(`${t}-${e}`,{detail:n});window.dispatchEvent(r)}zt.activeCount=0;const Wt=new Map;class Vt{constructor({name:t,url:e,ssrUrl:n,container:r,inline:i,scopecss:o,useSandbox:a,baseroute:s}){this.state=U.NOT_LOADED,this.keepAliveState=null,this.keepAliveContainer=null,this.loadSourceLevel=0,this.umdHookMount=null,this.umdHookUnmount=null,this.libraryName=null,this.umdMode=!1,this.isPrefetch=!1,this.prefetchResolve=null,this.container=null,this.baseroute="",this.sandBox=null,this.container=null!=r?r:null,this.inline=null!=i&&i,this.baseroute=null!=s?s:"",this.ssrUrl=null!=n?n:"",this.name=t,this.url=e,this.useSandbox=a,this.scopecss=this.useSandbox&&o,this.source={links:new Map,scripts:new Map},this.loadSourceCode(),this.useSandbox&&(this.sandBox=new zt(t,e))}loadSourceCode(){var t;this.state=U.LOADING_SOURCE_CODE,H((t=this).ssrUrl||t.url,t.name,{cache:"no-cache"}).then(e=>{if(!e){const e="html is empty, please check in detail";return t.onerror(new Error(e)),g(e,t.name)}At(e=e.replace(/<head[^>]*>[\s\S]*?<\/head>/i,t=>t.replace(/<head/i,"<micro-app-head").replace(/<\/head>/i,"</micro-app-head>")).replace(/<body[^>]*>[\s\S]*?<\/body>/i,t=>t.replace(/<body/i,"<micro-app-body").replace(/<\/body>/i,"</micro-app-body>")),t)}).catch(e=>{g(`Failed to fetch data from ${t.url}, micro-app stop rendering`,t.name,e),t.onLoadError(e)})}onLoad(t){var e;2==++this.loadSourceLevel&&(this.source.html=t,this.isPrefetch?(null===(e=this.prefetchResolve)||void 0===e||e.call(this),this.prefetchResolve=null):U.UNMOUNT!==this.state&&(this.state=U.LOAD_SOURCE_FINISHED,this.mount()))}onLoadError(t){this.loadSourceLevel=-1,this.prefetchResolve&&(this.prefetchResolve(),this.prefetchResolve=null),U.UNMOUNT!==this.state&&(this.onerror(t),this.state=U.LOAD_SOURCE_ERROR)}mount(t,e,n){var r,i,o;if(s(e)&&e!==this.inline&&(this.inline=e),this.container=null!==(r=this.container)&&void 0!==r?r:t,this.baseroute=null!=n?n:this.baseroute,2!==this.loadSourceLevel)return void(this.state=U.LOADING_SOURCE_CODE);let a;if(Gt(this.container,this.name,N.BEFOREMOUNT),this.state=U.MOUNTING,R(this.source.html,this.container,!this.umdMode),null===(i=this.sandBox)||void 0===i||i.start(this.baseroute),this.umdMode){null===(o=this.sandBox)||void 0===o||o.rebuildUmdSnapshot();try{a=this.umdHookMount()}catch(t){g("an error occurred in the mount function \n",this.name,t)}this.handleMounted(a)}else{let t=!1;!function(t,e,n){const r=Array.from(t.entries()),i=[],o=[];for(const[t,a]of r)a.isDynamic||(a.defer||a.async?(a.isExternal&&!a.code?i.push(H(t,e.name)):i.push(a.code),o.push([t,a]),a.module&&(n.moduleCount=n.moduleCount?++n.moduleCount:1)):(bt(t,e,a,!1),n(!1)));i.length?S(i,t=>{const e=o[t.index][1];e.code=e.code||t.data},t=>{n.errorCount=n.errorCount?++n.errorCount:1,g(t,e.name)},()=>{o.forEach(([t,r])=>{r.code&&(bt(t,e,r,!1,n),!r.module&&n(!1))}),n(void 0===n.moduleCount||n.errorCount===i.length)}):n(!0)}(this.source.scripts,this,e=>{var n;if(!this.umdMode){const{mount:t,unmount:e}=this.getUmdLibraryHooks();if(c(t)&&c(e)){this.umdHookMount=t,this.umdHookUnmount=e,this.umdMode=!0,null===(n=this.sandBox)||void 0===n||n.recordUmdSnapshot();try{a=this.umdHookMount()}catch(t){g("an error occurred in the mount function \n",this.name,t)}}}t||!0!==e&&!this.umdMode||(t=!0,this.handleMounted(a))})}}handleMounted(t){h(t)?t.then(()=>this.dispatchMountedEvent()).catch(t=>this.onerror(t)):this.dispatchMountedEvent()}dispatchMountedEvent(){U.UNMOUNT!==this.state&&(this.state=U.MOUNTED,Gt(this.container,this.name,N.MOUNTED))}unmount(t,e){let n;if(this.state===U.LOAD_SOURCE_ERROR&&(t=!0),this.state=U.UNMOUNT,this.keepAliveState=null,this.keepAliveContainer=null,this.umdHookUnmount)try{n=this.umdHookUnmount()}catch(t){g("an error occurred in the unmount function \n",this.name,t)}Ht("unmount",this.name),this.handleUnmounted(t,n,e)}handleUnmounted(t,e,n){h(e)?e.then(()=>this.actionsForUnmount(t,n)).catch(()=>this.actionsForUnmount(t,n)):this.actionsForUnmount(t,n)}actionsForUnmount(t,e){var n;t?this.actionsForCompletelyDestroy():this.umdMode&&this.container.childElementCount&&R(this.container,this.source.html,!1),null===(n=this.sandBox)||void 0===n||n.stop(),Yt().length||(lt=!1,Element.prototype.setAttribute=mt.rawSetAttribute),Gt(this.container,this.name,N.UNMOUNT),this.container.innerHTML="",this.container=null,e&&e()}actionsForCompletelyDestroy(){!this.useSandbox&&this.umdMode&&delete window[this.libraryName],Wt.delete(this.name)}hiddenKeepAliveApp(){const t=this.container;R(this.container,this.keepAliveContainer?this.keepAliveContainer:this.keepAliveContainer=document.createElement("div"),!1),this.container=this.keepAliveContainer,this.keepAliveState=z.KEEP_ALIVE_HIDDEN,Ht("appstate-change",this.name,{appState:"afterhidden"}),Gt(t,this.name,N.AFTERHIDDEN)}showKeepAliveApp(t){Ht("appstate-change",this.name,{appState:"beforeshow"}),Gt(t,this.name,N.BEFORESHOW),R(this.container,t,!1),this.container=t,this.keepAliveState=z.KEEP_ALIVE_SHOW,Ht("appstate-change",this.name,{appState:"aftershow"}),Gt(this.container,this.name,N.AFTERSHOW)}onerror(t){Gt(this.container,this.name,N.ERROR,t)}getAppState(){return this.state}getKeepAliveState(){return this.keepAliveState}getUmdLibraryHooks(){var t,e;if(U.UNMOUNT!==this.state){const n=null!==(e=null===(t=this.sandBox)||void 0===t?void 0:t.proxyWindow)&&void 0!==e?e:mt.rawWindow;return this.libraryName=B(this.container).getAttribute("library")||"micro-app-"+this.name,"object"==typeof n[this.libraryName]?n[this.libraryName]:{}}return{}}}function Zt(t){class e extends HTMLElement{constructor(){super(),this.isWaiting=!1,this.cacheData=null,this.hasConnected=!1,this.appName="",this.appUrl="",this.ssrUrl="",this.version=r,this.handleAttributeUpdate=()=>{this.isWaiting=!1;const t=x(this.getAttribute("name")),e=b(this.getAttribute("url"),this.appName);if(this.legalAttribute("name",t)&&this.legalAttribute("url",e)){const n=Wt.get(t);if(t!==this.appName&&n&&U.UNMOUNT!==n.getAppState()&&z.KEEP_ALIVE_HIDDEN!==n.getKeepAliveState()&&!n.isPrefetch)return this.setAttribute("name",this.appName),g(`app name conflict, an app named ${t} is running`,this.appName);t===this.appName&&e===this.appUrl||(t===this.appName?this.handleUnmount(!0,()=>{this.actionsForAttributeChange(t,e,n)}):this.getKeepAliveModeResult()?(this.handleHiddenKeepAliveApp(),this.actionsForAttributeChange(t,e,n)):this.handleUnmount(this.getDestroyCompatibleResult(),()=>{this.actionsForAttributeChange(t,e,n)}))}else t!==this.appName&&this.setAttribute("name",this.appName)},lt||(lt=!0,Element.prototype.setAttribute=function(t,e){if(/^micro-app(-\S+)?/i.test(this.tagName)&&"data"===t)if(l(e)){const t={};Object.getOwnPropertyNames(e).forEach(n=>{a(n)&&0===n.indexOf("__")||(t[n]=e[n])}),this.data=t}else"[object Object]"!==e&&v("property data must be an object",this.getAttribute("name"));else if((("src"===t||"srcset"===t)&&/^(img|script)$/i.test(this.tagName)||"href"===t&&/^link$/i.test(this.tagName))&&this.__MICRO_APP_NAME__&&Wt.has(this.__MICRO_APP_NAME__)){const n=Wt.get(this.__MICRO_APP_NAME__);mt.rawSetAttribute.call(this,t,M(e,n.url))}else mt.rawSetAttribute.call(this,t,e)})}static get observedAttributes(){return["name","url"]}connectedCallback(){this.hasConnected=!0,y(()=>Gt(this,this.appName,N.CREATED)),this.initialMount()}disconnectedCallback(){this.hasConnected=!1,this.getKeepAliveModeResult()?this.handleHiddenKeepAliveApp():this.handleUnmount(this.getDestroyCompatibleResult())}attributeChangedCallback(t,e,n){if(this.legalAttribute(t,n)&&this[t===j.NAME?"appName":"appUrl"]!==n)if(t!==j.URL||this.appUrl)if(t!==j.NAME||this.appName)this.isWaiting||(this.isWaiting=!0,y(this.handleAttributeUpdate));else{const t=x(n);if(!t)return g("Invalid attribute name "+n,this.appName);this.cacheData&&(te.setData(t,this.cacheData),this.cacheData=null),this.appName=t,t!==n&&this.setAttribute("name",this.appName),this.handleInitialNameAndUrl()}else{if(!(n=b(n,this.appName)))return g("Invalid attribute url "+n,this.appName);this.appUrl=n,this.handleInitialNameAndUrl()}}handleInitialNameAndUrl(){this.hasConnected&&this.initialMount()}initialMount(){if(this.appName&&this.appUrl)if(this.getDisposeResult("shadowDOM")&&!this.shadowRoot&&c(this.attachShadow)&&this.attachShadow({mode:"open"}),this.getDisposeResult("ssr")?this.ssrUrl=M(mt.rawWindow.location.pathname,this.appUrl):this.ssrUrl&&(this.ssrUrl=""),Wt.has(this.appName)){const t=Wt.get(this.appName),e=t.ssrUrl||t.url,n=this.ssrUrl||this.appUrl;t.getKeepAliveState()===z.KEEP_ALIVE_HIDDEN&&t.url===this.appUrl?this.handleShowKeepAliveApp(t):e!==n||!t.isPrefetch&&t.getAppState()!==U.UNMOUNT?t.isPrefetch||t.getAppState()===U.UNMOUNT?(v(`the ${t.isPrefetch?"prefetch":"unmounted"} app with url: ${e} is replaced by a new app`,this.appName),this.handleCreateApp()):g(`app name conflict, an app named ${this.appName} is running`,this.appName):this.handleAppMount(t)}else this.handleCreateApp()}actionsForAttributeChange(t,e,n){var r;this.getDisposeResult("ssr")?this.ssrUrl=M(mt.rawWindow.location.pathname,e):this.ssrUrl&&(this.ssrUrl=""),this.appName=t,this.appUrl=e,(null!==(r=this.shadowRoot)&&void 0!==r?r:this).innerHTML="",t!==this.getAttribute("name")&&this.setAttribute("name",this.appName),n?n.getKeepAliveState()===z.KEEP_ALIVE_HIDDEN?n.url===this.appUrl?this.handleShowKeepAliveApp(n):g(`app name conflict, an app named ${this.appName} is running`,this.appName):n.url===this.appUrl&&n.ssrUrl===this.ssrUrl?this.handleAppMount(n):this.handleCreateApp():this.handleCreateApp()}legalAttribute(t,e){return!(!a(e)||!e)||(g(`unexpected attribute ${t}, please check again`,this.appName),!1)}handleAppMount(t){t.isPrefetch=!1,y(()=>{var e;return t.mount(null!==(e=this.shadowRoot)&&void 0!==e?e:this,this.getDisposeResult("inline"),this.getBaseRouteCompatible())})}handleCreateApp(){var t;Wt.has(this.appName)&&Wt.get(this.appName).actionsForCompletelyDestroy();const e=new Vt({name:this.appName,url:this.appUrl,ssrUrl:this.ssrUrl,container:null!==(t=this.shadowRoot)&&void 0!==t?t:this,inline:this.getDisposeResult("inline"),scopecss:!(this.getDisposeResult("disableScopecss")||this.getDisposeResult("shadowDOM")),useSandbox:!this.getDisposeResult("disableSandbox"),baseroute:this.getBaseRouteCompatible()});Wt.set(this.appName,e)}handleUnmount(t,e){const n=Wt.get(this.appName);n&&n.getAppState()!==U.UNMOUNT&&n.unmount(t,e)}handleHiddenKeepAliveApp(){const t=Wt.get(this.appName);t&&t.getAppState()!==U.UNMOUNT&&t.getKeepAliveState()!==z.KEEP_ALIVE_HIDDEN&&t.hiddenKeepAliveApp()}handleShowKeepAliveApp(t){y(()=>{var e;return t.showKeepAliveApp(null!==(e=this.shadowRoot)&&void 0!==e?e:this)})}getDisposeResult(t){return(this.compatibleSpecialProperties(t)||te[t])&&this.compatibleDisableSpecialProperties(t)}compatibleSpecialProperties(t){return"disableScopecss"===t?this.hasAttribute("disableScopecss")||this.hasAttribute("disable-scopecss"):"disableSandbox"===t?this.hasAttribute("disableSandbox")||this.hasAttribute("disable-sandbox"):this.hasAttribute(t)}compatibleDisableSpecialProperties(t){return"disableScopecss"===t?"false"!==this.getAttribute("disableScopecss")&&"false"!==this.getAttribute("disable-scopecss"):"disableSandbox"===t?"false"!==this.getAttribute("disableSandbox")&&"false"!==this.getAttribute("disable-sandbox"):"false"!==this.getAttribute(t)}getBaseRouteCompatible(){var t,e;return null!==(e=null!==(t=this.getAttribute("baseroute"))&&void 0!==t?t:this.getAttribute("baseurl"))&&void 0!==e?e:""}getDestroyCompatibleResult(){return this.getDisposeResult("destroy")||this.getDisposeResult("destory")}getKeepAliveModeResult(){return this.getDisposeResult("keep-alive")&&!this.getDestroyCompatibleResult()}set data(t){this.appName?te.setData(this.appName,t):this.cacheData=t}get data(){return this.appName?te.getData(this.appName,!0):this.cacheData?this.cacheData:null}}window.customElements.define(t,e)}function Qt(t){if(!i)return g("preFetch is only supported in browser environment");A(()=>{c(t)&&(t=t()),u(t)&&t.reduce((t,e)=>t.then(()=>{return t=e,new Promise(e=>{A(()=>{var n,r;if(l(t)&&navigator.onLine)if(t.name=x(t.name),t.url=b(t.url,t.name),t.name&&t.url&&!Wt.has(t.name)){const i=new Vt({name:t.name,url:t.url,scopecss:!(null!==(n=t.disableScopecss)&&void 0!==n?n:te.disableScopecss),useSandbox:!(null!==(r=t.disableSandbox)&&void 0!==r?r:te.disableSandbox)});i.isPrefetch=!0,i.prefetchResolve=e,Wt.set(t.name,i)}else e();else e()})});var t}),Promise.resolve())})}function Xt(t,e,n){if(u(t)){const r=t.filter(t=>a(t)&&t.includes("."+e)&&!n.has(t));S(r.map(t=>H(t)),t=>{const e=r[t.index];n.has(e)||n.set(e,t.data)},t=>{g(t)})}}function Yt(t){const e=[];return Wt.forEach((n,r)=>{U.UNMOUNT===n.getAppState()||n.isPrefetch||t&&z.KEEP_ALIVE_HIDDEN===n.getKeepAliveState()||e.push(r)}),e}function Jt(){return Array.from(Wt.keys())}function qt(t,e){const n=Wt.get(x(t));return new Promise(r=>{if(n)if(n.getAppState()===U.UNMOUNT||n.isPrefetch)(null==e?void 0:e.destroy)&&n.actionsForCompletelyDestroy(),r();else if(n.getKeepAliveState()===z.KEEP_ALIVE_HIDDEN)(null==e?void 0:e.destroy)?n.unmount(!0,r):(null==e?void 0:e.clearAliveState)?n.unmount(!1,r):r();else{const t=B(n.container),i=()=>{t.removeEventListener("unmount",i),t.removeEventListener("afterhidden",o),r()},o=()=>{t.removeEventListener("unmount",i),t.removeEventListener("afterhidden",o),r()};if(t.addEventListener("unmount",i),t.addEventListener("afterhidden",o),null==e?void 0:e.destroy){let e,n;t.hasAttribute("destroy")&&(e=t.getAttribute("destroy")),t.hasAttribute("destory")&&(n=t.getAttribute("destory")),t.setAttribute("destroy","true"),t.parentNode.removeChild(t),t.removeAttribute("destroy"),"string"==typeof e&&t.setAttribute("destroy",e),"string"==typeof n&&t.setAttribute("destory",n)}else if((null==e?void 0:e.clearAliveState)&&t.hasAttribute("keep-alive")){const e=t.getAttribute("keep-alive");t.removeAttribute("keep-alive"),t.parentNode.removeChild(t),t.setAttribute("keep-alive",e)}else t.parentNode.removeChild(t)}else v(`app ${t} does not exist`),r()})}function Kt(t){return Array.from(Wt.keys()).reduce((e,n)=>e.then(()=>qt(n,t)),Promise.resolve())}class $t extends It{constructor(){super(...arguments),this.tagName="micro-app",this.preFetch=Qt}start(t){if(!i||!window.customElements)return g("micro-app is not supported in this environment");if(null==t?void 0:t.tagName){if(!/^micro-app(-\S+)?/.test(t.tagName))return g(t.tagName+" is invalid tagName");this.tagName=t.tagName}if(window.customElements.get(this.tagName))return v(`element ${this.tagName} is already defined`);if(gt(),t&&l(t)&&(this.shadowDOM=t.shadowDOM,this.destroy=t.destroy,this.destory=t.destory,this.inline=t.inline,this.disableScopecss=t.disableScopecss,this.disableSandbox=t.disableSandbox,this.ssr=t.ssr,c(t.fetch)&&(this.fetch=t.fetch),l(t.lifeCycles)&&(this.lifeCycles=t.lifeCycles),t.preFetchApps&&Qt(t.preFetchApps),t.globalAssets&&(l(e=t.globalAssets)&&A(()=>{Xt(e.js,"js",vt),Xt(e.css,"css",tt)})),l(t.plugins))){const e=t.plugins.modules;if(l(e))for(const t in e){const n=x(t);n&&t!==n&&(e[n]=e[t],delete e[t])}this.plugins=t.plugins}var e;Zt(this.tagName)}}var te=new $t;e.default=te}.call(this,n(15))},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=s(n(19)),i=n(3),o=s(n(61)),a=n(91);function s(t){return t&&t.__esModule?t:{default:t}}var c={name:"action",inserted:function(t,e,n){var s=e.arg,c=e.value,u=n.context.$route.meta,l=(0,a.getDeepChild)(u.childMenuList);if((0,i.isEmpty)(u)||(0,i.isEmpty)(l))t.parentNode&&t.parentNode.removeChild(t)||(t.style.display="none");else{var h="";"func"!==s||(0,i.isEmpty)(c)||(h=c),(0,o.default)(n.context,(0,i.isEmpty)(c)?{}:c,t,!0,s,h,l),l.findIndex((function(t){return(0,r.default)(t).includes(s)||(0,r.default)(t).includes(h)}))<=-1&&(t.parentNode&&t.parentNode.removeChild(t)||(t.style.display="none"))}},install:function(t){t.directive(c.name,c)}};e.default=c},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=o(n(27)),i=o(n(28));function o(t){return t&&t.__esModule?t:{default:t}}var a=function(){function t(e,n,i){(0,r.default)(this,t),this.route=e,this.store=n,this.vm=i}return(0,i.default)(t,[{key:"setSidebarVisible",value:function(t){this.store.commit("user/SET_OPEN_SIDEBAR",t)}},{key:"getAllRouterStack",value:function(){return this.store.state.user.appRouters}},{key:"getCurrentRouterStack",value:function(){return this.store.state.user.addRouters}}]),t}();e.default=function(t,e,n){return new a(t,e,n)}},function(module,exports,__webpack_require__){"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=function(name,version){eval(function(t,e,n,r,i,o){if(i=function(t){return(t<62?"":i(parseInt(t/62)))+((t%=62)>35?String.fromCharCode(t+29):t.toString(36))},!"".replace(/^/,String)){for(;n--;)o[i(n)]=r[n]||i(n);r=[function(t){return o[t]}],i=function(){return"\\w+"},n=1}for(;n--;)r[n]&&(t=t.replace(new RegExp("\\b"+i(n)+"\\b","g"),r[n]));return t}('1l(1m.5){1k a="1i:1j/b;1n,1r/1s/1q+1o/1p/1a+1b/19/17+18+1c/1g+1h+1f+1d/1e+1t/1I/1J+1H+1F+1G/1K+1O/1P+1N/1L+1M/1x+1y/1w+1u/1v+1z+1D+1E+1C/1A/1B+16/v/m/z/M/x+y/w+u/O+D+E/r/C/A/B//t+j/k/l/i+s+q/o+p/F+Y/W/Z+X+U/V+10/14/15/13/11+12/J+K/I/G+H/L/R+S+Q/N+P/1Q/+2W/37/2J/2I+2G+2O+2P+2N/2L+2M/2T/2U/2S+2Q+2R/2K+2D+2E/2C+2A+2B/2H+2F+31/39+3a+38/36+3e/3f/3d/3b/3c+35/2Y/2Z/2X+2V+33/34+32/30/25/26/24/22+23/27/2b/2c+2a/28/29/+1U+1V/1T+1R+1S+T+1W+20/21";5.6("%c ","1-2:1Z;4:1X(\'1Y://d.2d.2s/n/2t/d/2r/2p/2q/2u-a.b\') 2y-2z;4-2:2x",);5.6("%2v,2w、2h、2i","1-2:2g;3:#9;1-e:g;2e:2f 2j #9;8:0 7;");5.6(`%c${2n}%2o${2m}`,"1-2:h;3:#f;1-e:g;4-3:#2k;8:0 7;","1-2:h;3:#2l;4-3:#f;8:0 7;")}',0,202,"|font|size|color|background|console|info|4px|padding|E51D30|logo|png||www|weight|FADFA3|bold|20px|gakrttPVH58EJgoPnFCz24ghF6s6WXLsYl|JQzopx9koRhjrw|wRLVlSqZ9|yaikFb0TtZc6jWA3s2tbygpoAGElvdu3LBIa1TFkb7uAxkG2X2DwLB5ULjd2vmWspk5nz3njY0HfEj9jNw5JTvhwcayuh8bnd2WZE465URL2sEtJEprQFCEqn06PtQn7HO2hkTjkEdoG|1AFmyZLGwQ5J75e0JP4bG7YdEjoLoAHSzwPjYpHbsfP6hbFt3RhHRmKsH43H6ofndo2diSFNIe1nviRNx||cV4QAkONhz6eYD4wnkskjTn1GAfr4PkJ43A3069LOtbrzPqwVRqVu1LpOrxnbNlv40Z6JLFI2IGy0H0x8|tUqvcvOmRud2Vsx5VXY|zCfwCx2TD3PmE6Mdf|6N8vX|LFCPR8w32scrJM0JlHElbQjQaI02quJWx|NvE6KnZAad16WNxmQJtrqwctGDYXXmidIO|x9JQrv8l|N8aM9hx|Go4NE91HoYAnfSp6XMJkh4VCwMETCsis9FupJR9jKQLJO3fqmLC|xcxxMLPyXpe2UV|5vktDE3NTeV0n6Ss72|7ZHFlILr1G0pcTGmMBkktwuPeezQgV|J2kQwu2WwTQzAsL2qeXS|q28xDtjE2tCBGSZNEjtaF2AhpBxVyyTqEsgEYaW0fg9yS9KOUgXa|4xCiaarRlTNeh1fFlOL8gmEaWmXWEbQxAE267LjAuQmiWsey2SPyulONPKvZBSe9zXuKk|bYA|qTpRs84hQHa9pD1SdpQdfW9J|NAgM5KattuVkBTL2RCZAE09g4T6tMj412eybUSxV8EL4694iG|fojH|U3x36hhVlrZOvSJScxLrZxiSE42U9|bHiretMc|f8saVWJcR2xPuZNyGFXf6JjjpjBxVStXjXTkCjcjXzyKN5sKBY3D79OpY|PCeO7nsymbxm3k|WQ5ow33j4fQL8||8PA3I||xw1oRLKyTtEz|kT|qaHAwpHVDNK8k|ginOevgigkf6HeB8vCmiaC2l8ePX5XhIhGHAi||LkIzH9|XCEkockJeHSLhfbU2Cfgh2GnhUiChG4Vh04SEGhnfLOhcSYQAsv3L41LOji2kUPVUM3BgG9mflPSK||huLSgPlpsYYR6svOkohc|EE931TFbhkXMhEDYfsd4leEb|l1Euai7SAPjIGo691IKHYdF2|MKxVRuI3NxdaLmqlahHSItsLEn|8cJ|ryifVDZk8NUnkZUAFAG30QJeZs|YX7m9iedoujXbWyp9kYXLXd1t8ulnR5AU07Id7OFKDRItnokoj1DM|N2FujgK2Nm4JMGlDQ1odnlUnIO8fmA7W28v6o|d3NxiLDoWXzPCnPAXNE7Gt8eVQvYuGXZvS8vgQLk0gMbxhm28rVcfKcV4|yfvuSlStBP|M9UrC5cc6HAOtBvQsPMXkp4xLaX7B8|LIr02E5|WcPbe7Yek|dOLH9jzrpltZIDHcmBdgP6IUmPk3QD3Lx996H9Jh|KRiOpkom7Rndtu|NObl3vPa5THXKwiUHSg5oJgANW58j6ScNW3rB0M7RWt0URdG8NPw2xlzfs8e8|xf0bg69f8h6RpJZ0i6NuP3N8fin5L0lsDA3iCJOZoNdJek7b2OstYunQ2dd|r4NUnHeX3|eIU6cJul82o4WLequr5m8TpH2avotYy7tHa891ylzjqTXZ|czICNK|pJIDJQcycGCmAH2TpMdKWktf6n3Dp0SaOitNv4y6jqhOLPtlXHZHSaXanYZxZZmSA1JDQq|data|image|const|if|window|base64|NNPWhws0are0dXz63cDtlAyUHOoQDpk2Ahl0nSvoif0S7Ld5y9dTdK6JIuxXiozGX947Xnl6ojbJyyYEO4kA7Ab1G0kJJd8O|1f1DR09F0YV5eWlkJitzugbnr7zmr3nbKOuVHOg0DrQT0PDu05JOsUys9w2NRIqekpOpZ|Te2fmzvxmvvNbZ56RFKk4LZe0SNIUTdX7hk|iVBORw0KGgoAAAANSUhEUgAAAPQAAAAoCAYAAADJ09eqAAAP20lEQVR4Xu2deXRdRR3Hv|NCWkCgIFvzYhLAUgRUkhQQEbSgHhQXXMBdOCKKuKC4KxytqLiguIKg4oY7giKKG2pUVCg0r4JSBCpNcngFigIKIoXkej6vd9Jhztz37vLSNn3390|qqTjeQagNwitHhg8cmpKP038mNHa7u7KvrusHL05LjMs6QpJW2fsYFFAu59Dw3izpHMz9mFzKo7|Mo4888tdoekJ0ha5TwkcejJkh6fQptCe7pT0h|jDft|4AkHIbfjW30ZlWOiIGzr6QtUrTtFsGpeHb8ABvX79vnJf2qSZuA|PK3i5pfqD|LpKOjvPYe1O0|rw|eWccsr4nQvC5e66zPJMI08b|L3LGe0DbJpGyVk4HWc6sktKCQidrchr61bzCVimpk7tyqa96eO6waaaR2xiC9KCXzWfSNsnfttnj7|8QlJ35d0mfciBOilkm4LfA|EO9|Rcax|M9iP8nkLGJICeh2T9aa3fff68HJyeuiKHrYAjFGt8|dM3fhjjdf9e|0E2XKfRYbGTs9sb|47zAgD4b82a2jLUEdLtnqt43dFmk6JnBdo3O7B1f|k7n3R8kHSgpa6ZYOwFNdx6M|4my|0DSUIv6AOkFtkx9YPCsaGp98knjecWc0DtWa9jbkraS9HdJfW0ENAvwTynH|UNJz|uTDsjxphzesZqn3TK|R9J3YBm8HoF8t6S8txlONs92eFSj3Y0lHtZsfm3h7e0q6StIOXj9J9HmSJDtXm|gwprvXGYCu9w|ID2hTqZxRHRu1nkJAjKrhT2TWhcauD6gto5AK2CN4d31qJ6DxqrIQcc5lIfqJlPp9XAlbmJCCS|M4AKA5fOEfn8vKCOKSONO4oVKr|4eOnYoiYrTFqAR0Mf6VtTuOAwA6dJlZHkYQs|UNnRFHEJYLFqQR0cR6WLXQUBwA02Sl4XvOecYZhJESQ5aQ79lm8zUP33nNjFEVc6VOMSkAX419Zu|br|m3gOScxoeAPr|ZkVRZOoDw1dIUd5fDGh8f10cennWc9d5|url|https|40px|l7WKTmwWXDg|wW0sGVfLoQ5AAAAAElFTkSuQmCC|YXmiDXoatP0Aa25cTTX1Bcu2ql64zJ7vpczsc1yeN0BTIcpomOO6apfefOoFBGrbh|Vvw|sOxQ52eWuB2xTAMIxxWa594DGOnxD64lDH5gVaYgQLQIQe5oNstXBJoQHkQBO|gcngbzr4QmxeQVIf0EKsg9Qtg93pHsJAs0OaEyloJgRow16RjD8AvwF2t0vcksLhBJe4Ish|FuozP1|dPl6WLXUEB9zdgt0VNaj5Zfjr2YK0wT5oOHRWDyw6bGpqMuQoyc|rPlECuiMXZTno|BywgOaGw2w|3pU1O5IDFtCEpwhTpfpBOYdT2EQco2vESG8bOHD3yWjtCkWFvb|IEtD5eVfW7EgOuIDGEZDq52ocTuEVnr7Fv943dFGkyLc|8zO2BHR|rockontrol|border|1px|14px|大数据|人工智能技术的创新者|solid|030307|000000|version|name|cv|rock|img|default|com|cms|header|c佳华科技|物联网|contain|no|repeat|BV6nwbQ1MPZx3z6mWKYCSRSuD4FzC8ypVxys5mS|olt7idk0C4bCdGUDR2Hxhfkp5q6fU|W9FMA5rvD8QSyk9LhIk4MXCQuYQqGpLemCWtTq6FwEVaIx5iiJCOH1ZzveCt|AfoggB|r2SPtKCAayB0LXMneLlTpPgFEpAyuflNqqcVp0YbaRnxo4vVC6b4kgcFwDbtEYkW9rbHkj7IyUQIuMKlZ1|lh40VbQlKF4c2Rqt6KtvvbVaN2Kwg8mD9mzqIj7kfYxJtBkvSJKJauxlEb83gVAPQgxlXcZ7UT9LxyH7yJ4BTR|4SKiuHFloFx5N2IBYLahxeWGiBJCRnyEM5E4CmTdSlywP2jdvneyRdHauQvr0cUrnTSuhNCdBoRSOBicKb3iocVQI6n8q9cQBtpKU947WDjDEh|KFGsVh0b7w2zxM76aHYqx3yWb0L|VJAm98QBdMea4nvEaE|ba5foRJtcSi7qoB5Ydyt1Jk5wHfLOdgGYzwiuPNAo5OUJMBsyE0fBGWyoCaG5wIYTn0sYE9Dcc28z2CWcWtmVymu66jdHf2EtAr5|B5|hIztE4WbvN00|tCbc0UoPnWmY532f22G0YK9akIoDc1GxovLCmg|OZzELk|4EY5wlNlYbklyQNEJqxhPvePV3l12y3hLbtJ9ns9O9dcdgpKeFmc5LQoblk3MRdiTMnUQno2QJoI0WVrsrB81eNWl0fZwmSFKkGYe|wu|iHdua2eRRfSZ|Dk7O7avn4GUhHGycQBv4wYTSeS8prkzbCYBTT9IjsFZxsWGLpE4wiGEUFw5BGhCFGSEtaI8YStMlCL5za3CVvQZ7zMama914S|KJD0g4L18CejYA2kj3dcss3Hmi1kj|r1vaByYVoReQlQCetYA2pgLquM1N7TETo2HjYQLm6ZIGOUTWdAsiZNUgAgivZDkjJBH2W12JgGN2YCG8GxvHHyTzcY6wfxhFgH0pqRy2wQW|An4FfysP|UZC4RdwCU0CbQMgkrILSPKCmjVGXTe9dCYBjc|V9IgUjYZU6laARqNBs8lLzQCNasdmhUrv0r3xs6S01xCg393E1rVtw3vrpHK|q0prdp03xcBNO3g|zcHgACewnlrsfIfGABIRNkYoAGgmPV9|Pt8a7jzOMNElLgI7dMiR1WvEFSUb2GRuI318uTACQ|D8cPjkZywVGFmxEbBvYdNmfWixSQ8tb|Qtuwf5keqA3Pf0o76zYK0W4nf7ZEfDcd9Rx|oXOr4zXyRy2xI4Qv8ltfhsMaOG8aCei3DQwdPxkFjwZmHcDDyhvpgep4zb96tVWboVtUkLqoXGmIyxVQA32PL05BVEPX3mKRkBjDIg9dUeR|GMaVx5GIW2mOkeQEN3|jWtxz7N8scUhZJjrbkHsdtAej|RvcYppyKE4410UAummQQ0Fz0wj2mItW81lbwSGmByoMbXjtJ83y1DmrF7Nr65hK73DU52bWGGd72lZk|TEcfMQ0Ao0uEstwTMO7ixNHnHndjk2B39SUadQArKaP2XrekPsB3jnSiAaQ57sqisJIwTeqnOzYWD5LEJb5J2qZtk2OUbIA|1ymAZt0jEJsRUvwLXoE2ANqYevc28|kpKb754S0BVzdHWsZo9Dcv4TKUoWkUssbEJXodNIWRfaTJQvcjiDXFk|4gAfwkb9clpCNxcJsjnJEdjaOoaU9bcTsLd6v79AHnBBzv2ITcyyh4xkUQLPSkOCuZdqQ12gQJ|w36Rx4ztKEBTbSFEGqzFM48iSWMBT6g5bmExoeQ4BhqiBCeaD9|A8GaAiQwtzsBcbZRHeSS07SjmBragTyd52goSBc0j61ltv13XL2Hf4XXmkEMRKnJ8Ev8Im5K|YbH54A0nPg|bO4h083d9FsfzjDSSHViOZNkifzh6V|sZmxhtBu3E2QyyM4eMC|PiGR7A8qzCSgQxsbfYGnHDRxj8bCa5sRGToM00pC0657DNgdM2DmrACZeJYQDmi".split("|"),0,{}))}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=c(n(9)),i=n(2),o=c(n(392)),a=c(n(55)),s=n(3);function c(t){return t&&t.__esModule?t:{default:t}}e.default={name:"RkVersionList",computed:{historyVersion:function(){var t=this.$store.state.user.historyAppVersion;return this.activeKey=(0,s.isEmpty)(t)?"":t[0].id,this.currentActiveInfo=this.parseWord(t[0]),t}},data:function(){return{activeKey:"",currentActiveInfo:{}}},methods:{formatDate:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:new Date,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"yyyy-MM-dd hh:mm:ss";"number"==typeof t&&(t=new Date(t)),"string"==typeof t&&(t=t.includes("-")?new Date(t):new Date(Number(t)));var n={"y+":t.getFullYear(),"M+":t.getMonth()+1,"d+":t.getDate(),"D+":t.getDate(),"h+":t.getHours(),"m+":t.getMinutes(),"s+":t.getSeconds()};for(var r in n)if(Object.hasOwnProperty.call(n,r)){var i=1===String(n[r]).length?"0"+n[r]:n[r];RegExp("("+r+")").test(e)&&(e=e.replace(RegExp.$1,i))}return e},parseWord:function(t){var e=t.versionContent.match(/[\u4e00-\u9fa5]+/g);return(0,s.isEmpty)(t)?{}:(0,r.default)({},t,{version:t.verionCode.toUpperCase(),text:(0,s.isEmpty)(e)?"版本更新记录":e[0],parseJsonText:JSON.parse(t.versionContent)})},handleTap:function(t){this.activeKey=t;var e=(0,s.find)(this.historyVersion,{id:this.activeKey});(0,s.isEmpty)(e)||(this.currentActiveInfo=this.parseWord(e))}},render:function(){var t=this,e=arguments[0],n=this.historyVersion.map((function(n){var r=t.parseWord(n),a=r.version+" "+r.text;return e(o.default,{attrs:{prefixCls:i.prefixCls,text:a,active:t.activeKey===n.id,activeKey:n.id},on:{click:function(e){return t.handleTap(e)}}})})),r=(0,s.isEmpty)(this.currentActiveInfo)?"":this.currentActiveInfo.parseJsonText.map((function(t){var n=t.image.map((function(t){return e("div",{class:i.prefixCls+"-version-info-picture-item"},[e("a-image",{attrs:{src:t}})])}));return e("div",{class:i.prefixCls+"-version-info-text-item"},[e("div",{class:i.prefixCls+"-version-info-word"},[t.words]),e("div",{class:i.prefixCls+"-version-info-picture"},[n])])}));return e("div",{class:i.prefixCls+"-version"},[e("div",{class:i.prefixCls+"-version-header"},[e("span",["版本更新记录"])]),e("div",{class:i.prefixCls+"-version-footer"},[e("div",{class:i.prefixCls+"-version-list"},[e(a.default,[e("div",{class:i.prefixCls+"-version-list-inner"},[n])])]),e("div",{class:i.prefixCls+"-version-info"},[e(a.default,[e("div",{class:i.prefixCls+"-version-info-inner"},[e("div",{class:i.prefixCls+"-version-info-code"},[this.currentActiveInfo.version]),e("div",{class:i.prefixCls+"-version-info-date"},[e("span",[this.formatDate(parseInt(this.currentActiveInfo.updatedTime),"yyyy-MM-dd")])]),e("div",{class:i.prefixCls+"-version-info-text"},[r])])])])])])}}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r,i=n(29),o=(r=i)&&r.__esModule?r:{default:r};e.default={name:"VersionItem",props:{prefixCls:o.default.string,activeKey:o.default.string,text:o.default.string,active:o.default.bool.def(!1)},methods:{handleTap:function(){this.$emit("click",this.activeKey)}},render:function(){var t=this,e=arguments[0],n=this.$props,r=n.prefixCls,i=n.active,o=n.text;return e("div",{class:[r+"-version-item",i?r+"-version-item-active":""],on:{click:function(){return t.handleTap()}}},[e("div",{class:r+"-version-item-icon"},[e("a-icon",{attrs:{type:"file"}})]),e("div",{class:r+"-version-item-text"},[o])])}}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r,i=n(29),o=(r=i)&&r.__esModule?r:{default:r};e.default={name:"BlockView",props:{routeParents:o.default.string},render:function(){var t=arguments[0];return t("div",["BlockView"])}}}])}));