commit 68ef3685ec6fe9e80bbfdad5e118f0ac280d0986 Author: Skylar Ittner Date: Sat Apr 27 00:33:28 2019 -0600 User sign-in, location-aware map, barcode scanning diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..bd626e7 --- /dev/null +++ b/.gitignore @@ -0,0 +1,6 @@ +/www/settings.js +/plugins +/platforms +/hooks +/node_modules +/www/node_modules \ No newline at end of file diff --git a/config.xml b/config.xml new file mode 100644 index 0000000..6906525 --- /dev/null +++ b/config.xml @@ -0,0 +1,28 @@ + + + TerranQuest + + + + + Netsyms Technologies + + + + + + + + + + + + + + + + + + + + diff --git a/nbproject/license-mpl.txt b/nbproject/license-mpl.txt new file mode 100644 index 0000000..8fe23b3 --- /dev/null +++ b/nbproject/license-mpl.txt @@ -0,0 +1,9 @@ +<#if licenseFirst??> +${licenseFirst} + +${licensePrefix}This Source Code Form is subject to the terms of the Mozilla Public +${licensePrefix}License, v. 2.0. If a copy of the MPL was not distributed with this +${licensePrefix}file, You can obtain one at http://mozilla.org/MPL/2.0/. +<#if licenseLast??> +${licenseLast} + diff --git a/nbproject/project.properties b/nbproject/project.properties new file mode 100644 index 0000000..580216d --- /dev/null +++ b/nbproject/project.properties @@ -0,0 +1,6 @@ +file.reference.App-www=www +file.reference.v2-App=. +files.encoding=UTF-8 +project.licensePath=./nbproject/license-mpl.txt +site.root.folder=${file.reference.App-www} +source.folder=${file.reference.v2-App} diff --git a/nbproject/project.xml b/nbproject/project.xml new file mode 100644 index 0000000..6e70075 --- /dev/null +++ b/nbproject/project.xml @@ -0,0 +1,9 @@ + + + org.netbeans.modules.web.clientproject + + + TerranQuest v2 + + + diff --git a/package.json b/package.json new file mode 100644 index 0000000..bdf5681 --- /dev/null +++ b/package.json @@ -0,0 +1,43 @@ +{ + "name": "com.netsyms.terranquest.TerranQuest", + "displayName": "TerranQuest", + "version": "2.0.0", + "description": "", + "main": "index.js", + "scripts": { + "test": "echo \"Error: no test specified\" && exit 1" + }, + "keywords": [ + "ecosystem:cordova" + ], + "author": "Netsyms Technologies", + "license": "MPL-2.0", + "dependencies": { + "cordova-android": "^8.0.0", + "cordova-plugin-app-version": "^0.1.9", + "cordova-plugin-geolocation": "^4.0.1", + "cordova-plugin-headercolor": "^1.0.0", + "cordova-plugin-inappbrowser": "^3.0.0", + "cordova-plugin-statusbar": "^2.4.2", + "cordova-plugin-transparent-status-bar": "git+https://github.com/manugando/cordova-plugin-transparent-status-bar.git", + "cordova-plugin-whitelist": "^1.3.3", + "phonegap-plugin-barcodescanner": "^8.0.1" + }, + "cordova": { + "plugins": { + "cordova-plugin-whitelist": {}, + "phonegap-plugin-barcodescanner": { + "ANDROID_SUPPORT_V4_VERSION": "27.+" + }, + "cordova-plugin-statusbar": {}, + "cordova-plugin-headercolor": {}, + "cordova-plugin-app-version": {}, + "cordova-plugin-inappbrowser": {}, + "cordova-plugin-transparent-status-bar": {}, + "cordova-plugin-geolocation": {} + }, + "platforms": [ + "android" + ] + } +} \ No newline at end of file diff --git a/www/css/app.css b/www/css/app.css new file mode 100644 index 0000000..0a75fe5 --- /dev/null +++ b/www/css/app.css @@ -0,0 +1,9 @@ +/* +This Source Code Form is subject to the terms of the Mozilla Public +License, v. 2.0. If a copy of the MPL was not distributed with this +file, You can obtain one at http://mozilla.org/MPL/2.0/. +*/ + +#app.framework7-root { + padding-top: 0px; +} \ No newline at end of file diff --git a/www/css/home.css b/www/css/home.css new file mode 100644 index 0000000..5743692 --- /dev/null +++ b/www/css/home.css @@ -0,0 +1,72 @@ +/* +This Source Code Form is subject to the terms of the Mozilla Public +License, v. 2.0. If a copy of the MPL was not distributed with this +file, You can obtain one at http://mozilla.org/MPL/2.0/. +*/ + +.dark-popup { + background-color: rgba(23, 23, 23, 0.75); +} + +#mainmenu-items .mainmenu-item { + text-align: center; + font-size: 16pt; + border-radius: 5px; + border: 1px solid white; + padding: 1em; + margin-bottom: 1em; +} + +#mainmenu-items .mainmenu-item-sm { + font-size: 14pt; + padding: 0.5em; +} + +#playerinfo { + position: absolute; + left: 0; + right: 0; + top: var(--f7-statusbar-height); + padding: 10px; +} + +.usericon { + border: 2px solid white; + border-radius: 50%; + height: 50px; + width: 50px; + display: inline-block; +} + +#playerinfo .usericon { + flex-shrink: 0; +} + +#playerinfo .username-healthbar { + margin-bottom: 20px; + font-size: 16px; + vertical-align: middle; + width: 100%; +} + +.username-healthbar .username { + padding: 0px 10px; + overflow: hidden; + white-space: nowrap; +} + +.username-healthbar .healthbar { + width: 100%; + max-width: 20em; + background: rgba(23, 23, 23, 0.25); + border-top-right-radius: 4px; + border-bottom-right-radius: 4px; + border: 1px solid white; + border-left: none; +} + +.healthbar span { + background-color: #3ffc5e; + border-top-right-radius: 2px; + border-bottom-right-radius: 2px; +} \ No newline at end of file diff --git a/www/css/map.css b/www/css/map.css new file mode 100644 index 0000000..bf9686d --- /dev/null +++ b/www/css/map.css @@ -0,0 +1,13 @@ +/* +This Source Code Form is subject to the terms of the Mozilla Public +License, v. 2.0. If a copy of the MPL was not distributed with this +file, You can obtain one at http://mozilla.org/MPL/2.0/. +*/ + +#mapbox { + position: absolute; + top: 0; + left: 0; + bottom: 0; + right: 0; +} \ No newline at end of file diff --git a/www/fonts/material/MaterialIcons-Regular.woff b/www/fonts/material/MaterialIcons-Regular.woff new file mode 100644 index 0000000..b648a3e Binary files /dev/null and b/www/fonts/material/MaterialIcons-Regular.woff differ diff --git a/www/fonts/material/MaterialIcons-Regular.woff2 b/www/fonts/material/MaterialIcons-Regular.woff2 new file mode 100644 index 0000000..9fa2112 Binary files /dev/null and b/www/fonts/material/MaterialIcons-Regular.woff2 differ diff --git a/www/fonts/material/Material_Icons.css b/www/fonts/material/Material_Icons.css new file mode 100644 index 0000000..a39e603 --- /dev/null +++ b/www/fonts/material/Material_Icons.css @@ -0,0 +1,39 @@ +@font-face { + font-family: 'Material Icons'; + font-style: normal; + font-weight: normal; + src: + /* from https://fonts.gstatic.com/s/materialicons/v41/flUhRq6tzZclQEJ-Vdg-IuiaDsNY.eot */ + url('Material_Icons.eot?#iefix') format('embedded-opentype'), + /* from https://fonts.gstatic.com/s/materialicons/v41/flUhRq6tzZclQEJ-Vdg-IuiaDsNa.woff */ + url('Material_Icons.woff') format('woff'), + /* from https://fonts.gstatic.com/s/materialicons/v41/flUhRq6tzZclQEJ-Vdg-IuiaDsNc.woff2 */ + url('Material_Icons.woff2') format('woff2'), + /* from https://fonts.gstatic.com/l/font?kit=flUhRq6tzZclQEJ-Vdg-IuiaDsNb&skey=4fbfe4498ec2960a&v=v41#MaterialIcons */ + url('Material_Icons.svg#MaterialIcons') format('svg'), + /* from https://fonts.gstatic.com/s/materialicons/v41/flUhRq6tzZclQEJ-Vdg-IuiaDsNZ.ttf */ + url('Material_Icons.ttf') format('truetype'); +} + + +.material-icons { + font-family: 'Material Icons'; + font-weight: normal; + font-style: normal; + font-size: 24px; /* Preferred icon size */ + display: inline-block; + line-height: 1; + text-transform: none; + letter-spacing: normal; + word-wrap: normal; + white-space: nowrap; + direction: ltr; + + /* Support for all WebKit browsers. */ + -webkit-font-smoothing: antialiased; + /* Support for Safari and Chrome. */ + text-rendering: optimizeLegibility; + + /* Support for Firefox. */ + -moz-osx-font-smoothing: grayscale; +} \ No newline at end of file diff --git a/www/fonts/material/Material_Icons.eot b/www/fonts/material/Material_Icons.eot new file mode 100644 index 0000000..285e524 Binary files /dev/null and b/www/fonts/material/Material_Icons.eot differ diff --git a/www/fonts/material/Material_Icons.svg b/www/fonts/material/Material_Icons.svg new file mode 100644 index 0000000..6c0bc57 --- /dev/null +++ b/www/fonts/material/Material_Icons.svg @@ -0,0 +1,51 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/www/fonts/material/Material_Icons.ttf b/www/fonts/material/Material_Icons.ttf new file mode 100644 index 0000000..84a44b8 Binary files /dev/null and b/www/fonts/material/Material_Icons.ttf differ diff --git a/www/fonts/material/Material_Icons.woff b/www/fonts/material/Material_Icons.woff new file mode 100644 index 0000000..41b78e2 Binary files /dev/null and b/www/fonts/material/Material_Icons.woff differ diff --git a/www/fonts/material/Material_Icons.woff2 b/www/fonts/material/Material_Icons.woff2 new file mode 100644 index 0000000..373c2c5 Binary files /dev/null and b/www/fonts/material/Material_Icons.woff2 differ diff --git a/www/fonts/roboto/Roboto.css b/www/fonts/roboto/Roboto.css new file mode 100644 index 0000000..7320ec3 --- /dev/null +++ b/www/fonts/roboto/Roboto.css @@ -0,0 +1,18 @@ +@font-face { + font-family: 'Roboto'; + font-style: normal; + font-weight: normal; + src: + local('Roboto'), + local('Roboto-Regular'), + /* from https://fonts.gstatic.com/s/roboto/v18/KFOmCnqEu92Fr1Mu4mxO.eot */ + url('Roboto.eot?#iefix') format('embedded-opentype'), + /* from https://fonts.gstatic.com/s/roboto/v18/KFOmCnqEu92Fr1Mu4mxM.woff */ + url('Roboto.woff') format('woff'), + /* from https://fonts.gstatic.com/s/roboto/v18/KFOmCnqEu92Fr1Mu4mxK.woff2 */ + url('Roboto.woff2') format('woff2'), + /* from https://fonts.gstatic.com/l/font?kit=KFOmCnqEu92Fr1Mu4mxN&skey=a0a0114a1dcab3ac&v=v18#Roboto */ + url('Roboto.svg#Roboto') format('svg'), + /* from https://fonts.gstatic.com/s/roboto/v18/KFOmCnqEu92Fr1Mu4mxP.ttf */ + url('Roboto.ttf') format('truetype'); +} diff --git a/www/fonts/roboto/Roboto.eot b/www/fonts/roboto/Roboto.eot new file mode 100644 index 0000000..a0780d6 Binary files /dev/null and b/www/fonts/roboto/Roboto.eot differ diff --git a/www/fonts/roboto/Roboto.svg b/www/fonts/roboto/Roboto.svg new file mode 100644 index 0000000..627f5a3 --- /dev/null +++ b/www/fonts/roboto/Roboto.svg @@ -0,0 +1,308 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/www/fonts/roboto/Roboto.ttf b/www/fonts/roboto/Roboto.ttf new file mode 100644 index 0000000..b91bf3f Binary files /dev/null and b/www/fonts/roboto/Roboto.ttf differ diff --git a/www/fonts/roboto/Roboto.woff b/www/fonts/roboto/Roboto.woff new file mode 100644 index 0000000..92dfacc Binary files /dev/null and b/www/fonts/roboto/Roboto.woff differ diff --git a/www/fonts/roboto/Roboto.woff2 b/www/fonts/roboto/Roboto.woff2 new file mode 100644 index 0000000..7e854e6 Binary files /dev/null and b/www/fonts/roboto/Roboto.woff2 differ diff --git a/www/img/logo.png b/www/img/logo.png new file mode 100644 index 0000000..9519e7d Binary files /dev/null and b/www/img/logo.png differ diff --git a/www/index.html b/www/index.html new file mode 100644 index 0000000..0598181 --- /dev/null +++ b/www/index.html @@ -0,0 +1,41 @@ + + + + + + + + + + + + + + + + +TerranQuest + +
+ + + +
+ +
+ + + + + + + + + + + + + + diff --git a/www/js/api.js b/www/js/api.js new file mode 100644 index 0000000..3bb1eab --- /dev/null +++ b/www/js/api.js @@ -0,0 +1,103 @@ +/* + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + */ + +/** + * Get the API endpoint URL for an action + * @param {String} action + * @return {String} + */ +function getActionUrl(action) { + return SETTINGS["server"] + "/" + action; +} + +/** + * Call an API function on the server. + * @param {string} action + * @param {array} data key: value array of arguments for the server. + * @param {function} success Called with the JSON response object. + * @param {function} failure Called with an error message string. + * @return {undefined} + */ +function callAPI(action, data, success, failure) { + return $.ajax({ + type: 'POST', + dataType: 'json', + url: getActionUrl(action), + data: data, + timeout: 5000, + success: function (data, textStatus) { + if (data.status === "OK") { + success(data); + return; + } + if (typeof failure != 'function') { + return; + } + if (data.status === "ERROR") { + failure(data.msg); + } else { + failure("The server sent an invalid response."); + } + }, + error: function (xhr, textStatus, errorThrown) { + if (typeof failure != 'function') { + return; + } + switch (textStatus) { + case "timeout": + failure("Couldn't connect to the server (timeout)."); + break; + case "error": + failure("Couldn't connect to the server (error)."); + break; + case "parseerror": + failure("The server sent a malformed response."); + break; + default: + failure("Couldn't connect to the server."); + } + } + }); +} + +/** + * Call an API function on the server. Makes fewer assumptions about what + * constitutes a success response. + * @param {string} action + * @param {array} data key: value array of arguments for the server. + * @param {function} success Called with the JSON response object. + * @param {function} failure Called with an error message string. + * @return {undefined} + */ +function callAPIRawResponse(action, data, success, failure) { + return $.ajax({ + type: 'POST', + url: getActionUrl(action), + data: data, + timeout: 5000, + success: function (data, textStatus) { + success(data); + }, + error: function (xhr, textStatus, errorThrown) { + if (typeof failure != 'function') { + return; + } + switch (textStatus) { + case "timeout": + failure("Couldn't connect to the server (timeout)."); + break; + case "error": + failure("Couldn't connect to the server (error)."); + break; + case "parseerror": + failure("The server sent a malformed response."); + break; + default: + failure("Couldn't connect to the server."); + } + } + }); +} \ No newline at end of file diff --git a/www/js/chooseteam.js b/www/js/chooseteam.js new file mode 100644 index 0000000..549a4f2 --- /dev/null +++ b/www/js/chooseteam.js @@ -0,0 +1,58 @@ +/* + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + */ + + +function checkAndSave(username, password) { + app.preloader.show(); + + callAPI("ping", { + username: username, + password: password + }, function (data) { + localStorage.setItem("username", username); + localStorage.setItem("password", password); + localStorage.setItem("configured", true); + callAPI("playerexists", { + username: username, + password: password + }, function (resp) { + app.preloader.hide(); + if (resp.exists == true) { + router.navigate("/home"); + } else { + router.navigate("/chooseteam"); + } + }, function (msg) { + app.preloader.hide(); + app.dialog.alert(msg, "Error"); + }); + }, function (msg) { + app.preloader.hide(); + app.dialog.alert(msg, "Error"); + }); +} + +$(".type-card").click(function () { + app.preloader.show(); + callAPI("createplayer", { + username: localStorage.getItem("username"), + password: localStorage.getItem("password"), + team: $(this).data("id") + }, function (success) { + app.preloader.hide(); + router.navigate("/home"); + }, function (msg) { + app.preloader.hide(); + app.dialog.alert(msg, "Error"); + }); +}); + +function setupAccount() { + var username = $("#username").val(); + var password = $("#password").val(); + + checkAndSave(username, password); +} \ No newline at end of file diff --git a/www/js/home.js b/www/js/home.js new file mode 100644 index 0000000..c093495 --- /dev/null +++ b/www/js/home.js @@ -0,0 +1,72 @@ +/* + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + */ + +var playerProfile = []; + +function loadHomePage(callback) { + callAPI("getprofile", { + username: localStorage.getItem("username"), + password: localStorage.getItem("password") + }, function (data) { + playerProfile = data.profile; + setupProfile(); + callback(); + }); +} + +function setupProfile() { + $(".player-nickname").text(playerProfile.name); + $("#player-level-badge").text("Lv. " + playerProfile.level * 1); + $("#player-level-badge").addClass("bg-color-" + SETTINGS["teams"][playerProfile.teamid]["color"]); + $("#player-level-badge").addClass("text-color-" + SETTINGS["teams"][playerProfile.teamid]["textcolor"]); + app.progressbar.set($("#player-healthbar"), (playerProfile.energy / playerProfile.maxenergy) * 100, 500); +} + +function scanCode() { + if (platform_type != "cordova") { + app.dialog.alert("You can't scan barcodes with this device.", "Sorry!"); + } + cordova.plugins.barcodeScanner.scan( + function (result) { + if (!result.cancelled) { + callAPI("code", { + username: localStorage.getItem("username"), + password: localStorage.getItem("password"), + code: result.text + }, function (resp) { + if (resp.item == "" && resp.munzee == "") { + app.dialog.alert("You didn't find anything new.", ""); + } else { + if (resp.item == "") { + $("#founditem-block").addClass("display-none"); + } else { + $("#founditem-name").text(resp.item); + $("#founditem-block").removeClass("display-none"); + } + if (resp.munzee == "") { + $("#foundmunzee-block").addClass("display-none"); + } else { + $("#foundmunzee-name").text(resp.munzee); + $("#foundmunzee-block").removeClass("display-none"); + } + app.popup.open("#founditem-popup"); + } + }, function (msg) { + app.dialog.alert(msg, "Error"); + }); + } + }, + function (error) { + app.dialog.alert(error, "Scan Error"); + }, + { + showTorchButton: true, + prompt: "Find a code", + resultDisplayDuration: 0, + disableSuccessBeep: true + } + ); +} \ No newline at end of file diff --git a/www/js/main.js b/www/js/main.js new file mode 100644 index 0000000..3fdeba3 --- /dev/null +++ b/www/js/main.js @@ -0,0 +1,92 @@ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ + +var $$ = Dom7; + +// Detect platform and run platform-specific setup code +// for Cordova, NW.js, or the browser +initPlatform(); + +Template7.global = { + qrenabled: (platform_type == "cordova") +}; + +var app = new Framework7({ + root: "#app", + name: "TerranQuest", + id: "com.netsyms.terranquest.TerranQuest", + theme: platform_theme, + card: { + swipeToClose: false + }, + init: true, + initOnDeviceReady: false, + routes: routes +}); + +var mainView = app.views.create('.view-main', { + url: "/" +}); + +var router = mainView.router; + +function restartApplication() { + window.location = "index.html"; +} + +router.on("pageInit", function (pagedata) { + pagedata.$el.find('script').each(function (el) { + if ($$(this).attr('src')) { + var s = document.createElement('script'); + s.src = $$(this).attr('src'); + $$('head').append(s); + } else { + eval($$(this).text()); + } + }); +}); + +/** + * Check if the saved username and password are valid. + * @param {function} callback A function that will be called with a boolean argument indicating validity. + * @return {undefined} + */ +function checkLogin(callback) { + if (localStorage.getItem("username") === null || localStorage.getItem("password") === null) { + callback(false); + return; + } + + callAPI("ping", { + username: localStorage.getItem("username"), + password: localStorage.getItem("password") + }, function (data) { + callback(true); + }, function (msg) { + callback(false); + }); +} + +if (localStorage.getItem("configured") == null) { + router.navigate("/signin"); +} else { + checkLogin(function (valid) { + if (valid) { + callAPI("playerexists", { + username: localStorage.getItem("username"), + password: localStorage.getItem("password") + }, function (resp) { + if (resp.exists == true) { + router.navigate("/home"); + } else { + router.navigate("/chooseteam"); + } + }, function (msg) { + router.navigate("/signin"); + }); + } else { + router.navigate("/signin"); + } + }); +} \ No newline at end of file diff --git a/www/js/map.js b/www/js/map.js new file mode 100644 index 0000000..bda8c1b --- /dev/null +++ b/www/js/map.js @@ -0,0 +1,86 @@ +/* + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + */ + + +//import mapboxgl from 'mapbox-gl'; +// or "const mapboxgl = require('mapbox-gl');" + +mapboxgl.accessToken = ''; +const map = new mapboxgl.Map({ + container: 'mapbox', + style: SETTINGS['map_style_json'], + attributionControl: false, + pitch: 0, + zoom: 0, + maxZoom: 18 +}); + +map.touchZoomRotate.enable({around: 'center'}); +map.dragPan.disable(); + +function mapEasing(t) { + return t * (2 - t); +} + +gotfirstfix = false; + +watchLocation(function (position) { + if (gotfirstfix) { + setMapLocation(position.coords.latitude, position.coords.longitude); + } else { + animateMapIn(position.coords.latitude, position.coords.longitude, 16, position.coords.heading); + gotfirstfix = true; + } +}, function (error) { + app.toast.show({ + text: ' ' + error, + position: "bottom", + destroyOnClose: true, + closeTimeout: 5000 + }); +}); + +function setMapHeading(heading) { + if (typeof heading == 'number') { + map.easeTo({ + bearing: heading, + easing: mapEasing + }); + } +} + +function setMapLocation(latitude, longitude) { + map.easeTo({ + center: [ + longitude, + latitude + ] + }); +} + +function animateMapIn(latitude, longitude, zoom, heading) { + if (typeof zoom == 'undefined') { + zoom = 15; + } + if (typeof heading == 'undefined') { + heading = 0; + } + map.flyTo({ + center: [ + longitude, + latitude + ], + speed: 0.7, + zoom: zoom, + heading: heading, + pitch: 45 + }); + // Set min zoom after some time to fly in + setTimeout(function () { + map.setMinZoom(15); + map.setPitch(45); + }, 1000); +} \ No newline at end of file diff --git a/www/js/platform.js b/www/js/platform.js new file mode 100644 index 0000000..3ee2d74 --- /dev/null +++ b/www/js/platform.js @@ -0,0 +1,135 @@ +/* + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + */ + +var platform_type = ""; + +var platform_theme = "md"; + +var nw_tray = null; + +var openBrowser = function (url) { + +} + +var getLocation = function (success, error) { + if ("geolocation" in navigator) { + navigator.geolocation.getCurrentPosition(function (position) { + success(position); + }, function (err) { + if (typeof error == "function") { + error(err.message); + } + }, { + enableHighAccuracy: true, + timeout: 5000, + maximumAge: 0 + }); + } else { + if (typeof error == "function") { + error("Location is unavailable."); + } + } +} + +var watchLocation = function (success, error) { + if ("geolocation" in navigator) { + navigator.geolocation.watchPosition(function (position) { + success(position); + }, function (err) { + if (typeof error == "function") { + error(err.message); + } + }, { + enableHighAccuracy: true, + timeout: 5000, + maximumAge: 0 + }); + } else { + if (typeof error == "function") { + error("Location is unavailable."); + } + } +} + +function initCordova() { + platform_type = "cordova"; + + try { + eval('"use strict"; class foo {}'); + } catch (e) { + alert("Your device's webview is out of date and won't work with this app. Please update it."); + } + + // Handle back button to close things + document.addEventListener("backbutton", function (event) { + router.navigate("/home"); + }, false); + + document.addEventListener("deviceready", function () { + app.statusbar.overlaysWebView(true); + StatusBar.backgroundColorByHexString("#000000ff"); + if (cordova.platformId == 'android') { + //StatusBar.backgroundColorByHexString("#324150"); + //StatusBar.styleLightContent(); + } + }, false); + + openBrowser = function (url) { + cordova.InAppBrowser.open(url, '_blank', 'location=yes'); + } +} + +function initNW() { + platform_type = "nw"; + platform_theme = "md"; + + openBrowser = function (url) { + nw.Window.open(url, { + id: url + }, function (browserwin) { + // Add menubar so the user can navigate around if they click a link + var browsermenu = new nw.Menu({type: 'menubar'}); + browsermenu.append(new nw.MenuItem({ + label: "Back", + click: function () { + browserwin.window.history.back(); + } + })); + browsermenu.append(new nw.MenuItem({ + label: "Forward", + click: function () { + browserwin.window.history.forward(); + } + })); + browsermenu.append(new nw.MenuItem({ + label: "Home", + click: function () { + browserwin.window.location.href = url; + } + })); + browserwin.menu = browsermenu; + }); + } +} + +function initBrowser() { + platform_type = "browser"; + platform_theme = "md"; + + openBrowser = function (url) { + window.open(url); + } +} + +function initPlatform() { + if (typeof cordova !== 'undefined') { + initCordova(); + } else if (typeof nw !== 'undefined') { + initNW(); + } else { + initBrowser(); + } +} \ No newline at end of file diff --git a/www/js/signin.js b/www/js/signin.js new file mode 100644 index 0000000..0b6b024 --- /dev/null +++ b/www/js/signin.js @@ -0,0 +1,46 @@ +/* + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + */ + +$('#username').on("keyup", function () { + $('#username').val($('#username').val().toLowerCase()); +}); + +function checkAndSave(username, password) { + app.preloader.show(); + + callAPI("ping", { + username: username, + password: password + }, function (data) { + localStorage.setItem("username", username); + localStorage.setItem("password", password); + localStorage.setItem("configured", true); + callAPI("playerexists", { + username: username, + password: password + }, function (resp) { + app.preloader.hide(); + if (resp.exists == true) { + router.navigate("/home"); + } else { + router.navigate("/chooseteam"); + } + }, function (msg) { + app.preloader.hide(); + app.dialog.alert(msg, "Error"); + }); + }, function (msg) { + app.preloader.hide(); + app.dialog.alert(msg, "Error"); + }); +} + +function setupAccount() { + var username = $("#username").val(); + var password = $("#password").val(); + + checkAndSave(username, password); +} \ No newline at end of file diff --git a/www/package.json b/www/package.json new file mode 100644 index 0000000..70d777d --- /dev/null +++ b/www/package.json @@ -0,0 +1,13 @@ +{ + "name": "TerranQuest", + "version": "2.0.0", + "main": "index.js", + "license": "MPL-2.0", + "dependencies": { + "@fortawesome/fontawesome-free": "^5.8.1", + "framework7": "^4.3.0", + "jquery": "^3.4.0", + "mapbox-gl": "^0.54.0", + "three": "^0.104.0" + } +} diff --git a/www/pages/chooseteam.html b/www/pages/chooseteam.html new file mode 100644 index 0000000..8e2d3e6 --- /dev/null +++ b/www/pages/chooseteam.html @@ -0,0 +1,39 @@ + + +
+ + + + +
+ +
+

