window.TILE_VERSION={"ditu":{"normal":{"version":"088","updateDate":"20231224"},"satellite":{"version":"009","updateDate":"20231224"},"normalTraffic":{"version":"081","updateDate":"20231224"},"satelliteTraffic":{"version":"083","updateDate":"20231224"},"mapJS":{"version":"104","updateDate":"20231224"},"satelliteStreet":{"version":"083","updateDate":"20231224"},"earthVector":{"version":"001","updateDate":"20231224"}},"webapp":{"high_normal":{"version":"001","updateDate":"20231224"},"lower_normal":{"version":"002","updateDate":"20231224"}},"api_for_mobile":{"vector":{"version":"002","updateDate":"20231224"},"vectorIcon":{"version":"002","updateDate":"20231224"}}};window.MSV={"mapstyle":{"version":"001","updateDate":"20231009"}};window.BMAP_AUTHENTIC_KEY="XZgiOilSoLzcc6Ae3RvvtDQZPfDUgFKV"; (function(t){"use strict";function e(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function n(t,e){return t(e={exports:{}},e.exports),e.exports}Object.values||(Object.values=function(t){if(t!==Object(t))throw new TypeError("Object.values called on a non-object");var e,n=[];for(e in t)Object.prototype.hasOwnProperty.call(t,e)&&n.push(t[e]);return n}),"function"!=typeof Object.assign&&Object.defineProperty(Object,"assign",{value:function(t){if(null==t)throw new TypeError("Cannot convert undefined or null to object");for(var e=Object(t),n=0;n<(arguments.length<=1?0:arguments.length-1);n++){var r=n+1<1||arguments.length<=n+1?void 0:arguments[n+1];if(null!=r)for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(e[i]=r[i])}return e},writable:!0,configurable:!0});var r=n((function(t){function e(n){return t.exports=e="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.exports.__esModule=!0,t.exports.default=t.exports,e(n)}t.exports=e,t.exports.__esModule=!0,t.exports.default=t.exports})),i=e(r),o=e(n((function(t){function e(t,e){for(var n=0;n=0;i--)n>(e=t[i])&&(n=e),r1&&void 0!==arguments[1]?arguments[1]:{},n=document.createElement(t);for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&n.setAttribute(r,e[r]);return n},getCurrentStyle:function(t){return window.getComputedStyle(t,null)}};function E(){var t,e,n=function(t,e){var n,r,i="eii",o="dac",a="hem",s="llm",u=function(t,e){return t+e},h="constructor",c=function(t,e){return t(e)},l=function(t,e){return t+e};function f(t,e){for(var n=i;"mill"!==n;)switch(n){case"llm":return c;case"eii":var r=t.length;n=o;break;case a:for(var u=0;u0?"&":"?";for(var c in n=Object.assign({},{jsonpCallback:"jsonp",timeout:5e4,jsonp:"callback"},n),e)({}).hasOwnProperty.call(e,c)&&(a="object"===i(e[c])?c+"="+JSON.stringify(e[c]):c+"="+e[c],s.push(a));function l(){r.parentNode&&r.parentNode.removeChild(r),window[u]=null}return t+=h+s.join("&"),o=document.getElementsByTagName("script")[0]||document.head,t=t+"&"+n.jsonp+"="+u,t+=E()(t),(r=document.createElement("script")).src=t,r.type="text/javascript",o.parentNode.appendChild(r,o),new Promise((function(t,e){window[u]=function(e){if(e&&"string"==typeof e)try{e=JSON.parse(e)}catch(t){e={},console.error("[ERROR] Parse Error.")}t(e),l()},r.onerror=function(t){l(),e({errno:-2,errmsg:"[ERROR] Load Error: ".concat(t),data:{}})}}))},A=function(){function t(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this._size=0,this._cache=void 0,this.keyList=[],this._options=void 0,this._size=t,this._cache=new window.Map;var n={clearCallback:null};this._options=Object.assign({},n,e)}var e=t.prototype;return e.setData=function(t,e){0!==this._size&&(this._cache.size>=this._size&&this._removeOld(),this._cache.has(t)||this.keyList.push(t),this._cache.set(t,e))},e.getData=function(t){return this._cache.get(t)},e._removeOld=function(){for(var t=Math.round(.6*this._size),e=0;e=0;n--)(e=t.vpoints[n]).topoDir=e.dir,t.topoArray.push(e);return t.topoArray},this.getRoadWidth=function(){return void 0===t.roadWidth&&(t.currentRoad||(t.currentRoad=t.getCurrentRoad()),t.currentRoad?t.roadWidth=t.currentRoad.roadWidth:t.roadWidth=0),t.roadWidth}};function S(t){var e={};return e.panoId=t.PID,e.panoType=t.Type,e.rid=t.RID,e.dir=t.DIR,e.roadName=t.RoadName,e.order=t.Order,e.panoX=t.X/100,e.panoY=t.Y/100,void 0!==t.CPointX&&void 0!==t.CPointY&&(e.cPoint={x:t.CPointX/100,y:t.CPointY/100}),e}function P(t){if(!t)return console.error("Get none from server"),null;var e=t.result;if(e&&0!==e.error)return console.error("Get error from server"),null;var n=t.content;if(void 0===n||0===n.length||void 0===n[0])return console.error("Get empty data from server"),null;var r=n[0],i=new R,o=r.Roll,a={};if(i.panoId=r.ID,r.Inters instanceof Array){var s=r.Inters[0];void 0!==s&&(i.iid=s.IID)}if(i.panoType=r.Type,i.panoX=(r.X||0)/100,i.panoY=(r.Y||0)/100,i.panoZ=(r.Z||0)/100,i.heading=void 0!==r.MoveDir?r.MoveDir:0,i.northDir=r.NorthDir,i.fixHeading=void 0!==r.Heading?r.Heading:270-r.NorthDir,i.fixPitch=r.Pitch,i.fixRoll=90o?0:o,i.deviceHeight=r.DeviceHeight,i.date=r.Date||i.date,i.time=r.Time,i.provider=void 0!==r.Provider?r.Provider:i.provider,i.admission=r.Admission||i.admission,i.timeLine=r.TimeLine||[],i.roadName=r.Rname,r.Roads){var u=r.Roads;i.roads=u.map((function(t){return a[t.ID]=t.Name,function(t){var e=new C;if(e.rid=t.ID,e.roadName=t.Name,e.roadWidth=void 0!==t.Width?t.Width/100:0,e.isCurrentRoad=t.IsCurrent||0,t.Panos)for(var n=t.Panos,r=0,i=n.length;r>16)+(e>>16)+(n>>16)<<16|65535&n}function O(t,e,n,r,i,o){return D((a=D(D(e,t),D(r,o)))<<(s=i)|a>>>32-s,n);var a,s}function I(t,e,n,r,i,o,a){return O(e&n|~e&r,t,e,i,o,a)}function L(t,e,n,r,i,o,a){return O(e&r|n&~r,t,e,i,o,a)}function B(t,e,n,r,i,o,a){return O(e^n^r,t,e,i,o,a)}function k(t,e,n,r,i,o,a){return O(n^(e|~r),t,e,i,o,a)}function U(t,e){var n,r,i,o,a;t[e>>5]|=128<>>9<<4)]=e;var s=1732584193,u=-271733879,h=-1732584194,c=271733878;for(n=0;n>5]>>>e%32&255);return n}function F(t){var e,n=[];for(n[(t.length>>2)-1]=void 0,e=0;e>5]|=(255&t.charCodeAt(e/8))<>>4&15)+r.charAt(15&e);return i}function z(t){return unescape(encodeURIComponent(t))}function V(t){return function(t){return N(U(F(t),8*t.length))}(z(t))}function G(t,e){return function(t,e){var n,r,i=F(t),o=[],a=[];for(o[15]=a[15]=void 0,i.length>16&&(i=U(i,8*t.length)),n=0;n<16;n+=1)o[n]=909522486^i[n],a[n]=1549556828^i[n];return r=U(o.concat(F(e)),512+8*e.length),N(U(a.concat(r),640))}(z(t),z(e))}var W,H,Z,q,Y=function(t,e,n){return e?n?G(e,t):j(G(e,t)):n?V(t):j(V(t))},X=function(t,e){return T(t,{},{jsonp:"fn"})},K=function(t,e){if("PANORAMA"===t){var n="https://api.map.baidu.com/?qt=pano_entry&v=gl&ak="+window.BMAP_AUTHENTIC_KEY;"function"==typeof e?X(n).then((function(t){e()})).catch((function(t){})):X(n+"&callback="+e)}},Q=function(t){if("PANORAMA"===t)alert("您需要申请全景地图服务使用权限")},J=(H=null,Z=0,q=W||5e3,function(t){var e=(1e5*Math.random()).toFixed(0);window["cbk"+e]=function(t){t&&void 0!==t.error&&0===t.error||K("PANORAMA",(function(t){t&&void 0!==t.error&&0===t.error||Q("PANORAMA")}))},Z+=t,H||(H=setTimeout((function(){var t="https://api.map.baidu.com/?qt=pano_count&v=gl&ak="+window.BMAP_AUTHENTIC_KEY+"&consume="+Z;X(t+"&callback=window.cbk"+e),Z=0,H=null}),q))}),$=function(t,e){var n=(e=e||{}).counter?e.counter:1,r=!1!==e.isCounter,i=Date.parse(new Date),o=i/1e3,a=t+"-"+(o+1800)+"-"+i+"-"+window.BMAP_AUTHENTIC_KEY+"-SJvEY5h37ZDh5pHS",s=Y(a),u="auth_key="+(o+1800)+"-"+i+"-"+window.BMAP_AUTHENTIC_KEY+"-"+s;return r&&J(n),u},tt=function(){function t(e){var n=this;this.getPanoById=function(e){var r;r="".concat(t.SERVICE_URL,"?qt=sdata&sid=").concat(e,"&").concat($("/")),n.getDataByUrl(r).then((function(t){var e=P(t);if(null===e)throw new Error("数据解析异常");return n._cache.setData(r,t),n._pano.dispatchEvent(d.DATA_LOADED,{data:e}),n._pano.dispatchEvent(d.ID_CHANGED,e.panoId),n._pano.dispatchEvent(d.POSITION_CHANGED,new f(e.panoX,e.panoY)),e})).catch((function(t){n._pano.dispatchEvent({type:d.PANO_ERROR,data:t})}))},this.getPanoByLocation=function(e,r){var i;i="".concat(t.SERVICE_URL,"?qt=qsdata&x=").concat(e.lng,"&y=").concat(e.lat).concat(r?"&r="+r:"","&action=1&").concat($("/")),n.getDataByUrl(i).then((function(t){var r=P(t);n._cache.setData(i,t),n._pano.dispatchEvent(d.DATA_LOADED,{data:r}),n._pano.dispatchEvent(d.POSITION_CHANGED,e)})).catch((function(t){n._pano.dispatchEvent({type:d.PANO_ERROR,data:t})}))},this._pano=e,this._cache=new A(10)}return t.prototype.getDataByUrl=function(t){var e=this._cache.getData(t);return e?Promise.resolve(e):T(t,{},{jsonp:"fn"})},t}();tt.SERVICE_URL="//apisv0.bdimg.com/";var et=n((function(t){function e(t,e,n,r,i,o,a){try{var s=t[o](a),u=s.value}catch(t){return void n(t)}s.done?e(u):Promise.resolve(u).then(r,i)}t.exports=function(t){return function(){var n=this,r=arguments;return new Promise((function(i,o){var a=t.apply(n,r);function s(t){e(a,i,o,s,u,"next",t)}function u(t){e(a,i,o,s,u,"throw",t)}s(void 0)}))}},t.exports.__esModule=!0,t.exports.default=t.exports})),nt=e(et),rt=n((function(t){var e=r.default;function n(){ /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ t.exports=n=function(){return r},t.exports.__esModule=!0,t.exports.default=t.exports;var r={},i=Object.prototype,o=i.hasOwnProperty,a="function"==typeof Symbol?Symbol:{},s=a.iterator||"@@iterator",u=a.asyncIterator||"@@asyncIterator",h=a.toStringTag||"@@toStringTag";function c(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{c({},"")}catch(t){c=function(t,e,n){return t[e]=n}}function l(t,e,n,r){var i=e&&e.prototype instanceof p?e:p,o=Object.create(i.prototype),a=new A(r||[]);return o._invoke=function(t,e,n){var r="suspendedStart";return function(i,o){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===i)throw o;return R()}for(n.method=i,n.arg=o;;){var a=n.delegate;if(a){var s=w(a,n);if(s){if(s===d)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var u=f(t,e,n);if("normal"===u.type){if(r=n.done?"completed":"suspendedYield",u.arg===d)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(r="completed",n.method="throw",n.arg=u.arg)}}}(t,n,a),o}function f(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}r.wrap=l;var d={};function p(){}function v(){}function m(){}var g={};c(g,s,(function(){return this}));var y=Object.getPrototypeOf,_=y&&y(y(C([])));_&&_!==i&&o.call(_,s)&&(g=_);var x=m.prototype=p.prototype=Object.create(g);function b(t){["next","throw","return"].forEach((function(e){c(t,e,(function(t){return this._invoke(e,t)}))}))}function M(t,n){function r(i,a,s,u){var h=f(t[i],t,a);if("throw"!==h.type){var c=h.arg,l=c.value;return l&&"object"==e(l)&&o.call(l,"__await")?n.resolve(l.__await).then((function(t){r("next",t,s,u)}),(function(t){r("throw",t,s,u)})):n.resolve(l).then((function(t){c.value=t,s(c)}),(function(t){return r("throw",t,s,u)}))}u(h.arg)}var i;this._invoke=function(t,e){function o(){return new n((function(n,i){r(t,e,n,i)}))}return i=i?i.then(o,o):o()}}function w(t,e){var n=t.iterator[e.method];if(void 0===n){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=void 0,w(t,e),"throw"===e.method))return d;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return d}var r=f(n,t.iterator,e.arg);if("throw"===r.type)return e.method="throw",e.arg=r.arg,e.delegate=null,d;var i=r.arg;return i?i.done?(e[t.resultName]=i.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,d):i:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,d)}function E(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function T(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function A(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(E,this),this.reset(!0)}function C(t){if(t){var e=t[s];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,r=function e(){for(;++n=0;--r){var i=this.tryEntries[r],a=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var s=o.call(i,"catchLoc"),u=o.call(i,"finallyLoc");if(s&&u){if(this.prev=0;--n){var r=this.tryEntries[n];if(r.tryLoc<=this.prev&&o.call(r,"finallyLoc")&&this.prev=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),T(n),d}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var i=r.arg;T(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:C(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=void 0),d}},r}t.exports=n,t.exports.__esModule=!0,t.exports.default=t.exports}));e(rt);var it=rt(),ot=it;try{regeneratorRuntime=it}catch(t){"object"==typeof globalThis?globalThis.regeneratorRuntime=it:Function("r","regeneratorRuntime = r")(it)}function at(t,e){if(!t)throw new Error("math.gl assertion ".concat(e))}const st={EPSILON:1e-12,debug:!1,precision:4,printTypes:!1,printDegrees:!1,printRowMajor:!0};function ut(t,{precision:e=st.precision}={}){return t=function(t){return Math.round(t/st.EPSILON)*st.EPSILON}(t),"".concat(parseFloat(t.toPrecision(e)))}function ht(t){return Array.isArray(t)||ArrayBuffer.isView(t)&&!(t instanceof DataView)}function ct(t,e,n){const r=st.EPSILON;n&&(st.EPSILON=n);try{if(t===e)return!0;if(ht(t)&&ht(e)){if(t.length!==e.length)return!1;for(let n=0;n0?", ":"")+ut(this[n],t);return"".concat(t.printTypes?this.constructor.name:"","[").concat(e,"]")}equals(t){if(!t||this.length!==t.length)return!1;for(let e=0;e=0&&t=0&&t0&&(i=1/Math.sqrt(i)),t[0]=e[0]*i,t[1]=e[1]*i,t},dot:function(t,e){return t[0]*e[0]+t[1]*e[1]},cross:function(t,e,n){var r=e[0]*n[1]-e[1]*n[0];return t[0]=t[1]=0,t[2]=r,t},lerp:function(t,e,n,r){var i=e[0],o=e[1];return t[0]=i+r*(n[0]-i),t[1]=o+r*(n[1]-o),t},random:function(t,e){e=e||1;var n=2*gt()*Math.PI;return t[0]=Math.cos(n)*e,t[1]=Math.sin(n)*e,t},transformMat2:function(t,e,n){var r=e[0],i=e[1];return t[0]=n[0]*r+n[2]*i,t[1]=n[1]*r+n[3]*i,t},transformMat2d:function(t,e,n){var r=e[0],i=e[1];return t[0]=n[0]*r+n[2]*i+n[4],t[1]=n[1]*r+n[3]*i+n[5],t},transformMat3:function(t,e,n){var r=e[0],i=e[1];return t[0]=n[0]*r+n[3]*i+n[6],t[1]=n[1]*r+n[4]*i+n[7],t},transformMat4:Ct,rotate:function(t,e,n,r){var i=e[0]-n[0],o=e[1]-n[1],a=Math.sin(r),s=Math.cos(r);return t[0]=i*s-o*a+n[0],t[1]=i*a+o*s+n[1],t},angle:function(t,e){var n=t[0],r=t[1],i=e[0],o=e[1],a=Math.sqrt(n*n+r*r)*Math.sqrt(i*i+o*o),s=a&&(n*i+r*o)/a;return Math.acos(Math.min(Math.max(s,-1),1))},zero:function(t){return t[0]=0,t[1]=0,t},str:function(t){return"vec2("+t[0]+", "+t[1]+")"},exactEquals:function(t,e){return t[0]===e[0]&&t[1]===e[1]},equals:function(t,e){var n=t[0],r=t[1],i=e[0],o=e[1];return Math.abs(n-i)<=vt*Math.max(1,Math.abs(n),Math.abs(i))&&Math.abs(r-o)<=vt*Math.max(1,Math.abs(r),Math.abs(o))},len:St,sub:Pt,mul:Dt,div:Ot,dist:It,sqrDist:Lt,sqrLen:Bt,forEach:kt});function Nt(t,e,n){const r=e[0],i=e[1],o=e[2],a=n[3]*r+n[7]*i+n[11]*o||1;return t[0]=(n[0]*r+n[4]*i+n[8]*o)/a,t[1]=(n[1]*r+n[5]*i+n[9]*o)/a,t[2]=(n[2]*r+n[6]*i+n[10]*o)/a,t}function Ft(){var t=new mt(3);return mt!=Float32Array&&(t[0]=0,t[1]=0,t[2]=0),t}function jt(t){var e=new mt(3);return e[0]=t[0],e[1]=t[1],e[2]=t[2],e}function zt(t){var e=t[0],n=t[1],r=t[2];return Math.hypot(e,n,r)}function Vt(t,e,n){var r=new mt(3);return r[0]=t,r[1]=e,r[2]=n,r}function Gt(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t}function Wt(t,e,n){return t[0]=e[0]+n[0],t[1]=e[1]+n[1],t[2]=e[2]+n[2],t}function Ht(t,e,n){return t[0]=e[0]-n[0],t[1]=e[1]-n[1],t[2]=e[2]-n[2],t}function Zt(t,e,n){return t[0]=e[0]*n[0],t[1]=e[1]*n[1],t[2]=e[2]*n[2],t}function qt(t,e,n){return t[0]=e[0]/n[0],t[1]=e[1]/n[1],t[2]=e[2]/n[2],t}function Yt(t,e,n){return t[0]=e[0]*n,t[1]=e[1]*n,t[2]=e[2]*n,t}function Xt(t,e){var n=e[0]-t[0],r=e[1]-t[1],i=e[2]-t[2];return Math.hypot(n,r,i)}function Kt(t,e){var n=e[0]-t[0],r=e[1]-t[1],i=e[2]-t[2];return n*n+r*r+i*i}function Qt(t){var e=t[0],n=t[1],r=t[2];return e*e+n*n+r*r}function Jt(t,e){var n=e[0],r=e[1],i=e[2],o=n*n+r*r+i*i;return o>0&&(o=1/Math.sqrt(o)),t[0]=e[0]*o,t[1]=e[1]*o,t[2]=e[2]*o,t}function $t(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]}function te(t,e,n){var r=e[0],i=e[1],o=e[2],a=n[0],s=n[1],u=n[2];return t[0]=i*u-o*s,t[1]=o*a-r*u,t[2]=r*s-i*a,t}function ee(t,e,n){var r=e[0],i=e[1],o=e[2],a=n[3]*r+n[7]*i+n[11]*o+n[15];return a=a||1,t[0]=(n[0]*r+n[4]*i+n[8]*o+n[12])/a,t[1]=(n[1]*r+n[5]*i+n[9]*o+n[13])/a,t[2]=(n[2]*r+n[6]*i+n[10]*o+n[14])/a,t}function ne(t,e,n){var r=e[0],i=e[1],o=e[2];return t[0]=r*n[0]+i*n[3]+o*n[6],t[1]=r*n[1]+i*n[4]+o*n[7],t[2]=r*n[2]+i*n[5]+o*n[8],t}function re(t,e,n){var r=n[0],i=n[1],o=n[2],a=n[3],s=e[0],u=e[1],h=e[2],c=i*h-o*u,l=o*s-r*h,f=r*u-i*s,d=i*f-o*l,p=o*c-r*f,v=r*l-i*c,m=2*a;return c*=m,l*=m,f*=m,d*=2,p*=2,v*=2,t[0]=s+c+d,t[1]=u+l+p,t[2]=h+f+v,t}function ie(t,e,n,r){var i=[],o=[];return i[0]=e[0]-n[0],i[1]=e[1]-n[1],i[2]=e[2]-n[2],o[0]=i[0],o[1]=i[1]*Math.cos(r)-i[2]*Math.sin(r),o[2]=i[1]*Math.sin(r)+i[2]*Math.cos(r),t[0]=o[0]+n[0],t[1]=o[1]+n[1],t[2]=o[2]+n[2],t}function oe(t,e,n,r){var i=[],o=[];return i[0]=e[0]-n[0],i[1]=e[1]-n[1],i[2]=e[2]-n[2],o[0]=i[2]*Math.sin(r)+i[0]*Math.cos(r),o[1]=i[1],o[2]=i[2]*Math.cos(r)-i[0]*Math.sin(r),t[0]=o[0]+n[0],t[1]=o[1]+n[1],t[2]=o[2]+n[2],t}function ae(t,e,n,r){var i=[],o=[];return i[0]=e[0]-n[0],i[1]=e[1]-n[1],i[2]=e[2]-n[2],o[0]=i[0]*Math.cos(r)-i[1]*Math.sin(r),o[1]=i[0]*Math.sin(r)+i[1]*Math.cos(r),o[2]=i[2],t[0]=o[0]+n[0],t[1]=o[1]+n[1],t[2]=o[2]+n[2],t}function se(t,e){var n=t[0],r=t[1],i=t[2],o=e[0],a=e[1],s=e[2],u=Math.sqrt(n*n+r*r+i*i)*Math.sqrt(o*o+a*a+s*s),h=u&&$t(t,e)/u;return Math.acos(Math.min(Math.max(h,-1),1))}function ue(t,e){var n=t[0],r=t[1],i=t[2],o=e[0],a=e[1],s=e[2];return Math.abs(n-o)<=vt*Math.max(1,Math.abs(n),Math.abs(o))&&Math.abs(r-a)<=vt*Math.max(1,Math.abs(r),Math.abs(a))&&Math.abs(i-s)<=vt*Math.max(1,Math.abs(i),Math.abs(s))}var he=Ht,ce=Zt,le=qt,fe=Xt,de=Kt,pe=zt,ve=Qt,me=function(){var t=Ft();return function(e,n,r,i,o,a){var s,u;for(n||(n=3),r||(r=0),u=i?Math.min(i*n+r,e.length):e.length,s=r;s0?(m=2*Math.sqrt(v+1),t[3]=.25*m,t[0]=(l-d)/m,t[1]=(f-u)/m,t[2]=(s-h)/m):a>c&&a>p?(m=2*Math.sqrt(1+a-c-p),t[3]=(l-d)/m,t[0]=.25*m,t[1]=(s+h)/m,t[2]=(f+u)/m):c>p?(m=2*Math.sqrt(1+c-a-p),t[3]=(f-u)/m,t[0]=(s+h)/m,t[1]=.25*m,t[2]=(l+d)/m):(m=2*Math.sqrt(1+p-a-c),t[3]=(s-h)/m,t[0]=(f+u)/m,t[1]=(l+d)/m,t[2]=.25*m),t}function qe(t,e,n,r){var i=e[0],o=e[1],a=e[2],s=e[3],u=i+i,h=o+o,c=a+a,l=i*u,f=i*h,d=i*c,p=o*h,v=o*c,m=a*c,g=s*u,y=s*h,_=s*c,x=r[0],b=r[1],M=r[2];return t[0]=(1-(p+m))*x,t[1]=(f+_)*x,t[2]=(d-y)*x,t[3]=0,t[4]=(f-_)*b,t[5]=(1-(l+m))*b,t[6]=(v+g)*b,t[7]=0,t[8]=(d+y)*M,t[9]=(v-g)*M,t[10]=(1-(l+p))*M,t[11]=0,t[12]=n[0],t[13]=n[1],t[14]=n[2],t[15]=1,t}function Ye(t,e){var n=e[0],r=e[1],i=e[2],o=e[3],a=n+n,s=r+r,u=i+i,h=n*a,c=r*a,l=r*s,f=i*a,d=i*s,p=i*u,v=o*a,m=o*s,g=o*u;return t[0]=1-l-p,t[1]=c+g,t[2]=f-m,t[3]=0,t[4]=c-g,t[5]=1-h-p,t[6]=d+v,t[7]=0,t[8]=f+m,t[9]=d-v,t[10]=1-h-l,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}function Xe(t,e,n,r,i,o,a){var s=1/(n-e),u=1/(i-r),h=1/(o-a);return t[0]=2*o*s,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=2*o*u,t[6]=0,t[7]=0,t[8]=(n+e)*s,t[9]=(i+r)*u,t[10]=(a+o)*h,t[11]=-1,t[12]=0,t[13]=0,t[14]=a*o*2*h,t[15]=0,t}function Ke(t,e,n,r,i){var o,a=1/Math.tan(e/2);return t[0]=a/n,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=a,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[11]=-1,t[12]=0,t[13]=0,t[15]=0,null!=i&&i!==1/0?(o=1/(r-i),t[10]=(i+r)*o,t[14]=2*i*r*o):(t[10]=-1,t[14]=-2*r),t}var Qe=Ke;function Je(t,e,n,r,i,o,a){var s=1/(e-n),u=1/(r-i),h=1/(o-a);return t[0]=-2*s,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=-2*u,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=2*h,t[11]=0,t[12]=(e+n)*s,t[13]=(i+r)*u,t[14]=(a+o)*h,t[15]=1,t}var $e=Je;function tn(t,e,n,r){var i,o,a,s,u,h,c,l,f,d,p=e[0],v=e[1],m=e[2],g=r[0],y=r[1],_=r[2],x=n[0],b=n[1],M=n[2];return Math.abs(p-x)0&&(c*=d=1/Math.sqrt(d),l*=d,f*=d);var p=u*f-h*l,v=h*c-s*f,m=s*l-u*c;return(d=p*p+v*v+m*m)>0&&(p*=d=1/Math.sqrt(d),v*=d,m*=d),t[0]=p,t[1]=v,t[2]=m,t[3]=0,t[4]=l*m-f*v,t[5]=f*p-c*m,t[6]=c*v-l*p,t[7]=0,t[8]=c,t[9]=l,t[10]=f,t[11]=0,t[12]=i,t[13]=o,t[14]=a,t[15]=1,t}function nn(t,e,n){return t[0]=e[0]-n[0],t[1]=e[1]-n[1],t[2]=e[2]-n[2],t[3]=e[3]-n[3],t[4]=e[4]-n[4],t[5]=e[5]-n[5],t[6]=e[6]-n[6],t[7]=e[7]-n[7],t[8]=e[8]-n[8],t[9]=e[9]-n[9],t[10]=e[10]-n[10],t[11]=e[11]-n[11],t[12]=e[12]-n[12],t[13]=e[13]-n[13],t[14]=e[14]-n[14],t[15]=e[15]-n[15],t}var rn=Ue,on=nn,an=Object.freeze({__proto__:null,create:Pe,clone:De,copy:Oe,fromValues:function(t,e,n,r,i,o,a,s,u,h,c,l,f,d,p,v){var m=new mt(16);return m[0]=t,m[1]=e,m[2]=n,m[3]=r,m[4]=i,m[5]=o,m[6]=a,m[7]=s,m[8]=u,m[9]=h,m[10]=c,m[11]=l,m[12]=f,m[13]=d,m[14]=p,m[15]=v,m},set:function(t,e,n,r,i,o,a,s,u,h,c,l,f,d,p,v,m){return t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=o,t[5]=a,t[6]=s,t[7]=u,t[8]=h,t[9]=c,t[10]=l,t[11]=f,t[12]=d,t[13]=p,t[14]=v,t[15]=m,t},identity:Ie,transpose:Le,invert:Be,adjoint:function(t,e){var n=e[0],r=e[1],i=e[2],o=e[3],a=e[4],s=e[5],u=e[6],h=e[7],c=e[8],l=e[9],f=e[10],d=e[11],p=e[12],v=e[13],m=e[14],g=e[15];return t[0]=s*(f*g-d*m)-l*(u*g-h*m)+v*(u*d-h*f),t[1]=-(r*(f*g-d*m)-l*(i*g-o*m)+v*(i*d-o*f)),t[2]=r*(u*g-h*m)-s*(i*g-o*m)+v*(i*h-o*u),t[3]=-(r*(u*d-h*f)-s*(i*d-o*f)+l*(i*h-o*u)),t[4]=-(a*(f*g-d*m)-c*(u*g-h*m)+p*(u*d-h*f)),t[5]=n*(f*g-d*m)-c*(i*g-o*m)+p*(i*d-o*f),t[6]=-(n*(u*g-h*m)-a*(i*g-o*m)+p*(i*h-o*u)),t[7]=n*(u*d-h*f)-a*(i*d-o*f)+c*(i*h-o*u),t[8]=a*(l*g-d*v)-c*(s*g-h*v)+p*(s*d-h*l),t[9]=-(n*(l*g-d*v)-c*(r*g-o*v)+p*(r*d-o*l)),t[10]=n*(s*g-h*v)-a*(r*g-o*v)+p*(r*h-o*s),t[11]=-(n*(s*d-h*l)-a*(r*d-o*l)+c*(r*h-o*s)),t[12]=-(a*(l*m-f*v)-c*(s*m-u*v)+p*(s*f-u*l)),t[13]=n*(l*m-f*v)-c*(r*m-i*v)+p*(r*f-i*l),t[14]=-(n*(s*m-u*v)-a*(r*m-i*v)+p*(r*u-i*s)),t[15]=n*(s*f-u*l)-a*(r*f-i*l)+c*(r*u-i*s),t},determinant:ke,multiply:Ue,translate:Ne,scale:Fe,rotate:je,rotateX:ze,rotateY:Ve,rotateZ:Ge,fromTranslation:function(t,e){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=e[0],t[13]=e[1],t[14]=e[2],t[15]=1,t},fromScaling:function(t,e){return t[0]=e[0],t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=e[1],t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=e[2],t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t},fromRotation:function(t,e,n){var r,i,o,a=n[0],s=n[1],u=n[2],h=Math.hypot(a,s,u);return h0?(n[0]=2*(s*a+c*r+u*o-h*i)/l,n[1]=2*(u*a+c*i+h*r-s*o)/l,n[2]=2*(h*a+c*o+s*i-u*r)/l):(n[0]=2*(s*a+c*r+u*o-h*i),n[1]=2*(u*a+c*i+h*r-s*o),n[2]=2*(h*a+c*o+s*i-u*r)),We(t,e,n),t},getTranslation:function(t,e){return t[0]=e[12],t[1]=e[13],t[2]=e[14],t},getScaling:He,getRotation:Ze,fromRotationTranslationScale:qe,fromRotationTranslationScaleOrigin:function(t,e,n,r,i){var o=e[0],a=e[1],s=e[2],u=e[3],h=o+o,c=a+a,l=s+s,f=o*h,d=o*c,p=o*l,v=a*c,m=a*l,g=s*l,y=u*h,_=u*c,x=u*l,b=r[0],M=r[1],w=r[2],E=i[0],T=i[1],A=i[2],C=(1-(v+g))*b,R=(d+x)*b,S=(p-_)*b,P=(d-x)*M,D=(1-(f+g))*M,O=(m+y)*M,I=(p+_)*w,L=(m-y)*w,B=(1-(f+v))*w;return t[0]=C,t[1]=R,t[2]=S,t[3]=0,t[4]=P,t[5]=D,t[6]=O,t[7]=0,t[8]=I,t[9]=L,t[10]=B,t[11]=0,t[12]=n[0]+E-(C*E+P*T+I*A),t[13]=n[1]+T-(R*E+D*T+L*A),t[14]=n[2]+A-(S*E+O*T+B*A),t[15]=1,t},fromQuat:Ye,frustum:Xe,perspectiveNO:Ke,perspective:Qe,perspectiveZO:function(t,e,n,r,i){var o,a=1/Math.tan(e/2);return t[0]=a/n,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=a,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[11]=-1,t[12]=0,t[13]=0,t[15]=0,null!=i&&i!==1/0?(o=1/(r-i),t[10]=i*o,t[14]=i*r*o):(t[10]=-1,t[14]=-r),t},perspectiveFromFieldOfView:function(t,e,n,r){var i=Math.tan(e.upDegrees*Math.PI/180),o=Math.tan(e.downDegrees*Math.PI/180),a=Math.tan(e.leftDegrees*Math.PI/180),s=Math.tan(e.rightDegrees*Math.PI/180),u=2/(a+s),h=2/(i+o);return t[0]=u,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=h,t[6]=0,t[7]=0,t[8]=-(a-s)*u*.5,t[9]=(i-o)*h*.5,t[10]=r/(n-r),t[11]=-1,t[12]=0,t[13]=0,t[14]=r*n/(n-r),t[15]=0,t},orthoNO:Je,ortho:$e,orthoZO:function(t,e,n,r,i,o,a){var s=1/(e-n),u=1/(r-i),h=1/(o-a);return t[0]=-2*s,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=-2*u,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=h,t[11]=0,t[12]=(e+n)*s,t[13]=(i+r)*u,t[14]=o*h,t[15]=1,t},lookAt:tn,targetTo:en,str:function(t){return"mat4("+t[0]+", "+t[1]+", "+t[2]+", "+t[3]+", "+t[4]+", "+t[5]+", "+t[6]+", "+t[7]+", "+t[8]+", "+t[9]+", "+t[10]+", "+t[11]+", "+t[12]+", "+t[13]+", "+t[14]+", "+t[15]+")"},frob:function(t){return Math.hypot(t[0],t[1],t[2],t[3],t[4],t[5],t[6],t[7],t[8],t[9],t[10],t[11],t[12],t[13],t[14],t[15])},add:function(t,e,n){return t[0]=e[0]+n[0],t[1]=e[1]+n[1],t[2]=e[2]+n[2],t[3]=e[3]+n[3],t[4]=e[4]+n[4],t[5]=e[5]+n[5],t[6]=e[6]+n[6],t[7]=e[7]+n[7],t[8]=e[8]+n[8],t[9]=e[9]+n[9],t[10]=e[10]+n[10],t[11]=e[11]+n[11],t[12]=e[12]+n[12],t[13]=e[13]+n[13],t[14]=e[14]+n[14],t[15]=e[15]+n[15],t},subtract:nn,multiplyScalar:function(t,e,n){return t[0]=e[0]*n,t[1]=e[1]*n,t[2]=e[2]*n,t[3]=e[3]*n,t[4]=e[4]*n,t[5]=e[5]*n,t[6]=e[6]*n,t[7]=e[7]*n,t[8]=e[8]*n,t[9]=e[9]*n,t[10]=e[10]*n,t[11]=e[11]*n,t[12]=e[12]*n,t[13]=e[13]*n,t[14]=e[14]*n,t[15]=e[15]*n,t},multiplyScalarAndAdd:function(t,e,n,r){return t[0]=e[0]+n[0]*r,t[1]=e[1]+n[1]*r,t[2]=e[2]+n[2]*r,t[3]=e[3]+n[3]*r,t[4]=e[4]+n[4]*r,t[5]=e[5]+n[5]*r,t[6]=e[6]+n[6]*r,t[7]=e[7]+n[7]*r,t[8]=e[8]+n[8]*r,t[9]=e[9]+n[9]*r,t[10]=e[10]+n[10]*r,t[11]=e[11]+n[11]*r,t[12]=e[12]+n[12]*r,t[13]=e[13]+n[13]*r,t[14]=e[14]+n[14]*r,t[15]=e[15]+n[15]*r,t},exactEquals:function(t,e){return t[0]===e[0]&&t[1]===e[1]&&t[2]===e[2]&&t[3]===e[3]&&t[4]===e[4]&&t[5]===e[5]&&t[6]===e[6]&&t[7]===e[7]&&t[8]===e[8]&&t[9]===e[9]&&t[10]===e[10]&&t[11]===e[11]&&t[12]===e[12]&&t[13]===e[13]&&t[14]===e[14]&&t[15]===e[15]},equals:function(t,e){var n=t[0],r=t[1],i=t[2],o=t[3],a=t[4],s=t[5],u=t[6],h=t[7],c=t[8],l=t[9],f=t[10],d=t[11],p=t[12],v=t[13],m=t[14],g=t[15],y=e[0],_=e[1],x=e[2],b=e[3],M=e[4],w=e[5],E=e[6],T=e[7],A=e[8],C=e[9],R=e[10],S=e[11],P=e[12],D=e[13],O=e[14],I=e[15];return Math.abs(n-y)<=vt*Math.max(1,Math.abs(n),Math.abs(y))&&Math.abs(r-_)<=vt*Math.max(1,Math.abs(r),Math.abs(_))&&Math.abs(i-x)<=vt*Math.max(1,Math.abs(i),Math.abs(x))&&Math.abs(o-b)<=vt*Math.max(1,Math.abs(o),Math.abs(b))&&Math.abs(a-M)<=vt*Math.max(1,Math.abs(a),Math.abs(M))&&Math.abs(s-w)<=vt*Math.max(1,Math.abs(s),Math.abs(w))&&Math.abs(u-E)<=vt*Math.max(1,Math.abs(u),Math.abs(E))&&Math.abs(h-T)<=vt*Math.max(1,Math.abs(h),Math.abs(T))&&Math.abs(c-A)<=vt*Math.max(1,Math.abs(c),Math.abs(A))&&Math.abs(l-C)<=vt*Math.max(1,Math.abs(l),Math.abs(C))&&Math.abs(f-R)<=vt*Math.max(1,Math.abs(f),Math.abs(R))&&Math.abs(d-S)<=vt*Math.max(1,Math.abs(d),Math.abs(S))&&Math.abs(p-P)<=vt*Math.max(1,Math.abs(p),Math.abs(P))&&Math.abs(v-D)<=vt*Math.max(1,Math.abs(v),Math.abs(D))&&Math.abs(m-O)<=vt*Math.max(1,Math.abs(m),Math.abs(O))&&Math.abs(g-I)<=vt*Math.max(1,Math.abs(g),Math.abs(I))},mul:rn,sub:on});function sn(){var t=new mt(4);return mt!=Float32Array&&(t[0]=0,t[1]=0,t[2]=0,t[3]=0),t}function un(t){var e=new mt(4);return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e}function hn(t,e,n,r){var i=new mt(4);return i[0]=t,i[1]=e,i[2]=n,i[3]=r,i}function cn(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t}function ln(t,e,n,r,i){return t[0]=e,t[1]=n,t[2]=r,t[3]=i,t}function fn(t,e,n){return t[0]=e[0]+n[0],t[1]=e[1]+n[1],t[2]=e[2]+n[2],t[3]=e[3]+n[3],t}function dn(t,e,n){return t[0]=e[0]-n[0],t[1]=e[1]-n[1],t[2]=e[2]-n[2],t[3]=e[3]-n[3],t}function pn(t,e,n){return t[0]=e[0]*n[0],t[1]=e[1]*n[1],t[2]=e[2]*n[2],t[3]=e[3]*n[3],t}function vn(t,e,n){return t[0]=e[0]/n[0],t[1]=e[1]/n[1],t[2]=e[2]/n[2],t[3]=e[3]/n[3],t}function mn(t,e,n){return t[0]=e[0]*n,t[1]=e[1]*n,t[2]=e[2]*n,t[3]=e[3]*n,t}function gn(t,e){var n=e[0]-t[0],r=e[1]-t[1],i=e[2]-t[2],o=e[3]-t[3];return Math.hypot(n,r,i,o)}function yn(t,e){var n=e[0]-t[0],r=e[1]-t[1],i=e[2]-t[2],o=e[3]-t[3];return n*n+r*r+i*i+o*o}function _n(t){var e=t[0],n=t[1],r=t[2],i=t[3];return Math.hypot(e,n,r,i)}function xn(t){var e=t[0],n=t[1],r=t[2],i=t[3];return e*e+n*n+r*r+i*i}function bn(t,e){var n=e[0],r=e[1],i=e[2],o=e[3],a=n*n+r*r+i*i+o*o;return a>0&&(a=1/Math.sqrt(a)),t[0]=n*a,t[1]=r*a,t[2]=i*a,t[3]=o*a,t}function Mn(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]+t[3]*e[3]}function wn(t,e,n,r){var i=e[0],o=e[1],a=e[2],s=e[3];return t[0]=i+r*(n[0]-i),t[1]=o+r*(n[1]-o),t[2]=a+r*(n[2]-a),t[3]=s+r*(n[3]-s),t}function En(t,e,n){var r=e[0],i=e[1],o=e[2],a=e[3];return t[0]=n[0]*r+n[4]*i+n[8]*o+n[12]*a,t[1]=n[1]*r+n[5]*i+n[9]*o+n[13]*a,t[2]=n[2]*r+n[6]*i+n[10]*o+n[14]*a,t[3]=n[3]*r+n[7]*i+n[11]*o+n[15]*a,t}function Tn(t,e){return t[0]===e[0]&&t[1]===e[1]&&t[2]===e[2]&&t[3]===e[3]}function An(t,e){var n=t[0],r=t[1],i=t[2],o=t[3],a=e[0],s=e[1],u=e[2],h=e[3];return Math.abs(n-a)<=vt*Math.max(1,Math.abs(n),Math.abs(a))&&Math.abs(r-s)<=vt*Math.max(1,Math.abs(r),Math.abs(s))&&Math.abs(i-u)<=vt*Math.max(1,Math.abs(i),Math.abs(u))&&Math.abs(o-h)<=vt*Math.max(1,Math.abs(o),Math.abs(h))}var Cn,Rn=dn,Sn=pn,Pn=vn,Dn=gn,On=yn,In=_n,Ln=xn,Bn=function(){var t=sn();return function(e,n,r,i,o,a){var s,u;for(n||(n=4),r||(r=0),u=i?Math.min(i*n+r,e.length):e.length,s=r;s=1);do{s=(i=2*gt()-1)*i+(o=2*gt()-1)*o}while(s>=1);var u=Math.sqrt((1-a)/s);return t[0]=e*n,t[1]=e*r,t[2]=e*i*u,t[3]=e*o*u,t},transformMat4:En,transformQuat:function(t,e,n){var r=e[0],i=e[1],o=e[2],a=n[0],s=n[1],u=n[2],h=n[3],c=h*r+s*o-u*i,l=h*i+u*r-a*o,f=h*o+a*i-s*r,d=-a*r-s*i-u*o;return t[0]=c*h+d*-a+l*-u-f*-s,t[1]=l*h+d*-s+f*-a-c*-u,t[2]=f*h+d*-u+c*-s-l*-a,t[3]=e[3],t},zero:function(t){return t[0]=0,t[1]=0,t[2]=0,t[3]=0,t},str:function(t){return"vec4("+t[0]+", "+t[1]+", "+t[2]+", "+t[3]+")"},exactEquals:Tn,equals:An,sub:Rn,mul:Sn,div:Pn,dist:Dn,sqrDist:On,len:In,sqrLen:Ln,forEach:Bn});!function(t){t[t.COL0ROW0=0]="COL0ROW0",t[t.COL0ROW1=1]="COL0ROW1",t[t.COL0ROW2=2]="COL0ROW2",t[t.COL0ROW3=3]="COL0ROW3",t[t.COL1ROW0=4]="COL1ROW0",t[t.COL1ROW1=5]="COL1ROW1",t[t.COL1ROW2=6]="COL1ROW2",t[t.COL1ROW3=7]="COL1ROW3",t[t.COL2ROW0=8]="COL2ROW0",t[t.COL2ROW1=9]="COL2ROW1",t[t.COL2ROW2=10]="COL2ROW2",t[t.COL2ROW3=11]="COL2ROW3",t[t.COL3ROW0=12]="COL3ROW0",t[t.COL3ROW1=13]="COL3ROW1",t[t.COL3ROW2=14]="COL3ROW2",t[t.COL3ROW3=15]="COL3ROW3"}(Cn||(Cn={}));const Un=45*Math.PI/180,Nn=1,Fn=.1,jn=500,zn=Object.freeze([1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]);class Vn extends we{static get IDENTITY(){return function(){Wn||(Wn=new Vn,Object.freeze(Wn));return Wn}()}static get ZERO(){return function(){Gn||(Gn=new Vn([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]),Object.freeze(Gn));return Gn}()}get ELEMENTS(){return 16}get RANK(){return 4}get INDICES(){return Cn}constructor(t){super(-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0),1===arguments.length&&Array.isArray(t)?this.copy(t):this.identity()}copy(t){return this[0]=t[0],this[1]=t[1],this[2]=t[2],this[3]=t[3],this[4]=t[4],this[5]=t[5],this[6]=t[6],this[7]=t[7],this[8]=t[8],this[9]=t[9],this[10]=t[10],this[11]=t[11],this[12]=t[12],this[13]=t[13],this[14]=t[14],this[15]=t[15],this.check()}set(t,e,n,r,i,o,a,s,u,h,c,l,f,d,p,v){return this[0]=t,this[1]=e,this[2]=n,this[3]=r,this[4]=i,this[5]=o,this[6]=a,this[7]=s,this[8]=u,this[9]=h,this[10]=c,this[11]=l,this[12]=f,this[13]=d,this[14]=p,this[15]=v,this.check()}setRowMajor(t,e,n,r,i,o,a,s,u,h,c,l,f,d,p,v){return this[0]=t,this[1]=i,this[2]=u,this[3]=f,this[4]=e,this[5]=o,this[6]=h,this[7]=d,this[8]=n,this[9]=a,this[10]=c,this[11]=p,this[12]=r,this[13]=s,this[14]=l,this[15]=v,this.check()}toRowMajor(t){return t[0]=this[0],t[1]=this[4],t[2]=this[8],t[3]=this[12],t[4]=this[1],t[5]=this[5],t[6]=this[9],t[7]=this[13],t[8]=this[2],t[9]=this[6],t[10]=this[10],t[11]=this[14],t[12]=this[3],t[13]=this[7],t[14]=this[11],t[15]=this[15],t}identity(){return this.copy(zn)}fromObject(t){return this.check()}fromQuaternion(t){return Ye(this,t),this.check()}frustum(t){const{left:e,right:n,bottom:r,top:i,near:o=Fn,far:a=jn}=t;return a===1/0?function(t,e,n,r,i,o){const a=2*o/(n-e),s=2*o/(i-r),u=(n+e)/(n-e),h=(i+r)/(i-r),c=-1,l=-1,f=-2*o;t[0]=a,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=s,t[6]=0,t[7]=0,t[8]=u,t[9]=h,t[10]=c,t[11]=l,t[12]=0,t[13]=0,t[14]=f,t[15]=0}(this,e,n,r,i,o):Xe(this,e,n,r,i,o,a),this.check()}lookAt(t){const{eye:e,center:n=[0,0,0],up:r=[0,1,0]}=t;return tn(this,e,n,r),this.check()}ortho(t){const{left:e,right:n,bottom:r,top:i,near:o=Fn,far:a=jn}=t;return $e(this,e,n,r,i,o,a),this.check()}orthographic(t){const{fovy:e=Un,aspect:n=Nn,focalDistance:r=1,near:i=Fn,far:o=jn}=t;Hn(e);const a=e/2,s=r*Math.tan(a),u=s*n;return this.ortho({left:-u,right:u,bottom:-s,top:s,near:i,far:o})}perspective(t){const{fovy:e=45*Math.PI/180,aspect:n=1,near:r=.1,far:i=500}=t;return Hn(e),Qe(this,e,n,r,i),this.check()}determinant(){return ke(this)}getScale(t=[-0,-0,-0]){return t[0]=Math.sqrt(this[0]*this[0]+this[1]*this[1]+this[2]*this[2]),t[1]=Math.sqrt(this[4]*this[4]+this[5]*this[5]+this[6]*this[6]),t[2]=Math.sqrt(this[8]*this[8]+this[9]*this[9]+this[10]*this[10]),t}getTranslation(t=[-0,-0,-0]){return t[0]=this[12],t[1]=this[13],t[2]=this[14],t}getRotation(t,e){t=t||[-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0],e=e||[-0,-0,-0];const n=this.getScale(e),r=1/n[0],i=1/n[1],o=1/n[2];return t[0]=this[0]*r,t[1]=this[1]*i,t[2]=this[2]*o,t[3]=0,t[4]=this[4]*r,t[5]=this[5]*i,t[6]=this[6]*o,t[7]=0,t[8]=this[8]*r,t[9]=this[9]*i,t[10]=this[10]*o,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}getRotationMatrix3(t,e){t=t||[-0,-0,-0,-0,-0,-0,-0,-0,-0],e=e||[-0,-0,-0];const n=this.getScale(e),r=1/n[0],i=1/n[1],o=1/n[2];return t[0]=this[0]*r,t[1]=this[1]*i,t[2]=this[2]*o,t[3]=this[4]*r,t[4]=this[5]*i,t[5]=this[6]*o,t[6]=this[8]*r,t[7]=this[9]*i,t[8]=this[10]*o,t}transpose(){return Le(this,this),this.check()}invert(){return Be(this,this),this.check()}multiplyLeft(t){return Ue(this,t,this),this.check()}multiplyRight(t){return Ue(this,this,t),this.check()}rotateX(t){return ze(this,this,t),this.check()}rotateY(t){return Ve(this,this,t),this.check()}rotateZ(t){return Ge(this,this,t),this.check()}rotateXYZ(t){return this.rotateX(t[0]).rotateY(t[1]).rotateZ(t[2])}rotateAxis(t,e){return je(this,this,t,e),this.check()}scale(t){return Fe(this,this,Array.isArray(t)?t:[t,t,t]),this.check()}translate(t){return Ne(this,this,t),this.check()}transform(t,e){return 4===t.length?(dt(e=En(e||[-0,-0,-0,-0],t,this),4),e):this.transformAsPoint(t,e)}transformAsPoint(t,e){const{length:n}=t;let r;switch(n){case 2:r=Ct(e||[-0,-0],t,this);break;case 3:r=ee(e||[-0,-0,-0],t,this);break;default:throw new Error("Illegal vector")}return dt(r,t.length),r}transformAsVector(t,e){let n;switch(t.length){case 2:n=function(t,e,n){const r=e[0],i=e[1],o=n[3]*r+n[7]*i||1;return t[0]=(n[0]*r+n[4]*i)/o,t[1]=(n[1]*r+n[5]*i)/o,t}(e||[-0,-0],t,this);break;case 3:n=Nt(e||[-0,-0,-0],t,this);break;default:throw new Error("Illegal vector")}return dt(n,t.length),n}transformPoint(t,e){return this.transformAsPoint(t,e)}transformVector(t,e){return this.transformAsPoint(t,e)}transformDirection(t,e){return this.transformAsVector(t,e)}makeRotationX(t){return this.identity().rotateX(t)}makeTranslation(t,e,n){return this.identity().translate([t,e,n])}}let Gn,Wn;function Hn(t){if(t>2*Math.PI)throw Error("expected radians")}function Zn(){var t=new mt(4);return mt!=Float32Array&&(t[0]=0,t[1]=0,t[2]=0),t[3]=1,t}function qn(t){return t[0]=0,t[1]=0,t[2]=0,t[3]=1,t}function Yn(t,e,n){n*=.5;var r=Math.sin(n);return t[0]=r*e[0],t[1]=r*e[1],t[2]=r*e[2],t[3]=Math.cos(n),t}function Xn(t,e,n){var r=e[0],i=e[1],o=e[2],a=e[3],s=n[0],u=n[1],h=n[2],c=n[3];return t[0]=r*c+a*s+i*h-o*u,t[1]=i*c+a*u+o*s-r*h,t[2]=o*c+a*h+r*u-i*s,t[3]=a*c-r*s-i*u-o*h,t}function Kn(t,e){var n=e[0],r=e[1],i=e[2],o=e[3],a=Math.sqrt(n*n+r*r+i*i),s=Math.exp(o),u=a>0?s*Math.sin(a)/a:0;return t[0]=n*u,t[1]=r*u,t[2]=i*u,t[3]=s*Math.cos(a),t}function Qn(t,e){var n=e[0],r=e[1],i=e[2],o=e[3],a=Math.sqrt(n*n+r*r+i*i),s=a>0?Math.atan2(a,o)/a:0;return t[0]=n*s,t[1]=r*s,t[2]=i*s,t[3]=.5*Math.log(n*n+r*r+i*i+o*o),t}function Jn(t,e,n,r){var i,o,a,s,u,h=e[0],c=e[1],l=e[2],f=e[3],d=n[0],p=n[1],v=n[2],m=n[3];return(o=h*d+c*p+l*v+f*m)<0&&(o=-o,d=-d,p=-p,v=-v,m=-m),1-o>vt?(i=Math.acos(o),a=Math.sin(i),s=Math.sin((1-r)*i)/a,u=Math.sin(r*i)/a):(s=1-r,u=r),t[0]=s*h+u*d,t[1]=s*c+u*p,t[2]=s*l+u*v,t[3]=s*f+u*m,t}function $n(t,e){var n,r=e[0]+e[4]+e[8];if(r>0)n=Math.sqrt(r+1),t[3]=.5*n,n=.5/n,t[0]=(e[5]-e[7])*n,t[1]=(e[6]-e[2])*n,t[2]=(e[1]-e[3])*n;else{var i=0;e[4]>e[0]&&(i=1),e[8]>e[3*i+i]&&(i=2);var o=(i+1)%3,a=(i+2)%3;n=Math.sqrt(e[3*i+i]-e[3*o+o]-e[3*a+a]+1),t[i]=.5*n,n=.5/n,t[3]=(e[3*o+a]-e[3*a+o])*n,t[o]=(e[3*o+i]+e[3*i+o])*n,t[a]=(e[3*a+i]+e[3*i+a])*n}return t}function tr(t,e,n,r){var i=.5*Math.PI/180;e*=i,n*=i,r*=i;var o=Math.sin(e),a=Math.cos(e),s=Math.sin(n),u=Math.cos(n),h=Math.sin(r),c=Math.cos(r);return t[0]=o*u*c-a*s*h,t[1]=a*s*c+o*u*h,t[2]=a*u*h-o*s*c,t[3]=a*u*c+o*s*h,t}var er,nr,rr,ir,or,ar,sr=un,ur=hn,hr=cn,cr=ln,lr=fn,fr=Xn,dr=mn,pr=Mn,vr=wn,mr=_n,gr=mr,yr=xn,_r=yr,xr=bn,br=Tn,Mr=An,wr=(er=Ft(),nr=Vt(1,0,0),rr=Vt(0,1,0),function(t,e,n){var r=$t(e,n);return r<-.999999?(te(er,nr,e),pe(er)<1e-6&&te(er,rr,e),Jt(er,er),Yn(t,er,Math.PI),t):r>.999999?(t[0]=0,t[1]=0,t[2]=0,t[3]=1,t):(te(er,e,n),t[0]=er[0],t[1]=er[1],t[2]=er[2],t[3]=1+r,xr(t,t))}),Er=(ir=Zn(),or=Zn(),function(t,e,n,r,i,o){return Jn(ir,e,i,o),Jn(or,n,r,o),Jn(t,ir,or,2*o*(1-o)),t}),Tr=(ar=Ee(),function(t,e,n,r){return ar[0]=n[0],ar[3]=n[1],ar[6]=n[2],ar[1]=r[0],ar[4]=r[1],ar[7]=r[2],ar[2]=-e[0],ar[5]=-e[1],ar[8]=-e[2],xr(t,$n(t,ar))}),Ar=Object.freeze({__proto__:null,create:Zn,identity:qn,setAxisAngle:Yn,getAxisAngle:function(t,e){var n=2*Math.acos(e[3]),r=Math.sin(n/2);return r>vt?(t[0]=e[0]/r,t[1]=e[1]/r,t[2]=e[2]/r):(t[0]=1,t[1]=0,t[2]=0),n},getAngle:function(t,e){var n=pr(t,e);return Math.acos(2*n*n-1)},multiply:Xn,rotateX:function(t,e,n){n*=.5;var r=e[0],i=e[1],o=e[2],a=e[3],s=Math.sin(n),u=Math.cos(n);return t[0]=r*u+a*s,t[1]=i*u+o*s,t[2]=o*u-i*s,t[3]=a*u-r*s,t},rotateY:function(t,e,n){n*=.5;var r=e[0],i=e[1],o=e[2],a=e[3],s=Math.sin(n),u=Math.cos(n);return t[0]=r*u-o*s,t[1]=i*u+a*s,t[2]=o*u+r*s,t[3]=a*u-i*s,t},rotateZ:function(t,e,n){n*=.5;var r=e[0],i=e[1],o=e[2],a=e[3],s=Math.sin(n),u=Math.cos(n);return t[0]=r*u+i*s,t[1]=i*u-r*s,t[2]=o*u+a*s,t[3]=a*u-o*s,t},calculateW:function(t,e){var n=e[0],r=e[1],i=e[2];return t[0]=n,t[1]=r,t[2]=i,t[3]=Math.sqrt(Math.abs(1-n*n-r*r-i*i)),t},exp:Kn,ln:Qn,pow:function(t,e,n){return Qn(t,e),dr(t,t,n),Kn(t,t),t},slerp:Jn,random:function(t){var e=gt(),n=gt(),r=gt(),i=Math.sqrt(1-e),o=Math.sqrt(e);return t[0]=i*Math.sin(2*Math.PI*n),t[1]=i*Math.cos(2*Math.PI*n),t[2]=o*Math.sin(2*Math.PI*r),t[3]=o*Math.cos(2*Math.PI*r),t},invert:function(t,e){var n=e[0],r=e[1],i=e[2],o=e[3],a=n*n+r*r+i*i+o*o,s=a?1/a:0;return t[0]=-n*s,t[1]=-r*s,t[2]=-i*s,t[3]=o*s,t},conjugate:function(t,e){return t[0]=-e[0],t[1]=-e[1],t[2]=-e[2],t[3]=e[3],t},fromMat3:$n,fromEuler:tr,str:function(t){return"quat("+t[0]+", "+t[1]+", "+t[2]+", "+t[3]+")"},clone:sr,fromValues:ur,copy:hr,set:cr,add:lr,mul:fr,scale:dr,dot:pr,lerp:vr,length:mr,len:gr,squaredLength:yr,sqrLen:_r,normalize:xr,exactEquals:br,equals:Mr,rotationTo:wr,sqlerp:Er,setAxes:Tr});function Cr(t){return Cr="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},Cr(t)}var Rr=function(t){return"[object String]"===Object.prototype.toString.call(t)},Sr=function(t){var e="[object Function]"===Object.prototype.toString.call(t),n="[object AsyncFunction]"===Object.prototype.toString.call(t);return e||n},Pr=365611;function Dr(t,e){this.type=t,this.returnValue=!0,this.target=e||null,this.currentTarget=null}var Or=function(){function t(){this.__listeners=void 0}var e=t.prototype;return e.on=function(){for(var t=arguments.length,e=new Array(t),n=0;nl?(t[0]=-Math.PI/2,t[1]=2*Math.atan2(i,o),t[2]=0):(t[0]=Math.asin(-2*(n*i-r*o)),t[1]=Math.atan2(2*(n*r+i*o),s-u-h+a),t[2]=Math.atan2(2*(r*i+n*o),-s-u+h+a)),t}var Lr=function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:t.DefaultOrder;this.isEuler=!0,this._x=void 0,this._y=void 0,this._z=void 0,this._order=void 0,this._onChangeCallback=void 0,this._x=e,this._y=n,this._z=r,this._order=i,this._onChangeCallback=function(){}}var e=t.prototype;return e.set=function(t,e,n){var r=!(arguments.length>3&&void 0!==arguments[3])||arguments[3];return this._x=t,this._y=e,this._z=n,r&&this._onChangeCallback(),this},e.clone=function(){return new t(this._x,this._y,this._z,this._order)},e.copy=function(t){return t.isEuler?(this._x=t._x,this._y=t._y,this._z=t._z,this._order=t._order,this._onChangeCallback(),this):this},e.equals=function(t){return t._x===this._x&&t._y===this._y&&t._z===this._z&&t._order===this._order},e.toVector3=function(){return Vt(this._x,this._y,this._z)},e.onChange=function(t){"function"==typeof t&&(this._onChangeCallback=t)},o(t,[{key:"x",get:function(){return this._x},set:function(t){this._x=t,this._onChangeCallback()}},{key:"y",get:function(){return this._y},set:function(t){this._y=t,this._onChangeCallback()}},{key:"z",get:function(){return this._z},set:function(t){this._z=t,this._onChangeCallback()}},{key:"order",get:function(){return this._order},set:function(t){this._order=t,this._onChangeCallback()}}]),t}();function Br(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(t){var e=16*Math.random()|0;return("x"===t?e:3&e|8).toString(16)}))}Lr.DefaultOrder="XYZ";var kr=function(t){return 180*t/Math.PI},Ur=function(t){function e(){var n;return(n=t.call(this)||this).isObject3D=!0,n.uuid=Br(),n.name="",n.parent=null,n.children=[],n.visible=!0,n.position=Ft(),n.rotation=new Lr,n.scale=Vt(1,1,1),n.quaternion=Zn(),n.up=jt(e.DefaultUp),n.modelMatrix=Pe(),n.worldMatrix=Pe(),n.modelMatrixNeedUpdate=!1,n.worldMatrixNeedsUpdate=!1,n.rotation.onChange((function(){n.modelMatrixNeedUpdate=!0})),n}c(e,t);var n=e.prototype;return n.rotateX=function(t){this.rotation.x=t},n.rotateY=function(t){this.rotation.y=t},n.rotateZ=function(t){this.rotation.z=t},n.translate=function(t,e,n){var r=Vt(t,e,n);return this.position=Wt(this.position,this.position,r),this.modelMatrixNeedUpdate=!0,this},n.setPosition=function(t,e,n){var r=Vt(t,e,n);return ue(this.position,r)||(this.position=r,this.modelMatrixNeedUpdate=!0),this},n.lookAt=function(t,e,n){var r=this.up,i=this.position,o=Vt(t,e,n),a=en(Pe(),i,o,r),s=Ze(Zn(),a),u=Ir(Ft(),s);this.rotation.set(kr(u[0]),kr(u[1]),kr(u[2]))},n.setVisible=function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(this.visible!==t&&(this.visible=t,e))for(var n=0,r=this.children.length;n0&&void 0!==arguments[0]&&arguments[0];!0!==this.modelMatrixNeedUpdate&&!0!==t||this.updateMatrix(),!0===this.worldMatrixNeedsUpdate&&(this.parent?Ue(this.worldMatrix,this.parent.worldMatrix,this.modelMatrix):Oe(this.worldMatrix,this.modelMatrix),this.worldMatrixNeedsUpdate=!1,t=!0);for(var e=0,n=this.children.length;e ".concat(t)),this;if(t instanceof Array){for(var e=0,n=t.length;e0&&this.children.forEach((function(e){e.traverse(t)}))},n.clone=function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0],n=new e;if(n.up=jt(this.up),n.scale=jt(this.scale),n.position=jt(this.position),n.rotation=this.rotation.clone(),n.quaternion=sr(this.quaternion),n.modelMatrix=De(this.modelMatrix),n.worldMatrix=De(this.worldMatrix),n.visible=this.visible,this.children.length&&t)for(var r=0,i=this.children.length;ri&&(i=l),f>o&&(o=f),d>a&&(a=d)}var p=Vt(e,n,r),v=Vt(i,o,a);return this.set(p,v),this},e.getCenter=function(){return this.isInvalid()?Ft():Vt((this.max[0]+this.min[0])/2,(this.max[1]+this.min[1])/2,(this.max[2]+this.min[2])/2)},e.isInvalid=function(){return this.max[0]3&&void 0!==arguments[3]&&arguments[3];if(this.isBufferAttribute=!0,this.name="",this.type=void 0,this.array=void 0,this.itemSize=void 0,this.count=void 0,this.normalized=void 0,this.usage=void 0,this.needUpdate=void 0,Array.isArray(e))throw new TypeError("BufferAttribute: array should be a Typed Array.");if(this.name="BufferAttribute",this.array=e,this.itemSize=n,this.count=void 0!==e?e.length/n:0,this.normalized=!0===i,this.usage=35044,this.needUpdate=!0,void 0===r){var o=this.array;this.type=t.FLOAT,o instanceof Int8Array?this.type=t.BYTE:o instanceof Uint8Array?this.type=t.UNSIGNED_BYTE:o instanceof Int16Array?this.type=t.SHORT:o instanceof Uint16Array?this.type=t.UNSIGNED_SHORT:o instanceof Int32Array?this.type=t.INT:o instanceof Uint32Array&&(this.type=t.UNSIGNED_INT)}else this.type=r}t.isBufferAttribute=function(e){var n=!1;return e&&e instanceof t&&(n=!0),n};var e=t.prototype;return e.setUsage=function(t){return this.usage=t,this},e.setArray=function(t){return this.array.set(t),this},t}();Fr.BYTE=5120,Fr.UNSIGNED_BYTE=5121,Fr.SHORT=5122,Fr.UNSIGNED_SHORT=5123,Fr.INT=5124,Fr.UNSIGNED_INT=5125,Fr.FLOAT=5126;var jr=function(t){function e(e,n,r,i){var o;return(o=t.call(this,new Uint8Array(e),n,r,i)||this).name="Uint8BufferAttribute",o}return c(e,t),e}(Fr),zr=function(t){function e(e,n,r,i){var o;return(o=t.call(this,new Uint16Array(e),n,r,i)||this).name="Uint16BufferAttribute",o}return c(e,t),e}(Fr),Vr=function(t){function e(e,n,r,i){var o;return(o=t.call(this,new Uint32Array(e),n,r,i)||this).name="Uint32BufferAttribute",o}return c(e,t),e}(Fr),Gr=function(t){function e(e,n,r,i){var o;return(o=t.call(this,new Float32Array(e),n,r,i)||this).name="Float32ArrayAttribute",o}return c(e,t),e}(Fr),Wr=function(t){function e(e,n,r,i){var o;if(Array.isArray(e)){var a=function(t){for(var e,n=Number.MAX_VALUE,r=-Number.MAX_VALUE,i=t.length-1;i>=0;i--)n>(e=t[i])&&(n=e),r65535?Uint32Array:Uint16Array)(e)}else o=e;return t.call(this,o,n,r,i)||this}return c(e,t),e}(Fr),Hr=0,Zr=function(t){function e(){for(var e,n=arguments.length,r=new Array(n),i=0;i0&&void 0!==arguments[0]&&arguments[0];!0===this.autoUpdate&&t.prototype.updateWorldMatrix.call(this,e)},n.clone=function(n){return void 0===n&&(n=new e),t.prototype.clone.call(this,n),n.autoUpdate=this.autoUpdate,n},e}(Ur),Jr=function(t){function e(){var e;return(e=t.call(this)||this).type="Geometry",e.vertices=[],e.verticesBufferData=new Float32Array,e.indicesBufferData=new Uint16Array,e.uvtsBufferData=new Float32Array,e.groupsNeedUpdate=!1,e}return c(e,t),e}(Or),$r=new be,ti=new be,ei=new be,ni=new be,ri=new be,ii=function(){function t(t,e){this.origin=void 0,this.direction=void 0,this.origin=t||new be,this.direction=e||new be(0,0,-1)}var e=t.prototype;return e.set=function(t,e){return this.origin.copy(t),this.direction.copy(e),this},e.setFromCamera=function(t,e){var n=new be(e.position[0],e.position[1],e.position[2]),r=(new Vn).fromArray(e.projectionMatrix),i=e.worldMatrix,o=new Me(t[0],t[1],.5,1).transform(r).transform(i),a=o.x,s=o.y,u=o.z,h=new be(a,s,u).sub(n).normalize();this.set(n,h)},e.getPointByLen=function(t,e){var n=void 0!==e?e:new be;return n.copy(this.direction),n.scale(t),n.add(this.origin),n},e.intersectTriangle_Old=function(t,e,n){var r,i=arguments.length>3&&void 0!==arguments[3]&&arguments[3],o=arguments.length>4?arguments[4]:void 0,a=$r.copy(e).subtract(t),s=ti.copy(n).subtract(t),u=ei.copy(a).cross(s),h=ni.copy(this.origin).subtract(t),c=this.direction.dot(u);if(0c))return null;r=-1,c=-c}s.copy((new be).copy(h).cross(s));var l=r*this.direction.dot(s);if(0>l)return null;var f=r*this.direction.dot((new be).copy(h).cross(a));if(0>f)return null;if(l+f>c)return null;var d=-r*h.dot(u);return 0>d?null:this.getPointByLen(d/c,o)},e.intersectTriangle=function(t,e,n){var r=arguments.length>4?arguments[4]:void 0,i=1e-6,o=$r.subVectors(e,t),a=ti.subVectors(n,t),s=ei.copy(this.direction).cross(a),u=o.dot(s);if(u>-i&&u1)return null;var f=ri.copy(c).cross(o),d=h*this.direction.dot(f);if(d<0||l+d>1)return null;var p=a.dot(f)*h;return p>i?{distance:p,point:this.getPointByLen(p,r)}:null},e.intersectSphere=function(t,e,n){var r=(new be).subtract(t,this.origin),i=r.dot(this.direction),o=r.dot(r)-i*i,a=e*e;if(o>a)return null;var s=Math.sqrt(a-o),u=i-s,h=i+s;return 0>u&&0>h?null:0>u?this.getPointByLen(h,n):this.getPointByLen(u,n)},t}();function oi(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=function(t,e){if(!t)return;if("string"==typeof t)return ai(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return ai(t,e)}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,i=function(){};return{s:i,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,s=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){s=!0,o=t},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw o}}}}function ai(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n=r.maxTextures?r.usedTextureUnits=0:r.usedTextureUnits+=1,t},this.resetUsedTextureUnits=function(){r.usedTextureUnits=0},this.setTexture=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;if(t instanceof hi)r.setCubeTexture(t,e);else{var n=r.gl;n.activeTexture(n.TEXTURE0+e),t.needsUpdate?(t.init(n),r.uploadTexture(n,t)):n.bindTexture(n.TEXTURE_2D,t.glTexture)}},this.setTextureForRenderTarget=function(t){var e=r.gl;t.glTexture=e.createTexture(),e.bindTexture(e.TEXTURE_2D,t.glTexture),e.pixelStorei(e.UNPACK_FLIP_Y_WEBGL,t.flipY),e.pixelStorei(e.UNPACK_PREMULTIPLY_ALPHA_WEBGL,t.premultiplyAlpha),r.setTextureParameter(e);var n=e.RGBA,i=e.RGBA,o=e.UNSIGNED_BYTE;e.texImage2D(e.TEXTURE_2D,0,n,t.width,t.height,0,i,o,null)},this.uploadTexture=function(t,e){e.init(t),t.bindTexture(t.TEXTURE_2D,e.glTexture),t.pixelStorei(t.UNPACK_FLIP_Y_WEBGL,e.flipY),t.pixelStorei(t.UNPACK_PREMULTIPLY_ALPHA_WEBGL,e.premultiplyAlpha),r.setTextureParameter(t),t.texImage2D(t.TEXTURE_2D,0,t.RGBA,t.RGBA,t.UNSIGNED_BYTE,e.image),e.needsUpdate=!1},this.setTextureParameter=function(t){t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_S,t.CLAMP_TO_EDGE),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_T,t.CLAMP_TO_EDGE),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MAG_FILTER,t.LINEAR),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MIN_FILTER,t.LINEAR)},this.gl=t,this.maxTextureSize=n,this.maxTextures=e}return t.prototype.setCubeTexture=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=t.image;if(6!==n.length)throw new Error("[setCubeTexture] CubeTexture need six images, but get\n ".concat(n.length,"\n "));var r=this.gl;if(t.needsUpdate){t.init(r),r.activeTexture(r.TEXTURE0+e),r.bindTexture(r.TEXTURE_CUBE_MAP,t.glTexture),r.pixelStorei(r.UNPACK_FLIP_Y_WEBGL,t.flipY),r.texParameteri(r.TEXTURE_CUBE_MAP,r.TEXTURE_MAG_FILTER,r.LINEAR),r.texParameteri(r.TEXTURE_CUBE_MAP,r.TEXTURE_MIN_FILTER,r.LINEAR),r.texParameteri(r.TEXTURE_CUBE_MAP,r.TEXTURE_WRAP_S,r.CLAMP_TO_EDGE),r.texParameteri(r.TEXTURE_CUBE_MAP,r.TEXTURE_WRAP_T,r.CLAMP_TO_EDGE);for(var i=0;i<6;i++){var o=n[i];r.texImage2D(r.TEXTURE_CUBE_MAP_POSITIVE_X+i,0,r.RGBA,r.RGBA,r.UNSIGNED_BYTE,o)}t.needsUpdate=!1}else r.bindTexture(r.TEXTURE_CUBE_MAP,t.glTexture)},t}(),li=n((function(t){t.exports=function(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n0&&void 0!==arguments[0]?arguments[0]:{};return(e=t.call(this)||this).map=null,e.color=[1,0,0,1],e.type="BasicMaterial",e.opacity=1,e.depthTest=!0,e.vertexShader=Ri,e.fragmentShader=Si,e.uniforms={uSampler:{type:"t",value:null},uColor:{type:"4f",value:[1,0,0,1]},uOpacity:{type:"1f",value:e.opacity}},e.setValues(n),e}c(e,t);var n=e.prototype;return n.setOpacity=function(t){this.uniforms.uOpacity.value=t,this.opacity=t},n.setColor=function(t){!Array.isArray(t)||t.length<4||(this.uniforms.uColor.value=t,this.color=t)},n.setMap=function(t){var e=this;t&&(t instanceof Promise?t.then((function(t){e.uniforms.uSampler.value=t instanceof ui==!0?t:new ui(t)})).catch((function(t){return console.error(t)})):!0===t.isTexture&&(this.uniforms.uSampler.value=t),this.map=t)},o(e,[{key:"defines",get:function(){var t=new Ci;return t.useColor=!!this.color,t.useUV=!!this.map,t.getDefines()}}]),e}(Ti),Di=function(t){var e=this;this.gl=void 0,this.newAttributes=new Uint8Array(16),this.enabledAttributes=new Uint8Array(16),this.currentDepthTest=!1,this.currentDepthWrite=!0,this.currentColorWrite=!0,this.currentDoubleSided=!1,this.currentFlipSided=!1,this.initAttributes=function(){for(var t=0,n=e.newAttributes.length;t0&&o.precision>0,u=i&&a&&i.precision>0&&a.precision>0;return"highp"!==t||s?"mediump"!==t||u||(t="lowp",console.warn("[WebGLCapability] mediump is not supported, using lowp by default.")):u?(t="mediump",console.warn("[WebGLCapability] highp is not supported, using mediump by default.")):(t="lowp",console.warn("[WebGLCapability] highp and mediump is not supported, using lowp by default.")),t},this.gl=t,this.maxTextures=this.getMaxTextures(),this.maxVertexShaderTextureUnits=this.getMaxVertexShaderTextureUnits(),this.maxFragmentShaderTextureUnits=this.getMaxFragmentShaderTextureUnits(),this.maxTextureSize=this.getMaxTextureSize(),this.maxVerticesOneDraw=this.getMaxVerticesOneDraw()},Ii=0,Li=function(t,e,n){var r=t.createShader(n);if(!r)throw new Error("Something went wrong while compile the shader.");return t.shaderSource(r,e),t.compileShader(r),t.getShaderParameter(r,t.COMPILE_STATUS)||console.error("Error compiling shader: ".concat(t.getShaderInfoLog(r))),r},Bi=function(){function t(t,e,n){this.usedTimes=void 0,this.id=void 0,this.code=void 0,this.program=void 0,this.attributes=void 0,this.uniforms=void 0,this.gl=void 0,this.parameters=void 0,this.precision=void 0,this.gl=t,this.parameters=e,this.precision=n.precision||"highp",this.usedTimes=1,this.id=Ii++;var r=e.defines,i=void 0===r?"":r,o=e.vertexShader,a=e.fragmentShader;this.code=i+o+a,this.program=this.createProgram(t,e,this.precision),this.attributes=this.fetchAttributes(t,this.program),this.uniforms=function(t,e){var n,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],i={},o=r.length;if(!o)return i;for(var a=0;a2&&void 0!==arguments[2]?arguments[2]:"highp",r=e.vertexShader,i=e.fragmentShader,o=e.defines,a=void 0===o?"":o,s=["precision ".concat(n," float;"),"uniform mat4 modelMatrix;","uniform mat4 projectionMatrix;","uniform mat4 viewMatrix;","uniform mat4 mvpMatrix;","attribute vec3 position;","attribute vec2 uv;",""].join("\n"),u=t.createProgram(),h=["precision ".concat(n," float;"),""].join("\n"),c=Li(t,s+a+r,t.VERTEX_SHADER),l=Li(t,h+a+i,t.FRAGMENT_SHADER);if(!u)throw new Error("Something went wrong while createProgram.");return t.attachShader(u,c),t.attachShader(u,l),t.linkProgram(u),u},e.fetchAttributes=function(t,e){for(var n={},r=t.getProgramParameter(e,t.ACTIVE_ATTRIBUTES),i=0;i0&&void 0!==arguments[0]?arguments[0]:{};this.state=void 0,this.domElement=void 0,this.capability=void 0,this.textureOperation=void 0,this._gl=void 0,this.parameters=void 0,this.programs=void 0,this.viewportInfo=void 0,this.autoDisposeProgram=!0,this.currentCacheState=void 0,this.setSize=function(e,n){var r=t.parameters,i=r.canvas,o=r.pixelRatio;i.style.width="".concat(e,"px"),i.style.height="".concat(n,"px"),i.width=e*o,i.height=n*o,t.setViewport(0,0,e,n)},this.setViewport=function(e,n,r,i){var o=t.parameters.pixelRatio,a=t.viewportInfo;a.x=e*o,a.y=n*o,a.width=r*o,a.height=i*o,t._gl.viewport.apply(t._gl,Object.values(a))},this.setClearColor=function(e,n,r){var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1;!0===t.parameters.premultipliedAlpha&&(e*=i,n*=i,r*=i),t._gl.clearColor(e,n,r,i)},this.getContext=function(){return t._gl},this.forceContextLoss=function(){try{var e=t._gl.getExtension("WEBGL_lose_context");e&&e.loseContext()}catch(t){console.error("[WebGLRenderer] WEBGL_lose_context error: ",t)}},this.initScene=function(e){!0===e.visible&&e.traverse((function(e){!0===e.visible&&e instanceof Kr&&t.initMesh(e)}))},this.initMesh=function(e){!0===e.visible&&(!0!==e.__webglInit&&(e.__webglInit=!0,e.addEventListener("removed",t.onObjectRemoved)),e.geometry&&t.checkAndUpdateGeometry(e.geometry),e.children&&e.children.length>0&&e.children.forEach((function(e){t.initMesh(e)})))},this.checkAndUpdateGeometry=function(e){!0!==e.__webglInit&&(e.__webglInit=!0,e.addEventListener("removed",t.onGeometryRemove),e.groupsNeedUpdate=!0),!0===e.groupsNeedUpdate&&("BufferGeometry"===e.type?t.updateBufferGeometry(e):t.updateGeometryBuffer(e,t._gl.STATIC_DRAW),e.groupsNeedUpdate=!1)},this.updateGeometryBuffer=function(e,n){var r=e.verticesBufferData,i=e.uvtsBufferData,o=e.indicesBufferData,a=e.borderVerticesBufferData,s=t._gl;03&&void 0!==arguments[3])||arguments[3],o=t._gl;t.textureOperation.resetUsedTextureUnits(),t.checkAndUpdateMaterial(r.material);var a=n.program,s=a.getUniforms();return a.id!==t.currentCacheState.programId&&(o.useProgram(a.program),t.currentCacheState.programId=a.id),!1!==i&&bi(o,n.uniformsList,t.textureOperation),t.updateMVPMatrix(s,e,r),a},this.checkAndUpdateMaterial=function(e){void 0!==e&&(!0!==e.__webglInit&&(e.__webglInit=!0,e.addEventListener("removed",t.onMaterialRomove),e.needsUpdate=!0),!0===e.needsUpdate&&(t.updateMaterial(e),e.needsUpdate=!1))},this.updateMaterial=function(e){e.program&&t.removeMaterial(e);for(var n=null,r=t.programs.length,i=e.defines,o=(void 0===i?"":i)+e.vertexShader+e.fragmentShader,a=r-1;a>=0;a--){var s=t.programs[a];if(s.code===o){(n=s).usedTimes++;break}}if(null===n){var u={uniforms:e.uniforms,defines:e.defines||"",vertexShader:e.vertexShader,fragmentShader:e.fragmentShader};n=new Bi(t._gl,u,{precision:t.parameters.precision}),t.programs.push(n)}e.program=n,e.uniformsList=[];var h=0,c=n.uniforms,l=e.uniforms;for(var f in l)if(Object.prototype.hasOwnProperty.call(l,f)){var d=c[f];d&&(e.uniformsList[h]=[l[f],d],h++)}},this.updateMVPMatrix=function(e,n,r){if(void 0!==e.mvpMatrix){var i=De(n.projectionMatrix);Ue(i,i,n.viewMatrix),Ue(i,i,r.worldMatrix),t._gl.uniformMatrix4fv(e.mvpMatrix,!1,i),t._gl.uniformMatrix4fv(e.modelMatrix,!1,r.worldMatrix),t._gl.uniformMatrix4fv(e.viewMatrix,!1,n.viewMatrix),t._gl.uniformMatrix4fv(e.projectionMatrix,!1,n.projectionMatrix)}t.currentCacheState.camera=n},this.renderGeometryWithProgram=function(e,n,r){var i=t._gl,o=t.currentCacheState.curRenderTarget;if(e.uniforms.showDebugLine&&i.uniform1i(e.uniforms.showDebugLine,0),"BufferGeometry"===n.type?i.bindBuffer(i.ELEMENT_ARRAY_BUFFER,n.indexesBuffer):i.bindBuffer(i.ELEMENT_ARRAY_BUFFER,n.glIndicesBuffer),null!==o&&void 0!==o.glFrameBuffer){var a=i.checkFramebufferStatus(i.FRAMEBUFFER);if(i.FRAMEBUFFER_COMPLETE!==a)return t.removeRenderTarget(o),void(t.currentCacheState.curRenderTarget=null)}n.indexes&&n.indexes.count>0?i.drawElements(i.TRIANGLES,n.indexes.count,i.UNSIGNED_SHORT,0):i.drawArrays(i.TRIANGLES,0,n.attributes.position.count)},this.onObjectRemoved=function(e){e.target.traverse((function(e){e.removeEventListener("removed",t.onObjectRemoved),t.removeObject(e)}))},this.onGeometryRemove=function(e){var n=e.target;n.removeEventListener("removed",t.onGeometryRemove),t.removeGeometry(n)},this.onMaterialRomove=function(e){var n=e.target;n.removeEventListener("removed",t.onMaterialRomove),t.removeMaterial(n)},this.onRenderTargetRemove=function(e){var n=e.target;n.removeEventListener("removed",t.onRenderTargetRemove),t.removeRenderTarget(n)},this.removeObject=function(t){t.geometry&&delete t.geometry.__webglInit,delete t.__webglInit},this.removeGeometry=function(e){delete e.__webglInit,t.deleteBuffers(e),t.currentCacheState.geometryProgramId=null},this.deleteBuffers=function(e){["glVerticesBuffer","glUvtsBuffer","glIndicesBuffer","glBorderVerticesBuffer"].forEach((function(n){t._gl.deleteBuffer(e[n]),void 0!==e[n]&&0=0;i--){var o=r[i];if(o.program===n){o.usedTimes--,0===o.usedTimes&&!1!==t.autoDisposeProgram&&(r.splice(i,1),t._gl.deleteProgram(n));break}}}},this.removeRenderTarget=function(e){t._gl.deleteRenderbuffer(e.glDepthBuffer),e.glDepthBuffer=null,t._gl.deleteTexture(e.glTexture),e.glTexture=null,t._gl.deleteFramebuffer(e.glFrameBuffer),e.glFrameBuffer=null},this.parameters=Object.assign({},ki,e),e&&!e.canvas&&(this.parameters.canvas=document.createElement("canvas")),this.initGL(),this.programs=[],this.viewportInfo={x:0,y:0,width:this.parameters.canvas.width,height:this.parameters.canvas.height},this.parameters.width&&this.parameters.height&&this.setSize(this.parameters.width,this.parameters.height),this.domElement=this.parameters.canvas,this.state=new Di(this._gl),this.state.setDefaultGLState.apply(this.state,Object.values(this.viewportInfo)),this.currentCacheState={programId:null,geometryProgramId:null,materialId:null,camera:null,curRenderTarget:null},this.capability=new Oi(this._gl);var n=this.capability.maxTextures,r=this.capability.maxTextureSize;this.textureOperation=new ci(this._gl,n,r)}var e=t.prototype;return e.clearBuffer=function(){var t=this._gl;t.clear(t.COLOR_BUFFER_BIT|t.DEPTH_BUFFER_BIT)},e.initGL=function(){var t=this,e=this.parameters,n=e.canvas,r=e.context,i=e.alpha,o=e.depth,a=e.stencil,s=e.antialias,u=e.premultipliedAlpha,h=e.preserveDrawingBuffer;try{var c={alpha:i,depth:o,stencil:a,antialias:s,premultipliedAlpha:u,preserveDrawingBuffer:h},l=r||n.getContext("webgl",c)||n.getContext("experimental-webgl",c)||n.getContext("moz-webgl",c)||n.getContext("webkit-3d",c);if(!l)throw null!==n.getContext?"Error creating WebGL context with your provided attributes.":"Error creating WebGL context.";this._gl=l,n.addEventListener("webglcontextlost",(function(e){e.preventDefault(),void 0!==t.state&&(t.resetGLState(),t.state.setDefaultGLState.apply(t.state,Object.values(t.viewportInfo)))}),!1)}catch(t){console.error("[WebGLRenderer] Create webgl error: ",t)}},e.resetGLState=function(){this.currentCacheState={programId:null,geometryProgramId:null,materialId:null,camera:null,curRenderTarget:null},this.state.reset()},e.setRenderTarget=function(t){var e=this._gl;void 0!==t&&null===t.glFrameBuffer&&(t.addEventListener("removed",this.onRenderTargetRemove),t.glFrameBuffer=e.createFramebuffer(),e.bindFramebuffer(e.FRAMEBUFFER,t.glFrameBuffer),this.textureOperation.setTextureForRenderTarget(t),t.glDepthBuffer=e.createRenderbuffer(),e.bindRenderbuffer(e.RENDERBUFFER,t.glDepthBuffer),e.renderbufferStorage(e.RENDERBUFFER,e.DEPTH_COMPONENT16,t.width,t.height),e.framebufferTexture2D(e.FRAMEBUFFER,e.COLOR_ATTACHMENT0,e.TEXTURE_2D,t.glTexture,0),e.framebufferRenderbuffer(e.FRAMEBUFFER,e.DEPTH_ATTACHMENT,e.RENDERBUFFER,t.glDepthBuffer),e.bindTexture(e.TEXTURE_2D,null),e.bindRenderbuffer(e.RENDERBUFFER,null),e.bindFramebuffer(e.FRAMEBUFFER,null))},e.render=function(t,e,n){if(e.isCamera){var r=this._gl;if(t.updateWorldMatrix(),e.updateWorldMatrix(),e.updateProjectionMatrix(),this.currentCacheState.camera=null,void 0!==n)this.setRenderTarget(n),this.currentCacheState.curRenderTarget=n,r.bindFramebuffer(r.FRAMEBUFFER,n.glFrameBuffer),r.viewport(0,0,n.width,n.height);else{var i=this.viewportInfo,o=i.width,a=i.height;this.currentCacheState.curRenderTarget=null,r.bindFramebuffer(r.FRAMEBUFFER,null),r.viewport(0,0,o,a)}this.initScene(t),this.renderScene(t,e)}else console.error("[WebGLRenderer] Camera is not leagal.")},e.updateBufferGeometry=function(t){var e=this._gl,n=t.getIndexes(),r=t.getAttribute();for(var i in r)if(Object.prototype.hasOwnProperty.call(r,i)){var o=i+"Buffer",a=r[i],s=a.array,u=a.usage;t[o]=e.createBuffer(),e.bindBuffer(e.ARRAY_BUFFER,t[o]),e.bufferData(e.ARRAY_BUFFER,s,u)}n&&(t.indexesBuffer=e.createBuffer(),e.bindBuffer(e.ELEMENT_ARRAY_BUFFER,t.indexesBuffer),e.bufferData(e.ELEMENT_ARRAY_BUFFER,n.array,n.usage))},e.updateVerticesAttribute2=function(t,e){var n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],r=this._gl,i=!1,o="".concat(e.id,"_").concat(t.id);if(o!==this.currentCacheState.geometryProgramId){this.currentCacheState.geometryProgramId=o,this.state.initAttributes(),i=!0;var a=e.getAttribute();for(var s in a)if(Object.prototype.hasOwnProperty.call(a,s)){var u=s+"Buffer",h=a[s],c=h.itemSize,l=h.type,f=h.normalized;0<=t.attributes[s]&&(!0!==n&&(r.bindBuffer(r.ARRAY_BUFFER,e[u]),r.vertexAttribPointer(t.attributes[s],c,l,f,0,0)),this.state.enableAttribute(t.attributes[s]))}}return this.state.disableUnusedAttributes(),i},e.updateVerticesAttribute=function(t,e){var n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],r=this._gl,i=!1,o="".concat(e.id,"_").concat(t.id);if(o!==this.currentCacheState.geometryProgramId){this.currentCacheState.geometryProgramId=o,this.state.initAttributes(),i=!0;var a=t.getAttributes();0<=a.position&&(!0!==n&&(r.bindBuffer(r.ARRAY_BUFFER,e.glVerticesBuffer),r.vertexAttribPointer(a.position,3,r.FLOAT,!1,0,0)),this.state.enableAttribute(a.position)),0<=a.uv&&void 0!==e.glUvtsBuffer&&(r.bindBuffer(r.ARRAY_BUFFER,e.glUvtsBuffer),r.vertexAttribPointer(a.uv,2,r.FLOAT,!1,0,0),this.state.enableAttribute(a.uv))}return this.state.disableUnusedAttributes(),i},t}(),Ni=function(t){function e(e,n,r,i,o,a){var s;switch((s=t.call(this)||this).addIntoBuffer=function(t,e,n){t[n]=e[0],t[n+1]=e[1],t[n+2]=e[2]},s.get3DVertex=function(t,e){var n;switch(e){case"x":n=Vt(0,t[0],t[1]);break;case"y":n=Vt(t[0],0,t[1]);break;default:n=Vt(t[0],t[1],0)}return n},s.zeroAxis=void 0!==o?o:"z",s.zeroAxis){case"x":s.normal=Vt(-1,0,0);break;case"y":default:s.normal=Vt(0,-1,0);break;case"z":s.normal=Vt(0,0,-1)}a=void 0!==a?a:{},s.showBorder=!(!1===a.showBorder),s.borderWidth=void 0!==a.borderWidth?a.borderWidth:1,s.borderColor=void 0!==a.borderColor?a.borderColor:[0,0,0,1];var u,h,c,l=.5*e,f=.5*n,d=r||1,p=i||1,v=e/d,m=n/p,g=(d+1)*(p+1);s.verticesBufferData=new Float32Array(3*g),s.uvtsBufferData=new Float32Array(2*g),s.indicesBufferData=new(g>65535?Uint32Array:Uint16Array)(d*p*6);for(var y=0,_=0,x=0;x<=p;x++){u=x*m-f;for(var b=0;b<=d;b++)c=_t(b*v-l,u),h=s.get3DVertex(c,s.zeroAxis),s.vertices.push(h),s.addIntoBuffer(s.verticesBufferData,h,y),s.uvtsBufferData[_]=b/d,s.uvtsBufferData[_+1]=1-x/p,y+=3,_+=2}for(var M,w,E,T,A=0,C=0;C0;O-=d+1)s.addIntoBuffer(s.borderVerticesBufferData,s.vertices[O],S),S+=3;for(var I=d-1;I>0;I--)s.addIntoBuffer(s.borderVerticesBufferData,s.vertices[I],S),S+=3;return s}return c(e,t),e}(Jr),Fi="z",ji=function(t){function e(n,r,i,o){var a,s=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{};a=t.call(this)||this;var u=e.buildPlane(n,r,i,o,s),h=u.uvs,c=u.indices,l=u.normals,f=u.vertices;return a.name="PlaneBufferGeometry",a.setAttribute("position",new Gr(f,3)),a.setAttribute("normals",new Gr(l,3)),a.setAttribute("uv",new Gr(h,2)),a.setIndexes(c),a}return c(e,t),e.buildPlane=function(t,n,r,i){for(var o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{},a=o.normalAxis,s=void 0===a?Fi:a,u=o.useBack,h=void 0!==u&&u,c=o.normalDest,l=void 0===c?0:c,f=.5*t,d=.5*n,p=r||1,v=i||1,m=t/p,g=n/v,y=e.getNormal(s,h),_=[],x=[],b=[],M=[],w=0;w<=v;w++)for(var E=w*g-d,T=0;T<=p;T++){var A=T*m-f,C=e.get3DVertex([A,E],s,l);b.push.apply(b,mi(C)),_.push(T/p,1-w/v),M.push.apply(M,mi(y))}for(var R=0;R1&&void 0!==arguments[1]&&arguments[1],r=n?-1:1;switch(t){case"x":e=[r,0,0];break;case Fi:e=[0,0,r];break;default:e=[0,r,0]}return e},e}(Zr);ji.get3DVertex=function(t,e){var n,r=xi(t,2),i=r[0],o=r[1],a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;switch(e){case"x":n=[a,i,o];break;case"y":n=[i,a,o];break;default:n=[i,o,a]}return n};var zi=function(t){function e(e,n,r,i,o,a){var s;(s=t.call(this)||this).name="BoxGeometry";var u=s.initBox(e,n,r,i,o,a),h=u.uvs,c=u.normals,l=u.vertices,f=u.indices;return s.setAttribute("position",new Gr(l,3)),s.setAttribute("normals",new Gr(c,3)),s.setAttribute("uv",new Gr(h,2)),s.setIndexes(f),s}return c(e,t),e.prototype.initBox=function(t,e,n,r,i,o){var a=[],s=ji.buildPlane,u=s(n,e,o,i,{normalAxis:"x",normalDest:t/2}),h=s(n,e,o,i,{normalAxis:"x",useBack:!0,normalDest:-t/2}),c=s(t,n,r,o,{normalAxis:"y",normalDest:e/2}),l=s(t,n,r,o,{normalAxis:"y",useBack:!0,normalDest:-e/2}),f=s(t,e,r,i,{normalAxis:"z",normalDest:n/2}),d=s(t,e,r,i,{normalAxis:"z",useBack:!0,normalDest:-n/2});a.push(u,h,c,l,f,d);for(var p=0,v=[],m=[],g=[],y=[],_=function(t){var e=a[t],n=e.uvs,r=e.vertices,i=e.normals,o=e.indices,s=p;v=v.concat(n),m=m.concat(r),g=g.concat(i),y=y.concat(o.map((function(t){return s+t}))),p+=r.length/3},x=0;x<6;x++)_(x);return{uvs:v,vertices:m,normals:g,indices:y}},e}(Zr),Vi=function(t){function e(e,n){var r;return(r=t.call(this)||this).width=void 0,r.height=void 0,r.glFrameBuffer=null,r.glDepthBuffer=null,r.flipY=!1,r.premultiplyAlpha=!1,r.glTexture=null,r.width=e,r.height=n,r}return c(e,t),e}(Or);function Gi(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=function(t,e){if(!t)return;if("string"==typeof t)return Wi(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Wi(t,e)}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,i=function(){};return{s:i,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,s=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){s=!0,o=t},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw o}}}}function Wi(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n0){var o=i.split("/");e.push(o)}}for(var a=e[0],s=1,u=e.length-1;s=0?n-1:n+e/3)},e.parseUVIndex=function(t,e){var n=parseInt(t,10);return 2*(n>=0?n-1:n+e/2)},t}();function Zi(t){return new Promise((function(e,n){var r=new Image;r.src=t,r.crossOrigin="Anonymous",r.onload=function(){e(r)},r.onerror=function(t){n(t)}}))}function qi(t){if(6!==t.length)throw new Error("[loadCubeTexture] param urls need len six. [px, nx, py, ny, pz, nz]");return new Promise((function(e,n){for(var r=0,i=new hi,o=i.image,a=function(a){Zi(t[a]).then((function(t){r++,o[a]=t,6===r&&(i.needsUpdate=!0,e(i))})).catch((function(t){console.error(t),n(t)}))},s=0;s<6;s++)a(s)}))}var Yi=function(t){function e(){var e,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:.1,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:3e3;return(e=t.call(this)||this).isCamera=!0,e.viewMatrix=Pe(),e.projectionMatrix=Pe(),e.projectionMatrixNeedUpdate=!1,e._far=void 0,e._near=void 0,e._far=r,e._near=n,e}return c(e,t),e.prototype.updateWorldMatrix=function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];t.prototype.updateWorldMatrix.call(this,e),Be(this.viewMatrix,this.worldMatrix)},o(e,[{key:"near",get:function(){return this._near},set:function(t){this._near=t,this.projectionMatrixNeedUpdate=!0}},{key:"far",get:function(){return this._far},set:function(t){this._far=t,this.projectionMatrixNeedUpdate=!0}}]),e}(Ur),Xi=function(t){function e(e,n,r,i,o,a){var s;return(s=t.call(this,o,a)||this)._left=void 0,s._right=void 0,s._top=void 0,s._bottom=void 0,s._top=r,s._left=e,s._right=n,s._bottom=i,s.updateProjectionMatrix(!0),s}c(e,t);var n=e.prototype;return n.updateProjectionMatrix=function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(!0===t||!0===this.projectionMatrixNeedUpdate){var e=(this.right-this.left)/2,n=(this.top-this.bottom)/2,r=(this.right+this.left)/2,i=(this.top+this.bottom)/2,o=r-e,a=r+e,s=i+n,u=i-n;Ie(this.projectionMatrix),$e(this.projectionMatrix,o,a,s,u,this.near,this.far),this.projectionMatrixNeedUpdate=!1}},n.clone=function(n){return void 0===n&&(n=new e(0,0,0,0,0,0)),t.prototype.clone.call(this,n),n.left=this.left,n.right=this.right,n.top=this.top,n.bottom=this.bottom,n.near=this.near,n.far=this.far,n.updateProjectionMatrix(),n.updateWorldMatrix(),n},o(e,[{key:"top",get:function(){return this._top},set:function(t){t!==this._top&&(this._top=t,this.projectionMatrixNeedUpdate=!0)}},{key:"left",get:function(){return this._left},set:function(t){t!==this._left&&(this._left=t,this.projectionMatrixNeedUpdate=!0)}},{key:"right",get:function(){return this._right},set:function(t){t!==this._right&&(this._right=t,this.projectionMatrixNeedUpdate=!0)}},{key:"bottom",get:function(){return this._bottom},set:function(t){t!==this._bottom&&(this._bottom=t,this.projectionMatrixNeedUpdate=!0)}}]),e}(Yi),Ki=function(t){function e(e,n,r,i){var o;return(o=t.call(this,r,i)||this).type="PerspectiveCamera",o._fov=void 0,o._aspect=void 0,o._fov=e,o._aspect=n,o.updateProjectionMatrix(!0),o}c(e,t);var n=e.prototype;return n.updateProjectionMatrix=function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];!0!==t&&!0!==this.projectionMatrixNeedUpdate||(Ie(this.projectionMatrix),Qe(this.projectionMatrix,this.fov*Math.PI/180,this.aspect,this.near,this.far),this.projectionMatrixNeedUpdate=!1)},n.clone=function(n){return void 0===n&&(n=new e(0,0,0,0)),t.prototype.clone.call(this,n),n.fov=this.fov,n.aspect=this.aspect,n.near=this.near,n.far=this.far,n.updateProjectionMatrix(),n.updateWorldMatrix(),n},o(e,[{key:"fov",get:function(){return this._fov},set:function(t){t!==this._fov&&(this._fov=t,this.projectionMatrixNeedUpdate=!0)}},{key:"aspect",get:function(){return this._aspect},set:function(t){t!==this._aspect&&(this._aspect=t,this.projectionMatrixNeedUpdate=!0)}}]),e}(Yi),Qi=Object.freeze({__proto__:null,Mesh:Kr,Scene:Qr,Geometry:Jr,Object3D:Ur,Raycaster:si,Texture:ui,CubeTexture:hi,TextureOperation:ci,Material:Ti,BasicMaterial:Pi,BufferGeometry:Zr,WebGLRenderer:Ui,PlaneGeometry:Ni,BoxGeometry:zi,WebGLRenderTarget:Vi,PlaneBufferGeometry:ji,Box3:Nr,OBJLoader:Hi,loadImage:Zi,loadTexture:function(t,e,n){return Zi(t).then((function(t){var n=new ui(t);return e&&e(n),n})).catch((function(t){n&&n(t)}))},loadCubeTexture:qi,Vec2:Ut,Vec3:ge,Vec4:kn,Mat3:Se,Mat4:an,Quat:Ar,quatToEuler:Ir,BufferAttribute:Fr,Uint8BufferAttribute:jr,Uint16BufferAttribute:zr,Uint32BufferAttribute:Vr,Float32ArrayAttribute:Gr,UintBufferAttribute:Wr,OrthographicCamera:Xi,PerspectiveCamera:Ki}),Ji=function(){function t(t){this.pano=void 0,this.panoData=void 0,this._meshs=new Kr,this.pano=t}return o(t,[{key:"camera",get:function(){return this.pano.camera}},{key:"meshs",get:function(){return this._meshs},set:function(t){this._meshs=t}}]),t}(),$i=["varying vec3 v_normal;","void main(void){"," gl_Position = mvpMatrix * vec4(position, 1.0);"," v_normal = normalize(position.xyz);","}"].join("\n"),to=["uniform samplerCube uSampler;","uniform float uOpacity;","varying vec3 v_normal;","void main(void){"," vec4 textureColor = textureCube(uSampler, normalize(v_normal));"," gl_FragColor = vec4(textureColor.rgb, textureColor.a * uOpacity);","}"].join("\n"),eo=function(t){function e(e){var n;return(n=t.call(this,e)||this).initMesh(),n}c(e,t);var n=e.prototype;return n.initMesh=function(){var t=new zi(8,8,8,1,1,1),e=new Ti;e.vertexShader=$i,e.fragmentShader=to,e.uniforms={vColor:{type:"4f",value:[1,0,0,1]},uSampler:{type:"t",value:null},uOpacity:{type:"1f",value:1}};var n=new Kr(t,e);n.visible=!1,n.setScale(-1,1,1),this.meshs=n},n.setData=function(t){var e=this;if(!t.image||6!==t.image.length)throw new Error("天空盒模型需要6张纹理,但只获取到 ".concat(t.image?t.image.length:0,"张"));this.panoData=t;var n=this.meshs;qi(t.image).then((function(t){n.material.uniforms.uSampler.value=t,n.visible=!0,e.pano.emit({type:d.REFRESH,log:"[Refresh Log] 立方贴图加载完成, 渲染一帧"})})).catch((function(t){return console.error(t)}))},n.update=function(){},n.draw=function(){},e}(Ji),no=function(t){return t},ro=function(t){return t*t},io=function(t){return-t*(t-2)},oo=ro,ao=io,so=Object.freeze({__proto__:null,linear:no,reverse:function(t){return 1-t},easeInQuad:ro,easeInCubic:function(t){return Math.pow(t,3)},easeOutQuad:io,easeOutCubic:function(t){return Math.pow(t-1,3)+1},easeInOutQuad:function(t){return t<.5?t*t*2:-2*(t-2)*t-1},easeInOutCubic:function(t){return t<.5?4*Math.pow(t,3):4*Math.pow(t-1,3)+1},easeInOutSine:function(t){return(1-Math.cos(Math.PI*t))/2},easeIn:oo,easeOut:ao}),uo=function(){},ho=function(){function t(t,e,n){var r=this,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:no;this.from=void 0,this.to=void 0,this.duration=void 0,this.easingFn=void 0,this._isPlaying=!1,this._autoTimer=null,this._startTime=null,this._onUpdateCallback=uo,this._onEndCallback=uo,this.start=function(){return r._isPlaying||(r._isPlaying=!0,r._startTime=r.getNow()),r},this.stop=function(){return r._isPlaying=!1,r},this.startAndAutoUpdate=function(){if(r._isPlaying)return r;r.start(),r._autoTimer=null;return function t(){r.update(),r._autoTimer=requestAnimationFrame(t)}(),r},this.onEnd=function(t){return"function"==typeof t?r._onEndCallback=t:console.warn("[Warning] onUpdate required a funtion"),r},this.onUpdate=function(t){return"function"==typeof t?r._onUpdateCallback=t:console.warn("[Warning] onUpdate required a funtion"),r},this.update=function(){if(!r._isPlaying)return!1;var t=r.from,e=r.to,n=r.getNow(),i=r.easingFn,o=r._startTime;if(o>n)return!1;var a=(n-o)/r.duration,s=t+(e-t)*i(a=0===r.duration||a>1?1:a);return r._onUpdateCallback(s),1===a&&r.handleEnd(),!0},this.from=t,this.to=e,this.duration=n,this.easingFn=i}var e=t.prototype;return e.getNow=function(){return Date.now()},e.handleEnd=function(){this._isPlaying=!1,this._autoTimer=null,this._onEndCallback()},t}(),co=function(t,e,n){var r=.5*e,i=.5*n;return _t((t[0]-r)/r,(i-t[1])/i)},lo=function(t,e,n){var r=.5*e,i=.5*n;return _t((t[0]+1)*r,(1-t[1])*i)},fo=function(t,e,n,r){var i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:100,o=sn(),a=co(t,n,r),s=hn(a[0],a[1],i,1),u=Pe(),h=e.worldMatrix;return Be(u,e.projectionMatrix),En(o,s,u),En(o,o,h),o},po=function(t,e,n,r){var i=arguments.length>4&&void 0!==arguments[4]&&arguments[4],o=hn(e[0],e[1],e[2],1);if(En(o,o,t.viewMatrix),0=0&&a<=n&&s>=0&&s<=r&&(u=!0),u},mo=Object.freeze({__proto__:null,viewportToNormalizeProjection:co,normalizeProjectionToViewport:lo,viewportToWorld:fo,worldToViewport:po,isCoordsInView:vo}),go=function(){function t(){var e=this,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:500;this.getVertexs=function(){return e.vertexs},this.getFacesVertex=function(){return e.facesVertex},this.generateTextureCoord=function(n,r,i){var o=e.facesVertex[Math.round(e.facesVertex.length/2)];if(o){for(var a=[],s=Math.pow(2,5-i),u=r%s,h=n%s,c=t.H_SEGS/e.cols,l=1/c,f=1/((t.V_SEGS-1)/e.rows),d=0;d0?s<0&&(u=360-u):u=s>0?180-u:180+u,u%=360,r=a>e._x3?7:a>e._x2?6:a>e._x1?5:a>0?4:a>-e._x1?3:a>-e._x2?2:a>-e._x3?1:0;var h=Math.floor(u/22.5),c=t.H_SEGS;return[h,r,h+r*(c/(c/e.cols))]},this.viewportToSphereCoord=function(t,n,r,i){var o=e.radius,a=fo(t,i,n,r),s=xi(a,3),u=s[0],h=s[1],c=s[2],l=o/Math.sqrt(u*u+h*h+c*c);return[u*l,h*l,c*l]},this.getFaceVertex=function(n,r){var i=t.H_SEGS/e.cols,o=r+n*(t.H_SEGS/i);return e.facesVertex[o]},this.radius=n,this.rows=t.DEFAULT_COLS/2,this.cols=t.DEFAULT_COLS,this.vertexs=null,this.facesVertex=[],this.facesVertexIndice=[],this.init()}var e=t.prototype;return e.init=function(){var t=this.getSphereVertexInfo();this.facesVertexIndice=this.getSphereFacesIndices(),this.vertexs=t.vertexs,this.facesVertex=t.facesVertex,this.calcConst()},e.calcConst=function(){var t=360/this.cols;this._x1=Math.cos(g(3*t))*this.radius,this._x2=Math.cos(g(2*t))*this.radius,this._x3=Math.cos(g(1*t))*this.radius},e.getSphereVertexInfo=function(){for(var e,n=[],r=[],i=this.radius,o=t.H_SEGS,a=t.V_SEGS,s=360/o,u=180/(a-1),h=o/this.cols,c=o/h,l=0,f=0,d=[],p=0;p0&&p%h==0){var b=f+(l-1)*c;r[b].push(_,v,x),y>0&&y%h==0&&r[b-1]&&r[b-1].push(_,v,x),y===o-1&&r[b].push(d[0],d[1],d[2])}0===f&&0===y&&(d=[_,v,x]),y>0&&y%h==0&&r[e-1]&&r[e-1].push(_,v,x),l2&&void 0!==arguments[2]?arguments[2]:"";this.imageInstancePool=void 0,this.tileImagesCache=void 0,this.textureInfo=void 0,this.pano=void 0,this.udtVersion=void 0,this.cdnList=void 0,this.calcTileKey=function(t,e,n,r){return"".concat(t,"_").concat(e,"_").concat(n,"_").concat(r)},this.loadImage=function(t,e,n,i){var o=r.calcTileKey(t,e,n,i),a=r.getTilesUrl(t,{x:e,y:n},i),s=r.tileImagesCache.getData(o);return new Promise((function(t,e){s?t(s._loaded?s:null):((s=r.imageInstancePool.getImageInstance()).crossOrigin="anonymous",s._loaded=!1,s.onload=function(){s._loaded=!0,t(s)},s.onerror=function(t){console.error("Tile ".concat(o," load error => "),t),e(t)},s.src=a,r.tileImagesCache.setData(o,s))}))},this.loadTexture=function(t,e,n,i){var o=r.calcTileKey(t,e,n,i),a=r.textureInfo.getData(o);return new Promise((function(s,u){a&&a.loaded?s(a):r.loadImage(t,e,n,i).then((function(t){if(!t)return null;var e=new ui(t);1!==i&&r.textureInfo.setData(o,e),s(e)})).catch((function(t){console.error("[TextureManager] loadTexture fail => ".concat(t)),u(null)}))}))},this.loadTopoTexture=function(t){var e=0,n=new Image;return new Promise((function(r){n.onload=function(){var t=new ui(n);t.flipY=!1,r(t)},n.onerror=function(){2>e?(e++,n.src="".concat(t,"&random=").concat((new Date).getTime())):r(null)},n.crossOrigin="anonymous",n.src=t}))},this.clear=function(){r.textureInfo.clear()},this.pano=e,this.udtVersion=i,this.cdnList=n||e.opts.tileBaseUrls,this.imageInstancePool=new yo,this.tileImagesCache=new A(t.MAX_TILE_CACHED,{clearCallback:function(t){r.imageInstancePool.freeImage(t)}}),this.textureInfo=new A(t.MAX_TILE_CACHED,{clearCallback:function(t){t.destory()}})}var e=t.prototype;return e.getRandomCDN=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],e=t.length;return t[Math.floor(Math.random()*e)]},e.getTilesUrl=function(e,n,r){return this.getRandomCDN(this.cdnList)+(t.TILE_URL_TEMPLATE+"&".concat($("/",{isCounter:!0}))).replace("{udt}",this.udtVersion).replace("{sid}",e).replace("{x}","".concat(n.x)).replace("{y}","".concat(n.y)).replace("{zoom}","".concat(r))},t}();_o.MAX_TILE_CACHED=160,_o.TILE_URL_TEMPLATE="?qt=pdata&sid={sid}&pos={y}_{x}&z={zoom}&udt={udt}&from=H5";var xo=["attribute vec2 uvBack;","varying mediump vec2 vTextureCoordBack;","varying mediump vec2 vTextureCoord;","void main(void) {"," gl_Position = mvpMatrix * vec4(position, 1.0);"," vTextureCoordBack = uvBack;"," vTextureCoord = uv;","}"].join("\n"),bo=["precision mediump float;","varying vec2 vTextureCoordBack;","varying vec2 vTextureCoord;","uniform sampler2D uSamplerBack;","uniform sampler2D uSampler;","uniform bool uDrawThumb;","uniform bool uDrawBack;","uniform float uAlpha;","void main(void) {"," if (uDrawThumb) {"," gl_FragColor = texture2D(uSamplerBack, vTextureCoordBack);"," return;"," }"," if (uAlpha == 1.0) {"," gl_FragColor = texture2D(uSampler, vTextureCoord);"," return;"," }"," if (uDrawBack) {"," gl_FragColor = texture2D(uSampler, vTextureCoord) * uAlpha + texture2D(uSamplerBack, vTextureCoordBack) * (1.0 - uAlpha);"," } else {"," vec4 textureColor = texture2D(uSampler, vec2(vTextureCoord.s, vTextureCoord.t));"," gl_FragColor = vec4(textureColor.rgb, textureColor.a * uAlpha);"," }","}"].join("\n"),Mo=["varying highp vec2 vTextureCoord;","void main(void) {"," gl_Position = mvpMatrix * vec4(position, 1.0);"," vTextureCoord = uv;","}"].join("\n"),wo=["precision mediump float;","uniform sampler2D uSampler;","varying highp vec2 vTextureCoord;","void main(void) {"," gl_FragColor = texture2D(uSampler, vTextureCoord);","}"].join("\n"),Eo=["varying highp vec2 vTextureCoord;","void main(void) {"," gl_Position = mvpMatrix * vec4(position, 1.0);"," vTextureCoord = uv;","}"].join("\n"),To=["uniform sampler2D uSampler;","uniform float uOpacity;","varying vec2 vTextureCoord;","void main(void){"," vec4 textureColor = texture2D(uSampler, vTextureCoord);"," gl_FragColor = vec4(textureColor.rgb, textureColor.a * uOpacity);","}"].join("\n"),Ao=["varying highp vec3 vTextureCoord;","void main(void){"," gl_Position = mvpMatrix * vec4(position, 1.0);"," vTextureCoord = vec3(uv, 1.0) * length(position);","}"].join("\n"),Co=["uniform sampler2D uSampler;","uniform float uOpacity;","varying vec3 vTextureCoord;","uniform bool showDebugLine;","uniform vec4 vColor;","void main(void){"," if (!showDebugLine) {"," vec4 textureColor = texture2DProj(uSampler, vTextureCoord);"," gl_FragColor = vec4(textureColor.rgb, textureColor.a * uOpacity);"," } else {"," gl_FragColor = vec4(vColor.rgb, vColor.a);"," }","}"].join("\n"),Ro=function(){function t(e,n,r,i){this.nodes=void 0,this.level=void 0,this.key=void 0,this.nodes=[],this.level=e,this.key="".concat(r,"_").concat(i),e0},e.getNodeKeysByLevel=function(t){if(to&&(p=o);for(var b=d;b<=p;b++)for(var M=v;M<=m;M++){var w=b<0?b+i:b;n.checkAndLoadTile(t,w,M,n._imgZoom),l.push([M,w])}}n.hitTile=l,l.forEach((function(t){var e=xi(t,2),r=e[0],i=e[1],o="".concat(r,"_").concat(i,"_").concat(n._imgZoom);if(void 0===n.tileInfoCache[o]){var a=new Ro(n._imgZoom,5,r,i).getNodeKeysByLevel(5);n.tileInfoCache[o]=a}}))}},n.draw=function(){var t=n.meshs;if(!n.faceRange||!n.curThumbTexture)return!1;t.children=[];for(var e=function(e,r){var i=n.curThumbTexture,o=n.textureManager.calcTileKey(n.panoData.panoId,e,r,n._imgZoom),a=n.textureManager.textureInfo.getData(o),s=!1,u=null;if(a?!(u=a).finished&&u.aniInfo&&u.aniInfo&&u.aniInfo.update():i&&(s=!0,u=i),u){var h="".concat(r,"_").concat(e,"_").concat(n._imgZoom),c=n.meshCache[h];if(!c){if(!(c=n.createTileMesh(r,e)))return;n.meshCache[h]=c}if(!c.material)return;var l=c.material.uniforms;l.uSamplerBack.value=i,s?l.uDrawThumb.value=!0:(l.uDrawThumb.value=!1,l.uSampler.value=u,l.uAlpha.value=u.alpha),t.add(c)}},r=0;rS&&(E=Math.min.apply(Math,mi(b.filter((function(t){return t>S}))))),C.max-C.min>S&&(T=Math.max.apply(Math,mi(w.filter((function(t){return tT&&(E-=R);var P=this.getImgIndexByFaceColRow(E,_),D=xi(P,2),O=D[0],I=D[1],L=this.getImgIndexByFaceColRow(T,x),B=xi(L,2);return[[E,T,_,x],[O,B[0],I,B[1]]]},n.updateRangeInfo=function(){var t=this.getTileBoundary(),e=xi(t,2),n=e[0],r=e[1];this.imgRange=r,this.faceRange=n},n.getImgIndexByFaceColRow=function(t,e,n){n=n||this._imgZoom;var r=Math.pow(2,5-n),i=Math.floor(t/r),o=Math.floor(e/r);return[i,o=this.imgColsRows[n].rows-o-1,i+o*go.DEFAULT_COLS/r]},n.normalizeNum=function(t,e){for(var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,r=t;r .5) {\n damp_factor = (1.0 - progress) * 2.0;\n }\n\n float cut_factor = clamp(wave_width * damp_factor - abs(current_radius - len), 0.0, 1.0);\n float waves_factor = waves * len / radius;\n uv_offset = (p / len) * cos((waves_factor - progress * speed) * 3.14) * amp * cut_factor;\n\n uv += uv_offset;\n\n vec4 t_image = texture2D(uSampler, fract(tc + uv));\n\n // gl_FragColor = t_image;\n gl_FragColor = vec4(t_image.rgb, t_image.a * uOpacity);\n }\n",t.uniforms={uSampler:{type:"t",value:this.snapshot},uCenter:{type:"2f",value:[.5,.5]},uOpacity:{type:"1f",value:1},progress:{type:"1f",value:0},speed:{type:"1f",value:4},waves:{type:"1f",value:14},band:{type:"1f",value:.3},amp:{type:"1f",value:.3},aspect:{type:"1f",value:n/r},radius:{type:"1f",value:1}},this.material=t,t},t}(),No=function(){function t(t,e,n,r){var i=this;this.startAni=function(){i.animation.start()},this.update=function(){i.animation.update()},this.pano=t,this.distance=n,this.refinedDir=e,this.camera=this.pano.camera,this.cameraBase=this.pano.camera.clone(),this.handleEnd=r,this.initAni()}return t.prototype.initAni=function(){var t=this,e=this.distance,n=this.refinedDir,r=Math.cos(g(n)),i=Math.sin(g(n));this.animation=new ho(0,1,400,so.easeOutQuad).onUpdate((function(n){var o=e*n,a=r*o,s=i*o;t.camera.setPosition(a,0,s),t.pano.dispatchEvent({debug:!0,type:d.REFRESH,log:"[Refresh Log] 前进动画, 渲染一帧"})})).onEnd((function(){t.handleEnd&&t.handleEnd()}))},t}(),Fo=function(t,e,n,r){this.x=t||0,this.y=e||0,this.width=n||0,this.height=r||0},jo=function(t,e){var n=this;this.angleDegreeDelta=function(t,e){var n=Math.abs(t-e);return n>180?360-n:n},this.getRoad=function(t,e,n,r,i){for(var o,a=[],s=[[-t/2,-e,-10],[-t/2,-e,-20],[t/2,-e,-10],[t/2,-e,-20]],u=s.length,h=0;h.7&&(i=r-.7),r<.3&&(i=.3-r),n.x=n.x+n.width*i,n},this.fixInnerRectSize=function(t,e,n){var r,i,o,a,s=t;s.width/n>.12&&(a=(o=.12*n)*(s.width/s.height),r=s.x+(s.width-o)*(e.x-s.x)/s.width,i=s.y+(s.height-a)*(e.y-s.y)/s.height,s=new Fo(r,i,o,a));var u=s.width/s.height;return a=s.height,u>1.2&&(a=s.height*u/1.2),u<.9&&(a=s.height*u/.9),i=s.y+s.height-a,s.height=a,s.y=i,s},this.panoData=t.panoData,this.camera=t.camera,this.projectionMatrix=this.camera.projectionMatrix,this.fov=g(this.camera.fov),this.traverseDir=e,this.cameraHeading=t.getPov().heading||0,this.isMovingForward=this.angleDegreeDelta(this.cameraHeading,this.traverseDir)<=90,this.roadWith=Math.min(1.5*this.panoData.getRoadWidth(),10),this.deviceHeight=this.panoData.deviceHeight||2.2,this.panoWidth=t._container.clientWidth,this.panoHeight=t._container.clientHeight;var r=this.angleDegreeDelta(this.cameraHeading,this.traverseDir)>45;this.snapshotRatio=r?1:1.8,this.projectionRoadInfos=this.getRoad(this.roadWith,this.deviceHeight,this.projectionMatrix,this.panoWidth,this.panoHeight),this.vanishPoint=this.calculateVanishPoint(this.projectionRoadInfos,this.snapshotRatio,this.panoWidth,this.panoHeight),this.innerRect=this.getInnerRect(this.vanishPoint,this.projectionRoadInfos,this.panoWidth,this.panoHeight,this.snapshotRatio),this.outerRect=this.getOuterRect(this.panoWidth,this.panoHeight,this.snapshotRatio),this.focusLength=.5*this.panoHeight/Math.tan(.75*this.fov),this.vanishPointDeltaX=this.vanishPoint.x-this.outerRect.x-.5*this.outerRect.width,this.vanishPointDeltaY=this.vanishPoint.y-this.outerRect.y-.5*this.outerRect.height},zo={FAR:[10,10,0],LEFT:[0,10,30],RIGHT:[0,10,30],TOP:[10,0,30],BOTTOM:[10,0,30]},Vo={FAR:["innerTopLeftVertex","innerBottomRightVertex"],LEFT:["outerTopLeftVertex","innerBottomLeftVertex"],RIGHT:["innerTopRightVertex","outerBottomRightVertex"],TOP:["outerTopLeftVertex","innerTopRightVertex"],BOTTOM:["innerBottomLeftVertex","outerBottomRightVertex"]},Go=Object.keys(zo),Wo=function(t){function e(e,n){var r;if((r=t.call(this)||this).createSkeleton=function(t){var e=t.vanishPoint,n=t.innerRect,r=t.outerRect,i=t.focusLength,o=r.y+r.height-n.y-n.height,a=e.y-n.y,s=e.x-n.x,u=n.x+n.width-e.x,h=r.y+r.height-e.y,c=o*i/(h-o),l=u*(i+c)/i,f=-(s*(i+c)/i),d=h+a*(i+c)/i-h,p=-h,v=c/5;return{innerTopLeftVertex:{x:f,y:d,z:-c},innerBottomLeftVertex:{x:f,y:p,z:-c},innerTopRightVertex:{x:l,y:d,z:-c},innerBottomRightVertex:{x:l,y:p,z:-c},outerTopLeftVertex:{x:f,y:d,z:v},outerTopRightVertex:{x:l,y:d,z:v},outerBottomLeftVertex:{x:f,y:p,z:v},outerBottomRightVertex:{x:l,y:p,z:v}}},r.modelSkeleton=function(t,e){var n=[],i=[];return Go.forEach((function(o){var a=xi(Vo[o],2),s=a[0],u=a[1],h=n.length/3;n=n.concat(r.calculatePlaneVertex(t[s],t[u],o,e)),i=i.concat(r.calculateIndices(o,h))})),[n,i]},r.calculatePlaneVertex=function(t,e,n,i){for(var o,a=[],s=xi(zo[n],3),u=s[0],h=s[1],c=s[2],l=r.linerInterpolate(t.x,e.x,u),f=r.linerInterpolate(t.y,e.y,h),d=r.linerInterpolate(t.z,e.z,c),p=0;p<=u;p++)for(var v=0;v<=h;v++)for(var m=0;m<=c;m++)En(o=hn(l[p],f[v],d[m],1),o,i),o[0]=o[0]/o[3],o[1]=o[1]/o[3],o[2]=o[2]/o[3],a.push(o[0],o[1],o[2]);return a},r.calculateIndices=function(t,e){var n=[],r=zo[t];r=r.filter((function(t){return t>0}));for(var i=xi(r,2),o=i[0],a=i[1],s=0,u=0,h=0,c=0,l=0;l0&&void 0!==arguments[0]?arguments[0]:0,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;this.x=t,this.y=e}return t.prototype.equals=function(t){return t&&t.x===this.x&&t.y===this.y},t}(),Yo=function(){function t(t,e){var n=this;this.setData=function(t,e){n.panoData=t,n.nextPanoData=e},this.sceneChangeHandler=function(){if(n.panoData&&n.nextPanoData)return new Promise((function(t){var e=n.isStreet(n.panoData.panoType),r=n.isStreet(n.nextPanoData.panoType),i=n.snapshotFn(),o=n.pano.animationType;if(o&&["waterwave","fade"].indexOf(o)>-1)switch(o){case"waterwave":n.prepareWaterWave(i),t();break;case"fade":n.prepareFade(i),t()}else r&&e?(n.setDir(),n.prepareTraverse(i).then((function(e){n.prepareFade(e),t()}))):(n.prepareFade(i),t())}))},this.setSnapshot=function(t){n.snapshot=t},this.pano=t,this.snapshotFn=e,this.panoData=null,this.nextPanoData=null,this.changeAni=null,this.animateDir=0}var e=t.prototype;return e.draw=function(){if(this.changeAni){var t=this.changeAni,e=t.scene,n=t.camera;this.changeAni.update(),this.pano.renderer.render(e,n)}},e.setDir=function(){if(this.panoData&&this.nextPanoData){var t=this.nextPanoData.panoId,e=this.panoData.getTopos().filter((function(e){return e&&e.panoId===t}));if(e.length){var n=e[0].topoDir;this.animateDir=n}else this.animateDir=this.pano.getPov().heading||0}},e.prepareJump=function(){var t=this,e=this.calcJumpDistance();return new Promise((function(n){t.changeAni=new No(t.pano,t.animateDir,e,(function(){t.changeAni=null,n()})),t.changeAni.startAni(),t.pano.dispatchEvent({debug:!0,log:"穿梭动画,渲染一帧",type:d.REFRESH})}))},e.prepareTraverse=function(t){var e=this,n=this.calcJumpDistance();return new Promise((function(r){e.changeAni=new Zo(e.pano,n,t,e.animateDir,(function(){var t=e.snapshotFn(e.changeAni.scene,e.changeAni.camera);r(t),e.changeAni=null})),e.changeAni.start(),e.pano.dispatchEvent({debug:!0,log:"穿梭动画,渲染一帧",type:d.REFRESH})}))},e.prepareFade=function(t){var e=this;this.changeAni=new ko(this.pano,t,(function(){e.changeAni=null,e.pano.emit(d.SCENE_CHANGE_END)}))},e.prepareWaterWave=function(t){var e=this;this.changeAni=new Uo(this.pano,t,(function(){e.changeAni=null,e.pano.emit(d.SCENE_CHANGE_END)}))},e.calcJumpDistance=function(){var t,e,n=300,r=(t=new qo(this.panoData.panoX,this.panoData.panoY),e=new qo(this.nextPanoData.panoX,this.nextPanoData.panoY),t&&e?Math.round(Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2))):0);"number"==typeof r&&(n*=Math.pow(r,1/4));return n},e.isStreet=function(t){return t===p.TYPE_STREET},t}(),Xo=function(){function t(t,e){var n=e.fov,r=void 0===n?145:n,i=e.cameraY,o=void 0===i?3e3:i,a=e.handleEnd;this._pano=void 0,this.originFov=void 0,this.originRotateX=void 0,this.originRotateY=void 0,this.targetFov=void 0,this.targetCameraY=void 0,this.handleEnd=void 0,this.animate=void 0,this._pano=t,this.originFov=this.camera.fov,this.originRotateX=this.camera.rotation.x,this.originRotateY=this.camera.rotation.y,this.targetFov=r,this.targetCameraY=o,this.handleEnd=a,this.init()}var e=t.prototype;return e.start=function(){this._pano.dispatchEvent({type:d.REFRESH,debug:!0,log:"开场动画动画起始,渲染一帧"}),this.animate.start()},e.update=function(){this.animate.update()},e.init=function(){var t=this,e=this.camera;this.handleCameraChange(0),this.animate=new ho(0,1,p.FISHEYE_DURATION,so.easeInOutQuad).onUpdate((function(e){t.handleCameraChange(e),t._pano.dispatchEvent({type:d.REFRESH,debug:!0,log:"开场动画动画,渲染一帧"})})).onEnd((function(){e.fov=t.originFov,e.rotateX(t.originRotateX),e.rotateY(t.originRotateY),e.setPosition(0,0,0),e.updateWorldMatrix(),e.updateProjectionMatrix(),t._pano.dispatchEvent({type:d.REFRESH,debug:!0,log:"开场动画动画结束,渲染一帧"}),t.handleEnd()}))},e.handleCameraChange=function(t){var e=this.camera,n=this.targetCameraY,r=this.targetFov-(this.targetFov-this.originFov)*t,i=(this.originRotateX- -90)*t-90,o=this.originRotateY*t;e.fov=r,e.rotateX(i),e.rotateY(o),e.setPosition(0,n-n*t,0),e.updateWorldMatrix(),e.updateProjectionMatrix()},o(t,[{key:"camera",get:function(){return this._pano.camera}}]),t}();function Ko(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=function(t,e){if(!t)return;if("string"==typeof t)return Qo(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Qo(t,e)}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,i=function(){};return{s:i,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,s=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){s=!0,o=t},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw o}}}}function Qo(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n=u&&t<=h&&n>=c&&n<=l){i=!1,a.handleClick();break}}}catch(t){o.e(t)}finally{o.f()}return i},this.pano=t}var e=t.prototype;return e.handleAdd=function(t){t&&t.id&&(this.overlays.some((function(e){return e.id===t.id}))||(this.overlays.push(t),this.isReady&&t.init(this.pano)))},e.handleRemove=function(t){for(var e=0;e=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,s=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){s=!0,o=t},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw o}}}}function ta(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n0&&void 0!==arguments[0]?arguments[0]:100;e.renderThreadId&&(clearTimeout(e.renderThreadId),e.renderThreadId=null),e.renderThreadId=window.setTimeout((function(){e.isRAFRuning=!1,e.renderThreadId=null}),t),e.isRAFRuning||(e.isRAFRuning=!0,e.renderFrame())},this.resize=function(){var t=e.pano.getContainer();e.renderer.setSize(t.clientWidth,t.clientHeight)};var n=window.devicePixelRatio||1,r=t.getContainer();this.pano=t,this.renderer=new Ui({premultipliedAlpha:!1,preserveDrawingBuffer:t.opts.enableCapture||!1,antialias:!(n>1),pixelRatio:n,width:r.clientWidth,height:r.clientHeight}),this.renderer.setSize(r.clientWidth,r.clientHeight),t.getPanes().tileLayer.appendChild(this.renderer.domElement),this.gl=this.renderer.getContext(),this.camera=new Ki(75,r.clientWidth/r.clientHeight,.01,67e3),this.scene=new Qr,t.gl=this.gl,t.canvas=this.renderer.domElement,t.scene=this.scene,t.camera=this.camera,t.cameraNoFix=this.cameraNoFix,t.renderer=this.renderer,t.renders=[],this.sceneChange=new Yo(t,this.getSnapshot),this.initModule()}var e=t.prototype;return e.initModule=function(){var t=this.pano;this.sphereRender=new So(t),this.linkGLRender=new Bo(t),this.overlayManager=new Jo(t),this.skyboxRender=new eo(t),this.pano.renders.push(this.sphereRender,this.linkGLRender,this.overlayManager,this.skyboxRender)},e.reset=function(){this.scene.remove(this.sphereRender.meshs),this.scene.remove(this.linkGLRender.meshs)},e.getModule=function(t){var e,n=null,r=$o(this.pano.renders);try{for(r.s();!(e=r.n()).done;){var i=e.value;if(i.name===t){n=i;break}}}catch(t){r.e(t)}finally{r.f()}return n},e.renderFrame=function(){!1!==this.isRAFRuning?(this.openingAni&&this.openingAni.update(),this.sphereRender.draw(),this.renderer.render(this.scene,this.camera),this.overlayManager.draw(),this.sceneChange.draw(),this.requestId=requestAnimationFrame(this.renderFrame.bind(this))):this.requestId&&(cancelAnimationFrame(this.requestId),this.requestId=null)},e.startFishEyeAni=function(){var t=this;this.pano.fisheye&&(this.openingAni=new Xo(this.pano,{handleEnd:function(){t.openingAni=null,t.pano.fisheye=!1}}),setTimeout((function(){t.openingAni.start(),t.startRenderThread()}),p.FISHEYE_DELAY))},e.updateProjectionMatrix=function(t,e){var n=this.pano.getFov(e),r=this.pano.getContainerSize(),i=r.width/r.height;t.fov=n,t.aspect=i,t.updateProjectionMatrix()},e.updateCameraHeadingAndPitch=function(t){var e=this.pano.getPov(),n=e.heading,r=e.pitch,i=this.panoData,o=i.fixHeading,a=void 0===o?0:o,s=i.fixPitch,u=void 0===s?0:s,h=i.fixRoll,c=void 0===h?0:h;t.rotateX(r-u),t.rotateY(-n+a),t.rotateZ(c),t.updateWorldMatrix()},e.safeCall=function(t,e,n){var r=this.getModule(t);if(r&&r[e])return r[e].apply(r,n||[]);throw new Error("[safeCall] get module error => ".concat(t))},o(t,[{key:"isCanUpdate",get:function(){var t=this.sceneChange.changeAni,e=this.openingAni;return this.panoData&&!(t||e)}}]),t}(),na=function(){function t(t){var e=this;this.updateAnglePerPixel=function(){e._anglePerPixel=e._pano.calcAnglePerPixel()},this.destroy=function(){e.bindEvent(!1)},this._pano=t,this._displayZoom=t.getZoom(),this._anglePerPixel=t.calcAnglePerPixel(),this._container=t.getContainer(),this.lock=!1,this.clickTimer=null,this.dragAni=null,this.state={initPos:null,initHeading:0,initPitch:0,lastDiffPos:null,moveDiffPos:null,isTouchDown:!1,isTouchMove:!1,startTime:0,lastMoveTime:0}}var e=t.prototype;return e.init=function(){if(!this._initialized){if(this._initialized=!0,this.isMobile=navigator.userAgent.toLowerCase().match(/ipod|ipad|iphone|android/),this.isMobile){this.EVENTS={START:"touchstart",MOVING:"touchmove",END:"touchend",OUT:"touchcancel",WHEEL:"gesturechange",DOMMouseScroll:"DOMMouseScroll"};var t=this._container.getBoundingClientRect?this._container.getBoundingClientRect():{},e=t.left,n=void 0===e?0:e,r=t.top,i=void 0===r?0:r;this.getPagePosition=function(t){var e=t.touches.length>0?t.touches[0]:t.changedTouches[0];return{x:e.pageX-n,y:e.pageY-i}}}else this.EVENTS={START:"mousedown",MOVING:"mousemove",END:"mouseup",OUT:"mouseout",WHEEL:"mousewheel"},this.getPagePosition=function(t){return{x:t.offsetX,y:t.offsetY}};this.bindEvent()}},e.bindEvent=function(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],e=document.body,n=this.EVENTS,r=n.START,i=n.MOVING,o=n.END,a=this._pano._svContainer,s=t?"addEventListener":"removeEventListener";a[s](r,this.handleDown.bind(this)),a[s](i,this.handleMove.bind(this)),e[s](o,this.handleUp.bind(this))},e.handleDown=function(t){this.dragAni&&this.dragAni.stop();var e=this.state,n=this.getPagePosition(t),r=this._pano.getPov();e.initPos=n,e.isTouchDown=!0,e.initHeading=r.heading,e.initPitch=r.pitch,e.startTime=x(),this._pano.dispatchEvent(d.TOUCH_START,t)},e.handleMove=function(t){if(this.state.isTouchDown){this.state.isTouchMove=!0;var e=this.calcDiffPos(this.state.initPos,this.getPagePosition(t));this.setPov(e),this.state.moveDiffPos=e,this.state.lastDiffPos=e,this.state.lastMoveTime=x(),t.preventDefault(),t.stopPropagation()}},e.handleUp=function(t){var e=this;if(this.state.isTouchDown){var n=!0,r=this.getPagePosition(t);if(t.pos=r,this.state.isTouchDown=!1,this._pano.dispatchEvent(d.TOUCH_END,t),this._pano.renders.length)for(var i=0;i10||Math.abs(s)>10)){var u=this.calcDiffPos(this.state.initPos,this.getPagePosition(t)),h=2*Math.sqrt(Math.pow(u.x,2)+Math.pow(u.y,2))/(.008*(r-n.startTime)),c=[u.x>0?1:-1,u.y>0?1:-1],l=Math.abs(u.x),f=Math.abs(u.y),p=Math.atan2(f,l),v=Math.cos(p)*h,m=Math.sin(p)*h;-1===c[0]&&(v=-v),-1===c[1]&&(m=-m),this.dragAni&&this.dragAni.stop();var g=this._pano.getPov(),y=g.heading,_=g.pitch;n.initHeading=y,n.initPitch=_;this.dragAni=new ho(0,1,400,(function(t){return.3125*t-.15625*t*t})).onUpdate((function(t){var n=(t*=6.4)*v,r=t*m;e.setPov({x:n,y:r})})).onEnd((function(){e.dragAni=null,e._pano.dispatchEvent({type:d.POV_CHANGED_END})})).startAndAutoUpdate()}else this._pano.dispatchEvent({type:d.POV_CHANGED_END})},e.calcDiffPos=function(t,e){return t&&e?{x:e.x-t.x,y:e.y-t.y}:{x:0,y:0}},t}();function ra(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=function(t,e){if(!t)return;if("string"==typeof t)return ia(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return ia(t,e)}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,i=function(){};return{s:i,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,s=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){s=!0,o=t},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw o}}}}function ia(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n180?(u+=360,c=r.heading-u):c<-180&&(u-=360,c=r.heading-u),new ho(0,1,400,so["ease-out"]).onUpdate((function(t){a({heading:u+t*c,pitch:h+t*l})})).onEnd((function(){})).startAndAutoUpdate()}else a(r)}else e.handlePovChange(r)})),e.on(d.ZOOM_CHANGED,(function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(t.panoGLRender.isCanUpdate){var r=t.preZoom,i=e.getZoom();if(r!==i){var o=n.noAnimation||!1;if(t.zoomChangeAni&&(t.zoomChangeAni.stop(),t.zoomChangeAni=null),o)return t.op.updateAnglePerPixel(),t.panoGLRender.updateProjectionMatrix(e.camera),t.panoGLRender.update(),void(t.preZoom=i);var a=400;t.zoomChangeAni=new ho(r,i,a,so.easeOutCubic).onUpdate((function(n){t.panoGLRender.updateProjectionMatrix(e.camera,n),t.panoGLRender.update(n)})).onEnd((function(){t.zoomChangeAni=null,t.preZoom=i})).startAndAutoUpdate()}}})),e.on(d.DOUBLE_CLICK,(function(){t.panoGLRender.isCanUpdate&&(v.isMobile&&(3===e.getZoom()?e.setZoom(2):e.setZoom(3)))})),e.on(d.REFRESH,(function(e){var n=e.duration||200;t.panoGLRender.startRenderThread(n),t.debug&&e.log&&e.debug&&console.warn(e.log)})),e.on(d.SET_ID,(function(e){if(!t.panoServiceLock&&e.id){t.panoServiceLock=!0,window.getPanoById=t.panoService.getPanoById;var n=(1e5*Math.random()).toFixed(0);BMapGL._rd=BMapGL._rd||{},BMapGL._rd["_cbk"+n]=function(t){t&&void 0!==t.error&&0===t.error?window.getPanoById(e.id):Q("PANORAMA"),delete BMapGL._rd["_cbk"+n]},K("PANORAMA","BMapGL._rd._cbk"+n)}})),e.on(d.SET_POSITION,(function(e){if(!t.panoServiceLock&&e.point){t.panoServiceLock=!0,window.getPanoByLocation=t.panoService.getPanoByLocation;var n=(1e5*Math.random()).toFixed(0);BMapGL._rd=BMapGL._rd||{},BMapGL._rd["_cbk"+n]=function(t){t&&void 0!==t.error&&0===t.error?window.getPanoByLocation(e.point):Q("PANORAMA"),delete BMapGL._rd["_cbk"+n]},K("PANORAMA","BMapGL._rd._cbk"+n)}})),e.on(d.SIZE_CHANGED,(function(){t.op.updateAnglePerPixel(),t.panoGLRender.resize(),t.panoGLRender.updateProjectionMatrix(e.camera),t.panoGLRender.update()})),e.on(d.THUMB_LOADED,(function(){t.panoGLRender.onThumbLoaded(),t.panoGLRender.update()})),e.on(d.OVERLAY_ADD,(function(e){t.panoGLRender.overlayManager.handleAdd(e)})),e.on(d.OVERLAY_REMOVE,(function(e){t.panoGLRender.overlayManager.handleRemove(e)})),e.on(d.OVERLAYS_CLEAR,(function(){t.panoGLRender.overlayManager.destroy()})),e.on(d.LINK_VISIBLE_CHANGE,(function(e){"boolean"==typeof e.value&&(t.panoGLRender.safeCall("PanoLinkRender","setVisible",[e.value]),t.pano.dispatchEvent(d.REFRESH))})),e.on(d.DESTROY,(function(){t.op.destroy(),t.resizeOb&&t.resizeOb.disconnect(),t.checkSizeTimer&&clearInterval(t.checkSizeTimer),t.panoGLRender.renderer.forceContextLoss(),e.canvas.removeEventListener("webglcontextlost",t.onWebGLContextLost,!1)}));var n=v.isFirefox?"DOMMouseScroll":"mousewheel",r=new Date;e._svContainer.addEventListener(n,(function(t){if(e.opts.enableScrollWheelZoom&&e.opts.visible){var n=new Date;if(n-r<400)return;r=n;var i=-t.detail/3||t.wheelDelta/120,o=e.getZoom()+i;e.setZoom(o),t.preventDefault()}}))},e.getImgZoom=function(){return this.pano.calcDisplayZoom().imgZoom},e.handleContextStatus=function(){this.pano.canvas.addEventListener("webglcontextlost",this.onWebGLContextLost,!1)},e.onWebGLContextLost=function(t){t.preventDefault(),setTimeout((function(){window.location.reload()}),200)},t}();function aa(t,e,n){t.addEventListener(e,n,!1)}var sa=function(t){function e(e,n){var r;(r=t.call(this)||this).panoData=null,r.opts=void 0,r.useAnimation=!1,r.backupUseAnimation=r.useAnimation,r.animationType="",r.fisheye=!1,r.canvas=void 0,r.camera=void 0,r.renderer=void 0,r.gl=void 0,r.scene=void 0,r.cameraNoFix=void 0,r.renders=void 0,r.closeBtn=null,r.navigator=null,r._container=void 0,r._pov={heading:0,pitch:0},r._id=null,r._position=null,r._zoom=2,r._displayZoomResultsCache={},r._svContainer=void 0,r._eventManager=void 0,r._panes=void 0,r.addCloseButton=function(t){var e=r.closeBtn=document.createElement("div");e.className="pano_close",e.style.cssText=["position:absolute","right:10px","top:10px","padding: 5px 8px;","cursor:pointer","border-radius: 4px","font-size: 14px","background-color: rgba(0,0,0,.55)","z-index: 99","color: #fff"].join(";"),e.innerText="关闭",e.title="退出全景",e.onclick=function(){r.hide(),t&&t()},r._svContainer.appendChild(e)},r.getContainer=function(){return r._container},r.getContainerSize=function(){var t=r._container;return new l(t.clientWidth,t.clientHeight)},r.getPanes=function(){return r._panes},r.show=function(){r.opts.visible=!0,w.show(r._svContainer)},r.hide=function(){r.opts.visible=!1,w.hide(r._svContainer)},r.getZoom=function(){return r._zoom},r.setZoom=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};t!==r._zoom&&(t>p.MAX_ZOOM&&(t=p.MAX_ZOOM),ts&&(o=s),o512;)c++,l=360/(2*Math.pow(2,c-2)*h);if(c>a){var f=c-a;l*=Math.pow(2,f),c=a}c1&&void 0!==arguments[1]?arguments[1]:{};r.useAnimation=e.animation||!1,r.fisheye=e.fisheye||!1,r.animationType=e.animationType||"",r.dispatchEvent(d.SET_ID,{id:t})},r.setPosition=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};r.useAnimation=e.animation||!1,r.fisheye=e.fisheye||!1,r.animationType=e.animationType||"",r.dispatchEvent(d.SET_POSITION,{point:t})};var o={minImageZoom:p.TILE_MIN_ZOOM,maxImageZoom:p.TILE_MAX_ZOOM,minPitch:p.MIN_PITCH,maxPitch:p.MAX_PITCH,radius:p.RADIUS,tileBaseUrls:p.TILE_BASE_URLS,linksControl:!0,navigationControl:!0,enableScrollWheelZoom:!0,enableCapture:!1,visible:!0};r.opts=Object.assign({},o,n);var s="string"==typeof e?document.querySelector(e):e;if(!s)throw new Error("全景引擎宿主容器不存在");return r._container=s,r._init(),r}c(e,t);var n=e.prototype;return n.getPosition=function(){return this.position},n.setOptions=function(t){var e;for(e in t)if(Object.prototype.hasOwnProperty.call(t,e)){var n=!0;if("object"!==i(t[e])&&(n=t[e]!==this.opts[e]),this.opts[e]=t[e],!n)continue;switch(e){case"linksControl":this.dispatchEvent(d.LINK_VISIBLE_CHANGE,{value:t[e]});break;case"navigationControl":var r=!!t[e],o=this.navigator;r?o.show():o.hide()}}},n.capture=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(this.canvas){var e=this.canvas,n=t.quality||.8,r=t.type||"image/jpeg",i=e.toDataURL(r,n);return i}},n.addOverlay=function(t){this.dispatchEvent(d.OVERLAY_ADD,t)},n.removeOverlay=function(t){this.dispatchEvent(d.OVERLAY_REMOVE,t)},n.clearOverlays=function(){this.dispatchEvent(d.OVERLAYS_CLEAR)},n.destroy=function(){this.dispatchEvent(d.DESTROY)},n._init=function(){this._createDoms(),this.navigator=function(t){function e(t){this._initialize(t)}return m(e.prototype,{_initialize:function(t){this._pano=t,this.imgPath=t.opts.imgPath||"//api0.map.bdimg.com/images/",this._zoomInEnabled=!0,this._zoomOutEnabled=!0,this._render(),this._bind()},_render:function(){this._container=w.create("div");var t=this._container.style;t.position="absolute",t.left="10px",t.top="10px",t.zIndex=99;var e=this._container;e.innerHTML=this._generateHtml(),v.isPc?(this._panBtnContainer=e.children[2],this._panBtns=[this._panBtnContainer.children[0],this._panBtnContainer.children[1],this._panBtnContainer.children[2],this._panBtnContainer.children[3]],this._svgDirGroup=e.children[1].childNodes[0],this._zoomContainer=e.children[3]):v.isMobile&&(this._zoomContainer=e.children[0]),this._btnZoomIn=this._zoomContainer.children[0],this._btnZoomOut=this._zoomContainer.children[1],v.isMobile&&(this._zoomContainer.style.left=this._zoomContainer.style.top="0",this._zoomContainer.style.width="36px",this._zoomContainer.style.height="78px",this._btnZoomIn.style.width=this._btnZoomOut.style.width="33px",this._btnZoomIn.style.height=this._btnZoomOut.style.height="36px",this._btnZoomOut.style.top="37.5px"),this._pano.getZoom()>=p.MAX_ZOOM&&this._setZoomBtnEnabled("zoomIn",!1),this._pano.getZoom()<=p.MIN_ZOOM&&this._setZoomBtnEnabled("zoomOut",!1),this._pano._svContainer.appendChild(e)},_generateHtml:function(){var t=[];return v.isPc&&(t.push(this._generatePanHtml()),t.push(this._generateDirHtml()),t.push(this._generatePanBtnHtml())),t.push(this._generateZoomContainerHtml()),t.join("")},_generateDirHtml:function(){return''},_generatePanHtml:function(){return'
'},_generatePanBtnHtml:function(){return'
'},_generateZoomContainerHtml:function(){var t="background-image:url('"+this.imgPath+"st-navictrl.png');background-repeat:no-repeat;background-position:-74px 0;";return v.isMobile&&(t="background-image:url('"+this.imgPath+"st-navictrl-hd.png');background-repeat:no-repeat;background-position:0 0;background-size:180px 78px;"),'
'},_bind:function(){var t=this._pano,e=this;if(v.isPc){aa(this._panBtns[0],"click",(function(){var e=t.getPov();t.setPov({heading:e.heading,pitch:e.pitch+30},{animation:!0})})),aa(this._panBtns[1],"click",(function(){var e=t.getPov();t.setPov({heading:e.heading-45,pitch:e.pitch},{animation:!0})})),aa(this._panBtns[2],"click",(function(){var e=t.getPov();t.setPov({heading:e.heading+45,pitch:e.pitch},{animation:!0})})),aa(this._panBtns[3],"click",(function(){var e=t.getPov();t.setPov({heading:e.heading,pitch:e.pitch-30},{animation:!0})}));for(var n=0;n=p.MAX_ZOOM?e._setZoomBtnEnabled("zoomIn",!1):t.getZoom()<=p.MIN_ZOOM?e._setZoomBtnEnabled("zoomOut",!1):(e._setZoomBtnEnabled("zoomIn",!0),e._setZoomBtnEnabled("zoomOut",!0))}))},_redrawZoomBtn:function(t,e){t&&(v.isMobile&&(e=(e+74)/24*36),this._zoomContainer.style.backgroundPosition=e+"px 0")},show:function(){this._container.style.display=""},hide:function(){this._container.style.display="none"},_calcAngle:function(t){var e=(t=window.event||t).pageX||t.clientX,n=t.pageY||t.clientY,r=this._pano.getContainer().getBoundingClientRect();e=e-r.left-50,n=-(n-r.top-50);var i=Math.atan2(n,e)/Math.PI*180;return i<90?90-i:450-i},_setZoomBtnEnabled:function(t,e){if("zoomIn"===t)if(e){this._zoomInEnabled=!0,this._btnZoomIn.style.cursor="pointer";var n=-74;v.isMobile&&(n=0),this._zoomContainer.style.backgroundPosition=n+"px 0"}else{this._zoomInEnabled=!1,this._btnZoomIn.style.cursor="";var r=-170;v.isMobile&&(r=-144),this._zoomContainer.style.backgroundPosition=r+"px 0"}if("zoomOut"===t)if(e){this._zoomOutEnabled=!0,this._btnZoomOut.style.cursor="pointer";var i=-74;v.isMobile&&(i=0),this._zoomContainer.style.backgroundPosition=i+"px 0"}else{this._zoomOutEnabled=!1,this._btnZoomOut.style.cursor="";var o=-146;v.isMobile&&(o=-108),this._zoomContainer.style.backgroundPosition=o+"px 0"}}}),new e(t)}(this),this._eventManager=new oa(this)},n._createDoms=function(){var t=this._container,e=w.create("div"),n=e.style;n.overflow="hidden",n.position="absolute",n.zIndex="20",n.top=n.left="0px",n.height=n.width="100%",n.backgroundColor="#e5e3df",n.display="none",n.cursor="grab",e.addEventListener("mousedown",(function(){return n.cursor="grabbing"})),e.addEventListener("mouseup",(function(){return n.cursor="grab"})),this._svContainer=e,this._panes={tileLayer:this._createContainer("1"),maskLayer:this._createContainer("2"),linksLayer:this._createContainer("3"),overlayLayer:this._createContainer("4"),effectLayer:this._createContainer("5")},e.appendChild(this._panes.tileLayer),e.appendChild(this._panes.linksLayer),e.appendChild(this._panes.overlayLayer),e.appendChild(this._panes.effectLayer),b()||(e.appendChild(this._panes.maskLayer),this._panes.maskLayer.style.width="".concat(t.clientWidth,"px"),this._panes.maskLayer.style.height="".concat(t.clientHeight,"px"),this._panes.maskLayer.style.overflow="hidden"),t.appendChild(e),"absolute"!==w.getCurrentStyle(t).position&&(t.style.position="relative")},n._createContainer=function(t){var e=w.create("div"),n=e.style;return n.position="absolute",n.top=n.left="0",n.zIndex=t||"0",e},n.calcMobileFovy=function(t){var e=this.getContainerSize(),n=e.width,r=e.height,i=240/Math.pow(2,t),o=n/2/Math.tan(g(i/2)),a=Math.atan2(r/2,o);return 2*y(a)},n.calcPCFovy=function(t){return 90-15*(t-1)},o(e,[{key:"imageZoom",get:function(){return this.calcDisplayZoom().imgZoom}},{key:"panoId",get:function(){return this.panoData?this.panoData.panoId:""}},{key:"panoNorthDir",get:function(){return this.panoData?this.panoData.northDir:0}},{key:"position",get:function(){return this.panoData&&"number"==typeof this.panoData.panoX&&"number"==typeof this.panoData.panoY?new f(this.panoData.panoX,this.panoData.panoY):null}}]),e}(Or),ua={dom:null,anchor:null,width:null,height:null,altitude:2,sphereZ:null,useUV:!1},ha=function(t){function e(e){var n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return(n=t.call(this)||this).visible=!0,n.worldCoord=void 0,n.pov=void 0,n.id=n.genId(),n._pano=void 0,n.lastPanoPosition=null,n.initialized=!1,n.position=void 0,n.options=void 0,n.position=e,n.options=Object.assign({},ua,r),n.pov=null,n}c(e,t);var n=e.prototype;return n.getPov=function(){return this.pov},n.genId=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:4;return Number("".concat(Math.random().toString().substr(3,t)).concat(Date.now())).toString(36)},n.init=function(t){t&&!this.initialized&&(this._pano=t,this.lastPanoPosition=this._pano.position,this.worldCoord=this.options.useUV?this.calcCoordsByUV():this.calcCoordsByMC(),this.worldCoord&&(this.initialized=!0,this.add(),this.draw()))},n.calcCoordsByMC=function(){var t=this._pano.position;if(t&&this.position){var e,n=this.position,r=n.lng-t.lng,i=n.lat-t.lat,o=Math.atan2(r,i);o<0&&(o+=2*Math.PI),o=Math.round(y(o));var a=500,s=this.options,u=s.sphereZ,h=s.altitude;null===u?e=25*h:(e=u||0,a=Math.sqrt(Math.pow(r,2)+Math.pow(i,2)+Math.pow(e,2)));var c=y(Math.asin(e/a));c=c>90?90:c<-90?-90:c;var l=_(o+this._pano.panoNorthDir),f=this.radius,d=Math.cos(g(c))*f;d=Math.round(100*d)/100;var p=Math.cos(g(l))*d,v=Math.sin(g(c))*f,m=Math.sin(g(l))*d;return this.pov={heading:o,pitch:c},Vt(p,v,m)}},n.calcCoordsByUV=function(){if(this.position){var t=this.radius,e=this.position,n=xi(e,2),r=n[0],i=n[1],o=2*r*Math.PI,a=(i-.5)*Math.PI,s=Math.cos(a)*Math.cos(o)*t,u=Math.sin(a)*t,h=Math.cos(a)*Math.sin(o)*t;return this.pov={heading:_(y(o)-this._pano.panoNorthDir),pitch:y(a)},Vt(s,u,h)}},n.add=function(){var t=this.options,e=t.width,n=t.height;if(this.dom){var r=this._pano,i=this.dom;i.style.position="absolute",r.getPanes().overlayLayer.appendChild(i),"number"!=typeof e&&(this.options.width=i.clientWidth),"number"!=typeof n&&(this.options.height=i.clientHeight),r.dispatchEvent({type:"onoverlaydomadded",overlay:this})}},n.remove=function(){var t=this.dom;t&&t.parentNode&&t.parentNode.removeChild(t)},n.povToPointGL=function(){if(!this.worldCoord)return null;var t=this._pano,e=t.camera,n=t.getContainerSize(),r=n.width,i=n.height;return po(e,this.worldCoord,r,i)},n.draw=function(){if(this.initialized&&this.visible&&this._pano&&this._pano.panoData&&this.dom){var t=this.lastPanoPosition,e=this._pano.position;t.lng===e.lng&&t.lat===e.lat||(this.lastPanoPosition=e,this.worldCoord=this.options.useUV?this.calcCoordsByUV():this.calcCoordsByMC());var n=this.dom,r=this.povToPointGL();if(n.style.visibility="hidden",r){var i=this.calcAnchor(),o="".concat(r[0]-i.width,"px"),a="".concat(r[1]-i.height,"px");if(isNaN(r[0])||isNaN(r[1]))return;n.style.visibility="visible",n.style.webkitTransform="translate(".concat(o,", ").concat(a,")"),n.style.transform="translate(".concat(o,", ").concat(a,")")}}},n.handleClick=function(){this.dispatchEvent("click")},n.calcAnchor=function(){var t=this.options,e=t.anchor,n=t.width,r=void 0===n?0:n,i=t.height;return e||new l(r/2,(void 0===i?0:i)/2)},n.show=function(){this.visible=!0,this.dom&&(this.dom.style.display="")},n.hide=function(){this.visible=!1,this.dom&&(this.dom.style.display="none")},o(e,[{key:"radius",get:function(){return this._pano?this._pano.opts.radius:0}},{key:"dom",get:function(){return this.options.dom}}]),e}(Or),ca=function(t){function e(e,n){var r=n.position,i=n.altitude,o=void 0===i?2:i,a=n.costomStyle,s=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=document.createElement("div"),r={backgroundColor:"rgba(29, 29, 29, 0.8)",fontSize:"14px",padding:"7px 14px",height:"19px",color:"#fff",whiteSpace:"nowrap",borderRadius:"4px"};return m(n.style,r,e),n.innerText=t,n}(e,void 0===a?{}:a);return t.call(this,r,{dom:s,altitude:o})||this}return c(e,t),e}(ha);t.Converters=mo,t.Engines=Qi,t.EventType=d,t.PanoLabel=ca,t.PanoOverlay=ha,t.PanoramaService=function(){var t=this;this.getPanoById=function(e,n){var r;r="".concat(tt.SERVICE_URL,"?qt=sdata&sid=").concat(e,"&").concat($("/")),t.request(r).then((function(t){n&&n(t)})).catch((function(t){n&&n(null)}))},this.getPanoByLocation=function(e,n,r){var i;i="".concat(tt.SERVICE_URL,"?qt=qsdata&x=").concat(e.lng,"&y=").concat(e.lat).concat(n?"&r="+n:"","&action=1&").concat($("/")),t.request(i).then((function(t){r&&r(t)})).catch((function(t){r&&r(null)}))},this.request=function(t){return T(t,{},{jsonp:"fn"})}},t.Point=f,t.getPanoControl=function(t,e){var n,r,i,o=(e=e||{}).imgPath||"//api.map.baidu.com/images/";function a(e){e.call(this),this.defaultAnchor=t.ControlAnchor.TOP_RIGHT,this.defaultOffset=new t.Size(10,10),this._isOn=!1}return n=a,r=t.Control,(i=Object.create(r.prototype)).constructor=n,n.prototype=i,m(a.prototype,{initialize:function(t){return this._map=t,this._render(),this._bind(),this._container},_render:function(){var t=this,n=w.create("div");n.innerHTML='全景',n.title="进入全景",m(n.style,{width:"49px",height:"51px",color:"#565656",background:'url("'.concat(o,'st-control.png")'),position:"absolute",cursor:"pointer",fontFamily:"arial,sans-serif",fontSize:"13px",textAlign:"center",boxShadow:"0px 0px 3px rgba(0, 0, 0, 0.3)",MozBoxShadow:"0px 0px 3px rgba(0, 0, 0, 0.3)",WebkitBoxShadow:"0px 0px 3px rgba(0, 0, 0, 0.3)"}),this._container=n;var r=this._map.getContainer();r.appendChild(n);var i={visible:!1};e.imgPath&&(i.imgPath=[e.imgPath]),e.tileBaseUrl&&(i.tileBaseUrls=[e.tileBaseUrl]),this._pano=new sa(r,i),this._pano.addCloseButton((function(){t.isMapEnableWheelZoom&&t._map.enableScrollWheelZoom()}));var a=this._scout=w.create("div");m(a.style,{position:"absolute",width:"24px",height:"41px",cursor:"pointer",backgroundImage:'url("'.concat(o,'st-scout.png")'),backgroundRepeat:"no-repeat",backgroundPosition:"-24px 0",overflow:"hidden",display:"none",zIndex:11}),r.appendChild(a);var s=this._infoWindow=w.create("div");m(s.style,{position:"absolute",width:"112px",height:"119px",backgroundImage:'url("'.concat(o,'st-infowindow.gif")'),backgroundRepeat:"no-repeat",backgroundPosition:"0 0",display:"none",cursor:"pointer",zIndex:12});var u=this._thumb=w.create("img");s.appendChild(u),u.src=o+"st-noresult.png",m(u.style,{width:"100px",height:"75px",left:"6px",top:"6px",position:"absolute"});var h=this._stDescription=w.create("div");m(h.style,{position:"absolute",top:"85px",fontFamily:"arial,sans-serif",fontSize:"13px",paddingLeft:"6px"}),s.appendChild(h),r.appendChild(s)},_updateView:function(){var t=this._container.style;this._isOn||this._isOver?(t.backgroundPosition="-49px 0",t.color="#fff"):(t.backgroundPosition="0 0",t.color="#565656")},_bind:function(){var n=this;this._pano.on("dataload",(function(t){var r=t.data;r?(n._currentSvId=r.panoId,e.tileBaseUrl?n._thumb.src="".concat(e.tileBaseUrl,"?&sid=").concat(r.panoId,"&pos=0_0&z=0"):n._thumb.src="//apisv0.bdimg.com/?qt=pdata&sid=".concat(r.panoId,"&pos=0_0&z=0&from=H5&").concat($("/")),n._stDescription.innerHTML=r.roadName):(n._currentSvId=null,n._thumb.src=o+"st-noresult.png",n._stDescription.innerHTML="")}));var r=this;v.isPc&&(this._container.addEventListener("mouseover",(function(){r._isOver=!0,r._updateView()})),this._container.addEventListener("mouseout",(function(){r._isOver=!1,r._updateView()}))),this._container.addEventListener("click",(function(){r._isOn?r._close():r._open()})),this._map.getContainer().addEventListener("mousemove",(function(e){if(r._isOn){var n=(e=window.event||e).pageX||e.clientX,i=e.pageY||e.clientY,a=function(t){for(var e={left:0,top:0};t&&t.offsetParent;)e.left+=t.offsetLeft,e.top+=t.offsetTop,t=t.offsetParent;return e}(r._map.container),s=new qo(n-a.left,i-a.top),u=r._map.pixelToPoint(s);if(""!==r._scout.style.display&&v.isPc&&(r._scout.style.display="",r._infoWindow.style.display=""),r._scout.style.left=s.x-12+"px",r._scout.style.top=s.y-41-2+"px",r._prePixel=r._curPixel,r._curPixel=s,r._prePixel){var h=s.x-r._prePixel.x;h>0?r._scout.style.backgroundPosition="-48px 0":h<0&&(r._scout.style.backgroundPosition="0 0")}r._curPixel.y<170?r._infoStatus=2:r._infoStatus=1,r._curPixel.x<66&&(r._infoStatus=3),r._curPixel.x>r._map.getSize().width-56-10&&(r._infoStatus=4);var c=1===r._infoStatus||2===r._infoStatus?112:126,l=1===r._infoStatus||2===r._infoStatus?119:105;1!==r._infoStatus&&2!==r._infoStatus||(r._infoWindow.style.left=r._curPixel.x-Math.round(c/2)+"px",1===r._infoStatus?(r._infoWindow.style.top=r._curPixel.y-l-42+"px",r._infoWindow.style.backgroundPosition="0 0",r._thumb.style.top="6px",r._thumb.style.bottom="",r._stDescription.style.top="85px",r._stDescription.style.bottom=""):(r._infoWindow.style.top=r._curPixel.y+2+"px",r._infoWindow.style.backgroundPosition="-112px 0",r._thumb.style.top="",r._thumb.style.bottom="6px",r._stDescription.style.top="",r._stDescription.style.bottom="85px"),r._infoWindow.style.width="112px",r._infoWindow.style.height="119px",r._thumb.style.left="6px",r._stDescription.style.left="0"),3!==r._infoStatus&&4!==r._infoStatus||(r._infoWindow.style.top=r._curPixel.y-Math.round(l/2)-20+"px",3===r._infoStatus?(r._infoWindow.style.left=r._curPixel.x+12+"px",r._infoWindow.style.backgroundPosition="0 -119px",r._thumb.style.left="20px",r._stDescription.style.left="14px"):(r._infoWindow.style.left=r._curPixel.x-12-c+"px",r._infoWindow.style.backgroundPosition="-126px -119px",r._thumb.style.left="6px",r._stDescription.style.left="0"),r._infoWindow.style.width="126px",r._infoWindow.style.height="105px"),r._infoWindow.style.backgroundImage='url("'.concat(o,'st-infowindow.gif")'),r._timerId&&(clearTimeout(r._timerId),r._timerId=null),r._timerId=setTimeout((function(){r._currentPoint=u,r._scout.style.backgroundPosition="-24px 0";var e=r._map.lnglatToMercator(u.lng,u.lat);r._pano.setPosition(new t.Point(e[0],e[1]))}),200)}})),this._map.addEventListener("click",(function(t){r._isOn&&v.isMobile&&(r._pano.setPosition(t.point),r._pano.show(),r._close()),r._isOn&&r._currentSvId&&(r._pano.setId(r._currentSvId),r._pano.show(),r._map.config.enableWheelZoom&&(r._map.disableScrollWheelZoom(),r.isMapEnableWheelZoom=!0),r._close())}))},_open:function(){this._isOn||(this._isOn=!0,this._map.addTileLayer(this._panoCoverageLayer),v.isPc&&(this._preDefaultCursor=this._map.getDefaultCursor(),this._preDraggingCursor=this._map.getDraggingCursor(),this._map.setDefaultCursor("pointer"),this._map.setDraggingCursor("pointer"))),this._updateView()},_close:function(){this._isOn&&(this._map.removeTileLayer(this._panoCoverageLayer),v.isPc&&(this._scout.style.display="none",this._infoWindow.style.display="none",this._map.setDefaultCursor(this._preDefaultCursor),this._map.setDraggingCursor(this._preDraggingCursor)),this._isOn=!1),this._updateView()}}),new a(t.Control)},t.getStreetViewCoverageLayer=function(t){var e=new t.TileLayer({transparentPng:!0,dataType:1,cacheSize:32});return e.zIndex=110,e.getTilesUrl=window.PANORAMA_URL?function(t,e){var n=window.PANORAMA_URL+"/tile",r=t.x,i=t.y;return window.BMAPGL_84&&(i=Math.pow(2,e)-i-1),"".concat(n,"?customid=panorama&x=").concat(r,"&y=").concat(i,"&z=").concat(e,"&type=WGS84")}:function(t,e){var n=["//apisv0.bdimg.com/","//apisv1.bdimg.com/"],r=(Math.abs(t.x)+Math.abs(t.y))%n.length;return"".concat(n[r],"?udt=").concat("20150114","&qt=tile&styles=").concat("pl","&x=").concat(t.x,"&y=").concat(t.y,"&z=").concat(e).replace(/-(\d+)/gi,"M$1")+"&"+$("/",{isCounter:!1})},e},t.init=function(t,e){return new sa(t,e)},Object.defineProperty(t,"__esModule",{value:!0})})(Pano={}); window.BMapGL=window.BMapGL||{};(function(bF,fD){var e8=e8||{version:"20150702",emptyFn:function(){}};(function(){e8._log=[];var i=0;var T={};e8.BaseClass=function(kx){T[(this.hashCode=(kx||e8.BaseClass.guid()))]=this};e8.BaseClass.guid=function(){return"mz_"+(i++).toString(36)};e8.BaseClass.create=function(){var kx=new e8.BaseClass();kx.decontrol();return kx};var e=e8.instance=e8.I=function(kx){return T[kx]};e8.BaseClass.prototype.dispose=function(){if(this.hashCode){delete T[this.hashCode]}for(var kx in this){if(typeof this[kx]!="function"){delete this[kx]}}};e8.BaseClass.prototype.getHashCode=function(){if(!this.hashCode){T[(this.hashCode=e8.BaseClass.guid())]=this}return this.hashCode};e8.BaseClass.prototype.decontrol=function(){delete T[this.hashCode]};e8.BaseClass.prototype.toString=function(){return"[object "+(this._className||"Object")+"]"};e8.BaseClass.prototype._wlog=function(ky,kz){var kx=e8._log;if(kx.length>100){kx.reverse().length=50;kx.reverse()}kx[kx.length]="["+ky+"]["+(this._className||"Object")+" "+this.hashCode+"] "+kz}})();Function.prototype.inherits=function(kx,T){var e,ky,kA=this.prototype,kz=function(){};kz.prototype=kx.prototype;ky=this.prototype=new kz();if(typeof(T)=="string"){ky._className=T}for(e in kA){ky[e]=kA[e]}this.prototype.constructor=kA.constructor;kA=kz=null;return ky};e8.BaseEvent=function(e,i){this.type=e;this.returnValue=true;this.target=i||null;this.currentTarget=this.srcElement=null;this.cancelBubble=false;this.domEvent=null};e8.BaseClass.prototype.on=e8.BaseClass.prototype.addEventListener=function(T,i){if(typeof i!=="function"){return this._wlog("error","addEventListener:"+i+" is not a function")}if(!this._listeners){this._listeners={}}var e=this._listeners;if(T.indexOf("on")!==0){T="on"+T}if(typeof e[T]!=="object"){e[T]={}}var kx=i.hashCode||e8.BaseClass.guid();i.hashCode=kx;if(e[T][kx]){this._wlog("warning","repeat key:"+kx)}e[T][kx]=i};e8.BaseClass.prototype.off=e8.BaseClass.prototype.removeEventListener=function(T,i){if(typeof i=="function"){i=i.hashCode}else{if(typeof i!=="string"&&typeof i!=="undefined"){return}}if(!this._listeners){this._listeners={}}if(T.indexOf("on")!=0){T="on"+T}var e=this._listeners;if(!e[T]){return}if(i===undefined){e[T]={};return}if(e[T][i]){delete e[T][i]}};e8.BaseClass.prototype.fire=e8.BaseClass.prototype.dispatchEvent=function(kx){if(!this._listeners){this._listeners={}}var T,e=this._listeners,ky=kx.type;kx.target=kx.srcElement=kx.target||kx.srcElement||this;kx.currentTarget=this;if(typeof this[ky]=="function"){this[ky](kx)}if(typeof e[ky]=="object"){for(T in e[ky]){if(typeof e[ky][T]=="function"){e[ky][T].call(this,kx)}}}return kx.returnValue};e8.BaseEvent.prototype.inherit=function(T){var i=this;this.domEvent=T=window.event||T;i.clientX=T.clientX||T.pageX;i.clientY=T.clientY||T.pageY;i.offsetX=T.offsetX||T.layerX;i.offsetY=T.offsetY||T.layerY;i.screenX=T.screenX;i.screenY=T.screenY;i.ctrlKey=T.ctrlKey||T.metaKey;i.shiftKey=T.shiftKey;i.altKey=T.altKey;return i};e8.Browser=(function(){var T=navigator.userAgent;var ky=0;var e=0;var kz=0;var i=0;var kD=0;var kB=0;var kC=0;var kA=0;var kx=0;var kE=0;if(typeof window.opera==="object"&&/Opera(\s|\/)(\d+(\.\d+)?)/.test(T)){kz=parseFloat(RegExp.$2)}else{if(/OPR(\/(\d+)(\..?)?)/.test(T)){kz=parseInt(RegExp.$2,10)}else{if(/Edge\/((\d+)\.\d+)/.test(T)){ky=parseInt(RegExp.$2,10)}else{if(/MSIE (\d+(\.\d+)?)/.test(T)){e=parseFloat(RegExp.$1)}else{if(T.indexOf("Trident")>-1&&/rv:(\d+(\.\d+)?)/.test(T)){e=parseInt(RegExp.$1,10)}else{if(/Firefox(\s|\/)(\d+(\.\d+)?)/.test(T)){kD=parseFloat(RegExp.$2)}else{if(navigator.vendor==="Netscape"&&/Netscape(\s|\/)(\d+(\.\d+)?)/.test(T)){kC=parseFloat(RegExp.$2)}else{if(T.indexOf("Safari")>-1&&/Version\/(\d+(\.\d+)?)/.test(T)){i=parseFloat(RegExp.$1)}}}}}}}}if(T.indexOf("Trident")>-1&&/Trident\/(\d+(\.\d+)?)/.test(T)){kA=parseInt(RegExp.$1,10)}else{if(!e&&!ky&&T.indexOf("Gecko")>-1&&T.indexOf("KHTML")===-1&&/rv\:(\d+(\.\d+)?)/.test(T)){kx=parseFloat(RegExp.$1)}else{if(!ky&&/chrome\/(\d+(\.\d+)?)/i.test(T)){kB=parseFloat(RegExp.$1)}else{if(!ky&&/AppleWebKit\/(\d+(\.\d+)?)/.test(T)){kE=parseInt(RegExp.$1,10)}}}}var kF={edge:ky,ie:e,firefox:kD,netscape:kC,opera:kz,safari:i,chrome:kB,gecko:kx,trident:kA,webkit:kE};return kF})();window.FeBrowser=e8.Browser;e8.Dom={};e8.Dom.createDom=function(i,e){if(e8.isIE&&e&&e.name){i="<"+i+' name="'+e8.String.escapeHTML(e.name)+'">'}var T=document.createElement(i);if(e){e8.Dom.setProperties(T,e)}return T};e8.Dom.getOffset=function(kx){var kA=e8.Dom.getOwnerDocument(kx);var kz=e8.isGecko>0&&kA.getBoxObjectFor&&e8.Dom.getStyle(kx,"position")=="absolute"&&(kx.style.top===""||kx.style.left==="");var kB={left:0,top:0};var i=(e8.isIE&&!e8.isStrict)?kA.body:kA.documentElement;if(kx==i){return kB}var T=null;var ky;if(kx.getBoundingClientRect){ky=kx.getBoundingClientRect();kB.left=ky.left+Math.max(kA.documentElement.scrollLeft,kA.body.scrollLeft);kB.top=ky.top+Math.max(kA.documentElement.scrollTop,kA.body.scrollTop);kB.left-=kA.documentElement.clientLeft;kB.top-=kA.documentElement.clientTop;if(e8.isIE&&!e8.isStrict){kB.left-=2;kB.top-=2}}else{if(kA.getBoxObjectFor&&!kz){ky=kA.getBoxObjectFor(kx);var e=kA.getBoxObjectFor(i);kB.left=ky.screenX-e.screenX;kB.top=ky.screenY-e.screenY}else{T=kx;do{kB.left+=T.offsetLeft;kB.top+=T.offsetTop;if(e8.isWebkit>0&&e8.Dom.getStyle(T,"position")=="fixed"){kB.left+=kA.body.scrollLeft;kB.top+=kA.body.scrollTop;break}T=T.offsetParent}while(T&&T!=kx);if(e8.isOpera>0||(e8.isWebkit>0&&e8.Dom.getStyle(kx,"position")=="absolute")){kB.top-=kA.body.offsetTop}T=kx.offsetParent;while(T&&T!=kA.body){kB.left-=T.scrollLeft;if(!e8.isOpera||T.tagName!="TR"){kB.top-=T.scrollTop}T=T.offsetParent}}}return kB};e8.Dom.getOwnerDocument=function(e){return e.nodeType==9?e:e.ownerDocument||e.document};e8.Dom.setProperties=function(i,e){e8.each(e,function(kx,T){e8.Dom._setProperty(i,T,kx)})};e8.Dom._setProperty=function(i,e,T){if(e=="style"){i.style.cssText=T}else{if(e=="class"){i.className=T}else{if(e=="for"){i.htmlFor=T}else{if(e in e8.Dom._DIRECT_ATTRIBUTE_MAP){i.setAttribute(e8.Dom._DIRECT_ATTRIBUTE_MAP[e],T)}else{i[e]=T}}}}};e8.Dom._DIRECT_ATTRIBUTE_MAP={cellpadding:"cellPadding",cellspacing:"cellSpacing",colspan:"colSpan",rowspan:"rowSpan",valign:"vAlign",height:"height",width:"width",usemap:"useMap",frameborder:"frameBorder"};e8.G=function(){for(var T=[],kx=arguments.length-1;kx>-1;kx--){var ky=arguments[kx];T[kx]=null;if(typeof ky=="object"&&ky&&ky.dom){T[kx]=ky.dom}else{if((typeof ky=="object"&&ky&&ky.tagName)||ky==window||ky==document){T[kx]=ky}else{if(typeof ky=="string"&&(ky=document.getElementById(ky))){T[kx]=ky}}}}return T.length<2?T[0]:T};e8.ac=function(e,i){if(!(e=this.G(e))){return}i=this.trim(i);if(!new RegExp("(^| )"+i.replace(/(\W)/g,"\\$1")+"( |$)").test(e.className)){e.className=e.className.split(/\s+/).concat(i).join(" ")}};e8.addClassName=e8.ac;e8.each=function(kz,e){if(typeof e!="function"){return kz}if(kz){if(kz.length===undefined){for(var T in kz){e.call(kz[T],kz[T],T)}}else{for(var kx=0,ky=kz.length;kx0&&!window.opera){/MSIE (\d+(\.\d+)?)/.test(navigator.userAgent);e8.isIE=parseFloat(RegExp.$1)}})();e8.rc=function(e,i){if(!(e=this.G(e))){return}i=this.trim(i);var T=e.className.replace(new RegExp("(^| +)"+i.replace(/(\W)/g,"\\$1")+"( +|$)","g"),"$2");if(e.className!=T){e.className=T}};e8.removeClassName=e8.rc;e8.show=function(){this.each(arguments,function(e){if(e=e8.G(e)){e.style.display=""}})};e8.trim=function(e){return e.replace(/(^[\s\t\xa0\u3000]+)|([\u3000\xa0\s\t]+$)/g,"")};e8.getElementsByClassName=function(e,i){if(e.getElementsByClassName){return e.getElementsByClassName(i)}else{return(function T(kE,kC){if(kC==null){kC=document}var kB=[],kA=kC.getElementsByTagName("*"),kx=kA.length,kD=new RegExp("(^|\\s)"+kE+"(\\s|$)"),kz,ky;for(kz=0,ky=0;kz-1};e8.insertHTML=function(kx,e,T){kx=e8.G(kx);if(kx===null){return kx}var i,ky;if(kx.insertAdjacentHTML){kx.insertAdjacentHTML(e,T)}else{i=kx.ownerDocument.createRange();e=e.toUpperCase();if(e=="AFTERBEGIN"||e=="BEFOREEND"){i.selectNodeContents(kx);i.collapse(e=="AFTERBEGIN")}else{ky=e=="BEFOREBEGIN";i[ky?"setStartBefore":"setEndAfter"](kx);i.collapse(ky)}i.insertNode(i.createContextualFragment(T))}return kx};if(typeof HTMLElement!="undefined"&&HTMLElement.prototype.__lookupGetter__&&!HTMLElement.prototype.__lookupGetter__("children")&&!window.opera){try{HTMLElement.prototype.__defineGetter__("children",function(){for(var T=[],kx=0,kz,ky=0,e=this.childNodes.length;ky-1};e8.isEmptyObject=function(T){if(Object.prototype.toString.call(T)==="[object Object]"){for(var e in T){return false}return true}else{return false}};var bY=window.location.protocol==="http:"?"http:":"https:";var eF={fontFamily:'Arial,Helvetica,"PingFang SC","Hiragino Sans GB",STHeiti,sans-serif',mapStyleNameIdPair:{"default":0,"grayed-out":1},mapHost:bY+"//map.baidu.com",apiHost:bY+"//api.map.baidu.com",apiIMG:bY+"//api.map.baidu.com/images",staticHost:bY+"//webmap0.bdimg.com",imgPath:bY+"//webmap0.bdimg.com/image/api/",tileDomain:[bY+"//maponline0.bdimg.com",bY+"//maponline1.bdimg.com",bY+"//maponline2.bdimg.com",bY+"//maponline3.bdimg.com"],panoTilePath:"//apisv1.bdimg.com/",optDomain:"http://10.120.25.45:8017",rasterTilePath:"/tile/",vectorTilePath:"/pvd/",originTilePath:[bY+"//pcor.baidu.com"],stylePath:"//maponline0.bdimg.com/sty/",bosPath:bY+"//mapopen-pub-jsapigl.bj.bcebos.com/assets/images/",getIconSetPath:function(e){var i="map_icons2x/";if(typeof e==="string"&&this.mapStyleNameIdPair[e]>0){i="map_icons2x_"+(this.mapStyleNameIdPair[e]-1)+"/"}return bY+this.stylePath+i},getMapStyleFiles:function(T){var ky=true;if(typeof T==="string"&&T!=="default"){ky=false}var kz=ky?"":"_"+(this.mapStyleNameIdPair[T]-1);var i=bG();var kx="udt="+i.udt+"&v="+i.ver;var e=bY+this.stylePath;return[e+"icons_2x"+kz+".js?"+kx,e+"fs"+kz+".js?"+kx,e+"indoor_fs.js?"+kx]},tvc:{ditu:{normal:{version:"088",updateDate:"20230830"},satellite:{version:"009",updateDate:"20230830"},normalTraffic:{version:"081",updateDate:"20230830"},satelliteTraffic:{version:"083",updateDate:"20230830"},mapJS:{version:"104",updateDate:"20230830"},satelliteStreet:{version:"083",updateDate:"20230830"},earthVector:{version:"001",updateDate:"20230830"}},webapp:{high_normal:{version:"001",updateDate:"20230830"},lower_normal:{version:"002",updateDate:"20230830"}},api_for_mobile:{vector:{version:"002",updateDate:"20230830"},vectorIcon:{version:"002",updateDate:"20230830"}}},msv:{mapstyle:{version:"001",updateDate:"20230817"}}};eF.imgResources={blankGIF:eF.staticHost+"/res/litemapapi/v1d1/images/blank.gif?20170501",markerPng:eF.staticHost+"/res/litemapapi/v1d1/images/marker.png?20170501",locPng:eF.staticHost+"/res/litemapapi/v1d1/images/loc.png?20180918",locNewPng:eF.staticHost+"/res/litemapapi/v1d1/images/loc_new.png?20190314",zoomPng:eF.staticHost+"/res/litemapapi/v1d1/images/zoombtn.png?20180918",mapLogoPng:eF.staticHost+"/res/litemapapi/v1d1/images/logo-2x.png?20190226"};var E=eF;var jz="ruler.cur";if(e8.Browser.ie||e8.Browser.edge){e8.extend(E,{distCursor:"url("+E.imgPath+jz+"),crosshair",defaultCursor:"url("+E.imgPath+"openhand.cur),default",draggingCursor:"url("+E.imgPath+"closedhand.cur),move"})}else{if(e8.Browser.firefox){e8.extend(E,{distCursor:"url("+E.imgPath+jz+"),crosshair",defaultCursor:"-moz-grab",draggingCursor:"-moz-grabbing"})}else{if(e8.Browser.chrome||e8.Browser.safari){e8.extend(E,{distCursor:"url("+E.imgPath+jz+") 2 6,crosshair",defaultCursor:"url("+E.imgPath+"openhand.cur) 8 8,default",draggingCursor:"url("+E.imgPath+"closedhand.cur) 8 8,move"});if(e8.Platform.macintosh){E.defaultCursor="-webkit-grab";E.draggingCursor="-webkit-grabbing"}}else{e8.extend(E,{distCursor:"url("+E.imgPath+jz+"),crosshair",defaultCursor:"url("+E.imgPath+"openhand.cur),default",draggingCursor:"url("+E.imgPath+"closedhand.cur),move"})}}}bF=bF||{};bF.version="gl";bF._register=[];bF.register=function(e){this._register[this._register.length]=e};bF.guid=1;bF.getGUID=function(e){return(e||"")+bF.guid++};var eY=window.BMAP_AUTHENTIC_KEY||"";function V(e,i,kx){var T=new Date();T.setTime(T.getTime()+kx*24*60*60*1000);document.cookie=e+"="+escape(i)+";expires="+T.toGMTString()}function a9(e,i){if(navigator.cookieEnabled){return V(e,i,30)}if(localStorage){return localStorage.setItem(e,i)}if(sessionStorage){return sessionStorage.setItem(e,i)}}bF.getSeckeyCid=function(){var i=+new Date();var e=bY+"//dlswbr.baidu.com/heicha/mw/abclite-2063-s.js?_t="+i;g1.load(e,i5)};function i5(){if(window.___abvk){a9("SECKEY_ABVK",window.___abvk)}}window.__abbaidu_2063_cb=function(i){var e=JSON.parse(i);a9("BMAP_SECKEY",e.data)};bF.bmapVerifyCbk=function(ky){if(ky&&ky.error!==0){bF=null;BMapGL=null;var kz="百度未授权使用地图API,可能是因为您提供的密钥不是有效的百度地图开放平台密钥,或此密钥未对本应用的百度地图JavaScriptAPI授权。您可以访问如下网址了解如何获取有效的密钥:https://lbs.baidu.com/apiconsole/key#。";switch(ky.error){case 101:kz="您所使用的密钥ak有问题,不支持jsapi服务,可以访问该网址了解如何获取有效密钥:http://lbsyun.baidu.com/apiconsole/key#。";break;case 102:kz="MCODE参数不存在,mobile类型MCODE参数必需,详情查看:http://lbsyun.baidu.com/apiconsole/key#。";break;case 200:kz="APP不存在,AK有误请检查再重试,详情查看:http://lbsyun.baidu.com/apiconsole/key#。";break;case 201:kz="APP被您禁用啦,可以访问 http://lbsyun.baidu.com/apiconsole/key# 查看自己的应用具体详情,或联系我们了解详情。";break;case 202:kz="APP被管理员删除啦,可以访问 http://lbsyun.baidu.com/apiconsole/key# 查看自己的应用具体详情,或联系我们了解详情。";break;case 203:kz="APP类型错误,可以访问 http://lbsyun.baidu.com/apiconsole/key# 查看自己的应用具体详情,或联系我们了解详情。";break;case 210:kz="APP IP校验失败,可以访问 http://lbsyun.baidu.com/apiconsole/key# 查看自己的应用具体详情,或联系我们了解详情。";break;case 220:kz="APP Referer校验失败。请检查该ak设置的白名单与访问所有的域名是否一致。详情查看:http://lbsyun.baidu.com/apiconsole/key#";break;case 230:kz="APP Mcode码校验失败,可以访问 http://lbsyun.baidu.com/apiconsole/key# 查看自己的应用具体详情,或联系我们了解详情。";break;case 240:kz="APP服务被禁用了,可以访问 http://lbsyun.baidu.com/apiconsole/key# 查看自己的应用具体详情,或联系我们了解详情。";break;case 250:kz="该用户不存在... 请登录 https://lbs.baidu.com 的控制台,注册成为开发者申请ak吧。";break;case 251:kz="该用户被自己删除啦,可以访问 http://lbsyun.baidu.com/apiconsole/key# 查看自己的应用具体详情。";break;case 252:kz="该用户被管理员删除啦,可以访问 http://lbsyun.baidu.com/apiconsole/key# 了解如何获取有效密钥,或请联系我们了解详情。";break;case 260:kz="您所使用的密钥AK不包含该服务呢,可以访问 http://lbsyun.baidu.com/apiconsole/key# 查看服务选择情况,或请联系我们了解详情。";break;case 261:kz="您所使用的密钥AK的该服务被禁用啦,可以访问 http://lbsyun.baidu.com/apiconsole/key# 查看服务选择情况,或请联系我们了解详情。";break;case 401:kz="您所使用的AK并发超限了,请登录 http://lbsyun.baidu.com/cashier/quota#/home 了解详情。";break;case 302:kz="您所使用的AK天配额超限了,请登录 http://lbsyun.baidu.com/cashier/quota#/home 了解详情。";break}alert(kz);var T=document.getElementsByClassName("bmap-container");if(T){for(var kx=0;kxi){this._removeOld()}if(!e[T]){e.push(kx)}e[T]=kx;kx._key_=T};iq.prototype.getHitRate=function(){return Math.round(this._totalHitTimes/this._totalGetTimes*1000)/1000};iq.prototype.getData=function(i){var e=this._cache[i];if(e){this._totalHitTimes++}this._totalGetTimes++;return e};iq.prototype.removeData=function(ky){if(this._options.clearCallback){this._options.clearCallback(this._cache[ky])}var T=this._cache;var kz=T[ky];for(var kx=0,e=T.length;kx=0;ky--){var kx=this._cache[ky]._key_;if(!kz[kx]){T.splice(ky,1);if(this._options.clearCallback){this._options.clearCallback(T[kx])}delete T[kx]}}};iq.prototype.getDataCount=function(){return this._cache.length};function ja(){}e8.extend(ja.prototype,{centerAndZoomIn:function(kC,T,kD){var kA=this;if(!kC&&!T){return}kC=kC||this.centerPoint;T=T||this.zoomLevel;T=this._getProperZoom(T).zoom;if(this.mapType===BMAP_EARTH_MAP){if(!this._earth){this.mapType=BMAPGL_NORMAL_MAP;this.temp.originMapType=BMAP_EARTH_MAP;function kB(){kA._earth=new bF.Earth(kA,{showRealSunlight:kA.config.showRealSunlight,showMilkyway:kA.config.showMilkyway,earthBackground:kA.config.earthBackground});kA._proxyEarthEvents();kA._changeEarthMapType(BMAP_EARTH_MAP);e8.extend(kA,bF.EarthView.prototype);if(!kA._navigationCtrl&&kA.config.showControls){kA._navigationCtrl=new bF.NavigationControl3D(kA)}delete kA.temp.originMapType}hj.load("earth",function(){if(bF["FeatureStyle"+kA.config.style]){kB()}else{kA.loadMapStyleFiles(function(){kB()})}})}}this.lastLevel=this.zoomLevel||T;this.zoomLevel=T;var ky=new fU("onload");ky.point=kC;ky.zoom=T;this.centerPoint=this.restrictCenter(new cF(kC.lng,kC.lat));if(this.centerPoint.zoom){this.zoomLevel=this.centerPoint.zoom}this.defaultZoomLevel=this.defaultZoomLevel||this.zoomLevel;this.defaultCenter=this.defaultCenter||this.centerPoint;if(!this.loaded&&!(this.temp.originMapType===BMAP_EARTH_MAP)){var i=this.config.defaultMaxBounds;var kz=new o(i,"baidu",this.mapType);var kx=new hM({mapType:this.mapType,copyright:kz,customLayer:false,baseLayer:true,tileTypeName:"web"});kx._isInnerLayer=true;this.addTileLayer(kx);if(this.mapType===BMAP_SATELLITE_MAP&&this._isHybridShow===true){this._addHybirdMap()}}this.dispatchEvent(ky);this.loaded=true;kD=kD||{};kD.callback&&kD.callback()},_setPlatformPosition:function(kD,kC,kG){kG=kG||{};if(kD===0&&kC===0&&!kG.point){return}if(isNaN(kG.initMapOffsetX)){kG.initMapOffsetX=this.offsetX}if(isNaN(kG.initMapOffsetY)){kG.initMapOffsetY=this.offsetY}var kE=kD+kG.initMapOffsetX;var kB=kC+kG.initMapOffsetY;if(kG.point){var i=this.restrictCenter(kG.point);if(!i.equals(this.centerPoint)){this.centerPoint=i.clone();this.fire(new fU("oncenter_changed"))}}else{var kx=this.offsetX-kE;var e=this.offsetY-kB;var T=this.getZoomUnits();var kA=this.centerPoint.lng;var kz=this.centerPoint.lat;var ky=new cF(kA,kz);this.centerPoint=this.restrictCenter(new cF(ky.lng+kx*T,ky.lat-e*T),T);this.fire(new fU("oncenter_changed"));if(this.zoomLevel<10){kE=this.offsetX-(this.centerPoint.lng-ky.lng)/T;kB=this.offsetY+(this.centerPoint.lat-ky.lat)/T}}this.offsetX=kE;this.offsetY=kB;var kF=this.platform.style;kF.left=kE+"px";kF.top=kB+"px";this.maskLayer.style.left=-kE+"px";this.maskLayer.style.top=-kB+"px";if(kG.dispatchEvent!==false){this.dispatchEvent(new fU("onmoving"))}},zoomTo:function(e,kA,kE){kE=kE||{};kE.zoomCenter=kA;if(kE.noAnimation!==true){this.deepZoomTo(e,kE);return}if(typeof e!=="number"){return}var ky=eu[this.mapType];if(!ky){return}var T=e;e=this._getProperZoom(e).zoom;if(e===this.zoomLevel){var kB=new fU("onzoomexceeded");kB.targetZoom=T;this.dispatchEvent(kB);kE.callback&&kE.callback();return}this.lastLevel=this.zoomLevel;if(kA){this.temp._cPoint=kA;this.temp._cPixel=this.pointToPixelIn(kA)}else{if(this.getInfoWindow()){var kD=this.getInfoWindow().getPoint();this.temp._cPixel=this.pointToPixelIn(kD);this.temp._cPoint=kD}}if(this.config.zoomCenter){kA=this.config.zoomCenter;this.temp._cPoint=kA;this.temp._cPixel=this.pointToPixelIn(kA)}if(kA||this.temp.infoWin&&this.temp.infoWin.isOpen()){var i=this.temp._cPoint;var kC=this.temp._cPixel;var kx=this.getZoomUnits(e);var kz=new cF(i.lng+kx*(this.width/2-kC.x),i.lat-kx*(this.height/2-kC.y));this.centerPoint=this.restrictCenter(kz,kx,e);if(this.centerPoint.zoom){e=this.centerPoint.zoom}}if(kE.fireEvent!==false){this.dispatchEvent(new fU("onzoomstart"))}if(e!==this.zoomLevel){this.zoomLevel=e;this.dispatchEvent(new fU("onzooming"));this.dispatchEvent(new fU("onzoomstartcode"))}if(kE.fireEvent!==false){this.dispatchEvent(new fU("onzoomend"))}if(kE.callback){kE.callback()}},deepZoomMedia:function(e){var i=this;if(!i.temp.isStdCtrlBusy){i.temp.isStdCtrlBusy=true;i.deepZoomTo(i.zoomLevel+e);setTimeout(function(){i.temp.isStdCtrlBusy=false},400)}},deepZoomTo:function(kB,kx){kx=kx||{};var kz=kB-this.zoomLevel;var ky=this._getProperZoom(kB);if(ky.exceeded){var e=new fU("onzoomexceeded");e.targetZoom=kB;this.dispatchEvent(e);return}var i;if(kx.zoomCenter){i=this.pointToPixelIn(kx.zoomCenter)}else{if(this.getInfoWindow()){i=this.pointToPixelIn(this.getInfoWindow().getPoint(),{zoom:this.lastLevel})}else{var i=new ft(this.width/2,this.height/2)}}this.lastLevel=this.zoomLevel;var kA=this.deepZoom||new aH(this);var T=kz>0?1:-1;kA.zoomMap(i,kz,T,null,kx)},flyToIn:function(kC,e){if(e===this.zoomLevel){this.panToIn(kC);return}var kz=this._getProperZoom(e);if(kz.exceeded){var kD=new fU("onzoomexceeded");kD.targetZoom=e;this.dispatchEvent(kD);return}var kB=e-this.zoomLevel;var T=new ft(this.width/2,this.height/2);var i=this.pointToPixelIn(kC);var kA=new jk(i.x-T.x,i.y-T.y);this.lastLevel=this.zoomLevel;if(Math.abs(kB)>=4||Math.abs(kA.width)>this.width||Math.abs(kA.height)>this.height){this.centerAndZoomIn(kC,e);return}var ky=this.deepZoom||new aH(this);var kx=kB>0?1:-1;ky.zoomMap(i,kB,kx,kA)},panToIn:function(i,T){T=T||{};if(!i||i.equals(this.centerPoint)){T.callback&&T.callback();return}var kx=this.pointToPixelIn(i);var e=Math.round(this.width/2);var ky=Math.round(this.height/2);if(Math.abs(e-kx.x)>this.width||Math.abs(ky-kx.y)>this.height||T.noAnimation===true){this._panToIn(e-kx.x,ky-kx.y,i);T.callback&&T.callback()}else{this._panBy(e-kx.x,ky-kx.y,T)}},_panToIn:function(i,e,kx){var T=this.temp;if(T.operating===true){return}if(T.dragAni){T.dragAni.stop();T.dragAni=null;this.dispatchEvent(new fU("onmoveend"))}this.dispatchEvent(new fU("onmovestart"));this._setPlatformPosition(i,e,{point:kx});this.dispatchEvent(new fU("onmoveend"))},panBy:function(i,e,T){T=T||{};i=Math.round(i)||0;e=Math.round(e)||0;if(Math.abs(i)<=this.width&&Math.abs(e)<=this.height&&T.noAnimation!==true){this._panBy(i,e,T)}else{this._panToIn(i,e);T.callback&&T.callback()}},_panBy:function(i,e,ky){if(this.temp.operating===true){return}ky=ky||{};this.dispatchEvent(new fU("onmovestart"));var kx=this;var T=kx.temp;T.pl=kx.offsetX;T.pt=kx.offsetY;if(T.tlPan){T.tlPan.cancel()}if(T.dragAni){T.dragAni.stop();T.dragAni=null;this.dispatchEvent(new fU("onmoveend"))}T.tlPan=new fJ({fps:ky.fps||kx.config.fps,duration:ky.duration||kx.config.actionDuration,transition:ky.transition||gP.easeInOutQuad,render:function(kz){this.terminative=kx.temp.operating;if(kx.temp.operating){return}kx._setPlatformPosition(Math.ceil(i*kz),Math.ceil(e*kz),{initMapOffsetX:T.pl,initMapOffsetY:T.pt})},finish:function(kz){kx.dispatchEvent(new fU("onmoveend"));kx.temp.tlPan=false;if(kx.temp.stopArrow===true){kx.temp.stopArrow=false;if(kx.temp.arrow!==0){kx._arrow()}}ky.callback&&ky.callback()}})},getCenterIn:function(){return this.centerPoint},getZoom:function(){return this.zoomLevel},setTilt:function(){},getTilt:function(){return this._tilt},setHeading:function(){},getHeading:function(){return this._heading},restrictCenter:function(kF,i,e){this.isRestrict=false;i=i||this.getZoomUnits();e=e||this.zoomLevel;var kD=this.pixelToPointIn(new ft(this.width,0),{center:kF,zoom:e});var kB=this.pixelToPointIn(new ft(0,this.height),{center:kF,zoom:e});var kG=kF.lng;var kL=kF.lat;if(this.config.restrictBounds!==null&&!this.config.restrictBounds.isEmpty()){var kK=this.config.restrictBounds;var kx=kK.getSouthWest();var kI=kK.getNorthEast();var kE=jt.convertLL2MC(kx);var kz=jt.convertLL2MC(kI);kF.lng=this.calcNewLngByBounds(kG,kB,kD,kE.lng,kz.lng,i);kF.lat=this.calcNewLatByBounds(kL,kB,kD,kE.lat,kz.lat,i);return kF}var kC=this.pixelToPointIn(new ft(0,0),{center:kF,zoom:e});var ky=this.pixelToPointIn(new ft(0,this.height),{center:kF,zoom:e});if(this.zoomLevel<5){if(kC.lat>h2.MAX_LAT&&ky.lath2.MAX_LAT){this.isRestrict=true;kF.lat=h2.MAX_LAT-this.height/2*i}else{if(ky.lat=h2.HIGH_RES_MIN_RATIO?2:1,enableEarth:de.ifEnableEarth(),defaultMaxBounds:new ih(new cF(-21364736,-10616832),new cF(23855104,15859712)),showControls:false,indoorControl:false,showRealSunlight:true,showMilkyway:true,earthBackground:null,showStreetLayer:true,showVectorStreetLayer:false,showVectorLine:false,textureScale:1,minZoom:null,maxZoom:null,earthUseRound:true,earthMinZoom:null,earthMaxZoom:null,earthSun:true,earthClouds:true,earthMarkerShowAllTime:true,style:"default",showCustomIndoor:true,backgroundColor:null,enableIconClick:false,autoSafeArea:false,ak:null,webgl2:false,restrictCenter:true,restrictBounds:null,smaa:false,preserveDrawingBuffer:false,privateOn:false,privateRegions:null,popRightClick:false,videoMuted:true,overlayTop:false,highRegion:{lineOpt:null,focusOpt:false}};for(var kx in T){if(T.hasOwnProperty(kx)){this.config[kx]=T[kx];if(kx==="fixCenterWhenResize"){this.config.enableResizeOnCenter=T[kx]}}}if(T.style){if(T.style["styleId"]&&T.style["styleId"].length<32){this.config.style=T.style["styleId"]}else{this.config.style=T.style}}this._setTextRenderType();this._displayOptions={poi:true,poiText:true,poiIcon:true,overlay:true,layer:true,building:true,indoor:true,street:true,skyColors:["rgba(226, 237, 248, 0)","rgba(186, 211, 252, 1)"],isFlat:false,labelMargin:0,buildingSideGradation:false};if(T.displayOptions){for(var i in T.displayOptions){if(T.displayOptions.hasOwnProperty(i)){this._displayOptions[i]=T.displayOptions[i]}}}this._spotOptions={open:false,gray:false,involve:1,focus:0,other:7156516};if(T.focusOptions){for(var e in T.focusOptions){if(T.focusOptions.hasOwnProperty(e)){this._spotOptions[e]=T.focusOptions[e]}}}if(this.config.restrictCenter===false){this._enableTiltZoom=0;this._enableHeadingZoom=0}},getMinZoom:function(){var T;if(eu[this.mapType][this._renderType]){T=eu[this.mapType][this._renderType].minZoom}else{T=eu[this.mapType].minZoom}if(this.config.minZoom!==null&&this.config.minZoom>=T){T=this.config.minZoom}if(this.mapType==="B_EARTH_MAP"){return T}var i=this.getSize();var e=this.worldSize(T);while(ee){kx=true;T=e}if(this._renderType!=="webgl"){T=Math.round(T)}return{zoom:T,exceeded:kx}},getContainer:function(){return this.container},getZoomUnits:function(T){if(this.mapType===BMAP_EARTH_MAP){return Math.pow(2,18-this._earth.getImageZoom())}var e=eu[this.mapType];if(typeof e!=="object"){return null}var i=T||this.zoomLevel;return Math.pow(2,(e.zoomLevelBase-i))},pointToPixelIn:function(kG,kI){if(!kG){return}kI=kI||{};if(this.mapType===BMAP_EARTH_MAP){var kx;if(!kG._llPt){kx=jt.convertMC2LL(kG);kG._llPt=kx}kx=kG._llPt;var kC=null;var T=null;if(typeof kI.zoom==="number"){var kF=this._earth;var kH=kF._getEarthZoomByImgZoom(kI.zoom);if(kH<=3){kC=kF._generateTmpPMatrix(kH)}T=kF._generateTmpMVMatrix(kF.getCenter(),kH)}var ky=this._earth.fromLatLngToPixel(kx,{useRound:false,isCalcOnBack:true,matrixInfo:{modelViewMatrix:T,projectionMatrix:kC}});return ky}if((this._heading%360===0&&this._tilt===0)||!this._webglMapCamera){var kE=this.getZoomUnits(kI.zoom);var kA=kI.center||this.centerPoint;var i=this.width/2;var kz=this.height/2;var kD=(kG.lng-kA.lng)/kE+i;var kB=(kA.lat-kG.lat)/kE+kz;if(kI.useRound!==false){kD=Math.round(kD);kB=Math.round(kB)}return new ft(kD,kB)}var e=this._webglMapCamera.fromMCToScreenPixel(kG.lng,kG.lat,kI);if(kI.useRound===false){return e}e.x=Math.round(e.x);e.y=Math.round(e.y);return e},pixelToPointIn:function(e,kE){if(!e){return}kE=kE||{};if(this.mapType===BMAP_EARTH_MAP){if(typeof kE.zoom==="number"){var kC=this._earth;var kz=null;var T=null;var kD=kC._getEarthZoomByImgZoom(kE.zoom);if(kD<=3){kz=kC._generateTmpPMatrix(kD)}T=kC._generateTmpMVMatrix(kC.getCenter(),kD)}var i=this._earth.fromPixelToLatLng(e,{matrixInfo:{modelViewMatrix:T,projectionMatrix:kz}});if(i===null){return null}return jt.convertLL2MC(i)}if((this._heading%360!==0||this._tilt>0)&&this._webglMapCamera){return this._webglMapCamera.fromScreenPixelToMC(e.x,e.y,kE)}var kA=kE.center||this.centerPoint;var kB=this.getZoomUnits(kE.zoom);var ky=kA.lng+kB*(e.x-this.width/2);var kx=kA.lat-kB*(e.y-this.height/2);return new cF(ky,kx)},pointToOverlayPixelIn:function(e,kx){kx=kx||{};var T=this.pointToPixelIn(e,{zoom:kx.zoom,center:kx.center,forLabel:true,frustumTest:true,useRound:kx.useRound});if(!T){return}if(kx.fixPosition&&this.mapType!=="B_EARTH_MAP"){var ky=this.getSize();var i=this.worldSize(kx.zoom);if(T.x>ky.width){while(T.x>ky.width){T.x-=i}}else{if(T.x<0){while(T.x<0){T.x+=i}}}}if(this._renderType==="webgl"){return T}T.x-=this.offsetX;T.y-=this.offsetY;return T},overlayPixelToPointIn:function(i,e){if(!i){return}var T=i.clone();if(this._renderType!=="webgl"){T.x+=this.offsetX;T.y+=this.offsetY}return this.pixelToPointIn(T,e)},getProjection:function(){return new jt()},lnglatToMercator:function(e,kx){var i=new cF(e,kx);var T=jt.convertLL2MC(i);return[T.lng,T.lat]},mercatorToLnglat:function(i,e){if(isNaN(i)||isNaN(e)){return[]}i=parseFloat(i);e=parseFloat(e);var kx=new cF(i,e);var T=jt.convertMC2LL(kx);return[T.lng,T.lat]},getBoundsIn:function(){if(!this._bounds){return}var kK=arguments[0];if(this.mapType===BMAP_EARTH_MAP&&this._earth){var kE=this._earth.getCustomBounds();if(!kE){return this.config.defaultMaxBounds}var kD=kE.getSouthWest();var e=kE.getNorthEast();if(kD.lng>e.lng){e.lng=180}var k1=jt.convertLL2MC(kD);var kR=jt.convertLL2MC(e);var kH=this.config.defaultMaxBounds;var kQ=Math.max(k1.lng,kH.sw.lng);var kP=Math.max(k1.lat,kH.sw.lat);var kJ=Math.min(kR.lng,kH.ne.lng);var kI=Math.min(kR.lat,kH.ne.lat);var kM=new ih(new cF(kQ,kP),new cF(kJ,kI));kM.pointBottomLeft=new cF(kQ,kP);kM.pointBottomRight=new cF(kJ,kP);kM.pointTopLeft=new cF(kQ,kI);kM.pointTopRight=new cF(kJ,kI);kM.setMinMax();kM.makeNormalizedPoint(this._earth.getHeading());return kM}kK=kK||{};var ky=kK.margins||[0,0,0,0];var kW=this.pixelToPointIn({x:ky[3],y:this.height-ky[2]},kK);var k0=this.pixelToPointIn({x:this.width-ky[1],y:ky[0]},kK);var kO=typeof kK.heading==="number"?kK.heading:(this._heading%360);var T=typeof kK.tilt==="number"?kK.tilt:this._tilt;var kG=this._webglMapCamera;if((kO===0&&T===0)||!kG){this._bounds.setSouthWest(kW);this._bounds.setNorthEast(k0);this._bounds.pointBottomLeft=kW;this._bounds.pointBottomRight=new cF(k0.lng,kW.lat);this._bounds.pointTopRight=k0;this._bounds.pointTopLeft=new cF(kW.lng,k0.lat);this._bounds.setMinMax();this._bounds.makeNormalizedPoint(kO);return this._bounds}var kN=this.pixelToPointIn({x:ky[3],y:ky[0]},kK);var kx=kG.getPosition();var k2=Math.sqrt(Math.pow(kN.lng-kx[0],2)+Math.pow(kN.lat-kx[1],2));var kX=this.getZoomUnits();var k4=k2/kX;var kU=kG._frustumSideLen;var kC=kG._fovy;if(k4>kU||(90-T)kA){kA=kT[kY].lng}if(kT[kY].latkF){kF=kT[kY].lat}}this._bounds.setSouthWest(new cF(kZ,k5));this._bounds.setNorthEast(new cF(kA,kF));this._bounds.pointTopLeft=kN;this._bounds.pointTopRight=k0;this._bounds.pointBottomRight=kL;this._bounds.pointBottomLeft=kW;this._bounds.makeNormalizedPoint(kO);this._bounds.setMinMax();return this._bounds},isLoaded:function(){return !!this.loaded},_getBestLevel:function(i,kG){var kz=0;if(this._renderType==="webgl"&&!b4()){kz=100}var kA=kG.margins||[10,10,10,10];var kx=kG.zoomFactor||0;var kB=kA[1]+kA[3];var ky=kA[0]+kA[2];var e=this.getMinZoom();var kF=this.getMaxZoom();var kE=i.toSpan();var kD=kE.width/(this.width-kB-kz);var kC=kE.height/(this.height-ky-kz);var T=18-r(Math.max(kD,kC));if(TkF){T=kF}T+=kx;if(this._renderType!=="webgl"){T=Math.floor(T)}return T},getViewportIn:function(kG,ky){if(this.mapType===BMAP_EARTH_MAP){kG=kG||[];var kA=[];for(var kH=0;kH=0;kF--){kB.extend(kz[kF])}if(kB.isEmpty()){return kC}}var kL=kB.getCenter();var e=this._getBestLevel(kB,ky);if(ky.margins){var T=ky.margins;var kK=(T[1]-T[3])/2;var kD=(T[0]-T[2])/2;var kJ=this.getZoomUnits(e);kL.lng=kL.lng+kJ*kK;kL.lat=kL.lat+kJ*kD}return{center:kL,zoom:e}},setViewportIn:function(kx,ky){if(this.mapType===BMAP_EARTH_MAP){var kC;if(kx&&kx.center){var T=jt.convertMC2LL(kx.center);var kA=this._earth._getEarthZoomByImgZoom(kx.zoom,T);kC={center:T,zoom:kA}}else{kC=[];for(var kz=0;kzh2.MAX_DRAG_TILT_L2){i.setTilt(h2.MAX_DRAG_TILT_L2,{callback:function(){i._changeEarthMapType(e)}})}else{i._changeEarthMapType(e)}},_changeEarthMapType:function(T){var kx=this;var kA=kx.tileMgr.tileLayers;if(this._mapTypeChangAni){this._mapTypeChangAni.stop()}var kz;if(this._earth){kz=this._earth.getEarthCanvas()}if(!this._earth){this.maskLayer.style.opacity=1;this.maskLayer.style.zIndex=999;this.maskLayer.style.background="#000"}this._mapTypeChangAni=new fJ({duration:400,render:function(e){if(!kx._earth){return}kz.style.opacity=e},finish:function(){for(var e=kA.length-1,kB=e;kB>=0;kB--){var kD=kA[kB].tilesDiv;if(kD){kD.style.visibility="hidden"}if(kA[kB]._isInnerLayer&&kx._renderType!=="webgl"){kx.removeTileLayer(kA[kB])}}kx._mapTypeChangAni=null;kx._mapTypeChanging=false;function kC(){var kH=kx.getZoom()-2;var kI=kx.getCenterIn();var kF=jt.convertMC2LL(kI);kx._earth=new bF.Earth(kx,{center:kF,zoom:kH,showRealSunlight:kx.config.showRealSunlight,showMilkyway:kx.config.showMilkyway,earthBackground:kx.config.earthBackground});if(kx.config&&kx.config.earthMaxZoom&&kx._earth){kx._earth.setMaxZoom(kx.config.earthMaxZoom)}if(kx.config&&kx.config.earthMinZoom&&kx._earth){kx._earth.setMinZoom(kx.config.earthMinZoom)}kx._proxyEarthEvents();var kE=kx.mapType;kx.mapType=T;var kG=new fU("onmaptypechange");kG.zoomLevel=this.zoomLevel;kG.mapType=T;kG.exMapType=kE;kx.dispatchEvent(kG);kx._setMapTypeStatus(T);e8.extend(kx,bF.EarthView.prototype);if(!kx._navigationCtrl&&kx.config.showControls){kx._navigationCtrl=new fa(kx)}}if(!kx._earth){if(bF["FeatureStyle"+kx.config.style]){kC()}else{kx.loadMapStyleFiles(function(){kC()})}}if(parseInt(kx.maskLayer.style.opacity,10)===1){setTimeout(function(){kx.maskLayer.style.zIndex=9;kx.maskLayer.style.opacity=0},1000)}}});if(!this._earth){return}var i=this.mapType;this.mapType=T;var ky=new fU("onmaptypechange");ky.zoomLevel=this.zoomLevel;ky.mapType=T;ky.exMapType=i;this.dispatchEvent(ky);kx._setMapTypeStatus(T);e8.extend(kx,bF.EarthView.prototype)},getMapStyleId:function(){if(typeof this.config.style==="string"){return this.config.style}return this.config.mapStyleId||"custom"},getAreaStyleId:function(){return this.config.areaStyleId||"areaStyle"},_printLog:function(e){var i;switch(e){case"mapvgl":i=249;break;case"mapvthree":i=248;break;case"bmapdraw":i=247;break;default:break}if(i){hN.sendMessage(a1(4,i),[e])}},_setMapTypeStatus:function(T){var kB=arguments[1];if(T===BMAP_EARTH_MAP){var kz=this._earth.getEarthCanvas();if(kz){kz.style.display=""}var kC={noAnimation:true};if(this.earthMinZoom){this._earth.setMinZoom(this.earthMinZoom);this.earthMinZoom=undefined}if(this.earthMaxZoom){this._earth.setMaxZoom(this.earthMaxZoom);this.earthMaxZoom=undefined}this._earth.setCenter(jt.convertMC2LL(this.centerPoint),kC);this._earth.setImageZoom(this.zoomLevel,kC);this._earth.setTilt(this.getTilt(),kC);this._earth.setHeading(this.getHeading(),kC)}else{if(this.preMapType===BMAP_EARTH_MAP&&this._earth){var kA=this._earth;var kx=kA.getMapZoom();var ky=kA._imageRawZoom||kx;var i=ky-kx;var e=kA.getCenter();if(this._renderType==="webgl"){this._tilt=kA.getTilt();if(this.zoomLevel>7){this._heading=kA.getHeading();kB&&kB(e,kx);return}if(kA.getHeading()!==0){kA.setTilt(this.getTilt());kA.setHeading(this.getHeading(),{callback:function(){kB&&kB(e,kx)}})}else{kB&&kB(e,kx)}return}if(i<0.1&&kA.getTilt()===0&&kA.getHeading()===0){kB&&kB(e,kx);return}kA.setTilt(0);kA.setHeading(0);kA.setZoom(kA.getZoom()-i,{callback:function(){kB&&kB(e,kx)}})}}},_proxyEarthEvents:function(){var ky=this;var kz=this._earth;kz.on("tilesload",function(i){ky.fire(i)});kz.on("centerandzoom",function(i){ky.dispatchEvent(new fU("onmoveend"));ky.dispatchEvent(new fU("onzoomend"))});function kx(i){ky.fire(i)}var e=["zoomstart","zoomend","tilesload","sunlighttime_change","sunlighttime_clear","centerandzoom","animation_start","animation_stop","movestart","moveend","moving","dragstart","dragend","dragging"];for(var T=0;T=3?e:3},setEarthMinZoom:function(e){var i=e-2>=1?e-2:1;if(this.mapType==="B_EARTH_MAP"){this._earth.setMinZoom(i);this.earthMinZoom=undefined;return}this.earthMinZoom=i},setCenterIn:function(e,i){i=i?i:{};i.tilt=i.tilt?i.tilt:this.getTilt();i.heading=i.heading?i.heading:this.getHeading();this.panToIn(e,i)},getRenderType:function(){return this._renderType},getSolarInfo:function(kx){kx=kx||this._initDate;var T=fG(kx);var e=jt.convertLL2MC(new cF(T[0],T[1]));var kF=e.latLng;var kA=bF.Projection.convertMC2LL(this.centerPoint);var kC=kx.getUTCHours();var kE=kC+24*kA.lng/360;var kD=kE-12;var kB=kD*60*0.25;var kz=Math.asin(Math.sin(iU(kA.lat))*Math.sin(iU(kF.lat))+Math.cos(iU(kA.lat))*Math.cos(iU(kF.lat))*Math.cos(iU(kB)));var ky=Math.asin(Math.sin(iU(kB))*Math.cos(iU(kF.lat))/Math.cos(kz));var i="north";if(kA.lat=19){return h2.MAX_DRAG_TILT}else{if(e<=18){if(e=this._enableTiltZoom-2){return(1-(this._enableTiltZoom-e)/2)*h2.MAX_DRAG_TILT_L2}return 0}return h2.MAX_DRAG_TILT_L2}else{return(h2.MAX_DRAG_TILT-h2.MAX_DRAG_TILT_L2)*(e-18)+h2.MAX_DRAG_TILT_L2}}},worldSize:function(i){var e=i||this.zoomLevel;return h2.WORLD_SIZE_MC/this.getZoomUnits(e)},setTrafficOn:function(e){if(e&&Number(e)>1){jY.setZIndex(Number(e))}hN.sendMessage(a1(4,3,3),["layer","traffic"]);this.addTileLayer(jY)},setTrafficOff:function(){this.removeTileLayer(jY)},showOverlayContainer:function(){this.setDisplayOptions({overlay:true})},hideOverlayContainer:function(){this.setDisplayOptions({overlay:false})},addLabelsToMapTile:function(kA,kz){hN.sendMessage(a1(4,1,4),["instance","custom_label"]);for(var kx=0;kx"-1"){g1.load(kA)}else{if(bF["customStyleInfo_"+kJ]){bF["customStyleInfo_"+kJ].xhr=ip.post(kA,kF,window["styleCbk_"+kJ],function(){kx.fire(new fU("onstyle_loaded_error"))},function(){kx.fire(new fU("onstyle_loaded_timeout"))})}}})}else{if(kA.indexOf("jsonp")>"-1"){g1.load(kA)}else{if(bF["customStyleInfo_"+kJ]){bF["customStyleInfo_"+kJ].xhr=ip.post(kA,kF,window["styleCbk_"+kJ],function(){kx.fire(new fU("onstyle_loaded_error"))},function(){kx.fire(new fU("onstyle_loaded_timeout"))})}}}})}},getFeatureStyleTags:function(){var e=[];var ky=Object.keys(bF);for(var kx=0;kx-1&&bF[T]){e.push(T)}}return e},setCopyrightOffset:function(kx,i){var T=new fU("oncopyrightoffsetchange",{logo:kx,cpy:i});this.dispatchEvent(T)},_setTextRenderType:function(e){if(e){this.config.textRenderType=e;return}if(this.config.textRenderType!==null){return}if(b4()){this.config.textRenderType="canvas"}else{if(typeof this.config.style==="string"){this.config.textRenderType="image"}else{this.config.textRenderType="canvas"}}},destroy:function(){this._destroyed=true;this.disableAutoResize();this.fire(new fU("ondestroy"));var e=this.config.mapStyleId||0;delete bF["customStyleInfo_"+e];delete bF["FeatureStyle"+e];bF.BMAP_INSTANCES&&(bF.BMAP_INSTANCES-=1);if(!bF.BMAP_INSTANCES){this.destroyStyle()}this.config={};this.clearSpots();this._webGLStateId&&d4.WebGLState.remove(this._webGLStateId);this.container.onselectstart=null;this.container.style.backgroundImage="";this.maskLayer=null;this.platform=null;hN.kill();jc.kill();var i=this;setTimeout(function(){i._listeners=null;i._bounds=null;i.tileLabels=[];i._overlayMgrGL=null;i._overlayMgr=null;i._mapIcon=null;if(i._mouse){i._mouse._drag=null;i._mouse=null}i.deepZoom=null;i.tileMgr=null;i.indexToRgb=null;i.toFormatCoords=null;i._webglMapCamera=null;i._normalLayerMgr=null;i._webglPainter=null;i._webglMapScene=null;i._indoorMgr=null;if(i._renderType==="webgl"){i._spotsMgr=null;i._workerMgr=null;i.jobScheduler=null;i.benchmark=null;i._featureMgr=null;i._labelProcessor=null;i._customLabelMgr=null}if(i.cpyCtrl){i.cpyCtrl._map=null;i.cpyCtrl=null}i.logoCtrl=null;i._spotDataOnCanvas=null;i._navigationCtrl=null;i.container.innerHTML="";if(!bF.BMAP_INSTANCES){window.FeatureStyle=null;window.iconSetInfo_high=null;window.indoorStyle=null;window._indoorMgr=null}},600)},destroyStyle:function(){var e=[];var ky=Object.keys(bF);for(var kx=0;kx-1||T.indexOf("iconSetInfo")>-1||T.indexOf("indoorStyle")>-1){e.push(T)}}for(var kx=0;kx"-1"){g1.load(ky)}else{bF["customStyleInfo_"+kG].xhr=ip.post(ky,kD,window["styleCbk_"+kG])}});var e={};if(i.area){e.area=i.area.map(function(ky){return jt.convertLL2MC(ky)})}e.customArea=true;this._workerMgr.setWorkerConfig(e)}});window.BMAP_NORMAL_MAP="B_NORMAL_MAP";window.BMAPGL_NORMAL_MAP="B_NORMAL_MAP";window.BMAP_SATELLITE_MAP="B_SATELLITE_MAP";window.BMAP_HYBRID_MAP="B_STREET_MAP";window.BMAP_EARTH_MAP="B_EARTH_MAP";window.BMAP_NONE_MAP="B_NONE_MAP";window.BMAP_COORD_MERCATOR=1;window.BMAP_COORD_GCJ02=2;window.BMAP_SYS_DRAWER=0;window.BMAP_SVG_DRAWER=1;window.BMAP_VML_DRAWER=2;window.BMAP_CANVAS_DRAWER=3;var w={environment:"jsapi",map:null,ontilesloaded:false,onstyle_loaded:false,init:function(i){var e=this;e.map=i;this.changeCopyright();this.setEnvironment(e.map.config.style);this.resetEventListener()},resetEventListener:function(){var e=this;this.ontilesloaded=false;this.onstyle_loaded=false;e.map.addEventListener("ontilesloaded",e.checkLoadedStatus);e.map.addEventListener("onstyle_loaded",e.checkLoadedStatus)},checkLoadedStatus:function(i){w[i.type]=true;if(w.ontilesloaded&&w.onstyle_loaded){this.dispatchEvent(new fU("onstylechangetilesloaded"));this.removeEventListener("ontilesloaded",w.checkLoadedStatus);this.removeEventListener("onstyle_loaded",w.checkLoadedStatus)}},changeCopyright:function(){var e=this;if(e.map.cpyCtrl){e.map.cpyCtrl.hide();if(e.environment!=="customEditor"){e.map.setCopyrightOffset(new jk(1,1))}}else{e.map.addEventListener("oncopyrightaddend",function(){e.map.cpyCtrl.hide();if(e.environment!=="customEditor"){e.map.setCopyrightOffset(new jk(1,1))}})}},setEnvironment:function(e){if(e.customEditor){this.environment="customEditor";a2.map=this.map}else{if(e.sharing){this.environment="sharing"}else{if(e.preview){this.environment="preview"}else{this.environment="jsapi"}}}},getStyleJson:function(kx,kz){var ky=this;if(kx.styleJson){kz&&kz(kx.styleJson)}else{if(kx.styleId){var i=kx.styleId;var e=(Math.random()*100000).toFixed(0);bF["_cbk_si_phpui"+e]=function(kB){var kA=[];if(kB.result&&kB.result["error"]===0&&kB.content&&kB.content["status"]===0){kA=ky.parseJson(kB.content["data"]["json"]);kz&&kz(kA)}else{kz&&kz("default")}};bF["_cbk_si_api"+e]=function(kB){var kA=[];if(kB.status===0){if(kB.info){kA=ky.parseJson(kB.info["json"])}else{kA=ky.parseJson(kB.data["json"])}kz&&kz(kA)}else{kz&&kz("default")}};var T="";switch(this.environment){case"jsapi":T=eF.apiHost+"/?qt=custom_map&v=3.0&style_id="+i+"&type=publish&ak="+eY;T+="&callback="+fD+"._cbk_si_phpui"+e;break;case"sharing":T+="/apiconsole/custommap/getSharingJson";T+="?styleid="+i+"&type=edit";T+="&ck="+fD+"._cbk_si_api"+e;break;case"preview":T+="/apiconsole/custommap/getJson";T+="?styleid="+i+"&type=edit";T+="&ck="+fD+"._cbk_si_api"+e;break}g1.load(T)}else{kz&&kz("default")}}},parseJson:function(T){if(T===null||T===""){return[]}var i={t:"featureType",e:"elementType",v:"visibility",c:"color",o:"opacity",l:"lightness",s:"saturation",w:"weight",z:"level",h:"hue",f:"fontsize",zri:"curZoomRegionId",zr:"curZoomRegion",i:"image"};var ky={all:"all",g:"geometry","g.f":"geometry.fill","g.s":"geometry.stroke",l:"labels","l.t.f":"labels.text.fill","l.t.s":"labels.text.stroke","l.t":"labels.text","l.i":"labels.icon","g.tf":"geometry.topfill","g.sf":"geometry.sidefill",t:"texture"};var kx=T.split(",");var e=kx.map(function(kC){var kB=kC.split("|").map(function(kI){var kG=i[kI.split(":")[0]];var kF=ky[kI.split(":")[1]]?ky[kI.split(":")[1]]:kI.slice(kI.indexOf(":")+1,kI.length);switch(kF){case"poi":kF="poilabel";break;case"districtlabel":kF="districtlabel";break}var kH={};kH[kG]=kF;return kH});var kz=kB[0];var kE=1;if(kB[1]["elementType"]){kE=2;e8.extend(kz,kB[1])}var kD={};for(var kA=kE;kA2){kI.push(kz.join("|"))}}return kI.join(",")},getFrontZoom:function(i,e){var T=i.stylers["level"];if(T===undefined){return"main"}else{return parseInt(T,10)}},isZoomConfig:function(e){var i=e.stylers["level"];if(i===undefined){return false}else{return true}},isOnlyZoomStyler:function(e){var i={};e8.extend(i,e.stylers);delete i.curZoomRegionId;delete i.curZoomRegion;delete i.level;if(e8.isEmptyObject(i)){return true}else{return false}},isSelectZoom:function(i,e){var T=i.stylers["level"];if(T===undefined){return true}else{if(T===e+""){return true}else{return false}}},isEditorZoomKeys:function(e){var i={curZoomRegionId:true,curZoomRegion:true};if(i[e]){return true}else{return false}},getZoomRegion:function(e,i){var kx=e.stylers["level"];var T={};e8.extend(T,i);if(kx===undefined){return T}else{T[parseInt(kx,10)]=true;return T}},onStyleDataBack:function(ky,e,i,kx,kA,T){if(ky.status!==0){return}if(ky.data.style.length===3){if(!T.baseFs){T.baseFs=ky.data.style}bF.StyleBody=ky.data.style[2]}else{bF.StyleBody=ky.data.style}var kz=T.baseFs;bF["FeatureStyle"+i]=kz;this.updateFrontFeatureStyle(T)},updateFrontFeatureStyle:function(T){if(T.zoomFrontStyle.main["bmapRoadarrowVisibility"]){for(var e=this.map.getMinZoom();e<=this.map.getMaxZoom();e++){if(!T.zoomFrontStyle[e]["bmapRoadarrowVisibility"]){T.zoomFrontStyle[e]["bmapRoadarrowVisibility"]=T.zoomFrontStyle.main["bmapRoadarrowVisibility"]}}}}};var a2={map:null,labelCache:{},calcDrawMc:function(T,i,e){var kx=[];switch(i){case"fill":kx=this.calcFill(T,e);break;case"line":break;case"building3d":kx=this.calcBuilding3d(T,e);break}return kx},calcFill:function(ky,T){var kz=[];for(var kx=0;kx0){kB=ky.verticesLength[T-1]}end=ky.verticesLength[T];var kz=[];var kx="";if(ky.vertex){kz=ky.vertex;kx="building3d"}else{if(ky.data[0]){kz=ky.data[0];kx=ky.type}else{continue}}var kA=this.calcDrawMc(kz.slice(kB,end),kx,e);this.map.addAreaSpot(kA,{userData:{styleId:ky.styleIds[T],type:"mapstyle"}})}},addLabelIntoAreaSpots:function(e){if(w.environment!=="customEditor"){return}for(var ky=0;kykA){return kA}while(kBT){kB=ky}else{kA=ky}ky=(kA-kB)*0.5+kB}return ky};ct.prototype.solve=function(e,i){return this.sampleCurveY(this.solveCurveX(e,i))};var gP={};function fJ(T){var e={duration:1000,fps:30,delay:0,transition:gP.linear,dropLastAnimation:false};if(T){for(var kx in T){e[kx]=T[kx]}}if(T.beginTime){this._beginTime=T.beginTime}this._callbacks=[];this._options=e;if(e.delay){var ky=this;setTimeout(function(){ky._doStart()},e.delay)}else{this._doStart()}this._pauseTime=0}fJ.INFINITE="INFINITE";fJ.prototype._doStart=function(){if(this._isPausing){var e=performance.now()||new Date().getTime();this._pauseTime+=e-this._isPausing;this._isPausing=undefined}if(window.requestAnimationFrame){var i=this;i._timer=window.requestAnimationFrame(function(T){i._loop(T)})}else{this._beginTime=new Date().getTime();if(this._options.duration===fJ.INFINITE){this._endTime=null}else{this._endTime=this._beginTime+this._options.duration}this._loop()}};fJ.prototype._loop=function(kx){var kA=this;kx=kx||new Date().getTime();kx=kx-this._pauseTime;if(!this._beginTime){this._beginTime=kx}if(!this._endTime&&typeof this._options.duration==="number"){this._endTime=this._beginTime+this._options.duration}if(kA._endTime!==null&&kx>=kA._endTime){if(kA._options.dropLastAnimation===false){kA._options.render(kA._options.transition(1),1,kx)}if(typeof kA._options.finish==="function"){kA._options.finish(kx,this)}for(var kz=0,e=kA._callbacks.length;kz=ky.percentage&&kx0){i.unselectable="on";i.selectstart=function(){return false};i.onmousedown=function(T){T.preventDefault();return false}}else{var e=ko(i);e.MozUserSelect="none";e.WebkitUserSelect="none";i.addEventListener("mousedown",function(T){T.preventDefault()},false)}}function aV(e){return e&&e.parentNode&&e.parentNode.nodeType!==11}function bR(i,e){i.insertAdjacentHTML("beforeEnd",e);return i.lastChild}function fZ(T,i){var kx=document.createElement("div");kx.innerHTML=i;var e=kx.childNodes[0];return T.parentNode.insertBefore(e,T)}function al(i){i=i||window.event;i.stopPropagation?i.stopPropagation():i.cancelBubble=true}function d(i){i=i||window.event;i.preventDefault?i.preventDefault():i.returnValue=false;return false}function hF(i){al(i);return d(i)}function g8(){var e=document.documentElement;var i=document.body;if(e&&(e.scrollTop||e.scrollLeft)){return[e.scrollTop,e.scrollLeft]}else{if(i){return[i.scrollTop,i.scrollLeft]}else{return[0,0]}}}function iH(ky){if(!ky){return}ky.onload=ky.onerror=null;var T=ky.attributes,kx,e,kz;if(T){e=T.length;for(kx=0;kx=e){return eE(kC,ky)}var i=kz/e;var kB=T.lng+(ky.lng-T.lng)*i;var kA=T.lat+(ky.lat-T.lat)*i;const kx={lng:kB,lat:kA};return eE(kC,kx)}function fl(T,i){var e=Math.round((T.x+i.x)/2);var kx=Math.round((T.y+i.y)/2);return new ft(e,kx)}function jE(e,T){var i=[];T=T||function(ky){return ky};for(var kx in e){i.push(kx+"="+T(e[kx]))}return i.join("&")}function b5(T,i,kz){var kA=document.createElement(T);if(kz){kA=document.createElementNS(kz,T)}i=i||{};for(var kx in i){var ky={"for":"htmlFor","class":"cssClass"}[kx]||kx;if(kx==="style"){kA.style.cssText=i[kx];continue}if(kx==="class"){e8.ac(kA,i[kx]);continue}if(kA.setAttribute){kA.setAttribute(ky,i[kx])}else{try{kA[ky]=i[kx]}catch(kA){}}}return kA}function cp(e){if(e.currentStyle){return e.currentStyle}else{if(e.ownerDocument&&e.ownerDocument.defaultView){return e.ownerDocument.defaultView.getComputedStyle(e,null)}}}function bZ(e){return typeof e==="function"}function gq(e){return e===void 0}function jV(e,i){return Object.prototype.hasOwnProperty.call(e,i)}function h(ky,kz){if(gq(ky.length)){for(var kx in ky){if(jV(ky,kx)){kz.call(null,kx,ky[kx])}}}else{var T=ky.length;if(T){for(var e=0;e>4);kD=((kC&15)<<4)|(kA>>2);kB=((kA&3)<<6)|kz;T=T+String.fromCharCode(kF);if(kA!==64){T=T+String.fromCharCode(kD)}if(kz!==64){T=T+String.fromCharCode(kB)}kF=kD=kB="";kE=kC=kA=kz=""}while(kx-1||e.indexOf("iPad")>-1){return true}return false}function ia(){var e=navigator.userAgent;if(e.indexOf("Android")>-1){return true}return false}function iU(e){return e*Math.PI/180}function fk(e){return e/Math.PI*180}function bJ(e,ky){var kx=Math.pow(10,ky);if(typeof e==="number"){return Math.round(e*kx)/kx}for(var T=0;Te){T=e}}return T}function ep(e,i){while(e<0){e+=i}return e%i}function h7(i,e){return(i>=0&&e>=0)||(i<0&&e<0)}function O(i){if(i._gl){return i._gl}var e={alpha:true,antialias:false,failIfMajorPerformanceCaveat:false,preserveDrawingBuffer:false,stencil:false};var T=i.getContext("webgl",e)||i.getContext("experimental-webgl",e);i._gl=T;return T}function iR(kx,T){for(var e=0;ekx||T.lati){return false}return true}function js(kB,kA,kz,kx){var ky=Y(kz,kx,kB);var T=Y(kz,kx,kA);var i=Y(kB,kA,kz);var e=Y(kB,kA,kx);if(ky*T<0&&i*e<0){return true}else{if(ky===0&&jh(kz,kx,kB)){return true}else{if(T===0&&jh(kz,kx,kA)){return true}else{if(i===0&&jh(kB,kA,kz)){return true}else{if(e===0&&jh(kB,kA,kx)){return true}else{return false}}}}}}function hV(T,i){var e=i.parentNode;if(e.lastChild===i){e.appendChild(T)}else{e.insertBefore(T,i.nextSibling)}}function d1(kD,kE){if(kE===0){return kD}var kC=0;var kA=0;if(!kD){throw"异常"}if(kD.length===0){return[]}for(var ky=1,T=kD.length-1;kykC){kA=ky;kC=kB}}var e=[];if(kC>=kE){var kG=kD.slice(0,kA);var kF=kD.slice(kA,kD.length);var kz=d1(kG,kE);var kx=d1(kF,kE);for(var ky=0,T=kz.length;ky=0){kx=Math.floor(T/65536)*65536;i=kx;e=T-kx}else{kx=Math.floor(-T/65536)*65536;i=-kx;e=T+kx}return[i,e]}function cM(e){if(e.lng>=0&&e.lat>=0){return new cF(e.lng-10000000,e.lat-6000000)}if(e.lng>=0&&e.lat<0){return new cF(e.lng-10000000,e.lat+6000000)}if(e.lng<0&&e.lat>=0){return new cF(e.lng+10000000,e.lat-6000000)}if(e.lng<0&&e.lat<0){return new cF(e.lng+10000000,e.lat+6000000)}}var iv=null;if(window.performance&&window.performance.now){iv=function(){return performance.now()}}else{if(Date.now){iv=function(){return Date.now()}}else{iv=function(){return(new Date).getTime()}}}function h6(kx,e,i){var T="mouseWheel";if(e8.Platform.macintosh){if(!isNaN(kx)&&(kx<10||kx!==120)&&(e%1===0&&e<5)){T="padScroll"}if(e8.Browser.firefox&&(e%1===0&&e<5&&i===0)){T="padScroll"}}if(e8.Browser.safari&&kx===12){T="mouseWheel"}return T}function bS(kG,kB){var kF=kG[0];var kE=kG[1];var kx=false;for(var kA=0,kz=kB.length-2;kAkE)!==(T>kE))&&(kF<(kC-kD)*(kE-ky)/(T-ky)+kD);if(e){kx=!kx}kz=kA}return kx}function aw(ky,kA){kA=kA||[];var e=kA.length;var T=0;var kz=false;for(var kx=0;kx=kA[kx].lat)&&(ky.lat=kA[T].lat)&&(ky.lati){T=Math.pow(T-i+1,kx)+i-1}else{if(Tthis.ll.lng&&e.lngthis.ll.lat&&e.lathB){return aB}return fF};hK.prototype.normalize=function(i,kx,e,T){if(i>e){this.ll.lng=e;this.ru.lng=i}else{this.ll.lng=i;this.ru.lng=e}if(kx>T){this.ll.lat=T;this.ru.lat=kx}else{this.ll.lat=kx;this.ru.lat=T}};function eG(i,kx,e,T){this.sp={lng:i,lat:kx};this.ep={lng:e,lat:T};this.mbr=new hK(i,kx,e,T)}function ix(kx,e,kz,ky){for(var T=0;T=e[T]&&kx.lng<=e[T+1]&&kx.lat>=kz[T]&&kx.lat<=kz[T+1]){return true}}return false}function gx(kC){var i=kC.lng;var kB=kC.lat;var kx=Math.sqrt(i*i+kB*kB);var kz=Math.atan2(kB,i);var T=kx+gJ(kB);var ky=kz+gI(i);var e=T*Math.cos(ky);var kA=T*Math.sin(ky);return{lng:e+hY,lat:kA+hX}}function a5(kC){var i=kC.lng-hY;var kB=kC.lat-hX;var kx=Math.sqrt(i*i+kB*kB);var kz=Math.atan2(kB,i);var T=kx-gJ(kB);var ky=kz-gI(i);var e=T*Math.cos(ky);var kA=T*Math.sin(ky);return{lng:e,lat:kA}}function gJ(e){return Math.sin(e*fS*je)*g7}function gI(e){return Math.cos(e*fS*je)*g6}function av(T,i,e){return((i.lng-T.lng)*(e.lat-T.lat)-(e.lng-T.lng)*(i.lat-T.lat))}function h3(i,e){return Math.abs(i-e)<=hB}function gQ(kx,T){var i=kx.lat*je;var kC=kx.lng*je;var e=T.lat*je;var kB=T.lng*je;var kz=Math.cos(i)*Math.cos(e);var ky=Math.cos(kC)*Math.cos(kB);var kE=Math.sin(i)*Math.sin(e);var kD=Math.sin(kC)*Math.sin(kB);var kF=kz*ky+kz*kD+kE;if(kF<-1){kF=-1}else{if(kF>1){kF=1}}var kA=Math.acos(kF)*iW;return kA}function l(kB,kA){var i=kB.lat*je;var e=kA.lat*je;var kx=kB.lng*je;var T=kA.lng*je;var kz=i-e;var ky=kx-T;var kC=Math.sin(kz/2)*Math.sin(kz/2)+Math.cos(i)*Math.cos(e)*Math.sin(ky/2)*Math.sin(ky/2);return 2*Math.asin(Math.sqrt(kC))*iW}function gO(kC,T){var kE=bH(kC,T);var kD=180;var kB=90;var kA=-180;var ky=-90;var kz=T.sp;var kx=T.ep;kD=kz.lng=kD&&kE.lng<=ky&&kE.lat>=kB){return gQ(kC,kE)}else{var i=l(kC,T.sp);var e=l(kC,T.ep);return ikx.lat){if(av({lng:da[e],lat:c8[e]},{lng:da[(e+1)%ag],lat:c8[(e+1)%ag]},kx)>0){++T}}}else{if(c8[(e+1)%ag]<=kx.lat){if(av({lng:da[e],lat:c8[e]},{lng:da[(e+1)%ag],lat:c8[(e+1)%ag]},kx)<0){--T}}}}return T===0?fF:il}function kc(kx){var kA={};if(kx.lnge7[2]+0.4||kx.lat>e7[3]+0.4){kA.lng=kx.lng;kA.lat=kx.lat;return kA}else{if(ix(kx,eP,eO,iQ)){kA=gx(kx);return kA}}var e=0;var kD=dQ;var T=0;var kB=new hK();var kC=1;if(bP(kx)===fF){for(var kz=0;kzv[2]+0.4||i.lat>v[3]+0.4){T.lng=i.lng;T.lat=i.lat;return T}else{if(ix(i,cf,cd,iQ)){T=a5(i);return T}}var e=kc(i);if(i.lng===e.lng&&i.lat===e.lng){T.lng=i.lng;T.lat=i.lat;return T}return decryptPt1(i,kc)}function iN(i,e){if(e===3&&i instanceof cF){var T=kc(i);return new cF(T.lng,T.lat)}else{return i}}function eR(i,e){if(e===3&&i instanceof cF){var T=e9(i);return new cF(T.lng,T.lat)}else{if(e===5&&i instanceof cF){return new cF(i.lng,i.lat)}else{return i}}}function q(kz){if(!kz){kz={}}var kA=JSON.stringify(kz);var ky=0,T,kx,e;if(kA.length===0){return ky}for(T=0,e=kA.length;T=3){var kx=ky[0]||0;var T=ky[1]||0;var e=ky[2]||0;var i=ky[3]||1}else{var kx=(ky)&255;var T=(ky>>8)&255;var e=(ky>>16)&255;var i=(ky>>24)&255}if(!ky){return 0}return kx+T*256+e*65536-1}function k(e){var i=true;var T=e.charAt(0);switch(T){case"\n":return"\\n";break;case"\r":return"\\r";break;case"'":return"\\'";break;case'"':return'\\"';break;case"&":return"\\&";break;case"\\":return"\\\\";break;case"\t":return"\\t";break;case"\b":return"\\b";break;case"\f":return"\\f";break;case"/":return"\\x2F";break;case"<":return"\\x3C";break;case">":return"\\x3E";break;default:i=false;break}if(!i){return e}}function b(ky){var T=ky;var kx="";var e=0;for(e=0;ei-lB?lB:lC},e.offset=function(i,lB){return lA(i=new Date(+i),null==lB?1:Math.floor(lB)),i},e.range=function(lC,i,lB){var lD=[];if(lC=e.ceil(lC),lB=null==lB?1:Math.floor(lB),!(i>lC&&lB>0)){return lD}do{lD.push(new Date(+lC))}while(lA(lC,lB),lz(lC),i>lC);return lD},e.filter=function(i){return ls(function(lB){for(;lz(lB),!i(lB);){lB.setTime(lB-1)}},function(lB,lC){for(;--lC>=0;){for(;lA(lB,1),!i(lB);){}}})},T&&(e.count=function(i,lB){return lc.setTime(+i),lg.setTime(+lB),lz(lc),lz(lg),Math.floor(T(lc,lg))},e.every=function(i){return i=Math.floor(i),isFinite(i)&&i>0?i>1?e.filter(ly?function(lB){return ly(lB)%i===0}:function(lB){return e.count(0,lB)%i===0}):e:null}),e}function lh(e){return ls(function(i){i.setDate(i.getDate()-(i.getDay()+7-e)%7),i.setHours(0,0,0,0)},function(i,T){i.setDate(i.getDate()+7*T)},function(i,T){return(T-i-(T.getTimezoneOffset()-i.getTimezoneOffset())*lb)/lp})}function k9(e){return ls(function(i){i.setUTCDate(i.getUTCDate()-(i.getUTCDay()+7-e)%7),i.setUTCHours(0,0,0,0)},function(i,T){i.setUTCDate(i.getUTCDate()+7*T)},function(i,T){return(T-i)/lp})}var lc=new Date,lg=new Date,ln=ls(function(){},function(i,T){i.setTime(+i+T)},function(i,T){return T-i});ln.every=function(e){return e=Math.floor(e),isFinite(e)&&e>0?e>1?ls(function(i){i.setTime(Math.floor(i/e)*e)},function(i,T){i.setTime(+i+T*e)},function(i,T){return(T-i)/e}):ln:null};var lw=ln.range,lu=1000,lb=60000,lr=3600000,lj=86400000,lp=604800000,kD=ls(function(e){e.setTime(Math.floor(e/lu)*lu)},function(i,T){i.setTime(+i+T*lu)},function(i,T){return(T-i)/lu},function(e){return e.getUTCSeconds()}),lt=kD.range,li=ls(function(e){e.setTime(Math.floor(e/lb)*lb)},function(i,T){i.setTime(+i+T*lb)},function(i,T){return(T-i)/lb},function(e){return e.getMinutes()}),kL=li.range,k5=ls(function(i){var T=i.getTimezoneOffset()*lb%lr;0>T&&(T+=lr),i.setTime(Math.floor((+i-T)/lr)*lr+T)},function(i,T){i.setTime(+i+T*lr)},function(i,T){return(T-i)/lr},function(e){return e.getHours()}),lo=k5.range,kV=ls(function(e){e.setHours(0,0,0,0)},function(i,T){i.setDate(i.getDate()+T)},function(i,T){return(T-i-(T.getTimezoneOffset()-i.getTimezoneOffset())*lb)/lj},function(e){return e.getDate()-1}),kC=kV.range,kS=lh(0),kU=lh(1),ky=lh(2),kQ=lh(3),kF=lh(4),k8=lh(5),lf=lh(6),kA=kS.range,k7=kU.range,kJ=ky.range,k4=kQ.range,lk=kF.range,k6=k8.range,lv=lf.range,lm=ls(function(e){e.setDate(1),e.setHours(0,0,0,0)},function(i,T){i.setMonth(i.getMonth()+T)},function(i,T){return T.getMonth()-i.getMonth()+12*(T.getFullYear()-i.getFullYear())},function(e){return e.getMonth()}),lx=lm.range,kP=ls(function(e){e.setMonth(0,1),e.setHours(0,0,0,0)},function(i,T){i.setFullYear(i.getFullYear()+T)},function(i,T){return T.getFullYear()-i.getFullYear()},function(e){return e.getFullYear()});kP.every=function(e){return isFinite(e=Math.floor(e))&&e>0?ls(function(i){i.setFullYear(Math.floor(i.getFullYear()/e)*e),i.setMonth(0,1),i.setHours(0,0,0,0)},function(i,T){i.setFullYear(i.getFullYear()+T*e)}):null};var kI=kP.range,ld=ls(function(e){e.setUTCSeconds(0,0)},function(i,T){i.setTime(+i+T*lb)},function(i,T){return(T-i)/lb},function(e){return e.getUTCMinutes()}),kX=ld.range,kW=ls(function(e){e.setUTCMinutes(0,0,0)},function(i,T){i.setTime(+i+T*lr)},function(i,T){return(T-i)/lr},function(e){return e.getUTCHours()}),kT=kW.range,kR=ls(function(e){e.setUTCHours(0,0,0,0)},function(i,T){i.setUTCDate(i.getUTCDate()+T)},function(i,T){return(T-i)/lj},function(e){return e.getUTCDate()-1}),kO=kR.range,kN=k9(0),kM=k9(1),kK=k9(2),kH=k9(3),kG=k9(4),kB=k9(5),kz=k9(6),kx=kN.range,k3=kM.range,lq=kK.range,le=kH.range,ll=kG.range,k2=kB.range,k1=kz.range,k0=ls(function(e){e.setUTCDate(1),e.setUTCHours(0,0,0,0)},function(i,T){i.setUTCMonth(i.getUTCMonth()+T)},function(i,T){return T.getUTCMonth()-i.getUTCMonth()+12*(T.getUTCFullYear()-i.getUTCFullYear())},function(e){return e.getUTCMonth()}),kZ=k0.range,kE=ls(function(e){e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},function(i,T){i.setUTCFullYear(i.getUTCFullYear()+T)},function(i,T){return T.getUTCFullYear()-i.getUTCFullYear()},function(e){return e.getUTCFullYear()});kE.every=function(e){return isFinite(e=Math.floor(e))&&e>0?ls(function(i){i.setUTCFullYear(Math.floor(i.getUTCFullYear()/e)*e),i.setUTCMonth(0,1),i.setUTCHours(0,0,0,0)},function(i,T){i.setUTCFullYear(i.getUTCFullYear()+T*e)}):null};var kY=kE.range;la.timeInterval=ls,la.timeMillisecond=ln,la.timeMilliseconds=lw,la.utcMillisecond=ln,la.utcMilliseconds=lw,la.timeSecond=kD,la.timeSeconds=lt,la.utcSecond=kD,la.utcSeconds=lt,la.timeMinute=li,la.timeMinutes=kL,la.timeHour=k5,la.timeHours=lo,la.timeDay=kV,la.timeDays=kC,la.timeWeek=kS,la.timeWeeks=kA,la.timeSunday=kS,la.timeSundays=kA,la.timeMonday=kU,la.timeMondays=k7,la.timeTuesday=ky,la.timeTuesdays=kJ,la.timeWednesday=kQ,la.timeWednesdays=k4,la.timeThursday=kF,la.timeThursdays=lk,la.timeFriday=k8,la.timeFridays=k6,la.timeSaturday=lf,la.timeSaturdays=lv,la.timeMonth=lm,la.timeMonths=lx,la.timeYear=kP,la.timeYears=kI,la.utcMinute=ld,la.utcMinutes=kX,la.utcHour=kW,la.utcHours=kT,la.utcDay=kR,la.utcDays=kO,la.utcWeek=kN,la.utcWeeks=kx,la.utcSunday=kN,la.utcSundays=kx,la.utcMonday=kM,la.utcMondays=k3,la.utcTuesday=kK,la.utcTuesdays=lq,la.utcWednesday=kH,la.utcWednesdays=le,la.utcThursday=kG,la.utcThursdays=ll,la.utcFriday=kB,la.utcFridays=k2,la.utcSaturday=kz,la.utcSaturdays=k1,la.utcMonth=k0,la.utcMonths=kZ,la.utcYear=kE,la.utcYears=kY,Object.defineProperty(la,"__esModule",{value:!0})});function fi(e){this._elemType=e;this._objCollection={}}fi.prototype.get=function(){var i=null;for(var e in this._objCollection){if(this._objCollection[e]&&this._objCollection[e]._free===true){this._objCollection[e]._free=false;return this._objCollection[e]}}i=b5(this._elemType);e=bF.getGUID("obj_pool_");this._objCollection[e]=i;return i};fi.prototype.free=function(e){if(!e){return}e._free=true;if(e.tagName.toLowerCase()==="img"){e.src="";e.crossOrigin=null;e.onload=e.onerror=null}};fi.prototype.clear=function(){for(var e in this._objCollection){if(this._objCollection[e]&&this._objCollection[e].tagName.toLowerCase==="img"){this._objCollection[e].onload=this._objCollection[e].onerror=null}}this._objCollection={}};var ip={get:function(i,ky,e,T){var kx=new XMLHttpRequest();kx.open("GET",i,true);kx.timeout=10000;kx.ontimeout=function(){T&&T()};kx.onreadystatechange=function(kz){if(this.readyState===4){if(this.status===200){ky&&ky(kx.responseText)}else{e&&e()}}};kx.send()},post:function(i,kz,ky,e,T){var kx=new XMLHttpRequest();kx.open("POST",i,true);kx.setRequestHeader("Content-type","application/x-www-form-urlencoded");kx.timeout=10000;kx.ontimeout=function(){T&&T()};kx.onreadystatechange=function(kA){if(this.readyState===4){if(this.status===200){ky&&ky(kx.responseText,kz)}else{e&&e()}}};kx.send(kz);return kx}};var g1=(function(e){function i(kz,T,ky){if(kz.indexOf("v=")===-1){kz+="&v=gl"}var kx=b5("script",{src:kz,type:"text/javascript",charset:"utf-8"});if(kx.addEventListener){kx.addEventListener("load",function(kB){var kA=kB.target;kA.parentNode.removeChild(kA);T&&T()},false);kx.addEventListener("error",function(kB){if(kB){var kA=kB.target;kA&&kA.parentNode&&kA.parentNode.removeChild(kA)}ky&&ky(null)},false)}else{if(kx.attachEvent){kx.attachEvent("onreadystatechange",function(kB){var kA=window.event.srcElement;if(kA&&(kA.readyState==="loaded"||kA.readyState==="complete")){kA.parentNode.removeChild(kA)}T&&T()})}}e.getElementsByTagName("head")[0].appendChild(kx)}return{load:function(kA,T,kx){if(typeof kA==="string"){i(kA,T,kx)}else{if(kA.length>0){var kz=kA.length;for(var ky=0;ky-1){return{col:kx,row:kD,zoom:kC,useZoom:T}}else{var kA=ks.mapZoomBaseIndex[kC];var kz=ks.baseScaleZoom[kA+1];if(!kz){return null}var kB=this.getFactorByZooms(kz,kC);var e=ks.baseZoomInfo[kz];return{col:Math.floor(kx/kB),row:Math.floor(kD/kB),zoom:kz,useZoom:e[e.length-1]}}return null}if(kC-1-1){return[{col:ky,row:kA,zoom:e,useZoom:T}]}else{var kL=0;var kI=e;while(kLkH){return null}var kG=Math.pow(2,kN);var i=ky*kG;var kF=kA*kG;var kC=e+kN;var kE=[];for(var kK=0;kK<2;kK++){var kz=i+kK;for(var kJ=0;kJ<2;kJ++){var kB=kF+kJ;kE.push({col:kz,row:kB,zoom:kC,useZoom:kC})}}return kE},getFactorByZooms:function(i,kx){var T=ks.mapZoomBaseIndex[i];var ky=ks.mapZoomBaseIndex[kx];var e=ks.baseScaleZoomMercatorSize[T];var kz=ks.baseScaleZoomMercatorSize[ky];return e/kz}};var de={};var ad=["swiftshader","microsoft basic render driver"];var hE=["intel","nvidia","amd","apple","geforce"];function gS(e){e=e.toLowerCase();if(ad.indexOf(e)>=0){return true}if(e.indexOf("mobile")>=0){return true}return false}function cH(T){T=T.toLowerCase();for(var e=0;e=0){return true}}return false}function kq(e){if(!e){return false}if(gS(e)){return false}if(cH(e)){return true}return false}de.ifEnableEarth=function(i){var e=de.ifEnableEarth;if(!i&&typeof e._enable==="boolean"){return e._enable}if(de.ifSupportWebGL()){e._enable=true;return true}e._enable=false;return false};de.ifEnableWebGLMap=function(i){var e=de.ifEnableWebGLMap;if(!i&&typeof e._enable==="boolean"){return e._enable}if(de.ifSupportWebGL()){if(aL.inMapHost){e._enable=true;return true}else{if(window.Blob||window.BlobBuilder||window.WebKitBlobBuilder||window.MozBlobBuilder){e._enable=true;return true}else{e._enable=false;return false}}}e._enable=false;return false};de.params={};de.ifSupportWebGL=function(){var i=de.ifSupportWebGL;if(typeof i._supportWebGL==="boolean"){return i._supportWebGL}if(!window.WebGLRenderingContext){i._supportWebGL=false;return false}var T=document.createElement("canvas");T.width=300;T.height=150;var ky=null;var kE={alpha:true,antialias:false,failIfMajorPerformanceCaveat:false,preserveDrawingBuffer:false,stencil:false};try{ky=T.getContext("webgl",kE)||T.getContext("experimental-webgl",kE)}catch(kA){i._supportWebGL=false}if(ky===null){i._supportWebGL=false}else{i._supportWebGL=true;var kC=ky.getExtension("WEBGL_debug_renderer_info");var kB="";if(kC){kB=ky.getParameter(kC.UNMASKED_RENDERER_WEBGL);if(kq(kB)===true){i._supportWebGL=true}var kD=ky.getParameter(kC.UNMASKED_VENDOR_WEBGL);i._renderer=kB;i._vendor=kD}if(!kC&&e8.Browser.firefox){i._supportWebGL=true}if(!kC&&e8.Platform.macintosh){i._supportWebGL=true}if(ky.drawingBufferWidth!==T.width||ky.drawingBufferHeight!==T.height){i._supportWebGL=false}if(ky.getParameter(ky.MAX_VERTEX_TEXTURE_IMAGE_UNITS)<4){i._supportWebGL=false}var kx=ky.getParameter(ky.MAX_TEXTURE_SIZE);de.params.maxTextureSize=kx;if(kx<4096){i._supportWebGL=false}var kz=ky.getParameter(ky.MAX_TEXTURE_IMAGE_UNITS);if(kz<8){i._supportWebGL=false}if(ky.getShaderPrecisionFormat&&!ky.getShaderPrecisionFormat(ky.FRAGMENT_SHADER,ky.HIGH_FLOAT)){hN.sendMessage(a1(4,246,1,1),["monitor","ShaderPrecision","sys_"+kB]);return i._supportWebGL}if(!ky.getShaderPrecisionFormat||!ky.getShaderPrecisionFormat(ky.FRAGMENT_SHADER,ky.HIGH_FLOAT)){hN.sendMessage(a1(4,246,1,1),["monitor","ShaderPrecision","sys_"+kB]);return i._supportWebGL}if(!ky.getShaderPrecisionFormat||ky.getShaderPrecisionFormat(ky.FRAGMENT_SHADER,ky.HIGH_FLOAT).precision<23){i._supportWebGL=false}}return i._supportWebGL};de.ifSupportCanvas2d=function(){var ky=de.ifSupportCanvas2d;if(typeof ky.supportCanvas2d==="boolean"){return ky.supportCanvas2d}var T=document.createElement("canvas");var i=null;try{i=T.getContext("2d")}catch(kx){ky.supportCanvas2d=false}if(i===null){ky.supportCanvas2d=false}else{ky.supportCanvas2d=true}return ky.supportCanvas2d};de.ifCanvas2dInBlackList=function(){return true};de.ifEnableCanvas2dMap=function(){return false;var i=navigator.userAgent;var e=0;var kx=0;var ky=0;if(/macintosh/ig.test(i)){var T=0;if(/(\d+\.\d)?(?:\.\d)?\s+safari\/?(\d+\.\d+)?/i.test(i)&&!/chrome/i.test(i)){T=parseInt((RegExp["\x241"]||RegExp["\x242"]),10)}if(T>0){return false}return true}if(/windows nt (\d+\.\d)/ig.test(i)){kx=parseFloat(RegExp.$1);if(kx>=6.1){if(/chrome\/(\d+\.\d)/i.test(i)){e=parseFloat(RegExp.$1);if(e>=31){return true}}if(/MSIE (\d+(\.\d+)?)/.test(i)){ky=parseFloat(RegExp.$1);if(ky>=10){return true}}if(/Firefox/.test(i)){return true}if(/rv:11.0/ig.test(i)){return true}if(/edge/ig.test(i)){return true}}}return false};de.ifSupportCSS3=function(kB,i){var kA=document.createElement("div");var kz="Webkit Moz O ms".split(" ");var e=kz.length;var T="";var kx=kA.style;if(kB in kx){T=kB}kB=kB.replace(/^[a-z]/,function(kC){return kC.toUpperCase()});while(e--){var ky=kz[e]+kB;if(ky in kx){T=ky;break}}if(i){return T}else{return T.length>0?true:false}};de.isModernBrowser=de.ifSupportCanvas2d()&&de.ifSupportCSS3("transform");function aC(i,e){this._size=i;this._curSize=0;this._cache={};this._least=null;this._most=null;this._options={clearCallback:null,removeOldCallback:null};e=e||{};for(var T in e){this._options[T]=e[T]}this._getDataTimes=0;this._hitTimes=0}aC.prototype.setData=function(kx,kz){var i=this._cache;var T=this._size;if(T===0){return}var e=this._curSize;if(e===T){this._removeOld()}var ky;if(!i[kx]){ky={key:kx,data:kz,older:null,newwer:null};i[kx]=ky;if(this._least===null){this._least=ky}if(this._most===null){this._most=ky}this._curSize++}else{ky=i[kx];ky.data=kz;if(this._most===ky){return}ky.older&&(ky.older.newer=ky.newer);ky.newer&&(ky.newer.older=ky.older);if(this._least===ky){this._least=ky.newer}}if(this._most&&this._most!==ky){this._most.newer=ky;ky.older=this._most;this._most=ky;ky.newer=null}};aC.prototype.getData=function(e){var i=this._cache[e];this._getDataTimes++;if(i){this._hitTimes++;var T=i.data;if(this._most===i){return T}i.older&&(i.older.newer=i.newer);i.newer&&(i.newer.older=i.older);if(this._least===i){this._least=i.newer}this._most.newer=i;i.older=this._most;i.newer=null;this._most=i;return T}return null};aC.prototype.getAllData=function(){return this._cache};aC.prototype.getHitRate=function(){return this._hitTimes/this._getDataTimes};aC.prototype.removeData=function(i){var e=this._cache;var T=e[i];if(!T){return}if(this._options.clearCallback){this._options.clearCallback(T.data,T.key)}T.older&&(T.older.newer=T.newer);T.newer&&(T.newer.older=T.older);if(this._least===T){this._least=T.newer}if(this._most===T){this._most=T.older}delete e[i];this._curSize--};aC.prototype._removeOld=function(){var e=this._cache;var kx=Math.round(this._size*0.6);var T=0;while(this._least&&T=72.004&&T<=137.8347&&i>=0.8293&&i<=55.8271}function ld(li,lh){var ll,i,ln,T=(ln=300+(ll=li-105)+2*(i=lh-35)+0.1*ll*ll+0.1*ll*i+0.1*k2(k1(ll)),ln+=2*(20*kW(6*ll*lf)+20*kW(2*ll*lf))/3,(ln+=2*(20*kW(ll*lf)+40*kW(ll/3*lf))/3)+2*(150*kW(ll/12*lf)+300*kW(ll/30*lf))/3),lg=function(lq,lp){var lo=2*lq-100+3*lp+0.2*lp*lp+0.1*lq*lp+0.2*k2(k1(lq));return lo+=2*(20*kW(6*lq*lf)+20*kW(2*lq*lf))/3,lo+=2*(20*kW(lp*lf)+40*kW(lp/3*lf))/3,lo+2*(160*kW(lp/12*lf)+320*kW(lp*lf/30))/3}(li-105,lh-35),lk=lh/180*lf,lj=kW(lk),lm=k2(lj=1-kV*lj*lj);return[T=180*T/(k7/lm*kY(lk)*lf),lg=180*lg/(k7*(1-kV)/(lj*lm)*lf)]}function k4(lg){var i=lg[0],T=lg[1];if(!la(i,T)){return[i,T]}var lh=ld(i,T);return[i+lh[0],T+lh[1]]}function kX(li){var lm=li[0],T=li[1];if(!la(lm,T)){return[lm,T]}for(var lg=[lm,T],lk=lg[0],lh=lg[1],ll=k4([lk,lh]),lj=ll[0]-lm,ln=ll[1]-T;k1(lj)>0.000001||k1(ln)>0.000001;){lj=(ll=k4([lk-=lj,lh-=ln]))[0]-lm,ln=ll[1]-T}return[lk,lh]}var k8=Math.sin,k9=Math.cos,kF=Math.atan2,lc=Math.sqrt,kU=3000*Math.PI/180;function k0(lg){var i=lg[0]-0.0065,T=lg[1]-0.006,li=lc(i*i+T*T)-0.00002*k8(T*kU),lh=kF(T,i)-0.000003*k9(i*kU);return[li*k9(lh),li*k8(lh)]}function kJ(lg){var i=lg[0],T=lg[1],li=lc(i*i+T*T)+0.00002*k8(T*kU),lh=kF(T,i)+0.000003*k9(i*kU);return[li*k9(lh)+0.0065,li*k8(lh)+0.006]}var kR=180/Math.PI,kA=Math.PI/180,kC=6378137,le=20037508.342789244;function kO(i){return[i[0]*kR/kC,(0.5*Math.PI-2*Math.atan(Math.exp(-i[1]/kC)))*kR]}function k3(lg){var i=Math.abs(lg[0])<=180?lg[0]:lg[0]-360*(lg[0]<0?-1:1),T=[kC*i*kA,kC*Math.log(Math.tan(0.25*Math.PI+0.5*lg[1]*kA))];return T[0]>le&&(T[0]=le),T[0]<-le&&(T[0]=-le),T[1]>le&&(T[1]=le),T[1]<-le&&(T[1]=-le),T}var kN,kM,kL,kT,kI,kx,kS=Math.abs,k5=[12890594.86,8362377.87,5591021,3481989.83,1678043.12,0],kH=[75,60,45,30,15,0],kz=[[1.410526172116255e-8,0.00000898305509648872,-1.9939833816331,200.9824383106796,-187.2403703815547,91.6087516669843,-23.38765649603339,2.57121317296198,-0.03801003308653,17337981.2],[-7.435856389565537e-9,0.000008983055097726239,-0.78625201886289,96.32687599759846,-1.85204757529826,-59.36935905485877,47.40033549296737,-16.50741931063887,2.28786674699375,10260144.86],[-3.030883460898826e-8,0.00000898305509983578,0.30071316287616,59.74293618442277,7.357984074871,-25.38371002664745,13.45380521110908,-3.29883767235584,0.32710905363475,6856817.37],[-1.981981304930552e-8,0.000008983055099779535,0.03278182852591,40.31678527705744,0.65659298677277,-4.44255534477492,0.85341911805263,0.12923347998204,-0.04625736007561,4482777.06],[3.09191371068437e-9,0.000008983055096812155,0.00006995724062,23.10934304144901,-0.00023663490511,-0.6321817810242,-0.00663494467273,0.03430082397953,-0.00466043876332,2555164.4],[2.890871144776878e-9,0.000008983055095805407,-3.068298e-8,7.47137025468032,-0.00000353937994,-0.02145144861037,-0.00001234426596,0.00010322952773,-0.00000323890364,826088.5]],k6=[[-0.0015702102444,111320.7020616939,1704480524535203,-10338987376042340,26112667856603880,-35149669176653700,26595700718403920,-10725012454188240,1800819912950474,82.5],[0.0008277824516172526,111320.7020463578,647795574.6671607,-4082003173.641316,10774905663.51142,-15171875531.51559,12053065338.62167,-5124939663.577472,913311935.9512032,67.5],[0.00337398766765,111320.7020202162,4481351.045890365,-23393751.19931662,79682215.47186455,-115964993.2797253,97236711.15602145,-43661946.33752821,8477230.501135234,52.5],[0.00220636496208,111320.7020209128,51751.86112841131,3796837.749470245,992013.7397791013,-1221952.21711287,1340652.697009075,-620943.6990984312,144416.9293806241,37.5],[-0.0003441963504368392,111320.7020576856,278.2353980772752,2485758.690035394,6070.750963243378,54821.18345352118,9540.606633304236,-2710.55326746645,1405.483844121726,22.5],[-0.0003218135878613132,111320.7020701615,0.00369383431289,823725.6402795718,0.46104986909093,2351.343141331292,1.58060784298199,8.77738589078284,0.37238884252424,7.45]];function kG(lh,T,lg){var lj=kS(T)/lg[9],li=lg[0]+lg[1]*kS(lh),i=lg[2]+lg[3]*lj+lg[4]*Math.pow(lj,2)+lg[5]*Math.pow(lj,3)+lg[6]*Math.pow(lj,4)+lg[7]*Math.pow(lj,5)+lg[8]*Math.pow(lj,6);return[li*=lh<0?-1:1,i*=T<0?-1:1]}function kZ(lg){for(var i=lg[0],T=lg[1],li=[],lh=0;lhkH[lh]){li=k6[lh];break}}return kG(i,T,li)}function kE(lg){for(var i=lg[0],T=lg[1],li=[],lh=0;lh=k5[lh]){li=kz[lh];break}}return kG(i,T,li)}function kD(T,i){if(!T){throw new Error(i)}}function kP(i){return !!i&&"[object Array]"===Object.prototype.toString.call(i)}function kK(i){return !isNaN(Number(i))&&null!==i&&!kP(i)}function kB(){for(var lg=[],i=0;i=2,"Invalid input coordinate: "+lk),kD(kK(lk[0])&&kK(lk[1]),"Invalid input coordinate: "+lk),lk=lk.map(Number),lh=!0);var lg=ll;return lh?lg(lk):(ky(lk,(function(ln){var i;i=lg(ln),ln[0]=i[0],ln[1]=i[1]})),lk)}})}));var hT={ColorRefTable:{aliceblue:["#f0f8ff","rgb(240,248,255)"],antiquewhite:["#faebd7","rgb(250,235,215)"],aqua:["#00ffff","rgb(0,255,255)"],aquamarine:["#7fffd4","rgb(127,255,212)"],azure:["#f0ffff","rgb(240,255,255)"],beige:["#f5f5dc","rgb(245,245,220)"],bisque:["#ffe4c4","rgb(255,228,196)"],black:["#000000","rgb(0,0,0)"],blanchedalmond:["#ffebcd","rgb(255,235,205)"],blue:["#0000ff","rgb(0,0,255)"],blueviolet:["#8a2be2","rgb(138,43,226)"],brown:["#a52a2a","rgb(165,42,42)"],burlywood:["#deb887","rgb(222,184,135)"],cadetblue:["#5f9ea0","rgb(95,158,160)"],chartreuse:["#7fff00","rgb(127,255,0)"],chocolate:["#d2691e","rgb(210,105,30)"],coral:["#ff7f50","rgb(255,127,80)"],cornflowerblue:["#6495ed","rgb(100,149,237)"],cornsilk:["#fff8dc","rgb(255,248,220)"],crimson:["#dc143c","rgb(220,20,60)"],cyan:["#00ffff","rgb(0,255,255)"],darkblue:["#00008b","rgb(0,0,139)"],darkcyan:["#008b8b","rgb(0,139,139)"],darkgoldenrod:["#b8860b","rgb(184,134,11)"],darkgray:["#a9a9a9","rgb(169,169,169)"],darkgreen:["#006400","rgb(0,100,0)"],darkgrey:["#a9a9a9","rgb(169,169,169)"],darkkhaki:["#bdb76b","rgb(189,183,107)"],darkmagenta:["#8b008b","rgb(139,0,139)"],darkolivegreen:["#556b2f","rgb(85,107,47)"],darkorange:["#ff8c00","rgb(255,140,0)"],darkorchid:["#9932cc","rgb(153,50,204)"],darkred:["#8b0000","rgb(139,0,0)"],darksalmon:["#e9967a","rgb(233,150,122)"],darkseagreen:["#8fbc8f","rgb(143,188,143)"],darkslateblue:["#483d8b","rgb(72,61,139)"],darkslategray:["#2f4f4f","rgb(47,79,79)"],darkslategrey:["#2f4f4f","rgb(47,79,79)"],darkturquoise:["#00ced1","rgb(0,206,209)"],darkviolet:["#9400d3","rgb(148,0,211)"],deeppink:["#ff1493","rgb(255,20,147)"],deepskyblue:["#00bfff","rgb(0,191,255)"],dimgray:["#696969","rgb(105,105,105)"],dimgrey:["#696969","rgb(105,105,105)"],dodgerblue:["#1e90ff","rgb(30,144,255)"],firebrick:["#b22222","rgb(178,34,34)"],floralwhite:["#fffaf0","rgb(255,250,240)"],forestgreen:["#228b22","rgb(34,139,34)"],fuchsia:["#ff00ff","rgb(255,0,255)"],gainsboro:["#dcdcdc","rgb(220,220,220)"],ghostwhite:["#f8f8ff","rgb(248,248,255)"],gold:["#ffd700","rgb(255,215,0)"],goldenrod:["#daa520","rgb(218,165,32)"],gray:["#808080","rgb(128,128,128)"],green:["#008000","rgb(0,128,0)"],greenyellow:["#adff2f","rgb(173,255,47)"],grey:["#808080","rgb(128,128,128)"],honeydew:["#f0fff0","rgb(240,255,240)"],hotpink:["#ff69b4","rgb(255,105,180)"],indianred:["#cd5c5c","rgb(205,92,92)"],indigo:["#4b0082","rgb(75,0,130)"],ivory:["#fffff0","rgb(255,255,240)"],khaki:["#f0e68c","rgb(240,230,140)"],lavender:["#e6e6fa","rgb(230,230,250)"],lavenderblush:["#fff0f5","rgb(255,240,245)"],lawngreen:["#7cfc00","rgb(124,252,0)"],lemonchiffon:["#fffacd","rgb(255,250,205)"],lightblue:["#add8e6","rgb(173,216,230)"],lightcoral:["#f08080","rgb(240,128,128)"],lightcyan:["#e0ffff","rgb(224,255,255)"],lightgoldenrodyellow:["#fafad2","rgb(250,250,210)"],lightgray:["#d3d3d3","rgb(211,211,211)"],lightgreen:["#90ee90","rgb(144,238,144)"],lightgrey:["#d3d3d3","rgb(211,211,211)"],lightpink:["#ffb6c1","rgb(255,182,193)"],lightsalmon:["#ffa07a","rgb(255,160,122)"],lightseagreen:["#20b2aa","rgb(32,178,170)"],lightskyblue:["#87cefa","rgb(135,206,250)"],lightslategray:["#778899","rgb(119,136,153)"],lightslategrey:["#778899","rgb(119,136,153)"],lightsteelblue:["#b0c4de","rgb(176,196,222)"],lightyellow:["#ffffe0","rgb(255,255,224)"],lime:["#00ff00","rgb(0,255,0)"],limegreen:["#32cd32","rgb(50,205,50)"],linen:["#faf0e6","rgb(250,240,230)"],magenta:["#ff00ff","rgb(255,0,255)"],maroon:["#800000","rgb(128,0,0)"],mediumaquamarine:["#66cdaa","rgb(102,205,170)"],mediumblue:["#0000cd","rgb(0,0,205)"],mediumorchid:["#ba55d3","rgb(186,85,211)"],mediumpurple:["#9370db","rgb(147,112,219)"],mediumseagreen:["#3cb371","rgb(60,179,113)"],mediumslateblue:["#7b68ee","rgb(123,104,238)"],mediumspringgreen:["#00fa9a","rgb(0,250,154)"],mediumturquoise:["#48d1cc","rgb(72,209,204)"],mediumvioletred:["#c71585","rgb(199,21,133)"],midnightblue:["#191970","rgb(25,25,112)"],mintcream:["#f5fffa","rgb(245,255,250)"],mistyrose:["#ffe4e1","rgb(255,228,225)"],moccasin:["#ffe4b5","rgb(255,228,181)"],navajowhite:["#ffdead","rgb(255,222,173)"],navy:["#000080","rgb(0,0,128)"],oldlace:["#fdf5e6","rgb(253,245,230)"],olive:["#808000","rgb(128,128,0)"],olivedrab:["#6b8e23","rgb(107,142,35)"],orange:["#ffa500","rgb(255,165,0)"],orangered:["#ff4500","rgb(255,69,0)"],orchid:["#da70d6","rgb(218,112,214)"],palegoldenrod:["#eee8aa","rgb(238,232,170)"],palegreen:["#98fb98","rgb(152,251,152)"],paleturquoise:["#afeeee","rgb(175,238,238)"],palevioletred:["#db7093","rgb(219,112,147)"],papayawhip:["#ffefd5","rgb(255,239,213)"],peachpuff:["#ffdab9","rgb(255,218,185)"],peru:["#cd853f","rgb(205,133,63)"],pink:["#ffc0cb","rgb(255,192,203)"],plum:["#dda0dd","rgb(221,160,221)"],powderblue:["#b0e0e6","rgb(176,224,230)"],purple:["#800080","rgb(128,0,128)"],red:["#ff0000","rgb(255,0,0)"],rosybrown:["#bc8f8f","rgb(188,143,143)"],royalblue:["#4169e1","rgb(65,105,225)"],saddlebrown:["#8b4513","rgb(139,69,19)"],salmon:["#fa8072","rgb(250,128,114)"],sandybrown:["#f4a460","rgb(244,164,96)"],seagreen:["#2e8b57","rgb(46,139,87)"],seashell:["#fff5ee","rgb(255,245,238)"],sienna:["#a0522d","rgb(160,82,45)"],silver:["#c0c0c0","rgb(192,192,192)"],skyblue:["#87ceeb","rgb(135,206,235)"],slateblue:["#6a5acd","rgb(106,90,205)"],slategray:["#708090","rgb(112,128,144)"],slategrey:["#708090","rgb(112,128,144)"],snow:["#fffafa","rgb(255,250,250)"],springgreen:["#00ff7f","rgb(0,255,127)"],steelblue:["#4682b4","rgb(70,130,180)"],tan:["#d2b48c","rgb(210,180,140)"],teal:["#008080","rgb(0,128,128)"],thistle:["#d8bfd8","rgb(216,191,216)"],tomato:["#ff6347","rgb(255,99,71)"],turquoise:["#40e0d0","rgb(64,224,208)"],violet:["#ee82ee","rgb(238,130,238)"],wheat:["#f5deb3","rgb(245,222,179)"],white:["#ffffff","rgb(255,255,255)"],whitesmoke:["#f5f5f5","rgb(245,245,245)"],yellow:["#ffff00","rgb(255,255,0)"],yellowgreen:["#9acd32","rgb(154,205,50)"]},regGroup:{hex:/^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$/,rgb:/rgb\(\s*(\d|\d\d|1\d\d|2[0-4]\d|25[0-5])\s*,\s*(\d|\d\d|1\d\d|2[0-4]\d|25[0-5])\s*,\s*(\d|\d\d|1\d\d|2[0-4]\d|25[0-5])\s*\)/,rgba:/rgba\(\s*(\d|\d\d|1\d\d|2[0-4]\d|25[0-5])\s*,\s*(\d|\d\d|1\d\d|2[0-4]\d|25[0-5])\s*,\s*(\d|\d\d|1\d\d|2[0-4]\d|25[0-5])\s*,\s*(0|1|0\.[1-9])\s*\)/},parseHexToRgbaArray:function(kz){var kA=kz.replace("#","");if(kA.length===3){kA+="f"}else{if(kA.length===6){kA+="ff"}}var e=[];var ky=kA.length;var kx=ky===8?2:1;for(var T=0;T=0&&ky<60){kA=kB;kz=T;e=0}else{if(ky>=60&&ky<120){kA=T;kz=kB;e=0}else{if(ky>=120&&ky<180){kA=0;kz=kB;e=T}else{if(ky>=180&&ky<240){kA=0;kz=T;e=kB}else{if(ky>=240&&ky<300){kA=T;kz=0;e=kB}else{if(ky>=300&&ky<360){kA=kB;kz=0;e=T}}}}}}kA=(kA+i)*255>255?255:(kA+i)*255;kz=(kz+i)*255>255?255:(kz+i)*255;e=(e+i)*255>255?255:(e+i)*255;return[Math.round(kA),Math.round(kz),Math.round(e)]},formatColorCssToRgbaArray:function(kz,T,kx){kx=(typeof kx!=="boolean")?true:kx;if(typeof kz!=="string"){return kx?[0,0,0,1]:[0,0,0,255]}var i=(kz||"Black").trim().toLowerCase();var e=[];var ky=hT.ColorRefTable[i];if(ky!==undefined){i=ky[0]}e=hT.parseCSSColor(i);if(T!==undefined&&!isNaN(Number(T))){T=Number(T);e[3]=hT.fitTo(T,0,1)}else{e[3]=Number((e[3]/255).toFixed(2))}if(!kx){e[3]=Math.floor(e[3]*255)}return e},fitTo:function(T,i,e){if(Te){T=e}}return T},generateColorRamp:function(e,kD,kE,kx,kJ){kE=kE||[];kx=kx||"#ccc";kJ=kJ||1;const T=document.createElement("canvas");const kK=T.getContext("2d");T.width=256;T.height=kJ;const kz=kD[0];const kG=kD[kD.length-1];if(e.length===kD.length){const kH=kK.createLinearGradient(0,0,256,1);for(var kC=0;kC>16)+(kR>>16)+(kQ>>16);return(kP<<16)|(kQ&65535)}function kI(kO,kP){return(kO<>>(32-kP))}function kD(kT,kQ,kP,kO,kS,kR){return kJ(kI(kJ(kJ(kQ,kT),kJ(kO,kR)),kS),kP)}function e(kQ,kP,kU,kT,kO,kS,kR){return kD((kP&kU)|(~kP&kT),kQ,kP,kO,kS,kR)}function kA(kQ,kP,kU,kT,kO,kS,kR){return kD((kP&kT)|(kU&~kT),kQ,kP,kO,kS,kR)}function kG(kQ,kP,kU,kT,kO,kS,kR){return kD(kP^kU^kT,kQ,kP,kO,kS,kR)}function kM(kQ,kP,kU,kT,kO,kS,kR){return kD(kU^(kP|~kT),kQ,kP,kO,kS,kR)}function T(kY,kT){kY[kT>>5]|=128<<(kT%32);kY[((kT+64)>>>9<<4)+14]=kT;var kQ;var kS;var kR;var kP;var kO;var kX=1732584193;var kW=-271733879;var kV=-1732584194;var kU=271733878;for(kQ=0;kQ>5]>>>(kQ%32))&255)}return kO}function kC(kP){var kR;var kO=[];kO[(kP.length>>2)-1]=undefined;for(kR=0;kR>5]|=(kP.charCodeAt(kR/8)&255)<<(kR%32)}return kO}function kB(kO){return kH(T(kC(kO),kO.length*8))}function kN(kQ,kT){var kP;var kS=kC(kQ);var kO=[];var kR=[];var kU;kO[15]=kR[15]=undefined;if(kS.length>16){kS=T(kS,kQ.length*8)}for(kP=0;kP<16;kP+=1){kO[kP]=kS[kP]^909522486;kR[kP]=kS[kP]^1549556828}kU=T(kO.concat(kC(kT)),512+kT.length*8);return kH(T(kR.concat(kU),512+128))}function kL(kR){var kQ="0123456789abcdef";var kP="";var kO;var kS;for(kS=0;kS>>4)&15)+kQ.charAt(kO&15)}return kP}function kE(kO){return unescape(encodeURIComponent(kO))}function kx(kO){return kB(kE(kO))}function kF(kO){return kL(kx(kO))}function i(kO,kP){return kN(kE(kO),kE(kP))}function kK(kO,kP){return kL(i(kO,kP))}function ky(kP,kQ,kO){if(!kQ){if(!kO){return kF(kP)}return kx(kP)}if(!kO){return kK(kQ,kP)}return i(kQ,kP)}if(typeof define==="function"&&define.amd){define(function(){return ky})}else{if(typeof module==="object"&&module.exports){module.exports=ky}else{kz.md5=ky}}})(this);var cS={levels:{INFO:"info",WARNING:"warning",ERROR:"error"},category:{JS:"js",RESOURCE:"resource",AJAX:"ajax"},config:{jsError:true,resourceError:true,ajaxError:true},hosts:"api.map.baidu.com|webmap0.bdimg.com|maponline0.bdimg.com|",ignoreUrl:"api.map.baidu.com/images/blank.gif",sender:true,collections:[],sendError:function(){},init:function(i,e,T){this.hosts+=i?i:"";au&&au(this.config,e);this.sender=true;if(T){this.sender=false}this.hosts=this.urlScope(this.hosts);this.sendError=this.notifyError();var kx=typeof window!=="undefined"?window:typeof global!=="undefined"?global:typeof self!=="undefined"?self:{};this.config.jsError&&this.handleJavaScriptError(kx);this.config.resourceError&&this.handleResourceError(kx);this.config.ajaxError&&this.handleAjaxError(kx)},handleJavaScriptError:function(T){var e=this;var i=T.onerror;T.onerror=function(kB,kA,kx,kz,ky){if(e.isFetch(e.category.JS)&&e.hostExit(kA)){if(ky&&ky.stack){e.sendError({title:kB,msg:ky.stack,category:e.category.JS,level:e.levels.ERROR})}else{if(typeof kB==="string"){e.sendError({title:kB,msg:JSON.stringify({resourceUrl:kA,rowNum:kx,colNum:kz}),category:"js",level:e.levels.ERROR})}}}if(i&&bZ(i)){i&&i.apply(T,arguments)}}},handleResourceError:function(i){var e=this;i.addEventListener("error",function(kz){if(kz){var kA=kz.target||kz.srcElement;var ky=kA instanceof HTMLScriptElement||kA instanceof HTMLLinkElement||kA instanceof HTMLImageElement;if(!ky){if(!i.onerror){var T=kz.filename||null;if(!e.isFetch(e.category.JS)||!e.hostExit(T)){return}if(kz.error&&kz.error.stack){e.sendError({title:kz.message,msg:kz.error.stack,category:e.category.JS,level:e.levels.ERROR})}else{if(typeof kz.message==="string"){e.sendError({title:kz.message,msg:JSON.stringify({resourceUrl:T,rowNum:kz.lineno,colNum:kz.cowno}),category:e.category.JS,level:e.levels.ERROR})}}}return}var kx=kA.src||kA.href;if(e.isFetch(e.category.RESOURCE)&&e.hostExit(kx)){e.sendError({title:kA.nodeName,msg:kx,category:e.category.RESOURCE,level:e.levels.ERROR})}}},true)},handleAjaxError:function(kz){var e=this;var ky=kz.location.protocol;if(ky==="file:"){return}if(!kz.XMLHttpRequest){return}var i=kz.XMLHttpRequest;var T=i.prototype.send;var kx=function(kB){if(kB&&kB.currentTarget&&kB.currentTarget.status!==200){var kA=kB.target.responseURL;if(e.isFetch(e.category.AJAX)&&e.hostExit(kA)){e.sendError({title:kA,msg:JSON.stringify({response:kB.target.response,responseURL:kA,status:kB.target.status,statusText:kB.target.statusText}),category:e.category.AJAX,level:e.levels.ERROR})}}};i.prototype.send=function(){if(this["addEventListener"]){this["addEventListener"]("error",kx);this["addEventListener"]("load",kx);this["addEventListener"]("abort",kx)}else{var kA=this["onreadystatechange"];this["onreadystatechange"]=function(kB){if(this.readyState===4){kx(kB)}kA&&kA.apply(this,arguments)}}return T.apply(this,arguments)}},notifyError:function(T){var i=T||1000;this._idleWorkerTicker=(function(kx){return function(){kx.runJob()}})(this);var e=this;return function(ky){if(ky.url){if(!e.isFetch(ky.category)){return}var kx=ky.url||"";if(!e.hostExit(kx)){return}delete ky.url}if(!navigator.onLine){return}e.collections.push(ky);e.checkJob(i)}},runJob:function(){if(this.collections.length===0){clearInterval(this.idleWork);this.idleWork=null;return}var ky=this.collections.slice(0,2);var T=jC(JSON.stringify({dataset:ky}));var kx=new Date().getTime();var i=eF.apiIMG+"/blank.gif?product=jsapi&v=gl&l="+T+"&ak="+eY+"&t="+kx;if(this.sender){try{var kA=document.createElement("div");kA.style="width:0;height:0;visibility: hidden;opacity: 0;z-index:-999;background-image: url("+i+");";document.querySelector("BODY").appendChild(kA);setTimeout(function(){document.querySelector("BODY").removeChild(kA)})}catch(kz){}}this.collections.splice(0,2);if(this.collections.length===0){clearInterval(this.idleWork);this.idleWork=null}},checkJob:function(e){if(!this.idleWork&&this._idleWorkerTicker){this.idleWork=setInterval(this._idleWorkerTicker,e)}},urlScope:function(kx){var T={};var kz=Object.keys(E);if(E&&kz.length>0){for(var ky in E){if(E[ky]&&(typeof E[ky]!=="function")){T[ky]=E[ky]}}}try{var kB=JSON.stringify(T);if(kB.length>2){return kx+"|"+kB}else{return kx}}catch(kA){return kx}},hostExit:function(i){try{if(i&&i.indexOf("//")===0){i=window.location.protocol+i}var T=new URL(i);if(!T||!T.host){return false}var ky=T.host+T.pathname;if(this.ignoreUrl.indexOf(ky)===-1&&this.hosts.indexOf(T.host)>-1){return true}return false}catch(kx){return false}},isFetch:function(e){return this.config[e+"Error"]||false}};bF.fetchDebug=cS;var hN={device:{PC:0,NA:1},config:{mask:["FFFFFFFF"],open:true,reset:60*60*1000},url:"//api.map.baidu.com?qt=jsapi_log",startTime:Date.now(),mark:{},records:{},sendMessage:function(e,i){},init:function(i,T){this.kill();var e=this;this.config.open=!!i;T=T||{};if(T.reset){this.config.reset=T.reset}this.sendMessage=(function(ky){var kx=ky||1000;e._idleWorkerTicker=(function(kz){return function(){kz.runJob()}})(e);return function(kz,kA){if(window.navigator&&!navigator.onLine){return}if(Date.now()-e.startTime>e.config.reset){e.startTime=Date.now();e.mark={};e.records={}}if(!e.mark[kz]){e.mark[kz]=true;e.records[kz]=kA}e.checkJob(kx)}})(T.timers)},runJob:function(){if(Object.keys(this.records).length===0){clearInterval(this.idleWork);this.idleWork=null;return}var kz=Object.keys(this.records);var kx=kz[0];var T=new Date().getTime();var ky="logCbk"+Math.floor(Math.random()*10000000000);bF[ky]=function(e){delete bF[ky]};var i=this.url+"&uid="+eY+"&bmapgl2=1&device="+(b4()?this.device.NA:this.device.PC)+"&module="+(this.records[kx][0]||"")+"&func="+(this.records[kx][1]||"")+"&subfunc="+(this.records[kx][2]||"")+"&t="+T+"&callback="+fD+"."+ky;i+=jG()(i);if(this.config.open){try{g1.load(i);delete this.records[kx]}catch(kA){}}if(Object.keys(this.records).length===0){clearInterval(this.idleWork);this.idleWork=null}},checkJob:function(e){if(!this.idleWork&&this._idleWorkerTicker){this.idleWork=setInterval(this._idleWorkerTicker,e)}},kill:function(){if(this.idleWork){clearInterval(this.idleWork);this.idleWork=null}this._idleWorkerTicker=null;this.mark={};this.records={}}};hN.init(true,{reset:20*60*1000});var kg={request:function(kF,kB,kx,kI,kz){var kC=new Date()["getTime"]();var kE=(Math.random()*100000)["toFixed"](0);bF._rd["_cbk"+kE]=function(kJ){if(kJ.result&&kJ.result["error"]&&kJ.result["error"]===202){alert("该AK因为恶意行为已经被管理员封禁!");return}if(kJ.result&&kJ.result["error"]&&kJ.result["error"]===403){if(hg!==null){hg.update("未获得百度地图商用授权,可能导致部分地图请求失败,请刷新后重试。")}return}kx=kx||{};kF&&kF(kJ,kx);delete bF._rd["_cbk"+kE]};kI=kI||"";var kH;var ky;if(kx&&kx.useEncodeURI){kH=jE(kB,encodeURI);ky=jE(kB)}else{kH=jE(kB,encodeURIComponent);ky=jE(kB)}var i=E.apiHost+"/"+kI+"?"+kH+"&ie=utf-8&oue=1&fromproduct=jsapi";var kD=E.apiHost+"/"+kI+"?"+ky+"&ie=utf-8&oue=1&fromproduct=jsapi";if(!kz){i+="&res=api";kD+="&res=api"}i+="&callback="+fD+"._rd._cbk"+kE;kD+="&callback="+fD+"._rd._cbk"+kE;var kA=window.___abvk?window.___abvk:kg.getSeckeyCidItem("SECKEY_ABVK");var e=kg.getSeckeyCidItem("BMAP_SECKEY");var kG=encodeURIComponent(kA+","+e);var T=kA+","+e;i+="&ak="+eY+"&v=gl&seckey="+kG+"&timeStamp="+kC;kD+="&ak="+eY+"&v=gl&seckey="+T+"&timeStamp="+kC;i+=jG()(kD);g1.load(i)},getSeckeyCidItem:function(i){if(navigator.cookieEnabled){var T=new RegExp("(^| )"+i+"=([^;]*)(;|$)");var e=document.cookie.match(T);if(e){return unescape(e[2])}return -1}if(localStorage){return localStorage.getItem(i)?localStorage.getItem(i):-1}if(sessionStorage){return sessionStorage.getItem(i)?localStorage.getItem(i):-1}}};window.srqtimer=null;window.firstTime=true;window.srqcount=0;bF._rd={};var jc=(function(){var kH={};var kG="HIGH";var kA="FOCUS";var T;function i(kI){var kN=kI||[];for(var kO=0;kO')}else{var i='
';if(e&&e.config.autoSafeArea&&cB()){this._safeAreaContainer=bR(this._map.container,i);this._safeAreaContainer.style.position="absolute";this._safeAreaContainer.style.bottom="env(safe-area-inset-bottom)";this._container=bR(this._safeAreaContainer,i)}else{this._container=bR(this._map.container,i)}}if(this._visible===false){this._container.style.display="none"}return this._container},_setPosition:function(){this.setAnchor(this._opts.anchor)},setAnchor:function(kx){if(this.anchorFixed||typeof kx!=="number"||isNaN(kx)||kxBMAP_ANCHOR_BOTTOM_RIGHT){kx=this.defaultAnchor}this._opts.offset=this._opts.offset||this.defaultOffset;var T=this._opts.anchor;this._opts.anchor=kx;if(!this._container){return}var kz=this._container;var e=this._opts.offset.width;var ky=this._opts.offset.height;kz.style.left=kz.style.top=kz.style.right=kz.style.bottom="auto";switch(kx){case BMAP_ANCHOR_TOP_LEFT:kz.style.top=ky+"px";kz.style.left=e+"px";break;case BMAP_ANCHOR_TOP_RIGHT:kz.style.top=ky+"px";kz.style.right=e+"px";break;case BMAP_ANCHOR_BOTTOM_LEFT:kz.style.bottom=ky+"px";kz.style.left=e+"px";break;case BMAP_ANCHOR_BOTTOM_RIGHT:kz.style.bottom=ky+"px";kz.style.right=e+"px";break;default:break}var i=["TL","TR","BL","BR"];e8.rc(this._container,"anchor"+i[T]);e8.ac(this._container,"anchor"+i[kx])},getAnchor:function(){return this._opts.anchor},setOffset:function(e){if(!e){return}this._opts=this._opts||{};this._opts.offset=new jk(e.width,e.height);if(!this._container){return}this.setAnchor(this._opts.anchor)},getOffset:function(){return this._opts.offset},getDom:function(){return this._container},show:function(){if(this._visible===true){return}this._visible=true;if(this._container){this._container.style.display=""}this.dispatchEvent(new fU("onshow"))},hide:function(){if(this._visible===false){return}this._visible=false;if(this._container){this._container.style.display="none"}this.dispatchEvent(new fU("onhide"))},isPrintable:function(){return !!this._opts.printable},isVisible:function(){if(!this._container&&!this._map){return false}return !!this._visible},_asyncLoadCode:function(){var e=this;hj.load("control",function(){if(e._asyncDraw){e._asyncDraw()}})}});var er={TOP_LEFT:0,TOP_RIGHT:1,BOTTOM_LEFT:2,BOTTOM_RIGHT:3};bF.ControlAnchor=er;window.BMAP_ANCHOR_TOP_LEFT=0;window.BMAP_ANCHOR_TOP_RIGHT=1;window.BMAP_ANCHOR_BOTTOM_LEFT=2;window.BMAP_ANCHOR_BOTTOM_RIGHT=3;function gj(e){gW.call(this);e=e||{};this._opts={printable:false};e8.extend(this._opts,e);this._copyrightCollection=[];this.defaultAnchor=BMAP_ANCHOR_BOTTOM_LEFT;this.defaultOffset=new jk(5,2);this.setAnchor(e.anchor);this._canShow=true;this.sateMapStyle=false;this.blockInfoWindow=false;this._asyncLoadCode()}gj.inherits(gW,"CopyrightControl");e8.extend(gj.prototype,{initialize:function(e){this._map=e;return this._container},addCopyright:function(kx){var e={minZoom:0,bounds:null,content:"",mapType:""};for(var T in kx){e[T]=kx[T]}if(this._map){var kA=e.minZoom;if(kA===-1||kAthis._map.getMaxZoom()){e.minZoom=this._map.getMinZoom()}if(e.mapType!==""&&!eu[e.mapType]){e.mapType=BMAPGL_NORMAL_MAP}}var ky=this.getCopyright(kx.id);if(ky){for(var kz in e){ky[kz]=e[kz]}}else{this._copyrightCollection.push(e)}},getCopyright:function(kx){for(var T=0,e=this._copyrightCollection.length;T=BMAP_NAVIGATION_CONTROL_LARGE&&e<=BMAP_NAVIGATION_CONTROL_ANIM){this._opts.type=e}else{this._opts.type=BMAP_NAVIGATION_CONTROL_LARGE}},getType:function(){return this._opts.type}});function A(i){gW.call(this);i=i||{};this._opts={printable:false};this.defaultAnchor=BMAP_ANCHOR_TOP_RIGHT;this.defaultOffset=new jk(10,10);this.setAnchor(i.anchor);this._opts=e8.extend(e8.extend(this._opts,{offset:this.defaultOffset,enableSwitch:true}),i);var e=this;hj.load("control",function(){e._asyncDraw()})}A.inherits(gW,"MapTypeControl");e8.extend(A.prototype,{initialize:function(e){this._map=e;return this._container},showStreetLayer:function(e){this._map.showStreetLayer(e)}});function jw(e){gW.call(this);e=e||{};this._opts={};this._opts=e8.extend(this._opts,e);this._zoomInDisabled=false;this._zoomOutDisabled=false;this._zoomInTapped=false;this._zoomOutTapped=false;this.defaultAnchor=er.BOTTOM_RIGHT;this.defaultOffset=new jk(15,20);this.setAnchor(e.anchor);this._asyncLoadCode()}jw.inherits(gW,"ZoomControl");e8.extend(jw.prototype,{initialize:function(e){this._map=e;return this._container}});function gC(e){gW.call(this);e=e||{};this._opts={autoZoom:true,autoViewport:true};this._opts=e8.extend(this._opts,e);this.defaultAnchor=er.BOTTOM_LEFT;this.defaultOffset=new jk(10,50);this.watchPosition=this._opts.watchPosition||false;this.useCompass=this._opts.useCompass||false;this.locMarker=null;this.locLevel=16;this.setAnchor(this._opts.anchor);this.onLocationStart=e.onLocationStart||null;this._asyncLoadCode()}gC.inherits(gW,"LocationControl");e8.extend(gC.prototype,{initialize:function(e){this._map=e;return this._container},startLocation:function(){this._startLocationCalled=true},stopLocationTrace:function(){},setOptions:function(e){e=e||{};e8.extend(this._opts,e)}});function bI(e){gW.call(this);e=e||{};this._opts={};this._opts=e8.extend(this._opts,e);this.defaultAnchor=er.BOTTOM_LEFT;this.defaultOffset=new jk(5,15);if(b4()){this.defaultOffset=new jk(10,10)}this.setAnchor(e.anchor)}bI.inherits(gW,"LogoControl");e8.extend(bI.prototype,{initialize:function(i){this._map=i;var e=this._container=document.createElement("div");e.innerHTML='';i.getContainer().appendChild(e);return e}});function ax(e,i){this._map=e;this._indoorInfo=i;this._visible=true;this._adjustVisible=true;this._isMobile=b4();this._sizeConfig={FLOOR_BTN_HEIGHT:this._isMobile?35:26,SWITCH_ARROW_HEIGHT:this._isMobile?20:15};this._init()}ax.prototype._init=function(){this._render();this._bindDom();this._bind();this._adjustDisplayHeight();var e=new fU("onindoor_bar_show");e.uid=this._indoorInfo.uid;e.floors=this._indoorInfo.floors;this._map.dispatchEvent(e)};ax.prototype._render=function(){if(!this._indoorInfo){return}var kB=this._isMobile;var e=this._div=b5("div");e8.ac(e,"floor-select-container");kB&&e8.ac(e,"mobile");kB&&e8.ac(e,"all-border-radius");var i=this._btnTop=b5("button");e8.ac(i,"floor-switch-top");e8.ac(i,"top-border-radius");var kz=b5("div");e8.ac(kz,"floor-switch-top-icon");i.appendChild(kz);var ky=this._btnBottom=b5("button");var T=b5("div");e8.ac(T,"floor-switch-bottom-icon");ky.appendChild(T);e8.ac(ky,"floor-switch-bottom");e8.ac(ky,"bottom-border-radius");var kx=this._floorsContainer=b5("div");e8.ac(kx,"floors-container");kx.appendChild(this._createFloorsDom());this._div.appendChild(i);this._div.appendChild(kx);this._div.appendChild(ky);var kC=0;if(this._btnTop.style.display===""){kC=2*this._sizeConfig.SWITCH_ARROW_HEIGHT}this._div.style.height=parseInt(this._floorsContainer.style.height,10)+kC+"px";this._map.getContainer().appendChild(this._div);if(!kB){var kA=this;setTimeout(function(){kA._div.style.right="20px"},20)}};ax.prototype._createFloorsDom=function(){if(!this._indoorInfo){return}var T=this._ol=b5("ol");var kz=this._indoorInfo.currentFloor;for(var ky=this._indoorInfo.floors.length-1;ky>=0;ky--){var kA=this._indoorInfo.floors[ky].floorName;var e=b5("li");var kx=b5("button");e8.ac(kx,"btn-select-floor");if(ky===kz){e8.ac(kx,"selected")}kx.setAttribute("data-floor",ky);kx.innerHTML=kA;e.appendChild(kx);T.appendChild(e)}return T};ax.prototype._updateUI=function(){if(!this._ol){this._render();this._bind();this._adjustDisplayHeight();return}this._ol=null;this._ol=this._createFloorsDom();this._floorsContainer.innerHTML="";this._floorsContainer.appendChild(this._ol);this._adjustDisplayHeight()};ax.prototype._bindDom=function(){var e=this;e8.on(this._floorsContainer,"click",function(kx){var T=kx.target||kx.srcElement;if(T.tagName.toLowerCase()==="button"){e._map.showIndoor(e._indoorInfo.uid,parseInt(T.getAttribute("data-floor"),10));var i=new fU("onindoor_bar_click");i.uid=e._indoorInfo.uid;e._map.dispatchEvent(i)}});e8.on(this._floorsContainer,"mouseover",function(T){var i=T.target;if(i.tagName.toLowerCase()==="button"){e8.ac(i,"hover")}});e8.on(this._floorsContainer,"mouseout",function(T){var i=T.target;if(i.tagName.toLowerCase()==="button"){e8.rc(i,"hover")}});e8.on(this._floorsContainer,"touchstart",function(T){var i=T.target;if(i.tagName.toLowerCase()==="button"){e8.ac(i,"onmousedown")}});e8.on(this._floorsContainer,"touchend",function(T){var i=T.target;if(i.tagName.toLowerCase()==="button"){e8.rc(i,"onmousedown")}});e8.on(this._btnTop,"mouseover",function(i){if(this._disable){return}e8.ac(this,"hover")});e8.on(this._btnTop,"mouseout",function(i){e8.rc(this,"hover")});e8.on(this._btnBottom,"mouseover",function(i){if(this._disable){return}e8.ac(this,"hover")});e8.on(this._btnBottom,"mouseout",function(i){e8.rc(this,"hover")});e8.on(this._btnTop,"touchstart",function(i){if(this.className.indexOf("disable")>-1){return}e8.ac(this,"onmousedown")});e8.on(this._btnTop,"touchend",function(i){e8.rc(this,"onmousedown")});e8.on(this._btnBottom,"touchstart",function(i){if(this.className.indexOf("disable")>-1){return}e8.ac(this,"onmousedown")});e8.on(this._btnBottom,"touchend",function(i){e8.rc(this,"onmousedown")});e8.on(this._btnTop,"click",function(i){e._setBarSliderTop(parseInt(e._ol.style.top,10)+26)});e8.on(this._btnBottom,"click",function(i){e._setBarSliderTop(parseInt(e._ol.style.top,10)-26)});e8.on(this._div,"mousemove",al);e8.on(this._div,"wheel",hF);e8.on(this._div,"mousewheel",hF);this._map.addEventListener("resize",function(){e._adjustDisplayHeight()})};ax.prototype._adjustDisplayHeight=function(){if(!this._indoorInfo){return}var kz=this._map.getSize().height;var kA=this._sizeConfig.FLOOR_BTN_HEIGHT;var kB=kz-291-100;if(this._isMobile){kB=kz-12-108-this._map.config.bottomOffset}var e=this._indoorInfo.floors.length;var T=e*kA;var kx=e;var kD=0;var kE=this._floorsContainer.children[0];if(T>kB){this._showArrow=true;e8.rc(kE.children[0].children[0],"top-border-radius");e8.rc(kE.children[e-1].children[0],"bottom-border-radius")}else{this._showArrow=false;e8.ac(kE.children[0].children[0],"top-border-radius");e8.ac(kE.children[e-1].children[0],"bottom-border-radius")}while(T>kB){if(kx===0){break}kx--;kD=2*this._sizeConfig.SWITCH_ARROW_HEIGHT;T=kx*kA+kD}this._currentDisplayHeight=T;if(kx<3){this._setAdjustVisbile(false)}else{this._setAdjustVisbile(true)}this._floorsContainer.style.height=kx*kA+"px";var ky=this._indoorInfo.currentFloor;var i=e-ky;var kC=ky-1;this._div.style.height=parseInt(this._floorsContainer.style.height,10)+kD+"px";var kF=-(e-(ky+Math.round(kx/2)))*kA;this._setBarSliderTop(kF);if(kx=i*T){kx=e-i*T;e8.ac(this._btnBottom,"disable");e8.rc(this._btnBottom,"hover");this._btnBottom._disable=true}else{e8.rc(this._btnBottom,"disable");this._btnBottom._disable=false}if(kx>=0){kx=0;e8.ac(this._btnTop,"disable");e8.rc(this._btnTop,"hover");this._btnTop._disable=true}else{e8.rc(this._btnTop,"disable");this._btnTop._disable=false}this._ol.style.top=kx+"px"};ax.prototype._setAdjustVisbile=function(e){if(this._adjustVisible===e){return}this._adjustVisible=e;if(e&&this._visible){this._div.style.right="20px"}else{this._div.style.right="-30px"}};ax.prototype._bind=function(){var i=this._map;var e=this;i.on("indoor_status_changed",function(kB){if(e._visible===false){return}var T=e._ol;var kz=kB.uid;if(!kz){return}var kA=kB.floor;for(var ky=0;ky=h2.HIGH_RES_MIN_RATIO?2:1;this._imgPath=E.imgPath+"earth-navi-control-pc4"+(this._imgRatio===2?"-2x.png":".png");this._enabled=true;var e=this;this._setHeadingOptions={callback:function(){e._target.setLock(false)}};this._init()}e8.extend(iY.prototype,{_init:function(){this._createDom();this._render();this._bindDom();this._bind();this._updateUI();this._checkEnable()},_checkEnable:function(){if(this._target.getZoom()>=this._target._enableHeadingZoom){this.enable()}else{this.disable()}},_createDom:function(){var i=this._div=b5("div");var e=i.style;e.position="absolute";e.zIndex=5;e.top="0";e.left="0";e.width="52px";e.height="54px";e.background="url("+this._imgPath+") no-repeat";e.backgroundSize="266px auto";this._rotateCCW=this._createButton();this._rotateCCW.title="逆时针转动";e=this._rotateCCW.style;e.left="2px";e.top="5px";e.zIndex="1";e.width="15px";e.height="42px";e.backgroundPosition="-75px -5px";this._rotateCW=this._createButton();this._rotateCW.title="顺时针转动";e=this._rotateCW.style;e.right="2px";e.top="5px";e.zIndex="1";e.width="15px";e.height="42px";e.backgroundPosition="-75px -5px";e.WebkitTransform=e.transform="scaleX(-1)";this._compass=this._createButton();this._compass.title="恢复正北方向";e=this._compass.style;e.left="19px";e.top="4px";e.width="14px";e.height="44px";e.backgroundPosition="-56px -4px";e.WebkitTransform=e.transform="rotate(0deg)";this._div.appendChild(this._rotateCCW);this._div.appendChild(this._compass);this._div.appendChild(this._rotateCW);this._domRendered=true},_createButton:function(){var e=b5("button");var i=e.style;i.position="absolute";i.outline="none";i.border="none";i.background="url("+this._imgPath+") no-repeat";i.backgroundSize="266px auto";i.cursor="pointer";return e},_render:function(){this._outContainer.appendChild(this._div)},enable:function(){this._enabled=true;if(this._domRendered){this._rotateCCW.style.cursor="pointer";this._rotateCCW.style.opacity=1;this._rotateCW.style.cursor="pointer";this._rotateCW.style.opacity=1;this._compass.style.cursor="pointer";this._compass.style.opacity=1}},disable:function(){this._enabled=false;if(this._domRendered){this._rotateCCW.style.cursor="";this._rotateCCW.style.opacity=0.4;this._rotateCW.style.cursor="";this._rotateCW.style.opacity=0.4;this._compass.style.cursor="";this._compass.style.opacity=0.4}},_bindDom:function(){iR(this._div,["mousedown","click","dblclick"]);var i=this._map;var e=this;this._rotateCW.addEventListener("click",function(){if(e._isOperating||e._enabled===false){return}if(e._target.getLock()){return}if(e._target.getHeading()===360){e._target.setHeading(0)}e._target.setLock(true);e._target.setHeading(e._target.getHeading()+90,e._setHeadingOptions);i.fire(new fU("onrotatecwclick"))},false);this._rotateCCW.addEventListener("click",function(){if(e._isOperating||e._enabled===false){return}if(e._target.getLock()){return}if(e._target.getHeading()===-360){e._target.setHeading(0)}e._target.setLock(true);e._target.setHeading(e._target.getHeading()-90,e._setHeadingOptions);i.fire(new fU("onrotateccwclick"))},false);this._rotateCW.addEventListener("mouseover",function(){if(e._enabled===false){return}this.style.backgroundPosition="-89px -5px"},false);this._rotateCW.addEventListener("mouseout",function(){if(e._enabled===false){return}this.style.backgroundPosition="-75px -5px"},false);this._rotateCCW.addEventListener("mouseover",function(){if(e._enabled===false){return}this.style.backgroundPosition="-89px -5px"},false);this._rotateCCW.addEventListener("mouseout",function(){if(e._enabled===false){return}this.style.backgroundPosition="-75px -5px"},false);this._compass.addEventListener("click",function(){if(e._isOperating||e._enabled===false){return}if(e._target.getLock()){return}e._target.setLock(true);var T=false;if(e._target.getTilt()!==0){T=true;e._target.setTilt(0,e._setHeadingOptions)}if(e._target.getHeading()%360!==0){T=true;e._target.resetHeading(e._setHeadingOptions)}if(!T){e._target.setLock(false)}i.fire(new fU("oncompassclick"))},false)},_bind:function(){var e=this;this._bindTarget(this._target);if(this._map._renderType==="webgl"){this._map.addEventListener("maptypechange",function(i){if(this.mapType==="B_EARTH_MAP"){e._target=e._map._earth}else{e._target=e._map}e._bindTarget(e._target);e._checkEnable()})}},_bindTarget:function(i){if(i===this._map&&this._mapBinded){return}if(i===this._map._earth&&this._earthBinded){return}var e=this;i.addEventListener("heading_changed",function(T){e._updateUI()});i.addEventListener("animation_start",function(T){e._isOperating=true});i.addEventListener("animation_end",function(T){e._isOperating=false});i.on("load",function(){e._checkEnable()});i.on("zoom_changed",function(){e._checkEnable()});if(i===this._map){this._mapBinded=true}else{this._earthBinded=true}},_updateUI:function(){var e=this._target.getHeading();var i=this._compass.style;i.WebkitTransform=i.transform="rotate("+e+"deg)"},hide:function(){this._div.style.display="none"},show:function(){this._div.style.display="block"}});function c0(T,i){this._map=T;this._target=T;var kx=T.temp.originMapType||T.mapType;if(kx==="B_EARTH_MAP"&&T._earth){this._target=T._earth}this._outContainer=i||T.getContainer();this._imgRatio=gr()>=h2.HIGH_RES_MIN_RATIO?2:1;this._imgPath=E.imgPath+"gl-navi-control-pc4"+(this._imgRatio===2?"-2x.png":".png");this._enabled=true;var e=this;this._setTiltOptions={callback:function(){e._target.setLock(false)}};this._init()}e8.extend(c0.prototype,{_init:function(){this._createDom();this._render();this._bindDom();this._bind();this._checkEnable()},_checkEnable:function(){if(this._target.getZoom()>=this._target._enableTiltZoom){this.enable()}else{this.disable()}},_createDom:function(){var e=this._div=b5("button");e.title="倾斜";var i=e.style;i.position="absolute";i.zIndex=5;i.outline="none";i.border="none";i.cursor="pointer";i.width="26px";i.height="26px";i.top="56px";i.right="13px";i.background="url("+this._imgPath+") no-repeat #fff";i.backgroundSize="266px auto";i.backgroundPosition="-110px 1px";i.boxShadow="1px 2px 1px rgba(0, 0, 0, 0.15)"},enable:function(){this._enabled=true;if(this._div){this._div.style.cursor="pointer"}this._updateUI()},disable:function(){this._enabled=false;if(this._div){this._div.style.cursor=""}this._updateUI()},_render:function(){this._outContainer.appendChild(this._div)},_bindDom:function(){var e=this;this._div.addEventListener("mousedown",function(kx){if(!e._enabled){return}if(e._target.getLock()){return}var i=e._target.getTilt();var T;if(i===e._map.getCurrentMaxTilt()){T="out"}else{if(i===0){T="in"}else{T=e._preTrend?e._preTrend:"in"}}e._curTrend=T;e._clickTimer=setTimeout(function(){e._map.fire(new fU("ontiltmsdown"));e._tiltAni=new fJ({duration:9999999,render:function(ky){i=e._target.getTilt();if(T==="in"&&i0){e._target.setTilt(i-1,{noAnimation:true})}}},finish:function(){e._tiltAni=null}});e._clickTimer=null},200);kx.stopPropagation()},false);this._div.addEventListener("mouseup",function(i){if(!e._enabled){return}if(e._tiltAni){e._tiltAni.stop()}e._preTrend=e._curTrend},false);this._div.addEventListener("click",function(kx){if(!e._enabled){return}if(!e._clickTimer){return}if(e._target.getLock()){return}clearTimeout(e._clickTimer);e._map.fire(new fU("ontiltclick"));var i=e._target.getTilt();e._target.setLock(true);kx.stopPropagation();var T=e._map.getCurrentMaxTilt();if(e._curTrend==="in"){e._target.setTilt(T,e._setTiltOptions)}else{if(e._curTrend==="out"){e._target.setTilt(0,e._setTiltOptions)}else{if(i0){i=78}if(this._mouseOver){e=52}if(this._enabled===false){kx=26;e=0;i=0}var ky="-"+(110+i+kx+e)+"px 1px";this._div&&(this._div.style.backgroundPosition=ky);if(this._enabled){if(T>0){this._div&&(this._div.title="恢复")}else{this._div&&(this._div.title="倾斜")}}else{this._div&&(this._div.title="请放大地图后操作")}},hide:function(){this._div.style.display="none"},show:function(){this._div.style.display="block"}});function hD(i){dg.call(this);this._opts={container:null,cursor:"default",marker:true};this._opts=e8.extend(this._opts,i);this._type="contextmenu";this._map=null;this._container;this._left=0;this._top=0;this._items=[];this._rItems=[];this._dividers=[];this._enable=true;this.curPixel=null;this.curPoint=null;this._isOpen=false;var e=this;hj.load("menu",function(){e._draw()});hN.sendMessage(a1(4,5,2),["control","menu"])}hD.inherits(dg,"ContextMenu");e8.extend(hD.prototype,{initialize:function(i,e){this._map=i;this._overlay=e||null},remove:function(){this._map=this._overlay=null},addItem:function(ky,e){if(!ky||ky._type!="menuitem"||ky._text==""||ky._width<=0){return}for(var kx=0,T=this._items.length;kxthis._items.length-1){e=-1}ky._insertIndex=e;if(e===-1){this._items.push(ky);this._rItems.push(ky)}else{this._items.splice(e,0,ky);this._rItems.splice(e,0,ky)}},removeItem:function(kx){if(!kx||kx._type!="menuitem"){return}for(var T=0,e=this._items.length;Tthis._items.length-1){e=-1}var i={_type:"divider",_dIndex:this._dividers.length,_insertIndex:e};this._dividers.push({dom:null});if(e===-1){this._items.push(i)}else{this._items.splice(e,0,i)}},removeSeparator:function(T){if(!this._dividers[T]){return}for(var kx=0,e=this._items.length;kxT){this._items[kx]._dIndex--}}this._dividers.splice(T,1)},getDom:function(){return this._container},show:function(){if(this._isOpen==true){return}this._isOpen=true},hide:function(){if(this._isOpen==false){return}this._isOpen=false},setCursor:function(e){if(!e){return}this._opts.cursor=e},getItem:function(e){return this._rItems[e]},enable:function(){this._enable=true},disable:function(){this._enable=false}});function ie(T,kx,i){if(!T||!kx||typeof kx!="function"){return}dg.call(this);this._opts={width:100,id:""};i=i||{};this._opts.width=(i.width*1)?i.width:100;this._opts.id=i.id?i.id:"";this._text=T+"";this._callback=kx;this._map=null;this._type="menuitem";this._contextmenu=null;this._container=null;this._enabled=true;var e=this;hj.load("menu",function(){e._draw()})}ie.inherits(dg,"MenuItem");e8.extend(ie.prototype,{initialize:function(e,i){this._map=e;this._contextmenu=i},remove:function(){this._contextmenu=null;this._map=null},setText:function(e){if(!e){return}this._text=e+""},getDom:function(){return this._container},enable:function(){this._enabled=true},disable:function(){this._enabled=false}});function ih(e,i){this.setSouthWest(e);this.setNorthEast(i)}e8.extend(ih.prototype,{isEmpty:function(){return this.sw===null&&this.ne===null},equals:function(e){if(!e||e.isEmpty()||this.isEmpty()){return false}return this.sw.equals(e.sw)&&this.ne.equals(e.ne)},containsBounds:function(e){if(!e||e.isEmpty()||this.isEmpty()){return false}return(e.sw.lng>this.sw.lng&&e.ne.lngthis.sw.lat&&e.ne.latMath.max(this.sw.lng,this.ne.lng)||Math.max(T.sw.lat,T.ne.lat)Math.max(this.sw.lat,this.ne.lat)){return null}var ky=Math.max(this.sw.lng,T.sw.lng);var i=Math.min(this.ne.lng,T.ne.lng);var kx=Math.max(this.sw.lat,T.sw.lat);var e=Math.min(this.ne.lat,T.ne.lat);return new ih(new cF(ky,kx),new cF(i,e))},setMinMax:function(){this.minX=this.sw?this.sw.lng:null;this.minY=this.sw?this.sw.lat:null;this.maxX=this.ne?this.ne.lng:null;this.maxY=this.ne?this.ne.lat:null},containsPoint:function(e){if(!e){return}return(e.lng>=this.sw.lng&&e.lng<=this.ne.lng&&e.lat>=this.sw.lat&&e.lat<=this.ne.lat)},extend:function(e){if(!e){return}var i=e.lng;var T=e.lat;if(!this.sw){this.sw=e.clone()}if(!this.ne){this.ne=e.clone()}if(this.sw.lng>i){this.sw.lng=i}if(this.ne.lngT){this.sw.lat=T}if(this.ne.lat=0&&e<90||e>=270&&e<360){if(this.normalizedTopRight.lng-180&&e.lat<90&&e.lat>-90){return e}return this.convertMC2LL(e)},convertMC2LL:function(e){if(e===null){return e}if(!e){return new cF(0,0)}var T;var ky;T=new cF(Math.abs(e.lng),Math.abs(e.lat));for(var kx=0;kx=this.MCBAND[kx]){ky=this.MC2LL[kx];break}}var kz=this.convertor(e,ky);return new cz(kz.lat,kz.lng)},convertLL2MC:function(kA){if(!kA){return new cF(0,0)}var kC=kA.lat;var kx=kA.lng;kx=this.getLoop(kA.lng,-180,180);kC=cj(kC,-85,85);var kz;for(var ky=0;ky=this.LLBAND[ky]){kz=this.LL2MC[ky];break}}if(!kz){for(ky=0;kye){T-=e-i}while(Ti-1){e=e-i}while(e<0){e=e+i}return e},getLoopBox:function(e,kx){var i=this.HALF_SIZE*2;if(e[0]>0&&kx[2]<0){kx[2]=kx[2]+i}else{if(e[0]<0&&kx[0]>0){kx[0]=kx[0]-i}}return kx},createOrUpdateTileCoord:function(T,e,kx,i){if(i!==undefined){i[0]=T;i[1]=e;i[2]=kx;return i}else{return[T,e,kx]}},createOrUpdateTileRange:function(e,kx,ky,T,i){if(i!==undefined){i.minX=e;i.maxX=kx;i.minY=ky;i.maxY=T;return i}else{return{minX:e,maxX:kx,minY:ky,maxY:T}}},fromEPSG4326:function(T,kC,kA){var ky=T.length;var kz=kA>1?kA:2;var e=kC;if(e===undefined){if(kz>2){e=T.slice()}else{e=new Array(ky)}}for(var kx=0;kxthis.MAX_SAFE_Y){kB=this.MAX_SAFE_Y}else{if(kB<-this.MAX_SAFE_Y){kB=-this.MAX_SAFE_Y}}e[kx+1]=kB}return e},toEPSG4326:function(T,kB,kA){var ky=T.length;var kz=kA>1?kA:2;var e=kB;if(e===undefined){if(kz>2){e=T.slice()}else{e=new Array(ky)}}for(var kx=0;kx90){i=90}}while(e<-180){e+=360}while(e>180){e-=360}e=e||0;i=i||0;cF.call(this,e,i)}cz.inherits(cF,"LatLng");e8.extend(cz.prototype,{equals:function(e){return(this.lat===e.lat&&this.lng===e.lng)},clone:function(){return new cz(this.lat,this.lng)},add:function(e){return new cz(this.lng+e.lng,this.lat+e.lat)},sub:function(e){return new cz(this.lat-e.lat,this.lng-e.lng)},mult:function(e){return new cz(this.lng*e,this.lat*e)},div:function(e){return new cz(this.lng/e,this.lat/e)},mag:function(){return Math.sqrt(this.lng*this.lng+this.lat*this.lat)},getLngSpan:function(e){var i=this.lng;var T=Math.abs(e-i);if(T>180){T=360-T}return T},toString:function(){return"LatLng"},toGeoJSON:function(){var i="Point";var T=[this.lng,this.lat];var e={type:"Feature",geometry:{type:i,coordinates:T},properties:this.properties};return e}});function cO(e,i){if(e&&!i){i=e}this._sw=this._ne=null;this._swLng=this._swLat=null;this._neLng=this._neLat=null;if(e){this._sw=new cz(e.lat,e.lng);this._ne=new cz(i.lat,i.lng);this._swLng=e.lng;this._swLat=e.lat;this._neLng=i.lng;this._neLat=i.lat}}e8.extend(cO.prototype,{isEmpty:function(){return !this._sw||!this._ne},equals:function(e){if(this.isEmpty()){return false}return this.getSouthWest().equals(e.getSouthWest())&&this.getNorthEast().equals(e.getNorthEast())},getSouthWest:function(){return this._sw},getNorthEast:function(){return this._ne},containsBounds:function(e){if(this.isEmpty()||e.isEmpty()){return false}return(e._swLng>this._swLng&&e._neLngthis._swLat&&e._neLatMath.max(this._swLng,this._neLng)||Math.max(T._swLat,T._neLat)Math.max(this._swLat,this._neLat)){return false}var ky=Math.max(this._swLng,T._swLng);var i=Math.min(this._neLng,T._neLng);var kx=Math.max(this._swLat,T._swLat);var e=Math.min(this._neLat,T._neLat);this._sw=new cz(kx,ky);this._ne=new cz(e,i);this._swLng=ky;this._swLat=kx;this._neLng=i;this._neLat=e;return true},containsPoint:function(e){if(this.isEmpty()){return false}return(e.lng>=this._swLng&&e.lng<=this._neLng&&e.lat>=this._swLat&&e.lat<=this._neLat)},extend:function(e){var i=e.lng;var T=e.lat;if(!this._sw){this._sw=new cz(0,0)}if(!this._ne){this._ne=new cz(0,0)}if(!this._swLng||this._swLng>i){this._sw.lng=this._swLng=i}if(!this._neLng||this._neLngT){this._sw.lat=this._swLat=T}if(!this._neLat||this._neLate.lat){this._swLat=e.lat}if(this._swLng>e.lng){this._swLng=e.lng}if(this._neLat10){T&&T({status:25});return}var e=E.apiHost+"?qt=coords&coords=";e8.each(i,function(kz){e+=kz.lng+","+kz.lat+";"});e=e.replace(/;$/gi,"");e=e+"&from="+ky+"&to="+kx+"&v=gl&type=webgl&ak="+eY;dp.request(e,function(kA){data=kA.content;if(typeof data!=="undefined"&&data!==null&&data.status===0){var kz=[];e8.each(data.result,function(kB){kz.push(new cF(kB.x,kB.y))});delete data.result;data.points=kz}else{if(kA.result&&kA.result.error){data={status:kA.result.errror,message:"访问错误,请参考错误状态码https://lbsyun.baidu.com/index.php?title=webapi/appendix"}}}T&&T(data)})}});var eo={idle:0,freeze:1,zooming:2,dragging:3,moving:4,readyToDrag:5,readyToPinch:6,pinching:7,stdMapCtrlDrag:8,KEY_LEFT:37,KEY_UP:38,KEY_RIGHT:39,KEY_DOWN:40,arrowOpCodes:{37:1,38:2,39:4,40:8}};var am={_map:null,_html:"
",_maskElement:null,_cursor:"default",inUse:false,show:function(e){if(!this._map){this._map=e}this.inUse=true;if(!this._maskElement){this._createMask(e)}this._maskElement.style.display="block"},_createMask:function(i){if(!this._map){this._map=i}if(!this._map){return}var e=this._maskElement=bR(this._map.container,this._html);e8.on(e,"mouseup",function(T){if(T.button==2){hF(T)}});e8.on(e,"contextmenu",hF);e.style.display="none"},getDrawPoint:function(kx,kA,ky){kx=window.event||kx;var i=kx.offsetX||kx.layerX||0;var kz=parseInt(kx.offsetY)||parseInt(kx.layerY)||0;var T=kx.target||kx.srcElement;if(T!=am.getDom(this._map)&&kA==true){while(T&&T!=this._map.container){if(!(T.clientWidth==0&&T.clientHeight==0&&T.offsetParent&&T.offsetParent.nodeName.toLowerCase()=="td")){i+=T.offsetLeft;kz+=T.offsetTop}T=T.offsetParent}}if(T!=am.getDom(this._map)&&T!=this._map.container){return}if(typeof i==="undefined"||typeof kz==="undefined"){return}if(isNaN(i)||isNaN(kz)){return}if(ky){i=i+ky.x;kz=kz+ky.y}return this._map.pixelToPointIn(new ft(i,kz))},hide:function(){if(!this._map){return}this.inUse=false;if(this._maskElement){this._maskElement.style.display="none"}},getDom:function(e){if(!this._maskElement){this._createMask(e)}return this._maskElement},setCursor:function(e){this._cursor=e||"default";if(this._maskElement){this._maskElement.style.cursor=this._cursor}}};function aU(){this._type="overlay"}aU.inherits(e8.BaseClass,"Overlay");aU.getZIndex=function(i,e){i=i*1;if(!i){return 0}if(e){i=jt.convertMC2LL(new cF(0,i)).lat}return(i*-100000)<<1};e8.extend(aU.prototype,{_i:function(T){this._map=T;if(!this.domElement&&bZ(this.initialize)){this.domElement=this.initialize(T);if(this.domElement){this.domElement.style.WebkitUserSelect="none";if(this.enableDraggingMap!==undefined&&!this.enableDraggingMap&&!(this instanceof u)){var i=["mousedown","mouseout","mouseover","click","keydown","selectstart"];var e=this;e8.each(i,function(kx){e8.on(e.domElement,kx,al)})}}}this.draw()},initialize:function(e){throw"initialize方法未实现"},draw:function(){throw"draw方法未实现"},remove:function(){if(this.domElement&&this.domElement.parentNode){this.domElement.parentNode.removeChild(this.domElement)}this.domElement=null;this.dispatchEvent(new fU("onremove"))},hide:function(){this._visible=false;e8.hide(this.domElement)},show:function(){this._visible=true;e8.show(this.domElement)},getMap:function(){return this._map},dispose:function(){e8.BaseClass.prototype.decontrol.call(this)}});function eL(){e8.BaseClass.call(this);aU.call(this);this._visible=true;this._visibleInternal=true;this.zIndex=0;this.infoWindow=null;this._dblclickTime=0}eL.inherits(aU,"OverlayInternal");e8.extend(eL.prototype,{initialize:function(e){this.map=e;e8.BaseClass.call(this,this.hashCode);return null},draw:function(){},remove:function(){this.decontrol();aU.prototype.remove.call(this)},destroy:function(){},hide:function(){this._visible=false},show:function(){this._visible=true},getDom:function(){return this.domElement},getContainer:function(){return this.domElement},setClassName:function(){},setConfig:function(i){if(!i){return}for(var e in i){if(i.hasOwnProperty(e)){this._config[e]=i[e]}}},getPoint:function(T,kx){if(!T){return this.point}else{var e=kx?kx.width:0;var ky=kx?kx.height:0;if(this.map){var i=this.map.pointToPixelIn(this.point);if(this._config&&this._config.offset){i.x=i.x+this._config.offset.width+e;i.y=i.y+this._config.offset.height+ky}else{i.x=i.x+e;i.y=i.y+ky}return this.map.pixelToPointIn(i)}}},setZIndex:function(e){this.zIndex=e},isVisible:function(){if(!this.domElement){return false}return !!this._visible},enableMassClear:function(){this._config.enableMassClear=true},disableMassClear:function(){this._config.enableMassClear=false},showInternal:function(){this._visibleInternal=true},hideInternal:function(e){this._visibleInternal=false;this._hideInternalReason=e},addContextMenu:function(e){this._menu=e},removeContextMenu:function(e){this._menu=null}});function aS(e){this.map=e;this._overlays={};this._overlayArray=[];this._customOverlays=[];e._overlays=this._overlays;e._overlayArray=this._overlayArray;e._customOverlays=this._customOverlays;this._zoomingOrMoving=false;this._init()}aS.prototype._init=function(){if(this.map._renderType!=="webgl"){this._createOverlayContainers()}else{this._createWebGLOverlayContainers()}this._bind()};aS.prototype._createOverlayContainers=function(){var e=this.map;e.temp.overlayDiv=e.overlayDiv=this._createOverlayDiv(e.platform,200);e.temp.overlayDivEx=e.overlayDivEx=this._createOverlayDiv(e.platform,50);e._panes.floatPane=this._createOverlayDiv(e.temp.overlayDiv,800);e._panes.markerMouseTarget=this._createOverlayDiv(e.temp.overlayDiv,700);e._panes.floatShadow=this._createOverlayDiv(e.temp.overlayDiv,600);e._panes.labelPane=this._createOverlayDiv(e.temp.overlayDiv,500);e._panes.markerPane=this._createOverlayDiv(e.temp.overlayDiv,400);if(e.isCanvasMap()){e._panes.mapPane=this._createOverlayDiv(e.temp.overlayDivEx,50)}else{e._panes.mapPane=this._createOverlayDiv(e.temp.overlayDiv,200)}};aS.prototype._createWebGLOverlayContainers=function(){var e=this.map;e.temp.overlayDiv=e.overlayDiv=this._createOverlayDiv(e.platform,200);e._panes.floatPane=this._createOverlayDiv(e.temp.overlayDiv,800);e._panes.markerMouseTarget=this._createOverlayDiv(e.temp.overlayDiv,700);e._panes.floatShadow=this._createOverlayDiv(e.temp.overlayDiv,600);e._panes.labelPane=this._createOverlayDiv(e.temp.overlayDiv,500);e._panes.markerPane=this._createOverlayDiv(e.temp.overlayDiv,400)};aS.prototype._createOverlayDiv=function(e,kx){var T=b5("div");var i=T.style;i.position="absolute";i.top=i.left=i.width=i.height="0";i.zIndex=kx;e.appendChild(T);return T};aS.prototype._bind=function(){var ky=this.map;var kx=this;function i(kA){kx.draw(kA)}if(ky._renderType!=="webgl"){ky.addEventListener("load",i);ky.addEventListener("moveend",i);ky.addEventListener("resize",i);ky.addEventListener("zoomend",i);ky.addEventListener("zooming_inner",i)}else{ky.on("update",i)}ky.on("destroy",function(){ky._overlays={};ky._overlayArray=[];ky._customOverlays=[];ky.overlayDiv=null;ky.overlayDivEx=null;var kA=Object.keys(ky._panes);for(var kB=0;kB=0;kA--){if(kx._customOverlays[kA].enableMassClear!==false){this.removeOverlay(kx._customOverlays[kA]);kx._customOverlays.splice(kA,1)}}});ky.addEventListener("infowindowopen",function(kB){var kA=this.infoWindow;if(kA){e8.hide(kA.popDom);e8.hide(kA.shadowDom)}});function T(){if(this.getMapType()==="B_EARTH_MAP"||this._renderType==="webgl"){if(kx._zoomingOrMoving===false){this._panes.markerMouseTarget.style.display="none";kx._zoomingOrMoving=true}}}function e(kC){if(this.getMapType()==="B_EARTH_MAP"||this._renderType==="webgl"){if(kx._zoomingOrMoving===true){if(this._panes.markerMouseTarget){this._panes.markerMouseTarget.style.display=""}kx._zoomingOrMoving=false;for(var kB=0;kB1){this._config.strokeOpacity=1}if(this._config.fillOpacity<0||this._config.fillOpacity>1){this._config.fillOpacity=1}if(this._config.strokeStyle!=="solid"&&this._config.strokeStyle!=="dashed"&&this._config.strokeStyle!=="dotted"){this._config.strokeStyle="solid"}this.domElement=null;this._bounds=new ih();this.points=[];this.greatCirclePoints=[];this._parseCache=[];this._holesCache=[];this._parseCacheGL=[];this._parseCacheGLRaw=[];this._areaCacheGL=[];this._strokeStyleInfoForGL=[[]];this._fillStyleInfoForGL="";this.vertexMarkers=[];this._temp={}}iS.JOININDEX={miter:0,round:1,bevel:2};iS.CAPINDEX={round:0,butt:1,square:2};iS.inherits(eL,"Graph");iS.getGraphPoints=function(i){var e=[];if(!i||i.length===0){return e}if(typeof i==="string"){var T=i.split(";");e8.each(T,function(ky){var kx=ky.split(",");e.push(new cF(kx[0],kx[1]))})}if(i.constructor===Array&&i.length>0){e=i}return e};iS.parseTolerance={0:[0.09,0.005,0.0001,0.00001],1:[9000,500,20,1]};e8.extend(iS.prototype,{initialize:function(e){this.map=e;return null},draw:function(){},setPoints:function(e){this._clearCache();this.points=iS.getGraphPoints(e).slice(0);this._calcBounds()},setPathIn:function(e){this.setPoints(e)},_calcBounds:function(){if(!this.points){return}var e=this;e._bounds=new ih();if(!this.hasMultipleParts){e8.each(this.points,function(i){e._bounds.extend(i)})}else{e8.each(this.points,function(i){e8.each(i,function(T){e._bounds.extend(T)})})}},getPoints:function(){return this.points},getPathIn:function(){return this.points},setPointAt:function(i,e){if(!e||!this.points[i]){return}this._clearCache();this.points[i]=new cF(e.lng,e.lat);this._calcBounds()},setPositionAt:function(i,e){if(!e||!this.points[i]){return}var T=jt.convertLL2MC(e);this.setPointAt(i,T)},setOptions:function(i){i=i||{};for(var e in i){if(i.hasOwnProperty(e)){this._config[e]=i[e]}}},setStrokeColor:function(e){this._config.strokeColor=e},getStrokeColor:function(){return this._config.strokeColor},setStrokeLineCap:function(e){this._config.strokeLineCap=e},getStrokeLineCap:function(){return this._config.strokeLineCap},setStrokeLineJoin:function(e){this._config.strokeLineJoin=e},getStrokeLineJoin:function(){return this._config.strokeLineJoin},setStrokeWeight:function(e){if(e>0){this._config.strokeWeight=e}},getStrokeWeight:function(){return this._config.strokeWeight},setStrokeOpacity:function(e){if(!e||e>1||e<0){return}this._config.strokeOpacity=e},getStrokeOpacity:function(){return this._config.strokeOpacity},setFillOpacity:function(e){if(e>1||e<0){return}this._config.fillOpacity=e},getFillOpacity:function(){return this._config.fillOpacity},setStrokeStyle:function(e){if(e!=="solid"&&e!=="dashed"&&e!=="dotted"){return}this._config.strokeStyle=e},getStrokeStyle:function(){return this._config.strokeStyle},setFillColor:function(e){this._config.fillColor=e||""},getFillColor:function(){return this._config.fillColor},getBoundsIn:function(){this._bounds.setMinMax();return this._bounds},getBounds:function(){var e=this.getBoundsIn();var i=new ih(jt.convertMC2LL(e.getSouthWest()),jt.convertMC2LL(e.getNorthEast()));i.setMinMax();return i},remove:function(){if(this.map){this.map.removeEventListener("onmousemove",this._graphMouseEvent);this.map.removeEventListener("onclick",this._graphClickEvent)}eL.prototype.remove.call(this);this._clearCache();var e=new fU("onlineupdate");e.action="remove";e.overlay=this;this.fire(e)},enableEditing:function(){if(this.points.length<2){return}this._config.enableEditing=true;var e=this;hj.load("poly",function(){e.addVertexs()},true)},disableEditing:function(){this._config.enableEditing=false;var e=this;hj.load("poly",function(){e.clearVertexs()},true)},getLength:function(){if(typeof this._length==="number"){return this._length}if(typeof this._config.totalLength==="number"){this._length=this._config.totalLength;return this._length}var T=0;if(this.points.length<=1){this._length=0;return T}for(var e=0;e0){kz=this.greatCirclePoints}var ky=e.config.coordType===2?1:e.config.coordType;var kA=this.getParseTolerance(e.getZoom(),ky);if(!this.hasMultipleParts){var kD=d1(kz,kA)}else{var kD=[];for(var T=0;Tky.maxY){T.bottom=4;T.all+=T.bottom}}if(e>ky.maxX){T.right=2;T.all+=T.right}else{if(e=this.tokens.length-1};this.isCommandOrEnd=function(){if(this.isEnd()){return true}return this.tokens[this.i+1].match(/^[A-Za-z]$/)!=null};this.isRelativeCommand=function(){switch(this.command){case"m":case"l":case"h":case"v":case"c":case"s":case"q":case"t":case"a":case"z":return true;break}return false};this.getToken=function(){this.i++;return this.tokens[this.i]};this.getScalar=function(){return parseFloat(this.getToken())};this.nextCommand=function(){this.previousCommand=this.command;this.command=this.getToken()};this.getPoint=function(){var T=new dR.Point(this.getScalar(),this.getScalar());return this.makeAbsolute(T)};this.getAsControlPoint=function(){var T=this.getPoint();this.control=T;return T};this.getAsCurrentPoint=function(){var T=this.getPoint();this.current=T;return T};this.getReflectedControlPoint=function(){if(this.previousCommand.toLowerCase()!="c"&&this.previousCommand.toLowerCase()!="s"&&this.previousCommand.toLowerCase()!="q"&&this.previousCommand.toLowerCase()!="t"){return this.current}var T=new dR.Point(2*this.current.x-this.control.x,2*this.current.y-this.control.y);return T};this.makeAbsolute=function(T){if(this.isRelativeCommand()){T.x+=this.current.x;T.y+=this.current.y}return T};this.addMarker=function(kx,ky,T){if(T!=null&&this.angles.length>0&&this.angles[this.angles.length-1]==null){this.angles[this.angles.length-1]=this.points[this.points.length-1].angleTo(T)}this.addMarkerAngle(kx,ky==null?null:ky.angleTo(kx))};this.addMarkerAngle=function(kx,T){this.points.push(kx);this.angles.push(T)};this.getMarkerPoints=function(){return this.points};this.getMarkerAngles=function(){for(var kx=0;kx1){kD*=Math.sqrt(kS);kC*=Math.sqrt(kS)}var kK=(kF==kB?-1:1)*Math.sqrt(((Math.pow(kD,2)*Math.pow(kC,2))-(Math.pow(kD,2)*Math.pow(k0.y,2))-(Math.pow(kC,2)*Math.pow(k0.x,2)))/(Math.pow(kD,2)*Math.pow(k0.y,2)+Math.pow(kC,2)*Math.pow(k0.x,2)));if(isNaN(kK)){kK=0}var kJ=new dR.Point(kK*kD*k0.y/kC,kK*-kC*k0.x/kD);var ky=new dR.Point((kV.x+kG.x)/2+Math.cos(T)*kJ.x-Math.sin(T)*kJ.y,(kV.y+kG.y)/2+Math.sin(T)*kJ.x+Math.cos(T)*kJ.y);var kQ=function(k1){return Math.sqrt(Math.pow(k1[0],2)+Math.pow(k1[1],2))};var kM=function(k2,k1){return(k2[0]*k1[0]+k2[1]*k1[1])/(kQ(k2)*kQ(k1))};var kY=function(k2,k1){return(k2[0]*k1[1]=1){kW=0}var kP=1-kB?1:-1;var kU=kZ+kP*(kW/2);var i=new dR.Point(ky.x+kD*Math.cos(kU),ky.y+kC*Math.sin(kU));kT.addMarkerAngle(i,kU-kP*Math.PI/2);kT.addMarkerAngle(kG,kU-kP*Math.PI);kE.addPoint(kG.x,kG.y);if(kR!=null){var kM=kD>kC?kD:kC;var kN=kD>kC?1:kD/kC;var kL=kD>kC?kC/kD:1;kR.translate(ky.x,ky.y);kR.rotate(T);kR.scale(kN,kL);kR.arc(0,0,kM,kZ,kZ+kW,1-kB);kR.scale(1/kN,1/kL);kR.rotate(-T);kR.translate(-ky.x,-ky.y)}}break;case"Z":case"z":if(kR!=null){kR.closePath()}kT.current=kT.start}}return kE};this.getMarkers=function(){var kx=this.PathParser.getMarkerPoints();var kz=this.PathParser.getMarkerAngles();var ky=[];for(var T=0;Tthis.x2){this.x2=ky}}if(kz!=null){if(isNaN(this.y1)||isNaN(this.y2)){this.y1=kz;this.y2=kz}if(kzthis.y2){this.y2=kz}}};this.addX=function(ky){this.addPoint(ky,null)};this.addY=function(ky){this.addPoint(null,ky)};this.addBoundingBox=function(ky){this.addPoint(ky.x1,ky.y1);this.addPoint(ky.x2,ky.y2)};this.addQuadraticCurve=function(kD,kC,kz,ky,kF,kE){var kB=kD+2/3*(kz-kD);var kA=kC+2/3*(ky-kC);var kH=kB+1/3*(kF-kD);var kG=kA+1/3*(kE-kC);this.addBezierCurve(kD,kC,kB,kH,kA,kG,kF,kE)};this.addBezierCurve=function(kL,kK,kC,kA,kH,kF,kN,kM){var kD=[kL,kK],kB=[kC,kA],kz=[kH,kF],ky=[kN,kM];this.addPoint(kD[0],kD[1]);this.addPoint(ky[0],ky[1]);for(jI=0;jI<=1;jI++){var kO=function(kS){return Math.pow(1-kS,3)*kD[jI]+3*Math.pow(1-kS,2)*kS*kB[jI]+3*(1-kS)*Math.pow(kS,2)*kz[jI]+Math.pow(kS,3)*ky[jI]};var kQ=6*kD[jI]-12*kB[jI]+6*kz[jI];var kR=-3*kD[jI]+9*kB[jI]-9*kz[jI]+3*ky[jI];var kP=3*kB[jI]-3*kD[jI];if(kR==0){if(kQ==0){continue}var kJ=-kP/kQ;if(0=0){kx=kx+1}else{kx=1+kx}var i=this._initOptions.rotation===0?this.style.rotation:(this.style.rotation-this._initOptions.rotation);while(i<0){i+=360}var T=e.domElement.style;T.width=this._initOptions.width+"px";T.height=this._initOptions.height+"px";T.transform="rotate("+i+"deg) scale("+kx+")"}if(!this.isReDraw){this._refresh(e)}}};fr.prototype._refresh=function(e){e.textureCoord=e.textureCoordGLMap=null;var i=new fU("onstatus_change");i.overlay=e;i.action="setIcon";i.imageUrlChanged=true;setTimeout(function(){e.fire(i)},100)};fr.prototype.generateRenderData=function(){var i=this.offset=this.anchor;var e=this.size;var T=[];T.push(-i.width,i.height-e.height,0);T.push(e.width-i.width,i.height-e.height,0);T.push(e.width-i.width,i.height,0);T.push(-i.width,i.height-e.height,0);T.push(e.width-i.width,i.height,0);T.push(-i.width,i.height,0);return{vertex:T}};fr.prototype.getCurrentImageUrl=function(){return this.id};fr.prototype.getRenderData=function(){this._renderData=this.generateRenderData();return this._renderData};fr.prototype.toString=function(){return"Symbol"};var fH={14:"m-0.00573,-10c-5.51975,0 -9.99427,4.47453 -9.99427,9.99428c0,5.51974 4.47452,9.99425 9.99427,9.99425c5.51972,0 9.99426,-4.47452 9.99426,-9.99425c0,-5.51975 -4.47453,-9.99428 -9.99426,-9.99428zm0,17.92491c-4.37412,0 -7.93132,-3.55788 -7.93132,-7.93063c0,-4.37345 3.5572,-7.93134 7.93132,-7.93134c4.37411,0 7.93062,3.55721 7.93062,7.93134c0,4.37412 -3.55789,7.93063 -7.93062,7.93063zm-0.00068,-15.4088c-0.38027,0 -0.68696,0.30807 -0.68696,0.68765l0,6.34078l-4.15752,1.81815c-0.34794,0.15266 -0.50611,0.55837 -0.35344,0.90632c0.11278,0.25787 0.36445,0.4119 0.6292,0.4119c0.09214,0 0.18635,-0.01857 0.27575,-0.05845l4.55635,-1.99279c0.00344,-0.00137 0.00619,-0.00275 0.00894,-0.00412l0.00275,-0.00138c0.01032,-0.00413 0.01581,-0.01376 0.02545,-0.01719c0.07151,-0.03576 0.13821,-0.07771 0.19185,-0.1341c0.02337,-0.02338 0.03644,-0.05364 0.05431,-0.08045c0.03301,-0.04401 0.06946,-0.08733 0.0894,-0.14028c0.0165,-0.04126 0.01787,-0.08596 0.02613,-0.12997c0.00894,-0.04469 0.02614,-0.08389 0.02614,-0.1286l0,-6.7905c0,-0.37889 -0.30807,-0.68697 -0.68833,-0.68697z",13:"m-0.00706,-9.5c-5.24281,0 -9.49294,4.25065 -9.49294,9.49294c0,5.24331 4.25014,9.49294 9.49294,9.49294c5.24281,0 9.49294,-4.24964 9.49294,-9.49294c0,-5.2423 -4.25013,-9.49294 -9.49294,-9.49294zm3.08857,3.85997c0.61044,0 1.10279,0.96873 1.10279,2.16271s-0.49384,2.1647 -1.10279,2.1647c-0.60844,0 -1.10228,-0.96873 -1.10228,-2.16372s0.49434,-2.16369 1.10228,-2.16369zm-6.28628,0c0.60844,0 1.10228,0.96873 1.10228,2.16271s-0.49284,2.1647 -1.10228,2.1647s-1.10277,-0.96873 -1.10277,-2.16372s0.49383,-2.16369 1.10277,-2.16369zm3.21167,12.16493c-1.87667,0 -3.63373,-1.14814 -5.14663,-3.14239c1.56571,1.02156 3.27993,1.59064 5.07786,1.59064c1.90905,0 3.72343,-0.63985 5.36539,-1.78497c-1.54429,2.11685 -3.35767,3.33672 -5.29662,3.33672l-0.00001,0z",12:"m9.27295,5.92958l-2.64443,-4.57961c-0.79727,-1.37992 -2.10131,-3.63983 -2.8986,-5.01973l-2.64441,-4.57858c-0.79782,-1.38093 -2.10186,-1.38093 -2.89913,0l-2.64335,4.57858c-0.79728,1.3799 -2.10188,3.63981 -2.89916,5.01973l-2.64387,4.57961c-0.79728,1.38101 -0.14472,2.50988 1.44983,2.50988l16.37221,0c1.59561,0 2.24711,-1.12887 1.45091,-2.50988l0,0zm-8.88166,0.70811l-1.56837,0l0,-1.50484l1.56837,0l0,1.50484zm-0.07527,-2.61447l-1.41621,0l-0.14044,-6.44231l1.68427,0l-0.12761,6.44231l0,0z",11:"m8.08295,-6.56414l-3.59319,0l0,-1.43586l-8.98155,0l0,1.43586l-3.59321,0c-1.0569,0 -1.915,0.85509 -1.915,1.91159l0,9.92258c0,1.05357 0.8581,1.91158 1.915,1.91158l16.16796,0c1.05692,0 1.91501,-0.85801 1.91501,-1.91158l0,-9.92258c0,-1.0565 -0.85809,-1.91159 -1.91501,-1.91159l0,0zm-8.08397,12.66884c-3.20143,0 -5.80643,-2.60031 -5.80643,-5.79596c0,-3.19569 2.605,-5.79891 5.80643,-5.79891s5.80789,2.60322 5.80789,5.79891c0,3.19565 -2.60794,5.79596 -5.80789,5.79596zm0,-9.6804c-2.15036,0 -3.89142,1.7394 -3.89142,3.88444c0,2.14503 1.74252,3.8844 3.89142,3.8844c2.1489,0 3.89141,-1.73937 3.89141,-3.8844c0,-2.14503 -1.74105,-3.88444 -3.89141,-3.88444z",10:"m0,-10c-0.20885,0 -0.39491,0.08583 -0.55177,0.24149c-0.15674,0.15536 -0.28646,0.37838 -0.39429,0.65665c-0.21586,0.55655 -0.34853,1.33844 -0.42114,2.27477c-0.07231,0.93446 -0.08474,2.02273 -0.05447,3.18765c-2.58175,1.05925 -7.81787,3.24648 -8.23854,3.73474c-0.56001,0.65029 -0.37908,1.3954 -0.15331,1.89002l8.608,-1.75235c0.18202,2.28374 0.4407,4.5455 0.66615,6.31771c-0.8418,0.24646 -2.41323,0.73303 -2.73754,1.03474c-0.4469,0.41562 -0.4469,1.75793 -0.4469,1.75793l3.52318,-0.28665c0.08286,0.57874 0.13486,0.9163 0.13486,0.9163l0.00511,0.03042l0.02778,0l0.06486,0l0.02778,0l0.00511,-0.03042c0,0 0.05185,-0.33756 0.13486,-0.9163l3.52424,0.28665c0,0 0,-1.34231 -0.44688,-1.75793c-0.32446,-0.30172 -1.89697,-0.7895 -2.73847,-1.0358c0.22484,-1.76681 0.4832,-4.02001 0.66507,-6.29634l8.50712,1.73203c0.22561,-0.49462 0.40765,-1.23973 -0.15237,-1.89002c-0.41538,-0.48221 -5.52504,-2.62071 -8.1386,-3.69423c0.03119,-1.17999 0.01971,-2.28285 -0.05353,-3.22816l0,-0.00233c-0.07263,-0.93523 -0.20545,-1.71635 -0.42114,-2.27244c-0.10784,-0.27827 -0.23634,-0.50114 -0.3932,-0.65665c-0.15689,-0.15567 -0.34293,-0.24149 -0.55195,-0.24149l0,0l0,0l0,0l0.00001,0l0,0l-0.00003,0.00001z",3:"m-10,0l10,-10l10,10l-10,10l-10,-10z",5:"M0,0 L-5,-15 0,-10 5,-15 z",6:"M0,0 L5,15 0,10 -5,15z",7:"M-5,-15 L0,0 5,-15",8:"M-5,15 L0,0 5,15",9:"m0,-24c-4.4183,0 -8,3.58167 -8,8c0,1.42102 0.3816,2.75 1.0312,3.90601c0.1079,0.19202 0.221,0.38098 0.3438,0.56299l6.625,11.53101l6.625,-11.53101c0.102,-0.151 0.19,-0.31097 0.281,-0.46899l0.063,-0.09399c0.649,-1.15601 1.031,-2.48499 1.031,-3.90601c0,-4.41833 -3.582,-8 -8,-8zm0,4c2.209,0 4,1.79089 4,4c0,2.20898 -1.791,4 -4,4c-2.2091,0 -4,-1.79102 -4,-4c0,-2.20911 1.7909,-4 4,-4z"};var ce={BMap_Symbol_SHAPE_CIRCLE:1,BMap_Symbol_SHAPE_RECTANGLE:2,BMap_Symbol_SHAPE_RHOMBUS:3,BMap_Symbol_SHAPE_STAR:4,BMap_Symbol_SHAPE_BACKWARD_CLOSED_ARROW:5,BMap_Symbol_SHAPE_FORWARD_CLOSED_ARROW:6,BMap_Symbol_SHAPE_BACKWARD_OPEN_ARROW:7,BMap_Symbol_SHAPE_FORWARD_OPEN_ARROW:8,BMap_Symbol_SHAPE_POINT:9,BMap_Symbol_SHAPE_PLANE:10,BMap_Symbol_SHAPE_CAMERA:11,BMap_Symbol_SHAPE_WARNING:12,BMap_Symbol_SHAPE_SMILE:13,BMap_Symbol_SHAPE_CLOCK:14};function dT(i,e){fr.call(this);e=e||{};this.style={anchor:e.anchor||new jk(0,0),fillColor:e.fillColor||"#000",fillOpacity:e.fillOpacity||0,scale:e.scale||1,rotation:e.rotation||0,strokeColor:e.strokeColor||"#000",strokeOpacity:e.strokeOpacity===undefined?1:e.strokeOpacity,strokeWeight:e.strokeWeight};this._type=(typeof i==="number")?i:"UserDefined";this._anchor=this.style.anchor;this._originOffset=new jk(0,0);this.anchor=new jk(0,0);this._rawPath=i;this._buildPath(true)}dT.inherits(fr,"SVGSymbol");dT.generateKey=function(kx,i){if(!kx){return null}if(parseInt(kx)){kx=parseInt(kx)}if(typeof kx==="number"){if(!fH[kx]&&![0,1,2,0,4][kx]){return null}}var e={anchor:i.anchor||new jk(0,0),fillColor:i.fillColor||"#000",fillOpacity:i.fillOpacity||0,scale:i.scale||1,rotation:i.rotation||0,strokeColor:i.strokeColor||"#000",strokeOpacity:i.strokeOpacity===undefined?1:i.strokeOpacity,strokeWeight:i.strokeWeight};var T=q({path:kx,style:e});return"symbol_svg_icon_"+T};e8.extend(dT.prototype,{_buildPath:function(kI){var kC=this;var kE=kC._rawPath;if(parseInt(kE)){kE=parseInt(kE)}if(fH[kE]){kE=fH[kE]}kC.id=dT.generateKey(kE,kC.style);if(!kC.id){return}switch(kE){case ce.BMap_Symbol_SHAPE_CIRCLE:var kF=kC._calSize(2),kD=kF,kN=kC.style.scale,ky=kC._anchor;this.size=new jk(kF,kD);this.anchor=new jk(kF/2+ky.width*kN,kD/2+ky.height*kN);kC.path=ce.BMap_Symbol_SHAPE_CIRCLE;break;case ce.BMap_Symbol_SHAPE_RECTANGLE:var kF=kC._calSize(4),kD=kC._calSize(2),ky=kC._anchor,kK=kC.style.strokeWeight!==undefined?kC.style.strokeWeight:kC.style.scale,kN=kC.style.scale;this.size=new jk(kF,kD);this._originOffset=new jk(Math.floor(-kK/2),Math.floor(-kK/2));this.anchor=new jk(kF/2+ky.width*kN,kD/2+ky.height*kN);kC.path=ce.BMap_Symbol_SHAPE_RECTANGLE;break;case ce.BMap_Symbol_SHAPE_STAR:var kF=kC._calSize(20),kD=kF,ky=kC._anchor,kN=kC.style.scale;this.size=new jk(kF,kD);this.anchor=new jk(kF/2+ky.width*kN,kD/2+ky.height*kN);kC.path=ce.BMap_Symbol_SHAPE_STAR;break;default:var kE=new dR(kE),kx=kE.bounds(),kH=kC.style.rotation*Math.PI/180,kK=kC.style.strokeWeight!==undefined?kC.style.strokeWeight:kC.style.scale,kN=kC.style.scale,ky=kC._anchor;var kM=new jk(Math.floor(kx.x1*kN-kK/2),Math.floor(kx.y1*kN-kK/2)),e={topleft:new ft(Math.floor(kx.x1*kN-kK/2)-kN*ky.width,Math.floor(kx.y1*kN-kK/2)-kN*ky.height),bottomleft:new ft(Math.floor(kx.x1*kN-kK/2)-kN*ky.width,Math.ceil(kx.y2*kN-kK/2)-kN*ky.height),topright:new ft(Math.ceil(kx.x2*kN+kK/2)-kN*ky.width,Math.floor(kx.y1*kN-kK/2)-kN*ky.height),bottomright:new ft(Math.ceil(kx.x2*kN+kK/2)-kN*ky.width,Math.ceil(kx.y2*kN+kK/2)-kN*ky.height)},i={},kL=[],kB=[];var kJ=e.topleft.x===0?0:Math.atan(e.topleft.y/e.topleft.x),T=kJ+kH;for(var kG in e){var kA=Math.cos(kH)*e[kG].x-Math.sin(kH)*e[kG].y,kz=Math.sin(kH)*e[kG].x+Math.cos(kH)*e[kG].y;i[kG]=new ft(kA,kz);kL.push(kA);kB.push(kz)}xmax=Math.max.apply(Math,kL),ymax=Math.max.apply(Math,kB),xmin=Math.min.apply(Math,kL),ymin=Math.min.apply(Math,kB);this.size=new jk(Math.ceil(xmax-xmin),Math.ceil(ymax-ymin));this.anchor=new jk(-xmin,-ymin);this._originOffset=new jk(xmin-i.topleft.x,ymin-i.topleft.y);this._innerOffset=new ft(kM.width,kM.height);this._rotationAngle=kH;kC.path=kE;break}this.imageSize=new jk(this.size.width,this.size.height);this.offset=this.anchor;if(kI){this.resetInitOptions()}},_calSize:function(e){if(this.style.strokeWeight){return e*this.style.scale+this.style.strokeWeight%3+this.style.strokeWeight}else{return e*this.style.scale+this.style.scale+this.style.scale%2}},render:function(T){var kD=this,kx=this.style.scale,kE,kF=this.size;if(this.context){kE=this.context;if(this.context.canvas.width/2!==this.size.width||this.context.canvas.height/2!==this.size.height){this.context.canvas.width=this.size.width*2;this.context.canvas.height=this.size.height*2}kE.clearRect(0,0,this.size.width*2,this.size.height*2);kE.fillStyle=hT.convert2rgba(kD.style.fillColor,kD.style.fillOpacity);kE.strokeStyle=hT.convert2rgba(kD.style.strokeColor,kD.style.strokeOpacity);kE.save()}else{return false}kE.scale(2,2);kE.lineCap="round";kE.lineJoin="round";kE.lineWidth=kD.style.strokeWeight||kx;if(kD._originOffset){kE.translate(-kD._originOffset.width,-kD._originOffset.height)}if(kD._rotationAngle){kE.rotate(kD._rotationAngle)}if(kD._innerOffset){kE.translate(-kD._innerOffset.x,-kD._innerOffset.y)}switch(kD.path){case ce.BMap_Symbol_SHAPE_CIRCLE:kE.arc(kF.width/2,kF.height/2,kx,0,2*Math.PI);break;case ce.BMap_Symbol_SHAPE_RECTANGLE:kE.rect(0,0,4*kx,2*kx);break;case ce.BMap_Symbol_SHAPE_STAR:kE.beginPath();var kz=kF.width/2,kB=kx*10;var ky=(2*Math.PI)/10;for(var kA=11;kA!=0;kA--){var e=kB*(kA%2+1)/2;var kC=ky*kA;kE.lineTo((e*Math.sin(kC))+kz,(e*Math.cos(kC))+kz)}kE.closePath();break;default:kE.lineWidth=kE.lineWidth/kx;kE.scale(kx,kx);kD.path.draw(kE)}kE.fill();kE.stroke();kE.restore();this.data=kE.getImageData(0,0,this.size.width*2,this.size.height*2);return true},setPath:function(e){this._rawPath=e;this._buildPath();this.update()},setAnchor:function(e){this._anchor=this.style.anchor=e;this._buildPath();this.update()},setRotation:function(e){this.style.rotation=e;this._buildPath();this.update()},setScale:function(e){this.style.scale=e;this._buildPath();this.update()},setStrokeWeight:function(e){this.style.strokeWeight=e;this._buildPath();this.update()},setStrokeColor:function(e){e=hT.convert2rgba(e,this.style.strokeOpacity);this.style.strokeColor=e;this._buildPath();this.update()},setStrokeOpacity:function(e){this.style.strokeOpacity=e;this._buildPath();this.update()},setFillOpacity:function(e){this.style.fillOpacity=e;this._buildPath();this.update()},setFillColor:function(e){this.style.fillColor=e;this._buildPath();this.update()}});bF.SymbolShapeType=ce;function jN(kz,kx,T){if(!kz||!kx){return}this.imageUrl=null;this.imageDom=null;if(typeof kz==="string"){this.imageUrl=kz}else{this.imageDom=kz;if(!this.imageDom.id){this.imageDom.id=bF.getGUID("icon_dom_")}}this.size=kx;var ky=new jk(Math.floor(kx.width/2),Math.floor(kx.height/2));var i={offset:ky,imageOffset:new jk(0,0)};T=T||{};for(var e in T){i[e]=T[e]}if(T.anchor){i.offset=T.anchor}this.anchor=this.offset=i.offset;this.imageOffset=i.imageOffset;this.infoWindowOffset=T.infoWindowOffset||this.offset;this.printImageUrl=T.printImageUrl||"";this.imageSize=T.imageSize||this.size;this.srcSetObject={};this.setImageSrcset(T.srcset||T.srcSet)}jN.prototype.setImageUrl=function(e){if(!e){return}this.imageUrl=e;this._renderData=null};jN.prototype.getCurrentImageUrl=function(){if(window.devicePixelRatio>1&&this.srcSetObject["2x"]){return this.srcSetObject["2x"]}return this.imageUrl};jN.prototype.setPrintImageUrl=function(e){if(!e){return}this.printImageUrl=e};jN.prototype.setSize=function(e){if(!e){return}this.size=new jk(e.width,e.height);this._renderData=null};jN.prototype.setOffset=function(e){if(!e){return}this.anchor=this.offset=new jk(e.width,e.height);this._renderData=null};jN.prototype.setAnchor=function(e){this.setOffset(e)};jN.prototype.setImageOffset=function(e){if(!e){return}this.imageOffset=new jk(e.width,e.height);this._renderData=null};jN.prototype.setInfoWindowOffset=function(e){if(!e){return}this.infoWindowOffset=new jk(e.width,e.height)};jN.prototype.setImageSize=function(e){if(!e){return}this.imageSize=new jk(e.width,e.height)};jN.prototype.setImageSrcset=function(T){var e="";if(!T){return}for(var i in T){if(T.hasOwnProperty(i)){this.srcSetObject[i]=T[i];e=T[i]+" "+i+","}}this.srcSet=e};jN.prototype.toString=function(){return"Icon"};jN.prototype.generateRenderData=function(kz){var T=this.offset;var e=this.size;var kB=this.imageOffset;var kA=[];kA.push(-T.width,T.height-e.height,0);kA.push(e.width-T.width,T.height-e.height,0);kA.push(e.width-T.width,T.height,0);kA.push(-T.width,T.height-e.height,0);kA.push(e.width-T.width,T.height,0);kA.push(-T.width,T.height,0);if(kz!==0){for(var ky=0;ky730){this._config.width=730}}if(this._config.height!==0){if(this._config.height<60){this._config.height=60}if(this._config.height>650){this._config.height=650}}if(this._config.maxWidth!==0){if(this._config.maxWidth<220){this._config.maxWidth=220}if(this._config.maxWidth>730){this._config.maxWidth=730}}this.isWinMax=false;this.IMG_PATH=E.imgPath;this.overlay=null;hN.sendMessage(a1(4,2,10),["overlay","infowindow"]);var e=this;hj.load("infowindow",function(){e._draw()})}ee.inherits(e8.BaseClass,"InfoWindow");e8.extend(ee.prototype,{setWidth:function(e){e=e*1;if(!e&&e!==0||isNaN(e)||e<0){return}if(e!==0){if(e<220){e=220}if(e>730){e=730}}this._config.width=e},setHeight:function(e){e=e*1;if(!e&&e!==0||isNaN(e)||e<0){return}if(e!==0){if(e<60){e=60}if(e>650){e=650}}this._config.height=e},setMaxWidth:function(e){e=e*1;if(!e&&e!==0||isNaN(e)||e<0){return}if(e!==0){if(e<220){e=220}if(e>730){e=730}}this._config.maxWidth=e},setTitle:function(e){this._config.title=e||""},setContent:function(e){this.content=e||""},getContent:function(){return this.content},setMaxContent:function(e){this._config.maxContent=e||""},redraw:function(){},enableAutoPan:function(){this._config.enableAutoPan=true},disableAutoPan:function(){this._config.enableAutoPan=false},enableCloseOnClick:function(){this._config.enableCloseOnClick=true},disableCloseOnClick:function(){this._config.enableCloseOnClick=false},enableMaximize:function(){this._config.enableMaximize=true},disableMaximize:function(){this._config.enableMaximize=false},show:function(){this._visible=true},hide:function(){this._visible=false},close:function(){this.hide()},dispose:function(){e8.BaseClass.prototype.decontrol.call(this)},maximize:function(){this.isWinMax=true},restore:function(){this.isWinMax=false},setConfig:function(i){if(!i){return}for(var e in i){if(typeof(this._config[e])===typeof(i[e])){this._config[e]=i[e]}}},isVisible:function(){return this.isOpen()},isOpen:function(){return false},getPointIn:function(){if(this.overlay&&this.overlay.getPoint){return this.overlay.getPoint()}},getTitle:function(){return this._config.title||""},getPosition:function(){return this.latLng},getPoint:function(){var e=this.getPointIn();if(this.map.config.coordType===BMAP_COORD_GCJ02){var i=jt.convertMC2LL(e);return eR(i)}return jt.convertMC2LL(e)},getOffset:function(){return this._config.offset},dispose:function(){e8.BaseClass.prototype.decontrol.call(this)},toString:function(){return"InfoWindow"}});h2.prototype.openInfoWindow=function(T,e){T.latLng=new cz(e.lat,e.lng);var i=jt.convertLL2MC(e);this.openInfoWindowIn(T,i)};h2.prototype.closeInfoWindow=function(){var e=this.temp.infoWin||this.temp._infoWin;if(e&&e.overlay){e.overlay.closeInfoWindow()}};h2.prototype.openInfoWindowIn=function(kx,e){if(!kx||kx.toString()!=="InfoWindow"||!e||e.toString()!=="Point"){return}var i=this.temp;if(!i.marker){var T=new jN(E.imgPath+"blank.gif",{width:1,height:1});i.marker=new j9(e,{icon:T,width:1,height:1,offset:new jk(0,0),infoWindowOffset:new jk(0,0),clickable:false});i.marker._fromMap=1}else{i.marker.setPoint(e)}this.addOverlay(i.marker);i.marker.show();i.marker.openInfoWindow(kx)};eL.prototype.openInfoWindow=function(e){if(this.map){this.map.closeInfoWindow();e._visible=true;this.map.temp._infoWin=e;e.overlay=this;e8.BaseClass.call(e,e.hashCode)}};eL.prototype.closeInfoWindow=function(){if(this.map&&this.map.temp._infoWin){this.map.temp._infoWin._visible=false;this.map.temp._infoWin.decontrol();this.map.temp._infoWin=null}};function bl(T,i){eL.call(this);this.content=T;this.map=null;this.domElement=null;this._config={width:0,offset:new jk(0,0),styles:{backgroundColor:"#fff",border:"1px solid #f00",padding:"1px",whiteSpace:"nowrap",fontSize:"12px",zIndex:"80",MozUserSelect:"none"},point:null,enableMassClear:true};i=i||{};this.setConfig(i);if(this._config.width<0){this._config.width=0}this.point=this._config.point;hN.sendMessage(a1(4,2,6),["overlay","dom_label"]);var e=this;hj.load("marker",function(){e._draw()})}bl.inherits(eL,"Label");e8.extend(bl.prototype,{setPoint:function(e){if(e&&e.toString()==="Point"&&!this.getMarker()){if(this.coordType===BMAP_COORD_GCJ02){var i=iN(e,3);this.point=this._config.point=new cF(i.lng,i.lat)}else{this.point=this._config.point=new cF(e.lng,e.lat)}}},setContent:function(e){this.content=e},getContent:function(e){return this.content},setOpacity:function(e){if(e>=0&&e<=1){this._config.opacity=e}},setOffset:function(e){if(!e||e.toString()!=="Size"){return}this._config.offset=new jk(e.width,e.height)},getOffset:function(){return this._config.offset},setStyle:function(e){e=e||{};this._config.styles=e8.extend(this._config.styles,e)},setStyles:function(e){this.setStyle(e)},setTitle:function(e){this._config.title=e||""},getTitle:function(){return this._config.title},setMarker:function(e){if(this._marker&&this._marker!==e){this._marker._config.label=null}this._marker=e;if(e){this.point=this._config.point=e.getPoint()}else{this.point=this._config.point=null}},getMarker:function(){return this._marker||null},getPositionIn:function(){return this.getPoint()},});function h9(T,i){var kx={};for(var e in i){if(i.hasOwnProperty(e)){if(e==="position"){kx.point=jt.convertLL2MC(i[e]);this.latLng=new cz(i[e]["lat"],i[e]["lng"])}else{kx[e]=i[e]}}}bl.call(this,T,kx)}h9.inherits(bl,"LabelOut");e8.extend(h9.prototype,{toString:function(){return"Label"},setPosition:function(e){this.latLng=new cz(e.lat,e.lng);var i=jt.convertLL2MC(e);this.setPoint(i)},getPosition:function(){return this.latLng}});window.BMAP_ANIMATION_DROP=1;window.BMAP_ANIMATION_BOUNCE=2;function j9(e,i){eL.call(this);i=i||{};this.delFlag=i.delFlag;this.point=e;this._rotation=0;this.map=null;this._animation=null;this.domElement=null;this.iconDom=null;this.infoWindowDom=null;this.siblingElement=null;this.textureCoord=null;this.textureCoordGLMap=null;this.collisionDetectionFailed=false;this._config={offset:new jk(0,0),opacity:1,icon:null,title:"",infoWindow:null,label:null,baseZIndex:0,clickable:true,zIndexFixed:false,isTop:false,enableMassClear:true,enableDragging:false,raiseOnDrag:false,restrictDraggingArea:false,startAnimation:"",enableCollisionDetection:false,rank:0,enableDraggingMap:false};this.setOptions(i);this._addlog();this._isDragging=false;var T=this;hj.load("marker",function(){T._draw()})}j9.TOP_ZINDEX=aU.getZIndex(-90)+1000000;j9.DRAG_ZINDEX=j9.TOP_ZINDEX+1000000;j9._injectMethond=function(e){e8.extend(j9.prototype,e)};j9.inherits(eL,"Marker");e8.extend(j9.prototype,{toString:function(){return"Marker"},_addlog:function(){var e=1;var i="normal";if(this._config.icon instanceof dT){e=2;i="svg_symbol"}else{if(this._config.icon instanceof fr){e=3;i="custom_symbol"}}hN.sendMessage(a1(4,2,1,e),["overlay","marker",i])},setOptions:function(e){this.setConfig(e);if(!e.icon){this._config.icon=new jN(E.imgPath+"marker_red.png",new jk(23,25),{offset:new jk(10,25),infoWindowOffset:new jk(10,0)})}},setIcon:function(e){if(e){this._config.icon=e;this.textureCoord=this.textureCoordGLMap=null}},getIcon:function(){return this._config.icon},setLabel:function(e){if(!(e instanceof bl)){return}this._config.label=e;e._config.enableMassClear=this._config.enableMassClear;e.setPoint(this.point)},getLabel:function(){return this._config.label},enableDragging:function(){this._config.enableDragging=true},disableDragging:function(){this._config.enableDragging=false},setPoint:function(e){if(e){if(this.map.config.coordType===BMAP_COORD_GCJ02){var i=iN(e,3);this.point=this._config.point=new cF(i.lng,i.lat);this.latLng=jt.convertMC2LL(i)}else{this.point=this._config.point=new cF(e.lng,e.lat);this.latLng=jt.convertMC2LL(e)}}},setPositionIn:function(e){this.setPoint(e)},getPositionIn:function(){return this.getPoint()},setTop:function(i,e){this._config.isTop=!!i;if(i){this._addi=e||0}},setTitle:function(e){this._config.title=e||""},getTitle:function(){return b(this._config.title)},setOffset:function(e){if(e){this._config.offset=e}},getOffset:function(){return this._config.offset},setAnimation:function(e){this._animation=e},setRank:function(e){this._config.rank=e},getRank:function(){return this._config.rank},setRotation:function(e){while(e<0){e+=360}this._rotation=e%360},getRotation:function(){return this._rotation}});function u(e,T){this.latLng=new cz(e.lat,e.lng);var i=jt.convertLL2MC(e);j9.call(this,i,T)}u.inherits(j9,"MarkerOut");e8.extend(u.prototype,{toString:function(){return"Marker"},toGeoJSON:function(){var i="Point";var T=[this.latLng.lng,this.latLng.lat];var e={type:"Feature",geometry:{type:i,coordinates:T},properties:this.properties};return e},updateByGeoJSON:function(T){var e=new gL();var kz=e.readFeaturesFromObject(T)||[];for(var kx=0,ky=kz.length;kx1||e<0){return}this._config.fillOpacity=e;this.setDomAttribute("fillopacity",e)},getFillOpacity:function(){return this._config.fillOpacity},setFillColor:function(e){this._config.fillColor=e||"";this.setDomAttribute("fillcolor",e)},getFillColor:function(){return this._config.fillColor},setIcon:function(i){if(!i||!this.map){return}this._config.icon=i;if(this._config.icon){var e=this._config.icon.getCurrentImageUrl();var kx=i.getCurrentImageUrl()!==e;this._config.icon=i;this.textureCoord=this.textureCoordGLMap=null;this.draw();var T=new fU("onstatus_change");T.overlay=this;T.action="setIcon";T.imageUrlChanged=kx;this.fire(T)}},getIcon:function(){return this._config.icon},setPosition:function(e){this.latLng=new cz(e.lat,e.lng);var i=jt.convertLL2MC(e);this.setPositionIn(i)},getPosition:function(){var e=this.getPositionIn();return jt.convertMC2LL(e)}});function f6(T,e){iS.call(this,e);this._normalizedBounds=new ih();this.setPoints(T);this._addlog(e);var i=this;hj.load("poly",function(){i._draw()})}f6.inherits(iS,"Polyline");e8.extend(f6.prototype,{_addlog:function(e){var i=1;var T="normal";if(e&&e.strokeTexture){i=2;T="texture"}hN.sendMessage(a1(4,2,3,i),["overlay","polyline",T])},getBoundsIn:function(e){if(!e){this._bounds.setMinMax();return this._bounds}this._normalizedBounds.setMinMax();return this._normalizedBounds},setPoints:function(kA){this._clearCache();this.points=iS.getGraphPoints(kA).slice(0);if(this._config.geodesic===true){this.greatCirclePoints.length=0;for(var ky=0;ky15437726){if(kz.lng0){e8.each(e.greatCirclePoints,function(i){e._bounds.extend(i)})}else{e8.each(e.points,function(i){e._bounds.extend(i)})}e._normalizedBounds.setSouthWest(e._bounds.getSouthWest());e._normalizedBounds.setNorthEast(e._bounds.getNorthEast());if(e._normalizedBounds.sw.lng<-h2.WORLD_SIZE_MC_HALF||e._normalizedBounds.ne.lng>h2.WORLD_SIZE_MC_HALF){e._normalizedBounds.sw.lng=-h2.WORLD_SIZE_MC_HALF;e._normalizedBounds.ne.lng=h2.WORLD_SIZE_MC_HALF}},calcGreatCirclePoints:function(kx,T){var kz=kx.latLng;var ky=T.latLng;if(kz.equals(ky)){return}var e=jt.getDistance(iU(kz.lng),iU(kz.lat),iU(ky.lng),iU(ky.lat));if(e<250000){return}var kD=Math.round(e/150000);var kH=this.calcAngularDistance(kz,ky);this.greatCirclePoints.push(kx);var kG=kz.lng;var kF=kx;for(var kA=0;kA30037726){if(kE.lng30037726){if(T.lng0){e8.each(e.greatCirclePoints,function(i){e._bounds.extend(i)})}else{e8.each(e.points,function(i){e._bounds.extend(i)})}e._normalizedBounds.setSouthWest(e._bounds.getSouthWest());e._normalizedBounds.setNorthEast(e._bounds.getNorthEast());if(e._normalizedBounds.sw.lng<-h2.WORLD_SIZE_MC_HALF||e._normalizedBounds.ne.lng>h2.WORLD_SIZE_MC_HALF){e._normalizedBounds.sw.lng=-h2.WORLD_SIZE_MC_HALF;e._normalizedBounds.ne.lng=h2.WORLD_SIZE_MC_HALF}},getPathIn:function(){return this._path},setPathIn:function(e){this._path=e;this.setPoints(e)},getCpsIn:function(){return this._cps},setCpsIn:function(e){this._cps=e;this.setPoints(this._path)},calcBezierPoints:function(kx,kz){var T=[];for(var e=0;e0){e8.each(e.greatCirclePoints,function(i){e._bounds.extend(i)})}else{e8.each(e.points,function(i){e8.each(i,function(T){e._bounds.extend(T)})})}e._normalizedBounds.setSouthWest(e._bounds.getSouthWest());e._normalizedBounds.setNorthEast(e._bounds.getNorthEast());if(e._normalizedBounds.sw.lng<-h2.WORLD_SIZE_MC_HALF||e._normalizedBounds.ne.lng>h2.WORLD_SIZE_MC_HALF){e._normalizedBounds.sw.lng=-h2.WORLD_SIZE_MC_HALF;e._normalizedBounds.ne.lng=h2.WORLD_SIZE_MC_HALF}}});function hy(T,e){iS.call(this,e);e=e||{};if(typeof e.fillOpacity==="number"){this._config.fillOpacity=e.fillOpacity}else{this._config.fillOpacity=0.6}cj(this._config.fillOpacity,0,1);if(e.fillColor===""){this._config.fillColor=""}else{this._config.fillColor=e.fillColor?e.fillColor:"#fff"}this._parseFillCacheWebGL=[];this.setPoints(T,e);hN.sendMessage(a1(4,2,4),["overlay","polygon"]);var i=this;hj.load("poly",function(){i._draw()})}hy.inherits(iS,"Polygon");e8.extend(hy.prototype,{setPoints:function(kz){var kx=[];if(typeof kz==="string"||kz.length===1||kz[0] instanceof cF||kz[0] instanceof cz||this instanceof hd||kz.length===0){if(kz.length===1){kz=kz[0]}var e=this._processSinglePointArray(kz);this._userPoints=e.userPoints;kx=e.innerPoints;this.hasMultipleParts=false}else{this._userPoints=[];for(var ky=0;ky1&&!innerPoints[0].equals(innerPoints[innerPoints.length-1])){innerPoints.push(new cF(innerPoints[0].lng,innerPoints[0].lat))}return{userPoints:i,innerPoints:innerPoints}},setPointAt:function(i,e){if(!this._userPoints[i]){return}this._clearCache();this._userPoints[i]=new cF(e.lng,e.lat);this.points[i]=new cF(e.lng,e.lat);if(i===0&&!this.points[0].equals(this.points[this.points.length-1])){this.points[this.points.length-1]=new cF(e.lng,e.lat)}this._calcBounds()},setPositionAt:function(i,e){if(!this._userPoints[i]){return}var T=jt.convertLL2MC(e);this.setPointAt(i,T)},getPoints:function(){var e=this._userPoints;if(e.length===0){e=this.points}return e},getPathIn:function(){return this.getPoints()}});function iZ(T,e){if(!T||T.length===0){return}var i=this.setPath(T,true);hy.call(this,i,e)}iZ.inherits(hy,"PolygonOut");e8.extend(iZ.prototype,{toString:function(){return"Polygon"},toGeoJSON:function(){var ky="Polygon";var kz=[];var kB=this.getPath();if(this.hasMultipleParts){ky="Multi"+ky;for(var kx=0;kx1&&!innerPoints[0].equals(innerPoints[innerPoints.length-1])){innerPoints.push(new cF(innerPoints[0].lng,innerPoints[0].lat))}return{userPoints:i,innerPoints:innerPoints}},setPointAt:function(i,e){if(!this._userPoints[i]){return}this._clearCache();this._userPoints[i]=new cF(e.lng,e.lat);this.points[i]=new cF(e.lng,e.lat);if(i===0&&!this.points[0].equals(this.points[this.points.length-1])){this.points[this.points.length-1]=new cF(e.lng,e.lat)}this._calcBounds()},getPoints:function(){var e=this._userPoints;if(e.length===0){e=this.points}return e},getPathIn:function(){return this.getPoints()},setTopFillOpacity:function(e){if(e>1||e<0){return}this._config.topFillOpacity=e;this._setDomAttribute("topfillopacity",e)},getTopFillOpacity:function(){return this._config.topFillOpacity},setSideFillOpacity:function(e){if(e>1||e<0){return}this._config.sideFillOpacity=e;this._setDomAttribute("sidefillopacity",e)},getSideFillOpacity:function(){return this._config.sideFillOpacity},setTopFillColor:function(e){this._config.topFillColor=e||"";this._setDomAttribute("topfillcolor",e)},getTopFillColor:function(){return this._config.topFillColor},setSideFillColor:function(e){this._config.sideFillColor=e||"";this._setDomAttribute("sidefillcolor",e)},getSideFillColor:function(){return this._config.sideFillColor},setAltitude:function(e){this._config.altitude=Number(e);this.draw();var i=new fU("onlineupdate");i.overlay=this;this.dispatchEvent(i)},getAltitude:function(){return this._config.altitude}});function bz(kB,kz,kC){if(!kB||kB.length===0){return}this.userPath=kB;var e=[];if(typeof kB==="string"||kB[0] instanceof cF||kB[0] instanceof cz){var kD=this._processSinglePointArray(kB);for(var ky=0;ky1||e<0){return}this._config.opacity=e;this.doOnceDraw()},getOpacity:function(){return this._config.opacity},getImageURL:function(){return this._config.url},setImage:function(e,T){this._config.src=e;this._texture=null;var i=this;this.imageLoad&&this.imageLoad(this._config.src,function(kx,ky){if(ky){i._texture=kx;if(T){i.setBounds(T,true)}i.doOnceDraw()}})},setFomular:function(e,i){if(e&&i){this._config.fomularJS=e;this._config.fomularC=i;this.fHashcode=q({str:this._config.fomularC});this.doOnceDraw()}},setIsPixelMap:function(e){this.isPixelMap=e;this.doOnceDraw()},getImagePixel:function(kx){if(!this._config.isPixelMap||!this.canPixelMap()){return null}if(!this.getImageMaskPixel(kx)){return null}if(this.imageObject){var T=Math.floor((kx.lng-this.points[3].lng)/this.lngMC);var e=Math.floor((-kx.lat+this.points[3].lat)/this.latMC);var i=Math.floor((e*this.imageObject.width+T)*4);if(T>this.imageObject.width||T<0){return null}if(e>this.imageObject.height||e<0){return null}if(i+3>this.imageObject.data.data.length){return null}return[this.imageObject.data.data[i],this.imageObject.data.data[i+1],this.imageObject.data.data[i+2],this.imageObject.data.data[i+3],]}return null},getValue:function(i){if(this._config.isPixelMap&&i&&this._config.fomularJS){if(!(i instanceof Array)){i=this.getImagePixel(i.point)}var e=this._config.fomularJS({r:i[0],g:i[1],b:i[2],a:i[3]});if(e>=this._config.clamp[0]&&e<=this._config.clamp[1]){return e}}return null},setImageObject:function(T){var e=document.createElement("canvas");e.width=T.width;e.height=T.height;var i=e.getContext("2d");i.drawImage(T,0,0,T.width,T.height);this.imageObject={width:T.width,height:T.height,data:i.getImageData(0,0,T.width,T.height)};this.updatePixelMc();i=null;e=null},updatePixelMc:function(){if(this.imageObject){var e=Math.abs(this.points[2].lng-this.points[0].lng);var i=Math.abs(this.points[2].lat-this.points[0].lat);this.lngMC=e/this.imageObject.width;this.latMC=i/this.imageObject.height}},setMaskImageObject:function(T){var e=document.createElement("canvas");e.width=T.width;e.height=T.height;var i=e.getContext("2d");i.drawImage(T,0,0,T.width,T.height);this.imageMaskObject={width:T.width,height:T.height,data:i.getImageData(0,0,T.width,T.height)};i=null;e=null},getImageMaskPixel:function(e){if(!this.imageMaskObject){return true}var kx=this._toOverlayPixelsGL([e]);var kC=this.maskOverlayPixels;var kz=kC[1][0]-kC[0][0];var ky=kC[1][1]-kC[0][1];var T=Math.floor((kx[0][0]-kC[0][0])/kz*this.imageMaskObject.width);var i=Math.floor((-kx[0][1]+kC[1][1])/ky*this.imageMaskObject.height);var kB=Math.floor((i*this.imageMaskObject.width+T)*4);if(T>this.imageMaskObject.width||T<0){return null}if(i>this.imageMaskObject.height||i<0){return null}var kA=this.imageMaskObject.data.data;if(kB+3>kA.length){return false}if(kA[kB+3]>0){if(this._config.maskData>-1&&this._config.maskData!==kA[kB]){return false}return true}return false},doOnceDraw:function(){var e=new fU("onlineupdate");e.overlay=this;this.dispatchEvent(e)},destroy:function(){this.points=[];this.imageMaskObject=null}});function gb(kx,kE){if(!kx){return}kE=kE||{};var kz=[];if(kE.sysType==="fixed"){kz=kx}else{if(kx instanceof ih){var kB=Math.min(kx.sw.lng,kx.ne.lng);var ky=Math.max(kx.sw.lng,kx.ne.lng);var kA=Math.min(kx.sw.lat,kx.ne.lat);var T=Math.max(kx.sw.lat,kx.ne.lat);var kD=[new cF(kB,kA),new cF(ky,kA),new cF(ky,T),new cF(kB,T)];var e=iS.getGraphPoints(kD).slice(0);for(var kC=0;kC730){this._config.width=730}if(this._config.height!=0){if(this._config.height<50){this._config.height=50}if(this._config.height>650){this._config.height=650}}if(this._config.maxWidth!==0){if(this._config.maxWidth<50){this._config.maxWidth=50}if(this._config.maxWidth>730){this._config.maxWidth=730}}this.isWinMax=false;this.IMG_PATH=E.imgPath;this.overlay=null;var e=this;hj.load("simpleInfowindow",function(){e._draw()})}ik.inherits(e8.BaseClass,"SimpleInfoWindow");e8.extend(ik.prototype,{setWidth:function(e){e=e*1;if(!e&&e!=0||isNaN(e)||e<0){return}if(e!=0){if(e<50){e=50}if(e>730){e=730}}this._config.width=e},setHeight:function(e){e=e*1;e-=10;if(!e&&e!=0||isNaN(e)||e<0){return}if(e!=0){if(e<50){e=50}if(e>650){e=650}}this._config.height=e},setMaxWidth:function(e){e=e*1;if(!e&&e!=0||isNaN(e)||e<0){return}if(e!=0){if(e<50){e=50}if(e>730){e=730}}this._config.maxWidth=e},setTitle:function(e){this._config.title=e||""},setContent:function(e){this.content=e||""},setMaxContent:function(e){this._config.maxContent=e||""},redraw:function(){},enableAutoPan:function(){this._config.enableAutoPan=true},disableAutoPan:function(){this._config.enableAutoPan=false},enableCloseOnClick:function(){this._config.enableCloseOnClick=true},disableCloseOnClick:function(){this._config.enableCloseOnClick=false},enableMaximize:function(){this._config.enableMaximize=true},disableMaximize:function(){this._config.enableMaximize=false},show:function(){this._visible=true},hide:function(){this._visible=false},close:function(){this.hide()},dispose:function(){e8.BaseClass.prototype.decontrol.call(this)},maximize:function(){this.isWinMax=true},restore:function(){this.isWinMax=false},setConfig:function(i){if(!i){return}for(var e in i){if(typeof(this._config[e])==typeof(i[e])){this._config[e]=i[e]}}},isVisible:function(){return this.isOpen()},isOpen:function(){return false},getPoint:function(){if(this.overlay&&this.overlay.getPoint){return this.overlay.getPoint()}},getOffset:function(){return this._config.offset},dispose:function(){e8.BaseClass.prototype.decontrol.call(this)},toString:function(){return"SimpleInfoWindow"}});h2.prototype.openSimpleInfoWindow=function(kx,e){if(!kx||kx.toString()!="SimpleInfoWindow"||!e||e.toString()!="Point"){return}var i=this.temp;if(!i.marker){var T=new jN(E.imgPath+"blank.gif",{width:1,height:1});i.marker=new j9(e,{icon:T,width:1,height:1,offset:new jk(0,0),infoWindowOffset:new jk(0,0),clickable:false});i.marker._fromMap=1}else{i.marker.setPoint(e)}this.addOverlay(i.marker);i.marker.show();i.marker.openSimpleInfoWindow(kx)};h2.prototype.closeSimpleInfoWindow=function(){var e=this.temp.infoWin||this.temp._infoWin;if(e&&e.overlay){e.overlay.closeSimpleInfoWindow()}};eL.prototype.openSimpleInfoWindow=function(e){if(this.map){this.map.closeSimpleInfoWindow();e._visible=true;this.map.temp._infoWin=e;e.overlay=this;e8.BaseClass.call(e,e.hashCode)}};eL.prototype.closeSimpleInfoWindow=function(){if(this.map&&this.map.temp._infoWin){this.map.temp._infoWin._visible=false;this.map.temp._infoWin.decontrol();this.map.temp._infoWin=null}};function cr(T,e){iS.call(this,e);e=e||{};this._config.showRegion=e.showRegion||"inside";this._config.isBuildingMask=e.isBuildingMask&&true;this._config.isPoiMask=e.isPoiMask&&true;this._config.isMapMask=e.isMapMask&&true;this._config.path=T;this._parseFillCacheWebGL=[];this.setPoints(T,e);hN.sendMessage(a1(4,1,3),["instance","custom_mask"]);var i=this;hj.load("poly",function(){i._draw()})}cr.inherits(iS,"MapMask");e8.extend(cr.prototype,{setPoints:function(i){var e=iS.getGraphPoints(i).slice(0);this.hasMultipleParts=false;iS.prototype.setPoints.call(this,e)},setPathIn:function(e){this.setPoints(e)},_processSinglePointArray:function(e){var i=iS.getGraphPoints(e).slice(0);innerPoints=i.slice(0);if(innerPoints.length>1&&!innerPoints[0].equals(innerPoints[innerPoints.length-1])){innerPoints.push(new cF(innerPoints[0].lng,innerPoints[0].lat))}return{userPoints:i,innerPoints:innerPoints}},getPoints:function(){var e=this._userPoints;if(e.length===0){e=this.points}return e},getPathIn:function(){return this.getPoints()}});function kj(kz,T){if(!kz||kz.length===0){return}var ky=[];if(kz[0] instanceof cF){var e=this._processSinglePointArray(kz);for(var kx=0;kx=eu[this.mapTypeName].webgl.minZoom){if(eu[this.mapTypeName].webgl){if(kB>=eu[this.mapTypeName].webgl.minZoom){this.minZoom=kB}else{this.minZoom=eu[this.mapTypeName].webgl.minZoom}}else{if(kB>=eu[this.mapTypeName].minZoom){this.minZoom=kB}else{this.minZoom=eu[this.mapTypeName].minZoom}}}if(typeof T==="number"){if(eu[this.mapTypeName].webgl){if(T<=eu[this.mapTypeName].webgl.maxZoom){this.maxZoom=T}else{this.maxZoom=eu[this.mapTypeName].webgl.maxZoom}}else{if(T<=eu[this.mapTypeName].maxZoom){this.maxZoom=T}else{this.maxZoom=eu[this.mapTypeName].maxZoom}}}if(this.maxZoomthis.maxZoom){return false}var kz=this.containsPoint(e,ky);if(kz){return kz}for(var T=0;Tthis.maxZoom){return ky}for(var T=0;T0){kE[kA.name]=kA;kE.push(kA.name)}var kI=kE.length-kG.bufferNumber;for(var kJ=0;kI>0&&kJ0&&this._transparentPng){this.img.src=E.imgPath+"blank.gif"}else{this.img.src=this.src}};h1.prototype._callCbks=function(){var T=this;for(var e=0;e8);function jB(e){this.tileLayers=[];this.map=e;this.bufferNumber=300;this.mapTiles=[];this.bufferTiles=[];this.config=eu[this.map.mapType];this.errorUrl=this.config.errorUrl;this.tileSize=this.config.tileSize;this.baseUnits=this.config.baseUnits;this.baseZoomLevel=this.config.zoomLevelBase;this.tileURLs=this.config.tileUrls;this.imgNumber=0;this.numLoading=0;this.temp={}}bF.register(function(i){if(i._renderType==="webgl"){return}var e=i.tileMgr=new jB(i);i.addEventListener("mousewheel",function(T){e.mouseWheel(T)});i.addEventListener("dblclick",function(T){e.dblClick(T)});i.addEventListener("rightdblclick",function(T){e.dblClick(T)});i.addEventListener("minuspress",function(T){e.keypress(T)});i.addEventListener("pluspress",function(T){e.keypress(T)});i.addEventListener("load",function(T){if(this.mapType===BMAP_EARTH_MAP){return}e.loadTiles()});i.addEventListener("zoomstartcode",function(T){if(this.mapType===BMAP_EARTH_MAP){return}e._zoom(T)});i.addEventListener("moving",function(T){if(this.mapType===BMAP_EARTH_MAP){return}e.moveGridTiles()});i.addEventListener("resize",function(T){if(this.mapType===BMAP_EARTH_MAP){return}e.resizeMap(T)});i.addEventListener("addtilelayer",function(T){e.addTileLayer(T)});i.addEventListener("removetilelayer",function(T){e.removeTileLayer(T)})});e8.extend(jB.prototype,{addTileLayer:function(kx){var T=this;var i=kx.target;T.tileLayers.push(i);if(T.map.loaded){T.moveGridTiles()}},removeTileLayer:function(kE){var kF=this;var kC=kE.target;var kA=kC.mapType;var kz=kF.mapTiles;var kH=kF.bufferTiles;for(var T in kH){var kx=T.split("-")[1];if(kx==kA){delete kH[T]}}for(var T in kz){var kx=T.split("-")[1];if(kx==kA){delete kz[T]}}if(kF.zoomsDiv&&kF.zoomsDiv.parentNode){kF.zoomsDiv.parentNode.removeChild(kF.zoomsDiv);kF.zoomsDiv.innerHTML=""}var ky=kF.map;if(ky.deepZoom){var kG=ky.deepZoom.preDeepZoomDiv;if(kG&&kG.parentNode){kG.parentNode.removeChild(kG)}}for(var kD=0,kB=kF.tileLayers.length;kD=1.5?2:1;this.normalUdt=j8("ditu","normal").udt;this.numLoading=0;this.numTileLoading=0;this.firstTileLoad=false;this.retry=this.opts.retry||false;this.retryTime=this.opts.retryTime||600;this.useThumbData=false;this.useThumbData=this.opts.useThumbData||false;if(this.baseLayer){this.useThumbData=true}if(typeof this.opts.customLayer==="boolean"){this.customLayer=this.opts.customLayer}else{this.customLayer=true}}hM.inherits(dg,"TileLayer");e8.extend(hM.prototype,{isTransparentPng:function(){return this.transparentPng},getTilesUrl:function(kE,e){var T=eu[this.mapType];if(typeof T!=="object"){return null}var kx=kE.x;var kF=kE.y;kx=fb.calcLoopParam(kx,e).col;var i="";if(this.opts.tileUrlTemplate){i=this.opts.tileUrlTemplate;i=i.replace(/\{X\}/,kF);i=i.replace(/\{Y\}/,kx);i=i.replace(/\{Z\}/,e)}else{if(this.mapType===BMAPGL_NORMAL_MAP){var kD=this.isCanvasMap?0:1;var kz=T.tileUrls[Math.abs(kF+kx)%T.tileUrls.length];if(window.offLineIPAddress){kz=window.offLineIPAddress+"tile5/"}var ky=this.map.config.style;i=kz+"?qt=vtile&x="+kx+"&y="+kF+"&z="+e+(ky==="default"?"":("&styleId=1"))+"&styles=pl&udt="+this.normalUdt+"&scaler="+this.scaler+"&showtext="+kD;i=i.replace(/-(\d+)/gi,"M$1")}if(this.mapType===BMAP_SATELLITE_MAP){var kA=j8("ditu","satellite");var kC=kA.ver;var kB=kA.udt;i=T.tileUrls[Math.abs(kF+kx)%T.tileUrls.length]+"u=x="+kx+";y="+kF+";z="+e+";v="+kC+";type=sate&fm=46&udt="+kB;i=i.replace(/-(\d+)/gi,"M$1")}}return i},initialize:function(kA){this.map=kA;if(kA._renderType==="webgl"){var kz=null;if(this.customLayer!==false){kz=this.getTilesUrl}e8.extend(this,fp);this.labelProcessor=new jv(this);this.callbackDataQueue=[];if(kz){this.getTilesUrl=kz}var T=this;kA.on("indoor_data_refresh",function(kB){if(!T.baseLayer){return}T._refreshIndoorData(kB.uid,kB.floor)});kA.on("custom_labels_ready",function(kB){if(T.mapType!==BMAPGL_NORMAL_MAP&&kB.model==="custom"){return}if((kB.model==="custom")||kB.model==="mvt_"+T.drawIndex){T._doWorkAfterLabelImageLoad(kB.virtualTile,kB.labelCanvas,null,kB.imgKey)}});kA.on("glmoduleloaded",function(){if(!T.baseLayer){return}T.updateAllIconsTextureCoords()});kA.on("layer_update",function(kC){if(T.dataType===2&&kA.customLoaded&&kA.areaCustomLoaded){var kB=new fU("onlayer_clear");kA.fire(kB)}});kA.on("layer_clear",function(kB){if(T.dataType===2){T.clearCache()}});if(this.ontology&&this.ontology._initEvent){this.ontology._initEvent(kA)}}if(!kA.temp.layerZIndex){kA.temp.layerZIndex=0}this.zIndex=this.zIndex||1;if(kA.getRenderType()==="dom"){this.zIndex=kA.tileMgr.tileLayers.length}else{if(this.baseLayer){this.zIndex=0}else{if(this.zIndex>0){this.adjustZIndex()}else{var e=kA._featureMgr.result.bkData;this.zIndex=e.length||1}}}if(!kA.temp.layid){kA.temp.layid=0}if(!this.opts.mapType){this.mapType="BMAP_CUSTOM_LAYER_"+kA.temp.layid;kA.temp.layid++}else{this.mapType=this.opts.mapType}var kx=eu[this.mapType];if(!kx){eu[this.mapType]={tileUrls:[],tileSize:256,baseUnits:256,zoomLevelMin:1,zoomLevelMax:19,minZoom:3,maxZoom:19,minDataZoom:3,maxDataZoom:19,zoomLevelBase:18,errorUrl:E.imgPath+"/blank.gif",bounds:new ih(new cF(-21364736,-10616832),new cF(23855104,15859712)),imgExtend:"png"}}if(kA._renderType!=="webgl"){var ky=bR(kA.platform,'
');ky.style.display="";ky.style.left=Math.ceil(-kA.offsetX+kA.width/2)+"px";ky.style.top=Math.ceil(-kA.offsetY+kA.height/2)+"px";this.tilesDiv=ky}this.isCanvasMap=kA.isCanvasMap();this.lastZoom=kA.getZoom();var i=this;this.addEventListener("initDrawData",function(kB){if(i.opts.boundary){i.addBoundary(i.opts.boundary)}});kA.on("destroy",function(){i.destroy()})},clearCache:function(){this.tileCache.clear();this.map._featureMgr.clearData(this.drawIndex);this.map._featureMgr.setLabelData([],this.drawIndex);this.map._featureMgr.clearLabelOverlayData(this.drawIndex);this.labelProcessor.iconCache.clear()},remove:function(){if(this.tilesDiv&&this.tilesDiv.parentNode){this.tilesDiv.innerHTML="";this.tilesDiv.parentNode.removeChild(this.tilesDiv)}delete this.tilesDiv},getCopyright:function(){return this.copyright},getMapType:function(){return this.mapType},adjustZIndex:function(){if(this.map&&this.map._featureMgr){var e=this.map._featureMgr.result.bkData;while(e[this.zIndex]){this.zIndex+=1}}},_getAdjoinZIndex:function(ky){var T=this.zIndex;if(this.map&&this.map._featureMgr){var e=this.map._featureMgr.result.bkData;if(ky==="up"){for(var kx=this.zIndex+1;kx0;kx--){if(e[kx]){T=kx;break}}}}return T},setZIndex:function(e){this.setTargetZIndex(e)},setTargetZIndex:function(e){this.removeLabel&&this.removeLabel(this.zIndex);this.zIndex=e;this.drawIndex=e;if(this.tilesDiv){this.tilesDiv.style.zIndex=e}},calcLoopParam:function(e,i){return fb.calcLoopParam(e,i)},addBoundary:function(kz){if(!kz||!this.map){return}if(typeof kz==="string"){kz=[kz]}for(var kx=0;kx-1;ky--){var kz={};T=kx.children[ky].style;kz.top=parseInt(T.top,10);kz.left=parseInt(T.left,10);this._zoomAniInfo[ky]=kz}},prepareLabelLayer:function(){var ky=this._map;if(this._enableCanvas2dMap&&ky.canvas2dMapMgr){if(this.touchZoomLabelCanvas){this.touchZoomLabelCanvas.parentNode.removeChild(this.touchZoomLabelCanvas)}var i=ky.canvas2dMapMgr._labelCanvas;this.touchZoomLabelCanvas=i.cloneNode(false);var e=this.touchZoomLabelCanvas.getContext("2d");e.drawImage(i,0,0);ky.platform.insertBefore(this.touchZoomLabelCanvas,ky.platform.firstChild);var kx=parseInt(i.style.left,10);var T=parseInt(i.style.top,10);this.touchZoomLabelCanvas.style.zIndex=9;this.touchZoomLabelCanvas.style[this._transformOriginStyleName]=(this._fixPosition.x-(ky.offsetX+kx))+"px "+(this._fixPosition.y-(ky.offsetY+T))+"px";i.style.visibility="hidden"}},show:function(){if(this._animationDiv){this._animationDiv.style.visibility=""}},showLabel:function(){var i=this._map;if(this._enableCanvas2dMap&&i.canvas2dMapMgr){var e=i.canvas2dMapMgr._labelCanvas;if(e){e.style.visibility=""}if(this.touchZoomLabelCanvas){this.touchZoomLabelCanvas.style.zIndex=-2;this.touchZoomLabelCanvas.style.visibility="hidden"}}},hide:function(){if(this._animationDiv){this._animationDiv.style.visibility="hidden"}if(this._preAnimationDiv){this._preAnimationDiv.style.visibility="hidden"}},hideNonAnimationLayers:function(){var kx=this._map;if(kx.getRenderType()==="dom"){if(kx.overlayDiv){kx.overlayDiv.style.visibility="hidden"}if(kx.overlayDivEx){kx.overlayDivEx.style.visibility="hidden"}}var kz=kx.tileMgr.tileLayers;var ky;for(var T=0,e=kz.length;T-1;kG--){var kE=this._zoomAniInfo[kG];kF=kx.children[kG].style;var ky=kE.left-kB.x;var T=kE.top-kB.y;kE.dx=ky*e-ky;kE.dy=T*e-T;kE.preDx=ky-ky;kE.preDy=T-T;kN=kE.preDx+(kE.dx-kE.preDx);kC=kE.preDy+(kE.dy-kE.preDy)+kD;kF.left=kE.left+kN+"px";kF.top=kE.top+kC+"px";kF.width=kF.height=256*e+"px"}if(this._enableCanvas2dMap){var kM=!kL._isIE9?"translate3d(0px, "+kD+"px, 0) scale("+e+")":"translate(0px, "+kD+"px) scale("+e+")";this.touchZoomLabelCanvas.style[kI]=kM}},setZoomFinish:function(){this._animationDiv=null},startAnimation:function(kA){this.prepareLayer();this.hideNonAnimationLayers();var kT=this._map;if(this.touchZoomLabelCanvas){this.touchZoomLabelCanvas.style.display="none"}kA=kA||{};var kR=kA.zoomCount||0;var kF=kA.fixPosition;var kP=kA.fixMCPosition;var kD=kA.pixOffset;this._zoomCount=kR;var kx=kT.getZoom();var kS=kx+kR;var e=kT.config.enableContinuousZoom;var kJ=0.5;var kE=5;var T=Math.pow(2,kR);var kV=this._baseLayerDiv;var kG={x:kF.x-parseInt(kV.style.left,10)-kT.offsetX,y:kF.y-parseInt(kV.style.top,10)-kT.offsetY};var kB=this._animationDiv;var kN=kB.children.length;var kX=this._preZoomTimes;var kQ=[];var kO=this._transformStyleName;var kC=this._transformOriginStyleName;for(var kM=kN-1;kM>-1;kM--){var kK={};var kL=kB.children[kM].style;kK.top=parseInt(kL.top,10);kK.left=parseInt(kL.left,10);var kz=kK.left-kG.x;var ky=kK.top-kG.y;kK.dx=kz*T-kz;kK.dy=ky*T-ky;kK.preDx=kz*kX-kz;kK.preDy=ky*kX-ky;kQ[kM]=kK}var kU=this;var kI;var kW;var kH;this._zoomAni=new fJ({fps:60,duration:e?500:1,transition:function(i){i=i*kE/(2*kJ);return kE*i-kJ*i*i},render:function(k6){k6=k6*(4*kJ)/(kE*kE);kI=kX+k6*(T-kX);var kZ=kx+r(kI);var k4=null;var k3=0;var k7=0;if(kA.onAnimationBeforeLooping){var k8=kA.onAnimationBeforeLooping(k6,kZ);k4=k8.loopingCenter;k3=k8.yDiff;k7=k8.totalYDiff}for(var k0=kQ.length-1;k0>-1;k0--){var k1=kQ[k0];if(kB.children[k0]){var k5=kB.children[k0].style;kW=k1.preDx+(k1.dx-k1.preDx)*k6-kD.width*k6;kH=k1.preDy+(k1.dy-k1.preDy)*k6-kD.height*k6+k3;k5.left=k1.left+kW+"px";k5.top=k1.top+kH+"px";k5.height=k5.width=256*kI+"px"}}var kY=kD.width*k6;var k2=kD.height*k6;if(kT.isRestrict){kU._enableCanvas2dMap&&kU._canvas2dMapMgr.clearLabel()}else{kU._enableCanvas2dMap&&kU._canvas2dMapMgr.drawLabel(kI,kF,kx,kS,kR,k6,kY,k2,k7,k3)}kU._preZoomTimes=kI;kU._preRenderTick=k6;kA.onAnimationLooping&&kA.onAnimationLooping(k6,kZ,k4)},finish:function(){kU._preZoomTimes=1;kU._zoomAni=null;kU._animationDiv=null;kA.onAnimationFinish&&kA.onAnimationFinish();kU.showNonAnimationLayers()}});return this._zoomAni},stopAnimation:function(){if(this._zoomAni){this._zoomAni.stop();this._zoomAni=null}}});function ku(e){this._initVars(e);this._initColorCanvas();this._bindEvent(e)}e8.extend(ku.prototype,{_initVars:function(e){this._map=e._map;this._canvas2dMapMgr=e;this._labelCtx=e._labelCtx;this.ratio=this._map.config.ratio;this.sizeRatio=this.ratio>1?2:1;this.RANK1=1000000;this.RANK2=2000000;this.RANK3=3000000;this.RANK4=4000000;this.RANK5=5000000},_initColorCanvas:function(){var i=256,T=b5("canvas"),e=T.style;e.width=i+"px";e.height=i+"px";T.width=i;T.height=i;this._colorCvsSize=i;this._colorCvs=T;this._colorCtx=T.getContext("2d")},getLabelImageData:function(kK){var kJ=kK.textImg;var T=kK.textPos;var kH=this.ratio;var kF=this.sizeRatio/kH;var ky=this._colorCtx;var kC=this._colorCvsSize;ky.clearRect(0,0,kC,kC);var kE=0;var e=0;var kB=0;for(var kD=0;kDkE){kE=T[kD].width;e=kD;kB=T[kD].drawX}}kE/=kF;var kG=0;for(var kD=0,kA=T.length;kDkE){kE=kI.width/kF}kG+=kI.height/kF+2*kH}var kx=ky.getImageData(0,0,kE,kG);var kz=ky.getImageData(0,0,kE,kG);return[kx,kz]},_bindEvent:function(i){var e=this,T=i._map;T.addEventListener("onspotmouseover",function(kA){if(!this.isCanvasMap()||!this.temp.isPermitSpotOver){return}if(kA.spots.length>0){var kz=kA.spots[0].userdata.uid;var ky=kA.spots[0].userdata.name;var kx=e.findLabelByUid(kz,ky);kx&&e._toHighLightColor(kx)}});T.addEventListener("onspotmouseout",function(kA){if(!this.isCanvasMap()||!this.temp.isPermitSpotOver){return}if(kA.spots.length>0){var kz=kA.spots[0].userdata.uid;var ky=kA.spots[0].userdata.name;var kx=e.findLabelByUid(kz,ky);kx&&e._toDefaultColor(kx)}});T.addEventListener("onspotclick",function(kA){if(!this.isCanvasMap()||!this.temp.isPermitSpotOver){return}if(kA.spots&&kA.spots.length>0){var kz=kA.spots[0].userdata.uid;var ky=kA.spots[0].userdata.name;var kx=e.findLabelByUid(kz,ky);kx&&e._changeBaseMapState(kx)}else{e._recoverNormalState()}});T.on("spot_status_reset",function(){e._recoverNormalState()});T.on("spot_highlight",function(ky){var kx=e.findLabelByUid(ky.uid);kx&&e._changeBaseMapState(kx)})},_getTextBound:function(kI){if(!kI.textPos){return null}var kG=this.ratio;var kE=this.sizeRatio/kG;var T=kI.textPos;var kH=kI.baseDrawX;var kF=kI.baseDrawY;var kC=kH*kG+(T[0].drawX-kH)/kE;var kA=kF*kG+(T[0].drawY-kF)/kE;var ky=kC+T[0].width/kE;var e=kA+T[0].height/kE;for(var kD=0,kB=T.length;kDky){ky=kz+kJ.width}if(kx+kJ.height>e){e=kx+kJ.height}}return[kC,kA,ky,e]},_toHighLightColor:function(T){if(T._tempRank&&T._tempRank==this.RANK5){return}var kB=this._getTextBound(T);if(!kB){return}var kx=Math.round(kB[0]);var i=Math.round(kB[1]);var e=this.getLabelImageData(T);var kz=e[0];var ky=e[1];var kA=this._canvas2dMapMgr.getFilterImageData(kz,this.RANK5);T._oldImgData=ky;this._labelCtx.putImageData(kA,kx,i)},_toDefaultColor:function(e){if(e._tempRank&&e._tempRank==this.RANK5){return}if(e._oldImgData){var i=this.sizeRatio;var T=this._getTextBound(e);if(!T){return}this._labelCtx.putImageData(e._oldImgData,Math.round(T[0]),Math.round(T[1]));e._oldImgData=null}},_changeBaseMapState:function(kx){var T=this._canvas2dMapMgr;var i=kx.guid;var e=kx.guidExt;var ky={guid:i,name:kx.name,guidExt:e};T._labelStrategy.setStrategyInfo(ky);T._loadData()},_recoverNormalState:function(){var e=this._canvas2dMapMgr;e._labelStrategy.setStrategyInfo(null);e._loadData()},findLabelByUid:function(kz,kx){var kB=this._canvas2dMapMgr,e=kB._computedLabel;for(var ky=0,T=e.length;kylC){lC=lF.drawX+lF.width}if(lF.drawY+lF.height>lB){lB=lF.drawY+lF.height}}}}}else{kF.tileX=kx;kF.tileY=T;kM=kx+kF.minXOriginal;kK=T+kF.minYOriginal;lC=kx+kF.maxXOriginal;lB=T+kF.maxYOriginal}if(kM!=undefined){var lu=lr+(kM-lr)/lj;var lt=lq+(kK-lq)/lj;var k5=lr+(lC-lr)/lj;var k3=lq+(lB-lq)/lj;kF.minX=lu;kF.minY=lt;kF.maxX=k5;kF.maxY=k3;var ly=(lu+k5)/2,lx=(lt+k3)/2,le=kL+(ly-lv/2)*kP,lc=kJ+(ld/2-lx)*kP;kF.geoX=le;kF.geoY=lc;k7.push(kF)}}}if(lJ){for(var k4=0,k0=lJ.length;k4lC){lC=kU+lw.width}if(kI+lw.height>lB){lB=kI+lw.height}if(kO.length===2){var kT=kO[1];var kR=lr+kT.destX;var kH=lq+kT.destY;if(kHlC){lC=kR+kT.width}if(kH+kT.height>lB){lB=kH+kT.height}}ln._tempBounds=[kM,kK,lC,lB];var lb=kG.iconPos;var kA=lb.geoX;var ky=lb.geoY;var lr=(kA-kL)/kP+lv/2;var lq=(kJ-ky)/kP+ld/2;var kM=lr+lb.destX;var kK=lq+lb.destY;var lC=kM+lb.width;var lB=kK+lb.height;kG.textPos=kG.textPos||kG._textPos;var kO=kG.textPos;var lw=kO[0];var kU=lr+lw.destX;var kI=lq+lw.destY;if(kUlB){lB=kI+lw.height}if(kO.length===2){var kT=kO[1];var kR=lr+kT.destX;var kH=lq+kT.destY;if(kRlB){lB=kH+kT.height}}kG._tempBounds=[kM,kK,lC,lB]}for(var k4=0,k0=lJ.length;k4lH[2]||lD[3]lH[3])){kN++;if(k8.textPos){k8._textPos=k8.textPos;delete k8.textPos}}var lH=lI._tempBounds;if(!(lD[2]lH[2]||lD[3]lH[3])){kN++;if(lI.textPos){lI._textPos=lI.textPos;delete lI.textPos}}if(kN>=2){if(lz.textPos){lz._textPos=lz.textPos;delete lz.textPos}}}}for(var k4=0,k0=lJ.length;k4lC){lC=lw.drawX+lw.width}if(lw.drawY+lw.height>lB){lB=lw.drawY+lw.height}if(kO.length===2){var kT=kO[1];kT.drawX=lr+kT.destX;kT.drawY=lq+kT.destY;if(kT.drawXlC){lC=kT.drawX+kT.width}if(kT.drawY+kT.height>lB){lB=kT.drawY+kT.height}}}var lu=lr+(kM-lr)/lj;var lt=lq+(kK-lq)/lj;var k5=lr+(lC-lr)/lj;var k3=lq+(lB-lq)/lj;k9.minX=lu;k9.minY=lt;k9.maxX=k5;k9.maxY=k3;var lm=(lu+k5)/2;var lk=(lt+k3)/2;var kB=kL+(lm-lv/2)*kP;var kz=kJ+(ld/2-lk)*kP;k9.geoX=kB;k9.geoY=kz;k7.push(k9)}}var lo=this._strategyInfo;if(lo){var k6=lo.guid;var lf=lo.name;var kW=lo.guidExt;for(var k4=0,k0=k7.length;k4la.maxX-k2||lz.maxY-k2la.maxY-k2)){lz.arrIntersectIndex.push(k1)}}}for(var k4=0,k0=k7.length;k4kC){var T=kA.splice(0,kz);for(var kD=0,kB=T.length;kD0){this.isDrawText=true}},_loadLabelData:function(kG,kF,kE,T,kH,e){var kz=kG.toString();var kx=kF.toString();var kB="cbk_"+kz.replace("-","_")+"_"+kx.replace("-","__")+"_"+Math.floor(kE);var kL=fD+"."+kB;var kK=this._labelDataUrls;var kD=Math.abs(kG+kF)%kK.length;var kQ=kK[kD];if(window.offLineIPAddress){kQ=window.offLineIPAddress+"pvd/"}var i=this.labelStyleParam;var kJ="?qt=vtile";var kM="";if(this._map.config.style!=="default"){kM="&styleId=1"}var kI="x={x}&y={y}&z={z}&udt={udt}&v={v}&styles={styles}"+kM+"&textonly=1&textimg=1&scaler={scaler}&fn="+encodeURIComponent(kL);var kN=fb.calcLoopParam(kG,kE).col;var kC=this.ratio>1?2:1;var kA=kI.replace(/{x}/,kN).replace(/{y}/,kF).replace(/{z}/,Math.floor(kE)).replace(/{styles}/,i).replace(/{udt}/,this._udt).replace(/{v}/,this._version).replace(/{scaler}/,kC);var ky=kQ+kJ+"¶m="+window.encodeURIComponent(e4(kA));var kP=this;var kO=kP._map;bF[kB]=function(kR){kP._vectorDrawLib.parseLabelData(kR,kG,kF,kE,T,kH,function(kW){var kT=kO.getCenterIn();var kX=kO.getZoom();var kZ="viewKey_"+Math.floor(kT.lng)+"_"+Math.floor(kT.lat)+"_"+kX;kP._labelCount--;var k0=kP._getCache(kG,kF,kE,T).updateLabelCounter;kP._labelCount-=k0;var kU=kP._curViewLabels;if(kZ===e||(kP._labelCount<0&&kX===kE)){kU.push(kW)}if(kZ===e){kP.statResponseCount++}if(kP._labelCount<=0){var kS=(new Date()).getTime();kP.updateLabel();var kV=(new Date()).getTime();var kY=new fU("oncanvasmaploaded");kY.drawTime=kV-kS;if(kP.statResponseCount===kP.statRequestCount){kY.isAllLoadedDrawing=true}kO.dispatchEvent(kY)}kP._setCacheValue(kG,kF,kE,T,kW);delete bF[kB]})};g1.load(ky)},drawLabel:function(T,kx,kE,i,kC,ky,e,kz,kD,kA){var kB=this;if(!kB._computedLabel){return}if(kB._computedLabel._zoom!==kE){kB.clearLabel();return}kB._map.temp.isPermitSpotOver=false;kB.clearLabel();kB._vectorDrawLib.zoomingIconAndText(this._labelCtx,kB._computedLabel,T,kx,i,kC,ky,e,kz,kD,kA)},_addSpotData:function(){this._spotData=[];var kE=this._map.getZoom();for(var kz=0,ky=this._computedLabel.length;kzkE)){continue}var kA=[];kA[0]=(kB.minX-kB.maxX)/2;kA[1]=(kB.minY-kB.maxY)/2;kA[2]=(kB.maxX-kB.minX)/2;kA[3]=(kB.maxY-kB.minY)/2;var kx=null;if(kB.iconPos){kx=new cF(kB.iconPos.geoX,kB.iconPos.geoY)}var T=kB.name?kB.name.replace("\\\\","
"):"";if(kB.iconPos&&kB.iconPos.iconType.indexOf("ditie")>-1&&this._map.getZoom()>14){T=""}var kD={n:T,pt:new cF(kB.geoX,kB.geoY),userdata:{iconPoint:kx,uid:kB.guid,name:T,type:kB.iconPos?kB.iconPos.iconType:"",iconImg:kB.iconImg,mapPoi:true,adver_log:kB.adver_log||""},bd:kA,tag:"MAP_SPOT_INFO"};this._spotData.push(kD)}var kC=new fU("onspotsdataready");kC.spots=this._spotData;this._map._spotDataOnCanvas=this._spotData;this._map.dispatchEvent(kC)},isClickableLabel:function(e){if(e.isDel||(!e.guid&&!e.name)){return false}return true},getFilterImageData:function(T,kA){var kB=T.data,kz=this._labelStrategy,kA=parseInt(kA);for(var kC=0,ky=kB.length;kC0&&!kF){continue}var kJ=Math.round(kS[0]/100);var kI=Math.round(kS[1]/100);var kV={lng:kP+kJ,lat:kO-(kM*kC-kI)};var kA=kJ/kC;var kz=kM-kI/kC;var kN=kS[7]||"";var k0=kS[5];var kQ={type:"fixed",name:kN,textImg:kL,rank:kS[4],baseX:kA,baseY:kz,iconPos:null,textPos:null,guid:kS[3]||"",tracer:kW,direction:k0,startScale:3};if((k0!==jp&&kF||!kF)&&kZ!==null){kQ.iconPos=this._getIconPosition(kZ,kE,kA,kz,kV);if(kQ.iconPos){T=kQ.iconPos.width;kK=kQ.iconPos.height}}if(T===0){kQ.direction=jp}if(kF){kQ.textPos=this._getTextDrawData(kS,kA,kz,T,kK)}if(kQ.textPos||kQ.iconPos){kR.push(kQ)}}}},_isVisible:function(e,i){var kx;if(!this._binaryCache[e]){kx=e.toString(2);if(kx.length<8){kx=new Array(8-kx.length+1).join("0")+kx}this._binaryCache[e]=kx}kx=this._binaryCache[e];var T=fs[i].start;return kx[i-T]==="1"},_getIconPosition:function(kB,kz,T,i,e){var kx=this._map.config.style;var kC=bF["iconSetInfo"+kx][kB];if(!kC){if(kB.charCodeAt(0)>=48&&kB.charCodeAt(0)<=57){kC=bF["iconSetInfo"+kx]["_"+kB]}}if(!kC){return null}var ky=kC[0];var kA=kC[1];ky=ky*kz;kA=kA*kz;return{srcX:0,srcY:0,destX:T-ky/2,destY:i-kA/2,width:ky,height:kA,geoX:e.lng,geoY:e.lat,mcPt:e,iconType:kB}},_getTextDrawData:function(kI,kH,kG,kx,kE){var kN=kI[5];if(typeof kN!=="number"){kN=0}var kC=this.ratio;var kB=kC/2;kx*=kB;kE*=kB;var kD=kI[12];var ky=kD.length;var kQ=0;var kP=0;var kM=[];var kL=0;var kO=0;for(var kK=0;kK0&&e>0){kM.push({srcX:kz,srcY:i,destX:kQ,destY:kP,width:T,height:e})}}if(kM.length>0){return kM}return null},_getLineLabelInfo:function(kF,kx,ky,kU,k7,kM,kS,kR,kT,kL){if(kF.length!==10){return}var kW=this.ratio;var T=this.ratio;var k3=kF[7].length;var kN=kF[1];var k5=kF[3];var lb=kF[8];var kB=kF[4];var e=2;var kz=kB.slice(0,e);for(var k8=e;k8kJ){kJ=lf+kA}if(le+kD>kI){kI=le+kD}}kO.push({angle:kH,srcX:kC,srcY:kE,destX:lf,destY:le,width:kA,height:kD})}var k4={type:"line",textImg:kx,rank:kN,baseX:k1,baseY:kZ,arrWordPos:kO,minXOriginal:kX,minYOriginal:kV,maxXOriginal:kJ,maxYOriginal:kI,text:""};kL.push(k4)}},alterColor:function(kA,e,kz){var T=this._colorCtx,i=this._canvas2dMapMgr;T.clearRect(0,0,kA.width,kA.height);T.drawImage(e,kA.srcX,kA.srcY,kA.width,kA.height,0,0,kA.width,kA.height);var ky=T.getImageData(0,0,kA.width,kA.height),kx=i.getFilterImageData(ky,kz);T.putImageData(kx,0,0)},drawIconAndText:function(kM,kL,e){var kD=this.ratio;var kB=this.sizeRatio/kD;var kF=2/kD;var kX=this;for(var kP=0,kN=kL.length;kP10&&kS<350){kM.save();var kV=Math.round(kY+kR.width/2);var kU=Math.round(kW+kR.height/2);kM.translate(kV,kU);kM.rotate(-kS/180*Math.PI);kM.drawImage(kJ,kR.srcX,kR.srcY,kR.width,kR.height,-Math.round(kR.width/2),-Math.round(kR.height/2),kR.width/kB,kR.height/kB);kM.restore()}else{kM.drawImage(kJ,kR.srcX,kR.srcY,kR.width,kR.height,kY,kW,kR.width/kB,kR.height/kB)}}}}}},isCollide:function(kz,kI,kH,e,kB,T,kD){for(var ky=0,kx=T.length;kykC[1]+kC[3]+kG||kH+kBkC[2]+kC[4]+kF)){return true}}}return false},zoomingIconAndText:function(kX,kR,kx,kV,kW,lp,k4,kF,la,k3,kO){var lq=this.ratio;var kG=this.sizeRatio/lq;var lr=2/lq;var lB=lq/2;var lk=kV.x;var lj=kV.y;var kY=2*lq;if(kO!==0){lj+=k3}var kJ=undefined,kC=undefined,kz=undefined,kE=undefined,kN=undefined;var k9=lp>0?true:false;if(!k9){kJ=[];var ld=1-k4}for(var lx=0,lv=kR.length;lx10&&kU<350){var ln=lf+lo.width/2;var lm=le+lo.height/2;var ky=kU/180*Math.PI;var k1=Math.cos(ky);var kK=Math.sin(ky);var lc=k1;var kL=k1;var lb=kK;var kM=-kK;var kT=ln-ln*k1-lm*kK;var e=lm+ln*kK-lm*k1;kX.save();kX.transform(lc,kM,lb,kL,kT,e);kX.drawImage(kA,lo.srcX,lo.srcY,kE,kN,kC,kz,kE/kG,kN/kG);kX.restore()}else{kX.drawImage(kA,lo.srcX,lo.srcY,kE,kN,kC,kz,kE/kG,kN/kG)}!k9&&kJ.push([lx,kC,kz,kE,kN])}}kX.restore()}}}});function eC(e){this.initVars(e)}e8.extend(eC.prototype,{initVars:function(e){this._map=e._map;this._canvas2dMapMgr=e;this.base64Prefix="data:image/png;base64,";this.bizData=null;this.objTextsPng=null;this.arrIconsPng=null;this.bizLabels=null},proecessBizData:function(kz,kD){var kB=this;this.bizData=kz;this.objTextsPng=null;this.arrIconsPng=null;var T=kz.textsPng;var kF=kz.iconsPng;if(!T||!kF){return}var kC=new Image();kC.onload=function(){kB.objTextsPng=this;kB.calcIconAndTextInfo(kD);this.onload=null};kC.src=this.base64Prefix+T;var kE=kF.length;var e=[];for(var ky=0;kykB.width||i>kB.height)&&(e>kB.width||kF>kB.height)){return false}return true},_setPlatformPosition:function(kE,kD,kG){kG=kG||{};if(kE===0&&kD===0&&!kG.point){return}if(isNaN(kG.initMapOffsetX)){kG.initMapOffsetX=this.offsetX}if(isNaN(kG.initMapOffsetY)){kG.initMapOffsetY=this.offsetY}var kA=iU(this._heading);if(this._tilt>0){kD=kD/Math.cos(iU(this._tilt))}var kF=kE*Math.cos(kA)+kD*Math.sin(kA);var kC=-kE*Math.sin(kA)+kD*Math.cos(kA);kF=kF+kG.initMapOffsetX;kC=kC+kG.initMapOffsetY;if(kG.point){var i=this.restrictCenter(kG.point);if(!i.equals(this.centerPoint)){this.centerPoint=i.clone();this.fire(new fU("oncenter_changed"))}}else{var kx=this.offsetX-kF;var e=this.offsetY-kC;var kB=this.centerPoint.lng;var kz=this.centerPoint.lat;var ky=new cF(kB,kz);var T=this.getZoomUnits();this.centerPoint=this.restrictCenter(new cF(ky.lng+kx*T,ky.lat-e*T),T);this.fire(new fU("oncenter_changed"))}this.offsetX=kF;this.offsetY=kC;this.dispatchEvent(new fU("onmoving"))},restrictCenter:function(kF,e){if(this.config.restrictCenter===false){return kF}e=e||this.getZoomUnits();var kD=this.pixelToPointIn(new ft(this.width,0),{center:kF});var kA=this.pixelToPointIn(new ft(0,this.height),{center:kF});var kG=kF.lng;var kL=kF.lat;if(!!this.config.restrictBounds&&!this.config.restrictBounds.isEmpty()){var kK=this.config.restrictBounds;var T=kK.getSouthWest();var kI=kK.getNorthEast();var kE=jt.convertLL2MC(T);var ky=jt.convertLL2MC(kI);var kB=this.calcNewZoomByRestriction(kG,kL,kA,kD,kE.lng,ky.lng,kE.lat,ky.lat);if(kB>this.zoomLevel){this.zoomLevel=kB;return kF}kF.lng=this.calcNewLngByBounds(kG,kA,kD,kE.lng,ky.lng,e);kF.lat=this.calcNewLatByBounds(kL,kA,kD,kE.lat,ky.lat,e);return kF}var kC=this.pixelToPointIn(new ft(0,0),{center:kF});var kx=this.pixelToPointIn(new ft(0,this.height),{center:kF});if(this.zoomLevel<5){if(kC.lat>h2.MAX_LAT&&kx.lath2.MAX_LAT){kF.lat=h2.MAX_LAT-this.height/2*e}else{if(kx.latkz&&e.latkA&&e.lngkz){ky=kz-this.height/2*e}else{if(kx.latT){i=T-this.width/2*e}else{if(kz.lngky){this._tilt=ky}if(kJ){if(this._heading%360!==0||this._tilt>0){var i=this._webglMapCamera.fromScreenPixelToMC(T.x,T.y,{center:kB,zoom:this.zoomLevel});if(i){var kG=i.sub(kA);var kx=kB.sub(kG);this.centerPoint=this.restrictCenter(kx)}}else{var kD=this.getZoomUnits();var kx=new cF(kJ.lng-kD*(T.x-this.width/2),kJ.lat+kD*(T.y-this.height/2));this.centerPoint=this.restrictCenter(kx,kD)}this.fire(new fU("oncenter_changed"))}this._checkFireZoomend();kK.callback&&kK.callback();return}this._animationInfo.zoom={current:this.zoomLevel,diff:e-this.zoomLevel,target:e};var kH=this;var kI=this._tilt;if(this.fixPoint||kI>h2.MAX_DRAG_TILT_L2){kK.renderCallback=function(){var kO=kH.getCurrentMaxTilt();if(kH._tilt>kO){kH._tilt=kO}var kP=kH.fixPixel;if(!kH.fixPixel||!kH.fixPoint){return}var kL=kH.fixPixel;var kV=kH.fixPoint;var kS=kH.fixCenter;var kQ=kH.mousePosMCPoint;if(kH._heading%360!==0||kH._tilt>0){var kM=kH._webglMapCamera.fromScreenPixelToMC(kL.x,kL.y,{center:kS,zoom:kH.zoomLevel,tilt:kH._tilt});if(kM){var kU=kM.sub(kQ);var kN=kS.sub(kU);kH.centerPoint=kH.restrictCenter(kN)}}else{var kR=kL;var kT=kH.getZoomUnits();var kN=new cF(kV.lng-kT*(kR.x-kH.width/2),kV.lat+kT*(kR.y-kH.height/2));kH.centerPoint=kH.restrictCenter(kN,kT)}kH.fire(new fU("oncenter_changed"))}}if(kK.fromMouseWheel===true){this._startInfiniteZoomAnimation(kK);kK.callback&&kK.callback();kH._checkFireZoomend();return}if(!kK.callback){kK.callback=function(){kH._checkFireZoomend()}}else{var kC=kK.callback;kK.callback=function(kL,kM){kC(kL,kM);kH._checkFireZoomend()}}this._startAnimation(kK)},_checkFireZoomend:function(){var e=this;if(e.fireZoomendTimer){clearTimeout(e.fireZoomendTimer)}e.fireZoomendTimer=setTimeout(function(){if(e.zoomEventStatus==="zooming"){e.fire(new fU("onzoomend"));e.zoomEventStatus="idle"}e.fireZoomendTimer=null},150)},deepZoomMedia:function(e){var i=this;if(!i.temp.isStdCtrlBusy){i.temp.isStdCtrlBusy=true;i.deepZoomTo(i.zoomLevel+e);setTimeout(function(){i.temp.isStdCtrlBusy=false},400)}},deepZoomTo:function(e){this.zoomTo(e)},flyToIn:function(T,k1,kM){kM=kM||{};var ky=this._getProperZoom(k1);k1=ky.zoom;if(this.centerPoint.equals(T)&&this.zoomLevel===k1&&typeof kM.heading!=="number"&&typeof kM.tilt!=="number"){return}var e=this.getHeading()%360;var kE=this.getTilt();var kK=0;var kO=0;var kH=this.getBounds().containsPoint(T);if(typeof kM.heading==="number"){kK=kM.heading}else{if(kH){kK=e}}if(typeof kM.tilt==="number"){kO=kM.tilt}else{if(kH){kO=kE}}this._heading=e;var kY=kK-e;var kU=kO-kE;var kI=this;var kA=this.zoomLevel;var kB=1.42;var kQ=this.zoomScale(k1-kA);var k3=this.getZoomUnits();var kG=this.centerPoint.div(k3);var k4=T.div(k3);var kX=this.worldSize();var kT=kB;var kS=Math.max(this.width,this.height);var kR=kS/kQ;var kF=k4.sub(kG).mag();var i=kT*kT;function k0(k6){var k5=(kR*kR-kS*kS+(k6?-1:1)*i*i*kF*kF)/(2*(k6?kR:kS)*i*kF);return Math.log(Math.sqrt(k5*k5+1)-k5)}function kx(k5){return(Math.exp(k5)-Math.exp(-k5))/2}function kC(k5){return(Math.exp(k5)+Math.exp(-k5))/2}function kL(k5){return kx(k5)/kC(k5)}var kD=k0(0);var kV=function(k5){return(kC(kD)/kC(kD+kT*k5))};var kW=function(k5){return kS*((kC(kD)*kL(kD+kT*k5)-kx(kD))/i)/kF};var kz=(k0(1)-kD)/kT;if(Math.abs(kF)<0.000001||kz===Infinity||isNaN(kz)){if(Math.abs(kS-kR)<0.000001){this._animationInfo.zoom={current:this.zoomLevel,diff:k1-this.zoomLevel};this._animationInfo.center={current:this.centerPoint,diff:T.sub(this.centerPoint)};this._animationInfo.heading={current:e,diff:kK-e};this._animationInfo.tilt={current:kE,diff:kO-kE};this.setLock(true);this._startAnimation({callback:function(k5){kI.setLock(false);if(kM.callback){kM.callback(k5)}},duration:kM.duration});return}var k2=kR5){kZ=(kz-5)/2+kZ}}var kN=kM.duration||1000*kz/kZ;if(isNaN(kN)){var kP={};for(var kJ in kM){kP[kJ]=kM[kJ];kP.noAnimation=true}this.centerAndZoomIn(T,k1,kP);return}this.fire(new fU("onmovestart"));this.fire(new fU("onzoomstart"));this.setLock(true);this._startAnimation({duration:kN,renderCallback:function(k5,k6){var k7=k5*kz;var la=kW(k7);var k9=kA+kI.scaleZoom(1/kV(k7));if(k9kI.getMaxZoom()){k9=kI.getMaxZoom()}if(k9!==kI.zoomLevel){kI.zoomLevel=k9;kI.fire(new fU("onzoom_changed"))}kI.centerPoint=kG.add(k4.sub(kG).mult(la)).mult(k3);kI.fire(new fU("oncenter_changed"));if(typeof kK==="number"){var k8=k5/0.7;if(k8>1){k8=1}kI.setHeading(e+kY*k5,{noAnimation:true})}if(typeof kO==="number"){kI.setTilt(kE+kU*k5,{noAnimation:true})}},callback:function(k5,k6){kI.setLock(false);if(k6&&k6.stop===true){kI.fire(new fU("onmoveend"));kI.fire(new fU("onzoomend"));kM.callback&&kM.callback(k5);return}if(k1!==kI.zoomLevel){kI.zoomLevel=k1;kI.fire(new fU("onzoom_changed"))}kI.fire(new fU("onmoveend"));kI.fire(new fU("onzoomend"));kM.callback&&kM.callback(k5)}})},zoomScale:function(e){return Math.pow(2,e)},scaleZoom:function(e){return Math.log(e)/Math.LN2},panToIn:function(i,T){T=T||{};if(!i||i.equals(this.centerPoint)){T.callback&&T.callback();return}var kx=this.pointToPixelIn(i);var e=Math.round(this.width/2);var kz=Math.round(this.height/2);var ky=this._ifUseAnimation(i,this.zoomLevel);if(T.noAnimation===true||ky===false){this._stopAllAnimations();this._panToIn(e-kx.x,kz-kx.y,i);T.callback&&T.callback();return}this.flyToIn(i,this.zoomLevel,T)},_panToIn:function(i,e,kx){var T=this.temp;if(T.operating===true){return}if(T.dragAni){T.dragAni.stop(false,{readyToMove:true});T.dragAni=null}this.dispatchEvent(new fU("onmovestart"));this._setPlatformPosition(i,e,{point:kx});this.dispatchEvent(new fU("onmoveend"))},_stopAllAnimations:function(e){e=e||{};if(this._ani){this._ani.stop(!!e.goToEnd,{stopCurrentAnimation:e.stopCurrentAnimation});this._ani=null}if(this._infiniteAni){this._infiniteAni.stop();this._infiniteAni=null}},panBy:function(i,e,T){i=Math.round(i)||0;e=Math.round(e)||0;T=T||{};if(Math.abs(i)<=this.width&&Math.abs(e)<=this.height&&T.noAnimation!==true){this._panBy(i,e,T)}else{this._panToIn(i,e,T.point);T.callback&&T.callback()}},_panBy:function(i,e,ky){if(this.temp.operating===true){return}ky=ky||{};this.dispatchEvent(new fU("onmovestart"));var kx=this;var T=kx.temp;T.pl=kx.offsetX;T.pt=kx.offsetY;if(T.tlPan){T.tlPan.cancel()}if(T.dragAni){T.dragAni.stop(false,{readyToMove:true});T.dragAni=null}T.tlPan=new fJ({fps:ky.fps||kx.config.fps,duration:ky.duration||kx.config.actionDuration,transition:ky.transition||gP.easeInOutQuad,render:function(kz){this.terminative=kx.temp.operating;if(kx.temp.operating){return}kx._setPlatformPosition(i*kz,e*kz,{initMapOffsetX:T.pl,initMapOffsetY:T.pt})},finish:function(kz){kx.dispatchEvent(new fU("onmoveend"));kx.temp.tlPan=false;if(kx.temp.stopArrow===true){kx.temp.stopArrow=false;if(kx.temp.arrow!==0){kx._arrow()}}}})},_startAnimation:function(i){var ky=this._animationInfo;var T=this;i=i||{};if(T._ani){T._ani.stop(!!i.goToEnd,{stopCurrentAnimation:i.stopCurrentAnimation})}if(T._infiniteAni){T._infiniteAni.stop();T._infiniteAni=null}var kz=i.duration||500;var kA=i.transition||gP.ease;var e=new fU("onanimation_start");this.fire(e);if(i.unstopable){ky=this._animationInfoUnstopable}var kx=new fJ({duration:kz,transition:kA,render:function(kD,kC){for(var kB in ky){if(!ky.hasOwnProperty(kB)){continue}var kF=ky[kB].current;var kE=ky[kB].diff;T._setValueTick(kB,kF,kE,kD)}if(i.renderCallback){i.renderCallback(kD,kC)}},finish:function(kB){T.fire(new fU("onanimation_end"));if(i.unstopable){T._animationInfoUnstopable={};T._unstopableAni=null}else{T._ani=null;T._animationInfo={}}if(i.mapNeedCbk){i.mapNeedCbk()}if(i.callback){i.callback(kB)}},onStop:function(kB){kB=kB||{};T.fire(new fU("onanimation_end"));if(kB.stopCurrentAnimation){T._animationInfo={}}T._ani=null;if(i.mapNeedCbk){i.mapNeedCbk()}if(i.callback){i.callback(null,{stop:true})}}});if(i.unstopable){T._unstopableAni=kx}else{T._ani=kx}},_startInfiniteZoomAnimation:function(e){var i=this;if(i._ani){i._ani.stop(!!e.goToEnd,{stopCurrentAnimation:e.stopCurrentAnimation})}if(i._infiniteAni){return}this.fire(new fU("onanimation_start"));i._infiniteAni=new fJ({duration:10000,transition:gP.linear,render:function(){var T=i._animationInfo.zoom;if(Math.abs(T.current-T.target)<0.001){i._setValue("zoom",T.target);i._infiniteAni&&i._infiniteAni.stop();return}T.current+=(T.target-T.current)*0.35;i._setValue("zoom",T.current);if(e.renderCallback){e.renderCallback()}},finish:function(){i._infiniteAni=null;i._animationInfo={};i.fire(new fU("onanimation_end"));if(e.callback){e.callback()}},onStop:function(){i._infiniteAni=null;i._animationInfo={};i.fire(new fU("onanimation_end"));if(e.callback){e.callback()}}})},_setValue:function(e,T){if(e==="zoom"){this._preZoomLevel=this.zoomLevel;var i=this._getProperZoom(T);T=i.zoom;if(T!==this.zoomLevel){this.zoomLevel=T;if(T<5){this.restrictCenter(this.centerPoint)}this.fire(new fU("on"+e+"_changed"))}return}else{if(e==="center"){this.centerPoint=T}}this["_"+e]=T;this.fire(new fU("on"+e+"_changed"))},_setValueTick:function(e,ky,kx,i){if(e==="center"){var T=new cF(ky.lng+kx.lng*i,ky.lat+kx.lat*i);this._setValue(e,T);return}if(e==="zoom"){this._setValue(e,Math.pow(ky,1-i)*Math.pow(ky+kx,i));return}this._setValue(e,ky+kx*i)},setHeading:function(kx,i){i=i||{};if(kx===this._heading){i.callback&&i.callback();return}var T=ep(this._heading,360);var e=ep(kx,360);if(e===T){this._heading=kx;i.callback&&i.callback();return}if(e===0&&T>180){e=360}if(i.noAnimation){this._setValue("heading",kx);i.callback&&i.callback();return}if(i.unstopable){this._animationInfoUnstopable.heading={current:T,diff:e-T}}else{this._animationInfo.heading={current:T,diff:e-T}}this._startAnimation(i)},resetHeading:function(e){var i=this._heading;while(i<0){i+=360}i=i%360;if(i>180){i-=360}this._heading=i;e=e||{};e.unstopable=true;this.setHeading(0,e)},getHeading:function(){return this._heading},setTilt:function(e,i){i=i||{};if(e===this._tilt){i.callback&&i.callback();return}if(e>h2.MAX_TILT){e=h2.MAX_TILT}if(e0){kF=1/Math.sqrt(kF);kI[0]=kH[0]*kF;kI[1]=kH[1]*kF}return kI};kD.dot=function(kG,kF){return kG[0]*kF[0]+kG[1]*kF[1]};kD.cross=function(kH,kG,kF){var kI=kG[0]*kF[1]-kG[1]*kF[0];kH[0]=kH[1]=0;kH[2]=kI;return kH};kD.lerp=function(kH,kG,kF,kI){var kK=kG[0],kJ=kG[1];kH[0]=kK+kI*(kF[0]-kK);kH[1]=kJ+kI*(kF[1]-kJ);return kH};kD.random=function(kF,kH){kH=kH||1;var kG=ky()*2*Math.PI;kF[0]=Math.cos(kG)*kH;kF[1]=Math.sin(kG)*kH;return kF};kD.transformMat2=function(kI,kH,kG){var kF=kH[0],kJ=kH[1];kI[0]=kG[0]*kF+kG[2]*kJ;kI[1]=kG[1]*kF+kG[3]*kJ;return kI};kD.transformMat2d=function(kI,kH,kG){var kF=kH[0],kJ=kH[1];kI[0]=kG[0]*kF+kG[2]*kJ+kG[4];kI[1]=kG[1]*kF+kG[3]*kJ+kG[5];return kI};kD.transformMat3=function(kI,kH,kG){var kF=kH[0],kJ=kH[1];kI[0]=kG[0]*kF+kG[3]*kJ+kG[6];kI[1]=kG[1]*kF+kG[4]*kJ+kG[7];return kI};kD.transformMat4=function(kI,kH,kG){var kF=kH[0],kJ=kH[1];kI[0]=kG[0]*kF+kG[4]*kJ+kG[12];kI[1]=kG[1]*kF+kG[5]*kJ+kG[13];return kI};kD.rotate=function(kI,kG,kF,kM){var kL=kG[0]-kF[0];var kK=kG[1]-kF[1];var kH=Math.sin(kM);var kJ=Math.cos(kM);kI[0]=kL*kJ-kK*kH+kF[0];kI[1]=kL*kH+kK*kJ+kF[1];return kI};kD.forEach=(function(){var kF=kD.create();return function(kI,kM,kN,kL,kK,kG){var kJ,kH;if(!kM){kM=2}if(!kN){kN=0}if(kL){kH=Math.min((kL*kM)+kN,kI.length)}else{kH=kI.length}for(kJ=kN;kJ0){kF=1/Math.sqrt(kF);kI[0]=kH[0]*kF;kI[1]=kH[1]*kF;kI[2]=kH[2]*kF}return kI};kC.dot=function(kG,kF){return kG[0]*kF[0]+kG[1]*kF[1]+kG[2]*kF[2]};kC.cross=function(kG,kL,kK){var kF=kL[0],kN=kL[1],kM=kL[2],kJ=kK[0],kI=kK[1],kH=kK[2];kG[0]=kN*kH-kM*kI;kG[1]=kM*kJ-kF*kH;kG[2]=kF*kI-kN*kJ;return kG};kC.lerp=function(kH,kG,kF,kI){var kL=kG[0],kK=kG[1],kJ=kG[2];kH[0]=kL+kI*(kF[0]-kL);kH[1]=kK+kI*(kF[1]-kK);kH[2]=kJ+kI*(kF[2]-kJ);return kH};kC.random=function(kF,kJ){kJ=kJ||1;var kH=ky()*2*Math.PI;var kI=(ky()*2)-1;var kG=Math.sqrt(1-kI*kI)*kJ;kF[0]=Math.cos(kH)*kG;kF[1]=Math.sin(kH)*kG;kF[2]=kI*kJ;return kF};kC.transformMat4=function(kI,kH,kG){var kF=kH[0],kK=kH[1],kJ=kH[2];kI[0]=kG[0]*kF+kG[4]*kK+kG[8]*kJ+kG[12];kI[1]=kG[1]*kF+kG[5]*kK+kG[9]*kJ+kG[13];kI[2]=kG[2]*kF+kG[6]*kK+kG[10]*kJ+kG[14];return kI};kC.transformMat3=function(kI,kH,kG){var kF=kH[0],kK=kH[1],kJ=kH[2];kI[0]=kF*kG[0]+kK*kG[3]+kJ*kG[6];kI[1]=kF*kG[1]+kK*kG[4]+kJ*kG[7];kI[2]=kF*kG[2]+kK*kG[5]+kJ*kG[8];return kI};kC.transformQuat=function(kL,kR,kF){var kS=kR[0],kQ=kR[1],kP=kR[2],kN=kF[0],kM=kF[1],kK=kF[2],kO=kF[3],kI=kO*kS+kM*kP-kK*kQ,kH=kO*kQ+kK*kS-kN*kP,kG=kO*kP+kN*kQ-kM*kS,kJ=-kN*kS-kM*kQ-kK*kP;kL[0]=kI*kO+kJ*-kN+kH*-kK-kG*-kM;kL[1]=kH*kO+kJ*-kM+kG*-kN-kI*-kK;kL[2]=kG*kO+kJ*-kK+kI*-kM-kH*-kN;return kL};kC.rotateX=function(kH,kG,kF,kK){var kJ=[],kI=[];kJ[0]=kG[0]-kF[0];kJ[1]=kG[1]-kF[1];kJ[2]=kG[2]-kF[2];kI[0]=kJ[0];kI[1]=kJ[1]*Math.cos(kK)-kJ[2]*Math.sin(kK);kI[2]=kJ[1]*Math.sin(kK)+kJ[2]*Math.cos(kK);kH[0]=kI[0]+kF[0];kH[1]=kI[1]+kF[1];kH[2]=kI[2]+kF[2];return kH};kC.rotateY=function(kH,kG,kF,kK){var kJ=[],kI=[];kJ[0]=kG[0]-kF[0];kJ[1]=kG[1]-kF[1];kJ[2]=kG[2]-kF[2];kI[0]=kJ[2]*Math.sin(kK)+kJ[0]*Math.cos(kK);kI[1]=kJ[1];kI[2]=kJ[2]*Math.cos(kK)-kJ[0]*Math.sin(kK);kH[0]=kI[0]+kF[0];kH[1]=kI[1]+kF[1];kH[2]=kI[2]+kF[2];return kH};kC.rotateZ=function(kH,kG,kF,kK){var kJ=[],kI=[];kJ[0]=kG[0]-kF[0];kJ[1]=kG[1]-kF[1];kJ[2]=kG[2]-kF[2];kI[0]=kJ[0]*Math.cos(kK)-kJ[1]*Math.sin(kK);kI[1]=kJ[0]*Math.sin(kK)+kJ[1]*Math.cos(kK);kI[2]=kJ[2];kH[0]=kI[0]+kF[0];kH[1]=kI[1]+kF[1];kH[2]=kI[2]+kF[2];return kH};kC.forEach=(function(){var kF=kC.create();return function(kI,kM,kN,kL,kK,kG){var kJ,kH;if(!kM){kM=3}if(!kN){kN=0}if(kL){kH=Math.min((kL*kM)+kN,kI.length)}else{kH=kI.length}for(kJ=kN;kJ0){kF=1/Math.sqrt(kF);kJ[0]=kI[0]*kF;kJ[1]=kI[1]*kF;kJ[2]=kI[2]*kF;kJ[3]=kI[3]*kF}return kJ};kB.dot=function(kG,kF){return kG[0]*kF[0]+kG[1]*kF[1]+kG[2]*kF[2]+kG[3]*kF[3]};kB.lerp=function(kH,kG,kF,kI){var kL=kG[0],kK=kG[1],kJ=kG[2],kM=kG[3];kH[0]=kL+kI*(kF[0]-kL);kH[1]=kK+kI*(kF[1]-kK);kH[2]=kJ+kI*(kF[2]-kJ);kH[3]=kM+kI*(kF[3]-kM);return kH};kB.random=function(kF,kG){kG=kG||1;kF[0]=ky();kF[1]=ky();kF[2]=ky();kF[3]=ky();kB.normalize(kF,kF);kB.scale(kF,kF,kG);return kF};kB.transformMat4=function(kJ,kI,kG){var kF=kI[0],kL=kI[1],kK=kI[2],kH=kI[3];kJ[0]=kG[0]*kF+kG[4]*kL+kG[8]*kK+kG[12]*kH;kJ[1]=kG[1]*kF+kG[5]*kL+kG[9]*kK+kG[13]*kH;kJ[2]=kG[2]*kF+kG[6]*kL+kG[10]*kK+kG[14]*kH;kJ[3]=kG[3]*kF+kG[7]*kL+kG[11]*kK+kG[15]*kH;return kJ};kB.transformQuat=function(kL,kR,kF){var kS=kR[0],kQ=kR[1],kP=kR[2],kN=kF[0],kM=kF[1],kK=kF[2],kO=kF[3],kI=kO*kS+kM*kP-kK*kQ,kH=kO*kQ+kK*kS-kN*kP,kG=kO*kP+kN*kQ-kM*kS,kJ=-kN*kS-kM*kQ-kK*kP;kL[0]=kI*kO+kJ*-kN+kH*-kK-kG*-kM;kL[1]=kH*kO+kJ*-kM+kG*-kN-kI*-kK;kL[2]=kG*kO+kJ*-kK+kI*-kM-kH*-kN;return kL};kB.forEach=(function(){var kF=kB.create();return function(kI,kM,kN,kL,kK,kG){var kJ,kH;if(!kM){kM=4}if(!kN){kN=0}if(kL){kH=Math.min((kL*kM)+kN,kI.length)}else{kH=kI.length}for(kJ=kN;kJ=2&&e<=4){this.result.eleData[e][i||0]=T;return}else{if(e===0||e===5||e===6){T.sort(function(ky,kx){return ky.overlay.zIndex-kx.overlay.zIndex})}}this.result.eleData[e]=T},clearLabelOverlayData:function(e){if(e===undefined){this.result.eleData[2]=[];this.result.eleData[3]=[];this.result.eleData[4]=[]}this.result.eleData[2][e]=[];this.result.eleData[3][e]=[];this.result.eleData[4][e]=[]},clearData:function(kx){var e=this.result.bkData;if(typeof kx==="number"){if(e[kx]){e[kx][0]=[];e[kx][1]=[];e[kx][2]=[]}return}for(var T=0;T0){T[0].sort(function(ky,kx){return ky.tileInfo.useZoom-kx.tileInfo.useZoom})}}});var gB=(function(){var kH=new Int8Array(4);var T=new Int32Array(kH.buffer,0,1);var kC=new Float32Array(kH.buffer,0,1);function kJ(kQ){T[0]=kQ;return kC[0]}function i(kQ){kC[0]=kQ;return T[0]}function kD(kQ){var kS=(kQ[3]<<24|kQ[2]<<16|kQ[1]<<8|kQ[0]);var kR=kJ(kS&4278190079);return kR}var ky=0;var kB=1;var kF=2;var kN=0;var kK=1;var kI=2;var kz=9;function kG(kQ,kR){var kS;if(kR%2===0){kS=[-kQ[1],kQ[0]]}else{kS=[kQ[1],-kQ[0]]}return kS}function e(kQ,kR,kS){var kT=kG(kQ,kR);var kU;if(kS===kB){return kT}else{if(kR===4||kR===5){kU=[kT[0]-kQ[0],kT[1]-kQ[1]]}else{kU=[kT[0]+kQ[0],kT[1]+kQ[1]]}if(kS===ky){vec2.normalize(kU,kU)}return kU}}function kM(kR,kQ){return Math.sqrt(Math.pow(kR[0]-kQ[0],2)+Math.pow(kR[1]-kQ[1],2))}function kx(kU,kT,kS,kQ){var kR=vec2.dot(kU,kT);if(kS===kI||kS===kK){if((kQ===0||kQ===1)&&kR>0){return true}else{if((kQ===2||kQ===3)&&kR<0){return true}}}if((kQ===0||kQ===1)&&kR<0){return true}else{if((kQ===2||kQ===3)&&kR>0){return true}}return false}function kE(kR,kW,kY){var kX=kG(kR,kW);var kT;var kV=kR;var kU=kY;var k0=[];vec2.normalize(k0,[kV[0]+kU[0],kV[1]+kU[1]]);var kZ=vec2.dot(kX,[-k0[1],k0[0]]);if(Math.abs(kZ)<0.1){kZ=1}var kS=1/kZ;kT=[-k0[1]*kS,k0[0]*kS];var kQ=vec2.dot(kR,kT);if(kQ<0){vec2.negate(kT,kT)}return{cos2:kQ,offset:kT}}function kP(kR,kW,kY,kQ){var kX=kG(kR,kW);var kV;var kU;var kT;if(kW===0||kW===1){kV=kY;kU=kR}else{kV=kR;kU=kY}if(!kV||!kU){return kX}var k0=[kV[0]+kU[0],kV[1]+kU[1]];if(k0[0]===0&&k0[1]===0){vec2.normalize(k0,kU)}else{vec2.normalize(k0,k0)}var k1=kx(k0,kX,kQ,kW);if(k1){return kX}var kZ=vec2.dot(kX,[-k0[1],k0[0]]);if(Math.abs(kZ)<0.1){kZ=1}var kS=1/kZ;kT=[-k0[1]*kS,k0[0]*kS];return kT}function kO(k1,k2,kV,kU,k3,k0,kT,kW,kS,kZ){var kY;var kR=0;var kQ=false;kY=k0.length/kz-1;kA(k2[0],k1[0],kV[0],k3,kU,4,kW,kS,undefined,k0,kZ);kY++;kR++;kA(k2[0],k1[0],kV[0],k3,kU,5,kW,kS,undefined,k0,kZ);kY++;kR++;for(var kX=0;kX0){kX+=kM(k2[kW],k2[kW-1]);kU.push(kX*10)}if(kW!==k2.length-1){var kT=[k2[kW+1][0]-k2[kW][0],k2[kW+1][1]-k2[kW][1]];var k4=[];if(kT[0]===0&&kT[1]===0){k4=[0,0]}else{vec2.normalize(k4,kT)}k0[k0.length]=[k4[0],k4[1]]}}return kO(k0,k2,kU,kS,k3,kY,kQ,kD(kV),kR,kZ)},toTileSolidLineVertices:function(kU,kR){var kS=new Float32Array(kU.length/kz*5);var kQ=new Int16Array(kS.buffer);var kW=0;var kT=0;for(var kV=0;kV0){this.zoomState=1}else{if(e<0){this.zoomState=-1}}this.lastZoom=i;return this.zoomState},releaseOutViewTileData:function(e){var ky=this.map._workerMgr.releasePendingData(e);for(var kx=0,T=ky.length;kx=0.5){kW=true}else{if(kG<0.5&&e>=0.5){kW=true}else{if(kG>=0.5&&e<0.5){kW=true}}}if(kW){this.cacheDataCollideLabels(0)}this.LAST_CALC_ZOOM=kE}else{if(this.tileLabels.length>0){this.cacheDataCollideLabels(e8.Browser.ie?50:30)}}},loadVectorLayerData:function(kD){this.map.temp.isPermitSpotOver=false;var kC=this;function kB(i,kE){var kG=kC.tileCache.getData(kE);if(!kG){return}if(!i||i.error){i.event&&bF.fetchDebug&&bF.fetchDebug.sendError({title:i.event.title,msg:i.event.msg,category:bF.fetchDebug.category.AJAX,level:bF.fetchDebug.levels.ERROR,url:i.event.title});var kF=new fU("ontileloaderror");i=i||{};kF.error=i.error||"";kF.message=i.message||"";kC.map.fire(kF);kG.status="init";kG.reloadTimer=setTimeout(function(){if(kG.retry<3){kG.retry++;kG.status="loading";kC.loadVectorTileData(i.tileInfo,kB)}else{kC.tileCache.removeData(kE);kC._checkTilesLoaded()}},4000);if(kC.map._featureMgr){kC.map._featureMgr.clearData(kC.drawIndex)}kC.getVectorLayerDataFromCache(kC.curViewTilesInfo,kC.getZoomState());return}if(kG.reloadTimer){clearTimeout(kG.reloadTimer);kG.reloadTimer=null}kC.callbackDataQueue.push([i,kE]);if(kC.processDataTimer){return}kC.processDataTimer=setTimeout(function(){while(kC.callbackDataQueue.length>0){var kI=kC.callbackDataQueue.shift();kC.vectorTileDataCbk(kI[0],kI[1]);kC._checkTilesLoaded()}if(kC.map._featureMgr){kC.map._featureMgr.clearData(kC.drawIndex)}kC.getVectorLayerDataFromCache(kC.curViewTilesInfo,kC.getZoomState());var kH=new fU("onrefresh");kH.source="webgllayer";kC.map.dispatchEvent(kH);kC.processDataTimer=null},200)}for(var kA=0,ky=kD.length;kA=1.5?2:1;for(var kJ=0;kJ65536){kT.renderData.base.push({type:"line",data:[gB.toTileSolidLineVertices(kZ,4000),new Uint16Array(k2)]});kZ=[];k2=[]}for(var kS=0;kS0){kz=ky.labelProcessor.collisionTest(kz,-1)}}else{if(kA||kC){if(this._collisionTimer){if(!kA){clearTimeout(this._collisionTimer)}else{if(Date.now()-ky.lastCollisionTestTime>500){ky.lastCollisionTestTime=Date.now()}else{clearTimeout(this._collisionTimer)}}}this._collisionTimer=setTimeout(function(){if(ky&&!ky.map.tileMgr&&!ky.map.tileMgr.isExitTileLayer(ky)){ky._collisionTimer=null;return}kz=ky.labelProcessor.collisionTest(ky.tileLabels);if(kz){if(ky._isInnerLayer&&ky.map.stencil&&ky.map.stencil.isPoiMask){var kD=ky.isPoiInPolygon(kz);i.setLabelData(kD,ky.drawIndex)}else{i.setLabelData(kz,ky.drawIndex)}}ky.updateLabels();ky.map.dispatchEvent(new fU("onrefresh"));ky._collisionTimer=null},60);return}else{kz=ky.labelProcessor.getCachedLabels(ky.tileLabels)}}if(kz){if(ky._isInnerLayer&&ky.map.stencil&&ky.map.stencil.isPoiMask){var kB=ky.isPoiInPolygon(kz);i.setLabelData(kB,ky.drawIndex)}else{i.setLabelData(kz,ky.drawIndex)}}ky.updateLabels();ky.map.dispatchEvent(new fU("onrefresh"))}if(!T){clearTimeout(ky.cacheLabelTimer);kx()}else{if(ky.cacheLabelTimer){return}ky.cacheLabelTimer=setTimeout(function e(){kx()},T)}},isPoiInPolygon:function(T){var kQ=this;var kG=kQ.map.stencil;var ky=kQ.map._featureMgr.result.eleData[9];var kx=[];for(var kL=0;kL0){var kx=kz.getZoom();if(T.labelZoom-kx<3){this.labelProcessor.updateLabels(T);var e=this.labelProcessor.fixDataFormat(T);i.setOverlayData(e[0],2,this.drawIndex);i.setOverlayData(e[1],3,this.drawIndex);i.setOverlayData(e[2],4,this.drawIndex)}else{i.clearLabelOverlayData(this.drawIndex)}kz.temp.isPermitSpotOver=false;this.labelProcessor.curSpotAdded=false}},loadRasterLayerData:function(kC,kx){this.thumbCache={};var kD=this.getZoomState();if(kx){for(var kA=0,ky=kC.length;kA3){kC();return}kx.src=kB;i++},this.retryTime)}kx.onload=function(){kC();kz&&kz(this,T)};kx.onerror=function(){kC();bF.fetchDebug&&bF.fetchDebug.sendError({title:kB,msg:kB,category:bF.fetchDebug.category.RESOURCE,level:bF.fetchDebug.levels.ERROR,url:kB});kz&&kz(null,T)};kx.src=kB;return kx},rasterTileDataCbk:function(kB,kz){if(!kB||typeof kB==="string"){this.tileCache.removeData(kz);return}var T=kB.tileInfo;var kx=T.col;var kI=T.row;var kH=T.zoom;var i=this.tileCache.getData(kz);if(!i){return}var kC="id_"+kx+"_"+kI+"_"+kH;var kG=this;i.dataType=gU;i.tileInfo=T;if(T.tileTypeName==="xyz"){var kF=T.tileSize;i.textureSource=kB;i.renderData={vertexAll:[0,0,0,0,0,kF,0,0,1,0,kF,kF,0,1,1,0,0,0,0,0,kF,kF,0,1,1,0,kF,0,0,1]};kG.setRasterTileData(kz,i,kC)}else{i.textureSource=kB;var kA=fb.calcLoopParam(kx,kH);var kE=kA.geoOffsetX;kB.tileInfo.loopOffsetX=kE;if(T.combine){var ky=0.0035;if(T.dataIndex>0){var kD=T.dataIndex/256;i.renderData={vertexAll:[0,0,0,0,0,T.dataIndex,0,0,kD-ky,0,T.dataIndex,256,0,kD-ky,1,0,0,0,0,0,T.dataIndex,256,0,kD-ky,1,0,256,0,0,1]}}else{var e=-T.dataIndex;var kD=e/256;i.renderData={vertexAll:[e,0,0,kD+ky,0,256,0,0,1,0,256,256,0,1,1,e,0,0,kD+ky,0,256,256,0,1,1,e,256,0,kD+ky,1]}}}else{i.renderData={vertexAll:[0,0,0,0,0,256,0,0,1,0,256,256,0,1,1,0,0,0,0,0,256,256,0,1,1,0,256,0,0,1]}}this.setRasterTileData(kz,i,kC)}},setRasterTileData:function(ky,e,kx){e.status="ready";this.tileCache.setData(ky,e);var T=false;if(this.curViewTilesInfo[kx]){e.dataType=gU;e.png8=this.png8||false;this.map._featureMgr.setData(e,this.drawIndex,2);T=true}if(T){var i=new fU("onrefresh");i.source="webgllayer";this.map.dispatchEvent(i)}},_checkLayerTilesLoaded:function(){this.numTileLoading--;if(this.firstTileLoad===false){this.dispatchEvent(new fU("ontilesloadstart"));this.firstTileLoad=true}var e=this;if(this.numTileLoading===0){if(this._checkTileLoadedTimer){clearTimeout(this._checkTileLoadedTimer);this._checkTileLoadedTimer=null}this._checkTileLoadedTimer=setTimeout(function(){if(e.numTileLoading===0){e.dispatchEvent(new fU("ontilesloadend"));e.firstTileLoad=false}e._checkTileLoadedTimer=null},60)}},_checkTilesLoaded:function(){this._checkLayerTilesLoaded();this.numLoading--;if(this.map.firstTileLoad===false){this.map.dispatchEvent(new fU("onfirsttilesloaded"));this.map.firstTileLoad=true}var e=this;if(this.numLoading===0){if(this._checkLoadedTimer){clearTimeout(this._checkLoadedTimer);this._checkLoadedTimer=null}this._checkLoadedTimer=setTimeout(function(){if(e.numLoading===0){e.map.dispatchEvent(new fU("ontilesloaded"));e.map.firstTileLoad=false}e._checkLoadedTimer=null},60)}},isClickableLabel:function(e){if(e.isDel){return false}if(e.zoom>9&&!e.guid){return false}if(e.zoom<=9&&!e.name&&!e.guid){return false}return true}};var aW=5;var jp=4;var gN=3;var P=2;var eB=1;var hL=0;function az(e){this._ratio=gr();this._iconCache={};this._map=e;this._drawingCanvasPool=[];this._drawingCanvasHeight=4096;this._bufferSpan=[5,5]}e8.extend(az.prototype,{_loadIcons:function(T,kD,kz){var kx=0;var kA=this;var ky=this._map.config.style;for(var kB in T){kx++;var kC=new Image();kC.id=kB;kC.crossOrigin="anonymous";kC.onload=function(){kA._iconCache[this.id].loaded=true;kx--;if(kx===0){kD()}this.onload=null};kC.onerror=function(){kA._iconCache[this.id]=null;kx--;if(kx===0){kD()}this.onerror=null};if(!kz){var e=E.getIconSetPath(ky)+kB+".png";var i=bG();if(i&&i.udt){e+="?udt="+i.udt}}else{var e=kB}kC.src=e;this._iconCache[kB]={loaded:false,image:kC}}},_getEmptyDrawingCanvas:function(){for(var T=0;T0){while(kz0){kz=0;while(kz0){kz=0;while(kz0){var kR=this;this._loadIcons(kI,function(){kQ=kR._drawEachTypeOfLabels(kK,kJ,kS,kC,kB,kG,kO);kS=kQ.curStyleId;kC=kQ.curX;kB=kQ.curY;kG=kQ.curLineHeight;var i=kR._generateEachLabelCanvas(e,kB,kF,kL,T,kP);kx(i[0],i[1])});return}var kD=this._generateEachLabelCanvas(e,kB,kF,kL,T,kP);kx(kD[0],kD[1])},drawCustomLabelsOnCanvas:function(kC,kB,T){if(kC.length===0){kB();return}var kz={};var ky=false;for(var kx=0;kxthis._drawingCanvasHeight){return{curX:kx,curY:T,curLineHeight:ky,curStyleId:kE}}}return{curX:kx,curY:T,curLineHeight:ky,curStyleId:kE}},_drawIndoorTextLabelOnCanvas:function(ky){var e=this._getEmptyDrawingCanvas();var kF=e.getContext("2d",{colorSpace:"display-p3"});kF.clearRect(0,0,e.width,e.height);var kN=0;var kE=null;var kD=0;var kB;var kK={};var kJ=[];for(var kz in ky){if(kz==="tileInfo"){continue}var kx=ky[kz];var kI=kx.defaultFloor;var kC=kx.floors;for(var kH=0;kH4){lg=4}var k0=[];var kO=[];var kW=0;if(ky&&!ky[li]){ky[li]={}}var kI=kJ+lg*2+lk[0]*2;var k1=kI;if(kB.containDescendings){k1+=4}if(lg===0){k1+=2}if(kB.textOnIcon){k1=Math.max(k1,kB.iconSize[1])}if(li!==T||k1>kZ){T=li;if(k3>=10&&k3%10===0){kQ.font=k3*10+" "+kJ+"px sans-serif"}else{kQ.font=kJ+"px sans-serif"}if(k1>kZ){var kX=k1-kZ;kZ+=kX;kR+=kX}if(lg>0){kQ.lineWidth=lg*2;kQ.strokeStyle=kA}kQ.fillStyle=la}if(kB.type==="line"){var kD=kY.split("");for(var lj=0;lj512){kS=0+this._bufferSpan[0];kR+=k1;kR+=this._bufferSpan[1];kZ=k1}if(kR+this._bufferSpan[1]>this._drawingCanvasHeight){return{curX:kS,curY:kR,curLineHeight:kZ,styleId:li}}var ld=kS;if(lg>0){kx+=lg;ld-=Math.round(lg/2);kQ.strokeText(lc,kS,kR)}kQ.fillText(lc,kS,kR);var k9=[kx,k1];kT=[Math.round(k9[0]/2),Math.round(k9[1]/2)];k4=[ld,kR-k1];ky[li][lc]={displaySize:kT,curWordPosition:k4,totalHeight:kW};kS+=kx+2}k0.push(kT);kO.push(k4)}kW=Math.round(k0[0][1])}else{if(ky[li][kY]){var kL=ky[li][kY];k0=kL.textSize;kO=kL.labelImagePosition;kW=kL.totalHeight}else{var kK=kY.split("\\");if(kK.length>1&&kB.textOnIcon){var ll=0;var lh=0;var lo=[];var kU=8;for(var lj=0;ljll){ll=kH}lo.push(Math.round(kH/2));lh+=k1}var kE=ll+2*kU;var lf=lh+2*kU;if(kS+kE>512){kS=0+this._bufferSpan[0];kR+=kZ;kR+=this._bufferSpan[1]}kR+=lh-k1+2*kU;var k8=kS;var kV=kR-lf;var e=Math.round(kE/2);var kN=this._iconCache[kB.icon].image;this.drawStretchedIcon(kQ,kN,[k8,kV],kU,ll,lh);for(var lj=0;lj512&&kK.length==1){kK[lj]=kY.substring(0,Math.floor(kY.length/2));kK[lj+1]=kY.substring(Math.floor(kY.length/2));lj--;continue}var kE=kH;var kz=0;if(kB.textOnIcon){kz=10;kE+=kz*2;if(kB.styleId===519){kE=kB.iconSize[0];kz=Math.round((kE-kH)/2)}}if(kS+kE>512){kR+=k1;kR+=this._bufferSpan[1];if(kR+this._bufferSpan[1]>this._drawingCanvasHeight){kR-=k1;kR-=this._bufferSpan[1];return{overHeight:true,curX:kS,curY:kR,curLineHeight:kZ,styleId:li}}kS=0+this._bufferSpan[0];kZ=k1}else{if(kR+this._bufferSpan[1]>this._drawingCanvasHeight){return{overHeight:true,curX:kS,curY:kR,curLineHeight:kZ,styleId:li}}}var k8=kS;var kV=kR-k1;var k7=kS;var k6=kR;if(kB.containDescendings){k6-=4}if(kB.textOnIcon){var k2=false;var kN=this._iconCache[kB.icon].image;var k5=kB.iconSize.concat([]);if(kI>=k5[1]){k5[1]=kI;k2=true;k1+=kz*2;var kX=k1-kZ;if(kX>0){kR+=kX;kZ=k1;k6+=(kX-kz);kV+=(kX-kz*2)}else{k6-=kz;kV-=kz*2}}if(kH>=k5[0]){k5[0]=kH}if(kB.styleId===519){kQ.drawImage(kN,0,0,k5[0],k5[1],k8,kV,k5[0],k5[1])}else{if(kB.noStretch){k6-=kI/2;var kP=kH+kz*2;kQ.drawImage(kN,0,0,kN.width,kN.height,k8,kV,kP,kI)}else{if(k2){this.drawStretchedIcon(kQ,kN,[k8,kV],kz,kH,k5[1])}else{this.draw3StretchedIcon(kQ,kN,[k8,kV],kz,kH,k5[1])}}}k7+=kz;if(kB.iconSize[1]>kI){k6-=(kB.iconSize[1]-kI)/2-1}}if(lg>0){if(li===71028){k1-=2}if(li===32){k1-=2}kQ.strokeText(kY,k7,k6)}kQ.fillText(kY,k7,k6);var kC=[kE,k1];var kT=[Math.round(kC[0]/2),Math.round(kC[1]/2)];k0.push(kT);kO.push([k8,kV]);kW+=Math.round(kT[1]);kS+=kE}}ky[li][kY]={textSize:k0,labelImagePosition:kO,totalHeight:kW}}}kB.textSize=k0;kB.labelImagePosition=kO;kB.totalHeight=kW;return{curX:kS,curY:kR,curLineHeight:kZ,styleId:li}},drawStretchedIcon:function(e,T,kx,kA,kB,i){var kz=kx[0];var ky=kx[1];e.drawImage(T,0,0,kA,kA,kz,ky,kA,kA);e.drawImage(T,kA,0,1,kA,kz+kA,ky,kB,kA);e.drawImage(T,T.width-kA,0,kA,kA,kz+kB+kA,ky,kA,kA);e.drawImage(T,0,kA,kA,1,kz,ky+kA,kA,i);e.drawImage(T,kA,kA,1,1,kz+kA,ky+kA,kB,i);e.drawImage(T,T.width-kA,kA,kA,1,kz+kB+kA,ky+kA,kA,i);e.drawImage(T,0,T.height-kA,kA,kA,kz,ky+i+kA,kA,kA);e.drawImage(T,kA,T.height-kA,1,kA,kz+kA,ky+i+kA,kB,kA);e.drawImage(T,T.width-kA,T.height-kA,kA,kA,kz+kB+kA,ky+i+kA,kA,kA)},draw3StretchedIcon:function(e,i,T,kz,kB,kA){var ky=T[0];var kx=T[1];e.drawImage(i,0,0,kz,i.height,ky,kx,kz,i.height);e.drawImage(i,kz,0,1,i.height,ky+kz,kx,kB,i.height);e.drawImage(i,i.width-kz,0,kz,i.height,ky+kz+kB,kx,kz,i.height)},_updateFixedLabelCoords:function(ky,kN){if(kN===0){return}var kI=[];var kU=[];var kV=0;var kL=ky.totalHeight;var k3=ky.textSize.length;var kz=ky.direction;if(typeof kz!=="number"){kz=0}for(var kW=0;kWT){T=kH}if(kFe){e=kF}}}if(kD.custom&&kD.style.iconSize&&!kD.name){var kE=kD.style.iconSize;var kG=kD.direction;switch(kG){case jp:kz=-Math.round(kE[0]/2);kx=-Math.round(kE[1]/2);T=Math.round(kE[0]/2);e=Math.round(kE[1]/2);break;case P:kz=-Math.round(kE[0]/2);kx=0;T=Math.round(kE[0]/2);e=kE[1];break}}if(kD.textPos){var kA=kD.textPos["vertex"];for(var kC=0,ky=kA.length;kCT){T=kH}if(kFe){e=kF}}}kD.bds=[kz,kx,T,e]},_updateLineLabelCoords:function(kO,kE){if(kE===0){return}var kx=kO.wordsInfo;var kL=kO.wordCount;if(!kO.labelImagePosition){return}var kG=kO.labelImagePosition.slice(0);if(kO.reverse){kG.reverse()}var kX=1000;var kU=1000;var kV=-1000;var kT=-1000;for(var kP=0;kPkV){kV=kN}if(kzkT){kT=kB}}kO.bds=[kX,kU,kV,kT]}});var gf={0:"00000000",16:"00010000",32:"00100000",48:"00110000",64:"01000000",96:"01100000"};function es(kz,kB,kx){var ky=kz.bds;if(!ky){return false}var kA=kz.tracer;var T;if(kA){if(!gf[kA]){T=kA.toString(2);if(T.length<8){T=new Array(8-T.length+1).join("0")+T}gf[kA]=T}T=gf[kA];var e=ks.mapZoomStartZoomMapping[kB];var kC=kB>20?21:kB;return T[kC-e]==="1"}var i=kz.displayRange;if(kx>=i[0]&&kx<=i[1]){return true}return false}function jv(i,e){this.map=i.map;this.layer=i;e=e||[];this.allLabels=[];this._spotData=[];this._strategyInfo=null;this.RANK1=1000000;this.RANK2=2000000;this.RANK3=3000000;this.RANK4=4000000;this.RANK5=5000000;this._ratio=gr();this._useRound=true;this._sharpenRender=false;if(this._ratio>h2.HIGH_RES_MIN_RATIO){this._useRound=false;this._sharpenRender=true}this._mapIsMoving=false;this._onMapIdleCallback=e.onMapIdleCallback;this.map.temp.isPermitSpotOver=true;this.currentSelectedLabel=null;this.map._labelProcessor=this;this.iconCache=new aC((b4()||e8.Browser.ie)?64:128,{clearCallback:function(T){}});this.fixedLabelData=[];this.lineLabelData=[];this.highlightLabelData=[];this._iconLoadTimer=null;this._labelTextCanvas=null;if(this.map.config.textRenderType==="canvas"){this._labelTextCanvas=this.map.tileMgr.getLabelTextCanvas()}this.bind()}e8.extend(jv.prototype,{bind:function(){var T=this.map;var i=this;T.addEventListener("mapstatusbusy_inner",function(kx){i._mapIsMoving=true;if(i._ratio>h2.HIGH_RES_MIN_RATIO){i._sharpenRender=false}else{i._useRound=false}});T.addEventListener("mapstatusidle_inner",function(kx){if(i._ratio>h2.HIGH_RES_MIN_RATIO){i._sharpenRender=true}else{i._useRound=true}i._mapIsMoving=false});T.addEventListener("onspotmouseover",function(kz){if(!this.temp.isPermitSpotOver){return}if(kz.spots.length>0){var ky=kz.spots[0].userdata.uid;var kA=kz.spots[0].userdata.tilePosStr;var kx=i.getLabelByUid(ky,kA);kx&&kx.formatedData&&i._toHighlightColor(kx.formatedData)}});T.addEventListener("onspotmouseout",function(kz){if(!this.temp.isPermitSpotOver){return}if(kz.spots.length>0){var ky=kz.spots[0].userdata.uid;var kA=kz.spots[0].userdata.tilePosStr;var kx=i.getLabelByUid(ky,kA);kx&&kx.formatedData&&i._toDefaultColor(kx.formatedData)}});T.addEventListener("spotclick",function(kz){if(kz.spots&&kz.spots.length>0){if(kz.spots[0].userdata.zoom<10){return}var ky=kz.spots[0].userdata.uid;var kA=kz.spots[0].userdata.tilePosStr;if(i.currentSelectedLabel&&(i.currentSelectedLabel.uid!==ky||i.currentSelectedLabel.tilePosStr!==kA)){i._recoverNormalState()}var kx=i.getLabelByUid(ky,kA);kx&&i._changeBaseMapState(kx)}else{i._recoverNormalState()}});T.on("spot_status_reset",function(){i._recoverNormalState()});T.on("spot_highlight",function(ky){var kx=i.getLabelByUid(ky.uid,ky.tilePosStr);kx&&kx.formatedData&&i._toHighlightColor(kx.formatedData)});T.addEventListener("mousemove",function(kx){if(i.curSpotAdded){return}if(this.currentOperation!==eo.idle||i._mapIsMoving===true){return}i._refreshSpotData();this.temp.isPermitSpotOver=true;i.curSpotAdded=true});if(b4()){function e(){i._refreshSpotData()}T.addEventListener("mapstatusidle_inner",e)}T.on("style_loaded",function(){if(i.map.config.textRenderType==="canvas"&&!i._labelTextCanvas){i._labelTextCanvas=i.map.tileMgr.getLabelTextCanvas()}});T.on("destroy",function(){i.iconCache.clear();for(var kx=0;kx=0&<<45)||(lt>=315&<<360)){kK=ln;kJ=lm;ly=kR;lx=kQ}else{if(lt>=45&<<135){kK=lm;kJ=-kR;ly=kQ;lx=-ln}else{if(lt>=135&<<225){kK=-kR;kJ=-kQ;ly=-ln;lx=-lm}else{if(lt>=225&<<315){kK=-kQ;kJ=ln;ly=-lm;lx=kR}}}}lk._tempBds=[lC+kK,lB+kJ,lC+ly,lB+lx];var lr=kL.pixelToPointIn(new ft(lk._tempBds[0],lj.y+kJ),{zoom:kW});var li=kL.pixelToPointIn(new ft(lk._tempBds[2],lj.y+lx),{zoom:kW});lk._mcBds=[lr,li];k3.push(lk)}}var lh=this._strategyInfo;if(lh){var k1=lh.guid;var kS=lh.guidExt;var lf=false;for(var kT=0,kH=k3.length;kT0){lw=6}lu=kL.getZoom();if(lu>=8&&lu<9){lu<8.5?(lw=6):(lw=3)}if(kL._displayOptions.labelMargin>0){lw=kL._displayOptions.labelMargin}var ld=2;if(lu<6&&lu>=5){ld=-1}for(var lg=0,kF=k3.length;lglE[2]+lw+ld||lo[3]+lw+ldlE[3]+lw+ld)){lv._intersectIdx.push(k9)}}}for(var le=0,kE=k3.length;le=0.5?e+0.5:e;return i},clearCollisionCache:function(e){if(!e){return}e.cacheState=null;e.unnecessaryCollisionTest=null},getCachedLabels:function(e){e=e||[];var T=this.getZoomStep();var kz=false;for(var kx=0;kxe){kF.isDel=true}if(kF.isDel){continue}var kN=kF.pt;var T=(kF.hue||0)?gE(kF.hue):0;var kx=kF.iconPos;if(kx&&kx.texcoord){if(!kx.rtVertex){kx.rtVertex=[];kO=kx.vertex;var kC=i1(kN.lng);var kM=i1(kN.lat);kx.rtVertex=[kC[0],kM[0],kC[1],kM[1],0,kO[0],kO[1],0,0,kx.texcoord[0],kx.texcoord[1],T,kC[0],kM[0],kC[1],kM[1],0,kO[2],kO[3],0,0,kx.texcoord[2],kx.texcoord[3],T,kC[0],kM[0],kC[1],kM[1],0,kO[4],kO[5],0,0,kx.texcoord[4],kx.texcoord[5],T,kC[0],kM[0],kC[1],kM[1],0,kO[6],kO[7],0,0,kx.texcoord[6],kx.texcoord[7],T,kC[0],kM[0],kC[1],kM[1],0,kO[8],kO[9],0,0,kx.texcoord[8],kx.texcoord[9],T,kC[0],kM[0],kC[1],kM[1],0,kO[10],kO[11],0,0,kx.texcoord[10],kx.texcoord[11],T]}}if(!kF.textOnIcon){T=0}var kL=kF.textPos;if(kL){if(!kL.rtVertex){kL.rtVertex=[];kO=kL.vertex;var kA=kL.rtVertex;var kI=i1(kN.lng);var kR=i1(kN.lat);var kQ=i1(ky);for(var kH=0,kP=kO.length;kH45&&k1<315){if(k1>45&&k1<=135){kX=270}else{if(k1>135&&k1<=225){kX=180}else{if(k1>225&&k1<315){kX=90}}}if(kN>225&&kN<=315&&kX<=180){kJ=true}else{if((kN>=0&&kN<=45||kN>=315&&kN<360)&&kX>=180){kJ=true}}}}for(var k3=0,kG=kP.length;k3=360){e-=360}while(e<0){e+=360}return e},fixDataFormat:function(kF){var kx=this.fixedLabelData;var e=this.lineLabelData;var T=this.highlightLabelData;var kN=0;var kB=0;var kK=0;var kL;if(this.currentSelectedLabel){var kA=this.getLabelByUid(this.currentSelectedLabel.guid,this.currentSelectedLabel.tilePosStr);if(!kA||kA.isDel){kx[kN]=this.currentSelectedLabel.formatedData;kN++;T[kK]=this.currentSelectedLabel.formatedData;kK++}}for(var kJ=0;kJkx)){continue}var i=ky[e].spot||this._getSpotDataFromLabel(ky[e]);if(i){this._spotData.push(i)}}},_getSpotDataFromLabel:function(T){var kz=this.map;if(!T.bds){return null}var e=T.bds.slice(0);var kx=null;if(T.iconPos){kx=new cF(T.pt.lng,T.pt.lat)}var i=T.name?T.name.replace("\\\\","
"):"";if(T.iconPos&&T.iconPos.iconType.indexOf("ditie")>-1&&kz.getZoom()>14){i=""}var ky={n:i,pt:new cF(T.pt.lng,T.pt.lat),userdata:{iconPoint:kx,uid:T.guid,name:i,mapPoi:true,type:T.iconPos?T.iconPos.iconType:"",rank:T.rank,zoom:T.zoom,tilePosStr:T.tilePosStr},bd:e,tag:"MAP_SPOT_INFO"};T.spot=ky;return ky},drawLabelsOnCanvas:function(i,e){if(this._labelTextCanvas){this._labelTextCanvas.drawLabelsOnCanvas(i,e)}}});function jo(e){this._map=e;this.virtualTiles={};this.virtualTile={custom:true,label:{fixedLabel:[],indoorLabel:[],lineLabel:[],textureHeights:[],status:"ready"},tileInfo:{col:0,row:0,zoom:0,useZoom:0,loopOffsetX:0},status:"ready"};this._task={};this.init()}jo.prototype.init=function(){var T=this._map;var i=this;function e(kx){i.updateLabels(kx)}T.addEventListener("add_tile_labels",e);T.addEventListener("onremove_tile_labels",e);T.addEventListener("onclear_labels",e);T.addEventListener("onlayer_clear",e)};jo.prototype.updateLabels=function(kA){var kE=this._map.tileMgr.getLabelTextCanvas();var T=this._map;var kC=this;var kB=db();if(kA&&kA.model==="mvt"){var kG=kA.data;var kF="mvt_"+kA.index;if(!this._task[kF]){this._task[kF]=[kB]}else{this._task[kF].push(kB)}}else{var kG=T._customTileLabels;var kF="custom";if(!this._task[kF]){this._task[kF]=[kB]}else{this._task[kF].push(kB)}}var kz=JSON.parse(JSON.stringify(kG));for(var ky=0;kyky},"\x78\x68\x61\x69\x63":fX("0x21"),"\x64\x65\x6c\x63\x61":"\x6d\x65\x61","\x63\x6c\x61\x6d\x78":(window.location.protocol === "http:" ? "http:" : "https:") + "//api.map.baidu.com/res/webgl/10/worker_asm_ncwra3.js","\x64\x65\x78\x78\x78":fX("0x22"),"\x68\x61\x63\x78\x6d":function(kz,ky){return kz(ky)},"\x61\x61\x63\x6c\x65":fX("0x23"),"\x68\x65\x61\x65\x6d":fX("0x24"),"\x65\x65\x61\x65\x63":function(kz,ky){return kz>ky},"\x69\x61\x61\x61\x69":function(kz,ky){return kz!==ky},"\x78\x65\x65\x6d\x63":fX("0x25"),"\x63\x65\x68\x6d\x64":fX("0x26"),"\x63\x63\x61\x69\x64":"\x61\x6c\x78","\x63\x68\x78\x6c\x6c":function(kz,ky){return kz!==ky},"\x65\x61\x65\x64\x61":fX("0x27"),"\x6c\x61\x78\x78\x63":function(ky,kz){return ky=ky},"\x63\x65\x65\x6c\x61":fX("0x31"),"\x68\x6c\x65\x64\x6c":fX("0x32"),"\x64\x65\x65\x61\x65":"\x61\x6c\x65","\x68\x68\x61\x63\x68":fX("0x33"),"\x63\x78\x78\x69\x65":function(kz,ky){return kzky},"\x61\x61\x78\x65\x61":fX("0x34"),"\x65\x64\x6d\x65\x69":function(ky){return ky()},"\x69\x6d\x63\x61\x61":function(kz,ky){return kz===ky},"\x61\x63\x63\x61\x65":fX("0x35"),"\x65\x68\x78\x78\x63":"\x6f\x6e\x73\x74\x79\x6c\x65\x7a\x6f\x6f\x6d\x75\x70\x64\x61\x74\x65"};var e=this;this[fX("0x36")]=T;this[fX("0x37")]=[];var kx=Math[fX("0x38")](navigator["\x68\x61\x72\x64\x77\x61\x72\x65\x43\x6f\x6e\x63\x75\x72\x72\x65\x6e\x63\x79"]-2,0)||4;if((i[fX("0x39")](b4)||e8["\x42\x72\x6f\x77\x73\x65\x72"]["\x69\x65"])&&i[fX("0x3a")](kx,2)){kx=2}this[fX("0x3b")]=[];this[fX("0x3c")]=i[fX("0x39")](gr);this[fX("0x3d")]=this["\x72\x61\x74\x69\x6f"];if(this[fX("0x3c")]>1){this[fX("0x3e")]=2}else{this[fX("0x3e")]=1}if(i[fX("0x3f")](typeof this["\x6d\x61\x70"][fX("0x40")][fX("0x41")],"\x73\x74\x72\x69\x6e\x67")){this[fX("0x42")]=null;this[fX("0x43")]=[];this[fX("0x44")]=null}fE["\x63\x61\x6e\x55\x73\x65\x57\x65\x62\x41\x73\x73\x65\x6d\x62\x6c\x79"](function(kF){var kD={"\x78\x65\x78\x63\x65":function(kI,kH){return kI!==kH},"\x63\x6d\x6d\x69\x68":i[fX("0x45")],"\x61\x6d\x65\x69\x63":i["\x78\x64\x63\x63\x6d"],"\x63\x69\x65\x69\x6c":fX("0x46"),"\x61\x63\x61\x63\x68":i[fX("0x47")],"\x6c\x61\x61\x65\x61":i[fX("0x48")],"\x61\x63\x6d\x6c\x78":i[fX("0x49")],"\x64\x6c\x68\x6c\x61":function(kI,kH){return i[fX("0x4a")](kI,kH)},"\x61\x6c\x65\x6c\x6c":"\x68\x65\x78","\x6d\x64\x61\x63\x69":fX("0x4b"),"\x64\x6c\x69\x64\x65":i[fX("0x4c")],"\x69\x78\x6d\x61\x69":fX("0x4d"),"\x65\x6c\x69\x65\x65":i[fX("0x4e")],"\x63\x61\x65\x61\x6c":fX("0x4f"),"\x6c\x65\x68\x78\x69":"\x61\x63\x64","\x63\x61\x78\x78\x63":fX("0x50"),"\x61\x78\x61\x6d\x61":fX("0x51")};var ky;if(kF){ky=(window.location.protocol === "http:" ? "http:" : "https:") + "//api.map.baidu.com/res/webgl/10/worker_wasm_cimp12.js"}else{ky=i[fX("0x52")]}for(var kG=0;kG=0;kz--){var ky=kA[kz];var kx=ky[fX("0x60")];if(e["\x64\x6d\x61\x61\x68"](T[fX("0xa6")],kx["\x74\x69\x6c\x65\x54\x79\x70\x65\x4e\x61\x6d\x65"])){continue}var i=e["\x65\x65\x78\x6c\x69"](e["\x65\x65\x78\x6c\x69"](e[fX("0xa7")]+kx[fX("0xa8")]+"\x5f"+kx["\x72\x6f\x77"],"\x5f"),kx[fX("0xa9")]);if(!T[i]){kA[fX("0xaa")](kz,1);kB["\x70\x75\x73\x68"](kx)}}return kB},"\x6c\x6f\x61\x64\x54\x69\x6c\x65\x44\x61\x74\x61":function(kI,kG,kE,kB){var ky={"\x6c\x6c\x65\x64\x61":fX("0xab"),"\x68\x63\x61\x61\x63":"\x64\x64\x68","\x6c\x61\x61\x69\x69":"\x65\x61\x61","\x68\x61\x78\x65\x61":fX("0xac"),"\x63\x65\x78\x64\x78":"\x69\x61\x6d","\x68\x6d\x6d\x64\x6d":fX("0xad"),"\x65\x68\x61\x61\x61":fX("0x34"),"\x78\x65\x65\x61\x6d":function(kN,kM){return kN+kM},"\x65\x61\x61\x61\x61":fX("0xae"),"\x6d\x64\x69\x64\x65":fX("0xaf"),"\x68\x6c\x61\x6c\x69":fX("0xb0"),"\x78\x65\x65\x6d\x65":fX("0xb1"),"\x6d\x65\x6d\x68\x65":fX("0xa"),"\x63\x6c\x61\x68\x63":fX("0xb2"),"\x6d\x78\x61\x63\x63":fX("0x5f"),"\x61\x6c\x69\x6d\x65":fX("0xb3"),"\x78\x6c\x68\x61\x78":fX("0xb4"),"\x63\x69\x65\x68\x61":fX("0x99"),"\x65\x69\x65\x69\x65":fX("0xb5"),"\x63\x6c\x68\x64\x69":function(kN,kM){return kN+kM},"\x61\x68\x65\x63\x65":fX("0xb6"),"\x64\x65\x64\x78\x6d":function(kN,kM){return kN+kM},"\x61\x69\x61\x68\x6d":"\x61\x65\x68","\x69\x64\x61\x68\x61":fX("0xb7"),"\x6d\x61\x6d\x6c\x65":fX("0xb8"),"\x69\x64\x64\x64\x61":"\x65\x6d\x78","\x64\x6c\x61\x69\x65":fX("0xb9"),"\x6c\x61\x61\x64\x61":function(kM){return kM()},"\x65\x61\x65\x65\x78":fX("0xba"),"\x78\x69\x78\x6d\x65":fX("0x7d"),"\x61\x6c\x63\x64\x68":fX("0xbb"),"\x78\x63\x6c\x6d\x69":fX("0xbc"),"\x63\x65\x6d\x6d\x68":fX("0xbd"),"\x61\x63\x63\x65\x63":"\x65\x6d\x61","\x78\x65\x69\x63\x78":fX("0xbe"),"\x6c\x6c\x65\x69\x6d":function(kM,kN){return kM+kN},"\x69\x64\x61\x68\x6d":"\x78\x63\x6c","\x6d\x69\x6c\x6d\x6d":fX("0xbf"),"\x6d\x6c\x65\x64\x6c":"\x6c\x65\x6c","\x65\x64\x64\x68\x65":fX("0xc0"),"\x69\x65\x65\x63\x61":fX("0xc1"),"\x69\x69\x68\x61\x69":fX("0xc2"),"\x61\x6c\x68\x63\x63":"\x63\x75\x73\x74\x6f\x6d\x53\x74\x79\x6c\x65\x49\x6e\x66\x6f\x5f","\x6d\x61\x65\x65\x61":fX("0xc3"),"\x6c\x69\x63\x65\x6c":fX("0xc4"),"\x65\x63\x61\x65\x63":"\x6d\x69\x6c","\x61\x61\x6c\x65\x65":"\x43\x75\x73\x74\x6f\x6d","\x69\x6d\x65\x78\x78":fX("0xc5"),"\x6c\x65\x6c\x78\x78":fX("0xc6"),"\x69\x78\x65\x65\x63":fX("0xc7"),"\x64\x61\x68\x61\x69":fX("0xc8"),"\x61\x65\x68\x6d\x6d":"\x63\x64\x63","\x78\x64\x65\x65\x69":fX("0xc9")};var kD=fX("0xca");while(kD!==fX("0xb9")){switch(kD){case fX("0xc1"):kx[fX("0xcb")]=kC;kD=ky[fX("0xcc")];break;case ky[fX("0xcd")]:if(!kJ[fX("0x7f")]){kD=fX("0xb4");break}kD=ky[fX("0xce")];break;case ky[fX("0xcf")]:if(kK&&this[fX("0x44")]){kD=ky[fX("0xd0")];break}kD=ky[fX("0xd1")];break;case fX("0xd2"):this[ky[fX("0xd3")]+kz]=JSON[fX("0xd4")](bF[ky[fX("0xd5")](ky[fX("0xd6")],kz)]);kD="\x61\x65\x68";break;case"\x69\x6d\x65":var kA=this[fX("0x36")]["\x70\x61\x72\x6b\x69\x6e\x67"][fX("0xd7")];kD=ky[fX("0xd8")];break;case ky[fX("0xd9")]:kx["\x63\x75\x73\x74\x6f\x6d\x4d\x61\x70\x53\x74\x79\x6c\x65"]=this["\x73\x74\x72\x69\x6e\x67\x69\x66\x69\x65\x64\x43\x75\x73\x74\x6f\x6d\x53\x74\x79\x6c\x65\x49\x6e\x66\x6f"];kD="\x64\x69\x61";break;case ky[fX("0xda")]:if(!(kK&&!this["\x6d\x61\x70"][fX("0x40")][fX("0xdb")])){kD=ky["\x6d\x65\x6d\x68\x65"];break}kD=ky["\x63\x6c\x61\x68\x63"];break;case ky[fX("0xd8")]:var kx={"\x61\x63\x74\x69\x6f\x6e":ky[fX("0xdc")],"\x75\x72\x6c":kI,"\x74\x69\x6c\x65\x49\x6e\x66\x6f":kG,"\x74\x69\x6c\x65\x4b\x65\x79":kE,"\x69\x73\x54\x65\x78\x74":kL,"\x69\x73\x50\x6f\x69":i,"\x62\x75\x69\x6c\x64\x69\x6e\x67\x53\x69\x64\x65\x47\x72\x61\x64\x61\x74\x69\x6f\x6e":e,"\x68\x61\x73\x50\x6f\x6c\x79":T?![]:!![],"\x68\x61\x73\x4c\x69\x6e\x65":T?this[fX("0x36")]["\x63\x6f\x6e\x66\x69\x67"][fX("0xdd")]:!![],"\x63\x61\x72\x70\x6f\x72\x74":kA};kD=ky[fX("0xde")];break;case ky["\x78\x6c\x68\x61\x78"]:if(!this[ky[fX("0xd5")](ky[fX("0xdf")],kF)]&&bF[fX("0xe0")+kF]){kD=ky[fX("0xe1")];break}kD="\x61\x78\x63";break;case fX("0xb5"):this[ky[fX("0xe2")](ky[fX("0xdf")],kF)]=JSON["\x73\x74\x72\x69\x6e\x67\x69\x66\x79"](bF[ky[fX("0xe2")]("\x46\x65\x61\x74\x75\x72\x65\x53\x74\x79\x6c\x65",kF)]);kD=ky[fX("0xe3")];break;case fX("0xb6"):if(!this[ky[fX("0xe4")](fX("0x34"),kz)]){kD=fX("0xd2");break}kD=ky[fX("0xe5")];break;case fX("0xbf"):if(kK&&bF[ky[fX("0xe4")](fX("0xe6"),kF)]){kD=fX("0xbd");break}kD=fX("0xc4");break;case ky[fX("0xe7")]:if(kK){kD=ky[fX("0xe8")];break}kD="\x65\x78\x6d";break;case ky[fX("0xe9")]:this[fX("0x37")][fX("0x56")](kH);kD=ky[fX("0xea")];break;case fX("0xc9"):ky[fX("0xeb")](kB);kD=ky[fX("0xcd")];break;case fX("0xec"):var i=this[fX("0x36")][fX("0xed")][fX("0xee")];kD=ky[fX("0xef")];break;case"\x78\x6d\x63":kx[fX("0xf0")]={"\x77\x6f\x72\x64\x53\x70\x61\x63\x65\x52\x61\x74\x69\x6f":this[fX("0x3d")],"\x74\x65\x78\x74\x53\x69\x7a\x65\x52\x61\x74\x69\x6f":this[fX("0x3e")]};kD=fX("0xf1");break;case ky["\x65\x61\x65\x65\x78"]:var kL=i?this[fX("0x36")][fX("0xed")][fX("0xf2")]:![];kD=ky[fX("0xf3")];break;case ky[fX("0xd0")]:kx[fX("0xf4")]=this["\x73\x74\x72\x69\x6e\x67\x69\x66\x69\x65\x64\x41\x72\x65\x61\x53\x74\x79\x6c\x65\x49\x6e\x66\x6f"];kD=fX("0xad");break;case fX("0xf5"):if(this[fX("0x99")+kF]){kD=fX("0xbe");break}kD=ky["\x61\x6c\x63\x64\x68"];break;case ky[fX("0xf6")]:var kK=!!(kF[fX("0x9a")]("\x63\x75\x73\x74\x6f\x6d")===0);kD=fX("0xf7");break;case fX("0xb2"):if(kK&&this[fX("0x42")]){kD=ky[fX("0xd9")];break}kD=fX("0xac");break;case ky[fX("0xf8")]:if(!this[fX("0x42")]){kD="\x78\x61\x65";break}kD=fX("0xc4");break;case fX("0xca"):var kJ=this[fX("0xf9")]();kD=ky[fX("0xfa")];break;case ky["\x78\x65\x69\x63\x78"]:kx["\x66\x65\x61\x74\x75\x72\x65\x53\x74\x79\x6c\x65"]=this[ky[fX("0xfb")](fX("0x99"),kF)];kD=fX("0xbb");break;case"\x78\x61\x69":kx["\x69\x63\x6f\x6e\x53\x65\x74\x49\x6e\x66\x6f"]=this[ky["\x65\x68\x61\x61\x61"]+kz];kD=fX("0xb1");break;case ky[fX("0xfc")]:this[fX("0x96")]=JSON[fX("0xd4")](bF[fX("0xfd")]);kD=ky["\x6d\x69\x6c\x6d\x6d"];break;case ky["\x6d\x6c\x65\x64\x6c"]:kJ[fX("0xfe")]=kG;kD=ky["\x65\x64\x64\x68\x65"];break;case"\x69\x65\x65":kx["\x6d\x61\x70\x53\x74\x79\x6c\x65\x49\x64"]=kF;kD=ky["\x69\x65\x65\x63\x61"];break;case ky[fX("0xff")]:this[fX("0x42")]=JSON[fX("0xd4")](bF[ky[fX("0xfb")](ky[fX("0x100")],kF)]);kD=fX("0xc4");break;case fX("0x32"):if(!this["\x73\x74\x72\x69\x6e\x67\x69\x66\x69\x65\x64\x49\x6e\x64\x6f\x6f\x72\x53\x74\x79\x6c\x65"]){kD=fX("0x101");break}kD="\x69\x65\x6d";break;case fX("0xa"):kx[fX("0xfd")]=this[fX("0x96")];kD=ky[fX("0x102")];break;case ky[fX("0x103")]:if(this[fX("0x36")]["\x70\x61\x72\x6b\x69\x6e\x67"]){kD="\x69\x6d\x65";break}kD=fX("0xaf");break;case fX("0x104"):var kH={"\x75\x72\x6c":kI,"\x74\x69\x6c\x65\x49\x6e\x66\x6f":kG,"\x74\x69\x6c\x65\x4b\x65\x79":kE,"\x63\x62\x6b":kB};kD=ky[fX("0xe9")];break;case ky[fX("0xcc")]:kJ[fX("0x7f")]=!![];kD=ky[fX("0xce")];break;case ky[fX("0xce")]:kJ["\x70\x6f\x73\x74\x4d\x65\x73\x73\x61\x67\x65"](kx);kD=ky[fX("0xea")];break;case ky[fX("0x105")]:if(kK&&bF["\x63\x75\x73\x74\x6f\x6d\x53\x74\x79\x6c\x65\x49\x6e\x66\x6f\x5f"+kC]){kD=fX("0x106");break}kD=ky[fX("0x107")];break;case ky[fX("0xde")]:var kF=this[fX("0x36")][fX("0x108")]();kD=fX("0xc6");break;case ky[fX("0xe8")]:kz=ky["\x61\x61\x6c\x65\x65"];kD=ky[fX("0x109")];break;case ky[fX("0x10a")]:var kC=this[fX("0x36")][fX("0x10b")]();kD=ky["\x78\x63\x6c\x6d\x69"];break;case fX("0x10c"):kJ[fX("0x5a")]=kB;kD=fX("0x10d");break;case fX("0xf7"):var kz=kF;kD=ky[fX("0xe7")];break;case ky[fX("0x10e")]:var T=this[fX("0x36")][fX("0x10f")]!==BMAPGL_NORMAL_MAP&&this[fX("0x36")]["\x63\x6f\x6e\x66\x69\x67"][fX("0x110")];kD=fX("0xc3");break;case ky["\x64\x61\x68\x61\x69"]:this[fX("0x44")]=JSON[fX("0xd4")](bF[fX("0xe6")+kC]);kD=fX("0xf5");break;case ky[fX("0xf3")]:var e=this[fX("0x36")][fX("0xed")][fX("0x111")];kD=fX("0x112");break;case ky["\x61\x65\x68\x6d\x6d"]:kD=kJ?"\x65\x65\x6c":fX("0x104");break;case fX("0xc0"):kJ[fX("0x5c")]=kE;kD=ky[fX("0x10e")];break;case fX("0x106"):if(!this["\x73\x74\x72\x69\x6e\x67\x69\x66\x69\x65\x64\x41\x72\x65\x61\x53\x74\x79\x6c\x65\x49\x6e\x66\x6f"]){kD=ky[fX("0x113")];break}kD=ky[fX("0x107")];break;case ky[fX("0x109")]:if(kK&&bF[ky[fX("0xfb")](fX("0xe6"),kF)]&&!bF[ky[fX("0x100")]+kF]["\x62\x61\x73\x65\x46\x73"]){kD=ky["\x78\x64\x65\x65\x69"];break}kD=fX("0x114");break}}},"\x73\x65\x74\x57\x6f\x72\x6b\x65\x72\x43\x6f\x6e\x66\x69\x67":function(i){var e={"\x61\x61\x65\x61\x6c":fX("0x115"),"\x64\x69\x6d\x64\x63":fX("0x116"),"\x61\x6c\x63\x65\x65":"\x63\x68\x65","\x65\x65\x61\x61\x61":"\x65\x61\x64","\x63\x65\x65\x68\x78":function(kB,kA){return kB1){for(var e=1;e0&&this.map.customLoaded&&this.map.areaCustomLoaded){this.loadLayersData()}else{var kx=this;this.map.loadMapStyleFiles(function(){var i=new fU("onlayer_update");i.name="na";kx.map.fire(i);kx.loadLayersData()})}},removeWebGLLayer:function(kz){var kA=false;for(var ky=0,kx=this.tileLayers.length;ky0){this.loadLayersData()}if(this.tileLayers.length===1){this.map.setDisplayOptions({isFlat:false})}else{var e=false;for(var ky=1;ky50);if(!e){if(!this.syncLoadTimer){this.syncLoadTimer=setTimeout(function(){ky._loadLayersFromCache(kx);ky.syncLoadTimer=null},40)}}else{this._loadLayersFromCache(kx)}if(!ky.map.viewAnimationTime){this.timer&&window.clearTimeout(this.timer)}if(!this.requestTime){this.requestTime=new Date().getTime()}else{if(new Date().getTime()-this.requestTime>=1000){T()}}function T(){if(!ky.map){return}if(ky.map.viewAnimationTime){if(new Date().getTime()-ky.map.viewAnimationTime<1000){return}ky.map.viewAnimationTime=new Date().getTime()}var kA=ky.tileLayers.length;ky.tilesInfoCache={};for(var kC=0;kC0});var T=kC.length;this.tilesInfoCache={};for(var ky=0;kyfb._mc180X){var kI=fb.getSpaceDistanceInPixel(kA);k1=Math.ceil(kI/kz)}if(kU.sw.lng19505879.362428114||kU.sw.lat<-15949096.637571886){kU.ne.lat=19505879.362428114;kU.sw.lat=-15949096.637571886}var kE=[Math.floor(kU.sw.lng/kO)-kx,Math.floor(kU.sw.lat/kO)];var ld=[Math.floor(kU.ne.lng/kO)+k1,Math.floor(kU.ne.lat/kO)];kN=kE[0];k5=ld[0]+1;kV=kE[1];k8=ld[1]+1;var kJ=[];for(var kG=kN;kG=0?kG-kB:kG+kB;var kR="id_"+kP+"_"+kL+"_"+kA;if(fb.isTileBlank(kP,kA,kz)===true){continue}if(!kJ[kR]){var la=false;var kF=256;if(lf==="web"){var kQ=this._webTileRaste180(kP,kL,kA);la=kQ.combine;kF=kQ.dataIndex}var kH={col:kP,row:kL,zoom:kA,useZoom:k6,loopOffsetX:0,tileSize:kW,baseTileSize:kz,mercatorSize:kO,combine:la,dataIndex:kF};kJ.push(kH);kJ[kR]=true}}}if(this.map._tilt>0&&(lf!=="web"||kS>=8)){for(var lc=0;lc0&&kM.x0&&kM.ykZ.lng&&k0.minYkZ.lat){continue}if(!this.ifTileInMapBounds(k0,kU,k7,le)){kJ.splice(lc,1);lc--}}}kJ.sort((function(i){return function(T,lg){return((0.4*Math.abs(T.col-i[0])+0.6*Math.abs(T.row-i[1]))-(0.4*Math.abs(lg.col-i[0])+0.6*Math.abs(lg.row-i[1])))}})([kT,kC]));kJ.zoom=kA;kJ.tileTypeName=lf;return kJ},_webTileRaste180:function(T,kC,e){var i=this.map;var kz=false;var kA=256;var ky=fb.calcLoopParam(T,e);var kB={col:ky.col,row:kC,baseTileSize:256,zoom:e};var kx=jt.prototype.tileToBound(kB,i.getCenter());if(Math.ceil(kx.LL.sw.lng)*Math.floor(kx.LL.ne.lng)<0){kz=true;kA=fb.pixelWidth(kx.MC.sw.lng,e);if(kB.col<0){kA=-kA}}return{combine:kz,dataIndex:kA}},calcXYZTilesInfo:function(kI,kB,kH,kM,kA,kP){var kD=kP.width;var kN=kP.height;var kC=Math.floor(kH);var kE=null;if(kA.transform.target==="EPSG3857"){var kx=dK.transformBDmcPoint(kI,kA.transform);var ky=dK.getRangeExtent(kx,kD,kN,kC,kA.transform);kE=[ky.minX,ky.minY,ky.maxX,ky.maxY]}else{if(kA.transform.source==="BD09MC"){var kx=[kI.lng,kI.lat];kE=[kB.sw.lng,kB.sw.lat,kB.ne.lng,kB.ne.lat]}else{var kx=dK.transformBDmcPoint(kI,kA.transform);var kz=dK.transformBDmcPoint(kB.ne,kA.transform);var kG=dK.transformBDmcPoint(kB.sw,kA.transform);kE=dK.getLoopBox(kx,[kG[0],kG[1],kz[0],kz[1]])}}if(!kx||!kE){return[]}kC=kC+kA.spanLevel;var T=dK.getTileRangeForExtentFactory(kE,kC,kA.transform);var e=[];var kQ=dK.getResolutionScale(kC,kA.transform);for(var kL=T.minX;kL<=T.maxX;kL++){for(var kJ=T.minY;kJ<=T.maxY;kJ++){var kK={col:kL,row:kJ,zoom:kC,useZoom:kC,tileTypeName:kM,loopOffsetX:0,tileSize:256*kQ,transform:kA.transform,combine:false,dataIndex:0};e.push(kK);var kF="id_"+kL+"_"+kJ+"_"+kC;e[kF]=true}}var kO=dK.getTileCoordForCoordAndZ(kx,kC);e.sort((function(i){return function(kR,kS){return((0.4*Math.abs(kR.col-i[0])+0.6*Math.abs(kR.row-i[1]))-(0.4*Math.abs(kS.col-i[0])+0.6*Math.abs(kS.row-i[1])))}})([kO[1],kO[2]]));e.zoom=kC;e.tileTypeName=kM;return e},getCurrentViewTilesInfo:function(T,kx){var i=this._getTilesInfoKey(T,kx);var e=this.tilesInfoCache[i];if(!e){return this.calcTilesInfo(T,kx)}return e},ifTileInMapBounds:function(e,kz,T,ky){var i=kz.normalizedBottomLeft;var kK=kz.normalizedTopRight;var kC=kz.normalizedTopLeft;var kA=kz.normalizedBottomRight;var kx=false;var kJ=new cF(e.minX,e.minY);var kG=new cF(e.maxX,e.maxY);var kB=new cF(kG.lng,kJ.lat);var kH=new cF(kJ.lng,kG.lat);var kE=[kH,kG,kB,kJ];for(var kI=0,kD=kE.length;kI0){this.zoomState=1}else{if(e<0){this.zoomState=-1}}this.lastZoom=i;return this.zoomState}});function iT(e){this.map=e;this.gl=null;this.layers=[];this.mouseEventThrottle=this.throttle(this.pick,100).bind(this);this.mousePointerThrottle=this.throttle(this.mouseStatus,300).bind(this);this.base=new cF(12069475.280738307,3929271.1724863998);this.iconCache=new aC((b4()||e8.Browser.ie)?64:128,{clearCallback:function(i){}})}bF.register(function(i){if(i._renderType!=="webgl"){return}var e=i._normalLayerMgr=new iT(i);i.toFormatCoords=function(kz,kC){var kB=[];var kA=e.base;if(kC&&kC.center){kA=jt.convertLL2MC(kC.center)}for(var ky=0;ky0})},_layerMouseEvent:function(i){this.mouseEventThrottle(i,"onmousemove")},_layerClickEvent:function(i){this.pick(i,"onclick")},_layerDBLClickEvent:function(i){this.pick(i,"ondblclick")},_layerRightClickEvent:function(i){this.pick(i,"onrightclick")},throttle:function(T,e){var kx=null;var i=Date.now();return function(){var kB=Date.now();var kA=e-(kB-i);var kz=this;var ky=arguments;if(kx){clearTimeout(kx)}if(kA<=0){T.apply(kz,ky);i=Date.now()}else{kx=setTimeout(function(){T.apply(kz,ky)},kA)}}},pick:function(kC,kA){if(!this.layers.length){return false}var kx=false;var T=false;for(var kz=0;kz80*k5){k0=kY=k4[0];kZ=kX=k4[1];for(var k3=k5;k3kY){kY=lc}if(la>kX){kX=la}}ld=Math.max(kY-k0,kX-kZ)}T(k8,k1,k5,k0,kZ,ld,null,k6);return k1}function kS(k1,k3,kX,k2,kY){var kZ;var k0;if(kY===(kW(k1,k3,kX,k2)>0)){for(kZ=k3;kZ=k3;kZ-=k2){k0=kA(kZ,k1[kZ],k1[kZ+1],k0)}}if(k0&&kG(k0,k0.next)){kO(k0);k0=k0.next}return k0}function kK(k0,kX){if(!k0){return k0}if(!kX){kX=k0}var kZ=k0;var kY;do{kY=false;if(!kZ.steiner&&(kG(kZ,kZ.next)||kQ(kZ.prev,kZ,kZ.next)===0)){kO(kZ);kZ=kX=kZ.prev;if(kZ===kZ.next){return null}kY=true}else{kZ=kZ.next}}while(kY||kZ!==kX);return kX}function T(kY,k0,k3,k1,kX,k7,k6,k4){if(!kY){return}if(!k6&&k7){kF(kY,k1,kX,k7)}var k5=kY;var kZ;var k2;while(kY.prev!==kY.next){kZ=kY.prev;k2=kY.next;if(k7?kV(kY,k1,kX,k7):kN(kY)){k0.push(kZ.i/k3+k4);k0.push(kY.i/k3+k4);k0.push(k2.i/k3+k4);kO(kY);kY=k2.next;k5=k2.next;continue}kY=k2;if(kY===k5){if(!k6){T(kK(kY),k0,k3,k1,kX,k7,1,k4)}else{if(k6===1){kY=kJ(kY,k0,k3,k4);T(kY,k0,k3,k1,kX,k7,2,k4)}else{if(k6===2){kI(kY,k0,k3,k1,kX,k7,k4)}}}break}}}function kN(kZ){var kY=kZ.prev;var kX=kZ;var k1=kZ.next;if(kQ(kY,kX,k1)>=0){return false}var k0=kZ.next.next;while(k0!==kZ.prev){if(kH(kY.x,kY.y,kX.x,kX.y,k1.x,k1.y,k0.x,k0.y)&&kQ(k0.prev,k0,k0.next)>=0){return false}k0=k0.next}return true}function kV(k2,k3,k1,k9){var k6=k2.prev;var k5=k2;var k4=k2.next;if(kQ(k6,k5,k4)>=0){return false}var la=k6.xk5.x?(k6.x>k4.x?k6.x:k4.x):(k5.x>k4.x?k5.x:k4.x);var kZ=k6.y>k5.y?(k6.y>k4.y?k6.y:k4.y):(k5.y>k4.y?k5.y:k4.y);var kY=e(la,k7,k3,k1,k9);var k8=e(k0,kZ,k3,k1,k9);var kX=k2.nextZ;while(kX&&kX.z<=k8){if(kX!==k2.prev&&kX!==k2.next&&kH(k6.x,k6.y,k5.x,k5.y,k4.x,k4.y,kX.x,kX.y)&&kQ(kX.prev,kX,kX.next)>=0){return false}kX=kX.nextZ}kX=k2.prevZ;while(kX&&kX.z>=kY){if(kX!==k2.prev&&kX!==k2.next&&kH(k6.x,k6.y,k5.x,k5.y,k4.x,k4.y,kX.x,kX.y)&&kQ(kX.prev,kX,kX.next)>=0){return false}kX=kX.prevZ}return true}function kJ(k3,kZ,k2,k1){var k0=k3;do{var kY=k0.prev;var kX=k0.next.next;if(!kG(kY,kX)&&i(kY,k0,k0.next,kX)&&kR(kY,kX)&&kR(kX,kY)){kZ.push(kY.i/k2+k1);kZ.push(k0.i/k2+k1);kZ.push(kX.i/k2+k1);kO(k0);kO(k0.next);k0=k3=kX}k0=k0.next}while(k0!==k3);return k0}function kI(kX,kZ,k1,k0,kY,k6,k2){var k5=kX;do{var k4=k5.next.next;while(k4!==k5.prev){if(k5.i!==k4.i&&kP(k5,k4)){var k3=kE(k5,k4);k5=kK(k5,k5.next);k3=kK(k3,k3.next);T(k5,kZ,k1,k0,kY,k6,null,k2);T(k3,kZ,k1,k0,kY,k6,null,k2);return}k4=k4.next}k5=k5.next}while(k5!==kX)}function kM(kZ,k6,k2,k1){var k3=[];var k0;var k4;var kX;var kY;var k5;for(k0=0,k4=k6.length;k0=kY.next.y){var k6=kY.x+(k2-kY.y)*(kY.next.x-kY.x)/(kY.next.y-kY.y);if(k6<=k3&&k6>k0){k0=k6;if(k6===k3){if(k2===kY.y){return kY}if(k2===kY.next.y){return kY.next}}kZ=kY.x=kY.x&&kY.x>=k9&&kH(k2kZ.x))&&kR(kY,kX)){kZ=kY;k8=k4}}kY=kY.next}return kZ}function kF(k1,kX,k0,kY){var kZ=k1;do{if(kZ.z===null){kZ.z=e(kZ.x,kZ.y,kX,k0,kY)}kZ.prevZ=kZ.prev;kZ.nextZ=kZ.next;kZ=kZ.next}while(kZ!==k1);kZ.prevZ.nextZ=null;kZ.prevZ=null;ky(kZ)}function ky(k3){var k0;var kZ;var kY;var k2;var k4;var kX;var k5;var k1;var k6=1;do{kZ=k3;k3=null;k4=null;kX=0;while(kZ){kX++;kY=kZ;k5=0;for(k0=0;k00||(k1>0&&kY)){if(k5===0){k2=kY;kY=kY.nextZ;k1--}else{if(k1===0||!kY){k2=kZ;kZ=kZ.nextZ;k5--}else{if(kZ.z<=kY.z){k2=kZ;kZ=kZ.nextZ;k5--}else{k2=kY;kY=kY.nextZ;k1--}}}if(k4){k4.nextZ=k2}else{k3=k2}k2.prevZ=k4;k4=k2}kZ=kY}k4.nextZ=null;k6*=2}while(kX>1);return k3}function e(kY,k1,kX,k0,kZ){kY=32767*(kY-kX)/kZ;k1=32767*(k1-k0)/kZ;kY=(kY|(kY<<8))&16711935;kY=(kY|(kY<<4))&252645135;kY=(kY|(kY<<2))&858993459;kY=(kY|(kY<<1))&1431655765;k1=(k1|(k1<<8))&16711935;k1=(k1|(k1<<4))&252645135;k1=(k1|(k1<<2))&858993459;k1=(k1|(k1<<1))&1431655765;return kY|(k1<<1)}function kB(kZ){var kY=kZ;var kX=kZ;do{if(kY.x=0&&(k1-kZ)*(k2-kY)-(k3-kZ)*(k0-kY)>=0&&(k3-kZ)*(k4-kY)-(kX-kZ)*(k2-kY)>=0}function kP(kY,kX){return kY.next.i!==kX.i&&kY.prev.i!==kX.i&&!kL(kY,kX)&&kR(kY,kX)&&kR(kX,kY)&&kx(kY,kX)}function kQ(kZ,kY,kX){return(kY.y-kZ.y)*(kX.x-kY.x)-(kY.x-kZ.x)*(kX.y-kY.y)}function kG(kY,kX){return kY.x===kX.x&&kY.y===kX.y}function i(kZ,kX,kY,k0){if((kG(kZ,kX)&&kG(kY,k0))||(kG(kZ,k0)&&kG(kY,kX))){return true}return kQ(kZ,kX,kY)>0!==kQ(kZ,kX,k0)>0&&kQ(kY,k0,kZ)>0!==kQ(kY,k0,kX)>0}function kL(kY,kX){var kZ=kY;do{if(kZ.i!==kY.i&&kZ.next.i!==kY.i&&kZ.i!==kX.i&&kZ.next.i!==kX.i&&i(kZ,kZ.next,kY,kX)){return true}kZ=kZ.next}while(kZ!==kY);return false}function kR(kY,kX){return kQ(kY.prev,kY,kY.next)<0?kQ(kY,kX,kY.next)>=0&&kQ(kY,kY.prev,kX)>=0:kQ(kY,kX,kY.prev)<0||kQ(kY,kY.next,kX)<0}function kx(kZ,kY){var k2=kZ;var kX=false;var k1=(kZ.x+kY.x)/2;var k0=(kZ.y+kY.y)/2;do{if(((k2.y>k0)!==(k2.next.y>k0))&&(k1<(k2.next.x-k2.x)*(k0-k2.y)/(k2.next.y-k2.y)+k2.x)){kX=!kX}k2=k2.next}while(k2!==kZ);return kX}function kE(kZ,kY){var kX=new kU(kZ.i,kZ.x,kZ.y);var k0=new kU(kY.i,kY.x,kY.y);var k2=kZ.next;var k1=kY.prev;kZ.next=kY;kY.prev=kZ;kX.next=k2;k2.prev=kX;k0.next=kX;kX.prev=k0;k1.next=k0;k0.prev=k1;return k0}function kA(kY,kX,k1,kZ){var k0=new kU(kY,kX,k1);if(!kZ){k0.prev=k0;k0.next=k0}else{k0.next=kZ.next;k0.prev=kZ;kZ.next.prev=k0;kZ.next=k0}return k0}function kO(kX){kX.next.prev=kX.prev;kX.prev.next=kX.next;if(kX.prevZ){kX.prevZ.nextZ=kX.nextZ}if(kX.nextZ){kX.nextZ.prevZ=kX.prevZ}}function kU(kY,kX,kZ){this.i=kY;this.x=kX;this.y=kZ;this.prev=null;this.next=null;this.z=null;this.prevZ=null;this.nextZ=null;this.steiner=false}kD.deviation=function(k2,k7,k4,kZ){var k5=k7&&k7.length;var k1=k5?k7[0]*k4:k2.length;var kY=Math.abs(kW(k2,0,k1,k4));if(k5){for(var k3=0,k6=k7.length;k30){kZ+=k1[k0-1].length;kX.holes.push(kZ)}}return kX};return kD})();function cK(i,e){this.id=gg();this.workerPool=i;this.actors=[];this.currentActorIndex=0;this.ready=false;this.init(e)}cK.prototype.init=function(kz){const e=this.workerPool.acquire(this.id);for(var kx=0;kx"){this.setBusy(false);const kA=this.callbacks[kB];delete this.callbacks[kB];if(kA){if(ky.error){kA(iu(ky.error))}else{kA(null,iu(ky.data))}}}else{var T=this;const i=[];const e=ky.hasCallback?function(kC,kD){T.target.postMessage({id:kB,action:"",sourceMapId:T.mapId,error:kC?jM(kC):null,data:jM(kD,i)},i)}:function(kC){};const kz=iu(ky.data);if(this.parent[ky.action]){this.parent[ky.action](ky.sourceMapId,kz,e)}}};jL.prototype.send=function(i,T,kA,kx,ky,kB){if(i==="release"){this.releasePendingData(T,kA);return}if(this.busy){this.taskQueue.push({action:i,data:T,callback:kA,targetMapId:kx,mustQueue:ky,callbackMetadata:kB});return}this.setBusy(true);var kz=Math.round((Math.random()*1000000000000000000)).toString(36).substring(0,10);const e=this.mapId+"_"+i+"_"+kz;if(kA){kA.metadata=kB;this.callbacks[e]=kA}const kC=[];this.target.postMessage({id:e,action:i,hasCallback:!!kA,targetMapId:kx,mustQueue:ky,sourceMapId:this.mapId,data:jM(T,kC)},kC);return{cancel:function(){if(kA){delete this.callbacks[e]}this.target.postMessage({id:e,action:"",targetMapId:kx,sourceMapId:this.mapId})}}};jL.prototype.stop=function(){this.taskQueue.length=0;this.busy=false;this.callbacks={}};jL.prototype.remove=function(){this.taskQueue.length=0;this.busy=false;this.target.removeEventListener("message",this.receive,false)};jL.prototype.releasePendingData=function(e,kA){var T=[];var ky=this.taskQueue;for(var kx=ky.length-1;kx>=0;kx--){var kz=ky[kx]["data"];if(!kz||!kz.layerId){break}if(kz.layerId!==e.layerId){continue}if(!e["id_"+kz.x+"_"+kz.y+"_"+kz.z]){ky.splice(kx,1);T.push(kz)}}kA(null,T)};var kn;function hC(){if(!kn){kn=new hI()}return kn}function hI(){this.active={}}hI.prototype.acquire=function(i){if(!this.workers){this.workers=[];var T=(window.location.protocol === "http:" ? "http:" : "https:") + "//api.map.baidu.com/res/webgl/10/worker_mvt_xyk5ez.js";while(this.workers.length=e._autoEnterZoom){e._checkIndoorByMove()}});i.on("zoomend",function(){if(this.getZoom()>=e._autoEnterZoom){e._checkIndoorByMove()}else{if(e.enterMethod!=="byClick"&&e.currentUid!==null){this.showIndoor(null)}}})};df.prototype._checkIndoorByMove=function(){var T=this._map;var kD=T.getSize();var kI={x:kD.width/2,y:kD.height/2};var kH=Math.max(kD.width,kD.height);var kJ=[];for(var kE in this._indoorData){var e=this._indoorData[kE].center;var kx=T.pointToPixelIn(new bF.Point(e[0],e[1]));var kA=cq(kI,kx);kJ.push({uid:kE,distance:kA})}if(kJ.length===0){return}kJ.sort(function(kK,i){return kK.distance-i.distance});var kz=kJ[0];var kF=T.getCenterIn();var ky=false;for(var kC=0;kCkB[0]&&kF.lat>kB[1]&&kF.lng=this._autoEnterZoom){this._checkIndoorByMove()}};df.prototype.removeData=function(T,ky){if(!this._indoorData[T]){return}var kx=this._indoorData[T];for(var e=0;e21){kS=21}if(kL){kJ=kF(kO,kP,kS,kL)}else{kJ=T(kO,kP,kS,kR)}var kN=kJ.drawId;var kI=kJ.style;var kQ=kJ.styleUpdate;var kT=[];if(!kN){return kT}for(var kK=0;kK>>0}}function kB(kJ,kH){var kI=null;if(kJ[kJ.length-1]&&kJ[kJ.length-1] instanceof Array&&kJ[kJ.length-1][0]==="openmap"){kI=kJ[kJ.length-1][1]?kJ[kJ.length-1][1]:null}return{sid:kH,borderRgba:i(kJ[0]),fillRgba:i(kJ[1]),borderWidth:kJ[2],fillWidth:kJ[3],borderCap:kJ[4],fillCap:kJ[5],haveBorderLine:kJ[6],haveBorderTexture:kJ[7],haveFillTexture:kJ[8],isUseBorderRgba:kJ[9],isUseFillRgba:kJ[10],borderTexture:kJ[11],fillTexture:kJ[12],borderTextureType:kJ[13],fillTextureType:kJ[14],isRealWidth:kJ[15],haveArrow:kJ[16],needRound:kJ[17],realBorderWidth:kJ[18],hue:i(kI)}}function ky(kJ,kH){var kI=null;var kK=null;if(kJ[kJ.length-1]&&kJ[kJ.length-1] instanceof Array&&kJ[kJ.length-1][0]==="openmap"){kI=kJ[kJ.length-1][1]?kJ[kJ.length-1][1]:null;kK=kJ[kJ.length-1][2]?kJ[kJ.length-1][2]:null}return{sid:kH,fillRgba:i(kJ[0]),borderRgba:i(kJ[1]),borderWidth:kJ[2],borderTexture:kJ[3],borderTextureType:kJ[4],waterStyle:kJ[5],haloStyle:kJ[6],textureStyle:kJ[7],thickRgba:i(kJ[8]),fillTexture:kK,hue:i(kI)}}function kA(kI,kH){return{sid:kH,filter:kI[0],ratio:kI[1],haveBorder:kI[2],borderWidth:kI[3],borderRgba:i(kI[4]),fillTop:i(kI[5]),fillSide:i(kI[6]),polyTexture:kI[7]}}function i(kM){var kL=kM;if(kC[kL]){return kC[kL]}kM=kM>>>0;var kK=(kM)&255;var kJ=(kM>>8)&255;var kH=(kM>>16)&255;var kI=(kM>>24)&255;kC[kL]=[kK,kJ,kH,kI];return kC[kL]}return{getStyleFromCache:function(kO,kJ,kM,kN,kI,kL,kH){kO=kO||"default";var kK=kO+"-"+kJ+"-"+kM+"-"+kN;if(kL){kK+="-indoor"}if(kI){if(!kG[kK]){kG[kK]=kD(kJ,kM,kN,kI)}return kG[kK]}if(!kx[kK]){kx[kK]=kD(kJ,kM,kN,kI,kH)}return kx[kK]},clearStyleFromCache:function(){kx={};kG={}}}})();bF.register(function(i){var e=new it(i)});function it(e){e.container.appendChild(this.render());this.bind(e)}it.prototype.render=function(){var i=document.createElement("div");i.className="click-ripple-container";var e=document.createElement("div");e.className="click-ripple";i.appendChild(e);this._div=i;this._ripple=e;return i};it.prototype.bind=function(i){var e=this;i.addEventListener("spotclick",function(T){if(!T.spots||T.spots.length===0){return}e._div.style.left=T.pixel.x+"px";e._div.style.top=T.pixel.y+"px";e8.ac(e._ripple,"ripple-playing")});i.addEventListener("hotclick",function(T){if(!T||!T.pixel||!(T.pixel instanceof ft)){return}e._div.style.left=T.pixel.x+"px";e._div.style.top=T.pixel.y+"px";e8.ac(e._ripple,"ripple-playing")});e8.on(e._ripple,"transitionend",function(){e8.rc(e._ripple,"ripple-playing")})};function b3(e){dg.call(this);if(!e){return}this._opts={};this._map=e;this._maxLat=84.6;this._minLat=-80.6;this._maxLatMC=jt.convertLL2MC(new cz(this._maxLat,0)).lat;this._minLatMC=jt.convertLL2MC(new cz(this._minLat,0)).lat}b3.inherits(dg,"ToolbarItem");e8.extend(b3.prototype,{open:function(){if(this._isOpen==true){return true}if(this._map._toolInUse){return false}this._map._toolInUse=true;this._isOpen=true;return true},close:function(){if(!this._isOpen){return}this._map._toolInUse=false;this._isOpen=false},_checkStr:function(e){if(!e){return""}return e.replace(//g,">")}});function cn(T,i){b3.call(this,T);i=i||{};this._opts=e8.extend(e8.extend(this._opts||{},{autoClear:false,tips:"测距",followText:"单击确定起点,双击结束绘制",unit:"metric",showResult:true,lineColor:"blue",lineStroke:2,opacity:1,lineStyle:"solid",cursor:E.distCursor,styleCodes:{lnCode:0,spCode:0,slCode:0,tlCode:0},enableMassClear:true}),i);if(this._opts.showResult===false){if(typeof i.tips==="undefined"){this._opts.tips="绘制折线"}if(!i.cursor){this._opts.cursor="crosshair"}}if(this._opts.lineStroke<=0){this._opts.lineStroke=2}if(this._opts.opacity>1){this._opts.opacity=1}else{if(this._opts.opacity<0){this._opts.opacity=0}}if(this._opts.lineStyle!=="solid"&&this._opts.lineStyle!=="dashed"){this._opts.lineStyle="solid"}this._checked=false;this._drawing=null;this.followTitle=null;this._totalDis={};this._points=[];this._paths=[];this._dots=[];this._segDistance=[];this._overlays=[];this._units={metric:{name:"metric",conv:1,incon:1000,u1:"米",u2:"公里"},us:{name:"us",conv:3.2808,incon:5279.856,u1:"英尺",u2:"英里"}};if(!this._units[this._opts.unit]){this._opts.unit="metric"}this._dLineColor="#ff6319";this._dLineStroke=3;this._dOpacity=0.8;this._dLineStyle="solid";this._dCursor=E.distCursor;if(this._opts.showResult){this._opts.followText="单击确定起点"}this._followTextM="单击确定地点,双击结束";this._sectionMarkerTip="单击可删除此点,拖拽可调整位置";this._movingTimerId=null;if(this._opts.showResult){this.text="测距"}else{this.text="绘线"}this._isOpen=false;var e=this;hj.load("tools",function(){e._draw()})}cn.inherits(b3,"PolylineTItem");e8.extend(cn.prototype,{setLineColor:function(e){this._opts.lineColor=e},setLineStroke:function(e){if(Math.round(e)>0){this._opts.lineStroke=Math.round(e)}},setOpacity:function(e){if(e>=0&&e<=1){this._opts.opacity=e}},setLineStyle:function(e){if(e==="solid"||e==="dashed"){this._opts.lineStyle=e}},clear:function(){for(var T=0,e=this._overlays.length;TkD){kx-=kz;kB-=this._loopOffset}while(kxthis._mc180X){e-=this._mcTSpan}while(ethis._mc180X){i.lng-=this._mcTSpan;e-=this._mcTSpan;ky-=this._mcTSpan}while(i.lng=kE){var kD=kx+kG;if(this.isTileBlank(kD,e,kJ)===true){continue}var T="id_"+kD+"_"+kK+"_"+e;if(!kF[T]){kF[T]=true;kH.push([kD,kK,e,0])}}else{if(kx<=kA){var kD=kx-kG;if(this.isTileBlank(kD,e,kJ)===true){continue}var T="id_"+kD+"_"+kK+"_"+e;if(!kF[T]){kF[T]=true;kH.push([kD,kK,e,0])}}}}for(var kB=0,kz=kH.length;kB=0;kB--){var kx=kF[kB][0];if(this.isTileBlank(kx,e,kJ)){kF.splice(kB,1)}}return kF},isTileBlank:function(T,ky,e){var kz=Math.pow(2,ky-3);var i=Math.round(this._validPixels*kz);var kx=6*kz*256/e;while(T>kx/2-1){T-=kx}while(T<-(kx/2)){T+=kx}if(T>0&&T*e>i){return true}if(T<0&&Math.abs((T+1)*e)>i){return true}return false},isAddWidth:function(e,i){return ethis._mc180X},pixelWidth:function(e,i){if(e<0){e=-e}return Math.abs(e-this._mc180X)/(Math.pow(2,18-i))},getSpaceDistanceInPixel:function(i){var e=Math.round((this._spaceDistance+this._mSpaceDistance)/Math.pow(2,18-i));return e}};var fb=new bK();function ez(){this._id=undefined;this._type=undefined;this.grid=undefined;this.layerName=undefined;this.geojson=undefined;this._geometry=null;this._properties={};this._box=null;this._state={};this._style=null;this._visible=true;this.renderData={};return this}ez.prototype.serialize=function(){return{id:this.getId(),type:this.getType(),grid:this.grid,layerName:this.layerName,geojson:this.geojson,renderData:this.renderData,geometry:this.getGeometry(),box:this.getBox(),properties:this.getProperties(),state:this.getState(),visible:this._visible}};ez.prototype.deserialize=function(e){this.setId(e.id);this.setType(e.type);this.grid=e.grid;this.layerName=e.layerName;this.geojson=e.geojson;this.setProperties(e.properties);this.setState(e.state);this._visible=e.visible||true;this.renderData=e.renderData;this.setGeometry(e.geometry);this.setBox(e.box);return this};ez.prototype.getType=function(){return this._type};ez.prototype.getGeometry=function(){return this._geometry};ez.prototype.getId=function(){return this._id};ez.prototype.getProperties=function(){return this._properties};ez.prototype.getBox=function(){return this._box};ez.prototype.getState=function(){if(Object.keys(this._state).length>0){return this._state}else{return null}};ez.prototype.getStyle=function(){return this._style};ez.prototype.getStyleFunction=function(){return this._styleFunction};ez.prototype.setType=function(e){return this._type=e};ez.prototype.setGeometry=function(e){this._geometry=e};ez.prototype.setStyle=function(e){if(!e||Object.keys(e).length===0){return}for(var i in e){this.set(i,e[i],this._style)}};ez.prototype.setState=function(e){for(var i in e){this.set(i,e[i],this._state)}};ez.prototype.setId=function(e){this._id=e};ez.prototype.setProperties=function(e){for(var i in e){this.set(i,e[i],this._properties)}};ez.prototype.setBox=function(e){return this._box=e};ez.prototype.isPointInBox=function(e){return this._pointInBox(e,this._box)};ez.prototype.getPointGeoJSON=function(kx){var kG=this.renderData;if(kG){var kA=kG.active;if(!kG[kA]||!kG[kA]["poi"]){return null}var kF=[];var kC=kG[kA]["poi"];for(var kD=0;kD0){kE="MultiPolygon"}return{type:"Feature",properties:{},geometry:{type:kE,coordinates:[kF]}}}}};ez.prototype._pointInBox=function(e,i){if(i[0]>e[0]||i[1]>e[1]||i[2]kz[kA].bds[0])&&(T.y-ky.ykz[kA].bds[1])){if(e.getTilt()>55){var kB=e.pointToOverlayPixelIn(kz[kA].pt);if(kB.outOfFrustum){continue}}kD=true;break}}}}return kD};ez.prototype._pixelPnpoly=function(ky,kA){var e=kA.length;var T=0;var kz=false;for(var kx=0;kx=kA[kx].lat)&&(ky.lat=kA[T].lat)&&(ky.lat1){for(var kI=1;kIkJ){kE=Math.sqrt(Math.min(ky,kM))}if((T==null)||(T>kE)){kx=Math.sqrt(kM-kz)/Math.sqrt(kJ);kG=Math.sqrt(ky-kz)/Math.sqrt(kJ);T=kE;kF=kI}T=Math.min(T,kE)}}return{dist:T}};ez.prototype.isPointInGeometry=function(T,kC){var e=false;switch(this._type){case f1.POINT:e=this._pixelPnpoint(T,this.renderData,kC);break;case f1.LINE_STRING:var ky=this._getProximity({lng:T[0],lat:T[1]},this._geometry);var kB=this.renderData[this.renderData.active];if(!kB||!kB.line||!kB.line[0]||!kB.line[0].width){var kA=2}else{var kA=this.renderData[this.renderData.active]["line"][0].width;if(this.grid===ej.GridModel.GOOGLEWEB){kA=Math.max(kA/2*dK.gridScaleFromBDMCTo3857,2)}else{kA=Math.max(kA/2,2)}}if(ky.distkL[0]){kK[0]=kL[0]}if(kK[1]>kL[1]){kK[1]=kL[1]}if(kK[2]=0){continue}const kD=kC[kE];kz[kE]=jM(kD,kA)}if(kC instanceof Error){kz.message=kC.message}}if(e!=="Object"){kz["_$name"]=e}return kz}else{if(kC instanceof Function){return null}}throw new Error("不能被序列化")}function iu(kz){if(kz===null||kz===undefined||typeof kz==="boolean"||typeof kz==="number"||typeof kz==="string"||kz instanceof Boolean||kz instanceof Number||kz instanceof String||kz instanceof Date||kz instanceof RegExp||fR(kz)||gw(kz)||ArrayBuffer.isView(kz)||kz instanceof ImageData){return kz}if(Array.isArray(kz)){var e=kz["_$name"];if(e){var kx=jn[e]["_class"];if(!kx){throw new Error("不能被反序列化")}if(kx.deserialize){return kx.deserialize(kz)}}const ky=[];for(var T=0;T=ky.minZoom&&ky.map.getZoom()<=ky.maxZoom){if(!ky._onMap){ky.addDataToMap();ky._onMap=true}}else{if(ky._onMap){ky.removeDataFromMap();ky._onMap=false}}};this.map.on("zoomend",this._onZoomEvent);var ky=this;var e=false;var kx={x:0,y:0};this._layerMouseEvent=function(kD){if(!ky.map||!ky._listeners||!ky.visible||!ky._onMap){return}if(!ky._listeners.onmousemove||Object.keys(ky._listeners.onmousemove).length===0){return}var kC=ky.pickOverlays(kD);var i;if(kC&&kC.length>0){i=new fU("onmousemove");i.features=kC;ky.map.platform.style.cursor=ky.map.config.overlayMoveCursor;e=true}else{if(!e||!ky._listeners.onmouseout||Object.keys(ky._listeners.onmouseout).length===0){return}ky.map.platform.style.cursor=ky.map.config.defaultCursor;i=new fU("onmouseout");i.features=null;e=false}if(i){i.point=kD.point;i.pixel=kD.pixel;i.latLng=kD.latlng;ky.dispatchEvent(i)}};this._layerClickEvent=function(kE){if(!ky.map||!ky._listeners||!ky.visible){return}if((!ky._listeners.onclick&&!ky._listeners.dblclick)||(Object.keys(ky._listeners.onclick).length===0&&Object.keys(ky._listeners.dblclick).length===0)){return}var kC={x:kE.clientX,y:kE.clientY};if(Math.abs(kC.x-kx.x)>ky.clickDistrict||Math.abs(kC.y-kx.y)>ky.clickDistrict){return}var kD=ky.pickOverlays(kE);var i=new fU(kE.type);i.point=kE.point;i.pixel=kE.pixel;i.latLng=kE.latlng;i.features=kD;ky.dispatchEvent(i)};this._layerMouseDownEvent=function(i){kx={x:i.clientX,y:i.clientY}};kA.addEventListener("onmousemove",this._layerMouseEvent);kA.addEventListener("onmouseout",this._layerMouseEvent);kA.addEventListener("onmousedown",this._layerMouseDownEvent);var kz=["onclick"];for(var T=0;T0){this.clearData()}this.dataSource=e;this.overlayData=this.gParse.readFeaturesFromObject(e,{markerStyle:this.markerStyle,polylineStyle:this.polylineStyle,polygonStyle:this.polygonStyle},this._register.bind(this));this.addDataToMap()};aQ.prototype._register=function(e){e.layerName=this.layerName;e.setZIndex(this.level)};aQ.prototype.resetStyle=function(){for(var e=0;e=0){this.overlayData.splice(e,1);this.map.removeOverlay(i)}}};aQ.prototype.findItemIndex=function(T){var i=-1;for(var e=0;e=this.minZoom&&this.map.getZoom()<=this.maxZoom){for(var e=0;e0){for(var e=0;e0){this.removeDataFromMap()}this.overlayData=[]};aQ.prototype.pickOverlays=function(kB){var kA=[];if(!this.visible||!this._onMap){return null}for(var ky=0;ky=0&&T0?kA:null};aQ.prototype.setLevel=function(e){if(e>-999&&e<9999){this.level=e;for(var T=0;T(kE+kF)){kJ.tileCache.clear();return null}if(kz.source!=="BD09MC"){kL.x=dK.getTilesLoop(kR,kL.x)}if(kI.length===4){var kQ=dK.getTileRangeExtent([kR,kL.x,kL.y]);var kO=e([kQ.minX,kQ.minY,kQ.maxX,kQ.maxY]);if(!kO){return null}}var kM="";if(kx){kM=kx;var kN=/[^\{}]*\{(.*)\}[^\}]*/;kM.match(kN);var kK=[];if(RegExp.$1){kK=RegExp.$1.split(",")}kM=kM.replace(/\{(.*)\}/,kK[(kL.x+kL.y)%kK.length]);kM=kM.replace(/\[x\]/gi,kD(kL.x,kL.y,kR));kM=kM.replace(/\[y\]/gi,kH(kL.x,kL.y,kR));kM=kM.replace(/\[z\]/gi,kB(kL.x,kL.y,kR));kM=kM.replace(/\[b\]/gi,kG(kL.x,kL.y,kR));kM=kM.replace(/\[w\]/gi,ky(kL.x,kL.y,kR));kM=kM.replace(/\[h\]/gi,kC(kL.x,kL.y,kR))}else{return null}return kM};function e(kK){if(kI&&kI instanceof Array&&kI.length===4){if((kI[0]<=kK[2]&&kI[1]<=kK[3])&&(kI[2]>=kK[0]&&kI[3]>=kK[1])){return true}else{return false}}return true}hN.sendMessage(a1(4,3,7),["layer","xyz"]);return kJ}function dA(i){this.src=db();this.tileMaskUvCache=new aC(64,{clearCallback:function(kz){}});var ky=6;if(i.pixelMap){this.opacity=typeof i.pixelMap.opacity==="number"?i.pixelMap.opacity:1;cj(this.opacity,0,1);if(this.opacity<1){i.useThumbData=false}var kx=i.pixelMap||{};this.colors=kx.colors||["#F9F871","#FFC75F","#FF9671","#FF6F91","#D65DB1","#845EC2"];this.positions=kx.positions||[0,0.2,0.4,0.6,0.8,1];this.domain=kx.domain||[0,255];this.clamp=kx.clamp||this.domain;this.noData=(kx.noData!==undefined)?kx.noData:-99999;this.fomularC=kx.fomularC||"float generateValue(vec4 pixel){return pixel.r * 255.;}";this.fomularJS=kx.fomularJS||function(kz){return kz.r};this.maskPng=kx.maskPng||null;if(this.maskPng){this.loadMaskPng(this.maskPng)}this.maskData=kx.maskData||-1;this.maskCoord=kx.maskCoord||null;this.fHashcode=q({str:this.fomularC});var e=this.canPixelMap();if(e){this.isPixelMap=true;this.setPixelMap()}ky=i.pixelMap.cacheSize||ky}var T=new kk(i);T.ontology=this;this.layer=T;this.cacheSize=ky;this.tileCache=new aC(this.cacheSize,{clearCallback:function(kz){}});this.tileImageDataCache=new aC(this.cacheSize,{clearCallback:function(kz){}});hN.sendMessage(a1(4,3,16),["layer","pixel"])}dA.inherits(e8.BaseClass,"PixelLayer");e8.extend(dA.prototype,{canPixelMap:function(){if(this.colors&&this.positions){return true}return false},setPixelMap:function(){if(!this.isPixelMap||!this.canPixelMap()){return}var i=this.colors;var e=this.positions;this.pHashcode=q({colors:i,positions:e});this.pixelColorMap=hT.generateColorRamp(i,e)},setDomain:function(e){if(e instanceof Array&&e.length===2){this.domain=e;this.doOnceDraw()}},setClamp:function(e){if(e instanceof Array&&e.length===2){this.clamp=e;this.doOnceDraw()}},setNoData:function(e){this.noData=e;this.doOnceDraw()},setPositions:function(e){this.positions=e;this.setPixelMap();this.doOnceDraw()},setColors:function(e){this.colors=e;this.setPixelMap();this.doOnceDraw()},setFomular:function(e,i){if(e&&i){this.fomularJS=e;this.fomularC=i;this.fHashcode=q({str:this.fomularC});this.doOnceDraw()}},setOpacity:function(e){this.opacity=e;this.doOnceDraw()},setIsPixelMap:function(e){this.isPixelMap=e;this.doOnceDraw()},setMaskPng:function(e){this.maskPng=e;this.loadMaskPng(this.maskPng);this.doOnceDraw()},setMaskData:function(e){this.maskData=e;this.doOnceDraw()},setMaskCoord:function(e){this.maskCoord=e||null;this.calMaskBox();this.doOnceDraw()},setZIndex:function(e){if(this.layer&&parseInt(e)>0){this.layer.setZIndex(e)}},getZIndex:function(){if(this.layer){return this.layer.zIndex}},setUpLevel:function(){if(this.layer){var e=this.layer._getAdjoinZIndex("up");if(this.layer.zIndex!==e){this.layer.setZIndex(e)}}},setDownLevel:function(){if(this.layer){var e=this.layer._getAdjoinZIndex("down");if(this.layer.zIndex!==e){this.layer.setZIndex(e)}}},setZIndexTop:function(){if(this.layer){this.layer.setZIndexTop()}},doOnceDraw:function(){if(this.layer.map){var e=new fU("onupdate");this.layer.map.dispatchEvent(e)}},_getInLayer:function(kF){if(!this.map){return null}var kE=Math.floor(this.map.getZoom());var kx=dK.transformBDmcPoint(kF,this.layer.transform);var kB=dK.getTileCoordForXYAndZ_(kx[0],kx[1],kE,false);var T=kB.join("-");var e=this.tileCache.getData(T);if(e){return e}var ky=this.layer.zIndex;var kA=this.map._featureMgr.result.bkData;var kC=kA[ky][2];var kG=null;for(var kz=0;kz=this.clamp[0]&&e<=this.clamp[1]){return e}}return null},setMaskImageObject:function(T){var e=document.createElement("canvas");e.width=T.width;e.height=T.height;var i=e.getContext("2d");i.drawImage(T,0,0,T.width,T.height);this.imageMaskObject={width:T.width,height:T.height,data:i.getImageData(0,0,T.width,T.height)};i=null;e=null},getImageMaskPixel:function(e){if(!this.imageMaskObject||!this.maskBox){return true}var kx=[e];var kC=this.maskBox||[];var kz=kC[1][0]-kC[0][0];var ky=kC[1][1]-kC[0][1];var T=Math.floor((kx[0][0]-kC[0][0])/kz*this.imageMaskObject.width);var i=Math.floor((-kx[0][1]+kC[1][1])/ky*this.imageMaskObject.height);var kB=Math.floor((i*this.imageMaskObject.width+T)*4);if(T>this.imageMaskObject.width||T<0){return null}if(i>this.imageMaskObject.height||i<0){return null}var kA=this.imageMaskObject.data.data;if(kB+3>kA.length){return false}if(kA[kB+3]>0){if(this.maskData>-1&&this.maskData!==kA[kB]){return false}return true}return false},calMaskBox:function(){var T=this.maskCoord||[];if(this.hasMaskPng&&T&&T.length===2){var e=[];for(var kx=0;kx0){e.zIndex=i.index}e.loadTileData=this._loadTile.bind(this);e.ontology=this;this.layer=e;var T=this;e.addEventListener("ontilesloadstart",function(){T.dispatchEvent(new fU("ontilesloadstart"))});e.addEventListener("ontilesloadend",function(){T.dispatchEvent(new fU("ontilesloadend"))})},createTileLayer:function(i){const kx=i.tileUrlTemplate||"";const kC=i.xTemplate||function(kJ,kL,kK){return kJ};const kH=i.yTemplate||function(kJ,kL,kK){return kL};const kA=i.zTemplate||function(kJ,kL,kK){return kK};const kG=i.bTemplate||function(kJ,kM,kL){const kK=jt.tileToBoundRange({col:kJ,row:kM,zoom:kL,baseTileSize:256});return kK.MC.sw.lng+","+kK.MC.sw.lat+","+kK.MC.ne.lng+","+kK.MC.ne.lat};var kI=i.extent||[];const kB=i.extentCRSIsWGS84||false;var T=i.minZoom||0;var kE=i.maxZoom||23;var kF=i.spanLevel||0;var kD=new hM({transparentPng:true,dataType:2,spanLevel:kF,tileTypeName:"web",cacheSize:256,customLayer:true,clipTile:false,boundary:false,useThumbData:i.useThumbData||false});if(kI.length===4){if(kB){kI=dK.fromEPSG4326(kI)}var ky=dK.transformPointArr([kI[0],kI[1]],"EPSG3857","BD09MC");var kz=dK.transformPointArr([kI[2],kI[3]],"EPSG3857","BD09MC");kI=[ky[0],ky[1],kz[0],kz[1]]}kD.getTilesUrl=function(kK,kQ,kP){if(!kK||kQ<0||kQ<(T+kF)||kQ>(kE+kF)){kD.tileCache.clear();return null}if(kI.length===4){const kN=jt.tileToBoundRange({col:x,row:y,zoom:z,baseTileSize:256});var kO=e([kN.MC.getMin().lng,kN.MC.getMin().lat,kN.MC.getMax().lng,kN.MC.getMax().lat]);if(!kO){return null}}var kL="";if(kx){kL=kx;var kM=/[^\{}]*\{(.*)\}[^\}]*/;kL.match(kM);var kJ=[];if(RegExp.$1){kJ=RegExp.$1.split(",")}kL=kL.replace(/\{(.*)\}/,kJ[(kK.x+kK.y)%kJ.length]);kL=kL.replace(/\[x\]/gi,kC(kK.x,kK.y,kQ));kL=kL.replace(/\[y\]/gi,kH(kK.x,kK.y,kQ));kL=kL.replace(/\[z\]/gi,kA(kK.x,kK.y,kQ));kL=kL.replace(/\[b\]/gi,kG(kK.x,kK.y,kQ))}else{return null}return kL};function e(kJ){if(kI&&kI instanceof Array&&kI.length===4){if((kI[0]<=kJ[2]&&kI[1]<=kJ[3])&&(kI[2]>=kJ[0]&&kI[3]>=kJ[1])){return true}else{return false}}return true}return kD},compileExpress:function(i,e){var i=ej.ExpressParse.normalizePropertyExpression(i,e);return i},resolveStyle:function(kz){var kx=kz||{};if(kx.style){var ky={};if(!kx.layers||kx.layers.length===0){var kB=ej.LayerTypes.POINT;var i=ej.LayerTypes.LINE;var kA=ej.LayerTypes.FILL;if(kx.style[kB]){kx.style[kB].type="point"}if(kx.style[i]){kx.style[i].type="polyline"}if(kx.style[kA]){kx.style[kA].type="polygon"}}for(var T in kx.style){if(kx.style.hasOwnProperty(T)){var e=kx.style[T];this._styleFormat(e.type,e.painter,T,ky)}}this.styleExpress=ky}},_styleFormat:function(ky,e,i,kx){var kA={};var kB=c7[ky];if(!kB){return}for(var T in e){if(e.hasOwnProperty(T)){var kz=this.compileExpress(e[T],kB[T]);kA[T]=kz}}kx[i]={type:ky,painter:kA}},evaluateContext:function(e,T,kx){var i=e+"_"+T.getId();var ky=this._stateCube[i];if(ky){T.setState(ky)}else{T._state={}}return{properties:function(){return T&&T.getProperties()},featureState:kx===true?{}:(T&&T.getState())}},evaluates:function(i,kx,ky){if(!this.styleExpress||!this.styleExpress.hasOwnProperty(i)){return null}var kA=this.styleExpress[i].painter;var e={};for(var T in kA){if(kA.hasOwnProperty(T)){var kz=kA[T].evaluate(this.evaluateContext(i,kx,ky));e[T]=kz}}return e},_updateState:function(T,kx,e){if(T instanceof ju&&T.layerName&&T.id){var i=T.layerName+"_"+T.id;if(e){this._set(kx,this._stateCube,i)}else{this._stateCube[i]=kx}this._stateCube[i].rank=(this._stateCube[i].rank||0)+1}else{if(typeof T==="string"){if(e){this._set(kx,this._stateCube,T)}else{this._stateCube[T]=kx}this._stateCube[T].rank=(this._stateCube[T].rank||0)+1}}},updateState:function(ky,kz,e){var T=JSON.stringify(this._stateCube);if(!(kz&&typeof kz==="object"&&Object.keys(kz).length>0)){return}if(!e){this._stateCube={}}if(ky instanceof Array){for(var kx=0;kxthis.maxZoom){kK._featureMgr.clearData(this.layer.drawIndex);kK._featureMgr.clearLabelOverlayData(this.layer.drawIndex);kK._featureMgr.clearLabelData(this.layer.drawIndex);return}var kB=this.layer.getZoomState();if(T){this.thumbCache={};var kI=-1;this.layer.tileLabels=[];var kE=kK._customLabelMgr.virtualTiles["mvt_"+this.layer.drawIndex];if(kE&&kE.label){this.layer.tileLabels.push(kE.label)}for(var kG=0,kF=kz.length;kG=0.5){kM=true}else{if(kD<0.5&&e>=0.5){kM=true}else{if(kD>=0.5&&e<0.5){kM=true}}}if(kM){this.layer.cacheDataCollideLabels(0)}this.layer.LAST_CALC_ZOOM=kA}else{if(this.layer.tileLabels.length>0){this.layer.cacheDataCollideLabels(e8.Browser.ie?50:30)}}}else{this.layer.cacheDataCollideLabels(0)}return}for(var kG=0,kF=kz.length;kGe){return false}return true}}},_setThumbData:function(i,e,T){if(T===1){this._dataFitGrid(i,e,3)}else{if(T===-1){if(i&&i.status==="ready"){this.map._featureMgr.setData(i,this.layer.drawIndex,2);this._loadCacheLabel(e,i)}else{this._findChildZoomTile(e,3)}}}},_findParent:function(kx,kA){var T=this.minZoom;var e=kx.col;var kD=kx.row;var kC=kx.zoom;for(var kB=1;kB<=kA;kB++){var ky=this._getParentTiles(e,kD,kC,T);if(ky===null){continue}ky.tileSize=kx.tileSize;ky.tileTypeName=kx.tileTypeName;ky.transform=kx.transform;var kE=this.layer.getTileKey(ky);var kz=this.layer.tileCache.getData(kE);if(kz&&kz.status==="ready"){kz.key=kE;return kz}e=ky.col;kD=ky.row;kC=ky.zoom}return false},_findChild:function(i,kA){var kC=this.maxZoom;var e=i.col;var kD=i.row;var kB=i.zoom;var ky=this._getChildTiles(e,kD,kB,kC,kA);if(!ky){return false}for(var kx=0;kxkE){return null}var kD=Math.pow(2,kA);var e=kx*kD;var kC=kG*kD;var kB=kF+kA;var kH=[];for(var ky=0;ky0){kC.layer._checkLayerTilesLoaded();var kK=kC.layer.callbackDataQueue.shift();kC._setTileData(kK[0],kK[1],kK[2])}var kJ=new fU("onupdate");kC.map.dispatchEvent(kJ);kC.processDataTimer=null},0)}})},_loadTileData:function(i,e){var kx=i.col;var kB=i.row;var ky=i.zoom;var T=this.layer.getTilesUrl(new ft(kx,kB),ky,i);if(!T){return}var kA=this.layer.getTileKey(i);var kz=new XMLHttpRequest();kz.open("GET",T,true);kz.responseType="arraybuffer";kz.timeout=3000;kz.ontimeout=function(){e&&e(null,kA,i)};kz.onreadystatechange=function(kC){if(this.readyState===4){if(this.status===200){e&&e(kz.response,kA,i);return}if(this.status>=400||this.status===0){e&&e(null,kA,i)}else{e&&e(null,kA,i)}}};kz.send()},_tileDataCbk:function(ky,kA,i){var e=this.layer.tileCache.getData(kA);if(!e){return}var kz=this.layer.map;var T=this;if(!ky||typeof ky==="string"){e.status="init";e.reloadTimer=setTimeout(function(){if(e.retry<3){e.retry++;e.status="loading";T._loadTileData(i,function(kC,kD,kB){T._tileDataCbk(kC,kD,kB)})}else{e.status="ignore"}},3000);return}if(e.reloadTimer){clearTimeout(e.reloadTimer);e.reloadTimer=null}var kx=(function(kB){return function(){var kC=i.col;var kF=i.row;var kD=i.zoom;var kE="id_"+kC+"_"+kF+"_"+kD;e.tileInfo=i;e.tileData=T.mvt.readFeatures(kB,T,kz,{x:kC,y:kF,z:kD,g:T.gridModel,mc:T._opt.transform&&T._opt.transform.source==="BD09MC"?true:false});T._processLabelData(e);T.layer.callbackDataQueue.push([kA,e,kE]);if(T.processDataTimer){return}T.processDataTimer=setTimeout(function(){while(T.layer.callbackDataQueue.length>0){var kG=T.layer.callbackDataQueue.shift();T._setTileData(kG[0],kG[1],kG[2])}T.doOnceDraw();T.processDataTimer=null},200)}})(ky);kz.jobScheduler.addJob(kx)},_setTileData:function(T,e,i){e.status="ready";this.layer.tileCache.setData(T,e);if(this.layer.curViewTilesInfo[i]){e.dataType=h0}},_processLabelData:function(T){if(!T.tileData){return}T.label=T.tileData.getTileLabels();if(!T.label){return}if(T.label.status==="processing"){return}var i=T.tileInfo;var e=this._getTileTexImgKey(i);T.label.imgKey=e;T.label.status="processing";var kx=this;kx.layer.updateAllIconsTextureCoords(T);this.layer.labelProcessor.loadIconImages(T,function(kz){kx.layer.updateAllIconsTextureCoords(kz)},true);var ky=this.layer.map.tileMgr.getLabelTextCanvas();ky.drawCustomLabelsOnCanvas(T.label.fixedLabel,function(kz){if(kz){if(!T.label.textureHeights){T.label.textureHeights=[]}T.label.textureHeights[i.useZoom]=kz.height}kx.layer._doWorkAfterLabelImageLoad(T,kz,null,e)})},_getTileTexImgKey:function(i){var e="mvt_"+this.layer.drawIndex+"_"+i.col+"_"+i.row+"_"+i.zoom+"_";e=bF.getGUID(e);return e},_updateBRushCube:function(kA){var kC=kA.tileData;for(var T in kC){if(kC.hasOwnProperty(T)){var e=kC[T];for(var ky=0;ky0){kC=new fU("onmousemove");kC.value=kD;kx.map.platform.style.cursor=kx.map.config.overlayMoveCursor;e=true}else{kx.map.platform.style.cursor=kx.map.config.defaultCursor;if(!e||!kx._listeners.onmouseout||Object.keys(kx._listeners.onmouseout).length===0){return}kC=new fU("onmouseout");e=false}if(kC){kC.point=kE.point;kC.pixel=kE.pixel;kC.latLng=kE.latlng;kx.dispatchEvent(kC)}};this._layerClickEvent=function(kE){if(!kx.map||!kx._listeners){return}if((!kx._listeners.onclick&&!kx._listeners.dblclick)||(Object.keys(kx._listeners.onclick).length===0&&Object.keys(kx._listeners.dblclick).length===0)){return}var kC;var i=kE.point;var kD=kx.pickFeatures(i,kE.pixel);kC=new fU(kE.type);kC.point=i;kC.pixel=kE.pixel;kC.latLng=kE.latlng;kC.value=kD;kx.dispatchEvent(kC)};kA.addEventListener("onmousemove",this._layerMouseEvent);var kz=["onclick","dblclick"];for(var T=0;T0){this.layer.setZIndex(e)}},getZIndex:function(){if(this.layer){return this.layer.zIndex}},setZIndexTop:function(){if(this.layer){this.layer.setZIndexTop()}},setUpLevel:function(){if(this.layer){var e=this.layer._getAdjoinZIndex("up");if(this.layer.zIndex!==e){this.layer.setZIndex(e)}}},setDownLevel:function(){if(this.layer){var e=this.layer._getAdjoinZIndex("down");if(this.layer.zIndex!==e){this.layer.setZIndex(e)}}},toString:function(){return"MVTLayer"}});ej._generateTexture=function(kA,kz,T){var ky=document.createElement("canvas");var e;var kx;if(kz.strokeStyle==="dashed"){e=16;kx=e*8}else{if(kz.strokeStyle==="dotted"){e=32;kx=e*2}}ky.width=e;ky.height=kx;var i=ky.getContext("2d");i.fillStyle=kz.strokeColor;i.globalAlpha=kz.strokeOpacity;var kB=kz.strokeWeight*2;if(kz.strokeStyle==="dashed"){kB=ej._drawDashArrayTexture(i,e,kx,kz)}else{if(kz.strokeStyle==="dotted"){kB=ej._drawDottedTexture(i,e,kx,kz.strokeWeight)}}if(window.createImageBitmap&&!kz.sync){createImageBitmap(ky,{imageOrientation:"flipY"}).then(function(kC){T(null,{totalDashLen:kB,texture:kC,textureSize:[e,kx]})})}else{T(null,{totalDashLen:kB,texture:ky.toDataURL(),textureSize:[e,kx]})}};ej._drawDashArrayTexture=function(kD,kx,kz,T){var kB=T.dashArray;if(!kB){kD.fillRect(0,0,kx,kz/2);return T.strokeWeight*4}else{var kC=0;if(kB.length%2!==0){kB=kB.concat(kB)}for(var ky=0;ky19){ky(null);return}var e=this.getZoomState(kx);var T=this.calCoord(i,kx,e);this.curViewTilesInfo=this.calTilesOrders(T.sw,T.ne,kx);this.clearData();this.clearRefs();this.loadLayerData(this.curViewTilesInfo,e,true,ky)},calCoord:function(T,kx,i){if(T.length!==4){return}var e=gcoord.transform([T[0],T[1]],gcoord[this.inputCRS],gcoord.BD09MC);var ky=gcoord.transform([T[2],T[3]],gcoord[this.inputCRS],gcoord.BD09MC);if(ky[1]>19505879.362428114||e[1]<-15949096.637571886){ky[1]=19505879.362428114;e[1]=-15949096.637571886}this._mapCenter[kx]=new cF((e[0]+ky[0])/2,(e[1]+ky[1])/2);return{sw:e,ne:ky}},calTilesOrders:function(kC,kI,kE){var kF=this.tileType.getMercatorSize(kE,kE);var kA=[Math.floor(kC[0]/kF),Math.floor(kC[1]/kF)];var i=[Math.floor(kI[0]/kF),Math.floor(kI[1]/kF)];var kB=kA[0]-1;var kz=i[0]+2;var ky=kA[1]-1;var kH=i[1]+2;var kD=[];for(var kx=kB;kx0){this.zoomState=1}else{if(e<0){this.zoomState=-1}}this.lastZoom=i;return this.zoomState||0},loadLayerData:function(kE,kx,ky,kD){this.thumbCache={};if(ky){for(var kB=0,kz=kE.length;kB3){kC();return}var kD=kA.getTilesUrl(new ft(e.col,e.row),e.zoom,i);kx.src=kD;i++},this.retryTime)}kx.onload=function(){kC();kz&&kz(this,T)};kx.onerror=function(){kC();kz&&kz(null,T)};kx.src=kB;return kx},rasterTileDataCbk:function(ky,kx,kB){if(!ky||typeof ky==="string"){this.tileCache.removeData(kx);return}var i=ky.tileInfo;var T=i.col;var kD=i.row;var kC=i.zoom;var e=this.tileCache.getData(kx);if(!e){return}e.textureSource=ky;e.dataType=gU;e.tileInfo=i;e.status="ready";this.tileCache.setData(kx,e);var kz="id_"+T+"_"+kD+"_"+kC;var kA=false;if(this.curViewTilesInfo[kz]){e.png8=this.png8||false;e.key=kx;this.setData(e,2);kA=true}if(kA){this.calOutData(kB,e)}},getTilesUrl:function(ky,kF,i){var kA=i||0;var T=ky.x;var kG=ky.y;var kC=j8("ditu","normal");var kB=kC.udt;var kE=eu.B_NORMAL_MAP.tileUrls;var kz=Math.abs(T+kG+kA)%kE.length;var kD=kE[kz];if(T<0){T="M"+(-T)}if(kG<0){kG="M"+(-kG)}var kx="x="+T+"&y="+kG+"&z="+Math.floor(kF);kx+="&styles=pl&scaler=2&udt="+kB+"&from=jsapi3_0";var e=kD+"?qt=vtile&"+kx;return e},calOutData:function(kD,T){if(!T){for(var kA=0;kA0){e[0].sort(function(T,i){return T.tileInfo.useZoom-i.tileInfo.useZoom})}}});function dG(T,i){aU.call(this,i);if(!bZ(T)){throw new Error("createDOM参数类型错误,请检查是否为Function")}var e=i||{};this.config={};this.config.enableMassClear=false;this.config.minZoom=e.minZoom||3;this.config.maxZoom=e.maxZoom||21;this.config.offsetX=e.offsetX||0;this.config.offsetY=e.offsetY||0;this.config.coordinate=e.coordinate||"BD09";this.config.enableDraggingMap=e.enableDraggingMap||false;this.createDOM=T;this.data=e.data||null;this.overlaysList=[];hN.sendMessage(a1(4,3,13),["layer","overlay"])}dG.inherits(dg,"CustomHtmlLayer");e8.extend(dG.prototype,{initialize:function(i){this.map=i;var e=this;this._zoomShowEvent=function(kx){var T=e.map.getZoom();if(Te.config.maxZoom){e.hide()}else{e.show()}};this.addToMap();this.initEvent(i)},initEvent:function(){if(!this.overlaysList||!this.map){return}var e=this;this.map.addEventListener("zoomend",e._zoomShowEvent);this.map.on("destory",function(){e._distory()})},addEventListener:function(kx,kz){if(!this.overlaysList||!this.map){return}var ky=this.overlaysList;var e=this.overlaysList.length;for(var T=0;T0){for(var T=0;T0){for(var T=0;T0){for(var T=0;Tthis.config.maxZoom)){return}this.data=e;var T=gL.getType(e);if(T.toLowerCase()==="point"){var i=new gL({reference:this.config.coordinate});i.readFeaturesFromObject(e,{isPoints:true},function(kz){var ky=kx.render(kz);ky.id="cus_"+parseInt(Math.random()*1000000,10);kx.overlaysList.push(ky)});i=null}},updateData:function(e){this.removeAllOverlays();this.data=null;this.overlaysList=[];this.setData(e);this.addToMap();this.initEvent()},removeLayer:function(T){if(!(T instanceof dG)||!this.map){return}var kx=T.overlaysList;for(var e=0;e0){T._addBubbles(kB.bubble_data)}if(T.cusInLabelUids){T.map.removeLabelsFromMapTile(T.cusInLabelUids)}T._addLabels(kB.carport_data,"indoor")};if(this.spotFillCache[kx]&&this.spotFillCache[kx][this.currentFloor]&&i){var ky=this.spotFillCache[kx][this.currentFloor];var e=T._parseParkingData(ky);T.spotFillLayer.setData(e);kA(ky)}kg.request(function(kB){if(kB&&kB.result&&!kB.result["error"]&&kB.content){var kC=T._unzip(kB.content[kz]);if(!kC||!kC.carport_data){return}T.spotFillData=T._parseParkingData(kC);if(kC&&kC.carport_data.length>0){T.floorsCache[T.currentFloor]=kC;T.spotFillCache[kx]=T.floorsCache}if(!T.spotFillLayer){T._addLabels(kC.carport_data,"indoor");T._addBubbles(kC.bubble_data);T._initGraph("indoor");T._initEvent("indoor",T.options.callback);T.addToMap("indoor")}else{if(kC&&kC.carport_data.length>0){T.spotFillLayer.setData(T.spotFillData)}}kA(kC)}else{console.log("获取室内车位数据失败,请检查是否已开通智能停车服务!")}},{qt:D,ak:eY,building_uid:kx,floor:kz})},addToMap:function(e){if(!this.map){return}if(e==="indoor"&&this.spotFillLayer){this.map.addNormalLayer(this.spotFillLayer);this.spotFillLayer.setData(this.spotFillData)}else{if(this.spotOutFillLayer){this.map.addNormalLayer(this.spotOutFillLayer);this.spotOutFillLayer.setData(this.spotOutFillData)}}},_parseParkingData:function(kx){if(!kx){return}var T=kx.carport_data;var e={type:"FeatureCollection",features:[]};if(!T){var i={type:"Feature",properties:{},geometry:{type:"Polygon",coordinates:[]}};e.features.push(i);return e}T.forEach(function(ky){if(ky.geo&&typeof ky.geo==="string"){ky.geo=JSON.parse(ky.geo)}var kz={type:"Feature",properties:{center:[ky.x,ky.y],state:ky.carport_state,type:ky.carport_type,name:ky.carport_name,uid:ky.carport_uid,floor:ky.floor,angle:ky.angle,label:ky.label},geometry:{type:"Polygon",coordinates:[ky.geo]}};e.features.push(kz)});return e},_initEvent:function(i,T){if(!this.map){return}var e=this;if(i==="indoor"){this.spotFillLayer.addEventListener("click",function(kC){if(kC.value.dataIndex!==-1&&kC.value.dataItem){var kA=kC.value.dataItem;var kx=kA.properties.center;var ky=kA.properties.bubble_data;var kB="";switch(kA.properties.state){case 1:kB="占用";break;case 2:kB="空闲";break;case 0:kB="未知";break;default:kB="未知";break}var kz={center:kx,state:kB,properties:kA.properties};T&&T(kz)}})}else{this.spotOutFillLayer.addEventListener("click",function(kC){if(kC.value.dataIndex!==-1&&kC.value.dataItem){var kA=kC.value.dataItem;var kx=kA.properties.center;var ky=kA.properties.bubble_data;var kB="";switch(kA.properties.state){case 1:kB="占用";break;case 2:kB="空闲";break;case 0:kB="未知";break;default:kB="未知";break}var kz={center:kx,state:kB,properties:kA.properties};T&&T(kz)}})}this.map.on("destory",function(){e._distory()})},_addBubbles:function(kA){if(!kA){return}this.bubbleDatas=[];this.cusInBubbleUids=[];for(var kz=0;kz0){this.adjustZIndex(kx);kx._normalLayerMgr.sortLayer()}else{var e=kx._featureMgr.result.bkData;this.zIndex=e.length||1}var T={tileTypeName:this.getType?this.getType():"custom",dataType:this.toString(),ontology:this};kx._featureMgr.createLayer(this.zIndex,T);this.map=kx;this.gl=ky;this.onAdd(kx,ky);var i=this;kx.on("destroy",function(){i.onDestroy()})},adjustZIndex:function(i){if(i&&i._featureMgr){var e=i._featureMgr.result.bkData;while(e[this.zIndex]){this.zIndex+=1}}},_getAdjoinZIndex:function(ky){var T=this.zIndex;if(this.map&&this.map._featureMgr){var e=this.map._featureMgr.result.bkData;if(ky==="up"){for(var kx=this.zIndex+1;kx0;kx--){if(e[kx]){T=kx;break}}}}return T},setTargetZIndex:function(e){this.zIndex=e;if(this.map){this.map._normalLayerMgr.sortLayer()}},setZIndex:function(kB){kB=Math.abs(Math.floor(kB))||1;if(!kB||kB===this.zIndex){return}var ky=this.map._featureMgr.result.bkData;var kx=this.map.tileMgr.tileLayers;var kD=this.map._normalLayerMgr.layers;function kE(kJ){var kH=null;var kI=[kx,kD];for(var kF=0;kF-1){return e}continue}if(kz-1){return e}}if(kC>=0){var e=T(kC*4);if(e>-1){return e}}if(kz>=kB&&kC<0){break}}return -1},testEvent:function(){if(this.enablePicked||this.autoSelect){return true}return false},pick:function(kB,kA,kx){var T=this.gl;var kC=this.map.config.ratio;this.map._normalLayerMgr.saveFramebuffer();this.map._normalLayerMgr.bindFramebuffer(this.map._normalLayerMgr.pickFBO);this.map._normalLayerMgr.clear();this.map._webglPainter._camera._updatePolyLayerMatrix(this.center);var i=this.map._webglPainter._camera._modelViewMatrixLayer;var kz=mat4.create(Float64Array);mat4.multiply(kz,this.map._webglPainter.projMatrix,i);this.render(T,kz,{isPickRender:true});var e=new Uint8Array(4*this.pickWidth*this.pickHeight);T.readPixels(kB*kC-Math.floor(this.pickWidth/2),T.canvas.height-kA*kC-Math.floor(this.pickHeight/2),this.pickWidth,this.pickHeight,T.RGBA,T.UNSIGNED_BYTE,e);var ky=this.rgbToIndex(e);if(this.getPickedItem){var kD=this.getPickedItem(ky,kx)}this.map._normalLayerMgr.restoreFramebuffer();return kD},render:function(T,e,i){throw new Error("用户未实现render方法")},afterRender:function(i,e){},onDestroy:function(e,i){},onHide:function(e,i){},onShow:function(e,i){},doOnceDraw:function(){if(this.map){var e=new fU("onupdate");this.map.dispatchEvent(e)}},doRender:function(){if(!this.map){return false}var e=this.map.getZoom();if(this.visible){if(e>=this.minZoom&&e<=this.maxZoom){if(!this._status){this.onShow(this.map,this.gl);this._status=1}return true}}if(this._status){this.onHide(this.map,this.gl);this._status=0}return false},getZIndex:function(){if(this.zIndex===undefined){throw new Error("图层未添加到地图")}},getVisible:function(){return this.visible},setVisible:function(e){this.visible=e;this.doOnceDraw()},getMinZoom:function(){return this.minZoom},setMinZoom:function(e){if(e<=this.maxZoom){this.minZoom=e}},getMaxZoom:function(){return this.maxZoom},setMaxZoom:function(e){if(e>=this.minZoom){this.maxZoom=e}},dispatcher:function(ky,kx,T){var i=new fU(T);i.pixel=ky.pixel;i.latLng=ky.latlng;i.value=kx;this.dispatchEvent(i)},hasEvent:function(e){if(this.enablePicked){if(e.substr(0,2)!=="on"){e+="on"}if(this._listeners&&this._listeners[e]&&Object.keys(this._listeners[e]).length>0){return true}return false}return false},toString:function(){return"normal"}});function g4(i){i=i||{};const e={alpha:false,antialias:false};this.options=Object.assign({},e,i);if(!window.THREE){throw new Error("ThreeLayer requires THREE")}cu.call(this,this.options);hN.sendMessage(a1(4,3,18),["layer","threejs"])}g4.inherits(cu,"ThreeLayer");e8.extend(g4.prototype,{onAdd:function(ky,kx){if(!this.options){throw new Error("ThreeLayer requires reCreate")}const e=this.map=ky;this._state=d4.WebGLState.get(kx,e._webGLStateId);this.customCoords=e.toFormatCoords;const i=e.getContainer();const T=i.offsetWidth;const kD=i.offsetHeight;const kB=new THREE.PerspectiveCamera(35,T/kD,10,4000);kB.matrixAutoUpdate=false;const kC=new THREE.WebGLRenderer({context:kx,alpha:this.options.alpha,antialias:this.options.antialias});kC.setSize(T,kD);kC.autoClear=false;const kA=new THREE.Scene();this.scene=kA;this.camera=kB;this.renderer=kC;const kz=new THREE.AmbientLight(16777215,1);kA.add(kz);if(this.options.onInit){this.options.onInit.bind(this)(kC,kA,kB)}this.animate()},preRender:function(i,e){if(!this.options){throw new Error("ThreeLayer requires reCreate")}if(this.options.preRender){this.options.preRender.bind(this)(this.renderer,this.scene,this.camera)}},afterRender:function(i,e){if(!this.options){throw new Error("ThreeLayer requires reCreate")}if(this.options.afterRender){this.options.afterRender.bind(this)(this.renderer,this.scene,this.camera)}},render:function(ky,i,T){if(!this.options){throw new Error("ThreeLayer requires reCreate")}this.statesForange=this._state.getRealState();this.renderer.resetState();var e=this.map._webglMapCamera._updatePolyLayerMatrix();var kx=new THREE.Matrix4().fromArray(e);this.camera.matrixWorld=kx.invert();if(this.options.onRender){this.options.onRender.bind(this)(this.renderer,this.scene,this.camera)}else{this.renderer.render(this.scene,this.camera)}this.renderer.resetState();this._state.setState(this.statesForange)},triggerRepaint:function(){this.needsUpdate=true;this.animate()},triggerStop:function(){this.needsUpdate=false},animate:function(){if(this.needsUpdate){this.doOnceDraw()}else{return}var e=this;this.frameTimer=requestAnimationFrame(function(){e.animate()})},refreshMap:function(){if(this.map){this.doOnceDraw()}},convertLngLat:function(e){this.customCoords.setCenter(this.center);const i=this.customCoords.lngLatsToCoords([e]);return i[0]},add:function(e){this.scene.add(e);this.refreshMap()},remove:function(e){this.scene.remove(e);this.refreshMap()},getScene:function(){return this.scene},getCamera:function(){return this.camera},getRender:function(){return this.renderer},onDestroy:function(){if(this.options.onDestroy){this.options.onDestroy.bind(this)(this.renderer,this.scene,this.camera)}cancelAnimationFrame(this.frameTimer);this.customCoords=null;this._clearScene(this.scene);this.scene=undefined;this.camera=undefined;this.renderer.dispose();this.renderer=undefined;this.map=null;THREE.Cache.clear();this.options=null},onHide:function(){if(this.options.onHide){this.options.onHide.bind(this)(this.renderer,this.scene,this.camera)}},onShow:function(){if(this.options.onShow){this.options.onShow.bind(this)(this.renderer,this.scene,this.camera)}},getMap:function(){if(this.map){return this.map}return null},_clearScene:function(i){var e=this;i.traverse(function(T){e._clearGroup(T)})},_clearGroup:function(T){const e=function(kx){if(kx.geometry){kx.geometry.dispose()}if(kx.material&&kx.material.dispose){kx.material.dispose()}if(kx.material.texture&&kx.material.texture.dispose){kx.material.texture.dispose()}};const i=function(kx){var ky=kx.children.filter(function(kz){return kz});ky.forEach(function(kz){if(kz.children.length){i(kz)}else{if(kz.isMesh){e(kz)}}});ky=null};i(T)}});function ed(e){e=e||{};cu.call(this,e);this.base_opt={idKey:"id",crs:"BD09LL",isFlat:true,drawPart:1,selectedIndex:-1,selectedColor:"rgba(20, 20, 200, 1.0)"};this.setBaseOptions(e);this.loadModule=false;this._stateCube={};this.def=[];this.DEL_COUNT=100;this.delIndexs=[];var i=this;hj.load("mvtParse",function(){i._async()},true);this.select_color=this.getColorStyleForGL(this.base_opt.selectedColor);var T=new Int8Array(4);this.int32View=new Int32Array(T.buffer,0,1);this.float32View=new Float32Array(T.buffer,0,1)}ed.inherits(cu,"FeatureLayer");e8.extend(ed.prototype,{_async:function(){this.loadModule=true;this.resolveStyle();this.parseData()},compileExpress:function(i,e){var i=ej.ExpressParse.normalizePropertyExpression(i,e);return i},resolveStyle:function(){var e=this.style_opt||{};var kx=c7[this.type];if(this._appendStyle){kx=JSON.parse(JSON.stringify(kx));Object.assign(kx,this._appendStyle)}if(e&&this.type&&kx){var T={};for(var i in e){var kz=kx[i];if(e.hasOwnProperty(i)&&kz!==undefined){var ky=this.compileExpress(e[i],kz);T[i]=ky}}this.styleExpress=T}},evaluateContext:function(e,T){var i=T.id||e;var kx=this._stateCube[i];return{properties:function(){return T&&T.properties},featureState:kx||{}}},evaluates:function(i,kx){if(!this.styleExpress){return null}var kz=this.styleExpress;var e={};for(var T in kz){if(kz.hasOwnProperty(T)){var ky=kz[T].evaluate(this.evaluateContext(i,kx));e[T]=ky}}return e},_updateState:function(T,i,e){if(e){this._set(i,this._stateCube,T)}else{this._stateCube[T]=i}},_set:function(i,ky,T){var kx=ky[T]||(ky[T]={});for(var e in i){kx[e]=i[e]}},updateState:function(ky,kz,e){var T=JSON.stringify(this._stateCube);if(!(kz&&typeof kz==="object"&&Object.keys(kz).length>0)){return}if(!e){this._stateCube={}}if(ky instanceof Array){for(var kx=0;kx=this.DEL_COUNT){new Error("超出"+this.DEL_COUNT+"个限制")}var e=false;for(var kx=0;kx0){var kS=k0[k0.length-1];var kD=kS.geometry.coordinates;var kU=bi(kQ.lat-kD[1],kQ.lng-kD[0]);k0[k0.length-1].properties.endPoint=kQ.lng+","+kQ.lat;k0[k0.length-1].properties.rotation=kU;if(kY>1){var kM=k0[k0.length-2];var kN=kM.geometry.coordinates;kU=g2(kN,kD,[kQ.lng,kQ.lat]);k0[k0.length-1].properties.rotationPlus=Math.abs(kU)}}var kR=JSON.parse(JSON.stringify(kI));kR.index=k1;kR.line_node_type=kY===0?1:3;kR.startPoint=kY===0?"":kL.lng+","+kL.lat;kR.endPoint="";kR.rotationPlus=0;k0.push({type:"Feature",properties:kR,geometry:{coordinates:[kQ.lng,kQ.lat],type:"Point"}});kL=kQ;kP++}if(kP===1){k0.splice(k0.length-1,1)}if(kP>=2&&k0[k0.length-1].properties.endPoint===""){var kB=k0[k0.length-2];var T=kB.geometry.coordinates;var kA=k0[k0.length-1];var e=kA.geometry.coordinates;var kU=bi(e[1]-T[1],e[0]-T[0]);kR.rotation=kU;kR.line_node_type=2}}else{var kB=kz[0];var kZ=jt.convertLL2MC(new cF(kB[0],kB[1]));var kH=kz[1];var kX=jt.convertLL2MC(new cF(kH[0],kH[1]));var kA=kz[kz.length-1];var k3=jt.convertLL2MC(new cF(kA[0],kA[1]));var kO=kz[kz.length-2];var kE=jt.convertLL2MC(new cF(kO[0],kO[1]));var kT=[[kX,kZ],[k3,kE]];for(var kY=0;kY<2;kY++){var k2=[kT[kY][0].lng,kT[kY][0].lat];var kJ=[kT[kY][1].lng,kT[kY][1].lat];var kR=JSON.parse(JSON.stringify(kI));kR.index=k1;var kU=bi(k2[1]-kJ[1],k2[0]-kJ[0]);kR.rotation=kU;kR.line_node_type=kY===0?1:2;kR.startPoint=kY===0?"":k2.join(",");kR.endPoint=kY===0?kJ.join(","):"";kR.rotationPlus=0;k0.push({type:"Feature",properties:kR,geometry:{coordinates:kY===0?kJ:k2,type:"Point"}})}}if(this.base_opt.nodeMiddleShow&&kC+1<=k0.length){var ky=k0.length;for(var kW=kC+1;kW25)?6:e.nodeMinZoom;ed.call(this,e);if(e.nodeShow){var i=JSON.parse(JSON.stringify(e));i=Object.assign(i,{enablePicked:false,autoSelect:false,coorSysMc:true});this.attachNode=new aZ(i)}hN.sendMessage(a1(4,3,10),["layer","line"])}b0.Segment={START_POINT:1,END_POINT:2,BREAK_POINT:3,MIDDLE_POINT:4,1:1,2:2,3:3,4:4};b0.inherits(ed,"LineLayer");e8.extend(b0.prototype,{onAdd:function(e,i){if(this.attachNode){this.attachNode.onAdd(e,i)}if(!this.map){this.map=e;this.gl=i}if(!this.buffer){this.parseData()}},parseData:function(e){if(!this.loadModule||!this.styleExpress||!this.map||!this.map._normalLayerMgr){return}var T=this.getData();if(!T){return}var kx=this.dataset=this.formatData(T);this.dispatchEvent(new fU("ondataparsed"));var i=this.linesParse(kx.inner);this.lines=this.combineLine(i);if(!this.base_opt.nodeStrict){this.buffer=this.createBufferData(this.lines)}else{this.buffer=this.createBufferArrData(this.lines[0])}this.doOnceDraw()},linesParse:function(kK){var kC=[[],[]];var kz=0;var kG=-1;for(var kO=0;kO0){var kN=this.buildLineVertex(kP,kK[kO],kA,kF,e,kz);kC[0][kC[0].length]={index:kD,styleData:kN,textureKey:-1,texture:null,textureSize:null,zoomWithMap:true,start:aZ.hasMask(kB),end:aZ.hasMask(ky),overlay:{_config:{textureRepeat:true},_totalDashLen:null,}}}}var kL=kP.strokeWeight/2;var kM=this.getColorStyleForGL(kP.strokeColor,kP.strokeOpacity,false);if(kI>-1&&this.style_opt.linksLine&&this.style_opt.strokeColorControl instanceof Function){var kH=this.style_opt.strokeColorControl(kD,kI);kM=this.getColorStyleForGL(kH,undefined,false)}var kN=this.buildLineVertex(kP,kK[kO],kA,kL,kM,kz);var kH=this._generateTexture(kP)||{};var kJ=kH.value||null;var T={index:kD,styleData:kN,textureKey:kH.key||-1,texture:kJ?kJ.texture:null,textureSize:kJ?kJ.textureSize:null,zoomWithMap:true,start:this.base_opt.nodeMask&&aZ.hasMask(kB),end:this.base_opt.nodeMask&&aZ.hasMask(ky),overlay:{_config:{textureRepeat:true},_totalDashLen:kJ?kJ.totalDashLen:null,}};if(this.style_opt.borderCovered&&!this.base_opt.nodeStrict){kC[1][kC[1].length]=T}else{kC[0][kC[0].length]=T}if(kN[0]&&kN[0][0] instanceof Array){kz=kN[0][0][kN[0][0].length-1]/10||0}}return kC},combineLine:function(kz){var kF=[];var kx=[];var kL=[];for(var kB=0;kB0){var kH={};for(var kC=0;kC=0){var kJ=kz[0][kE];if(!kH[kC+1][kJ.textureKey]){kH[kC+1][kJ.textureKey]=[{style:[],styleData:[[],[]],index:[]}]}this._mergeOnePolylineData(kH[kC+1][kJ.textureKey],kJ);var e=kz[0][kE+1];if(e&&e.index===kD){if(!kH[kC+1][e.textureKey]){kH[kC+1][e.textureKey]=[{style:[],styleData:[[],[]],index:[]}]}this._mergeOnePolylineData(kH[kC+1][e.textureKey],e)}}}kL.push(ky)}kF[0]=kH}if(this.attachNode){var kI=this._pointGeoFilter(this.getData());var kG=JSON.parse(JSON.stringify(this.params||{}));kG.nodeStrictIndex=kL;this.attachNode.setData(kI,kG)}return kF},_findLineIndex:function(e,kx){for(var T=0;T0){for(var ky=0;ky0){for(var kx=0;kx65536){kG++;ky=e[kG]={style:[],styleData:[[],[]],index:[],texture:null,textureSize:null,zoomWithMap:null,overlay:null};i=ky.styleData[0];kD=ky.styleData[1];kC=0}if(ky.styleData[0].length===0){ky.texture=kI.texture;ky.textureSize=kI.textureSize;ky.zoomWithMap=kI.zoomWithMap;ky.overlay=kI.overlay}ky.index[ky.index.length]=kI.index;for(var kB=0;kB65536){kJ.push([kD,kH]);kD=[];kH=[]}gB.buildData(kF[kC],kz,kG,kD,kH,kB,ky,undefined,kA)}kJ.push([kD,kH]);return kJ},createBuffer:function(i){var T=13;var e=[{name:"a_pos",components:2,offset:0,type:"Float32"},{name:"a_normal",components:2,offset:8,type:"Float32"},{name:"a_color",components:4,offset:16,type:"Uint8",normalize:true},{name:"a_data",components:4,offset:20,type:"Float32"},{name:"a_id",components:1,offset:36,type:"Float32"}];return new B(i,{components:T,members:e},B.BufferType.VERTEX)},createBufferArrData:function(kH){var kE=[];var kF=0;for(var kK in kH){if(!kH.hasOwnProperty(kK)){continue}var kA=kH[kK];var kJ=[];for(var kx in kA){if(!kA.hasOwnProperty(kx)){continue}var kD=kA[kx];var kG=[];for(var kC=0;kCthis.base_opt.nodeMinZoom&&this.base_opt.nodeMask){kB.clear(kB.STENCIL_BUFFER_BIT);kB.stencilFunc(kB.ALWAYS,1,255);e.stencilOp(kB.KEEP,kB.KEEP,kB.REPLACE);kB.stencilMask(255);e.colorMask(false,false,false,false);kA.isMask=true;this.attachNode.render(kB,kx,kA);kB.stencilFunc(kB.NOTEQUAL,1,255);kB.stencilMask(0);e.stencilOp(kB.KEEP,kB.KEEP,kB.KEEP);e.colorMask(true,true,true,true)}for(var kz=0;kzthis.base_opt.nodeMinZoom){kB.clear(kB.STENCIL_BUFFER_BIT);kB.stencilMask(255);kB.stencilFunc(kB.ALWAYS,1,255);kA.isMask=false;this.attachNode.render(kB,kx,kA)}}return}if(this.buffer[0].length>0){if(this.style_opt.borderMask&&this.style_opt.borderCovered){kB.clear(kB.STENCIL_BUFFER_BIT);kB.stencilFunc(kB.ALWAYS,1,255);e.stencilOp(kB.KEEP,kB.KEEP,kB.REPLACE);kB.stencilMask(255);e.colorMask(false,false,false,false);for(var kz=0;kzthis.base_opt.nodeMinZoom&&this.base_opt.nodeMask){kA.clear(kA.STENCIL_BUFFER_BIT);kA.stencilFunc(kA.ALWAYS,1,255);e.stencilOp(kA.KEEP,kA.KEEP,kA.REPLACE);kA.stencilMask(255);e.colorMask(false,false,false,false);ky.isMask=true;this.attachNode.render(kA,T,ky);kA.stencilFunc(kA.NOTEQUAL,1,255);kA.stencilMask(0);e.stencilOp(kA.KEEP,kA.KEEP,kA.KEEP);e.colorMask(true,true,true,true)}for(var kx=0;kxthis.base_opt.nodeMinZoom){kA.clear(kA.STENCIL_BUFFER_BIT);kA.stencilMask(255);kA.stencilFunc(kA.ALWAYS,1,255);ky.isMask=false;this.attachNode.render(kA,T,ky)}},traceControl:function(i){if(this.style_opt.traceControl instanceof Function){var e=this.style_opt.traceControl(i);if(e instanceof Array&&e.length===i.length){return e}}return[]},_formatArrayBuffer:function(kx,i){var e;if(i){e=new Int32Array(this.DEL_COUNT)}else{e=new Int16Array(this.DEL_COUNT)}if(kx&&kx.length){var T=0;for(;T0){kz+=kD[ky-1].length}kA=hU(kD[ky].pointsArray,null,null,kz);for(var T=0,kC=kA.length;T=3?kL[0]:[0,0,0,0];if(kz.lastState.bound!==e){kK.uniform4fv(kz.uniforms.u_bound,e);kz.lastState.bound=e}var kO=kL.length>=3?kL[1]:0;if(kz.lastState.scale!==kO){kK.uniform1f(kz.uniforms.u_scale,kO);kz.lastState.scale=kO}var ky=kL.length>=3?kL[2]:[0,0];if(kz.lastState.offset!==ky){kK.uniform2fv(kz.uniforms.u_offset,ky);kz.lastState.offset=ky}var kC=this.base_opt.isFlat;if(kz.lastState.isFlat!==kC){kK.uniform1i(kz.uniforms.u_flat,kC);kz.lastState.isFlat=kC}var kJ=this.base_opt.drawPart||1;if(kz.lastState.drawPart!==kJ){kK.uniform1i(kz.uniforms.u_draw_part,kJ);kz.lastState.drawPart=kJ}var kB=kN._camera._far||4000;if(kz.lastState.cameraFar!==kB){kK.uniform1f(kz.uniforms.u_camera_far,kB);kz.lastState.cameraFar=kB}kK.uniform1i(kz.uniforms.u_pick_model,this.pickModel);if(kz.lastState.selectColor!==this.select_color){kK.uniform4fv(kz.uniforms.u_pick_color,this.select_color);kz.lastState.selectColor=this.select_color}if(kz.lastState.pickTag!==this.selectedIndex){kK.uniform1i(kz.uniforms.u_pick_tag,this.selectedIndex+1);kz.lastState.pickTag=this.selectedIndex}var kM=new Int16Array(this.DEL_COUNT);if(this.delIndexs.length){for(var kI=0;kI=0){if(!kD[T]){kD[T]=[]}kD[T].push(ky)}}}return kD},_findTargetGroup:function(T,ky){for(var kx=0;kx65536){kG.push({vertex:[],indices:[]});kB=kG[kG.length-1].vertex;kE=kG[kG.length-1].indices}for(var kz=0;kz<4;kz++){kB.push(T.position[0],T.position[1]);var kx=this.int8ArrayToFloat([T.anchor,kz,T.shapeType,T.lineNodeType]);kB.push(kx);kB.push(T.size,T.scale,T.rotation*Math.PI/180);kB.push(T.offset[0],T.offset[1]);var e=this.getColorStyleForGL(T.color,undefined,true);var kF=this.getColorStyleForGL(T.strokeColor,undefined,true);kB.push(this.rgb2value(e),T.opacity,this.rgb2value(kF),T.strokeWeight);if(T.startPoint){kB.push(T.startPoint[0],T.startPoint[1])}else{kB.push(0.1,0.1)}if(T.endPoint){kB.push(T.endPoint[0],T.endPoint[1])}else{kB.push(0.1,0.1)}kB.push(T.index,T.id)}var ky=(kE.length/6)*4;kE.push(ky,ky+2,ky+1,ky,ky+3,ky+2)}return kG},createBuffer:function(i){var T=18;var e=[{name:"a_pos",components:2,offset:0,type:"Float32"},{name:"a_shape",components:4,offset:8,type:"Uint8"},{name:"a_transform",components:3,offset:12,type:"Float32"},{name:"a_offset",components:2,offset:24,type:"Float32"},{name:"a_data",components:4,offset:32,type:"Float32"},{name:"a_start",components:2,offset:48,type:"Float32"},{name:"a_end",components:2,offset:56,type:"Float32"},{name:"a_index",components:1,offset:64,type:"Float32"},{name:"a_id",components:1,offset:68,type:"Float32"}];return new B(i,{components:T,members:e},B.BufferType.VERTEX)},createBufferData:function(kA,e){var kB=[];e=e||0;for(var kx=0;kxkA.renderIndex){for(var ky=0;ky65536){e.push({vertex:[],indices:[]});kx=e[e.length-1].vertex;kz=e[e.length-1].indices}for(var T=3;T>=0;T--){kx.push(ky.position[0],ky.position[1]);kx.push(ky.sizes[0],ky.sizes[1],ky.anchors[0],ky.anchors[1]);kx.push(ky.scale,ky.rotation*Math.PI/180,4-T,ky.opacity);kx.push(ky.offset[0],ky.offset[1],ky.texcoord[T*2],ky.texcoord[T*2+1]);kx.push(ky.index,ky.id)}var i=(kz.length/6)*4;kz.push(i,i+2,i+1,i,i+3,i+2)},createBuffer:function(i){var T=14;var e=[{name:"a_pos",components:2,offset:0,type:"Float32"},{name:"a_shape",components:4,offset:8,type:"Float32"},{name:"a_style",components:4,offset:24,type:"Float32"},{name:"a_data",components:4,offset:40,type:"Float32"},{name:"a_index",components:1,offset:56,type:"Float32"},{name:"a_id",components:1,offset:60,type:"Float32"}];return new B(i,{components:T,members:e},B.BufferType.VERTEX)},createBufferData:function(kz){var kA=[];for(var T=0;TkA.renderIndex){for(var ky=0;ky=9000&&kD.current_city["code"]<=9378){kD.current_city["name"]="台湾省"}if(kD.current_city["code"]>=20000&&kD.current_city["code"]<=20499){kD.current_city["name"]="新加坡"}if(kD.current_city["code"]>=20500&&kD.current_city["code"]<=25999){kD.current_city["name"]="泰国"}if(kD.current_city["code"]>=26000&&kD.current_city["code"]<=29999){kD.current_city["name"]="日本"}if(kD.current_city["code"]>=30000&&kD.current_city["code"]<=30999){kD.current_city["name"]="韩国"}if(kD.current_city["code"]>=31000&&kD.current_city["code"]<=37000){kD.current_city["name"]="亚太"}if(kD.current_city["code"]>=46609&&kD.current_city["code"]<=52505){kD.current_city["name"]="欧洲"}if(kD.current_city["code"]>=39509&&kD.current_city["code"]<=53500){kD.current_city["name"]="南美洲"}if(kD.current_city["code"]>=54000&&kD.current_city["code"]<=70000){kD.current_city["name"]="北美洲"}if(kD.current_city["code"]===54003&&kD.current_city["code"]>=60731&&kD.current_city["code"]<=61123){kD.current_city["name"]="美国"}if(kD.current_city["code"]===54015||kD.current_city["code"]>=57970&&kD.current_city["code"]<=60223){kD.current_city["name"]="加拿大"}if(kD.current_city["code"]===54025||kD.current_city["code"]>=54338&&kD.current_city["code"]<=57374){kD.current_city["name"]="墨西哥"}e.enableRequest=true;if(kD&&kD.current_city){var kC=kD.current_city["name"];var kB=kD.current_city["code"];if(kB!==i.cCode){var kA=new fU("oncitychange");kA.name=kC;kA.code=kB;i.dispatchEvent(kA)}i.cityName=kC;i.cCode=kB;if(!b4()){c9(i)}}},{qt:"cen",b:T.lng+","+T.lat+";"+ky.lng+","+ky.lat,l:kz},"","",true)};i.addEventListener("load",function(T){e.request()});i.addEventListener("moveend",function(T){e.request()});i.addEventListener("zoomend",function(T){e.request()});e.request()});function jD(T){var e={};var i=new ke(e);T.addControl(i);return i}function M(i){if(i.temp.copyadded){return}i.temp.copyadded=true;if(!i.cpyCtrl){var kx=new jk(2,2);i.config.cpyCtrlOffset=kx;if(b4()){kx.width=72;kx.height=0}var T=new gj({offset:kx,printable:true});i.cpyCtrl=T}if(!b4()){c9(i);i.addEventListener("maptypechange",function(){c9(i)})}i.addControl(T);var e=new bI();e._opts={printable:true};i.logoCtrl=e;i.addControl(e);i.addEventListener("resize",function(){if(this.getSize().width>=300&&i.getSize().height>=100){e.show();T&&T.setOffset(i.config.cpyCtrlOffset)}else{e.hide();T&&T.setOffset(new jk(4,2))}});if(i.getSize().width>=300&&i.getSize().height>=100){e.show()}else{e.hide();T.setOffset(new jk(4,2))}i.addEventListener("oncopyrightoffsetchange",function(ky){i.logoCtrl.setOffset(ky.target.logo);i.cpyCtrl.setOffset(ky.target.cpy)});i.dispatchEvent(new fU("oncopyrightaddend"))}function c9(kM){if(!kM.cpyCtrl){var kU=new jk(2,2);if(b4()){kU.width=72;kU.height=0}var kP=new gj({offset:kU,printable:true});kM.cpyCtrl=kP}var k3=kM.cityName||"中国";var kN=kM.getMapType();var kO=["常州市","南昌市","乌鲁木齐市","无锡市","福州市","泉州市","珠海市","贵阳市"];var kG=["北京市","上海市","广州市","深圳市","宁波市","石家庄市","沈阳市","长春市","青岛市","温州市","台州市","金华市","佛山市","中山市","昆明市","南宁市","苏州市","西安市","济南市","郑州市","合肥市","呼和浩特市","杭州市","成都市","武汉市","长沙市","天津市","南京市","重庆市","大连市","东莞市","厦门市"];var kI=["香港特别行政区"];var kC=["台湾省"];var kV=["日本"];var k1=["韩国"];var kQ=["泰国"];var kT=["亚太"];var kD=["新加坡"];var k2=["欧洲"];var kx=["南美洲"];var kY=["北美洲"];var T=["美国"];var kS=["墨西哥"];var kA=["加拿大"];for(var kZ in kO){if(kO[kZ]===k3){var kJ=true;break}}for(var kZ in kG){if(kG[kZ]===k3){var ky=true;break}}for(var kZ in kI){if(kI[kZ]===k3){var k5=true;break}}if(kC[0]===k3){var kX=true}if(kD[0]===k3){var i=true}if(kV[0]===k3){var kF=true}if(k1[0]===k3){var kL=true}if(kQ[0]===k3){var kK=true}if(kT[0]===k3){var kB=true}if(k2[0]===k3){var kH=true}if(kx[0]===k3){var kE=true}if(kY[0]===k3){var e=true}if(T[0]===k3){var k0=true}if(kA[0]===k3){var kW=true}if(kS[0]===k3){var kz=true}var k4=["© 2023 Baidu - GS(2023)3206号 - 甲测资字11111342 - 京ICP证030173号 - Data © "];var kR="rgba(255, 255, 255, 0.701961)";if(kM.getZoom()<=9){k4=["© 2023 Baidu - GS(2023)3206号 - 甲测资字11111342 - 京ICP证030173号 - Data © "]}else{if(kX){k4=["© 2023 Baidu - GS(2023)3206号 - 甲测资字11111342 - 京ICP证030173号 - Data © "]}else{if(kF||kL){k4=["© 2023 Baidu - GS(2023)3206号 - 甲测资字11111342 - 京ICP证030173号 - Data © "]}else{if(i||kK){k4=["© 2023 Baidu - GS(2023)3206号 - 甲测资字11111342 - 京ICP证030173号 - Data © "]}else{if(kB){k4=["© 2023 Baidu - GS(2023)3206号 - 甲测资字11111342 - 京ICP证030173号 - Data © "]}else{if(kH){k4=["© 2023 Baidu - GS(2023)3206号 - 甲测资字11111342 - 京ICP证030173号 - Data © "]}else{if(kE){k4=["© 2023 Baidu - GS(2023)3206号 - 甲测资字11111342 - 京ICP证030173号 - Data © "]}else{if(e){k4=["© 2023 Baidu - GS(2023)3206号 - 甲测资字11111342 - 京ICP证030173号 - Data © "]}}}}}}}}if(kM.getZoom()<=9){k4.push("百度智图");k4.push(' & OpenStreetMap');k4.push(' & HERE');if(kN===BMAP_SATELLITE_MAP||kN===BMAP_HYBRID_MAP){k4.push(' & ESO');kR="rgba(0,0,0,.7)"}}else{if(kF||kL){k4.push('OpenStreetMap')}else{if(i||kK){k4.push('HERE')}else{if(kB){k4.push('HERE');k4.push(' & Mapbox')}else{if(kH){k4.push('OpenStreetMap');k4.push(' & Mapbox')}else{if(kE){k4.push('OpenStreetMap');k4.push(' & Mapbox')}else{if(k0||kz||kW){k4.push('HERE');k4.push(' & Mapbox')}else{if(e){k4.push('OpenStreetMap');k4.push(' & Mapbox')}else{k4.push("百度智图");if(kJ){k4.push(' & PalmCity')}if(k5){k4.push(' & MapKing')}if(kX){k4.push(' & HERE');k4.push(' & 樂客LocalKing')}if(kN===BMAP_SATELLITE_MAP||kN===BMAP_HYBRID_MAP){kR="rgba(0,0,0,.7)"}}}}}}}}}k4.unshift('');k4.push("");k4=k4.join("");kM.cpyCtrl.addCopyright({id:1,content:k4})}function ke(e){this["defaultAnchor"]=BMAP_ANCHOR_TOP_RIGHT;this["defaultOffset"]=e.defaultOffset||new jk(90,6);this._cZIndex=9999;this._visible=false}ke.prototype=new gW();ke.prototype.initialize=function(ky){this._map=ky;var kx=this;var e=b5("div");var i=e.style;i.left=i.top="50%";i.display="none";i.padding="24px";i.overflow="visible";i.position="absolute";i.width="50%";i.maxWidth="360px";i.transform="translate(-50% , -50%)";i.zIndex="9999";i.background="#fff";i.userSelect="none";var kz=b5("span",{style:"margin-top: 12px;\n margin-bottom: -12px;\n margin-left: calc(100% - 48px);\n width: 56px;\n height: 32px;\n font-size: 14px;\n text-align: center;\n line-height: 32px;\n display: block;\n cursor: pointer;\n background: #3894FF;\n border: solid 1px #3f51b53b;\n color: #fff;\n border-radius: 3px;"});kz.innerText="确定";kz.addEventListener("click",function(){kx.hide()});var T=b5("div");var kA=T.style;kA.position="relative";kA.width="100%";kA.height="100%";kA.color="#000";kA.fontSize="14px";kA.wordBreak="break-all";e.appendChild(T);e.appendChild(kz);ky.getContainer().appendChild(e);return e};ke.prototype._setPosition=function(){};ke.prototype.update=function(e){if(!this.isVisible()){this._container.firstChild.innerText=e;this.show()}};window.BMAP_STATUS_SUCCESS=0;window.BMAP_STATUS_CITY_LIST=1;window.BMAP_STATUS_UNKNOWN_LOCATION=2;window.BMAP_STATUS_UNKNOWN_ROUTE=3;window.BMAP_STATUS_INVALID_KEY=4;window.BMAP_STATUS_INVALID_REQUEST=5;window.BMAP_STATUS_PERMISSION_DENIED=6;window.BMAP_STATUS_SERVICE_UNAVAILABLE=7;window.BMAP_STATUS_TIMEOUT=8;window.BMAP_ROUTE_TYPE_WALKING=2;window.BMAP_ROUTE_TYPE_DRIVING=3;window.BMAP_ROUTE_TYPE_RIDING=6;window.BMAP_ROUTE_STATUS_NORMAL=0;window.BMAP_ROUTE_STATUS_EMPTY=1;window.BMAP_ROUTE_STATUS_ADDRESS=2;var D="carport_list";var d2="carport_auth";var dm="cur";var ac="cen";var L="s";var dF="con";var dx="bd";var cZ="nb";var hf="bt";var aR="nav";var ir="walk";var f3="gc";var d6="rgc";var N="dec";var iJ="iploc";var gX="bse";var gs="nse";var dj="s";var ey="bsl";var f0="bda";var ev="sa";var bd="nba";var iz="drag";var jl="ext";var jZ="exts";var j2="hip";var hR="ride";var kd="drct";var b9="ldt";var fz=2;var bm=4;var ga=7;var iA=11;var cg=12;var e3=14;var cW=15;var em=18;var aD=20;var bc=21;var K=19;var a=23;var iV=26;var aF=28;var gt=31;var ff=35;var iK=44;var bk=45;var aA=46;var jX=47;var gy=-1;var bf=0;var bE=1;var jq=2;var dV=3;window.BMAP_POI_TYPE_NORMAL=0;var cJ=1;var iC=2;BMapGL.I=e8.I;var bO={};bO.removeHtml=function(e){e=e.replace(/<\/?[^>]*>/g,"");e=e.replace(/[ | ]* /g," ");return e};bO.parseGeoExtReg1=function(e){return e.replace(/([1-9]\d*\.\d*|0\.\d*[1-9]\d*|0?\.0+|0|[1-9]\d*),([1-9]\d*\.\d*|0\.\d*[1-9]\d*|0?\.0+|0|[1-9]\d*)(,)/g,"$1,$2;")};bO.parseGeoExtReg2=function(i,e){var T=new RegExp("(((-?\\d+)(\\.\\d+)?),((-?\\d+)(\\.\\d+)?);)(((-?\\d+)(\\.\\d+)?),((-?\\d+)(\\.\\d+)?);){"+e+"}","ig");return i.replace(T,"$1")};var dN=0;var dl=1;var W=2;bO.unique=function(T){var kz=false;var ky=[];var kA={};for(var kx=0,e=T.length;kx21){T=21}return T};bO.parseGeo=function(kA,kD){if(typeof kA!="string"||!kA){return}var kF=kA.split("|");var e;var ky;var T;if(kF.length==1){e=ca(kA)}else{e=ca(kF[2]);ky=ca(kF[0]);T=ca(kF[1]);if(!kD){return e}}var kB={type:e.geoType};if(kD){switch(kB.type){case W:var kC=new cF(e.geo[0][0],e.geo[0][1]);var kE=jt.convertMC2LL(kC);kB.point=kE;kB.points=[kE];break;case dl:kB.points=[];var kG=e.geo[0];for(var kz=0,kx=kG.length-1;kz0.25&&kH<1){kH=1}else{if(kH>32){kH=32}}}}var kC=kQ.split("|");if(kC.length==1){var kx=ca(kC[0]);return{type:kx.type,bound:"",points:kx.geo.join(",")}}else{if(kC.length>1){var kI=kQ.split(";.=");var kE=[];var ky=[];var kJ=0;var kN=kI.length;for(var kK=0;kK1){if(kK==0){kP=kP+";"}if(kK>0&&kK0){kO=bO.parseGeoExtReg2(kO,kH)}ky.push(kO)}if(kN<=1){ky=ky.join(";")}if(kN==2){var T=ky[0]+";"+ky[1];var kA=T.split(";");var e=[];for(var kK=0;kKdh){e=dh-e}if(kB>dh){kB=dh-kB}kx.push(kx[T-2]+e);kx.push(kx[T-1]+kB);return 0}function dE(i){var e=i.charCodeAt(0);if(i>="A"&&i<="Z"){return e-"A".charCodeAt(0)}else{if(i>="a"&&i<="z"){return(26+e-"a".charCodeAt(0))}else{if(i>="0"&&i<="9"){return(52+e-"0".charCodeAt(0))}else{if(i=="+"){return 62}else{if(i=="/"){return 63}}}}}return -1}bO.pathToPoints=function(kz){var kx=[];if(typeof kz!=="string"){return kx}else{var ky=kz.split(";");for(var T=0;TcI.MAX_PAGE_CAPACITY?cI.DEFAULT_PAGE_CAPACITY:e)}else{this._opts.pageCapacity=cI.DEFAULT_PAGE_CAPACITY}},getPageCapacity:function(){return this._opts.pageCapacity},toString:function(){return"LocalSearch"}});function bn(i){this._opts={};e8.extend(this._opts,i);this._queryList=[];var e=this;hj.load("otherSearch",function(){e._asyncSearch()})}bn.inherits(dg,"Geocoder");e8.extend(bn.prototype,{getPoint:function(e,T,i){this._queryList.push({method:"getPoint",arguments:[e,T,i]})},getLocation:function(e,T,i){this._queryList.push({method:"getLocation",arguments:[e,T,i]})},toString:function(){return"Geocoder"}});function c4(e){e=e||{};this.config={timeout:e.timeout||1000*10,maximumAge:e.maximumAge||0,enableHighAccuracy:e.enableHighAccuracy===undefined?true:e.enableHighAccuracy,SDKLocation:e.SDKLocation||false};this._pendingCalls=[];var i=this;hj.load("otherSearch",function(){var T=i._pendingCalls.length;for(var kx=0;kx=BMAP_TRANSIT_POLICY_RECOMMEND&&e<=BMAP_TRANSIT_POLICY_FIRST_SUBWAYS){this._opts.policy=e}else{this._opts.policy=BMAP_TRANSIT_POLICY_RECOMMEND}},setIntercityPolicy:function(e){if(e>=BMAP_INTERCITY_POLICY_LEAST_TIME&&e<=BMAP_INTERCITY_POLICY_CHEAP_PRICE){this._opts.intercityPolicy=e}else{this._opts.intercityPolicy=BMAP_INTERCITY_POLICY_LEAST_TIME}},setTransitTypePolicy:function(e){if(e>=BMAP_TRANSIT_TYPE_POLICY_TRAIN&&e<=BMAP_TRANSIT_TYPE_POLICY_COACH){this._opts.transitTypePolicy=e}else{this._opts.transitTypePolicy=BMAP_TRANSIT_TYPE_POLICY_TRAIN}},_internalSearch:function(i,e){this._queryList.push({method:"_internalSearch",arguments:[i,e]})},search:function(i,e){this._queryList.push({method:"search",arguments:[i,e]})},setPageCapacity:function(e){if(typeof e==="string"){e=parseInt(e,10);if(isNaN(e)){this._opts.pageCapacity=eX.MAX_PAGE_CAPACITY;return}}if(typeof e!=="number"){this._opts.pageCapacity=eX.MAX_PAGE_CAPACITY;return}if(e>=1&&e<=eX.MAX_PAGE_CAPACITY){this._opts.pageCapacity=Math.round(e)}else{this._opts.pageCapacity=eX.MAX_PAGE_CAPACITY}},toString:function(){return"TransitRoute"},_shortTitle:function(e){return e.replace(/\(.*\)/,"")}});window.BMAP_HIGHLIGHT_STEP=1;window.BMAP_HIGHLIGHT_ROUTE=2;var cN=function(e,kx){j4.call(this,e,kx);this._overlays=[];this._curIndex=-1;this._queryList=[];var T=this;var i=this._opts.renderOptions;if(i.highlightMode!==BMAP_HIGHLIGHT_STEP&&i.highlightMode!==BMAP_HIGHLIGHT_ROUTE){i.highlightMode=BMAP_HIGHLIGHT_STEP}this._enableDragging=this._opts.renderOptions.enableDragging?true:false;hj.load("route",function(){T._asyncSearch()},true);if(this.init_d){this.init_d()}};cN.ROAD_TYPE=["","环岛","无属性道路","主路","高速连接路","交叉点内路段","连接道路","停车场内部道路","服务区内部道路","桥","步行街","辅路","匝道","全封闭道路","未定义交通区域","POI连接路","隧道","步行道","公交专用道","提前右转道"];e8.inherit(cN,j4,"DWRoute");e8.extend(cN.prototype,{search:function(T,e,i){this._queryList.push({method:"search",arguments:[T,e,i]})}});var i3=function(e,T){j4.call(this,e,T);this._overlays=[];this._queryList=[];var i=this;this.map=T.renderOptions.map;this._enableDragging=this._opts.renderOptions.enableDragging?true:false;this._menu=new BMapGL.ContextMenu();this._menu.addItem(new ie("删除该点",function(kz,ky,kx){i._deleteVia(kx.curNo-1)},60));this.map.addContextMenu(this._menu,true);hj.load("route",function(){i._asyncSearch()},true);if(this.init_d){this.init_d()}};e8.inherit(i3,j4,"LineLayerRoute");e8.extend(i3.prototype,{search:function(T,e,i){this._queryList.push({method:"search",arguments:[T,e,i]})}});window.BMAP_DRIVING_POLICY_DEFAULT=0;window.BMAP_DRIVING_POLICY_AVOID_HIGHWAYS=3;window.BMAP_DRIVING_POLICY_FIRST_HIGHWAYS=4;window.BMAP_DRIVING_POLICY_AVOID_CONGESTION=5;window.BMAP_TRAFFICE_STATUS_NONE=0;window.BMAP_TRAFFICE_STATUS_NORMAL=1;window.BMAP_TRAFFICE_STATUS_SLOW=2;window.BMAP_TRAFFICE_STATUS_JAM=3;function cy(e,i){cN.call(this,e,i);i=i||{};this._opts._enableTraffic=i.enableTraffic||false;this.setPolicy(i.policy);this.QUERY_TYPE=aR;this.RETURN_TYPE=aD;this.ROUTE_TYPE=BMAP_ROUTE_TYPE_DRIVING;hN.sendMessage(a1(4,4,1,1),["service","drive","overlay"])}function gc(e,i){i3.call(this,e,i);i=i||{};this.setPolicy(i.policy);this.QUERY_TYPE=aR;hN.sendMessage(a1(4,4,1,2),["service","drive","layer"])}e8.inherit(gc,i3,"DrivingRouteLine");e8.inherit(cy,cN,"DrivingRoute");cy.prototype.setPolicy=function(e){if(e>=BMAP_DRIVING_POLICY_DEFAULT&&e<=BMAP_DRIVING_POLICY_AVOID_CONGESTION){this._opts.policy=e}else{this._opts.policy=BMAP_DRIVING_POLICY_DEFAULT}};gc.prototype.setPolicy=function(e){if(e>=BMAP_DRIVING_POLICY_DEFAULT&&e<=BMAP_DRIVING_POLICY_AVOID_CONGESTION){this._opts.policy=e}else{this._opts.policy=BMAP_DRIVING_POLICY_DEFAULT}};function fA(e,i){cN.call(this,e,i);this.QUERY_TYPE=ir;this.RETURN_TYPE=gt;this.ROUTE_TYPE=BMAP_ROUTE_TYPE_WALKING;this._enableDragging=false;hN.sendMessage(a1(4,4,4),["service","walk"])}e8.inherit(fA,cN,"WalkingRoute");function dc(e,i){cN.call(this,e,i);this.QUERY_TYPE=hR;this.ROUTE_TYPE=BMAP_ROUTE_TYPE_RIDING;this._enableDragging=false;hN.sendMessage(a1(4,4,3),["service","ride"])}e8.inherit(dc,cN,"RidingRoute");function Z(e,i){i3.call(this,e,i);i=i||{};this.QUERY_TYPE=b9;this.setPolicy(i.policy);hN.sendMessage(a1(4,4,2),["service","truck"])}e8.inherit(Z,i3,"TruckRoute");Z.prototype.setPolicy=function(e){if(e>=BMAP_DRIVING_POLICY_DEFAULT&&e<=BMAP_DRIVING_POLICY_AVOID_CONGESTION){this._opts.policy=e}else{this._opts.policy=BMAP_DRIVING_POLICY_DEFAULT}};window.BMAP_MODE_DRIVING="driving";window.BMAP_MODE_TRANSIT="transit";window.BMAP_MODE_WALKING="walking";window.BMAP_MODE_NAVIGATION="navigation";var a8={web:"//api.map.baidu.com/direction?",android:"bdapp://map/direction?",ios:"baidumap://map/direction?"};function i0(e){this.opts=e||{}}e8.extend(i0.prototype,{routeCall:function(kx,e,T){var i=this;hj.load("route",function(){i._asyncSearch(kx,e,T)})}});function ei(){return Pano.getStreetViewCoverageLayer(bF)}function eZ(){Pano.PanoramaService.call(this)}e8.inherit(eZ,Pano.PanoramaService,"PanoramaService");e8.extend(eZ.prototype,{getPanoramaById:function(T,i){var e=this;this.getPanoById(T,function(kx){i&&i(e._makeData(kx))})},getPanoramaByLocation:function(e,T){e=jt.convertLL2MC(e);var i=this;this.getPanoByLocation(e,50,function(kx){T&&T(i._makeData(kx))})},_makeData:function(T){if(!T){return null}var i={};var e=T.content[0];i.description=e.Rname||e.Info||"";i.id=e.ID;i.pointX=e.X/100;i.pointY=e.Y/100;i.position=jt.convertMC2LL(new cF(i.pointX,i.pointY));return i}});function fq(){if(window.PANORAMA_URL){return Pano.getPanoControl(bF,{imgPath:E.imgPath,tileBaseUrl:E.panoTilePath,})}return Pano.getPanoControl(bF)}function R(T,e){if(!e){return}this.content=T;if(e.position&&!Array.isArray(e.position)){e.position=jt.convertLL2MC(e.position);this.position=e.position;this.hideDistance=!!e.hideDistance}else{this.hideDistance=true}var i=this._createDom();Pano.PanoOverlay.call(this,e.position,{dom:i,altitude:e.altitude,})}e8.inherit(R,Pano.PanoOverlay,"PanoramaLabel");e8.extend(R.prototype,{init:function(e){var i=this;this._pano=e;this.updatedDistance();Pano.PanoOverlay.prototype.init.call(this,e);this._pano.on("dataload",function(T){i.updatedDistance()})},_createDom:function(){var kx=this.content;var kA=document.createElement("div");var i=kA.style;i.position="absolute";i.backgroundColor="rgba(29, 29, 29, 0.8)";i.padding="7px 0";i.height="19px";i.font="16px arial";i.color="white";i.whiteSpace="nowrap";i.borderRadius="4px";var e=document.createElement("div");e.style["float"]="left";e.style["lineHeight"]="19px";kA.appendChild(e);var T=document.createElement("span");T.style.margin="0 14px";T.innerText=kx;e.appendChild(T);if(!this.hideDistance){var kz=document.createElement("span");kz.style.color="color:rgba(255,255,255,0.3)";kz.innerText="|";e.appendChild(kz);var ky=document.createElement("span");ky.style.margin="0 8px";ky.style.color="#60c7fa";ky.style.fontSize="12px";ky.innerText="0米";e.appendChild(ky);this._distanceDom=ky}this._dom=kA;this._titleDom=T;return kA},updatedDistance:function(){if(this.hideDistance){return}var T=0;if(this._pano){var i=this._pano.position;var e=this.position;if(i&&!i.equals(e)){T=jt.getDistanceByMC(i,e)}}if(T>100){T=T/1000;T=T<100?T.toFixed(2):T.toFixed(0);T+="公里"}else{T=T<100?T.toFixed(2):T.toFixed(0);T+="米"}this._distanceDom.innerText=T},});function f(i){if(typeof i==="string"&&/^(?!#)(\w)*/.test(i)){i="#"+i}var kx={};if(window.PANORAMA_URL){kx.imgPath=E.imgPath;kx.tileBaseUrls=[E.panoTilePath]}var e=Pano.init(i,kx);var T=e.setPosition;e.setPosition=function(kz){var kA=jt.convertLL2MC(kz);T.call(e,kA)};var ky=e.addEventListener;e.addEventListener=function(kz,kA){if(kz==="position_changed"){ky.call(e,kz,function(kB){var kC=jt.convertMC2LL(kB);kA(kC)})}else{ky.call(e,kz,kA)}};hN.sendMessage(a1(4,3,5),["layer","pano"]);return e}bF.Map=h2;bF.MapType=eu;bF.Point=cF;bF.Pixel=ft;bF.Size=jk;bF.Bounds=ih;bF.PrivateRegionDataModel=cU;bF.TileLayer=hM;bF.Copyright=o;bF.Projection=bF.Project=jt;bF.XYZProjection=bF.XYZProject=dK;bF.Convertor=f5;bF.RenderTypeUtils=de;bF.Overlay=aU;bF.Label=h9;bF.Marker=u;bF.Symbol=fr;bF.SVGSymbol=dT;bF.Icon=jN;bF.Polyline=bt;bF.BezierCurve=cP;bF.PolylineMultipart=ew;bF.Polygon=iZ;bF.MapMask=kj;bF.Prism=bz;bF.Marker3D=en;bF.GroundOverlay=gb;bF.GroundPoint=dY;bF.CustomOverlay=bT;bF.CustomHtmlLayer=dG;bF.ParkingSpot=iE;bF.InfoWindow=ee;bF.SimpleInfoWindow=ik;bF.Circle=aX;bF.Control=gW;bF.NavigationControl=j1;bF.IndoorManager=df;bF.NavigationControl3D=fa;bF.CopyrightControl=gj;bF.ScaleControl=kw;bF.CityListControl=bA;bF.MapTypeControl=A;bF.ZoomControl=jw;bF.LocationControl=gC;bF.LogoControl=bI;bF.DistanceTool=cn;bF.ContextMenu=hD;bF.MenuItem=ie;bF.OperationMask=am;bF.Animation=fJ;bF.ViewAnimation=s;bF.Transitions=gP;bF.Event=fU;bF.trafficLayer=jY;bF.TrafficLayer=jA;bF.GeoJSONLayer=aQ;bF.XYZLayer=kk;bF.PixelLayer=dA;bF.GeoJSONParse=gL;bF.NormalLayer=cu;bF.ThreeLayer=g4;bF.LineLayer=b0;bF.FillLayer=ec;bF.PointShapeLayer=aZ;bF.PointIconLayer=gm;bF.Entity=ju;bF.MVTLayer=ej;bF.BaiduLayer=X;bF.Geolocation=c4;bF.Geocoder=bn;bF.Boundary=fv;bF.DistrictLayer=d9;bF.LocalCity=fo;bF.LocalSearch=cI;bF.Autocomplete=jm;bF.BusLineSearch=eI;bF.WalkingRoute=fA;bF.RidingRoute=dc;bF.DrivingRoute=cy;bF.DrivingRouteLine=gc;bF.TransitRoute=eX;bF.RouteSearch=i0;bF.TruckRoute=Z;bF.PanoramaCoverageLayer=ei;bF.PanoramaControl=fq;bF.PanoramaService=eZ;bF.PanoramaLabel=R;bF.Panorama=f;function hu(e,i){for(var T in i){e[T]=i[T]}}bF.fetchDebug&&bF.fetchDebug.init();bF.verify();bF.apiLoad();bF.frequency();bF.getSeckeyCid();window._layer=1;e8.extend(d9.prototype,{_asyncSearch:function(){for(var T=0,e=this._queryList.length;T0){var kM=kx.geo.length;for(jI=0;jI0){var kE=T.length-1;var kL=[];var kD=false;var kK=0;var kI=0;for(var kN=0;kNkI){var kP=kK;kK=kI;kI=kP}var kC=kL;var kA=kL.splice(kK+1);var ky=kA.splice(kI-kK);kC=kC.concat(ky);kJ.boundaries.push(kC.join(";"));kJ.boundaries.push(kA.join(";"));kD=false;continue}if(kL.length!==0){kJ.boundaries.push(kL.join(";"))}}}}}}return kJ},deleteDistrict:function(kx){var T=kx.disOverlays;for(var e=0;e0){for(var T=0;T