diff --git a/.github/RELEASE-TEMPLATE.md b/.github/RELEASE-TEMPLATE.md new file mode 100644 index 0000000..76e8b07 --- /dev/null +++ b/.github/RELEASE-TEMPLATE.md @@ -0,0 +1,14 @@ +### 🆕 New Features + * none + +### 🛠️ Bug Fixes + * none + +### 🔣 Dependencies + * none + +### ‼️ Breaking Changes + * none + +### 🔄 Other Changes + * none diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..3b61fba --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,36 @@ +name: Build +on: + workflow_call: + workflow_dispatch: + +permissions: + actions: read + contents: read + +jobs: + build: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@main + with: + submodules: recursive + token: ${{ secrets.SUBMODULE_TOKEN }} + - name: Set up Node.js + uses: actions/setup-node@main + with: + node-version: 'latest' + cache: 'npm' + - name: Install dependencies + run: npm install + - name: Build + run: npm run build + - name: Upload artifact + uses: actions/upload-artifact@master + with: + name: output + path: | + .github/RELEASE-TEMPLATE.md + CHANGELOG.md + modules + dist diff --git a/.github/workflows/debug.yml b/.github/workflows/debug.yml new file mode 100644 index 0000000..9c2a38a --- /dev/null +++ b/.github/workflows/debug.yml @@ -0,0 +1,33 @@ +name: Debug +on: + workflow_call: + workflow_dispatch: + +permissions: + actions: read + contents: read + +jobs: + build: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@main + with: + submodules: recursive + token: ${{ secrets.SUBMODULE_TOKEN }} + ref: dev + - name: Set up Node.js + uses: actions/setup-node@main + with: + node-version: 'latest' + cache: 'npm' + - name: Install dependencies + run: npm install + - name: Build + run: npm run build:debug + - name: Upload artifact + uses: actions/upload-artifact@master + with: + name: dist + path: dist diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml new file mode 100644 index 0000000..7078866 --- /dev/null +++ b/.github/workflows/deploy.yml @@ -0,0 +1,38 @@ +name: Deploy +on: + push: + # Sequence of patterns matched against refs/heads + branches: + - dev + +permissions: + actions: read + contents: read + +jobs: + debug: + uses: ./.github/workflows/debug.yml + secrets: inherit + deploy: + needs: debug + runs-on: ubuntu-latest + steps: + - name: Download artifact + uses: actions/download-artifact@master + with: + name: dist + path: dist + - name: Deploy + uses: exuanbo/actions-deploy-gist@main + with: + token: ${{ secrets.GIST_TOKEN }} + gist_id: b7524906119fa250bc933cc9a08e939a + gist_description: " iRingo: 📍 GeoServices β" + file_path: dist/request.js + - name: Deploy + uses: exuanbo/actions-deploy-gist@main + with: + token: ${{ secrets.GIST_TOKEN }} + gist_id: b7524906119fa250bc933cc9a08e939a + gist_description: " iRingo: 📍 GeoServices β" + file_path: dist/response.js diff --git a/.github/workflows/draft.yml b/.github/workflows/draft.yml new file mode 100644 index 0000000..fd5caf3 --- /dev/null +++ b/.github/workflows/draft.yml @@ -0,0 +1,32 @@ +name: Draft +on: + push: + # Sequence of patterns matched against refs/heads + branches: + - main + +permissions: + actions: read + contents: write + +jobs: + build: + uses: ./.github/workflows/build.yml + secrets: inherit + draft: + needs: build + runs-on: ubuntu-latest + steps: + - name: Download artifact + uses: actions/download-artifact@master + with: + name: output + - name: Publish Draft + uses: softprops/action-gh-release@v2 + with: + body_path: .github/RELEASE-TEMPLATE.md + token: ${{ secrets.GITHUB_TOKEN }} + files: | + dist/*.js + modules/* + draft: true diff --git a/.github/workflows/pre-release.yml b/.github/workflows/pre-release.yml new file mode 100644 index 0000000..14c0e69 --- /dev/null +++ b/.github/workflows/pre-release.yml @@ -0,0 +1,33 @@ +name: Pre-Release +on: + push: + # Sequence of patterns matched against refs/tags + tags: + - 'v*.*.*-alpha*' + - 'v*.*.*-beta*' + +permissions: + actions: read + contents: write + +jobs: + build: + uses: ./.github/workflows/build.yml + secrets: inherit + pre-release: + needs: build + runs-on: ubuntu-latest + steps: + - name: Download artifact + uses: actions/download-artifact@master + with: + name: output + - name: Publish Pre-Release + uses: softprops/action-gh-release@v2 + with: + body_path: CHANGELOG.md + token: ${{ secrets.GITHUB_TOKEN }} + files: | + dist/*.js + modules/* + prerelease: true diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..56a5e6e --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,32 @@ +name: Release +on: + push: + # Sequence of patterns matched against refs/tags + tags: + - 'v*.*.*-rc*' + +permissions: + actions: read + contents: write + +jobs: + build: + uses: ./.github/workflows/build.yml + secrets: inherit + release: + needs: build + runs-on: ubuntu-latest + steps: + - name: Download artifact + uses: actions/download-artifact@master + with: + name: output + - name: Publish Release + uses: softprops/action-gh-release@v2 + with: + body_path: CHANGELOG.md + token: ${{ secrets.GITHUB_TOKEN }} + files: | + dist/*.js + modules/* + make_latest: "true" diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..c6bba59 --- /dev/null +++ b/.gitignore @@ -0,0 +1,130 @@ +# Logs +logs +*.log +npm-debug.log* +yarn-debug.log* +yarn-error.log* +lerna-debug.log* +.pnpm-debug.log* + +# Diagnostic reports (https://nodejs.org/api/report.html) +report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json + +# Runtime data +pids +*.pid +*.seed +*.pid.lock + +# Directory for instrumented libs generated by jscoverage/JSCover +lib-cov + +# Coverage directory used by tools like istanbul +coverage +*.lcov + +# nyc test coverage +.nyc_output + +# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files) +.grunt + +# Bower dependency directory (https://bower.io/) +bower_components + +# node-waf configuration +.lock-wscript + +# Compiled binary addons (https://nodejs.org/api/addons.html) +build/Release + +# Dependency directories +node_modules/ +jspm_packages/ + +# Snowpack dependency directory (https://snowpack.dev/) +web_modules/ + +# TypeScript cache +*.tsbuildinfo + +# Optional npm cache directory +.npm + +# Optional eslint cache +.eslintcache + +# Optional stylelint cache +.stylelintcache + +# Microbundle cache +.rpt2_cache/ +.rts2_cache_cjs/ +.rts2_cache_es/ +.rts2_cache_umd/ + +# Optional REPL history +.node_repl_history + +# Output of 'npm pack' +*.tgz + +# Yarn Integrity file +.yarn-integrity + +# dotenv environment variable files +.env +.env.development.local +.env.test.local +.env.production.local +.env.local + +# parcel-bundler cache (https://parceljs.org/) +.cache +.parcel-cache + +# Next.js build output +.next +out + +# Nuxt.js build / generate output +.nuxt +dist + +# Gatsby files +.cache/ +# Comment in the public line in if your project uses Gatsby and not Next.js +# https://nextjs.org/blog/next-9-1#public-directory-support +# public + +# vuepress build output +.vuepress/dist + +# vuepress v2.x temp and cache directory +.temp +.cache + +# Docusaurus cache and generated files +.docusaurus + +# Serverless directories +.serverless/ + +# FuseBox cache +.fusebox/ + +# DynamoDB Local files +.dynamodb/ + +# TernJS port file +.tern-port + +# Stores VSCode versions used for testing VSCode extensions +.vscode-test + +# yarn v2 +.yarn/cache +.yarn/unplugged +.yarn/build-state.yml +.yarn/install-state.gz +.pnp.* diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 0000000..f8ef09b --- /dev/null +++ b/.gitmodules @@ -0,0 +1,9 @@ +[submodule "src/utils"] + path = src/utils + url = https://github.com/NanoCat-Me/utils.git +[submodule "src/XML"] + path = src/XML + url = https://github.com/NanoCat-Me/XML.git +[submodule "src/proto"] + path = src/proto + url = https://github.com/NSRingo/proto.git diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 0000000..64f09c7 --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1 @@ + * 首次发布 diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..261eeb9 --- /dev/null +++ b/LICENSE @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/README.md b/README.md new file mode 100644 index 0000000..cb767c9 --- /dev/null +++ b/README.md @@ -0,0 +1 @@ +# GeoServices \ No newline at end of file diff --git a/archive/js/GeoServices.request.js b/archive/js/GeoServices.request.js new file mode 100644 index 0000000..b91aa15 --- /dev/null +++ b/archive/js/GeoServices.request.js @@ -0,0 +1 @@ +class e{static name="Lodash";static version="1.2.2";static about(){return console.log(`\n🟧 ${this.name} v${this.version}\n`)}static get(e={},i="",a=void 0){Array.isArray(i)||(i=this.toPath(i));const t=i.reduce(((e,i)=>Object(e)[i]),e);return void 0===t?a:t}static set(e={},i="",a){return Array.isArray(i)||(i=this.toPath(i)),i.slice(0,-1).reduce(((e,a,t)=>Object(e[a])===e[a]?e[a]:e[a]=/^\d+$/.test(i[t+1])?[]:{}),e)[i[i.length-1]]=a,e}static unset(e={},i=""){return Array.isArray(i)||(i=this.toPath(i)),i.reduce(((e,a,t)=>t===i.length-1?(delete e[a],!0):Object(e)[a]),e)}static toPath(e){return e.replace(/\[(\d+)\]/g,".$1").split(".").filter(Boolean)}static escape(e){const i={"&":"&","<":"<",">":">",'"':""","'":"'"};return e.replace(/[&<>"']/g,(e=>i[e]))}static unescape(e){const i={"&":"&","<":"<",">":">",""":'"',"'":"'"};return e.replace(/&|<|>|"|'/g,(e=>i[e]))}}class i{static name="$Storage";static version="1.0.9";static about(){return console.log(`\n🟧 ${this.name} v${this.version}\n`)}static data=null;static dataFile="box.dat";static#e=/^@(?[^.]+)(?:\.(?.*))?$/;static#i(){return"undefined"!=typeof $environment&&$environment["surge-version"]?"Surge":"undefined"!=typeof $environment&&$environment["stash-version"]?"Stash":"undefined"!=typeof module&&module.exports?"Node.js":"undefined"!=typeof $task?"Quantumult X":"undefined"!=typeof $loon?"Loon":"undefined"!=typeof $rocket?"Shadowrocket":"undefined"!=typeof Egern?"Egern":void 0}static getItem(i=new String,a=null){let t=a;if(!0===i.startsWith("@")){const{key:a,path:m}=i.match(this.#e)?.groups;i=a;let s=this.getItem(i,{});"object"!=typeof s&&(s={}),t=e.get(s,m);try{t=JSON.parse(t)}catch(e){}}else{switch(this.#i()){case"Surge":case"Loon":case"Stash":case"Egern":case"Shadowrocket":t=$persistentStore.read(i);break;case"Quantumult X":t=$prefs.valueForKey(i);break;case"Node.js":this.data=this.#a(this.dataFile),t=this.data?.[i];break;default:t=this.data?.[i]||null}try{t=JSON.parse(t)}catch(e){}}return t??a}static setItem(i=new String,a=new String){let t=!1;if("object"==typeof a)a=JSON.stringify(a);else a=String(a);if(!0===i.startsWith("@")){const{key:m,path:s}=i.match(this.#e)?.groups;i=m;let n=this.getItem(i,{});"object"!=typeof n&&(n={}),e.set(n,s,a),t=this.setItem(i,n)}else switch(this.#i()){case"Surge":case"Loon":case"Stash":case"Egern":case"Shadowrocket":t=$persistentStore.write(a,i);break;case"Quantumult X":t=$prefs.setValueForKey(a,i);break;case"Node.js":this.data=this.#a(this.dataFile),this.data[i]=a,this.#t(this.dataFile),t=!0;break;default:t=this.data?.[i]||null}return t}static removeItem(i){let a=!1;if(!0===i.startsWith("@")){const{key:t,path:m}=i.match(this.#e)?.groups;i=t;let s=this.getItem(i);"object"!=typeof s&&(s={}),keyValue=e.unset(s,m),a=this.setItem(i,s)}else switch(this.#i()){case"Surge":case"Loon":case"Stash":case"Egern":case"Shadowrocket":case"Node.js":default:a=!1;break;case"Quantumult X":a=$prefs.removeValueForKey(i)}return a}static clear(){let e=!1;switch(this.#i()){case"Surge":case"Loon":case"Stash":case"Egern":case"Shadowrocket":case"Node.js":default:e=!1;break;case"Quantumult X":e=$prefs.removeAllValues()}return e}static#a(e){if(!this.isNode())return{};{this.fs=this.fs?this.fs:require("fs"),this.path=this.path?this.path:require("path");const i=this.path.resolve(e),a=this.path.resolve(process.cwd(),e),t=this.fs.existsSync(i),m=!t&&this.fs.existsSync(a);if(!t&&!m)return{};{const e=t?i:a;try{return JSON.parse(this.fs.readFileSync(e))}catch(e){return{}}}}}static#t(e=this.dataFile){if(this.isNode()){this.fs=this.fs?this.fs:require("fs"),this.path=this.path?this.path:require("path");const i=this.path.resolve(e),a=this.path.resolve(process.cwd(),e),t=this.fs.existsSync(i),m=!t&&this.fs.existsSync(a),s=JSON.stringify(this.data);t?this.fs.writeFileSync(i,s):m?this.fs.writeFileSync(a,s):this.fs.writeFileSync(i,s)}}}class a{static name="ENV";static version="1.8.3";static about(){return console.log(`\n🟧 ${this.name} v${this.version}\n`)}constructor(e,i){console.log(`\n🟧 ${a.name} v${a.version}\n`),this.name=e,this.logs=[],this.isMute=!1,this.isMuteLog=!1,this.logSeparator="\n",this.encoding="utf-8",this.startTime=(new Date).getTime(),Object.assign(this,i),this.log(`\n🚩 开始!\n${e}\n`)}environment(){switch(this.platform()){case"Surge":return $environment.app="Surge",$environment;case"Stash":return $environment.app="Stash",$environment;case"Egern":return $environment.app="Egern",$environment;case"Loon":let e=$loon.split(" ");return{device:e[0],ios:e[1],"loon-version":e[2],app:"Loon"};case"Quantumult X":return{app:"Quantumult X"};case"Node.js":return process.env.app="Node.js",process.env;default:return{}}}platform(){return"undefined"!=typeof $environment&&$environment["surge-version"]?"Surge":"undefined"!=typeof $environment&&$environment["stash-version"]?"Stash":"undefined"!=typeof module&&module.exports?"Node.js":"undefined"!=typeof $task?"Quantumult X":"undefined"!=typeof $loon?"Loon":"undefined"!=typeof $rocket?"Shadowrocket":"undefined"!=typeof Egern?"Egern":void 0}isNode(){return"Node.js"===this.platform()}isQuanX(){return"Quantumult X"===this.platform()}isSurge(){return"Surge"===this.platform()}isLoon(){return"Loon"===this.platform()}isShadowrocket(){return"Shadowrocket"===this.platform()}isStash(){return"Stash"===this.platform()}isEgern(){return"Egern"===this.platform()}async getScript(e){return await this.fetch(e).then((e=>e.body))}async runScript(e,a){let t=i.getItem("@chavy_boxjs_userCfgs.httpapi");t=t?.replace?.(/\n/g,"")?.trim();let m=i.getItem("@chavy_boxjs_userCfgs.httpapi_timeout");m=1*m??20,m=a?.timeout??m;const[s,n]=t.split("@"),l={url:`http://${n}/v1/scripting/evaluate`,body:{script_text:e,mock_type:"cron",timeout:m},headers:{"X-Key":s,Accept:"*/*"},timeout:m};await this.fetch(l).then((e=>e.body),(e=>this.logErr(e)))}initGotEnv(e){this.got=this.got?this.got:require("got"),this.cktough=this.cktough?this.cktough:require("tough-cookie"),this.ckjar=this.ckjar?this.ckjar:new this.cktough.CookieJar,e&&(e.headers=e.headers?e.headers:{},void 0===e.headers.Cookie&&void 0===e.cookieJar&&(e.cookieJar=this.ckjar))}async fetch(i={}||"",a={}){switch(i.constructor){case Object:i={...a,...i};break;case String:i={...a,url:i}}i.method||(i.method="GET",(i.body??i.bodyBytes)&&(i.method="POST")),delete i.headers?.Host,delete i.headers?.[":authority"],delete i.headers?.["Content-Length"],delete i.headers?.["content-length"];const t=i.method.toLocaleLowerCase();switch(this.platform()){case"Loon":case"Surge":case"Stash":case"Egern":case"Shadowrocket":default:return i.timeout&&(i.timeout=parseInt(i.timeout,10),this.isSurge()||(i.timeout=1e3*i.timeout)),i.policy&&(this.isLoon()&&(i.node=i.policy),this.isStash()&&e.set(i,"headers.X-Stash-Selected-Proxy",encodeURI(i.policy)),this.isShadowrocket()&&e.set(i,"headers.X-Surge-Proxy",i.policy)),"boolean"==typeof i.redirection&&(i["auto-redirect"]=i.redirection),i.bodyBytes&&!i.body&&(i.body=i.bodyBytes,delete i.bodyBytes),await new Promise(((e,a)=>{$httpClient[t](i,((t,m,s)=>{t?a(t):(m.ok=/^2\d\d$/.test(m.status),m.statusCode=m.status,s&&(m.body=s,1==i["binary-mode"]&&(m.bodyBytes=s)),e(m))}))}));case"Quantumult X":return i.policy&&e.set(i,"opts.policy",i.policy),"boolean"==typeof i["auto-redirect"]&&e.set(i,"opts.redirection",i["auto-redirect"]),i.body instanceof ArrayBuffer?(i.bodyBytes=i.body,delete i.body):ArrayBuffer.isView(i.body)?(i.bodyBytes=i.body.buffer.slice(i.body.byteOffset,i.body.byteLength+i.body.byteOffset),delete object.body):i.body&&delete i.bodyBytes,await $task.fetch(i).then((e=>(e.ok=/^2\d\d$/.test(e.statusCode),e.status=e.statusCode,e)),(e=>Promise.reject(e.error)));case"Node.js":let a=require("iconv-lite");this.initGotEnv(i);const{url:m,...s}=i;return await this.got[t](m,s).on("redirect",((e,i)=>{try{if(e.headers["set-cookie"]){const a=e.headers["set-cookie"].map(this.cktough.Cookie.parse).toString();a&&this.ckjar.setCookieSync(a,null),i.cookieJar=this.ckjar}}catch(e){this.logErr(e)}})).then((e=>(e.statusCode=e.status,e.body=a.decode(e.rawBody,this.encoding),e.bodyBytes=e.rawBody,e)),(e=>Promise.reject(e.message)))}}time(e,i=null){const a=i?new Date(i):new Date;let t={"M+":a.getMonth()+1,"d+":a.getDate(),"H+":a.getHours(),"m+":a.getMinutes(),"s+":a.getSeconds(),"q+":Math.floor((a.getMonth()+3)/3),S:a.getMilliseconds()};/(y+)/.test(e)&&(e=e.replace(RegExp.$1,(a.getFullYear()+"").substr(4-RegExp.$1.length)));for(let i in t)new RegExp("("+i+")").test(e)&&(e=e.replace(RegExp.$1,1==RegExp.$1.length?t[i]:("00"+t[i]).substr((""+t[i]).length)));return e}msg(e=name,i="",a="",t){const m=e=>{switch(typeof e){case void 0:return e;case"string":switch(this.platform()){case"Surge":case"Stash":case"Egern":default:return{url:e};case"Loon":case"Shadowrocket":return e;case"Quantumult X":return{"open-url":e};case"Node.js":return}case"object":switch(this.platform()){case"Surge":case"Stash":case"Egern":case"Shadowrocket":default:return{url:e.url||e.openUrl||e["open-url"]};case"Loon":return{openUrl:e.openUrl||e.url||e["open-url"],mediaUrl:e.mediaUrl||e["media-url"]};case"Quantumult X":return{"open-url":e["open-url"]||e.url||e.openUrl,"media-url":e["media-url"]||e.mediaUrl,"update-pasteboard":e["update-pasteboard"]||e.updatePasteboard};case"Node.js":return}default:return}};if(!this.isMute)switch(this.platform()){case"Surge":case"Loon":case"Stash":case"Egern":case"Shadowrocket":default:$notification.post(e,i,a,m(t));break;case"Quantumult X":$notify(e,i,a,m(t));case"Node.js":}if(!this.isMuteLog){let t=["","==============📣系统通知📣=============="];t.push(e),i&&t.push(i),a&&t.push(a),console.log(t.join("\n")),this.logs=this.logs.concat(t)}}log(...e){e.length>0&&(this.logs=[...this.logs,...e]),console.log(e.join(this.logSeparator))}logErr(e){switch(this.platform()){case"Surge":case"Loon":case"Stash":case"Egern":case"Shadowrocket":case"Quantumult X":default:this.log("",`❗️ ${this.name}, 错误!`,e);break;case"Node.js":this.log("",`❗️${this.name}, 错误!`,e.stack)}}wait(e){return new Promise((i=>setTimeout(i,e)))}done(i={}){const a=((new Date).getTime()-this.startTime)/1e3;switch(this.log("",`🚩 ${this.name}, 结束! 🕛 ${a} 秒`,""),this.platform()){case"Surge":i.policy&&e.set(i,"headers.X-Surge-Policy",i.policy),$done(i);break;case"Loon":i.policy&&(i.node=i.policy),$done(i);break;case"Stash":i.policy&&e.set(i,"headers.X-Stash-Selected-Proxy",encodeURI(i.policy)),$done(i);break;case"Egern":case"Shadowrocket":default:$done(i);break;case"Quantumult X":i.policy&&e.set(i,"opts.policy",i.policy),delete i["auto-redirect"],delete i["auto-cookie"],delete i["binary-mode"],delete i.charset,delete i.host,delete i.insecure,delete i.method,delete i.opt,delete i.path,delete i.policy,delete i["policy-descriptor"],delete i.scheme,delete i.sessionIndex,delete i.statusCode,delete i.timeout,i.body instanceof ArrayBuffer?(i.bodyBytes=i.body,delete i.body):ArrayBuffer.isView(i.body)?(i.bodyBytes=i.body.buffer.slice(i.body.byteOffset,i.body.byteLength+i.body.byteOffset),delete i.body):i.body&&delete i.bodyBytes,$done(i);break;case"Node.js":process.exit(1)}}}class t{static name="URI";static version="1.2.7";static about(){return console.log(`\n🟧 ${this.name} v${this.version}\n`)}static#m={scheme:"",host:"",path:"",query:{}};static parse(e){let i=e.match(/(?:(?.+):\/\/(?[^/]+))?\/?(?[^?]+)?\??(?[^?]+)?/)?.groups??null;if(i?.path?i.paths=i.path.split("/"):i.path="",i?.paths){const e=i.paths[i.paths.length-1];if(e?.includes(".")){const a=e.split(".");i.format=a[a.length-1]}}return i?.query&&(i.query=Object.fromEntries(i.query.split("&").map((e=>e.split("="))))),i}static stringify(e=this.#m){let i="";return e?.scheme&&e?.host&&(i+=e.scheme+"://"+e.host),e?.path&&(i+=e?.host?"/"+e.path:e.path),e?.query&&(i+="?"+Object.entries(e.query).map((e=>e.join("="))).join("&")),i}}var m={Switch:!0},s={Storefront:[["AE","143481"],["AF","143610"],["AG","143540"],["AI","143538"],["AL","143575"],["AM","143524"],["AO","143564"],["AR","143505"],["AT","143445"],["AU","143460"],["AZ","143568"],["BA","143612"],["BB","143541"],["BD","143490"],["BE","143446"],["BF","143578"],["BG","143526"],["BH","143559"],["BJ","143576"],["BM","143542"],["BN","143560"],["BO","143556"],["BR","143503"],["BS","143539"],["BT","143577"],["BW","143525"],["BY","143565"],["BZ","143555"],["CA","143455"],["CD","143613"],["CG","143582"],["CH","143459"],["CI","143527"],["CL","143483"],["CM","143574"],["CN","143465"],["CO","143501"],["CR","143495"],["CV","143580"],["CY","143557"],["CZ","143489"],["DE","143443"],["DK","143458"],["DM","143545"],["DO","143508"],["DZ","143563"],["EC","143509"],["EE","143518"],["EG","143516"],["ES","143454"],["FI","143447"],["FJ","143583"],["FM","143591"],["FR","143442"],["GA","143614"],["GB","143444"],["GD","143546"],["GF","143615"],["GH","143573"],["GM","143584"],["GR","143448"],["GT","143504"],["GW","143585"],["GY","143553"],["HK","143463"],["HN","143510"],["HR","143494"],["HU","143482"],["ID","143476"],["IE","143449"],["IL","143491"],["IN","143467"],["IQ","143617"],["IS","143558"],["IT","143450"],["JM","143511"],["JO","143528"],["JP","143462"],["KE","143529"],["KG","143586"],["KH","143579"],["KN","143548"],["KP","143466"],["KR","143466"],["KW","143493"],["KY","143544"],["KZ","143517"],["TC","143552"],["TD","143581"],["TJ","143603"],["TH","143475"],["TM","143604"],["TN","143536"],["TO","143608"],["TR","143480"],["TT","143551"],["TW","143470"],["TZ","143572"],["LA","143587"],["LB","143497"],["LC","143549"],["LI","143522"],["LK","143486"],["LR","143588"],["LT","143520"],["LU","143451"],["LV","143519"],["LY","143567"],["MA","143620"],["MD","143523"],["ME","143619"],["MG","143531"],["MK","143530"],["ML","143532"],["MM","143570"],["MN","143592"],["MO","143515"],["MR","143590"],["MS","143547"],["MT","143521"],["MU","143533"],["MV","143488"],["MW","143589"],["MX","143468"],["MY","143473"],["MZ","143593"],["NA","143594"],["NE","143534"],["NG","143561"],["NI","143512"],["NL","143452"],["NO","143457"],["NP","143484"],["NR","143606"],["NZ","143461"],["OM","143562"],["PA","143485"],["PE","143507"],["PG","143597"],["PH","143474"],["PK","143477"],["PL","143478"],["PT","143453"],["PW","143595"],["PY","143513"],["QA","143498"],["RO","143487"],["RS","143500"],["RU","143469"],["RW","143621"],["SA","143479"],["SB","143601"],["SC","143599"],["SE","143456"],["SG","143464"],["SI","143499"],["SK","143496"],["SL","143600"],["SN","143535"],["SR","143554"],["ST","143598"],["SV","143506"],["SZ","143602"],["UA","143492"],["UG","143537"],["US","143441"],["UY","143514"],["UZ","143566"],["VC","143550"],["VE","143502"],["VG","143543"],["VN","143471"],["VU","143609"],["XK","143624"],["YE","143571"],["ZA","143472"],["ZM","143622"],["ZW","143605"]]},n={Settings:m,Configs:s},l={Switch:!0,PEP:{GCC:"US"}},r={Settings:l},o={Switch:!0,UrlInfoSet:{Dispatcher:"AutoNavi",Directions:"AutoNavi",RAP:"Apple",LocationShift:"AUTO"},TileSet:{Map:"CN",Satellite:"HYBRID",Traffic:"CN",POI:"CN",Flyover:"XX",Munin:"XX"},GeoManifest:{Dynamic:{Config:{CountryCode:{default:"CN",iOS:"AUTO",iPadOS:"AUTO",watchOS:"US",macOS:"AUTO"}}}},Config:{Announcements:{"Environment:":{default:"AUTO",iOS:"AUTO",iPadOS:"AUTO",watchOS:"AUTO",macOS:"AUTO"}}}},p={CN:{tileSet:[{style:1,validVersion:[{identifier:2112,availableTiles:[{minX:0,minY:0,maxX:1,maxY:1,minZ:1,maxZ:1},{minX:0,minY:0,maxX:3,maxY:3,minZ:2,maxZ:2},{minX:0,minY:0,maxX:7,maxY:7,minZ:3,maxZ:3},{minX:0,minY:0,maxX:15,maxY:15,minZ:4,maxZ:4},{minX:0,minY:0,maxX:31,maxY:31,minZ:5,maxZ:5},{minX:0,minY:0,maxX:63,maxY:63,minZ:6,maxZ:6},{minX:0,minY:0,maxX:127,maxY:127,minZ:7,maxZ:7},{minX:0,minY:0,maxX:255,maxY:255,minZ:8,maxZ:8},{minX:0,minY:0,maxX:1023,maxY:1023,minZ:10,maxZ:10},{minX:0,minY:0,maxX:4095,maxY:4095,minZ:12,maxZ:12},{minX:0,minY:0,maxX:16383,maxY:16383,minZ:14,maxZ:14}],genericTile:[],supportedLanguagesVersion:1}],scale:0,size:2,supportedLanguage:[{identifier:1,language:["ar","ca","cs","da","de","el","en","en-AU","en-GB","es","es-MX","fi","fr","fr-CA","he","hi","hr","hu","id","it","ja","ko","ms","nb","nl","pl","pt","pt-PT","ro","ru","sk","sv","th","tr","uk","vi","zh-Hans","zh-Hant","zh-HK"]}],countryRegionWhitelist:[{countryCode:"AE",region:"AE"},{countryCode:"AE",region:"SA"},{countryCode:"IN",region:"IN"},{countryCode:"JP",region:"JP"},{countryCode:"KR",region:"KR"},{countryCode:"MA",region:"MA"},{countryCode:"RU",region:"RU"},{countryCode:"SA",region:"AE"},{countryCode:"SA",region:"SA"}],checksumType:0,requestStyle:1,deviceSKUWhitelist:[],baseURL:"https://gspe19-cn-ssl.ls.apple.com/tiles?flags=8",supportsMultipathTCP:!1},{style:7,validVersion:[{identifier:51,availableTiles:[{minX:0,minY:0,maxX:1,maxY:1,minZ:1,maxZ:7},{minX:179,minY:80,maxX:224,maxY:128,minZ:8,maxZ:8},{minX:359,minY:161,maxX:449,maxY:257,minZ:9,maxZ:9},{minX:719,minY:323,maxX:898,maxY:915,minZ:10,maxZ:10},{minX:1438,minY:646,maxX:1797,maxY:1031,minZ:11,maxZ:11},{minX:2876,minY:1292,maxX:3594,maxY:2062,minZ:12,maxZ:12},{minX:5752,minY:2584,maxX:7188,maxY:4124,minZ:13,maxZ:13},{minX:11504,minY:5168,maxX:14376,maxY:8248,minZ:14,maxZ:14},{minX:23008,minY:10336,maxX:28752,maxY:16496,minZ:15,maxZ:15},{minX:46016,minY:20672,maxX:57504,maxY:32992,minZ:16,maxZ:16},{minX:92032,minY:41344,maxX:115008,maxY:65984,minZ:17,maxZ:17},{minX:184064,minY:82668,maxX:230016,maxY:131976,minZ:18,maxZ:18}],genericTile:[{tileType:2,textureIndex:0,resourceIndex:1971}]}],scale:1,size:1,supportedLanguage:[],countryRegionWhitelist:[],checksumType:0,requestStyle:0,deviceSKUWhitelist:[],baseURL:"https://gspe11-2-cn-ssl.ls.apple.com/2/tiles",supportsMultipathTCP:!1},{style:7,validVersion:[{identifier:51,availableTiles:[{minX:0,minY:0,maxX:1,maxY:1,minZ:1,maxZ:7},{minX:179,minY:80,maxX:224,maxY:128,minZ:8,maxZ:8},{minX:359,minY:161,maxX:449,maxY:257,minZ:9,maxZ:9},{minX:719,minY:323,maxX:898,maxY:915,minZ:10,maxZ:10},{minX:1438,minY:646,maxX:1797,maxY:1031,minZ:11,maxZ:11},{minX:2876,minY:1292,maxX:3594,maxY:2062,minZ:12,maxZ:12},{minX:5752,minY:2584,maxX:7188,maxY:4124,minZ:13,maxZ:13},{minX:11504,minY:5168,maxX:14376,maxY:8248,minZ:14,maxZ:14},{minX:23008,minY:10336,maxX:28752,maxY:16496,minZ:15,maxZ:15},{minX:46016,minY:20672,maxX:57504,maxY:32992,minZ:16,maxZ:16},{minX:92032,minY:41344,maxX:115008,maxY:65984,minZ:17,maxZ:17},{minX:184064,minY:82668,maxX:230016,maxY:131976,minZ:18,maxZ:18}],genericTile:[{tileType:2,textureIndex:0,resourceIndex:1971}]}],scale:2,size:1,supportedLanguage:[],countryRegionWhitelist:[],checksumType:0,requestStyle:0,deviceSKUWhitelist:[],baseURL:"https://gspe11-2-cn-ssl.ls.apple.com/2/tiles",supportsMultipathTCP:!1},{style:11,validVersion:[{identifier:470,availableTiles:[{minX:0,minY:0,maxX:8191,maxY:8191,minZ:13,maxZ:13},{minX:0,minY:0,maxX:16383,maxY:16383,minZ:14,maxZ:14},{minX:0,minY:0,maxX:32767,maxY:32767,minZ:15,maxZ:15}],genericTile:[]}],scale:0,size:2,supportedLanguage:[],countryRegionWhitelist:[],checksumType:0,requestStyle:1,deviceSKUWhitelist:[],baseURL:"https://gspe19-cn-ssl.ls.apple.com/tiles?flags=1",supportsMultipathTCP:!1},{style:12,validVersion:[{identifier:2111,availableTiles:[{minX:0,minY:0,maxX:255,maxY:255,minZ:8,maxZ:8},{minX:0,minY:0,maxX:4095,maxY:4095,minZ:12,maxZ:12}],genericTile:[],timeToLiveSeconds:120}],scale:0,size:2,supportedLanguage:[],countryRegionWhitelist:[],checksumType:0,requestStyle:0,deviceSKUWhitelist:[],baseURL:"https://gspe12-cn-ssl.ls.apple.com/traffic",supportsMultipathTCP:!1},{style:13,validVersion:[{identifier:2092,availableTiles:[{minX:0,minY:0,maxX:1,maxY:1,minZ:1,maxZ:2},{minX:0,minY:0,maxX:15,maxY:15,minZ:4,maxZ:4},{minX:0,minY:0,maxX:63,maxY:63,minZ:6,maxZ:10},{minX:0,minY:0,maxX:4095,maxY:4095,minZ:12,maxZ:15},{minX:0,minY:0,maxX:65535,maxY:65535,minZ:16,maxZ:16},{minX:0,minY:0,maxX:131071,maxY:131071,minZ:17,maxZ:17}],genericTile:[],timeToLiveSeconds:604800,supportedLanguagesVersion:1}],scale:0,size:2,supportedLanguage:[{identifier:1,language:["ar","ca","cs","da","de","el","en","en-AU","en-GB","es","es-MX","fi","fr","fr-CA","he","hi","hr","hu","id","it","ja","ko","ms","nb","nl","pl","pt","pt-PT","ro","ru","sk","sv","th","tr","uk","vi","zh-Hans","zh-Hant","zh-HK"]}],countryRegionWhitelist:[],checksumType:0,requestStyle:1,deviceSKUWhitelist:[],baseURL:"https://gspe19-cn-ssl.ls.apple.com/tiles?flags=2",supportsMultipathTCP:!1},{style:18,validVersion:[{identifier:2112,availableTiles:[{minX:0,minY:0,maxX:32767,maxY:32767,minZ:15,maxZ:15}],genericTile:[],supportedLanguagesVersion:1}],scale:0,size:2,supportedLanguage:[{identifier:1,language:["ar","ca","cs","da","de","el","en","en-AU","en-GB","es","es-MX","fi","fr","fr-CA","he","hi","hr","hu","id","it","ja","ko","ms","nb","nl","pl","pt","pt-PT","ro","ru","sk","sv","th","tr","uk","vi","zh-Hans","zh-Hant","zh-HK"]}],countryRegionWhitelist:[],checksumType:0,requestStyle:1,deviceSKUWhitelist:[],baseURL:"https://gspe19-cn-ssl.ls.apple.com/tiles",supportsMultipathTCP:!1},{style:20,validVersion:[{identifier:2112,availableTiles:[{minX:0,minY:0,maxX:1,maxY:1,minZ:1,maxZ:1},{minX:0,minY:0,maxX:3,maxY:3,minZ:2,maxZ:2},{minX:0,minY:0,maxX:7,maxY:7,minZ:3,maxZ:3},{minX:0,minY:0,maxX:15,maxY:15,minZ:4,maxZ:4},{minX:0,minY:0,maxX:31,maxY:31,minZ:5,maxZ:5},{minX:0,minY:0,maxX:63,maxY:63,minZ:6,maxZ:6},{minX:0,minY:0,maxX:127,maxY:127,minZ:7,maxZ:7},{minX:0,minY:0,maxX:255,maxY:255,minZ:8,maxZ:8},{minX:0,minY:0,maxX:511,maxY:511,minZ:9,maxZ:9},{minX:0,minY:0,maxX:1023,maxY:1023,minZ:10,maxZ:10},{minX:0,minY:0,maxX:2047,maxY:2047,minZ:11,maxZ:11},{minX:0,minY:0,maxX:4095,maxY:4095,minZ:12,maxZ:12},{minX:0,minY:0,maxX:8191,maxY:8191,minZ:13,maxZ:13},{minX:0,minY:0,maxX:16383,maxY:16383,minZ:14,maxZ:14},{minX:0,minY:0,maxX:32767,maxY:32767,minZ:15,maxZ:15}],genericTile:[],supportedLanguagesVersion:1}],scale:0,size:2,supportedLanguage:[{identifier:1,language:["ar","ca","cs","da","de","el","en","en-AU","en-GB","es","es-MX","fi","fr","fr-CA","he","hi","hr","hu","id","it","ja","ko","ms","nb","nl","pl","pt","pt-PT","ro","ru","sk","sv","th","tr","uk","vi","zh-Hans","zh-Hant","zh-HK"]}],countryRegionWhitelist:[{countryCode:"AE",region:"AE"},{countryCode:"AE",region:"SA"},{countryCode:"IN",region:"IN"},{countryCode:"JP",region:"JP"},{countryCode:"KR",region:"KR"},{countryCode:"MA",region:"MA"},{countryCode:"RU",region:"RU"},{countryCode:"SA",region:"AE"},{countryCode:"SA",region:"SA"}],checksumType:0,requestStyle:1,deviceSKUWhitelist:[],baseURL:"https://gspe19-cn-ssl.ls.apple.com/tiles",supportsMultipathTCP:!1},{style:22,validVersion:[{identifier:2112,availableTiles:[{minX:0,minY:0,maxX:127,maxY:127,minZ:7,maxZ:15}],genericTile:[]}],scale:0,size:2,supportedLanguage:[],countryRegionWhitelist:[],checksumType:0,requestStyle:1,deviceSKUWhitelist:[],baseURL:"https://gspe19-cn-ssl.ls.apple.com/tiles",supportsMultipathTCP:!1},{style:30,validVersion:[{identifier:146,availableTiles:[{minX:0,minY:0,maxX:1023,maxY:1023,minZ:10,maxZ:10},{minX:0,minY:0,maxX:32767,maxY:32767,minZ:15,maxZ:15},{minX:0,minY:0,maxX:262143,maxY:262143,minZ:18,maxZ:18}],genericTile:[],supportedLanguagesVersion:1}],scale:0,size:2,supportedLanguage:[{identifier:1,language:["ar","ca","cs","da","de","el","en","en-AU","en-GB","es","es-MX","fi","fr","fr-CA","he","hi","hr","hu","id","it","ja","ko","ms","nb","nl","pl","pt","pt-PT","ro","ru","sk","sv","th","tr","uk","vi","zh-Hans","zh-Hant","zh-HK"]}],countryRegionWhitelist:[],checksumType:0,requestStyle:1,deviceSKUWhitelist:[],baseURL:"https://gspe19-cn-ssl.ls.apple.com/tiles",supportsMultipathTCP:!1},{style:37,validVersion:[{identifier:1904,availableTiles:[{minX:0,minY:0,maxX:1,maxY:1,minZ:1,maxZ:1},{minX:0,minY:0,maxX:7,maxY:7,minZ:3,maxZ:3},{minX:0,minY:0,maxX:31,maxY:31,minZ:5,maxZ:5},{minX:0,minY:0,maxX:127,maxY:127,minZ:7,maxZ:7},{minX:0,minY:0,maxX:511,maxY:511,minZ:9,maxZ:9},{minX:0,minY:0,maxX:1023,maxY:1023,minZ:10,maxZ:10},{minX:0,minY:0,maxX:2047,maxY:2047,minZ:11,maxZ:11},{minX:0,minY:0,maxX:8191,maxY:8191,minZ:13,maxZ:13},{minX:0,minY:0,maxX:16383,maxY:16383,minZ:14,maxZ:14},{minX:0,minY:0,maxX:32767,maxY:32767,minZ:15,maxZ:15}],genericTile:[],supportedLanguagesVersion:1}],scale:0,size:2,supportedLanguage:[{identifier:1,language:["ar","ca","cs","da","de","el","en","en-AU","en-GB","es","es-MX","fi","fr","fr-CA","he","hi","hr","hu","id","it","ja","ko","ms","nb","nl","pl","pt","pt-PT","ro","ru","sk","sv","th","tr","uk","vi","zh-Hans","zh-Hant","zh-HK"]}],countryRegionWhitelist:[],checksumType:0,requestStyle:1,deviceSKUWhitelist:[],baseURL:"https://gspe19-cn-ssl.ls.apple.com/tiles?flags=2",supportsMultipathTCP:!1},{style:47,validVersion:[{identifier:1904,availableTiles:[{minX:0,minY:0,maxX:1,maxY:1,minZ:1,maxZ:1},{minX:0,minY:0,maxX:7,maxY:7,minZ:3,maxZ:3},{minX:0,minY:0,maxX:31,maxY:31,minZ:5,maxZ:5},{minX:0,minY:0,maxX:127,maxY:127,minZ:7,maxZ:7},{minX:0,minY:0,maxX:511,maxY:511,minZ:9,maxZ:9},{minX:0,minY:0,maxX:1023,maxY:1023,minZ:10,maxZ:10},{minX:0,minY:0,maxX:2047,maxY:2047,minZ:11,maxZ:11},{minX:0,minY:0,maxX:8191,maxY:8191,minZ:13,maxZ:13},{minX:0,minY:0,maxX:16383,maxY:16383,minZ:14,maxZ:14},{minX:0,minY:0,maxX:32767,maxY:32767,minZ:15,maxZ:15}],genericTile:[],supportedLanguagesVersion:1}],scale:0,size:2,supportedLanguage:[{identifier:1,language:["ar","ca","cs","da","de","el","en","en-AU","en-GB","es","es-MX","fi","fr","fr-CA","he","hi","hr","hu","id","it","ja","ko","ms","nb","nl","pl","pt","pt-PT","ro","ru","sk","sv","th","tr","uk","vi","zh-Hans","zh-Hant","zh-HK"]}],countryRegionWhitelist:[],checksumType:0,requestStyle:1,deviceSKUWhitelist:[],baseURL:"https://gspe19-cn-ssl.ls.apple.com/tiles",supportsMultipathTCP:!1},{style:48,validVersion:[{identifier:1904,availableTiles:[{minX:0,minY:0,maxX:4095,maxY:4095,minZ:12,maxZ:12},{minX:0,minY:0,maxX:32767,maxY:32767,minZ:15,maxZ:15}],genericTile:[]}],scale:0,size:2,supportedLanguage:[],countryRegionWhitelist:[],checksumType:0,requestStyle:1,deviceSKUWhitelist:[],baseURL:"https://gspe19-cn-ssl.ls.apple.com/tiles",supportsMultipathTCP:!1},{style:53,validVersion:[{identifier:2112,availableTiles:[{minX:0,minY:0,maxX:32767,maxY:32767,minZ:15,maxZ:15}],genericTile:[],supportedLanguagesVersion:1}],scale:0,size:2,supportedLanguage:[{identifier:1,language:["ar","ca","cs","da","de","el","en","en-AU","en-GB","es","es-MX","fi","fr","fr-CA","he","hi","hr","hu","id","it","ja","ko","ms","nb","nl","pl","pt","pt-PT","ro","ru","sk","sv","th","tr","uk","vi","zh-Hans","zh-Hant","zh-HK"]}],countryRegionWhitelist:[],checksumType:0,requestStyle:1,deviceSKUWhitelist:[],baseURL:"https://gspe19-cn-ssl.ls.apple.com/tiles",supportsMultipathTCP:!1},{style:54,validVersion:[{identifier:2112,availableTiles:[{minX:0,minY:0,maxX:8191,maxY:8191,minZ:13,maxZ:13},{minX:0,minY:0,maxX:32767,maxY:32767,minZ:15,maxZ:15}],genericTile:[]}],scale:0,size:2,supportedLanguage:[],countryRegionWhitelist:[],checksumType:0,requestStyle:1,deviceSKUWhitelist:[],baseURL:"https://gspe19-cn-ssl.ls.apple.com/tiles",supportsMultipathTCP:!1},{style:56,validVersion:[{identifier:16,availableTiles:[{minX:0,minY:0,maxX:131071,maxY:131071,minZ:17,maxZ:17}],genericTile:[],supportedLanguagesVersion:1}],scale:0,size:2,supportedLanguage:[{identifier:1,language:["ar","ca","cs","da","de","el","en","en-AU","en-GB","es","es-MX","fi","fr","fr-CA","he","hi","hr","hu","id","it","ja","ko","ms","nb","nl","pl","pt","pt-PT","ro","ru","sk","sv","th","tr","uk","vi","zh-Hans","zh-Hant","zh-HK"]}],countryRegionWhitelist:[],checksumType:0,requestStyle:0,deviceSKUWhitelist:[],baseURL:"https://gspe19-cn-ssl.ls.apple.com/tiles",supportsMultipathTCP:!1},{style:57,validVersion:[{identifier:0,availableTiles:[{minX:0,minY:0,maxX:131071,maxY:131071,minZ:17,maxZ:17}],genericTile:[],timeToLiveSeconds:3600}],scale:0,size:2,supportedLanguage:[],countryRegionWhitelist:[],checksumType:0,requestStyle:1,deviceSKUWhitelist:[],baseURL:"https://gsp76-cn-ssl.ls.apple.com/api/tile",supportsMultipathTCP:!1},{style:58,validVersion:[{identifier:137,availableTiles:[{minX:0,minY:0,maxX:1,maxY:1,minZ:1,maxZ:1},{minX:0,minY:0,maxX:3,maxY:3,minZ:2,maxZ:2},{minX:0,minY:0,maxX:7,maxY:7,minZ:3,maxZ:3},{minX:0,minY:0,maxX:15,maxY:15,minZ:4,maxZ:4},{minX:0,minY:0,maxX:31,maxY:31,minZ:5,maxZ:5},{minX:0,minY:0,maxX:63,maxY:63,minZ:6,maxZ:6},{minX:0,minY:0,maxX:127,maxY:127,minZ:7,maxZ:7},{minX:0,minY:0,maxX:255,maxY:255,minZ:8,maxZ:8},{minX:0,minY:0,maxX:511,maxY:511,minZ:9,maxZ:9},{minX:0,minY:0,maxX:1023,maxY:1023,minZ:10,maxZ:10},{minX:0,minY:0,maxX:2047,maxY:2047,minZ:11,maxZ:11},{minX:0,minY:0,maxX:4095,maxY:4095,minZ:12,maxZ:12},{minX:0,minY:0,maxX:8191,maxY:8191,minZ:13,maxZ:13},{minX:0,minY:0,maxX:16383,maxY:16383,minZ:14,maxZ:14},{minX:0,minY:0,maxX:32767,maxY:32767,minZ:15,maxZ:15},{minX:0,minY:0,maxX:65535,maxY:65535,minZ:16,maxZ:16},{minX:0,minY:0,maxX:131071,maxY:131071,minZ:17,maxZ:17}],genericTile:[]}],scale:0,size:2,supportedLanguage:[],countryRegionWhitelist:[],checksumType:0,requestStyle:0,deviceSKUWhitelist:[],baseURL:"https://gspe19-cn-ssl.ls.apple.com/tiles",supportsMultipathTCP:!1},{style:59,validVersion:[{identifier:80,availableTiles:[{minX:0,minY:0,maxX:1,maxY:1,minZ:1,maxZ:1}],genericTile:[]}],scale:0,size:2,supportedLanguage:[],countryRegionWhitelist:[],checksumType:0,requestStyle:0,deviceSKUWhitelist:[],baseURL:"https://gspe19-cn-ssl.ls.apple.com/asset/v3/model",supportsMultipathTCP:!1},{style:60,validVersion:[{identifier:30,availableTiles:[{minX:0,minY:0,maxX:1,maxY:1,minZ:1,maxZ:1},{minX:0,minY:0,maxX:3,maxY:3,minZ:2,maxZ:2},{minX:0,minY:0,maxX:7,maxY:7,minZ:3,maxZ:3},{minX:0,minY:0,maxX:15,maxY:15,minZ:4,maxZ:4},{minX:0,minY:0,maxX:31,maxY:31,minZ:5,maxZ:5},{minX:0,minY:0,maxX:63,maxY:63,minZ:6,maxZ:6},{minX:0,minY:0,maxX:127,maxY:127,minZ:7,maxZ:7},{minX:0,minY:0,maxX:255,maxY:255,minZ:8,maxZ:8},{minX:0,minY:0,maxX:511,maxY:511,minZ:9,maxZ:9}],genericTile:[]}],scale:0,size:2,supportedLanguage:[],countryRegionWhitelist:[],checksumType:0,requestStyle:0,deviceSKUWhitelist:[],baseURL:"https://gspe19-cn-ssl.ls.apple.com/asset/v3/material",supportsMultipathTCP:!1},{style:61,validVersion:[{identifier:30,availableTiles:[{minX:0,minY:0,maxX:127,maxY:127,minZ:7,maxZ:7}],genericTile:[]}],scale:0,size:2,supportedLanguage:[],countryRegionWhitelist:[],checksumType:0,requestStyle:0,deviceSKUWhitelist:[],baseURL:"https://gspe19-cn-ssl.ls.apple.com/tiles",supportsMultipathTCP:!1},{style:64,validVersion:[{identifier:16,availableTiles:[{minX:0,minY:0,maxX:4095,maxY:4095,minZ:12,maxZ:12}],genericTile:[],supportedLanguagesVersion:1}],scale:0,size:2,supportedLanguage:[{identifier:1,language:["ar","ca","cs","da","de","el","en","en-AU","en-GB","es","es-MX","fi","fr","fr-CA","he","hi","hr","hu","id","it","ja","ko","ms","nb","nl","pl","pt","pt-PT","ro","ru","sk","sv","th","tr","uk","vi","zh-Hans","zh-Hant","zh-HK"]}],countryRegionWhitelist:[],checksumType:0,requestStyle:0,deviceSKUWhitelist:[],baseURL:"https://gspe19-cn-ssl.ls.apple.com/tiles",supportsMultipathTCP:!1},{style:65,validVersion:[{identifier:2,availableTiles:[{minX:0,minY:0,maxX:255,maxY:255,minZ:8,maxZ:8}],genericTile:[],timeToLiveSeconds:3600}],scale:0,size:2,supportedLanguage:[],countryRegionWhitelist:[],checksumType:0,requestStyle:1,deviceSKUWhitelist:[],baseURL:"https://gspe79-cn-ssl.ls.apple.com/65/v1",supportsMultipathTCP:!1},{style:66,validVersion:[{identifier:2112,availableTiles:[{minX:0,minY:0,maxX:1,maxY:1,minZ:1,maxZ:1},{minX:0,minY:0,maxX:3,maxY:3,minZ:2,maxZ:2},{minX:0,minY:0,maxX:7,maxY:7,minZ:3,maxZ:3},{minX:0,minY:0,maxX:15,maxY:15,minZ:4,maxZ:4},{minX:0,minY:0,maxX:31,maxY:31,minZ:5,maxZ:5},{minX:0,minY:0,maxX:63,maxY:63,minZ:6,maxZ:6},{minX:0,minY:0,maxX:127,maxY:127,minZ:7,maxZ:7},{minX:0,minY:0,maxX:255,maxY:255,minZ:8,maxZ:8},{minX:0,minY:0,maxX:511,maxY:511,minZ:9,maxZ:9},{minX:0,minY:0,maxX:1023,maxY:1023,minZ:10,maxZ:10},{minX:0,minY:0,maxX:2047,maxY:2047,minZ:11,maxZ:11},{minX:0,minY:0,maxX:4095,maxY:4095,minZ:12,maxZ:12},{minX:0,minY:0,maxX:8191,maxY:8191,minZ:13,maxZ:13},{minX:0,minY:0,maxX:16383,maxY:16383,minZ:14,maxZ:14},{minX:0,minY:0,maxX:32767,maxY:32767,minZ:15,maxZ:15}],genericTile:[],supportedLanguagesVersion:1}],scale:0,size:2,supportedLanguage:[{identifier:1,language:["ar","ca","cs","da","de","el","en","en-AU","en-GB","es","es-MX","fi","fr","fr-CA","he","hi","hr","hu","id","it","ja","ko","ms","nb","nl","pl","pt","pt-PT","ro","ru","sk","sv","th","tr","uk","vi","zh-Hans","zh-Hant","zh-HK"]}],countryRegionWhitelist:[{countryCode:"AE",region:"AE"},{countryCode:"AE",region:"SA"},{countryCode:"IN",region:"IN"},{countryCode:"JP",region:"JP"},{countryCode:"KR",region:"KR"},{countryCode:"MA",region:"MA"},{countryCode:"RU",region:"RU"},{countryCode:"SA",region:"AE"},{countryCode:"SA",region:"SA"}],checksumType:0,requestStyle:0,deviceSKUWhitelist:[],baseURL:"https://gspe19-cn-ssl.ls.apple.com/tiles",supportsMultipathTCP:!1},{style:67,validVersion:[{identifier:2112,availableTiles:[{minX:0,minY:0,maxX:1,maxY:1,minZ:1,maxZ:1},{minX:0,minY:0,maxX:3,maxY:3,minZ:2,maxZ:2},{minX:0,minY:0,maxX:7,maxY:7,minZ:3,maxZ:3},{minX:0,minY:0,maxX:15,maxY:15,minZ:4,maxZ:4},{minX:0,minY:0,maxX:31,maxY:31,minZ:5,maxZ:5},{minX:0,minY:0,maxX:63,maxY:63,minZ:6,maxZ:6},{minX:0,minY:0,maxX:127,maxY:127,minZ:7,maxZ:7},{minX:0,minY:0,maxX:255,maxY:255,minZ:8,maxZ:8},{minX:0,minY:0,maxX:1023,maxY:1023,minZ:10,maxZ:10},{minX:0,minY:0,maxX:4095,maxY:4095,minZ:12,maxZ:12},{minX:0,minY:0,maxX:16383,maxY:16383,minZ:14,maxZ:14}],genericTile:[],supportedLanguagesVersion:1}],scale:0,size:2,supportedLanguage:[{identifier:1,language:["ar","ca","cs","da","de","el","en","en-AU","en-GB","es","es-MX","fi","fr","fr-CA","he","hi","hr","hu","id","it","ja","ko","ms","nb","nl","pl","pt","pt-PT","ro","ru","sk","sv","th","tr","uk","vi","zh-Hans","zh-Hant","zh-HK"]}],countryRegionWhitelist:[{countryCode:"AE",region:"AE"},{countryCode:"AE",region:"SA"},{countryCode:"IN",region:"IN"},{countryCode:"JP",region:"JP"},{countryCode:"KR",region:"KR"},{countryCode:"MA",region:"MA"},{countryCode:"RU",region:"RU"},{countryCode:"SA",region:"AE"},{countryCode:"SA",region:"SA"}],checksumType:0,requestStyle:0,deviceSKUWhitelist:[],baseURL:"https://gspe19-cn-ssl.ls.apple.com/tiles",supportsMultipathTCP:!1},{style:68,validVersion:[{identifier:2092,availableTiles:[{minX:0,minY:0,maxX:1,maxY:1,minZ:1,maxZ:1},{minX:0,minY:0,maxX:3,maxY:3,minZ:2,maxZ:2},{minX:0,minY:0,maxX:15,maxY:15,minZ:4,maxZ:4},{minX:0,minY:0,maxX:63,maxY:63,minZ:6,maxZ:6},{minX:0,minY:0,maxX:127,maxY:127,minZ:7,maxZ:7},{minX:0,minY:0,maxX:255,maxY:255,minZ:8,maxZ:8},{minX:0,minY:0,maxX:511,maxY:511,minZ:9,maxZ:9},{minX:0,minY:0,maxX:1023,maxY:1023,minZ:10,maxZ:10},{minX:0,minY:0,maxX:4095,maxY:4095,minZ:12,maxZ:12},{minX:0,minY:0,maxX:8191,maxY:8191,minZ:13,maxZ:13},{minX:0,minY:0,maxX:16383,maxY:16383,minZ:14,maxZ:14},{minX:0,minY:0,maxX:32767,maxY:32767,minZ:15,maxZ:15},{minX:0,minY:0,maxX:65535,maxY:65535,minZ:16,maxZ:16},{minX:0,minY:0,maxX:131071,maxY:131071,minZ:17,maxZ:17}],genericTile:[],supportedLanguagesVersion:1}],scale:0,size:2,supportedLanguage:[{identifier:1,language:["ar","ca","cs","da","de","el","en","en-AU","en-GB","es","es-MX","fi","fr","fr-CA","he","hi","hr","hu","id","it","ja","ko","ms","nb","nl","pl","pt","pt-PT","ro","ru","sk","sv","th","tr","uk","vi","zh-Hans","zh-Hant","zh-HK"]}],countryRegionWhitelist:[],checksumType:0,requestStyle:0,deviceSKUWhitelist:[],baseURL:"https://gspe19-cn-ssl.ls.apple.com/tiles",supportsMultipathTCP:!1},{style:69,validVersion:[{identifier:21,availableTiles:[{minX:0,minY:0,maxX:1,maxY:1,minZ:1,maxZ:1},{minX:0,minY:0,maxX:7,maxY:7,minZ:3,maxZ:3},{minX:0,minY:0,maxX:63,maxY:63,minZ:6,maxZ:6},{minX:0,minY:0,maxX:511,maxY:511,minZ:9,maxZ:9},{minX:0,minY:0,maxX:4095,maxY:4095,minZ:12,maxZ:12},{minX:0,minY:0,maxX:32767,maxY:32767,minZ:15,maxZ:15}],genericTile:[]}],scale:0,size:2,supportedLanguage:[],countryRegionWhitelist:[],checksumType:0,requestStyle:1,deviceSKUWhitelist:[],baseURL:"https://gspe19-cn-ssl.ls.apple.com/tiles",supportsMultipathTCP:!1},{style:72,validVersion:[{identifier:2,availableTiles:[{minX:0,minY:0,maxX:8191,maxY:8191,minZ:13,maxZ:13}],genericTile:[],timeToLiveSeconds:3600}],scale:0,size:2,supportedLanguage:[],countryRegionWhitelist:[],checksumType:0,requestStyle:1,deviceSKUWhitelist:[],supportsMultipathTCP:!1},{style:73,validVersion:[{identifier:470,availableTiles:[{minX:0,minY:0,maxX:8191,maxY:8191,minZ:13,maxZ:13},{minX:0,minY:0,maxX:16383,maxY:16383,minZ:14,maxZ:14},{minX:0,minY:0,maxX:32767,maxY:32767,minZ:15,maxZ:15}],genericTile:[]}],scale:0,size:2,supportedLanguage:[],countryRegionWhitelist:[],checksumType:0,requestStyle:0,deviceSKUWhitelist:[],baseURL:"https://gspe19-cn-ssl.ls.apple.com/tiles",supportsMultipathTCP:!1},{style:76,validVersion:[{identifier:0,availableTiles:[{minX:0,minY:0,maxX:8191,maxY:8191,minZ:13,maxZ:13},{minX:0,minY:0,maxX:524287,maxY:524287,minZ:19,maxZ:19}],genericTile:[],timeToLiveSeconds:86400}],scale:0,size:2,supportedLanguage:[],countryRegionWhitelist:[],checksumType:0,requestStyle:1,deviceSKUWhitelist:[],baseURL:"https://gspe79-cn-ssl.ls.apple.com/sis/v1",supportsMultipathTCP:!1},{style:79,validVersion:[{identifier:29,availableTiles:[{minX:0,minY:0,maxX:1,maxY:1,minZ:1,maxZ:1},{minX:0,minY:0,maxX:3,maxY:3,minZ:2,maxZ:2},{minX:0,minY:0,maxX:7,maxY:7,minZ:3,maxZ:3},{minX:0,minY:0,maxX:15,maxY:15,minZ:4,maxZ:4},{minX:0,minY:0,maxX:31,maxY:31,minZ:5,maxZ:5},{minX:0,minY:0,maxX:63,maxY:63,minZ:6,maxZ:6},{minX:0,minY:0,maxX:127,maxY:127,minZ:7,maxZ:7},{minX:0,minY:0,maxX:255,maxY:255,minZ:8,maxZ:8},{minX:0,minY:0,maxX:511,maxY:511,minZ:9,maxZ:9}],genericTile:[]}],scale:0,size:2,supportedLanguage:[],countryRegionWhitelist:[],checksumType:0,requestStyle:0,deviceSKUWhitelist:[],baseURL:"https://gspe19-cn-ssl.ls.apple.com/tiles",supportsMultipathTCP:!1},{style:84,validVersion:[{identifier:2092,availableTiles:[{minX:0,minY:0,maxX:1,maxY:1,minZ:1,maxZ:1},{minX:0,minY:0,maxX:3,maxY:3,minZ:2,maxZ:2},{minX:0,minY:0,maxX:15,maxY:15,minZ:4,maxZ:4},{minX:0,minY:0,maxX:63,maxY:63,minZ:6,maxZ:6},{minX:0,minY:0,maxX:127,maxY:127,minZ:7,maxZ:7},{minX:0,minY:0,maxX:255,maxY:255,minZ:8,maxZ:8},{minX:0,minY:0,maxX:511,maxY:511,minZ:9,maxZ:9},{minX:0,minY:0,maxX:1023,maxY:1023,minZ:10,maxZ:10},{minX:0,minY:0,maxX:4095,maxY:4095,minZ:12,maxZ:12},{minX:0,minY:0,maxX:8191,maxY:8191,minZ:13,maxZ:13},{minX:0,minY:0,maxX:16383,maxY:16383,minZ:14,maxZ:14},{minX:0,minY:0,maxX:32767,maxY:32767,minZ:15,maxZ:15},{minX:0,minY:0,maxX:65535,maxY:65535,minZ:16,maxZ:16},{minX:0,minY:0,maxX:131071,maxY:131071,minZ:17,maxZ:17}],genericTile:[],timeToLiveSeconds:1800,supportedLanguagesVersion:1}],scale:0,size:2,supportedLanguage:[{identifier:1,language:["ar","ca","cs","da","de","el","en","en-AU","en-GB","es","es-MX","fi","fr","fr-CA","he","hi","hr","hu","id","it","ja","ko","ms","nb","nl","pl","pt","pt-PT","ro","ru","sk","sv","th","tr","uk","vi","zh-Hans","zh-Hant","zh-HK"]}],countryRegionWhitelist:[],checksumType:0,requestStyle:0,deviceSKUWhitelist:[],baseURL:"https://gspe19-2-cn-ssl.ls.apple.com/poi_update",supportsMultipathTCP:!1}],attribution:[{name:"AutoNavi",url:"https://gspe21-ssl.ls.apple.com/html/attribution-cn2-66.html",resource:[{resourceType:6,filename:"autonavi-4.png",checksum:{0:61,1:130,2:126,3:203,4:170,5:234,6:91,7:182,8:191,9:120,10:72,11:19,12:46,13:58,14:235,15:55,16:221,17:53,18:252,19:219},region:[],filter:[],validationMethod:0,updateMethod:0},{resourceType:6,filename:"autonavi-4@2x.png",checksum:{0:101,1:191,2:219,3:234,4:178,5:237,6:6,7:231,8:236,9:110,10:3,11:82,12:194,13:129,14:29,15:221,16:225,17:55,18:26,19:203},region:[],filter:[],validationMethod:0,updateMethod:0},{resourceType:6,filename:"autonavi-4@2x.png",checksum:{0:101,1:191,2:219,3:234,4:178,5:237,6:6,7:231,8:236,9:110,10:3,11:82,12:194,13:129,14:29,15:221,16:225,17:55,18:26,19:203},region:[],filter:[],validationMethod:0,updateMethod:0},{resourceType:5,filename:"autonavi-logo-mask-1.png",checksum:{0:247,1:152,2:81,3:90,4:135,5:206,6:171,7:138,8:151,9:37,10:167,11:77,12:112,13:223,14:89,15:164,16:242,17:201,18:164,19:74},region:[],filter:[],validationMethod:0,updateMethod:0},{resourceType:5,filename:"autonavi-logo-mask-1@2x.png",checksum:{0:54,1:203,2:95,3:5,4:82,5:108,6:189,7:170,8:124,9:255,10:39,11:153,12:245,13:47,14:224,15:93,16:202,17:181,18:11,19:127},region:[],filter:[],validationMethod:0,updateMethod:0},{resourceType:5,filename:"autonavi-logo-mask-1@3x.png",checksum:{0:131,1:225,2:158,3:241,4:69,5:218,6:172,7:162,8:166,9:241,10:48,11:174,12:31,13:104,14:225,15:155,16:97,17:143,18:15,19:99},region:[],filter:[],validationMethod:0,updateMethod:0}],region:[],linkDisplayStringIndex:0},{name:"© GeoTechnologies, Inc.",url:"https://gspe21-ssl.ls.apple.com/html/attribution-cn2-66.html",resource:[],region:[{minX:218,minY:102,maxX:225,maxY:104,minZ:8,maxZ:21},{minX:221,minY:98,maxX:228,maxY:101,minZ:8,maxZ:21},{minX:226,minY:91,maxX:231,maxY:97,minZ:8,maxZ:21}],linkDisplayStringIndex:0}],urlInfoSet:[{alternateResourcesURL:[{url:"https://cdn.apple-mapkit.com/rap",supportsMultipathTCP:!1},{url:"https://limit-rule.is.autonavi.com/lpr/rules/download",supportsMultipathTCP:!1}],resourcesURL:{url:"https://gspe21-ssl.ls.apple.com/",supportsMultipathTCP:!1},searchAttributionManifestURL:{url:"https://gspe21-ssl.ls.apple.com/config/search-attribution-1263",supportsMultipathTCP:!1},directionsURL:{url:"https://direction2.is.autonavi.com/direction",supportsMultipathTCP:!1},etaURL:{url:"https://direction2.is.autonavi.com/direction",supportsMultipathTCP:!1},batchReverseGeocoderURL:{url:"https://batch-rgeo.is.autonavi.com/batchRGeo",supportsMultipathTCP:!1},simpleETAURL:{url:"https://direction2.is.autonavi.com/direction",supportsMultipathTCP:!1},polyLocationShiftURL:{url:"https://shift.is.autonavi.com/localshift",supportsMultipathTCP:!1},problemSubmissionURL:{url:"https://rap.is.autonavi.com/rap",supportsMultipathTCP:!1},problemStatusURL:{url:"https://rap.is.autonavi.com/rapstatus",supportsMultipathTCP:!1},reverseGeocoderVersionsURL:{url:"https://gspe21-ssl.ls.apple.com/config/revgeo-version-11.plist",supportsMultipathTCP:!1},problemCategoriesURL:{url:"https://gspe21-ssl.ls.apple.com/config/com.apple.GEO.BusinessLocalizedCategories-424.plist",supportsMultipathTCP:!1},announcementsURL:{url:"https://gspe35-ssl.ls.apple.com/config/announcements?environment=prod-cn",supportsMultipathTCP:!1},dispatcherURL:{url:"https://dispatcher.is.autonavi.com/dispatcher",supportsMultipathTCP:!1},abExperimentURL:{url:"https://gsp-ssl.ls.apple.com/cn/ab.arpc",supportsMultipathTCP:!1},logMessageUsageURL:{url:"https://gsp64-ssl.ls.apple.com/a/v2/use",supportsMultipathTCP:!1},spatialLookupURL:{url:"https://spatialsearch.is.autonavi.com/spatialsearch",supportsMultipathTCP:!1},realtimeTrafficProbeURL:{url:"https://gsp9-ssl.apple.com/hvr/v2/rtloc",supportsMultipathTCP:!1},batchTrafficProbeURL:{url:"https://gsp10-ssl.ls.apple.com/hvr/v2/loc",supportsMultipathTCP:!1},logMessageUsageV3URL:{url:"https://gsp64-ssl.ls.apple.com/hvr/v3/use",supportsMultipathTCP:!1},backgroundDispatcherURL:{url:"https://dispatcher.is.autonavi.com/dispatcher",supportsMultipathTCP:!1},backgroundRevGeoURL:{url:"https://dispatcher.is.autonavi.com/dispatcher",supportsMultipathTCP:!1},wifiConnectionQualityProbeURL:{url:"https://gsp10-ssl-cn.ls.apple.com/hvr/wcq",supportsMultipathTCP:!1},wifiQualityURL:{url:"https://gsp85-cn-ssl.ls.apple.com/wifi_request",supportsMultipathTCP:!1},feedbackSubmissionURL:{url:"https://rap.is.autonavi.com/rap",supportsMultipathTCP:!1},feedbackLookupURL:{url:"https://rap.is.autonavi.com/lookup",supportsMultipathTCP:!1},junctionImageServiceURL:{url:"https://direction2.is.autonavi.com/direction",supportsMultipathTCP:!1},analyticsCohortSessionURL:{url:"https://gsp64-ssl.ls.apple.com/hvr/v3/use",supportsMultipathTCP:!1},analyticsLongSessionURL:{url:"https://gsp64-ssl.ls.apple.com/hvr/v3/use",supportsMultipathTCP:!1},analyticsShortSessionURL:{url:"https://gsp64-ssl.ls.apple.com/hvr/v3/use",supportsMultipathTCP:!1},analyticsSessionlessURL:{url:"https://gsp64-ssl.ls.apple.com/hvr/v3/use",supportsMultipathTCP:!1},webModuleBaseURL:{url:"https://placecard-server-wm.is.autonavi.com",supportsMultipathTCP:!1},wifiQualityTileURL:{url:"https://gspe85-cn-ssl.ls.apple.com/wifi_request_tile",supportsMultipathTCP:!1},batchReverseGeocoderPlaceRequestURL:{url:"https://dispatcher.is.autonavi.com/dispatcher",supportsMultipathTCP:!1},poiBusynessActivityCollectionURL:{url:"https://gsp53-ssl.ls.apple.com/hvr/rt_poi_activity",supportsMultipathTCP:!1},rapWebBundleURL:{url:"https://cdn.apple-mapkit.com/rap",supportsMultipathTCP:!1},offlineDataBatchListURL:{url:"https://ods.is.autonavi.com/api/batchesForRegion",supportsMultipathTCP:!1},offlineDataSizeURL:{url:"https://ods.is.autonavi.com/api/sizeForRegion",supportsMultipathTCP:!1},offlineDataDownloadBaseURL:{url:"https://gspe121-cn-ssl.ls.apple.com",supportsMultipathTCP:!1}}],muninBucket:[{bucketID:2,bucketURL:"https://gspe72-cn-ssl.ls.apple.com/mnn_us"},{bucketID:6,bucketURL:"https://gspe72-cn-ssl.ls.apple.com/mnn_us"}]},XX:{tileSet:[{style:1,validVersion:[{identifier:16034178,availableTiles:[{minX:0,minY:0,maxX:1,maxY:1,minZ:1,maxZ:1},{minX:0,minY:0,maxX:3,maxY:3,minZ:2,maxZ:2},{minX:0,minY:0,maxX:7,maxY:7,minZ:3,maxZ:3},{minX:0,minY:0,maxX:15,maxY:15,minZ:4,maxZ:4},{minX:0,minY:0,maxX:31,maxY:31,minZ:5,maxZ:5},{minX:0,minY:0,maxX:63,maxY:63,minZ:6,maxZ:6},{minX:0,minY:0,maxX:127,maxY:127,minZ:7,maxZ:7},{minX:0,minY:0,maxX:255,maxY:255,minZ:8,maxZ:8},{minX:0,minY:0,maxX:1023,maxY:1023,minZ:10,maxZ:10},{minX:0,minY:0,maxX:4095,maxY:4095,minZ:12,maxZ:12},{minX:0,minY:0,maxX:16383,maxY:16383,minZ:14,maxZ:14}],genericTile:[],supportedLanguagesVersion:1}],scale:0,size:2,supportedLanguage:[{identifier:1,language:["ar","ca","cs","da","de","el","en","en-AU","en-GB","es","es-MX","es-US","fi","fr","fr-CA","he","hi","hr","hu","id","it","ja","ko","ms","nb","nl","pl","pt","pt-PT","ro","ru","sk","sv","th","tr","uk","vi","zh-Hans","zh-Hant","zh-HK"]}],countryRegionWhitelist:[{countryCode:"AE",region:"AE"},{countryCode:"AE",region:"SA"},{countryCode:"IN",region:""},{countryCode:"JP",region:"JP"},{countryCode:"KR",region:"KR"},{countryCode:"MA",region:"MA"},{countryCode:"RU",region:"RU"},{countryCode:"SA",region:"AE"},{countryCode:"SA",region:"SA"},{countryCode:"VN",region:"VN"}],checksumType:0,requestStyle:1,deviceSKUWhitelist:[],baseURL:"https://gspe19-ssl.ls.apple.com/tile.vf?flags=8",dataSet:0,supportsMultipathTCP:!1},{style:1,validVersion:[{identifier:16030619,availableTiles:[{minX:0,minY:0,maxX:1,maxY:1,minZ:1,maxZ:1},{minX:0,minY:0,maxX:3,maxY:3,minZ:2,maxZ:2},{minX:0,minY:0,maxX:7,maxY:7,minZ:3,maxZ:3},{minX:0,minY:0,maxX:15,maxY:15,minZ:4,maxZ:4},{minX:0,minY:0,maxX:31,maxY:31,minZ:5,maxZ:5},{minX:0,minY:0,maxX:63,maxY:63,minZ:6,maxZ:6},{minX:0,minY:0,maxX:127,maxY:127,minZ:7,maxZ:7},{minX:0,minY:0,maxX:255,maxY:255,minZ:8,maxZ:8},{minX:0,minY:0,maxX:1023,maxY:1023,minZ:10,maxZ:10},{minX:0,minY:0,maxX:4095,maxY:4095,minZ:12,maxZ:12},{minX:0,minY:0,maxX:16383,maxY:16383,minZ:14,maxZ:14}],genericTile:[],supportedLanguagesVersion:1}],scale:0,size:2,supportedLanguage:[{identifier:1,language:["ar","ca","cs","da","de","el","en","en-AU","en-GB","es","es-MX","es-US","fi","fr","fr-CA","he","hi","hr","hu","id","it","ja","ko","ms","nb","nl","pl","pt","pt-PT","ro","ru","sk","sv","th","tr","uk","vi","zh-Hans","zh-Hant","zh-HK"]}],countryRegionWhitelist:[{countryCode:"AE",region:"AE"},{countryCode:"AE",region:"SA"},{countryCode:"IN",region:""},{countryCode:"JP",region:"JP"},{countryCode:"KR",region:"KR"},{countryCode:"MA",region:"MA"},{countryCode:"RU",region:"RU"},{countryCode:"SA",region:"AE"},{countryCode:"SA",region:"SA"},{countryCode:"VN",region:"VN"}],checksumType:0,requestStyle:1,deviceSKUWhitelist:[],baseURL:"https://gspe19-kittyhawk-ssl.ls.apple.com/tile.vf?flags=8",dataSet:1,supportsMultipathTCP:!1},{style:7,validVersion:[{identifier:9711,availableTiles:[{minX:0,minY:0,maxX:1,maxY:1,minZ:1,maxZ:22}],genericTile:[{tileType:2,textureIndex:0,resourceIndex:1971}]}],scale:1,size:1,supportedLanguage:[],countryRegionWhitelist:[],checksumType:0,requestStyle:0,deviceSKUWhitelist:[],baseURL:"https://gspe11-ssl.ls.apple.com/tile",supportsMultipathTCP:!1},{style:7,validVersion:[{identifier:9711,availableTiles:[{minX:0,minY:0,maxX:1,maxY:1,minZ:1,maxZ:22}],genericTile:[{tileType:2,textureIndex:0,resourceIndex:1971}]}],scale:2,size:1,supportedLanguage:[],countryRegionWhitelist:[],checksumType:0,requestStyle:0,deviceSKUWhitelist:[],baseURL:"https://gspe11-ssl.ls.apple.com/tile",supportsMultipathTCP:!1},{style:11,validVersion:[{identifier:16034178,availableTiles:[{minX:0,minY:0,maxX:8191,maxY:8191,minZ:13,maxZ:13},{minX:0,minY:0,maxX:16383,maxY:16383,minZ:14,maxZ:14},{minX:0,minY:0,maxX:32767,maxY:32767,minZ:15,maxZ:15}],genericTile:[]}],scale:0,size:2,supportedLanguage:[],countryRegionWhitelist:[],checksumType:0,requestStyle:1,deviceSKUWhitelist:[],baseURL:"https://gspe19-ssl.ls.apple.com/tile.vf?flags=1",dataSet:0,supportsMultipathTCP:!1},{style:11,validVersion:[{identifier:16030619,availableTiles:[{minX:0,minY:0,maxX:8191,maxY:8191,minZ:13,maxZ:13},{minX:0,minY:0,maxX:16383,maxY:16383,minZ:14,maxZ:14},{minX:0,minY:0,maxX:32767,maxY:32767,minZ:15,maxZ:15}],genericTile:[]}],scale:0,size:2,supportedLanguage:[],countryRegionWhitelist:[],checksumType:0,requestStyle:1,deviceSKUWhitelist:[],baseURL:"https://gspe19-kittyhawk-ssl.ls.apple.com/tile.vf?flags=1",dataSet:1,supportsMultipathTCP:!1},{style:12,validVersion:[{identifier:16034178,availableTiles:[{minX:0,minY:0,maxX:255,maxY:255,minZ:8,maxZ:8},{minX:0,minY:0,maxX:4095,maxY:4095,minZ:12,maxZ:12}],genericTile:[],timeToLiveSeconds:120}],scale:0,size:2,supportedLanguage:[],countryRegionWhitelist:[],checksumType:0,requestStyle:1,deviceSKUWhitelist:[],baseURL:"https://gspe12-ssl.ls.apple.com/traffic",dataSet:0,supportsMultipathTCP:!1},{style:12,validVersion:[{identifier:16030619,availableTiles:[{minX:0,minY:0,maxX:255,maxY:255,minZ:8,maxZ:8},{minX:0,minY:0,maxX:4095,maxY:4095,minZ:12,maxZ:12}],genericTile:[],timeToLiveSeconds:120}],scale:0,size:2,supportedLanguage:[],countryRegionWhitelist:[],checksumType:0,requestStyle:1,deviceSKUWhitelist:[],baseURL:"https://gspe12-kittyhawk-ssl.ls.apple.com/traffic",dataSet:1,supportsMultipathTCP:!1},{style:13,validVersion:[{identifier:16034178,availableTiles:[{minX:0,minY:0,maxX:1,maxY:1,minZ:1,maxZ:1},{minX:0,minY:0,maxX:3,maxY:3,minZ:2,maxZ:2},{minX:0,minY:0,maxX:15,maxY:15,minZ:4,maxZ:4},{minX:0,minY:0,maxX:63,maxY:63,minZ:6,maxZ:6},{minX:0,minY:0,maxX:127,maxY:127,minZ:7,maxZ:7},{minX:0,minY:0,maxX:255,maxY:255,minZ:8,maxZ:8},{minX:0,minY:0,maxX:511,maxY:511,minZ:9,maxZ:9},{minX:0,minY:0,maxX:1023,maxY:1023,minZ:10,maxZ:10},{minX:0,minY:0,maxX:4095,maxY:4095,minZ:12,maxZ:12},{minX:0,minY:0,maxX:8191,maxY:8191,minZ:13,maxZ:13},{minX:0,minY:0,maxX:16383,maxY:16383,minZ:14,maxZ:14},{minX:0,minY:0,maxX:32767,maxY:32767,minZ:15,maxZ:15},{minX:0,minY:0,maxX:65535,maxY:65535,minZ:16,maxZ:16},{minX:0,minY:0,maxX:131071,maxY:131071,minZ:17,maxZ:17}],genericTile:[],supportedLanguagesVersion:1}],scale:0,size:2,supportedLanguage:[{identifier:1,language:["ar","ca","cs","da","de","el","en","en-AU","en-GB","es","es-MX","es-US","fi","fr","fr-CA","he","hi","hr","hu","id","it","ja","ko","ms","nb","nl","pl","pt","pt-PT","ro","ru","sk","sv","th","tr","uk","vi","zh-Hans","zh-Hant","zh-HK"]}],countryRegionWhitelist:[],checksumType:0,requestStyle:1,deviceSKUWhitelist:[],baseURL:"https://gspe19-ssl.ls.apple.com/tile.vf?flags=2",dataSet:0,supportsMultipathTCP:!1},{style:13,validVersion:[{identifier:16030619,availableTiles:[{minX:0,minY:0,maxX:1,maxY:1,minZ:1,maxZ:1},{minX:0,minY:0,maxX:3,maxY:3,minZ:2,maxZ:2},{minX:0,minY:0,maxX:15,maxY:15,minZ:4,maxZ:4},{minX:0,minY:0,maxX:63,maxY:63,minZ:6,maxZ:6},{minX:0,minY:0,maxX:127,maxY:127,minZ:7,maxZ:7},{minX:0,minY:0,maxX:255,maxY:255,minZ:8,maxZ:8},{minX:0,minY:0,maxX:511,maxY:511,minZ:9,maxZ:9},{minX:0,minY:0,maxX:1023,maxY:1023,minZ:10,maxZ:10},{minX:0,minY:0,maxX:4095,maxY:4095,minZ:12,maxZ:12},{minX:0,minY:0,maxX:8191,maxY:8191,minZ:13,maxZ:13},{minX:0,minY:0,maxX:16383,maxY:16383,minZ:14,maxZ:14},{minX:0,minY:0,maxX:32767,maxY:32767,minZ:15,maxZ:15},{minX:0,minY:0,maxX:65535,maxY:65535,minZ:16,maxZ:16},{minX:0,minY:0,maxX:131071,maxY:131071,minZ:17,maxZ:17}],genericTile:[],supportedLanguagesVersion:1}],scale:0,size:2,supportedLanguage:[{identifier:1,language:["ar","ca","cs","da","de","el","en","en-AU","en-GB","es","es-MX","es-US","fi","fr","fr-CA","he","hi","hr","hu","id","it","ja","ko","ms","nb","nl","pl","pt","pt-PT","ro","ru","sk","sv","th","tr","uk","vi","zh-Hans","zh-Hant","zh-HK"]}],countryRegionWhitelist:[],checksumType:0,requestStyle:1,deviceSKUWhitelist:[],baseURL:"https://gspe19-kittyhawk-ssl.ls.apple.com/tile.vf?flags=2",dataSet:1,supportsMultipathTCP:!1},{style:14,validVersion:[{identifier:1,availableTiles:[],genericTile:[]}],scale:0,size:2,supportedLanguage:[],countryRegionWhitelist:[],checksumType:0,requestStyle:0,deviceSKUWhitelist:[],baseURL:"https://gspe11-ssl.ls.apple.com/tile",supportsMultipathTCP:!1},{style:15,validVersion:[{identifier:1,availableTiles:[],genericTile:[]}],scale:0,size:2,supportedLanguage:[],countryRegionWhitelist:[],checksumType:0,requestStyle:0,deviceSKUWhitelist:[],baseURL:"https://gspe11-ssl.ls.apple.com/tile",supportsMultipathTCP:!1},{style:16,validVersion:[{identifier:1,availableTiles:[],genericTile:[]}],scale:0,size:2,supportedLanguage:[],countryRegionWhitelist:[],checksumType:0,requestStyle:0,deviceSKUWhitelist:[],baseURL:"https://gspe11-ssl.ls.apple.com/tile",supportsMultipathTCP:!1},{style:17,validVersion:[{identifier:27,availableTiles:[{minX:0,minY:0,maxX:127,maxY:127,minZ:7,maxZ:7},{minX:0,minY:0,maxX:2047,maxY:2047,minZ:11,maxZ:11},{minX:408,minY:2760,maxX:2583,maxY:3659,minZ:13,maxZ:13},{minX:3848,minY:2332,maxX:4535,maxY:3235,minZ:13,maxZ:13}],genericTile:[]}],scale:1,size:1,supportedLanguage:[],countryRegionWhitelist:[],checksumType:0,requestStyle:0,deviceSKUWhitelist:[],baseURL:"https://gspe11-ssl.ls.apple.com/tile",supportsMultipathTCP:!1},{style:18,validVersion:[{identifier:16034178,availableTiles:[{minX:0,minY:0,maxX:32767,maxY:32767,minZ:15,maxZ:15}],genericTile:[],supportedLanguagesVersion:1}],scale:0,size:2,supportedLanguage:[{identifier:1,language:["ar","ca","cs","da","de","el","en","en-AU","en-GB","es","es-MX","es-US","fi","fr","fr-CA","he","hi","hr","hu","id","it","ja","ko","ms","nb","nl","pl","pt","pt-PT","ro","ru","sk","sv","th","tr","uk","vi","zh-Hans","zh-Hant","zh-HK"]}],countryRegionWhitelist:[],checksumType:0,requestStyle:1,deviceSKUWhitelist:[],baseURL:"https://gspe19-ssl.ls.apple.com/tile.vf",dataSet:0,supportsMultipathTCP:!1},{style:18,validVersion:[{identifier:16030619,availableTiles:[{minX:0,minY:0,maxX:32767,maxY:32767,minZ:15,maxZ:15}],genericTile:[],supportedLanguagesVersion:1}],scale:0,size:2,supportedLanguage:[{identifier:1,language:["ar","ca","cs","da","de","el","en","en-AU","en-GB","es","es-MX","es-US","fi","fr","fr-CA","he","hi","hr","hu","id","it","ja","ko","ms","nb","nl","pl","pt","pt-PT","ro","ru","sk","sv","th","tr","uk","vi","zh-Hans","zh-Hant","zh-HK"]}],countryRegionWhitelist:[],checksumType:0,requestStyle:1,deviceSKUWhitelist:[],baseURL:"https://gspe19-kittyhawk-ssl.ls.apple.com/tile.vf",dataSet:1,supportsMultipathTCP:!1},{style:20,validVersion:[{identifier:16034178,availableTiles:[{minX:0,minY:0,maxX:1,maxY:1,minZ:1,maxZ:1},{minX:0,minY:0,maxX:3,maxY:3,minZ:2,maxZ:2},{minX:0,minY:0,maxX:7,maxY:7,minZ:3,maxZ:3},{minX:0,minY:0,maxX:15,maxY:15,minZ:4,maxZ:4},{minX:0,minY:0,maxX:31,maxY:31,minZ:5,maxZ:5},{minX:0,minY:0,maxX:63,maxY:63,minZ:6,maxZ:6},{minX:0,minY:0,maxX:127,maxY:127,minZ:7,maxZ:7},{minX:0,minY:0,maxX:255,maxY:255,minZ:8,maxZ:8},{minX:0,minY:0,maxX:511,maxY:511,minZ:9,maxZ:9},{minX:0,minY:0,maxX:1023,maxY:1023,minZ:10,maxZ:10},{minX:0,minY:0,maxX:2047,maxY:2047,minZ:11,maxZ:11},{minX:0,minY:0,maxX:4095,maxY:4095,minZ:12,maxZ:12},{minX:0,minY:0,maxX:8191,maxY:8191,minZ:13,maxZ:13},{minX:0,minY:0,maxX:16383,maxY:16383,minZ:14,maxZ:14},{minX:0,minY:0,maxX:32767,maxY:32767,minZ:15,maxZ:15}],genericTile:[],supportedLanguagesVersion:1}],scale:0,size:2,supportedLanguage:[{identifier:1,language:["ar","ca","cs","da","de","el","en","en-AU","en-GB","es","es-MX","es-US","fi","fr","fr-CA","he","hi","hr","hu","id","it","ja","ko","ms","nb","nl","pl","pt","pt-PT","ro","ru","sk","sv","th","tr","uk","vi","zh-Hans","zh-Hant","zh-HK"]}],countryRegionWhitelist:[{countryCode:"AE",region:"AE"},{countryCode:"AE",region:"SA"},{countryCode:"IN",region:""},{countryCode:"JP",region:"JP"},{countryCode:"KR",region:"KR"},{countryCode:"MA",region:"MA"},{countryCode:"RU",region:"RU"},{countryCode:"SA",region:"AE"},{countryCode:"SA",region:"SA"},{countryCode:"VN",region:"VN"}],checksumType:0,requestStyle:1,deviceSKUWhitelist:[],baseURL:"https://gspe19-ssl.ls.apple.com/tile.vf",dataSet:0,supportsMultipathTCP:!1},{style:20,validVersion:[{identifier:16030619,availableTiles:[{minX:0,minY:0,maxX:1,maxY:1,minZ:1,maxZ:1},{minX:0,minY:0,maxX:3,maxY:3,minZ:2,maxZ:2},{minX:0,minY:0,maxX:7,maxY:7,minZ:3,maxZ:3},{minX:0,minY:0,maxX:15,maxY:15,minZ:4,maxZ:4},{minX:0,minY:0,maxX:31,maxY:31,minZ:5,maxZ:5},{minX:0,minY:0,maxX:63,maxY:63,minZ:6,maxZ:6},{minX:0,minY:0,maxX:127,maxY:127,minZ:7,maxZ:7},{minX:0,minY:0,maxX:255,maxY:255,minZ:8,maxZ:8},{minX:0,minY:0,maxX:511,maxY:511,minZ:9,maxZ:9},{minX:0,minY:0,maxX:1023,maxY:1023,minZ:10,maxZ:10},{minX:0,minY:0,maxX:2047,maxY:2047,minZ:11,maxZ:11},{minX:0,minY:0,maxX:4095,maxY:4095,minZ:12,maxZ:12},{minX:0,minY:0,maxX:8191,maxY:8191,minZ:13,maxZ:13},{minX:0,minY:0,maxX:16383,maxY:16383,minZ:14,maxZ:14},{minX:0,minY:0,maxX:32767,maxY:32767,minZ:15,maxZ:15}],genericTile:[],supportedLanguagesVersion:1}],scale:0,size:2,supportedLanguage:[{identifier:1,language:["ar","ca","cs","da","de","el","en","en-AU","en-GB","es","es-MX","es-US","fi","fr","fr-CA","he","hi","hr","hu","id","it","ja","ko","ms","nb","nl","pl","pt","pt-PT","ro","ru","sk","sv","th","tr","uk","vi","zh-Hans","zh-Hant","zh-HK"]}],countryRegionWhitelist:[{countryCode:"AE",region:"AE"},{countryCode:"AE",region:"SA"},{countryCode:"IN",region:""},{countryCode:"JP",region:"JP"},{countryCode:"KR",region:"KR"},{countryCode:"MA",region:"MA"},{countryCode:"RU",region:"RU"},{countryCode:"SA",region:"AE"},{countryCode:"SA",region:"SA"},{countryCode:"VN",region:"VN"}],checksumType:0,requestStyle:1,deviceSKUWhitelist:[],baseURL:"https://gspe19-kittyhawk-ssl.ls.apple.com/tile.vf",dataSet:1,supportsMultipathTCP:!1},{style:22,validVersion:[{identifier:16034178,availableTiles:[{minX:0,minY:0,maxX:127,maxY:127,minZ:7,maxZ:7},{minX:0,minY:0,maxX:255,maxY:255,minZ:8,maxZ:8},{minX:0,minY:0,maxX:511,maxY:511,minZ:9,maxZ:9},{minX:0,minY:0,maxX:1023,maxY:1023,minZ:10,maxZ:10},{minX:0,minY:0,maxX:2047,maxY:2047,minZ:11,maxZ:11},{minX:0,minY:0,maxX:4095,maxY:4095,minZ:12,maxZ:12},{minX:0,minY:0,maxX:8191,maxY:8191,minZ:13,maxZ:13},{minX:0,minY:0,maxX:16383,maxY:16383,minZ:14,maxZ:14},{minX:0,minY:0,maxX:32767,maxY:32767,minZ:15,maxZ:15}],genericTile:[]}],scale:0,size:2,supportedLanguage:[],countryRegionWhitelist:[],checksumType:0,requestStyle:1,deviceSKUWhitelist:[],baseURL:"https://gspe19-ssl.ls.apple.com/tile.vf",dataSet:0,supportsMultipathTCP:!1},{style:22,validVersion:[{identifier:16030619,availableTiles:[{minX:0,minY:0,maxX:127,maxY:127,minZ:7,maxZ:7},{minX:0,minY:0,maxX:255,maxY:255,minZ:8,maxZ:8},{minX:0,minY:0,maxX:511,maxY:511,minZ:9,maxZ:9},{minX:0,minY:0,maxX:1023,maxY:1023,minZ:10,maxZ:10},{minX:0,minY:0,maxX:2047,maxY:2047,minZ:11,maxZ:11},{minX:0,minY:0,maxX:4095,maxY:4095,minZ:12,maxZ:12},{minX:0,minY:0,maxX:8191,maxY:8191,minZ:13,maxZ:13},{minX:0,minY:0,maxX:16383,maxY:16383,minZ:14,maxZ:14},{minX:0,minY:0,maxX:32767,maxY:32767,minZ:15,maxZ:15}],genericTile:[]}],scale:0,size:2,supportedLanguage:[],countryRegionWhitelist:[],checksumType:0,requestStyle:1,deviceSKUWhitelist:[],baseURL:"https://gspe19-kittyhawk-ssl.ls.apple.com/tile.vf",dataSet:1,supportsMultipathTCP:!1},{style:30,validVersion:[{identifier:16034178,availableTiles:[{minX:0,minY:0,maxX:1023,maxY:1023,minZ:10,maxZ:10},{minX:0,minY:0,maxX:32767,maxY:32767,minZ:15,maxZ:15},{minX:0,minY:0,maxX:262143,maxY:262143,minZ:18,maxZ:18}],genericTile:[],supportedLanguagesVersion:1}],scale:0,size:2,supportedLanguage:[{identifier:1,language:["ar","ca","cs","da","de","el","en","en-AU","en-GB","es","es-MX","es-US","fi","fr","fr-CA","he","hi","hr","hu","id","it","ja","ko","ms","nb","nl","pl","pt","pt-PT","ro","ru","sk","sv","th","tr","uk","vi","zh-Hans","zh-Hant","zh-HK"]}],countryRegionWhitelist:[],checksumType:0,requestStyle:1,deviceSKUWhitelist:[],baseURL:"https://gspe19-ssl.ls.apple.com/tile.vf",dataSet:0,supportsMultipathTCP:!1},{style:30,validVersion:[{identifier:16030619,availableTiles:[{minX:0,minY:0,maxX:1023,maxY:1023,minZ:10,maxZ:10},{minX:0,minY:0,maxX:32767,maxY:32767,minZ:15,maxZ:15},{minX:0,minY:0,maxX:262143,maxY:262143,minZ:18,maxZ:18}],genericTile:[],supportedLanguagesVersion:1}],scale:0,size:2,supportedLanguage:[{identifier:1,language:["ar","ca","cs","da","de","el","en","en-AU","en-GB","es","es-MX","es-US","fi","fr","fr-CA","he","hi","hr","hu","id","it","ja","ko","ms","nb","nl","pl","pt","pt-PT","ro","ru","sk","sv","th","tr","uk","vi","zh-Hans","zh-Hant","zh-HK"]}],countryRegionWhitelist:[],checksumType:0,requestStyle:1,deviceSKUWhitelist:[],baseURL:"https://gspe19-kittyhawk-ssl.ls.apple.com/tile.vf",dataSet:1,supportsMultipathTCP:!1},{style:33,validVersion:[{identifier:4,availableTiles:[{minX:0,minY:0,maxX:1,maxY:1,minZ:1,maxZ:7}],genericTile:[]}],scale:1,size:1,supportedLanguage:[],countryRegionWhitelist:[],checksumType:0,requestStyle:0,deviceSKUWhitelist:[],baseURL:"https://gspe11-ssl.ls.apple.com/tile",supportsMultipathTCP:!1},{style:37,validVersion:[{identifier:16034178,availableTiles:[{minX:0,minY:0,maxX:1,maxY:1,minZ:1,maxZ:1},{minX:0,minY:0,maxX:3,maxY:3,minZ:2,maxZ:2},{minX:0,minY:0,maxX:7,maxY:7,minZ:3,maxZ:3},{minX:0,minY:0,maxX:31,maxY:31,minZ:5,maxZ:5},{minX:0,minY:0,maxX:127,maxY:127,minZ:7,maxZ:7},{minX:0,minY:0,maxX:511,maxY:511,minZ:9,maxZ:9},{minX:0,minY:0,maxX:1023,maxY:1023,minZ:10,maxZ:10},{minX:0,minY:0,maxX:2047,maxY:2047,minZ:11,maxZ:11},{minX:0,minY:0,maxX:8191,maxY:8191,minZ:13,maxZ:13},{minX:0,minY:0,maxX:16383,maxY:16383,minZ:14,maxZ:14},{minX:0,minY:0,maxX:32767,maxY:32767,minZ:15,maxZ:15}],genericTile:[],supportedLanguagesVersion:1}],scale:0,size:2,supportedLanguage:[{identifier:1,language:["ar","ca","cs","da","de","el","en","en-AU","en-GB","es","es-MX","es-US","fi","fr","fr-CA","he","hi","hr","hu","id","it","ja","ko","ms","nb","nl","pl","pt","pt-PT","ro","ru","sk","sv","th","tr","uk","vi","zh-Hans","zh-Hant","zh-HK"]}],countryRegionWhitelist:[],checksumType:0,requestStyle:1,deviceSKUWhitelist:[],baseURL:"https://gspe19-ssl.ls.apple.com/tile.vf?flags=2",dataSet:0,supportsMultipathTCP:!1},{style:37,validVersion:[{identifier:16030619,availableTiles:[{minX:0,minY:0,maxX:1,maxY:1,minZ:1,maxZ:1},{minX:0,minY:0,maxX:3,maxY:3,minZ:2,maxZ:2},{minX:0,minY:0,maxX:7,maxY:7,minZ:3,maxZ:3},{minX:0,minY:0,maxX:31,maxY:31,minZ:5,maxZ:5},{minX:0,minY:0,maxX:127,maxY:127,minZ:7,maxZ:7},{minX:0,minY:0,maxX:511,maxY:511,minZ:9,maxZ:9},{minX:0,minY:0,maxX:1023,maxY:1023,minZ:10,maxZ:10},{minX:0,minY:0,maxX:2047,maxY:2047,minZ:11,maxZ:11},{minX:0,minY:0,maxX:8191,maxY:8191,minZ:13,maxZ:13},{minX:0,minY:0,maxX:16383,maxY:16383,minZ:14,maxZ:14},{minX:0,minY:0,maxX:32767,maxY:32767,minZ:15,maxZ:15}],genericTile:[],supportedLanguagesVersion:1}],scale:0,size:2,supportedLanguage:[{identifier:1,language:["ar","ca","cs","da","de","el","en","en-AU","en-GB","es","es-MX","es-US","fi","fr","fr-CA","he","hi","hr","hu","id","it","ja","ko","ms","nb","nl","pl","pt","pt-PT","ro","ru","sk","sv","th","tr","uk","vi","zh-Hans","zh-Hant","zh-HK"]}],countryRegionWhitelist:[],checksumType:0,requestStyle:1,deviceSKUWhitelist:[],baseURL:"https://gspe19-kittyhawk-ssl.ls.apple.com/tile.vf?flags=2",dataSet:1,supportsMultipathTCP:!1},{style:42,validVersion:[{identifier:1,availableTiles:[],genericTile:[]}],scale:0,size:2,supportedLanguage:[],countryRegionWhitelist:[],checksumType:0,requestStyle:0,deviceSKUWhitelist:[],baseURL:"https://gspe11-ssl.ls.apple.com/tile",supportsMultipathTCP:!1},{style:43,validVersion:[{identifier:1,availableTiles:[],genericTile:[]}],scale:0,size:2,supportedLanguage:[],countryRegionWhitelist:[],checksumType:0,requestStyle:0,deviceSKUWhitelist:[],baseURL:"https://gspe11-ssl.ls.apple.com/tile",supportsMultipathTCP:!1},{style:44,validVersion:[{identifier:1,availableTiles:[],genericTile:[]}],scale:0,size:2,supportedLanguage:[],countryRegionWhitelist:[],checksumType:0,requestStyle:0,deviceSKUWhitelist:[],baseURL:"https://gspe11-ssl.ls.apple.com/tile",supportsMultipathTCP:!1},{style:47,validVersion:[{identifier:16034178,availableTiles:[{minX:0,minY:0,maxX:1,maxY:1,minZ:1,maxZ:1},{minX:0,minY:0,maxX:3,maxY:3,minZ:2,maxZ:2},{minX:0,minY:0,maxX:7,maxY:7,minZ:3,maxZ:3},{minX:0,minY:0,maxX:31,maxY:31,minZ:5,maxZ:5},{minX:0,minY:0,maxX:127,maxY:127,minZ:7,maxZ:7},{minX:0,minY:0,maxX:511,maxY:511,minZ:9,maxZ:9},{minX:0,minY:0,maxX:1023,maxY:1023,minZ:10,maxZ:10},{minX:0,minY:0,maxX:2047,maxY:2047,minZ:11,maxZ:11},{minX:0,minY:0,maxX:8191,maxY:8191,minZ:13,maxZ:13},{minX:0,minY:0,maxX:16383,maxY:16383,minZ:14,maxZ:14},{minX:0,minY:0,maxX:32767,maxY:32767,minZ:15,maxZ:15}],genericTile:[],supportedLanguagesVersion:1}],scale:0,size:2,supportedLanguage:[{identifier:1,language:["ar","ca","cs","da","de","el","en","en-AU","en-GB","es","es-MX","es-US","fi","fr","fr-CA","he","hi","hr","hu","id","it","ja","ko","ms","nb","nl","pl","pt","pt-PT","ro","ru","sk","sv","th","tr","uk","vi","zh-Hans","zh-Hant","zh-HK"]}],countryRegionWhitelist:[],checksumType:0,requestStyle:1,deviceSKUWhitelist:[],baseURL:"https://gspe19-ssl.ls.apple.com/tile.vf",dataSet:0,supportsMultipathTCP:!1},{style:47,validVersion:[{identifier:16030619,availableTiles:[{minX:0,minY:0,maxX:1,maxY:1,minZ:1,maxZ:1},{minX:0,minY:0,maxX:3,maxY:3,minZ:2,maxZ:2},{minX:0,minY:0,maxX:7,maxY:7,minZ:3,maxZ:3},{minX:0,minY:0,maxX:31,maxY:31,minZ:5,maxZ:5},{minX:0,minY:0,maxX:127,maxY:127,minZ:7,maxZ:7},{minX:0,minY:0,maxX:511,maxY:511,minZ:9,maxZ:9},{minX:0,minY:0,maxX:1023,maxY:1023,minZ:10,maxZ:10},{minX:0,minY:0,maxX:2047,maxY:2047,minZ:11,maxZ:11},{minX:0,minY:0,maxX:8191,maxY:8191,minZ:13,maxZ:13},{minX:0,minY:0,maxX:16383,maxY:16383,minZ:14,maxZ:14},{minX:0,minY:0,maxX:32767,maxY:32767,minZ:15,maxZ:15}],genericTile:[],supportedLanguagesVersion:1}],scale:0,size:2,supportedLanguage:[{identifier:1,language:["ar","ca","cs","da","de","el","en","en-AU","en-GB","es","es-MX","es-US","fi","fr","fr-CA","he","hi","hr","hu","id","it","ja","ko","ms","nb","nl","pl","pt","pt-PT","ro","ru","sk","sv","th","tr","uk","vi","zh-Hans","zh-Hant","zh-HK"]}],countryRegionWhitelist:[],checksumType:0,requestStyle:1,deviceSKUWhitelist:[],baseURL:"https://gspe19-kittyhawk-ssl.ls.apple.com/tile.vf",dataSet:1,supportsMultipathTCP:!1},{style:48,validVersion:[{identifier:11201196,availableTiles:[{minX:0,minY:0,maxX:4095,maxY:4095,minZ:12,maxZ:12},{minX:0,minY:0,maxX:32767,maxY:32767,minZ:15,maxZ:15}],genericTile:[]}],scale:0,size:2,supportedLanguage:[],countryRegionWhitelist:[],checksumType:0,requestStyle:1,deviceSKUWhitelist:[],baseURL:"https://gspe19-ssl.ls.apple.com/tile.vf",dataSet:0,supportsMultipathTCP:!1},{style:48,validVersion:[{identifier:11201196,availableTiles:[{minX:0,minY:0,maxX:4095,maxY:4095,minZ:12,maxZ:12},{minX:0,minY:0,maxX:32767,maxY:32767,minZ:15,maxZ:15}],genericTile:[]}],scale:0,size:2,supportedLanguage:[],countryRegionWhitelist:[],checksumType:0,requestStyle:1,deviceSKUWhitelist:[],baseURL:"https://gspe19-kittyhawk-ssl.ls.apple.com/tile.vf",dataSet:1,supportsMultipathTCP:!1},{style:52,validVersion:[{identifier:1,availableTiles:[],genericTile:[]}],scale:0,size:2,supportedLanguage:[],countryRegionWhitelist:[],checksumType:0,requestStyle:0,deviceSKUWhitelist:[],baseURL:"https://gspe11-ssl.ls.apple.com/tile",supportsMultipathTCP:!1},{style:53,validVersion:[{identifier:16034178,availableTiles:[{minX:0,minY:0,maxX:32767,maxY:32767,minZ:15,maxZ:15}],genericTile:[],supportedLanguagesVersion:1}],scale:0,size:2,supportedLanguage:[{identifier:1,language:["ar","ca","cs","da","de","el","en","en-AU","en-GB","es","es-MX","es-US","fi","fr","fr-CA","he","hi","hr","hu","id","it","ja","ko","ms","nb","nl","pl","pt","pt-PT","ro","ru","sk","sv","th","tr","uk","vi","zh-Hans","zh-Hant","zh-HK"]}],countryRegionWhitelist:[],checksumType:0,requestStyle:1,deviceSKUWhitelist:[],baseURL:"https://gspe19-ssl.ls.apple.com/tile.vf",dataSet:0,supportsMultipathTCP:!1},{style:53,validVersion:[{identifier:16030619,availableTiles:[{minX:0,minY:0,maxX:32767,maxY:32767,minZ:15,maxZ:15}],genericTile:[],supportedLanguagesVersion:1}],scale:0,size:2,supportedLanguage:[{identifier:1,language:["ar","ca","cs","da","de","el","en","en-AU","en-GB","es","es-MX","es-US","fi","fr","fr-CA","he","hi","hr","hu","id","it","ja","ko","ms","nb","nl","pl","pt","pt-PT","ro","ru","sk","sv","th","tr","uk","vi","zh-Hans","zh-Hant","zh-HK"]}],countryRegionWhitelist:[],checksumType:0,requestStyle:1,deviceSKUWhitelist:[],baseURL:"https://gspe19-kittyhawk-ssl.ls.apple.com/tile.vf",dataSet:1,supportsMultipathTCP:!1},{style:54,validVersion:[{identifier:13658945,availableTiles:[{minX:0,minY:0,maxX:8191,maxY:8191,minZ:13,maxZ:13},{minX:0,minY:0,maxX:32767,maxY:32767,minZ:15,maxZ:15}],genericTile:[]}],scale:0,size:2,supportedLanguage:[],countryRegionWhitelist:[],checksumType:0,requestStyle:1,deviceSKUWhitelist:[],baseURL:"https://gspe19-ssl.ls.apple.com/tile.vf",dataSet:0,supportsMultipathTCP:!1},{style:54,validVersion:[{identifier:13659050,availableTiles:[{minX:0,minY:0,maxX:8191,maxY:8191,minZ:13,maxZ:13},{minX:0,minY:0,maxX:32767,maxY:32767,minZ:15,maxZ:15}],genericTile:[]}],scale:0,size:2,supportedLanguage:[],countryRegionWhitelist:[],checksumType:0,requestStyle:1,deviceSKUWhitelist:[],baseURL:"https://gspe19-kittyhawk-ssl.ls.apple.com/tile.vf",dataSet:1,supportsMultipathTCP:!1},{style:56,validVersion:[{identifier:16034178,availableTiles:[{minX:0,minY:0,maxX:131071,maxY:131071,minZ:17,maxZ:17}],genericTile:[],supportedLanguagesVersion:1}],scale:0,size:2,supportedLanguage:[{identifier:1,language:["ar","ca","cs","da","de","el","en","en-AU","en-GB","es","es-MX","es-US","fi","fr","fr-CA","he","hi","hr","hu","id","it","ja","ko","ms","nb","nl","pl","pt","pt-PT","ro","ru","sk","sv","th","tr","uk","vi","zh-Hans","zh-Hant","zh-HK"]}],countryRegionWhitelist:[],checksumType:0,requestStyle:0,deviceSKUWhitelist:[],baseURL:"https://gspe19-ssl.ls.apple.com/tile.vf",dataSet:0,supportsMultipathTCP:!1},{style:56,validVersion:[{identifier:16030619,availableTiles:[{minX:0,minY:0,maxX:131071,maxY:131071,minZ:17,maxZ:17}],genericTile:[],supportedLanguagesVersion:1}],scale:0,size:2,supportedLanguage:[{identifier:1,language:["ar","ca","cs","da","de","el","en","en-AU","en-GB","es","es-MX","es-US","fi","fr","fr-CA","he","hi","hr","hu","id","it","ja","ko","ms","nb","nl","pl","pt","pt-PT","ro","ru","sk","sv","th","tr","uk","vi","zh-Hans","zh-Hant","zh-HK"]}],countryRegionWhitelist:[],checksumType:0,requestStyle:0,deviceSKUWhitelist:[],baseURL:"https://gspe19-kittyhawk-ssl.ls.apple.com/tile.vf",dataSet:1,supportsMultipathTCP:!1},{style:57,validVersion:[{identifier:0,availableTiles:[{minX:0,minY:0,maxX:131071,maxY:131071,minZ:17,maxZ:17}],genericTile:[],timeToLiveSeconds:3600}],scale:0,size:2,supportedLanguage:[],countryRegionWhitelist:[],checksumType:0,requestStyle:1,deviceSKUWhitelist:[],baseURL:"https://gspe76-ssl.ls.apple.com/api/tile",supportsMultipathTCP:!1},{style:58,validVersion:[{identifier:16034178,availableTiles:[{minX:0,minY:0,maxX:1,maxY:1,minZ:1,maxZ:1},{minX:0,minY:0,maxX:3,maxY:3,minZ:2,maxZ:2},{minX:0,minY:0,maxX:7,maxY:7,minZ:3,maxZ:3},{minX:0,minY:0,maxX:15,maxY:15,minZ:4,maxZ:4},{minX:0,minY:0,maxX:31,maxY:31,minZ:5,maxZ:5},{minX:0,minY:0,maxX:63,maxY:63,minZ:6,maxZ:6},{minX:0,minY:0,maxX:127,maxY:127,minZ:7,maxZ:7},{minX:0,minY:0,maxX:255,maxY:255,minZ:8,maxZ:8},{minX:0,minY:0,maxX:511,maxY:511,minZ:9,maxZ:9},{minX:0,minY:0,maxX:1023,maxY:1023,minZ:10,maxZ:10},{minX:0,minY:0,maxX:2047,maxY:2047,minZ:11,maxZ:11},{minX:0,minY:0,maxX:4095,maxY:4095,minZ:12,maxZ:12},{minX:0,minY:0,maxX:8191,maxY:8191,minZ:13,maxZ:13},{minX:0,minY:0,maxX:16383,maxY:16383,minZ:14,maxZ:14},{minX:0,minY:0,maxX:32767,maxY:32767,minZ:15,maxZ:15},{minX:0,minY:0,maxX:65535,maxY:65535,minZ:16,maxZ:16},{minX:0,minY:0,maxX:131071,maxY:131071,minZ:17,maxZ:17}],genericTile:[]}],scale:0,size:2,supportedLanguage:[],countryRegionWhitelist:[],checksumType:0,requestStyle:0,deviceSKUWhitelist:[],baseURL:"https://gspe19-ssl.ls.apple.com/tile.vf",dataSet:0,supportsMultipathTCP:!1},{style:58,validVersion:[{identifier:16030619,availableTiles:[{minX:0,minY:0,maxX:1,maxY:1,minZ:1,maxZ:1},{minX:0,minY:0,maxX:3,maxY:3,minZ:2,maxZ:2},{minX:0,minY:0,maxX:7,maxY:7,minZ:3,maxZ:3},{minX:0,minY:0,maxX:15,maxY:15,minZ:4,maxZ:4},{minX:0,minY:0,maxX:31,maxY:31,minZ:5,maxZ:5},{minX:0,minY:0,maxX:63,maxY:63,minZ:6,maxZ:6},{minX:0,minY:0,maxX:127,maxY:127,minZ:7,maxZ:7},{minX:0,minY:0,maxX:255,maxY:255,minZ:8,maxZ:8},{minX:0,minY:0,maxX:511,maxY:511,minZ:9,maxZ:9},{minX:0,minY:0,maxX:1023,maxY:1023,minZ:10,maxZ:10},{minX:0,minY:0,maxX:2047,maxY:2047,minZ:11,maxZ:11},{minX:0,minY:0,maxX:4095,maxY:4095,minZ:12,maxZ:12},{minX:0,minY:0,maxX:8191,maxY:8191,minZ:13,maxZ:13},{minX:0,minY:0,maxX:16383,maxY:16383,minZ:14,maxZ:14},{minX:0,minY:0,maxX:32767,maxY:32767,minZ:15,maxZ:15},{minX:0,minY:0,maxX:65535,maxY:65535,minZ:16,maxZ:16},{minX:0,minY:0,maxX:131071,maxY:131071,minZ:17,maxZ:17}],genericTile:[]}],scale:0,size:2,supportedLanguage:[],countryRegionWhitelist:[],checksumType:0,requestStyle:0,deviceSKUWhitelist:[],baseURL:"https://gspe19-kittyhawk-ssl.ls.apple.com/tile.vf",dataSet:1,supportsMultipathTCP:!1},{style:59,validVersion:[{identifier:16034178,availableTiles:[{minX:0,minY:0,maxX:1,maxY:1,minZ:1,maxZ:1}],genericTile:[]}],scale:0,size:2,supportedLanguage:[],countryRegionWhitelist:[],checksumType:0,requestStyle:0,deviceSKUWhitelist:[],baseURL:"https://gspe19-ssl.ls.apple.com/asset/v3/model",dataSet:0,supportsMultipathTCP:!1},{style:59,validVersion:[{identifier:16030619,availableTiles:[{minX:0,minY:0,maxX:1,maxY:1,minZ:1,maxZ:1}],genericTile:[]}],scale:0,size:2,supportedLanguage:[],countryRegionWhitelist:[],checksumType:0,requestStyle:0,deviceSKUWhitelist:[],baseURL:"https://gspe19-kittyhawk-ssl.ls.apple.com/asset/v3/model",dataSet:1,supportsMultipathTCP:!1},{style:60,validVersion:[{identifier:16034178,availableTiles:[{minX:0,minY:0,maxX:1,maxY:1,minZ:1,maxZ:1},{minX:0,minY:0,maxX:3,maxY:3,minZ:2,maxZ:2},{minX:0,minY:0,maxX:7,maxY:7,minZ:3,maxZ:3},{minX:0,minY:0,maxX:15,maxY:15,minZ:4,maxZ:4},{minX:0,minY:0,maxX:31,maxY:31,minZ:5,maxZ:5},{minX:0,minY:0,maxX:63,maxY:63,minZ:6,maxZ:6},{minX:0,minY:0,maxX:127,maxY:127,minZ:7,maxZ:7},{minX:0,minY:0,maxX:255,maxY:255,minZ:8,maxZ:8},{minX:0,minY:0,maxX:511,maxY:511,minZ:9,maxZ:9}],genericTile:[]}],scale:0,size:2,supportedLanguage:[],countryRegionWhitelist:[],checksumType:0,requestStyle:0,deviceSKUWhitelist:[],baseURL:"https://gspe19-ssl.ls.apple.com/asset/v3/material",dataSet:0,supportsMultipathTCP:!1},{style:60,validVersion:[{identifier:16030619,availableTiles:[{minX:0,minY:0,maxX:1,maxY:1,minZ:1,maxZ:1},{minX:0,minY:0,maxX:3,maxY:3,minZ:2,maxZ:2},{minX:0,minY:0,maxX:7,maxY:7,minZ:3,maxZ:3},{minX:0,minY:0,maxX:15,maxY:15,minZ:4,maxZ:4},{minX:0,minY:0,maxX:31,maxY:31,minZ:5,maxZ:5},{minX:0,minY:0,maxX:63,maxY:63,minZ:6,maxZ:6},{minX:0,minY:0,maxX:127,maxY:127,minZ:7,maxZ:7},{minX:0,minY:0,maxX:255,maxY:255,minZ:8,maxZ:8},{minX:0,minY:0,maxX:511,maxY:511,minZ:9,maxZ:9}],genericTile:[]}],scale:0,size:2,supportedLanguage:[],countryRegionWhitelist:[],checksumType:0,requestStyle:0,deviceSKUWhitelist:[],baseURL:"https://gspe19-kittyhawk-ssl.ls.apple.com/asset/v3/material",dataSet:1,supportsMultipathTCP:!1},{style:61,validVersion:[{identifier:16034178,availableTiles:[{minX:0,minY:0,maxX:127,maxY:127,minZ:7,maxZ:7}],genericTile:[]}],scale:0,size:2,supportedLanguage:[],countryRegionWhitelist:[],checksumType:0,requestStyle:0,deviceSKUWhitelist:[],baseURL:"https://gspe19-ssl.ls.apple.com/tile.vf",dataSet:0,supportsMultipathTCP:!1},{style:61,validVersion:[{identifier:16030619,availableTiles:[{minX:0,minY:0,maxX:127,maxY:127,minZ:7,maxZ:7}],genericTile:[]}],scale:0,size:2,supportedLanguage:[],countryRegionWhitelist:[],checksumType:0,requestStyle:0,deviceSKUWhitelist:[],baseURL:"https://gspe19-kittyhawk-ssl.ls.apple.com/tile.vf",dataSet:1,supportsMultipathTCP:!1},{style:62,validVersion:[{identifier:16034178,availableTiles:[{minX:0,minY:0,maxX:4095,maxY:4095,minZ:12,maxZ:12}],genericTile:[]}],scale:0,size:2,supportedLanguage:[],countryRegionWhitelist:[],checksumType:0,requestStyle:0,deviceSKUWhitelist:[],baseURL:"https://gspe19-ssl.ls.apple.com/tile.vf",dataSet:0,supportsMultipathTCP:!1},{style:62,validVersion:[{identifier:16030619,availableTiles:[{minX:0,minY:0,maxX:4095,maxY:4095,minZ:12,maxZ:12}],genericTile:[]}],scale:0,size:2,supportedLanguage:[],countryRegionWhitelist:[],checksumType:0,requestStyle:0,deviceSKUWhitelist:[],baseURL:"https://gspe19-kittyhawk-ssl.ls.apple.com/tile.vf",dataSet:1,supportsMultipathTCP:!1},{style:64,validVersion:[{identifier:16034178,availableTiles:[{minX:0,minY:0,maxX:4095,maxY:4095,minZ:12,maxZ:12}],genericTile:[],supportedLanguagesVersion:1}],scale:0,size:2,supportedLanguage:[{identifier:1,language:["ar","ca","cs","da","de","el","en","en-AU","en-GB","es","es-MX","es-US","fi","fr","fr-CA","he","hi","hr","hu","id","it","ja","ko","ms","nb","nl","pl","pt","pt-PT","ro","ru","sk","sv","th","tr","uk","vi","zh-Hans","zh-Hant","zh-HK"]}],countryRegionWhitelist:[],checksumType:0,requestStyle:0,deviceSKUWhitelist:[],baseURL:"https://gspe19-ssl.ls.apple.com/tile.vf",dataSet:0,supportsMultipathTCP:!1},{style:64,validVersion:[{identifier:16030619,availableTiles:[{minX:0,minY:0,maxX:4095,maxY:4095,minZ:12,maxZ:12}],genericTile:[],supportedLanguagesVersion:1}],scale:0,size:2,supportedLanguage:[{identifier:1,language:["ar","ca","cs","da","de","el","en","en-AU","en-GB","es","es-MX","es-US","fi","fr","fr-CA","he","hi","hr","hu","id","it","ja","ko","ms","nb","nl","pl","pt","pt-PT","ro","ru","sk","sv","th","tr","uk","vi","zh-Hans","zh-Hant","zh-HK"]}],countryRegionWhitelist:[],checksumType:0,requestStyle:0,deviceSKUWhitelist:[],baseURL:"https://gspe19-kittyhawk-ssl.ls.apple.com/tile.vf",dataSet:1,supportsMultipathTCP:!1},{style:65,validVersion:[{identifier:2,availableTiles:[{minX:0,minY:0,maxX:255,maxY:255,minZ:8,maxZ:8}],genericTile:[],timeToLiveSeconds:3600}],scale:0,size:2,supportedLanguage:[],countryRegionWhitelist:[],checksumType:0,requestStyle:1,deviceSKUWhitelist:[],baseURL:"https://gspe79-ssl.ls.apple.com/65/v1",supportsMultipathTCP:!1},{style:66,validVersion:[{identifier:16034178,availableTiles:[{minX:0,minY:0,maxX:1,maxY:1,minZ:1,maxZ:1},{minX:0,minY:0,maxX:3,maxY:3,minZ:2,maxZ:2},{minX:0,minY:0,maxX:7,maxY:7,minZ:3,maxZ:3},{minX:0,minY:0,maxX:15,maxY:15,minZ:4,maxZ:4},{minX:0,minY:0,maxX:31,maxY:31,minZ:5,maxZ:5},{minX:0,minY:0,maxX:63,maxY:63,minZ:6,maxZ:6},{minX:0,minY:0,maxX:127,maxY:127,minZ:7,maxZ:7},{minX:0,minY:0,maxX:255,maxY:255,minZ:8,maxZ:8},{minX:0,minY:0,maxX:511,maxY:511,minZ:9,maxZ:9},{minX:0,minY:0,maxX:1023,maxY:1023,minZ:10,maxZ:10},{minX:0,minY:0,maxX:2047,maxY:2047,minZ:11,maxZ:11},{minX:0,minY:0,maxX:4095,maxY:4095,minZ:12,maxZ:12},{minX:0,minY:0,maxX:8191,maxY:8191,minZ:13,maxZ:13},{minX:0,minY:0,maxX:16383,maxY:16383,minZ:14,maxZ:14},{minX:0,minY:0,maxX:32767,maxY:32767,minZ:15,maxZ:15}],genericTile:[],supportedLanguagesVersion:1}],scale:0,size:2,supportedLanguage:[{identifier:1,language:["ar","ca","cs","da","de","el","en","en-AU","en-GB","es","es-MX","es-US","fi","fr","fr-CA","he","hi","hr","hu","id","it","ja","ko","ms","nb","nl","pl","pt","pt-PT","ro","ru","sk","sv","th","tr","uk","vi","zh-Hans","zh-Hant","zh-HK"]}],countryRegionWhitelist:[{countryCode:"AE",region:"AE"},{countryCode:"AE",region:"SA"},{countryCode:"IN",region:""},{countryCode:"JP",region:"JP"},{countryCode:"KR",region:"KR"},{countryCode:"MA",region:"MA"},{countryCode:"RU",region:"RU"},{countryCode:"SA",region:"AE"},{countryCode:"SA",region:"SA"},{countryCode:"VN",region:"VN"}],checksumType:0,requestStyle:0,deviceSKUWhitelist:[],baseURL:"https://gspe19-ssl.ls.apple.com/tile.vf",dataSet:0,supportsMultipathTCP:!1},{style:66,validVersion:[{identifier:16030619,availableTiles:[{minX:0,minY:0,maxX:1,maxY:1,minZ:1,maxZ:1},{minX:0,minY:0,maxX:3,maxY:3,minZ:2,maxZ:2},{minX:0,minY:0,maxX:7,maxY:7,minZ:3,maxZ:3},{minX:0,minY:0,maxX:15,maxY:15,minZ:4,maxZ:4},{minX:0,minY:0,maxX:31,maxY:31,minZ:5,maxZ:5},{minX:0,minY:0,maxX:63,maxY:63,minZ:6,maxZ:6},{minX:0,minY:0,maxX:127,maxY:127,minZ:7,maxZ:7},{minX:0,minY:0,maxX:255,maxY:255,minZ:8,maxZ:8},{minX:0,minY:0,maxX:511,maxY:511,minZ:9,maxZ:9},{minX:0,minY:0,maxX:1023,maxY:1023,minZ:10,maxZ:10},{minX:0,minY:0,maxX:2047,maxY:2047,minZ:11,maxZ:11},{minX:0,minY:0,maxX:4095,maxY:4095,minZ:12,maxZ:12},{minX:0,minY:0,maxX:8191,maxY:8191,minZ:13,maxZ:13},{minX:0,minY:0,maxX:16383,maxY:16383,minZ:14,maxZ:14},{minX:0,minY:0,maxX:32767,maxY:32767,minZ:15,maxZ:15}],genericTile:[],supportedLanguagesVersion:1}],scale:0,size:2,supportedLanguage:[{identifier:1,language:["ar","ca","cs","da","de","el","en","en-AU","en-GB","es","es-MX","es-US","fi","fr","fr-CA","he","hi","hr","hu","id","it","ja","ko","ms","nb","nl","pl","pt","pt-PT","ro","ru","sk","sv","th","tr","uk","vi","zh-Hans","zh-Hant","zh-HK"]}],countryRegionWhitelist:[{countryCode:"AE",region:"AE"},{countryCode:"AE",region:"SA"},{countryCode:"IN",region:""},{countryCode:"JP",region:"JP"},{countryCode:"KR",region:"KR"},{countryCode:"MA",region:"MA"},{countryCode:"RU",region:"RU"},{countryCode:"SA",region:"AE"},{countryCode:"SA",region:"SA"},{countryCode:"VN",region:"VN"}],checksumType:0,requestStyle:0,deviceSKUWhitelist:[],baseURL:"https://gspe19-kittyhawk-ssl.ls.apple.com/tile.vf",dataSet:1,supportsMultipathTCP:!1},{style:67,validVersion:[{identifier:16034178,availableTiles:[{minX:0,minY:0,maxX:1,maxY:1,minZ:1,maxZ:1},{minX:0,minY:0,maxX:3,maxY:3,minZ:2,maxZ:2},{minX:0,minY:0,maxX:7,maxY:7,minZ:3,maxZ:3},{minX:0,minY:0,maxX:15,maxY:15,minZ:4,maxZ:4},{minX:0,minY:0,maxX:31,maxY:31,minZ:5,maxZ:5},{minX:0,minY:0,maxX:63,maxY:63,minZ:6,maxZ:6},{minX:0,minY:0,maxX:127,maxY:127,minZ:7,maxZ:7},{minX:0,minY:0,maxX:255,maxY:255,minZ:8,maxZ:8},{minX:0,minY:0,maxX:1023,maxY:1023,minZ:10,maxZ:10},{minX:0,minY:0,maxX:4095,maxY:4095,minZ:12,maxZ:12},{minX:0,minY:0,maxX:16383,maxY:16383,minZ:14,maxZ:14}],genericTile:[],supportedLanguagesVersion:1}],scale:0,size:2,supportedLanguage:[{identifier:1,language:["ar","ca","cs","da","de","el","en","en-AU","en-GB","es","es-MX","es-US","fi","fr","fr-CA","he","hi","hr","hu","id","it","ja","ko","ms","nb","nl","pl","pt","pt-PT","ro","ru","sk","sv","th","tr","uk","vi","zh-Hans","zh-Hant","zh-HK"]}],countryRegionWhitelist:[{countryCode:"AE",region:"AE"},{countryCode:"AE",region:"SA"},{countryCode:"IN",region:""},{countryCode:"JP",region:"JP"},{countryCode:"KR",region:"KR"},{countryCode:"MA",region:"MA"},{countryCode:"RU",region:"RU"},{countryCode:"SA",region:"AE"},{countryCode:"SA",region:"SA"},{countryCode:"VN",region:"VN"}],checksumType:0,requestStyle:0,deviceSKUWhitelist:[],baseURL:"https://gspe19-ssl.ls.apple.com/tile.vf",dataSet:0,supportsMultipathTCP:!1},{style:67,validVersion:[{identifier:16030619,availableTiles:[{minX:0,minY:0,maxX:1,maxY:1,minZ:1,maxZ:1},{minX:0,minY:0,maxX:3,maxY:3,minZ:2,maxZ:2},{minX:0,minY:0,maxX:7,maxY:7,minZ:3,maxZ:3},{minX:0,minY:0,maxX:15,maxY:15,minZ:4,maxZ:4},{minX:0,minY:0,maxX:31,maxY:31,minZ:5,maxZ:5},{minX:0,minY:0,maxX:63,maxY:63,minZ:6,maxZ:6},{minX:0,minY:0,maxX:127,maxY:127,minZ:7,maxZ:7},{minX:0,minY:0,maxX:255,maxY:255,minZ:8,maxZ:8},{minX:0,minY:0,maxX:1023,maxY:1023,minZ:10,maxZ:10},{minX:0,minY:0,maxX:4095,maxY:4095,minZ:12,maxZ:12},{minX:0,minY:0,maxX:16383,maxY:16383,minZ:14,maxZ:14}],genericTile:[],supportedLanguagesVersion:1}],scale:0,size:2,supportedLanguage:[{identifier:1,language:["ar","ca","cs","da","de","el","en","en-AU","en-GB","es","es-MX","es-US","fi","fr","fr-CA","he","hi","hr","hu","id","it","ja","ko","ms","nb","nl","pl","pt","pt-PT","ro","ru","sk","sv","th","tr","uk","vi","zh-Hans","zh-Hant","zh-HK"]}],countryRegionWhitelist:[{countryCode:"AE",region:"AE"},{countryCode:"AE",region:"SA"},{countryCode:"IN",region:""},{countryCode:"JP",region:"JP"},{countryCode:"KR",region:"KR"},{countryCode:"MA",region:"MA"},{countryCode:"RU",region:"RU"},{countryCode:"SA",region:"AE"},{countryCode:"SA",region:"SA"},{countryCode:"VN",region:"VN"}],checksumType:0,requestStyle:0,deviceSKUWhitelist:[],baseURL:"https://gspe19-kittyhawk-ssl.ls.apple.com/tile.vf",dataSet:1,supportsMultipathTCP:!1},{style:68,validVersion:[{identifier:16034178,availableTiles:[{minX:0,minY:0,maxX:1,maxY:1,minZ:1,maxZ:1},{minX:0,minY:0,maxX:3,maxY:3,minZ:2,maxZ:2},{minX:0,minY:0,maxX:15,maxY:15,minZ:4,maxZ:4},{minX:0,minY:0,maxX:63,maxY:63,minZ:6,maxZ:6},{minX:0,minY:0,maxX:127,maxY:127,minZ:7,maxZ:7},{minX:0,minY:0,maxX:255,maxY:255,minZ:8,maxZ:8},{minX:0,minY:0,maxX:511,maxY:511,minZ:9,maxZ:9},{minX:0,minY:0,maxX:1023,maxY:1023,minZ:10,maxZ:10},{minX:0,minY:0,maxX:4095,maxY:4095,minZ:12,maxZ:12},{minX:0,minY:0,maxX:8191,maxY:8191,minZ:13,maxZ:13},{minX:0,minY:0,maxX:16383,maxY:16383,minZ:14,maxZ:14},{minX:0,minY:0,maxX:32767,maxY:32767,minZ:15,maxZ:15},{minX:0,minY:0,maxX:65535,maxY:65535,minZ:16,maxZ:16},{minX:0,minY:0,maxX:131071,maxY:131071,minZ:17,maxZ:17}],genericTile:[],supportedLanguagesVersion:1}],scale:0,size:2,supportedLanguage:[{identifier:1,language:["ar","ca","cs","da","de","el","en","en-AU","en-GB","es","es-MX","es-US","fi","fr","fr-CA","he","hi","hr","hu","id","it","ja","ko","ms","nb","nl","pl","pt","pt-PT","ro","ru","sk","sv","th","tr","uk","vi","zh-Hans","zh-Hant","zh-HK"]}],countryRegionWhitelist:[],checksumType:0,requestStyle:0,deviceSKUWhitelist:[],baseURL:"https://gspe19-ssl.ls.apple.com/tile.vf",dataSet:0,supportsMultipathTCP:!1},{style:68,validVersion:[{identifier:16030619,availableTiles:[{minX:0,minY:0,maxX:1,maxY:1,minZ:1,maxZ:1},{minX:0,minY:0,maxX:3,maxY:3,minZ:2,maxZ:2},{minX:0,minY:0,maxX:15,maxY:15,minZ:4,maxZ:4},{minX:0,minY:0,maxX:63,maxY:63,minZ:6,maxZ:6},{minX:0,minY:0,maxX:127,maxY:127,minZ:7,maxZ:7},{minX:0,minY:0,maxX:255,maxY:255,minZ:8,maxZ:8},{minX:0,minY:0,maxX:511,maxY:511,minZ:9,maxZ:9},{minX:0,minY:0,maxX:1023,maxY:1023,minZ:10,maxZ:10},{minX:0,minY:0,maxX:4095,maxY:4095,minZ:12,maxZ:12},{minX:0,minY:0,maxX:8191,maxY:8191,minZ:13,maxZ:13},{minX:0,minY:0,maxX:16383,maxY:16383,minZ:14,maxZ:14},{minX:0,minY:0,maxX:32767,maxY:32767,minZ:15,maxZ:15},{minX:0,minY:0,maxX:65535,maxY:65535,minZ:16,maxZ:16},{minX:0,minY:0,maxX:131071,maxY:131071,minZ:17,maxZ:17}],genericTile:[],supportedLanguagesVersion:1}],scale:0,size:2,supportedLanguage:[{identifier:1,language:["ar","ca","cs","da","de","el","en","en-AU","en-GB","es","es-MX","es-US","fi","fr","fr-CA","he","hi","hr","hu","id","it","ja","ko","ms","nb","nl","pl","pt","pt-PT","ro","ru","sk","sv","th","tr","uk","vi","zh-Hans","zh-Hant","zh-HK"]}],countryRegionWhitelist:[],checksumType:0,requestStyle:0,deviceSKUWhitelist:[],baseURL:"https://gspe19-kittyhawk-ssl.ls.apple.com/tile.vf",dataSet:1,supportsMultipathTCP:!1},{style:69,validVersion:[{identifier:16034178,availableTiles:[{minX:0,minY:0,maxX:1,maxY:1,minZ:1,maxZ:1},{minX:0,minY:0,maxX:7,maxY:7,minZ:3,maxZ:3},{minX:0,minY:0,maxX:63,maxY:63,minZ:6,maxZ:6},{minX:0,minY:0,maxX:511,maxY:511,minZ:9,maxZ:9},{minX:0,minY:0,maxX:4095,maxY:4095,minZ:12,maxZ:12},{minX:0,minY:0,maxX:32767,maxY:32767,minZ:15,maxZ:15}],genericTile:[]}],scale:0,size:2,supportedLanguage:[],countryRegionWhitelist:[],checksumType:0,requestStyle:0,deviceSKUWhitelist:[],baseURL:"https://gspe19-ssl.ls.apple.com/tile.vf",dataSet:0,supportsMultipathTCP:!1},{style:69,validVersion:[{identifier:16030619,availableTiles:[{minX:0,minY:0,maxX:1,maxY:1,minZ:1,maxZ:1},{minX:0,minY:0,maxX:7,maxY:7,minZ:3,maxZ:3},{minX:0,minY:0,maxX:63,maxY:63,minZ:6,maxZ:6},{minX:0,minY:0,maxX:511,maxY:511,minZ:9,maxZ:9},{minX:0,minY:0,maxX:4095,maxY:4095,minZ:12,maxZ:12},{minX:0,minY:0,maxX:32767,maxY:32767,minZ:15,maxZ:15}],genericTile:[]}],scale:0,size:2,supportedLanguage:[],countryRegionWhitelist:[],checksumType:0,requestStyle:0,deviceSKUWhitelist:[],baseURL:"https://gspe19-kittyhawk-ssl.ls.apple.com/tile.vf",dataSet:1,supportsMultipathTCP:!1},{style:70,validVersion:[{identifier:1,availableTiles:[{minX:0,minY:0,maxX:8191,maxY:8191,minZ:13,maxZ:13}],genericTile:[],timeToLiveSeconds:86400}],scale:0,size:2,supportedLanguage:[],countryRegionWhitelist:[],checksumType:0,requestStyle:1,deviceSKUWhitelist:[],baseURL:"https://gspe76-ssl.ls.apple.com/api/vltile",supportsMultipathTCP:!1},{style:71,validVersion:[{identifier:1,availableTiles:[{minX:0,minY:0,maxX:2097151,maxY:2097151,minZ:21,maxZ:21}],genericTile:[]}],scale:0,size:2,supportedLanguage:[],countryRegionWhitelist:[],checksumType:0,requestStyle:1,deviceSKUWhitelist:[],baseURL:"https://gspe92-ssl.ls.apple.com",supportsMultipathTCP:!1},{style:72,validVersion:[{identifier:2,availableTiles:[{minX:0,minY:0,maxX:8191,maxY:8191,minZ:13,maxZ:13}],genericTile:[],timeToLiveSeconds:3600}],scale:0,size:2,supportedLanguage:[],countryRegionWhitelist:[],checksumType:0,requestStyle:1,deviceSKUWhitelist:[],baseURL:"https://gspe79-ssl.ls.apple.com/72/v2",supportsMultipathTCP:!1},{style:73,validVersion:[{identifier:16034178,availableTiles:[{minX:0,minY:0,maxX:4095,maxY:4095,minZ:12,maxZ:12},{minX:0,minY:0,maxX:8191,maxY:8191,minZ:13,maxZ:13},{minX:0,minY:0,maxX:16383,maxY:16383,minZ:14,maxZ:14},{minX:0,minY:0,maxX:32767,maxY:32767,minZ:15,maxZ:15}],genericTile:[]}],scale:0,size:2,supportedLanguage:[],countryRegionWhitelist:[],checksumType:0,requestStyle:0,deviceSKUWhitelist:[],baseURL:"https://gspe19-ssl.ls.apple.com/tile.vf",dataSet:0,supportsMultipathTCP:!1},{style:73,validVersion:[{identifier:16030619,availableTiles:[{minX:0,minY:0,maxX:4095,maxY:4095,minZ:12,maxZ:12},{minX:0,minY:0,maxX:8191,maxY:8191,minZ:13,maxZ:13},{minX:0,minY:0,maxX:16383,maxY:16383,minZ:14,maxZ:14},{minX:0,minY:0,maxX:32767,maxY:32767,minZ:15,maxZ:15}],genericTile:[]}],scale:0,size:2,supportedLanguage:[],countryRegionWhitelist:[],checksumType:0,requestStyle:0,deviceSKUWhitelist:[],baseURL:"https://gspe19-kittyhawk-ssl.ls.apple.com/tile.vf",dataSet:1,supportsMultipathTCP:!1},{style:74,validVersion:[{identifier:0,availableTiles:[{minX:0,minY:0,maxX:1023,maxY:1023,minZ:10,maxZ:10},{minX:0,minY:0,maxX:2097151,maxY:2097151,minZ:21,maxZ:21}],genericTile:[],timeToLiveSeconds:86400}],scale:0,size:2,supportedLanguage:[],countryRegionWhitelist:[],checksumType:0,requestStyle:1,deviceSKUWhitelist:[],baseURL:"https://gspe79-ssl.ls.apple.com/pbz/v1",supportsMultipathTCP:!1},{style:75,validVersion:[{identifier:0,availableTiles:[{minX:0,minY:0,maxX:1023,maxY:1023,minZ:10,maxZ:10},{minX:0,minY:0,maxX:131071,maxY:131071,minZ:17,maxZ:17}],genericTile:[],timeToLiveSeconds:86400}],scale:0,size:2,supportedLanguage:[],countryRegionWhitelist:[],checksumType:0,requestStyle:1,deviceSKUWhitelist:[],baseURL:"https://gspe79-ssl.ls.apple.com/pbz/v1",supportsMultipathTCP:!1},{style:76,validVersion:[{identifier:0,availableTiles:[{minX:0,minY:0,maxX:8191,maxY:8191,minZ:13,maxZ:13},{minX:0,minY:0,maxX:524287,maxY:524287,minZ:19,maxZ:19}],genericTile:[],timeToLiveSeconds:86400}],scale:0,size:2,supportedLanguage:[],countryRegionWhitelist:[],checksumType:0,requestStyle:1,deviceSKUWhitelist:[],baseURL:"https://gspe79-ssl.ls.apple.com/sis/v1",supportsMultipathTCP:!1},{style:78,validVersion:[{identifier:16034178,availableTiles:[{minX:0,minY:0,maxX:4095,maxY:4095,minZ:12,maxZ:12}],genericTile:[]}],scale:0,size:2,supportedLanguage:[],countryRegionWhitelist:[],checksumType:0,requestStyle:0,deviceSKUWhitelist:[],baseURL:"https://gspe19-ssl.ls.apple.com/tile.vf",dataSet:0,supportsMultipathTCP:!1},{style:78,validVersion:[{identifier:16030619,availableTiles:[{minX:0,minY:0,maxX:4095,maxY:4095,minZ:12,maxZ:12}],genericTile:[]}],scale:0,size:2,supportedLanguage:[],countryRegionWhitelist:[],checksumType:0,requestStyle:0,deviceSKUWhitelist:[],baseURL:"https://gspe19-kittyhawk-ssl.ls.apple.com/tile.vf",dataSet:1,supportsMultipathTCP:!1},{style:79,validVersion:[{identifier:16034178,availableTiles:[{minX:0,minY:0,maxX:1,maxY:1,minZ:1,maxZ:1},{minX:0,minY:0,maxX:3,maxY:3,minZ:2,maxZ:2},{minX:0,minY:0,maxX:7,maxY:7,minZ:3,maxZ:3},{minX:0,minY:0,maxX:15,maxY:15,minZ:4,maxZ:4},{minX:0,minY:0,maxX:31,maxY:31,minZ:5,maxZ:5},{minX:0,minY:0,maxX:63,maxY:63,minZ:6,maxZ:6},{minX:0,minY:0,maxX:127,maxY:127,minZ:7,maxZ:7},{minX:0,minY:0,maxX:255,maxY:255,minZ:8,maxZ:8},{minX:0,minY:0,maxX:511,maxY:511,minZ:9,maxZ:9}],genericTile:[]}],scale:0,size:2,supportedLanguage:[],countryRegionWhitelist:[],checksumType:0,requestStyle:0,deviceSKUWhitelist:[],baseURL:"https://gspe19-ssl.ls.apple.com/tile.vf",dataSet:0,supportsMultipathTCP:!1},{style:79,validVersion:[{identifier:16030619,availableTiles:[{minX:0,minY:0,maxX:1,maxY:1,minZ:1,maxZ:1},{minX:0,minY:0,maxX:3,maxY:3,minZ:2,maxZ:2},{minX:0,minY:0,maxX:7,maxY:7,minZ:3,maxZ:3},{minX:0,minY:0,maxX:15,maxY:15,minZ:4,maxZ:4},{minX:0,minY:0,maxX:31,maxY:31,minZ:5,maxZ:5},{minX:0,minY:0,maxX:63,maxY:63,minZ:6,maxZ:6},{minX:0,minY:0,maxX:127,maxY:127,minZ:7,maxZ:7},{minX:0,minY:0,maxX:255,maxY:255,minZ:8,maxZ:8},{minX:0,minY:0,maxX:511,maxY:511,minZ:9,maxZ:9}],genericTile:[]}],scale:0,size:2,supportedLanguage:[],countryRegionWhitelist:[],checksumType:0,requestStyle:0,deviceSKUWhitelist:[],baseURL:"https://gspe19-kittyhawk-ssl.ls.apple.com/tile.vf",dataSet:1,supportsMultipathTCP:!1},{style:80,validVersion:[{identifier:0,availableTiles:[{minX:0,minY:0,maxX:1023,maxY:1023,minZ:10,maxZ:10},{minX:0,minY:0,maxX:65535,maxY:65535,minZ:16,maxZ:16}],genericTile:[],timeToLiveSeconds:86400}],scale:0,size:2,supportedLanguage:[],countryRegionWhitelist:[],checksumType:0,requestStyle:1,deviceSKUWhitelist:[],baseURL:"https://gspe79-ssl.ls.apple.com/sdm/v1",supportsMultipathTCP:!1},{style:82,validVersion:[{identifier:16034178,availableTiles:[{minX:0,minY:0,maxX:1,maxY:1,minZ:1,maxZ:1}],genericTile:[]}],scale:0,size:2,supportedLanguage:[],countryRegionWhitelist:[],checksumType:0,requestStyle:0,deviceSKUWhitelist:[],baseURL:"https://gspe19-ssl.ls.apple.com/asset/v3/model-occlusion",dataSet:0,supportsMultipathTCP:!1},{style:82,validVersion:[{identifier:16030619,availableTiles:[{minX:0,minY:0,maxX:1,maxY:1,minZ:1,maxZ:1}],genericTile:[]}],scale:0,size:2,supportedLanguage:[],countryRegionWhitelist:[],checksumType:0,requestStyle:0,deviceSKUWhitelist:[],baseURL:"https://gspe19-kittyhawk-ssl.ls.apple.com/asset/v3/model-occlusion",dataSet:1,supportsMultipathTCP:!1},{style:84,validVersion:[{identifier:16034178,availableTiles:[{minX:0,minY:0,maxX:1,maxY:1,minZ:1,maxZ:1},{minX:0,minY:0,maxX:3,maxY:3,minZ:2,maxZ:2},{minX:0,minY:0,maxX:15,maxY:15,minZ:4,maxZ:4},{minX:0,minY:0,maxX:63,maxY:63,minZ:6,maxZ:6},{minX:0,minY:0,maxX:127,maxY:127,minZ:7,maxZ:7},{minX:0,minY:0,maxX:255,maxY:255,minZ:8,maxZ:8},{minX:0,minY:0,maxX:511,maxY:511,minZ:9,maxZ:9},{minX:0,minY:0,maxX:1023,maxY:1023,minZ:10,maxZ:10},{minX:0,minY:0,maxX:4095,maxY:4095,minZ:12,maxZ:12},{minX:0,minY:0,maxX:8191,maxY:8191,minZ:13,maxZ:13},{minX:0,minY:0,maxX:16383,maxY:16383,minZ:14,maxZ:14},{minX:0,minY:0,maxX:32767,maxY:32767,minZ:15,maxZ:15},{minX:0,minY:0,maxX:65535,maxY:65535,minZ:16,maxZ:16},{minX:0,minY:0,maxX:131071,maxY:131071,minZ:17,maxZ:17}],genericTile:[],timeToLiveSeconds:1800,supportedLanguagesVersion:1}],scale:0,size:2,supportedLanguage:[{identifier:1,language:["ar","ca","cs","da","de","el","en","en-AU","en-GB","es","es-MX","es-US","fi","fr","fr-CA","he","hi","hr","hu","id","it","ja","ko","ms","nb","nl","pl","pt","pt-PT","ro","ru","sk","sv","th","tr","uk","vi","zh-Hans","zh-Hant","zh-HK"]}],countryRegionWhitelist:[],checksumType:0,requestStyle:0,deviceSKUWhitelist:[],baseURL:"https://gspe19-2-ssl.ls.apple.com/poi_update",dataSet:0,supportsMultipathTCP:!1},{style:84,validVersion:[{identifier:16030619,availableTiles:[{minX:0,minY:0,maxX:1,maxY:1,minZ:1,maxZ:1},{minX:0,minY:0,maxX:3,maxY:3,minZ:2,maxZ:2},{minX:0,minY:0,maxX:15,maxY:15,minZ:4,maxZ:4},{minX:0,minY:0,maxX:63,maxY:63,minZ:6,maxZ:6},{minX:0,minY:0,maxX:127,maxY:127,minZ:7,maxZ:7},{minX:0,minY:0,maxX:255,maxY:255,minZ:8,maxZ:8},{minX:0,minY:0,maxX:511,maxY:511,minZ:9,maxZ:9},{minX:0,minY:0,maxX:1023,maxY:1023,minZ:10,maxZ:10},{minX:0,minY:0,maxX:4095,maxY:4095,minZ:12,maxZ:12},{minX:0,minY:0,maxX:8191,maxY:8191,minZ:13,maxZ:13},{minX:0,minY:0,maxX:16383,maxY:16383,minZ:14,maxZ:14},{minX:0,minY:0,maxX:32767,maxY:32767,minZ:15,maxZ:15},{minX:0,minY:0,maxX:65535,maxY:65535,minZ:16,maxZ:16},{minX:0,minY:0,maxX:131071,maxY:131071,minZ:17,maxZ:17}],genericTile:[],timeToLiveSeconds:1800,supportedLanguagesVersion:1}],scale:0,size:2,supportedLanguage:[{identifier:1,language:["ar","ca","cs","da","de","el","en","en-AU","en-GB","es","es-MX","es-US","fi","fr","fr-CA","he","hi","hr","hu","id","it","ja","ko","ms","nb","nl","pl","pt","pt-PT","ro","ru","sk","sv","th","tr","uk","vi","zh-Hans","zh-Hant","zh-HK"]}],countryRegionWhitelist:[],checksumType:0,requestStyle:0,deviceSKUWhitelist:[],baseURL:"https://gspe19-2-ssl.ls.apple.com/poi_update",dataSet:1,supportsMultipathTCP:!1},{style:85,validVersion:[{identifier:16034178,availableTiles:[{minX:0,minY:0,maxX:4095,maxY:4095,minZ:12,maxZ:12}],genericTile:[]}],scale:0,size:2,supportedLanguage:[],countryRegionWhitelist:[],checksumType:0,requestStyle:0,deviceSKUWhitelist:[],baseURL:"https://gspe19-2-ssl.ls.apple.com/live_tile.vf",dataSet:0,supportsMultipathTCP:!1},{style:85,validVersion:[{identifier:16030619,availableTiles:[{minX:0,minY:0,maxX:4095,maxY:4095,minZ:12,maxZ:12}],genericTile:[]}],scale:0,size:2,supportedLanguage:[],countryRegionWhitelist:[],checksumType:0,requestStyle:0,deviceSKUWhitelist:[],baseURL:"https://gspe19-2-ssl.ls.apple.com/live_tile.vf",dataSet:1,supportsMultipathTCP:!1},{style:87,validVersion:[{identifier:16034178,availableTiles:[{minX:0,minY:0,maxX:1,maxY:1,minZ:1,maxZ:1},{minX:0,minY:0,maxX:3,maxY:3,minZ:2,maxZ:2},{minX:0,minY:0,maxX:7,maxY:7,minZ:3,maxZ:3},{minX:0,minY:0,maxX:15,maxY:15,minZ:4,maxZ:4},{minX:0,minY:0,maxX:31,maxY:31,minZ:5,maxZ:5},{minX:0,minY:0,maxX:63,maxY:63,minZ:6,maxZ:6},{minX:0,minY:0,maxX:127,maxY:127,minZ:7,maxZ:7},{minX:0,minY:0,maxX:255,maxY:255,minZ:8,maxZ:8},{minX:0,minY:0,maxX:511,maxY:511,minZ:9,maxZ:9},{minX:0,minY:0,maxX:1023,maxY:1023,minZ:10,maxZ:10},{minX:0,minY:0,maxX:2047,maxY:2047,minZ:11,maxZ:11},{minX:0,minY:0,maxX:4095,maxY:4095,minZ:12,maxZ:12},{minX:0,minY:0,maxX:8191,maxY:8191,minZ:13,maxZ:13},{minX:0,minY:0,maxX:16383,maxY:16383,minZ:14,maxZ:14},{minX:0,minY:0,maxX:32767,maxY:32767,minZ:15,maxZ:15}],genericTile:[],supportedLanguagesVersion:1}],scale:0,size:2,supportedLanguage:[{identifier:1,language:["ar","ca","cs","da","de","el","en","en-AU","en-GB","es","es-MX","es-US","fi","fr","fr-CA","he","hi","hr","hu","id","it","ja","ko","ms","nb","nl","pl","pt","pt-PT","ro","ru","sk","sv","th","tr","uk","vi","zh-Hans","zh-Hant","zh-HK"]}],countryRegionWhitelist:[],checksumType:0,requestStyle:0,deviceSKUWhitelist:[],baseURL:"https://gspe19-ssl.ls.apple.com/tile.vf",dataSet:0,supportsMultipathTCP:!1},{style:87,validVersion:[{identifier:16030619,availableTiles:[{minX:0,minY:0,maxX:1,maxY:1,minZ:1,maxZ:1},{minX:0,minY:0,maxX:3,maxY:3,minZ:2,maxZ:2},{minX:0,minY:0,maxX:7,maxY:7,minZ:3,maxZ:3},{minX:0,minY:0,maxX:15,maxY:15,minZ:4,maxZ:4},{minX:0,minY:0,maxX:31,maxY:31,minZ:5,maxZ:5},{minX:0,minY:0,maxX:63,maxY:63,minZ:6,maxZ:6},{minX:0,minY:0,maxX:127,maxY:127,minZ:7,maxZ:7},{minX:0,minY:0,maxX:255,maxY:255,minZ:8,maxZ:8},{minX:0,minY:0,maxX:511,maxY:511,minZ:9,maxZ:9},{minX:0,minY:0,maxX:1023,maxY:1023,minZ:10,maxZ:10},{minX:0,minY:0,maxX:2047,maxY:2047,minZ:11,maxZ:11},{minX:0,minY:0,maxX:4095,maxY:4095,minZ:12,maxZ:12},{minX:0,minY:0,maxX:8191,maxY:8191,minZ:13,maxZ:13},{minX:0,minY:0,maxX:16383,maxY:16383,minZ:14,maxZ:14},{minX:0,minY:0,maxX:32767,maxY:32767,minZ:15,maxZ:15}],genericTile:[],supportedLanguagesVersion:1}],scale:0,size:2,supportedLanguage:[{identifier:1,language:["ar","ca","cs","da","de","el","en","en-AU","en-GB","es","es-MX","es-US","fi","fr","fr-CA","he","hi","hr","hu","id","it","ja","ko","ms","nb","nl","pl","pt","pt-PT","ro","ru","sk","sv","th","tr","uk","vi","zh-Hans","zh-Hant","zh-HK"]}],countryRegionWhitelist:[],checksumType:0,requestStyle:0,deviceSKUWhitelist:[],baseURL:"https://gspe19-kittyhawk-ssl.ls.apple.com/tile.vf",dataSet:1,supportsMultipathTCP:!1},{style:88,validVersion:[{identifier:16034178,availableTiles:[{minX:0,minY:0,maxX:127,maxY:127,minZ:7,maxZ:7},{minX:0,minY:0,maxX:4095,maxY:4095,minZ:12,maxZ:12}],genericTile:[]}],scale:0,size:2,supportedLanguage:[],countryRegionWhitelist:[],checksumType:0,requestStyle:0,deviceSKUWhitelist:[],baseURL:"https://gspe19-ssl.ls.apple.com/tile.vf",dataSet:0,supportsMultipathTCP:!1},{style:88,validVersion:[{identifier:16030619,availableTiles:[{minX:0,minY:0,maxX:127,maxY:127,minZ:7,maxZ:7},{minX:0,minY:0,maxX:4095,maxY:4095,minZ:12,maxZ:12}],genericTile:[]}],scale:0,size:2,supportedLanguage:[],countryRegionWhitelist:[],checksumType:0,requestStyle:0,deviceSKUWhitelist:[],baseURL:"https://gspe19-kittyhawk-ssl.ls.apple.com/tile.vf",dataSet:1,supportsMultipathTCP:!1},{style:89,validVersion:[{identifier:1,availableTiles:[{minX:0,minY:0,maxX:262143,maxY:262143,minZ:18,maxZ:18}],genericTile:[],timeToLiveSeconds:86400}],scale:0,size:2,supportedLanguage:[],countryRegionWhitelist:[],checksumType:0,requestStyle:1,deviceSKUWhitelist:[],baseURL:"https://gspe79-ssl.ls.apple.com/ray/v1",supportsMultipathTCP:!1},{style:90,validVersion:[{identifier:16034178,availableTiles:[{minX:0,minY:0,maxX:8191,maxY:8191,minZ:13,maxZ:13},{minX:0,minY:0,maxX:32767,maxY:32767,minZ:15,maxZ:15}],genericTile:[]}],scale:0,size:2,supportedLanguage:[],countryRegionWhitelist:[],checksumType:0,requestStyle:0,deviceSKUWhitelist:[],baseURL:"https://gspe19-ssl.ls.apple.com/tile.vf",dataSet:0,supportsMultipathTCP:!1},{style:90,validVersion:[{identifier:16030619,availableTiles:[{minX:0,minY:0,maxX:8191,maxY:8191,minZ:13,maxZ:13},{minX:0,minY:0,maxX:32767,maxY:32767,minZ:15,maxZ:15}],genericTile:[]}],scale:0,size:2,supportedLanguage:[],countryRegionWhitelist:[],checksumType:0,requestStyle:0,deviceSKUWhitelist:[],baseURL:"https://gspe19-kittyhawk-ssl.ls.apple.com/tile.vf",dataSet:1,supportsMultipathTCP:!1}],attribution:[{name:"‎",url:"https://gspe21-ssl.ls.apple.com/html/attribution-275.html",resource:[],region:[],linkDisplayStringIndex:0,plainTextURL:"https://gspe21-ssl.ls.apple.com/html/attribution-274.txt",plainTextURLSHA256Checksum:{0:95,1:21,2:102,3:110,4:8,5:247,6:232,7:236,8:45,9:156,10:70,11:137,12:179,13:197,14:80,15:243,16:60,17:246,18:254,19:239,20:198,21:57,22:65,23:219,24:22,25:147,26:180,27:123,28:186,29:78,30:122,31:162}},{name:"MMI",url:"https://gspe21-ssl.ls.apple.com/html/attribution-275.html",resource:[{resourceType:5,filename:"mmi-mask-2.png",checksum:{0:35,1:54,2:2,3:219,4:218,5:184,6:124,7:50,8:35,9:32,10:86,11:20,12:147,13:223,14:7,15:41,16:209,17:238,18:32,19:41},region:[],filter:[],validationMethod:0,updateMethod:0},{resourceType:5,filename:"mmi-mask-2@2x.png",checksum:{0:5,1:160,2:112,3:185,4:3,5:255,6:7,7:75,8:78,9:139,10:52,11:81,12:151,13:231,14:143,15:29,16:187,17:109,18:220,19:80},region:[],filter:[],validationMethod:0,updateMethod:0},{resourceType:5,filename:"mmi-mask-2@3x.png",checksum:{0:240,1:170,2:204,3:91,4:161,5:113,6:81,7:101,8:136,9:205,10:115,11:2,12:192,13:97,14:106,15:34,16:227,17:214,18:74,19:220},region:[],filter:[],validationMethod:0,updateMethod:0}],region:[{minX:176,minY:110,maxX:183,maxY:122,minZ:8,maxZ:21},{minX:178,minY:107,maxX:188,maxY:107,minZ:8,maxZ:21},{minX:178,minY:108,maxX:183,maxY:109,minZ:8,maxZ:21},{minX:180,minY:105,maxX:180,maxY:106,minZ:8,maxZ:21},{minX:181,minY:104,maxX:183,maxY:106,minZ:8,maxZ:21},{minX:182,minY:103,maxX:182,maxY:103,minZ:8,maxZ:21},{minX:184,minY:104,maxX:184,maxY:106,minZ:8,maxZ:21},{minX:184,minY:108,maxX:195,maxY:110,minZ:8,maxZ:21},{minX:184,minY:111,maxX:194,maxY:111,minZ:8,maxZ:21},{minX:184,minY:112,maxX:191,maxY:120,minZ:8,maxZ:21},{minX:184,minY:121,maxX:184,maxY:121,minZ:8,maxZ:21},{minX:185,minY:105,maxX:185,maxY:106,minZ:8,maxZ:21},{minX:190,minY:107,maxX:190,maxY:107,minZ:8,maxZ:21},{minX:193,minY:118,maxX:194,maxY:123,minZ:8,maxZ:21},{minX:195,minY:118,maxX:195,maxY:118,minZ:8,maxZ:21}],linkDisplayStringIndex:0},{name:"© GeoTechnologies, Inc.",url:"https://gspe21-ssl.ls.apple.com/html/attribution-275.html",resource:[],region:[{minX:218,minY:102,maxX:225,maxY:104,minZ:8,maxZ:21},{minX:221,minY:98,maxX:228,maxY:101,minZ:8,maxZ:21},{minX:226,minY:91,maxX:231,maxY:97,minZ:8,maxZ:21}],linkDisplayStringIndex:0}],urlInfoSet:[{alternateResourcesURL:[{url:"https://cdn.apple-mapkit.com/rap",supportsMultipathTCP:!1}],resourcesURL:{url:"https://gspe21-ssl.ls.apple.com/",supportsMultipathTCP:!1},searchAttributionManifestURL:{url:"https://gspe21-ssl.ls.apple.com/config/search-attribution-1262",supportsMultipathTCP:!1},directionsURL:{url:"https://gsp-ssl.ls.apple.com/directions.arpc",supportsMultipathTCP:!0,alternativeMultipathTCPPort:5228},etaURL:{url:"https://gsp-ssl.ls.apple.com/directions.arpc",supportsMultipathTCP:!0,alternativeMultipathTCPPort:5228},batchReverseGeocoderURL:{url:"https://gsp36-ssl.ls.apple.com/revgeo.arpc",supportsMultipathTCP:!1},simpleETAURL:{url:"https://gsp-ssl.ls.apple.com/directions.arpc",supportsMultipathTCP:!0,alternativeMultipathTCPPort:5228},addressCorrectionInitURL:{url:"https://gsp47-ssl.ls.apple.com/ac",supportsMultipathTCP:!1},addressCorrectionUpdateURL:{url:"https://gsp47-ssl.ls.apple.com/ac",supportsMultipathTCP:!1},problemSubmissionURL:{url:"https://sundew.ls.apple.com/v1/feedback/submission.arpc",supportsMultipathTCP:!1},problemStatusURL:{url:"https://sundew.ls.apple.com/grp/st",supportsMultipathTCP:!1},reverseGeocoderVersionsURL:{url:"https://gspe21-ssl.ls.apple.com/config/revgeo-version-11.plist",supportsMultipathTCP:!1},problemCategoriesURL:{url:"https://gspe21-ssl.ls.apple.com/config/com.apple.GEO.BusinessLocalizedCategories-424.plist",supportsMultipathTCP:!1},announcementsURL:{url:"https://gspe35-ssl.ls.apple.com/config/announcements?environment=prod",supportsMultipathTCP:!1},dispatcherURL:{url:"https://gsp-ssl.ls.apple.com/dispatcher.arpc",supportsMultipathTCP:!0,alternativeMultipathTCPPort:5228},problemOptInURL:{url:"https://sundew.ls.apple.com/grp/oi",supportsMultipathTCP:!1},abExperimentURL:{url:"https://gsp-ssl.ls.apple.com/ab.arpc",supportsMultipathTCP:!1},businessPortalBaseURL:{url:"https://mapsconnect.apple.com/business/ui/claimPlace",supportsMultipathTCP:!1},logMessageUsageURL:{url:"https://gsp64-ssl.ls.apple.com/a/v2/use",supportsMultipathTCP:!1},spatialLookupURL:{url:"https://gsp51-ssl.ls.apple.com/api/v1.0/poi/data",supportsMultipathTCP:!1},realtimeTrafficProbeURL:{url:"https://gsp9-ssl.apple.com/hvr/v2/rtloc",supportsMultipathTCP:!1},batchTrafficProbeURL:{url:"https://gsp10-ssl.ls.apple.com/hvr/v2/loc",supportsMultipathTCP:!1},proactiveRoutingURL:{url:"https://gsp-ssl-commute.ls.apple.com/directions.arpc",supportsMultipathTCP:!0,alternativeMultipathTCPPort:5228},logMessageUsageV3URL:{url:"https://gsp64-ssl.ls.apple.com/hvr/v3/use",supportsMultipathTCP:!1},backgroundDispatcherURL:{url:"https://gsp57-ssl-background.ls.apple.com/dispatcher.arpc",supportsMultipathTCP:!0,alternativeMultipathTCPPort:5228},bluePOIDispatcherURL:{url:"https://gsp57-ssl-locus.ls.apple.com/dispatcher.arpc",supportsMultipathTCP:!0,alternativeMultipathTCPPort:5228},backgroundRevGeoURL:{url:"https://gsp57-ssl-revgeo.ls.apple.com/dispatcher.arpc",supportsMultipathTCP:!1},wifiConnectionQualityProbeURL:{url:"https://gsp10-ssl.ls.apple.com/hvr/wcq",supportsMultipathTCP:!1},wifiQualityURL:{url:"https://gsp85-ssl.ls.apple.com/wifi_request",supportsMultipathTCP:!1},feedbackSubmissionURL:{url:"https://sundew.ls.apple.com/v1/feedback/submission.arpc",supportsMultipathTCP:!1},feedbackLookupURL:{url:"https://gsp-ssl.ls.apple.com/feedback.arpc",supportsMultipathTCP:!1},analyticsCohortSessionURL:{url:"https://gsp64-ssl.ls.apple.com/hvr/v3/use",supportsMultipathTCP:!1},analyticsLongSessionURL:{url:"https://gsp64-ssl.ls.apple.com/hvr/v3/use",supportsMultipathTCP:!1},analyticsShortSessionURL:{url:"https://gsp64-ssl.ls.apple.com/hvr/v3/use",supportsMultipathTCP:!1},analyticsSessionlessURL:{url:"https://gsp64-ssl.ls.apple.com/hvr/v3/use",supportsMultipathTCP:!1},webModuleBaseURL:{url:"https://maps.apple.com",supportsMultipathTCP:!1},wifiQualityTileURL:{url:"https://gspe85-ssl.ls.apple.com/wifi_request_tile",supportsMultipathTCP:!1},addressCorrectionTaggedLocationURL:{url:"https://gsp47-ssl.ls.apple.com/ac",supportsMultipathTCP:!1},proactiveAppClipURL:{url:"https://gspe79-ssl.ls.apple.com/72/v2",supportsMultipathTCP:!1},enrichmentSubmissionURL:{url:"https://sundew.ls.apple.com/v1/feedback/submission.arpc",supportsMultipathTCP:!1},ugcLogDiscardURL:{url:"https://sundew.ls.apple.com/v1/log_message",supportsMultipathTCP:!1},batchReverseGeocoderPlaceRequestURL:{url:"https://gsp36-ssl.ls.apple.com/revgeo_pr.arpc",supportsMultipathTCP:!1},pressureProbeDataURL:{url:"https://gsp10-ssl.ls.apple.com/hvr/cpr",supportsMultipathTCP:!1},poiBusynessActivityCollectionURL:{url:"https://gsp53-ssl.ls.apple.com/hvr/rt_poi_activity",supportsMultipathTCP:!1},rapWebBundleURL:{url:"https://cdn.apple-mapkit.com/rap",supportsMultipathTCP:!1},networkSelectionHarvestURL:{url:"https://gsp10-ssl.ls.apple.com/hvr/strn",supportsMultipathTCP:!1},offlineDataBatchListURL:{url:"https://gspe121-ssl.ls.apple.com/api/batchesForRegion",supportsMultipathTCP:!1},offlineDataSizeURL:{url:"https://gspe121-ssl.ls.apple.com/api/sizeForRegion",supportsMultipathTCP:!1},offlineDataDownloadBaseURL:{url:"https://gspe121-ssl.ls.apple.com",supportsMultipathTCP:!1},bcxDispatcherURL:{url:"https://gsp57-ssl-bcx.ls.apple.com/dispatcher.arpc",supportsMultipathTCP:!1}}],muninBucket:[{bucketID:2,bucketURL:"https://gspe72-ssl.ls.apple.com/mnn_us"},{bucketID:6,bucketURL:"https://gspe72-ssl.ls.apple.com/mnn_us"}]}},u={Settings:o,Configs:p},x={Switch:!0,CountryCode:"US",newsPlusUser:!0},c={Settings:x},h={Switch:!0,CountryCode:"US",canUse:!0},d={Settings:h},X={Switch:!0,CountryCode:"SG",Domains:["web","itunes","app_store","movies","restaurants","maps"],Functions:["flightutilities","lookup","mail","messages","news","safari","siri","spotlight","visualintelligence"],Safari_Smart_History:!0},Y={VisualIntelligence:{enabled_domains:["pets","media","books","art","nature","landmarks"],supported_domains:["ART","BOOK","MEDIA","LANDMARK","ANIMALS","BIRDS","FOOD","SIGN_SYMBOL","AUTO_SYMBOL","DOGS","NATURE","NATURAL_LANDMARK","INSECTS","REPTILES","ALBUM","STOREFRONT","LAUNDRY_CARE_SYMBOL","CATS","OBJECT_2D","SCULPTURE","SKYLINE","MAMMALS"]}},Z={Settings:X,Configs:Y},g={Switch:"true",CountryCode:"US",MultiAccount:"false",Universal:"true"},y={Settings:g},v={Switch:!0,"Third-Party":!1,HLSUrl:"play-edge.itunes.apple.com",ServerUrl:"play.itunes.apple.com",Tabs:["WatchNow","Originals","MLS","Sports","Kids","Store","Movies","TV","ChannelsAndApps","Library","Search"],CountryCode:{Configs:"AUTO",Settings:"AUTO",View:["SG","TW"],WatchNow:"AUTO",Channels:"AUTO",Originals:"AUTO",Sports:"US",Kids:"US",Store:"AUTO",Movies:"AUTO",TV:"AUTO",Persons:"SG",Search:"AUTO",Others:"AUTO"}},T={Locale:[["AU","en-AU"],["CA","en-CA"],["GB","en-GB"],["KR","ko-KR"],["HK","yue-Hant"],["JP","ja-JP"],["MO","zh-Hant"],["TW","zh-Hant"],["US","en-US"],["SG","zh-Hans"]],Tabs:[{title:"主页",type:"WatchNow",universalLinks:["https://tv.apple.com/watch-now","https://tv.apple.com/home"],destinationType:"Target",target:{id:"tahoma_watchnow",type:"Root",url:"https://tv.apple.com/watch-now"},isSelected:!0},{title:"Apple TV+",type:"Originals",universalLinks:["https://tv.apple.com/channel/tvs.sbd.4000","https://tv.apple.com/atv"],destinationType:"Target",target:{id:"tvs.sbd.4000",type:"Brand",url:"https://tv.apple.com/us/channel/tvs.sbd.4000"}},{title:"MLS Season Pass",type:"MLS",universalLinks:["https://tv.apple.com/mls"],destinationType:"Target",target:{id:"tvs.sbd.7000",type:"Brand",url:"https://tv.apple.com/us/channel/tvs.sbd.7000"}},{title:"体育节目",type:"Sports",universalLinks:["https://tv.apple.com/sports"],destinationType:"Target",target:{id:"tahoma_sports",type:"Root",url:"https://tv.apple.com/sports"}},{title:"儿童",type:"Kids",universalLinks:["https://tv.apple.com/kids"],destinationType:"Target",target:{id:"tahoma_kids",type:"Root",url:"https://tv.apple.com/kids"}},{title:"电影",type:"Movies",universalLinks:["https://tv.apple.com/movies"],destinationType:"Target",target:{id:"tahoma_movies",type:"Root",url:"https://tv.apple.com/movies"}},{title:"电视节目",type:"TV",universalLinks:["https://tv.apple.com/tv-shows"],destinationType:"Target",target:{id:"tahoma_tvshows",type:"Root",url:"https://tv.apple.com/tv-shows"}},{title:"商店",type:"Store",universalLinks:["https://tv.apple.com/store"],destinationType:"SubTabs",subTabs:[{title:"电影",type:"Movies",universalLinks:["https://tv.apple.com/movies"],destinationType:"Target",target:{id:"tahoma_movies",type:"Root",url:"https://tv.apple.com/movies"}},{title:"电视节目",type:"TV",universalLinks:["https://tv.apple.com/tv-shows"],destinationType:"Target",target:{id:"tahoma_tvshows",type:"Root",url:"https://tv.apple.com/tv-shows"}}]},{title:"频道和 App",destinationType:"SubTabs",subTabsPlacementType:"ExpandedList",type:"ChannelsAndApps",subTabs:[]},{title:"资料库",type:"Library",destinationType:"Client"},{title:"搜索",type:"Search",universalLinks:["https://tv.apple.com/search"],destinationType:"Target",target:{id:"tahoma_search",type:"Root",url:"https://tv.apple.com/search"}}],i18n:{WatchNow:[["en","Home"],["zh","主页"],["zh-Hans","主頁"],["zh-Hant","主頁"]],Movies:[["en","Movies"],["zh","电影"],["zh-Hans","电影"],["zh-Hant","電影"]],TV:[["en","TV"],["zh","电视节目"],["zh-Hans","电视节目"],["zh-Hant","電視節目"]],Store:[["en","Store"],["zh","商店"],["zh-Hans","商店"],["zh-Hant","商店"]],Sports:[["en","Sports"],["zh","体育节目"],["zh-Hans","体育节目"],["zh-Hant","體育節目"]],Kids:[["en","Kids"],["zh","儿童"],["zh-Hans","儿童"],["zh-Hant","兒童"]],Library:[["en","Library"],["zh","资料库"],["zh-Hans","资料库"],["zh-Hant","資料庫"]],Search:[["en","Search"],["zh","搜索"],["zh-Hans","搜索"],["zh-Hant","蒐索"]]}},f={Settings:v,Configs:T},S=Database={Default:Object.freeze({__proto__:null,Configs:s,Settings:m,default:n}),Location:Object.freeze({__proto__:null,Settings:l,default:r}),Maps:Object.freeze({__proto__:null,Configs:p,Settings:o,default:u}),News:Object.freeze({__proto__:null,Settings:x,default:c}),PrivateRelay:Object.freeze({__proto__:null,Settings:h,default:d}),Siri:Object.freeze({__proto__:null,Configs:Y,Settings:X,default:Z}),TestFlight:Object.freeze({__proto__:null,Settings:g,default:y}),TV:Object.freeze({__proto__:null,Configs:T,Settings:v,default:f})};function b(a,t,m){console.log("☑️ Set Environment Variables","");let{Settings:s,Caches:n,Configs:l}=function(a,t,m){let s=i.getItem(a,m),n={};if("undefined"!=typeof $argument&&Boolean($argument)){let i=Object.fromEntries($argument.split("&").map((e=>e.split("=").map((e=>e.replace(/\"/g,""))))));for(let a in i)e.set(n,a,i[a])}const l={Settings:m?.Default?.Settings||{},Configs:m?.Default?.Configs||{},Caches:{}};Array.isArray(t)||(t=[t]);for(let e of t)l.Settings={...l.Settings,...m?.[e]?.Settings,...n,...s?.[e]?.Settings},l.Configs={...l.Configs,...m?.[e]?.Configs},s?.[e]?.Caches&&"string"==typeof s?.[e]?.Caches&&(s[e].Caches=JSON.parse(s?.[e]?.Caches)),l.Caches={...l.Caches,...s?.[e]?.Caches};return function e(i,a){for(var t in i){var m=i[t];i[t]="object"==typeof m&&null!==m?e(m,a):a(t,m)}return i}(l.Settings,((e,i)=>("true"===i||"false"===i?i=JSON.parse(i):"string"==typeof i&&(i=i.includes(",")?i.split(",").map((e=>r(e))):r(i)),i))),l;function r(e){return e&&!isNaN(e)&&(e=parseInt(e,10)),e}}(a,t,m);if(s?.Tabs&&!Array.isArray(s?.Tabs)&&e.set(s,"Tabs",s?.Tabs?[s.Tabs.toString()]:[]),s?.Domains&&!Array.isArray(s?.Domains)&&e.set(s,"Domains",s?.Domains?[s.Domains.toString()]:[]),s?.Functions&&!Array.isArray(s?.Functions)&&e.set(s,"Functions",s?.Functions?[s.Functions.toString()]:[]),console.log(`✅ Set Environment Variables, Settings: ${typeof s}, Settings内容: ${JSON.stringify(s)}`,""),l.Storefront=new Map(l.Storefront),l.Locale&&(l.Locale=new Map(l.Locale)),l.i18n)for(let e in l.i18n)l.i18n[e]=new Map(l.i18n[e]);return{Settings:s,Caches:n,Configs:l}}const U=new a(" iRingo: 📍 GeoServices.framework v3.0.1(7) request");let C;const L=t.parse($request.url);U.log(`⚠ URL: ${JSON.stringify(L)}`,"");const k=$request.method,R=L.host,M=L.path;L.paths,U.log(`⚠ METHOD: ${k}`,"");const P=($request.headers?.["Content-Type"]??$request.headers?.["content-type"])?.split(";")?.[0];U.log(`⚠ FORMAT: ${P}`,""),(async()=>{const{Settings:e,Caches:i,Configs:a}=b("iRingo",["Location","Maps"],S);switch(U.log(`⚠ Settings.Switch: ${e?.Switch}`,""),e.Switch){case!0:default:switch(k){case"POST":case"PUT":case"PATCH":case"DELETE":switch(P){case void 0:case"application/x-www-form-urlencoded":case"text/plain":default:case"application/x-mpegURL":case"application/x-mpegurl":case"application/vnd.apple.mpegurl":case"audio/mpegurl":case"text/xml":case"text/html":case"text/plist":case"application/xml":case"application/plist":case"application/x-plist":case"text/vtt":case"application/vtt":case"text/json":case"application/json":break;case"application/protobuf":case"application/x-protobuf":case"application/vnd.google.protobuf":case"application/grpc":case"application/grpc+proto":case"application/octet-stream":U.log(`🚧 $request: ${JSON.stringify($request,null,2)}`,"");let e=U.isQuanX()?new Uint8Array($request.bodyBytes??[]):$request.body??new Uint8Array;U.log(`🚧 isBuffer? ${ArrayBuffer.isView(e)}: ${JSON.stringify(e,null,2)}`,""),$request.body=e}case"GET":case"HEAD":case"OPTIONS":case void 0:default:switch(delete $request?.headers?.["If-None-Match"],delete $request?.headers?.["if-none-match"],R){case"configuration.ls.apple.com":case"gspe1-ssl.ls.apple.com":break;case"gspe35-ssl.ls.apple.com":case"gspe35-ssl.ls.apple.cn":switch(M){case"config/announcements":switch(L.query?.os){case"ios":case"ipados":case"macos":default:switch(e?.Config?.Announcements?.Environment?.default){case"AUTO":break;case"CN":default:L.query.environment="prod-cn";break;case"XX":L.query.environment="prod"}break;case"watchos":switch(e?.Config?.Announcements?.Environment?.watchOS){case"AUTO":break;case"XX":default:L.query.environment="prod";break;case"CN":L.query.environment="prod-cn"}}break;case"geo_manifest/dynamic/config":switch(L.query?.os){case"ios":case"ipados":case"macos":default:if("AUTO"===e?.GeoManifest?.Dynamic?.Config?.CountryCode?.default)switch(i?.pep?.gcc){default:L.query.country_code=i?.pep?.gcc??"US";break;case"CN":case void 0:L.query.country_code="CN"}else L.query.country_code=e?.GeoManifest?.Dynamic?.Config?.CountryCode?.default??"CN";break;case"watchos":if("AUTO"===e?.GeoManifest?.Dynamic?.Config?.CountryCode?.watchOS)switch(i?.pep?.gcc){default:L.query.country_code=i?.pep?.gcc??"US";break;case"CN":case void 0:L.query.country_code="CN"}else L.query.country_code=e?.GeoManifest?.Dynamic?.Config?.CountryCode?.watchOS??"US"}}}case"CONNECT":case"TRACE":}$request.url=t.stringify(L),U.log("🚧 调试信息",`$request.url: ${$request.url}`,"");case!1:}})().catch((e=>U.logErr(e))).finally((()=>{if(void 0===C)U.done($request);else U.isQuanX()?(C.status||(C.status="HTTP/1.1 200 OK"),delete C.headers?.["Content-Length"],delete C.headers?.["content-length"],delete C.headers?.["Transfer-Encoding"],U.done(C)):U.done({response:C})})); diff --git a/archive/js/GeoServices.response.js b/archive/js/GeoServices.response.js new file mode 100644 index 0000000..2ce091f --- /dev/null +++ b/archive/js/GeoServices.response.js @@ -0,0 +1 @@ +class e{static name="Lodash";static version="1.2.2";static about(){return console.log(`\n🟧 ${this.name} v${this.version}\n`)}static get(e={},i="",a=void 0){Array.isArray(i)||(i=this.toPath(i));const t=i.reduce(((e,i)=>Object(e)[i]),e);return void 0===t?a:t}static set(e={},i="",a){return Array.isArray(i)||(i=this.toPath(i)),i.slice(0,-1).reduce(((e,a,t)=>Object(e[a])===e[a]?e[a]:e[a]=/^\d+$/.test(i[t+1])?[]:{}),e)[i[i.length-1]]=a,e}static unset(e={},i=""){return Array.isArray(i)||(i=this.toPath(i)),i.reduce(((e,a,t)=>t===i.length-1?(delete e[a],!0):Object(e)[a]),e)}static toPath(e){return e.replace(/\[(\d+)\]/g,".$1").split(".").filter(Boolean)}static escape(e){const i={"&":"&","<":"<",">":">",'"':""","'":"'"};return e.replace(/[&<>"']/g,(e=>i[e]))}static unescape(e){const i={"&":"&","<":"<",">":">",""":'"',"'":"'"};return e.replace(/&|<|>|"|'/g,(e=>i[e]))}}class i{static name="$Storage";static version="1.0.9";static about(){return console.log(`\n🟧 ${this.name} v${this.version}\n`)}static data=null;static dataFile="box.dat";static#e=/^@(?[^.]+)(?:\.(?.*))?$/;static#i(){return"undefined"!=typeof $environment&&$environment["surge-version"]?"Surge":"undefined"!=typeof $environment&&$environment["stash-version"]?"Stash":"undefined"!=typeof module&&module.exports?"Node.js":"undefined"!=typeof $task?"Quantumult X":"undefined"!=typeof $loon?"Loon":"undefined"!=typeof $rocket?"Shadowrocket":"undefined"!=typeof Egern?"Egern":void 0}static getItem(i=new String,a=null){let t=a;if(!0===i.startsWith("@")){const{key:a,path:n}=i.match(this.#e)?.groups;i=a;let s=this.getItem(i,{});"object"!=typeof s&&(s={}),t=e.get(s,n);try{t=JSON.parse(t)}catch(e){}}else{switch(this.#i()){case"Surge":case"Loon":case"Stash":case"Egern":case"Shadowrocket":t=$persistentStore.read(i);break;case"Quantumult X":t=$prefs.valueForKey(i);break;case"Node.js":this.data=this.#a(this.dataFile),t=this.data?.[i];break;default:t=this.data?.[i]||null}try{t=JSON.parse(t)}catch(e){}}return t??a}static setItem(i=new String,a=new String){let t=!1;if("object"==typeof a)a=JSON.stringify(a);else a=String(a);if(!0===i.startsWith("@")){const{key:n,path:s}=i.match(this.#e)?.groups;i=n;let m=this.getItem(i,{});"object"!=typeof m&&(m={}),e.set(m,s,a),t=this.setItem(i,m)}else switch(this.#i()){case"Surge":case"Loon":case"Stash":case"Egern":case"Shadowrocket":t=$persistentStore.write(a,i);break;case"Quantumult X":t=$prefs.setValueForKey(a,i);break;case"Node.js":this.data=this.#a(this.dataFile),this.data[i]=a,this.#t(this.dataFile),t=!0;break;default:t=this.data?.[i]||null}return t}static removeItem(i){let a=!1;if(!0===i.startsWith("@")){const{key:t,path:n}=i.match(this.#e)?.groups;i=t;let s=this.getItem(i);"object"!=typeof s&&(s={}),keyValue=e.unset(s,n),a=this.setItem(i,s)}else switch(this.#i()){case"Surge":case"Loon":case"Stash":case"Egern":case"Shadowrocket":case"Node.js":default:a=!1;break;case"Quantumult X":a=$prefs.removeValueForKey(i)}return a}static clear(){let e=!1;switch(this.#i()){case"Surge":case"Loon":case"Stash":case"Egern":case"Shadowrocket":case"Node.js":default:e=!1;break;case"Quantumult X":e=$prefs.removeAllValues()}return e}static#a(e){if(!this.isNode())return{};{this.fs=this.fs?this.fs:require("fs"),this.path=this.path?this.path:require("path");const i=this.path.resolve(e),a=this.path.resolve(process.cwd(),e),t=this.fs.existsSync(i),n=!t&&this.fs.existsSync(a);if(!t&&!n)return{};{const e=t?i:a;try{return JSON.parse(this.fs.readFileSync(e))}catch(e){return{}}}}}static#t(e=this.dataFile){if(this.isNode()){this.fs=this.fs?this.fs:require("fs"),this.path=this.path?this.path:require("path");const i=this.path.resolve(e),a=this.path.resolve(process.cwd(),e),t=this.fs.existsSync(i),n=!t&&this.fs.existsSync(a),s=JSON.stringify(this.data);t?this.fs.writeFileSync(i,s):n?this.fs.writeFileSync(a,s):this.fs.writeFileSync(i,s)}}}class a{static name="ENV";static version="1.8.3";static about(){return console.log(`\n🟧 ${this.name} v${this.version}\n`)}constructor(e,i){console.log(`\n🟧 ${a.name} v${a.version}\n`),this.name=e,this.logs=[],this.isMute=!1,this.isMuteLog=!1,this.logSeparator="\n",this.encoding="utf-8",this.startTime=(new Date).getTime(),Object.assign(this,i),this.log(`\n🚩 开始!\n${e}\n`)}environment(){switch(this.platform()){case"Surge":return $environment.app="Surge",$environment;case"Stash":return $environment.app="Stash",$environment;case"Egern":return $environment.app="Egern",$environment;case"Loon":let e=$loon.split(" ");return{device:e[0],ios:e[1],"loon-version":e[2],app:"Loon"};case"Quantumult X":return{app:"Quantumult X"};case"Node.js":return process.env.app="Node.js",process.env;default:return{}}}platform(){return"undefined"!=typeof $environment&&$environment["surge-version"]?"Surge":"undefined"!=typeof $environment&&$environment["stash-version"]?"Stash":"undefined"!=typeof module&&module.exports?"Node.js":"undefined"!=typeof $task?"Quantumult X":"undefined"!=typeof $loon?"Loon":"undefined"!=typeof $rocket?"Shadowrocket":"undefined"!=typeof Egern?"Egern":void 0}isNode(){return"Node.js"===this.platform()}isQuanX(){return"Quantumult X"===this.platform()}isSurge(){return"Surge"===this.platform()}isLoon(){return"Loon"===this.platform()}isShadowrocket(){return"Shadowrocket"===this.platform()}isStash(){return"Stash"===this.platform()}isEgern(){return"Egern"===this.platform()}async getScript(e){return await this.fetch(e).then((e=>e.body))}async runScript(e,a){let t=i.getItem("@chavy_boxjs_userCfgs.httpapi");t=t?.replace?.(/\n/g,"")?.trim();let n=i.getItem("@chavy_boxjs_userCfgs.httpapi_timeout");n=1*n??20,n=a?.timeout??n;const[s,m]=t.split("@"),r={url:`http://${m}/v1/scripting/evaluate`,body:{script_text:e,mock_type:"cron",timeout:n},headers:{"X-Key":s,Accept:"*/*"},timeout:n};await this.fetch(r).then((e=>e.body),(e=>this.logErr(e)))}initGotEnv(e){this.got=this.got?this.got:require("got"),this.cktough=this.cktough?this.cktough:require("tough-cookie"),this.ckjar=this.ckjar?this.ckjar:new this.cktough.CookieJar,e&&(e.headers=e.headers?e.headers:{},void 0===e.headers.Cookie&&void 0===e.cookieJar&&(e.cookieJar=this.ckjar))}async fetch(i={}||"",a={}){switch(i.constructor){case Object:i={...a,...i};break;case String:i={...a,url:i}}i.method||(i.method="GET",(i.body??i.bodyBytes)&&(i.method="POST")),delete i.headers?.Host,delete i.headers?.[":authority"],delete i.headers?.["Content-Length"],delete i.headers?.["content-length"];const t=i.method.toLocaleLowerCase();switch(this.platform()){case"Loon":case"Surge":case"Stash":case"Egern":case"Shadowrocket":default:return i.timeout&&(i.timeout=parseInt(i.timeout,10),this.isSurge()||(i.timeout=1e3*i.timeout)),i.policy&&(this.isLoon()&&(i.node=i.policy),this.isStash()&&e.set(i,"headers.X-Stash-Selected-Proxy",encodeURI(i.policy)),this.isShadowrocket()&&e.set(i,"headers.X-Surge-Proxy",i.policy)),"boolean"==typeof i.redirection&&(i["auto-redirect"]=i.redirection),i.bodyBytes&&!i.body&&(i.body=i.bodyBytes,delete i.bodyBytes),await new Promise(((e,a)=>{$httpClient[t](i,((t,n,s)=>{t?a(t):(n.ok=/^2\d\d$/.test(n.status),n.statusCode=n.status,s&&(n.body=s,1==i["binary-mode"]&&(n.bodyBytes=s)),e(n))}))}));case"Quantumult X":return i.policy&&e.set(i,"opts.policy",i.policy),"boolean"==typeof i["auto-redirect"]&&e.set(i,"opts.redirection",i["auto-redirect"]),i.body instanceof ArrayBuffer?(i.bodyBytes=i.body,delete i.body):ArrayBuffer.isView(i.body)?(i.bodyBytes=i.body.buffer.slice(i.body.byteOffset,i.body.byteLength+i.body.byteOffset),delete object.body):i.body&&delete i.bodyBytes,await $task.fetch(i).then((e=>(e.ok=/^2\d\d$/.test(e.statusCode),e.status=e.statusCode,e)),(e=>Promise.reject(e.error)));case"Node.js":let a=require("iconv-lite");this.initGotEnv(i);const{url:n,...s}=i;return await this.got[t](n,s).on("redirect",((e,i)=>{try{if(e.headers["set-cookie"]){const a=e.headers["set-cookie"].map(this.cktough.Cookie.parse).toString();a&&this.ckjar.setCookieSync(a,null),i.cookieJar=this.ckjar}}catch(e){this.logErr(e)}})).then((e=>(e.statusCode=e.status,e.body=a.decode(e.rawBody,this.encoding),e.bodyBytes=e.rawBody,e)),(e=>Promise.reject(e.message)))}}time(e,i=null){const a=i?new Date(i):new Date;let t={"M+":a.getMonth()+1,"d+":a.getDate(),"H+":a.getHours(),"m+":a.getMinutes(),"s+":a.getSeconds(),"q+":Math.floor((a.getMonth()+3)/3),S:a.getMilliseconds()};/(y+)/.test(e)&&(e=e.replace(RegExp.$1,(a.getFullYear()+"").substr(4-RegExp.$1.length)));for(let i in t)new RegExp("("+i+")").test(e)&&(e=e.replace(RegExp.$1,1==RegExp.$1.length?t[i]:("00"+t[i]).substr((""+t[i]).length)));return e}msg(e=name,i="",a="",t){const n=e=>{switch(typeof e){case void 0:return e;case"string":switch(this.platform()){case"Surge":case"Stash":case"Egern":default:return{url:e};case"Loon":case"Shadowrocket":return e;case"Quantumult X":return{"open-url":e};case"Node.js":return}case"object":switch(this.platform()){case"Surge":case"Stash":case"Egern":case"Shadowrocket":default:return{url:e.url||e.openUrl||e["open-url"]};case"Loon":return{openUrl:e.openUrl||e.url||e["open-url"],mediaUrl:e.mediaUrl||e["media-url"]};case"Quantumult X":return{"open-url":e["open-url"]||e.url||e.openUrl,"media-url":e["media-url"]||e.mediaUrl,"update-pasteboard":e["update-pasteboard"]||e.updatePasteboard};case"Node.js":return}default:return}};if(!this.isMute)switch(this.platform()){case"Surge":case"Loon":case"Stash":case"Egern":case"Shadowrocket":default:$notification.post(e,i,a,n(t));break;case"Quantumult X":$notify(e,i,a,n(t));case"Node.js":}if(!this.isMuteLog){let t=["","==============📣系统通知📣=============="];t.push(e),i&&t.push(i),a&&t.push(a),console.log(t.join("\n")),this.logs=this.logs.concat(t)}}log(...e){e.length>0&&(this.logs=[...this.logs,...e]),console.log(e.join(this.logSeparator))}logErr(e){switch(this.platform()){case"Surge":case"Loon":case"Stash":case"Egern":case"Shadowrocket":case"Quantumult X":default:this.log("",`❗️ ${this.name}, 错误!`,e);break;case"Node.js":this.log("",`❗️${this.name}, 错误!`,e.stack)}}wait(e){return new Promise((i=>setTimeout(i,e)))}done(i={}){const a=((new Date).getTime()-this.startTime)/1e3;switch(this.log("",`🚩 ${this.name}, 结束! 🕛 ${a} 秒`,""),this.platform()){case"Surge":i.policy&&e.set(i,"headers.X-Surge-Policy",i.policy),$done(i);break;case"Loon":i.policy&&(i.node=i.policy),$done(i);break;case"Stash":i.policy&&e.set(i,"headers.X-Stash-Selected-Proxy",encodeURI(i.policy)),$done(i);break;case"Egern":case"Shadowrocket":default:$done(i);break;case"Quantumult X":i.policy&&e.set(i,"opts.policy",i.policy),delete i["auto-redirect"],delete i["auto-cookie"],delete i["binary-mode"],delete i.charset,delete i.host,delete i.insecure,delete i.method,delete i.opt,delete i.path,delete i.policy,delete i["policy-descriptor"],delete i.scheme,delete i.sessionIndex,delete i.statusCode,delete i.timeout,i.body instanceof ArrayBuffer?(i.bodyBytes=i.body,delete i.body):ArrayBuffer.isView(i.body)?(i.bodyBytes=i.body.buffer.slice(i.body.byteOffset,i.body.byteLength+i.body.byteOffset),delete i.body):i.body&&delete i.bodyBytes,$done(i);break;case"Node.js":process.exit(1)}}}class t{static name="XML";static version="0.4.2";static about=()=>console.log(`\n🟧 ${this.name} v${this.version}\n`);static#n="@";static#s="#";static#m={"&":"&","<":"<",">":">","'":"'",""":'"'};static#r={"&":"&","<":"<",">":">","'":"'",'"':"""};static parse(e=new String,i=""){const a=this.#m,t=this.#n,n=this.#s;let s=function e(i,a){let s;switch(typeof i){case"string":case"undefined":s=i;break;case"object":const l=i.raw,p=i.name,c=i.tag,u=i.children;s=l||(c?function(e,i){if(!e)return;const a=e.split(/([^\s='"]+(?:\s*=\s*(?:'[\S\s]*?'|"[\S\s]*?"|[^\s'"]*))?)/),n=a.length;let s,m;for(let e=0;e{"string"==typeof i?o(s,n,e(i,a),void 0):i.tag||i.children||i.raw?o(s,i.name,e(i,a),void 0):o(s,i.name,e(i,a),u?.[t-1]?.name)})),u&&0===u.length&&o(s,n,null,void 0),a&&(s=a(p||"",s))}return s;function o(e,i,a,t=i){if(void 0!==a){const n=e[t];Array.isArray(n)?n.push(a):n?e[t]=[n,a]:e[i]=a}}}(function(e){const i=e.replace(/^[ \t]+/gm,"").split(/<([^!<>?](?:'[\S\s]*?'|"[\S\s]*?"|[^'"<>])*|!(?:--[\S\s]*?--|\[[^\[\]'"<>]+\[[\S\s]*?]]|DOCTYPE[^\[<>]*?\[[\S\s]*?]|(?:ENTITY[^"<>]*?"[\S\s]*?")?[\S\s]*?)|\?[\S\s]*?\?)>/),a=i.length,t={children:[]};let n=t;const s=[];for(let e=0;e.+)\]\]/)?.groups?.raw):/!--(.+)--/.test(e)?(m.name="!--",m.raw=e.match(/!--(?.+)--/)?.groups?.raw):(m.name=a,m.raw=i.join(" ")),l(m);break;default:if(m=function(e){const i={children:[]};e=e.replace(/\s*\/?$/,"");const a=e.search(/[\s='"\/]/);a<0?i.name=e:(i.name=e.substr(0,a),i.tag=e.substr(a));return i}(e),l(m),"/"===(i?.[t-1]??a).slice(-1))delete m.children;else if("link"===a)delete m.children;else s.push(n),n=m}}function o(e){(e=function(e){return e?.replace?.(/^(\r\n|\r|\n|\t)+|(\r\n|\r|\n|\t)+$/g,"")}(e))&&l(r(e))}function l(e){n.children.push(e)}}(e),i);return s;function m(e,i){let a;switch(typeof e){case"string":case"undefined":a=e;break;case"object":const t=e.name,n=e.children;switch(a={},t){case"plist":let e=m(n[0],i);a=Object.assign(a,e);break;case"dict":let s=n.map((e=>m(e,i)));s=function(e,i){var a=0,t=[];for(;am(e,i)));break;case"key":a=n[0];break;case"true":case"false":const r=t;a=JSON.parse(r);break;case"integer":const o=n[0];a=BigInt(o);break;case"real":const l=n[0];a=parseFloat(l);break;case"string":a=n[0]}i&&(a=i(t||"",a))}return a}function r(e){return e.replace(/(&(?:lt|gt|amp|apos|quot|#(?:\d{1,6}|x[0-9a-fA-F]{1,5}));)/g,(function(e){if("#"===e[1]){const i="x"===e[2]?parseInt(e.substr(3),16):parseInt(e.substr(2),10);if(i>-1)return String.fromCharCode(i)}return a[e]||e}))}}static stringify(e=new Object,i=""){this.#r;const a=this.#n,t=this.#s;let n="";for(let i in e)n+=s(e[i],i,"");return n=i?n.replace(/\t/g,i):n.replace(/\t|\n/g,""),n;function s(e,i,n){let r="";switch(typeof e){case"object":if(Array.isArray(e))r=e.reduce(((e,a)=>e+`${n}${s(a,i,`${n}\t`)}\n`),"");else{let o="",l=!1;for(let t in e)t[0]===a?(o+=` ${t.substring(1)}="${e[t].toString()}"`,delete e[t]):void 0===e[t]?i=t:l=!0;if(r+=`${n}<${i}${o}${l||"link"===i?"":"/"}>`,l){if("plist"===i)r+=m(e,i,`${n}\t`);else for(let i in e)if(i===t)r+=e[i]??"";else r+=s(e[i],i,`${n}\t`);r+=("\n"===r.slice(-1)?n:"")+``}}break;case"string":switch(i){case"?xml":r+=`${n}<${i} ${e.toString()}>`;break;case"?":r+=`${n}<${i}${e.toString()}${i}>`;break;case"!--":r+=`${n}\x3c!--${e.toString()}--\x3e`;break;case"!DOCTYPE":r+=`${n}<${i} ${e.toString()}>`;break;case"!CDATA":r+=`${n}`;break;case t:r+=e;break;default:r+=`${n}<${i}>${e.toString()}`}break;case"undefined":r+=n+`<${i.toString()}/>`}return r}function m(e,i,a){let t="";switch(typeof e){case"boolean":t=`${a}<${e.toString()}/>`;break;case"number":t=`${a}${e.toString()}`;break;case"bigint":t=`${a}${e.toString()}`;break;case"string":t=`${a}${e.toString()}`;break;case"object":let r="";if(Array.isArray(e)){for(var n=0,s=e.length;n${r}${a}`}else{let i="";Object.entries(e).forEach((([e,t])=>{i+=`${a}${e}`,i+=m(t,e,a)})),t=`${a}${i}${a}`}}return t}}}var n={Switch:!0},s={Storefront:[["AE","143481"],["AF","143610"],["AG","143540"],["AI","143538"],["AL","143575"],["AM","143524"],["AO","143564"],["AR","143505"],["AT","143445"],["AU","143460"],["AZ","143568"],["BA","143612"],["BB","143541"],["BD","143490"],["BE","143446"],["BF","143578"],["BG","143526"],["BH","143559"],["BJ","143576"],["BM","143542"],["BN","143560"],["BO","143556"],["BR","143503"],["BS","143539"],["BT","143577"],["BW","143525"],["BY","143565"],["BZ","143555"],["CA","143455"],["CD","143613"],["CG","143582"],["CH","143459"],["CI","143527"],["CL","143483"],["CM","143574"],["CN","143465"],["CO","143501"],["CR","143495"],["CV","143580"],["CY","143557"],["CZ","143489"],["DE","143443"],["DK","143458"],["DM","143545"],["DO","143508"],["DZ","143563"],["EC","143509"],["EE","143518"],["EG","143516"],["ES","143454"],["FI","143447"],["FJ","143583"],["FM","143591"],["FR","143442"],["GA","143614"],["GB","143444"],["GD","143546"],["GF","143615"],["GH","143573"],["GM","143584"],["GR","143448"],["GT","143504"],["GW","143585"],["GY","143553"],["HK","143463"],["HN","143510"],["HR","143494"],["HU","143482"],["ID","143476"],["IE","143449"],["IL","143491"],["IN","143467"],["IQ","143617"],["IS","143558"],["IT","143450"],["JM","143511"],["JO","143528"],["JP","143462"],["KE","143529"],["KG","143586"],["KH","143579"],["KN","143548"],["KP","143466"],["KR","143466"],["KW","143493"],["KY","143544"],["KZ","143517"],["TC","143552"],["TD","143581"],["TJ","143603"],["TH","143475"],["TM","143604"],["TN","143536"],["TO","143608"],["TR","143480"],["TT","143551"],["TW","143470"],["TZ","143572"],["LA","143587"],["LB","143497"],["LC","143549"],["LI","143522"],["LK","143486"],["LR","143588"],["LT","143520"],["LU","143451"],["LV","143519"],["LY","143567"],["MA","143620"],["MD","143523"],["ME","143619"],["MG","143531"],["MK","143530"],["ML","143532"],["MM","143570"],["MN","143592"],["MO","143515"],["MR","143590"],["MS","143547"],["MT","143521"],["MU","143533"],["MV","143488"],["MW","143589"],["MX","143468"],["MY","143473"],["MZ","143593"],["NA","143594"],["NE","143534"],["NG","143561"],["NI","143512"],["NL","143452"],["NO","143457"],["NP","143484"],["NR","143606"],["NZ","143461"],["OM","143562"],["PA","143485"],["PE","143507"],["PG","143597"],["PH","143474"],["PK","143477"],["PL","143478"],["PT","143453"],["PW","143595"],["PY","143513"],["QA","143498"],["RO","143487"],["RS","143500"],["RU","143469"],["RW","143621"],["SA","143479"],["SB","143601"],["SC","143599"],["SE","143456"],["SG","143464"],["SI","143499"],["SK","143496"],["SL","143600"],["SN","143535"],["SR","143554"],["ST","143598"],["SV","143506"],["SZ","143602"],["UA","143492"],["UG","143537"],["US","143441"],["UY","143514"],["UZ","143566"],["VC","143550"],["VE","143502"],["VG","143543"],["VN","143471"],["VU","143609"],["XK","143624"],["YE","143571"],["ZA","143472"],["ZM","143622"],["ZW","143605"]]},m={Settings:n,Configs:s},r={Switch:!0,PEP:{GCC:"US"}},o={Settings:r},l={Switch:!0,UrlInfoSet:{Dispatcher:"AutoNavi",Directions:"AutoNavi",RAP:"Apple",LocationShift:"AUTO"},TileSet:{Map:"CN",Satellite:"HYBRID",Traffic:"CN",POI:"CN",Flyover:"XX",Munin:"XX"},GeoManifest:{Dynamic:{Config:{CountryCode:{default:"CN",iOS:"AUTO",iPadOS:"AUTO",watchOS:"US",macOS:"AUTO"}}}},Config:{Announcements:{"Environment:":{default:"AUTO",iOS:"AUTO",iPadOS:"AUTO",watchOS:"AUTO",macOS:"AUTO"}}}},p={CN:{tileSet:[{style:1,validVersion:[{identifier:2112,availableTiles:[{minX:0,minY:0,maxX:1,maxY:1,minZ:1,maxZ:1},{minX:0,minY:0,maxX:3,maxY:3,minZ:2,maxZ:2},{minX:0,minY:0,maxX:7,maxY:7,minZ:3,maxZ:3},{minX:0,minY:0,maxX:15,maxY:15,minZ:4,maxZ:4},{minX:0,minY:0,maxX:31,maxY:31,minZ:5,maxZ:5},{minX:0,minY:0,maxX:63,maxY:63,minZ:6,maxZ:6},{minX:0,minY:0,maxX:127,maxY:127,minZ:7,maxZ:7},{minX:0,minY:0,maxX:255,maxY:255,minZ:8,maxZ:8},{minX:0,minY:0,maxX:1023,maxY:1023,minZ:10,maxZ:10},{minX:0,minY:0,maxX:4095,maxY:4095,minZ:12,maxZ:12},{minX:0,minY:0,maxX:16383,maxY:16383,minZ:14,maxZ:14}],genericTile:[],supportedLanguagesVersion:1}],scale:0,size:2,supportedLanguage:[{identifier:1,language:["ar","ca","cs","da","de","el","en","en-AU","en-GB","es","es-MX","fi","fr","fr-CA","he","hi","hr","hu","id","it","ja","ko","ms","nb","nl","pl","pt","pt-PT","ro","ru","sk","sv","th","tr","uk","vi","zh-Hans","zh-Hant","zh-HK"]}],countryRegionWhitelist:[{countryCode:"AE",region:"AE"},{countryCode:"AE",region:"SA"},{countryCode:"IN",region:"IN"},{countryCode:"JP",region:"JP"},{countryCode:"KR",region:"KR"},{countryCode:"MA",region:"MA"},{countryCode:"RU",region:"RU"},{countryCode:"SA",region:"AE"},{countryCode:"SA",region:"SA"}],checksumType:0,requestStyle:1,deviceSKUWhitelist:[],baseURL:"https://gspe19-cn-ssl.ls.apple.com/tiles?flags=8",supportsMultipathTCP:!1},{style:7,validVersion:[{identifier:51,availableTiles:[{minX:0,minY:0,maxX:1,maxY:1,minZ:1,maxZ:7},{minX:179,minY:80,maxX:224,maxY:128,minZ:8,maxZ:8},{minX:359,minY:161,maxX:449,maxY:257,minZ:9,maxZ:9},{minX:719,minY:323,maxX:898,maxY:915,minZ:10,maxZ:10},{minX:1438,minY:646,maxX:1797,maxY:1031,minZ:11,maxZ:11},{minX:2876,minY:1292,maxX:3594,maxY:2062,minZ:12,maxZ:12},{minX:5752,minY:2584,maxX:7188,maxY:4124,minZ:13,maxZ:13},{minX:11504,minY:5168,maxX:14376,maxY:8248,minZ:14,maxZ:14},{minX:23008,minY:10336,maxX:28752,maxY:16496,minZ:15,maxZ:15},{minX:46016,minY:20672,maxX:57504,maxY:32992,minZ:16,maxZ:16},{minX:92032,minY:41344,maxX:115008,maxY:65984,minZ:17,maxZ:17},{minX:184064,minY:82668,maxX:230016,maxY:131976,minZ:18,maxZ:18}],genericTile:[{tileType:2,textureIndex:0,resourceIndex:1971}]}],scale:1,size:1,supportedLanguage:[],countryRegionWhitelist:[],checksumType:0,requestStyle:0,deviceSKUWhitelist:[],baseURL:"https://gspe11-2-cn-ssl.ls.apple.com/2/tiles",supportsMultipathTCP:!1},{style:7,validVersion:[{identifier:51,availableTiles:[{minX:0,minY:0,maxX:1,maxY:1,minZ:1,maxZ:7},{minX:179,minY:80,maxX:224,maxY:128,minZ:8,maxZ:8},{minX:359,minY:161,maxX:449,maxY:257,minZ:9,maxZ:9},{minX:719,minY:323,maxX:898,maxY:915,minZ:10,maxZ:10},{minX:1438,minY:646,maxX:1797,maxY:1031,minZ:11,maxZ:11},{minX:2876,minY:1292,maxX:3594,maxY:2062,minZ:12,maxZ:12},{minX:5752,minY:2584,maxX:7188,maxY:4124,minZ:13,maxZ:13},{minX:11504,minY:5168,maxX:14376,maxY:8248,minZ:14,maxZ:14},{minX:23008,minY:10336,maxX:28752,maxY:16496,minZ:15,maxZ:15},{minX:46016,minY:20672,maxX:57504,maxY:32992,minZ:16,maxZ:16},{minX:92032,minY:41344,maxX:115008,maxY:65984,minZ:17,maxZ:17},{minX:184064,minY:82668,maxX:230016,maxY:131976,minZ:18,maxZ:18}],genericTile:[{tileType:2,textureIndex:0,resourceIndex:1971}]}],scale:2,size:1,supportedLanguage:[],countryRegionWhitelist:[],checksumType:0,requestStyle:0,deviceSKUWhitelist:[],baseURL:"https://gspe11-2-cn-ssl.ls.apple.com/2/tiles",supportsMultipathTCP:!1},{style:11,validVersion:[{identifier:470,availableTiles:[{minX:0,minY:0,maxX:8191,maxY:8191,minZ:13,maxZ:13},{minX:0,minY:0,maxX:16383,maxY:16383,minZ:14,maxZ:14},{minX:0,minY:0,maxX:32767,maxY:32767,minZ:15,maxZ:15}],genericTile:[]}],scale:0,size:2,supportedLanguage:[],countryRegionWhitelist:[],checksumType:0,requestStyle:1,deviceSKUWhitelist:[],baseURL:"https://gspe19-cn-ssl.ls.apple.com/tiles?flags=1",supportsMultipathTCP:!1},{style:12,validVersion:[{identifier:2111,availableTiles:[{minX:0,minY:0,maxX:255,maxY:255,minZ:8,maxZ:8},{minX:0,minY:0,maxX:4095,maxY:4095,minZ:12,maxZ:12}],genericTile:[],timeToLiveSeconds:120}],scale:0,size:2,supportedLanguage:[],countryRegionWhitelist:[],checksumType:0,requestStyle:0,deviceSKUWhitelist:[],baseURL:"https://gspe12-cn-ssl.ls.apple.com/traffic",supportsMultipathTCP:!1},{style:13,validVersion:[{identifier:2092,availableTiles:[{minX:0,minY:0,maxX:1,maxY:1,minZ:1,maxZ:2},{minX:0,minY:0,maxX:15,maxY:15,minZ:4,maxZ:4},{minX:0,minY:0,maxX:63,maxY:63,minZ:6,maxZ:10},{minX:0,minY:0,maxX:4095,maxY:4095,minZ:12,maxZ:15},{minX:0,minY:0,maxX:65535,maxY:65535,minZ:16,maxZ:16},{minX:0,minY:0,maxX:131071,maxY:131071,minZ:17,maxZ:17}],genericTile:[],timeToLiveSeconds:604800,supportedLanguagesVersion:1}],scale:0,size:2,supportedLanguage:[{identifier:1,language:["ar","ca","cs","da","de","el","en","en-AU","en-GB","es","es-MX","fi","fr","fr-CA","he","hi","hr","hu","id","it","ja","ko","ms","nb","nl","pl","pt","pt-PT","ro","ru","sk","sv","th","tr","uk","vi","zh-Hans","zh-Hant","zh-HK"]}],countryRegionWhitelist:[],checksumType:0,requestStyle:1,deviceSKUWhitelist:[],baseURL:"https://gspe19-cn-ssl.ls.apple.com/tiles?flags=2",supportsMultipathTCP:!1},{style:18,validVersion:[{identifier:2112,availableTiles:[{minX:0,minY:0,maxX:32767,maxY:32767,minZ:15,maxZ:15}],genericTile:[],supportedLanguagesVersion:1}],scale:0,size:2,supportedLanguage:[{identifier:1,language:["ar","ca","cs","da","de","el","en","en-AU","en-GB","es","es-MX","fi","fr","fr-CA","he","hi","hr","hu","id","it","ja","ko","ms","nb","nl","pl","pt","pt-PT","ro","ru","sk","sv","th","tr","uk","vi","zh-Hans","zh-Hant","zh-HK"]}],countryRegionWhitelist:[],checksumType:0,requestStyle:1,deviceSKUWhitelist:[],baseURL:"https://gspe19-cn-ssl.ls.apple.com/tiles",supportsMultipathTCP:!1},{style:20,validVersion:[{identifier:2112,availableTiles:[{minX:0,minY:0,maxX:1,maxY:1,minZ:1,maxZ:1},{minX:0,minY:0,maxX:3,maxY:3,minZ:2,maxZ:2},{minX:0,minY:0,maxX:7,maxY:7,minZ:3,maxZ:3},{minX:0,minY:0,maxX:15,maxY:15,minZ:4,maxZ:4},{minX:0,minY:0,maxX:31,maxY:31,minZ:5,maxZ:5},{minX:0,minY:0,maxX:63,maxY:63,minZ:6,maxZ:6},{minX:0,minY:0,maxX:127,maxY:127,minZ:7,maxZ:7},{minX:0,minY:0,maxX:255,maxY:255,minZ:8,maxZ:8},{minX:0,minY:0,maxX:511,maxY:511,minZ:9,maxZ:9},{minX:0,minY:0,maxX:1023,maxY:1023,minZ:10,maxZ:10},{minX:0,minY:0,maxX:2047,maxY:2047,minZ:11,maxZ:11},{minX:0,minY:0,maxX:4095,maxY:4095,minZ:12,maxZ:12},{minX:0,minY:0,maxX:8191,maxY:8191,minZ:13,maxZ:13},{minX:0,minY:0,maxX:16383,maxY:16383,minZ:14,maxZ:14},{minX:0,minY:0,maxX:32767,maxY:32767,minZ:15,maxZ:15}],genericTile:[],supportedLanguagesVersion:1}],scale:0,size:2,supportedLanguage:[{identifier:1,language:["ar","ca","cs","da","de","el","en","en-AU","en-GB","es","es-MX","fi","fr","fr-CA","he","hi","hr","hu","id","it","ja","ko","ms","nb","nl","pl","pt","pt-PT","ro","ru","sk","sv","th","tr","uk","vi","zh-Hans","zh-Hant","zh-HK"]}],countryRegionWhitelist:[{countryCode:"AE",region:"AE"},{countryCode:"AE",region:"SA"},{countryCode:"IN",region:"IN"},{countryCode:"JP",region:"JP"},{countryCode:"KR",region:"KR"},{countryCode:"MA",region:"MA"},{countryCode:"RU",region:"RU"},{countryCode:"SA",region:"AE"},{countryCode:"SA",region:"SA"}],checksumType:0,requestStyle:1,deviceSKUWhitelist:[],baseURL:"https://gspe19-cn-ssl.ls.apple.com/tiles",supportsMultipathTCP:!1},{style:22,validVersion:[{identifier:2112,availableTiles:[{minX:0,minY:0,maxX:127,maxY:127,minZ:7,maxZ:15}],genericTile:[]}],scale:0,size:2,supportedLanguage:[],countryRegionWhitelist:[],checksumType:0,requestStyle:1,deviceSKUWhitelist:[],baseURL:"https://gspe19-cn-ssl.ls.apple.com/tiles",supportsMultipathTCP:!1},{style:30,validVersion:[{identifier:146,availableTiles:[{minX:0,minY:0,maxX:1023,maxY:1023,minZ:10,maxZ:10},{minX:0,minY:0,maxX:32767,maxY:32767,minZ:15,maxZ:15},{minX:0,minY:0,maxX:262143,maxY:262143,minZ:18,maxZ:18}],genericTile:[],supportedLanguagesVersion:1}],scale:0,size:2,supportedLanguage:[{identifier:1,language:["ar","ca","cs","da","de","el","en","en-AU","en-GB","es","es-MX","fi","fr","fr-CA","he","hi","hr","hu","id","it","ja","ko","ms","nb","nl","pl","pt","pt-PT","ro","ru","sk","sv","th","tr","uk","vi","zh-Hans","zh-Hant","zh-HK"]}],countryRegionWhitelist:[],checksumType:0,requestStyle:1,deviceSKUWhitelist:[],baseURL:"https://gspe19-cn-ssl.ls.apple.com/tiles",supportsMultipathTCP:!1},{style:37,validVersion:[{identifier:1904,availableTiles:[{minX:0,minY:0,maxX:1,maxY:1,minZ:1,maxZ:1},{minX:0,minY:0,maxX:7,maxY:7,minZ:3,maxZ:3},{minX:0,minY:0,maxX:31,maxY:31,minZ:5,maxZ:5},{minX:0,minY:0,maxX:127,maxY:127,minZ:7,maxZ:7},{minX:0,minY:0,maxX:511,maxY:511,minZ:9,maxZ:9},{minX:0,minY:0,maxX:1023,maxY:1023,minZ:10,maxZ:10},{minX:0,minY:0,maxX:2047,maxY:2047,minZ:11,maxZ:11},{minX:0,minY:0,maxX:8191,maxY:8191,minZ:13,maxZ:13},{minX:0,minY:0,maxX:16383,maxY:16383,minZ:14,maxZ:14},{minX:0,minY:0,maxX:32767,maxY:32767,minZ:15,maxZ:15}],genericTile:[],supportedLanguagesVersion:1}],scale:0,size:2,supportedLanguage:[{identifier:1,language:["ar","ca","cs","da","de","el","en","en-AU","en-GB","es","es-MX","fi","fr","fr-CA","he","hi","hr","hu","id","it","ja","ko","ms","nb","nl","pl","pt","pt-PT","ro","ru","sk","sv","th","tr","uk","vi","zh-Hans","zh-Hant","zh-HK"]}],countryRegionWhitelist:[],checksumType:0,requestStyle:1,deviceSKUWhitelist:[],baseURL:"https://gspe19-cn-ssl.ls.apple.com/tiles?flags=2",supportsMultipathTCP:!1},{style:47,validVersion:[{identifier:1904,availableTiles:[{minX:0,minY:0,maxX:1,maxY:1,minZ:1,maxZ:1},{minX:0,minY:0,maxX:7,maxY:7,minZ:3,maxZ:3},{minX:0,minY:0,maxX:31,maxY:31,minZ:5,maxZ:5},{minX:0,minY:0,maxX:127,maxY:127,minZ:7,maxZ:7},{minX:0,minY:0,maxX:511,maxY:511,minZ:9,maxZ:9},{minX:0,minY:0,maxX:1023,maxY:1023,minZ:10,maxZ:10},{minX:0,minY:0,maxX:2047,maxY:2047,minZ:11,maxZ:11},{minX:0,minY:0,maxX:8191,maxY:8191,minZ:13,maxZ:13},{minX:0,minY:0,maxX:16383,maxY:16383,minZ:14,maxZ:14},{minX:0,minY:0,maxX:32767,maxY:32767,minZ:15,maxZ:15}],genericTile:[],supportedLanguagesVersion:1}],scale:0,size:2,supportedLanguage:[{identifier:1,language:["ar","ca","cs","da","de","el","en","en-AU","en-GB","es","es-MX","fi","fr","fr-CA","he","hi","hr","hu","id","it","ja","ko","ms","nb","nl","pl","pt","pt-PT","ro","ru","sk","sv","th","tr","uk","vi","zh-Hans","zh-Hant","zh-HK"]}],countryRegionWhitelist:[],checksumType:0,requestStyle:1,deviceSKUWhitelist:[],baseURL:"https://gspe19-cn-ssl.ls.apple.com/tiles",supportsMultipathTCP:!1},{style:48,validVersion:[{identifier:1904,availableTiles:[{minX:0,minY:0,maxX:4095,maxY:4095,minZ:12,maxZ:12},{minX:0,minY:0,maxX:32767,maxY:32767,minZ:15,maxZ:15}],genericTile:[]}],scale:0,size:2,supportedLanguage:[],countryRegionWhitelist:[],checksumType:0,requestStyle:1,deviceSKUWhitelist:[],baseURL:"https://gspe19-cn-ssl.ls.apple.com/tiles",supportsMultipathTCP:!1},{style:53,validVersion:[{identifier:2112,availableTiles:[{minX:0,minY:0,maxX:32767,maxY:32767,minZ:15,maxZ:15}],genericTile:[],supportedLanguagesVersion:1}],scale:0,size:2,supportedLanguage:[{identifier:1,language:["ar","ca","cs","da","de","el","en","en-AU","en-GB","es","es-MX","fi","fr","fr-CA","he","hi","hr","hu","id","it","ja","ko","ms","nb","nl","pl","pt","pt-PT","ro","ru","sk","sv","th","tr","uk","vi","zh-Hans","zh-Hant","zh-HK"]}],countryRegionWhitelist:[],checksumType:0,requestStyle:1,deviceSKUWhitelist:[],baseURL:"https://gspe19-cn-ssl.ls.apple.com/tiles",supportsMultipathTCP:!1},{style:54,validVersion:[{identifier:2112,availableTiles:[{minX:0,minY:0,maxX:8191,maxY:8191,minZ:13,maxZ:13},{minX:0,minY:0,maxX:32767,maxY:32767,minZ:15,maxZ:15}],genericTile:[]}],scale:0,size:2,supportedLanguage:[],countryRegionWhitelist:[],checksumType:0,requestStyle:1,deviceSKUWhitelist:[],baseURL:"https://gspe19-cn-ssl.ls.apple.com/tiles",supportsMultipathTCP:!1},{style:56,validVersion:[{identifier:16,availableTiles:[{minX:0,minY:0,maxX:131071,maxY:131071,minZ:17,maxZ:17}],genericTile:[],supportedLanguagesVersion:1}],scale:0,size:2,supportedLanguage:[{identifier:1,language:["ar","ca","cs","da","de","el","en","en-AU","en-GB","es","es-MX","fi","fr","fr-CA","he","hi","hr","hu","id","it","ja","ko","ms","nb","nl","pl","pt","pt-PT","ro","ru","sk","sv","th","tr","uk","vi","zh-Hans","zh-Hant","zh-HK"]}],countryRegionWhitelist:[],checksumType:0,requestStyle:0,deviceSKUWhitelist:[],baseURL:"https://gspe19-cn-ssl.ls.apple.com/tiles",supportsMultipathTCP:!1},{style:57,validVersion:[{identifier:0,availableTiles:[{minX:0,minY:0,maxX:131071,maxY:131071,minZ:17,maxZ:17}],genericTile:[],timeToLiveSeconds:3600}],scale:0,size:2,supportedLanguage:[],countryRegionWhitelist:[],checksumType:0,requestStyle:1,deviceSKUWhitelist:[],baseURL:"https://gsp76-cn-ssl.ls.apple.com/api/tile",supportsMultipathTCP:!1},{style:58,validVersion:[{identifier:137,availableTiles:[{minX:0,minY:0,maxX:1,maxY:1,minZ:1,maxZ:1},{minX:0,minY:0,maxX:3,maxY:3,minZ:2,maxZ:2},{minX:0,minY:0,maxX:7,maxY:7,minZ:3,maxZ:3},{minX:0,minY:0,maxX:15,maxY:15,minZ:4,maxZ:4},{minX:0,minY:0,maxX:31,maxY:31,minZ:5,maxZ:5},{minX:0,minY:0,maxX:63,maxY:63,minZ:6,maxZ:6},{minX:0,minY:0,maxX:127,maxY:127,minZ:7,maxZ:7},{minX:0,minY:0,maxX:255,maxY:255,minZ:8,maxZ:8},{minX:0,minY:0,maxX:511,maxY:511,minZ:9,maxZ:9},{minX:0,minY:0,maxX:1023,maxY:1023,minZ:10,maxZ:10},{minX:0,minY:0,maxX:2047,maxY:2047,minZ:11,maxZ:11},{minX:0,minY:0,maxX:4095,maxY:4095,minZ:12,maxZ:12},{minX:0,minY:0,maxX:8191,maxY:8191,minZ:13,maxZ:13},{minX:0,minY:0,maxX:16383,maxY:16383,minZ:14,maxZ:14},{minX:0,minY:0,maxX:32767,maxY:32767,minZ:15,maxZ:15},{minX:0,minY:0,maxX:65535,maxY:65535,minZ:16,maxZ:16},{minX:0,minY:0,maxX:131071,maxY:131071,minZ:17,maxZ:17}],genericTile:[]}],scale:0,size:2,supportedLanguage:[],countryRegionWhitelist:[],checksumType:0,requestStyle:0,deviceSKUWhitelist:[],baseURL:"https://gspe19-cn-ssl.ls.apple.com/tiles",supportsMultipathTCP:!1},{style:59,validVersion:[{identifier:80,availableTiles:[{minX:0,minY:0,maxX:1,maxY:1,minZ:1,maxZ:1}],genericTile:[]}],scale:0,size:2,supportedLanguage:[],countryRegionWhitelist:[],checksumType:0,requestStyle:0,deviceSKUWhitelist:[],baseURL:"https://gspe19-cn-ssl.ls.apple.com/asset/v3/model",supportsMultipathTCP:!1},{style:60,validVersion:[{identifier:30,availableTiles:[{minX:0,minY:0,maxX:1,maxY:1,minZ:1,maxZ:1},{minX:0,minY:0,maxX:3,maxY:3,minZ:2,maxZ:2},{minX:0,minY:0,maxX:7,maxY:7,minZ:3,maxZ:3},{minX:0,minY:0,maxX:15,maxY:15,minZ:4,maxZ:4},{minX:0,minY:0,maxX:31,maxY:31,minZ:5,maxZ:5},{minX:0,minY:0,maxX:63,maxY:63,minZ:6,maxZ:6},{minX:0,minY:0,maxX:127,maxY:127,minZ:7,maxZ:7},{minX:0,minY:0,maxX:255,maxY:255,minZ:8,maxZ:8},{minX:0,minY:0,maxX:511,maxY:511,minZ:9,maxZ:9}],genericTile:[]}],scale:0,size:2,supportedLanguage:[],countryRegionWhitelist:[],checksumType:0,requestStyle:0,deviceSKUWhitelist:[],baseURL:"https://gspe19-cn-ssl.ls.apple.com/asset/v3/material",supportsMultipathTCP:!1},{style:61,validVersion:[{identifier:30,availableTiles:[{minX:0,minY:0,maxX:127,maxY:127,minZ:7,maxZ:7}],genericTile:[]}],scale:0,size:2,supportedLanguage:[],countryRegionWhitelist:[],checksumType:0,requestStyle:0,deviceSKUWhitelist:[],baseURL:"https://gspe19-cn-ssl.ls.apple.com/tiles",supportsMultipathTCP:!1},{style:64,validVersion:[{identifier:16,availableTiles:[{minX:0,minY:0,maxX:4095,maxY:4095,minZ:12,maxZ:12}],genericTile:[],supportedLanguagesVersion:1}],scale:0,size:2,supportedLanguage:[{identifier:1,language:["ar","ca","cs","da","de","el","en","en-AU","en-GB","es","es-MX","fi","fr","fr-CA","he","hi","hr","hu","id","it","ja","ko","ms","nb","nl","pl","pt","pt-PT","ro","ru","sk","sv","th","tr","uk","vi","zh-Hans","zh-Hant","zh-HK"]}],countryRegionWhitelist:[],checksumType:0,requestStyle:0,deviceSKUWhitelist:[],baseURL:"https://gspe19-cn-ssl.ls.apple.com/tiles",supportsMultipathTCP:!1},{style:65,validVersion:[{identifier:2,availableTiles:[{minX:0,minY:0,maxX:255,maxY:255,minZ:8,maxZ:8}],genericTile:[],timeToLiveSeconds:3600}],scale:0,size:2,supportedLanguage:[],countryRegionWhitelist:[],checksumType:0,requestStyle:1,deviceSKUWhitelist:[],baseURL:"https://gspe79-cn-ssl.ls.apple.com/65/v1",supportsMultipathTCP:!1},{style:66,validVersion:[{identifier:2112,availableTiles:[{minX:0,minY:0,maxX:1,maxY:1,minZ:1,maxZ:1},{minX:0,minY:0,maxX:3,maxY:3,minZ:2,maxZ:2},{minX:0,minY:0,maxX:7,maxY:7,minZ:3,maxZ:3},{minX:0,minY:0,maxX:15,maxY:15,minZ:4,maxZ:4},{minX:0,minY:0,maxX:31,maxY:31,minZ:5,maxZ:5},{minX:0,minY:0,maxX:63,maxY:63,minZ:6,maxZ:6},{minX:0,minY:0,maxX:127,maxY:127,minZ:7,maxZ:7},{minX:0,minY:0,maxX:255,maxY:255,minZ:8,maxZ:8},{minX:0,minY:0,maxX:511,maxY:511,minZ:9,maxZ:9},{minX:0,minY:0,maxX:1023,maxY:1023,minZ:10,maxZ:10},{minX:0,minY:0,maxX:2047,maxY:2047,minZ:11,maxZ:11},{minX:0,minY:0,maxX:4095,maxY:4095,minZ:12,maxZ:12},{minX:0,minY:0,maxX:8191,maxY:8191,minZ:13,maxZ:13},{minX:0,minY:0,maxX:16383,maxY:16383,minZ:14,maxZ:14},{minX:0,minY:0,maxX:32767,maxY:32767,minZ:15,maxZ:15}],genericTile:[],supportedLanguagesVersion:1}],scale:0,size:2,supportedLanguage:[{identifier:1,language:["ar","ca","cs","da","de","el","en","en-AU","en-GB","es","es-MX","fi","fr","fr-CA","he","hi","hr","hu","id","it","ja","ko","ms","nb","nl","pl","pt","pt-PT","ro","ru","sk","sv","th","tr","uk","vi","zh-Hans","zh-Hant","zh-HK"]}],countryRegionWhitelist:[{countryCode:"AE",region:"AE"},{countryCode:"AE",region:"SA"},{countryCode:"IN",region:"IN"},{countryCode:"JP",region:"JP"},{countryCode:"KR",region:"KR"},{countryCode:"MA",region:"MA"},{countryCode:"RU",region:"RU"},{countryCode:"SA",region:"AE"},{countryCode:"SA",region:"SA"}],checksumType:0,requestStyle:0,deviceSKUWhitelist:[],baseURL:"https://gspe19-cn-ssl.ls.apple.com/tiles",supportsMultipathTCP:!1},{style:67,validVersion:[{identifier:2112,availableTiles:[{minX:0,minY:0,maxX:1,maxY:1,minZ:1,maxZ:1},{minX:0,minY:0,maxX:3,maxY:3,minZ:2,maxZ:2},{minX:0,minY:0,maxX:7,maxY:7,minZ:3,maxZ:3},{minX:0,minY:0,maxX:15,maxY:15,minZ:4,maxZ:4},{minX:0,minY:0,maxX:31,maxY:31,minZ:5,maxZ:5},{minX:0,minY:0,maxX:63,maxY:63,minZ:6,maxZ:6},{minX:0,minY:0,maxX:127,maxY:127,minZ:7,maxZ:7},{minX:0,minY:0,maxX:255,maxY:255,minZ:8,maxZ:8},{minX:0,minY:0,maxX:1023,maxY:1023,minZ:10,maxZ:10},{minX:0,minY:0,maxX:4095,maxY:4095,minZ:12,maxZ:12},{minX:0,minY:0,maxX:16383,maxY:16383,minZ:14,maxZ:14}],genericTile:[],supportedLanguagesVersion:1}],scale:0,size:2,supportedLanguage:[{identifier:1,language:["ar","ca","cs","da","de","el","en","en-AU","en-GB","es","es-MX","fi","fr","fr-CA","he","hi","hr","hu","id","it","ja","ko","ms","nb","nl","pl","pt","pt-PT","ro","ru","sk","sv","th","tr","uk","vi","zh-Hans","zh-Hant","zh-HK"]}],countryRegionWhitelist:[{countryCode:"AE",region:"AE"},{countryCode:"AE",region:"SA"},{countryCode:"IN",region:"IN"},{countryCode:"JP",region:"JP"},{countryCode:"KR",region:"KR"},{countryCode:"MA",region:"MA"},{countryCode:"RU",region:"RU"},{countryCode:"SA",region:"AE"},{countryCode:"SA",region:"SA"}],checksumType:0,requestStyle:0,deviceSKUWhitelist:[],baseURL:"https://gspe19-cn-ssl.ls.apple.com/tiles",supportsMultipathTCP:!1},{style:68,validVersion:[{identifier:2092,availableTiles:[{minX:0,minY:0,maxX:1,maxY:1,minZ:1,maxZ:1},{minX:0,minY:0,maxX:3,maxY:3,minZ:2,maxZ:2},{minX:0,minY:0,maxX:15,maxY:15,minZ:4,maxZ:4},{minX:0,minY:0,maxX:63,maxY:63,minZ:6,maxZ:6},{minX:0,minY:0,maxX:127,maxY:127,minZ:7,maxZ:7},{minX:0,minY:0,maxX:255,maxY:255,minZ:8,maxZ:8},{minX:0,minY:0,maxX:511,maxY:511,minZ:9,maxZ:9},{minX:0,minY:0,maxX:1023,maxY:1023,minZ:10,maxZ:10},{minX:0,minY:0,maxX:4095,maxY:4095,minZ:12,maxZ:12},{minX:0,minY:0,maxX:8191,maxY:8191,minZ:13,maxZ:13},{minX:0,minY:0,maxX:16383,maxY:16383,minZ:14,maxZ:14},{minX:0,minY:0,maxX:32767,maxY:32767,minZ:15,maxZ:15},{minX:0,minY:0,maxX:65535,maxY:65535,minZ:16,maxZ:16},{minX:0,minY:0,maxX:131071,maxY:131071,minZ:17,maxZ:17}],genericTile:[],supportedLanguagesVersion:1}],scale:0,size:2,supportedLanguage:[{identifier:1,language:["ar","ca","cs","da","de","el","en","en-AU","en-GB","es","es-MX","fi","fr","fr-CA","he","hi","hr","hu","id","it","ja","ko","ms","nb","nl","pl","pt","pt-PT","ro","ru","sk","sv","th","tr","uk","vi","zh-Hans","zh-Hant","zh-HK"]}],countryRegionWhitelist:[],checksumType:0,requestStyle:0,deviceSKUWhitelist:[],baseURL:"https://gspe19-cn-ssl.ls.apple.com/tiles",supportsMultipathTCP:!1},{style:69,validVersion:[{identifier:21,availableTiles:[{minX:0,minY:0,maxX:1,maxY:1,minZ:1,maxZ:1},{minX:0,minY:0,maxX:7,maxY:7,minZ:3,maxZ:3},{minX:0,minY:0,maxX:63,maxY:63,minZ:6,maxZ:6},{minX:0,minY:0,maxX:511,maxY:511,minZ:9,maxZ:9},{minX:0,minY:0,maxX:4095,maxY:4095,minZ:12,maxZ:12},{minX:0,minY:0,maxX:32767,maxY:32767,minZ:15,maxZ:15}],genericTile:[]}],scale:0,size:2,supportedLanguage:[],countryRegionWhitelist:[],checksumType:0,requestStyle:1,deviceSKUWhitelist:[],baseURL:"https://gspe19-cn-ssl.ls.apple.com/tiles",supportsMultipathTCP:!1},{style:72,validVersion:[{identifier:2,availableTiles:[{minX:0,minY:0,maxX:8191,maxY:8191,minZ:13,maxZ:13}],genericTile:[],timeToLiveSeconds:3600}],scale:0,size:2,supportedLanguage:[],countryRegionWhitelist:[],checksumType:0,requestStyle:1,deviceSKUWhitelist:[],supportsMultipathTCP:!1},{style:73,validVersion:[{identifier:470,availableTiles:[{minX:0,minY:0,maxX:8191,maxY:8191,minZ:13,maxZ:13},{minX:0,minY:0,maxX:16383,maxY:16383,minZ:14,maxZ:14},{minX:0,minY:0,maxX:32767,maxY:32767,minZ:15,maxZ:15}],genericTile:[]}],scale:0,size:2,supportedLanguage:[],countryRegionWhitelist:[],checksumType:0,requestStyle:0,deviceSKUWhitelist:[],baseURL:"https://gspe19-cn-ssl.ls.apple.com/tiles",supportsMultipathTCP:!1},{style:76,validVersion:[{identifier:0,availableTiles:[{minX:0,minY:0,maxX:8191,maxY:8191,minZ:13,maxZ:13},{minX:0,minY:0,maxX:524287,maxY:524287,minZ:19,maxZ:19}],genericTile:[],timeToLiveSeconds:86400}],scale:0,size:2,supportedLanguage:[],countryRegionWhitelist:[],checksumType:0,requestStyle:1,deviceSKUWhitelist:[],baseURL:"https://gspe79-cn-ssl.ls.apple.com/sis/v1",supportsMultipathTCP:!1},{style:79,validVersion:[{identifier:29,availableTiles:[{minX:0,minY:0,maxX:1,maxY:1,minZ:1,maxZ:1},{minX:0,minY:0,maxX:3,maxY:3,minZ:2,maxZ:2},{minX:0,minY:0,maxX:7,maxY:7,minZ:3,maxZ:3},{minX:0,minY:0,maxX:15,maxY:15,minZ:4,maxZ:4},{minX:0,minY:0,maxX:31,maxY:31,minZ:5,maxZ:5},{minX:0,minY:0,maxX:63,maxY:63,minZ:6,maxZ:6},{minX:0,minY:0,maxX:127,maxY:127,minZ:7,maxZ:7},{minX:0,minY:0,maxX:255,maxY:255,minZ:8,maxZ:8},{minX:0,minY:0,maxX:511,maxY:511,minZ:9,maxZ:9}],genericTile:[]}],scale:0,size:2,supportedLanguage:[],countryRegionWhitelist:[],checksumType:0,requestStyle:0,deviceSKUWhitelist:[],baseURL:"https://gspe19-cn-ssl.ls.apple.com/tiles",supportsMultipathTCP:!1},{style:84,validVersion:[{identifier:2092,availableTiles:[{minX:0,minY:0,maxX:1,maxY:1,minZ:1,maxZ:1},{minX:0,minY:0,maxX:3,maxY:3,minZ:2,maxZ:2},{minX:0,minY:0,maxX:15,maxY:15,minZ:4,maxZ:4},{minX:0,minY:0,maxX:63,maxY:63,minZ:6,maxZ:6},{minX:0,minY:0,maxX:127,maxY:127,minZ:7,maxZ:7},{minX:0,minY:0,maxX:255,maxY:255,minZ:8,maxZ:8},{minX:0,minY:0,maxX:511,maxY:511,minZ:9,maxZ:9},{minX:0,minY:0,maxX:1023,maxY:1023,minZ:10,maxZ:10},{minX:0,minY:0,maxX:4095,maxY:4095,minZ:12,maxZ:12},{minX:0,minY:0,maxX:8191,maxY:8191,minZ:13,maxZ:13},{minX:0,minY:0,maxX:16383,maxY:16383,minZ:14,maxZ:14},{minX:0,minY:0,maxX:32767,maxY:32767,minZ:15,maxZ:15},{minX:0,minY:0,maxX:65535,maxY:65535,minZ:16,maxZ:16},{minX:0,minY:0,maxX:131071,maxY:131071,minZ:17,maxZ:17}],genericTile:[],timeToLiveSeconds:1800,supportedLanguagesVersion:1}],scale:0,size:2,supportedLanguage:[{identifier:1,language:["ar","ca","cs","da","de","el","en","en-AU","en-GB","es","es-MX","fi","fr","fr-CA","he","hi","hr","hu","id","it","ja","ko","ms","nb","nl","pl","pt","pt-PT","ro","ru","sk","sv","th","tr","uk","vi","zh-Hans","zh-Hant","zh-HK"]}],countryRegionWhitelist:[],checksumType:0,requestStyle:0,deviceSKUWhitelist:[],baseURL:"https://gspe19-2-cn-ssl.ls.apple.com/poi_update",supportsMultipathTCP:!1}],attribution:[{name:"AutoNavi",url:"https://gspe21-ssl.ls.apple.com/html/attribution-cn2-66.html",resource:[{resourceType:6,filename:"autonavi-4.png",checksum:{0:61,1:130,2:126,3:203,4:170,5:234,6:91,7:182,8:191,9:120,10:72,11:19,12:46,13:58,14:235,15:55,16:221,17:53,18:252,19:219},region:[],filter:[],validationMethod:0,updateMethod:0},{resourceType:6,filename:"autonavi-4@2x.png",checksum:{0:101,1:191,2:219,3:234,4:178,5:237,6:6,7:231,8:236,9:110,10:3,11:82,12:194,13:129,14:29,15:221,16:225,17:55,18:26,19:203},region:[],filter:[],validationMethod:0,updateMethod:0},{resourceType:6,filename:"autonavi-4@2x.png",checksum:{0:101,1:191,2:219,3:234,4:178,5:237,6:6,7:231,8:236,9:110,10:3,11:82,12:194,13:129,14:29,15:221,16:225,17:55,18:26,19:203},region:[],filter:[],validationMethod:0,updateMethod:0},{resourceType:5,filename:"autonavi-logo-mask-1.png",checksum:{0:247,1:152,2:81,3:90,4:135,5:206,6:171,7:138,8:151,9:37,10:167,11:77,12:112,13:223,14:89,15:164,16:242,17:201,18:164,19:74},region:[],filter:[],validationMethod:0,updateMethod:0},{resourceType:5,filename:"autonavi-logo-mask-1@2x.png",checksum:{0:54,1:203,2:95,3:5,4:82,5:108,6:189,7:170,8:124,9:255,10:39,11:153,12:245,13:47,14:224,15:93,16:202,17:181,18:11,19:127},region:[],filter:[],validationMethod:0,updateMethod:0},{resourceType:5,filename:"autonavi-logo-mask-1@3x.png",checksum:{0:131,1:225,2:158,3:241,4:69,5:218,6:172,7:162,8:166,9:241,10:48,11:174,12:31,13:104,14:225,15:155,16:97,17:143,18:15,19:99},region:[],filter:[],validationMethod:0,updateMethod:0}],region:[],linkDisplayStringIndex:0},{name:"© GeoTechnologies, Inc.",url:"https://gspe21-ssl.ls.apple.com/html/attribution-cn2-66.html",resource:[],region:[{minX:218,minY:102,maxX:225,maxY:104,minZ:8,maxZ:21},{minX:221,minY:98,maxX:228,maxY:101,minZ:8,maxZ:21},{minX:226,minY:91,maxX:231,maxY:97,minZ:8,maxZ:21}],linkDisplayStringIndex:0}],urlInfoSet:[{alternateResourcesURL:[{url:"https://cdn.apple-mapkit.com/rap",supportsMultipathTCP:!1},{url:"https://limit-rule.is.autonavi.com/lpr/rules/download",supportsMultipathTCP:!1}],resourcesURL:{url:"https://gspe21-ssl.ls.apple.com/",supportsMultipathTCP:!1},searchAttributionManifestURL:{url:"https://gspe21-ssl.ls.apple.com/config/search-attribution-1263",supportsMultipathTCP:!1},directionsURL:{url:"https://direction2.is.autonavi.com/direction",supportsMultipathTCP:!1},etaURL:{url:"https://direction2.is.autonavi.com/direction",supportsMultipathTCP:!1},batchReverseGeocoderURL:{url:"https://batch-rgeo.is.autonavi.com/batchRGeo",supportsMultipathTCP:!1},simpleETAURL:{url:"https://direction2.is.autonavi.com/direction",supportsMultipathTCP:!1},polyLocationShiftURL:{url:"https://shift.is.autonavi.com/localshift",supportsMultipathTCP:!1},problemSubmissionURL:{url:"https://rap.is.autonavi.com/rap",supportsMultipathTCP:!1},problemStatusURL:{url:"https://rap.is.autonavi.com/rapstatus",supportsMultipathTCP:!1},reverseGeocoderVersionsURL:{url:"https://gspe21-ssl.ls.apple.com/config/revgeo-version-11.plist",supportsMultipathTCP:!1},problemCategoriesURL:{url:"https://gspe21-ssl.ls.apple.com/config/com.apple.GEO.BusinessLocalizedCategories-424.plist",supportsMultipathTCP:!1},announcementsURL:{url:"https://gspe35-ssl.ls.apple.com/config/announcements?environment=prod-cn",supportsMultipathTCP:!1},dispatcherURL:{url:"https://dispatcher.is.autonavi.com/dispatcher",supportsMultipathTCP:!1},abExperimentURL:{url:"https://gsp-ssl.ls.apple.com/cn/ab.arpc",supportsMultipathTCP:!1},logMessageUsageURL:{url:"https://gsp64-ssl.ls.apple.com/a/v2/use",supportsMultipathTCP:!1},spatialLookupURL:{url:"https://spatialsearch.is.autonavi.com/spatialsearch",supportsMultipathTCP:!1},realtimeTrafficProbeURL:{url:"https://gsp9-ssl.apple.com/hvr/v2/rtloc",supportsMultipathTCP:!1},batchTrafficProbeURL:{url:"https://gsp10-ssl.ls.apple.com/hvr/v2/loc",supportsMultipathTCP:!1},logMessageUsageV3URL:{url:"https://gsp64-ssl.ls.apple.com/hvr/v3/use",supportsMultipathTCP:!1},backgroundDispatcherURL:{url:"https://dispatcher.is.autonavi.com/dispatcher",supportsMultipathTCP:!1},backgroundRevGeoURL:{url:"https://dispatcher.is.autonavi.com/dispatcher",supportsMultipathTCP:!1},wifiConnectionQualityProbeURL:{url:"https://gsp10-ssl-cn.ls.apple.com/hvr/wcq",supportsMultipathTCP:!1},wifiQualityURL:{url:"https://gsp85-cn-ssl.ls.apple.com/wifi_request",supportsMultipathTCP:!1},feedbackSubmissionURL:{url:"https://rap.is.autonavi.com/rap",supportsMultipathTCP:!1},feedbackLookupURL:{url:"https://rap.is.autonavi.com/lookup",supportsMultipathTCP:!1},junctionImageServiceURL:{url:"https://direction2.is.autonavi.com/direction",supportsMultipathTCP:!1},analyticsCohortSessionURL:{url:"https://gsp64-ssl.ls.apple.com/hvr/v3/use",supportsMultipathTCP:!1},analyticsLongSessionURL:{url:"https://gsp64-ssl.ls.apple.com/hvr/v3/use",supportsMultipathTCP:!1},analyticsShortSessionURL:{url:"https://gsp64-ssl.ls.apple.com/hvr/v3/use",supportsMultipathTCP:!1},analyticsSessionlessURL:{url:"https://gsp64-ssl.ls.apple.com/hvr/v3/use",supportsMultipathTCP:!1},webModuleBaseURL:{url:"https://placecard-server-wm.is.autonavi.com",supportsMultipathTCP:!1},wifiQualityTileURL:{url:"https://gspe85-cn-ssl.ls.apple.com/wifi_request_tile",supportsMultipathTCP:!1},batchReverseGeocoderPlaceRequestURL:{url:"https://dispatcher.is.autonavi.com/dispatcher",supportsMultipathTCP:!1},poiBusynessActivityCollectionURL:{url:"https://gsp53-ssl.ls.apple.com/hvr/rt_poi_activity",supportsMultipathTCP:!1},rapWebBundleURL:{url:"https://cdn.apple-mapkit.com/rap",supportsMultipathTCP:!1},offlineDataBatchListURL:{url:"https://ods.is.autonavi.com/api/batchesForRegion",supportsMultipathTCP:!1},offlineDataSizeURL:{url:"https://ods.is.autonavi.com/api/sizeForRegion",supportsMultipathTCP:!1},offlineDataDownloadBaseURL:{url:"https://gspe121-cn-ssl.ls.apple.com",supportsMultipathTCP:!1}}],muninBucket:[{bucketID:2,bucketURL:"https://gspe72-cn-ssl.ls.apple.com/mnn_us"},{bucketID:6,bucketURL:"https://gspe72-cn-ssl.ls.apple.com/mnn_us"}]},XX:{tileSet:[{style:1,validVersion:[{identifier:16034178,availableTiles:[{minX:0,minY:0,maxX:1,maxY:1,minZ:1,maxZ:1},{minX:0,minY:0,maxX:3,maxY:3,minZ:2,maxZ:2},{minX:0,minY:0,maxX:7,maxY:7,minZ:3,maxZ:3},{minX:0,minY:0,maxX:15,maxY:15,minZ:4,maxZ:4},{minX:0,minY:0,maxX:31,maxY:31,minZ:5,maxZ:5},{minX:0,minY:0,maxX:63,maxY:63,minZ:6,maxZ:6},{minX:0,minY:0,maxX:127,maxY:127,minZ:7,maxZ:7},{minX:0,minY:0,maxX:255,maxY:255,minZ:8,maxZ:8},{minX:0,minY:0,maxX:1023,maxY:1023,minZ:10,maxZ:10},{minX:0,minY:0,maxX:4095,maxY:4095,minZ:12,maxZ:12},{minX:0,minY:0,maxX:16383,maxY:16383,minZ:14,maxZ:14}],genericTile:[],supportedLanguagesVersion:1}],scale:0,size:2,supportedLanguage:[{identifier:1,language:["ar","ca","cs","da","de","el","en","en-AU","en-GB","es","es-MX","es-US","fi","fr","fr-CA","he","hi","hr","hu","id","it","ja","ko","ms","nb","nl","pl","pt","pt-PT","ro","ru","sk","sv","th","tr","uk","vi","zh-Hans","zh-Hant","zh-HK"]}],countryRegionWhitelist:[{countryCode:"AE",region:"AE"},{countryCode:"AE",region:"SA"},{countryCode:"IN",region:""},{countryCode:"JP",region:"JP"},{countryCode:"KR",region:"KR"},{countryCode:"MA",region:"MA"},{countryCode:"RU",region:"RU"},{countryCode:"SA",region:"AE"},{countryCode:"SA",region:"SA"},{countryCode:"VN",region:"VN"}],checksumType:0,requestStyle:1,deviceSKUWhitelist:[],baseURL:"https://gspe19-ssl.ls.apple.com/tile.vf?flags=8",dataSet:0,supportsMultipathTCP:!1},{style:1,validVersion:[{identifier:16030619,availableTiles:[{minX:0,minY:0,maxX:1,maxY:1,minZ:1,maxZ:1},{minX:0,minY:0,maxX:3,maxY:3,minZ:2,maxZ:2},{minX:0,minY:0,maxX:7,maxY:7,minZ:3,maxZ:3},{minX:0,minY:0,maxX:15,maxY:15,minZ:4,maxZ:4},{minX:0,minY:0,maxX:31,maxY:31,minZ:5,maxZ:5},{minX:0,minY:0,maxX:63,maxY:63,minZ:6,maxZ:6},{minX:0,minY:0,maxX:127,maxY:127,minZ:7,maxZ:7},{minX:0,minY:0,maxX:255,maxY:255,minZ:8,maxZ:8},{minX:0,minY:0,maxX:1023,maxY:1023,minZ:10,maxZ:10},{minX:0,minY:0,maxX:4095,maxY:4095,minZ:12,maxZ:12},{minX:0,minY:0,maxX:16383,maxY:16383,minZ:14,maxZ:14}],genericTile:[],supportedLanguagesVersion:1}],scale:0,size:2,supportedLanguage:[{identifier:1,language:["ar","ca","cs","da","de","el","en","en-AU","en-GB","es","es-MX","es-US","fi","fr","fr-CA","he","hi","hr","hu","id","it","ja","ko","ms","nb","nl","pl","pt","pt-PT","ro","ru","sk","sv","th","tr","uk","vi","zh-Hans","zh-Hant","zh-HK"]}],countryRegionWhitelist:[{countryCode:"AE",region:"AE"},{countryCode:"AE",region:"SA"},{countryCode:"IN",region:""},{countryCode:"JP",region:"JP"},{countryCode:"KR",region:"KR"},{countryCode:"MA",region:"MA"},{countryCode:"RU",region:"RU"},{countryCode:"SA",region:"AE"},{countryCode:"SA",region:"SA"},{countryCode:"VN",region:"VN"}],checksumType:0,requestStyle:1,deviceSKUWhitelist:[],baseURL:"https://gspe19-kittyhawk-ssl.ls.apple.com/tile.vf?flags=8",dataSet:1,supportsMultipathTCP:!1},{style:7,validVersion:[{identifier:9711,availableTiles:[{minX:0,minY:0,maxX:1,maxY:1,minZ:1,maxZ:22}],genericTile:[{tileType:2,textureIndex:0,resourceIndex:1971}]}],scale:1,size:1,supportedLanguage:[],countryRegionWhitelist:[],checksumType:0,requestStyle:0,deviceSKUWhitelist:[],baseURL:"https://gspe11-ssl.ls.apple.com/tile",supportsMultipathTCP:!1},{style:7,validVersion:[{identifier:9711,availableTiles:[{minX:0,minY:0,maxX:1,maxY:1,minZ:1,maxZ:22}],genericTile:[{tileType:2,textureIndex:0,resourceIndex:1971}]}],scale:2,size:1,supportedLanguage:[],countryRegionWhitelist:[],checksumType:0,requestStyle:0,deviceSKUWhitelist:[],baseURL:"https://gspe11-ssl.ls.apple.com/tile",supportsMultipathTCP:!1},{style:11,validVersion:[{identifier:16034178,availableTiles:[{minX:0,minY:0,maxX:8191,maxY:8191,minZ:13,maxZ:13},{minX:0,minY:0,maxX:16383,maxY:16383,minZ:14,maxZ:14},{minX:0,minY:0,maxX:32767,maxY:32767,minZ:15,maxZ:15}],genericTile:[]}],scale:0,size:2,supportedLanguage:[],countryRegionWhitelist:[],checksumType:0,requestStyle:1,deviceSKUWhitelist:[],baseURL:"https://gspe19-ssl.ls.apple.com/tile.vf?flags=1",dataSet:0,supportsMultipathTCP:!1},{style:11,validVersion:[{identifier:16030619,availableTiles:[{minX:0,minY:0,maxX:8191,maxY:8191,minZ:13,maxZ:13},{minX:0,minY:0,maxX:16383,maxY:16383,minZ:14,maxZ:14},{minX:0,minY:0,maxX:32767,maxY:32767,minZ:15,maxZ:15}],genericTile:[]}],scale:0,size:2,supportedLanguage:[],countryRegionWhitelist:[],checksumType:0,requestStyle:1,deviceSKUWhitelist:[],baseURL:"https://gspe19-kittyhawk-ssl.ls.apple.com/tile.vf?flags=1",dataSet:1,supportsMultipathTCP:!1},{style:12,validVersion:[{identifier:16034178,availableTiles:[{minX:0,minY:0,maxX:255,maxY:255,minZ:8,maxZ:8},{minX:0,minY:0,maxX:4095,maxY:4095,minZ:12,maxZ:12}],genericTile:[],timeToLiveSeconds:120}],scale:0,size:2,supportedLanguage:[],countryRegionWhitelist:[],checksumType:0,requestStyle:1,deviceSKUWhitelist:[],baseURL:"https://gspe12-ssl.ls.apple.com/traffic",dataSet:0,supportsMultipathTCP:!1},{style:12,validVersion:[{identifier:16030619,availableTiles:[{minX:0,minY:0,maxX:255,maxY:255,minZ:8,maxZ:8},{minX:0,minY:0,maxX:4095,maxY:4095,minZ:12,maxZ:12}],genericTile:[],timeToLiveSeconds:120}],scale:0,size:2,supportedLanguage:[],countryRegionWhitelist:[],checksumType:0,requestStyle:1,deviceSKUWhitelist:[],baseURL:"https://gspe12-kittyhawk-ssl.ls.apple.com/traffic",dataSet:1,supportsMultipathTCP:!1},{style:13,validVersion:[{identifier:16034178,availableTiles:[{minX:0,minY:0,maxX:1,maxY:1,minZ:1,maxZ:1},{minX:0,minY:0,maxX:3,maxY:3,minZ:2,maxZ:2},{minX:0,minY:0,maxX:15,maxY:15,minZ:4,maxZ:4},{minX:0,minY:0,maxX:63,maxY:63,minZ:6,maxZ:6},{minX:0,minY:0,maxX:127,maxY:127,minZ:7,maxZ:7},{minX:0,minY:0,maxX:255,maxY:255,minZ:8,maxZ:8},{minX:0,minY:0,maxX:511,maxY:511,minZ:9,maxZ:9},{minX:0,minY:0,maxX:1023,maxY:1023,minZ:10,maxZ:10},{minX:0,minY:0,maxX:4095,maxY:4095,minZ:12,maxZ:12},{minX:0,minY:0,maxX:8191,maxY:8191,minZ:13,maxZ:13},{minX:0,minY:0,maxX:16383,maxY:16383,minZ:14,maxZ:14},{minX:0,minY:0,maxX:32767,maxY:32767,minZ:15,maxZ:15},{minX:0,minY:0,maxX:65535,maxY:65535,minZ:16,maxZ:16},{minX:0,minY:0,maxX:131071,maxY:131071,minZ:17,maxZ:17}],genericTile:[],supportedLanguagesVersion:1}],scale:0,size:2,supportedLanguage:[{identifier:1,language:["ar","ca","cs","da","de","el","en","en-AU","en-GB","es","es-MX","es-US","fi","fr","fr-CA","he","hi","hr","hu","id","it","ja","ko","ms","nb","nl","pl","pt","pt-PT","ro","ru","sk","sv","th","tr","uk","vi","zh-Hans","zh-Hant","zh-HK"]}],countryRegionWhitelist:[],checksumType:0,requestStyle:1,deviceSKUWhitelist:[],baseURL:"https://gspe19-ssl.ls.apple.com/tile.vf?flags=2",dataSet:0,supportsMultipathTCP:!1},{style:13,validVersion:[{identifier:16030619,availableTiles:[{minX:0,minY:0,maxX:1,maxY:1,minZ:1,maxZ:1},{minX:0,minY:0,maxX:3,maxY:3,minZ:2,maxZ:2},{minX:0,minY:0,maxX:15,maxY:15,minZ:4,maxZ:4},{minX:0,minY:0,maxX:63,maxY:63,minZ:6,maxZ:6},{minX:0,minY:0,maxX:127,maxY:127,minZ:7,maxZ:7},{minX:0,minY:0,maxX:255,maxY:255,minZ:8,maxZ:8},{minX:0,minY:0,maxX:511,maxY:511,minZ:9,maxZ:9},{minX:0,minY:0,maxX:1023,maxY:1023,minZ:10,maxZ:10},{minX:0,minY:0,maxX:4095,maxY:4095,minZ:12,maxZ:12},{minX:0,minY:0,maxX:8191,maxY:8191,minZ:13,maxZ:13},{minX:0,minY:0,maxX:16383,maxY:16383,minZ:14,maxZ:14},{minX:0,minY:0,maxX:32767,maxY:32767,minZ:15,maxZ:15},{minX:0,minY:0,maxX:65535,maxY:65535,minZ:16,maxZ:16},{minX:0,minY:0,maxX:131071,maxY:131071,minZ:17,maxZ:17}],genericTile:[],supportedLanguagesVersion:1}],scale:0,size:2,supportedLanguage:[{identifier:1,language:["ar","ca","cs","da","de","el","en","en-AU","en-GB","es","es-MX","es-US","fi","fr","fr-CA","he","hi","hr","hu","id","it","ja","ko","ms","nb","nl","pl","pt","pt-PT","ro","ru","sk","sv","th","tr","uk","vi","zh-Hans","zh-Hant","zh-HK"]}],countryRegionWhitelist:[],checksumType:0,requestStyle:1,deviceSKUWhitelist:[],baseURL:"https://gspe19-kittyhawk-ssl.ls.apple.com/tile.vf?flags=2",dataSet:1,supportsMultipathTCP:!1},{style:14,validVersion:[{identifier:1,availableTiles:[],genericTile:[]}],scale:0,size:2,supportedLanguage:[],countryRegionWhitelist:[],checksumType:0,requestStyle:0,deviceSKUWhitelist:[],baseURL:"https://gspe11-ssl.ls.apple.com/tile",supportsMultipathTCP:!1},{style:15,validVersion:[{identifier:1,availableTiles:[],genericTile:[]}],scale:0,size:2,supportedLanguage:[],countryRegionWhitelist:[],checksumType:0,requestStyle:0,deviceSKUWhitelist:[],baseURL:"https://gspe11-ssl.ls.apple.com/tile",supportsMultipathTCP:!1},{style:16,validVersion:[{identifier:1,availableTiles:[],genericTile:[]}],scale:0,size:2,supportedLanguage:[],countryRegionWhitelist:[],checksumType:0,requestStyle:0,deviceSKUWhitelist:[],baseURL:"https://gspe11-ssl.ls.apple.com/tile",supportsMultipathTCP:!1},{style:17,validVersion:[{identifier:27,availableTiles:[{minX:0,minY:0,maxX:127,maxY:127,minZ:7,maxZ:7},{minX:0,minY:0,maxX:2047,maxY:2047,minZ:11,maxZ:11},{minX:408,minY:2760,maxX:2583,maxY:3659,minZ:13,maxZ:13},{minX:3848,minY:2332,maxX:4535,maxY:3235,minZ:13,maxZ:13}],genericTile:[]}],scale:1,size:1,supportedLanguage:[],countryRegionWhitelist:[],checksumType:0,requestStyle:0,deviceSKUWhitelist:[],baseURL:"https://gspe11-ssl.ls.apple.com/tile",supportsMultipathTCP:!1},{style:18,validVersion:[{identifier:16034178,availableTiles:[{minX:0,minY:0,maxX:32767,maxY:32767,minZ:15,maxZ:15}],genericTile:[],supportedLanguagesVersion:1}],scale:0,size:2,supportedLanguage:[{identifier:1,language:["ar","ca","cs","da","de","el","en","en-AU","en-GB","es","es-MX","es-US","fi","fr","fr-CA","he","hi","hr","hu","id","it","ja","ko","ms","nb","nl","pl","pt","pt-PT","ro","ru","sk","sv","th","tr","uk","vi","zh-Hans","zh-Hant","zh-HK"]}],countryRegionWhitelist:[],checksumType:0,requestStyle:1,deviceSKUWhitelist:[],baseURL:"https://gspe19-ssl.ls.apple.com/tile.vf",dataSet:0,supportsMultipathTCP:!1},{style:18,validVersion:[{identifier:16030619,availableTiles:[{minX:0,minY:0,maxX:32767,maxY:32767,minZ:15,maxZ:15}],genericTile:[],supportedLanguagesVersion:1}],scale:0,size:2,supportedLanguage:[{identifier:1,language:["ar","ca","cs","da","de","el","en","en-AU","en-GB","es","es-MX","es-US","fi","fr","fr-CA","he","hi","hr","hu","id","it","ja","ko","ms","nb","nl","pl","pt","pt-PT","ro","ru","sk","sv","th","tr","uk","vi","zh-Hans","zh-Hant","zh-HK"]}],countryRegionWhitelist:[],checksumType:0,requestStyle:1,deviceSKUWhitelist:[],baseURL:"https://gspe19-kittyhawk-ssl.ls.apple.com/tile.vf",dataSet:1,supportsMultipathTCP:!1},{style:20,validVersion:[{identifier:16034178,availableTiles:[{minX:0,minY:0,maxX:1,maxY:1,minZ:1,maxZ:1},{minX:0,minY:0,maxX:3,maxY:3,minZ:2,maxZ:2},{minX:0,minY:0,maxX:7,maxY:7,minZ:3,maxZ:3},{minX:0,minY:0,maxX:15,maxY:15,minZ:4,maxZ:4},{minX:0,minY:0,maxX:31,maxY:31,minZ:5,maxZ:5},{minX:0,minY:0,maxX:63,maxY:63,minZ:6,maxZ:6},{minX:0,minY:0,maxX:127,maxY:127,minZ:7,maxZ:7},{minX:0,minY:0,maxX:255,maxY:255,minZ:8,maxZ:8},{minX:0,minY:0,maxX:511,maxY:511,minZ:9,maxZ:9},{minX:0,minY:0,maxX:1023,maxY:1023,minZ:10,maxZ:10},{minX:0,minY:0,maxX:2047,maxY:2047,minZ:11,maxZ:11},{minX:0,minY:0,maxX:4095,maxY:4095,minZ:12,maxZ:12},{minX:0,minY:0,maxX:8191,maxY:8191,minZ:13,maxZ:13},{minX:0,minY:0,maxX:16383,maxY:16383,minZ:14,maxZ:14},{minX:0,minY:0,maxX:32767,maxY:32767,minZ:15,maxZ:15}],genericTile:[],supportedLanguagesVersion:1}],scale:0,size:2,supportedLanguage:[{identifier:1,language:["ar","ca","cs","da","de","el","en","en-AU","en-GB","es","es-MX","es-US","fi","fr","fr-CA","he","hi","hr","hu","id","it","ja","ko","ms","nb","nl","pl","pt","pt-PT","ro","ru","sk","sv","th","tr","uk","vi","zh-Hans","zh-Hant","zh-HK"]}],countryRegionWhitelist:[{countryCode:"AE",region:"AE"},{countryCode:"AE",region:"SA"},{countryCode:"IN",region:""},{countryCode:"JP",region:"JP"},{countryCode:"KR",region:"KR"},{countryCode:"MA",region:"MA"},{countryCode:"RU",region:"RU"},{countryCode:"SA",region:"AE"},{countryCode:"SA",region:"SA"},{countryCode:"VN",region:"VN"}],checksumType:0,requestStyle:1,deviceSKUWhitelist:[],baseURL:"https://gspe19-ssl.ls.apple.com/tile.vf",dataSet:0,supportsMultipathTCP:!1},{style:20,validVersion:[{identifier:16030619,availableTiles:[{minX:0,minY:0,maxX:1,maxY:1,minZ:1,maxZ:1},{minX:0,minY:0,maxX:3,maxY:3,minZ:2,maxZ:2},{minX:0,minY:0,maxX:7,maxY:7,minZ:3,maxZ:3},{minX:0,minY:0,maxX:15,maxY:15,minZ:4,maxZ:4},{minX:0,minY:0,maxX:31,maxY:31,minZ:5,maxZ:5},{minX:0,minY:0,maxX:63,maxY:63,minZ:6,maxZ:6},{minX:0,minY:0,maxX:127,maxY:127,minZ:7,maxZ:7},{minX:0,minY:0,maxX:255,maxY:255,minZ:8,maxZ:8},{minX:0,minY:0,maxX:511,maxY:511,minZ:9,maxZ:9},{minX:0,minY:0,maxX:1023,maxY:1023,minZ:10,maxZ:10},{minX:0,minY:0,maxX:2047,maxY:2047,minZ:11,maxZ:11},{minX:0,minY:0,maxX:4095,maxY:4095,minZ:12,maxZ:12},{minX:0,minY:0,maxX:8191,maxY:8191,minZ:13,maxZ:13},{minX:0,minY:0,maxX:16383,maxY:16383,minZ:14,maxZ:14},{minX:0,minY:0,maxX:32767,maxY:32767,minZ:15,maxZ:15}],genericTile:[],supportedLanguagesVersion:1}],scale:0,size:2,supportedLanguage:[{identifier:1,language:["ar","ca","cs","da","de","el","en","en-AU","en-GB","es","es-MX","es-US","fi","fr","fr-CA","he","hi","hr","hu","id","it","ja","ko","ms","nb","nl","pl","pt","pt-PT","ro","ru","sk","sv","th","tr","uk","vi","zh-Hans","zh-Hant","zh-HK"]}],countryRegionWhitelist:[{countryCode:"AE",region:"AE"},{countryCode:"AE",region:"SA"},{countryCode:"IN",region:""},{countryCode:"JP",region:"JP"},{countryCode:"KR",region:"KR"},{countryCode:"MA",region:"MA"},{countryCode:"RU",region:"RU"},{countryCode:"SA",region:"AE"},{countryCode:"SA",region:"SA"},{countryCode:"VN",region:"VN"}],checksumType:0,requestStyle:1,deviceSKUWhitelist:[],baseURL:"https://gspe19-kittyhawk-ssl.ls.apple.com/tile.vf",dataSet:1,supportsMultipathTCP:!1},{style:22,validVersion:[{identifier:16034178,availableTiles:[{minX:0,minY:0,maxX:127,maxY:127,minZ:7,maxZ:7},{minX:0,minY:0,maxX:255,maxY:255,minZ:8,maxZ:8},{minX:0,minY:0,maxX:511,maxY:511,minZ:9,maxZ:9},{minX:0,minY:0,maxX:1023,maxY:1023,minZ:10,maxZ:10},{minX:0,minY:0,maxX:2047,maxY:2047,minZ:11,maxZ:11},{minX:0,minY:0,maxX:4095,maxY:4095,minZ:12,maxZ:12},{minX:0,minY:0,maxX:8191,maxY:8191,minZ:13,maxZ:13},{minX:0,minY:0,maxX:16383,maxY:16383,minZ:14,maxZ:14},{minX:0,minY:0,maxX:32767,maxY:32767,minZ:15,maxZ:15}],genericTile:[]}],scale:0,size:2,supportedLanguage:[],countryRegionWhitelist:[],checksumType:0,requestStyle:1,deviceSKUWhitelist:[],baseURL:"https://gspe19-ssl.ls.apple.com/tile.vf",dataSet:0,supportsMultipathTCP:!1},{style:22,validVersion:[{identifier:16030619,availableTiles:[{minX:0,minY:0,maxX:127,maxY:127,minZ:7,maxZ:7},{minX:0,minY:0,maxX:255,maxY:255,minZ:8,maxZ:8},{minX:0,minY:0,maxX:511,maxY:511,minZ:9,maxZ:9},{minX:0,minY:0,maxX:1023,maxY:1023,minZ:10,maxZ:10},{minX:0,minY:0,maxX:2047,maxY:2047,minZ:11,maxZ:11},{minX:0,minY:0,maxX:4095,maxY:4095,minZ:12,maxZ:12},{minX:0,minY:0,maxX:8191,maxY:8191,minZ:13,maxZ:13},{minX:0,minY:0,maxX:16383,maxY:16383,minZ:14,maxZ:14},{minX:0,minY:0,maxX:32767,maxY:32767,minZ:15,maxZ:15}],genericTile:[]}],scale:0,size:2,supportedLanguage:[],countryRegionWhitelist:[],checksumType:0,requestStyle:1,deviceSKUWhitelist:[],baseURL:"https://gspe19-kittyhawk-ssl.ls.apple.com/tile.vf",dataSet:1,supportsMultipathTCP:!1},{style:30,validVersion:[{identifier:16034178,availableTiles:[{minX:0,minY:0,maxX:1023,maxY:1023,minZ:10,maxZ:10},{minX:0,minY:0,maxX:32767,maxY:32767,minZ:15,maxZ:15},{minX:0,minY:0,maxX:262143,maxY:262143,minZ:18,maxZ:18}],genericTile:[],supportedLanguagesVersion:1}],scale:0,size:2,supportedLanguage:[{identifier:1,language:["ar","ca","cs","da","de","el","en","en-AU","en-GB","es","es-MX","es-US","fi","fr","fr-CA","he","hi","hr","hu","id","it","ja","ko","ms","nb","nl","pl","pt","pt-PT","ro","ru","sk","sv","th","tr","uk","vi","zh-Hans","zh-Hant","zh-HK"]}],countryRegionWhitelist:[],checksumType:0,requestStyle:1,deviceSKUWhitelist:[],baseURL:"https://gspe19-ssl.ls.apple.com/tile.vf",dataSet:0,supportsMultipathTCP:!1},{style:30,validVersion:[{identifier:16030619,availableTiles:[{minX:0,minY:0,maxX:1023,maxY:1023,minZ:10,maxZ:10},{minX:0,minY:0,maxX:32767,maxY:32767,minZ:15,maxZ:15},{minX:0,minY:0,maxX:262143,maxY:262143,minZ:18,maxZ:18}],genericTile:[],supportedLanguagesVersion:1}],scale:0,size:2,supportedLanguage:[{identifier:1,language:["ar","ca","cs","da","de","el","en","en-AU","en-GB","es","es-MX","es-US","fi","fr","fr-CA","he","hi","hr","hu","id","it","ja","ko","ms","nb","nl","pl","pt","pt-PT","ro","ru","sk","sv","th","tr","uk","vi","zh-Hans","zh-Hant","zh-HK"]}],countryRegionWhitelist:[],checksumType:0,requestStyle:1,deviceSKUWhitelist:[],baseURL:"https://gspe19-kittyhawk-ssl.ls.apple.com/tile.vf",dataSet:1,supportsMultipathTCP:!1},{style:33,validVersion:[{identifier:4,availableTiles:[{minX:0,minY:0,maxX:1,maxY:1,minZ:1,maxZ:7}],genericTile:[]}],scale:1,size:1,supportedLanguage:[],countryRegionWhitelist:[],checksumType:0,requestStyle:0,deviceSKUWhitelist:[],baseURL:"https://gspe11-ssl.ls.apple.com/tile",supportsMultipathTCP:!1},{style:37,validVersion:[{identifier:16034178,availableTiles:[{minX:0,minY:0,maxX:1,maxY:1,minZ:1,maxZ:1},{minX:0,minY:0,maxX:3,maxY:3,minZ:2,maxZ:2},{minX:0,minY:0,maxX:7,maxY:7,minZ:3,maxZ:3},{minX:0,minY:0,maxX:31,maxY:31,minZ:5,maxZ:5},{minX:0,minY:0,maxX:127,maxY:127,minZ:7,maxZ:7},{minX:0,minY:0,maxX:511,maxY:511,minZ:9,maxZ:9},{minX:0,minY:0,maxX:1023,maxY:1023,minZ:10,maxZ:10},{minX:0,minY:0,maxX:2047,maxY:2047,minZ:11,maxZ:11},{minX:0,minY:0,maxX:8191,maxY:8191,minZ:13,maxZ:13},{minX:0,minY:0,maxX:16383,maxY:16383,minZ:14,maxZ:14},{minX:0,minY:0,maxX:32767,maxY:32767,minZ:15,maxZ:15}],genericTile:[],supportedLanguagesVersion:1}],scale:0,size:2,supportedLanguage:[{identifier:1,language:["ar","ca","cs","da","de","el","en","en-AU","en-GB","es","es-MX","es-US","fi","fr","fr-CA","he","hi","hr","hu","id","it","ja","ko","ms","nb","nl","pl","pt","pt-PT","ro","ru","sk","sv","th","tr","uk","vi","zh-Hans","zh-Hant","zh-HK"]}],countryRegionWhitelist:[],checksumType:0,requestStyle:1,deviceSKUWhitelist:[],baseURL:"https://gspe19-ssl.ls.apple.com/tile.vf?flags=2",dataSet:0,supportsMultipathTCP:!1},{style:37,validVersion:[{identifier:16030619,availableTiles:[{minX:0,minY:0,maxX:1,maxY:1,minZ:1,maxZ:1},{minX:0,minY:0,maxX:3,maxY:3,minZ:2,maxZ:2},{minX:0,minY:0,maxX:7,maxY:7,minZ:3,maxZ:3},{minX:0,minY:0,maxX:31,maxY:31,minZ:5,maxZ:5},{minX:0,minY:0,maxX:127,maxY:127,minZ:7,maxZ:7},{minX:0,minY:0,maxX:511,maxY:511,minZ:9,maxZ:9},{minX:0,minY:0,maxX:1023,maxY:1023,minZ:10,maxZ:10},{minX:0,minY:0,maxX:2047,maxY:2047,minZ:11,maxZ:11},{minX:0,minY:0,maxX:8191,maxY:8191,minZ:13,maxZ:13},{minX:0,minY:0,maxX:16383,maxY:16383,minZ:14,maxZ:14},{minX:0,minY:0,maxX:32767,maxY:32767,minZ:15,maxZ:15}],genericTile:[],supportedLanguagesVersion:1}],scale:0,size:2,supportedLanguage:[{identifier:1,language:["ar","ca","cs","da","de","el","en","en-AU","en-GB","es","es-MX","es-US","fi","fr","fr-CA","he","hi","hr","hu","id","it","ja","ko","ms","nb","nl","pl","pt","pt-PT","ro","ru","sk","sv","th","tr","uk","vi","zh-Hans","zh-Hant","zh-HK"]}],countryRegionWhitelist:[],checksumType:0,requestStyle:1,deviceSKUWhitelist:[],baseURL:"https://gspe19-kittyhawk-ssl.ls.apple.com/tile.vf?flags=2",dataSet:1,supportsMultipathTCP:!1},{style:42,validVersion:[{identifier:1,availableTiles:[],genericTile:[]}],scale:0,size:2,supportedLanguage:[],countryRegionWhitelist:[],checksumType:0,requestStyle:0,deviceSKUWhitelist:[],baseURL:"https://gspe11-ssl.ls.apple.com/tile",supportsMultipathTCP:!1},{style:43,validVersion:[{identifier:1,availableTiles:[],genericTile:[]}],scale:0,size:2,supportedLanguage:[],countryRegionWhitelist:[],checksumType:0,requestStyle:0,deviceSKUWhitelist:[],baseURL:"https://gspe11-ssl.ls.apple.com/tile",supportsMultipathTCP:!1},{style:44,validVersion:[{identifier:1,availableTiles:[],genericTile:[]}],scale:0,size:2,supportedLanguage:[],countryRegionWhitelist:[],checksumType:0,requestStyle:0,deviceSKUWhitelist:[],baseURL:"https://gspe11-ssl.ls.apple.com/tile",supportsMultipathTCP:!1},{style:47,validVersion:[{identifier:16034178,availableTiles:[{minX:0,minY:0,maxX:1,maxY:1,minZ:1,maxZ:1},{minX:0,minY:0,maxX:3,maxY:3,minZ:2,maxZ:2},{minX:0,minY:0,maxX:7,maxY:7,minZ:3,maxZ:3},{minX:0,minY:0,maxX:31,maxY:31,minZ:5,maxZ:5},{minX:0,minY:0,maxX:127,maxY:127,minZ:7,maxZ:7},{minX:0,minY:0,maxX:511,maxY:511,minZ:9,maxZ:9},{minX:0,minY:0,maxX:1023,maxY:1023,minZ:10,maxZ:10},{minX:0,minY:0,maxX:2047,maxY:2047,minZ:11,maxZ:11},{minX:0,minY:0,maxX:8191,maxY:8191,minZ:13,maxZ:13},{minX:0,minY:0,maxX:16383,maxY:16383,minZ:14,maxZ:14},{minX:0,minY:0,maxX:32767,maxY:32767,minZ:15,maxZ:15}],genericTile:[],supportedLanguagesVersion:1}],scale:0,size:2,supportedLanguage:[{identifier:1,language:["ar","ca","cs","da","de","el","en","en-AU","en-GB","es","es-MX","es-US","fi","fr","fr-CA","he","hi","hr","hu","id","it","ja","ko","ms","nb","nl","pl","pt","pt-PT","ro","ru","sk","sv","th","tr","uk","vi","zh-Hans","zh-Hant","zh-HK"]}],countryRegionWhitelist:[],checksumType:0,requestStyle:1,deviceSKUWhitelist:[],baseURL:"https://gspe19-ssl.ls.apple.com/tile.vf",dataSet:0,supportsMultipathTCP:!1},{style:47,validVersion:[{identifier:16030619,availableTiles:[{minX:0,minY:0,maxX:1,maxY:1,minZ:1,maxZ:1},{minX:0,minY:0,maxX:3,maxY:3,minZ:2,maxZ:2},{minX:0,minY:0,maxX:7,maxY:7,minZ:3,maxZ:3},{minX:0,minY:0,maxX:31,maxY:31,minZ:5,maxZ:5},{minX:0,minY:0,maxX:127,maxY:127,minZ:7,maxZ:7},{minX:0,minY:0,maxX:511,maxY:511,minZ:9,maxZ:9},{minX:0,minY:0,maxX:1023,maxY:1023,minZ:10,maxZ:10},{minX:0,minY:0,maxX:2047,maxY:2047,minZ:11,maxZ:11},{minX:0,minY:0,maxX:8191,maxY:8191,minZ:13,maxZ:13},{minX:0,minY:0,maxX:16383,maxY:16383,minZ:14,maxZ:14},{minX:0,minY:0,maxX:32767,maxY:32767,minZ:15,maxZ:15}],genericTile:[],supportedLanguagesVersion:1}],scale:0,size:2,supportedLanguage:[{identifier:1,language:["ar","ca","cs","da","de","el","en","en-AU","en-GB","es","es-MX","es-US","fi","fr","fr-CA","he","hi","hr","hu","id","it","ja","ko","ms","nb","nl","pl","pt","pt-PT","ro","ru","sk","sv","th","tr","uk","vi","zh-Hans","zh-Hant","zh-HK"]}],countryRegionWhitelist:[],checksumType:0,requestStyle:1,deviceSKUWhitelist:[],baseURL:"https://gspe19-kittyhawk-ssl.ls.apple.com/tile.vf",dataSet:1,supportsMultipathTCP:!1},{style:48,validVersion:[{identifier:11201196,availableTiles:[{minX:0,minY:0,maxX:4095,maxY:4095,minZ:12,maxZ:12},{minX:0,minY:0,maxX:32767,maxY:32767,minZ:15,maxZ:15}],genericTile:[]}],scale:0,size:2,supportedLanguage:[],countryRegionWhitelist:[],checksumType:0,requestStyle:1,deviceSKUWhitelist:[],baseURL:"https://gspe19-ssl.ls.apple.com/tile.vf",dataSet:0,supportsMultipathTCP:!1},{style:48,validVersion:[{identifier:11201196,availableTiles:[{minX:0,minY:0,maxX:4095,maxY:4095,minZ:12,maxZ:12},{minX:0,minY:0,maxX:32767,maxY:32767,minZ:15,maxZ:15}],genericTile:[]}],scale:0,size:2,supportedLanguage:[],countryRegionWhitelist:[],checksumType:0,requestStyle:1,deviceSKUWhitelist:[],baseURL:"https://gspe19-kittyhawk-ssl.ls.apple.com/tile.vf",dataSet:1,supportsMultipathTCP:!1},{style:52,validVersion:[{identifier:1,availableTiles:[],genericTile:[]}],scale:0,size:2,supportedLanguage:[],countryRegionWhitelist:[],checksumType:0,requestStyle:0,deviceSKUWhitelist:[],baseURL:"https://gspe11-ssl.ls.apple.com/tile",supportsMultipathTCP:!1},{style:53,validVersion:[{identifier:16034178,availableTiles:[{minX:0,minY:0,maxX:32767,maxY:32767,minZ:15,maxZ:15}],genericTile:[],supportedLanguagesVersion:1}],scale:0,size:2,supportedLanguage:[{identifier:1,language:["ar","ca","cs","da","de","el","en","en-AU","en-GB","es","es-MX","es-US","fi","fr","fr-CA","he","hi","hr","hu","id","it","ja","ko","ms","nb","nl","pl","pt","pt-PT","ro","ru","sk","sv","th","tr","uk","vi","zh-Hans","zh-Hant","zh-HK"]}],countryRegionWhitelist:[],checksumType:0,requestStyle:1,deviceSKUWhitelist:[],baseURL:"https://gspe19-ssl.ls.apple.com/tile.vf",dataSet:0,supportsMultipathTCP:!1},{style:53,validVersion:[{identifier:16030619,availableTiles:[{minX:0,minY:0,maxX:32767,maxY:32767,minZ:15,maxZ:15}],genericTile:[],supportedLanguagesVersion:1}],scale:0,size:2,supportedLanguage:[{identifier:1,language:["ar","ca","cs","da","de","el","en","en-AU","en-GB","es","es-MX","es-US","fi","fr","fr-CA","he","hi","hr","hu","id","it","ja","ko","ms","nb","nl","pl","pt","pt-PT","ro","ru","sk","sv","th","tr","uk","vi","zh-Hans","zh-Hant","zh-HK"]}],countryRegionWhitelist:[],checksumType:0,requestStyle:1,deviceSKUWhitelist:[],baseURL:"https://gspe19-kittyhawk-ssl.ls.apple.com/tile.vf",dataSet:1,supportsMultipathTCP:!1},{style:54,validVersion:[{identifier:13658945,availableTiles:[{minX:0,minY:0,maxX:8191,maxY:8191,minZ:13,maxZ:13},{minX:0,minY:0,maxX:32767,maxY:32767,minZ:15,maxZ:15}],genericTile:[]}],scale:0,size:2,supportedLanguage:[],countryRegionWhitelist:[],checksumType:0,requestStyle:1,deviceSKUWhitelist:[],baseURL:"https://gspe19-ssl.ls.apple.com/tile.vf",dataSet:0,supportsMultipathTCP:!1},{style:54,validVersion:[{identifier:13659050,availableTiles:[{minX:0,minY:0,maxX:8191,maxY:8191,minZ:13,maxZ:13},{minX:0,minY:0,maxX:32767,maxY:32767,minZ:15,maxZ:15}],genericTile:[]}],scale:0,size:2,supportedLanguage:[],countryRegionWhitelist:[],checksumType:0,requestStyle:1,deviceSKUWhitelist:[],baseURL:"https://gspe19-kittyhawk-ssl.ls.apple.com/tile.vf",dataSet:1,supportsMultipathTCP:!1},{style:56,validVersion:[{identifier:16034178,availableTiles:[{minX:0,minY:0,maxX:131071,maxY:131071,minZ:17,maxZ:17}],genericTile:[],supportedLanguagesVersion:1}],scale:0,size:2,supportedLanguage:[{identifier:1,language:["ar","ca","cs","da","de","el","en","en-AU","en-GB","es","es-MX","es-US","fi","fr","fr-CA","he","hi","hr","hu","id","it","ja","ko","ms","nb","nl","pl","pt","pt-PT","ro","ru","sk","sv","th","tr","uk","vi","zh-Hans","zh-Hant","zh-HK"]}],countryRegionWhitelist:[],checksumType:0,requestStyle:0,deviceSKUWhitelist:[],baseURL:"https://gspe19-ssl.ls.apple.com/tile.vf",dataSet:0,supportsMultipathTCP:!1},{style:56,validVersion:[{identifier:16030619,availableTiles:[{minX:0,minY:0,maxX:131071,maxY:131071,minZ:17,maxZ:17}],genericTile:[],supportedLanguagesVersion:1}],scale:0,size:2,supportedLanguage:[{identifier:1,language:["ar","ca","cs","da","de","el","en","en-AU","en-GB","es","es-MX","es-US","fi","fr","fr-CA","he","hi","hr","hu","id","it","ja","ko","ms","nb","nl","pl","pt","pt-PT","ro","ru","sk","sv","th","tr","uk","vi","zh-Hans","zh-Hant","zh-HK"]}],countryRegionWhitelist:[],checksumType:0,requestStyle:0,deviceSKUWhitelist:[],baseURL:"https://gspe19-kittyhawk-ssl.ls.apple.com/tile.vf",dataSet:1,supportsMultipathTCP:!1},{style:57,validVersion:[{identifier:0,availableTiles:[{minX:0,minY:0,maxX:131071,maxY:131071,minZ:17,maxZ:17}],genericTile:[],timeToLiveSeconds:3600}],scale:0,size:2,supportedLanguage:[],countryRegionWhitelist:[],checksumType:0,requestStyle:1,deviceSKUWhitelist:[],baseURL:"https://gspe76-ssl.ls.apple.com/api/tile",supportsMultipathTCP:!1},{style:58,validVersion:[{identifier:16034178,availableTiles:[{minX:0,minY:0,maxX:1,maxY:1,minZ:1,maxZ:1},{minX:0,minY:0,maxX:3,maxY:3,minZ:2,maxZ:2},{minX:0,minY:0,maxX:7,maxY:7,minZ:3,maxZ:3},{minX:0,minY:0,maxX:15,maxY:15,minZ:4,maxZ:4},{minX:0,minY:0,maxX:31,maxY:31,minZ:5,maxZ:5},{minX:0,minY:0,maxX:63,maxY:63,minZ:6,maxZ:6},{minX:0,minY:0,maxX:127,maxY:127,minZ:7,maxZ:7},{minX:0,minY:0,maxX:255,maxY:255,minZ:8,maxZ:8},{minX:0,minY:0,maxX:511,maxY:511,minZ:9,maxZ:9},{minX:0,minY:0,maxX:1023,maxY:1023,minZ:10,maxZ:10},{minX:0,minY:0,maxX:2047,maxY:2047,minZ:11,maxZ:11},{minX:0,minY:0,maxX:4095,maxY:4095,minZ:12,maxZ:12},{minX:0,minY:0,maxX:8191,maxY:8191,minZ:13,maxZ:13},{minX:0,minY:0,maxX:16383,maxY:16383,minZ:14,maxZ:14},{minX:0,minY:0,maxX:32767,maxY:32767,minZ:15,maxZ:15},{minX:0,minY:0,maxX:65535,maxY:65535,minZ:16,maxZ:16},{minX:0,minY:0,maxX:131071,maxY:131071,minZ:17,maxZ:17}],genericTile:[]}],scale:0,size:2,supportedLanguage:[],countryRegionWhitelist:[],checksumType:0,requestStyle:0,deviceSKUWhitelist:[],baseURL:"https://gspe19-ssl.ls.apple.com/tile.vf",dataSet:0,supportsMultipathTCP:!1},{style:58,validVersion:[{identifier:16030619,availableTiles:[{minX:0,minY:0,maxX:1,maxY:1,minZ:1,maxZ:1},{minX:0,minY:0,maxX:3,maxY:3,minZ:2,maxZ:2},{minX:0,minY:0,maxX:7,maxY:7,minZ:3,maxZ:3},{minX:0,minY:0,maxX:15,maxY:15,minZ:4,maxZ:4},{minX:0,minY:0,maxX:31,maxY:31,minZ:5,maxZ:5},{minX:0,minY:0,maxX:63,maxY:63,minZ:6,maxZ:6},{minX:0,minY:0,maxX:127,maxY:127,minZ:7,maxZ:7},{minX:0,minY:0,maxX:255,maxY:255,minZ:8,maxZ:8},{minX:0,minY:0,maxX:511,maxY:511,minZ:9,maxZ:9},{minX:0,minY:0,maxX:1023,maxY:1023,minZ:10,maxZ:10},{minX:0,minY:0,maxX:2047,maxY:2047,minZ:11,maxZ:11},{minX:0,minY:0,maxX:4095,maxY:4095,minZ:12,maxZ:12},{minX:0,minY:0,maxX:8191,maxY:8191,minZ:13,maxZ:13},{minX:0,minY:0,maxX:16383,maxY:16383,minZ:14,maxZ:14},{minX:0,minY:0,maxX:32767,maxY:32767,minZ:15,maxZ:15},{minX:0,minY:0,maxX:65535,maxY:65535,minZ:16,maxZ:16},{minX:0,minY:0,maxX:131071,maxY:131071,minZ:17,maxZ:17}],genericTile:[]}],scale:0,size:2,supportedLanguage:[],countryRegionWhitelist:[],checksumType:0,requestStyle:0,deviceSKUWhitelist:[],baseURL:"https://gspe19-kittyhawk-ssl.ls.apple.com/tile.vf",dataSet:1,supportsMultipathTCP:!1},{style:59,validVersion:[{identifier:16034178,availableTiles:[{minX:0,minY:0,maxX:1,maxY:1,minZ:1,maxZ:1}],genericTile:[]}],scale:0,size:2,supportedLanguage:[],countryRegionWhitelist:[],checksumType:0,requestStyle:0,deviceSKUWhitelist:[],baseURL:"https://gspe19-ssl.ls.apple.com/asset/v3/model",dataSet:0,supportsMultipathTCP:!1},{style:59,validVersion:[{identifier:16030619,availableTiles:[{minX:0,minY:0,maxX:1,maxY:1,minZ:1,maxZ:1}],genericTile:[]}],scale:0,size:2,supportedLanguage:[],countryRegionWhitelist:[],checksumType:0,requestStyle:0,deviceSKUWhitelist:[],baseURL:"https://gspe19-kittyhawk-ssl.ls.apple.com/asset/v3/model",dataSet:1,supportsMultipathTCP:!1},{style:60,validVersion:[{identifier:16034178,availableTiles:[{minX:0,minY:0,maxX:1,maxY:1,minZ:1,maxZ:1},{minX:0,minY:0,maxX:3,maxY:3,minZ:2,maxZ:2},{minX:0,minY:0,maxX:7,maxY:7,minZ:3,maxZ:3},{minX:0,minY:0,maxX:15,maxY:15,minZ:4,maxZ:4},{minX:0,minY:0,maxX:31,maxY:31,minZ:5,maxZ:5},{minX:0,minY:0,maxX:63,maxY:63,minZ:6,maxZ:6},{minX:0,minY:0,maxX:127,maxY:127,minZ:7,maxZ:7},{minX:0,minY:0,maxX:255,maxY:255,minZ:8,maxZ:8},{minX:0,minY:0,maxX:511,maxY:511,minZ:9,maxZ:9}],genericTile:[]}],scale:0,size:2,supportedLanguage:[],countryRegionWhitelist:[],checksumType:0,requestStyle:0,deviceSKUWhitelist:[],baseURL:"https://gspe19-ssl.ls.apple.com/asset/v3/material",dataSet:0,supportsMultipathTCP:!1},{style:60,validVersion:[{identifier:16030619,availableTiles:[{minX:0,minY:0,maxX:1,maxY:1,minZ:1,maxZ:1},{minX:0,minY:0,maxX:3,maxY:3,minZ:2,maxZ:2},{minX:0,minY:0,maxX:7,maxY:7,minZ:3,maxZ:3},{minX:0,minY:0,maxX:15,maxY:15,minZ:4,maxZ:4},{minX:0,minY:0,maxX:31,maxY:31,minZ:5,maxZ:5},{minX:0,minY:0,maxX:63,maxY:63,minZ:6,maxZ:6},{minX:0,minY:0,maxX:127,maxY:127,minZ:7,maxZ:7},{minX:0,minY:0,maxX:255,maxY:255,minZ:8,maxZ:8},{minX:0,minY:0,maxX:511,maxY:511,minZ:9,maxZ:9}],genericTile:[]}],scale:0,size:2,supportedLanguage:[],countryRegionWhitelist:[],checksumType:0,requestStyle:0,deviceSKUWhitelist:[],baseURL:"https://gspe19-kittyhawk-ssl.ls.apple.com/asset/v3/material",dataSet:1,supportsMultipathTCP:!1},{style:61,validVersion:[{identifier:16034178,availableTiles:[{minX:0,minY:0,maxX:127,maxY:127,minZ:7,maxZ:7}],genericTile:[]}],scale:0,size:2,supportedLanguage:[],countryRegionWhitelist:[],checksumType:0,requestStyle:0,deviceSKUWhitelist:[],baseURL:"https://gspe19-ssl.ls.apple.com/tile.vf",dataSet:0,supportsMultipathTCP:!1},{style:61,validVersion:[{identifier:16030619,availableTiles:[{minX:0,minY:0,maxX:127,maxY:127,minZ:7,maxZ:7}],genericTile:[]}],scale:0,size:2,supportedLanguage:[],countryRegionWhitelist:[],checksumType:0,requestStyle:0,deviceSKUWhitelist:[],baseURL:"https://gspe19-kittyhawk-ssl.ls.apple.com/tile.vf",dataSet:1,supportsMultipathTCP:!1},{style:62,validVersion:[{identifier:16034178,availableTiles:[{minX:0,minY:0,maxX:4095,maxY:4095,minZ:12,maxZ:12}],genericTile:[]}],scale:0,size:2,supportedLanguage:[],countryRegionWhitelist:[],checksumType:0,requestStyle:0,deviceSKUWhitelist:[],baseURL:"https://gspe19-ssl.ls.apple.com/tile.vf",dataSet:0,supportsMultipathTCP:!1},{style:62,validVersion:[{identifier:16030619,availableTiles:[{minX:0,minY:0,maxX:4095,maxY:4095,minZ:12,maxZ:12}],genericTile:[]}],scale:0,size:2,supportedLanguage:[],countryRegionWhitelist:[],checksumType:0,requestStyle:0,deviceSKUWhitelist:[],baseURL:"https://gspe19-kittyhawk-ssl.ls.apple.com/tile.vf",dataSet:1,supportsMultipathTCP:!1},{style:64,validVersion:[{identifier:16034178,availableTiles:[{minX:0,minY:0,maxX:4095,maxY:4095,minZ:12,maxZ:12}],genericTile:[],supportedLanguagesVersion:1}],scale:0,size:2,supportedLanguage:[{identifier:1,language:["ar","ca","cs","da","de","el","en","en-AU","en-GB","es","es-MX","es-US","fi","fr","fr-CA","he","hi","hr","hu","id","it","ja","ko","ms","nb","nl","pl","pt","pt-PT","ro","ru","sk","sv","th","tr","uk","vi","zh-Hans","zh-Hant","zh-HK"]}],countryRegionWhitelist:[],checksumType:0,requestStyle:0,deviceSKUWhitelist:[],baseURL:"https://gspe19-ssl.ls.apple.com/tile.vf",dataSet:0,supportsMultipathTCP:!1},{style:64,validVersion:[{identifier:16030619,availableTiles:[{minX:0,minY:0,maxX:4095,maxY:4095,minZ:12,maxZ:12}],genericTile:[],supportedLanguagesVersion:1}],scale:0,size:2,supportedLanguage:[{identifier:1,language:["ar","ca","cs","da","de","el","en","en-AU","en-GB","es","es-MX","es-US","fi","fr","fr-CA","he","hi","hr","hu","id","it","ja","ko","ms","nb","nl","pl","pt","pt-PT","ro","ru","sk","sv","th","tr","uk","vi","zh-Hans","zh-Hant","zh-HK"]}],countryRegionWhitelist:[],checksumType:0,requestStyle:0,deviceSKUWhitelist:[],baseURL:"https://gspe19-kittyhawk-ssl.ls.apple.com/tile.vf",dataSet:1,supportsMultipathTCP:!1},{style:65,validVersion:[{identifier:2,availableTiles:[{minX:0,minY:0,maxX:255,maxY:255,minZ:8,maxZ:8}],genericTile:[],timeToLiveSeconds:3600}],scale:0,size:2,supportedLanguage:[],countryRegionWhitelist:[],checksumType:0,requestStyle:1,deviceSKUWhitelist:[],baseURL:"https://gspe79-ssl.ls.apple.com/65/v1",supportsMultipathTCP:!1},{style:66,validVersion:[{identifier:16034178,availableTiles:[{minX:0,minY:0,maxX:1,maxY:1,minZ:1,maxZ:1},{minX:0,minY:0,maxX:3,maxY:3,minZ:2,maxZ:2},{minX:0,minY:0,maxX:7,maxY:7,minZ:3,maxZ:3},{minX:0,minY:0,maxX:15,maxY:15,minZ:4,maxZ:4},{minX:0,minY:0,maxX:31,maxY:31,minZ:5,maxZ:5},{minX:0,minY:0,maxX:63,maxY:63,minZ:6,maxZ:6},{minX:0,minY:0,maxX:127,maxY:127,minZ:7,maxZ:7},{minX:0,minY:0,maxX:255,maxY:255,minZ:8,maxZ:8},{minX:0,minY:0,maxX:511,maxY:511,minZ:9,maxZ:9},{minX:0,minY:0,maxX:1023,maxY:1023,minZ:10,maxZ:10},{minX:0,minY:0,maxX:2047,maxY:2047,minZ:11,maxZ:11},{minX:0,minY:0,maxX:4095,maxY:4095,minZ:12,maxZ:12},{minX:0,minY:0,maxX:8191,maxY:8191,minZ:13,maxZ:13},{minX:0,minY:0,maxX:16383,maxY:16383,minZ:14,maxZ:14},{minX:0,minY:0,maxX:32767,maxY:32767,minZ:15,maxZ:15}],genericTile:[],supportedLanguagesVersion:1}],scale:0,size:2,supportedLanguage:[{identifier:1,language:["ar","ca","cs","da","de","el","en","en-AU","en-GB","es","es-MX","es-US","fi","fr","fr-CA","he","hi","hr","hu","id","it","ja","ko","ms","nb","nl","pl","pt","pt-PT","ro","ru","sk","sv","th","tr","uk","vi","zh-Hans","zh-Hant","zh-HK"]}],countryRegionWhitelist:[{countryCode:"AE",region:"AE"},{countryCode:"AE",region:"SA"},{countryCode:"IN",region:""},{countryCode:"JP",region:"JP"},{countryCode:"KR",region:"KR"},{countryCode:"MA",region:"MA"},{countryCode:"RU",region:"RU"},{countryCode:"SA",region:"AE"},{countryCode:"SA",region:"SA"},{countryCode:"VN",region:"VN"}],checksumType:0,requestStyle:0,deviceSKUWhitelist:[],baseURL:"https://gspe19-ssl.ls.apple.com/tile.vf",dataSet:0,supportsMultipathTCP:!1},{style:66,validVersion:[{identifier:16030619,availableTiles:[{minX:0,minY:0,maxX:1,maxY:1,minZ:1,maxZ:1},{minX:0,minY:0,maxX:3,maxY:3,minZ:2,maxZ:2},{minX:0,minY:0,maxX:7,maxY:7,minZ:3,maxZ:3},{minX:0,minY:0,maxX:15,maxY:15,minZ:4,maxZ:4},{minX:0,minY:0,maxX:31,maxY:31,minZ:5,maxZ:5},{minX:0,minY:0,maxX:63,maxY:63,minZ:6,maxZ:6},{minX:0,minY:0,maxX:127,maxY:127,minZ:7,maxZ:7},{minX:0,minY:0,maxX:255,maxY:255,minZ:8,maxZ:8},{minX:0,minY:0,maxX:511,maxY:511,minZ:9,maxZ:9},{minX:0,minY:0,maxX:1023,maxY:1023,minZ:10,maxZ:10},{minX:0,minY:0,maxX:2047,maxY:2047,minZ:11,maxZ:11},{minX:0,minY:0,maxX:4095,maxY:4095,minZ:12,maxZ:12},{minX:0,minY:0,maxX:8191,maxY:8191,minZ:13,maxZ:13},{minX:0,minY:0,maxX:16383,maxY:16383,minZ:14,maxZ:14},{minX:0,minY:0,maxX:32767,maxY:32767,minZ:15,maxZ:15}],genericTile:[],supportedLanguagesVersion:1}],scale:0,size:2,supportedLanguage:[{identifier:1,language:["ar","ca","cs","da","de","el","en","en-AU","en-GB","es","es-MX","es-US","fi","fr","fr-CA","he","hi","hr","hu","id","it","ja","ko","ms","nb","nl","pl","pt","pt-PT","ro","ru","sk","sv","th","tr","uk","vi","zh-Hans","zh-Hant","zh-HK"]}],countryRegionWhitelist:[{countryCode:"AE",region:"AE"},{countryCode:"AE",region:"SA"},{countryCode:"IN",region:""},{countryCode:"JP",region:"JP"},{countryCode:"KR",region:"KR"},{countryCode:"MA",region:"MA"},{countryCode:"RU",region:"RU"},{countryCode:"SA",region:"AE"},{countryCode:"SA",region:"SA"},{countryCode:"VN",region:"VN"}],checksumType:0,requestStyle:0,deviceSKUWhitelist:[],baseURL:"https://gspe19-kittyhawk-ssl.ls.apple.com/tile.vf",dataSet:1,supportsMultipathTCP:!1},{style:67,validVersion:[{identifier:16034178,availableTiles:[{minX:0,minY:0,maxX:1,maxY:1,minZ:1,maxZ:1},{minX:0,minY:0,maxX:3,maxY:3,minZ:2,maxZ:2},{minX:0,minY:0,maxX:7,maxY:7,minZ:3,maxZ:3},{minX:0,minY:0,maxX:15,maxY:15,minZ:4,maxZ:4},{minX:0,minY:0,maxX:31,maxY:31,minZ:5,maxZ:5},{minX:0,minY:0,maxX:63,maxY:63,minZ:6,maxZ:6},{minX:0,minY:0,maxX:127,maxY:127,minZ:7,maxZ:7},{minX:0,minY:0,maxX:255,maxY:255,minZ:8,maxZ:8},{minX:0,minY:0,maxX:1023,maxY:1023,minZ:10,maxZ:10},{minX:0,minY:0,maxX:4095,maxY:4095,minZ:12,maxZ:12},{minX:0,minY:0,maxX:16383,maxY:16383,minZ:14,maxZ:14}],genericTile:[],supportedLanguagesVersion:1}],scale:0,size:2,supportedLanguage:[{identifier:1,language:["ar","ca","cs","da","de","el","en","en-AU","en-GB","es","es-MX","es-US","fi","fr","fr-CA","he","hi","hr","hu","id","it","ja","ko","ms","nb","nl","pl","pt","pt-PT","ro","ru","sk","sv","th","tr","uk","vi","zh-Hans","zh-Hant","zh-HK"]}],countryRegionWhitelist:[{countryCode:"AE",region:"AE"},{countryCode:"AE",region:"SA"},{countryCode:"IN",region:""},{countryCode:"JP",region:"JP"},{countryCode:"KR",region:"KR"},{countryCode:"MA",region:"MA"},{countryCode:"RU",region:"RU"},{countryCode:"SA",region:"AE"},{countryCode:"SA",region:"SA"},{countryCode:"VN",region:"VN"}],checksumType:0,requestStyle:0,deviceSKUWhitelist:[],baseURL:"https://gspe19-ssl.ls.apple.com/tile.vf",dataSet:0,supportsMultipathTCP:!1},{style:67,validVersion:[{identifier:16030619,availableTiles:[{minX:0,minY:0,maxX:1,maxY:1,minZ:1,maxZ:1},{minX:0,minY:0,maxX:3,maxY:3,minZ:2,maxZ:2},{minX:0,minY:0,maxX:7,maxY:7,minZ:3,maxZ:3},{minX:0,minY:0,maxX:15,maxY:15,minZ:4,maxZ:4},{minX:0,minY:0,maxX:31,maxY:31,minZ:5,maxZ:5},{minX:0,minY:0,maxX:63,maxY:63,minZ:6,maxZ:6},{minX:0,minY:0,maxX:127,maxY:127,minZ:7,maxZ:7},{minX:0,minY:0,maxX:255,maxY:255,minZ:8,maxZ:8},{minX:0,minY:0,maxX:1023,maxY:1023,minZ:10,maxZ:10},{minX:0,minY:0,maxX:4095,maxY:4095,minZ:12,maxZ:12},{minX:0,minY:0,maxX:16383,maxY:16383,minZ:14,maxZ:14}],genericTile:[],supportedLanguagesVersion:1}],scale:0,size:2,supportedLanguage:[{identifier:1,language:["ar","ca","cs","da","de","el","en","en-AU","en-GB","es","es-MX","es-US","fi","fr","fr-CA","he","hi","hr","hu","id","it","ja","ko","ms","nb","nl","pl","pt","pt-PT","ro","ru","sk","sv","th","tr","uk","vi","zh-Hans","zh-Hant","zh-HK"]}],countryRegionWhitelist:[{countryCode:"AE",region:"AE"},{countryCode:"AE",region:"SA"},{countryCode:"IN",region:""},{countryCode:"JP",region:"JP"},{countryCode:"KR",region:"KR"},{countryCode:"MA",region:"MA"},{countryCode:"RU",region:"RU"},{countryCode:"SA",region:"AE"},{countryCode:"SA",region:"SA"},{countryCode:"VN",region:"VN"}],checksumType:0,requestStyle:0,deviceSKUWhitelist:[],baseURL:"https://gspe19-kittyhawk-ssl.ls.apple.com/tile.vf",dataSet:1,supportsMultipathTCP:!1},{style:68,validVersion:[{identifier:16034178,availableTiles:[{minX:0,minY:0,maxX:1,maxY:1,minZ:1,maxZ:1},{minX:0,minY:0,maxX:3,maxY:3,minZ:2,maxZ:2},{minX:0,minY:0,maxX:15,maxY:15,minZ:4,maxZ:4},{minX:0,minY:0,maxX:63,maxY:63,minZ:6,maxZ:6},{minX:0,minY:0,maxX:127,maxY:127,minZ:7,maxZ:7},{minX:0,minY:0,maxX:255,maxY:255,minZ:8,maxZ:8},{minX:0,minY:0,maxX:511,maxY:511,minZ:9,maxZ:9},{minX:0,minY:0,maxX:1023,maxY:1023,minZ:10,maxZ:10},{minX:0,minY:0,maxX:4095,maxY:4095,minZ:12,maxZ:12},{minX:0,minY:0,maxX:8191,maxY:8191,minZ:13,maxZ:13},{minX:0,minY:0,maxX:16383,maxY:16383,minZ:14,maxZ:14},{minX:0,minY:0,maxX:32767,maxY:32767,minZ:15,maxZ:15},{minX:0,minY:0,maxX:65535,maxY:65535,minZ:16,maxZ:16},{minX:0,minY:0,maxX:131071,maxY:131071,minZ:17,maxZ:17}],genericTile:[],supportedLanguagesVersion:1}],scale:0,size:2,supportedLanguage:[{identifier:1,language:["ar","ca","cs","da","de","el","en","en-AU","en-GB","es","es-MX","es-US","fi","fr","fr-CA","he","hi","hr","hu","id","it","ja","ko","ms","nb","nl","pl","pt","pt-PT","ro","ru","sk","sv","th","tr","uk","vi","zh-Hans","zh-Hant","zh-HK"]}],countryRegionWhitelist:[],checksumType:0,requestStyle:0,deviceSKUWhitelist:[],baseURL:"https://gspe19-ssl.ls.apple.com/tile.vf",dataSet:0,supportsMultipathTCP:!1},{style:68,validVersion:[{identifier:16030619,availableTiles:[{minX:0,minY:0,maxX:1,maxY:1,minZ:1,maxZ:1},{minX:0,minY:0,maxX:3,maxY:3,minZ:2,maxZ:2},{minX:0,minY:0,maxX:15,maxY:15,minZ:4,maxZ:4},{minX:0,minY:0,maxX:63,maxY:63,minZ:6,maxZ:6},{minX:0,minY:0,maxX:127,maxY:127,minZ:7,maxZ:7},{minX:0,minY:0,maxX:255,maxY:255,minZ:8,maxZ:8},{minX:0,minY:0,maxX:511,maxY:511,minZ:9,maxZ:9},{minX:0,minY:0,maxX:1023,maxY:1023,minZ:10,maxZ:10},{minX:0,minY:0,maxX:4095,maxY:4095,minZ:12,maxZ:12},{minX:0,minY:0,maxX:8191,maxY:8191,minZ:13,maxZ:13},{minX:0,minY:0,maxX:16383,maxY:16383,minZ:14,maxZ:14},{minX:0,minY:0,maxX:32767,maxY:32767,minZ:15,maxZ:15},{minX:0,minY:0,maxX:65535,maxY:65535,minZ:16,maxZ:16},{minX:0,minY:0,maxX:131071,maxY:131071,minZ:17,maxZ:17}],genericTile:[],supportedLanguagesVersion:1}],scale:0,size:2,supportedLanguage:[{identifier:1,language:["ar","ca","cs","da","de","el","en","en-AU","en-GB","es","es-MX","es-US","fi","fr","fr-CA","he","hi","hr","hu","id","it","ja","ko","ms","nb","nl","pl","pt","pt-PT","ro","ru","sk","sv","th","tr","uk","vi","zh-Hans","zh-Hant","zh-HK"]}],countryRegionWhitelist:[],checksumType:0,requestStyle:0,deviceSKUWhitelist:[],baseURL:"https://gspe19-kittyhawk-ssl.ls.apple.com/tile.vf",dataSet:1,supportsMultipathTCP:!1},{style:69,validVersion:[{identifier:16034178,availableTiles:[{minX:0,minY:0,maxX:1,maxY:1,minZ:1,maxZ:1},{minX:0,minY:0,maxX:7,maxY:7,minZ:3,maxZ:3},{minX:0,minY:0,maxX:63,maxY:63,minZ:6,maxZ:6},{minX:0,minY:0,maxX:511,maxY:511,minZ:9,maxZ:9},{minX:0,minY:0,maxX:4095,maxY:4095,minZ:12,maxZ:12},{minX:0,minY:0,maxX:32767,maxY:32767,minZ:15,maxZ:15}],genericTile:[]}],scale:0,size:2,supportedLanguage:[],countryRegionWhitelist:[],checksumType:0,requestStyle:0,deviceSKUWhitelist:[],baseURL:"https://gspe19-ssl.ls.apple.com/tile.vf",dataSet:0,supportsMultipathTCP:!1},{style:69,validVersion:[{identifier:16030619,availableTiles:[{minX:0,minY:0,maxX:1,maxY:1,minZ:1,maxZ:1},{minX:0,minY:0,maxX:7,maxY:7,minZ:3,maxZ:3},{minX:0,minY:0,maxX:63,maxY:63,minZ:6,maxZ:6},{minX:0,minY:0,maxX:511,maxY:511,minZ:9,maxZ:9},{minX:0,minY:0,maxX:4095,maxY:4095,minZ:12,maxZ:12},{minX:0,minY:0,maxX:32767,maxY:32767,minZ:15,maxZ:15}],genericTile:[]}],scale:0,size:2,supportedLanguage:[],countryRegionWhitelist:[],checksumType:0,requestStyle:0,deviceSKUWhitelist:[],baseURL:"https://gspe19-kittyhawk-ssl.ls.apple.com/tile.vf",dataSet:1,supportsMultipathTCP:!1},{style:70,validVersion:[{identifier:1,availableTiles:[{minX:0,minY:0,maxX:8191,maxY:8191,minZ:13,maxZ:13}],genericTile:[],timeToLiveSeconds:86400}],scale:0,size:2,supportedLanguage:[],countryRegionWhitelist:[],checksumType:0,requestStyle:1,deviceSKUWhitelist:[],baseURL:"https://gspe76-ssl.ls.apple.com/api/vltile",supportsMultipathTCP:!1},{style:71,validVersion:[{identifier:1,availableTiles:[{minX:0,minY:0,maxX:2097151,maxY:2097151,minZ:21,maxZ:21}],genericTile:[]}],scale:0,size:2,supportedLanguage:[],countryRegionWhitelist:[],checksumType:0,requestStyle:1,deviceSKUWhitelist:[],baseURL:"https://gspe92-ssl.ls.apple.com",supportsMultipathTCP:!1},{style:72,validVersion:[{identifier:2,availableTiles:[{minX:0,minY:0,maxX:8191,maxY:8191,minZ:13,maxZ:13}],genericTile:[],timeToLiveSeconds:3600}],scale:0,size:2,supportedLanguage:[],countryRegionWhitelist:[],checksumType:0,requestStyle:1,deviceSKUWhitelist:[],baseURL:"https://gspe79-ssl.ls.apple.com/72/v2",supportsMultipathTCP:!1},{style:73,validVersion:[{identifier:16034178,availableTiles:[{minX:0,minY:0,maxX:4095,maxY:4095,minZ:12,maxZ:12},{minX:0,minY:0,maxX:8191,maxY:8191,minZ:13,maxZ:13},{minX:0,minY:0,maxX:16383,maxY:16383,minZ:14,maxZ:14},{minX:0,minY:0,maxX:32767,maxY:32767,minZ:15,maxZ:15}],genericTile:[]}],scale:0,size:2,supportedLanguage:[],countryRegionWhitelist:[],checksumType:0,requestStyle:0,deviceSKUWhitelist:[],baseURL:"https://gspe19-ssl.ls.apple.com/tile.vf",dataSet:0,supportsMultipathTCP:!1},{style:73,validVersion:[{identifier:16030619,availableTiles:[{minX:0,minY:0,maxX:4095,maxY:4095,minZ:12,maxZ:12},{minX:0,minY:0,maxX:8191,maxY:8191,minZ:13,maxZ:13},{minX:0,minY:0,maxX:16383,maxY:16383,minZ:14,maxZ:14},{minX:0,minY:0,maxX:32767,maxY:32767,minZ:15,maxZ:15}],genericTile:[]}],scale:0,size:2,supportedLanguage:[],countryRegionWhitelist:[],checksumType:0,requestStyle:0,deviceSKUWhitelist:[],baseURL:"https://gspe19-kittyhawk-ssl.ls.apple.com/tile.vf",dataSet:1,supportsMultipathTCP:!1},{style:74,validVersion:[{identifier:0,availableTiles:[{minX:0,minY:0,maxX:1023,maxY:1023,minZ:10,maxZ:10},{minX:0,minY:0,maxX:2097151,maxY:2097151,minZ:21,maxZ:21}],genericTile:[],timeToLiveSeconds:86400}],scale:0,size:2,supportedLanguage:[],countryRegionWhitelist:[],checksumType:0,requestStyle:1,deviceSKUWhitelist:[],baseURL:"https://gspe79-ssl.ls.apple.com/pbz/v1",supportsMultipathTCP:!1},{style:75,validVersion:[{identifier:0,availableTiles:[{minX:0,minY:0,maxX:1023,maxY:1023,minZ:10,maxZ:10},{minX:0,minY:0,maxX:131071,maxY:131071,minZ:17,maxZ:17}],genericTile:[],timeToLiveSeconds:86400}],scale:0,size:2,supportedLanguage:[],countryRegionWhitelist:[],checksumType:0,requestStyle:1,deviceSKUWhitelist:[],baseURL:"https://gspe79-ssl.ls.apple.com/pbz/v1",supportsMultipathTCP:!1},{style:76,validVersion:[{identifier:0,availableTiles:[{minX:0,minY:0,maxX:8191,maxY:8191,minZ:13,maxZ:13},{minX:0,minY:0,maxX:524287,maxY:524287,minZ:19,maxZ:19}],genericTile:[],timeToLiveSeconds:86400}],scale:0,size:2,supportedLanguage:[],countryRegionWhitelist:[],checksumType:0,requestStyle:1,deviceSKUWhitelist:[],baseURL:"https://gspe79-ssl.ls.apple.com/sis/v1",supportsMultipathTCP:!1},{style:78,validVersion:[{identifier:16034178,availableTiles:[{minX:0,minY:0,maxX:4095,maxY:4095,minZ:12,maxZ:12}],genericTile:[]}],scale:0,size:2,supportedLanguage:[],countryRegionWhitelist:[],checksumType:0,requestStyle:0,deviceSKUWhitelist:[],baseURL:"https://gspe19-ssl.ls.apple.com/tile.vf",dataSet:0,supportsMultipathTCP:!1},{style:78,validVersion:[{identifier:16030619,availableTiles:[{minX:0,minY:0,maxX:4095,maxY:4095,minZ:12,maxZ:12}],genericTile:[]}],scale:0,size:2,supportedLanguage:[],countryRegionWhitelist:[],checksumType:0,requestStyle:0,deviceSKUWhitelist:[],baseURL:"https://gspe19-kittyhawk-ssl.ls.apple.com/tile.vf",dataSet:1,supportsMultipathTCP:!1},{style:79,validVersion:[{identifier:16034178,availableTiles:[{minX:0,minY:0,maxX:1,maxY:1,minZ:1,maxZ:1},{minX:0,minY:0,maxX:3,maxY:3,minZ:2,maxZ:2},{minX:0,minY:0,maxX:7,maxY:7,minZ:3,maxZ:3},{minX:0,minY:0,maxX:15,maxY:15,minZ:4,maxZ:4},{minX:0,minY:0,maxX:31,maxY:31,minZ:5,maxZ:5},{minX:0,minY:0,maxX:63,maxY:63,minZ:6,maxZ:6},{minX:0,minY:0,maxX:127,maxY:127,minZ:7,maxZ:7},{minX:0,minY:0,maxX:255,maxY:255,minZ:8,maxZ:8},{minX:0,minY:0,maxX:511,maxY:511,minZ:9,maxZ:9}],genericTile:[]}],scale:0,size:2,supportedLanguage:[],countryRegionWhitelist:[],checksumType:0,requestStyle:0,deviceSKUWhitelist:[],baseURL:"https://gspe19-ssl.ls.apple.com/tile.vf",dataSet:0,supportsMultipathTCP:!1},{style:79,validVersion:[{identifier:16030619,availableTiles:[{minX:0,minY:0,maxX:1,maxY:1,minZ:1,maxZ:1},{minX:0,minY:0,maxX:3,maxY:3,minZ:2,maxZ:2},{minX:0,minY:0,maxX:7,maxY:7,minZ:3,maxZ:3},{minX:0,minY:0,maxX:15,maxY:15,minZ:4,maxZ:4},{minX:0,minY:0,maxX:31,maxY:31,minZ:5,maxZ:5},{minX:0,minY:0,maxX:63,maxY:63,minZ:6,maxZ:6},{minX:0,minY:0,maxX:127,maxY:127,minZ:7,maxZ:7},{minX:0,minY:0,maxX:255,maxY:255,minZ:8,maxZ:8},{minX:0,minY:0,maxX:511,maxY:511,minZ:9,maxZ:9}],genericTile:[]}],scale:0,size:2,supportedLanguage:[],countryRegionWhitelist:[],checksumType:0,requestStyle:0,deviceSKUWhitelist:[],baseURL:"https://gspe19-kittyhawk-ssl.ls.apple.com/tile.vf",dataSet:1,supportsMultipathTCP:!1},{style:80,validVersion:[{identifier:0,availableTiles:[{minX:0,minY:0,maxX:1023,maxY:1023,minZ:10,maxZ:10},{minX:0,minY:0,maxX:65535,maxY:65535,minZ:16,maxZ:16}],genericTile:[],timeToLiveSeconds:86400}],scale:0,size:2,supportedLanguage:[],countryRegionWhitelist:[],checksumType:0,requestStyle:1,deviceSKUWhitelist:[],baseURL:"https://gspe79-ssl.ls.apple.com/sdm/v1",supportsMultipathTCP:!1},{style:82,validVersion:[{identifier:16034178,availableTiles:[{minX:0,minY:0,maxX:1,maxY:1,minZ:1,maxZ:1}],genericTile:[]}],scale:0,size:2,supportedLanguage:[],countryRegionWhitelist:[],checksumType:0,requestStyle:0,deviceSKUWhitelist:[],baseURL:"https://gspe19-ssl.ls.apple.com/asset/v3/model-occlusion",dataSet:0,supportsMultipathTCP:!1},{style:82,validVersion:[{identifier:16030619,availableTiles:[{minX:0,minY:0,maxX:1,maxY:1,minZ:1,maxZ:1}],genericTile:[]}],scale:0,size:2,supportedLanguage:[],countryRegionWhitelist:[],checksumType:0,requestStyle:0,deviceSKUWhitelist:[],baseURL:"https://gspe19-kittyhawk-ssl.ls.apple.com/asset/v3/model-occlusion",dataSet:1,supportsMultipathTCP:!1},{style:84,validVersion:[{identifier:16034178,availableTiles:[{minX:0,minY:0,maxX:1,maxY:1,minZ:1,maxZ:1},{minX:0,minY:0,maxX:3,maxY:3,minZ:2,maxZ:2},{minX:0,minY:0,maxX:15,maxY:15,minZ:4,maxZ:4},{minX:0,minY:0,maxX:63,maxY:63,minZ:6,maxZ:6},{minX:0,minY:0,maxX:127,maxY:127,minZ:7,maxZ:7},{minX:0,minY:0,maxX:255,maxY:255,minZ:8,maxZ:8},{minX:0,minY:0,maxX:511,maxY:511,minZ:9,maxZ:9},{minX:0,minY:0,maxX:1023,maxY:1023,minZ:10,maxZ:10},{minX:0,minY:0,maxX:4095,maxY:4095,minZ:12,maxZ:12},{minX:0,minY:0,maxX:8191,maxY:8191,minZ:13,maxZ:13},{minX:0,minY:0,maxX:16383,maxY:16383,minZ:14,maxZ:14},{minX:0,minY:0,maxX:32767,maxY:32767,minZ:15,maxZ:15},{minX:0,minY:0,maxX:65535,maxY:65535,minZ:16,maxZ:16},{minX:0,minY:0,maxX:131071,maxY:131071,minZ:17,maxZ:17}],genericTile:[],timeToLiveSeconds:1800,supportedLanguagesVersion:1}],scale:0,size:2,supportedLanguage:[{identifier:1,language:["ar","ca","cs","da","de","el","en","en-AU","en-GB","es","es-MX","es-US","fi","fr","fr-CA","he","hi","hr","hu","id","it","ja","ko","ms","nb","nl","pl","pt","pt-PT","ro","ru","sk","sv","th","tr","uk","vi","zh-Hans","zh-Hant","zh-HK"]}],countryRegionWhitelist:[],checksumType:0,requestStyle:0,deviceSKUWhitelist:[],baseURL:"https://gspe19-2-ssl.ls.apple.com/poi_update",dataSet:0,supportsMultipathTCP:!1},{style:84,validVersion:[{identifier:16030619,availableTiles:[{minX:0,minY:0,maxX:1,maxY:1,minZ:1,maxZ:1},{minX:0,minY:0,maxX:3,maxY:3,minZ:2,maxZ:2},{minX:0,minY:0,maxX:15,maxY:15,minZ:4,maxZ:4},{minX:0,minY:0,maxX:63,maxY:63,minZ:6,maxZ:6},{minX:0,minY:0,maxX:127,maxY:127,minZ:7,maxZ:7},{minX:0,minY:0,maxX:255,maxY:255,minZ:8,maxZ:8},{minX:0,minY:0,maxX:511,maxY:511,minZ:9,maxZ:9},{minX:0,minY:0,maxX:1023,maxY:1023,minZ:10,maxZ:10},{minX:0,minY:0,maxX:4095,maxY:4095,minZ:12,maxZ:12},{minX:0,minY:0,maxX:8191,maxY:8191,minZ:13,maxZ:13},{minX:0,minY:0,maxX:16383,maxY:16383,minZ:14,maxZ:14},{minX:0,minY:0,maxX:32767,maxY:32767,minZ:15,maxZ:15},{minX:0,minY:0,maxX:65535,maxY:65535,minZ:16,maxZ:16},{minX:0,minY:0,maxX:131071,maxY:131071,minZ:17,maxZ:17}],genericTile:[],timeToLiveSeconds:1800,supportedLanguagesVersion:1}],scale:0,size:2,supportedLanguage:[{identifier:1,language:["ar","ca","cs","da","de","el","en","en-AU","en-GB","es","es-MX","es-US","fi","fr","fr-CA","he","hi","hr","hu","id","it","ja","ko","ms","nb","nl","pl","pt","pt-PT","ro","ru","sk","sv","th","tr","uk","vi","zh-Hans","zh-Hant","zh-HK"]}],countryRegionWhitelist:[],checksumType:0,requestStyle:0,deviceSKUWhitelist:[],baseURL:"https://gspe19-2-ssl.ls.apple.com/poi_update",dataSet:1,supportsMultipathTCP:!1},{style:85,validVersion:[{identifier:16034178,availableTiles:[{minX:0,minY:0,maxX:4095,maxY:4095,minZ:12,maxZ:12}],genericTile:[]}],scale:0,size:2,supportedLanguage:[],countryRegionWhitelist:[],checksumType:0,requestStyle:0,deviceSKUWhitelist:[],baseURL:"https://gspe19-2-ssl.ls.apple.com/live_tile.vf",dataSet:0,supportsMultipathTCP:!1},{style:85,validVersion:[{identifier:16030619,availableTiles:[{minX:0,minY:0,maxX:4095,maxY:4095,minZ:12,maxZ:12}],genericTile:[]}],scale:0,size:2,supportedLanguage:[],countryRegionWhitelist:[],checksumType:0,requestStyle:0,deviceSKUWhitelist:[],baseURL:"https://gspe19-2-ssl.ls.apple.com/live_tile.vf",dataSet:1,supportsMultipathTCP:!1},{style:87,validVersion:[{identifier:16034178,availableTiles:[{minX:0,minY:0,maxX:1,maxY:1,minZ:1,maxZ:1},{minX:0,minY:0,maxX:3,maxY:3,minZ:2,maxZ:2},{minX:0,minY:0,maxX:7,maxY:7,minZ:3,maxZ:3},{minX:0,minY:0,maxX:15,maxY:15,minZ:4,maxZ:4},{minX:0,minY:0,maxX:31,maxY:31,minZ:5,maxZ:5},{minX:0,minY:0,maxX:63,maxY:63,minZ:6,maxZ:6},{minX:0,minY:0,maxX:127,maxY:127,minZ:7,maxZ:7},{minX:0,minY:0,maxX:255,maxY:255,minZ:8,maxZ:8},{minX:0,minY:0,maxX:511,maxY:511,minZ:9,maxZ:9},{minX:0,minY:0,maxX:1023,maxY:1023,minZ:10,maxZ:10},{minX:0,minY:0,maxX:2047,maxY:2047,minZ:11,maxZ:11},{minX:0,minY:0,maxX:4095,maxY:4095,minZ:12,maxZ:12},{minX:0,minY:0,maxX:8191,maxY:8191,minZ:13,maxZ:13},{minX:0,minY:0,maxX:16383,maxY:16383,minZ:14,maxZ:14},{minX:0,minY:0,maxX:32767,maxY:32767,minZ:15,maxZ:15}],genericTile:[],supportedLanguagesVersion:1}],scale:0,size:2,supportedLanguage:[{identifier:1,language:["ar","ca","cs","da","de","el","en","en-AU","en-GB","es","es-MX","es-US","fi","fr","fr-CA","he","hi","hr","hu","id","it","ja","ko","ms","nb","nl","pl","pt","pt-PT","ro","ru","sk","sv","th","tr","uk","vi","zh-Hans","zh-Hant","zh-HK"]}],countryRegionWhitelist:[],checksumType:0,requestStyle:0,deviceSKUWhitelist:[],baseURL:"https://gspe19-ssl.ls.apple.com/tile.vf",dataSet:0,supportsMultipathTCP:!1},{style:87,validVersion:[{identifier:16030619,availableTiles:[{minX:0,minY:0,maxX:1,maxY:1,minZ:1,maxZ:1},{minX:0,minY:0,maxX:3,maxY:3,minZ:2,maxZ:2},{minX:0,minY:0,maxX:7,maxY:7,minZ:3,maxZ:3},{minX:0,minY:0,maxX:15,maxY:15,minZ:4,maxZ:4},{minX:0,minY:0,maxX:31,maxY:31,minZ:5,maxZ:5},{minX:0,minY:0,maxX:63,maxY:63,minZ:6,maxZ:6},{minX:0,minY:0,maxX:127,maxY:127,minZ:7,maxZ:7},{minX:0,minY:0,maxX:255,maxY:255,minZ:8,maxZ:8},{minX:0,minY:0,maxX:511,maxY:511,minZ:9,maxZ:9},{minX:0,minY:0,maxX:1023,maxY:1023,minZ:10,maxZ:10},{minX:0,minY:0,maxX:2047,maxY:2047,minZ:11,maxZ:11},{minX:0,minY:0,maxX:4095,maxY:4095,minZ:12,maxZ:12},{minX:0,minY:0,maxX:8191,maxY:8191,minZ:13,maxZ:13},{minX:0,minY:0,maxX:16383,maxY:16383,minZ:14,maxZ:14},{minX:0,minY:0,maxX:32767,maxY:32767,minZ:15,maxZ:15}],genericTile:[],supportedLanguagesVersion:1}],scale:0,size:2,supportedLanguage:[{identifier:1,language:["ar","ca","cs","da","de","el","en","en-AU","en-GB","es","es-MX","es-US","fi","fr","fr-CA","he","hi","hr","hu","id","it","ja","ko","ms","nb","nl","pl","pt","pt-PT","ro","ru","sk","sv","th","tr","uk","vi","zh-Hans","zh-Hant","zh-HK"]}],countryRegionWhitelist:[],checksumType:0,requestStyle:0,deviceSKUWhitelist:[],baseURL:"https://gspe19-kittyhawk-ssl.ls.apple.com/tile.vf",dataSet:1,supportsMultipathTCP:!1},{style:88,validVersion:[{identifier:16034178,availableTiles:[{minX:0,minY:0,maxX:127,maxY:127,minZ:7,maxZ:7},{minX:0,minY:0,maxX:4095,maxY:4095,minZ:12,maxZ:12}],genericTile:[]}],scale:0,size:2,supportedLanguage:[],countryRegionWhitelist:[],checksumType:0,requestStyle:0,deviceSKUWhitelist:[],baseURL:"https://gspe19-ssl.ls.apple.com/tile.vf",dataSet:0,supportsMultipathTCP:!1},{style:88,validVersion:[{identifier:16030619,availableTiles:[{minX:0,minY:0,maxX:127,maxY:127,minZ:7,maxZ:7},{minX:0,minY:0,maxX:4095,maxY:4095,minZ:12,maxZ:12}],genericTile:[]}],scale:0,size:2,supportedLanguage:[],countryRegionWhitelist:[],checksumType:0,requestStyle:0,deviceSKUWhitelist:[],baseURL:"https://gspe19-kittyhawk-ssl.ls.apple.com/tile.vf",dataSet:1,supportsMultipathTCP:!1},{style:89,validVersion:[{identifier:1,availableTiles:[{minX:0,minY:0,maxX:262143,maxY:262143,minZ:18,maxZ:18}],genericTile:[],timeToLiveSeconds:86400}],scale:0,size:2,supportedLanguage:[],countryRegionWhitelist:[],checksumType:0,requestStyle:1,deviceSKUWhitelist:[],baseURL:"https://gspe79-ssl.ls.apple.com/ray/v1",supportsMultipathTCP:!1},{style:90,validVersion:[{identifier:16034178,availableTiles:[{minX:0,minY:0,maxX:8191,maxY:8191,minZ:13,maxZ:13},{minX:0,minY:0,maxX:32767,maxY:32767,minZ:15,maxZ:15}],genericTile:[]}],scale:0,size:2,supportedLanguage:[],countryRegionWhitelist:[],checksumType:0,requestStyle:0,deviceSKUWhitelist:[],baseURL:"https://gspe19-ssl.ls.apple.com/tile.vf",dataSet:0,supportsMultipathTCP:!1},{style:90,validVersion:[{identifier:16030619,availableTiles:[{minX:0,minY:0,maxX:8191,maxY:8191,minZ:13,maxZ:13},{minX:0,minY:0,maxX:32767,maxY:32767,minZ:15,maxZ:15}],genericTile:[]}],scale:0,size:2,supportedLanguage:[],countryRegionWhitelist:[],checksumType:0,requestStyle:0,deviceSKUWhitelist:[],baseURL:"https://gspe19-kittyhawk-ssl.ls.apple.com/tile.vf",dataSet:1,supportsMultipathTCP:!1}],attribution:[{name:"‎",url:"https://gspe21-ssl.ls.apple.com/html/attribution-275.html",resource:[],region:[],linkDisplayStringIndex:0,plainTextURL:"https://gspe21-ssl.ls.apple.com/html/attribution-274.txt",plainTextURLSHA256Checksum:{0:95,1:21,2:102,3:110,4:8,5:247,6:232,7:236,8:45,9:156,10:70,11:137,12:179,13:197,14:80,15:243,16:60,17:246,18:254,19:239,20:198,21:57,22:65,23:219,24:22,25:147,26:180,27:123,28:186,29:78,30:122,31:162}},{name:"MMI",url:"https://gspe21-ssl.ls.apple.com/html/attribution-275.html",resource:[{resourceType:5,filename:"mmi-mask-2.png",checksum:{0:35,1:54,2:2,3:219,4:218,5:184,6:124,7:50,8:35,9:32,10:86,11:20,12:147,13:223,14:7,15:41,16:209,17:238,18:32,19:41},region:[],filter:[],validationMethod:0,updateMethod:0},{resourceType:5,filename:"mmi-mask-2@2x.png",checksum:{0:5,1:160,2:112,3:185,4:3,5:255,6:7,7:75,8:78,9:139,10:52,11:81,12:151,13:231,14:143,15:29,16:187,17:109,18:220,19:80},region:[],filter:[],validationMethod:0,updateMethod:0},{resourceType:5,filename:"mmi-mask-2@3x.png",checksum:{0:240,1:170,2:204,3:91,4:161,5:113,6:81,7:101,8:136,9:205,10:115,11:2,12:192,13:97,14:106,15:34,16:227,17:214,18:74,19:220},region:[],filter:[],validationMethod:0,updateMethod:0}],region:[{minX:176,minY:110,maxX:183,maxY:122,minZ:8,maxZ:21},{minX:178,minY:107,maxX:188,maxY:107,minZ:8,maxZ:21},{minX:178,minY:108,maxX:183,maxY:109,minZ:8,maxZ:21},{minX:180,minY:105,maxX:180,maxY:106,minZ:8,maxZ:21},{minX:181,minY:104,maxX:183,maxY:106,minZ:8,maxZ:21},{minX:182,minY:103,maxX:182,maxY:103,minZ:8,maxZ:21},{minX:184,minY:104,maxX:184,maxY:106,minZ:8,maxZ:21},{minX:184,minY:108,maxX:195,maxY:110,minZ:8,maxZ:21},{minX:184,minY:111,maxX:194,maxY:111,minZ:8,maxZ:21},{minX:184,minY:112,maxX:191,maxY:120,minZ:8,maxZ:21},{minX:184,minY:121,maxX:184,maxY:121,minZ:8,maxZ:21},{minX:185,minY:105,maxX:185,maxY:106,minZ:8,maxZ:21},{minX:190,minY:107,maxX:190,maxY:107,minZ:8,maxZ:21},{minX:193,minY:118,maxX:194,maxY:123,minZ:8,maxZ:21},{minX:195,minY:118,maxX:195,maxY:118,minZ:8,maxZ:21}],linkDisplayStringIndex:0},{name:"© GeoTechnologies, Inc.",url:"https://gspe21-ssl.ls.apple.com/html/attribution-275.html",resource:[],region:[{minX:218,minY:102,maxX:225,maxY:104,minZ:8,maxZ:21},{minX:221,minY:98,maxX:228,maxY:101,minZ:8,maxZ:21},{minX:226,minY:91,maxX:231,maxY:97,minZ:8,maxZ:21}],linkDisplayStringIndex:0}],urlInfoSet:[{alternateResourcesURL:[{url:"https://cdn.apple-mapkit.com/rap",supportsMultipathTCP:!1}],resourcesURL:{url:"https://gspe21-ssl.ls.apple.com/",supportsMultipathTCP:!1},searchAttributionManifestURL:{url:"https://gspe21-ssl.ls.apple.com/config/search-attribution-1262",supportsMultipathTCP:!1},directionsURL:{url:"https://gsp-ssl.ls.apple.com/directions.arpc",supportsMultipathTCP:!0,alternativeMultipathTCPPort:5228},etaURL:{url:"https://gsp-ssl.ls.apple.com/directions.arpc",supportsMultipathTCP:!0,alternativeMultipathTCPPort:5228},batchReverseGeocoderURL:{url:"https://gsp36-ssl.ls.apple.com/revgeo.arpc",supportsMultipathTCP:!1},simpleETAURL:{url:"https://gsp-ssl.ls.apple.com/directions.arpc",supportsMultipathTCP:!0,alternativeMultipathTCPPort:5228},addressCorrectionInitURL:{url:"https://gsp47-ssl.ls.apple.com/ac",supportsMultipathTCP:!1},addressCorrectionUpdateURL:{url:"https://gsp47-ssl.ls.apple.com/ac",supportsMultipathTCP:!1},problemSubmissionURL:{url:"https://sundew.ls.apple.com/v1/feedback/submission.arpc",supportsMultipathTCP:!1},problemStatusURL:{url:"https://sundew.ls.apple.com/grp/st",supportsMultipathTCP:!1},reverseGeocoderVersionsURL:{url:"https://gspe21-ssl.ls.apple.com/config/revgeo-version-11.plist",supportsMultipathTCP:!1},problemCategoriesURL:{url:"https://gspe21-ssl.ls.apple.com/config/com.apple.GEO.BusinessLocalizedCategories-424.plist",supportsMultipathTCP:!1},announcementsURL:{url:"https://gspe35-ssl.ls.apple.com/config/announcements?environment=prod",supportsMultipathTCP:!1},dispatcherURL:{url:"https://gsp-ssl.ls.apple.com/dispatcher.arpc",supportsMultipathTCP:!0,alternativeMultipathTCPPort:5228},problemOptInURL:{url:"https://sundew.ls.apple.com/grp/oi",supportsMultipathTCP:!1},abExperimentURL:{url:"https://gsp-ssl.ls.apple.com/ab.arpc",supportsMultipathTCP:!1},businessPortalBaseURL:{url:"https://mapsconnect.apple.com/business/ui/claimPlace",supportsMultipathTCP:!1},logMessageUsageURL:{url:"https://gsp64-ssl.ls.apple.com/a/v2/use",supportsMultipathTCP:!1},spatialLookupURL:{url:"https://gsp51-ssl.ls.apple.com/api/v1.0/poi/data",supportsMultipathTCP:!1},realtimeTrafficProbeURL:{url:"https://gsp9-ssl.apple.com/hvr/v2/rtloc",supportsMultipathTCP:!1},batchTrafficProbeURL:{url:"https://gsp10-ssl.ls.apple.com/hvr/v2/loc",supportsMultipathTCP:!1},proactiveRoutingURL:{url:"https://gsp-ssl-commute.ls.apple.com/directions.arpc",supportsMultipathTCP:!0,alternativeMultipathTCPPort:5228},logMessageUsageV3URL:{url:"https://gsp64-ssl.ls.apple.com/hvr/v3/use",supportsMultipathTCP:!1},backgroundDispatcherURL:{url:"https://gsp57-ssl-background.ls.apple.com/dispatcher.arpc",supportsMultipathTCP:!0,alternativeMultipathTCPPort:5228},bluePOIDispatcherURL:{url:"https://gsp57-ssl-locus.ls.apple.com/dispatcher.arpc",supportsMultipathTCP:!0,alternativeMultipathTCPPort:5228},backgroundRevGeoURL:{url:"https://gsp57-ssl-revgeo.ls.apple.com/dispatcher.arpc",supportsMultipathTCP:!1},wifiConnectionQualityProbeURL:{url:"https://gsp10-ssl.ls.apple.com/hvr/wcq",supportsMultipathTCP:!1},wifiQualityURL:{url:"https://gsp85-ssl.ls.apple.com/wifi_request",supportsMultipathTCP:!1},feedbackSubmissionURL:{url:"https://sundew.ls.apple.com/v1/feedback/submission.arpc",supportsMultipathTCP:!1},feedbackLookupURL:{url:"https://gsp-ssl.ls.apple.com/feedback.arpc",supportsMultipathTCP:!1},analyticsCohortSessionURL:{url:"https://gsp64-ssl.ls.apple.com/hvr/v3/use",supportsMultipathTCP:!1},analyticsLongSessionURL:{url:"https://gsp64-ssl.ls.apple.com/hvr/v3/use",supportsMultipathTCP:!1},analyticsShortSessionURL:{url:"https://gsp64-ssl.ls.apple.com/hvr/v3/use",supportsMultipathTCP:!1},analyticsSessionlessURL:{url:"https://gsp64-ssl.ls.apple.com/hvr/v3/use",supportsMultipathTCP:!1},webModuleBaseURL:{url:"https://maps.apple.com",supportsMultipathTCP:!1},wifiQualityTileURL:{url:"https://gspe85-ssl.ls.apple.com/wifi_request_tile",supportsMultipathTCP:!1},addressCorrectionTaggedLocationURL:{url:"https://gsp47-ssl.ls.apple.com/ac",supportsMultipathTCP:!1},proactiveAppClipURL:{url:"https://gspe79-ssl.ls.apple.com/72/v2",supportsMultipathTCP:!1},enrichmentSubmissionURL:{url:"https://sundew.ls.apple.com/v1/feedback/submission.arpc",supportsMultipathTCP:!1},ugcLogDiscardURL:{url:"https://sundew.ls.apple.com/v1/log_message",supportsMultipathTCP:!1},batchReverseGeocoderPlaceRequestURL:{url:"https://gsp36-ssl.ls.apple.com/revgeo_pr.arpc",supportsMultipathTCP:!1},pressureProbeDataURL:{url:"https://gsp10-ssl.ls.apple.com/hvr/cpr",supportsMultipathTCP:!1},poiBusynessActivityCollectionURL:{url:"https://gsp53-ssl.ls.apple.com/hvr/rt_poi_activity",supportsMultipathTCP:!1},rapWebBundleURL:{url:"https://cdn.apple-mapkit.com/rap",supportsMultipathTCP:!1},networkSelectionHarvestURL:{url:"https://gsp10-ssl.ls.apple.com/hvr/strn",supportsMultipathTCP:!1},offlineDataBatchListURL:{url:"https://gspe121-ssl.ls.apple.com/api/batchesForRegion",supportsMultipathTCP:!1},offlineDataSizeURL:{url:"https://gspe121-ssl.ls.apple.com/api/sizeForRegion",supportsMultipathTCP:!1},offlineDataDownloadBaseURL:{url:"https://gspe121-ssl.ls.apple.com",supportsMultipathTCP:!1},bcxDispatcherURL:{url:"https://gsp57-ssl-bcx.ls.apple.com/dispatcher.arpc",supportsMultipathTCP:!1}}],muninBucket:[{bucketID:2,bucketURL:"https://gspe72-ssl.ls.apple.com/mnn_us"},{bucketID:6,bucketURL:"https://gspe72-ssl.ls.apple.com/mnn_us"}]}},c={Settings:l,Configs:p},u={Switch:!0,CountryCode:"US",newsPlusUser:!0},h={Settings:u},x={Switch:!0,CountryCode:"US",canUse:!0},d={Settings:x},g={Switch:!0,CountryCode:"SG",Domains:["web","itunes","app_store","movies","restaurants","maps"],Functions:["flightutilities","lookup","mail","messages","news","safari","siri","spotlight","visualintelligence"],Safari_Smart_History:!0},T={VisualIntelligence:{enabled_domains:["pets","media","books","art","nature","landmarks"],supported_domains:["ART","BOOK","MEDIA","LANDMARK","ANIMALS","BIRDS","FOOD","SIGN_SYMBOL","AUTO_SYMBOL","DOGS","NATURE","NATURAL_LANDMARK","INSECTS","REPTILES","ALBUM","STOREFRONT","LAUNDRY_CARE_SYMBOL","CATS","OBJECT_2D","SCULPTURE","SKYLINE","MAMMALS"]}},X={Settings:g,Configs:T},f={Switch:"true",CountryCode:"US",MultiAccount:"false",Universal:"true"},Y={Settings:f},Z={Switch:!0,"Third-Party":!1,HLSUrl:"play-edge.itunes.apple.com",ServerUrl:"play.itunes.apple.com",Tabs:["WatchNow","Originals","MLS","Sports","Kids","Store","Movies","TV","ChannelsAndApps","Library","Search"],CountryCode:{Configs:"AUTO",Settings:"AUTO",View:["SG","TW"],WatchNow:"AUTO",Channels:"AUTO",Originals:"AUTO",Sports:"US",Kids:"US",Store:"AUTO",Movies:"AUTO",TV:"AUTO",Persons:"SG",Search:"AUTO",Others:"AUTO"}},S={Locale:[["AU","en-AU"],["CA","en-CA"],["GB","en-GB"],["KR","ko-KR"],["HK","yue-Hant"],["JP","ja-JP"],["MO","zh-Hant"],["TW","zh-Hant"],["US","en-US"],["SG","zh-Hans"]],Tabs:[{title:"主页",type:"WatchNow",universalLinks:["https://tv.apple.com/watch-now","https://tv.apple.com/home"],destinationType:"Target",target:{id:"tahoma_watchnow",type:"Root",url:"https://tv.apple.com/watch-now"},isSelected:!0},{title:"Apple TV+",type:"Originals",universalLinks:["https://tv.apple.com/channel/tvs.sbd.4000","https://tv.apple.com/atv"],destinationType:"Target",target:{id:"tvs.sbd.4000",type:"Brand",url:"https://tv.apple.com/us/channel/tvs.sbd.4000"}},{title:"MLS Season Pass",type:"MLS",universalLinks:["https://tv.apple.com/mls"],destinationType:"Target",target:{id:"tvs.sbd.7000",type:"Brand",url:"https://tv.apple.com/us/channel/tvs.sbd.7000"}},{title:"体育节目",type:"Sports",universalLinks:["https://tv.apple.com/sports"],destinationType:"Target",target:{id:"tahoma_sports",type:"Root",url:"https://tv.apple.com/sports"}},{title:"儿童",type:"Kids",universalLinks:["https://tv.apple.com/kids"],destinationType:"Target",target:{id:"tahoma_kids",type:"Root",url:"https://tv.apple.com/kids"}},{title:"电影",type:"Movies",universalLinks:["https://tv.apple.com/movies"],destinationType:"Target",target:{id:"tahoma_movies",type:"Root",url:"https://tv.apple.com/movies"}},{title:"电视节目",type:"TV",universalLinks:["https://tv.apple.com/tv-shows"],destinationType:"Target",target:{id:"tahoma_tvshows",type:"Root",url:"https://tv.apple.com/tv-shows"}},{title:"商店",type:"Store",universalLinks:["https://tv.apple.com/store"],destinationType:"SubTabs",subTabs:[{title:"电影",type:"Movies",universalLinks:["https://tv.apple.com/movies"],destinationType:"Target",target:{id:"tahoma_movies",type:"Root",url:"https://tv.apple.com/movies"}},{title:"电视节目",type:"TV",universalLinks:["https://tv.apple.com/tv-shows"],destinationType:"Target",target:{id:"tahoma_tvshows",type:"Root",url:"https://tv.apple.com/tv-shows"}}]},{title:"频道和 App",destinationType:"SubTabs",subTabsPlacementType:"ExpandedList",type:"ChannelsAndApps",subTabs:[]},{title:"资料库",type:"Library",destinationType:"Client"},{title:"搜索",type:"Search",universalLinks:["https://tv.apple.com/search"],destinationType:"Target",target:{id:"tahoma_search",type:"Root",url:"https://tv.apple.com/search"}}],i18n:{WatchNow:[["en","Home"],["zh","主页"],["zh-Hans","主頁"],["zh-Hant","主頁"]],Movies:[["en","Movies"],["zh","电影"],["zh-Hans","电影"],["zh-Hant","電影"]],TV:[["en","TV"],["zh","电视节目"],["zh-Hans","电视节目"],["zh-Hant","電視節目"]],Store:[["en","Store"],["zh","商店"],["zh-Hans","商店"],["zh-Hant","商店"]],Sports:[["en","Sports"],["zh","体育节目"],["zh-Hans","体育节目"],["zh-Hant","體育節目"]],Kids:[["en","Kids"],["zh","儿童"],["zh-Hans","儿童"],["zh-Hant","兒童"]],Library:[["en","Library"],["zh","资料库"],["zh-Hans","资料库"],["zh-Hant","資料庫"]],Search:[["en","Search"],["zh","搜索"],["zh-Hans","搜索"],["zh-Hant","蒐索"]]}},y={Settings:Z,Configs:S},R=Database={Default:Object.freeze({__proto__:null,Configs:s,Settings:n,default:m}),Location:Object.freeze({__proto__:null,Settings:r,default:o}),Maps:Object.freeze({__proto__:null,Configs:p,Settings:l,default:c}),News:Object.freeze({__proto__:null,Settings:u,default:h}),PrivateRelay:Object.freeze({__proto__:null,Settings:x,default:d}),Siri:Object.freeze({__proto__:null,Configs:T,Settings:g,default:X}),TestFlight:Object.freeze({__proto__:null,Settings:f,default:Y}),TV:Object.freeze({__proto__:null,Configs:S,Settings:Z,default:y})};function b(a,t,n){console.log("☑️ Set Environment Variables","");let{Settings:s,Caches:m,Configs:r}=function(a,t,n){let s=i.getItem(a,n),m={};if("undefined"!=typeof $argument&&Boolean($argument)){let i=Object.fromEntries($argument.split("&").map((e=>e.split("=").map((e=>e.replace(/\"/g,""))))));for(let a in i)e.set(m,a,i[a])}const r={Settings:n?.Default?.Settings||{},Configs:n?.Default?.Configs||{},Caches:{}};Array.isArray(t)||(t=[t]);for(let e of t)r.Settings={...r.Settings,...n?.[e]?.Settings,...m,...s?.[e]?.Settings},r.Configs={...r.Configs,...n?.[e]?.Configs},s?.[e]?.Caches&&"string"==typeof s?.[e]?.Caches&&(s[e].Caches=JSON.parse(s?.[e]?.Caches)),r.Caches={...r.Caches,...s?.[e]?.Caches};return function e(i,a){for(var t in i){var n=i[t];i[t]="object"==typeof n&&null!==n?e(n,a):a(t,n)}return i}(r.Settings,((e,i)=>("true"===i||"false"===i?i=JSON.parse(i):"string"==typeof i&&(i=i.includes(",")?i.split(",").map((e=>o(e))):o(i)),i))),r;function o(e){return e&&!isNaN(e)&&(e=parseInt(e,10)),e}}(a,t,n);if(s?.Tabs&&!Array.isArray(s?.Tabs)&&e.set(s,"Tabs",s?.Tabs?[s.Tabs.toString()]:[]),s?.Domains&&!Array.isArray(s?.Domains)&&e.set(s,"Domains",s?.Domains?[s.Domains.toString()]:[]),s?.Functions&&!Array.isArray(s?.Functions)&&e.set(s,"Functions",s?.Functions?[s.Functions.toString()]:[]),console.log(`✅ Set Environment Variables, Settings: ${typeof s}, Settings内容: ${JSON.stringify(s)}`,""),r.Storefront=new Map(r.Storefront),r.Locale&&(r.Locale=new Map(r.Locale)),r.i18n)for(let e in r.i18n)r.i18n[e]=new Map(r.i18n[e]);return{Settings:s,Caches:m,Configs:r}}function v(e){let i=typeof e;if("object"==i){if(Array.isArray(e))return"array";if(null===e)return"null"}return i}let k="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split(""),L=[];for(let e=0;e>4,!(128&a))return this.assertBounds(),[e,i];for(let a=3;a<=31;a+=7){let t=this.buf[this.pos++];if(i|=(127&t)<>>t,s=!(n>>>7==0&&0==i),m=255&(s?128|n:n);if(a.push(m),!s)return}const t=e>>>28&15|(7&i)<<4,n=!!(i>>3);if(a.push(255&(n?128|t:t)),n){for(let e=3;e<31;e+=7){const t=i>>>e,n=!(t>>>7==0),s=255&(n?128|t:t);if(a.push(s),!n)return}a.push(i>>>31&1)}}L["-".charCodeAt(0)]=k.indexOf("+"),L["_".charCodeAt(0)]=k.indexOf("/"),function(e){e.symbol=Symbol.for("protobuf-ts/unknown"),e.onRead=(a,t,n,s,m)=>{(i(t)?t[e.symbol]:t[e.symbol]=[]).push({no:n,wireType:s,data:m})},e.onWrite=(i,a,t)=>{for(let{no:i,wireType:n,data:s}of e.list(a))t.tag(i,n).raw(s)},e.list=(a,t)=>{if(i(a)){let i=a[e.symbol];return t?i.filter((e=>e.no==t)):i}return[]},e.last=(i,a)=>e.list(i,a).slice(-1)[0];const i=i=>i&&Array.isArray(i[e.symbol])}(C||(C={})),function(e){e[e.Varint=0]="Varint",e[e.Bit64=1]="Bit64",e[e.LengthDelimited=2]="LengthDelimited",e[e.StartGroup=3]="StartGroup",e[e.EndGroup=4]="EndGroup",e[e.Bit32=5]="Bit32"}(U||(U={}));const I=4294967296;function N(e){let i="-"==e[0];i&&(e=e.slice(1));const a=1e6;let t=0,n=0;function s(i,s){const m=Number(e.slice(i,s));n*=a,t=t*a+m,t>=I&&(n+=t/I|0,t%=I)}return s(-24,-18),s(-18,-12),s(-12,-6),s(-6),[i,t,n]}function O(e,i){if(i>>>0<=2097151)return""+(I*i+(e>>>0));let a=(e>>>24|i<<8)>>>0&16777215,t=i>>16&65535,n=(16777215&e)+6777216*a+6710656*t,s=a+8147497*t,m=2*t,r=1e7;function o(e,i){let a=e?String(e):"";return i?"0000000".slice(a.length)+a:a}return n>=r&&(s+=Math.floor(n/r),n%=r),s>=r&&(m+=Math.floor(s/r),s%=r),o(m,0)+o(s,m)+o(n,1)}function _(e,i){if(e>=0){for(;e>127;)i.push(127&e|128),e>>>=7;i.push(e)}else{for(let a=0;a<9;a++)i.push(127&e|128),e>>=7;i.push(1)}}function P(){let e=this.buf[this.pos++],i=127&e;if(!(128&e))return this.assertBounds(),i;if(e=this.buf[this.pos++],i|=(127&e)<<7,!(128&e))return this.assertBounds(),i;if(e=this.buf[this.pos++],i|=(127&e)<<14,!(128&e))return this.assertBounds(),i;if(e=this.buf[this.pos++],i|=(127&e)<<21,!(128&e))return this.assertBounds(),i;e=this.buf[this.pos++],i|=(15&e)<<28;for(let i=5;128&e&&i<10;i++)e=this.buf[this.pos++];if(128&e)throw new Error("invalid varint");return this.assertBounds(),i>>>0}let M;function V(e){if(!e)throw new Error("BigInt unavailable, see https://github.com/timostamm/protobuf-ts/blob/v1.0.8/MANUAL.md#bigint-support")}!function(){const e=new DataView(new ArrayBuffer(8)),i=void 0!==globalThis.BigInt&&"function"==typeof e.getBigInt64&&"function"==typeof e.getBigUint64&&"function"==typeof e.setBigInt64&&"function"==typeof e.setBigUint64;M=i?{MIN:BigInt("-9223372036854775808"),MAX:BigInt("9223372036854775807"),UMIN:BigInt("0"),UMAX:BigInt("18446744073709551615"),C:BigInt,V:e}:void 0}();const w=/^-?[0-9]+$/,D=4294967296,z=2147483648;class W{constructor(e,i){this.lo=0|e,this.hi=0|i}isZero(){return 0==this.lo&&0==this.hi}toNumber(){let e=this.hi*D+(this.lo>>>0);if(!Number.isSafeInteger(e))throw new Error("cannot convert to safe number");return e}}class K extends W{static from(e){if(M)switch(typeof e){case"string":if("0"==e)return this.ZERO;if(""==e)throw new Error("string is no integer");e=M.C(e);case"number":if(0===e)return this.ZERO;e=M.C(e);case"bigint":if(!e)return this.ZERO;if(eM.UMAX)throw new Error("ulong too large");return M.V.setBigUint64(0,e,!0),new K(M.V.getInt32(0,!0),M.V.getInt32(4,!0))}else switch(typeof e){case"string":if("0"==e)return this.ZERO;if(e=e.trim(),!w.test(e))throw new Error("string is no integer");let[i,a,t]=N(e);if(i)throw new Error("signed value for ulong");return new K(a,t);case"number":if(0==e)return this.ZERO;if(!Number.isSafeInteger(e))throw new Error("number is no integer");if(e<0)throw new Error("signed value for ulong");return new K(e,e/D)}throw new Error("unknown value "+typeof e)}toString(){return M?this.toBigInt().toString():O(this.lo,this.hi)}toBigInt(){return V(M),M.V.setInt32(0,this.lo,!0),M.V.setInt32(4,this.hi,!0),M.V.getBigUint64(0,!0)}}K.ZERO=new K(0,0);class B extends W{static from(e){if(M)switch(typeof e){case"string":if("0"==e)return this.ZERO;if(""==e)throw new Error("string is no integer");e=M.C(e);case"number":if(0===e)return this.ZERO;e=M.C(e);case"bigint":if(!e)return this.ZERO;if(eM.MAX)throw new Error("signed long too large");return M.V.setBigInt64(0,e,!0),new B(M.V.getInt32(0,!0),M.V.getInt32(4,!0))}else switch(typeof e){case"string":if("0"==e)return this.ZERO;if(e=e.trim(),!w.test(e))throw new Error("string is no integer");let[i,a,t]=N(e);if(i){if(t>z||t==z&&0!=a)throw new Error("signed long too small")}else if(t>=z)throw new Error("signed long too large");let n=new B(a,t);return i?n.negate():n;case"number":if(0==e)return this.ZERO;if(!Number.isSafeInteger(e))throw new Error("number is no integer");return e>0?new B(e,e/D):new B(-e,-e/D).negate()}throw new Error("unknown value "+typeof e)}isNegative(){return!!(this.hi&z)}negate(){let e=~this.hi,i=this.lo;return i?i=1+~i:e+=1,new B(i,e)}toString(){if(M)return this.toBigInt().toString();if(this.isNegative()){let e=this.negate();return"-"+O(e.lo,e.hi)}return O(this.lo,this.hi)}toBigInt(){return V(M),M.V.setInt32(0,this.lo,!0),M.V.setInt32(4,this.hi,!0),M.V.getBigInt64(0,!0)}}B.ZERO=new B(0,0);const H={readUnknownField:!0,readerFactory:e=>new G(e)};class G{constructor(e,i){this.varint64=E,this.uint32=P,this.buf=e,this.len=e.length,this.pos=0,this.view=new DataView(e.buffer,e.byteOffset,e.byteLength),this.textDecoder=null!=i?i:new TextDecoder("utf-8",{fatal:!0,ignoreBOM:!0})}tag(){let e=this.uint32(),i=e>>>3,a=7&e;if(i<=0||a<0||a>5)throw new Error("illegal tag: field no "+i+" wire type "+a);return[i,a]}skip(e){let i=this.pos;switch(e){case U.Varint:for(;128&this.buf[this.pos++];);break;case U.Bit64:this.pos+=4;case U.Bit32:this.pos+=4;break;case U.LengthDelimited:let i=this.uint32();this.pos+=i;break;case U.StartGroup:let a;for(;(a=this.tag()[1])!==U.EndGroup;)this.skip(a);break;default:throw new Error("cant skip wire type "+e)}return this.assertBounds(),this.buf.subarray(i,this.pos)}assertBounds(){if(this.pos>this.len)throw new RangeError("premature EOF")}int32(){return 0|this.uint32()}sint32(){let e=this.uint32();return e>>>1^-(1&e)}int64(){return new B(...this.varint64())}uint64(){return new K(...this.varint64())}sint64(){let[e,i]=this.varint64(),a=-(1&e);return e=(e>>>1|(1&i)<<31)^a,i=i>>>1^a,new B(e,i)}bool(){let[e,i]=this.varint64();return 0!==e||0!==i}fixed32(){return this.view.getUint32((this.pos+=4)-4,!0)}sfixed32(){return this.view.getInt32((this.pos+=4)-4,!0)}fixed64(){return new K(this.sfixed32(),this.sfixed32())}sfixed64(){return new B(this.sfixed32(),this.sfixed32())}float(){return this.view.getFloat32((this.pos+=4)-4,!0)}double(){return this.view.getFloat64((this.pos+=8)-8,!0)}bytes(){let e=this.uint32(),i=this.pos;return this.pos+=e,this.assertBounds(),this.buf.subarray(i,i+e)}string(){return this.textDecoder.decode(this.bytes())}}function F(e,i){if(!e)throw new Error(i)}function $(e){if("number"!=typeof e)throw new Error("invalid int 32: "+typeof e);if(!Number.isInteger(e)||e>2147483647||e<-2147483648)throw new Error("invalid int 32: "+e)}function j(e){if("number"!=typeof e)throw new Error("invalid uint 32: "+typeof e);if(!Number.isInteger(e)||e>4294967295||e<0)throw new Error("invalid uint 32: "+e)}function q(e){if("number"!=typeof e)throw new Error("invalid float 32: "+typeof e);if(Number.isFinite(e)&&(e>34028234663852886e22||e<-34028234663852886e22))throw new Error("invalid float 32: "+e)}const J={writeUnknownFields:!0,writerFactory:()=>new Q};class Q{constructor(e){this.stack=[],this.textEncoder=null!=e?e:new TextEncoder,this.chunks=[],this.buf=[]}finish(){this.chunks.push(new Uint8Array(this.buf));let e=0;for(let i=0;i>>0)}raw(e){return this.buf.length&&(this.chunks.push(new Uint8Array(this.buf)),this.buf=[]),this.chunks.push(e),this}uint32(e){for(j(e);e>127;)this.buf.push(127&e|128),e>>>=7;return this.buf.push(e),this}int32(e){return $(e),_(e,this.buf),this}bool(e){return this.buf.push(e?1:0),this}bytes(e){return this.uint32(e.byteLength),this.raw(e)}string(e){let i=this.textEncoder.encode(e);return this.uint32(i.byteLength),this.raw(i)}float(e){q(e);let i=new Uint8Array(4);return new DataView(i.buffer).setFloat32(0,e,!0),this.raw(i)}double(e){let i=new Uint8Array(8);return new DataView(i.buffer).setFloat64(0,e,!0),this.raw(i)}fixed32(e){j(e);let i=new Uint8Array(4);return new DataView(i.buffer).setUint32(0,e,!0),this.raw(i)}sfixed32(e){$(e);let i=new Uint8Array(4);return new DataView(i.buffer).setInt32(0,e,!0),this.raw(i)}sint32(e){return $(e),_(e=(e<<1^e>>31)>>>0,this.buf),this}sfixed64(e){let i=new Uint8Array(8),a=new DataView(i.buffer),t=B.from(e);return a.setInt32(0,t.lo,!0),a.setInt32(4,t.hi,!0),this.raw(i)}fixed64(e){let i=new Uint8Array(8),a=new DataView(i.buffer),t=K.from(e);return a.setInt32(0,t.lo,!0),a.setInt32(4,t.hi,!0),this.raw(i)}int64(e){let i=B.from(e);return A(i.lo,i.hi,this.buf),this}sint64(e){let i=B.from(e),a=i.hi>>31;return A(i.lo<<1^a,(i.hi<<1|i.lo>>>31)^a,this.buf),this}uint64(e){let i=K.from(e);return A(i.lo,i.hi,this.buf),this}}const ee={emitDefaultValues:!1,enumAsInteger:!1,useProtoFieldName:!1,prettySpaces:0},ie={ignoreUnknownFields:!1};const ae=Symbol.for("protobuf-ts/message-type");function te(e){let i=!1;const a=[];for(let t=0;t!t.includes(e))))return!1;if(!a&&t.some((e=>!n.known.includes(e))))return!1;if(i<1)return!0;for(const t of n.oneofs){const n=e[t];if(!oe(n))return!1;if(void 0===n.oneofKind)continue;const s=this.fields.find((e=>e.localName===n.oneofKind));if(!s)return!1;if(!this.field(n[n.oneofKind],s,a,i))return!1}for(const t of this.fields)if(void 0===t.oneof&&!this.field(e[t.localName],t,a,i))return!1;return!0}field(e,i,a,t){let n=i.repeat;switch(i.kind){case"scalar":return void 0===e?i.opt:n?this.scalars(e,i.T,t,i.L):this.scalar(e,i.T,i.L);case"enum":return void 0===e?i.opt:n?this.scalars(e,ne.INT32,t):this.scalar(e,ne.INT32);case"message":return void 0===e||(n?this.messages(e,i.T(),a,t):this.message(e,i.T(),a,t));case"map":if("object"!=typeof e||null===e)return!1;if(t<2)return!0;if(!this.mapKeys(e,i.K,t))return!1;switch(i.V.kind){case"scalar":return this.scalars(Object.values(e),i.V.T,t,i.V.L);case"enum":return this.scalars(Object.values(e),ne.INT32,t);case"message":return this.messages(Object.values(e),i.V.T(),a,t)}}return!0}message(e,i,a,t){return a?i.isAssignable(e,t):i.is(e,t)}messages(e,i,a,t){if(!Array.isArray(e))return!1;if(t<2)return!0;if(a){for(let a=0;aparseInt(e))),i,a);case ne.BOOL:return this.scalars(t.slice(0,a).map((e=>"true"==e||"false"!=e&&e)),i,a);default:return this.scalars(t,i,a,se.STRING)}}}function pe(e,i){switch(i){case se.BIGINT:return e.toBigInt();case se.NUMBER:return e.toNumber();default:return e.toString()}}class ce{constructor(e){this.info=e}prepare(){var e;if(void 0===this.fMap){this.fMap={};const i=null!==(e=this.info.fields)&&void 0!==e?e:[];for(const e of i)this.fMap[e.name]=e,this.fMap[e.jsonName]=e,this.fMap[e.localName]=e}}assert(e,i,a){if(!e){let e=v(a);throw"number"!=e&&"boolean"!=e||(e=a.toString()),new Error(`Cannot parse JSON ${e} for ${this.info.typeName}#${i}`)}}read(e,i,a){this.prepare();const t=[];for(const[s,m]of Object.entries(e)){const e=this.fMap[s];if(!e){if(!a.ignoreUnknownFields)throw new Error(`Found unknown field while reading ${this.info.typeName} from JSON format. JSON key: ${s}`);continue}const r=e.localName;let o;if(e.oneof){if(null===m&&("enum"!==e.kind||"google.protobuf.NullValue"!==e.T()[0]))continue;if(t.includes(e.oneof))throw new Error(`Multiple members of the oneof group "${e.oneof}" of ${this.info.typeName} are present in JSON.`);t.push(e.oneof),o=i[e.oneof]={oneofKind:r}}else o=i;if("map"==e.kind){if(null===m)continue;this.assert(null!==(n=m)&&"object"==typeof n&&!Array.isArray(n),e.name,m);const i=o[r];for(const[t,n]of Object.entries(m)){let s;switch(this.assert(null!==n,e.name+" map value",null),e.V.kind){case"message":s=e.V.T().internalJsonRead(n,a);break;case"enum":if(s=this.enum(e.V.T(),n,e.name,a.ignoreUnknownFields),!1===s)continue;break;case"scalar":s=this.scalar(n,e.V.T,e.V.L,e.name)}this.assert(void 0!==s,e.name+" map value",n);let m=t;e.K==ne.BOOL&&(m="true"==m||"false"!=m&&m),m=this.scalar(m,e.K,se.STRING,e.name).toString(),i[m]=s}}else if(e.repeat){if(null===m)continue;this.assert(Array.isArray(m),e.name,m);const i=o[r];for(const t of m){let n;switch(this.assert(null!==t,e.name,null),e.kind){case"message":n=e.T().internalJsonRead(t,a);break;case"enum":if(n=this.enum(e.T(),t,e.name,a.ignoreUnknownFields),!1===n)continue;break;case"scalar":n=this.scalar(t,e.T,e.L,e.name)}this.assert(void 0!==n,e.name,m),i.push(n)}}else switch(e.kind){case"message":if(null===m&&"google.protobuf.Value"!=e.T().typeName){this.assert(void 0===e.oneof,e.name+" (oneof member)",null);continue}o[r]=e.T().internalJsonRead(m,a,o[r]);break;case"enum":let i=this.enum(e.T(),m,e.name,a.ignoreUnknownFields);if(!1===i)continue;o[r]=i;break;case"scalar":o[r]=this.scalar(m,e.T,e.L,e.name)}}var n}enum(e,i,a,t){if("google.protobuf.NullValue"==e[0]&&F(null===i||"NULL_VALUE"===i,`Unable to parse field ${this.info.typeName}#${a}, enum ${e[0]} only accepts null.`),null===i)return 0;switch(typeof i){case"number":return F(Number.isInteger(i),`Unable to parse field ${this.info.typeName}#${a}, enum can only be integral number, got ${i}.`),i;case"string":let n=i;e[2]&&i.substring(0,e[2].length)===e[2]&&(n=i.substring(e[2].length));let s=e[1][n];return(void 0!==s||!t)&&(F("number"==typeof s,`Unable to parse field ${this.info.typeName}#${a}, enum ${e[0]} has no value for "${i}".`),s)}F(!1,`Unable to parse field ${this.info.typeName}#${a}, cannot parse enum value from ${typeof i}".`)}scalar(e,i,a,t){let n;try{switch(i){case ne.DOUBLE:case ne.FLOAT:if(null===e)return 0;if("NaN"===e)return Number.NaN;if("Infinity"===e)return Number.POSITIVE_INFINITY;if("-Infinity"===e)return Number.NEGATIVE_INFINITY;if(""===e){n="empty string";break}if("string"==typeof e&&e.trim().length!==e.length){n="extra whitespace";break}if("string"!=typeof e&&"number"!=typeof e)break;let t=Number(e);if(Number.isNaN(t)){n="not a number";break}if(!Number.isFinite(t)){n="too large or small";break}return i==ne.FLOAT&&q(t),t;case ne.INT32:case ne.FIXED32:case ne.SFIXED32:case ne.SINT32:case ne.UINT32:if(null===e)return 0;let s;if("number"==typeof e?s=e:""===e?n="empty string":"string"==typeof e&&(e.trim().length!==e.length?n="extra whitespace":s=Number(e)),void 0===s)break;return i==ne.UINT32?j(s):$(s),s;case ne.INT64:case ne.SFIXED64:case ne.SINT64:if(null===e)return pe(B.ZERO,a);if("number"!=typeof e&&"string"!=typeof e)break;return pe(B.from(e),a);case ne.FIXED64:case ne.UINT64:if(null===e)return pe(K.ZERO,a);if("number"!=typeof e&&"string"!=typeof e)break;return pe(K.from(e),a);case ne.BOOL:if(null===e)return!1;if("boolean"!=typeof e)break;return e;case ne.STRING:if(null===e)return"";if("string"!=typeof e){n="extra whitespace";break}try{encodeURIComponent(e)}catch(n){n="invalid UTF8";break}return e;case ne.BYTES:if(null===e||""===e)return new Uint8Array(0);if("string"!=typeof e)break;return function(e){let i=3*e.length/4;"="==e[e.length-2]?i-=2:"="==e[e.length-1]&&(i-=1);let a,t=new Uint8Array(i),n=0,s=0,m=0;for(let i=0;i>4,m=a,s=2;break;case 2:t[n++]=(15&m)<<4|(60&a)>>2,m=a,s=3;break;case 3:t[n++]=(3&m)<<6|a,s=0}}if(1==s)throw Error("invalid base64 string.");return t.subarray(0,n)}(e)}}catch(e){n=e.message}this.assert(!1,t+(n?" - "+n:""),e)}}class ue{constructor(e){var i;this.fields=null!==(i=e.fields)&&void 0!==i?i:[]}write(e,i){const a={},t=e;for(const e of this.fields){if(!e.oneof){let n=this.field(e,t[e.localName],i);void 0!==n&&(a[i.useProtoFieldName?e.name:e.jsonName]=n);continue}const n=t[e.oneof];if(n.oneofKind!==e.localName)continue;const s="scalar"==e.kind||"enum"==e.kind?Object.assign(Object.assign({},i),{emitDefaultValues:!0}):i;let m=this.field(e,n[e.localName],s);F(void 0!==m),a[i.useProtoFieldName?e.name:e.jsonName]=m}return a}field(e,i,a){let t;if("map"==e.kind){F("object"==typeof i&&null!==i);const n={};switch(e.V.kind){case"scalar":for(const[a,t]of Object.entries(i)){const i=this.scalar(e.V.T,t,e.name,!1,!0);F(void 0!==i),n[a.toString()]=i}break;case"message":const t=e.V.T();for(const[s,m]of Object.entries(i)){const i=this.message(t,m,e.name,a);F(void 0!==i),n[s.toString()]=i}break;case"enum":const s=e.V.T();for(const[t,m]of Object.entries(i)){F(void 0===m||"number"==typeof m);const i=this.enum(s,m,e.name,!1,!0,a.enumAsInteger);F(void 0!==i),n[t.toString()]=i}}(a.emitDefaultValues||Object.keys(n).length>0)&&(t=n)}else if(e.repeat){F(Array.isArray(i));const n=[];switch(e.kind){case"scalar":for(let a=0;a0||a.emitDefaultValues)&&(t=n)}else switch(e.kind){case"scalar":t=this.scalar(e.T,i,e.name,e.opt,a.emitDefaultValues);break;case"enum":t=this.enum(e.T(),i,e.name,e.opt,a.emitDefaultValues,a.enumAsInteger);break;case"message":t=this.message(e.T(),i,e.name,a)}return t}enum(e,i,a,t,n,s){if("google.protobuf.NullValue"==e[0])return n||t?null:void 0;if(void 0!==i){if(0!==i||n||t)return F("number"==typeof i),F(Number.isInteger(i)),s||!e[1].hasOwnProperty(i)?i:e[2]?e[2]+e[1][i]:e[1][i]}else F(t)}message(e,i,a,t){return void 0===i?t.emitDefaultValues?null:void 0:e.internalJsonWrite(i,t)}scalar(e,i,a,t,n){if(void 0===i)return void F(t);const s=n||t;switch(e){case ne.INT32:case ne.SFIXED32:case ne.SINT32:return 0===i?s?0:void 0:($(i),i);case ne.FIXED32:case ne.UINT32:return 0===i?s?0:void 0:(j(i),i);case ne.FLOAT:q(i);case ne.DOUBLE:return 0===i?s?0:void 0:(F("number"==typeof i),Number.isNaN(i)?"NaN":i===Number.POSITIVE_INFINITY?"Infinity":i===Number.NEGATIVE_INFINITY?"-Infinity":i);case ne.STRING:return""===i?s?"":void 0:(F("string"==typeof i),i);case ne.BOOL:return!1===i?!s&&void 0:(F("boolean"==typeof i),i);case ne.UINT64:case ne.FIXED64:F("number"==typeof i||"string"==typeof i||"bigint"==typeof i);let e=K.from(i);if(e.isZero()&&!s)return;return e.toString();case ne.INT64:case ne.SFIXED64:case ne.SINT64:F("number"==typeof i||"string"==typeof i||"bigint"==typeof i);let a=B.from(i);if(a.isZero()&&!s)return;return a.toString();case ne.BYTES:return F(i instanceof Uint8Array),i.byteLength?function(e){let i,a="",t=0,n=0;for(let s=0;s>2],n=(3&i)<<4,t=1;break;case 1:a+=k[n|i>>4],n=(15&i)<<2,t=2;break;case 2:a+=k[n|i>>6],a+=k[63&i],t=0}return t&&(a+=k[n],a+="=",1==t&&(a+="=")),a}(i):s?"":void 0}}}function he(e,i=se.STRING){switch(e){case ne.BOOL:return!1;case ne.UINT64:case ne.FIXED64:return pe(K.ZERO,i);case ne.INT64:case ne.SFIXED64:case ne.SINT64:return pe(B.ZERO,i);case ne.DOUBLE:case ne.FLOAT:return 0;case ne.BYTES:return new Uint8Array(0);case ne.STRING:return"";default:return 0}}class xe{constructor(e){this.info=e}prepare(){var e;if(!this.fieldNoToField){const i=null!==(e=this.info.fields)&&void 0!==e?e:[];this.fieldNoToField=new Map(i.map((e=>[e.no,e])))}}read(e,i,a,t){this.prepare();const n=void 0===t?e.len:e.pos+t;for(;e.pose.no-i.no))}}write(e,i,a){this.prepare();for(const t of this.fields){let n,s,m=t.repeat,r=t.localName;if(t.oneof){const i=e[t.oneof];if(i.oneofKind!==r)continue;n=i[r],s=!0}else n=e[r],s=!1;switch(t.kind){case"scalar":case"enum":let e="enum"==t.kind?ne.INT32:t.T;if(m)if(F(Array.isArray(n)),m==me.PACKED)this.packed(i,e,t.no,n);else for(const a of n)this.scalar(i,e,t.no,a,!0);else void 0===n?F(t.opt):this.scalar(i,e,t.no,n,s||t.opt);break;case"message":if(m){F(Array.isArray(n));for(const e of n)this.message(i,a,t.T(),t.no,e)}else this.message(i,a,t.T(),t.no,n);break;case"map":F("object"==typeof n&&null!==n);for(const[e,s]of Object.entries(n))this.mapEntry(i,a,t,e,s)}}let t=a.writeUnknownFields;!1!==t&&(!0===t?C.onWrite:t)(this.info.typeName,e,i)}mapEntry(e,i,a,t,n){e.tag(a.no,U.LengthDelimited),e.fork();let s=t;switch(a.K){case ne.INT32:case ne.FIXED32:case ne.UINT32:case ne.SFIXED32:case ne.SINT32:s=Number.parseInt(t);break;case ne.BOOL:F("true"==t||"false"==t),s="true"==t}switch(this.scalar(e,a.K,1,s,!0),a.V.kind){case"scalar":this.scalar(e,a.V.T,2,n,!0);break;case"enum":this.scalar(e,ne.INT32,2,n,!0);break;case"message":this.message(e,i,a.V.T(),2,n)}e.join()}message(e,i,a,t,n){void 0!==n&&(a.internalBinaryWrite(n,e.tag(t,U.LengthDelimited).fork(),i),e.join())}scalar(e,i,a,t,n){let[s,m,r]=this.scalarInfo(i,t);r&&!n||(e.tag(a,s),e[m](t))}packed(e,i,a,t){if(!t.length)return;F(i!==ne.BYTES&&i!==ne.STRING),e.tag(a,U.LengthDelimited),e.fork();let[,n]=this.scalarInfo(i);for(let i=0;i.+):\/\/(?[^/]+))?\/?(?[^?]+)?\??(?[^?]+)?/)?.groups??null;if(i?.path?i.paths=i.path.split("/"):i.path="",i?.paths){const e=i.paths[i.paths.length-1];if(e?.includes(".")){const a=e.split(".");i.format=a[a.length-1]}}return i?.query&&(i.query=Object.fromEntries(i.query.split("&").map((e=>e.split("="))))),i}static stringify(e=this.#o){let i="";return e?.scheme&&e?.host&&(i+=e.scheme+"://"+e.host),e?.path&&(i+=e?.host?"/"+e.path:e.path),e?.query&&(i+="?"+Object.entries(e.query).map((e=>e.join("="))).join("&")),i}}.parse($request.url);ye.log(`⚠ URL: ${JSON.stringify(Re)}`,"");const be=$request.method,ve=Re.host,ke=Re.path;Re.paths,ye.log(`⚠ METHOD: ${be}`,"");const Le=($response.headers?.["Content-Type"]??$response.headers?.["content-type"])?.split(";")?.[0];function Ce(a,t,n){ye.log(`☑️ Set Cache, path: ${t}`,""),Date.now()-e.get(a,`${t}.timeStamp`,0)>864e5?(e.set(a,`${t}.tileSet`,n.tileSet),e.set(a,`${t}.attribution`,n.attribution),e.set(a,`${t}.urlInfoSet`,n.urlInfoSet),e.set(a,`${t}.muninBucket`,n.muninBucket),e.set(a,`${t}.timeStamp`,Date.now()),i.setItem("@iRingo.Maps.Caches",a),ye.log("✅ Set Cache","")):ye.log("❎ Set Cache","")}ye.log(`⚠ FORMAT: ${Le}`,""),(async()=>{const{Settings:a,Caches:n,Configs:s}=b("iRingo",["Location","Maps"],R);switch(ye.log(`⚠ Settings.Switch: ${a?.Switch}`,""),a.Switch){case!0:default:let f={};switch(Le){case void 0:case"application/x-www-form-urlencoded":case"text/plain":default:case"application/x-mpegURL":case"application/x-mpegurl":case"application/vnd.apple.mpegurl":case"audio/mpegurl":break;case"text/xml":case"text/html":case"text/plist":case"application/xml":case"application/plist":case"application/x-plist":switch(ve){case"gspe1-ssl.ls.apple.com":if("pep/gcc"===ke)if(e.set(n,"pep.gcc",$response.body),i.setItem("@iRingo.Location.Caches",n),"AUTO"===a.PEP.GCC);else $response.body=a.PEP.GCC;break;case"configuration.ls.apple.com":if(BigInt.prototype.toJSON=function(){return this.toString()},f=t.parse($response.body),ye.log(`🚧 body: ${JSON.stringify(f)}`,""),"config/defaults"===ke){const e=f.plist;e&&(e["com.apple.GEO"].CountryProviders.CN.ShouldEnableLagunaBeach=!0,e["com.apple.GEO"].CountryProviders.CN.DrivingMultiWaypointRoutesEnabled=!0,e["com.apple.GEO"].CountryProviders.CN.EnableClientDrapedVectorPolygons=!0,e["com.apple.GEO"].CountryProviders.CN.GEOAddressCorrectionEnabled=!0,delete e["com.apple.GEO"].CountryProviders.CN.GEOBatchSpatialEventLookupMaxParametersCount,delete e["com.apple.GEO"].CountryProviders.CN.GEOBatchSpatialPlaceLookupMaxParametersCount,e["com.apple.GEO"].CountryProviders.CN.LocalitiesAndLandmarksSupported=!0,e["com.apple.GEO"].CountryProviders.CN.NavigationShowHeadingKey=!0,e["com.apple.GEO"].CountryProviders.CN.POIBusynessDifferentialPrivacy=!0,e["com.apple.GEO"].CountryProviders.CN.POIBusynessRealTime=!0,e["com.apple.GEO"].CountryProviders.CN.TransitPayEnabled=!0,e["com.apple.GEO"].CountryProviders.CN.SupportsOffline=!0,e["com.apple.GEO"].CountryProviders.CN.SupportsCarIntegration=!0,e["com.apple.GEO"].CountryProviders.CN.GEOShouldSpeakWrittenAddresses=!0,e["com.apple.GEO"].CountryProviders.CN.GEOShouldSpeakWrittenPlaceNames=!0,e["com.apple.GEO"].CountryProviders.CN["6694982d2b14e95815e44e970235e230"]=!0,e["com.apple.GEO"].CountryProviders.CN.PedestrianAREnabled=!0,e["com.apple.GEO"].CountryProviders.CN.OpticalHeadingEnabled=!0,e["com.apple.GEO"].CountryProviders.CN.UseCLPedestrianMapMatchedLocations=!0)}ye.log(`🚧 body: ${JSON.stringify(f)}`,""),$response.body=t.stringify(f)}break;case"text/vtt":case"application/vtt":break;case"text/json":case"application/json":f=JSON.parse($response.body??"{}"),ye.log(`🚧 body: ${JSON.stringify(f)}`,""),$response.body=JSON.stringify(f);break;case"application/protobuf":case"application/x-protobuf":case"application/vnd.google.protobuf":case"application/grpc":case"application/grpc+proto":case"application/octet-stream":let Y=ye.isQuanX()?new Uint8Array($response.bodyBytes??[]):$response.body??new Uint8Array;switch(Le){case"application/protobuf":case"application/x-protobuf":case"application/vnd.google.protobuf":case"application/octet-stream":if("gspe35-ssl.ls.apple.com"===ve)switch(ke){case"config/announcements":break;case"geo_manifest/dynamic/config":var m,r,o,l,p,c,u,h,x,d,g,T,X;!function(e){e[e.TILE_UPDATE_BEHAVIOR_FLUSH=0]="TILE_UPDATE_BEHAVIOR_FLUSH",e[e.TILE_UPDATE_BEHAVIOR_ETAG=1]="TILE_UPDATE_BEHAVIOR_ETAG"}(m||(m={})),function(e){e[e.CHECKSUM_TYPE_NONE=0]="CHECKSUM_TYPE_NONE",e[e.CHECKSUM_TYPE_APPENDED_MD5=1]="CHECKSUM_TYPE_APPENDED_MD5"}(r||(r={})),function(e){e[e.REQUEST_STYLE_LEGACY=0]="REQUEST_STYLE_LEGACY",e[e.REQUEST_STYLE_HEADER_PARAMS_VERSION_BASED_HMAC_AUTH=1]="REQUEST_STYLE_HEADER_PARAMS_VERSION_BASED_HMAC_AUTH"}(o||(o={})),function(e){e[e.RESOURCE_FILTER_SCALE_UNKNOWN=0]="RESOURCE_FILTER_SCALE_UNKNOWN",e[e.RESOURCE_FILTER_SCALE_1X=1]="RESOURCE_FILTER_SCALE_1X",e[e.RESOURCE_FILTER_SCALE_2X=2]="RESOURCE_FILTER_SCALE_2X",e[e.RESOURCE_FILTER_SCALE_3X=3]="RESOURCE_FILTER_SCALE_3X"}(l||(l={})),function(e){e[e.RESOURCE_FILTER_SCENARIO_UNKNOWN=0]="RESOURCE_FILTER_SCENARIO_UNKNOWN",e[e.RESOURCE_FILTER_SCENARIO_CARPLAY=1]="RESOURCE_FILTER_SCENARIO_CARPLAY",e[e.RESOURCE_FILTER_SCENARIO_NAVIGATION=2]="RESOURCE_FILTER_SCENARIO_NAVIGATION",e[e.RESOURCE_FILTER_SCENARIO_HIGHVISIBILITY=3]="RESOURCE_FILTER_SCENARIO_HIGHVISIBILITY",e[e.RESOURCE_FILTER_SCENARIO_EXPLICIT=4]="RESOURCE_FILTER_SCENARIO_EXPLICIT"}(p||(p={})),function(e){e[e.STYLESHEET=0]="STYLESHEET",e[e.TEXTURE=1]="TEXTURE",e[e.FONT=2]="FONT",e[e.ICON=3]="ICON",e[e.XML=4]="XML",e[e.ATTRIBUTION_LOGO=5]="ATTRIBUTION_LOGO",e[e.ATTRIBUTION_BADGE=6]="ATTRIBUTION_BADGE",e[e.OTHER=7]="OTHER"}(c||(c={})),function(e){e[e.RESOURCE_DOWNLOAD_CONNECTION_TYPE_UNKNOWN=0]="RESOURCE_DOWNLOAD_CONNECTION_TYPE_UNKNOWN",e[e.RESOURCE_DOWNLOAD_CONNECTION_TYPE_CELLULAR=1]="RESOURCE_DOWNLOAD_CONNECTION_TYPE_CELLULAR",e[e.RESOURCE_DOWNLOAD_CONNECTION_TYPE_PREFER_WIFI=2]="RESOURCE_DOWNLOAD_CONNECTION_TYPE_PREFER_WIFI",e[e.RESOURCE_DOWNLOAD_CONNECTION_TYPE_WIFI_ONLY=3]="RESOURCE_DOWNLOAD_CONNECTION_TYPE_WIFI_ONLY"}(u||(u={})),function(e){e[e.SHA1=0]="SHA1",e[e.CMS=1]="CMS"}(h||(h={})),function(e){e[e.VERSIONED=0]="VERSIONED",e[e.ETAG=1]="ETAG"}(x||(x={})),function(e){e[e.RASTER_STANDARD=0]="RASTER_STANDARD",e[e.VECTOR_STANDARD=1]="VECTOR_STANDARD",e[e.VECTOR_TRAFFIC_SEGMENTS_FOR_RASTER=2]="VECTOR_TRAFFIC_SEGMENTS_FOR_RASTER",e[e.VECTOR_TRAFFIC_INCIDENTS_FOR_RASTER=3]="VECTOR_TRAFFIC_INCIDENTS_FOR_RASTER",e[e.VECTOR_TRAFFIC_SEGMENTS_AND_INCIDENTS_FOR_RASTER=4]="VECTOR_TRAFFIC_SEGMENTS_AND_INCIDENTS_FOR_RASTER",e[e.RASTER_STANDARD_BACKGROUND=5]="RASTER_STANDARD_BACKGROUND",e[e.RASTER_HYBRID=6]="RASTER_HYBRID",e[e.RASTER_SATELLITE=7]="RASTER_SATELLITE",e[e.RASTER_TERRAIN=8]="RASTER_TERRAIN",e[e.VECTOR_BUILDINGS=11]="VECTOR_BUILDINGS",e[e.VECTOR_TRAFFIC=12]="VECTOR_TRAFFIC",e[e.VECTOR_POI=13]="VECTOR_POI",e[e.SPUTNIK_METADATA=14]="SPUTNIK_METADATA",e[e.SPUTNIK_C3M=15]="SPUTNIK_C3M",e[e.SPUTNIK_DSM=16]="SPUTNIK_DSM",e[e.SPUTNIK_DSM_GLOBAL=17]="SPUTNIK_DSM_GLOBAL",e[e.VECTOR_REALISTIC=18]="VECTOR_REALISTIC",e[e.VECTOR_LEGACY_REALISTIC=19]="VECTOR_LEGACY_REALISTIC",e[e.VECTOR_ROADS=20]="VECTOR_ROADS",e[e.RASTER_VEGETATION=21]="RASTER_VEGETATION",e[e.VECTOR_TRAFFIC_SKELETON=22]="VECTOR_TRAFFIC_SKELETON",e[e.RASTER_COASTLINE_MASK=23]="RASTER_COASTLINE_MASK",e[e.RASTER_HILLSHADE=24]="RASTER_HILLSHADE",e[e.VECTOR_TRAFFIC_WITH_GREEN=25]="VECTOR_TRAFFIC_WITH_GREEN",e[e.VECTOR_TRAFFIC_STATIC=26]="VECTOR_TRAFFIC_STATIC",e[e.RASTER_COASTLINE_DROP_MASK=27]="RASTER_COASTLINE_DROP_MASK",e[e.VECTOR_TRAFFIC_SKELETON_WITH_HISTORICAL=28]="VECTOR_TRAFFIC_SKELETON_WITH_HISTORICAL",e[e.VECTOR_SPEED_PROFILES=29]="VECTOR_SPEED_PROFILES",e[e.VECTOR_VENUES=30]="VECTOR_VENUES",e[e.RASTER_DOWN_SAMPLED=31]="RASTER_DOWN_SAMPLED",e[e.RASTER_COLOR_BALANCED=32]="RASTER_COLOR_BALANCED",e[e.RASTER_SATELLITE_NIGHT=33]="RASTER_SATELLITE_NIGHT",e[e.SPUTNIK_VECTOR_BORDER=34]="SPUTNIK_VECTOR_BORDER",e[e.RASTER_SATELLITE_DIGITIZE=35]="RASTER_SATELLITE_DIGITIZE",e[e.RASTER_HILLSHADE_PARKS=36]="RASTER_HILLSHADE_PARKS",e[e.VECTOR_TRANSIT=37]="VECTOR_TRANSIT",e[e.RASTER_STANDARD_BASE=38]="RASTER_STANDARD_BASE",e[e.RASTER_STANDARD_LABELS=39]="RASTER_STANDARD_LABELS",e[e.RASTER_HYBRID_ROADS=40]="RASTER_HYBRID_ROADS",e[e.RASTER_HYBRID_LABELS=41]="RASTER_HYBRID_LABELS",e[e.FLYOVER_C3M_MESH=42]="FLYOVER_C3M_MESH",e[e.FLYOVER_C3M_JPEG_TEXTURE=43]="FLYOVER_C3M_JPEG_TEXTURE",e[e.FLYOVER_C3M_ASTC_TEXTURE=44]="FLYOVER_C3M_ASTC_TEXTURE",e[e.RASTER_SATELLITE_ASTC=45]="RASTER_SATELLITE_ASTC",e[e.RASTER_HYBRID_ROADS_AND_LABELS=46]="RASTER_HYBRID_ROADS_AND_LABELS",e[e.VECTOR_TRANSIT_SELECTION=47]="VECTOR_TRANSIT_SELECTION",e[e.VECTOR_COVERAGE=48]="VECTOR_COVERAGE",e[e.FLYOVER_VISIBILITY=49]="FLYOVER_VISIBILITY",e[e.FLYOVER_SKYBOX=50]="FLYOVER_SKYBOX",e[e.FLYOVER_NAVGRAPH=51]="FLYOVER_NAVGRAPH",e[e.FLYOVER_METADATA=52]="FLYOVER_METADATA",e[e.VECTOR_ROAD_NETWORK=53]="VECTOR_ROAD_NETWORK",e[e.VECTOR_LAND_COVER=54]="VECTOR_LAND_COVER",e[e.VECTOR_DEBUG=55]="VECTOR_DEBUG",e[e.VECTOR_STREET_POI=56]="VECTOR_STREET_POI",e[e.MUNIN_METADATA=57]="MUNIN_METADATA",e[e.VECTOR_SPR_MERCATOR=58]="VECTOR_SPR_MERCATOR",e[e.VECTOR_SPR_MODELS=59]="VECTOR_SPR_MODELS",e[e.VECTOR_SPR_MATERIALS=60]="VECTOR_SPR_MATERIALS",e[e.VECTOR_SPR_METADATA=61]="VECTOR_SPR_METADATA",e[e.VECTOR_TRACKS=62]="VECTOR_TRACKS",e[e.VECTOR_RESERVED_2=63]="VECTOR_RESERVED_2",e[e.VECTOR_STREET_LANDMARKS=64]="VECTOR_STREET_LANDMARKS",e[e.COARSE_LOCATION_POLYGONS=65]="COARSE_LOCATION_POLYGONS",e[e.VECTOR_SPR_ROADS=66]="VECTOR_SPR_ROADS",e[e.VECTOR_SPR_STANDARD=67]="VECTOR_SPR_STANDARD",e[e.VECTOR_POI_V2=68]="VECTOR_POI_V2",e[e.VECTOR_POLYGON_SELECTION=69]="VECTOR_POLYGON_SELECTION",e[e.VL_METADATA=70]="VL_METADATA",e[e.VL_DATA=71]="VL_DATA",e[e.PROACTIVE_APP_CLIP=72]="PROACTIVE_APP_CLIP",e[e.VECTOR_BUILDINGS_V2=73]="VECTOR_BUILDINGS_V2",e[e.POI_BUSYNESS=74]="POI_BUSYNESS",e[e.POI_DP_BUSYNESS=75]="POI_DP_BUSYNESS",e[e.SMART_INTERFACE_SELECTION=76]="SMART_INTERFACE_SELECTION",e[e.VECTOR_ASSETS=77]="VECTOR_ASSETS",e[e.SPR_ASSET_METADATA=78]="SPR_ASSET_METADATA",e[e.VECTOR_SPR_POLAR=79]="VECTOR_SPR_POLAR",e[e.SMART_DATA_MODE=80]="SMART_DATA_MODE",e[e.CELLULAR_PERFORMANCE_SCORE=81]="CELLULAR_PERFORMANCE_SCORE",e[e.VECTOR_SPR_MODELS_OCCLUSION=82]="VECTOR_SPR_MODELS_OCCLUSION",e[e.VECTOR_TOPOGRAPHIC=83]="VECTOR_TOPOGRAPHIC",e[e.VECTOR_POI_V2_UPDATE=84]="VECTOR_POI_V2_UPDATE",e[e.VECTOR_LIVE_DATA_UPDATES=85]="VECTOR_LIVE_DATA_UPDATES",e[e.VECTOR_TRAFFIC_V2=86]="VECTOR_TRAFFIC_V2",e[e.VECTOR_ROAD_SELECTION=87]="VECTOR_ROAD_SELECTION",e[e.VECTOR_REGION_METADATA=88]="VECTOR_REGION_METADATA",e[e.RAY_TRACING=89]="RAY_TRACING",e[e.VECTOR_CONTOURS=90]="VECTOR_CONTOURS",e[e.UNUSED_91=91]="UNUSED_91",e[e.UNUSED_92=92]="UNUSED_92",e[e.UNUSED_93=93]="UNUSED_93",e[e.UNUSED_94=94]="UNUSED_94",e[e.UNUSED_95=95]="UNUSED_95",e[e.UNUSED_96=96]="UNUSED_96",e[e.UNUSED_97=97]="UNUSED_97",e[e.UNUSED_98=98]="UNUSED_98",e[e.UNUSED_99=99]="UNUSED_99",e[e.DAVINCI_DEV1=58]="DAVINCI_DEV1",e[e.DAVINCI_DEV2=59]="DAVINCI_DEV2",e[e.DAVINCI_DEV3=60]="DAVINCI_DEV3",e[e.DAVINCI_DEV4=61]="DAVINCI_DEV4",e[e.DAVINCI_DEV6=63]="DAVINCI_DEV6",e[e.DAVINCI_DEV7=66]="DAVINCI_DEV7",e[e.DAVINCI_DEV8=67]="DAVINCI_DEV8",e[e.DAVINCI_DEV9=68]="DAVINCI_DEV9",e[e.DAVINCI_BUILDINGS=73]="DAVINCI_BUILDINGS",e[e.VECTOR_RESERVED_1=62]="VECTOR_RESERVED_1"}(d||(d={})),function(e){e[e.NODPI=0]="NODPI",e[e.LODPI=1]="LODPI",e[e.HIDPI=2]="HIDPI"}(g||(g={})),function(e){e[e.PX128=0]="PX128",e[e.PX256=1]="PX256",e[e.PX512=2]="PX512"}(T||(T={})),function(e){e[e.UNKNOWN=0]="UNKNOWN",e[e.WATER=1]="WATER",e[e.NO_TILE=2]="NO_TILE"}(X||(X={}));class e extends Se{constructor(){super("com.apple.geo.protobuf.geo.RegionalResource",[{no:1,name:"x",kind:"scalar",T:13},{no:2,name:"y",kind:"scalar",T:13},{no:3,name:"z",kind:"scalar",T:13},{no:4,name:"icon",kind:"scalar",repeat:2,T:9},{no:6,name:"attribution",kind:"message",repeat:1,T:()=>B},{no:7,name:"iconChecksum",kind:"scalar",repeat:2,T:9},{no:29,name:"tileRange",kind:"message",repeat:1,T:()=>E},{no:30,name:"validSubManifestVersion",kind:"scalar",repeat:1,T:13}])}}const i=new e;class t extends Se{constructor(){super("com.apple.geo.protobuf.geo.RegionalResourceIndex",[])}}const Z=new t;class S extends Se{constructor(){super("com.apple.geo.protobuf.geo.RegionalResourceTile",[])}}new S;class y extends Se{constructor(){super("com.apple.geo.protobuf.geo.RegionalResourceRegion",[])}}new y;class R extends Se{constructor(){super("com.apple.geo.protobuf.geo.TileGroup",[{no:1,name:"identifier",kind:"scalar",T:13},{no:2,name:"tileSet",kind:"message",repeat:1,T:()=>k},{no:3,name:"styleSheetIndex",kind:"scalar",repeat:2,T:13},{no:4,name:"textureIndex",kind:"scalar",repeat:2,T:13},{no:5,name:"fontIndex",kind:"scalar",repeat:2,T:13},{no:6,name:"iconIndex",kind:"scalar",repeat:2,T:13},{no:7,name:"regionalResourceIndex",kind:"message",repeat:1,T:()=>Z},{no:8,name:"xmlIndex",kind:"scalar",repeat:2,T:13},{no:10,name:"attributionIndex",kind:"scalar",repeat:2,T:13},{no:11,name:"hybridUnavailableRegion",kind:"message",repeat:1,T:()=>E},{no:12,name:"resourceIndex",kind:"scalar",repeat:2,T:13},{no:14,name:"muninVersion",kind:"scalar",T:13},{no:15,name:"offlineMetadataIndex",kind:"scalar",T:13}])}}const b=new R;class v extends Se{constructor(){super("com.apple.geo.protobuf.geo.TileGroup.VersionedTileSet",[{no:1,name:"tileSetIndex",kind:"scalar",T:13},{no:2,name:"identifier",kind:"scalar",T:13}])}}const k=new v;class L extends Se{constructor(){super("com.apple.geo.protobuf.geo.GenericTile",[{no:1,name:"tileType",kind:"enum",T:()=>["com.apple.geo.protobuf.geo.GenericTileType",X]},{no:2,name:"textureIndex",kind:"scalar",T:13},{no:3,name:"resourceIndex",kind:"scalar",T:13}])}}const C=new L;class U extends Se{constructor(){super("com.apple.geo.protobuf.geo.TileSetRegion",[{no:1,name:"minX",kind:"scalar",T:13},{no:2,name:"minY",kind:"scalar",T:13},{no:3,name:"maxX",kind:"scalar",T:13},{no:4,name:"maxY",kind:"scalar",T:13},{no:5,name:"minZ",kind:"scalar",T:13},{no:6,name:"maxZ",kind:"scalar",T:13}])}}const E=new U;class A extends Se{constructor(){super("com.apple.geo.protobuf.geo.TileSetVersion",[{no:1,name:"identifier",kind:"scalar",T:13},{no:2,name:"availableTiles",kind:"message",repeat:1,T:()=>E},{no:3,name:"timeToLiveSeconds",kind:"scalar",opt:!0,T:13},{no:4,name:"genericTile",kind:"message",repeat:1,T:()=>C},{no:5,name:"supportedLanguagesVersion",kind:"scalar",opt:!0,T:13}])}}const I=new A;class N extends Se{constructor(){super("com.apple.geo.protobuf.geo.TileSet",[{no:1,name:"baseURL",kind:"scalar",opt:!0,T:9},{no:2,name:"multiTileURL",kind:"scalar",opt:!0,T:9},{no:3,name:"style",kind:"enum",T:()=>["com.apple.geo.protobuf.geo.TileSetStyle",d]},{no:5,name:"validVersion",kind:"message",repeat:1,T:()=>I},{no:6,name:"scale",kind:"enum",T:()=>["com.apple.geo.protobuf.geo.TileScale",g]},{no:7,name:"size",kind:"enum",T:()=>["com.apple.geo.protobuf.geo.TileSize",T]},{no:9,name:"localizationURL",kind:"scalar",opt:!0,T:9},{no:10,name:"supportedLanguage",kind:"message",repeat:1,T:()=>P},{no:11,name:"multiTileURLUsesStatusCodes",kind:"scalar",opt:!0,T:8},{no:12,name:"updateBehavior",kind:"enum",opt:!0,T:()=>["com.apple.geo.protobuf.geo.TileSet.TileSetVersionUpdateBehavior",m]},{no:13,name:"countryRegionWhitelist",kind:"message",repeat:1,T:()=>V},{no:14,name:"checksumType",kind:"enum",T:()=>["com.apple.geo.protobuf.geo.TileSet.TileSetChecksumType",r]},{no:15,name:"dataSet",kind:"scalar",opt:!0,T:13},{no:16,name:"requestStyle",kind:"enum",T:()=>["com.apple.geo.protobuf.geo.TileSet.TileRequestStyle",o]},{no:17,name:"useAuthProxy",kind:"scalar",opt:!0,T:8},{no:18,name:"supportsMultipathTCP",kind:"scalar",opt:!0,T:8},{no:19,name:"alternativeMultipathTCPPort",kind:"scalar",opt:!0,T:13},{no:20,name:"deviceSKUWhitelist",kind:"scalar",repeat:2,T:9}])}}const O=new N;class _ extends Se{constructor(){super("com.apple.geo.protobuf.geo.TileSet.Language",[{no:1,name:"identifier",kind:"scalar",T:13},{no:2,name:"language",kind:"scalar",repeat:2,T:9}])}}const P=new _;class M extends Se{constructor(){super("com.apple.geo.protobuf.geo.TileSet.CountryRegionTuple",[{no:1,name:"countryCode",kind:"scalar",T:9},{no:2,name:"region",kind:"scalar",T:9}])}}const V=new M;class w extends Se{constructor(){super("com.apple.geo.protobuf.geo.ResourceFilter",[{no:1,name:"scale",kind:"enum",repeat:1,T:()=>["com.apple.geo.protobuf.geo.ResourceFilter.Scale",l]},{no:2,name:"scenario",kind:"enum",repeat:1,T:()=>["com.apple.geo.protobuf.geo.ResourceFilter.Scenario",p]}])}}const D=new w;class z extends Se{constructor(){super("com.apple.geo.protobuf.geo.Resource",[{no:1,name:"resourceType",kind:"enum",T:()=>["com.apple.geo.protobuf.geo.Resource.ResourceType",c,"RESOURCE_TYPE_"]},{no:2,name:"filename",kind:"scalar",T:9},{no:3,name:"checksum",kind:"scalar",T:12},{no:4,name:"region",kind:"message",repeat:1,T:()=>E},{no:5,name:"filter",kind:"message",repeat:1,T:()=>D},{no:6,name:"connectionType",kind:"enum",opt:!0,T:()=>["com.apple.geo.protobuf.geo.Resource.ConnectionType",u]},{no:7,name:"preferWiFiAllowedStaleThreshold",kind:"scalar",opt:!0,T:13},{no:8,name:"validationMethod",kind:"enum",T:()=>["com.apple.geo.protobuf.geo.Resource.ValidationMethod",h]},{no:9,name:"alternateResourceURLIndex",kind:"scalar",opt:!0,T:13},{no:10,name:"updateMethod",kind:"enum",T:()=>["com.apple.geo.protobuf.geo.Resource.UpdateMethod",x]},{no:11,name:"timeToLiveSeconds",kind:"scalar",opt:!0,T:13}])}}const W=new z;class K extends Se{constructor(){super("com.apple.geo.protobuf.geo.Attribution",[{no:1,name:"badge",kind:"scalar",opt:!0,T:9},{no:2,name:"logo",kind:"scalar",opt:!0,T:9},{no:3,name:"name",kind:"scalar",T:9},{no:4,name:"url",kind:"scalar",T:9},{no:5,name:"badgeChecksum",kind:"scalar",opt:!0,T:9},{no:6,name:"logoChecksum",kind:"scalar",opt:!0,T:9},{no:7,name:"resource",kind:"message",repeat:1,T:()=>W},{no:8,name:"region",kind:"message",repeat:1,T:()=>E},{no:9,name:"dataSet",kind:"scalar",opt:!0,T:13},{no:10,name:"linkDisplayStringIndex",kind:"scalar",opt:!0,T:13},{no:11,name:"plainTextURL",kind:"scalar",opt:!0,T:9},{no:12,name:"plainTextURLSHA256Checksum",kind:"scalar",opt:!0,T:12}])}}const B=new K;class H extends Se{constructor(){super("com.apple.geo.protobuf.geo.ServiceVersion",[{no:1,name:"versionDomain",kind:"scalar",repeat:2,T:9},{no:2,name:"minimumVersion",kind:"scalar",T:13}])}}const G=new H;class F extends Se{constructor(){super("com.apple.geo.protobuf.geo.VersionManifest",[{no:1,name:"serviceVersion",kind:"message",repeat:1,T:()=>G}])}}const $=new F;class j extends Se{constructor(){super("com.apple.geo.protobuf.geo.DataSetDescription",[{no:1,name:"identifier",kind:"scalar",T:13},{no:2,name:"dataSetDescription",kind:"scalar",T:9}])}}const q=new j;class J extends Se{constructor(){super("com.apple.geo.protobuf.geo.DataSetURLOverride",[])}}const Q=new J;class ee extends Se{constructor(){super("com.apple.geo.protobuf.geo.MuninVersion",[])}}const ie=new ee;class ae extends Se{constructor(){super("com.apple.geo.protobuf.geo.URLInfo",[{no:1,name:"url",kind:"scalar",T:9},{no:2,name:"useAuthProxy",kind:"scalar",opt:!0,T:8},{no:3,name:"supportsMultipathTCP",kind:"scalar",T:8},{no:4,name:"alternativeMultipathTCPPort",kind:"scalar",opt:!0,T:13}])}}const te=new ae;class ne extends Se{constructor(){super("com.apple.geo.protobuf.geo.URLInfoSet",[{no:1,name:"dataSet",kind:"scalar",opt:!0,T:13},{no:2,name:"resourcesURL",kind:"message",T:()=>te},{no:3,name:"searchAttributionManifestURL",kind:"message",T:()=>te},{no:4,name:"directionsURL",kind:"message",T:()=>te},{no:5,name:"etaURL",kind:"message",T:()=>te},{no:6,name:"batchReverseGeocoderURL",kind:"message",T:()=>te},{no:7,name:"simpleETAURL",kind:"message",T:()=>te},{no:8,name:"addressCorrectionInitURL",kind:"message",T:()=>te},{no:9,name:"addressCorrectionUpdateURL",kind:"message",T:()=>te},{no:10,name:"polyLocationShiftURL",kind:"message",T:()=>te},{no:11,name:"problemSubmissionURL",kind:"message",T:()=>te},{no:12,name:"problemStatusURL",kind:"message",T:()=>te},{no:13,name:"reverseGeocoderVersionsURL",kind:"message",T:()=>te},{no:14,name:"problemCategoriesURL",kind:"message",T:()=>te},{no:15,name:"announcementsURL",kind:"message",T:()=>te},{no:16,name:"dispatcherURL",kind:"message",T:()=>te},{no:17,name:"problemOptInURL",kind:"message",T:()=>te},{no:18,name:"abExperimentURL",kind:"message",T:()=>te},{no:19,name:"businessPortalBaseURL",kind:"message",T:()=>te},{no:20,name:"logMessageUsageURL",kind:"message",T:()=>te},{no:21,name:"spatialLookupURL",kind:"message",T:()=>te},{no:22,name:"realtimeTrafficProbeURL",kind:"message",T:()=>te},{no:23,name:"batchTrafficProbeURL",kind:"message",T:()=>te},{no:24,name:"proactiveRoutingURL",kind:"message",T:()=>te},{no:25,name:"logMessageUsageV3URL",kind:"message",T:()=>te},{no:26,name:"backgroundDispatcherURL",kind:"message",T:()=>te},{no:27,name:"bluePOIDispatcherURL",kind:"message",T:()=>te},{no:28,name:"backgroundRevGeoURL",kind:"message",T:()=>te},{no:29,name:"wifiConnectionQualityProbeURL",kind:"message",T:()=>te},{no:30,name:"muninBaseURL",kind:"message",T:()=>te},{no:31,name:"authProxyURL",kind:"message",T:()=>te},{no:32,name:"wifiQualityURL",kind:"message",T:()=>te},{no:33,name:"feedbackSubmissionURL",kind:"message",T:()=>te},{no:34,name:"feedbackLookupURL",kind:"message",T:()=>te},{no:35,name:"junctionImageServiceURL",kind:"message",T:()=>te},{no:36,name:"analyticsCohortSessionURL",kind:"message",T:()=>te},{no:37,name:"analyticsLongSessionURL",kind:"message",T:()=>te},{no:38,name:"analyticsShortSessionURL",kind:"message",T:()=>te},{no:39,name:"analyticsSessionlessURL",kind:"message",T:()=>te},{no:40,name:"webModuleBaseURL",kind:"message",T:()=>te},{no:41,name:"wifiQualityTileURL",kind:"message",T:()=>te},{no:42,name:"alternateResourcesURL",kind:"message",repeat:1,T:()=>te},{no:43,name:"tokenAuthenticationURL",kind:"message",T:()=>te},{no:44,name:"authenticatedClientFeatureFlagURL",kind:"message",T:()=>te},{no:45,name:"addressCorrectionTaggedLocationURL",kind:"message",T:()=>te},{no:46,name:"proactiveAppClipURL",kind:"message",T:()=>te},{no:47,name:"enrichmentSubmissionURL",kind:"message",T:()=>te},{no:48,name:"ugcLogDiscardURL",kind:"message",T:()=>te},{no:49,name:"batchReverseGeocoderPlaceRequestURL",kind:"message",T:()=>te},{no:50,name:"pressureProbeDataURL",kind:"message",T:()=>te},{no:51,name:"poiBusynessActivityCollectionURL",kind:"message",T:()=>te},{no:52,name:"rapWebBundleURL",kind:"message",T:()=>te},{no:53,name:"networkSelectionHarvestURL",kind:"message",T:()=>te},{no:54,name:"offlineDataBatchListURL",kind:"message",T:()=>te},{no:55,name:"offlineDataSizeURL",kind:"message",T:()=>te},{no:56,name:"offlineDataDownloadBaseURL",kind:"message",T:()=>te},{no:57,name:"bcxDispatcherURL",kind:"message",T:()=>te}])}}const se=new ne;class me extends Se{constructor(){super("com.apple.geo.protobuf.geo.MuninBucket",[{no:3,name:"bucketID",kind:"scalar",T:13},{no:4,name:"bucketURL",kind:"scalar",T:9},{no:5,name:"lodLevel",kind:"scalar",opt:!0,T:13}])}}const re=new me;class oe extends Se{constructor(){super("com.apple.geo.protobuf.geo.DisplayString",[{no:1,name:"localizedString",kind:"message",repeat:1,T:()=>ce}])}}const le=new oe;class pe extends Se{constructor(){super("com.apple.geo.protobuf.geo.LocalizedString",[{no:1,name:"locale",kind:"scalar",T:9},{no:3,name:"stringValue",kind:"scalar",T:9}])}}const ce=new pe;class ue extends Se{constructor(){super("com.apple.geo.protobuf.geo.MapRegion",[])}}const he=new ue;class xe extends Se{constructor(){super("com.apple.geo.protobuf.geo.OfflineMetadata",[{no:1,name:"dataVersion",kind:"scalar",T:4},{no:2,name:"regulatoryRegionId",kind:"scalar",T:13}])}}const de=new xe;class ge extends Se{constructor(){super("com.apple.geo.protobuf.geo.Resources",[{no:1,name:"tileGroup",kind:"message",repeat:1,T:()=>b},{no:2,name:"tileSet",kind:"message",repeat:1,T:()=>O},{no:3,name:"styleSheet",kind:"scalar",repeat:2,T:9},{no:4,name:"texture",kind:"scalar",repeat:2,T:9},{no:5,name:"font",kind:"scalar",repeat:2,T:9},{no:6,name:"icon",kind:"scalar",repeat:2,T:9},{no:8,name:"regionalResource",kind:"message",repeat:1,T:()=>i},{no:9,name:"xml",kind:"scalar",repeat:2,T:9},{no:11,name:"attribution",kind:"message",repeat:1,T:()=>B},{no:30,name:"authToken",kind:"scalar",T:9},{no:31,name:"resourcesURL",kind:"scalar",opt:!0,T:9},{no:32,name:"searchURL",kind:"scalar",opt:!0,T:9},{no:33,name:"searchAttributionManifestURL",kind:"scalar",opt:!0,T:9},{no:34,name:"autocompleteURL",kind:"scalar",opt:!0,T:9},{no:35,name:"reverseGeocoderURL",kind:"scalar",opt:!0,T:9},{no:36,name:"forwardGeocoderURL",kind:"scalar",opt:!0,T:9},{no:37,name:"directionsURL",kind:"scalar",opt:!0,T:9},{no:38,name:"etaURL",kind:"scalar",opt:!0,T:9},{no:39,name:"locationShiftURL",kind:"scalar",opt:!0,T:9},{no:40,name:"releaseInfo",kind:"scalar",T:9},{no:41,name:"batchReverseGeocoderURL",kind:"scalar",opt:!0,T:9},{no:42,name:"mapMatchURL",kind:"scalar",opt:!0,T:9},{no:43,name:"simpleETAURL",kind:"scalar",opt:!0,T:9},{no:44,name:"styleSheetChecksum",kind:"scalar",repeat:2,T:9},{no:45,name:"textureChecksum",kind:"scalar",repeat:2,T:9},{no:46,name:"fontChecksum",kind:"scalar",repeat:2,T:9},{no:47,name:"iconChecksum",kind:"scalar",repeat:2,T:9},{no:48,name:"xmlChecksum",kind:"scalar",repeat:2,T:9},{no:49,name:"addressCorrectionInitURL",kind:"scalar",opt:!0,T:9},{no:50,name:"addressCorrectionUpdateURL",kind:"scalar",opt:!0,T:9},{no:51,name:"polyLocationShiftURL",kind:"scalar",opt:!0,T:9},{no:52,name:"problemSubmissionURL",kind:"scalar",opt:!0,T:9},{no:53,name:"problemStatusURL",kind:"scalar",opt:!0,T:9},{no:54,name:"reverseGeocoderVersionsURL",kind:"scalar",opt:!0,T:9},{no:55,name:"problemCategoriesURL",kind:"scalar",opt:!0,T:9},{no:56,name:"usageURL",kind:"scalar",opt:!0,T:9},{no:58,name:"businessCallerIDURL",kind:"scalar",opt:!0,T:9},{no:59,name:"problemNotificationAvailabilityURL",kind:"scalar",opt:!0,T:9},{no:61,name:"announcementsURL",kind:"scalar",opt:!0,T:9},{no:62,name:"announcementsSupportedLanguage",kind:"scalar",repeat:2,T:9},{no:63,name:"businessNameResolutionURL",kind:"scalar",opt:!0,T:9},{no:64,name:"dispatcherURL",kind:"scalar",opt:!0,T:9},{no:65,name:"problemOptInURL",kind:"scalar",opt:!0,T:9},{no:66,name:"versionManifest",kind:"message",T:()=>$},{no:67,name:"abExperimentURL",kind:"scalar",opt:!0,T:9},{no:68,name:"businessPortalBaseURL",kind:"scalar",opt:!0,T:9},{no:69,name:"logMessageUsageURL",kind:"scalar",opt:!0,T:9},{no:70,name:"locationShiftEnabledRegion",kind:"message",repeat:1,T:()=>he},{no:71,name:"locationShiftVersion",kind:"scalar",opt:!0,T:13},{no:72,name:"resource",kind:"message",repeat:1,T:()=>W},{no:73,name:"spatialLookupURL",kind:"scalar",opt:!0,T:9},{no:74,name:"dataSet",kind:"message",repeat:1,T:()=>q},{no:75,name:"dataSetURLOverride",kind:"message",repeat:1,T:()=>Q},{no:77,name:"realtimeTrafficProbeURL",kind:"scalar",opt:!0,T:9},{no:78,name:"batchTrafficProbeURL",kind:"scalar",opt:!0,T:9},{no:79,name:"proactiveRoutingURL",kind:"scalar",opt:!0,T:9},{no:80,name:"logMessageUsageV3URL",kind:"scalar",opt:!0,T:9},{no:81,name:"backgroundDispatcherURL",kind:"scalar",opt:!0,T:9},{no:82,name:"bluePOIDispatcherURL",kind:"scalar",opt:!0,T:9},{no:83,name:"backgroundRevGeoURL",kind:"scalar",opt:!0,T:9},{no:85,name:"wifiConnectionQualityProbeURL",kind:"scalar",opt:!0,T:9},{no:88,name:"muninBaseURL",kind:"scalar",opt:!0,T:9},{no:89,name:"muninVersion",kind:"message",repeat:1,T:()=>ie},{no:91,name:"authProxyURL",kind:"scalar",opt:!0,T:9},{no:92,name:"urlInfoSet",kind:"message",repeat:1,T:()=>se},{no:93,name:"muninBucket",kind:"message",repeat:1,T:()=>re},{no:94,name:"displayString",kind:"message",repeat:1,T:()=>le},{no:95,name:"offlineMetadata",kind:"message",repeat:1,T:()=>de}])}}const Te=new ge;class Xe extends Se{constructor(){super("com.apple.geo.protobuf.geo.ResourceManifestDownload",[{no:1,name:"resources",kind:"message",T:()=>Te}])}}if(new Xe,f=Te.fromBinary(Y),"CN"===Re.query.country_code)Ce(n,"CN",f),n.XX||(n.XX=s.XX);else Ce(n,"XX",f),n.CN||(n.CN=s.CN),f.resource.push({resourceType:7,filename:"POITypeMapping-CN-1.json",checksum:{0:242,1:10,2:179,3:107,4:214,5:41,6:50,7:223,8:62,9:204,10:134,11:7,12:103,13:206,14:96,15:242,16:24,17:42,18:79,19:223},region:[],filter:[],validationMethod:0,updateMethod:0}),f.resource.push({resourceType:7,filename:"China.cms-lpr",checksum:{0:196,1:139,2:158,3:17,4:250,5:132,6:138,7:10,8:138,9:38,10:96,11:130,12:82,13:80,14:4,15:239,16:11,17:107,18:183,19:236},region:[{minX:1,minY:0,maxX:1,maxY:0,minZ:1,maxZ:25}],filter:[{scale:[],scenario:[4]}],connectionType:0,preferWiFiAllowedStaleThreshold:0,validationMethod:1,alternateResourceURLIndex:1,updateMethod:1,timeToLiveSeconds:0});f.tileSet=function(e=[],i={},a={}){return ye.log("☑️ Set TileSets",""),a?.XX?.tileSet?.forEach((i=>{e.some((e=>e.style===i.style))||e.push(i)})),e=e.map(((e,t)=>{switch(e.style){case 1:case 8:case 11:case 20:case 30:case 37:case 47:case 64:case 73:switch(i.TileSet.Map){case"AUTO":default:break;case"CN":e=a?.CN?.tileSet?.find((i=>i.style===e.style));break;case"XX":e=a?.XX?.tileSet?.find((i=>i.style===e.style))}break;case 7:switch(i.TileSet.Satellite){case"AUTO":break;case"HYBRID":e=a?.CN?.tileSet?.find((i=>i.style===e.style&&i.scale===e.scale&&i.size===e.size)),e.validVersion[0].availableTiles=[{minX:0,minY:0,maxX:1,maxY:1,minZ:1,maxZ:22}];break;case"CN":e=a?.CN?.tileSet?.find((i=>i.style===e.style&&i.scale===e.scale&&i.size===e.size));break;default:e=a?.XX?.tileSet?.find((i=>i.style===e.style&&i.scale===e.scale&&i.size===e.size))}break;case 14:case 15:case 16:case 17:case 33:case 34:case 35:case 45:switch(i.TileSet.Satellite){case"AUTO":break;case"HYBRID":case"XX":default:e=a?.XX?.tileSet?.find((i=>i.style===e.style&&i.scale===e.scale&&i.size===e.size));break;case"CN":e=a?.CN?.tileSet?.find((i=>i.style===e.style&&i.scale===e.scale&&i.size===e.size))}break;case 12:case 22:case 25:case 26:case 28:case 86:switch(i.TileSet.Traffic){case"AUTO":default:break;case"CN":e=a?.CN?.tileSet?.find((i=>i.style===e.style));break;case"XX":e=a?.XX?.tileSet?.find((i=>i.style===e.style))}break;case 13:case 68:case 69:case 84:switch(i.TileSet.POI){case"AUTO":default:break;case"CN":e=a?.CN?.tileSet?.find((i=>i.style===e.style));break;case"XX":e=a?.XX?.tileSet?.find((i=>i.style===e.style))}break;case 42:case 43:case 44:case 49:case 50:case 51:case 52:switch(i.TileSet.Flyover){case"AUTO":default:break;case"CN":e=a?.CN?.tileSet?.find((i=>i.style===e.style));break;case"XX":e=a?.XX?.tileSet?.find((i=>i.style===e.style))}break;case 53:case 56:case 57:case 58:case 59:case 60:case 61:case 66:case 67:switch(i.TileSet.Munin){case"AUTO":default:break;case"CN":e=a?.CN?.tileSet?.find((i=>i.style===e.style));break;case"XX":e=a?.XX?.tileSet?.find((i=>i.style===e.style))}}return e})).flat(1/0).filter(Boolean),ye.log("✅ Set TileSets",""),e}(f.tileSet,a,n),f.attribution=function(e=[],i={},a={}){switch(ye.log("☑️ Set Attributions",""),i.query.country_code){case"CN":a?.XX?.attribution?.forEach((i=>{e.some((e=>e.name===i.name))||e.unshift(i)}));break;case"KR":a?.KR?.attribution?.forEach((i=>{e.some((e=>e.name===i.name))||e.unshift(i)}));break;default:a?.CN?.attribution?.forEach((i=>{e.some((e=>e.name===i.name))||e.push(i)}))}return e.sort(((e,i)=>{switch(e.name){case"‎":return-1;case"AutoNavi":return 0;default:return 1}})),e=e.map(((e,i)=>{switch(e.name){case"‎":e.name=`${ye.name}\n${new Date}`,delete e.plainTextURLSHA256Checksum;break;case"AutoNavi":e.resource=e.resource.filter((e=>6!==e.resourceType)),e.region=[{minX:214,minY:82,maxX:216,maxY:82,minZ:8,maxZ:21},{minX:213,minY:83,maxX:217,maxY:83,minZ:8,maxZ:21},{minX:213,minY:84,maxX:218,maxY:84,minZ:8,maxZ:21},{minX:213,minY:85,maxX:218,maxY:85,minZ:8,maxZ:21},{minX:212,minY:86,maxX:218,maxY:86,minZ:8,maxZ:21},{minX:189,minY:87,maxX:190,maxY:87,minZ:8,maxZ:21},{minX:210,minY:87,maxX:220,maxY:87,minZ:8,maxZ:21},{minX:188,minY:88,maxX:191,maxY:88,minZ:8,maxZ:21},{minX:210,minY:88,maxX:223,maxY:88,minZ:8,maxZ:21},{minX:188,minY:89,maxX:192,maxY:89,minZ:8,maxZ:21},{minX:210,minY:89,maxX:223,maxY:89,minZ:8,maxZ:21},{minX:186,minY:90,maxX:192,maxY:90,minZ:8,maxZ:21},{minX:210,minY:90,maxX:223,maxY:90,minZ:8,maxZ:21},{minX:209,minY:91,maxX:222,maxY:91,minZ:8,maxZ:21},{minX:186,minY:91,maxX:192,maxY:91,minZ:8,maxZ:21},{minX:184,minY:92,maxX:195,maxY:92,minZ:8,maxZ:21},{minX:207,minY:92,maxX:221,maxY:92,minZ:8,maxZ:21},{minX:185,minY:93,maxX:196,maxY:93,minZ:8,maxZ:21},{minX:206,minY:93,maxX:221,maxY:93,minZ:8,maxZ:21},{minX:185,minY:94,maxX:200,maxY:94,minZ:8,maxZ:21},{minX:203,minY:94,maxX:221,maxY:94,minZ:8,maxZ:21},{minX:182,minY:94,maxX:219,maxY:95,minZ:8,maxZ:21},{minX:180,minY:96,maxX:217,maxY:96,minZ:8,maxZ:21},{minX:180,minY:97,maxX:216,maxY:97,minZ:8,maxZ:21},{minX:180,minY:98,maxX:214,maxY:98,minZ:8,maxZ:21},{minX:180,minY:99,maxX:215,maxY:99,minZ:8,maxZ:21},{minX:182,minY:100,maxX:214,maxY:100,minZ:8,maxZ:21},{minX:183,minY:101,maxX:213,maxY:101,minZ:8,maxZ:21},{minX:184,minY:102,maxX:214,maxY:102,minZ:8,maxZ:21},{minX:183,minY:103,maxX:214,maxY:103,minZ:8,maxZ:21},{minX:184,minY:104,maxX:215,maxY:104,minZ:8,maxZ:21},{minX:185,minY:105,maxX:215,maxY:105,minZ:8,maxZ:21},{minX:187,minY:106,maxX:215,maxY:106,minZ:8,maxZ:21},{minX:189,minY:107,maxX:193,maxY:107,minZ:8,maxZ:21},{minX:197,minY:107,maxX:214,maxY:107,minZ:8,maxZ:21},{minX:198,minY:108,maxX:214,maxY:108,minZ:8,maxZ:21},{minX:110,minY:109,maxX:214,maxY:109,minZ:8,maxZ:21},{minX:197,minY:110,maxX:214,maxY:110,minZ:8,maxZ:21},{minX:198,minY:111,maxX:214,maxY:111,minZ:8,maxZ:21},{minX:204,minY:112,maxX:209,maxY:112,minZ:8,maxZ:21},{minX:213,minY:112,maxX:214,maxY:112,minZ:8,maxZ:21},{minX:205,minY:113,maxX:207,maxY:113,minZ:8,maxZ:21},{minX:205,minY:114,maxX:206,maxY:114,minZ:8,maxZ:21},{minX:204,minY:115,maxX:212,maxY:128,minZ:8,maxZ:21}]}return e})).flat(1/0).filter(Boolean),ye.log("✅ Set Attributions",""),e}(f.attribution,Re,n),f.urlInfoSet=function(e=[],i={},a={},t={}){return ye.log("☑️ Set UrlInfoSets",""),e=e.map(((e,n)=>{switch(i.query?.country_code){case"CN":e={...t.XX.urlInfoSet[0],...t.CN.urlInfoSet[0]};break;case"KR":e={...t.KR.urlInfoSet[0],...t.CN.urlInfoSet[0]};break;default:(e={...t.CN.urlInfoSet[0],...t.XX.urlInfoSet[0]}).alternateResourcesURL=t.CN.urlInfoSet[0].alternateResourcesURL,delete e.polyLocationShiftURL}switch(a.Config?.Announcements?.Environment?.default){case"AUTO":default:break;case"CN":e.announcementsURL=t.CN.urlInfoSet[0].announcementsURL;break;case"XX":e.announcementsURL=t.XX.urlInfoSet[0].announcementsURL}switch(a.UrlInfoSet.Dispatcher){case"AUTO":default:break;case"AutoNavi":e.directionsURL=t.CN.urlInfoSet[0].dispatcherURL,e.backgroundDispatcherURL=t.CN.urlInfoSet[0].backgroundDispatcherURL,e.backgroundRevGeoURL=t.CN.urlInfoSet[0].backgroundRevGeoURL,e.batchReverseGeocoderPlaceRequestURL=t.CN.urlInfoSet[0].batchReverseGeocoderPlaceRequestURL;break;case"Apple":e.dispatcherURL=t.XX.urlInfoSet[0].dispatcherURL,e.backgroundDispatcherURL=t.XX.urlInfoSet[0].backgroundDispatcherURL,e.backgroundRevGeoURL=t.XX.urlInfoSet[0].backgroundRevGeoURL,e.batchReverseGeocoderPlaceRequestURL=t.XX.urlInfoSet[0].batchReverseGeocoderPlaceRequestURL}switch(a.UrlInfoSet.Directions){case"AUTO":default:break;case"AutoNavi":e.directionsURL=t.CN.urlInfoSet[0].directionsURL,e.etaURL=t.CN.urlInfoSet[0].etaURL,e.simpleETAURL=t.CN.urlInfoSet[0].simpleETAURL;break;case"Apple":e.directionsURL=t.XX.urlInfoSet[0].directionsURL,e.etaURL=t.XX.urlInfoSet[0].etaURL,e.simpleETAURL=t.XX.urlInfoSet[0].simpleETAURL}switch(a.UrlInfoSet.RAP){case"AUTO":default:case"Apple":e.problemSubmissionURL=t.XX.urlInfoSet[0].problemSubmissionURL,e.problemStatusURL=t.XX.urlInfoSet[0].problemStatusURL,e.problemOptInURL=t.XX.urlInfoSet[0].problemOptInURL,e.feedbackSubmissionURL=t.XX.urlInfoSet[0].feedbackSubmissionURL,e.feedbackLookupURL=t.XX.urlInfoSet[0].feedbackLookupURL;break;case"AutoNavi":e.problemSubmissionURL=t.CN.urlInfoSet[0].problemSubmissionURL,e.problemStatusURL=t.CN.urlInfoSet[0].problemStatusURL,e.feedbackSubmissionURL=t.CN.urlInfoSet[0].feedbackSubmissionURL,e.feedbackLookupURL=t.CN.urlInfoSet[0].feedbackLookupURL}switch(a.UrlInfoSet.LocationShift){case"AUTO":default:break;case"AutoNavi":e.polyLocationShiftURL=t.CN.urlInfoSet[0].polyLocationShiftURL;break;case"Apple":e.polyLocationShiftURL=t.XX.urlInfoSet[0].polyLocationShiftURL}return e})),ye.log("✅ Set UrlInfoSets",""),e}(f.urlInfoSet,Re,a,n),f.muninBucket=function(e=[],i={},a={}){switch(ye.log("☑️ Set MuninBuckets",""),i.TileSet.Munin){case"AUTO":default:break;case"CN":e=a.CN.muninBucket;break;case"XX":e=a.XX.muninBucket}return ye.log("✅ Set MuninBuckets",""),e}(f.muninBucket,a,n),ye.log(`🚧 releaseInfo: ${f.releaseInfo}`,""),f=function(e={}){return ye.log("☑️ Set TileGroups",""),e.tileGroup=e.tileGroup.map((i=>(ye.log(`🚧 tileGroup.identifier: ${i.identifier}`),i.identifier+=Math.floor(100*Math.random())+1,ye.log(`🚧 tileGroup.identifier: ${i.identifier}`),i.tileSet=e.tileSet.map(((e,i)=>({tileSetIndex:i,identifier:e.validVersion?.[0]?.identifier}))),i.attributionIndex=e.attribution.map(((e,i)=>i)),i.resourceIndex=e.resource.map(((e,i)=>i)),i))),ye.log("✅ Set TileGroups",""),e}(f),Y=Te.toBinary(f)}}$response.body=Y}case!1:}})().catch((e=>ye.logErr(e))).finally((()=>ye.done($response))); diff --git a/archive/js/Geo_Services.js b/archive/js/Geo_Services.js new file mode 100644 index 0000000..b106799 --- /dev/null +++ b/archive/js/Geo_Services.js @@ -0,0 +1,54 @@ +// 判断是否是重写 +const isRequest = typeof $request != "undefined"; +const isResponse = typeof $response != "undefined"; +// 判断是否是Surge +const isSurge = typeof $httpClient != "undefined"; +// 判断是否是QuanX +const isQuanX = typeof $task != "undefined"; +// 判断是否是Loon +const isLoon = typeof $loon != "undefined"; +// 关闭请求 +const done = (value = {}) => { + if (isQuanX) return $done(value); + if (isSurge) isRequest ? $done(value) : $done(); +}; + +/* +README:https://github.com/VirgilClyne/iRingo +*/ + +// Default GeoCountryCode: US +let GeoCountryCode = "US"; + +// Argument Function Supported +if (typeof $argument != "undefined") { + let arg = Object.fromEntries($argument.split("&").map((item) => item.split("="))); + console.log(JSON.stringify(arg)); + GeoCountryCode = arg.GeoCountryCode; +}; + +const url = $request.url; + +const path1 = "/pep/gcc"; + +if (url.indexOf(path1) != -1) { + console.log(path1); + var today = new Date(); + var UTCstring = today.toUTCString(); + var response = {}; + response.headers = { + 'Content-Type': 'text/html', + 'Date': UTCstring, + 'Connection': 'keep-alive', + 'Content-Encoding': 'identity' + }; + response.body = GeoCountryCode; + if (isQuanX) { + response.status = "HTTP/1.1 200 OK"; + done(response); + } + if (isSurge || isLoon) { + response.status = 200; + done({ response }); + } +} else done(); diff --git a/archive/js/Geo_Services_CN.js b/archive/js/Geo_Services_CN.js new file mode 100644 index 0000000..765c3a0 --- /dev/null +++ b/archive/js/Geo_Services_CN.js @@ -0,0 +1,12 @@ +/* +README:https://github.com/VirgilClyne/iRingo +*/ + +const url = $request.url; +var body = $response.body; + +const path1 = "/pep/gcc"; + +if (url.indexOf(path1) != -1) body = "CN"; + +$done({body}); diff --git a/archive/js/Geo_Services_JP.js b/archive/js/Geo_Services_JP.js new file mode 100644 index 0000000..9680899 --- /dev/null +++ b/archive/js/Geo_Services_JP.js @@ -0,0 +1,12 @@ +/* +README:https://github.com/VirgilClyne/iRingo +*/ + +const url = $request.url; +var body = $response.body; + +const path1 = "/pep/gcc"; + +if (url.indexOf(path1) != -1) body = "JP"; + +$done({body}); diff --git a/archive/js/Geo_Services_US.js b/archive/js/Geo_Services_US.js new file mode 100644 index 0000000..c908f6b --- /dev/null +++ b/archive/js/Geo_Services_US.js @@ -0,0 +1,19 @@ +/* +README:https://github.com/VirgilClyne/iRingo +*/ +let GeoCountryCode = "US"; + +if (typeof $argument != "undefined") { + let arg = Object.fromEntries($argument.split("&").map((item) => item.split("="))); + console.log(JSON.stringify(arg)); + GeoCountryCode = arg.GeoCountryCode; +}; + +const url = $request.url; +var body = $response.body; + +const path1 = "/pep/gcc"; + +if (url.indexOf(path1) != -1) body = GeoCountryCode; + +$done({body}); diff --git a/archive/js/Location.request.beta.js b/archive/js/Location.request.beta.js new file mode 100644 index 0000000..3690e61 --- /dev/null +++ b/archive/js/Location.request.beta.js @@ -0,0 +1,2915 @@ +/* README: https://github.com/VirgilClyne/iRingo */ +/* https://www.lodashjs.com */ +class Lodash { + static name = "Lodash"; + static version = "1.2.2"; + static about() { return console.log(`\n🟧 ${this.name} v${this.version}\n`) }; + + static get(object = {}, path = "", defaultValue = undefined) { + // translate array case to dot case, then split with . + // a[0].b -> a.0.b -> ['a', '0', 'b'] + if (!Array.isArray(path)) path = this.toPath(path); + + const result = path.reduce((previousValue, currentValue) => { + return Object(previousValue)[currentValue]; // null undefined get attribute will throwError, Object() can return a object + }, object); + return (result === undefined) ? defaultValue : result; + } + + static set(object = {}, path = "", value) { + if (!Array.isArray(path)) path = this.toPath(path); + path + .slice(0, -1) + .reduce( + (previousValue, currentValue, currentIndex) => + (Object(previousValue[currentValue]) === previousValue[currentValue]) + ? previousValue[currentValue] + : previousValue[currentValue] = (/^\d+$/.test(path[currentIndex + 1]) ? [] : {}), + object + )[path[path.length - 1]] = value; + return object + } + + static unset(object = {}, path = "") { + if (!Array.isArray(path)) path = this.toPath(path); + let result = path.reduce((previousValue, currentValue, currentIndex) => { + if (currentIndex === path.length - 1) { + delete previousValue[currentValue]; + return true + } + return Object(previousValue)[currentValue] + }, object); + return result + } + + static toPath(value) { + return value.replace(/\[(\d+)\]/g, '.$1').split('.').filter(Boolean); + } + + static escape(string) { + const map = { + '&': '&', + '<': '<', + '>': '>', + '"': '"', + "'": ''', + }; + return string.replace(/[&<>"']/g, m => map[m]) + }; + + static unescape(string) { + const map = { + '&': '&', + '<': '<', + '>': '>', + '"': '"', + ''': "'", + }; + return string.replace(/&|<|>|"|'/g, m => map[m]) + } + +} + +/* https://developer.mozilla.org/zh-CN/docs/Web/API/Storage/setItem */ +class $Storage { + static name = "$Storage"; + static version = "1.0.9"; + static about() { return console.log(`\n🟧 ${this.name} v${this.version}\n`) }; + static data = null + static dataFile = 'box.dat' + static #nameRegex = /^@(?[^.]+)(?:\.(?.*))?$/; + + static #platform() { + if ('undefined' !== typeof $environment && $environment['surge-version']) + return 'Surge' + if ('undefined' !== typeof $environment && $environment['stash-version']) + return 'Stash' + if ('undefined' !== typeof module && !!module.exports) return 'Node.js' + if ('undefined' !== typeof $task) return 'Quantumult X' + if ('undefined' !== typeof $loon) return 'Loon' + if ('undefined' !== typeof $rocket) return 'Shadowrocket' + if ('undefined' !== typeof Egern) return 'Egern' + } + + static getItem(keyName = new String, defaultValue = null) { + let keyValue = defaultValue; + // 如果以 @ + switch (keyName.startsWith('@')) { + case true: + const { key, path } = keyName.match(this.#nameRegex)?.groups; + //console.log(`1: ${key}, ${path}`); + keyName = key; + let value = this.getItem(keyName, {}); + //console.log(`2: ${JSON.stringify(value)}`) + if (typeof value !== "object") value = {}; + //console.log(`3: ${JSON.stringify(value)}`) + keyValue = Lodash.get(value, path); + //console.log(`4: ${JSON.stringify(keyValue)}`) + try { + keyValue = JSON.parse(keyValue); + } catch (e) { + // do nothing + } //console.log(`5: ${JSON.stringify(keyValue)}`) + break; + default: + switch (this.#platform()) { + case 'Surge': + case 'Loon': + case 'Stash': + case 'Egern': + case 'Shadowrocket': + keyValue = $persistentStore.read(keyName); + break; + case 'Quantumult X': + keyValue = $prefs.valueForKey(keyName); + break; + case 'Node.js': + this.data = this.#loaddata(this.dataFile); + keyValue = this.data?.[keyName]; + break; + default: + keyValue = this.data?.[keyName] || null; + break; + } try { + keyValue = JSON.parse(keyValue); + } catch (e) { + // do nothing + } break; + } return keyValue ?? defaultValue; + }; + + static setItem(keyName = new String, keyValue = new String) { + let result = false; + //console.log(`0: ${typeof keyValue}`); + switch (typeof keyValue) { + case "object": + keyValue = JSON.stringify(keyValue); + break; + default: + keyValue = String(keyValue); + break; + } switch (keyName.startsWith('@')) { + case true: + const { key, path } = keyName.match(this.#nameRegex)?.groups; + //console.log(`1: ${key}, ${path}`); + keyName = key; + let value = this.getItem(keyName, {}); + //console.log(`2: ${JSON.stringify(value)}`) + if (typeof value !== "object") value = {}; + //console.log(`3: ${JSON.stringify(value)}`) + Lodash.set(value, path, keyValue); + //console.log(`4: ${JSON.stringify(value)}`) + result = this.setItem(keyName, value); + //console.log(`5: ${result}`) + break; + default: + switch (this.#platform()) { + case 'Surge': + case 'Loon': + case 'Stash': + case 'Egern': + case 'Shadowrocket': + result = $persistentStore.write(keyValue, keyName); + break; + case 'Quantumult X': + result =$prefs.setValueForKey(keyValue, keyName); + break; + case 'Node.js': + this.data = this.#loaddata(this.dataFile); + this.data[keyName] = keyValue; + this.#writedata(this.dataFile); + result = true; + break; + default: + result = this.data?.[keyName] || null; + break; + } break; + } return result; + }; + + static removeItem(keyName){ + let result = false; + switch (keyName.startsWith('@')) { + case true: + const { key, path } = keyName.match(this.#nameRegex)?.groups; + keyName = key; + let value = this.getItem(keyName); + if (typeof value !== "object") value = {}; + keyValue = Lodash.unset(value, path); + result = this.setItem(keyName, value); + break; + default: + switch (this.#platform()) { + case 'Surge': + case 'Loon': + case 'Stash': + case 'Egern': + case 'Shadowrocket': + result = false; + break; + case 'Quantumult X': + result = $prefs.removeValueForKey(keyName); + break; + case 'Node.js': + result = false; + break; + default: + result = false; + break; + } break; + } return result; + } + + static clear() { + let result = false; + switch (this.#platform()) { + case 'Surge': + case 'Loon': + case 'Stash': + case 'Egern': + case 'Shadowrocket': + result = false; + break; + case 'Quantumult X': + result = $prefs.removeAllValues(); + break; + case 'Node.js': + result = false; + break; + default: + result = false; + break; + } return result; + } + + static #loaddata(dataFile) { + if (this.isNode()) { + this.fs = this.fs ? this.fs : require('fs'); + this.path = this.path ? this.path : require('path'); + const curDirDataFilePath = this.path.resolve(dataFile); + const rootDirDataFilePath = this.path.resolve( + process.cwd(), + dataFile + ); + const isCurDirDataFile = this.fs.existsSync(curDirDataFilePath); + const isRootDirDataFile = + !isCurDirDataFile && this.fs.existsSync(rootDirDataFilePath); + if (isCurDirDataFile || isRootDirDataFile) { + const datPath = isCurDirDataFile + ? curDirDataFilePath + : rootDirDataFilePath; + try { + return JSON.parse(this.fs.readFileSync(datPath)) + } catch (e) { + return {} + } + } else return {} + } else return {} + } + + static #writedata(dataFile = this.dataFile) { + if (this.isNode()) { + this.fs = this.fs ? this.fs : require('fs'); + this.path = this.path ? this.path : require('path'); + const curDirDataFilePath = this.path.resolve(dataFile); + const rootDirDataFilePath = this.path.resolve( + process.cwd(), + dataFile + ); + const isCurDirDataFile = this.fs.existsSync(curDirDataFilePath); + const isRootDirDataFile = + !isCurDirDataFile && this.fs.existsSync(rootDirDataFilePath); + const jsondata = JSON.stringify(this.data); + if (isCurDirDataFile) { + this.fs.writeFileSync(curDirDataFilePath, jsondata); + } else if (isRootDirDataFile) { + this.fs.writeFileSync(rootDirDataFilePath, jsondata); + } else { + this.fs.writeFileSync(curDirDataFilePath, jsondata); + } + } + }; + +} + +class ENV { + static name = "ENV" + static version = '1.7.4' + static about() { return console.log(`\n🟧 ${this.name} v${this.version}\n`) } + + constructor(name, opts) { + console.log(`\n🟧 ${ENV.name} v${ENV.version}\n`); + this.name = name; + this.logs = []; + this.isMute = false; + this.isMuteLog = false; + this.logSeparator = '\n'; + this.encoding = 'utf-8'; + this.startTime = new Date().getTime(); + Object.assign(this, opts); + this.log(`\n🚩 开始!\n${name}\n`); + } + + platform() { + if ('undefined' !== typeof $environment && $environment['surge-version']) + return 'Surge' + if ('undefined' !== typeof $environment && $environment['stash-version']) + return 'Stash' + if ('undefined' !== typeof module && !!module.exports) return 'Node.js' + if ('undefined' !== typeof $task) return 'Quantumult X' + if ('undefined' !== typeof $loon) return 'Loon' + if ('undefined' !== typeof $rocket) return 'Shadowrocket' + if ('undefined' !== typeof Egern) return 'Egern' + } + + isNode() { + return 'Node.js' === this.platform() + } + + isQuanX() { + return 'Quantumult X' === this.platform() + } + + isSurge() { + return 'Surge' === this.platform() + } + + isLoon() { + return 'Loon' === this.platform() + } + + isShadowrocket() { + return 'Shadowrocket' === this.platform() + } + + isStash() { + return 'Stash' === this.platform() + } + + isEgern() { + return 'Egern' === this.platform() + } + + async getScript(url) { + return await this.fetch(url).then(response => response.body); + } + + async runScript(script, runOpts) { + let httpapi = $Storage.getItem('@chavy_boxjs_userCfgs.httpapi'); + httpapi = httpapi?.replace?.(/\n/g, '')?.trim(); + let httpapi_timeout = $Storage.getItem('@chavy_boxjs_userCfgs.httpapi_timeout'); + httpapi_timeout = (httpapi_timeout * 1) ?? 20; + httpapi_timeout = runOpts?.timeout ?? httpapi_timeout; + const [password, address] = httpapi.split('@'); + const request = { + url: `http://${address}/v1/scripting/evaluate`, + body: { + script_text: script, + mock_type: 'cron', + timeout: httpapi_timeout + }, + headers: { 'X-Key': password, 'Accept': '*/*' }, + timeout: httpapi_timeout + }; + await this.fetch(request).then(response => response.body, error => this.logErr(error)); + } + + initGotEnv(opts) { + this.got = this.got ? this.got : require('got'); + this.cktough = this.cktough ? this.cktough : require('tough-cookie'); + this.ckjar = this.ckjar ? this.ckjar : new this.cktough.CookieJar(); + if (opts) { + opts.headers = opts.headers ? opts.headers : {}; + if (undefined === opts.headers.Cookie && undefined === opts.cookieJar) { + opts.cookieJar = this.ckjar; + } + } + } + + async fetch(request = {} || "", option = {}) { + // 初始化参数 + switch (request.constructor) { + case Object: + request = { ...request, ...option }; + break; + case String: + request = { "url": request, ...option }; + break; + } // 自动判断请求方法 + if (!request.method) { + request.method = "GET"; + if (request.body ?? request.bodyBytes) request.method = "POST"; + } // 移除请求头中的部分参数, 让其自动生成 + delete request.headers?.Host; + delete request.headers?.[":authority"]; + delete request.headers?.['Content-Length']; + delete request.headers?.['content-length']; + // 定义请求方法(小写) + const method = request.method.toLocaleLowerCase(); + // 判断平台 + switch (this.platform()) { + case 'Loon': + case 'Surge': + case 'Stash': + case 'Egern': + case 'Shadowrocket': + default: + // 转换请求参数 + if (request.policy) { + if (this.isLoon()) request.node = request.policy; + if (this.isStash()) Lodash.set(request, "headers.X-Stash-Selected-Proxy", encodeURI(request.policy)); + } if (typeof request.redirection === "boolean") request["auto-redirect"] = request.redirection; + // 转换请求体 + if (request.bodyBytes && !request.body) { + request.body = request.bodyBytes; + delete request.bodyBytes; + } // 发送请求 + return await new Promise((resolve, reject) => { + $httpClient[method](request, (error, response, body) => { + if (error) reject(error); + else { + response.ok = /^2\d\d$/.test(response.status); + response.statusCode = response.status; + if (body) { + response.body = body; + if (request["binary-mode"] == true) response.bodyBytes = body; + } resolve(response); + } + }); + }); + case 'Quantumult X': + // 转换请求参数 + if (request.policy) Lodash.set(request, "opts.policy", request.policy); + if (typeof request["auto-redirect"] === "boolean") Lodash.set(request, "opts.redirection", request["auto-redirect"]); + // 转换请求体 + if (request.body instanceof ArrayBuffer) { + request.bodyBytes = request.body; + delete request.body; + } else if (ArrayBuffer.isView(request.body)) { + request.bodyBytes = request.body.buffer.slice(request.body.byteOffset, request.body.byteLength + request.body.byteOffset); + delete object.body; + } else if (request.body) delete request.bodyBytes; + // 发送请求 + return await $task.fetch(request).then( + response => { + response.ok = /^2\d\d$/.test(response.statusCode); + response.status = response.statusCode; + return response; + }, + reason => Promise.reject(reason.error)); + case 'Node.js': + let iconv = require('iconv-lite'); + this.initGotEnv(request); + const { url, ...option } = request; + return await this.got[method](url, option) + .on('redirect', (response, nextOpts) => { + try { + if (response.headers['set-cookie']) { + const ck = response.headers['set-cookie'] + .map(this.cktough.Cookie.parse) + .toString(); + if (ck) { + this.ckjar.setCookieSync(ck, null); + } + nextOpts.cookieJar = this.ckjar; + } + } catch (e) { + this.logErr(e); + } + // this.ckjar.setCookieSync(response.headers['set-cookie'].map(Cookie.parse).toString()) + }) + .then( + response => { + response.statusCode = response.status; + response.body = iconv.decode(response.rawBody, this.encoding); + response.bodyBytes = response.rawBody; + return response; + }, + error => Promise.reject(error.message)); + } }; + + /** + * + * 示例:$.time('yyyy-MM-dd qq HH:mm:ss.S') + * :$.time('yyyyMMddHHmmssS') + * y:年 M:月 d:日 q:季 H:时 m:分 s:秒 S:毫秒 + * 其中y可选0-4位占位符、S可选0-1位占位符,其余可选0-2位占位符 + * @param {string} format 格式化参数 + * @param {number} ts 可选: 根据指定时间戳返回格式化日期 + * + */ + time(format, ts = null) { + const date = ts ? new Date(ts) : new Date(); + let o = { + 'M+': date.getMonth() + 1, + 'd+': date.getDate(), + 'H+': date.getHours(), + 'm+': date.getMinutes(), + 's+': date.getSeconds(), + 'q+': Math.floor((date.getMonth() + 3) / 3), + 'S': date.getMilliseconds() + }; + if (/(y+)/.test(format)) + format = format.replace( + RegExp.$1, + (date.getFullYear() + '').substr(4 - RegExp.$1.length) + ); + for (let k in o) + if (new RegExp('(' + k + ')').test(format)) + format = format.replace( + RegExp.$1, + RegExp.$1.length == 1 + ? o[k] + : ('00' + o[k]).substr(('' + o[k]).length) + ); + return format + } + + /** + * 系统通知 + * + * > 通知参数: 同时支持 QuanX 和 Loon 两种格式, EnvJs根据运行环境自动转换, Surge 环境不支持多媒体通知 + * + * 示例: + * $.msg(title, subt, desc, 'twitter://') + * $.msg(title, subt, desc, { 'open-url': 'twitter://', 'media-url': 'https://github.githubassets.com/images/modules/open_graph/github-mark.png' }) + * $.msg(title, subt, desc, { 'open-url': 'https://bing.com', 'media-url': 'https://github.githubassets.com/images/modules/open_graph/github-mark.png' }) + * + * @param {*} title 标题 + * @param {*} subt 副标题 + * @param {*} desc 通知详情 + * @param {*} opts 通知参数 + * + */ + msg(title = name, subt = '', desc = '', opts) { + const toEnvOpts = (rawopts) => { + switch (typeof rawopts) { + case undefined: + return rawopts + case 'string': + switch (this.platform()) { + case 'Surge': + case 'Stash': + case 'Egern': + default: + return { url: rawopts } + case 'Loon': + case 'Shadowrocket': + return rawopts + case 'Quantumult X': + return { 'open-url': rawopts } + case 'Node.js': + return undefined + } + case 'object': + switch (this.platform()) { + case 'Surge': + case 'Stash': + case 'Egern': + case 'Shadowrocket': + default: { + let openUrl = + rawopts.url || rawopts.openUrl || rawopts['open-url']; + return { url: openUrl } + } + case 'Loon': { + let openUrl = + rawopts.openUrl || rawopts.url || rawopts['open-url']; + let mediaUrl = rawopts.mediaUrl || rawopts['media-url']; + return { openUrl, mediaUrl } + } + case 'Quantumult X': { + let openUrl = + rawopts['open-url'] || rawopts.url || rawopts.openUrl; + let mediaUrl = rawopts['media-url'] || rawopts.mediaUrl; + let updatePasteboard = + rawopts['update-pasteboard'] || rawopts.updatePasteboard; + return { + 'open-url': openUrl, + 'media-url': mediaUrl, + 'update-pasteboard': updatePasteboard + } + } + case 'Node.js': + return undefined + } + default: + return undefined + } + }; + if (!this.isMute) { + switch (this.platform()) { + case 'Surge': + case 'Loon': + case 'Stash': + case 'Egern': + case 'Shadowrocket': + default: + $notification.post(title, subt, desc, toEnvOpts(opts)); + break + case 'Quantumult X': + $notify(title, subt, desc, toEnvOpts(opts)); + break + case 'Node.js': + break + } + } + if (!this.isMuteLog) { + let logs = ['', '==============📣系统通知📣==============']; + logs.push(title); + subt ? logs.push(subt) : ''; + desc ? logs.push(desc) : ''; + console.log(logs.join('\n')); + this.logs = this.logs.concat(logs); + } + } + + log(...logs) { + if (logs.length > 0) { + this.logs = [...this.logs, ...logs]; + } + console.log(logs.join(this.logSeparator)); + } + + logErr(error) { + switch (this.platform()) { + case 'Surge': + case 'Loon': + case 'Stash': + case 'Egern': + case 'Shadowrocket': + case 'Quantumult X': + default: + this.log('', `❗️ ${this.name}, 错误!`, error); + break + case 'Node.js': + this.log('', `❗️${this.name}, 错误!`, error.stack); + break + } + } + + wait(time) { + return new Promise((resolve) => setTimeout(resolve, time)) + } + + done(object = {}) { + const endTime = new Date().getTime(); + const costTime = (endTime - this.startTime) / 1000; + this.log("", `🚩 ${this.name}, 结束! 🕛 ${costTime} 秒`, ""); + switch (this.platform()) { + case 'Surge': + if (object.policy) Lodash.set(object, "headers.X-Surge-Policy", object.policy); + $done(object); + break; + case 'Loon': + if (object.policy) object.node = object.policy; + $done(object); + break; + case 'Stash': + if (object.policy) Lodash.set(object, "headers.X-Stash-Selected-Proxy", encodeURI(object.policy)); + $done(object); + break; + case 'Egern': + $done(object); + break; + case 'Shadowrocket': + default: + $done(object); + break; + case 'Quantumult X': + if (object.policy) Lodash.set(object, "opts.policy", object.policy); + // 移除不可写字段 + delete object["auto-redirect"]; + delete object["auto-cookie"]; + delete object["binary-mode"]; + delete object.charset; + delete object.host; + delete object.insecure; + delete object.method; // 1.4.x 不可写 + delete object.opt; // $task.fetch() 参数, 不可写 + delete object.path; // 可写, 但会与 url 冲突 + delete object.policy; + delete object["policy-descriptor"]; + delete object.scheme; + delete object.sessionIndex; + delete object.statusCode; + delete object.timeout; + if (object.body instanceof ArrayBuffer) { + object.bodyBytes = object.body; + delete object.body; + } else if (ArrayBuffer.isView(object.body)) { + object.bodyBytes = object.body.buffer.slice(object.body.byteOffset, object.body.byteLength + object.body.byteOffset); + delete object.body; + } else if (object.body) delete object.bodyBytes; + $done(object); + break; + case 'Node.js': + process.exit(1); + break; + } + } +} + +class URI { + static name = "URI"; + static version = "1.2.7"; + static about() { return console.log(`\n🟧 ${this.name} v${this.version}\n`) }; + static #json = { scheme: "", host: "", path: "", query: {} }; + + static parse(url) { + const URLRegex = /(?:(?.+):\/\/(?[^/]+))?\/?(?[^?]+)?\??(?[^?]+)?/; + let json = url.match(URLRegex)?.groups ?? null; + if (json?.path) json.paths = json.path.split("/"); else json.path = ""; + //if (json?.paths?.at(-1)?.includes(".")) json.format = json.paths.at(-1).split(".").at(-1); + if (json?.paths) { + const fileName = json.paths[json.paths.length - 1]; + if (fileName?.includes(".")) { + const list = fileName.split("."); + json.format = list[list.length - 1]; + } + } + if (json?.query) json.query = Object.fromEntries(json.query.split("&").map((param) => param.split("="))); + return json + }; + + static stringify(json = this.#json) { + let url = ""; + if (json?.scheme && json?.host) url += json.scheme + "://" + json.host; + if (json?.path) url += (json?.host) ? "/" + json.path : json.path; + if (json?.query) url += "?" + Object.entries(json.query).map(param => param.join("=")).join("&"); + return url + }; +} + +// refer: https://github.com/Peng-YM/QuanX/blob/master/Tools/XMLParser/xml-parser.js +// refer: https://goessner.net/download/prj/jsonxml/ +class XML { + static name = "XML"; + static version = "0.4.1"; + static about = () => console.log(`\n🟧 ${this.name} v${this.version}\n`); + + static #ATTRIBUTE_KEY = "@"; + static #CHILD_NODE_KEY = "#"; + static #UNESCAPE = { + "&": "&", + "<": "<", + ">": ">", + "'": "'", + """: '"' + }; + static #ESCAPE = { + "&": "&", + "<": "<", + ">": ">", + "'": "'", + '"': """ + }; + + static parse(xml = new String, reviver = "") { + const UNESCAPE = this.#UNESCAPE; + const ATTRIBUTE_KEY = this.#ATTRIBUTE_KEY; + const CHILD_NODE_KEY = this.#CHILD_NODE_KEY; + const DOM = toDOM(xml); + let json = fromXML(DOM, reviver); + return json; + + /***************** Fuctions *****************/ + function toDOM(text) { + const list = text.replace(/^[ \t]+/gm, "") + .split(/<([^!<>?](?:'[\S\s]*?'|"[\S\s]*?"|[^'"<>])*|!(?:--[\S\s]*?--|\[[^\[\]'"<>]+\[[\S\s]*?]]|DOCTYPE[^\[<>]*?\[[\S\s]*?]|(?:ENTITY[^"<>]*?"[\S\s]*?")?[\S\s]*?)|\?[\S\s]*?\?)>/); + const length = list.length; + + // root element + const root = { children: [] }; + let elem = root; + + // dom tree stack + const stack = []; + + // parse + for (let i = 0; i < length;) { + // text node + const str = list[i++]; + if (str) appendText(str); + + // child node + const tag = list[i++]; + if (tag) parseNode(tag); + } + return root; + /***************** Fuctions *****************/ + function parseNode(tag) { + const tags = tag.split(" "); + const name = tags.shift(); + const length = tags.length; + let child = {}; + switch (name[0]) { + case "/": + // close tag + const closed = tag.replace(/^\/|[\s\/].*$/g, "").toLowerCase(); + while (stack.length) { + const tagName = elem?.name?.toLowerCase?.(); + elem = stack.pop(); + if (tagName === closed) break; + } + break; + case "?": + // XML declaration + child.name = name; + child.raw = tags.join(" "); + appendChild(child); + break; + case "!": + if (/!\[CDATA\[(.+)\]\]/.test(tag)) { + // CDATA section + child.name = "!CDATA"; + //child.raw = tag.slice(9, -2); + child.raw = tag.match(/!\[CDATA\[(.+)\]\]/); + //appendText(tag.slice(9, -2)); + } else { + // Comment section + child.name = name; + child.raw = tags.join(" "); + } appendChild(child); + break; + default: + child = openTag(tag); + appendChild(child); + switch ((tags?.[length - 1] ?? name).slice(-1)) { + case "/": + //child.hasChild = false; // emptyTag + delete child.children; // emptyTag + break; + default: + switch (name) { + case "link": + //child.hasChild = false; // emptyTag + delete child.children; // emptyTag + break; + default: + stack.push(elem); // openTag + elem = child; + break; + } break; + } break; + } + function openTag(tag) { + const elem = { children: [] }; + tag = tag.replace(/\s*\/?$/, ""); + const pos = tag.search(/[\s='"\/]/); + if (pos < 0) { + elem.name = tag; + } else { + elem.name = tag.substr(0, pos); + elem.tag = tag.substr(pos); + } + return elem; + } } + function appendText(str) { + //str = removeSpaces(str); + str = removeBreakLine(str); + //str = str?.trim?.(); + if (str) appendChild(unescapeXML(str)); + + function removeBreakLine(str) { + return str?.replace?.(/^(\r\n|\r|\n|\t)+|(\r\n|\r|\n|\t)+$/g, ""); + } + } + + function appendChild(child) { + elem.children.push(child); + } + } /***************** Fuctions *****************/ + function fromPlist(elem, reviver) { + let object; + switch (typeof elem) { + case "string": + case "undefined": + object = elem; + break; + case "object": + //default: + const name = elem.name; + const children = elem.children; + + object = {}; + + switch (name) { + case "plist": + let plist = fromPlist(children[0], reviver); + object = Object.assign(object, plist); + break; + case "dict": + let dict = children.map(child => fromPlist(child, reviver)); + dict = chunk(dict, 2); + object = Object.fromEntries(dict); + break; + case "array": + if (!Array.isArray(object)) object = []; + object = children.map(child => fromPlist(child, reviver)); + break; + case "key": + const key = children[0]; + object = key; + break; + case "true": + case "false": + const boolean = name; + object = JSON.parse(boolean); + break; + case "integer": + const integer = children[0]; + //object = parseInt(integer); + object = BigInt(integer); + break; + case "real": + const real = children[0]; + //const digits = real.split(".")[1]?.length || 0; + object = parseFloat(real);//.toFixed(digits); + break; + case "string": + const string = children[0]; + object = string; + break; + } if (reviver) object = reviver(name || "", object); + break; + } + return object; + + /** + * Chunk Array + * @author VirgilClyne + * @param {Array} source - source + * @param {Number} length - number + * @return {Array<*>} target + */ + function chunk(source, length) { + var index = 0, target = []; + while (index < source.length) target.push(source.slice(index, index += length)); + return target; + } } + + function fromXML(elem, reviver) { + let object; + switch (typeof elem) { + case "string": + case "undefined": + object = elem; + break; + case "object": + //default: + const raw = elem.raw; + const name = elem.name; + const tag = elem.tag; + const children = elem.children; + + if (raw) object = raw; + else if (tag) object = parseAttribute(tag, reviver); + else if (!children) object = { [name]: undefined }; + else object = {}; + + if (name === "plist") object = Object.assign(object, fromPlist(children[0], reviver)); + else children?.forEach?.((child, i) => { + if (typeof child === "string") addObject(object, CHILD_NODE_KEY, fromXML(child, reviver), undefined); + else if (!child.tag && !child.children && !child.raw) addObject(object, child.name, fromXML(child, reviver), children?.[i - 1]?.name); + else addObject(object, child.name, fromXML(child, reviver), undefined); + }); + if (children && children.length === 0) addObject(object, CHILD_NODE_KEY, null, undefined); + /* + if (Object.keys(object).length === 0) { + if (elem.name) object[elem.name] = (elem.hasChild === false) ? null : ""; + else object = (elem.hasChild === false) ? null : ""; + } + */ + + //if (Object.keys(object).length === 0) addObject(object, elem.name, (elem.hasChild === false) ? null : ""); + //if (Object.keys(object).length === 0) object = (elem.hasChild === false) ? undefined : ""; + if (reviver) object = reviver(name || "", object); + break; + } + return object; + /***************** Fuctions *****************/ + function parseAttribute(tag, reviver) { + if (!tag) return; + const list = tag.split(/([^\s='"]+(?:\s*=\s*(?:'[\S\s]*?'|"[\S\s]*?"|[^\s'"]*))?)/); + const length = list.length; + let attributes, val; + + for (let i = 0; i < length; i++) { + let str = removeSpaces(list[i]); + //let str = removeBreakLine(list[i]); + //let str = list[i]?.trim?.(); + if (!str) continue; + + if (!attributes) { + attributes = {}; + } + + const pos = str.indexOf("="); + if (pos < 0) { + // bare attribute + str = ATTRIBUTE_KEY + str; + val = null; + } else { + // attribute key/value pair + val = str.substr(pos + 1).replace(/^\s+/, ""); + str = ATTRIBUTE_KEY + str.substr(0, pos).replace(/\s+$/, ""); + + // quote: foo="FOO" bar='BAR' + const firstChar = val[0]; + const lastChar = val[val.length - 1]; + if (firstChar === lastChar && (firstChar === "'" || firstChar === '"')) { + val = val.substr(1, val.length - 2); + } + + val = unescapeXML(val); + } + if (reviver) val = reviver(str, val); + + addObject(attributes, str, val); + } + + return attributes; + + function removeSpaces(str) { + //return str && str.replace(/^\s+|\s+$/g, ""); + return str?.trim?.(); + } + } + + function addObject(object, key, val, prevKey = key) { + if (typeof val === "undefined") return; + else { + const prev = object[prevKey]; + //const curr = object[key]; + if (Array.isArray(prev)) prev.push(val); + else if (prev) object[prevKey] = [prev, val]; + else object[key] = val; + } + } + } + + function unescapeXML(str) { + return str.replace(/(&(?:lt|gt|amp|apos|quot|#(?:\d{1,6}|x[0-9a-fA-F]{1,5}));)/g, function (str) { + if (str[1] === "#") { + const code = (str[2] === "x") ? parseInt(str.substr(3), 16) : parseInt(str.substr(2), 10); + if (code > -1) return String.fromCharCode(code); + } + return UNESCAPE[str] || str; + }); + } + + }; + + static stringify(json = new Object, tab = "") { + this.#ESCAPE; + const ATTRIBUTE_KEY = this.#ATTRIBUTE_KEY; + const CHILD_NODE_KEY = this.#CHILD_NODE_KEY; + let XML = ""; + for (let elem in json) XML += toXml(json[elem], elem, ""); + XML = tab ? XML.replace(/\t/g, tab) : XML.replace(/\t|\n/g, ""); + return XML; + /***************** Fuctions *****************/ + function toXml(Elem, Name, Ind) { + let xml = ""; + switch (typeof Elem) { + case "object": + if (Array.isArray(Elem)) { + xml = Elem.reduce( + (prevXML, currXML) => prevXML += `${Ind}${toXml(currXML, Name, `${Ind}\t`)}\n`, + "" + ); + } else { + let attribute = ""; + let hasChild = false; + for (let name in Elem) { + if (name[0] === ATTRIBUTE_KEY) { + attribute += ` ${name.substring(1)}=\"${Elem[name].toString()}\"`; + delete Elem[name]; + } else if (Elem[name] === undefined) Name = name; + else hasChild = true; + } + xml += `${Ind}<${Name}${attribute}${(hasChild || Name === "link") ? "" : "/"}>`; + + if (hasChild) { + if (Name === "plist") xml += toPlist(Elem, Name, `${Ind}\t`); + else { + for (let name in Elem) { + switch (name) { + case CHILD_NODE_KEY: + xml += Elem[name] ?? ""; + break; + default: + xml += toXml(Elem[name], name, `${Ind}\t`); + break; + } } } xml += (xml.slice(-1) === "\n" ? Ind : "") + ``; + } } break; + case "string": + switch (Name) { + case "?xml": + xml += `${Ind}<${Name} ${Elem.toString()}>`; + break; + case "?": + xml += `${Ind}<${Name}${Elem.toString()}${Name}>`; + break; + case "!": + xml += `${Ind}`; + break; + case "!DOCTYPE": + xml += `${Ind}<${Name} ${Elem.toString()}>`; + break; + case "!CDATA": + xml += `${Ind}`; + break; + case CHILD_NODE_KEY: + xml += Elem; + break; + default: + xml += `${Ind}<${Name}>${Elem.toString()}`; + break; + } break; + case "undefined": + xml += Ind + `<${Name.toString()}/>`; + break; + } return xml; + } + function toPlist(Elem, Name, Ind) { + let plist = ""; + switch (typeof Elem) { + case "boolean": + plist = `${Ind}<${Elem.toString()}/>`; + break; + case "number": + plist = `${Ind}${Elem.toString()}`; + break; + case "bigint": + plist = `${Ind}${Elem.toString()}`; + break; + case "string": + plist = `${Ind}${Elem.toString()}`; + break; + case "object": + let array = ""; + if (Array.isArray(Elem)) { + for (var i = 0, n = Elem.length; i < n; i++) array += `${Ind}${toPlist(Elem[i], Name, `${Ind}\t`)}`; + plist = `${Ind}${array}${Ind}`; + } else { + let dict = ""; + Object.entries(Elem).forEach(([key, value]) => { + dict += `${Ind}${key}`; + dict += toPlist(value, key, Ind); + }); + plist = `${Ind}${dict}${Ind}`; + } break; + } + return plist; + } }; +} + +var Settings$7 = { + Switch: true +}; +var Configs$2 = { + Storefront: [ + [ + "AE", + "143481" + ], + [ + "AF", + "143610" + ], + [ + "AG", + "143540" + ], + [ + "AI", + "143538" + ], + [ + "AL", + "143575" + ], + [ + "AM", + "143524" + ], + [ + "AO", + "143564" + ], + [ + "AR", + "143505" + ], + [ + "AT", + "143445" + ], + [ + "AU", + "143460" + ], + [ + "AZ", + "143568" + ], + [ + "BA", + "143612" + ], + [ + "BB", + "143541" + ], + [ + "BD", + "143490" + ], + [ + "BE", + "143446" + ], + [ + "BF", + "143578" + ], + [ + "BG", + "143526" + ], + [ + "BH", + "143559" + ], + [ + "BJ", + "143576" + ], + [ + "BM", + "143542" + ], + [ + "BN", + "143560" + ], + [ + "BO", + "143556" + ], + [ + "BR", + "143503" + ], + [ + "BS", + "143539" + ], + [ + "BT", + "143577" + ], + [ + "BW", + "143525" + ], + [ + "BY", + "143565" + ], + [ + "BZ", + "143555" + ], + [ + "CA", + "143455" + ], + [ + "CD", + "143613" + ], + [ + "CG", + "143582" + ], + [ + "CH", + "143459" + ], + [ + "CI", + "143527" + ], + [ + "CL", + "143483" + ], + [ + "CM", + "143574" + ], + [ + "CN", + "143465" + ], + [ + "CO", + "143501" + ], + [ + "CR", + "143495" + ], + [ + "CV", + "143580" + ], + [ + "CY", + "143557" + ], + [ + "CZ", + "143489" + ], + [ + "DE", + "143443" + ], + [ + "DK", + "143458" + ], + [ + "DM", + "143545" + ], + [ + "DO", + "143508" + ], + [ + "DZ", + "143563" + ], + [ + "EC", + "143509" + ], + [ + "EE", + "143518" + ], + [ + "EG", + "143516" + ], + [ + "ES", + "143454" + ], + [ + "FI", + "143447" + ], + [ + "FJ", + "143583" + ], + [ + "FM", + "143591" + ], + [ + "FR", + "143442" + ], + [ + "GA", + "143614" + ], + [ + "GB", + "143444" + ], + [ + "GD", + "143546" + ], + [ + "GF", + "143615" + ], + [ + "GH", + "143573" + ], + [ + "GM", + "143584" + ], + [ + "GR", + "143448" + ], + [ + "GT", + "143504" + ], + [ + "GW", + "143585" + ], + [ + "GY", + "143553" + ], + [ + "HK", + "143463" + ], + [ + "HN", + "143510" + ], + [ + "HR", + "143494" + ], + [ + "HU", + "143482" + ], + [ + "ID", + "143476" + ], + [ + "IE", + "143449" + ], + [ + "IL", + "143491" + ], + [ + "IN", + "143467" + ], + [ + "IQ", + "143617" + ], + [ + "IS", + "143558" + ], + [ + "IT", + "143450" + ], + [ + "JM", + "143511" + ], + [ + "JO", + "143528" + ], + [ + "JP", + "143462" + ], + [ + "KE", + "143529" + ], + [ + "KG", + "143586" + ], + [ + "KH", + "143579" + ], + [ + "KN", + "143548" + ], + [ + "KP", + "143466" + ], + [ + "KR", + "143466" + ], + [ + "KW", + "143493" + ], + [ + "KY", + "143544" + ], + [ + "KZ", + "143517" + ], + [ + "TC", + "143552" + ], + [ + "TD", + "143581" + ], + [ + "TJ", + "143603" + ], + [ + "TH", + "143475" + ], + [ + "TM", + "143604" + ], + [ + "TN", + "143536" + ], + [ + "TO", + "143608" + ], + [ + "TR", + "143480" + ], + [ + "TT", + "143551" + ], + [ + "TW", + "143470" + ], + [ + "TZ", + "143572" + ], + [ + "LA", + "143587" + ], + [ + "LB", + "143497" + ], + [ + "LC", + "143549" + ], + [ + "LI", + "143522" + ], + [ + "LK", + "143486" + ], + [ + "LR", + "143588" + ], + [ + "LT", + "143520" + ], + [ + "LU", + "143451" + ], + [ + "LV", + "143519" + ], + [ + "LY", + "143567" + ], + [ + "MA", + "143620" + ], + [ + "MD", + "143523" + ], + [ + "ME", + "143619" + ], + [ + "MG", + "143531" + ], + [ + "MK", + "143530" + ], + [ + "ML", + "143532" + ], + [ + "MM", + "143570" + ], + [ + "MN", + "143592" + ], + [ + "MO", + "143515" + ], + [ + "MR", + "143590" + ], + [ + "MS", + "143547" + ], + [ + "MT", + "143521" + ], + [ + "MU", + "143533" + ], + [ + "MV", + "143488" + ], + [ + "MW", + "143589" + ], + [ + "MX", + "143468" + ], + [ + "MY", + "143473" + ], + [ + "MZ", + "143593" + ], + [ + "NA", + "143594" + ], + [ + "NE", + "143534" + ], + [ + "NG", + "143561" + ], + [ + "NI", + "143512" + ], + [ + "NL", + "143452" + ], + [ + "NO", + "143457" + ], + [ + "NP", + "143484" + ], + [ + "NR", + "143606" + ], + [ + "NZ", + "143461" + ], + [ + "OM", + "143562" + ], + [ + "PA", + "143485" + ], + [ + "PE", + "143507" + ], + [ + "PG", + "143597" + ], + [ + "PH", + "143474" + ], + [ + "PK", + "143477" + ], + [ + "PL", + "143478" + ], + [ + "PT", + "143453" + ], + [ + "PW", + "143595" + ], + [ + "PY", + "143513" + ], + [ + "QA", + "143498" + ], + [ + "RO", + "143487" + ], + [ + "RS", + "143500" + ], + [ + "RU", + "143469" + ], + [ + "RW", + "143621" + ], + [ + "SA", + "143479" + ], + [ + "SB", + "143601" + ], + [ + "SC", + "143599" + ], + [ + "SE", + "143456" + ], + [ + "SG", + "143464" + ], + [ + "SI", + "143499" + ], + [ + "SK", + "143496" + ], + [ + "SL", + "143600" + ], + [ + "SN", + "143535" + ], + [ + "SR", + "143554" + ], + [ + "ST", + "143598" + ], + [ + "SV", + "143506" + ], + [ + "SZ", + "143602" + ], + [ + "UA", + "143492" + ], + [ + "UG", + "143537" + ], + [ + "US", + "143441" + ], + [ + "UY", + "143514" + ], + [ + "UZ", + "143566" + ], + [ + "VC", + "143550" + ], + [ + "VE", + "143502" + ], + [ + "VG", + "143543" + ], + [ + "VN", + "143471" + ], + [ + "VU", + "143609" + ], + [ + "XK", + "143624" + ], + [ + "YE", + "143571" + ], + [ + "ZA", + "143472" + ], + [ + "ZM", + "143622" + ], + [ + "ZW", + "143605" + ] + ] +}; +var Default = { + Settings: Settings$7, + Configs: Configs$2 +}; + +var Default$1 = /*#__PURE__*/Object.freeze({ + __proto__: null, + Configs: Configs$2, + Settings: Settings$7, + default: Default +}); + +var Settings$6 = { + Switch: true, + PEP: { + GCC: "US" + } +}; +var Location = { + Settings: Settings$6 +}; + +var Location$1 = /*#__PURE__*/Object.freeze({ + __proto__: null, + Settings: Settings$6, + default: Location +}); + +var Settings$5 = { + Switch: true, + Services: { + Dispatcher: "CN", + Directions: "AUTO", + Traffic: "AUTO", + RAP: "XX", + Tiles: "AUTO" + }, + GeoManifest: { + Dynamic: { + Config: { + CountryCode: { + "default": "AUTO", + iOS: "CN", + iPadOS: "CN", + watchOS: "US", + macOS: "CN" + } + } + } + }, + Config: { + Announcements: { + "Environment:": { + "default": "AUTO", + iOS: "CN", + iPadOS: "CN", + watchOS: "XX", + macOS: "CN" + } + }, + Defaults: { + LagunaBeach: true, + DrivingMultiWaypointRoutesEnabled: true, + GEOAddressCorrection: true, + LookupMaxParametersCount: true, + LocalitiesAndLandmarks: true, + POIBusyness: true, + PedestrianAR: true, + "6694982d2b14e95815e44e970235e230": true, + OpticalHeading: true, + UseCLPedestrianMapMatchedLocations: true, + TransitPayEnabled: true, + SupportsOffline: true, + SupportsCarIntegration: true, + WiFiQualityNetworkDisabled: false, + WiFiQualityTileDisabled: false + } + } +}; +var Maps = { + Settings: Settings$5 +}; + +var Maps$1 = /*#__PURE__*/Object.freeze({ + __proto__: null, + Settings: Settings$5, + default: Maps +}); + +var Settings$4 = { + Switch: true, + CountryCode: "US", + newsPlusUser: true +}; +var News = { + Settings: Settings$4 +}; + +var News$1 = /*#__PURE__*/Object.freeze({ + __proto__: null, + Settings: Settings$4, + default: News +}); + +var Settings$3 = { + Switch: true, + CountryCode: "US", + canUse: true +}; +var PrivateRelay = { + Settings: Settings$3 +}; + +var PrivateRelay$1 = /*#__PURE__*/Object.freeze({ + __proto__: null, + Settings: Settings$3, + default: PrivateRelay +}); + +var Settings$2 = { + Switch: true, + CountryCode: "SG", + Domains: [ + "web", + "itunes", + "app_store", + "movies", + "restaurants", + "maps" + ], + Functions: [ + "flightutilities", + "lookup", + "mail", + "messages", + "news", + "safari", + "siri", + "spotlight", + "visualintelligence" + ], + Safari_Smart_History: true +}; +var Configs$1 = { + VisualIntelligence: { + enabled_domains: [ + "pets", + "media", + "books", + "art", + "nature", + "landmarks" + ], + supported_domains: [ + "ART", + "BOOK", + "MEDIA", + "LANDMARK", + "ANIMALS", + "BIRDS", + "FOOD", + "SIGN_SYMBOL", + "AUTO_SYMBOL", + "DOGS", + "NATURE", + "NATURAL_LANDMARK", + "INSECTS", + "REPTILES", + "ALBUM", + "STOREFRONT", + "LAUNDRY_CARE_SYMBOL", + "CATS", + "OBJECT_2D", + "SCULPTURE", + "SKYLINE", + "MAMMALS" + ] + } +}; +var Siri = { + Settings: Settings$2, + Configs: Configs$1 +}; + +var Siri$1 = /*#__PURE__*/Object.freeze({ + __proto__: null, + Configs: Configs$1, + Settings: Settings$2, + default: Siri +}); + +var Settings$1 = { + Switch: "true", + CountryCode: "US", + MultiAccount: "false", + Universal: "true" +}; +var TestFlight = { + Settings: Settings$1 +}; + +var TestFlight$1 = /*#__PURE__*/Object.freeze({ + __proto__: null, + Settings: Settings$1, + default: TestFlight +}); + +var Settings = { + Switch: true, + "Third-Party": false, + HLSUrl: "play-edge.itunes.apple.com", + ServerUrl: "play.itunes.apple.com", + Tabs: [ + "WatchNow", + "Originals", + "MLS", + "Sports", + "Kids", + "Store", + "Movies", + "TV", + "ChannelsAndApps", + "Library", + "Search" + ], + CountryCode: { + Configs: "AUTO", + Settings: "AUTO", + View: [ + "SG", + "TW" + ], + WatchNow: "AUTO", + Channels: "AUTO", + Originals: "AUTO", + Sports: "US", + Kids: "US", + Store: "AUTO", + Movies: "AUTO", + TV: "AUTO", + Persons: "SG", + Search: "AUTO", + Others: "AUTO" + } +}; +var Configs = { + Locale: [ + [ + "AU", + "en-AU" + ], + [ + "CA", + "en-CA" + ], + [ + "GB", + "en-GB" + ], + [ + "KR", + "ko-KR" + ], + [ + "HK", + "yue-Hant" + ], + [ + "JP", + "ja-JP" + ], + [ + "MO", + "zh-Hant" + ], + [ + "TW", + "zh-Hant" + ], + [ + "US", + "en-US" + ], + [ + "SG", + "zh-Hans" + ] + ], + Tabs: [ + { + title: "主页", + type: "WatchNow", + universalLinks: [ + "https://tv.apple.com/watch-now", + "https://tv.apple.com/home" + ], + destinationType: "Target", + target: { + id: "tahoma_watchnow", + type: "Root", + url: "https://tv.apple.com/watch-now" + }, + isSelected: true + }, + { + title: "Apple TV+", + type: "Originals", + universalLinks: [ + "https://tv.apple.com/channel/tvs.sbd.4000", + "https://tv.apple.com/atv" + ], + destinationType: "Target", + target: { + id: "tvs.sbd.4000", + type: "Brand", + url: "https://tv.apple.com/us/channel/tvs.sbd.4000" + } + }, + { + title: "MLS Season Pass", + type: "MLS", + universalLinks: [ + "https://tv.apple.com/mls" + ], + destinationType: "Target", + target: { + id: "tvs.sbd.7000", + type: "Brand", + url: "https://tv.apple.com/us/channel/tvs.sbd.7000" + } + }, + { + title: "体育节目", + type: "Sports", + universalLinks: [ + "https://tv.apple.com/sports" + ], + destinationType: "Target", + target: { + id: "tahoma_sports", + type: "Root", + url: "https://tv.apple.com/sports" + } + }, + { + title: "儿童", + type: "Kids", + universalLinks: [ + "https://tv.apple.com/kids" + ], + destinationType: "Target", + target: { + id: "tahoma_kids", + type: "Root", + url: "https://tv.apple.com/kids" + } + }, + { + title: "电影", + type: "Movies", + universalLinks: [ + "https://tv.apple.com/movies" + ], + destinationType: "Target", + target: { + id: "tahoma_movies", + type: "Root", + url: "https://tv.apple.com/movies" + } + }, + { + title: "电视节目", + type: "TV", + universalLinks: [ + "https://tv.apple.com/tv-shows" + ], + destinationType: "Target", + target: { + id: "tahoma_tvshows", + type: "Root", + url: "https://tv.apple.com/tv-shows" + } + }, + { + title: "商店", + type: "Store", + universalLinks: [ + "https://tv.apple.com/store" + ], + destinationType: "SubTabs", + subTabs: [ + { + title: "电影", + type: "Movies", + universalLinks: [ + "https://tv.apple.com/movies" + ], + destinationType: "Target", + target: { + id: "tahoma_movies", + type: "Root", + url: "https://tv.apple.com/movies" + } + }, + { + title: "电视节目", + type: "TV", + universalLinks: [ + "https://tv.apple.com/tv-shows" + ], + destinationType: "Target", + target: { + id: "tahoma_tvshows", + type: "Root", + url: "https://tv.apple.com/tv-shows" + } + } + ] + }, + { + title: "频道和 App", + destinationType: "SubTabs", + subTabsPlacementType: "ExpandedList", + type: "ChannelsAndApps", + subTabs: [ + ] + }, + { + title: "资料库", + type: "Library", + destinationType: "Client" + }, + { + title: "搜索", + type: "Search", + universalLinks: [ + "https://tv.apple.com/search" + ], + destinationType: "Target", + target: { + id: "tahoma_search", + type: "Root", + url: "https://tv.apple.com/search" + } + } + ], + i18n: { + WatchNow: [ + [ + "en", + "Home" + ], + [ + "zh", + "主页" + ], + [ + "zh-Hans", + "主頁" + ], + [ + "zh-Hant", + "主頁" + ] + ], + Movies: [ + [ + "en", + "Movies" + ], + [ + "zh", + "电影" + ], + [ + "zh-Hans", + "电影" + ], + [ + "zh-Hant", + "電影" + ] + ], + TV: [ + [ + "en", + "TV" + ], + [ + "zh", + "电视节目" + ], + [ + "zh-Hans", + "电视节目" + ], + [ + "zh-Hant", + "電視節目" + ] + ], + Store: [ + [ + "en", + "Store" + ], + [ + "zh", + "商店" + ], + [ + "zh-Hans", + "商店" + ], + [ + "zh-Hant", + "商店" + ] + ], + Sports: [ + [ + "en", + "Sports" + ], + [ + "zh", + "体育节目" + ], + [ + "zh-Hans", + "体育节目" + ], + [ + "zh-Hant", + "體育節目" + ] + ], + Kids: [ + [ + "en", + "Kids" + ], + [ + "zh", + "儿童" + ], + [ + "zh-Hans", + "儿童" + ], + [ + "zh-Hant", + "兒童" + ] + ], + Library: [ + [ + "en", + "Library" + ], + [ + "zh", + "资料库" + ], + [ + "zh-Hans", + "资料库" + ], + [ + "zh-Hant", + "資料庫" + ] + ], + Search: [ + [ + "en", + "Search" + ], + [ + "zh", + "搜索" + ], + [ + "zh-Hans", + "搜索" + ], + [ + "zh-Hant", + "蒐索" + ] + ] + } +}; +var TV = { + Settings: Settings, + Configs: Configs +}; + +var TV$1 = /*#__PURE__*/Object.freeze({ + __proto__: null, + Configs: Configs, + Settings: Settings, + default: TV +}); + +var Database$1 = Database = { + "Default": Default$1, + "Location": Location$1, + "Maps": Maps$1, + "News": News$1, + "PrivateRelay": PrivateRelay$1, + "Siri": Siri$1, + "TestFlight": TestFlight$1, + "TV": TV$1, +}; + +/** + * Get Storage Variables + * @link https://github.com/NanoCat-Me/ENV/blob/main/getStorage.mjs + * @author VirgilClyne + * @param {String} key - Persistent Store Key + * @param {Array} names - Platform Names + * @param {Object} database - Default Database + * @return {Object} { Settings, Caches, Configs } + */ +function getStorage(key, names, database) { + //console.log(`☑️ ${this.name}, Get Environment Variables`, ""); + /***************** BoxJs *****************/ + // 包装为局部变量,用完释放内存 + // BoxJs的清空操作返回假值空字符串, 逻辑或操作符会在左侧操作数为假值时返回右侧操作数。 + let BoxJs = $Storage.getItem(key, database); + //console.log(`🚧 ${this.name}, Get Environment Variables`, `BoxJs类型: ${typeof BoxJs}`, `BoxJs内容: ${JSON.stringify(BoxJs)}`, ""); + /***************** Argument *****************/ + let Argument = {}; + if (typeof $argument !== "undefined") { + if (Boolean($argument)) { + //console.log(`🎉 ${this.name}, $Argument`); + let arg = Object.fromEntries($argument.split("&").map((item) => item.split("=").map(i => i.replace(/\"/g, '')))); + //console.log(JSON.stringify(arg)); + for (let item in arg) Lodash.set(Argument, item, arg[item]); + //console.log(JSON.stringify(Argument)); + } //console.log(`✅ ${this.name}, Get Environment Variables`, `Argument类型: ${typeof Argument}`, `Argument内容: ${JSON.stringify(Argument)}`, ""); + } /***************** Store *****************/ + const Store = { Settings: database?.Default?.Settings || {}, Configs: database?.Default?.Configs || {}, Caches: {} }; + if (!Array.isArray(names)) names = [names]; + //console.log(`🚧 ${this.name}, Get Environment Variables`, `names类型: ${typeof names}`, `names内容: ${JSON.stringify(names)}`, ""); + for (let name of names) { + Store.Settings = { ...Store.Settings, ...database?.[name]?.Settings, ...Argument, ...BoxJs?.[name]?.Settings }; + Store.Configs = { ...Store.Configs, ...database?.[name]?.Configs }; + if (BoxJs?.[name]?.Caches && typeof BoxJs?.[name]?.Caches === "string") BoxJs[name].Caches = JSON.parse(BoxJs?.[name]?.Caches); + Store.Caches = { ...Store.Caches, ...BoxJs?.[name]?.Caches }; + } //console.log(`🚧 ${this.name}, Get Environment Variables`, `Store.Settings类型: ${typeof Store.Settings}`, `Store.Settings: ${JSON.stringify(Store.Settings)}`, ""); + traverseObject(Store.Settings, (key, value) => { + //console.log(`🚧 ${this.name}, traverseObject`, `${key}: ${typeof value}`, `${key}: ${JSON.stringify(value)}`, ""); + if (value === "true" || value === "false") value = JSON.parse(value); // 字符串转Boolean + else if (typeof value === "string") { + if (value.includes(",")) value = value.split(",").map(item => string2number(item)); // 字符串转数组转数字 + else value = string2number(value); // 字符串转数字 + } return value; + }); + //console.log(`✅ ${this.name}, Get Environment Variables`, `Store: ${typeof Store.Caches}`, `Store内容: ${JSON.stringify(Store)}`, ""); + return Store; + + /***************** function *****************/ + function traverseObject(o, c) { for (var t in o) { var n = o[t]; o[t] = "object" == typeof n && null !== n ? traverseObject(n, c) : c(t, n); } return o } + function string2number(string) { if (string && !isNaN(string)) string = parseInt(string, 10); return string } +} + +/** + * Set Environment Variables + * @author VirgilClyne + * @param {Object} $ - ENV + * @param {String} name - Persistent Store Key + * @param {Array} platforms - Platform Names + * @param {Object} database - Default DataBase + * @return {Object} { Settings, Caches, Configs } + */ +function setENV(name, platforms, database) { + console.log(`☑️ Set Environment Variables`, ""); + let { Settings, Caches, Configs } = getStorage(name, platforms, database); + /***************** Settings *****************/ + if (Settings?.Tabs && !Array.isArray(Settings?.Tabs)) Lodash.set(Settings, "Tabs", (Settings?.Tabs) ? [Settings.Tabs.toString()] : []); + if (Settings?.Domains && !Array.isArray(Settings?.Domains)) Lodash.set(Settings, "Domains", (Settings?.Domains) ? [Settings.Domains.toString()] : []); + if (Settings?.Functions && !Array.isArray(Settings?.Functions)) Lodash.set(Settings, "Functions", (Settings?.Functions) ? [Settings.Functions.toString()] : []); + console.log(`✅ Set Environment Variables, Settings: ${typeof Settings}, Settings内容: ${JSON.stringify(Settings)}`, ""); + /***************** Caches *****************/ + //console.log(`✅ Set Environment Variables, Caches: ${typeof Caches}, Caches内容: ${JSON.stringify(Caches)}`, ""); + /***************** Configs *****************/ + Configs.Storefront = new Map(Configs.Storefront); + if (Configs.Locale) Configs.Locale = new Map(Configs.Locale); + if (Configs.i18n) for (let type in Configs.i18n) Configs.i18n[type] = new Map(Configs.i18n[type]); + return { Settings, Caches, Configs }; +} + +const $ = new ENV(" iRingo: 📍 Location v3.0.6(2) request.beta"); + +// 构造回复数据 +let $response = undefined; + +/***************** Processing *****************/ +// 解构URL +const URL = URI.parse($request.url); +$.log(`⚠ URL: ${JSON.stringify(URL)}`, ""); +// 获取连接参数 +const METHOD = $request.method, HOST = URL.host, PATH = URL.path; URL.paths; +$.log(`⚠ METHOD: ${METHOD}`, ""); +// 解析格式 +const FORMAT = ($request.headers?.["Content-Type"] ?? $request.headers?.["content-type"])?.split(";")?.[0]; +$.log(`⚠ FORMAT: ${FORMAT}`, ""); +(async () => { + const { Settings, Caches, Configs } = setENV("iRingo", "Location", Database$1); + $.log(`⚠ Settings.Switch: ${Settings?.Switch}`, ""); + switch (Settings.Switch) { + case true: + default: + // 创建空数据 + let body = {}; + // 方法判断 + switch (METHOD) { + case "POST": + case "PUT": + case "PATCH": + case "DELETE": + // 格式判断 + switch (FORMAT) { + case undefined: // 视为无body + break; + case "application/x-www-form-urlencoded": + case "text/plain": + default: + break; + case "application/x-mpegURL": + case "application/x-mpegurl": + case "application/vnd.apple.mpegurl": + case "audio/mpegurl": + //body = M3U8.parse($request.body); + //$.log(`🚧 body: ${JSON.stringify(body)}`, ""); + //$request.body = M3U8.stringify(body); + break; + case "text/xml": + case "text/html": + case "text/plist": + case "application/xml": + case "application/plist": + case "application/x-plist": + body = XML.parse($request.body); + $.log(`🚧 body: ${JSON.stringify(body)}`, ""); + $request.body = XML.stringify(body); + break; + case "text/vtt": + case "application/vtt": + //body = VTT.parse($request.body); + //$.log(`🚧 body: ${JSON.stringify(body)}`, ""); + //$request.body = VTT.stringify(body); + break; + case "text/json": + case "application/json": + body = JSON.parse($request.body ?? "{}"); + $.log(`🚧 body: ${JSON.stringify(body)}`, ""); + $request.body = JSON.stringify(body); + break; + case "application/protobuf": + case "application/x-protobuf": + case "application/vnd.google.protobuf": + case "application/grpc": + case "application/grpc+proto": + case "applecation/octet-stream": + break; + } //break; // 不中断,继续处理URL + case "GET": + case "HEAD": + case "OPTIONS": + case undefined: // QX牛逼,script-echo-response不返回method + default: + // 主机判断 + switch (HOST) { + case "configuration.ls.apple.com": + // 路径判断 + switch (PATH) { + case "config/defaults": + Lodash.set(Caches, "Defaults.ETag", setETag($request.headers?.["If-None-Match"] ?? $request?.headers?.["if-none-match"], Caches?.Defaults?.ETag)); + $Storage.setItem("@iRingo.Location.Caches", Caches); + break; + } break; + case "gspe1-ssl.ls.apple.com": + break; + case "gsp-ssl.ls.apple.com": + case "dispatcher.is.autonavi.com": + case "direction2.is.autonavi.com": + switch (PATH) { + case "dispatcher.arpc": + case "dispatcher": + switch (Settings?.Services?.PlaceData) { + case "AUTO": + default: + break; + case "CN": + URL.host = "dispatcher.is.autonavi.com"; + URL.path = "dispatcher"; + break; + case "XX": + URL.host = "gsp-ssl.ls.apple.com"; + URL.path = "dispatcher.arpc"; + break; + } break; + case "directions.arpc": + case "direction": + switch (Settings?.Services?.Directions) { + case "AUTO": + default: + break; + case "CN": + URL.host = "direction2.is.autonavi.com"; + URL.path = "direction"; + break; + case "XX": + URL.host = "gsp-ssl.ls.apple.com"; + URL.path = "directions.arpc"; + break; + } break; + } break; + case "sundew.ls.apple.com": + case "rap.is.autonavi.com": + switch (PATH) { + case "v1/feedback/submission.arpc": + case "rap": + switch (Settings?.Services?.RAP) { + case "AUTO": + default: + break; + case "CN": + URL.host = "rap.is.autonavi.com"; + URL.path = "rap"; + break; + case "XX": + URL.host = "sundew.ls.apple.com"; + URL.path = "v1/feedback/submission.arpc"; + break; + } break; + case "grp/st": + case "rapstatus": + switch (Settings?.Services?.RAP) { + case "AUTO": + default: + break; + case "CN": + URL.host = "rap.is.autonavi.com"; + URL.path = "rapstatus"; + break; + case "XX": + URL.host = "sundew.ls.apple.com"; + URL.path = "grp/st"; + break; + } break; + } break; + case "gspe12-ssl.ls.apple.com": + case "gspe12-cn-ssl.ls.apple.com": + switch (PATH) { + case "traffic": + switch (Settings?.Services?.Traffic) { + case "AUTO": + default: + break; + case "CN": + URL.host = "gspe12-cn-ssl.ls.apple.com"; + break; + case "XX": + URL.host = "gspe12-ssl.ls.apple.com"; + break; + } break; + } break; + case "gspe19-ssl.ls.apple.com": + case "gspe19-cn-ssl.ls.apple.com": + switch (PATH) { + case "tile.vf": + case "tiles": + switch (Settings?.Services?.Tiles) { + case "AUTO": + default: + break; + case "CN": + URL.host = "gspe19-cn-ssl.ls.apple.com"; + URL.path = "tiles"; + break; + case "XX": + URL.host = "gspe19-ssl.ls.apple.com"; + URL.path = "tile.vf"; + break; + } break; + } break; + case "gspe35-ssl.ls.apple.com": + case "gspe35-ssl.ls.apple.cn": + switch (PATH) { + case "config/announcements": + switch (URL.query?.os) { + case "ios": + case "ipados": + case "macos": + default: + switch (Settings?.Config?.Announcements?.Environment?.default) { + case "AUTO": + switch (Caches?.pep?.gcc) { + default: + URL.query.environment = "prod"; + break; + case "CN": + case undefined: + URL.query.environment = "prod-cn"; + break; + } break; + case "CN": + default: + URL.query.environment = "prod-cn"; + break; + case "XX": + URL.query.environment = "prod"; + break; + } break; + case "watchos": + switch (Settings?.Config?.Announcements?.Environment?.watchOS) { + case "AUTO": + switch (Caches?.pep?.gcc) { + default: + URL.query.environment = "prod"; + break; + case "CN": + case undefined: + URL.query.environment = "prod-cn"; + break; + } break; + case "XX": + default: + URL.query.environment = "prod"; + break; + case "CN": + URL.query.environment = "prod-cn"; + break; + } break; + } Lodash.set(Caches, "Announcements.ETag", setETag($request.headers?.["If-None-Match"] ?? $request.headers?.["if-none-match"], Caches?.Announcements?.ETag)); + $Storage.setItem("@iRingo.Location.Caches", Caches); + break; + case "geo_manifest/dynamic/config": + switch (URL.query?.os) { + case "ios": + case "ipados": + case "macos": + default: + switch (Settings?.Geo_manifest?.Dynamic?.Config?.Country_code?.default) { + case "AUTO": + switch (Caches?.pep?.gcc) { + default: + URL.query.country_code = Caches?.pep?.gcc ?? "US"; + break; + case "CN": + case undefined: + URL.query.country_code = "CN"; + break; + } break; + default: + URL.query.country_code = Settings?.Geo_manifest?.Dynamic?.Config?.Country_code?.default ?? "CN"; + break; + } break; + case "watchos": + switch (Settings?.Geo_manifest?.Dynamic?.Config?.Country_code?.watchOS) { + case "AUTO": + switch (Caches?.pep?.gcc) { + default: + URL.query.country_code = Caches?.pep?.gcc ?? "US"; + break; + case "CN": + case undefined: + URL.query.country_code = "CN"; + break; + } break; + default: + URL.query.country_code = Settings?.Geo_manifest?.Dynamic?.Config?.Country_code?.watchOS ?? "US"; + break; + } break; + } Lodash.set(Caches, "Dynamic.ETag", setETag($request.headers?.["If-None-Match"] ?? $request?.headers?.["if-none-match"], Caches?.Dynamic?.ETag)); + $Storage.setItem("@iRingo.Location.Caches", Caches); + break; + } break; + } break; + case "CONNECT": + case "TRACE": + break; + } if ($request.headers?.Host) $request.headers.Host = URL.host; + $request.url = URI.stringify(URL); + $.log(`🚧 调试信息`, `$request.url: ${$request.url}`, ""); + break; + case false: + break; + }})() + .catch((e) => $.logErr(e)) + .finally(() => { + switch ($response) { + default: // 有构造回复数据,返回构造的回复数据 + if ($.isQuanX()) { + if (!$response.status) $response.status = "HTTP/1.1 200 OK"; + delete $response.headers?.["Content-Length"]; + delete $response.headers?.["content-length"]; + delete $response.headers?.["Transfer-Encoding"]; + $.done($response); + } else $.done({ response: $response }); + break; + case undefined: // 无构造回复数据,发送修改的请求数据 + //$.log(`🚧 finally`, `$request: ${JSON.stringify($request, null, 2)}`, ""); + $.done($request); + break; + } }); + +/***************** Function *****************/ +/** + * Set ETag + * @author VirgilClyne + * @param {String} IfNoneMatch - If-None-Match + * @return {String} ETag - ETag + */ +function setETag(IfNoneMatch, ETag) { + $.log(`☑️ Set ETag`, `If-None-Match: ${IfNoneMatch}`, `ETag: ${ETag}`, ""); + if (IfNoneMatch !== ETag) { + ETag = IfNoneMatch; + delete $request?.headers?.["If-None-Match"]; + delete $request?.headers?.["if-none-match"]; + } + $.log(`✅ Set ETag`, ""); + return ETag; +} diff --git a/archive/js/Location.request.js b/archive/js/Location.request.js new file mode 100644 index 0000000..24aee3b --- /dev/null +++ b/archive/js/Location.request.js @@ -0,0 +1 @@ +class e{static name="Lodash";static version="1.2.2";static about(){return console.log(`\n🟧 ${this.name} v${this.version}\n`)}static get(e={},t="",s=void 0){Array.isArray(t)||(t=this.toPath(t));const a=t.reduce(((e,t)=>Object(e)[t]),e);return void 0===a?s:a}static set(e={},t="",s){return Array.isArray(t)||(t=this.toPath(t)),t.slice(0,-1).reduce(((e,s,a)=>Object(e[s])===e[s]?e[s]:e[s]=/^\d+$/.test(t[a+1])?[]:{}),e)[t[t.length-1]]=s,e}static unset(e={},t=""){return Array.isArray(t)||(t=this.toPath(t)),t.reduce(((e,s,a)=>a===t.length-1?(delete e[s],!0):Object(e)[s]),e)}static toPath(e){return e.replace(/\[(\d+)\]/g,".$1").split(".").filter(Boolean)}static escape(e){const t={"&":"&","<":"<",">":">",'"':""","'":"'"};return e.replace(/[&<>"']/g,(e=>t[e]))}static unescape(e){const t={"&":"&","<":"<",">":">",""":'"',"'":"'"};return e.replace(/&|<|>|"|'/g,(e=>t[e]))}}class t{static name="$Storage";static version="1.0.9";static about(){return console.log(`\n🟧 ${this.name} v${this.version}\n`)}static data=null;static dataFile="box.dat";static#e=/^@(?[^.]+)(?:\.(?.*))?$/;static#t(){return"undefined"!=typeof $environment&&$environment["surge-version"]?"Surge":"undefined"!=typeof $environment&&$environment["stash-version"]?"Stash":"undefined"!=typeof module&&module.exports?"Node.js":"undefined"!=typeof $task?"Quantumult X":"undefined"!=typeof $loon?"Loon":"undefined"!=typeof $rocket?"Shadowrocket":"undefined"!=typeof Egern?"Egern":void 0}static getItem(t=new String,s=null){let a=s;if(!0===t.startsWith("@")){const{key:s,path:o}=t.match(this.#e)?.groups;t=s;let i=this.getItem(t,{});"object"!=typeof i&&(i={}),a=e.get(i,o);try{a=JSON.parse(a)}catch(e){}}else{switch(this.#t()){case"Surge":case"Loon":case"Stash":case"Egern":case"Shadowrocket":a=$persistentStore.read(t);break;case"Quantumult X":a=$prefs.valueForKey(t);break;case"Node.js":this.data=this.#s(this.dataFile),a=this.data?.[t];break;default:a=this.data?.[t]||null}try{a=JSON.parse(a)}catch(e){}}return a??s}static setItem(t=new String,s=new String){let a=!1;if("object"==typeof s)s=JSON.stringify(s);else s=String(s);if(!0===t.startsWith("@")){const{key:o,path:i}=t.match(this.#e)?.groups;t=o;let n=this.getItem(t,{});"object"!=typeof n&&(n={}),e.set(n,i,s),a=this.setItem(t,n)}else switch(this.#t()){case"Surge":case"Loon":case"Stash":case"Egern":case"Shadowrocket":a=$persistentStore.write(s,t);break;case"Quantumult X":a=$prefs.setValueForKey(s,t);break;case"Node.js":this.data=this.#s(this.dataFile),this.data[t]=s,this.#a(this.dataFile),a=!0;break;default:a=this.data?.[t]||null}return a}static removeItem(t){let s=!1;if(!0===t.startsWith("@")){const{key:a,path:o}=t.match(this.#e)?.groups;t=a;let i=this.getItem(t);"object"!=typeof i&&(i={}),keyValue=e.unset(i,o),s=this.setItem(t,i)}else switch(this.#t()){case"Surge":case"Loon":case"Stash":case"Egern":case"Shadowrocket":case"Node.js":default:s=!1;break;case"Quantumult X":s=$prefs.removeValueForKey(t)}return s}static clear(){let e=!1;switch(this.#t()){case"Surge":case"Loon":case"Stash":case"Egern":case"Shadowrocket":case"Node.js":default:e=!1;break;case"Quantumult X":e=$prefs.removeAllValues()}return e}static#s(e){if(!this.isNode())return{};{this.fs=this.fs?this.fs:require("fs"),this.path=this.path?this.path:require("path");const t=this.path.resolve(e),s=this.path.resolve(process.cwd(),e),a=this.fs.existsSync(t),o=!a&&this.fs.existsSync(s);if(!a&&!o)return{};{const e=a?t:s;try{return JSON.parse(this.fs.readFileSync(e))}catch(e){return{}}}}}static#a(e=this.dataFile){if(this.isNode()){this.fs=this.fs?this.fs:require("fs"),this.path=this.path?this.path:require("path");const t=this.path.resolve(e),s=this.path.resolve(process.cwd(),e),a=this.fs.existsSync(t),o=!a&&this.fs.existsSync(s),i=JSON.stringify(this.data);a?this.fs.writeFileSync(t,i):o?this.fs.writeFileSync(s,i):this.fs.writeFileSync(t,i)}}}class s{static name="ENV";static version="1.7.4";static about(){return console.log(`\n🟧 ${this.name} v${this.version}\n`)}constructor(e,t){console.log(`\n🟧 ${s.name} v${s.version}\n`),this.name=e,this.logs=[],this.isMute=!1,this.isMuteLog=!1,this.logSeparator="\n",this.encoding="utf-8",this.startTime=(new Date).getTime(),Object.assign(this,t),this.log(`\n🚩 开始!\n${e}\n`)}platform(){return"undefined"!=typeof $environment&&$environment["surge-version"]?"Surge":"undefined"!=typeof $environment&&$environment["stash-version"]?"Stash":"undefined"!=typeof module&&module.exports?"Node.js":"undefined"!=typeof $task?"Quantumult X":"undefined"!=typeof $loon?"Loon":"undefined"!=typeof $rocket?"Shadowrocket":"undefined"!=typeof Egern?"Egern":void 0}isNode(){return"Node.js"===this.platform()}isQuanX(){return"Quantumult X"===this.platform()}isSurge(){return"Surge"===this.platform()}isLoon(){return"Loon"===this.platform()}isShadowrocket(){return"Shadowrocket"===this.platform()}isStash(){return"Stash"===this.platform()}isEgern(){return"Egern"===this.platform()}async getScript(e){return await this.fetch(e).then((e=>e.body))}async runScript(e,s){let a=t.getItem("@chavy_boxjs_userCfgs.httpapi");a=a?.replace?.(/\n/g,"")?.trim();let o=t.getItem("@chavy_boxjs_userCfgs.httpapi_timeout");o=1*o??20,o=s?.timeout??o;const[i,n]=a.split("@"),r={url:`http://${n}/v1/scripting/evaluate`,body:{script_text:e,mock_type:"cron",timeout:o},headers:{"X-Key":i,Accept:"*/*"},timeout:o};await this.fetch(r).then((e=>e.body),(e=>this.logErr(e)))}initGotEnv(e){this.got=this.got?this.got:require("got"),this.cktough=this.cktough?this.cktough:require("tough-cookie"),this.ckjar=this.ckjar?this.ckjar:new this.cktough.CookieJar,e&&(e.headers=e.headers?e.headers:{},void 0===e.headers.Cookie&&void 0===e.cookieJar&&(e.cookieJar=this.ckjar))}async fetch(t={}||"",s={}){switch(t.constructor){case Object:t={...t,...s};break;case String:t={url:t,...s}}t.method||(t.method="GET",(t.body??t.bodyBytes)&&(t.method="POST")),delete t.headers?.Host,delete t.headers?.[":authority"],delete t.headers?.["Content-Length"],delete t.headers?.["content-length"];const a=t.method.toLocaleLowerCase();switch(this.platform()){case"Loon":case"Surge":case"Stash":case"Egern":case"Shadowrocket":default:return t.policy&&(this.isLoon()&&(t.node=t.policy),this.isStash()&&e.set(t,"headers.X-Stash-Selected-Proxy",encodeURI(t.policy))),"boolean"==typeof t.redirection&&(t["auto-redirect"]=t.redirection),t.bodyBytes&&!t.body&&(t.body=t.bodyBytes,delete t.bodyBytes),await new Promise(((e,s)=>{$httpClient[a](t,((a,o,i)=>{a?s(a):(o.ok=/^2\d\d$/.test(o.status),o.statusCode=o.status,i&&(o.body=i,1==t["binary-mode"]&&(o.bodyBytes=i)),e(o))}))}));case"Quantumult X":return t.policy&&e.set(t,"opts.policy",t.policy),"boolean"==typeof t["auto-redirect"]&&e.set(t,"opts.redirection",t["auto-redirect"]),t.body instanceof ArrayBuffer?(t.bodyBytes=t.body,delete t.body):ArrayBuffer.isView(t.body)?(t.bodyBytes=t.body.buffer.slice(t.body.byteOffset,t.body.byteLength+t.body.byteOffset),delete object.body):t.body&&delete t.bodyBytes,await $task.fetch(t).then((e=>(e.ok=/^2\d\d$/.test(e.statusCode),e.status=e.statusCode,e)),(e=>Promise.reject(e.error)));case"Node.js":let s=require("iconv-lite");this.initGotEnv(t);const{url:o,...i}=t;return await this.got[a](o,i).on("redirect",((e,t)=>{try{if(e.headers["set-cookie"]){const s=e.headers["set-cookie"].map(this.cktough.Cookie.parse).toString();s&&this.ckjar.setCookieSync(s,null),t.cookieJar=this.ckjar}}catch(e){this.logErr(e)}})).then((e=>(e.statusCode=e.status,e.body=s.decode(e.rawBody,this.encoding),e.bodyBytes=e.rawBody,e)),(e=>Promise.reject(e.message)))}}time(e,t=null){const s=t?new Date(t):new Date;let a={"M+":s.getMonth()+1,"d+":s.getDate(),"H+":s.getHours(),"m+":s.getMinutes(),"s+":s.getSeconds(),"q+":Math.floor((s.getMonth()+3)/3),S:s.getMilliseconds()};/(y+)/.test(e)&&(e=e.replace(RegExp.$1,(s.getFullYear()+"").substr(4-RegExp.$1.length)));for(let t in a)new RegExp("("+t+")").test(e)&&(e=e.replace(RegExp.$1,1==RegExp.$1.length?a[t]:("00"+a[t]).substr((""+a[t]).length)));return e}msg(e=name,t="",s="",a){const o=e=>{switch(typeof e){case void 0:return e;case"string":switch(this.platform()){case"Surge":case"Stash":case"Egern":default:return{url:e};case"Loon":case"Shadowrocket":return e;case"Quantumult X":return{"open-url":e};case"Node.js":return}case"object":switch(this.platform()){case"Surge":case"Stash":case"Egern":case"Shadowrocket":default:return{url:e.url||e.openUrl||e["open-url"]};case"Loon":return{openUrl:e.openUrl||e.url||e["open-url"],mediaUrl:e.mediaUrl||e["media-url"]};case"Quantumult X":return{"open-url":e["open-url"]||e.url||e.openUrl,"media-url":e["media-url"]||e.mediaUrl,"update-pasteboard":e["update-pasteboard"]||e.updatePasteboard};case"Node.js":return}default:return}};if(!this.isMute)switch(this.platform()){case"Surge":case"Loon":case"Stash":case"Egern":case"Shadowrocket":default:$notification.post(e,t,s,o(a));break;case"Quantumult X":$notify(e,t,s,o(a));case"Node.js":}if(!this.isMuteLog){let a=["","==============📣系统通知📣=============="];a.push(e),t&&a.push(t),s&&a.push(s),console.log(a.join("\n")),this.logs=this.logs.concat(a)}}log(...e){e.length>0&&(this.logs=[...this.logs,...e]),console.log(e.join(this.logSeparator))}logErr(e){switch(this.platform()){case"Surge":case"Loon":case"Stash":case"Egern":case"Shadowrocket":case"Quantumult X":default:this.log("",`❗️ ${this.name}, 错误!`,e);break;case"Node.js":this.log("",`❗️${this.name}, 错误!`,e.stack)}}wait(e){return new Promise((t=>setTimeout(t,e)))}done(t={}){const s=((new Date).getTime()-this.startTime)/1e3;switch(this.log("",`🚩 ${this.name}, 结束! 🕛 ${s} 秒`,""),this.platform()){case"Surge":t.policy&&e.set(t,"headers.X-Surge-Policy",t.policy),$done(t);break;case"Loon":t.policy&&(t.node=t.policy),$done(t);break;case"Stash":t.policy&&e.set(t,"headers.X-Stash-Selected-Proxy",encodeURI(t.policy)),$done(t);break;case"Egern":case"Shadowrocket":default:$done(t);break;case"Quantumult X":t.policy&&e.set(t,"opts.policy",t.policy),delete t["auto-redirect"],delete t["auto-cookie"],delete t["binary-mode"],delete t.charset,delete t.host,delete t.insecure,delete t.method,delete t.opt,delete t.path,delete t.policy,delete t["policy-descriptor"],delete t.scheme,delete t.sessionIndex,delete t.statusCode,delete t.timeout,t.body instanceof ArrayBuffer?(t.bodyBytes=t.body,delete t.body):ArrayBuffer.isView(t.body)?(t.bodyBytes=t.body.buffer.slice(t.body.byteOffset,t.body.byteLength+t.body.byteOffset),delete t.body):t.body&&delete t.bodyBytes,$done(t);break;case"Node.js":process.exit(1)}}}class a{static name="URI";static version="1.2.7";static about(){return console.log(`\n🟧 ${this.name} v${this.version}\n`)}static#o={scheme:"",host:"",path:"",query:{}};static parse(e){let t=e.match(/(?:(?.+):\/\/(?[^/]+))?\/?(?[^?]+)?\??(?[^?]+)?/)?.groups??null;if(t?.path?t.paths=t.path.split("/"):t.path="",t?.paths){const e=t.paths[t.paths.length-1];if(e?.includes(".")){const s=e.split(".");t.format=s[s.length-1]}}return t?.query&&(t.query=Object.fromEntries(t.query.split("&").map((e=>e.split("="))))),t}static stringify(e=this.#o){let t="";return e?.scheme&&e?.host&&(t+=e.scheme+"://"+e.host),e?.path&&(t+=e?.host?"/"+e.path:e.path),e?.query&&(t+="?"+Object.entries(e.query).map((e=>e.join("="))).join("&")),t}}var o={Switch:!0},i={Storefront:[["AE","143481"],["AF","143610"],["AG","143540"],["AI","143538"],["AL","143575"],["AM","143524"],["AO","143564"],["AR","143505"],["AT","143445"],["AU","143460"],["AZ","143568"],["BA","143612"],["BB","143541"],["BD","143490"],["BE","143446"],["BF","143578"],["BG","143526"],["BH","143559"],["BJ","143576"],["BM","143542"],["BN","143560"],["BO","143556"],["BR","143503"],["BS","143539"],["BT","143577"],["BW","143525"],["BY","143565"],["BZ","143555"],["CA","143455"],["CD","143613"],["CG","143582"],["CH","143459"],["CI","143527"],["CL","143483"],["CM","143574"],["CN","143465"],["CO","143501"],["CR","143495"],["CV","143580"],["CY","143557"],["CZ","143489"],["DE","143443"],["DK","143458"],["DM","143545"],["DO","143508"],["DZ","143563"],["EC","143509"],["EE","143518"],["EG","143516"],["ES","143454"],["FI","143447"],["FJ","143583"],["FM","143591"],["FR","143442"],["GA","143614"],["GB","143444"],["GD","143546"],["GF","143615"],["GH","143573"],["GM","143584"],["GR","143448"],["GT","143504"],["GW","143585"],["GY","143553"],["HK","143463"],["HN","143510"],["HR","143494"],["HU","143482"],["ID","143476"],["IE","143449"],["IL","143491"],["IN","143467"],["IQ","143617"],["IS","143558"],["IT","143450"],["JM","143511"],["JO","143528"],["JP","143462"],["KE","143529"],["KG","143586"],["KH","143579"],["KN","143548"],["KP","143466"],["KR","143466"],["KW","143493"],["KY","143544"],["KZ","143517"],["TC","143552"],["TD","143581"],["TJ","143603"],["TH","143475"],["TM","143604"],["TN","143536"],["TO","143608"],["TR","143480"],["TT","143551"],["TW","143470"],["TZ","143572"],["LA","143587"],["LB","143497"],["LC","143549"],["LI","143522"],["LK","143486"],["LR","143588"],["LT","143520"],["LU","143451"],["LV","143519"],["LY","143567"],["MA","143620"],["MD","143523"],["ME","143619"],["MG","143531"],["MK","143530"],["ML","143532"],["MM","143570"],["MN","143592"],["MO","143515"],["MR","143590"],["MS","143547"],["MT","143521"],["MU","143533"],["MV","143488"],["MW","143589"],["MX","143468"],["MY","143473"],["MZ","143593"],["NA","143594"],["NE","143534"],["NG","143561"],["NI","143512"],["NL","143452"],["NO","143457"],["NP","143484"],["NR","143606"],["NZ","143461"],["OM","143562"],["PA","143485"],["PE","143507"],["PG","143597"],["PH","143474"],["PK","143477"],["PL","143478"],["PT","143453"],["PW","143595"],["PY","143513"],["QA","143498"],["RO","143487"],["RS","143500"],["RU","143469"],["RW","143621"],["SA","143479"],["SB","143601"],["SC","143599"],["SE","143456"],["SG","143464"],["SI","143499"],["SK","143496"],["SL","143600"],["SN","143535"],["SR","143554"],["ST","143598"],["SV","143506"],["SZ","143602"],["UA","143492"],["UG","143537"],["US","143441"],["UY","143514"],["UZ","143566"],["VC","143550"],["VE","143502"],["VG","143543"],["VN","143471"],["VU","143609"],["XK","143624"],["YE","143571"],["ZA","143472"],["ZM","143622"],["ZW","143605"]]},n={Settings:o,Configs:i},r={Switch:!0,PEP:{GCC:"US"},Services:{PlaceData:"CN",Directions:"AUTO",Traffic:"AUTO",RAP:"XX",Tiles:"AUTO"},Geo_manifest:{Dynamic:{Config:{Country_code:{default:"AUTO",iOS:"CN",iPadOS:"CN",watchOS:"US",macOS:"CN"}}}},Config:{Announcements:{"Environment:":{default:"AUTO",iOS:"CN",iPadOS:"CN",watchOS:"XX",macOS:"CN"}},Defaults:{LagunaBeach:!0,DrivingMultiWaypointRoutesEnabled:!0,GEOAddressCorrection:!0,LookupMaxParametersCount:!0,LocalitiesAndLandmarks:!0,POIBusyness:!0,PedestrianAR:!0,"6694982d2b14e95815e44e970235e230":!0,OpticalHeading:!0,UseCLPedestrianMapMatchedLocations:!0,TransitPayEnabled:!0,SupportsOffline:!0,SupportsCarIntegration:!0,WiFiQualityNetworkDisabled:!1,WiFiQualityTileDisabled:!1}}},c={Settings:r},l={Switch:!0,CountryCode:"US",newsPlusUser:!0},h={Settings:l},p={Switch:!0,CountryCode:"US",canUse:!0},u={Settings:p},d={Switch:!0,CountryCode:"SG",Domains:["web","itunes","app_store","movies","restaurants","maps"],Functions:["flightutilities","lookup","mail","messages","news","safari","siri","spotlight","visualintelligence"],Safari_Smart_History:!0},g={VisualIntelligence:{enabled_domains:["pets","media","books","art","nature","landmarks"],supported_domains:["ART","BOOK","MEDIA","LANDMARK","ANIMALS","BIRDS","FOOD","SIGN_SYMBOL","AUTO_SYMBOL","DOGS","NATURE","NATURAL_LANDMARK","INSECTS","REPTILES","ALBUM","STOREFRONT","LAUNDRY_CARE_SYMBOL","CATS","OBJECT_2D","SCULPTURE","SKYLINE","MAMMALS"]}},f={Settings:d,Configs:g},y={Switch:"true",CountryCode:"US",MultiAccount:"false",Universal:"true"},m={Settings:y},S={Switch:!0,"Third-Party":!1,HLSUrl:"play-edge.itunes.apple.com",ServerUrl:"play.itunes.apple.com",Tabs:["WatchNow","Originals","MLS","Sports","Kids","Store","Movies","TV","ChannelsAndApps","Library","Search"],CountryCode:{Configs:"AUTO",Settings:"AUTO",View:["SG","TW"],WatchNow:"AUTO",Channels:"AUTO",Originals:"AUTO",Sports:"US",Kids:"US",Store:"AUTO",Movies:"AUTO",TV:"AUTO",Persons:"SG",Search:"AUTO",Others:"AUTO"}},b={Locale:[["AU","en-AU"],["CA","en-CA"],["GB","en-GB"],["KR","ko-KR"],["HK","yue-Hant"],["JP","ja-JP"],["MO","zh-Hant"],["TW","zh-Hant"],["US","en-US"],["SG","zh-Hans"]],Tabs:[{title:"主页",type:"WatchNow",universalLinks:["https://tv.apple.com/watch-now","https://tv.apple.com/home"],destinationType:"Target",target:{id:"tahoma_watchnow",type:"Root",url:"https://tv.apple.com/watch-now"},isSelected:!0},{title:"Apple TV+",type:"Originals",universalLinks:["https://tv.apple.com/channel/tvs.sbd.4000","https://tv.apple.com/atv"],destinationType:"Target",target:{id:"tvs.sbd.4000",type:"Brand",url:"https://tv.apple.com/us/channel/tvs.sbd.4000"}},{title:"MLS Season Pass",type:"MLS",universalLinks:["https://tv.apple.com/mls"],destinationType:"Target",target:{id:"tvs.sbd.7000",type:"Brand",url:"https://tv.apple.com/us/channel/tvs.sbd.7000"}},{title:"体育节目",type:"Sports",universalLinks:["https://tv.apple.com/sports"],destinationType:"Target",target:{id:"tahoma_sports",type:"Root",url:"https://tv.apple.com/sports"}},{title:"儿童",type:"Kids",universalLinks:["https://tv.apple.com/kids"],destinationType:"Target",target:{id:"tahoma_kids",type:"Root",url:"https://tv.apple.com/kids"}},{title:"电影",type:"Movies",universalLinks:["https://tv.apple.com/movies"],destinationType:"Target",target:{id:"tahoma_movies",type:"Root",url:"https://tv.apple.com/movies"}},{title:"电视节目",type:"TV",universalLinks:["https://tv.apple.com/tv-shows"],destinationType:"Target",target:{id:"tahoma_tvshows",type:"Root",url:"https://tv.apple.com/tv-shows"}},{title:"商店",type:"Store",universalLinks:["https://tv.apple.com/store"],destinationType:"SubTabs",subTabs:[{title:"电影",type:"Movies",universalLinks:["https://tv.apple.com/movies"],destinationType:"Target",target:{id:"tahoma_movies",type:"Root",url:"https://tv.apple.com/movies"}},{title:"电视节目",type:"TV",universalLinks:["https://tv.apple.com/tv-shows"],destinationType:"Target",target:{id:"tahoma_tvshows",type:"Root",url:"https://tv.apple.com/tv-shows"}}]},{title:"频道和 App",destinationType:"SubTabs",subTabsPlacementType:"ExpandedList",type:"ChannelsAndApps",subTabs:[]},{title:"资料库",type:"Library",destinationType:"Client"},{title:"搜索",type:"Search",universalLinks:["https://tv.apple.com/search"],destinationType:"Target",target:{id:"tahoma_search",type:"Root",url:"https://tv.apple.com/search"}}],i18n:{WatchNow:[["en","Home"],["zh","主页"],["zh-Hans","主頁"],["zh-Hant","主頁"]],Movies:[["en","Movies"],["zh","电影"],["zh-Hans","电影"],["zh-Hant","電影"]],TV:[["en","TV"],["zh","电视节目"],["zh-Hans","电视节目"],["zh-Hant","電視節目"]],Store:[["en","Store"],["zh","商店"],["zh-Hans","商店"],["zh-Hant","商店"]],Sports:[["en","Sports"],["zh","体育节目"],["zh-Hans","体育节目"],["zh-Hant","體育節目"]],Kids:[["en","Kids"],["zh","儿童"],["zh-Hans","儿童"],["zh-Hant","兒童"]],Library:[["en","Library"],["zh","资料库"],["zh-Hans","资料库"],["zh-Hant","資料庫"]],Search:[["en","Search"],["zh","搜索"],["zh-Hans","搜索"],["zh-Hant","蒐索"]]}},v={Settings:S,Configs:b},T=Database={Default:Object.freeze({__proto__:null,Configs:i,Settings:o,default:n}),Location:Object.freeze({__proto__:null,Settings:r,default:c}),News:Object.freeze({__proto__:null,Settings:l,default:h}),PrivateRelay:Object.freeze({__proto__:null,Settings:p,default:u}),Siri:Object.freeze({__proto__:null,Configs:g,Settings:d,default:f}),TestFlight:Object.freeze({__proto__:null,Settings:y,default:m}),TV:Object.freeze({__proto__:null,Configs:b,Settings:S,default:v})};function C(s,a,o){console.log("☑️ Set Environment Variables","");let{Settings:i,Caches:n,Configs:r}=function(s,a,o){let i=t.getItem(s,o),n={};if("undefined"!=typeof $argument&&Boolean($argument)){let t=Object.fromEntries($argument.split("&").map((e=>e.split("=").map((e=>e.replace(/\"/g,""))))));for(let s in t)e.set(n,s,t[s])}const r={Settings:o?.Default?.Settings||{},Configs:o?.Default?.Configs||{},Caches:{}};Array.isArray(a)||(a=[a]);for(let e of a)r.Settings={...r.Settings,...o?.[e]?.Settings,...n,...i?.[e]?.Settings},r.Configs={...r.Configs,...o?.[e]?.Configs},i?.[e]?.Caches&&"string"==typeof i?.[e]?.Caches&&(i[e].Caches=JSON.parse(i?.[e]?.Caches)),r.Caches={...r.Caches,...i?.[e]?.Caches};return function e(t,s){for(var a in t){var o=t[a];t[a]="object"==typeof o&&null!==o?e(o,s):s(a,o)}return t}(r.Settings,((e,t)=>("true"===t||"false"===t?t=JSON.parse(t):"string"==typeof t&&(t=t.includes(",")?t.split(",").map((e=>c(e))):c(t)),t))),r;function c(e){return e&&!isNaN(e)&&(e=parseInt(e,10)),e}}(s,a,o);if(i?.Tabs&&!Array.isArray(i?.Tabs)&&e.set(i,"Tabs",i?.Tabs?[i.Tabs.toString()]:[]),i?.Domains&&!Array.isArray(i?.Domains)&&e.set(i,"Domains",i?.Domains?[i.Domains.toString()]:[]),i?.Functions&&!Array.isArray(i?.Functions)&&e.set(i,"Functions",i?.Functions?[i.Functions.toString()]:[]),console.log(`✅ Set Environment Variables, Settings: ${typeof i}, Settings内容: ${JSON.stringify(i)}`,""),r.Storefront=new Map(r.Storefront),r.Locale&&(r.Locale=new Map(r.Locale)),r.i18n)for(let e in r.i18n)r.i18n[e]=new Map(r.i18n[e]);return{Settings:i,Caches:n,Configs:r}}const w=new s(" iRingo: 📍 Location v3.0.6(2) request");let k;const A=a.parse($request.url);w.log(`⚠ URL: ${JSON.stringify(A)}`,"");const O=$request.method,L=A.host,N=A.path;A.paths,w.log(`⚠ METHOD: ${O}`,"");const E=($request.headers?.["Content-Type"]??$request.headers?.["content-type"])?.split(";")?.[0];function $(e,t){return w.log("☑️ Set ETag",`If-None-Match: ${e}`,`ETag: ${t}`,""),e!==t&&(t=e,delete $request?.headers?.["If-None-Match"],delete $request?.headers?.["if-none-match"]),w.log("✅ Set ETag",""),t}w.log(`⚠ FORMAT: ${E}`,""),(async()=>{const{Settings:s,Caches:o,Configs:i}=C("iRingo","Location",T);switch(w.log(`⚠ Settings.Switch: ${s?.Switch}`,""),s.Switch){case!0:default:switch(O){case"POST":case"PUT":case"PATCH":case"DELETE":case"GET":case"HEAD":case"OPTIONS":case void 0:default:switch(L){case"configuration.ls.apple.com":if("config/defaults"===N)e.set(o,"Defaults.ETag",$($request.headers?.["If-None-Match"]??$request?.headers?.["if-none-match"],o?.Defaults?.ETag)),t.setItem("@iRingo.Location.Caches",o);break;case"gspe1-ssl.ls.apple.com":break;case"gsp-ssl.ls.apple.com":case"dispatcher.is.autonavi.com":case"direction2.is.autonavi.com":switch(N){case"dispatcher.arpc":case"dispatcher":switch(s?.Services?.PlaceData){case"AUTO":default:break;case"CN":A.host="dispatcher.is.autonavi.com",A.path="dispatcher";break;case"XX":A.host="gsp-ssl.ls.apple.com",A.path="dispatcher.arpc"}break;case"directions.arpc":case"direction":switch(s?.Services?.Directions){case"AUTO":default:break;case"CN":A.host="direction2.is.autonavi.com",A.path="direction";break;case"XX":A.host="gsp-ssl.ls.apple.com",A.path="directions.arpc"}}break;case"sundew.ls.apple.com":case"rap.is.autonavi.com":switch(N){case"v1/feedback/submission.arpc":case"rap":switch(s?.Services?.RAP){case"AUTO":default:break;case"CN":A.host="rap.is.autonavi.com",A.path="rap";break;case"XX":A.host="sundew.ls.apple.com",A.path="v1/feedback/submission.arpc"}break;case"grp/st":case"rapstatus":switch(s?.Services?.RAP){case"AUTO":default:break;case"CN":A.host="rap.is.autonavi.com",A.path="rapstatus";break;case"XX":A.host="sundew.ls.apple.com",A.path="grp/st"}}break;case"gspe12-ssl.ls.apple.com":case"gspe12-cn-ssl.ls.apple.com":if("traffic"===N)switch(s?.Services?.Traffic){case"AUTO":default:break;case"CN":A.host="gspe12-cn-ssl.ls.apple.com";break;case"XX":A.host="gspe12-ssl.ls.apple.com"}break;case"gspe19-ssl.ls.apple.com":case"gspe19-cn-ssl.ls.apple.com":switch(N){case"tile.vf":case"tiles":switch(s?.Services?.Tiles){case"AUTO":default:break;case"CN":A.host="gspe19-cn-ssl.ls.apple.com",A.path="tiles";break;case"XX":A.host="gspe19-ssl.ls.apple.com",A.path="tile.vf"}}break;case"gspe35-ssl.ls.apple.com":case"gspe35-ssl.ls.apple.cn":switch(N){case"config/announcements":switch(A.query?.os){case"ios":case"ipados":case"macos":default:switch(s?.Config?.Announcements?.Environment?.default){case"AUTO":switch(o?.pep?.gcc){default:A.query.environment="prod";break;case"CN":case void 0:A.query.environment="prod-cn"}break;case"CN":default:A.query.environment="prod-cn";break;case"XX":A.query.environment="prod"}break;case"watchos":switch(s?.Config?.Announcements?.Environment?.watchOS){case"AUTO":switch(o?.pep?.gcc){default:A.query.environment="prod";break;case"CN":case void 0:A.query.environment="prod-cn"}break;case"XX":default:A.query.environment="prod";break;case"CN":A.query.environment="prod-cn"}}e.set(o,"Announcements.ETag",$($request.headers?.["If-None-Match"]??$request.headers?.["if-none-match"],o?.Announcements?.ETag)),t.setItem("@iRingo.Location.Caches",o);break;case"geo_manifest/dynamic/config":switch(A.query?.os){case"ios":case"ipados":case"macos":default:if("AUTO"===s?.Geo_manifest?.Dynamic?.Config?.Country_code?.default)switch(o?.pep?.gcc){default:A.query.country_code=o?.pep?.gcc??"US";break;case"CN":case void 0:A.query.country_code="CN"}else A.query.country_code=s?.Geo_manifest?.Dynamic?.Config?.Country_code?.default??"CN";break;case"watchos":if("AUTO"===s?.Geo_manifest?.Dynamic?.Config?.Country_code?.watchOS)switch(o?.pep?.gcc){default:A.query.country_code=o?.pep?.gcc??"US";break;case"CN":case void 0:A.query.country_code="CN"}else A.query.country_code=s?.Geo_manifest?.Dynamic?.Config?.Country_code?.watchOS??"US"}e.set(o,"Dynamic.ETag",$($request.headers?.["If-None-Match"]??$request?.headers?.["if-none-match"],o?.Dynamic?.ETag)),t.setItem("@iRingo.Location.Caches",o)}}case"CONNECT":case"TRACE":}$request.headers?.Host&&($request.headers.Host=A.host),$request.url=a.stringify(A);case!1:}})().catch((e=>w.logErr(e))).finally((()=>{if(void 0===k)w.done($request);else w.isQuanX()?(k.status||(k.status="HTTP/1.1 200 OK"),delete k.headers?.["Content-Length"],delete k.headers?.["content-length"],delete k.headers?.["Transfer-Encoding"],w.done(k)):w.done({response:k})})); diff --git a/archive/js/Location.response.beta.js b/archive/js/Location.response.beta.js new file mode 100644 index 0000000..d18c37b --- /dev/null +++ b/archive/js/Location.response.beta.js @@ -0,0 +1,2710 @@ +/* README: https://github.com/VirgilClyne/iRingo */ +/* https://www.lodashjs.com */ +class Lodash { + static name = "Lodash"; + static version = "1.2.2"; + static about() { return console.log(`\n🟧 ${this.name} v${this.version}\n`) }; + + static get(object = {}, path = "", defaultValue = undefined) { + // translate array case to dot case, then split with . + // a[0].b -> a.0.b -> ['a', '0', 'b'] + if (!Array.isArray(path)) path = this.toPath(path); + + const result = path.reduce((previousValue, currentValue) => { + return Object(previousValue)[currentValue]; // null undefined get attribute will throwError, Object() can return a object + }, object); + return (result === undefined) ? defaultValue : result; + } + + static set(object = {}, path = "", value) { + if (!Array.isArray(path)) path = this.toPath(path); + path + .slice(0, -1) + .reduce( + (previousValue, currentValue, currentIndex) => + (Object(previousValue[currentValue]) === previousValue[currentValue]) + ? previousValue[currentValue] + : previousValue[currentValue] = (/^\d+$/.test(path[currentIndex + 1]) ? [] : {}), + object + )[path[path.length - 1]] = value; + return object + } + + static unset(object = {}, path = "") { + if (!Array.isArray(path)) path = this.toPath(path); + let result = path.reduce((previousValue, currentValue, currentIndex) => { + if (currentIndex === path.length - 1) { + delete previousValue[currentValue]; + return true + } + return Object(previousValue)[currentValue] + }, object); + return result + } + + static toPath(value) { + return value.replace(/\[(\d+)\]/g, '.$1').split('.').filter(Boolean); + } + + static escape(string) { + const map = { + '&': '&', + '<': '<', + '>': '>', + '"': '"', + "'": ''', + }; + return string.replace(/[&<>"']/g, m => map[m]) + }; + + static unescape(string) { + const map = { + '&': '&', + '<': '<', + '>': '>', + '"': '"', + ''': "'", + }; + return string.replace(/&|<|>|"|'/g, m => map[m]) + } + +} + +/* https://developer.mozilla.org/zh-CN/docs/Web/API/Storage/setItem */ +class $Storage { + static name = "$Storage"; + static version = "1.0.9"; + static about() { return console.log(`\n🟧 ${this.name} v${this.version}\n`) }; + static data = null + static dataFile = 'box.dat' + static #nameRegex = /^@(?[^.]+)(?:\.(?.*))?$/; + + static #platform() { + if ('undefined' !== typeof $environment && $environment['surge-version']) + return 'Surge' + if ('undefined' !== typeof $environment && $environment['stash-version']) + return 'Stash' + if ('undefined' !== typeof module && !!module.exports) return 'Node.js' + if ('undefined' !== typeof $task) return 'Quantumult X' + if ('undefined' !== typeof $loon) return 'Loon' + if ('undefined' !== typeof $rocket) return 'Shadowrocket' + if ('undefined' !== typeof Egern) return 'Egern' + } + + static getItem(keyName = new String, defaultValue = null) { + let keyValue = defaultValue; + // 如果以 @ + switch (keyName.startsWith('@')) { + case true: + const { key, path } = keyName.match(this.#nameRegex)?.groups; + //console.log(`1: ${key}, ${path}`); + keyName = key; + let value = this.getItem(keyName, {}); + //console.log(`2: ${JSON.stringify(value)}`) + if (typeof value !== "object") value = {}; + //console.log(`3: ${JSON.stringify(value)}`) + keyValue = Lodash.get(value, path); + //console.log(`4: ${JSON.stringify(keyValue)}`) + try { + keyValue = JSON.parse(keyValue); + } catch (e) { + // do nothing + } //console.log(`5: ${JSON.stringify(keyValue)}`) + break; + default: + switch (this.#platform()) { + case 'Surge': + case 'Loon': + case 'Stash': + case 'Egern': + case 'Shadowrocket': + keyValue = $persistentStore.read(keyName); + break; + case 'Quantumult X': + keyValue = $prefs.valueForKey(keyName); + break; + case 'Node.js': + this.data = this.#loaddata(this.dataFile); + keyValue = this.data?.[keyName]; + break; + default: + keyValue = this.data?.[keyName] || null; + break; + } try { + keyValue = JSON.parse(keyValue); + } catch (e) { + // do nothing + } break; + } return keyValue ?? defaultValue; + }; + + static setItem(keyName = new String, keyValue = new String) { + let result = false; + //console.log(`0: ${typeof keyValue}`); + switch (typeof keyValue) { + case "object": + keyValue = JSON.stringify(keyValue); + break; + default: + keyValue = String(keyValue); + break; + } switch (keyName.startsWith('@')) { + case true: + const { key, path } = keyName.match(this.#nameRegex)?.groups; + //console.log(`1: ${key}, ${path}`); + keyName = key; + let value = this.getItem(keyName, {}); + //console.log(`2: ${JSON.stringify(value)}`) + if (typeof value !== "object") value = {}; + //console.log(`3: ${JSON.stringify(value)}`) + Lodash.set(value, path, keyValue); + //console.log(`4: ${JSON.stringify(value)}`) + result = this.setItem(keyName, value); + //console.log(`5: ${result}`) + break; + default: + switch (this.#platform()) { + case 'Surge': + case 'Loon': + case 'Stash': + case 'Egern': + case 'Shadowrocket': + result = $persistentStore.write(keyValue, keyName); + break; + case 'Quantumult X': + result =$prefs.setValueForKey(keyValue, keyName); + break; + case 'Node.js': + this.data = this.#loaddata(this.dataFile); + this.data[keyName] = keyValue; + this.#writedata(this.dataFile); + result = true; + break; + default: + result = this.data?.[keyName] || null; + break; + } break; + } return result; + }; + + static removeItem(keyName){ + let result = false; + switch (keyName.startsWith('@')) { + case true: + const { key, path } = keyName.match(this.#nameRegex)?.groups; + keyName = key; + let value = this.getItem(keyName); + if (typeof value !== "object") value = {}; + keyValue = Lodash.unset(value, path); + result = this.setItem(keyName, value); + break; + default: + switch (this.#platform()) { + case 'Surge': + case 'Loon': + case 'Stash': + case 'Egern': + case 'Shadowrocket': + result = false; + break; + case 'Quantumult X': + result = $prefs.removeValueForKey(keyName); + break; + case 'Node.js': + result = false; + break; + default: + result = false; + break; + } break; + } return result; + } + + static clear() { + let result = false; + switch (this.#platform()) { + case 'Surge': + case 'Loon': + case 'Stash': + case 'Egern': + case 'Shadowrocket': + result = false; + break; + case 'Quantumult X': + result = $prefs.removeAllValues(); + break; + case 'Node.js': + result = false; + break; + default: + result = false; + break; + } return result; + } + + static #loaddata(dataFile) { + if (this.isNode()) { + this.fs = this.fs ? this.fs : require('fs'); + this.path = this.path ? this.path : require('path'); + const curDirDataFilePath = this.path.resolve(dataFile); + const rootDirDataFilePath = this.path.resolve( + process.cwd(), + dataFile + ); + const isCurDirDataFile = this.fs.existsSync(curDirDataFilePath); + const isRootDirDataFile = + !isCurDirDataFile && this.fs.existsSync(rootDirDataFilePath); + if (isCurDirDataFile || isRootDirDataFile) { + const datPath = isCurDirDataFile + ? curDirDataFilePath + : rootDirDataFilePath; + try { + return JSON.parse(this.fs.readFileSync(datPath)) + } catch (e) { + return {} + } + } else return {} + } else return {} + } + + static #writedata(dataFile = this.dataFile) { + if (this.isNode()) { + this.fs = this.fs ? this.fs : require('fs'); + this.path = this.path ? this.path : require('path'); + const curDirDataFilePath = this.path.resolve(dataFile); + const rootDirDataFilePath = this.path.resolve( + process.cwd(), + dataFile + ); + const isCurDirDataFile = this.fs.existsSync(curDirDataFilePath); + const isRootDirDataFile = + !isCurDirDataFile && this.fs.existsSync(rootDirDataFilePath); + const jsondata = JSON.stringify(this.data); + if (isCurDirDataFile) { + this.fs.writeFileSync(curDirDataFilePath, jsondata); + } else if (isRootDirDataFile) { + this.fs.writeFileSync(rootDirDataFilePath, jsondata); + } else { + this.fs.writeFileSync(curDirDataFilePath, jsondata); + } + } + }; + +} + +class ENV { + static name = "ENV" + static version = '1.7.4' + static about() { return console.log(`\n🟧 ${this.name} v${this.version}\n`) } + + constructor(name, opts) { + console.log(`\n🟧 ${ENV.name} v${ENV.version}\n`); + this.name = name; + this.logs = []; + this.isMute = false; + this.isMuteLog = false; + this.logSeparator = '\n'; + this.encoding = 'utf-8'; + this.startTime = new Date().getTime(); + Object.assign(this, opts); + this.log(`\n🚩 开始!\n${name}\n`); + } + + platform() { + if ('undefined' !== typeof $environment && $environment['surge-version']) + return 'Surge' + if ('undefined' !== typeof $environment && $environment['stash-version']) + return 'Stash' + if ('undefined' !== typeof module && !!module.exports) return 'Node.js' + if ('undefined' !== typeof $task) return 'Quantumult X' + if ('undefined' !== typeof $loon) return 'Loon' + if ('undefined' !== typeof $rocket) return 'Shadowrocket' + if ('undefined' !== typeof Egern) return 'Egern' + } + + isNode() { + return 'Node.js' === this.platform() + } + + isQuanX() { + return 'Quantumult X' === this.platform() + } + + isSurge() { + return 'Surge' === this.platform() + } + + isLoon() { + return 'Loon' === this.platform() + } + + isShadowrocket() { + return 'Shadowrocket' === this.platform() + } + + isStash() { + return 'Stash' === this.platform() + } + + isEgern() { + return 'Egern' === this.platform() + } + + async getScript(url) { + return await this.fetch(url).then(response => response.body); + } + + async runScript(script, runOpts) { + let httpapi = $Storage.getItem('@chavy_boxjs_userCfgs.httpapi'); + httpapi = httpapi?.replace?.(/\n/g, '')?.trim(); + let httpapi_timeout = $Storage.getItem('@chavy_boxjs_userCfgs.httpapi_timeout'); + httpapi_timeout = (httpapi_timeout * 1) ?? 20; + httpapi_timeout = runOpts?.timeout ?? httpapi_timeout; + const [password, address] = httpapi.split('@'); + const request = { + url: `http://${address}/v1/scripting/evaluate`, + body: { + script_text: script, + mock_type: 'cron', + timeout: httpapi_timeout + }, + headers: { 'X-Key': password, 'Accept': '*/*' }, + timeout: httpapi_timeout + }; + await this.fetch(request).then(response => response.body, error => this.logErr(error)); + } + + initGotEnv(opts) { + this.got = this.got ? this.got : require('got'); + this.cktough = this.cktough ? this.cktough : require('tough-cookie'); + this.ckjar = this.ckjar ? this.ckjar : new this.cktough.CookieJar(); + if (opts) { + opts.headers = opts.headers ? opts.headers : {}; + if (undefined === opts.headers.Cookie && undefined === opts.cookieJar) { + opts.cookieJar = this.ckjar; + } + } + } + + async fetch(request = {} || "", option = {}) { + // 初始化参数 + switch (request.constructor) { + case Object: + request = { ...request, ...option }; + break; + case String: + request = { "url": request, ...option }; + break; + } // 自动判断请求方法 + if (!request.method) { + request.method = "GET"; + if (request.body ?? request.bodyBytes) request.method = "POST"; + } // 移除请求头中的部分参数, 让其自动生成 + delete request.headers?.Host; + delete request.headers?.[":authority"]; + delete request.headers?.['Content-Length']; + delete request.headers?.['content-length']; + // 定义请求方法(小写) + const method = request.method.toLocaleLowerCase(); + // 判断平台 + switch (this.platform()) { + case 'Loon': + case 'Surge': + case 'Stash': + case 'Egern': + case 'Shadowrocket': + default: + // 转换请求参数 + if (request.policy) { + if (this.isLoon()) request.node = request.policy; + if (this.isStash()) Lodash.set(request, "headers.X-Stash-Selected-Proxy", encodeURI(request.policy)); + } if (typeof request.redirection === "boolean") request["auto-redirect"] = request.redirection; + // 转换请求体 + if (request.bodyBytes && !request.body) { + request.body = request.bodyBytes; + delete request.bodyBytes; + } // 发送请求 + return await new Promise((resolve, reject) => { + $httpClient[method](request, (error, response, body) => { + if (error) reject(error); + else { + response.ok = /^2\d\d$/.test(response.status); + response.statusCode = response.status; + if (body) { + response.body = body; + if (request["binary-mode"] == true) response.bodyBytes = body; + } resolve(response); + } + }); + }); + case 'Quantumult X': + // 转换请求参数 + if (request.policy) Lodash.set(request, "opts.policy", request.policy); + if (typeof request["auto-redirect"] === "boolean") Lodash.set(request, "opts.redirection", request["auto-redirect"]); + // 转换请求体 + if (request.body instanceof ArrayBuffer) { + request.bodyBytes = request.body; + delete request.body; + } else if (ArrayBuffer.isView(request.body)) { + request.bodyBytes = request.body.buffer.slice(request.body.byteOffset, request.body.byteLength + request.body.byteOffset); + delete object.body; + } else if (request.body) delete request.bodyBytes; + // 发送请求 + return await $task.fetch(request).then( + response => { + response.ok = /^2\d\d$/.test(response.statusCode); + response.status = response.statusCode; + return response; + }, + reason => Promise.reject(reason.error)); + case 'Node.js': + let iconv = require('iconv-lite'); + this.initGotEnv(request); + const { url, ...option } = request; + return await this.got[method](url, option) + .on('redirect', (response, nextOpts) => { + try { + if (response.headers['set-cookie']) { + const ck = response.headers['set-cookie'] + .map(this.cktough.Cookie.parse) + .toString(); + if (ck) { + this.ckjar.setCookieSync(ck, null); + } + nextOpts.cookieJar = this.ckjar; + } + } catch (e) { + this.logErr(e); + } + // this.ckjar.setCookieSync(response.headers['set-cookie'].map(Cookie.parse).toString()) + }) + .then( + response => { + response.statusCode = response.status; + response.body = iconv.decode(response.rawBody, this.encoding); + response.bodyBytes = response.rawBody; + return response; + }, + error => Promise.reject(error.message)); + } }; + + /** + * + * 示例:$.time('yyyy-MM-dd qq HH:mm:ss.S') + * :$.time('yyyyMMddHHmmssS') + * y:年 M:月 d:日 q:季 H:时 m:分 s:秒 S:毫秒 + * 其中y可选0-4位占位符、S可选0-1位占位符,其余可选0-2位占位符 + * @param {string} format 格式化参数 + * @param {number} ts 可选: 根据指定时间戳返回格式化日期 + * + */ + time(format, ts = null) { + const date = ts ? new Date(ts) : new Date(); + let o = { + 'M+': date.getMonth() + 1, + 'd+': date.getDate(), + 'H+': date.getHours(), + 'm+': date.getMinutes(), + 's+': date.getSeconds(), + 'q+': Math.floor((date.getMonth() + 3) / 3), + 'S': date.getMilliseconds() + }; + if (/(y+)/.test(format)) + format = format.replace( + RegExp.$1, + (date.getFullYear() + '').substr(4 - RegExp.$1.length) + ); + for (let k in o) + if (new RegExp('(' + k + ')').test(format)) + format = format.replace( + RegExp.$1, + RegExp.$1.length == 1 + ? o[k] + : ('00' + o[k]).substr(('' + o[k]).length) + ); + return format + } + + /** + * 系统通知 + * + * > 通知参数: 同时支持 QuanX 和 Loon 两种格式, EnvJs根据运行环境自动转换, Surge 环境不支持多媒体通知 + * + * 示例: + * $.msg(title, subt, desc, 'twitter://') + * $.msg(title, subt, desc, { 'open-url': 'twitter://', 'media-url': 'https://github.githubassets.com/images/modules/open_graph/github-mark.png' }) + * $.msg(title, subt, desc, { 'open-url': 'https://bing.com', 'media-url': 'https://github.githubassets.com/images/modules/open_graph/github-mark.png' }) + * + * @param {*} title 标题 + * @param {*} subt 副标题 + * @param {*} desc 通知详情 + * @param {*} opts 通知参数 + * + */ + msg(title = name, subt = '', desc = '', opts) { + const toEnvOpts = (rawopts) => { + switch (typeof rawopts) { + case undefined: + return rawopts + case 'string': + switch (this.platform()) { + case 'Surge': + case 'Stash': + case 'Egern': + default: + return { url: rawopts } + case 'Loon': + case 'Shadowrocket': + return rawopts + case 'Quantumult X': + return { 'open-url': rawopts } + case 'Node.js': + return undefined + } + case 'object': + switch (this.platform()) { + case 'Surge': + case 'Stash': + case 'Egern': + case 'Shadowrocket': + default: { + let openUrl = + rawopts.url || rawopts.openUrl || rawopts['open-url']; + return { url: openUrl } + } + case 'Loon': { + let openUrl = + rawopts.openUrl || rawopts.url || rawopts['open-url']; + let mediaUrl = rawopts.mediaUrl || rawopts['media-url']; + return { openUrl, mediaUrl } + } + case 'Quantumult X': { + let openUrl = + rawopts['open-url'] || rawopts.url || rawopts.openUrl; + let mediaUrl = rawopts['media-url'] || rawopts.mediaUrl; + let updatePasteboard = + rawopts['update-pasteboard'] || rawopts.updatePasteboard; + return { + 'open-url': openUrl, + 'media-url': mediaUrl, + 'update-pasteboard': updatePasteboard + } + } + case 'Node.js': + return undefined + } + default: + return undefined + } + }; + if (!this.isMute) { + switch (this.platform()) { + case 'Surge': + case 'Loon': + case 'Stash': + case 'Egern': + case 'Shadowrocket': + default: + $notification.post(title, subt, desc, toEnvOpts(opts)); + break + case 'Quantumult X': + $notify(title, subt, desc, toEnvOpts(opts)); + break + case 'Node.js': + break + } + } + if (!this.isMuteLog) { + let logs = ['', '==============📣系统通知📣==============']; + logs.push(title); + subt ? logs.push(subt) : ''; + desc ? logs.push(desc) : ''; + console.log(logs.join('\n')); + this.logs = this.logs.concat(logs); + } + } + + log(...logs) { + if (logs.length > 0) { + this.logs = [...this.logs, ...logs]; + } + console.log(logs.join(this.logSeparator)); + } + + logErr(error) { + switch (this.platform()) { + case 'Surge': + case 'Loon': + case 'Stash': + case 'Egern': + case 'Shadowrocket': + case 'Quantumult X': + default: + this.log('', `❗️ ${this.name}, 错误!`, error); + break + case 'Node.js': + this.log('', `❗️${this.name}, 错误!`, error.stack); + break + } + } + + wait(time) { + return new Promise((resolve) => setTimeout(resolve, time)) + } + + done(object = {}) { + const endTime = new Date().getTime(); + const costTime = (endTime - this.startTime) / 1000; + this.log("", `🚩 ${this.name}, 结束! 🕛 ${costTime} 秒`, ""); + switch (this.platform()) { + case 'Surge': + if (object.policy) Lodash.set(object, "headers.X-Surge-Policy", object.policy); + $done(object); + break; + case 'Loon': + if (object.policy) object.node = object.policy; + $done(object); + break; + case 'Stash': + if (object.policy) Lodash.set(object, "headers.X-Stash-Selected-Proxy", encodeURI(object.policy)); + $done(object); + break; + case 'Egern': + $done(object); + break; + case 'Shadowrocket': + default: + $done(object); + break; + case 'Quantumult X': + if (object.policy) Lodash.set(object, "opts.policy", object.policy); + // 移除不可写字段 + delete object["auto-redirect"]; + delete object["auto-cookie"]; + delete object["binary-mode"]; + delete object.charset; + delete object.host; + delete object.insecure; + delete object.method; // 1.4.x 不可写 + delete object.opt; // $task.fetch() 参数, 不可写 + delete object.path; // 可写, 但会与 url 冲突 + delete object.policy; + delete object["policy-descriptor"]; + delete object.scheme; + delete object.sessionIndex; + delete object.statusCode; + delete object.timeout; + if (object.body instanceof ArrayBuffer) { + object.bodyBytes = object.body; + delete object.body; + } else if (ArrayBuffer.isView(object.body)) { + object.bodyBytes = object.body.buffer.slice(object.body.byteOffset, object.body.byteLength + object.body.byteOffset); + delete object.body; + } else if (object.body) delete object.bodyBytes; + $done(object); + break; + case 'Node.js': + process.exit(1); + break; + } + } +} + +class URI { + static name = "URI"; + static version = "1.2.7"; + static about() { return console.log(`\n🟧 ${this.name} v${this.version}\n`) }; + static #json = { scheme: "", host: "", path: "", query: {} }; + + static parse(url) { + const URLRegex = /(?:(?.+):\/\/(?[^/]+))?\/?(?[^?]+)?\??(?[^?]+)?/; + let json = url.match(URLRegex)?.groups ?? null; + if (json?.path) json.paths = json.path.split("/"); else json.path = ""; + //if (json?.paths?.at(-1)?.includes(".")) json.format = json.paths.at(-1).split(".").at(-1); + if (json?.paths) { + const fileName = json.paths[json.paths.length - 1]; + if (fileName?.includes(".")) { + const list = fileName.split("."); + json.format = list[list.length - 1]; + } + } + if (json?.query) json.query = Object.fromEntries(json.query.split("&").map((param) => param.split("="))); + return json + }; + + static stringify(json = this.#json) { + let url = ""; + if (json?.scheme && json?.host) url += json.scheme + "://" + json.host; + if (json?.path) url += (json?.host) ? "/" + json.path : json.path; + if (json?.query) url += "?" + Object.entries(json.query).map(param => param.join("=")).join("&"); + return url + }; +} + +// refer: https://github.com/Peng-YM/QuanX/blob/master/Tools/XMLParser/xml-parser.js +// refer: https://goessner.net/download/prj/jsonxml/ +class XML { + static name = "XML"; + static version = "0.4.1"; + static about = () => console.log(`\n🟧 ${this.name} v${this.version}\n`); + + static #ATTRIBUTE_KEY = "@"; + static #CHILD_NODE_KEY = "#"; + static #UNESCAPE = { + "&": "&", + "<": "<", + ">": ">", + "'": "'", + """: '"' + }; + static #ESCAPE = { + "&": "&", + "<": "<", + ">": ">", + "'": "'", + '"': """ + }; + + static parse(xml = new String, reviver = "") { + const UNESCAPE = this.#UNESCAPE; + const ATTRIBUTE_KEY = this.#ATTRIBUTE_KEY; + const CHILD_NODE_KEY = this.#CHILD_NODE_KEY; + const DOM = toDOM(xml); + let json = fromXML(DOM, reviver); + return json; + + /***************** Fuctions *****************/ + function toDOM(text) { + const list = text.replace(/^[ \t]+/gm, "") + .split(/<([^!<>?](?:'[\S\s]*?'|"[\S\s]*?"|[^'"<>])*|!(?:--[\S\s]*?--|\[[^\[\]'"<>]+\[[\S\s]*?]]|DOCTYPE[^\[<>]*?\[[\S\s]*?]|(?:ENTITY[^"<>]*?"[\S\s]*?")?[\S\s]*?)|\?[\S\s]*?\?)>/); + const length = list.length; + + // root element + const root = { children: [] }; + let elem = root; + + // dom tree stack + const stack = []; + + // parse + for (let i = 0; i < length;) { + // text node + const str = list[i++]; + if (str) appendText(str); + + // child node + const tag = list[i++]; + if (tag) parseNode(tag); + } + return root; + /***************** Fuctions *****************/ + function parseNode(tag) { + const tags = tag.split(" "); + const name = tags.shift(); + const length = tags.length; + let child = {}; + switch (name[0]) { + case "/": + // close tag + const closed = tag.replace(/^\/|[\s\/].*$/g, "").toLowerCase(); + while (stack.length) { + const tagName = elem?.name?.toLowerCase?.(); + elem = stack.pop(); + if (tagName === closed) break; + } + break; + case "?": + // XML declaration + child.name = name; + child.raw = tags.join(" "); + appendChild(child); + break; + case "!": + if (/!\[CDATA\[(.+)\]\]/.test(tag)) { + // CDATA section + child.name = "!CDATA"; + //child.raw = tag.slice(9, -2); + child.raw = tag.match(/!\[CDATA\[(.+)\]\]/); + //appendText(tag.slice(9, -2)); + } else { + // Comment section + child.name = name; + child.raw = tags.join(" "); + } appendChild(child); + break; + default: + child = openTag(tag); + appendChild(child); + switch ((tags?.[length - 1] ?? name).slice(-1)) { + case "/": + //child.hasChild = false; // emptyTag + delete child.children; // emptyTag + break; + default: + switch (name) { + case "link": + //child.hasChild = false; // emptyTag + delete child.children; // emptyTag + break; + default: + stack.push(elem); // openTag + elem = child; + break; + } break; + } break; + } + function openTag(tag) { + const elem = { children: [] }; + tag = tag.replace(/\s*\/?$/, ""); + const pos = tag.search(/[\s='"\/]/); + if (pos < 0) { + elem.name = tag; + } else { + elem.name = tag.substr(0, pos); + elem.tag = tag.substr(pos); + } + return elem; + } } + function appendText(str) { + //str = removeSpaces(str); + str = removeBreakLine(str); + //str = str?.trim?.(); + if (str) appendChild(unescapeXML(str)); + + function removeBreakLine(str) { + return str?.replace?.(/^(\r\n|\r|\n|\t)+|(\r\n|\r|\n|\t)+$/g, ""); + } + } + + function appendChild(child) { + elem.children.push(child); + } + } /***************** Fuctions *****************/ + function fromPlist(elem, reviver) { + let object; + switch (typeof elem) { + case "string": + case "undefined": + object = elem; + break; + case "object": + //default: + const name = elem.name; + const children = elem.children; + + object = {}; + + switch (name) { + case "plist": + let plist = fromPlist(children[0], reviver); + object = Object.assign(object, plist); + break; + case "dict": + let dict = children.map(child => fromPlist(child, reviver)); + dict = chunk(dict, 2); + object = Object.fromEntries(dict); + break; + case "array": + if (!Array.isArray(object)) object = []; + object = children.map(child => fromPlist(child, reviver)); + break; + case "key": + const key = children[0]; + object = key; + break; + case "true": + case "false": + const boolean = name; + object = JSON.parse(boolean); + break; + case "integer": + const integer = children[0]; + //object = parseInt(integer); + object = BigInt(integer); + break; + case "real": + const real = children[0]; + //const digits = real.split(".")[1]?.length || 0; + object = parseFloat(real);//.toFixed(digits); + break; + case "string": + const string = children[0]; + object = string; + break; + } if (reviver) object = reviver(name || "", object); + break; + } + return object; + + /** + * Chunk Array + * @author VirgilClyne + * @param {Array} source - source + * @param {Number} length - number + * @return {Array<*>} target + */ + function chunk(source, length) { + var index = 0, target = []; + while (index < source.length) target.push(source.slice(index, index += length)); + return target; + } } + + function fromXML(elem, reviver) { + let object; + switch (typeof elem) { + case "string": + case "undefined": + object = elem; + break; + case "object": + //default: + const raw = elem.raw; + const name = elem.name; + const tag = elem.tag; + const children = elem.children; + + if (raw) object = raw; + else if (tag) object = parseAttribute(tag, reviver); + else if (!children) object = { [name]: undefined }; + else object = {}; + + if (name === "plist") object = Object.assign(object, fromPlist(children[0], reviver)); + else children?.forEach?.((child, i) => { + if (typeof child === "string") addObject(object, CHILD_NODE_KEY, fromXML(child, reviver), undefined); + else if (!child.tag && !child.children && !child.raw) addObject(object, child.name, fromXML(child, reviver), children?.[i - 1]?.name); + else addObject(object, child.name, fromXML(child, reviver), undefined); + }); + if (children && children.length === 0) addObject(object, CHILD_NODE_KEY, null, undefined); + /* + if (Object.keys(object).length === 0) { + if (elem.name) object[elem.name] = (elem.hasChild === false) ? null : ""; + else object = (elem.hasChild === false) ? null : ""; + } + */ + + //if (Object.keys(object).length === 0) addObject(object, elem.name, (elem.hasChild === false) ? null : ""); + //if (Object.keys(object).length === 0) object = (elem.hasChild === false) ? undefined : ""; + if (reviver) object = reviver(name || "", object); + break; + } + return object; + /***************** Fuctions *****************/ + function parseAttribute(tag, reviver) { + if (!tag) return; + const list = tag.split(/([^\s='"]+(?:\s*=\s*(?:'[\S\s]*?'|"[\S\s]*?"|[^\s'"]*))?)/); + const length = list.length; + let attributes, val; + + for (let i = 0; i < length; i++) { + let str = removeSpaces(list[i]); + //let str = removeBreakLine(list[i]); + //let str = list[i]?.trim?.(); + if (!str) continue; + + if (!attributes) { + attributes = {}; + } + + const pos = str.indexOf("="); + if (pos < 0) { + // bare attribute + str = ATTRIBUTE_KEY + str; + val = null; + } else { + // attribute key/value pair + val = str.substr(pos + 1).replace(/^\s+/, ""); + str = ATTRIBUTE_KEY + str.substr(0, pos).replace(/\s+$/, ""); + + // quote: foo="FOO" bar='BAR' + const firstChar = val[0]; + const lastChar = val[val.length - 1]; + if (firstChar === lastChar && (firstChar === "'" || firstChar === '"')) { + val = val.substr(1, val.length - 2); + } + + val = unescapeXML(val); + } + if (reviver) val = reviver(str, val); + + addObject(attributes, str, val); + } + + return attributes; + + function removeSpaces(str) { + //return str && str.replace(/^\s+|\s+$/g, ""); + return str?.trim?.(); + } + } + + function addObject(object, key, val, prevKey = key) { + if (typeof val === "undefined") return; + else { + const prev = object[prevKey]; + //const curr = object[key]; + if (Array.isArray(prev)) prev.push(val); + else if (prev) object[prevKey] = [prev, val]; + else object[key] = val; + } + } + } + + function unescapeXML(str) { + return str.replace(/(&(?:lt|gt|amp|apos|quot|#(?:\d{1,6}|x[0-9a-fA-F]{1,5}));)/g, function (str) { + if (str[1] === "#") { + const code = (str[2] === "x") ? parseInt(str.substr(3), 16) : parseInt(str.substr(2), 10); + if (code > -1) return String.fromCharCode(code); + } + return UNESCAPE[str] || str; + }); + } + + }; + + static stringify(json = new Object, tab = "") { + this.#ESCAPE; + const ATTRIBUTE_KEY = this.#ATTRIBUTE_KEY; + const CHILD_NODE_KEY = this.#CHILD_NODE_KEY; + let XML = ""; + for (let elem in json) XML += toXml(json[elem], elem, ""); + XML = tab ? XML.replace(/\t/g, tab) : XML.replace(/\t|\n/g, ""); + return XML; + /***************** Fuctions *****************/ + function toXml(Elem, Name, Ind) { + let xml = ""; + switch (typeof Elem) { + case "object": + if (Array.isArray(Elem)) { + xml = Elem.reduce( + (prevXML, currXML) => prevXML += `${Ind}${toXml(currXML, Name, `${Ind}\t`)}\n`, + "" + ); + } else { + let attribute = ""; + let hasChild = false; + for (let name in Elem) { + if (name[0] === ATTRIBUTE_KEY) { + attribute += ` ${name.substring(1)}=\"${Elem[name].toString()}\"`; + delete Elem[name]; + } else if (Elem[name] === undefined) Name = name; + else hasChild = true; + } + xml += `${Ind}<${Name}${attribute}${(hasChild || Name === "link") ? "" : "/"}>`; + + if (hasChild) { + if (Name === "plist") xml += toPlist(Elem, Name, `${Ind}\t`); + else { + for (let name in Elem) { + switch (name) { + case CHILD_NODE_KEY: + xml += Elem[name] ?? ""; + break; + default: + xml += toXml(Elem[name], name, `${Ind}\t`); + break; + } } } xml += (xml.slice(-1) === "\n" ? Ind : "") + ``; + } } break; + case "string": + switch (Name) { + case "?xml": + xml += `${Ind}<${Name} ${Elem.toString()}>`; + break; + case "?": + xml += `${Ind}<${Name}${Elem.toString()}${Name}>`; + break; + case "!": + xml += `${Ind}`; + break; + case "!DOCTYPE": + xml += `${Ind}<${Name} ${Elem.toString()}>`; + break; + case "!CDATA": + xml += `${Ind}`; + break; + case CHILD_NODE_KEY: + xml += Elem; + break; + default: + xml += `${Ind}<${Name}>${Elem.toString()}`; + break; + } break; + case "undefined": + xml += Ind + `<${Name.toString()}/>`; + break; + } return xml; + } + function toPlist(Elem, Name, Ind) { + let plist = ""; + switch (typeof Elem) { + case "boolean": + plist = `${Ind}<${Elem.toString()}/>`; + break; + case "number": + plist = `${Ind}${Elem.toString()}`; + break; + case "bigint": + plist = `${Ind}${Elem.toString()}`; + break; + case "string": + plist = `${Ind}${Elem.toString()}`; + break; + case "object": + let array = ""; + if (Array.isArray(Elem)) { + for (var i = 0, n = Elem.length; i < n; i++) array += `${Ind}${toPlist(Elem[i], Name, `${Ind}\t`)}`; + plist = `${Ind}${array}${Ind}`; + } else { + let dict = ""; + Object.entries(Elem).forEach(([key, value]) => { + dict += `${Ind}${key}`; + dict += toPlist(value, key, Ind); + }); + plist = `${Ind}${dict}${Ind}`; + } break; + } + return plist; + } }; +} + +var Settings$7 = { + Switch: true +}; +var Configs$2 = { + Storefront: [ + [ + "AE", + "143481" + ], + [ + "AF", + "143610" + ], + [ + "AG", + "143540" + ], + [ + "AI", + "143538" + ], + [ + "AL", + "143575" + ], + [ + "AM", + "143524" + ], + [ + "AO", + "143564" + ], + [ + "AR", + "143505" + ], + [ + "AT", + "143445" + ], + [ + "AU", + "143460" + ], + [ + "AZ", + "143568" + ], + [ + "BA", + "143612" + ], + [ + "BB", + "143541" + ], + [ + "BD", + "143490" + ], + [ + "BE", + "143446" + ], + [ + "BF", + "143578" + ], + [ + "BG", + "143526" + ], + [ + "BH", + "143559" + ], + [ + "BJ", + "143576" + ], + [ + "BM", + "143542" + ], + [ + "BN", + "143560" + ], + [ + "BO", + "143556" + ], + [ + "BR", + "143503" + ], + [ + "BS", + "143539" + ], + [ + "BT", + "143577" + ], + [ + "BW", + "143525" + ], + [ + "BY", + "143565" + ], + [ + "BZ", + "143555" + ], + [ + "CA", + "143455" + ], + [ + "CD", + "143613" + ], + [ + "CG", + "143582" + ], + [ + "CH", + "143459" + ], + [ + "CI", + "143527" + ], + [ + "CL", + "143483" + ], + [ + "CM", + "143574" + ], + [ + "CN", + "143465" + ], + [ + "CO", + "143501" + ], + [ + "CR", + "143495" + ], + [ + "CV", + "143580" + ], + [ + "CY", + "143557" + ], + [ + "CZ", + "143489" + ], + [ + "DE", + "143443" + ], + [ + "DK", + "143458" + ], + [ + "DM", + "143545" + ], + [ + "DO", + "143508" + ], + [ + "DZ", + "143563" + ], + [ + "EC", + "143509" + ], + [ + "EE", + "143518" + ], + [ + "EG", + "143516" + ], + [ + "ES", + "143454" + ], + [ + "FI", + "143447" + ], + [ + "FJ", + "143583" + ], + [ + "FM", + "143591" + ], + [ + "FR", + "143442" + ], + [ + "GA", + "143614" + ], + [ + "GB", + "143444" + ], + [ + "GD", + "143546" + ], + [ + "GF", + "143615" + ], + [ + "GH", + "143573" + ], + [ + "GM", + "143584" + ], + [ + "GR", + "143448" + ], + [ + "GT", + "143504" + ], + [ + "GW", + "143585" + ], + [ + "GY", + "143553" + ], + [ + "HK", + "143463" + ], + [ + "HN", + "143510" + ], + [ + "HR", + "143494" + ], + [ + "HU", + "143482" + ], + [ + "ID", + "143476" + ], + [ + "IE", + "143449" + ], + [ + "IL", + "143491" + ], + [ + "IN", + "143467" + ], + [ + "IQ", + "143617" + ], + [ + "IS", + "143558" + ], + [ + "IT", + "143450" + ], + [ + "JM", + "143511" + ], + [ + "JO", + "143528" + ], + [ + "JP", + "143462" + ], + [ + "KE", + "143529" + ], + [ + "KG", + "143586" + ], + [ + "KH", + "143579" + ], + [ + "KN", + "143548" + ], + [ + "KP", + "143466" + ], + [ + "KR", + "143466" + ], + [ + "KW", + "143493" + ], + [ + "KY", + "143544" + ], + [ + "KZ", + "143517" + ], + [ + "TC", + "143552" + ], + [ + "TD", + "143581" + ], + [ + "TJ", + "143603" + ], + [ + "TH", + "143475" + ], + [ + "TM", + "143604" + ], + [ + "TN", + "143536" + ], + [ + "TO", + "143608" + ], + [ + "TR", + "143480" + ], + [ + "TT", + "143551" + ], + [ + "TW", + "143470" + ], + [ + "TZ", + "143572" + ], + [ + "LA", + "143587" + ], + [ + "LB", + "143497" + ], + [ + "LC", + "143549" + ], + [ + "LI", + "143522" + ], + [ + "LK", + "143486" + ], + [ + "LR", + "143588" + ], + [ + "LT", + "143520" + ], + [ + "LU", + "143451" + ], + [ + "LV", + "143519" + ], + [ + "LY", + "143567" + ], + [ + "MA", + "143620" + ], + [ + "MD", + "143523" + ], + [ + "ME", + "143619" + ], + [ + "MG", + "143531" + ], + [ + "MK", + "143530" + ], + [ + "ML", + "143532" + ], + [ + "MM", + "143570" + ], + [ + "MN", + "143592" + ], + [ + "MO", + "143515" + ], + [ + "MR", + "143590" + ], + [ + "MS", + "143547" + ], + [ + "MT", + "143521" + ], + [ + "MU", + "143533" + ], + [ + "MV", + "143488" + ], + [ + "MW", + "143589" + ], + [ + "MX", + "143468" + ], + [ + "MY", + "143473" + ], + [ + "MZ", + "143593" + ], + [ + "NA", + "143594" + ], + [ + "NE", + "143534" + ], + [ + "NG", + "143561" + ], + [ + "NI", + "143512" + ], + [ + "NL", + "143452" + ], + [ + "NO", + "143457" + ], + [ + "NP", + "143484" + ], + [ + "NR", + "143606" + ], + [ + "NZ", + "143461" + ], + [ + "OM", + "143562" + ], + [ + "PA", + "143485" + ], + [ + "PE", + "143507" + ], + [ + "PG", + "143597" + ], + [ + "PH", + "143474" + ], + [ + "PK", + "143477" + ], + [ + "PL", + "143478" + ], + [ + "PT", + "143453" + ], + [ + "PW", + "143595" + ], + [ + "PY", + "143513" + ], + [ + "QA", + "143498" + ], + [ + "RO", + "143487" + ], + [ + "RS", + "143500" + ], + [ + "RU", + "143469" + ], + [ + "RW", + "143621" + ], + [ + "SA", + "143479" + ], + [ + "SB", + "143601" + ], + [ + "SC", + "143599" + ], + [ + "SE", + "143456" + ], + [ + "SG", + "143464" + ], + [ + "SI", + "143499" + ], + [ + "SK", + "143496" + ], + [ + "SL", + "143600" + ], + [ + "SN", + "143535" + ], + [ + "SR", + "143554" + ], + [ + "ST", + "143598" + ], + [ + "SV", + "143506" + ], + [ + "SZ", + "143602" + ], + [ + "UA", + "143492" + ], + [ + "UG", + "143537" + ], + [ + "US", + "143441" + ], + [ + "UY", + "143514" + ], + [ + "UZ", + "143566" + ], + [ + "VC", + "143550" + ], + [ + "VE", + "143502" + ], + [ + "VG", + "143543" + ], + [ + "VN", + "143471" + ], + [ + "VU", + "143609" + ], + [ + "XK", + "143624" + ], + [ + "YE", + "143571" + ], + [ + "ZA", + "143472" + ], + [ + "ZM", + "143622" + ], + [ + "ZW", + "143605" + ] + ] +}; +var Default = { + Settings: Settings$7, + Configs: Configs$2 +}; + +var Default$1 = /*#__PURE__*/Object.freeze({ + __proto__: null, + Configs: Configs$2, + Settings: Settings$7, + default: Default +}); + +var Settings$6 = { + Switch: true, + PEP: { + GCC: "US" + } +}; +var Location = { + Settings: Settings$6 +}; + +var Location$1 = /*#__PURE__*/Object.freeze({ + __proto__: null, + Settings: Settings$6, + default: Location +}); + +var Settings$5 = { + Switch: true, + Services: { + Dispatcher: "CN", + Directions: "AUTO", + Traffic: "AUTO", + RAP: "XX", + Tiles: "AUTO" + }, + GeoManifest: { + Dynamic: { + Config: { + CountryCode: { + "default": "AUTO", + iOS: "CN", + iPadOS: "CN", + watchOS: "US", + macOS: "CN" + } + } + } + }, + Config: { + Announcements: { + "Environment:": { + "default": "AUTO", + iOS: "CN", + iPadOS: "CN", + watchOS: "XX", + macOS: "CN" + } + }, + Defaults: { + LagunaBeach: true, + DrivingMultiWaypointRoutesEnabled: true, + GEOAddressCorrection: true, + LookupMaxParametersCount: true, + LocalitiesAndLandmarks: true, + POIBusyness: true, + PedestrianAR: true, + "6694982d2b14e95815e44e970235e230": true, + OpticalHeading: true, + UseCLPedestrianMapMatchedLocations: true, + TransitPayEnabled: true, + SupportsOffline: true, + SupportsCarIntegration: true, + WiFiQualityNetworkDisabled: false, + WiFiQualityTileDisabled: false + } + } +}; +var Maps = { + Settings: Settings$5 +}; + +var Maps$1 = /*#__PURE__*/Object.freeze({ + __proto__: null, + Settings: Settings$5, + default: Maps +}); + +var Settings$4 = { + Switch: true, + CountryCode: "US", + newsPlusUser: true +}; +var News = { + Settings: Settings$4 +}; + +var News$1 = /*#__PURE__*/Object.freeze({ + __proto__: null, + Settings: Settings$4, + default: News +}); + +var Settings$3 = { + Switch: true, + CountryCode: "US", + canUse: true +}; +var PrivateRelay = { + Settings: Settings$3 +}; + +var PrivateRelay$1 = /*#__PURE__*/Object.freeze({ + __proto__: null, + Settings: Settings$3, + default: PrivateRelay +}); + +var Settings$2 = { + Switch: true, + CountryCode: "SG", + Domains: [ + "web", + "itunes", + "app_store", + "movies", + "restaurants", + "maps" + ], + Functions: [ + "flightutilities", + "lookup", + "mail", + "messages", + "news", + "safari", + "siri", + "spotlight", + "visualintelligence" + ], + Safari_Smart_History: true +}; +var Configs$1 = { + VisualIntelligence: { + enabled_domains: [ + "pets", + "media", + "books", + "art", + "nature", + "landmarks" + ], + supported_domains: [ + "ART", + "BOOK", + "MEDIA", + "LANDMARK", + "ANIMALS", + "BIRDS", + "FOOD", + "SIGN_SYMBOL", + "AUTO_SYMBOL", + "DOGS", + "NATURE", + "NATURAL_LANDMARK", + "INSECTS", + "REPTILES", + "ALBUM", + "STOREFRONT", + "LAUNDRY_CARE_SYMBOL", + "CATS", + "OBJECT_2D", + "SCULPTURE", + "SKYLINE", + "MAMMALS" + ] + } +}; +var Siri = { + Settings: Settings$2, + Configs: Configs$1 +}; + +var Siri$1 = /*#__PURE__*/Object.freeze({ + __proto__: null, + Configs: Configs$1, + Settings: Settings$2, + default: Siri +}); + +var Settings$1 = { + Switch: "true", + CountryCode: "US", + MultiAccount: "false", + Universal: "true" +}; +var TestFlight = { + Settings: Settings$1 +}; + +var TestFlight$1 = /*#__PURE__*/Object.freeze({ + __proto__: null, + Settings: Settings$1, + default: TestFlight +}); + +var Settings = { + Switch: true, + "Third-Party": false, + HLSUrl: "play-edge.itunes.apple.com", + ServerUrl: "play.itunes.apple.com", + Tabs: [ + "WatchNow", + "Originals", + "MLS", + "Sports", + "Kids", + "Store", + "Movies", + "TV", + "ChannelsAndApps", + "Library", + "Search" + ], + CountryCode: { + Configs: "AUTO", + Settings: "AUTO", + View: [ + "SG", + "TW" + ], + WatchNow: "AUTO", + Channels: "AUTO", + Originals: "AUTO", + Sports: "US", + Kids: "US", + Store: "AUTO", + Movies: "AUTO", + TV: "AUTO", + Persons: "SG", + Search: "AUTO", + Others: "AUTO" + } +}; +var Configs = { + Locale: [ + [ + "AU", + "en-AU" + ], + [ + "CA", + "en-CA" + ], + [ + "GB", + "en-GB" + ], + [ + "KR", + "ko-KR" + ], + [ + "HK", + "yue-Hant" + ], + [ + "JP", + "ja-JP" + ], + [ + "MO", + "zh-Hant" + ], + [ + "TW", + "zh-Hant" + ], + [ + "US", + "en-US" + ], + [ + "SG", + "zh-Hans" + ] + ], + Tabs: [ + { + title: "主页", + type: "WatchNow", + universalLinks: [ + "https://tv.apple.com/watch-now", + "https://tv.apple.com/home" + ], + destinationType: "Target", + target: { + id: "tahoma_watchnow", + type: "Root", + url: "https://tv.apple.com/watch-now" + }, + isSelected: true + }, + { + title: "Apple TV+", + type: "Originals", + universalLinks: [ + "https://tv.apple.com/channel/tvs.sbd.4000", + "https://tv.apple.com/atv" + ], + destinationType: "Target", + target: { + id: "tvs.sbd.4000", + type: "Brand", + url: "https://tv.apple.com/us/channel/tvs.sbd.4000" + } + }, + { + title: "MLS Season Pass", + type: "MLS", + universalLinks: [ + "https://tv.apple.com/mls" + ], + destinationType: "Target", + target: { + id: "tvs.sbd.7000", + type: "Brand", + url: "https://tv.apple.com/us/channel/tvs.sbd.7000" + } + }, + { + title: "体育节目", + type: "Sports", + universalLinks: [ + "https://tv.apple.com/sports" + ], + destinationType: "Target", + target: { + id: "tahoma_sports", + type: "Root", + url: "https://tv.apple.com/sports" + } + }, + { + title: "儿童", + type: "Kids", + universalLinks: [ + "https://tv.apple.com/kids" + ], + destinationType: "Target", + target: { + id: "tahoma_kids", + type: "Root", + url: "https://tv.apple.com/kids" + } + }, + { + title: "电影", + type: "Movies", + universalLinks: [ + "https://tv.apple.com/movies" + ], + destinationType: "Target", + target: { + id: "tahoma_movies", + type: "Root", + url: "https://tv.apple.com/movies" + } + }, + { + title: "电视节目", + type: "TV", + universalLinks: [ + "https://tv.apple.com/tv-shows" + ], + destinationType: "Target", + target: { + id: "tahoma_tvshows", + type: "Root", + url: "https://tv.apple.com/tv-shows" + } + }, + { + title: "商店", + type: "Store", + universalLinks: [ + "https://tv.apple.com/store" + ], + destinationType: "SubTabs", + subTabs: [ + { + title: "电影", + type: "Movies", + universalLinks: [ + "https://tv.apple.com/movies" + ], + destinationType: "Target", + target: { + id: "tahoma_movies", + type: "Root", + url: "https://tv.apple.com/movies" + } + }, + { + title: "电视节目", + type: "TV", + universalLinks: [ + "https://tv.apple.com/tv-shows" + ], + destinationType: "Target", + target: { + id: "tahoma_tvshows", + type: "Root", + url: "https://tv.apple.com/tv-shows" + } + } + ] + }, + { + title: "频道和 App", + destinationType: "SubTabs", + subTabsPlacementType: "ExpandedList", + type: "ChannelsAndApps", + subTabs: [ + ] + }, + { + title: "资料库", + type: "Library", + destinationType: "Client" + }, + { + title: "搜索", + type: "Search", + universalLinks: [ + "https://tv.apple.com/search" + ], + destinationType: "Target", + target: { + id: "tahoma_search", + type: "Root", + url: "https://tv.apple.com/search" + } + } + ], + i18n: { + WatchNow: [ + [ + "en", + "Home" + ], + [ + "zh", + "主页" + ], + [ + "zh-Hans", + "主頁" + ], + [ + "zh-Hant", + "主頁" + ] + ], + Movies: [ + [ + "en", + "Movies" + ], + [ + "zh", + "电影" + ], + [ + "zh-Hans", + "电影" + ], + [ + "zh-Hant", + "電影" + ] + ], + TV: [ + [ + "en", + "TV" + ], + [ + "zh", + "电视节目" + ], + [ + "zh-Hans", + "电视节目" + ], + [ + "zh-Hant", + "電視節目" + ] + ], + Store: [ + [ + "en", + "Store" + ], + [ + "zh", + "商店" + ], + [ + "zh-Hans", + "商店" + ], + [ + "zh-Hant", + "商店" + ] + ], + Sports: [ + [ + "en", + "Sports" + ], + [ + "zh", + "体育节目" + ], + [ + "zh-Hans", + "体育节目" + ], + [ + "zh-Hant", + "體育節目" + ] + ], + Kids: [ + [ + "en", + "Kids" + ], + [ + "zh", + "儿童" + ], + [ + "zh-Hans", + "儿童" + ], + [ + "zh-Hant", + "兒童" + ] + ], + Library: [ + [ + "en", + "Library" + ], + [ + "zh", + "资料库" + ], + [ + "zh-Hans", + "资料库" + ], + [ + "zh-Hant", + "資料庫" + ] + ], + Search: [ + [ + "en", + "Search" + ], + [ + "zh", + "搜索" + ], + [ + "zh-Hans", + "搜索" + ], + [ + "zh-Hant", + "蒐索" + ] + ] + } +}; +var TV = { + Settings: Settings, + Configs: Configs +}; + +var TV$1 = /*#__PURE__*/Object.freeze({ + __proto__: null, + Configs: Configs, + Settings: Settings, + default: TV +}); + +var Database$1 = Database = { + "Default": Default$1, + "Location": Location$1, + "Maps": Maps$1, + "News": News$1, + "PrivateRelay": PrivateRelay$1, + "Siri": Siri$1, + "TestFlight": TestFlight$1, + "TV": TV$1, +}; + +/** + * Get Storage Variables + * @link https://github.com/NanoCat-Me/ENV/blob/main/getStorage.mjs + * @author VirgilClyne + * @param {String} key - Persistent Store Key + * @param {Array} names - Platform Names + * @param {Object} database - Default Database + * @return {Object} { Settings, Caches, Configs } + */ +function getStorage(key, names, database) { + //console.log(`☑️ ${this.name}, Get Environment Variables`, ""); + /***************** BoxJs *****************/ + // 包装为局部变量,用完释放内存 + // BoxJs的清空操作返回假值空字符串, 逻辑或操作符会在左侧操作数为假值时返回右侧操作数。 + let BoxJs = $Storage.getItem(key, database); + //console.log(`🚧 ${this.name}, Get Environment Variables`, `BoxJs类型: ${typeof BoxJs}`, `BoxJs内容: ${JSON.stringify(BoxJs)}`, ""); + /***************** Argument *****************/ + let Argument = {}; + if (typeof $argument !== "undefined") { + if (Boolean($argument)) { + //console.log(`🎉 ${this.name}, $Argument`); + let arg = Object.fromEntries($argument.split("&").map((item) => item.split("=").map(i => i.replace(/\"/g, '')))); + //console.log(JSON.stringify(arg)); + for (let item in arg) Lodash.set(Argument, item, arg[item]); + //console.log(JSON.stringify(Argument)); + } //console.log(`✅ ${this.name}, Get Environment Variables`, `Argument类型: ${typeof Argument}`, `Argument内容: ${JSON.stringify(Argument)}`, ""); + } /***************** Store *****************/ + const Store = { Settings: database?.Default?.Settings || {}, Configs: database?.Default?.Configs || {}, Caches: {} }; + if (!Array.isArray(names)) names = [names]; + //console.log(`🚧 ${this.name}, Get Environment Variables`, `names类型: ${typeof names}`, `names内容: ${JSON.stringify(names)}`, ""); + for (let name of names) { + Store.Settings = { ...Store.Settings, ...database?.[name]?.Settings, ...Argument, ...BoxJs?.[name]?.Settings }; + Store.Configs = { ...Store.Configs, ...database?.[name]?.Configs }; + if (BoxJs?.[name]?.Caches && typeof BoxJs?.[name]?.Caches === "string") BoxJs[name].Caches = JSON.parse(BoxJs?.[name]?.Caches); + Store.Caches = { ...Store.Caches, ...BoxJs?.[name]?.Caches }; + } //console.log(`🚧 ${this.name}, Get Environment Variables`, `Store.Settings类型: ${typeof Store.Settings}`, `Store.Settings: ${JSON.stringify(Store.Settings)}`, ""); + traverseObject(Store.Settings, (key, value) => { + //console.log(`🚧 ${this.name}, traverseObject`, `${key}: ${typeof value}`, `${key}: ${JSON.stringify(value)}`, ""); + if (value === "true" || value === "false") value = JSON.parse(value); // 字符串转Boolean + else if (typeof value === "string") { + if (value.includes(",")) value = value.split(",").map(item => string2number(item)); // 字符串转数组转数字 + else value = string2number(value); // 字符串转数字 + } return value; + }); + //console.log(`✅ ${this.name}, Get Environment Variables`, `Store: ${typeof Store.Caches}`, `Store内容: ${JSON.stringify(Store)}`, ""); + return Store; + + /***************** function *****************/ + function traverseObject(o, c) { for (var t in o) { var n = o[t]; o[t] = "object" == typeof n && null !== n ? traverseObject(n, c) : c(t, n); } return o } + function string2number(string) { if (string && !isNaN(string)) string = parseInt(string, 10); return string } +} + +/** + * Set Environment Variables + * @author VirgilClyne + * @param {Object} $ - ENV + * @param {String} name - Persistent Store Key + * @param {Array} platforms - Platform Names + * @param {Object} database - Default DataBase + * @return {Object} { Settings, Caches, Configs } + */ +function setENV(name, platforms, database) { + console.log(`☑️ Set Environment Variables`, ""); + let { Settings, Caches, Configs } = getStorage(name, platforms, database); + /***************** Settings *****************/ + if (Settings?.Tabs && !Array.isArray(Settings?.Tabs)) Lodash.set(Settings, "Tabs", (Settings?.Tabs) ? [Settings.Tabs.toString()] : []); + if (Settings?.Domains && !Array.isArray(Settings?.Domains)) Lodash.set(Settings, "Domains", (Settings?.Domains) ? [Settings.Domains.toString()] : []); + if (Settings?.Functions && !Array.isArray(Settings?.Functions)) Lodash.set(Settings, "Functions", (Settings?.Functions) ? [Settings.Functions.toString()] : []); + console.log(`✅ Set Environment Variables, Settings: ${typeof Settings}, Settings内容: ${JSON.stringify(Settings)}`, ""); + /***************** Caches *****************/ + //console.log(`✅ Set Environment Variables, Caches: ${typeof Caches}, Caches内容: ${JSON.stringify(Caches)}`, ""); + /***************** Configs *****************/ + Configs.Storefront = new Map(Configs.Storefront); + if (Configs.Locale) Configs.Locale = new Map(Configs.Locale); + if (Configs.i18n) for (let type in Configs.i18n) Configs.i18n[type] = new Map(Configs.i18n[type]); + return { Settings, Caches, Configs }; +} + +const $ = new ENV(" iRingo: 📍 Location v3.1.6(4) response.beta"); + +/***************** Processing *****************/ +// 解构URL +const URL = URI.parse($request.url); +$.log(`⚠ URL: ${JSON.stringify(URL)}`, ""); +// 获取连接参数 +const METHOD = $request.method, HOST = URL.host, PATH = URL.path; URL.paths; +$.log(`⚠ METHOD: ${METHOD}`, ""); +// 解析格式 +const FORMAT = ($response.headers?.["Content-Type"] ?? $response.headers?.["content-type"])?.split(";")?.[0]; +$.log(`⚠ FORMAT: ${FORMAT}`, ""); +(async () => { + const { Settings, Caches, Configs } = setENV("iRingo", "Location", Database$1); + $.log(`⚠ Settings.Switch: ${Settings?.Switch}`, ""); + switch (Settings.Switch) { + case true: + default: + // 创建空数据 + let body = {}; + // 格式判断 + switch (FORMAT) { + case undefined: // 视为无body + break; + case "application/x-www-form-urlencoded": + case "text/plain": + default: + break; + case "application/x-mpegURL": + case "application/x-mpegurl": + case "application/vnd.apple.mpegurl": + case "audio/mpegurl": + //body = M3U8.parse($response.body); + //$.log(`🚧 body: ${JSON.stringify(body)}`, ""); + //$response.body = M3U8.stringify(body); + break; + case "text/xml": + case "text/html": + case "text/plist": + case "application/xml": + case "application/plist": + case "application/x-plist": + $.log(`🚧 body: ${body}`, ""); + // 主机判断 + switch (HOST) { + case "gspe1-ssl.ls.apple.com": + //body = new DOMParser().parseFromString($response.body, FORMAT); + // 路径判断 + switch (PATH) { + case "pep/gcc": + Lodash.set(Caches, "pep.gcc", $response.body); + $Storage.setItem("@iRingo.Location.Caches", Caches); + switch (Settings.PEP.GCC) { + case "AUTO": + break; + default: + $response.body = Settings.PEP.GCC; + break; + } break; + } //$repsonse.body = new XMLSerializer().serializeToString(body); + break; + case "configuration.ls.apple.com": + //body = await PLISTs("plist2json", $response.body); + body = XML.parse($response.body); + $.log(`🚧 body: ${JSON.stringify(body)}`, ""); + // 路径判断 + switch (PATH) { + case "config/defaults": + const PLIST = body.plist; + if (PLIST) { + // set settings + // CN + PLIST["com.apple.GEO"].CountryProviders.CN.ShouldEnableLagunaBeach = Settings?.Config?.Defaults?.LagunaBeach ?? true; // XX + PLIST["com.apple.GEO"].CountryProviders.CN.DrivingMultiWaypointRoutesEnabled = Settings?.Config?.Defaults?.DrivingMultiWaypointRoutesEnabled ?? true; // 驾驶导航途径点 + //PLIST["com.apple.GEO"].CountryProviders.CN.EnableAlberta = false; // CN + //PLIST["com.apple.GEO"].CountryProviders.CN.EnableClientDrapedVectorPolygons = false; // CN + PLIST["com.apple.GEO"].CountryProviders.CN.GEOAddressCorrectionEnabled = Settings?.Config?.Defaults?.GEOAddressCorrection ?? true; // CN + if (Settings?.Config?.Defaults?.LookupMaxParametersCount ?? true) { + delete PLIST["com.apple.GEO"].CountryProviders.CN.GEOBatchSpatialEventLookupMaxParametersCount; // CN + delete PLIST["com.apple.GEO"].CountryProviders.CN.GEOBatchSpatialPlaceLookupMaxParametersCount; // CN + } + PLIST["com.apple.GEO"].CountryProviders.CN.LocalitiesAndLandmarksSupported = Settings?.Config?.Defaults?.LocalitiesAndLandmarks ?? true; // CN + //PLIST["com.apple.GEO"].CountryProviders.CN.NavigationShowHeadingKey = true; + PLIST["com.apple.GEO"].CountryProviders.CN.POIBusynessDifferentialPrivacy = Settings?.Config?.Defaults?.POIBusyness ?? true; // CN + PLIST["com.apple.GEO"].CountryProviders.CN.POIBusynessRealTime = Settings?.Config?.Defaults?.POIBusyness ?? true; // CN + PLIST["com.apple.GEO"].CountryProviders.CN.TransitPayEnabled = Settings?.Config?.Defaults?.TransitPayEnabled ?? true; // CN + //PLIST["com.apple.GEO"].CountryProviders.CN.WiFiQualityNetworkDisabled = Settings?.Config?.Defaults?.WiFiQualityNetworkDisabled ?? true; // CN + //PLIST["com.apple.GEO"].CountryProviders.CN.WiFiQualityTileDisabled = Settings?.Config?.Defaults?.WiFiQualityTileDisabled ?? true; // CN + PLIST["com.apple.GEO"].CountryProviders.CN.SupportsOffline = Settings?.Config?.Defaults?.SupportsOffline ?? true; // CN + PLIST["com.apple.GEO"].CountryProviders.CN.SupportsCarIntegration = Settings?.Config?.Defaults?.SupportsCarIntegration ?? true; // CN + // TW + //PLIST["com.apple.GEO"].CountryProviders.CN.GEOShouldSpeakWrittenAddresses = true; // TW + //PLIST["com.apple.GEO"].CountryProviders.CN.GEOShouldSpeakWrittenPlaceNames = true; // TW + // US + PLIST["com.apple.GEO"].CountryProviders.CN["6694982d2b14e95815e44e970235e230"] = Settings?.Config?.Defaults?.["6694982d2b14e95815e44e970235e230"] ?? true; // US + PLIST["com.apple.GEO"].CountryProviders.CN.PedestrianAREnabled = Settings?.Config?.Defaults?.PedestrianAR ?? true; // 现实世界中的线路 + PLIST["com.apple.GEO"].CountryProviders.CN.OpticalHeadingEnabled = Settings?.Config?.Defaults?.OpticalHeading ?? true; // 举起以查看 + PLIST["com.apple.GEO"].CountryProviders.CN.UseCLPedestrianMapMatchedLocations = Settings?.Config?.Defaults?.UseCLPedestrianMapMatchedLocations ?? true; // 导航准确性-增强 + } break; + } $.log(`🚧 body: ${JSON.stringify(body)}`, ""); + //$response.body = await PLISTs("json2plist", body); // json2plist + $response.body = XML.stringify(body); + break; + } break; + case "text/vtt": + case "application/vtt": + //body = VTT.parse($response.body); + //$.log(`🚧 body: ${JSON.stringify(body)}`, ""); + //$response.body = VTT.stringify(body); + break; + case "text/json": + case "application/json": + body = JSON.parse($response.body ?? "{}"); + $.log(`🚧 body: ${JSON.stringify(body)}`, ""); + $response.body = JSON.stringify(body); + break; + case "application/protobuf": + case "application/x-protobuf": + case "application/vnd.google.protobuf": + case "application/grpc": + case "application/grpc+proto": + case "application/octet-stream": + break; + } break; + case false: + break; + }})() + .catch((e) => $.logErr(e)) + .finally(() => $.done($response)); diff --git a/archive/js/Location.response.js b/archive/js/Location.response.js new file mode 100644 index 0000000..072e34c --- /dev/null +++ b/archive/js/Location.response.js @@ -0,0 +1 @@ +class e{static name="Lodash";static version="1.2.2";static about(){return console.log(`\n🟧 ${this.name} v${this.version}\n`)}static get(e={},t="",s=void 0){Array.isArray(t)||(t=this.toPath(t));const a=t.reduce(((e,t)=>Object(e)[t]),e);return void 0===a?s:a}static set(e={},t="",s){return Array.isArray(t)||(t=this.toPath(t)),t.slice(0,-1).reduce(((e,s,a)=>Object(e[s])===e[s]?e[s]:e[s]=/^\d+$/.test(t[a+1])?[]:{}),e)[t[t.length-1]]=s,e}static unset(e={},t=""){return Array.isArray(t)||(t=this.toPath(t)),t.reduce(((e,s,a)=>a===t.length-1?(delete e[s],!0):Object(e)[s]),e)}static toPath(e){return e.replace(/\[(\d+)\]/g,".$1").split(".").filter(Boolean)}static escape(e){const t={"&":"&","<":"<",">":">",'"':""","'":"'"};return e.replace(/[&<>"']/g,(e=>t[e]))}static unescape(e){const t={"&":"&","<":"<",">":">",""":'"',"'":"'"};return e.replace(/&|<|>|"|'/g,(e=>t[e]))}}class t{static name="$Storage";static version="1.0.9";static about(){return console.log(`\n🟧 ${this.name} v${this.version}\n`)}static data=null;static dataFile="box.dat";static#e=/^@(?[^.]+)(?:\.(?.*))?$/;static#t(){return"undefined"!=typeof $environment&&$environment["surge-version"]?"Surge":"undefined"!=typeof $environment&&$environment["stash-version"]?"Stash":"undefined"!=typeof module&&module.exports?"Node.js":"undefined"!=typeof $task?"Quantumult X":"undefined"!=typeof $loon?"Loon":"undefined"!=typeof $rocket?"Shadowrocket":"undefined"!=typeof Egern?"Egern":void 0}static getItem(t=new String,s=null){let a=s;if(!0===t.startsWith("@")){const{key:s,path:o}=t.match(this.#e)?.groups;t=s;let i=this.getItem(t,{});"object"!=typeof i&&(i={}),a=e.get(i,o);try{a=JSON.parse(a)}catch(e){}}else{switch(this.#t()){case"Surge":case"Loon":case"Stash":case"Egern":case"Shadowrocket":a=$persistentStore.read(t);break;case"Quantumult X":a=$prefs.valueForKey(t);break;case"Node.js":this.data=this.#s(this.dataFile),a=this.data?.[t];break;default:a=this.data?.[t]||null}try{a=JSON.parse(a)}catch(e){}}return a??s}static setItem(t=new String,s=new String){let a=!1;if("object"==typeof s)s=JSON.stringify(s);else s=String(s);if(!0===t.startsWith("@")){const{key:o,path:i}=t.match(this.#e)?.groups;t=o;let n=this.getItem(t,{});"object"!=typeof n&&(n={}),e.set(n,i,s),a=this.setItem(t,n)}else switch(this.#t()){case"Surge":case"Loon":case"Stash":case"Egern":case"Shadowrocket":a=$persistentStore.write(s,t);break;case"Quantumult X":a=$prefs.setValueForKey(s,t);break;case"Node.js":this.data=this.#s(this.dataFile),this.data[t]=s,this.#a(this.dataFile),a=!0;break;default:a=this.data?.[t]||null}return a}static removeItem(t){let s=!1;if(!0===t.startsWith("@")){const{key:a,path:o}=t.match(this.#e)?.groups;t=a;let i=this.getItem(t);"object"!=typeof i&&(i={}),keyValue=e.unset(i,o),s=this.setItem(t,i)}else switch(this.#t()){case"Surge":case"Loon":case"Stash":case"Egern":case"Shadowrocket":case"Node.js":default:s=!1;break;case"Quantumult X":s=$prefs.removeValueForKey(t)}return s}static clear(){let e=!1;switch(this.#t()){case"Surge":case"Loon":case"Stash":case"Egern":case"Shadowrocket":case"Node.js":default:e=!1;break;case"Quantumult X":e=$prefs.removeAllValues()}return e}static#s(e){if(!this.isNode())return{};{this.fs=this.fs?this.fs:require("fs"),this.path=this.path?this.path:require("path");const t=this.path.resolve(e),s=this.path.resolve(process.cwd(),e),a=this.fs.existsSync(t),o=!a&&this.fs.existsSync(s);if(!a&&!o)return{};{const e=a?t:s;try{return JSON.parse(this.fs.readFileSync(e))}catch(e){return{}}}}}static#a(e=this.dataFile){if(this.isNode()){this.fs=this.fs?this.fs:require("fs"),this.path=this.path?this.path:require("path");const t=this.path.resolve(e),s=this.path.resolve(process.cwd(),e),a=this.fs.existsSync(t),o=!a&&this.fs.existsSync(s),i=JSON.stringify(this.data);a?this.fs.writeFileSync(t,i):o?this.fs.writeFileSync(s,i):this.fs.writeFileSync(t,i)}}}class s{static name="ENV";static version="1.7.4";static about(){return console.log(`\n🟧 ${this.name} v${this.version}\n`)}constructor(e,t){console.log(`\n🟧 ${s.name} v${s.version}\n`),this.name=e,this.logs=[],this.isMute=!1,this.isMuteLog=!1,this.logSeparator="\n",this.encoding="utf-8",this.startTime=(new Date).getTime(),Object.assign(this,t),this.log(`\n🚩 开始!\n${e}\n`)}platform(){return"undefined"!=typeof $environment&&$environment["surge-version"]?"Surge":"undefined"!=typeof $environment&&$environment["stash-version"]?"Stash":"undefined"!=typeof module&&module.exports?"Node.js":"undefined"!=typeof $task?"Quantumult X":"undefined"!=typeof $loon?"Loon":"undefined"!=typeof $rocket?"Shadowrocket":"undefined"!=typeof Egern?"Egern":void 0}isNode(){return"Node.js"===this.platform()}isQuanX(){return"Quantumult X"===this.platform()}isSurge(){return"Surge"===this.platform()}isLoon(){return"Loon"===this.platform()}isShadowrocket(){return"Shadowrocket"===this.platform()}isStash(){return"Stash"===this.platform()}isEgern(){return"Egern"===this.platform()}async getScript(e){return await this.fetch(e).then((e=>e.body))}async runScript(e,s){let a=t.getItem("@chavy_boxjs_userCfgs.httpapi");a=a?.replace?.(/\n/g,"")?.trim();let o=t.getItem("@chavy_boxjs_userCfgs.httpapi_timeout");o=1*o??20,o=s?.timeout??o;const[i,n]=a.split("@"),r={url:`http://${n}/v1/scripting/evaluate`,body:{script_text:e,mock_type:"cron",timeout:o},headers:{"X-Key":i,Accept:"*/*"},timeout:o};await this.fetch(r).then((e=>e.body),(e=>this.logErr(e)))}initGotEnv(e){this.got=this.got?this.got:require("got"),this.cktough=this.cktough?this.cktough:require("tough-cookie"),this.ckjar=this.ckjar?this.ckjar:new this.cktough.CookieJar,e&&(e.headers=e.headers?e.headers:{},void 0===e.headers.Cookie&&void 0===e.cookieJar&&(e.cookieJar=this.ckjar))}async fetch(t={}||"",s={}){switch(t.constructor){case Object:t={...t,...s};break;case String:t={url:t,...s}}t.method||(t.method="GET",(t.body??t.bodyBytes)&&(t.method="POST")),delete t.headers?.Host,delete t.headers?.[":authority"],delete t.headers?.["Content-Length"],delete t.headers?.["content-length"];const a=t.method.toLocaleLowerCase();switch(this.platform()){case"Loon":case"Surge":case"Stash":case"Egern":case"Shadowrocket":default:return t.policy&&(this.isLoon()&&(t.node=t.policy),this.isStash()&&e.set(t,"headers.X-Stash-Selected-Proxy",encodeURI(t.policy))),"boolean"==typeof t.redirection&&(t["auto-redirect"]=t.redirection),t.bodyBytes&&!t.body&&(t.body=t.bodyBytes,delete t.bodyBytes),await new Promise(((e,s)=>{$httpClient[a](t,((a,o,i)=>{a?s(a):(o.ok=/^2\d\d$/.test(o.status),o.statusCode=o.status,i&&(o.body=i,1==t["binary-mode"]&&(o.bodyBytes=i)),e(o))}))}));case"Quantumult X":return t.policy&&e.set(t,"opts.policy",t.policy),"boolean"==typeof t["auto-redirect"]&&e.set(t,"opts.redirection",t["auto-redirect"]),t.body instanceof ArrayBuffer?(t.bodyBytes=t.body,delete t.body):ArrayBuffer.isView(t.body)?(t.bodyBytes=t.body.buffer.slice(t.body.byteOffset,t.body.byteLength+t.body.byteOffset),delete object.body):t.body&&delete t.bodyBytes,await $task.fetch(t).then((e=>(e.ok=/^2\d\d$/.test(e.statusCode),e.status=e.statusCode,e)),(e=>Promise.reject(e.error)));case"Node.js":let s=require("iconv-lite");this.initGotEnv(t);const{url:o,...i}=t;return await this.got[a](o,i).on("redirect",((e,t)=>{try{if(e.headers["set-cookie"]){const s=e.headers["set-cookie"].map(this.cktough.Cookie.parse).toString();s&&this.ckjar.setCookieSync(s,null),t.cookieJar=this.ckjar}}catch(e){this.logErr(e)}})).then((e=>(e.statusCode=e.status,e.body=s.decode(e.rawBody,this.encoding),e.bodyBytes=e.rawBody,e)),(e=>Promise.reject(e.message)))}}time(e,t=null){const s=t?new Date(t):new Date;let a={"M+":s.getMonth()+1,"d+":s.getDate(),"H+":s.getHours(),"m+":s.getMinutes(),"s+":s.getSeconds(),"q+":Math.floor((s.getMonth()+3)/3),S:s.getMilliseconds()};/(y+)/.test(e)&&(e=e.replace(RegExp.$1,(s.getFullYear()+"").substr(4-RegExp.$1.length)));for(let t in a)new RegExp("("+t+")").test(e)&&(e=e.replace(RegExp.$1,1==RegExp.$1.length?a[t]:("00"+a[t]).substr((""+a[t]).length)));return e}msg(e=name,t="",s="",a){const o=e=>{switch(typeof e){case void 0:return e;case"string":switch(this.platform()){case"Surge":case"Stash":case"Egern":default:return{url:e};case"Loon":case"Shadowrocket":return e;case"Quantumult X":return{"open-url":e};case"Node.js":return}case"object":switch(this.platform()){case"Surge":case"Stash":case"Egern":case"Shadowrocket":default:return{url:e.url||e.openUrl||e["open-url"]};case"Loon":return{openUrl:e.openUrl||e.url||e["open-url"],mediaUrl:e.mediaUrl||e["media-url"]};case"Quantumult X":return{"open-url":e["open-url"]||e.url||e.openUrl,"media-url":e["media-url"]||e.mediaUrl,"update-pasteboard":e["update-pasteboard"]||e.updatePasteboard};case"Node.js":return}default:return}};if(!this.isMute)switch(this.platform()){case"Surge":case"Loon":case"Stash":case"Egern":case"Shadowrocket":default:$notification.post(e,t,s,o(a));break;case"Quantumult X":$notify(e,t,s,o(a));case"Node.js":}if(!this.isMuteLog){let a=["","==============📣系统通知📣=============="];a.push(e),t&&a.push(t),s&&a.push(s),console.log(a.join("\n")),this.logs=this.logs.concat(a)}}log(...e){e.length>0&&(this.logs=[...this.logs,...e]),console.log(e.join(this.logSeparator))}logErr(e){switch(this.platform()){case"Surge":case"Loon":case"Stash":case"Egern":case"Shadowrocket":case"Quantumult X":default:this.log("",`❗️ ${this.name}, 错误!`,e);break;case"Node.js":this.log("",`❗️${this.name}, 错误!`,e.stack)}}wait(e){return new Promise((t=>setTimeout(t,e)))}done(t={}){const s=((new Date).getTime()-this.startTime)/1e3;switch(this.log("",`🚩 ${this.name}, 结束! 🕛 ${s} 秒`,""),this.platform()){case"Surge":t.policy&&e.set(t,"headers.X-Surge-Policy",t.policy),$done(t);break;case"Loon":t.policy&&(t.node=t.policy),$done(t);break;case"Stash":t.policy&&e.set(t,"headers.X-Stash-Selected-Proxy",encodeURI(t.policy)),$done(t);break;case"Egern":case"Shadowrocket":default:$done(t);break;case"Quantumult X":t.policy&&e.set(t,"opts.policy",t.policy),delete t["auto-redirect"],delete t["auto-cookie"],delete t["binary-mode"],delete t.charset,delete t.host,delete t.insecure,delete t.method,delete t.opt,delete t.path,delete t.policy,delete t["policy-descriptor"],delete t.scheme,delete t.sessionIndex,delete t.statusCode,delete t.timeout,t.body instanceof ArrayBuffer?(t.bodyBytes=t.body,delete t.body):ArrayBuffer.isView(t.body)?(t.bodyBytes=t.body.buffer.slice(t.body.byteOffset,t.body.byteLength+t.body.byteOffset),delete t.body):t.body&&delete t.bodyBytes,$done(t);break;case"Node.js":process.exit(1)}}}class a{static name="XML";static version="0.4.1";static about=()=>console.log(`\n🟧 ${this.name} v${this.version}\n`);static#o="@";static#i="#";static#n={"&":"&","<":"<",">":">","'":"'",""":'"'};static#r={"&":"&","<":"<",">":">","'":"'",'"':"""};static parse(e=new String,t=""){const s=this.#n,a=this.#o,o=this.#i;let i=function e(t,s){let i;switch(typeof t){case"string":case"undefined":i=t;break;case"object":const l=t.raw,p=t.name,u=t.tag,h=t.children;i=l||(u?function(e,t){if(!e)return;const s=e.split(/([^\s='"]+(?:\s*=\s*(?:'[\S\s]*?'|"[\S\s]*?"|[^\s'"]*))?)/),o=s.length;let i,n;for(let e=0;e{"string"==typeof t?c(i,o,e(t,s),void 0):t.tag||t.children||t.raw?c(i,t.name,e(t,s),void 0):c(i,t.name,e(t,s),h?.[a-1]?.name)})),h&&0===h.length&&c(i,o,null,void 0),s&&(i=s(p||"",i))}return i;function c(e,t,s,a=t){if(void 0!==s){const o=e[a];Array.isArray(o)?o.push(s):o?e[a]=[o,s]:e[t]=s}}}(function(e){const t=e.replace(/^[ \t]+/gm,"").split(/<([^!<>?](?:'[\S\s]*?'|"[\S\s]*?"|[^'"<>])*|!(?:--[\S\s]*?--|\[[^\[\]'"<>]+\[[\S\s]*?]]|DOCTYPE[^\[<>]*?\[[\S\s]*?]|(?:ENTITY[^"<>]*?"[\S\s]*?")?[\S\s]*?)|\?[\S\s]*?\?)>/),s=t.length,a={children:[]};let o=a;const i=[];for(let e=0;en(e,t)));i=function(e,t){var s=0,a=[];for(;sn(e,t)));break;case"key":s=o[0];break;case"true":case"false":const r=a;s=JSON.parse(r);break;case"integer":const c=o[0];s=BigInt(c);break;case"real":const l=o[0];s=parseFloat(l);break;case"string":s=o[0]}t&&(s=t(a||"",s))}return s}function r(e){return e.replace(/(&(?:lt|gt|amp|apos|quot|#(?:\d{1,6}|x[0-9a-fA-F]{1,5}));)/g,(function(e){if("#"===e[1]){const t="x"===e[2]?parseInt(e.substr(3),16):parseInt(e.substr(2),10);if(t>-1)return String.fromCharCode(t)}return s[e]||e}))}}static stringify(e=new Object,t=""){this.#r;const s=this.#o,a=this.#i;let o="";for(let t in e)o+=i(e[t],t,"");return o=t?o.replace(/\t/g,t):o.replace(/\t|\n/g,""),o;function i(e,t,o){let r="";switch(typeof e){case"object":if(Array.isArray(e))r=e.reduce(((e,s)=>e+`${o}${i(s,t,`${o}\t`)}\n`),"");else{let c="",l=!1;for(let a in e)a[0]===s?(c+=` ${a.substring(1)}="${e[a].toString()}"`,delete e[a]):void 0===e[a]?t=a:l=!0;if(r+=`${o}<${t}${c}${l||"link"===t?"":"/"}>`,l){if("plist"===t)r+=n(e,t,`${o}\t`);else for(let t in e)if(t===a)r+=e[t]??"";else r+=i(e[t],t,`${o}\t`);r+=("\n"===r.slice(-1)?o:"")+``}}break;case"string":switch(t){case"?xml":r+=`${o}<${t} ${e.toString()}>`;break;case"?":r+=`${o}<${t}${e.toString()}${t}>`;break;case"!":r+=`${o}\x3c!--${e.toString()}--\x3e`;break;case"!DOCTYPE":r+=`${o}<${t} ${e.toString()}>`;break;case"!CDATA":r+=`${o}`;break;case a:r+=e;break;default:r+=`${o}<${t}>${e.toString()}`}break;case"undefined":r+=o+`<${t.toString()}/>`}return r}function n(e,t,s){let a="";switch(typeof e){case"boolean":a=`${s}<${e.toString()}/>`;break;case"number":a=`${s}${e.toString()}`;break;case"bigint":a=`${s}${e.toString()}`;break;case"string":a=`${s}${e.toString()}`;break;case"object":let r="";if(Array.isArray(e)){for(var o=0,i=e.length;o${r}${s}`}else{let t="";Object.entries(e).forEach((([e,a])=>{t+=`${s}${e}`,t+=n(a,e,s)})),a=`${s}${t}${s}`}}return a}}}var o={Switch:!0},i={Storefront:[["AE","143481"],["AF","143610"],["AG","143540"],["AI","143538"],["AL","143575"],["AM","143524"],["AO","143564"],["AR","143505"],["AT","143445"],["AU","143460"],["AZ","143568"],["BA","143612"],["BB","143541"],["BD","143490"],["BE","143446"],["BF","143578"],["BG","143526"],["BH","143559"],["BJ","143576"],["BM","143542"],["BN","143560"],["BO","143556"],["BR","143503"],["BS","143539"],["BT","143577"],["BW","143525"],["BY","143565"],["BZ","143555"],["CA","143455"],["CD","143613"],["CG","143582"],["CH","143459"],["CI","143527"],["CL","143483"],["CM","143574"],["CN","143465"],["CO","143501"],["CR","143495"],["CV","143580"],["CY","143557"],["CZ","143489"],["DE","143443"],["DK","143458"],["DM","143545"],["DO","143508"],["DZ","143563"],["EC","143509"],["EE","143518"],["EG","143516"],["ES","143454"],["FI","143447"],["FJ","143583"],["FM","143591"],["FR","143442"],["GA","143614"],["GB","143444"],["GD","143546"],["GF","143615"],["GH","143573"],["GM","143584"],["GR","143448"],["GT","143504"],["GW","143585"],["GY","143553"],["HK","143463"],["HN","143510"],["HR","143494"],["HU","143482"],["ID","143476"],["IE","143449"],["IL","143491"],["IN","143467"],["IQ","143617"],["IS","143558"],["IT","143450"],["JM","143511"],["JO","143528"],["JP","143462"],["KE","143529"],["KG","143586"],["KH","143579"],["KN","143548"],["KP","143466"],["KR","143466"],["KW","143493"],["KY","143544"],["KZ","143517"],["TC","143552"],["TD","143581"],["TJ","143603"],["TH","143475"],["TM","143604"],["TN","143536"],["TO","143608"],["TR","143480"],["TT","143551"],["TW","143470"],["TZ","143572"],["LA","143587"],["LB","143497"],["LC","143549"],["LI","143522"],["LK","143486"],["LR","143588"],["LT","143520"],["LU","143451"],["LV","143519"],["LY","143567"],["MA","143620"],["MD","143523"],["ME","143619"],["MG","143531"],["MK","143530"],["ML","143532"],["MM","143570"],["MN","143592"],["MO","143515"],["MR","143590"],["MS","143547"],["MT","143521"],["MU","143533"],["MV","143488"],["MW","143589"],["MX","143468"],["MY","143473"],["MZ","143593"],["NA","143594"],["NE","143534"],["NG","143561"],["NI","143512"],["NL","143452"],["NO","143457"],["NP","143484"],["NR","143606"],["NZ","143461"],["OM","143562"],["PA","143485"],["PE","143507"],["PG","143597"],["PH","143474"],["PK","143477"],["PL","143478"],["PT","143453"],["PW","143595"],["PY","143513"],["QA","143498"],["RO","143487"],["RS","143500"],["RU","143469"],["RW","143621"],["SA","143479"],["SB","143601"],["SC","143599"],["SE","143456"],["SG","143464"],["SI","143499"],["SK","143496"],["SL","143600"],["SN","143535"],["SR","143554"],["ST","143598"],["SV","143506"],["SZ","143602"],["UA","143492"],["UG","143537"],["US","143441"],["UY","143514"],["UZ","143566"],["VC","143550"],["VE","143502"],["VG","143543"],["VN","143471"],["VU","143609"],["XK","143624"],["YE","143571"],["ZA","143472"],["ZM","143622"],["ZW","143605"]]},n={Settings:o,Configs:i},r={Switch:!0,PEP:{GCC:"US"},Services:{PlaceData:"CN",Directions:"AUTO",Traffic:"AUTO",RAP:"XX",Tiles:"AUTO"},Geo_manifest:{Dynamic:{Config:{Country_code:{default:"AUTO",iOS:"CN",iPadOS:"CN",watchOS:"US",macOS:"CN"}}}},Config:{Announcements:{"Environment:":{default:"AUTO",iOS:"CN",iPadOS:"CN",watchOS:"XX",macOS:"CN"}},Defaults:{LagunaBeach:!0,DrivingMultiWaypointRoutesEnabled:!0,GEOAddressCorrection:!0,LookupMaxParametersCount:!0,LocalitiesAndLandmarks:!0,POIBusyness:!0,PedestrianAR:!0,"6694982d2b14e95815e44e970235e230":!0,OpticalHeading:!0,UseCLPedestrianMapMatchedLocations:!0,TransitPayEnabled:!0,SupportsOffline:!0,SupportsCarIntegration:!0,WiFiQualityNetworkDisabled:!1,WiFiQualityTileDisabled:!1}}},c={Settings:r},l={Switch:!0,CountryCode:"US",newsPlusUser:!0},p={Settings:l},u={Switch:!0,CountryCode:"US",canUse:!0},h={Settings:u},d={Switch:!0,CountryCode:"SG",Domains:["web","itunes","app_store","movies","restaurants","maps"],Functions:["flightutilities","lookup","mail","messages","news","safari","siri","spotlight","visualintelligence"],Safari_Smart_History:!0},g={VisualIntelligence:{enabled_domains:["pets","media","books","art","nature","landmarks"],supported_domains:["ART","BOOK","MEDIA","LANDMARK","ANIMALS","BIRDS","FOOD","SIGN_SYMBOL","AUTO_SYMBOL","DOGS","NATURE","NATURAL_LANDMARK","INSECTS","REPTILES","ALBUM","STOREFRONT","LAUNDRY_CARE_SYMBOL","CATS","OBJECT_2D","SCULPTURE","SKYLINE","MAMMALS"]}},f={Settings:d,Configs:g},y={Switch:"true",CountryCode:"US",MultiAccount:"false",Universal:"true"},m={Settings:y},S={Switch:!0,"Third-Party":!1,HLSUrl:"play-edge.itunes.apple.com",ServerUrl:"play.itunes.apple.com",Tabs:["WatchNow","Originals","MLS","Sports","Kids","Store","Movies","TV","ChannelsAndApps","Library","Search"],CountryCode:{Configs:"AUTO",Settings:"AUTO",View:["SG","TW"],WatchNow:"AUTO",Channels:"AUTO",Originals:"AUTO",Sports:"US",Kids:"US",Store:"AUTO",Movies:"AUTO",TV:"AUTO",Persons:"SG",Search:"AUTO",Others:"AUTO"}},b={Locale:[["AU","en-AU"],["CA","en-CA"],["GB","en-GB"],["KR","ko-KR"],["HK","yue-Hant"],["JP","ja-JP"],["MO","zh-Hant"],["TW","zh-Hant"],["US","en-US"],["SG","zh-Hans"]],Tabs:[{title:"主页",type:"WatchNow",universalLinks:["https://tv.apple.com/watch-now","https://tv.apple.com/home"],destinationType:"Target",target:{id:"tahoma_watchnow",type:"Root",url:"https://tv.apple.com/watch-now"},isSelected:!0},{title:"Apple TV+",type:"Originals",universalLinks:["https://tv.apple.com/channel/tvs.sbd.4000","https://tv.apple.com/atv"],destinationType:"Target",target:{id:"tvs.sbd.4000",type:"Brand",url:"https://tv.apple.com/us/channel/tvs.sbd.4000"}},{title:"MLS Season Pass",type:"MLS",universalLinks:["https://tv.apple.com/mls"],destinationType:"Target",target:{id:"tvs.sbd.7000",type:"Brand",url:"https://tv.apple.com/us/channel/tvs.sbd.7000"}},{title:"体育节目",type:"Sports",universalLinks:["https://tv.apple.com/sports"],destinationType:"Target",target:{id:"tahoma_sports",type:"Root",url:"https://tv.apple.com/sports"}},{title:"儿童",type:"Kids",universalLinks:["https://tv.apple.com/kids"],destinationType:"Target",target:{id:"tahoma_kids",type:"Root",url:"https://tv.apple.com/kids"}},{title:"电影",type:"Movies",universalLinks:["https://tv.apple.com/movies"],destinationType:"Target",target:{id:"tahoma_movies",type:"Root",url:"https://tv.apple.com/movies"}},{title:"电视节目",type:"TV",universalLinks:["https://tv.apple.com/tv-shows"],destinationType:"Target",target:{id:"tahoma_tvshows",type:"Root",url:"https://tv.apple.com/tv-shows"}},{title:"商店",type:"Store",universalLinks:["https://tv.apple.com/store"],destinationType:"SubTabs",subTabs:[{title:"电影",type:"Movies",universalLinks:["https://tv.apple.com/movies"],destinationType:"Target",target:{id:"tahoma_movies",type:"Root",url:"https://tv.apple.com/movies"}},{title:"电视节目",type:"TV",universalLinks:["https://tv.apple.com/tv-shows"],destinationType:"Target",target:{id:"tahoma_tvshows",type:"Root",url:"https://tv.apple.com/tv-shows"}}]},{title:"频道和 App",destinationType:"SubTabs",subTabsPlacementType:"ExpandedList",type:"ChannelsAndApps",subTabs:[]},{title:"资料库",type:"Library",destinationType:"Client"},{title:"搜索",type:"Search",universalLinks:["https://tv.apple.com/search"],destinationType:"Target",target:{id:"tahoma_search",type:"Root",url:"https://tv.apple.com/search"}}],i18n:{WatchNow:[["en","Home"],["zh","主页"],["zh-Hans","主頁"],["zh-Hant","主頁"]],Movies:[["en","Movies"],["zh","电影"],["zh-Hans","电影"],["zh-Hant","電影"]],TV:[["en","TV"],["zh","电视节目"],["zh-Hans","电视节目"],["zh-Hant","電視節目"]],Store:[["en","Store"],["zh","商店"],["zh-Hans","商店"],["zh-Hant","商店"]],Sports:[["en","Sports"],["zh","体育节目"],["zh-Hans","体育节目"],["zh-Hant","體育節目"]],Kids:[["en","Kids"],["zh","儿童"],["zh-Hans","儿童"],["zh-Hant","兒童"]],Library:[["en","Library"],["zh","资料库"],["zh-Hans","资料库"],["zh-Hant","資料庫"]],Search:[["en","Search"],["zh","搜索"],["zh-Hans","搜索"],["zh-Hant","蒐索"]]}},C={Settings:S,Configs:b},v=Database={Default:Object.freeze({__proto__:null,Configs:i,Settings:o,default:n}),Location:Object.freeze({__proto__:null,Settings:r,default:c}),News:Object.freeze({__proto__:null,Settings:l,default:p}),PrivateRelay:Object.freeze({__proto__:null,Settings:u,default:h}),Siri:Object.freeze({__proto__:null,Configs:g,Settings:d,default:f}),TestFlight:Object.freeze({__proto__:null,Settings:y,default:m}),TV:Object.freeze({__proto__:null,Configs:b,Settings:S,default:C})};function T(s,a,o){console.log("☑️ Set Environment Variables","");let{Settings:i,Caches:n,Configs:r}=function(s,a,o){let i=t.getItem(s,o),n={};if("undefined"!=typeof $argument&&Boolean($argument)){let t=Object.fromEntries($argument.split("&").map((e=>e.split("=").map((e=>e.replace(/\"/g,""))))));for(let s in t)e.set(n,s,t[s])}const r={Settings:o?.Default?.Settings||{},Configs:o?.Default?.Configs||{},Caches:{}};Array.isArray(a)||(a=[a]);for(let e of a)r.Settings={...r.Settings,...o?.[e]?.Settings,...n,...i?.[e]?.Settings},r.Configs={...r.Configs,...o?.[e]?.Configs},i?.[e]?.Caches&&"string"==typeof i?.[e]?.Caches&&(i[e].Caches=JSON.parse(i?.[e]?.Caches)),r.Caches={...r.Caches,...i?.[e]?.Caches};return function e(t,s){for(var a in t){var o=t[a];t[a]="object"==typeof o&&null!==o?e(o,s):s(a,o)}return t}(r.Settings,((e,t)=>("true"===t||"false"===t?t=JSON.parse(t):"string"==typeof t&&(t=t.includes(",")?t.split(",").map((e=>c(e))):c(t)),t))),r;function c(e){return e&&!isNaN(e)&&(e=parseInt(e,10)),e}}(s,a,o);if(i?.Tabs&&!Array.isArray(i?.Tabs)&&e.set(i,"Tabs",i?.Tabs?[i.Tabs.toString()]:[]),i?.Domains&&!Array.isArray(i?.Domains)&&e.set(i,"Domains",i?.Domains?[i.Domains.toString()]:[]),i?.Functions&&!Array.isArray(i?.Functions)&&e.set(i,"Functions",i?.Functions?[i.Functions.toString()]:[]),console.log(`✅ Set Environment Variables, Settings: ${typeof i}, Settings内容: ${JSON.stringify(i)}`,""),r.Storefront=new Map(r.Storefront),r.Locale&&(r.Locale=new Map(r.Locale)),r.i18n)for(let e in r.i18n)r.i18n[e]=new Map(r.i18n[e]);return{Settings:i,Caches:n,Configs:r}}const $=new s(" iRingo: 📍 Location v3.1.6(4) response"),A=class{static name="URI";static version="1.2.7";static about(){return console.log(`\n🟧 ${this.name} v${this.version}\n`)}static#c={scheme:"",host:"",path:"",query:{}};static parse(e){let t=e.match(/(?:(?.+):\/\/(?[^/]+))?\/?(?[^?]+)?\??(?[^?]+)?/)?.groups??null;if(t?.path?t.paths=t.path.split("/"):t.path="",t?.paths){const e=t.paths[t.paths.length-1];if(e?.includes(".")){const s=e.split(".");t.format=s[s.length-1]}}return t?.query&&(t.query=Object.fromEntries(t.query.split("&").map((e=>e.split("="))))),t}static stringify(e=this.#c){let t="";return e?.scheme&&e?.host&&(t+=e.scheme+"://"+e.host),e?.path&&(t+=e?.host?"/"+e.path:e.path),e?.query&&(t+="?"+Object.entries(e.query).map((e=>e.join("="))).join("&")),t}}.parse($request.url);$.log(`⚠ URL: ${JSON.stringify(A)}`,"");const O=$request.method,k=A.host,E=A.path;A.paths,$.log(`⚠ METHOD: ${O}`,"");const w=($response.headers?.["Content-Type"]??$response.headers?.["content-type"])?.split(";")?.[0];$.log(`⚠ FORMAT: ${w}`,""),(async()=>{const{Settings:s,Caches:o,Configs:i}=T("iRingo","Location",v);switch($.log(`⚠ Settings.Switch: ${s?.Switch}`,""),s.Switch){case!0:default:let i={};switch(w){case void 0:case"application/x-www-form-urlencoded":case"text/plain":default:case"application/x-mpegURL":case"application/x-mpegurl":case"application/vnd.apple.mpegurl":case"audio/mpegurl":break;case"text/xml":case"text/html":case"text/plist":case"application/xml":case"application/plist":case"application/x-plist":switch(k){case"gspe1-ssl.ls.apple.com":if("pep/gcc"===E)if(e.set(o,"pep.gcc",$response.body),t.setItem("@iRingo.Location.Caches",o),"AUTO"===s.PEP.GCC);else $response.body=s.PEP.GCC;break;case"configuration.ls.apple.com":if(i=a.parse($response.body),"config/defaults"===E){const e=i.plist;e&&(e["com.apple.GEO"].CountryProviders.CN.ShouldEnableLagunaBeach=s?.Config?.Defaults?.LagunaBeach??!0,e["com.apple.GEO"].CountryProviders.CN.DrivingMultiWaypointRoutesEnabled=s?.Config?.Defaults?.DrivingMultiWaypointRoutesEnabled??!0,e["com.apple.GEO"].CountryProviders.CN.GEOAddressCorrectionEnabled=s?.Config?.Defaults?.GEOAddressCorrection??!0,(s?.Config?.Defaults?.LookupMaxParametersCount??1)&&(delete e["com.apple.GEO"].CountryProviders.CN.GEOBatchSpatialEventLookupMaxParametersCount,delete e["com.apple.GEO"].CountryProviders.CN.GEOBatchSpatialPlaceLookupMaxParametersCount),e["com.apple.GEO"].CountryProviders.CN.LocalitiesAndLandmarksSupported=s?.Config?.Defaults?.LocalitiesAndLandmarks??!0,e["com.apple.GEO"].CountryProviders.CN.POIBusynessDifferentialPrivacy=s?.Config?.Defaults?.POIBusyness??!0,e["com.apple.GEO"].CountryProviders.CN.POIBusynessRealTime=s?.Config?.Defaults?.POIBusyness??!0,e["com.apple.GEO"].CountryProviders.CN.TransitPayEnabled=s?.Config?.Defaults?.TransitPayEnabled??!0,e["com.apple.GEO"].CountryProviders.CN.SupportsOffline=s?.Config?.Defaults?.SupportsOffline??!0,e["com.apple.GEO"].CountryProviders.CN.SupportsCarIntegration=s?.Config?.Defaults?.SupportsCarIntegration??!0,e["com.apple.GEO"].CountryProviders.CN["6694982d2b14e95815e44e970235e230"]=s?.Config?.Defaults?.["6694982d2b14e95815e44e970235e230"]??!0,e["com.apple.GEO"].CountryProviders.CN.PedestrianAREnabled=s?.Config?.Defaults?.PedestrianAR??!0,e["com.apple.GEO"].CountryProviders.CN.OpticalHeadingEnabled=s?.Config?.Defaults?.OpticalHeading??!0,e["com.apple.GEO"].CountryProviders.CN.UseCLPedestrianMapMatchedLocations=s?.Config?.Defaults?.UseCLPedestrianMapMatchedLocations??!0)}$response.body=a.stringify(i)}case"text/vtt":case"application/vtt":case"text/json":case"application/json":case"application/protobuf":case"application/x-protobuf":case"application/vnd.google.protobuf":case"application/grpc":case"application/grpc+proto":case"application/octet-stream":}case!1:}})().catch((e=>$.logErr(e))).finally((()=>$.done($response))); diff --git a/archive/js/Location_Services.beta.js b/archive/js/Location_Services.beta.js new file mode 100644 index 0000000..0a7691b --- /dev/null +++ b/archive/js/Location_Services.beta.js @@ -0,0 +1,852 @@ +// 判断是否是重写 +const isRequest = typeof $request != "undefined"; +const isResponse = typeof $response != "undefined"; +// 判断是否是Surge +const isSurge = typeof $httpClient != "undefined"; +// 判断是否是QuanX +const isQuanX = typeof $task != "undefined"; +// 判断是否是Loon +const isLoon = typeof $loon != "undefined"; +// 关闭请求 +const done = (value = {}) => { + if (isQuanX) return $done(value); + if (isSurge) isRequest ? $done(value) : $done(); +}; + +/* +README:https://github.com/VirgilClyne/iRingo +*/ + +// Default GeoCountryCode: US +let GeoCountryCode = "US"; +// Default Location Services Configs (test) +//let GEOAddressCorrectionEnabled = true; +//let ShouldEnableLagunaBeach = true; +//let PedestrianAREnabled = true; + +// Argument Function Supported +if (typeof $argument != "undefined") { + let arg = Object.fromEntries($argument.split("&").map((item) => item.split("="))); + console.log(JSON.stringify(arg)); + //GeoCountryCode = arg.GeoCountryCode; + //EnableAlberta = arg.EnableAlberta; + //GEOAddressCorrectionEnabled = arg.GEOAddressCorrectionEnabled; + //ShouldEnableLagunaBeach = arg.ShouldEnableLagunaBeach; + //PedestrianAREnabled = arg.PedestrianAREnabled; +}; + +const url = $request.url; + +const path0 = "/config/defaults"; +const path1 = "/pep/gcc"; +const path2 = "/dispatcher"; + +// +if (url.indexOf(path0) != -1) { + console.log(path0); + if (isRequest && !isResponse) { + var headers = $request.headers; + headers['If-None-Match'] = ''; + done({ headers }); + } else if (isResponse) { + var body = $response.body; + if (isQuanX) { + var x2js = new X2JS(); + body = x2js.xml2js(body); + //body = PlistParser.toPlist(config); + } else if (isSurge || isLoon) { + //var comappleGEO = /((?:\n\s{0,})(?:\n\s{0,})com\.apple\.GEO<\/key>(?:\n\s{0,})(?:\n\s{0,}))(.*)((?:\n\s{0,})<\/dict>(?:\n\s{0,})<\/plist>)/m; + //var CountryProviders = /CountryProviders<\/key>/m; + var CN = /(CountryProviders<\/key>(?:\n\s{0,})(?:\n\s.*)*CN<\/key>(?:\n\s{0,})(?:\n\s{0,}))(.*)((?:\n\s.*)*<\/dict>(?:\n\s{0,})CO<\/key>)/m; + var EnableAlberta = /((?:(?:\n\s{0,})(?:\n\s{0,})com\.apple\.GEO<\/key>(?:\n\s{0,})(?:\n\s.*)*CountryProviders<\/key>(?:\n\s{0,})(?:\n\s.*)*CN<\/key>(?:\n\s{0,})(?:\n\s.*)*)EnableAlberta<\/key>(?:\n\s{0,})<)(true|false)(\/>((?:\n\s.*)*<\/dict>(?:\n\s{0,})CO<\/key>))/m; + var GEOAddressCorrectionEnabled = /((?:(?:\n\s{0,})(?:\n\s{0,})com\.apple\.GEO<\/key>(?:\n\s{0,})(?:\n\s.*)*CountryProviders<\/key>(?:\n\s{0,})(?:\n\s.*)*CN<\/key>(?:\n\s{0,})(?:\n\s.*)*)GEOAddressCorrectionEnabled<\/key>(?:\n\s{0,})<)(true|false)(\/>((?:\n\s.*)*<\/dict>(?:\n\s{0,})CO<\/key>))/m; + var GEOGeocoderIsEncrypted = /((?:(?:\n\s{0,})(?:\n\s{0,})com\.apple\.GEO<\/key>(?:\n\s{0,})(?:\n\s.*)*CountryProviders<\/key>(?:\n\s{0,})(?:\n\s.*)*CN<\/key>(?:\n\s{0,})(?:\n\s.*)*)GEOGeocoderIsEncrypted<\/key>(?:\n\s{0,})<)(true|false)(\/>((?:\n\s.*)*<\/dict>(?:\n\s{0,})CO<\/key>))/m; + var LocalitiesAndLandmarksSupported = /((?:(?:\n\s{0,})(?:\n\s{0,})com\.apple\.GEO<\/key>(?:\n\s{0,})(?:\n\s.*)*CountryProviders<\/key>(?:\n\s{0,})(?:\n\s.*)*CN<\/key>(?:\n\s{0,})(?:\n\s.*)*)LocalitiesAndLandmarksSupported<\/key>(?:\n\s{0,})<)(true|false)(\/>((?:\n\s.*)*<\/dict>(?:\n\s{0,})CO<\/key>))/m; + var PedestrianAREnabled = /((?:(?:\n\s{0,})(?:\n\s{0,})com\.apple\.GEO<\/key>(?:\n\s{0,})(?:\n\s.*)*CountryProviders<\/key>(?:\n\s{0,})(?:\n\s.*)*CN<\/key>(?:\n\s{0,})(?:\n\s.*)*)PedestrianAREnabled<\/key>(?:\n\s{0,})<)(true|false)(\/>((?:\n\s.*)*<\/dict>(?:\n\s{0,})CO<\/key>))/m; + + //body = config.replace(variable, parameter); + //body = body.replace(EnableAlberta, '$1false$3'); + body = body.replace(GEOAddressCorrectionEnabled, '$1true$3'); + body = body.replace(GEOGeocoderIsEncrypted, '$1true$3'); + body = body.replace(LocalitiesAndLandmarksSupported, '$1true$3'); + body = body.replace(PedestrianAREnabled, '$1true$3'); + body = body.replace(CN, '$1ShouldEnableLagunaBeach\n \n GEOShouldSpeakWrittenAddresses\n \n GEOShouldSpeakWrittenPlaceNames\n \n $2$3'); + }; + done({ body }); + } +}; + +if (url.indexOf(path1) != -1) { + console.log(path1); + var today = new Date(); + var UTCstring = today.toUTCString(); + var response = {}; + response.headers = { + 'Content-Type': 'text/html', + 'Date': UTCstring, + 'Connection': 'keep-alive', + 'Content-Encoding': 'identity' + }; + response.body = GeoCountryCode; + if (isQuanX) { + response.status = "HTTP/1.1 200 OK"; + done(response); + } + if (isSurge || isLoon) { + response.status = 200; + done({ response }); + } +} else done(); + +if (url.indexOf(path2) != -1) { + console.log(path2); + if (isRequest) { + var body = $request.rawBody; + //var compass = /com\.apple\.compass/ + const isCompass = typeof body.includes("com.apple.compass"); + if (isCompass) body = body.replace(/CN/g, 'US'); + done({ rawBody }); + } +}; + +/***************** fast-xml-parser *****************/ +// prettier-ignore +// https://github.com/x2js/x2js/blob/development/x2js.js +/* + Copyright 2015 Axinom + Copyright 2011-2013 Abdulla Abdurakhmanov + Original sources are available at https://code.google.com/p/x2js/ + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ +function X2JS(config) { + var VERSION = "3.4.0"; + + config = config || {}; + + function initConfigDefaults() { + // If set to "property" then _asArray will be created + // to allow you to access any element as an array (even if there is only one of it). + config.arrayAccessForm = config.arrayAccessForm || "none"; + + // If "text" then will be transformed to "". + // If "object" then will be transformed to {}. + config.emptyNodeForm = config.emptyNodeForm || "text"; + + // Function that will be called for each elements, if the function returns true, the element will be skipped + // function(name, value) { return true; }; + config.jsAttributeFilter = config.jsAttributeFilter; + + // Function that will be called for each elements, the element value will be replaced by the returned value + // function(name, value) { return parseFloat(value); }; + config.jsAttributeConverter = config.jsAttributeConverter; + + // Allows attribute values to be converted on the fly during parsing to objects. + // "test": function(name, value) { return true; } + // "convert": function(name, value) { return parseFloat(value); }; + // convert() will be called for every attribute where test() returns true + // and the return value from convert() will replace the original value of the attribute. + config.attributeConverters = config.attributeConverters || []; + + // Any elements that match the paths here will have their text parsed + // as an XML datetime value (2011-11-12T13:00:00-07:00 style). + // The path can be a plain string (parent.child1.child2), + // a regex (/.*\.child2/) or function(elementPath). + config.datetimeAccessFormPaths = config.datetimeAccessFormPaths || []; + + // Any elements that match the paths listed here will be stored in JavaScript objects + // as arrays even if there is only one of them. The path can be a plain string + // (parent.child1.child2), a regex (/.*\.child2/) or function(elementName, elementPath). + config.arrayAccessFormPaths = config.arrayAccessFormPaths || []; + + // xmldom constructor arguments + // @see https://github.com/jindw/xmldom#api-reference + config.xmldomOptions = config.xmldomOptions || {}; + + // If true, a toString function is generated to print nodes containing text or cdata. + // Useful if you want to accept both plain text and CData as equivalent inputs. + if (config.enableToStringFunc === undefined) { + config.enableToStringFunc = true; + } + + // If true, empty text tags are ignored for elements with child nodes. + if (config.skipEmptyTextNodesForObj === undefined) { + config.skipEmptyTextNodesForObj = true; + } + + // If true, whitespace is trimmed from text nodes. + if (config.stripWhitespaces === undefined) { + config.stripWhitespaces = true; + } + + // If true, double quotes are used in generated XML. + if (config.useDoubleQuotes === undefined) { + config.useDoubleQuotes = true; + } + + // If true, the root element of the XML document is ignored when converting to objects. + // The result will directly have the root element's children as its own properties. + if (config.ignoreRoot === undefined) { + config.ignoreRoot = false; + } + + // Whether XML characters in text are escaped when reading/writing XML. + if (config.escapeMode === undefined) { + config.escapeMode = true; + } + + // Prefix to use for properties that are created to represent XML attributes. + if (config.attributePrefix === undefined) { + config.attributePrefix = "_"; + } + + // If true, empty elements will created as self closing elements () + // If false, empty elements will be created with start and end tags () + if (config.selfClosingElements === undefined) { + config.selfClosingElements = true; + } + + // If this property defined as false and an XML element has CData node ONLY, it will be converted to text without additional property "__cdata" + if (config.keepCData === undefined) { + config.keepCData = false; + } + + // If this property defined as true, use { __text: 'abc' } over 'abc' + if (config.keepText === undefined) { + config.keepText = false; + } + + // If true, will output dates in UTC + if (config.jsDateUTC === undefined) { + config.jsDateUTC = false; + } + } + + function initRequiredPolyfills() { + function pad(number) { + var r = String(number); + if (r.length === 1) { + r = '0' + r; + } + return r; + } + // Hello IE8- + if (typeof String.prototype.trim !== 'function') { + String.prototype.trim = function trim() { + return this.replace(/^\s+|^\n+|(\s|\n)+$/g, ''); + }; + } + if (typeof Date.prototype.toISOString !== 'function') { + // Implementation from http://stackoverflow.com/questions/2573521/how-do-i-output-an-iso-8601-formatted-string-in-javascript + Date.prototype.toISOString = function toISOString() { + var MS_IN_S = 1000; + + return this.getUTCFullYear() + + '-' + pad(this.getUTCMonth() + 1) + + '-' + pad(this.getUTCDate()) + + 'T' + pad(this.getUTCHours()) + + ':' + pad(this.getUTCMinutes()) + + ':' + pad(this.getUTCSeconds()) + + '.' + String((this.getUTCMilliseconds() / MS_IN_S).toFixed(3)).slice(2, 5) + + 'Z'; + }; + } + } + + initConfigDefaults(); + initRequiredPolyfills(); + + var DOMNodeTypes = { + "ELEMENT_NODE": 1, + "TEXT_NODE": 3, + "CDATA_SECTION_NODE": 4, + "COMMENT_NODE": 8, + "DOCUMENT_NODE": 9 + }; + + function getDomNodeLocalName(domNode) { + var localName = domNode.localName; + if (localName == null) { + // Yeah, this is IE!! + localName = domNode.baseName; + } + if (localName == null || localName === "") { + // ==="" is IE too + localName = domNode.nodeName; + } + return localName; + } + + function getDomNodeNamespacePrefix(node) { + return node.prefix; + } + + function escapeXmlChars(str) { + if (typeof str === "string") + return str.replace(/&/g, '&').replace(//g, '>').replace(/"/g, '"').replace(/'/g, '''); + else + return str; + } + + function unescapeXmlChars(str) { + return str.replace(/</g, '<').replace(/>/g, '>').replace(/"/g, '"').replace(/'/g, "'").replace(/&/g, '&'); + } + + function ensureProperArrayAccessForm(element, childName, elementPath) { + switch (config.arrayAccessForm) { + case "property": + if (!(element[childName] instanceof Array)) + element[childName + "_asArray"] = [element[childName]]; + else + element[childName + "_asArray"] = element[childName]; + break; + } + + if (!(element[childName] instanceof Array) && config.arrayAccessFormPaths.length > 0) { + var match = false; + + for (var i = 0; i < config.arrayAccessFormPaths.length; i++) { + var arrayPath = config.arrayAccessFormPaths[i]; + if (typeof arrayPath === "string") { + if (arrayPath === elementPath) { + match = true; + break; + } + } else if (arrayPath instanceof RegExp) { + if (arrayPath.test(elementPath)) { + match = true; + break; + } + } else if (typeof arrayPath === "function") { + if (arrayPath(childName, elementPath)) { + match = true; + break; + } + } + } + + if (match) + element[childName] = [element[childName]]; + } + } + + function xmlDateTimeToDate(prop) { + // Implementation based up on http://stackoverflow.com/questions/8178598/xml-datetime-to-javascript-date-object + // Improved to support full spec and optional parts + var MINUTES_PER_HOUR = 60; + + var bits = prop.split(/[-T:+Z]/g); + + var d = new Date(bits[0], bits[1] - 1, bits[2]); + var secondBits = bits[5].split("\."); + d.setHours(bits[3], bits[4], secondBits[0]); + if (secondBits.length > 1) + d.setMilliseconds(secondBits[1]); + + // Get supplied time zone offset in minutes + if (bits[6] && bits[7]) { + var offsetMinutes = bits[6] * MINUTES_PER_HOUR + Number(bits[7]); + var sign = /\d\d-\d\d:\d\d$/.test(prop) ? '-' : '+'; + + // Apply the sign + offsetMinutes = 0 + (sign === '-' ? -1 * offsetMinutes : offsetMinutes); + + // Apply offset and local timezone + d.setMinutes(d.getMinutes() - offsetMinutes - d.getTimezoneOffset()); + } else if (prop.indexOf("Z", prop.length - 1) !== -1) { + d = new Date(Date.UTC(d.getFullYear(), d.getMonth(), d.getDate(), d.getHours(), d.getMinutes(), d.getSeconds(), d.getMilliseconds())); + } + + // d is now a local time equivalent to the supplied time + return d; + } + + function convertToDateIfRequired(value, childName, fullPath) { + if (config.datetimeAccessFormPaths.length > 0) { + var pathWithoutTextNode = fullPath.split("\.#")[0]; + + for (var i = 0; i < config.datetimeAccessFormPaths.length; i++) { + var candidatePath = config.datetimeAccessFormPaths[i]; + if (typeof candidatePath === "string") { + if (candidatePath === pathWithoutTextNode) + return xmlDateTimeToDate(value); + } else if (candidatePath instanceof RegExp) { + if (candidatePath.test(pathWithoutTextNode)) + return xmlDateTimeToDate(value); + } else if (typeof candidatePath === "function") { + if (candidatePath(pathWithoutTextNode)) + return xmlDateTimeToDate(value); + } + } + } + + return value; + } + + function deserializeRootElementChildren(rootElement) { + var result = {}; + var children = rootElement.childNodes; + + // Alternative for firstElementChild which is not supported in some environments + for (var i = 0; i < children.length; i++) { + var child = children.item(i); + if (child.nodeType === DOMNodeTypes.ELEMENT_NODE) { + var childName = getDomNodeLocalName(child); + + if (config.ignoreRoot) + result = deserializeDomChildren(child, childName); + else + result[childName] = deserializeDomChildren(child, childName); + } + } + + return result; + } + + function deserializeElementChildren(element, elementPath) { + var result = {}; + result.__cnt = 0; + + var nodeChildren = element.childNodes; + + // Child nodes. + for (var iChild = 0; iChild < nodeChildren.length; iChild++) { + var child = nodeChildren.item(iChild); + var childName = getDomNodeLocalName(child); + + if (child.nodeType === DOMNodeTypes.COMMENT_NODE) + continue; + + result.__cnt++; + + // We deliberately do not accept everything falsey here because + // elements that resolve to empty string should still be preserved. + if (result[childName] == null) { + result[childName] = deserializeDomChildren(child, elementPath + "." + childName); + ensureProperArrayAccessForm(result, childName, elementPath + "." + childName); + } else { + if (!(result[childName] instanceof Array)) { + result[childName] = [result[childName]]; + ensureProperArrayAccessForm(result, childName, elementPath + "." + childName); + } + + result[childName][result[childName].length] = deserializeDomChildren(child, elementPath + "." + childName); + } + } + + // Attributes + for (var iAttribute = 0; iAttribute < element.attributes.length; iAttribute++) { + var attribute = element.attributes.item(iAttribute); + result.__cnt++; + + var adjustedValue = attribute.value; + for (var iConverter = 0; iConverter < config.attributeConverters.length; iConverter++) { + var converter = config.attributeConverters[iConverter]; + if (converter.test.call(null, attribute.name, attribute.value)) + adjustedValue = converter.convert.call(null, attribute.name, attribute.value); + } + + result[config.attributePrefix + attribute.name] = adjustedValue; + } + + // Node namespace prefix + var namespacePrefix = getDomNodeNamespacePrefix(element); + if (namespacePrefix) { + result.__cnt++; + result.__prefix = namespacePrefix; + } + + if (result["#text"]) { + result.__text = result["#text"]; + + if (result.__text instanceof Array) { + result.__text = result.__text.join("\n"); + } + + if (config.escapeMode) + result.__text = unescapeXmlChars(result.__text); + + if (config.stripWhitespaces) + result.__text = result.__text.trim(); + + delete result["#text"]; + + if (config.arrayAccessForm === "property") + delete result["#text_asArray"]; + + result.__text = convertToDateIfRequired(result.__text, "#text", elementPath + ".#text"); + } + + if (result.hasOwnProperty('#cdata-section')) { + result.__cdata = result["#cdata-section"]; + delete result["#cdata-section"]; + + if (config.arrayAccessForm === "property") + delete result["#cdata-section_asArray"]; + } + + if (result.__cnt === 1 && result.__text && !config.keepText) { + result = result.__text; + } else if (result.__cnt === 0 && config.emptyNodeForm === "text") { + result = ''; + } else if (result.__cnt > 1 && result.__text !== undefined && config.skipEmptyTextNodesForObj) { + if (config.stripWhitespaces && result.__text === "" || result.__text.trim() === "") { + delete result.__text; + } + } + delete result.__cnt; + + /** + * We are checking if we are creating a __cdata property or if we just add the content of cdata inside result. + * But, if we have a property inside xml tag (), and a cdata inside, we can't ignore it. + * In this case we are keeping __cdata property. + */ + if (!config.keepCData && (!result.hasOwnProperty('__text') && result.hasOwnProperty('__cdata') && Object.keys(result).length === 1)) { + return (result.__cdata ? result.__cdata : ''); + } + + if (config.enableToStringFunc && (result.__text || result.__cdata)) { + result.toString = function toString() { + return (this.__text ? this.__text : '') + (this.__cdata ? this.__cdata : ''); + }; + } + + return result; + } + + function deserializeDomChildren(node, parentPath) { + if (node.nodeType === DOMNodeTypes.DOCUMENT_NODE) { + return deserializeRootElementChildren(node); + } else if (node.nodeType === DOMNodeTypes.ELEMENT_NODE) { + return deserializeElementChildren(node, parentPath); + } else if (node.nodeType === DOMNodeTypes.TEXT_NODE || node.nodeType === DOMNodeTypes.CDATA_SECTION_NODE) { + return node.nodeValue; + } else { + return null; + } + } + + function serializeStartTag(jsObject, elementName, attributeNames, selfClosing) { + var resultStr = "<" + ((jsObject && jsObject.__prefix) ? (jsObject.__prefix + ":") : "") + elementName; + + if (attributeNames) { + for (var i = 0; i < attributeNames.length; i++) { + var attributeName = attributeNames[i]; + var attributeValue = jsObject[attributeName]; + + if (config.escapeMode) + attributeValue = escapeXmlChars(attributeValue); + + resultStr += " " + attributeName.substr(config.attributePrefix.length) + "="; + + if (config.useDoubleQuotes) + resultStr += '"' + attributeValue + '"'; + else + resultStr += "'" + attributeValue + "'"; + } + } + + if (!selfClosing) + resultStr += ">"; + else + resultStr += " />"; + + return resultStr; + } + + function serializeEndTag(jsObject, elementName) { + return ""; + } + + function endsWith(str, suffix) { + return str.indexOf(suffix, str.length - suffix.length) !== -1; + } + + function isSpecialProperty(jsonObj, propertyName) { + if ((config.arrayAccessForm === "property" && endsWith(propertyName.toString(), ("_asArray"))) + || propertyName.toString().indexOf(config.attributePrefix) === 0 + || propertyName.toString().indexOf("__") === 0 + || (jsonObj[propertyName] instanceof Function)) + return true; + else + return false; + } + + function getDataElementCount(jsObject) { + var count = 0; + + if (jsObject instanceof Object) { + for (var propertyName in jsObject) { + if (isSpecialProperty(jsObject, propertyName)) + continue; + + count++; + } + } + + return count; + } + + function getDataAttributeNames(jsObject) { + var names = []; + + if (jsObject instanceof Object) { + for (var attributeName in jsObject) { + if (attributeName.toString().indexOf("__") === -1 + && attributeName.toString().indexOf(config.attributePrefix) === 0) { + names.push(attributeName); + } + } + } + + return names; + } + + function serializeComplexTextNodeContents(textNode) { + var result = ""; + + if (textNode.__cdata) { + result += ""; + } + + if (textNode.__text || typeof (textNode.__text) === 'number' || typeof (textNode.__text) === 'boolean') { + if (config.escapeMode) + result += escapeXmlChars(textNode.__text); + else + result += textNode.__text; + } + + return result; + } + + function serializeTextNodeContents(textNode) { + var result = ""; + + if (textNode instanceof Object) { + result += serializeComplexTextNodeContents(textNode); + } else if (textNode !== null) { + if (config.escapeMode) + result += escapeXmlChars(textNode); + else + result += textNode; + } + + return result; + } + + function serializeArray(elementArray, elementName, attributes) { + var result = ""; + + if (elementArray.length === 0) { + result += serializeStartTag(elementArray, elementName, attributes, true); + } else { + for (var i = 0; i < elementArray.length; i++) { + result += serializeJavaScriptObject(elementArray[i], elementName, getDataAttributeNames(elementArray[i])); + } + } + + return result; + } + + function serializeJavaScriptObject(element, elementName, attributes) { + var result = ""; + + // Filter out elements + if (config.jsAttributeFilter && config.jsAttributeFilter.call(null, elementName, element)) { + return result; + } + // Convert element + if (config.jsAttributeConverter) { + element = config.jsAttributeConverter.call(null, elementName, element); + } + if ((element === undefined || element === null || element === '') && config.selfClosingElements) { + result += serializeStartTag(element, elementName, attributes, true); + } else if (typeof element === 'object') { + if (Object.prototype.toString.call(element) === '[object Array]') { + result += serializeArray(element, elementName, attributes); + } else if (element instanceof Date) { + result += serializeStartTag(element, elementName, attributes, false); + // Serialize date + result += config.jsDateUTC ? element.toUTCString() : element.toISOString(); + result += serializeEndTag(element, elementName); + } else { + var childElementCount = getDataElementCount(element); + if (childElementCount > 0 || typeof (element.__text) === 'number' || typeof (element.__text) === 'boolean' || element.__text || element.__cdata) { + result += serializeStartTag(element, elementName, attributes, false); + result += serializeJavaScriptObjectChildren(element); + result += serializeEndTag(element, elementName); + } else if (config.selfClosingElements) { + result += serializeStartTag(element, elementName, attributes, true); + } else { + result += serializeStartTag(element, elementName, attributes, false); + result += serializeEndTag(element, elementName); + } + } + } else { + result += serializeStartTag(element, elementName, attributes, false); + result += serializeTextNodeContents(element); + result += serializeEndTag(element, elementName); + } + + return result; + } + + function serializeJavaScriptObjectChildren(jsObject) { + var result = ""; + + var elementCount = getDataElementCount(jsObject); + + if (elementCount > 0) { + for (var elementName in jsObject) { + if (isSpecialProperty(jsObject, elementName)) + continue; + + var element = jsObject[elementName]; + var attributes = getDataAttributeNames(element); + + result += serializeJavaScriptObject(element, elementName, attributes); + } + } + + result += serializeTextNodeContents(jsObject); + + return result; + } + + function parseXml(xml) { + if (xml === undefined) { + return null; + } + + if (typeof xml !== "string") { + return null; + } + + var parser = null; + var domNode = null; + if (DOMParser) { + parser = new DOMParser(config.xmldomOptions); + + domNode = parser.parseFromString(xml, "text/xml"); + } else if (CustomDOMParser) { + // This branch is used for node.js, with the xmldom parser. + parser = new CustomDOMParser(config.xmldomOptions); + + domNode = parser.parseFromString(xml, "text/xml"); + } else if (window && window.DOMParser) { + parser = new window.DOMParser(); + var parsererrorNS = null; + + var isIEParser = window.ActiveXObject || "ActiveXObject" in window; + + // IE9+ now is here + if (!isIEParser && document.all && !document.addEventListener) { + try { + parsererrorNS = parser.parseFromString("INVALID", "text/xml").childNodes[0].namespaceURI; + } catch (err) { + parsererrorNS = null; + } + } + + try { + domNode = parser.parseFromString(xml, "text/xml"); + if (parsererrorNS !== null && domNode.getElementsByTagNameNS(parsererrorNS, "parsererror").length > 0) { + domNode = null; + } + } catch (err) { + domNode = null; + } + } else { + // IE :( + if (xml.indexOf("") + 2); + } + + /* global ActiveXObject */ + domNode = new ActiveXObject("Microsoft.XMLDOM"); + domNode.async = "false"; + domNode.loadXML(xml); + } + + return domNode; + } + + this.asArray = function asArray(prop) { + if (prop === undefined || prop === null) { + return []; + } else if (prop instanceof Array) { + return prop; + } else { + return [prop]; + } + }; + + this.toXmlDateTime = function toXmlDateTime(dt) { + if (dt instanceof Date) { + return dt.toISOString(); + } else if (typeof (dt) === 'number') { + return new Date(dt).toISOString(); + } else { + return null; + } + }; + + this.asDateTime = function asDateTime(prop) { + if (typeof (prop) === "string") { + return xmlDateTimeToDate(prop); + } else { + return prop; + } + }; + + /* + Internally the logic works in a cycle: + DOM->JS - implemented by custom logic (deserialization). + JS->XML - implemented by custom logic (serialization). + XML->DOM - implemented by browser. + */ + + // Transformns an XML string into DOM-tree + this.xml2dom = function xml2dom(xml) { + return parseXml(xml); + }; + + // Transforms a DOM tree to JavaScript objects. + this.dom2js = function dom2js(domNode) { + return deserializeDomChildren(domNode, null); + }; + + // Transforms JavaScript objects to a DOM tree. + this.js2dom = function js2dom(jsObject) { + var xml = this.js2xml(jsObject); + return parseXml(xml); + }; + + // Transformns an XML string into JavaScript objects. + this.xml2js = function xml2js(xml) { + var domNode = parseXml(xml); + if (domNode != null) + return this.dom2js(domNode); + else + return null; + }; + + // Transforms JavaScript objects into an XML string. + this.js2xml = function js2xml(jsObject) { + return serializeJavaScriptObjectChildren(jsObject); + }; + + this.getVersion = function getVersion() { + return VERSION; + }; +}; diff --git a/archive/js/Location_Services.js b/archive/js/Location_Services.js new file mode 100644 index 0000000..c2eacc0 --- /dev/null +++ b/archive/js/Location_Services.js @@ -0,0 +1,96 @@ +// 判断是否是重写 +const isRequest = typeof $request != "undefined"; +const isResponse = typeof $response != "undefined"; +// 判断是否是Surge +const isSurge = typeof $httpClient != "undefined"; +// 判断是否是QuanX +const isQuanX = typeof $task != "undefined"; +// 判断是否是Loon +const isLoon = typeof $loon != "undefined"; +// 关闭请求 +const done = (value = {}) => { + if (isQuanX) return $done(value); + if (isSurge) isRequest ? $done(value) : $done(); +}; + +/* +README:https://github.com/VirgilClyne/iRingo +*/ + +// Default GeoCountryCode: US +let GeoCountryCode = "US"; +// Default Location Services Configs (test) +//let GEOAddressCorrectionEnabled = true; +//let ShouldEnableLagunaBeach = true; +//let PedestrianAREnabled = true; + +// Argument Function Supported +if (typeof $argument != "undefined") { + let arg = Object.fromEntries($argument.split("&").map((item) => item.split("="))); + console.log(JSON.stringify(arg)); + //GeoCountryCode = arg.GeoCountryCode; + //EnableAlberta = arg.EnableAlberta; + //GEOAddressCorrectionEnabled = arg.GEOAddressCorrectionEnabled; + //ShouldEnableLagunaBeach = arg.ShouldEnableLagunaBeach; + //PedestrianAREnabled = arg.PedestrianAREnabled; +}; + +const url = $request.url; + +const path0 = "/config/defaults"; +const path1 = "/pep/gcc"; + +if (url.indexOf(path0) != -1) { + console.log(path0); + if (isRequest && !isResponse) { + var headers = $request.headers; + headers['If-None-Match'] = ''; + done({ headers }); + } + if (isResponse) { + var body = $response.body; + //var comappleGEO = /((?:\n\s{0,})(?:\n\s{0,})com\.apple\.GEO<\/key>(?:\n\s{0,})(?:\n\s{0,}))(.*)((?:\n\s{0,})<\/dict>(?:\n\s{0,})<\/plist>)/m; + //var CountryProviders = /CountryProviders<\/key>/m; + var CN = /(CountryProviders<\/key>(?:\n\s{0,})(?:\n\s.*)*CN<\/key>(?:\n\s{0,})(?:\n\s{0,}))(.*)((?:\n\s.*)*<\/dict>(?:\n\s{0,})CO<\/key>)/m; + var EnableAlberta = /((?:(?:\n\s{0,})(?:\n\s{0,})com\.apple\.GEO<\/key>(?:\n\s{0,})(?:\n\s.*)*CountryProviders<\/key>(?:\n\s{0,})(?:\n\s.*)*CN<\/key>(?:\n\s{0,})(?:\n\s.*)*)EnableAlberta<\/key>(?:\n\s{0,})<)(true|false)(\/>((?:\n\s.*)*<\/dict>(?:\n\s{0,})CO<\/key>))/m; + var GEOAddressCorrectionEnabled = /((?:(?:\n\s{0,})(?:\n\s{0,})com\.apple\.GEO<\/key>(?:\n\s{0,})(?:\n\s.*)*CountryProviders<\/key>(?:\n\s{0,})(?:\n\s.*)*CN<\/key>(?:\n\s{0,})(?:\n\s.*)*)GEOAddressCorrectionEnabled<\/key>(?:\n\s{0,})<)(true|false)(\/>((?:\n\s.*)*<\/dict>(?:\n\s{0,})CO<\/key>))/m; + var LocalitiesAndLandmarksSupported = /((?:(?:\n\s{0,})(?:\n\s{0,})com\.apple\.GEO<\/key>(?:\n\s{0,})(?:\n\s.*)*CountryProviders<\/key>(?:\n\s{0,})(?:\n\s.*)*CN<\/key>(?:\n\s{0,})(?:\n\s.*)*)LocalitiesAndLandmarksSupported<\/key>(?:\n\s{0,})<)(true|false)(\/>((?:\n\s.*)*<\/dict>(?:\n\s{0,})CO<\/key>))/m; + var PedestrianAREnabled = /((?:(?:\n\s{0,})(?:\n\s{0,})com\.apple\.GEO<\/key>(?:\n\s{0,})(?:\n\s.*)*CountryProviders<\/key>(?:\n\s{0,})(?:\n\s.*)*CN<\/key>(?:\n\s{0,})(?:\n\s.*)*)PedestrianAREnabled<\/key>(?:\n\s{0,})<)(true|false)(\/>((?:\n\s.*)*<\/dict>(?:\n\s{0,})CO<\/key>))/m; + + //body = config.replace(variable, parameter); + //body = body.replace(EnableAlberta, '$1false$3'); + body = body.replace(GEOAddressCorrectionEnabled, '$1true$3'); + body = body.replace(LocalitiesAndLandmarksSupported, '$1true$3'); + body = body.replace(PedestrianAREnabled, '$1true$3'); + body = body.replace(CN, '$1ShouldEnableLagunaBeach\n \n$2$3'); + done({ body }); + } +}; + + +if (url.indexOf(path1) != -1) { + console.log(path1); + var today = new Date(); + var UTCstring = today.toUTCString(); + var response = {}; + response.headers = { + 'Content-Type': 'text/html', + 'Date': UTCstring, + 'Connection': 'keep-alive', + 'Content-Encoding': 'identity' + }; + response.body = GeoCountryCode; + if (isQuanX) { + response.status = "HTTP/1.1 200 OK"; + done(response); + } + if (isSurge || isLoon) { + response.status = 200; + done({ response }); + } +} else done(); + +function xmlReplace(body, variable, parameter) { + xml = body.replace(variable, parameter); + return xml; +}; diff --git a/archive/modules/Apple_Maps.beta.sgmodule b/archive/modules/Apple_Maps.beta.sgmodule new file mode 100644 index 0000000..3807281 --- /dev/null +++ b/archive/modules/Apple_Maps.beta.sgmodule @@ -0,0 +1,10 @@ +#!name= Redirect Apple Maps to 🇺🇳I18N +#!desc=(BETA) 只作用于Apple Maps,不修改定位服务和地区检测,可以通过搭配使用其他模块达成混合效果。 + +[URL Rewrite] +# Redirect Apple Maps to 🇺🇳I18N +(^https?:\/\/gspe\d*-ssl\.ls\.apple\.)(com|cn)(\/.*)(country_code=[A-Z]{2})(.*) $1$2$3country_code=CN$5 header +(^https?:\/\/gspe\d*-ssl\.ls\.apple\.)(com|cn)(\/.*)(environment=[a-z/-]{4,})(.*) $1$2$3environment=prod$5 header + +[MITM] +hostname = %APPEND% gspe35-ssl.ls.apple.com diff --git a/archive/modules/Apple_Maps.plugin b/archive/modules/Apple_Maps.plugin new file mode 100644 index 0000000..e55576a --- /dev/null +++ b/archive/modules/Apple_Maps.plugin @@ -0,0 +1,10 @@ +#!name= Redirect Apple Maps to 🇺🇸US +#!desc=只作用于Apple Maps,不修改定位服务和地区检测,可以通过搭配使用其他模块达成混合效果。 + +[URL Rewrite] +# Redirect Apple Maps to US +(^https?:\/\/gspe\d*-ssl\.ls\.apple\.)(com|cn)(\/.*)(country_code=[A-Z]{2})(.*) $1$2$3country_code=US$5 header +(^https?:\/\/gspe\d*-ssl\.ls\.apple\.)(com|cn)(\/.*)(environment=[a-z/-]{4,})(.*) $1$2$3environment=prod$5 header + +[MITM] +hostname = gspe35-ssl.ls.apple.com diff --git a/archive/modules/Apple_Maps.qxrewrite b/archive/modules/Apple_Maps.qxrewrite new file mode 100644 index 0000000..19003c6 --- /dev/null +++ b/archive/modules/Apple_Maps.qxrewrite @@ -0,0 +1,8 @@ +#!name= Redirect Apple Maps to 🇺🇸US +#!desc=只作用于Apple Maps,不修改定位服务和地区检测,可以通过搭配使用其他模块达成混合效果。 + +# Redirect Apple Maps to US +(^https?:\/\/gspe\d*-ssl\.ls\.apple\.)(com|cn)(\/.*)(country_code=[A-Z]{2})(.*) url 302 $1$2$3country_code=US$5 +(^https?:\/\/gspe\d*-ssl\.ls\.apple\.)(com|cn)(\/.*)(environment=[a-z/-]{4,})(.*) url 302 $1$2$3environment=prod$5 + +hostname = gspe35-ssl.ls.apple.com diff --git a/archive/modules/Apple_Maps.sgmodule b/archive/modules/Apple_Maps.sgmodule new file mode 100644 index 0000000..eb7d1ae --- /dev/null +++ b/archive/modules/Apple_Maps.sgmodule @@ -0,0 +1,10 @@ +#!name= Redirect Apple Maps to 🇺🇸US +#!desc=只作用于Apple Maps,不修改定位服务和地区检测,可以通过搭配使用其他模块达成混合效果。 + +[URL Rewrite] +# Redirect Apple Maps to US +(^https?:\/\/gspe\d*-ssl\.ls\.apple\.)(com|cn)(\/.*)(country_code=[A-Z]{2})(.*) $1$2$3country_code=US$5 header +(^https?:\/\/gspe\d*-ssl\.ls\.apple\.)(com|cn)(\/.*)(environment=[a-z/-]{4,})(.*) $1$2$3environment=prod$5 header + +[MITM] +hostname = %APPEND% gspe35-ssl.ls.apple.com diff --git a/archive/modules/Apple_Maps.stoverride b/archive/modules/Apple_Maps.stoverride new file mode 100644 index 0000000..1ba388d --- /dev/null +++ b/archive/modules/Apple_Maps.stoverride @@ -0,0 +1,9 @@ +name:  Redirect Apple Maps to 🇺🇸US +desc: 只作用于Apple Maps,不修改定位服务和地区检测,可以通过搭配使用其他模块达成混合效果。 + +http: + mitm: + - "gspe35-ssl.ls.apple.com" + rewrite: + - (^https?:\/\/gspe\d*-ssl\.ls\.apple\.)(com|cn)(\/.*)(country_code=[A-Z]{2})(.*) $1$2$3country_code=US$5 302 + - (^https?:\/\/gspe\d*-ssl\.ls\.apple\.)(com|cn)(\/.*)(environment=[a-z/-]{4,})(.*) $1$2$3environment=prod$5 302 diff --git a/archive/modules/Apple_Maps_CN.plugin b/archive/modules/Apple_Maps_CN.plugin new file mode 100644 index 0000000..f234a08 --- /dev/null +++ b/archive/modules/Apple_Maps_CN.plugin @@ -0,0 +1,10 @@ +#!name= Redirect Apple Maps to 🇨🇳CN +#!desc=只作用于Apple Maps,不修改定位服务和地区检测,可以通过搭配使用其他模块达成混合效果。 + +[URL Rewrite] +# Redirect Apple Maps to CN +(^https?:\/\/gspe\d*-ssl\.ls\.apple\.)(com|cn)(\/.*)(country_code=[A-Z]{2})(.*) $1$2$3country_code=CN$5 header +(^https?:\/\/gspe\d*-ssl\.ls\.apple\.)(com|cn)(\/.*)(environment=[a-z/-]{4,})(.*) $1$2$3environment=prod-cn$5 header + +[MITM] +hostname = gspe35-ssl.ls.apple.com diff --git a/archive/modules/Apple_Maps_CN.qxrewrite b/archive/modules/Apple_Maps_CN.qxrewrite new file mode 100644 index 0000000..9814ecc --- /dev/null +++ b/archive/modules/Apple_Maps_CN.qxrewrite @@ -0,0 +1,8 @@ +#!name= Redirect Apple Maps to 🇨🇳CN +#!desc=只作用于Apple Maps,不修改定位服务和地区检测,可以通过搭配使用其他模块达成混合效果。 + +# Redirect Apple Maps to CN +(^https?:\/\/gspe\d*-ssl\.ls\.apple\.)(com|cn)(\/.*)(country_code=[A-Z]{2})(.*) url 302 $1$2$3country_code=CN$5 +(^https?:\/\/gspe\d*-ssl\.ls\.apple\.)(com|cn)(\/.*)(environment=[a-z/-]{4,})(.*) url 302 $1$2$3environment=prod-cn$5 + +hostname = gspe35-ssl.ls.apple.com diff --git a/archive/modules/Apple_Maps_CN.sgmodule b/archive/modules/Apple_Maps_CN.sgmodule new file mode 100644 index 0000000..731f638 --- /dev/null +++ b/archive/modules/Apple_Maps_CN.sgmodule @@ -0,0 +1,10 @@ +#!name= Redirect Apple Maps to 🇨🇳CN +#!desc=只作用于Apple Maps,不修改定位服务和地区检测,可以通过搭配使用其他模块达成混合效果。 + +[URL Rewrite] +# Redirect Apple Maps to CN +(^https?:\/\/gspe\d*-ssl\.ls\.apple\.)(com|cn)(\/.*)(country_code=[A-Z]{2})(.*) $1$2$3country_code=CN$5 header +(^https?:\/\/gspe\d*-ssl\.ls\.apple\.)(com|cn)(\/.*)(environment=[a-z/-]{4,})(.*) $1$2$3environment=prod-cn$5 header + +[MITM] +hostname = %APPEND% gspe35-ssl.ls.apple.com diff --git a/archive/modules/Apple_Maps_CN.stoverride b/archive/modules/Apple_Maps_CN.stoverride new file mode 100644 index 0000000..a539081 --- /dev/null +++ b/archive/modules/Apple_Maps_CN.stoverride @@ -0,0 +1,9 @@ +name:  Redirect Apple Maps to 🇨🇳CN +desc: 只作用于Apple Maps,不修改定位服务和地区检测,可以通过搭配使用其他模块达成混合效果。 + +http: + mitm: + - "gspe35-ssl.ls.apple.com" + rewrite: + - (^https?:\/\/gspe\d*-ssl\.ls\.apple\.)(com|cn)(\/.*)(country_code=[A-Z]{2})(.*) $1$2$3country_code=CN$5 302 + - (^https?:\/\/gspe\d*-ssl\.ls\.apple\.)(com|cn)(\/.*)(environment=[a-z/-]{4,})(.*) $1$2$3environment=prod-cn$5 302 diff --git a/archive/modules/Geo_Services.plugin b/archive/modules/Geo_Services.plugin new file mode 100644 index 0000000..dbc9ba3 --- /dev/null +++ b/archive/modules/Geo_Services.plugin @@ -0,0 +1,14 @@ +#!name= Response Geo Services to 🇺🇸US +#!desc=(V1.5) 只作用于检测地区,不修改Apple Maps和Apple News,可以通过搭配使用其他模块达成混合效果。 +#!openUrl=http://boxjs.com/#/app/iRingo.Location +#!author=VirgilClyne +#!homepage=https://github.com/VirgilClyne +#!manual=https://github.com/VirgilClyne/iRingo#定位服务 +#!icon=https://images.macrumors.com/article-new/2019/07/ios_location_services-250x250.jpg + +[Script] +# Response Geo Services to US +http-request ^https?:\/\/gspe\d*-ssl\.ls\.apple\.com(/pep/gcc) script-path=https://raw.githubusercontent.com/VirgilClyne/iRingo/main/archive/js/Geo_Services.js, tag=Geo_Services + +[MITM] +hostname = gspe1-ssl.ls.apple.com diff --git a/archive/modules/Geo_Services.qxrewrite b/archive/modules/Geo_Services.qxrewrite new file mode 100644 index 0000000..b0194c1 --- /dev/null +++ b/archive/modules/Geo_Services.qxrewrite @@ -0,0 +1,8 @@ +#!name= Response Geo Services to 🇺🇸US +#!version=V1.5 +#!desc=只作用于检测地区,不修改Apple Maps和Apple News,可以通过搭配使用其他模块达成混合效果。 + +# Response Geo Services to US +^https?:\/\/gspe1-ssl\.ls\.apple\.com\/pep\/gcc url script-echo-response https://raw.githubusercontent.com/VirgilClyne/iRingo/main/archive/js/Geo_Services.js + +hostname = gspe1-ssl.ls.apple.com diff --git a/archive/modules/Geo_Services.sgmodule b/archive/modules/Geo_Services.sgmodule new file mode 100644 index 0000000..fe91f67 --- /dev/null +++ b/archive/modules/Geo_Services.sgmodule @@ -0,0 +1,9 @@ +#!name= Response Geo Services to 🇺🇸US +#!desc=(V1.5) 只作用于检测地区,不修改Apple Maps和Apple News,可以通过搭配使用其他模块达成混合效果。 + +[Script] +# Response Geo Services to US +Geo Services = type=http-request, pattern=^https?:\/\/gspe\d*-ssl\.ls\.apple\.com(\/pep\/gcc), argument=GeoCountryCode=US, requires-body=0, script-path=https://raw.githubusercontent.com/VirgilClyne/iRingo/main/archive/js/Geo_Services.js + +[MITM] +hostname = %APPEND% gspe1-ssl.ls.apple.com diff --git a/archive/modules/Geo_Services.stoverride b/archive/modules/Geo_Services.stoverride new file mode 100644 index 0000000..9447534 --- /dev/null +++ b/archive/modules/Geo_Services.stoverride @@ -0,0 +1,17 @@ +name:  Response Geo Services to 🇺🇸US +desc: (V1.5) 只作用于检测地区,不修改Apple Maps和Apple News,可以通过搭配使用其他模块达成混合效果。 + +http: + mitm: + - "gspe1-ssl.ls.apple.com" + script: + - match: ^https?:\/\/gspe\d*-ssl\.ls\.apple\.com(\/pep\/gcc) + name: Geo_Services + type: request + require-body: false + timeout: 10 + +script-providers: + Geo_Services: + url: https://raw.githubusercontent.com/VirgilClyne/iRingo/main/archive/js/Geo_Services.js + interval: 86400 diff --git a/archive/modules/Geo_Services_AU.sgmodule b/archive/modules/Geo_Services_AU.sgmodule new file mode 100644 index 0000000..99d5269 --- /dev/null +++ b/archive/modules/Geo_Services_AU.sgmodule @@ -0,0 +1,9 @@ +#!name= Response Geo Services to 🇦🇺AU +#!desc=(V1) 只作用于检测地区,不修改Apple Maps和Apple News,可以通过搭配使用其他模块达成混合效果。 + +[Script] +# Response Geo Services to AU +Geo Services = type=http-request, pattern=^https?:\/\/gspe\d*-ssl\.ls\.apple\.com(\/pep\/gcc), argument=GeoCountryCode=AU, requires-body=0, script-path=https://raw.githubusercontent.com/VirgilClyne/iRingo/main/archive/js/Geo_Services.js + +[MITM] +hostname = %APPEND% gspe1-ssl.ls.apple.com diff --git a/archive/modules/Geo_Services_CN.plugin b/archive/modules/Geo_Services_CN.plugin new file mode 100644 index 0000000..076d76c --- /dev/null +++ b/archive/modules/Geo_Services_CN.plugin @@ -0,0 +1,14 @@ +#!name= Redirect Geo Services to 🇨🇳CN +#!desc=(V1) 只作用于检测地区,不修改Apple Maps和Apple News,可以通过搭配使用其他模块达成混合效果。 +#!openUrl=http://boxjs.com/#/app/iRingo.Location +#!author=VirgilClyne +#!homepage=https://github.com/VirgilClyne +#!manual=https://github.com/VirgilClyne/iRingo#定位服务 +#!icon=https://images.macrumors.com/article-new/2019/07/ios_location_services-250x250.jpg + +[Script] +# Redirect Geo Services to CN +http-response ^https?:\/\/gspe\d*-ssl\.ls\.apple\.com(/pep/gcc) script-path=https://raw.githubusercontent.com/VirgilClyne/iRingo/main/archive/js/Geo_Services_CN.js, requires-body=true, tag=Geo_Services_CN + +[MITM] +hostname = gspe1-ssl.ls.apple.com diff --git a/archive/modules/Geo_Services_CN.qxrewrite b/archive/modules/Geo_Services_CN.qxrewrite new file mode 100644 index 0000000..5172e72 --- /dev/null +++ b/archive/modules/Geo_Services_CN.qxrewrite @@ -0,0 +1,8 @@ +#!name= Redirect Geo Services to 🇨🇳CN +#!version=V1 +#!desc=只作用于检测地区,不修改Apple Maps和Apple News,可以通过搭配使用其他模块达成混合效果。 + +# Redirect Geo Services to CN +^https?:\/\/gspe1-ssl\.ls\.apple\.com\/pep\/gcc url script-response-body https://raw.githubusercontent.com/VirgilClyne/iRingo/main/archive/js/Geo_Services_CN.js + +hostname = gspe1-ssl.ls.apple.com diff --git a/archive/modules/Geo_Services_CN.sgmodule b/archive/modules/Geo_Services_CN.sgmodule new file mode 100644 index 0000000..22c8821 --- /dev/null +++ b/archive/modules/Geo_Services_CN.sgmodule @@ -0,0 +1,9 @@ +#!name= Response Geo Services to 🇨🇳CN +#!desc=(V1) 只作用于检测地区,不修改Apple Maps和Apple News,可以通过搭配使用其他模块达成混合效果。 + +[Script] +# Response Geo Services to CN +Geo Services = type=http-request, pattern=^https?:\/\/gspe\d*-ssl\.ls\.apple\.com(\/pep\/gcc), argument=GeoCountryCode=CN, requires-body=0, script-path=https://raw.githubusercontent.com/VirgilClyne/iRingo/main/archive/js/Geo_Services.js + +[MITM] +hostname = %APPEND% gspe1-ssl.ls.apple.com diff --git a/archive/modules/Geo_Services_HK.sgmodule b/archive/modules/Geo_Services_HK.sgmodule new file mode 100644 index 0000000..15ce2ed --- /dev/null +++ b/archive/modules/Geo_Services_HK.sgmodule @@ -0,0 +1,9 @@ +#!name= Response Geo Services to 🇭🇰HK +#!desc=(V1) 只作用于检测地区,不修改Apple Maps和Apple News,可以通过搭配使用其他模块达成混合效果。 + +[Script] +# Response Geo Services to HK +Geo Services = type=http-request, pattern=^https?:\/\/gspe\d*-ssl\.ls\.apple\.com(\/pep\/gcc), argument=GeoCountryCode=HK, requires-body=0, script-path=https://raw.githubusercontent.com/VirgilClyne/iRingo/main/archive/js/Geo_Services.js + +[MITM] +hostname = %APPEND% gspe1-ssl.ls.apple.com diff --git a/archive/modules/Geo_Services_JP.plugin b/archive/modules/Geo_Services_JP.plugin new file mode 100644 index 0000000..08b82fe --- /dev/null +++ b/archive/modules/Geo_Services_JP.plugin @@ -0,0 +1,14 @@ +#!name= Redirect Geo Services to 🇯🇵JP +#!desc=(V1) 只作用于检测地区,不修改Apple Maps和Apple News,可以通过搭配使用其他模块达成混合效果。 +#!openUrl=http://boxjs.com/#/app/iRingo.Location +#!author=VirgilClyne +#!homepage=https://github.com/VirgilClyne +#!manual=https://github.com/VirgilClyne/iRingo#定位服务 +#!icon=https://images.macrumors.com/article-new/2019/07/ios_location_services-250x250.jpg + +[Script] +# Redirect Geo Services to JP +http-response ^https?:\/\/gspe\d*-ssl\.ls\.apple\.com(/pep/gcc) script-path=https://raw.githubusercontent.com/VirgilClyne/iRingo/main/archive/js/Geo_Services_JP.js, requires-body=true, tag=Geo_Services_JP + +[MITM] +hostname = gspe1-ssl.ls.apple.com diff --git a/archive/modules/Geo_Services_JP.qxrewrite b/archive/modules/Geo_Services_JP.qxrewrite new file mode 100644 index 0000000..e3294be --- /dev/null +++ b/archive/modules/Geo_Services_JP.qxrewrite @@ -0,0 +1,8 @@ +#!name= Redirect Geo Services to 🇯🇵JP +#!version=V1 +#!desc=只作用于检测地区,不修改Apple Maps和Apple News,可以通过搭配使用其他模块达成混合效果。 + +# Redirect Geo Services to JP +^https?:\/\/gspe1-ssl\.ls\.apple\.com\/pep\/gcc url script-response-body https://raw.githubusercontent.com/VirgilClyne/iRingo/main/archive/js/Geo_Services_JP.js + +hostname = gspe1-ssl.ls.apple.com diff --git a/archive/modules/Geo_Services_JP.sgmodule b/archive/modules/Geo_Services_JP.sgmodule new file mode 100644 index 0000000..54fd2e8 --- /dev/null +++ b/archive/modules/Geo_Services_JP.sgmodule @@ -0,0 +1,9 @@ +#!name= Response Geo Services to 🇯🇵JP +#!desc=(V1) 只作用于检测地区,不修改Apple Maps和Apple News,可以通过搭配使用其他模块达成混合效果。 + +[Script] +# Response Geo Services to JP +Geo Services = type=http-request, pattern=^https?:\/\/gspe\d*-ssl\.ls\.apple\.com(\/pep\/gcc), argument=GeoCountryCode=JP, requires-body=0, script-path=https://raw.githubusercontent.com/VirgilClyne/iRingo/main/archive/js/Geo_Services.js + +[MITM] +hostname = %APPEND% gspe1-ssl.ls.apple.com diff --git a/archive/modules/Geo_Services_TW.sgmodule b/archive/modules/Geo_Services_TW.sgmodule new file mode 100644 index 0000000..d72ebeb --- /dev/null +++ b/archive/modules/Geo_Services_TW.sgmodule @@ -0,0 +1,9 @@ +#!name= Response Geo Services to 🇹🇼TW +#!desc=(V1) 只作用于检测地区,不修改Apple Maps和Apple News,可以通过搭配使用其他模块达成混合效果。 + +[Script] +# Response Geo Services to TW +Geo Services = type=http-request, pattern=^https?:\/\/gspe\d*-ssl\.ls\.apple\.com(\/pep\/gcc), argument=GeoCountryCode=TW, requires-body=0, script-path=https://raw.githubusercontent.com/VirgilClyne/iRingo/main/archive/js/Geo_Services.js + +[MITM] +hostname = %APPEND% gspe1-ssl.ls.apple.com diff --git a/archive/modules/Geo_Services_UK.sgmodule b/archive/modules/Geo_Services_UK.sgmodule new file mode 100644 index 0000000..492b942 --- /dev/null +++ b/archive/modules/Geo_Services_UK.sgmodule @@ -0,0 +1,9 @@ +#!name= Response Geo Services to 🇬🇧UK +#!desc=(V1) 只作用于检测地区,不修改Apple Maps和Apple News,可以通过搭配使用其他模块达成混合效果。 + +[Script] +# Response Geo Services to UK +Geo Services = type=http-request, pattern=^https?:\/\/gspe\d*-ssl\.ls\.apple\.com(\/pep\/gcc), argument=GeoCountryCode=UK, requires-body=0, script-path=https://raw.githubusercontent.com/VirgilClyne/iRingo/main/archive/js/Geo_Services.js + +[MITM] +hostname = %APPEND% gspe1-ssl.ls.apple.com diff --git a/archive/modules/Geo_Services_US.plugin b/archive/modules/Geo_Services_US.plugin new file mode 100644 index 0000000..e5357a7 --- /dev/null +++ b/archive/modules/Geo_Services_US.plugin @@ -0,0 +1,14 @@ +#!name= Redirect Geo Services to 🇺🇸US +#!desc=(V1) 只作用于检测地区,不修改Apple Maps和Apple News,可以通过搭配使用其他模块达成混合效果。 +#!openUrl=http://boxjs.com/#/app/iRingo.Location +#!author=VirgilClyne +#!homepage=https://github.com/VirgilClyne +#!manual=https://github.com/VirgilClyne/iRingo#定位服务 +#!icon=https://images.macrumors.com/article-new/2019/07/ios_location_services-250x250.jpg + +[Script] +# Redirect Geo Services to US +http-response ^https?:\/\/gspe\d*-ssl\.ls\.apple\.com(/pep/gcc) script-path=https://raw.githubusercontent.com/VirgilClyne/iRingo/main/archive/js/Geo_Services_US.js, requires-body=true, tag=Geo_Services_US + +[MITM] +hostname = gspe1-ssl.ls.apple.com diff --git a/archive/modules/Geo_Services_US.qxrewrite b/archive/modules/Geo_Services_US.qxrewrite new file mode 100644 index 0000000..119607e --- /dev/null +++ b/archive/modules/Geo_Services_US.qxrewrite @@ -0,0 +1,8 @@ +#!name= Redirect Geo Services to 🇺🇸US +#!version=V1 +#!desc=只作用于检测地区,不修改Apple Maps和Apple News,可以通过搭配使用其他模块达成混合效果。 + +# Redirect Geo Services to US +^https?:\/\/gspe1-ssl\.ls\.apple\.com\/pep\/gcc url script-response-body https://raw.githubusercontent.com/VirgilClyne/iRingo/main/archive/js/Geo_Services_US.js + +hostname = gspe1-ssl.ls.apple.com diff --git a/archive/modules/Geo_Services_US.sgmodule b/archive/modules/Geo_Services_US.sgmodule new file mode 100644 index 0000000..5e1ff53 --- /dev/null +++ b/archive/modules/Geo_Services_US.sgmodule @@ -0,0 +1,9 @@ +#!name= Redirect Geo Services to 🇺🇸US +#!desc=(V1) 只作用于检测地区,不修改Apple Maps和Apple News,可以通过搭配使用其他模块达成混合效果。 + +[Script] +# Redirect Geo Services to US +Geo Services US = type=http-response, pattern=^https?:\/\/gspe\d*-ssl\.ls\.apple\.com(\/pep\/gcc), argument=GeoCountryCode=US, requires-body=1, script-path=https://raw.githubusercontent.com/VirgilClyne/iRingo/main/archive/js/Geo_Services_US.js + +[MITM] +hostname = %APPEND% gspe1-ssl.ls.apple.com diff --git a/archive/modules/Location_Services.beta.plugin b/archive/modules/Location_Services.beta.plugin new file mode 100644 index 0000000..32a9723 --- /dev/null +++ b/archive/modules/Location_Services.beta.plugin @@ -0,0 +1,17 @@ +#!name= Modify Location Services to 🇺🇳I18N +#!desc=(BETA) 修改定位服务(Location Services)配置文件(Configs)和GCC(Geo Country Code)检测结果。 +#!openUrl=http://boxjs.com/#/app/iRingo.Location +#!author=VirgilClyne +#!homepage=https://github.com/VirgilClyne +#!manual=https://github.com/VirgilClyne/iRingo#定位服务 +#!icon=https://images.macrumors.com/article-new/2019/07/ios_location_services-250x250.jpg + +[Script] +# Response Location Services Geo Country Code Check Result to US +http-request ^https?:\/\/gspe\d*-ssl\.ls\.apple\.com(/pep/gcc) script-path=https://raw.githubusercontent.com/VirgilClyne/iRingo/beta/archive/js/Location_Services.beta.js, tag=Location_Services +# Rewrite Location Services Configuration Functions Internationalization +http-request ^https?:\/\/configuration\.ls\.apple\.com(\/config\/defaults\?).* script-path=https://raw.githubusercontent.com/VirgilClyne/iRingo/beta/archive/js/Location_Services.beta.js, requires-body=true, tag=Location_Services +http-response ^https?:\/\/configuration\.ls\.apple\.com(\/config\/defaults\?).* script-path=https://raw.githubusercontent.com/VirgilClyne/iRingo/beta/archive/js/Location_Services.beta.js, requires-body=true, tag=Location_Services, argument=EnableAlberta=false&GEOAddressCorrectionEnabled=true&LocalitiesAndLandmarksSupported=true&PedestrianAREnabled=true&ShouldEnableLagunaBeach=true + +[MITM] +hostname = configuration.ls.apple.com, gspe1-ssl.ls.apple.com diff --git a/archive/modules/Location_Services.beta.qxrewrite b/archive/modules/Location_Services.beta.qxrewrite new file mode 100644 index 0000000..bd821af --- /dev/null +++ b/archive/modules/Location_Services.beta.qxrewrite @@ -0,0 +1,12 @@ +#!name= Modify Location Services to 🇺🇳I18N +#!version=BETA +#!desc=1.修改定位服务(Location Services)配置文件(Configs) +#!desc=2.修改GCC(Geo Country Code)检测结果 + +# Response Location Services Geo Country Code Check Result to US +^https?:\/\/gspe\d*-ssl\.ls\.apple\.com(/pep/gcc) url script-echo-response https://raw.githubusercontent.com/VirgilClyne/iRingo/beta/archive/js/Location_Services.beta.js +# Rewrite Location Services Configuration Functions Internationalization +^https?:\/\/configuration\.ls\.apple\.com(\/config\/defaults\?).* url script-request-header https://raw.githubusercontent.com/VirgilClyne/iRingo/beta/archive/js/Location_Services.beta.js +^https?:\/\/configuration\.ls\.apple\.com(\/config\/defaults\?).* url script-response-body https://raw.githubusercontent.com/VirgilClyne/iRingo/beta/archive/js/Location_Services.beta.js + +hostname = configuration.ls.apple.com, gspe1-ssl.ls.apple.com diff --git a/archive/modules/Location_Services.beta.sgmodule b/archive/modules/Location_Services.beta.sgmodule new file mode 100644 index 0000000..fefb789 --- /dev/null +++ b/archive/modules/Location_Services.beta.sgmodule @@ -0,0 +1,14 @@ +#!name= Modify Location Services to 🇺🇳I18N +#!desc=(BETA) 修改定位服务(Location Services)配置文件(Configs)和GCC(Geo Country Code)检测结果。 + +[Script] +# Response Location Services Geo Country Code Check Result to US +Location_Services.beta = type=http-request, pattern=^https?:\/\/gspe\d*-ssl\.ls\.apple\.com(\/pep\/gcc), requires-body=0, binary-body-mode=0, max-size=0, script-update-interval=0, argument=GeoCountryCode=US, script-path=https://raw.githubusercontent.com/VirgilClyne/iRingo/beta/archive/js/Location_Services.beta.js +# Rewrite Location Services Configuration Functions Internationalization +Location_Services.beta = type=http-request, pattern=^https?:\/\/configuration\.ls\.apple\.com(\/config\/defaults\?).*, requires-body=0, binary-body-mode=0, max-size=0 ,script-update-interval=0, script-path=https://raw.githubusercontent.com/VirgilClyne/iRingo/beta/archive/js/Location_Services.beta.js +Location_Services.beta = type=http-response, pattern=^https?:\/\/configuration\.ls\.apple\.com(\/config\/defaults\?).*, requires-body=1, binary-body-mode=0, max-size=0 ,script-update-interval=0, argument=EnableAlberta=false&GEOAddressCorrectionEnabled=true&LocalitiesAndLandmarksSupported=true&PedestrianAREnabled=true&ShouldEnableLagunaBeach=true, script-path=https://raw.githubusercontent.com/VirgilClyne/iRingo/beta/archive/js/Location_Services.beta.js +# Rewrite AutoNavi Dispatcher from com.apple.compass +Location_Services.beta = type=http-request, pattern=^https?:\/\/dispatcher\.is\.autonavi\.com(\/dispatcher), requires-body=1, binary-body-mode=1, max-size=0 ,script-update-interval=0, script-path=https://raw.githubusercontent.com/VirgilClyne/iRingo/beta/archive/js/Location_Services.beta.js + +[MITM] +hostname = %APPEND% configuration.ls.apple.com, gspe1-ssl.ls.apple.com, dispatcher.is.autonavi.com diff --git a/archive/modules/Location_Services.sgmodule b/archive/modules/Location_Services.sgmodule new file mode 100644 index 0000000..63a1345 --- /dev/null +++ b/archive/modules/Location_Services.sgmodule @@ -0,0 +1,12 @@ +#!name= Modify Location Services to 🇺🇳I18N +#!desc=修改定位服务(Location Services)配置文件(Configs)和GCC(Geo Country Code)检测结果。 + +[Script] +# Response Location Services Geo Country Code Check Result to US +Location_Services = type=http-request, pattern=^https?:\/\/gspe\d*-ssl\.ls\.apple\.com(\/pep\/gcc), requires-body=0, binary-body-mode=0, max-size=0, script-update-interval=0, argument=GeoCountryCode=US, script-path=https://raw.githubusercontent.com/VirgilClyne/iRingo/main/archive/js/Location_Services.js +# Rewrite Location Services Configuration Functions Internationalization +Location_Services = type=http-request, pattern=^https?:\/\/configuration\.ls\.apple\.com(\/config\/defaults\?).*, requires-body=0, binary-body-mode=0, max-size=0 ,script-update-interval=0, script-path=https://raw.githubusercontent.com/VirgilClyne/iRingo/main/archive/js/Location_Services.js +Location_Services = type=http-response, pattern=^https?:\/\/configuration\.ls\.apple\.com(\/config\/defaults\?).*, requires-body=1, binary-body-mode=0, max-size=0 ,script-update-interval=0, argument=EnableAlberta=false&GEOAddressCorrectionEnabled=true&LocalitiesAndLandmarksSupported=true&PedestrianAREnabled=true&ShouldEnableLagunaBeach=true, script-path=https://raw.githubusercontent.com/VirgilClyne/iRingo/main/archive/js/Location_Services.js + +[MITM] +hostname = %APPEND% configuration.ls.apple.com, gspe1-ssl.ls.apple.com diff --git a/modules/Location.beta.sgmodule b/modules/Location.beta.sgmodule new file mode 100644 index 0000000..dcda889 --- /dev/null +++ b/modules/Location.beta.sgmodule @@ -0,0 +1,24 @@ +#!name= iRingo: 📍 Location β +#!desc=(BETA)\n全面自定义「定位服务」的功能。 +#!openUrl=http://boxjs.com/#/app/iRingo.Location.beta +#!author=VirgilClyne[https://github.com/VirgilClyne] +#!homepage=https://github.com/NSRingo +#!manual=https://github.com/NSRingo/GeoServices/wiki/📍-定位服务 +#!icon=https://images.macrumors.com/article-new/2019/07/ios_location_services-250x250.jpg +#!category= iRingo +#!arguments=GeoCountryCode:US +#!arguments-desc=GeoCountryCode: 国家或地区代码 + +[Rule] +# 📍 Country Code +DOMAIN,gspe1-ssl.ls.apple.com,DIRECT + +[Script] +# 📍 Country Code +📍 Location.pep.gcc.response = type=http-response, pattern=^https?:\/\/gspe1-ssl\.ls\.apple\.com\/pep\/gcc, requires-body=1, engine=webview, debug=1, script-path=https://raw.githubusercontent.com/NSRingo/GeoServices/beta/js/GeoServices.response.beta.js, argument=PEP.GCC={{{GeoCountryCode}}} +# 📍 Dispatcher +📍 Location.Dispatcher.request = type=http-request, pattern=^https?:\/\/gspe-ssl\.ls\.apple\.com\/dispatcher\.arpc, requires-body=1, binary-body-mode=1, engine=webview, debug=1, script-path=https://raw.githubusercontent.com/NSRingo/GeoServices/beta/js/GeoServices.request.beta.js, argument= +📍 Location.Dispatcher.request = type=http-request, pattern=^https?:\/\/dispatcher\.is\.autonavi\.com\/dispatcher, requires-body=1, binary-body-mode=1, engine=webview, debug=1, script-path=https://raw.githubusercontent.com/NSRingo/GeoServices/beta/js/GeoServices.request.beta.js, argument= + +[MITM] +hostname = %APPEND% gspe1-ssl.ls.apple.com, gsp-ssl.ls.apple.com, dispatcher.is.autonavi.com diff --git a/modules/Location.plugin b/modules/Location.plugin new file mode 100644 index 0000000..9042a04 --- /dev/null +++ b/modules/Location.plugin @@ -0,0 +1,19 @@ +#!name= iRingo: 📍 Location +#!desc=全面自定义「定位服务」的功能。 +#!openUrl=http://boxjs.com/#/app/iRingo.Location +#!author=VirgilClyne[https://github.com/VirgilClyne] +#!homepage=https://github.com/NSRingo +#!manual=https://github.com/NSRingo/GeoServices/wiki/📍-定位服务 +#!icon=https://images.macrumors.com/article-new/2019/07/ios_location_services-250x250.jpg +#!tag= iRingo + +[Rule] +# 📍 Country Code +DOMAIN,gspe1-ssl.ls.apple.com,DIRECT + +[Script] +# 📍 Country Code +http-response ^https?:\/\/gspe1-ssl\.ls\.apple\.com\/pep\/gcc script-path=https://github.com/NSRingo/GeoServices/releases/latest/download/response.js, requires-body=1, tag=📍 Location.pep.gcc.response, argument= + +[MITM] +hostname = gspe1-ssl.ls.apple.com diff --git a/modules/Location.sgmodule b/modules/Location.sgmodule new file mode 100644 index 0000000..540df89 --- /dev/null +++ b/modules/Location.sgmodule @@ -0,0 +1,22 @@ + +#!name= iRingo: 📍 Location +#!desc=全面自定义「定位服务」的功能。 +#!openUrl=http://boxjs.com/#/app/iRingo.Location +#!author=VirgilClyne[https://github.com/VirgilClyne] +#!homepage=https://github.com/NSRingo +#!manual=https://github.com/NSRingo/GeoServices/wiki/📍-定位服务 +#!icon=https://images.macrumors.com/article-new/2019/07/ios_location_services-250x250.jpg +#!category= iRingo +#!arguments=GeoCountryCode:US +#!arguments-desc=GeoCountryCode: 国家或地区代码 + +[Rule] +# 📍 Country Code +DOMAIN,gspe1-ssl.ls.apple.com,DIRECT + +[Script] +# 📍 Country Code +📍 Location.pep.gcc.response = type=http-response, pattern=^https?:\/\/gspe1-ssl\.ls\.apple\.com\/pep\/gcc, requires-body=1, engine=webview, script-path=https://github.com/NSRingo/GeoServices/releases/latest/download/response.js, argument=PEP.GCC={{{GeoCountryCode}}} + +[MITM] +hostname = %APPEND% gspe1-ssl.ls.apple.com diff --git a/modules/Location.snippet b/modules/Location.snippet new file mode 100644 index 0000000..bc7bcd2 --- /dev/null +++ b/modules/Location.snippet @@ -0,0 +1,15 @@ +#!name= iRingo: 📍 Location +#!desc=全面自定义「定位服务」的功能。 +#!openUrl=http://boxjs.com/#/app/iRingo.Location +#!author=VirgilClyne[https://github.com/VirgilClyne] +#!homepage=https://github.com/NSRingo +#!manual=https://github.com/NSRingo/GeoServices/wiki/📍-定位服务 +#!icon=https://images.macrumors.com/article-new/2019/07/ios_location_services-250x250.jpg +#!category= iRingo + +#[rewrite_local] +# 📍 Country Code +^https?:\/\/gspe1-ssl\.ls\.apple\.com\/pep\/gcc url script-response-body https://github.com/NSRingo/GeoServices/releases/latest/download/response.js + +#[mitm] +hostname = gspe1-ssl.ls.apple.com diff --git a/modules/Location.srmodule b/modules/Location.srmodule new file mode 100644 index 0000000..891384b --- /dev/null +++ b/modules/Location.srmodule @@ -0,0 +1,20 @@ + +#!name= iRingo: 📍 Location +#!desc=全面自定义「定位服务」的功能。 +#!openUrl=http://boxjs.com/#/app/iRingo.Location +#!author=VirgilClyne[https://github.com/VirgilClyne] +#!homepage=https://github.com/NSRingo +#!manual=https://github.com/NSRingo/GeoServices/wiki/📍-定位服务 +#!icon=https://images.macrumors.com/article-new/2019/07/ios_location_services-250x250.jpg +#!category= iRingo + +[Rule] +# 📍 Country Code +DOMAIN,gspe1-ssl.ls.apple.com,DIRECT + +[Script] +# 📍 Country Code +📍 Location.pep.gcc.response = type=http-response, pattern=^https?:\/\/gspe1-ssl\.ls\.apple\.com\/pep\/gcc, requires-body=1, script-path=https://raw.githubusercontent.com/NSRingo/GeoServices/main/archive/js/response.js, argument= + +[MITM] +hostname = %APPEND% gspe1-ssl.ls.apple.com diff --git a/modules/Location.stoverride b/modules/Location.stoverride new file mode 100644 index 0000000..35b32b2 --- /dev/null +++ b/modules/Location.stoverride @@ -0,0 +1,29 @@ +name: " iRingo: 📍 Location" +desc: |- + 全面自定义「定位服务」的功能。 + 注:该覆写包含代理规则。 +openUrl: "http://boxjs.com/#/app/iRingo.Location" +author: "VirgilClyne" +homepage: "https://github.com/NSRingo" +manual: "https://github.com/NSRingo/GeoServices/wiki/📍-定位服务" +icon: "https://images.macrumors.com/article-new/2019/07/ios_location_services-250x250.jpg" +category: " iRingo" + +rules: + # 📍 Country Code + - DOMAIN,gspe1-ssl.ls.apple.com,DIRECT + +http: + mitm: + - "gspe1-ssl.ls.apple.com" + script: + - match: ^https?:\/\/gspe1-ssl\.ls\.apple\.com\/pep\/gcc + name: GeoServices.response + type: response + require-body: true + argument: + +script-providers: + GeoServices.response: + url: https://github.com/NSRingo/GeoServices/releases/latest/download/response.js + interval: 86400 diff --git a/modules/Maps.beta.sgmodule b/modules/Maps.beta.sgmodule new file mode 100644 index 0000000..9e64533 --- /dev/null +++ b/modules/Maps.beta.sgmodule @@ -0,0 +1,32 @@ +#!name= iRingo: 🗺️ Maps β +#!desc=(BETA)\n全面自定义「地图」的功能。 +#!openUrl=http://boxjs.com/#/app/iRingo.Maps.beta +#!author=VirgilClyne[https://github.com/VirgilClyne] +#!homepage=https://github.com/NSRingo +#!manual=https://github.com/NSRingo/GeoServices/wiki/🗺-地图 +#!icon=https://developer.apple.com/assets/elements/icons/maps/maps-128x128.png +#!category= iRingo +#!arguments=GeoManifest.default:CN,GeoManifest.watchOS:US,Dispatcher:AutoNavi,Directions:AutoNavi,RAP:Apple,LocationShift:AUTO,TileSet.Map:CN,TileSet.Satellite:HYBRID,TileSet.Traffic:CN,TileSet.POI:CN,TileSet.Flyover:XX,TileSet.Munin:XX +#!arguments-desc=GeoManifest.default: [动态配置]国家或地区代码(默认设置)\nGeoManifest.watchOS: [动态配置]国家或地区代码(watchOS)\nDispatcher: [调度器]API\nDirections: [导航与ETA]API\nRAP: [评分和照片]API\nLocationShift: [定位漂移]API\nTileSet.Map: [地图]数据源\nTileSet.Satellite: [卫星图像]数据源\nTileSet.Traffic: [交通状况]数据源\nTileSet.POI: [兴趣点]数据源\nTileSet.Flyover: [飞行俯瞰]数据源\nTileSet.Munin: [四处看看]数据源 + +[Rule] +# 🗺️ Amap +DOMAIN-SUFFIX,is.autonavi.com,DIRECT +# 🗺️ Traffic +DOMAIN,gspe12-cn-ssl.ls.apple.com,DIRECT +# 🗺️ Tiles +DOMAIN,gspe19-cn-ssl.ls.apple.com,DIRECT + +[Script] +# 🗺️ Network Defaults +🗺️ Maps.config.defaults.request = type=http-request, pattern=^https?:\/\/configuration\.ls\.apple\.com\/config\/defaults, requires-body=0, debug=1, script-path=https://raw.githubusercontent.com/NSRingo/GeoServices/beta/js/GeoServices.request.beta.js, argument= +🗺️ Maps.config.defaults.response = type=http-response, pattern=^https?:\/\/configuration\.ls\.apple\.com\/config\/defaults, requires-body=1, engine=webview, debug=1, script-path=https://raw.githubusercontent.com/NSRingo/GeoServices/beta/js/GeoServices.response.beta.js, argument= +# 🗺️ Announcements +🗺️ Maps.config.announcements.request = type=http-request, pattern=^https?:\/\/gspe35-ssl\.ls\.apple\.(com|cn)\/config\/announcements, requires-body=0, debug=1, script-path=https://raw.githubusercontent.com/NSRingo/GeoServices/beta/js/GeoServices.request.beta.js, argument= +🗺️ Maps.config.announcements.response = type=http-response, pattern=^https?:\/\/gspe35-ssl\.ls\.apple\.(com|cn)\/config\/announcements, requires-body=1, binary-body-mode=1, engine=webview, debug=1, script-path=https://raw.githubusercontent.com/NSRingo/GeoServices/beta/js/GeoServices.response.beta.js, argument= +# 🗺️ Resource Manifest +🗺️ Maps.geo_manifest.dynamic.config.request = type=http-request, pattern=^https?:\/\/gspe35-ssl\.ls\.apple\.(com|cn)\/geo_manifest\/dynamic\/config, requires-body=0, debug=1, script-path=https://raw.githubusercontent.com/NSRingo/GeoServices/beta/js/GeoServices.request.beta.js, argument=GeoManifest.Dynamic.Config.CountryCode.default={{{GeoManifest.default}}}&GeoManifest.Dynamic.Config.CountryCode.watchOS={{{GeoManifest.watchOS}}} +🗺️ Maps.geo_manifest.dynamic.config.response = type=http-response, pattern=^https?:\/\/gspe35-ssl\.ls\.apple\.(com|cn)\/geo_manifest\/dynamic\/config, requires-body=1, binary-body-mode=1, engine=webview, debug=1, script-path=https://raw.githubusercontent.com/NSRingo/GeoServices/beta/js/GeoServices.response.beta.js, argument=GeoManifest.Dynamic.Config.CountryCode.default={{{GeoManifest.default}}}&UrlInfoSet.Dispatcher={{{Dispatcher}}}&UrlInfoSet.Directions={{{Directions}}}&UrlInfoSet.RAP={{{RAP}}}&UrlInfoSet.LocationShift={{{LocationShift}}}&TileSet.Satellite={{{TileSet.Satellite}}}&TileSet.Traffic={{{TileSet.Traffic}}}&TileSet.POI={{{TileSet.POI}}}&TileSet.Flyover={{{TileSet.Flyover}}}&TileSet.Munin={{{TileSet.Munin}}} + +[MITM] +hostname = %APPEND% *.ls.apple.com, *.is.autonavi.com diff --git a/modules/Maps.plugin b/modules/Maps.plugin new file mode 100644 index 0000000..bf5ec70 --- /dev/null +++ b/modules/Maps.plugin @@ -0,0 +1,30 @@ +#!name= iRingo: 🗺️ Maps +#!desc=全面自定义「地图」的功能。 +#!openUrl=http://boxjs.com/#/app/iRingo.Maps +#!author=VirgilClyne[https://github.com/VirgilClyne] +#!homepage=https://github.com/NSRingo +#!manual=https://github.com/NSRingo/GeoServices/wiki/🗺-地图 +#!icon=https://developer.apple.com/assets/elements/icons/maps/maps-128x128.png +#!tag= iRingo + +[Rule] +# 🗺️ Tiles +DOMAIN,gspe19-cn-ssl.ls.apple.com,DIRECT +# 🗺️ Dispatcher +DOMAIN,dispatcher.is.autonavi.com,DIRECT +# 🗺️ Directions & ETA +DOMAIN,direction2.is.autonavi.com,DIRECT + +[Script] +# 🗺️ Network Defaults +http-request ^https?:\/\/configuration\.ls\.apple\.com\/config\/defaults script-path=https://github.com/NSRingo/GeoServices/releases/latest/download/request.js, requires-body=0, tag=🗺️ Maps.config.defaults.request, argument= +http-response ^https?:\/\/configuration\.ls\.apple\.com\/config\/defaults script-path=https://github.com/NSRingo/GeoServices/releases/latest/download/response.js, requires-body=1, tag=🗺️ Maps.config.defaults.response, argument= +# 🗺️ Announcements +http-request ^https?:\/\/gspe35-ssl\.ls\.apple\.(com|cn)\/config\/announcements script-path=https://github.com/NSRingo/GeoServices/releases/latest/download/request.js, requires-body=0, tag=🗺️ Maps.config.announcements.request, argument= +http-response ^https?:\/\/gspe35-ssl\.ls\.apple\.(com|cn)\/config\/announcements script-path=https://github.com/NSRingo/GeoServices/releases/latest/download/response.js, requires-body=1, binary-body-mode=1, tag=🗺️ Maps.config.announcements.response, argument= +# 🗺️ Resource Manifest +http-request ^https?:\/\/gspe35-ssl\.ls\.apple\.(com|cn)\/geo_manifest\/dynamic\/config script-path=https://github.com/NSRingo/GeoServices/releases/latest/download/request.js, requires-body=0, tag=🗺️ Maps.config.announcements.request, argument= +http-response ^https?:\/\/gspe35-ssl\.ls\.apple\.(com|cn)\/geo_manifest\/dynamic\/config script-path=https://github.com/NSRingo/GeoServices/releases/latest/download/response.js, requires-body=1, binary-body-mode=1, tag=🗺️ Maps.geo_manifest.dynamic.config.response, argument= + +[MITM] +hostname = configuration.ls.apple.com, gspe35-ssl.ls.apple.com diff --git a/modules/Maps.sgmodule b/modules/Maps.sgmodule new file mode 100644 index 0000000..af22c74 --- /dev/null +++ b/modules/Maps.sgmodule @@ -0,0 +1,32 @@ +#!name= iRingo: 🗺️ Maps +#!desc=全面自定义「地图」的功能。 +#!openUrl=http://boxjs.com/#/app/iRingo.Maps +#!author=VirgilClyne[https://github.com/VirgilClyne] +#!homepage=https://github.com/NSRingo +#!manual=https://github.com/NSRingo/GeoServices/wiki/🗺-地图 +#!icon=https://developer.apple.com/assets/elements/icons/maps/maps-128x128.png +#!category= iRingo +#!arguments=GeoManifest.default:CN,GeoManifest.watchOS:US,Dispatcher:AutoNavi,Directions:AutoNavi,RAP:Apple,LocationShift:AUTO,TileSet.Satellite:HYBRID,TileSet.Flyover:XX,TileSet.Munin:XX +#!arguments-desc=GeoManifest.default: [动态配置]国家或地区代码(默认设置)\nGeoManifest.watchOS: [动态配置]国家或地区代码(watchOS)\nDispatcher: [调度器]API\nDirections: [导航与ETA]API\nRAP: [评分和照片]API\nLocationShift: [定位漂移]API\nTileSet.Satellite: [卫星图像]数据源\nTileSet.Flyover: [飞行俯瞰]数据源\nTileSet.Munin: [四处看看]数据源 + +[Rule] +# 🗺️ Amap +DOMAIN-SUFFIX,is.autonavi.com,DIRECT +# 🗺️ Traffic +DOMAIN,gspe12-cn-ssl.ls.apple.com,DIRECT +# 🗺️ Tiles +DOMAIN,gspe19-cn-ssl.ls.apple.com,DIRECT + +[Script] +# 🗺️ Network Defaults +🗺️ Maps.config.defaults.request = type=http-request, pattern=^https?:\/\/configuration\.ls\.apple\.com\/config\/defaults, requires-body=0, script-path=https://github.com/NSRingo/GeoServices/releases/latest/download/request.js, argument= +🗺️ Maps.config.defaults.response = type=http-response, pattern=^https?:\/\/configuration\.ls\.apple\.com\/config\/defaults, requires-body=1, engine=webview, script-path=https://github.com/NSRingo/GeoServices/releases/latest/download/response.js, argument= +# 🗺️ Announcements +🗺️ Maps.config.announcements.request = type=http-request, pattern=^https?:\/\/gspe35-ssl\.ls\.apple\.(com|cn)\/config\/announcements, requires-body=0, script-path=https://github.com/NSRingo/GeoServices/releases/latest/download/request.js, argument= +🗺️ Maps.config.announcements.response = type=http-response, pattern=^https?:\/\/gspe35-ssl\.ls\.apple\.(com|cn)\/config\/announcements, requires-body=1, binary-body-mode=1, engine=webview, script-path=https://github.com/NSRingo/GeoServices/releases/latest/download/response.js, argument= +# 🗺️ Resource Manifest +🗺️ Maps.geo_manifest.dynamic.config.request = type=http-request, pattern=^https?:\/\/gspe35-ssl\.ls\.apple\.(com|cn)\/geo_manifest\/dynamic\/config, requires-body=0, script-path=https://github.com/NSRingo/GeoServices/releases/latest/download/request.js, argument=GeoManifest.Dynamic.Config.CountryCode.default={{{GeoManifest.default}}}&GeoManifest.Dynamic.Config.CountryCode.watchOS={{{GeoManifest.watchOS}}} +🗺️ Maps.geo_manifest.dynamic.config.response = type=http-response, pattern=^https?:\/\/gspe35-ssl\.ls\.apple\.(com|cn)\/geo_manifest\/dynamic\/config, requires-body=1, binary-body-mode=1, engine=webview, script-path=https://github.com/NSRingo/GeoServices/releases/latest/download/response.js, argument=GeoManifest.Dynamic.Config.CountryCode.default={{{GeoManifest.default}}}&UrlInfoSet.Dispatcher={{{Dispatcher}}}&UrlInfoSet.Directions={{{Directions}}}&UrlInfoSet.RAP={{{RAP}}}&UrlInfoSet.LocationShift={{{LocationShift}}}&TileSet.Satellite={{{TileSet.Satellite}}}&TileSet.Traffic={{{TileSet.Traffic}}}&TileSet.POI={{{TileSet.POI}}}&TileSet.Flyover={{{TileSet.Flyover}}}&TileSet.Munin={{{TileSet.Munin}}} + +[MITM] +hostname = %APPEND% configuration.ls.apple.com, gspe35-ssl.ls.apple.com diff --git a/modules/Maps.snippet b/modules/Maps.snippet new file mode 100644 index 0000000..7bd0ff9 --- /dev/null +++ b/modules/Maps.snippet @@ -0,0 +1,22 @@ +#!name= iRingo: 🗺️ Maps +#!desc=全面自定义「地图」的功能。 +#!openUrl=http://boxjs.com/#/app/iRingo.Maps +#!author=VirgilClyne[https://github.com/VirgilClyne] +#!homepage=https://github.com/NSRingo +#!manual=https://github.com/NSRingo/GeoServices/wiki/🗺-地图 +#!icon=https://developer.apple.com/assets/elements/icons/maps/maps-128x128.png +#!category= iRingo + +#[rewrite_local] +# 🗺️ Network Defaults +^https?:\/\/configuration\.ls\.apple\.com\/config\/defaults url script-request-header https://github.com/NSRingo/GeoServices/releases/latest/download/request.js +^https?:\/\/configuration\.ls\.apple\.com\/config\/defaults url script-response-body https://github.com/NSRingo/GeoServices/releases/latest/download/response.js +# 🗺️ Announcements +^https?:\/\/gspe35-ssl\.ls\.apple\.(com|cn)\/config\/announcements url script-request-header https://github.com/NSRingo/GeoServices/releases/latest/download/request.js +^https?:\/\/gspe35-ssl\.ls\.apple\.(com|cn)\/config\/announcements url script-response-body https://github.com/NSRingo/GeoServices/releases/latest/download/response.js +# 🗺️ Resource Manifest +^https?:\/\/gspe35-ssl\.ls\.apple\.(com|cn)\/geo_manifest\/dynamic\/config url script-request-header https://github.com/NSRingo/GeoServices/releases/latest/download/request.js +^https?:\/\/gspe35-ssl\.ls\.apple\.(com|cn)\/geo_manifest\/dynamic\/config url script-response-body https://github.com/NSRingo/GeoServices/releases/latest/download/response.js + +#[mitm] +hostname = configuration.ls.apple.com, gspe35-ssl.ls.apple.com diff --git a/modules/Maps.srmodule b/modules/Maps.srmodule new file mode 100644 index 0000000..3965847 --- /dev/null +++ b/modules/Maps.srmodule @@ -0,0 +1,30 @@ +#!name= iRingo: 🗺️ Maps +#!desc=全面自定义「地图」的功能。 +#!openUrl=http://boxjs.com/#/app/iRingo.Maps +#!author=VirgilClyne[https://github.com/VirgilClyne] +#!homepage=https://github.com/NSRingo +#!manual=https://github.com/NSRingo/GeoServices/wiki/🗺-地图 +#!icon=https://developer.apple.com/assets/elements/icons/maps/maps-128x128.png +#!category= iRingo + +[Rule] +# 🗺️ Amap +DOMAIN-SUFFIX,is.autonavi.com,DIRECT +# 🗺️ Traffic +DOMAIN,gspe12-cn-ssl.ls.apple.com,DIRECT +# 🗺️ Tiles +DOMAIN,gspe19-cn-ssl.ls.apple.com,DIRECT + +[Script] +# 🗺️ Network Defaults +🗺️ Maps.config.defaults.request = type=http-request, pattern=^https?:\/\/configuration\.ls\.apple\.com\/config\/defaults, requires-body=0, script-path=https://github.com/NSRingo/GeoServices/releases/latest/download/request.js, argument= +🗺️ Maps.config.defaults.response = type=http-response, pattern=^https?:\/\/configuration\.ls\.apple\.com\/config\/defaults, requires-body=1, script-path=https://raw.githubusercontent.com/NSRingo/GeoServices/main/archive/js/response.js, argument= +# 🗺️ Announcements +🗺️ Maps.config.announcements.request = type=http-request, pattern=^https?:\/\/gspe35-ssl\.ls\.apple\.(com|cn)\/config\/announcements, requires-body=0, script-path=https://github.com/NSRingo/GeoServices/releases/latest/download/request.js, argument= +🗺️ Maps.config.announcements.response = type=http-response, pattern=^https?:\/\/gspe35-ssl\.ls\.apple\.(com|cn)\/config\/announcements, requires-body=1, binary-body-mode=1, engine=webview, script-path=https://raw.githubusercontent.com/NSRingo/GeoServices/main/archive/js/response.js, argument= +# 🗺️ Resource Manifest +🗺️ Maps.geo_manifest.dynamic.config.request = type=http-request, pattern=^https?:\/\/gspe35-ssl\.ls\.apple\.(com|cn)\/geo_manifest\/dynamic\/config, requires-body=0, script-path=https://github.com/NSRingo/GeoServices/releases/latest/download/request.js, argument= +🗺️ Maps.geo_manifest.dynamic.config.response = type=http-response, pattern=^https?:\/\/gspe35-ssl\.ls\.apple\.(com|cn)\/geo_manifest\/dynamic\/config, requires-body=1, binary-body-mode=1, engine=webview, script-path=https://raw.githubusercontent.com/NSRingo/GeoServices/main/archive/js/response.js, argument= + +[MITM] +hostname = %APPEND% configuration.ls.apple.com, gspe35-ssl.ls.apple.com diff --git a/modules/Maps.stoverride b/modules/Maps.stoverride new file mode 100644 index 0000000..ae6d9d3 --- /dev/null +++ b/modules/Maps.stoverride @@ -0,0 +1,64 @@ +name: " iRingo: 🗺️ Maps" +desc: |- + 全面自定义「地图」的功能。 + 注:该覆写包含代理规则。 +openUrl: "http://boxjs.com/#/app/iRingo.Maps" +author: "VirgilClyne" +homepage: "https://github.com/NSRingo" +manual: "https://github.com/NSRingo/GeoServices/wiki/🗺-地图" +icon: "https://developer.apple.com/assets/elements/icons/maps/maps-128x128.png" +category: " iRingo" + +rules: + # 🗺️ Tiles + - DOMAIN,gspe19-cn-ssl.ls.apple.com,DIRECT + # 🗺️ Dispatcher + - DOMAIN,dispatcher.is.autonavi.com,DIRECT + # 🗺️ Directions & ETA + - DOMAIN,direction2.is.autonavi.com,DIRECT + +http: + mitm: + - "configuration.ls.apple.com" + - "gspe35-ssl.ls.apple.com" + script: + - match: ^https?:\/\/configuration\.ls\.apple\.com\/config\/defaults + name: GeoServices.request + type: request + require-body: false + argument: + - match: ^https?:\/\/configuration\.ls\.apple\.com\/config\/defaults + name: GeoServices.response + type: response + require-body: true + argument: + - match: ^https?:\/\/gspe35-ssl\.ls\.apple\.(com|cn)\/config\/announcements + name: GeoServices.request + type: request + require-body: false + argument: + - match: ^https?:\/\/gspe35-ssl\.ls\.apple\.(com|cn)\/config\/announcements + name: GeoServices.response + type: response + require-body: true + binary-mode: true + argument: + - match: ^https?:\/\/gspe35-ssl\.ls\.apple\.(com|cn)\/geo_manifest\/dynamic\/config + name: GeoServices.request + type: request + require-body: false + argument: + - match: ^https?:\/\/gspe35-ssl\.ls\.apple\.(com|cn)\/geo_manifest\/dynamic\/config + name: GeoServices.response + type: response + require-body: true + binary-mode: true + argument: + +script-providers: + GeoServices.request: + url: https://github.com/NSRingo/GeoServices/releases/latest/download/request.js + interval: 86400 + GeoServices.response: + url: https://github.com/NSRingo/GeoServices/releases/latest/download/response.js + interval: 86400 diff --git a/package.json b/package.json new file mode 100644 index 0000000..906234e --- /dev/null +++ b/package.json @@ -0,0 +1,31 @@ +{ + "name": "geoservices", + "homepage": "https://github.com/NSRingo/GeoServices/wiki", + "type": "module", + "repository": { + "type": "git", + "url": "https://github.com/NSRingo/GeoServices.git" + }, + "directories": { + "example": "example" + }, + "scripts": { + "build": "rollup -c", + "build:debug": "rollup --config --configDebug" + }, + "browserslist": [ + "iOS >= 15" + ], + "keywords": [], + "author": "VirgilClyne", + "license": "Apache-2.0", + "devDependencies": { + "@protobuf-ts/plugin": "^2.9.4", + "@protobuf-ts/runtime": "^2.9.3", + "@rollup/plugin-commonjs": "^25.0.7", + "@rollup/plugin-json": "^6.1.0", + "@rollup/plugin-node-resolve": "^15.2.3", + "@rollup/plugin-terser": "^0.4.4", + "rollup": "^4.9.6" + } +} diff --git a/rollup.config.js b/rollup.config.js new file mode 100644 index 0000000..f9b9f57 --- /dev/null +++ b/rollup.config.js @@ -0,0 +1,7 @@ +import defaultConfig from './rollup.default.config.js'; +import debugConfig from './rollup.debug.config.js'; + +export default commandLineArgs => { + if (commandLineArgs.configDebug === true) return debugConfig; + else return defaultConfig; +}; diff --git a/rollup.debug.config.js b/rollup.debug.config.js new file mode 100644 index 0000000..0d1bd82 --- /dev/null +++ b/rollup.debug.config.js @@ -0,0 +1,24 @@ +import json from '@rollup/plugin-json'; +import commonjs from "@rollup/plugin-commonjs"; +import { nodeResolve } from '@rollup/plugin-node-resolve'; + +export default [ + { + input: 'src/request.debug.js', + output: { + file: 'dist/request.js', + //format: 'es', + banner: `/* README: https://github.com/NSRingo */\nconsole.log(' iRingo: 📍 GeoServices β Request')\nconsole.log('${new Date().toLocaleString('zh-CN', {timeZone: 'PRC'})}')`, + }, + plugins: [json(), commonjs(), nodeResolve()] + }, + { + input: 'src/response.debug.js', + output: { + file: 'dist/response.js', + //format: 'es', + banner: `/* README: https://github.com/NSRingo */\nconsole.log(' iRingo: 📍 GeoServices β Response')\nconsole.log('${new Date().toLocaleString('zh-CN', {timeZone: 'PRC'})}')`, + }, + plugins: [json(), commonjs(), nodeResolve()] + } +]; diff --git a/rollup.default.config.js b/rollup.default.config.js new file mode 100644 index 0000000..14b9192 --- /dev/null +++ b/rollup.default.config.js @@ -0,0 +1,25 @@ +import json from '@rollup/plugin-json'; +import commonjs from "@rollup/plugin-commonjs"; +import terser from '@rollup/plugin-terser'; +import { nodeResolve } from '@rollup/plugin-node-resolve'; + +export default [ + { + input: 'src/request.js', + output: { + file: 'dist/request.js', + format: 'es', + banner: `/* README: https://github.com/NSRingo */\nconsole.log(' iRingo: 📍 GeoServices Request')\nconsole.log('${new Date().toLocaleString('zh-CN', {timeZone: 'PRC'})}')`, + }, + plugins: [json(), commonjs(), nodeResolve(), terser()] + }, + { + input: 'src/response.js', + output: { + file: 'dist/response.js', + format: 'es', + banner: `/* README: https://github.com/NSRingo */\nconsole.log(' iRingo: 📍 GeoServices Response')\nconsole.log('${new Date().toLocaleString('zh-CN', {timeZone: 'PRC'})}')`, + }, + plugins: [json(), commonjs(), nodeResolve(), terser()] + } +]; diff --git a/src/XML b/src/XML new file mode 160000 index 0000000..5c65abb --- /dev/null +++ b/src/XML @@ -0,0 +1 @@ +Subproject commit 5c65abb88ecf194faef91890151ddf4dbef719c5 diff --git a/src/archive/GeoServices.request.js b/src/archive/GeoServices.request.js new file mode 100644 index 0000000..3c4a1b2 --- /dev/null +++ b/src/archive/GeoServices.request.js @@ -0,0 +1,240 @@ +import _ from './ENV/Lodash.mjs' +import $Storage from './ENV/$Storage.mjs' +import ENV from "./ENV/ENV.mjs"; +import URI from "./URL/URI.mjs"; + +import Database from "./database/index.mjs"; +import setENV from "./function/setENV.mjs"; + +const $ = new ENV(" iRingo: 📍 GeoServices.framework v3.0.1(7) request"); + +// 构造回复数据 +let $response = undefined; + +/***************** Processing *****************/ +// 解构URL +const URL = URI.parse($request.url); +$.log(`⚠ URL: ${JSON.stringify(URL)}`, ""); +// 获取连接参数 +const METHOD = $request.method, HOST = URL.host, PATH = URL.path, PATHs = URL.paths; +$.log(`⚠ METHOD: ${METHOD}`, ""); +// 解析格式 +const FORMAT = ($request.headers?.["Content-Type"] ?? $request.headers?.["content-type"])?.split(";")?.[0]; +$.log(`⚠ FORMAT: ${FORMAT}`, ""); +(async () => { + const { Settings, Caches, Configs } = setENV("iRingo", ["Location", "Maps"], Database); + $.log(`⚠ Settings.Switch: ${Settings?.Switch}`, ""); + switch (Settings.Switch) { + case true: + default: + // 创建空数据 + let body = {}; + // 方法判断 + switch (METHOD) { + case "POST": + case "PUT": + case "PATCH": + case "DELETE": + // 格式判断 + switch (FORMAT) { + case undefined: // 视为无body + break; + case "application/x-www-form-urlencoded": + case "text/plain": + default: + break; + case "application/x-mpegURL": + case "application/x-mpegurl": + case "application/vnd.apple.mpegurl": + case "audio/mpegurl": + //body = M3U8.parse($request.body); + //$.log(`🚧 body: ${JSON.stringify(body)}`, ""); + //$request.body = M3U8.stringify(body); + break; + case "text/xml": + case "text/html": + case "text/plist": + case "application/xml": + case "application/plist": + case "application/x-plist": + //body = XML.parse($request.body); + //$.log(`🚧 body: ${JSON.stringify(body)}`, ""); + //$request.body = XML.stringify(body); + break; + case "text/vtt": + case "application/vtt": + //body = VTT.parse($request.body); + //$.log(`🚧 body: ${JSON.stringify(body)}`, ""); + //$request.body = VTT.stringify(body); + break; + case "text/json": + case "application/json": + //body = JSON.parse($request.body ?? "{}"); + //$.log(`🚧 body: ${JSON.stringify(body)}`, ""); + //$request.body = JSON.stringify(body); + break; + case "application/protobuf": + case "application/x-protobuf": + case "application/vnd.google.protobuf": + case "application/grpc": + case "application/grpc+proto": + case "application/octet-stream": + $.log(`🚧 $request: ${JSON.stringify($request, null, 2)}`, ""); + let rawBody = $.isQuanX() ? new Uint8Array($request.bodyBytes ?? []) : $request.body ?? new Uint8Array(); + $.log(`🚧 isBuffer? ${ArrayBuffer.isView(rawBody)}: ${JSON.stringify(rawBody, null, 2)}`, ""); + // 写入二进制数据 + $request.body = rawBody; + break; + }; + //break; // 不中断,继续处理URL + case "GET": + case "HEAD": + case "OPTIONS": + case undefined: // QX牛逼,script-echo-response不返回method + default: + delete $request?.headers?.["If-None-Match"]; + delete $request?.headers?.["if-none-match"]; + // 主机判断 + switch (HOST) { + case "configuration.ls.apple.com": + // 路径判断 + switch (PATH) { + case "config/defaults": + break; + }; + break; + case "gspe1-ssl.ls.apple.com": + switch (PATH) { + case "pep/gcc": + /* // 不使用 echo response + $response = { + status: 200, + headers: { + "Content-Type": "text/html", + Date: new Date().toUTCString(), + Connection: "keep-alive", + "Content-Encoding": "identity", + }, + body: Settings.PEP.GCC, + }; + $.log(JSON.stringify($response)); + */ + break; + }; + break; + case "gspe35-ssl.ls.apple.com": + case "gspe35-ssl.ls.apple.cn": + switch (PATH) { + case "config/announcements": + switch (URL.query?.os) { + case "ios": + case "ipados": + case "macos": + default: + switch (Settings?.Config?.Announcements?.Environment?.default) { + case "AUTO": + break; + case "CN": + default: + URL.query.environment = "prod-cn"; + break; + case "XX": + URL.query.environment = "prod"; + break; + }; + break; + case "watchos": + switch (Settings?.Config?.Announcements?.Environment?.watchOS) { + case "AUTO": + break; + case "XX": + default: + URL.query.environment = "prod"; + break; + case "CN": + URL.query.environment = "prod-cn"; + break; + }; + break; + }; + break; + case "geo_manifest/dynamic/config": + switch (URL.query?.os) { + case "ios": + case "ipados": + case "macos": + default: + switch (Settings?.GeoManifest?.Dynamic?.Config?.CountryCode?.default) { + case "AUTO": + switch (Caches?.pep?.gcc) { + default: + URL.query.country_code = Caches?.pep?.gcc ?? "US"; + break; + case "CN": + case undefined: + URL.query.country_code = "CN"; + break; + }; + break; + default: + URL.query.country_code = Settings?.GeoManifest?.Dynamic?.Config?.CountryCode?.default ?? "CN"; + break; + }; + break; + case "watchos": + switch (Settings?.GeoManifest?.Dynamic?.Config?.CountryCode?.watchOS) { + case "AUTO": + switch (Caches?.pep?.gcc) { + default: + URL.query.country_code = Caches?.pep?.gcc ?? "US"; + break; + case "CN": + case undefined: + URL.query.country_code = "CN"; + break; + }; + break; + default: + URL.query.country_code = Settings?.GeoManifest?.Dynamic?.Config?.CountryCode?.watchOS ?? "US"; + break; + }; + break; + }; + break; + }; + break; + }; + break; + case "CONNECT": + case "TRACE": + break; + }; + //if ($request.headers?.Host) $request.headers.Host = URL.host; + $request.url = URI.stringify(URL); + $.log(`🚧 调试信息`, `$request.url: ${$request.url}`, ""); + break; + case false: + break; + }; +})() + .catch((e) => $.logErr(e)) + .finally(() => { + switch ($response) { + default: // 有构造回复数据,返回构造的回复数据 + //$.log(`🚧 finally`, `echo $response: ${JSON.stringify($response, null, 2)}`, ""); + if ($response.headers?.["Content-Encoding"]) $response.headers["Content-Encoding"] = "identity"; + if ($response.headers?.["content-encoding"]) $response.headers["content-encoding"] = "identity"; + if ($.isQuanX()) { + if (!$response.status) $response.status = "HTTP/1.1 200 OK"; + delete $response.headers?.["Content-Length"]; + delete $response.headers?.["content-length"]; + delete $response.headers?.["Transfer-Encoding"]; + $.done($response); + } else $.done({ response: $response }); + break; + case undefined: // 无构造回复数据,发送修改的请求数据 + //$.log(`🚧 finally`, `$request: ${JSON.stringify($request, null, 2)}`, ""); + $.done($request); + break; + }; + }) diff --git a/src/archive/GeoServices.response.js b/src/archive/GeoServices.response.js new file mode 100644 index 0000000..5023c85 --- /dev/null +++ b/src/archive/GeoServices.response.js @@ -0,0 +1,1897 @@ +import _ from './ENV/Lodash.mjs' +import $Storage from './ENV/$Storage.mjs' +import ENV from "./ENV/ENV.mjs"; +import URI from "./URL/URI.mjs"; +import XML from "./XML/XML.mjs"; + +import Database from "./database/index.mjs"; +import setENV from "./function/setENV.mjs"; + +import { WireType, UnknownFieldHandler, reflectionMergePartial, MESSAGE_TYPE, MessageType, BinaryReader, isJsonObject, typeofJsonValue, jsonWriteOptions } from "../node_modules/@protobuf-ts/runtime/build/es2015/index.js"; + +const $ = new ENV(" iRingo: 📍 GeoServices.framework v3.4.5(3) response"); + +/***************** Processing *****************/ +// 解构URL +const URL = URI.parse($request.url); +$.log(`⚠ URL: ${JSON.stringify(URL)}`, ""); +// 获取连接参数 +const METHOD = $request.method, HOST = URL.host, PATH = URL.path, PATHs = URL.paths; +$.log(`⚠ METHOD: ${METHOD}`, ""); +// 解析格式 +const FORMAT = ($response.headers?.["Content-Type"] ?? $response.headers?.["content-type"])?.split(";")?.[0]; +$.log(`⚠ FORMAT: ${FORMAT}`, ""); +!(async () => { + const { Settings, Caches, Configs } = setENV("iRingo", ["Location", "Maps"], Database); + $.log(`⚠ Settings.Switch: ${Settings?.Switch}`, ""); + switch (Settings.Switch) { + case true: + default: + // 创建空数据 + let body = {}; + // 格式判断 + switch (FORMAT) { + case undefined: // 视为无body + break; + case "application/x-www-form-urlencoded": + case "text/plain": + default: + break; + case "application/x-mpegURL": + case "application/x-mpegurl": + case "application/vnd.apple.mpegurl": + case "audio/mpegurl": + //body = M3U8.parse($response.body); + //$.log(`🚧 body: ${JSON.stringify(body)}`, ""); + //$response.body = M3U8.stringify(body); + break; + case "text/xml": + case "text/html": + case "text/plist": + case "application/xml": + case "application/plist": + case "application/x-plist": + // 主机判断 + switch (HOST) { + case "gspe1-ssl.ls.apple.com": + //body = new DOMParser().parseFromString($response.body, FORMAT); + // 路径判断 + switch (PATH) { + case "pep/gcc": + _.set(Caches, "pep.gcc", $response.body); + $Storage.setItem("@iRingo.Location.Caches", Caches); + switch (Settings.PEP.GCC) { + case "AUTO": + break; + default: + $response.body = Settings.PEP.GCC; + break; + }; + break; + }; + //$repsonse.body = new XMLSerializer().serializeToString(body); + break; + case "configuration.ls.apple.com": + //body = await PLISTs("plist2json", $response.body); + BigInt.prototype.toJSON = function () { return this.toString() }; + body = XML.parse($response.body); + $.log(`🚧 body: ${JSON.stringify(body)}`, ""); + // 路径判断 + switch (PATH) { + case "config/defaults": + const PLIST = body.plist; + if (PLIST) { + // CN + PLIST["com.apple.GEO"].CountryProviders.CN.ShouldEnableLagunaBeach = true; // XX + PLIST["com.apple.GEO"].CountryProviders.CN.DrivingMultiWaypointRoutesEnabled = true; // 驾驶导航途径点 + //PLIST["com.apple.GEO"].CountryProviders.CN.EnableAlberta = false; // CN + PLIST["com.apple.GEO"].CountryProviders.CN.EnableClientDrapedVectorPolygons = true; // CN + PLIST["com.apple.GEO"].CountryProviders.CN.GEOAddressCorrectionEnabled = true; // CN + delete PLIST["com.apple.GEO"].CountryProviders.CN.GEOBatchSpatialEventLookupMaxParametersCount // CN + delete PLIST["com.apple.GEO"].CountryProviders.CN.GEOBatchSpatialPlaceLookupMaxParametersCount // CN + PLIST["com.apple.GEO"].CountryProviders.CN.LocalitiesAndLandmarksSupported = true; // CN + PLIST["com.apple.GEO"].CountryProviders.CN.NavigationShowHeadingKey = true; + PLIST["com.apple.GEO"].CountryProviders.CN.POIBusynessDifferentialPrivacy = true; // CN + PLIST["com.apple.GEO"].CountryProviders.CN.POIBusynessRealTime = true; // CN + PLIST["com.apple.GEO"].CountryProviders.CN.TransitPayEnabled = true; // CN + //PLIST["com.apple.GEO"].CountryProviders.CN.WiFiQualityNetworkDisabled = Settings?.Config?.Defaults?.WiFiQualityNetworkDisabled ?? true; // CN + //PLIST["com.apple.GEO"].CountryProviders.CN.WiFiQualityTileDisabled = Settings?.Config?.Defaults?.WiFiQualityTileDisabled ?? true; // CN + PLIST["com.apple.GEO"].CountryProviders.CN.SupportsOffline = true; // CN + PLIST["com.apple.GEO"].CountryProviders.CN.SupportsCarIntegration = true; // CN + // TW + PLIST["com.apple.GEO"].CountryProviders.CN.GEOShouldSpeakWrittenAddresses = true; // TW + PLIST["com.apple.GEO"].CountryProviders.CN.GEOShouldSpeakWrittenPlaceNames = true; // TW + // US + PLIST["com.apple.GEO"].CountryProviders.CN["6694982d2b14e95815e44e970235e230"] = true; // US + PLIST["com.apple.GEO"].CountryProviders.CN.PedestrianAREnabled = true; // 现实世界中的线路 + PLIST["com.apple.GEO"].CountryProviders.CN.OpticalHeadingEnabled = true; // 举起以查看 + PLIST["com.apple.GEO"].CountryProviders.CN.UseCLPedestrianMapMatchedLocations = true; // 导航准确性-增强 + }; + break; + }; + $.log(`🚧 body: ${JSON.stringify(body)}`, ""); + //$response.body = await PLISTs("json2plist", body); // json2plist + $response.body = XML.stringify(body); + break; + }; + break; + case "text/vtt": + case "application/vtt": + //body = VTT.parse($response.body); + //$.log(`🚧 body: ${JSON.stringify(body)}`, ""); + //$response.body = VTT.stringify(body); + break; + case "text/json": + case "application/json": + body = JSON.parse($response.body ?? "{}"); + $.log(`🚧 body: ${JSON.stringify(body)}`, ""); + $response.body = JSON.stringify(body); + break; + case "application/protobuf": + case "application/x-protobuf": + case "application/vnd.google.protobuf": + case "application/grpc": + case "application/grpc+proto": + case "application/octet-stream": + //$.log(`🚧 $response: ${JSON.stringify($response, null, 2)}`, ""); + let rawBody = $.isQuanX() ? new Uint8Array($response.bodyBytes ?? []) : $response.body ?? new Uint8Array(); + //$.log(`🚧 isBuffer? ${ArrayBuffer.isView(rawBody)}: ${JSON.stringify(rawBody)}`, ""); + switch (FORMAT) { + case "application/protobuf": + case "application/x-protobuf": + case "application/vnd.google.protobuf": + case "application/octet-stream": + /****************** initialization start *******************/ + /****************** initialization finish *******************/ + switch (HOST) { + case "gspe35-ssl.ls.apple.com": + switch (PATH) { + case "config/announcements": + break; + case "geo_manifest/dynamic/config": + /****************** initialization start *******************/ + // @generated by protobuf-ts 2.9.3 with parameter long_type_string,output_javascript,optimize_code_size + /** + * @generated from protobuf enum com.apple.geo.protobuf.geo.TileSet.TileSetVersionUpdateBehavior + */ + var TileSet_TileSetVersionUpdateBehavior; + (function (TileSet_TileSetVersionUpdateBehavior) { + /** + * @generated from protobuf enum value: TILE_UPDATE_BEHAVIOR_FLUSH = 0; + */ + TileSet_TileSetVersionUpdateBehavior[TileSet_TileSetVersionUpdateBehavior["TILE_UPDATE_BEHAVIOR_FLUSH"] = 0] = "TILE_UPDATE_BEHAVIOR_FLUSH"; + /** + * @generated from protobuf enum value: TILE_UPDATE_BEHAVIOR_ETAG = 1; + */ + TileSet_TileSetVersionUpdateBehavior[TileSet_TileSetVersionUpdateBehavior["TILE_UPDATE_BEHAVIOR_ETAG"] = 1] = "TILE_UPDATE_BEHAVIOR_ETAG"; + })(TileSet_TileSetVersionUpdateBehavior || (TileSet_TileSetVersionUpdateBehavior = {})); + /** + * @generated from protobuf enum com.apple.geo.protobuf.geo.TileSet.TileSetChecksumType + */ + var TileSet_TileSetChecksumType; + (function (TileSet_TileSetChecksumType) { + /** + * @generated from protobuf enum value: CHECKSUM_TYPE_NONE = 0; + */ + TileSet_TileSetChecksumType[TileSet_TileSetChecksumType["CHECKSUM_TYPE_NONE"] = 0] = "CHECKSUM_TYPE_NONE"; + /** + * @generated from protobuf enum value: CHECKSUM_TYPE_APPENDED_MD5 = 1; + */ + TileSet_TileSetChecksumType[TileSet_TileSetChecksumType["CHECKSUM_TYPE_APPENDED_MD5"] = 1] = "CHECKSUM_TYPE_APPENDED_MD5"; + })(TileSet_TileSetChecksumType || (TileSet_TileSetChecksumType = {})); + /** + * @generated from protobuf enum com.apple.geo.protobuf.geo.TileSet.TileRequestStyle + */ + var TileSet_TileRequestStyle; + (function (TileSet_TileRequestStyle) { + /** + * @generated from protobuf enum value: REQUEST_STYLE_LEGACY = 0; + */ + TileSet_TileRequestStyle[TileSet_TileRequestStyle["REQUEST_STYLE_LEGACY"] = 0] = "REQUEST_STYLE_LEGACY"; + /** + * @generated from protobuf enum value: REQUEST_STYLE_HEADER_PARAMS_VERSION_BASED_HMAC_AUTH = 1; + */ + TileSet_TileRequestStyle[TileSet_TileRequestStyle["REQUEST_STYLE_HEADER_PARAMS_VERSION_BASED_HMAC_AUTH"] = 1] = "REQUEST_STYLE_HEADER_PARAMS_VERSION_BASED_HMAC_AUTH"; + })(TileSet_TileRequestStyle || (TileSet_TileRequestStyle = {})); + /** + * @generated from protobuf enum com.apple.geo.protobuf.geo.ResourceFilter.Scale + */ + var ResourceFilter_Scale; + (function (ResourceFilter_Scale) { + /** + * @generated from protobuf enum value: RESOURCE_FILTER_SCALE_UNKNOWN = 0; + */ + ResourceFilter_Scale[ResourceFilter_Scale["RESOURCE_FILTER_SCALE_UNKNOWN"] = 0] = "RESOURCE_FILTER_SCALE_UNKNOWN"; + /** + * @generated from protobuf enum value: RESOURCE_FILTER_SCALE_1X = 1; + */ + ResourceFilter_Scale[ResourceFilter_Scale["RESOURCE_FILTER_SCALE_1X"] = 1] = "RESOURCE_FILTER_SCALE_1X"; + /** + * @generated from protobuf enum value: RESOURCE_FILTER_SCALE_2X = 2; + */ + ResourceFilter_Scale[ResourceFilter_Scale["RESOURCE_FILTER_SCALE_2X"] = 2] = "RESOURCE_FILTER_SCALE_2X"; + /** + * @generated from protobuf enum value: RESOURCE_FILTER_SCALE_3X = 3; + */ + ResourceFilter_Scale[ResourceFilter_Scale["RESOURCE_FILTER_SCALE_3X"] = 3] = "RESOURCE_FILTER_SCALE_3X"; + })(ResourceFilter_Scale || (ResourceFilter_Scale = {})); + /** + * @generated from protobuf enum com.apple.geo.protobuf.geo.ResourceFilter.Scenario + */ + var ResourceFilter_Scenario; + (function (ResourceFilter_Scenario) { + /** + * @generated from protobuf enum value: RESOURCE_FILTER_SCENARIO_UNKNOWN = 0; + */ + ResourceFilter_Scenario[ResourceFilter_Scenario["RESOURCE_FILTER_SCENARIO_UNKNOWN"] = 0] = "RESOURCE_FILTER_SCENARIO_UNKNOWN"; + /** + * @generated from protobuf enum value: RESOURCE_FILTER_SCENARIO_CARPLAY = 1; + */ + ResourceFilter_Scenario[ResourceFilter_Scenario["RESOURCE_FILTER_SCENARIO_CARPLAY"] = 1] = "RESOURCE_FILTER_SCENARIO_CARPLAY"; + /** + * @generated from protobuf enum value: RESOURCE_FILTER_SCENARIO_NAVIGATION = 2; + */ + ResourceFilter_Scenario[ResourceFilter_Scenario["RESOURCE_FILTER_SCENARIO_NAVIGATION"] = 2] = "RESOURCE_FILTER_SCENARIO_NAVIGATION"; + /** + * @generated from protobuf enum value: RESOURCE_FILTER_SCENARIO_HIGHVISIBILITY = 3; + */ + ResourceFilter_Scenario[ResourceFilter_Scenario["RESOURCE_FILTER_SCENARIO_HIGHVISIBILITY"] = 3] = "RESOURCE_FILTER_SCENARIO_HIGHVISIBILITY"; + /** + * @generated from protobuf enum value: RESOURCE_FILTER_SCENARIO_EXPLICIT = 4; + */ + ResourceFilter_Scenario[ResourceFilter_Scenario["RESOURCE_FILTER_SCENARIO_EXPLICIT"] = 4] = "RESOURCE_FILTER_SCENARIO_EXPLICIT"; + })(ResourceFilter_Scenario || (ResourceFilter_Scenario = {})); + /** + * @generated from protobuf enum com.apple.geo.protobuf.geo.Resource.ResourceType + */ + var Resource_ResourceType; + (function (Resource_ResourceType) { + /** + * @generated from protobuf enum value: RESOURCE_TYPE_STYLESHEET = 0; + */ + Resource_ResourceType[Resource_ResourceType["STYLESHEET"] = 0] = "STYLESHEET"; + /** + * @generated from protobuf enum value: RESOURCE_TYPE_TEXTURE = 1; + */ + Resource_ResourceType[Resource_ResourceType["TEXTURE"] = 1] = "TEXTURE"; + /** + * @generated from protobuf enum value: RESOURCE_TYPE_FONT = 2; + */ + Resource_ResourceType[Resource_ResourceType["FONT"] = 2] = "FONT"; + /** + * @generated from protobuf enum value: RESOURCE_TYPE_ICON = 3; + */ + Resource_ResourceType[Resource_ResourceType["ICON"] = 3] = "ICON"; + /** + * @generated from protobuf enum value: RESOURCE_TYPE_XML = 4; + */ + Resource_ResourceType[Resource_ResourceType["XML"] = 4] = "XML"; + /** + * @generated from protobuf enum value: RESOURCE_TYPE_ATTRIBUTION_LOGO = 5; + */ + Resource_ResourceType[Resource_ResourceType["ATTRIBUTION_LOGO"] = 5] = "ATTRIBUTION_LOGO"; + /** + * @generated from protobuf enum value: RESOURCE_TYPE_ATTRIBUTION_BADGE = 6; + */ + Resource_ResourceType[Resource_ResourceType["ATTRIBUTION_BADGE"] = 6] = "ATTRIBUTION_BADGE"; + /** + * @generated from protobuf enum value: RESOURCE_TYPE_OTHER = 7; + */ + Resource_ResourceType[Resource_ResourceType["OTHER"] = 7] = "OTHER"; + })(Resource_ResourceType || (Resource_ResourceType = {})); + /** + * @generated from protobuf enum com.apple.geo.protobuf.geo.Resource.ConnectionType + */ + var Resource_ConnectionType; + (function (Resource_ConnectionType) { + /** + * @generated from protobuf enum value: RESOURCE_DOWNLOAD_CONNECTION_TYPE_UNKNOWN = 0; + */ + Resource_ConnectionType[Resource_ConnectionType["RESOURCE_DOWNLOAD_CONNECTION_TYPE_UNKNOWN"] = 0] = "RESOURCE_DOWNLOAD_CONNECTION_TYPE_UNKNOWN"; + /** + * @generated from protobuf enum value: RESOURCE_DOWNLOAD_CONNECTION_TYPE_CELLULAR = 1; + */ + Resource_ConnectionType[Resource_ConnectionType["RESOURCE_DOWNLOAD_CONNECTION_TYPE_CELLULAR"] = 1] = "RESOURCE_DOWNLOAD_CONNECTION_TYPE_CELLULAR"; + /** + * @generated from protobuf enum value: RESOURCE_DOWNLOAD_CONNECTION_TYPE_PREFER_WIFI = 2; + */ + Resource_ConnectionType[Resource_ConnectionType["RESOURCE_DOWNLOAD_CONNECTION_TYPE_PREFER_WIFI"] = 2] = "RESOURCE_DOWNLOAD_CONNECTION_TYPE_PREFER_WIFI"; + /** + * @generated from protobuf enum value: RESOURCE_DOWNLOAD_CONNECTION_TYPE_WIFI_ONLY = 3; + */ + Resource_ConnectionType[Resource_ConnectionType["RESOURCE_DOWNLOAD_CONNECTION_TYPE_WIFI_ONLY"] = 3] = "RESOURCE_DOWNLOAD_CONNECTION_TYPE_WIFI_ONLY"; + })(Resource_ConnectionType || (Resource_ConnectionType = {})); + /** + * @generated from protobuf enum com.apple.geo.protobuf.geo.Resource.ValidationMethod + */ + var Resource_ValidationMethod; + (function (Resource_ValidationMethod) { + /** + * @generated from protobuf enum value: SHA1 = 0; + */ + Resource_ValidationMethod[Resource_ValidationMethod["SHA1"] = 0] = "SHA1"; + /** + * @generated from protobuf enum value: CMS = 1; + */ + Resource_ValidationMethod[Resource_ValidationMethod["CMS"] = 1] = "CMS"; + })(Resource_ValidationMethod || (Resource_ValidationMethod = {})); + /** + * @generated from protobuf enum com.apple.geo.protobuf.geo.Resource.UpdateMethod + */ + var Resource_UpdateMethod; + (function (Resource_UpdateMethod) { + /** + * @generated from protobuf enum value: VERSIONED = 0; + */ + Resource_UpdateMethod[Resource_UpdateMethod["VERSIONED"] = 0] = "VERSIONED"; + /** + * @generated from protobuf enum value: ETAG = 1; + */ + Resource_UpdateMethod[Resource_UpdateMethod["ETAG"] = 1] = "ETAG"; + })(Resource_UpdateMethod || (Resource_UpdateMethod = {})); + /** + * @generated from protobuf enum com.apple.geo.protobuf.geo.TileSetStyle + */ + var TileSetStyle; + (function (TileSetStyle) { + /** + * @generated from protobuf enum value: RASTER_STANDARD = 0; + */ + TileSetStyle[TileSetStyle["RASTER_STANDARD"] = 0] = "RASTER_STANDARD"; + /** + * @generated from protobuf enum value: VECTOR_STANDARD = 1; + */ + TileSetStyle[TileSetStyle["VECTOR_STANDARD"] = 1] = "VECTOR_STANDARD"; + /** + * @generated from protobuf enum value: VECTOR_TRAFFIC_SEGMENTS_FOR_RASTER = 2; + */ + TileSetStyle[TileSetStyle["VECTOR_TRAFFIC_SEGMENTS_FOR_RASTER"] = 2] = "VECTOR_TRAFFIC_SEGMENTS_FOR_RASTER"; + /** + * @generated from protobuf enum value: VECTOR_TRAFFIC_INCIDENTS_FOR_RASTER = 3; + */ + TileSetStyle[TileSetStyle["VECTOR_TRAFFIC_INCIDENTS_FOR_RASTER"] = 3] = "VECTOR_TRAFFIC_INCIDENTS_FOR_RASTER"; + /** + * @generated from protobuf enum value: VECTOR_TRAFFIC_SEGMENTS_AND_INCIDENTS_FOR_RASTER = 4; + */ + TileSetStyle[TileSetStyle["VECTOR_TRAFFIC_SEGMENTS_AND_INCIDENTS_FOR_RASTER"] = 4] = "VECTOR_TRAFFIC_SEGMENTS_AND_INCIDENTS_FOR_RASTER"; + /** + * @generated from protobuf enum value: RASTER_STANDARD_BACKGROUND = 5; + */ + TileSetStyle[TileSetStyle["RASTER_STANDARD_BACKGROUND"] = 5] = "RASTER_STANDARD_BACKGROUND"; + /** + * @generated from protobuf enum value: RASTER_HYBRID = 6; + */ + TileSetStyle[TileSetStyle["RASTER_HYBRID"] = 6] = "RASTER_HYBRID"; + /** + * @generated from protobuf enum value: RASTER_SATELLITE = 7; + */ + TileSetStyle[TileSetStyle["RASTER_SATELLITE"] = 7] = "RASTER_SATELLITE"; + /** + * @generated from protobuf enum value: RASTER_TERRAIN = 8; + */ + TileSetStyle[TileSetStyle["RASTER_TERRAIN"] = 8] = "RASTER_TERRAIN"; + /** + * @generated from protobuf enum value: VECTOR_BUILDINGS = 11; + */ + TileSetStyle[TileSetStyle["VECTOR_BUILDINGS"] = 11] = "VECTOR_BUILDINGS"; + /** + * @generated from protobuf enum value: VECTOR_TRAFFIC = 12; + */ + TileSetStyle[TileSetStyle["VECTOR_TRAFFIC"] = 12] = "VECTOR_TRAFFIC"; + /** + * @generated from protobuf enum value: VECTOR_POI = 13; + */ + TileSetStyle[TileSetStyle["VECTOR_POI"] = 13] = "VECTOR_POI"; + /** + * @generated from protobuf enum value: SPUTNIK_METADATA = 14; + */ + TileSetStyle[TileSetStyle["SPUTNIK_METADATA"] = 14] = "SPUTNIK_METADATA"; + /** + * @generated from protobuf enum value: SPUTNIK_C3M = 15; + */ + TileSetStyle[TileSetStyle["SPUTNIK_C3M"] = 15] = "SPUTNIK_C3M"; + /** + * @generated from protobuf enum value: SPUTNIK_DSM = 16; + */ + TileSetStyle[TileSetStyle["SPUTNIK_DSM"] = 16] = "SPUTNIK_DSM"; + /** + * @generated from protobuf enum value: SPUTNIK_DSM_GLOBAL = 17; + */ + TileSetStyle[TileSetStyle["SPUTNIK_DSM_GLOBAL"] = 17] = "SPUTNIK_DSM_GLOBAL"; + /** + * @generated from protobuf enum value: VECTOR_REALISTIC = 18; + */ + TileSetStyle[TileSetStyle["VECTOR_REALISTIC"] = 18] = "VECTOR_REALISTIC"; + /** + * @generated from protobuf enum value: VECTOR_LEGACY_REALISTIC = 19; + */ + TileSetStyle[TileSetStyle["VECTOR_LEGACY_REALISTIC"] = 19] = "VECTOR_LEGACY_REALISTIC"; + /** + * @generated from protobuf enum value: VECTOR_ROADS = 20; + */ + TileSetStyle[TileSetStyle["VECTOR_ROADS"] = 20] = "VECTOR_ROADS"; + /** + * @generated from protobuf enum value: RASTER_VEGETATION = 21; + */ + TileSetStyle[TileSetStyle["RASTER_VEGETATION"] = 21] = "RASTER_VEGETATION"; + /** + * @generated from protobuf enum value: VECTOR_TRAFFIC_SKELETON = 22; + */ + TileSetStyle[TileSetStyle["VECTOR_TRAFFIC_SKELETON"] = 22] = "VECTOR_TRAFFIC_SKELETON"; + /** + * @generated from protobuf enum value: RASTER_COASTLINE_MASK = 23; + */ + TileSetStyle[TileSetStyle["RASTER_COASTLINE_MASK"] = 23] = "RASTER_COASTLINE_MASK"; + /** + * @generated from protobuf enum value: RASTER_HILLSHADE = 24; + */ + TileSetStyle[TileSetStyle["RASTER_HILLSHADE"] = 24] = "RASTER_HILLSHADE"; + /** + * @generated from protobuf enum value: VECTOR_TRAFFIC_WITH_GREEN = 25; + */ + TileSetStyle[TileSetStyle["VECTOR_TRAFFIC_WITH_GREEN"] = 25] = "VECTOR_TRAFFIC_WITH_GREEN"; + /** + * @generated from protobuf enum value: VECTOR_TRAFFIC_STATIC = 26; + */ + TileSetStyle[TileSetStyle["VECTOR_TRAFFIC_STATIC"] = 26] = "VECTOR_TRAFFIC_STATIC"; + /** + * @generated from protobuf enum value: RASTER_COASTLINE_DROP_MASK = 27; + */ + TileSetStyle[TileSetStyle["RASTER_COASTLINE_DROP_MASK"] = 27] = "RASTER_COASTLINE_DROP_MASK"; + /** + * @generated from protobuf enum value: VECTOR_TRAFFIC_SKELETON_WITH_HISTORICAL = 28; + */ + TileSetStyle[TileSetStyle["VECTOR_TRAFFIC_SKELETON_WITH_HISTORICAL"] = 28] = "VECTOR_TRAFFIC_SKELETON_WITH_HISTORICAL"; + /** + * @generated from protobuf enum value: VECTOR_SPEED_PROFILES = 29; + */ + TileSetStyle[TileSetStyle["VECTOR_SPEED_PROFILES"] = 29] = "VECTOR_SPEED_PROFILES"; + /** + * @generated from protobuf enum value: VECTOR_VENUES = 30; + */ + TileSetStyle[TileSetStyle["VECTOR_VENUES"] = 30] = "VECTOR_VENUES"; + /** + * @generated from protobuf enum value: RASTER_DOWN_SAMPLED = 31; + */ + TileSetStyle[TileSetStyle["RASTER_DOWN_SAMPLED"] = 31] = "RASTER_DOWN_SAMPLED"; + /** + * @generated from protobuf enum value: RASTER_COLOR_BALANCED = 32; + */ + TileSetStyle[TileSetStyle["RASTER_COLOR_BALANCED"] = 32] = "RASTER_COLOR_BALANCED"; + /** + * @generated from protobuf enum value: RASTER_SATELLITE_NIGHT = 33; + */ + TileSetStyle[TileSetStyle["RASTER_SATELLITE_NIGHT"] = 33] = "RASTER_SATELLITE_NIGHT"; + /** + * @generated from protobuf enum value: SPUTNIK_VECTOR_BORDER = 34; + */ + TileSetStyle[TileSetStyle["SPUTNIK_VECTOR_BORDER"] = 34] = "SPUTNIK_VECTOR_BORDER"; + /** + * @generated from protobuf enum value: RASTER_SATELLITE_DIGITIZE = 35; + */ + TileSetStyle[TileSetStyle["RASTER_SATELLITE_DIGITIZE"] = 35] = "RASTER_SATELLITE_DIGITIZE"; + /** + * @generated from protobuf enum value: RASTER_HILLSHADE_PARKS = 36; + */ + TileSetStyle[TileSetStyle["RASTER_HILLSHADE_PARKS"] = 36] = "RASTER_HILLSHADE_PARKS"; + /** + * @generated from protobuf enum value: VECTOR_TRANSIT = 37; + */ + TileSetStyle[TileSetStyle["VECTOR_TRANSIT"] = 37] = "VECTOR_TRANSIT"; + /** + * @generated from protobuf enum value: RASTER_STANDARD_BASE = 38; + */ + TileSetStyle[TileSetStyle["RASTER_STANDARD_BASE"] = 38] = "RASTER_STANDARD_BASE"; + /** + * @generated from protobuf enum value: RASTER_STANDARD_LABELS = 39; + */ + TileSetStyle[TileSetStyle["RASTER_STANDARD_LABELS"] = 39] = "RASTER_STANDARD_LABELS"; + /** + * @generated from protobuf enum value: RASTER_HYBRID_ROADS = 40; + */ + TileSetStyle[TileSetStyle["RASTER_HYBRID_ROADS"] = 40] = "RASTER_HYBRID_ROADS"; + /** + * @generated from protobuf enum value: RASTER_HYBRID_LABELS = 41; + */ + TileSetStyle[TileSetStyle["RASTER_HYBRID_LABELS"] = 41] = "RASTER_HYBRID_LABELS"; + /** + * @generated from protobuf enum value: FLYOVER_C3M_MESH = 42; + */ + TileSetStyle[TileSetStyle["FLYOVER_C3M_MESH"] = 42] = "FLYOVER_C3M_MESH"; + /** + * @generated from protobuf enum value: FLYOVER_C3M_JPEG_TEXTURE = 43; + */ + TileSetStyle[TileSetStyle["FLYOVER_C3M_JPEG_TEXTURE"] = 43] = "FLYOVER_C3M_JPEG_TEXTURE"; + /** + * @generated from protobuf enum value: FLYOVER_C3M_ASTC_TEXTURE = 44; + */ + TileSetStyle[TileSetStyle["FLYOVER_C3M_ASTC_TEXTURE"] = 44] = "FLYOVER_C3M_ASTC_TEXTURE"; + /** + * @generated from protobuf enum value: RASTER_SATELLITE_ASTC = 45; + */ + TileSetStyle[TileSetStyle["RASTER_SATELLITE_ASTC"] = 45] = "RASTER_SATELLITE_ASTC"; + /** + * @generated from protobuf enum value: RASTER_HYBRID_ROADS_AND_LABELS = 46; + */ + TileSetStyle[TileSetStyle["RASTER_HYBRID_ROADS_AND_LABELS"] = 46] = "RASTER_HYBRID_ROADS_AND_LABELS"; + /** + * @generated from protobuf enum value: VECTOR_TRANSIT_SELECTION = 47; + */ + TileSetStyle[TileSetStyle["VECTOR_TRANSIT_SELECTION"] = 47] = "VECTOR_TRANSIT_SELECTION"; + /** + * @generated from protobuf enum value: VECTOR_COVERAGE = 48; + */ + TileSetStyle[TileSetStyle["VECTOR_COVERAGE"] = 48] = "VECTOR_COVERAGE"; + /** + * @generated from protobuf enum value: FLYOVER_VISIBILITY = 49; + */ + TileSetStyle[TileSetStyle["FLYOVER_VISIBILITY"] = 49] = "FLYOVER_VISIBILITY"; + /** + * @generated from protobuf enum value: FLYOVER_SKYBOX = 50; + */ + TileSetStyle[TileSetStyle["FLYOVER_SKYBOX"] = 50] = "FLYOVER_SKYBOX"; + /** + * @generated from protobuf enum value: FLYOVER_NAVGRAPH = 51; + */ + TileSetStyle[TileSetStyle["FLYOVER_NAVGRAPH"] = 51] = "FLYOVER_NAVGRAPH"; + /** + * @generated from protobuf enum value: FLYOVER_METADATA = 52; + */ + TileSetStyle[TileSetStyle["FLYOVER_METADATA"] = 52] = "FLYOVER_METADATA"; + /** + * @generated from protobuf enum value: VECTOR_ROAD_NETWORK = 53; + */ + TileSetStyle[TileSetStyle["VECTOR_ROAD_NETWORK"] = 53] = "VECTOR_ROAD_NETWORK"; + /** + * @generated from protobuf enum value: VECTOR_LAND_COVER = 54; + */ + TileSetStyle[TileSetStyle["VECTOR_LAND_COVER"] = 54] = "VECTOR_LAND_COVER"; + /** + * @generated from protobuf enum value: VECTOR_DEBUG = 55; + */ + TileSetStyle[TileSetStyle["VECTOR_DEBUG"] = 55] = "VECTOR_DEBUG"; + /** + * @generated from protobuf enum value: VECTOR_STREET_POI = 56; + */ + TileSetStyle[TileSetStyle["VECTOR_STREET_POI"] = 56] = "VECTOR_STREET_POI"; + /** + * @generated from protobuf enum value: MUNIN_METADATA = 57; + */ + TileSetStyle[TileSetStyle["MUNIN_METADATA"] = 57] = "MUNIN_METADATA"; + /** + * @generated from protobuf enum value: VECTOR_SPR_MERCATOR = 58; + */ + TileSetStyle[TileSetStyle["VECTOR_SPR_MERCATOR"] = 58] = "VECTOR_SPR_MERCATOR"; + /** + * @generated from protobuf enum value: VECTOR_SPR_MODELS = 59; + */ + TileSetStyle[TileSetStyle["VECTOR_SPR_MODELS"] = 59] = "VECTOR_SPR_MODELS"; + /** + * @generated from protobuf enum value: VECTOR_SPR_MATERIALS = 60; + */ + TileSetStyle[TileSetStyle["VECTOR_SPR_MATERIALS"] = 60] = "VECTOR_SPR_MATERIALS"; + /** + * @generated from protobuf enum value: VECTOR_SPR_METADATA = 61; + */ + TileSetStyle[TileSetStyle["VECTOR_SPR_METADATA"] = 61] = "VECTOR_SPR_METADATA"; + /** + * @generated from protobuf enum value: VECTOR_TRACKS = 62; + */ + TileSetStyle[TileSetStyle["VECTOR_TRACKS"] = 62] = "VECTOR_TRACKS"; + /** + * @generated from protobuf enum value: VECTOR_RESERVED_2 = 63; + */ + TileSetStyle[TileSetStyle["VECTOR_RESERVED_2"] = 63] = "VECTOR_RESERVED_2"; + /** + * @generated from protobuf enum value: VECTOR_STREET_LANDMARKS = 64; + */ + TileSetStyle[TileSetStyle["VECTOR_STREET_LANDMARKS"] = 64] = "VECTOR_STREET_LANDMARKS"; + /** + * @generated from protobuf enum value: COARSE_LOCATION_POLYGONS = 65; + */ + TileSetStyle[TileSetStyle["COARSE_LOCATION_POLYGONS"] = 65] = "COARSE_LOCATION_POLYGONS"; + /** + * @generated from protobuf enum value: VECTOR_SPR_ROADS = 66; + */ + TileSetStyle[TileSetStyle["VECTOR_SPR_ROADS"] = 66] = "VECTOR_SPR_ROADS"; + /** + * @generated from protobuf enum value: VECTOR_SPR_STANDARD = 67; + */ + TileSetStyle[TileSetStyle["VECTOR_SPR_STANDARD"] = 67] = "VECTOR_SPR_STANDARD"; + /** + * @generated from protobuf enum value: VECTOR_POI_V2 = 68; + */ + TileSetStyle[TileSetStyle["VECTOR_POI_V2"] = 68] = "VECTOR_POI_V2"; + /** + * @generated from protobuf enum value: VECTOR_POLYGON_SELECTION = 69; + */ + TileSetStyle[TileSetStyle["VECTOR_POLYGON_SELECTION"] = 69] = "VECTOR_POLYGON_SELECTION"; + /** + * @generated from protobuf enum value: VL_METADATA = 70; + */ + TileSetStyle[TileSetStyle["VL_METADATA"] = 70] = "VL_METADATA"; + /** + * @generated from protobuf enum value: VL_DATA = 71; + */ + TileSetStyle[TileSetStyle["VL_DATA"] = 71] = "VL_DATA"; + /** + * @generated from protobuf enum value: PROACTIVE_APP_CLIP = 72; + */ + TileSetStyle[TileSetStyle["PROACTIVE_APP_CLIP"] = 72] = "PROACTIVE_APP_CLIP"; + /** + * @generated from protobuf enum value: VECTOR_BUILDINGS_V2 = 73; + */ + TileSetStyle[TileSetStyle["VECTOR_BUILDINGS_V2"] = 73] = "VECTOR_BUILDINGS_V2"; + /** + * @generated from protobuf enum value: POI_BUSYNESS = 74; + */ + TileSetStyle[TileSetStyle["POI_BUSYNESS"] = 74] = "POI_BUSYNESS"; + /** + * @generated from protobuf enum value: POI_DP_BUSYNESS = 75; + */ + TileSetStyle[TileSetStyle["POI_DP_BUSYNESS"] = 75] = "POI_DP_BUSYNESS"; + /** + * @generated from protobuf enum value: SMART_INTERFACE_SELECTION = 76; + */ + TileSetStyle[TileSetStyle["SMART_INTERFACE_SELECTION"] = 76] = "SMART_INTERFACE_SELECTION"; + /** + * @generated from protobuf enum value: VECTOR_ASSETS = 77; + */ + TileSetStyle[TileSetStyle["VECTOR_ASSETS"] = 77] = "VECTOR_ASSETS"; + /** + * @generated from protobuf enum value: SPR_ASSET_METADATA = 78; + */ + TileSetStyle[TileSetStyle["SPR_ASSET_METADATA"] = 78] = "SPR_ASSET_METADATA"; + /** + * @generated from protobuf enum value: VECTOR_SPR_POLAR = 79; + */ + TileSetStyle[TileSetStyle["VECTOR_SPR_POLAR"] = 79] = "VECTOR_SPR_POLAR"; + /** + * @generated from protobuf enum value: SMART_DATA_MODE = 80; + */ + TileSetStyle[TileSetStyle["SMART_DATA_MODE"] = 80] = "SMART_DATA_MODE"; + /** + * @generated from protobuf enum value: CELLULAR_PERFORMANCE_SCORE = 81; + */ + TileSetStyle[TileSetStyle["CELLULAR_PERFORMANCE_SCORE"] = 81] = "CELLULAR_PERFORMANCE_SCORE"; + /** + * @generated from protobuf enum value: VECTOR_SPR_MODELS_OCCLUSION = 82; + */ + TileSetStyle[TileSetStyle["VECTOR_SPR_MODELS_OCCLUSION"] = 82] = "VECTOR_SPR_MODELS_OCCLUSION"; + /** + * @generated from protobuf enum value: VECTOR_TOPOGRAPHIC = 83; + */ + TileSetStyle[TileSetStyle["VECTOR_TOPOGRAPHIC"] = 83] = "VECTOR_TOPOGRAPHIC"; + /** + * @generated from protobuf enum value: VECTOR_POI_V2_UPDATE = 84; + */ + TileSetStyle[TileSetStyle["VECTOR_POI_V2_UPDATE"] = 84] = "VECTOR_POI_V2_UPDATE"; + /** + * @generated from protobuf enum value: VECTOR_LIVE_DATA_UPDATES = 85; + */ + TileSetStyle[TileSetStyle["VECTOR_LIVE_DATA_UPDATES"] = 85] = "VECTOR_LIVE_DATA_UPDATES"; + /** + * @generated from protobuf enum value: VECTOR_TRAFFIC_V2 = 86; + */ + TileSetStyle[TileSetStyle["VECTOR_TRAFFIC_V2"] = 86] = "VECTOR_TRAFFIC_V2"; + /** + * @generated from protobuf enum value: VECTOR_ROAD_SELECTION = 87; + */ + TileSetStyle[TileSetStyle["VECTOR_ROAD_SELECTION"] = 87] = "VECTOR_ROAD_SELECTION"; + /** + * @generated from protobuf enum value: VECTOR_REGION_METADATA = 88; + */ + TileSetStyle[TileSetStyle["VECTOR_REGION_METADATA"] = 88] = "VECTOR_REGION_METADATA"; + /** + * @generated from protobuf enum value: RAY_TRACING = 89; + */ + TileSetStyle[TileSetStyle["RAY_TRACING"] = 89] = "RAY_TRACING"; + /** + * @generated from protobuf enum value: VECTOR_CONTOURS = 90; + */ + TileSetStyle[TileSetStyle["VECTOR_CONTOURS"] = 90] = "VECTOR_CONTOURS"; + /** + * @generated from protobuf enum value: UNUSED_91 = 91; + */ + TileSetStyle[TileSetStyle["UNUSED_91"] = 91] = "UNUSED_91"; + /** + * @generated from protobuf enum value: UNUSED_92 = 92; + */ + TileSetStyle[TileSetStyle["UNUSED_92"] = 92] = "UNUSED_92"; + /** + * @generated from protobuf enum value: UNUSED_93 = 93; + */ + TileSetStyle[TileSetStyle["UNUSED_93"] = 93] = "UNUSED_93"; + /** + * @generated from protobuf enum value: UNUSED_94 = 94; + */ + TileSetStyle[TileSetStyle["UNUSED_94"] = 94] = "UNUSED_94"; + /** + * @generated from protobuf enum value: UNUSED_95 = 95; + */ + TileSetStyle[TileSetStyle["UNUSED_95"] = 95] = "UNUSED_95"; + /** + * @generated from protobuf enum value: UNUSED_96 = 96; + */ + TileSetStyle[TileSetStyle["UNUSED_96"] = 96] = "UNUSED_96"; + /** + * @generated from protobuf enum value: UNUSED_97 = 97; + */ + TileSetStyle[TileSetStyle["UNUSED_97"] = 97] = "UNUSED_97"; + /** + * @generated from protobuf enum value: UNUSED_98 = 98; + */ + TileSetStyle[TileSetStyle["UNUSED_98"] = 98] = "UNUSED_98"; + /** + * @generated from protobuf enum value: UNUSED_99 = 99; + */ + TileSetStyle[TileSetStyle["UNUSED_99"] = 99] = "UNUSED_99"; + /** + * @generated from protobuf enum value: VECTOR_SPR_MERCATOR = 58; + */ + TileSetStyle[TileSetStyle["DAVINCI_DEV1"] = 58] = "DAVINCI_DEV1"; + /** + * @generated from protobuf enum value: VECTOR_SPR_MODELS = 59; + */ + TileSetStyle[TileSetStyle["DAVINCI_DEV2"] = 59] = "DAVINCI_DEV2"; + /** + * @generated from protobuf enum value: VECTOR_SPR_MATERIALS = 60; + */ + TileSetStyle[TileSetStyle["DAVINCI_DEV3"] = 60] = "DAVINCI_DEV3"; + /** + * @generated from protobuf enum value: VECTOR_SPR_METADATA = 61; + */ + TileSetStyle[TileSetStyle["DAVINCI_DEV4"] = 61] = "DAVINCI_DEV4"; + /** + * @generated from protobuf enum value: VECTOR_RESERVED_2 = 63; + */ + TileSetStyle[TileSetStyle["DAVINCI_DEV6"] = 63] = "DAVINCI_DEV6"; + /** + * @generated from protobuf enum value: VECTOR_SPR_ROADS = 66; + */ + TileSetStyle[TileSetStyle["DAVINCI_DEV7"] = 66] = "DAVINCI_DEV7"; + /** + * @generated from protobuf enum value: VECTOR_SPR_STANDARD = 67; + */ + TileSetStyle[TileSetStyle["DAVINCI_DEV8"] = 67] = "DAVINCI_DEV8"; + /** + * @generated from protobuf enum value: VECTOR_POI_V2 = 68; + */ + TileSetStyle[TileSetStyle["DAVINCI_DEV9"] = 68] = "DAVINCI_DEV9"; + /** + * @generated from protobuf enum value: VECTOR_BUILDINGS_V2 = 73; + */ + TileSetStyle[TileSetStyle["DAVINCI_BUILDINGS"] = 73] = "DAVINCI_BUILDINGS"; + /** + * @generated from protobuf enum value: VECTOR_TRACKS = 62; + */ + TileSetStyle[TileSetStyle["VECTOR_RESERVED_1"] = 62] = "VECTOR_RESERVED_1"; + })(TileSetStyle || (TileSetStyle = {})); + /** + * @generated from protobuf enum com.apple.geo.protobuf.geo.TileScale + */ + var TileScale; + (function (TileScale) { + /** + * @generated from protobuf enum value: NODPI = 0; + */ + TileScale[TileScale["NODPI"] = 0] = "NODPI"; + /** + * @generated from protobuf enum value: LODPI = 1; + */ + TileScale[TileScale["LODPI"] = 1] = "LODPI"; + /** + * @generated from protobuf enum value: HIDPI = 2; + */ + TileScale[TileScale["HIDPI"] = 2] = "HIDPI"; + })(TileScale || (TileScale = {})); + /** + * @generated from protobuf enum com.apple.geo.protobuf.geo.TileSize + */ + var TileSize; + (function (TileSize) { + /** + * @generated from protobuf enum value: PX128 = 0; + */ + TileSize[TileSize["PX128"] = 0] = "PX128"; + /** + * @generated from protobuf enum value: PX256 = 1; + */ + TileSize[TileSize["PX256"] = 1] = "PX256"; + /** + * @generated from protobuf enum value: PX512 = 2; + */ + TileSize[TileSize["PX512"] = 2] = "PX512"; + })(TileSize || (TileSize = {})); + /** + * @generated from protobuf enum com.apple.geo.protobuf.geo.GenericTileType + */ + var GenericTileType; + (function (GenericTileType) { + /** + * @generated from protobuf enum value: UNKNOWN = 0; + */ + GenericTileType[GenericTileType["UNKNOWN"] = 0] = "UNKNOWN"; + /** + * @generated from protobuf enum value: WATER = 1; + */ + GenericTileType[GenericTileType["WATER"] = 1] = "WATER"; + /** + * @generated from protobuf enum value: NO_TILE = 2; + */ + GenericTileType[GenericTileType["NO_TILE"] = 2] = "NO_TILE"; + })(GenericTileType || (GenericTileType = {})); + // @generated message type with reflection information, may provide speed optimized methods + class RegionalResource$Type extends MessageType { + constructor() { + super("com.apple.geo.protobuf.geo.RegionalResource", [ + { no: 1, name: "x", kind: "scalar", T: 13 /*ScalarType.UINT32*/ }, + { no: 2, name: "y", kind: "scalar", T: 13 /*ScalarType.UINT32*/ }, + { no: 3, name: "z", kind: "scalar", T: 13 /*ScalarType.UINT32*/ }, + { no: 4, name: "icon", kind: "scalar", repeat: 2 /*RepeatType.UNPACKED*/, T: 9 /*ScalarType.STRING*/ }, + { no: 6, name: "attribution", kind: "message", repeat: 1 /*RepeatType.PACKED*/, T: () => Attribution }, + { no: 7, name: "iconChecksum", kind: "scalar", repeat: 2 /*RepeatType.UNPACKED*/, T: 9 /*ScalarType.STRING*/ }, + { no: 29, name: "tileRange", kind: "message", repeat: 1 /*RepeatType.PACKED*/, T: () => TileSetRegion }, + { no: 30, name: "validSubManifestVersion", kind: "scalar", repeat: 1 /*RepeatType.PACKED*/, T: 13 /*ScalarType.UINT32*/ } + ]); + } + } + /** + * @generated MessageType for protobuf message com.apple.geo.protobuf.geo.RegionalResource + */ + const RegionalResource = new RegionalResource$Type(); + // @generated message type with reflection information, may provide speed optimized methods + class RegionalResourceIndex$Type extends MessageType { + constructor() { + super("com.apple.geo.protobuf.geo.RegionalResourceIndex", []); + } + } + /** + * @generated MessageType for protobuf message com.apple.geo.protobuf.geo.RegionalResourceIndex + */ + const RegionalResourceIndex = new RegionalResourceIndex$Type(); + // @generated message type with reflection information, may provide speed optimized methods + class RegionalResourceTile$Type extends MessageType { + constructor() { + super("com.apple.geo.protobuf.geo.RegionalResourceTile", []); + } + } + /** + * @generated MessageType for protobuf message com.apple.geo.protobuf.geo.RegionalResourceTile + */ + const RegionalResourceTile = new RegionalResourceTile$Type(); + // @generated message type with reflection information, may provide speed optimized methods + class RegionalResourceRegion$Type extends MessageType { + constructor() { + super("com.apple.geo.protobuf.geo.RegionalResourceRegion", []); + } + } + /** + * @generated MessageType for protobuf message com.apple.geo.protobuf.geo.RegionalResourceRegion + */ + const RegionalResourceRegion = new RegionalResourceRegion$Type(); + // @generated message type with reflection information, may provide speed optimized methods + class TileGroup$Type extends MessageType { + constructor() { + super("com.apple.geo.protobuf.geo.TileGroup", [ + { no: 1, name: "identifier", kind: "scalar", T: 13 /*ScalarType.UINT32*/ }, + { no: 2, name: "tileSet", kind: "message", repeat: 1 /*RepeatType.PACKED*/, T: () => TileGroup_VersionedTileSet }, + { no: 3, name: "styleSheetIndex", kind: "scalar", repeat: 2 /*RepeatType.UNPACKED*/, T: 13 /*ScalarType.UINT32*/ }, + { no: 4, name: "textureIndex", kind: "scalar", repeat: 2 /*RepeatType.UNPACKED*/, T: 13 /*ScalarType.UINT32*/ }, + { no: 5, name: "fontIndex", kind: "scalar", repeat: 2 /*RepeatType.UNPACKED*/, T: 13 /*ScalarType.UINT32*/ }, + { no: 6, name: "iconIndex", kind: "scalar", repeat: 2 /*RepeatType.UNPACKED*/, T: 13 /*ScalarType.UINT32*/ }, + { no: 7, name: "regionalResourceIndex", kind: "message", repeat: 1 /*RepeatType.PACKED*/, T: () => RegionalResourceIndex }, + { no: 8, name: "xmlIndex", kind: "scalar", repeat: 2 /*RepeatType.UNPACKED*/, T: 13 /*ScalarType.UINT32*/ }, + { no: 10, name: "attributionIndex", kind: "scalar", repeat: 2 /*RepeatType.UNPACKED*/, T: 13 /*ScalarType.UINT32*/ }, + { no: 11, name: "hybridUnavailableRegion", kind: "message", repeat: 1 /*RepeatType.PACKED*/, T: () => TileSetRegion }, + { no: 12, name: "resourceIndex", kind: "scalar", repeat: 2 /*RepeatType.UNPACKED*/, T: 13 /*ScalarType.UINT32*/ }, + { no: 14, name: "muninVersion", kind: "scalar", T: 13 /*ScalarType.UINT32*/ }, + { no: 15, name: "offlineMetadataIndex", kind: "scalar", T: 13 /*ScalarType.UINT32*/ } + ]); + } + } + /** + * @generated MessageType for protobuf message com.apple.geo.protobuf.geo.TileGroup + */ + const TileGroup = new TileGroup$Type(); + // @generated message type with reflection information, may provide speed optimized methods + class TileGroup_VersionedTileSet$Type extends MessageType { + constructor() { + super("com.apple.geo.protobuf.geo.TileGroup.VersionedTileSet", [ + { no: 1, name: "tileSetIndex", kind: "scalar", T: 13 /*ScalarType.UINT32*/ }, + { no: 2, name: "identifier", kind: "scalar", T: 13 /*ScalarType.UINT32*/ } + ]); + } + } + /** + * @generated MessageType for protobuf message com.apple.geo.protobuf.geo.TileGroup.VersionedTileSet + */ + const TileGroup_VersionedTileSet = new TileGroup_VersionedTileSet$Type(); + // @generated message type with reflection information, may provide speed optimized methods + class GenericTile$Type extends MessageType { + constructor() { + super("com.apple.geo.protobuf.geo.GenericTile", [ + { no: 1, name: "tileType", kind: "enum", T: () => ["com.apple.geo.protobuf.geo.GenericTileType", GenericTileType] }, + { no: 2, name: "textureIndex", kind: "scalar", T: 13 /*ScalarType.UINT32*/ }, + { no: 3, name: "resourceIndex", kind: "scalar", T: 13 /*ScalarType.UINT32*/ } + ]); + } + } + /** + * @generated MessageType for protobuf message com.apple.geo.protobuf.geo.GenericTile + */ + const GenericTile = new GenericTile$Type(); + // @generated message type with reflection information, may provide speed optimized methods + class TileSetRegion$Type extends MessageType { + constructor() { + super("com.apple.geo.protobuf.geo.TileSetRegion", [ + { no: 1, name: "minX", kind: "scalar", T: 13 /*ScalarType.UINT32*/ }, + { no: 2, name: "minY", kind: "scalar", T: 13 /*ScalarType.UINT32*/ }, + { no: 3, name: "maxX", kind: "scalar", T: 13 /*ScalarType.UINT32*/ }, + { no: 4, name: "maxY", kind: "scalar", T: 13 /*ScalarType.UINT32*/ }, + { no: 5, name: "minZ", kind: "scalar", T: 13 /*ScalarType.UINT32*/ }, + { no: 6, name: "maxZ", kind: "scalar", T: 13 /*ScalarType.UINT32*/ } + ]); + } + } + /** + * @generated MessageType for protobuf message com.apple.geo.protobuf.geo.TileSetRegion + */ + const TileSetRegion = new TileSetRegion$Type(); + // @generated message type with reflection information, may provide speed optimized methods + class TileSetVersion$Type extends MessageType { + constructor() { + super("com.apple.geo.protobuf.geo.TileSetVersion", [ + { no: 1, name: "identifier", kind: "scalar", T: 13 /*ScalarType.UINT32*/ }, + { no: 2, name: "availableTiles", kind: "message", repeat: 1 /*RepeatType.PACKED*/, T: () => TileSetRegion }, + { no: 3, name: "timeToLiveSeconds", kind: "scalar", opt: true, T: 13 /*ScalarType.UINT32*/ }, + { no: 4, name: "genericTile", kind: "message", repeat: 1 /*RepeatType.PACKED*/, T: () => GenericTile }, + { no: 5, name: "supportedLanguagesVersion", kind: "scalar", opt: true, T: 13 /*ScalarType.UINT32*/ } + ]); + } + } + /** + * @generated MessageType for protobuf message com.apple.geo.protobuf.geo.TileSetVersion + */ + const TileSetVersion = new TileSetVersion$Type(); + // @generated message type with reflection information, may provide speed optimized methods + class TileSet$Type extends MessageType { + constructor() { + super("com.apple.geo.protobuf.geo.TileSet", [ + { no: 1, name: "baseURL", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/ }, + { no: 2, name: "multiTileURL", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/ }, + { no: 3, name: "style", kind: "enum", T: () => ["com.apple.geo.protobuf.geo.TileSetStyle", TileSetStyle] }, + { no: 5, name: "validVersion", kind: "message", repeat: 1 /*RepeatType.PACKED*/, T: () => TileSetVersion }, + { no: 6, name: "scale", kind: "enum", T: () => ["com.apple.geo.protobuf.geo.TileScale", TileScale] }, + { no: 7, name: "size", kind: "enum", T: () => ["com.apple.geo.protobuf.geo.TileSize", TileSize] }, + { no: 9, name: "localizationURL", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/ }, + { no: 10, name: "supportedLanguage", kind: "message", repeat: 1 /*RepeatType.PACKED*/, T: () => TileSet_Language }, + { no: 11, name: "multiTileURLUsesStatusCodes", kind: "scalar", opt: true, T: 8 /*ScalarType.BOOL*/ }, + { no: 12, name: "updateBehavior", kind: "enum", opt: true, T: () => ["com.apple.geo.protobuf.geo.TileSet.TileSetVersionUpdateBehavior", TileSet_TileSetVersionUpdateBehavior] }, + { no: 13, name: "countryRegionWhitelist", kind: "message", repeat: 1 /*RepeatType.PACKED*/, T: () => TileSet_CountryRegionTuple }, + { no: 14, name: "checksumType", kind: "enum", T: () => ["com.apple.geo.protobuf.geo.TileSet.TileSetChecksumType", TileSet_TileSetChecksumType] }, + { no: 15, name: "dataSet", kind: "scalar", opt: true, T: 13 /*ScalarType.UINT32*/ }, + { no: 16, name: "requestStyle", kind: "enum", T: () => ["com.apple.geo.protobuf.geo.TileSet.TileRequestStyle", TileSet_TileRequestStyle] }, + { no: 17, name: "useAuthProxy", kind: "scalar", opt: true, T: 8 /*ScalarType.BOOL*/ }, + { no: 18, name: "supportsMultipathTCP", kind: "scalar", opt: true, T: 8 /*ScalarType.BOOL*/ }, + { no: 19, name: "alternativeMultipathTCPPort", kind: "scalar", opt: true, T: 13 /*ScalarType.UINT32*/ }, + { no: 20, name: "deviceSKUWhitelist", kind: "scalar", repeat: 2 /*RepeatType.UNPACKED*/, T: 9 /*ScalarType.STRING*/ } + ]); + } + } + /** + * @generated MessageType for protobuf message com.apple.geo.protobuf.geo.TileSet + */ + const TileSet = new TileSet$Type(); + // @generated message type with reflection information, may provide speed optimized methods + class TileSet_Language$Type extends MessageType { + constructor() { + super("com.apple.geo.protobuf.geo.TileSet.Language", [ + { no: 1, name: "identifier", kind: "scalar", T: 13 /*ScalarType.UINT32*/ }, + { no: 2, name: "language", kind: "scalar", repeat: 2 /*RepeatType.UNPACKED*/, T: 9 /*ScalarType.STRING*/ } + ]); + } + } + /** + * @generated MessageType for protobuf message com.apple.geo.protobuf.geo.TileSet.Language + */ + const TileSet_Language = new TileSet_Language$Type(); + // @generated message type with reflection information, may provide speed optimized methods + class TileSet_CountryRegionTuple$Type extends MessageType { + constructor() { + super("com.apple.geo.protobuf.geo.TileSet.CountryRegionTuple", [ + { no: 1, name: "countryCode", kind: "scalar", T: 9 /*ScalarType.STRING*/ }, + { no: 2, name: "region", kind: "scalar", T: 9 /*ScalarType.STRING*/ } + ]); + } + } + /** + * @generated MessageType for protobuf message com.apple.geo.protobuf.geo.TileSet.CountryRegionTuple + */ + const TileSet_CountryRegionTuple = new TileSet_CountryRegionTuple$Type(); + // @generated message type with reflection information, may provide speed optimized methods + class ResourceFilter$Type extends MessageType { + constructor() { + super("com.apple.geo.protobuf.geo.ResourceFilter", [ + { no: 1, name: "scale", kind: "enum", repeat: 1 /*RepeatType.PACKED*/, T: () => ["com.apple.geo.protobuf.geo.ResourceFilter.Scale", ResourceFilter_Scale] }, + { no: 2, name: "scenario", kind: "enum", repeat: 1 /*RepeatType.PACKED*/, T: () => ["com.apple.geo.protobuf.geo.ResourceFilter.Scenario", ResourceFilter_Scenario] } + ]); + } + } + /** + * @generated MessageType for protobuf message com.apple.geo.protobuf.geo.ResourceFilter + */ + const ResourceFilter = new ResourceFilter$Type(); + // @generated message type with reflection information, may provide speed optimized methods + class Resource$Type extends MessageType { + constructor() { + super("com.apple.geo.protobuf.geo.Resource", [ + { no: 1, name: "resourceType", kind: "enum", T: () => ["com.apple.geo.protobuf.geo.Resource.ResourceType", Resource_ResourceType, "RESOURCE_TYPE_"] }, + { no: 2, name: "filename", kind: "scalar", T: 9 /*ScalarType.STRING*/ }, + { no: 3, name: "checksum", kind: "scalar", T: 12 /*ScalarType.BYTES*/ }, + { no: 4, name: "region", kind: "message", repeat: 1 /*RepeatType.PACKED*/, T: () => TileSetRegion }, + { no: 5, name: "filter", kind: "message", repeat: 1 /*RepeatType.PACKED*/, T: () => ResourceFilter }, + { no: 6, name: "connectionType", kind: "enum", opt: true, T: () => ["com.apple.geo.protobuf.geo.Resource.ConnectionType", Resource_ConnectionType] }, + { no: 7, name: "preferWiFiAllowedStaleThreshold", kind: "scalar", opt: true, T: 13 /*ScalarType.UINT32*/ }, + { no: 8, name: "validationMethod", kind: "enum", T: () => ["com.apple.geo.protobuf.geo.Resource.ValidationMethod", Resource_ValidationMethod] }, + { no: 9, name: "alternateResourceURLIndex", kind: "scalar", opt: true, T: 13 /*ScalarType.UINT32*/ }, + { no: 10, name: "updateMethod", kind: "enum", T: () => ["com.apple.geo.protobuf.geo.Resource.UpdateMethod", Resource_UpdateMethod] }, + { no: 11, name: "timeToLiveSeconds", kind: "scalar", opt: true, T: 13 /*ScalarType.UINT32*/ } + ]); + } + } + /** + * @generated MessageType for protobuf message com.apple.geo.protobuf.geo.Resource + */ + const Resource = new Resource$Type(); + // @generated message type with reflection information, may provide speed optimized methods + class Attribution$Type extends MessageType { + constructor() { + super("com.apple.geo.protobuf.geo.Attribution", [ + { no: 1, name: "badge", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/ }, + { no: 2, name: "logo", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/ }, + { no: 3, name: "name", kind: "scalar", T: 9 /*ScalarType.STRING*/ }, + { no: 4, name: "url", kind: "scalar", T: 9 /*ScalarType.STRING*/ }, + { no: 5, name: "badgeChecksum", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/ }, + { no: 6, name: "logoChecksum", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/ }, + { no: 7, name: "resource", kind: "message", repeat: 1 /*RepeatType.PACKED*/, T: () => Resource }, + { no: 8, name: "region", kind: "message", repeat: 1 /*RepeatType.PACKED*/, T: () => TileSetRegion }, + { no: 9, name: "dataSet", kind: "scalar", opt: true, T: 13 /*ScalarType.UINT32*/ }, + { no: 10, name: "linkDisplayStringIndex", kind: "scalar", opt: true, T: 13 /*ScalarType.UINT32*/ }, + { no: 11, name: "plainTextURL", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/ }, + { no: 12, name: "plainTextURLSHA256Checksum", kind: "scalar", opt: true, T: 12 /*ScalarType.BYTES*/ } + ]); + } + } + /** + * @generated MessageType for protobuf message com.apple.geo.protobuf.geo.Attribution + */ + const Attribution = new Attribution$Type(); + // @generated message type with reflection information, may provide speed optimized methods + class ServiceVersion$Type extends MessageType { + constructor() { + super("com.apple.geo.protobuf.geo.ServiceVersion", [ + { no: 1, name: "versionDomain", kind: "scalar", repeat: 2 /*RepeatType.UNPACKED*/, T: 9 /*ScalarType.STRING*/ }, + { no: 2, name: "minimumVersion", kind: "scalar", T: 13 /*ScalarType.UINT32*/ } + ]); + } + } + /** + * @generated MessageType for protobuf message com.apple.geo.protobuf.geo.ServiceVersion + */ + const ServiceVersion = new ServiceVersion$Type(); + // @generated message type with reflection information, may provide speed optimized methods + class VersionManifest$Type extends MessageType { + constructor() { + super("com.apple.geo.protobuf.geo.VersionManifest", [ + { no: 1, name: "serviceVersion", kind: "message", repeat: 1 /*RepeatType.PACKED*/, T: () => ServiceVersion } + ]); + } + } + /** + * @generated MessageType for protobuf message com.apple.geo.protobuf.geo.VersionManifest + */ + const VersionManifest = new VersionManifest$Type(); + // @generated message type with reflection information, may provide speed optimized methods + class DataSetDescription$Type extends MessageType { + constructor() { + super("com.apple.geo.protobuf.geo.DataSetDescription", [ + { no: 1, name: "identifier", kind: "scalar", T: 13 /*ScalarType.UINT32*/ }, + { no: 2, name: "dataSetDescription", kind: "scalar", T: 9 /*ScalarType.STRING*/ } + ]); + } + } + /** + * @generated MessageType for protobuf message com.apple.geo.protobuf.geo.DataSetDescription + */ + const DataSetDescription = new DataSetDescription$Type(); + // @generated message type with reflection information, may provide speed optimized methods + class DataSetURLOverride$Type extends MessageType { + constructor() { + super("com.apple.geo.protobuf.geo.DataSetURLOverride", []); + } + } + /** + * @generated MessageType for protobuf message com.apple.geo.protobuf.geo.DataSetURLOverride + */ + const DataSetURLOverride = new DataSetURLOverride$Type(); + // @generated message type with reflection information, may provide speed optimized methods + class MuninVersion$Type extends MessageType { + constructor() { + super("com.apple.geo.protobuf.geo.MuninVersion", []); + } + } + /** + * @generated MessageType for protobuf message com.apple.geo.protobuf.geo.MuninVersion + */ + const MuninVersion = new MuninVersion$Type(); + // @generated message type with reflection information, may provide speed optimized methods + class URLInfo$Type extends MessageType { + constructor() { + super("com.apple.geo.protobuf.geo.URLInfo", [ + { no: 1, name: "url", kind: "scalar", T: 9 /*ScalarType.STRING*/ }, + { no: 2, name: "useAuthProxy", kind: "scalar", opt: true, T: 8 /*ScalarType.BOOL*/ }, + { no: 3, name: "supportsMultipathTCP", kind: "scalar", T: 8 /*ScalarType.BOOL*/ }, + { no: 4, name: "alternativeMultipathTCPPort", kind: "scalar", opt: true, T: 13 /*ScalarType.UINT32*/ } + ]); + } + } + /** + * @generated MessageType for protobuf message com.apple.geo.protobuf.geo.URLInfo + */ + const URLInfo = new URLInfo$Type(); + // @generated message type with reflection information, may provide speed optimized methods + class URLInfoSet$Type extends MessageType { + constructor() { + super("com.apple.geo.protobuf.geo.URLInfoSet", [ + { no: 1, name: "dataSet", kind: "scalar", opt: true, T: 13 /*ScalarType.UINT32*/ }, + { no: 2, name: "resourcesURL", kind: "message", T: () => URLInfo }, + { no: 3, name: "searchAttributionManifestURL", kind: "message", T: () => URLInfo }, + { no: 4, name: "directionsURL", kind: "message", T: () => URLInfo }, + { no: 5, name: "etaURL", kind: "message", T: () => URLInfo }, + { no: 6, name: "batchReverseGeocoderURL", kind: "message", T: () => URLInfo }, + { no: 7, name: "simpleETAURL", kind: "message", T: () => URLInfo }, + { no: 8, name: "addressCorrectionInitURL", kind: "message", T: () => URLInfo }, + { no: 9, name: "addressCorrectionUpdateURL", kind: "message", T: () => URLInfo }, + { no: 10, name: "polyLocationShiftURL", kind: "message", T: () => URLInfo }, + { no: 11, name: "problemSubmissionURL", kind: "message", T: () => URLInfo }, + { no: 12, name: "problemStatusURL", kind: "message", T: () => URLInfo }, + { no: 13, name: "reverseGeocoderVersionsURL", kind: "message", T: () => URLInfo }, + { no: 14, name: "problemCategoriesURL", kind: "message", T: () => URLInfo }, + { no: 15, name: "announcementsURL", kind: "message", T: () => URLInfo }, + { no: 16, name: "dispatcherURL", kind: "message", T: () => URLInfo }, + { no: 17, name: "problemOptInURL", kind: "message", T: () => URLInfo }, + { no: 18, name: "abExperimentURL", kind: "message", T: () => URLInfo }, + { no: 19, name: "businessPortalBaseURL", kind: "message", T: () => URLInfo }, + { no: 20, name: "logMessageUsageURL", kind: "message", T: () => URLInfo }, + { no: 21, name: "spatialLookupURL", kind: "message", T: () => URLInfo }, + { no: 22, name: "realtimeTrafficProbeURL", kind: "message", T: () => URLInfo }, + { no: 23, name: "batchTrafficProbeURL", kind: "message", T: () => URLInfo }, + { no: 24, name: "proactiveRoutingURL", kind: "message", T: () => URLInfo }, + { no: 25, name: "logMessageUsageV3URL", kind: "message", T: () => URLInfo }, + { no: 26, name: "backgroundDispatcherURL", kind: "message", T: () => URLInfo }, + { no: 27, name: "bluePOIDispatcherURL", kind: "message", T: () => URLInfo }, + { no: 28, name: "backgroundRevGeoURL", kind: "message", T: () => URLInfo }, + { no: 29, name: "wifiConnectionQualityProbeURL", kind: "message", T: () => URLInfo }, + { no: 30, name: "muninBaseURL", kind: "message", T: () => URLInfo }, + { no: 31, name: "authProxyURL", kind: "message", T: () => URLInfo }, + { no: 32, name: "wifiQualityURL", kind: "message", T: () => URLInfo }, + { no: 33, name: "feedbackSubmissionURL", kind: "message", T: () => URLInfo }, + { no: 34, name: "feedbackLookupURL", kind: "message", T: () => URLInfo }, + { no: 35, name: "junctionImageServiceURL", kind: "message", T: () => URLInfo }, + { no: 36, name: "analyticsCohortSessionURL", kind: "message", T: () => URLInfo }, + { no: 37, name: "analyticsLongSessionURL", kind: "message", T: () => URLInfo }, + { no: 38, name: "analyticsShortSessionURL", kind: "message", T: () => URLInfo }, + { no: 39, name: "analyticsSessionlessURL", kind: "message", T: () => URLInfo }, + { no: 40, name: "webModuleBaseURL", kind: "message", T: () => URLInfo }, + { no: 41, name: "wifiQualityTileURL", kind: "message", T: () => URLInfo }, + { no: 42, name: "alternateResourcesURL", kind: "message", repeat: 1 /*RepeatType.PACKED*/, T: () => URLInfo }, + { no: 43, name: "tokenAuthenticationURL", kind: "message", T: () => URLInfo }, + { no: 44, name: "authenticatedClientFeatureFlagURL", kind: "message", T: () => URLInfo }, + { no: 45, name: "addressCorrectionTaggedLocationURL", kind: "message", T: () => URLInfo }, + { no: 46, name: "proactiveAppClipURL", kind: "message", T: () => URLInfo }, + { no: 47, name: "enrichmentSubmissionURL", kind: "message", T: () => URLInfo }, + { no: 48, name: "ugcLogDiscardURL", kind: "message", T: () => URLInfo }, + { no: 49, name: "batchReverseGeocoderPlaceRequestURL", kind: "message", T: () => URLInfo }, + { no: 50, name: "pressureProbeDataURL", kind: "message", T: () => URLInfo }, + { no: 51, name: "poiBusynessActivityCollectionURL", kind: "message", T: () => URLInfo }, + { no: 52, name: "rapWebBundleURL", kind: "message", T: () => URLInfo }, + { no: 53, name: "networkSelectionHarvestURL", kind: "message", T: () => URLInfo }, + { no: 54, name: "offlineDataBatchListURL", kind: "message", T: () => URLInfo }, + { no: 55, name: "offlineDataSizeURL", kind: "message", T: () => URLInfo }, + { no: 56, name: "offlineDataDownloadBaseURL", kind: "message", T: () => URLInfo }, + { no: 57, name: "bcxDispatcherURL", kind: "message", T: () => URLInfo } + ]); + } + } + /** + * @generated MessageType for protobuf message com.apple.geo.protobuf.geo.URLInfoSet + */ + const URLInfoSet = new URLInfoSet$Type(); + // @generated message type with reflection information, may provide speed optimized methods + class MuninBucket$Type extends MessageType { + constructor() { + super("com.apple.geo.protobuf.geo.MuninBucket", [ + { no: 3, name: "bucketID", kind: "scalar", T: 13 /*ScalarType.UINT32*/ }, + { no: 4, name: "bucketURL", kind: "scalar", T: 9 /*ScalarType.STRING*/ }, + { no: 5, name: "lodLevel", kind: "scalar", opt: true, T: 13 /*ScalarType.UINT32*/ } + ]); + } + } + /** + * @generated MessageType for protobuf message com.apple.geo.protobuf.geo.MuninBucket + */ + const MuninBucket = new MuninBucket$Type(); + // @generated message type with reflection information, may provide speed optimized methods + class DisplayString$Type extends MessageType { + constructor() { + super("com.apple.geo.protobuf.geo.DisplayString", [ + { no: 1, name: "localizedString", kind: "message", repeat: 1 /*RepeatType.PACKED*/, T: () => LocalizedString } + ]); + } + } + /** + * @generated MessageType for protobuf message com.apple.geo.protobuf.geo.DisplayString + */ + const DisplayString = new DisplayString$Type(); + // @generated message type with reflection information, may provide speed optimized methods + class LocalizedString$Type extends MessageType { + constructor() { + super("com.apple.geo.protobuf.geo.LocalizedString", [ + { no: 1, name: "locale", kind: "scalar", T: 9 /*ScalarType.STRING*/ }, + { no: 3, name: "stringValue", kind: "scalar", T: 9 /*ScalarType.STRING*/ } + ]); + } + } + /** + * @generated MessageType for protobuf message com.apple.geo.protobuf.geo.LocalizedString + */ + const LocalizedString = new LocalizedString$Type(); + // @generated message type with reflection information, may provide speed optimized methods + class MapRegion$Type extends MessageType { + constructor() { + super("com.apple.geo.protobuf.geo.MapRegion", []); + } + } + /** + * @generated MessageType for protobuf message com.apple.geo.protobuf.geo.MapRegion + */ + const MapRegion = new MapRegion$Type(); + // @generated message type with reflection information, may provide speed optimized methods + class OfflineMetadata$Type extends MessageType { + constructor() { + super("com.apple.geo.protobuf.geo.OfflineMetadata", [ + { no: 1, name: "dataVersion", kind: "scalar", T: 4 /*ScalarType.UINT64*/ }, + { no: 2, name: "regulatoryRegionId", kind: "scalar", T: 13 /*ScalarType.UINT32*/ } + ]); + } + } + /** + * @generated MessageType for protobuf message com.apple.geo.protobuf.geo.OfflineMetadata + */ + const OfflineMetadata = new OfflineMetadata$Type(); + // @generated message type with reflection information, may provide speed optimized methods + class Resources$Type extends MessageType { + constructor() { + super("com.apple.geo.protobuf.geo.Resources", [ + { no: 1, name: "tileGroup", kind: "message", repeat: 1 /*RepeatType.PACKED*/, T: () => TileGroup }, + { no: 2, name: "tileSet", kind: "message", repeat: 1 /*RepeatType.PACKED*/, T: () => TileSet }, + { no: 3, name: "styleSheet", kind: "scalar", repeat: 2 /*RepeatType.UNPACKED*/, T: 9 /*ScalarType.STRING*/ }, + { no: 4, name: "texture", kind: "scalar", repeat: 2 /*RepeatType.UNPACKED*/, T: 9 /*ScalarType.STRING*/ }, + { no: 5, name: "font", kind: "scalar", repeat: 2 /*RepeatType.UNPACKED*/, T: 9 /*ScalarType.STRING*/ }, + { no: 6, name: "icon", kind: "scalar", repeat: 2 /*RepeatType.UNPACKED*/, T: 9 /*ScalarType.STRING*/ }, + { no: 8, name: "regionalResource", kind: "message", repeat: 1 /*RepeatType.PACKED*/, T: () => RegionalResource }, + { no: 9, name: "xml", kind: "scalar", repeat: 2 /*RepeatType.UNPACKED*/, T: 9 /*ScalarType.STRING*/ }, + { no: 11, name: "attribution", kind: "message", repeat: 1 /*RepeatType.PACKED*/, T: () => Attribution }, + { no: 30, name: "authToken", kind: "scalar", T: 9 /*ScalarType.STRING*/ }, + { no: 31, name: "resourcesURL", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/ }, + { no: 32, name: "searchURL", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/ }, + { no: 33, name: "searchAttributionManifestURL", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/ }, + { no: 34, name: "autocompleteURL", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/ }, + { no: 35, name: "reverseGeocoderURL", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/ }, + { no: 36, name: "forwardGeocoderURL", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/ }, + { no: 37, name: "directionsURL", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/ }, + { no: 38, name: "etaURL", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/ }, + { no: 39, name: "locationShiftURL", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/ }, + { no: 40, name: "releaseInfo", kind: "scalar", T: 9 /*ScalarType.STRING*/ }, + { no: 41, name: "batchReverseGeocoderURL", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/ }, + { no: 42, name: "mapMatchURL", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/ }, + { no: 43, name: "simpleETAURL", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/ }, + { no: 44, name: "styleSheetChecksum", kind: "scalar", repeat: 2 /*RepeatType.UNPACKED*/, T: 9 /*ScalarType.STRING*/ }, + { no: 45, name: "textureChecksum", kind: "scalar", repeat: 2 /*RepeatType.UNPACKED*/, T: 9 /*ScalarType.STRING*/ }, + { no: 46, name: "fontChecksum", kind: "scalar", repeat: 2 /*RepeatType.UNPACKED*/, T: 9 /*ScalarType.STRING*/ }, + { no: 47, name: "iconChecksum", kind: "scalar", repeat: 2 /*RepeatType.UNPACKED*/, T: 9 /*ScalarType.STRING*/ }, + { no: 48, name: "xmlChecksum", kind: "scalar", repeat: 2 /*RepeatType.UNPACKED*/, T: 9 /*ScalarType.STRING*/ }, + { no: 49, name: "addressCorrectionInitURL", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/ }, + { no: 50, name: "addressCorrectionUpdateURL", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/ }, + { no: 51, name: "polyLocationShiftURL", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/ }, + { no: 52, name: "problemSubmissionURL", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/ }, + { no: 53, name: "problemStatusURL", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/ }, + { no: 54, name: "reverseGeocoderVersionsURL", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/ }, + { no: 55, name: "problemCategoriesURL", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/ }, + { no: 56, name: "usageURL", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/ }, + { no: 58, name: "businessCallerIDURL", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/ }, + { no: 59, name: "problemNotificationAvailabilityURL", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/ }, + { no: 61, name: "announcementsURL", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/ }, + { no: 62, name: "announcementsSupportedLanguage", kind: "scalar", repeat: 2 /*RepeatType.UNPACKED*/, T: 9 /*ScalarType.STRING*/ }, + { no: 63, name: "businessNameResolutionURL", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/ }, + { no: 64, name: "dispatcherURL", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/ }, + { no: 65, name: "problemOptInURL", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/ }, + { no: 66, name: "versionManifest", kind: "message", T: () => VersionManifest }, + { no: 67, name: "abExperimentURL", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/ }, + { no: 68, name: "businessPortalBaseURL", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/ }, + { no: 69, name: "logMessageUsageURL", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/ }, + { no: 70, name: "locationShiftEnabledRegion", kind: "message", repeat: 1 /*RepeatType.PACKED*/, T: () => MapRegion }, + { no: 71, name: "locationShiftVersion", kind: "scalar", opt: true, T: 13 /*ScalarType.UINT32*/ }, + { no: 72, name: "resource", kind: "message", repeat: 1 /*RepeatType.PACKED*/, T: () => Resource }, + { no: 73, name: "spatialLookupURL", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/ }, + { no: 74, name: "dataSet", kind: "message", repeat: 1 /*RepeatType.PACKED*/, T: () => DataSetDescription }, + { no: 75, name: "dataSetURLOverride", kind: "message", repeat: 1 /*RepeatType.PACKED*/, T: () => DataSetURLOverride }, + { no: 77, name: "realtimeTrafficProbeURL", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/ }, + { no: 78, name: "batchTrafficProbeURL", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/ }, + { no: 79, name: "proactiveRoutingURL", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/ }, + { no: 80, name: "logMessageUsageV3URL", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/ }, + { no: 81, name: "backgroundDispatcherURL", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/ }, + { no: 82, name: "bluePOIDispatcherURL", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/ }, + { no: 83, name: "backgroundRevGeoURL", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/ }, + { no: 85, name: "wifiConnectionQualityProbeURL", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/ }, + { no: 88, name: "muninBaseURL", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/ }, + { no: 89, name: "muninVersion", kind: "message", repeat: 1 /*RepeatType.PACKED*/, T: () => MuninVersion }, + { no: 91, name: "authProxyURL", kind: "scalar", opt: true, T: 9 /*ScalarType.STRING*/ }, + { no: 92, name: "urlInfoSet", kind: "message", repeat: 1 /*RepeatType.PACKED*/, T: () => URLInfoSet }, + { no: 93, name: "muninBucket", kind: "message", repeat: 1 /*RepeatType.PACKED*/, T: () => MuninBucket }, + { no: 94, name: "displayString", kind: "message", repeat: 1 /*RepeatType.PACKED*/, T: () => DisplayString }, + { no: 95, name: "offlineMetadata", kind: "message", repeat: 1 /*RepeatType.PACKED*/, T: () => OfflineMetadata } + ]); + } + } + /** + * @generated MessageType for protobuf message com.apple.geo.protobuf.geo.Resources + */ + const Resources = new Resources$Type(); + // @generated message type with reflection information, may provide speed optimized methods + class ResourceManifestDownload$Type extends MessageType { + constructor() { + super("com.apple.geo.protobuf.geo.ResourceManifestDownload", [ + { no: 1, name: "resources", kind: "message", T: () => Resources } + ]); + } + } + /** + * @generated MessageType for protobuf message com.apple.geo.protobuf.geo.ResourceManifestDownload + */ + const ResourceManifestDownload = new ResourceManifestDownload$Type(); + /****************** initialization finish *******************/ + body = Resources.fromBinary(rawBody); + //$.log(`🚧 调试信息`, `body before: ${JSON.stringify(body)}`, ""); + /* + let UF = UnknownFieldHandler.list(body); + //$.log(`🚧 调试信息`, `UF: ${JSON.stringify(UF)}`, ""); + if (UF) { + UF = UF.map(uf => { + //uf.no; // 22 + //uf.wireType; // WireType.Varint + // use the binary reader to decode the raw data: + let reader = new BinaryReader(uf.data); + let addedNumber = reader.int32(); // 7777 + $.log(`🚧 no: ${uf.no}, wireType: ${uf.wireType}, reader: ${reader}, addedNumber: ${addedNumber}`, ""); + }); + }; + */ + switch (URL.query.country_code) { + case "CN": + setCache(Caches, "CN", body); + if (!Caches.XX) Caches.XX = Configs.XX; + // announcementsSupportedLanguage + //body.announcementsSupportedLanguage?.push?.("zh-CN"); + //body.announcementsSupportedLanguage?.push?.("zh-TW"); + break; + default: + setCache(Caches, "XX", body); + if (!Caches.CN) Caches.CN = Configs.CN; + // resource + body.resource.push({ "resourceType": 7, "filename": "POITypeMapping-CN-1.json", "checksum": { "0": 242, "1": 10, "2": 179, "3": 107, "4": 214, "5": 41, "6": 50, "7": 223, "8": 62, "9": 204, "10": 134, "11": 7, "12": 103, "13": 206, "14": 96, "15": 242, "16": 24, "17": 42, "18": 79, "19": 223 }, "region": [], "filter": [], "validationMethod": 0, "updateMethod": 0 }); + body.resource.push({ "resourceType": 7, "filename": "China.cms-lpr", "checksum": { "0": 196, "1": 139, "2": 158, "3": 17, "4": 250, "5": 132, "6": 138, "7": 10, "8": 138, "9": 38, "10": 96, "11": 130, "12": 82, "13": 80, "14": 4, "15": 239, "16": 11, "17": 107, "18": 183, "19": 236 }, "region": [{ "minX": 1, "minY": 0, "maxX": 1, "maxY": 0, "minZ": 1, "maxZ": 25 }], "filter": [{ "scale": [], "scenario": [4] }], "connectionType": 0, "preferWiFiAllowedStaleThreshold": 0, "validationMethod": 1, "alternateResourceURLIndex": 1, "updateMethod": 1, "timeToLiveSeconds": 0 }); + break; + }; + body.tileSet = tileSets(body.tileSet, Settings, Caches); + body.attribution = attributions(body.attribution, URL, Caches); + //body.dataSet = dataSets(body.dataSet, Settings, Caches); + body.urlInfoSet = urlInfoSets(body.urlInfoSet, URL, Settings, Caches); + body.muninBucket = muninBuckets(body.muninBucket, Settings, Caches); + // releaseInfo + //body.releaseInfo = body.releaseInfo.replace(/(\d+\.\d+)/, `$1.${String(Date.now()/1000)}`); + $.log(`🚧 releaseInfo: ${body.releaseInfo}`, ""); + body = SetTileGroup(body); + //$.log(`🚧 调试信息`, `body after: ${JSON.stringify(body)}`, ""); + rawBody = Resources.toBinary(body); + break; + }; + break; + }; + break; + case "application/grpc": + case "application/grpc+proto": + break; + }; + // 写入二进制数据 + $response.body = rawBody; + break; + }; + break; + case false: + break; + }; +})() + .catch((e) => $.logErr(e)) + .finally(() => $.done($response)) + +/***************** Function *****************/ +function setCache(cache, path, body) { + $.log(`☑️ Set Cache, path: ${path}`, ""); + if (Date.now() - _.get(cache, `${path}.timeStamp`, 0) > 86400000) { + _.set(cache, `${path}.tileSet`, body.tileSet); + _.set(cache, `${path}.attribution`, body.attribution); + _.set(cache, `${path}.urlInfoSet`, body.urlInfoSet); + _.set(cache, `${path}.muninBucket`, body.muninBucket); + _.set(cache, `${path}.timeStamp`, Date.now()); + $Storage.setItem("@iRingo.Maps.Caches", cache); + $.log(`✅ Set Cache`, ""); + } else $.log(`❎ Set Cache`, ""); +}; + +function SetTileGroup(body = {}) { + $.log(`☑️ Set TileGroups`, ""); + body.tileGroup = body.tileGroup.map(tileGroup => { + $.log(`🚧 tileGroup.identifier: ${tileGroup.identifier}`); + tileGroup.identifier += Math.floor(Math.random() * 100) + 1; + $.log(`🚧 tileGroup.identifier: ${tileGroup.identifier}`); + tileGroup.tileSet = body.tileSet.map((tileSet, index) => { + return { + "tileSetIndex": index, + "identifier": tileSet.validVersion?.[0]?.identifier + }; + }); + tileGroup.attributionIndex = body.attribution.map((attribution, index) => { + return index; + }); + tileGroup.resourceIndex = body.resource.map((resource, index) => { + return index; + }); + return tileGroup; + }); + $.log(`✅ Set TileGroups`, ""); + return body; +}; + +function tileSets(tileSets = [], settings = {}, caches = {}) { + $.log(`☑️ Set TileSets`, ""); + /* + // 填补数据组 + if (caches?.CN?.tileSet) caches.CN.tileSet = caches.CN.tileSet.map(tile => { + tile.dataSet = 2; + return tile; + }); + */ + // 填补空缺图源 + caches?.XX?.tileSet?.forEach(tile => { + if (!tileSets.some(i => i.style === tile.style)) tileSets.push(tile); + }); + // 按需更改图源 + tileSets = tileSets.map((tileSet, index) => { + switch (tileSet.style) { + case 1: // VECTOR_STANDARD 标准地图 + case 8: // RASTER_TERRAIN 地貌与地势(绿地/城市/水体/山地不同颜色的区域) + case 11: // VECTOR_BUILDINGS 建筑模型(3D/白模) + case 20: // VECTOR_ROADS 道路(卫星地图:显示标签) + case 30: // VECTOR_VENUES 室内地图 + case 37: // VECTOR_TRANSIT 公共交通 + case 47: // VECTOR_TRANSIT_SELECTION + case 64: // VECTOR_STREET_LANDMARKS + case 73: // VECTOR_BUILDINGS_V2 建筑模型V2(3D/上色) + switch (settings.TileSet.Map) { + case "AUTO": + default: + break; + case "CN": + tileSet = caches?.CN?.tileSet?.find(i => i.style === tileSet.style); + break; + case "XX": + tileSet = caches?.XX?.tileSet?.find(i => i.style === tileSet.style); + break; + }; + break; + case 7: // RASTER_SATELLITE 卫星地图(2D) + switch (settings.TileSet.Satellite) { + case "AUTO": + break; + case "HYBRID": + tileSet = caches?.CN?.tileSet?.find(i => (i.style === tileSet.style && i.scale === tileSet.scale && i.size === tileSet.size)); + tileSet.validVersion[0].availableTiles = [{ "minX": 0, "minY": 0, "maxX": 1, "maxY": 1, "minZ": 1, "maxZ": 22 }]; + break; + case "CN": + tileSet = caches?.CN?.tileSet?.find(i => (i.style === tileSet.style && i.scale === tileSet.scale && i.size === tileSet.size)); + break; + case "XX": + default: + tileSet = caches?.XX?.tileSet?.find(i => (i.style === tileSet.style && i.scale === tileSet.scale && i.size === tileSet.size)); + break; + }; + break; + case 14: // SPUTNIK_METADATA 卫星地图(3D/俯瞰)元数据 + case 15: // SPUTNIK_C3M 卫星地图(3D/俯瞰)C3模型 + case 16: // SPUTNIK_DSM 卫星地图(3D/俯瞰)数字表面模型 + case 17: // SPUTNIK_DSM_GLOBAL 卫星地图(3D/俯瞰)全球数字表面模型 + case 33: // RASTER_SATELLITE_NIGHT 卫星地图(2D/夜间) + case 34: // SPUTNIK_VECTOR_BORDER 卫星地图(3D/俯瞰)边界 + case 35: // RASTER_SATELLITE_DIGITIZE 卫星地图(2D/数字化) + case 45: // RASTER_SATELLITE_ASTC 卫星地图(2D/ASTC) + switch (settings.TileSet.Satellite) { + case "AUTO": + break; + case "HYBRID": + tileSet = caches?.XX?.tileSet?.find(i => (i.style === tileSet.style && i.scale === tileSet.scale && i.size === tileSet.size)); + break; + case "CN": + tileSet = caches?.CN?.tileSet?.find(i => (i.style === tileSet.style && i.scale === tileSet.scale && i.size === tileSet.size)); + break; + case "XX": + default: + tileSet = caches?.XX?.tileSet?.find(i => (i.style === tileSet.style && i.scale === tileSet.scale && i.size === tileSet.size)); + break; + }; + break; + case 12: // VECTOR_TRAFFIC 交通状况 + case 22: // VECTOR_TRAFFIC_SKELETON 交通状况骨架(卫星地图:显示交通状况) + case 25: // VECTOR_TRAFFIC_WITH_GREEN + case 26: // VECTOR_TRAFFIC_STATIC + case 28: // VECTOR_TRAFFIC_SKELETON_WITH_HISTORICAL + case 86: // VECTOR_TRAFFIC_V2 交通状况V2 + switch (settings.TileSet.Traffic) { + case "AUTO": + default: + break; + case "CN": + tileSet = caches?.CN?.tileSet?.find(i => i.style === tileSet.style); + break; + case "XX": + tileSet = caches?.XX?.tileSet?.find(i => i.style === tileSet.style); + break; + }; + break; + case 13: // VECTOR_POI 兴趣点 + case 68: // VECTOR_POI_V2 兴趣点V2 + case 69: // VECTOR_POLYGON_SELECTION 多边形选区(兴趣点) + case 84: // VECTOR_POI_V2_UPDATE 兴趣点V2更新 + switch (settings.TileSet.POI) { + case "AUTO": + default: + break; + case "CN": + tileSet = caches?.CN?.tileSet?.find(i => i.style === tileSet.style); + break; + case "XX": + tileSet = caches?.XX?.tileSet?.find(i => i.style === tileSet.style); + break; + }; + break; + case 42: // FLYOVER_C3M_MESH + case 43: // FLYOVER_C3M_JPEG_TEXTURE + case 44: // FLYOVER_C3M_ASTC_TEXTURE + case 49: // FLYOVER_VISIBILITY + case 50: // FLYOVER_SKYBOX + case 51: // FLYOVER_NAVGRAPH + case 52: // FLYOVER_METADATA 俯瞰元数据 + switch (settings.TileSet.Flyover) { + case "AUTO": + default: + break; + case "CN": + tileSet = caches?.CN?.tileSet?.find(i => i.style === tileSet.style); + break; + case "XX": + tileSet = caches?.XX?.tileSet?.find(i => i.style === tileSet.style); + break; + }; + break; + case 53: // VECTOR_ROAD_NETWORK 道路网络(四处看看) + case 56: // VECTOR_STREET_POI 街道兴趣点(四处看看) + case 57: // MUNIN_METADATA 四处看看 元数据 + case 58: // VECTOR_SPR_MERCATOR + case 59: // VECTOR_SPR_MODELS + case 60: // VECTOR_SPR_MATERIALS + case 61: // VECTOR_SPR_METADATA + case 66: // VECTOR_SPR_ROADS + case 67: // VECTOR_SPR_STANDARD + switch (settings.TileSet.Munin) { + case "AUTO": + default: + break; + case "CN": + tileSet = caches?.CN?.tileSet?.find(i => i.style === tileSet.style); + break; + case "XX": + tileSet = caches?.XX?.tileSet?.find(i => i.style === tileSet.style); + break; + }; + break; + case 99: + /* + switch (settings.TileSet.Map) { + case "AUTO": + default: + break; + case "CN": + tileSet = caches?.CN?.tileSet?.find(i => i.style === tileSet.style); + break; + case "XX": + tileSet = caches?.XX?.tileSet?.find(i => i.style === tileSet.style); + break; + }; + break; + */ + }; + return tileSet; + }).flat(Infinity).filter(Boolean); + $.log(`✅ Set TileSets`, ""); + return tileSets; +}; + +function attributions(attributions = [], url = {}, caches = {}) { + $.log(`☑️ Set Attributions`, ""); + switch (url.query.country_code) { + case "CN": + caches?.XX?.attribution?.forEach(attribution => { + if (!attributions.some(i => i.name === attribution.name)) attributions.unshift(attribution); + }); + break; + case "KR": + caches?.KR?.attribution?.forEach(attribution => { + if (!attributions.some(i => i.name === attribution.name)) attributions.unshift(attribution); + }); + break; + default: + caches?.CN?.attribution?.forEach(attribution => { + if (!attributions.some(i => i.name === attribution.name)) attributions.push(attribution); + }); + break; + }; + attributions.sort((a, b)=>{ + switch (a.name) { + case "‎": + return -1; + case "AutoNavi": + return 0; + default: + return 1; + }; + }); + attributions = attributions.map((attribution, index) => { + switch (attribution.name) { + case "‎": + attribution.name = `${$.name}\n${new Date()}`; + delete attribution.plainTextURLSHA256Checksum; + break; + case "AutoNavi": + attribution.resource = attribution.resource.filter(i => i.resourceType !== 6); + attribution.region = [ + { "minX": 214, "minY": 82, "maxX": 216, "maxY": 82, "minZ": 8, "maxZ": 21 }, + { "minX": 213, "minY": 83, "maxX": 217, "maxY": 83, "minZ": 8, "maxZ": 21 }, + { "minX": 213, "minY": 84, "maxX": 218, "maxY": 84, "minZ": 8, "maxZ": 21 }, + { "minX": 213, "minY": 85, "maxX": 218, "maxY": 85, "minZ": 8, "maxZ": 21 }, + { "minX": 212, "minY": 86, "maxX": 218, "maxY": 86, "minZ": 8, "maxZ": 21 }, + { "minX": 189, "minY": 87, "maxX": 190, "maxY": 87, "minZ": 8, "maxZ": 21 }, + { "minX": 210, "minY": 87, "maxX": 220, "maxY": 87, "minZ": 8, "maxZ": 21 }, + { "minX": 188, "minY": 88, "maxX": 191, "maxY": 88, "minZ": 8, "maxZ": 21 }, + { "minX": 210, "minY": 88, "maxX": 223, "maxY": 88, "minZ": 8, "maxZ": 21 }, + { "minX": 188, "minY": 89, "maxX": 192, "maxY": 89, "minZ": 8, "maxZ": 21 }, + { "minX": 210, "minY": 89, "maxX": 223, "maxY": 89, "minZ": 8, "maxZ": 21 }, + { "minX": 186, "minY": 90, "maxX": 192, "maxY": 90, "minZ": 8, "maxZ": 21 }, + { "minX": 210, "minY": 90, "maxX": 223, "maxY": 90, "minZ": 8, "maxZ": 21 }, + { "minX": 209, "minY": 91, "maxX": 222, "maxY": 91, "minZ": 8, "maxZ": 21 }, + { "minX": 186, "minY": 91, "maxX": 192, "maxY": 91, "minZ": 8, "maxZ": 21 }, + { "minX": 184, "minY": 92, "maxX": 195, "maxY": 92, "minZ": 8, "maxZ": 21 }, + { "minX": 207, "minY": 92, "maxX": 221, "maxY": 92, "minZ": 8, "maxZ": 21 }, + { "minX": 185, "minY": 93, "maxX": 196, "maxY": 93, "minZ": 8, "maxZ": 21 }, + { "minX": 206, "minY": 93, "maxX": 221, "maxY": 93, "minZ": 8, "maxZ": 21 }, + { "minX": 185, "minY": 94, "maxX": 200, "maxY": 94, "minZ": 8, "maxZ": 21 }, + { "minX": 203, "minY": 94, "maxX": 221, "maxY": 94, "minZ": 8, "maxZ": 21 }, + { "minX": 182, "minY": 94, "maxX": 219, "maxY": 95, "minZ": 8, "maxZ": 21 }, + { "minX": 180, "minY": 96, "maxX": 217, "maxY": 96, "minZ": 8, "maxZ": 21 }, + { "minX": 180, "minY": 97, "maxX": 216, "maxY": 97, "minZ": 8, "maxZ": 21 }, + { "minX": 180, "minY": 98, "maxX": 214, "maxY": 98, "minZ": 8, "maxZ": 21 }, + { "minX": 180, "minY": 99, "maxX": 215, "maxY": 99, "minZ": 8, "maxZ": 21 }, + { "minX": 182, "minY": 100, "maxX": 214, "maxY": 100, "minZ": 8, "maxZ": 21 }, + { "minX": 183, "minY": 101, "maxX": 213, "maxY": 101, "minZ": 8, "maxZ": 21 }, + { "minX": 184, "minY": 102, "maxX": 214, "maxY": 102, "minZ": 8, "maxZ": 21 }, + { "minX": 183, "minY": 103, "maxX": 214, "maxY": 103, "minZ": 8, "maxZ": 21 }, + { "minX": 184, "minY": 104, "maxX": 215, "maxY": 104, "minZ": 8, "maxZ": 21 }, + { "minX": 185, "minY": 105, "maxX": 215, "maxY": 105, "minZ": 8, "maxZ": 21 }, + { "minX": 187, "minY": 106, "maxX": 215, "maxY": 106, "minZ": 8, "maxZ": 21 }, + { "minX": 189, "minY": 107, "maxX": 193, "maxY": 107, "minZ": 8, "maxZ": 21 }, + { "minX": 197, "minY": 107, "maxX": 214, "maxY": 107, "minZ": 8, "maxZ": 21 }, + { "minX": 198, "minY": 108, "maxX": 214, "maxY": 108, "minZ": 8, "maxZ": 21 }, + { "minX": 110, "minY": 109, "maxX": 214, "maxY": 109, "minZ": 8, "maxZ": 21 }, + { "minX": 197, "minY": 110, "maxX": 214, "maxY": 110, "minZ": 8, "maxZ": 21 }, + { "minX": 198, "minY": 111, "maxX": 214, "maxY": 111, "minZ": 8, "maxZ": 21 }, + { "minX": 204, "minY": 112, "maxX": 209, "maxY": 112, "minZ": 8, "maxZ": 21 }, + { "minX": 213, "minY": 112, "maxX": 214, "maxY": 112, "minZ": 8, "maxZ": 21 }, + { "minX": 205, "minY": 113, "maxX": 207, "maxY": 113, "minZ": 8, "maxZ": 21 }, + { "minX": 205, "minY": 114, "maxX": 206, "maxY": 114, "minZ": 8, "maxZ": 21 }, + { "minX": 204, "minY": 115, "maxX": 212, "maxY": 128, "minZ": 8, "maxZ": 21 }, + ]; + break; + }; + return attribution; + }).flat(Infinity).filter(Boolean); + $.log(`✅ Set Attributions`, ""); + return attributions; +}; + +function dataSets(dataSets = [], settings = {}, caches = {}) { + $.log(`☑️ Set DataSets`, ""); + dataSets = dataSets.map((dataSet, index) => { + switch (dataSet.identifier) { + case 0: + dataSet.dataSetDescription = "TomTom"; + break; + case 1: + dataSet.dataSetDescription = "KittyHawk"; + break; + case 2: + dataSet.dataSetDescription = "AutoNavi"; + break; + }; + return dataSet; + }); + $.log(`✅ Set DataSets`, ""); + return body; +}; + +function urlInfoSets(urlInfoSets = [], url = {}, settings = {}, caches = {}) { + $.log(`☑️ Set UrlInfoSets`, ""); + urlInfoSets = urlInfoSets.map((urlInfoSet, index) => { + switch (url.query?.country_code) { + case "CN": + urlInfoSet = { ...caches.XX.urlInfoSet[0], ...caches.CN.urlInfoSet[0] }; + break; + case "KR": + urlInfoSet = { ...caches.KR.urlInfoSet[0], ...caches.CN.urlInfoSet[0] }; + break; + default: + urlInfoSet = { ...caches.CN.urlInfoSet[0], ...caches.XX.urlInfoSet[0] }; + urlInfoSet.alternateResourcesURL = caches.CN.urlInfoSet[0].alternateResourcesURL; + delete urlInfoSet.polyLocationShiftURL; + break; + }; + switch (settings.Config?.Announcements?.Environment?.default) { + case "AUTO": + default: + break; + case "CN": + // Announcements + urlInfoSet.announcementsURL = caches.CN.urlInfoSet[0].announcementsURL; + break; + case "XX": + // Announcements + urlInfoSet.announcementsURL = caches.XX.urlInfoSet[0].announcementsURL; + break; + }; + switch (settings.UrlInfoSet.Dispatcher) { + case "AUTO": + default: + break; + case "AutoNavi": + // PlaceData Dispatcher + urlInfoSet.directionsURL = caches.CN.urlInfoSet[0].dispatcherURL; + // Background Dispatcher + urlInfoSet.backgroundDispatcherURL = caches.CN.urlInfoSet[0].backgroundDispatcherURL; + // Background Reverse Geocoder + urlInfoSet.backgroundRevGeoURL = caches.CN.urlInfoSet[0].backgroundRevGeoURL; + // Batch Reverse Geocoder + urlInfoSet.batchReverseGeocoderPlaceRequestURL = caches.CN.urlInfoSet[0].batchReverseGeocoderPlaceRequestURL; + break; + case "Apple": + // PlaceData Dispatcher + urlInfoSet.dispatcherURL = caches.XX.urlInfoSet[0].dispatcherURL; + // Background Dispatcher + urlInfoSet.backgroundDispatcherURL = caches.XX.urlInfoSet[0].backgroundDispatcherURL; + // Background Reverse Geocoder + urlInfoSet.backgroundRevGeoURL = caches.XX.urlInfoSet[0].backgroundRevGeoURL; + // Batch Reverse Geocoder + urlInfoSet.batchReverseGeocoderPlaceRequestURL = caches.XX.urlInfoSet[0].batchReverseGeocoderPlaceRequestURL; + break; + }; + switch (settings.UrlInfoSet.Directions) { + case "AUTO": + default: + break; + case "AutoNavi": + // Directions + urlInfoSet.directionsURL = caches.CN.urlInfoSet[0].directionsURL; + // ETA + urlInfoSet.etaURL = caches.CN.urlInfoSet[0].etaURL; + // Simple ETA + urlInfoSet.simpleETAURL = caches.CN.urlInfoSet[0].simpleETAURL; + break; + case "Apple": + // Directions + urlInfoSet.directionsURL = caches.XX.urlInfoSet[0].directionsURL; + // ETA + urlInfoSet.etaURL = caches.XX.urlInfoSet[0].etaURL; + // Simple ETA + urlInfoSet.simpleETAURL = caches.XX.urlInfoSet[0].simpleETAURL; + break; + }; + switch (settings.UrlInfoSet.RAP) { + case "AUTO": + default: + // RAP Submission + urlInfoSet.problemSubmissionURL = caches.XX.urlInfoSet[0].problemSubmissionURL; + // RAP Status + urlInfoSet.problemStatusURL = caches.XX.urlInfoSet[0].problemStatusURL; + // RAP Opt-Ins + urlInfoSet.problemOptInURL = caches.XX.urlInfoSet[0].problemOptInURL; + // RAP V4 Submission + urlInfoSet.feedbackSubmissionURL = caches.XX.urlInfoSet[0].feedbackSubmissionURL; + // RAP V4 Lookup + urlInfoSet.feedbackLookupURL = caches.XX.urlInfoSet[0].feedbackLookupURL; + break; + case "AutoNavi": + // RAP Submission + urlInfoSet.problemSubmissionURL = caches.CN.urlInfoSet[0].problemSubmissionURL; + // RAP Status + urlInfoSet.problemStatusURL = caches.CN.urlInfoSet[0].problemStatusURL; + // RAP V4 Submission + urlInfoSet.feedbackSubmissionURL = caches.CN.urlInfoSet[0].feedbackSubmissionURL; + // RAP V4 Lookup + urlInfoSet.feedbackLookupURL = caches.CN.urlInfoSet[0].feedbackLookupURL; + break; + case "Apple": + // RAP Submission + urlInfoSet.problemSubmissionURL = caches.XX.urlInfoSet[0].problemSubmissionURL; + // RAP Status + urlInfoSet.problemStatusURL = caches.XX.urlInfoSet[0].problemStatusURL; + // RAP Opt-Ins + urlInfoSet.problemOptInURL = caches.XX.urlInfoSet[0].problemOptInURL; + // RAP V4 Submission + urlInfoSet.feedbackSubmissionURL = caches.XX.urlInfoSet[0].feedbackSubmissionURL; + // RAP V4 Lookup + urlInfoSet.feedbackLookupURL = caches.XX.urlInfoSet[0].feedbackLookupURL; + break; + }; + switch (settings.UrlInfoSet.LocationShift) { + case "AUTO": + default: + break; + case "AutoNavi": + // Location Shift (polynomial) + urlInfoSet.polyLocationShiftURL = caches.CN.urlInfoSet[0].polyLocationShiftURL; + break; + case "Apple": + // Location Shift (polynomial) + urlInfoSet.polyLocationShiftURL = caches.XX.urlInfoSet[0].polyLocationShiftURL; + break; + }; + return urlInfoSet; + }); + $.log(`✅ Set UrlInfoSets`, ""); + return urlInfoSets; +}; + +function muninBuckets(muninBuckets = [], settings = {}, caches = {}) { + $.log(`☑️ Set MuninBuckets`, ""); + switch (settings.TileSet.Munin) { + case "AUTO": + default: + break; + case "CN": + muninBuckets = caches.CN.muninBucket; + break; + case "XX": + muninBuckets = caches.XX.muninBucket; + break; + }; + $.log(`✅ Set MuninBuckets`, ""); + return muninBuckets; +}; diff --git a/src/archive/Location.request.beta.js b/src/archive/Location.request.beta.js new file mode 100644 index 0000000..07b4e8a --- /dev/null +++ b/src/archive/Location.request.beta.js @@ -0,0 +1,390 @@ +import _ from '../ENV/Lodash.mjs' +import $Storage from '../ENV/$Storage.mjs' +import ENV from "../ENV/ENV.mjs"; +import URI from "../URI/URI.mjs"; +import XML from "../XML/XML.mjs"; + +import Database from "../database/index.mjs"; +import setENV from "../function/setENV.mjs"; + +const $ = new ENV(" iRingo: 📍 Location v3.0.6(2) request.beta"); + +// 构造回复数据 +let $response = undefined; + +/***************** Processing *****************/ +// 解构URL +const URL = URI.parse($request.url); +$.log(`⚠ URL: ${JSON.stringify(URL)}`, ""); +// 获取连接参数 +const METHOD = $request.method, HOST = URL.host, PATH = URL.path, PATHs = URL.paths; +$.log(`⚠ METHOD: ${METHOD}`, ""); +// 解析格式 +const FORMAT = ($request.headers?.["Content-Type"] ?? $request.headers?.["content-type"])?.split(";")?.[0]; +$.log(`⚠ FORMAT: ${FORMAT}`, ""); +(async () => { + const { Settings, Caches, Configs } = setENV("iRingo", "Location", Database); + $.log(`⚠ Settings.Switch: ${Settings?.Switch}`, ""); + switch (Settings.Switch) { + case true: + default: + // 创建空数据 + let body = {}; + // 方法判断 + switch (METHOD) { + case "POST": + case "PUT": + case "PATCH": + case "DELETE": + // 格式判断 + switch (FORMAT) { + case undefined: // 视为无body + break; + case "application/x-www-form-urlencoded": + case "text/plain": + default: + break; + case "application/x-mpegURL": + case "application/x-mpegurl": + case "application/vnd.apple.mpegurl": + case "audio/mpegurl": + //body = M3U8.parse($request.body); + //$.log(`🚧 body: ${JSON.stringify(body)}`, ""); + //$request.body = M3U8.stringify(body); + break; + case "text/xml": + case "text/html": + case "text/plist": + case "application/xml": + case "application/plist": + case "application/x-plist": + body = XML.parse($request.body); + $.log(`🚧 body: ${JSON.stringify(body)}`, ""); + $request.body = XML.stringify(body); + break; + case "text/vtt": + case "application/vtt": + //body = VTT.parse($request.body); + //$.log(`🚧 body: ${JSON.stringify(body)}`, ""); + //$request.body = VTT.stringify(body); + break; + case "text/json": + case "application/json": + body = JSON.parse($request.body ?? "{}"); + $.log(`🚧 body: ${JSON.stringify(body)}`, ""); + $request.body = JSON.stringify(body); + break; + case "application/protobuf": + case "application/x-protobuf": + case "application/vnd.google.protobuf": + case "application/grpc": + case "application/grpc+proto": + case "applecation/octet-stream": + break; + }; + //break; // 不中断,继续处理URL + case "GET": + case "HEAD": + case "OPTIONS": + case undefined: // QX牛逼,script-echo-response不返回method + default: + // 主机判断 + switch (HOST) { + case "configuration.ls.apple.com": + // 路径判断 + switch (PATH) { + case "config/defaults": + _.set(Caches, "Defaults.ETag", setETag($request.headers?.["If-None-Match"] ?? $request?.headers?.["if-none-match"], Caches?.Defaults?.ETag)); + $Storage.setItem("@iRingo.Location.Caches", Caches); + break; + }; + break; + case "gspe1-ssl.ls.apple.com": + switch (PATH) { + case "pep/gcc": + /* // 不使用 echo response + $response = { + status: 200, + headers: { + "Content-Type": "text/html", + Date: new Date().toUTCString(), + Connection: "keep-alive", + "Content-Encoding": "identity", + }, + body: Settings.PEP.GCC, + }; + $.log(JSON.stringify($response)); + */ + break; + }; + break; + case "gsp-ssl.ls.apple.com": + case "dispatcher.is.autonavi.com": + case "direction2.is.autonavi.com": + switch (PATH) { + case "dispatcher.arpc": + case "dispatcher": + switch (Settings?.Services?.PlaceData) { + case "AUTO": + default: + break; + case "CN": + URL.host = "dispatcher.is.autonavi.com"; + URL.path = "dispatcher"; + break; + case "XX": + URL.host = "gsp-ssl.ls.apple.com"; + URL.path = "dispatcher.arpc"; + break; + }; + break; + case "directions.arpc": + case "direction": + switch (Settings?.Services?.Directions) { + case "AUTO": + default: + break; + case "CN": + URL.host = "direction2.is.autonavi.com"; + URL.path = "direction"; + break; + case "XX": + URL.host = "gsp-ssl.ls.apple.com"; + URL.path = "directions.arpc"; + break; + }; + break; + }; + break; + case "sundew.ls.apple.com": + case "rap.is.autonavi.com": + switch (PATH) { + case "v1/feedback/submission.arpc": + case "rap": + switch (Settings?.Services?.RAP) { + case "AUTO": + default: + break; + case "CN": + URL.host = "rap.is.autonavi.com"; + URL.path = "rap"; + break; + case "XX": + URL.host = "sundew.ls.apple.com"; + URL.path = "v1/feedback/submission.arpc"; + break; + }; + break; + case "grp/st": + case "rapstatus": + switch (Settings?.Services?.RAP) { + case "AUTO": + default: + break; + case "CN": + URL.host = "rap.is.autonavi.com"; + URL.path = "rapstatus"; + break; + case "XX": + URL.host = "sundew.ls.apple.com"; + URL.path = "grp/st"; + break; + }; + break; + }; + break; + case "gspe12-ssl.ls.apple.com": + case "gspe12-cn-ssl.ls.apple.com": + switch (PATH) { + case "traffic": + switch (Settings?.Services?.Traffic) { + case "AUTO": + default: + break; + case "CN": + URL.host = "gspe12-cn-ssl.ls.apple.com"; + break; + case "XX": + URL.host = "gspe12-ssl.ls.apple.com"; + break; + }; + break; + }; + break; + case "gspe19-ssl.ls.apple.com": + case "gspe19-cn-ssl.ls.apple.com": + switch (PATH) { + case "tile.vf": + case "tiles": + switch (Settings?.Services?.Tiles) { + case "AUTO": + default: + break; + case "CN": + URL.host = "gspe19-cn-ssl.ls.apple.com"; + URL.path = "tiles"; + break; + case "XX": + URL.host = "gspe19-ssl.ls.apple.com"; + URL.path = "tile.vf"; + break; + }; + break; + }; + break; + case "gspe35-ssl.ls.apple.com": + case "gspe35-ssl.ls.apple.cn": + switch (PATH) { + case "config/announcements": + switch (URL.query?.os) { + case "ios": + case "ipados": + case "macos": + default: + switch (Settings?.Config?.Announcements?.Environment?.default) { + case "AUTO": + switch (Caches?.pep?.gcc) { + default: + URL.query.environment = "prod"; + break; + case "CN": + case undefined: + URL.query.environment = "prod-cn"; + break; + }; + break; + case "CN": + default: + URL.query.environment = "prod-cn"; + break; + case "XX": + URL.query.environment = "prod"; + break; + }; + break; + case "watchos": + switch (Settings?.Config?.Announcements?.Environment?.watchOS) { + case "AUTO": + switch (Caches?.pep?.gcc) { + default: + URL.query.environment = "prod"; + break; + case "CN": + case undefined: + URL.query.environment = "prod-cn"; + break; + }; + break; + case "XX": + default: + URL.query.environment = "prod"; + break; + case "CN": + URL.query.environment = "prod-cn"; + break; + }; + break; + }; + _.set(Caches, "Announcements.ETag", setETag($request.headers?.["If-None-Match"] ?? $request.headers?.["if-none-match"], Caches?.Announcements?.ETag)); + $Storage.setItem("@iRingo.Location.Caches", Caches); + break; + case "geo_manifest/dynamic/config": + switch (URL.query?.os) { + case "ios": + case "ipados": + case "macos": + default: + switch (Settings?.Geo_manifest?.Dynamic?.Config?.Country_code?.default) { + case "AUTO": + switch (Caches?.pep?.gcc) { + default: + URL.query.country_code = Caches?.pep?.gcc ?? "US"; + break; + case "CN": + case undefined: + URL.query.country_code = "CN"; + break; + }; + break; + default: + URL.query.country_code = Settings?.Geo_manifest?.Dynamic?.Config?.Country_code?.default ?? "CN"; + break; + }; + break; + case "watchos": + switch (Settings?.Geo_manifest?.Dynamic?.Config?.Country_code?.watchOS) { + case "AUTO": + switch (Caches?.pep?.gcc) { + default: + URL.query.country_code = Caches?.pep?.gcc ?? "US"; + break; + case "CN": + case undefined: + URL.query.country_code = "CN"; + break; + }; + break; + default: + URL.query.country_code = Settings?.Geo_manifest?.Dynamic?.Config?.Country_code?.watchOS ?? "US"; + break; + }; + break; + }; + _.set(Caches, "Dynamic.ETag", setETag($request.headers?.["If-None-Match"] ?? $request?.headers?.["if-none-match"], Caches?.Dynamic?.ETag)); + $Storage.setItem("@iRingo.Location.Caches", Caches); + break; + }; + break; + }; + break; + case "CONNECT": + case "TRACE": + break; + }; + if ($request.headers?.Host) $request.headers.Host = URL.host; + $request.url = URI.stringify(URL); + $.log(`🚧 调试信息`, `$request.url: ${$request.url}`, ""); + break; + case false: + break; + }; +})() + .catch((e) => $.logErr(e)) + .finally(() => { + switch ($response) { + default: // 有构造回复数据,返回构造的回复数据 + //$.log(`🚧 finally`, `echo $response: ${JSON.stringify($response, null, 2)}`, ""); + if ($response.headers?.["Content-Encoding"]) $response.headers["Content-Encoding"] = "identity"; + if ($response.headers?.["content-encoding"]) $response.headers["content-encoding"] = "identity"; + if ($.isQuanX()) { + if (!$response.status) $response.status = "HTTP/1.1 200 OK"; + delete $response.headers?.["Content-Length"]; + delete $response.headers?.["content-length"]; + delete $response.headers?.["Transfer-Encoding"]; + $.done($response); + } else $.done({ response: $response }); + break; + case undefined: // 无构造回复数据,发送修改的请求数据 + //$.log(`🚧 finally`, `$request: ${JSON.stringify($request, null, 2)}`, ""); + $.done($request); + break; + }; + }) + +/***************** Function *****************/ +/** + * Set ETag + * @author VirgilClyne + * @param {String} IfNoneMatch - If-None-Match + * @return {String} ETag - ETag + */ +function setETag(IfNoneMatch, ETag) { + $.log(`☑️ Set ETag`, `If-None-Match: ${IfNoneMatch}`, `ETag: ${ETag}`, ""); + if (IfNoneMatch !== ETag) { + ETag = IfNoneMatch; + delete $request?.headers?.["If-None-Match"]; + delete $request?.headers?.["if-none-match"]; + } + $.log(`✅ Set ETag`, ""); + return ETag; +}; diff --git a/src/archive/Location.request.js b/src/archive/Location.request.js new file mode 100644 index 0000000..cc924fd --- /dev/null +++ b/src/archive/Location.request.js @@ -0,0 +1,375 @@ +import _ from '../ENV/Lodash.mjs' +import $Storage from '../ENV/$Storage.mjs' +import ENV from "../ENV/ENV.mjs"; +import URI from "../URI/URI.mjs"; +import XML from "../XML/XML.mjs"; + +import Database from "../database/index.mjs"; +import setENV from "../function/setENV.mjs"; + +const $ = new ENV(" iRingo: 📍 Location v3.0.6(2) request"); + +// 构造回复数据 +let $response = undefined; + +/***************** Processing *****************/ +// 解构URL +const URL = URI.parse($request.url); +$.log(`⚠ URL: ${JSON.stringify(URL)}`, ""); +// 获取连接参数 +const METHOD = $request.method, HOST = URL.host, PATH = URL.path, PATHs = URL.paths; +$.log(`⚠ METHOD: ${METHOD}`, ""); +// 解析格式 +const FORMAT = ($request.headers?.["Content-Type"] ?? $request.headers?.["content-type"])?.split(";")?.[0]; +$.log(`⚠ FORMAT: ${FORMAT}`, ""); +(async () => { + const { Settings, Caches, Configs } = setENV("iRingo", "Location", Database); + $.log(`⚠ Settings.Switch: ${Settings?.Switch}`, ""); + switch (Settings.Switch) { + case true: + default: + // 创建空数据 + let body = {}; + // 方法判断 + switch (METHOD) { + case "POST": + case "PUT": + case "PATCH": + case "DELETE": + // 格式判断 + switch (FORMAT) { + case undefined: // 视为无body + break; + case "application/x-www-form-urlencoded": + case "text/plain": + default: + break; + case "application/x-mpegURL": + case "application/x-mpegurl": + case "application/vnd.apple.mpegurl": + case "audio/mpegurl": + break; + case "text/xml": + case "text/html": + case "text/plist": + case "application/xml": + case "application/plist": + case "application/x-plist": + break; + case "text/vtt": + case "application/vtt": + break; + case "text/json": + case "application/json": + break; + case "application/protobuf": + case "application/x-protobuf": + case "application/vnd.google.protobuf": + case "application/grpc": + case "application/grpc+proto": + case "applecation/octet-stream": + break; + }; + //break; // 不中断,继续处理URL + case "GET": + case "HEAD": + case "OPTIONS": + case undefined: // QX牛逼,script-echo-response不返回method + default: + // 主机判断 + switch (HOST) { + case "configuration.ls.apple.com": + // 路径判断 + switch (PATH) { + case "config/defaults": + _.set(Caches, "Defaults.ETag", setETag($request.headers?.["If-None-Match"] ?? $request?.headers?.["if-none-match"], Caches?.Defaults?.ETag)); + $Storage.setItem("@iRingo.Location.Caches", Caches); + break; + }; + break; + case "gspe1-ssl.ls.apple.com": + switch (PATH) { + case "pep/gcc": + /* // 不使用 echo response + $response = { + status: 200, + headers: { + "Content-Type": "text/html", + Date: new Date().toUTCString(), + Connection: "keep-alive", + "Content-Encoding": "identity", + }, + body: Settings.PEP.GCC, + }; + $.log(JSON.stringify($response)); + */ + break; + }; + break; + case "gsp-ssl.ls.apple.com": + case "dispatcher.is.autonavi.com": + case "direction2.is.autonavi.com": + switch (PATH) { + case "dispatcher.arpc": + case "dispatcher": + switch (Settings?.Services?.PlaceData) { + case "AUTO": + default: + break; + case "CN": + URL.host = "dispatcher.is.autonavi.com"; + URL.path = "dispatcher"; + break; + case "XX": + URL.host = "gsp-ssl.ls.apple.com"; + URL.path = "dispatcher.arpc"; + break; + }; + break; + case "directions.arpc": + case "direction": + switch (Settings?.Services?.Directions) { + case "AUTO": + default: + break; + case "CN": + URL.host = "direction2.is.autonavi.com"; + URL.path = "direction"; + break; + case "XX": + URL.host = "gsp-ssl.ls.apple.com"; + URL.path = "directions.arpc"; + break; + }; + break; + }; + break; + case "sundew.ls.apple.com": + case "rap.is.autonavi.com": + switch (PATH) { + case "v1/feedback/submission.arpc": + case "rap": + switch (Settings?.Services?.RAP) { + case "AUTO": + default: + break; + case "CN": + URL.host = "rap.is.autonavi.com"; + URL.path = "rap"; + break; + case "XX": + URL.host = "sundew.ls.apple.com"; + URL.path = "v1/feedback/submission.arpc"; + break; + }; + break; + case "grp/st": + case "rapstatus": + switch (Settings?.Services?.RAP) { + case "AUTO": + default: + break; + case "CN": + URL.host = "rap.is.autonavi.com"; + URL.path = "rapstatus"; + break; + case "XX": + URL.host = "sundew.ls.apple.com"; + URL.path = "grp/st"; + break; + }; + break; + }; + break; + case "gspe12-ssl.ls.apple.com": + case "gspe12-cn-ssl.ls.apple.com": + switch (PATH) { + case "traffic": + switch (Settings?.Services?.Traffic) { + case "AUTO": + default: + break; + case "CN": + URL.host = "gspe12-cn-ssl.ls.apple.com"; + break; + case "XX": + URL.host = "gspe12-ssl.ls.apple.com"; + break; + }; + break; + }; + break; + case "gspe19-ssl.ls.apple.com": + case "gspe19-cn-ssl.ls.apple.com": + switch (PATH) { + case "tile.vf": + case "tiles": + switch (Settings?.Services?.Tiles) { + case "AUTO": + default: + break; + case "CN": + URL.host = "gspe19-cn-ssl.ls.apple.com"; + URL.path = "tiles"; + break; + case "XX": + URL.host = "gspe19-ssl.ls.apple.com"; + URL.path = "tile.vf"; + break; + }; + break; + }; + break; + case "gspe35-ssl.ls.apple.com": + case "gspe35-ssl.ls.apple.cn": + switch (PATH) { + case "config/announcements": + switch (URL.query?.os) { + case "ios": + case "ipados": + case "macos": + default: + switch (Settings?.Config?.Announcements?.Environment?.default) { + case "AUTO": + switch (Caches?.pep?.gcc) { + default: + URL.query.environment = "prod"; + break; + case "CN": + case undefined: + URL.query.environment = "prod-cn"; + break; + }; + break; + case "CN": + default: + URL.query.environment = "prod-cn"; + break; + case "XX": + URL.query.environment = "prod"; + break; + }; + break; + case "watchos": + switch (Settings?.Config?.Announcements?.Environment?.watchOS) { + case "AUTO": + switch (Caches?.pep?.gcc) { + default: + URL.query.environment = "prod"; + break; + case "CN": + case undefined: + URL.query.environment = "prod-cn"; + break; + }; + break; + case "XX": + default: + URL.query.environment = "prod"; + break; + case "CN": + URL.query.environment = "prod-cn"; + break; + }; + break; + }; + _.set(Caches, "Announcements.ETag", setETag($request.headers?.["If-None-Match"] ?? $request.headers?.["if-none-match"], Caches?.Announcements?.ETag)); + $Storage.setItem("@iRingo.Location.Caches", Caches); + break; + case "geo_manifest/dynamic/config": + switch (URL.query?.os) { + case "ios": + case "ipados": + case "macos": + default: + switch (Settings?.Geo_manifest?.Dynamic?.Config?.Country_code?.default) { + case "AUTO": + switch (Caches?.pep?.gcc) { + default: + URL.query.country_code = Caches?.pep?.gcc ?? "US"; + break; + case "CN": + case undefined: + URL.query.country_code = "CN"; + break; + }; + break; + default: + URL.query.country_code = Settings?.Geo_manifest?.Dynamic?.Config?.Country_code?.default ?? "CN"; + break; + }; + break; + case "watchos": + switch (Settings?.Geo_manifest?.Dynamic?.Config?.Country_code?.watchOS) { + case "AUTO": + switch (Caches?.pep?.gcc) { + default: + URL.query.country_code = Caches?.pep?.gcc ?? "US"; + break; + case "CN": + case undefined: + URL.query.country_code = "CN"; + break; + }; + break; + default: + URL.query.country_code = Settings?.Geo_manifest?.Dynamic?.Config?.Country_code?.watchOS ?? "US"; + break; + }; + break; + }; + _.set(Caches, "Dynamic.ETag", setETag($request.headers?.["If-None-Match"] ?? $request?.headers?.["if-none-match"], Caches?.Dynamic?.ETag)); + $Storage.setItem("@iRingo.Location.Caches", Caches); + break; + }; + break; + }; + break; + case "CONNECT": + case "TRACE": + break; + }; + if ($request.headers?.Host) $request.headers.Host = URL.host; + $request.url = URI.stringify(URL); + break; + case false: + break; + }; +})() + .catch((e) => $.logErr(e)) + .finally(() => { + switch ($response) { + default: // 有构造回复数据,返回构造的回复数据 + if ($response.headers?.["Content-Encoding"]) $response.headers["Content-Encoding"] = "identity"; + if ($response.headers?.["content-encoding"]) $response.headers["content-encoding"] = "identity"; + if ($.isQuanX()) { + if (!$response.status) $response.status = "HTTP/1.1 200 OK"; + delete $response.headers?.["Content-Length"]; + delete $response.headers?.["content-length"]; + delete $response.headers?.["Transfer-Encoding"]; + $.done($response); + } else $.done({ response: $response }); + break; + case undefined: // 无构造回复数据,发送修改的请求数据 + $.done($request); + break; + }; + }) + +/***************** Function *****************/ +/** + * Set ETag + * @author VirgilClyne + * @param {String} IfNoneMatch - If-None-Match + * @return {String} ETag - ETag + */ +function setETag(IfNoneMatch, ETag) { + $.log(`☑️ Set ETag`, `If-None-Match: ${IfNoneMatch}`, `ETag: ${ETag}`, ""); + if (IfNoneMatch !== ETag) { + ETag = IfNoneMatch; + delete $request?.headers?.["If-None-Match"]; + delete $request?.headers?.["if-none-match"]; + } + $.log(`✅ Set ETag`, ""); + return ETag; +}; diff --git a/src/archive/Location.response.beta.js b/src/archive/Location.response.beta.js new file mode 100644 index 0000000..114d87b --- /dev/null +++ b/src/archive/Location.response.beta.js @@ -0,0 +1,145 @@ +import _ from '../ENV/Lodash.mjs' +import $Storage from '../ENV/$Storage.mjs' +import ENV from "../ENV/ENV.mjs"; +import URI from "../URI/URI.mjs"; +import XML from "../XML/XML.mjs"; + +import Database from "../database/index.mjs"; +import setENV from "../function/setENV.mjs"; + +const $ = new ENV(" iRingo: 📍 Location v3.1.6(4) response.beta"); + +/***************** Processing *****************/ +// 解构URL +const URL = URI.parse($request.url); +$.log(`⚠ URL: ${JSON.stringify(URL)}`, ""); +// 获取连接参数 +const METHOD = $request.method, HOST = URL.host, PATH = URL.path, PATHs = URL.paths; +$.log(`⚠ METHOD: ${METHOD}`, ""); +// 解析格式 +const FORMAT = ($response.headers?.["Content-Type"] ?? $response.headers?.["content-type"])?.split(";")?.[0]; +$.log(`⚠ FORMAT: ${FORMAT}`, ""); +(async () => { + const { Settings, Caches, Configs } = setENV("iRingo", "Location", Database); + $.log(`⚠ Settings.Switch: ${Settings?.Switch}`, ""); + switch (Settings.Switch) { + case true: + default: + // 创建空数据 + let body = {}; + // 格式判断 + switch (FORMAT) { + case undefined: // 视为无body + break; + case "application/x-www-form-urlencoded": + case "text/plain": + default: + break; + case "application/x-mpegURL": + case "application/x-mpegurl": + case "application/vnd.apple.mpegurl": + case "audio/mpegurl": + //body = M3U8.parse($response.body); + //$.log(`🚧 body: ${JSON.stringify(body)}`, ""); + //$response.body = M3U8.stringify(body); + break; + case "text/xml": + case "text/html": + case "text/plist": + case "application/xml": + case "application/plist": + case "application/x-plist": + $.log(`🚧 body: ${body}`, ""); + // 主机判断 + switch (HOST) { + case "gspe1-ssl.ls.apple.com": + //body = new DOMParser().parseFromString($response.body, FORMAT); + // 路径判断 + switch (PATH) { + case "pep/gcc": + _.set(Caches, "pep.gcc", $response.body); + $Storage.setItem("@iRingo.Location.Caches", Caches); + switch (Settings.PEP.GCC) { + case "AUTO": + break; + default: + $response.body = Settings.PEP.GCC; + break; + }; + break; + }; + //$repsonse.body = new XMLSerializer().serializeToString(body); + break; + case "configuration.ls.apple.com": + //body = await PLISTs("plist2json", $response.body); + body = XML.parse($response.body); + $.log(`🚧 body: ${JSON.stringify(body)}`, ""); + // 路径判断 + switch (PATH) { + case "config/defaults": + const PLIST = body.plist; + if (PLIST) { + // set settings + // CN + PLIST["com.apple.GEO"].CountryProviders.CN.ShouldEnableLagunaBeach = Settings?.Config?.Defaults?.LagunaBeach ?? true; // XX + PLIST["com.apple.GEO"].CountryProviders.CN.DrivingMultiWaypointRoutesEnabled = Settings?.Config?.Defaults?.DrivingMultiWaypointRoutesEnabled ?? true; // 驾驶导航途径点 + //PLIST["com.apple.GEO"].CountryProviders.CN.EnableAlberta = false; // CN + //PLIST["com.apple.GEO"].CountryProviders.CN.EnableClientDrapedVectorPolygons = false; // CN + PLIST["com.apple.GEO"].CountryProviders.CN.GEOAddressCorrectionEnabled = Settings?.Config?.Defaults?.GEOAddressCorrection ?? true; // CN + if (Settings?.Config?.Defaults?.LookupMaxParametersCount ?? true) { + delete PLIST["com.apple.GEO"].CountryProviders.CN.GEOBatchSpatialEventLookupMaxParametersCount // CN + delete PLIST["com.apple.GEO"].CountryProviders.CN.GEOBatchSpatialPlaceLookupMaxParametersCount // CN + } + PLIST["com.apple.GEO"].CountryProviders.CN.LocalitiesAndLandmarksSupported = Settings?.Config?.Defaults?.LocalitiesAndLandmarks ?? true; // CN + //PLIST["com.apple.GEO"].CountryProviders.CN.NavigationShowHeadingKey = true; + PLIST["com.apple.GEO"].CountryProviders.CN.POIBusynessDifferentialPrivacy = Settings?.Config?.Defaults?.POIBusyness ?? true; // CN + PLIST["com.apple.GEO"].CountryProviders.CN.POIBusynessRealTime = Settings?.Config?.Defaults?.POIBusyness ?? true; // CN + PLIST["com.apple.GEO"].CountryProviders.CN.TransitPayEnabled = Settings?.Config?.Defaults?.TransitPayEnabled ?? true; // CN + //PLIST["com.apple.GEO"].CountryProviders.CN.WiFiQualityNetworkDisabled = Settings?.Config?.Defaults?.WiFiQualityNetworkDisabled ?? true; // CN + //PLIST["com.apple.GEO"].CountryProviders.CN.WiFiQualityTileDisabled = Settings?.Config?.Defaults?.WiFiQualityTileDisabled ?? true; // CN + PLIST["com.apple.GEO"].CountryProviders.CN.SupportsOffline = Settings?.Config?.Defaults?.SupportsOffline ?? true; // CN + PLIST["com.apple.GEO"].CountryProviders.CN.SupportsCarIntegration = Settings?.Config?.Defaults?.SupportsCarIntegration ?? true; // CN + // TW + //PLIST["com.apple.GEO"].CountryProviders.CN.GEOShouldSpeakWrittenAddresses = true; // TW + //PLIST["com.apple.GEO"].CountryProviders.CN.GEOShouldSpeakWrittenPlaceNames = true; // TW + // US + PLIST["com.apple.GEO"].CountryProviders.CN["6694982d2b14e95815e44e970235e230"] = Settings?.Config?.Defaults?.["6694982d2b14e95815e44e970235e230"] ?? true; // US + PLIST["com.apple.GEO"].CountryProviders.CN.PedestrianAREnabled = Settings?.Config?.Defaults?.PedestrianAR ?? true; // 现实世界中的线路 + PLIST["com.apple.GEO"].CountryProviders.CN.OpticalHeadingEnabled = Settings?.Config?.Defaults?.OpticalHeading ?? true; // 举起以查看 + PLIST["com.apple.GEO"].CountryProviders.CN.UseCLPedestrianMapMatchedLocations = Settings?.Config?.Defaults?.UseCLPedestrianMapMatchedLocations ?? true; // 导航准确性-增强 + }; + break; + }; + $.log(`🚧 body: ${JSON.stringify(body)}`, ""); + //$response.body = await PLISTs("json2plist", body); // json2plist + $response.body = XML.stringify(body); + break; + }; + break; + case "text/vtt": + case "application/vtt": + //body = VTT.parse($response.body); + //$.log(`🚧 body: ${JSON.stringify(body)}`, ""); + //$response.body = VTT.stringify(body); + break; + case "text/json": + case "application/json": + body = JSON.parse($response.body ?? "{}"); + $.log(`🚧 body: ${JSON.stringify(body)}`, ""); + $response.body = JSON.stringify(body); + break; + case "application/protobuf": + case "application/x-protobuf": + case "application/vnd.google.protobuf": + case "application/grpc": + case "application/grpc+proto": + case "application/octet-stream": + break; + }; + break; + case false: + break; + }; +})() + .catch((e) => $.logErr(e)) + .finally(() => $.done($response)) diff --git a/src/archive/Location.response.js b/src/archive/Location.response.js new file mode 100644 index 0000000..c5b29c9 --- /dev/null +++ b/src/archive/Location.response.js @@ -0,0 +1,121 @@ +import _ from '../ENV/Lodash.mjs' +import $Storage from '../ENV/$Storage.mjs' +import ENV from "../ENV/ENV.mjs"; +import URI from "../URI/URI.mjs"; +import XML from "../XML/XML.mjs"; + +import Database from "../database/index.mjs"; +import setENV from "../function/setENV.mjs"; + +const $ = new ENV(" iRingo: 📍 Location v3.1.6(4) response"); + +/***************** Processing *****************/ +// 解构URL +const URL = URI.parse($request.url); +$.log(`⚠ URL: ${JSON.stringify(URL)}`, ""); +// 获取连接参数 +const METHOD = $request.method, HOST = URL.host, PATH = URL.path, PATHs = URL.paths; +$.log(`⚠ METHOD: ${METHOD}`, ""); +// 解析格式 +const FORMAT = ($response.headers?.["Content-Type"] ?? $response.headers?.["content-type"])?.split(";")?.[0]; +$.log(`⚠ FORMAT: ${FORMAT}`, ""); +(async () => { + const { Settings, Caches, Configs } = setENV("iRingo", "Location", Database); + $.log(`⚠ Settings.Switch: ${Settings?.Switch}`, ""); + switch (Settings.Switch) { + case true: + default: + // 创建空数据 + let body = {}; + // 格式判断 + switch (FORMAT) { + case undefined: // 视为无body + break; + case "application/x-www-form-urlencoded": + case "text/plain": + default: + break; + case "application/x-mpegURL": + case "application/x-mpegurl": + case "application/vnd.apple.mpegurl": + case "audio/mpegurl": + break; + case "text/xml": + case "text/html": + case "text/plist": + case "application/xml": + case "application/plist": + case "application/x-plist": + // 主机判断 + switch (HOST) { + case "gspe1-ssl.ls.apple.com": + // 路径判断 + switch (PATH) { + case "pep/gcc": + _.set(Caches, "pep.gcc", $response.body); + $Storage.setItem("@iRingo.Location.Caches", Caches); + switch (Settings.PEP.GCC) { + case "AUTO": + break; + default: + $response.body = Settings.PEP.GCC; + break; + }; + break; + }; + break; + case "configuration.ls.apple.com": + body = XML.parse($response.body); + // 路径判断 + switch (PATH) { + case "config/defaults": + const PLIST = body.plist; + if (PLIST) { + // set settings + // CN + PLIST["com.apple.GEO"].CountryProviders.CN.ShouldEnableLagunaBeach = Settings?.Config?.Defaults?.LagunaBeach ?? true; // XX + PLIST["com.apple.GEO"].CountryProviders.CN.DrivingMultiWaypointRoutesEnabled = Settings?.Config?.Defaults?.DrivingMultiWaypointRoutesEnabled ?? true; // 驾驶导航途径点 + PLIST["com.apple.GEO"].CountryProviders.CN.GEOAddressCorrectionEnabled = Settings?.Config?.Defaults?.GEOAddressCorrection ?? true; // CN + if (Settings?.Config?.Defaults?.LookupMaxParametersCount ?? true) { + delete PLIST["com.apple.GEO"].CountryProviders.CN.GEOBatchSpatialEventLookupMaxParametersCount // CN + delete PLIST["com.apple.GEO"].CountryProviders.CN.GEOBatchSpatialPlaceLookupMaxParametersCount // CN + } + PLIST["com.apple.GEO"].CountryProviders.CN.LocalitiesAndLandmarksSupported = Settings?.Config?.Defaults?.LocalitiesAndLandmarks ?? true; // CN + PLIST["com.apple.GEO"].CountryProviders.CN.POIBusynessDifferentialPrivacy = Settings?.Config?.Defaults?.POIBusyness ?? true; // CN + PLIST["com.apple.GEO"].CountryProviders.CN.POIBusynessRealTime = Settings?.Config?.Defaults?.POIBusyness ?? true; // CN + PLIST["com.apple.GEO"].CountryProviders.CN.TransitPayEnabled = Settings?.Config?.Defaults?.TransitPayEnabled ?? true; // CN + PLIST["com.apple.GEO"].CountryProviders.CN.SupportsOffline = Settings?.Config?.Defaults?.SupportsOffline ?? true; // CN + PLIST["com.apple.GEO"].CountryProviders.CN.SupportsCarIntegration = Settings?.Config?.Defaults?.SupportsCarIntegration ?? true; // CN + // US + PLIST["com.apple.GEO"].CountryProviders.CN["6694982d2b14e95815e44e970235e230"] = Settings?.Config?.Defaults?.["6694982d2b14e95815e44e970235e230"] ?? true; // US + PLIST["com.apple.GEO"].CountryProviders.CN.PedestrianAREnabled = Settings?.Config?.Defaults?.PedestrianAR ?? true; // 现实世界中的线路 + PLIST["com.apple.GEO"].CountryProviders.CN.OpticalHeadingEnabled = Settings?.Config?.Defaults?.OpticalHeading ?? true; // 举起以查看 + PLIST["com.apple.GEO"].CountryProviders.CN.UseCLPedestrianMapMatchedLocations = Settings?.Config?.Defaults?.UseCLPedestrianMapMatchedLocations ?? true; // 导航准确性-增强 + }; + break; + }; + $response.body = XML.stringify(body); + break; + }; + break; + case "text/vtt": + case "application/vtt": + break; + case "text/json": + case "application/json": + break; + case "application/protobuf": + case "application/x-protobuf": + case "application/vnd.google.protobuf": + case "application/grpc": + case "application/grpc+proto": + case "application/octet-stream": + break; + }; + break; + case false: + break; + }; +})() + .catch((e) => $.logErr(e)) + .finally(() => $.done($response)) diff --git a/src/class/GEOPDPlaceRequest.mjs b/src/class/GEOPDPlaceRequest.mjs new file mode 100644 index 0000000..5a671aa --- /dev/null +++ b/src/class/GEOPDPlaceRequest.mjs @@ -0,0 +1,41 @@ +import { log } from "../utils/utils.mjs"; +//import { MESSAGE_TYPE, reflectionMergePartial, BinaryReader, WireType, UnknownFieldHandler, isJsonObject, typeofJsonValue, jsonWriteOptions, MessageType } from "@protobuf-ts/runtime"; +import { PDPlaceRequest, RequestType } from "../proto/apple/geo/GEOPDPlaceRequest.js"; +//import { GeoServiceTag_ServiceType } from "../proto/apple/geo/GEOPDAnalyticMetadata.js"; +import { ComponentType } from "../proto/apple/geo/GEOPDComponentInfo.js"; +export default class GEOPDPlaceRequest { + static Name = "GEOPDPlaceRequest"; + static Version = "1.0.4"; + static Author = "VirgilClyne"; + static decode(rawBody = new Uint8Array([])) { + log("☑️ GEOPDPlaceRequest.decode", ""); + const body = PDPlaceRequest.fromBinary(rawBody); + if (typeof body?.analyticMetadata?.serviceTag !== "undefined") body.analyticMetadata.serviceTag.map(serviceTag => { + if (typeof serviceTag.serviceType !== "undefined") serviceTag.serviceType = GeoServiceTag_ServiceType[serviceTag.serviceType]; + return serviceTag; + }); + if (typeof body?.requestedComponents !== "undefined") body.requestedComponents.map(requestedComponent => { + if (typeof requestedComponent.type !== "undefined") requestedComponent.type = ComponentType[requestedComponent.type]; + return requestedComponent; + }); + if (typeof body.requestType !== "undefined") body.requestType = RequestType[body.requestType]; + log("✅ GEOPDPlaceRequest.decode", ""); + return body; + }; + + static encode(body = {}) { + log("☑️ GEOPDPlaceRequest.encode", ""); + if (typeof body?.analyticMetadata?.serviceTag !== "undefined") body.analyticMetadata.serviceTag.map(serviceTag => { + if (typeof serviceTag.serviceType !== "undefined") serviceTag.serviceType = GeoServiceTag_ServiceType[serviceTag.serviceType]; + return serviceTag; + }); + if (typeof body?.requestedComponents !== "undefined") body.requestedComponents.map(requestedComponent => { + if (typeof requestedComponent.type !== "undefined") requestedComponent.type = ComponentType[requestedComponent.type]; + return requestedComponent; + }); + if (typeof body.requestType !== "undefined") body.requestType = RequestType[body.requestType]; + const rawBody = PDPlaceRequest.toBinary(body); + log("✅ GEOPDPlaceRequest.encode", ""); + return rawBody; + }; +}; diff --git a/src/class/GEOResourceManifest.mjs b/src/class/GEOResourceManifest.mjs new file mode 100644 index 0000000..4fcd952 --- /dev/null +++ b/src/class/GEOResourceManifest.mjs @@ -0,0 +1,583 @@ +import { $platform, _, Storage, fetch, log, logError } from "../utils/utils.mjs"; +import GEOResourceManifestDownload from "./GEOResourceManifestDownload.mjs"; + +export default class GEOResourceManifest { + static Name = "GEOResourceManifest"; + static Version = "1.2.4"; + static Author = "Virgil Clyne"; + + static async downloadResourceManifest(request = $request, countryCode = "CN") { + log(`☑️ Download ResourceManifest`, ""); + const newRequest = { ...request }; + newRequest.url = new URL(newRequest.url); + newRequest.url.searchParams.set("country_code", countryCode); + newRequest.url = newRequest.url.toString(); + newRequest["binary-mode"] = true; + return fetch(newRequest).then(response => { + let rawBody = ($platform === "Quantumult X") ? new Uint8Array(response.bodyBytes ?? []) : response.body ?? new Uint8Array(); + log(`✅ Download ResourceManifest`, ""); + return { "ETag": response.headers?.["Etag"] ?? response.headers?.["etag"], "body": GEOResourceManifestDownload.decode(rawBody) }; + }); + }; + + static cacheResourceManifest(body = {}, cache = {}, countryCode = "CN", ETag = "") { + log(`☑️ Cache ResourceManifest`, ""); + switch (countryCode) { + case "CN": + if (ETag !== cache?.CN?.ETag) { + cache.CN = { ...body, ETag }; + Storage.setItem("@iRingo.Maps.Caches", cache); + log(`✅ Cache ResourceManifest`, ""); + }; + break; + case "KR": + if (ETag !== cache?.KR?.ETag) { + cache.KR = { ...body, ETag }; + Storage.setItem("@iRingo.Maps.Caches", cache); + log(`✅ Cache ResourceManifest`, ""); + }; + break; + default: + if (ETag !== cache?.XX?.ETag) { + cache.XX = { ...body, ETag }; + Storage.setItem("@iRingo.Maps.Caches", cache); + log(`✅ Cache ResourceManifest`, ""); + }; + break; + }; + }; + + static tileSets(tileSet = [], caches = {}, settings = {}, countryCode = "CN") { + log(`☑️ Set TileSets`, ""); + //let tileNames = []; + //caches.XX.tileSet.forEach(tile => tileNames.push(tile.style)); + //caches.CN.tileSet.forEach(tile => tileNames.push(tile.style)); + //tileNames = [...new Set(tileNames)]; + // 填补空缺图源 + switch (countryCode) { + case "CN": + /* + // 填补数据组 + caches.CN.tileSet = caches.CN.tileSet.map(tile => { + tile.dataSet = 0; + return tile; + }); + */ + caches.XX.tileSet.forEach(tile => { + if (!caches.CN.tileSet.some(i => i.style === tile.style)) { + log(`⚠️ Missing style: ${tile?.style}`, ""); + delete tile.dataSet; // 移除数据组 + tileSet.push(tile); + }; + }); + break; + case "KR": + default: + caches.CN.tileSet.forEach(tile => { + if (!caches.XX.tileSet.some(i => i.style === tile.style)) { + log(`⚠️ Missing style: ${tile?.style}`, ""); + tile.dataSet = 0; // 填补数据组 + tileSet.push(tile); + }; + }); + break; + }; + // 按需更改图源 + tileSet = tileSet.map((tile, index) => { + switch (tile.style) { + case "VECTOR_STANDARD": // 1 标准地图 + case "RASTER_TERRAIN": // 8 地貌与地势(绿地/城市/水体/山地不同颜色的区域) + case "VECTOR_BUILDINGS": // 11 建筑模型(3D/白模) + case "VECTOR_ROADS": // 20 道路(卫星地图:显示标签) + case "VECTOR_VENUES": // 30 室内地图 + case "VECTOR_TRANSIT": // 37 公共交通 + case "VECTOR_ROAD_NETWORK": // 53 道路网络 + case "VECTOR_TRANSIT_SELECTION": // 47 公共交通选区? + case "VECTOR_STREET_LANDMARKS": // 64 街道地标? + case "VECTOR_BUILDINGS_V2": // 73 建筑模型V2(3D/上色) + //log(`⚠️ Basic style: ${tile?.style}`, ""); + //tile = caches?.XX?.tileSet?.find(i => (i.style === tile.style && i.scale === tile.scale && i.size === tile.size)) || caches?.XX?.tileSet?.find(i => (i.style === tile.style && i.scale === tile.scale)) || caches?.XX?.tileSet?.find(i => (i.style === tile.style)) || tile; + //log(`⚠️ Basic baseURL: ${tile?.baseURL}`, ""); + break; + case "RASTER_SATELLITE": // 7 卫星地图(2D) + case "RASTER_SATELLITE_NIGHT": // 33 卫星地图(2D/夜间) + case "RASTER_SATELLITE_DIGITIZE": // 35 卫星地图(2D/数字化) + case "RASTER_SATELLITE_ASTC": // 45 卫星地图(2D/ASTC) + case "RASTER_SATELLITE_POLAR": // 91 卫星地图(2D/极地) + case "RASTER_SATELLITE_POLAR_NIGHT": // 95 卫星地图(2D/极地/夜间) + //log(`⚠️ Satellite style: ${tile?.style}`, ""); + switch (settings.TileSet.Satellite) { + case "HYBRID": + default: + break; + case "CN": + tile = caches?.CN?.tileSet?.find(i => (i.style === tile.style && i.scale === tile.scale && i.size === tile.size)) || caches?.CN?.tileSet?.find(i => (i.style === tile.style && i.scale === tile.scale)) || caches?.CN?.tileSet?.find(i => (i.style === tile.style)) || tile; + break; + case "XX": + tile = caches?.XX?.tileSet?.find(i => (i.style === tile.style && i.scale === tile.scale && i.size === tile.size)) || caches?.XX?.tileSet?.find(i => (i.style === tile.style && i.scale === tile.scale)) || caches?.XX?.tileSet?.find(i => (i.style === tile.style)) || tile; + break; + }; + //log(`⚠️ Satellite baseURL: ${tile?.baseURL}`, ""); + break; + case "VECTOR_TRAFFIC_SEGMENTS_FOR_RASTER": // 2 交通状况分段(卫星地图:显示交通状况)? + case "VECTOR_TRAFFIC_INCIDENTS_FOR_RASTER": // 3 交通状况事件(卫星地图:显示交通状况)? + case "VECTOR_TRAFFIC_SEGMENTS_AND_INCIDENTS_FOR_RASTER": // 4 交通状况分段和事件(卫星地图:显示交通状况)? + case "VECTOR_TRAFFIC": // 12 交通状况 + case "VECTOR_TRAFFIC_SKELETON": // 22 交通状况骨架(卫星地图:显示交通状况) + case "VECTOR_TRAFFIC_WITH_GREEN": // 25 交通状况(卫星地图:显示绿灯)? + case "VECTOR_TRAFFIC_STATIC": // 26 交通状况静态? + case "VECTOR_TRAFFIC_SKELETON_WITH_HISTORICAL": // 28 交通状况骨架(卫星地图:显示历史交通状况)? + case "VECTOR_TRAFFIC_V2": // 86 交通状况V2 + //log(`⚠️ Traffic style: ${tile?.style}`, ""); + //tile = caches?.CN?.tileSet?.find(i => (i.style === tile.style && i.scale === tile.scale && i.size === tile.size)) || caches?.CN?.tileSet?.find(i => (i.style === tile.style && i.scale === tile.scale)) || caches?.CN?.tileSet?.find(i => (i.style === tile.style)) || tile; + /* + switch (settings.TileSet.Traffic) { + case "HYBRID": + default: + break; + case "CN": + tile = caches?.CN?.tileSet?.find(i => (i.style === tile.style && i.scale === tile.scale && i.size === tile.size)) || caches?.CN?.tileSet?.find(i => (i.style === tile.style && i.scale === tile.scale)) || caches?.CN?.tileSet?.find(i => (i.style === tile.style)) || tile; + break; + case "XX": + tile = caches?.XX?.tileSet?.find(i => (i.style === tile.style && i.scale === tile.scale && i.size === tile.size)) || caches?.XX?.tileSet?.find(i => (i.style === tile.style && i.scale === tile.scale)) || caches?.XX?.tileSet?.find(i => (i.style === tile.style)) || tile; + break; + }; + */ + //log(`⚠️ Traffic baseURL: ${tile?.baseURL}`, ""); + break; + case "VECTOR_POI": // 13 兴趣点 + case "VECTOR_STREET_POI": // 56 街道兴趣点 + case "VECTOR_POI_V2": // 68 兴趣点V2 + case "VECTOR_POLYGON_SELECTION": // 69 多边形选区(兴趣点) + case "POI_BUSYNESS": // 74 兴趣点繁忙程度? + case "POI_DP_BUSYNESS": // 75 兴趣点DP繁忙程度? + case "VECTOR_POI_V2_UPDATE": // 84 兴趣点V2更新 + //log(`⚠️ POI style: ${tile?.style}`, ""); + //tile = caches?.CN?.tileSet?.find(i => (i.style === tile.style && i.scale === tile.scale && i.size === tile.size)) || caches?.CN?.tileSet?.find(i => (i.style === tile.style && i.scale === tile.scale)) || caches?.CN?.tileSet?.find(i => (i.style === tile.style)) || tile; + /* + switch (settings.TileSet.POI) { + case "HYBRID": + default: + break; + case "CN": + tile = caches?.CN?.tileSet?.find(i => (i.style === tile.style && i.scale === tile.scale && i.size === tile.size)) || caches?.CN?.tileSet?.find(i => (i.style === tile.style && i.scale === tile.scale)) || caches?.CN?.tileSet?.find(i => (i.style === tile.style)) || tile; + break; + case "XX": + tile = caches?.XX?.tileSet?.find(i => (i.style === tile.style && i.scale === tile.scale && i.size === tile.size)) || caches?.XX?.tileSet?.find(i => (i.style === tile.style && i.scale === tile.scale)) || caches?.XX?.tileSet?.find(i => (i.style === tile.style)) || tile; + break; + }; + */ + //log(`⚠️ POI baseURL: ${tile?.baseURL}`, ""); + break; + case "SPUTNIK_METADATA": // 14 卫星地图(3D/俯瞰)元数据 + case "SPUTNIK_C3M": // 15 卫星地图(3D/俯瞰)C3模型 + case "SPUTNIK_DSM": // 16 卫星地图(3D/俯瞰)数字表面模型 + case "SPUTNIK_DSM_GLOBAL": // 17 卫星地图(3D/俯瞰)全球数字表面模型 + case "SPUTNIK_VECTOR_BORDER": // 34 卫星地图(3D/俯瞰)边界 + case "FLYOVER_C3M_MESH": // 42 俯瞰C3模型(四处看看)? + case "FLYOVER_C3M_JPEG_TEXTURE": // 43 俯瞰C3模型纹理(四处看看)? + case "FLYOVER_C3M_ASTC_TEXTURE": // 44 俯瞰C3模型纹理(四处看看)? + case "FLYOVER_VISIBILITY": // 49 俯瞰可见性(四处看看)? + case "FLYOVER_SKYBOX": // 50 俯瞰天空盒(四处看看)? + case "FLYOVER_NAVGRAPH": // 51 俯瞰导航图(四处看看)? + case "FLYOVER_METADATA": // 52 俯瞰元数据 + //log(`⚠️ Flyover style: ${tile?.style}`, ""); + switch (settings.TileSet.Flyover) { + case "HYBRID": + default: + break; + case "CN": + tile = caches?.CN?.tileSet?.find(i => (i.style === tile.style && i.scale === tile.scale && i.size === tile.size)) || caches?.CN?.tileSet?.find(i => (i.style === tile.style && i.scale === tile.scale)) || caches?.CN?.tileSet?.find(i => (i.style === tile.style)) || tile; + break; + case "XX": + tile = caches?.XX?.tileSet?.find(i => (i.style === tile.style && i.scale === tile.scale && i.size === tile.size)) || caches?.XX?.tileSet?.find(i => (i.style === tile.style && i.scale === tile.scale)) || caches?.XX?.tileSet?.find(i => (i.style === tile.style)) || tile; + break; + }; + //log(`⚠️ Flyover baseURL: ${tile?.baseURL}`, ""); + break; + case "MUNIN_METADATA": // 57 四处看看 元数据 + case "VECTOR_SPR_MERCATOR": // 58 + case "VECTOR_SPR_MODELS": // 59 + case "VECTOR_SPR_MATERIALS": // 60 + case "VECTOR_SPR_METADATA": // 61 + case "VECTOR_SPR_ROADS": // 66 + case "VECTOR_SPR_STANDARD": // 67 + case "SPR_ASSET_METADATA": // 78? + case "VECTOR_SPR_POLAR": // 79 + case "VECTOR_SPR_MODELS_OCCLUSION": // 82? + //log(`⚠️ Munin style: ${tile?.style}`, ""); + switch (settings.TileSet.Munin) { + case "HYBRID": + default: + break; + case "CN": + tile = caches?.CN?.tileSet?.find(i => (i.style === tile.style && i.scale === tile.scale && i.size === tile.size)) || caches?.CN?.tileSet?.find(i => (i.style === tile.style && i.scale === tile.scale)) || caches?.CN?.tileSet?.find(i => (i.style === tile.style)) || tile; + break; + case "XX": + tile = caches?.XX?.tileSet?.find(i => (i.style === tile.style && i.scale === tile.scale && i.size === tile.size)) || caches?.XX?.tileSet?.find(i => (i.style === tile.style && i.scale === tile.scale)) || caches?.XX?.tileSet?.find(i => (i.style === tile.style)) || tile; + break; + }; + //log(`⚠️ Munin baseURL: ${tile?.baseURL}`, ""); + break; + case "VECTOR_REALISTIC": // 18 逼真地图? + case "VECTOR_COVERAGE": // 48 覆盖范围? + case "VECTOR_LAND_COVER": // 54 土地覆盖? + case "SMART_DATA_MODE": // 80 智能数据模式? + case "VECTOR_TOPOGRAPHIC": // 83 地形图? + case "VECTOR_ROAD_SELECTION": // 87 道路选区? + case "VECTOR_REGION_METADATA": // 88 区域元数据? + //log(`⚠️ TEST style: ${tile?.style}`, ""); + //tile = caches?.XX?.tileSet?.find(i => (i.style === tile.style && i.scale === tile.scale && i.size === tile.size)) || caches?.XX?.tileSet?.find(i => (i.style === tile.style && i.scale === tile.scale)) || caches?.XX?.tileSet?.find(i => (i.style === tile.style)) || tile; + //log(`⚠️ TEST baseURL: ${tile?.baseURL}`, ""); + break; + case "VECTOR_TRACKS": // 62 轨道? + case "COARSE_LOCATION_POLYGONS": // 65 粗略位置多边形? + case "VL_METADATA": // 70 VL 元数据? + case "VL_DATA": // 71 VL 数据? + case "PROACTIVE_APP_CLIP": // 72 主动式App剪辑? + case "SMART_INTERFACE_SELECTION": // 76 智能界面选区? + case "VECTOR_LIVE_DATA_UPDATES": // 85 实时数据更新? + case "RAY_TRACING": // 89 光线追踪? + case "VECTOR_CONTOURS": // 90 等高线? + case "VMAP4_ELEVATION": // 92 VMAP4 高程? + case "VMAP4_ELEVATION_POLAR": // 93 VMAP4 高程(极地)? + case "CELLULAR_COVERAGE_PLMN": // 94 蜂窝覆盖 PLMN? + case "UNUSED_99": // 99 未使用 + default: + log(`⚠️ default style: ${tile?.style}`, ""); + /* + switch (countryCode) { + case "CN": + tile = caches?.XX?.tileSet?.find(i => (i.style === tile.style && i.scale === tile.scale && i.size === tile.size)) || caches?.XX?.tileSet?.find(i => (i.style === tile.style && i.scale === tile.scale)) || caches?.XX?.tileSet?.find(i => (i.style === tile.style)) || tile; + break; + case "KR": + default: + tile = caches?.CN?.tileSet?.find(i => (i.style === tile.style && i.scale === tile.scale && i.size === tile.size)) || caches?.CN?.tileSet?.find(i => (i.style === tile.style && i.scale === tile.scale)) || caches?.CN?.tileSet?.find(i => (i.style === tile.style)) || tile; + break; + }; + */ + log(`⚠️ default baseURL: ${tile?.baseURL}`, ""); + break; + }; + return tile; + }).flat(Infinity).filter(Boolean); + log(`✅ Set TileSets`, ""); + return tileSet; + }; + + static attributions(attributions = [], caches = {}, countryCode = "CN") { + log(`☑️ Set Attributions`, ""); + switch (countryCode) { + case "CN": + caches?.XX?.attribution?.forEach(attribution => { + if (!attributions.some(i => i.name === attribution.name)) attributions.unshift(attribution); + }); + break; + case "KR": + caches?.KR?.attribution?.forEach(attribution => { + if (!attributions.some(i => i.name === attribution.name)) attributions.unshift(attribution); + }); + break; + default: + caches?.CN?.attribution?.forEach(attribution => { + if (!attributions.some(i => i.name === attribution.name)) attributions.push(attribution); + }); + break; + }; + attributions.sort((a, b) => { + switch (a.name) { + case "‎": + return -1; + case "AutoNavi": + return 0; + default: + return 1; + }; + }); + attributions = attributions.map((attribution, index) => { + switch (attribution.name) { + case "‎": + attribution.name = ` iRingo: 📍 GEOResourceManifest\n${new Date()}`; + delete attribution.plainTextURLSHA256Checksum; + break; + case "AutoNavi": + attribution.resource = attribution.resource.filter(i => i.resourceType !== 6); + attribution.region = [ + { "minX": 214, "minY": 82, "maxX": 216, "maxY": 82, "minZ": 8, "maxZ": 21 }, + { "minX": 213, "minY": 83, "maxX": 217, "maxY": 83, "minZ": 8, "maxZ": 21 }, + { "minX": 213, "minY": 84, "maxX": 218, "maxY": 84, "minZ": 8, "maxZ": 21 }, + { "minX": 213, "minY": 85, "maxX": 218, "maxY": 85, "minZ": 8, "maxZ": 21 }, + { "minX": 212, "minY": 86, "maxX": 218, "maxY": 86, "minZ": 8, "maxZ": 21 }, + { "minX": 189, "minY": 87, "maxX": 190, "maxY": 87, "minZ": 8, "maxZ": 21 }, + { "minX": 210, "minY": 87, "maxX": 220, "maxY": 87, "minZ": 8, "maxZ": 21 }, + { "minX": 188, "minY": 88, "maxX": 191, "maxY": 88, "minZ": 8, "maxZ": 21 }, + { "minX": 210, "minY": 88, "maxX": 223, "maxY": 88, "minZ": 8, "maxZ": 21 }, + { "minX": 188, "minY": 89, "maxX": 192, "maxY": 89, "minZ": 8, "maxZ": 21 }, + { "minX": 210, "minY": 89, "maxX": 223, "maxY": 89, "minZ": 8, "maxZ": 21 }, + { "minX": 186, "minY": 90, "maxX": 192, "maxY": 90, "minZ": 8, "maxZ": 21 }, + { "minX": 210, "minY": 90, "maxX": 223, "maxY": 90, "minZ": 8, "maxZ": 21 }, + { "minX": 209, "minY": 91, "maxX": 222, "maxY": 91, "minZ": 8, "maxZ": 21 }, + { "minX": 186, "minY": 91, "maxX": 192, "maxY": 91, "minZ": 8, "maxZ": 21 }, + { "minX": 184, "minY": 92, "maxX": 195, "maxY": 92, "minZ": 8, "maxZ": 21 }, + { "minX": 207, "minY": 92, "maxX": 221, "maxY": 92, "minZ": 8, "maxZ": 21 }, + { "minX": 185, "minY": 93, "maxX": 196, "maxY": 93, "minZ": 8, "maxZ": 21 }, + { "minX": 206, "minY": 93, "maxX": 221, "maxY": 93, "minZ": 8, "maxZ": 21 }, + { "minX": 185, "minY": 94, "maxX": 200, "maxY": 94, "minZ": 8, "maxZ": 21 }, + { "minX": 203, "minY": 94, "maxX": 221, "maxY": 94, "minZ": 8, "maxZ": 21 }, + { "minX": 182, "minY": 94, "maxX": 219, "maxY": 95, "minZ": 8, "maxZ": 21 }, + { "minX": 180, "minY": 96, "maxX": 217, "maxY": 96, "minZ": 8, "maxZ": 21 }, + { "minX": 180, "minY": 97, "maxX": 216, "maxY": 97, "minZ": 8, "maxZ": 21 }, + { "minX": 180, "minY": 98, "maxX": 214, "maxY": 98, "minZ": 8, "maxZ": 21 }, + { "minX": 180, "minY": 99, "maxX": 215, "maxY": 99, "minZ": 8, "maxZ": 21 }, + { "minX": 182, "minY": 100, "maxX": 214, "maxY": 100, "minZ": 8, "maxZ": 21 }, + { "minX": 183, "minY": 101, "maxX": 213, "maxY": 101, "minZ": 8, "maxZ": 21 }, + { "minX": 184, "minY": 102, "maxX": 214, "maxY": 102, "minZ": 8, "maxZ": 21 }, + { "minX": 183, "minY": 103, "maxX": 214, "maxY": 103, "minZ": 8, "maxZ": 21 }, + { "minX": 184, "minY": 104, "maxX": 215, "maxY": 104, "minZ": 8, "maxZ": 21 }, + { "minX": 185, "minY": 105, "maxX": 215, "maxY": 105, "minZ": 8, "maxZ": 21 }, + { "minX": 187, "minY": 106, "maxX": 215, "maxY": 106, "minZ": 8, "maxZ": 21 }, + { "minX": 189, "minY": 107, "maxX": 193, "maxY": 107, "minZ": 8, "maxZ": 21 }, + { "minX": 197, "minY": 107, "maxX": 214, "maxY": 107, "minZ": 8, "maxZ": 21 }, + { "minX": 198, "minY": 108, "maxX": 214, "maxY": 108, "minZ": 8, "maxZ": 21 }, + { "minX": 110, "minY": 109, "maxX": 214, "maxY": 109, "minZ": 8, "maxZ": 21 }, + { "minX": 197, "minY": 110, "maxX": 214, "maxY": 110, "minZ": 8, "maxZ": 21 }, + { "minX": 198, "minY": 111, "maxX": 214, "maxY": 111, "minZ": 8, "maxZ": 21 }, + { "minX": 204, "minY": 112, "maxX": 209, "maxY": 112, "minZ": 8, "maxZ": 21 }, + { "minX": 213, "minY": 112, "maxX": 214, "maxY": 112, "minZ": 8, "maxZ": 21 }, + { "minX": 205, "minY": 113, "maxX": 207, "maxY": 113, "minZ": 8, "maxZ": 21 }, + { "minX": 205, "minY": 114, "maxX": 206, "maxY": 114, "minZ": 8, "maxZ": 21 }, + { "minX": 204, "minY": 115, "maxX": 212, "maxY": 128, "minZ": 8, "maxZ": 21 }, + ]; + break; + }; + return attribution; + }).flat(Infinity).filter(Boolean); + log(`✅ Set Attributions`, ""); + return attributions; + }; + + static resources(resources = [], caches = {}, countryCode = "CN") { + log(`☑️ Set Resources`, ""); + switch (countryCode) { + case "CN": + break; + case "KR": + default: + caches.CN.resource.forEach((resource, index) => { + if (resource.filename === "POITypeMapping-CN-1.json") resources.push(resource); + if (resource.filename === "POITypeMapping-CN-2.json") resources.push(resource); + if (resource.filename === "China.cms-lpr") resources.push(resource); + }); + break; + }; + return resources; + }; + + static dataSets(dataSets = [], caches = {}, countryCode = "CN") { + log(`☑️ Set DataSets`, ""); + switch (countryCode) { + case "CN": + dataSets = caches?.XX?.dataSet; + break; + case "KR": + default: + break; + }; + //dataSets.push({ "dataSetDescription": "AutoNavi", "identifier": 10 }); + log(`✅ Set DataSets`, ""); + return dataSets; + }; + + static urlInfoSets(urlInfoSets = [], caches = {}, settings = {}, countryCode = "CN") { + log(`☑️ Set UrlInfoSets`, ""); + urlInfoSets = urlInfoSets.map((urlInfoSet, index) => { + switch (countryCode) { + case "CN": + urlInfoSet = { ...caches.XX.urlInfoSet[0], ...caches.CN.urlInfoSet[0] }; + break; + case "KR": + urlInfoSet = { ...caches.KR.urlInfoSet[0], ...caches.CN.urlInfoSet[0] }; + break; + default: + urlInfoSet = { ...caches.CN.urlInfoSet[0], ...caches.XX.urlInfoSet[0] }; + urlInfoSet.alternateResourcesURL = caches.CN.urlInfoSet[0].alternateResourcesURL; + delete urlInfoSet.polyLocationShiftURL; + break; + }; + switch (settings.Config?.Announcements?.Environment?.default) { + case "AUTO": + default: + break; + case "CN": + // Announcements + urlInfoSet.announcementsURL = caches.CN.urlInfoSet[0].announcementsURL; + break; + case "XX": + // Announcements + urlInfoSet.announcementsURL = caches.XX.urlInfoSet[0].announcementsURL; + break; + }; + switch (settings.UrlInfoSet.Dispatcher) { + case "AUTO": + default: + break; + case "AutoNavi": + // PlaceData Dispatcher + urlInfoSet.directionsURL = caches.CN.urlInfoSet[0].dispatcherURL; + // Background Dispatcher + urlInfoSet.backgroundDispatcherURL = caches.CN.urlInfoSet[0].backgroundDispatcherURL; + // Background Reverse Geocoder + urlInfoSet.backgroundRevGeoURL = caches.CN.urlInfoSet[0].backgroundRevGeoURL; + // Batch Reverse Geocoder + urlInfoSet.batchReverseGeocoderPlaceRequestURL = caches.CN.urlInfoSet[0].batchReverseGeocoderPlaceRequestURL; + break; + case "Apple": + // PlaceData Dispatcher + urlInfoSet.dispatcherURL = caches.XX.urlInfoSet[0].dispatcherURL; + // Background Dispatcher + urlInfoSet.backgroundDispatcherURL = caches.XX.urlInfoSet[0].backgroundDispatcherURL; + // Background Reverse Geocoder + urlInfoSet.backgroundRevGeoURL = caches.XX.urlInfoSet[0].backgroundRevGeoURL; + // Batch Reverse Geocoder + urlInfoSet.batchReverseGeocoderPlaceRequestURL = caches.XX.urlInfoSet[0].batchReverseGeocoderPlaceRequestURL; + break; + }; + switch (settings.UrlInfoSet.Directions) { + case "AUTO": + default: + break; + case "AutoNavi": + // Directions + urlInfoSet.directionsURL = caches.CN.urlInfoSet[0].directionsURL; + // ETA + urlInfoSet.etaURL = caches.CN.urlInfoSet[0].etaURL; + // Simple ETA + urlInfoSet.simpleETAURL = caches.CN.urlInfoSet[0].simpleETAURL; + break; + case "Apple": + // Directions + urlInfoSet.directionsURL = caches.XX.urlInfoSet[0].directionsURL; + // ETA + urlInfoSet.etaURL = caches.XX.urlInfoSet[0].etaURL; + // Simple ETA + urlInfoSet.simpleETAURL = caches.XX.urlInfoSet[0].simpleETAURL; + break; + }; + switch (settings.UrlInfoSet.RAP) { + case "AUTO": + default: + // RAP Submission + urlInfoSet.problemSubmissionURL = caches.XX.urlInfoSet[0].problemSubmissionURL; + // RAP Status + urlInfoSet.problemStatusURL = caches.XX.urlInfoSet[0].problemStatusURL; + // RAP Opt-Ins + urlInfoSet.problemOptInURL = caches.XX.urlInfoSet[0].problemOptInURL; + // RAP V4 Submission + urlInfoSet.feedbackSubmissionURL = caches.XX.urlInfoSet[0].feedbackSubmissionURL; + // RAP V4 Lookup + urlInfoSet.feedbackLookupURL = caches.XX.urlInfoSet[0].feedbackLookupURL; + break; + case "AutoNavi": + // RAP Submission + urlInfoSet.problemSubmissionURL = caches.CN.urlInfoSet[0].problemSubmissionURL; + // RAP Status + urlInfoSet.problemStatusURL = caches.CN.urlInfoSet[0].problemStatusURL; + // RAP V4 Submission + urlInfoSet.feedbackSubmissionURL = caches.CN.urlInfoSet[0].feedbackSubmissionURL; + // RAP V4 Lookup + urlInfoSet.feedbackLookupURL = caches.CN.urlInfoSet[0].feedbackLookupURL; + break; + case "Apple": + // RAP Submission + urlInfoSet.problemSubmissionURL = caches.XX.urlInfoSet[0].problemSubmissionURL; + // RAP Status + urlInfoSet.problemStatusURL = caches.XX.urlInfoSet[0].problemStatusURL; + // RAP Opt-Ins + urlInfoSet.problemOptInURL = caches.XX.urlInfoSet[0].problemOptInURL; + // RAP V4 Submission + urlInfoSet.feedbackSubmissionURL = caches.XX.urlInfoSet[0].feedbackSubmissionURL; + // RAP V4 Lookup + urlInfoSet.feedbackLookupURL = caches.XX.urlInfoSet[0].feedbackLookupURL; + break; + }; + switch (settings.UrlInfoSet.LocationShift) { + case "AUTO": + default: + break; + case "AutoNavi": + // Location Shift (polynomial) + urlInfoSet.polyLocationShiftURL = caches.CN.urlInfoSet[0].polyLocationShiftURL; + break; + case "Apple": + // Location Shift (polynomial) + urlInfoSet.polyLocationShiftURL = caches.XX.urlInfoSet[0].polyLocationShiftURL; + break; + }; + return urlInfoSet; + }); + log(`✅ Set UrlInfoSets`, ""); + return urlInfoSets; + }; + + static muninBuckets(muninBuckets = [], caches = {}, settings = {}) { + log(`☑️ Set MuninBuckets`, ""); + switch (settings.TileSet.Munin) { + case "AUTO": + default: + break; + case "CN": + muninBuckets = caches.CN.muninBucket; + break; + case "XX": + muninBuckets = caches.XX.muninBucket; + break; + }; + log(`✅ Set MuninBuckets`, ""); + return muninBuckets; + }; + + static displayStrings(displayStrings = [], caches = {}, countryCode = "CN") { + log(`☑️ Set DisplayStrings`, ""); + switch (countryCode) { + case "CN": + displayStrings = caches.XX.displayStrings.map((displayString, index) => { + return displayString; + }); + break; + case "KR": + //displayStrings = caches.KR.displayStrings; + break; + default: + //displayStrings = caches.XX.displayStrings; + break; + }; + log(`✅ Set DisplayStrings`, ""); + return displayStrings; + }; + + static SetTileGroups(body = {}) { + log(`☑️ Set TileGroups`, ""); + body.tileGroup = body.tileGroup.map(tileGroup => { + log(`🚧 tileGroup.identifier: ${tileGroup.identifier}`); + tileGroup.identifier += Math.floor(Math.random() * 100) + 1; + log(`🚧 tileGroup.identifier: ${tileGroup.identifier}`); + tileGroup.tileSet = body.tileSet.map((tileSet, index) => { + return { + "tileSetIndex": index, + "identifier": tileSet.validVersion?.[0]?.identifier + }; + }); + if (body.attribution) tileGroup.attributionIndex = body.attribution.map((attribution, index) => { + return index; + }); + if (body.resource) tileGroup.resourceIndex = body.resource.map((resource, index) => { + return index; + }); + return tileGroup; + }); + log(`✅ Set TileGroups`, ""); + return body; + }; + + +}; diff --git a/src/class/GEOResourceManifestDownload.mjs b/src/class/GEOResourceManifestDownload.mjs new file mode 100644 index 0000000..2e0da37 --- /dev/null +++ b/src/class/GEOResourceManifestDownload.mjs @@ -0,0 +1,109 @@ +import { log } from "../utils/utils.mjs"; +//import { MESSAGE_TYPE, reflectionMergePartial, BinaryReader, WireType, UnknownFieldHandler, isJsonObject, typeofJsonValue, jsonWriteOptions, MessageType } from "@protobuf-ts/runtime"; +import { Resources, Resource_ResourceType, ResourceFilter_Scale, ResourceFilter_Scenario, Resource_ConnectionType, Resource_ValidationMethod, Resource_UpdateMethod } from "../proto/apple/geo/GEOResourceManifestDownload.js"; +import { TileSetStyle, TileScale, TileSize, GenericTileType, TileSet_TileSetVersionUpdateBehavior, TileSet_TileSetChecksumType, TileSet_TileRequestStyle } from "../proto/apple/geo/protobuf/geo.js"; + +export default class GEOResourceManifestDownload { + static Name = "GEOResourceManifestDownload"; + static Version = "1.0.9"; + static Author = "Virgil Clyne"; + static decode(rawBody = new Uint8Array([])) { + log("☑️ GEOResourceManifestDownload.decode", ""); + const body = Resources.fromBinary(rawBody); + if (typeof body.tileSet !== "undefined") body.tileSet = body.tileSet.map((tile) => { + if (typeof tile.style !== "undefined") tile.style = TileSetStyle[tile.style]; + if (typeof tile.validVersion !== "undefined") tile.validVersion = tile.validVersion.map(version => { + if (typeof version.genericTile !== "undefined") version.genericTile = version.genericTile.map(genericTile => { + if (typeof genericTile.tileType !== "undefined") genericTile.tileType = GenericTileType[genericTile.tileType]; + return genericTile; + }); + return version; + }); + if (typeof tile.scale !== "undefined") tile.scale = TileScale[tile.scale]; + if (typeof tile.size !== "undefined") tile.size = TileSize[tile.size]; + if (typeof tile.updateBehavior !== "undefined") tile.updateBehavior = TileSet_TileSetVersionUpdateBehavior[tile.updateBehavior]; + if (typeof tile.checksumType !== "undefined") tile.checksumType = TileSet_TileSetChecksumType[tile.checksumType]; + if (typeof tile.requestStyle !== "undefined") tile.requestStyle = TileSet_TileRequestStyle[tile.requestStyle]; + return tile; + }); + if (typeof body.attribution !== "undefined") body.attribution = body.attribution.map(attribution => { + if (typeof attribution.resource !== "undefined") attribution.resource = attribution.resource.map(resource => { + if (typeof resource.resourceType !== "undefined") resource.resourceType = Resource_ResourceType[resource.resourceType]; + if (typeof resource.filter !== "undefined") resource.filter = resource.filter.map(filter => { + if (typeof filter.scale !== "undefined") filter.scale = filter.scale.map(scale => ResourceFilter_Scale[scale]); + if (typeof filter.scenario !== "undefined") filter.scenario = filter.scenario.map(scenario => ResourceFilter_Scenario[scenario]); + return filter; + }); + if (typeof resource.connectionType !== "undefined") resource.connectionType = Resource_ConnectionType[resource.connectionType]; + if (typeof resource.validationMethod !== "undefined") resource.validationMethod = Resource_ValidationMethod[resource.validationMethod]; + if (typeof resource.updateMethod !== "undefined") resource.updateMethod = Resource_UpdateMethod[resource.updateMethod]; + return resource; + }); + return attribution; + }); + if (typeof body.resource !== "undefined") body.resource = body.resource.map(resource => { + if (typeof resource.resourceType !== "undefined") resource.resourceType = Resource_ResourceType[resource.resourceType]; + if (typeof resource.filter !== "undefined") resource.filter = resource.filter.map(filter => { + if (typeof filter.scale !== "undefined") filter.scale = filter.scale.map(scale => ResourceFilter_Scale[scale]); + if (typeof filter.scenario !== "undefined") filter.scenario = filter.scenario.map(scenario => ResourceFilter_Scenario[scenario]); + return filter; + }); + if (typeof resource.connectionType !== "undefined") resource.connectionType = Resource_ConnectionType[resource.connectionType]; + if (typeof resource.validationMethod !== "undefined") resource.validationMethod = Resource_ValidationMethod[resource.validationMethod]; + if (typeof resource.updateMethod !== "undefined") resource.updateMethod = Resource_UpdateMethod[resource.updateMethod]; + return resource; + }); + log("✅ GEOResourceManifestDownload.decode", ""); + return body; + }; + + static encode(body = {}) { + log("☑️ GEOResourceManifestDownload.encode", ""); + if (typeof body.tileSet !== "undefined") body.tileSet = body.tileSet.map((tile) => { + if (typeof tile.style !== "undefined") tile.style = TileSetStyle[tile.style]; + if (typeof tile.validVersion !== "undefined") tile.validVersion = tile.validVersion.map(version => { + if (typeof version.genericTile !== "undefined") version.genericTile = version.genericTile.map(genericTile => { + if (typeof genericTile.tileType !== "undefined") genericTile.tileType = GenericTileType[genericTile.tileType]; + return genericTile; + }); + return version; + }); + if (typeof tile.scale !== "undefined") tile.scale = TileScale[tile.scale]; + if (typeof tile.size !== "undefined") tile.size = TileSize[tile.size]; + if (typeof tile.updateBehavior !== "undefined") tile.updateBehavior = TileSet_TileSetVersionUpdateBehavior[tile.updateBehavior]; + if (typeof tile.checksumType !== "undefined") tile.checksumType = TileSet_TileSetChecksumType[tile.checksumType]; + if (typeof tile.requestStyle !== "undefined") tile.requestStyle = TileSet_TileRequestStyle[tile.requestStyle]; + return tile; + }); + if (typeof body.attribution !== "undefined") body.attribution = body.attribution.map(attribution => { + if (typeof attribution.resource !== "undefined") attribution.resource = attribution.resource.map(resource => { + if (typeof resource.resourceType !== "undefined") resource.resourceType = Resource_ResourceType[resource.resourceType]; + if (typeof resource.filter !== "undefined") resource.filter = resource.filter.map(filter => { + if (typeof filter.scale !== "undefined") filter.scale = filter.scale.map(scale => ResourceFilter_Scale[scale]); + if (typeof filter.scenario !== "undefined") filter.scenario = filter.scenario.map(scenario => ResourceFilter_Scenario[scenario]); + return filter; + }); + if (typeof resource.connectionType !== "undefined") resource.connectionType = Resource_ConnectionType[resource.connectionType]; + if (typeof resource.validationMethod !== "undefined") resource.validationMethod = Resource_ValidationMethod[resource.validationMethod]; + if (typeof resource.updateMethod !== "undefined") resource.updateMethod = Resource_UpdateMethod[resource.updateMethod]; + return resource; + }); + return attribution; + }); + if (typeof body.resource !== "undefined") body.resource = body.resource.map(resource => { + if (typeof resource.resourceType !== "undefined") resource.resourceType = Resource_ResourceType[resource.resourceType]; + if (typeof resource.filter !== "undefined") resource.filter = resource.filter.map(filter => { + if (typeof filter.scale !== "undefined") filter.scale = filter.scale.map(scale => ResourceFilter_Scale[scale]); + if (typeof filter.scenario !== "undefined") filter.scenario = filter.scenario.map(scenario => ResourceFilter_Scenario[scenario]); + return filter; + }); + if (typeof resource.connectionType !== "undefined") resource.connectionType = Resource_ConnectionType[resource.connectionType]; + if (typeof resource.validationMethod !== "undefined") resource.validationMethod = Resource_ValidationMethod[resource.validationMethod]; + if (typeof resource.updateMethod !== "undefined") resource.updateMethod = Resource_UpdateMethod[resource.updateMethod]; + return resource; + }); + const rawBody = Resources.toBinary(body); + log("✅ GEOResourceManifestDownload.encode", ""); + return rawBody; + }; +}; diff --git a/src/function/database.mjs b/src/function/database.mjs new file mode 100644 index 0000000..fbead80 --- /dev/null +++ b/src/function/database.mjs @@ -0,0 +1,54 @@ +export default { + "Location": { + "Settings": { + "Switch": true, + "PEP": { + "GCC": "US" + } + } + }, + "Maps": { + "Settings": { + "Switch": true, + "UrlInfoSet": { + "Dispatcher": "AutoNavi", + "Directions": "AutoNavi", + "RAP": "Apple", + "LocationShift": "AUTO" + }, + "TileSet": { + "Map": "CN", + "Satellite": "HYBRID", + "Traffic": "CN", + "POI": "CN", + "Flyover": "XX", + "Munin": "XX" + }, + "GeoManifest": { + "Dynamic": { + "Config": { + "CountryCode": { + "default": "CN", + "iOS": "AUTO", + "iPadOS": "AUTO", + "watchOS": "US", + "macOS": "AUTO" + } + } + } + }, + "Config": { + "Announcements": { + "Environment:": { + "default": "AUTO", + "iOS": "AUTO", + "iPadOS": "AUTO", + "watchOS": "AUTO", + "macOS": "AUTO" + } + } + } + }, + "Configs": {} + } +} diff --git a/src/function/setENV.mjs b/src/function/setENV.mjs new file mode 100644 index 0000000..6b05b81 --- /dev/null +++ b/src/function/setENV.mjs @@ -0,0 +1,24 @@ +import getStorage from '../utils/getStorage.mjs' +import { _, log } from "../utils/utils.mjs"; + +/** + * Set Environment Variables + * @author VirgilClyne + * @param {String} name - Persistent Store Key + * @param {Array} platforms - Platform Names + * @param {Object} database - Default DataBase + * @return {Object} { Settings, Caches, Configs } + */ +export default function setENV(name, platforms, database) { + log(`☑️ Set Environment Variables`, ""); + let { Settings, Caches, Configs } = getStorage(name, platforms, database); + /***************** Settings *****************/ + log(`✅ Set Environment Variables, Settings: ${typeof Settings}, Settings内容: ${JSON.stringify(Settings)}`, ""); + /***************** Caches *****************/ + //log(`✅ Set Environment Variables, Caches: ${typeof Caches}, Caches内容: ${JSON.stringify(Caches)}`, ""); + /***************** Configs *****************/ + //Configs.Storefront = new Map(Configs.Storefront); + if (Configs.Locale) Configs.Locale = new Map(Configs.Locale); + if (Configs.i18n) for (let type in Configs.i18n) Configs.i18n[type] = new Map(Configs.i18n[type]); + return { Settings, Caches, Configs }; +}; diff --git a/src/proto b/src/proto new file mode 160000 index 0000000..f977266 --- /dev/null +++ b/src/proto @@ -0,0 +1 @@ +Subproject commit f9772666d5311e5f197e7532658ade17ea6246c7 diff --git a/src/request.debug.js b/src/request.debug.js new file mode 100644 index 0000000..0193243 --- /dev/null +++ b/src/request.debug.js @@ -0,0 +1,290 @@ +import { $platform, URL, _, Storage, fetch, notification, log, logError, wait, done, getScript, runScript } from "./utils/utils.mjs"; +import database from "./function/database.mjs"; +import setENV from "./function/setENV.mjs"; +import GEOPDPlaceRequest from "./class/GEOPDPlaceRequest.mjs"; +// 构造回复数据 +let $response = undefined; +/***************** Processing *****************/ +// 解构URL +const url = new URL($request.url); +log(`⚠ url: ${url.toJSON()}`, ""); +// 获取连接参数 +const METHOD = $request.method, HOST = url.hostname, PATH = url.pathname; +log(`⚠ METHOD: ${METHOD}, HOST: ${HOST}, PATH: ${PATH}` , ""); +// 解析格式 +const FORMAT = ($request.headers?.["Content-Type"] ?? $request.headers?.["content-type"])?.split(";")?.[0]; +log(`⚠ FORMAT: ${FORMAT}`, ""); +!(async () => { + const { Settings, Caches, Configs } = setENV("iRingo", ["Location", "Maps"], database); + log(`⚠ Settings.Switch: ${Settings?.Switch}`, ""); + switch (Settings.Switch) { + case true: + default: + // 创建空数据 + let body = {}; + // 方法判断 + switch (METHOD) { + case "POST": + case "PUT": + case "PATCH": + case "DELETE": + // 格式判断 + switch (FORMAT) { + case undefined: // 视为无body + break; + case "application/x-www-form-urlencoded": + case "text/plain": + default: + break; + case "application/x-mpegURL": + case "application/x-mpegurl": + case "application/vnd.apple.mpegurl": + case "audio/mpegurl": + //body = M3U8.parse($request.body); + //log(`🚧 body: ${JSON.stringify(body)}`, ""); + //$request.body = M3U8.stringify(body); + break; + case "text/xml": + case "text/html": + case "text/plist": + case "application/xml": + case "application/plist": + case "application/x-plist": + //body = XML.parse($request.body); + //log(`🚧 body: ${JSON.stringify(body)}`, ""); + //$request.body = XML.stringify(body); + break; + case "text/vtt": + case "application/vtt": + //body = VTT.parse($request.body); + //log(`🚧 body: ${JSON.stringify(body)}`, ""); + //$request.body = VTT.stringify(body); + break; + case "text/json": + case "application/json": + //body = JSON.parse($request.body ?? "{}"); + //log(`🚧 body: ${JSON.stringify(body)}`, ""); + //$request.body = JSON.stringify(body); + break; + case "application/protobuf": + case "application/x-protobuf": + case "application/vnd.google.protobuf": + case "application/grpc": + case "application/grpc+proto": + case "application/octet-stream": + //log(`🚧 $request: ${JSON.stringify($request, null, 2)}`, ""); + let rawBody = ($platform === "Quantumult X") ? new Uint8Array($request.bodyBytes ?? []) : $request.body ?? new Uint8Array(); + //log(`🚧 isBuffer? ${ArrayBuffer.isView(rawBody)}: ${JSON.stringify(rawBody, null, 2)}`, ""); + switch (HOST) { + case "gsp-ssl.ls.apple.com": + case "dispatcher.is.autonavi.com": + switch (PATH) { + case "/dispatcher.arpc": + case "/dispatcher": + /****************** initialization start *******************/ + // 先拆分aRPC校验头和protobuf数据体 + const headerIndex = rawBody.findIndex((element, index) => element === 0x0A && index > 47); + log(`🚧 headerIndex: ${headerIndex}`, ""); + const Header = rawBody.slice(0, headerIndex); + body = rawBody.slice(headerIndex); + /****************** initialization finish *******************/ + body = GEOPDPlaceRequest.decode(body); + log(`🚧 body: ${JSON.stringify(body, null, 2)}`, ""); + switch (body.requestType) { + case "REQUEST_TYPE_REVERSE_GEOCODING": + break; + }; + body.displayRegion = "US"; + body.clientMetadata.deviceCountryCode = "US"; + body = GEOPDPlaceRequest.encode(body); + /****************** initialization start *******************/ + rawBody = new Uint8Array(Header.length + body.length); + rawBody.set(Header, 0); + rawBody.set(body, Header.length); + /****************** initialization finish *******************/ + break; + }; + break; + }; + // 写入二进制数据 + $request.body = rawBody; + break; + }; + //break; // 不中断,继续处理URL + case "GET": + case "HEAD": + case "OPTIONS": + default: + delete $request?.headers?.["If-None-Match"]; + delete $request?.headers?.["if-none-match"]; + // 主机判断 + switch (HOST) { + case "configuration.ls.apple.com": + // 路径判断 + switch (PATH) { + case "/config/defaults": + break; + }; + break; + case "gspe1-ssl.ls.apple.com": + switch (PATH) { + case "/pep/gcc": + /* // 不使用 echo response + $response = { + status: 200, + headers: { + "Content-Type": "text/html", + Date: new Date().toUTCString(), + Connection: "keep-alive", + "Content-Encoding": "identity", + }, + body: Settings.PEP.GCC, + }; + log(JSON.stringify($response)); + */ + break; + }; + break; + case "gspe35-ssl.ls.apple.com": + case "gspe35-ssl.ls.apple.cn": + const OS = url.searchParams.get("os"); + switch (PATH) { + case "/config/announcements": + switch (OS) { + case "ios": + case "ipados": + case "macos": + default: + switch (Settings?.Config?.Announcements?.Environment?.default) { + case "AUTO": + /* + switch (Caches?.pep?.gcc) { + default: + url.searchParams.set("environment", "prod"); + break; + case "CN": + case undefined: + url.searchParams.set("environment", "prod-cn"); + break; + }; + */ + break; + case "CN": + default: + url.searchParams.set("environment", "prod-cn"); + break; + case "XX": + url.searchParams.set("environment", "prod"); + break; + }; + break; + case "watchos": + switch (Settings?.Config?.Announcements?.Environment?.watchOS) { + case "AUTO": + /* + switch (Caches?.pep?.gcc) { + default: + url.searchParams.set("environment", "prod"); + break; + case "CN": + case undefined: + url.searchParams.set("environment", "prod-cn"); + break; + }; + */ + break; + case "XX": + default: + url.searchParams.set("environment", "prod"); + break; + case "CN": + url.searchParams.set("environment", "prod-cn"); + break; + }; + break; + }; + break; + case "/geo_manifest/dynamic/config": + switch (OS) { + case "ios": + case "ipados": + case "macos": + default: + switch (Settings?.GeoManifest?.Dynamic?.Config?.CountryCode?.default) { + case "AUTO": + switch (Caches?.pep?.gcc) { + default: + url.searchParams.set("country_code", Caches?.pep?.gcc ?? "US"); + break; + case "CN": + case undefined: + url.searchParams.set("country_code", "CN"); + break; + }; + break; + default: + url.searchParams.set("country_code", Settings?.GeoManifest?.Dynamic?.Config?.CountryCode?.default ?? "CN"); + break; + }; + break; + case "watchos": + switch (Settings?.GeoManifest?.Dynamic?.Config?.CountryCode?.watchOS) { + case "AUTO": + switch (Caches?.pep?.gcc) { + default: + url.searchParams.set("country_code", Caches?.pep?.gcc ?? "US"); + break; + case "CN": + case undefined: + url.searchParams.set("country_code", "CN"); + break; + }; + break; + default: + url.searchParams.set("country_code", Settings?.GeoManifest?.Dynamic?.Config?.CountryCode?.watchOS ?? "US"); + break; + }; + break; + }; + break; + }; + break; + }; + break; + case "CONNECT": + case "TRACE": + break; + }; + $request.url = url.toString(); + log(`🚧 调试信息`, `$request.url: ${$request.url}`, ""); + break; + case false: + break; + }; +})() + .catch((e) => logError(e)) + .finally(() => { + switch ($response) { + default: // 有构造回复数据,返回构造的回复数据 + //log(`🚧 finally`, `echo $response: ${JSON.stringify($response, null, 2)}`, ""); + if ($response.headers?.["Content-Encoding"]) $response.headers["Content-Encoding"] = "identity"; + if ($response.headers?.["content-encoding"]) $response.headers["content-encoding"] = "identity"; + switch ($platform) { + default: + done({ response: $response }); + break; + case "Quantumult X": + if (!$response.status) $response.status = "HTTP/1.1 200 OK"; + delete $response.headers?.["Content-Length"]; + delete $response.headers?.["content-length"]; + delete $response.headers?.["Transfer-Encoding"]; + done($response); + break; + }; + break; + case undefined: // 无构造回复数据,发送修改的请求数据 + //log(`🚧 finally`, `$request: ${JSON.stringify($request, null, 2)}`, ""); + done($request); + break; + }; + }) diff --git a/src/request.js b/src/request.js new file mode 100644 index 0000000..093f1fb --- /dev/null +++ b/src/request.js @@ -0,0 +1,236 @@ +import { $platform, URL, _, Storage, fetch, notification, log, logError, wait, done, getScript, runScript } from "./utils/utils.mjs"; +import database from "./function/database.mjs"; +import setENV from "./function/setENV.mjs"; +// 构造回复数据 +let $response = undefined; +/***************** Processing *****************/ +// 解构URL +const url = new URL($request.url); +log(`⚠ url: ${url.toJSON()}`, ""); +// 获取连接参数 +const METHOD = $request.method, HOST = url.hostname, PATH = url.pathname; +log(`⚠ METHOD: ${METHOD}, HOST: ${HOST}, PATH: ${PATH}` , ""); +// 解析格式 +const FORMAT = ($request.headers?.["Content-Type"] ?? $request.headers?.["content-type"])?.split(";")?.[0]; +log(`⚠ FORMAT: ${FORMAT}`, ""); +!(async () => { + const { Settings, Caches, Configs } = setENV("iRingo", ["Location", "Maps"], database); + log(`⚠ Settings.Switch: ${Settings?.Switch}`, ""); + switch (Settings.Switch) { + case true: + default: + // 创建空数据 + let body = {}; + // 方法判断 + switch (METHOD) { + case "POST": + case "PUT": + case "PATCH": + case "DELETE": + // 格式判断 + switch (FORMAT) { + case undefined: // 视为无body + break; + case "application/x-www-form-urlencoded": + case "text/plain": + default: + break; + case "application/x-mpegURL": + case "application/x-mpegurl": + case "application/vnd.apple.mpegurl": + case "audio/mpegurl": + //body = M3U8.parse($request.body); + //log(`🚧 body: ${JSON.stringify(body)}`, ""); + //$request.body = M3U8.stringify(body); + break; + case "text/xml": + case "text/html": + case "text/plist": + case "application/xml": + case "application/plist": + case "application/x-plist": + //body = XML.parse($request.body); + //log(`🚧 body: ${JSON.stringify(body)}`, ""); + //$request.body = XML.stringify(body); + break; + case "text/vtt": + case "application/vtt": + //body = VTT.parse($request.body); + //log(`🚧 body: ${JSON.stringify(body)}`, ""); + //$request.body = VTT.stringify(body); + break; + case "text/json": + case "application/json": + //body = JSON.parse($request.body ?? "{}"); + //log(`🚧 body: ${JSON.stringify(body)}`, ""); + //$request.body = JSON.stringify(body); + break; + case "application/protobuf": + case "application/x-protobuf": + case "application/vnd.google.protobuf": + case "application/grpc": + case "application/grpc+proto": + case "application/octet-stream": + log(`🚧 $request: ${JSON.stringify($request, null, 2)}`, ""); + let rawBody = ($platform === "Quantumult X") ? new Uint8Array($request.bodyBytes ?? []) : $request.body ?? new Uint8Array(); + log(`🚧 isBuffer? ${ArrayBuffer.isView(rawBody)}: ${JSON.stringify(rawBody, null, 2)}`, ""); + // 写入二进制数据 + $request.body = rawBody; + break; + }; + //break; // 不中断,继续处理URL + case "GET": + case "HEAD": + case "OPTIONS": + default: + delete $request?.headers?.["If-None-Match"]; + delete $request?.headers?.["if-none-match"]; + // 主机判断 + switch (HOST) { + case "configuration.ls.apple.com": + // 路径判断 + switch (PATH) { + case "/config/defaults": + break; + }; + break; + case "gspe1-ssl.ls.apple.com": + switch (PATH) { + case "/pep/gcc": + /* // 不使用 echo response + $response = { + status: 200, + headers: { + "Content-Type": "text/html", + Date: new Date().toUTCString(), + Connection: "keep-alive", + "Content-Encoding": "identity", + }, + body: Settings.PEP.GCC, + }; + log(JSON.stringify($response)); + */ + break; + }; + break; + case "gspe35-ssl.ls.apple.com": + case "gspe35-ssl.ls.apple.cn": + const OS = url.searchParams.get("os"); + switch (PATH) { + case "/config/announcements": + switch (OS) { + case "ios": + case "ipados": + case "macos": + default: + switch (Settings?.Config?.Announcements?.Environment?.default) { + case "AUTO": + break; + case "CN": + default: + url.searchParams.set("environment", "prod-cn"); + break; + case "XX": + url.searchParams.set("environment", "prod"); + break; + }; + break; + case "watchos": + switch (Settings?.Config?.Announcements?.Environment?.watchOS) { + case "AUTO": + break; + case "XX": + default: + url.searchParams.set("environment", "prod"); + break; + case "CN": + url.searchParams.set("environment", "prod-cn"); + break; + }; + break; + }; + break; + case "/geo_manifest/dynamic/config": + switch (OS) { + case "ios": + case "ipados": + case "macos": + default: + switch (Settings?.GeoManifest?.Dynamic?.Config?.CountryCode?.default) { + case "AUTO": + switch (Caches?.pep?.gcc) { + default: + url.searchParams.set("country_code", Caches?.pep?.gcc ?? "US"); + break; + case "CN": + case undefined: + url.searchParams.set("country_code", "CN"); + break; + }; + break; + default: + url.searchParams.set("country_code", Settings?.GeoManifest?.Dynamic?.Config?.CountryCode?.default ?? "CN"); + break; + }; + break; + case "watchos": + switch (Settings?.GeoManifest?.Dynamic?.Config?.CountryCode?.watchOS) { + case "AUTO": + switch (Caches?.pep?.gcc) { + default: + url.searchParams.set("country_code", Caches?.pep?.gcc ?? "US"); + break; + case "CN": + case undefined: + url.searchParams.set("country_code", "CN"); + break; + }; + break; + default: + url.searchParams.set("country_code", Settings?.GeoManifest?.Dynamic?.Config?.CountryCode?.watchOS ?? "US"); + break; + }; + break; + }; + break; + }; + break; + }; + break; + case "CONNECT": + case "TRACE": + break; + }; + $request.url = url.toString(); + log(`🚧 调试信息`, `$request.url: ${$request.url}`, ""); + break; + case false: + break; + }; +})() + .catch((e) => logError(e)) + .finally(() => { + switch ($response) { + default: // 有构造回复数据,返回构造的回复数据 + //log(`🚧 finally`, `echo $response: ${JSON.stringify($response, null, 2)}`, ""); + if ($response.headers?.["Content-Encoding"]) $response.headers["Content-Encoding"] = "identity"; + if ($response.headers?.["content-encoding"]) $response.headers["content-encoding"] = "identity"; + switch ($platform) { + default: + done({ response: $response }); + break; + case "Quantumult X": + if (!$response.status) $response.status = "HTTP/1.1 200 OK"; + delete $response.headers?.["Content-Length"]; + delete $response.headers?.["content-length"]; + delete $response.headers?.["Transfer-Encoding"]; + done($response); + break; + }; + break; + case undefined: // 无构造回复数据,发送修改的请求数据 + //log(`🚧 finally`, `$request: ${JSON.stringify($request, null, 2)}`, ""); + done($request); + break; + }; + }) diff --git a/src/response.debug.js b/src/response.debug.js new file mode 100644 index 0000000..b56572b --- /dev/null +++ b/src/response.debug.js @@ -0,0 +1,223 @@ +import { $platform, _, Storage, fetch, notification, log, logError, wait, done, getScript, runScript } from "./utils/utils.mjs"; +import XML from "./XML/XML.mjs"; +import database from "./function/database.mjs"; +import setENV from "./function/setENV.mjs"; +import GEOResourceManifest from "./class/GEOResourceManifest.mjs"; +import GEOResourceManifestDownload from "./class/GEOResourceManifestDownload.mjs"; +import { BinaryReader, UnknownFieldHandler } from "@protobuf-ts/runtime"; +/***************** Processing *****************/ +// 解构URL +const url = new URL($request.url); +log(`⚠ url: ${url.toJSON()}`, ""); +// 获取连接参数 +const METHOD = $request.method, HOST = url.hostname, PATH = url.pathname; +log(`⚠ METHOD: ${METHOD}, HOST: ${HOST}, PATH: ${PATH}` , ""); +// 解析格式 +const FORMAT = ($response.headers?.["Content-Type"] ?? $response.headers?.["content-type"])?.split(";")?.[0]; +log(`⚠ FORMAT: ${FORMAT}`, ""); +!(async () => { + const { Settings, Caches, Configs } = setENV("iRingo", ["Location", "Maps"], database); + log(`⚠ Settings.Switch: ${Settings?.Switch}`, ""); + switch (Settings.Switch) { + case true: + default: + // 创建空数据 + let body = {}; + // 格式判断 + switch (FORMAT) { + case undefined: // 视为无body + break; + case "application/x-www-form-urlencoded": + case "text/plain": + default: + //log(`🚧 body: ${body}`, ""); + break; + case "application/x-mpegURL": + case "application/x-mpegurl": + case "application/vnd.apple.mpegurl": + case "audio/mpegurl": + //body = M3U8.parse($response.body); + //log(`🚧 body: ${JSON.stringify(body)}`, ""); + //$response.body = M3U8.stringify(body); + break; + case "text/xml": + case "text/html": + case "text/plist": + case "application/xml": + case "application/plist": + case "application/x-plist": + // 主机判断 + switch (HOST) { + case "gspe1-ssl.ls.apple.com": + //body = new DOMParser().parseFromString($response.body, FORMAT); + // 路径判断 + switch (PATH) { + case "/pep/gcc": + _.set(Caches, "pep.gcc", $response.body); + Storage.setItem("@iRingo.Location.Caches", Caches); + switch (Settings.PEP.GCC) { + case "AUTO": + break; + default: + $response.body = Settings.PEP.GCC; + break; + }; + break; + }; + //$repsonse.body = new XMLSerializer().serializeToString(body); + break; + case "configuration.ls.apple.com": + //body = await PLISTs("plist2json", $response.body); + BigInt.prototype.toJSON = function () { return this.toString() }; + body = XML.parse($response.body); + log(`🚧 body: ${JSON.stringify(body)}`, ""); + // 路径判断 + switch (PATH) { + case "/config/defaults": + const PLIST = body.plist; + if (PLIST) { + // CN + PLIST["com.apple.GEO"].CountryProviders.CN.ShouldEnableLagunaBeach = true; // XX + PLIST["com.apple.GEO"].CountryProviders.CN.DrivingMultiWaypointRoutesEnabled = true; // 驾驶导航途径点 + //PLIST["com.apple.GEO"].CountryProviders.CN.EnableAlberta = false; // CN + PLIST["com.apple.GEO"].CountryProviders.CN.EnableClientDrapedVectorPolygons = true; // CN + PLIST["com.apple.GEO"].CountryProviders.CN.GEOAddressCorrectionEnabled = true; // CN + delete PLIST["com.apple.GEO"].CountryProviders.CN.GEOBatchSpatialEventLookupMaxParametersCount // CN + delete PLIST["com.apple.GEO"].CountryProviders.CN.GEOBatchSpatialPlaceLookupMaxParametersCount // CN + PLIST["com.apple.GEO"].CountryProviders.CN.LocalitiesAndLandmarksSupported = true; // CN + PLIST["com.apple.GEO"].CountryProviders.CN.NavigationShowHeadingKey = true; + PLIST["com.apple.GEO"].CountryProviders.CN.POIBusynessDifferentialPrivacy = true; // CN + PLIST["com.apple.GEO"].CountryProviders.CN.POIBusynessRealTime = true; // CN + PLIST["com.apple.GEO"].CountryProviders.CN.TransitPayEnabled = true; // CN + //PLIST["com.apple.GEO"].CountryProviders.CN.WiFiQualityNetworkDisabled = Settings?.Config?.Defaults?.WiFiQualityNetworkDisabled ?? true; // CN + //PLIST["com.apple.GEO"].CountryProviders.CN.WiFiQualityTileDisabled = Settings?.Config?.Defaults?.WiFiQualityTileDisabled ?? true; // CN + PLIST["com.apple.GEO"].CountryProviders.CN.SupportsOffline = true; // CN + PLIST["com.apple.GEO"].CountryProviders.CN.SupportsCarIntegration = true; // CN + // TW + PLIST["com.apple.GEO"].CountryProviders.CN.GEOShouldSpeakWrittenAddresses = true; // TW + PLIST["com.apple.GEO"].CountryProviders.CN.GEOShouldSpeakWrittenPlaceNames = true; // TW + // US + PLIST["com.apple.GEO"].CountryProviders.CN["6694982d2b14e95815e44e970235e230"] = true; // US + PLIST["com.apple.GEO"].CountryProviders.CN.PedestrianAREnabled = true; // 现实世界中的线路 + PLIST["com.apple.GEO"].CountryProviders.CN.OpticalHeadingEnabled = true; // 举起以查看 + PLIST["com.apple.GEO"].CountryProviders.CN.UseCLPedestrianMapMatchedLocations = true; // 导航准确性-增强 + }; + break; + }; + log(`🚧 body: ${JSON.stringify(body)}`, ""); + //$response.body = await PLISTs("json2plist", body); // json2plist + $response.body = XML.stringify(body); + break; + }; + break; + case "text/vtt": + case "application/vtt": + //body = VTT.parse($response.body); + //log(`🚧 body: ${JSON.stringify(body)}`, ""); + //$response.body = VTT.stringify(body); + break; + case "text/json": + case "application/json": + body = JSON.parse($response.body ?? "{}"); + log(`🚧 body: ${JSON.stringify(body)}`, ""); + $response.body = JSON.stringify(body); + break; + case "application/protobuf": + case "application/x-protobuf": + case "application/vnd.google.protobuf": + case "application/grpc": + case "application/grpc+proto": + case "application/octet-stream": + //log(`🚧 $response: ${JSON.stringify($response, null, 2)}`, ""); + let rawBody = ($platform === "Quantumult X") ? new Uint8Array($response.bodyBytes ?? []) : $response.body ?? new Uint8Array(); + //log(`🚧 isBuffer? ${ArrayBuffer.isView(rawBody)}: ${JSON.stringify(rawBody)}`, ""); + switch (FORMAT) { + case "application/protobuf": + case "application/x-protobuf": + case "application/vnd.google.protobuf": + case "application/octet-stream": + switch (HOST) { + case "gspe35-ssl.ls.apple.com": + switch (PATH) { + case "/config/announcements": + break; + case "/geo_manifest/dynamic/config": + body = GEOResourceManifestDownload.decode(rawBody); + //log(`🚧 调试信息`, `body before: ${JSON.stringify(body)}`, ""); + /* + let UF = UnknownFieldHandler.list(body); + //log(`🚧 调试信息`, `UF: ${JSON.stringify(UF)}`, ""); + if (UF) { + UF = UF.map(uf => { + uf.no; // 22 + uf.wireType; // WireType.Varint + // use the binary reader to decode the raw data: + let reader = new BinaryReader(uf.data); + let addedNumber = reader.int32(); // 7777 + log(`🚧 no: ${uf.no}, wireType: ${uf.wireType}, reader: ${reader}, addedNumber: ${addedNumber}`, ""); + }); + }; + */ + const CountryCode = url.searchParams.get("country_code"); + const ETag = $response.headers?.["Etag"] ?? $response.headers?.["etag"]; + switch (CountryCode) { + case "CN": + //GEOResourceManifest.cacheResourceManifest(body, Caches, "CN", ETag); + Caches.CN = body; + const { ETag: XXETag, body: XXBody } = await GEOResourceManifest.downloadResourceManifest($request, "US"); + Caches.XX = XXBody; + //GEOResourceManifest.cacheResourceManifest(XXBody, Caches, "XX", XXETag); + // announcementsSupportedLanguage + //body.announcementsSupportedLanguage?.push?.("zh-CN"); + //body.announcementsSupportedLanguage?.push?.("zh-TW"); + break; + case "KR": { + //GEOResourceManifest.cacheResourceManifest(body, Caches, "KR", ETag); + Caches.KR = body; + const { ETag: CNETag, body: CNBody } = await GEOResourceManifest.downloadResourceManifest($request, "CN"); + Caches.CN = CNBody; + //GEOResourceManifest.cacheResourceManifest(CNBody, Caches, "CN", CNETag); + break; + }; + default: { + //GEOResourceManifest.cacheResourceManifest(body, Caches, "XX", ETag); + Caches.XX = body; + const { ETag: CNETag, body: CNBody } = await GEOResourceManifest.downloadResourceManifest($request, "CN"); + Caches.CN = CNBody; + //GEOResourceManifest.cacheResourceManifest(CNBody, Caches, "CN", CNETag); + break; + }; + }; + body.tileSet = GEOResourceManifest.tileSets(body.tileSet, Caches, Settings, CountryCode); + body.attribution = GEOResourceManifest.attributions(body.attribution, Caches, CountryCode); + body.resource = GEOResourceManifest.resources(body.resource, Caches, CountryCode); + //body.dataSet = GEOResourceManifest.dataSets(body.dataSet, Caches, CountryCode); + body.urlInfoSet = GEOResourceManifest.urlInfoSets(body.urlInfoSet, Caches, Settings, CountryCode); + body.muninBucket = GEOResourceManifest.muninBuckets(body.muninBucket, Caches, Settings); + //body.displayString = GEOResourceManifest.displayStrings(body.displayString, Caches, CountryCode); + // releaseInfo + //body.releaseInfo = body.releaseInfo.replace(/(\d+\.\d+)/, `$1.${String(Date.now()/1000)}`); + log(`🚧 releaseInfo: ${body.releaseInfo}`, ""); + body = GEOResourceManifest.SetTileGroups(body); + //log(`🚧 调试信息`, `body after: ${JSON.stringify(body)}`, ""); + rawBody = GEOResourceManifestDownload.encode(body); + break; + }; + break; + }; + break; + case "application/grpc": + case "application/grpc+proto": + break; + }; + // 写入二进制数据 + $response.body = rawBody; + break; + }; + break; + case false: + break; + }; +})() + .catch((e) => logError(e)) + .finally(() => done($response)) diff --git a/src/response.js b/src/response.js new file mode 100644 index 0000000..ffab043 --- /dev/null +++ b/src/response.js @@ -0,0 +1,183 @@ +import { $platform, _, Storage, fetch, notification, log, logError, wait, done, getScript, runScript } from "./utils/utils.mjs"; +import XML from "./XML/XML.mjs"; +import database from "./function/database.mjs"; +import setENV from "./function/setENV.mjs"; +import GEOResourceManifest from "./class/GEOResourceManifest.mjs"; +import GEOResourceManifestDownload from "./class/GEOResourceManifestDownload.mjs"; +/***************** Processing *****************/ +// 解构URL +const url = new URL($request.url); +log(`⚠ url: ${url.toJSON()}`, ""); +// 获取连接参数 +const METHOD = $request.method, HOST = url.hostname, PATH = url.pathname; +log(`⚠ METHOD: ${METHOD}, HOST: ${HOST}, PATH: ${PATH}` , ""); +// 解析格式 +const FORMAT = ($response.headers?.["Content-Type"] ?? $response.headers?.["content-type"])?.split(";")?.[0]; +log(`⚠ FORMAT: ${FORMAT}`, ""); +!(async () => { + const { Settings, Caches, Configs } = setENV("iRingo", ["Location", "Maps"], database); + log(`⚠ Settings.Switch: ${Settings?.Switch}`, ""); + switch (Settings.Switch) { + case true: + default: + // 创建空数据 + let body = {}; + // 格式判断 + switch (FORMAT) { + case undefined: // 视为无body + break; + case "application/x-www-form-urlencoded": + case "text/plain": + default: + break; + case "application/x-mpegURL": + case "application/x-mpegurl": + case "application/vnd.apple.mpegurl": + case "audio/mpegurl": + break; + case "text/xml": + case "text/html": + case "text/plist": + case "application/xml": + case "application/plist": + case "application/x-plist": + // 主机判断 + switch (HOST) { + case "gspe1-ssl.ls.apple.com": + //body = new DOMParser().parseFromString($response.body, FORMAT); + // 路径判断 + switch (PATH) { + case "/pep/gcc": + _.set(Caches, "pep.gcc", $response.body); + Storage.setItem("@iRingo.Location.Caches", Caches); + switch (Settings.PEP.GCC) { + case "AUTO": + break; + default: + $response.body = Settings.PEP.GCC; + break; + }; + break; + }; + break; + case "configuration.ls.apple.com": + BigInt.prototype.toJSON = function () { return this.toString() }; + body = XML.parse($response.body); + // 路径判断 + switch (PATH) { + case "/config/defaults": + const PLIST = body.plist; + if (PLIST) { + // CN + PLIST["com.apple.GEO"].CountryProviders.CN.ShouldEnableLagunaBeach = true; // XX + PLIST["com.apple.GEO"].CountryProviders.CN.DrivingMultiWaypointRoutesEnabled = true; // 驾驶导航途径点 + //PLIST["com.apple.GEO"].CountryProviders.CN.EnableAlberta = false; // CN + PLIST["com.apple.GEO"].CountryProviders.CN.EnableClientDrapedVectorPolygons = true; // CN + PLIST["com.apple.GEO"].CountryProviders.CN.GEOAddressCorrectionEnabled = true; // CN + delete PLIST["com.apple.GEO"].CountryProviders.CN.GEOBatchSpatialEventLookupMaxParametersCount // CN + delete PLIST["com.apple.GEO"].CountryProviders.CN.GEOBatchSpatialPlaceLookupMaxParametersCount // CN + PLIST["com.apple.GEO"].CountryProviders.CN.LocalitiesAndLandmarksSupported = true; // CN + PLIST["com.apple.GEO"].CountryProviders.CN.NavigationShowHeadingKey = true; + PLIST["com.apple.GEO"].CountryProviders.CN.POIBusynessDifferentialPrivacy = true; // CN + PLIST["com.apple.GEO"].CountryProviders.CN.POIBusynessRealTime = true; // CN + PLIST["com.apple.GEO"].CountryProviders.CN.TransitPayEnabled = true; // CN + //PLIST["com.apple.GEO"].CountryProviders.CN.WiFiQualityNetworkDisabled = Settings?.Config?.Defaults?.WiFiQualityNetworkDisabled ?? true; // CN + //PLIST["com.apple.GEO"].CountryProviders.CN.WiFiQualityTileDisabled = Settings?.Config?.Defaults?.WiFiQualityTileDisabled ?? true; // CN + PLIST["com.apple.GEO"].CountryProviders.CN.SupportsOffline = true; // CN + PLIST["com.apple.GEO"].CountryProviders.CN.SupportsCarIntegration = true; // CN + // TW + PLIST["com.apple.GEO"].CountryProviders.CN.GEOShouldSpeakWrittenAddresses = true; // TW + PLIST["com.apple.GEO"].CountryProviders.CN.GEOShouldSpeakWrittenPlaceNames = true; // TW + // US + PLIST["com.apple.GEO"].CountryProviders.CN["6694982d2b14e95815e44e970235e230"] = true; // US + PLIST["com.apple.GEO"].CountryProviders.CN.PedestrianAREnabled = true; // 现实世界中的线路 + PLIST["com.apple.GEO"].CountryProviders.CN.OpticalHeadingEnabled = true; // 举起以查看 + PLIST["com.apple.GEO"].CountryProviders.CN.UseCLPedestrianMapMatchedLocations = true; // 导航准确性-增强 + }; + break; + }; + $response.body = XML.stringify(body); + break; + }; + break; + case "text/vtt": + case "application/vtt": + break; + case "text/json": + case "application/json": + body = JSON.parse($response.body ?? "{}"); + log(`🚧 body: ${JSON.stringify(body)}`, ""); + $response.body = JSON.stringify(body); + break; + case "application/protobuf": + case "application/x-protobuf": + case "application/vnd.google.protobuf": + case "application/grpc": + case "application/grpc+proto": + case "application/octet-stream": + let rawBody = ($platform === "Quantumult X") ? new Uint8Array($response.bodyBytes ?? []) : $response.body ?? new Uint8Array(); + switch (FORMAT) { + case "application/protobuf": + case "application/x-protobuf": + case "application/vnd.google.protobuf": + case "application/octet-stream": + switch (HOST) { + case "gspe35-ssl.ls.apple.com": + switch (PATH) { + case "/config/announcements": + break; + case "/geo_manifest/dynamic/config": + body = GEOResourceManifestDownload.decode(rawBody); + const CountryCode = url.searchParams.get("country_code"); + const ETag = $response.headers?.["Etag"] ?? $response.headers?.["etag"]; + switch (CountryCode) { + case "CN": + //GEOResourceManifest.cacheResourceManifest(body, Caches, "CN", ETag); + Caches.CN = body; + const { ETag: XXETag, body: XXBody } = await GEOResourceManifest.downloadResourceManifest($request, "US"); + Caches.XX = XXBody; + break; + case "KR": { + //GEOResourceManifest.cacheResourceManifest(body, Caches, "KR", ETag); + Caches.KR = body; + const { ETag: CNETag, body: CNBody } = await GEOResourceManifest.downloadResourceManifest($request, "CN"); + Caches.CN = CNBody; + break; + }; + default: { + //GEOResourceManifest.cacheResourceManifest(body, Caches, "XX", ETag); + Caches.XX = body; + const { ETag: CNETag, body: CNBody } = await GEOResourceManifest.downloadResourceManifest($request, "CN"); + Caches.CN = CNBody; + break; + }; + }; + body.tileSet = GEOResourceManifest.tileSets(body.tileSet, Caches, Settings, CountryCode); + body.attribution = GEOResourceManifest.attributions(body.attribution, Caches, CountryCode); + body.resource = GEOResourceManifest.resources(body.resource, Caches, CountryCode); + //body.dataSet = GEOResourceManifest.dataSets(body.dataSet, Caches, CountryCode); + body.urlInfoSet = GEOResourceManifest.urlInfoSets(body.urlInfoSet, Caches, Settings, CountryCode); + body.muninBucket = GEOResourceManifest.muninBuckets(body.muninBucket, Caches, Settings); + log(`🚧 releaseInfo: ${body.releaseInfo}`, ""); + body = GEOResourceManifest.SetTileGroups(body); + rawBody = GEOResourceManifestDownload.encode(body); + break; + }; + break; + }; + break; + case "application/grpc": + case "application/grpc+proto": + break; + }; + // 写入二进制数据 + $response.body = rawBody; + break; + }; + break; + case false: + break; + }; +})() + .catch((e) => logError(e)) + .finally(() => done($response)) diff --git a/src/utils b/src/utils new file mode 160000 index 0000000..40e91e8 --- /dev/null +++ b/src/utils @@ -0,0 +1 @@ +Subproject commit 40e91e80011968370ba7ef400ff768dabf5cf583