rk-web-core 0.7.81 → 0.7.82
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.
|
File without changes
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "rk-web-core",
|
|
3
3
|
"description": "iep core utils",
|
|
4
|
-
"version": "0.7.
|
|
4
|
+
"version": "0.7.82",
|
|
5
5
|
"author": "",
|
|
6
6
|
"main": "rk-web-core.js",
|
|
7
7
|
"scripts": {
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
"vue-router": "3.5.1",
|
|
18
18
|
"qiankun": "^2.6.3",
|
|
19
19
|
"axios": "^0.21.1",
|
|
20
|
-
"rk-web-map": "^0.1.
|
|
20
|
+
"rk-web-map": "^0.1.7"
|
|
21
21
|
},
|
|
22
22
|
"browserslist": [
|
|
23
23
|
"> 1%",
|
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(O,r)&&O[r]&&s.push(O[r][0]),O[r]=0;for(n in o)Object.prototype.hasOwnProperty.call(o,n)&&(t[n]=o[n]);for(j&&j(e);s.length;)s.shift()()}var n=window.webpackHotUpdaterk_web_core;window.webpackHotUpdaterk_web_core=function(t,e){!function(t,e){if(!w[t]||!b[t])return;for(var n in b[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="3869b4c66d02f6e7a63e",a={},s=[],u=[];function c(t){var e=L[t];if(!e)return R;var n=function(n){return e.hot.active?(L[n]?-1===L[n].parents.indexOf(t)&&L[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&&(x[t]||T(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":P(e);break;case"prepare":case"check":case"dispose":case"apply":(v=v||[]).push(e)}},check:S,apply:A,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,x={},b={},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(C()?"ready":"idle"),null;b={},x={},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={},O)T(n);return"prepare"===f&&0===_&&0===y&&E(),e}));var e}function T(t){w[t]?(b[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)):x[t]=!0}function E(){d("ready");var t=p;if(p=null,t)if(i)Promise.resolve().then((function(){return A(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 A(e){if("ready"!==f)throw new Error("apply() is only allowed in ready status");return function e(n){var i,u,c,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=L[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 u=l.parents[s],c=L[u];if(c){if(c.hot._declinedDependencies[o])return{type:"declined",chain:a.concat([u]),moduleId:o,parentId:u};-1===e.indexOf(u)&&(c.hot._acceptedDependencies[o]?(n[u]||(n[u]=[]),p(n[u],[o])):(delete n[u],e.push(u),r.push({chain:a.concat([u]),id:u})))}}}}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)}}C();var y={},_=[],x={},b=function(){console.warn("[HMR] unexpected require("+T.moduleId+") to disposed module")};for(var S in m)if(Object.prototype.hasOwnProperty.call(m,S)){var T;h=M(S),T=m[S]?f(h):{type:"disposed",moduleId:S};var E=!1,A=!1,P=!1,k="";switch(T.chain&&(k="\nUpdate propagation: "+T.chain.join(" -> ")),T.type){case"self-declined":n.onDeclined&&n.onDeclined(T),n.ignoreDeclined||(E=new Error("Aborted because of self decline: "+T.moduleId+k));break;case"declined":n.onDeclined&&n.onDeclined(T),n.ignoreDeclined||(E=new Error("Aborted because of declined dependency: "+T.moduleId+" in "+T.parentId+k));break;case"unaccepted":n.onUnaccepted&&n.onUnaccepted(T),n.ignoreUnaccepted||(E=new Error("Aborted because "+h+" is not accepted"+k));break;case"accepted":n.onAccepted&&n.onAccepted(T),A=!0;break;case"disposed":n.onDisposed&&n.onDisposed(T),P=!0;break;default:throw new Error("Unexception type "+T.type)}if(E)return d("abort"),Promise.reject(E);if(A)for(h in x[h]=m[h],p(_,T.outdatedModules),T.outdatedDependencies)Object.prototype.hasOwnProperty.call(T.outdatedDependencies,h)&&(y[h]||(y[h]=[]),p(y[h],T.outdatedDependencies[h]));P&&(p(_,[T.moduleId]),x[h]=b)}var I,D=[];for(u=0;u<_.length;u++)h=_[u],L[h]&&L[h].hot._selfAccepted&&x[h]!==b&&!L[h].hot._selfInvalidated&&D.push({module:h,parents:L[h].parents.slice(),errorHandler:L[h].hot._selfAccepted});d("dispose"),Object.keys(w).forEach((function(t){!1===w[t]&&function(t){delete O[t]}(t)}));var j,z,N=_.slice();for(;N.length>0;)if(h=N.pop(),l=L[h]){var F={},B=l.hot._disposeHandlers;for(c=0;c<B.length;c++)(i=B[c])(F);for(a[h]=F,l.hot.active=!1,delete L[h],delete y[h],c=0;c<l.children.length;c++){var H=L[l.children[c]];H&&((I=H.parents.indexOf(h))>=0&&H.parents.splice(I,1))}}for(h in y)if(Object.prototype.hasOwnProperty.call(y,h)&&(l=L[h]))for(z=y[h],c=0;c<z.length;c++)j=z[c],(I=l.children.indexOf(j))>=0&&l.children.splice(I,1);d("apply"),void 0!==g&&(o=g,g=void 0);for(h in m=void 0,x)Object.prototype.hasOwnProperty.call(x,h)&&(t[h]=x[h]);var G=null;for(h in y)if(Object.prototype.hasOwnProperty.call(y,h)&&(l=L[h])){z=y[h];var U=[];for(u=0;u<z.length;u++)if(j=z[u],i=l.hot._acceptedDependencies[j]){if(-1!==U.indexOf(i))continue;U.push(i)}for(u=0;u<U.length;u++){i=U[u];try{i(z)}catch(t){n.onErrored&&n.onErrored({type:"accept-errored",moduleId:h,dependencyId:z[u],error:t}),n.ignoreErrored||G||(G=t)}}}for(u=0;u<D.length;u++){var W=D[u];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 C(){if(v)return m||(m={}),v.forEach(P),v=void 0,!0}function P(e){Object.prototype.hasOwnProperty.call(m,e)||(m[e]=t[e])}var L={},O={0:0};function R(e){if(L[e])return L[e].exports;var n=L[e]={i:e,l:!1,exports:{},hot:l(e),parents:(u=s,s=[],u),children:[]};return t[e].call(n.exports,n,n.exports,c(e)),n.l=!0,n.exports}R.e=function(t){var e=[],n=O[t];if(0!==n)if(n)e.push(n[2]);else{var r=new Promise((function(e,r){n=O[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(u);var n=O[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)}O[t]=void 0}};var u=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=L,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 k=window.webpackJsonprk_web_core=window.webpackJsonprk_web_core||[],I=k.push.bind(k);k.push=e,k=k.slice();for(var D=0;D<k.length;D++)e(k[D]);var j=I;return c(164)(R.s=164)}([function(t,e,n){t.exports=n(335)},function(t,e){var n=t.exports={version:"2.6.12"};"number"==typeof __e&&(__e=n)},function(t,e,n){"use strict";(function(t){n.d(e,"a",(function(){return p})),n.d(e,"b",(function(){return l})),n.d(e,"c",(function(){return Et})),n.d(e,"d",(function(){return St})),n.d(e,"e",(function(){return wt})),n.d(e,"f",(function(){return G})),n.d(e,"g",(function(){return it})),n.d(e,"h",(function(){return Tt})),n.d(e,"i",(function(){return h})),n.d(e,"j",(function(){return Ft}));var r=Object.freeze({__proto__:null,get start(){return Ft},get ensureJQuerySupport(){return dt},get setBootstrapMaxTime(){return q},get setMountMaxTime(){return Y},get setUnmountMaxTime(){return J},get setUnloadMaxTime(){return X},get registerApplication(){return Tt},get unregisterApplication(){return At},get getMountedApps(){return wt},get getAppStatus(){return St},get unloadApplication(){return Ct},get checkActivityFunctions(){return Et},get getAppNames(){return Mt},get pathToActiveWhen(){return Ot},get navigateToUrl(){return it},get triggerAppChange(){return Dt},get addErrorHandler(){return l},get removeErrorHandler(){return h},get mountRootParcel(){return G},get NOT_LOADED(){return p},get LOADING_SOURCE_CODE(){return m},get NOT_BOOTSTRAPPED(){return g},get BOOTSTRAPPING(){return v},get NOT_MOUNTED(){return y},get MOUNTING(){return _},get UPDATING(){return b},get LOAD_ERROR(){return M},get MOUNTED(){return x},get UNMOUNTING(){return w},get SKIP_BECAUSE_BROKEN(){return S}});function i(t){return(i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function o(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var a=("undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:void 0!==t?t:"undefined"!=typeof self?self:{}).CustomEvent,s=function(){try{var t=new a("cat",{detail:{foo:"bar"}});return"cat"===t.type&&"bar"===t.detail.foo}catch(t){}return!1}()?a:"undefined"!=typeof document&&"function"==typeof document.createEvent?function(t,e){var n=document.createEvent("CustomEvent");return e?n.initCustomEvent(t,e.bubbles,e.cancelable,e.detail):n.initCustomEvent(t,!1,!1,void 0),n}:function(t,e){var n=document.createEventObject();return n.type=t,e?(n.bubbles=Boolean(e.bubbles),n.cancelable=Boolean(e.cancelable),n.detail=e.detail):(n.bubbles=!1,n.cancelable=!1,n.detail=void 0),n},u=[];function c(t,e,n){var r=d(t,e,n);u.length?u.forEach((function(t){return t(r)})):setTimeout((function(){throw r}))}function l(t){if("function"!=typeof t)throw Error(f(28,!1));u.push(t)}function h(t){if("function"!=typeof t)throw Error(f(29,!1));var e=!1;return u=u.filter((function(n){var r=n===t;return e=e||r,!r})),e}function f(t,e){for(var n=arguments.length,r=new Array(n>2?n-2:0),i=2;i<n;i++)r[i-2]=arguments[i];return"single-spa minified message #".concat(t,": ").concat(e?e+" ":"","See https://single-spa.js.org/error/?code=").concat(t).concat(r.length?"&arg=".concat(r.join("&arg=")):"")}function d(t,e,n){var r,i="".concat(P(e)," '").concat(A(e),"' died in status ").concat(e.status,": ");if(t instanceof Error){try{t.message=i+t.message}catch(t){}r=t}else{console.warn(f(30,!1,e.status,A(e)));try{r=Error(i+JSON.stringify(t))}catch(e){r=t}}return r.appOrParcelName=A(e),e.status=n,r}var p="NOT_LOADED",m="LOADING_SOURCE_CODE",g="NOT_BOOTSTRAPPED",v="BOOTSTRAPPING",y="NOT_MOUNTED",_="MOUNTING",x="MOUNTED",b="UPDATING",w="UNMOUNTING",M="LOAD_ERROR",S="SKIP_BECAUSE_BROKEN";function T(t){return t.status===x}function E(t){try{return t.activeWhen(window.location)}catch(e){return c(e,t,S),!1}}function A(t){return t.name}function C(t){return Boolean(t.unmountThisParcel)}function P(t){return C(t)?"parcel":"application"}function L(){for(var t=arguments.length-1;t>0;t--)for(var e in arguments[t])"__proto__"!==e&&(arguments[t-1][e]=arguments[t][e]);return arguments[0]}function O(t,e){for(var n=0;n<t.length;n++)if(e(t[n]))return t[n];return null}function R(t){return t&&("function"==typeof t||(e=t,Array.isArray(e)&&!O(e,(function(t){return"function"!=typeof t}))));var e}function k(t,e){var n=t[e]||[];0===(n=Array.isArray(n)?n:[n]).length&&(n=[function(){return Promise.resolve()}]);var r=P(t),i=A(t);return function(t){return n.reduce((function(n,o,a){return n.then((function(){var n=o(t);return I(n)?n:Promise.reject(f(15,!1,r,i,e,a))}))}),Promise.resolve())}}function I(t){return t&&"function"==typeof t.then&&"function"==typeof t.catch}function D(t,e){return Promise.resolve().then((function(){return t.status!==g?t:(t.status=v,t.bootstrap?$(t,"bootstrap").then(n).catch((function(n){if(e)throw d(n,t,S);return c(n,t,S),t})):Promise.resolve().then(n))}));function n(){return t.status=y,t}}function j(t,e){return Promise.resolve().then((function(){if(t.status!==x)return t;t.status=w;var n=Object.keys(t.parcels).map((function(e){return t.parcels[e].unmountThisParcel()}));return Promise.all(n).then(r,(function(n){return r().then((function(){var r=Error(n.message);if(e)throw d(r,t,S);c(r,t,S)}))})).then((function(){return t}));function r(){return $(t,"unmount").then((function(){t.status=y})).catch((function(n){if(e)throw d(n,t,S);c(n,t,S)}))}}))}var z=!1,N=!1;function F(t,e){return Promise.resolve().then((function(){return t.status!==y?t:(z||(window.dispatchEvent(new s("single-spa:before-first-mount")),z=!0),$(t,"mount").then((function(){return t.status=x,N||(window.dispatchEvent(new s("single-spa:first-mount")),N=!0),t})).catch((function(n){return t.status=x,j(t,!0).then(r,r);function r(){if(e)throw d(n,t,S);return c(n,t,S),t}})))}))}var B=0,H={parcels:{}};function G(){return U.apply(H,arguments)}function U(t,e){var n=this;if(!t||"object"!==i(t)&&"function"!=typeof t)throw Error(f(2,!1));if(t.name&&"string"!=typeof t.name)throw Error(f(3,!1,i(t.name)));if("object"!==i(e))throw Error(f(4,!1,name,i(e)));if(!e.domElement)throw Error(f(5,!1,name));var r,o=B++,a="function"==typeof t,s=a?t:function(){return Promise.resolve(t)},u={id:o,parcels:{},status:a?m:g,customProps:e,parentName:A(n),unmountThisParcel:function(){return v.then((function(){if(u.status!==x)throw Error(f(6,!1,name,u.status));return j(u,!0)})).then((function(t){return u.parentName&&delete n.parcels[u.id],t})).then((function(t){return l(t),t})).catch((function(t){throw u.status=S,h(t),t}))}};n.parcels[o]=u;var c=s();if(!c||"function"!=typeof c.then)throw Error(f(7,!1));var l,h,p=(c=c.then((function(t){if(!t)throw Error(f(8,!1));var e=t.name||"parcel-".concat(o);if(Object.prototype.hasOwnProperty.call(t,"bootstrap")&&!R(t.bootstrap))throw Error(f(9,!1,e));if(!R(t.mount))throw Error(f(10,!1,e));if(!R(t.unmount))throw Error(f(11,!1,e));if(t.update&&!R(t.update))throw Error(f(12,!1,e));var n=k(t,"bootstrap"),i=k(t,"mount"),a=k(t,"unmount");u.status=g,u.name=e,u.bootstrap=n,u.mount=i,u.unmount=a,u.timeouts=Q(t.timeouts),t.update&&(u.update=k(t,"update"),r.update=function(t){return u.customProps=t,W(function(t){return Promise.resolve().then((function(){if(t.status!==x)throw Error(f(32,!1,A(t)));return t.status=b,$(t,"update").then((function(){return t.status=x,t})).catch((function(e){throw d(e,t,S)}))}))}(u))})}))).then((function(){return D(u,!0)})),v=p.then((function(){return F(u,!0)})),_=new Promise((function(t,e){l=t,h=e}));return r={mount:function(){return W(Promise.resolve().then((function(){if(u.status!==y)throw Error(f(13,!1,name,u.status));return n.parcels[o]=u,F(u)})))},unmount:function(){return W(u.unmountThisParcel())},getStatus:function(){return u.status},loadPromise:W(c),bootstrapPromise:W(p),mountPromise:W(v),unmountPromise:W(_)}}function W(t){return t.then((function(){return null}))}function V(t){var e=A(t),n="function"==typeof t.customProps?t.customProps(e,window.location):t.customProps;("object"!==i(n)||null===n||Array.isArray(n))&&(n={},console.warn(f(40,!1),e,n));var o=L({},n,{name:e,mountParcel:U.bind(t),singleSpa:r});return C(t)&&(o.unmountSelf=t.unmountThisParcel),o}var Z={bootstrap:{millis:4e3,dieOnTimeout:!1,warningMillis:1e3},mount:{millis:3e3,dieOnTimeout:!1,warningMillis:1e3},unmount:{millis:3e3,dieOnTimeout:!1,warningMillis:1e3},unload:{millis:3e3,dieOnTimeout:!1,warningMillis:1e3},update:{millis:3e3,dieOnTimeout:!1,warningMillis:1e3}};function q(t,e,n){if("number"!=typeof t||t<=0)throw Error(f(16,!1));Z.bootstrap={millis:t,dieOnTimeout:e,warningMillis:n||1e3}}function Y(t,e,n){if("number"!=typeof t||t<=0)throw Error(f(17,!1));Z.mount={millis:t,dieOnTimeout:e,warningMillis:n||1e3}}function J(t,e,n){if("number"!=typeof t||t<=0)throw Error(f(18,!1));Z.unmount={millis:t,dieOnTimeout:e,warningMillis:n||1e3}}function X(t,e,n){if("number"!=typeof t||t<=0)throw Error(f(19,!1));Z.unload={millis:t,dieOnTimeout:e,warningMillis:n||1e3}}function $(t,e){var n=t.timeouts[e],r=n.warningMillis,i=P(t);return new Promise((function(o,a){var s=!1,u=!1;t[e](V(t)).then((function(t){s=!0,o(t)})).catch((function(t){s=!0,a(t)})),setTimeout((function(){return l(1)}),r),setTimeout((function(){return l(!0)}),n.millis);var c=f(31,!1,e,i,A(t),n.millis);function l(t){if(!s)if(!0===t)u=!0,n.dieOnTimeout?a(Error(c)):console.error(c);else if(!u){var e=t,i=e*r;console.warn(c),i+r<n.millis&&setTimeout((function(){return l(e+1)}),r)}}}))}function Q(t){var e={};for(var n in Z)e[n]=L({},Z[n],t&&t[n]||{});return e}function K(t){return Promise.resolve().then((function(){return t.loadPromise?t.loadPromise:t.status!==p&&t.status!==M?t:(t.status=m,t.loadPromise=Promise.resolve().then((function(){var r=t.loadApp(V(t));if(!I(r))throw n=!0,Error(f(33,!1,A(t)));return r.then((function(n){var r;t.loadErrorTime=null,"object"!==i(e=n)&&(r=34),Object.prototype.hasOwnProperty.call(e,"bootstrap")&&!R(e.bootstrap)&&(r=35),R(e.mount)||(r=36),R(e.unmount)||(r=37);var o=P(e);if(r){var a;try{a=JSON.stringify(e)}catch(t){}return console.error(f(r,!1,o,A(t),a),e),c(void 0,t,S),t}return e.devtools&&e.devtools.overlays&&(t.devtools.overlays=L({},t.devtools.overlays,e.devtools.overlays)),t.status=g,t.bootstrap=k(e,"bootstrap"),t.mount=k(e,"mount"),t.unmount=k(e,"unmount"),t.unload=k(e,"unload"),t.timeouts=Q(e.timeouts),delete t.loadPromise,t}))})).catch((function(e){var r;return delete t.loadPromise,n?r=S:(r=M,t.loadErrorTime=(new Date).getTime()),c(e,t,r),t})));var e,n}))}var tt,et="undefined"!=typeof window,nt={hashchange:[],popstate:[]},rt=["hashchange","popstate"];function it(t){var e;if("string"==typeof t)e=t;else if(this&&this.href)e=this.href;else{if(!(t&&t.currentTarget&&t.currentTarget.href&&t.preventDefault))throw Error(f(14,!1));e=t.currentTarget.href,t.preventDefault()}var n=ht(window.location.href),r=ht(e);0===e.indexOf("#")?window.location.hash=r.hash:n.host!==r.host&&r.host?window.location.href=e:r.pathname===n.pathname&&r.search===n.search?window.location.hash=r.hash:window.history.pushState(null,null,e)}function ot(t){var e=this;if(t){var n=t[0].type;rt.indexOf(n)>=0&&nt[n].forEach((function(n){try{n.apply(e,t)}catch(t){setTimeout((function(){throw t}))}}))}}function at(){jt([],arguments)}function st(t,e){return function(){var n=window.location.href,r=t.apply(this,arguments),i=window.location.href;return tt&&n===i||(Bt()?window.dispatchEvent(ut(window.history.state,e)):jt([])),r}}function ut(t,e){var n;try{n=new PopStateEvent("popstate",{state:t})}catch(e){(n=document.createEvent("PopStateEvent")).initPopStateEvent("popstate",!1,!1,t)}return n.singleSpa=!0,n.singleSpaTrigger=e,n}if(et){window.addEventListener("hashchange",at),window.addEventListener("popstate",at);var ct=window.addEventListener,lt=window.removeEventListener;window.addEventListener=function(t,e){if(!("function"==typeof e&&rt.indexOf(t)>=0)||O(nt[t],(function(t){return t===e})))return ct.apply(this,arguments);nt[t].push(e)},window.removeEventListener=function(t,e){if(!("function"==typeof e&&rt.indexOf(t)>=0))return lt.apply(this,arguments);nt[t]=nt[t].filter((function(t){return t!==e}))},window.history.pushState=st(window.history.pushState,"pushState"),window.history.replaceState=st(window.history.replaceState,"replaceState"),window.singleSpaNavigate?console.warn(f(41,!1)):window.singleSpaNavigate=it}function ht(t){var e=document.createElement("a");return e.href=t,e}var ft=!1;function dt(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:window.jQuery;if(t||window.$&&window.$.fn&&window.$.fn.jquery&&(t=window.$),t&&!ft){var e=t.fn.on,n=t.fn.off;t.fn.on=function(t,n){return pt.call(this,e,window.addEventListener,t,n,arguments)},t.fn.off=function(t,e){return pt.call(this,n,window.removeEventListener,t,e,arguments)},ft=!0}}function pt(t,e,n,r,i){return"string"!=typeof n?t.apply(this,i):(n.split(/\s+/).forEach((function(t){rt.indexOf(t)>=0&&(e(t,r),n=n.replace(t,""))})),""===n.trim()?this:t.apply(this,i))}var mt={};function gt(t){return Promise.resolve().then((function(){var e=mt[A(t)];if(!e)return t;if(t.status===p)return vt(t,e),t;if("UNLOADING"===t.status)return e.promise.then((function(){return t}));if(t.status!==y&&t.status!==M)return t;var n=t.status===M?Promise.resolve():$(t,"unload");return t.status="UNLOADING",n.then((function(){return vt(t,e),t})).catch((function(n){return function(t,e,n){delete mt[A(t)],delete t.bootstrap,delete t.mount,delete t.unmount,delete t.unload,c(n,t,S),e.reject(n)}(t,e,n),t}))}))}function vt(t,e){delete mt[A(t)],delete t.bootstrap,delete t.mount,delete t.unmount,delete t.unload,t.status=p,e.resolve()}function yt(t,e,n,r){mt[A(t)]={app:t,resolve:n,reject:r},Object.defineProperty(mt[A(t)],"promise",{get:e})}function _t(t){return mt[t]}var xt=[];function bt(){var t=[],e=[],n=[],r=[],i=(new Date).getTime();return xt.forEach((function(o){var a=o.status!==S&&E(o);switch(o.status){case M:a&&i-o.loadErrorTime>=200&&n.push(o);break;case p:case m:a&&n.push(o);break;case g:case y:!a&&_t(A(o))?t.push(o):a&&r.push(o);break;case x:a||e.push(o)}})),{appsToUnload:t,appsToUnmount:e,appsToLoad:n,appsToMount:r}}function wt(){return xt.filter(T).map(A)}function Mt(){return xt.map(A)}function St(t){var e=O(xt,(function(e){return A(e)===t}));return e?e.status:null}function Tt(t,e,n,r){var o=function(t,e,n,r){var o,a={name:null,loadApp:null,activeWhen:null,customProps:null};return"object"===i(t)?(function(t){if(Array.isArray(t)||null===t)throw Error(f(39,!1));var e=["name","app","activeWhen","customProps"],n=Object.keys(t).reduce((function(t,n){return e.indexOf(n)>=0?t:t.concat(n)}),[]);if(0!==n.length)throw Error(f(38,!1,e.join(", "),n.join(", ")));if("string"!=typeof t.name||0===t.name.length)throw Error(f(20,!1));if("object"!==i(t.app)&&"function"!=typeof t.app)throw Error(f(20,!1));var r=function(t){return"string"==typeof t||"function"==typeof t};if(!(r(t.activeWhen)||Array.isArray(t.activeWhen)&&t.activeWhen.every(r)))throw Error(f(24,!1));if(!Lt(t.customProps))throw Error(f(22,!1))}(t),a.name=t.name,a.loadApp=t.app,a.activeWhen=t.activeWhen,a.customProps=t.customProps):(function(t,e,n,r){if("string"!=typeof t||0===t.length)throw Error(f(20,!1));if(!e)throw Error(f(23,!1));if("function"!=typeof n)throw Error(f(24,!1));if(!Lt(r))throw Error(f(22,!1))}(t,e,n,r),a.name=t,a.loadApp=e,a.activeWhen=n,a.customProps=r),a.loadApp="function"!=typeof(o=a.loadApp)?function(){return Promise.resolve(o)}:o,a.customProps=function(t){return t||{}}(a.customProps),a.activeWhen=function(t){var e=Array.isArray(t)?t:[t];return e=e.map((function(t){return"function"==typeof t?t:Ot(t)})),function(t){return e.some((function(e){return e(t)}))}}(a.activeWhen),a}(t,e,n,r);if(-1!==Mt().indexOf(o.name))throw Error(f(21,!1,o.name));xt.push(L({loadErrorTime:null,status:p,parcels:{},devtools:{overlays:{options:{},selectors:[]}}},o)),et&&(dt(),jt())}function Et(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:window.location;return xt.filter((function(e){return e.activeWhen(t)})).map(A)}function At(t){if(0===xt.filter((function(e){return A(e)===t})).length)throw Error(f(25,!1,t));return Ct(t).then((function(){var e=xt.map(A).indexOf(t);xt.splice(e,1)}))}function Ct(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{waitForUnmount:!1};if("string"!=typeof t)throw Error(f(26,!1));var n=O(xt,(function(e){return A(e)===t}));if(!n)throw Error(f(27,!1,t));var r,i=_t(A(n));if(e&&e.waitForUnmount){if(i)return i.promise;var o=new Promise((function(t,e){yt(n,(function(){return o}),t,e)}));return o}return i?(r=i.promise,Pt(n,i.resolve,i.reject)):r=new Promise((function(t,e){yt(n,(function(){return r}),t,e),Pt(n,t,e)})),r}function Pt(t,e,n){j(t).then(gt).then((function(){e(),setTimeout((function(){jt()}))})).catch(n)}function Lt(t){return!t||"function"==typeof t||"object"===i(t)&&null!==t&&!Array.isArray(t)}function Ot(t,e){var n=function(t,e){var n=0,r=!1,i="^";"/"!==t[0]&&(t="/"+t);for(var o=0;o<t.length;o++){var a=t[o];(!r&&":"===a||r&&"/"===a)&&s(o)}return s(t.length),new RegExp(i,"i");function s(o){var a=t.slice(n,o).replace(/[|\\{}()[\]^$+*?.]/g,"\\$&");if(i+=r?"[^/]+/?":a,o===t.length)if(r)e&&(i+="$");else{var s=e?"":".*";i="/"===i.charAt(i.length-1)?"".concat(i).concat(s,"$"):"".concat(i,"(/").concat(s,")?(#.*)?$")}r=!r,n=o}}(t,e);return function(t){var e=t.origin;e||(e="".concat(t.protocol,"//").concat(t.host));var r=t.href.replace(e,"").replace(t.search,"").split("?")[0];return n.test(r)}}var Rt=!1,kt=[],It=et&&window.location.href;function Dt(){return jt()}function jt(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],e=arguments.length>1?arguments[1]:void 0;if(Rt)return new Promise((function(t,n){kt.push({resolve:t,reject:n,eventArguments:e})}));var n,r=bt(),i=r.appsToUnload,a=r.appsToUnmount,u=r.appsToLoad,c=r.appsToMount,l=!1,h=It,f=It=window.location.href;return Bt()?(Rt=!0,n=i.concat(u,a,c),g()):(n=u,m());function d(){l=!0}function m(){return Promise.resolve().then((function(){var t=u.map(K);return Promise.all(t).then(_).then((function(){return[]})).catch((function(t){throw _(),t}))}))}function g(){return Promise.resolve().then((function(){if(window.dispatchEvent(new s(0===n.length?"single-spa:before-no-app-change":"single-spa:before-app-change",b(!0))),window.dispatchEvent(new s("single-spa:before-routing-event",b(!0,{cancelNavigation:d}))),l)return window.dispatchEvent(new s("single-spa:before-mount-routing-event",b(!0))),v(),void it(h);var e=i.map(gt),r=a.map(j).map((function(t){return t.then(gt)})).concat(e),o=Promise.all(r);o.then((function(){window.dispatchEvent(new s("single-spa:before-mount-routing-event",b(!0)))}));var f=u.map((function(t){return K(t).then((function(t){return zt(t,o)}))})),p=c.filter((function(t){return u.indexOf(t)<0})).map((function(t){return zt(t,o)}));return o.catch((function(t){throw _(),t})).then((function(){return _(),Promise.all(f.concat(p)).catch((function(e){throw t.forEach((function(t){return t.reject(e)})),e})).then(v)}))}))}function v(){var e=wt();t.forEach((function(t){return t.resolve(e)}));try{var r=0===n.length?"single-spa:no-app-change":"single-spa:app-change";window.dispatchEvent(new s(r,b())),window.dispatchEvent(new s("single-spa:routing-event",b()))}catch(t){setTimeout((function(){throw t}))}if(Rt=!1,kt.length>0){var i=kt;kt=[],jt(i)}return e}function _(){t.forEach((function(t){ot(t.eventArguments)})),ot(e)}function b(){var t,r=arguments.length>0&&void 0!==arguments[0]&&arguments[0],s=arguments.length>1?arguments[1]:void 0,d={},m=(o(t={},x,[]),o(t,y,[]),o(t,p,[]),o(t,S,[]),t);r?(u.concat(c).forEach((function(t,e){v(t,x)})),i.forEach((function(t){v(t,p)})),a.forEach((function(t){v(t,y)}))):n.forEach((function(t){v(t)}));var g={detail:{newAppStatuses:d,appsByNewStatus:m,totalAppChanges:n.length,originalEvent:null==e?void 0:e[0],oldUrl:h,newUrl:f,navigationIsCanceled:l}};return s&&L(g.detail,s),g;function v(t,e){var n=A(t);e=e||St(n),d[n]=e,(m[e]=m[e]||[]).push(n)}}}function zt(t,e){return E(t)?D(t).then((function(t){return e.then((function(){return E(t)?F(t):t}))})):e.then((function(){return t}))}var Nt=!1;function Ft(t){var e;Nt=!0,t&&t.urlRerouteOnly&&(e=t.urlRerouteOnly,tt=e),et&&jt()}function Bt(){return Nt}et&&setTimeout((function(){Nt||console.warn(f(1,!1))}),5e3);var Ht={getRawAppData:function(){return[].concat(xt)},reroute:jt,NOT_LOADED:p,toLoadPromise:K,toBootstrapPromise:D,unregisterApplication:At};et&&window.__SINGLE_SPA_DEVTOOLS__&&(window.__SINGLE_SPA_DEVTOOLS__.exposedMethods=Ht)}).call(this,n(20))},function(t,e,n){var r=n(28),i=n(12);t.exports=function(t){if(!i(t))return!1;var e=r(t);return"[object Function]"==e||"[object GeneratorFunction]"==e||"[object AsyncFunction]"==e||"[object Proxy]"==e}},function(t,e,n){"use strict";var r=n(122),i=Object.prototype.toString;function o(t){return"[object Array]"===i.call(t)}function a(t){return void 0===t}function s(t){return null!==t&&"object"==typeof t}function u(t){if("[object Object]"!==i.call(t))return!1;var e=Object.getPrototypeOf(t);return null===e||e===Object.prototype}function c(t){return"[object Function]"===i.call(t)}function l(t,e){if(null!=t)if("object"!=typeof t&&(t=[t]),o(t))for(var n=0,r=t.length;n<r;n++)e.call(null,t[n],n,t);else for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.call(null,t[i],i,t)}t.exports={isArray:o,isArrayBuffer:function(t){return"[object ArrayBuffer]"===i.call(t)},isBuffer:function(t){return null!==t&&!a(t)&&null!==t.constructor&&!a(t.constructor)&&"function"==typeof t.constructor.isBuffer&&t.constructor.isBuffer(t)},isFormData:function(t){return"undefined"!=typeof FormData&&t instanceof FormData},isArrayBufferView:function(t){return"undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(t):t&&t.buffer&&t.buffer instanceof ArrayBuffer},isString:function(t){return"string"==typeof t},isNumber:function(t){return"number"==typeof t},isObject:s,isPlainObject:u,isUndefined:a,isDate:function(t){return"[object Date]"===i.call(t)},isFile:function(t){return"[object File]"===i.call(t)},isBlob:function(t){return"[object Blob]"===i.call(t)},isFunction:c,isStream:function(t){return s(t)&&c(t.pipe)},isURLSearchParams:function(t){return"undefined"!=typeof URLSearchParams&&t instanceof URLSearchParams},isStandardBrowserEnv:function(){return("undefined"==typeof navigator||"ReactNative"!==navigator.product&&"NativeScript"!==navigator.product&&"NS"!==navigator.product)&&("undefined"!=typeof window&&"undefined"!=typeof document)},forEach:l,merge:function t(){var e={};function n(n,r){u(e[r])&&u(n)?e[r]=t(e[r],n):u(n)?e[r]=t({},n):o(n)?e[r]=n.slice():e[r]=n}for(var r=0,i=arguments.length;r<i;r++)l(arguments[r],n);return e},extend:function(t,e,n){return l(e,(function(e,i){t[i]=n&&"function"==typeof e?r(e,n):e})),t},trim:function(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")},stripBOM:function(t){return 65279===t.charCodeAt(0)&&(t=t.slice(1)),t}}},function(t,e){var n=t.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=n)},function(t,e,n){var r=n(102)("wks"),i=n(103),o=n(5).Symbol,a="function"==typeof o;(t.exports=function(t){return r[t]||(r[t]=a&&o[t]||(a?o:i)("Symbol."+t))}).store=r},function(t,e,n){var r=n(5),i=n(1),o=n(29),a=n(23),s=n(37),u=function(t,e,n){var c,l,h,f=t&u.F,d=t&u.G,p=t&u.S,m=t&u.P,g=t&u.B,v=t&u.W,y=d?i:i[e]||(i[e]={}),_=y.prototype,x=d?r:p?r[e]:(r[e]||{}).prototype;for(c in d&&(n=e),n)(l=!f&&x&&void 0!==x[c])&&s(y,c)||(h=l?x[c]:n[c],y[c]=d&&"function"!=typeof x[c]?n[c]:g&&l?o(h,r):v&&x[c]==h?function(t){var e=function(e,n,r){if(this instanceof t){switch(arguments.length){case 0:return new t;case 1:return new t(e);case 2:return new t(e,n)}return new t(e,n,r)}return t.apply(this,arguments)};return e.prototype=t.prototype,e}(h):m&&"function"==typeof h?o(Function.call,h):h,m&&((y.virtual||(y.virtual={}))[c]=h,t&u.R&&_&&!_[c]&&a(_,c,h)))};u.F=1,u.G=2,u.S=4,u.P=8,u.B=16,u.W=32,u.U=64,u.R=128,t.exports=u},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(O,r)&&O[r]&&s.push(O[r][0]),O[r]=0;for(n in o)Object.prototype.hasOwnProperty.call(o,n)&&(t[n]=o[n]);for(j&&j(e);s.length;)s.shift()()}var n=window.webpackHotUpdaterk_web_core;window.webpackHotUpdaterk_web_core=function(t,e){!function(t,e){if(!w[t]||!b[t])return;for(var n in b[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="c18710238ca3c727df79",a={},s=[],u=[];function c(t){var e=L[t];if(!e)return R;var n=function(n){return e.hot.active?(L[n]?-1===L[n].parents.indexOf(t)&&L[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&&(x[t]||T(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":P(e);break;case"prepare":case"check":case"dispose":case"apply":(v=v||[]).push(e)}},check:S,apply:A,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,x={},b={},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(C()?"ready":"idle"),null;b={},x={},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={},O)T(n);return"prepare"===f&&0===_&&0===y&&E(),e}));var e}function T(t){w[t]?(b[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)):x[t]=!0}function E(){d("ready");var t=p;if(p=null,t)if(i)Promise.resolve().then((function(){return A(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 A(e){if("ready"!==f)throw new Error("apply() is only allowed in ready status");return function e(n){var i,u,c,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=L[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 u=l.parents[s],c=L[u];if(c){if(c.hot._declinedDependencies[o])return{type:"declined",chain:a.concat([u]),moduleId:o,parentId:u};-1===e.indexOf(u)&&(c.hot._acceptedDependencies[o]?(n[u]||(n[u]=[]),p(n[u],[o])):(delete n[u],e.push(u),r.push({chain:a.concat([u]),id:u})))}}}}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)}}C();var y={},_=[],x={},b=function(){console.warn("[HMR] unexpected require("+T.moduleId+") to disposed module")};for(var S in m)if(Object.prototype.hasOwnProperty.call(m,S)){var T;h=M(S),T=m[S]?f(h):{type:"disposed",moduleId:S};var E=!1,A=!1,P=!1,k="";switch(T.chain&&(k="\nUpdate propagation: "+T.chain.join(" -> ")),T.type){case"self-declined":n.onDeclined&&n.onDeclined(T),n.ignoreDeclined||(E=new Error("Aborted because of self decline: "+T.moduleId+k));break;case"declined":n.onDeclined&&n.onDeclined(T),n.ignoreDeclined||(E=new Error("Aborted because of declined dependency: "+T.moduleId+" in "+T.parentId+k));break;case"unaccepted":n.onUnaccepted&&n.onUnaccepted(T),n.ignoreUnaccepted||(E=new Error("Aborted because "+h+" is not accepted"+k));break;case"accepted":n.onAccepted&&n.onAccepted(T),A=!0;break;case"disposed":n.onDisposed&&n.onDisposed(T),P=!0;break;default:throw new Error("Unexception type "+T.type)}if(E)return d("abort"),Promise.reject(E);if(A)for(h in x[h]=m[h],p(_,T.outdatedModules),T.outdatedDependencies)Object.prototype.hasOwnProperty.call(T.outdatedDependencies,h)&&(y[h]||(y[h]=[]),p(y[h],T.outdatedDependencies[h]));P&&(p(_,[T.moduleId]),x[h]=b)}var I,D=[];for(u=0;u<_.length;u++)h=_[u],L[h]&&L[h].hot._selfAccepted&&x[h]!==b&&!L[h].hot._selfInvalidated&&D.push({module:h,parents:L[h].parents.slice(),errorHandler:L[h].hot._selfAccepted});d("dispose"),Object.keys(w).forEach((function(t){!1===w[t]&&function(t){delete O[t]}(t)}));var j,z,N=_.slice();for(;N.length>0;)if(h=N.pop(),l=L[h]){var F={},B=l.hot._disposeHandlers;for(c=0;c<B.length;c++)(i=B[c])(F);for(a[h]=F,l.hot.active=!1,delete L[h],delete y[h],c=0;c<l.children.length;c++){var H=L[l.children[c]];H&&((I=H.parents.indexOf(h))>=0&&H.parents.splice(I,1))}}for(h in y)if(Object.prototype.hasOwnProperty.call(y,h)&&(l=L[h]))for(z=y[h],c=0;c<z.length;c++)j=z[c],(I=l.children.indexOf(j))>=0&&l.children.splice(I,1);d("apply"),void 0!==g&&(o=g,g=void 0);for(h in m=void 0,x)Object.prototype.hasOwnProperty.call(x,h)&&(t[h]=x[h]);var G=null;for(h in y)if(Object.prototype.hasOwnProperty.call(y,h)&&(l=L[h])){z=y[h];var U=[];for(u=0;u<z.length;u++)if(j=z[u],i=l.hot._acceptedDependencies[j]){if(-1!==U.indexOf(i))continue;U.push(i)}for(u=0;u<U.length;u++){i=U[u];try{i(z)}catch(t){n.onErrored&&n.onErrored({type:"accept-errored",moduleId:h,dependencyId:z[u],error:t}),n.ignoreErrored||G||(G=t)}}}for(u=0;u<D.length;u++){var W=D[u];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 C(){if(v)return m||(m={}),v.forEach(P),v=void 0,!0}function P(e){Object.prototype.hasOwnProperty.call(m,e)||(m[e]=t[e])}var L={},O={0:0};function R(e){if(L[e])return L[e].exports;var n=L[e]={i:e,l:!1,exports:{},hot:l(e),parents:(u=s,s=[],u),children:[]};return t[e].call(n.exports,n,n.exports,c(e)),n.l=!0,n.exports}R.e=function(t){var e=[],n=O[t];if(0!==n)if(n)e.push(n[2]);else{var r=new Promise((function(e,r){n=O[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(u);var n=O[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)}O[t]=void 0}};var u=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=L,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 k=window.webpackJsonprk_web_core=window.webpackJsonprk_web_core||[],I=k.push.bind(k);k.push=e,k=k.slice();for(var D=0;D<k.length;D++)e(k[D]);var j=I;return c(164)(R.s=164)}([function(t,e,n){t.exports=n(335)},function(t,e){var n=t.exports={version:"2.6.12"};"number"==typeof __e&&(__e=n)},function(t,e,n){"use strict";(function(t){n.d(e,"a",(function(){return p})),n.d(e,"b",(function(){return l})),n.d(e,"c",(function(){return Et})),n.d(e,"d",(function(){return St})),n.d(e,"e",(function(){return wt})),n.d(e,"f",(function(){return G})),n.d(e,"g",(function(){return it})),n.d(e,"h",(function(){return Tt})),n.d(e,"i",(function(){return h})),n.d(e,"j",(function(){return Ft}));var r=Object.freeze({__proto__:null,get start(){return Ft},get ensureJQuerySupport(){return dt},get setBootstrapMaxTime(){return q},get setMountMaxTime(){return Y},get setUnmountMaxTime(){return J},get setUnloadMaxTime(){return X},get registerApplication(){return Tt},get unregisterApplication(){return At},get getMountedApps(){return wt},get getAppStatus(){return St},get unloadApplication(){return Ct},get checkActivityFunctions(){return Et},get getAppNames(){return Mt},get pathToActiveWhen(){return Ot},get navigateToUrl(){return it},get triggerAppChange(){return Dt},get addErrorHandler(){return l},get removeErrorHandler(){return h},get mountRootParcel(){return G},get NOT_LOADED(){return p},get LOADING_SOURCE_CODE(){return m},get NOT_BOOTSTRAPPED(){return g},get BOOTSTRAPPING(){return v},get NOT_MOUNTED(){return y},get MOUNTING(){return _},get UPDATING(){return b},get LOAD_ERROR(){return M},get MOUNTED(){return x},get UNMOUNTING(){return w},get SKIP_BECAUSE_BROKEN(){return S}});function i(t){return(i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function o(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var a=("undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:void 0!==t?t:"undefined"!=typeof self?self:{}).CustomEvent,s=function(){try{var t=new a("cat",{detail:{foo:"bar"}});return"cat"===t.type&&"bar"===t.detail.foo}catch(t){}return!1}()?a:"undefined"!=typeof document&&"function"==typeof document.createEvent?function(t,e){var n=document.createEvent("CustomEvent");return e?n.initCustomEvent(t,e.bubbles,e.cancelable,e.detail):n.initCustomEvent(t,!1,!1,void 0),n}:function(t,e){var n=document.createEventObject();return n.type=t,e?(n.bubbles=Boolean(e.bubbles),n.cancelable=Boolean(e.cancelable),n.detail=e.detail):(n.bubbles=!1,n.cancelable=!1,n.detail=void 0),n},u=[];function c(t,e,n){var r=d(t,e,n);u.length?u.forEach((function(t){return t(r)})):setTimeout((function(){throw r}))}function l(t){if("function"!=typeof t)throw Error(f(28,!1));u.push(t)}function h(t){if("function"!=typeof t)throw Error(f(29,!1));var e=!1;return u=u.filter((function(n){var r=n===t;return e=e||r,!r})),e}function f(t,e){for(var n=arguments.length,r=new Array(n>2?n-2:0),i=2;i<n;i++)r[i-2]=arguments[i];return"single-spa minified message #".concat(t,": ").concat(e?e+" ":"","See https://single-spa.js.org/error/?code=").concat(t).concat(r.length?"&arg=".concat(r.join("&arg=")):"")}function d(t,e,n){var r,i="".concat(P(e)," '").concat(A(e),"' died in status ").concat(e.status,": ");if(t instanceof Error){try{t.message=i+t.message}catch(t){}r=t}else{console.warn(f(30,!1,e.status,A(e)));try{r=Error(i+JSON.stringify(t))}catch(e){r=t}}return r.appOrParcelName=A(e),e.status=n,r}var p="NOT_LOADED",m="LOADING_SOURCE_CODE",g="NOT_BOOTSTRAPPED",v="BOOTSTRAPPING",y="NOT_MOUNTED",_="MOUNTING",x="MOUNTED",b="UPDATING",w="UNMOUNTING",M="LOAD_ERROR",S="SKIP_BECAUSE_BROKEN";function T(t){return t.status===x}function E(t){try{return t.activeWhen(window.location)}catch(e){return c(e,t,S),!1}}function A(t){return t.name}function C(t){return Boolean(t.unmountThisParcel)}function P(t){return C(t)?"parcel":"application"}function L(){for(var t=arguments.length-1;t>0;t--)for(var e in arguments[t])"__proto__"!==e&&(arguments[t-1][e]=arguments[t][e]);return arguments[0]}function O(t,e){for(var n=0;n<t.length;n++)if(e(t[n]))return t[n];return null}function R(t){return t&&("function"==typeof t||(e=t,Array.isArray(e)&&!O(e,(function(t){return"function"!=typeof t}))));var e}function k(t,e){var n=t[e]||[];0===(n=Array.isArray(n)?n:[n]).length&&(n=[function(){return Promise.resolve()}]);var r=P(t),i=A(t);return function(t){return n.reduce((function(n,o,a){return n.then((function(){var n=o(t);return I(n)?n:Promise.reject(f(15,!1,r,i,e,a))}))}),Promise.resolve())}}function I(t){return t&&"function"==typeof t.then&&"function"==typeof t.catch}function D(t,e){return Promise.resolve().then((function(){return t.status!==g?t:(t.status=v,t.bootstrap?$(t,"bootstrap").then(n).catch((function(n){if(e)throw d(n,t,S);return c(n,t,S),t})):Promise.resolve().then(n))}));function n(){return t.status=y,t}}function j(t,e){return Promise.resolve().then((function(){if(t.status!==x)return t;t.status=w;var n=Object.keys(t.parcels).map((function(e){return t.parcels[e].unmountThisParcel()}));return Promise.all(n).then(r,(function(n){return r().then((function(){var r=Error(n.message);if(e)throw d(r,t,S);c(r,t,S)}))})).then((function(){return t}));function r(){return $(t,"unmount").then((function(){t.status=y})).catch((function(n){if(e)throw d(n,t,S);c(n,t,S)}))}}))}var z=!1,N=!1;function F(t,e){return Promise.resolve().then((function(){return t.status!==y?t:(z||(window.dispatchEvent(new s("single-spa:before-first-mount")),z=!0),$(t,"mount").then((function(){return t.status=x,N||(window.dispatchEvent(new s("single-spa:first-mount")),N=!0),t})).catch((function(n){return t.status=x,j(t,!0).then(r,r);function r(){if(e)throw d(n,t,S);return c(n,t,S),t}})))}))}var B=0,H={parcels:{}};function G(){return U.apply(H,arguments)}function U(t,e){var n=this;if(!t||"object"!==i(t)&&"function"!=typeof t)throw Error(f(2,!1));if(t.name&&"string"!=typeof t.name)throw Error(f(3,!1,i(t.name)));if("object"!==i(e))throw Error(f(4,!1,name,i(e)));if(!e.domElement)throw Error(f(5,!1,name));var r,o=B++,a="function"==typeof t,s=a?t:function(){return Promise.resolve(t)},u={id:o,parcels:{},status:a?m:g,customProps:e,parentName:A(n),unmountThisParcel:function(){return v.then((function(){if(u.status!==x)throw Error(f(6,!1,name,u.status));return j(u,!0)})).then((function(t){return u.parentName&&delete n.parcels[u.id],t})).then((function(t){return l(t),t})).catch((function(t){throw u.status=S,h(t),t}))}};n.parcels[o]=u;var c=s();if(!c||"function"!=typeof c.then)throw Error(f(7,!1));var l,h,p=(c=c.then((function(t){if(!t)throw Error(f(8,!1));var e=t.name||"parcel-".concat(o);if(Object.prototype.hasOwnProperty.call(t,"bootstrap")&&!R(t.bootstrap))throw Error(f(9,!1,e));if(!R(t.mount))throw Error(f(10,!1,e));if(!R(t.unmount))throw Error(f(11,!1,e));if(t.update&&!R(t.update))throw Error(f(12,!1,e));var n=k(t,"bootstrap"),i=k(t,"mount"),a=k(t,"unmount");u.status=g,u.name=e,u.bootstrap=n,u.mount=i,u.unmount=a,u.timeouts=Q(t.timeouts),t.update&&(u.update=k(t,"update"),r.update=function(t){return u.customProps=t,W(function(t){return Promise.resolve().then((function(){if(t.status!==x)throw Error(f(32,!1,A(t)));return t.status=b,$(t,"update").then((function(){return t.status=x,t})).catch((function(e){throw d(e,t,S)}))}))}(u))})}))).then((function(){return D(u,!0)})),v=p.then((function(){return F(u,!0)})),_=new Promise((function(t,e){l=t,h=e}));return r={mount:function(){return W(Promise.resolve().then((function(){if(u.status!==y)throw Error(f(13,!1,name,u.status));return n.parcels[o]=u,F(u)})))},unmount:function(){return W(u.unmountThisParcel())},getStatus:function(){return u.status},loadPromise:W(c),bootstrapPromise:W(p),mountPromise:W(v),unmountPromise:W(_)}}function W(t){return t.then((function(){return null}))}function V(t){var e=A(t),n="function"==typeof t.customProps?t.customProps(e,window.location):t.customProps;("object"!==i(n)||null===n||Array.isArray(n))&&(n={},console.warn(f(40,!1),e,n));var o=L({},n,{name:e,mountParcel:U.bind(t),singleSpa:r});return C(t)&&(o.unmountSelf=t.unmountThisParcel),o}var Z={bootstrap:{millis:4e3,dieOnTimeout:!1,warningMillis:1e3},mount:{millis:3e3,dieOnTimeout:!1,warningMillis:1e3},unmount:{millis:3e3,dieOnTimeout:!1,warningMillis:1e3},unload:{millis:3e3,dieOnTimeout:!1,warningMillis:1e3},update:{millis:3e3,dieOnTimeout:!1,warningMillis:1e3}};function q(t,e,n){if("number"!=typeof t||t<=0)throw Error(f(16,!1));Z.bootstrap={millis:t,dieOnTimeout:e,warningMillis:n||1e3}}function Y(t,e,n){if("number"!=typeof t||t<=0)throw Error(f(17,!1));Z.mount={millis:t,dieOnTimeout:e,warningMillis:n||1e3}}function J(t,e,n){if("number"!=typeof t||t<=0)throw Error(f(18,!1));Z.unmount={millis:t,dieOnTimeout:e,warningMillis:n||1e3}}function X(t,e,n){if("number"!=typeof t||t<=0)throw Error(f(19,!1));Z.unload={millis:t,dieOnTimeout:e,warningMillis:n||1e3}}function $(t,e){var n=t.timeouts[e],r=n.warningMillis,i=P(t);return new Promise((function(o,a){var s=!1,u=!1;t[e](V(t)).then((function(t){s=!0,o(t)})).catch((function(t){s=!0,a(t)})),setTimeout((function(){return l(1)}),r),setTimeout((function(){return l(!0)}),n.millis);var c=f(31,!1,e,i,A(t),n.millis);function l(t){if(!s)if(!0===t)u=!0,n.dieOnTimeout?a(Error(c)):console.error(c);else if(!u){var e=t,i=e*r;console.warn(c),i+r<n.millis&&setTimeout((function(){return l(e+1)}),r)}}}))}function Q(t){var e={};for(var n in Z)e[n]=L({},Z[n],t&&t[n]||{});return e}function K(t){return Promise.resolve().then((function(){return t.loadPromise?t.loadPromise:t.status!==p&&t.status!==M?t:(t.status=m,t.loadPromise=Promise.resolve().then((function(){var r=t.loadApp(V(t));if(!I(r))throw n=!0,Error(f(33,!1,A(t)));return r.then((function(n){var r;t.loadErrorTime=null,"object"!==i(e=n)&&(r=34),Object.prototype.hasOwnProperty.call(e,"bootstrap")&&!R(e.bootstrap)&&(r=35),R(e.mount)||(r=36),R(e.unmount)||(r=37);var o=P(e);if(r){var a;try{a=JSON.stringify(e)}catch(t){}return console.error(f(r,!1,o,A(t),a),e),c(void 0,t,S),t}return e.devtools&&e.devtools.overlays&&(t.devtools.overlays=L({},t.devtools.overlays,e.devtools.overlays)),t.status=g,t.bootstrap=k(e,"bootstrap"),t.mount=k(e,"mount"),t.unmount=k(e,"unmount"),t.unload=k(e,"unload"),t.timeouts=Q(e.timeouts),delete t.loadPromise,t}))})).catch((function(e){var r;return delete t.loadPromise,n?r=S:(r=M,t.loadErrorTime=(new Date).getTime()),c(e,t,r),t})));var e,n}))}var tt,et="undefined"!=typeof window,nt={hashchange:[],popstate:[]},rt=["hashchange","popstate"];function it(t){var e;if("string"==typeof t)e=t;else if(this&&this.href)e=this.href;else{if(!(t&&t.currentTarget&&t.currentTarget.href&&t.preventDefault))throw Error(f(14,!1));e=t.currentTarget.href,t.preventDefault()}var n=ht(window.location.href),r=ht(e);0===e.indexOf("#")?window.location.hash=r.hash:n.host!==r.host&&r.host?window.location.href=e:r.pathname===n.pathname&&r.search===n.search?window.location.hash=r.hash:window.history.pushState(null,null,e)}function ot(t){var e=this;if(t){var n=t[0].type;rt.indexOf(n)>=0&&nt[n].forEach((function(n){try{n.apply(e,t)}catch(t){setTimeout((function(){throw t}))}}))}}function at(){jt([],arguments)}function st(t,e){return function(){var n=window.location.href,r=t.apply(this,arguments),i=window.location.href;return tt&&n===i||(Bt()?window.dispatchEvent(ut(window.history.state,e)):jt([])),r}}function ut(t,e){var n;try{n=new PopStateEvent("popstate",{state:t})}catch(e){(n=document.createEvent("PopStateEvent")).initPopStateEvent("popstate",!1,!1,t)}return n.singleSpa=!0,n.singleSpaTrigger=e,n}if(et){window.addEventListener("hashchange",at),window.addEventListener("popstate",at);var ct=window.addEventListener,lt=window.removeEventListener;window.addEventListener=function(t,e){if(!("function"==typeof e&&rt.indexOf(t)>=0)||O(nt[t],(function(t){return t===e})))return ct.apply(this,arguments);nt[t].push(e)},window.removeEventListener=function(t,e){if(!("function"==typeof e&&rt.indexOf(t)>=0))return lt.apply(this,arguments);nt[t]=nt[t].filter((function(t){return t!==e}))},window.history.pushState=st(window.history.pushState,"pushState"),window.history.replaceState=st(window.history.replaceState,"replaceState"),window.singleSpaNavigate?console.warn(f(41,!1)):window.singleSpaNavigate=it}function ht(t){var e=document.createElement("a");return e.href=t,e}var ft=!1;function dt(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:window.jQuery;if(t||window.$&&window.$.fn&&window.$.fn.jquery&&(t=window.$),t&&!ft){var e=t.fn.on,n=t.fn.off;t.fn.on=function(t,n){return pt.call(this,e,window.addEventListener,t,n,arguments)},t.fn.off=function(t,e){return pt.call(this,n,window.removeEventListener,t,e,arguments)},ft=!0}}function pt(t,e,n,r,i){return"string"!=typeof n?t.apply(this,i):(n.split(/\s+/).forEach((function(t){rt.indexOf(t)>=0&&(e(t,r),n=n.replace(t,""))})),""===n.trim()?this:t.apply(this,i))}var mt={};function gt(t){return Promise.resolve().then((function(){var e=mt[A(t)];if(!e)return t;if(t.status===p)return vt(t,e),t;if("UNLOADING"===t.status)return e.promise.then((function(){return t}));if(t.status!==y&&t.status!==M)return t;var n=t.status===M?Promise.resolve():$(t,"unload");return t.status="UNLOADING",n.then((function(){return vt(t,e),t})).catch((function(n){return function(t,e,n){delete mt[A(t)],delete t.bootstrap,delete t.mount,delete t.unmount,delete t.unload,c(n,t,S),e.reject(n)}(t,e,n),t}))}))}function vt(t,e){delete mt[A(t)],delete t.bootstrap,delete t.mount,delete t.unmount,delete t.unload,t.status=p,e.resolve()}function yt(t,e,n,r){mt[A(t)]={app:t,resolve:n,reject:r},Object.defineProperty(mt[A(t)],"promise",{get:e})}function _t(t){return mt[t]}var xt=[];function bt(){var t=[],e=[],n=[],r=[],i=(new Date).getTime();return xt.forEach((function(o){var a=o.status!==S&&E(o);switch(o.status){case M:a&&i-o.loadErrorTime>=200&&n.push(o);break;case p:case m:a&&n.push(o);break;case g:case y:!a&&_t(A(o))?t.push(o):a&&r.push(o);break;case x:a||e.push(o)}})),{appsToUnload:t,appsToUnmount:e,appsToLoad:n,appsToMount:r}}function wt(){return xt.filter(T).map(A)}function Mt(){return xt.map(A)}function St(t){var e=O(xt,(function(e){return A(e)===t}));return e?e.status:null}function Tt(t,e,n,r){var o=function(t,e,n,r){var o,a={name:null,loadApp:null,activeWhen:null,customProps:null};return"object"===i(t)?(function(t){if(Array.isArray(t)||null===t)throw Error(f(39,!1));var e=["name","app","activeWhen","customProps"],n=Object.keys(t).reduce((function(t,n){return e.indexOf(n)>=0?t:t.concat(n)}),[]);if(0!==n.length)throw Error(f(38,!1,e.join(", "),n.join(", ")));if("string"!=typeof t.name||0===t.name.length)throw Error(f(20,!1));if("object"!==i(t.app)&&"function"!=typeof t.app)throw Error(f(20,!1));var r=function(t){return"string"==typeof t||"function"==typeof t};if(!(r(t.activeWhen)||Array.isArray(t.activeWhen)&&t.activeWhen.every(r)))throw Error(f(24,!1));if(!Lt(t.customProps))throw Error(f(22,!1))}(t),a.name=t.name,a.loadApp=t.app,a.activeWhen=t.activeWhen,a.customProps=t.customProps):(function(t,e,n,r){if("string"!=typeof t||0===t.length)throw Error(f(20,!1));if(!e)throw Error(f(23,!1));if("function"!=typeof n)throw Error(f(24,!1));if(!Lt(r))throw Error(f(22,!1))}(t,e,n,r),a.name=t,a.loadApp=e,a.activeWhen=n,a.customProps=r),a.loadApp="function"!=typeof(o=a.loadApp)?function(){return Promise.resolve(o)}:o,a.customProps=function(t){return t||{}}(a.customProps),a.activeWhen=function(t){var e=Array.isArray(t)?t:[t];return e=e.map((function(t){return"function"==typeof t?t:Ot(t)})),function(t){return e.some((function(e){return e(t)}))}}(a.activeWhen),a}(t,e,n,r);if(-1!==Mt().indexOf(o.name))throw Error(f(21,!1,o.name));xt.push(L({loadErrorTime:null,status:p,parcels:{},devtools:{overlays:{options:{},selectors:[]}}},o)),et&&(dt(),jt())}function Et(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:window.location;return xt.filter((function(e){return e.activeWhen(t)})).map(A)}function At(t){if(0===xt.filter((function(e){return A(e)===t})).length)throw Error(f(25,!1,t));return Ct(t).then((function(){var e=xt.map(A).indexOf(t);xt.splice(e,1)}))}function Ct(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{waitForUnmount:!1};if("string"!=typeof t)throw Error(f(26,!1));var n=O(xt,(function(e){return A(e)===t}));if(!n)throw Error(f(27,!1,t));var r,i=_t(A(n));if(e&&e.waitForUnmount){if(i)return i.promise;var o=new Promise((function(t,e){yt(n,(function(){return o}),t,e)}));return o}return i?(r=i.promise,Pt(n,i.resolve,i.reject)):r=new Promise((function(t,e){yt(n,(function(){return r}),t,e),Pt(n,t,e)})),r}function Pt(t,e,n){j(t).then(gt).then((function(){e(),setTimeout((function(){jt()}))})).catch(n)}function Lt(t){return!t||"function"==typeof t||"object"===i(t)&&null!==t&&!Array.isArray(t)}function Ot(t,e){var n=function(t,e){var n=0,r=!1,i="^";"/"!==t[0]&&(t="/"+t);for(var o=0;o<t.length;o++){var a=t[o];(!r&&":"===a||r&&"/"===a)&&s(o)}return s(t.length),new RegExp(i,"i");function s(o){var a=t.slice(n,o).replace(/[|\\{}()[\]^$+*?.]/g,"\\$&");if(i+=r?"[^/]+/?":a,o===t.length)if(r)e&&(i+="$");else{var s=e?"":".*";i="/"===i.charAt(i.length-1)?"".concat(i).concat(s,"$"):"".concat(i,"(/").concat(s,")?(#.*)?$")}r=!r,n=o}}(t,e);return function(t){var e=t.origin;e||(e="".concat(t.protocol,"//").concat(t.host));var r=t.href.replace(e,"").replace(t.search,"").split("?")[0];return n.test(r)}}var Rt=!1,kt=[],It=et&&window.location.href;function Dt(){return jt()}function jt(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],e=arguments.length>1?arguments[1]:void 0;if(Rt)return new Promise((function(t,n){kt.push({resolve:t,reject:n,eventArguments:e})}));var n,r=bt(),i=r.appsToUnload,a=r.appsToUnmount,u=r.appsToLoad,c=r.appsToMount,l=!1,h=It,f=It=window.location.href;return Bt()?(Rt=!0,n=i.concat(u,a,c),g()):(n=u,m());function d(){l=!0}function m(){return Promise.resolve().then((function(){var t=u.map(K);return Promise.all(t).then(_).then((function(){return[]})).catch((function(t){throw _(),t}))}))}function g(){return Promise.resolve().then((function(){if(window.dispatchEvent(new s(0===n.length?"single-spa:before-no-app-change":"single-spa:before-app-change",b(!0))),window.dispatchEvent(new s("single-spa:before-routing-event",b(!0,{cancelNavigation:d}))),l)return window.dispatchEvent(new s("single-spa:before-mount-routing-event",b(!0))),v(),void it(h);var e=i.map(gt),r=a.map(j).map((function(t){return t.then(gt)})).concat(e),o=Promise.all(r);o.then((function(){window.dispatchEvent(new s("single-spa:before-mount-routing-event",b(!0)))}));var f=u.map((function(t){return K(t).then((function(t){return zt(t,o)}))})),p=c.filter((function(t){return u.indexOf(t)<0})).map((function(t){return zt(t,o)}));return o.catch((function(t){throw _(),t})).then((function(){return _(),Promise.all(f.concat(p)).catch((function(e){throw t.forEach((function(t){return t.reject(e)})),e})).then(v)}))}))}function v(){var e=wt();t.forEach((function(t){return t.resolve(e)}));try{var r=0===n.length?"single-spa:no-app-change":"single-spa:app-change";window.dispatchEvent(new s(r,b())),window.dispatchEvent(new s("single-spa:routing-event",b()))}catch(t){setTimeout((function(){throw t}))}if(Rt=!1,kt.length>0){var i=kt;kt=[],jt(i)}return e}function _(){t.forEach((function(t){ot(t.eventArguments)})),ot(e)}function b(){var t,r=arguments.length>0&&void 0!==arguments[0]&&arguments[0],s=arguments.length>1?arguments[1]:void 0,d={},m=(o(t={},x,[]),o(t,y,[]),o(t,p,[]),o(t,S,[]),t);r?(u.concat(c).forEach((function(t,e){v(t,x)})),i.forEach((function(t){v(t,p)})),a.forEach((function(t){v(t,y)}))):n.forEach((function(t){v(t)}));var g={detail:{newAppStatuses:d,appsByNewStatus:m,totalAppChanges:n.length,originalEvent:null==e?void 0:e[0],oldUrl:h,newUrl:f,navigationIsCanceled:l}};return s&&L(g.detail,s),g;function v(t,e){var n=A(t);e=e||St(n),d[n]=e,(m[e]=m[e]||[]).push(n)}}}function zt(t,e){return E(t)?D(t).then((function(t){return e.then((function(){return E(t)?F(t):t}))})):e.then((function(){return t}))}var Nt=!1;function Ft(t){var e;Nt=!0,t&&t.urlRerouteOnly&&(e=t.urlRerouteOnly,tt=e),et&&jt()}function Bt(){return Nt}et&&setTimeout((function(){Nt||console.warn(f(1,!1))}),5e3);var Ht={getRawAppData:function(){return[].concat(xt)},reroute:jt,NOT_LOADED:p,toLoadPromise:K,toBootstrapPromise:D,unregisterApplication:At};et&&window.__SINGLE_SPA_DEVTOOLS__&&(window.__SINGLE_SPA_DEVTOOLS__.exposedMethods=Ht)}).call(this,n(20))},function(t,e,n){var r=n(28),i=n(12);t.exports=function(t){if(!i(t))return!1;var e=r(t);return"[object Function]"==e||"[object GeneratorFunction]"==e||"[object AsyncFunction]"==e||"[object Proxy]"==e}},function(t,e,n){"use strict";var r=n(122),i=Object.prototype.toString;function o(t){return"[object Array]"===i.call(t)}function a(t){return void 0===t}function s(t){return null!==t&&"object"==typeof t}function u(t){if("[object Object]"!==i.call(t))return!1;var e=Object.getPrototypeOf(t);return null===e||e===Object.prototype}function c(t){return"[object Function]"===i.call(t)}function l(t,e){if(null!=t)if("object"!=typeof t&&(t=[t]),o(t))for(var n=0,r=t.length;n<r;n++)e.call(null,t[n],n,t);else for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.call(null,t[i],i,t)}t.exports={isArray:o,isArrayBuffer:function(t){return"[object ArrayBuffer]"===i.call(t)},isBuffer:function(t){return null!==t&&!a(t)&&null!==t.constructor&&!a(t.constructor)&&"function"==typeof t.constructor.isBuffer&&t.constructor.isBuffer(t)},isFormData:function(t){return"undefined"!=typeof FormData&&t instanceof FormData},isArrayBufferView:function(t){return"undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(t):t&&t.buffer&&t.buffer instanceof ArrayBuffer},isString:function(t){return"string"==typeof t},isNumber:function(t){return"number"==typeof t},isObject:s,isPlainObject:u,isUndefined:a,isDate:function(t){return"[object Date]"===i.call(t)},isFile:function(t){return"[object File]"===i.call(t)},isBlob:function(t){return"[object Blob]"===i.call(t)},isFunction:c,isStream:function(t){return s(t)&&c(t.pipe)},isURLSearchParams:function(t){return"undefined"!=typeof URLSearchParams&&t instanceof URLSearchParams},isStandardBrowserEnv:function(){return("undefined"==typeof navigator||"ReactNative"!==navigator.product&&"NativeScript"!==navigator.product&&"NS"!==navigator.product)&&("undefined"!=typeof window&&"undefined"!=typeof document)},forEach:l,merge:function t(){var e={};function n(n,r){u(e[r])&&u(n)?e[r]=t(e[r],n):u(n)?e[r]=t({},n):o(n)?e[r]=n.slice():e[r]=n}for(var r=0,i=arguments.length;r<i;r++)l(arguments[r],n);return e},extend:function(t,e,n){return l(e,(function(e,i){t[i]=n&&"function"==typeof e?r(e,n):e})),t},trim:function(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")},stripBOM:function(t){return 65279===t.charCodeAt(0)&&(t=t.slice(1)),t}}},function(t,e){var n=t.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=n)},function(t,e,n){var r=n(102)("wks"),i=n(103),o=n(5).Symbol,a="function"==typeof o;(t.exports=function(t){return r[t]||(r[t]=a&&o[t]||(a?o:i)("Symbol."+t))}).store=r},function(t,e,n){var r=n(5),i=n(1),o=n(29),a=n(23),s=n(37),u=function(t,e,n){var c,l,h,f=t&u.F,d=t&u.G,p=t&u.S,m=t&u.P,g=t&u.B,v=t&u.W,y=d?i:i[e]||(i[e]={}),_=y.prototype,x=d?r:p?r[e]:(r[e]||{}).prototype;for(c in d&&(n=e),n)(l=!f&&x&&void 0!==x[c])&&s(y,c)||(h=l?x[c]:n[c],y[c]=d&&"function"!=typeof x[c]?n[c]:g&&l?o(h,r):v&&x[c]==h?function(t){var e=function(e,n,r){if(this instanceof t){switch(arguments.length){case 0:return new t;case 1:return new t(e);case 2:return new t(e,n)}return new t(e,n,r)}return t.apply(this,arguments)};return e.prototype=t.prototype,e}(h):m&&"function"==typeof h?o(Function.call,h):h,m&&((y.virtual||(y.virtual={}))[c]=h,t&u.R&&_&&!_[c]&&a(_,c,h)))};u.F=1,u.G=2,u.S=4,u.P=8,u.B=16,u.W=32,u.U=64,u.R=128,t.exports=u},function(t,e,n){(function(t,r){var i;
|
|
2
2
|
/**
|
|
3
3
|
* @license
|
|
4
4
|
* Lodash <https://lodash.com/>
|
|
@@ -37,7 +37,7 @@ const h="127",f={LEFT:0,MIDDLE:1,RIGHT:2,ROTATE:0,DOLLY:1,PAN:2},d={ROTATE:0,PAN
|
|
|
37
37
|
* License: BSD-3
|
|
38
38
|
* https://github.com/huiyan-fe/mapv
|
|
39
39
|
*
|
|
40
|
-
*/function iy(t,e,n){var r=oy(n),i=function(t){return t.min||0}(n),o=r-i,a=n.range||null,s=0,u=1024;a&&2===a.length&&(s=(a[0]-i)/o*1024),a&&2===a.length&&(u=(a[1]-i)/o*1024);for(var c,l=n.maxOpacity||.8,h=n.minOpacity||0,f=3,d=t.length;f<d;f+=4)c=4*t[f],t[f]/256>l&&(t[f]=256*l),t[f]/256<h&&(t[f]=256*h),c&&c>=s&&c<=u?(t[f-3]=e[c],t[f-2]=e[c+1],t[f-1]=e[c+2]):t[f]=0}function oy(t){return t.max||100}function ay(t,e,n){var r=oy(n),i=function(t){var e=t/2,n=t+e,r=1e4,i=Uv(2*n,2*n),o=i.getContext("2d");return o.shadowBlur=e,o.shadowColor="black",o.shadowOffsetX=o.shadowOffsetY=r,o.beginPath(),o.arc(n-r,n-r,t,0,2*Math.PI,!0),o.closePath(),o.fill(),i}(n._size||n.size||13),o=i.width/2,a=i.height/2,s=e,u={};for(var c in s.forEach((function(t){var e=void 0===t.count?1:t.count,n=Math.min(1,e/r).toFixed(2);u[n]=u[n]||[],u[n].push(t)})),u)if(!isNaN(c)){var l=u[c];t.beginPath(),n.withoutAlpha||(t.globalAlpha=c),l.forEach((function(e){var n=e.coordinate,s=void 0===e.count?1:e.count;t.globalAlpha=s/r,t.drawImage(i,n[0]-o,n[1]-a)}))}}var sy={draw:function(t,e,n){if(!(t.canvas.width<=0||t.canvas.height<=0)){var r=n.strength||.3;t.strokeStyle="rgba(0,0,0,"+r+")";var i=Uv(t.canvas.width,t.canvas.height),o=i.getContext("2d");o.scale(devicePixelRatio,devicePixelRatio),n=n||{},t.save();var a=new ry({gradient:n.gradient});if(ay(o,e,n),!n.absolute){var s=o.getImageData(0,0,t.canvas.width,t.canvas.height);iy(s.data,a.getImageData(),n),t.putImageData(s,0,0),t.restore()}a=null,i=null}},drawGray:ay,colorize:iy};const uy={altitude:0,interactive:!1,min:0,max:100,size:13,gradient:{.25:"rgb(0,0,255)",.55:"rgb(0,255,0)",.85:"yellow",1:"rgb(255,0,0)"},gridScale:.5};var cy=class extends Sm{constructor(t,e,n,r){Array.isArray(t)||(t=[t]);let i=1/0,o=1/0,a=-1/0,s=-1/0;const u=[];for(let e=0,n=t.length;e<n;e++){const{coordinate:n,lnglat:c,xy:l}=t[e],h=n||c||l;if(!h){console.warn("not find coordinate");continue}const f=r.coordinateToVector3(h);u.push(f);const{x:d,y:p}=f;i=Math.min(i,d),o=Math.min(o,p),a=Math.max(a,d),s=Math.max(s,p)}e=Pp.Util.extend({},uy,e,{layer:r,points:t});let{gridScale:c,altitude:l}=e;const h=Math.abs(a-i),f=Math.abs(s-o),d=Math.max(h*c,f*c);d>2048&&(console.warn(`gridScale: ${c} it's too big. I hope it's a smaller value,canvas max size is 2048* 2048`),c=2048/(d/c));const p=Math.ceil(h*c),m=Math.ceil(f*c),g=p/h,v=m/f,y=[];for(let e=0,n=u.length;e<n;e++){const n=u[e];n.x-=i,n.y-=o,n.x*=g,n.y*=v,n.y=m-n.y,y.push({coordinate:[n.x,n.y],count:t[e].count})}let _=Uv(p,m),x=_.getContext("2d");sy.drawGray(x,y,e);const b=x.getImageData(0,0,x.canvas.width,x.canvas.height);let w=-1/0;const M=new Float32Array(b.data.length/4),S=new Float32Array(b.data.length/4);for(let t=3,e=b.data.length,n=0;t<e;t+=4){const e=b.data[t];w=Math.max(w,e),S[n]=e,e<=0&&(M[n]=1),n++}const T=new ry({gradient:e.gradient});sy.colorize(b.data,T.getImageData(),e),_=null,x=null;const E=Yv(h,f,p-1,m-1),A=E.getIndex().array,C=E.attributes.position.array,P=new Float32Array(C.length),L=new Uint32Array(6*C.length),O=new Oi;let R=0;for(let t=0,e=C.length,n=0,r=A.length,i=0,o=b.data.length,a=0;t<Math.max(e,r,o);t+=3){if(t<e){const e=S[a];e>0&&(C[t+2]=e/w)}if(n<r){const t=A[n],e=A[n+1],r=A[n+2];M[t]&&M[e]&&M[r]||(L[R]=t,L[R+1]=e,L[R+2]=r,R+=3)}if(i<o){const t=`rgb(${b.data[i]},${b.data[i+1]},${b.data[i+2]})`;O.setStyle(t),P[n]=O.r,P[n+1]=O.g,P[n+2]=O.b}n+=3,i+=4,a++}const k=new Uint32Array(R);for(let t=0;t<R;t++)k[t]=L[t];E.setIndex(new Di(k,1)),fm(E,"color",new Di(P,3,!0)),n.vertexColors=dm(),super(),this._initOptions(e),this._createMesh(E,n);const I=r.distanceToVector3(l,l).x;this.getObject3d().position.copy(new or((i+a)/2,(o+s)/2,I)),this.type="HeatMap"}};const ly=new Oi;let hy=1;var fy=class{constructor(t){this.object3ds=[],this.layer=t,this.camera=t.getCamera(),this.renderer=t.getThreeRenderer(),this.pickingTexture=new nr(1,1),this.pickingScene=new eu}getColor(){return ly.setHex(hy),hy++,ly}add(t){if(t){const e=t._colorIndex;e&&(this.object3ds[e]=t,this.pickingScene.add(t))}return this}remove(t){if(t){const e=t._colorIndex;e&&(this.object3ds[e]=null,this.pickingScene.remove(t))}return this}isEmpty(){if(0===this.pickingScene.children.length)return!0;for(let t=0,e=this.pickingScene.children.length;t<e;t++){const e=this.pickingScene.children[t];if(e){const t=e.__parent;if(t&&!0===t.getOptions().interactive)return!1}}return!0}pick(t){if(!t)return;if(this.isEmpty())return;const{camera:e,renderer:n,pickingTexture:r,pickingScene:i,object3ds:o,layer:a}=this,s=this.pickingScene.children.length;for(let t=0;t<s;t++){const e=this.pickingScene.children[t];e&&e.__parent&&(e.__parent.picked=!1)}const{width:u,height:c}=a._getRenderer().canvas,l=r.width,h=r.height;u===l&&c===h||r.setSize(u,c),n.setRenderTarget(r),n.clear(),n.render(i,e);const f=new Uint8Array(4),{x:d,y:p}=t,m=window.devicePixelRatio,g=d*m,v=r.height-p*m;n.readRenderTargetPixels(r,Math.round(g),Math.round(v),1,1,f);const y=f[0]<<16|f[1]<<8|f[2],_=o[y];if(_)_.__parent&&(o[y].__parent.picked=!0);else for(let t=0;t<s;t++){const e=this.pickingScene.children[t];if(e&&e.__parent){const t=e.__parent;if(t._colorMap&&null!=t._colorMap[y]){t.picked=!0,t.index=t._colorMap[y];break}}}n.setRenderTarget(null)}};const dy={bottomHeight:0,altitude:0};var py=class extends Sm{constructor(t,e,n,r){e=Pp.Util.extend({},dy,e,{layer:r,lineString:t}),super(),this._initOptions(e);const{lineStrings:i,center:o}=Ng(t),a=[],s={};for(let t=0,n=i.length;t<n;t++){const n=Dg(i[t],r,o).positionsV;Wm(n,e.bottomHeight,r,s),Fg(a,n)}const u=new _m;u.setPositions(a),this._setMaterialRes(r,n),this._createLine2(u,n);const{altitude:c}=e,l=r.distanceToVector3(c,c).x,h=r.coordinateToVector3(o,l);this.getObject3d().position.copy(h),this._setPickObject3d(a,n.linewidth),this._init(),this.type="FatLine"}_init(){const t=this.getLayer().getPick();this.on("add",()=>{t.add(this.pickObject3d)}),this.on("remove",()=>{t.remove(this.pickObject3d)})}_setMaterialRes(t,e){const n=t.getMap().getSize(),r=n.width,i=n.height;e.resolution.set(r,i)}_setPickObject3d(t,e){const n=new _m;n.setPositions(t);const r=this.getLayer().getPick().getColor(),i=[];for(let e=0,n=t.length/3;e<n;e++)i.push(r.r,r.g,r.b);n.setColors(i);const o=new vm({color:"#fff",linewidth:e,vertexColors:dm()});this._setMaterialRes(this.getLayer(),o);const a=r.getHex(),s=new xm(n,o);s.position.copy(this.getObject3d().position),s._colorIndex=a,this.setPickObject3d(s)}identify(t){return this.picked}setSymbol(t){if(t&&t instanceof Si){t.needsUpdate=!0;const e=this.getMap().getSize(),n=e.width,r=e.height;t.resolution.set(n,r),this.getObject3d().material=t}return this}};const my={altitude:0,colors:null};class gy extends(cv(Sm)){constructor(t,e,n,r){Array.isArray(t)||(t=[t]);const i=[],o=[],a=t.length;for(let e=0;e<a;e++){const n=Ng(t[e]);i.push(n.center),o.push(n.lineStrings)}const s=Um(i);e=Pp.Util.extend({},my,e,{layer:r,lineStrings:t,coordinate:s});const u=[],c={};let l=0,h=[],f=[],d=0,p=[];for(let t=0;t<a;t++){const e=o[t];let n=0;for(let t=0,i=e.length;t<i;t++){const i=Pg(e[t])?e[t].properties:e[t].getProperties()||{},{positionsV:o}=Dg(e[t],r,s);Wm(o,i.bottomHeight,r,c),n+=2*o.length-2,Fg(p,o)}const i=n;h[t]=[l,l+i],l+=i,f[t]={position:{count:n,start:d,end:d+3*n},instanceStart:{count:n,start:d,end:d+3*n},instanceEnd:{count:n,start:d,end:d+3*n},hide:!1},d+=3*n}super(),this._initOptions(e);const m=new _m;m.setPositions(p),this._setMaterialRes(r,n),this._createLine2(m,n);const{altitude:g}=e,v=r.distanceToVector3(g,g).x,y=r.coordinateToVector3(s,v);this.getObject3d().position.copy(y),this._faceMap=h,this._baseObjects=u,this._datas=t,this._geometriesAttributes=f,this.faceIndex=null,this.index=null,this._geometryCache=new _m,this._geometryCache.setPositions(p),this._colorMap={},this.isHide=!1,this._initBaseObjectsEvent(u),this._setPickObject3d(p,n.linewidth),this._init(),this.type="FatLines"}_setMaterialRes(t,e){const n=t.getMap().getSize(),r=n.width,i=n.height;e.resolution.set(r,i)}_setPickObject3d(t,e){const n=this._geometryCache||new _m;n.setPositions(t);const r=this.getLayer().getPick(),{_geometriesAttributes:i}=this,o=Vm(i);let a=0;for(let t=0,e=i.length;t<e;t++){const e=r.getColor(),n=e.getHex();this._colorMap[n]=t;const{count:s}=i[t].position;this._datas[t].colorIndex=n;for(let t=0;t<s;t++)o[a]=e.r,o[a+1]=e.g,o[a+2]=e.b,a+=3}n.setColors(o);const s=new vm({color:"#fff",linewidth:e,vertexColors:dm()});this._setMaterialRes(this.getLayer(),s);const u=r.getColor().getHex(),c=new xm(n,s);c.position.copy(this.getObject3d().position),c._colorIndex=u,this.setPickObject3d(c)}identify(t){return this.picked}setSymbol(t){if(t&&t instanceof Si){t.needsUpdate=!0;const e=this.getMap().getSize(),n=e.width,r=e.height;t.resolution.set(n,r),this.getObject3d().material=t}return this}getSelectMesh(){const t=this._getIndex();if(null!=t){if(!this._baseObjects[t]){const e=this._datas[t],n=Pp.Util.extend({},this.getOptions(),{index:t},Pg(e)?e.properties:e.getProperties());this._baseObjects[t]=new py(e,n,this.getObject3d().material,this.getLayer()),this._proxyEvent(this._baseObjects[t])}return{data:this._datas[t],baseObject:this._baseObjects[t]}}}_updateAttribute(t,e){const{indexs:n}=this._getHideGeometryIndex(e),r=this._geometryCache.attributes[e].array,i=r.length;for(let e=0;e<i;e++)t.array[e]=r[e];for(let r=0;r<n.length;r++){const i=n[r],{start:o,end:a}=this._geometriesAttributes[i][e];for(let e=o;e<a;e++)t.array[e]=-1e5}return this}_showGeometry(t,e){let n;if(t&&(n=t.getOptions().index),null!=n){const t=this._geometriesAttributes[n],{hide:r}=t;if(r===e)return this;t.hide=e;const i=this.getObject3d().geometry;this._updateAttribute(i.attributes.instanceStart,"instanceStart"),this._updateAttribute(i.attributes.instanceEnd,"instanceEnd"),i.attributes.instanceStart.data.needsUpdate=!0,i.attributes.instanceEnd.data.needsUpdate=!0,this.isHide=e}return this}}var vy=gy;const yy={radius:10,height:100,altitude:0,topColor:"",bottomColor:"#2d2f61"};var _y=class extends Sm{constructor(t,e,n,r){e=Pp.Util.extend({},yy,e,{layer:r,coordinate:t}),super(),this._initOptions(e);const{height:i,radius:o,topColor:a,bottomColor:s,altitude:u}=e,c=r.distanceToVector3(i,i).x,l=r.distanceToVector3(o,o).x,h=Fm().clone();h.scale(2*l,2*l,c),a&&(zm(h,s,a,"z",c/2),n.vertexColors=dm()),this._createMesh(h,n);const f=r.distanceToVector3(u,u).x,d=r.coordinateToVector3(t,f);this.getObject3d().position.copy(d),this.type="Box"}};const xy={radius:10,height:100,altitude:0,topColor:null,bottomColor:"#2d2f61"};class by extends(cv(Sm)){constructor(t,e,n,r){Array.isArray(t)||(t=[t]);const i=t.length,o=Um(t),a=r.coordinateToVector3(o),s=[],u=[],c=[],l=[];let h=0,f=0,d=0,p=0;const m={};for(let e=0;e<i;e++){const i=Pp.Util.extend({index:e},xy,t[e]),{radius:o,altitude:g,topColor:v,bottomColor:y,height:_,coordinate:x}=i,b=Gm(o,r,m),w=Gm(_,r,m),M=Gm(g,r,m),S=Fm().clone();S.scale(2*b,2*b,w),v&&(zm(S,y,v,"z",w/2),n.vertexColors=dm());const T=r.coordinateToVector3(x).sub(a),E=S.attributes.position.array;for(let t=0,e=E.length;t<e;t+=3)E[t+2]+=M,E[t]+=T.x,E[t+1]+=T.y,E[t+2]+=T.z;s.push(S);const A=new _y(x,i,n,r);u.push(A);const C=S.index.count/3;l[e]=[h+1,h+C],h+=C;const P=S.attributes.position.count,L=S.attributes.normal.count,O=S.attributes.uv.count;c[e]={position:{count:P,start:f,end:f+3*P},normal:{count:L,start:d,end:d+3*L},uv:{count:O,start:p,end:p+2*O},hide:!1},f+=3*P,d+=3*L,p+=2*O}super(),e=Pp.Util.extend({},{altitude:0,layer:r,points:t},e),this._initOptions(e);const g=Nm(s);this._createMesh(g,n);const v=e.altitude,y=r.distanceToVector3(v,v).x,_=a.clone();_.z=y,this.getObject3d().position.copy(_),this._faceMap=l,this._baseObjects=u,this._datas=t,this._geometriesAttributes=c,this.faceIndex=null,this._geometryCache=g.clone(),this.isHide=!1,this._colorMap={},this._initBaseObjectsEvent(u),this._setPickObject3d(),this._init(),this.type="Boxs"}identify(t){return this.picked}}var wy=by;const My=Math.PI/180,Sy=[[4e3,220],[2e3,100],[1e3,30],[500,15],[100,5],[50,2],[10,1],[5,.7],[2,.1],[1,.05],[.5,.02]],Ty=["mousemove","click","mousedown","mouseup","dblclick","contextmenu","touchstart","touchmove","touchend"],Ey=new Pp.Coordinate(0,0),Ay=new Pp.Point(0,0);class Cy extends Pp.CanvasLayer{constructor(t,e){super(t,e),this._animationBaseObjectMap={},this._needsUpdate=!0,this._mousemoveTimeOut=0,this._baseObjects=[],this._delayMeshes=[],this.type="ThreeLayer"}isRendering(){const t=this.getMap();return!!t&&(t.isInteracting()||t.isAnimating())}prepareToDraw(...t){}draw(){this.renderScene()}drawOnInteracting(){this.renderScene()}coordinateToVector3(t,e=0){const n=this.getMap();if(!n)return null;const r=Array.isArray(t);r&&(Ey.x=t[0],Ey.y=t[1]),r||t instanceof Pp.Coordinate||(t=new Pp.Coordinate(t));const i=Ly(n),o=Oy(n,r?Ey:t,i,Ay);return new or(o.x,o.y,e)}distanceToVector3(t,e,n){if(0===t&&0===e||!Pp.Util.isNumber(t)||!Pp.Util.isNumber(e))return new or(0,0,0);const r=this.getMap(),i=Ly(r);let o=n||r.getCenter();o instanceof Pp.Coordinate||(o=new Pp.Coordinate(o));const a=r.locate(o,t,e),s=Oy(r,o,i),u=Oy(r,a,i),c=Math.abs(u.x-s.x)*Pp.Util.sign(t),l=Math.abs(u.y-s.y)*Pp.Util.sign(e);return new or(c,l,0)}toShape(t){if(!t)return null;if(t instanceof Pp.MultiPolygon)return t.getGeometries().map(t=>this.toShape(t));const e=t.getCenter(),n=this.coordinateToVector3(e),r=t.getShell().map(t=>{const e=this.coordinateToVector3(t).sub(n);return new Yn(e.x,e.y)}),i=new dh(r),o=t.getHoles();return o&&o.length>0&&(i.holes=o.map(t=>{const e=t.map(t=>{const e=this.coordinateToVector3(t).sub(n);return new Yn(e.x,e.y)});return new dh(e)})),i}toExtrudeMesh(t,e,n,r){if(!t)return null;if(t instanceof Pp.MultiPolygon)return t.getGeometries().map(t=>this.toExtrudeMesh(t,e,n,r));const i=t.getCoordinates();i.forEach(t=>{for(let e=t.length-1;e>=1;e--)t[e].equals(t[e-1])&&t.splice(e,1)}),t.setCoordinates(i);const o=this.toShape(t),a=this.coordinateToVector3(t.getCenter());r=Pp.Util.isNumber(r)?r:e,r=this.distanceToVector3(r,r).x;const s=this.distanceToVector3(e,e).x,u={bevelEnabled:!1,bevelSize:1};u[parseInt(h)>=93?"depth":"amount"]=r;const c=new Vc(o,u);let l=c;no.prototype.fromGeometry&&(l=new no,l.fromGeometry(c));const f=new bo(l,n);return f.position.set(a.x,a.y,s-r),f}toExtrudePolygon(t,e,n){return new $g(t,e,n,this)}toBar(t,e,n){return new Hm(t,e,n,this)}toLine(t,e,n){return new Hg(t,e,n,this)}toExtrudeLine(t,e,n){return new Jg(t,e,n,this)}toModel(t,e){return new Kg(t,e,this)}toExtrudeLineTrail(t,e,n){return new av(t,e,n,this)}toExtrudePolygons(t,e,n){return new gv(t,e,n,this)}toPoint(t,e,n){return new xv(t,e,n,this)}toPoints(t,e,n){return new Cv(t,e,n,this)}toBars(t,e,n){return new Ov(t,e,n,this)}toExtrudeLines(t,e,n){return new Iv(t,e,n,this)}toLines(t,e,n){return new zv(t,e,n,this)}toThreeVectorTileLayer(t,e,n){return new qv(t,e,n,this)}toTerrain(t,e,n){return new Kv(t,e,n,this)}toTerrainVectorTileLayer(t,e,n){return new ey(t,e,n,this)}toHeatMap(t,e,n){return new cy(t,e,n,this)}toFatLine(t,e,n){return new py(t,e,n,this)}toFatLines(t,e,n){return new vy(t,e,n,this)}toBox(t,e,n){return new _y(t,e,n,this)}toBoxs(t,e,n){return new wy(t,e,n,this)}getBaseObjects(){return this.getMeshes().filter(t=>t instanceof Sm)}getMeshes(){const t=this.getScene();if(!t)return[];const e=[];for(let n=0,r=t.children.length;n<r;n++){const r=t.children[n];r instanceof si&&!(r instanceof Co)&&e.push(r.__parent||r)}return e}clear(){return this.clearMesh()}clearMesh(){const t=this.getScene();if(!t)return this;for(let e=t.children.length-1;e>=0;e--){const n=t.children[e];if(n instanceof si&&!(n instanceof Co)){t.remove(n);const e=n.__parent;e&&e instanceof Sm&&(e.isAdd=!1,e._fire("remove",{target:e}),delete this._animationBaseObjectMap[n.uuid])}}return this}lookAt(t){const e=this._getRenderer();return e&&e.context.lookAt(t),this}getCamera(){const t=this._getRenderer();return t?t.camera:null}getScene(){const t=this._getRenderer();return t?t.scene:null}renderScene(){const t=this._getRenderer();return t&&(t.clearCanvas(),t.renderScene()),this}loop(t=!1){const e=this._delayMeshes;if(!e.length)return;const n=this.getMap();if(!n||n.isAnimating()||n.isInteracting())return;const r=this.options.loopRenderCount||50,i=e.slice(0,r);i&&this.addMesh(i,t),e.splice(0,r)}renderPickScene(){const t=this._getRenderer();if(t){const e=t.pick;e&&e.pick(this._containerPoint)}return this}getThreeRenderer(){const t=this._getRenderer();return t?t.context:null}getPick(){const t=this._getRenderer();return t?t.pick:null}delayAddMesh(t){if(!t)return this;Array.isArray(t)||(t=[t]);for(let e=0,n=t.length;e<n;e++)this._delayMeshes.push(t[e]);return this}addMesh(t,e=!0){if(!t)return this;Array.isArray(t)||(t=[t]);const n=this.getScene();return t.forEach(t=>{t instanceof Sm?(n.add(t.getObject3d()),t.isAdd||(t.isAdd=!0,t._fire("add",{target:t})),t._animation&&Pp.Util.isFunction(t._animation)&&(this._animationBaseObjectMap[t.getObject3d().uuid]=t)):t instanceof si&&n.add(t)}),this._zoomend(),e&&this.renderScene(),this}removeMesh(t,e=!0){if(!t)return this;Array.isArray(t)||(t=[t]);const n=this.getScene();return t.forEach(t=>{if(t instanceof Sm){n.remove(t.getObject3d()),t.isAdd&&(t.isAdd=!1,t._fire("remove",{target:t})),t._animation&&Pp.Util.isFunction(t._animation)&&delete this._animationBaseObjectMap[t.getObject3d().uuid];const e=this._delayMeshes;if(e.length)for(let n=0,r=e.length;n<r;n++)if(e[n]===t){e.splice(n,1);break}}else t instanceof si&&n.remove(t)}),e&&this.renderScene(),this}_initRaycaster(){return this._raycaster||(this._raycaster=new jf,this._mouse=new Yn),this}identify(t,e){if(!t)return console.error("coordinate is null,it should be Coordinate"),[];if(Array.isArray(t)&&(t=new Pp.Coordinate(t)),!(t instanceof Pp.Coordinate))return console.error("coordinate type is error,it should be Coordinate"),[];const n=this.getMap().coordToContainerPoint(t);this._containerPoint=n;const{x:r,y:i}=n;this._initRaycaster();const o=this._raycaster,a=this._mouse,s=this.getCamera(),u=this.getScene(),c=this.getMap().getSize();if(!u)return[];const l=c.width,h=c.height;a.x=r/l*2-1,a.y=-i/h*2+1,o.setFromCamera(a,s),function(t,e){hm>113?t.params.Line.threshold=e:t.linePrecision=e}(o,this._getLinePrecision(this.getMap().getResolution()));const f=[],d=[];u.children.forEach(t=>{const e=t.__parent;if(e&&e.getOptions){const n=e;n.getOptions().interactive&&n.isVisible()&&(n.identify&&Pp.Util.isFunction(n.identify)?d.push(n):f.push(t))}else(t instanceof bo||t instanceof qs)&&f.push(t)});let p=[];const m=o.intersectObjects(f,!0);m&&Array.isArray(m)&&m.length&&(p=m.map(t=>{let e=t.object;e=this._recursionMesh(e)||{};const n=e.__parent||e;return n.faceIndex=t.faceIndex,n.index=t.index,n})),this.renderPickScene(),d.length&&d.forEach(e=>{e.identify(t)&&p.push(e)});const g=p.length;for(let t=0;t<g;t++)if(p[t])for(let e=t+1;e<g;e++)p[t]===p[e]&&p.splice(e,1);const v=(e=Pp.Util.extend({},e)).count;return Pp.Util.isNumber(v)&&v>0?p.slice(0,v):p}_recursionMesh(t){for(;t&&t.parent!==this.getScene();)t=t.parent;return t}_getLinePrecision(t=10){for(let e=0,n=Sy.length;e<n;e++){const[n,r]=Sy[e];if(t>n)return r}return.01}_identifyBaseObjectEvents(t){if(!this.options.geometryEvents)return this;const e=this.map||this.getMap();if(e.isInteracting()||!e.options.geometryEvents)return this;const{type:n,coordinate:r}=t,i=Pp.Util.now();if(this._mousemoveTimeOut&&"mousemove"===n&&i-this._mousemoveTimeOut<64)return this;this._mousemoveTimeOut=i,e.resetCursor("default");const o=this.options.identifyCountOnEvent;let a=Math.max(0,Pp.Util.isNumber(o)?o:0);0===a&&(a=1/0);const s=this.identify(r,{count:a}),u=this.getScene();if(0===s.length&&u)for(let e=0,n=u.children.length;e<n;e++){const n=(u.children[e]||{}).__parent;n&&n.fire("empty",Object.assign({},t,{target:n}))}if("mousemove"===n){s.length&&e.setCursor("pointer");const i=[];this._baseObjects&&this._baseObjects.forEach(t=>{let e=!0;s.forEach(n=>{t===n&&(e=!1)}),e&&i.push(t)}),i.forEach(e=>{e&&e instanceof Sm&&(e.getSelectMesh?e.isHide||(e._mouseover=!1,e.fire("mouseout",Object.assign({},t,{target:e,type:"mouseout",selectMesh:null})),e.closeToolTip()):(e._mouseover=!1,e.fire("mouseout",Object.assign({},t,{target:e,type:"mouseout"})),e.closeToolTip()))}),s.forEach(e=>{if(e instanceof Sm){e._mouseover||(e.fire("mouseover",Object.assign({},t,{target:e,type:"mouseover",selectMesh:e.getSelectMesh?e.getSelectMesh():null})),e._mouseover=!0),e.fire(n,Object.assign({},t,{target:e,selectMesh:e.getSelectMesh?e.getSelectMesh():null}));const i=e.getToolTip();i&&!i._owner&&i.addTo(e),e.openToolTip(r)}}),this._baseObjects=s}else s.forEach(e=>{if(e instanceof Sm&&(e.fire(n,Object.assign({},t,{target:e,selectMesh:e.getSelectMesh?e.getSelectMesh():null})),"click"===n)){const t=e.getInfoWindow();t&&!t._owner&&t.addTo(e),e.openInfoWindow(r)}});return this}_zoomend(){const t=this.getScene();if(!t)return;const e=this.getMap().getZoom();t.children.forEach(t=>{const n=t.__parent;if(n&&n.getOptions){const t=n;t.zoomChange&&Pp.Util.isFunction(t.zoomChange)&&t.zoomChange(e);const r=t.getMinZoom(),i=t.getMaxZoom();e<r||e>i?(t.isVisible()&&(t.getObject3d().visible=!1),t._zoomVisible=!1):r<=e&&e<=i&&(t._visible&&(t.getObject3d().visible=!0),t._zoomVisible=!0)}})}onAdd(){super.onAdd();const t=this.map||this.getMap();return t?(Ty.forEach(e=>{t.on(e,this._identifyBaseObjectEvents,this)}),this._needsUpdate=!0,this._animationBaseObjectMap||(this._animationBaseObjectMap={}),t.on("zooming zoomend",this._zoomend,this),this):this}onRemove(){super.onRemove();const t=this.map||this.getMap();return t?(Ty.forEach(e=>{t.off(e,this._identifyBaseObjectEvents,this)}),t.off("zooming zoomend",this._zoomend,this),this):this}_callbackBaseObjectAnimation(){const t=this;if(t._animationBaseObjectMap)for(const e in t._animationBaseObjectMap)t._animationBaseObjectMap[e]._animation();return this}_getFovRatio(){const t=this.getMap().getFov();return Math.tan(t/2*My)}}Cy.mergeOptions({renderer:"gl",doubleBuffer:!1,glOptions:null,geometryEvents:!0,identifyCountOnEvent:0,forceRenderOnZooming:!0,loopRenderCount:50});class Py extends Pp.renderer.CanvasLayerRenderer{constructor(){super(...arguments),this._renderTime=0}getPrepareParams(){return[this.scene,this.camera]}getDrawParams(){return[this.scene,this.camera]}_drawLayer(){super._drawLayer.apply(this,arguments)}hitDetect(){return!1}createCanvas(){super.createCanvas(),this.createContext()}createContext(){if(this.canvas.gl&&this.canvas.gl.wrap)this.gl=this.canvas.gl.wrap();else{const t=this.layer.options.glOptions||{alpha:!0,depth:!0,antialias:!0,stencil:!0,preserveDrawingBuffer:!1};t.preserveDrawingBuffer=!0,this.gl=this.gl||this._createGLContext(this.canvas,t)}this._initThreeRenderer(),this.layer.onCanvasCreate(this.context,this.scene,this.camera)}_initThreeRenderer(){this.matrix4=new jr;const t=new $s({context:this.gl,alpha:!0});t.autoClear=!1,t.setClearColor(new Oi(1,1,1),0),t.setSize(this.canvas.width,this.canvas.height),t.clear(),this.context=t;const e=this.scene=new eu,n=this.layer.getMap(),r=n.getFov()*Math.PI/180,i=this.camera=new Po(r,n.width/n.height,n.cameraNear,n.cameraFar);i.matrixAutoUpdate=!1,this._syncCamera(),e.add(i),this.pick=new fy(this.layer)}onCanvasCreate(){super.onCanvasCreate()}resizeCanvas(t){if(!this.canvas)return;let e,n=this.getMap();e=t||n.getSize();const r=n.getDevicePixelRatio?n.getDevicePixelRatio():Pp.Browser.retina?2:1,i=this.canvas;i.height=r*e.height,i.width=r*e.width,this.layer._canvas&&i.style&&(i.style.width=e.width+"px",i.style.height=e.height+"px"),this.context.setSize(i.width,i.height)}clearCanvas(){this.canvas&&this.context.clear()}prepareCanvas(){return this.canvas?this.clearCanvas():this.createCanvas(),this.layer.fire("renderstart",{context:this.context}),null}renderScene(){const t=Pp.Util.now();t-this._renderTime>=16&&(this.layer._callbackBaseObjectAnimation(),this._renderTime=t),this._syncCamera(),this.context.render(this.scene,this.camera),this.completeRender()}remove(){delete this._drawContext,super.remove()}_syncCamera(){const t=this.getMap(),e=this.camera;e.matrix.elements=t.cameraWorldMatrix,e.projectionMatrix.elements=t.projMatrix,this.matrix4.invert?e.projectionMatrixInverse.elements=this.matrix4.copy(e.projectionMatrix).invert().elements:e.projectionMatrixInverse.elements=this.matrix4.getInverse(e.projectionMatrix).elements}_createGLContext(t,e){const n=["webgl2","webgl","experimental-webgl"];let r=null;for(let i=0;i<n.length;++i){try{r=t.getContext(n[i],e)}catch(t){}if(r)break}return r}}function Ly(t){return t.getGLRes?t.getGLRes():t.getGLZoom()}function Oy(t,e,n,r){return t.coordToPointAtRes?t.coordToPointAtRes(e,n,r):t.coordinateToPoint(e,n,r)}Cy.registerRenderer("gl",Py),Pp.registerWorkerAdapter&&Pp.registerWorkerAdapter("__maptalks.three__",'function(e){"use strict";var d=n,t=n;function n(e,t,n){n=n||2;var r,i,o,a,v,h=t&&t.length,l=h?t[0]*n:e.length,u=p(e,0,l,n,!0),x=[];if(!u||u.next===u.prev)return x;if(h&&(u=function(e,t,n,r){var i,o,a,v,h=[];for(i=0,o=t.length;i<o;i++)a=t[i]*r,v=i<o-1?t[i+1]*r:e.length,(v=p(e,a,v,r,!1))===v.next&&(v.steiner=!0),h.push(function(e){var t=e,n=e;for(;(t.x<n.x||t.x===n.x&&t.y<n.y)&&(n=t),t=t.next,t!==e;);return n}(v));for(h.sort(m),i=0;i<h.length;i++)!function(e,t){(t=function(e,t){var n,r=t,i=e.x,o=e.y,a=-1/0;do{if(o<=r.y&&o>=r.next.y&&r.next.y!==r.y){var v=r.x+(o-r.y)*(r.next.x-r.x)/(r.next.y-r.y);if(v<=i&&a<v){if((a=v)===i){if(o===r.y)return r;if(o===r.next.y)return r.next}n=r.x<r.next.x?r:r.next}}}while(r=r.next,r!==t);if(!n)return null;if(i===a)return n;var h,l=n,u=n.x,x=n.y,f=1/0;r=n;for(;i>=r.x&&r.x>=u&&i!==r.x&&M(o<x?i:a,o,u,x,o<x?a:i,o,r.x,r.y)&&(h=Math.abs(o-r.y)/(i-r.x),Z(r,e)&&(h<f||h===f&&(r.x>n.x||r.x===n.x&&function(e,t){return w(e.prev,e,t.prev)<0&&w(t.next,e,e.next)<0}(n,r)))&&(n=r,f=h)),r=r.next,r!==l;);return n}(e,t))&&(e=S(t,e),g(t,t.next),g(e,e.next))}(h[i],n),n=g(n,n.next);return n}(e,t,u,n)),e.length>80*n){for(var f=r=e[0],s=i=e[1],c=n;c<l;c+=n)(o=e[c])<f&&(f=o),(a=e[c+1])<s&&(s=a),r<o&&(r=o),i<a&&(i=a);v=0!==(v=Math.max(r-f,i-s))?1/v:0}return y(u,x,n,f,s,v),x}function p(e,t,n,r,i){var o,a;if(i===0<z(e,t,n,r))for(o=t;o<n;o+=r)a=v(o,e[o],e[o+1],a);else for(o=n-r;t<=o;o-=r)a=v(o,e[o],e[o+1],a);return a&&u(a,a.next)&&(f(a),a=a.next),a}function g(e,t){if(!e)return e;t=t||e;var n,r=e;do{if(n=!1,r.steiner||!u(r,r.next)&&0!==w(r.prev,r,r.next))r=r.next;else{if(f(r),(r=t=r.prev)===r.next)break;n=!0}}while(n||r!==t);return t}function y(e,t,n,r,i,o,a){if(e){!a&&o&&function(e,t,n,r){for(var i=e;null===i.z&&(i.z=b(i.x,i.y,t,n,r)),i.prevZ=i.prev,i.nextZ=i.next,i=i.next,i!==e;);i.prevZ.nextZ=null,i.prevZ=null,function(e){var t,n,r,i,o,a,v,h,l=1;do{for(n=e,o=e=null,a=0;n;){for(a++,r=n,t=v=0;t<l&&(v++,r=r.nextZ);t++);for(h=l;0<v||0<h&&r;)0!==v&&(0===h||!r||n.z<=r.z)?(n=(i=n).nextZ,v--):(r=(i=r).nextZ,h--),o?o.nextZ=i:e=i,i.prevZ=o,o=i;n=r}}while(o.nextZ=null,l*=2,1<a)}(i)}(e,r,i,o);for(var v,h,l=e;e.prev!==e.next;)if(v=e.prev,h=e.next,o?function(e,t,n,r){var i=e.prev,o=e,a=e.next;if(0<=w(i,o,a))return!1;var v=(i.x<o.x?i.x<a.x?i:a:o.x<a.x?o:a).x,h=(i.y<o.y?i.y<a.y?i:a:o.y<a.y?o:a).y,l=(i.x>o.x?i.x>a.x?i:a:o.x>a.x?o:a).x,u=(i.y>o.y?i.y>a.y?i:a:o.y>a.y?o:a).y,x=b(v,h,t,n,r),f=b(l,u,t,n,r),s=e.prevZ,c=e.nextZ;for(;s&&s.z>=x&&c&&c.z<=f;){if(s!==e.prev&&s!==e.next&&M(i.x,i.y,o.x,o.y,a.x,a.y,s.x,s.y)&&0<=w(s.prev,s,s.next))return!1;if(s=s.prevZ,c!==e.prev&&c!==e.next&&M(i.x,i.y,o.x,o.y,a.x,a.y,c.x,c.y)&&0<=w(c.prev,c,c.next))return!1;c=c.nextZ}for(;s&&s.z>=x;){if(s!==e.prev&&s!==e.next&&M(i.x,i.y,o.x,o.y,a.x,a.y,s.x,s.y)&&0<=w(s.prev,s,s.next))return!1;s=s.prevZ}for(;c&&c.z<=f;){if(c!==e.prev&&c!==e.next&&M(i.x,i.y,o.x,o.y,a.x,a.y,c.x,c.y)&&0<=w(c.prev,c,c.next))return!1;c=c.nextZ}return!0}(e,r,i,o):function(e){var t=e.prev,n=e,r=e.next;if(0<=w(t,n,r))return!1;var i=e.next.next;for(;i!==e.prev;){if(M(t.x,t.y,n.x,n.y,r.x,r.y,i.x,i.y)&&0<=w(i.prev,i,i.next))return!1;i=i.next}return!0}(e))t.push(v.i/n),t.push(e.i/n),t.push(h.i/n),f(e),e=h.next,l=h.next;else if((e=h)===l){a?1===a?y(e=function(e,t,n){var r=e;do{var i=r.prev,o=r.next.next}while(!u(i,o)&&x(i,r,r.next,o)&&Z(i,o)&&Z(o,i)&&(t.push(i.i/n),t.push(r.i/n),t.push(o.i/n),f(r),f(r.next),r=e=o),r=r.next,r!==e);return g(r)}(g(e),t,n),t,n,r,i,o,2):2===a&&function(e,t,n,r,i,o){var a=e;do{for(var v=a.next.next;v!==a.prev;){if(a.i!==v.i&&function(e,t){return e.next.i!==t.i&&e.prev.i!==t.i&&!function(e,t){var n=e;do{if(n.i!==e.i&&n.next.i!==e.i&&n.i!==t.i&&n.next.i!==t.i&&x(n,n.next,e,t))return!0}while(n=n.next,n!==e);return!1}(e,t)&&(Z(e,t)&&Z(t,e)&&function(e,t){var n=e,r=!1,i=(e.x+t.x)/2,o=(e.y+t.y)/2;for(;n.y>o!=n.next.y>o&&n.next.y!==n.y&&i<(n.next.x-n.x)*(o-n.y)/(n.next.y-n.y)+n.x&&(r=!r),n=n.next,n!==e;);return r}(e,t)&&(w(e.prev,e,t.prev)||w(e,t.prev,t))||u(e,t)&&0<w(e.prev,e,e.next)&&0<w(t.prev,t,t.next))}(a,v)){var h=S(a,v);return a=g(a,a.next),h=g(h,h.next),y(a,t,n,r,i,o),y(h,t,n,r,i,o)}v=v.next}}while((a=a.next)!==e)}(e,t,n,r,i,o):y(g(e),t,n,r,i,o,1);break}}}function m(e,t){return e.x-t.x}function b(e,t,n,r,i){return(e=1431655765&((e=858993459&((e=252645135&((e=16711935&((e=32767*(e-n)*i)|e<<8))|e<<4))|e<<2))|e<<1))|(t=1431655765&((t=858993459&((t=252645135&((t=16711935&((t=32767*(t-r)*i)|t<<8))|t<<4))|t<<2))|t<<1))<<1}function M(e,t,n,r,i,o,a,v){return 0<=(i-a)*(t-v)-(e-a)*(o-v)&&0<=(e-a)*(r-v)-(n-a)*(t-v)&&0<=(n-a)*(o-v)-(i-a)*(r-v)}function w(e,t,n){return(t.y-e.y)*(n.x-t.x)-(t.x-e.x)*(n.y-t.y)}function u(e,t){return e.x===t.x&&e.y===t.y}function x(e,t,n,r){var i=l(w(e,t,n)),o=l(w(e,t,r)),a=l(w(n,r,e)),v=l(w(n,r,t));return i!==o&&a!==v||(0===i&&h(e,n,t)||(0===o&&h(e,r,t)||(0===a&&h(n,e,r)||!(0!==v||!h(n,t,r)))))}function h(e,t,n){return t.x<=Math.max(e.x,n.x)&&t.x>=Math.min(e.x,n.x)&&t.y<=Math.max(e.y,n.y)&&t.y>=Math.min(e.y,n.y)}function l(e){return 0<e?1:e<0?-1:0}function Z(e,t){return w(e.prev,e,e.next)<0?0<=w(e,t,e.next)&&0<=w(e,e.prev,t):w(e,t,e.prev)<0||w(e,e.next,t)<0}function S(e,t){var n=new a(e.i,e.x,e.y),r=new a(t.i,t.x,t.y),i=e.next,o=t.prev;return(e.next=t).prev=e,(n.next=i).prev=n,(r.next=n).prev=r,(o.next=r).prev=o,r}function v(e,t,n,r){n=new a(e,t,n);return r?(n.next=r.next,(n.prev=r).next.prev=n,r.next=n):(n.prev=n).next=n,n}function f(e){e.next.prev=e.prev,e.prev.next=e.next,e.prevZ&&(e.prevZ.nextZ=e.nextZ),e.nextZ&&(e.nextZ.prevZ=e.prevZ)}function a(e,t,n){this.i=e,this.x=t,this.y=n,this.prev=null,this.next=null,this.z=null,this.prevZ=null,this.nextZ=null,this.steiner=!1}function z(e,t,n,r){for(var i=0,o=t,a=n-r;o<n;o+=r)i+=(e[a]-e[o])*(e[o+1]+e[a+1]),a=o;return i}function r(e,t){var n=e.length-1,r=[e[0]];return function e(t,n,r,i,o){for(var a,v,h,l,u,x,f,s=i,c=n+1;c<r;c++){var p=(v=t[c],h=t[n],l=t[r],p=f=x=u=void 0,u=h[0],x=h[1],f=l[0]-u,p=l[1]-x,0===f&&0===p||(1<(h=((v[0]-u)*f+(v[1]-x)*p)/(f*f+p*p))?(u=l[0],x=l[1]):0<h&&(u+=f*h,x+=p*h)),(f=v[0]-u)*f+(p=v[1]-x)*p);s<p&&(a=c,s=p)}i<s&&(1<a-n&&e(t,n,a,i,o),o.push(t[a]),1<r-a&&e(t,a,r,i,o))}(e,0,n,t,r),r.push(e[n]),r}function A(e,t,n){if(e.length<=2)return e;t=void 0!==t?t*t:1;return e=r(e=n?e:function(e,t){for(var n,r,i,o,a=e[0],v=[a],h=1,l=e.length;h<l;h++)n=e[h],i=a,o=void 0,o=(r=n)[0]-i[0],i=r[1]-i[1],t<o*o+i*i&&(v.push(n),a=n);return a!==n&&v.push(n),v}(e,t),t)}function R(e,t){var n=t[0],r=t[1],t=Math.sqrt(n*n+r*r);return e[0]=n/t,e[1]=r/t,e}function s(e,t,n,r){return e[0]=t[0]+n[0]*r,e[1]=t[1]+n[1]*r,e[2]=t[2]+n[2]*r,e}function F(e,t,n){return e[0]=t[0]-n[0],e[1]=t[1]-n[1],e[2]=t[2]-n[2],e}n.deviation=function(e,t,n,r){var i=t&&t.length,o=i?t[0]*n:e.length,a=Math.abs(z(e,0,o,n));if(i)for(var v=0,h=t.length;v<h;v++){var l=t[v]*n,u=v<h-1?t[v+1]*n:e.length;a-=Math.abs(z(e,l,u,n))}for(var x=0,v=0;v<r.length;v+=3){var f=r[v]*n,s=r[v+1]*n,c=r[v+2]*n;x+=Math.abs((e[f]-e[c])*(e[1+s]-e[1+f])-(e[f]-e[s])*(e[1+c]-e[1+f]))}return 0===a&&0===x?0:Math.abs((x-a)/a)},n.flatten=function(e){for(var t=e[0][0].length,n={vertices:[],holes:[],dimensions:t},r=0,i=0;i<e.length;i++){for(var o=0;o<e[i].length;o++)for(var a=0;a<t;a++)n.vertices.push(e[i][o][a]);0<i&&(r+=e[i-1].length,n.holes.push(r))}return n},d.default=t;var c=[];function ee(e,t,n,r){var i,o,a=(o=n,(i=t)[0]*o[0]+i[1]*o[1]+i[2]*o[2]),v=Math.acos(a)*r;return s(c,n,t,-a),r=(o=i=c)[0],n=o[1],a=o[2],o=Math.sqrt(r*r+n*n+a*a),i[0]=r/o,i[1]=n/o,i[2]=a/o,a=e,o=t,t=Math.cos(v),a[0]=o[0]*t,a[1]=o[1]*t,a[2]=o[2]*t,s(e,e,c,Math.sin(v)),e}function q(e,t,n){if(n-t<3)return 0;for(var r=0,i=2*(n-1),o=2*t;o<2*n;){var a=e[i],v=e[i+1],h=e[o],l=e[o+1],i=o;o+=2,r+=a*l-h*v}return r}var B=[],U=[],L=[];function O(e,t,n,r,i,o,a,v){var h=null!=a,l=i,u=null;h&&(u=new Uint32Array(r-n));for(var x=n;x<r;x++){var f=x===r-1?n:x+1,s=x===n?r-1:x-1,c=e[2*s],p=e[2*s+1],g=e[2*x],d=e[2*x+1],s=e[2*f],f=e[2*f+1];B[0]=g-c,B[1]=d-p,U[0]=s-g,U[1]=f-d,R(B,B),R(U,U),h&&(u[x]=l),v||x!==n?v||x!==r-1?(c=U,p=B,(s=L)[0]=c[0]+p[0],s[1]=c[1]+p[1],f=L[1],L[1]=-L[0],L[0]=f,R(L,L),s=U,p=(c=L)[0]*s[0]+c[1]*s[1],f=Math.sqrt(1-p*p),c=o*Math.min(10,1/f),h&&a<1/f&&o*p<0?(s=g+L[0]*o,p=d+L[1]*o,f=Math.acos(f)/2,f=Math.tan(f)*Math.abs(o),t[2*l]=s+L[1]*f,t[2*l+1]=p-L[0]*f,t[2*++l]=s-L[1]*f,t[2*l+1]=p+L[0]*f):(t[2*l]=g+L[0]*c,t[2*l+1]=d+L[1]*c)):(L[0]=B[1],L[1]=-B[0],R(L,L),t[2*l]=g+L[0]*o,t[2*l+1]=d+L[1]*o):(L[0]=U[1],L[1]=-U[0],R(L,L),t[2*l]=g+L[0]*o,t[2*l+1]=d+L[1]*o),l++}return u}function P(e,t,n,r,i){var o=null!=r?[]:new Float32Array(e.length);if(O(e,o,0,t&&t.length?t[0]:e.length/2,0,n,r,i),t)for(var a=0;a<t.length;a++){var v=t[a];O(e,o,v,t[a+1]||e.length/2,null!=r?o.length/2:v,n,r,i)}return o}function V(e,t,n,r){for(var i=0;i<Math.floor((r-n)/2);i++)for(var o=0;o<t;o++){var a=(i+n)*t+o,v=(r-i-1)*t+o,h=e[a];e[a]=e[v],e[v]=h}return e}function W(e){e.depth=e.depth||1,e.bevelSize=e.bevelSize||0,e.bevelSegments=null==e.bevelSegments?2:e.bevelSegments,e.smoothSide=e.smoothSide||!1,e.smoothBevel=e.smoothBevel||!1,e.simplify=e.simplify||0,"number"==typeof e.depth&&(e.bevelSize=Math.min(0<e.bevelSegments?e.bevelSize:0,e.depth/2)),0<e.bevelSize||(e.bevelSegments=0),e.bevelSegments=Math.round(e.bevelSegments);var t,n,r,i,o=e.boundingRect;e.translate=e.translate||[0,0],e.scale=e.scale||[1,1],e.fitRect&&(t=null==e.fitRect.x?o.x||0:e.fitRect.x,n=null==e.fitRect.y?o.y||0:e.fitRect.y,r=e.fitRect.width,i=e.fitRect.height,null==r?null!=i?r=i/o.height*o.width:(r=o.width,i=o.height):null==i&&(i=r/o.width*o.height),e.scale=[r/o.width,i/o.height],e.translate=[(t-o.x)*e.scale[0],(n-o.y)*e.scale[1]])}function j(e,t){function n(e,t,n,r){e[0]=t,e[1]=n,e[2]=r}for(var r,i,o,a,v,h,l,u=[],x=[],f=[],s=[],c=[],p=[],g=e.length,d=new Float32Array(t.length),y=0;y<g;){var m=3*e[y++],b=3*e[y++],M=3*e[y++];n(u,t[m],t[1+m],t[2+m]),n(x,t[b],t[1+b],t[2+b]),n(f,t[M],t[1+M],t[2+M]),F(s,u,x),F(c,x,f),r=p,o=c,l=h=v=a=void 0,a=(i=s)[0],v=i[1],h=i[2],l=o[0],i=o[1],o=o[2],r[0]=v*o-h*i,r[1]=h*l-a*o,r[2]=a*i-v*l;for(var w=0;w<3;w++)d[m+w]=d[m+w]+p[w],d[b+w]=d[b+w]+p[w],d[M+w]=d[M+w]+p[w]}for(var Z,S,z,A,R,q=0;q<d.length;)n(p,d[q],d[q+1],d[q+2]),R=A=z=void 0,z=(S=Z=p)[0],A=S[1],R=S[2],S=Math.sqrt(z*z+A*A+R*R),Z[0]=z/S,Z[1]=A/S,Z[2]=R/S,d[q++]=p[0],d[q++]=p[1],d[q++]=p[2];return d}var te=[[0,0],[1,0],[1,1],[0,0],[1,1],[0,1]];function H(e,t,n,r,i,o){var a=t.vertices,v=t.topVertices,h=t.depth,t=t.rect,l=r-n,u=o.smoothSide?1:2,x=l*u,f=o.smoothBevel?1:2,s=Math.min(h/2,o.bevelSize),c=o.bevelSegments,p=i.vertex,g=Math.max(t.width,t.height,h);if(0<s)for(var d=[0,0,1],y=[],m=[0,0,-1],b=[],M=0,w=new Float32Array(l),Z=0;Z<2;Z++)for(var S=0===Z?h-s:s,z=0;z<=c*f;z++){for(var A=0,R=void 0,q=void 0,F=0;F<l;F++){for(var B=0;B<u;B++){var U=2*((F+B)%l+n);y[0]=a[U]-v[U],y[1]=a[1+U]-v[1+U],y[2]=0;var L=Math.sqrt(y[0]*y[0]+y[1]*y[1]);y[0]/=L,y[1]/=L;var O=(Math.floor(z/f)+z%f)/c;0===Z?ee(b,d,y,O):ee(b,y,m,O);var P=0===Z?O:1-O,V=s*Math.sin(P*Math.PI/2),W=L*Math.cos(P*Math.PI/2),O=s*L/Math.sqrt(V*V+W*W),P=b[0]*O+v[U],L=b[1]*O+v[1+U],V=b[2]*O+S;e.position[3*i.vertex]=P,e.position[3*i.vertex+1]=L,e.position[3*i.vertex+2]=V,(0<F||0<B)&&(A+=Math.sqrt((R-P)*(R-P)+(q-L)*(q-L))),(0<z||0<Z)&&(W=3*(i.vertex-x),U=e.position[W],O=e.position[1+W],W=e.position[2+W],w[F]+=Math.sqrt((U-P)*(U-P)+(O-L)*(O-L)+(W-V)*(W-V))),e.uv[2*i.vertex]=A/g,e.uv[2*i.vertex+1]=w[F]/g,R=P,q=L,i.vertex++}if(1<f&&z%f||1==f&&1<=z)for(var j=0;j<6;j++){var H=(te[j][0]+F*u)%x,k=te[j][1]+M;e.indices[i.index++]=(k-1)*x+H+p}}M++}else for(var I=0;I<2;I++)for(var _=0===I?h-s:s,D=0,E=void 0,C=void 0,G=0;G<l;G++)for(var J=0;J<u;J++){var K=2*((G+J)%l+n),N=a[K],K=a[1+K];e.position[3*i.vertex]=N,e.position[3*i.vertex+1]=K,e.position[3*i.vertex+2]=_,(0<G||0<J)&&(D+=Math.sqrt((E-N)*(E-N)+(C-K)*(C-K))),e.uv[2*i.vertex]=D/g,e.uv[2*i.vertex+1]=_/g,E=N,C=K,i.vertex++}for(var Q=0<s?c*f+1:1,T=0;T<l;T++)for(var X=0;X<6;X++){var Y=(te[X][0]+T*u)%x,$=te[X][1]+Q;e.indices[i.index++]=($-1)*x+Y+p}}function k(e,t){for(var n=0,r=0,i=0;i<e.length;i++){var o=e[i],a=o.indices,v=o.vertices,h=o.holes,o=o.depth,l=v.length/2,u=0<Math.min(o/2,t.bevelSize)?t.bevelSegments:0;n+=a.length*(t.excludeBottom?1:2),r+=l*(t.excludeBottom?1:2);for(var x=2+2*u,f=0,s=0,c=0;c<(h?h.length:0)+1;c++){n+=6*((s=0===c?h&&h.length?h[0]:l:(f=h[c-1],h[c]||l))-f)*(x-1);var p=(s-f)*(t.smoothSide?1:2);r+=p*x+(t.smoothBevel?0:u*p*2)}}for(var g={position:new Float32Array(3*r),indices:new(65535<r?Uint32Array:Uint16Array)(n),uv:new Float32Array(2*r)},d={vertex:0,index:0},y=0;y<e.length;y++)!function(e,t,n,r){var i=e.indices,o=e.vertices,a=e.topVertices,v=e.rect,h=e.depth;if(!(o.length<=4)){for(var l=n.vertex,u=i.length,x=0;x<u;x++)t.indices[n.index++]=l+i[x];for(var f=Math.max(v.width,v.height),s=0;s<(r.excludeBottom?1:2);s++)for(var c=0;c<a.length;c+=2){var p=a[c],g=a[c+1];t.position[3*n.vertex]=p,t.position[3*n.vertex+1]=g,t.position[3*n.vertex+2]=(1-s)*h,t.uv[2*n.vertex]=(p-v.x)/f,t.uv[2*n.vertex+1]=(g-v.y)/f,n.vertex++}if(!r.excludeBottom)for(var d=o.length/2,y=0;y<u;y+=3)for(var m=0;m<3;m++)t.indices[n.index++]=l+d+i[y+2-m]}}(e[y],g,d,t);for(var m=0;m<e.length;m++){var b,M=e[m],w=M.holes,Z=M.vertices.length/2,S=w&&w.length?w[0]:Z;if(H(g,e[m],0,S,d,t),w)for(var z=0;z<w.length;z++)b=w[z],S=w[z+1]||Z,H(g,e[m],b,S,d,t)}for(var A=0;A<g.uv.length;A++){var R=g.uv[A];0<R&&Math.round(R)===R?g.uv[A]=1:g.uv[A]=R%1}return g.normal=j(g.indices,g.position),g.boundingRect=e[0]&&e[0].rect,g}function I(e,t){t=Object.assign({},t);for(var n=[1/0,1/0],r=[-1/0,-1/0],i=0;i<e.length;i++)D(e[i][0],n,r);t.boundingRect=t.boundingRect||{x:n[0],y:n[1],width:r[0]-n[0],height:r[1]-n[1]},W(t);for(var o=[],a=t.translate||[0,0],v=t.scale||[1,1],h=t.boundingRect,l={x:h.x*v[0]+a[0],y:h.y*v[1]+a[1],width:h.width*v[0],height:h.height*v[1]},u=Math.min(h.width,h.height)/1e5,x=0;x<e.length;x++){var f=function(e,t){for(var n=[],r=0;r<e.length;r++){for(var i=e[r],o=[],a=i.length,v=i[a-1][0],h=i[a-1][1],l=0,u=0;u<a;u++){var x=i[u][0],f=i[u][1],s=x-v,c=f-h;t<(l+=Math.sqrt(s*s+c*c))&&(o.push(i[u]),l=0),v=x,h=f}3<=o.length&&n.push(o)}return 0<n.length?n:null}(e[x],u);if(f){var s=t.simplify/Math.max(v[0],v[1]);if(f=0<s?function(e,t){for(var n=[],r=0;r<e.length;r++){var i=e[r];3<=(i=A(i,t,!0)).length&&n.push(i)}return 0<n.length?n:null}(f,s):f){for(var c=d.flatten(f),p=c.vertices,s=c.holes,f=c.dimensions,g=0;g<p.length;)p[g]=p[g++]*v[0]+a[0],p[g]=p[g++]*v[1]+a[1];if(!function(e,t){var n=e.length/2,r=0,i=t&&t.length?t[0]:n;0<q(e,r,i)&&V(e,2,r,i);for(var o=1;o<(t?t.length:0)+1;o++)q(e,r=t[o-1],i=t[o]||n)<0&&V(e,2,r,i)}(p,s),2!==f)throw new Error("Only 2D polygon points are supported");c=0<t.bevelSize?P(p,s,t.bevelSize,null,!0):p,f=d(c,s,f=void 0===(f=f)?2:f);o.push({indices:f,vertices:p,topVertices:c,holes:s,rect:l,depth:"function"==typeof t.depth?t.depth(x):t.depth})}}}return k(o,t)}function _(e,t){t=Object.assign({},t);for(var n=[1/0,1/0],r=[-1/0,-1/0],i=0;i<e.length;i++)D(e[i],n,r);t.boundingRect=t.boundingRect||{x:n[0],y:n[1],width:r[0]-n[0],height:r[1]-n[1]},W(t);var o=t.scale||[1,1];null==t.lineWidth&&(t.lineWidth=1),null==t.miterLimit&&(t.miterLimit=2);for(var a=[],v=0;v<e.length;v++){var h=e[v],l=t.simplify/Math.max(o[0],o[1]);0<l&&(h=A(h,l,!0)),a.push(function(e,t,n){for(var r=n.lineWidth,i=e.length,o=new Float32Array(2*i),a=n.translate||[0,0],v=n.scale||[1,1],h=0,l=0;h<i;h++)o[l++]=e[h][0]*v[0]+a[0],o[l++]=e[h][1]*v[1]+a[1];q(o,0,i)<0&&V(o,2,0,i);var u=[],x=[],f=n.miterLimit,s=O(o,x,0,i,0,-r/2,f,!1);V(o,2,0,i);for(var c=O(o,u,0,i,0,-r/2,f,!1),r=(u.length+x.length)/2,p=new Float32Array(2*r),g=0,d=x.length/2,y=0;y<x.length;y++)p[g++]=x[y];for(var m=0;m<u.length;m++)p[g++]=u[m];for(var b=new(65535<r?Uint32Array:Uint16Array)(3*(2*(i-1)+(r-2*i))),M=0,w=0;w<i-1;w++){var Z=w+1;b[M++]=d-1-s[w],b[M++]=d-1-s[w]-1,b[M++]=c[w]+1+d,b[M++]=d-1-s[w],b[M++]=c[w]+1+d,b[M++]=c[w]+d,c[Z]-c[w]==2?(b[M++]=c[w]+2+d,b[M++]=c[w]+1+d,b[M++]=d-s[Z]-1):s[Z]-s[w]==2&&(b[M++]=c[Z]+d,b[M++]=d-1-(s[w]+1),b[M++]=d-1-(s[w]+2))}return f=0<n.bevelSize?P(p,[],n.bevelSize,null,!0):p,r=n.boundingRect,{vertices:p,indices:b,topVertices:f,rect:{x:r.x*v[0]+a[0],y:r.y*v[1]+a[1],width:r.width*v[0],height:r.height*v[1]},depth:"function"==typeof n.depth?n.depth(t):n.depth,holes:[]}}(h,v,t))}return k(a,t)}function D(e,t,n){for(var r=0;r<e.length;r++)t[0]=Math.min(e[r][0],t[0]),t[1]=Math.min(e[r][1],t[1]),n[0]=Math.max(e[r][0],n[0]),n[1]=Math.max(e[r][1],n[1])}function E(e){for(var t=new Float32Array(e),n=[],r=0,i=t.length;r<i;r+=2){var o=t[r],a=t[r+1];n.push([o,a])}return n}function C(e,t){void 0===t&&(t=!1);for(var n,r,i,o,a=e.length,v=[],h=[],l=[],u=0,x=0,f=0,s=0,c=0;c<a;c++){var p=t?(p=e[c],r=i=n=o=i=r=n=void 0,n=p.data,r=p.height,i=p.width,o=p.bottomHeight,p=_(n,{lineWidth:i,depth:r}),n=p.position,i=p.normal,r=p.uv,p=p.indices,G(n,o),{position:n,normal:i,uv:r,indices:p}):(d=e[c],b=m=y=b=g=m=y=void 0,y=d.data,m=d.height,g=d.bottomHeight,b=I(y,{depth:m}),d=b.position,y=b.normal,m=b.uv,b=b.indices,G(d,g),{position:d,normal:y,uv:m,indices:b}),g=e[c].bottomHeight||0,d=p.position,y=p.normal,m=p.uv,b=p.indices;h.push(p);b=b.length/3;l[c]=[u+1,u+b],u+=b;d=d.length/3,y=y.length/3,m=m.length/2;v[c]={position:{middleZ:g+(e[c].height||0)/2,count:d,start:x,end:x+3*d},normal:{count:y,start:f,end:f+3*y},uv:{count:m,start:s,end:s+2*m},hide:!1},x+=3*d,f+=3*y,s+=2*m}var M=function(e){for(var t={},n={},r=0;r<e.length;++r){var i,o=e[r];for(i in o)void 0===t[i]&&(t[i]=[],n[i]=0),t[i].push(o[i]),n[i]+=o[i].length}var a,v={},h=0,l=[];for(a in t)if("indices"===a)for(var u=t[a],x=0,f=u.length;x<f;x++){for(var s=u[x],c=0,p=s.length;c<p;c++)l.push(s[c]+h);h+=t.position[x].length/3}else{var g=function(e,t){for(var n=new Float32Array(t),r=0,i=0;i<e.length;++i)n.set(e[i],r),r+=e[i].length;return n}(t[a],n[a]);if(!g)return null;v[a]=g}return v.indices=new Uint32Array(l),v}(h),w=M.position,Z=M.normal,S=M.uv,M=M.indices;return{position:w.buffer,normal:Z.buffer,uv:S.buffer,indices:M.buffer,faceMap:l,geometriesAttributes:v}}function G(e,t){if(void 0!==t&&"number"==typeof t&&0!==t)for(var n=0,r=e.length;n<r;n+=3)e[n+2]+=t}e.initialize=function(){},e.onmessage=function(e,t){var n=e.data,e=n.type,r=n.datas;if("Polygon"===e){!function(e){for(var t=e.length,n=0;n<t;n++)for(var r=e[n].data,i=0,o=r.length;i<o;i++)for(var a=r[i],v=0,h=a.length;v<h;v++)e[n].data[i][v]=E(a[v])}(r);n=C(r);t(null,n,[n.position,n.normal,n.uv,n.indices])}else if("LineString"===e){for(var i=0,o=r.length;i<o;i++)for(var a=0,v=r[i].data.length;a<v;a++)r[i].data[a]=E(r[i].data[a]);e=C(r,!0);t(null,e,[e.position,e.normal,e.uv,e.indices])}},Object.defineProperty(e,"__esModule",{value:!0})}');var Ry={altitude:0},ky=new or,Iy={positionsConvert:function(t){for(var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2?arguments[2]:void 0,r=[],i=0,o=t.length;i<o;i+=3){var a=t[i],s=t[i+1],u=t[i+2];e>0&&(u+=n.distanceToVector3(e,e).x),r.push(new or(a,s,u))}return r},vectors2Pixel:function(t,e,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,i=arguments.length>4?arguments[4]:void 0;t[0]instanceof or||(t=Iy.positionsConvert(t,r,i));var o=t.map((function(t){return Iy.vector2Pixel(t,e,n)}));return o},vector2Pixel:function(t,e,n){var r=t.project(n),i=e.width/2,o=e.height/2;return{x:Math.round(r.x*i+i),y:Math.round(-r.y*o+o)}}};function Dy(t,e,n){return t[e]||(t[e]=n.distanceToVector3(e,e).x),t[e]}function jy(t,e){var n=Math.pow(10,e);return Math.round(t*n)/n}var zy=function(t){Jp(n,t);var e=Kp(n);function n(t,r,o,a,s){var u;i(this,n),Array.isArray(t)||(t=[t]),r=Pp.Util.extend({},Ry,r,{layer:s,points:t});for(var c=1/0,l=1/0,h=-1/0,f=-1/0,d=0,p=t.length;d<p;d++){var m=t[d].coordinate,g=void 0,v=void 0;Array.isArray(m)?(g=m[0],v=m[1]):m instanceof Pp.Coordinate&&(g=m.x,v=m.y),c=Math.min(c,g),l=Math.min(l,v),h=Math.max(h,g),f=Math.max(f,v)}for(var y=s.coordinateToVector3([(c+h)/2,(l+f)/2]),_=lm.initGrids(c,l,h,f),x=_.grids,b=_.averageX,w=_.averageY,M=_.ROWS,S=(_.COLS,x.length,new Float32Array(3*t.length)),T=[],E=new Float32Array(3*t.length),A=new Float32Array(3*t.length),C=[],P=[],L=new Float32Array(t.length),O=new Float32Array(t.length),R=new Float32Array(t.length),k=new Float32Array(t.length),I=new Float32Array(t.length),D=new Float32Array(t.length),j=new Float32Array(t.length),z={},N={},F=new or(0,0,0),B=0,H=t.length;B<H;B++){var G=t[B],U=G.coordinate,W=G.height,V=G.color,Z=G.fcolor1,q=G.rotation,Y=G.imgflag,J=G.visibility,X=G.opavalue,$=G.colorflag,Q=G.fcolorflag,K=G.imgnum,tt=3*B,et=V instanceof Oi?V:new Oi(V);E[tt]=et.r,E[tt+1]=et.g,E[tt+2]=et.b,et=V instanceof Oi?V:new Oi(Z),A[tt]=et.r,A[tt+1]=et.g,A[tt+2]=et.b,L[B]=q,O[B]=Y,R[B]=J,k[B]=X,I[B]=$,D[B]=Q,j[B]=K;var nt=Dy(z,W,s),rt=s.coordinateToVector3(U,nt);F.x=rt.x,F.y=rt.y,F.z=rt.z,F.sub(y),S[tt]=F.x,S[tt+1]=F.y,S[tt+2]=F.z,T.push(rt),P[B]={position:{count:1,start:3*B,end:3*B+3},hide:!1};var it=jy((U[1]-l)/w,4),ot=jy((U[0]-c)/b,4);it-=1,ot-=1,it=Math.max(0,it),ot=Math.max(0,ot),it=Math.ceil(it);var at=(ot=Math.ceil(ot))*M+it;x[at]&&(x[at].positions.push(rt),x[at].indexs.push(B)),N[B]=!(J<.5)}var st=new no;st.setAttribute("position",new Wi(S,3,!0)),st.setAttribute("color",new Wi(E,3,!0)),st.setAttribute("rotation",new Wi(L,1,!0)),st.setAttribute("fcolor1",new Wi(A,3,!0)),st.setAttribute("imgflag",new Wi(O,1,!0)),st.setAttribute("visibility",new Wi(R,1,!0)),st.setAttribute("opavalue",new Wi(k,1,!0)),st.setAttribute("colorflag",new Wi(I,1,!0)),st.setAttribute("fcolorflag",new Wi(D,1,!0)),st.setAttribute("imgnum",new Wi(j,1,!0)),r.positions=T,(u=e.call(this))._initOptions(r),u._createPoints(st,o);var ut=r.altitude,ct=s.distanceToVector3(ut,ut).x,lt=y.clone();return lt.z=ct,u.getObject3d().position.copy(lt),u._baseObjects=C,u._datas=t,u.faceIndex=null,u._geometriesAttributes=P,u.isHide=!1,u._initBaseObjectsEvent(C),u._grids=x,u._indexs_hide=N,u._bindMapEvents(),u._markTypeFunc=a,u.parent=null,u.type="Points",u}return a(n,[{key:"_bindMapEvents",value:function(){var t=this,e=this.getMap(),n="zoomstart zooming zoomend movestart moving moveend pitch rotate";this.on("add",(function(){t._updateGrids(),e.on(n,t._updateGrids,t)})),this.on("remove",(function(){e.off(n,t._updateGrids,t)}))}},{key:"updatepoints",value:function(t){Array.isArray(t)||(t=[t]);for(var e=1/0,n=1/0,r=-1/0,i=-1/0,o=0,a=t.length;o<a;o++){var s=t[o].coordinate,u=void 0,c=void 0;Array.isArray(s)?(u=s[0],c=s[1]):s instanceof Pp.Coordinate&&(u=s.x,c=s.y),e=Math.min(e,u),n=Math.min(n,c),r=Math.max(r,u),i=Math.max(i,c)}for(var l=this.getLayer().coordinateToVector3([(e+r)/2,(n+i)/2]),h=lm.initGrids(e,n,r,i),f=h.length,d={},p=[],m=0,g=t.length;m<g;m++){var v=t[m],y=v.coordinate,_=Dy(d,v.height,this.getLayer()),x=this.getLayer().coordinateToVector3(y,_),b=x.clone().sub(l);p.push(b.x,b.y,b.z);for(var w=0;w<f;w++)if(h[w].containsCoordinate(y)){h[w].positions.push(x),h[w].indexs.push(m);break}}for(var M=this.getObject3d().geometry.attributes.position.array,S=0;S<p.length;S++)M[3*S+0]=p[3*S+0],M[3*S+1]=p[3*S+1],M[3*S+2]=p[3*S+2];this.getObject3d().geometry.attributes.position.needsUpdate=!0;var T=l.clone();T.z=0,this.getObject3d().position.copy(T),this._grids=h,this._updateGrids()}},{key:"_updateGrids",value:function(){var t=this.getMap();this._grids.forEach((function(e){e.indexs.length&&e.updateBBoxPixel(t)}))}},{key:"getSelectMesh",value:function(){var t=this.faceIndex;if(null!=t){if(!this._baseObjects[t]){var e=this._datas[t],n=e.coordinate,r=e.height,i=e.color;this._baseObjects[t]=this.getLayer().toPoint(n,{height:r,index:t,color:i},this.getObject3d().material),this._proxyEvent(this._baseObjects[t])}return{data:this._datas[t],baseObject:this._baseObjects[t]}}}},{key:"identify",value:function(t){var e=this.getLayer(),n=this.getMap().getSize(),r=this.getLayer().getCamera(),i=this.getOptions().altitude,o=this.getMap(),a=e.distanceToVector3(i,i).x,s=this._markTypeFunc(this),u=o.coordToContainerPoint(t),c=[];if(this._grids&&this._grids.forEach((function(t){t.indexs.length&&t.isRecCross(u,s)&&c.push(t)})),c.length<1)return!1;for(var l=0,h=c.length;l<h;l++)for(var f=0,d=c[l].positions.length;f<d;f++){var p=c[l].positions[f];ky.x=p.x,ky.y=p.y,ky.z=p.z+a;var m=Iy.vector2Pixel(ky,n,r);if(Math.sqrt(Math.pow(u.x-m.x,2)+Math.pow(u.y-m.y,2))<=s/2){if(this.faceIndex=c[l].indexs[f],!this._indexs_hide[this.faceIndex])continue;return!0}}return!1}}]),n}(cv(Sm)),Ny=(n("b7dd"),n("8f74"),n("d3f4")),Fy=n.n(Ny),By=function(){function t(e,n,r){var o=this;i(this,t);var a=n.altitude,s=n.isLabel,u=n.labelMinZoom,c=n.labelMaxZoom,l=n.labelLayerName,h=n.labelVisible,f=n.canvasSize,d=n.markSize,p=n.pointMinZoom,m=n.pointOrder,g=n.isToolTip,v=n.isPointNum,y=n.sizeType,_=n.iconFile;if(0!=e.length){var x=new Xu({sizeAttenuation:!1,transparent:!0,depthTest:!1});s&&l&&(this.layerLabel=new Pp.VectorLayer(l,{minZoom:u||15,geometryEvents:!1,hitDetect:!1,visible:h||!1}).addTo(r.map),this.all_labels=[]);var b=[];this.typeValues={},this.initTypeValue=-.9,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(b,t,e),o.layerLabel){var r=new Pp.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.canvasSize=f||48,this.markSize=d||40,this.m=x,this.dataItems=b,this.point=null,this.shader=null,this.minZoom=p||8,this.markType=0===y?0:1,this.order=m||0,this.isToolTip=g||!1,this.clickFunc=n.clickFunc||null,this.clickInfoFlag=void 0!==n.clickInfoFlag&&n.clickInfoFlag,this.iconFile=_||null,this.isPointNum=v||!1,this.iconFile&&(this.Infolayer=this.map.getLayer("infoLayer"),this.Infolayer||(this.Infolayer=new Pp.VectorLayer("infoLayer",{geometryEvents:!1,hitDetect:!1}).addTo(r.map))),this.clickInfoFlag&&(this.infoWindow=new Pp.ui.InfoWindow({custom:!0,dy:-48,content:"",autoOpenOn:null}).addTo(this.map)),this.layerPointNumLabel=new Pp.VectorLayer(Pp.Util.GUID(),{hitDetect:!1,zIndex:1001}).addTo(r.map),this.selectItems=[],this.funcsNew={},this.fitZoom=null,this.isCtrol=!0,this.rbush=new Fy.a,this.GLOBALSCALE=32768,this.XMAX=178,this.YMAX=85,this.MAXZOOM=31,this.SCALES=[];for(var w=0;w<this.MAXZOOM;w++)this.SCALES.push(129202.08021/Math.pow(2,w));this.clusterItemsCache={},this.clusterMinZoom=9,this.clusterMaxZoom=18,this.altitude=a,this.labelMaxZoom=c}else console.error("需要绘制的点位数量为0")}return 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",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.funcsNew)this.funcsNew[e]()}},{key:"addContent",value:function(){var t=u(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.clickFunc(this.infoWindow,e);case 3:t.next=7;break;case 5:return t.next=7,this.clickFunc(e);case 7:this.iconFile&&(this.Infolayer.clear(),new Pp.Marker([e.coordinate[0],e.coordinate[1]],{symbol:{markerFile:this.iconFile,markerWidth:48,markerHeight:48,markerDx:0,markerDy:0,markerOpacity:1}}).addTo(this.Infolayer)),this.clickInfoFlag&&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:"_setPointEvent",value:function(t){var e,n=t.selectMesh;if(n&&(e=n.data),"mousemove"===t.type&&e){var r=e.value;this.isToolTip&&(this.point.getToolTip()._content="".concat(r))}"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.Infolayer&&(this.map.removeLayer(this.Infolayer),delete this.Infolayer),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,delete this.setInfoContent),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",this._setPointEvent,this)}},{key:"clearIcon",value:function(){this.Infolayer&&this.Infolayer.clear(),this.infoWindow&&this.infoWindow.hide()}},{key:"_loadTexture",value:function(){var t=u(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.addGeometry(this.all_labels[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])):(n[i]=.1,this.point._indexs_hide[i]=!1)}this.point.object3d.geometry.attributes.visibility.needsUpdate=!0}},{key:"pointShowHideByCode",value:function(t,e){this.layerPointNumLabel&&this.layerPointNumLabel.clear(),this._deleteFunsKey(),this.selectItems=[],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 s=this.dataItems[a];t.includes(s.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]),s.visibility=1):s.visibility=.1}this._changePtVisible([]),e&&this.map.fitExtent(new Pp.Extent(n,r,i,o),0)}},{key:"_itemHide",value:function(t,e,n,r,i,o){var a,s=n||!0,u=r||!0;e&&"MultiPolygon"===e.getType()&&(a=e.toGeoJSON());var c=this.point.object3d.geometry.attributes.visibility.array;if(t.length>0){for(var l=0;l<this.dataItems.length;l++){var h=this.dataItems[l],f=!0;if(1===h.status?f=!0===s:0===h.status&&(f=!0===u),e&&(f&=!!("MultiPolygon"===e.getType()?am.containsCoordinate2(this.dataItems[l].coordinate,a):am.containsCoordinate1(this.dataItems[l].coordinate,e))),i&&i.rangeArr.length>0){var d=1*this.dataItems[l].pvalue;f&=!!am.isInLevels(i,d)}h.imgflag==o&&(f?(c[l]=1,this.point._indexs_hide[l]=!0,this.selectItems.push(l),this.layerLabel&&this.layerLabel.addGeometry(this.all_labels[l]),this.bzlayerNum&&this.bzlayerNum.addGeometry(this.bz_all_nums[l])):(c[l]=.1,this.point._indexs_hide[l]=!1))}this.point.object3d.geometry.attributes.visibility.needsUpdate=!0}else{for(var p=0;p<this.dataItems.length;p++)this.dataItems[p].imgflag==o&&(c[p]=.1,this.point._indexs_hide[p]=!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=u(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,s=-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]),s=Math.max(s,r.dataItems[t].coordinate[0]),u=Math.max(u,r.dataItems[t].coordinate[1])}));var c=[(o+s)/2,(a+u)/2];this._addClusterLabel(c,this.selectItems.length,{}).on("click",(function(){r.layerPointNumLabel.hide(),r.map.fitExtent(new Pp.Extent(o,a,s,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)&&am.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&&am.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,s=-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]),s=Math.max(s,r.dataItems[t].coordinate[1])})),this.layerPointNumLabel.hide(),this.map.fitExtent(new Pp.Extent(i,o,a,s),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",s=new Pp.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(s),new Pp.Marker(t,{properties:{name:e},symbol:{textFaceName:"sans-serif",textName:"{name}",textSize:{stops:[[9,12],[12,18],[15,24]]},textFill:a}}).addTo(this.layerPointNumLabel),s}},{key:"_addClusterLabel",value:function(t,e,n,r,i){var o=r||"#50fcfc",a=i||"#000",s=new Pp.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(s),new Pp.Marker(t,{properties:{name:e},symbol:{textFaceName:"sans-serif",textName:"{name}",textSize:{stops:[[9,12],[12,18],[15,24]]},textFill:a}}).addTo(this.layerPointNumLabel),s}},{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 u=0;u<this.dataItems.length;u++)if(e.includes(u))if(t>=18){var c=[u];o.push(c)}else i.includes(u)||function(){var t=r.getRect(r.dataItems[u]),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 c=o[a[0]].concat(n.filter((function(t){return!o[a[0]].includes(t)})));o[a[0]]=c.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 am.vector2Pixel(t,e,n)}}]),t}(),Hy={factor:{aqi:{unit:"",name:"AQI",colorMap:{"00e400":[0,50],ffff00:[50,100],ff7e00:[100,150],ff0000:[150,200],"99004c":[200,300],"7e0023":[300,500],"6e6e6e":[500]},degreeMap:{"00e400":"(优)",ffff00:"(良)",ff7e00:"(轻度)",ff0000:"(中度)","99004c":"(重度)","7e0023":"(严重)"}},pm25:{unit:"μg/m³",name:"PM2.5",colorMap:{"00e400":[0,35],ffff00:[35,75],ff7e00:[75,115],ff0000:[115,150],"99004c":[150,250],"7e0023":[250,500],"7e0022":[500]},degreeMap:{"00e400":"(优)",ffff00:"(良)",ff7e00:"(轻度)",ff0000:"(中度)","99004c":"(重度)","7e0023":"(严重)"}},pm10:{unit:"μg/m³",name:"PM10",colorMap:{"00e400":[0,50],ffff00:[50,150],ff7e00:[150,250],ff0000:[250,350],"99004c":[350,420],"7e0023":[420,600],"7e0022":[600]},degreeMap:{"00e400":"(优)",ffff00:"(良)",ff7e00:"(轻度)",ff0000:"(中度)","99004c":"(重度)","7e0023":"(严重)"}},so2:{unit:"μg/m³",name:"SO₂",colorMap:{"00e400":[0,50],ffff00:[50,150],ff7e00:[150,475],ff0000:[475,800],"99004c":[800,1600],"7e0023":[1600,2620],"6e6e6e":[2620]},degreeMap:{"00e400":"(优)",ffff00:"(良)",ff7e00:"(轻度)",ff0000:"(中度)","99004c":"(重度)","7e0023":"(严重)"}},no2:{unit:"μg/m³",name:"NO₂",colorMap:{"00e400":[0,40],ffff00:[40,80],ff7e00:[80,180],ff0000:[180,280],"99004c":[280,565],"7e0023":[565,940],"6e6e6e":[940]},degreeMap:{"00e400":"(优)",ffff00:"(良)",ff7e00:"(轻度)",ff0000:"(中度)","99004c":"(重度)","7e0023":"(严重)"}},co:{unit:"mg/m³",name:"CO",colorMap:{"00e400":[0,2],ffff00:[2,4],ff7e00:[4,14],ff0000:[14,24],"99004c":[24,36],"7e0023":[36,60],"6e6e6e":[60]},degreeMap:{"00e400":"(优)",ffff00:"(良)",ff7e00:"(轻度)",ff0000:"(中度)","99004c":"(重度)","7e0023":"(严重)"}},o3:{unit:"μg/m³",name:"O₃",colorMap:{"00e400":[0,100],ffff00:[100,160],ff7e00:[160,215],ff0000:[215,265],"99004c":[265,800],"7e0023":[800,1200],"6e6e6e":[1200]},degreeMap:{"00e400":"(优)",ffff00:"(良)",ff7e00:"(轻度)",ff0000:"(中度)","99004c":"(重度)","7e0023":"(严重)"}},ci:{unit:"μg/m³",name:"CI",colorMap:{"00e400":[0,1.3],ffff00:[1.3,4],ff7e00:[4,8],ff0000:[8,12],"99004c":[12,20],"7e0023":[20]},degreeMap:{"00e400":"(优)",ffff00:"(良)",ff7e00:"(轻度)",ff0000:"(中度)","99004c":"(重度)","7e0023":"(严重)"}},tsp:{unit:"μg/m³",name:"TSP",colorMap:{"00e400":[0,120],ffff00:[120,300],ff7e00:[300,400],ff0000:[400,500],"99004c":[500,625],"7e0023":[625,3e3],"6e6e6e":[3e3]},degreeMap:{"00e400":"",ffff00:"",ff7e00:"",ff0000:"","99004c":"","7e0023":""}},voc:{unit:"mg/m³",name:"VOC",colorMap:{"00e400":[0,.19],ffff00:[.19,.59],ff7e00:[.59,1.79],ff0000:[1.79,2.29],"99004c":[2.29,3],"7e0023":[3]},degreeMap:{"00e400":"",ffff00:"",ff7e00:"",ff0000:"","99004c":"","7e0023":""}},temperature:{unit:"℃",name:"温度",colorMap:{"8274cc":[-40,-30],acb3e2:[-30,-20],"95d0d8":[-20,-10],"61afff":[-10,0],"87b922":[0,10],e5aa06:[10,20],e45914:[20,30],"8a2b0a":[30]},degreeMap:{"8274cc":"",acb3e2:"","95d0d8":"","61afff":"","87b922":"",e5aa06:"",e45914:"","8a2b0a":""}},humidity:{unit:"%",name:"湿度",colorMap:{c4be20:[0,20],c4be21:[20,40],"4fcb46":[40,60],"45afde":[60,80],"6661f1":[80]},degreeMap:{c4be20:"",c4be21:"","4fcb46":"","45afde":"","6661f1":""}},pressure:{unit:"Pa",name:"气压",colorMap:{"6493FF":[1,1e17]},degreeMap:{"6493FF":""}}},colorForValue:{"00e400":"优",ffff00:"良",ff7e00:"轻度",ff0000:"中度","99004c":"重度","7e0023":"严重","6e6e6e":"无"},colorForFont:{"#00e400":"#000","#ffff00":"#000","#ff7e00":"#fff","#ff0000":"#fff","#99004c":"#fff","#7e0023":"#fff","#6e6e6e":"#fff"},wind:{"东北⻛":[22.5,67.5],"东⻛":[67.5,112.5],"东南⻛":[112.5,157.5],"南⻛":[157.5,202.5],"⻄南⻛":[202.5,247.5],"⻄⻛":[247.5,292.5],"⻄北⻛":[292.5,337.5]},windLevel:{"0级":[0,.2],"1级":[.2,1.5],"2级":[1.5,3.3],"3级":[3.3,5.4],"4级":[5.4,7.9],"5级":[7.9,10.7],"6级":[10.7,13.8],"7级":[13.8,17.1],"8级":[17.1,20.7],"9级":[20.7,24.4],"10级":[24.4,28.4],"11级":[28.4,32.6]},windLevelZh:{"零级(⽆⻛)":[0,.2],"⼀级(软⻛)":[.2,1.5],"⼆级(轻⻛)":[1.5,3.3],"三级(微⻛)":[3.3,5.4],"四级(和⻛)":[5.4,7.9],"五级(劲⻛)":[7.9,10.7],"六级(强⻛)":[10.7,13.8],"七级(疾⻛)":[13.8,17.1],"⼋级(⼤⻛)":[17.1,20.7],"九级(烈⻛)":[20.7,24.4],"⼗级(狂⻛)":[24.4,28.4],"⼗⼀级(暴⻛)":[28.4,32.6]}},Gy=function(t,e){if(!e)return"#8a97a0";var n=(Hy.factor[e]||Hy.factor[e.toLowerCase()]||{}).colorMap;if(!n)return"#8a97a0";for(var r in t=+t,n){if(1===n[r].length&&n[r][0]<t)return"#"+r;if(n[r][0]<t&&t<=n[r][1])return"#"+r}return"#8a97a0"},Uy=function(t,e){return Hy.colorForFont[Gy(t,e.toLowerCase())]},Wy=function(t){Jp(n,t);var e=Kp(n);function n(t,r,o){var a;return i(this,n),(a=e.call(this,t,r,o)).InforItems=[],a.curZoom=9,a.clusterMinZoom=9,a}return a(n,[{key:"_initChildVar",value:function(t,e){!0===t.addValueLabel&&(this.bzlayerNum=new Pp.VectorLayer(Pp.Util.GUID(),{minZoom:11,geometryEvents:!1,hitDetect:!1,visible:!1}).addTo(e.map),this.bz_all_nums=[],this.valueFaceName=t.valueFaceName||"microsoft yahei",this.valueFontSize=t.valueFontSize||12,this.valueDy=t.valueDy||0,this.valueDx=t.valueDx||0),this.paraName=t.paraName||"pm25",this.typeImgNum=-1}},{key:"_bindDataItem",value:function(t,e,n){var r=parseFloat(e.value)||0,i=parseFloat(e.opavalue)?parseFloat(e.opavalue):1,o=0;e.imgSrc&&(o=e.imgSrc.length);var a=.9,s="#fff";e.imgColor&&e.imgColor.length>=1&&(a=1.9,s=e.imgColor[0]);var u=.9,c="#fff";e.imgColor&&e.imgColor.length>=2&&(u=1.9,c=e.imgColor[1]);var l=(parseFloat(e.windDirection)||0)+.01,h=parseFloat(l*(Math.PI/180));if(t.push({coordinate:[parseFloat(e.longitude),parseFloat(e.latitude)],height:0,color:s,colorflag:a,fcolorflag:u,fcolor1:c,imgnum:o,value:e.name,imgflag:n,rotation:h,visibility:1==e.visibility?1:.1,code:e.code,opavalue:i,pvalue:e.value||0,data:e.data}),this.bzlayerNum){var f=e.valueFontColr||Uy(r,this.paraName),d=new Pp.Marker([parseFloat(e.longitude),parseFloat(e.latitude)],{properties:{name:r,type:e.businessType,pvalue:r},symbol:{textFaceName:this.valueFaceName,textName:"{name}",textSize:this.valueFontSize,textFill:f,textDx:this.valueDx,textDy:this.valueDy}});1==e.visibility&&this.bzlayerNum.addGeometry(d),this.bz_all_nums.push(d)}}},{key:"_getRate",value:function(){if(1===this.markType)return qp(Vp(n.prototype),"_getRate",this).call(this);var t=this.map.getZoom()-3;return.1*(t=t>9?9:t)+.1}},{key:"_getImgType",value:function(t,e,n){return void 0===this.typeValues[t]&&(0===Object.keys(this.typeValues).length?this.initTypeValue=.9:this.initTypeValue+=this.typeImgNum,this.typeImgNum=e.length,this.typeValues[t]={v:this.initTypeValue,img:e,inImgWidth:parseInt(n.inImgWidth)||16}),this.typeValues[t].v}},{key:"_pointShowHide",value:function(t,e,n,r,i){var o=this;this.layerLabel&&this.layerLabel.clear();var a=function(a){var s=t.filter((function(t){return t===a}));o._itemHide(s,e,n,r,i,o.typeValues[a].v)};for(var s in this.typeValues)a(s)}},{key:"_loadTexture",value:function(){var t=u(regeneratorRuntime.mark((function t(){var e,n,r,i,o,a,s,u,c,l,h,f,d,p;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:e=[],t.t0=regeneratorRuntime.keys(this.typeValues);case 2:if((t.t1=t.t0()).done){t.next=32;break}if(n=t.t1.value,!this.typeValues[n].img||!Array.isArray(this.typeValues[n].img)){t.next=30;break}r=0;case 6:if(!(r<this.typeValues[n].img.length)){t.next=30;break}if(i=this.typeValues[n].img[r],o=i,!i.includes(".svg")){t.next=16;break}return t.next=12,fetch(i);case 12:return a=t.sent,t.next=15,a.text();case 15:o=t.sent;case 16:return s=new DOMParser,u=s.parseFromString(o,"image/svg+xml"),c=1*(u.documentElement.getAttribute("width")||1),l=1*(u.documentElement.getAttribute("height")||1),h=l/c,f=parseInt(40/h),d=parseInt(f*h),t.next=25,am.addImageProcess(o);case 25:p=t.sent,0===r?e.push({type:"img",src:p,w:40,h:40,iw:f,ih:d}):(f=parseInt(this.typeValues[n].inImgWidth/h),d=parseInt(f*h),e.push({type:"img1",src:p,w:40,h:40,iw:f,ih:d}));case 27:r++,t.next=6;break;case 30:t.next=2;break;case 32:return console.log(e),t.abrupt("return",am.generateTexture(e));case 34:case"end":return t.stop()}}),t,this)})));return function(){return t.apply(this,arguments)}}()},{key:"addPoint",value:function(){var t=u(regeneratorRuntime.mark((function t(){var e,n,r,i,o=this;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(this.dataItems){t.next=2;break}return t.abrupt("return",null);case 2:return t.next=4,this._loadTexture();case 4:return e=t.sent,this.textures||(this.textures=[]),this.textures.push(e.texture),n=this._getRate(),this.m.onBeforeCompile=function(t){r=o._createShaderPol(t,e.texture,e.xys,e.textureSize,o.markSize*n),o.shader=r},i=new zy(this.dataItems,{minZoom:this.minZoom},this.m,this._getMarkSize,this.threeLayer),this.isToolTip&&i.setToolTip("hello",{showTimeout:0,eventsPropagation:!0,dx:10}),i.object3d.renderOrder=this.order,this.point=i,this.point.parent=this,this.threeLayer.addMesh(this.point),this._bindMapEvents(),t.abrupt("return",i);case 17:case"end":return t.stop()}}),t,this)})));return function(){return t.apply(this,arguments)}}()},{key:"addInfo",value:function(t){if(t.length!==this.InforItems.length)for(var e=0;e<this.dataItems.length;e++)if(t.includes(e)){var n=this.dataItems[e],r=n.data.infoWindowData;if(n.data.law_num&&n.data.punish_num&&(r=[{key:"案件数",value:n.data.law_num},{key:"处罚金额",value:"".concat(n.data.punish_num,"万元")}]),!r||!r.length)continue;var i={single:!1,custom:!0,dy:-16,autoOpenOn:null,animation:!1,autoPanDuration:!1,autoPan:!1,content:'<div style="background: rgba(0,0,0,0.42); border-radius: 6px; font-size: 12px; color: #ffffff; padding: 6px;display: flex;\n flex-direction: column;\n align-items: center; width: 128px">\n <span>'.concat(r[0].key,":").concat(r[0].value,"</span>\n <span>").concat(r[1].key,":").concat(r[1].value,"</span>\n </div>")},o=new Pp.ui.InfoWindow(i);this.InforItems.push(o),o.addTo(this.map).show({x:n.coordinate[0],y:n.coordinate[1]})}}},{key:"hideInfoWindows",value:function(){this.InforItems.length>0&&(this.InforItems.forEach((function(t){t.remove()})),this.InforItems=[])}},{key:"pointShowStatisticsByeCodeMultiple",value:function(t,e,n,r,i){var o=this;this.layerPointNumLabel.clear(),this.layerPointNumLabel.show(),this.hideInfoWindows(),this._deleteFunsKey();for(var a=[],s=[],u=0;u<e.length;u++)a.push({code:u,geo:e[u],geojson:e[u].toGeoJSON(),ptnum:0,val:t,sum:0,ptids:[]});a.forEach((function(e){for(var r=0;r<o.dataItems.length;r++){var i=o.dataItems[r];t.includes(i.code)&&am.containsCoordinate2(o.dataItems[r].coordinate,e.geojson)&&(e.ptnum+=1,e.ptids.push(r),s.push(r),o.dataItems[r].data[n]?(e.sum+=parseFloat(o.dataItems[r].data[n])||0,e.sum=Math.floor(100*e.sum)/100):e.sum+=0)}})),this._clearClusterCache();var c=this.clusterMinZoom;this.clusterItemsCache[c]=a,this.testMinClusterZoom1(this.clusterItemsCache[c],r,i),this.funcsNew.c=function(){var t=o.getClosestZoom(o.map.pixelToDistance(1,0));if(!(t<9||t>18)&&o.curZoom!==t)if(o.curZoom=t,o.clusterItemsCache[t])if(t===o.clusterMinZoom)o.hideInfoWindows(),o.testMinClusterZoom1(o.clusterItemsCache[t],r,i);else{var e=o.clusterItemsCache[t];o.testCluster1(e,r,i,n)}else{var s=[];a.forEach((function(e){o.calColNum(t,e.ptids,s)})),o.clusterItemsCache[t]=s.flat(),o.testCluster1(o.clusterItemsCache[t],r,i,n)}}}},{key:"testMinClusterZoom1",value:function(t,e,n){var r=this;this.layerPointNumLabel.clear(),t.forEach((function(t){r._addClusterLabel(t.geo.getCenter(),t.sum,t,e,n)})),this.dataItems.forEach((function(t){t.visibility=.1})),this._changePtVisible([])}},{key:"testCluster1",value:function(t,e,n,r){var i=this;this.layerPointNumLabel.clear();var o=[];t.forEach((function(t){if(t.length>1){var a=1/0,s=1/0,u=-1/0,c=-1/0,l=0;t.forEach((function(t){a=Math.min(a,i.dataItems[t].coordinate[0]),s=Math.min(s,i.dataItems[t].coordinate[1]),u=Math.max(u,i.dataItems[t].coordinate[0]),c=Math.max(c,i.dataItems[t].coordinate[1]),i.dataItems[t].visibility=.1,i.dataItems[t].data[r]?(l+=parseFloat(i.dataItems[t].data[r])||0,l=Math.floor(100*l)/100):l+=0}));var h=[(a+u)/2,(s+c)/2];i._addClusterLabelSmall(h,l,{},e,n)}else i.dataItems[t[0]].visibility=1,o.push(t[0])})),this._changePtVisible([]),this.hideInfoWindows(),this.addInfo(o)}},{key:"pointShowStatisticsByeTypeMultiple",value:function(t,e,n){var r=this;this.layerPointNumLabel.clear(),this.layerPointNumLabel.show(),this._deleteFunsKey();for(var i=[],o=0;o<e.length;o++)i.push({code:o,geo:e[o],geojson:e[o].toGeoJSON(),sum:0,val:t,ptnum:0});i.forEach((function(e){for(var i=function(i){var o=r.dataItems[i];t.filter((function(t){return t.includes(o.type)})).length>0&&am.containsCoordinate2(r.dataItems[i].coordinate,e.geojson)&&(e.ptnum+=1,r.dataItems[i].data[n]?e.sum+=parseFloat(r.dataItems[i].data[n])||0:e.sum+=0)},o=0;o<r.dataItems.length;o++)i(o)})),i.forEach((function(e){r._addClusterLabel(e.geo.getCenter(),e.sum,e).on("click",(function(e){r.selectItems=[];var n=e.target.properties.item;n.ptnum>0&&(setTimeout((function(){r.point.show()}),500),r._pointShowHide(n.val,n.geo),r._zoomSelect(t,n.geo))}))})),this._pointShowHide(t),this.map.getZoom()<9.4?this.point.hide():(this.point.show(),this.layerPointNumLabel.hide()),this.funcsNew.b=function(){r.isCtrol&&(r.map.getZoom()<9.4?(r.point.hide(),r.layerPointNumLabel.show()):(r.point.show(),r.layerPointNumLabel.hide()))}}},{key:"showValue",value:function(t){if(this.shader){var e=!0===t?0:1;this.shader.uniforms.flag.value=e,this.bzlayerNum&&(this.bzlayerNum.options.visible=t)}}},{key:"showName",value:function(t){this.layerLabel&&(this.layerLabel.options.visible=t)}},{key:"changeParaValue",value:function(t,e){var n=this;if(this.point){this.paraName=e||this.paraName;var r=this.point.object3d.geometry.attributes.color.array,i=this.point.object3d.geometry.attributes.fcolor1.array,o=this.point.object3d.geometry.attributes.opavalue.array;t.slice(0,1/0).map((function(t){var e=parseFloat(t.value)||0,r=parseFloat(t.opavalue)?parseFloat(t.opavalue):1,i="#fff";t.imgColor&&t.imgColor.length>=1&&(i=t.imgColor[0]);var o="#fff";t.imgColor&&t.imgColor.length>=2&&(o=t.imgColor[1]);var a=(parseFloat(t.windDirection)||0)+.01,s=(parseFloat(a*(Math.PI/180)),n.findItemByCode(t.code));if(void 0!==s&&(n.dataItems[s].color=i,n.dataItems[s].fcolor1=o,n.dataItems[s].pvalue=e,n.dataItems[s].opavalue=r,n.dataItems[s].data=t,n.bzlayerNum)){var u=Uy(e,n.paraName);n.bz_all_nums[s].getProperties().name=e,n.bz_all_nums[s].updateSymbol({textName:"{name}",textFill:u})}}));for(var a=0;a<this.dataItems.length;a++){var s=new Oi(this.dataItems[a].color);r[3*a+0]=s.r,r[3*a+1]=s.g,r[3*a+2]=s.b;var u=new Oi(this.dataItems[a].fcolor1);i[3*a+0]=u.r,i[3*a+1]=u.g,i[3*a+2]=u.b,o[a]=this.dataItems[a].opavalue}this.point.object3d.geometry.attributes.color.needsUpdate=!0,this.point.object3d.geometry.attributes.fcolor1.needsUpdate=!0,this.point.object3d.geometry.attributes.opavalue.needsUpdate=!0}}},{key:"dispose",value:function(){this.InforItems.length>0&&this.hideInfoWindows(),this.bzlayerNum&&(this.map.removeLayer(this.bzlayerNum),this.bz_all_nums=[]),qp(Vp(n.prototype),"dispose",this).call(this)}},{key:"_createShaderPol",value:function(t,e,n,r,i){return t.uniforms.imgdatas={value:n},t.uniforms.texture1={value:e},t.uniforms.textureSize={value:r},t.uniforms.size1={value:i},t.uniforms.flag={value:1},t.vertexShader="uniform float size1;\n attribute float imgflag;\n attribute float rotation;\n attribute vec3 color;\n attribute vec3 fcolor1;\n varying float vimgflag;\n attribute float visibility;\n varying float vVisible;\n varying float vRotation;\n varying vec3 vColor;\n varying vec3 vFcolor;\n attribute float opavalue;\n varying float vOpavalue;\n attribute float colorflag;\n varying float vColorflag;\n attribute float fcolorflag;\n varying float vFcolorflag;\n attribute float imgnum;\n varying float vImgnum;\n "+t.vertexShader,t.vertexShader=t.vertexShader.replace("#include <project_vertex>","\n #include <project_vertex>\n vimgflag = imgflag;\n vVisible = visibility;\n vRotation = rotation;\n vColor = color;\n vOpavalue = opavalue;\n vColorflag = colorflag;\n vFcolorflag = fcolorflag;\n vFcolor = fcolor1;\n vImgnum = imgnum;\n ").replace("gl_PointSize = size;","\n gl_PointSize = size1;\n "),t.fragmentShader="struct imgdata {\n float u;\n float v;\n float w;\n float h;\n };\n uniform imgdata imgdatas[".concat(n.length,"];\n uniform sampler2D texture1;\n uniform float textureSize;\n varying float vimgflag;\n varying float vVisible;\n varying float vRotation;\n varying vec3 vColor;\n varying float vOpavalue;\n varying float vColorflag;\n varying float vFcolorflag;\n varying float vImgnum;\n varying vec3 vFcolor;\n uniform int flag;\n ")+t.fragmentShader,t.fragmentShader=t.fragmentShader.replace("gl_FragColor = vec4( outgoingLight, diffuseColor.a );","\n highp int index = int(vimgflag);\n float width = gl_PointCoord.x / textureSize * imgdatas[index].w;\n float height = gl_PointCoord.y / textureSize * imgdatas[index].h;\n float x = imgdatas[index].u;\n float y = 1.0 - imgdatas[index].v;\n vec2 uv = vec2(x + width, y - height);\n\n float xx = x + 0.5 / textureSize * imgdatas[index].w;\n float yy = y - 0.5 / textureSize * imgdatas[index].h;\n float angle = 1.0;\n float s = sin(vRotation);\n float c = cos(vRotation);\n mat2 rotationMatrix = mat2( c, s,\n -s, c);\n vec2 pivot = vec2( xx, yy);\n uv = rotationMatrix * (uv - pivot) + pivot;\n\n vec4 rotatedTexture = texture2D( texture1, uv);\n vec4 texColor;\n if (vColorflag > 1.0) {\n texColor = vec4(vColor, vOpavalue) * rotatedTexture;\n } else {\n texColor = rotatedTexture;\n }\n\n if (vImgnum > 1.0 && flag == 1) {\n index += 1;\n width = gl_PointCoord.x / textureSize * imgdatas[index].w;\n height = gl_PointCoord.y / textureSize * imgdatas[index].h;\n x = imgdatas[index].u;\n y = 1.0 - imgdatas[index].v;\n vec4 img = texture2D( texture1, vec2(x + width, y - height) );\n vec4 Ca;\n if(vFcolorflag > 1.0){\n Ca = vec4(vFcolor, 1.0) * img;\n }\n else{\n Ca = img;\n }\n Ca.a *= Ca.r;\n\n\n // 第三种\n /*texColor.xyz *= texColor.a; //premultiply source \n gl_FragColor = mix(texColor, Ca, Ca.a);\n gl_FragColor.rgb /= gl_FragColor.a;*/\n \n vec3 rgb = mix(texColor.xyz * texColor.a, Ca.xyz, Ca.a);\n float a = Ca.a + texColor.a * (1. - Ca.a);\n vec4 dst = vec4(rgb / a, a);\n gl_FragColor = dst;\n\n /*vec3 rgb = mix(texColor.xyz * texColor.a, Ca.rgb, Ca.a);\n float a = Ca.a + texColor.a * (1. - Ca.a);\n vec4 dst = vec4(rgb, a);\n gl_FragColor = dst;*/\n \n // 第一种\n /*vec4 out_Color;\n outgoingLight *= texColor.xyz;\n gl_FragColor = vec4( outgoingLight, texColor.a * diffuseColor.a );\n gl_FragColor = mix(gl_FragColor, Ca, Ca.a);\n gl_FragColor.rgb /= gl_FragColor.a;*/\n \n } else {\n outgoingLight *= texColor.xyz;\n gl_FragColor = vec4( outgoingLight, texColor.a * diffuseColor.a );\n }\n\n if (vVisible < 0.5) discard;\n "),t}}]),n}(By),Vy=function(t){Jp(n,t);var e=Kp(n);function n(t,r,o){var a;return i(this,n),(a=e.call(this,t,r,o)).m&&(a.m.blending=R,a.m.blendSrc=F,a.m.blendDst=U,a.m.blendEquation=k),a}return a(n,[{key:"_getImgType",value:function(t,e,n){return void 0===this.typeValues[t]&&(0===Object.keys(this.typeValues).length?this.initTypeValue=.9:this.initTypeValue+=1,this.typeValues[t]={v:this.initTypeValue,img:e}),this.typeValues[t].v}},{key:"_loadTexture",value:function(){var t=u(regeneratorRuntime.mark((function t(){var e,n,r,i,o,a,s,u,c,l,h,f,d,p;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:e=[],t.t0=regeneratorRuntime.keys(this.typeValues);case 2:if((t.t1=t.t0()).done){t.next=32;break}if(n=t.t1.value,!this.typeValues[n].img||!Array.isArray(this.typeValues[n].img)){t.next=30;break}r=0;case 6:if(!(r<this.typeValues[n].img.length)){t.next=30;break}if(i=this.typeValues[n].img[r],o=i,!i.includes(".svg")){t.next=16;break}return t.next=12,fetch(i);case 12:return a=t.sent,t.next=15,a.text();case 15:o=t.sent;case 16:return s=new DOMParser,u=s.parseFromString(o,"image/svg+xml"),c=1*(u.documentElement.getAttribute("width")||1),l=1*(u.documentElement.getAttribute("height")||1),h=l/c,f=parseInt(40/h),d=parseInt(f*h),t.next=25,am.addImageProcess(o);case 25:p=t.sent,0===r?0===e.length&&e.push({type:"img",src:p,w:40,h:40,iw:f,ih:d}):(f=parseInt(16/h),d=parseInt(f*h),e.push({type:"img1",src:p,w:40,h:40,iw:f,ih:d}));case 27:r++,t.next=6;break;case 30:t.next=2;break;case 32:return t.abrupt("return",am.generateTexture(e));case 33:case"end":return t.stop()}}),t,this)})));return function(){return t.apply(this,arguments)}}()},{key:"addPoint",value:function(){var t=u(regeneratorRuntime.mark((function t(){var e,n,r,i,o=this;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(this.dataItems){t.next=2;break}return t.abrupt("return",null);case 2:return t.next=4,this._loadTexture();case 4:return e=t.sent,this.textures||(this.textures=[]),this.textures.push(e.texture),n=this._getRate(),this.m.onBeforeCompile=function(t){r=o._createWgShader(t,e.texture,e.xys,e.textureSize,o.markSize*n),o.shader=r},i=new zy(this.dataItems,{minZoom:this.minZoom},this.m,this._getMarkSize,this.threeLayer),this.isToolTip&&i.setToolTip("hello",{showTimeout:0,eventsPropagation:!0,dx:10}),i.object3d.renderOrder=this.order,this.point=i,this.point.parent=this,this.threeLayer.addMesh(this.point),this._bindMapEvents(),t.abrupt("return",i);case 17:case"end":return t.stop()}}),t,this)})));return function(){return t.apply(this,arguments)}}()},{key:"_createWgShader",value:function(t,e,n,r,i){return t.uniforms.imgdatas={value:n},t.uniforms.texture1={value:e},t.uniforms.textureSize={value:r},t.uniforms.size1={value:i},t.uniforms.flag={value:1},t.vertexShader="uniform float size1;\n attribute float imgflag;\n varying float vimgflag;\n attribute float visibility;\n varying float vVisible;\n attribute vec3 color;\n varying vec3 vColor;\n attribute float opavalue;\n varying float vOpavalue;\n attribute float fcolor;\n varying float vFcolor;\n attribute float rotation;\n varying float vRotation;\n "+t.vertexShader,t.vertexShader=t.vertexShader.replace("#include <project_vertex>","\n #include <project_vertex>\n vimgflag = imgflag;\n vVisible = visibility;\n vColor = color;\n vOpavalue = opavalue;\n vFcolor = fcolor;\n vRotation = rotation;\n ").replace("gl_PointSize = size;","\n gl_PointSize = size1;\n "),t.fragmentShader="struct imgdata {\n float u;\n float v;\n float w;\n float h;\n };\n uniform imgdata imgdatas[".concat(n.length,"];\n uniform sampler2D texture1;\n uniform float textureSize;\n varying float vimgflag;\n varying float vVisible;\n varying vec3 vColor;\n varying float vOpavalue;\n varying float vFcolor;\n varying float vRotation;\n uniform int flag;\n ")+t.fragmentShader,t.fragmentShader=t.fragmentShader.replace("gl_FragColor = vec4( outgoingLight, diffuseColor.a );","\n int index = 0;\n float width = gl_PointCoord.x / textureSize * imgdatas[index].w;\n float height = gl_PointCoord.y / textureSize * imgdatas[index].h;\n float x = imgdatas[index].u;\n float y = 1.0 - imgdatas[index].v;\n vec2 uv = vec2(x + width, y - height);\n\n float xx = x + 0.5 / textureSize * imgdatas[index].w;\n float yy = y - 0.5 / textureSize * imgdatas[index].h;\n float angle = 1.0;\n float s = sin(vRotation);\n float c = cos(vRotation);\n mat2 rotationMatrix = mat2( c, s,\n -s, c);\n vec2 pivot = vec2( xx, yy);\n uv = rotationMatrix * (uv - pivot) + pivot;\n\n vec4 rotatedTexture = texture2D( texture1, uv);\n vec4 texColor = vec4(vColor, vOpavalue) * rotatedTexture;\n outgoingLight *= texColor.xyz;\n //gl_FragColor = vec4( outgoingLight, texColor.a * diffuseColor.a );\n\n if(flag == 1){\n highp int index = int(vimgflag);\n index += 1;\n float width = gl_PointCoord.x / textureSize * imgdatas[index].w;\n float height = gl_PointCoord.y / textureSize * imgdatas[index].h;\n float x = imgdatas[index].u;\n float y = 1.0 - imgdatas[index].v;\n vec4 img = texture2D( texture1, vec2(x + width, y - height) );\n vec4 Ca;\n if(vFcolor > 1.0){\n Ca = vec4(0.0, 0.0, 0.0, 1.0) * img;\n }\n else{\n Ca = img;\n }\n //gl_FragColor = mix(gl_FragColor, Ca, Ca.a);\n\n texColor.xyz *= texColor.a; //premultiply source\n gl_FragColor = mix(texColor, Ca, Ca.a);\n gl_FragColor.rgb /= gl_FragColor.a;\n }\n\n\n /*float mid = 0.5;\n vec2 rotated = vec2(cos(vRotation) * (gl_PointCoord.x - mid) + sin(vRotation) * (gl_PointCoord.y - mid) + mid,\n cos(vRotation) * (gl_PointCoord.y - mid) - sin(vRotation) * (gl_PointCoord.x - mid) + mid);\n vec4 rotatedTexture = texture2D( bgtexture, rotated);\n vec2 pUv = gl_PointCoord;\n pUv.y = 1. - pUv.y;\n vec4 texColor = vec4(vColor, vOpavalue) * rotatedTexture;\n outgoingLight *= texColor.xyz;\n gl_FragColor = vec4( outgoingLight, texColor.a * diffuseColor.a );\n\n if(flag == 1){\n highp int index = int(vimgflag);\n float width = gl_PointCoord.x / textureSize * imgdatas[index].w;\n float height = gl_PointCoord.y / textureSize * imgdatas[index].h;\n float x = imgdatas[index].u;\n float y = 1.0 - imgdatas[index].v;\n vec4 img = texture2D( texture1, vec2(x + width, y - height) );\n vec4 Ca;\n if(vFcolor > 1.0){\n Ca = vec4(0.0, 0.0, 0.0, 1.0) * img;\n }\n else{\n Ca = img;\n }\n gl_FragColor = mix(gl_FragColor, Ca, Ca.a);\n }*/\n\n if (vVisible < 0.5) discard;\n "),t}}]),n}(function(t){Jp(n,t);var e=Kp(n);function n(t,r,o){var a;if(i(this,n),(a=e.call(this,t,r,o)).bzlayerNum)for(var s=a.bzlayerNum.getGeometries(),u=0;u<s.length;u++)a.bz_all_nums.push(s[u]);return a}return a(n,[{key:"_initChildVar",value:function(t,e){this.bzlayerNum=new Pp.VectorLayer(Pp.Util.GUID(),{minZoom:11,geometryEvents:!1,hitDetect:!1,visible:!1}).addTo(e.map),this.bz_all_nums=[],this.paraName=t.paraName||"pm25"}},{key:"changeParaValue",value:function(t,e){var n=this;if(this.point){this.paraName=e;var r=this.point.object3d.geometry.attributes.color.array,i=this.point.object3d.geometry.attributes.fcolor.array,o=this.point.object3d.geometry.attributes.opavalue.array;t.slice(0,1/0).map((function(t){var e=parseFloat(t.value)||0,r="#000"===Uy(e,n.paraName)?2:.9,i=Gy(e,n.paraName),o=1===parseInt(t.status)?1:0,a=parseFloat(t.value)?parseFloat(t.value):-1,s=1===o&&a<=0?.3:1,u=n.findItemByCode(t.code);void 0!==u&&(n.dataItems[u].color=i,n.dataItems[u].fcolor=r,n.dataItems[u].pvalue=e,n.dataItems[u].opavalue=s,n.dataItems[u].data=t)}));for(var a=0;a<this.dataItems.length;a++){var s=new Oi(this.dataItems[a].color);r[3*a+0]=s.r,r[3*a+1]=s.g,r[3*a+2]=s.b,i[a]=this.dataItems[a].fcolor,o[a]=this.dataItems[a].opavalue}this.point.object3d.geometry.attributes.color.needsUpdate=!0,this.point.object3d.geometry.attributes.fcolor.needsUpdate=!0,this.point.object3d.geometry.attributes.opavalue.needsUpdate=!0}}},{key:"_bindDataItem",value:function(t,e,n){var r=parseFloat(e.value)||0,i=e.status?1:0,o=e.value?parseFloat(e.value):-1,a=1===i&&o<=0?.3:1,s=Uy(r,this.paraName),u="#000"===s?2:.9,c=(parseFloat(e.windDirection)||0)+.01,l=parseFloat(c*(Math.PI/180));t.push({coordinate:[parseFloat(e.longitude),parseFloat(e.latitude)],height:0,color:Gy(r,this.paraName),fcolor:u,value:e.name,imgflag:n,rotation:l,visibility:1==e.visibility?1:.1,code:e.code,status:i,opavalue:a,pvalue:e.value||0,data:e}),new Pp.Marker([parseFloat(e.longitude),parseFloat(e.latitude)],{properties:{name:r,type:e.businessType,status:i,pvalue:r},symbol:{textFaceName:"sans-serif",textName:"{name}",textSize:12,textFill:s}}).addTo(this.bzlayerNum)}},{key:"_getImgType",value:function(t,e,n){return void 0===this.typeValues[t]&&(0===Object.keys(this.typeValues).length?this.initTypeValue=.9:this.initTypeValue+=1,this.typeValues[t]={v:this.initTypeValue,img:e.img,txt:e.txt}),this.typeValues[t].v}},{key:"_pointShowHide",value:function(t,e,n,r,i){var o=this;this.layerLabel&&this.layerLabel.clear();var a=function(a){var s=t.filter((function(t){return t===a}));o._itemHide(s,e,n,r,i,o.typeValues[a].v)};for(var s in this.typeValues)a(s)}},{key:"showValue",value:function(t){if(this.shader){var e=!0===t?0:1;this.shader.uniforms.flag.value=e,this.bzlayerNum&&(this.bzlayerNum.options.visible=t)}}},{key:"_loadTexture",value:function(){var t=u(regeneratorRuntime.mark((function t(){var e,n,r,i,o,a,s,u,c,l,h,f,d;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:e=[],t.t0=regeneratorRuntime.keys(this.typeValues);case 2:if((t.t1=t.t0()).done){t.next=28;break}if(n=t.t1.value,!this.typeValues[n].img){t.next=25;break}if(r=this.typeValues[n].img,i=r,!r.includes(".svg")){t.next=14;break}return t.next=10,fetch(r);case 10:return o=t.sent,t.next=13,o.text();case 13:i=t.sent;case 14:return a=new DOMParser,s=a.parseFromString(i,"image/svg+xml"),u=1*(s.documentElement.getAttribute("width")||1),c=1*(s.documentElement.getAttribute("height")||1),l=c/u,h=parseInt(40/l),f=parseInt(h*l),t.next=23,am.addImageProcess(i);case 23:d=t.sent,e.push({type:"img",src:d,w:40,h:40,iw:h,ih:f});case 25:this.typeValues[n].txt&&(e.push({type:"txt",src:this.typeValues[n].txt,w:40,h:40,color:"#000",size:20,offx:10,offy:26}),e.push({type:"txt",src:this.typeValues[n].txt,w:40,h:40,color:"#fff",size:20,offx:10,offy:26})),t.next=2;break;case 28:return console.log(e),t.abrupt("return",am.generateTexture(e));case 30:case"end":return t.stop()}}),t,this)})));return function(){return t.apply(this,arguments)}}()},{key:"addPoint",value:function(){var t=u(regeneratorRuntime.mark((function t(){var e,n,r,i,o=this;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(this.dataItems){t.next=2;break}return t.abrupt("return",null);case 2:return t.next=4,this._loadTexture();case 4:return e=t.sent,this.textures||(this.textures=[]),this.textures.push(e.texture),n=this._getRate(),this.m.onBeforeCompile=function(t){r=o._createBzShader(t,e.texture,e.xys,e.textureSize,3,o.markSize*n),o.shader=r},i=new zy(this.dataItems,{minZoom:this.minZoom},this.m,this._getMarkSize,this.threeLayer),this.isToolTip&&i.setToolTip("hello",{showTimeout:0,eventsPropagation:!0,dx:10}),i.object3d.renderOrder=this.order,this.point=i,this.point.parent=this,this.threeLayer.addMesh(this.point),this._bindMapEvents(),t.abrupt("return",i);case 17:case"end":return t.stop()}}),t,this)})));return function(){return t.apply(this,arguments)}}()},{key:"dispose",value:function(){this.bzlayerNum&&(this.map.removeLayer(this.bzlayerNum),this.bz_all_nums=[]),qp(Vp(n.prototype),"dispose",this).call(this)}},{key:"_createBzShader",value:function(t,e,n,r,i,o){return t.uniforms.imgdatas={value:n},t.uniforms.texture1={value:e},t.uniforms.textureSize={value:r},t.uniforms.textureOffset={value:i},t.uniforms.size1={value:o},t.uniforms.flag={value:1},t.vertexShader="uniform float size1;\n attribute float imgflag;\n varying float vimgflag;\n attribute float visibility;\n varying float vVisible;\n attribute vec3 color;\n varying vec3 vColor;\n attribute float opavalue;\n varying float vOpavalue;\n attribute float fcolor;\n varying float vFcolor;\n "+t.vertexShader,t.vertexShader=t.vertexShader.replace("#include <project_vertex>","\n #include <project_vertex>\n vimgflag = imgflag;\n vVisible = visibility;\n vColor = color;\n vOpavalue = opavalue;\n vFcolor = fcolor;\n ").replace("gl_PointSize = size;","\n gl_PointSize = size1;\n "),t.fragmentShader="struct imgdata {\n float u;\n float v;\n float w;\n float h;\n };\n uniform imgdata imgdatas[".concat(n.length,"];\n uniform sampler2D texture1;\n uniform float textureSize;\n uniform float textureOffset;\n varying float vimgflag;\n varying float vVisible;\n varying vec3 vColor;\n varying float vOpavalue;\n varying float vFcolor;\n uniform int flag;\n ")+t.fragmentShader,t.fragmentShader=t.fragmentShader.replace("gl_FragColor = vec4( outgoingLight, diffuseColor.a );","\n highp int index = int(vimgflag);\n if (index > 0) {\n //index += int(textureOffset);\n index = index * int(textureOffset);\n }\n float width = gl_PointCoord.x / textureSize * imgdatas[index].w;\n float height = gl_PointCoord.y / textureSize * imgdatas[index].h;\n float x = imgdatas[index].u;\n float y = 1.0 - imgdatas[index].v;\n vec4 texColor = vec4(vColor, vOpavalue) * texture2D( texture1, vec2(x + width, y - height) );\n outgoingLight *= texColor.xyz;\n gl_FragColor = vec4( outgoingLight, texColor.a * diffuseColor.a );\n\n if(flag == 1){\n if(vFcolor > 1.0){ \n index += 1;\n } else {\n index += 2;\n }\n width = gl_PointCoord.x / textureSize * imgdatas[index].w;\n height = gl_PointCoord.y / textureSize * imgdatas[index].h;\n x = imgdatas[index].u;\n y = 1.0 - imgdatas[index].v;\n vec4 Ca = texture2D( texture1, vec2(x + width, y - height) );\n gl_FragColor = mix(gl_FragColor, Ca, Ca.a);\n }\n\n if (vVisible < 0.5) discard;\n "),t}}]),n}(By));n("622a"),n("5ffc"),n("ac3e"),n("2ed2");var Zy=function(){function t(e){i(this,t),this.map=e,this.threeLayer=null,this.animationId=null}return a(t,[{key:"createIepLayer",value:function(t){var e=this,n=function(){var t="xxxxxxxxxxxx4xxxyxxxxxxxxxxxxxxx".replace(/[xy]/g,(function(t){var e=16*Math.random()|0;return("x"===t?e:3&e|8).toString(16)}));return"iep".concat(t,"layer")}();if(!this.threeLayer){var r=this.threeLayer=new Cy(n,function(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?Wp(Object(n),!0).forEach((function(e){Up(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Wp(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}({forceRenderOnMoving:!0,forceRenderOnRotating:!0,identifyCountOnEvent:1},t)),i=function t(){var n;r._needsUpdate=!r._needsUpdate,r._needsUpdate&&(null==r||null===(n=r.getRenderer())||void 0===n||n.clearCanvas(),r.renderScene()),e.animationId=requestAnimationFrame(t)};return this.threeLayer.prepareToDraw=function(t,e,n){var r=new Ph(16777215);r.position.set(0,-10,10).normalize(),e.add(r),i()},r.addTo(this.map),{layerId:n,layer:r}}}},{key:"removeIepLayer",value:function(){cancelAnimationFrame(this.animationId),this.threeLayer.getMeshes().forEach((function(t){var e;"Points"===t.type&&(null===(e=t.parent)||void 0===e||e.dispose())})),this.map.removeLayer(this.threeLayer),this.threeLayer=null,this.animationId=null}},{key:"prepareToDraw",value:function(t){var e=this;return new Promise((function(t){e.threeLayer.prepareToDraw=function(e,n,r){var i=new Ph(16777215);i.position.set(0,-10,10).normalize(),n.add(i),t()}}))}},{key:"drawPoint",value:function(t,e){var n=this;return this.createIepLayer(),this.threeLayer.getScene()?new Promise((function(r){var i=null;t.length>0?(i=new Wy(t,e,n.threeLayer)).addPoint().then((function(){r(i)})):r(i)})):new Promise((function(r){setTimeout((function(){var i=null;t.length>0?(i=new Wy(t,e,n.threeLayer)).addPoint().then((function(){r(i)})):r(i)}))}))}},{key:"drawbzPoint",value:function(t,e){console.error("请使用drawPoint绘制标准站点位")}},{key:"drawWgPoint",value:function(t,e){var n=this;return this.createIepLayer(),this.threeLayer.getScene()?new Promise((function(r){var i=new Vy(t,e,n.threeLayer);i.addPoint().then((function(){r(i)}))})):new Promise((function(r){setTimeout((function(){var i=new Vy(t,e,n.threeLayer);i.addPoint().then((function(){r(i)}))}))}))}},{key:"saveIndexedDb",value:function(){return new Promise((function(t,e){var n=window.indexedDB.open("iep_db");n.onsuccess=function(e){var n=e.target.result;t(n)},n.onerror=function(t){e(t)},n.onupgradeneeded=function(t){var e=t.target.result;if(!e.objectStoreNames.contains("svg_dict")){var n=e.createObjectStore("svg_dict",{keyPath:"code"});n.createIndex("code","code",{unique:!0}),n.createIndex("file","file",{unique:!1})}}}))}},{key:"getType",value:function(t){return Object.prototype.toString.call(t).slice(8,-1).toLowerCase()}},{key:"getDbRecord",value:function(t){var e=this,n="string"===this.getType(t)?[t]:t;return new Promise((function(t){e.saveIndexedDb().then((function(e){var r=e.transaction("svg_dict","readwrite").objectStore("svg_dict");Promise.all(n.map((function(t){return new Promise((function(e){var n=r.get(t);n.onsuccess=function(t){e(t.target.result)},n.onerror=function(t){e()}}))}))).then((function(e){t(e)}))}))}))}}]),t}(),qy=function(t){return new Zy(t)};
|
|
40
|
+
*/function iy(t,e,n){var r=oy(n),i=function(t){return t.min||0}(n),o=r-i,a=n.range||null,s=0,u=1024;a&&2===a.length&&(s=(a[0]-i)/o*1024),a&&2===a.length&&(u=(a[1]-i)/o*1024);for(var c,l=n.maxOpacity||.8,h=n.minOpacity||0,f=3,d=t.length;f<d;f+=4)c=4*t[f],t[f]/256>l&&(t[f]=256*l),t[f]/256<h&&(t[f]=256*h),c&&c>=s&&c<=u?(t[f-3]=e[c],t[f-2]=e[c+1],t[f-1]=e[c+2]):t[f]=0}function oy(t){return t.max||100}function ay(t,e,n){var r=oy(n),i=function(t){var e=t/2,n=t+e,r=1e4,i=Uv(2*n,2*n),o=i.getContext("2d");return o.shadowBlur=e,o.shadowColor="black",o.shadowOffsetX=o.shadowOffsetY=r,o.beginPath(),o.arc(n-r,n-r,t,0,2*Math.PI,!0),o.closePath(),o.fill(),i}(n._size||n.size||13),o=i.width/2,a=i.height/2,s=e,u={};for(var c in s.forEach((function(t){var e=void 0===t.count?1:t.count,n=Math.min(1,e/r).toFixed(2);u[n]=u[n]||[],u[n].push(t)})),u)if(!isNaN(c)){var l=u[c];t.beginPath(),n.withoutAlpha||(t.globalAlpha=c),l.forEach((function(e){var n=e.coordinate,s=void 0===e.count?1:e.count;t.globalAlpha=s/r,t.drawImage(i,n[0]-o,n[1]-a)}))}}var sy={draw:function(t,e,n){if(!(t.canvas.width<=0||t.canvas.height<=0)){var r=n.strength||.3;t.strokeStyle="rgba(0,0,0,"+r+")";var i=Uv(t.canvas.width,t.canvas.height),o=i.getContext("2d");o.scale(devicePixelRatio,devicePixelRatio),n=n||{},t.save();var a=new ry({gradient:n.gradient});if(ay(o,e,n),!n.absolute){var s=o.getImageData(0,0,t.canvas.width,t.canvas.height);iy(s.data,a.getImageData(),n),t.putImageData(s,0,0),t.restore()}a=null,i=null}},drawGray:ay,colorize:iy};const uy={altitude:0,interactive:!1,min:0,max:100,size:13,gradient:{.25:"rgb(0,0,255)",.55:"rgb(0,255,0)",.85:"yellow",1:"rgb(255,0,0)"},gridScale:.5};var cy=class extends Sm{constructor(t,e,n,r){Array.isArray(t)||(t=[t]);let i=1/0,o=1/0,a=-1/0,s=-1/0;const u=[];for(let e=0,n=t.length;e<n;e++){const{coordinate:n,lnglat:c,xy:l}=t[e],h=n||c||l;if(!h){console.warn("not find coordinate");continue}const f=r.coordinateToVector3(h);u.push(f);const{x:d,y:p}=f;i=Math.min(i,d),o=Math.min(o,p),a=Math.max(a,d),s=Math.max(s,p)}e=Pp.Util.extend({},uy,e,{layer:r,points:t});let{gridScale:c,altitude:l}=e;const h=Math.abs(a-i),f=Math.abs(s-o),d=Math.max(h*c,f*c);d>2048&&(console.warn(`gridScale: ${c} it's too big. I hope it's a smaller value,canvas max size is 2048* 2048`),c=2048/(d/c));const p=Math.ceil(h*c),m=Math.ceil(f*c),g=p/h,v=m/f,y=[];for(let e=0,n=u.length;e<n;e++){const n=u[e];n.x-=i,n.y-=o,n.x*=g,n.y*=v,n.y=m-n.y,y.push({coordinate:[n.x,n.y],count:t[e].count})}let _=Uv(p,m),x=_.getContext("2d");sy.drawGray(x,y,e);const b=x.getImageData(0,0,x.canvas.width,x.canvas.height);let w=-1/0;const M=new Float32Array(b.data.length/4),S=new Float32Array(b.data.length/4);for(let t=3,e=b.data.length,n=0;t<e;t+=4){const e=b.data[t];w=Math.max(w,e),S[n]=e,e<=0&&(M[n]=1),n++}const T=new ry({gradient:e.gradient});sy.colorize(b.data,T.getImageData(),e),_=null,x=null;const E=Yv(h,f,p-1,m-1),A=E.getIndex().array,C=E.attributes.position.array,P=new Float32Array(C.length),L=new Uint32Array(6*C.length),O=new Oi;let R=0;for(let t=0,e=C.length,n=0,r=A.length,i=0,o=b.data.length,a=0;t<Math.max(e,r,o);t+=3){if(t<e){const e=S[a];e>0&&(C[t+2]=e/w)}if(n<r){const t=A[n],e=A[n+1],r=A[n+2];M[t]&&M[e]&&M[r]||(L[R]=t,L[R+1]=e,L[R+2]=r,R+=3)}if(i<o){const t=`rgb(${b.data[i]},${b.data[i+1]},${b.data[i+2]})`;O.setStyle(t),P[n]=O.r,P[n+1]=O.g,P[n+2]=O.b}n+=3,i+=4,a++}const k=new Uint32Array(R);for(let t=0;t<R;t++)k[t]=L[t];E.setIndex(new Di(k,1)),fm(E,"color",new Di(P,3,!0)),n.vertexColors=dm(),super(),this._initOptions(e),this._createMesh(E,n);const I=r.distanceToVector3(l,l).x;this.getObject3d().position.copy(new or((i+a)/2,(o+s)/2,I)),this.type="HeatMap"}};const ly=new Oi;let hy=1;var fy=class{constructor(t){this.object3ds=[],this.layer=t,this.camera=t.getCamera(),this.renderer=t.getThreeRenderer(),this.pickingTexture=new nr(1,1),this.pickingScene=new eu}getColor(){return ly.setHex(hy),hy++,ly}add(t){if(t){const e=t._colorIndex;e&&(this.object3ds[e]=t,this.pickingScene.add(t))}return this}remove(t){if(t){const e=t._colorIndex;e&&(this.object3ds[e]=null,this.pickingScene.remove(t))}return this}isEmpty(){if(0===this.pickingScene.children.length)return!0;for(let t=0,e=this.pickingScene.children.length;t<e;t++){const e=this.pickingScene.children[t];if(e){const t=e.__parent;if(t&&!0===t.getOptions().interactive)return!1}}return!0}pick(t){if(!t)return;if(this.isEmpty())return;const{camera:e,renderer:n,pickingTexture:r,pickingScene:i,object3ds:o,layer:a}=this,s=this.pickingScene.children.length;for(let t=0;t<s;t++){const e=this.pickingScene.children[t];e&&e.__parent&&(e.__parent.picked=!1)}const{width:u,height:c}=a._getRenderer().canvas,l=r.width,h=r.height;u===l&&c===h||r.setSize(u,c),n.setRenderTarget(r),n.clear(),n.render(i,e);const f=new Uint8Array(4),{x:d,y:p}=t,m=window.devicePixelRatio,g=d*m,v=r.height-p*m;n.readRenderTargetPixels(r,Math.round(g),Math.round(v),1,1,f);const y=f[0]<<16|f[1]<<8|f[2],_=o[y];if(_)_.__parent&&(o[y].__parent.picked=!0);else for(let t=0;t<s;t++){const e=this.pickingScene.children[t];if(e&&e.__parent){const t=e.__parent;if(t._colorMap&&null!=t._colorMap[y]){t.picked=!0,t.index=t._colorMap[y];break}}}n.setRenderTarget(null)}};const dy={bottomHeight:0,altitude:0};var py=class extends Sm{constructor(t,e,n,r){e=Pp.Util.extend({},dy,e,{layer:r,lineString:t}),super(),this._initOptions(e);const{lineStrings:i,center:o}=Ng(t),a=[],s={};for(let t=0,n=i.length;t<n;t++){const n=Dg(i[t],r,o).positionsV;Wm(n,e.bottomHeight,r,s),Fg(a,n)}const u=new _m;u.setPositions(a),this._setMaterialRes(r,n),this._createLine2(u,n);const{altitude:c}=e,l=r.distanceToVector3(c,c).x,h=r.coordinateToVector3(o,l);this.getObject3d().position.copy(h),this._setPickObject3d(a,n.linewidth),this._init(),this.type="FatLine"}_init(){const t=this.getLayer().getPick();this.on("add",()=>{t.add(this.pickObject3d)}),this.on("remove",()=>{t.remove(this.pickObject3d)})}_setMaterialRes(t,e){const n=t.getMap().getSize(),r=n.width,i=n.height;e.resolution.set(r,i)}_setPickObject3d(t,e){const n=new _m;n.setPositions(t);const r=this.getLayer().getPick().getColor(),i=[];for(let e=0,n=t.length/3;e<n;e++)i.push(r.r,r.g,r.b);n.setColors(i);const o=new vm({color:"#fff",linewidth:e,vertexColors:dm()});this._setMaterialRes(this.getLayer(),o);const a=r.getHex(),s=new xm(n,o);s.position.copy(this.getObject3d().position),s._colorIndex=a,this.setPickObject3d(s)}identify(t){return this.picked}setSymbol(t){if(t&&t instanceof Si){t.needsUpdate=!0;const e=this.getMap().getSize(),n=e.width,r=e.height;t.resolution.set(n,r),this.getObject3d().material=t}return this}};const my={altitude:0,colors:null};class gy extends(cv(Sm)){constructor(t,e,n,r){Array.isArray(t)||(t=[t]);const i=[],o=[],a=t.length;for(let e=0;e<a;e++){const n=Ng(t[e]);i.push(n.center),o.push(n.lineStrings)}const s=Um(i);e=Pp.Util.extend({},my,e,{layer:r,lineStrings:t,coordinate:s});const u=[],c={};let l=0,h=[],f=[],d=0,p=[];for(let t=0;t<a;t++){const e=o[t];let n=0;for(let t=0,i=e.length;t<i;t++){const i=Pg(e[t])?e[t].properties:e[t].getProperties()||{},{positionsV:o}=Dg(e[t],r,s);Wm(o,i.bottomHeight,r,c),n+=2*o.length-2,Fg(p,o)}const i=n;h[t]=[l,l+i],l+=i,f[t]={position:{count:n,start:d,end:d+3*n},instanceStart:{count:n,start:d,end:d+3*n},instanceEnd:{count:n,start:d,end:d+3*n},hide:!1},d+=3*n}super(),this._initOptions(e);const m=new _m;m.setPositions(p),this._setMaterialRes(r,n),this._createLine2(m,n);const{altitude:g}=e,v=r.distanceToVector3(g,g).x,y=r.coordinateToVector3(s,v);this.getObject3d().position.copy(y),this._faceMap=h,this._baseObjects=u,this._datas=t,this._geometriesAttributes=f,this.faceIndex=null,this.index=null,this._geometryCache=new _m,this._geometryCache.setPositions(p),this._colorMap={},this.isHide=!1,this._initBaseObjectsEvent(u),this._setPickObject3d(p,n.linewidth),this._init(),this.type="FatLines"}_setMaterialRes(t,e){const n=t.getMap().getSize(),r=n.width,i=n.height;e.resolution.set(r,i)}_setPickObject3d(t,e){const n=this._geometryCache||new _m;n.setPositions(t);const r=this.getLayer().getPick(),{_geometriesAttributes:i}=this,o=Vm(i);let a=0;for(let t=0,e=i.length;t<e;t++){const e=r.getColor(),n=e.getHex();this._colorMap[n]=t;const{count:s}=i[t].position;this._datas[t].colorIndex=n;for(let t=0;t<s;t++)o[a]=e.r,o[a+1]=e.g,o[a+2]=e.b,a+=3}n.setColors(o);const s=new vm({color:"#fff",linewidth:e,vertexColors:dm()});this._setMaterialRes(this.getLayer(),s);const u=r.getColor().getHex(),c=new xm(n,s);c.position.copy(this.getObject3d().position),c._colorIndex=u,this.setPickObject3d(c)}identify(t){return this.picked}setSymbol(t){if(t&&t instanceof Si){t.needsUpdate=!0;const e=this.getMap().getSize(),n=e.width,r=e.height;t.resolution.set(n,r),this.getObject3d().material=t}return this}getSelectMesh(){const t=this._getIndex();if(null!=t){if(!this._baseObjects[t]){const e=this._datas[t],n=Pp.Util.extend({},this.getOptions(),{index:t},Pg(e)?e.properties:e.getProperties());this._baseObjects[t]=new py(e,n,this.getObject3d().material,this.getLayer()),this._proxyEvent(this._baseObjects[t])}return{data:this._datas[t],baseObject:this._baseObjects[t]}}}_updateAttribute(t,e){const{indexs:n}=this._getHideGeometryIndex(e),r=this._geometryCache.attributes[e].array,i=r.length;for(let e=0;e<i;e++)t.array[e]=r[e];for(let r=0;r<n.length;r++){const i=n[r],{start:o,end:a}=this._geometriesAttributes[i][e];for(let e=o;e<a;e++)t.array[e]=-1e5}return this}_showGeometry(t,e){let n;if(t&&(n=t.getOptions().index),null!=n){const t=this._geometriesAttributes[n],{hide:r}=t;if(r===e)return this;t.hide=e;const i=this.getObject3d().geometry;this._updateAttribute(i.attributes.instanceStart,"instanceStart"),this._updateAttribute(i.attributes.instanceEnd,"instanceEnd"),i.attributes.instanceStart.data.needsUpdate=!0,i.attributes.instanceEnd.data.needsUpdate=!0,this.isHide=e}return this}}var vy=gy;const yy={radius:10,height:100,altitude:0,topColor:"",bottomColor:"#2d2f61"};var _y=class extends Sm{constructor(t,e,n,r){e=Pp.Util.extend({},yy,e,{layer:r,coordinate:t}),super(),this._initOptions(e);const{height:i,radius:o,topColor:a,bottomColor:s,altitude:u}=e,c=r.distanceToVector3(i,i).x,l=r.distanceToVector3(o,o).x,h=Fm().clone();h.scale(2*l,2*l,c),a&&(zm(h,s,a,"z",c/2),n.vertexColors=dm()),this._createMesh(h,n);const f=r.distanceToVector3(u,u).x,d=r.coordinateToVector3(t,f);this.getObject3d().position.copy(d),this.type="Box"}};const xy={radius:10,height:100,altitude:0,topColor:null,bottomColor:"#2d2f61"};class by extends(cv(Sm)){constructor(t,e,n,r){Array.isArray(t)||(t=[t]);const i=t.length,o=Um(t),a=r.coordinateToVector3(o),s=[],u=[],c=[],l=[];let h=0,f=0,d=0,p=0;const m={};for(let e=0;e<i;e++){const i=Pp.Util.extend({index:e},xy,t[e]),{radius:o,altitude:g,topColor:v,bottomColor:y,height:_,coordinate:x}=i,b=Gm(o,r,m),w=Gm(_,r,m),M=Gm(g,r,m),S=Fm().clone();S.scale(2*b,2*b,w),v&&(zm(S,y,v,"z",w/2),n.vertexColors=dm());const T=r.coordinateToVector3(x).sub(a),E=S.attributes.position.array;for(let t=0,e=E.length;t<e;t+=3)E[t+2]+=M,E[t]+=T.x,E[t+1]+=T.y,E[t+2]+=T.z;s.push(S);const A=new _y(x,i,n,r);u.push(A);const C=S.index.count/3;l[e]=[h+1,h+C],h+=C;const P=S.attributes.position.count,L=S.attributes.normal.count,O=S.attributes.uv.count;c[e]={position:{count:P,start:f,end:f+3*P},normal:{count:L,start:d,end:d+3*L},uv:{count:O,start:p,end:p+2*O},hide:!1},f+=3*P,d+=3*L,p+=2*O}super(),e=Pp.Util.extend({},{altitude:0,layer:r,points:t},e),this._initOptions(e);const g=Nm(s);this._createMesh(g,n);const v=e.altitude,y=r.distanceToVector3(v,v).x,_=a.clone();_.z=y,this.getObject3d().position.copy(_),this._faceMap=l,this._baseObjects=u,this._datas=t,this._geometriesAttributes=c,this.faceIndex=null,this._geometryCache=g.clone(),this.isHide=!1,this._colorMap={},this._initBaseObjectsEvent(u),this._setPickObject3d(),this._init(),this.type="Boxs"}identify(t){return this.picked}}var wy=by;const My=Math.PI/180,Sy=[[4e3,220],[2e3,100],[1e3,30],[500,15],[100,5],[50,2],[10,1],[5,.7],[2,.1],[1,.05],[.5,.02]],Ty=["mousemove","click","mousedown","mouseup","dblclick","contextmenu","touchstart","touchmove","touchend"],Ey=new Pp.Coordinate(0,0),Ay=new Pp.Point(0,0);class Cy extends Pp.CanvasLayer{constructor(t,e){super(t,e),this._animationBaseObjectMap={},this._needsUpdate=!0,this._mousemoveTimeOut=0,this._baseObjects=[],this._delayMeshes=[],this.type="ThreeLayer"}isRendering(){const t=this.getMap();return!!t&&(t.isInteracting()||t.isAnimating())}prepareToDraw(...t){}draw(){this.renderScene()}drawOnInteracting(){this.renderScene()}coordinateToVector3(t,e=0){const n=this.getMap();if(!n)return null;const r=Array.isArray(t);r&&(Ey.x=t[0],Ey.y=t[1]),r||t instanceof Pp.Coordinate||(t=new Pp.Coordinate(t));const i=Ly(n),o=Oy(n,r?Ey:t,i,Ay);return new or(o.x,o.y,e)}distanceToVector3(t,e,n){if(0===t&&0===e||!Pp.Util.isNumber(t)||!Pp.Util.isNumber(e))return new or(0,0,0);const r=this.getMap(),i=Ly(r);let o=n||r.getCenter();o instanceof Pp.Coordinate||(o=new Pp.Coordinate(o));const a=r.locate(o,t,e),s=Oy(r,o,i),u=Oy(r,a,i),c=Math.abs(u.x-s.x)*Pp.Util.sign(t),l=Math.abs(u.y-s.y)*Pp.Util.sign(e);return new or(c,l,0)}toShape(t){if(!t)return null;if(t instanceof Pp.MultiPolygon)return t.getGeometries().map(t=>this.toShape(t));const e=t.getCenter(),n=this.coordinateToVector3(e),r=t.getShell().map(t=>{const e=this.coordinateToVector3(t).sub(n);return new Yn(e.x,e.y)}),i=new dh(r),o=t.getHoles();return o&&o.length>0&&(i.holes=o.map(t=>{const e=t.map(t=>{const e=this.coordinateToVector3(t).sub(n);return new Yn(e.x,e.y)});return new dh(e)})),i}toExtrudeMesh(t,e,n,r){if(!t)return null;if(t instanceof Pp.MultiPolygon)return t.getGeometries().map(t=>this.toExtrudeMesh(t,e,n,r));const i=t.getCoordinates();i.forEach(t=>{for(let e=t.length-1;e>=1;e--)t[e].equals(t[e-1])&&t.splice(e,1)}),t.setCoordinates(i);const o=this.toShape(t),a=this.coordinateToVector3(t.getCenter());r=Pp.Util.isNumber(r)?r:e,r=this.distanceToVector3(r,r).x;const s=this.distanceToVector3(e,e).x,u={bevelEnabled:!1,bevelSize:1};u[parseInt(h)>=93?"depth":"amount"]=r;const c=new Vc(o,u);let l=c;no.prototype.fromGeometry&&(l=new no,l.fromGeometry(c));const f=new bo(l,n);return f.position.set(a.x,a.y,s-r),f}toExtrudePolygon(t,e,n){return new $g(t,e,n,this)}toBar(t,e,n){return new Hm(t,e,n,this)}toLine(t,e,n){return new Hg(t,e,n,this)}toExtrudeLine(t,e,n){return new Jg(t,e,n,this)}toModel(t,e){return new Kg(t,e,this)}toExtrudeLineTrail(t,e,n){return new av(t,e,n,this)}toExtrudePolygons(t,e,n){return new gv(t,e,n,this)}toPoint(t,e,n){return new xv(t,e,n,this)}toPoints(t,e,n){return new Cv(t,e,n,this)}toBars(t,e,n){return new Ov(t,e,n,this)}toExtrudeLines(t,e,n){return new Iv(t,e,n,this)}toLines(t,e,n){return new zv(t,e,n,this)}toThreeVectorTileLayer(t,e,n){return new qv(t,e,n,this)}toTerrain(t,e,n){return new Kv(t,e,n,this)}toTerrainVectorTileLayer(t,e,n){return new ey(t,e,n,this)}toHeatMap(t,e,n){return new cy(t,e,n,this)}toFatLine(t,e,n){return new py(t,e,n,this)}toFatLines(t,e,n){return new vy(t,e,n,this)}toBox(t,e,n){return new _y(t,e,n,this)}toBoxs(t,e,n){return new wy(t,e,n,this)}getBaseObjects(){return this.getMeshes().filter(t=>t instanceof Sm)}getMeshes(){const t=this.getScene();if(!t)return[];const e=[];for(let n=0,r=t.children.length;n<r;n++){const r=t.children[n];r instanceof si&&!(r instanceof Co)&&e.push(r.__parent||r)}return e}clear(){return this.clearMesh()}clearMesh(){const t=this.getScene();if(!t)return this;for(let e=t.children.length-1;e>=0;e--){const n=t.children[e];if(n instanceof si&&!(n instanceof Co)){t.remove(n);const e=n.__parent;e&&e instanceof Sm&&(e.isAdd=!1,e._fire("remove",{target:e}),delete this._animationBaseObjectMap[n.uuid])}}return this}lookAt(t){const e=this._getRenderer();return e&&e.context.lookAt(t),this}getCamera(){const t=this._getRenderer();return t?t.camera:null}getScene(){const t=this._getRenderer();return t?t.scene:null}renderScene(){const t=this._getRenderer();return t&&(t.clearCanvas(),t.renderScene()),this}loop(t=!1){const e=this._delayMeshes;if(!e.length)return;const n=this.getMap();if(!n||n.isAnimating()||n.isInteracting())return;const r=this.options.loopRenderCount||50,i=e.slice(0,r);i&&this.addMesh(i,t),e.splice(0,r)}renderPickScene(){const t=this._getRenderer();if(t){const e=t.pick;e&&e.pick(this._containerPoint)}return this}getThreeRenderer(){const t=this._getRenderer();return t?t.context:null}getPick(){const t=this._getRenderer();return t?t.pick:null}delayAddMesh(t){if(!t)return this;Array.isArray(t)||(t=[t]);for(let e=0,n=t.length;e<n;e++)this._delayMeshes.push(t[e]);return this}addMesh(t,e=!0){if(!t)return this;Array.isArray(t)||(t=[t]);const n=this.getScene();return t.forEach(t=>{t instanceof Sm?(n.add(t.getObject3d()),t.isAdd||(t.isAdd=!0,t._fire("add",{target:t})),t._animation&&Pp.Util.isFunction(t._animation)&&(this._animationBaseObjectMap[t.getObject3d().uuid]=t)):t instanceof si&&n.add(t)}),this._zoomend(),e&&this.renderScene(),this}removeMesh(t,e=!0){if(!t)return this;Array.isArray(t)||(t=[t]);const n=this.getScene();return t.forEach(t=>{if(t instanceof Sm){n.remove(t.getObject3d()),t.isAdd&&(t.isAdd=!1,t._fire("remove",{target:t})),t._animation&&Pp.Util.isFunction(t._animation)&&delete this._animationBaseObjectMap[t.getObject3d().uuid];const e=this._delayMeshes;if(e.length)for(let n=0,r=e.length;n<r;n++)if(e[n]===t){e.splice(n,1);break}}else t instanceof si&&n.remove(t)}),e&&this.renderScene(),this}_initRaycaster(){return this._raycaster||(this._raycaster=new jf,this._mouse=new Yn),this}identify(t,e){if(!t)return console.error("coordinate is null,it should be Coordinate"),[];if(Array.isArray(t)&&(t=new Pp.Coordinate(t)),!(t instanceof Pp.Coordinate))return console.error("coordinate type is error,it should be Coordinate"),[];const n=this.getMap().coordToContainerPoint(t);this._containerPoint=n;const{x:r,y:i}=n;this._initRaycaster();const o=this._raycaster,a=this._mouse,s=this.getCamera(),u=this.getScene(),c=this.getMap().getSize();if(!u)return[];const l=c.width,h=c.height;a.x=r/l*2-1,a.y=-i/h*2+1,o.setFromCamera(a,s),function(t,e){hm>113?t.params.Line.threshold=e:t.linePrecision=e}(o,this._getLinePrecision(this.getMap().getResolution()));const f=[],d=[];u.children.forEach(t=>{const e=t.__parent;if(e&&e.getOptions){const n=e;n.getOptions().interactive&&n.isVisible()&&(n.identify&&Pp.Util.isFunction(n.identify)?d.push(n):f.push(t))}else(t instanceof bo||t instanceof qs)&&f.push(t)});let p=[];const m=o.intersectObjects(f,!0);m&&Array.isArray(m)&&m.length&&(p=m.map(t=>{let e=t.object;e=this._recursionMesh(e)||{};const n=e.__parent||e;return n.faceIndex=t.faceIndex,n.index=t.index,n})),this.renderPickScene(),d.length&&d.forEach(e=>{e.identify(t)&&p.push(e)});const g=p.length;for(let t=0;t<g;t++)if(p[t])for(let e=t+1;e<g;e++)p[t]===p[e]&&p.splice(e,1);const v=(e=Pp.Util.extend({},e)).count;return Pp.Util.isNumber(v)&&v>0?p.slice(0,v):p}_recursionMesh(t){for(;t&&t.parent!==this.getScene();)t=t.parent;return t}_getLinePrecision(t=10){for(let e=0,n=Sy.length;e<n;e++){const[n,r]=Sy[e];if(t>n)return r}return.01}_identifyBaseObjectEvents(t){if(!this.options.geometryEvents)return this;const e=this.map||this.getMap();if(e.isInteracting()||!e.options.geometryEvents)return this;const{type:n,coordinate:r}=t,i=Pp.Util.now();if(this._mousemoveTimeOut&&"mousemove"===n&&i-this._mousemoveTimeOut<64)return this;this._mousemoveTimeOut=i,e.resetCursor("default");const o=this.options.identifyCountOnEvent;let a=Math.max(0,Pp.Util.isNumber(o)?o:0);0===a&&(a=1/0);const s=this.identify(r,{count:a}),u=this.getScene();if(0===s.length&&u)for(let e=0,n=u.children.length;e<n;e++){const n=(u.children[e]||{}).__parent;n&&n.fire("empty",Object.assign({},t,{target:n}))}if("mousemove"===n){s.length&&e.setCursor("pointer");const i=[];this._baseObjects&&this._baseObjects.forEach(t=>{let e=!0;s.forEach(n=>{t===n&&(e=!1)}),e&&i.push(t)}),i.forEach(e=>{e&&e instanceof Sm&&(e.getSelectMesh?e.isHide||(e._mouseover=!1,e.fire("mouseout",Object.assign({},t,{target:e,type:"mouseout",selectMesh:null})),e.closeToolTip()):(e._mouseover=!1,e.fire("mouseout",Object.assign({},t,{target:e,type:"mouseout"})),e.closeToolTip()))}),s.forEach(e=>{if(e instanceof Sm){e._mouseover||(e.fire("mouseover",Object.assign({},t,{target:e,type:"mouseover",selectMesh:e.getSelectMesh?e.getSelectMesh():null})),e._mouseover=!0),e.fire(n,Object.assign({},t,{target:e,selectMesh:e.getSelectMesh?e.getSelectMesh():null}));const i=e.getToolTip();i&&!i._owner&&i.addTo(e),e.openToolTip(r)}}),this._baseObjects=s}else s.forEach(e=>{if(e instanceof Sm&&(e.fire(n,Object.assign({},t,{target:e,selectMesh:e.getSelectMesh?e.getSelectMesh():null})),"click"===n)){const t=e.getInfoWindow();t&&!t._owner&&t.addTo(e),e.openInfoWindow(r)}});return this}_zoomend(){const t=this.getScene();if(!t)return;const e=this.getMap().getZoom();t.children.forEach(t=>{const n=t.__parent;if(n&&n.getOptions){const t=n;t.zoomChange&&Pp.Util.isFunction(t.zoomChange)&&t.zoomChange(e);const r=t.getMinZoom(),i=t.getMaxZoom();e<r||e>i?(t.isVisible()&&(t.getObject3d().visible=!1),t._zoomVisible=!1):r<=e&&e<=i&&(t._visible&&(t.getObject3d().visible=!0),t._zoomVisible=!0)}})}onAdd(){super.onAdd();const t=this.map||this.getMap();return t?(Ty.forEach(e=>{t.on(e,this._identifyBaseObjectEvents,this)}),this._needsUpdate=!0,this._animationBaseObjectMap||(this._animationBaseObjectMap={}),t.on("zooming zoomend",this._zoomend,this),this):this}onRemove(){super.onRemove();const t=this.map||this.getMap();return t?(Ty.forEach(e=>{t.off(e,this._identifyBaseObjectEvents,this)}),t.off("zooming zoomend",this._zoomend,this),this):this}_callbackBaseObjectAnimation(){const t=this;if(t._animationBaseObjectMap)for(const e in t._animationBaseObjectMap)t._animationBaseObjectMap[e]._animation();return this}_getFovRatio(){const t=this.getMap().getFov();return Math.tan(t/2*My)}}Cy.mergeOptions({renderer:"gl",doubleBuffer:!1,glOptions:null,geometryEvents:!0,identifyCountOnEvent:0,forceRenderOnZooming:!0,loopRenderCount:50});class Py extends Pp.renderer.CanvasLayerRenderer{constructor(){super(...arguments),this._renderTime=0}getPrepareParams(){return[this.scene,this.camera]}getDrawParams(){return[this.scene,this.camera]}_drawLayer(){super._drawLayer.apply(this,arguments)}hitDetect(){return!1}createCanvas(){super.createCanvas(),this.createContext()}createContext(){if(this.canvas.gl&&this.canvas.gl.wrap)this.gl=this.canvas.gl.wrap();else{const t=this.layer.options.glOptions||{alpha:!0,depth:!0,antialias:!0,stencil:!0,preserveDrawingBuffer:!1};t.preserveDrawingBuffer=!0,this.gl=this.gl||this._createGLContext(this.canvas,t)}this._initThreeRenderer(),this.layer.onCanvasCreate(this.context,this.scene,this.camera)}_initThreeRenderer(){this.matrix4=new jr;const t=new $s({context:this.gl,alpha:!0});t.autoClear=!1,t.setClearColor(new Oi(1,1,1),0),t.setSize(this.canvas.width,this.canvas.height),t.clear(),this.context=t;const e=this.scene=new eu,n=this.layer.getMap(),r=n.getFov()*Math.PI/180,i=this.camera=new Po(r,n.width/n.height,n.cameraNear,n.cameraFar);i.matrixAutoUpdate=!1,this._syncCamera(),e.add(i),this.pick=new fy(this.layer)}onCanvasCreate(){super.onCanvasCreate()}resizeCanvas(t){if(!this.canvas)return;let e,n=this.getMap();e=t||n.getSize();const r=n.getDevicePixelRatio?n.getDevicePixelRatio():Pp.Browser.retina?2:1,i=this.canvas;i.height=r*e.height,i.width=r*e.width,this.layer._canvas&&i.style&&(i.style.width=e.width+"px",i.style.height=e.height+"px"),this.context.setSize(i.width,i.height)}clearCanvas(){this.canvas&&this.context.clear()}prepareCanvas(){return this.canvas?this.clearCanvas():this.createCanvas(),this.layer.fire("renderstart",{context:this.context}),null}renderScene(){const t=Pp.Util.now();t-this._renderTime>=16&&(this.layer._callbackBaseObjectAnimation(),this._renderTime=t),this._syncCamera(),this.context.render(this.scene,this.camera),this.completeRender()}remove(){delete this._drawContext,super.remove()}_syncCamera(){const t=this.getMap(),e=this.camera;e.matrix.elements=t.cameraWorldMatrix,e.projectionMatrix.elements=t.projMatrix,this.matrix4.invert?e.projectionMatrixInverse.elements=this.matrix4.copy(e.projectionMatrix).invert().elements:e.projectionMatrixInverse.elements=this.matrix4.getInverse(e.projectionMatrix).elements}_createGLContext(t,e){const n=["webgl2","webgl","experimental-webgl"];let r=null;for(let i=0;i<n.length;++i){try{r=t.getContext(n[i],e)}catch(t){}if(r)break}return r}}function Ly(t){return t.getGLRes?t.getGLRes():t.getGLZoom()}function Oy(t,e,n,r){return t.coordToPointAtRes?t.coordToPointAtRes(e,n,r):t.coordinateToPoint(e,n,r)}Cy.registerRenderer("gl",Py),Pp.registerWorkerAdapter&&Pp.registerWorkerAdapter("__maptalks.three__",'function(e){"use strict";var d=n,t=n;function n(e,t,n){n=n||2;var r,i,o,a,v,h=t&&t.length,l=h?t[0]*n:e.length,u=p(e,0,l,n,!0),x=[];if(!u||u.next===u.prev)return x;if(h&&(u=function(e,t,n,r){var i,o,a,v,h=[];for(i=0,o=t.length;i<o;i++)a=t[i]*r,v=i<o-1?t[i+1]*r:e.length,(v=p(e,a,v,r,!1))===v.next&&(v.steiner=!0),h.push(function(e){var t=e,n=e;for(;(t.x<n.x||t.x===n.x&&t.y<n.y)&&(n=t),t=t.next,t!==e;);return n}(v));for(h.sort(m),i=0;i<h.length;i++)!function(e,t){(t=function(e,t){var n,r=t,i=e.x,o=e.y,a=-1/0;do{if(o<=r.y&&o>=r.next.y&&r.next.y!==r.y){var v=r.x+(o-r.y)*(r.next.x-r.x)/(r.next.y-r.y);if(v<=i&&a<v){if((a=v)===i){if(o===r.y)return r;if(o===r.next.y)return r.next}n=r.x<r.next.x?r:r.next}}}while(r=r.next,r!==t);if(!n)return null;if(i===a)return n;var h,l=n,u=n.x,x=n.y,f=1/0;r=n;for(;i>=r.x&&r.x>=u&&i!==r.x&&M(o<x?i:a,o,u,x,o<x?a:i,o,r.x,r.y)&&(h=Math.abs(o-r.y)/(i-r.x),Z(r,e)&&(h<f||h===f&&(r.x>n.x||r.x===n.x&&function(e,t){return w(e.prev,e,t.prev)<0&&w(t.next,e,e.next)<0}(n,r)))&&(n=r,f=h)),r=r.next,r!==l;);return n}(e,t))&&(e=S(t,e),g(t,t.next),g(e,e.next))}(h[i],n),n=g(n,n.next);return n}(e,t,u,n)),e.length>80*n){for(var f=r=e[0],s=i=e[1],c=n;c<l;c+=n)(o=e[c])<f&&(f=o),(a=e[c+1])<s&&(s=a),r<o&&(r=o),i<a&&(i=a);v=0!==(v=Math.max(r-f,i-s))?1/v:0}return y(u,x,n,f,s,v),x}function p(e,t,n,r,i){var o,a;if(i===0<z(e,t,n,r))for(o=t;o<n;o+=r)a=v(o,e[o],e[o+1],a);else for(o=n-r;t<=o;o-=r)a=v(o,e[o],e[o+1],a);return a&&u(a,a.next)&&(f(a),a=a.next),a}function g(e,t){if(!e)return e;t=t||e;var n,r=e;do{if(n=!1,r.steiner||!u(r,r.next)&&0!==w(r.prev,r,r.next))r=r.next;else{if(f(r),(r=t=r.prev)===r.next)break;n=!0}}while(n||r!==t);return t}function y(e,t,n,r,i,o,a){if(e){!a&&o&&function(e,t,n,r){for(var i=e;null===i.z&&(i.z=b(i.x,i.y,t,n,r)),i.prevZ=i.prev,i.nextZ=i.next,i=i.next,i!==e;);i.prevZ.nextZ=null,i.prevZ=null,function(e){var t,n,r,i,o,a,v,h,l=1;do{for(n=e,o=e=null,a=0;n;){for(a++,r=n,t=v=0;t<l&&(v++,r=r.nextZ);t++);for(h=l;0<v||0<h&&r;)0!==v&&(0===h||!r||n.z<=r.z)?(n=(i=n).nextZ,v--):(r=(i=r).nextZ,h--),o?o.nextZ=i:e=i,i.prevZ=o,o=i;n=r}}while(o.nextZ=null,l*=2,1<a)}(i)}(e,r,i,o);for(var v,h,l=e;e.prev!==e.next;)if(v=e.prev,h=e.next,o?function(e,t,n,r){var i=e.prev,o=e,a=e.next;if(0<=w(i,o,a))return!1;var v=(i.x<o.x?i.x<a.x?i:a:o.x<a.x?o:a).x,h=(i.y<o.y?i.y<a.y?i:a:o.y<a.y?o:a).y,l=(i.x>o.x?i.x>a.x?i:a:o.x>a.x?o:a).x,u=(i.y>o.y?i.y>a.y?i:a:o.y>a.y?o:a).y,x=b(v,h,t,n,r),f=b(l,u,t,n,r),s=e.prevZ,c=e.nextZ;for(;s&&s.z>=x&&c&&c.z<=f;){if(s!==e.prev&&s!==e.next&&M(i.x,i.y,o.x,o.y,a.x,a.y,s.x,s.y)&&0<=w(s.prev,s,s.next))return!1;if(s=s.prevZ,c!==e.prev&&c!==e.next&&M(i.x,i.y,o.x,o.y,a.x,a.y,c.x,c.y)&&0<=w(c.prev,c,c.next))return!1;c=c.nextZ}for(;s&&s.z>=x;){if(s!==e.prev&&s!==e.next&&M(i.x,i.y,o.x,o.y,a.x,a.y,s.x,s.y)&&0<=w(s.prev,s,s.next))return!1;s=s.prevZ}for(;c&&c.z<=f;){if(c!==e.prev&&c!==e.next&&M(i.x,i.y,o.x,o.y,a.x,a.y,c.x,c.y)&&0<=w(c.prev,c,c.next))return!1;c=c.nextZ}return!0}(e,r,i,o):function(e){var t=e.prev,n=e,r=e.next;if(0<=w(t,n,r))return!1;var i=e.next.next;for(;i!==e.prev;){if(M(t.x,t.y,n.x,n.y,r.x,r.y,i.x,i.y)&&0<=w(i.prev,i,i.next))return!1;i=i.next}return!0}(e))t.push(v.i/n),t.push(e.i/n),t.push(h.i/n),f(e),e=h.next,l=h.next;else if((e=h)===l){a?1===a?y(e=function(e,t,n){var r=e;do{var i=r.prev,o=r.next.next}while(!u(i,o)&&x(i,r,r.next,o)&&Z(i,o)&&Z(o,i)&&(t.push(i.i/n),t.push(r.i/n),t.push(o.i/n),f(r),f(r.next),r=e=o),r=r.next,r!==e);return g(r)}(g(e),t,n),t,n,r,i,o,2):2===a&&function(e,t,n,r,i,o){var a=e;do{for(var v=a.next.next;v!==a.prev;){if(a.i!==v.i&&function(e,t){return e.next.i!==t.i&&e.prev.i!==t.i&&!function(e,t){var n=e;do{if(n.i!==e.i&&n.next.i!==e.i&&n.i!==t.i&&n.next.i!==t.i&&x(n,n.next,e,t))return!0}while(n=n.next,n!==e);return!1}(e,t)&&(Z(e,t)&&Z(t,e)&&function(e,t){var n=e,r=!1,i=(e.x+t.x)/2,o=(e.y+t.y)/2;for(;n.y>o!=n.next.y>o&&n.next.y!==n.y&&i<(n.next.x-n.x)*(o-n.y)/(n.next.y-n.y)+n.x&&(r=!r),n=n.next,n!==e;);return r}(e,t)&&(w(e.prev,e,t.prev)||w(e,t.prev,t))||u(e,t)&&0<w(e.prev,e,e.next)&&0<w(t.prev,t,t.next))}(a,v)){var h=S(a,v);return a=g(a,a.next),h=g(h,h.next),y(a,t,n,r,i,o),y(h,t,n,r,i,o)}v=v.next}}while((a=a.next)!==e)}(e,t,n,r,i,o):y(g(e),t,n,r,i,o,1);break}}}function m(e,t){return e.x-t.x}function b(e,t,n,r,i){return(e=1431655765&((e=858993459&((e=252645135&((e=16711935&((e=32767*(e-n)*i)|e<<8))|e<<4))|e<<2))|e<<1))|(t=1431655765&((t=858993459&((t=252645135&((t=16711935&((t=32767*(t-r)*i)|t<<8))|t<<4))|t<<2))|t<<1))<<1}function M(e,t,n,r,i,o,a,v){return 0<=(i-a)*(t-v)-(e-a)*(o-v)&&0<=(e-a)*(r-v)-(n-a)*(t-v)&&0<=(n-a)*(o-v)-(i-a)*(r-v)}function w(e,t,n){return(t.y-e.y)*(n.x-t.x)-(t.x-e.x)*(n.y-t.y)}function u(e,t){return e.x===t.x&&e.y===t.y}function x(e,t,n,r){var i=l(w(e,t,n)),o=l(w(e,t,r)),a=l(w(n,r,e)),v=l(w(n,r,t));return i!==o&&a!==v||(0===i&&h(e,n,t)||(0===o&&h(e,r,t)||(0===a&&h(n,e,r)||!(0!==v||!h(n,t,r)))))}function h(e,t,n){return t.x<=Math.max(e.x,n.x)&&t.x>=Math.min(e.x,n.x)&&t.y<=Math.max(e.y,n.y)&&t.y>=Math.min(e.y,n.y)}function l(e){return 0<e?1:e<0?-1:0}function Z(e,t){return w(e.prev,e,e.next)<0?0<=w(e,t,e.next)&&0<=w(e,e.prev,t):w(e,t,e.prev)<0||w(e,e.next,t)<0}function S(e,t){var n=new a(e.i,e.x,e.y),r=new a(t.i,t.x,t.y),i=e.next,o=t.prev;return(e.next=t).prev=e,(n.next=i).prev=n,(r.next=n).prev=r,(o.next=r).prev=o,r}function v(e,t,n,r){n=new a(e,t,n);return r?(n.next=r.next,(n.prev=r).next.prev=n,r.next=n):(n.prev=n).next=n,n}function f(e){e.next.prev=e.prev,e.prev.next=e.next,e.prevZ&&(e.prevZ.nextZ=e.nextZ),e.nextZ&&(e.nextZ.prevZ=e.prevZ)}function a(e,t,n){this.i=e,this.x=t,this.y=n,this.prev=null,this.next=null,this.z=null,this.prevZ=null,this.nextZ=null,this.steiner=!1}function z(e,t,n,r){for(var i=0,o=t,a=n-r;o<n;o+=r)i+=(e[a]-e[o])*(e[o+1]+e[a+1]),a=o;return i}function r(e,t){var n=e.length-1,r=[e[0]];return function e(t,n,r,i,o){for(var a,v,h,l,u,x,f,s=i,c=n+1;c<r;c++){var p=(v=t[c],h=t[n],l=t[r],p=f=x=u=void 0,u=h[0],x=h[1],f=l[0]-u,p=l[1]-x,0===f&&0===p||(1<(h=((v[0]-u)*f+(v[1]-x)*p)/(f*f+p*p))?(u=l[0],x=l[1]):0<h&&(u+=f*h,x+=p*h)),(f=v[0]-u)*f+(p=v[1]-x)*p);s<p&&(a=c,s=p)}i<s&&(1<a-n&&e(t,n,a,i,o),o.push(t[a]),1<r-a&&e(t,a,r,i,o))}(e,0,n,t,r),r.push(e[n]),r}function A(e,t,n){if(e.length<=2)return e;t=void 0!==t?t*t:1;return e=r(e=n?e:function(e,t){for(var n,r,i,o,a=e[0],v=[a],h=1,l=e.length;h<l;h++)n=e[h],i=a,o=void 0,o=(r=n)[0]-i[0],i=r[1]-i[1],t<o*o+i*i&&(v.push(n),a=n);return a!==n&&v.push(n),v}(e,t),t)}function R(e,t){var n=t[0],r=t[1],t=Math.sqrt(n*n+r*r);return e[0]=n/t,e[1]=r/t,e}function s(e,t,n,r){return e[0]=t[0]+n[0]*r,e[1]=t[1]+n[1]*r,e[2]=t[2]+n[2]*r,e}function F(e,t,n){return e[0]=t[0]-n[0],e[1]=t[1]-n[1],e[2]=t[2]-n[2],e}n.deviation=function(e,t,n,r){var i=t&&t.length,o=i?t[0]*n:e.length,a=Math.abs(z(e,0,o,n));if(i)for(var v=0,h=t.length;v<h;v++){var l=t[v]*n,u=v<h-1?t[v+1]*n:e.length;a-=Math.abs(z(e,l,u,n))}for(var x=0,v=0;v<r.length;v+=3){var f=r[v]*n,s=r[v+1]*n,c=r[v+2]*n;x+=Math.abs((e[f]-e[c])*(e[1+s]-e[1+f])-(e[f]-e[s])*(e[1+c]-e[1+f]))}return 0===a&&0===x?0:Math.abs((x-a)/a)},n.flatten=function(e){for(var t=e[0][0].length,n={vertices:[],holes:[],dimensions:t},r=0,i=0;i<e.length;i++){for(var o=0;o<e[i].length;o++)for(var a=0;a<t;a++)n.vertices.push(e[i][o][a]);0<i&&(r+=e[i-1].length,n.holes.push(r))}return n},d.default=t;var c=[];function ee(e,t,n,r){var i,o,a=(o=n,(i=t)[0]*o[0]+i[1]*o[1]+i[2]*o[2]),v=Math.acos(a)*r;return s(c,n,t,-a),r=(o=i=c)[0],n=o[1],a=o[2],o=Math.sqrt(r*r+n*n+a*a),i[0]=r/o,i[1]=n/o,i[2]=a/o,a=e,o=t,t=Math.cos(v),a[0]=o[0]*t,a[1]=o[1]*t,a[2]=o[2]*t,s(e,e,c,Math.sin(v)),e}function q(e,t,n){if(n-t<3)return 0;for(var r=0,i=2*(n-1),o=2*t;o<2*n;){var a=e[i],v=e[i+1],h=e[o],l=e[o+1],i=o;o+=2,r+=a*l-h*v}return r}var B=[],U=[],L=[];function O(e,t,n,r,i,o,a,v){var h=null!=a,l=i,u=null;h&&(u=new Uint32Array(r-n));for(var x=n;x<r;x++){var f=x===r-1?n:x+1,s=x===n?r-1:x-1,c=e[2*s],p=e[2*s+1],g=e[2*x],d=e[2*x+1],s=e[2*f],f=e[2*f+1];B[0]=g-c,B[1]=d-p,U[0]=s-g,U[1]=f-d,R(B,B),R(U,U),h&&(u[x]=l),v||x!==n?v||x!==r-1?(c=U,p=B,(s=L)[0]=c[0]+p[0],s[1]=c[1]+p[1],f=L[1],L[1]=-L[0],L[0]=f,R(L,L),s=U,p=(c=L)[0]*s[0]+c[1]*s[1],f=Math.sqrt(1-p*p),c=o*Math.min(10,1/f),h&&a<1/f&&o*p<0?(s=g+L[0]*o,p=d+L[1]*o,f=Math.acos(f)/2,f=Math.tan(f)*Math.abs(o),t[2*l]=s+L[1]*f,t[2*l+1]=p-L[0]*f,t[2*++l]=s-L[1]*f,t[2*l+1]=p+L[0]*f):(t[2*l]=g+L[0]*c,t[2*l+1]=d+L[1]*c)):(L[0]=B[1],L[1]=-B[0],R(L,L),t[2*l]=g+L[0]*o,t[2*l+1]=d+L[1]*o):(L[0]=U[1],L[1]=-U[0],R(L,L),t[2*l]=g+L[0]*o,t[2*l+1]=d+L[1]*o),l++}return u}function P(e,t,n,r,i){var o=null!=r?[]:new Float32Array(e.length);if(O(e,o,0,t&&t.length?t[0]:e.length/2,0,n,r,i),t)for(var a=0;a<t.length;a++){var v=t[a];O(e,o,v,t[a+1]||e.length/2,null!=r?o.length/2:v,n,r,i)}return o}function V(e,t,n,r){for(var i=0;i<Math.floor((r-n)/2);i++)for(var o=0;o<t;o++){var a=(i+n)*t+o,v=(r-i-1)*t+o,h=e[a];e[a]=e[v],e[v]=h}return e}function W(e){e.depth=e.depth||1,e.bevelSize=e.bevelSize||0,e.bevelSegments=null==e.bevelSegments?2:e.bevelSegments,e.smoothSide=e.smoothSide||!1,e.smoothBevel=e.smoothBevel||!1,e.simplify=e.simplify||0,"number"==typeof e.depth&&(e.bevelSize=Math.min(0<e.bevelSegments?e.bevelSize:0,e.depth/2)),0<e.bevelSize||(e.bevelSegments=0),e.bevelSegments=Math.round(e.bevelSegments);var t,n,r,i,o=e.boundingRect;e.translate=e.translate||[0,0],e.scale=e.scale||[1,1],e.fitRect&&(t=null==e.fitRect.x?o.x||0:e.fitRect.x,n=null==e.fitRect.y?o.y||0:e.fitRect.y,r=e.fitRect.width,i=e.fitRect.height,null==r?null!=i?r=i/o.height*o.width:(r=o.width,i=o.height):null==i&&(i=r/o.width*o.height),e.scale=[r/o.width,i/o.height],e.translate=[(t-o.x)*e.scale[0],(n-o.y)*e.scale[1]])}function j(e,t){function n(e,t,n,r){e[0]=t,e[1]=n,e[2]=r}for(var r,i,o,a,v,h,l,u=[],x=[],f=[],s=[],c=[],p=[],g=e.length,d=new Float32Array(t.length),y=0;y<g;){var m=3*e[y++],b=3*e[y++],M=3*e[y++];n(u,t[m],t[1+m],t[2+m]),n(x,t[b],t[1+b],t[2+b]),n(f,t[M],t[1+M],t[2+M]),F(s,u,x),F(c,x,f),r=p,o=c,l=h=v=a=void 0,a=(i=s)[0],v=i[1],h=i[2],l=o[0],i=o[1],o=o[2],r[0]=v*o-h*i,r[1]=h*l-a*o,r[2]=a*i-v*l;for(var w=0;w<3;w++)d[m+w]=d[m+w]+p[w],d[b+w]=d[b+w]+p[w],d[M+w]=d[M+w]+p[w]}for(var Z,S,z,A,R,q=0;q<d.length;)n(p,d[q],d[q+1],d[q+2]),R=A=z=void 0,z=(S=Z=p)[0],A=S[1],R=S[2],S=Math.sqrt(z*z+A*A+R*R),Z[0]=z/S,Z[1]=A/S,Z[2]=R/S,d[q++]=p[0],d[q++]=p[1],d[q++]=p[2];return d}var te=[[0,0],[1,0],[1,1],[0,0],[1,1],[0,1]];function H(e,t,n,r,i,o){var a=t.vertices,v=t.topVertices,h=t.depth,t=t.rect,l=r-n,u=o.smoothSide?1:2,x=l*u,f=o.smoothBevel?1:2,s=Math.min(h/2,o.bevelSize),c=o.bevelSegments,p=i.vertex,g=Math.max(t.width,t.height,h);if(0<s)for(var d=[0,0,1],y=[],m=[0,0,-1],b=[],M=0,w=new Float32Array(l),Z=0;Z<2;Z++)for(var S=0===Z?h-s:s,z=0;z<=c*f;z++){for(var A=0,R=void 0,q=void 0,F=0;F<l;F++){for(var B=0;B<u;B++){var U=2*((F+B)%l+n);y[0]=a[U]-v[U],y[1]=a[1+U]-v[1+U],y[2]=0;var L=Math.sqrt(y[0]*y[0]+y[1]*y[1]);y[0]/=L,y[1]/=L;var O=(Math.floor(z/f)+z%f)/c;0===Z?ee(b,d,y,O):ee(b,y,m,O);var P=0===Z?O:1-O,V=s*Math.sin(P*Math.PI/2),W=L*Math.cos(P*Math.PI/2),O=s*L/Math.sqrt(V*V+W*W),P=b[0]*O+v[U],L=b[1]*O+v[1+U],V=b[2]*O+S;e.position[3*i.vertex]=P,e.position[3*i.vertex+1]=L,e.position[3*i.vertex+2]=V,(0<F||0<B)&&(A+=Math.sqrt((R-P)*(R-P)+(q-L)*(q-L))),(0<z||0<Z)&&(W=3*(i.vertex-x),U=e.position[W],O=e.position[1+W],W=e.position[2+W],w[F]+=Math.sqrt((U-P)*(U-P)+(O-L)*(O-L)+(W-V)*(W-V))),e.uv[2*i.vertex]=A/g,e.uv[2*i.vertex+1]=w[F]/g,R=P,q=L,i.vertex++}if(1<f&&z%f||1==f&&1<=z)for(var j=0;j<6;j++){var H=(te[j][0]+F*u)%x,k=te[j][1]+M;e.indices[i.index++]=(k-1)*x+H+p}}M++}else for(var I=0;I<2;I++)for(var _=0===I?h-s:s,D=0,E=void 0,C=void 0,G=0;G<l;G++)for(var J=0;J<u;J++){var K=2*((G+J)%l+n),N=a[K],K=a[1+K];e.position[3*i.vertex]=N,e.position[3*i.vertex+1]=K,e.position[3*i.vertex+2]=_,(0<G||0<J)&&(D+=Math.sqrt((E-N)*(E-N)+(C-K)*(C-K))),e.uv[2*i.vertex]=D/g,e.uv[2*i.vertex+1]=_/g,E=N,C=K,i.vertex++}for(var Q=0<s?c*f+1:1,T=0;T<l;T++)for(var X=0;X<6;X++){var Y=(te[X][0]+T*u)%x,$=te[X][1]+Q;e.indices[i.index++]=($-1)*x+Y+p}}function k(e,t){for(var n=0,r=0,i=0;i<e.length;i++){var o=e[i],a=o.indices,v=o.vertices,h=o.holes,o=o.depth,l=v.length/2,u=0<Math.min(o/2,t.bevelSize)?t.bevelSegments:0;n+=a.length*(t.excludeBottom?1:2),r+=l*(t.excludeBottom?1:2);for(var x=2+2*u,f=0,s=0,c=0;c<(h?h.length:0)+1;c++){n+=6*((s=0===c?h&&h.length?h[0]:l:(f=h[c-1],h[c]||l))-f)*(x-1);var p=(s-f)*(t.smoothSide?1:2);r+=p*x+(t.smoothBevel?0:u*p*2)}}for(var g={position:new Float32Array(3*r),indices:new(65535<r?Uint32Array:Uint16Array)(n),uv:new Float32Array(2*r)},d={vertex:0,index:0},y=0;y<e.length;y++)!function(e,t,n,r){var i=e.indices,o=e.vertices,a=e.topVertices,v=e.rect,h=e.depth;if(!(o.length<=4)){for(var l=n.vertex,u=i.length,x=0;x<u;x++)t.indices[n.index++]=l+i[x];for(var f=Math.max(v.width,v.height),s=0;s<(r.excludeBottom?1:2);s++)for(var c=0;c<a.length;c+=2){var p=a[c],g=a[c+1];t.position[3*n.vertex]=p,t.position[3*n.vertex+1]=g,t.position[3*n.vertex+2]=(1-s)*h,t.uv[2*n.vertex]=(p-v.x)/f,t.uv[2*n.vertex+1]=(g-v.y)/f,n.vertex++}if(!r.excludeBottom)for(var d=o.length/2,y=0;y<u;y+=3)for(var m=0;m<3;m++)t.indices[n.index++]=l+d+i[y+2-m]}}(e[y],g,d,t);for(var m=0;m<e.length;m++){var b,M=e[m],w=M.holes,Z=M.vertices.length/2,S=w&&w.length?w[0]:Z;if(H(g,e[m],0,S,d,t),w)for(var z=0;z<w.length;z++)b=w[z],S=w[z+1]||Z,H(g,e[m],b,S,d,t)}for(var A=0;A<g.uv.length;A++){var R=g.uv[A];0<R&&Math.round(R)===R?g.uv[A]=1:g.uv[A]=R%1}return g.normal=j(g.indices,g.position),g.boundingRect=e[0]&&e[0].rect,g}function I(e,t){t=Object.assign({},t);for(var n=[1/0,1/0],r=[-1/0,-1/0],i=0;i<e.length;i++)D(e[i][0],n,r);t.boundingRect=t.boundingRect||{x:n[0],y:n[1],width:r[0]-n[0],height:r[1]-n[1]},W(t);for(var o=[],a=t.translate||[0,0],v=t.scale||[1,1],h=t.boundingRect,l={x:h.x*v[0]+a[0],y:h.y*v[1]+a[1],width:h.width*v[0],height:h.height*v[1]},u=Math.min(h.width,h.height)/1e5,x=0;x<e.length;x++){var f=function(e,t){for(var n=[],r=0;r<e.length;r++){for(var i=e[r],o=[],a=i.length,v=i[a-1][0],h=i[a-1][1],l=0,u=0;u<a;u++){var x=i[u][0],f=i[u][1],s=x-v,c=f-h;t<(l+=Math.sqrt(s*s+c*c))&&(o.push(i[u]),l=0),v=x,h=f}3<=o.length&&n.push(o)}return 0<n.length?n:null}(e[x],u);if(f){var s=t.simplify/Math.max(v[0],v[1]);if(f=0<s?function(e,t){for(var n=[],r=0;r<e.length;r++){var i=e[r];3<=(i=A(i,t,!0)).length&&n.push(i)}return 0<n.length?n:null}(f,s):f){for(var c=d.flatten(f),p=c.vertices,s=c.holes,f=c.dimensions,g=0;g<p.length;)p[g]=p[g++]*v[0]+a[0],p[g]=p[g++]*v[1]+a[1];if(!function(e,t){var n=e.length/2,r=0,i=t&&t.length?t[0]:n;0<q(e,r,i)&&V(e,2,r,i);for(var o=1;o<(t?t.length:0)+1;o++)q(e,r=t[o-1],i=t[o]||n)<0&&V(e,2,r,i)}(p,s),2!==f)throw new Error("Only 2D polygon points are supported");c=0<t.bevelSize?P(p,s,t.bevelSize,null,!0):p,f=d(c,s,f=void 0===(f=f)?2:f);o.push({indices:f,vertices:p,topVertices:c,holes:s,rect:l,depth:"function"==typeof t.depth?t.depth(x):t.depth})}}}return k(o,t)}function _(e,t){t=Object.assign({},t);for(var n=[1/0,1/0],r=[-1/0,-1/0],i=0;i<e.length;i++)D(e[i],n,r);t.boundingRect=t.boundingRect||{x:n[0],y:n[1],width:r[0]-n[0],height:r[1]-n[1]},W(t);var o=t.scale||[1,1];null==t.lineWidth&&(t.lineWidth=1),null==t.miterLimit&&(t.miterLimit=2);for(var a=[],v=0;v<e.length;v++){var h=e[v],l=t.simplify/Math.max(o[0],o[1]);0<l&&(h=A(h,l,!0)),a.push(function(e,t,n){for(var r=n.lineWidth,i=e.length,o=new Float32Array(2*i),a=n.translate||[0,0],v=n.scale||[1,1],h=0,l=0;h<i;h++)o[l++]=e[h][0]*v[0]+a[0],o[l++]=e[h][1]*v[1]+a[1];q(o,0,i)<0&&V(o,2,0,i);var u=[],x=[],f=n.miterLimit,s=O(o,x,0,i,0,-r/2,f,!1);V(o,2,0,i);for(var c=O(o,u,0,i,0,-r/2,f,!1),r=(u.length+x.length)/2,p=new Float32Array(2*r),g=0,d=x.length/2,y=0;y<x.length;y++)p[g++]=x[y];for(var m=0;m<u.length;m++)p[g++]=u[m];for(var b=new(65535<r?Uint32Array:Uint16Array)(3*(2*(i-1)+(r-2*i))),M=0,w=0;w<i-1;w++){var Z=w+1;b[M++]=d-1-s[w],b[M++]=d-1-s[w]-1,b[M++]=c[w]+1+d,b[M++]=d-1-s[w],b[M++]=c[w]+1+d,b[M++]=c[w]+d,c[Z]-c[w]==2?(b[M++]=c[w]+2+d,b[M++]=c[w]+1+d,b[M++]=d-s[Z]-1):s[Z]-s[w]==2&&(b[M++]=c[Z]+d,b[M++]=d-1-(s[w]+1),b[M++]=d-1-(s[w]+2))}return f=0<n.bevelSize?P(p,[],n.bevelSize,null,!0):p,r=n.boundingRect,{vertices:p,indices:b,topVertices:f,rect:{x:r.x*v[0]+a[0],y:r.y*v[1]+a[1],width:r.width*v[0],height:r.height*v[1]},depth:"function"==typeof n.depth?n.depth(t):n.depth,holes:[]}}(h,v,t))}return k(a,t)}function D(e,t,n){for(var r=0;r<e.length;r++)t[0]=Math.min(e[r][0],t[0]),t[1]=Math.min(e[r][1],t[1]),n[0]=Math.max(e[r][0],n[0]),n[1]=Math.max(e[r][1],n[1])}function E(e){for(var t=new Float32Array(e),n=[],r=0,i=t.length;r<i;r+=2){var o=t[r],a=t[r+1];n.push([o,a])}return n}function C(e,t){void 0===t&&(t=!1);for(var n,r,i,o,a=e.length,v=[],h=[],l=[],u=0,x=0,f=0,s=0,c=0;c<a;c++){var p=t?(p=e[c],r=i=n=o=i=r=n=void 0,n=p.data,r=p.height,i=p.width,o=p.bottomHeight,p=_(n,{lineWidth:i,depth:r}),n=p.position,i=p.normal,r=p.uv,p=p.indices,G(n,o),{position:n,normal:i,uv:r,indices:p}):(d=e[c],b=m=y=b=g=m=y=void 0,y=d.data,m=d.height,g=d.bottomHeight,b=I(y,{depth:m}),d=b.position,y=b.normal,m=b.uv,b=b.indices,G(d,g),{position:d,normal:y,uv:m,indices:b}),g=e[c].bottomHeight||0,d=p.position,y=p.normal,m=p.uv,b=p.indices;h.push(p);b=b.length/3;l[c]=[u+1,u+b],u+=b;d=d.length/3,y=y.length/3,m=m.length/2;v[c]={position:{middleZ:g+(e[c].height||0)/2,count:d,start:x,end:x+3*d},normal:{count:y,start:f,end:f+3*y},uv:{count:m,start:s,end:s+2*m},hide:!1},x+=3*d,f+=3*y,s+=2*m}var M=function(e){for(var t={},n={},r=0;r<e.length;++r){var i,o=e[r];for(i in o)void 0===t[i]&&(t[i]=[],n[i]=0),t[i].push(o[i]),n[i]+=o[i].length}var a,v={},h=0,l=[];for(a in t)if("indices"===a)for(var u=t[a],x=0,f=u.length;x<f;x++){for(var s=u[x],c=0,p=s.length;c<p;c++)l.push(s[c]+h);h+=t.position[x].length/3}else{var g=function(e,t){for(var n=new Float32Array(t),r=0,i=0;i<e.length;++i)n.set(e[i],r),r+=e[i].length;return n}(t[a],n[a]);if(!g)return null;v[a]=g}return v.indices=new Uint32Array(l),v}(h),w=M.position,Z=M.normal,S=M.uv,M=M.indices;return{position:w.buffer,normal:Z.buffer,uv:S.buffer,indices:M.buffer,faceMap:l,geometriesAttributes:v}}function G(e,t){if(void 0!==t&&"number"==typeof t&&0!==t)for(var n=0,r=e.length;n<r;n+=3)e[n+2]+=t}e.initialize=function(){},e.onmessage=function(e,t){var n=e.data,e=n.type,r=n.datas;if("Polygon"===e){!function(e){for(var t=e.length,n=0;n<t;n++)for(var r=e[n].data,i=0,o=r.length;i<o;i++)for(var a=r[i],v=0,h=a.length;v<h;v++)e[n].data[i][v]=E(a[v])}(r);n=C(r);t(null,n,[n.position,n.normal,n.uv,n.indices])}else if("LineString"===e){for(var i=0,o=r.length;i<o;i++)for(var a=0,v=r[i].data.length;a<v;a++)r[i].data[a]=E(r[i].data[a]);e=C(r,!0);t(null,e,[e.position,e.normal,e.uv,e.indices])}},Object.defineProperty(e,"__esModule",{value:!0})}');var Ry={altitude:0},ky=new or,Iy={positionsConvert:function(t){for(var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2?arguments[2]:void 0,r=[],i=0,o=t.length;i<o;i+=3){var a=t[i],s=t[i+1],u=t[i+2];e>0&&(u+=n.distanceToVector3(e,e).x),r.push(new or(a,s,u))}return r},vectors2Pixel:function(t,e,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,i=arguments.length>4?arguments[4]:void 0;t[0]instanceof or||(t=Iy.positionsConvert(t,r,i));var o=t.map((function(t){return Iy.vector2Pixel(t,e,n)}));return o},vector2Pixel:function(t,e,n){var r=t.project(n),i=e.width/2,o=e.height/2;return{x:Math.round(r.x*i+i),y:Math.round(-r.y*o+o)}}};function Dy(t,e,n){return t[e]||(t[e]=n.distanceToVector3(e,e).x),t[e]}function jy(t,e){var n=Math.pow(10,e);return Math.round(t*n)/n}var zy=function(t){Jp(n,t);var e=Kp(n);function n(t,r,o,a,s){var u;i(this,n),Array.isArray(t)||(t=[t]),r=Pp.Util.extend({},Ry,r,{layer:s,points:t});for(var c=1/0,l=1/0,h=-1/0,f=-1/0,d=0,p=t.length;d<p;d++){var m=t[d].coordinate,g=void 0,v=void 0;Array.isArray(m)?(g=m[0],v=m[1]):m instanceof Pp.Coordinate&&(g=m.x,v=m.y),c=Math.min(c,g),l=Math.min(l,v),h=Math.max(h,g),f=Math.max(f,v)}for(var y=s.coordinateToVector3([(c+h)/2,(l+f)/2]),_=lm.initGrids(c,l,h,f),x=_.grids,b=_.averageX,w=_.averageY,M=_.ROWS,S=(_.COLS,x.length,new Float32Array(3*t.length)),T=[],E=new Float32Array(3*t.length),A=new Float32Array(3*t.length),C=[],P=[],L=new Float32Array(t.length),O=new Float32Array(t.length),R=new Float32Array(t.length),k=new Float32Array(t.length),I=new Float32Array(t.length),D=new Float32Array(t.length),j=new Float32Array(t.length),z={},N={},F=new or(0,0,0),B=0,H=t.length;B<H;B++){var G=t[B],U=G.coordinate,W=G.height,V=G.color,Z=G.fcolor1,q=G.rotation,Y=G.imgflag,J=G.visibility,X=G.opavalue,$=G.colorflag,Q=G.fcolorflag,K=G.imgnum,tt=3*B,et=V instanceof Oi?V:new Oi(V);E[tt]=et.r,E[tt+1]=et.g,E[tt+2]=et.b,et=V instanceof Oi?V:new Oi(Z),A[tt]=et.r,A[tt+1]=et.g,A[tt+2]=et.b,L[B]=q,O[B]=Y,R[B]=J,k[B]=X,I[B]=$,D[B]=Q,j[B]=K;var nt=Dy(z,W,s),rt=s.coordinateToVector3(U,nt);F.x=rt.x,F.y=rt.y,F.z=rt.z,F.sub(y),S[tt]=F.x,S[tt+1]=F.y,S[tt+2]=F.z,T.push(rt),P[B]={position:{count:1,start:3*B,end:3*B+3},hide:!1};var it=jy((U[1]-l)/w,4),ot=jy((U[0]-c)/b,4);it-=1,ot-=1,it=Math.max(0,it),ot=Math.max(0,ot),it=Math.ceil(it);var at=(ot=Math.ceil(ot))*M+it;x[at]&&(x[at].positions.push(rt),x[at].indexs.push(B)),N[B]=!(J<.5)}var st=new no;st.setAttribute("position",new Wi(S,3,!0)),st.setAttribute("color",new Wi(E,3,!0)),st.setAttribute("rotation",new Wi(L,1,!0)),st.setAttribute("fcolor1",new Wi(A,3,!0)),st.setAttribute("imgflag",new Wi(O,1,!0)),st.setAttribute("visibility",new Wi(R,1,!0)),st.setAttribute("opavalue",new Wi(k,1,!0)),st.setAttribute("colorflag",new Wi(I,1,!0)),st.setAttribute("fcolorflag",new Wi(D,1,!0)),st.setAttribute("imgnum",new Wi(j,1,!0)),r.positions=T,(u=e.call(this))._initOptions(r),u._createPoints(st,o);var ut=r.altitude,ct=s.distanceToVector3(ut,ut).x,lt=y.clone();return lt.z=ct,u.getObject3d().position.copy(lt),u._baseObjects=C,u._datas=t,u.faceIndex=null,u._geometriesAttributes=P,u.isHide=!1,u._initBaseObjectsEvent(C),u._grids=x,u._indexs_hide=N,u._bindMapEvents(),u._markTypeFunc=a,u.parent=null,u.type="Points",u}return a(n,[{key:"_bindMapEvents",value:function(){var t=this,e=this.getMap(),n="zoomstart zooming zoomend movestart moving moveend pitch rotate";this.on("add",(function(){t._updateGrids(),e.on(n,t._updateGrids,t)})),this.on("remove",(function(){e.off(n,t._updateGrids,t)}))}},{key:"updatepoints",value:function(t){Array.isArray(t)||(t=[t]);for(var e=1/0,n=1/0,r=-1/0,i=-1/0,o=0,a=t.length;o<a;o++){var s=t[o].coordinate,u=void 0,c=void 0;Array.isArray(s)?(u=s[0],c=s[1]):s instanceof Pp.Coordinate&&(u=s.x,c=s.y),e=Math.min(e,u),n=Math.min(n,c),r=Math.max(r,u),i=Math.max(i,c)}for(var l=this.getLayer().coordinateToVector3([(e+r)/2,(n+i)/2]),h=lm.initGrids(e,n,r,i),f=h.length,d={},p=[],m=0,g=t.length;m<g;m++){var v=t[m],y=v.coordinate,_=Dy(d,v.height,this.getLayer()),x=this.getLayer().coordinateToVector3(y,_),b=x.clone().sub(l);p.push(b.x,b.y,b.z);for(var w=0;w<f;w++)if(h[w].containsCoordinate(y)){h[w].positions.push(x),h[w].indexs.push(m);break}}for(var M=this.getObject3d().geometry.attributes.position.array,S=0;S<p.length;S++)M[3*S+0]=p[3*S+0],M[3*S+1]=p[3*S+1],M[3*S+2]=p[3*S+2];this.getObject3d().geometry.attributes.position.needsUpdate=!0;var T=l.clone();T.z=0,this.getObject3d().position.copy(T),this._grids=h,this._updateGrids()}},{key:"_updateGrids",value:function(){var t=this.getMap();this._grids.forEach((function(e){e.indexs.length&&e.updateBBoxPixel(t)}))}},{key:"getSelectMesh",value:function(){var t=this.faceIndex;if(null!=t){if(!this._baseObjects[t]){var e=this._datas[t],n=e.coordinate,r=e.height,i=e.color;this._baseObjects[t]=this.getLayer().toPoint(n,{height:r,index:t,color:i},this.getObject3d().material),this._proxyEvent(this._baseObjects[t])}return{data:this._datas[t],baseObject:this._baseObjects[t]}}}},{key:"identify",value:function(t){var e=this.getLayer(),n=this.getMap().getSize(),r=this.getLayer().getCamera(),i=this.getOptions().altitude,o=this.getMap(),a=e.distanceToVector3(i,i).x,s=this._markTypeFunc(this),u=o.coordToContainerPoint(t),c=[];if(this._grids&&this._grids.forEach((function(t){t.indexs.length&&t.isRecCross(u,s)&&c.push(t)})),c.length<1)return!1;for(var l=0,h=c.length;l<h;l++)for(var f=0,d=c[l].positions.length;f<d;f++){var p=c[l].positions[f];ky.x=p.x,ky.y=p.y,ky.z=p.z+a;var m=Iy.vector2Pixel(ky,n,r);if(Math.sqrt(Math.pow(u.x-m.x,2)+Math.pow(u.y-m.y,2))<=s/2){if(this.faceIndex=c[l].indexs[f],!this._indexs_hide[this.faceIndex])continue;return!0}}return!1}}]),n}(cv(Sm)),Ny=(n("b7dd"),n("8f74"),n("d3f4")),Fy=n.n(Ny),By=function(){function t(e,n,r){var o=this;i(this,t);var a=n.altitude,s=n.isLabel,u=n.labelMinZoom,c=n.labelMaxZoom,l=n.labelLayerName,h=n.labelVisible,f=n.canvasSize,d=n.markSize,p=n.pointMinZoom,m=n.pointOrder,g=n.isToolTip,v=n.isPointNum,y=n.sizeType,_=n.iconFile;if(0!=e.length){var x=new Xu({sizeAttenuation:!1,transparent:!0,depthTest:!1});s&&l&&(this.layerLabel=new Pp.VectorLayer(l,{minZoom:u||15,geometryEvents:!1,hitDetect:!1,visible:h||!1}).addTo(r.map),this.all_labels=[]);var b=[];this.typeValues={},this.initTypeValue=-.9,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(b,t,e),o.layerLabel){var r=new Pp.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.canvasSize=f||48,this.markSize=d||40,this.m=x,this.dataItems=b,this.point=null,this.shader=null,this.minZoom=p||8,this.markType=0===y?0:1,this.order=m||0,this.isToolTip=g||!1,this.clickFunc=n.clickFunc||null,this.clickInfoFlag=void 0!==n.clickInfoFlag&&n.clickInfoFlag,this.iconFile=_||null,this.isPointNum=v||!1,this.iconFile&&(this.Infolayer=this.map.getLayer("infoLayer"),this.Infolayer||(this.Infolayer=new Pp.VectorLayer("infoLayer",{geometryEvents:!1,hitDetect:!1}).addTo(r.map))),this.clickInfoFlag&&(this.infoWindow=new Pp.ui.InfoWindow({custom:!0,dy:-48,content:"",autoOpenOn:null}).addTo(this.map)),this.layerPointNumLabel=new Pp.VectorLayer(Pp.Util.GUID(),{hitDetect:!1,zIndex:1001}).addTo(r.map),this.selectItems=[],this.funcsNew={},this.fitZoom=null,this.isCtrol=!0,this.rbush=new Fy.a,this.GLOBALSCALE=32768,this.XMAX=178,this.YMAX=85,this.MAXZOOM=31,this.SCALES=[];for(var w=0;w<this.MAXZOOM;w++)this.SCALES.push(129202.08021/Math.pow(2,w));this.clusterItemsCache={},this.clusterMinZoom=9,this.clusterMaxZoom=18,this.altitude=a,this.labelMaxZoom=c}else console.error("需要绘制的点位数量为0")}return 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",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.funcsNew)this.funcsNew[e]()}},{key:"addContent",value:function(){var t=u(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.clickFunc(this.infoWindow,e);case 3:t.next=7;break;case 5:return t.next=7,this.clickFunc(e);case 7:this.iconFile&&(this.Infolayer.clear(),new Pp.Marker([e.coordinate[0],e.coordinate[1]],{symbol:{markerFile:this.iconFile,markerWidth:48,markerHeight:48,markerDx:0,markerDy:0,markerOpacity:1}}).addTo(this.Infolayer)),this.clickInfoFlag&&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:"_setPointEvent",value:function(t){var e,n=t.selectMesh;if(n&&(e=n.data),"mousemove"===t.type&&e){var r=e.value;this.isToolTip&&(this.point.getToolTip()._content="".concat(r))}"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.Infolayer&&(this.map.removeLayer(this.Infolayer),delete this.Infolayer),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,delete this.setInfoContent),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",this._setPointEvent,this)}},{key:"clearIcon",value:function(){this.Infolayer&&this.Infolayer.clear(),this.infoWindow&&this.infoWindow.hide()}},{key:"_loadTexture",value:function(){var t=u(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.addGeometry(this.all_labels[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])):(n[i]=.1,this.point._indexs_hide[i]=!1)}this.point.object3d.geometry.attributes.visibility.needsUpdate=!0}},{key:"pointShowHideByCode",value:function(t,e){this.layerPointNumLabel&&this.layerPointNumLabel.clear(),this._deleteFunsKey(),this.selectItems=[],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 s=this.dataItems[a];t.includes(s.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]),s.visibility=1):s.visibility=.1}this._changePtVisible([]),e&&this.map.fitExtent(new Pp.Extent(n,r,i,o),0)}},{key:"_itemHide",value:function(t,e,n,r,i,o){var a,s=n||!0,u=r||!0;e&&"MultiPolygon"===e.getType()&&(a=e.toGeoJSON());var c=this.point.object3d.geometry.attributes.visibility.array;if(t.length>0){for(var l=0;l<this.dataItems.length;l++){var h=this.dataItems[l],f=!0;if(1===h.status?f=!0===s:0===h.status&&(f=!0===u),e&&(f&=!!("MultiPolygon"===e.getType()?am.containsCoordinate2(this.dataItems[l].coordinate,a):am.containsCoordinate1(this.dataItems[l].coordinate,e))),i&&i.rangeArr.length>0){var d=1*this.dataItems[l].pvalue;f&=!!am.isInLevels(i,d)}h.imgflag==o&&(f?(c[l]=1,this.point._indexs_hide[l]=!0,this.selectItems.push(l),this.layerLabel&&this.layerLabel.addGeometry(this.all_labels[l]),this.bzlayerNum&&this.bzlayerNum.addGeometry(this.bz_all_nums[l])):(c[l]=.1,this.point._indexs_hide[l]=!1))}this.point.object3d.geometry.attributes.visibility.needsUpdate=!0}else{for(var p=0;p<this.dataItems.length;p++)this.dataItems[p].imgflag==o&&(c[p]=.1,this.point._indexs_hide[p]=!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=u(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,s=-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]),s=Math.max(s,r.dataItems[t].coordinate[0]),u=Math.max(u,r.dataItems[t].coordinate[1])}));var c=[(o+s)/2,(a+u)/2];this._addClusterLabel(c,this.selectItems.length,{}).on("click",(function(){r.layerPointNumLabel.hide(),r.map.fitExtent(new Pp.Extent(o,a,s,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)&&am.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&&am.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,s=-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]),s=Math.max(s,r.dataItems[t].coordinate[1])})),this.layerPointNumLabel.hide(),this.map.fitExtent(new Pp.Extent(i,o,a,s),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",s=new Pp.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(s),new Pp.Marker(t,{properties:{name:e},symbol:{textFaceName:"sans-serif",textName:"{name}",textSize:{stops:[[9,12],[12,18],[15,24]]},textFill:a}}).addTo(this.layerPointNumLabel),s}},{key:"_addClusterLabel",value:function(t,e,n,r,i){var o=r||"#50fcfc",a=i||"#000",s=new Pp.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(s),new Pp.Marker(t,{properties:{name:e},symbol:{textFaceName:"sans-serif",textName:"{name}",textSize:{stops:[[9,12],[12,18],[15,24]]},textFill:a}}).addTo(this.layerPointNumLabel),s}},{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 u=0;u<this.dataItems.length;u++)if(e.includes(u))if(t>=18){var c=[u];o.push(c)}else i.includes(u)||function(){var t=r.getRect(r.dataItems[u]),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 c=o[a[0]].concat(n.filter((function(t){return!o[a[0]].includes(t)})));o[a[0]]=c.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 am.vector2Pixel(t,e,n)}}]),t}(),Hy={factor:{aqi:{unit:"",name:"AQI",colorMap:{"00e400":[0,50],ffff00:[50,100],ff7e00:[100,150],ff0000:[150,200],"99004c":[200,300],"7e0023":[300,500],"6e6e6e":[500]},degreeMap:{"00e400":"(优)",ffff00:"(良)",ff7e00:"(轻度)",ff0000:"(中度)","99004c":"(重度)","7e0023":"(严重)"}},pm25:{unit:"μg/m³",name:"PM2.5",colorMap:{"00e400":[0,35],ffff00:[35,75],ff7e00:[75,115],ff0000:[115,150],"99004c":[150,250],"7e0023":[250,500],"7e0022":[500]},degreeMap:{"00e400":"(优)",ffff00:"(良)",ff7e00:"(轻度)",ff0000:"(中度)","99004c":"(重度)","7e0023":"(严重)"}},pm10:{unit:"μg/m³",name:"PM10",colorMap:{"00e400":[0,50],ffff00:[50,150],ff7e00:[150,250],ff0000:[250,350],"99004c":[350,420],"7e0023":[420,600],"7e0022":[600]},degreeMap:{"00e400":"(优)",ffff00:"(良)",ff7e00:"(轻度)",ff0000:"(中度)","99004c":"(重度)","7e0023":"(严重)"}},so2:{unit:"μg/m³",name:"SO₂",colorMap:{"00e400":[0,50],ffff00:[50,150],ff7e00:[150,475],ff0000:[475,800],"99004c":[800,1600],"7e0023":[1600,2620],"6e6e6e":[2620]},degreeMap:{"00e400":"(优)",ffff00:"(良)",ff7e00:"(轻度)",ff0000:"(中度)","99004c":"(重度)","7e0023":"(严重)"}},no2:{unit:"μg/m³",name:"NO₂",colorMap:{"00e400":[0,40],ffff00:[40,80],ff7e00:[80,180],ff0000:[180,280],"99004c":[280,565],"7e0023":[565,940],"6e6e6e":[940]},degreeMap:{"00e400":"(优)",ffff00:"(良)",ff7e00:"(轻度)",ff0000:"(中度)","99004c":"(重度)","7e0023":"(严重)"}},co:{unit:"mg/m³",name:"CO",colorMap:{"00e400":[0,2],ffff00:[2,4],ff7e00:[4,14],ff0000:[14,24],"99004c":[24,36],"7e0023":[36,60],"6e6e6e":[60]},degreeMap:{"00e400":"(优)",ffff00:"(良)",ff7e00:"(轻度)",ff0000:"(中度)","99004c":"(重度)","7e0023":"(严重)"}},o3:{unit:"μg/m³",name:"O₃",colorMap:{"00e400":[0,100],ffff00:[100,160],ff7e00:[160,215],ff0000:[215,265],"99004c":[265,800],"7e0023":[800,1200],"6e6e6e":[1200]},degreeMap:{"00e400":"(优)",ffff00:"(良)",ff7e00:"(轻度)",ff0000:"(中度)","99004c":"(重度)","7e0023":"(严重)"}},ci:{unit:"μg/m³",name:"CI",colorMap:{"00e400":[0,1.3],ffff00:[1.3,4],ff7e00:[4,8],ff0000:[8,12],"99004c":[12,20],"7e0023":[20]},degreeMap:{"00e400":"(优)",ffff00:"(良)",ff7e00:"(轻度)",ff0000:"(中度)","99004c":"(重度)","7e0023":"(严重)"}},tsp:{unit:"μg/m³",name:"TSP",colorMap:{"00e400":[0,120],ffff00:[120,300],ff7e00:[300,400],ff0000:[400,500],"99004c":[500,625],"7e0023":[625,3e3],"6e6e6e":[3e3]},degreeMap:{"00e400":"",ffff00:"",ff7e00:"",ff0000:"","99004c":"","7e0023":""}},voc:{unit:"mg/m³",name:"VOC",colorMap:{"00e400":[0,.19],ffff00:[.19,.59],ff7e00:[.59,1.79],ff0000:[1.79,2.29],"99004c":[2.29,3],"7e0023":[3]},degreeMap:{"00e400":"",ffff00:"",ff7e00:"",ff0000:"","99004c":"","7e0023":""}},temperature:{unit:"℃",name:"温度",colorMap:{"8274cc":[-40,-30],acb3e2:[-30,-20],"95d0d8":[-20,-10],"61afff":[-10,0],"87b922":[0,10],e5aa06:[10,20],e45914:[20,30],"8a2b0a":[30]},degreeMap:{"8274cc":"",acb3e2:"","95d0d8":"","61afff":"","87b922":"",e5aa06:"",e45914:"","8a2b0a":""}},humidity:{unit:"%",name:"湿度",colorMap:{c4be20:[0,20],c4be21:[20,40],"4fcb46":[40,60],"45afde":[60,80],"6661f1":[80]},degreeMap:{c4be20:"",c4be21:"","4fcb46":"","45afde":"","6661f1":""}},pressure:{unit:"Pa",name:"气压",colorMap:{"6493FF":[1,1e17]},degreeMap:{"6493FF":""}}},colorForValue:{"00e400":"优",ffff00:"良",ff7e00:"轻度",ff0000:"中度","99004c":"重度","7e0023":"严重","6e6e6e":"无"},colorForFont:{"#00e400":"#000","#ffff00":"#000","#ff7e00":"#fff","#ff0000":"#fff","#99004c":"#fff","#7e0023":"#fff","#6e6e6e":"#fff"},wind:{"东北⻛":[22.5,67.5],"东⻛":[67.5,112.5],"东南⻛":[112.5,157.5],"南⻛":[157.5,202.5],"⻄南⻛":[202.5,247.5],"⻄⻛":[247.5,292.5],"⻄北⻛":[292.5,337.5]},windLevel:{"0级":[0,.2],"1级":[.2,1.5],"2级":[1.5,3.3],"3级":[3.3,5.4],"4级":[5.4,7.9],"5级":[7.9,10.7],"6级":[10.7,13.8],"7级":[13.8,17.1],"8级":[17.1,20.7],"9级":[20.7,24.4],"10级":[24.4,28.4],"11级":[28.4,32.6]},windLevelZh:{"零级(⽆⻛)":[0,.2],"⼀级(软⻛)":[.2,1.5],"⼆级(轻⻛)":[1.5,3.3],"三级(微⻛)":[3.3,5.4],"四级(和⻛)":[5.4,7.9],"五级(劲⻛)":[7.9,10.7],"六级(强⻛)":[10.7,13.8],"七级(疾⻛)":[13.8,17.1],"⼋级(⼤⻛)":[17.1,20.7],"九级(烈⻛)":[20.7,24.4],"⼗级(狂⻛)":[24.4,28.4],"⼗⼀级(暴⻛)":[28.4,32.6]}},Gy=function(t,e){if(!e)return"#8a97a0";var n=(Hy.factor[e]||Hy.factor[e.toLowerCase()]||{}).colorMap;if(!n)return"#8a97a0";for(var r in t=+t,n){if(1===n[r].length&&n[r][0]<t)return"#"+r;if(n[r][0]<t&&t<=n[r][1])return"#"+r}return"#8a97a0"},Uy=function(t,e){return Hy.colorForFont[Gy(t,e.toLowerCase())]},Wy=function(t){Jp(n,t);var e=Kp(n);function n(t,r,o){var a;return i(this,n),(a=e.call(this,t,r,o)).InforItems=[],a.curZoom=9,a.clusterMinZoom=9,a}return a(n,[{key:"_initChildVar",value:function(t,e){!0===t.addValueLabel&&(this.bzlayerNum=new Pp.VectorLayer(Pp.Util.GUID(),{minZoom:11,geometryEvents:!1,hitDetect:!1,visible:!1}).addTo(e.map),this.bz_all_nums=[],this.valueFaceName=t.valueFaceName||"microsoft yahei",this.valueFontSize=t.valueFontSize||12,this.valueDy=t.valueDy||0,this.valueDx=t.valueDx||0),this.paraName=t.paraName||"pm25",this.typeImgNum=-1}},{key:"_bindDataItem",value:function(t,e,n){var r=parseFloat(e.value)||0,i=parseFloat(e.opavalue)?parseFloat(e.opavalue):1,o=0;e.imgSrc&&(o=e.imgSrc.length);var a=.9,s="#fff";e.imgColor&&e.imgColor.length>=1&&(a=1.9,s=e.imgColor[0]);var u=.9,c="#fff";e.imgColor&&e.imgColor.length>=2&&(u=1.9,c=e.imgColor[1]);var l=(parseFloat(e.windDirection)||0)+.01,h=parseFloat(l*(Math.PI/180));if(t.push({coordinate:[parseFloat(e.longitude),parseFloat(e.latitude)],height:0,color:s,colorflag:a,fcolorflag:u,fcolor1:c,imgnum:o,value:e.name,imgflag:n,rotation:h,visibility:1==e.visibility?1:.1,code:e.code,opavalue:i,pvalue:e.value||0,data:e.data}),this.bzlayerNum){var f=e.valueFontColr||Uy(r,this.paraName),d=new Pp.Marker([parseFloat(e.longitude),parseFloat(e.latitude)],{properties:{name:r,type:e.businessType,pvalue:r},symbol:{textFaceName:this.valueFaceName,textName:"{name}",textSize:this.valueFontSize,textFill:f,textDx:this.valueDx,textDy:this.valueDy}});1==e.visibility&&this.bzlayerNum.addGeometry(d),this.bz_all_nums.push(d)}}},{key:"_getRate",value:function(){if(1===this.markType)return qp(Vp(n.prototype),"_getRate",this).call(this);var t=this.map.getZoom()-3;return.1*(t=t>9?9:t)+.1}},{key:"_getImgType",value:function(t,e,n){return void 0===this.typeValues[t]&&(0===Object.keys(this.typeValues).length?this.initTypeValue=.9:this.initTypeValue+=this.typeImgNum,this.typeImgNum=e.length,this.typeValues[t]={v:this.initTypeValue,img:e,inImgWidth:parseInt(n.inImgWidth)||16}),this.typeValues[t].v}},{key:"_pointShowHide",value:function(t,e,n,r,i){var o=this;this.layerLabel&&this.layerLabel.clear();var a=function(a){var s=t.filter((function(t){return t===a}));o._itemHide(s,e,n,r,i,o.typeValues[a].v)};for(var s in this.typeValues)a(s)}},{key:"_loadTexture",value:function(){var t=u(regeneratorRuntime.mark((function t(){var e,n,r,i,o,a,s,u,c,l,h,f,d,p;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:e=[],t.t0=regeneratorRuntime.keys(this.typeValues);case 2:if((t.t1=t.t0()).done){t.next=32;break}if(n=t.t1.value,!this.typeValues[n].img||!Array.isArray(this.typeValues[n].img)){t.next=30;break}r=0;case 6:if(!(r<this.typeValues[n].img.length)){t.next=30;break}if(i=this.typeValues[n].img[r],o=i,!i.includes(".svg")){t.next=16;break}return t.next=12,fetch(i);case 12:return a=t.sent,t.next=15,a.text();case 15:o=t.sent;case 16:return s=new DOMParser,u=s.parseFromString(o,"image/svg+xml"),c=1*(u.documentElement.getAttribute("width")||1),l=1*(u.documentElement.getAttribute("height")||1),h=l/c,f=parseInt(40/h),d=parseInt(f*h),t.next=25,am.addImageProcess(o);case 25:p=t.sent,0===r?e.push({type:"img",src:p,w:40,h:40,iw:f,ih:d}):(f=parseInt(this.typeValues[n].inImgWidth/h),d=parseInt(f*h),e.push({type:"img1",src:p,w:40,h:40,iw:f,ih:d}));case 27:r++,t.next=6;break;case 30:t.next=2;break;case 32:return console.log(e),t.abrupt("return",am.generateTexture(e));case 34:case"end":return t.stop()}}),t,this)})));return function(){return t.apply(this,arguments)}}()},{key:"addPoint",value:function(){var t=u(regeneratorRuntime.mark((function t(){var e,n,r,i,o=this;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(this.dataItems){t.next=2;break}return t.abrupt("return",null);case 2:return t.next=4,this._loadTexture();case 4:return e=t.sent,this.textures||(this.textures=[]),this.textures.push(e.texture),n=this._getRate(),this.m.onBeforeCompile=function(t){r=o._createShaderPol(t,e.texture,e.xys,e.textureSize,o.markSize*n),o.shader=r},i=new zy(this.dataItems,{minZoom:this.minZoom},this.m,this._getMarkSize,this.threeLayer),this.isToolTip&&i.setToolTip("hello",{showTimeout:0,eventsPropagation:!0,dx:10}),i.object3d.renderOrder=this.order,this.point=i,this.point.parent=this,this.threeLayer.addMesh(this.point),this._bindMapEvents(),t.abrupt("return",i);case 17:case"end":return t.stop()}}),t,this)})));return function(){return t.apply(this,arguments)}}()},{key:"addInfo",value:function(t){if(t.length!==this.InforItems.length)for(var e=0;e<this.dataItems.length;e++)if(t.includes(e)){var n=this.dataItems[e],r=n.data.infoWindowData;if(n.data.law_num&&n.data.punish_num&&(r=[{key:"案件数",value:n.data.law_num},{key:"处罚金额",value:"".concat(n.data.punish_num,"万元")}]),!r||!r.length)continue;var i={single:!1,custom:!0,dy:-16,autoOpenOn:null,animation:!1,autoPanDuration:!1,autoPan:!1,content:'<div style="background: rgba(0,0,0,0.42); border-radius: 6px; font-size: 12px; color: #ffffff; padding: 6px;display: flex;\n flex-direction: column;\n align-items: center; width: 128px">\n <span>'.concat(r[0].key,":").concat(r[0].value,"</span>\n <span>").concat(r[1].key,":").concat(r[1].value,"</span>\n </div>")},o=new Pp.ui.InfoWindow(i);this.InforItems.push(o),o.addTo(this.map).show({x:n.coordinate[0],y:n.coordinate[1]})}}},{key:"hideInfoWindows",value:function(){this.InforItems.length>0&&(this.InforItems.forEach((function(t){t.remove()})),this.InforItems=[])}},{key:"pointShowStatisticsByeCodeMultiple",value:function(t,e,n,r,i){var o=this;this.layerPointNumLabel.clear(),this.layerPointNumLabel.show(),this.hideInfoWindows(),this._deleteFunsKey();for(var a=[],s=[],u=0;u<e.length;u++)a.push({code:u,geo:e[u],geojson:e[u].toGeoJSON(),ptnum:0,val:t,sum:0,ptids:[]});a.forEach((function(e){for(var r=0;r<o.dataItems.length;r++){var i=o.dataItems[r];t.includes(i.code)&&am.containsCoordinate2(o.dataItems[r].coordinate,e.geojson)&&(e.ptnum+=1,e.ptids.push(r),s.push(r),o.dataItems[r].data[n]?(e.sum+=parseFloat(o.dataItems[r].data[n])||0,e.sum=Math.floor(100*e.sum)/100):e.sum+=0)}})),this._clearClusterCache();var c=this.clusterMinZoom;this.clusterItemsCache[c]=a,this.testMinClusterZoom1(this.clusterItemsCache[c],r,i),this.funcsNew.c=function(){var t=o.getClosestZoom(o.map.pixelToDistance(1,0));if(!(t<9||t>18)&&o.curZoom!==t)if(o.curZoom=t,o.clusterItemsCache[t])if(t===o.clusterMinZoom)o.hideInfoWindows(),o.testMinClusterZoom1(o.clusterItemsCache[t],r,i);else{var e=o.clusterItemsCache[t];o.testCluster1(e,r,i,n)}else{var s=[];a.forEach((function(e){o.calColNum(t,e.ptids,s)})),o.clusterItemsCache[t]=s.flat(),o.testCluster1(o.clusterItemsCache[t],r,i,n)}}}},{key:"testMinClusterZoom1",value:function(t,e,n){var r=this;this.layerPointNumLabel.clear(),t.forEach((function(t){r._addClusterLabel(t.geo.getCenter(),t.sum,t,e,n)})),this.dataItems.forEach((function(t){t.visibility=.1})),this._changePtVisible([])}},{key:"testCluster1",value:function(t,e,n,r){var i=this;this.layerPointNumLabel.clear();var o=[];t.forEach((function(t){if(t.length>1){var a=1/0,s=1/0,u=-1/0,c=-1/0,l=0;t.forEach((function(t){a=Math.min(a,i.dataItems[t].coordinate[0]),s=Math.min(s,i.dataItems[t].coordinate[1]),u=Math.max(u,i.dataItems[t].coordinate[0]),c=Math.max(c,i.dataItems[t].coordinate[1]),i.dataItems[t].visibility=.1,i.dataItems[t].data[r]?(l+=parseFloat(i.dataItems[t].data[r])||0,l=Math.floor(100*l)/100):l+=0}));var h=[(a+u)/2,(s+c)/2];i._addClusterLabelSmall(h,l,{},e,n)}else i.dataItems[t[0]].visibility=1,o.push(t[0])})),this._changePtVisible([]),this.hideInfoWindows(),this.addInfo(o)}},{key:"pointShowStatisticsByeTypeMultiple",value:function(t,e,n){var r=this;this.layerPointNumLabel.clear(),this.layerPointNumLabel.show(),this._deleteFunsKey();for(var i=[],o=0;o<e.length;o++)i.push({code:o,geo:e[o],geojson:e[o].toGeoJSON(),sum:0,val:t,ptnum:0});i.forEach((function(e){for(var i=function(i){var o=r.dataItems[i];t.filter((function(t){return t.includes(o.type)})).length>0&&am.containsCoordinate2(r.dataItems[i].coordinate,e.geojson)&&(e.ptnum+=1,r.dataItems[i].data[n]?e.sum+=parseFloat(r.dataItems[i].data[n])||0:e.sum+=0)},o=0;o<r.dataItems.length;o++)i(o)})),i.forEach((function(e){r._addClusterLabel(e.geo.getCenter(),e.sum,e).on("click",(function(e){r.selectItems=[];var n=e.target.properties.item;n.ptnum>0&&(setTimeout((function(){r.point.show()}),500),r._pointShowHide(n.val,n.geo),r._zoomSelect(t,n.geo))}))})),this._pointShowHide(t),this.map.getZoom()<9.4?this.point.hide():(this.point.show(),this.layerPointNumLabel.hide()),this.funcsNew.b=function(){r.isCtrol&&(r.map.getZoom()<9.4?(r.point.hide(),r.layerPointNumLabel.show()):(r.point.show(),r.layerPointNumLabel.hide()))}}},{key:"showValue",value:function(t){if(this.shader){var e=!0===t?0:1;this.shader.uniforms.flag.value=e,this.bzlayerNum&&(this.bzlayerNum.options.visible=t)}}},{key:"showName",value:function(t){this.layerLabel&&(this.layerLabel.options.visible=t)}},{key:"changeParaValue",value:function(t,e){var n=this;if(this.point){this.paraName=e||this.paraName;var r=this.point.object3d.geometry.attributes.color.array,i=this.point.object3d.geometry.attributes.fcolor1.array,o=this.point.object3d.geometry.attributes.opavalue.array;t.slice(0,1/0).map((function(t){var e=parseFloat(t.value)||0,r=parseFloat(t.opavalue)?parseFloat(t.opavalue):1,i="#fff";t.imgColor&&t.imgColor.length>=1&&(i=t.imgColor[0]);var o="#fff";t.imgColor&&t.imgColor.length>=2&&(o=t.imgColor[1]);var a=(parseFloat(t.windDirection)||0)+.01,s=(parseFloat(a*(Math.PI/180)),n.findItemByCode(t.code));if(void 0!==s&&(n.dataItems[s].color=i,n.dataItems[s].fcolor1=o,n.dataItems[s].pvalue=e,n.dataItems[s].opavalue=r,n.dataItems[s].data=t,n.bzlayerNum)){var u=Uy(e,n.paraName);n.bz_all_nums[s].getProperties().name=e,n.bz_all_nums[s].updateSymbol({textName:"{name}",textFill:u})}}));for(var a=0;a<this.dataItems.length;a++){var s=new Oi(this.dataItems[a].color);r[3*a+0]=s.r,r[3*a+1]=s.g,r[3*a+2]=s.b;var u=new Oi(this.dataItems[a].fcolor1);i[3*a+0]=u.r,i[3*a+1]=u.g,i[3*a+2]=u.b,o[a]=this.dataItems[a].opavalue}this.point.object3d.geometry.attributes.color.needsUpdate=!0,this.point.object3d.geometry.attributes.fcolor1.needsUpdate=!0,this.point.object3d.geometry.attributes.opavalue.needsUpdate=!0}}},{key:"dispose",value:function(){this.InforItems.length>0&&this.hideInfoWindows(),this.bzlayerNum&&(this.map.removeLayer(this.bzlayerNum),this.bz_all_nums=[]),qp(Vp(n.prototype),"dispose",this).call(this)}},{key:"_createShaderPol",value:function(t,e,n,r,i){return t.uniforms.imgdatas={value:n},t.uniforms.texture1={value:e},t.uniforms.textureSize={value:r},t.uniforms.size1={value:i},t.uniforms.flag={value:1},t.vertexShader="uniform float size1;\n attribute float imgflag;\n attribute float rotation;\n attribute vec3 color;\n attribute vec3 fcolor1;\n varying float vimgflag;\n attribute float visibility;\n varying float vVisible;\n varying float vRotation;\n varying vec3 vColor;\n varying vec3 vFcolor;\n attribute float opavalue;\n varying float vOpavalue;\n attribute float colorflag;\n varying float vColorflag;\n attribute float fcolorflag;\n varying float vFcolorflag;\n attribute float imgnum;\n varying float vImgnum;\n "+t.vertexShader,t.vertexShader=t.vertexShader.replace("#include <project_vertex>","\n #include <project_vertex>\n vimgflag = imgflag;\n vVisible = visibility;\n vRotation = rotation;\n vColor = color;\n vOpavalue = opavalue;\n vColorflag = colorflag;\n vFcolorflag = fcolorflag;\n vFcolor = fcolor1;\n vImgnum = imgnum;\n ").replace("gl_PointSize = size;","\n gl_PointSize = size1;\n "),t.fragmentShader="struct imgdata {\n float u;\n float v;\n float w;\n float h;\n };\n uniform imgdata imgdatas[".concat(n.length,"];\n uniform sampler2D texture1;\n uniform float textureSize;\n varying float vimgflag;\n varying float vVisible;\n varying float vRotation;\n varying vec3 vColor;\n varying float vOpavalue;\n varying float vColorflag;\n varying float vFcolorflag;\n varying float vImgnum;\n varying vec3 vFcolor;\n uniform int flag;\n ")+t.fragmentShader,t.fragmentShader=t.fragmentShader.replace("gl_FragColor = vec4( outgoingLight, diffuseColor.a );","\n highp int index = int(vimgflag);\n float width = gl_PointCoord.x / textureSize * imgdatas[index].w;\n float height = gl_PointCoord.y / textureSize * imgdatas[index].h;\n float x = imgdatas[index].u;\n float y = 1.0 - imgdatas[index].v;\n vec2 uv = vec2(x + width, y - height);\n\n float xx = x + 0.5 / textureSize * imgdatas[index].w;\n float yy = y - 0.5 / textureSize * imgdatas[index].h;\n float angle = 1.0;\n float s = sin(vRotation);\n float c = cos(vRotation);\n mat2 rotationMatrix = mat2( c, s,\n -s, c);\n vec2 pivot = vec2( xx, yy);\n uv = rotationMatrix * (uv - pivot) + pivot;\n\n vec4 rotatedTexture = texture2D( texture1, uv);\n vec4 texColor;\n if (vColorflag > 1.0) {\n texColor = vec4(vColor, vOpavalue) * rotatedTexture;\n } else {\n texColor = rotatedTexture;\n }\n\n if (vImgnum > 1.0 && flag == 1) {\n index += 1;\n width = gl_PointCoord.x / textureSize * imgdatas[index].w;\n height = gl_PointCoord.y / textureSize * imgdatas[index].h;\n x = imgdatas[index].u;\n y = 1.0 - imgdatas[index].v;\n vec4 img = texture2D( texture1, vec2(x + width, y - height) );\n vec4 Ca;\n img.a *= img.r;\n if(vFcolorflag > 1.0){\n Ca = vec4(vFcolor, 1.0) * img;\n }\n else{\n Ca = img;\n }\n //Ca.a *= Ca.r;\n\n\n // 第三种\n /*texColor.xyz *= texColor.a; //premultiply source \n gl_FragColor = mix(texColor, Ca, Ca.a);\n gl_FragColor.rgb /= gl_FragColor.a;*/\n \n vec3 rgb = mix(texColor.xyz * texColor.a, Ca.xyz, Ca.a);\n float a = Ca.a + texColor.a * (1. - Ca.a);\n vec4 dst = vec4(rgb / a, a);\n gl_FragColor = dst;\n\n /*vec3 rgb = mix(texColor.xyz * texColor.a, Ca.rgb, Ca.a);\n float a = Ca.a + texColor.a * (1. - Ca.a);\n vec4 dst = vec4(rgb, a);\n gl_FragColor = dst;*/\n \n // 第一种\n /*vec4 out_Color;\n outgoingLight *= texColor.xyz;\n gl_FragColor = vec4( outgoingLight, texColor.a * diffuseColor.a );\n gl_FragColor = mix(gl_FragColor, Ca, Ca.a);\n gl_FragColor.rgb /= gl_FragColor.a;*/\n \n } else {\n outgoingLight *= texColor.xyz;\n gl_FragColor = vec4( outgoingLight, texColor.a * diffuseColor.a );\n }\n\n if (vVisible < 0.5) discard;\n "),t}}]),n}(By),Vy=function(t){Jp(n,t);var e=Kp(n);function n(t,r,o){var a;return i(this,n),(a=e.call(this,t,r,o)).m&&(a.m.blending=R,a.m.blendSrc=F,a.m.blendDst=U,a.m.blendEquation=k),a}return a(n,[{key:"_getImgType",value:function(t,e,n){return void 0===this.typeValues[t]&&(0===Object.keys(this.typeValues).length?this.initTypeValue=.9:this.initTypeValue+=1,this.typeValues[t]={v:this.initTypeValue,img:e}),this.typeValues[t].v}},{key:"_loadTexture",value:function(){var t=u(regeneratorRuntime.mark((function t(){var e,n,r,i,o,a,s,u,c,l,h,f,d,p;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:e=[],t.t0=regeneratorRuntime.keys(this.typeValues);case 2:if((t.t1=t.t0()).done){t.next=32;break}if(n=t.t1.value,!this.typeValues[n].img||!Array.isArray(this.typeValues[n].img)){t.next=30;break}r=0;case 6:if(!(r<this.typeValues[n].img.length)){t.next=30;break}if(i=this.typeValues[n].img[r],o=i,!i.includes(".svg")){t.next=16;break}return t.next=12,fetch(i);case 12:return a=t.sent,t.next=15,a.text();case 15:o=t.sent;case 16:return s=new DOMParser,u=s.parseFromString(o,"image/svg+xml"),c=1*(u.documentElement.getAttribute("width")||1),l=1*(u.documentElement.getAttribute("height")||1),h=l/c,f=parseInt(40/h),d=parseInt(f*h),t.next=25,am.addImageProcess(o);case 25:p=t.sent,0===r?0===e.length&&e.push({type:"img",src:p,w:40,h:40,iw:f,ih:d}):(f=parseInt(16/h),d=parseInt(f*h),e.push({type:"img1",src:p,w:40,h:40,iw:f,ih:d}));case 27:r++,t.next=6;break;case 30:t.next=2;break;case 32:return t.abrupt("return",am.generateTexture(e));case 33:case"end":return t.stop()}}),t,this)})));return function(){return t.apply(this,arguments)}}()},{key:"addPoint",value:function(){var t=u(regeneratorRuntime.mark((function t(){var e,n,r,i,o=this;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(this.dataItems){t.next=2;break}return t.abrupt("return",null);case 2:return t.next=4,this._loadTexture();case 4:return e=t.sent,this.textures||(this.textures=[]),this.textures.push(e.texture),n=this._getRate(),this.m.onBeforeCompile=function(t){r=o._createWgShader(t,e.texture,e.xys,e.textureSize,o.markSize*n),o.shader=r},i=new zy(this.dataItems,{minZoom:this.minZoom},this.m,this._getMarkSize,this.threeLayer),this.isToolTip&&i.setToolTip("hello",{showTimeout:0,eventsPropagation:!0,dx:10}),i.object3d.renderOrder=this.order,this.point=i,this.point.parent=this,this.threeLayer.addMesh(this.point),this._bindMapEvents(),t.abrupt("return",i);case 17:case"end":return t.stop()}}),t,this)})));return function(){return t.apply(this,arguments)}}()},{key:"_createWgShader",value:function(t,e,n,r,i){return t.uniforms.imgdatas={value:n},t.uniforms.texture1={value:e},t.uniforms.textureSize={value:r},t.uniforms.size1={value:i},t.uniforms.flag={value:1},t.vertexShader="uniform float size1;\n attribute float imgflag;\n varying float vimgflag;\n attribute float visibility;\n varying float vVisible;\n attribute vec3 color;\n varying vec3 vColor;\n attribute float opavalue;\n varying float vOpavalue;\n attribute float fcolor;\n varying float vFcolor;\n attribute float rotation;\n varying float vRotation;\n "+t.vertexShader,t.vertexShader=t.vertexShader.replace("#include <project_vertex>","\n #include <project_vertex>\n vimgflag = imgflag;\n vVisible = visibility;\n vColor = color;\n vOpavalue = opavalue;\n vFcolor = fcolor;\n vRotation = rotation;\n ").replace("gl_PointSize = size;","\n gl_PointSize = size1;\n "),t.fragmentShader="struct imgdata {\n float u;\n float v;\n float w;\n float h;\n };\n uniform imgdata imgdatas[".concat(n.length,"];\n uniform sampler2D texture1;\n uniform float textureSize;\n varying float vimgflag;\n varying float vVisible;\n varying vec3 vColor;\n varying float vOpavalue;\n varying float vFcolor;\n varying float vRotation;\n uniform int flag;\n ")+t.fragmentShader,t.fragmentShader=t.fragmentShader.replace("gl_FragColor = vec4( outgoingLight, diffuseColor.a );","\n int index = 0;\n float width = gl_PointCoord.x / textureSize * imgdatas[index].w;\n float height = gl_PointCoord.y / textureSize * imgdatas[index].h;\n float x = imgdatas[index].u;\n float y = 1.0 - imgdatas[index].v;\n vec2 uv = vec2(x + width, y - height);\n\n float xx = x + 0.5 / textureSize * imgdatas[index].w;\n float yy = y - 0.5 / textureSize * imgdatas[index].h;\n float angle = 1.0;\n float s = sin(vRotation);\n float c = cos(vRotation);\n mat2 rotationMatrix = mat2( c, s,\n -s, c);\n vec2 pivot = vec2( xx, yy);\n uv = rotationMatrix * (uv - pivot) + pivot;\n\n vec4 rotatedTexture = texture2D( texture1, uv);\n vec4 texColor = vec4(vColor, vOpavalue) * rotatedTexture;\n outgoingLight *= texColor.xyz;\n //gl_FragColor = vec4( outgoingLight, texColor.a * diffuseColor.a );\n\n if(flag == 1){\n highp int index = int(vimgflag);\n index += 1;\n float width = gl_PointCoord.x / textureSize * imgdatas[index].w;\n float height = gl_PointCoord.y / textureSize * imgdatas[index].h;\n float x = imgdatas[index].u;\n float y = 1.0 - imgdatas[index].v;\n vec4 img = texture2D( texture1, vec2(x + width, y - height) );\n vec4 Ca;\n if(vFcolor > 1.0){\n Ca = vec4(0.0, 0.0, 0.0, 1.0) * img;\n }\n else{\n Ca = img;\n }\n //gl_FragColor = mix(gl_FragColor, Ca, Ca.a);\n\n texColor.xyz *= texColor.a; //premultiply source\n gl_FragColor = mix(texColor, Ca, Ca.a);\n gl_FragColor.rgb /= gl_FragColor.a;\n }\n\n\n /*float mid = 0.5;\n vec2 rotated = vec2(cos(vRotation) * (gl_PointCoord.x - mid) + sin(vRotation) * (gl_PointCoord.y - mid) + mid,\n cos(vRotation) * (gl_PointCoord.y - mid) - sin(vRotation) * (gl_PointCoord.x - mid) + mid);\n vec4 rotatedTexture = texture2D( bgtexture, rotated);\n vec2 pUv = gl_PointCoord;\n pUv.y = 1. - pUv.y;\n vec4 texColor = vec4(vColor, vOpavalue) * rotatedTexture;\n outgoingLight *= texColor.xyz;\n gl_FragColor = vec4( outgoingLight, texColor.a * diffuseColor.a );\n\n if(flag == 1){\n highp int index = int(vimgflag);\n float width = gl_PointCoord.x / textureSize * imgdatas[index].w;\n float height = gl_PointCoord.y / textureSize * imgdatas[index].h;\n float x = imgdatas[index].u;\n float y = 1.0 - imgdatas[index].v;\n vec4 img = texture2D( texture1, vec2(x + width, y - height) );\n vec4 Ca;\n if(vFcolor > 1.0){\n Ca = vec4(0.0, 0.0, 0.0, 1.0) * img;\n }\n else{\n Ca = img;\n }\n gl_FragColor = mix(gl_FragColor, Ca, Ca.a);\n }*/\n\n if (vVisible < 0.5) discard;\n "),t}}]),n}(function(t){Jp(n,t);var e=Kp(n);function n(t,r,o){var a;if(i(this,n),(a=e.call(this,t,r,o)).bzlayerNum)for(var s=a.bzlayerNum.getGeometries(),u=0;u<s.length;u++)a.bz_all_nums.push(s[u]);return a}return a(n,[{key:"_initChildVar",value:function(t,e){this.bzlayerNum=new Pp.VectorLayer(Pp.Util.GUID(),{minZoom:11,geometryEvents:!1,hitDetect:!1,visible:!1}).addTo(e.map),this.bz_all_nums=[],this.paraName=t.paraName||"pm25"}},{key:"changeParaValue",value:function(t,e){var n=this;if(this.point){this.paraName=e;var r=this.point.object3d.geometry.attributes.color.array,i=this.point.object3d.geometry.attributes.fcolor.array,o=this.point.object3d.geometry.attributes.opavalue.array;t.slice(0,1/0).map((function(t){var e=parseFloat(t.value)||0,r="#000"===Uy(e,n.paraName)?2:.9,i=Gy(e,n.paraName),o=1===parseInt(t.status)?1:0,a=parseFloat(t.value)?parseFloat(t.value):-1,s=1===o&&a<=0?.3:1,u=n.findItemByCode(t.code);void 0!==u&&(n.dataItems[u].color=i,n.dataItems[u].fcolor=r,n.dataItems[u].pvalue=e,n.dataItems[u].opavalue=s,n.dataItems[u].data=t)}));for(var a=0;a<this.dataItems.length;a++){var s=new Oi(this.dataItems[a].color);r[3*a+0]=s.r,r[3*a+1]=s.g,r[3*a+2]=s.b,i[a]=this.dataItems[a].fcolor,o[a]=this.dataItems[a].opavalue}this.point.object3d.geometry.attributes.color.needsUpdate=!0,this.point.object3d.geometry.attributes.fcolor.needsUpdate=!0,this.point.object3d.geometry.attributes.opavalue.needsUpdate=!0}}},{key:"_bindDataItem",value:function(t,e,n){var r=parseFloat(e.value)||0,i=e.status?1:0,o=e.value?parseFloat(e.value):-1,a=1===i&&o<=0?.3:1,s=Uy(r,this.paraName),u="#000"===s?2:.9,c=(parseFloat(e.windDirection)||0)+.01,l=parseFloat(c*(Math.PI/180));t.push({coordinate:[parseFloat(e.longitude),parseFloat(e.latitude)],height:0,color:Gy(r,this.paraName),fcolor:u,value:e.name,imgflag:n,rotation:l,visibility:1==e.visibility?1:.1,code:e.code,status:i,opavalue:a,pvalue:e.value||0,data:e}),new Pp.Marker([parseFloat(e.longitude),parseFloat(e.latitude)],{properties:{name:r,type:e.businessType,status:i,pvalue:r},symbol:{textFaceName:"sans-serif",textName:"{name}",textSize:12,textFill:s}}).addTo(this.bzlayerNum)}},{key:"_getImgType",value:function(t,e,n){return void 0===this.typeValues[t]&&(0===Object.keys(this.typeValues).length?this.initTypeValue=.9:this.initTypeValue+=1,this.typeValues[t]={v:this.initTypeValue,img:e.img,txt:e.txt}),this.typeValues[t].v}},{key:"_pointShowHide",value:function(t,e,n,r,i){var o=this;this.layerLabel&&this.layerLabel.clear();var a=function(a){var s=t.filter((function(t){return t===a}));o._itemHide(s,e,n,r,i,o.typeValues[a].v)};for(var s in this.typeValues)a(s)}},{key:"showValue",value:function(t){if(this.shader){var e=!0===t?0:1;this.shader.uniforms.flag.value=e,this.bzlayerNum&&(this.bzlayerNum.options.visible=t)}}},{key:"_loadTexture",value:function(){var t=u(regeneratorRuntime.mark((function t(){var e,n,r,i,o,a,s,u,c,l,h,f,d;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:e=[],t.t0=regeneratorRuntime.keys(this.typeValues);case 2:if((t.t1=t.t0()).done){t.next=28;break}if(n=t.t1.value,!this.typeValues[n].img){t.next=25;break}if(r=this.typeValues[n].img,i=r,!r.includes(".svg")){t.next=14;break}return t.next=10,fetch(r);case 10:return o=t.sent,t.next=13,o.text();case 13:i=t.sent;case 14:return a=new DOMParser,s=a.parseFromString(i,"image/svg+xml"),u=1*(s.documentElement.getAttribute("width")||1),c=1*(s.documentElement.getAttribute("height")||1),l=c/u,h=parseInt(40/l),f=parseInt(h*l),t.next=23,am.addImageProcess(i);case 23:d=t.sent,e.push({type:"img",src:d,w:40,h:40,iw:h,ih:f});case 25:this.typeValues[n].txt&&(e.push({type:"txt",src:this.typeValues[n].txt,w:40,h:40,color:"#000",size:20,offx:10,offy:26}),e.push({type:"txt",src:this.typeValues[n].txt,w:40,h:40,color:"#fff",size:20,offx:10,offy:26})),t.next=2;break;case 28:return console.log(e),t.abrupt("return",am.generateTexture(e));case 30:case"end":return t.stop()}}),t,this)})));return function(){return t.apply(this,arguments)}}()},{key:"addPoint",value:function(){var t=u(regeneratorRuntime.mark((function t(){var e,n,r,i,o=this;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(this.dataItems){t.next=2;break}return t.abrupt("return",null);case 2:return t.next=4,this._loadTexture();case 4:return e=t.sent,this.textures||(this.textures=[]),this.textures.push(e.texture),n=this._getRate(),this.m.onBeforeCompile=function(t){r=o._createBzShader(t,e.texture,e.xys,e.textureSize,3,o.markSize*n),o.shader=r},i=new zy(this.dataItems,{minZoom:this.minZoom},this.m,this._getMarkSize,this.threeLayer),this.isToolTip&&i.setToolTip("hello",{showTimeout:0,eventsPropagation:!0,dx:10}),i.object3d.renderOrder=this.order,this.point=i,this.point.parent=this,this.threeLayer.addMesh(this.point),this._bindMapEvents(),t.abrupt("return",i);case 17:case"end":return t.stop()}}),t,this)})));return function(){return t.apply(this,arguments)}}()},{key:"dispose",value:function(){this.bzlayerNum&&(this.map.removeLayer(this.bzlayerNum),this.bz_all_nums=[]),qp(Vp(n.prototype),"dispose",this).call(this)}},{key:"_createBzShader",value:function(t,e,n,r,i,o){return t.uniforms.imgdatas={value:n},t.uniforms.texture1={value:e},t.uniforms.textureSize={value:r},t.uniforms.textureOffset={value:i},t.uniforms.size1={value:o},t.uniforms.flag={value:1},t.vertexShader="uniform float size1;\n attribute float imgflag;\n varying float vimgflag;\n attribute float visibility;\n varying float vVisible;\n attribute vec3 color;\n varying vec3 vColor;\n attribute float opavalue;\n varying float vOpavalue;\n attribute float fcolor;\n varying float vFcolor;\n "+t.vertexShader,t.vertexShader=t.vertexShader.replace("#include <project_vertex>","\n #include <project_vertex>\n vimgflag = imgflag;\n vVisible = visibility;\n vColor = color;\n vOpavalue = opavalue;\n vFcolor = fcolor;\n ").replace("gl_PointSize = size;","\n gl_PointSize = size1;\n "),t.fragmentShader="struct imgdata {\n float u;\n float v;\n float w;\n float h;\n };\n uniform imgdata imgdatas[".concat(n.length,"];\n uniform sampler2D texture1;\n uniform float textureSize;\n uniform float textureOffset;\n varying float vimgflag;\n varying float vVisible;\n varying vec3 vColor;\n varying float vOpavalue;\n varying float vFcolor;\n uniform int flag;\n ")+t.fragmentShader,t.fragmentShader=t.fragmentShader.replace("gl_FragColor = vec4( outgoingLight, diffuseColor.a );","\n highp int index = int(vimgflag);\n if (index > 0) {\n //index += int(textureOffset);\n index = index * int(textureOffset);\n }\n float width = gl_PointCoord.x / textureSize * imgdatas[index].w;\n float height = gl_PointCoord.y / textureSize * imgdatas[index].h;\n float x = imgdatas[index].u;\n float y = 1.0 - imgdatas[index].v;\n vec4 texColor = vec4(vColor, vOpavalue) * texture2D( texture1, vec2(x + width, y - height) );\n outgoingLight *= texColor.xyz;\n gl_FragColor = vec4( outgoingLight, texColor.a * diffuseColor.a );\n\n if(flag == 1){\n if(vFcolor > 1.0){ \n index += 1;\n } else {\n index += 2;\n }\n width = gl_PointCoord.x / textureSize * imgdatas[index].w;\n height = gl_PointCoord.y / textureSize * imgdatas[index].h;\n x = imgdatas[index].u;\n y = 1.0 - imgdatas[index].v;\n vec4 Ca = texture2D( texture1, vec2(x + width, y - height) );\n gl_FragColor = mix(gl_FragColor, Ca, Ca.a);\n }\n\n if (vVisible < 0.5) discard;\n "),t}}]),n}(By));n("622a"),n("5ffc"),n("ac3e"),n("2ed2");var Zy=function(){function t(e){i(this,t),this.map=e,this.threeLayer=null,this.animationId=null}return a(t,[{key:"createIepLayer",value:function(t){var e=this,n=function(){var t="xxxxxxxxxxxx4xxxyxxxxxxxxxxxxxxx".replace(/[xy]/g,(function(t){var e=16*Math.random()|0;return("x"===t?e:3&e|8).toString(16)}));return"iep".concat(t,"layer")}();if(!this.threeLayer){var r=this.threeLayer=new Cy(n,function(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?Wp(Object(n),!0).forEach((function(e){Up(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Wp(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}({forceRenderOnMoving:!0,forceRenderOnRotating:!0,identifyCountOnEvent:1},t)),i=function t(){var n;r._needsUpdate=!r._needsUpdate,r._needsUpdate&&(null==r||null===(n=r.getRenderer())||void 0===n||n.clearCanvas(),r.renderScene()),e.animationId=requestAnimationFrame(t)};return this.threeLayer.prepareToDraw=function(t,e,n){var r=new Ph(16777215);r.position.set(0,-10,10).normalize(),e.add(r),i()},r.addTo(this.map),{layerId:n,layer:r}}}},{key:"removeIepLayer",value:function(){cancelAnimationFrame(this.animationId),this.threeLayer.getMeshes().forEach((function(t){var e;"Points"===t.type&&(null===(e=t.parent)||void 0===e||e.dispose())})),this.map.removeLayer(this.threeLayer),this.threeLayer=null,this.animationId=null}},{key:"prepareToDraw",value:function(t){var e=this;return new Promise((function(t){e.threeLayer.prepareToDraw=function(e,n,r){var i=new Ph(16777215);i.position.set(0,-10,10).normalize(),n.add(i),t()}}))}},{key:"drawPoint",value:function(t,e){var n=this;return this.createIepLayer(),this.threeLayer.getScene()?new Promise((function(r){var i=null;t.length>0?(i=new Wy(t,e,n.threeLayer)).addPoint().then((function(){r(i)})):r(i)})):new Promise((function(r){setTimeout((function(){var i=null;t.length>0?(i=new Wy(t,e,n.threeLayer)).addPoint().then((function(){r(i)})):r(i)}))}))}},{key:"drawbzPoint",value:function(t,e){console.error("请使用drawPoint绘制标准站点位")}},{key:"drawWgPoint",value:function(t,e){var n=this;return this.createIepLayer(),this.threeLayer.getScene()?new Promise((function(r){var i=new Vy(t,e,n.threeLayer);i.addPoint().then((function(){r(i)}))})):new Promise((function(r){setTimeout((function(){var i=new Vy(t,e,n.threeLayer);i.addPoint().then((function(){r(i)}))}))}))}},{key:"saveIndexedDb",value:function(){return new Promise((function(t,e){var n=window.indexedDB.open("iep_db");n.onsuccess=function(e){var n=e.target.result;t(n)},n.onerror=function(t){e(t)},n.onupgradeneeded=function(t){var e=t.target.result;if(!e.objectStoreNames.contains("svg_dict")){var n=e.createObjectStore("svg_dict",{keyPath:"code"});n.createIndex("code","code",{unique:!0}),n.createIndex("file","file",{unique:!1})}}}))}},{key:"getType",value:function(t){return Object.prototype.toString.call(t).slice(8,-1).toLowerCase()}},{key:"getDbRecord",value:function(t){var e=this,n="string"===this.getType(t)?[t]:t;return new Promise((function(t){e.saveIndexedDb().then((function(e){var r=e.transaction("svg_dict","readwrite").objectStore("svg_dict");Promise.all(n.map((function(t){return new Promise((function(e){var n=r.get(t);n.onsuccess=function(t){e(t.target.result)},n.onerror=function(t){e()}}))}))).then((function(e){t(e)}))}))}))}}]),t}(),qy=function(t){return new Zy(t)};
|
|
41
41
|
/*!
|
|
42
42
|
* maptalks.amap v0.10.1
|
|
43
43
|
* LICENSE : MIT
|