window.TILE_VERSION={"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"}}};window.MSV={"mapstyle":{"version":"001","updateDate":"20230817"}};window.BMAP_AUTHENTIC_KEY="2KLQUajGSpNL2DInxT6BwdPklMNpG3hw"; (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(bD,fB){var e6=e6||{version:"20150702",emptyFn:function(){}};(function(){e6._log=[];var i=0;var T={};e6.BaseClass=function(kq){T[(this.hashCode=(kq||e6.BaseClass.guid()))]=this};e6.BaseClass.guid=function(){return"mz_"+(i++).toString(36)};e6.BaseClass.create=function(){var kq=new e6.BaseClass();kq.decontrol();return kq};var e=e6.instance=e6.I=function(kq){return T[kq]};e6.BaseClass.prototype.dispose=function(){if(this.hashCode){delete T[this.hashCode]}for(var kq in this){if(typeof this[kq]!="function"){delete this[kq]}}};e6.BaseClass.prototype.getHashCode=function(){if(!this.hashCode){T[(this.hashCode=e6.BaseClass.guid())]=this}return this.hashCode};e6.BaseClass.prototype.decontrol=function(){delete T[this.hashCode]};e6.BaseClass.prototype.toString=function(){return"[object "+(this._className||"Object")+"]"};e6.BaseClass.prototype._wlog=function(kr,ks){var kq=e6._log;if(kq.length>100){kq.reverse().length=50;kq.reverse()}kq[kq.length]="["+kr+"]["+(this._className||"Object")+" "+this.hashCode+"] "+ks}})();Function.prototype.inherits=function(kq,T){var e,kr,kt=this.prototype,ks=function(){};ks.prototype=kq.prototype;kr=this.prototype=new ks();if(typeof(T)=="string"){kr._className=T}for(e in kt){kr[e]=kt[e]}this.prototype.constructor=kt.constructor;kt=ks=null;return kr};e6.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};e6.BaseClass.prototype.on=e6.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 kq=i.hashCode||e6.BaseClass.guid();i.hashCode=kq;if(e[T][kq]){this._wlog("warning","repeat key:"+kq)}e[T][kq]=i};e6.BaseClass.prototype.off=e6.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]}};e6.BaseClass.prototype.fire=e6.BaseClass.prototype.dispatchEvent=function(kq){if(!this._listeners){this._listeners={}}var T,e=this._listeners,kr=kq.type;kq.target=kq.srcElement=kq.target||kq.srcElement||this;kq.currentTarget=this;if(typeof this[kr]=="function"){this[kr](kq)}if(typeof e[kr]=="object"){for(T in e[kr]){if(typeof e[kr][T]=="function"){e[kr][T].call(this,kq)}}}return kq.returnValue};e6.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};e6.Browser=(function(){var T=navigator.userAgent;var kr=0;var e=0;var ks=0;var i=0;var kw=0;var ku=0;var kv=0;var kt=0;var kq=0;var kx=0;if(typeof window.opera==="object"&&/Opera(\s|\/)(\d+(\.\d+)?)/.test(T)){ks=parseFloat(RegExp.$2)}else{if(/OPR(\/(\d+)(\..?)?)/.test(T)){ks=parseInt(RegExp.$2,10)}else{if(/Edge\/((\d+)\.\d+)/.test(T)){kr=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)){kw=parseFloat(RegExp.$2)}else{if(navigator.vendor==="Netscape"&&/Netscape(\s|\/)(\d+(\.\d+)?)/.test(T)){kv=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)){kt=parseInt(RegExp.$1,10)}else{if(!e&&!kr&&T.indexOf("Gecko")>-1&&T.indexOf("KHTML")===-1&&/rv\:(\d+(\.\d+)?)/.test(T)){kq=parseFloat(RegExp.$1)}else{if(!kr&&/chrome\/(\d+(\.\d+)?)/i.test(T)){ku=parseFloat(RegExp.$1)}else{if(!kr&&/AppleWebKit\/(\d+(\.\d+)?)/.test(T)){kx=parseInt(RegExp.$1,10)}}}}var ky={edge:kr,ie:e,firefox:kw,netscape:kv,opera:ks,safari:i,chrome:ku,gecko:kq,trident:kt,webkit:kx};return ky})();window.FeBrowser=e6.Browser;e6.Dom={};e6.Dom.createDom=function(i,e){if(e6.isIE&&e&&e.name){i="<"+i+' name="'+e6.String.escapeHTML(e.name)+'">'}var T=document.createElement(i);if(e){e6.Dom.setProperties(T,e)}return T};e6.Dom.getOffset=function(kq){var kt=e6.Dom.getOwnerDocument(kq);var ks=e6.isGecko>0&&kt.getBoxObjectFor&&e6.Dom.getStyle(kq,"position")=="absolute"&&(kq.style.top===""||kq.style.left==="");var ku={left:0,top:0};var i=(e6.isIE&&!e6.isStrict)?kt.body:kt.documentElement;if(kq==i){return ku}var T=null;var kr;if(kq.getBoundingClientRect){kr=kq.getBoundingClientRect();ku.left=kr.left+Math.max(kt.documentElement.scrollLeft,kt.body.scrollLeft);ku.top=kr.top+Math.max(kt.documentElement.scrollTop,kt.body.scrollTop);ku.left-=kt.documentElement.clientLeft;ku.top-=kt.documentElement.clientTop;if(e6.isIE&&!e6.isStrict){ku.left-=2;ku.top-=2}}else{if(kt.getBoxObjectFor&&!ks){kr=kt.getBoxObjectFor(kq);var e=kt.getBoxObjectFor(i);ku.left=kr.screenX-e.screenX;ku.top=kr.screenY-e.screenY}else{T=kq;do{ku.left+=T.offsetLeft;ku.top+=T.offsetTop;if(e6.isWebkit>0&&e6.Dom.getStyle(T,"position")=="fixed"){ku.left+=kt.body.scrollLeft;ku.top+=kt.body.scrollTop;break}T=T.offsetParent}while(T&&T!=kq);if(e6.isOpera>0||(e6.isWebkit>0&&e6.Dom.getStyle(kq,"position")=="absolute")){ku.top-=kt.body.offsetTop}T=kq.offsetParent;while(T&&T!=kt.body){ku.left-=T.scrollLeft;if(!e6.isOpera||T.tagName!="TR"){ku.top-=T.scrollTop}T=T.offsetParent}}}return ku};e6.Dom.getOwnerDocument=function(e){return e.nodeType==9?e:e.ownerDocument||e.document};e6.Dom.setProperties=function(i,e){e6.each(e,function(kq,T){e6.Dom._setProperty(i,T,kq)})};e6.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 e6.Dom._DIRECT_ATTRIBUTE_MAP){i.setAttribute(e6.Dom._DIRECT_ATTRIBUTE_MAP[e],T)}else{i[e]=T}}}}};e6.Dom._DIRECT_ATTRIBUTE_MAP={cellpadding:"cellPadding",cellspacing:"cellSpacing",colspan:"colSpan",rowspan:"rowSpan",valign:"vAlign",height:"height",width:"width",usemap:"useMap",frameborder:"frameBorder"};e6.G=function(){for(var T=[],kq=arguments.length-1;kq>-1;kq--){var kr=arguments[kq];T[kq]=null;if(typeof kr=="object"&&kr&&kr.dom){T[kq]=kr.dom}else{if((typeof kr=="object"&&kr&&kr.tagName)||kr==window||kr==document){T[kq]=kr}else{if(typeof kr=="string"&&(kr=document.getElementById(kr))){T[kq]=kr}}}}return T.length<2?T[0]:T};e6.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(" ")}};e6.addClassName=e6.ac;e6.each=function(ks,e){if(typeof e!="function"){return ks}if(ks){if(ks.length===undefined){for(var T in ks){e.call(ks[T],ks[T],T)}}else{for(var kq=0,kr=ks.length;kq0&&!window.opera){/MSIE (\d+(\.\d+)?)/.test(navigator.userAgent);e6.isIE=parseFloat(RegExp.$1)}})();e6.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}};e6.removeClassName=e6.rc;e6.show=function(){this.each(arguments,function(e){if(e=e6.G(e)){e.style.display=""}})};e6.trim=function(e){return e.replace(/(^[\s\t\xa0\u3000]+)|([\u3000\xa0\s\t]+$)/g,"")};e6.getElementsByClassName=function(e,i){if(e.getElementsByClassName){return e.getElementsByClassName(i)}else{return(function T(kx,kv){if(kv==null){kv=document}var ku=[],kt=kv.getElementsByTagName("*"),kq=kt.length,kw=new RegExp("(^|\\s)"+kx+"(\\s|$)"),ks,kr;for(ks=0,kr=0;ks-1};e6.insertHTML=function(kq,e,T){kq=e6.G(kq);if(kq===null){return kq}var i,kr;if(kq.insertAdjacentHTML){kq.insertAdjacentHTML(e,T)}else{i=kq.ownerDocument.createRange();e=e.toUpperCase();if(e=="AFTERBEGIN"||e=="BEFOREEND"){i.selectNodeContents(kq);i.collapse(e=="AFTERBEGIN")}else{kr=e=="BEFOREBEGIN";i[kr?"setStartBefore":"setEndAfter"](kq);i.collapse(kr)}i.insertNode(i.createContextualFragment(T))}return kq};if(typeof HTMLElement!="undefined"&&HTMLElement.prototype.__lookupGetter__&&!HTMLElement.prototype.__lookupGetter__("children")&&!window.opera){try{HTMLElement.prototype.__defineGetter__("children",function(){for(var T=[],kq=0,ks,kr=0,e=this.childNodes.length;kr-1};e6.isEmptyObject=function(T){if(Object.prototype.toString.call(T)==="[object Object]"){for(var e in T){return false}return true}else{return false}};var bW=window.location.protocol==="http:"?"http:":"https:";var eD={fontFamily:'Arial,Helvetica,"PingFang SC","Hiragino Sans GB",STHeiti,sans-serif',mapStyleNameIdPair:{"default":0,"grayed-out":1},mapHost:bW+"//map.baidu.com",apiHost:bW+"//api.map.baidu.com",apiIMG:bW+"//api.map.baidu.com/images",staticHost:bW+"//webmap0.bdimg.com",imgPath:bW+"//webmap0.bdimg.com/image/api/",tileDomain:[bW+"//maponline0.bdimg.com",bW+"//maponline1.bdimg.com",bW+"//maponline2.bdimg.com",bW+"//maponline3.bdimg.com"],panoTilePath:"//apisv1.bdimg.com/",optDomain:"http://10.120.25.45:8017",rasterTilePath:"/tile/",vectorTilePath:"/pvd/",originTilePath:[bW+"//pcor.baidu.com"],stylePath:"//maponline0.bdimg.com/sty/",bosPath:bW+"//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 bW+this.stylePath+i},getMapStyleFiles:function(T){var kr=true;if(typeof T==="string"&&T!=="default"){kr=false}var ks=kr?"":"_"+(this.mapStyleNameIdPair[T]-1);var i=bE();var kq="udt="+i.udt+"&v="+i.ver;var e=bW+this.stylePath;return[e+"icons_2x"+ks+".js?"+kq,e+"fs"+ks+".js?"+kq,e+"indoor_fs.js?"+kq]},tvc:{ditu:{normal:{version:"088",updateDate:"20230707"},satellite:{version:"009",updateDate:"20230707"},normalTraffic:{version:"081",updateDate:"20230707"},satelliteTraffic:{version:"083",updateDate:"20230707"},mapJS:{version:"104",updateDate:"20230707"},satelliteStreet:{version:"083",updateDate:"20230707"},earthVector:{version:"001",updateDate:"20230707"}},webapp:{high_normal:{version:"001",updateDate:"20230707"},lower_normal:{version:"002",updateDate:"20230707"}},api_for_mobile:{vector:{version:"002",updateDate:"20230707"},vectorIcon:{version:"002",updateDate:"20230707"}}},msv:{mapstyle:{version:"001",updateDate:"20230705"}}};eD.imgResources={blankGIF:eD.staticHost+"/res/litemapapi/v1d1/images/blank.gif?20170501",markerPng:eD.staticHost+"/res/litemapapi/v1d1/images/marker.png?20170501",locPng:eD.staticHost+"/res/litemapapi/v1d1/images/loc.png?20180918",locNewPng:eD.staticHost+"/res/litemapapi/v1d1/images/loc_new.png?20190314",zoomPng:eD.staticHost+"/res/litemapapi/v1d1/images/zoombtn.png?20180918",mapLogoPng:eD.staticHost+"/res/litemapapi/v1d1/images/logo-2x.png?20190226"};var C=eD;var jt="ruler.cur";if(e6.Browser.ie||e6.Browser.edge){e6.extend(C,{distCursor:"url("+C.imgPath+jt+"),crosshair",defaultCursor:"url("+C.imgPath+"openhand.cur),default",draggingCursor:"url("+C.imgPath+"closedhand.cur),move"})}else{if(e6.Browser.firefox){e6.extend(C,{distCursor:"url("+C.imgPath+jt+"),crosshair",defaultCursor:"-moz-grab",draggingCursor:"-moz-grabbing"})}else{if(e6.Browser.chrome||e6.Browser.safari){e6.extend(C,{distCursor:"url("+C.imgPath+jt+") 2 6,crosshair",defaultCursor:"url("+C.imgPath+"openhand.cur) 8 8,default",draggingCursor:"url("+C.imgPath+"closedhand.cur) 8 8,move"});if(e6.Platform.macintosh){C.defaultCursor="-webkit-grab";C.draggingCursor="-webkit-grabbing"}}else{e6.extend(C,{distCursor:"url("+C.imgPath+jt+"),crosshair",defaultCursor:"url("+C.imgPath+"openhand.cur),default",draggingCursor:"url("+C.imgPath+"closedhand.cur),move"})}}}bD=bD||{};bD.version="gl";bD._register=[];bD.register=function(e){this._register[this._register.length]=e};bD.guid=1;bD.getGUID=function(e){return(e||"")+bD.guid++};var eW=window.BMAP_AUTHENTIC_KEY||"";function S(e,i,kq){var T=new Date();T.setTime(T.getTime()+kq*24*60*60*1000);document.cookie=e+"="+escape(i)+";expires="+T.toGMTString()}function a7(e,i){if(navigator.cookieEnabled){return S(e,i,30)}if(localStorage){return localStorage.setItem(e,i)}if(sessionStorage){return sessionStorage.setItem(e,i)}}bD.getSeckeyCid=function(){var i=+new Date();var e=bW+"//dlswbr.baidu.com/heicha/mw/abclite-2063-s.js?_t="+i;gX.load(e,i0)};function i0(){if(window.___abvk){a7("SECKEY_ABVK",window.___abvk)}}window.__abbaidu_2063_cb=function(i){var e=JSON.parse(i);a7("BMAP_SECKEY",e.data)};bD.bmapVerifyCbk=function(kr){if(kr&&kr.error!==0){bD=null;BMapGL=null;var ks="百度未授权使用地图API,可能是因为您提供的密钥不是有效的百度地图开放平台密钥,或此密钥未对本应用的百度地图JavaScriptAPI授权。您可以访问如下网址了解如何获取有效的密钥:https://lbs.baidu.com/apiconsole/key#。";switch(kr.error){case 101:ks="您所使用的密钥ak有问题,不支持jsapi服务,可以访问该网址了解如何获取有效密钥:http://lbsyun.baidu.com/apiconsole/key#。";break;case 102:ks="MCODE参数不存在,mobile类型MCODE参数必需,详情查看:http://lbsyun.baidu.com/apiconsole/key#。";break;case 200:ks="APP不存在,AK有误请检查再重试,详情查看:http://lbsyun.baidu.com/apiconsole/key#。";break;case 201:ks="APP被您禁用啦,可以访问 http://lbsyun.baidu.com/apiconsole/key# 查看自己的应用具体详情,或联系我们了解详情。";break;case 202:ks="APP被管理员删除啦,可以访问 http://lbsyun.baidu.com/apiconsole/key# 查看自己的应用具体详情,或联系我们了解详情。";break;case 203:ks="APP类型错误,可以访问 http://lbsyun.baidu.com/apiconsole/key# 查看自己的应用具体详情,或联系我们了解详情。";break;case 210:ks="APP IP校验失败,可以访问 http://lbsyun.baidu.com/apiconsole/key# 查看自己的应用具体详情,或联系我们了解详情。";break;case 220:ks="APP Referer校验失败。请检查该ak设置的白名单与访问所有的域名是否一致。详情查看:http://lbsyun.baidu.com/apiconsole/key#";break;case 230:ks="APP Mcode码校验失败,可以访问 http://lbsyun.baidu.com/apiconsole/key# 查看自己的应用具体详情,或联系我们了解详情。";break;case 240:ks="APP服务被禁用了,可以访问 http://lbsyun.baidu.com/apiconsole/key# 查看自己的应用具体详情,或联系我们了解详情。";break;case 250:ks="该用户不存在... 请登录 https://lbs.baidu.com 的控制台,注册成为开发者申请ak吧。";break;case 251:ks="该用户被自己删除啦,可以访问 http://lbsyun.baidu.com/apiconsole/key# 查看自己的应用具体详情。";break;case 252:ks="该用户被管理员删除啦,可以访问 http://lbsyun.baidu.com/apiconsole/key# 了解如何获取有效密钥,或请联系我们了解详情。";break;case 260:ks="您所使用的密钥AK不包含该服务呢,可以访问 http://lbsyun.baidu.com/apiconsole/key# 查看服务选择情况,或请联系我们了解详情。";break;case 261:ks="您所使用的密钥AK的该服务被禁用啦,可以访问 http://lbsyun.baidu.com/apiconsole/key# 查看服务选择情况,或请联系我们了解详情。";break;case 401:ks="您所使用的AK并发超限了,请登录 http://lbsyun.baidu.com/cashier/quota#/home 了解详情。";break;case 302:ks="您所使用的AK天配额超限了,请登录 http://lbsyun.baidu.com/cashier/quota#/home 了解详情。";break}alert(ks);var T=document.getElementsByClassName("bmap-container");if(T){for(var kq=0;kqi){this._removeOld()}if(!e[T]){e.push(kq)}e[T]=kq;kq._key_=T};ik.prototype.getHitRate=function(){return Math.round(this._totalHitTimes/this._totalGetTimes*1000)/1000};ik.prototype.getData=function(i){var e=this._cache[i];if(e){this._totalHitTimes++}this._totalGetTimes++;return e};ik.prototype.removeData=function(kr){if(this._options.clearCallback){this._options.clearCallback(this._cache[kr])}var T=this._cache;var ks=T[kr];for(var kq=0,e=T.length;kq=0;kr--){var kq=this._cache[kr]._key_;if(!ks[kq]){T.splice(kr,1);if(this._options.clearCallback){this._options.clearCallback(T[kq])}delete T[kq]}}};ik.prototype.getDataCount=function(){return this._cache.length};function i5(){}e6.extend(i5.prototype,{centerAndZoomIn:function(kv,T,kw){var kt=this;if(!kv&&!T){return}kv=kv||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 ku(){kt._earth=new bD.Earth(kt,{showRealSunlight:kt.config.showRealSunlight,showMilkyway:kt.config.showMilkyway,earthBackground:kt.config.earthBackground});kt._proxyEarthEvents();kt._changeEarthMapType(BMAP_EARTH_MAP);e6.extend(kt,bD.EarthView.prototype);if(!kt._navigationCtrl&&kt.config.showControls){kt._navigationCtrl=new bD.NavigationControl3D(kt)}delete kt.temp.originMapType}he.load("earth",function(){if(bD["FeatureStyle"+kt.config.style]){ku()}else{kt.loadMapStyleFiles(function(){ku()})}})}}this.lastLevel=this.zoomLevel||T;this.zoomLevel=T;var kr=new fS("onload");kr.point=kv;kr.zoom=T;this.centerPoint=this.restrictCenter(new cD(kv.lng,kv.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 ks=new m(i,"baidu",this.mapType);var kq=new hH({mapType:this.mapType,copyright:ks,customLayer:false,baseLayer:true,tileTypeName:"web"});kq._isInnerLayer=true;this.addTileLayer(kq);if(this.mapType===BMAP_SATELLITE_MAP&&this._isHybridShow===true){this._addHybirdMap()}}this.dispatchEvent(kr);this.loaded=true;kw=kw||{};kw.callback&&kw.callback()},_setPlatformPosition:function(kw,kv,kz){kz=kz||{};if(kw===0&&kv===0&&!kz.point){return}if(isNaN(kz.initMapOffsetX)){kz.initMapOffsetX=this.offsetX}if(isNaN(kz.initMapOffsetY)){kz.initMapOffsetY=this.offsetY}var kx=kw+kz.initMapOffsetX;var ku=kv+kz.initMapOffsetY;if(kz.point){var i=this.restrictCenter(kz.point);if(!i.equals(this.centerPoint)){this.centerPoint=i.clone();this.fire(new fS("oncenter_changed"))}}else{var kq=this.offsetX-kx;var e=this.offsetY-ku;var T=this.getZoomUnits();var kt=this.centerPoint.lng;var ks=this.centerPoint.lat;var kr=new cD(kt,ks);this.centerPoint=this.restrictCenter(new cD(kr.lng+kq*T,kr.lat-e*T),T);this.fire(new fS("oncenter_changed"));if(this.zoomLevel<10){kx=this.offsetX-(this.centerPoint.lng-kr.lng)/T;ku=this.offsetY+(this.centerPoint.lat-kr.lat)/T}}this.offsetX=kx;this.offsetY=ku;var ky=this.platform.style;ky.left=kx+"px";ky.top=ku+"px";this.maskLayer.style.left=-kx+"px";this.maskLayer.style.top=-ku+"px";if(kz.dispatchEvent!==false){this.dispatchEvent(new fS("onmoving"))}},zoomTo:function(e,kt,kx){kx=kx||{};kx.zoomCenter=kt;if(kx.noAnimation!==true){this.deepZoomTo(e,kx);return}if(typeof e!=="number"){return}var kr=es[this.mapType];if(!kr){return}var T=e;e=this._getProperZoom(e).zoom;if(e===this.zoomLevel){var ku=new fS("onzoomexceeded");ku.targetZoom=T;this.dispatchEvent(ku);kx.callback&&kx.callback();return}this.lastLevel=this.zoomLevel;if(kt){this.temp._cPoint=kt;this.temp._cPixel=this.pointToPixelIn(kt)}else{if(this.getInfoWindow()){var kw=this.getInfoWindow().getPoint();this.temp._cPixel=this.pointToPixelIn(kw);this.temp._cPoint=kw}}if(this.config.zoomCenter){kt=this.config.zoomCenter;this.temp._cPoint=kt;this.temp._cPixel=this.pointToPixelIn(kt)}if(kt||this.temp.infoWin&&this.temp.infoWin.isOpen()){var i=this.temp._cPoint;var kv=this.temp._cPixel;var kq=this.getZoomUnits(e);var ks=new cD(i.lng+kq*(this.width/2-kv.x),i.lat-kq*(this.height/2-kv.y));this.centerPoint=this.restrictCenter(ks,kq,e);if(this.centerPoint.zoom){e=this.centerPoint.zoom}}if(kx.fireEvent!==false){this.dispatchEvent(new fS("onzoomstart"))}if(e!==this.zoomLevel){this.zoomLevel=e;this.dispatchEvent(new fS("onzooming"));this.dispatchEvent(new fS("onzoomstartcode"))}if(kx.fireEvent!==false){this.dispatchEvent(new fS("onzoomend"))}if(kx.callback){kx.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(ku,kq){kq=kq||{};var ks=ku-this.zoomLevel;var kr=this._getProperZoom(ku);if(kr.exceeded){var e=new fS("onzoomexceeded");e.targetZoom=ku;this.dispatchEvent(e);return}var i;if(kq.zoomCenter){i=this.pointToPixelIn(kq.zoomCenter)}else{if(this.getInfoWindow()){i=this.pointToPixelIn(this.getInfoWindow().getPoint(),{zoom:this.lastLevel})}else{var i=new fr(this.width/2,this.height/2)}}this.lastLevel=this.zoomLevel;var kt=this.deepZoom||new aF(this);var T=ks>0?1:-1;kt.zoomMap(i,ks,T,null,kq)},flyToIn:function(kv,e){if(e===this.zoomLevel){this.panToIn(kv);return}var ks=this._getProperZoom(e);if(ks.exceeded){var kw=new fS("onzoomexceeded");kw.targetZoom=e;this.dispatchEvent(kw);return}var ku=e-this.zoomLevel;var T=new fr(this.width/2,this.height/2);var i=this.pointToPixelIn(kv);var kt=new je(i.x-T.x,i.y-T.y);this.lastLevel=this.zoomLevel;if(Math.abs(ku)>=4||Math.abs(kt.width)>this.width||Math.abs(kt.height)>this.height){this.centerAndZoomIn(kv,e);return}var kr=this.deepZoom||new aF(this);var kq=ku>0?1:-1;kr.zoomMap(i,ku,kq,kt)},panToIn:function(i,T){T=T||{};if(!i||i.equals(this.centerPoint)){T.callback&&T.callback();return}var kq=this.pointToPixelIn(i);var e=Math.round(this.width/2);var kr=Math.round(this.height/2);if(Math.abs(e-kq.x)>this.width||Math.abs(kr-kq.y)>this.height||T.noAnimation===true){this._panToIn(e-kq.x,kr-kq.y,i);T.callback&&T.callback()}else{this._panBy(e-kq.x,kr-kq.y,T)}},_panToIn:function(i,e,kq){var T=this.temp;if(T.operating===true){return}if(T.dragAni){T.dragAni.stop();T.dragAni=null;this.dispatchEvent(new fS("onmoveend"))}this.dispatchEvent(new fS("onmovestart"));this._setPlatformPosition(i,e,{point:kq});this.dispatchEvent(new fS("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,kr){if(this.temp.operating===true){return}kr=kr||{};this.dispatchEvent(new fS("onmovestart"));var kq=this;var T=kq.temp;T.pl=kq.offsetX;T.pt=kq.offsetY;if(T.tlPan){T.tlPan.cancel()}if(T.dragAni){T.dragAni.stop();T.dragAni=null;this.dispatchEvent(new fS("onmoveend"))}T.tlPan=new fH({fps:kr.fps||kq.config.fps,duration:kr.duration||kq.config.actionDuration,transition:kr.transition||gL.easeInOutQuad,render:function(ks){this.terminative=kq.temp.operating;if(kq.temp.operating){return}kq._setPlatformPosition(Math.ceil(i*ks),Math.ceil(e*ks),{initMapOffsetX:T.pl,initMapOffsetY:T.pt})},finish:function(ks){kq.dispatchEvent(new fS("onmoveend"));kq.temp.tlPan=false;if(kq.temp.stopArrow===true){kq.temp.stopArrow=false;if(kq.temp.arrow!==0){kq._arrow()}}kr.callback&&kr.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(ky,i,e){this.isRestrict=false;i=i||this.getZoomUnits();e=e||this.zoomLevel;var kw=this.pixelToPointIn(new fr(this.width,0),{center:ky,zoom:e});var ku=this.pixelToPointIn(new fr(0,this.height),{center:ky,zoom:e});var kz=ky.lng;var kE=ky.lat;if(this.config.restrictBounds!==null&&!this.config.restrictBounds.isEmpty()){var kD=this.config.restrictBounds;var kq=kD.getSouthWest();var kB=kD.getNorthEast();var kx=jn.convertLL2MC(kq);var ks=jn.convertLL2MC(kB);ky.lng=this.calcNewLngByBounds(kz,ku,kw,kx.lng,ks.lng,i);ky.lat=this.calcNewLatByBounds(kE,ku,kw,kx.lat,ks.lat,i);return ky}var kv=this.pixelToPointIn(new fr(0,0),{center:ky,zoom:e});var kr=this.pixelToPointIn(new fr(0,this.height),{center:ky,zoom:e});if(this.zoomLevel<5){if(kv.lat>hX.MAX_LAT&&kr.lathX.MAX_LAT){this.isRestrict=true;ky.lat=hX.MAX_LAT-this.height/2*i}else{if(kr.lat=hX.HIGH_RES_MIN_RATIO?2:1,enableEarth:dc.ifEnableEarth(),defaultMaxBounds:new ib(new cD(-21364736,-10616832),new cD(23855104,15859712)),showControls:false,indoorControl:false,showRealSunlight:true,showMilkyway:true,earthBackground:null,showStreetLayer:true,showVectorStreetLayer:false,showVectorLine:false,minZoom:null,maxZoom:null,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:true,preserveDrawingBuffer:false,privateOn:false,privateRegions:null,popRightClick:false,videoMuted:true,overlayTop:false};for(var T in i){if(i.hasOwnProperty(T)){this.config[T]=i[T];if(T==="fixCenterWhenResize"){this.config.enableResizeOnCenter=i[T]}}}if(i.style){if(i.style["styleId"]&&i.style["styleId"].length<32){this.config.style=i.style["styleId"]}else{this.config.style=i.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};if(i.displayOptions){for(var e in i.displayOptions){if(i.displayOptions.hasOwnProperty(e)){this._displayOptions[e]=i.displayOptions[e]}}}if(this.config.restrictCenter===false){this._enableTiltZoom=0;this._enableHeadingZoom=0}},getMinZoom:function(){var T;if(es[this.mapType][this._renderType]){T=es[this.mapType][this._renderType].minZoom}else{T=es[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){kq=true;T=e}if(this._renderType!=="webgl"){T=Math.round(T)}return{zoom:T,exceeded:kq}},getContainer:function(){return this.container},getZoomUnits:function(T){if(this.mapType===BMAP_EARTH_MAP){return Math.pow(2,18-this._earth.getImageZoom())}var e=es[this.mapType];if(typeof e!=="object"){return null}var i=T||this.zoomLevel;return Math.pow(2,(e.zoomLevelBase-i))},pointToPixelIn:function(kB,kD){if(!kB){return}kD=kD||{};if(this.mapType===BMAP_EARTH_MAP){var ks;if(!kB._llPt){ks=jn.convertMC2LL(kB);kB._llPt=ks}ks=kB._llPt;var kx=null;var kr=null;if(typeof kD.zoom==="number"){var kA=this._earth;var kC=kA._getEarthZoomByImgZoom(kD.zoom);if(kC<=3){kx=kA._generateTmpPMatrix(kC)}kr=kA._generateTmpMVMatrix(kA.getCenter(),kC)}var kt=this._earth.fromLatLngToPixel(ks,{useRound:false,isCalcOnBack:true,matrixInfo:{modelViewMatrix:kr,projectionMatrix:kx}});return kt}if((this._heading%360===0&&this._tilt===0)||!this._webglMapCamera){var kz=this.getZoomUnits(kD.zoom);var kv=kD.center||this.centerPoint;var kq=this.width/2;var ku=this.height/2;var ky;if(kB.lng*kv.lng<0){var i=Math.abs(kB.lng-kv.lng);var e=(e9._mc180X*2-i)/kz;if(kv.lng<0){ky=kq-e}else{ky=kq+e}}else{ky=(kB.lng-kv.lng)/kz+kq}var kw=(kv.lat-kB.lat)/kz+ku;if(kD.useRound!==false){ky=Math.round(ky);kw=Math.round(kw)}return new fr(ky,kw)}var T=this._webglMapCamera.fromMCToScreenPixel(kB.lng,kB.lat,kD);if(kD.useRound===false){return T}T.x=Math.round(T.x);T.y=Math.round(T.y);return T},pixelToPointIn:function(e,kx){if(!e){return}kx=kx||{};if(this.mapType===BMAP_EARTH_MAP){if(typeof kx.zoom==="number"){var kv=this._earth;var ks=null;var T=null;var kw=kv._getEarthZoomByImgZoom(kx.zoom);if(kw<=3){ks=kv._generateTmpPMatrix(kw)}T=kv._generateTmpMVMatrix(kv.getCenter(),kw)}var i=this._earth.fromPixelToLatLng(e,{matrixInfo:{modelViewMatrix:T,projectionMatrix:ks}});if(i===null){return null}return jn.convertLL2MC(i)}if((this._heading%360!==0||this._tilt>0)&&this._webglMapCamera){return this._webglMapCamera.fromScreenPixelToMC(e.x,e.y,kx)}var kt=kx.center||this.centerPoint;var ku=this.getZoomUnits(kx.zoom);var kr=kt.lng+ku*(e.x-this.width/2);var kq=kt.lat-ku*(e.y-this.height/2);return new cD(kr,kq)},pointToOverlayPixelIn:function(e,kq){kq=kq||{};var T=this.pointToPixelIn(e,{zoom:kq.zoom,center:kq.center,forLabel:true,frustumTest:true,useRound:kq.useRound});if(!T){return}if(kq.fixPosition&&this.mapType!=="B_EARTH_MAP"){var kr=this.getSize();var i=this.worldSize(kq.zoom);if(T.x>kr.width){while(T.x>kr.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 jn()},lnglatToMercator:function(e,kq){var i=new cD(e,kq);var T=jn.convertLL2MC(i);return[T.lng,T.lat]},mercatorToLnglat:function(i,e){if(isNaN(i)||isNaN(e)){return[]}i=parseFloat(i);e=parseFloat(e);var kq=new cD(i,e);var T=jn.convertMC2LL(kq);return[T.lng,T.lat]},getBoundsIn:function(){if(!this._bounds){return}var kD=arguments[0];if(this.mapType===BMAP_EARTH_MAP&&this._earth){var kx=this._earth.getCustomBounds();if(!kx){return this.config.defaultMaxBounds}var kw=kx.getSouthWest();var e=kx.getNorthEast();if(kw.lng>e.lng){e.lng=180}var kU=jn.convertLL2MC(kw);var kK=jn.convertLL2MC(e);var kA=this.config.defaultMaxBounds;var kJ=Math.max(kU.lng,kA.sw.lng);var kI=Math.max(kU.lat,kA.sw.lat);var kC=Math.min(kK.lng,kA.ne.lng);var kB=Math.min(kK.lat,kA.ne.lat);var kF=new ib(new cD(kJ,kI),new cD(kC,kB));kF.pointBottomLeft=new cD(kJ,kI);kF.pointBottomRight=new cD(kC,kI);kF.pointTopLeft=new cD(kJ,kB);kF.pointTopRight=new cD(kC,kB);kF.setMinMax();kF.makeNormalizedPoint(this._earth.getHeading());return kF}kD=kD||{};var kr=kD.margins||[0,0,0,0];var kP=this.pixelToPointIn({x:kr[3],y:this.height-kr[2]},kD);var kT=this.pixelToPointIn({x:this.width-kr[1],y:kr[0]},kD);var kH=typeof kD.heading==="number"?kD.heading:(this._heading%360);var T=typeof kD.tilt==="number"?kD.tilt:this._tilt;var kz=this._webglMapCamera;if((kH===0&&T===0)||!kz){this._bounds.setSouthWest(kP);this._bounds.setNorthEast(kT);this._bounds.pointBottomLeft=kP;this._bounds.pointBottomRight=new cD(kT.lng,kP.lat);this._bounds.pointTopRight=kT;this._bounds.pointTopLeft=new cD(kP.lng,kT.lat);this._bounds.setMinMax();this._bounds.makeNormalizedPoint(kH);return this._bounds}var kG=this.pixelToPointIn({x:kr[3],y:kr[0]},kD);var kq=kz.getPosition();var kV=Math.sqrt(Math.pow(kG.lng-kq[0],2)+Math.pow(kG.lat-kq[1],2));var kQ=this.getZoomUnits();var kX=kV/kQ;var kN=kz._frustumSideLen;var kv=kz._fovy;if(kX>kN||(90-T)kt){kt=kM[kR].lng}if(kM[kR].latky){ky=kM[kR].lat}}this._bounds.setSouthWest(new cD(kS,kY));this._bounds.setNorthEast(new cD(kt,ky));this._bounds.pointTopLeft=kG;this._bounds.pointTopRight=kT;this._bounds.pointBottomRight=kE;this._bounds.pointBottomLeft=kP;this._bounds.makeNormalizedPoint(kH);this._bounds.setMinMax();return this._bounds},isLoaded:function(){return !!this.loaded},_getBestLevel:function(i,kz){var ks=0;if(this._renderType==="webgl"&&!b2()){ks=100}var kt=kz.margins||[10,10,10,10];var kq=kz.zoomFactor||0;var ku=kt[1]+kt[3];var kr=kt[0]+kt[2];var e=this.getMinZoom();var ky=this.getMaxZoom();var kx=i.toSpan();var kw=kx.width/(this.width-ku-ks);var kv=kx.height/(this.height-kr-ks);var T=18-p(Math.max(kw,kv));if(Tky){T=ky}T+=kq;if(this._renderType!=="webgl"){T=Math.floor(T)}return T},getViewportIn:function(kz,kr){if(this.mapType===BMAP_EARTH_MAP){kz=kz||[];var kt=[];for(var kA=0;kA=0;ky--){ku.extend(ks[ky])}if(ku.isEmpty()){return kv}}var kE=ku.getCenter();var e=this._getBestLevel(ku,kr);if(kr.margins){var T=kr.margins;var kD=(T[1]-T[3])/2;var kw=(T[0]-T[2])/2;var kC=this.getZoomUnits(e);kE.lng=kE.lng+kC*kD;kE.lat=kE.lat+kC*kw}return{center:kE,zoom:e}},setViewportIn:function(kq,kr){if(this.mapType===BMAP_EARTH_MAP){var kv;if(kq&&kq.center){var T=jn.convertMC2LL(kq.center);var kt=this._earth._getEarthZoomByImgZoom(kq.zoom,T);kv={center:T,zoom:kt}}else{kv=[];for(var ks=0;kshX.MAX_DRAG_TILT_L2){i.setTilt(hX.MAX_DRAG_TILT_L2,{callback:function(){i._changeEarthMapType(e)}})}else{i._changeEarthMapType(e)}},_changeEarthMapType:function(T){var kq=this;var kt=kq.tileMgr.tileLayers;if(this._mapTypeChangAni){this._mapTypeChangAni.stop()}var ks;if(this._earth){ks=this._earth.getEarthCanvas()}if(!this._earth){this.maskLayer.style.opacity=1;this.maskLayer.style.zIndex=999;this.maskLayer.style.background="#000"}this._mapTypeChangAni=new fH({duration:400,render:function(e){if(!kq._earth){return}ks.style.opacity=e},finish:function(){for(var e=kt.length-1,ku=e;ku>=0;ku--){var kw=kt[ku].tilesDiv;if(kw){kw.style.visibility="hidden"}if(kt[ku]._isInnerLayer&&kq._renderType!=="webgl"){kq.removeTileLayer(kt[ku])}}kq._mapTypeChangAni=null;kq._mapTypeChanging=false;function kv(){var kA=kq.getZoom()-2;var kB=kq.getCenterIn();var ky=jn.convertMC2LL(kB);kq._earth=new bD.Earth(kq,{center:ky,zoom:kA,showRealSunlight:kq.config.showRealSunlight,showMilkyway:kq.config.showMilkyway,earthBackground:kq.config.earthBackground});if(kq.config&&kq.config.earthMaxZoom&&kq._earth){kq._earth.setMaxZoom(kq.config.earthMaxZoom)}if(kq.config&&kq.config.earthMinZoom&&kq._earth){kq._earth.setMinZoom(kq.config.earthMinZoom)}kq._proxyEarthEvents();var kx=kq.mapType;kq.mapType=T;var kz=new fS("onmaptypechange");kz.zoomLevel=this.zoomLevel;kz.mapType=T;kz.exMapType=kx;kq.dispatchEvent(kz);kq._setMapTypeStatus(T);e6.extend(kq,bD.EarthView.prototype);if(!kq._navigationCtrl&&kq.config.showControls){kq._navigationCtrl=new e8(kq)}}if(!kq._earth){if(bD["FeatureStyle"+kq.config.style]){kv()}else{kq.loadMapStyleFiles(function(){kv()})}}if(parseInt(kq.maskLayer.style.opacity,10)===1){setTimeout(function(){kq.maskLayer.style.zIndex=9;kq.maskLayer.style.opacity=0},1000)}}});if(!this._earth){return}var i=this.mapType;this.mapType=T;var kr=new fS("onmaptypechange");kr.zoomLevel=this.zoomLevel;kr.mapType=T;kr.exMapType=i;this.dispatchEvent(kr);kq._setMapTypeStatus(T);e6.extend(kq,bD.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){hI.sendMessage(aZ(4,i),[e])}},_setMapTypeStatus:function(T){var ku=arguments[1];if(T===BMAP_EARTH_MAP){var ks=this._earth.getEarthCanvas();if(ks){ks.style.display=""}var kv={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(jn.convertMC2LL(this.centerPoint),kv);this._earth.setImageZoom(this.zoomLevel,kv);this._earth.setTilt(this.getTilt(),kv);this._earth.setHeading(this.getHeading(),kv)}else{if(this.preMapType===BMAP_EARTH_MAP&&this._earth){var kt=this._earth;var kq=kt.getMapZoom();var kr=kt._imageRawZoom||kq;var i=kr-kq;var e=kt.getCenter();if(this._renderType==="webgl"){this._tilt=kt.getTilt();if(this.zoomLevel>7){this._heading=kt.getHeading();ku&&ku(e,kq);return}if(kt.getHeading()!==0){kt.setTilt(this.getTilt());kt.setHeading(this.getHeading(),{callback:function(){ku&&ku(e,kq)}})}else{ku&&ku(e,kq)}return}if(i<0.1&&kt.getTilt()===0&&kt.getHeading()===0){ku&&ku(e,kq);return}kt.setTilt(0);kt.setHeading(0);kt.setZoom(kt.getZoom()-i,{callback:function(){ku&&ku(e,kq)}})}}},_proxyEarthEvents:function(){var kr=this;var ks=this._earth;ks.on("tilesload",function(i){kr.fire(i)});ks.on("centerandzoom",function(i){kr.dispatchEvent(new fS("onmoveend"));kr.dispatchEvent(new fS("onzoomend"))});function kq(i){kr.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(kq){kq=kq||this._initDate;var T=fE(kq);var e=jn.convertLL2MC(new cD(T[0],T[1]));var ky=e.latLng;var kt=bD.Projection.convertMC2LL(this.centerPoint);var kv=kq.getUTCHours();var kx=kv+24*kt.lng/360;var kw=kx-12;var ku=kw*60*0.25;var ks=Math.asin(Math.sin(iP(kt.lat))*Math.sin(iP(ky.lat))+Math.cos(iP(kt.lat))*Math.cos(iP(ky.lat))*Math.cos(iP(ku)));var kr=Math.asin(Math.sin(iP(ku))*Math.cos(iP(ky.lat))/Math.cos(ks));var i="north";if(kt.lat=19){return hX.MAX_DRAG_TILT}else{if(e<=18){if(e=this._enableTiltZoom-2){return(1-(this._enableTiltZoom-e)/2)*hX.MAX_DRAG_TILT_L2}return 0}return hX.MAX_DRAG_TILT_L2}else{return(hX.MAX_DRAG_TILT-hX.MAX_DRAG_TILT_L2)*(e-18)+hX.MAX_DRAG_TILT_L2}}},worldSize:function(i){var e=i||this.zoomLevel;return hX.WORLD_SIZE_MC/this.getZoomUnits(e)},setTrafficOn:function(e){if(e&&Number(e)>1){jS.setZIndex(Number(e))}hI.sendMessage(aZ(4,3,3),["layer","traffic"]);this.addTileLayer(jS)},setTrafficOff:function(){this.removeTileLayer(jS)},showOverlayContainer:function(){this.setDisplayOptions({overlay:true})},hideOverlayContainer:function(){this.setDisplayOptions({overlay:false})},addLabelsToMapTile:function(kt,ks){hI.sendMessage(aZ(4,1,4),["instance","custom_label"]);for(var kq=0;kq"-1"){gX.load(kt)}else{bD["customStyleInfo_"+kB].xhr=ij.post(kt,ky,window["styleCbk_"+kB])}})}else{if(kt.indexOf("jsonp")>"-1"){gX.load(kt)}else{bD["customStyleInfo_"+kB].xhr=ij.post(kt,ky,window["styleCbk_"+kB])}}})}},getFeatureStyleTags:function(){var e=[];var kr=Object.keys(bD);for(var kq=0;kq-1&&bD[T]){e.push(T)}}return e},setCopyrightOffset:function(kq,i){var T=new fS("oncopyrightoffsetchange",{logo:kq,cpy:i});this.dispatchEvent(T)},_setTextRenderType:function(e){if(e){this.config.textRenderType=e;return}if(this.config.textRenderType!==null){return}if(b2()){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 fS("ondestroy"));var e=this.config.mapStyleId||0;delete bD["customStyleInfo_"+e];bD.BMAP_INSTANCES&&(bD.BMAP_INSTANCES-=1);if(!bD.BMAP_INSTANCES){this.destroyStyle()}this.config={};this.clearSpots();this._webGLStateId&&d1.WebGLState.remove(this._webGLStateId);this.container.onselectstart=null;this.container.style.backgroundImage="";this.maskLayer=null;this.platform=null;hI.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="";window.FeatureStyle=null;window.iconSetInfo_high=null;window.indoorStyle=null;window._indoorMgr=null},600)},destroyStyle:function(){var e=[];var kr=Object.keys(bD);for(var kq=0;kq-1||T.indexOf("iconSetInfo")>-1||T.indexOf("indoorStyle")>-1){e.push(T)}}for(var kq=0;kq"-1"){gX.load(kr)}else{bD["customStyleInfo_"+kz].xhr=ij.post(kr,kw,window["styleCbk_"+kz])}});var e={};if(i.area){e.area=i.area.map(function(kr){return jn.convertLL2MC(kr)})}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 u={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){u[i.type]=true;if(u.ontilesloaded&&u.onstyle_loaded){this.dispatchEvent(new fS("onstylechangetilesloaded"));this.removeEventListener("ontilesloaded",u.checkLoadedStatus);this.removeEventListener("onstyle_loaded",u.checkLoadedStatus)}},changeCopyright:function(){var e=this;if(e.map.cpyCtrl){e.map.cpyCtrl.hide();if(e.environment!=="customEditor"){e.map.setCopyrightOffset(new je(1,1))}}else{e.map.addEventListener("oncopyrightaddend",function(){e.map.cpyCtrl.hide();if(e.environment!=="customEditor"){e.map.setCopyrightOffset(new je(1,1))}})}},setEnvironment:function(e){if(e.customEditor){this.environment="customEditor";a0.map=this.map}else{if(e.sharing){this.environment="sharing"}else{if(e.preview){this.environment="preview"}else{this.environment="jsapi"}}}},getStyleJson:function(kq,ks){var kr=this;if(kq.styleJson){ks&&ks(kq.styleJson)}else{if(kq.styleId){var i=kq.styleId;var e=(Math.random()*100000).toFixed(0);bD["_cbk_si_phpui"+e]=function(ku){var kt=[];if(ku.result&&ku.result["error"]===0&&ku.content&&ku.content["status"]===0){kt=kr.parseJson(ku.content["data"]["json"]);ks&&ks(kt)}else{ks&&ks("default")}};bD["_cbk_si_api"+e]=function(ku){var kt=[];if(ku.status===0){if(ku.info){kt=kr.parseJson(ku.info["json"])}else{kt=kr.parseJson(ku.data["json"])}ks&&ks(kt)}else{ks&&ks("default")}};var T="";switch(this.environment){case"jsapi":T=eD.apiHost+"/?qt=custom_map&v=3.0&style_id="+i+"&type=publish&ak="+eW;T+="&callback="+fB+"._cbk_si_phpui"+e;break;case"sharing":T+="/apiconsole/custommap/getSharingJson";T+="?styleid="+i+"&type=edit";T+="&ck="+fB+"._cbk_si_api"+e;break;case"preview":T+="/apiconsole/custommap/getJson";T+="?styleid="+i+"&type=edit";T+="&ck="+fB+"._cbk_si_api"+e;break}gX.load(T)}else{ks&&ks("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"};var kr={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"};var kq=T.split(",");var e=kq.map(function(kv){var ku=kv.split("|").map(function(kB){var kz=i[kB.split(":")[0]];var ky=(kr[kB.split(":")[1]]?kr[kB.split(":")[1]]:kB.split(":")[1]);switch(ky){case"poi":ky="poilabel";break;case"districtlabel":ky="districtlabel";break}var kA={};kA[kz]=ky;return kA});var ks=ku[0];var kx=1;if(ku[1]["elementType"]){kx=2;e6.extend(ks,ku[1])}var kw={};for(var kt=kx;kt2){kB.push(ks.join("|"))}}return kB.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={};e6.extend(i,e.stylers);delete i.curZoomRegionId;delete i.curZoomRegion;delete i.level;if(e6.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 kq=e.stylers["level"];var T={};e6.extend(T,i);if(kq===undefined){return T}else{T[parseInt(kq,10)]=true;return T}},onStyleDataBack:function(kr,e,i,kq,kt,T){if(kr.status!==0){return}if(kr.data.style.length===3){if(!T.baseFs){T.baseFs=kr.data.style}bD.StyleBody=kr.data.style[2]}else{bD.StyleBody=kr.data.style}var ks=T.baseFs;bD["FeatureStyle"+i]=ks;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 a0={map:null,labelCache:{},calcDrawMc:function(T,i,e){var kq=[];switch(i){case"fill":kq=this.calcFill(T,e);break;case"line":break;case"building3d":kq=this.calcBuilding3d(T,e);break}return kq},calcFill:function(kr,T){var ks=[];for(var kq=0;kq0){ku=kr.verticesLength[T-1]}end=kr.verticesLength[T];var ks=[];var kq="";if(kr.vertex){ks=kr.vertex;kq="building3d"}else{if(kr.data[0]){ks=kr.data[0];kq=kr.type}else{continue}}var kt=this.calcDrawMc(ks.slice(ku,end),kq,e);this.map.addAreaSpot(kt,{userData:{styleId:kr.styleIds[T],type:"mapstyle"}})}},addLabelIntoAreaSpots:function(e){if(u.environment!=="customEditor"){return}for(var kr=0;krkt){return kt}while(kuT){ku=kr}else{kt=kr}kr=(kt-ku)*0.5+ku}return kr};cr.prototype.solve=function(e,i){return this.sampleCurveY(this.solveCurveX(e,i))};var gL={};function fH(T){var e={duration:1000,fps:30,delay:0,transition:gL.linear,dropLastAnimation:false};if(T){for(var kq in T){e[kq]=T[kq]}}if(T.beginTime){this._beginTime=T.beginTime}this._callbacks=[];this._options=e;if(e.delay){var kr=this;setTimeout(function(){kr._doStart()},e.delay)}else{this._doStart()}this._pauseTime=0}fH.INFINITE="INFINITE";fH.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===fH.INFINITE){this._endTime=null}else{this._endTime=this._beginTime+this._options.duration}this._loop()}};fH.prototype._loop=function(kq){var kt=this;kq=kq||new Date().getTime();kq=kq-this._pauseTime;if(!this._beginTime){this._beginTime=kq}if(!this._endTime&&typeof this._options.duration==="number"){this._endTime=this._beginTime+this._options.duration}if(kt._endTime!==null&&kq>=kt._endTime){if(kt._options.dropLastAnimation===false){kt._options.render(kt._options.transition(1),1,kq)}if(typeof kt._options.finish==="function"){kt._options.finish(kq,this)}for(var ks=0,e=kt._callbacks.length;ks=kr.percentage&&kq0){i.unselectable="on";i.selectstart=function(){return false};i.onmousedown=function(T){T.preventDefault();return false}}else{var e=kh(i);e.MozUserSelect="none";e.WebkitUserSelect="none";i.addEventListener("mousedown",function(T){T.preventDefault()},false)}}function aT(e){return e&&e.parentNode&&e.parentNode.nodeType!==11}function bP(i,e){i.insertAdjacentHTML("beforeEnd",e);return i.lastChild}function fX(T,i){var kq=document.createElement("div");kq.innerHTML=i;var e=kq.childNodes[0];return T.parentNode.insertBefore(e,T)}function aj(i){i=i||window.event;i.stopPropagation?i.stopPropagation():i.cancelBubble=true}function c(i){i=i||window.event;i.preventDefault?i.preventDefault():i.returnValue=false;return false}function hA(i){aj(i);return c(i)}function g3(){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 iC(kr){if(!kr){return}kr.onload=kr.onerror=null;var T=kr.attributes,kq,e,ks;if(T){e=T.length;for(kq=0;kq=e){return eC(kv,kr)}var i=ks/e;var ku=T.lng+(kr.lng-T.lng)*i;var kt=T.lat+(kr.lat-T.lat)*i;const kq={lng:ku,lat:kt};return eC(kv,kq)}function fj(T,i){var e=Math.round((T.x+i.x)/2);var kq=Math.round((T.y+i.y)/2);return new fr(e,kq)}function jy(e,T){var i=[];T=T||function(kr){return kr};for(var kq in e){i.push(kq+"="+T(e[kq]))}return i.join("&")}function b3(T,i,ks){var kt=document.createElement(T);if(ks){kt=document.createElementNS(ks,T)}i=i||{};for(var kq in i){var kr={"for":"htmlFor","class":"cssClass"}[kq]||kq;if(kq==="style"){kt.style.cssText=i[kq];continue}if(kq==="class"){e6.ac(kt,i[kq]);continue}if(kt.setAttribute){kt.setAttribute(kr,i[kq])}else{try{kt[kr]=i[kq]}catch(kt){}}}return kt}function cn(e){if(e.currentStyle){return e.currentStyle}else{if(e.ownerDocument&&e.ownerDocument.defaultView){return e.ownerDocument.defaultView.getComputedStyle(e,null)}}}function bX(e){return typeof e==="function"}function gn(e){return e===void 0}function jP(e,i){return Object.prototype.hasOwnProperty.call(e,i)}function g(kr,ks){if(gn(kr.length)){for(var kq in kr){if(jP(kr,kq)){ks.call(null,kq,kr[kq])}}}else{var T=kr.length;if(T){for(var e=0;e>4);kw=((kv&15)<<4)|(kt>>2);ku=((kt&3)<<6)|ks;T=T+String.fromCharCode(ky);if(kt!==64){T=T+String.fromCharCode(kw)}if(ks!==64){T=T+String.fromCharCode(ku)}ky=kw=ku="";kx=kv=kt=ks=""}while(kq-1||e.indexOf("iPad")>-1){return true}return false}function h5(){var e=navigator.userAgent;if(e.indexOf("Android")>-1){return true}return false}function iP(e){return e*Math.PI/180}function fi(e){return e/Math.PI*180}function bH(e,kr){var kq=Math.pow(10,kr);if(typeof e==="number"){return Math.round(e*kq)/kq}for(var T=0;Te){T=e}}return T}function en(e,i){while(e<0){e+=i}return e%i}function h2(i,e){return(i>=0&&e>=0)||(i<0&&e<0)}function M(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 iM(kq,T){for(var e=0;ekq||T.lati){return false}return true}function jm(ku,kt,ks,kq){var kr=W(ks,kq,ku);var T=W(ks,kq,kt);var i=W(ku,kt,ks);var e=W(ku,kt,kq);if(kr*T<0&&i*e<0){return true}else{if(kr===0&&jb(ks,kq,ku)){return true}else{if(T===0&&jb(ks,kq,kt)){return true}else{if(i===0&&jb(ku,kt,ks)){return true}else{if(e===0&&jb(ku,kt,kq)){return true}else{return false}}}}}}function hQ(T,i){var e=i.parentNode;if(e.lastChild===i){e.appendChild(T)}else{e.insertBefore(T,i.nextSibling)}}function dZ(kw,kx){if(kx===0){return kw}var kv=0;var kt=0;if(!kw){throw"异常"}if(kw.length===0){return[]}for(var kr=1,T=kw.length-1;krkv){kt=kr;kv=ku}}var e=[];if(kv>=kx){var kz=kw.slice(0,kt);var ky=kw.slice(kt,kw.length);var ks=dZ(kz,kx);var kq=dZ(ky,kx);for(var kr=0,T=ks.length;kr=0){kq=Math.floor(T/65536)*65536;i=kq;e=T-kq}else{kq=Math.floor(-T/65536)*65536;i=-kq;e=T+kq}return[i,e]}function cK(e){if(e.lng>=0&&e.lat>=0){return new cD(e.lng-10000000,e.lat-6000000)}if(e.lng>=0&&e.lat<0){return new cD(e.lng-10000000,e.lat+6000000)}if(e.lng<0&&e.lat>=0){return new cD(e.lng+10000000,e.lat-6000000)}if(e.lng<0&&e.lat<0){return new cD(e.lng+10000000,e.lat+6000000)}}var ip=null;if(window.performance&&window.performance.now){ip=function(){return performance.now()}}else{if(Date.now){ip=function(){return Date.now()}}else{ip=function(){return(new Date).getTime()}}}function h1(kq,e,i){var T="mouseWheel";if(e6.Platform.macintosh){if(!isNaN(kq)&&(kq<10||kq!==120)&&(e%1===0&&e<5)){T="padScroll"}if(e6.Browser.firefox&&(e%1===0&&e<5&&i===0)){T="padScroll"}}if(e6.Browser.safari&&kq===12){T="mouseWheel"}return T}function bQ(kz,ku){var ky=kz[0];var kx=kz[1];var kq=false;for(var kt=0,ks=ku.length-2;ktkx)!==(T>kx))&&(ky<(kv-kw)*(kx-kr)/(T-kr)+kw);if(e){kq=!kq}ks=kt}return kq}function au(kr,kt){kt=kt||[];var e=kt.length;var T=0;var ks=false;for(var kq=0;kq=kt[kq].lat)&&(kr.lat=kt[T].lat)&&(kr.lati){T=Math.pow(T-i+1,kq)+i-1}else{if(Tthis.ll.lng&&e.lngthis.ll.lat&&e.lathw){return az}return fD};hF.prototype.normalize=function(i,kq,e,T){if(i>e){this.ll.lng=e;this.ru.lng=i}else{this.ll.lng=i;this.ru.lng=e}if(kq>T){this.ll.lat=T;this.ru.lat=kq}else{this.ll.lat=kq;this.ru.lat=T}};function eE(i,kq,e,T){this.sp={lng:i,lat:kq};this.ep={lng:e,lat:T};this.mbr=new hF(i,kq,e,T)}function ir(kq,e,ks,kr){for(var T=0;T=e[T]&&kq.lng<=e[T+1]&&kq.lat>=ks[T]&&kq.lat<=ks[T+1]){return true}}return false}function gu(kv){var i=kv.lng;var ku=kv.lat;var kq=Math.sqrt(i*i+ku*ku);var ks=Math.atan2(ku,i);var T=kq+gF(ku);var kr=ks+gE(i);var e=T*Math.cos(kr);var kt=T*Math.sin(kr);return{lng:e+hT,lat:kt+hS}}function a3(kv){var i=kv.lng-hT;var ku=kv.lat-hS;var kq=Math.sqrt(i*i+ku*ku);var ks=Math.atan2(ku,i);var T=kq-gF(ku);var kr=ks-gE(i);var e=T*Math.cos(kr);var kt=T*Math.sin(kr);return{lng:e,lat:kt}}function gF(e){return Math.sin(e*fQ*i8)*g2}function gE(e){return Math.cos(e*fQ*i8)*g1}function at(T,i,e){return((i.lng-T.lng)*(e.lat-T.lat)-(e.lng-T.lng)*(i.lat-T.lat))}function hY(i,e){return Math.abs(i-e)<=hw}function gM(kq,T){var i=kq.lat*i8;var kv=kq.lng*i8;var e=T.lat*i8;var ku=T.lng*i8;var ks=Math.cos(i)*Math.cos(e);var kr=Math.cos(kv)*Math.cos(ku);var kx=Math.sin(i)*Math.sin(e);var kw=Math.sin(kv)*Math.sin(ku);var ky=ks*kr+ks*kw+kx;if(ky<-1){ky=-1}else{if(ky>1){ky=1}}var kt=Math.acos(ky)*iR;return kt}function h(ku,kt){var i=ku.lat*i8;var e=kt.lat*i8;var kq=ku.lng*i8;var T=kt.lng*i8;var ks=i-e;var kr=kq-T;var kv=Math.sin(ks/2)*Math.sin(ks/2)+Math.cos(i)*Math.cos(e)*Math.sin(kr/2)*Math.sin(kr/2);return 2*Math.asin(Math.sqrt(kv))*iR}function gK(kv,T){var kx=bF(kv,T);var kw=180;var ku=90;var kt=-180;var kr=-90;var ks=T.sp;var kq=T.ep;kw=ks.lng=kw&&kx.lng<=kr&&kx.lat>=ku){return gM(kv,kx)}else{var i=h(kv,T.sp);var e=h(kv,T.ep);return ikq.lat){if(at({lng:c8[e],lat:c6[e]},{lng:c8[(e+1)%ae],lat:c6[(e+1)%ae]},kq)>0){++T}}}else{if(c6[(e+1)%ae]<=kq.lat){if(at({lng:c8[e],lat:c6[e]},{lng:c8[(e+1)%ae],lat:c6[(e+1)%ae]},kq)<0){--T}}}}return T===0?fD:ig}function j5(kq){var kt={};if(kq.lnge5[2]+0.4||kq.lat>e5[3]+0.4){kt.lng=kq.lng;kt.lat=kq.lat;return kt}else{if(ir(kq,eN,eM,iL)){kt=gu(kq);return kt}}var e=0;var kw=dO;var T=0;var ku=new hF();var kv=1;if(bN(kq)===fD){for(var ks=0;kst[2]+0.4||i.lat>t[3]+0.4){T.lng=i.lng;T.lat=i.lat;return T}else{if(ir(i,cd,cb,iL)){T=a3(i);return T}}var e=j5(i);if(i.lng===e.lng&&i.lat===e.lng){T.lng=i.lng;T.lat=i.lat;return T}return decryptPt1(i,j5)}function iI(i,e){if(e===3&&i instanceof cD){var T=j5(i);return new cD(T.lng,T.lat)}else{return i}}function eP(i,e){if(e===3&&i instanceof cD){var T=e7(i);return new cD(T.lng,T.lat)}else{if(e===5&&i instanceof cD){return new cD(i.lng,i.lat)}else{return i}}}function o(ks){if(!ks){ks={}}var kt=JSON.stringify(ks);var kr=0,T,kq,e;if(kt.length===0){return kr}for(T=0,e=kt.length;Ti-lu?lu:lv},e.offset=function(i,lu){return lt(i=new Date(+i),null==lu?1:Math.floor(lu)),i},e.range=function(lv,i,lu){var lw=[];if(lv=e.ceil(lv),lu=null==lu?1:Math.floor(lu),!(i>lv&&lu>0)){return lw}do{lw.push(new Date(+lv))}while(lt(lv,lu),ls(lv),i>lv);return lw},e.filter=function(i){return ll(function(lu){for(;ls(lu),!i(lu);){lu.setTime(lu-1)}},function(lu,lv){for(;--lv>=0;){for(;lt(lu,1),!i(lu);){}}})},T&&(e.count=function(i,lu){return k5.setTime(+i),k9.setTime(+lu),ls(k5),ls(k9),Math.floor(T(k5,k9))},e.every=function(i){return i=Math.floor(i),isFinite(i)&&i>0?i>1?e.filter(lr?function(lu){return lr(lu)%i===0}:function(lu){return e.count(0,lu)%i===0}):e:null}),e}function la(e){return ll(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())*k4)/li})}function k2(e){return ll(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)/li})}var k5=new Date,k9=new Date,lg=ll(function(){},function(i,T){i.setTime(+i+T)},function(i,T){return T-i});lg.every=function(e){return e=Math.floor(e),isFinite(e)&&e>0?e>1?ll(function(i){i.setTime(Math.floor(i/e)*e)},function(i,T){i.setTime(+i+T*e)},function(i,T){return(T-i)/e}):lg:null};var lp=lg.range,ln=1000,k4=60000,lk=3600000,lc=86400000,li=604800000,kw=ll(function(e){e.setTime(Math.floor(e/ln)*ln)},function(i,T){i.setTime(+i+T*ln)},function(i,T){return(T-i)/ln},function(e){return e.getUTCSeconds()}),lm=kw.range,lb=ll(function(e){e.setTime(Math.floor(e/k4)*k4)},function(i,T){i.setTime(+i+T*k4)},function(i,T){return(T-i)/k4},function(e){return e.getMinutes()}),kE=lb.range,kY=ll(function(i){var T=i.getTimezoneOffset()*k4%lk;0>T&&(T+=lk),i.setTime(Math.floor((+i-T)/lk)*lk+T)},function(i,T){i.setTime(+i+T*lk)},function(i,T){return(T-i)/lk},function(e){return e.getHours()}),lh=kY.range,kO=ll(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())*k4)/lc},function(e){return e.getDate()-1}),kv=kO.range,kL=la(0),kN=la(1),kr=la(2),kJ=la(3),ky=la(4),k1=la(5),k8=la(6),kt=kL.range,k0=kN.range,kC=kr.range,kX=kJ.range,ld=ky.range,kZ=k1.range,lo=k8.range,lf=ll(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()}),lq=lf.range,kI=ll(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()});kI.every=function(e){return isFinite(e=Math.floor(e))&&e>0?ll(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 kB=kI.range,k6=ll(function(e){e.setUTCSeconds(0,0)},function(i,T){i.setTime(+i+T*k4)},function(i,T){return(T-i)/k4},function(e){return e.getUTCMinutes()}),kQ=k6.range,kP=ll(function(e){e.setUTCMinutes(0,0,0)},function(i,T){i.setTime(+i+T*lk)},function(i,T){return(T-i)/lk},function(e){return e.getUTCHours()}),kM=kP.range,kK=ll(function(e){e.setUTCHours(0,0,0,0)},function(i,T){i.setUTCDate(i.getUTCDate()+T)},function(i,T){return(T-i)/lc},function(e){return e.getUTCDate()-1}),kH=kK.range,kG=k2(0),kF=k2(1),kD=k2(2),kA=k2(3),kz=k2(4),ku=k2(5),ks=k2(6),kq=kG.range,kW=kF.range,lj=kD.range,k7=kA.range,le=kz.range,kV=ku.range,kU=ks.range,kT=ll(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()}),kS=kT.range,kx=ll(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()});kx.every=function(e){return isFinite(e=Math.floor(e))&&e>0?ll(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 kR=kx.range;k3.timeInterval=ll,k3.timeMillisecond=lg,k3.timeMilliseconds=lp,k3.utcMillisecond=lg,k3.utcMilliseconds=lp,k3.timeSecond=kw,k3.timeSeconds=lm,k3.utcSecond=kw,k3.utcSeconds=lm,k3.timeMinute=lb,k3.timeMinutes=kE,k3.timeHour=kY,k3.timeHours=lh,k3.timeDay=kO,k3.timeDays=kv,k3.timeWeek=kL,k3.timeWeeks=kt,k3.timeSunday=kL,k3.timeSundays=kt,k3.timeMonday=kN,k3.timeMondays=k0,k3.timeTuesday=kr,k3.timeTuesdays=kC,k3.timeWednesday=kJ,k3.timeWednesdays=kX,k3.timeThursday=ky,k3.timeThursdays=ld,k3.timeFriday=k1,k3.timeFridays=kZ,k3.timeSaturday=k8,k3.timeSaturdays=lo,k3.timeMonth=lf,k3.timeMonths=lq,k3.timeYear=kI,k3.timeYears=kB,k3.utcMinute=k6,k3.utcMinutes=kQ,k3.utcHour=kP,k3.utcHours=kM,k3.utcDay=kK,k3.utcDays=kH,k3.utcWeek=kG,k3.utcWeeks=kq,k3.utcSunday=kG,k3.utcSundays=kq,k3.utcMonday=kF,k3.utcMondays=kW,k3.utcTuesday=kD,k3.utcTuesdays=lj,k3.utcWednesday=kA,k3.utcWednesdays=k7,k3.utcThursday=kz,k3.utcThursdays=le,k3.utcFriday=ku,k3.utcFridays=kV,k3.utcSaturday=ks,k3.utcSaturdays=kU,k3.utcMonth=kT,k3.utcMonths=kS,k3.utcYear=kx,k3.utcYears=kR,Object.defineProperty(k3,"__esModule",{value:!0})});function fg(e){this._elemType=e;this._objCollection={}}fg.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=b3(this._elemType);e=bD.getGUID("obj_pool_");this._objCollection[e]=i;return i};fg.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}};fg.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 ij={get:function(i,kr,e,T){var kq=new XMLHttpRequest();kq.open("GET",i,true);kq.timeout=10000;kq.ontimeout=function(){T&&T()};kq.onreadystatechange=function(ks){if(this.readyState===4){if(this.status===200){kr&&kr(kq.responseText)}else{e&&e()}}};kq.send()},post:function(i,ks,kr,e,T){var kq=new XMLHttpRequest();kq.open("POST",i,true);kq.setRequestHeader("Content-type","application/x-www-form-urlencoded");kq.timeout=10000;kq.ontimeout=function(){T&&T()};kq.onreadystatechange=function(kt){if(this.readyState===4){if(this.status===200){kr&&kr(kq.responseText,ks)}else{e&&e()}}};kq.send(ks);return kq}};var gX=(function(e){function i(ks,T,kr){if(ks.indexOf("v=")===-1){ks+="&v=gl"}var kq=b3("script",{src:ks,type:"text/javascript",charset:"utf-8"});if(kq.addEventListener){kq.addEventListener("load",function(ku){var kt=ku.target;kt.parentNode.removeChild(kt);T&&T()},false);kq.addEventListener("error",function(ku){if(ku){var kt=ku.target;kt&&kt.parentNode&&kt.parentNode.removeChild(kt)}kr&&kr(null)},false)}else{if(kq.attachEvent){kq.attachEvent("onreadystatechange",function(ku){var kt=window.event.srcElement;if(kt&&(kt.readyState==="loaded"||kt.readyState==="complete")){kt.parentNode.removeChild(kt)}T&&T()})}}e.getElementsByTagName("head")[0].appendChild(kq)}return{load:function(kt,T,kq){if(typeof kt==="string"){i(kt,T,kq)}else{if(kt.length>0){var ks=kt.length;for(var kr=0;kr-1){return{col:kq,row:kw,zoom:kv,useZoom:T}}else{var kt=kl.mapZoomBaseIndex[kv];var ks=kl.baseScaleZoom[kt+1];if(!ks){return null}var ku=this.getFactorByZooms(ks,kv);var e=kl.baseZoomInfo[ks];return{col:Math.floor(kq/ku),row:Math.floor(kw/ku),zoom:ks,useZoom:e[e.length-1]}}return null}if(kv-1-1){return[{col:kr,row:kt,zoom:e,useZoom:T}]}else{var kE=0;var kB=e;while(kEkA){return null}var kz=Math.pow(2,kG);var i=kr*kz;var ky=kt*kz;var kv=e+kG;var kx=[];for(var kD=0;kD<2;kD++){var ks=i+kD;for(var kC=0;kC<2;kC++){var ku=ky+kC;kx.push({col:ks,row:ku,zoom:kv,useZoom:kv})}}return kx},getFactorByZooms:function(i,kq){var T=kl.mapZoomBaseIndex[i];var kr=kl.mapZoomBaseIndex[kq];var e=kl.baseScaleZoomMercatorSize[T];var ks=kl.baseScaleZoomMercatorSize[kr];return e/ks}};var dc={};var ab=["swiftshader","microsoft basic render driver"];var hz=["intel","nvidia","amd","apple","geforce"];function gO(e){e=e.toLowerCase();if(ab.indexOf(e)>=0){return true}if(e.indexOf("mobile")>=0){return true}return false}function cF(T){T=T.toLowerCase();for(var e=0;e=0){return true}}return false}function kj(e){if(!e){return false}if(gO(e)){return false}if(cF(e)){return true}return false}dc.ifEnableEarth=function(i){var e=dc.ifEnableEarth;if(!i&&typeof e._enable==="boolean"){return e._enable}if(dc.ifSupportWebGL()){e._enable=true;return true}e._enable=false;return false};dc.ifEnableWebGLMap=function(i){var e=dc.ifEnableWebGLMap;if(!i&&typeof e._enable==="boolean"){return e._enable}if(dc.ifSupportWebGL()){if(aJ.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};dc.params={};dc.ifSupportWebGL=function(){var i=dc.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 kr=null;var kx={alpha:true,antialias:false,failIfMajorPerformanceCaveat:false,preserveDrawingBuffer:false,stencil:false};try{kr=T.getContext("webgl",kx)||T.getContext("experimental-webgl",kx)}catch(kt){i._supportWebGL=false}if(kr===null){i._supportWebGL=false}else{i._supportWebGL=true;var kv=kr.getExtension("WEBGL_debug_renderer_info");var ku="";if(kv){ku=kr.getParameter(kv.UNMASKED_RENDERER_WEBGL);if(kj(ku)===true){i._supportWebGL=true}var kw=kr.getParameter(kv.UNMASKED_VENDOR_WEBGL);i._renderer=ku;i._vendor=kw}if(!kv&&e6.Browser.firefox){i._supportWebGL=true}if(!kv&&e6.Platform.macintosh){i._supportWebGL=true}if(kr.drawingBufferWidth!==T.width||kr.drawingBufferHeight!==T.height){i._supportWebGL=false}if(kr.getParameter(kr.MAX_VERTEX_TEXTURE_IMAGE_UNITS)<4){i._supportWebGL=false}var kq=kr.getParameter(kr.MAX_TEXTURE_SIZE);dc.params.maxTextureSize=kq;if(kq<4096){i._supportWebGL=false}var ks=kr.getParameter(kr.MAX_TEXTURE_IMAGE_UNITS);if(ks<8){i._supportWebGL=false}if(!kr.getShaderPrecisionFormat||kr.getShaderPrecisionFormat(kr.FRAGMENT_SHADER,kr.HIGH_FLOAT).precision<23){i._supportWebGL=false}}return i._supportWebGL};dc.ifSupportCanvas2d=function(){var kr=dc.ifSupportCanvas2d;if(typeof kr.supportCanvas2d==="boolean"){return kr.supportCanvas2d}var T=document.createElement("canvas");var i=null;try{i=T.getContext("2d")}catch(kq){kr.supportCanvas2d=false}if(i===null){kr.supportCanvas2d=false}else{kr.supportCanvas2d=true}return kr.supportCanvas2d};dc.ifCanvas2dInBlackList=function(){return true};dc.ifEnableCanvas2dMap=function(){return false;var i=navigator.userAgent;var e=0;var kq=0;var kr=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)){kq=parseFloat(RegExp.$1);if(kq>=6.1){if(/chrome\/(\d+\.\d)/i.test(i)){e=parseFloat(RegExp.$1);if(e>=31){return true}}if(/MSIE (\d+(\.\d+)?)/.test(i)){kr=parseFloat(RegExp.$1);if(kr>=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};dc.ifSupportCSS3=function(ku,i){var kt=document.createElement("div");var ks="Webkit Moz O ms".split(" ");var e=ks.length;var T="";var kq=kt.style;if(ku in kq){T=ku}ku=ku.replace(/^[a-z]/,function(kv){return kv.toUpperCase()});while(e--){var kr=ks[e]+ku;if(kr in kq){T=kr;break}}if(i){return T}else{return T.length>0?true:false}};dc.isModernBrowser=dc.ifSupportCanvas2d()&&dc.ifSupportCSS3("transform");function aA(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}aA.prototype.setData=function(kq,ks){var i=this._cache;var T=this._size;if(T===0){return}var e=this._curSize;if(e===T){this._removeOld()}var kr;if(!i[kq]){kr={key:kq,data:ks,older:null,newwer:null};i[kq]=kr;if(this._least===null){this._least=kr}if(this._most===null){this._most=kr}this._curSize++}else{kr=i[kq];kr.data=ks;if(this._most===kr){return}kr.older&&(kr.older.newer=kr.newer);kr.newer&&(kr.newer.older=kr.older);if(this._least===kr){this._least=kr.newer}}if(this._most&&this._most!==kr){this._most.newer=kr;kr.older=this._most;this._most=kr;kr.newer=null}};aA.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};aA.prototype.getAllData=function(){return this._cache};aA.prototype.getHitRate=function(){return this._hitTimes/this._getDataTimes};aA.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--};aA.prototype._removeOld=function(){var e=this._cache;var kq=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 k6(lb,la){var le,i,lg,T=(lg=300+(le=lb-105)+2*(i=la-35)+0.1*le*le+0.1*le*i+0.1*kV(kU(le)),lg+=2*(20*kP(6*le*k8)+20*kP(2*le*k8))/3,(lg+=2*(20*kP(le*k8)+40*kP(le/3*k8))/3)+2*(150*kP(le/12*k8)+300*kP(le/30*k8))/3),k9=function(lj,li){var lh=2*lj-100+3*li+0.2*li*li+0.1*lj*li+0.2*kV(kU(lj));return lh+=2*(20*kP(6*lj*k8)+20*kP(2*lj*k8))/3,lh+=2*(20*kP(li*k8)+40*kP(li/3*k8))/3,lh+2*(160*kP(li/12*k8)+320*kP(li*k8/30))/3}(lb-105,la-35),ld=la/180*k8,lc=kP(ld),lf=kV(lc=1-kO*lc*lc);return[T=180*T/(k0/lf*kR(ld)*k8),k9=180*k9/(k0*(1-kO)/(lc*lf)*k8)]}function kX(k9){var i=k9[0],T=k9[1];if(!k3(i,T)){return[i,T]}var la=k6(i,T);return[i+la[0],T+la[1]]}function kQ(lb){var lf=lb[0],T=lb[1];if(!k3(lf,T)){return[lf,T]}for(var k9=[lf,T],ld=k9[0],la=k9[1],le=kX([ld,la]),lc=le[0]-lf,lg=le[1]-T;kU(lc)>0.000001||kU(lg)>0.000001;){lc=(le=kX([ld-=lc,la-=lg]))[0]-lf,lg=le[1]-T}return[ld,la]}var k1=Math.sin,k2=Math.cos,ky=Math.atan2,k5=Math.sqrt,kN=3000*Math.PI/180;function kT(k9){var i=k9[0]-0.0065,T=k9[1]-0.006,lb=k5(i*i+T*T)-0.00002*k1(T*kN),la=ky(T,i)-0.000003*k2(i*kN);return[lb*k2(la),lb*k1(la)]}function kC(k9){var i=k9[0],T=k9[1],lb=k5(i*i+T*T)+0.00002*k1(T*kN),la=ky(T,i)+0.000003*k2(i*kN);return[lb*k2(la)+0.0065,lb*k1(la)+0.006]}var kK=180/Math.PI,kt=Math.PI/180,kv=6378137,k7=20037508.342789244;function kH(i){return[i[0]*kK/kv,(0.5*Math.PI-2*Math.atan(Math.exp(-i[1]/kv)))*kK]}function kW(k9){var i=Math.abs(k9[0])<=180?k9[0]:k9[0]-360*(k9[0]<0?-1:1),T=[kv*i*kt,kv*Math.log(Math.tan(0.25*Math.PI+0.5*k9[1]*kt))];return T[0]>k7&&(T[0]=k7),T[0]<-k7&&(T[0]=-k7),T[1]>k7&&(T[1]=k7),T[1]<-k7&&(T[1]=-k7),T}var kG,kF,kE,kM,kB,kq,kL=Math.abs,kY=[12890594.86,8362377.87,5591021,3481989.83,1678043.12,0],kA=[75,60,45,30,15,0],ks=[[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]],kZ=[[-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 kz(la,T,k9){var lc=kL(T)/k9[9],lb=k9[0]+k9[1]*kL(la),i=k9[2]+k9[3]*lc+k9[4]*Math.pow(lc,2)+k9[5]*Math.pow(lc,3)+k9[6]*Math.pow(lc,4)+k9[7]*Math.pow(lc,5)+k9[8]*Math.pow(lc,6);return[lb*=la<0?-1:1,i*=T<0?-1:1]}function kS(k9){for(var i=k9[0],T=k9[1],lb=[],la=0;lakA[la]){lb=kZ[la];break}}return kz(i,T,lb)}function kx(k9){for(var i=k9[0],T=k9[1],lb=[],la=0;la=kY[la]){lb=ks[la];break}}return kz(i,T,lb)}function kw(T,i){if(!T){throw new Error(i)}}function kI(i){return !!i&&"[object Array]"===Object.prototype.toString.call(i)}function kD(i){return !isNaN(Number(i))&&null!==i&&!kI(i)}function ku(){for(var k9=[],i=0;i=2,"Invalid input coordinate: "+ld),kw(kD(ld[0])&&kD(ld[1]),"Invalid input coordinate: "+ld),ld=ld.map(Number),la=!0);var k9=le;return la?k9(ld):(kr(ld,(function(lg){var i;i=k9(lg),lg[0]=i[0],lg[1]=i[1]})),ld)}})}));var hO={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(ks){var kt=ks.replace("#","");if(kt.length===3){kt+="f"}else{if(kt.length===6){kt+="ff"}}var e=[];var kr=kt.length;var kq=kr===8?2:1;for(var T=0;T=0&&kr<60){kt=ku;ks=T;e=0}else{if(kr>=60&&kr<120){kt=T;ks=ku;e=0}else{if(kr>=120&&kr<180){kt=0;ks=ku;e=T}else{if(kr>=180&&kr<240){kt=0;ks=T;e=ku}else{if(kr>=240&&kr<300){kt=T;ks=0;e=ku}else{if(kr>=300&&kr<360){kt=ku;ks=0;e=T}}}}}}kt=(kt+i)*255>255?255:(kt+i)*255;ks=(ks+i)*255>255?255:(ks+i)*255;e=(e+i)*255>255?255:(e+i)*255;return[Math.round(kt),Math.round(ks),Math.round(e)]},formatColorCssToRgbaArray:function(ks,T,kq){kq=(typeof kq!=="boolean")?true:kq;if(typeof ks!=="string"){return kq?[0,0,0,1]:[0,0,0,255]}var i=(ks||"Black").trim().toLowerCase();var e=[];var kr=hO.ColorRefTable[i];if(kr!==undefined){i=kr[0]}e=hO.parseCSSColor(i);if(T!==undefined&&!isNaN(Number(T))){T=Number(T);e[3]=hO.fitTo(T,0,1)}else{e[3]=Number((e[3]/255).toFixed(2))}if(!kq){e[3]=Math.floor(e[3]*255)}return e},fitTo:function(T,i,e){if(Te){T=e}}return T},generateColorRamp:function(e,kw,kx,kq,kC){kx=kx||[];kq=kq||"#ccc";kC=kC||1;const T=document.createElement("canvas");const kD=T.getContext("2d");T.width=256;T.height=kC;const ks=kw[0];const kz=kw[kw.length-1];if(e.length===kw.length){const kA=kD.createLinearGradient(0,0,256,1);for(var kv=0;kv>16)+(kK>>16)+(kJ>>16);return(kI<<16)|(kJ&65535)}function kB(kH,kI){return(kH<>>(32-kI))}function kw(kM,kJ,kI,kH,kL,kK){return kC(kB(kC(kC(kJ,kM),kC(kH,kK)),kL),kI)}function e(kJ,kI,kN,kM,kH,kL,kK){return kw((kI&kN)|(~kI&kM),kJ,kI,kH,kL,kK)}function kt(kJ,kI,kN,kM,kH,kL,kK){return kw((kI&kM)|(kN&~kM),kJ,kI,kH,kL,kK)}function kz(kJ,kI,kN,kM,kH,kL,kK){return kw(kI^kN^kM,kJ,kI,kH,kL,kK)}function kF(kJ,kI,kN,kM,kH,kL,kK){return kw(kN^(kI|~kM),kJ,kI,kH,kL,kK)}function T(kR,kM){kR[kM>>5]|=128<<(kM%32);kR[((kM+64)>>>9<<4)+14]=kM;var kJ;var kL;var kK;var kI;var kH;var kQ=1732584193;var kP=-271733879;var kO=-1732584194;var kN=271733878;for(kJ=0;kJ>5]>>>(kJ%32))&255)}return kH}function kv(kI){var kK;var kH=[];kH[(kI.length>>2)-1]=undefined;for(kK=0;kK>5]|=(kI.charCodeAt(kK/8)&255)<<(kK%32)}return kH}function ku(kH){return kA(T(kv(kH),kH.length*8))}function kG(kJ,kM){var kI;var kL=kv(kJ);var kH=[];var kK=[];var kN;kH[15]=kK[15]=undefined;if(kL.length>16){kL=T(kL,kJ.length*8)}for(kI=0;kI<16;kI+=1){kH[kI]=kL[kI]^909522486;kK[kI]=kL[kI]^1549556828}kN=T(kH.concat(kv(kM)),512+kM.length*8);return kA(T(kK.concat(kN),512+128))}function kE(kK){var kJ="0123456789abcdef";var kI="";var kH;var kL;for(kL=0;kL>>4)&15)+kJ.charAt(kH&15)}return kI}function kx(kH){return unescape(encodeURIComponent(kH))}function kq(kH){return ku(kx(kH))}function ky(kH){return kE(kq(kH))}function i(kH,kI){return kG(kx(kH),kx(kI))}function kD(kH,kI){return kE(i(kH,kI))}function kr(kI,kJ,kH){if(!kJ){if(!kH){return ky(kI)}return kq(kI)}if(!kH){return kD(kJ,kI)}return i(kJ,kI)}if(typeof define==="function"&&define.amd){define(function(){return kr})}else{if(typeof module==="object"&&module.exports){module.exports=kr}else{ks.md5=kr}}})(this);var cQ={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:"";ar&&ar(this.config,e);this.sender=true;if(T){this.sender=false}this.hosts=this.urlScope(this.hosts);this.sendError=this.notifyError();var kq=typeof window!=="undefined"?window:typeof global!=="undefined"?global:typeof self!=="undefined"?self:{};this.config.jsError&&this.handleJavaScriptError(kq);this.config.resourceError&&this.handleResourceError(kq);this.config.ajaxError&&this.handleAjaxError(kq)},handleJavaScriptError:function(T){var e=this;var i=T.onerror;T.onerror=function(ku,kt,kq,ks,kr){if(e.isFetch(e.category.JS)&&e.hostExit(kt)){if(kr&&kr.stack){e.sendError({title:ku,msg:kr.stack,category:e.category.JS,level:e.levels.ERROR})}else{if(typeof ku==="string"){e.sendError({title:ku,msg:JSON.stringify({resourceUrl:kt,rowNum:kq,colNum:ks}),category:"js",level:e.levels.ERROR})}}}if(i&&bX(i)){i&&i.apply(T,arguments)}}},handleResourceError:function(i){var e=this;i.addEventListener("error",function(ks){if(ks){var kt=ks.target||ks.srcElement;var kr=kt instanceof HTMLScriptElement||kt instanceof HTMLLinkElement||kt instanceof HTMLImageElement;if(!kr){if(!i.onerror){var T=ks.filename||null;if(!e.isFetch(e.category.JS)||!e.hostExit(T)){return}if(ks.error&&ks.error.stack){e.sendError({title:ks.message,msg:ks.error.stack,category:e.category.JS,level:e.levels.ERROR})}else{if(typeof ks.message==="string"){e.sendError({title:ks.message,msg:JSON.stringify({resourceUrl:T,rowNum:ks.lineno,colNum:ks.cowno}),category:e.category.JS,level:e.levels.ERROR})}}}return}var kq=kt.src||kt.href;if(e.isFetch(e.category.RESOURCE)&&e.hostExit(kq)){e.sendError({title:kt.nodeName,msg:kq,category:e.category.RESOURCE,level:e.levels.ERROR})}}},true)},handleAjaxError:function(ks){var e=this;var kr=ks.location.protocol;if(kr==="file:"){return}if(!ks.XMLHttpRequest){return}var i=ks.XMLHttpRequest;var T=i.prototype.send;var kq=function(ku){if(ku&&ku.currentTarget&&ku.currentTarget.status!==200){var kt=ku.target.responseURL;if(e.isFetch(e.category.AJAX)&&e.hostExit(kt)){e.sendError({title:kt,msg:JSON.stringify({response:ku.target.response,responseURL:kt,status:ku.target.status,statusText:ku.target.statusText}),category:e.category.AJAX,level:e.levels.ERROR})}}};i.prototype.send=function(){if(this["addEventListener"]){this["addEventListener"]("error",kq);this["addEventListener"]("load",kq);this["addEventListener"]("abort",kq)}else{var kt=this["onreadystatechange"];this["onreadystatechange"]=function(ku){if(this.readyState===4){kq(ku)}kt&&kt.apply(this,arguments)}}return T.apply(this,arguments)}},notifyError:function(T){var i=T||1000;this._idleWorkerTicker=(function(kq){return function(){kq.runJob()}})(this);var e=this;return function(kr){if(kr.url){if(!e.isFetch(kr.category)){return}var kq=kr.url||"";if(!e.hostExit(kq)){return}delete kr.url}if(!navigator.onLine){return}e.collections.push(kr);e.checkJob(i)}},runJob:function(){if(this.collections.length===0){clearInterval(this.idleWork);this.idleWork=null;return}var kr=this.collections.slice(0,2);var T=jw(JSON.stringify({dataset:kr}));var kq=new Date().getTime();var i=eD.apiIMG+"/blank.gif?product=jsapi&v=gl&l="+T+"&ak="+eW+"&t="+kq;if(this.sender){try{var kt=document.createElement("div");kt.style="width:0;height:0;visibility: hidden;opacity: 0;z-index:-999;background-image: url("+i+");";document.querySelector("BODY").appendChild(kt);setTimeout(function(){document.querySelector("BODY").removeChild(kt)})}catch(ks){}}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(kq){var T={};var ks=Object.keys(C);if(C&&ks.length>0){for(var kr in C){if(C[kr]&&(typeof C[kr]!=="function")){T[kr]=C[kr]}}}try{var ku=JSON.stringify(T);if(ku.length>2){return kq+"|"+ku}else{return kq}}catch(kt){return kq}},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 kr=T.host+T.pathname;if(this.ignoreUrl.indexOf(kr)===-1&&this.hosts.indexOf(T.host)>-1){return true}return false}catch(kq){return false}},isFetch:function(e){return this.config[e+"Error"]||false}};bD.fetchDebug=cQ;var hI={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(kr){var kq=kr||1000;e._idleWorkerTicker=(function(ks){return function(){ks.runJob()}})(e);return function(ks,kt){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[ks]){e.mark[ks]=true;e.records[ks]=kt}e.checkJob(kq)}})(T.timers)},runJob:function(){if(Object.keys(this.records).length===0){clearInterval(this.idleWork);this.idleWork=null;return}var ks=Object.keys(this.records);var kq=ks[0];var T=new Date().getTime();var kr="logCbk"+Math.floor(Math.random()*10000000000);bD[kr]=function(e){delete bD[kr]};var i=this.url+"&uid="+eW+"&bmapgl2=1&device="+(b2()?this.device.NA:this.device.PC)+"&module="+(this.records[kq][0]||"")+"&func="+(this.records[kq][1]||"")+"&subfunc="+(this.records[kq][2]||"")+"&t="+T+"&callback="+fB+"."+kr;i+=jA()(i);if(this.config.open){try{gX.load(i);delete this.records[kq]}catch(kt){}}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={}}};hI.init(true,{reset:20*60*1000});var j9={request:function(ky,ku,kq,kB,ks){var kv=new Date()["getTime"]();var kx=(Math.random()*100000)["toFixed"](0);bD._rd["_cbk"+kx]=function(kC){if(kC.result&&kC.result["error"]&&kC.result["error"]===202){alert("该AK因为恶意行为已经被管理员封禁!");return}if(kC.result&&kC.result["error"]&&kC.result["error"]===403){if(hb!==null){hb.update("未获得百度地图商用授权,可能导致部分地图请求失败,请刷新后重试。")}return}kq=kq||{};ky&&ky(kC,kq);delete bD._rd["_cbk"+kx]};kB=kB||"";var kA;var kr;if(kq&&kq.useEncodeURI){kA=jy(ku,encodeURI);kr=jy(ku)}else{kA=jy(ku,encodeURIComponent);kr=jy(ku)}var i=C.apiHost+"/"+kB+"?"+kA+"&ie=utf-8&oue=1&fromproduct=jsapi";var kw=C.apiHost+"/"+kB+"?"+kr+"&ie=utf-8&oue=1&fromproduct=jsapi";if(!ks){i+="&res=api";kw+="&res=api"}i+="&callback="+fB+"._rd._cbk"+kx;kw+="&callback="+fB+"._rd._cbk"+kx;var kt=window.___abvk?window.___abvk:j9.getSeckeyCidItem("SECKEY_ABVK");var e=j9.getSeckeyCidItem("BMAP_SECKEY");var kz=encodeURIComponent(kt+","+e);var T=kt+","+e;i+="&ak="+eW+"&v=gl&seckey="+kz+"&timeStamp="+kv;kw+="&ak="+eW+"&v=gl&seckey="+T+"&timeStamp="+kv;i+=jA()(kw);gX.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;bD._rd={};var dm={request:function(i,kv){var kr=new Date()["getTime"]();var ku=(Math.random()*100000).toFixed(0);if(kv){BMapGL._rd["_cbk"+ku]=function(kx){kv&&kv(kx);delete BMapGL._rd["_cbk"+ku]};i+="&callback=BMapGL._rd._cbk"+ku}function ks(ky){var kx;var kz=new RegExp("(^| )"+ky+"=([^;]*)(;|$)");if(kx=document.cookie.match(kz)){return unescape(kx[2])}else{return -1}}if(i.indexOf("v=")===-1){i+="&v=gl"}var kq=window.___abvk?window.___abvk:this.getSeckeyCidItem("SECKEY_ABVK");var e=this.getSeckeyCidItem("BMAP_SECKEY");var kw=encodeURIComponent(kq+","+e);var T=kq+","+e;signUrl=i+"&seckey="+T+"&timeStamp="+kr;i+="&seckey="+kw+"&timeStamp="+kr;i+=jA()(signUrl);var kt=b3("script",{src:i,type:"text/javascript",charset:"utf-8"});if(kt.addEventListener){kt.addEventListener("load",function(ky){var kx=ky.target;kx.parentNode.removeChild(kx)},false);kt.addEventListener("error",function(kx){kv&&kv([,,,,,])},false)}else{if(kt.attachEvent){kt.attachEvent("onreadystatechange",function(ky){var kx=window.event.srcElement;if(kx&&(kx.readyState=="loaded"||kx.readyState=="complete")){kx.parentNode.removeChild(kx)}})}}document.getElementsByTagName("head")[0].appendChild(kt);kt=null},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}}};function gS(){this._map=null;this._container;this._type="control";this.blockInfoWindow=true;this._visible=true}gS.inherits(de,"Control");e6.extend(gS.prototype,{initialize:function(e){this._map=e;if(this._container){if(this._opts&&this._opts.container){this._opts.container.appendChild(this._container)}else{e.container.appendChild(this._container)}return this._container}return},_i:function(e){if(!this._container&&this.initialize&&bX(this.initialize)){this._container=this.initialize(e)}this._opts=this._opts||{printable:false};this._setStyle();this._setPosition();if(this._container){this._container._jsobj=this}},_setStyle:function(){var i=this._container;if(i){var e=i.style;e.position="absolute";e.zIndex=this._cZIndex||"10";e.MozUserSelect="none";if(!this._opts.printable){e6.ac(i,"BMap_noprint")}e6.on(i,"contextmenu",hA)}},remove:function(){this._map=null;if(!this._container){return}this._container.parentNode&&this._container.parentNode.removeChild(this._container);this._container._jsobj=null;this._container=null},_render:function(e){if(this._opts&&this._opts.container){this._container=bP(this._opts.container,'
')}else{var i='
';if(e&&e.config.autoSafeArea&&cz()){this._safeAreaContainer=bP(this._map.container,i);this._safeAreaContainer.style.position="absolute";this._safeAreaContainer.style.bottom="env(safe-area-inset-bottom)";this._container=bP(this._safeAreaContainer,i)}else{this._container=bP(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(kq){if(this.anchorFixed||typeof kq!=="number"||isNaN(kq)||kqBMAP_ANCHOR_BOTTOM_RIGHT){kq=this.defaultAnchor}this._opts.offset=this._opts.offset||this.defaultOffset;var T=this._opts.anchor;this._opts.anchor=kq;if(!this._container){return}var ks=this._container;var e=this._opts.offset.width;var kr=this._opts.offset.height;ks.style.left=ks.style.top=ks.style.right=ks.style.bottom="auto";switch(kq){case BMAP_ANCHOR_TOP_LEFT:ks.style.top=kr+"px";ks.style.left=e+"px";break;case BMAP_ANCHOR_TOP_RIGHT:ks.style.top=kr+"px";ks.style.right=e+"px";break;case BMAP_ANCHOR_BOTTOM_LEFT:ks.style.bottom=kr+"px";ks.style.left=e+"px";break;case BMAP_ANCHOR_BOTTOM_RIGHT:ks.style.bottom=kr+"px";ks.style.right=e+"px";break;default:break}var i=["TL","TR","BL","BR"];e6.rc(this._container,"anchor"+i[T]);e6.ac(this._container,"anchor"+i[kq])},getAnchor:function(){return this._opts.anchor},setOffset:function(e){if(!e){return}this._opts=this._opts||{};this._opts.offset=new je(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 fS("onshow"))},hide:function(){if(this._visible===false){return}this._visible=false;if(this._container){this._container.style.display="none"}this.dispatchEvent(new fS("onhide"))},isPrintable:function(){return !!this._opts.printable},isVisible:function(){if(!this._container&&!this._map){return false}return !!this._visible},_asyncLoadCode:function(){var e=this;he.load("control",function(){if(e._asyncDraw){e._asyncDraw()}})}});var ep={TOP_LEFT:0,TOP_RIGHT:1,BOTTOM_LEFT:2,BOTTOM_RIGHT:3};bD.ControlAnchor=ep;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 gg(e){gS.call(this);e=e||{};this._opts={printable:false};e6.extend(this._opts,e);this._copyrightCollection=[];this.defaultAnchor=BMAP_ANCHOR_BOTTOM_LEFT;this.defaultOffset=new je(5,2);this.setAnchor(e.anchor);this._canShow=true;this.sateMapStyle=false;this.blockInfoWindow=false;this._asyncLoadCode()}gg.inherits(gS,"CopyrightControl");e6.extend(gg.prototype,{initialize:function(e){this._map=e;return this._container},addCopyright:function(kq){var e={minZoom:0,bounds:null,content:"",mapType:""};for(var T in kq){e[T]=kq[T]}if(this._map){var kt=e.minZoom;if(kt===-1||ktthis._map.getMaxZoom()){e.minZoom=this._map.getMinZoom()}if(e.mapType!==""&&!es[e.mapType]){e.mapType=BMAPGL_NORMAL_MAP}}var kr=this.getCopyright(kq.id);if(kr){for(var ks in e){kr[ks]=e[ks]}}else{this._copyrightCollection.push(e)}},getCopyright:function(kq){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 v(i){gS.call(this);i=i||{};this._opts={printable:false};this.defaultAnchor=BMAP_ANCHOR_TOP_RIGHT;this.defaultOffset=new je(10,10);this.setAnchor(i.anchor);this._opts=e6.extend(e6.extend(this._opts,{offset:this.defaultOffset,enableSwitch:true}),i);var e=this;he.load("control",function(){e._asyncDraw()})}v.inherits(gS,"MapTypeControl");e6.extend(v.prototype,{initialize:function(e){this._map=e;return this._container},showStreetLayer:function(e){this._map.showStreetLayer(e)}});function jq(e){gS.call(this);e=e||{};this._opts={};this._opts=e6.extend(this._opts,e);this._zoomInDisabled=false;this._zoomOutDisabled=false;this._zoomInTapped=false;this._zoomOutTapped=false;this.defaultAnchor=ep.BOTTOM_RIGHT;this.defaultOffset=new je(15,20);this.setAnchor(e.anchor);this._asyncLoadCode()}jq.inherits(gS,"ZoomControl");e6.extend(jq.prototype,{initialize:function(e){this._map=e;return this._container}});function gz(e){gS.call(this);e=e||{};this._opts={autoZoom:true,autoViewport:true};this._opts=e6.extend(this._opts,e);this.defaultAnchor=ep.BOTTOM_LEFT;this.defaultOffset=new je(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()}gz.inherits(gS,"LocationControl");e6.extend(gz.prototype,{initialize:function(e){this._map=e;return this._container},startLocation:function(){this._startLocationCalled=true},stopLocationTrace:function(){},setOptions:function(e){e=e||{};e6.extend(this._opts,e)}});function bG(e){gS.call(this);e=e||{};this._opts={};this._opts=e6.extend(this._opts,e);this.defaultAnchor=ep.BOTTOM_LEFT;this.defaultOffset=new je(5,15);if(b2()){this.defaultOffset=new je(10,10)}this.setAnchor(e.anchor)}bG.inherits(gS,"LogoControl");e6.extend(bG.prototype,{initialize:function(i){this._map=i;var e=this._container=document.createElement("div");e.innerHTML='';i.getContainer().appendChild(e);return e}});function av(e,i){this._map=e;this._indoorInfo=i;this._visible=true;this._adjustVisible=true;this._isMobile=b2();this._sizeConfig={FLOOR_BTN_HEIGHT:this._isMobile?35:26,SWITCH_ARROW_HEIGHT:this._isMobile?20:15};this._init()}av.prototype._init=function(){this._render();this._bindDom();this._bind();this._adjustDisplayHeight();var e=new fS("onindoor_bar_show");e.uid=this._indoorInfo.uid;e.floors=this._indoorInfo.floors;this._map.dispatchEvent(e)};av.prototype._render=function(){if(!this._indoorInfo){return}var ku=this._isMobile;var e=this._div=b3("div");e6.ac(e,"floor-select-container");ku&&e6.ac(e,"mobile");ku&&e6.ac(e,"all-border-radius");var i=this._btnTop=b3("button");e6.ac(i,"floor-switch-top");e6.ac(i,"top-border-radius");var ks=b3("div");e6.ac(ks,"floor-switch-top-icon");i.appendChild(ks);var kr=this._btnBottom=b3("button");var T=b3("div");e6.ac(T,"floor-switch-bottom-icon");kr.appendChild(T);e6.ac(kr,"floor-switch-bottom");e6.ac(kr,"bottom-border-radius");var kq=this._floorsContainer=b3("div");e6.ac(kq,"floors-container");kq.appendChild(this._createFloorsDom());this._div.appendChild(i);this._div.appendChild(kq);this._div.appendChild(kr);var kv=0;if(this._btnTop.style.display===""){kv=2*this._sizeConfig.SWITCH_ARROW_HEIGHT}this._div.style.height=parseInt(this._floorsContainer.style.height,10)+kv+"px";this._map.getContainer().appendChild(this._div);if(!ku){var kt=this;setTimeout(function(){kt._div.style.right="20px"},20)}};av.prototype._createFloorsDom=function(){if(!this._indoorInfo){return}var T=this._ol=b3("ol");var ks=this._indoorInfo.currentFloor;for(var kr=this._indoorInfo.floors.length-1;kr>=0;kr--){var kt=this._indoorInfo.floors[kr].floorName;var e=b3("li");var kq=b3("button");e6.ac(kq,"btn-select-floor");if(kr===ks){e6.ac(kq,"selected")}kq.setAttribute("data-floor",kr);kq.innerHTML=kt;e.appendChild(kq);T.appendChild(e)}return T};av.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()};av.prototype._bindDom=function(){var e=this;e6.on(this._floorsContainer,"click",function(kq){var T=kq.target||kq.srcElement;if(T.tagName.toLowerCase()==="button"){e._map.showIndoor(e._indoorInfo.uid,parseInt(T.getAttribute("data-floor"),10));var i=new fS("onindoor_bar_click");i.uid=e._indoorInfo.uid;e._map.dispatchEvent(i)}});e6.on(this._floorsContainer,"mouseover",function(T){var i=T.target;if(i.tagName.toLowerCase()==="button"){e6.ac(i,"hover")}});e6.on(this._floorsContainer,"mouseout",function(T){var i=T.target;if(i.tagName.toLowerCase()==="button"){e6.rc(i,"hover")}});e6.on(this._floorsContainer,"touchstart",function(T){var i=T.target;if(i.tagName.toLowerCase()==="button"){e6.ac(i,"onmousedown")}});e6.on(this._floorsContainer,"touchend",function(T){var i=T.target;if(i.tagName.toLowerCase()==="button"){e6.rc(i,"onmousedown")}});e6.on(this._btnTop,"mouseover",function(i){if(this._disable){return}e6.ac(this,"hover")});e6.on(this._btnTop,"mouseout",function(i){e6.rc(this,"hover")});e6.on(this._btnBottom,"mouseover",function(i){if(this._disable){return}e6.ac(this,"hover")});e6.on(this._btnBottom,"mouseout",function(i){e6.rc(this,"hover")});e6.on(this._btnTop,"touchstart",function(i){if(this.className.indexOf("disable")>-1){return}e6.ac(this,"onmousedown")});e6.on(this._btnTop,"touchend",function(i){e6.rc(this,"onmousedown")});e6.on(this._btnBottom,"touchstart",function(i){if(this.className.indexOf("disable")>-1){return}e6.ac(this,"onmousedown")});e6.on(this._btnBottom,"touchend",function(i){e6.rc(this,"onmousedown")});e6.on(this._btnTop,"click",function(i){e._setBarSliderTop(parseInt(e._ol.style.top,10)+26)});e6.on(this._btnBottom,"click",function(i){e._setBarSliderTop(parseInt(e._ol.style.top,10)-26)});e6.on(this._div,"mousemove",aj);e6.on(this._div,"wheel",hA);e6.on(this._div,"mousewheel",hA);this._map.addEventListener("resize",function(){e._adjustDisplayHeight()})};av.prototype._adjustDisplayHeight=function(){if(!this._indoorInfo){return}var ks=this._map.getSize().height;var kt=this._sizeConfig.FLOOR_BTN_HEIGHT;var ku=ks-291-100;if(this._isMobile){ku=ks-12-108-this._map.config.bottomOffset}var e=this._indoorInfo.floors.length;var T=e*kt;var kq=e;var kw=0;var kx=this._floorsContainer.children[0];if(T>ku){this._showArrow=true;e6.rc(kx.children[0].children[0],"top-border-radius");e6.rc(kx.children[e-1].children[0],"bottom-border-radius")}else{this._showArrow=false;e6.ac(kx.children[0].children[0],"top-border-radius");e6.ac(kx.children[e-1].children[0],"bottom-border-radius")}while(T>ku){if(kq===0){break}kq--;kw=2*this._sizeConfig.SWITCH_ARROW_HEIGHT;T=kq*kt+kw}this._currentDisplayHeight=T;if(kq<3){this._setAdjustVisbile(false)}else{this._setAdjustVisbile(true)}this._floorsContainer.style.height=kq*kt+"px";var kr=this._indoorInfo.currentFloor;var i=e-kr;var kv=kr-1;this._div.style.height=parseInt(this._floorsContainer.style.height,10)+kw+"px";var ky=-(e-(kr+Math.round(kq/2)))*kt;this._setBarSliderTop(ky);if(kq=i*T){kq=e-i*T;e6.ac(this._btnBottom,"disable");e6.rc(this._btnBottom,"hover");this._btnBottom._disable=true}else{e6.rc(this._btnBottom,"disable");this._btnBottom._disable=false}if(kq>=0){kq=0;e6.ac(this._btnTop,"disable");e6.rc(this._btnTop,"hover");this._btnTop._disable=true}else{e6.rc(this._btnTop,"disable");this._btnTop._disable=false}this._ol.style.top=kq+"px"};av.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"}};av.prototype._bind=function(){var i=this._map;var e=this;i.on("indoor_status_changed",function(ku){if(e._visible===false){return}var T=e._ol;var ks=ku.uid;if(!ks){return}var kt=ku.floor;for(var kr=0;kr=hX.HIGH_RES_MIN_RATIO?2:1;this._imgPath=C.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()}e6.extend(iT.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=b3("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=b3("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(){iM(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 fS("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 fS("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 fS("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 cY(T,i){this._map=T;this._target=T;var kq=T.temp.originMapType||T.mapType;if(kq==="B_EARTH_MAP"&&T._earth){this._target=T._earth}this._outContainer=i||T.getContainer();this._imgRatio=go()>=hX.HIGH_RES_MIN_RATIO?2:1;this._imgPath=C.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()}e6.extend(cY.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=b3("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(kq){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 fS("ontiltmsdown"));e._tiltAni=new fH({duration:9999999,render:function(kr){i=e._target.getTilt();if(T==="in"&&i0){e._target.setTilt(i-1,{noAnimation:true})}}},finish:function(){e._tiltAni=null}});e._clickTimer=null},200);kq.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(kq){if(!e._enabled){return}if(!e._clickTimer){return}if(e._target.getLock()){return}clearTimeout(e._clickTimer);e._map.fire(new fS("ontiltclick"));var i=e._target.getTilt();e._target.setLock(true);kq.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){kq=26;e=0;i=0}var kr="-"+(110+i+kq+e)+"px 1px";this._div&&(this._div.style.backgroundPosition=kr);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 hy(i){de.call(this);this._opts={container:null,cursor:"default",marker:true};this._opts=e6.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;he.load("menu",function(){e._draw()});hI.sendMessage(aZ(4,5,2),["control","menu"])}hy.inherits(de,"ContextMenu");e6.extend(hy.prototype,{initialize:function(i,e){this._map=i;this._overlay=e||null},remove:function(){this._map=this._overlay=null},addItem:function(kr,e){if(!kr||kr._type!="menuitem"||kr._text==""||kr._width<=0){return}for(var kq=0,T=this._items.length;kqthis._items.length-1){e=-1}kr._insertIndex=e;if(e===-1){this._items.push(kr);this._rItems.push(kr)}else{this._items.splice(e,0,kr);this._rItems.splice(e,0,kr)}},removeItem:function(kq){if(!kq||kq._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 kq=0,e=this._items.length;kqT){this._items[kq]._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 h9(T,kq,i){if(!T||!kq||typeof kq!="function"){return}de.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=kq;this._map=null;this._type="menuitem";this._contextmenu=null;this._container=null;this._enabled=true;var e=this;he.load("menu",function(){e._draw()})}h9.inherits(de,"MenuItem");e6.extend(h9.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 ib(e,i){this.setSouthWest(e);this.setNorthEast(i)}e6.extend(ib.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 kr=Math.max(this.sw.lng,T.sw.lng);var i=Math.min(this.ne.lng,T.ne.lng);var kq=Math.max(this.sw.lat,T.sw.lat);var e=Math.min(this.ne.lat,T.ne.lat);return new ib(new cD(kr,kq),new cD(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 cD(0,0)}var T;var kr;T=new cD(Math.abs(e.lng),Math.abs(e.lat));for(var kq=0;kq=this.MCBAND[kq]){kr=this.MC2LL[kq];break}}var ks=this.convertor(e,kr);return new cx(ks.lat,ks.lng)},convertLL2MC:function(kt){if(!kt){return new cD(0,0)}var kv=kt.lat;var kq=kt.lng;kq=this.getLoop(kt.lng,-180,180);kv=ch(kv,-85,85);var ks;for(var kr=0;kr=this.LLBAND[kr]){ks=this.LL2MC[kr];break}}if(!ks){for(kr=0;kre){T-=e-i}while(Ti-1){e=e-i}while(e<0){e=e+i}return e},getLoopBox:function(e,kq){var i=this.HALF_SIZE*2;if(e[0]>0&&kq[2]<0){kq[2]=kq[2]+i}else{if(e[0]<0&&kq[0]>0){kq[0]=kq[0]-i}}return kq},createOrUpdateTileCoord:function(T,e,kq,i){if(i!==undefined){i[0]=T;i[1]=e;i[2]=kq;return i}else{return[T,e,kq]}},createOrUpdateTileRange:function(e,kq,kr,T,i){if(i!==undefined){i.minX=e;i.maxX=kq;i.minY=kr;i.maxY=T;return i}else{return{minX:e,maxX:kq,minY:kr,maxY:T}}},fromEPSG4326:function(T,kv,kt){var kr=T.length;var ks=kt>1?kt:2;var e=kv;if(e===undefined){if(ks>2){e=T.slice()}else{e=new Array(kr)}}for(var kq=0;kqthis.MAX_SAFE_Y){ku=this.MAX_SAFE_Y}else{if(ku<-this.MAX_SAFE_Y){ku=-this.MAX_SAFE_Y}}e[kq+1]=ku}return e},toEPSG4326:function(T,ku,kt){var kr=T.length;var ks=kt>1?kt:2;var e=ku;if(e===undefined){if(ks>2){e=T.slice()}else{e=new Array(kr)}}for(var kq=0;kq90){i=90}}while(e<-180){e+=360}while(e>180){e-=360}e=e||0;i=i||0;cD.call(this,e,i)}cx.inherits(cD,"LatLng");e6.extend(cx.prototype,{equals:function(e){return(this.lat===e.lat&&this.lng===e.lng)},clone:function(){return new cx(this.lat,this.lng)},add:function(e){return new cx(this.lng+e.lng,this.lat+e.lat)},sub:function(e){return new cx(this.lat-e.lat,this.lng-e.lng)},mult:function(e){return new cx(this.lng*e,this.lat*e)},div:function(e){return new cx(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 cM(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 cx(e.lat,e.lng);this._ne=new cx(i.lat,i.lng);this._swLng=e.lng;this._swLat=e.lat;this._neLng=i.lng;this._neLat=i.lat}}e6.extend(cM.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 kr=Math.max(this._swLng,T._swLng);var i=Math.min(this._neLng,T._neLng);var kq=Math.max(this._swLat,T._swLat);var e=Math.min(this._neLat,T._neLat);this._sw=new cx(kq,kr);this._ne=new cx(e,i);this._swLng=kr;this._swLat=kq;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 cx(0,0)}if(!this._ne){this._ne=new cx(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=C.apiHost+"?qt=coords&coords=";e6.each(i,function(ks){e+=ks.lng+","+ks.lat+";"});e=e.replace(/;$/gi,"");e=e+"&from="+kr+"&to="+kq+"&v=gl&type=webgl&ak="+eW;dm.request(e,function(kt){data=kt.content;if(typeof data!=="undefined"&&data!==null&&data.status===0){var ks=[];e6.each(data.result,function(ku){ks.push(new cD(ku.x,ku.y))});delete data.result;data.points=ks}else{if(kt.result&&kt.result.error){data={status:kt.result.errror,message:"访问错误,请参考错误状态码https://lbsyun.baidu.com/index.php?title=webapi/appendix"}}}T&&T(data)})}});var em={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 ak={_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=bP(this._map.container,this._html);e6.on(e,"mouseup",function(T){if(T.button==2){hA(T)}});e6.on(e,"contextmenu",hA);e.style.display="none"},getDrawPoint:function(kq,kt,kr){kq=window.event||kq;var i=kq.offsetX||kq.layerX||0;var ks=parseInt(kq.offsetY)||parseInt(kq.layerY)||0;var T=kq.target||kq.srcElement;if(T!=ak.getDom(this._map)&&kt==true){while(T&&T!=this._map.container){if(!(T.clientWidth==0&&T.clientHeight==0&&T.offsetParent&&T.offsetParent.nodeName.toLowerCase()=="td")){i+=T.offsetLeft;ks+=T.offsetTop}T=T.offsetParent}}if(T!=ak.getDom(this._map)&&T!=this._map.container){return}if(typeof i==="undefined"||typeof ks==="undefined"){return}if(isNaN(i)||isNaN(ks)){return}if(kr){i=i+kr.x;ks=ks+kr.y}return this._map.pixelToPointIn(new fr(i,ks))},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 aS(){this._type="overlay"}aS.inherits(e6.BaseClass,"Overlay");aS.getZIndex=function(i,e){i=i*1;if(!i){return 0}if(e){i=jn.convertMC2LL(new cD(0,i)).lat}return(i*-100000)<<1};e6.extend(aS.prototype,{_i:function(T){this._map=T;if(!this.domElement&&bX(this.initialize)){this.domElement=this.initialize(T);if(this.domElement){this.domElement.style.WebkitUserSelect="none";if(this.enableDraggingMap!==undefined&&!this.enableDraggingMap&&!(this instanceof s)){var i=["mousedown","mouseout","mouseover","click","keydown","selectstart"];var e=this;e6.each(i,function(kq){e6.on(e.domElement,kq,aj)})}}}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 fS("onremove"))},hide:function(){this._visible=false;e6.hide(this.domElement)},show:function(){this._visible=true;e6.show(this.domElement)},getMap:function(){return this._map},dispose:function(){e6.BaseClass.prototype.decontrol.call(this)}});function eJ(){e6.BaseClass.call(this);aS.call(this);this._visible=true;this._visibleInternal=true;this.zIndex=0;this.infoWindow=null;this._dblclickTime=0}eJ.inherits(aS,"OverlayInternal");e6.extend(eJ.prototype,{initialize:function(e){this.map=e;e6.BaseClass.call(this,this.hashCode);return null},draw:function(){},remove:function(){this.decontrol();aS.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,kq){if(!T){return this.point}else{var e=kq?kq.width:0;var kr=kq?kq.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+kr}else{i.x=i.x+e;i.y=i.y+kr}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 aQ(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()}aQ.prototype._init=function(){if(this.map._renderType!=="webgl"){this._createOverlayContainers()}else{this._createWebGLOverlayContainers()}this._bind()};aQ.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)}};aQ.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)};aQ.prototype._createOverlayDiv=function(e,kq){var T=b3("div");var i=T.style;i.position="absolute";i.top=i.left=i.width=i.height="0";i.zIndex=kq;e.appendChild(T);return T};aQ.prototype._bind=function(){var kr=this.map;var kq=this;function i(kt){kq.draw(kt)}if(kr._renderType!=="webgl"){kr.addEventListener("load",i);kr.addEventListener("moveend",i);kr.addEventListener("resize",i);kr.addEventListener("zoomend",i);kr.addEventListener("zooming_inner",i)}else{kr.on("update",i)}kr.on("destroy",function(){kr._overlays={};kr._overlayArray=[];kr._customOverlays=[];kr.overlayDiv=null;kr.overlayDivEx=null;var kt=Object.keys(kr._panes);for(var ku=0;ku=0;kt--){if(kq._customOverlays[kt].enableMassClear!==false){this.removeOverlay(kq._customOverlays[kt]);kq._customOverlays.splice(kt,1)}}});kr.addEventListener("infowindowopen",function(ku){var kt=this.infoWindow;if(kt){e6.hide(kt.popDom);e6.hide(kt.shadowDom)}});function T(){if(this.getMapType()==="B_EARTH_MAP"||this._renderType==="webgl"){if(kq._zoomingOrMoving===false){this._panes.markerMouseTarget.style.display="none";kq._zoomingOrMoving=true}}}function e(kv){if(this.getMapType()==="B_EARTH_MAP"||this._renderType==="webgl"){if(kq._zoomingOrMoving===true){if(this._panes.markerMouseTarget){this._panes.markerMouseTarget.style.display=""}kq._zoomingOrMoving=false;for(var ku=0;ku1){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 ib();this.points=[];this.greatCirclePoints=[];this._parseCache=[];this._holesCache=[];this._parseCacheGL=[];this._parseCacheGLRaw=[];this._areaCacheGL=[];this._strokeStyleInfoForGL=[[]];this._fillStyleInfoForGL="";this.vertexMarkers=[];this._temp={}}iN.JOININDEX={miter:0,round:1,bevel:2};iN.CAPINDEX={round:0,butt:1,square:2};iN.inherits(eJ,"Graph");iN.getGraphPoints=function(i){var e=[];if(!i||i.length===0){return e}if(typeof i==="string"){var T=i.split(";");e6.each(T,function(kr){var kq=kr.split(",");e.push(new cD(kq[0],kq[1]))})}if(i.constructor===Array&&i.length>0){e=i}return e};iN.parseTolerance={0:[0.09,0.005,0.0001,0.00001],1:[9000,500,20,1]};e6.extend(iN.prototype,{initialize:function(e){this.map=e;return null},draw:function(){},setPoints:function(e){this._clearCache();this.points=iN.getGraphPoints(e).slice(0);this._calcBounds()},setPathIn:function(e){this.setPoints(e)},_calcBounds:function(){if(!this.points){return}var e=this;e._bounds=new ib();if(!this.hasMultipleParts){e6.each(this.points,function(i){e._bounds.extend(i)})}else{e6.each(this.points,function(i){e6.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 cD(e.lng,e.lat);this._calcBounds()},setPositionAt:function(i,e){if(!e||!this.points[i]){return}var T=jn.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 ib(jn.convertMC2LL(e.getSouthWest()),jn.convertMC2LL(e.getNorthEast()));i.setMinMax();return i},remove:function(){if(this.map){this.map.removeEventListener("onmousemove",this._graphMouseEvent);this.map.removeEventListener("onclick",this._graphClickEvent)}eJ.prototype.remove.call(this);this._clearCache();var e=new fS("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;he.load("poly",function(){e.addVertexs()},true)},disableEditing:function(){this._config.enableEditing=false;var e=this;he.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){ks=this.greatCirclePoints}var kr=e.config.coordType===2?1:e.config.coordType;var kt=this.getParseTolerance(e.getZoom(),kr);if(!this.hasMultipleParts){var kw=dZ(ks,kt)}else{var kw=[];for(var T=0;Tkr.maxY){T.bottom=4;T.all+=T.bottom}}if(e>kr.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 dP.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 dP.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(kq,kr,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(kq,kr==null?null:kr.angleTo(kq))};this.addMarkerAngle=function(kq,T){this.points.push(kq);this.angles.push(T)};this.getMarkerPoints=function(){return this.points};this.getMarkerAngles=function(){for(var kq=0;kq1){kw*=Math.sqrt(kL);kv*=Math.sqrt(kL)}var kD=(ky==ku?-1:1)*Math.sqrt(((Math.pow(kw,2)*Math.pow(kv,2))-(Math.pow(kw,2)*Math.pow(kT.y,2))-(Math.pow(kv,2)*Math.pow(kT.x,2)))/(Math.pow(kw,2)*Math.pow(kT.y,2)+Math.pow(kv,2)*Math.pow(kT.x,2)));if(isNaN(kD)){kD=0}var kC=new dP.Point(kD*kw*kT.y/kv,kD*-kv*kT.x/kw);var kr=new dP.Point((kO.x+kz.x)/2+Math.cos(T)*kC.x-Math.sin(T)*kC.y,(kO.y+kz.y)/2+Math.sin(T)*kC.x+Math.cos(T)*kC.y);var kJ=function(kU){return Math.sqrt(Math.pow(kU[0],2)+Math.pow(kU[1],2))};var kF=function(kV,kU){return(kV[0]*kU[0]+kV[1]*kU[1])/(kJ(kV)*kJ(kU))};var kR=function(kV,kU){return(kV[0]*kU[1]=1){kP=0}var kI=1-ku?1:-1;var kN=kS+kI*(kP/2);var i=new dP.Point(kr.x+kw*Math.cos(kN),kr.y+kv*Math.sin(kN));kM.addMarkerAngle(i,kN-kI*Math.PI/2);kM.addMarkerAngle(kz,kN-kI*Math.PI);kx.addPoint(kz.x,kz.y);if(kK!=null){var kF=kw>kv?kw:kv;var kG=kw>kv?1:kw/kv;var kE=kw>kv?kv/kw:1;kK.translate(kr.x,kr.y);kK.rotate(T);kK.scale(kG,kE);kK.arc(0,0,kF,kS,kS+kP,1-ku);kK.scale(1/kG,1/kE);kK.rotate(-T);kK.translate(-kr.x,-kr.y)}}break;case"Z":case"z":if(kK!=null){kK.closePath()}kM.current=kM.start}}return kx};this.getMarkers=function(){var kq=this.PathParser.getMarkerPoints();var ks=this.PathParser.getMarkerAngles();var kr=[];for(var T=0;Tthis.x2){this.x2=kr}}if(ks!=null){if(isNaN(this.y1)||isNaN(this.y2)){this.y1=ks;this.y2=ks}if(ksthis.y2){this.y2=ks}}};this.addX=function(kr){this.addPoint(kr,null)};this.addY=function(kr){this.addPoint(null,kr)};this.addBoundingBox=function(kr){this.addPoint(kr.x1,kr.y1);this.addPoint(kr.x2,kr.y2)};this.addQuadraticCurve=function(kw,kv,ks,kr,ky,kx){var ku=kw+2/3*(ks-kw);var kt=kv+2/3*(kr-kv);var kA=ku+1/3*(ky-kw);var kz=kt+1/3*(kx-kv);this.addBezierCurve(kw,kv,ku,kA,kt,kz,ky,kx)};this.addBezierCurve=function(kE,kD,kv,kt,kA,ky,kG,kF){var kw=[kE,kD],ku=[kv,kt],ks=[kA,ky],kr=[kG,kF];this.addPoint(kw[0],kw[1]);this.addPoint(kr[0],kr[1]);for(jC=0;jC<=1;jC++){var kH=function(kL){return Math.pow(1-kL,3)*kw[jC]+3*Math.pow(1-kL,2)*kL*ku[jC]+3*(1-kL)*Math.pow(kL,2)*ks[jC]+Math.pow(kL,3)*kr[jC]};var kJ=6*kw[jC]-12*ku[jC]+6*ks[jC];var kK=-3*kw[jC]+9*ku[jC]-9*ks[jC]+3*kr[jC];var kI=3*ku[jC]-3*kw[jC];if(kK==0){if(kJ==0){continue}var kC=-kI/kJ;if(0=0){kq=kq+1}else{kq=1+kq}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("+kq+")"}if(!this.isReDraw){this._refresh(e)}}};fp.prototype._refresh=function(e){e.textureCoord=e.textureCoordGLMap=null;var i=new fS("onstatus_change");i.overlay=e;i.action="setIcon";i.imageUrlChanged=true;setTimeout(function(){e.fire(i)},100)};fp.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}};fp.prototype.getCurrentImageUrl=function(){return this.id};fp.prototype.getRenderData=function(){this._renderData=this.generateRenderData();return this._renderData};fp.prototype.toString=function(){return"Symbol"};var fF={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 cc={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 dR(i,e){fp.call(this);e=e||{};this.style={anchor:e.anchor||new je(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 je(0,0);this.anchor=new je(0,0);this._rawPath=i;this._buildPath(true)}dR.inherits(fp,"SVGSymbol");dR.generateKey=function(kq,i){if(!kq){return null}if(parseInt(kq)){kq=parseInt(kq)}if(typeof kq==="number"){if(!fF[kq]&&![0,1,2,0,4][kq]){return null}}var e={anchor:i.anchor||new je(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=o({path:kq,style:e});return"symbol_svg_icon_"+T};e6.extend(dR.prototype,{_buildPath:function(kB){var kv=this;var kx=kv._rawPath;if(parseInt(kx)){kx=parseInt(kx)}if(fF[kx]){kx=fF[kx]}kv.id=dR.generateKey(kx,kv.style);if(!kv.id){return}switch(kx){case cc.BMap_Symbol_SHAPE_CIRCLE:var ky=kv._calSize(2),kw=ky,kG=kv.style.scale,kr=kv._anchor;this.size=new je(ky,kw);this.anchor=new je(ky/2+kr.width*kG,kw/2+kr.height*kG);kv.path=cc.BMap_Symbol_SHAPE_CIRCLE;break;case cc.BMap_Symbol_SHAPE_RECTANGLE:var ky=kv._calSize(4),kw=kv._calSize(2),kr=kv._anchor,kD=kv.style.strokeWeight!==undefined?kv.style.strokeWeight:kv.style.scale,kG=kv.style.scale;this.size=new je(ky,kw);this._originOffset=new je(Math.floor(-kD/2),Math.floor(-kD/2));this.anchor=new je(ky/2+kr.width*kG,kw/2+kr.height*kG);kv.path=cc.BMap_Symbol_SHAPE_RECTANGLE;break;case cc.BMap_Symbol_SHAPE_STAR:var ky=kv._calSize(20),kw=ky,kr=kv._anchor,kG=kv.style.scale;this.size=new je(ky,kw);this.anchor=new je(ky/2+kr.width*kG,kw/2+kr.height*kG);kv.path=cc.BMap_Symbol_SHAPE_STAR;break;default:var kx=new dP(kx),kq=kx.bounds(),kA=kv.style.rotation*Math.PI/180,kD=kv.style.strokeWeight!==undefined?kv.style.strokeWeight:kv.style.scale,kG=kv.style.scale,kr=kv._anchor;var kF=new je(Math.floor(kq.x1*kG-kD/2),Math.floor(kq.y1*kG-kD/2)),e={topleft:new fr(Math.floor(kq.x1*kG-kD/2)-kG*kr.width,Math.floor(kq.y1*kG-kD/2)-kG*kr.height),bottomleft:new fr(Math.floor(kq.x1*kG-kD/2)-kG*kr.width,Math.ceil(kq.y2*kG-kD/2)-kG*kr.height),topright:new fr(Math.ceil(kq.x2*kG+kD/2)-kG*kr.width,Math.floor(kq.y1*kG-kD/2)-kG*kr.height),bottomright:new fr(Math.ceil(kq.x2*kG+kD/2)-kG*kr.width,Math.ceil(kq.y2*kG+kD/2)-kG*kr.height)},i={},kE=[],ku=[];var kC=e.topleft.x===0?0:Math.atan(e.topleft.y/e.topleft.x),T=kC+kA;for(var kz in e){var kt=Math.cos(kA)*e[kz].x-Math.sin(kA)*e[kz].y,ks=Math.sin(kA)*e[kz].x+Math.cos(kA)*e[kz].y;i[kz]=new fr(kt,ks);kE.push(kt);ku.push(ks)}xmax=Math.max.apply(Math,kE),ymax=Math.max.apply(Math,ku),xmin=Math.min.apply(Math,kE),ymin=Math.min.apply(Math,ku);this.size=new je(Math.ceil(xmax-xmin),Math.ceil(ymax-ymin));this.anchor=new je(-xmin,-ymin);this._originOffset=new je(xmin-i.topleft.x,ymin-i.topleft.y);this._innerOffset=new fr(kF.width,kF.height);this._rotationAngle=kA;kv.path=kx;break}this.imageSize=new je(this.size.width,this.size.height);this.offset=this.anchor;if(kB){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 kw=this,kq=this.style.scale,kx,ky=this.size;if(this.context){kx=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}kx.clearRect(0,0,this.size.width*2,this.size.height*2);kx.fillStyle=hO.convert2rgba(kw.style.fillColor,kw.style.fillOpacity);kx.strokeStyle=hO.convert2rgba(kw.style.strokeColor,kw.style.strokeOpacity);kx.save()}else{return false}kx.scale(2,2);kx.lineCap="round";kx.lineJoin="round";kx.lineWidth=kw.style.strokeWeight||kq;if(kw._originOffset){kx.translate(-kw._originOffset.width,-kw._originOffset.height)}if(kw._rotationAngle){kx.rotate(kw._rotationAngle)}if(kw._innerOffset){kx.translate(-kw._innerOffset.x,-kw._innerOffset.y)}switch(kw.path){case cc.BMap_Symbol_SHAPE_CIRCLE:kx.arc(ky.width/2,ky.height/2,kq,0,2*Math.PI);break;case cc.BMap_Symbol_SHAPE_RECTANGLE:kx.rect(0,0,4*kq,2*kq);break;case cc.BMap_Symbol_SHAPE_STAR:kx.beginPath();var ks=ky.width/2,ku=kq*10;var kr=(2*Math.PI)/10;for(var kt=11;kt!=0;kt--){var e=ku*(kt%2+1)/2;var kv=kr*kt;kx.lineTo((e*Math.sin(kv))+ks,(e*Math.cos(kv))+ks)}kx.closePath();break;default:kx.lineWidth=kx.lineWidth/kq;kx.scale(kq,kq);kw.path.draw(kx)}kx.fill();kx.stroke();kx.restore();this.data=kx.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=hO.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()}});bD.SymbolShapeType=cc;function jH(ks,kq,T){if(!ks||!kq){return}this.imageUrl=null;this.imageDom=null;if(typeof ks==="string"){this.imageUrl=ks}else{this.imageDom=ks;if(!this.imageDom.id){this.imageDom.id=bD.getGUID("icon_dom_")}}this.size=kq;var kr=new je(Math.floor(kq.width/2),Math.floor(kq.height/2));var i={offset:kr,imageOffset:new je(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)}jH.prototype.setImageUrl=function(e){if(!e){return}this.imageUrl=e;this._renderData=null};jH.prototype.getCurrentImageUrl=function(){if(window.devicePixelRatio>1&&this.srcSetObject["2x"]){return this.srcSetObject["2x"]}return this.imageUrl};jH.prototype.setPrintImageUrl=function(e){if(!e){return}this.printImageUrl=e};jH.prototype.setSize=function(e){if(!e){return}this.size=new je(e.width,e.height);this._renderData=null};jH.prototype.setOffset=function(e){if(!e){return}this.anchor=this.offset=new je(e.width,e.height);this._renderData=null};jH.prototype.setAnchor=function(e){this.setOffset(e)};jH.prototype.setImageOffset=function(e){if(!e){return}this.imageOffset=new je(e.width,e.height);this._renderData=null};jH.prototype.setInfoWindowOffset=function(e){if(!e){return}this.infoWindowOffset=new je(e.width,e.height)};jH.prototype.setImageSize=function(e){if(!e){return}this.imageSize=new je(e.width,e.height)};jH.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};jH.prototype.toString=function(){return"Icon"};jH.prototype.generateRenderData=function(ks){var T=this.offset;var e=this.size;var ku=this.imageOffset;var kt=[];kt.push(-T.width,T.height-e.height,0);kt.push(e.width-T.width,T.height-e.height,0);kt.push(e.width-T.width,T.height,0);kt.push(-T.width,T.height-e.height,0);kt.push(e.width-T.width,T.height,0);kt.push(-T.width,T.height,0);if(ks!==0){for(var kr=0;kr730){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=C.imgPath;this.overlay=null;hI.sendMessage(aZ(4,2,10),["overlay","infowindow"]);var e=this;he.load("infowindow",function(){e._draw()})}ec.inherits(e6.BaseClass,"InfoWindow");e6.extend(ec.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(){e6.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=jn.convertMC2LL(e);return eP(i)}return jn.convertMC2LL(e)},getOffset:function(){return this._config.offset},dispose:function(){e6.BaseClass.prototype.decontrol.call(this)},toString:function(){return"InfoWindow"}});hX.prototype.openInfoWindow=function(T,e){T.latLng=new cx(e.lat,e.lng);var i=jn.convertLL2MC(e);this.openInfoWindowIn(T,i)};hX.prototype.closeInfoWindow=function(){var e=this.temp.infoWin||this.temp._infoWin;if(e&&e.overlay){e.overlay.closeInfoWindow()}};hX.prototype.openInfoWindowIn=function(kq,e){if(!kq||kq.toString()!=="InfoWindow"||!e||e.toString()!=="Point"){return}var i=this.temp;if(!i.marker){var T=new jH(C.imgPath+"blank.gif",{width:1,height:1});i.marker=new j3(e,{icon:T,width:1,height:1,offset:new je(0,0),infoWindowOffset:new je(0,0),clickable:false});i.marker._fromMap=1}else{i.marker.setPoint(e)}this.addOverlay(i.marker);i.marker.show();i.marker.openInfoWindow(kq)};eJ.prototype.openInfoWindow=function(e){if(this.map){this.map.closeInfoWindow();e._visible=true;this.map.temp._infoWin=e;e.overlay=this;e6.BaseClass.call(e,e.hashCode)}};eJ.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 bj(T,i){eJ.call(this);this.content=T;this.map=null;this.domElement=null;this._config={width:0,offset:new je(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;hI.sendMessage(aZ(4,2,6),["overlay","dom_label"]);var e=this;he.load("marker",function(){e._draw()})}bj.inherits(eJ,"Label");e6.extend(bj.prototype,{setPoint:function(e){if(e&&e.toString()==="Point"&&!this.getMarker()){if(this.coordType===BMAP_COORD_GCJ02){var i=iI(e,3);this.point=this._config.point=new cD(i.lng,i.lat)}else{this.point=this._config.point=new cD(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 je(e.width,e.height)},getOffset:function(){return this._config.offset},setStyle:function(e){e=e||{};this._config.styles=e6.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 h4(T,i){var kq={};for(var e in i){if(i.hasOwnProperty(e)){if(e==="position"){kq.point=jn.convertLL2MC(i[e]);this.latLng=new cx(i[e]["lat"],i[e]["lng"])}else{kq[e]=i[e]}}}bj.call(this,T,kq)}h4.inherits(bj,"LabelOut");e6.extend(h4.prototype,{toString:function(){return"Label"},setPosition:function(e){this.latLng=new cx(e.lat,e.lng);var i=jn.convertLL2MC(e);this.setPoint(i)},getPosition:function(){return this.latLng}});window.BMAP_ANIMATION_DROP=1;window.BMAP_ANIMATION_BOUNCE=2;function j3(e,i){eJ.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 je(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;he.load("marker",function(){T._draw()})}j3.TOP_ZINDEX=aS.getZIndex(-90)+1000000;j3.DRAG_ZINDEX=j3.TOP_ZINDEX+1000000;j3._injectMethond=function(e){e6.extend(j3.prototype,e)};j3.inherits(eJ,"Marker");e6.extend(j3.prototype,{toString:function(){return"Marker"},_addlog:function(){var e=1;var i="normal";if(this._config.icon instanceof dR){e=2;i="svg_symbol"}else{if(this._config.icon instanceof fp){e=3;i="custom_symbol"}}hI.sendMessage(aZ(4,2,1,e),["overlay","marker",i])},setOptions:function(e){this.setConfig(e);if(!e.icon){this._config.icon=new jH(C.imgPath+"marker_red.png",new je(23,25),{offset:new je(10,25),infoWindowOffset:new je(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 bj)){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=iI(e,3);this.point=this._config.point=new cD(i.lng,i.lat);this.latLng=jn.convertMC2LL(i)}else{this.point=this._config.point=new cD(e.lng,e.lat);this.latLng=jn.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 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 s(e,T){this.latLng=new cx(e.lat,e.lng);var i=jn.convertLL2MC(e);j3.call(this,i,T)}s.inherits(j3,"MarkerOut");e6.extend(s.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 gH();var ks=e.readFeaturesFromObject(T)||[];for(var kq=0,kr=ks.length;kq1||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 kq=i.getCurrentImageUrl()!==e;this._config.icon=i;this.textureCoord=this.textureCoordGLMap=null;this.draw();var T=new fS("onstatus_change");T.overlay=this;T.action="setIcon";T.imageUrlChanged=kq;this.fire(T)}},getIcon:function(){return this._config.icon},setPosition:function(e){this.latLng=new cx(e.lat,e.lng);var i=jn.convertLL2MC(e);this.setPositionIn(i)},getPosition:function(){var e=this.getPositionIn();return jn.convertMC2LL(e)}});function f4(T,e){iN.call(this,e);this._normalizedBounds=new ib();this.setPoints(T);this._addlog(e);var i=this;he.load("poly",function(){i._draw()})}f4.inherits(iN,"Polyline");e6.extend(f4.prototype,{_addlog:function(e){var i=1;var T="normal";if(e&&e.strokeTexture){i=2;T="texture"}hI.sendMessage(aZ(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(kt){this._clearCache();this.points=iN.getGraphPoints(kt).slice(0);if(this._config.geodesic===true){this.greatCirclePoints.length=0;for(var kr=0;kr15437726){if(ks.lng0){e6.each(e.greatCirclePoints,function(i){e._bounds.extend(i)})}else{e6.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<-hX.WORLD_SIZE_MC_HALF||e._normalizedBounds.ne.lng>hX.WORLD_SIZE_MC_HALF){e._normalizedBounds.sw.lng=-hX.WORLD_SIZE_MC_HALF;e._normalizedBounds.ne.lng=hX.WORLD_SIZE_MC_HALF}},calcGreatCirclePoints:function(kq,T){var ks=kq.latLng;var kr=T.latLng;if(ks.equals(kr)){return}var e=jn.getDistance(iP(ks.lng),iP(ks.lat),iP(kr.lng),iP(kr.lat));if(e<250000){return}var kw=Math.round(e/150000);var kA=this.calcAngularDistance(ks,kr);this.greatCirclePoints.push(kq);var kz=ks.lng;var ky=kq;for(var kt=0;kt30037726){if(kx.lng30037726){if(T.lng0){e6.each(e.greatCirclePoints,function(i){e._bounds.extend(i)})}else{e6.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<-hX.WORLD_SIZE_MC_HALF||e._normalizedBounds.ne.lng>hX.WORLD_SIZE_MC_HALF){e._normalizedBounds.sw.lng=-hX.WORLD_SIZE_MC_HALF;e._normalizedBounds.ne.lng=hX.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(kq,ks){var T=[];for(var e=0;e0){e6.each(e.greatCirclePoints,function(i){e._bounds.extend(i)})}else{e6.each(e.points,function(i){e6.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<-hX.WORLD_SIZE_MC_HALF||e._normalizedBounds.ne.lng>hX.WORLD_SIZE_MC_HALF){e._normalizedBounds.sw.lng=-hX.WORLD_SIZE_MC_HALF;e._normalizedBounds.ne.lng=hX.WORLD_SIZE_MC_HALF}}});function ht(T,e){iN.call(this,e);e=e||{};if(typeof e.fillOpacity==="number"){this._config.fillOpacity=e.fillOpacity}else{this._config.fillOpacity=0.6}ch(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);hI.sendMessage(aZ(4,2,4),["overlay","polygon"]);var i=this;he.load("poly",function(){i._draw()})}ht.inherits(iN,"Polygon");e6.extend(ht.prototype,{setPoints:function(ks){var kq=[];if(typeof ks==="string"||ks.length===1||ks[0] instanceof cD||ks[0] instanceof cx||this instanceof g8||ks.length===0){if(ks.length===1){ks=ks[0]}var e=this._processSinglePointArray(ks);this._userPoints=e.userPoints;kq=e.innerPoints;this.hasMultipleParts=false}else{this._userPoints=[];for(var kr=0;kr1&&!innerPoints[0].equals(innerPoints[innerPoints.length-1])){innerPoints.push(new cD(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 cD(e.lng,e.lat);this.points[i]=new cD(e.lng,e.lat);if(i===0&&!this.points[0].equals(this.points[this.points.length-1])){this.points[this.points.length-1]=new cD(e.lng,e.lat)}this._calcBounds()},setPositionAt:function(i,e){if(!this._userPoints[i]){return}var T=jn.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 iU(T,e){if(!T||T.length===0){return}var i=this.setPath(T,true);ht.call(this,i,e)}iU.inherits(ht,"PolygonOut");e6.extend(iU.prototype,{toString:function(){return"Polygon"},toGeoJSON:function(){var kr="Polygon";var ks=[];var ku=this.getPath();if(this.hasMultipleParts){kr="Multi"+kr;for(var kq=0;kq1&&!innerPoints[0].equals(innerPoints[innerPoints.length-1])){innerPoints.push(new cD(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 cD(e.lng,e.lat);this.points[i]=new cD(e.lng,e.lat);if(i===0&&!this.points[0].equals(this.points[this.points.length-1])){this.points[this.points.length-1]=new cD(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 fS("onlineupdate");i.overlay=this;this.dispatchEvent(i)},getAltitude:function(){return this._config.altitude}});function bx(ku,ks,kv){if(!ku||ku.length===0){return}this.userPath=ku;var e=[];if(typeof ku==="string"||ku[0] instanceof cD||ku[0] instanceof cx){var kw=this._processSinglePointArray(ku);for(var kr=0;kr1||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(kq,kr){if(kr){i._texture=kq;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=o({str:this._config.fomularC});this.doOnceDraw()}},setIsPixelMap:function(e){this.isPixelMap=e;this.doOnceDraw()},getImagePixel:function(kq){if(!this._config.isPixelMap||!this.canPixelMap()){return null}if(!this.getImageMaskPixel(kq)){return null}if(this.imageObject){var T=Math.floor((kq.lng-this.points[3].lng)/this.lngMC);var e=Math.floor((-kq.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 kq=this._toOverlayPixelsGL([e]);var kv=this.maskOverlayPixels;var ks=kv[1][0]-kv[0][0];var kr=kv[1][1]-kv[0][1];var T=Math.floor((kq[0][0]-kv[0][0])/ks*this.imageMaskObject.width);var i=Math.floor((-kq[0][1]+kv[1][1])/kr*this.imageMaskObject.height);var ku=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 kt=this.imageMaskObject.data.data;if(ku+3>kt.length){return false}if(kt[ku+3]>0){if(this._config.maskData>-1&&this._config.maskData!==kt[ku]){return false}return true}return false},doOnceDraw:function(){var e=new fS("onlineupdate");e.overlay=this;this.dispatchEvent(e)},destroy:function(){this.points=[];this.imageMaskObject=null}});function f9(kq,kx){if(!kq){return}kx=kx||{};var ks=[];if(kx.sysType==="fixed"){ks=kq}else{if(kq instanceof ib){var ku=Math.min(kq.sw.lng,kq.ne.lng);var kr=Math.max(kq.sw.lng,kq.ne.lng);var kt=Math.min(kq.sw.lat,kq.ne.lat);var T=Math.max(kq.sw.lat,kq.ne.lat);var kw=[new cD(ku,kt),new cD(kr,kt),new cD(kr,T),new cD(ku,T)];var e=iN.getGraphPoints(kw).slice(0);for(var kv=0;kv730){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=C.imgPath;this.overlay=null;var e=this;he.load("simpleInfowindow",function(){e._draw()})}ie.inherits(e6.BaseClass,"SimpleInfoWindow");e6.extend(ie.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(){e6.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(){e6.BaseClass.prototype.decontrol.call(this)},toString:function(){return"SimpleInfoWindow"}});hX.prototype.openSimpleInfoWindow=function(kq,e){if(!kq||kq.toString()!="SimpleInfoWindow"||!e||e.toString()!="Point"){return}var i=this.temp;if(!i.marker){var T=new jH(C.imgPath+"blank.gif",{width:1,height:1});i.marker=new j3(e,{icon:T,width:1,height:1,offset:new je(0,0),infoWindowOffset:new je(0,0),clickable:false});i.marker._fromMap=1}else{i.marker.setPoint(e)}this.addOverlay(i.marker);i.marker.show();i.marker.openSimpleInfoWindow(kq)};hX.prototype.closeSimpleInfoWindow=function(){var e=this.temp.infoWin||this.temp._infoWin;if(e&&e.overlay){e.overlay.closeSimpleInfoWindow()}};eJ.prototype.openSimpleInfoWindow=function(e){if(this.map){this.map.closeSimpleInfoWindow();e._visible=true;this.map.temp._infoWin=e;e.overlay=this;e6.BaseClass.call(e,e.hashCode)}};eJ.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 cp(T,e){iN.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);hI.sendMessage(aZ(4,1,3),["instance","custom_mask"]);var i=this;he.load("poly",function(){i._draw()})}cp.inherits(iN,"MapMask");e6.extend(cp.prototype,{setPoints:function(i){var e=iN.getGraphPoints(i).slice(0);this.hasMultipleParts=false;iN.prototype.setPoints.call(this,e)},setPathIn:function(e){this.setPoints(e)},_processSinglePointArray:function(e){var i=iN.getGraphPoints(e).slice(0);innerPoints=i.slice(0);if(innerPoints.length>1&&!innerPoints[0].equals(innerPoints[innerPoints.length-1])){innerPoints.push(new cD(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 kc(ks,T){if(!ks||ks.length===0){return}var kr=[];if(ks[0] instanceof cD){var e=this._processSinglePointArray(ks);for(var kq=0;kq=es[this.mapTypeName].webgl.minZoom){if(es[this.mapTypeName].webgl){if(ku>=es[this.mapTypeName].webgl.minZoom){this.minZoom=ku}else{this.minZoom=es[this.mapTypeName].webgl.minZoom}}else{if(ku>=es[this.mapTypeName].minZoom){this.minZoom=ku}else{this.minZoom=es[this.mapTypeName].minZoom}}}if(typeof T==="number"){if(es[this.mapTypeName].webgl){if(T<=es[this.mapTypeName].webgl.maxZoom){this.maxZoom=T}else{this.maxZoom=es[this.mapTypeName].webgl.maxZoom}}else{if(T<=es[this.mapTypeName].maxZoom){this.maxZoom=T}else{this.maxZoom=es[this.mapTypeName].maxZoom}}}if(this.maxZoomthis.maxZoom){return false}var ks=this.containsPoint(e,kr);if(ks){return ks}for(var T=0;Tthis.maxZoom){return kr}for(var T=0;T0){kx[kt.name]=kt;kx.push(kt.name)}var kB=kx.length-kz.bufferNumber;for(var kC=0;kB>0&&kC0&&this._transparentPng){this.img.src=C.imgPath+"blank.gif"}else{this.img.src=this.src}};hW.prototype._callCbks=function(){var T=this;for(var e=0;e8);function jv(e){this.tileLayers=[];this.map=e;this.bufferNumber=300;this.mapTiles=[];this.bufferTiles=[];this.config=es[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={}}bD.register(function(i){if(i._renderType==="webgl"){return}var e=i.tileMgr=new jv(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)})});e6.extend(jv.prototype,{addTileLayer:function(kq){var T=this;var i=kq.target;T.tileLayers.push(i);if(T.map.loaded){T.moveGridTiles()}},removeTileLayer:function(kx){var ky=this;var kv=kx.target;var kt=kv.mapType;var ks=ky.mapTiles;var kA=ky.bufferTiles;for(var T in kA){var kq=T.split("-")[1];if(kq==kt){delete kA[T]}}for(var T in ks){var kq=T.split("-")[1];if(kq==kt){delete ks[T]}}if(ky.zoomsDiv&&ky.zoomsDiv.parentNode){ky.zoomsDiv.parentNode.removeChild(ky.zoomsDiv);ky.zoomsDiv.innerHTML=""}var kr=ky.map;if(kr.deepZoom){var kz=kr.deepZoom.preDeepZoomDiv;if(kz&&kz.parentNode){kz.parentNode.removeChild(kz)}}for(var kw=0,ku=ky.tileLayers.length;kw=1.5?2:1;this.normalUdt=j2("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}}hH.inherits(de,"TileLayer");e6.extend(hH.prototype,{isTransparentPng:function(){return this.transparentPng},getTilesUrl:function(kx,e){var T=es[this.mapType];if(typeof T!=="object"){return null}var kq=kx.x;var ky=kx.y;if(this.mapType!==BMAP_SATELLITE_MAP){var ky=e9.calcLoopParam(ky,e).col}var i="";if(this.opts.tileUrlTemplate){i=this.opts.tileUrlTemplate;i=i.replace(/\{X\}/,ky);i=i.replace(/\{Y\}/,kq);i=i.replace(/\{Z\}/,e)}else{if(this.mapType===BMAPGL_NORMAL_MAP){var kw=this.isCanvasMap?0:1;var ks=T.tileUrls[Math.abs(ky+kq)%T.tileUrls.length];if(window.offLineIPAddress){ks=window.offLineIPAddress+"tile5/"}var kr=this.map.config.style;i=ks+"?qt=vtile&x="+kq+"&y="+ky+"&z="+e+(kr==="default"?"":("&styleId=1"))+"&styles=pl&udt="+this.normalUdt+"&scaler="+this.scaler+"&showtext="+kw;i=i.replace(/-(\d+)/gi,"M$1")}if(this.mapType===BMAP_SATELLITE_MAP){var kt=j2("ditu","satellite");var kv=kt.ver;var ku=kt.udt;i=T.tileUrls[Math.abs(ky+kq)%T.tileUrls.length]+"u=x="+kq+";y="+ky+";z="+e+";v="+kv+";type=sate&fm=46&udt="+ku;i=i.replace(/-(\d+)/gi,"M$1")}}return i},initialize:function(kt){this.map=kt;if(kt._renderType==="webgl"){var ks=null;if(this.customLayer!==false){ks=this.getTilesUrl}e6.extend(this,fn);this.labelProcessor=new jp(this);this.callbackDataQueue=[];if(ks){this.getTilesUrl=ks}var T=this;kt.on("indoor_data_refresh",function(ku){if(!T.baseLayer){return}T._refreshIndoorData(ku.uid,ku.floor)});kt.on("custom_labels_ready",function(ku){if(!T.baseLayer&&ku.model==="custom"){return}if((ku.model==="custom"&&T.drawIndex===0)||ku.model==="mvt_"+T.drawIndex){T._doWorkAfterLabelImageLoad(ku.virtualTile,ku.labelCanvas,null,ku.imgKey)}});kt.on("glmoduleloaded",function(){if(!T.baseLayer){return}T.updateAllIconsTextureCoords()});kt.on("layer_update",function(kv){if(T.dataType===2&&kt.customLoaded&&kt.areaCustomLoaded){T.clearCache();var ku=new fS("onlayer_clear");kt.fire(ku)}});if(this.ontology&&this.ontology._initEvent){this.ontology._initEvent(kt)}}if(!kt.temp.layerZIndex){kt.temp.layerZIndex=0}this.zIndex=this.zIndex||1;if(kt.getRenderType()==="dom"){this.zIndex=kt.tileMgr.tileLayers.length}else{if(this.baseLayer){this.zIndex=0}else{if(this.zIndex>0){this.adjustZIndex()}else{var e=kt._featureMgr.result.bkData;this.zIndex=e.length||1}}}if(!kt.temp.layid){kt.temp.layid=0}if(!this.opts.mapType){this.mapType="BMAP_CUSTOM_LAYER_"+kt.temp.layid;kt.temp.layid++}else{this.mapType=this.opts.mapType}var kq=es[this.mapType];if(!kq){es[this.mapType]={tileUrls:[],tileSize:256,baseUnits:256,zoomLevelMin:1,zoomLevelMax:19,minZoom:3,maxZoom:19,minDataZoom:3,maxDataZoom:19,zoomLevelBase:18,errorUrl:C.imgPath+"/blank.gif",bounds:new ib(new cD(-21364736,-10616832),new cD(23855104,15859712)),imgExtend:"png"}}if(kt._renderType!=="webgl"){var kr=bP(kt.platform,'
');kr.style.display="";kr.style.left=Math.ceil(-kt.offsetX+kt.width/2)+"px";kr.style.top=Math.ceil(-kt.offsetY+kt.height/2)+"px";this.tilesDiv=kr}this.isCanvasMap=kt.isCanvasMap();this.lastZoom=kt.getZoom();var i=this;this.addEventListener("initDrawData",function(ku){if(i.opts.boundary){i.addBoundary(i.opts.boundary)}});kt.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(kr){var T=this.zIndex;if(this.map&&this.map._featureMgr){var e=this.map._featureMgr.result.bkData;if(kr==="up"){for(var kq=this.zIndex+1;kq0;kq--){if(e[kq]){T=kq;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 e9.calcLoopParam(e,i)},addBoundary:function(ks){if(!ks||!this.map){return}if(typeof ks==="string"){ks=[ks]}for(var kq=0;kq-1;kr--){var ks={};T=kq.children[kr].style;ks.top=parseInt(T.top,10);ks.left=parseInt(T.left,10);this._zoomAniInfo[kr]=ks}},prepareLabelLayer:function(){var kr=this._map;if(this._enableCanvas2dMap&&kr.canvas2dMapMgr){if(this.touchZoomLabelCanvas){this.touchZoomLabelCanvas.parentNode.removeChild(this.touchZoomLabelCanvas)}var i=kr.canvas2dMapMgr._labelCanvas;this.touchZoomLabelCanvas=i.cloneNode(false);var e=this.touchZoomLabelCanvas.getContext("2d");e.drawImage(i,0,0);kr.platform.insertBefore(this.touchZoomLabelCanvas,kr.platform.firstChild);var kq=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-(kr.offsetX+kq))+"px "+(this._fixPosition.y-(kr.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 kq=this._map;if(kq.getRenderType()==="dom"){if(kq.overlayDiv){kq.overlayDiv.style.visibility="hidden"}if(kq.overlayDivEx){kq.overlayDivEx.style.visibility="hidden"}}var ks=kq.tileMgr.tileLayers;var kr;for(var T=0,e=ks.length;T-1;kz--){var kx=this._zoomAniInfo[kz];ky=kq.children[kz].style;var kr=kx.left-ku.x;var T=kx.top-ku.y;kx.dx=kr*e-kr;kx.dy=T*e-T;kx.preDx=kr-kr;kx.preDy=T-T;kG=kx.preDx+(kx.dx-kx.preDx);kv=kx.preDy+(kx.dy-kx.preDy)+kw;ky.left=kx.left+kG+"px";ky.top=kx.top+kv+"px";ky.width=ky.height=256*e+"px"}if(this._enableCanvas2dMap){var kF=!kE._isIE9?"translate3d(0px, "+kw+"px, 0) scale("+e+")":"translate(0px, "+kw+"px) scale("+e+")";this.touchZoomLabelCanvas.style[kB]=kF}},setZoomFinish:function(){this._animationDiv=null},startAnimation:function(kt){this.prepareLayer();this.hideNonAnimationLayers();var kM=this._map;if(this.touchZoomLabelCanvas){this.touchZoomLabelCanvas.style.display="none"}kt=kt||{};var kK=kt.zoomCount||0;var ky=kt.fixPosition;var kI=kt.fixMCPosition;var kw=kt.pixOffset;this._zoomCount=kK;var kq=kM.getZoom();var kL=kq+kK;var e=kM.config.enableContinuousZoom;var kC=0.5;var kx=5;var T=Math.pow(2,kK);var kO=this._baseLayerDiv;var kz={x:ky.x-parseInt(kO.style.left,10)-kM.offsetX,y:ky.y-parseInt(kO.style.top,10)-kM.offsetY};var ku=this._animationDiv;var kG=ku.children.length;var kQ=this._preZoomTimes;var kJ=[];var kH=this._transformStyleName;var kv=this._transformOriginStyleName;for(var kF=kG-1;kF>-1;kF--){var kD={};var kE=ku.children[kF].style;kD.top=parseInt(kE.top,10);kD.left=parseInt(kE.left,10);var ks=kD.left-kz.x;var kr=kD.top-kz.y;kD.dx=ks*T-ks;kD.dy=kr*T-kr;kD.preDx=ks*kQ-ks;kD.preDy=kr*kQ-kr;kJ[kF]=kD}var kN=this;var kB;var kP;var kA;this._zoomAni=new fH({fps:60,duration:e?500:1,transition:function(i){i=i*kx/(2*kC);return kx*i-kC*i*i},render:function(kZ){kZ=kZ*(4*kC)/(kx*kx);kB=kQ+kZ*(T-kQ);var kS=kq+p(kB);var kX=null;var kW=0;var k0=0;if(kt.onAnimationBeforeLooping){var k1=kt.onAnimationBeforeLooping(kZ,kS);kX=k1.loopingCenter;kW=k1.yDiff;k0=k1.totalYDiff}for(var kT=kJ.length-1;kT>-1;kT--){var kU=kJ[kT];if(ku.children[kT]){var kY=ku.children[kT].style;kP=kU.preDx+(kU.dx-kU.preDx)*kZ-kw.width*kZ;kA=kU.preDy+(kU.dy-kU.preDy)*kZ-kw.height*kZ+kW;kY.left=kU.left+kP+"px";kY.top=kU.top+kA+"px";kY.height=kY.width=256*kB+"px"}}var kR=kw.width*kZ;var kV=kw.height*kZ;if(kM.isRestrict){kN._enableCanvas2dMap&&kN._canvas2dMapMgr.clearLabel()}else{kN._enableCanvas2dMap&&kN._canvas2dMapMgr.drawLabel(kB,ky,kq,kL,kK,kZ,kR,kV,k0,kW)}kN._preZoomTimes=kB;kN._preRenderTick=kZ;kt.onAnimationLooping&&kt.onAnimationLooping(kZ,kS,kX)},finish:function(){kN._preZoomTimes=1;kN._zoomAni=null;kN._animationDiv=null;kt.onAnimationFinish&&kt.onAnimationFinish();kN.showNonAnimationLayers()}});return this._zoomAni},stopAnimation:function(){if(this._zoomAni){this._zoomAni.stop();this._zoomAni=null}}});function kn(e){this._initVars(e);this._initColorCanvas();this._bindEvent(e)}e6.extend(kn.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=b3("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(kD){var kC=kD.textImg;var T=kD.textPos;var kA=this.ratio;var ky=this.sizeRatio/kA;var kr=this._colorCtx;var kv=this._colorCvsSize;kr.clearRect(0,0,kv,kv);var kx=0;var e=0;var ku=0;for(var kw=0;kwkx){kx=T[kw].width;e=kw;ku=T[kw].drawX}}kx/=ky;var kz=0;for(var kw=0,kt=T.length;kwkx){kx=kB.width/ky}kz+=kB.height/ky+2*kA}var kq=kr.getImageData(0,0,kx,kz);var ks=kr.getImageData(0,0,kx,kz);return[kq,ks]},_bindEvent:function(i){var e=this,T=i._map;T.addEventListener("onspotmouseover",function(kt){if(!this.isCanvasMap()||!this.temp.isPermitSpotOver){return}if(kt.spots.length>0){var ks=kt.spots[0].userdata.uid;var kr=kt.spots[0].userdata.name;var kq=e.findLabelByUid(ks,kr);kq&&e._toHighLightColor(kq)}});T.addEventListener("onspotmouseout",function(kt){if(!this.isCanvasMap()||!this.temp.isPermitSpotOver){return}if(kt.spots.length>0){var ks=kt.spots[0].userdata.uid;var kr=kt.spots[0].userdata.name;var kq=e.findLabelByUid(ks,kr);kq&&e._toDefaultColor(kq)}});T.addEventListener("onspotclick",function(kt){if(!this.isCanvasMap()||!this.temp.isPermitSpotOver){return}if(kt.spots&&kt.spots.length>0){var ks=kt.spots[0].userdata.uid;var kr=kt.spots[0].userdata.name;var kq=e.findLabelByUid(ks,kr);kq&&e._changeBaseMapState(kq)}else{e._recoverNormalState()}});T.on("spot_status_reset",function(){e._recoverNormalState()});T.on("spot_highlight",function(kr){var kq=e.findLabelByUid(kr.uid);kq&&e._changeBaseMapState(kq)})},_getTextBound:function(kB){if(!kB.textPos){return null}var kz=this.ratio;var kx=this.sizeRatio/kz;var T=kB.textPos;var kA=kB.baseDrawX;var ky=kB.baseDrawY;var kv=kA*kz+(T[0].drawX-kA)/kx;var kt=ky*kz+(T[0].drawY-ky)/kx;var kr=kv+T[0].width/kx;var e=kt+T[0].height/kx;for(var kw=0,ku=T.length;kwkr){kr=ks+kC.width}if(kq+kC.height>e){e=kq+kC.height}}return[kv,kt,kr,e]},_toHighLightColor:function(T){if(T._tempRank&&T._tempRank==this.RANK5){return}var ku=this._getTextBound(T);if(!ku){return}var kq=Math.round(ku[0]);var i=Math.round(ku[1]);var e=this.getLabelImageData(T);var ks=e[0];var kr=e[1];var kt=this._canvas2dMapMgr.getFilterImageData(ks,this.RANK5);T._oldImgData=kr;this._labelCtx.putImageData(kt,kq,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(kq){var T=this._canvas2dMapMgr;var i=kq.guid;var e=kq.guidExt;var kr={guid:i,name:kq.name,guidExt:e};T._labelStrategy.setStrategyInfo(kr);T._loadData()},_recoverNormalState:function(){var e=this._canvas2dMapMgr;e._labelStrategy.setStrategyInfo(null);e._loadData()},findLabelByUid:function(ks,kq){var ku=this._canvas2dMapMgr,e=ku._computedLabel;for(var kr=0,T=e.length;krlv){lv=ly.drawX+ly.width}if(ly.drawY+ly.height>lu){lu=ly.drawY+ly.height}}}}}else{ky.tileX=kq;ky.tileY=T;kF=kq+ky.minXOriginal;kD=T+ky.minYOriginal;lv=kq+ky.maxXOriginal;lu=T+ky.maxYOriginal}if(kF!=undefined){var ln=lj+(kF-lj)/lc;var lm=li+(kD-li)/lc;var kY=lj+(lv-lj)/lc;var kW=li+(lu-li)/lc;ky.minX=ln;ky.minY=lm;ky.maxX=kY;ky.maxY=kW;var lr=(ln+kY)/2,lq=(lm+kW)/2,k7=kE+(lr-lo/2)*kI,k5=kC+(k6/2-lq)*kI;ky.geoX=k7;ky.geoY=k5;k0.push(ky)}}}if(lC){for(var kX=0,kT=lC.length;kXlv){lv=kN+lp.width}if(kB+lp.height>lu){lu=kB+lp.height}if(kH.length===2){var kM=kH[1];var kK=lj+kM.destX;var kA=li+kM.destY;if(kAlv){lv=kK+kM.width}if(kA+kM.height>lu){lu=kA+kM.height}}lf._tempBounds=[kF,kD,lv,lu];var k4=kz.iconPos;var kt=k4.geoX;var kr=k4.geoY;var lj=(kt-kE)/kI+lo/2;var li=(kC-kr)/kI+k6/2;var kF=lj+k4.destX;var kD=li+k4.destY;var lv=kF+k4.width;var lu=kD+k4.height;kz.textPos=kz.textPos||kz._textPos;var kH=kz.textPos;var lp=kH[0];var kN=lj+lp.destX;var kB=li+lp.destY;if(kNlu){lu=kB+lp.height}if(kH.length===2){var kM=kH[1];var kK=lj+kM.destX;var kA=li+kM.destY;if(kKlu){lu=kA+kM.height}}kz._tempBounds=[kF,kD,lv,lu]}for(var kX=0,kT=lC.length;kXlA[2]||lw[3]lA[3])){kG++;if(k1.textPos){k1._textPos=k1.textPos;delete k1.textPos}}var lA=lB._tempBounds;if(!(lw[2]lA[2]||lw[3]lA[3])){kG++;if(lB.textPos){lB._textPos=lB.textPos;delete lB.textPos}}if(kG>=2){if(ls.textPos){ls._textPos=ls.textPos;delete ls.textPos}}}}for(var kX=0,kT=lC.length;kXlv){lv=lp.drawX+lp.width}if(lp.drawY+lp.height>lu){lu=lp.drawY+lp.height}if(kH.length===2){var kM=kH[1];kM.drawX=lj+kM.destX;kM.drawY=li+kM.destY;if(kM.drawXlv){lv=kM.drawX+kM.width}if(kM.drawY+kM.height>lu){lu=kM.drawY+kM.height}}}var ln=lj+(kF-lj)/lc;var lm=li+(kD-li)/lc;var kY=lj+(lv-lj)/lc;var kW=li+(lu-li)/lc;k2.minX=ln;k2.minY=lm;k2.maxX=kY;k2.maxY=kW;var le=(ln+kY)/2;var ld=(lm+kW)/2;var ku=kE+(le-lo/2)*kI;var ks=kC+(k6/2-ld)*kI;k2.geoX=ku;k2.geoY=ks;k0.push(k2)}}var lg=this._strategyInfo;if(lg){var kZ=lg.guid;var k8=lg.name;var kP=lg.guidExt;for(var kX=0,kT=k0.length;kXk3.maxX-kV||ls.maxY-kVk3.maxY-kV)){ls.arrIntersectIndex.push(kU)}}}for(var kX=0,kT=k0.length;kXkv){var T=kt.splice(0,ks);for(var kw=0,ku=T.length;kw0){this.isDrawText=true}},_loadLabelData:function(kz,ky,kx,T,kA,e){var ks=kz.toString();var kq=ky.toString();var ku="cbk_"+ks.replace("-","_")+"_"+kq.replace("-","__")+"_"+Math.floor(kx);var kE=fB+"."+ku;var kD=this._labelDataUrls;var kw=Math.abs(kz+ky)%kD.length;var kJ=kD[kw];if(window.offLineIPAddress){kJ=window.offLineIPAddress+"pvd/"}var i=this.labelStyleParam;var kC="?qt=vtile";var kF="";if(this._map.config.style!=="default"){kF="&styleId=1"}var kB="x={x}&y={y}&z={z}&udt={udt}&v={v}&styles={styles}"+kF+"&textonly=1&textimg=1&scaler={scaler}&fn="+encodeURIComponent(kE);var kG=e9.calcLoopParam(kz,kx).col;var kv=this.ratio>1?2:1;var kt=kB.replace(/{x}/,kG).replace(/{y}/,ky).replace(/{z}/,Math.floor(kx)).replace(/{styles}/,i).replace(/{udt}/,this._udt).replace(/{v}/,this._version).replace(/{scaler}/,kv);var kr=kJ+kC+"¶m="+window.encodeURIComponent(e2(kt));var kI=this;var kH=kI._map;bD[ku]=function(kK){kI._vectorDrawLib.parseLabelData(kK,kz,ky,kx,T,kA,function(kP){var kM=kH.getCenterIn();var kQ=kH.getZoom();var kS="viewKey_"+Math.floor(kM.lng)+"_"+Math.floor(kM.lat)+"_"+kQ;kI._labelCount--;var kT=kI._getCache(kz,ky,kx,T).updateLabelCounter;kI._labelCount-=kT;var kN=kI._curViewLabels;if(kS===e||(kI._labelCount<0&&kQ===kx)){kN.push(kP)}if(kS===e){kI.statResponseCount++}if(kI._labelCount<=0){var kL=(new Date()).getTime();kI.updateLabel();var kO=(new Date()).getTime();var kR=new fS("oncanvasmaploaded");kR.drawTime=kO-kL;if(kI.statResponseCount===kI.statRequestCount){kR.isAllLoadedDrawing=true}kH.dispatchEvent(kR)}kI._setCacheValue(kz,ky,kx,T,kP);delete bD[ku]})};gX.load(kr)},drawLabel:function(T,kq,kx,i,kv,kr,e,ks,kw,kt){var ku=this;if(!ku._computedLabel){return}if(ku._computedLabel._zoom!==kx){ku.clearLabel();return}ku._map.temp.isPermitSpotOver=false;ku.clearLabel();ku._vectorDrawLib.zoomingIconAndText(this._labelCtx,ku._computedLabel,T,kq,i,kv,kr,e,ks,kw,kt)},_addSpotData:function(){this._spotData=[];var kx=this._map.getZoom();for(var ks=0,kr=this._computedLabel.length;kskx)){continue}var kt=[];kt[0]=(ku.minX-ku.maxX)/2;kt[1]=(ku.minY-ku.maxY)/2;kt[2]=(ku.maxX-ku.minX)/2;kt[3]=(ku.maxY-ku.minY)/2;var kq=null;if(ku.iconPos){kq=new cD(ku.iconPos.geoX,ku.iconPos.geoY)}var T=ku.name?ku.name.replace("\\\\","
"):"";if(ku.iconPos&&ku.iconPos.iconType.indexOf("ditie")>-1&&this._map.getZoom()>14){T=""}var kw={n:T,pt:new cD(ku.geoX,ku.geoY),userdata:{iconPoint:kq,uid:ku.guid,name:T,type:ku.iconPos?ku.iconPos.iconType:"",iconImg:ku.iconImg,mapPoi:true,adver_log:ku.adver_log||""},bd:kt,tag:"MAP_SPOT_INFO"};this._spotData.push(kw)}var kv=new fS("onspotsdataready");kv.spots=this._spotData;this._map._spotDataOnCanvas=this._spotData;this._map.dispatchEvent(kv)},isClickableLabel:function(e){if(e.isDel||(!e.guid&&!e.name)){return false}return true},getFilterImageData:function(T,kt){var ku=T.data,ks=this._labelStrategy,kt=parseInt(kt);for(var kv=0,kr=ku.length;kv0&&!ky){continue}var kC=Math.round(kL[0]/100);var kB=Math.round(kL[1]/100);var kO={lng:kI+kC,lat:kH-(kF*kv-kB)};var kt=kC/kv;var ks=kF-kB/kv;var kG=kL[7]||"";var kT=kL[5];var kJ={type:"fixed",name:kG,textImg:kE,rank:kL[4],baseX:kt,baseY:ks,iconPos:null,textPos:null,guid:kL[3]||"",tracer:kP,direction:kT,startScale:3};if((kT!==jj&&ky||!ky)&&kS!==null){kJ.iconPos=this._getIconPosition(kS,kx,kt,ks,kO);if(kJ.iconPos){T=kJ.iconPos.width;kD=kJ.iconPos.height}}if(T===0){kJ.direction=jj}if(ky){kJ.textPos=this._getTextDrawData(kL,kt,ks,T,kD)}if(kJ.textPos||kJ.iconPos){kK.push(kJ)}}}},_isVisible:function(e,i){var kq;if(!this._binaryCache[e]){kq=e.toString(2);if(kq.length<8){kq=new Array(8-kq.length+1).join("0")+kq}this._binaryCache[e]=kq}kq=this._binaryCache[e];var T=fq[i].start;return kq[i-T]==="1"},_getIconPosition:function(ku,ks,T,i,e){var kq=this._map.config.style;var kv=bD["iconSetInfo"+kq][ku];if(!kv){if(ku.charCodeAt(0)>=48&&ku.charCodeAt(0)<=57){kv=bD["iconSetInfo"+kq]["_"+ku]}}if(!kv){return null}var kr=kv[0];var kt=kv[1];kr=kr*ks;kt=kt*ks;return{srcX:0,srcY:0,destX:T-kr/2,destY:i-kt/2,width:kr,height:kt,geoX:e.lng,geoY:e.lat,mcPt:e,iconType:ku}},_getTextDrawData:function(kB,kA,kz,kq,kx){var kG=kB[5];if(typeof kG!=="number"){kG=0}var kv=this.ratio;var ku=kv/2;kq*=ku;kx*=ku;var kw=kB[12];var kr=kw.length;var kJ=0;var kI=0;var kF=[];var kE=0;var kH=0;for(var kD=0;kD0&&e>0){kF.push({srcX:ks,srcY:i,destX:kJ,destY:kI,width:T,height:e})}}if(kF.length>0){return kF}return null},_getLineLabelInfo:function(ky,kq,kr,kN,k0,kF,kL,kK,kM,kE){if(ky.length!==10){return}var kP=this.ratio;var T=this.ratio;var kW=ky[7].length;var kG=ky[1];var kY=ky[3];var k4=ky[8];var ku=ky[4];var e=2;var ks=ku.slice(0,e);for(var k1=e;k1kC){kC=k8+kt}if(k7+kw>kB){kB=k7+kw}}kH.push({angle:kA,srcX:kv,srcY:kx,destX:k8,destY:k7,width:kt,height:kw})}var kX={type:"line",textImg:kq,rank:kG,baseX:kU,baseY:kS,arrWordPos:kH,minXOriginal:kQ,minYOriginal:kO,maxXOriginal:kC,maxYOriginal:kB,text:""};kE.push(kX)}},alterColor:function(kt,e,ks){var T=this._colorCtx,i=this._canvas2dMapMgr;T.clearRect(0,0,kt.width,kt.height);T.drawImage(e,kt.srcX,kt.srcY,kt.width,kt.height,0,0,kt.width,kt.height);var kr=T.getImageData(0,0,kt.width,kt.height),kq=i.getFilterImageData(kr,ks);T.putImageData(kq,0,0)},drawIconAndText:function(kF,kE,e){var kw=this.ratio;var ku=this.sizeRatio/kw;var ky=2/kw;var kQ=this;for(var kI=0,kG=kE.length;kI10&&kL<350){kF.save();var kO=Math.round(kR+kK.width/2);var kN=Math.round(kP+kK.height/2);kF.translate(kO,kN);kF.rotate(-kL/180*Math.PI);kF.drawImage(kC,kK.srcX,kK.srcY,kK.width,kK.height,-Math.round(kK.width/2),-Math.round(kK.height/2),kK.width/ku,kK.height/ku);kF.restore()}else{kF.drawImage(kC,kK.srcX,kK.srcY,kK.width,kK.height,kR,kP,kK.width/ku,kK.height/ku)}}}}}},isCollide:function(ks,kB,kA,e,ku,T,kw){for(var kr=0,kq=T.length;krkv[1]+kv[3]+kz||kA+kukv[2]+kv[4]+ky)){return true}}}return false},zoomingIconAndText:function(kQ,kK,kq,kO,kP,lh,kX,ky,k3,kW,kH){var li=this.ratio;var kz=this.sizeRatio/li;var lj=2/li;var lu=li/2;var ld=kO.x;var lc=kO.y;var kR=2*li;if(kH!==0){lc+=kW}var kC=undefined,kv=undefined,ks=undefined,kx=undefined,kG=undefined;var k2=lh>0?true:false;if(!k2){kC=[];var k6=1-kX}for(var lq=0,lo=kK.length;lq10&&kN<350){var lf=k8+lg.width/2;var le=k7+lg.height/2;var kr=kN/180*Math.PI;var kU=Math.cos(kr);var kD=Math.sin(kr);var k5=kU;var kE=kU;var k4=kD;var kF=-kD;var kM=lf-lf*kU-le*kD;var e=le+lf*kD-le*kU;kQ.save();kQ.transform(k5,kF,k4,kE,kM,e);kQ.drawImage(kt,lg.srcX,lg.srcY,kx,kG,kv,ks,kx/kz,kG/kz);kQ.restore()}else{kQ.drawImage(kt,lg.srcX,lg.srcY,kx,kG,kv,ks,kx/kz,kG/kz)}!k2&&kC.push([lq,kv,ks,kx,kG])}}kQ.restore()}}}});function eA(e){this.initVars(e)}e6.extend(eA.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(ks,kw){var ku=this;this.bizData=ks;this.objTextsPng=null;this.arrIconsPng=null;var T=ks.textsPng;var ky=ks.iconsPng;if(!T||!ky){return}var kv=new Image();kv.onload=function(){ku.objTextsPng=this;ku.calcIconAndTextInfo(kw);this.onload=null};kv.src=this.base64Prefix+T;var kx=ky.length;var e=[];for(var kr=0;krku.width||i>ku.height)&&(e>ku.width||ky>ku.height)){return false}return true},_setPlatformPosition:function(kx,kw,kz){kz=kz||{};if(kx===0&&kw===0&&!kz.point){return}if(isNaN(kz.initMapOffsetX)){kz.initMapOffsetX=this.offsetX}if(isNaN(kz.initMapOffsetY)){kz.initMapOffsetY=this.offsetY}var kt=iP(this._heading);if(this._tilt>0){kw=kw/Math.cos(iP(this._tilt))}var ky=kx*Math.cos(kt)+kw*Math.sin(kt);var kv=-kx*Math.sin(kt)+kw*Math.cos(kt);ky=ky+kz.initMapOffsetX;kv=kv+kz.initMapOffsetY;if(kz.point){var i=this.restrictCenter(kz.point);if(!i.equals(this.centerPoint)){this.centerPoint=i.clone();this.fire(new fS("oncenter_changed"))}}else{var kq=this.offsetX-ky;var e=this.offsetY-kv;var ku=this.centerPoint.lng;var ks=this.centerPoint.lat;var kr=new cD(ku,ks);var T=this.getZoomUnits();this.centerPoint=this.restrictCenter(new cD(kr.lng+kq*T,kr.lat-e*T),T);this.fire(new fS("oncenter_changed"))}this.offsetX=ky;this.offsetY=kv;this.dispatchEvent(new fS("onmoving"))},restrictCenter:function(ky,e){if(this.config.restrictCenter===false){return ky}e=e||this.getZoomUnits();var kw=this.pixelToPointIn(new fr(this.width,0),{center:ky});var kt=this.pixelToPointIn(new fr(0,this.height),{center:ky});var kz=ky.lng;var kE=ky.lat;if(this.config.restrictBounds!==null&&!this.config.restrictBounds.isEmpty()){var kD=this.config.restrictBounds;var T=kD.getSouthWest();var kB=kD.getNorthEast();var kx=jn.convertLL2MC(T);var kr=jn.convertLL2MC(kB);var ku=this.calcNewZoomByRestriction(kz,kE,kt,kw,kx.lng,kr.lng,kx.lat,kr.lat);if(ku>this.zoomLevel){this.zoomLevel=ku;return ky}ky.lng=this.calcNewLngByBounds(kz,kt,kw,kx.lng,kr.lng,e);ky.lat=this.calcNewLatByBounds(kE,kt,kw,kx.lat,kr.lat,e);return ky}var kv=this.pixelToPointIn(new fr(0,0),{center:ky});var kq=this.pixelToPointIn(new fr(0,this.height),{center:ky});if(this.zoomLevel<5){if(kv.lat>hX.MAX_LAT&&kq.lathX.MAX_LAT){ky.lat=hX.MAX_LAT-this.height/2*e}else{if(kq.latks&&e.latkt&&e.lngks){kr=ks-this.height/2*e}else{if(kq.latT){i=T-this.width/2*e}else{if(ks.lngkr){this._tilt=kr}if(kC){if(this._heading%360!==0||this._tilt>0){var i=this._webglMapCamera.fromScreenPixelToMC(T.x,T.y,{center:ku,zoom:this.zoomLevel});if(i){var kz=i.sub(kt);var kq=ku.sub(kz);this.centerPoint=this.restrictCenter(kq)}}else{var kw=this.getZoomUnits();var kq=new cD(kC.lng-kw*(T.x-this.width/2),kC.lat+kw*(T.y-this.height/2));this.centerPoint=this.restrictCenter(kq,kw)}this.fire(new fS("oncenter_changed"))}this._checkFireZoomend();kD.callback&&kD.callback();return}this._animationInfo.zoom={current:this.zoomLevel,diff:e-this.zoomLevel,target:e};var kA=this;var kB=this._tilt;if(this.fixPoint||kB>hX.MAX_DRAG_TILT_L2){kD.renderCallback=function(){var kH=kA.getCurrentMaxTilt();if(kA._tilt>kH){kA._tilt=kH}var kI=kA.fixPixel;if(!kA.fixPixel||!kA.fixPoint){return}var kE=kA.fixPixel;var kO=kA.fixPoint;var kL=kA.fixCenter;var kJ=kA.mousePosMCPoint;if(kA._heading%360!==0||kA._tilt>0){var kF=kA._webglMapCamera.fromScreenPixelToMC(kE.x,kE.y,{center:kL,zoom:kA.zoomLevel,tilt:kA._tilt});if(kF){var kN=kF.sub(kJ);var kG=kL.sub(kN);kA.centerPoint=kA.restrictCenter(kG)}}else{var kK=kE;var kM=kA.getZoomUnits();var kG=new cD(kO.lng-kM*(kK.x-kA.width/2),kO.lat+kM*(kK.y-kA.height/2));kA.centerPoint=kA.restrictCenter(kG,kM)}kA.fire(new fS("oncenter_changed"))}}if(kD.fromMouseWheel===true){this._startInfiniteZoomAnimation(kD);kD.callback&&kD.callback();kA._checkFireZoomend();return}if(!kD.callback){kD.callback=function(){kA._checkFireZoomend()}}else{var kv=kD.callback;kD.callback=function(kE,kF){kv(kE,kF);kA._checkFireZoomend()}}this._startAnimation(kD)},_checkFireZoomend:function(){var e=this;if(e.fireZoomendTimer){clearTimeout(e.fireZoomendTimer)}e.fireZoomendTimer=setTimeout(function(){if(e.zoomEventStatus==="zooming"){e.fire(new fS("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,kU,kF){kF=kF||{};var kr=this._getProperZoom(kU);kU=kr.zoom;if(this.centerPoint.equals(T)&&this.zoomLevel===kU&&typeof kF.heading!=="number"&&typeof kF.tilt!=="number"){return}var e=this.getHeading()%360;var kx=this.getTilt();var kD=0;var kH=0;var kA=this.getBounds().containsPoint(T);if(typeof kF.heading==="number"){kD=kF.heading}else{if(kA){kD=e}}if(typeof kF.tilt==="number"){kH=kF.tilt}else{if(kA){kH=kx}}this._heading=e;var kR=kD-e;var kN=kH-kx;var kB=this;var kt=this.zoomLevel;var ku=1.42;var kJ=this.zoomScale(kU-kt);var kW=this.getZoomUnits();var kz=this.centerPoint.div(kW);var kX=T.div(kW);var kQ=this.worldSize();var kM=ku;var kL=Math.max(this.width,this.height);var kK=kL/kJ;var ky=kX.sub(kz).mag();var i=kM*kM;function kT(kZ){var kY=(kK*kK-kL*kL+(kZ?-1:1)*i*i*ky*ky)/(2*(kZ?kK:kL)*i*ky);return Math.log(Math.sqrt(kY*kY+1)-kY)}function kq(kY){return(Math.exp(kY)-Math.exp(-kY))/2}function kv(kY){return(Math.exp(kY)+Math.exp(-kY))/2}function kE(kY){return kq(kY)/kv(kY)}var kw=kT(0);var kO=function(kY){return(kv(kw)/kv(kw+kM*kY))};var kP=function(kY){return kL*((kv(kw)*kE(kw+kM*kY)-kq(kw))/i)/ky};var ks=(kT(1)-kw)/kM;if(Math.abs(ky)<0.000001||ks===Infinity||isNaN(ks)){if(Math.abs(kL-kK)<0.000001){this._animationInfo.zoom={current:this.zoomLevel,diff:kU-this.zoomLevel};this._animationInfo.center={current:this.centerPoint,diff:T.sub(this.centerPoint)};this._animationInfo.heading={current:e,diff:kD-e};this._animationInfo.tilt={current:kx,diff:kH-kx};this.setLock(true);this._startAnimation({callback:function(kY){kB.setLock(false);if(kF.callback){kF.callback(kY)}},duration:kF.duration});return}var kV=kK5){kS=(ks-5)/2+kS}}var kG=kF.duration||1000*ks/kS;if(isNaN(kG)){var kI={};for(var kC in kF){kI[kC]=kF[kC];kI.noAnimation=true}this.centerAndZoomIn(T,kU,kI);return}this.fire(new fS("onmovestart"));this.fire(new fS("onzoomstart"));this.setLock(true);this._startAnimation({duration:kG,renderCallback:function(kY,kZ){var k0=kY*ks;var k3=kP(k0);var k2=kt+kB.scaleZoom(1/kO(k0));if(k2kB.getMaxZoom()){k2=kB.getMaxZoom()}if(k2!==kB.zoomLevel){kB.zoomLevel=k2;kB.fire(new fS("onzoom_changed"))}kB.centerPoint=kz.add(kX.sub(kz).mult(k3)).mult(kW);kB.fire(new fS("oncenter_changed"));if(typeof kD==="number"){var k1=kY/0.7;if(k1>1){k1=1}kB.setHeading(e+kR*kY,{noAnimation:true})}if(typeof kH==="number"){kB.setTilt(kx+kN*kY,{noAnimation:true})}},callback:function(kY,kZ){kB.setLock(false);if(kZ&&kZ.stop===true){kB.fire(new fS("onmoveend"));kB.fire(new fS("onzoomend"));kF.callback&&kF.callback(kY);return}if(kU!==kB.zoomLevel){kB.zoomLevel=kU;kB.fire(new fS("onzoom_changed"))}kB.fire(new fS("onmoveend"));kB.fire(new fS("onzoomend"));kF.callback&&kF.callback(kY)}})},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 kq=this.pointToPixelIn(i);var e=Math.round(this.width/2);var ks=Math.round(this.height/2);var kr=this._ifUseAnimation(i,this.zoomLevel);if(T.noAnimation===true||kr===false){this._stopAllAnimations();this._panToIn(e-kq.x,ks-kq.y,i);T.callback&&T.callback();return}this.flyToIn(i,this.zoomLevel,T)},_panToIn:function(i,e,kq){var T=this.temp;if(T.operating===true){return}if(T.dragAni){T.dragAni.stop(false,{readyToMove:true});T.dragAni=null}this.dispatchEvent(new fS("onmovestart"));this._setPlatformPosition(i,e,{point:kq});this.dispatchEvent(new fS("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,kr){if(this.temp.operating===true){return}kr=kr||{};this.dispatchEvent(new fS("onmovestart"));var kq=this;var T=kq.temp;T.pl=kq.offsetX;T.pt=kq.offsetY;if(T.tlPan){T.tlPan.cancel()}if(T.dragAni){T.dragAni.stop(false,{readyToMove:true});T.dragAni=null}T.tlPan=new fH({fps:kr.fps||kq.config.fps,duration:kr.duration||kq.config.actionDuration,transition:kr.transition||gL.easeInOutQuad,render:function(ks){this.terminative=kq.temp.operating;if(kq.temp.operating){return}kq._setPlatformPosition(i*ks,e*ks,{initMapOffsetX:T.pl,initMapOffsetY:T.pt})},finish:function(ks){kq.dispatchEvent(new fS("onmoveend"));kq.temp.tlPan=false;if(kq.temp.stopArrow===true){kq.temp.stopArrow=false;if(kq.temp.arrow!==0){kq._arrow()}}}})},_startAnimation:function(i){var kr=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 ks=i.duration||500;var kt=i.transition||gL.ease;var e=new fS("onanimation_start");this.fire(e);if(i.unstopable){kr=this._animationInfoUnstopable}var kq=new fH({duration:ks,transition:kt,render:function(kw,kv){for(var ku in kr){if(!kr.hasOwnProperty(ku)){continue}var ky=kr[ku].current;var kx=kr[ku].diff;T._setValueTick(ku,ky,kx,kw)}if(i.renderCallback){i.renderCallback(kw,kv)}},finish:function(ku){T.fire(new fS("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(ku)}},onStop:function(ku){ku=ku||{};T.fire(new fS("onanimation_end"));if(ku.stopCurrentAnimation){T._animationInfo={}}T._ani=null;if(i.mapNeedCbk){i.mapNeedCbk()}if(i.callback){i.callback(null,{stop:true})}}});if(i.unstopable){T._unstopableAni=kq}else{T._ani=kq}},_startInfiniteZoomAnimation:function(e){var i=this;if(i._ani){i._ani.stop(!!e.goToEnd,{stopCurrentAnimation:e.stopCurrentAnimation})}if(i._infiniteAni){return}this.fire(new fS("onanimation_start"));i._infiniteAni=new fH({duration:10000,transition:gL.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 fS("onanimation_end"));if(e.callback){e.callback()}},onStop:function(){i._infiniteAni=null;i._animationInfo={};i.fire(new fS("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 fS("on"+e+"_changed"))}return}else{if(e==="center"){this.centerPoint=T}}this["_"+e]=T;this.fire(new fS("on"+e+"_changed"))},_setValueTick:function(e,kr,kq,i){if(e==="center"){var T=new cD(kr.lng+kq.lng*i,kr.lat+kq.lat*i);this._setValue(e,T);return}if(e==="zoom"){this._setValue(e,Math.pow(kr,1-i)*Math.pow(kr+kq,i));return}this._setValue(e,kr+kq*i)},setHeading:function(kq,i){i=i||{};if(kq===this._heading){i.callback&&i.callback();return}var T=en(this._heading,360);var e=en(kq,360);if(e===T){this._heading=kq;i.callback&&i.callback();return}if(i.noAnimation){this._setValue("heading",kq);i.callback&&i.callback();return}if(i.unstopable){this._animationInfoUnstopable.heading={current:this._heading,diff:kq-this._heading}}else{this._animationInfo.heading={current:this._heading,diff:kq-this._heading}}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>hX.MAX_TILT){e=hX.MAX_TILT}if(e0){ky=1/Math.sqrt(ky);kB[0]=kA[0]*ky;kB[1]=kA[1]*ky}return kB};kw.dot=function(kz,ky){return kz[0]*ky[0]+kz[1]*ky[1]};kw.cross=function(kA,kz,ky){var kB=kz[0]*ky[1]-kz[1]*ky[0];kA[0]=kA[1]=0;kA[2]=kB;return kA};kw.lerp=function(kA,kz,ky,kB){var kD=kz[0],kC=kz[1];kA[0]=kD+kB*(ky[0]-kD);kA[1]=kC+kB*(ky[1]-kC);return kA};kw.random=function(ky,kA){kA=kA||1;var kz=kr()*2*Math.PI;ky[0]=Math.cos(kz)*kA;ky[1]=Math.sin(kz)*kA;return ky};kw.transformMat2=function(kB,kA,kz){var ky=kA[0],kC=kA[1];kB[0]=kz[0]*ky+kz[2]*kC;kB[1]=kz[1]*ky+kz[3]*kC;return kB};kw.transformMat2d=function(kB,kA,kz){var ky=kA[0],kC=kA[1];kB[0]=kz[0]*ky+kz[2]*kC+kz[4];kB[1]=kz[1]*ky+kz[3]*kC+kz[5];return kB};kw.transformMat3=function(kB,kA,kz){var ky=kA[0],kC=kA[1];kB[0]=kz[0]*ky+kz[3]*kC+kz[6];kB[1]=kz[1]*ky+kz[4]*kC+kz[7];return kB};kw.transformMat4=function(kB,kA,kz){var ky=kA[0],kC=kA[1];kB[0]=kz[0]*ky+kz[4]*kC+kz[12];kB[1]=kz[1]*ky+kz[5]*kC+kz[13];return kB};kw.rotate=function(kB,kz,ky,kF){var kE=kz[0]-ky[0];var kD=kz[1]-ky[1];var kA=Math.sin(kF);var kC=Math.cos(kF);kB[0]=kE*kC-kD*kA+ky[0];kB[1]=kE*kA+kD*kC+ky[1];return kB};kw.forEach=(function(){var ky=kw.create();return function(kB,kF,kG,kE,kD,kz){var kC,kA;if(!kF){kF=2}if(!kG){kG=0}if(kE){kA=Math.min((kE*kF)+kG,kB.length)}else{kA=kB.length}for(kC=kG;kC0){ky=1/Math.sqrt(ky);kB[0]=kA[0]*ky;kB[1]=kA[1]*ky;kB[2]=kA[2]*ky}return kB};kv.dot=function(kz,ky){return kz[0]*ky[0]+kz[1]*ky[1]+kz[2]*ky[2]};kv.cross=function(kz,kE,kD){var ky=kE[0],kG=kE[1],kF=kE[2],kC=kD[0],kB=kD[1],kA=kD[2];kz[0]=kG*kA-kF*kB;kz[1]=kF*kC-ky*kA;kz[2]=ky*kB-kG*kC;return kz};kv.lerp=function(kA,kz,ky,kB){var kE=kz[0],kD=kz[1],kC=kz[2];kA[0]=kE+kB*(ky[0]-kE);kA[1]=kD+kB*(ky[1]-kD);kA[2]=kC+kB*(ky[2]-kC);return kA};kv.random=function(ky,kC){kC=kC||1;var kA=kr()*2*Math.PI;var kB=(kr()*2)-1;var kz=Math.sqrt(1-kB*kB)*kC;ky[0]=Math.cos(kA)*kz;ky[1]=Math.sin(kA)*kz;ky[2]=kB*kC;return ky};kv.transformMat4=function(kB,kA,kz){var ky=kA[0],kD=kA[1],kC=kA[2];kB[0]=kz[0]*ky+kz[4]*kD+kz[8]*kC+kz[12];kB[1]=kz[1]*ky+kz[5]*kD+kz[9]*kC+kz[13];kB[2]=kz[2]*ky+kz[6]*kD+kz[10]*kC+kz[14];return kB};kv.transformMat3=function(kB,kA,kz){var ky=kA[0],kD=kA[1],kC=kA[2];kB[0]=ky*kz[0]+kD*kz[3]+kC*kz[6];kB[1]=ky*kz[1]+kD*kz[4]+kC*kz[7];kB[2]=ky*kz[2]+kD*kz[5]+kC*kz[8];return kB};kv.transformQuat=function(kE,kK,ky){var kL=kK[0],kJ=kK[1],kI=kK[2],kG=ky[0],kF=ky[1],kD=ky[2],kH=ky[3],kB=kH*kL+kF*kI-kD*kJ,kA=kH*kJ+kD*kL-kG*kI,kz=kH*kI+kG*kJ-kF*kL,kC=-kG*kL-kF*kJ-kD*kI;kE[0]=kB*kH+kC*-kG+kA*-kD-kz*-kF;kE[1]=kA*kH+kC*-kF+kz*-kG-kB*-kD;kE[2]=kz*kH+kC*-kD+kB*-kF-kA*-kG;return kE};kv.rotateX=function(kA,kz,ky,kD){var kC=[],kB=[];kC[0]=kz[0]-ky[0];kC[1]=kz[1]-ky[1];kC[2]=kz[2]-ky[2];kB[0]=kC[0];kB[1]=kC[1]*Math.cos(kD)-kC[2]*Math.sin(kD);kB[2]=kC[1]*Math.sin(kD)+kC[2]*Math.cos(kD);kA[0]=kB[0]+ky[0];kA[1]=kB[1]+ky[1];kA[2]=kB[2]+ky[2];return kA};kv.rotateY=function(kA,kz,ky,kD){var kC=[],kB=[];kC[0]=kz[0]-ky[0];kC[1]=kz[1]-ky[1];kC[2]=kz[2]-ky[2];kB[0]=kC[2]*Math.sin(kD)+kC[0]*Math.cos(kD);kB[1]=kC[1];kB[2]=kC[2]*Math.cos(kD)-kC[0]*Math.sin(kD);kA[0]=kB[0]+ky[0];kA[1]=kB[1]+ky[1];kA[2]=kB[2]+ky[2];return kA};kv.rotateZ=function(kA,kz,ky,kD){var kC=[],kB=[];kC[0]=kz[0]-ky[0];kC[1]=kz[1]-ky[1];kC[2]=kz[2]-ky[2];kB[0]=kC[0]*Math.cos(kD)-kC[1]*Math.sin(kD);kB[1]=kC[0]*Math.sin(kD)+kC[1]*Math.cos(kD);kB[2]=kC[2];kA[0]=kB[0]+ky[0];kA[1]=kB[1]+ky[1];kA[2]=kB[2]+ky[2];return kA};kv.forEach=(function(){var ky=kv.create();return function(kB,kF,kG,kE,kD,kz){var kC,kA;if(!kF){kF=3}if(!kG){kG=0}if(kE){kA=Math.min((kE*kF)+kG,kB.length)}else{kA=kB.length}for(kC=kG;kC0){ky=1/Math.sqrt(ky);kC[0]=kB[0]*ky;kC[1]=kB[1]*ky;kC[2]=kB[2]*ky;kC[3]=kB[3]*ky}return kC};ku.dot=function(kz,ky){return kz[0]*ky[0]+kz[1]*ky[1]+kz[2]*ky[2]+kz[3]*ky[3]};ku.lerp=function(kA,kz,ky,kB){var kE=kz[0],kD=kz[1],kC=kz[2],kF=kz[3];kA[0]=kE+kB*(ky[0]-kE);kA[1]=kD+kB*(ky[1]-kD);kA[2]=kC+kB*(ky[2]-kC);kA[3]=kF+kB*(ky[3]-kF);return kA};ku.random=function(ky,kz){kz=kz||1;ky[0]=kr();ky[1]=kr();ky[2]=kr();ky[3]=kr();ku.normalize(ky,ky);ku.scale(ky,ky,kz);return ky};ku.transformMat4=function(kC,kB,kz){var ky=kB[0],kE=kB[1],kD=kB[2],kA=kB[3];kC[0]=kz[0]*ky+kz[4]*kE+kz[8]*kD+kz[12]*kA;kC[1]=kz[1]*ky+kz[5]*kE+kz[9]*kD+kz[13]*kA;kC[2]=kz[2]*ky+kz[6]*kE+kz[10]*kD+kz[14]*kA;kC[3]=kz[3]*ky+kz[7]*kE+kz[11]*kD+kz[15]*kA;return kC};ku.transformQuat=function(kE,kK,ky){var kL=kK[0],kJ=kK[1],kI=kK[2],kG=ky[0],kF=ky[1],kD=ky[2],kH=ky[3],kB=kH*kL+kF*kI-kD*kJ,kA=kH*kJ+kD*kL-kG*kI,kz=kH*kI+kG*kJ-kF*kL,kC=-kG*kL-kF*kJ-kD*kI;kE[0]=kB*kH+kC*-kG+kA*-kD-kz*-kF;kE[1]=kA*kH+kC*-kF+kz*-kG-kB*-kD;kE[2]=kz*kH+kC*-kD+kB*-kF-kA*-kG;return kE};ku.forEach=(function(){var ky=ku.create();return function(kB,kF,kG,kE,kD,kz){var kC,kA;if(!kF){kF=4}if(!kG){kG=0}if(kE){kA=Math.min((kE*kF)+kG,kB.length)}else{kA=kB.length}for(kC=kG;kC=2&&e<=4){this.result.eleData[e][i||0]=T;return}else{if(e===0||e===5||e===6){T.sort(function(kr,kq){return kr.overlay.zIndex-kq.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(kq){var e=this.result.bkData;if(typeof kq==="number"){if(e[kq]){e[kq][0]=[];e[kq][1]=[];e[kq][2]=[]}return}for(var T=0;T0){T[0].sort(function(kr,kq){return kr.tileInfo.useZoom-kq.tileInfo.useZoom})}}});var gy=(function(){var kA=new Int8Array(4);var T=new Int32Array(kA.buffer,0,1);var kv=new Float32Array(kA.buffer,0,1);function kC(kJ){T[0]=kJ;return kv[0]}function i(kJ){kv[0]=kJ;return T[0]}function kw(kJ){var kL=(kJ[3]<<24|kJ[2]<<16|kJ[1]<<8|kJ[0]);var kK=kC(kL&4278190079);return kK}var kr=0;var ku=1;var ky=2;var kG=0;var kD=1;var kB=2;var ks=9;function kz(kJ,kK){var kL;if(kK%2===0){kL=[-kJ[1],kJ[0]]}else{kL=[kJ[1],-kJ[0]]}return kL}function e(kJ,kK,kL){var kM=kz(kJ,kK);var kN;if(kL===ku){return kM}else{if(kK===4||kK===5){kN=[kM[0]-kJ[0],kM[1]-kJ[1]]}else{kN=[kM[0]+kJ[0],kM[1]+kJ[1]]}if(kL===kr){vec2.normalize(kN,kN)}return kN}}function kF(kK,kJ){return Math.sqrt(Math.pow(kK[0]-kJ[0],2)+Math.pow(kK[1]-kJ[1],2))}function kq(kN,kM,kL,kJ){var kK=vec2.dot(kN,kM);if(kL===kB||kL===kD){if((kJ===0||kJ===1)&&kK>0){return true}else{if((kJ===2||kJ===3)&&kK<0){return true}}}if((kJ===0||kJ===1)&&kK<0){return true}else{if((kJ===2||kJ===3)&&kK>0){return true}}return false}function kx(kK,kP,kR){var kQ=kz(kK,kP);var kM;var kO=kK;var kN=kR;var kT=[];vec2.normalize(kT,[kO[0]+kN[0],kO[1]+kN[1]]);var kS=vec2.dot(kQ,[-kT[1],kT[0]]);if(Math.abs(kS)<0.1){kS=1}var kL=1/kS;kM=[-kT[1]*kL,kT[0]*kL];var kJ=vec2.dot(kK,kM);if(kJ<0){vec2.negate(kM,kM)}return{cos2:kJ,offset:kM}}function kI(kK,kP,kR,kJ){var kQ=kz(kK,kP);var kO;var kN;var kM;if(kP===0||kP===1){kO=kR;kN=kK}else{kO=kK;kN=kR}if(!kO||!kN){return kQ}var kT=[kO[0]+kN[0],kO[1]+kN[1]];if(kT[0]===0&&kT[1]===0){vec2.normalize(kT,kN)}else{vec2.normalize(kT,kT)}var kU=kq(kT,kQ,kJ,kP);if(kU){return kQ}var kS=vec2.dot(kQ,[-kT[1],kT[0]]);if(Math.abs(kS)<0.1){kS=1}var kL=1/kS;kM=[-kT[1]*kL,kT[0]*kL];return kM}function kH(kU,kV,kO,kN,kW,kT,kM,kP,kL,kS){var kR;var kK=0;var kJ=false;kR=kT.length/ks-1;kt(kV[0],kU[0],kO[0],kW,kN,4,kP,kL,undefined,kT,kS);kR++;kK++;kt(kV[0],kU[0],kO[0],kW,kN,5,kP,kL,undefined,kT,kS);kR++;kK++;for(var kQ=0;kQ0){kQ+=kF(kV[kP],kV[kP-1]);kN.push(kQ*10)}if(kP!==kV.length-1){var kM=[kV[kP+1][0]-kV[kP][0],kV[kP+1][1]-kV[kP][1]];var kX=[];if(kM[0]===0&&kM[1]===0){kX=[0,0]}else{vec2.normalize(kX,kM)}kT[kT.length]=[kX[0],kX[1]]}}return kH(kT,kV,kN,kL,kW,kR,kJ,kw(kO),kK,kS)},toTileSolidLineVertices:function(kN,kK){var kL=new Float32Array(kN.length/ks*5);var kJ=new Int16Array(kL.buffer);var kP=0;var kM=0;for(var kO=0;kO0){this.zoomState=1}else{if(e<0){this.zoomState=-1}}this.lastZoom=i;return this.zoomState},releaseOutViewTileData:function(e){var kr=this.map._workerMgr.releasePendingData(e);for(var kq=0,T=kr.length;kq=0.5){kL=true}else{if(ky<0.5&&e>=0.5){kL=true}else{if(ky>=0.5&&e<0.5){kL=true}}}if(kL){this.cacheDataCollideLabels(0)}this.LAST_CALC_ZOOM=kw}else{if(this.tileLabels.length>0){this.cacheDataCollideLabels(e6.Browser.ie?50:30)}}},loadVectorLayerData:function(kw){this.map.temp.isPermitSpotOver=false;var kv=this;function ku(i,kx){var kz=kv.tileCache.getData(kx);if(!kz){return}if(!i||i.error){i.event&&bD.fetchDebug&&bD.fetchDebug.sendError({title:i.event.title,msg:i.event.msg,category:bD.fetchDebug.category.AJAX,level:bD.fetchDebug.levels.ERROR,url:i.event.title});var ky=new fS("ontileloaderror");i=i||{};ky.error=i.error||"";ky.message=i.message||"";kv.map.fire(ky);kz.status="init";kz.reloadTimer=setTimeout(function(){if(kz.retry<3){kz.retry++;kz.status="loading";kv.loadVectorTileData(i.tileInfo,ku)}else{kv.tileCache.removeData(kx);kv._checkTilesLoaded()}},4000);if(kv.map._featureMgr){kv.map._featureMgr.clearData(kv.drawIndex)}kv.getVectorLayerDataFromCache(kv.curViewTilesInfo,kv.getZoomState());return}if(kz.reloadTimer){clearTimeout(kz.reloadTimer);kz.reloadTimer=null}kv.callbackDataQueue.push([i,kx]);if(kv.processDataTimer){return}kv.processDataTimer=setTimeout(function(){while(kv.callbackDataQueue.length>0){var kB=kv.callbackDataQueue.shift();kv.vectorTileDataCbk(kB[0],kB[1]);kv._checkTilesLoaded()}if(kv.map._featureMgr){kv.map._featureMgr.clearData(kv.drawIndex)}kv.getVectorLayerDataFromCache(kv.curViewTilesInfo,kv.getZoomState());var kA=new fS("onrefresh");kA.source="webgllayer";kv.map.dispatchEvent(kA);kv.processDataTimer=null},200)}for(var kt=0,kr=kw.length;kt=1.5?2:1;for(var kC=0;kC65536){kM.renderData.base.push({type:"line",data:[gy.toTileSolidLineVertices(kS,4000),new Uint16Array(kV)]});kS=[];kV=[]}for(var kL=0;kL0){ks=kr.labelProcessor.collisionTest(ks,-1)}}else{if(kt||kv){if(this._collisionTimer){if(!kt){clearTimeout(this._collisionTimer)}else{if(Date.now()-kr.lastCollisionTestTime>500){kr.lastCollisionTestTime=Date.now()}else{clearTimeout(this._collisionTimer)}}}this._collisionTimer=setTimeout(function(){if(kr&&!kr.map.tileMgr&&!kr.map.tileMgr.isExitTileLayer(kr)){kr._collisionTimer=null;return}ks=kr.labelProcessor.collisionTest(kr.tileLabels);if(ks){if(kr._isInnerLayer&&kr.map.stencil&&kr.map.stencil.isPoiMask){var kw=kr.isPoiInPolygon(ks);i.setLabelData(kw,kr.drawIndex)}else{i.setLabelData(ks,kr.drawIndex)}}kr.updateLabels();kr.map.dispatchEvent(new fS("onrefresh"));kr._collisionTimer=null},60);return}else{ks=kr.labelProcessor.getCachedLabels(kr.tileLabels)}}if(ks){if(kr._isInnerLayer&&kr.map.stencil&&kr.map.stencil.isPoiMask){var ku=kr.isPoiInPolygon(ks);i.setLabelData(ku,kr.drawIndex)}else{i.setLabelData(ks,kr.drawIndex)}}kr.updateLabels();kr.map.dispatchEvent(new fS("onrefresh"))}if(!T){clearTimeout(kr.cacheLabelTimer);kq()}else{if(kr.cacheLabelTimer){return}kr.cacheLabelTimer=setTimeout(function e(){kq()},T)}},isPoiInPolygon:function(T){var kJ=this;var kz=kJ.map.stencil;var kr=kJ.map._featureMgr.result.eleData[9];var kq=[];for(var kE=0;kE0){var kq=ks.getZoom();if(T.labelZoom-kq<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)}ks.temp.isPermitSpotOver=false;this.labelProcessor.curSpotAdded=false}},loadRasterLayerData:function(kv,kq){this.thumbCache={};var kw=this.getZoomState();if(kq){for(var kt=0,kr=kv.length;kt3){kr();return}T.src=ku;ks++},this.retryTime)}T.onload=function(){kr();e&&e(this,kt)};T.onerror=function(){kr();bD.fetchDebug&&bD.fetchDebug.sendError({title:ku,msg:ku,category:bD.fetchDebug.category.RESOURCE,level:bD.fetchDebug.levels.ERROR,url:ku});e&&e(null,kt)};T.src=ku;return T},rasterTileDataCbk:function(ks,kq){if(!ks||typeof ks==="string"){this.tileCache.removeData(kq);return}var i=ks.tileInfo;var T=i.col;var ky=i.row;var kx=i.zoom;var e=this.tileCache.getData(kq);if(!e){return}var kt="id_"+T+"_"+ky+"_"+kx;var kw=this;e.dataType=gQ;e.tileInfo=i;if(i.tileTypeName==="xyz"){var kv=i.tileSize;e.textureSource=ks;e.renderData={vertexAll:[0,0,0,0,0,kv,0,0,1,0,kv,kv,0,1,1,0,0,0,0,0,kv,kv,0,1,1,0,kv,0,0,1]};kw.setRasterTileData(kq,e,kt)}else{e.textureSource=ks;var kr=e9.calcLoopParam(T,kx);var ku=kr.geoOffsetX;ks.tileInfo.loopOffsetX=ku;e.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(kq,e,kt)}},setRasterTileData:function(kr,e,kq){e.status="ready";this.tileCache.setData(kr,e);var T=false;if(this.curViewTilesInfo[kq]){e.dataType=gQ;e.png8=this.png8||false;this.map._featureMgr.setData(e,this.drawIndex,2);T=true}if(T){var i=new fS("onrefresh");i.source="webgllayer";this.map.dispatchEvent(i)}},_checkLayerTilesLoaded:function(){this.numTileLoading--;if(this.firstTileLoad===false){this.dispatchEvent(new fS("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 fS("ontilesloadend"));e.firstTileLoad=false}e._checkTileLoadedTimer=null},60)}},_checkTilesLoaded:function(){this._checkLayerTilesLoaded();this.numLoading--;if(this.map.firstTileLoad===false){this.map.dispatchEvent(new fS("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 fS("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 aU=5;var jj=4;var gJ=3;var N=2;var ez=1;var hG=0;function ax(e){this._ratio=go();this._iconCache={};this._map=e;this._drawingCanvasPool=[];this._drawingCanvasHeight=4096;this._bufferSpan=[5,5]}e6.extend(ax.prototype,{_loadIcons:function(T,kw,ks){var kq=0;var kt=this;var kr=this._map.config.style;for(var ku in T){kq++;var kv=new Image();kv.id=ku;kv.crossOrigin="anonymous";kv.onload=function(){kt._iconCache[this.id].loaded=true;kq--;if(kq===0){kw()}this.onload=null};kv.onerror=function(){kt._iconCache[this.id]=null;kq--;if(kq===0){kw()}this.onerror=null};if(!ks){var e=C.getIconSetPath(kr)+ku+".png";var i=bE();if(i&&i.udt){e+="?udt="+i.udt}}else{var e=ku}kv.src=e;this._iconCache[ku]={loaded:false,image:kv}}},_getEmptyDrawingCanvas:function(){for(var T=0;T0){while(ks0){ks=0;while(ks0){ks=0;while(ks0){var kK=this;this._loadIcons(kB,function(){kJ=kK._drawEachTypeOfLabels(kD,kC,kL,kv,ku,kz,kH);kL=kJ.curStyleId;kv=kJ.curX;ku=kJ.curY;kz=kJ.curLineHeight;var i=kK._generateEachLabelCanvas(e,ku,ky,kE,T,kI);kq(i[0],i[1])});return}var kw=this._generateEachLabelCanvas(e,ku,ky,kE,T,kI);kq(kw[0],kw[1])},drawCustomLabelsOnCanvas:function(kv,ku,T){if(kv.length===0){ku();return}var ks={};var kr=false;for(var kq=0;kqthis._drawingCanvasHeight){return{curX:kq,curY:T,curLineHeight:kr,curStyleId:kx}}}return{curX:kq,curY:T,curLineHeight:kr,curStyleId:kx}},_drawIndoorTextLabelOnCanvas:function(kr){var e=this._getEmptyDrawingCanvas();var ky=e.getContext("2d",{colorSpace:"display-p3"});ky.clearRect(0,0,e.width,e.height);var kG=0;var kx=null;var kw=0;var ku;var kD={};var kC=[];for(var ks in kr){if(ks==="tileInfo"){continue}var kq=kr[ks];var kB=kq.defaultFloor;var kv=kq.floors;for(var kA=0;kA4){k9=4}var kT=[];var kH=[];var kP=0;if(kr&&!kr[lb]){kr[lb]={}}var kB=kC+k9*2+ld[0]*2;var kU=kB;if(ku.containDescendings){kU+=4}if(k9===0){kU+=2}if(ku.textOnIcon){kU=Math.max(kU,ku.iconSize[1])}if(lb!==T||kU>kS){T=lb;if(kW>=10&&kW%10===0){kJ.font=kW*10+" "+kC+"px sans-serif"}else{kJ.font=kC+"px sans-serif"}if(kU>kS){var kQ=kU-kS;kS+=kQ;kK+=kQ}if(k9>0){kJ.lineWidth=k9*2;kJ.strokeStyle=kt}kJ.fillStyle=k3}if(ku.type==="line"){var kw=kR.split("");for(var lc=0;lc512){kL=0+this._bufferSpan[0];kK+=kU;kK+=this._bufferSpan[1];kS=kU}if(kK+this._bufferSpan[1]>this._drawingCanvasHeight){return{curX:kL,curY:kK,curLineHeight:kS,styleId:lb}}var k6=kL;if(k9>0){kq+=k9;k6-=Math.round(k9/2);kJ.strokeText(k5,kL,kK)}kJ.fillText(k5,kL,kK);var k2=[kq,kU];kM=[Math.round(k2[0]/2),Math.round(k2[1]/2)];kX=[k6,kK-kU];kr[lb][k5]={displaySize:kM,curWordPosition:kX,totalHeight:kP};kL+=kq+2}kT.push(kM);kH.push(kX)}kP=Math.round(kT[0][1])}else{if(kr[lb][kR]){var kE=kr[lb][kR];kT=kE.textSize;kH=kE.labelImagePosition;kP=kE.totalHeight}else{var kD=kR.split("\\");if(kD.length>1&&ku.textOnIcon){var le=0;var la=0;var lh=[];var kN=8;for(var lc=0;lcle){le=kA}lh.push(Math.round(kA/2));la+=kU}var kx=le+2*kN;var k8=la+2*kN;if(kL+kx>512){kL=0+this._bufferSpan[0];kK+=kS;kK+=this._bufferSpan[1]}kK+=la-kU+2*kN;var k1=kL;var kO=kK-k8;var e=Math.round(kx/2);var kG=this._iconCache[ku.icon].image;this.drawStretchedIcon(kJ,kG,[k1,kO],kN,le,la);for(var lc=0;lc512){kK+=kU;kK+=this._bufferSpan[1];if(kK+this._bufferSpan[1]>this._drawingCanvasHeight){kK-=kU;kK-=this._bufferSpan[1];return{overHeight:true,curX:kL,curY:kK,curLineHeight:kS,styleId:lb}}kL=0+this._bufferSpan[0];kS=kU}else{if(kK+this._bufferSpan[1]>this._drawingCanvasHeight){return{overHeight:true,curX:kL,curY:kK,curLineHeight:kS,styleId:lb}}}var k1=kL;var kO=kK-kU;var k0=kL;var kZ=kK;if(ku.containDescendings){kZ-=4}if(ku.textOnIcon){var kV=false;var kG=this._iconCache[ku.icon].image;var kY=ku.iconSize.concat([]);if(kB>=kY[1]){kY[1]=kB;kV=true;kU+=ks*2;var kQ=kU-kS;if(kQ>0){kK+=kQ;kS=kU;kZ+=(kQ-ks);kO+=(kQ-ks*2)}else{kZ-=ks;kO-=ks*2}}if(kA>=kY[0]){kY[0]=kA}if(ku.styleId===519){kJ.drawImage(kG,0,0,kY[0],kY[1],k1,kO,kY[0],kY[1])}else{if(ku.noStretch){kZ-=kB/2;var kI=kA+ks*2;kJ.drawImage(kG,0,0,kG.width,kG.height,k1,kO,kI,kB)}else{if(kV){this.drawStretchedIcon(kJ,kG,[k1,kO],ks,kA,kY[1])}else{this.draw3StretchedIcon(kJ,kG,[k1,kO],ks,kA,kY[1])}}}k0+=ks;if(ku.iconSize[1]>kB){kZ-=(ku.iconSize[1]-kB)/2-1}}if(k9>0){if(lb===71028){kU-=2}if(lb===32){kU-=2}kJ.strokeText(kR,k0,kZ)}kJ.fillText(kR,k0,kZ);var kv=[kx,kU];var kM=[Math.round(kv[0]/2),Math.round(kv[1]/2)];kT.push(kM);kH.push([k1,kO]);kP+=Math.round(kM[1]);kL+=kx}}kr[lb][kR]={textSize:kT,labelImagePosition:kH,totalHeight:kP}}}ku.textSize=kT;ku.labelImagePosition=kH;ku.totalHeight=kP;return{curX:kL,curY:kK,curLineHeight:kS,styleId:lb}},drawStretchedIcon:function(e,T,kq,kt,ku,i){var ks=kq[0];var kr=kq[1];e.drawImage(T,0,0,kt,kt,ks,kr,kt,kt);e.drawImage(T,kt,0,1,kt,ks+kt,kr,ku,kt);e.drawImage(T,T.width-kt,0,kt,kt,ks+ku+kt,kr,kt,kt);e.drawImage(T,0,kt,kt,1,ks,kr+kt,kt,i);e.drawImage(T,kt,kt,1,1,ks+kt,kr+kt,ku,i);e.drawImage(T,T.width-kt,kt,kt,1,ks+ku+kt,kr+kt,kt,i);e.drawImage(T,0,T.height-kt,kt,kt,ks,kr+i+kt,kt,kt);e.drawImage(T,kt,T.height-kt,1,kt,ks+kt,kr+i+kt,ku,kt);e.drawImage(T,T.width-kt,T.height-kt,kt,kt,ks+ku+kt,kr+i+kt,kt,kt)},draw3StretchedIcon:function(e,i,T,ks,ku,kt){var kr=T[0];var kq=T[1];e.drawImage(i,0,0,ks,i.height,kr,kq,ks,i.height);e.drawImage(i,ks,0,1,i.height,kr+ks,kq,ku,i.height);e.drawImage(i,i.width-ks,0,ks,i.height,kr+ks+ku,kq,ks,i.height)},_updateFixedLabelCoords:function(kr,kG){if(kG===0){return}var kB=[];var kN=[];var kO=0;var kE=kr.totalHeight;var kW=kr.textSize.length;var ks=kr.direction;if(typeof ks!=="number"){ks=0}for(var kP=0;kPT){T=kA}if(kye){e=ky}}}if(kw.custom&&kw.style.iconSize&&!kw.name){var kx=kw.style.iconSize;var kz=kw.direction;switch(kz){case jj:ks=-Math.round(kx[0]/2);kq=-Math.round(kx[1]/2);T=Math.round(kx[0]/2);e=Math.round(kx[1]/2);break;case N:ks=-Math.round(kx[0]/2);kq=0;T=Math.round(kx[0]/2);e=kx[1];break}}if(kw.textPos){var kt=kw.textPos["vertex"];for(var kv=0,kr=kt.length;kvT){T=kA}if(kye){e=ky}}}kw.bds=[ks,kq,T,e]},_updateLineLabelCoords:function(kH,kx){if(kx===0){return}var kq=kH.wordsInfo;var kE=kH.wordCount;if(!kH.labelImagePosition){return}var kz=kH.labelImagePosition.slice(0);if(kH.reverse){kz.reverse()}var kQ=1000;var kN=1000;var kO=-1000;var kM=-1000;for(var kI=0;kIkO){kO=kG}if(kskM){kM=ku}}kH.bds=[kQ,kN,kO,kM]}});var gc={0:"00000000",16:"00010000",32:"00100000",48:"00110000",64:"01000000",96:"01100000"};function eq(ks,ku,kq){var kr=ks.bds;if(!kr){return false}var kt=ks.tracer;var T;if(kt){if(!gc[kt]){T=kt.toString(2);if(T.length<8){T=new Array(8-T.length+1).join("0")+T}gc[kt]=T}T=gc[kt];var e=kl.mapZoomStartZoomMapping[ku];var kv=ku>20?21:ku;return T[kv-e]==="1"}var i=ks.displayRange;if(kq>=i[0]&&kq<=i[1]){return true}return false}function jp(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=go();this._useRound=true;this._sharpenRender=false;if(this._ratio>hX.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 aA((b2()||e6.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()}e6.extend(jp.prototype,{bind:function(){var T=this.map;var i=this;T.addEventListener("mapstatusbusy_inner",function(kq){i._mapIsMoving=true;if(i._ratio>hX.HIGH_RES_MIN_RATIO){i._sharpenRender=false}else{i._useRound=false}});T.addEventListener("mapstatusidle_inner",function(kq){if(i._ratio>hX.HIGH_RES_MIN_RATIO){i._sharpenRender=true}else{i._useRound=true}i._mapIsMoving=false});T.addEventListener("onspotmouseover",function(ks){if(!this.temp.isPermitSpotOver){return}if(ks.spots.length>0){var kr=ks.spots[0].userdata.uid;var kt=ks.spots[0].userdata.tilePosStr;var kq=i.getLabelByUid(kr,kt);kq&&kq.formatedData&&i._toHighlightColor(kq.formatedData)}});T.addEventListener("onspotmouseout",function(ks){if(!this.temp.isPermitSpotOver){return}if(ks.spots.length>0){var kr=ks.spots[0].userdata.uid;var kt=ks.spots[0].userdata.tilePosStr;var kq=i.getLabelByUid(kr,kt);kq&&kq.formatedData&&i._toDefaultColor(kq.formatedData)}});T.addEventListener("spotclick",function(ks){if(ks.spots&&ks.spots.length>0){if(ks.spots[0].userdata.zoom<10){return}var kr=ks.spots[0].userdata.uid;var kt=ks.spots[0].userdata.tilePosStr;if(i.currentSelectedLabel&&(i.currentSelectedLabel.uid!==kr||i.currentSelectedLabel.tilePosStr!==kt)){i._recoverNormalState()}var kq=i.getLabelByUid(kr,kt);kq&&i._changeBaseMapState(kq)}else{i._recoverNormalState()}});T.on("spot_status_reset",function(){i._recoverNormalState()});T.on("spot_highlight",function(kr){var kq=i.getLabelByUid(kr.uid,kr.tilePosStr);kq&&kq.formatedData&&i._toHighlightColor(kq.formatedData)});T.addEventListener("mousemove",function(kq){if(i.curSpotAdded){return}if(this.currentOperation!==em.idle||i._mapIsMoving===true){return}i._refreshSpotData();this.temp.isPermitSpotOver=true;i.curSpotAdded=true});if(b2()){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();i.fixedLabelData=[];i.lineLabelData=[];i.highlightLabelData=[];for(var kq=0;kq=0&&lm<45)||(lm>=315&&lm<360)){kD=lf;kC=le;lr=kK;lq=kJ}else{if(lm>=45&&lm<135){kD=le;kC=-kK;lr=kJ;lq=-lf}else{if(lm>=135&&lm<225){kD=-kK;kC=-kJ;lr=-lf;lq=-le}else{if(lm>=225&&lm<315){kD=-kJ;kC=lf;lr=-le;lq=kK}}}}ld._tempBds=[lv+kD,lu+kC,lv+lr,lu+lq];var lj=kE.pixelToPointIn(new fr(ld._tempBds[0],lc.y+kC),{zoom:kP});var lb=kE.pixelToPointIn(new fr(ld._tempBds[2],lc.y+lq),{zoom:kP});ld._mcBds=[lj,lb];kW.push(ld)}}var la=this._strategyInfo;if(la){var kU=la.guid;var kL=la.guidExt;var k8=false;for(var kM=0,kA=kW.length;kM0){lp=6}ln=kE.getZoom();if(ln>=8&&ln<9){ln<8.5?(lp=6):(lp=3)}if(kE._displayOptions.labelMargin>0){lp=kE._displayOptions.labelMargin}var k6=2;if(ln<6&&ln>=5){k6=-1}for(var k9=0,ky=kW.length;k9lx[2]+lp+k6||lg[3]+lp+k6lx[3]+lp+k6)){lo._intersectIdx.push(k2)}}}for(var k7=0,kx=kW.length;k7=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 ks=false;for(var kq=0;kqe){kx.isDel=true}if(kx.isDel){continue}var kE=kx.pt;var T=kx.iconPos;if(T&&T.texcoord){if(!T.rtVertex){T.rtVertex=[];kG=T.vertex;var ku=iW(kE.lng);var kD=iW(kE.lat);T.rtVertex=[ku[0],kD[0],ku[1],kD[1],0,kG[0],kG[1],0,0,T.texcoord[0],T.texcoord[1],ku[0],kD[0],ku[1],kD[1],0,kG[2],kG[3],0,0,T.texcoord[2],T.texcoord[3],ku[0],kD[0],ku[1],kD[1],0,kG[4],kG[5],0,0,T.texcoord[4],T.texcoord[5],ku[0],kD[0],ku[1],kD[1],0,kG[6],kG[7],0,0,T.texcoord[6],T.texcoord[7],ku[0],kD[0],ku[1],kD[1],0,kG[8],kG[9],0,0,T.texcoord[8],T.texcoord[9],ku[0],kD[0],ku[1],kD[1],0,kG[10],kG[11],0,0,T.texcoord[10],T.texcoord[11]]}}var kF=kx.textPos;if(kF){if(!kF.rtVertex){kF.rtVertex=[];kG=kF.vertex;var ks=kF.rtVertex;var kA=iW(kE.lng);var kJ=iW(kE.lat);var kI=iW(kq);for(var kz=0,kH=kG.length;kz45&&kU<315){if(kU>45&&kU<=135){kQ=270}else{if(kU>135&&kU<=225){kQ=180}else{if(kU>225&&kU<315){kQ=90}}}if(kG>225&&kG<=315&&kQ<=180){kC=true}else{if((kG>=0&&kG<=45||kG>=315&&kG<360)&&kQ>=180){kC=true}}}}for(var kW=0,kz=kI.length;kW=360){e-=360}while(e<0){e+=360}return e},fixDataFormat:function(ky){var kq=this.fixedLabelData;var e=this.lineLabelData;var T=this.highlightLabelData;var kG=0;var ku=0;var kD=0;var kE;if(this.currentSelectedLabel){var kt=this.getLabelByUid(this.currentSelectedLabel.guid,this.currentSelectedLabel.tilePosStr);if(!kt||kt.isDel){kq[kG]=this.currentSelectedLabel.formatedData;kG++;T[kD]=this.currentSelectedLabel.formatedData;kD++}}for(var kC=0;kCkq)){continue}var i=kr[e].spot||this._getSpotDataFromLabel(kr[e]);if(i){this._spotData.push(i)}}},_getSpotDataFromLabel:function(T){var ks=this.map;if(!T.bds){return null}var e=T.bds.slice(0);var kq=null;if(T.iconPos){kq=new cD(T.pt.lng,T.pt.lat)}var i=T.name?T.name.replace("\\\\","
"):"";if(T.iconPos&&T.iconPos.iconType.indexOf("ditie")>-1&&ks.getZoom()>14){i=""}var kr={n:i,pt:new cD(T.pt.lng,T.pt.lat),userdata:{iconPoint:kq,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=kr;return kr},drawLabelsOnCanvas:function(i,e){if(this._labelTextCanvas){this._labelTextCanvas.drawLabelsOnCanvas(i,e)}}});function ji(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()}ji.prototype.init=function(){var T=this._map;var i=this;function e(kq){i.updateLabels(kq)}T.addEventListener("add_tile_labels",e);T.addEventListener("onremove_tile_labels",e);T.addEventListener("onclear_labels",e);T.addEventListener("onlayer_clear",e)};ji.prototype.updateLabels=function(kt){var kx=this._map.tileMgr.getLabelTextCanvas();var T=this._map;var kv=this;var ku=c9();if(kt&&kt.model==="mvt"){var kz=kt.data;var ky="mvt_"+kt.index;if(!this._task[ky]){this._task[ky]=[ku]}else{this._task[ky].push(ku)}}else{var kz=T._customTileLabels;var ky="custom";if(!this._task[ky]){this._task[ky]=[ku]}else{this._task[ky].push(ku)}}var ks=JSON.parse(JSON.stringify(kz));for(var kr=0;krks},"\x64\x61\x6d\x78\x78":fT("0x47"),"\x63\x6c\x65\x78\x63":fT("0x48"),"\x61\x61\x6c\x6d\x69":fT("0x49"),"\x6d\x61\x78\x61\x65":"\x65\x68\x61","\x68\x69\x6c\x65\x68":fT("0x4a"),"\x68\x68\x68\x61\x61":fT("0x4b")};var e=T[fT("0x4c")];while(T[fT("0x4d")](e,"\x6c\x68\x63\x61")){switch(e){case fT("0x47"):this[fT("0x4e")]=[];e=fT("0x4f");break;case T[fT("0x50")]:kr["\x6f\x6e"](T[fT("0x51")],function(){var ku=T[fT("0x52")];while(ku!==T["\x64\x61\x78\x64\x6d"]){switch(ku){case T[fT("0x53")]:i[fT("0x54")]=null;ku=T[fT("0x55")];break;case fT("0x56"):i[fT("0x57")]=null;ku=fT("0x58");break;case T[fT("0x55")]:i[fT("0x59")]=[];ku=T[fT("0x5a")];break;case fT("0x5b"):if(typeof this[fT("0x5c")][fT("0x5d")]!==fT("0x37")){ku="\x78\x61\x69";break}ku=T[fT("0x5e")];break;case fT("0x34"):for(var kt=0,ks=i[fT("0x4e")][fT("0x5f")];T[fT("0x60")](kt,ks);kt++){i["\x61\x72\x72\x57\x6f\x72\x6b\x65\x72"][kt][fT("0x61")]=![]}ku=fT("0x5b");break}}});e=T[fT("0x62")];break;case"\x78\x63\x65":kr["\x6f\x6e"](T[fT("0x63")],function(){for(var ku=0,kt=i[fT("0x4e")][fT("0x5f")];kukB},"\x65\x65\x63\x65\x6d":T[fT("0x87")]};var ky;if(kA){ky=T[fT("0x88")]}else{ky=(window.location.protocol === "http:" ? "http:" : "https:") + "//api.map.baidu.com/res/webgl/10/worker_asm_45okjf.js"}for(var kx=0;T[fT("0x60")](kx,kq);kx++){var kw=fT("0x89");while(kw!==T[fT("0x8a")]){switch(kw){case fT("0x8b"):i[fT("0x4e")][fT("0x8c")](ku);kw=fT("0x41");break;case fT("0x42"):ku[fT("0x8d")]=function kv(kF){var kE=kz[fT("0x8e")];while(kz[fT("0x8f")](kE,"\x61\x6d\x61\x6d")){switch(kE){case kz[fT("0x90")]:kr[fT("0x91")](kB);kE=fT("0x92");break;case fT("0x86"):this[fT("0x93")]&&this[fT("0x93")](null,this["\x5f\x70\x61\x72\x73\x69\x6e\x67\x54\x69\x6c\x65\x4b\x65\x79"]);kE=kz[fT("0x94")];break;case fT("0x95"):var kD=i[fT("0x96")]["\x73\x68\x69\x66\x74"]();kE=fT("0x3e");break;case fT("0x97"):i[fT("0x98")](kD["\x75\x72\x6c"],kD["\x74\x69\x6c\x65\x49\x6e\x66\x6f"],kD[fT("0x99")],kC);kE=fT("0x85");break;case kz[fT("0x94")]:this[fT("0x9a")]=![];kE=kz[fT("0x9b")];break;case kz[fT("0x9c")]:var kC=kD[fT("0x9d")];kE="\x61\x61\x61";break;case fT("0x9e"):kB[fT("0x9f")]=kz[fT("0xa0")];kE=fT("0xa1");break;case fT("0x7d"):this["\x5f\x70\x61\x72\x73\x69\x6e\x67\x54\x69\x6c\x65\x49\x6e\x66\x6f"]=null;kE=kz[fT("0xa2")];break;case kz[fT("0xa2")]:this[fT("0xa3")]=null;kE=fT("0xa4");break;case kz[fT("0xa5")]:var kB=new fS(kz[fT("0xa6")]);kE=kz["\x6c\x78\x78\x65\x6d"];break;case fT("0x3c"):kE=kF[fT("0xa7")]?fT("0xa8"):kz["\x6d\x65\x6c\x68\x61"];break;case fT("0xa4"):if(kz[fT("0xa9")](i[fT("0x96")]["\x6c\x65\x6e\x67\x74\x68"],0)){kE=fT("0x95");break}kE=kz[fT("0xa5")];break;case"\x61\x78\x69":this[fT("0x93")]&&this[fT("0x93")](kF[fT("0xa7")],this["\x5f\x70\x61\x72\x73\x69\x6e\x67\x54\x69\x6c\x65\x4b\x65\x79"]);kE=kz[fT("0x94")];break;case"\x78\x65\x63":this["\x5f\x63\x62\x6b"]=null;kE=kz[fT("0xaa")];break}}};kw=T[fT("0xab")];break;case fT("0x89"):var ku=T[fT("0xac")](jZ,ky);kw=T[fT("0xad")];break}}}if(i[fT("0x96")][fT("0x5f")]>0){for(var kt=0;kt1?T[fT("0x78")]:"\x6d\x69\x6d";break;case fT("0x4f"):this[fT("0xb2")]=go();e=fT("0xb3");break;case fT("0xb4"):var i=this;e=T["\x68\x68\x68\x61\x61"];break;case T[fT("0x55")]:kq=2;e=T["\x64\x61\x6d\x78\x78"];break}}},"\x67\x65\x74\x49\x64\x6c\x65\x57\x6f\x72\x6b\x65\x72":function(){var e={"\x65\x64\x78\x6d\x65":"\x78\x63\x68","\x64\x63\x68\x69\x64":fT("0xb5"),"\x6c\x6c\x64\x6d\x64":fT("0xb6"),"\x63\x6c\x61\x64\x64":fT("0xb7"),"\x68\x61\x6d\x65\x65":fT("0xb8")};for(var kr=0,kq=this[fT("0x4e")][fT("0x5f")];kr=0;i--){var e=T[i];var ku=e[fT("0xb0")];if(kr[fT("0xbd")](ks[fT("0xbe")],ku[fT("0xbe")])){continue}var kt=kr["\x65\x61\x6c\x65\x69"](fT("0xbf")+ku[fT("0xc0")]+"\x5f"+ku[fT("0xc1")],"\x5f")+ku[fT("0xc2")];if(!ks[kt]){T[fT("0xc3")](i,1);kq[fT("0x8c")](ku)}}return kq},"\x6c\x6f\x61\x64\x54\x69\x6c\x65\x44\x61\x74\x61":function(kD,kC,kB,kA){var kz={"\x65\x68\x65\x63\x61":fT("0xc4"),"\x69\x6d\x61\x6c\x78":"\x78\x65\x65","\x6d\x68\x68\x6c\x64":fT("0xc5"),"\x6d\x65\x78\x65\x63":fT("0xc6"),"\x61\x65\x64\x65\x61":fT("0xc7"),"\x6d\x63\x68\x69\x63":fT("0xc8"),"\x69\x61\x69\x65\x61":function(kF,kE){return kF+kE},"\x65\x68\x61\x61\x6c":function(kF,kE){return kF+kE},"\x61\x63\x61\x61\x63":"\x46\x65\x61\x74\x75\x72\x65\x53\x74\x79\x6c\x65","\x65\x6c\x63\x69\x61":fT("0xc9"),"\x68\x69\x6d\x63\x6c":fT("0xca"),"\x63\x61\x69\x6d\x61":fT("0xcb"),"\x63\x69\x6d\x61\x64":"\x64\x65\x68","\x61\x64\x61\x78\x65":fT("0xcc"),"\x65\x78\x6d\x6d\x65":function(kF,kE){return kF+kE},"\x65\x6c\x65\x68\x65":"\x63\x75\x73\x74\x6f\x6d\x53\x74\x79\x6c\x65\x49\x6e\x66\x6f\x5f","\x65\x6c\x6d\x68\x64":"\x65\x6c\x64","\x6c\x61\x61\x78\x63":"\x65\x6c\x68","\x6c\x6c\x78\x6d\x68":fT("0xcd"),"\x61\x61\x68\x63\x65":fT("0xce"),"\x78\x63\x61\x78\x61":fT("0xcf"),"\x61\x65\x65\x61\x61":"\x6d\x64\x68","\x61\x6d\x65\x63\x61":function(kF,kE){return kF+kE},"\x6c\x68\x78\x6d\x6c":fT("0x1"),"\x61\x78\x6c\x64\x6d":fT("0xd0"),"\x68\x6c\x65\x6d\x65":"\x61\x6c\x61","\x68\x6c\x68\x63\x78":fT("0xd1"),"\x69\x65\x65\x63\x69":fT("0xd2"),"\x61\x65\x65\x6d\x63":fT("0xd3"),"\x65\x65\x68\x61\x6d":fT("0xd4"),"\x78\x69\x61\x61\x61":fT("0x98"),"\x6d\x64\x6d\x61\x65":fT("0xd5"),"\x65\x6c\x65\x78\x78":fT("0x49"),"\x61\x61\x78\x78\x68":fT("0xd6"),"\x61\x63\x6d\x61\x61":fT("0xd7"),"\x61\x65\x6d\x65\x6d":fT("0xd8"),"\x68\x61\x6c\x68\x61":"\x65\x6d\x69","\x6d\x65\x6c\x68\x6d":fT("0xd9"),"\x6c\x78\x6d\x61\x61":"\x65\x61\x63","\x69\x6c\x65\x65\x63":fT("0xda"),"\x6c\x61\x68\x65\x69":fT("0xdb"),"\x65\x68\x68\x6d\x68":fT("0xdc"),"\x78\x61\x63\x61\x65":fT("0xdd"),"\x78\x68\x65\x65\x69":fT("0xde"),"\x68\x6d\x78\x63\x68":function(kF,kE){return kF+kE},"\x65\x61\x78\x6d\x69":fT("0xdf"),"\x6c\x68\x61\x64\x6d":function(kF,kE){return kF+kE},"\x65\x61\x68\x69\x6c":fT("0xe0")};var ky=this[fT("0xe1")]();var kx=this[fT("0x7b")][fT("0xe2")][fT("0xe3")];var kw=kx?this[fT("0x7b")][fT("0xe2")][fT("0xe4")]:![];if(ky){var ku=fT("0xe5");while(ku!==kz[fT("0xe6")]){switch(ku){case kz[fT("0xe7")]:ky[fT("0xa3")]=kB;ku=fT("0xd0");break;case kz[fT("0xe8")]:kv[fT("0xe9")]=this[fT("0x54")];ku=kz[fT("0xea")];break;case kz[fT("0xeb")]:if(this[fT("0x7b")][fT("0xec")]){ku="\x6c\x65\x6c";break}ku=fT("0xd4");break;case kz[fT("0xed")]:if(!this[kz["\x69\x61\x69\x65\x61"](fT("0xca"),T)]&&bD[kz[fT("0xee")](kz[fT("0xef")],T)]){ku=fT("0xc9");break}ku=fT("0xcb");break;case kz[fT("0xf0")]:this[kz[fT("0xf1")]+T]=JSON[fT("0xf2")](bD[kz[fT("0xee")](fT("0xf3"),T)]);ku=kz[fT("0xf4")];break;case fT("0xe0"):if(!this[fT("0x57")]){ku=fT("0xcc");break}ku=kz["\x63\x69\x6d\x61\x64"];break;case kz[fT("0xf5")]: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"]=JSON["\x73\x74\x72\x69\x6e\x67\x69\x66\x79"](bD[kz[fT("0xf6")](kz["\x65\x6c\x65\x68\x65"],kt)]);ku="\x64\x65\x68";break;case fT("0xf7"):kv[fT("0xf8")]=this[fT("0x57")];ku=fT("0xf9");break;case fT("0xc6"):if(e&&this[fT("0x57")]){ku=fT("0xf7");break}ku=kz[fT("0xfa")];break;case kz[fT("0xfa")]:kv[fT("0xfb")]={"\x77\x6f\x72\x64\x53\x70\x61\x63\x65\x52\x61\x74\x69\x6f":this[fT("0x72")],"\x74\x65\x78\x74\x53\x69\x7a\x65\x52\x61\x74\x69\x6f":this[fT("0x76")]};ku=fT("0xfc");break;case kz["\x6c\x61\x61\x78\x63"]:if(!(e&&!this[fT("0x7b")][fT("0x5c")][fT("0xfd")])){ku=kz[fT("0xfe")];break}ku="\x69\x65\x61";break;case kz[fT("0xff")]:if(this[kz[fT("0xf1")]+T]){ku=kz[fT("0x100")];break}ku=fT("0xdf");break;case kz[fT("0x101")]:if(!this[fT("0x102")]){ku=kz[fT("0x103")];break}ku=fT("0x104");break;case fT("0xdf"):kv[fT("0x105")]=this[kz[fT("0x106")](fT("0x107"),kq)];ku=fT("0x108");break;case kz[fT("0xfe")]:kv[fT("0x109")]=this[fT("0x102")];ku=fT("0xdd");break;case kz["\x6c\x68\x78\x6d\x6c"]:ky[fT("0x61")]=!![];ku=fT("0xda");break;case kz["\x61\x78\x6c\x64\x6d"]:var ks=this[fT("0x7b")][fT("0x10a")]!==BMAPGL_NORMAL_MAP&&this["\x6d\x61\x70"][fT("0x5c")]["\x73\x68\x6f\x77\x56\x65\x63\x74\x6f\x72\x53\x74\x72\x65\x65\x74\x4c\x61\x79\x65\x72"];ku=fT("0xc7");break;case fT("0xd5"):var T=this["\x6d\x61\x70"]["\x67\x65\x74\x4d\x61\x70\x53\x74\x79\x6c\x65\x49\x64"]();ku=fT("0x49");break;case kz[fT("0x10b")]:kv[fT("0x10c")]=T;ku=fT("0x4");break;case kz[fT("0x10d")]:if(!this[fT("0x54")]){ku=fT("0x10e");break}ku=fT("0xd2");break;case"\x61\x6d\x61":this[fT("0x54")]=JSON[fT("0xf2")](bD[kz["\x65\x6c\x65\x68\x65"]+T]);ku=kz["\x69\x65\x65\x63\x69"];break;case fT("0xd6"):var e=!!(T[fT("0x10f")](kz[fT("0x110")])===0);ku=fT("0xdc");break;case kz[fT("0x111")]:var kv={"\x61\x63\x74\x69\x6f\x6e":kz[fT("0x112")],"\x75\x72\x6c":kD,"\x74\x69\x6c\x65\x49\x6e\x66\x6f":kC,"\x74\x69\x6c\x65\x4b\x65\x79":kB,"\x69\x73\x54\x65\x78\x74":kw,"\x69\x73\x50\x6f\x69":kx,"\x68\x61\x73\x50\x6f\x6c\x79":ks?![]:!![],"\x68\x61\x73\x4c\x69\x6e\x65":ks?this[fT("0x7b")][fT("0x5c")][fT("0x113")]:!![],"\x63\x61\x72\x70\x6f\x72\x74":kr};ku=kz[fT("0x114")];break;case kz[fT("0x115")]:var kt=this[fT("0x7b")]["\x67\x65\x74\x41\x72\x65\x61\x53\x74\x79\x6c\x65\x49\x64"]();ku=kz[fT("0x116")];break;case fT("0x117"):if(e){ku=kz[fT("0x118")];break}ku=fT("0x119");break;case fT("0xd7"):kq=kz["\x61\x65\x6d\x65\x6d"];ku=fT("0x119");break;case kz["\x68\x61\x6c\x68\x61"]:if(e&&bD[kz["\x65\x6c\x65\x68\x65"]+T]){ku="\x6d\x69\x69";break}ku=kz[fT("0x11a")];break;case kz[fT("0x11b")]:var kr=this[fT("0x7b")][fT("0xec")][fT("0x11c")];ku=kz[fT("0x111")];break;case kz[fT("0x11d")]:if(!ky[fT("0x61")]){ku=kz[fT("0xed")];break}ku=kz["\x69\x6c\x65\x65\x63"];break;case kz[fT("0x11e")]:ky["\x5f\x70\x61\x72\x73\x69\x6e\x67\x54\x69\x6c\x65\x49\x6e\x66\x6f"]=kC;ku=kz["\x69\x6d\x61\x6c\x78"];break;case kz[fT("0x103")]:this[fT("0x102")]=JSON[fT("0xf2")](bD[fT("0x109")]);ku=fT("0x104");break;case kz["\x65\x68\x68\x6d\x68"]:var kq=T;ku=fT("0x117");break;case fT("0xe5"):ky[fT("0x93")]=kA;ku=kz[fT("0x11e")];break;case kz[fT("0x11f")]:if(e&&this[fT("0x54")]){ku=kz[fT("0xe8")];break}ku=fT("0xc6");break;case fT("0xcb"):if(!this[fT("0x107")+kq]){ku=kz[fT("0x120")];break}ku=kz[fT("0x101")];break;case"\x65\x78\x65":kv[fT("0x121")]=kt;ku=kz[fT("0x122")];break;case fT("0xce"):kv[fT("0x123")]=this[kz[fT("0x124")](fT("0xca"),T)];ku=kz[fT("0x125")];break;case kz[fT("0x126")]:ky[fT("0x127")](kv);ku="\x68\x69\x61\x78";break;case"\x69\x69\x68":this[fT("0x107")+kq]=JSON[fT("0xf2")](bD[fT("0x105")+kq]);ku=kz[fT("0x101")];break;case kz[fT("0x11a")]:if(e&&bD[kz[fT("0x128")](fT("0x129"),kt)]){ku=kz[fT("0x12a")];break}ku=kz[fT("0xff")];break}}}else{var i={"\x75\x72\x6c":kD,"\x74\x69\x6c\x65\x49\x6e\x66\x6f":kC,"\x74\x69\x6c\x65\x4b\x65\x79":kB,"\x63\x62\x6b":kA};this[fT("0x96")][fT("0x8c")](i)}},"\x73\x65\x74\x57\x6f\x72\x6b\x65\x72\x43\x6f\x6e\x66\x69\x67":function(ks){var kr={"\x78\x61\x6d\x64\x6c":"\x61\x64\x61","\x65\x61\x61\x78\x61":fT("0x12b"),"\x65\x64\x65\x61\x61":fT("0x12c")};var kq=kr[fT("0x12d")];while(kq!==kr[fT("0x12e")]){switch(kq){case fT("0xdb"):for(var T=0;T1){for(var e=1;e0&&this.map.customLoaded&&this.map.areaCustomLoaded){this.loadLayersData()}else{var kq=this;this.map.loadMapStyleFiles(function(){kq.loadLayersData()})}},removeWebGLLayer:function(ks){var kt=false;for(var kr=0,kq=this.tileLayers.length;kr0){this.loadLayersData()}if(this.tileLayers.length===1){this.map.setDisplayOptions({isFlat:false})}else{var e=false;for(var kr=1;kr50);if(!e){if(!this.syncLoadTimer){this.syncLoadTimer=setTimeout(function(){kr._loadLayersFromCache(kq);kr.syncLoadTimer=null},40)}}else{this._loadLayersFromCache(kq)}if(!kr.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(!kr.map){return}if(kr.map.viewAnimationTime){if(new Date().getTime()-kr.map.viewAnimationTime<1000){return}kr.map.viewAnimationTime=new Date().getTime()}var kt=kr.tileLayers.length;kr.tilesInfoCache={};for(var kv=0;kv0});var T=kv.length;this.tilesInfoCache={};for(var kr=0;kre9._mc180X){var kB=e9.getSpaceDistanceInPixel(kt);kU=Math.ceil(kB/ks)}if(kM.sw.lng19505879.362428114||kM.sw.lat<-15949096.637571886){kM.ne.lat=19505879.362428114;kM.sw.lat=-15949096.637571886}var kx=[Math.floor(kM.sw.lng/kH)-kq,Math.floor(kM.sw.lat/kH)];var k7=[Math.floor(kM.ne.lng/kH)+kU,Math.floor(kM.ne.lat/kH)];kG=kx[0];kX=k7[0]+1;kN=kx[1];k1=k7[1]+1;var kC=[];for(var kz=kG;kz=0?kz-ku:kz+ku;var kJ="id_"+kI+"_"+kE+"_"+kt;if(!kC[kJ]){var kA={col:kI,row:kE,zoom:kt,useZoom:kZ,loopOffsetX:0,tileSize:kO,baseTileSize:ks,mercatorSize:kH,combine:false};kC.push(kA);kC[kJ]=true}}}if(this.map._tilt>0){for(var k5=0;k50&&kF.x0&&kF.ykS.lng&&kT.minYkS.lat){continue}if(!this.ifTileInMapBounds(kT,kM,k0,k8)){kC.splice(k5,1);k5--}}}kC.sort((function(i){return function(T,la){return((0.4*Math.abs(T.col-i[0])+0.6*Math.abs(T.row-i[1]))-(0.4*Math.abs(la.col-i[0])+0.6*Math.abs(la.row-i[1])))}})([kL,kv]));kC.zoom=kt;kC.tileTypeName=k9;return kC},calcXYZTilesInfo:function(kB,ku,kA,kF,kt,kI){var kw=kI.width;var kG=kI.height;var kv=Math.floor(kA);var kx=null;if(kt.transform.target==="EPSG3857"){var kq=dI.transformBDmcPoint(kB,kt.transform);var kr=dI.getRangeExtent(kq,kw,kG,kv,kt.transform);kx=[kr.minX,kr.minY,kr.maxX,kr.maxY]}else{if(kt.transform.source==="BD09MC"){var kq=[kB.lng,kB.lat];kx=[ku.sw.lng,ku.sw.lat,ku.ne.lng,ku.ne.lat]}else{var kq=dI.transformBDmcPoint(kB,kt.transform);var ks=dI.transformBDmcPoint(ku.ne,kt.transform);var kz=dI.transformBDmcPoint(ku.sw,kt.transform);kx=dI.getLoopBox(kq,[kz[0],kz[1],ks[0],ks[1]])}}if(!kq||!kx){return[]}kv=kv+kt.spanLevel;var T=dI.getTileRangeForExtentFactory(kx,kv,kt.transform);var e=[];var kJ=dI.getResolutionScale(kv,kt.transform);for(var kE=T.minX;kE<=T.maxX;kE++){for(var kC=T.minY;kC<=T.maxY;kC++){var kD={col:kE,row:kC,zoom:kv,useZoom:kv,tileTypeName:kF,loopOffsetX:0,tileSize:256*kJ,transform:kt.transform,combine:false,dataIndex:0};e.push(kD);var ky="id_"+kE+"_"+kC+"_"+kv;e[ky]=true}}var kH=dI.getTileCoordForCoordAndZ(kq,kv);e.sort((function(i){return function(kK,kL){return((0.4*Math.abs(kK.col-i[0])+0.6*Math.abs(kK.row-i[1]))-(0.4*Math.abs(kL.col-i[0])+0.6*Math.abs(kL.row-i[1])))}})([kH[1],kH[2]]));e.zoom=kv;e.tileTypeName=kF;return e},getCurrentViewTilesInfo:function(T,kq){var i=this._getTilesInfoKey(T,kq);var e=this.tilesInfoCache[i];if(!e){return this.calcTilesInfo(T,kq)}return e},ifTileInMapBounds:function(e,ks,T,kr){var i=ks.normalizedBottomLeft;var kD=ks.normalizedTopRight;var kv=ks.normalizedTopLeft;var kt=ks.normalizedBottomRight;var kq=false;var kC=new cD(e.minX,e.minY);var kz=new cD(e.maxX,e.maxY);var ku=new cD(kz.lng,kC.lat);var kA=new cD(kC.lng,kz.lat);var kx=[kA,kz,ku,kC];for(var kB=0,kw=kx.length;kB0){this.zoomState=1}else{if(e<0){this.zoomState=-1}}this.lastZoom=i;return this.zoomState}});function iO(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 cD(12069475.280738307,3929271.1724863998);this.iconCache=new aA((b2()||e6.Browser.ie)?64:128,{clearCallback:function(i){}})}bD.register(function(i){if(i._renderType!=="webgl"){return}var e=i._normalLayerMgr=new iO(i);i.toFormatCoords=function(ks,kv){var ku=[];var kt=e.base;if(kv&&kv.center){kt=jn.convertLL2MC(kv.center)}for(var kr=0;kr0})},_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 kq=null;var i=Date.now();return function(){var ku=Date.now();var kt=e-(ku-i);var ks=this;var kr=arguments;if(kq){clearTimeout(kq)}if(kt<=0){T.apply(ks,kr);i=Date.now()}else{kq=setTimeout(function(){T.apply(ks,kr)},kt)}}},pick:function(kv,kt){if(!this.layers.length){return false}var kq=false;var T=false;for(var ks=0;ks80*kY){kT=kR=kX[0];kS=kQ=kX[1];for(var kW=kY;kWkR){kR=k5}if(k3>kQ){kQ=k3}}k6=Math.max(kR-kT,kQ-kS)}T(k1,kU,kY,kT,kS,k6,null,kZ);return kU}function kL(kU,kW,kQ,kV,kR){var kS;var kT;if(kR===(kP(kU,kW,kQ,kV)>0)){for(kS=kW;kS=kW;kS-=kV){kT=kt(kS,kU[kS],kU[kS+1],kT)}}if(kT&&kz(kT,kT.next)){kH(kT);kT=kT.next}return kT}function kD(kT,kQ){if(!kT){return kT}if(!kQ){kQ=kT}var kS=kT;var kR;do{kR=false;if(!kS.steiner&&(kz(kS,kS.next)||kJ(kS.prev,kS,kS.next)===0)){kH(kS);kS=kQ=kS.prev;if(kS===kS.next){return null}kR=true}else{kS=kS.next}}while(kR||kS!==kQ);return kQ}function T(kR,kT,kW,kU,kQ,k0,kZ,kX){if(!kR){return}if(!kZ&&k0){ky(kR,kU,kQ,k0)}var kY=kR;var kS;var kV;while(kR.prev!==kR.next){kS=kR.prev;kV=kR.next;if(k0?kO(kR,kU,kQ,k0):kG(kR)){kT.push(kS.i/kW+kX);kT.push(kR.i/kW+kX);kT.push(kV.i/kW+kX);kH(kR);kR=kV.next;kY=kV.next;continue}kR=kV;if(kR===kY){if(!kZ){T(kD(kR),kT,kW,kU,kQ,k0,1,kX)}else{if(kZ===1){kR=kC(kR,kT,kW,kX);T(kR,kT,kW,kU,kQ,k0,2,kX)}else{if(kZ===2){kB(kR,kT,kW,kU,kQ,k0,kX)}}}break}}}function kG(kS){var kR=kS.prev;var kQ=kS;var kU=kS.next;if(kJ(kR,kQ,kU)>=0){return false}var kT=kS.next.next;while(kT!==kS.prev){if(kA(kR.x,kR.y,kQ.x,kQ.y,kU.x,kU.y,kT.x,kT.y)&&kJ(kT.prev,kT,kT.next)>=0){return false}kT=kT.next}return true}function kO(kV,kW,kU,k2){var kZ=kV.prev;var kY=kV;var kX=kV.next;if(kJ(kZ,kY,kX)>=0){return false}var k3=kZ.xkY.x?(kZ.x>kX.x?kZ.x:kX.x):(kY.x>kX.x?kY.x:kX.x);var kS=kZ.y>kY.y?(kZ.y>kX.y?kZ.y:kX.y):(kY.y>kX.y?kY.y:kX.y);var kR=e(k3,k0,kW,kU,k2);var k1=e(kT,kS,kW,kU,k2);var kQ=kV.nextZ;while(kQ&&kQ.z<=k1){if(kQ!==kV.prev&&kQ!==kV.next&&kA(kZ.x,kZ.y,kY.x,kY.y,kX.x,kX.y,kQ.x,kQ.y)&&kJ(kQ.prev,kQ,kQ.next)>=0){return false}kQ=kQ.nextZ}kQ=kV.prevZ;while(kQ&&kQ.z>=kR){if(kQ!==kV.prev&&kQ!==kV.next&&kA(kZ.x,kZ.y,kY.x,kY.y,kX.x,kX.y,kQ.x,kQ.y)&&kJ(kQ.prev,kQ,kQ.next)>=0){return false}kQ=kQ.prevZ}return true}function kC(kW,kS,kV,kU){var kT=kW;do{var kR=kT.prev;var kQ=kT.next.next;if(!kz(kR,kQ)&&i(kR,kT,kT.next,kQ)&&kK(kR,kQ)&&kK(kQ,kR)){kS.push(kR.i/kV+kU);kS.push(kT.i/kV+kU);kS.push(kQ.i/kV+kU);kH(kT);kH(kT.next);kT=kW=kQ}kT=kT.next}while(kT!==kW);return kT}function kB(kQ,kS,kU,kT,kR,kZ,kV){var kY=kQ;do{var kX=kY.next.next;while(kX!==kY.prev){if(kY.i!==kX.i&&kI(kY,kX)){var kW=kx(kY,kX);kY=kD(kY,kY.next);kW=kD(kW,kW.next);T(kY,kS,kU,kT,kR,kZ,null,kV);T(kW,kS,kU,kT,kR,kZ,null,kV);return}kX=kX.next}kY=kY.next}while(kY!==kQ)}function kF(kS,kZ,kV,kU){var kW=[];var kT;var kX;var kQ;var kR;var kY;for(kT=0,kX=kZ.length;kT=kR.next.y){var kZ=kR.x+(kV-kR.y)*(kR.next.x-kR.x)/(kR.next.y-kR.y);if(kZ<=kW&&kZ>kT){kT=kZ;if(kZ===kW){if(kV===kR.y){return kR}if(kV===kR.next.y){return kR.next}}kS=kR.x=kR.x&&kR.x>=k2&&kA(kVkS.x))&&kK(kR,kQ)){kS=kR;k1=kX}}kR=kR.next}return kS}function ky(kU,kQ,kT,kR){var kS=kU;do{if(kS.z===null){kS.z=e(kS.x,kS.y,kQ,kT,kR)}kS.prevZ=kS.prev;kS.nextZ=kS.next;kS=kS.next}while(kS!==kU);kS.prevZ.nextZ=null;kS.prevZ=null;kr(kS)}function kr(kW){var kT;var kS;var kR;var kV;var kX;var kQ;var kY;var kU;var kZ=1;do{kS=kW;kW=null;kX=null;kQ=0;while(kS){kQ++;kR=kS;kY=0;for(kT=0;kT0||(kU>0&&kR)){if(kY===0){kV=kR;kR=kR.nextZ;kU--}else{if(kU===0||!kR){kV=kS;kS=kS.nextZ;kY--}else{if(kS.z<=kR.z){kV=kS;kS=kS.nextZ;kY--}else{kV=kR;kR=kR.nextZ;kU--}}}if(kX){kX.nextZ=kV}else{kW=kV}kV.prevZ=kX;kX=kV}kS=kR}kX.nextZ=null;kZ*=2}while(kQ>1);return kW}function e(kR,kU,kQ,kT,kS){kR=32767*(kR-kQ)/kS;kU=32767*(kU-kT)/kS;kR=(kR|(kR<<8))&16711935;kR=(kR|(kR<<4))&252645135;kR=(kR|(kR<<2))&858993459;kR=(kR|(kR<<1))&1431655765;kU=(kU|(kU<<8))&16711935;kU=(kU|(kU<<4))&252645135;kU=(kU|(kU<<2))&858993459;kU=(kU|(kU<<1))&1431655765;return kR|(kU<<1)}function ku(kS){var kR=kS;var kQ=kS;do{if(kR.x=0&&(kU-kS)*(kV-kR)-(kW-kS)*(kT-kR)>=0&&(kW-kS)*(kX-kR)-(kQ-kS)*(kV-kR)>=0}function kI(kR,kQ){return kR.next.i!==kQ.i&&kR.prev.i!==kQ.i&&!kE(kR,kQ)&&kK(kR,kQ)&&kK(kQ,kR)&&kq(kR,kQ)}function kJ(kS,kR,kQ){return(kR.y-kS.y)*(kQ.x-kR.x)-(kR.x-kS.x)*(kQ.y-kR.y)}function kz(kR,kQ){return kR.x===kQ.x&&kR.y===kQ.y}function i(kS,kQ,kR,kT){if((kz(kS,kQ)&&kz(kR,kT))||(kz(kS,kT)&&kz(kR,kQ))){return true}return kJ(kS,kQ,kR)>0!==kJ(kS,kQ,kT)>0&&kJ(kR,kT,kS)>0!==kJ(kR,kT,kQ)>0}function kE(kR,kQ){var kS=kR;do{if(kS.i!==kR.i&&kS.next.i!==kR.i&&kS.i!==kQ.i&&kS.next.i!==kQ.i&&i(kS,kS.next,kR,kQ)){return true}kS=kS.next}while(kS!==kR);return false}function kK(kR,kQ){return kJ(kR.prev,kR,kR.next)<0?kJ(kR,kQ,kR.next)>=0&&kJ(kR,kR.prev,kQ)>=0:kJ(kR,kQ,kR.prev)<0||kJ(kR,kR.next,kQ)<0}function kq(kS,kR){var kV=kS;var kQ=false;var kU=(kS.x+kR.x)/2;var kT=(kS.y+kR.y)/2;do{if(((kV.y>kT)!==(kV.next.y>kT))&&(kU<(kV.next.x-kV.x)*(kT-kV.y)/(kV.next.y-kV.y)+kV.x)){kQ=!kQ}kV=kV.next}while(kV!==kS);return kQ}function kx(kS,kR){var kQ=new kN(kS.i,kS.x,kS.y);var kT=new kN(kR.i,kR.x,kR.y);var kV=kS.next;var kU=kR.prev;kS.next=kR;kR.prev=kS;kQ.next=kV;kV.prev=kQ;kT.next=kQ;kQ.prev=kT;kU.next=kT;kT.prev=kU;return kT}function kt(kR,kQ,kU,kS){var kT=new kN(kR,kQ,kU);if(!kS){kT.prev=kT;kT.next=kT}else{kT.next=kS.next;kT.prev=kS;kS.next.prev=kT;kS.next=kT}return kT}function kH(kQ){kQ.next.prev=kQ.prev;kQ.prev.next=kQ.next;if(kQ.prevZ){kQ.prevZ.nextZ=kQ.nextZ}if(kQ.nextZ){kQ.nextZ.prevZ=kQ.prevZ}}function kN(kR,kQ,kS){this.i=kR;this.x=kQ;this.y=kS;this.prev=null;this.next=null;this.z=null;this.prevZ=null;this.nextZ=null;this.steiner=false}kw.deviation=function(kV,k0,kX,kS){var kY=k0&&k0.length;var kU=kY?k0[0]*kX:kV.length;var kR=Math.abs(kP(kV,0,kU,kX));if(kY){for(var kW=0,kZ=k0.length;kW0){kS+=kU[kT-1].length;kQ.holes.push(kS)}}return kQ};return kw})();function cI(i,e){this.id=gd();this.workerPool=i;this.actors=[];this.currentActorIndex=0;this.ready=false;this.init(e)}cI.prototype.init=function(ks){const e=this.workerPool.acquire(this.id);for(var kq=0;kq"){this.setBusy(false);const kt=this.callbacks[ku];delete this.callbacks[ku];if(kt){if(kr.error){kt(io(kr.error))}else{kt(null,io(kr.data))}}}else{var T=this;const i=[];const e=kr.hasCallback?function(kv,kw){T.target.postMessage({id:ku,action:"",sourceMapId:T.mapId,error:kv?jG(kv):null,data:jG(kw,i)},i)}:function(kv){};const ks=io(kr.data);if(this.parent[kr.action]){this.parent[kr.action](kr.sourceMapId,ks,e)}}};jF.prototype.send=function(i,T,kt,kq,kr,ku){if(i==="release"){this.releasePendingData(T,kt);return}if(this.busy){this.taskQueue.push({action:i,data:T,callback:kt,targetMapId:kq,mustQueue:kr,callbackMetadata:ku});return}this.setBusy(true);var ks=Math.round((Math.random()*1000000000000000000)).toString(36).substring(0,10);const e=this.mapId+"_"+i+"_"+ks;if(kt){kt.metadata=ku;this.callbacks[e]=kt}const kv=[];this.target.postMessage({id:e,action:i,hasCallback:!!kt,targetMapId:kq,mustQueue:kr,sourceMapId:this.mapId,data:jG(T,kv)},kv);return{cancel:function(){if(kt){delete this.callbacks[e]}this.target.postMessage({id:e,action:"",targetMapId:kq,sourceMapId:this.mapId})}}};jF.prototype.stop=function(){this.taskQueue.length=0;this.busy=false;this.callbacks={}};jF.prototype.remove=function(){this.taskQueue.length=0;this.busy=false;this.target.removeEventListener("message",this.receive,false)};jF.prototype.releasePendingData=function(e,kt){var T=[];var kr=this.taskQueue;for(var kq=kr.length-1;kq>=0;kq--){var ks=kr[kq]["data"];if(!ks||!ks.layerId){break}if(ks.layerId!==e.layerId){continue}if(!e["id_"+ks.x+"_"+ks.y+"_"+ks.z]){kr.splice(kq,1);T.push(ks)}}kt(null,T)};var kg;function hx(){if(!kg){kg=new hD()}return kg}function hD(){this.active={}}hD.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)}}})};dd.prototype._checkIndoorByMove=function(){var T=this._map;var kw=T.getSize();var kB={x:kw.width/2,y:kw.height/2};var kA=Math.max(kw.width,kw.height);var kC=[];for(var kx in this._indoorData){var e=this._indoorData[kx].center;var kq=T.pointToPixelIn(new bD.Point(e[0],e[1]));var kt=co(kB,kq);kC.push({uid:kx,distance:kt})}if(kC.length===0){return}kC.sort(function(kD,i){return kD.distance-i.distance});var ks=kC[0];var ky=T.getCenterIn();var kr=false;for(var kv=0;kvku[0]&&ky.lat>ku[1]&&ky.lng=this._autoEnterZoom){this._checkIndoorByMove()}};dd.prototype.removeData=function(T,kr){if(!this._indoorData[T]){return}var kq=this._indoorData[T];for(var e=0;e21){kL=21}if(kE){kC=ky(kH,kI,kL,kE)}else{kC=T(kH,kI,kL,kK)}var kG=kC.drawId;var kB=kC.style;var kJ=kC.styleUpdate;var kM=[];if(!kG){return kM}for(var kD=0;kD>>0;var kD=(kF)&255;var kC=(kF>>8)&255;var kA=(kF>>16)&255;var kB=(kF>>24)&255;kv[kE]=[kD,kC,kA,kB];return kv[kE]}return{getStyleFromCache:function(kH,kC,kF,kG,kB,kE,kA){kH=kH||"default";var kD=kH+"-"+kC+"-"+kF+"-"+kG;if(kE){kD+="-indoor"}if(kB){if(!kz[kD]){kz[kD]=kw(kC,kF,kG,kB)}return kz[kD]}if(!kq[kD]){kq[kD]=kw(kC,kF,kG,kB,kA)}return kq[kD]}}})();bD.register(function(i){var e=new im(i)});function im(e){e.container.appendChild(this.render());this.bind(e)}im.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};im.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";e6.ac(e._ripple,"ripple-playing")});i.addEventListener("hotclick",function(T){if(!T||!T.pixel||!(T.pixel instanceof fr)){return}e._div.style.left=T.pixel.x+"px";e._div.style.top=T.pixel.y+"px";e6.ac(e._ripple,"ripple-playing")});e6.on(e._ripple,"transitionend",function(){e6.rc(e._ripple,"ripple-playing")})};function b1(e){de.call(this);if(!e){return}this._opts={};this._map=e;this._maxLat=84.6;this._minLat=-80.6;this._maxLatMC=jn.convertLL2MC(new cx(this._maxLat,0)).lat;this._minLatMC=jn.convertLL2MC(new cx(this._minLat,0)).lat}b1.inherits(de,"ToolbarItem");e6.extend(b1.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 cl(T,i){b1.call(this,T);i=i||{};this._opts=e6.extend(e6.extend(this._opts||{},{autoClear:false,tips:"测距",followText:"单击确定起点,双击结束绘制",unit:"metric",showResult:true,lineColor:"blue",lineStroke:2,opacity:1,lineStyle:"solid",cursor:C.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=C.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;he.load("tools",function(){e._draw()})}cl.inherits(b1,"PolylineTItem");e6.extend(cl.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;Tkw){kq-=ks;ku-=this._loopOffset}while(kqthis._mc180X){e-=this._mcTSpan}while(ethis._mc180X){i.lng-=this._mcTSpan;e-=this._mcTSpan;kr-=this._mcTSpan}while(i.lng=kx){var kw=kq+kz;if(this.isTileBlank(kw,e,kC)===true){continue}var T="id_"+kw+"_"+kD+"_"+e;if(!ky[T]){ky[T]=true;kA.push([kw,kD,e,0])}}else{if(kq<=kt){var kw=kq-kz;if(this.isTileBlank(kw,e,kC)===true){continue}var T="id_"+kw+"_"+kD+"_"+e;if(!ky[T]){ky[T]=true;kA.push([kw,kD,e,0])}}}}for(var ku=0,ks=kA.length;ku=0;ku--){var kq=ky[ku][0];if(this.isTileBlank(kq,e,kC)){ky.splice(ku,1)}}return ky},isTileBlank:function(T,kr,e){var ks=Math.pow(2,kr-3);var i=Math.round(this._validPixels*ks);var kq=6*ks*256/e;while(T>kq/2-1){T-=kq}while(T<-(kq/2)){T+=kq}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 e9=new bI();function ex(){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}ex.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}};ex.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};ex.prototype.getType=function(){return this._type};ex.prototype.getGeometry=function(){return this._geometry};ex.prototype.getId=function(){return this._id};ex.prototype.getProperties=function(){return this._properties};ex.prototype.getBox=function(){return this._box};ex.prototype.getState=function(){if(Object.keys(this._state).length>0){return this._state}else{return null}};ex.prototype.getStyle=function(){return this._style};ex.prototype.getStyleFunction=function(){return this._styleFunction};ex.prototype.setType=function(e){return this._type=e};ex.prototype.setGeometry=function(e){this._geometry=e};ex.prototype.setStyle=function(e){if(!e||Object.keys(e).length===0){return}for(var i in e){this.set(i,e[i],this._style)}};ex.prototype.setState=function(e){for(var i in e){this.set(i,e[i],this._state)}};ex.prototype.setId=function(e){this._id=e};ex.prototype.setProperties=function(e){for(var i in e){this.set(i,e[i],this._properties)}};ex.prototype.setBox=function(e){return this._box=e};ex.prototype.isPointInBox=function(e){return this._pointInBox(e,this._box)};ex.prototype.getPointGeoJSON=function(kq){var kz=this.renderData;if(kz){var kt=kz.active;if(!kz[kt]||!kz[kt]["poi"]){return null}var ky=[];var kv=kz[kt]["poi"];for(var kw=0;kw0){kx="MultiPolygon"}return{type:"Feature",properties:{},geometry:{type:kx,coordinates:[ky]}}}}};ex.prototype._pointInBox=function(e,i){if(i[0]>e[0]||i[1]>e[1]||i[2]ks[kt].bds[0])&&(T.y-kr.yks[kt].bds[1])){if(e.getTilt()>55){var ku=e.pointToOverlayPixelIn(ks[kt].pt);if(ku.outOfFrustum){continue}}kw=true;break}}}}return kw};ex.prototype._pixelPnpoly=function(kr,kt){var e=kt.length;var T=0;var ks=false;for(var kq=0;kq=kt[kq].lat)&&(kr.lat=kt[T].lat)&&(kr.lat1){for(var kB=1;kBkC){kx=Math.sqrt(Math.min(kr,kF))}if((T==null)||(T>kx)){kq=Math.sqrt(kF-ks)/Math.sqrt(kC);kz=Math.sqrt(kr-ks)/Math.sqrt(kC);T=kx;ky=kB}T=Math.min(T,kx)}}return{dist:T}};ex.prototype.isPointInGeometry=function(T,kv){var e=false;switch(this._type){case fZ.POINT:e=this._pixelPnpoint(T,this.renderData,kv);break;case fZ.LINE_STRING:var kr=this._getProximity({lng:T[0],lat:T[1]},this._geometry);var ku=this.renderData[this.renderData.active];if(!ku||!ku.line||!ku.line[0]||!ku.line[0].width){var kt=2}else{var kt=this.renderData[this.renderData.active]["line"][0].width;if(this.grid===eh.GridModel.GOOGLEWEB){kt=Math.max(kt/2*dI.gridScaleFromBDMCTo3857,2)}else{kt=Math.max(kt/2,2)}}if(kr.distkE[0]){kD[0]=kE[0]}if(kD[1]>kE[1]){kD[1]=kE[1]}if(kD[2]=0){continue}const kw=kv[kx];ks[kx]=jG(kw,kt)}if(kv instanceof Error){ks.message=kv.message}}if(e!=="Object"){ks["_$name"]=e}return ks}else{if(kv instanceof Function){return null}}throw new Error("不能被序列化")}function io(ks){if(ks===null||ks===undefined||typeof ks==="boolean"||typeof ks==="number"||typeof ks==="string"||ks instanceof Boolean||ks instanceof Number||ks instanceof String||ks instanceof Date||ks instanceof RegExp||fO(ks)||gt(ks)||ArrayBuffer.isView(ks)||ks instanceof ImageData){return ks}if(Array.isArray(ks)){var e=ks["_$name"];if(e){var kq=jh[e]["_class"];if(!kq){throw new Error("不能被反序列化")}if(kq.deserialize){return kq.deserialize(ks)}}const kr=[];for(var T=0;T=kr.minZoom&&kr.map.getZoom()<=kr.maxZoom){if(!kr._onMap){kr.addDataToMap();kr._onMap=true}}else{if(kr._onMap){kr.removeDataFromMap();kr._onMap=false}}};this.map.on("zoomend",this._onZoomEvent);var kr=this;var e=false;var kq={x:0,y:0};this._layerMouseEvent=function(kw){if(!kr.map||!kr._listeners||!kr.visible||!kr._onMap){return}if(!kr._listeners.onmousemove||Object.keys(kr._listeners.onmousemove).length===0){return}var kv=kr.pickOverlays(kw);var i;if(kv&&kv.length>0){i=new fS("onmousemove");i.features=kv;kr.map.platform.style.cursor=kr.map.config.overlayMoveCursor;e=true}else{if(!e||!kr._listeners.onmouseout||Object.keys(kr._listeners.onmouseout).length===0){return}kr.map.platform.style.cursor=kr.map.config.defaultCursor;i=new fS("onmouseout");i.features=null;e=false}if(i){i.point=kw.point;i.pixel=kw.pixel;i.latLng=kw.latlng;kr.dispatchEvent(i)}};this._layerClickEvent=function(kx){if(!kr.map||!kr._listeners||!kr.visible){return}if((!kr._listeners.onclick&&!kr._listeners.dblclick)||(Object.keys(kr._listeners.onclick).length===0&&Object.keys(kr._listeners.dblclick).length===0)){return}var kv={x:kx.clientX,y:kx.clientY};if(Math.abs(kv.x-kq.x)>kr.clickDistrict||Math.abs(kv.y-kq.y)>kr.clickDistrict){return}var kw=kr.pickOverlays(kx);var i=new fS(kx.type);i.point=kx.point;i.pixel=kx.pixel;i.latLng=kx.latlng;i.features=kw;kr.dispatchEvent(i)};this._layerMouseDownEvent=function(i){kq={x:i.clientX,y:i.clientY}};kt.addEventListener("onmousemove",this._layerMouseEvent);kt.addEventListener("onmouseout",this._layerMouseEvent);kt.addEventListener("onmousedown",this._layerMouseDownEvent);var ks=["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))};aO.prototype._register=function(e){e.layerName=this.layerName;e.setZIndex(this.level)};aO.prototype.resetStyle=function(){for(var e=0;e=0){this.overlayData.splice(e,1);this.map.removeOverlay(i)}}};aO.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=[]};aO.prototype.pickOverlays=function(ku){var kt=[];if(!this.visible||!this._onMap){return null}for(var kr=0;kr=0&&T0?kt:null};aO.prototype.setLevel=function(e){if(e>-999&&e<9999){this.level=e;for(var T=0;T(kx+ky)){kC.tileCache.clear();return null}if(ks.source!=="BD09MC"){kE.x=dI.getTilesLoop(kK,kE.x)}if(kB.length===4){var kJ=dI.getTileRangeExtent([kK,kE.x,kE.y]);var kH=e([kJ.minX,kJ.minY,kJ.maxX,kJ.maxY]);if(!kH){return null}}var kF="";if(kq){kF=kq;var kG=/[^\{}]*\{(.*)\}[^\}]*/;kF.match(kG);var kD=[];if(RegExp.$1){kD=RegExp.$1.split(",")}kF=kF.replace(/\{(.*)\}/,kD[(kE.x+kE.y)%kD.length]);kF=kF.replace(/\[x\]/gi,kw(kE.x,kE.y,kK));kF=kF.replace(/\[y\]/gi,kA(kE.x,kE.y,kK));kF=kF.replace(/\[z\]/gi,ku(kE.x,kE.y,kK));kF=kF.replace(/\[b\]/gi,kz(kE.x,kE.y,kK));kF=kF.replace(/\[w\]/gi,kr(kE.x,kE.y,kK));kF=kF.replace(/\[h\]/gi,kv(kE.x,kE.y,kK))}else{return null}return kF};function e(kD){if(kB&&kB instanceof Array&&kB.length===4){if((kB[0]<=kD[2]&&kB[1]<=kD[3])&&(kB[2]>=kD[0]&&kB[3]>=kD[1])){return true}else{return false}}return true}hI.sendMessage(aZ(4,3,7),["layer","xyz"]);return kC}function dy(i){this.src=c9();this.tileMaskUvCache=new aA(64,{clearCallback:function(ks){}});var kr=6;if(i.pixelMap){this.opacity=typeof i.pixelMap.opacity==="number"?i.pixelMap.opacity:1;ch(this.opacity,0,1);if(this.opacity<1){i.useThumbData=false}var kq=i.pixelMap||{};this.colors=kq.colors||["#F9F871","#FFC75F","#FF9671","#FF6F91","#D65DB1","#845EC2"];this.positions=kq.positions||[0,0.2,0.4,0.6,0.8,1];this.domain=kq.domain||[0,255];this.clamp=kq.clamp||this.domain;this.noData=(kq.noData!==undefined)?kq.noData:-99999;this.fomularC=kq.fomularC||"float generateValue(vec4 pixel){return pixel.r * 255.;}";this.fomularJS=kq.fomularJS||function(ks){return ks.r};this.maskPng=kq.maskPng||null;if(this.maskPng){this.loadMaskPng(this.maskPng)}this.maskData=kq.maskData||-1;this.maskCoord=kq.maskCoord||null;this.fHashcode=o({str:this.fomularC});var e=this.canPixelMap();if(e){this.isPixelMap=true;this.setPixelMap()}kr=i.pixelMap.cacheSize||kr}var T=new kd(i);T.ontology=this;this.layer=T;this.cacheSize=kr;this.tileCache=new aA(this.cacheSize,{clearCallback:function(ks){}});this.tileImageDataCache=new aA(this.cacheSize,{clearCallback:function(ks){}});hI.sendMessage(aZ(4,3,16),["layer","pixel"])}dy.inherits(e6.BaseClass,"PixelLayer");e6.extend(dy.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=o({colors:i,positions:e});this.pixelColorMap=hO.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=o({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 fS("onupdate");this.layer.map.dispatchEvent(e)}},_getInLayer:function(ky){if(!this.map){return null}var kx=Math.floor(this.map.getZoom());var kq=dI.transformBDmcPoint(ky,this.layer.transform);var ku=dI.getTileCoordForXYAndZ_(kq[0],kq[1],kx,false);var T=ku.join("-");var e=this.tileCache.getData(T);if(e){return e}var kr=this.layer.zIndex;var kt=this.map._featureMgr.result.bkData;var kv=kt[kr][2];var kz=null;for(var ks=0;ks=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 kq=[e];var kv=this.maskBox||[];var ks=kv[1][0]-kv[0][0];var kr=kv[1][1]-kv[0][1];var T=Math.floor((kq[0][0]-kv[0][0])/ks*this.imageMaskObject.width);var i=Math.floor((-kq[0][1]+kv[1][1])/kr*this.imageMaskObject.height);var ku=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 kt=this.imageMaskObject.data.data;if(ku+3>kt.length){return false}if(kt[ku+3]>0){if(this.maskData>-1&&this.maskData!==kt[ku]){return false}return true}return false},calMaskBox:function(){var T=this.maskCoord||[];if(this.hasMaskPng&&T&&T.length===2){var e=[];for(var kq=0;kq0){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 fS("ontilesloadstart"))});e.addEventListener("ontilesloadend",function(){T.dispatchEvent(new fS("ontilesloadend"))})},createTileLayer:function(i){const kq=i.tileUrlTemplate||"";const kv=i.xTemplate||function(kC,kE,kD){return kC};const kA=i.yTemplate||function(kC,kE,kD){return kE};const kt=i.zTemplate||function(kC,kE,kD){return kD};const kz=i.bTemplate||function(kC,kF,kE){const kD=jn.tileToBoundRange({col:kC,row:kF,zoom:kE,baseTileSize:256});return kD.MC.sw.lng+","+kD.MC.sw.lat+","+kD.MC.ne.lng+","+kD.MC.ne.lat};var kB=i.extent||[];const ku=i.extentCRSIsWGS84||false;var T=i.minZoom||0;var kx=i.maxZoom||23;var ky=i.spanLevel||0;var kw=new hH({transparentPng:true,dataType:2,spanLevel:ky,tileTypeName:"web",cacheSize:256,customLayer:true,clipTile:false,boundary:false,useThumbData:i.useThumbData||false});if(kB.length===4){if(ku){kB=dI.fromEPSG4326(kB)}var kr=dI.transformPointArr([kB[0],kB[1]],"EPSG3857","BD09MC");var ks=dI.transformPointArr([kB[2],kB[3]],"EPSG3857","BD09MC");kB=[kr[0],kr[1],ks[0],ks[1]]}kw.getTilesUrl=function(kD,kJ,kI){if(!kD||kJ<0||kJ<(T+ky)||kJ>(kx+ky)){kw.tileCache.clear();return null}if(kB.length===4){const kG=jn.tileToBoundRange({col:x,row:y,zoom:z,baseTileSize:256});var kH=e([kG.MC.getMin().lng,kG.MC.getMin().lat,kG.MC.getMax().lng,kG.MC.getMax().lat]);if(!kH){return null}}var kE="";if(kq){kE=kq;var kF=/[^\{}]*\{(.*)\}[^\}]*/;kE.match(kF);var kC=[];if(RegExp.$1){kC=RegExp.$1.split(",")}kE=kE.replace(/\{(.*)\}/,kC[(kD.x+kD.y)%kC.length]);kE=kE.replace(/\[x\]/gi,kv(kD.x,kD.y,kJ));kE=kE.replace(/\[y\]/gi,kA(kD.x,kD.y,kJ));kE=kE.replace(/\[z\]/gi,kt(kD.x,kD.y,kJ));kE=kE.replace(/\[b\]/gi,kz(kD.x,kD.y,kJ))}else{return null}return kE};function e(kC){if(kB&&kB instanceof Array&&kB.length===4){if((kB[0]<=kC[2]&&kB[1]<=kC[3])&&(kB[2]>=kC[0]&&kB[3]>=kC[1])){return true}else{return false}}return true}return kw},compileExpress:function(i,e){var i=eh.ExpressParse.normalizePropertyExpression(i,e);return i},resolveStyle:function(ks){var kq=ks||{};if(kq.style){var kr={};if(!kq.layers||kq.layers.length===0){var ku=eh.LayerTypes.POINT;var i=eh.LayerTypes.LINE;var kt=eh.LayerTypes.FILL;if(kq.style[ku]){kq.style[ku].type="point"}if(kq.style[i]){kq.style[i].type="polyline"}if(kq.style[kt]){kq.style[kt].type="polygon"}}for(var T in kq.style){if(kq.style.hasOwnProperty(T)){var e=kq.style[T];this._styleFormat(e.type,e.painter,T,kr)}}this.styleExpress=kr}},_styleFormat:function(kr,e,i,kq){var kt={};var ku=c5[kr];if(!ku){return}for(var T in e){if(e.hasOwnProperty(T)){var ks=this.compileExpress(e[T],ku[T]);kt[T]=ks}}kq[i]={type:kr,painter:kt}},evaluateContext:function(e,T,kq){var i=e+"_"+T.getId();var kr=this._stateCube[i];if(kr){T.setState(kr)}else{T._state={}}return{properties:function(){return T&&T.getProperties()},featureState:kq===true?{}:(T&&T.getState())}},evaluates:function(i,kq,kr){if(!this.styleExpress||!this.styleExpress.hasOwnProperty(i)){return null}var kt=this.styleExpress[i].painter;var e={};for(var T in kt){if(kt.hasOwnProperty(T)){var ks=kt[T].evaluate(this.evaluateContext(i,kq,kr));e[T]=ks}}return e},_updateState:function(T,kq,e){if(T instanceof jo&&T.layerName&&T.id){var i=T.layerName+"_"+T.id;if(e){this._set(kq,this._stateCube,i)}else{this._stateCube[i]=kq}this._stateCube[i].rank=(this._stateCube[i].rank||0)+1}else{if(typeof T==="string"){if(e){this._set(kq,this._stateCube,T)}else{this._stateCube[T]=kq}this._stateCube[T].rank=(this._stateCube[T].rank||0)+1}}},updateState:function(kr,ks,e){var T=JSON.stringify(this._stateCube);if(!(ks&&typeof ks==="object"&&Object.keys(ks).length>0)){return}if(!e){this._stateCube={}}if(kr instanceof Array){for(var kq=0;kqthis.maxZoom){kD._featureMgr.clearData(this.layer.drawIndex);kD._featureMgr.clearLabelOverlayData(this.layer.drawIndex);kD._featureMgr.clearLabelData(this.layer.drawIndex);return}var ku=this.layer.getZoomState();if(T){this.thumbCache={};var kB=-1;this.layer.tileLabels=[];var kx=kD._customLabelMgr.virtualTiles["mvt_"+this.layer.drawIndex];if(kx&&kx.label){this.layer.tileLabels.push(kx.label)}for(var kz=0,ky=ks.length;kz=0.5){kF=true}else{if(kw<0.5&&e>=0.5){kF=true}else{if(kw>=0.5&&e<0.5){kF=true}}}if(kF){this.layer.cacheDataCollideLabels(0)}this.layer.LAST_CALC_ZOOM=kt}else{if(this.layer.tileLabels.length>0){this.layer.cacheDataCollideLabels(e6.Browser.ie?50:30)}}}else{this.layer.cacheDataCollideLabels(0)}return}for(var kz=0,ky=ks.length;kze){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(kq,kt){var T=this.minZoom;var e=kq.col;var kw=kq.row;var kv=kq.zoom;for(var ku=1;ku<=kt;ku++){var kr=this._getParentTiles(e,kw,kv,T);if(kr===null){continue}kr.tileSize=kq.tileSize;kr.tileTypeName=kq.tileTypeName;kr.transform=kq.transform;var kx=this.layer.getTileKey(kr);var ks=this.layer.tileCache.getData(kx);if(ks&&ks.status==="ready"){ks.key=kx;return ks}e=kr.col;kw=kr.row;kv=kr.zoom}return false},_findChild:function(i,kt){var kv=this.maxZoom;var e=i.col;var kw=i.row;var ku=i.zoom;var kr=this._getChildTiles(e,kw,ku,kv,kt);if(!kr){return false}for(var kq=0;kqkx){return null}var kw=Math.pow(2,kt);var e=kq*kw;var kv=kz*kw;var ku=ky+kt;var kA=[];for(var kr=0;kr0){kv.layer._checkLayerTilesLoaded();var kD=kv.layer.callbackDataQueue.shift();kv._setTileData(kD[0],kD[1],kD[2])}var kC=new fS("onupdate");kv.map.dispatchEvent(kC);kv.processDataTimer=null},0)}})},_loadTileData:function(i,e){var kq=i.col;var ku=i.row;var kr=i.zoom;var T=this.layer.getTilesUrl(new fr(kq,ku),kr,i);if(!T){return}var kt=this.layer.getTileKey(i);var ks=new XMLHttpRequest();ks.open("GET",T,true);ks.responseType="arraybuffer";ks.timeout=3000;ks.ontimeout=function(){e&&e(null,kt,i)};ks.onreadystatechange=function(kv){if(this.readyState===4){if(this.status===200){e&&e(ks.response,kt,i);return}if(this.status>=400||this.status===0){e&&e(null,kt,i)}else{e&&e(null,kt,i)}}};ks.send()},_tileDataCbk:function(kr,kt,i){var e=this.layer.tileCache.getData(kt);if(!e){return}var ks=this.layer.map;var T=this;if(!kr||typeof kr==="string"){e.status="init";e.reloadTimer=setTimeout(function(){if(e.retry<3){e.retry++;e.status="loading";T._loadTileData(i,function(kv,kw,ku){T._tileDataCbk(kv,kw,ku)})}else{e.status="ignore"}},3000);return}if(e.reloadTimer){clearTimeout(e.reloadTimer);e.reloadTimer=null}var kq=(function(ku){return function(){var kv=i.col;var ky=i.row;var kw=i.zoom;var kx="id_"+kv+"_"+ky+"_"+kw;e.tileInfo=i;e.tileData=T.mvt.readFeatures(ku,T,ks,{x:kv,y:ky,z:kw,g:T.gridModel,mc:T._opt.transform&&T._opt.transform.source==="BD09MC"?true:false});T._processLabelData(e);T.layer.callbackDataQueue.push([kt,e,kx]);if(T.processDataTimer){return}T.processDataTimer=setTimeout(function(){while(T.layer.callbackDataQueue.length>0){var kz=T.layer.callbackDataQueue.shift();T._setTileData(kz[0],kz[1],kz[2])}T.doOnceDraw();T.processDataTimer=null},200)}})(kr);ks.jobScheduler.addJob(kq)},_setTileData:function(T,e,i){e.status="ready";this.layer.tileCache.setData(T,e);if(this.layer.curViewTilesInfo[i]){e.dataType=hV}},_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 kq=this;kq.layer.updateAllIconsTextureCoords(T);this.layer.labelProcessor.loadIconImages(T,function(ks){kq.layer.updateAllIconsTextureCoords(ks)},true);var kr=this.layer.map.tileMgr.getLabelTextCanvas();kr.drawCustomLabelsOnCanvas(T.label.fixedLabel,function(ks){if(ks){if(!T.label.textureHeights){T.label.textureHeights=[]}T.label.textureHeights[i.useZoom]=ks.height}kq.layer._doWorkAfterLabelImageLoad(T,ks,null,e)})},_getTileTexImgKey:function(i){var e="mvt_"+this.layer.drawIndex+"_"+i.col+"_"+i.row+"_"+i.zoom+"_";e=bD.getGUID(e);return e},_updateBRushCube:function(kt){var kv=kt.tileData;for(var T in kv){if(kv.hasOwnProperty(T)){var e=kv[T];for(var kr=0;kr0){kv=new fS("onmousemove");kv.value=kw;kq.map.platform.style.cursor=kq.map.config.overlayMoveCursor;e=true}else{kq.map.platform.style.cursor=kq.map.config.defaultCursor;if(!e||!kq._listeners.onmouseout||Object.keys(kq._listeners.onmouseout).length===0){return}kv=new fS("onmouseout");e=false}if(kv){kv.point=kx.point;kv.pixel=kx.pixel;kv.latLng=kx.latlng;kq.dispatchEvent(kv)}};this._layerClickEvent=function(kx){if(!kq.map||!kq._listeners){return}if((!kq._listeners.onclick&&!kq._listeners.dblclick)||(Object.keys(kq._listeners.onclick).length===0&&Object.keys(kq._listeners.dblclick).length===0)){return}var kv;var i=kx.point;var kw=kq.pickFeatures(i,kx.pixel);kv=new fS(kx.type);kv.point=i;kv.pixel=kx.pixel;kv.latLng=kx.latlng;kv.value=kw;kq.dispatchEvent(kv)};kt.addEventListener("onmousemove",this._layerMouseEvent);var ks=["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"}});eh._generateTexture=function(kt,ks,T){var kr=document.createElement("canvas");var e;var kq;if(ks.strokeStyle==="dashed"){e=16;kq=e*8}else{if(ks.strokeStyle==="dotted"){e=32;kq=e*2}}kr.width=e;kr.height=kq;var i=kr.getContext("2d");i.fillStyle=ks.strokeColor;i.globalAlpha=ks.strokeOpacity;var ku=ks.strokeWeight*2;if(ks.strokeStyle==="dashed"){ku=eh._drawDashArrayTexture(i,e,kq,ks)}else{if(ks.strokeStyle==="dotted"){ku=eh._drawDottedTexture(i,e,kq,ks.strokeWeight)}}if(window.createImageBitmap&&!ks.sync){createImageBitmap(kr,{imageOrientation:"flipY"}).then(function(kv){T(null,{totalDashLen:ku,texture:kv,textureSize:[e,kq]})})}else{T(null,{totalDashLen:ku,texture:kr.toDataURL(),textureSize:[e,kq]})}};eh._drawDashArrayTexture=function(kw,kq,ks,T){var ku=T.dashArray;if(!ku){kw.fillRect(0,0,kq,ks/2);return T.strokeWeight*4}else{var kv=0;if(ku.length%2!==0){ku=ku.concat(ku)}for(var kr=0;kr19){kr(null);return}var e=this.getZoomState(kq);var T=this.calCoord(i,kq,e);this.curViewTilesInfo=this.calTilesOrders(T.sw,T.ne,kq);this.clearData();this.clearRefs();this.loadLayerData(this.curViewTilesInfo,e,true,kr)},calCoord:function(T,kq,i){if(T.length!==4){return}var e=gcoord.transform([T[0],T[1]],gcoord[this.inputCRS],gcoord.BD09MC);var kr=gcoord.transform([T[2],T[3]],gcoord[this.inputCRS],gcoord.BD09MC);if(kr[1]>19505879.362428114||e[1]<-15949096.637571886){kr[1]=19505879.362428114;e[1]=-15949096.637571886}this._mapCenter[kq]=new cD((e[0]+kr[0])/2,(e[1]+kr[1])/2);return{sw:e,ne:kr}},calTilesOrders:function(kv,kB,kx){var ky=this.tileType.getMercatorSize(kx,kx);var kt=[Math.floor(kv[0]/ky),Math.floor(kv[1]/ky)];var i=[Math.floor(kB[0]/ky),Math.floor(kB[1]/ky)];var ku=kt[0]-1;var ks=i[0]+2;var kr=kt[1]-1;var kA=i[1]+2;var kw=[];for(var kq=ku;kq0){this.zoomState=1}else{if(e<0){this.zoomState=-1}}this.lastZoom=i;return this.zoomState||0},loadLayerData:function(kx,kq,kr,kw){this.thumbCache={};if(kr){for(var ku=0,ks=kx.length;ku3){kv();return}var kw=kt.getTilesUrl(new fr(e.col,e.row),e.zoom,i);kq.src=kw;i++},this.retryTime)}kq.onload=function(){kv();ks&&ks(this,T)};kq.onerror=function(){kv();ks&&ks(null,T)};kq.src=ku;return kq},rasterTileDataCbk:function(kr,kq,ku){if(!kr||typeof kr==="string"){this.tileCache.removeData(kq);return}var i=kr.tileInfo;var T=i.col;var kw=i.row;var kv=i.zoom;var e=this.tileCache.getData(kq);if(!e){return}e.textureSource=kr;e.dataType=gQ;e.tileInfo=i;e.status="ready";this.tileCache.setData(kq,e);var ks="id_"+T+"_"+kw+"_"+kv;var kt=false;if(this.curViewTilesInfo[ks]){e.png8=this.png8||false;e.key=kq;this.setData(e,2);kt=true}if(kt){this.calOutData(ku,e)}},getTilesUrl:function(kr,ky,i){var kt=i||0;var T=kr.x;var kz=kr.y;var kv=j2("ditu","normal");var ku=kv.udt;var kx=es.B_NORMAL_MAP.tileUrls;var ks=Math.abs(T+kz+kt)%kx.length;var kw=kx[ks];if(T<0){T="M"+(-T)}if(kz<0){kz="M"+(-kz)}var kq="x="+T+"&y="+kz+"&z="+Math.floor(ky);kq+="&styles=pl&scaler=2&udt="+ku+"&from=jsapi3_0";var e=kw+"?qt=vtile&"+kq;return e},calOutData:function(kw,T){if(!T){for(var kt=0;kt0){e[0].sort(function(T,i){return T.tileInfo.useZoom-i.tileInfo.useZoom})}}});function dE(T,i){aS.call(this,i);if(!bX(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=[];hI.sendMessage(aZ(4,3,13),["layer","overlay"])}dE.inherits(de,"CustomHtmlLayer");e6.extend(dE.prototype,{initialize:function(i){this.map=i;var e=this;this._zoomShowEvent=function(kq){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(kq,ks){if(!this.overlaysList||!this.map){return}var kr=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=gH.getType(e);if(T.toLowerCase()==="point"){var i=new gH({reference:this.config.coordinate});i.readFeaturesFromObject(e,{isPoints:true},function(ks){var kr=kq.render(ks);kr.id="cus_"+parseInt(Math.random()*1000000,10);kq.overlaysList.push(kr)});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 dE)||!this.map){return}var kq=T.overlaysList;for(var e=0;e0){T._addBubbles(ku.bubble_data)}if(T.cusInLabelUids){T.map.removeLabelsFromMapTile(T.cusInLabelUids)}T._addLabels(ku.carport_data,"indoor")};if(this.spotFillCache[kq]&&this.spotFillCache[kq][this.currentFloor]&&i){var kr=this.spotFillCache[kq][this.currentFloor];var e=T._parseParkingData(kr);T.spotFillLayer.setData(e);kt(kr)}j9.request(function(ku){if(ku&&ku.result&&!ku.result["error"]&&ku.content){var kv=T._unzip(ku.content[ks]);if(!kv||!kv.carport_data){return}T.spotFillData=T._parseParkingData(kv);if(kv&&kv.carport_data.length>0){T.floorsCache[T.currentFloor]=kv;T.spotFillCache[kq]=T.floorsCache}if(!T.spotFillLayer){T._addLabels(kv.carport_data,"indoor");T._addBubbles(kv.bubble_data);T._initGraph("indoor");T._initEvent("indoor",T.options.callback);T.addToMap("indoor")}else{if(kv&&kv.carport_data.length>0){T.spotFillLayer.setData(T.spotFillData)}}kt(kv)}else{console.log("获取室内车位数据失败,请检查是否已开通智能停车服务!")}},{qt:B,ak:eW,building_uid:kq,floor:ks})},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(kq){if(!kq){return}var T=kq.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(kr){if(kr.geo&&typeof kr.geo==="string"){kr.geo=JSON.parse(kr.geo)}var ks={type:"Feature",properties:{center:[kr.x,kr.y],state:kr.carport_state,type:kr.carport_type,name:kr.carport_name,uid:kr.carport_uid,floor:kr.floor,angle:kr.angle,label:kr.label},geometry:{type:"Polygon",coordinates:[kr.geo]}};e.features.push(ks)});return e},_initEvent:function(i,T){if(!this.map){return}var e=this;if(i==="indoor"){this.spotFillLayer.addEventListener("click",function(kv){if(kv.value.dataIndex!==-1&&kv.value.dataItem){var kt=kv.value.dataItem;var kq=kt.properties.center;var kr=kt.properties.bubble_data;var ku="";switch(kt.properties.state){case 1:ku="占用";break;case 2:ku="空闲";break;case 0:ku="未知";break;default:ku="未知";break}var ks={center:kq,state:ku,properties:kt.properties};T&&T(ks)}})}else{this.spotOutFillLayer.addEventListener("click",function(kv){if(kv.value.dataIndex!==-1&&kv.value.dataItem){var kt=kv.value.dataItem;var kq=kt.properties.center;var kr=kt.properties.bubble_data;var ku="";switch(kt.properties.state){case 1:ku="占用";break;case 2:ku="空闲";break;case 0:ku="未知";break;default:ku="未知";break}var ks={center:kq,state:ku,properties:kt.properties};T&&T(ks)}})}this.map.on("destory",function(){e._distory()})},_addBubbles:function(kt){if(!kt){return}this.bubbleDatas=[];this.cusInBubbleUids=[];for(var ks=0;ks0){this.adjustZIndex(kq);kq._normalLayerMgr.sortLayer()}else{var e=kq._featureMgr.result.bkData;this.zIndex=e.length||1}var T={tileTypeName:this.getType?this.getType():"custom",dataType:this.toString(),ontology:this};kq._featureMgr.createLayer(this.zIndex,T);this.map=kq;this.gl=kr;this.onAdd(kq,kr);var i=this;kq.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(kr){var T=this.zIndex;if(this.map&&this.map._featureMgr){var e=this.map._featureMgr.result.bkData;if(kr==="up"){for(var kq=this.zIndex+1;kq0;kq--){if(e[kq]){T=kq;break}}}}return T},setTargetZIndex:function(e){this.zIndex=e;if(this.map){this.map._normalLayerMgr.sortLayer()}},setZIndex:function(ku){ku=Math.abs(Math.floor(ku))||1;if(!ku||ku===this.zIndex){return}var kr=this.map._featureMgr.result.bkData;var kq=this.map.tileMgr.tileLayers;var kw=this.map._normalLayerMgr.layers;function kx(kC){var kA=null;var kB=[kq,kw];for(var ky=0;ky-1){return e}continue}if(ks-1){return e}}if(kv>=0){var e=T(kv*4);if(e>-1){return e}}if(ks>=ku&&kv<0){break}}return -1},pick:function(ku,kt,kq){var T=this.gl;var kv=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 ks=mat4.create(Float64Array);mat4.multiply(ks,this.map._webglPainter.projMatrix,i);this.render(T,ks,{isPickRender:true});var e=new Uint8Array(4*this.pickWidth*this.pickHeight);T.readPixels(ku*kv-Math.floor(this.pickWidth/2),T.canvas.height-kt*kv-Math.floor(this.pickHeight/2),this.pickWidth,this.pickHeight,T.RGBA,T.UNSIGNED_BYTE,e);var kr=this.rgbToIndex(e);if(this.getPickedItem){var kw=this.getPickedItem(kr,kq)}this.map._normalLayerMgr.restoreFramebuffer();return kw},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 fS("onupdate");this.map.dispatchEvent(e)}},doRender:function(){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(kr,kq,T){var i=new fS(T);i.pixel=kr.pixel;i.latLng=kr.latlng;i.value=kq;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 eb(e){e=e||{};cs.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;he.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)}eb.inherits(cs,"FeatureLayer");e6.extend(eb.prototype,{_async:function(){this.loadModule=true;this.resolveStyle();this.parseData()},compileExpress:function(i,e){var i=eh.ExpressParse.normalizePropertyExpression(i,e);return i},resolveStyle:function(){var e=this.style_opt||{};var kq=c5[this.type];if(this._appendStyle){kq=JSON.parse(JSON.stringify(kq));Object.assign(kq,this._appendStyle)}if(e&&this.type&&kq){var T={};for(var i in e){var ks=kq[i];if(e.hasOwnProperty(i)&&ks!==undefined){var kr=this.compileExpress(e[i],ks);T[i]=kr}}this.styleExpress=T}},evaluateContext:function(e,T){var i=T.id||e;var kq=this._stateCube[i];return{properties:function(){return T&&T.properties},featureState:kq||{}}},evaluates:function(i,kq){if(!this.styleExpress){return null}var ks=this.styleExpress;var e={};for(var T in ks){if(ks.hasOwnProperty(T)){var kr=ks[T].evaluate(this.evaluateContext(i,kq));e[T]=kr}}return e},_updateState:function(T,i,e){if(e){this._set(i,this._stateCube,T)}else{this._stateCube[T]=i}},_set:function(i,kr,T){var kq=kr[T]||(kr[T]={});for(var e in i){kq[e]=i[e]}},updateState:function(kr,ks,e){var T=JSON.stringify(this._stateCube);if(!(ks&&typeof ks==="object"&&Object.keys(ks).length>0)){return}if(!e){this._stateCube={}}if(kr instanceof Array){for(var kq=0;kq=this.DEL_COUNT){new Error("超出"+this.DEL_COUNT+"个限制")}var e=false;for(var kq=0;kq0){var kL=kT[kT.length-1];var kw=kL.geometry.coordinates;var kN=bf(kJ.lat-kw[1],kJ.lng-kw[0]);kT[kT.length-1].properties.endPoint=kJ.lng+","+kJ.lat;kT[kT.length-1].properties.rotation=kN;if(kR>1){var kF=kT[kT.length-2];var kG=kF.geometry.coordinates;kN=gY(kG,kw,[kJ.lng,kJ.lat]);kT[kT.length-1].properties.rotationPlus=Math.abs(kN)}}var kK=JSON.parse(JSON.stringify(kB));kK.index=kU;kK.line_node_type=kR===0?1:3;kK.startPoint=kR===0?"":kE.lng+","+kE.lat;kK.endPoint="";kK.rotationPlus=0;kT.push({type:"Feature",properties:kK,geometry:{coordinates:[kJ.lng,kJ.lat],type:"Point"}});kE=kJ;kI++}if(kI===1){kT.splice(kT.length-1,1)}if(kI>=2&&kT[kT.length-1].properties.endPoint===""){var ku=kT[kT.length-2];var T=ku.geometry.coordinates;var kt=kT[kT.length-1];var e=kt.geometry.coordinates;var kN=bf(e[1]-T[1],e[0]-T[0]);kK.rotation=kN;kK.line_node_type=2}}else{var ku=ks[0];var kS=jn.convertLL2MC(new cD(ku[0],ku[1]));var kA=ks[1];var kQ=jn.convertLL2MC(new cD(kA[0],kA[1]));var kt=ks[ks.length-1];var kW=jn.convertLL2MC(new cD(kt[0],kt[1]));var kH=ks[ks.length-2];var kx=jn.convertLL2MC(new cD(kH[0],kH[1]));var kM=[[kQ,kS],[kW,kx]];for(var kR=0;kR<2;kR++){var kV=[kM[kR][0].lng,kM[kR][0].lat];var kC=[kM[kR][1].lng,kM[kR][1].lat];var kK=JSON.parse(JSON.stringify(kB));kK.index=kU;var kN=bf(kV[1]-kC[1],kV[0]-kC[0]);kK.rotation=kN;kK.line_node_type=kR===0?1:2;kK.startPoint=kR===0?"":kV.join(",");kK.endPoint=kR===0?kC.join(","):"";kK.rotationPlus=0;kT.push({type:"Feature",properties:kK,geometry:{coordinates:kR===0?kC:kV,type:"Point"}})}}if(this.base_opt.nodeMiddleShow&&kv+1<=kT.length){var kr=kT.length;for(var kP=kv+1;kP25)?6:e.nodeMinZoom;eb.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 aX(i)}hI.sendMessage(aZ(4,3,10),["layer","line"])}bY.Segment={START_POINT:1,END_POINT:2,BREAK_POINT:3,MIDDLE_POINT:4,1:1,2:2,3:3,4:4};bY.inherits(eb,"LineLayer");e6.extend(bY.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 kq=this.dataset=this.formatData(T);this.dispatchEvent(new fS("ondataparsed"));var i=this.linesParse(kq.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(kD){var kv=[[],[]];var ks=0;var kz=-1;for(var kH=0;kH0){var kG=this.buildLineVertex(kI,kD[kH],kt,ky,e,ks);kv[0][kv[0].length]={index:kw,styleData:kG,textureKey:-1,texture:null,textureSize:null,zoomWithMap:true,start:aX.hasMask(ku),end:aX.hasMask(kr),overlay:{_config:{textureRepeat:true},_totalDashLen:null,}}}}var kE=kI.strokeWeight/2;var kF=this.getColorStyleForGL(kI.strokeColor,kI.strokeOpacity,false);if(kB>-1&&this.style_opt.linksLine&&this.style_opt.strokeColorControl instanceof Function){var kA=this.style_opt.strokeColorControl(kw,kB);kF=this.getColorStyleForGL(kA,undefined,false)}var kG=this.buildLineVertex(kI,kD[kH],kt,kE,kF,ks);var kA=this._generateTexture(kI)||{};var kC=kA.value||null;var T={index:kw,styleData:kG,textureKey:kA.key||-1,texture:kC?kC.texture:null,textureSize:kC?kC.textureSize:null,zoomWithMap:true,start:this.base_opt.nodeMask&&aX.hasMask(ku),end:this.base_opt.nodeMask&&aX.hasMask(kr),overlay:{_config:{textureRepeat:true},_totalDashLen:kC?kC.totalDashLen:null,}};if(this.style_opt.borderCovered&&!this.base_opt.nodeStrict){kv[1][kv[1].length]=T}else{kv[0][kv[0].length]=T}if(kG[0]&&kG[0][0] instanceof Array){ks=kG[0][0][kG[0][0].length-1]/10||0}}return kv},combineLine:function(ks){var ky=[];var kq=[];var kE=[];for(var ku=0;ku0){var kA={};for(var kv=0;kv=0){var kC=ks[0][kx];if(!kA[kv+1][kC.textureKey]){kA[kv+1][kC.textureKey]=[{style:[],styleData:[[],[]],index:[]}]}this._mergeOnePolylineData(kA[kv+1][kC.textureKey],kC);var e=ks[0][kx+1];if(e&&e.index===kw){if(!kA[kv+1][e.textureKey]){kA[kv+1][e.textureKey]=[{style:[],styleData:[[],[]],index:[]}]}this._mergeOnePolylineData(kA[kv+1][e.textureKey],e)}}}kE.push(kr)}ky[0]=kA}if(this.attachNode){var kB=this._pointGeoFilter(this.getData());var kz=JSON.parse(JSON.stringify(this.params||{}));kz.nodeStrictIndex=kE;this.attachNode.setData(kB,kz)}return ky},_findLineIndex:function(e,kq){for(var T=0;T0){for(var kr=0;kr0){for(var kq=0;kq65536){kz++;kr=e[kz]={style:[],styleData:[[],[]],index:[],texture:null,textureSize:null,zoomWithMap:null,overlay:null};i=kr.styleData[0];kw=kr.styleData[1];kv=0}if(kr.styleData[0].length===0){kr.texture=kB.texture;kr.textureSize=kB.textureSize;kr.zoomWithMap=kB.zoomWithMap;kr.overlay=kB.overlay}kr.index[kr.index.length]=kB.index;for(var ku=0;ku65536){kC.push([kw,kA]);kw=[];kA=[]}gy.buildData(ky[kv],ks,kz,kw,kA,ku,kr,undefined,kt)}kC.push([kw,kA]);return kC},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 w(i,{components:T,members:e},w.BufferType.VERTEX)},createBufferArrData:function(kA){var kx=[];var ky=0;for(var kD in kA){if(!kA.hasOwnProperty(kD)){continue}var kt=kA[kD];var kC=[];for(var kq in kt){if(!kt.hasOwnProperty(kq)){continue}var kw=kt[kq];var kz=[];for(var kv=0;kvthis.base_opt.nodeMinZoom&&this.base_opt.nodeMask){ku.clear(ku.STENCIL_BUFFER_BIT);ku.stencilFunc(ku.ALWAYS,1,255);e.stencilOp(ku.KEEP,ku.KEEP,ku.REPLACE);ku.stencilMask(255);e.colorMask(false,false,false,false);kt.isMask=true;this.attachNode.render(ku,kq,kt);ku.stencilFunc(ku.NOTEQUAL,1,255);ku.stencilMask(0);e.stencilOp(ku.KEEP,ku.KEEP,ku.KEEP);e.colorMask(true,true,true,true)}for(var ks=0;ksthis.base_opt.nodeMinZoom){ku.clear(ku.STENCIL_BUFFER_BIT);ku.stencilMask(255);ku.stencilFunc(ku.ALWAYS,1,255);kt.isMask=false;this.attachNode.render(ku,kq,kt)}}return}if(this.buffer[0].length>0){if(this.style_opt.borderMask&&this.style_opt.borderCovered){ku.clear(ku.STENCIL_BUFFER_BIT);ku.stencilFunc(ku.ALWAYS,1,255);e.stencilOp(ku.KEEP,ku.KEEP,ku.REPLACE);ku.stencilMask(255);e.colorMask(false,false,false,false);for(var ks=0;ksthis.base_opt.nodeMinZoom&&this.base_opt.nodeMask){kt.clear(kt.STENCIL_BUFFER_BIT);kt.stencilFunc(kt.ALWAYS,1,255);e.stencilOp(kt.KEEP,kt.KEEP,kt.REPLACE);kt.stencilMask(255);e.colorMask(false,false,false,false);kr.isMask=true;this.attachNode.render(kt,T,kr);kt.stencilFunc(kt.NOTEQUAL,1,255);kt.stencilMask(0);e.stencilOp(kt.KEEP,kt.KEEP,kt.KEEP);e.colorMask(true,true,true,true)}for(var kq=0;kqthis.base_opt.nodeMinZoom){kt.clear(kt.STENCIL_BUFFER_BIT);kt.stencilMask(255);kt.stencilFunc(kt.ALWAYS,1,255);kr.isMask=false;this.attachNode.render(kt,T,kr)}},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(kq,i){var e;if(i){e=new Int32Array(this.DEL_COUNT)}else{e=new Int16Array(this.DEL_COUNT)}if(kq&&kq.length){var T=0;for(;T0){ks+=kw[kr-1].length}kt=hP(kw[kr].pointsArray,null,null,ks);for(var T=0,kv=kt.length;T=3?kE[0]:[0,0,0,0];if(ks.lastState.bound!==e){kD.uniform4fv(ks.uniforms.u_bound,e);ks.lastState.bound=e}var kH=kE.length>=3?kE[1]:0;if(ks.lastState.scale!==kH){kD.uniform1f(ks.uniforms.u_scale,kH);ks.lastState.scale=kH}var kr=kE.length>=3?kE[2]:[0,0];if(ks.lastState.offset!==kr){kD.uniform2fv(ks.uniforms.u_offset,kr);ks.lastState.offset=kr}var kv=this.base_opt.isFlat;if(ks.lastState.isFlat!==kv){kD.uniform1i(ks.uniforms.u_flat,kv);ks.lastState.isFlat=kv}var kC=this.base_opt.drawPart||1;if(ks.lastState.drawPart!==kC){kD.uniform1i(ks.uniforms.u_draw_part,kC);ks.lastState.drawPart=kC}var ku=kG._camera._far||4000;if(ks.lastState.cameraFar!==ku){kD.uniform1f(ks.uniforms.u_camera_far,ku);ks.lastState.cameraFar=ku}kD.uniform1i(ks.uniforms.u_pick_model,this.pickModel);if(ks.lastState.selectColor!==this.select_color){kD.uniform4fv(ks.uniforms.u_pick_color,this.select_color);ks.lastState.selectColor=this.select_color}if(ks.lastState.pickTag!==this.selectedIndex){kD.uniform1i(ks.uniforms.u_pick_tag,this.selectedIndex+1);ks.lastState.pickTag=this.selectedIndex}var kF=new Int16Array(this.DEL_COUNT);if(this.delIndexs.length){for(var kB=0;kB=0){if(!kw[T]){kw[T]=[]}kw[T].push(kr)}}}return kw},_findTargetGroup:function(T,kr){for(var kq=0;kq65536){kz.push({vertex:[],indices:[]});ku=kz[kz.length-1].vertex;kx=kz[kz.length-1].indices}for(var ks=0;ks<4;ks++){ku.push(T.position[0],T.position[1]);var kq=this.int8ArrayToFloat([T.anchor,ks,T.shapeType,T.lineNodeType]);ku.push(kq);ku.push(T.size,T.scale,T.rotation*Math.PI/180);ku.push(T.offset[0],T.offset[1]);var e=this.getColorStyleForGL(T.color,undefined,true);var ky=this.getColorStyleForGL(T.strokeColor,undefined,true);ku.push(this.rgb2value(e),T.opacity,this.rgb2value(ky),T.strokeWeight);if(T.startPoint){ku.push(T.startPoint[0],T.startPoint[1])}else{ku.push(0.1,0.1)}if(T.endPoint){ku.push(T.endPoint[0],T.endPoint[1])}else{ku.push(0.1,0.1)}ku.push(T.index,T.id)}var kr=(kx.length/6)*4;kx.push(kr,kr+2,kr+1,kr,kr+3,kr+2)}return kz},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 w(i,{components:T,members:e},w.BufferType.VERTEX)},createBufferData:function(kt,e){var ku=[];e=e||0;for(var kq=0;kqkt.renderIndex){for(var kr=0;kr65536){e.push({vertex:[],indices:[]});kq=e[e.length-1].vertex;ks=e[e.length-1].indices}for(var T=3;T>=0;T--){kq.push(kr.position[0],kr.position[1]);kq.push(kr.sizes[0],kr.sizes[1],kr.anchors[0],kr.anchors[1]);kq.push(kr.scale,kr.rotation*Math.PI/180,4-T,kr.opacity);kq.push(kr.offset[0],kr.offset[1],kr.texcoord[T*2],kr.texcoord[T*2+1]);kq.push(kr.index,kr.id)}var i=(ks.length/6)*4;ks.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 w(i,{components:T,members:e},w.BufferType.VERTEX)},createBufferData:function(ks){var kt=[];for(var T=0;Tkt.renderIndex){for(var kr=0;kr=9000&&kw.current_city["code"]<=9378){kw.current_city["name"]="台湾省"}if(kw.current_city["code"]>=20000&&kw.current_city["code"]<=20499){kw.current_city["name"]="新加坡"}if(kw.current_city["code"]>=20500&&kw.current_city["code"]<=25999){kw.current_city["name"]="泰国"}if(kw.current_city["code"]>=26000&&kw.current_city["code"]<=29999){kw.current_city["name"]="日本"}if(kw.current_city["code"]>=30000&&kw.current_city["code"]<=30999){kw.current_city["name"]="韩国"}if(kw.current_city["code"]>=31000&&kw.current_city["code"]<=37000){kw.current_city["name"]="亚太"}if(kw.current_city["code"]>=46609&&kw.current_city["code"]<=52505){kw.current_city["name"]="欧洲"}if(kw.current_city["code"]>=39509&&kw.current_city["code"]<=53500){kw.current_city["name"]="南美洲"}if(kw.current_city["code"]>=54000&&kw.current_city["code"]<=70000){kw.current_city["name"]="北美洲"}if(kw.current_city["code"]===54003&&kw.current_city["code"]>=60731&&kw.current_city["code"]<=61123){kw.current_city["name"]="美国"}if(kw.current_city["code"]===54015||kw.current_city["code"]>=57970&&kw.current_city["code"]<=60223){kw.current_city["name"]="加拿大"}if(kw.current_city["code"]===54025||kw.current_city["code"]>=54338&&kw.current_city["code"]<=57374){kw.current_city["name"]="墨西哥"}e.enableRequest=true;if(kw&&kw.current_city){var kv=kw.current_city["name"];var ku=kw.current_city["code"];if(ku!==i.cCode){var kt=new fS("oncitychange");kt.name=kv;kt.code=ku;i.dispatchEvent(kt)}i.cityName=kv;i.cCode=ku;if(!b2()){c7(i)}}},{qt:"cen",b:T.lng+","+T.lat+";"+kr.lng+","+kr.lat,l:ks},"","",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 jx(T){var e={};var i=new j7(e);T.addControl(i);return i}function K(i){if(i.temp.copyadded){return}i.temp.copyadded=true;if(!i.cpyCtrl){var kq=new je(2,2);i.config.cpyCtrlOffset=kq;if(b2()){kq.width=72;kq.height=0}var T=new gg({offset:kq,printable:true});i.cpyCtrl=T}if(!b2()){c7(i);i.addEventListener("maptypechange",function(){c7(i)})}i.addControl(T);var e=new bG();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.setOffset(i.config.cpyCtrlOffset)}else{e.hide();T.setOffset(new je(4,2))}});if(i.getSize().width>=300&&i.getSize().height>=100){e.show()}else{e.hide();T.setOffset(new je(4,2))}i.addEventListener("oncopyrightoffsetchange",function(kr){i.logoCtrl.setOffset(kr.target.logo);i.cpyCtrl.setOffset(kr.target.cpy)});i.dispatchEvent(new fS("oncopyrightaddend"))}function c7(kF){if(!kF.cpyCtrl){var kN=new je(2,2);if(b2()){kN.width=72;kN.height=0}var kI=new gg({offset:kN,printable:true});kF.cpyCtrl=kI}var kW=kF.cityName||"中国";var kG=kF.getMapType();var kH=["常州市","南昌市","乌鲁木齐市","无锡市","福州市","泉州市","珠海市","贵阳市"];var kz=["北京市","上海市","广州市","深圳市","宁波市","石家庄市","沈阳市","长春市","青岛市","温州市","台州市","金华市","佛山市","中山市","昆明市","南宁市","苏州市","西安市","济南市","郑州市","合肥市","呼和浩特市","杭州市","成都市","武汉市","长沙市","天津市","南京市","重庆市","大连市","东莞市","厦门市"];var kB=["香港特别行政区"];var kv=["台湾省"];var kO=["日本"];var kU=["韩国"];var kJ=["泰国"];var kM=["亚太"];var kw=["新加坡"];var kV=["欧洲"];var kq=["南美洲"];var kR=["北美洲"];var T=["美国"];var kL=["墨西哥"];var kt=["加拿大"];for(var kS in kH){if(kH[kS]===kW){var kC=true;break}}for(var kS in kz){if(kz[kS]===kW){var kr=true;break}}for(var kS in kB){if(kB[kS]===kW){var kY=true;break}}if(kv[0]===kW){var kQ=true}if(kw[0]===kW){var i=true}if(kO[0]===kW){var ky=true}if(kU[0]===kW){var kE=true}if(kJ[0]===kW){var kD=true}if(kM[0]===kW){var ku=true}if(kV[0]===kW){var kA=true}if(kq[0]===kW){var kx=true}if(kR[0]===kW){var e=true}if(T[0]===kW){var kT=true}if(kt[0]===kW){var kP=true}if(kL[0]===kW){var ks=true}var kX=["© 2023 Baidu - GS(2021)6026号 - 甲测资字11111342 - 京ICP证030173号 - Data © "];var kK="rgba(255, 255, 255, 0.701961)";if(kF.getZoom()<=9){kX=["© 2023 Baidu - GS(2021)6026号 - 甲测资字11111342 - 京ICP证030173号 - Data © "]}else{if(kQ){kX=["© 2023 Baidu - GS(2021)6026号 - 甲测资字11111342 - 京ICP证030173号 - Data © "]}else{if(ky||kE){kX=["© 2023 Baidu - GS(2021)6026号 - 甲测资字11111342 - 京ICP证030173号 - Data © "]}else{if(i||kD){kX=["© 2023 Baidu - GS(2021)6026号 - 甲测资字11111342 - 京ICP证030173号 - Data © "]}else{if(ku){kX=["© 2023 Baidu - GS(2021)6026号 - 甲测资字11111342 - 京ICP证030173号 - Data © "]}else{if(kA){kX=["© 2023 Baidu - GS(2021)6026号 - 甲测资字11111342 - 京ICP证030173号 - Data © "]}else{if(kx){kX=["© 2023 Baidu - GS(2021)6026号 - 甲测资字11111342 - 京ICP证030173号 - Data © "]}else{if(e){kX=["© 2023 Baidu - GS(2021)6026号 - 甲测资字11111342 - 京ICP证030173号 - Data © "]}}}}}}}}if(kF.getZoom()<=9){kX.push("百度智图");kX.push(' & OpenStreetMap');kX.push(' & HERE');if(kG===BMAP_SATELLITE_MAP||kG===BMAP_HYBRID_MAP){kX.push(' & ESO');kK="rgba(0,0,0,.7)"}}else{if(ky||kE){kX.push('OpenStreetMap')}else{if(i||kD){kX.push('HERE')}else{if(ku){kX.push('HERE');kX.push(' & Mapbox')}else{if(kA){kX.push('OpenStreetMap');kX.push(' & Mapbox')}else{if(kx){kX.push('OpenStreetMap');kX.push(' & Mapbox')}else{if(kT||ks||kP){kX.push('HERE');kX.push(' & Mapbox')}else{if(e){kX.push('OpenStreetMap');kX.push(' & Mapbox')}else{kX.push("百度智图");if(kC){kX.push(' & PalmCity')}if(kY){kX.push(' & MapKing')}if(kQ){kX.push(' & HERE');kX.push(' & 樂客LocalKing')}if(kG===BMAP_SATELLITE_MAP||kG===BMAP_HYBRID_MAP){kK="rgba(0,0,0,.7)"}}}}}}}}}kX.unshift('');kX.push("");kX=kX.join("");kF.cpyCtrl.addCopyright({id:1,content:kX})}function j7(e){this["defaultAnchor"]=BMAP_ANCHOR_TOP_RIGHT;this["defaultOffset"]=e.defaultOffset||new je(90,6);this._cZIndex=9999;this._visible=false}j7.prototype=new gS();j7.prototype.initialize=function(kr){this._map=kr;var kq=this;var e=b3("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 ks=b3("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;"});ks.innerText="确定";ks.addEventListener("click",function(){kq.hide()});var T=b3("div");var kt=T.style;kt.position="relative";kt.width="100%";kt.height="100%";kt.color="#000";kt.fontSize="14px";kt.wordBreak="break-all";e.appendChild(T);e.appendChild(ks);kr.getContainer().appendChild(e);return e};j7.prototype._setPosition=function(){};j7.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 B="carport_list";var d0="carport_auth";var dk="cur";var aa="cen";var J="s";var dD="con";var dv="bd";var cX="nb";var ha="bt";var aP="nav";var il="walk";var f1="gc";var d4="rgc";var L="dec";var iE="iploc";var gT="bse";var gp="nse";var dh="s";var ew="bsl";var fY="bda";var et="sa";var bb="nba";var iu="drag";var jf="ext";var jT="exts";var jW="hip";var hM="ride";var j6="drct";var b7="ldt";var fx=2;var bk=4;var f8=7;var iv=11;var ce=12;var e1=14;var cU=15;var ek=18;var aB=20;var ba=21;var I=19;var a=23;var iQ=26;var aD=28;var gq=31;var fd=35;var iF=44;var bi=45;var ay=46;var jR=47;var gv=-1;var bd=0;var bC=1;var jk=2;var dT=3;window.BMAP_POI_TYPE_NORMAL=0;var cH=1;var ix=2;BMapGL.I=e6.I;var bM={};bM.removeHtml=function(e){e=e.replace(/<\/?[^>]*>/g,"");e=e.replace(/[ | ]* /g," ");return e};bM.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;")};bM.parseGeoExtReg2=function(i,e){var T=new RegExp("(((-?\\d+)(\\.\\d+)?),((-?\\d+)(\\.\\d+)?);)(((-?\\d+)(\\.\\d+)?),((-?\\d+)(\\.\\d+)?);){"+e+"}","ig");return i.replace(T,"$1")};var dL=0;var dj=1;var U=2;bM.unique=function(T){var ks=false;var kr=[];var kt={};for(var kq=0,e=T.length;kq21){T=21}return T};bM.parseGeo=function(kt,kw){if(typeof kt!="string"||!kt){return}var ky=kt.split("|");var e;var kr;var T;if(ky.length==1){e=b8(kt)}else{e=b8(ky[2]);kr=b8(ky[0]);T=b8(ky[1]);if(!kw){return e}}var ku={type:e.geoType};if(kw){switch(ku.type){case U:var kv=new cD(e.geo[0][0],e.geo[0][1]);var kx=jn.convertMC2LL(kv);ku.point=kx;ku.points=[kx];break;case dj:ku.points=[];var kz=e.geo[0];for(var ks=0,kq=kz.length-1;ks0.25&&kA<1){kA=1}else{if(kA>32){kA=32}}}}var kv=kJ.split("|");if(kv.length==1){var kq=b8(kv[0]);return{type:kq.type,bound:"",points:kq.geo.join(",")}}else{if(kv.length>1){var kB=kJ.split(";.=");var kx=[];var kr=[];var kC=0;var kG=kB.length;for(var kD=0;kD1){if(kD==0){kI=kI+";"}if(kD>0&&kD0){kH=bM.parseGeoExtReg2(kH,kA)}kr.push(kH)}if(kG<=1){kr=kr.join(";")}if(kG==2){var T=kr[0]+";"+kr[1];var kt=T.split(";");var e=[];for(var kD=0;kDdf){e=df-e}if(ku>df){ku=df-ku}kq.push(kq[T-2]+e);kq.push(kq[T-1]+ku);return 0}function dC(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}bM.pathToPoints=function(ks){var kq=[];if(typeof ks!=="string"){return kq}else{var kr=ks.split(";");for(var T=0;TcG.MAX_PAGE_CAPACITY?cG.DEFAULT_PAGE_CAPACITY:e)}else{this._opts.pageCapacity=cG.DEFAULT_PAGE_CAPACITY}},getPageCapacity:function(){return this._opts.pageCapacity},toString:function(){return"LocalSearch"}});function bl(i){this._opts={};e6.extend(this._opts,i);this._queryList=[];var e=this;he.load("otherSearch",function(){e._asyncSearch()})}bl.inherits(de,"Geocoder");e6.extend(bl.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 c2(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;he.load("otherSearch",function(){var T=i._pendingCalls.length;for(var kq=0;kq=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=eV.MAX_PAGE_CAPACITY;return}}if(typeof e!=="number"){this._opts.pageCapacity=eV.MAX_PAGE_CAPACITY;return}if(e>=1&&e<=eV.MAX_PAGE_CAPACITY){this._opts.pageCapacity=Math.round(e)}else{this._opts.pageCapacity=eV.MAX_PAGE_CAPACITY}},toString:function(){return"TransitRoute"},_shortTitle:function(e){return e.replace(/\(.*\)/,"")}});window.BMAP_HIGHLIGHT_STEP=1;window.BMAP_HIGHLIGHT_ROUTE=2;var cL=function(e,kq){jY.call(this,e,kq);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;he.load("route",function(){T._asyncSearch()},true);if(this.init_d){this.init_d()}};cL.ROAD_TYPE=["","环岛","无属性道路","主路","高速连接路","交叉点内路段","连接道路","停车场内部道路","服务区内部道路","桥","步行街","辅路","匝道","全封闭道路","未定义交通区域","POI连接路","隧道","步行道","公交专用道","提前右转道"];e6.inherit(cL,jY,"DWRoute");e6.extend(cL.prototype,{search:function(T,e,i){this._queryList.push({method:"search",arguments:[T,e,i]})}});var iY=function(e,T){jY.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 h9("删除该点",function(ks,kr,kq){i._deleteVia(kq.curNo-1)},60));this.map.addContextMenu(this._menu,true);he.load("route",function(){i._asyncSearch()},true);if(this.init_d){this.init_d()}};e6.inherit(iY,jY,"LineLayerRoute");e6.extend(iY.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 cw(e,i){cL.call(this,e,i);i=i||{};this._opts._enableTraffic=i.enableTraffic||false;this.setPolicy(i.policy);this.QUERY_TYPE=aP;this.RETURN_TYPE=aB;this.ROUTE_TYPE=BMAP_ROUTE_TYPE_DRIVING;hI.sendMessage(aZ(4,4,1,1),["service","drive","overlay"])}function ga(e,i){iY.call(this,e,i);i=i||{};this.setPolicy(i.policy);this.QUERY_TYPE=aP;hI.sendMessage(aZ(4,4,1,2),["service","drive","layer"])}e6.inherit(ga,iY,"DrivingRouteLine");e6.inherit(cw,cL,"DrivingRoute");cw.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}};ga.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 fy(e,i){cL.call(this,e,i);this.QUERY_TYPE=il;this.RETURN_TYPE=gq;this.ROUTE_TYPE=BMAP_ROUTE_TYPE_WALKING;this._enableDragging=false;hI.sendMessage(aZ(4,4,4),["service","walk"])}e6.inherit(fy,cL,"WalkingRoute");function da(e,i){cL.call(this,e,i);this.QUERY_TYPE=hM;this.ROUTE_TYPE=BMAP_ROUTE_TYPE_RIDING;this._enableDragging=false;hI.sendMessage(aZ(4,4,3),["service","ride"])}e6.inherit(da,cL,"RidingRoute");function X(e,i){iY.call(this,e,i);i=i||{};this.QUERY_TYPE=b7;this.setPolicy(i.policy);hI.sendMessage(aZ(4,4,2),["service","truck"])}e6.inherit(X,iY,"TruckRoute");X.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 a5={web:"//api.map.baidu.com/direction?",android:"bdapp://map/direction?",ios:"baidumap://map/direction?"};function iV(e){this.opts=e||{}}e6.extend(iV.prototype,{routeCall:function(kq,e,T){var i=this;he.load("route",function(){i._asyncSearch(kq,e,T)})}});function eg(){return Pano.getStreetViewCoverageLayer(bD)}function eX(){Pano.PanoramaService.call(this)}e6.inherit(eX,Pano.PanoramaService,"PanoramaService");e6.extend(eX.prototype,{getPanoramaById:function(T,i){var e=this;this.getPanoById(T,function(kq){i&&i(e._makeData(kq))})},getPanoramaByLocation:function(e,T){e=jn.convertLL2MC(e);var i=this;this.getPanoByLocation(e,50,function(kq){T&&T(i._makeData(kq))})},_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=jn.convertMC2LL(new cD(i.pointX,i.pointY));return i}});function fo(){if(window.PANORAMA_URL){return Pano.getPanoControl(bD,{imgPath:C.imgPath,tileBaseUrl:C.panoTilePath,})}return Pano.getPanoControl(bD)}function P(T,e){if(!e){return}this.content=T;if(e.position&&!Array.isArray(e.position)){e.position=jn.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,})}e6.inherit(P,Pano.PanoOverlay,"PanoramaLabel");e6.extend(P.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 kq=this.content;var kt=document.createElement("div");var i=kt.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";kt.appendChild(e);var T=document.createElement("span");T.style.margin="0 14px";T.innerText=kq;e.appendChild(T);if(!this.hideDistance){var ks=document.createElement("span");ks.style.color="color:rgba(255,255,255,0.3)";ks.innerText="|";e.appendChild(ks);var kr=document.createElement("span");kr.style.margin="0 8px";kr.style.color="#60c7fa";kr.style.fontSize="12px";kr.innerText="0米";e.appendChild(kr);this._distanceDom=kr}this._dom=kt;this._titleDom=T;return kt},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=jn.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 d(i){if(typeof i==="string"&&/^(?!#)(\w)*/.test(i)){i="#"+i}var kq={};if(window.PANORAMA_URL){kq.imgPath=C.imgPath;kq.tileBaseUrls=[C.panoTilePath]}var e=Pano.init(i,kq);var T=e.setPosition;e.setPosition=function(ks){var kt=jn.convertLL2MC(ks);T.call(e,kt)};var kr=e.addEventListener;e.addEventListener=function(ks,kt){if(ks==="position_changed"){kr.call(e,ks,function(ku){var kv=jn.convertMC2LL(ku);kt(kv)})}else{kr.call(e,ks,kt)}};hI.sendMessage(aZ(4,3,5),["layer","pano"]);return e}bD.Map=hX;bD.MapType=es;bD.Point=cD;bD.Pixel=fr;bD.Size=je;bD.Bounds=ib;bD.PrivateRegionDataModel=cS;bD.TileLayer=hH;bD.Copyright=m;bD.Projection=bD.Project=jn;bD.XYZProjection=bD.XYZProject=dI;bD.Convertor=f3;bD.RenderTypeUtils=dc;bD.Overlay=aS;bD.Label=h4;bD.Marker=s;bD.Symbol=fp;bD.SVGSymbol=dR;bD.Icon=jH;bD.Polyline=br;bD.BezierCurve=cN;bD.PolylineMultipart=eu;bD.Polygon=iU;bD.MapMask=kc;bD.Prism=bx;bD.Marker3D=el;bD.GroundOverlay=f9;bD.GroundPoint=dW;bD.CustomOverlay=bR;bD.CustomHtmlLayer=dE;bD.ParkingSpot=iz;bD.InfoWindow=ec;bD.SimpleInfoWindow=ie;bD.Circle=aV;bD.Control=gS;bD.NavigationControl=jV;bD.IndoorManager=dd;bD.NavigationControl3D=e8;bD.CopyrightControl=gg;bD.ScaleControl=kp;bD.CityListControl=by;bD.MapTypeControl=v;bD.ZoomControl=jq;bD.LocationControl=gz;bD.LogoControl=bG;bD.DistanceTool=cl;bD.ContextMenu=hy;bD.MenuItem=h9;bD.OperationMask=ak;bD.Animation=fH;bD.ViewAnimation=q;bD.Transitions=gL;bD.Event=fS;bD.trafficLayer=jS;bD.TrafficLayer=ju;bD.GeoJSONLayer=aO;bD.XYZLayer=kd;bD.PixelLayer=dy;bD.GeoJSONParse=gH;bD.NormalLayer=cs;bD.LineLayer=bY;bD.FillLayer=ea;bD.PointShapeLayer=aX;bD.PointIconLayer=gi;bD.Entity=jo;bD.MVTLayer=eh;bD.BaiduLayer=V;bD.Geolocation=c2;bD.Geocoder=bl;bD.Boundary=ft;bD.DistrictLayer=d7;bD.LocalCity=fm;bD.LocalSearch=cG;bD.Autocomplete=jg;bD.BusLineSearch=eG;bD.WalkingRoute=fy;bD.RidingRoute=da;bD.DrivingRoute=cw;bD.DrivingRouteLine=ga;bD.TransitRoute=eV;bD.RouteSearch=iV;bD.TruckRoute=X;bD.PanoramaCoverageLayer=eg;bD.PanoramaControl=fo;bD.PanoramaService=eX;bD.PanoramaLabel=P;bD.Panorama=d;function hp(e,i){for(var T in i){e[T]=i[T]}}bD.fetchDebug&&bD.fetchDebug.init();bD.verify();bD.apiLoad();bD.frequency();bD.getSeckeyCid();window._layer=1;e6.extend(d7.prototype,{_asyncSearch:function(){for(var T=0,e=this._queryList.length;T0){var kF=kq.geo.length;for(jC=0;jC0){var kx=T.length-1;var kE=[];var kw=false;var kD=0;var kB=0;for(var kG=0;kGkB){var kI=kD;kD=kB;kB=kI}var kv=kE;var kt=kE.splice(kD+1);var kr=kt.splice(kB-kD);kv=kv.concat(kr);kC.boundaries.push(kv.join(";"));kC.boundaries.push(kt.join(";"));kw=false;continue}if(kE.length!==0){kC.boundaries.push(kE.join(";"))}}}}}}return kC},deleteDistrict:function(kq){var T=kq.disOverlays;for(var e=0;e0){for(var T=0;T