+ Your type will affect your strengths, weaknesses, and abilities. Choose wisely. +

+
+ {{#each teams}} +
+
+
+
+

{{name}}

+
+
+
+ {{/each}} +
+ +
+ +
+ + + +
\ No newline at end of file diff --git a/www/pages/home.html b/www/pages/home.html new file mode 100644 index 0000000..fa92814 --- /dev/null +++ b/www/pages/home.html @@ -0,0 +1,92 @@ + + +
+ +
+
+
+ +
+
+
+
+
+ + + + + +
+
+
+ + +
+ + + + + + + + + + +
\ No newline at end of file diff --git a/www/pages/signin.html b/www/pages/signin.html new file mode 100644 index 0000000..03669ca --- /dev/null +++ b/www/pages/signin.html @@ -0,0 +1,66 @@ + + +
+ + + + +
+ +
+
+
+
+ +
+
    +
  • +
    +
    Username
    +
    + + +
    +
    +
  • + +
  • +
    +
    Password
    +
    + + +
    +
    +
  • + +
+
+ +
+
+
+ Sign In +
+
+
+ Create Account +
+ +
+
+
+ +
+ +
+ + + +
\ No newline at end of file diff --git a/www/routes.js b/www/routes.js new file mode 100644 index 0000000..a0ed8dd --- /dev/null +++ b/www/routes.js @@ -0,0 +1,96 @@ +/* + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + */ + + +var routes = [ + { + path: '/home', + templateUrl: './pages/home.html', + name: 'home', + keepAlive: true, + on: { + pageAfterIn: function () { + function tryToLoadHomePage() { + if (typeof loadHomePage != "function") { + setTimeout(tryToLoadHomePage, 500); + } else { + loadHomePage(function () {}); + } + } + tryToLoadHomePage(); + } + } + }, + { + path: '/signin', + url: './pages/signin.html', + name: 'signin' + }, + { + path: '/chooseteam', + templateUrl: './pages/chooseteam.html', + name: 'chooseteam', + options: { + context: { + teams: SETTINGS['teams'] + } + } + }, + { + path: '/settings', + name: 'prefs', + async: function (routeTo, routeFrom, resolve, reject) { + var username = localStorage.getItem("username"); + if (username == null) { + username = "Not logged in"; + } + var serverurl = localStorage.getItem("serverurl"); + if (serverurl == null) { + serverurl = "None"; + } + resolve({ + templateUrl: './pages/settings.html' + }, { + context: { + settings: [{ + setting: "userinfo", + title: ' ' + username + '', + text: '', + onclick: "" + }, + { + setting: "account", + title: "Sign out", + onclick: "router.navigate('/setup/0')" + }, + { + setting: "versions", + title: "TerranQuest v2.0.0", + text: "Copyright © 2018-2019 Netsyms Technologies. License: Mozilla Public License 2.0.", + onclick: "" + }, + { + setting: "opensource", + title: "Open Source Information", + text: "", + onclick: "router.navigate('/credits')" + }, + { + setting: "privacy", + title: "Privacy Policy", + text: "", + onclick: "openBrowser('" + SETTINGS["terms_of_service_url"] + "')" + }] + } + }); + } + }, + { + path: '/credits', + url: './pages/credits.html', + name: 'credits' + } +]; \ No newline at end of file diff --git a/www/settings.template.js b/www/settings.template.js new file mode 100644 index 0000000..286f79c --- /dev/null +++ b/www/settings.template.js @@ -0,0 +1,24 @@ +/* + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + */ + +/** + * Array of global settings. + */ +var SETTINGS = { + server: "http://localhost/terranquest/api", + signup_url: "http://localhost/accounthub/signup/", + terms_of_service_url: "https://netsyms.com/legal?pk_campaign=TerranQuestApp", + map_style_json: "https://maps.netsyms.net/styles/terranquest-3d/style.json", + stripe_pubkey: "", + teams: { + 1: {id: 1, name: "Water", icon: "fas fa-tint", color: "blue", textcolor: "black"}, + 2: {id: 2, name: "Fire", icon: "fas fa-fire", color: "red", textcolor: "black"}, + 3: {id: 3, name: "Earth", icon: "fas fa-mountain", color: "deeporange", textcolor: "black"}, + 4: {id: 4, name: "Wind", icon: "fas fa-wind", color: "lightblue", textcolor: "black"}, + 5: {id: 5, name: "Light", icon: "fas fa-sun", color: "white", textcolor: "black"}, + 6: {id: 6, name: "Dark", icon: "fas fa-moon", color: "black", textcolor: "white"} + } +}; \ No newline at end of file diff --git a/www/yarn.lock b/www/yarn.lock new file mode 100644 index 0000000..854a4d2 --- /dev/null +++ b/www/yarn.lock @@ -0,0 +1,376 @@ +# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. +# yarn lockfile v1 + + +"@fortawesome/fontawesome-free@^5.8.1": + version "5.8.1" + resolved "https://registry.yarnpkg.com/@fortawesome/fontawesome-free/-/fontawesome-free-5.8.1.tgz#cbafbfe8894c4e3e3c3a9da6774e249ac1f2da8b" + integrity sha512-GJtx6e55qLEOy2gPOsok2lohjpdWNGrYGtQx0FFT/++K4SYx+Z8LlPHdQBaFzKEwH5IbBB4fNgb//uyZjgYXoA== + +"@mapbox/geojson-area@0.2.2": + version "0.2.2" + resolved "https://registry.yarnpkg.com/@mapbox/geojson-area/-/geojson-area-0.2.2.tgz#18d7814aa36bf23fbbcc379f8e26a22927debf10" + integrity sha1-GNeBSqNr8j+7zDefjiaiKSfevxA= + dependencies: + wgs84 "0.0.0" + +"@mapbox/geojson-rewind@^0.4.0": + version "0.4.0" + resolved "https://registry.yarnpkg.com/@mapbox/geojson-rewind/-/geojson-rewind-0.4.0.tgz#0d3632d4c1b4a928cf10a06ade387e1c8a8c181b" + integrity sha512-b+1uPWBERW4Pet/969BNu61ZPDyH2ilIxBjJDFzxyS9TyszF9UrTQyYIl/G38clux3rtpAGGFSGTCSF/qR6UjA== + dependencies: + "@mapbox/geojson-area" "0.2.2" + concat-stream "~1.6.0" + minimist "1.2.0" + sharkdown "^0.1.0" + +"@mapbox/geojson-types@^1.0.2": + version "1.0.2" + resolved "https://registry.yarnpkg.com/@mapbox/geojson-types/-/geojson-types-1.0.2.tgz#9aecf642cb00eab1080a57c4f949a65b4a5846d6" + integrity sha512-e9EBqHHv3EORHrSfbR9DqecPNn+AmuAoQxV6aL8Xu30bJMJR1o8PZLZzpk1Wq7/NfCbuhmakHTPYRhoqLsXRnw== + +"@mapbox/jsonlint-lines-primitives@^2.0.2": + version "2.0.2" + resolved "https://registry.yarnpkg.com/@mapbox/jsonlint-lines-primitives/-/jsonlint-lines-primitives-2.0.2.tgz#ce56e539f83552b58d10d672ea4d6fc9adc7b234" + integrity sha1-zlblOfg1UrWNENZy6k1vya3HsjQ= + +"@mapbox/mapbox-gl-supported@^1.4.0": + version "1.4.0" + resolved "https://registry.yarnpkg.com/@mapbox/mapbox-gl-supported/-/mapbox-gl-supported-1.4.0.tgz#36946b22944fe2cfa43cfafd5ef36fdb54a069e4" + integrity sha512-ZD0Io4XK+/vU/4zpANjOtdWfVszAgnaMPsGR6LKsWh4kLIEv9qoobTVmJPPuwuM+ZI2b3BlZ6DYw1XHVmv6YTA== + +"@mapbox/point-geometry@0.1.0", "@mapbox/point-geometry@^0.1.0", "@mapbox/point-geometry@~0.1.0": + version "0.1.0" + resolved "https://registry.yarnpkg.com/@mapbox/point-geometry/-/point-geometry-0.1.0.tgz#8a83f9335c7860effa2eeeca254332aa0aeed8f2" + integrity sha1-ioP5M1x4YO/6Lu7KJUMyqgru2PI= + +"@mapbox/tiny-sdf@^1.1.0": + version "1.1.0" + resolved "https://registry.yarnpkg.com/@mapbox/tiny-sdf/-/tiny-sdf-1.1.0.tgz#b0b8f5c22005e6ddb838f421ffd257c1f74f9a20" + integrity sha512-dnhyk8X2BkDRWImgHILYAGgo+kuciNYX30CUKj/Qd5eNjh54OWM/mdOS/PWsPeN+3abtN+QDGYM4G220ynVJKA== + +"@mapbox/unitbezier@^0.0.0": + version "0.0.0" + resolved "https://registry.yarnpkg.com/@mapbox/unitbezier/-/unitbezier-0.0.0.tgz#15651bd553a67b8581fb398810c98ad86a34524e" + integrity sha1-FWUb1VOme4WB+zmIEMmK2Go0Uk4= + +"@mapbox/vector-tile@^1.3.1": + version "1.3.1" + resolved "https://registry.yarnpkg.com/@mapbox/vector-tile/-/vector-tile-1.3.1.tgz#d3a74c90402d06e89ec66de49ec817ff53409666" + integrity sha512-MCEddb8u44/xfQ3oD+Srl/tNcQoqTw3goGk2oLsrFxOTc3dUp+kAnby3PvAeeBYSMSjSPD1nd1AJA6W49WnoUw== + dependencies: + "@mapbox/point-geometry" "~0.1.0" + +"@mapbox/whoots-js@^3.1.0": + version "3.1.0" + resolved "https://registry.yarnpkg.com/@mapbox/whoots-js/-/whoots-js-3.1.0.tgz#497c67a1cef50d1a2459ba60f315e448d2ad87fe" + integrity sha512-Es6WcD0nO5l+2BOQS4uLfNPYQaNDfbot3X1XUoloz+x0mPDS3eeORZJl06HXjwBG1fOGwCRnzK88LMdxKRrd6Q== + +ansicolors@~0.2.1: + version "0.2.1" + resolved "https://registry.yarnpkg.com/ansicolors/-/ansicolors-0.2.1.tgz#be089599097b74a5c9c4a84a0cdbcdb62bd87aef" + integrity sha1-vgiVmQl7dKXJxKhKDNvNtivYeu8= + +buffer-from@^1.0.0: + version "1.1.1" + resolved "https://registry.yarnpkg.com/buffer-from/-/buffer-from-1.1.1.tgz#32713bc028f75c02fdb710d7c7bcec1f2c6070ef" + integrity sha512-MQcXEUbCKtEo7bhqEs6560Hyd4XaovZlO/k9V3hjVUF/zwW7KBVdSK4gIt/bzwS9MbR5qob+F5jusZsb0YQK2A== + +cardinal@~0.4.2: + version "0.4.4" + resolved "https://registry.yarnpkg.com/cardinal/-/cardinal-0.4.4.tgz#ca5bb68a5b511b90fe93b9acea49bdee5c32bfe2" + integrity sha1-ylu2iltRG5D+k7ms6km97lwyv+I= + dependencies: + ansicolors "~0.2.1" + redeyed "~0.4.0" + +concat-stream@~1.6.0: + version "1.6.2" + resolved "https://registry.yarnpkg.com/concat-stream/-/concat-stream-1.6.2.tgz#904bdf194cd3122fc675c77fc4ac3d4ff0fd1a34" + integrity sha512-27HBghJxjiZtIk3Ycvn/4kbJk/1uZuJFfuPEns6LaEvpvG1f0hTea8lilrouyo9mVc2GWdcEZ8OLoGmSADlrCw== + dependencies: + buffer-from "^1.0.0" + inherits "^2.0.3" + readable-stream "^2.2.2" + typedarray "^0.0.6" + +core-util-is@~1.0.0: + version "1.0.2" + resolved "https://registry.yarnpkg.com/core-util-is/-/core-util-is-1.0.2.tgz#b5fd54220aa2bc5ab57aab7140c940754503c1a7" + integrity sha1-tf1UIgqivFq1eqtxQMlAdUUDwac= + +csscolorparser@~1.0.2: + version "1.0.3" + resolved "https://registry.yarnpkg.com/csscolorparser/-/csscolorparser-1.0.3.tgz#b34f391eea4da8f3e98231e2ccd8df9c041f171b" + integrity sha1-s085HupNqPPpgjHizNjfnAQfFxs= + +dom7@^2.1.3: + version "2.1.3" + resolved "https://registry.yarnpkg.com/dom7/-/dom7-2.1.3.tgz#a736f9c3bfbc4ca039a81cd095f97d1d7f3de19c" + integrity sha512-QTxHHDox+M6ZFz1zHPAHZKI3JOHY5iY4i9BK2uctlggxKQwRhO3q3HHFq1BKsT25Bm/ySSj70K6Wk/G4bs9rMQ== + dependencies: + ssr-window "^1.0.1" + +earcut@^2.1.5: + version "2.1.5" + resolved "https://registry.yarnpkg.com/earcut/-/earcut-2.1.5.tgz#829280a9a3a0f5fee0529f0a47c3e4eff09b21e4" + integrity sha512-QFWC7ywTVLtvRAJTVp8ugsuuGQ5mVqNmJ1cRYeLrSHgP3nycr2RHTJob9OtM0v8ujuoKN0NY1a93J/omeTL1PA== + +esm@~3.0.84: + version "3.0.84" + resolved "https://registry.yarnpkg.com/esm/-/esm-3.0.84.tgz#bb108989f4673b32d4f62406869c28eed3815a63" + integrity sha512-SzSGoZc17S7P+12R9cg21Bdb7eybX25RnIeRZ80xZs+VZ3kdQKzqTp2k4hZJjR7p9l0186TTXSgrxzlMDBktlw== + +esprima@~1.0.4: + version "1.0.4" + resolved "https://registry.yarnpkg.com/esprima/-/esprima-1.0.4.tgz#9f557e08fc3b4d26ece9dd34f8fbf476b62585ad" + integrity sha1-n1V+CPw7TSbs6d00+Pv0drYlha0= + +framework7@^4.3.0: + version "4.3.0" + resolved "https://registry.yarnpkg.com/framework7/-/framework7-4.3.0.tgz#b0e368d00b60b65c6e3fc7880aa43304e2e05587" + integrity sha512-Z+jJwi/0piXFgvlpo5qHWJb9mGfWyVKSbtRCnjxOcavB5TBFBB+Lnym+Q//Aaml+hO1vhXximo2M7R9mYVhJ+g== + dependencies: + dom7 "^2.1.3" + path-to-regexp "^3.0.0" + ssr-window "^1.0.1" + template7 "^1.4.1" + +geojson-vt@^3.2.1: + version "3.2.1" + resolved "https://registry.yarnpkg.com/geojson-vt/-/geojson-vt-3.2.1.tgz#f8adb614d2c1d3f6ee7c4265cad4bbf3ad60c8b7" + integrity sha512-EvGQQi/zPrDA6zr6BnJD/YhwAkBP8nnJ9emh3EnHQKVMfg/MRVtPbMYdgVy/IaEmn4UfagD2a6fafPDL5hbtwg== + +gl-matrix@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/gl-matrix/-/gl-matrix-3.0.0.tgz#888301ac7650e148c3865370e13ec66d08a8381f" + integrity sha512-PD4mVH/C/Zs64kOozeFnKY8ybhgwxXXQYGWdB4h68krAHknWJgk9uKOn6z8YElh5//vs++90pb6csrTIDWnexA== + +grid-index@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/grid-index/-/grid-index-1.1.0.tgz#97f8221edec1026c8377b86446a7c71e79522ea7" + integrity sha512-HZRwumpOGUrHyxO5bqKZL0B0GlUpwtCAzZ42sgxUPniu33R1LSFH5yrIcBCHjkctCAh3mtWKcKd9J4vDDdeVHA== + +ieee754@^1.1.12: + version "1.1.13" + resolved "https://registry.yarnpkg.com/ieee754/-/ieee754-1.1.13.tgz#ec168558e95aa181fd87d37f55c32bbcb6708b84" + integrity sha512-4vf7I2LYV/HaWerSo3XmlMkp5eZ83i+/CDluXi/IGTs/O1sejBNhTtnxzmRZfvOUqj7lZjqHkeTvpgSFDlWZTg== + +inherits@^2.0.3, inherits@~2.0.3: + version "2.0.3" + resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.3.tgz#633c2c83e3da42a502f52466022480f4208261de" + integrity sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4= + +isarray@~1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/isarray/-/isarray-1.0.0.tgz#bb935d48582cba168c06834957a54a3e07124f11" + integrity sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE= + +jquery@^3.4.0: + version "3.4.0" + resolved "https://registry.yarnpkg.com/jquery/-/jquery-3.4.0.tgz#8de513fa0fa4b2c7d2e48a530e26f0596936efdf" + integrity sha512-ggRCXln9zEqv6OqAGXFEcshF5dSBvCkzj6Gm2gzuR5fWawaX8t7cxKVkkygKODrDAzKdoYw3l/e3pm3vlT4IbQ== + +kdbush@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/kdbush/-/kdbush-3.0.0.tgz#f8484794d47004cc2d85ed3a79353dbe0abc2bf0" + integrity sha512-hRkd6/XW4HTsA9vjVpY9tuXJYLSlelnkTmVFu4M9/7MIYQtFcHpbugAU7UbOfjOiVSVYl2fqgBuJ32JUmRo5Ew== + +mapbox-gl@^0.54.0: + version "0.54.0" + resolved "https://registry.yarnpkg.com/mapbox-gl/-/mapbox-gl-0.54.0.tgz#f6cb96ecb8e64276a8ed2fe4a4f213fabab4123e" + integrity sha512-wCcSlxO3wqYYo4nFXuR0HNi10Xkz2mYQ3szFAxYpWP1mzyC81f/u3HU5oa2JzJTWgSxkqQXTC9u48D0wO3PTfw== + dependencies: + "@mapbox/geojson-rewind" "^0.4.0" + "@mapbox/geojson-types" "^1.0.2" + "@mapbox/jsonlint-lines-primitives" "^2.0.2" + "@mapbox/mapbox-gl-supported" "^1.4.0" + "@mapbox/point-geometry" "^0.1.0" + "@mapbox/tiny-sdf" "^1.1.0" + "@mapbox/unitbezier" "^0.0.0" + "@mapbox/vector-tile" "^1.3.1" + "@mapbox/whoots-js" "^3.1.0" + csscolorparser "~1.0.2" + earcut "^2.1.5" + esm "~3.0.84" + geojson-vt "^3.2.1" + gl-matrix "^3.0.0" + grid-index "^1.1.0" + minimist "0.0.8" + murmurhash-js "^1.0.0" + pbf "^3.0.5" + potpack "^1.0.1" + quickselect "^2.0.0" + rw "^1.3.3" + supercluster "^6.0.1" + tinyqueue "^2.0.0" + vt-pbf "^3.1.1" + +minimist@0.0.5: + version "0.0.5" + resolved "https://registry.yarnpkg.com/minimist/-/minimist-0.0.5.tgz#d7aa327bcecf518f9106ac6b8f003fa3bcea8566" + integrity sha1-16oye87PUY+RBqxrjwA/o7zqhWY= + +minimist@0.0.8: + version "0.0.8" + resolved "https://registry.yarnpkg.com/minimist/-/minimist-0.0.8.tgz#857fcabfc3397d2625b8228262e86aa7a011b05d" + integrity sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0= + +minimist@1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.0.tgz#a35008b20f41383eec1fb914f4cd5df79a264284" + integrity sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ= + +murmurhash-js@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/murmurhash-js/-/murmurhash-js-1.0.0.tgz#b06278e21fc6c37fa5313732b0412bcb6ae15f51" + integrity sha1-sGJ44h/Gw3+lMTcysEEry2rhX1E= + +path-to-regexp@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/path-to-regexp/-/path-to-regexp-3.0.0.tgz#c981a218f3df543fa28696be2f88e0c58d2e012a" + integrity sha512-ZOtfhPttCrqp2M1PBBH4X13XlvnfhIwD7yCLx+GoGoXRPQyxGOTdQMpIzPSPKXAJT/JQrdfFrgdJOyAzvgpQ9A== + +pbf@^3.0.5: + version "3.2.0" + resolved "https://registry.yarnpkg.com/pbf/-/pbf-3.2.0.tgz#e76f9f5114e395c25077ad6fe463b3507d6877fc" + integrity sha512-98Eh7rsJNJF/Im6XYMLaOW3cLnNyedlOd6hu3iWMD5I7FZGgpw8yN3vQBrmLbLodu7G784Irb9Qsv2yFrxSAGw== + dependencies: + ieee754 "^1.1.12" + resolve-protobuf-schema "^2.1.0" + +potpack@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/potpack/-/potpack-1.0.1.tgz#d1b1afd89e4c8f7762865ec30bd112ab767e2ebf" + integrity sha512-15vItUAbViaYrmaB/Pbw7z6qX2xENbFSTA7Ii4tgbPtasxm5v6ryKhKtL91tpWovDJzTiZqdwzhcFBCwiMVdVw== + +process-nextick-args@~2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/process-nextick-args/-/process-nextick-args-2.0.0.tgz#a37d732f4271b4ab1ad070d35508e8290788ffaa" + integrity sha512-MtEC1TqN0EU5nephaJ4rAtThHtC86dNN9qCuEhtshvpVBkAW5ZO7BASN9REnF9eoXGcRub+pFuKEpOHE+HbEMw== + +protocol-buffers-schema@^3.3.1: + version "3.3.2" + resolved "https://registry.yarnpkg.com/protocol-buffers-schema/-/protocol-buffers-schema-3.3.2.tgz#00434f608b4e8df54c59e070efeefc37fb4bb859" + integrity sha512-Xdayp8sB/mU+sUV4G7ws8xtYMGdQnxbeIfLjyO9TZZRJdztBGhlmbI5x1qcY4TG5hBkIKGnc28i7nXxaugu88w== + +quickselect@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/quickselect/-/quickselect-2.0.0.tgz#f19680a486a5eefb581303e023e98faaf25dd018" + integrity sha512-RKJ22hX8mHe3Y6wH/N3wCM6BWtjaxIyyUIkpHOvfFnxdI4yD4tBXEBKSbriGujF6jnSVkJrffuo6vxACiSSxIw== + +readable-stream@^2.2.2: + version "2.3.6" + resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.3.6.tgz#b11c27d88b8ff1fbe070643cf94b0c79ae1b0aaf" + integrity sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw== + dependencies: + core-util-is "~1.0.0" + inherits "~2.0.3" + isarray "~1.0.0" + process-nextick-args "~2.0.0" + safe-buffer "~5.1.1" + string_decoder "~1.1.1" + util-deprecate "~1.0.1" + +redeyed@~0.4.0: + version "0.4.4" + resolved "https://registry.yarnpkg.com/redeyed/-/redeyed-0.4.4.tgz#37e990a6f2b21b2a11c2e6a48fd4135698cba97f" + integrity sha1-N+mQpvKyGyoRwuakj9QTVpjLqX8= + dependencies: + esprima "~1.0.4" + +resolve-protobuf-schema@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/resolve-protobuf-schema/-/resolve-protobuf-schema-2.1.0.tgz#9ca9a9e69cf192bbdaf1006ec1973948aa4a3758" + integrity sha512-kI5ffTiZWmJaS/huM8wZfEMer1eRd7oJQhDuxeCLe3t7N7mX3z94CN0xPxBQxFYQTSNz9T0i+v6inKqSdK8xrQ== + dependencies: + protocol-buffers-schema "^3.3.1" + +rw@^1.3.3: + version "1.3.3" + resolved "https://registry.yarnpkg.com/rw/-/rw-1.3.3.tgz#3f862dfa91ab766b14885ef4d01124bfda074fb4" + integrity sha1-P4Yt+pGrdmsUiF700BEkv9oHT7Q= + +safe-buffer@~5.1.0, safe-buffer@~5.1.1: + version "5.1.2" + resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.1.2.tgz#991ec69d296e0313747d59bdfd2b745c35f8828d" + integrity sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g== + +sharkdown@^0.1.0: + version "0.1.1" + resolved "https://registry.yarnpkg.com/sharkdown/-/sharkdown-0.1.1.tgz#64484bd0f08f347f8319e9ff947a670f6b48b1b2" + integrity sha512-exwooSpmo5s45lrexgz6Q0rFQM574wYIX3iDZ7RLLqOb7IAoQZu9nxlZODU972g19sR69OIpKP2cpHTzU+PHIg== + dependencies: + cardinal "~0.4.2" + minimist "0.0.5" + split "~0.2.10" + +split@~0.2.10: + version "0.2.10" + resolved "https://registry.yarnpkg.com/split/-/split-0.2.10.tgz#67097c601d697ce1368f418f06cd201cf0521a57" + integrity sha1-Zwl8YB1pfOE2j0GPBs0gHPBSGlc= + dependencies: + through "2" + +ssr-window@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/ssr-window/-/ssr-window-1.0.1.tgz#30752a6a4666e7767f0b7e6aa6fc2fdbd0d9b369" + integrity sha512-dgFqB+f00LJTEgb6UXhx0h+SrG50LJvti2yMKMqAgzfUmUXZrLSv2fjULF7AWGwK25EXu8+smLR3jYsJQChPsg== + +string_decoder@~1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-1.1.1.tgz#9cf1611ba62685d7030ae9e4ba34149c3af03fc8" + integrity sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg== + dependencies: + safe-buffer "~5.1.0" + +supercluster@^6.0.1: + version "6.0.1" + resolved "https://registry.yarnpkg.com/supercluster/-/supercluster-6.0.1.tgz#4c0177d96daa195d58a5bad9f55dbf12fb727a4c" + integrity sha512-NTth/FBFUt9mwW03+Z6Byscex+UHu0utroIe6uXjGu9PrTuWtW70LYv9I1vPSYYIHQL74S5zAkrXrHEk0L7dGA== + dependencies: + kdbush "^3.0.0" + +template7@^1.4.1: + version "1.4.1" + resolved "https://registry.yarnpkg.com/template7/-/template7-1.4.1.tgz#c3b2b03d6879e1c5f8a79067c961c8896ffaeec6" + integrity sha512-sYZ9Wl5kFuNSvLcMPq8z4oenG7rDho6KnB2vWyvMJCdI1guJhxTEU0TCwr6Nd1Jx34kSOmrpJakMGxJgCc55yg== + +three@^0.104.0: + version "0.104.0" + resolved "https://registry.yarnpkg.com/three/-/three-0.104.0.tgz#9ad1da492153b753a89e0df066631215bd9d9087" + integrity sha512-q617IMBC5k40U2E9UC4/LtmhzTOOLB1jGMIooUL+QrhZ7abiGCSDrKrpCDt9V8RTl6xw+0FYfA1PYsIPKbQOgg== + +through@2: + version "2.3.8" + resolved "https://registry.yarnpkg.com/through/-/through-2.3.8.tgz#0dd4c9ffaabc357960b1b724115d7e0e86a2e1f5" + integrity sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU= + +tinyqueue@^2.0.0: + version "2.0.2" + resolved "https://registry.yarnpkg.com/tinyqueue/-/tinyqueue-2.0.2.tgz#b4fe66d28a5b503edb99c149f87910059782a0cc" + integrity sha512-1oUV+ZAQaeaf830ui/p5JZpzGBw46qs1pKHcfqIc6/QxYDQuEmcBLIhiT0xAxLnekz+qxQusubIYk4cAS8TB2A== + +typedarray@^0.0.6: + version "0.0.6" + resolved "https://registry.yarnpkg.com/typedarray/-/typedarray-0.0.6.tgz#867ac74e3864187b1d3d47d996a78ec5c8830777" + integrity sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c= + +util-deprecate@~1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/util-deprecate/-/util-deprecate-1.0.2.tgz#450d4dc9fa70de732762fbd2d4a28981419a0ccf" + integrity sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8= + +vt-pbf@^3.1.1: + version "3.1.1" + resolved "https://registry.yarnpkg.com/vt-pbf/-/vt-pbf-3.1.1.tgz#b0f627e39a10ce91d943b898ed2363d21899fb82" + integrity sha512-pHjWdrIoxurpmTcbfBWXaPwSmtPAHS105253P1qyEfSTV2HJddqjM+kIHquaT/L6lVJIk9ltTGc0IxR/G47hYA== + dependencies: + "@mapbox/point-geometry" "0.1.0" + "@mapbox/vector-tile" "^1.3.1" + pbf "^3.0.5" + +wgs84@0.0.0: + version "0.0.0" + resolved "https://registry.yarnpkg.com/wgs84/-/wgs84-0.0.0.tgz#34fdc555917b6e57cf2a282ed043710c049cdc76" + integrity sha1-NP3FVZF7blfPKigu0ENxDASc3HY=