window.TILE_VERSION={"ditu":{"normal":{"version":"088","updateDate":"20230609"},"satellite":{"version":"009","updateDate":"20230609"},"normalTraffic":{"version":"081","updateDate":"20230609"},"satelliteTraffic":{"version":"083","updateDate":"20230609"},"mapJS":{"version":"104","updateDate":"20230609"},"satelliteStreet":{"version":"083","updateDate":"20230609"},"earthVector":{"version":"001","updateDate":"20230609"}},"webapp":{"high_normal":{"version":"001","updateDate":"20230609"},"lower_normal":{"version":"002","updateDate":"20230609"}},"api_for_mobile":{"vector":{"version":"002","updateDate":"20230609"},"vectorIcon":{"version":"002","updateDate":"20230609"}}};window.MSV={"mapstyle":{"version":"001","updateDate":"20230526"}};window.BMAP_AUTHENTIC_KEY=BMAP_AUTHENTIC_KEY; (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="http://158.234.196.4:5001/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="http://158.234.196.4:5001/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="//158.234.196.4:5001/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||"//158.234.196.4:5001/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="//158.234.196.4:5001/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=["//158.234.196.4:5001/apisv0_bdimg_com/","//158.234.196.4:5001/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(bx,fs){var eX=eX||{version:"20150702",emptyFn:function(){}};(function(){eX._log=[];var i=0;var T={};eX.BaseClass=function(kc){T[(this.hashCode=(kc||eX.BaseClass.guid()))]=this};eX.BaseClass.guid=function(){return"mz_"+(i++).toString(36)};eX.BaseClass.create=function(){var kc=new eX.BaseClass();kc.decontrol();return kc};var e=eX.instance=eX.I=function(kc){return T[kc]};eX.BaseClass.prototype.dispose=function(){if(this.hashCode){delete T[this.hashCode]}for(var kc in this){if(typeof this[kc]!="function"){delete this[kc]}}};eX.BaseClass.prototype.getHashCode=function(){if(!this.hashCode){T[(this.hashCode=eX.BaseClass.guid())]=this}return this.hashCode};eX.BaseClass.prototype.decontrol=function(){delete T[this.hashCode]};eX.BaseClass.prototype.toString=function(){return"[object "+(this._className||"Object")+"]"};eX.BaseClass.prototype._wlog=function(kd,ke){var kc=eX._log;if(kc.length>100){kc.reverse().length=50;kc.reverse()}kc[kc.length]="["+kd+"]["+(this._className||"Object")+" "+this.hashCode+"] "+ke}})();Function.prototype.inherits=function(kc,T){var e,kd,kf=this.prototype,ke=function(){};ke.prototype=kc.prototype;kd=this.prototype=new ke();if(typeof(T)=="string"){kd._className=T}for(e in kf){kd[e]=kf[e]}this.prototype.constructor=kf.constructor;kf=ke=null;return kd};eX.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};eX.BaseClass.prototype.on=eX.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 kc=i.hashCode||eX.BaseClass.guid();i.hashCode=kc;if(e[T][kc]){this._wlog("warning","repeat key:"+kc)}e[T][kc]=i};eX.BaseClass.prototype.off=eX.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]}};eX.BaseClass.prototype.fire=eX.BaseClass.prototype.dispatchEvent=function(kc){if(!this._listeners){this._listeners={}}var T,e=this._listeners,kd=kc.type;kc.target=kc.srcElement=kc.target||kc.srcElement||this;kc.currentTarget=this;if(typeof this[kd]=="function"){this[kd](kc)}if(typeof e[kd]=="object"){for(T in e[kd]){if(typeof e[kd][T]=="function"){e[kd][T].call(this,kc)}}}return kc.returnValue};eX.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};eX.Browser=(function(){var T=navigator.userAgent;var kd=0;var e=0;var ke=0;var i=0;var ki=0;var kg=0;var kh=0;var kf=0;var kc=0;var kj=0;if(typeof window.opera==="object"&&/Opera(\s|\/)(\d+(\.\d+)?)/.test(T)){ke=parseFloat(RegExp.$2)}else{if(/OPR(\/(\d+)(\..?)?)/.test(T)){ke=parseInt(RegExp.$2,10)}else{if(/Edge\/((\d+)\.\d+)/.test(T)){kd=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)){ki=parseFloat(RegExp.$2)}else{if(navigator.vendor==="Netscape"&&/Netscape(\s|\/)(\d+(\.\d+)?)/.test(T)){kh=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)){kf=parseInt(RegExp.$1,10)}else{if(!e&&!kd&&T.indexOf("Gecko")>-1&&T.indexOf("KHTML")===-1&&/rv\:(\d+(\.\d+)?)/.test(T)){kc=parseFloat(RegExp.$1)}else{if(!kd&&/chrome\/(\d+(\.\d+)?)/i.test(T)){kg=parseFloat(RegExp.$1)}else{if(!kd&&/AppleWebKit\/(\d+(\.\d+)?)/.test(T)){kj=parseInt(RegExp.$1,10)}}}}var kk={edge:kd,ie:e,firefox:ki,netscape:kh,opera:ke,safari:i,chrome:kg,gecko:kc,trident:kf,webkit:kj};return kk})();window.FeBrowser=eX.Browser;eX.Dom={};eX.Dom.createDom=function(i,e){if(eX.isIE&&e&&e.name){i="<"+i+' name="'+eX.String.escapeHTML(e.name)+'">'}var T=document.createElement(i);if(e){eX.Dom.setProperties(T,e)}return T};eX.Dom.getOffset=function(kc){var kf=eX.Dom.getOwnerDocument(kc);var ke=eX.isGecko>0&&kf.getBoxObjectFor&&eX.Dom.getStyle(kc,"position")=="absolute"&&(kc.style.top===""||kc.style.left==="");var kg={left:0,top:0};var i=(eX.isIE&&!eX.isStrict)?kf.body:kf.documentElement;if(kc==i){return kg}var T=null;var kd;if(kc.getBoundingClientRect){kd=kc.getBoundingClientRect();kg.left=kd.left+Math.max(kf.documentElement.scrollLeft,kf.body.scrollLeft);kg.top=kd.top+Math.max(kf.documentElement.scrollTop,kf.body.scrollTop);kg.left-=kf.documentElement.clientLeft;kg.top-=kf.documentElement.clientTop;if(eX.isIE&&!eX.isStrict){kg.left-=2;kg.top-=2}}else{if(kf.getBoxObjectFor&&!ke){kd=kf.getBoxObjectFor(kc);var e=kf.getBoxObjectFor(i);kg.left=kd.screenX-e.screenX;kg.top=kd.screenY-e.screenY}else{T=kc;do{kg.left+=T.offsetLeft;kg.top+=T.offsetTop;if(eX.isWebkit>0&&eX.Dom.getStyle(T,"position")=="fixed"){kg.left+=kf.body.scrollLeft;kg.top+=kf.body.scrollTop;break}T=T.offsetParent}while(T&&T!=kc);if(eX.isOpera>0||(eX.isWebkit>0&&eX.Dom.getStyle(kc,"position")=="absolute")){kg.top-=kf.body.offsetTop}T=kc.offsetParent;while(T&&T!=kf.body){kg.left-=T.scrollLeft;if(!eX.isOpera||T.tagName!="TR"){kg.top-=T.scrollTop}T=T.offsetParent}}}return kg};eX.Dom.getOwnerDocument=function(e){return e.nodeType==9?e:e.ownerDocument||e.document};eX.Dom.setProperties=function(i,e){eX.each(e,function(kc,T){eX.Dom._setProperty(i,T,kc)})};eX.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 eX.Dom._DIRECT_ATTRIBUTE_MAP){i.setAttribute(eX.Dom._DIRECT_ATTRIBUTE_MAP[e],T)}else{i[e]=T}}}}};eX.Dom._DIRECT_ATTRIBUTE_MAP={cellpadding:"cellPadding",cellspacing:"cellSpacing",colspan:"colSpan",rowspan:"rowSpan",valign:"vAlign",height:"height",width:"width",usemap:"useMap",frameborder:"frameBorder"};eX.G=function(){for(var T=[],kc=arguments.length-1;kc>-1;kc--){var kd=arguments[kc];T[kc]=null;if(typeof kd=="object"&&kd&&kd.dom){T[kc]=kd.dom}else{if((typeof kd=="object"&&kd&&kd.tagName)||kd==window||kd==document){T[kc]=kd}else{if(typeof kd=="string"&&(kd=document.getElementById(kd))){T[kc]=kd}}}}return T.length<2?T[0]:T};eX.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(" ")}};eX.addClassName=eX.ac;eX.each=function(ke,e){if(typeof e!="function"){return ke}if(ke){if(ke.length===undefined){for(var T in ke){e.call(ke[T],ke[T],T)}}else{for(var kc=0,kd=ke.length;kc0&&!window.opera){/MSIE (\d+(\.\d+)?)/.test(navigator.userAgent);eX.isIE=parseFloat(RegExp.$1)}})();eX.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}};eX.removeClassName=eX.rc;eX.show=function(){this.each(arguments,function(e){if(e=eX.G(e)){e.style.display=""}})};eX.trim=function(e){return e.replace(/(^[\s\t\xa0\u3000]+)|([\u3000\xa0\s\t]+$)/g,"")};eX.getElementsByClassName=function(e,i){if(e.getElementsByClassName){return e.getElementsByClassName(i)}else{return(function T(kj,kh){if(kh==null){kh=document}var kg=[],kf=kh.getElementsByTagName("*"),kc=kf.length,ki=new RegExp("(^|\\s)"+kj+"(\\s|$)"),ke,kd;for(ke=0,kd=0;ke-1};eX.insertHTML=function(kc,e,T){kc=eX.G(kc);if(kc===null){return kc}var i,kd;if(kc.insertAdjacentHTML){kc.insertAdjacentHTML(e,T)}else{i=kc.ownerDocument.createRange();e=e.toUpperCase();if(e=="AFTERBEGIN"||e=="BEFOREEND"){i.selectNodeContents(kc);i.collapse(e=="AFTERBEGIN")}else{kd=e=="BEFOREBEGIN";i[kd?"setStartBefore":"setEndAfter"](kc);i.collapse(kd)}i.insertNode(i.createContextualFragment(T))}return kc};if(typeof HTMLElement!="undefined"&&HTMLElement.prototype.__lookupGetter__&&!HTMLElement.prototype.__lookupGetter__("children")&&!window.opera){try{HTMLElement.prototype.__defineGetter__("children",function(){for(var T=[],kc=0,ke,kd=0,e=this.childNodes.length;kd-1};eX.isEmptyObject=function(T){if(Object.prototype.toString.call(T)==="[object Object]"){for(var e in T){return false}return true}else{return false}};var bQ=window.location.protocol==="http:"?"http:":"https:";var eu={fontFamily:'Arial,Helvetica,"PingFang SC","Hiragino Sans GB",STHeiti,sans-serif',mapStyleNameIdPair:{"default":0,"grayed-out":1},mapHost:bQ+"//158.234.196.4:5001/map_baidu_com",apiHost:bQ+"//158.234.196.4:5001/api_map_baidu_com",apiIMG:bQ+"//158.234.196.4:5001/api_map_baidu_com/images",staticHost:bQ+"//158.234.196.4:5001/webmap0_bdimg_com",imgPath:bQ+"//158.234.196.4:5001/webmap0_bdimg_com/image/api/",tileDomain:[bQ+"//158.234.196.4:5001/maponline0_bdimg_com",bQ+"//158.234.196.4:5001/maponline1_bdimg_com",bQ+"//158.234.196.4:5001/maponline1_bdimg_com",bQ+"//158.234.196.4:5001/maponline3_bdimg_com"],panoTilePath:"//158.234.196.4:5001/apisv1_bdimg_com/",optDomain:"http://10.120.25.45:8017",rasterTilePath:"/tile/",vectorTilePath:"/pvd/",originTilePath:[bQ+"//158.234.196.4:5001/pcor_baidu_com"],stylePath:"//158.234.196.4:5001/maponline0_bdimg_com/sty/",bosPath:bQ+"//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 bQ+this.stylePath+i},getMapStyleFiles:function(T){var kd=true;if(typeof T==="string"&&T!=="default"){kd=false}var ke=kd?"":"_"+(this.mapStyleNameIdPair[T]-1);var i=by();var kc="udt="+i.udt+"&v="+i.ver;var e=bQ+this.stylePath;return[e+"icons_2x"+ke+".js?"+kc,e+"fs"+ke+".js?"+kc,e+"indoor_fs.js?"+kc]},tvc:{ditu:{normal:{version:"088",updateDate:"20210726"},satellite:{version:"009",updateDate:"20210726"},normalTraffic:{version:"081",updateDate:"20210726"},satelliteTraffic:{version:"083",updateDate:"20210726"},mapJS:{version:"104",updateDate:"20210726"},satelliteStreet:{version:"083",updateDate:"20210726"},panoClick:{version:"1033",updateDate:"20180108"},panoUdt:{version:"20180108",updateDate:"20180108"},panoSwfAPI:{version:"20150123",updateDate:"20150123"},panoSwfPlace:{version:"20141112",updateDate:"20141112"},earthVector:{version:"001",updateDate:"20210726"}}},msv:{mapstyle:{updateDate:"20221108",version:"001"}}};eu.imgResources={blankGIF:eu.staticHost+"/res/litemapapi/v1d1/images/blank.gif?20170501",markerPng:eu.staticHost+"/res/litemapapi/v1d1/images/marker.png?20170501",locPng:eu.staticHost+"/res/litemapapi/v1d1/images/loc.png?20180918",locNewPng:eu.staticHost+"/res/litemapapi/v1d1/images/loc_new.png?20190314",zoomPng:eu.staticHost+"/res/litemapapi/v1d1/images/zoombtn.png?20180918",mapLogoPng:eu.staticHost+"/res/litemapapi/v1d1/images/logo-2x.png?20190226"};var B=eu;var jf="ruler.cur";if(eX.Browser.ie||eX.Browser.edge){eX.extend(B,{distCursor:"url("+B.imgPath+jf+"),crosshair",defaultCursor:"url("+B.imgPath+"openhand.cur),default",draggingCursor:"url("+B.imgPath+"closedhand.cur),move"})}else{if(eX.Browser.firefox){eX.extend(B,{distCursor:"url("+B.imgPath+jf+"),crosshair",defaultCursor:"-moz-grab",draggingCursor:"-moz-grabbing"})}else{if(eX.Browser.chrome||eX.Browser.safari){eX.extend(B,{distCursor:"url("+B.imgPath+jf+") 2 6,crosshair",defaultCursor:"url("+B.imgPath+"openhand.cur) 8 8,default",draggingCursor:"url("+B.imgPath+"closedhand.cur) 8 8,move"});if(eX.Platform.macintosh){B.defaultCursor="-webkit-grab";B.draggingCursor="-webkit-grabbing"}}else{eX.extend(B,{distCursor:"url("+B.imgPath+jf+"),crosshair",defaultCursor:"url("+B.imgPath+"openhand.cur),default",draggingCursor:"url("+B.imgPath+"closedhand.cur),move"})}}}bx=bx||{};bx.version="gl";bx._register=[];bx.register=function(e){this._register[this._register.length]=e};bx.guid=1;bx.getGUID=function(e){return(e||"")+bx.guid++};var eN=window.BMAP_AUTHENTIC_KEY||"";function R(e,i,kc){var T=new Date();T.setTime(T.getTime()+kc*24*60*60*1000);document.cookie=e+"="+escape(i)+";expires="+T.toGMTString()}function a3(e,i){if(navigator.cookieEnabled){return R(e,i,30)}if(localStorage){return localStorage.setItem(e,i)}if(sessionStorage){return sessionStorage.setItem(e,i)}}bx.getSeckeyCid=function(){var i=+new Date();var e=bQ+"//158.234.196.4:5001/dlswbr_baidu_com/heicha/mw/abclite-2063-s.js?_t="+i;gM.load(e,iM)};function iM(){if(window.___abvk){a3("SECKEY_ABVK",window.___abvk)}}window.__abbaidu_2063_cb=function(i){var e=JSON.parse(i);a3("BMAP_SECKEY",e.data)};bx.bmapVerifyCbk=function(kd){if(kd&&kd.error!==0){bx=null;BMapGL=null;var ke="百度未授权使用地图API,可能是因为您提供的密钥不是有效的百度地图开放平台密钥,或此密钥未对本应用的百度地图JavaScriptAPI授权。您可以访问如下网址了解如何获取有效的密钥:https://lbs.baidu.com/apiconsole/key#。";switch(kd.error){case 101:ke="您所使用的密钥ak有问题,不支持jsapi服务,可以访问该网址了解如何获取有效密钥:http://lbsyun.baidu.com/apiconsole/key#。";break;case 102:ke="MCODE参数不存在,mobile类型MCODE参数必需,详情查看:http://lbsyun.baidu.com/apiconsole/key#。";break;case 200:ke="APP不存在,AK有误请检查再重试,详情查看:http://lbsyun.baidu.com/apiconsole/key#。";break;case 201:ke="APP被您禁用啦,可以访问 http://lbsyun.baidu.com/apiconsole/key# 查看自己的应用具体详情,或联系我们了解详情。";break;case 202:ke="APP被管理员删除啦,可以访问 http://lbsyun.baidu.com/apiconsole/key# 查看自己的应用具体详情,或联系我们了解详情。";break;case 203:ke="APP类型错误,可以访问 http://lbsyun.baidu.com/apiconsole/key# 查看自己的应用具体详情,或联系我们了解详情。";break;case 210:ke="APP IP校验失败,可以访问 http://lbsyun.baidu.com/apiconsole/key# 查看自己的应用具体详情,或联系我们了解详情。";break;case 220:ke="APP Referer校验失败。请检查该ak设置的白名单与访问所有的域名是否一致。详情查看:http://lbsyun.baidu.com/apiconsole/key#";break;case 230:ke="APP Mcode码校验失败,可以访问 http://lbsyun.baidu.com/apiconsole/key# 查看自己的应用具体详情,或联系我们了解详情。";break;case 240:ke="APP服务被禁用了,可以访问 http://lbsyun.baidu.com/apiconsole/key# 查看自己的应用具体详情,或联系我们了解详情。";break;case 250:ke="该用户不存在... 请登录 https://lbs.baidu.com 的控制台,注册成为开发者申请ak吧。";break;case 251:ke="该用户被自己删除啦,可以访问 http://lbsyun.baidu.com/apiconsole/key# 查看自己的应用具体详情。";break;case 252:ke="该用户被管理员删除啦,可以访问 http://lbsyun.baidu.com/apiconsole/key# 了解如何获取有效密钥,或请联系我们了解详情。";break;case 260:ke="您所使用的密钥AK不包含该服务呢,可以访问 http://lbsyun.baidu.com/apiconsole/key# 查看服务选择情况,或请联系我们了解详情。";break;case 261:ke="您所使用的密钥AK的该服务被禁用啦,可以访问 http://lbsyun.baidu.com/apiconsole/key# 查看服务选择情况,或请联系我们了解详情。";break;case 401:ke="您所使用的AK并发超限了,请登录 http://lbsyun.baidu.com/cashier/quota#/home 了解详情。";break;case 302:ke="您所使用的AK天配额超限了,请登录 http://lbsyun.baidu.com/cashier/quota#/home 了解详情。";break}alert(ke);var T=document.getElementsByClassName("bmap-container");if(T){for(var kc=0;kci){this._removeOld()}if(!e[T]){e.push(kc)}e[T]=kc;kc._key_=T};h6.prototype.getHitRate=function(){return Math.round(this._totalHitTimes/this._totalGetTimes*1000)/1000};h6.prototype.getData=function(i){var e=this._cache[i];if(e){this._totalHitTimes++}this._totalGetTimes++;return e};h6.prototype.removeData=function(kd){if(this._options.clearCallback){this._options.clearCallback(this._cache[kd])}var T=this._cache;var ke=T[kd];for(var kc=0,e=T.length;kc=0;kd--){var kc=this._cache[kd]._key_;if(!ke[kc]){T.splice(kd,1);if(this._options.clearCallback){this._options.clearCallback(T[kc])}delete T[kc]}}};h6.prototype.getDataCount=function(){return this._cache.length};function iR(){}eX.extend(iR.prototype,{centerAndZoomIn:function(kh,T,ki){var kf=this;if(!kh&&!T){return}kh=kh||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 kg(){kf._earth=new bx.Earth(kf,{showRealSunlight:kf.config.showRealSunlight,showMilkyway:kf.config.showMilkyway,earthBackground:kf.config.earthBackground});kf._proxyEarthEvents();kf._changeEarthMapType(BMAP_EARTH_MAP);eX.extend(kf,bx.EarthView.prototype);if(!kf._navigationCtrl&&kf.config.showControls){kf._navigationCtrl=new bx.NavigationControl3D(kf)}delete kf.temp.originMapType}g2.load("earth",function(){if(bx["FeatureStyle"+kf.config.style]){kg()}else{kf.loadMapStyleFiles(function(){kg()})}})}}this.lastLevel=this.zoomLevel||T;this.zoomLevel=T;var kd=new fJ("onload");kd.point=kh;kd.zoom=T;this.centerPoint=this.restrictCenter(new cx(kh.lng,kh.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 ke=new m(i,"baidu",this.mapType);var kc=new hv({mapType:this.mapType,copyright:ke,customLayer:false,baseLayer:true,tileTypeName:"web"});kc._isInnerLayer=true;this.addTileLayer(kc);if(this.mapType===BMAP_SATELLITE_MAP&&this._isHybridShow===true){this._addHybirdMap()}}this.dispatchEvent(kd);this.loaded=true;ki=ki||{};ki.callback&&ki.callback()},_setPlatformPosition:function(ki,kh,kl){kl=kl||{};if(ki===0&&kh===0&&!kl.point){return}if(isNaN(kl.initMapOffsetX)){kl.initMapOffsetX=this.offsetX}if(isNaN(kl.initMapOffsetY)){kl.initMapOffsetY=this.offsetY}var kj=ki+kl.initMapOffsetX;var kg=kh+kl.initMapOffsetY;if(kl.point){var i=this.restrictCenter(kl.point);if(!i.equals(this.centerPoint)){this.centerPoint=i.clone();this.fire(new fJ("oncenter_changed"))}}else{var kc=this.offsetX-kj;var e=this.offsetY-kg;var T=this.getZoomUnits();var kf=this.centerPoint.lng;var ke=this.centerPoint.lat;var kd=new cx(kf,ke);this.centerPoint=this.restrictCenter(new cx(kd.lng+kc*T,kd.lat-e*T),T);this.fire(new fJ("oncenter_changed"));if(this.zoomLevel<10){kj=this.offsetX-(this.centerPoint.lng-kd.lng)/T;kg=this.offsetY+(this.centerPoint.lat-kd.lat)/T}}this.offsetX=kj;this.offsetY=kg;var kk=this.platform.style;kk.left=kj+"px";kk.top=kg+"px";this.maskLayer.style.left=-kj+"px";this.maskLayer.style.top=-kg+"px";if(kl.dispatchEvent!==false){this.dispatchEvent(new fJ("onmoving"))}},zoomTo:function(e,kf,kj){kj=kj||{};kj.zoomCenter=kf;if(kj.noAnimation!==true){this.deepZoomTo(e,kj);return}if(typeof e!=="number"){return}var kd=ej[this.mapType];if(!kd){return}var T=e;e=this._getProperZoom(e).zoom;if(e===this.zoomLevel){var kg=new fJ("onzoomexceeded");kg.targetZoom=T;this.dispatchEvent(kg);kj.callback&&kj.callback();return}this.lastLevel=this.zoomLevel;if(kf){this.temp._cPoint=kf;this.temp._cPixel=this.pointToPixelIn(kf)}else{if(this.getInfoWindow()){var ki=this.getInfoWindow().getPoint();this.temp._cPixel=this.pointToPixelIn(ki);this.temp._cPoint=ki}}if(this.config.zoomCenter){kf=this.config.zoomCenter;this.temp._cPoint=kf;this.temp._cPixel=this.pointToPixelIn(kf)}if(kf||this.temp.infoWin&&this.temp.infoWin.isOpen()){var i=this.temp._cPoint;var kh=this.temp._cPixel;var kc=this.getZoomUnits(e);var ke=new cx(i.lng+kc*(this.width/2-kh.x),i.lat-kc*(this.height/2-kh.y));this.centerPoint=this.restrictCenter(ke,kc,e);if(this.centerPoint.zoom){e=this.centerPoint.zoom}}if(kj.fireEvent!==false){this.dispatchEvent(new fJ("onzoomstart"))}if(e!==this.zoomLevel){this.zoomLevel=e;this.dispatchEvent(new fJ("onzooming"));this.dispatchEvent(new fJ("onzoomstartcode"))}if(kj.fireEvent!==false){this.dispatchEvent(new fJ("onzoomend"))}if(kj.callback){kj.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(kg,kc){kc=kc||{};var ke=kg-this.zoomLevel;var kd=this._getProperZoom(kg);if(kd.exceeded){var e=new fJ("onzoomexceeded");e.targetZoom=kg;this.dispatchEvent(e);return}var i;if(kc.zoomCenter){i=this.pointToPixelIn(kc.zoomCenter)}else{if(this.getInfoWindow()){i=this.pointToPixelIn(this.getInfoWindow().getPoint(),{zoom:this.lastLevel})}else{var i=new fi(this.width/2,this.height/2)}}this.lastLevel=this.zoomLevel;var kf=this.deepZoom||new aE(this);var T=ke>0?1:-1;kf.zoomMap(i,ke,T,null,kc)},flyToIn:function(kh,e){if(e===this.zoomLevel){this.panToIn(kh);return}var ke=this._getProperZoom(e);if(ke.exceeded){var ki=new fJ("onzoomexceeded");ki.targetZoom=e;this.dispatchEvent(ki);return}var kg=e-this.zoomLevel;var T=new fi(this.width/2,this.height/2);var i=this.pointToPixelIn(kh);var kf=new i0(i.x-T.x,i.y-T.y);this.lastLevel=this.zoomLevel;if(Math.abs(kg)>=4||Math.abs(kf.width)>this.width||Math.abs(kf.height)>this.height){this.centerAndZoomIn(kh,e);return}var kd=this.deepZoom||new aE(this);var kc=kg>0?1:-1;kd.zoomMap(i,kg,kc,kf)},panToIn:function(i,T){T=T||{};if(!i||i.equals(this.centerPoint)){T.callback&&T.callback();return}var kc=this.pointToPixelIn(i);var e=Math.round(this.width/2);var kd=Math.round(this.height/2);if(Math.abs(e-kc.x)>this.width||Math.abs(kd-kc.y)>this.height||T.noAnimation===true){this._panToIn(e-kc.x,kd-kc.y,i);T.callback&&T.callback()}else{this._panBy(e-kc.x,kd-kc.y,T)}},_panToIn:function(i,e,kc){var T=this.temp;if(T.operating===true){return}if(T.dragAni){T.dragAni.stop();T.dragAni=null;this.dispatchEvent(new fJ("onmoveend"))}this.dispatchEvent(new fJ("onmovestart"));this._setPlatformPosition(i,e,{point:kc});this.dispatchEvent(new fJ("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,kd){if(this.temp.operating===true){return}kd=kd||{};this.dispatchEvent(new fJ("onmovestart"));var kc=this;var T=kc.temp;T.pl=kc.offsetX;T.pt=kc.offsetY;if(T.tlPan){T.tlPan.cancel()}if(T.dragAni){T.dragAni.stop();T.dragAni=null;this.dispatchEvent(new fJ("onmoveend"))}T.tlPan=new fy({fps:kd.fps||kc.config.fps,duration:kd.duration||kc.config.actionDuration,transition:kd.transition||gA.easeInOutQuad,render:function(ke){this.terminative=kc.temp.operating;if(kc.temp.operating){return}kc._setPlatformPosition(Math.ceil(i*ke),Math.ceil(e*ke),{initMapOffsetX:T.pl,initMapOffsetY:T.pt})},finish:function(ke){kc.dispatchEvent(new fJ("onmoveend"));kc.temp.tlPan=false;if(kc.temp.stopArrow===true){kc.temp.stopArrow=false;if(kc.temp.arrow!==0){kc._arrow()}}kd.callback&&kd.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(kk,i,e){this.isRestrict=false;i=i||this.getZoomUnits();e=e||this.zoomLevel;var ki=this.pixelToPointIn(new fi(this.width,0),{center:kk,zoom:e});var kg=this.pixelToPointIn(new fi(0,this.height),{center:kk,zoom:e});var kl=kk.lng;var kq=kk.lat;if(this.config.restrictBounds!==null&&!this.config.restrictBounds.isEmpty()){var kp=this.config.restrictBounds;var kc=kp.getSouthWest();var kn=kp.getNorthEast();var kj=i9.convertLL2MC(kc);var ke=i9.convertLL2MC(kn);kk.lng=this.calcNewLngByBounds(kl,kg,ki,kj.lng,ke.lng,i);kk.lat=this.calcNewLatByBounds(kq,kg,ki,kj.lat,ke.lat,i);return kk}var kh=this.pixelToPointIn(new fi(0,0),{center:kk,zoom:e});var kd=this.pixelToPointIn(new fi(0,this.height),{center:kk,zoom:e});if(this.zoomLevel<5){if(kh.lat>hK.MAX_LAT&&kd.lathK.MAX_LAT){this.isRestrict=true;kk.lat=hK.MAX_LAT-this.height/2*i}else{if(kd.lat=hK.HIGH_RES_MIN_RATIO?2:1,enableEarth:c6.ifEnableEarth(),defaultMaxBounds:new hY(new cx(-21364736,-10616832),new cx(23855104,15859712)),showControls:false,showRealSunlight:true,showMilkyway:true,earthBackground:null,showStreetLayer:true,showVectorStreetLayer:false,showVectorLine:false,minZoom:null,maxZoom:null,style:"default",backgroundColor:null,enableIconClick:false,autoSafeArea:false,ak:null,webgl2:false,restrictCenter:true,restrictBounds:null,smaa:true,preserveDrawingBuffer:false,privateOn:false,privateRegions:null,popRightClick: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(ej[this.mapType][this._renderType]){T=ej[this.mapType][this._renderType].minZoom}else{T=ej[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){kc=true;T=e}if(this._renderType!=="webgl"){T=Math.round(T)}return{zoom:T,exceeded:kc}},getContainer:function(){return this.container},getZoomUnits:function(T){if(this.mapType===BMAP_EARTH_MAP){return Math.pow(2,18-this._earth.getImageZoom())}var e=ej[this.mapType];if(typeof e!=="object"){return null}var i=T||this.zoomLevel;return Math.pow(2,(e.zoomLevelBase-i))},pointToPixelIn:function(kn,kp){if(!kn){return}kp=kp||{};if(this.mapType===BMAP_EARTH_MAP){var ke;if(!kn._llPt){ke=i9.convertMC2LL(kn);kn._llPt=ke}ke=kn._llPt;var kj=null;var kd=null;if(typeof kp.zoom==="number"){var km=this._earth;var ko=km._getEarthZoomByImgZoom(kp.zoom);if(ko<=3){kj=km._generateTmpPMatrix(ko)}kd=km._generateTmpMVMatrix(km.getCenter(),ko)}var kf=this._earth.fromLatLngToPixel(ke,{useRound:false,isCalcOnBack:true,matrixInfo:{modelViewMatrix:kd,projectionMatrix:kj}});return kf}if((this._heading%360===0&&this._tilt===0)||!this._webglMapCamera){var kl=this.getZoomUnits(kp.zoom);var kh=kp.center||this.centerPoint;var kc=this.width/2;var kg=this.height/2;var kk;if(kn.lng*kh.lng<0){var i=Math.abs(kn.lng-kh.lng);var e=(e0._mc180X*2-i)/kl;if(kh.lng<0){kk=kc-e}else{kk=kc+e}}else{kk=(kn.lng-kh.lng)/kl+kc}var ki=(kh.lat-kn.lat)/kl+kg;if(kp.useRound!==false){kk=Math.round(kk);ki=Math.round(ki)}return new fi(kk,ki)}var T=this._webglMapCamera.fromMCToScreenPixel(kn.lng,kn.lat,kp);if(kp.useRound===false){return T}T.x=Math.round(T.x);T.y=Math.round(T.y);return T},pixelToPointIn:function(e,kj){if(!e){return}kj=kj||{};if(this.mapType===BMAP_EARTH_MAP){if(typeof kj.zoom==="number"){var kh=this._earth;var ke=null;var T=null;var ki=kh._getEarthZoomByImgZoom(kj.zoom);if(ki<=3){ke=kh._generateTmpPMatrix(ki)}T=kh._generateTmpMVMatrix(kh.getCenter(),ki)}var i=this._earth.fromPixelToLatLng(e,{matrixInfo:{modelViewMatrix:T,projectionMatrix:ke}});if(i===null){return null}return i9.convertLL2MC(i)}if((this._heading%360!==0||this._tilt>0)&&this._webglMapCamera){return this._webglMapCamera.fromScreenPixelToMC(e.x,e.y,kj)}var kf=kj.center||this.centerPoint;var kg=this.getZoomUnits(kj.zoom);var kd=kf.lng+kg*(e.x-this.width/2);var kc=kf.lat-kg*(e.y-this.height/2);return new cx(kd,kc)},pointToOverlayPixelIn:function(e,kc){kc=kc||{};var T=this.pointToPixelIn(e,{zoom:kc.zoom,center:kc.center,forLabel:true,frustumTest:true,useRound:kc.useRound});if(!T){return}if(kc.fixPosition&&this.mapType!=="B_EARTH_MAP"){var kd=this.getSize();var i=this.worldSize(kc.zoom);if(T.x>kd.width){while(T.x>kd.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 i9()},lnglatToMercator:function(e,kc){var i=new cx(e,kc);var T=i9.convertLL2MC(i);return[T.lng,T.lat]},mercatorToLnglat:function(i,e){if(isNaN(i)||isNaN(e)){return[]}i=parseFloat(i);e=parseFloat(e);var kc=new cx(i,e);var T=i9.convertMC2LL(kc);return[T.lng,T.lat]},getBoundsIn:function(){if(!this._bounds){return}var kp=arguments[0];if(this.mapType===BMAP_EARTH_MAP&&this._earth){var kj=this._earth.getCustomBounds();if(!kj){return this.config.defaultMaxBounds}var ki=kj.getSouthWest();var e=kj.getNorthEast();if(ki.lng>e.lng){e.lng=180}var kG=i9.convertLL2MC(ki);var kw=i9.convertLL2MC(e);var km=this.config.defaultMaxBounds;var kv=Math.max(kG.lng,km.sw.lng);var ku=Math.max(kG.lat,km.sw.lat);var ko=Math.min(kw.lng,km.ne.lng);var kn=Math.min(kw.lat,km.ne.lat);var kr=new hY(new cx(kv,ku),new cx(ko,kn));kr.pointBottomLeft=new cx(kv,ku);kr.pointBottomRight=new cx(ko,ku);kr.pointTopLeft=new cx(kv,kn);kr.pointTopRight=new cx(ko,kn);kr.setMinMax();kr.makeNormalizedPoint(this._earth.getHeading());return kr}kp=kp||{};var kd=kp.margins||[0,0,0,0];var kB=this.pixelToPointIn({x:kd[3],y:this.height-kd[2]},kp);var kF=this.pixelToPointIn({x:this.width-kd[1],y:kd[0]},kp);var kt=typeof kp.heading==="number"?kp.heading:(this._heading%360);var T=typeof kp.tilt==="number"?kp.tilt:this._tilt;var kl=this._webglMapCamera;if((kt===0&&T===0)||!kl){this._bounds.setSouthWest(kB);this._bounds.setNorthEast(kF);this._bounds.pointBottomLeft=kB;this._bounds.pointBottomRight=new cx(kF.lng,kB.lat);this._bounds.pointTopRight=kF;this._bounds.pointTopLeft=new cx(kB.lng,kF.lat);this._bounds.setMinMax();this._bounds.makeNormalizedPoint(kt);return this._bounds}var ks=this.pixelToPointIn({x:kd[3],y:kd[0]},kp);var kc=kl.getPosition();var kH=Math.sqrt(Math.pow(ks.lng-kc[0],2)+Math.pow(ks.lat-kc[1],2));var kC=this.getZoomUnits();var kJ=kH/kC;var kz=kl._frustumSideLen;var kh=kl._fovy;if(kJ>kz||(90-T)kf){kf=ky[kD].lng}if(ky[kD].latkk){kk=ky[kD].lat}}this._bounds.setSouthWest(new cx(kE,kK));this._bounds.setNorthEast(new cx(kf,kk));this._bounds.pointTopLeft=ks;this._bounds.pointTopRight=kF;this._bounds.pointBottomRight=kq;this._bounds.pointBottomLeft=kB;this._bounds.makeNormalizedPoint(kt);this._bounds.setMinMax();return this._bounds},isLoaded:function(){return !!this.loaded},_getBestLevel:function(i,kl){var ke=0;if(this._renderType==="webgl"&&!bW()){ke=100}var kf=kl.margins||[10,10,10,10];var kc=kl.zoomFactor||0;var kg=kf[1]+kf[3];var kd=kf[0]+kf[2];var e=this.getMinZoom();var kk=this.getMaxZoom();var kj=i.toSpan();var ki=kj.width/(this.width-kg-ke);var kh=kj.height/(this.height-kd-ke);var T=18-p(Math.max(ki,kh));if(Tkk){T=kk}T+=kc;if(this._renderType!=="webgl"){T=Math.floor(T)}return T},getViewportIn:function(kl,kd){if(this.mapType===BMAP_EARTH_MAP){kl=kl||[];var kf=[];for(var km=0;km=0;kk--){kg.extend(ke[kk])}if(kg.isEmpty()){return kh}}var kq=kg.getCenter();var e=this._getBestLevel(kg,kd);if(kd.margins){var T=kd.margins;var kp=(T[1]-T[3])/2;var ki=(T[0]-T[2])/2;var ko=this.getZoomUnits(e);kq.lng=kq.lng+ko*kp;kq.lat=kq.lat+ko*ki}return{center:kq,zoom:e}},setViewportIn:function(kc,kd){if(this.mapType===BMAP_EARTH_MAP){var kh;if(kc&&kc.center){var T=i9.convertMC2LL(kc.center);var kf=this._earth._getEarthZoomByImgZoom(kc.zoom,T);kh={center:T,zoom:kf}}else{kh=[];for(var ke=0;kehK.MAX_DRAG_TILT_L2){i.setTilt(hK.MAX_DRAG_TILT_L2,{callback:function(){i._changeEarthMapType(e)}})}else{i._changeEarthMapType(e)}},_changeEarthMapType:function(T){var kc=this;var kf=kc.tileMgr.tileLayers;if(this._mapTypeChangAni){this._mapTypeChangAni.stop()}var ke;if(this._earth){ke=this._earth.getEarthCanvas()}if(!this._earth){this.maskLayer.style.opacity=1;this.maskLayer.style.zIndex=999;this.maskLayer.style.background="#000"}this._mapTypeChangAni=new fy({duration:400,render:function(e){if(!kc._earth){return}ke.style.opacity=e},finish:function(){for(var e=kf.length-1,kg=e;kg>=0;kg--){var ki=kf[kg].tilesDiv;if(ki){ki.style.visibility="hidden"}if(kf[kg]._isInnerLayer&&kc._renderType!=="webgl"){kc.removeTileLayer(kf[kg])}}kc._mapTypeChangAni=null;kc._mapTypeChanging=false;function kh(){var km=kc.getZoom()-2;var kn=kc.getCenterIn();var kk=i9.convertMC2LL(kn);kc._earth=new bx.Earth(kc,{center:kk,zoom:km,showRealSunlight:kc.config.showRealSunlight,showMilkyway:kc.config.showMilkyway,earthBackground:kc.config.earthBackground});kc._proxyEarthEvents();var kj=kc.mapType;kc.mapType=T;var kl=new fJ("onmaptypechange");kl.zoomLevel=this.zoomLevel;kl.mapType=T;kl.exMapType=kj;kc.dispatchEvent(kl);kc._setMapTypeStatus(T);eX.extend(kc,bx.EarthView.prototype);if(!kc._navigationCtrl&&kc.config.showControls){kc._navigationCtrl=new eZ(kc)}}if(!kc._earth){if(bx["FeatureStyle"+kc.config.style]){kh()}else{kc.loadMapStyleFiles(function(){kh()})}}if(parseInt(kc.maskLayer.style.opacity,10)===1){setTimeout(function(){kc.maskLayer.style.zIndex=9;kc.maskLayer.style.opacity=0},1000)}}});if(!this._earth){return}var i=this.mapType;this.mapType=T;var kd=new fJ("onmaptypechange");kd.zoomLevel=this.zoomLevel;kd.mapType=T;kd.exMapType=i;this.dispatchEvent(kd);kc._setMapTypeStatus(T);eX.extend(kc,bx.EarthView.prototype)},getMapStyleId:function(){if(typeof this.config.style==="string"){return this.config.style}return this.config.mapStyleId||"custom"},_setMapTypeStatus:function(T){var kg=arguments[1];if(T===BMAP_EARTH_MAP){var ke=this._earth.getEarthCanvas();if(ke){ke.style.display=""}var kh={noAnimation:true};this._earth.setCenter(i9.convertMC2LL(this.centerPoint),kh);this._earth.setImageZoom(this.zoomLevel,kh);this._earth.setTilt(this.getTilt(),kh);this._earth.setHeading(this.getHeading(),kh)}else{if(this.preMapType===BMAP_EARTH_MAP&&this._earth){var kf=this._earth;var kc=kf.getMapZoom();var kd=kf._imageRawZoom||kc;var i=kd-kc;var e=kf.getCenter();if(this._renderType==="webgl"){this._tilt=kf.getTilt();if(this.zoomLevel>7){this._heading=kf.getHeading();kg&&kg(e,kc);return}if(kf.getHeading()!==0){kf.setTilt(this.getTilt());kf.setHeading(this.getHeading(),{callback:function(){kg&&kg(e,kc)}})}else{kg&&kg(e,kc)}return}if(i<0.1&&kf.getTilt()===0&&kf.getHeading()===0){kg&&kg(e,kc);return}kf.setTilt(0);kf.setHeading(0);kf.setZoom(kf.getZoom()-i,{callback:function(){kg&&kg(e,kc)}})}}},_proxyEarthEvents:function(){var kd=this;var ke=this._earth;ke.on("tilesload",function(i){kd.fire(i)});ke.on("centerandzoom",function(i){kd.dispatchEvent(new fJ("onmoveend"));kd.dispatchEvent(new fJ("onzoomend"))});function kc(i){kd.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},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(kc){kc=kc||this._initDate;var T=fv(kc);var e=i9.convertLL2MC(new cx(T[0],T[1]));var kk=e.latLng;var kf=bx.Projection.convertMC2LL(this.centerPoint);var kh=kc.getUTCHours();var kj=kh+24*kf.lng/360;var ki=kj-12;var kg=ki*60*0.25;var ke=Math.asin(Math.sin(iB(kf.lat))*Math.sin(iB(kk.lat))+Math.cos(iB(kf.lat))*Math.cos(iB(kk.lat))*Math.cos(iB(kg)));var kd=Math.asin(Math.sin(iB(kg))*Math.cos(iB(kk.lat))/Math.cos(ke));var i="north";if(kf.lat=19){return hK.MAX_DRAG_TILT}else{if(e<=18){if(e=this._enableTiltZoom-2){return(1-(this._enableTiltZoom-e)/2)*hK.MAX_DRAG_TILT_L2}return 0}return hK.MAX_DRAG_TILT_L2}else{return(hK.MAX_DRAG_TILT-hK.MAX_DRAG_TILT_L2)*(e-18)+hK.MAX_DRAG_TILT_L2}}},worldSize:function(i){var e=i||this.zoomLevel;return hK.WORLD_SIZE_MC/this.getZoomUnits(e)},setTrafficOn:function(e){if(e&&Number(e)>1){jE.setZIndex(Number(e))}this.addTileLayer(jE)},setTrafficOff:function(){this.removeTileLayer(jE)},showOverlayContainer:function(){this.setDisplayOptions({overlay:true})},hideOverlayContainer:function(){this.setDisplayOptions({overlay:false})},addLabelsToMapTile:function(kf,ke){for(var kc=0;kc"-1"){gM.load(kf)}else{bx["customStyleInfo_"+kn].xhr=h5.post(kf,kk,window["styleCbk_"+kn])}})}else{if(kf.indexOf("jsonp")>"-1"){gM.load(kf)}else{bx["customStyleInfo_"+kn].xhr=h5.post(kf,kk,window["styleCbk_"+kn])}}})}},getFeatureStyleTags:function(){var e=[];var kd=Object.keys(bx);for(var kc=0;kc-1&&bx[T]){e.push(T)}}return e},setCopyrightOffset:function(kc,i){var T=new fJ("oncopyrightoffsetchange",{logo:kc,cpy:i});this.dispatchEvent(T)},_setTextRenderType:function(e){if(e){this.config.textRenderType=e;return}if(this.config.textRenderType!==null){return}if(bW()){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 fJ("ondestroy"));var e=this.config.mapStyleId||0;delete bx["customStyleInfo_"+e];bx.BMAP_INSTANCES&&(bx.BMAP_INSTANCES-=1);if(!bx.BMAP_INSTANCES){this.destroyStyle()}this.config={};this.clearSpots();this._webGLStateId&&dS.WebGLState.remove(this._webGLStateId);this.container.onselectstart=null;this.container.style.backgroundImage="";this.maskLayer=null;this.platform=null;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 kd=Object.keys(bx);for(var kc=0;kc-1||T.indexOf("iconSetInfo")>-1||T.indexOf("indoorStyle")>-1){e.push(T)}}for(var kc=0;kc2){kn.push(ke.join("|"))}}return kn.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={};eX.extend(i,e.stylers);delete i.curZoomRegionId;delete i.curZoomRegion;delete i.level;if(eX.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 kc=e.stylers["level"];var T={};eX.extend(T,i);if(kc===undefined){return T}else{T[parseInt(kc,10)]=true;return T}},onStyleDataBack:function(kd,e,i,kc,kf,T){if(kd.status!==0){return}if(kd.data.style.length===3){if(!T.baseFs){T.baseFs=kd.data.style}bx.StyleBody=kd.data.style[2]}else{bx.StyleBody=kd.data.style}var ke=T.baseFs;bx["FeatureStyle"+i]=ke;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 aW={map:null,labelCache:{},calcDrawMc:function(T,i,e){var kc=[];switch(i){case"fill":kc=this.calcFill(T,e);break;case"line":break;case"building3d":kc=this.calcBuilding3d(T,e);break}return kc},calcFill:function(kd,T){var ke=[];for(var kc=0;kc0){kg=kd.verticesLength[T-1]}end=kd.verticesLength[T];var ke=[];var kc="";if(kd.vertex){ke=kd.vertex;kc="building3d"}else{if(kd.data[0]){ke=kd.data[0];kc=kd.type}else{continue}}var kf=this.calcDrawMc(ke.slice(kg,end),kc,e);this.map.addAreaSpot(kf,{userData:{styleId:kd.styleIds[T],type:"mapstyle"}})}},addLabelIntoAreaSpots:function(e){if(u.environment!=="customEditor"){return}for(var kd=0;kdkf){return kf}while(kgT){kg=kd}else{kf=kd}kd=(kf-kg)*0.5+kg}return kd};cl.prototype.solve=function(e,i){return this.sampleCurveY(this.solveCurveX(e,i))};var gA={};function fy(T){var e={duration:1000,fps:30,delay:0,transition:gA.linear,dropLastAnimation:false};if(T){for(var kc in T){e[kc]=T[kc]}}if(T.beginTime){this._beginTime=T.beginTime}this._callbacks=[];this._options=e;if(e.delay){var kd=this;setTimeout(function(){kd._doStart()},e.delay)}else{this._doStart()}this._pauseTime=0}fy.INFINITE="INFINITE";fy.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===fy.INFINITE){this._endTime=null}else{this._endTime=this._beginTime+this._options.duration}this._loop()}};fy.prototype._loop=function(kc){var kf=this;kc=kc||new Date().getTime();kc=kc-this._pauseTime;if(!this._beginTime){this._beginTime=kc}if(!this._endTime&&typeof this._options.duration==="number"){this._endTime=this._beginTime+this._options.duration}if(kf._endTime!==null&&kc>=kf._endTime){if(kf._options.dropLastAnimation===false){kf._options.render(kf._options.transition(1),1,kc)}if(typeof kf._options.finish==="function"){kf._options.finish(kc,this)}for(var ke=0,e=kf._callbacks.length;ke=kd.percentage&&kc0){i.unselectable="on";i.selectstart=function(){return false};i.onmousedown=function(T){T.preventDefault();return false}}else{var e=j3(i);e.MozUserSelect="none";e.WebkitUserSelect="none";i.addEventListener("mousedown",function(T){T.preventDefault()},false)}}function aS(e){return e&&e.parentNode&&e.parentNode.nodeType!==11}function bJ(i,e){i.insertAdjacentHTML("beforeEnd",e);return i.lastChild}function fM(T,i){var kc=document.createElement("div");kc.innerHTML=i;var e=kc.childNodes[0];return T.parentNode.insertBefore(e,T)}function ai(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 ho(i){ai(i);return c(i)}function gR(){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 im(kd){if(!kd){return}kd.onload=kd.onerror=null;var T=kd.attributes,kc,e,ke;if(T){e=T.length;for(kc=0;kc=e){return es(kh,kd)}var i=ke/e;var kg=T.lng+(kd.lng-T.lng)*i;var kf=T.lat+(kd.lat-T.lat)*i;const kc={lng:kg,lat:kf};return es(kh,kc)}function fa(T,i){var e=Math.round((T.x+i.x)/2);var kc=Math.round((T.y+i.y)/2);return new fi(e,kc)}function jk(e,T){var i=[];T=T||function(kd){return kd};for(var kc in e){i.push(kc+"="+T(e[kc]))}return i.join("&")}function bX(T,i,ke){var kf=document.createElement(T);if(ke){kf=document.createElementNS(ke,T)}i=i||{};for(var kc in i){var kd={"for":"htmlFor","class":"cssClass"}[kc]||kc;if(kc==="style"){kf.style.cssText=i[kc];continue}if(kc==="class"){eX.ac(kf,i[kc]);continue}if(kf.setAttribute){kf.setAttribute(kd,i[kc])}else{try{kf[kd]=i[kc]}catch(kf){}}}return kf}function ch(e){if(e.currentStyle){return e.currentStyle}else{if(e.ownerDocument&&e.ownerDocument.defaultView){return e.ownerDocument.defaultView.getComputedStyle(e,null)}}}function bR(e){return typeof e==="function"}function gc(e){return e===void 0}function jB(e,i){return Object.prototype.hasOwnProperty.call(e,i)}function g(kd,ke){if(gc(kd.length)){for(var kc in kd){if(jB(kd,kc)){ke.call(null,kc,kd[kc])}}}else{var T=kd.length;if(T){for(var e=0;e>4);ki=((kh&15)<<4)|(kf>>2);kg=((kf&3)<<6)|ke;T=T+String.fromCharCode(kk);if(kf!==64){T=T+String.fromCharCode(ki)}if(ke!==64){T=T+String.fromCharCode(kg)}kk=ki=kg="";kj=kh=kf=ke=""}while(kc-1||e.indexOf("iPad")>-1){return true}return false}function hS(){var e=navigator.userAgent;if(e.indexOf("Android")>-1){return true}return false}function iB(e){return e*Math.PI/180}function e9(e){return e/Math.PI*180}function bB(e,kd){var kc=Math.pow(10,kd);if(typeof e==="number"){return Math.round(e*kc)/kc}for(var T=0;Te){T=e}}return T}function ee(e,i){while(e<0){e+=i}return e%i}function hP(i,e){return(i>=0&&e>=0)||(i<0&&e<0)}function L(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 iy(kc,T){for(var e=0;ekc||T.lati){return false}return true}function i8(kg,kf,ke,kc){var kd=V(ke,kc,kg);var T=V(ke,kc,kf);var i=V(kg,kf,ke);var e=V(kg,kf,kc);if(kd*T<0&&i*e<0){return true}else{if(kd===0&&iX(ke,kc,kg)){return true}else{if(T===0&&iX(ke,kc,kf)){return true}else{if(i===0&&iX(kg,kf,ke)){return true}else{if(e===0&&iX(kg,kf,kc)){return true}else{return false}}}}}}function hD(T,i){var e=i.parentNode;if(e.lastChild===i){e.appendChild(T)}else{e.insertBefore(T,i.nextSibling)}}function dR(ki,kj){if(kj===0){return ki}var kh=0;var kf=0;if(!ki){throw"异常"}if(ki.length===0){return[]}for(var kd=1,T=ki.length-1;kdkh){kf=kd;kh=kg}}var e=[];if(kh>=kj){var kl=ki.slice(0,kf);var kk=ki.slice(kf,ki.length);var ke=dR(kl,kj);var kc=dR(kk,kj);for(var kd=0,T=ke.length;kd=0){kc=Math.floor(T/65536)*65536;i=kc;e=T-kc}else{kc=Math.floor(-T/65536)*65536;i=-kc;e=T+kc}return[i,e]}function cE(e){if(e.lng>=0&&e.lat>=0){return new cx(e.lng-10000000,e.lat-6000000)}if(e.lng>=0&&e.lat<0){return new cx(e.lng-10000000,e.lat+6000000)}if(e.lng<0&&e.lat>=0){return new cx(e.lng+10000000,e.lat-6000000)}if(e.lng<0&&e.lat<0){return new cx(e.lng+10000000,e.lat+6000000)}}var ia=null;if(window.performance&&window.performance.now){ia=function(){return performance.now()}}else{if(Date.now){ia=function(){return Date.now()}}else{ia=function(){return(new Date).getTime()}}}function hO(kc,e,i){var T="mouseWheel";if(eX.Platform.macintosh){if(!isNaN(kc)&&(kc<10||kc!==120)&&(e%1===0&&e<5)){T="padScroll"}if(eX.Browser.firefox&&(e%1===0&&e<5&&i===0)){T="padScroll"}}if(eX.Browser.safari&&kc===12){T="mouseWheel"}return T}function bK(kl,kg){var kk=kl[0];var kj=kl[1];var kc=false;for(var kf=0,ke=kg.length-2;kfkj)!==(T>kj))&&(kk<(kh-ki)*(kj-kd)/(T-kd)+ki);if(e){kc=!kc}ke=kf}return kc}function at(kd,kf){var e=kf.length;var T=0;var ke=false;for(var kc=0;kc=kf[kc].lat)&&(kd.lat=kf[T].lat)&&(kd.lati){T=Math.pow(T-i+1,kc)+i-1}else{if(Tthis.ll.lng&&e.lngthis.ll.lat&&e.lathk){return ay}return fu};ht.prototype.normalize=function(i,kc,e,T){if(i>e){this.ll.lng=e;this.ru.lng=i}else{this.ll.lng=i;this.ru.lng=e}if(kc>T){this.ll.lat=T;this.ru.lat=kc}else{this.ll.lat=kc;this.ru.lat=T}};function ev(i,kc,e,T){this.sp={lng:i,lat:kc};this.ep={lng:e,lat:T};this.mbr=new ht(i,kc,e,T)}function ic(kc,e,ke,kd){for(var T=0;T=e[T]&&kc.lng<=e[T+1]&&kc.lat>=ke[T]&&kc.lat<=ke[T+1]){return true}}return false}function gj(kh){var i=kh.lng;var kg=kh.lat;var kc=Math.sqrt(i*i+kg*kg);var ke=Math.atan2(kg,i);var T=kc+gu(kg);var kd=ke+gt(i);var e=T*Math.cos(kd);var kf=T*Math.sin(kd);return{lng:e+hG,lat:kf+hF}}function aZ(kh){var i=kh.lng-hG;var kg=kh.lat-hF;var kc=Math.sqrt(i*i+kg*kg);var ke=Math.atan2(kg,i);var T=kc-gu(kg);var kd=ke-gt(i);var e=T*Math.cos(kd);var kf=T*Math.sin(kd);return{lng:e,lat:kf}}function gu(e){return Math.sin(e*fH*iU)*gQ}function gt(e){return Math.cos(e*fH*iU)*gP}function ar(T,i,e){return((i.lng-T.lng)*(e.lat-T.lat)-(e.lng-T.lng)*(i.lat-T.lat))}function hL(i,e){return Math.abs(i-e)<=hk}function gB(kc,T){var i=kc.lat*iU;var kh=kc.lng*iU;var e=T.lat*iU;var kg=T.lng*iU;var ke=Math.cos(i)*Math.cos(e);var kd=Math.cos(kh)*Math.cos(kg);var kj=Math.sin(i)*Math.sin(e);var ki=Math.sin(kh)*Math.sin(kg);var kk=ke*kd+ke*ki+kj;if(kk<-1){kk=-1}else{if(kk>1){kk=1}}var kf=Math.acos(kk)*iD;return kf}function h(kg,kf){var i=kg.lat*iU;var e=kf.lat*iU;var kc=kg.lng*iU;var T=kf.lng*iU;var ke=i-e;var kd=kc-T;var kh=Math.sin(ke/2)*Math.sin(ke/2)+Math.cos(i)*Math.cos(e)*Math.sin(kd/2)*Math.sin(kd/2);return 2*Math.asin(Math.sqrt(kh))*iD}function gz(kh,T){var kj=bz(kh,T);var ki=180;var kg=90;var kf=-180;var kd=-90;var ke=T.sp;var kc=T.ep;ki=ke.lng=ki&&kj.lng<=kd&&kj.lat>=kg){return gB(kh,kj)}else{var i=h(kh,T.sp);var e=h(kh,T.ep);return ikc.lat){if(ar({lng:c2[e],lat:c0[e]},{lng:c2[(e+1)%ad],lat:c0[(e+1)%ad]},kc)>0){++T}}}else{if(c0[(e+1)%ad]<=kc.lat){if(ar({lng:c2[e],lat:c0[e]},{lng:c2[(e+1)%ad],lat:c0[(e+1)%ad]},kc)<0){--T}}}}return T===0?fu:h2}function jR(kc){var kf={};if(kc.lngeW[2]+0.4||kc.lat>eW[3]+0.4){kf.lng=kc.lng;kf.lat=kc.lat;return kf}else{if(ic(kc,eE,eD,ix)){kf=gj(kc);return kf}}var e=0;var ki=dH;var T=0;var kg=new ht();var kh=1;if(bH(kc)===fu){for(var ke=0;ket[2]+0.4||i.lat>t[3]+0.4){T.lng=i.lng;T.lat=i.lat;return T}else{if(ic(i,b7,b5,ix)){T=aZ(i);return T}}var e=jR(i);if(i.lng===e.lng&&i.lat===e.lng){T.lng=i.lng;T.lat=i.lat;return T}return decryptPt1(i,jR)}function iu(i,e){if(e===3&&i instanceof cx){var T=jR(i);return new cx(T.lng,T.lat)}else{return i}}function eG(i,e){if(e===3&&i instanceof cx){var T=eY(i);return new cx(T.lng,T.lat)}else{if(e===5&&i instanceof cx){return new cx(i.lng,i.lat)}else{return i}}}function o(ke){if(!ke){ke={}}var kf=JSON.stringify(ke);var kd=0,T,kc,e;if(kf.length===0){return kd}for(T=0,e=kf.length;Ti-lg?lg:lh},e.offset=function(i,lg){return lf(i=new Date(+i),null==lg?1:Math.floor(lg)),i},e.range=function(lh,i,lg){var li=[];if(lh=e.ceil(lh),lg=null==lg?1:Math.floor(lg),!(i>lh&&lg>0)){return li}do{li.push(new Date(+lh))}while(lf(lh,lg),le(lh),i>lh);return li},e.filter=function(i){return k7(function(lg){for(;le(lg),!i(lg);){lg.setTime(lg-1)}},function(lg,lh){for(;--lh>=0;){for(;lf(lg,1),!i(lg);){}}})},T&&(e.count=function(i,lg){return kR.setTime(+i),kV.setTime(+lg),le(kR),le(kV),Math.floor(T(kR,kV))},e.every=function(i){return i=Math.floor(i),isFinite(i)&&i>0?i>1?e.filter(ld?function(lg){return ld(lg)%i===0}:function(lg){return e.count(0,lg)%i===0}):e:null}),e}function kW(e){return k7(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())*kQ)/k4})}function kO(e){return k7(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)/k4})}var kR=new Date,kV=new Date,k2=k7(function(){},function(i,T){i.setTime(+i+T)},function(i,T){return T-i});k2.every=function(e){return e=Math.floor(e),isFinite(e)&&e>0?e>1?k7(function(i){i.setTime(Math.floor(i/e)*e)},function(i,T){i.setTime(+i+T*e)},function(i,T){return(T-i)/e}):k2:null};var lb=k2.range,k9=1000,kQ=60000,k6=3600000,kY=86400000,k4=604800000,ki=k7(function(e){e.setTime(Math.floor(e/k9)*k9)},function(i,T){i.setTime(+i+T*k9)},function(i,T){return(T-i)/k9},function(e){return e.getUTCSeconds()}),k8=ki.range,kX=k7(function(e){e.setTime(Math.floor(e/kQ)*kQ)},function(i,T){i.setTime(+i+T*kQ)},function(i,T){return(T-i)/kQ},function(e){return e.getMinutes()}),kq=kX.range,kK=k7(function(i){var T=i.getTimezoneOffset()*kQ%k6;0>T&&(T+=k6),i.setTime(Math.floor((+i-T)/k6)*k6+T)},function(i,T){i.setTime(+i+T*k6)},function(i,T){return(T-i)/k6},function(e){return e.getHours()}),k3=kK.range,kA=k7(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())*kQ)/kY},function(e){return e.getDate()-1}),kh=kA.range,kx=kW(0),kz=kW(1),kd=kW(2),kv=kW(3),kk=kW(4),kN=kW(5),kU=kW(6),kf=kx.range,kM=kz.range,ko=kd.range,kJ=kv.range,kZ=kk.range,kL=kN.range,la=kU.range,k1=k7(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()}),lc=k1.range,ku=k7(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()});ku.every=function(e){return isFinite(e=Math.floor(e))&&e>0?k7(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 kn=ku.range,kS=k7(function(e){e.setUTCSeconds(0,0)},function(i,T){i.setTime(+i+T*kQ)},function(i,T){return(T-i)/kQ},function(e){return e.getUTCMinutes()}),kC=kS.range,kB=k7(function(e){e.setUTCMinutes(0,0,0)},function(i,T){i.setTime(+i+T*k6)},function(i,T){return(T-i)/k6},function(e){return e.getUTCHours()}),ky=kB.range,kw=k7(function(e){e.setUTCHours(0,0,0,0)},function(i,T){i.setUTCDate(i.getUTCDate()+T)},function(i,T){return(T-i)/kY},function(e){return e.getUTCDate()-1}),kt=kw.range,ks=kO(0),kr=kO(1),kp=kO(2),km=kO(3),kl=kO(4),kg=kO(5),ke=kO(6),kc=ks.range,kI=kr.range,k5=kp.range,kT=km.range,k0=kl.range,kH=kg.range,kG=ke.range,kF=k7(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()}),kE=kF.range,kj=k7(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()});kj.every=function(e){return isFinite(e=Math.floor(e))&&e>0?k7(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 kD=kj.range;kP.timeInterval=k7,kP.timeMillisecond=k2,kP.timeMilliseconds=lb,kP.utcMillisecond=k2,kP.utcMilliseconds=lb,kP.timeSecond=ki,kP.timeSeconds=k8,kP.utcSecond=ki,kP.utcSeconds=k8,kP.timeMinute=kX,kP.timeMinutes=kq,kP.timeHour=kK,kP.timeHours=k3,kP.timeDay=kA,kP.timeDays=kh,kP.timeWeek=kx,kP.timeWeeks=kf,kP.timeSunday=kx,kP.timeSundays=kf,kP.timeMonday=kz,kP.timeMondays=kM,kP.timeTuesday=kd,kP.timeTuesdays=ko,kP.timeWednesday=kv,kP.timeWednesdays=kJ,kP.timeThursday=kk,kP.timeThursdays=kZ,kP.timeFriday=kN,kP.timeFridays=kL,kP.timeSaturday=kU,kP.timeSaturdays=la,kP.timeMonth=k1,kP.timeMonths=lc,kP.timeYear=ku,kP.timeYears=kn,kP.utcMinute=kS,kP.utcMinutes=kC,kP.utcHour=kB,kP.utcHours=ky,kP.utcDay=kw,kP.utcDays=kt,kP.utcWeek=ks,kP.utcWeeks=kc,kP.utcSunday=ks,kP.utcSundays=kc,kP.utcMonday=kr,kP.utcMondays=kI,kP.utcTuesday=kp,kP.utcTuesdays=k5,kP.utcWednesday=km,kP.utcWednesdays=kT,kP.utcThursday=kl,kP.utcThursdays=k0,kP.utcFriday=kg,kP.utcFridays=kH,kP.utcSaturday=ke,kP.utcSaturdays=kG,kP.utcMonth=kF,kP.utcMonths=kE,kP.utcYear=kj,kP.utcYears=kD,Object.defineProperty(kP,"__esModule",{value:!0})});function e7(e){this._elemType=e;this._objCollection={}}e7.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=bX(this._elemType);e=bx.getGUID("obj_pool_");this._objCollection[e]=i;return i};e7.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}};e7.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 h5={get:function(i,kd,e,T){var kc=new XMLHttpRequest();kc.open("GET",i,true);kc.timeout=10000;kc.ontimeout=function(){T&&T()};kc.onreadystatechange=function(ke){if(this.readyState===4){if(this.status===200){kd&&kd(kc.responseText)}else{e&&e()}}};kc.send()},post:function(i,ke,kd,e,T){var kc=new XMLHttpRequest();kc.open("POST",i,true);kc.setRequestHeader("Content-type","application/x-www-form-urlencoded");kc.timeout=10000;kc.ontimeout=function(){T&&T()};kc.onreadystatechange=function(kf){if(this.readyState===4){if(this.status===200){kd&&kd(kc.responseText,ke)}else{e&&e()}}};kc.send(ke);return kc}};var gM=(function(e){function i(ke,T,kd){if(ke.indexOf("v=")===-1){ke+="&v=gl"}var kc=bX("script",{src:ke,type:"text/javascript",charset:"utf-8"});if(kc.addEventListener){kc.addEventListener("load",function(kg){var kf=kg.target;kf.parentNode.removeChild(kf);T&&T()},false);kc.addEventListener("error",function(kg){if(kg){var kf=kg.target;kf&&kf.parentNode&&kf.parentNode.removeChild(kf)}kd&&kd(null)},false)}else{if(kc.attachEvent){kc.attachEvent("onreadystatechange",function(kg){var kf=window.event.srcElement;if(kf&&(kf.readyState==="loaded"||kf.readyState==="complete")){kf.parentNode.removeChild(kf)}T&&T()})}}e.getElementsByTagName("head")[0].appendChild(kc)}return{load:function(kf,T,kc){if(typeof kf==="string"){i(kf,T,kc)}else{if(kf.length>0){var ke=kf.length;for(var kd=0;kd-1){return{col:kc,row:ki,zoom:kh,useZoom:T}}else{var kf=j7.mapZoomBaseIndex[kh];var ke=j7.baseScaleZoom[kf+1];if(!ke){return null}var kg=this.getFactorByZooms(ke,kh);var e=j7.baseZoomInfo[ke];return{col:Math.floor(kc/kg),row:Math.floor(ki/kg),zoom:ke,useZoom:e[e.length-1]}}return null}if(kh-1-1){return[{col:kd,row:kf,zoom:e,useZoom:T}]}else{var kq=0;var kn=e;while(kqkm){return null}var kl=Math.pow(2,ks);var i=kd*kl;var kk=kf*kl;var kh=e+ks;var kj=[];for(var kp=0;kp<2;kp++){var ke=i+kp;for(var ko=0;ko<2;ko++){var kg=kk+ko;kj.push({col:ke,row:kg,zoom:kh,useZoom:kh})}}return kj},getFactorByZooms:function(i,kc){var T=j7.mapZoomBaseIndex[i];var kd=j7.mapZoomBaseIndex[kc];var e=j7.baseScaleZoomMercatorSize[T];var ke=j7.baseScaleZoomMercatorSize[kd];return e/ke}};var c6={};var aa=["swiftshader","microsoft basic render driver"];var hn=["intel","nvidia","amd","apple","geforce"];function gD(e){e=e.toLowerCase();if(aa.indexOf(e)>=0){return true}if(e.indexOf("mobile")>=0){return true}return false}function cz(T){T=T.toLowerCase();for(var e=0;e=0){return true}}return false}function j5(e){if(!e){return false}if(gD(e)){return false}if(cz(e)){return true}return false}c6.ifEnableEarth=function(i){var e=c6.ifEnableEarth;if(!i&&typeof e._enable==="boolean"){return e._enable}if(c6.ifSupportWebGL()){e._enable=true;return true}e._enable=false;return false};c6.ifEnableWebGLMap=function(i){var e=c6.ifEnableWebGLMap;if(!i&&typeof e._enable==="boolean"){return e._enable}if(c6.ifSupportWebGL()){if(aI.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};c6.params={};c6.ifSupportWebGL=function(){var i=c6.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 kd=null;var kj={alpha:true,antialias:false,failIfMajorPerformanceCaveat:false,preserveDrawingBuffer:false,stencil:false};try{kd=T.getContext("webgl",kj)||T.getContext("experimental-webgl",kj)}catch(kf){i._supportWebGL=false}if(kd===null){i._supportWebGL=false}else{i._supportWebGL=true;var kh=kd.getExtension("WEBGL_debug_renderer_info");var kg="";if(kh){kg=kd.getParameter(kh.UNMASKED_RENDERER_WEBGL);if(j5(kg)===true){i._supportWebGL=true}var ki=kd.getParameter(kh.UNMASKED_VENDOR_WEBGL);i._renderer=kg;i._vendor=ki}if(!kh&&eX.Browser.firefox){i._supportWebGL=true}if(!kh&&eX.Platform.macintosh){i._supportWebGL=true}if(kd.drawingBufferWidth!==T.width||kd.drawingBufferHeight!==T.height){i._supportWebGL=false}if(kd.getParameter(kd.MAX_VERTEX_TEXTURE_IMAGE_UNITS)<4){i._supportWebGL=false}var kc=kd.getParameter(kd.MAX_TEXTURE_SIZE);c6.params.maxTextureSize=kc;if(kc<4096){i._supportWebGL=false}var ke=kd.getParameter(kd.MAX_TEXTURE_IMAGE_UNITS);if(ke<8){i._supportWebGL=false}if(!kd.getShaderPrecisionFormat||kd.getShaderPrecisionFormat(kd.FRAGMENT_SHADER,kd.HIGH_FLOAT).precision<23){i._supportWebGL=false}}return i._supportWebGL};c6.ifSupportCanvas2d=function(){var kd=c6.ifSupportCanvas2d;if(typeof kd.supportCanvas2d==="boolean"){return kd.supportCanvas2d}var T=document.createElement("canvas");var i=null;try{i=T.getContext("2d")}catch(kc){kd.supportCanvas2d=false}if(i===null){kd.supportCanvas2d=false}else{kd.supportCanvas2d=true}return kd.supportCanvas2d};c6.ifCanvas2dInBlackList=function(){return true};c6.ifEnableCanvas2dMap=function(){return false;var i=navigator.userAgent;var e=0;var kc=0;var kd=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)){kc=parseFloat(RegExp.$1);if(kc>=6.1){if(/chrome\/(\d+\.\d)/i.test(i)){e=parseFloat(RegExp.$1);if(e>=31){return true}}if(/MSIE (\d+(\.\d+)?)/.test(i)){kd=parseFloat(RegExp.$1);if(kd>=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};c6.ifSupportCSS3=function(kg,i){var kf=document.createElement("div");var ke="Webkit Moz O ms".split(" ");var e=ke.length;var T="";var kc=kf.style;if(kg in kc){T=kg}kg=kg.replace(/^[a-z]/,function(kh){return kh.toUpperCase()});while(e--){var kd=ke[e]+kg;if(kd in kc){T=kd;break}}if(i){return T}else{return T.length>0?true:false}};c6.isModernBrowser=c6.ifSupportCanvas2d()&&c6.ifSupportCSS3("transform");function az(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}az.prototype.setData=function(kc,ke){var i=this._cache;var T=this._size;if(T===0){return}var e=this._curSize;if(e===T){this._removeOld()}var kd;if(!i[kc]){kd={key:kc,data:ke,older:null,newwer:null};i[kc]=kd;if(this._least===null){this._least=kd}if(this._most===null){this._most=kd}this._curSize++}else{kd=i[kc];kd.data=ke;if(this._most===kd){return}kd.older&&(kd.older.newer=kd.newer);kd.newer&&(kd.newer.older=kd.older);if(this._least===kd){this._least=kd.newer}}if(this._most&&this._most!==kd){this._most.newer=kd;kd.older=this._most;this._most=kd;kd.newer=null}};az.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};az.prototype.getAllData=function(){return this._cache};az.prototype.getHitRate=function(){return this._hitTimes/this._getDataTimes};az.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--};az.prototype._removeOld=function(){var e=this._cache;var kc=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 kS(kX,kW){var k0,i,k2,T=(k2=300+(k0=kX-105)+2*(i=kW-35)+0.1*k0*k0+0.1*k0*i+0.1*kH(kG(k0)),k2+=2*(20*kB(6*k0*kU)+20*kB(2*k0*kU))/3,(k2+=2*(20*kB(k0*kU)+40*kB(k0/3*kU))/3)+2*(150*kB(k0/12*kU)+300*kB(k0/30*kU))/3),kV=function(k5,k4){var k3=2*k5-100+3*k4+0.2*k4*k4+0.1*k5*k4+0.2*kH(kG(k5));return k3+=2*(20*kB(6*k5*kU)+20*kB(2*k5*kU))/3,k3+=2*(20*kB(k4*kU)+40*kB(k4/3*kU))/3,k3+2*(160*kB(k4/12*kU)+320*kB(k4*kU/30))/3}(kX-105,kW-35),kZ=kW/180*kU,kY=kB(kZ),k1=kH(kY=1-kA*kY*kY);return[T=180*T/(kM/k1*kD(kZ)*kU),kV=180*kV/(kM*(1-kA)/(kY*k1)*kU)]}function kJ(kV){var i=kV[0],T=kV[1];if(!kP(i,T)){return[i,T]}var kW=kS(i,T);return[i+kW[0],T+kW[1]]}function kC(kX){var k1=kX[0],T=kX[1];if(!kP(k1,T)){return[k1,T]}for(var kV=[k1,T],kZ=kV[0],kW=kV[1],k0=kJ([kZ,kW]),kY=k0[0]-k1,k2=k0[1]-T;kG(kY)>0.000001||kG(k2)>0.000001;){kY=(k0=kJ([kZ-=kY,kW-=k2]))[0]-k1,k2=k0[1]-T}return[kZ,kW]}var kN=Math.sin,kO=Math.cos,kk=Math.atan2,kR=Math.sqrt,kz=3000*Math.PI/180;function kF(kV){var i=kV[0]-0.0065,T=kV[1]-0.006,kX=kR(i*i+T*T)-0.00002*kN(T*kz),kW=kk(T,i)-0.000003*kO(i*kz);return[kX*kO(kW),kX*kN(kW)]}function ko(kV){var i=kV[0],T=kV[1],kX=kR(i*i+T*T)+0.00002*kN(T*kz),kW=kk(T,i)+0.000003*kO(i*kz);return[kX*kO(kW)+0.0065,kX*kN(kW)+0.006]}var kw=180/Math.PI,kf=Math.PI/180,kh=6378137,kT=20037508.342789244;function kt(i){return[i[0]*kw/kh,(0.5*Math.PI-2*Math.atan(Math.exp(-i[1]/kh)))*kw]}function kI(kV){var i=Math.abs(kV[0])<=180?kV[0]:kV[0]-360*(kV[0]<0?-1:1),T=[kh*i*kf,kh*Math.log(Math.tan(0.25*Math.PI+0.5*kV[1]*kf))];return T[0]>kT&&(T[0]=kT),T[0]<-kT&&(T[0]=-kT),T[1]>kT&&(T[1]=kT),T[1]<-kT&&(T[1]=-kT),T}var ks,kr,kq,ky,kn,kc,kx=Math.abs,kK=[12890594.86,8362377.87,5591021,3481989.83,1678043.12,0],km=[75,60,45,30,15,0],ke=[[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]],kL=[[-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 kl(kW,T,kV){var kY=kx(T)/kV[9],kX=kV[0]+kV[1]*kx(kW),i=kV[2]+kV[3]*kY+kV[4]*Math.pow(kY,2)+kV[5]*Math.pow(kY,3)+kV[6]*Math.pow(kY,4)+kV[7]*Math.pow(kY,5)+kV[8]*Math.pow(kY,6);return[kX*=kW<0?-1:1,i*=T<0?-1:1]}function kE(kV){for(var i=kV[0],T=kV[1],kX=[],kW=0;kWkm[kW]){kX=kL[kW];break}}return kl(i,T,kX)}function kj(kV){for(var i=kV[0],T=kV[1],kX=[],kW=0;kW=kK[kW]){kX=ke[kW];break}}return kl(i,T,kX)}function ki(T,i){if(!T){throw new Error(i)}}function ku(i){return !!i&&"[object Array]"===Object.prototype.toString.call(i)}function kp(i){return !isNaN(Number(i))&&null!==i&&!ku(i)}function kg(){for(var kV=[],i=0;i=2,"Invalid input coordinate: "+kZ),ki(kp(kZ[0])&&kp(kZ[1]),"Invalid input coordinate: "+kZ),kZ=kZ.map(Number),kW=!0);var kV=k0;return kW?kV(kZ):(kd(kZ,(function(k2){var i;i=kV(k2),k2[0]=i[0],k2[1]=i[1]})),kZ)}})}));var hB={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(ke){var kf=ke.replace("#","");if(kf.length===3){kf+="f"}else{if(kf.length===6){kf+="ff"}}var e=[];var kd=kf.length;var kc=kd===8?2:1;for(var T=0;T=0&&kd<60){kf=kg;ke=T;e=0}else{if(kd>=60&&kd<120){kf=T;ke=kg;e=0}else{if(kd>=120&&kd<180){kf=0;ke=kg;e=T}else{if(kd>=180&&kd<240){kf=0;ke=T;e=kg}else{if(kd>=240&&kd<300){kf=T;ke=0;e=kg}else{if(kd>=300&&kd<360){kf=kg;ke=0;e=T}}}}}}kf=(kf+i)*255>255?255:(kf+i)*255;ke=(ke+i)*255>255?255:(ke+i)*255;e=(e+i)*255>255?255:(e+i)*255;return[Math.round(kf),Math.round(ke),Math.round(e)]},formatColorCssToRgbaArray:function(ke,T,kc){kc=(typeof kc!=="boolean")?true:kc;if(typeof ke!=="string"){return kc?[0,0,0,1]:[0,0,0,255]}var i=(ke||"Black").trim().toLowerCase();var e=[];var kd=hB.ColorRefTable[i];if(kd!==undefined){i=kd[0]}e=hB.parseCSSColor(i);if(T!==undefined&&!isNaN(Number(T))){T=Number(T);e[3]=hB.fitTo(T,0,1)}else{e[3]=Number((e[3]/255).toFixed(2))}if(!kc){e[3]=Math.floor(e[3]*255)}return e},fitTo:function(T,i,e){if(Te){T=e}}return T},generateColorRamp:function(e,ki,kj,kc,ko){kj=kj||[];kc=kc||"#ccc";ko=ko||1;const T=document.createElement("canvas");const kp=T.getContext("2d");T.width=256;T.height=ko;const ke=ki[0];const kl=ki[ki.length-1];if(e.length===ki.length){const km=kp.createLinearGradient(0,0,256,1);for(var kh=0;kh>16)+(kw>>16)+(kv>>16);return(ku<<16)|(kv&65535)}function kn(kt,ku){return(kt<>>(32-ku))}function ki(ky,kv,ku,kt,kx,kw){return ko(kn(ko(ko(kv,ky),ko(kt,kw)),kx),ku)}function e(kv,ku,kz,ky,kt,kx,kw){return ki((ku&kz)|(~ku&ky),kv,ku,kt,kx,kw)}function kf(kv,ku,kz,ky,kt,kx,kw){return ki((ku&ky)|(kz&~ky),kv,ku,kt,kx,kw)}function kl(kv,ku,kz,ky,kt,kx,kw){return ki(ku^kz^ky,kv,ku,kt,kx,kw)}function kr(kv,ku,kz,ky,kt,kx,kw){return ki(kz^(ku|~ky),kv,ku,kt,kx,kw)}function T(kD,ky){kD[ky>>5]|=128<<(ky%32);kD[((ky+64)>>>9<<4)+14]=ky;var kv;var kx;var kw;var ku;var kt;var kC=1732584193;var kB=-271733879;var kA=-1732584194;var kz=271733878;for(kv=0;kv>5]>>>(kv%32))&255)}return kt}function kh(ku){var kw;var kt=[];kt[(ku.length>>2)-1]=undefined;for(kw=0;kw>5]|=(ku.charCodeAt(kw/8)&255)<<(kw%32)}return kt}function kg(kt){return km(T(kh(kt),kt.length*8))}function ks(kv,ky){var ku;var kx=kh(kv);var kt=[];var kw=[];var kz;kt[15]=kw[15]=undefined;if(kx.length>16){kx=T(kx,kv.length*8)}for(ku=0;ku<16;ku+=1){kt[ku]=kx[ku]^909522486;kw[ku]=kx[ku]^1549556828}kz=T(kt.concat(kh(ky)),512+ky.length*8);return km(T(kw.concat(kz),512+128))}function kq(kw){var kv="0123456789abcdef";var ku="";var kt;var kx;for(kx=0;kx>>4)&15)+kv.charAt(kt&15)}return ku}function kj(kt){return unescape(encodeURIComponent(kt))}function kc(kt){return kg(kj(kt))}function kk(kt){return kq(kc(kt))}function i(kt,ku){return ks(kj(kt),kj(ku))}function kp(kt,ku){return kq(i(kt,ku))}function kd(ku,kv,kt){if(!kv){if(!kt){return kk(ku)}return kc(ku)}if(!kt){return kp(kv,ku)}return i(kv,ku)}if(typeof define==="function"&&define.amd){define(function(){return kd})}else{if(typeof module==="object"&&module.exports){module.exports=kd}else{ke.md5=kd}}})(this);var cK={levels:{INFO:"info",WARNING:"warning",ERROR:"error"},category:{JS:"js",RESOURCE:"resource",AJAX:"ajax"},config:{jsError:true,resourceError:true,ajaxError:true},hosts:"158.234.196.4:5001/api_map_baidu_com|158.234.196.4:5001/webmap0_bdimg_com|158.234.196.4:5001/maponline0_bdimg_com|",ignoreUrl:"158.234.196.4:5001/api_map_baidu_com/images/blank.gif",sender:true,collections:[],sendError:function(){},init:function(i,e,T){this.hosts+=i?i:"";aq&&aq(this.config,e);this.sender=true;if(T){this.sender=false}this.hosts=this.urlScope(this.hosts);this.sendError=this.notifyError();var kc=typeof window!=="undefined"?window:typeof global!=="undefined"?global:typeof self!=="undefined"?self:{};this.config.jsError&&this.handleJavaScriptError(kc);this.config.resourceError&&this.handleResourceError(kc);this.config.ajaxError&&this.handleAjaxError(kc)},handleJavaScriptError:function(T){var e=this;var i=T.onerror;T.onerror=function(kg,kf,kc,ke,kd){if(e.isFetch(e.category.JS)&&e.hostExit(kf)){if(kd&&kd.stack){e.sendError({title:kg,msg:kd.stack,category:e.category.JS,level:e.levels.ERROR})}else{if(typeof kg==="string"){e.sendError({title:kg,msg:JSON.stringify({resourceUrl:kf,rowNum:kc,colNum:ke}),category:"js",level:e.levels.ERROR})}}}if(i&&bR(i)){i&&i.apply(T,arguments)}}},handleResourceError:function(i){var e=this;i.addEventListener("error",function(ke){if(ke){var kf=ke.target||ke.srcElement;var kd=kf instanceof HTMLScriptElement||kf instanceof HTMLLinkElement||kf instanceof HTMLImageElement;if(!kd){if(!i.onerror){var T=ke.filename||null;if(!e.isFetch(e.category.JS)||!e.hostExit(T)){return}if(ke.error&&ke.error.stack){e.sendError({title:ke.message,msg:ke.error.stack,category:e.category.JS,level:e.levels.ERROR})}else{if(typeof ke.message==="string"){e.sendError({title:ke.message,msg:JSON.stringify({resourceUrl:T,rowNum:ke.lineno,colNum:ke.cowno}),category:e.category.JS,level:e.levels.ERROR})}}}return}var kc=kf.src||kf.href;if(e.isFetch(e.category.RESOURCE)&&e.hostExit(kc)){e.sendError({title:kf.nodeName,msg:kc,category:e.category.RESOURCE,level:e.levels.ERROR})}}},true)},handleAjaxError:function(ke){var e=this;var kd=ke.location.protocol;if(kd==="file:"){return}if(!ke.XMLHttpRequest){return}var i=ke.XMLHttpRequest;var T=i.prototype.send;var kc=function(kg){if(kg&&kg.currentTarget&&kg.currentTarget.status!==200){var kf=kg.target.responseURL;if(e.isFetch(e.category.AJAX)&&e.hostExit(kf)){e.sendError({title:kf,msg:JSON.stringify({response:kg.target.response,responseURL:kf,status:kg.target.status,statusText:kg.target.statusText}),category:e.category.AJAX,level:e.levels.ERROR})}}};i.prototype.send=function(){if(this["addEventListener"]){this["addEventListener"]("error",kc);this["addEventListener"]("load",kc);this["addEventListener"]("abort",kc)}else{var kf=this["onreadystatechange"];this["onreadystatechange"]=function(kg){if(this.readyState===4){kc(kg)}kf&&kf.apply(this,arguments)}}return T.apply(this,arguments)}},notifyError:function(T){var i=T||1000;this._idleWorkerTicker=(function(kc){return function(){kc.runJob()}})(this);var e=this;return function(kd){if(kd.url){if(!e.isFetch(kd.category)){return}var kc=kd.url||"";if(!e.hostExit(kc)){return}delete kd.url}if(!navigator.onLine){return}e.collections.push(kd);e.checkJob(i)}},runJob:function(){if(this.collections.length===0){clearInterval(this.idleWork);this.idleWork=null;return}var kd=this.collections.slice(0,2);var T=ji(JSON.stringify({dataset:kd}));var kc=new Date().getTime();var i=eu.apiIMG+"/blank.gif?product=jsapi&v=gl&l="+T+"&ak="+eN+"&t="+kc;if(this.sender){try{var kf=document.createElement("div");kf.style="width:0;height:0;visibility: hidden;opacity: 0;z-index:-999;background-image: url("+i+");";document.querySelector("BODY").appendChild(kf);setTimeout(function(){document.querySelector("BODY").removeChild(kf)})}catch(ke){}}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(kc){var T={};var ke=Object.keys(B);if(B&&ke.length>0){for(var kd in B){if(B[kd]&&(typeof B[kd]!=="function")){T[kd]=B[kd]}}}try{var kg=JSON.stringify(T);if(kg.length>2){return kc+"|"+kg}else{return kc}}catch(kf){return kc}},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 kd=T.host+T.pathname;if(this.ignoreUrl.indexOf(kd)===-1&&this.hosts.indexOf(T.host)>-1){return true}return false}catch(kc){return false}},isFetch:function(e){return this.config[e+"Error"]||false}};bx.fetchDebug=cK;var jV={request:function(kk,kg,kc,kn,ke){var kh=new Date()["getTime"]();var kj=(Math.random()*100000)["toFixed"](0);bx._rd["_cbk"+kj]=function(ko){if(ko.result&&ko.result["error"]&&ko.result["error"]===202){alert("该AK因为恶意行为已经被管理员封禁!");return}if(ko.result&&ko.result["error"]&&ko.result["error"]===403){if(gZ!==null){gZ.update("未获得百度地图商用授权,可能导致部分地图请求失败,请刷新后重试。")}return}kc=kc||{};kk&&kk(ko,kc);delete bx._rd["_cbk"+kj]};kn=kn||"";var km;var kd;if(kc&&kc.useEncodeURI){km=jk(kg,encodeURI);kd=jk(kg)}else{km=jk(kg,encodeURIComponent);kd=jk(kg)}var i=B.apiHost+"/"+kn+"?"+km+"&ie=utf-8&oue=1&fromproduct=jsapi";var ki=B.apiHost+"/"+kn+"?"+kd+"&ie=utf-8&oue=1&fromproduct=jsapi";if(!ke){i+="&res=api";ki+="&res=api"}i+="&callback="+fs+"._rd._cbk"+kj;ki+="&callback="+fs+"._rd._cbk"+kj;var kf=window.___abvk?window.___abvk:jV.getSeckeyCidItem("SECKEY_ABVK");var e=jV.getSeckeyCidItem("BMAP_SECKEY");var kl=encodeURIComponent(kf+","+e);var T=kf+","+e;i+="&ak="+eN+"&v=gl&seckey="+kl+"&timeStamp="+kh;ki+="&ak="+eN+"&v=gl&seckey="+T+"&timeStamp="+kh;i+=jm()(ki);gM.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;bx._rd={};var dg={request:function(i,kh){var kd=new Date()["getTime"]();var kg=(Math.random()*100000).toFixed(0);if(kh){BMapGL._rd["_cbk"+kg]=function(kj){kh&&kh(kj);delete BMapGL._rd["_cbk"+kg]};i+="&callback=BMapGL._rd._cbk"+kg}function ke(kk){var kj;var kl=new RegExp("(^| )"+kk+"=([^;]*)(;|$)");if(kj=document.cookie.match(kl)){return unescape(kj[2])}else{return -1}}if(i.indexOf("v=")===-1){i+="&v=gl"}var kc=window.___abvk?window.___abvk:this.getSeckeyCidItem("SECKEY_ABVK");var e=this.getSeckeyCidItem("BMAP_SECKEY");var ki=encodeURIComponent(kc+","+e);var T=kc+","+e;signUrl=i+"&seckey="+T+"&timeStamp="+kd;i+="&seckey="+ki+"&timeStamp="+kd;i+=jm()(signUrl);var kf=bX("script",{src:i,type:"text/javascript",charset:"utf-8"});if(kf.addEventListener){kf.addEventListener("load",function(kk){var kj=kk.target;kj.parentNode.removeChild(kj)},false);kf.addEventListener("error",function(kj){kh&&kh([,,,,,])},false)}else{if(kf.attachEvent){kf.attachEvent("onreadystatechange",function(kk){var kj=window.event.srcElement;if(kj&&(kj.readyState=="loaded"||kj.readyState=="complete")){kj.parentNode.removeChild(kj)}})}}document.getElementsByTagName("head")[0].appendChild(kf);kf=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 gH(){this._map=null;this._container;this._type="control";this.blockInfoWindow=true;this._visible=true}gH.inherits(c8,"Control");eX.extend(gH.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&&bR(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){eX.ac(i,"BMap_noprint")}eX.on(i,"contextmenu",ho)}},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=bJ(this._opts.container,'
')}else{var i='
';if(e&&e.config.autoSafeArea&&ct()){this._safeAreaContainer=bJ(this._map.container,i);this._safeAreaContainer.style.position="absolute";this._safeAreaContainer.style.bottom="env(safe-area-inset-bottom)";this._container=bJ(this._safeAreaContainer,i)}else{this._container=bJ(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(kc){if(this.anchorFixed||typeof kc!=="number"||isNaN(kc)||kcBMAP_ANCHOR_BOTTOM_RIGHT){kc=this.defaultAnchor}this._opts.offset=this._opts.offset||this.defaultOffset;var T=this._opts.anchor;this._opts.anchor=kc;if(!this._container){return}var ke=this._container;var e=this._opts.offset.width;var kd=this._opts.offset.height;ke.style.left=ke.style.top=ke.style.right=ke.style.bottom="auto";switch(kc){case BMAP_ANCHOR_TOP_LEFT:ke.style.top=kd+"px";ke.style.left=e+"px";break;case BMAP_ANCHOR_TOP_RIGHT:ke.style.top=kd+"px";ke.style.right=e+"px";break;case BMAP_ANCHOR_BOTTOM_LEFT:ke.style.bottom=kd+"px";ke.style.left=e+"px";break;case BMAP_ANCHOR_BOTTOM_RIGHT:ke.style.bottom=kd+"px";ke.style.right=e+"px";break;default:break}var i=["TL","TR","BL","BR"];eX.rc(this._container,"anchor"+i[T]);eX.ac(this._container,"anchor"+i[kc])},getAnchor:function(){return this._opts.anchor},setOffset:function(e){if(!e){return}this._opts=this._opts||{};this._opts.offset=new i0(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 fJ("onshow"))},hide:function(){if(this._visible===false){return}this._visible=false;if(this._container){this._container.style.display="none"}this.dispatchEvent(new fJ("onhide"))},isPrintable:function(){return !!this._opts.printable},isVisible:function(){if(!this._container&&!this._map){return false}return !!this._visible},_asyncLoadCode:function(){var e=this;g2.load("control",function(){if(e._asyncDraw){e._asyncDraw()}})}});var eg={TOP_LEFT:0,TOP_RIGHT:1,BOTTOM_LEFT:2,BOTTOM_RIGHT:3};bx.ControlAnchor=eg;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 f5(e){gH.call(this);e=e||{};this._opts={printable:false};eX.extend(this._opts,e);this._copyrightCollection=[];this.defaultAnchor=BMAP_ANCHOR_BOTTOM_LEFT;this.defaultOffset=new i0(5,2);this.setAnchor(e.anchor);this._canShow=true;this.sateMapStyle=false;this.blockInfoWindow=false;this._asyncLoadCode()}f5.inherits(gH,"CopyrightControl");eX.extend(f5.prototype,{initialize:function(e){this._map=e;return this._container},addCopyright:function(kc){var e={minZoom:0,bounds:null,content:"",mapType:""};for(var T in kc){e[T]=kc[T]}if(this._map){var kf=e.minZoom;if(kf===-1||kfthis._map.getMaxZoom()){e.minZoom=this._map.getMinZoom()}if(e.mapType!==""&&!ej[e.mapType]){e.mapType=BMAPGL_NORMAL_MAP}}var kd=this.getCopyright(kc.id);if(kd){for(var ke in e){kd[ke]=e[ke]}}else{this._copyrightCollection.push(e)}},getCopyright:function(kc){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){gH.call(this);i=i||{};this._opts={printable:false};this.defaultAnchor=BMAP_ANCHOR_TOP_RIGHT;this.defaultOffset=new i0(10,10);this.setAnchor(i.anchor);this._opts=eX.extend(eX.extend(this._opts,{offset:this.defaultOffset,enableSwitch:true}),i);var e=this;g2.load("control",function(){e._asyncDraw()})}v.inherits(gH,"MapTypeControl");eX.extend(v.prototype,{initialize:function(e){this._map=e;return this._container},showStreetLayer:function(e){this._map.showStreetLayer(e)}});function jc(e){gH.call(this);e=e||{};this._opts={};this._opts=eX.extend(this._opts,e);this._zoomInDisabled=false;this._zoomOutDisabled=false;this._zoomInTapped=false;this._zoomOutTapped=false;this.defaultAnchor=eg.BOTTOM_RIGHT;this.defaultOffset=new i0(15,20);this.setAnchor(e.anchor);this._asyncLoadCode()}jc.inherits(gH,"ZoomControl");eX.extend(jc.prototype,{initialize:function(e){this._map=e;return this._container}});function go(e){gH.call(this);e=e||{};this._opts={autoZoom:true,autoViewport:true};this._opts=eX.extend(this._opts,e);this.defaultAnchor=eg.BOTTOM_LEFT;this.defaultOffset=new i0(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()}go.inherits(gH,"LocationControl");eX.extend(go.prototype,{initialize:function(e){this._map=e;return this._container},startLocation:function(){this._startLocationCalled=true},stopLocationTrace:function(){},setOptions:function(e){e=e||{};eX.extend(this._opts,e)}});function bA(e){gH.call(this);e=e||{};this._opts={};this._opts=eX.extend(this._opts,e);this.defaultAnchor=eg.BOTTOM_LEFT;this.defaultOffset=new i0(5,15);if(bW()){this.defaultOffset=new i0(10,10)}this.setAnchor(e.anchor)}bA.inherits(gH,"LogoControl");eX.extend(bA.prototype,{initialize:function(i){this._map=i;var e=this._container=document.createElement("div");e.innerHTML='';i.getContainer().appendChild(e);return e}});function au(e,i){this._map=e;this._indoorInfo=i;this._visible=true;this._adjustVisible=true;this._isMobile=bW();this._sizeConfig={FLOOR_BTN_HEIGHT:this._isMobile?35:26,SWITCH_ARROW_HEIGHT:this._isMobile?20:15};this._init()}au.prototype._init=function(){this._render();this._bindDom();this._bind();this._adjustDisplayHeight();var e=new fJ("onindoor_bar_show");e.uid=this._indoorInfo.uid;this._map.dispatchEvent(e)};au.prototype._render=function(){if(!this._indoorInfo){return}var kg=this._isMobile;var e=this._div=bX("div");eX.ac(e,"floor-select-container");kg&&eX.ac(e,"mobile");kg&&eX.ac(e,"all-border-radius");var i=this._btnTop=bX("button");eX.ac(i,"floor-switch-top");eX.ac(i,"top-border-radius");var ke=bX("div");eX.ac(ke,"floor-switch-top-icon");i.appendChild(ke);var kd=this._btnBottom=bX("button");var T=bX("div");eX.ac(T,"floor-switch-bottom-icon");kd.appendChild(T);eX.ac(kd,"floor-switch-bottom");eX.ac(kd,"bottom-border-radius");var kc=this._floorsContainer=bX("div");eX.ac(kc,"floors-container");kc.appendChild(this._createFloorsDom());this._div.appendChild(i);this._div.appendChild(kc);this._div.appendChild(kd);var kh=0;if(this._btnTop.style.display===""){kh=2*this._sizeConfig.SWITCH_ARROW_HEIGHT}this._div.style.height=parseInt(this._floorsContainer.style.height,10)+kh+"px";this._map.getContainer().appendChild(this._div);if(!kg){var kf=this;setTimeout(function(){kf._div.style.right="20px"},20)}};au.prototype._createFloorsDom=function(){if(!this._indoorInfo){return}var T=this._ol=bX("ol");var ke=this._indoorInfo.currentFloor;for(var kd=this._indoorInfo.floors.length-1;kd>=0;kd--){var kf=this._indoorInfo.floors[kd].floorName;var e=bX("li");var kc=bX("button");eX.ac(kc,"btn-select-floor");if(kd===ke){eX.ac(kc,"selected")}kc.setAttribute("data-floor",kd);kc.innerHTML=kf;e.appendChild(kc);T.appendChild(e)}return T};au.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()};au.prototype._bindDom=function(){var e=this;eX.on(this._floorsContainer,"click",function(kc){var T=kc.target||kc.srcElement;if(T.tagName.toLowerCase()==="button"){e._map.showIndoor(e._indoorInfo.uid,parseInt(T.getAttribute("data-floor"),10));var i=new fJ("onindoor_bar_click");i.uid=e._indoorInfo.uid;e._map.dispatchEvent(i)}});eX.on(this._floorsContainer,"mouseover",function(T){var i=T.target;if(i.tagName.toLowerCase()==="button"){eX.ac(i,"hover")}});eX.on(this._floorsContainer,"mouseout",function(T){var i=T.target;if(i.tagName.toLowerCase()==="button"){eX.rc(i,"hover")}});eX.on(this._floorsContainer,"touchstart",function(T){var i=T.target;if(i.tagName.toLowerCase()==="button"){eX.ac(i,"onmousedown")}});eX.on(this._floorsContainer,"touchend",function(T){var i=T.target;if(i.tagName.toLowerCase()==="button"){eX.rc(i,"onmousedown")}});eX.on(this._btnTop,"mouseover",function(i){if(this._disable){return}eX.ac(this,"hover")});eX.on(this._btnTop,"mouseout",function(i){eX.rc(this,"hover")});eX.on(this._btnBottom,"mouseover",function(i){if(this._disable){return}eX.ac(this,"hover")});eX.on(this._btnBottom,"mouseout",function(i){eX.rc(this,"hover")});eX.on(this._btnTop,"touchstart",function(i){if(this.className.indexOf("disable")>-1){return}eX.ac(this,"onmousedown")});eX.on(this._btnTop,"touchend",function(i){eX.rc(this,"onmousedown")});eX.on(this._btnBottom,"touchstart",function(i){if(this.className.indexOf("disable")>-1){return}eX.ac(this,"onmousedown")});eX.on(this._btnBottom,"touchend",function(i){eX.rc(this,"onmousedown")});eX.on(this._btnTop,"click",function(i){e._setBarSliderTop(parseInt(e._ol.style.top,10)+26)});eX.on(this._btnBottom,"click",function(i){e._setBarSliderTop(parseInt(e._ol.style.top,10)-26)});eX.on(this._div,"mousemove",ai);eX.on(this._div,"wheel",ho);eX.on(this._div,"mousewheel",ho);this._map.addEventListener("resize",function(){e._adjustDisplayHeight()})};au.prototype._adjustDisplayHeight=function(){if(!this._indoorInfo){return}var ke=this._map.getSize().height;var kf=this._sizeConfig.FLOOR_BTN_HEIGHT;var kg=ke-291-100;if(this._isMobile){kg=ke-12-108-this._map.config.bottomOffset}var e=this._indoorInfo.floors.length;var T=e*kf;var kc=e;var ki=0;var kj=this._floorsContainer.children[0];if(T>kg){this._showArrow=true;eX.rc(kj.children[0].children[0],"top-border-radius");eX.rc(kj.children[e-1].children[0],"bottom-border-radius")}else{this._showArrow=false;eX.ac(kj.children[0].children[0],"top-border-radius");eX.ac(kj.children[e-1].children[0],"bottom-border-radius")}while(T>kg){if(kc===0){break}kc--;ki=2*this._sizeConfig.SWITCH_ARROW_HEIGHT;T=kc*kf+ki}this._currentDisplayHeight=T;if(kc<3){this._setAdjustVisbile(false)}else{this._setAdjustVisbile(true)}this._floorsContainer.style.height=kc*kf+"px";var kd=this._indoorInfo.currentFloor;var i=e-kd;var kh=kd-1;this._div.style.height=parseInt(this._floorsContainer.style.height,10)+ki+"px";var kk=-(e-(kd+Math.round(kc/2)))*kf;this._setBarSliderTop(kk);if(kc=i*T){kc=e-i*T;eX.ac(this._btnBottom,"disable");eX.rc(this._btnBottom,"hover");this._btnBottom._disable=true}else{eX.rc(this._btnBottom,"disable");this._btnBottom._disable=false}if(kc>=0){kc=0;eX.ac(this._btnTop,"disable");eX.rc(this._btnTop,"hover");this._btnTop._disable=true}else{eX.rc(this._btnTop,"disable");this._btnTop._disable=false}this._ol.style.top=kc+"px"};au.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"}};au.prototype._bind=function(){var i=this._map;var e=this;i.on("indoor_status_changed",function(kg){if(e._visible===false){return}var T=e._ol;var ke=kg.uid;if(!ke){return}var kf=kg.floor;for(var kd=0;kd=hK.HIGH_RES_MIN_RATIO?2:1;this._imgPath=B.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()}eX.extend(iF.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=bX("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=bX("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(){iy(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 fJ("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 fJ("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 fJ("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 cS(T,i){this._map=T;this._target=T;var kc=T.temp.originMapType||T.mapType;if(kc==="B_EARTH_MAP"&&T._earth){this._target=T._earth}this._outContainer=i||T.getContainer();this._imgRatio=gd()>=hK.HIGH_RES_MIN_RATIO?2:1;this._imgPath=B.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()}eX.extend(cS.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=bX("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(kc){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 fJ("ontiltmsdown"));e._tiltAni=new fy({duration:9999999,render:function(kd){i=e._target.getTilt();if(T==="in"&&i0){e._target.setTilt(i-1,{noAnimation:true})}}},finish:function(){e._tiltAni=null}});e._clickTimer=null},200);kc.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(kc){if(!e._enabled){return}if(!e._clickTimer){return}if(e._target.getLock()){return}clearTimeout(e._clickTimer);e._map.fire(new fJ("ontiltclick"));var i=e._target.getTilt();e._target.setLock(true);kc.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){kc=26;e=0;i=0}var kd="-"+(110+i+kc+e)+"px 1px";this._div&&(this._div.style.backgroundPosition=kd);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 hm(i){c8.call(this);this._opts={container:null,cursor:"default",marker:true};this._opts=eX.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;g2.load("menu",function(){e._draw()})}hm.inherits(c8,"ContextMenu");eX.extend(hm.prototype,{initialize:function(i,e){this._map=i;this._overlay=e||null},remove:function(){this._map=this._overlay=null},addItem:function(kd,e){if(!kd||kd._type!="menuitem"||kd._text==""||kd._width<=0){return}for(var kc=0,T=this._items.length;kcthis._items.length-1){e=-1}kd._insertIndex=e;if(e===-1){this._items.push(kd);this._rItems.push(kd)}else{this._items.splice(e,0,kd);this._rItems.splice(e,0,kd)}},removeItem:function(kc){if(!kc||kc._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 kc=0,e=this._items.length;kcT){this._items[kc]._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 hW(T,kc,i){if(!T||!kc||typeof kc!="function"){return}c8.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=kc;this._map=null;this._type="menuitem";this._contextmenu=null;this._container=null;this._enabled=true;var e=this;g2.load("menu",function(){e._draw()})}hW.inherits(c8,"MenuItem");eX.extend(hW.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 hY(e,i){this.setSouthWest(e);this.setNorthEast(i)}eX.extend(hY.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 kd=Math.max(this.sw.lng,T.sw.lng);var i=Math.min(this.ne.lng,T.ne.lng);var kc=Math.max(this.sw.lat,T.sw.lat);var e=Math.min(this.ne.lat,T.ne.lat);return new hY(new cx(kd,kc),new cx(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 cx(0,0)}var T;var kd;T=new cx(Math.abs(e.lng),Math.abs(e.lat));for(var kc=0;kc=this.MCBAND[kc]){kd=this.MC2LL[kc];break}}var ke=this.convertor(e,kd);return new cr(ke.lat,ke.lng)},convertLL2MC:function(kf){if(!kf){return new cx(0,0)}var kh=kf.lat;var kc=kf.lng;kc=this.getLoop(kf.lng,-180,180);kh=cb(kh,-85,85);var ke;for(var kd=0;kd=this.LLBAND[kd]){ke=this.LL2MC[kd];break}}if(!ke){for(kd=0;kde){T-=e-i}while(Ti-1){e=e-i}while(e<0){e=e+i}return e},getLoopBox:function(e,kc){var i=this.HALF_SIZE*2;if(e[0]>0&&kc[2]<0){kc[2]=kc[2]+i}else{if(e[0]<0&&kc[0]>0){kc[0]=kc[0]-i}}return kc},createOrUpdateTileCoord:function(T,e,kc,i){if(i!==undefined){i[0]=T;i[1]=e;i[2]=kc;return i}else{return[T,e,kc]}},createOrUpdateTileRange:function(e,kc,kd,T,i){if(i!==undefined){i.minX=e;i.maxX=kc;i.minY=kd;i.maxY=T;return i}else{return{minX:e,maxX:kc,minY:kd,maxY:T}}},fromEPSG4326:function(T,kh,kf){var kd=T.length;var ke=kf>1?kf:2;var e=kh;if(e===undefined){if(ke>2){e=T.slice()}else{e=new Array(kd)}}for(var kc=0;kcthis.MAX_SAFE_Y){kg=this.MAX_SAFE_Y}else{if(kg<-this.MAX_SAFE_Y){kg=-this.MAX_SAFE_Y}}e[kc+1]=kg}return e},toEPSG4326:function(T,kg,kf){var kd=T.length;var ke=kf>1?kf:2;var e=kg;if(e===undefined){if(ke>2){e=T.slice()}else{e=new Array(kd)}}for(var kc=0;kc90){i=90}}while(e<-180){e+=360}while(e>180){e-=360}e=e||0;i=i||0;cx.call(this,e,i)}cr.inherits(cx,"LatLng");eX.extend(cr.prototype,{equals:function(e){return(this.lat===e.lat&&this.lng===e.lng)},clone:function(){return new cr(this.lat,this.lng)},add:function(e){return new cr(this.lng+e.lng,this.lat+e.lat)},sub:function(e){return new cr(this.lat-e.lat,this.lng-e.lng)},mult:function(e){return new cr(this.lng*e,this.lat*e)},div:function(e){return new cr(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 cG(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 cr(e.lat,e.lng);this._ne=new cr(i.lat,i.lng);this._swLng=e.lng;this._swLat=e.lat;this._neLng=i.lng;this._neLat=i.lat}}eX.extend(cG.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 kd=Math.max(this._swLng,T._swLng);var i=Math.min(this._neLng,T._neLng);var kc=Math.max(this._swLat,T._swLat);var e=Math.min(this._neLat,T._neLat);this._sw=new cr(kc,kd);this._ne=new cr(e,i);this._swLng=kd;this._swLat=kc;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 cr(0,0)}if(!this._ne){this._ne=new cr(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=B.apiHost+"?qt=coords&coords=";eX.each(i,function(ke){e+=ke.lng+","+ke.lat+";"});e=e.replace(/;$/gi,"");e=e+"&from="+kd+"&to="+kc+"&v=gl&type=webgl&ak="+eN;dg.request(e,function(kf){data=kf.content;if(typeof data!=="undefined"&&data!==null&&data.status===0){var ke=[];eX.each(data.result,function(kg){ke.push(new cx(kg.x,kg.y))});delete data.result;data.points=ke}else{if(kf.result&&kf.result.error){data={status:kf.result.errror,message:"访问错误,请参考错误状态码https://lbsyun.baidu.com/index.php?title=webapi/appendix"}}}T&&T(data)})}});var ed={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 aj={_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=bJ(this._map.container,this._html);eX.on(e,"mouseup",function(T){if(T.button==2){ho(T)}});eX.on(e,"contextmenu",ho);e.style.display="none"},getDrawPoint:function(kc,kf,kd){kc=window.event||kc;var i=kc.offsetX||kc.layerX||0;var ke=parseInt(kc.offsetY)||parseInt(kc.layerY)||0;var T=kc.target||kc.srcElement;if(T!=aj.getDom(this._map)&&kf==true){while(T&&T!=this._map.container){if(!(T.clientWidth==0&&T.clientHeight==0&&T.offsetParent&&T.offsetParent.nodeName.toLowerCase()=="td")){i+=T.offsetLeft;ke+=T.offsetTop}T=T.offsetParent}}if(T!=aj.getDom(this._map)&&T!=this._map.container){return}if(typeof i==="undefined"||typeof ke==="undefined"){return}if(isNaN(i)||isNaN(ke)){return}if(kd){i=i+kd.x;ke=ke+kd.y}return this._map.pixelToPointIn(new fi(i,ke))},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 aR(){this._type="overlay"}aR.inherits(eX.BaseClass,"Overlay");aR.getZIndex=function(i,e){i=i*1;if(!i){return 0}if(e){i=i9.convertMC2LL(new cx(0,i)).lat}return(i*-100000)<<1};eX.extend(aR.prototype,{_i:function(T){this._map=T;if(!this.domElement&&bR(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;eX.each(i,function(kc){eX.on(e.domElement,kc,ai)})}}}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 fJ("onremove"))},hide:function(){this._visible=false;eX.hide(this.domElement)},show:function(){this._visible=true;eX.show(this.domElement)},getMap:function(){return this._map},dispose:function(){eX.BaseClass.prototype.decontrol.call(this)}});function eA(){eX.BaseClass.call(this);aR.call(this);this._visible=true;this._visibleInternal=true;this.zIndex=0;this.infoWindow=null;this._dblclickTime=0}eA.inherits(aR,"OverlayInternal");eX.extend(eA.prototype,{initialize:function(e){this.map=e;eX.BaseClass.call(this,this.hashCode);return null},draw:function(){},remove:function(){this.decontrol();aR.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,kc){if(!T){return this.point}else{var e=kc?kc.width:0;var kd=kc?kc.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+kd}else{i.x=i.x+e;i.y=i.y+kd}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 aP(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()}aP.prototype._init=function(){if(this.map._renderType!=="webgl"){this._createOverlayContainers()}else{this._createWebGLOverlayContainers()}this._bind()};aP.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)}};aP.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)};aP.prototype._createOverlayDiv=function(e,kc){var T=bX("div");var i=T.style;i.position="absolute";i.top=i.left=i.width=i.height="0";i.zIndex=kc;e.appendChild(T);return T};aP.prototype._bind=function(){var kd=this.map;var kc=this;function i(kf){kc.draw(kf)}if(kd._renderType!=="webgl"){kd.addEventListener("load",i);kd.addEventListener("moveend",i);kd.addEventListener("resize",i);kd.addEventListener("zoomend",i);kd.addEventListener("zooming_inner",i)}else{kd.on("update",i)}kd.on("destroy",function(){kd._overlays={};kd._overlayArray=[];kd._customOverlays=[];kd.overlayDiv=null;kd.overlayDivEx=null;var kf=Object.keys(kd._panes);for(var kg=0;kg=0;kf--){if(kc._customOverlays[kf].enableMassClear!==false){this.removeOverlay(kc._customOverlays[kf]);kc._customOverlays.splice(kf,1)}}});kd.addEventListener("infowindowopen",function(kg){var kf=this.infoWindow;if(kf){eX.hide(kf.popDom);eX.hide(kf.shadowDom)}});function T(){if(this.getMapType()==="B_EARTH_MAP"||this._renderType==="webgl"){if(kc._zoomingOrMoving===false){this._panes.markerMouseTarget.style.display="none";kc._zoomingOrMoving=true}}}function e(kh){if(this.getMapType()==="B_EARTH_MAP"||this._renderType==="webgl"){if(kc._zoomingOrMoving===true){if(this._panes.markerMouseTarget){this._panes.markerMouseTarget.style.display=""}kc._zoomingOrMoving=false;for(var kg=0;kg1){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 hY();this.points=[];this.greatCirclePoints=[];this._parseCache=[];this._holesCache=[];this._parseCacheGL=[];this._parseCacheGLRaw=[];this._areaCacheGL=[];this._strokeStyleInfoForGL=[[]];this._fillStyleInfoForGL="";this.vertexMarkers=[];this._temp={}}iz.JOININDEX={miter:0,round:1,bevel:2};iz.CAPINDEX={round:0,butt:1,square:2};iz.inherits(eA,"Graph");iz.getGraphPoints=function(i){var e=[];if(!i||i.length===0){return e}if(typeof i==="string"){var T=i.split(";");eX.each(T,function(kd){var kc=kd.split(",");e.push(new cx(kc[0],kc[1]))})}if(i.constructor===Array&&i.length>0){e=i}return e};iz.parseTolerance={0:[0.09,0.005,0.0001,0.00001],1:[9000,500,20,1]};eX.extend(iz.prototype,{initialize:function(e){this.map=e;return null},draw:function(){},setPoints:function(e){this._clearCache();this.points=iz.getGraphPoints(e).slice(0);this._calcBounds()},setPathIn:function(e){this.setPoints(e)},_calcBounds:function(){if(!this.points){return}var e=this;e._bounds=new hY();if(!this.hasMultipleParts){eX.each(this.points,function(i){e._bounds.extend(i)})}else{eX.each(this.points,function(i){eX.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 cx(e.lng,e.lat);this._calcBounds()},setPositionAt:function(i,e){if(!e||!this.points[i]){return}var T=i9.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 hY(i9.convertMC2LL(e.getSouthWest()),i9.convertMC2LL(e.getNorthEast()));i.setMinMax();return i},remove:function(){if(this.map){this.map.removeEventListener("onmousemove",this._graphMouseEvent);this.map.removeEventListener("onclick",this._graphClickEvent)}eA.prototype.remove.call(this);this._clearCache();var e=new fJ("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;g2.load("poly",function(){e.addVertexs()},true)},disableEditing:function(){this._config.enableEditing=false;var e=this;g2.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){ke=this.greatCirclePoints}var kd=e.config.coordType===2?1:e.config.coordType;var kf=this.getParseTolerance(e.getZoom(),kd);if(!this.hasMultipleParts){var ki=dR(ke,kf)}else{var ki=[];for(var T=0;Tkd.maxY){T.bottom=4;T.all+=T.bottom}}if(e>kd.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 dI.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 dI.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(kc,kd,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(kc,kd==null?null:kd.angleTo(kc))};this.addMarkerAngle=function(kc,T){this.points.push(kc);this.angles.push(T)};this.getMarkerPoints=function(){return this.points};this.getMarkerAngles=function(){for(var kc=0;kc1){ki*=Math.sqrt(kx);kh*=Math.sqrt(kx)}var kp=(kk==kg?-1:1)*Math.sqrt(((Math.pow(ki,2)*Math.pow(kh,2))-(Math.pow(ki,2)*Math.pow(kF.y,2))-(Math.pow(kh,2)*Math.pow(kF.x,2)))/(Math.pow(ki,2)*Math.pow(kF.y,2)+Math.pow(kh,2)*Math.pow(kF.x,2)));if(isNaN(kp)){kp=0}var ko=new dI.Point(kp*ki*kF.y/kh,kp*-kh*kF.x/ki);var kd=new dI.Point((kA.x+kl.x)/2+Math.cos(T)*ko.x-Math.sin(T)*ko.y,(kA.y+kl.y)/2+Math.sin(T)*ko.x+Math.cos(T)*ko.y);var kv=function(kG){return Math.sqrt(Math.pow(kG[0],2)+Math.pow(kG[1],2))};var kr=function(kH,kG){return(kH[0]*kG[0]+kH[1]*kG[1])/(kv(kH)*kv(kG))};var kD=function(kH,kG){return(kH[0]*kG[1]=1){kB=0}var ku=1-kg?1:-1;var kz=kE+ku*(kB/2);var i=new dI.Point(kd.x+ki*Math.cos(kz),kd.y+kh*Math.sin(kz));ky.addMarkerAngle(i,kz-ku*Math.PI/2);ky.addMarkerAngle(kl,kz-ku*Math.PI);kj.addPoint(kl.x,kl.y);if(kw!=null){var kr=ki>kh?ki:kh;var ks=ki>kh?1:ki/kh;var kq=ki>kh?kh/ki:1;kw.translate(kd.x,kd.y);kw.rotate(T);kw.scale(ks,kq);kw.arc(0,0,kr,kE,kE+kB,1-kg);kw.scale(1/ks,1/kq);kw.rotate(-T);kw.translate(-kd.x,-kd.y)}}break;case"Z":case"z":if(kw!=null){kw.closePath()}ky.current=ky.start}}return kj};this.getMarkers=function(){var kc=this.PathParser.getMarkerPoints();var ke=this.PathParser.getMarkerAngles();var kd=[];for(var T=0;Tthis.x2){this.x2=kd}}if(ke!=null){if(isNaN(this.y1)||isNaN(this.y2)){this.y1=ke;this.y2=ke}if(kethis.y2){this.y2=ke}}};this.addX=function(kd){this.addPoint(kd,null)};this.addY=function(kd){this.addPoint(null,kd)};this.addBoundingBox=function(kd){this.addPoint(kd.x1,kd.y1);this.addPoint(kd.x2,kd.y2)};this.addQuadraticCurve=function(ki,kh,ke,kd,kk,kj){var kg=ki+2/3*(ke-ki);var kf=kh+2/3*(kd-kh);var km=kg+1/3*(kk-ki);var kl=kf+1/3*(kj-kh);this.addBezierCurve(ki,kh,kg,km,kf,kl,kk,kj)};this.addBezierCurve=function(kq,kp,kh,kf,km,kk,ks,kr){var ki=[kq,kp],kg=[kh,kf],ke=[km,kk],kd=[ks,kr];this.addPoint(ki[0],ki[1]);this.addPoint(kd[0],kd[1]);for(jo=0;jo<=1;jo++){var kt=function(kx){return Math.pow(1-kx,3)*ki[jo]+3*Math.pow(1-kx,2)*kx*kg[jo]+3*(1-kx)*Math.pow(kx,2)*ke[jo]+Math.pow(kx,3)*kd[jo]};var kv=6*ki[jo]-12*kg[jo]+6*ke[jo];var kw=-3*ki[jo]+9*kg[jo]-9*ke[jo]+3*kd[jo];var ku=3*kg[jo]-3*ki[jo];if(kw==0){if(kv==0){continue}var ko=-ku/kv;if(0=0){kc=kc+1}else{kc=1+kc}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("+kc+")"}if(!this.isReDraw){this._refresh(e)}}};fg.prototype._refresh=function(e){e.textureCoord=e.textureCoordGLMap=null;var i=new fJ("onstatus_change");i.overlay=e;i.action="setIcon";i.imageUrlChanged=true;setTimeout(function(){e.fire(i)},100)};fg.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}};fg.prototype.getCurrentImageUrl=function(){return this.id};fg.prototype.getRenderData=function(){this._renderData=this.generateRenderData();return this._renderData};fg.prototype.toString=function(){return"Symbol"};var fw={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 b6={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 dK(i,e){fg.call(this);e=e||{};this.style={anchor:e.anchor||new i0(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 i0(0,0);this.anchor=new i0(0,0);this._rawPath=i;this._buildPath(true)}dK.inherits(fg,"SVGSymbol");dK.generateKey=function(kc,i){if(!kc){return null}if(parseInt(kc)){kc=parseInt(kc)}if(typeof kc==="number"){if(!fw[kc]&&![0,1,2,0,4][kc]){return null}}var e={anchor:i.anchor||new i0(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:kc,style:e});return"symbol_svg_icon_"+T};eX.extend(dK.prototype,{_buildPath:function(kn){var kh=this;var kj=kh._rawPath;if(parseInt(kj)){kj=parseInt(kj)}if(fw[kj]){kj=fw[kj]}kh.id=dK.generateKey(kj,kh.style);if(!kh.id){return}switch(kj){case b6.BMap_Symbol_SHAPE_CIRCLE:var kk=kh._calSize(2),ki=kk,ks=kh.style.scale,kd=kh._anchor;this.size=new i0(kk,ki);this.anchor=new i0(kk/2+kd.width*ks,ki/2+kd.height*ks);kh.path=b6.BMap_Symbol_SHAPE_CIRCLE;break;case b6.BMap_Symbol_SHAPE_RECTANGLE:var kk=kh._calSize(4),ki=kh._calSize(2),kd=kh._anchor,kp=kh.style.strokeWeight!==undefined?kh.style.strokeWeight:kh.style.scale,ks=kh.style.scale;this.size=new i0(kk,ki);this._originOffset=new i0(Math.floor(-kp/2),Math.floor(-kp/2));this.anchor=new i0(kk/2+kd.width*ks,ki/2+kd.height*ks);kh.path=b6.BMap_Symbol_SHAPE_RECTANGLE;break;case b6.BMap_Symbol_SHAPE_STAR:var kk=kh._calSize(20),ki=kk,kd=kh._anchor,ks=kh.style.scale;this.size=new i0(kk,ki);this.anchor=new i0(kk/2+kd.width*ks,ki/2+kd.height*ks);kh.path=b6.BMap_Symbol_SHAPE_STAR;break;default:var kj=new dI(kj),kc=kj.bounds(),km=kh.style.rotation*Math.PI/180,kp=kh.style.strokeWeight!==undefined?kh.style.strokeWeight:kh.style.scale,ks=kh.style.scale,kd=kh._anchor;var kr=new i0(Math.floor(kc.x1*ks-kp/2),Math.floor(kc.y1*ks-kp/2)),e={topleft:new fi(Math.floor(kc.x1*ks-kp/2)-ks*kd.width,Math.floor(kc.y1*ks-kp/2)-ks*kd.height),bottomleft:new fi(Math.floor(kc.x1*ks-kp/2)-ks*kd.width,Math.ceil(kc.y2*ks-kp/2)-ks*kd.height),topright:new fi(Math.ceil(kc.x2*ks+kp/2)-ks*kd.width,Math.floor(kc.y1*ks-kp/2)-ks*kd.height),bottomright:new fi(Math.ceil(kc.x2*ks+kp/2)-ks*kd.width,Math.ceil(kc.y2*ks+kp/2)-ks*kd.height)},i={},kq=[],kg=[];var ko=e.topleft.x===0?0:Math.atan(e.topleft.y/e.topleft.x),T=ko+km;for(var kl in e){var kf=Math.cos(km)*e[kl].x-Math.sin(km)*e[kl].y,ke=Math.sin(km)*e[kl].x+Math.cos(km)*e[kl].y;i[kl]=new fi(kf,ke);kq.push(kf);kg.push(ke)}xmax=Math.max.apply(Math,kq),ymax=Math.max.apply(Math,kg),xmin=Math.min.apply(Math,kq),ymin=Math.min.apply(Math,kg);this.size=new i0(Math.ceil(xmax-xmin),Math.ceil(ymax-ymin));this.anchor=new i0(-xmin,-ymin);this._originOffset=new i0(xmin-i.topleft.x,ymin-i.topleft.y);this._innerOffset=new fi(kr.width,kr.height);this._rotationAngle=km;kh.path=kj;break}this.imageSize=new i0(this.size.width,this.size.height);this.offset=this.anchor;if(kn){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 ki=this,kc=this.style.scale,kj,kk=this.size;if(this.context){kj=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}kj.clearRect(0,0,this.size.width*2,this.size.height*2);kj.fillStyle=hB.convert2rgba(ki.style.fillColor,ki.style.fillOpacity);kj.strokeStyle=hB.convert2rgba(ki.style.strokeColor,ki.style.strokeOpacity);kj.save()}else{return false}kj.scale(2,2);kj.lineCap="round";kj.lineJoin="round";kj.lineWidth=ki.style.strokeWeight||kc;if(ki._originOffset){kj.translate(-ki._originOffset.width,-ki._originOffset.height)}if(ki._rotationAngle){kj.rotate(ki._rotationAngle)}if(ki._innerOffset){kj.translate(-ki._innerOffset.x,-ki._innerOffset.y)}switch(ki.path){case b6.BMap_Symbol_SHAPE_CIRCLE:kj.arc(kk.width/2,kk.height/2,kc,0,2*Math.PI);break;case b6.BMap_Symbol_SHAPE_RECTANGLE:kj.rect(0,0,4*kc,2*kc);break;case b6.BMap_Symbol_SHAPE_STAR:kj.beginPath();var ke=kk.width/2,kg=kc*10;var kd=(2*Math.PI)/10;for(var kf=11;kf!=0;kf--){var e=kg*(kf%2+1)/2;var kh=kd*kf;kj.lineTo((e*Math.sin(kh))+ke,(e*Math.cos(kh))+ke)}kj.closePath();break;default:kj.lineWidth=kj.lineWidth/kc;kj.scale(kc,kc);ki.path.draw(kj)}kj.fill();kj.stroke();kj.restore();this.data=kj.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=hB.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()}});bx.SymbolShapeType=b6;function jt(ke,kc,T){if(!ke||!kc){return}this.imageUrl=null;this.imageDom=null;if(typeof ke==="string"){this.imageUrl=ke}else{this.imageDom=ke;if(!this.imageDom.id){this.imageDom.id=bx.getGUID("icon_dom_")}}this.size=kc;var kd=new i0(Math.floor(kc.width/2),Math.floor(kc.height/2));var i={offset:kd,imageOffset:new i0(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)}jt.prototype.setImageUrl=function(e){if(!e){return}this.imageUrl=e;this._renderData=null};jt.prototype.getCurrentImageUrl=function(){if(window.devicePixelRatio>1&&this.srcSetObject["2x"]){return this.srcSetObject["2x"]}return this.imageUrl};jt.prototype.setPrintImageUrl=function(e){if(!e){return}this.printImageUrl=e};jt.prototype.setSize=function(e){if(!e){return}this.size=new i0(e.width,e.height);this._renderData=null};jt.prototype.setOffset=function(e){if(!e){return}this.anchor=this.offset=new i0(e.width,e.height);this._renderData=null};jt.prototype.setAnchor=function(e){this.setOffset(e)};jt.prototype.setImageOffset=function(e){if(!e){return}this.imageOffset=new i0(e.width,e.height);this._renderData=null};jt.prototype.setInfoWindowOffset=function(e){if(!e){return}this.infoWindowOffset=new i0(e.width,e.height)};jt.prototype.setImageSize=function(e){if(!e){return}this.imageSize=new i0(e.width,e.height)};jt.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};jt.prototype.toString=function(){return"Icon"};jt.prototype.generateRenderData=function(ke){var T=this.offset;var e=this.size;var kg=this.imageOffset;var kf=[];kf.push(-T.width,T.height-e.height,0);kf.push(e.width-T.width,T.height-e.height,0);kf.push(e.width-T.width,T.height,0);kf.push(-T.width,T.height-e.height,0);kf.push(e.width-T.width,T.height,0);kf.push(-T.width,T.height,0);if(ke!==0){for(var kd=0;kd730){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=B.imgPath;this.overlay=null;var e=this;g2.load("infowindow",function(){e._draw()})}d2.inherits(eX.BaseClass,"InfoWindow");eX.extend(d2.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(){eX.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=i9.convertMC2LL(e);return eG(i)}return i9.convertMC2LL(e)},getOffset:function(){return this._config.offset},dispose:function(){eX.BaseClass.prototype.decontrol.call(this)},toString:function(){return"InfoWindow"}});hK.prototype.openInfoWindow=function(T,e){T.latLng=new cr(e.lat,e.lng);var i=i9.convertLL2MC(e);this.openInfoWindowIn(T,i)};hK.prototype.closeInfoWindow=function(){var e=this.temp.infoWin||this.temp._infoWin;if(e&&e.overlay){e.overlay.closeInfoWindow()}};hK.prototype.openInfoWindowIn=function(kc,e){if(!kc||kc.toString()!=="InfoWindow"||!e||e.toString()!=="Point"){return}var i=this.temp;if(!i.marker){var T=new jt(B.imgPath+"blank.gif",{width:1,height:1});i.marker=new jP(e,{icon:T,width:1,height:1,offset:new i0(0,0),infoWindowOffset:new i0(0,0),clickable:false});i.marker._fromMap=1}else{i.marker.setPoint(e)}this.addOverlay(i.marker);i.marker.show();i.marker.openInfoWindow(kc)};eA.prototype.openInfoWindow=function(e){if(this.map){this.map.closeInfoWindow();e._visible=true;this.map.temp._infoWin=e;e.overlay=this;eX.BaseClass.call(e,e.hashCode)}};eA.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 bd(T,i){eA.call(this);this.content=T;this.map=null;this.domElement=null;this._config={width:0,offset:new i0(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;var e=this;g2.load("marker",function(){e._draw()})}bd.inherits(eA,"Label");eX.extend(bd.prototype,{setPoint:function(e){if(e&&e.toString()==="Point"&&!this.getMarker()){if(this.coordType===BMAP_COORD_GCJ02){var i=iu(e,3);this.point=this._config.point=new cx(i.lng,i.lat)}else{this.point=this._config.point=new cx(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 i0(e.width,e.height)},getOffset:function(){return this._config.offset},setStyle:function(e){e=e||{};this._config.styles=eX.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 hR(T,i){var kc={};for(var e in i){if(i.hasOwnProperty(e)){if(e==="position"){kc.point=i9.convertLL2MC(i[e]);this.latLng=new cr(i[e]["lat"],i[e]["lng"])}else{kc[e]=i[e]}}}bd.call(this,T,kc)}hR.inherits(bd,"LabelOut");eX.extend(hR.prototype,{toString:function(){return"Label"},setPosition:function(e){this.latLng=new cr(e.lat,e.lng);var i=i9.convertLL2MC(e);this.setPoint(i)},getPosition:function(){return this.latLng}});window.BMAP_ANIMATION_DROP=1;window.BMAP_ANIMATION_BOUNCE=2;function jP(e,i){eA.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 i0(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._isDragging=false;var T=this;g2.load("marker",function(){T._draw()})}jP.TOP_ZINDEX=aR.getZIndex(-90)+1000000;jP.DRAG_ZINDEX=jP.TOP_ZINDEX+1000000;jP._injectMethond=function(e){eX.extend(jP.prototype,e)};jP.inherits(eA,"Marker");eX.extend(jP.prototype,{toString:function(){return"Marker"},setOptions:function(e){this.setConfig(e);if(!e.icon){this._config.icon=new jt(B.imgPath+"marker_red.png",new i0(23,25),{offset:new i0(10,25),infoWindowOffset:new i0(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 bd)){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=iu(e,3);this.point=this._config.point=new cx(i.lng,i.lat);this.latLng=i9.convertMC2LL(i)}else{this.point=this._config.point=new cx(e.lng,e.lat);this.latLng=i9.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 cr(e.lat,e.lng);var i=i9.convertLL2MC(e);jP.call(this,i,T)}s.inherits(jP,"MarkerOut");eX.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 gw();var ke=e.readFeaturesFromObject(T)||[];for(var kc=0,kd=ke.length;kc1||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 kc=i.getCurrentImageUrl()!==e;this._config.icon=i;this.textureCoord=this.textureCoordGLMap=null;this.draw();var T=new fJ("onstatus_change");T.overlay=this;T.action="setIcon";T.imageUrlChanged=kc;this.fire(T)}},getIcon:function(){return this._config.icon},setPosition:function(e){this.latLng=new cr(e.lat,e.lng);var i=i9.convertLL2MC(e);this.setPositionIn(i)},getPosition:function(){var e=this.getPositionIn();return i9.convertMC2LL(e)}});function fT(T,e){iz.call(this,e);this._normalizedBounds=new hY();this.setPoints(T);var i=this;g2.load("poly",function(){i._draw()})}fT.inherits(iz,"Polyline");eX.extend(fT.prototype,{getBoundsIn:function(e){if(!e){this._bounds.setMinMax();return this._bounds}this._normalizedBounds.setMinMax();return this._normalizedBounds},setPoints:function(kf){this._clearCache();this.points=iz.getGraphPoints(kf).slice(0);if(this._config.geodesic===true){this.greatCirclePoints.length=0;for(var kd=0;kd15437726){if(ke.lng0){eX.each(e.greatCirclePoints,function(i){e._bounds.extend(i)})}else{eX.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<-hK.WORLD_SIZE_MC_HALF||e._normalizedBounds.ne.lng>hK.WORLD_SIZE_MC_HALF){e._normalizedBounds.sw.lng=-hK.WORLD_SIZE_MC_HALF;e._normalizedBounds.ne.lng=hK.WORLD_SIZE_MC_HALF}},calcGreatCirclePoints:function(kc,T){var ke=kc.latLng;var kd=T.latLng;if(ke.equals(kd)){return}var e=i9.getDistance(iB(ke.lng),iB(ke.lat),iB(kd.lng),iB(kd.lat));if(e<250000){return}var ki=Math.round(e/150000);var km=this.calcAngularDistance(ke,kd);this.greatCirclePoints.push(kc);var kl=ke.lng;var kk=kc;for(var kf=0;kf30037726){if(kj.lng30037726){if(T.lng0){eX.each(e.greatCirclePoints,function(i){e._bounds.extend(i)})}else{eX.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<-hK.WORLD_SIZE_MC_HALF||e._normalizedBounds.ne.lng>hK.WORLD_SIZE_MC_HALF){e._normalizedBounds.sw.lng=-hK.WORLD_SIZE_MC_HALF;e._normalizedBounds.ne.lng=hK.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(kc,ke){var T=[];for(var e=0;e0){eX.each(e.greatCirclePoints,function(i){e._bounds.extend(i)})}else{eX.each(e.points,function(i){eX.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<-hK.WORLD_SIZE_MC_HALF||e._normalizedBounds.ne.lng>hK.WORLD_SIZE_MC_HALF){e._normalizedBounds.sw.lng=-hK.WORLD_SIZE_MC_HALF;e._normalizedBounds.ne.lng=hK.WORLD_SIZE_MC_HALF}}});function hh(T,e){iz.call(this,e);e=e||{};if(typeof e.fillOpacity==="number"){this._config.fillOpacity=e.fillOpacity}else{this._config.fillOpacity=0.6}cb(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);var i=this;g2.load("poly",function(){i._draw()})}hh.inherits(iz,"Polygon");eX.extend(hh.prototype,{setPoints:function(ke){var kc=[];if(typeof ke==="string"||ke.length===1||ke[0] instanceof cx||ke[0] instanceof cr||this instanceof gW||ke.length===0){if(ke.length===1){ke=ke[0]}var e=this._processSinglePointArray(ke);this._userPoints=e.userPoints;kc=e.innerPoints;this.hasMultipleParts=false}else{this._userPoints=[];for(var kd=0;kd1&&!innerPoints[0].equals(innerPoints[innerPoints.length-1])){innerPoints.push(new cx(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 cx(e.lng,e.lat);this.points[i]=new cx(e.lng,e.lat);if(i===0&&!this.points[0].equals(this.points[this.points.length-1])){this.points[this.points.length-1]=new cx(e.lng,e.lat)}this._calcBounds()},setPositionAt:function(i,e){if(!this._userPoints[i]){return}var T=i9.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 iG(T,e){if(!T||T.length===0){return}var i=this.setPath(T,true);hh.call(this,i,e)}iG.inherits(hh,"PolygonOut");eX.extend(iG.prototype,{toString:function(){return"Polygon"},toGeoJSON:function(){var kd="Polygon";var ke=[];var kg=this.getPath();if(this.hasMultipleParts){kd="Multi"+kd;for(var kc=0;kc1&&!innerPoints[0].equals(innerPoints[innerPoints.length-1])){innerPoints.push(new cx(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 cx(e.lng,e.lat);this.points[i]=new cx(e.lng,e.lat);if(i===0&&!this.points[0].equals(this.points[this.points.length-1])){this.points[this.points.length-1]=new cx(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 fJ("onlineupdate");i.overlay=this;this.dispatchEvent(i)},getAltitude:function(){return this._config.altitude}});function br(kg,ke,kh){if(!kg||kg.length===0){return}this.userPath=kg;var e=[];if(typeof kg==="string"||kg[0] instanceof cx||kg[0] instanceof cr){var ki=this._processSinglePointArray(kg);for(var kd=0;kd1||e<0){return}this._config.opacity=e;this.doOnceDraw()},getOpacity:function(){return this._config.opacity},setImage:function(e,T){this._config.src=e;this._texture=null;var i=this;this.imageLoad&&this.imageLoad(this._config.src,function(kc,kd){if(kd){i._texture=kc;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(kc){if(!this._config.isPixelMap||!this.canPixelMap()){return null}if(!this.getImageMaskPixel(kc)){return null}if(this.imageObject){var T=Math.floor((kc.lng-this.points[3].lng)/this.lngMC);var e=Math.floor((-kc.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 kc=this._toOverlayPixelsGL([e]);var kh=this.maskOverlayPixels;var ke=kh[1][0]-kh[0][0];var kd=kh[1][1]-kh[0][1];var T=Math.floor((kc[0][0]-kh[0][0])/ke*this.imageMaskObject.width);var i=Math.floor((-kc[0][1]+kh[1][1])/kd*this.imageMaskObject.height);var kg=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 kf=this.imageMaskObject.data.data;if(kg+3>kf.length){return false}if(kf[kg+3]>0){if(this._config.maskData>-1&&this._config.maskData!==kf[kg]){return false}return true}return false},doOnceDraw:function(){var e=new fJ("onlineupdate");e.overlay=this;this.dispatchEvent(e)},destroy:function(){this.points=[];this.imageMaskObject=null}});function fY(kd,T){if(!kd){return}T=T||{};var ke=[];if(T.sysType==="fixed"){ke=kd}else{var kf=[new cx(kd.sw.lng,kd.ne.lat),new cx(kd.ne.lng,kd.ne.lat),new cx(kd.ne.lng,kd.sw.lat),new cx(kd.sw.lng,kd.sw.lat)];var e=iz.getGraphPoints(kf).slice(0);for(var kc=0;kc730){this._config.width=730}if(this._config.height!=0){if(this._config.height<50){this._config.height=50}if(this._config.height>650){this._config.height=650}}if(this._config.maxWidth!==0){if(this._config.maxWidth<50){this._config.maxWidth=50}if(this._config.maxWidth>730){this._config.maxWidth=730}}this.isWinMax=false;this.IMG_PATH=B.imgPath;this.overlay=null;var e=this;g2.load("simpleInfowindow",function(){e._draw()})}h1.inherits(eX.BaseClass,"SimpleInfoWindow");eX.extend(h1.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(){eX.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(){eX.BaseClass.prototype.decontrol.call(this)},toString:function(){return"SimpleInfoWindow"}});hK.prototype.openSimpleInfoWindow=function(kc,e){if(!kc||kc.toString()!="SimpleInfoWindow"||!e||e.toString()!="Point"){return}var i=this.temp;if(!i.marker){var T=new jt(B.imgPath+"blank.gif",{width:1,height:1});i.marker=new jP(e,{icon:T,width:1,height:1,offset:new i0(0,0),infoWindowOffset:new i0(0,0),clickable:false});i.marker._fromMap=1}else{i.marker.setPoint(e)}this.addOverlay(i.marker);i.marker.show();i.marker.openSimpleInfoWindow(kc)};hK.prototype.closeSimpleInfoWindow=function(){var e=this.temp.infoWin||this.temp._infoWin;if(e&&e.overlay){e.overlay.closeSimpleInfoWindow()}};eA.prototype.openSimpleInfoWindow=function(e){if(this.map){this.map.closeSimpleInfoWindow();e._visible=true;this.map.temp._infoWin=e;e.overlay=this;eX.BaseClass.call(e,e.hashCode)}};eA.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 cj(T,e){iz.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);var i=this;g2.load("poly",function(){i._draw()})}cj.inherits(iz,"MapMask");eX.extend(cj.prototype,{setPoints:function(i){var e=iz.getGraphPoints(i).slice(0);this.hasMultipleParts=false;iz.prototype.setPoints.call(this,e)},setPathIn:function(e){this.setPoints(e)},_processSinglePointArray:function(e){var i=iz.getGraphPoints(e).slice(0);innerPoints=i.slice(0);if(innerPoints.length>1&&!innerPoints[0].equals(innerPoints[innerPoints.length-1])){innerPoints.push(new cx(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 jY(ke,T){if(!ke||ke.length===0){return}var kd=[];if(ke[0] instanceof cx){var e=this._processSinglePointArray(ke);for(var kc=0;kc=ej[this.mapTypeName].webgl.minZoom){if(ej[this.mapTypeName].webgl){if(kg>=ej[this.mapTypeName].webgl.minZoom){this.minZoom=kg}else{this.minZoom=ej[this.mapTypeName].webgl.minZoom}}else{if(kg>=ej[this.mapTypeName].minZoom){this.minZoom=kg}else{this.minZoom=ej[this.mapTypeName].minZoom}}}if(typeof T==="number"){if(ej[this.mapTypeName].webgl){if(T<=ej[this.mapTypeName].webgl.maxZoom){this.maxZoom=T}else{this.maxZoom=ej[this.mapTypeName].webgl.maxZoom}}else{if(T<=ej[this.mapTypeName].maxZoom){this.maxZoom=T}else{this.maxZoom=ej[this.mapTypeName].maxZoom}}}if(this.maxZoomthis.maxZoom){return false}var ke=this.containsPoint(e,kd);if(ke){return ke}for(var T=0;Tthis.maxZoom){return kd}for(var T=0;T0){kj[kf.name]=kf;kj.push(kf.name)}var kn=kj.length-kl.bufferNumber;for(var ko=0;kn>0&&ko0&&this._transparentPng){this.img.src=B.imgPath+"blank.gif"}else{this.img.src=this.src}};hJ.prototype._callCbks=function(){var T=this;for(var e=0;e8);function jh(e){this.tileLayers=[];this.map=e;this.bufferNumber=300;this.mapTiles=[];this.bufferTiles=[];this.config=ej[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={}}bx.register(function(i){if(i._renderType==="webgl"){return}var e=i.tileMgr=new jh(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)})});eX.extend(jh.prototype,{addTileLayer:function(kc){var T=this;var i=kc.target;T.tileLayers.push(i);if(T.map.loaded){T.moveGridTiles()}},removeTileLayer:function(kj){var kk=this;var kh=kj.target;var kf=kh.mapType;var ke=kk.mapTiles;var km=kk.bufferTiles;for(var T in km){var kc=T.split("-")[1];if(kc==kf){delete km[T]}}for(var T in ke){var kc=T.split("-")[1];if(kc==kf){delete ke[T]}}if(kk.zoomsDiv&&kk.zoomsDiv.parentNode){kk.zoomsDiv.parentNode.removeChild(kk.zoomsDiv);kk.zoomsDiv.innerHTML=""}var kd=kk.map;if(kd.deepZoom){var kl=kd.deepZoom.preDeepZoomDiv;if(kl&&kl.parentNode){kl.parentNode.removeChild(kl)}}for(var ki=0,kg=kk.tileLayers.length;ki=1.5?2:1;this.normalUdt=jO("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}}hv.inherits(c8,"TileLayer");eX.extend(hv.prototype,{isTransparentPng:function(){return this.transparentPng},getTilesUrl:function(kj,e){var T=ej[this.mapType];if(typeof T!=="object"){return null}var kc=kj.x;var kk=kj.y;if(this.mapType!==BMAP_SATELLITE_MAP){var kk=e0.calcLoopParam(kk,e).col}var i="";if(this.opts.tileUrlTemplate){i=this.opts.tileUrlTemplate;i=i.replace(/\{X\}/,kk);i=i.replace(/\{Y\}/,kc);i=i.replace(/\{Z\}/,e)}else{if(this.mapType===BMAPGL_NORMAL_MAP){var ki=this.isCanvasMap?0:1;var ke=T.tileUrls[Math.abs(kk+kc)%T.tileUrls.length];if(window.offLineIPAddress){ke=window.offLineIPAddress+"tile5/"}var kd=this.map.config.style;i=ke+"?qt=vtile&x="+kc+"&y="+kk+"&z="+e+(kd==="default"?"":("&styleId=1"))+"&styles=pl&udt="+this.normalUdt+"&scaler="+this.scaler+"&showtext="+ki;i=i.replace(/-(\d+)/gi,"M$1")}if(this.mapType===BMAP_SATELLITE_MAP){var kf=jO("ditu","satellite");var kh=kf.ver;var kg=kf.udt;i=T.tileUrls[Math.abs(kk+kc)%T.tileUrls.length]+"u=x="+kc+";y="+kk+";z="+e+";v="+kh+";type=sate&fm=46&udt="+kg;i=i.replace(/-(\d+)/gi,"M$1")}}return i},initialize:function(kf){this.map=kf;if(kf._renderType==="webgl"){var ke=null;if(this.customLayer!==false){ke=this.getTilesUrl}eX.extend(this,fe);this.labelProcessor=new jb(this);this.callbackDataQueue=[];if(ke){this.getTilesUrl=ke}var T=this;kf.on("indoor_data_refresh",function(kg){if(!T.baseLayer){return}T._refreshIndoorData(kg.uid,kg.floor)});kf.on("custom_labels_ready",function(kg){if(!T.baseLayer&&kg.model==="custom"){return}if((kg.model==="custom"&&T.drawIndex===0)||kg.model==="mvt_"+T.drawIndex){T._doWorkAfterLabelImageLoad(kg.virtualTile,kg.labelCanvas,null,kg.imgKey)}});kf.on("glmoduleloaded",function(){if(!T.baseLayer){return}T.updateAllIconsTextureCoords()});kf.on("layer_update",function(kh){if(T.dataType===2&&kf.customLoaded){T.clearCache();var kg=new fJ("onlayer_clear");kf.fire(kg)}});if(this.ontology&&this.ontology._initEvent){this.ontology._initEvent(kf)}}if(!kf.temp.layerZIndex){kf.temp.layerZIndex=0}this.zIndex=this.zIndex||1;if(kf.getRenderType()==="dom"){this.zIndex=kf.tileMgr.tileLayers.length}else{if(this.baseLayer){this.zIndex=0}else{if(this.zIndex>0){this.adjustZIndex()}else{var e=kf._featureMgr.result.bkData;this.zIndex=e.length||1}}}if(!kf.temp.layid){kf.temp.layid=0}if(!this.opts.mapType){this.mapType="BMAP_CUSTOM_LAYER_"+kf.temp.layid;kf.temp.layid++}else{this.mapType=this.opts.mapType}var kc=ej[this.mapType];if(!kc){ej[this.mapType]={tileUrls:[],tileSize:256,baseUnits:256,zoomLevelMin:1,zoomLevelMax:19,minZoom:3,maxZoom:19,minDataZoom:3,maxDataZoom:19,zoomLevelBase:18,errorUrl:B.imgPath+"/blank.gif",bounds:new hY(new cx(-21364736,-10616832),new cx(23855104,15859712)),imgExtend:"png"}}if(kf._renderType!=="webgl"){var kd=bJ(kf.platform,'
');kd.style.display="";kd.style.left=Math.ceil(-kf.offsetX+kf.width/2)+"px";kd.style.top=Math.ceil(-kf.offsetY+kf.height/2)+"px";this.tilesDiv=kd}this.isCanvasMap=kf.isCanvasMap();this.lastZoom=kf.getZoom();var i=this;this.addEventListener("initDrawData",function(kg){if(i.opts.boundary){i.addBoundary(i.opts.boundary)}});kf.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(kd){var T=this.zIndex;if(this.map&&this.map._featureMgr){var e=this.map._featureMgr.result.bkData;if(kd==="up"){for(var kc=this.zIndex+1;kc0;kc--){if(e[kc]){T=kc;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 e0.calcLoopParam(e,i)},addBoundary:function(ke){if(!ke||!this.map){return}if(typeof ke==="string"){ke=[ke]}for(var kc=0;kc-1;kd--){var ke={};T=kc.children[kd].style;ke.top=parseInt(T.top,10);ke.left=parseInt(T.left,10);this._zoomAniInfo[kd]=ke}},prepareLabelLayer:function(){var kd=this._map;if(this._enableCanvas2dMap&&kd.canvas2dMapMgr){if(this.touchZoomLabelCanvas){this.touchZoomLabelCanvas.parentNode.removeChild(this.touchZoomLabelCanvas)}var i=kd.canvas2dMapMgr._labelCanvas;this.touchZoomLabelCanvas=i.cloneNode(false);var e=this.touchZoomLabelCanvas.getContext("2d");e.drawImage(i,0,0);kd.platform.insertBefore(this.touchZoomLabelCanvas,kd.platform.firstChild);var kc=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-(kd.offsetX+kc))+"px "+(this._fixPosition.y-(kd.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 kc=this._map;if(kc.getRenderType()==="dom"){if(kc.overlayDiv){kc.overlayDiv.style.visibility="hidden"}if(kc.overlayDivEx){kc.overlayDivEx.style.visibility="hidden"}}var ke=kc.tileMgr.tileLayers;var kd;for(var T=0,e=ke.length;T-1;kl--){var kj=this._zoomAniInfo[kl];kk=kc.children[kl].style;var kd=kj.left-kg.x;var T=kj.top-kg.y;kj.dx=kd*e-kd;kj.dy=T*e-T;kj.preDx=kd-kd;kj.preDy=T-T;ks=kj.preDx+(kj.dx-kj.preDx);kh=kj.preDy+(kj.dy-kj.preDy)+ki;kk.left=kj.left+ks+"px";kk.top=kj.top+kh+"px";kk.width=kk.height=256*e+"px"}if(this._enableCanvas2dMap){var kr=!kq._isIE9?"translate3d(0px, "+ki+"px, 0) scale("+e+")":"translate(0px, "+ki+"px) scale("+e+")";this.touchZoomLabelCanvas.style[kn]=kr}},setZoomFinish:function(){this._animationDiv=null},startAnimation:function(kf){this.prepareLayer();this.hideNonAnimationLayers();var ky=this._map;if(this.touchZoomLabelCanvas){this.touchZoomLabelCanvas.style.display="none"}kf=kf||{};var kw=kf.zoomCount||0;var kk=kf.fixPosition;var ku=kf.fixMCPosition;var ki=kf.pixOffset;this._zoomCount=kw;var kc=ky.getZoom();var kx=kc+kw;var e=ky.config.enableContinuousZoom;var ko=0.5;var kj=5;var T=Math.pow(2,kw);var kA=this._baseLayerDiv;var kl={x:kk.x-parseInt(kA.style.left,10)-ky.offsetX,y:kk.y-parseInt(kA.style.top,10)-ky.offsetY};var kg=this._animationDiv;var ks=kg.children.length;var kC=this._preZoomTimes;var kv=[];var kt=this._transformStyleName;var kh=this._transformOriginStyleName;for(var kr=ks-1;kr>-1;kr--){var kp={};var kq=kg.children[kr].style;kp.top=parseInt(kq.top,10);kp.left=parseInt(kq.left,10);var ke=kp.left-kl.x;var kd=kp.top-kl.y;kp.dx=ke*T-ke;kp.dy=kd*T-kd;kp.preDx=ke*kC-ke;kp.preDy=kd*kC-kd;kv[kr]=kp}var kz=this;var kn;var kB;var km;this._zoomAni=new fy({fps:60,duration:e?500:1,transition:function(i){i=i*kj/(2*ko);return kj*i-ko*i*i},render:function(kL){kL=kL*(4*ko)/(kj*kj);kn=kC+kL*(T-kC);var kE=kc+p(kn);var kJ=null;var kI=0;var kM=0;if(kf.onAnimationBeforeLooping){var kN=kf.onAnimationBeforeLooping(kL,kE);kJ=kN.loopingCenter;kI=kN.yDiff;kM=kN.totalYDiff}for(var kF=kv.length-1;kF>-1;kF--){var kG=kv[kF];if(kg.children[kF]){var kK=kg.children[kF].style;kB=kG.preDx+(kG.dx-kG.preDx)*kL-ki.width*kL;km=kG.preDy+(kG.dy-kG.preDy)*kL-ki.height*kL+kI;kK.left=kG.left+kB+"px";kK.top=kG.top+km+"px";kK.height=kK.width=256*kn+"px"}}var kD=ki.width*kL;var kH=ki.height*kL;if(ky.isRestrict){kz._enableCanvas2dMap&&kz._canvas2dMapMgr.clearLabel()}else{kz._enableCanvas2dMap&&kz._canvas2dMapMgr.drawLabel(kn,kk,kc,kx,kw,kL,kD,kH,kM,kI)}kz._preZoomTimes=kn;kz._preRenderTick=kL;kf.onAnimationLooping&&kf.onAnimationLooping(kL,kE,kJ)},finish:function(){kz._preZoomTimes=1;kz._zoomAni=null;kz._animationDiv=null;kf.onAnimationFinish&&kf.onAnimationFinish();kz.showNonAnimationLayers()}});return this._zoomAni},stopAnimation:function(){if(this._zoomAni){this._zoomAni.stop();this._zoomAni=null}}});function j9(e){this._initVars(e);this._initColorCanvas();this._bindEvent(e)}eX.extend(j9.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=bX("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(kp){var ko=kp.textImg;var T=kp.textPos;var km=this.ratio;var kk=this.sizeRatio/km;var kd=this._colorCtx;var kh=this._colorCvsSize;kd.clearRect(0,0,kh,kh);var kj=0;var e=0;var kg=0;for(var ki=0;kikj){kj=T[ki].width;e=ki;kg=T[ki].drawX}}kj/=kk;var kl=0;for(var ki=0,kf=T.length;kikj){kj=kn.width/kk}kl+=kn.height/kk+2*km}var kc=kd.getImageData(0,0,kj,kl);var ke=kd.getImageData(0,0,kj,kl);return[kc,ke]},_bindEvent:function(i){var e=this,T=i._map;T.addEventListener("onspotmouseover",function(kf){if(!this.isCanvasMap()||!this.temp.isPermitSpotOver){return}if(kf.spots.length>0){var ke=kf.spots[0].userdata.uid;var kd=kf.spots[0].userdata.name;var kc=e.findLabelByUid(ke,kd);kc&&e._toHighLightColor(kc)}});T.addEventListener("onspotmouseout",function(kf){if(!this.isCanvasMap()||!this.temp.isPermitSpotOver){return}if(kf.spots.length>0){var ke=kf.spots[0].userdata.uid;var kd=kf.spots[0].userdata.name;var kc=e.findLabelByUid(ke,kd);kc&&e._toDefaultColor(kc)}});T.addEventListener("onspotclick",function(kf){if(!this.isCanvasMap()||!this.temp.isPermitSpotOver){return}if(kf.spots&&kf.spots.length>0){var ke=kf.spots[0].userdata.uid;var kd=kf.spots[0].userdata.name;var kc=e.findLabelByUid(ke,kd);kc&&e._changeBaseMapState(kc)}else{e._recoverNormalState()}});T.on("spot_status_reset",function(){e._recoverNormalState()});T.on("spot_highlight",function(kd){var kc=e.findLabelByUid(kd.uid);kc&&e._changeBaseMapState(kc)})},_getTextBound:function(kn){if(!kn.textPos){return null}var kl=this.ratio;var kj=this.sizeRatio/kl;var T=kn.textPos;var km=kn.baseDrawX;var kk=kn.baseDrawY;var kh=km*kl+(T[0].drawX-km)/kj;var kf=kk*kl+(T[0].drawY-kk)/kj;var kd=kh+T[0].width/kj;var e=kf+T[0].height/kj;for(var ki=0,kg=T.length;kikd){kd=ke+ko.width}if(kc+ko.height>e){e=kc+ko.height}}return[kh,kf,kd,e]},_toHighLightColor:function(T){if(T._tempRank&&T._tempRank==this.RANK5){return}var kg=this._getTextBound(T);if(!kg){return}var kc=Math.round(kg[0]);var i=Math.round(kg[1]);var e=this.getLabelImageData(T);var ke=e[0];var kd=e[1];var kf=this._canvas2dMapMgr.getFilterImageData(ke,this.RANK5);T._oldImgData=kd;this._labelCtx.putImageData(kf,kc,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(kc){var T=this._canvas2dMapMgr;var i=kc.guid;var e=kc.guidExt;var kd={guid:i,name:kc.name,guidExt:e};T._labelStrategy.setStrategyInfo(kd);T._loadData()},_recoverNormalState:function(){var e=this._canvas2dMapMgr;e._labelStrategy.setStrategyInfo(null);e._loadData()},findLabelByUid:function(ke,kc){var kg=this._canvas2dMapMgr,e=kg._computedLabel;for(var kd=0,T=e.length;kdlg){lg=lj.drawX+lj.width}if(lj.drawY+lj.height>lf){lf=lj.drawY+lj.height}}}}}else{kk.tileX=kc;kk.tileY=T;kr=kc+kk.minXOriginal;kp=T+kk.minYOriginal;lg=kc+kk.maxXOriginal;lf=T+kk.maxYOriginal}if(kr!=undefined){var k8=k5+(kr-k5)/kY;var k7=k4+(kp-k4)/kY;var kK=k5+(lg-k5)/kY;var kI=k4+(lf-k4)/kY;kk.minX=k8;kk.minY=k7;kk.maxX=kK;kk.maxY=kI;var lc=(k8+kK)/2,lb=(k7+kI)/2,kT=kq+(lc-k9/2)*ku,kR=ko+(kS/2-lb)*ku;kk.geoX=kT;kk.geoY=kR;kM.push(kk)}}}if(lo){for(var kJ=0,kF=lo.length;kJlg){lg=kz+la.width}if(kn+la.height>lf){lf=kn+la.height}if(kt.length===2){var ky=kt[1];var kw=k5+ky.destX;var km=k4+ky.destY;if(kmlg){lg=kw+ky.width}if(km+ky.height>lf){lf=km+ky.height}}k1._tempBounds=[kr,kp,lg,lf];var kQ=kl.iconPos;var kf=kQ.geoX;var kd=kQ.geoY;var k5=(kf-kq)/ku+k9/2;var k4=(ko-kd)/ku+kS/2;var kr=k5+kQ.destX;var kp=k4+kQ.destY;var lg=kr+kQ.width;var lf=kp+kQ.height;kl.textPos=kl.textPos||kl._textPos;var kt=kl.textPos;var la=kt[0];var kz=k5+la.destX;var kn=k4+la.destY;if(kzlf){lf=kn+la.height}if(kt.length===2){var ky=kt[1];var kw=k5+ky.destX;var km=k4+ky.destY;if(kwlf){lf=km+ky.height}}kl._tempBounds=[kr,kp,lg,lf]}for(var kJ=0,kF=lo.length;kJlm[2]||lh[3]lm[3])){ks++;if(kN.textPos){kN._textPos=kN.textPos;delete kN.textPos}}var lm=ln._tempBounds;if(!(lh[2]lm[2]||lh[3]lm[3])){ks++;if(ln.textPos){ln._textPos=ln.textPos;delete ln.textPos}}if(ks>=2){if(ld.textPos){ld._textPos=ld.textPos;delete ld.textPos}}}}for(var kJ=0,kF=lo.length;kJlg){lg=la.drawX+la.width}if(la.drawY+la.height>lf){lf=la.drawY+la.height}if(kt.length===2){var ky=kt[1];ky.drawX=k5+ky.destX;ky.drawY=k4+ky.destY;if(ky.drawXlg){lg=ky.drawX+ky.width}if(ky.drawY+ky.height>lf){lf=ky.drawY+ky.height}}}var k8=k5+(kr-k5)/kY;var k7=k4+(kp-k4)/kY;var kK=k5+(lg-k5)/kY;var kI=k4+(lf-k4)/kY;kO.minX=k8;kO.minY=k7;kO.maxX=kK;kO.maxY=kI;var k0=(k8+kK)/2;var kZ=(k7+kI)/2;var kg=kq+(k0-k9/2)*ku;var ke=ko+(kS/2-kZ)*ku;kO.geoX=kg;kO.geoY=ke;kM.push(kO)}}var k2=this._strategyInfo;if(k2){var kL=k2.guid;var kU=k2.name;var kB=k2.guidExt;for(var kJ=0,kF=kM.length;kJkP.maxX-kH||ld.maxY-kHkP.maxY-kH)){ld.arrIntersectIndex.push(kG)}}}for(var kJ=0,kF=kM.length;kJkh){var T=kf.splice(0,ke);for(var ki=0,kg=T.length;ki0){this.isDrawText=true}},_loadLabelData:function(kl,kk,kj,T,km,e){var ke=kl.toString();var kc=kk.toString();var kg="cbk_"+ke.replace("-","_")+"_"+kc.replace("-","__")+"_"+Math.floor(kj);var kq=fs+"."+kg;var kp=this._labelDataUrls;var ki=Math.abs(kl+kk)%kp.length;var kv=kp[ki];if(window.offLineIPAddress){kv=window.offLineIPAddress+"pvd/"}var i=this.labelStyleParam;var ko="?qt=vtile";var kr="";if(this._map.config.style!=="default"){kr="&styleId=1"}var kn="x={x}&y={y}&z={z}&udt={udt}&v={v}&styles={styles}"+kr+"&textonly=1&textimg=1&scaler={scaler}&fn="+encodeURIComponent(kq);var ks=e0.calcLoopParam(kl,kj).col;var kh=this.ratio>1?2:1;var kf=kn.replace(/{x}/,ks).replace(/{y}/,kk).replace(/{z}/,Math.floor(kj)).replace(/{styles}/,i).replace(/{udt}/,this._udt).replace(/{v}/,this._version).replace(/{scaler}/,kh);var kd=kv+ko+"¶m="+window.encodeURIComponent(eT(kf));var ku=this;var kt=ku._map;bx[kg]=function(kw){ku._vectorDrawLib.parseLabelData(kw,kl,kk,kj,T,km,function(kB){var ky=kt.getCenterIn();var kC=kt.getZoom();var kE="viewKey_"+Math.floor(ky.lng)+"_"+Math.floor(ky.lat)+"_"+kC;ku._labelCount--;var kF=ku._getCache(kl,kk,kj,T).updateLabelCounter;ku._labelCount-=kF;var kz=ku._curViewLabels;if(kE===e||(ku._labelCount<0&&kC===kj)){kz.push(kB)}if(kE===e){ku.statResponseCount++}if(ku._labelCount<=0){var kx=(new Date()).getTime();ku.updateLabel();var kA=(new Date()).getTime();var kD=new fJ("oncanvasmaploaded");kD.drawTime=kA-kx;if(ku.statResponseCount===ku.statRequestCount){kD.isAllLoadedDrawing=true}kt.dispatchEvent(kD)}ku._setCacheValue(kl,kk,kj,T,kB);delete bx[kg]})};gM.load(kd)},drawLabel:function(T,kc,kj,i,kh,kd,e,ke,ki,kf){var kg=this;if(!kg._computedLabel){return}if(kg._computedLabel._zoom!==kj){kg.clearLabel();return}kg._map.temp.isPermitSpotOver=false;kg.clearLabel();kg._vectorDrawLib.zoomingIconAndText(this._labelCtx,kg._computedLabel,T,kc,i,kh,kd,e,ke,ki,kf)},_addSpotData:function(){this._spotData=[];var kj=this._map.getZoom();for(var ke=0,kd=this._computedLabel.length;kekj)){continue}var kf=[];kf[0]=(kg.minX-kg.maxX)/2;kf[1]=(kg.minY-kg.maxY)/2;kf[2]=(kg.maxX-kg.minX)/2;kf[3]=(kg.maxY-kg.minY)/2;var kc=null;if(kg.iconPos){kc=new cx(kg.iconPos.geoX,kg.iconPos.geoY)}var T=kg.name?kg.name.replace("\\\\","
"):"";if(kg.iconPos&&kg.iconPos.iconType.indexOf("ditie")>-1&&this._map.getZoom()>14){T=""}var ki={n:T,pt:new cx(kg.geoX,kg.geoY),userdata:{iconPoint:kc,uid:kg.guid,name:T,type:kg.iconPos?kg.iconPos.iconType:"",iconImg:kg.iconImg,mapPoi:true,adver_log:kg.adver_log||""},bd:kf,tag:"MAP_SPOT_INFO"};this._spotData.push(ki)}var kh=new fJ("onspotsdataready");kh.spots=this._spotData;this._map._spotDataOnCanvas=this._spotData;this._map.dispatchEvent(kh)},isClickableLabel:function(e){if(e.isDel||(!e.guid&&!e.name)){return false}return true},getFilterImageData:function(T,kf){var kg=T.data,ke=this._labelStrategy,kf=parseInt(kf);for(var kh=0,kd=kg.length;kh0&&!kk){continue}var ko=Math.round(kx[0]/100);var kn=Math.round(kx[1]/100);var kA={lng:ku+ko,lat:kt-(kr*kh-kn)};var kf=ko/kh;var ke=kr-kn/kh;var ks=kx[7]||"";var kF=kx[5];var kv={type:"fixed",name:ks,textImg:kq,rank:kx[4],baseX:kf,baseY:ke,iconPos:null,textPos:null,guid:kx[3]||"",tracer:kB,direction:kF,startScale:3};if((kF!==i5&&kk||!kk)&&kE!==null){kv.iconPos=this._getIconPosition(kE,kj,kf,ke,kA);if(kv.iconPos){T=kv.iconPos.width;kp=kv.iconPos.height}}if(T===0){kv.direction=i5}if(kk){kv.textPos=this._getTextDrawData(kx,kf,ke,T,kp)}if(kv.textPos||kv.iconPos){kw.push(kv)}}}},_isVisible:function(e,i){var kc;if(!this._binaryCache[e]){kc=e.toString(2);if(kc.length<8){kc=new Array(8-kc.length+1).join("0")+kc}this._binaryCache[e]=kc}kc=this._binaryCache[e];var T=fh[i].start;return kc[i-T]==="1"},_getIconPosition:function(kg,ke,T,i,e){var kc=this._map.config.style;var kh=bx["iconSetInfo"+kc][kg];if(!kh){if(kg.charCodeAt(0)>=48&&kg.charCodeAt(0)<=57){kh=bx["iconSetInfo"+kc]["_"+kg]}}if(!kh){return null}var kd=kh[0];var kf=kh[1];kd=kd*ke;kf=kf*ke;return{srcX:0,srcY:0,destX:T-kd/2,destY:i-kf/2,width:kd,height:kf,geoX:e.lng,geoY:e.lat,mcPt:e,iconType:kg}},_getTextDrawData:function(kn,km,kl,kc,kj){var ks=kn[5];if(typeof ks!=="number"){ks=0}var kh=this.ratio;var kg=kh/2;kc*=kg;kj*=kg;var ki=kn[12];var kd=ki.length;var kv=0;var ku=0;var kr=[];var kq=0;var kt=0;for(var kp=0;kp0&&e>0){kr.push({srcX:ke,srcY:i,destX:kv,destY:ku,width:T,height:e})}}if(kr.length>0){return kr}return null},_getLineLabelInfo:function(kk,kc,kd,kz,kM,kr,kx,kw,ky,kq){if(kk.length!==10){return}var kB=this.ratio;var T=this.ratio;var kI=kk[7].length;var ks=kk[1];var kK=kk[3];var kQ=kk[8];var kg=kk[4];var e=2;var ke=kg.slice(0,e);for(var kN=e;kNko){ko=kU+kf}if(kT+ki>kn){kn=kT+ki}}kt.push({angle:km,srcX:kh,srcY:kj,destX:kU,destY:kT,width:kf,height:ki})}var kJ={type:"line",textImg:kc,rank:ks,baseX:kG,baseY:kE,arrWordPos:kt,minXOriginal:kC,minYOriginal:kA,maxXOriginal:ko,maxYOriginal:kn,text:""};kq.push(kJ)}},alterColor:function(kf,e,ke){var T=this._colorCtx,i=this._canvas2dMapMgr;T.clearRect(0,0,kf.width,kf.height);T.drawImage(e,kf.srcX,kf.srcY,kf.width,kf.height,0,0,kf.width,kf.height);var kd=T.getImageData(0,0,kf.width,kf.height),kc=i.getFilterImageData(kd,ke);T.putImageData(kc,0,0)},drawIconAndText:function(kr,kq,e){var ki=this.ratio;var kg=this.sizeRatio/ki;var kk=2/ki;var kC=this;for(var ku=0,ks=kq.length;ku10&&kx<350){kr.save();var kA=Math.round(kD+kw.width/2);var kz=Math.round(kB+kw.height/2);kr.translate(kA,kz);kr.rotate(-kx/180*Math.PI);kr.drawImage(ko,kw.srcX,kw.srcY,kw.width,kw.height,-Math.round(kw.width/2),-Math.round(kw.height/2),kw.width/kg,kw.height/kg);kr.restore()}else{kr.drawImage(ko,kw.srcX,kw.srcY,kw.width,kw.height,kD,kB,kw.width/kg,kw.height/kg)}}}}}},isCollide:function(ke,kn,km,e,kg,T,ki){for(var kd=0,kc=T.length;kdkh[1]+kh[3]+kl||km+kgkh[2]+kh[4]+kk)){return true}}}return false},zoomingIconAndText:function(kC,kw,kc,kA,kB,k3,kJ,kk,kP,kI,kt){var k4=this.ratio;var kl=this.sizeRatio/k4;var k5=2/k4;var lf=k4/2;var kZ=kA.x;var kY=kA.y;var kD=2*k4;if(kt!==0){kY+=kI}var ko=undefined,kh=undefined,ke=undefined,kj=undefined,ks=undefined;var kO=k3>0?true:false;if(!kO){ko=[];var kS=1-kJ}for(var lb=0,k9=kw.length;lb10&&kz<350){var k1=kU+k2.width/2;var k0=kT+k2.height/2;var kd=kz/180*Math.PI;var kG=Math.cos(kd);var kp=Math.sin(kd);var kR=kG;var kq=kG;var kQ=kp;var kr=-kp;var ky=k1-k1*kG-k0*kp;var e=k0+k1*kp-k0*kG;kC.save();kC.transform(kR,kr,kQ,kq,ky,e);kC.drawImage(kf,k2.srcX,k2.srcY,kj,ks,kh,ke,kj/kl,ks/kl);kC.restore()}else{kC.drawImage(kf,k2.srcX,k2.srcY,kj,ks,kh,ke,kj/kl,ks/kl)}!kO&&ko.push([lb,kh,ke,kj,ks])}}kC.restore()}}}});function er(e){this.initVars(e)}eX.extend(er.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(ke,ki){var kg=this;this.bizData=ke;this.objTextsPng=null;this.arrIconsPng=null;var T=ke.textsPng;var kk=ke.iconsPng;if(!T||!kk){return}var kh=new Image();kh.onload=function(){kg.objTextsPng=this;kg.calcIconAndTextInfo(ki);this.onload=null};kh.src=this.base64Prefix+T;var kj=kk.length;var e=[];for(var kd=0;kdkg.width||i>kg.height)&&(e>kg.width||kk>kg.height)){return false}return true},_setPlatformPosition:function(kj,ki,kl){kl=kl||{};if(kj===0&&ki===0&&!kl.point){return}if(isNaN(kl.initMapOffsetX)){kl.initMapOffsetX=this.offsetX}if(isNaN(kl.initMapOffsetY)){kl.initMapOffsetY=this.offsetY}var kf=iB(this._heading);if(this._tilt>0){ki=ki/Math.cos(iB(this._tilt))}var kk=kj*Math.cos(kf)+ki*Math.sin(kf);var kh=-kj*Math.sin(kf)+ki*Math.cos(kf);kk=kk+kl.initMapOffsetX;kh=kh+kl.initMapOffsetY;if(kl.point){var i=this.restrictCenter(kl.point);if(!i.equals(this.centerPoint)){this.centerPoint=i.clone();this.fire(new fJ("oncenter_changed"))}}else{var kc=this.offsetX-kk;var e=this.offsetY-kh;var kg=this.centerPoint.lng;var ke=this.centerPoint.lat;var kd=new cx(kg,ke);var T=this.getZoomUnits();this.centerPoint=this.restrictCenter(new cx(kd.lng+kc*T,kd.lat-e*T),T);this.fire(new fJ("oncenter_changed"))}this.offsetX=kk;this.offsetY=kh;this.dispatchEvent(new fJ("onmoving"))},restrictCenter:function(kk,e){if(this.config.restrictCenter===false){return kk}e=e||this.getZoomUnits();var ki=this.pixelToPointIn(new fi(this.width,0),{center:kk});var kf=this.pixelToPointIn(new fi(0,this.height),{center:kk});var kl=kk.lng;var kq=kk.lat;if(this.config.restrictBounds!==null&&!this.config.restrictBounds.isEmpty()){var kp=this.config.restrictBounds;var T=kp.getSouthWest();var kn=kp.getNorthEast();var kj=i9.convertLL2MC(T);var kd=i9.convertLL2MC(kn);var kg=this.calcNewZoomByRestriction(kl,kq,kf,ki,kj.lng,kd.lng,kj.lat,kd.lat);if(kg>this.zoomLevel){this.zoomLevel=kg;return kk}kk.lng=this.calcNewLngByBounds(kl,kf,ki,kj.lng,kd.lng,e);kk.lat=this.calcNewLatByBounds(kq,kf,ki,kj.lat,kd.lat,e);return kk}var kh=this.pixelToPointIn(new fi(0,0),{center:kk});var kc=this.pixelToPointIn(new fi(0,this.height),{center:kk});if(this.zoomLevel<5){if(kh.lat>hK.MAX_LAT&&kc.lathK.MAX_LAT){kk.lat=hK.MAX_LAT-this.height/2*e}else{if(kc.latke&&e.latkf&&e.lngke){kd=ke-this.height/2*e}else{if(kc.latT){i=T-this.width/2*e}else{if(ke.lngkd){this._tilt=kd}if(kn){if(this._heading%360!==0||this._tilt>0){var i=this._webglMapCamera.fromScreenPixelToMC(T.x,T.y,{center:kg,zoom:this.zoomLevel});if(i){var kk=i.sub(kf);var kc=kg.sub(kk);this.centerPoint=this.restrictCenter(kc)}}else{var kh=this.getZoomUnits();var kc=new cx(kn.lng-kh*(T.x-this.width/2),kn.lat+kh*(T.y-this.height/2));this.centerPoint=this.restrictCenter(kc,kh)}this.fire(new fJ("oncenter_changed"))}this._checkFireZoomend();ko.callback&&ko.callback();return}this._animationInfo.zoom={current:this.zoomLevel,diff:e-this.zoomLevel,target:e};var kl=this;var km=this._tilt;if(this.fixPoint||km>hK.MAX_DRAG_TILT_L2){ko.renderCallback=function(){var ks=kl.getCurrentMaxTilt();if(kl._tilt>ks){kl._tilt=ks}var kt=kl.fixPixel;if(!kl.fixPixel||!kl.fixPoint){return}var kp=kl.fixPixel;var kz=kl.fixPoint;var kw=kl.fixCenter;var ku=kl.mousePosMCPoint;if(kl._heading%360!==0||kl._tilt>0){var kq=kl._webglMapCamera.fromScreenPixelToMC(kp.x,kp.y,{center:kw,zoom:kl.zoomLevel,tilt:kl._tilt});if(kq){var ky=kq.sub(ku);var kr=kw.sub(ky);kl.centerPoint=kl.restrictCenter(kr)}}else{var kv=kp;var kx=kl.getZoomUnits();var kr=new cx(kz.lng-kx*(kv.x-kl.width/2),kz.lat+kx*(kv.y-kl.height/2));kl.centerPoint=kl.restrictCenter(kr,kx)}kl.fire(new fJ("oncenter_changed"))}}if(ko.fromMouseWheel===true){this._startInfiniteZoomAnimation(ko);ko.callback&&ko.callback();kl._checkFireZoomend();return}if(!ko.callback){ko.callback=function(){kl._checkFireZoomend()}}else{ko.callback=function(kp,kq){ko.callback(kp,kq);kl._checkFireZoomend()}}this._startAnimation(ko)},_checkFireZoomend:function(){var e=this;if(e.fireZoomendTimer){clearTimeout(e.fireZoomendTimer)}e.fireZoomendTimer=setTimeout(function(){if(e.zoomEventStatus==="zooming"){e.fire(new fJ("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,kG,kr){kr=kr||{};var kd=this._getProperZoom(kG);kG=kd.zoom;if(this.centerPoint.equals(T)&&this.zoomLevel===kG&&typeof kr.heading!=="number"&&typeof kr.tilt!=="number"){return}var e=this.getHeading()%360;var kj=this.getTilt();var kp=0;var kt=0;var km=this.getBounds().containsPoint(T);if(typeof kr.heading==="number"){kp=kr.heading}else{if(km){kp=e}}if(typeof kr.tilt==="number"){kt=kr.tilt}else{if(km){kt=kj}}this._heading=e;var kD=kp-e;var kz=kt-kj;var kn=this;var kf=this.zoomLevel;var kg=1.42;var kv=this.zoomScale(kG-kf);var kI=this.getZoomUnits();var kl=this.centerPoint.div(kI);var kJ=T.div(kI);var kC=this.worldSize();var ky=kg;var kx=Math.max(this.width,this.height);var kw=kx/kv;var kk=kJ.sub(kl).mag();var i=ky*ky;function kF(kL){var kK=(kw*kw-kx*kx+(kL?-1:1)*i*i*kk*kk)/(2*(kL?kw:kx)*i*kk);return Math.log(Math.sqrt(kK*kK+1)-kK)}function kc(kK){return(Math.exp(kK)-Math.exp(-kK))/2}function kh(kK){return(Math.exp(kK)+Math.exp(-kK))/2}function kq(kK){return kc(kK)/kh(kK)}var ki=kF(0);var kA=function(kK){return(kh(ki)/kh(ki+ky*kK))};var kB=function(kK){return kx*((kh(ki)*kq(ki+ky*kK)-kc(ki))/i)/kk};var ke=(kF(1)-ki)/ky;if(Math.abs(kk)<0.000001||ke===Infinity||isNaN(ke)){if(Math.abs(kx-kw)<0.000001){this._animationInfo.zoom={current:this.zoomLevel,diff:kG-this.zoomLevel};this._animationInfo.center={current:this.centerPoint,diff:T.sub(this.centerPoint)};this._animationInfo.heading={current:e,diff:kp-e};this._animationInfo.tilt={current:kj,diff:kt-kj};this.setLock(true);this._startAnimation({callback:function(kK){kn.setLock(false);if(kr.callback){kr.callback(kK)}},duration:kr.duration});return}var kH=kw5){kE=(ke-5)/2+kE}}var ks=kr.duration||1000*ke/kE;if(isNaN(ks)){var ku={};for(var ko in kr){ku[ko]=kr[ko];ku.noAnimation=true}this.centerAndZoomIn(T,kG,ku);return}this.fire(new fJ("onmovestart"));this.fire(new fJ("onzoomstart"));this.setLock(true);this._startAnimation({duration:ks,renderCallback:function(kK,kL){var kM=kK*ke;var kP=kB(kM);var kO=kf+kn.scaleZoom(1/kA(kM));if(kOkn.getMaxZoom()){kO=kn.getMaxZoom()}if(kO!==kn.zoomLevel){kn.zoomLevel=kO;kn.fire(new fJ("onzoom_changed"))}kn.centerPoint=kl.add(kJ.sub(kl).mult(kP)).mult(kI);kn.fire(new fJ("oncenter_changed"));if(typeof kp==="number"){var kN=kK/0.7;if(kN>1){kN=1}kn.setHeading(e+kD*kK,{noAnimation:true})}if(typeof kt==="number"){kn.setTilt(kj+kz*kK,{noAnimation:true})}},callback:function(kK,kL){kn.setLock(false);if(kL&&kL.stop===true){kn.fire(new fJ("onmoveend"));kn.fire(new fJ("onzoomend"));kr.callback&&kr.callback(kK);return}if(kG!==kn.zoomLevel){kn.zoomLevel=kG;kn.fire(new fJ("onzoom_changed"))}kn.fire(new fJ("onmoveend"));kn.fire(new fJ("onzoomend"));kr.callback&&kr.callback(kK)}})},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 kc=this.pointToPixelIn(i);var e=Math.round(this.width/2);var ke=Math.round(this.height/2);var kd=this._ifUseAnimation(i,this.zoomLevel);if(T.noAnimation===true||kd===false){this._stopAllAnimations();this._panToIn(e-kc.x,ke-kc.y,i);T.callback&&T.callback();return}this.flyToIn(i,this.zoomLevel,T)},_panToIn:function(i,e,kc){var T=this.temp;if(T.operating===true){return}if(T.dragAni){T.dragAni.stop(false,{readyToMove:true});T.dragAni=null}this.dispatchEvent(new fJ("onmovestart"));this._setPlatformPosition(i,e,{point:kc});this.dispatchEvent(new fJ("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,kd){if(this.temp.operating===true){return}kd=kd||{};this.dispatchEvent(new fJ("onmovestart"));var kc=this;var T=kc.temp;T.pl=kc.offsetX;T.pt=kc.offsetY;if(T.tlPan){T.tlPan.cancel()}if(T.dragAni){T.dragAni.stop(false,{readyToMove:true});T.dragAni=null}T.tlPan=new fy({fps:kd.fps||kc.config.fps,duration:kd.duration||kc.config.actionDuration,transition:kd.transition||gA.easeInOutQuad,render:function(ke){this.terminative=kc.temp.operating;if(kc.temp.operating){return}kc._setPlatformPosition(i*ke,e*ke,{initMapOffsetX:T.pl,initMapOffsetY:T.pt})},finish:function(ke){kc.dispatchEvent(new fJ("onmoveend"));kc.temp.tlPan=false;if(kc.temp.stopArrow===true){kc.temp.stopArrow=false;if(kc.temp.arrow!==0){kc._arrow()}}}})},_startAnimation:function(i){var kd=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 ke=i.duration||500;var kf=i.transition||gA.ease;var e=new fJ("onanimation_start");this.fire(e);if(i.unstopable){kd=this._animationInfoUnstopable}var kc=new fy({duration:ke,transition:kf,render:function(ki,kh){for(var kg in kd){if(!kd.hasOwnProperty(kg)){continue}var kk=kd[kg].current;var kj=kd[kg].diff;T._setValueTick(kg,kk,kj,ki)}if(i.renderCallback){i.renderCallback(ki,kh)}},finish:function(kg){T.fire(new fJ("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(kg)}},onStop:function(kg){kg=kg||{};T.fire(new fJ("onanimation_end"));if(kg.stopCurrentAnimation){T._animationInfo={}}T._ani=null;if(i.mapNeedCbk){i.mapNeedCbk()}if(i.callback){i.callback(null,{stop:true})}}});if(i.unstopable){T._unstopableAni=kc}else{T._ani=kc}},_startInfiniteZoomAnimation:function(e){var i=this;if(i._ani){i._ani.stop(!!e.goToEnd,{stopCurrentAnimation:e.stopCurrentAnimation})}if(i._infiniteAni){return}this.fire(new fJ("onanimation_start"));i._infiniteAni=new fy({duration:10000,transition:gA.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 fJ("onanimation_end"));if(e.callback){e.callback()}},onStop:function(){i._infiniteAni=null;i._animationInfo={};i.fire(new fJ("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 fJ("on"+e+"_changed"))}return}else{if(e==="center"){this.centerPoint=T}}this["_"+e]=T;this.fire(new fJ("on"+e+"_changed"))},_setValueTick:function(e,kd,kc,i){if(e==="center"){var T=new cx(kd.lng+kc.lng*i,kd.lat+kc.lat*i);this._setValue(e,T);return}if(e==="zoom"){this._setValue(e,Math.pow(kd,1-i)*Math.pow(kd+kc,i));return}this._setValue(e,kd+kc*i)},setHeading:function(kc,i){i=i||{};if(kc===this._heading){i.callback&&i.callback();return}var T=ee(this._heading,360);var e=ee(kc,360);if(e===T){this._heading=kc;i.callback&&i.callback();return}if(i.noAnimation){this._setValue("heading",kc);i.callback&&i.callback();return}if(i.unstopable){this._animationInfoUnstopable.heading={current:this._heading,diff:kc-this._heading}}else{this._animationInfo.heading={current:this._heading,diff:kc-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>hK.MAX_TILT){e=hK.MAX_TILT}if(e0){kk=1/Math.sqrt(kk);kn[0]=km[0]*kk;kn[1]=km[1]*kk}return kn};ki.dot=function(kl,kk){return kl[0]*kk[0]+kl[1]*kk[1]};ki.cross=function(km,kl,kk){var kn=kl[0]*kk[1]-kl[1]*kk[0];km[0]=km[1]=0;km[2]=kn;return km};ki.lerp=function(km,kl,kk,kn){var kp=kl[0],ko=kl[1];km[0]=kp+kn*(kk[0]-kp);km[1]=ko+kn*(kk[1]-ko);return km};ki.random=function(kk,km){km=km||1;var kl=kd()*2*Math.PI;kk[0]=Math.cos(kl)*km;kk[1]=Math.sin(kl)*km;return kk};ki.transformMat2=function(kn,km,kl){var kk=km[0],ko=km[1];kn[0]=kl[0]*kk+kl[2]*ko;kn[1]=kl[1]*kk+kl[3]*ko;return kn};ki.transformMat2d=function(kn,km,kl){var kk=km[0],ko=km[1];kn[0]=kl[0]*kk+kl[2]*ko+kl[4];kn[1]=kl[1]*kk+kl[3]*ko+kl[5];return kn};ki.transformMat3=function(kn,km,kl){var kk=km[0],ko=km[1];kn[0]=kl[0]*kk+kl[3]*ko+kl[6];kn[1]=kl[1]*kk+kl[4]*ko+kl[7];return kn};ki.transformMat4=function(kn,km,kl){var kk=km[0],ko=km[1];kn[0]=kl[0]*kk+kl[4]*ko+kl[12];kn[1]=kl[1]*kk+kl[5]*ko+kl[13];return kn};ki.rotate=function(kn,kl,kk,kr){var kq=kl[0]-kk[0];var kp=kl[1]-kk[1];var km=Math.sin(kr);var ko=Math.cos(kr);kn[0]=kq*ko-kp*km+kk[0];kn[1]=kq*km+kp*ko+kk[1];return kn};ki.forEach=(function(){var kk=ki.create();return function(kn,kr,ks,kq,kp,kl){var ko,km;if(!kr){kr=2}if(!ks){ks=0}if(kq){km=Math.min((kq*kr)+ks,kn.length)}else{km=kn.length}for(ko=ks;ko0){kk=1/Math.sqrt(kk);kn[0]=km[0]*kk;kn[1]=km[1]*kk;kn[2]=km[2]*kk}return kn};kh.dot=function(kl,kk){return kl[0]*kk[0]+kl[1]*kk[1]+kl[2]*kk[2]};kh.cross=function(kl,kq,kp){var kk=kq[0],ks=kq[1],kr=kq[2],ko=kp[0],kn=kp[1],km=kp[2];kl[0]=ks*km-kr*kn;kl[1]=kr*ko-kk*km;kl[2]=kk*kn-ks*ko;return kl};kh.lerp=function(km,kl,kk,kn){var kq=kl[0],kp=kl[1],ko=kl[2];km[0]=kq+kn*(kk[0]-kq);km[1]=kp+kn*(kk[1]-kp);km[2]=ko+kn*(kk[2]-ko);return km};kh.random=function(kk,ko){ko=ko||1;var km=kd()*2*Math.PI;var kn=(kd()*2)-1;var kl=Math.sqrt(1-kn*kn)*ko;kk[0]=Math.cos(km)*kl;kk[1]=Math.sin(km)*kl;kk[2]=kn*ko;return kk};kh.transformMat4=function(kn,km,kl){var kk=km[0],kp=km[1],ko=km[2];kn[0]=kl[0]*kk+kl[4]*kp+kl[8]*ko+kl[12];kn[1]=kl[1]*kk+kl[5]*kp+kl[9]*ko+kl[13];kn[2]=kl[2]*kk+kl[6]*kp+kl[10]*ko+kl[14];return kn};kh.transformMat3=function(kn,km,kl){var kk=km[0],kp=km[1],ko=km[2];kn[0]=kk*kl[0]+kp*kl[3]+ko*kl[6];kn[1]=kk*kl[1]+kp*kl[4]+ko*kl[7];kn[2]=kk*kl[2]+kp*kl[5]+ko*kl[8];return kn};kh.transformQuat=function(kq,kw,kk){var kx=kw[0],kv=kw[1],ku=kw[2],ks=kk[0],kr=kk[1],kp=kk[2],kt=kk[3],kn=kt*kx+kr*ku-kp*kv,km=kt*kv+kp*kx-ks*ku,kl=kt*ku+ks*kv-kr*kx,ko=-ks*kx-kr*kv-kp*ku;kq[0]=kn*kt+ko*-ks+km*-kp-kl*-kr;kq[1]=km*kt+ko*-kr+kl*-ks-kn*-kp;kq[2]=kl*kt+ko*-kp+kn*-kr-km*-ks;return kq};kh.rotateX=function(km,kl,kk,kp){var ko=[],kn=[];ko[0]=kl[0]-kk[0];ko[1]=kl[1]-kk[1];ko[2]=kl[2]-kk[2];kn[0]=ko[0];kn[1]=ko[1]*Math.cos(kp)-ko[2]*Math.sin(kp);kn[2]=ko[1]*Math.sin(kp)+ko[2]*Math.cos(kp);km[0]=kn[0]+kk[0];km[1]=kn[1]+kk[1];km[2]=kn[2]+kk[2];return km};kh.rotateY=function(km,kl,kk,kp){var ko=[],kn=[];ko[0]=kl[0]-kk[0];ko[1]=kl[1]-kk[1];ko[2]=kl[2]-kk[2];kn[0]=ko[2]*Math.sin(kp)+ko[0]*Math.cos(kp);kn[1]=ko[1];kn[2]=ko[2]*Math.cos(kp)-ko[0]*Math.sin(kp);km[0]=kn[0]+kk[0];km[1]=kn[1]+kk[1];km[2]=kn[2]+kk[2];return km};kh.rotateZ=function(km,kl,kk,kp){var ko=[],kn=[];ko[0]=kl[0]-kk[0];ko[1]=kl[1]-kk[1];ko[2]=kl[2]-kk[2];kn[0]=ko[0]*Math.cos(kp)-ko[1]*Math.sin(kp);kn[1]=ko[0]*Math.sin(kp)+ko[1]*Math.cos(kp);kn[2]=ko[2];km[0]=kn[0]+kk[0];km[1]=kn[1]+kk[1];km[2]=kn[2]+kk[2];return km};kh.forEach=(function(){var kk=kh.create();return function(kn,kr,ks,kq,kp,kl){var ko,km;if(!kr){kr=3}if(!ks){ks=0}if(kq){km=Math.min((kq*kr)+ks,kn.length)}else{km=kn.length}for(ko=ks;ko0){kk=1/Math.sqrt(kk);ko[0]=kn[0]*kk;ko[1]=kn[1]*kk;ko[2]=kn[2]*kk;ko[3]=kn[3]*kk}return ko};kg.dot=function(kl,kk){return kl[0]*kk[0]+kl[1]*kk[1]+kl[2]*kk[2]+kl[3]*kk[3]};kg.lerp=function(km,kl,kk,kn){var kq=kl[0],kp=kl[1],ko=kl[2],kr=kl[3];km[0]=kq+kn*(kk[0]-kq);km[1]=kp+kn*(kk[1]-kp);km[2]=ko+kn*(kk[2]-ko);km[3]=kr+kn*(kk[3]-kr);return km};kg.random=function(kk,kl){kl=kl||1;kk[0]=kd();kk[1]=kd();kk[2]=kd();kk[3]=kd();kg.normalize(kk,kk);kg.scale(kk,kk,kl);return kk};kg.transformMat4=function(ko,kn,kl){var kk=kn[0],kq=kn[1],kp=kn[2],km=kn[3];ko[0]=kl[0]*kk+kl[4]*kq+kl[8]*kp+kl[12]*km;ko[1]=kl[1]*kk+kl[5]*kq+kl[9]*kp+kl[13]*km;ko[2]=kl[2]*kk+kl[6]*kq+kl[10]*kp+kl[14]*km;ko[3]=kl[3]*kk+kl[7]*kq+kl[11]*kp+kl[15]*km;return ko};kg.transformQuat=function(kq,kw,kk){var kx=kw[0],kv=kw[1],ku=kw[2],ks=kk[0],kr=kk[1],kp=kk[2],kt=kk[3],kn=kt*kx+kr*ku-kp*kv,km=kt*kv+kp*kx-ks*ku,kl=kt*ku+ks*kv-kr*kx,ko=-ks*kx-kr*kv-kp*ku;kq[0]=kn*kt+ko*-ks+km*-kp-kl*-kr;kq[1]=km*kt+ko*-kr+kl*-ks-kn*-kp;kq[2]=kl*kt+ko*-kp+kn*-kr-km*-ks;return kq};kg.forEach=(function(){var kk=kg.create();return function(kn,kr,ks,kq,kp,kl){var ko,km;if(!kr){kr=4}if(!ks){ks=0}if(kq){km=Math.min((kq*kr)+ks,kn.length)}else{km=kn.length}for(ko=ks;ko=2&&e<=4){this.result.eleData[e][i||0]=T;return}else{if(e===0||e===5||e===6){T.sort(function(kd,kc){return kd.overlay.zIndex-kc.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(kc){var e=this.result.bkData;if(typeof kc==="number"){if(e[kc]){e[kc][0]=[];e[kc][1]=[];e[kc][2]=[]}return}for(var T=0;T0){T[0].sort(function(kd,kc){return kd.tileInfo.useZoom-kc.tileInfo.useZoom})}}});var gm=(function(){var km=new Int8Array(4);var T=new Int32Array(km.buffer,0,1);var kh=new Float32Array(km.buffer,0,1);function ko(kv){T[0]=kv;return kh[0]}function i(kv){kh[0]=kv;return T[0]}function ki(kv){var kx=(kv[3]<<24|kv[2]<<16|kv[1]<<8|kv[0]);var kw=ko(kx&4278190079);return kw}var kd=0;var kg=1;var kk=2;var ks=0;var kp=1;var kn=2;var ke=9;function kl(kv,kw){var kx;if(kw%2===0){kx=[-kv[1],kv[0]]}else{kx=[kv[1],-kv[0]]}return kx}function e(kv,kw,kx){var ky=kl(kv,kw);var kz;if(kx===kg){return ky}else{if(kw===4||kw===5){kz=[ky[0]-kv[0],ky[1]-kv[1]]}else{kz=[ky[0]+kv[0],ky[1]+kv[1]]}if(kx===kd){vec2.normalize(kz,kz)}return kz}}function kr(kw,kv){return Math.sqrt(Math.pow(kw[0]-kv[0],2)+Math.pow(kw[1]-kv[1],2))}function kc(kz,ky,kx,kv){var kw=vec2.dot(kz,ky);if(kx===kn||kx===kp){if((kv===0||kv===1)&&kw>0){return true}else{if((kv===2||kv===3)&&kw<0){return true}}}if((kv===0||kv===1)&&kw<0){return true}else{if((kv===2||kv===3)&&kw>0){return true}}return false}function kj(kw,kB,kD){var kC=kl(kw,kB);var ky;var kA=kw;var kz=kD;var kF=[];vec2.normalize(kF,[kA[0]+kz[0],kA[1]+kz[1]]);var kE=vec2.dot(kC,[-kF[1],kF[0]]);if(Math.abs(kE)<0.1){kE=1}var kx=1/kE;ky=[-kF[1]*kx,kF[0]*kx];var kv=vec2.dot(kw,ky);if(kv<0){vec2.negate(ky,ky)}return{cos2:kv,offset:ky}}function ku(kw,kB,kD,kv){var kC=kl(kw,kB);var kA;var kz;var ky;if(kB===0||kB===1){kA=kD;kz=kw}else{kA=kw;kz=kD}if(!kA||!kz){return kC}var kF=[kA[0]+kz[0],kA[1]+kz[1]];if(kF[0]===0&&kF[1]===0){vec2.normalize(kF,kz)}else{vec2.normalize(kF,kF)}var kG=kc(kF,kC,kv,kB);if(kG){return kC}var kE=vec2.dot(kC,[-kF[1],kF[0]]);if(Math.abs(kE)<0.1){kE=1}var kx=1/kE;ky=[-kF[1]*kx,kF[0]*kx];return ky}function kt(kG,kH,kA,kz,kI,kF,ky,kB,kx,kE){var kD;var kw=0;var kv=false;kD=kF.length/ke-1;kf(kH[0],kG[0],kA[0],kI,kz,4,kB,kx,undefined,kF,kE);kD++;kw++;kf(kH[0],kG[0],kA[0],kI,kz,5,kB,kx,undefined,kF,kE);kD++;kw++;for(var kC=0;kC0){kC+=kr(kH[kB],kH[kB-1]);kz.push(kC*10)}if(kB!==kH.length-1){var ky=[kH[kB+1][0]-kH[kB][0],kH[kB+1][1]-kH[kB][1]];var kJ=[];if(ky[0]===0&&ky[1]===0){kJ=[0,0]}else{vec2.normalize(kJ,ky)}kF[kF.length]=[kJ[0],kJ[1]]}}return kt(kF,kH,kz,kx,kI,kD,kv,ki(kA),kw,kE)},toTileSolidLineVertices:function(kz,kw){var kx=new Float32Array(kz.length/ke*5);var kv=new Int16Array(kx.buffer);var kB=0;var ky=0;for(var kA=0;kA0){this.zoomState=1}else{if(e<0){this.zoomState=-1}}this.lastZoom=i;return this.zoomState},releaseOutViewTileData:function(e){var kd=this.map._workerMgr.releasePendingData(e);for(var kc=0,T=kd.length;kc=0.5){kx=true}else{if(kk<0.5&&e>=0.5){kx=true}else{if(kk>=0.5&&e<0.5){kx=true}}}if(kx){this.cacheDataCollideLabels(0)}this.LAST_CALC_ZOOM=ki}else{if(this.tileLabels.length>0){this.cacheDataCollideLabels(eX.Browser.ie?50:30)}}},loadVectorLayerData:function(ki){this.map.temp.isPermitSpotOver=false;var kh=this;function kg(i,kj){var kl=kh.tileCache.getData(kj);if(!kl){return}if(!i||i.error){i.event&&bx.fetchDebug&&bx.fetchDebug.sendError({title:i.event.title,msg:i.event.msg,category:bx.fetchDebug.category.AJAX,level:bx.fetchDebug.levels.ERROR,url:i.event.title});var kk=new fJ("ontileloaderror");i=i||{};kk.error=i.error||"";kk.message=i.message||"";kh.map.fire(kk);kl.status="init";kl.reloadTimer=setTimeout(function(){if(kl.retry<3){kl.retry++;kl.status="loading";kh.loadVectorTileData(i.tileInfo,kg)}else{kh.tileCache.removeData(kj);kh._checkTilesLoaded()}},4000);if(kh.map._featureMgr){kh.map._featureMgr.clearData(kh.drawIndex)}kh.getVectorLayerDataFromCache(kh.curViewTilesInfo,kh.getZoomState());return}if(kl.reloadTimer){clearTimeout(kl.reloadTimer);kl.reloadTimer=null}kh.callbackDataQueue.push([i,kj]);if(kh.processDataTimer){return}kh.processDataTimer=setTimeout(function(){while(kh.callbackDataQueue.length>0){var kn=kh.callbackDataQueue.shift();kh.vectorTileDataCbk(kn[0],kn[1]);kh._checkTilesLoaded()}if(kh.map._featureMgr){kh.map._featureMgr.clearData(kh.drawIndex)}kh.getVectorLayerDataFromCache(kh.curViewTilesInfo,kh.getZoomState());var km=new fJ("onrefresh");km.source="webgllayer";kh.map.dispatchEvent(km);kh.processDataTimer=null},200)}for(var kf=0,kd=ki.length;kf=1.5?2:1;for(var ko=0;ko65536){ky.renderData.base.push({type:"line",data:[gm.toTileSolidLineVertices(kE,4000),new Uint16Array(kH)]});kE=[];kH=[]}for(var kx=0;kx0){ke=kd.labelProcessor.collisionTest(ke,-1)}}else{if(kf||kh){if(this._collisionTimer){if(!kf){clearTimeout(this._collisionTimer)}else{if(Date.now()-kd.lastCollisionTestTime>500){kd.lastCollisionTestTime=Date.now()}else{clearTimeout(this._collisionTimer)}}}this._collisionTimer=setTimeout(function(){if(kd&&!kd.map.tileMgr&&!kd.map.tileMgr.isExitTileLayer(kd)){kd._collisionTimer=null;return}ke=kd.labelProcessor.collisionTest(kd.tileLabels);if(ke){if(kd._isInnerLayer&&kd.map.stencil&&kd.map.stencil.isPoiMask){var ki=kd.isPoiInPolygon(ke);i.setLabelData(ki,kd.drawIndex)}else{i.setLabelData(ke,kd.drawIndex)}}kd.updateLabels();kd.map.dispatchEvent(new fJ("onrefresh"));kd._collisionTimer=null},60);return}else{ke=kd.labelProcessor.getCachedLabels(kd.tileLabels)}}if(ke){if(kd._isInnerLayer&&kd.map.stencil&&kd.map.stencil.isPoiMask){var kg=kd.isPoiInPolygon(ke);i.setLabelData(kg,kd.drawIndex)}else{i.setLabelData(ke,kd.drawIndex)}}kd.updateLabels();kd.map.dispatchEvent(new fJ("onrefresh"))}if(!T){clearTimeout(kd.cacheLabelTimer);kc()}else{if(kd.cacheLabelTimer){return}kd.cacheLabelTimer=setTimeout(function e(){kc()},T)}},isPoiInPolygon:function(T){var kv=this;var kl=kv.map.stencil;var kd=kv.map._featureMgr.result.eleData[9];var kc=[];for(var kq=0;kq0){var kc=ke.getZoom();if(T.labelZoom-kc<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)}ke.temp.isPermitSpotOver=false;this.labelProcessor.curSpotAdded=false}},loadRasterLayerData:function(kh,kc){this.thumbCache={};var ki=this.getZoomState();if(kc){for(var kf=0,kd=kh.length;kf3){kd();return}T.src=kg;ke++},this.retryTime)}T.onload=function(){kd();e&&e(this,kf)};T.onerror=function(){kd();bx.fetchDebug&&bx.fetchDebug.sendError({title:kg,msg:kg,category:bx.fetchDebug.category.RESOURCE,level:bx.fetchDebug.levels.ERROR,url:kg});e&&e(null,kf)};T.src=kg;return T},rasterTileDataCbk:function(ke,kc){if(!ke||typeof ke==="string"){this.tileCache.removeData(kc);return}var i=ke.tileInfo;var T=i.col;var kk=i.row;var kj=i.zoom;var e=this.tileCache.getData(kc);if(!e){return}var kf="id_"+T+"_"+kk+"_"+kj;var ki=this;e.dataType=gF;e.tileInfo=i;if(i.tileTypeName==="xyz"){var kh=i.tileSize;e.textureSource=ke;e.renderData={vertexAll:[0,0,0,0,0,kh,0,0,1,0,kh,kh,0,1,1,0,0,0,0,0,kh,kh,0,1,1,0,kh,0,0,1]};ki.setRasterTileData(kc,e,kf)}else{e.textureSource=ke;var kd=e0.calcLoopParam(T,kj);var kg=kd.geoOffsetX;ke.tileInfo.loopOffsetX=kg;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(kc,e,kf)}},setRasterTileData:function(kd,e,kc){e.status="ready";this.tileCache.setData(kd,e);var T=false;if(this.curViewTilesInfo[kc]){e.dataType=gF;e.png8=this.png8||false;this.map._featureMgr.setData(e,this.drawIndex,2);T=true}if(T){var i=new fJ("onrefresh");i.source="webgllayer";this.map.dispatchEvent(i)}},_checkLayerTilesLoaded:function(){this.numTileLoading--;if(this.firstTileLoad===false){this.dispatchEvent(new fJ("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 fJ("ontilesloadend"));e.firstTileLoad=false}e._checkTileLoadedTimer=null},60)}},_checkTilesLoaded:function(){this._checkLayerTilesLoaded();this.numLoading--;if(this.map.firstTileLoad===false){this.map.dispatchEvent(new fJ("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 fJ("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 aT=5;var i5=4;var gy=3;var M=2;var eq=1;var hu=0;function aw(e){this._ratio=gd();this._iconCache={};this._map=e;this._drawingCanvasPool=[];this._drawingCanvasHeight=4096;this._bufferSpan=[5,5]}eX.extend(aw.prototype,{_loadIcons:function(T,ki,ke){var kc=0;var kf=this;var kd=this._map.config.style;for(var kg in T){kc++;var kh=new Image();kh.id=kg;kh.crossOrigin="anonymous";kh.onload=function(){kf._iconCache[this.id].loaded=true;kc--;if(kc===0){ki()}this.onload=null};kh.onerror=function(){kf._iconCache[this.id]=null;kc--;if(kc===0){ki()}this.onerror=null};if(!ke){var e=B.getIconSetPath(kd)+kg+".png";var i=by();if(i&&i.udt){e+="?udt="+i.udt}}else{var e=kg}kh.src=e;this._iconCache[kg]={loaded:false,image:kh}}},_getEmptyDrawingCanvas:function(){for(var T=0;T0){while(ke0){ke=0;while(ke0){ke=0;while(ke0){var kw=this;this._loadIcons(kn,function(){kv=kw._drawEachTypeOfLabels(kp,ko,kx,kh,kg,kl,kt);kx=kv.curStyleId;kh=kv.curX;kg=kv.curY;kl=kv.curLineHeight;var i=kw._generateEachLabelCanvas(e,kg,kk,kq,T,ku);kc(i[0],i[1])});return}var ki=this._generateEachLabelCanvas(e,kg,kk,kq,T,ku);kc(ki[0],ki[1])},drawCustomLabelsOnCanvas:function(kf,km){if(kf.length===0){km();return}var T=0+this._bufferSpan[0];var e=(kf[0].style.fontSize+(kf[0].style.haloSize||0)*2)+this._bufferSpan[1]||0;var kc=e-this._bufferSpan[1];var kh=this._getEmptyDrawingCanvas();var ko=kh.getContext("2d",{colorSpace:"display-p3"});ko.clearRect(0,0,kh.width,kh.height);var ki={};var kk=-1;var kd={};var kl=false;for(var ke=0;kethis._drawingCanvasHeight){return{curX:kc,curY:T,curLineHeight:kd,curStyleId:kj}}}return{curX:kc,curY:T,curLineHeight:kd,curStyleId:kj}},_drawIndoorTextLabelOnCanvas:function(kd){var e=this._getEmptyDrawingCanvas();var kk=e.getContext("2d",{colorSpace:"display-p3"});kk.clearRect(0,0,e.width,e.height);var ks=0;var kj=null;var ki=0;var kg;var kp={};var ko=[];for(var ke in kd){if(ke==="tileInfo"){continue}var kc=kd[ke];var kn=kc.defaultFloor;var kh=kc.floors;for(var km=0;km4){kU=4}var kE=[];var kt=[];var kA=0;if(kd&&!kd[kW]){kd[kW]={}}var kn=ko+kU*2;var kF=kn;if(kg.containDescendings){kF+=4}if(kU===0){kF+=2}if(kg.textOnIcon){kF=Math.max(kF,kg.iconSize[1])}if(kW!==T||kF>kD){T=kW;if(kH>=10&&kH%10===0){ku.font=kH*10+" "+ko+"px sans-serif"}else{ku.font=ko+"px sans-serif"}if(kF>kD){var kB=kF-kD;kD+=kB;kv+=kB}if(kU>0){ku.lineWidth=kU*2;ku.strokeStyle=kf}ku.fillStyle=kO}if(kg.type==="line"){var ki=kC.split("");for(var kX=0;kX512){kw=0+this._bufferSpan[0];kv+=kF;kv+=this._bufferSpan[1];kD=kF}if(kv>this._drawingCanvasHeight){return{curX:kw,curY:kv,curLineHeight:kD,styleId:kW}}var kR=kw;if(kU>0){kc+=kU;kR-=Math.round(kU/2);ku.strokeText(kQ,kw,kv)}ku.fillText(kQ,kw,kv);var kN=[kc,kF];kx=[Math.round(kN[0]/2),Math.round(kN[1]/2)];kI=[kR,kv-kF];kd[kW][kQ]={displaySize:kx,curWordPosition:kI,totalHeight:kA};kw+=kc+2}kE.push(kx);kt.push(kI)}kA=Math.round(kE[0][1])}else{if(kd[kW][kC]){var kp=kd[kW][kC];kE=kp.textSize;kt=kp.labelImagePosition;kA=kp.totalHeight}else{var kq=kC.split("\\");if(kq.length>1&&kg.textOnIcon){var kY=0;var kV=0;var k1=[];var ky=8;for(var kX=0;kXkY){kY=km}k1.push(Math.round(km/2));kV+=kF}var kj=kY+2*ky;var kT=kV+2*ky;if(kw+kj>512){kw=0+this._bufferSpan[0];kv+=kD;kv+=this._bufferSpan[1]}kv+=kV-kF+2*ky;var kM=kw;var kz=kv-kT;var e=Math.round(kj/2);var ks=this._iconCache[kg.icon].image;this.drawStretchedIcon(ku,ks,[kM,kz],ky,kY,kV);for(var kX=0;kX512){kw=0+this._bufferSpan[0];kv+=kF;kv+=this._bufferSpan[1];kD=kF}if(kv>this._drawingCanvasHeight){return{curX:kw,curY:kv,curLineHeight:kD,styleId:kW}}var kM=kw;var kz=kv-kF;var kL=kw;var kK=kv;if(kg.containDescendings){kK-=4}if(kg.textOnIcon){var kG=false;var ks=this._iconCache[kg.icon].image;var kJ=kg.iconSize.concat([]);if(kn>=kJ[1]){kJ[1]=kn;kG=true;kF+=ke*2;var kB=kF-kD;if(kB>0){kv+=kB;kD=kF;kK+=(kB-ke);kz+=(kB-ke*2)}else{kK-=ke;kz-=ke*2}}if(km>=kJ[0]){kJ[0]=km}if(kg.styleId===519){ku.drawImage(ks,0,0,kJ[0],kJ[1],kM,kz,kJ[0],kJ[1])}else{if(kG){this.drawStretchedIcon(ku,ks,[kM,kz],ke,km,kJ[1])}else{this.draw3StretchedIcon(ku,ks,[kM,kz],ke,km,kJ[1])}}kL+=ke;if(kg.iconSize[1]>kn){kK-=(kg.iconSize[1]-kn)/2-1}kj+=1}if(kU>0){if(kW===71028){kF-=2}if(kW===32){kF-=2}ku.strokeText(kC,kL,kK)}ku.fillText(kC,kL,kK);var kh=[kj,kF];var kx=[Math.round(kh[0]/2),Math.round(kh[1]/2)];kE.push(kx);kt.push([kM,kz]);kA+=Math.round(kx[1]);kw+=kj}}kd[kW][kC]={textSize:kE,labelImagePosition:kt,totalHeight:kA}}}kg.textSize=kE;kg.labelImagePosition=kt;kg.totalHeight=kA;return{curX:kw,curY:kv,curLineHeight:kD,styleId:kW}},drawStretchedIcon:function(e,T,kc,kf,kg,i){var ke=kc[0];var kd=kc[1];e.drawImage(T,0,0,kf,kf,ke,kd,kf,kf);e.drawImage(T,kf,0,1,kf,ke+kf,kd,kg,kf);e.drawImage(T,T.width-kf,0,kf,kf,ke+kg+kf,kd,kf,kf);e.drawImage(T,0,kf,kf,1,ke,kd+kf,kf,i);e.drawImage(T,kf,kf,1,1,ke+kf,kd+kf,kg,i);e.drawImage(T,T.width-kf,kf,kf,1,ke+kg+kf,kd+kf,kf,i);e.drawImage(T,0,T.height-kf,kf,kf,ke,kd+i+kf,kf,kf);e.drawImage(T,kf,T.height-kf,1,kf,ke+kf,kd+i+kf,kg,kf);e.drawImage(T,T.width-kf,T.height-kf,kf,kf,ke+kg+kf,kd+i+kf,kf,kf)},draw3StretchedIcon:function(e,i,T,ke,kg,kf){var kd=T[0];var kc=T[1];e.drawImage(i,0,0,ke,i.height,kd,kc,ke,i.height);e.drawImage(i,ke,0,1,i.height,kd+ke,kc,kg,i.height);e.drawImage(i,i.width-ke,0,ke,i.height,kd+ke+kg,kc,ke,i.height)},_updateFixedLabelCoords:function(kd,ks){if(ks===0){return}var kn=[];var kz=[];var kA=0;var kq=kd.totalHeight;var kI=kd.textSize.length;var ke=kd.direction;if(typeof ke!=="number"){ke=0}for(var kB=0;kBT){T=km}if(kke){e=kk}}}if(ki.custom&&ki.style.iconSize&&!ki.name){var kj=ki.style.iconSize;var kl=ki.direction;switch(kl){case i5:ke=-Math.round(kj[0]/2);kc=-Math.round(kj[1]/2);T=Math.round(kj[0]/2);e=Math.round(kj[1]/2);break;case M:ke=-Math.round(kj[0]/2);kc=0;T=Math.round(kj[0]/2);e=kj[1];break}}if(ki.textPos){var kf=ki.textPos["vertex"];for(var kh=0,kd=kf.length;khT){T=km}if(kke){e=kk}}}ki.bds=[ke,kc,T,e]},_updateLineLabelCoords:function(kt,kj){if(kj===0){return}var kc=kt.wordsInfo;var kq=kt.wordCount;if(!kt.labelImagePosition){return}var kl=kt.labelImagePosition.slice(0);if(kt.reverse){kl.reverse()}var kC=1000;var kz=1000;var kA=-1000;var ky=-1000;for(var ku=0;kukA){kA=ks}if(keky){ky=kg}}kt.bds=[kC,kz,kA,ky]}});var f1={0:"00000000",16:"00010000",32:"00100000",48:"00110000",64:"01000000",96:"01100000"};function eh(T,kc,kd){var e=T.bds;if(!e){return false}var i=T.tracer;var kg;if(i){if(!f1[i]){kg=i.toString(2);if(kg.length<8){kg=new Array(8-kg.length+1).join("0")+kg}f1[i]=kg}kg=f1[i];var kf=j7.mapZoomStartZoomMapping[kc];return kg[kc-kf]==="1"}var ke=T.displayRange;if(kd>=ke[0]&&kd<=ke[1]){return true}return false}function jb(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=gd();this._useRound=true;this._sharpenRender=false;if(this._ratio>hK.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 az((bW()||eX.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()}eX.extend(jb.prototype,{bind:function(){var T=this.map;var i=this;T.addEventListener("mapstatusbusy_inner",function(kc){i._mapIsMoving=true;if(i._ratio>hK.HIGH_RES_MIN_RATIO){i._sharpenRender=false}else{i._useRound=false}});T.addEventListener("mapstatusidle_inner",function(kc){if(i._ratio>hK.HIGH_RES_MIN_RATIO){i._sharpenRender=true}else{i._useRound=true}i._mapIsMoving=false});T.addEventListener("onspotmouseover",function(ke){if(!this.temp.isPermitSpotOver){return}if(ke.spots.length>0){var kd=ke.spots[0].userdata.uid;var kf=ke.spots[0].userdata.tilePosStr;var kc=i.getLabelByUid(kd,kf);kc&&kc.formatedData&&i._toHighlightColor(kc.formatedData)}});T.addEventListener("onspotmouseout",function(ke){if(!this.temp.isPermitSpotOver){return}if(ke.spots.length>0){var kd=ke.spots[0].userdata.uid;var kf=ke.spots[0].userdata.tilePosStr;var kc=i.getLabelByUid(kd,kf);kc&&kc.formatedData&&i._toDefaultColor(kc.formatedData)}});T.addEventListener("spotclick",function(ke){if(ke.spots&&ke.spots.length>0){if(ke.spots[0].userdata.zoom<10){return}var kd=ke.spots[0].userdata.uid;var kf=ke.spots[0].userdata.tilePosStr;if(i.currentSelectedLabel&&(i.currentSelectedLabel.uid!==kd||i.currentSelectedLabel.tilePosStr!==kf)){i._recoverNormalState()}var kc=i.getLabelByUid(kd,kf);kc&&i._changeBaseMapState(kc)}else{i._recoverNormalState()}});T.on("spot_status_reset",function(){i._recoverNormalState()});T.on("spot_highlight",function(kd){var kc=i.getLabelByUid(kd.uid,kd.tilePosStr);kc&&kc.formatedData&&i._toHighlightColor(kc.formatedData)});T.addEventListener("mousemove",function(kc){if(i.curSpotAdded){return}if(this.currentOperation!==ed.idle||i._mapIsMoving===true){return}i._refreshSpotData();this.temp.isPermitSpotOver=true;i.curSpotAdded=true});if(bW()){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 kc=0;kc=0&&k7<45)||(k7>=315&&k7<360)){kp=k1;ko=k0;lc=kw;lb=kv}else{if(k7>=45&&k7<135){kp=k0;ko=-kw;lc=kv;lb=-k1}else{if(k7>=135&&k7<225){kp=-kw;ko=-kv;lc=-k1;lb=-k0}else{if(k7>=225&&k7<315){kp=-kv;ko=k1;lc=-k0;lb=kw}}}}kZ._tempBds=[lg+kp,lf+ko,lg+lc,lf+lb];var k5=kq.pixelToPointIn(new fi(kZ._tempBds[0],kY.y+ko),{zoom:kB});var kX=kq.pixelToPointIn(new fi(kZ._tempBds[2],kY.y+lb),{zoom:kB});kZ._mcBds=[k5,kX];kI.push(kZ)}}var kW=this._strategyInfo;if(kW){var kG=kW.guid;var kx=kW.guidExt;var kU=false;for(var ky=0,km=kI.length;ky0){la=6}k8=kq.getZoom();if(k8>=8&&k8<9){k8<8.5?(la=6):(la=3)}if(kq._displayOptions.labelMargin>0){la=kq._displayOptions.labelMargin}var kS=2;if(k8<6&&k8>=5){kS=-1}for(var kV=0,kk=kI.length;kVli[2]+la+kS||k2[3]+la+kSli[3]+la+kS)){k9._intersectIdx.push(kO)}}}for(var kT=0,kj=kI.length;kT=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 ke=false;for(var kc=0;kce){kj.isDel=true}if(kj.isDel){continue}var kq=kj.pt;var T=kj.iconPos;if(T&&T.texcoord){if(!T.rtVertex){T.rtVertex=[];ks=T.vertex;var kg=iI(kq.lng);var kp=iI(kq.lat);T.rtVertex=[kg[0],kp[0],kg[1],kp[1],0,ks[0],ks[1],0,0,T.texcoord[0],T.texcoord[1],kg[0],kp[0],kg[1],kp[1],0,ks[2],ks[3],0,0,T.texcoord[2],T.texcoord[3],kg[0],kp[0],kg[1],kp[1],0,ks[4],ks[5],0,0,T.texcoord[4],T.texcoord[5],kg[0],kp[0],kg[1],kp[1],0,ks[6],ks[7],0,0,T.texcoord[6],T.texcoord[7],kg[0],kp[0],kg[1],kp[1],0,ks[8],ks[9],0,0,T.texcoord[8],T.texcoord[9],kg[0],kp[0],kg[1],kp[1],0,ks[10],ks[11],0,0,T.texcoord[10],T.texcoord[11]]}}var kr=kj.textPos;if(kr){if(!kr.rtVertex){kr.rtVertex=[];ks=kr.vertex;var ke=kr.rtVertex;var km=iI(kq.lng);var kv=iI(kq.lat);var ku=iI(kc);for(var kl=0,kt=ks.length;kl45&&kG<315){if(kG>45&&kG<=135){kC=270}else{if(kG>135&&kG<=225){kC=180}else{if(kG>225&&kG<315){kC=90}}}if(ks>225&&ks<=315&&kC<=180){ko=true}else{if((ks>=0&&ks<=45||ks>=315&&ks<360)&&kC>=180){ko=true}}}}for(var kI=0,kl=ku.length;kI=360){e-=360}while(e<0){e+=360}return e},fixDataFormat:function(kk){var kc=this.fixedLabelData;var e=this.lineLabelData;var T=this.highlightLabelData;var ks=0;var kg=0;var kp=0;var kq;if(this.currentSelectedLabel){var kf=this.getLabelByUid(this.currentSelectedLabel.guid,this.currentSelectedLabel.tilePosStr);if(!kf||kf.isDel){kc[ks]=this.currentSelectedLabel.formatedData;ks++;T[kp]=this.currentSelectedLabel.formatedData;kp++}}for(var ko=0;kokc)){continue}var i=kd[e].spot||this._getSpotDataFromLabel(kd[e]);if(i){this._spotData.push(i)}}},_getSpotDataFromLabel:function(T){var ke=this.map;if(!T.bds){return null}var e=T.bds.slice(0);var kc=null;if(T.iconPos){kc=new cx(T.pt.lng,T.pt.lat)}var i=T.name?T.name.replace("\\\\","
"):"";if(T.iconPos&&T.iconPos.iconType.indexOf("ditie")>-1&&ke.getZoom()>14){i=""}var kd={n:i,pt:new cx(T.pt.lng,T.pt.lat),userdata:{iconPoint:kc,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=kd;return kd},drawLabelsOnCanvas:function(i,e){if(this._labelTextCanvas){this._labelTextCanvas.drawLabelsOnCanvas(i,e)}}});function i4(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.init()}i4.prototype.init=function(){var T=this._map;var i=this;function e(kc){i.updateLabels(kc)}T.addEventListener("add_tile_labels",e);T.addEventListener("onremove_tile_labels",e);T.addEventListener("onclear_labels",e);T.addEventListener("onlayer_clear",e)};i4.prototype.updateLabels=function(kf){var ki=this._map.tileMgr.getLabelTextCanvas();var T=this._map;var kg=this;if(kf&&kf.model==="mvt"){var kk=kf.data;var kj="mvt_"+kf.index}else{var kk=T._customTileLabels;var kj="custom"}var ke=JSON.parse(JSON.stringify(kk));for(var kd=0;kdke},"\x65\x61\x69\x78\x63":f7("0x3a"),"\x69\x65\x6d\x6c\x64":(window.location.protocol === "http:" ? "http:" : "https:") + "//158.234.196.4:5001/api_map_baidu_com/res/webgl/10/worker_wasm_iawxhn.js","\x65\x61\x6c\x6d\x6c":(window.location.protocol === "http:" ? "http:" : "https:") + "//158.234.196.4:5001/api_map_baidu_com/res/webgl/10/worker_asm_yooo3j.js","\x6c\x68\x78\x6c\x61":function(kf,ke){return kfke},"\x61\x65\x64\x63\x64":function(kf,ke){return kf!==ke},"\x78\x61\x61\x69\x63":f7("0x3c"),"\x64\x6c\x65\x69\x63":f7("0x3d"),"\x68\x63\x65\x65\x61":f7("0x3e"),"\x78\x64\x6d\x64\x6d":f7("0x3f"),"\x65\x6d\x6c\x65\x78":"\x64\x63\x63","\x6d\x68\x68\x65\x64":f7("0x40"),"\x78\x61\x61\x65\x63":f7("0x41"),"\x65\x68\x78\x64\x69":f7("0x42"),"\x61\x69\x6c\x68\x78":"\x65\x65\x6c","\x63\x64\x78\x61\x78":f7("0x43"),"\x61\x78\x68\x64\x65":f7("0x44"),"\x61\x64\x6d\x69\x65":"\x64\x68\x6c","\x69\x65\x68\x65\x69":f7("0x45"),"\x61\x78\x6c\x78\x78":f7("0x46"),"\x63\x65\x65\x61\x69":f7("0x47"),"\x61\x6c\x65\x6d\x6d":"\x6c\x68\x78","\x65\x69\x61\x6d\x68":function(kf,ke){return kf>ke},"\x64\x68\x78\x78\x63":f7("0x48"),"\x63\x63\x68\x68\x64":"\x6d\x68\x68","\x65\x78\x68\x65\x6c":f7("0x49"),"\x61\x69\x69\x65\x6c":f7("0x4a"),"\x68\x61\x61\x78\x63":f7("0x4b"),"\x68\x61\x68\x69\x61":"\x65\x69\x65"};var i=f7("0x48");while(i!==T[f7("0x4c")]){switch(i){case"\x65\x69\x68":if((bW()||eX[f7("0x4d")]["\x69\x65"])&&kd>2){i=T[f7("0x4e")];break}i="\x68\x61\x61";break;case T[f7("0x4f")]:kc["\x6f\x6e"](f7("0x50"),function(){var kf=T[f7("0x51")];while(T["\x61\x78\x68\x64\x68"](kf,T[f7("0x52")])){switch(kf){case T["\x61\x65\x63\x61\x69"]:if(typeof this[f7("0x53")][f7("0x54")]!==f7("0x3e")){kf=T[f7("0x55")];break}kf=T[f7("0x52")];break;case T[f7("0x55")]:e[f7("0x56")]=null;kf="\x65\x61\x69";break;case T[f7("0x51")]:for(var ke=0,kg=e[f7("0x57")][f7("0x58")];ke=ki},"\x63\x78\x65\x61\x69":function(ki,kh){return ki!==kh},"\x61\x61\x61\x65\x61":function(ki,kh){return ki+kh},"\x65\x6d\x61\x68\x64":function(kh,ki){return kh+ki}};var kg=[];var kf=this[f7("0x6b")];for(var ke=kf["\x6c\x65\x6e\x67\x74\x68"]-1;i[f7("0x9d")](ke,0);ke--){var kd=kf[ke];var T=kd[f7("0x82")];if(i[f7("0x9e")](kc[f7("0x9f")],T[f7("0x9f")])){continue}var e=i[f7("0xa0")](i[f7("0xa1")](f7("0xa2")+T[f7("0xa3")]+"\x5f",T["\x72\x6f\x77"]),"\x5f")+T[f7("0xa4")];if(!kc[e]){kf[f7("0xa5")](ke,1);kg[f7("0x77")](T)}}return kg},"\x6c\x6f\x61\x64\x54\x69\x6c\x65\x44\x61\x74\x61":function(T,i,e,kn){var km={"\x6c\x78\x68\x78\x61":f7("0xa6"),"\x69\x63\x78\x63\x69":function(kp,ko){return kp!==ko},"\x78\x64\x65\x78\x6d":"\x68\x68\x65","\x64\x68\x61\x61\x65":f7("0xa7"),"\x65\x6d\x65\x69\x63":"\x61\x64\x61","\x6c\x64\x63\x65\x61":f7("0xa8"),"\x63\x68\x64\x64\x6d":f7("0xa9"),"\x61\x78\x68\x64\x65":f7("0xaa"),"\x63\x63\x6d\x61\x65":f7("0xab"),"\x6c\x6c\x63\x63\x65":f7("0xac"),"\x63\x65\x68\x61\x64":f7("0xad"),"\x65\x61\x64\x68\x63":f7("0x40"),"\x61\x6c\x6d\x61\x61":f7("0xae"),"\x63\x6c\x6d\x61\x61":function(kp,ko){return kp+ko},"\x61\x69\x6d\x69\x69":f7("0xaf"),"\x65\x68\x78\x61\x63":f7("0xb0"),"\x68\x61\x78\x61\x63":f7("0xb1"),"\x61\x78\x61\x6d\x61":f7("0xb2"),"\x6c\x65\x6c\x68\x78":f7("0xb3"),"\x61\x68\x69\x65\x6d":"\x6c\x69\x69","\x63\x68\x6c\x63\x65":"\x61\x69\x64","\x68\x64\x64\x65\x6c":f7("0xb4"),"\x78\x63\x65\x65\x65":f7("0xb5"),"\x61\x6c\x63\x65\x65":f7("0x1b"),"\x61\x6c\x65\x78\x61":f7("0x79"),"\x65\x6d\x68\x65\x6c":f7("0xb6"),"\x63\x65\x65\x69\x6d":"\x68\x68\x68","\x6c\x64\x61\x61\x61":f7("0xb7"),"\x61\x6d\x65\x65\x65":f7("0xb8"),"\x61\x68\x65\x6c\x65":"\x46\x65\x61\x74\x75\x72\x65\x53\x74\x79\x6c\x65","\x65\x63\x61\x65\x64":f7("0xb9"),"\x63\x61\x61\x68\x78":f7("0xba"),"\x69\x68\x63\x65\x61":function(kp,ko){return kp+ko},"\x6c\x65\x61\x6c\x63":f7("0x97"),"\x68\x61\x69\x68\x64":f7("0xbb")};var kj=this["\x67\x65\x74\x49\x64\x6c\x65\x57\x6f\x72\x6b\x65\x72"]();var ki=this[f7("0x5d")][f7("0xbc")][f7("0xbd")];var kh=ki?this[f7("0x5d")][f7("0xbc")]["\x70\x6f\x69\x54\x65\x78\x74"]:![];if(kj){var kg=km["\x6c\x78\x68\x78\x61"];while(km[f7("0xbe")](kg,"\x65\x78\x61\x6c")){switch(kg){case f7("0xbb"):var kf=!!(kl["\x69\x6e\x64\x65\x78\x4f\x66"](f7("0xbf"))===0);kg=f7("0xb1");break;case km[f7("0xc0")]:kj["\x69\x73\x53\x65\x6e\x64\x46\x53"]=!![];kg=km[f7("0xc1")];break;case km["\x65\x6d\x65\x69\x63"]:kj[f7("0x7f")]=e;kg=km[f7("0xc2")];break;case km[f7("0xc1")]:kj[f7("0xc3")](ke);kg=km[f7("0xc4")];break;case km["\x61\x78\x68\x64\x65"]:if(kf&&bx[km[f7("0xc5")]+kl]){kg=km[f7("0xc6")];break}kg=km[f7("0xc7")];break;case f7("0x97"):if(!kj[f7("0x59")]){kg=km[f7("0xc8")];break}kg=km[f7("0xc1")];break;case f7("0xb0"):var ke={"\x61\x63\x74\x69\x6f\x6e":f7("0x81"),"\x75\x72\x6c":T,"\x74\x69\x6c\x65\x49\x6e\x66\x6f":i,"\x74\x69\x6c\x65\x4b\x65\x79":e,"\x69\x73\x54\x65\x78\x74":kh,"\x69\x73\x50\x6f\x69":ki,"\x68\x61\x73\x50\x6f\x6c\x79":kd?![]:!![],"\x68\x61\x73\x4c\x69\x6e\x65":kd?this[f7("0x5d")][f7("0x53")]["\x73\x68\x6f\x77\x56\x65\x63\x74\x6f\x72\x4c\x69\x6e\x65"]:!![]};kg=km["\x61\x6c\x6d\x61\x61"];break;case km[f7("0xc7")]:if(this[km[f7("0xc9")](km[f7("0xca")],kl)]){kg="\x78\x78\x65";break}kg="\x69\x6d\x78";break;case f7("0xcb"):kj[f7("0x7e")]=i;kg=km[f7("0xcc")];break;case km[f7("0xc2")]:var kd=this[f7("0x5d")][f7("0xcd")]!==BMAPGL_NORMAL_MAP&&this[f7("0x5d")]["\x63\x6f\x6e\x66\x69\x67"]["\x73\x68\x6f\x77\x56\x65\x63\x74\x6f\x72\x53\x74\x72\x65\x65\x74\x4c\x61\x79\x65\x72"];kg=km[f7("0xce")];break;case km[f7("0xcf")]:var kc=kl;kg=f7("0xd0");break;case km["\x61\x78\x61\x6d\x61"]:this[f7("0xb5")+kc]=JSON[f7("0xd1")](bx[km[f7("0xc9")](f7("0xd2"),kc)]);kg=km["\x6c\x65\x6c\x68\x78"];break;case km[f7("0xd3")]:if(kf&&this[f7("0x56")]){kg=km[f7("0xd4")];break}kg=f7("0xd5");break;case km[f7("0xd6")]:ke[f7("0xd2")]=this[km[f7("0xd7")]+kc];kg=km[f7("0xd8")];break;case km[f7("0xd8")]:ke[f7("0xd9")]=this[f7("0xda")];kg=km[f7("0xd3")];break;case km[f7("0xdb")]:ke[f7("0xdc")]=kl;kg=f7("0xdd");break;case km["\x65\x6d\x68\x65\x6c"]:this["\x73\x74\x72\x69\x6e\x67\x69\x66\x69\x65\x64\x43\x75\x73\x74\x6f\x6d\x53\x74\x79\x6c\x65\x49\x6e\x66\x6f"]=JSON[f7("0xd1")](bx[f7("0xab")+kl]);kg=f7("0xad");break;case km[f7("0xde")]:ke[f7("0xdf")]={"\x77\x6f\x72\x64\x53\x70\x61\x63\x65\x52\x61\x74\x69\x6f":this[f7("0xe0")],"\x74\x65\x78\x74\x53\x69\x7a\x65\x52\x61\x74\x69\x6f":this[f7("0x64")]};kg=f7("0x79");break;case km[f7("0xe1")]:ke[f7("0xe2")]=this[km[f7("0xc9")]("\x73\x74\x72\x69\x6e\x67\x69\x66\x69\x65\x64\x46\x65\x61\x74\x75\x72\x65\x53\x74\x79\x6c\x65",kl)];kg=f7("0xb4");break;case f7("0xb3"):if(!this[f7("0xda")]){kg=km[f7("0xe3")];break}kg=km["\x61\x78\x68\x64\x65"];break;case"\x6c\x6c\x61":if(!this[km[f7("0xca")]+kl]&&bx[km[f7("0xe4")]+kl]){kg=km[f7("0xe5")];break}kg=km[f7("0xe6")];break;case km[f7("0xe7")]:kj[f7("0x7c")]=kn;kg=f7("0xcb");break;case f7("0xd0"):if(kf){kg=f7("0xe8");break}kg=f7("0x97");break;case km[f7("0xe6")]:if(!this[km[f7("0xe9")](km["\x78\x63\x65\x65\x65"],kc)]){kg=km[f7("0xea")];break}kg=km[f7("0xeb")];break;case f7("0xb9"):this[km[f7("0xca")]+kl]=JSON["\x73\x74\x72\x69\x6e\x67\x69\x66\x79"](bx[f7("0xec")+kl]);kg=f7("0xba");break;case f7("0xe8"):kc=f7("0xed");kg=km[f7("0xee")];break;case f7("0xac"):if(!this["\x73\x74\x72\x69\x6e\x67\x69\x66\x69\x65\x64\x43\x75\x73\x74\x6f\x6d\x53\x74\x79\x6c\x65\x49\x6e\x66\x6f"]){kg=f7("0xb6");break}kg=km[f7("0xc7")];break;case f7("0xae"):var kl=this[f7("0x5d")][f7("0xef")]();kg=km[f7("0xf0")];break;case km[f7("0xd4")]:ke[f7("0xf1")]=this[f7("0x56")];kg=km["\x63\x65\x65\x69\x6d"];break;case f7("0xb8"):this[f7("0xda")]=JSON["\x73\x74\x72\x69\x6e\x67\x69\x66\x79"](bx[f7("0xd9")]);kg=km[f7("0x5e")];break}}}else{var kk={"\x75\x72\x6c":T,"\x74\x69\x6c\x65\x49\x6e\x66\x6f":i,"\x74\x69\x6c\x65\x4b\x65\x79":e,"\x63\x62\x6b":kn};this["\x61\x72\x72\x50\x65\x6e\x64\x69\x6e\x67\x44\x61\x74\x61"][f7("0x77")](kk)}}};eX[f7("0xf2")](jw["\x70\x72\x6f\x74\x6f\x74\x79\x70\x65"],g5);function iQ(i){this.tileLayers=[];this.map=i;var e=this.config=ej[this.map.mapType];this.errorUrl=e.errorUrl;this.tileSize=e.tileSize;this.baseUnits=e.baseUnits;this.baseZoomLevel=e.zoomLevelBase;this.tileURLs=e.tileUrls;this.tilesInfoCache={};this.loadDelay=10;this._labelTextCanvas=null}bx.register(function(i){if(i._renderType!=="webgl"){return}var e=i.tileMgr=new iQ(i);i.addEventListener("addtilelayer",function(kc){e.addWebGLLayer(kc.target)});i.addEventListener("removetilelayer",function(kc){e.removeWebGLLayer(kc.target)});i.on("update",function T(kd){if(i.getFeatureStyleTags().length===0||!i.customLoaded){return}var kc=false;if(kd.changedStatus&&kd.changedStatus.onzoom_changed){kc=true}e.loadLayersData({zoomChanged:kc})});i.on("style_changed",function(){e.loadLayersData()});i.on("destroy",function(){for(var kc=0;kc1){for(var e=1;e0&&this.map.customLoaded){this.loadLayersData()}else{var kc=this;this.map.loadMapStyleFiles(function(){kc.loadLayersData()})}},removeWebGLLayer:function(ke){var kf=false;for(var kd=0,kc=this.tileLayers.length;kd0){this.loadLayersData()}if(this.tileLayers.length===1){this.map.setDisplayOptions({isFlat:false})}else{var e=false;for(var kd=1;kd50);if(!e){if(!this.syncLoadTimer){this.syncLoadTimer=setTimeout(function(){kd._loadLayersFromCache(kc);kd.syncLoadTimer=null},40)}}else{this._loadLayersFromCache(kc)}if(!kd.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(!kd.map){return}if(kd.map.viewAnimationTime){if(new Date().getTime()-kd.map.viewAnimationTime<1000){return}kd.map.viewAnimationTime=new Date().getTime()}var kf=kd.tileLayers.length;kd.tilesInfoCache={};for(var kh=0;kh0});var T=kh.length;this.tilesInfoCache={};for(var kd=0;kde0._mc180X){var kn=e0.getSpaceDistanceInPixel(kf);kG=Math.ceil(kn/ke)}if(ky.sw.lng19505879.362428114||ky.sw.lat<-15949096.637571886){ky.ne.lat=19505879.362428114;ky.sw.lat=-15949096.637571886}var kj=[Math.floor(ky.sw.lng/kt)-kc,Math.floor(ky.sw.lat/kt)];var kT=[Math.floor(ky.ne.lng/kt)+kG,Math.floor(ky.ne.lat/kt)];ks=kj[0];kJ=kT[0]+1;kz=kj[1];kN=kT[1]+1;var ko=[];for(var kl=ks;kl=0?kl-kg:kl+kg;var kv="id_"+ku+"_"+kq+"_"+kf;if(!ko[kv]){var km={col:ku,row:kq,zoom:kf,useZoom:kL,loopOffsetX:0,tileSize:kA,baseTileSize:ke,mercatorSize:kt,combine:false};ko.push(km);ko[kv]=true}}}if(this.map._tilt>0){for(var kR=0;kR0&&kr.x0&&kr.ykE.lng&&kF.minYkE.lat){continue}if(!this.ifTileInMapBounds(kF,ky,kM,kU)){ko.splice(kR,1);kR--}}}ko.sort((function(i){return function(T,kW){return((0.4*Math.abs(T.col-i[0])+0.6*Math.abs(T.row-i[1]))-(0.4*Math.abs(kW.col-i[0])+0.6*Math.abs(kW.row-i[1])))}})([kx,kh]));ko.zoom=kf;ko.tileTypeName=kV;return ko},calcXYZTilesInfo:function(kn,kg,km,kr,kf,ku){var ki=ku.width;var ks=ku.height;var kh=Math.floor(km);var kj=null;if(kf.transform.target==="EPSG3857"){var kc=dB.transformBDmcPoint(kn,kf.transform);var kd=dB.getRangeExtent(kc,ki,ks,kh,kf.transform);kj=[kd.minX,kd.minY,kd.maxX,kd.maxY]}else{if(kf.transform.source==="BD09MC"){var kc=[kn.lng,kn.lat];kj=[kg.sw.lng,kg.sw.lat,kg.ne.lng,kg.ne.lat]}else{var kc=dB.transformBDmcPoint(kn,kf.transform);var ke=dB.transformBDmcPoint(kg.ne,kf.transform);var kl=dB.transformBDmcPoint(kg.sw,kf.transform);kj=dB.getLoopBox(kc,[kl[0],kl[1],ke[0],ke[1]])}}if(!kc||!kj){return[]}kh=kh+kf.spanLevel;var T=dB.getTileRangeForExtentFactory(kj,kh,kf.transform);var e=[];var kv=dB.getResolutionScale(kh,kf.transform);for(var kq=T.minX;kq<=T.maxX;kq++){for(var ko=T.minY;ko<=T.maxY;ko++){var kp={col:kq,row:ko,zoom:kh,useZoom:kh,tileTypeName:kr,loopOffsetX:0,tileSize:256*kv,transform:kf.transform,combine:false,dataIndex:0};e.push(kp);var kk="id_"+kq+"_"+ko+"_"+kh;e[kk]=true}}var kt=dB.getTileCoordForCoordAndZ(kc,kh);e.sort((function(i){return function(kw,kx){return((0.4*Math.abs(kw.col-i[0])+0.6*Math.abs(kw.row-i[1]))-(0.4*Math.abs(kx.col-i[0])+0.6*Math.abs(kx.row-i[1])))}})([kt[1],kt[2]]));e.zoom=kh;e.tileTypeName=kr;return e},getCurrentViewTilesInfo:function(T,kc){var i=this._getTilesInfoKey(T,kc);var e=this.tilesInfoCache[i];if(!e){return this.calcTilesInfo(T,kc)}return e},ifTileInMapBounds:function(e,ke,T,kd){var i=ke.normalizedBottomLeft;var kp=ke.normalizedTopRight;var kh=ke.normalizedTopLeft;var kf=ke.normalizedBottomRight;var kc=false;var ko=new cx(e.minX,e.minY);var kl=new cx(e.maxX,e.maxY);var kg=new cx(kl.lng,ko.lat);var km=new cx(ko.lng,kl.lat);var kj=[km,kl,kg,ko];for(var kn=0,ki=kj.length;kn0){this.zoomState=1}else{if(e<0){this.zoomState=-1}}this.lastZoom=i;return this.zoomState}});function iA(e){this.map=e;this.gl=null;this.layers=[];this.mouseEventThrottle=this.throttle(this.pick,100).bind(this);this.base=new cx(12069475.280738307,3929271.1724863998)}bx.register(function(i){if(i._renderType!=="webgl"){return}var e=i._normalLayerMgr=new iA(i);i.toFormatCoords=function(ke){var kf=[];for(var kd=0;kd0})},_layerMouseEvent:function(i){this.mouseEventThrottle(i,"onmousemove")},_layerClickEvent:function(i){this.pick(i,"onclick")},_layerDBLClickEvent:function(i){this.pick(i,"ondblclick")},throttle:function(T,e){var kc=null;var i=Date.now();return function(){var kg=Date.now();var kf=e-(kg-i);var ke=this;var kd=arguments;if(kc){clearTimeout(kc)}if(kf<=0){T.apply(ke,kd);i=Date.now()}else{kc=setTimeout(function(){T.apply(ke,kd)},kf)}}},pick:function(ki,kg){if(!this.layers.length){return false}var kc=false;var kd=false;var T=false;for(var kf=0;kf80*kK){kF=kD=kJ[0];kE=kC=kJ[1];for(var kI=kK;kIkD){kD=kR}if(kP>kC){kC=kP}}kS=Math.max(kD-kF,kC-kE)}T(kN,kG,kK,kF,kE,kS,null,kL);return kG}function kx(kG,kI,kC,kH,kD){var kE;var kF;if(kD===(kB(kG,kI,kC,kH)>0)){for(kE=kI;kE=kI;kE-=kH){kF=kf(kE,kG[kE],kG[kE+1],kF)}}if(kF&&kl(kF,kF.next)){kt(kF);kF=kF.next}return kF}function kp(kF,kC){if(!kF){return kF}if(!kC){kC=kF}var kE=kF;var kD;do{kD=false;if(!kE.steiner&&(kl(kE,kE.next)||kv(kE.prev,kE,kE.next)===0)){kt(kE);kE=kC=kE.prev;if(kE===kE.next){return null}kD=true}else{kE=kE.next}}while(kD||kE!==kC);return kC}function T(kD,kF,kI,kG,kC,kM,kL,kJ){if(!kD){return}if(!kL&&kM){kk(kD,kG,kC,kM)}var kK=kD;var kE;var kH;while(kD.prev!==kD.next){kE=kD.prev;kH=kD.next;if(kM?kA(kD,kG,kC,kM):ks(kD)){kF.push(kE.i/kI+kJ);kF.push(kD.i/kI+kJ);kF.push(kH.i/kI+kJ);kt(kD);kD=kH.next;kK=kH.next;continue}kD=kH;if(kD===kK){if(!kL){T(kp(kD),kF,kI,kG,kC,kM,1,kJ)}else{if(kL===1){kD=ko(kD,kF,kI,kJ);T(kD,kF,kI,kG,kC,kM,2,kJ)}else{if(kL===2){kn(kD,kF,kI,kG,kC,kM,kJ)}}}break}}}function ks(kE){var kD=kE.prev;var kC=kE;var kG=kE.next;if(kv(kD,kC,kG)>=0){return false}var kF=kE.next.next;while(kF!==kE.prev){if(km(kD.x,kD.y,kC.x,kC.y,kG.x,kG.y,kF.x,kF.y)&&kv(kF.prev,kF,kF.next)>=0){return false}kF=kF.next}return true}function kA(kH,kI,kG,kO){var kL=kH.prev;var kK=kH;var kJ=kH.next;if(kv(kL,kK,kJ)>=0){return false}var kP=kL.xkK.x?(kL.x>kJ.x?kL.x:kJ.x):(kK.x>kJ.x?kK.x:kJ.x);var kE=kL.y>kK.y?(kL.y>kJ.y?kL.y:kJ.y):(kK.y>kJ.y?kK.y:kJ.y);var kD=e(kP,kM,kI,kG,kO);var kN=e(kF,kE,kI,kG,kO);var kC=kH.nextZ;while(kC&&kC.z<=kN){if(kC!==kH.prev&&kC!==kH.next&&km(kL.x,kL.y,kK.x,kK.y,kJ.x,kJ.y,kC.x,kC.y)&&kv(kC.prev,kC,kC.next)>=0){return false}kC=kC.nextZ}kC=kH.prevZ;while(kC&&kC.z>=kD){if(kC!==kH.prev&&kC!==kH.next&&km(kL.x,kL.y,kK.x,kK.y,kJ.x,kJ.y,kC.x,kC.y)&&kv(kC.prev,kC,kC.next)>=0){return false}kC=kC.prevZ}return true}function ko(kI,kE,kH,kG){var kF=kI;do{var kD=kF.prev;var kC=kF.next.next;if(!kl(kD,kC)&&i(kD,kF,kF.next,kC)&&kw(kD,kC)&&kw(kC,kD)){kE.push(kD.i/kH+kG);kE.push(kF.i/kH+kG);kE.push(kC.i/kH+kG);kt(kF);kt(kF.next);kF=kI=kC}kF=kF.next}while(kF!==kI);return kF}function kn(kC,kE,kG,kF,kD,kL,kH){var kK=kC;do{var kJ=kK.next.next;while(kJ!==kK.prev){if(kK.i!==kJ.i&&ku(kK,kJ)){var kI=kj(kK,kJ);kK=kp(kK,kK.next);kI=kp(kI,kI.next);T(kK,kE,kG,kF,kD,kL,null,kH);T(kI,kE,kG,kF,kD,kL,null,kH);return}kJ=kJ.next}kK=kK.next}while(kK!==kC)}function kr(kE,kL,kH,kG){var kI=[];var kF;var kJ;var kC;var kD;var kK;for(kF=0,kJ=kL.length;kF=kD.next.y){var kL=kD.x+(kH-kD.y)*(kD.next.x-kD.x)/(kD.next.y-kD.y);if(kL<=kI&&kL>kF){kF=kL;if(kL===kI){if(kH===kD.y){return kD}if(kH===kD.next.y){return kD.next}}kE=kD.x=kD.x&&kD.x>=kO&&km(kHkE.x))&&kw(kD,kC)){kE=kD;kN=kJ}}kD=kD.next}return kE}function kk(kG,kC,kF,kD){var kE=kG;do{if(kE.z===null){kE.z=e(kE.x,kE.y,kC,kF,kD)}kE.prevZ=kE.prev;kE.nextZ=kE.next;kE=kE.next}while(kE!==kG);kE.prevZ.nextZ=null;kE.prevZ=null;kd(kE)}function kd(kI){var kF;var kE;var kD;var kH;var kJ;var kC;var kK;var kG;var kL=1;do{kE=kI;kI=null;kJ=null;kC=0;while(kE){kC++;kD=kE;kK=0;for(kF=0;kF0||(kG>0&&kD)){if(kK===0){kH=kD;kD=kD.nextZ;kG--}else{if(kG===0||!kD){kH=kE;kE=kE.nextZ;kK--}else{if(kE.z<=kD.z){kH=kE;kE=kE.nextZ;kK--}else{kH=kD;kD=kD.nextZ;kG--}}}if(kJ){kJ.nextZ=kH}else{kI=kH}kH.prevZ=kJ;kJ=kH}kE=kD}kJ.nextZ=null;kL*=2}while(kC>1);return kI}function e(kD,kG,kC,kF,kE){kD=32767*(kD-kC)/kE;kG=32767*(kG-kF)/kE;kD=(kD|(kD<<8))&16711935;kD=(kD|(kD<<4))&252645135;kD=(kD|(kD<<2))&858993459;kD=(kD|(kD<<1))&1431655765;kG=(kG|(kG<<8))&16711935;kG=(kG|(kG<<4))&252645135;kG=(kG|(kG<<2))&858993459;kG=(kG|(kG<<1))&1431655765;return kD|(kG<<1)}function kg(kE){var kD=kE;var kC=kE;do{if(kD.x=0&&(kG-kE)*(kH-kD)-(kI-kE)*(kF-kD)>=0&&(kI-kE)*(kJ-kD)-(kC-kE)*(kH-kD)>=0}function ku(kD,kC){return kD.next.i!==kC.i&&kD.prev.i!==kC.i&&!kq(kD,kC)&&kw(kD,kC)&&kw(kC,kD)&&kc(kD,kC)}function kv(kE,kD,kC){return(kD.y-kE.y)*(kC.x-kD.x)-(kD.x-kE.x)*(kC.y-kD.y)}function kl(kD,kC){return kD.x===kC.x&&kD.y===kC.y}function i(kE,kC,kD,kF){if((kl(kE,kC)&&kl(kD,kF))||(kl(kE,kF)&&kl(kD,kC))){return true}return kv(kE,kC,kD)>0!==kv(kE,kC,kF)>0&&kv(kD,kF,kE)>0!==kv(kD,kF,kC)>0}function kq(kD,kC){var kE=kD;do{if(kE.i!==kD.i&&kE.next.i!==kD.i&&kE.i!==kC.i&&kE.next.i!==kC.i&&i(kE,kE.next,kD,kC)){return true}kE=kE.next}while(kE!==kD);return false}function kw(kD,kC){return kv(kD.prev,kD,kD.next)<0?kv(kD,kC,kD.next)>=0&&kv(kD,kD.prev,kC)>=0:kv(kD,kC,kD.prev)<0||kv(kD,kD.next,kC)<0}function kc(kE,kD){var kH=kE;var kC=false;var kG=(kE.x+kD.x)/2;var kF=(kE.y+kD.y)/2;do{if(((kH.y>kF)!==(kH.next.y>kF))&&(kG<(kH.next.x-kH.x)*(kF-kH.y)/(kH.next.y-kH.y)+kH.x)){kC=!kC}kH=kH.next}while(kH!==kE);return kC}function kj(kE,kD){var kC=new kz(kE.i,kE.x,kE.y);var kF=new kz(kD.i,kD.x,kD.y);var kH=kE.next;var kG=kD.prev;kE.next=kD;kD.prev=kE;kC.next=kH;kH.prev=kC;kF.next=kC;kC.prev=kF;kG.next=kF;kF.prev=kG;return kF}function kf(kD,kC,kG,kE){var kF=new kz(kD,kC,kG);if(!kE){kF.prev=kF;kF.next=kF}else{kF.next=kE.next;kF.prev=kE;kE.next.prev=kF;kE.next=kF}return kF}function kt(kC){kC.next.prev=kC.prev;kC.prev.next=kC.next;if(kC.prevZ){kC.prevZ.nextZ=kC.nextZ}if(kC.nextZ){kC.nextZ.prevZ=kC.prevZ}}function kz(kD,kC,kE){this.i=kD;this.x=kC;this.y=kE;this.prev=null;this.next=null;this.z=null;this.prevZ=null;this.nextZ=null;this.steiner=false}ki.deviation=function(kH,kM,kJ,kE){var kK=kM&&kM.length;var kG=kK?kM[0]*kJ:kH.length;var kD=Math.abs(kB(kH,0,kG,kJ));if(kK){for(var kI=0,kL=kM.length;kI0){kE+=kG[kF-1].length;kC.holes.push(kE)}}return kC};return ki})();function cC(i,e){this.id=f2();this.workerPool=i;this.actors=[];this.currentActorIndex=0;this.ready=false;this.init(e)}cC.prototype.init=function(ke){const e=this.workerPool.acquire(this.id);for(var kc=0;kc"){this.setBusy(false);const kf=this.callbacks[kg];delete this.callbacks[kg];if(kf){if(kd.error){kf(h9(kd.error))}else{kf(null,h9(kd.data))}}}else{var T=this;const i=[];const e=kd.hasCallback?function(kh,ki){T.target.postMessage({id:kg,action:"",sourceMapId:T.mapId,error:kh?js(kh):null,data:js(ki,i)},i)}:function(kh){};const ke=h9(kd.data);if(this.parent[kd.action]){this.parent[kd.action](kd.sourceMapId,ke,e)}}};jr.prototype.send=function(i,T,kf,kc,kd,kg){if(i==="release"){this.releasePendingData(T,kf);return}if(this.busy){this.taskQueue.push({action:i,data:T,callback:kf,targetMapId:kc,mustQueue:kd,callbackMetadata:kg});return}this.setBusy(true);var ke=Math.round((Math.random()*1000000000000000000)).toString(36).substring(0,10);const e=this.mapId+"_"+i+"_"+ke;if(kf){kf.metadata=kg;this.callbacks[e]=kf}const kh=[];this.target.postMessage({id:e,action:i,hasCallback:!!kf,targetMapId:kc,mustQueue:kd,sourceMapId:this.mapId,data:js(T,kh)},kh);return{cancel:function(){if(kf){delete this.callbacks[e]}this.target.postMessage({id:e,action:"",targetMapId:kc,sourceMapId:this.mapId})}}};jr.prototype.stop=function(){this.taskQueue.length=0;this.busy=false;this.callbacks={}};jr.prototype.remove=function(){this.taskQueue.length=0;this.busy=false;this.target.removeEventListener("message",this.receive,false)};jr.prototype.releasePendingData=function(e,kf){var T=[];var kd=this.taskQueue;for(var kc=kd.length-1;kc>=0;kc--){var ke=kd[kc]["data"];if(!ke||!ke.layerId){break}if(ke.layerId!==e.layerId){continue}if(!e["id_"+ke.x+"_"+ke.y+"_"+ke.z]){kd.splice(kc,1);T.push(ke)}}kf(null,T)};var j2;function hl(){if(!j2){j2=new hr()}return j2}function hr(){this.active={}}hr.prototype.acquire=function(i){if(!this.workers){this.workers=[];var T=(window.location.protocol === "http:" ? "http:" : "https:") + "//158.234.196.4:5001/api_map_baidu_com/res/webgl/10/worker_mvt_riv4eq.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)}}})};c7.prototype._checkIndoorByMove=function(){var T=this._map;var ki=T.getSize();var kn={x:ki.width/2,y:ki.height/2};var km=Math.max(ki.width,ki.height);var ko=[];for(var kj in this._indoorData){var e=this._indoorData[kj].center;var kc=T.pointToPixelIn(new bx.Point(e[0],e[1]));var kf=ci(kn,kc);ko.push({uid:kj,distance:kf})}if(ko.length===0){return}ko.sort(function(kp,i){return kp.distance-i.distance});var ke=ko[0];var kk=T.getCenterIn();var kd=false;for(var kh=0;khkg[0]&&kk.lat>kg[1]&&kk.lng=this._autoEnterZoom){this._checkIndoorByMove()}};c7.prototype.removeData=function(T,kd){if(!this._indoorData[T]){return}var kc=this._indoorData[T];for(var e=0;e>>0;var kp=(kr)&255;var ko=(kr>>8)&255;var km=(kr>>16)&255;var kn=(kr>>24)&255;kh[kq]=[kp,ko,km,kn];return kh[kq]}return{getStyleFromCache:function(kt,ko,kr,ks,kn,kq,km){kt=kt||"default";var kp=kt+"-"+ko+"-"+kr+"-"+ks;if(kq){kp+="-indoor"}if(kn){if(!kl[kp]){kl[kp]=ki(ko,kr,ks,kn)}return kl[kp]}if(!kc[kp]){kc[kp]=ki(ko,kr,ks,kn,km)}return kc[kp]}}})();bx.register(function(i){var e=new h8(i)});function h8(e){e.container.appendChild(this.render());this.bind(e)}h8.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};h8.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";eX.ac(e._ripple,"ripple-playing")});i.addEventListener("hotclick",function(T){if(!T||!T.pixel||!(T.pixel instanceof fi)){return}e._div.style.left=T.pixel.x+"px";e._div.style.top=T.pixel.y+"px";eX.ac(e._ripple,"ripple-playing")});eX.on(e._ripple,"transitionend",function(){eX.rc(e._ripple,"ripple-playing")})};function bV(e){c8.call(this);if(!e){return}this._opts={};this._map=e;this._maxLat=84.6;this._minLat=-80.6;this._maxLatMC=i9.convertLL2MC(new cr(this._maxLat,0)).lat;this._minLatMC=i9.convertLL2MC(new cr(this._minLat,0)).lat}bV.inherits(c8,"ToolbarItem");eX.extend(bV.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 cf(T,i){bV.call(this,T);i=i||{};this._opts=eX.extend(eX.extend(this._opts||{},{autoClear:false,tips:"测距",followText:"单击确定起点,双击结束绘制",unit:"metric",showResult:true,lineColor:"blue",lineStroke:2,opacity:1,lineStyle:"solid",cursor:B.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=B.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;g2.load("tools",function(){e._draw()})}cf.inherits(bV,"PolylineTItem");eX.extend(cf.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;Tki){kc-=ke;kg-=this._loopOffset}while(kcthis._mc180X){e-=this._mcTSpan}while(ethis._mc180X){i.lng-=this._mcTSpan;e-=this._mcTSpan;kd-=this._mcTSpan}while(i.lng=kj){var ki=kc+kl;if(this.isTileBlank(ki,e,ko)===true){continue}var T="id_"+ki+"_"+kp+"_"+e;if(!kk[T]){kk[T]=true;km.push([ki,kp,e,0])}}else{if(kc<=kf){var ki=kc-kl;if(this.isTileBlank(ki,e,ko)===true){continue}var T="id_"+ki+"_"+kp+"_"+e;if(!kk[T]){kk[T]=true;km.push([ki,kp,e,0])}}}}for(var kg=0,ke=km.length;kg=0;kg--){var kc=kk[kg][0];if(this.isTileBlank(kc,e,ko)){kk.splice(kg,1)}}return kk},isTileBlank:function(T,kd,e){var ke=Math.pow(2,kd-3);var i=Math.round(this._validPixels*ke);var kc=6*ke*256/e;while(T>kc/2-1){T-=kc}while(T<-(kc/2)){T+=kc}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 e0=new bC();function eo(){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}eo.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}};eo.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};eo.prototype.getType=function(){return this._type};eo.prototype.getGeometry=function(){return this._geometry};eo.prototype.getId=function(){return this._id};eo.prototype.getProperties=function(){return this._properties};eo.prototype.getBox=function(){return this._box};eo.prototype.getState=function(){if(Object.keys(this._state).length>0){return this._state}else{return null}};eo.prototype.getStyle=function(){return this._style};eo.prototype.getStyleFunction=function(){return this._styleFunction};eo.prototype.setType=function(e){return this._type=e};eo.prototype.setGeometry=function(e){this._geometry=e};eo.prototype.setStyle=function(e){if(!e||Object.keys(e).length===0){return}for(var i in e){this.set(i,e[i],this._style)}};eo.prototype.setState=function(e){for(var i in e){this.set(i,e[i],this._state)}};eo.prototype.setId=function(e){this._id=e};eo.prototype.setProperties=function(e){for(var i in e){this.set(i,e[i],this._properties)}};eo.prototype.setBox=function(e){return this._box=e};eo.prototype.isPointInBox=function(e){return this._pointInBox(e,this._box)};eo.prototype.getPointGeoJSON=function(kc){var kl=this.renderData;if(kl){var kf=kl.active;if(!kl[kf]||!kl[kf]["poi"]){return null}var kk=[];var kh=kl[kf]["poi"];for(var ki=0;ki0){kj="MultiPolygon"}return{type:"Feature",properties:{},geometry:{type:kj,coordinates:[kk]}}}}};eo.prototype._pointInBox=function(e,i){if(i[0]>e[0]||i[1]>e[1]||i[2]ke[kf].bds[0])&&(T.y-kd.yke[kf].bds[1])){if(e.getTilt()>55){var kg=e.pointToOverlayPixelIn(ke[kf].pt);if(kg.outOfFrustum){continue}}ki=true;break}}}}return ki};eo.prototype._pixelPnpoly=function(kd,kf){var e=kf.length;var T=0;var ke=false;for(var kc=0;kc=kf[kc].lat)&&(kd.lat=kf[T].lat)&&(kd.lat1){for(var kn=1;knko){kj=Math.sqrt(Math.min(kd,kr))}if((T==null)||(T>kj)){kc=Math.sqrt(kr-ke)/Math.sqrt(ko);kl=Math.sqrt(kd-ke)/Math.sqrt(ko);T=kj;kk=kn}T=Math.min(T,kj)}}return{dist:T}};eo.prototype.isPointInGeometry=function(T,kh){var e=false;switch(this._type){case fO.POINT:e=this._pixelPnpoint(T,this.renderData,kh);break;case fO.LINE_STRING:var kd=this._getProximity({lng:T[0],lat:T[1]},this._geometry);var kg=this.renderData[this.renderData.active];if(!kg||!kg.line||!kg.line[0]||!kg.line[0].width){var kf=2}else{var kf=this.renderData[this.renderData.active]["line"][0].width;if(this.grid===d8.GridModel.GOOGLEWEB){kf=Math.max(kf/2*dB.gridScaleFromBDMCTo3857,2)}else{kf=Math.max(kf/2,2)}}if(kd.distkq[0]){kp[0]=kq[0]}if(kp[1]>kq[1]){kp[1]=kq[1]}if(kp[2]=0){continue}const ki=kh[kj];ke[kj]=js(ki,kf)}if(kh instanceof Error){ke.message=kh.message}}if(e!=="Object"){ke["_$name"]=e}return ke}else{if(kh instanceof Function){return null}}throw new Error("不能被序列化")}function h9(ke){if(ke===null||ke===undefined||typeof ke==="boolean"||typeof ke==="number"||typeof ke==="string"||ke instanceof Boolean||ke instanceof Number||ke instanceof String||ke instanceof Date||ke instanceof RegExp||fF(ke)||gi(ke)||ArrayBuffer.isView(ke)||ke instanceof ImageData){return ke}if(Array.isArray(ke)){var e=ke["_$name"];if(e){var kc=i3[e]["_class"];if(!kc){throw new Error("不能被反序列化")}if(kc.deserialize){return kc.deserialize(ke)}}const kd=[];for(var T=0;T=kd.minZoom&&kd.map.getZoom()<=kd.maxZoom){if(!kd._onMap){kd.addDataToMap();kd._onMap=true}}else{if(kd._onMap){kd.removeDataFromMap();kd._onMap=false}}};this.map.on("zoomend",this._onZoomEvent);var kd=this;var e=false;var kc={x:0,y:0};this._layerMouseEvent=function(ki){if(!kd.map||!kd._listeners||!kd.visible||!kd._onMap){return}if(!kd._listeners.onmousemove||Object.keys(kd._listeners.onmousemove).length===0){return}var kh=kd.pickOverlays(ki);var i;if(kh&&kh.length>0){i=new fJ("onmousemove");i.features=kh;kd.map.platform.style.cursor=kd.map.config.overlayMoveCursor;e=true}else{if(!e||!kd._listeners.onmouseout||Object.keys(kd._listeners.onmouseout).length===0){return}kd.map.platform.style.cursor=kd.map.config.defaultCursor;i=new fJ("onmouseout");i.features=null;e=false}if(i){i.point=ki.point;i.pixel=ki.pixel;i.latLng=ki.latlng;kd.dispatchEvent(i)}};this._layerClickEvent=function(kj){if(!kd.map||!kd._listeners||!kd.visible){return}if((!kd._listeners.onclick&&!kd._listeners.dblclick)||(Object.keys(kd._listeners.onclick).length===0&&Object.keys(kd._listeners.dblclick).length===0)){return}var kh={x:kj.clientX,y:kj.clientY};if(Math.abs(kh.x-kc.x)>kd.clickDistrict||Math.abs(kh.y-kc.y)>kd.clickDistrict){return}var ki=kd.pickOverlays(kj);var i=new fJ(kj.type);i.point=kj.point;i.pixel=kj.pixel;i.latLng=kj.latlng;i.features=ki;kd.dispatchEvent(i)};this._layerMouseDownEvent=function(i){kc={x:i.clientX,y:i.clientY}};kf.addEventListener("onmousemove",this._layerMouseEvent);kf.addEventListener("onmouseout",this._layerMouseEvent);kf.addEventListener("onmousedown",this._layerMouseDownEvent);var ke=["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))};aN.prototype._register=function(e){e.layerName=this.layerName;e.setZIndex(this.level)};aN.prototype.resetStyle=function(){for(var e=0;e=0){this.overlayData.splice(e,1);this.map.removeOverlay(i)}}};aN.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=[]};aN.prototype.pickOverlays=function(kg){var kf=[];if(!this.visible||!this._onMap){return null}for(var kd=0;kd=0&&T0?kf:null};aN.prototype.setLevel=function(e){if(e>-999&&e<9999){this.level=e;for(var T=0;T(kj+kk)){ko.tileCache.clear();return null}if(ke.source!=="BD09MC"){kq.x=dB.getTilesLoop(kw,kq.x)}if(kn.length===4){var kv=dB.getTileRangeExtent([kw,kq.x,kq.y]);var kt=e([kv.minX,kv.minY,kv.maxX,kv.maxY]);if(!kt){return null}}var kr="";if(kc){kr=kc;var ks=/[^\{}]*\{(.*)\}[^\}]*/;kr.match(ks);var kp=[];if(RegExp.$1){kp=RegExp.$1.split(",")}kr=kr.replace(/\{(.*)\}/,kp[(kq.x+kq.y)%kp.length]);kr=kr.replace(/\[x\]/gi,ki(kq.x,kq.y,kw));kr=kr.replace(/\[y\]/gi,km(kq.x,kq.y,kw));kr=kr.replace(/\[z\]/gi,kg(kq.x,kq.y,kw));kr=kr.replace(/\[b\]/gi,kl(kq.x,kq.y,kw));kr=kr.replace(/\[w\]/gi,kd(kq.x,kq.y,kw));kr=kr.replace(/\[h\]/gi,kh(kq.x,kq.y,kw))}else{return null}return kr};function e(kp){if(kn&&kn instanceof Array&&kn.length===4){if((kn[0]<=kp[2]&&kn[1]<=kp[3])&&(kn[2]>=kp[0]&&kn[3]>=kp[1])){return true}else{return false}}return true}return ko}function dr(i){this.src=c3();this.tileMaskUvCache=new az(64,{clearCallback:function(ke){}});var kd=6;if(i.pixelMap){this.opacity=typeof i.pixelMap.opacity==="number"?i.pixelMap.opacity:1;cb(this.opacity,0,1);if(this.opacity<1){i.useThumbData=false}var kc=i.pixelMap||{};this.colors=kc.colors||["#F9F871","#FFC75F","#FF9671","#FF6F91","#D65DB1","#845EC2"];this.positions=kc.positions||[0,0.2,0.4,0.6,0.8,1];this.domain=kc.domain||[0,255];this.clamp=kc.clamp||this.domain;this.noData=(kc.noData!==undefined)?kc.noData:-99999;this.fomularC=kc.fomularC||"float generateValue(vec4 pixel){return pixel.r * 255.;}";this.fomularJS=kc.fomularJS||function(ke){return ke.r};this.maskPng=kc.maskPng||null;if(this.maskPng){this.loadMaskPng(this.maskPng)}this.maskData=kc.maskData||-1;this.maskCoord=kc.maskCoord||null;this.fHashcode=o({str:this.fomularC});var e=this.canPixelMap();if(e){this.isPixelMap=true;this.setPixelMap()}kd=i.pixelMap.cacheSize||kd}var T=new jZ(i);T.ontology=this;this.layer=T;this.cacheSize=kd;this.tileCache=new az(this.cacheSize,{clearCallback:function(ke){}});this.tileImageDataCache=new az(this.cacheSize,{clearCallback:function(ke){}})}dr.inherits(eX.BaseClass,"PixelLayer");eX.extend(dr.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=hB.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 fJ("onupdate");this.layer.map.dispatchEvent(e)}},_getInLayer:function(kk){if(!this.map){return null}var kj=Math.floor(this.map.getZoom());var kc=dB.transformBDmcPoint(kk,this.layer.transform);var kg=dB.getTileCoordForXYAndZ_(kc[0],kc[1],kj,false);var T=kg.join("-");var e=this.tileCache.getData(T);if(e){return e}var kd=this.layer.zIndex;var kf=this.map._featureMgr.result.bkData;var kh=kf[kd][2];var kl=null;for(var ke=0;ke=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 kc=[e];var kh=this.maskBox||[];var ke=kh[1][0]-kh[0][0];var kd=kh[1][1]-kh[0][1];var T=Math.floor((kc[0][0]-kh[0][0])/ke*this.imageMaskObject.width);var i=Math.floor((-kc[0][1]+kh[1][1])/kd*this.imageMaskObject.height);var kg=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 kf=this.imageMaskObject.data.data;if(kg+3>kf.length){return false}if(kf[kg+3]>0){if(this.maskData>-1&&this.maskData!==kf[kg]){return false}return true}return false},calMaskBox:function(){var T=this.maskCoord||[];if(this.hasMaskPng&&T&&T.length===2){var e=[];for(var kc=0;kc0){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 fJ("ontilesloadstart"))});e.addEventListener("ontilesloadend",function(){T.dispatchEvent(new fJ("ontilesloadend"))})},createTileLayer:function(i){const kc=i.tileUrlTemplate||"";const kh=i.xTemplate||function(ko,kq,kp){return ko};const km=i.yTemplate||function(ko,kq,kp){return kq};const kf=i.zTemplate||function(ko,kq,kp){return kp};const kl=i.bTemplate||function(ko,kr,kq){const kp=i9.tileToBoundRange({col:ko,row:kr,zoom:kq,baseTileSize:256});return kp.MC.sw.lng+","+kp.MC.sw.lat+","+kp.MC.ne.lng+","+kp.MC.ne.lat};var kn=i.extent||[];const kg=i.extentCRSIsWGS84||false;var T=i.minZoom||0;var kj=i.maxZoom||23;var kk=i.spanLevel||0;var ki=new hv({transparentPng:true,dataType:2,spanLevel:kk,tileTypeName:"web",cacheSize:256,customLayer:true,clipTile:false,boundary:false,useThumbData:i.useThumbData||false});if(kn.length===4){if(kg){kn=dB.fromEPSG4326(kn)}var kd=dB.transformPointArr([kn[0],kn[1]],"EPSG3857","BD09MC");var ke=dB.transformPointArr([kn[2],kn[3]],"EPSG3857","BD09MC");kn=[kd[0],kd[1],ke[0],ke[1]]}ki.getTilesUrl=function(kp,kv,ku){if(!kp||kv<0||kv<(T+kk)||kv>(kj+kk)){ki.tileCache.clear();return null}if(kn.length===4){const ks=i9.tileToBoundRange({col:x,row:y,zoom:z,baseTileSize:256});var kt=e([ks.MC.getMin().lng,ks.MC.getMin().lat,ks.MC.getMax().lng,ks.MC.getMax().lat]);if(!kt){return null}}var kq="";if(kc){kq=kc;var kr=/[^\{}]*\{(.*)\}[^\}]*/;kq.match(kr);var ko=[];if(RegExp.$1){ko=RegExp.$1.split(",")}kq=kq.replace(/\{(.*)\}/,ko[(kp.x+kp.y)%ko.length]);kq=kq.replace(/\[x\]/gi,kh(kp.x,kp.y,kv));kq=kq.replace(/\[y\]/gi,km(kp.x,kp.y,kv));kq=kq.replace(/\[z\]/gi,kf(kp.x,kp.y,kv));kq=kq.replace(/\[b\]/gi,kl(kp.x,kp.y,kv))}else{return null}return kq};function e(ko){if(kn&&kn instanceof Array&&kn.length===4){if((kn[0]<=ko[2]&&kn[1]<=ko[3])&&(kn[2]>=ko[0]&&kn[3]>=ko[1])){return true}else{return false}}return true}return ki},compileExpress:function(i,e){var i=d8.ExpressParse.normalizePropertyExpression(i,e);return i},resolveStyle:function(ke){var kc=ke||{};if(kc.style){var kd={};if(!kc.layers||kc.layers.length===0){var kg=d8.LayerTypes.POINT;var i=d8.LayerTypes.LINE;var kf=d8.LayerTypes.FILL;if(kc.style[kg]){kc.style[kg].type="point"}if(kc.style[i]){kc.style[i].type="polyline"}if(kc.style[kf]){kc.style[kf].type="polygon"}}for(var T in kc.style){if(kc.style.hasOwnProperty(T)){var e=kc.style[T];this._styleFormat(e.type,e.painter,T,kd)}}this.styleExpress=kd}},_styleFormat:function(kd,e,i,kc){var kf={};var kg=cZ[kd];if(!kg){return}for(var T in e){if(e.hasOwnProperty(T)){var ke=this.compileExpress(e[T],kg[T]);kf[T]=ke}}kc[i]={type:kd,painter:kf}},evaluateContext:function(e,T,kc){var i=e+"_"+T.getId();var kd=this._stateCube[i];if(kd){T.setState(kd)}else{T._state={}}return{properties:function(){return T&&T.getProperties()},featureState:kc===true?{}:(T&&T.getState())}},evaluates:function(i,kc,kd){if(!this.styleExpress||!this.styleExpress.hasOwnProperty(i)){return null}var kf=this.styleExpress[i].painter;var e={};for(var T in kf){if(kf.hasOwnProperty(T)){var ke=kf[T].evaluate(this.evaluateContext(i,kc,kd));e[T]=ke}}return e},_updateState:function(T,kc,e){if(T instanceof ja&&T.layerName&&T.id){var i=T.layerName+"_"+T.id;if(e){this._set(kc,this._stateCube,i)}else{this._stateCube[i]=kc}this._stateCube[i].rank=(this._stateCube[i].rank||0)+1}else{if(typeof T==="string"){if(e){this._set(kc,this._stateCube,T)}else{this._stateCube[T]=kc}this._stateCube[T].rank=(this._stateCube[T].rank||0)+1}}},updateState:function(kd,ke,e){var T=JSON.stringify(this._stateCube);if(!(ke&&typeof ke==="object"&&Object.keys(ke).length>0)){return}if(!e){this._stateCube={}}if(kd instanceof Array){for(var kc=0;kcthis.maxZoom){kp._featureMgr.clearData(this.layer.drawIndex);kp._featureMgr.clearLabelOverlayData(this.layer.drawIndex);kp._featureMgr.clearLabelData(this.layer.drawIndex);return}var kg=this.layer.getZoomState();if(T){this.thumbCache={};var kn=-1;this.layer.tileLabels=[];var kj=kp._customLabelMgr.virtualTiles["mvt_"+this.layer.drawIndex];if(kj&&kj.label){this.layer.tileLabels.push(kj.label)}for(var kl=0,kk=ke.length;kl=0.5){kr=true}else{if(ki<0.5&&e>=0.5){kr=true}else{if(ki>=0.5&&e<0.5){kr=true}}}if(kr){this.layer.cacheDataCollideLabels(0)}this.layer.LAST_CALC_ZOOM=kf}else{if(this.layer.tileLabels.length>0){this.layer.cacheDataCollideLabels(eX.Browser.ie?50:30)}}}else{this.layer.cacheDataCollideLabels(0)}return}for(var kl=0,kk=ke.length;kle){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(kc,kf){var T=this.minZoom;var e=kc.col;var ki=kc.row;var kh=kc.zoom;for(var kg=1;kg<=kf;kg++){var kd=this._getParentTiles(e,ki,kh,T);if(kd===null){continue}kd.tileSize=kc.tileSize;kd.tileTypeName=kc.tileTypeName;kd.transform=kc.transform;var kj=this.layer.getTileKey(kd);var ke=this.layer.tileCache.getData(kj);if(ke&&ke.status==="ready"){ke.key=kj;return ke}e=kd.col;ki=kd.row;kh=kd.zoom}return false},_findChild:function(i,kf){var kh=this.maxZoom;var e=i.col;var ki=i.row;var kg=i.zoom;var kd=this._getChildTiles(e,ki,kg,kh,kf);if(!kd){return false}for(var kc=0;kckj){return null}var ki=Math.pow(2,kf);var e=kc*ki;var kh=kl*ki;var kg=kk+kf;var km=[];for(var kd=0;kd0){kh.layer._checkLayerTilesLoaded();var kp=kh.layer.callbackDataQueue.shift();kh._setTileData(kp[0],kp[1],kp[2])}var ko=new fJ("onupdate");kh.map.dispatchEvent(ko);kh.processDataTimer=null},0)}})},_loadTileData:function(i,e){var kc=i.col;var kg=i.row;var kd=i.zoom;var T=this.layer.getTilesUrl(new fi(kc,kg),kd,i);if(!T){return}var kf=this.layer.getTileKey(i);var ke=new XMLHttpRequest();ke.open("GET",T,true);ke.responseType="arraybuffer";ke.timeout=3000;ke.ontimeout=function(){e&&e(null,kf,i)};ke.onreadystatechange=function(kh){if(this.readyState===4){if(this.status===200){e&&e(ke.response,kf,i);return}if(this.status>=400||this.status===0){e&&e(null,kf,i)}else{e&&e(null,kf,i)}}};ke.send()},_tileDataCbk:function(kd,kf,i){var e=this.layer.tileCache.getData(kf);if(!e){return}var ke=this.layer.map;var T=this;if(!kd||typeof kd==="string"){e.status="init";e.reloadTimer=setTimeout(function(){if(e.retry<3){e.retry++;e.status="loading";T._loadTileData(i,function(kh,ki,kg){T._tileDataCbk(kh,ki,kg)})}else{e.status="ignore"}},3000);return}if(e.reloadTimer){clearTimeout(e.reloadTimer);e.reloadTimer=null}var kc=(function(kg){return function(){var kh=i.col;var kk=i.row;var ki=i.zoom;var kj="id_"+kh+"_"+kk+"_"+ki;e.tileInfo=i;e.tileData=T.mvt.readFeatures(kg,T,ke,{x:kh,y:kk,z:ki,g:T.gridModel,mc:T._opt.transform&&T._opt.transform.source==="BD09MC"?true:false});T._processLabelData(e);T.layer.callbackDataQueue.push([kf,e,kj]);if(T.processDataTimer){return}T.processDataTimer=setTimeout(function(){while(T.layer.callbackDataQueue.length>0){var kl=T.layer.callbackDataQueue.shift();T._setTileData(kl[0],kl[1],kl[2])}T.doOnceDraw();T.processDataTimer=null},200)}})(kd);ke.jobScheduler.addJob(kc)},_setTileData:function(T,e,i){e.status="ready";this.layer.tileCache.setData(T,e);if(this.layer.curViewTilesInfo[i]){e.dataType=hI}},_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 kc=this;kc.layer.updateAllIconsTextureCoords(T);this.layer.labelProcessor.loadIconImages(T,function(ke){kc.layer.updateAllIconsTextureCoords(ke)},true);var kd=this.layer.map.tileMgr.getLabelTextCanvas();kd.drawCustomLabelsOnCanvas(T.label.fixedLabel,function(ke){if(ke){if(!T.label.textureHeights){T.label.textureHeights=[]}T.label.textureHeights[i.useZoom]=ke.height}kc.layer._doWorkAfterLabelImageLoad(T,ke,null,e)})},_getTileTexImgKey:function(i){var e="mvt_"+this.layer.drawIndex+"_"+i.col+"_"+i.row+"_"+i.zoom+"_";e=bx.getGUID(e);return e},_updateBRushCube:function(kf){var kh=kf.tileData;for(var T in kh){if(kh.hasOwnProperty(T)){var e=kh[T];for(var kd=0;kd0){kh=new fJ("onmousemove");kh.value=ki;kc.map.platform.style.cursor=kc.map.config.overlayMoveCursor;e=true}else{kc.map.platform.style.cursor=kc.map.config.defaultCursor;if(!e||!kc._listeners.onmouseout||Object.keys(kc._listeners.onmouseout).length===0){return}kh=new fJ("onmouseout");e=false}if(kh){kh.point=kj.point;kh.pixel=kj.pixel;kh.latLng=kj.latlng;kc.dispatchEvent(kh)}};this._layerClickEvent=function(kj){if(!kc.map||!kc._listeners){return}if((!kc._listeners.onclick&&!kc._listeners.dblclick)||(Object.keys(kc._listeners.onclick).length===0&&Object.keys(kc._listeners.dblclick).length===0)){return}var kh;var i=kj.point;var ki=kc.pickFeatures(i,kj.pixel);kh=new fJ(kj.type);kh.point=i;kh.pixel=kj.pixel;kh.latLng=kj.latlng;kh.value=ki;kc.dispatchEvent(kh)};kf.addEventListener("onmousemove",this._layerMouseEvent);var ke=["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"}});d8._generateTexture=function(kf,ke,T){var kd=document.createElement("canvas");var e;var kc;if(ke.strokeStyle==="dashed"){e=16;kc=e*8}else{if(ke.strokeStyle==="dotted"){e=32;kc=e*2}}kd.width=e;kd.height=kc;var i=kd.getContext("2d");i.fillStyle=ke.strokeColor;i.globalAlpha=ke.strokeOpacity;var kg=ke.strokeWeight*2;if(ke.strokeStyle==="dashed"){kg=d8._drawDashArrayTexture(i,e,kc,ke)}else{if(ke.strokeStyle==="dotted"){kg=d8._drawDottedTexture(i,e,kc,ke.strokeWeight)}}if(window.createImageBitmap&&!ke.sync){createImageBitmap(kd,{imageOrientation:"flipY"}).then(function(kh){T(null,{totalDashLen:kg,texture:kh,textureSize:[e,kc]})})}else{T(null,{totalDashLen:kg,texture:kd.toDataURL(),textureSize:[e,kc]})}};d8._drawDashArrayTexture=function(ki,kc,ke,T){var kg=T.dashArray;if(!kg){ki.fillRect(0,0,kc,ke/2);return T.strokeWeight*4}else{var kh=0;if(kg.length%2!==0){kg=kg.concat(kg)}for(var kd=0;kd19){kd(null);return}var e=this.getZoomState(kc);var T=this.calCoord(i,kc,e);this.curViewTilesInfo=this.calTilesOrders(T.sw,T.ne,kc);this.clearData();this.clearRefs();this.loadLayerData(this.curViewTilesInfo,e,true,kd)},calCoord:function(T,kc,i){if(T.length!==4){return}var e=gcoord.transform([T[0],T[1]],gcoord[this.inputCRS],gcoord.BD09MC);var kd=gcoord.transform([T[2],T[3]],gcoord[this.inputCRS],gcoord.BD09MC);if(kd[1]>19505879.362428114||e[1]<-15949096.637571886){kd[1]=19505879.362428114;e[1]=-15949096.637571886}this._mapCenter[kc]=new cx((e[0]+kd[0])/2,(e[1]+kd[1])/2);return{sw:e,ne:kd}},calTilesOrders:function(kh,kn,kj){var kk=this.tileType.getMercatorSize(kj,kj);var kf=[Math.floor(kh[0]/kk),Math.floor(kh[1]/kk)];var i=[Math.floor(kn[0]/kk),Math.floor(kn[1]/kk)];var kg=kf[0]-1;var ke=i[0]+2;var kd=kf[1]-1;var km=i[1]+2;var ki=[];for(var kc=kg;kc0){this.zoomState=1}else{if(e<0){this.zoomState=-1}}this.lastZoom=i;return this.zoomState||0},loadLayerData:function(kj,kc,kd,ki){this.thumbCache={};if(kd){for(var kg=0,ke=kj.length;kg3){kh();return}var ki=kf.getTilesUrl(new fi(e.col,e.row),e.zoom,i);kc.src=ki;i++},this.retryTime)}kc.onload=function(){kh();ke&&ke(this,T)};kc.onerror=function(){kh();ke&&ke(null,T)};kc.src=kg;return kc},rasterTileDataCbk:function(kd,kc,kg){if(!kd||typeof kd==="string"){this.tileCache.removeData(kc);return}var i=kd.tileInfo;var T=i.col;var ki=i.row;var kh=i.zoom;var e=this.tileCache.getData(kc);if(!e){return}e.textureSource=kd;e.dataType=gF;e.tileInfo=i;e.status="ready";this.tileCache.setData(kc,e);var ke="id_"+T+"_"+ki+"_"+kh;var kf=false;if(this.curViewTilesInfo[ke]){e.png8=this.png8||false;e.key=kc;this.setData(e,2);kf=true}if(kf){this.calOutData(kg,e)}},getTilesUrl:function(kd,kk,i){var kf=i||0;var T=kd.x;var kl=kd.y;var kh=jO("ditu","normal");var kg=kh.udt;var kj=ej.B_NORMAL_MAP.tileUrls;var ke=Math.abs(T+kl+kf)%kj.length;var ki=kj[ke];if(T<0){T="M"+(-T)}if(kl<0){kl="M"+(-kl)}var kc="x="+T+"&y="+kl+"&z="+Math.floor(kk);kc+="&styles=pl&scaler=2&udt="+kg+"&from=jsapi3_0";var e=ki+"?qt=vtile&"+kc;return e},calOutData:function(ki,T){if(!T){for(var kf=0;kf0){e[0].sort(function(T,i){return T.tileInfo.useZoom-i.tileInfo.useZoom})}}});function dx(T,i){aR.call(this,i);if(!bR(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=[]}dx.inherits(c8,"CustomHtmlLayer");eX.extend(dx.prototype,{initialize:function(i){this.map=i;var e=this;this._zoomShowEvent=function(kc){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(kc,ke){if(!this.overlaysList||!this.map){return}var kd=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=gw.getType(e);if(T.toLowerCase()==="point"){var i=new gw({reference:this.config.coordinate});i.readFeaturesFromObject(e,{isPoints:true},function(ke){var kd=kc.render(ke);kd.id="cus_"+parseInt(Math.random()*1000000,10);kc.overlaysList.push(kd)});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 dx)||!this.map){return}var kc=T.overlaysList;for(var e=0;e0){this.adjustZIndex(kc);kc._normalLayerMgr.sortLayer()}else{var e=kc._featureMgr.result.bkData;this.zIndex=e.length||1}var T={tileTypeName:this.getType?this.getType():"custom",dataType:this.toString(),ontology:this};kc._featureMgr.createLayer(this.zIndex,T);this.map=kc;this.gl=kd;this.onAdd(kc,kd);var i=this;kc.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(kd){var T=this.zIndex;if(this.map&&this.map._featureMgr){var e=this.map._featureMgr.result.bkData;if(kd==="up"){for(var kc=this.zIndex+1;kc0;kc--){if(e[kc]){T=kc;break}}}}return T},setTargetZIndex:function(e){this.zIndex=e;if(this.map){this.map._normalLayerMgr.sortLayer()}},setZIndex:function(kg){kg=Math.abs(Math.floor(kg))||1;if(!kg||kg===this.zIndex){return}var kd=this.map._featureMgr.result.bkData;var kc=this.map.tileMgr.tileLayers;var ki=this.map._normalLayerMgr.layers;function kj(ko){var km=null;var kn=[kc,ki];for(var kk=0;kk-1){return e}continue}if(ke-1){return e}}if(kh>=0){var e=T(kh*4);if(e>-1){return e}}if(ke>=kg&&kh<0){break}}return -1},pick:function(kg,kf,kc){var T=this.gl;var kh=this.map.config.ratio;this.map._normalLayerMgr.saveFramebuffer();this.map._normalLayerMgr.bindFramebuffer(this.map._normalLayerMgr.pickFBO);this.map._normalLayerMgr.clear();var i=this.map._webglPainter._camera._modelViewMatrixLayer;var ke=mat4.create(Float64Array);mat4.multiply(ke,this.map._webglPainter.projMatrix,i);this.render(T,ke,{isPickRender:true});var e=new Uint8Array(4*this.pickWidth*this.pickHeight);T.readPixels(kg*kh-Math.floor(this.pickWidth/2),T.canvas.height-kf*kh-Math.floor(this.pickHeight/2),this.pickWidth,this.pickHeight,T.RGBA,T.UNSIGNED_BYTE,e);var kd=this.rgbToIndex(e);if(this.getPickedItem){var ki=this.getPickedItem(kd,kc)}this.map._normalLayerMgr.restoreFramebuffer();return ki},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 fJ("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(kd,kc,T){var i=new fJ(T);i.pixel=kd.pixel;i.latLng=kd.latlng;i.value=kc;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 d1(e){e=e||{};cm.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;g2.load("mvtParse",function(){i._async()},true);this.select_color=this.getColorStyleForGL(this.base_opt.selectedColor)}d1.inherits(cm,"FeatureLayer");eX.extend(d1.prototype,{_async:function(){this.loadModule=true;this.resolveStyle();this.parseData()},compileExpress:function(i,e){var i=d8.ExpressParse.normalizePropertyExpression(i,e);return i},resolveStyle:function(){var e=this.style_opt||{};if(e&&this.type&&cZ[this.type]){var T={};for(var i in e){var kd=cZ[this.type][i];if(e.hasOwnProperty(i)&&kd!==undefined){var kc=this.compileExpress(e[i],kd);T[i]=kc}}this.styleExpress=T}},evaluateContext:function(e,T){var i=T.id||e;var kc=this._stateCube[i];return{properties:function(){return T&&T.properties},featureState:kc||{}}},evaluates:function(i,kc){if(!this.styleExpress){return null}var ke=this.styleExpress;var e={};for(var T in ke){if(ke.hasOwnProperty(T)){var kd=ke[T].evaluate(this.evaluateContext(i,kc));e[T]=kd}}return e},_updateState:function(T,i,e){if(e){this._set(i,this._stateCube,T)}else{this._stateCube[T]=i}},_set:function(i,kd,T){var kc=kd[T]||(kd[T]={});for(var e in i){kc[e]=i[e]}},updateState:function(kd,ke,e){var T=JSON.stringify(this._stateCube);if(!(ke&&typeof ke==="object"&&Object.keys(ke).length>0)){return}if(!e){this._stateCube={}}if(kd instanceof Array){for(var kc=0;kc=this.DEL_COUNT){new Error("超出"+this.DEL_COUNT+"个限制")}var e=false;for(var kc=0;kc0){var kq=this.buildLineVertex(ks,kn[kr],ke,ki,e,kd);kf[0][kf[0].length]={index:kg,styleData:kq,textureKey:-1,texture:null,textureSize:null,zoomWithMap:true,overlay:{_config:{textureRepeat:true},_totalDashLen:null,}}}}var ko=ks.strokeWeight/2;var kp=this.getColorStyleForGL(ks.strokeColor,ks.strokeOpacity,false);if(kl>-1&&this.style_opt.linksLine&&this.style_opt.strokeColorControl instanceof Function){var kk=this.style_opt.strokeColorControl(kg,kl);kp=this.getColorStyleForGL(kk,undefined,false)}var kq=this.buildLineVertex(ks,kn[kr],ke,ko,kp,kd);var kk=this._generateTexture(ks)||{};var km=kk.value||null;var T={index:kg,styleData:kq,textureKey:kk.key||-1,texture:km?km.texture:null,textureSize:km?km.textureSize:null,zoomWithMap:true,overlay:{_config:{textureRepeat:true},_totalDashLen:km?km.totalDashLen:null,}};if(this.style_opt.borderCovered){kf[1][kf[1].length]=T}else{kf[0][kf[0].length]=T}if(kq[0]&&kq[0][0] instanceof Array){kd=kq[0][0][kq[0][0].length-1]/10||0}}return kf},combineLine:function(ke){var e=[];for(var T=0;T65536){kl++;kd=e[kl]={style:[],styleData:[[],[]],index:[],texture:null,textureSize:null,zoomWithMap:null,overlay:null};i=kd.styleData[0];ki=kd.styleData[1];kh=0}if(kd.styleData[0].length===0){kd.texture=kn.texture;kd.textureSize=kn.textureSize;kd.zoomWithMap=kn.zoomWithMap;kd.overlay=kn.overlay}kd.index[kd.index.length]=kn.index;for(var kg=0;kg65536){ko.push([ki,km]);ki=[];km=[]}gm.buildData(kk[kh],ke,kl,ki,km,kg,kd,undefined,kf)}ko.push([ki,km]);return ko},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)},createBufferData:function(kl){var ki=[];var kj=0;for(var kf=0;kf0){if(this.style_opt.borderMask&&this.style_opt.borderCovered){kf.clear(kf.STENCIL_BUFFER_BIT);kf.stencilFunc(kf.ALWAYS,1,255);e.stencilOp(kf.KEEP,kf.KEEP,kf.REPLACE);kf.stencilMask(255);e.colorMask(false,false,false,false);for(var kd=0;kd0){ke+=ki[kd-1].length}kf=hC(ki[kd].pointsArray,null,null,ke);for(var T=0,kh=kf.length;T=3?kq[0]:[0,0,0,0];if(ke.lastState.bound!==e){kp.uniform4fv(ke.uniforms.u_bound,e);ke.lastState.bound=e}var kt=kq.length>=3?kq[1]:0;if(ke.lastState.scale!==kt){kp.uniform1f(ke.uniforms.u_scale,kt);ke.lastState.scale=kt}var kd=kq.length>=3?kq[2]:[0,0];if(ke.lastState.offset!==kd){kp.uniform2fv(ke.uniforms.u_offset,kd);ke.lastState.offset=kd}var kh=this.base_opt.isFlat;if(ke.lastState.isFlat!==kh){kp.uniform1i(ke.uniforms.u_flat,kh);ke.lastState.isFlat=kh}var ko=this.base_opt.drawPart||1;if(ke.lastState.drawPart!==ko){kp.uniform1i(ke.uniforms.u_draw_part,ko);ke.lastState.drawPart=ko}var kg=ks._camera._far||4000;if(ke.lastState.cameraFar!==kg){kp.uniform1f(ke.uniforms.u_camera_far,kg);ke.lastState.cameraFar=kg}kp.uniform1i(ke.uniforms.u_pick_model,this.pickModel);if(ke.lastState.selectColor!==this.select_color){kp.uniform4fv(ke.uniforms.u_pick_color,this.select_color);ke.lastState.selectColor=this.select_color}if(ke.lastState.pickTag!==this.selectedIndex){kp.uniform1i(ke.uniforms.u_pick_tag,this.selectedIndex+1);ke.lastState.pickTag=this.selectedIndex}var kr=new Int16Array(this.DEL_COUNT);if(this.delIndexs.length){for(var kn=0;kn=9000&&ki.current_city["code"]<=9378){ki.current_city["name"]="台湾省"}if(ki.current_city["code"]>=20000&&ki.current_city["code"]<=20499){ki.current_city["name"]="新加坡"}if(ki.current_city["code"]>=20500&&ki.current_city["code"]<=25999){ki.current_city["name"]="泰国"}if(ki.current_city["code"]>=26000&&ki.current_city["code"]<=29999){ki.current_city["name"]="日本"}if(ki.current_city["code"]>=30000&&ki.current_city["code"]<=30999){ki.current_city["name"]="韩国"}if(ki.current_city["code"]>=31000&&ki.current_city["code"]<=37000){ki.current_city["name"]="亚太"}if(ki.current_city["code"]>=46609&&ki.current_city["code"]<=52505){ki.current_city["name"]="欧洲"}if(ki.current_city["code"]>=39509&&ki.current_city["code"]<=53500){ki.current_city["name"]="南美洲"}if(ki.current_city["code"]>=54000&&ki.current_city["code"]<=70000){ki.current_city["name"]="北美洲"}if(ki.current_city["code"]===54003&&ki.current_city["code"]>=60731&&ki.current_city["code"]<=61123){ki.current_city["name"]="美国"}if(ki.current_city["code"]===54015||ki.current_city["code"]>=57970&&ki.current_city["code"]<=60223){ki.current_city["name"]="加拿大"}if(ki.current_city["code"]===54025||ki.current_city["code"]>=54338&&ki.current_city["code"]<=57374){ki.current_city["name"]="墨西哥"}e.enableRequest=true;if(ki&&ki.current_city){var kh=ki.current_city["name"];var kg=ki.current_city["code"];if(kg!==i.cCode){var kf=new fJ("oncitychange");kf.name=kh;kf.code=kg;i.dispatchEvent(kf)}i.cityName=kh;i.cCode=kg;if(!bW()){c1(i)}}},{qt:"cen",b:T.lng+","+T.lat+";"+kd.lng+","+kd.lat,l:ke},"","",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 jj(T){var e={};var i=new jT(e);T.addControl(i);return i}function J(i){if(i.temp.copyadded){return}i.temp.copyadded=true;if(!i.cpyCtrl){var kc=new i0(2,2);i.config.cpyCtrlOffset=kc;if(bW()){kc.width=72;kc.height=0}var T=new f5({offset:kc,printable:true});i.cpyCtrl=T}if(!bW()){c1(i);i.addEventListener("maptypechange",function(){c1(i)})}i.addControl(T);var e=new bA();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 i0(4,2))}});if(i.getSize().width>=300&&i.getSize().height>=100){e.show()}else{e.hide();T.setOffset(new i0(4,2))}i.addEventListener("oncopyrightoffsetchange",function(kd){i.logoCtrl.setOffset(kd.target.logo);i.cpyCtrl.setOffset(kd.target.cpy)});i.dispatchEvent(new fJ("oncopyrightaddend"))}function c1(kr){if(!kr.cpyCtrl){var kz=new i0(2,2);if(bW()){kz.width=72;kz.height=0}var ku=new f5({offset:kz,printable:true});kr.cpyCtrl=ku}var kI=kr.cityName||"中国";var ks=kr.getMapType();var kt=["常州市","南昌市","乌鲁木齐市","无锡市","福州市","泉州市","珠海市","贵阳市"];var kl=["北京市","上海市","广州市","深圳市","宁波市","石家庄市","沈阳市","长春市","青岛市","温州市","台州市","金华市","佛山市","中山市","昆明市","南宁市","苏州市","西安市","济南市","郑州市","合肥市","呼和浩特市","杭州市","成都市","武汉市","长沙市","天津市","南京市","重庆市","大连市","东莞市","厦门市"];var kn=["香港特别行政区"];var kh=["台湾省"];var kA=["日本"];var kG=["韩国"];var kv=["泰国"];var ky=["亚太"];var ki=["新加坡"];var kH=["欧洲"];var kc=["南美洲"];var kD=["北美洲"];var T=["美国"];var kx=["墨西哥"];var kf=["加拿大"];for(var kE in kt){if(kt[kE]===kI){var ko=true;break}}for(var kE in kl){if(kl[kE]===kI){var kd=true;break}}for(var kE in kn){if(kn[kE]===kI){var kK=true;break}}if(kh[0]===kI){var kC=true}if(ki[0]===kI){var i=true}if(kA[0]===kI){var kk=true}if(kG[0]===kI){var kq=true}if(kv[0]===kI){var kp=true}if(ky[0]===kI){var kg=true}if(kH[0]===kI){var km=true}if(kc[0]===kI){var kj=true}if(kD[0]===kI){var e=true}if(T[0]===kI){var kF=true}if(kf[0]===kI){var kB=true}if(kx[0]===kI){var ke=true}var kJ=["© 2023 Baidu - GS(2021)6026号 - 甲测资字11111342 - 京ICP证030173号 - Data © "];var kw="rgba(255, 255, 255, 0.701961)";if(kr.getZoom()<=9){kJ=["© 2023 Baidu - GS(2021)6026号 - 甲测资字11111342 - 京ICP证030173号 - Data © "]}else{if(kC){kJ=["© 2023 Baidu - GS(2021)6026号 - 甲测资字11111342 - 京ICP证030173号 - Data © "]}else{if(kk||kq){kJ=["© 2023 Baidu - GS(2021)6026号 - 甲测资字11111342 - 京ICP证030173号 - Data © "]}else{if(i||kp){kJ=["© 2023 Baidu - GS(2021)6026号 - 甲测资字11111342 - 京ICP证030173号 - Data © "]}else{if(kg){kJ=["© 2023 Baidu - GS(2021)6026号 - 甲测资字11111342 - 京ICP证030173号 - Data © "]}else{if(km){kJ=["© 2023 Baidu - GS(2021)6026号 - 甲测资字11111342 - 京ICP证030173号 - Data © "]}else{if(kj){kJ=["© 2023 Baidu - GS(2021)6026号 - 甲测资字11111342 - 京ICP证030173号 - Data © "]}else{if(e){kJ=["© 2023 Baidu - GS(2021)6026号 - 甲测资字11111342 - 京ICP证030173号 - Data © "]}}}}}}}}if(kr.getZoom()<=9){kJ.push("百度智图");kJ.push(' & OpenStreetMap');kJ.push(' & HERE');if(ks===BMAP_SATELLITE_MAP||ks===BMAP_HYBRID_MAP){kJ.push(' & ESO');kw="rgba(0,0,0,.7)"}}else{if(kk||kq){kJ.push('OpenStreetMap')}else{if(i||kp){kJ.push('HERE')}else{if(kg){kJ.push('HERE');kJ.push(' & Mapbox')}else{if(km){kJ.push('OpenStreetMap');kJ.push(' & Mapbox')}else{if(kj){kJ.push('OpenStreetMap');kJ.push(' & Mapbox')}else{if(kF||ke||kB){kJ.push('HERE');kJ.push(' & Mapbox')}else{if(e){kJ.push('OpenStreetMap');kJ.push(' & Mapbox')}else{kJ.push("百度智图");if(ko){kJ.push(' & PalmCity')}if(kK){kJ.push(' & MapKing')}if(kC){kJ.push(' & HERE');kJ.push(' & 樂客LocalKing')}if(ks===BMAP_SATELLITE_MAP||ks===BMAP_HYBRID_MAP){kw="rgba(0,0,0,.7)"}}}}}}}}}kJ.unshift('');kJ.push("");kJ=kJ.join("");kr.cpyCtrl.addCopyright({id:1,content:kJ})}function jT(e){this["defaultAnchor"]=BMAP_ANCHOR_TOP_RIGHT;this["defaultOffset"]=e.defaultOffset||new i0(90,6);this._cZIndex=9999;this._visible=false}jT.prototype=new gH();jT.prototype.initialize=function(kd){this._map=kd;var kc=this;var e=bX("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 ke=bX("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;"});ke.innerText="确定";ke.addEventListener("click",function(){kc.hide()});var T=bX("div");var kf=T.style;kf.position="relative";kf.width="100%";kf.height="100%";kf.color="#000";kf.fontSize="14px";kf.wordBreak="break-all";e.appendChild(T);e.appendChild(ke);kd.getContainer().appendChild(e);return e};jT.prototype._setPosition=function(){};jT.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 de="cur";var Z="cen";var I="s";var dw="con";var dn="bd";var cR="nb";var gY="bt";var aO="nav";var h7="walk";var fQ="gc";var dU="rgc";var K="dec";var ip="iploc";var gI="bse";var ge="nse";var db="bl";var en="bsl";var fN="bda";var ek="sa";var a7="nba";var ie="drag";var i1="ext";var jF="exts";var jI="hip";var hz="ride";var jS="drct";var b1="ldt";var fo=2;var be=4;var fX=7;var ig=11;var b8=12;var eS=14;var cO=15;var eb=18;var aA=20;var a6=21;var H=19;var a=23;var iC=26;var aC=28;var gf=31;var e4=35;var iq=44;var bc=45;var ax=46;var jD=47;var gk=-1;var a9=0;var bw=1;var i6=2;var dM=3;window.BMAP_POI_TYPE_NORMAL=0;var cB=1;var ii=2;BMapGL.I=eX.I;var bG={};bG.removeHtml=function(e){e=e.replace(/<\/?[^>]*>/g,"");e=e.replace(/[ | ]* /g," ");return e};bG.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;")};bG.parseGeoExtReg2=function(i,e){var T=new RegExp("(((-?\\d+)(\\.\\d+)?),((-?\\d+)(\\.\\d+)?);)(((-?\\d+)(\\.\\d+)?),((-?\\d+)(\\.\\d+)?);){"+e+"}","ig");return i.replace(T,"$1")};var dE=0;var dd=1;var S=2;bG.unique=function(T){var ke=false;var kd=[];var kf={};for(var kc=0,e=T.length;kc21){T=21}return T};bG.parseGeo=function(kf,ki){if(typeof kf!="string"||!kf){return}var kk=kf.split("|");var e;var kd;var T;if(kk.length==1){e=b2(kf)}else{e=b2(kk[2]);kd=b2(kk[0]);T=b2(kk[1]);if(!ki){return e}}var kg={type:e.geoType};if(ki){switch(kg.type){case S:var kh=new cx(e.geo[0][0],e.geo[0][1]);var kj=i9.convertMC2LL(kh);kg.point=kj;kg.points=[kj];break;case dd:kg.points=[];var kl=e.geo[0];for(var ke=0,kc=kl.length-1;ke0.25&&km<1){km=1}else{if(km>32){km=32}}}}var kh=kv.split("|");if(kh.length==1){var kc=b2(kh[0]);return{type:kc.type,bound:"",points:kc.geo.join(",")}}else{if(kh.length>1){var kn=kv.split(";.=");var kj=[];var kd=[];var ko=0;var ks=kn.length;for(var kp=0;kp1){if(kp==0){ku=ku+";"}if(kp>0&&kp0){kt=bG.parseGeoExtReg2(kt,km)}kd.push(kt)}if(ks<=1){kd=kd.join(";")}if(ks==2){var T=kd[0]+";"+kd[1];var kf=T.split(";");var e=[];for(var kp=0;kpc9){e=c9-e}if(kg>c9){kg=c9-kg}kc.push(kc[T-2]+e);kc.push(kc[T-1]+kg);return 0}function dv(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}bG.pathToPoints=function(ke){var kc=[];if(typeof ke!=="string"){return kc}else{var kd=ke.split(";");for(var T=0;TcA.MAX_PAGE_CAPACITY?cA.DEFAULT_PAGE_CAPACITY:e)}else{this._opts.pageCapacity=cA.DEFAULT_PAGE_CAPACITY}},getPageCapacity:function(){return this._opts.pageCapacity},toString:function(){return"LocalSearch"}});function bf(i){this._opts={};eX.extend(this._opts,i);this._queryList=[];var e=this;g2.load("otherSearch",function(){e._asyncSearch()})}bf.inherits(c8,"Geocoder");eX.extend(bf.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 cW(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;g2.load("otherSearch",function(){var T=i._pendingCalls.length;for(var kc=0;kc=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=eM.MAX_PAGE_CAPACITY;return}}if(typeof e!=="number"){this._opts.pageCapacity=eM.MAX_PAGE_CAPACITY;return}if(e>=1&&e<=eM.MAX_PAGE_CAPACITY){this._opts.pageCapacity=Math.round(e)}else{this._opts.pageCapacity=eM.MAX_PAGE_CAPACITY}},toString:function(){return"TransitRoute"},_shortTitle:function(e){return e.replace(/\(.*\)/,"")}});window.BMAP_HIGHLIGHT_STEP=1;window.BMAP_HIGHLIGHT_ROUTE=2;var cF=function(e,kc){jK.call(this,e,kc);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;g2.load("route",function(){T._asyncSearch()},true);if(this.init_d){this.init_d()}};cF.ROAD_TYPE=["","环岛","无属性道路","主路","高速连接路","交叉点内路段","连接道路","停车场内部道路","服务区内部道路","桥","步行街","辅路","匝道","全封闭道路","未定义交通区域","POI连接路","隧道","步行道","公交专用道","提前右转道"];eX.inherit(cF,jK,"DWRoute");eX.extend(cF.prototype,{search:function(T,e,i){this._queryList.push({method:"search",arguments:[T,e,i]})}});var iK=function(e,T){jK.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 hW("删除该点",function(ke,kd,kc){i._deleteVia(kc.curNo-1)},60));this.map.addContextMenu(this._menu,true);g2.load("route",function(){i._asyncSearch()},true);if(this.init_d){this.init_d()}};eX.inherit(iK,jK,"LineLayerRoute");eX.extend(iK.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 cq(e,i){cF.call(this,e,i);i=i||{};this._opts._enableTraffic=i.enableTraffic||false;this.setPolicy(i.policy);this.QUERY_TYPE=aO;this.RETURN_TYPE=aA;this.ROUTE_TYPE=BMAP_ROUTE_TYPE_DRIVING}function fZ(e,i){iK.call(this,e,i);i=i||{};this.setPolicy(i.policy);this.QUERY_TYPE=aO}eX.inherit(fZ,iK,"DrivingRouteLine");eX.inherit(cq,cF,"DrivingRoute");cq.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}};fZ.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 fp(e,i){cF.call(this,e,i);this.QUERY_TYPE=h7;this.RETURN_TYPE=gf;this.ROUTE_TYPE=BMAP_ROUTE_TYPE_WALKING;this._enableDragging=false}eX.inherit(fp,cF,"WalkingRoute");function c4(e,i){cF.call(this,e,i);this.QUERY_TYPE=hz;this.ROUTE_TYPE=BMAP_ROUTE_TYPE_RIDING;this._enableDragging=false}eX.inherit(c4,cF,"RidingRoute");function W(e,i){iK.call(this,e,i);i=i||{};this.QUERY_TYPE=b1;this.setPolicy(i.policy)}eX.inherit(W,iK,"TruckRoute");W.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 a1={web:"//158.234.196.4:5001/api_map_baidu_com/direction?",android:"bdapp://map/direction?",ios:"baidumap://map/direction?"};function iH(e){this.opts=e||{}}eX.extend(iH.prototype,{routeCall:function(kc,e,T){var i=this;g2.load("route",function(){i._asyncSearch(kc,e,T)})}});function d7(){return Pano.getStreetViewCoverageLayer(bx)}function eO(){Pano.PanoramaService.call(this)}eX.inherit(eO,Pano.PanoramaService,"PanoramaService");eX.extend(eO.prototype,{getPanoramaById:function(T,i){var e=this;this.getPanoById(T,function(kc){i&&i(e._makeData(kc))})},getPanoramaByLocation:function(e,T){e=i9.convertLL2MC(e);var i=this;this.getPanoByLocation(e,50,function(kc){T&&T(i._makeData(kc))})},_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=i9.convertMC2LL(new cx(i.pointX,i.pointY));return i}});function ff(){if(window.PANORAMA_URL){return Pano.getPanoControl(bx,{imgPath:B.imgPath,tileBaseUrl:B.panoTilePath,})}return Pano.getPanoControl(bx)}function O(T,e){if(!e){return}this.content=T;if(e.position&&!Array.isArray(e.position)){e.position=i9.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,})}eX.inherit(O,Pano.PanoOverlay,"PanoramaLabel");eX.extend(O.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 kc=this.content;var kf=document.createElement("div");var i=kf.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";kf.appendChild(e);var T=document.createElement("span");T.style.margin="0 14px";T.innerText=kc;e.appendChild(T);if(!this.hideDistance){var ke=document.createElement("span");ke.style.color="color:rgba(255,255,255,0.3)";ke.innerText="|";e.appendChild(ke);var kd=document.createElement("span");kd.style.margin="0 8px";kd.style.color="#60c7fa";kd.style.fontSize="12px";kd.innerText="0米";e.appendChild(kd);this._distanceDom=kd}this._dom=kf;this._titleDom=T;return kf},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=i9.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 kc={};if(window.PANORAMA_URL){kc.imgPath=B.imgPath;kc.tileBaseUrls=[B.panoTilePath]}var e=Pano.init(i,kc);var T=e.setPosition;e.setPosition=function(ke){var kf=i9.convertLL2MC(ke);T.call(e,kf)};var kd=e.addEventListener;e.addEventListener=function(ke,kf){if(ke==="position_changed"){kd.call(e,ke,function(kg){var kh=i9.convertMC2LL(kg);kf(kh)})}else{kd.call(e,ke,kf)}};return e}bx.Map=hK;bx.MapType=ej;bx.Point=cx;bx.Pixel=fi;bx.Size=i0;bx.Bounds=hY;bx.PrivateRegionDataModel=cM;bx.TileLayer=hv;bx.Copyright=m;bx.Projection=bx.Project=i9;bx.XYZProjection=bx.XYZProject=dB;bx.Convertor=fS;bx.RenderTypeUtils=c6;bx.Overlay=aR;bx.Label=hR;bx.Marker=s;bx.Symbol=fg;bx.SVGSymbol=dK;bx.Icon=jt;bx.Polyline=bl;bx.BezierCurve=cH;bx.PolylineMultipart=el;bx.Polygon=iG;bx.MapMask=jY;bx.Prism=br;bx.Marker3D=ec;bx.GroundOverlay=fY;bx.CustomOverlay=bL;bx.CustomHtmlLayer=dx;bx.InfoWindow=d2;bx.SimpleInfoWindow=h1;bx.Circle=aU;bx.Control=gH;bx.NavigationControl=jH;bx.NavigationControl3D=eZ;bx.CopyrightControl=f5;bx.ScaleControl=kb;bx.CityListControl=bs;bx.MapTypeControl=v;bx.ZoomControl=jc;bx.LocationControl=go;bx.LogoControl=bA;bx.DistanceTool=cf;bx.ContextMenu=hm;bx.MenuItem=hW;bx.OperationMask=aj;bx.Animation=fy;bx.ViewAnimation=q;bx.Transitions=gA;bx.Event=fJ;bx.trafficLayer=jE;bx.TrafficLayer=jg;bx.GeoJSONLayer=aN;bx.XYZLayer=jZ;bx.PixelLayer=dr;bx.GeoJSONParse=gw;bx.NormalLayer=cm;bx.LineLayer=bS;bx.FillLayer=d0;bx.Entity=ja;bx.MVTLayer=d8;bx.BaiduLayer=U;bx.Geolocation=cW;bx.Geocoder=bf;bx.Boundary=fk;bx.DistrictLayer=dX;bx.LocalCity=fd;bx.LocalSearch=cA;bx.Autocomplete=i2;bx.BusLineSearch=ex;bx.WalkingRoute=fp;bx.RidingRoute=c4;bx.DrivingRoute=cq;bx.DrivingRouteLine=fZ;bx.TransitRoute=eM;bx.RouteSearch=iH;bx.TruckRoute=W;bx.PanoramaCoverageLayer=d7;bx.PanoramaControl=ff;bx.PanoramaService=eO;bx.PanoramaLabel=O;bx.Panorama=d;function hd(e,i){for(var T in i){e[T]=i[T]}}bx.fetchDebug&&bx.fetchDebug.init();bx.verify();bx.apiLoad();bx.frequency();bx.getSeckeyCid();window._layer=1;eX.extend(dX.prototype,{_asyncSearch:function(){for(var T=0,e=this._queryList.length;T0){var kr=kc.geo.length;for(jo=0;jo0){var kj=T.length-1;var kq=[];var ki=false;var kp=0;var kn=0;for(var ks=0;kskn){var ku=kp;kp=kn;kn=ku}var kh=kq;var kf=kq.splice(kp+1);var kd=kf.splice(kn-kp);kh=kh.concat(kd);ko.boundaries.push(kh.join(";"));ko.boundaries.push(kf.join(";"));ki=false;continue}if(kq.length!==0){ko.boundaries.push(kq.join(";"))}}}}}}return ko},deleteDistrict:function(kc){var T=kc.disOverlays;for(var e=0;e0){for(var T=0;T