+ 交互专家 +
++ 蚂蚁金服-某某某事业群-某某平台部-某某技术部-UED +
++ + 浙江省 + 杭州市 +
+commit 4d52b072c94bc8b837a16ed7501b657db8d8f5b6 Author: liaoboping <2824044657@qq.com> Date: Wed Aug 6 19:10:12 2025 +0800 initial diff --git a/.browserslistrc b/.browserslistrc new file mode 100644 index 0000000..8f96043 --- /dev/null +++ b/.browserslistrc @@ -0,0 +1,3 @@ +> 1% +last 2 versions +not ie <= 10 diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 0000000..6f77dff --- /dev/null +++ b/.editorconfig @@ -0,0 +1,39 @@ +[*] +charset=utf-8 +end_of_line=lf +insert_final_newline=false +indent_style=space +indent_size=2 + +[{*.ng,*.sht,*.html,*.shtm,*.shtml,*.htm}] +indent_style=space +indent_size=2 + +[{*.jhm,*.xslt,*.xul,*.rng,*.xsl,*.xsd,*.ant,*.tld,*.fxml,*.jrxml,*.xml,*.jnlp,*.wsdl}] +indent_style=space +indent_size=2 + +[{.babelrc,.stylelintrc,jest.config,.eslintrc,.prettierrc,*.json,*.jsb3,*.jsb2,*.bowerrc}] +indent_style=space +indent_size=2 + +[*.svg] +indent_style=space +indent_size=2 + +[*.js.map] +indent_style=space +indent_size=2 + +[*.less] +indent_style=space +indent_size=2 + +[*.vue] +indent_style=space +indent_size=2 + +[{.analysis_options,*.yml,*.yaml}] +indent_style=space +indent_size=2 + diff --git a/.env b/.env new file mode 100644 index 0000000..b5c472a --- /dev/null +++ b/.env @@ -0,0 +1,3 @@ +NODE_ENV=production +VUE_APP_PREVIEW=false +VUE_APP_API_BASE_URL=/api \ No newline at end of file diff --git a/.env.development b/.env.development new file mode 100644 index 0000000..6285849 --- /dev/null +++ b/.env.development @@ -0,0 +1,4 @@ +NODE_ENV=development +VUE_APP_PREVIEW=true +VUE_APP_API_BASE_URL=/api +VUE_APP_API_URL=http://192.168.0.189:8099 \ No newline at end of file diff --git a/.env.preview b/.env.preview new file mode 100644 index 0000000..a9e44c8 --- /dev/null +++ b/.env.preview @@ -0,0 +1,3 @@ +NODE_ENV=production +VUE_APP_PREVIEW=true +VUE_APP_API_BASE_URL=/api \ No newline at end of file diff --git a/.eslintrc.js b/.eslintrc.js new file mode 100644 index 0000000..1b36ef8 --- /dev/null +++ b/.eslintrc.js @@ -0,0 +1,80 @@ +module.exports = { + root: true, + env: { + node: true + }, + 'extends': [ + 'plugin:vue/strongly-recommended', + //'@vue/standard' + ], + rules: { + 'no-console': 'off', + 'no-debugger': process.env.NODE_ENV === 'production' ? 'error' : 'off', + 'generator-star-spacing': 'off', + 'no-mixed-operators': 0, + 'vue/max-attributes-per-line': [ + 2, + { + 'singleline': 5, + 'multiline': { + 'max': 1, + 'allowFirstLine': false + } + } + ], + 'vue/attribute-hyphenation': 0, + 'vue/html-self-closing': 0, + 'vue/component-name-in-template-casing': 0, + 'vue/html-closing-bracket-spacing': 0, + 'vue/singleline-html-element-content-newline': 0, + 'vue/no-unused-components': 0, + 'vue/multiline-html-element-content-newline': 0, + 'vue/no-use-v-if-with-v-for': 0, + 'vue/html-closing-bracket-newline': 0, + 'vue/no-parsing-error': 0, + "vue/no-multiple-template-root": "off", + 'no-tabs': 0, + 'quotes': [ + 2, + 'single', + { + 'avoidEscape': true, + 'allowTemplateLiterals': true + } + ], + 'semi': [ + 2, + 'never', + { + 'beforeStatementContinuationChars': 'never' + } + ], + 'no-delete-var': 2, + 'prefer-const': [ + 2, + { + 'ignoreReadBeforeAssign': false + } + ], + 'template-curly-spacing': 'off', + // 'indent': 'off', + 'indent':0, + 'comma-dangle':0, + 'no-trailing-spaces':0, + 'eol-last':0 + }, + parserOptions: { + parser: 'babel-eslint' + }, + overrides: [ + { + files: [ + '**/__tests__/*.{j,t}s?(x)', + '**/tests/unit/**/*.spec.{j,t}s?(x)' + ], + env: { + jest: true + } + } + ] +} diff --git a/.eslintrc.json b/.eslintrc.json new file mode 100644 index 0000000..ed223c7 --- /dev/null +++ b/.eslintrc.json @@ -0,0 +1,5 @@ +{ + "rules": { + "space-before-function-paren": 0 + } +} diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..e507319 --- /dev/null +++ b/.gitattributes @@ -0,0 +1 @@ +public/* linguist-vendored \ No newline at end of file diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..1f8602b --- /dev/null +++ b/.gitignore @@ -0,0 +1,22 @@ +.DS_Store +node_modules +/dist + +# local env files +.env.local +.env.*.local + +# Log files +npm-debug.log* +yarn-debug.log* +yarn-error.log* + +# Editor directories and files +.idea +.vscode +*.suo +*.ntvs* +*.njsproj +*.sln +*.sw* +package-lock.json diff --git a/.husky/.gitignore b/.husky/.gitignore new file mode 100644 index 0000000..31354ec --- /dev/null +++ b/.husky/.gitignore @@ -0,0 +1 @@ +_ diff --git a/.lintstagedrc.json b/.lintstagedrc.json new file mode 100644 index 0000000..bcffb34 --- /dev/null +++ b/.lintstagedrc.json @@ -0,0 +1,4 @@ +{ + "*.js": "eslint --fix", + "*.{css,less}": "stylelint --fix" +} \ No newline at end of file diff --git a/.prettierrc b/.prettierrc new file mode 100644 index 0000000..b0e80f7 --- /dev/null +++ b/.prettierrc @@ -0,0 +1,6 @@ +{ + "printWidth": 120, + "semi": false, + "singleQuote": true, + "prettier.spaceBeforeFunctionParen": true +} diff --git a/.stylelintrc.js b/.stylelintrc.js new file mode 100644 index 0000000..412e214 --- /dev/null +++ b/.stylelintrc.js @@ -0,0 +1,102 @@ +module.exports = { + processors: [], + plugins: ['stylelint-order'], + extends: [ + 'stylelint-config-standard', + 'stylelint-config-css-modules' + ], + rules: { + 'selector-class-pattern': null, + 'string-quotes': 'single', // 单引号 + 'at-rule-empty-line-before': null, + 'at-rule-no-unknown': null, + 'at-rule-name-case': 'lower', // 指定@规则名的大小写 + 'length-zero-no-unit': true, // 禁止零长度的单位(可自动修复) + 'shorthand-property-no-redundant-values': true, // 简写属性 + 'number-leading-zero': 'never', // 小数不带0 + 'declaration-block-no-duplicate-properties': null, // 禁止声明快重复属性 + 'no-descending-specificity': null, // 禁止在具有较高优先级的选择器后出现被其覆盖的较低优先级的选择器。 + 'selector-max-id': 3, // 限制一个选择器中 ID 选择器的数量 + 'max-nesting-depth': 4, + 'indentation': [2, { // 指定缩进 warning 提醒 + 'severity': 'warning' + }], + 'order/properties-order': [ // 规则顺序 + 'position', + 'top', + 'right', + 'bottom', + 'left', + 'z-index', + 'display', + 'float', + 'width', + 'height', + 'max-width', + 'max-height', + 'min-width', + 'min-height', + 'padding', + 'padding-top', + 'padding-right', + 'padding-bottom', + 'padding-left', + 'margin', + 'margin-top', + 'margin-right', + 'margin-bottom', + 'margin-left', + 'margin-collapse', + 'margin-top-collapse', + 'margin-right-collapse', + 'margin-bottom-collapse', + 'margin-left-collapse', + 'overflow', + 'overflow-x', + 'overflow-y', + 'clip', + 'clear', + 'font', + 'font-family', + 'font-size', + 'font-smoothing', + 'osx-font-smoothing', + 'font-style', + 'font-weight', + 'line-height', + 'letter-spacing', + 'word-spacing', + 'color', + 'text-align', + 'text-decoration', + 'text-indent', + 'text-overflow', + 'text-rendering', + 'text-size-adjust', + 'text-shadow', + 'text-transform', + 'word-break', + 'word-wrap', + 'white-space', + 'vertical-align', + 'list-style', + 'list-style-type', + 'list-style-position', + 'list-style-image', + 'pointer-events', + 'cursor', + 'background', + 'background-color', + 'border', + 'border-radius', + 'content', + 'outline', + 'outline-offset', + 'opacity', + 'filter', + 'visibility', + 'size', + 'transform' + ] + } +} diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000..a08bfcb --- /dev/null +++ b/.travis.yml @@ -0,0 +1,7 @@ +language: node_js +node_js: + - 10.15.0 +cache: yarn +script: + - yarn + - yarn run lint --no-fix && yarn run build diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..3ebc1f5 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,6 @@ +FROM nginx + +RUN rm /etc/nginx/conf.d/default.conf + +ADD deploy/nginx.conf /etc/nginx/conf.d/default.conf +COPY dist/ /usr/share/nginx/html/ diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..66eef0b --- /dev/null +++ b/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2018 Anan Yang + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. \ No newline at end of file diff --git a/README.md b/README.md new file mode 100644 index 0000000..eb88edf --- /dev/null +++ b/README.md @@ -0,0 +1,103 @@ +English | [简体中文](./README.zh-CN.md) + +
') + if (!(1 > b)) { + if (this.page >= this.Xf) { + var e + a.push('\u9996\u9875'.replace('{temp1}', "BMap.I('" + this.aa + "').toPage(1);")) + } + a.push('\u4e0a\u4e00\u9875'.replace('{temp2}', "BMap.I('" + this.aa + "').toPage(" + b + ');')) + } + if (this.page < this.Xf) + e = 0 == this.page % this.Xf ? this.page - this.Xf - 1 : this.page - this.page % this.Xf + 1, + b = e + this.Xf - 1 + else { + e = Math.floor(this.Xf / 2) + var f = this.Xf % 2 - 1 + , b = this.Kd > this.page + e ? this.page + e : this.Kd + e = this.page - e - f + } + this.page > this.Kd - this.Xf && this.page >= this.Xf && (e = this.Kd - this.Xf + 1, + b = this.Kd) + for (f = e; f <= b; f++) + 0 < f && (f == this.page ? a.push('' + f + '') : 1 <= f && f <= this.Kd && (e = '[' + f + ']', + a.push(e.replace('{temp3}', "BMap.I('" + this.aa + "').toPage(" + f + ');')))) + c > this.Kd || a.push('\u4e0b\u4e00\u9875'.replace('{temp4}', "BMap.I('" + this.aa + "').toPage(" + c + ');')) + a.push('
') + return a.join('') + }, + toPage: function(a) { + a = a ? a : 1 + 'function' == typeof this.qK && (this.qK(a), + this.page = a) + this.update && this.va() + } + }) + function cb(a, b) { + W.call(this, a, b) + b = b || {} + b.renderOptions = b.renderOptions || {} + this.Np(b.pageCapacity) + 'undefined' != typeof b.renderOptions.selectFirstResult && !b.renderOptions.selectFirstResult ? this.UC() : this.oD() + this.ya = [] + this.yf = [] + this.mb = -1 + this.Pa = [] + var c = this + K.load('local', function() { + c.Nz() + }, q) + } + z.ta(cb, W, 'LocalSearch') + cb.fq = 10 + cb.k1 = 1 + cb.En = 100 + cb.zG = 2E3 + cb.HG = 1E5 + z.extend(cb.prototype, { + search: function(a, b) { + this.Pa.push({ + method: 'search', + arguments: [a, b] + }) + }, + an: function(a, b, c) { + this.Pa.push({ + method: 'searchInBounds', + arguments: [a, b, c] + }) + }, + Jp: function(a, b, c, e) { + this.Pa.push({ + method: 'searchNearby', + arguments: [a, b, c, e] + }) + }, + Pe: function() { + delete this.Ia + delete this.Me + delete this.ha + delete this.ua + this.mb = -1 + this.Ta() + this.j.la.Ma && (this.j.la.Ma.innerHTML = '') + }, + Am: u(), + oD: function() { + this.j.la.Ut = q + }, + UC: function() { + this.j.la.Ut = t + }, + Np: function(a) { + this.j.Jk = 'number' == typeof a && !isNaN(a) ? 1 > a ? cb.fq : a > cb.En ? cb.fq : a : cb.fq + }, + qf: function() { + return this.j.Jk + }, + toString: ca('LocalSearch') + }) + var Id = cb.prototype + T(Id, { + clearResults: Id.Pe, + setPageCapacity: Id.Np, + getPageCapacity: Id.qf, + gotoPage: Id.Am, + searchNearby: Id.Jp, + searchInBounds: Id.an, + search: Id.search, + enableFirstResultSelection: Id.oD, + disableFirstResultSelection: Id.UC + }) + function Jd(a, b) { + W.call(this, a, b) + } + z.ta(Jd, W, 'BaseRoute') + z.extend(Jd.prototype, { + Pe: u() + }) + function Kd(a, b) { + W.call(this, a, b) + b = b || {} + this.bu(b.policy) + this.oO(b.intercityPolicy) + this.xO(b.transitTypePolicy) + this.Np(b.pageCapacity) + this.Ab = zd + this.mq = qd + this.ya = [] + this.mb = -1 + this.j.Vn = b.enableTraffic || t + this.Pa = [] + var c = this + K.load('route', function() { + c.Sd() + }) + } + Kd.En = 100 + Kd.HP = [0, 1, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 1, 1, 1] + Kd.IP = [0, 3, 4, 0, 0, 0, 5] + z.ta(Kd, Jd, 'TransitRoute') + z.extend(Kd.prototype, { + bu: function(a) { + this.j.ie = 0 <= a && 5 >= a ? a : 0 + }, + oO: function(a) { + this.j.Hm = 0 <= a && 2 >= a ? a : 0 + }, + xO: function(a) { + this.j.tn = 0 <= a && 2 >= a ? a : 0 + }, + NA: function(a, b) { + this.Pa.push({ + method: '_internalSearch', + arguments: [a, b] + }) + }, + search: function(a, b) { + this.Pa.push({ + method: 'search', + arguments: [a, b] + }) + }, + Np: function(a) { + if ('string' === typeof a && (a = parseInt(a, 10), + isNaN(a))) { + this.j.Jk = Kd.En + return + } + this.j.Jk = 'number' !== typeof a ? Kd.En : 1 <= a && a <= Kd.En ? Math.round(a) : Kd.En + }, + toString: ca('TransitRoute'), + Z1: function(a) { + return a.replace(/\(.*\)/, '') + } + }) + var Ld = Kd.prototype + T(Ld, { + _internalSearch: Ld.NA + }) + function Md(a, b) { + W.call(this, a, b) + this.ya = [] + this.mb = -1 + this.Pa = [] + var c = this + , e = this.j.la + 1 !== e.kt && 2 !== e.kt && (e.kt = 1) + this.kv = this.j.la.Wb ? q : t + K.load('route', function() { + c.Sd() + }) + this.vE && this.vE() + } + Md.WP = ' \u73af\u5c9b \u65e0\u5c5e\u6027\u9053\u8def \u4e3b\u8def \u9ad8\u901f\u8fde\u63a5\u8def \u4ea4\u53c9\u70b9\u5185\u8def\u6bb5 \u8fde\u63a5\u9053\u8def \u505c\u8f66\u573a\u5185\u90e8\u9053\u8def \u670d\u52a1\u533a\u5185\u90e8\u9053\u8def \u6865 \u6b65\u884c\u8857 \u8f85\u8def \u531d\u9053 \u5168\u5c01\u95ed\u9053\u8def \u672a\u5b9a\u4e49\u4ea4\u901a\u533a\u57df POI\u8fde\u63a5\u8def \u96a7\u9053 \u6b65\u884c\u9053 \u516c\u4ea4\u4e13\u7528\u9053 \u63d0\u524d\u53f3\u8f6c\u9053'.split(' ') + z.ta(Md, Jd, 'DWRoute') + z.extend(Md.prototype, { + search: function(a, b, c) { + this.Pa.push({ + method: 'search', + arguments: [a, b, c] + }) + } + }) + function Nd(a, b) { + Md.call(this, a, b) + b = b || {} + this.j.Vn = b.enableTraffic || t + this.bu(b.policy) + this.Ab = Ad + this.mq = wd + } + z.ta(Nd, Md, 'DrivingRoute') + Nd.prototype.bu = function(a) { + this.j.ie = 0 <= a && 5 >= a ? a : 0 + } + + function Od(a, b) { + Md.call(this, a, b) + this.Ab = Bd + this.mq = vd + this.kv = t + } + z.ta(Od, Md, 'WalkingRoute') + function Pd(a, b) { + Md.call(this, a, b) + this.Ab = Ed + this.mq = xd + this.kv = t + } + z.ta(Pd, Md, 'RidingRoute') + function Qd(a, b) { + z.lang.Ca.call(this) + this.Vf = [] + this.Kk = [] + this.j = b + this.uj = a + this.map = this.j.la.map || s + this.hO = this.j.hO + this.zb = s + this.pk = 0 + this.SF = '' + this.nf = 1 + this.uD = '' + this.Ep = [0, 0, 0, 0, 0, 0, 0] + this.XM = [] + this.os = [1, 1, 1, 1, 1, 1, 1] + this.VO = [1, 1, 1, 1, 1, 1, 1] + this.Fp = [0, 0, 0, 0, 0, 0, 0] + this.Zm = [0, 0, 0, 0, 0, 0, 0] + this.Ib = [{ + m: '', + Ed: 0, + vn: 0, + x: 0, + y: 0, + pa: -1 + }, { + m: '', + Ed: 0, + vn: 0, + x: 0, + y: 0, + pa: -1 + }, { + m: '', + Ed: 0, + vn: 0, + x: 0, + y: 0, + pa: -1 + }, { + m: '', + Ed: 0, + vn: 0, + x: 0, + y: 0, + pa: -1 + }, { + m: '', + Ed: 0, + vn: 0, + x: 0, + y: 0, + pa: -1 + }, { + m: '', + Ed: 0, + vn: 0, + x: 0, + y: 0, + pa: -1 + }, { + m: '', + Ed: 0, + vn: 0, + x: 0, + y: 0, + pa: -1 + }] + this.bi = -1 + this.ru = [] + this.aG = [] + K.load('route', u()) + } + z.lang.ta(Qd, z.lang.Ca, 'RouteAddr') + var Rd = navigator.userAgent; + /ipad|iphone|ipod|iph/i.test(Rd) + var Sd = /android/i.test(Rd) + function Td(a) { + this.vf = a || {} + } + z.extend(Td.prototype, { + gO: function(a, b, c) { + var e = this + K.load('route', function() { + e.Sd(a, b, c) + }) + } + }) + function Ud(a) { + this.j = {} + z.extend(this.j, a) + this.Pa = [] + var b = this + K.load('othersearch', function() { + b.Sd() + }) + } + z.ta(Ud, z.lang.Ca, 'Geocoder') + z.extend(Ud.prototype, { + vm: function(a, b, c) { + this.Pa.push({ + method: 'getPoint', + arguments: [a, b, c] + }) + }, + rm: function(a, b, c) { + this.Pa.push({ + method: 'getLocation', + arguments: [a, b, c] + }) + }, + toString: ca('Geocoder') + }) + var Vd = Ud.prototype + T(Vd, { + getPoint: Vd.vm, + getLocation: Vd.rm + }) + function Geolocation(a) { + a = a || {} + this.K = { + timeout: a.timeout || 1E4, + maximumAge: a.maximumAge || 6E5, + enableHighAccuracy: a.enableHighAccuracy || t, + zi: a.SDKLocation || t + } + this.pe = [] + var b = this + K.load('othersearch', function() { + for (var a = 0, e; e = b.pe[a]; a++) + b[e.method].apply(b, e.arguments) + }) + } + z.extend(Geolocation.prototype, { + getCurrentPosition: function(a, b) { + this.pe.push({ + method: 'getCurrentPosition', + arguments: arguments + }) + }, + getStatus: function() { + return sd + }, + enableSDKLocation: function() { + H() && (this.K.zi = q) + }, + disableSDKLocation: function() { + this.K.zi = t + } + }) + function Wd(a) { + a = a || {} + a.la = a.renderOptions || {} + this.j = { + la: { + map: a.la.map || s + } + } + this.Pa = [] + var b = this + K.load('othersearch', function() { + b.Sd() + }) + } + z.ta(Wd, z.lang.Ca, 'LocalCity') + z.extend(Wd.prototype, { + get: function(a) { + this.Pa.push({ + method: 'get', + arguments: [a] + }) + }, + toString: ca('LocalCity') + }) + function Xd() { + this.Pa = [] + var a = this + K.load('othersearch', function() { + a.Sd() + }) + } + z.ta(Xd, z.lang.Ca, 'Boundary') + z.extend(Xd.prototype, { + get: function(a, b) { + this.Pa.push({ + method: 'get', + arguments: [a, b] + }) + }, + toString: ca('Boundary') + }) + function Yd(a, b) { + W.call(this, a, b) + this.TP = Cd + this.VP = Fd + this.SP = Dd + this.UP = Gd + this.Pa = [] + var c = this + K.load('buslinesearch', function() { + c.Sd() + }) + } + Yd.zv = G.qa + 'iw_plus.gif' + Yd.YS = G.qa + 'iw_minus.gif' + Yd.RU = G.qa + 'stop_icon.png' + z.ta(Yd, W) + z.extend(Yd.prototype, { + getBusList: function(a) { + this.Pa.push({ + method: 'getBusList', + arguments: [a] + }) + }, + getBusLine: function(a) { + this.Pa.push({ + method: 'getBusLine', + arguments: [a] + }) + }, + setGetBusListCompleteCallback: function(a) { + this.j.zN = a || u() + }, + setGetBusLineCompleteCallback: function(a) { + this.j.yN = a || u() + }, + setBusListHtmlSetCallback: function(a) { + this.j.wN = a || u() + }, + setBusLineHtmlSetCallback: function(a) { + this.j.vN = a || u() + }, + setPolylinesSetCallback: function(a) { + this.j.bF = a || u() + } + }) + function Zd(a) { + W.call(this, a) + a = a || {} + this.ub = { + input: a.input || s, + gC: a.baseDom || s, + types: a.types || [], + py: a.onSearchComplete || u() + } + this.Ad.src = a.location || '\u5168\u56fd' + this.Wi = '' + this.pg = s + this.lI = '' + this.Mi() + Ra(Ha) + var b = this + K.load('autocomplete', function() { + b.Sd() + }) + } + z.ta(Zd, W, 'Autocomplete') + z.extend(Zd.prototype, { + Mi: u(), + show: u(), + U: u(), + KF: function(a) { + this.ub.types = a + }, + fn: function(a) { + this.Ad.src = a + }, + search: ba('Wi'), + Ly: ba('lI') + }) + var Ta + function Oa(a, b) { + function c() { + f.j.visible ? ('inter' === f.Ke && f.j.haveBreakId && f.j.indoorExitControl === q ? z.D.show(f.GA) : z.D.U(f.GA), + this.j.closeControl && this.Bf && this.B && this.B.La() === this.C ? z.D.show(f.Bf) : z.D.U(f.Bf), + this.j.forceCloseControl && z.D.show(f.Bf)) : (z.D.U(f.Bf), + z.D.U(f.GA)) + } + this.C = 'string' == typeof a ? z.$(a) : a + this.aa = $d++ + this.j = { + enableScrollWheelZoom: q, + panoramaRenderer: 'flash', + swfSrc: B.vg('main_domain_nocdn', 'res/swf/') + 'APILoader.swf', + visible: q, + indoorExitControl: q, + indoorFloorControl: t, + linksControl: q, + clickOnRoad: q, + navigationControl: q, + closeControl: q, + indoorSceneSwitchControl: q, + albumsControl: t, + albumsControlOptions: {}, + copyrightControlOptions: {}, + forceCloseControl: t, + haveBreakId: t + } + var b = b || {}, e + for (e in b) + this.j[e] = b[e] + b.closeControl === q && (this.j.forceCloseControl = q) + b.useWebGL === t && Na(t) + this.Da = { + heading: 0, + pitch: 0 + } + this.bo = [] + this.Lb = this.Za = s + this.dk = this.er() + this.ya = [] + this.Mc = 1 + this.Ke = this.xT = this.jl = '' + this.Je = {} + this.Of = s + this.Sg = [] + this.xr = [] + 'cvsRender' == this.dk || Na() ? (this.Vj = 90, + this.Xj = -90) : 'cssRender' == this.dk && (this.Vj = 45, + this.Xj = -45) + this.Br = t + var f = this + this.co = function() { + this.dk === 'flashRender' ? K.load('panoramaflash', function() { + f.Mi() + }, q) : K.load('panorama', function() { + f.ib() + }, q) + b.of == 'api' ? Ra(Da) : Ra(Ea) + this.co = u() + } + + this.j.jT !== q && (this.co(), + B.Fn('cus.fire', 'count', 'z_loadpanoramacount')) + this.aU(this.C) + this.addEventListener('id_changed', function() { + Ra(Ca, { + from: b.of + }) + }) + this.mQ() + this.addEventListener('indoorexit_options_changed', c) + this.addEventListener('scene_type_changed', c) + this.addEventListener('onclose_options_changed', c) + this.addEventListener('onvisible_changed', c) + } + var ae = 4 + , be = 1 + , $d = 0 + z.lang.ta(Oa, z.lang.Ca, 'Panorama') + z.extend(Oa.prototype, { + mQ: function() { + var a = this + , b = this.Bf = L('div') + b.className = 'pano_close' + b.style.cssText = 'z-index: 1201;display: none' + b.title = '\u9000\u51fa\u5168\u666f' + b.onclick = function() { + a.U() + } + + this.C.appendChild(b) + var c = this.GA = L('a') + c.className = 'pano_pc_indoor_exit' + c.style.cssText = 'z-index: 1201;display: none' + c.innerHTML = '\u51fa\u53e3' + c.title = '\u9000\u51fa\u5ba4\u5185\u666f' + c.onclick = function() { + a.Vo() + } + + this.C.appendChild(c) + window.ActiveXObject && !document.addEventListener && (b.style.backgroundColor = 'rgb(37,37,37)', + c.style.backgroundColor = 'rgb(37,37,37)') + }, + Vo: u(), + aU: function(a) { + var b, c + b = a.style + c = Va(a).position + 'absolute' != c && 'relative' != c && (b.position = 'relative', + b.zIndex = 0) + if ('absolute' === c || 'relative' === c) + if (a = Va(a).zIndex, + !a || 'auto' === a) + b.zIndex = 0 + }, + OX: w('bo'), + Xb: w('Za'), + pY: w('jw'), + wO: w('jw'), + ga: w('Lb'), + Ea: w('Da'), + fa: w('Mc'), + jj: w('jl'), + I3: function() { + return this.U1 || [] + }, + D3: w('xT'), + ft: w('Ke'), + Ny: function(a) { + a !== this.Ke && (this.Ke = a, + this.dispatchEvent(new P('onscene_type_changed'))) + }, + vc: function(a, b, c) { + 'object' === typeof b && (c = b, + b = l) + a != this.Za && (this.ul = this.Za, + this.vl = this.Lb, + this.Za = a, + this.Ke = b || 'street', + this.Lb = s, + c && c.pov && this.Pc(c.pov)) + }, + sa: function(a) { + a.pb(this.Lb) || (this.ul = this.Za, + this.vl = this.Lb, + this.Lb = a, + this.Za = s) + }, + Pc: function(a) { + a && (this.Da = a, + a = this.Da.pitch, + a > this.Vj ? a = this.Vj : a < this.Xj && (a = this.Xj), + this.Br = q, + this.Da.pitch = a) + }, + H_: function(a, b) { + this.Xj = 0 <= a ? 0 : a + this.Vj = 0 >= b ? 0 : b + }, + Qc: function(a) { + a != this.Mc && (a > ae && (a = ae), + a < be && (a = be), + a != this.Mc && (this.Mc = a), + 'cssRender' === this.dk && this.Pc(this.Da)) + }, + GB: function() { + if (this.B) + for (var a = this.B.Hx(), b = 0; b < a.length; b++) + (a[b]instanceof U || a[b]instanceof uc) && a[b].point && this.ya.push(a[b]) + }, + GF: ba('B'), + au: function(a) { + this.Of = a || 'none' + }, + Qk: function(a) { + for (var b in a) { + if ('object' == typeof a[b]) + for (var c in a[b]) + this.j[b][c] = a[b][c] + else + this.j[b] = a[b] + a.closeControl === q && (this.j.forceCloseControl = q) + a.closeControl === t && (this.j.forceCloseControl = t) + switch (b) { + case 'linksControl': + this.dispatchEvent(new P('onlinks_visible_changed')) + break + case 'clickOnRoad': + this.dispatchEvent(new P('onclickonroad_changed')) + break + case 'navigationControl': + this.dispatchEvent(new P('onnavigation_visible_changed')) + break + case 'indoorSceneSwitchControl': + this.dispatchEvent(new P('onindoor_default_switch_mode_changed')) + break + case 'albumsControl': + this.dispatchEvent(new P('onalbums_visible_changed')) + break + case 'albumsControlOptions': + this.dispatchEvent(new P('onalbums_options_changed')) + break + case 'copyrightControlOptions': + this.dispatchEvent(new P('oncopyright_options_changed')) + break + case 'closeControl': + this.dispatchEvent(new P('onclose_options_changed')) + break + case 'indoorExitControl': + this.dispatchEvent(new P('onindoorexit_options_changed')) + break + case 'indoorFloorControl': + this.dispatchEvent(new P('onindoorfloor_options_changed')) + } + } + }, + Ek: function() { + this.Dl.style.visibility = 'hidden' + }, + Ry: function() { + this.Dl.style.visibility = 'visible' + }, + cX: function() { + this.j.enableScrollWheelZoom = q + }, + NW: function() { + this.j.enableScrollWheelZoom = t + }, + show: function() { + this.j.visible = q + }, + U: function() { + this.j.visible = t + }, + er: function() { + return Ua() && !H() && 'javascript' != this.j.panoramaRenderer ? 'flashRender' : !H() && Ob() ? 'cvsRender' : 'cssRender' + }, + Ga: function(a) { + this.Je[a.ld] = a + }, + Qb: function(a) { + delete this.Je[a] + }, + kE: function() { + return this.j.visible + }, + fh: function() { + return new O(this.C.clientWidth,this.C.clientHeight) + }, + La: w('C'), + yL: function() { + var a = B.vg('baidumap', '?') + , b = this.Xb() + if (b) { + var b = { + panotype: this.ft(), + heading: this.Ea().heading, + pitch: this.Ea().pitch, + pid: b, + panoid: b, + from: 'api' + }, c + for (c in b) + a += c + '=' + b[c] + '&' + } + return a.slice(0, -1) + }, + Px: function() { + this.Qk({ + copyrightControlOptions: { + logoVisible: t + } + }) + }, + NF: function() { + this.Qk({ + copyrightControlOptions: { + logoVisible: q + } + }) + }, + aC: function(a) { + function b(a, b) { + return function() { + a.xr.push({ + iN: b, + hN: arguments + }) + } + } + for (var c = a.getPanoMethodList(), e = '', f = 0, g = c.length; f < g; f++) + e = c[f], + this[e] = b(this, e) + this.Sg.push(a) + }, + rF: function(a) { + for (var b = this.Sg.length; b--; ) + this.Sg[b] === a && this.Sg.splice(b, 1) + }, + FF: u() + }) + var ce = Oa.prototype + T(ce, { + setId: ce.vc, + setPosition: ce.sa, + setPov: ce.Pc, + setZoom: ce.Qc, + setOptions: ce.Qk, + getId: ce.Xb, + getPosition: ce.ga, + getPov: ce.Ea, + getZoom: ce.fa, + getLinks: ce.OX, + getBaiduMapUrl: ce.yL, + hideMapLogo: ce.Px, + showMapLogo: ce.NF, + enableDoubleClickZoom: ce.W2, + disableDoubleClickZoom: ce.J2, + enableScrollWheelZoom: ce.cX, + disableScrollWheelZoom: ce.NW, + show: ce.show, + hide: ce.U, + addPlugin: ce.aC, + removePlugin: ce.rF, + getVisible: ce.kE, + addOverlay: ce.Ga, + removeOverlay: ce.Qb, + getSceneType: ce.ft, + setPanoramaPOIType: ce.au, + exitInter: ce.Vo, + setInteractiveState: ce.FF + }) + T(window, { + BMAP_PANORAMA_POI_HOTEL: 'hotel', + BMAP_PANORAMA_POI_CATERING: 'catering', + BMAP_PANORAMA_POI_MOVIE: 'movie', + BMAP_PANORAMA_POI_TRANSIT: 'transit', + BMAP_PANORAMA_POI_INDOOR_SCENE: 'indoor_scene', + BMAP_PANORAMA_POI_NONE: 'none', + BMAP_PANORAMA_INDOOR_SCENE: 'inter', + BMAP_PANORAMA_STREET_SCENE: 'street' + }) + function de() { + z.lang.Ca.call(this) + this.ld = 'PanoramaOverlay_' + this.aa + this.P = s + this.Qa = q + } + z.lang.ta(de, z.lang.Ca, 'PanoramaOverlayBase') + z.extend(de.prototype, { + E3: w('ld'), + na: function() { + aa('initialize\u65b9\u6cd5\u672a\u5b9e\u73b0') + }, + remove: function() { + aa('remove\u65b9\u6cd5\u672a\u5b9e\u73b0') + }, + Nf: function() { + aa('_setOverlayProperty\u65b9\u6cd5\u672a\u5b9e\u73b0') + } + }) + function ee(a, b) { + de.call(this) + var c = { + position: s, + altitude: 2, + displayDistance: q + }, b = b || {}, e + for (e in b) + c[e] = b[e] + this.Lb = c.position + this.Ij = a + this.xq = c.altitude + this.zR = c.displayDistance + this.UF = c.color + this.kM = c.hoverColor + this.backgroundColor = c.backgroundColor + this.jK = c.backgroundHoverColor + this.borderColor = c.borderColor + this.oK = c.borderHoverColor + this.fontSize = c.fontSize + this.padding = c.padding + this.pE = c.imageUrl + this.size = c.size + this.xe = c.image + this.width = c.width + this.height = c.height + this.HY = c.imageData + this.borderWidth = c.borderWidth + } + z.lang.ta(ee, de, 'PanoramaLabel') + z.extend(ee.prototype, { + j3: w('borderWidth'), + getImageData: w('HY'), + zm: w('UF'), + y3: w('kM'), + f3: w('backgroundColor'), + g3: w('jK'), + h3: w('borderColor'), + i3: w('oK'), + w3: w('fontSize'), + F3: w('padding'), + z3: w('pE'), + cb: w('size'), + zx: w('xe'), + sa: function(a) { + this.Lb = a + this.Nf('position', a) + }, + ga: w('Lb'), + dd: function(a) { + this.Ij = a + this.Nf('content', a) + }, + xk: w('Ij'), + AF: function(a) { + this.xq = a + this.Nf('altitude', a) + }, + Yo: w('xq'), + Ea: function() { + var a = this.ga() + , b = s + , c = s + this.P && (c = this.P.ga()) + if (a && c) + if (a.pb(c)) + b = this.P.Ea() + else { + b = {} + b.heading = fe(a.lng - c.lng, a.lat - c.lat) || 0 + var a = b + , c = this.Yo() + , e = this.Xn() + a.pitch = Math.round(180 * (Math.atan(c / e) / Math.PI)) || 0 + } + return b + }, + Xn: function() { + var a = 0, b, c + this.P && (b = this.P.ga(), + (c = this.ga()) && !c.pb(b) && (a = S.$o(b, c))) + return a + }, + U: function() { + aa('hide\u65b9\u6cd5\u672a\u5b9e\u73b0') + }, + show: function() { + aa('show\u65b9\u6cd5\u672a\u5b9e\u73b0') + }, + Nf: u() + }) + var ge = ee.prototype + T(ge, { + setPosition: ge.sa, + getPosition: ge.ga, + setContent: ge.dd, + getContent: ge.xk, + setAltitude: ge.AF, + getAltitude: ge.Yo, + getPov: ge.Ea, + show: ge.show, + hide: ge.U + }) + function he(a, b) { + de.call(this) + var c = { + icon: '', + title: '', + panoInfo: s, + altitude: 2 + }, b = b || {}, e + for (e in b) + c[e] = b[e] + this.Lb = a + this.gI = c.icon + this.DJ = c.title + this.xq = c.altitude + this.OT = c.panoInfo + this.Da = { + heading: 0, + pitch: 0 + } + } + z.lang.ta(he, de, 'PanoramaMarker') + z.extend(he.prototype, { + sa: function(a) { + this.Lb = a + this.Nf('position', a) + }, + ga: w('Lb'), + Ec: function(a) { + this.DJ = a + this.Nf('title', a) + }, + gp: w('DJ'), + Rb: function(a) { + this.gI = icon + this.Nf('icon', a) + }, + ap: w('gI'), + AF: function(a) { + this.xq = a + this.Nf('altitude', a) + }, + Yo: w('xq'), + $D: w('OT'), + Ea: function() { + var a = s + if (this.P) { + var a = this.P.ga() + , b = this.ga() + , a = fe(b.lng - a.lng, b.lat - a.lat) + isNaN(a) && (a = 0) + a = { + heading: a, + pitch: 0 + } + } else + a = this.Da + return a + }, + Nf: u() + }) + var ie = he.prototype + T(ie, { + setPosition: ie.sa, + getPosition: ie.ga, + setTitle: ie.Ec, + getTitle: ie.gp, + setAltitude: ie.AF, + getAltitude: ie.Yo, + getPanoInfo: ie.$D, + getIcon: ie.ap, + setIcon: ie.Rb, + getPov: ie.Ea + }) + function fe(a, b) { + var c = 0 + if (0 !== a && 0 !== b) { + var c = 180 * (Math.atan(a / b) / Math.PI) + , e = 0 + 0 < a && 0 > b && (e = 90) + 0 > a && 0 > b && (e = 180) + 0 > a && 0 < b && (e = 270) + c = (c + 90) % 90 + e + } else + 0 === a ? c = 0 > b ? 180 : 0 : 0 === b && (c = 0 < a ? 90 : 270) + return Math.round(c) + } + function Na(a) { + if ('boolean' === typeof je) + return je + if (a === t || !window.WebGLRenderingContext) + return je = t + if (z.platform.Jm) { + a = 0 + try { + a = navigator.userAgent.split('Android ')[1].charAt(0) + } catch (b) {} + if (5 > a) + return je = t + } + var a = document.createElement('canvas') + , c = s + try { + c = a.getContext('webgl') + } catch (e) { + je = t + } + return je = c === s ? t : q + } + var je + function ke() { + if ('boolean' === typeof le) + return le + le = q + if (z.platform.zE) + return q + var a = navigator.userAgent + return -1 < a.indexOf('Chrome') || -1 < a.indexOf('SAMSUNG-GT-I9508') ? q : le = t + } + var le + function ec(a, b) { + this.P = a || s + var c = this + c.P && c.ba() + K.load('pservice', function() { + c.SQ() + }) + 'api' == (b || {}).of ? Ra(Fa) : Ra(Ga) + this.xd = { + getPanoramaById: [], + getPanoramaByLocation: [], + getVisiblePOIs: [], + getRecommendPanosById: [], + getPanoramaVersions: [], + checkPanoSupportByCityCode: [], + getPanoramaByPOIId: [], + getCopyrightProviders: [] + } + } + B.Tm(function(a) { + 'flashRender' !== a.er() && new ec(a,{ + of: 'api' + }) + }) + z.extend(ec.prototype, { + ba: function() { + function a(a) { + if (a) { + if (a.id != b.jw) { + b.wO(a.id) + b.ea = a + ke() || b.dispatchEvent(new P('onthumbnail_complete')) + b.Za != s && (b.vl = b._position) + for (var c in a) + if (a.hasOwnProperty(c)) + switch (b['_' + c] = a[c], + c) { + case 'position': + b.Lb = a[c] + break + case 'id': + b.Za = a[c] + break + case 'links': + b.bo = a[c] + break + case 'zoom': + b.Mc = a[c] + } + if (b.vl) { + var g = b.vl + , i = b._position + c = g.lat + var k = i.lat + , m = Pb(k - c) + , g = Pb(i.lng - g.lng) + c = Math.sin(m / 2) * Math.sin(m / 2) + Math.cos(Pb(c)) * Math.cos(Pb(k)) * Math.sin(g / 2) * Math.sin(g / 2) + b.wH = 6371E3 * 2 * Math.atan2(Math.sqrt(c), Math.sqrt(1 - c)) + } + c = new P('ondataload') + c.data = a + b.dispatchEvent(c) + b.dispatchEvent(new P('onposition_changed')) + b.dispatchEvent(new P('onlinks_changed')) + b.dispatchEvent(new P('oncopyright_changed'), { + copyright: a.copyright + }) + a.bm && b.j.closeControl ? z.D.show(b.WR) : z.D.U(b.WR) + } + } else + b.Za = b.ul, + b.Lb = b.vl, + b.dispatchEvent(new P('onnoresult')) + } + var b = this.P + , c = this + b.addEventListener('id_changed', function() { + c.ep(b.Xb(), a) + }) + b.addEventListener('iid_changed', function() { + c.Tg(ec.el + 'qt=idata&iid=' + b.CA + '&fn=', function(b) { + if (b && b.result && 0 == b.result.error) { + var b = b.content[0].interinfo + , f = {} + f.bm = b.BreakID + for (var g = b.Defaultfloor, i = s, k = 0; k < b.Floors.length; k++) + if (b.Floors[k].Floor == g) { + i = b.Floors[k] + break + } + f.id = i.StartID || i.Points[0].PID + c.ep(f.id, a, f) + } + }) + }) + b.addEventListener('position_changed_inner', function() { + c.kj(b.ga(), a) + }) + }, + ep: function(a, b) { + this.xd.getPanoramaById.push(arguments) + }, + kj: function(a, b, c) { + this.xd.getPanoramaByLocation.push(arguments) + }, + lE: function(a, b, c, e) { + this.xd.getVisiblePOIs.push(arguments) + }, + Kx: function(a, b) { + this.xd.getRecommendPanosById.push(arguments) + }, + Jx: function(a) { + this.xd.getPanoramaVersions.push(arguments) + }, + nC: function(a, b) { + this.xd.checkPanoSupportByCityCode.push(arguments) + }, + Ix: function(a, b) { + this.xd.getPanoramaByPOIId.push(arguments) + }, + CL: function(a) { + this.xd.getCopyrightProviders.push(arguments) + } + }) + var ne = ec.prototype + T(ne, { + getPanoramaById: ne.ep, + getPanoramaByLocation: ne.kj, + getPanoramaByPOIId: ne.Ix + }) + function dc(a) { + Mc.call(this) + 'api' == (a || {}).of ? Ra(Aa) : Ra(Ba) + } + dc.OG = B.vg('pano', 'tile/') + dc.prototype = new Mc + dc.prototype.getTilesUrl = function(a, b) { + var c = dc.OG[(a.x + a.y) % dc.OG.length] + '?udt=20150114&qt=tile&styles=pl&x=' + a.x + '&y=' + a.y + '&z=' + b + z.ca.ia && 6 >= z.ca.ia && (c += '&color_dep=32') + return c + } + + dc.prototype.zt = ca(q) + oe.Wd = new S + function oe() {} + z.extend(oe, { + OW: function(a, b, c) { + c = z.lang.Nc(c) + b = { + data: b + } + 'position_changed' == a && (b.data = oe.Wd.xj(new Q(b.data.mercatorX,b.data.mercatorY))) + c.dispatchEvent(new P('on' + a), b) + } + }) + var pe = oe + T(pe, { + dispatchFlashEvent: pe.OW + }) + var qe = { + KP: 50 + } + qe.Ou = B.vg('pano')[0] + qe.Mu = { + width: 220, + height: 60 + } + z.extend(qe, { + tM: function(a, b, c, e) { + if (!b || !c || !c.lngLat || !c.panoInstance) + e() + else { + this.jo === l && (this.jo = new ec(s,{ + of: 'api' + })) + var f = this + this.jo.nC(b, function(b) { + b ? f.jo.kj(c.lngLat, qe.KP, function(b) { + if (b && b.id) { + var g = b.id + , m = b.rh + , b = b.th + , n = ec.Wd.kh(c.lngLat) + , o = f.AS(n, { + x: m, + y: b + }) + , m = f.PL(g, o, 0, qe.Mu.width, qe.Mu.height) + a.content = f.BS(a.content, m, c.titleTip, c.beforeDomId) + a.addEventListener('open', function() { + ia.M(z.Fc('infoWndPano'), 'click', function() { + c.panoInstance.vc(g) + c.panoInstance.show() + c.panoInstance.Pc({ + heading: o, + pitch: 0 + }) + }) + }) + } + e() + }) : e() + }) + } + }, + BS: function(a, b, c, e) { + var c = c || '', f + !e || !a.split(e)[0] ? (e = a, + a = '') : (e = a.split(e)[0], + f = e.lastIndexOf('<'), + e = a.substring(0, f), + a = a.substring(f)) + f = [] + var g = qe.Mu.width + , i = qe.Mu.height + f.push(e) + f.push("t |
') + if (!(1 > b)) { + if (this.page >= this.Sf) { + var e + a.push('首页'.replace('{temp1}', "BMap.I('" + this.ea + "').toPage(1);")) + } + a.push('上一页'.replace('{temp2}', "BMap.I('" + this.ea + "').toPage(" + b + ');')) + } + if (this.page < this.Sf) e = 0 == this.page % this.Sf ? this.page - this.Sf - 1 : this.page - this.page % this.Sf + 1, b = e + this.Sf - 1 + else { + e = Math.floor(this.Sf / 2) + var f = this.Sf % 2 - 1, + b = this.Jd > this.page + e ? this.page + e : this.Jd + e = this.page - e - f + } + this.page > this.Jd - this.Sf && this.page >= this.Sf && (e = this.Jd - this.Sf + 1, b = this.Jd) + for (f = e; f <= b; f++) 0 < f && (f == this.page ? a.push('' + f + '') : 1 <= f && f <= this.Jd && (e = '[' + f + ']', a.push(e.replace('{temp3}', "BMap.I('" + this.ea + "').toPage(" + f + ');')))) + c > this.Jd || a.push('下一页'.replace('{temp4}', "BMap.I('" + this.ea + "').toPage(" + c + ');')) + a.push('
') + return a.join('') + }, + toPage: function(a) { + a = a ? a : 1 + 'function' == typeof this.eJ && (this.eJ(a), this.page = a) + this.update && this.za() + } + }) + + function fb(a, b) { + X.call(this, a, b) + b = b || {} + b.renderOptions = b.renderOptions || {} + this.kp(b.pageCapacity) + 'undefined' != typeof b.renderOptions.selectFirstResult && !b.renderOptions.selectFirstResult ? this.VB() : this.nC() + this.Ba = [] + this.sf = [] + this.ob = -1 + this.Ra = [] + var c = this + K.load('local', function() { + c.Ny() + }, p) + } + z.wa(fb, X, 'LocalSearch') + fb.Dp = 10 + fb.o0 = 1 + fb.Um = 100 + fb.wF = 2E3 + fb.EF = 1E5 + z.extend(fb.prototype, { + search: function(a, b) { + this.Ra.push({ + method: 'search', + arguments: [a, b] + }) + }, + Bm: function(a, b, c) { + this.Ra.push({ + method: 'searchInBounds', + arguments: [a, b, c] + }) + }, + hp: function(a, b, c, e) { + this.Ra.push({ + method: 'searchNearby', + arguments: [a, b, c, e] + }) + }, + Pe: function() { + delete this.Ma + delete this.Ke + delete this.la + delete this.ya + this.ob = -1 + this.Xa() + this.m.pa.Oa && (this.m.pa.Oa.innerHTML = '') + }, + dm: u(), + nC: function() { + this.m.pa.gt = p + }, + VB: function() { + this.m.pa.gt = t + }, + kp: function(a) { + this.m.vk = 'number' == typeof a && !isNaN(a) ? 1 > a ? fb.Dp : a > fb.Um ? fb.Dp : a : fb.Dp + }, + kf: function() { + return this.m.vk + }, + toString: ea('LocalSearch') + }) + var ce = fb.prototype + U(ce, { + clearResults: ce.Pe, + setPageCapacity: ce.kp, + getPageCapacity: ce.kf, + gotoPage: ce.dm, + searchNearby: ce.hp, + searchInBounds: ce.Bm, + search: ce.search, + enableFirstResultSelection: ce.nC, + disableFirstResultSelection: ce.VB + }) + + function de(a, b) { + X.call(this, a, b) + } + z.wa(de, X, 'BaseRoute') + z.extend(de.prototype, { + Pe: u() + }) + + function ee(a, b) { + X.call(this, a, b) + b = b || {} + this.nt(b.policy) + this.cN(b.intercityPolicy) + this.lN(b.transitTypePolicy) + this.kp(b.pageCapacity) + this.Eb = Ud + this.Jp = Ld + this.Ba = [] + this.ob = -1 + this.m.mn = b.enableTraffic || t + this.Ra = [] + var c = this + K.load('route', function() { + c.Qd() + }) + } + ee.Um = 100 + ee.vO = [0, 1, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 1, 1, 1] + ee.wO = [0, 3, 4, 0, 0, 0, 5] + z.wa(ee, de, 'TransitRoute') + z.extend(ee.prototype, { + nt: function(a) { + this.m.ge = 0 <= a && 5 >= a ? a : 0 + }, + cN: function(a) { + this.m.jm = 0 <= a && 2 >= a ? a : 0 + }, + lN: function(a) { + this.m.Km = 0 <= a && 2 >= a ? a : 0 + }, + Pz: function(a, b) { + this.Ra.push({ + method: '_internalSearch', + arguments: [a, b] + }) + }, + search: function(a, b) { + this.Ra.push({ + method: 'search', + arguments: [a, b] + }) + }, + kp: function(a) { + if ('string' === typeof a && (a = parseInt(a, 10), isNaN(a))) { + this.m.vk = ee.Um + return + } + this.m.vk = 'number' !== typeof a ? ee.Um : 1 <= a && a <= ee.Um ? Math.round(a) : ee.Um + }, + toString: ea('TransitRoute'), + e1: function(a) { + return a.replace(/\(.*\)/, '') + } + }) + var fe = ee.prototype + U(fe, { + _internalSearch: fe.Pz + }) + + function ge(a, b) { + X.call(this, a, b) + this.Ba = [] + this.ob = -1 + this.Ra = [] + var c = this, + e = this.m.pa + 1 !== e.ys && 2 !== e.ys && (e.ys = 1) + this.yu = this.m.pa.Wb ? p : t + K.load('route', function() { + c.Qd() + }) + this.wD && this.wD() + } + ge.KO = ' 环岛 无属性道路 主路 高速连接路 交叉点内路段 连接道路 停车场内部道路 服务区内部道路 桥 步行街 辅路 匝道 全封闭道路 未定义交通区域 POI连接路 隧道 步行道 公交专用道 提前右转道'.split(' ') + z.wa(ge, de, 'DWRoute') + z.extend(ge.prototype, { + search: function(a, b, c) { + this.Ra.push({ + method: 'search', + arguments: [a, b, c] + }) + } + }) + + function he(a, b) { + ge.call(this, a, b) + b = b || {} + this.m.mn = b.enableTraffic || t + this.nt(b.policy) + this.Eb = Vd + this.Jp = Rd + } + z.wa(he, ge, 'DrivingRoute') + he.prototype.nt = function(a) { + this.m.ge = 0 <= a && 5 >= a ? a : 0 + } + + function ie(a, b) { + ge.call(this, a, b) + this.Eb = Wd + this.Jp = Qd + this.yu = t + } + z.wa(ie, ge, 'WalkingRoute') + + function je(a, b) { + ge.call(this, a, b) + this.Eb = Zd + this.Jp = Sd + this.yu = t + } + z.wa(je, ge, 'RidingRoute') + + function ke(a, b) { + z.lang.Ga.call(this) + this.Of = [] + this.wk = [] + this.m = b + this.mj = a + this.map = this.m.pa.map || s + this.XM = this.m.XM + this.Cb = s + this.ck = 0 + this.KE = '' + this.gf = 1 + this.uC = '' + this.cp = [0, 0, 0, 0, 0, 0, 0] + this.IL = [] + this.Dr = [1, 1, 1, 1, 1, 1, 1] + this.GN = [1, 1, 1, 1, 1, 1, 1] + this.dp = [0, 0, 0, 0, 0, 0, 0] + this.zm = [0, 0, 0, 0, 0, 0, 0] + this.Kb = [{ + B: '', + Dd: 0, + Lm: 0, + x: 0, + y: 0, + ra: -1 + }, { + B: '', + Dd: 0, + Lm: 0, + x: 0, + y: 0, + ra: -1 + }, { + B: '', + Dd: 0, + Lm: 0, + x: 0, + y: 0, + ra: -1 + }, { + B: '', + Dd: 0, + Lm: 0, + x: 0, + y: 0, + ra: -1 + }, { + B: '', + Dd: 0, + Lm: 0, + x: 0, + y: 0, + ra: -1 + }, { + B: '', + Dd: 0, + Lm: 0, + x: 0, + y: 0, + ra: -1 + }, { + B: '', + Dd: 0, + Lm: 0, + x: 0, + y: 0, + ra: -1 + }] + this.Qh = -1 + this.It = [] + this.WE = [] + K.load('route', u()) + } + z.lang.wa(ke, z.lang.Ga, 'RouteAddr') + var le = navigator.userAgent; + /ipad|iphone|ipod|iph/i.test(le) + var ne = /android/i.test(le) + + function oe(a) { + this.Te = a || {} + } + z.extend(oe.prototype, { + WM: function(a, b, c) { + var e = this + K.load('route', function() { + e.Qd(a, b, c) + }) + } + }) + + function pe(a) { + this.m = {} + z.extend(this.m, a) + this.Ra = [] + var b = this + K.load('othersearch', function() { + b.Qd() + }) + } + z.wa(pe, z.lang.Ga, 'Geocoder') + z.extend(pe.prototype, { + $l: function(a, b, c) { + this.Ra.push({ + method: 'getPoint', + arguments: [a, b, c] + }) + }, + Yl: function(a, b, c) { + this.Ra.push({ + method: 'getLocation', + arguments: [a, b, c] + }) + }, + toString: ea('Geocoder') + }) + var qe = pe.prototype + U(qe, { + getPoint: qe.$l, + getLocation: qe.Yl + }) + + function Geolocation(a) { + a = a || {} + this.U = { + timeout: a.timeout || 1E4, + maximumAge: a.maximumAge || 6E5, + enableHighAccuracy: a.enableHighAccuracy || t, + si: a.SDKLocation || t + } + this.ne = [] + var b = this + K.load('othersearch', function() { + for (var a = 0, e; e = b.ne[a]; a++) b[e.method].apply(b, e.arguments) + }) + } + z.extend(Geolocation.prototype, { + getCurrentPosition: function(a, b) { + this.ne.push({ + method: 'getCurrentPosition', + arguments: arguments + }) + }, + getStatus: function() { + return Nd + }, + enableSDKLocation: function() { + I() && (this.U.si = p) + }, + disableSDKLocation: function() { + this.U.si = t + } + }) + + function ue(a) { + a = a || {} + a.pa = a.renderOptions || {} + this.m = { + pa: { + map: a.pa.map || s + } + } + this.Ra = [] + var b = this + K.load('othersearch', function() { + b.Qd() + }) + } + z.wa(ue, z.lang.Ga, 'LocalCity') + z.extend(ue.prototype, { + get: function(a) { + this.Ra.push({ + method: 'get', + arguments: [a] + }) + }, + toString: ea('LocalCity') + }) + + function ve() { + this.Ra = [] + var a = this + K.load('othersearch', function() { + a.Qd() + }) + } + z.wa(ve, z.lang.Ga, 'Boundary') + z.extend(ve.prototype, { + get: function(a, b) { + this.Ra.push({ + method: 'get', + arguments: [a, b] + }) + }, + toString: ea('Boundary') + }) + + function we(a, b) { + X.call(this, a, b) + this.HO = Xd + this.JO = $d + this.GO = Yd + this.IO = ae + this.Ra = [] + var c = this + K.load('buslinesearch', function() { + c.Qd() + }) + } + we.Mu = H.sa + 'iw_plus.gif' + we.AR = H.sa + 'iw_minus.gif' + we.rT = H.sa + 'stop_icon.png' + z.wa(we, X) + z.extend(we.prototype, { + getBusList: function(a) { + this.Ra.push({ + method: 'getBusList', + arguments: [a] + }) + }, + getBusLine: function(a) { + this.Ra.push({ + method: 'getBusLine', + arguments: [a] + }) + }, + setGetBusListCompleteCallback: function(a) { + this.m.jM = a || u() + }, + setGetBusLineCompleteCallback: function(a) { + this.m.iM = a || u() + }, + setBusListHtmlSetCallback: function(a) { + this.m.gM = a || u() + }, + setBusLineHtmlSetCallback: function(a) { + this.m.fM = a || u() + }, + setPolylinesSetCallback: function(a) { + this.m.XD = a || u() + } + }) + + function xe(a) { + X.call(this, a) + a = a || {} + this.$a = { + input: a.input || s, + oB: a.baseDom || s, + types: a.types || [], + Vs: a.onSearchComplete || u() + } + this.yd.src = a.location || '全国' + this.Pi = '' + this.gg = s + this.dH = '' + this.Fi() + Ta(Ka) + var b = this + K.load('autocomplete', function() { + b.Qd() + }) + } + z.wa(xe, X, 'Autocomplete') + z.extend(xe.prototype, { + Fi: u(), + show: u(), + aa: u(), + AE: function(a) { + this.$a.types = a + }, + Em: function(a) { + this.yd.src = a + }, + search: ca('Pi'), + Px: ca('dH'), + ot: function(a) { + this.$a.Vs = a + } + }) + var Wa + + function Ra(a, b) { + function c() { + f.m.visible ? ('inter' === f.Ie && f.m.haveBreakId && f.m.indoorExitControl === p ? z.R.show(f.Iz) : z.R.aa(f.Iz), this.m.closeControl && this.wf && this.M && this.M.Ua() === this.P ? z.R.show(f.wf) : z.R.aa(f.wf), this.m.forceCloseControl && z.R.show(f.wf)) : (z.R.aa(f.wf), z.R.aa(f.Iz)) + } + this.P = 'string' == typeof a ? z.da(a) : a + this.ea = ye++ + this.m = { + enableScrollWheelZoom: p, + panoramaRenderer: 'flash', + swfSrc: D.Yh('main_domain_nocdn', 'res/swf/') + 'APILoader.swf', + visible: p, + indoorExitControl: p, + indoorFloorControl: t, + linksControl: p, + clickOnRoad: p, + navigationControl: p, + closeControl: p, + indoorSceneSwitchControl: p, + albumsControl: t, + albumsControlOptions: {}, + copyrightControlOptions: {}, + forceCloseControl: t, + haveBreakId: t + } + var b = b || {}, e + for (e in b) this.m[e] = b[e] + b.closeControl === p && (this.m.forceCloseControl = p) + b.useWebGL === t && Qa(t) + this.Ha = { + heading: 0, + pitch: 0 + } + this.yn = [] + this.Lb = this.bb = s + this.Rj = this.wq() + this.Ba = [] + this.Kc = 1 + this.Ie = this.ZR = this.Vk = '' + this.He = {} + this.If = s + this.Lg = [] + this.Oq = [] + 'cvsRender' == this.Rj || Qa() ? (this.Jj = 90, this.Lj = -90) : 'cssRender' == this.Rj && (this.Jj = 45, this.Lj = -45) + this.Sq = t + var f = this + this.zn = function() { + this.Rj === 'flashRender' ? K.load('panoramaflash', function() { + f.Fi() + }, p) : K.load('panorama', function() { + f.jb() + }, p) + b.hf == 'api' ? Ta(Ga) : Ta(Ha) + this.zn = u() + } + this.m.LR !== p && (this.zn(), D.Qp('cus.fire', 'count', 'z_loadpanoramacount')) + this.CS(this.P) + this.addEventListener('id_changed', function() { + Ta(Fa, { + from: b.hf + }) + }) + this.UO() + this.addEventListener('indoorexit_options_changed', c) + this.addEventListener('scene_type_changed', c) + this.addEventListener('onclose_options_changed', c) + this.addEventListener('onvisible_changed', c) + } + var ze = 4, + Ae = 1, + ye = 0 + z.lang.wa(Ra, z.lang.Ga, 'Panorama') + z.extend(Ra.prototype, { + UO: function() { + var a = this, + b = this.wf = O('div') + b.className = 'pano_close' + b.style.cssText = 'z-index: 1201;display: none' + b.title = '退出全景' + b.onclick = function() { + a.aa() + } + this.P.appendChild(b) + var c = this.Iz = O('a') + c.className = 'pano_pc_indoor_exit' + c.style.cssText = 'z-index: 1201;display: none' + c.innerHTML = '出口' + c.title = '退出室内景' + c.onclick = function() { + a.wo() + } + this.P.appendChild(c) + window.ActiveXObject && !document.addEventListener && (b.style.backgroundColor = 'rgb(37,37,37)', c.style.backgroundColor = 'rgb(37,37,37)') + }, + wo: u(), + CS: function(a) { + var b, c + b = a.style + c = Ya(a).position + 'absolute' != c && 'relative' != c && (b.position = 'relative', b.zIndex = 0) + if ('absolute' === c || 'relative' === c) + if (a = Ya(a).zIndex, !a || 'auto' === a) b.zIndex = 0 + }, + DW: x('yn'), + Xb: x('bb'), + dX: x('vv'), + kN: x('vv'), + ja: x('Lb'), + Ia: x('Ha'), + ka: x('Kc'), + $i: x('Vk'), + O2: function() { + return this.$0 || [] + }, + J2: x('ZR'), + rs: x('Ie'), + Rx: function(a) { + a !== this.Ie && (this.Ie = a, this.dispatchEvent(new Q('onscene_type_changed'))) + }, + Cc: function(a, b, c) { + 'object' === typeof b && (c = b, b = l) + a != this.bb && (this.fl = this.bb, this.gl = this.Lb, this.bb = a, this.Ie = b || 'street', this.Lb = s, c && c.pov && this.od(c.pov)) + }, + ua: function(a) { + a.oc(this.Lb) || (this.fl = this.bb, this.gl = this.Lb, this.Lb = a, this.bb = s) + }, + od: function(a) { + a && (this.Ha = a, a = this.Ha.pitch, a > this.Jj ? a = this.Jj : a < this.Lj && (a = this.Lj), this.Sq = p, this.Ha.pitch = a) + }, + MZ: function(a, b) { + this.Lj = 0 <= a ? 0 : a + this.Jj = 0 >= b ? 0 : b + }, + Qc: function(a) { + a != this.Kc && (a > ze && (a = ze), a < Ae && (a = Ae), a != this.Kc && (this.Kc = a), 'cssRender' === this.Rj && this.od(this.Ha)) + }, + KA: function() { + if (this.M) + for (var a = this.M.Mw(), b = 0; b < a.length; b++)(a[b] instanceof V || a[b] instanceof uc) && a[b].point && this.Ba.push(a[b]) + }, + xE: ca('M'), + mt: function(a) { + this.If = a || 'none' + }, + Bk: function(a) { + for (var b in a) { + if ('object' == typeof a[b]) + for (var c in a[b]) this.m[b][c] = a[b][c] + else this.m[b] = a[b] + a.closeControl === p && (this.m.forceCloseControl = p) + a.closeControl === t && (this.m.forceCloseControl = t) + switch (b) { + case 'linksControl': + this.dispatchEvent(new Q('onlinks_visible_changed')) + break + case 'clickOnRoad': + this.dispatchEvent(new Q('onclickonroad_changed')) + break + case 'navigationControl': + this.dispatchEvent(new Q('onnavigation_visible_changed')) + break + case 'indoorSceneSwitchControl': + this.dispatchEvent(new Q('onindoor_default_switch_mode_changed')) + break + case 'albumsControl': + this.dispatchEvent(new Q('onalbums_visible_changed')) + break + case 'albumsControlOptions': + this.dispatchEvent(new Q('onalbums_options_changed')) + break + case 'copyrightControlOptions': + this.dispatchEvent(new Q('oncopyright_options_changed')) + break + case 'closeControl': + this.dispatchEvent(new Q('onclose_options_changed')) + break + case 'indoorExitControl': + this.dispatchEvent(new Q('onindoorexit_options_changed')) + break + case 'indoorFloorControl': + this.dispatchEvent(new Q('onindoorfloor_options_changed')) + } + } + }, + rk: function() { + this.ol.style.visibility = 'hidden' + }, + Vx: function() { + this.ol.style.visibility = 'visible' + }, + NV: function() { + this.m.enableScrollWheelZoom = p + }, + oV: function() { + this.m.enableScrollWheelZoom = t + }, + show: function() { + this.m.visible = p + }, + aa: function() { + this.m.visible = t + }, + wq: function() { + return Xa() && !I() && 'javascript' != this.m.panoramaRenderer ? 'flashRender' : !I() && Ob() ? 'cvsRender' : 'cssRender' + }, + Pa: function(a) { + this.He[a.kd] = a + }, + Sb: function(a) { + delete this.He[a] + }, + kD: function() { + return this.m.visible + }, + Yg: function() { + return new P(this.P.clientWidth, this.P.clientHeight) + }, + Ua: x('P'), + jK: function() { + var a = D.Yh('baidumap', '?'), + b = this.Xb() + if (b) { + var b = { + panotype: this.rs(), + heading: this.Ia().heading, + pitch: this.Ia().pitch, + pid: b, + panoid: b, + from: 'api' + }, c + for (c in b) a += c + '=' + b[c] + '&' + } + return a.slice(0, -1) + }, + Vw: function() { + this.Bk({ + copyrightControlOptions: { + logoVisible: t + } + }) + }, + EE: function() { + this.Bk({ + copyrightControlOptions: { + logoVisible: p + } + }) + }, + gB: function(a) { + function b(a, b) { + return function() { + a.Oq.push({ + UL: b, + TL: arguments + }) + } + } + for (var c = a.getPanoMethodList(), e = '', f = 0, g = c.length; f < g; f++) e = c[f], this[e] = b(this, e) + this.Lg.push(a) + }, + iE: function(a) { + for (var b = this.Lg.length; b--;) this.Lg[b] === a && this.Lg.splice(b, 1) + }, + wE: u() + }) + var Be = Ra.prototype + U(Be, { + setId: Be.Cc, + setPosition: Be.ua, + setPov: Be.od, + setZoom: Be.Qc, + setOptions: Be.Bk, + getId: Be.Xb, + getPosition: Be.ja, + getPov: Be.Ia, + getZoom: Be.ka, + getLinks: Be.DW, + getBaiduMapUrl: Be.jK, + hideMapLogo: Be.Vw, + showMapLogo: Be.EE, + enableDoubleClickZoom: Be.Z1, + disableDoubleClickZoom: Be.Q1, + enableScrollWheelZoom: Be.NV, + disableScrollWheelZoom: Be.oV, + show: Be.show, + hide: Be.aa, + addPlugin: Be.gB, + removePlugin: Be.iE, + getVisible: Be.kD, + addOverlay: Be.Pa, + removeOverlay: Be.Sb, + getSceneType: Be.rs, + setPanoramaPOIType: Be.mt, + exitInter: Be.wo, + setInteractiveState: Be.wE + }) + U(window, { + BMAP_PANORAMA_POI_HOTEL: 'hotel', + BMAP_PANORAMA_POI_CATERING: 'catering', + BMAP_PANORAMA_POI_MOVIE: 'movie', + BMAP_PANORAMA_POI_TRANSIT: 'transit', + BMAP_PANORAMA_POI_INDOOR_SCENE: 'indoor_scene', + BMAP_PANORAMA_POI_NONE: 'none', + BMAP_PANORAMA_INDOOR_SCENE: 'inter', + BMAP_PANORAMA_STREET_SCENE: 'street' + }) + + function Ce() { + z.lang.Ga.call(this) + this.kd = 'PanoramaOverlay_' + this.ea + this.W = s + this.Sa = p + } + z.lang.wa(Ce, z.lang.Ga, 'PanoramaOverlayBase') + z.extend(Ce.prototype, { + K2: x('kd'), + xa: function() { + aa('initialize方法未实现') + }, + remove: function() { + aa('remove方法未实现') + }, + Hf: function() { + aa('_setOverlayProperty方法未实现') + } + }) + + function De(a, b) { + Ce.call(this) + var c = { + position: s, + altitude: 2, + displayDistance: p + }, b = b || {}, e + for (e in b) c[e] = b[e] + this.Lb = c.position + this.yj = a + this.Rp = c.altitude + this.eQ = c.displayDistance + this.OE = c.color + this.XK = c.hoverColor + this.backgroundColor = c.backgroundColor + this.ZI = c.backgroundHoverColor + this.borderColor = c.borderColor + this.cJ = c.borderHoverColor + this.fontSize = c.fontSize + this.padding = c.padding + this.qD = c.imageUrl + this.size = c.size + this.ve = c.image + this.width = c.width + this.height = c.height + this.xX = c.imageData + this.borderWidth = c.borderWidth + } + z.lang.wa(De, Ce, 'PanoramaLabel') + z.extend(De.prototype, { + p2: x('borderWidth'), + getImageData: x('xX'), + cm: x('OE'), + E2: x('XK'), + l2: x('backgroundColor'), + m2: x('ZI'), + n2: x('borderColor'), + o2: x('cJ'), + C2: x('fontSize'), + L2: x('padding'), + F2: x('qD'), + Hb: x('size'), + Gw: x('ve'), + ua: function(a) { + this.Lb = a + this.Hf('position', a) + }, + ja: x('Lb'), + cd: function(a) { + this.yj = a + this.Hf('content', a) + }, + jk: x('yj'), + qE: function(a) { + this.Rp = a + this.Hf('altitude', a) + }, + Ao: x('Rp'), + Ia: function() { + var a = this.ja(), + b = s, + c = s + this.W && (c = this.W.ja()) + if (a && c) + if (a.oc(c)) b = this.W.Ia() + else { + b = {} + b.heading = Ee(a.lng - c.lng, a.lat - c.lat) || 0 + var a = b, + c = this.Ao(), + e = this.qn() + a.pitch = Math.round(180 * (Math.atan(c / e) / Math.PI)) || 0 + } + return b + }, + qn: function() { + var a = 0, + b, c + this.W && (b = this.W.ja(), (c = this.ja()) && !c.oc(b) && (a = S.Co(b, c))) + return a + }, + aa: function() { + aa('hide方法未实现') + }, + show: function() { + aa('show方法未实现') + }, + Hf: u() + }) + var Fe = De.prototype + U(Fe, { + setPosition: Fe.ua, + getPosition: Fe.ja, + setContent: Fe.cd, + getContent: Fe.jk, + setAltitude: Fe.qE, + getAltitude: Fe.Ao, + getPov: Fe.Ia, + show: Fe.show, + hide: Fe.aa + }) + + function Ge(a, b) { + Ce.call(this) + var c = { + icon: '', + title: '', + panoInfo: s, + altitude: 2 + }, b = b || {}, e + for (e in b) c[e] = b[e] + this.Lb = a + this.aH = c.icon + this.sI = c.title + this.Rp = c.altitude + this.pS = c.panoInfo + this.Ha = { + heading: 0, + pitch: 0 + } + } + z.lang.wa(Ge, Ce, 'PanoramaMarker') + z.extend(Ge.prototype, { + ua: function(a) { + this.Lb = a + this.Hf('position', a) + }, + ja: x('Lb'), + Dc: function(a) { + this.sI = a + this.Hf('title', a) + }, + Io: x('sI'), + Tb: function(a) { + this.aH = icon + this.Hf('icon', a) + }, + Do: x('aH'), + qE: function(a) { + this.Rp = a + this.Hf('altitude', a) + }, + Ao: x('Rp'), + $C: x('pS'), + Ia: function() { + var a = s + if (this.W) { + var a = this.W.ja(), + b = this.ja(), + a = Ee(b.lng - a.lng, b.lat - a.lat) + isNaN(a) && (a = 0) + a = { + heading: a, + pitch: 0 + } + } else a = this.Ha + return a + }, + Hf: u() + }) + var He = Ge.prototype + U(He, { + setPosition: He.ua, + getPosition: He.ja, + setTitle: He.Dc, + getTitle: He.Io, + setAltitude: He.qE, + getAltitude: He.Ao, + getPanoInfo: He.$C, + getIcon: He.Do, + setIcon: He.Tb, + getPov: He.Ia + }) + + function Ee(a, b) { + var c = 0 + if (0 !== a && 0 !== b) { + var c = 180 * (Math.atan(a / b) / Math.PI), + e = 0 + 0 < a && 0 > b && (e = 90) + 0 > a && 0 > b && (e = 180) + 0 > a && 0 < b && (e = 270) + c = (c + 90) % 90 + e + } else 0 === a ? c = 0 > b ? 180 : 0 : 0 === b && (c = 0 < a ? 90 : 270) + return Math.round(c) + } + + function Qa(a) { + if ('boolean' === typeof Ie) return Ie + if (a === t || !window.WebGLRenderingContext) return Ie = t + if (z.platform.jj) { + a = 0 + try { + a = navigator.userAgent.split('Android ')[1].charAt(0) + } catch (b) {} + if (5 > a) return Ie = t + } + var a = document.createElement('canvas'), + c = s + try { + c = a.getContext('webgl') + } catch (e) { + Ie = t + } + return Ie = c === s ? t : p + } + var Ie + + function Je() { + if ('boolean' === typeof Ke) return Ke + Ke = p + if (z.platform.zD) return p + var a = navigator.userAgent + return -1 < a.indexOf('Chrome') || -1 < a.indexOf('SAMSUNG-GT-I9508') ? p : Ke = t + } + var Ke + + function ec(a, b) { + this.W = a || s + var c = this + c.W && c.fa() + K.load('pservice', function() { + c.yP() + }) + 'api' == (b || {}).hf ? Ta(Ia) : Ta(Ja) + this.vd = { + getPanoramaById: [], + getPanoramaByLocation: [], + getVisiblePOIs: [], + getRecommendPanosById: [], + getPanoramaVersions: [], + checkPanoSupportByCityCode: [], + getPanoramaByPOIId: [], + getCopyrightProviders: [] + } + } + D.tm(function(a) { + 'flashRender' !== a.wq() && new ec(a, { + hf: 'api' + }) + }) + z.extend(ec.prototype, { + fa: function() { + function a(a) { + if (a) { + if (a.id != b.vv) { + b.kN(a.id) + b.ia = a + Je() || b.dispatchEvent(new Q('onthumbnail_complete')) + b.bb != s && (b.gl = b._position) + for (var c in a) + if (a.hasOwnProperty(c)) switch (b['_' + c] = a[c], c) { + case 'position': + b.Lb = a[c] + break + case 'id': + b.bb = a[c] + break + case 'links': + b.yn = a[c] + break + case 'zoom': + b.Kc = a[c] + } + if (b.gl) { + var g = b.gl, + i = b._position + c = g.lat + var k = i.lat, + m = Pb(k - c), + g = Pb(i.lng - g.lng) + c = Math.sin(m / 2) * Math.sin(m / 2) + Math.cos(Pb(c)) * Math.cos(Pb(k)) * Math.sin(g / 2) * Math.sin(g / 2) + b.qG = 6371E3 * 2 * Math.atan2(Math.sqrt(c), Math.sqrt(1 - c)) + } + c = new Q('ondataload') + c.data = a + b.dispatchEvent(c) + b.dispatchEvent(new Q('onposition_changed')) + b.dispatchEvent(new Q('onlinks_changed')) + b.dispatchEvent(new Q('oncopyright_changed'), { + copyright: a.copyright + }) + a.Ll && b.m.closeControl ? z.R.show(b.xQ) : z.R.aa(b.xQ) + } + } else b.bb = b.fl, b.Lb = b.gl, b.dispatchEvent(new Q('onnoresult')) + } + var b = this.W, + c = this + b.addEventListener('id_changed', function() { + c.Go(b.Xb(), a) + }) + b.addEventListener('iid_changed', function() { + c.Mg(ec.Qk + 'qt=idata&iid=' + b.Ez + '&fn=', function(b) { + if (b && b.result && 0 == b.result.error) { + var b = b.content[0].interinfo, + f = {} + f.Ll = b.BreakID + for (var g = b.Defaultfloor, i = s, k = 0; k < b.Floors.length; k++) + if (b.Floors[k].Floor == g) { + i = b.Floors[k] + break + } + f.id = i.StartID || i.Points[0].PID + c.Go(f.id, a, f) + } + }) + }) + b.addEventListener('position_changed_inner', function() { + c.dj(b.ja(), a) + }) + }, + Go: function(a, b) { + this.vd.getPanoramaById.push(arguments) + }, + dj: function(a, b, c) { + this.vd.getPanoramaByLocation.push(arguments) + }, + lD: function(a, b, c, e) { + this.vd.getVisiblePOIs.push(arguments) + }, + Pw: function(a, b) { + this.vd.getRecommendPanosById.push(arguments) + }, + Ow: function(a) { + this.vd.getPanoramaVersions.push(arguments) + }, + tB: function(a, b) { + this.vd.checkPanoSupportByCityCode.push(arguments) + }, + Nw: function(a, b) { + this.vd.getPanoramaByPOIId.push(arguments) + }, + nK: function(a) { + this.vd.getCopyrightProviders.push(arguments) + } + }) + var Le = ec.prototype + U(Le, { + getPanoramaById: Le.Go, + getPanoramaByLocation: Le.dj, + getPanoramaByPOIId: Le.Nw + }) + + function dc(a) { + Mc.call(this) + 'api' == (a || {}).hf ? Ta(Ca) : Ta(Da) + } + dc.KF = D.Yh('pano', 'tile/') + dc.prototype = new Mc + dc.prototype.getTilesUrl = function(a, b) { + var c = dc.KF[(a.x + a.y) % dc.KF.length] + '?udt=20150114&qt=tile&styles=pl&x=' + a.x + '&y=' + a.y + '&z=' + b + z.ga.ma && 6 >= z.ga.ma && (c += '&color_dep=32') + return c + } + dc.prototype.Ks = ea(p) + Me.Ud = new S + + function Me() {} + z.extend(Me, { + pV: function(a, b, c) { + c = z.lang.Mc(c) + b = { + data: b + } + 'position_changed' == a && (b.data = Me.Ud.oj(new R(b.data.mercatorX, b.data.mercatorY))) + c.dispatchEvent(new Q('on' + a), b) + } + }) + var Ne = Me + U(Ne, { + dispatchFlashEvent: Ne.pV + }) + var Oe = { + yO: 50 + } + Oe.du = D.Yh('pano')[0] + Oe.bu = { + width: 220, + height: 60 + } + z.extend(Oe, { + fL: function(a, b, c, e) { + if (!b || !c || !c.lngLat || !c.panoInstance) e() + else { + this.En === l && (this.En = new ec(s, { + hf: 'api' + })) + var f = this + this.En.tB(b, function(b) { + b ? f.En.dj(c.lngLat, Oe.yO, function(b) { + if (b && b.id) { + var g = b.id, + m = b.gh, + b = b.hh, + n = ec.Ud.qg(c.lngLat), + o = f.cR(n, { + x: m, + y: b + }), + m = f.yK(g, o, 0, Oe.bu.width, Oe.bu.height) + a.content = f.dR(a.content, m, c.titleTip, c.beforeDomId) + a.addEventListener('open', function() { + ja.V(z.Ec('infoWndPano'), 'click', function() { + c.panoInstance.Cc(g) + c.panoInstance.show() + c.panoInstance.od({ + heading: o, + pitch: 0 + }) + }) + }) + } + e() + }) : e() + }) + } + }, + dR: function(a, b, c, e) { + var c = c || '', + f + !e || !a.split(e)[0] ? (e = a, a = '') : (e = a.split(e)[0], f = e.lastIndexOf('<'), e = a.substring(0, f), a = a.substring(f)) + f = [] + var g = Oe.bu.width, + i = Oe.bu.height + f.push(e) + f.push("\\u6cbf\\u7ebf\\u5730\\u94c1\\u7ad9:
\'):c.push(\'\\u6cbf\\u7ebf\\u516c\\u4ea4\\u7ad9\\u70b9:
\');c.push(\'\'+(e+1)+" | "+this.Gc.ux(e).name+" | ");c.push("
\\u5f53\\u524d\\u57ce\\u5e02\\uff1a\'+this.B.$g+"";Ab(g,\'
\'); f.appendChild(g);g=L("div",{"class":"city_content_medium"});Ab(g,\'\';b+=\' | \'+c+" | ";b+=\'\';for(e=0;e\'+a[c][e]+"";b+=" |
\':(b+=\' | ||
\'+c+" | ",e=q);for(var b=b+(\'\'+f+": | "),b=b+\'\',g=a[c][f],i=0;i |