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M,WAAYC,GAAI,WAAYL,IAAK,IACzC,CAAEI,KAAM,WAAYC,GAAI,WAAYL,IAAKD,EAAE,OAC3C,CAAEK,KAAM,OAAQC,GAAI,OAAQL,IAAK,IACjC,CAAEI,KAAM,oBAAqBC,GAAI,oBAAqBL,IAAK,GAC3D,CAAEI,KAAM,cAAeC,GAAI,cAAeL,IAAK,IAC/C,CAAEI,KAAM,cAAeC,GAAI,cAAeL,IAAK,IAC/C,CAAEI,KAAM,gBAAiBC,GAAI,gBAAiBL,IAAK,IACnD,CAAEI,KAAM,OAAQC,GAAI,OAAQL,IAAKD,EAAE,KACnC,CAAEK,KAAM,OAAQC,GAAI,OAAQL,IAAKna,EAAE,SACnC,CAAEua,KAAM,iBAAiBC,GAAI,iBAAkBL,IAAK,MACnD,GACcE,EAAE,CACjB,CAAEE,KAAM,kBAAmBC,GAAI,kBAAmBL,IAAK,IACvD,CAAEI,KAAM,WAAYC,GAAI,WAAYL,IAAK,GACzC,CAAEI,KAAM,IAAKC,GAAI,IAAKL,IAAK,MAC1B,E","sources":["webpack://app/./app/webpack/src/analytics/freshchat.js","webpack://app/./app/webpack/src/analytics/mixpanel.js","webpack://app/./app/webpack/src/purchases/Purchases.vue?2b0e","webpack://app/app/webpack/src/purchases/Purchases.vue","webpack://app/./app/webpack/src/purchases/Purchases.vue?8c75","webpack://app/./app/webpack/src/purchases/Purchases.vue","webpack://app/./app/webpack/src/purchases/main.ts","webpack://app/./app/webpack/src/application.js","webpack://app/./app/webpack/src/navbar/App.vue?545d","webpack://app/app/webpack/src/navbar/App.vue","webpack://app/./app/webpack/src/navbar/App.vue?3a28","webpack://app/./app/webpack/src/navbar/App.vue","webpack://app/./app/webpack/src/navbar/main.js","webpack://app/./app/webpack/src/splide/app.js","webpack://app/./app/webpack/src/utils/lozad.js","webpack://app/./app/webpack/src/utils/sale_countdown/main.js","webpack://app/./app/webpack/src/base_map_styles_dialog/store/modules/BaseMapStylesDialogModule.ts","webpack://app/./app/webpack/src/utils/helpers/TrailPreview.ts","webpack://app/./app/webpack/src/flyover_preview/FlyoverPreview.vue?87eb","webpack://app/app/webpack/src/flyover_preview/FlyoverPreview.vue","webpack://app/./app/webpack/src/flyover_preview/FlyoverPreview.vue?59a2","webpack://app/./app/webpack/src/flyover_preview/FlyoverPreview.vue","webpack://app/./app/webpack/src/flyover_preview/main.ts","webpack://app/./app/webpack/src/utils/helpers/MeasurementPref.ts","webpack://app/./app/webpack/src/utils/graphql/map-styles-graph.ts","webpack://app/./app/webpack/src/utils/models/MapStyles.ts","webpack://app/./app/webpack/src/utils/models/TypesenseResponse.ts"],"sourcesContent":["if (window.user && window.fcWidget) {\n window.fcWidget.setExternalId(window.user.firebase_user_id);\n window.fcWidget.user.setEmail(window.user.email);\n}\n","window.mixpanel.init(window.mixpanelKey, { debug: true, track_pageview: true, persistence: 'localStorage' });\n\nif (window.user) {\n window.mixpanel.identify(window.user.firebase_user_id);\n}\n","import mod from \"-!../../../../node_modules/babel-loader/lib/index.js!../../../../node_modules/babel-loader/lib/index.js??clonedRuleSet-9.use[0]!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Purchases.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../../../node_modules/babel-loader/lib/index.js!../../../../node_modules/babel-loader/lib/index.js??clonedRuleSet-9.use[0]!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Purchases.vue?vue&type=script&lang=js&\"","\n\n\n\n\n","import { render, staticRenderFns } from \"./Purchases.vue?vue&type=template&id=4242294c&scoped=true&\"\nimport script from \"./Purchases.vue?vue&type=script&lang=js&\"\nexport * from \"./Purchases.vue?vue&type=script&lang=js&\"\nimport style0 from \"./Purchases.vue?vue&type=style&index=0&id=4242294c&prod&scoped=true&lang=css&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n \"4242294c\",\n null\n \n)\n\nexport default component.exports","var render = function render(){var _vm=this,_c=_vm._self._c;return _c('div',{staticClass:\"col-12 col-lg-9\"},[(_vm.upgradeSucceeded)?_c('div',{staticClass:\"container py-3 rounded-lg\"},[_vm._m(0)]):_vm._e(),_vm._v(\" \"),_vm._m(1),_vm._v(\" \"),_c('p',{staticClass:\"text-muted mb-3\"},[_c('b',[_vm._v(\"Data correct as of:\")]),_vm._v(\"\\n \"+_vm._s(_vm.formatDate(_vm.revenueCatData.requestDate))+\"\\n \")]),_vm._v(\" \"),_c('div',{staticClass:\"container bg-dark py-3 rounded-lg\"},[(!_vm.hasActiveEntitlements)?_c('div',{staticClass:\"row\"},[_c('div',{staticClass:\"col-3\"},[_c('img',{staticClass:\"img-fluid rounded\",attrs:{\"src\":_vm.freeImage}})]),_vm._v(\" \"),_c('div',{staticClass:\"col-9 d-flex align-items-center\"},[_c('span',[_vm._m(2),_vm._v(\" \"),_c('p',[_c('a',{staticClass:\"text-yellow p-0 d-flex align-items-center\",attrs:{\"href\":_vm.purchasesPath}},[_vm._v(\"\\n Check out our latest offers!\\n \"),_c('span',{staticClass:\"material-icons ml-2\"},[_vm._v(\"arrow_right_alt\")])])])])])]):_c('div',_vm._l((_vm.activeEntitlements),function(entitlement,key){return _c('div',{key:key,staticClass:\"row mb-4\"},[_c('div',{staticClass:\"col-3\"},[_c('img',{staticClass:\"img-fluid rounded\",attrs:{\"src\":_vm.subscriptionImage(entitlement.identifier)}})]),_vm._v(\" \"),_c('div',{staticClass:\"col-9 d-flex align-items-center\"},[_c('span',[_c('h4',{staticClass:\"display-5 mb-3\"},[_c('b',[_vm._v(\"Hiiker \"+_vm._s(entitlement.identifier))]),_vm._v(\" \"),_c('span',{staticClass:\"badge bg-info ms-2\"},[_vm._v(_vm._s(_vm.subscriptionTypeBadge(entitlement)))])]),_vm._v(\" \"),_c('div',{staticClass:\"subscription-details\"},[(entitlement.originalPurchaseDate)?_c('p',{staticClass:\"text-muted\"},[_c('b',[_vm._v(\"Start Date:\")]),_vm._v(\"\\n \"+_vm._s(_vm.formatDate(entitlement.originalPurchaseDate))+\"\\n \")]):_vm._e(),_vm._v(\" \"),(entitlement.expirationDate)?_c('p',{staticClass:\"text-muted\"},[_c('b',[_vm._v(\"Expiry Date:\")]),_vm._v(\"\\n \"+_vm._s(_vm.formatDate(entitlement.expirationDate))+\"\\n \")]):_c('p',{staticClass:\"text-success\"},[_c('b',[_vm._v(\"Lifetime Access\")])]),_vm._v(\" \"),(entitlement.productIdentifier)?_c('p',{staticClass:\"text-muted\"},[_c('b',[_vm._v(\"Product ID:\")]),_vm._v(\" \"),_c('code',[_vm._v(_vm._s(entitlement.productIdentifier))])]):_vm._e(),_vm._v(\" \"),_c('div',{staticClass:\"subscription-links mt-3\"},[(_vm.showManagementLink(entitlement.store))?_c('a',{staticClass:\"text-yellow\",attrs:{\"href\":_vm.managementLink(entitlement.store),\"target\":\"_blank\"}},[_c('u',[_vm._v(\"Manage on \"+_vm._s(_vm.storeName(entitlement.store)))])]):_vm._e()])])])])])}),0)]),_vm._v(\" \"),_c('p',{staticClass:\"text-muted mt-3\"},[_c('b',[_vm._v(\"UserID:\")]),_vm._v(\"\\n \"+_vm._s(_vm.firebaseUserId)+\"\\n \")])])\n}\nvar staticRenderFns = [function (){var _vm=this,_c=_vm._self._c;return _c('div',{staticClass:\"alert alert-primary\"},[_c('h4',[_vm._v(\"Success\")]),_vm._v(\" \"),_c('p',[_vm._v(\"You have upgraded to a yearly subscription.\")])])\n},function (){var _vm=this,_c=_vm._self._c;return _c('h1',{staticClass:\"mb-3 mb-2 display-4\"},[_c('b',[_vm._v(\"Your Subscription\")])])\n},function (){var _vm=this,_c=_vm._self._c;return _c('h4',{staticClass:\"display-5 mb-3\"},[_c('b',[_vm._v(\"You don't have an active subscription!\")])])\n}]\n\nexport { render, staticRenderFns }","// Import necessary styles and libraries\nimport Vue from 'vue';\nimport Purchases from \"./Purchases.vue\";\n\n// Check if the specific element exists in the DOM\nif (document.querySelector('#purchases')) {\n // Create a new Vue instance and mount it to the element\n window.vue = new Vue({\n render: (createElement) => {\n return createElement(Purchases)\n },\n }).$mount('#purchases');\n}\n","import Rails from '@rails/ujs';\nimport 'bootstrap/dist/css/bootstrap.min.css';\nimport { Dropdown } from 'bootstrap';\nimport './css/app.scss';\nimport './splide/app';\nimport './utils/lozad';\nimport './navbar/main';\nimport './utils/sale_countdown/main';\nimport './analytics/analytics';\nimport './on_boarding/main';\nimport {OnBoardingGoal} from \"./utils/models/OnBoardingGoal\";\nimport {AuthMethods} from \"./on_boarding/store/modules/OnBoardingModule\";\nimport './purchases/main.ts';\nimport './utils/bus.ts';\n\n\n// Initialize dropdowns\ndocument.addEventListener('DOMContentLoaded', () => {\n document.querySelectorAll('[data-bs-toggle=\"dropdown\"]').forEach(el => {\n new Dropdown(el);\n });\n});\n\n// DYNAMIC IMPORTING\n// Only import reviews if #new_review is in the viewport and visible\nconst $addReviewButton = document.getElementById('new_review');\nif ($addReviewButton) {\n import('./reviews/main');\n}\n\nRails.start();\n\nconsole.log('Hello World from Hiiker!');\n\n// Attach event listener to the button\nconst giftButton = document.getElementById('giftCheckoutButton');\nif (giftButton) {\n import('./on_boarding/main');\n giftButton.addEventListener('click', function (e) {\n e.preventDefault();\n if (window.user == null) {\n window.onBoardingVue.launchFor(OnBoardingGoal.CreateAccountForPurchase, [AuthMethods.Email])\n return\n } else {\n window.location.href = window.giftCheckoutUrl;\n }\n });\n}\n","import mod from \"-!../../../../node_modules/babel-loader/lib/index.js??clonedRuleSet-9.use[0]!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./App.vue?vue&type=script&lang=ts&\"; export default mod; export * from \"-!../../../../node_modules/babel-loader/lib/index.js??clonedRuleSet-9.use[0]!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./App.vue?vue&type=script&lang=ts&\"","\n\n\n\n\n","import { render, staticRenderFns } from \"./App.vue?vue&type=template&id=6cd00844&scoped=true&\"\nimport script from \"./App.vue?vue&type=script&lang=ts&\"\nexport * from \"./App.vue?vue&type=script&lang=ts&\"\nimport style0 from \"./App.vue?vue&type=style&index=0&id=6cd00844&prod&scoped=true&lang=css&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n \"6cd00844\",\n null\n \n)\n\nexport default component.exports","var render = function render(){var _vm=this,_c=_vm._self._c;return _c('div',{staticClass:\"vue-nav-wrap d-block d-md-flex\"},[(!_vm.isProOrProPlus)?[_c('a',{staticClass:\"btn btn-info btn-sm d-block d-md-inline my-2 mx-2\",attrs:{\"href\":\"/purchases\"}},[_vm._v(\"GET HiiKER PRO+\")])]:_vm._e(),_vm._v(\" \"),(_vm.user)?[_c('span',{staticClass:\"mx-2 d-none d-lg-block\"},[_c('div',{staticClass:\"dropdown\"},[_c('a',{staticClass:\"dropdown-toggle\",attrs:{\"aria-expanded\":\"false\",\"data-bs-toggle\":\"dropdown\",\"type\":\"button\"}},[(_vm.isProOrProPlus)?[_c('img',{staticClass:\"PRO-tag\",attrs:{\"src\":require(\"../img/PRO-PLUS.png\"),\"alt\":\"User pro status indicator.\",\"width\":\"35\"}})]:_vm._e(),_vm._v(\" \"),_c('img',{staticClass:\"rounded-circle img-fluid nav-profile-img\",attrs:{\"alt\":\"User Profile Picture\",\"src\":_vm.user.avatar_url,\"title\":\"Your profile picture\",\"width\":\"60\",\"height\":\"60\"}})],2),_vm._v(\" \"),_vm._m(0),_vm._v(\" \"),_c('div',{staticClass:\"dropdown-menu bg-dark\",attrs:{\"aria-labelledby\":\"dropdownMenuButton\"}},[_vm._m(1),_vm._v(\" \"),(_vm.user.admin)?_c('a',{staticClass:\"dropdown-item d-flex align-items-center\",attrs:{\"href\":\"/admin\"}},[_c('span',{staticClass:\"material-icons mr-2\"},[_vm._v(\"admin_panel_settings\")]),_vm._v(\"\\n Admin\\n \")]):_vm._e(),_vm._v(\" \"),_vm._m(2)])])])]:[_c('a',{staticClass:\"btn btn-secondary btn-sm d-block d-md-inline my-2 mx-2\",attrs:{\"href\":\"/login\"}},[_vm._v(\"LOGIN\")])],_vm._v(\" \"),_c('LoadingDialog',{attrs:{\"show-loading-dialog\":_vm.loading}})],2)\n}\nvar staticRenderFns = [function (){var _vm=this,_c=_vm._self._c;return _c('a',{staticClass:\"badge badge-pill badge-primary dropdown-toggle\",attrs:{\"aria-expanded\":\"false\",\"data-bs-toggle\":\"dropdown\",\"type\":\"button\"}},[_c('span',{staticClass:\"material-icons\"},[_vm._v(\"arrow_drop_down\")])])\n},function (){var _vm=this,_c=_vm._self._c;return _c('a',{staticClass:\"dropdown-item d-flex align-items-center\",attrs:{\"href\":\"/user/profile\"}},[_c('span',{staticClass:\"material-icons mr-2\"},[_vm._v(\"account_circle\")]),_vm._v(\"\\n Profile\\n \")])\n},function (){var _vm=this,_c=_vm._self._c;return _c('a',{staticClass:\"dropdown-item d-flex align-items-center\",attrs:{\"href\":\"/logout\"}},[_c('span',{staticClass:\"material-icons mr-2\"},[_vm._v(\"logout\")]),_vm._v(\"\\n Logout\\n \")])\n}]\n\nexport { render, staticRenderFns }","import Vue from 'vue';\nimport Toasted from 'vue-toasted';\nimport * as bus from '../utils/bus';\nimport App from './App.vue';\n\nVue.use(Toasted);\nVue.config.productionTip = false;\n\nwindow.vue = new Vue({\n render: (h) => h(App),\n beforeCreate() {\n // Instantiate the bus\n bus;\n },\n}).$mount('#dynamic_profile_nav');\n","import Splide, { LOOP } from '@splidejs/splide';\nimport { Grid } from '@splidejs/splide-extension-grid';\nimport '@splidejs/splide/css';\n\n// $(function () {\n// $('[data-bs-toggle=\"tooltip\"]').tooltip()\n// })\n\nconst homeFeatureSliderOptions = {\n direction: 'ttb',\n pagination: false,\n perPage: 1,\n drag: false,\n arrows: false,\n type: 'loop',\n heightRatio: 0.45,\n breakpoints: {\n 1024: {\n heightRatio: 0.5,\n },\n 767: {\n heightRatio: 1.7,\n direction: 'ltr',\n drag: true,\n pagination: true,\n },\n 515: {\n heightRatio: 1.9,\n },\n 420: {\n heightRatio: 2,\n },\n 393: {\n heightRatio: 2.1,\n },\n 373: {\n heightRatio: 2.2,\n },\n },\n};\n\nconst homeSplideNearbyTrails = {\n // rewind: true,\n perPage: 4,\n // fixedWidth: '25%',\n isNavigation: true,\n gap: '20px',\n breakpoints: {\n 1024: {\n perPage: 3,\n },\n 768: {\n perPage: 2,\n },\n 640: {\n fixedWidth: '75%',\n gap: '1em',\n arrows: false,\n pagination: false,\n },\n },\n};\n\nconst trailsSplideOptions = {\n rewind: true,\n perPage: 3,\n gap: '20px',\n perMove: 1,\n breakpoints: {\n 640: {\n type: 'loop',\n perPage: 1.5,\n gap: '1em',\n arrows: false,\n pagination: false,\n },\n },\n};\n\nconst newFeatureSlideOptions = {\n direction: 'ttb',\n height: '17em',\n type: 'loop',\n breakpoints: {\n 1199: {\n height: '15em',\n },\n 991: {\n height: '13em',\n },\n 767: {\n height: '20em',\n },\n },\n};\n\nconst quoteSplideOptions = {\n rewind: true,\n perPage: 4,\n gap: '20px',\n perMove: 1,\n breakpoints: {\n 1024: {\n perPage: 3,\n },\n 768: {\n perPage: 2,\n },\n 640: {\n type: 'loop',\n perPage: 1.5,\n gap: '1em',\n arrows: false,\n pagination: false,\n },\n },\n};\n\nconst purchaseFeatureSplideOptions = {\n rewind: true,\n perPage: 5,\n gap: '30px',\n pagination: false,\n perMove: 1,\n breakpoints: {\n 1024: {\n perPage: 4.5,\n },\n 768: {\n perPage: 4.5,\n arrows: false,\n gap: '1em'\n },\n 640: {\n type: 'loop',\n perPage: 2.5,\n gap: '1em',\n arrows: false,\n pagination: false\n },\n },\n};\n\nconst trailOverviewImages = {\n type : 'loop',\n padding: '8rem',\n gap: '1rem',\n arrows: true,\n breakpoints: {\n 768: {\n padding: '1rem',\n }\n }\n};\n\nconst mapPreviewsSplideOptions = {\n rewind: true,\n perPage: 2.5,\n gap: '10px',\n perMove: 1,\n pagination: false,\n breakpoints: {\n 640: {\n type: 'loop',\n perPage: 2.5,\n gap: '1em',\n arrows: false,\n },\n },\n};\n\nconst homeFeatureSliderElement = document.getElementById('home-feature-slider');\nlet homeFeatureSlider;\n\nif (homeFeatureSliderElement) {\n homeFeatureSlider = new Splide(homeFeatureSliderElement, homeFeatureSliderOptions).mount();\n}\n\n$('#btn-next').on('click', function () {\n console.log('next');\n homeFeatureSlider.go('>');\n});\n\n$('#btn-prev').on('click', function () {\n console.log('prev');\n homeFeatureSlider.go('<');\n});\n\nconst splideNearbyTrails = document.getElementById('splide-nearby-trails');\nif (splideNearbyTrails) {\n new Splide(splideNearbyTrails, homeSplideNearbyTrails).mount();\n}\n\nconst splideTopTrails = document.getElementById('splide-country-top-trails');\nif (splideTopTrails) {\n new Splide(splideTopTrails, trailsSplideOptions).mount();\n}\n\nconst splideCountryLongTrails = document.getElementById('splide-country-long-trails');\nif (splideCountryLongTrails) {\n new Splide(splideCountryLongTrails, trailsSplideOptions).mount();\n}\n\nconst splideCountryShortTrails = document.getElementById('splide-country-short-trails');\nif (splideCountryShortTrails) {\n new Splide(splideCountryShortTrails, trailsSplideOptions).mount();\n}\n\nconst splideCountryDifficultTrails = document.getElementById('splide-country-difficult-trails');\nif (splideCountryDifficultTrails) {\n new Splide(splideCountryDifficultTrails, trailsSplideOptions).mount();\n}\n\nconst newFeatureSlider = document.getElementById('new-feature-slider');\nif (newFeatureSlider) {\n new Splide(newFeatureSlider, newFeatureSlideOptions).mount();\n}\n\nconst splideFreeQuotesSlider = document.getElementById('splide-free-quotes');\nif (splideFreeQuotesSlider) {\n new Splide(splideFreeQuotesSlider, quoteSplideOptions).mount();\n}\n\nconst purchaseFeatureSlider = document.getElementById('purchase-preview-slider');\nif (purchaseFeatureSlider) {\n new Splide(purchaseFeatureSlider, purchaseFeatureSplideOptions).mount();\n}\n\nconst trailOverviewImagesSlider = document.getElementById('trail-overview-slider');\nif (trailOverviewImagesSlider) {\n new Splide(trailOverviewImagesSlider, trailOverviewImages).mount({ Grid });\n}\n\nconst mapPreviewsSplide = document.getElementById('map-preview-slider');\nif (mapPreviewsSplide) {\n new Splide(mapPreviewsSplide, mapPreviewsSplideOptions).mount({ Grid });\n}\n\nconst youtubeModal = document.getElementById('activateYoutubeModal');\nif (youtubeModal) {\n youtubeModal.addEventListener('click', () => {\n const URL = 'https://www.youtube-nocookie.com/embed/rKh-RM_CHQI?loop=1';\n const videoFrame = document.querySelector('.video-frame');\n videoFrame.src = URL;\n });\n}\n\nconsole.log('Splide setup complete');\n\n","import lozad from 'lozad';\n\nconst observer = lozad(); // lazy loads elements with default selector as '.lozad'\nobserver.observe();\n","const closeSaleBannerKey = 'closeSaleBanner';\nconst closeSaleBannerButton = document.getElementById('closeSaleBanner');\n\n// CLoses sale pop up\nfunction closeBanner() {\n const saleElement = document.getElementsByClassName('sale-banner');\n saleElement[0].classList.remove('active');\n\n // Sets local storage value to tomorrows date\n const hideUntilNow = new Date();\n hideUntilNow.setDate(hideUntilNow.getDate() + 1);\n localStorage.setItem(closeSaleBannerKey, hideUntilNow);\n}\n\nfunction updateCountdown() {\n const targetDate = new Date(window.sale_countdown_time);\n const daysBox = document.getElementById('days');\n const hoursBox = document.getElementById('hours');\n const minutesBox = document.getElementById('minutes');\n const secondsBox = document.getElementById('seconds');\n\n const now = new Date();\n let diffInSeconds = Math.floor((targetDate - now) / 1000);\n\n if (diffInSeconds < 0) {\n // Time's up\n daysBox.value = 0;\n hoursBox.value = 0;\n minutesBox.value = 0;\n secondsBox.value = 0;\n return;\n }\n\n const days = Math.floor(diffInSeconds / (60 * 60 * 24));\n diffInSeconds -= days * (60 * 60 * 24);\n const hours = Math.floor(diffInSeconds / (60 * 60));\n diffInSeconds -= hours * (60 * 60);\n const minutes = Math.floor(diffInSeconds / 60);\n diffInSeconds -= minutes * 60;\n const seconds = diffInSeconds;\n\n daysBox.innerHTML = days;\n hoursBox.innerHTML = hours;\n minutesBox.innerHTML = minutes;\n secondsBox.innerHTML = seconds;\n}\n\nif (closeBanner && closeSaleBannerButton) {\n closeSaleBannerButton.addEventListener('click', closeBanner);\n\n // Gets local storage data value (If added)\n const hideUntil = new Date(localStorage.getItem(closeSaleBannerKey) || 0);\n // Todays date time is passed the hideUntil value, show banner again.\n if (new Date() > hideUntil) {\n setTimeout(() => {\n const saleElement = document.getElementsByClassName('sale-banner');\n saleElement[0].classList.add('active');\n }, 4000);\n }\n\n // Start the countdown to a specific date\n setInterval(updateCountdown, 1000);\n}\n","import {HiikerMapStyle, MapStyle} from \"../../../utils/models/MapStyles\";\nimport Vue from \"vue\";\nimport { MapOverlayOption, MapOverlayOptions } from \"../../../utils/models/MapOverlayOptions\";\nimport { Module, ActionTree } from \"vuex\";\n// @ts-ignore\nimport baseMapStyle from \"../../../utils/assets/base_style.json\";\nimport { OverzoomUtility } from \"../../../utils/helpers/OverzoomPreference\";\nimport { RevenueCatUtil } from \"../../../utils/models/RevenueCatUser\";\nimport { OnBoardingGoal } from \"../../../utils/models/OnBoardingGoal\";\nimport getQueryParams from \"../../../utils/helpers/GetQueryParamsHelper\";\nimport {RevenueCatWrapper} from \"../../../utils/RevenueCatWrapper\";\n\nexport class MapStylesState {\n currentMapStyle: HiikerMapStyle | null = null;\n printMapMode: boolean = false;\n}\n\nconst state = Vue.observable(new MapStylesState());\n\nconst actions: ActionTree = {\n async initialiseStore(store) {\n await store.dispatch('setMapStyleFromQueryParams');\n const isProOrProPlus = await RevenueCatWrapper.isProOrProPlus()\n store.state.currentMapStyle = HiikerMapStyle.getCurrentStyle(isProOrProPlus);\n },\n async setMapStyleFromQueryParams({ commit, dispatch }) {\n const params = new URLSearchParams(window.location.search);\n if (params.has('mapStyle')) {\n // You can then get the value of the parameter like so:\n const value = params.get('mapStyle');\n let mapStyle = HiikerMapStyle.fromString(value)\n if (!mapStyle.isPro) {\n mapStyle.saveCurrentStyle()\n setTimeout(() => {\n if (window.map) {\n window.map.setStyle(mapStyle.styleUrl)\n }\n }, 1500)\n return\n }\n const isProOrProPlus = await RevenueCatWrapper.isProOrProPlus()\n if (window.user == null) {\n setTimeout(() => {\n window.onBoardingVue.launchFor(OnBoardingGoal.MapStyles)\n }, 1500)\n return\n }\n if (mapStyle.isPro && !isProOrProPlus) {\n setTimeout(() => {\n window.location.href = '/pricing'\n }, 1500)\n } else {\n mapStyle.saveCurrentStyle()\n setTimeout(() => {\n if (window.map) {\n window.map.setStyle(mapStyle.styleUrl)\n }\n }, 1500)\n }\n }\n },\n}\n\nconst mutations = {\n setCurrentMapStyle(state, mapStyle: HiikerMapStyle) {\n state.currentMapStyle = mapStyle\n },\n setPrintMapMode(state, printMapMode: boolean) {\n state.printMapMode = printMapMode\n }\n}\n\nconst getters = {\n\n}\n\nconst modules = {}\n\nexport default class MapStylesModule implements Module {\n namespaced = true\n state = state\n // @ts-ignore\n actions = actions\n mutations = mutations\n getters = getters\n modules = modules\n}\n","import * as turf from \"@turf/turf\";\nimport mapboxgl from \"mapbox-gl\";\nimport userLocation from \"../../img/user_location_icon.svg\";\n\nconst SPEED_CONFIG = {\n slow: {\n durationPerKm: 8000,\n lookAhead: 10,\n samplingDensity: 0.005,\n maxDegreesPerFrame: 0.15,\n minDegreesPerFrame: 0.05\n },\n medium: {\n durationPerKm: 4000,\n lookAhead: 8,\n samplingDensity: 0.01,\n maxDegreesPerFrame: 0.25,\n minDegreesPerFrame: 0.10\n },\n fast: {\n durationPerKm: 1500,\n lookAhead: 5,\n samplingDensity: 0.02,\n maxDegreesPerFrame: 0.35,\n minDegreesPerFrame: 0.2\n },\n ultrafast: {\n durationPerKm: 800,\n lookAhead: 5,\n samplingDensity: 0.03,\n maxDegreesPerFrame: 0.5,\n minDegreesPerFrame: 0.25\n },\n hyperspeed: {\n durationPerKm: 400,\n lookAhead: 10,\n samplingDensity: 0.04,\n maxDegreesPerFrame: 0.8,\n minDegreesPerFrame: 0.3\n }\n};\n\nconst DEFAULT_CAMERA_OPTIONS = {\n useElevationAwarePitch: true,\n basePitch: 65,\n minPitch: 45,\n maxPitch: 80,\n pitchDamping: 0.1,\n gradientThreshold: 5, // gradient % threshold to adjust pitch\n pitchPerGradientPercent: 1.5,\n elevationLookAheadMultiplier: 1.5,\n downhillPitchMultiplier: 1.8,\n smoothingFactor: 0.85,\n minDegreesPerFrame: 0.1,\n maxDegreesPerFrame: 0.5\n};\n\n// Function to check bearing consistency and compute average if consistent\nfunction getConsistentAverageBearing(bearings) {\n if (bearings.length === 0) return null;\n const radians = bearings.map(b => (b * Math.PI) / 180);\n let sumCos = 0;\n let sumSin = 0;\n for (const r of radians) {\n sumCos += Math.cos(r);\n sumSin += Math.sin(r);\n }\n const C = sumCos / bearings.length;\n const S = sumSin / bearings.length;\n const R = Math.sqrt(C * C + S * S);\n // R > 0.985 corresponds to a small angular spread (~10 degrees standard deviation)\n if (R > 0.985) {\n const avgRad = Math.atan2(sumSin, sumCos);\n let avgDeg = (avgRad * 180 / Math.PI + 360) % 360;\n return avgDeg;\n }\n return null;\n}\n\n/**\n * Smooth, continuous trail preview (with optional distance/elevation callback).\n * Returns an animation controller with methods: pause(), resume(), stop(), fastForward(), rewind(), isPaused()\n */\nexport function previewTrail(\n map,\n trailCoords,\n mode = \"medium\",\n markerOptions = {},\n progressCallback,\n cameraOptions = {}\n) {\n // Merge camera options with defaults\n const camera = { ...DEFAULT_CAMERA_OPTIONS, ...cameraOptions };\n const config = SPEED_CONFIG[mode] || SPEED_CONFIG.medium;\n\n // Ensure each coordinate has elevation (defaulting to 0)\n const coords3d = trailCoords.map(coord =>\n coord.length > 2 ? [coord[0], coord[1], coord[2]] : [coord[0], coord[1], 0]\n );\n\n // Show a \"processing...\" overlay\n const processingEl = document.createElement(\"div\");\n processingEl.style = `\n position:absolute;\n top:10px;\n left:10px;\n background:rgba(0,0,0,0.7);\n color:white;\n padding:5px 10px;\n border-radius:4px;\n z-index:999;\n `;\n processingEl.textContent = \"Processing trail data...\";\n map.getContainer().appendChild(processingEl);\n\n // Precompute cumulative distances (in km) along the trail for elevation interpolation\n const { cumulativeDistKm } = computeCumulativeDistances(coords3d);\n\n // Build a 2D line for turf operations\n const coords2d = coords3d.map(c => [c[0], c[1]]);\n const fullLine = turf.lineString(coords2d);\n\n // Optionally simplify the line if there are many points\n const simplifiedLine = coords2d.length > 1000\n ? turf.simplify(fullLine, { tolerance: 0.0001, highQuality: true })\n : fullLine;\n\n // Compute the total distance (in km)\n const totalDistKm = turf.length(simplifiedLine, { units: \"kilometers\" });\n\n // Sample points at regular intervals along the trail\n const samplingInterval = config.samplingDensity;\n const sampledPoints = sampleTrailLineImproved(simplifiedLine, totalDistKm, samplingInterval);\n\n // For each sampled point, interpolate elevation using the cumulative distances\n sampledPoints.forEach(sp => {\n sp.elevation = getElevationAtDistanceKm(sp.distance, coords3d, cumulativeDistKm);\n });\n\n // Compute bearings and (if enabled) elevation-aware pitch for each sample\n const elevationLookAhead = config.lookAhead * camera.elevationLookAheadMultiplier / 1000;\n for (let i = 0; i < sampledPoints.length; i++) {\n sampledPoints[i].bearing = computeWeightedBearing(simplifiedLine, sampledPoints[i].distance, config.lookAhead);\n sampledPoints[i].pitch = camera.useElevationAwarePitch\n ? computePitchForElevation(coords3d, cumulativeDistKm, sampledPoints[i].distance, elevationLookAhead, camera)\n : camera.basePitch;\n }\n\n // Compute target bearings requiring at least 5 consistent coordinates\n const targetBearings = [];\n for (let i = 0; i < sampledPoints.length; i++) {\n const windowSize = 20;\n const end = Math.min(i + windowSize, sampledPoints.length);\n const bearingsInWindow = sampledPoints.slice(i, end).map(p => p.bearing);\n const avgBearing = getConsistentAverageBearing(bearingsInWindow);\n if (avgBearing !== null) {\n targetBearings[i] = avgBearing;\n } else {\n targetBearings[i] = i > 0 ? targetBearings[i - 1] : sampledPoints[0].bearing;\n }\n sampledPoints[i].targetBearing = targetBearings[i];\n }\n\n // Create/update the progress line layer\n if (!map.getSource(\"progressTrail\")) {\n map.addSource(\"progressTrail\", {\n type: \"geojson\",\n data: turf.lineString([[0, 0], [0, 0]])\n });\n map.addLayer({\n id: \"progressTrail\",\n type: \"line\",\n source: \"progressTrail\",\n layout: { \"line-join\": \"round\", \"line-cap\": \"round\" },\n paint: { \"line-color\": \"#2cc2e3\", \"line-width\": 5 }\n });\n }\n\n // Create the animated marker\n const markerElement = document.createElement(\"div\");\n markerElement.className = \"custom-marker\";\n markerElement.style.backgroundImage = `url(${userLocation})`;\n markerElement.style.width = markerOptions.width || \"30px\";\n markerElement.style.height = markerOptions.height || \"30px\";\n markerElement.style.backgroundSize = \"contain\";\n markerElement.style.backgroundRepeat = \"no-repeat\";\n markerElement.style.backgroundPosition = \"center\";\n const marker = new mapboxgl.Marker({\n element: markerElement,\n rotationAlignment: markerOptions.rotationAlignment || \"map\",\n pitchAlignment: markerOptions.pitchAlignment || \"auto\",\n offset: markerOptions.offset || [0, 0]\n })\n .setLngLat(sampledPoints[0].position)\n .addTo(map);\n\n // Remove processing overlay and jump camera to the starting position\n processingEl.remove();\n map.jumpTo({\n center: sampledPoints[0].position,\n zoom: 14,\n pitch: camera.useElevationAwarePitch ? sampledPoints[0].pitch : camera.basePitch,\n bearing: sampledPoints[0].targetBearing // Use targetBearing\n });\n\n // Total duration based on trail distance and speed configuration\n const totalDuration = totalDistKm * config.durationPerKm;\n\n return animateFullTrailImproved({\n map,\n marker,\n sampledPoints,\n simplifiedLine,\n totalDistKm,\n duration: totalDuration,\n maxDegreesPerFrame: config.maxDegreesPerFrame,\n minDegreesPerFrame: config.minDegreesPerFrame,\n progressCallback,\n cameraOptions: camera\n });\n}\n\n// ---------------------- Internal Utility Functions ---------------------------\n\nfunction computePitchForElevation(coords3d, cumulativeDistKm, currentDistKm, lookAheadKm, cameraOptions) {\n const totalDistKm = cumulativeDistKm[cumulativeDistKm.length - 1];\n const currentElev = getElevationAtDistanceKm(currentDistKm, coords3d, cumulativeDistKm);\n const aheadDist = Math.min(currentDistKm + lookAheadKm, totalDistKm);\n const aheadElev = getElevationAtDistanceKm(aheadDist, coords3d, cumulativeDistKm);\n const horizDist = aheadDist - currentDistKm;\n if (horizDist < 0.001) return cameraOptions.basePitch;\n const gradientPercent = ((aheadElev - currentElev) / (horizDist * 1000)) * 100;\n let pitch = cameraOptions.basePitch;\n if (Math.abs(gradientPercent) > cameraOptions.gradientThreshold) {\n if (gradientPercent > 0) {\n pitch = cameraOptions.basePitch - (gradientPercent - cameraOptions.gradientThreshold) * cameraOptions.pitchPerGradientPercent;\n } else {\n pitch = cameraOptions.basePitch - (Math.abs(gradientPercent) - cameraOptions.gradientThreshold) * cameraOptions.pitchPerGradientPercent * (cameraOptions.downhillPitchMultiplier || 1.0);\n }\n }\n return Math.max(cameraOptions.minPitch, Math.min(cameraOptions.maxPitch, pitch));\n}\n\nfunction computeCumulativeDistances(coords3d) {\n let total2dDistanceKm = 0;\n const cumulativeDistKm = [0];\n for (let i = 1; i < coords3d.length; i++) {\n const p1 = coords3d[i - 1],\n p2 = coords3d[i];\n const segDistKm = turf.distance(turf.point([p1[0], p1[1]]), turf.point([p2[0], p2[1]]), { units: \"kilometers\" });\n total2dDistanceKm += segDistKm;\n cumulativeDistKm.push(total2dDistanceKm);\n }\n return { cumulativeDistKm, total2dDistanceKm };\n}\n\nfunction getElevationAtDistanceKm(distKm, coords3d, cumulativeDistKm) {\n if (distKm >= cumulativeDistKm[cumulativeDistKm.length - 1])\n return coords3d[coords3d.length - 1][2];\n for (let i = 1; i < cumulativeDistKm.length; i++) {\n if (cumulativeDistKm[i] >= distKm) {\n const fraction = (distKm - cumulativeDistKm[i - 1]) / (cumulativeDistKm[i] - cumulativeDistKm[i - 1]);\n return coords3d[i - 1][2] + (coords3d[i][2] - coords3d[i - 1][2]) * fraction;\n }\n }\n return coords3d[coords3d.length - 1][2];\n}\n\nfunction sampleTrailLineImproved(line2D, totalDistKm, samplingInterval) {\n const sampledPoints = [];\n const seenPositions = new Set();\n const numSamples = Math.ceil(totalDistKm / samplingInterval) + 1;\n for (let i = 0; i <= numSamples; i++) {\n const dist = Math.min(i * samplingInterval, totalDistKm);\n const pt = turf.along(line2D, dist, { units: \"kilometers\" });\n const posKey = JSON.stringify(pt.geometry.coordinates.map(c => Math.round(c * 100000) / 100000));\n if (!seenPositions.has(posKey)) {\n seenPositions.add(posKey);\n sampledPoints.push({ position: pt.geometry.coordinates, distance: dist });\n }\n }\n // Ensure first and last points are included\n const startPt = turf.along(line2D, 0, { units: \"kilometers\" });\n const endPt = turf.along(line2D, totalDistKm, { units: \"kilometers\" });\n sampledPoints[0] = { position: startPt.geometry.coordinates, distance: 0 };\n sampledPoints[sampledPoints.length - 1] = { position: endPt.geometry.coordinates, distance: totalDistKm };\n return sampledPoints;\n}\n\nfunction computeWeightedBearing(line2D, distanceKm, lookAheadMeters) {\n const lookAheadKm = lookAheadMeters / 1000;\n const totalDistKm = turf.length(line2D, { units: \"kilometers\" });\n const bearings = [], weights = [];\n for (let ahead = 1; ahead <= 5; ahead++) {\n const segDist = Math.min(distanceKm + (lookAheadKm * ahead) / 3, totalDistKm);\n if (segDist <= distanceKm) continue;\n const startPt = turf.along(line2D, distanceKm, { units: \"kilometers\" });\n const endPt = turf.along(line2D, segDist, { units: \"kilometers\" });\n bearings.push(turf.bearing(startPt, endPt));\n weights.push(1 / ahead);\n }\n return averageBearing(bearings, weights);\n}\n\nfunction averageBearing(bearings, weights) {\n let x = 0, y = 0;\n for (let i = 0; i < bearings.length; i++) {\n const rad = (bearings[i] * Math.PI) / 180;\n x += Math.sin(rad) * weights[i];\n y += Math.cos(rad) * weights[i];\n }\n const avgRad = Math.atan2(x, y);\n let deg = (avgRad * 180) / Math.PI;\n return (deg + 360) % 360;\n}\n\n// -------------------- Animation Function --------------------\n\nfunction animateFullTrailImproved(opts) {\n const {\n map,\n marker,\n sampledPoints,\n simplifiedLine,\n totalDistKm,\n duration,\n maxDegreesPerFrame,\n minDegreesPerFrame,\n progressCallback,\n cameraOptions\n } = opts;\n\n let lastFrameTime = performance.now();\n let currentBearing = sampledPoints[0].targetBearing; // Initialize with targetBearing\n let currentPitch = cameraOptions.useElevationAwarePitch ? sampledPoints[0].pitch : cameraOptions.basePitch;\n let requestId = null;\n let currentT = 0; // normalized progress (0 to 1)\n let paused = false;\n let finished = false;\n let resolveFunc;\n const promise = new Promise(resolve => { resolveFunc = resolve; });\n\n // Update the UI based on currentT\n function updateUI() {\n const currentDistance = totalDistKm * currentT;\n const { before, after } = findSurroundingPoints(currentDistance);\n const factor = (after.distance !== before.distance)\n ? (currentDistance - before.distance) / (after.distance - before.distance)\n : 0;\n const currentPos = interpolatePoints(before.position, after.position, factor);\n const currentElev = interpolateValue(before.elevation, after.elevation, factor);\n // Use targetBearing instead of bearing\n const targetBearing = interpolateAngle(before.targetBearing, after.targetBearing, factor);\n currentBearing = smoothBearingImproved(currentBearing, targetBearing, 16.67, minDegreesPerFrame, maxDegreesPerFrame);\n if (cameraOptions.useElevationAwarePitch) {\n const targetPitch = interpolateValue(before.pitch, after.pitch, factor);\n currentPitch = smoothPitchChange(currentPitch, targetPitch, 16.67, cameraOptions.minDegreesPerFrame, cameraOptions.maxDegreesPerFrame, cameraOptions.smoothingFactor);\n } else {\n currentPitch = cameraOptions.basePitch;\n }\n marker.setLngLat(currentPos);\n map.jumpTo({\n center: currentPos,\n bearing: currentBearing,\n pitch: currentPitch,\n zoom: 14\n });\n const progressCoords = getCoordsUpToDistance(currentDistance);\n map.getSource(\"progressTrail\").setData(turf.lineString(progressCoords));\n if (progressCallback) {\n progressCallback(currentDistance, currentElev, cameraOptions.useElevationAwarePitch ? currentPitch : undefined);\n }\n }\n\n function frame() {\n if (paused) { requestId = null; return; }\n const now = performance.now();\n const deltaT = (now - lastFrameTime) / duration;\n lastFrameTime = now;\n currentT = Math.min(currentT + deltaT, 1);\n updateUI();\n if (currentT < 1) {\n requestId = requestAnimationFrame(frame);\n } else {\n finished = true;\n resolveFunc();\n }\n }\n\n function findSurroundingPoints(distanceKm) {\n let beforeIndex = 0;\n let low = 0, high = sampledPoints.length - 1;\n while (low <= high) {\n const mid = Math.floor((low + high) / 2);\n if (sampledPoints[mid].distance < distanceKm) {\n beforeIndex = mid;\n low = mid + 1;\n } else {\n high = mid - 1;\n }\n }\n const afterIndex = Math.min(beforeIndex + 1, sampledPoints.length - 1);\n return { before: sampledPoints[beforeIndex], after: sampledPoints[afterIndex] };\n }\n\n function interpolatePoints(p1, p2, factor) {\n return [p1[0] + (p2[0] - p1[0]) * factor, p1[1] + (p2[1] - p1[1]) * factor];\n }\n\n function interpolateAngle(a1, a2, factor) {\n let diff = ((a2 - a1 + 180) % 360) - 180;\n if (diff < -180) diff += 360;\n return a1 + diff * factor;\n }\n\n function interpolateValue(v1, v2, factor) {\n return v1 + (v2 - v1) * factor;\n }\n\n function getCoordsUpToDistance(distance) {\n const coords = simplifiedLine.geometry.coordinates;\n const result = [coords[0]];\n let cumulative = 0;\n for (let i = 1; i < coords.length; i++) {\n const segDist = turf.distance(turf.point(coords[i - 1]), turf.point(coords[i]), { units: \"kilometers\" });\n if (cumulative + segDist <= distance) {\n result.push(coords[i]);\n cumulative += segDist;\n } else {\n const fraction = (distance - cumulative) / segDist;\n result.push([\n coords[i - 1][0] + (coords[i][0] - coords[i - 1][0]) * fraction,\n coords[i - 1][1] + (coords[i][1] - coords[i - 1][1]) * fraction\n ]);\n break;\n }\n }\n if (result.length < 2) result.push([...result[0]]);\n return result;\n }\n\n function smoothBearingImproved(current, target, deltaTime, minDeg, maxDeg) {\n const normCurrent = (current + 360) % 360;\n const normTarget = (target + 360) % 360;\n const cwDiff = (normTarget - normCurrent + 360) % 360;\n const ccwDiff = (normCurrent - normTarget + 360) % 360;\n const direction = cwDiff <= ccwDiff ? 1 : -1;\n const diffSize = Math.min(cwDiff, ccwDiff);\n const scale = Math.min(1, diffSize / 90);\n const baseDeg = minDeg + (maxDeg - minDeg) * scale;\n const degPerFrame = baseDeg * (deltaTime / 16.67);\n let newBearing;\n if (direction === 1) {\n newBearing = (cwDiff < degPerFrame) ? normTarget : (normCurrent + degPerFrame) % 360;\n } else {\n newBearing = (ccwDiff < degPerFrame) ? normTarget : (normCurrent - degPerFrame + 360) % 360;\n }\n return ((newBearing + 180) % 360) - 180;\n }\n\n function smoothPitchChange(current, target, deltaTime, minDeg, maxDeg, smoothing = 0.85) {\n const diff = target - current;\n const absDiff = Math.abs(diff);\n if (absDiff < 0.01) return target;\n const scale = Math.min(1, absDiff / 20);\n const baseDeg = minDeg + (maxDeg - minDeg) * scale;\n const maxChange = baseDeg * (deltaTime / 16.67);\n const smoothed = diff > 0 ? Math.min(absDiff, maxChange) : -Math.min(absDiff, maxChange);\n return Math.abs(smoothed) < absDiff ? current + smoothed * (1 - smoothing) : target;\n }\n\n // Start the animation loop\n requestId = requestAnimationFrame(frame);\n\n return {\n pause() {\n paused = true;\n if (requestId) { cancelAnimationFrame(requestId); requestId = null; }\n },\n resume() {\n if (finished || !paused) return;\n paused = false;\n lastFrameTime = performance.now();\n if (!requestId) requestId = requestAnimationFrame(frame);\n },\n stop() {\n if (finished) return;\n finished = true;\n paused = true;\n if (requestId) { cancelAnimationFrame(requestId); requestId = null; }\n resolveFunc();\n },\n isPaused() {\n return paused;\n },\n fastForward() {\n currentT = Math.min(currentT + (1 / totalDistKm), 1);\n updateUI();\n },\n rewind() {\n currentT = Math.max(currentT - (1 / totalDistKm), 0);\n updateUI();\n },\n then(onFulfilled, onRejected) {\n return promise.then(onFulfilled, onRejected);\n },\n destroy() {\n if (requestId) {\n cancelAnimationFrame(requestId);\n requestId = null;\n }\n marker.remove();\n }\n };\n}\n","import mod from \"-!../../../../node_modules/babel-loader/lib/index.js!../../../../node_modules/babel-loader/lib/index.js??clonedRuleSet-9.use[0]!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./FlyoverPreview.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../../../node_modules/babel-loader/lib/index.js!../../../../node_modules/babel-loader/lib/index.js??clonedRuleSet-9.use[0]!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./FlyoverPreview.vue?vue&type=script&lang=js&\"","\n\n\n\n\n","import { render, staticRenderFns } from \"./FlyoverPreview.vue?vue&type=template&id=0732047d&scoped=true&\"\nimport script from \"./FlyoverPreview.vue?vue&type=script&lang=js&\"\nexport * from \"./FlyoverPreview.vue?vue&type=script&lang=js&\"\nimport style0 from \"./FlyoverPreview.vue?vue&type=style&index=0&id=0732047d&prod&scoped=true&lang=css&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n \"0732047d\",\n null\n \n)\n\nexport default component.exports","var render = function render(){var _vm=this,_c=_vm._self._c;return _c('div',[_c('div',{staticClass:\"modal fade overflow-hidden\",attrs:{\"id\":\"mapModal\",\"tabindex\":\"-1\",\"aria-labelledby\":\"mapModalLabel\",\"aria-hidden\":\"true\"}},[_c('div',{staticClass:\"modal-dialog modal-fullscreen\"},[_c('div',{staticClass:\"modal-content\"},[_c('div',{staticClass:\"modal-body position-relative p-0\"},[_c('div',{ref:\"mapContainer\",staticStyle:{\"width\":\"100%\",\"height\":\"100vh\",\"position\":\"relative\"},attrs:{\"id\":\"map\"}},[(_vm.showLabels)?_c('div',{staticClass:\"label-style\"},[_c('div',[_vm._v(\"Distance: \"+_vm._s(_vm.currentDistance))]),_vm._v(\" \"),_c('div',[_vm._v(\"Elevation: \"+_vm._s(_vm.currentElevation))])]):_vm._e()]),_vm._v(\" \"),(_vm.animationController)?_c('div',{staticClass:\"control-buttons\"},[_c('button',{staticClass:\"btn btn-secondary rounded-circle d-flex align-items-center control-button\",on:{\"click\":function($event){return _vm.animationController.rewind()}}},[_c('span',{staticClass:\"material-icons\"},[_vm._v(\"fast_rewind\")])]),_vm._v(\" \"),_c('button',{staticClass:\"btn btn-primary rounded-circle play-button d-flex align-items-center control-button\",on:{\"click\":_vm.togglePlayback}},[(_vm.isPlaying)?_c('span',{staticClass:\"material-icons\"},[_vm._v(\"pause\")]):_c('span',{staticClass:\"material-icons\"},[_vm._v(\"play_arrow\")])]),_vm._v(\" \"),_c('button',{staticClass:\"btn btn-secondary rounded-circle d-flex align-items-center control-button\",on:{\"click\":function($event){return _vm.animationController.fastForward()}}},[_c('span',{staticClass:\"material-icons\"},[_vm._v(\"fast_forward\")])])]):_vm._e(),_vm._v(\" \"),_vm._m(0)])])]),_vm._v(\" \"),_c('LoadingDialog',{attrs:{\"show-loading-dialog\":_vm.loading}})],1)])\n}\nvar staticRenderFns = [function (){var _vm=this,_c=_vm._self._c;return _c('button',{staticClass:\"btn btn-secondary rounded-circle d-flex align-items-center control-button close-button\",attrs:{\"data-bs-dismiss\":\"modal\"}},[_c('span',{staticClass:\"material-icons\"},[_vm._v(\"close\")])])\n}]\n\nexport { render, staticRenderFns }","import Vue from \"vue\";\nimport FlyoverPreview from \"./FlyoverPreview.vue\";\n\nif (document.querySelector('#flyover_preview')) {\n window.flyover_vue = new Vue({\n render: (createElement) => {\n return createElement(FlyoverPreview);\n }\n }).$mount('#flyover_preview');\n}\n","\nexport enum MeasurementPref {\n KilometersMeters = 'kilometersMeters',\n MilesFeet = 'milesFeet',\n MilesYards = 'milesYards',\n KilometersFeet = 'kilometersFeet',\n MilesMeters = 'milesMeters',\n MilesFurlongs = 'milesFurlongs',\n MilesFathoms = 'milesFathoms',\n NauticalMilesYards = 'nauticalMilesYards',\n MilesInches = 'milesInches',\n LightYearsMeters = 'lightYearsMeters'\n}\n\nexport class MeasurementPrefUtility {\n measurementPref: MeasurementPref;\n\n constructor(measurementPref: MeasurementPref) {\n this.measurementPref = measurementPref;\n }\n\n isMetric(): boolean {\n switch (this.measurementPref) {\n case MeasurementPref.KilometersMeters: return true;\n case MeasurementPref.MilesFeet: return false;\n case MeasurementPref.MilesYards: return false;\n case MeasurementPref.KilometersFeet: return true;\n case MeasurementPref.MilesMeters: return false;\n case MeasurementPref.MilesFurlongs: return false;\n case MeasurementPref.MilesFathoms: return false;\n case MeasurementPref.NauticalMilesYards: return false;\n case MeasurementPref.MilesInches: return false;\n case MeasurementPref.LightYearsMeters: return true;\n }\n }\n\n toPrettyString(): string {\n switch (this.measurementPref) {\n case MeasurementPref.KilometersMeters: return 'Kilometers/Meters';\n case MeasurementPref.MilesFeet: return 'Miles/Feet';\n case MeasurementPref.MilesYards: return 'Miles/Yards';\n case MeasurementPref.KilometersFeet: return 'Kilometers/Feet';\n case MeasurementPref.MilesMeters: return 'Miles/Meters';\n case MeasurementPref.MilesFurlongs: return 'Miles/Furlongs';\n case MeasurementPref.MilesFathoms: return 'Miles/Fathoms';\n case MeasurementPref.NauticalMilesYards: return 'Nautical Miles/Yards';\n case MeasurementPref.MilesInches: return 'Miles/Inches';\n case MeasurementPref.LightYearsMeters: return 'Light Years/Meters';\n }\n }\n\n static preference(): MeasurementPrefUtility {\n if (window.user && window.user.measurement_preference) {\n // @ts-ignore\n return MeasurementPrefUtility.preferenceFromString(window.user.measurement_preference.toLowerCase())\n } else if (window.units) {\n return MeasurementPrefUtility.preferenceFromString(window.units)\n } else {\n return new MeasurementPrefUtility(MeasurementPref.KilometersMeters)\n }\n }\n\n static preferenceFromString(string: string): MeasurementPrefUtility {\n switch (string) {\n case 'kilometersMeters'.toLowerCase(): return new MeasurementPrefUtility(MeasurementPref.KilometersMeters);\n case 'milesFeet'.toLowerCase(): return new MeasurementPrefUtility(MeasurementPref.MilesFeet);\n case 'milesYards'.toLowerCase(): return new MeasurementPrefUtility(MeasurementPref.MilesYards);\n case 'kilometersFeet'.toLowerCase(): return new MeasurementPrefUtility(MeasurementPref.KilometersFeet);\n case 'milesMeters'.toLowerCase(): return new MeasurementPrefUtility(MeasurementPref.MilesMeters);\n case 'milesFurlongs'.toLowerCase(): return new MeasurementPrefUtility(MeasurementPref.MilesFurlongs);\n case 'milesFathoms'.toLowerCase(): return new MeasurementPrefUtility(MeasurementPref.MilesFathoms);\n case 'nauticalMilesYards'.toLowerCase(): return new MeasurementPrefUtility(MeasurementPref.NauticalMilesYards);\n case 'milesInches'.toLowerCase(): return new MeasurementPrefUtility(MeasurementPref.MilesInches);\n case 'lightYearsMeters'.toLowerCase(): return new MeasurementPrefUtility(MeasurementPref.LightYearsMeters);\n default: return new MeasurementPrefUtility(MeasurementPref.KilometersMeters);\n }\n }\n\n mapbox(): string {\n switch (this.measurementPref) {\n case MeasurementPref.KilometersMeters: return 'metric';\n case MeasurementPref.MilesFeet: return 'imperial';\n case MeasurementPref.MilesYards: return 'imperial';\n case MeasurementPref.KilometersFeet: return 'metric';\n case MeasurementPref.MilesMeters: return 'imperial';\n case MeasurementPref.MilesFurlongs: return 'imperial';\n case MeasurementPref.MilesFathoms: return 'imperial';\n case MeasurementPref.NauticalMilesYards: return 'nautical';\n case MeasurementPref.MilesInches: return 'imperial';\n case MeasurementPref.LightYearsMeters: return 'metric';\n }\n }\n\n meter(): MeterUnit {\n switch (this.measurementPref) {\n case MeasurementPref.KilometersMeters: return MeterUnit.Meter;\n case MeasurementPref.MilesFeet: return MeterUnit.Feet;\n case MeasurementPref.MilesYards: return MeterUnit.Yards;\n case MeasurementPref.KilometersFeet: return MeterUnit.Feet;\n case MeasurementPref.MilesMeters: return MeterUnit.Meter;\n case MeasurementPref.MilesFurlongs: return MeterUnit.Furlongs;\n case MeasurementPref.MilesFathoms: return MeterUnit.Fathoms;\n case MeasurementPref.NauticalMilesYards: return MeterUnit.Yards;\n case MeasurementPref.MilesInches: return MeterUnit.Inches;\n case MeasurementPref.LightYearsMeters: return MeterUnit.Meter;\n }\n }\n\n kilometer(): KilometerUnit {\n switch (this.measurementPref) {\n case MeasurementPref.KilometersMeters: return KilometerUnit.Kilometers;\n case MeasurementPref.MilesFeet: return KilometerUnit.Miles;\n case MeasurementPref.MilesYards: return KilometerUnit.Miles;\n case MeasurementPref.KilometersFeet: return KilometerUnit.Kilometers;\n case MeasurementPref.MilesMeters: return KilometerUnit.Miles;\n case MeasurementPref.MilesFurlongs: return KilometerUnit.Miles;\n case MeasurementPref.MilesFathoms: return KilometerUnit.Miles;\n case MeasurementPref.NauticalMilesYards: return KilometerUnit.NauticalMiles;\n case MeasurementPref.MilesInches: return KilometerUnit.Miles;\n case MeasurementPref.LightYearsMeters: return KilometerUnit.LightYears;\n }\n }\n\n smallUnitValue(value: number, convertToBigUnitAfter1000M: Boolean = false): number {\n if (convertToBigUnitAfter1000M && value > 1000.0) {\n let kmValue = value / 1000\n return KilometerUnitUtility.convertKilometerTo(kmValue, this.kilometer())\n }\n return MeterUnitUtility.convertMeterTo(value, this.meter())\n }\n\n bigUnitValue(value: number, convertToSmallUnitBefore1000M: Boolean = false): number {\n if (convertToSmallUnitBefore1000M && value < 1000.0) {\n let meterValue = value * 1000\n return MeterUnitUtility.convertMeterTo(meterValue, this.meter())\n }\n return KilometerUnitUtility.convertKilometerTo(value, this.kilometer())\n }\n\n bigUnitFormatter(value: number, convertToSmallUnitBefore1000M: Boolean = false): string {\n if (convertToSmallUnitBefore1000M && value < 1000.0) {\n let meterValue = value * 1000\n return MeterUnitUtility.convertMeterTo(meterValue, this.meter()) + this.meterSymbol()\n }\n return KilometerUnitUtility.convertKilometerTo(value, this.kilometer()) + ' ' + this.kilometerSymbol()\n }\n\n smallUnitFormatter(value: number, convertToBigUnitAfter1000M: Boolean = false): string {\n if (convertToBigUnitAfter1000M && value > 1000.0) {\n let kmValue = value / 1000\n return KilometerUnitUtility.convertKilometerTo(kmValue, this.kilometer()) + ' ' + this.kilometerSymbol()\n }\n return MeterUnitUtility.convertMeterTo(value, this.meter()) + this.meterSymbol()\n }\n\n meterSymbol(): string {\n switch (this.meter()) {\n case MeterUnit.Meter: return 'm';\n case MeterUnit.Feet: return 'ft';\n case MeterUnit.Yards: return 'yd';\n case MeterUnit.Furlongs: return 'fur';\n case MeterUnit.Fathoms: return 'ftm';\n case MeterUnit.Inches: return 'in';\n }\n }\n\n kilometerSymbol(): string {\n switch (this.kilometer()) {\n case KilometerUnit.Kilometers: return 'km';\n case KilometerUnit.Miles: return 'mi';\n case KilometerUnit.NauticalMiles: return 'nmi';\n case KilometerUnit.LightYears: return 'ly';\n }\n }\n}\n\n\nexport enum MeterUnit {\n Meter,\n Feet,\n Yards,\n Furlongs,\n Fathoms,\n Inches\n}\n\nclass MeterUnitUtility {\n static convertMeterTo(value: number, unit: MeterUnit): number {\n return Number((value * MeterUnitUtility.meterToUnitMultiplier(unit)).toFixed(0))\n }\n\n static meterToUnitMultiplier(unit: MeterUnit): number {\n switch (unit) {\n case MeterUnit.Meter: return 1.0;\n case MeterUnit.Feet: return 3.28084;\n case MeterUnit.Yards: return 1.09361;\n case MeterUnit.Furlongs: return 0.0049709695;\n case MeterUnit.Fathoms: return 0.546806;\n case MeterUnit.Inches: return 39.3701;\n }\n }\n}\n\nexport enum KilometerUnit {\n Kilometers,\n Miles,\n LightYears ,\n NauticalMiles\n}\n\nclass KilometerUnitUtility {\n\n static convertKilometerTo(value: number, unit: KilometerUnit): number {\n return Number((value * KilometerUnitUtility.kilometerToUnitMultiplier(unit)).toFixed(2))\n }\n static kilometerToUnitMultiplier(unit: KilometerUnit): number {\n switch (unit) {\n case KilometerUnit.Kilometers: return 1.0;\n case KilometerUnit.Miles: return 0.621371;\n case KilometerUnit.LightYears: return 0.00000000000010570008340247;\n case KilometerUnit.NauticalMiles: return 0.539957;\n }\n }\n}\n\n","import { gql } from 'graphql-request'\n\nexport const GetMapStyles = gql`\n query GetMapStyles {\n mapStyles {\n name\n id\n description\n zoomRange\n copyright\n styleFile\n styleFileUrl\n image\n proPlus\n }\n }\n`;\n\n\nexport const GetMapStylesTags = gql`\n query GetMapStylesTags {\n tags(taggableType:\"MapStyle\"){\n id\n name\n taggingsCount\n trails {\n slug\n }\n }\n }\n`;\n\nexport const GetMapStyle = gql`\n query GetMapStyleById($id:ID!) {\n mapStyle(id:$id){\n name\n id\n description\n zoomRange\n styleFile\n image\n styleFileUrl\n proPlus\n }\n }`\n\nexport const GetMapStyleByTag = gql`\n query GetMapStyleByTag($tags: [String!]!) {\n mapStylesByTags(tags: $tags){\n name\n id\n description\n zoomRange\n copyright\n styleFile\n image\n styleFileUrl\n proPlus\n }\n }`\n\nexport const GetMapStylesNearby = gql`\n query GetMapStylesNearby($lon:Float, $lat:Float) {\n mapStylesNearby(lon:$lon, lat:$lat) {\n name\n id\n description\n zoomRange\n copyright\n styleFile\n image\n proPlus\n }\n }\n`\n\nexport const GetMapStylesCountries = gql`\nquery GetMapStyleCountries {\n mapStyleCountries {\n id\n name\n flagImage {\n lgUrl\n }\n mapStyles {\n id\n }\n }\n}\n`\n\nexport const GetMapStylesSearch = gql`\nquery GetMapStylesSearch($string: String!) {\n mapStylesSearch(searchString: $string) {\n name\n id\n description\n zoomRange\n copyright\n styleFile\n image\n proPlus\n }\n}\n`\n\nexport const GetMapStylesByCountry = gql`\nquery GetMapStylesByCountry($id: ID!) {\n mapStylesByCountryId(countryId: $id) {\n name\n id\n description\n zoomRange\n copyright\n styleFile\n image\n proPlus\n }\n}\n`\n","import graphClient from '../graphql/graph_client';\nimport { GetMapStyle } from \"../graphql/map-styles-graph\";\n\nimport hikingMapStyleImage from \"../../img/map_style/hiking_map_style.jpg\"\nimport historicalMapStyleImage from \"../../img/map_style/historical_map_style.jpg\"\nimport nationalMapStyleImage from \"../../img/map_style/national_map_style.jpg\"\nimport standardMapStyleImage from \"../../img/map_style/standard_map_style.png\"\nimport satelliteMapStyleImage from \"../../img/map_style/satellite_map_style.jpg\"\nimport parksMapStyleImage from \"../../img/map_style/parks_map_style.jpg\"\n\nvar threeDimensionalModeIsEnabled = false;\n\nexport class ThreeDimensionalMapManager {\n\n static enable3DMode() {\n const map = window.map;\n if (map.getSource('mapbox-dem') == null) {\n map.addSource('mapbox-dem', {\n 'type': 'raster-dem',\n 'url': 'mapbox://mapbox.mapbox-terrain-dem-v1',\n 'tileSize': 512,\n 'maxzoom': 14\n });\n }\n if (map.getTerrain() == null) {\n map.setTerrain({ 'source': 'mapbox-dem', 'exaggeration': 2.0 });\n }\n\n // Set map pitch\n map.setPitch(50);\n\n // Set max pitch to reduce the horizon seen and reduce unneccessary tile loading\n }\n\n static toggle3DMode() {\n if (threeDimensionalModeIsEnabled) {\n threeDimensionalModeIsEnabled = false;\n ThreeDimensionalMapManager.disable3DMode();\n } else {\n threeDimensionalModeIsEnabled = true;\n ThreeDimensionalMapManager.enable3DMode();\n }\n }\n\n static disable3DMode() {\n const map = window.map;\n if (map.getTerrain()) {\n map.setTerrain(null);\n }\n map.setPitch(0);\n }\n}\n\nexport class SavedCenter {\n lat: number;\n lng: number;\n zoom: number;\n\n constructor(lat: number, lng: number, zoom: number) {\n this.lat = lat;\n this.lng = lng;\n this.zoom = zoom;\n }\n\n static saveCurrentCenter() {\n // Serialize the current SavedCenter instance to a JSON string\n const center = window.map.getCenter()\n const zoom = window.map.getZoom()\n const centerObject = {\n lat: center.lat,\n lng: center.lng,\n zoom: zoom\n };\n localStorage.setItem('currentCenter', JSON.stringify(centerObject));\n }\n\n static getCurrentCenter() {\n const centerString = localStorage.getItem('currentCenter');\n if (centerString) {\n // Parse the JSON string back into an object\n const centerObject = JSON.parse(centerString);\n return new SavedCenter(centerObject.lat, centerObject.lng, centerObject.zoom);\n } else {\n // Return the default center if none was found\n return new SavedCenter(0, 0, 0); // Assuming default center is (0, 0) with zoom 0\n }\n }\n\n lngLat() {\n return [this.lng, this.lat]\n }\n\n}\n\n\nexport class HiikerMapStyle {\n styleUrl: string;\n name: string;\n image: string; // Image URL or path\n isPro: boolean;\n isPrintMap: boolean;\n\n constructor(styleUrl: string, name: string, image: string, isPro: boolean, isPrintMap: boolean = true) {\n this.styleUrl = styleUrl;\n this.name = name;\n this.image = image;\n this.isPro = isPro;\n this.isPrintMap = isPrintMap\n }\n\n toString() {\n switch (this.name) {\n case \"Standard\":\n return \"standard\";\n case \"Satellite\":\n return \"satellite\";\n case \"Parks\":\n return \"parks\";\n case \"Hiking+\":\n return \"hiking\";\n case \"National+\":\n return \"national\";\n case \"Historical+\":\n return \"historical\";\n case \"Outdoors\":\n return \"outdoors\";\n default:\n return \"standard\";\n }\n }\n\n toPrintMapString() {\n switch (this.name) {\n case \"Standard\":\n return \"standard-print-map\";\n case \"Satellite\":\n return \"satellite-print-map\";\n case \"Parks\":\n return \"parks-print-map\";\n case \"Hiking+\":\n return \"hiking-print-map\";\n case \"National+\":\n return \"national-print-map\";\n case \"Historical+\":\n return \"historical-print-map\";\n case \"Outdoors\":\n return \"outdoors-print-map\";\n default:\n return \"standard-print-map\";\n }\n }\n\n printMapUrl() {\n const localURL = window.location.protocol + \"//\" + window.location.hostname + (window.location.port ? ':' + window.location.port : '');\n let userId = window.user?.firebase_user_id || '';\n let url = `${localURL}/mapbox_style_jsons/${this.toPrintMapString()}.json?userId=${userId}`;\n return url\n }\n\n saveCurrentStyle() {\n // Serialize the current HiikerMapStyle instance to a JSON string\n const styleObject = {\n styleUrl: this.styleUrl,\n name: this.name,\n image: this.image,\n isPro: this.isPro\n };\n localStorage.setItem('currentHiikerMapStyle', JSON.stringify(styleObject));\n }\n\n static fromString(styleString: string) {\n switch (styleString) {\n case \"standard\":\n return HiikerMapStyle.standard();\n case \"satellite\":\n return HiikerMapStyle.satellite();\n case \"parks\":\n return HiikerMapStyle.parks();\n case \"hiking\":\n return HiikerMapStyle.hiking();\n case \"national\":\n return HiikerMapStyle.national();\n case \"historical\":\n return HiikerMapStyle.historical();\n default:\n return HiikerMapStyle.standard();\n }\n }\n\n\n static getCurrentStyle(userIsPro: boolean = false) {\n const styleString = localStorage.getItem('currentHiikerMapStyle');\n if (styleString) {\n // Parse the JSON string back into an object\n const styleObject = JSON.parse(styleString);\n let style = new HiikerMapStyle(styleObject.styleUrl, styleObject.name, styleObject.image, styleObject.isPro);\n if (style.isPro) {\n if (userIsPro) {\n return style;\n } else {\n return HiikerMapStyle.standard();\n }\n } else {\n return style;\n }\n } else {\n // Return the default style if none was found\n return HiikerMapStyle.standard(); // Assuming standard() is correctly defined with all properties\n }\n }\n\n static getAllStyles(): HiikerMapStyle[] {\n let mapStyles = [\n HiikerMapStyle.standard(),\n HiikerMapStyle.satellite(),\n HiikerMapStyle.parks(),\n HiikerMapStyle.hiking(),\n HiikerMapStyle.national(),\n HiikerMapStyle.historical(),\n ];\n if (window.flashing) {\n mapStyles.push(HiikerMapStyle.outdoors());\n }\n return mapStyles;\n }\n\n static standard() {\n const localURL = window.location.protocol + \"//\" + window.location.hostname + (window.location.port ? ':' + window.location.port : '');\n let userId = window.user?.firebase_user_id || '';\n let url = `${localURL}/mapbox_style_jsons/standard.json?userId=${userId}`;\n return new HiikerMapStyle(\n url,\n \"Standard\",\n standardMapStyleImage, // Adjust path as necessary\n false,\n true\n );\n }\n\n static satellite() {\n const localURL = window.location.protocol + \"//\" + window.location.hostname + (window.location.port ? ':' + window.location.port : '');\n let userId = window.user?.firebase_user_id || '';\n let url = `${localURL}/mapbox_style_jsons/satellite.json?userId=${userId}`;\n return new HiikerMapStyle(\n url,\n \"Satellite\",\n satelliteMapStyleImage, // Ensure this path is correctly adjusted\n false\n );\n }\n\n static parks() {\n const localURL = window.location.protocol + \"//\" + window.location.hostname + (window.location.port ? ':' + window.location.port : '');\n let userId = window.user?.firebase_user_id || '';\n let url = `${localURL}/mapbox_style_jsons/parks.json?userId=${userId}`;\n return new HiikerMapStyle(\n url,\n \"Parks\",\n parksMapStyleImage, // Ensure this path is correctly adjusted\n false\n );\n }\n\n static hiking() {\n const localURL = window.location.protocol + \"//\" + window.location.hostname + (window.location.port ? ':' + window.location.port : '');\n let userId = window.user?.firebase_user_id || '';\n let url = `${localURL}/mapbox_style_jsons/hiking.json?userId=${userId}`;\n return new HiikerMapStyle(\n url,\n \"Hiking+\",\n hikingMapStyleImage, // Adjust path as necessary\n true,\n false\n );\n }\n\n static national() {\n const localURL = window.location.protocol + \"//\" + window.location.hostname + (window.location.port ? ':' + window.location.port : '');\n let userId = window.user?.firebase_user_id || '';\n let url = `${localURL}/mapbox_style_jsons/national.json?userId=${userId}`;\n return new HiikerMapStyle(\n url,\n \"National+\",\n nationalMapStyleImage, // Adjust path as necessary\n true\n );\n }\n\n static historical() {\n const localURL = window.location.protocol + \"//\" + window.location.hostname + (window.location.port ? ':' + window.location.port : '');\n let userId = window.user?.firebase_user_id || '';\n let url = `${localURL}/mapbox_style_jsons/historical.json?userId=${userId}`;\n return new HiikerMapStyle(\n url,\n \"Historical+\",\n historicalMapStyleImage, // Adjust path as necessary\n true\n );\n }\n\n static outdoors() {\n const localURL = window.location.protocol + \"//\" + window.location.hostname + (window.location.port ? ':' + window.location.port : '');\n let userId = window.user?.firebase_user_id || '';\n let url = `${localURL}/mapbox_style_jsons/outdoors.json?userId=${userId}`;\n return new HiikerMapStyle(\n url,\n \"Outdoors\",\n standardMapStyleImage, // Adjust path as necessary\n false\n );\n }\n\n // Method to compare two HiikerMapStyle instances, if needed\n equals(other: HiikerMapStyle): boolean {\n return this.styleUrl === other.styleUrl && this.name === other.name;\n }\n}\n\nexport class MapStyle {\n id: number\n name: string\n mapStyleDescription: string\n zoomRange: Array\n copyright: string\n boundingBox: Array\n image: string\n styleFile: string\n styleFileUrl: string\n proPlus: boolean\n alpha: string = \"100\"\n\n constructor(id: number, name: string, mapStyleDescription: string, zoomRange: Array, copyright: string, boundingBox: Array, photos: string, styleFile: string, styleFileUrl: string, proPlus: boolean, alpha: string) {\n this.id = id\n this.name = name\n this.mapStyleDescription = mapStyleDescription\n this.zoomRange = zoomRange\n this.copyright = copyright\n this.boundingBox = boundingBox\n this.image = photos\n this.styleFile = styleFile\n this.styleFileUrl = styleFileUrl\n this.proPlus = proPlus\n this.alpha = alpha\n }\n\n public static fromMapStyle(mapStyle: object) {\n return new MapStyle(\n // @ts-ignore\n mapStyle['id'],\n // @ts-ignore\n mapStyle['name'],\n // @ts-ignore\n mapStyle['description'],\n // @ts-ignore\n mapStyle['zoomRange'],\n // @ts-ignore\n mapStyle['copyright'],\n // @ts-ignore\n mapStyle['boundingBox'],\n // @ts-ignore\n mapStyle['image'],\n // @ts-ignore\n mapStyle['styleFile'],\n // @ts-ignore\n mapStyle['styleFileUrl'],\n // @ts-ignore\n mapStyle['proPlus'],\n mapStyle['alpha']\n )\n }\n\n public static async get(id: number) {\n let mapStyleResponse = await graphClient.request(GetMapStyle, {id: `${id}`})\n let mapStyleData = mapStyleResponse.mapStyle\n return new MapStyle(\n mapStyleData.id,\n mapStyleData.name,\n mapStyleData.description,\n mapStyleData.zoomRange,\n mapStyleData.copyright,\n mapStyleData.boundingBox,\n mapStyleData.image,\n mapStyleData.styleFile,\n mapStyleData.styleFileUrl,\n mapStyleData.proPlus,\n \"100\"\n )\n }\n}\n","import axios from \"axios\";\nimport { plainToClass } from \"class-transformer\";\nimport { point, midpoint, distance } from \"@turf/turf\";\nimport mapboxgl from \"mapbox-gl\";\n\nexport class TypesenseResponse {\n facet_counts: any[];\n found: number;\n hits: Hit[];\n out_of: number;\n page: number;\n request_params: RequestParams;\n search_cutoff: boolean;\n search_time_ms: number;\n\n constructor(\n facet_counts: any[],\n found: number,\n hits: Hit[],\n out_of: number,\n page: number,\n request_params: RequestParams,\n search_cutoff: boolean,\n search_time_ms: number\n ) {\n this.facet_counts = facet_counts;\n this.found = found;\n this.hits = hits;\n this.out_of = out_of;\n this.page = page;\n this.request_params = request_params;\n this.search_cutoff = search_cutoff;\n this.search_time_ms = search_time_ms;\n }\n\n // Add bounds as a parameter to the get function\n static async get(\n query: string = \"*\",\n filterString: string | null = null,\n bounds: mapboxgl.LngLatBounds | null = null,\n typesensePageCount: number | null = null,\n perPage: number = 100\n ): Promise {\n\n // Remove the getDistance function since it's no longer needed\n\n const axiosPostClient = axios.create({\n headers: {\n 'x-typesense-api-key': window.typesenseSearchApiKey,\n 'Content-Type': 'application/json'\n },\n })\n // Update this line to pass the bounds to createTypesensePostObject\n let postObject = this.createTypesensePostObject(bounds, query, filterString, typesensePageCount, perPage)\n // ... rest of the function\n let postResponse = await axiosPostClient.post(postObject.url, postObject.body)\n let hits = postResponse.data.results.map((result: any) => result.hits).flat()\n let jsonObject = { hits: hits } as Object;\n return plainToClass(TypesenseResponse, jsonObject)\n }\n\n static createTypesensePostObject(\n bounds: mapboxgl.LngLatBounds | null,\n query: string,\n filterString: string | null = null,\n typesensePageCount: number | null = null,\n perPage: number = 100\n ): { url: string, body: any } {\n let filterBy = \"\";\n\n if (bounds) {\n // const ne = bounds.getNorthEast();\n // const sw = bounds.getSouthWest();\n //\n // // Create a filter string based on the bounds\n // filterBy += `latitude:>${sw.lat} AND latitude:<${ne.lat} AND longitude:>${sw.lng} AND longitude:<${ne.lng}`;\n const ne = bounds.getNorthEast();\n const sw = bounds.getSouthWest();\n const nw = new mapboxgl.LngLat(sw.lng, ne.lat);\n const se = new mapboxgl.LngLat(ne.lng, sw.lat);\n\n // Create a filter string based on the bounds using the location field\n filterBy += `location:(${nw.lat},${nw.lng},${ne.lat},${ne.lng},${se.lat},${se.lng},${sw.lat},${sw.lng})`;\n }\n\n\n\n if (filterString) {\n filterBy += filterString\n }\n return {\n url: 'https://' + window.typesenseUrl + \"/multi_search\",\n body: {\n 'searches': [...Array(typesensePageCount).keys()].map(e => e + 1).map((i) => {\n return {\n \"collection\": \"trails\",\n \"q\": query,\n \"query_by\": \"name,short_address,keywords,tags\",\n \"filter_by\": filterBy,\n \"per_page\": `${perPage}`,\n \"page\": i,\n }\n })\n }\n }\n }\n\n // static async get(\n // query: string = \"*\",\n // filterString: string | null = null,\n // center: number[] | null = null,\n // typesensePageCount: number | null = null\n // ): Promise {\n //\n // function getDistance() {\n // const bounds = window.map.getBounds();\n // const topLeft = point([bounds.getNorthEast().lng, bounds.getNorthEast().lat]);\n // const topRight = point([bounds.getSouthWest().lng, bounds.getNorthEast().lat]);\n // const bottomLeft = point([bounds.getNorthEast().lng, bounds.getSouthWest().lat]);\n // const bottomRight = point([bounds.getSouthWest().lng, bounds.getSouthWest().lat]);\n //\n // const middleLeft = midpoint(topLeft, bottomLeft);\n // const middleRight = midpoint(topRight, bottomRight);\n // return distance(middleLeft, middleRight, { units: 'meters' }) * 0.4\n // }\n //\n // const axiosPostClient = axios.create({\n // headers: {\n // 'x-typesense-api-key': window.typesenseSearchApiKey,\n // 'Content-Type': 'application/json'\n // },\n // })\n // debugger\n // let postObject = this.createTypesensePostObject(center!, getDistance(), query, filterString, typesensePageCount)\n // debugger\n // let postResponse = await axiosPostClient.post(postObject.url, postObject.body)\n // let hits = postResponse.data.results.map((result: any) => result.hits).flat()\n // let jsonObject = { hits: hits } as Object;\n // return plainToClass(TypesenseResponse, jsonObject)\n // }\n //\n // static createTypesensePostObject(\n // center: number[] | null,\n // distanceMeters: number | null,\n // query: string,\n // filterString: string | null = null,\n // typesensePageCount: number | null = null): { url: string, body: any } {\n // let filterBy = \"\";\n // if (distanceMeters && center) {\n // let distanceKilometers = Math.round(distanceMeters / 1000)\n // if (distanceKilometers < 1.0) {\n // distanceKilometers = 1.0\n // }\n // let locationString = `location:(${center[1].toFixed(3)},${center[0].toFixed(3)},${distanceKilometers}km)`\n // filterBy += locationString\n // }\n //\n // if (filterString) {\n // filterBy += filterString\n // }\n // return {\n // url: 'https://' + window.typesenseUrl + \"/multi_search\",\n // body: {\n // 'searches': [...Array(typesensePageCount).keys()].map(e => e + 1).map((i) => {\n // return {\n // \"collection\": \"trails\",\n // \"q\": query,\n // \"query_by\": \"name,short_address,keywords,tags\",\n // \"filter_by\": filterBy,\n // \"per_page\": 250,\n // \"page\": i,\n // }\n // })\n // }\n // }\n // }\n\n toGeoJson(): any {\n let geoJson = {}\n geoJson[\"type\"] = \"FeatureCollection\"\n let features = this.hits.map((trailHit) => {\n return {\n \"type\": \"Feature\",\n \"properties\": trailHit.document,\n \"geometry\": {\n \"type\": \"Point\",\n \"coordinates\":\n [\n trailHit.document.location[1],\n trailHit.document.location[0]\n ]\n }\n }\n })\n geoJson[\"features\"] = features\n return geoJson\n }\n}\n\nexport interface Hit {\n document: Document;\n highlights: any[];\n text_match: number;\n}\n\nexport interface Document {\n average_rating: number;\n country_name: string;\n country_slug: string;\n difficulty: Difficulty;\n distance: number;\n duration_minutes: number;\n duration_string: string;\n elevation_gain: number;\n id: string;\n impressions_count: number;\n jumbo_image: string;\n keywords: string;\n location: number[];\n name: string;\n number_of_ratings: number;\n region_name: string;\n region_slug: string;\n short_address: string;\n tags: string[];\n type: TrailType;\n static_map_url: string;\n}\n\nexport enum TrailType {\n The100To300KMTrail = \"100To300KmTrail\",\n The300KMPlusTrail = \"300KmPlusTrail\",\n The30To100KMTrail = \"30To100KmTrail\",\n The5KMTrail = \"<5kmTrail\",\n The5To30KMTrail = \"5To30KmTrail\",\n}\n\nexport enum Difficulty {\n Easy = \"Easy\",\n Medium = \"Medium\",\n Difficult = \"Difficult\",\n ExtraDifficult = \"Extra Difficult\"\n}\n\nexport namespace Difficulty {\n export function fromString(difficulty: string): Difficulty {\n switch (difficulty) {\n case \"Easy\":\n return Difficulty.Easy\n case \"Medium\":\n return Difficulty.Medium\n case \"Difficult\":\n return Difficulty.Difficult\n case \"Extra Difficult\":\n return Difficulty.ExtraDifficult\n default:\n return Difficulty.Easy\n }\n }\n}\n\nexport interface RequestParams {\n collection_name: string;\n per_page: number;\n q: string;\n}\n\n\nexport class Convert {\n public static toTypesenseResponse(json: string): TypesenseResponse {\n return cast(JSON.parse(json), r(\"TypesenseResponse\"));\n }\n\n public static typesenseResponseToJson(value: TypesenseResponse): string {\n return JSON.stringify(uncast(value, r(\"TypesenseResponse\")), null, 2);\n }\n}\n\nfunction invalidValue(typ: any, val: any, key: any = ''): never {\n if (key) {\n throw Error(`Invalid value for key \"${key}\". Expected type ${JSON.stringify(typ)} but got ${JSON.stringify(val)}`);\n }\n throw Error(`Invalid value ${JSON.stringify(val)} for type ${JSON.stringify(typ)}`,);\n}\n\nfunction jsonToJSProps(typ: any): any {\n if (typ.jsonToJS === undefined) {\n const map: any = {};\n typ.props.forEach((p: any) => map[p.json] = { key: p.js, typ: p.typ });\n typ.jsonToJS = map;\n }\n return typ.jsonToJS;\n}\n\nfunction jsToJSONProps(typ: any): any {\n if (typ.jsToJSON === undefined) {\n const map: any = {};\n typ.props.forEach((p: any) => map[p.js] = { key: p.json, typ: p.typ });\n typ.jsToJSON = map;\n }\n return typ.jsToJSON;\n}\n\nfunction transform(val: any, typ: any, getProps: any, key: any = ''): any {\n function transformPrimitive(typ: string, val: any): any {\n if (typeof typ === typeof val) return val;\n return invalidValue(typ, val, key);\n }\n\n function transformUnion(typs: any[], val: any): any {\n // val must validate against one typ in typs\n const l = typs.length;\n for (let i = 0; i < l; i++) {\n const typ = typs[i];\n try {\n return transform(val, typ, getProps);\n } catch (_) {\n }\n }\n return invalidValue(typs, val);\n }\n\n function transformEnum(cases: string[], val: any): any {\n if (cases.indexOf(val) !== -1) return val;\n return invalidValue(cases, val);\n }\n\n function transformArray(typ: any, val: any): any {\n // val must be an array with no invalid elements\n if (!Array.isArray(val)) return invalidValue(\"array\", val);\n return val.map(el => transform(el, typ, getProps));\n }\n\n function transformDate(val: any): any {\n if (val === null) {\n return null;\n }\n const d = new Date(val);\n if (isNaN(d.valueOf())) {\n return invalidValue(\"Date\", val);\n }\n return d;\n }\n\n function transformObject(props: { [k: string]: any }, additional: any, val: any): any {\n if (val === null || typeof val !== \"object\" || Array.isArray(val)) {\n return invalidValue(\"object\", val);\n }\n const result: any = {};\n Object.getOwnPropertyNames(props).forEach(key => {\n const prop = props[key];\n const v = Object.prototype.hasOwnProperty.call(val, key) ? val[key] : undefined;\n result[prop.key] = transform(v, prop.typ, getProps, prop.key);\n });\n Object.getOwnPropertyNames(val).forEach(key => {\n if (!Object.prototype.hasOwnProperty.call(props, key)) {\n result[key] = transform(val[key], additional, getProps, key);\n }\n });\n return result;\n }\n\n if (typ === \"any\") return val;\n if (typ === null) {\n if (val === null) return val;\n return invalidValue(typ, val);\n }\n if (typ === false) return invalidValue(typ, val);\n while (typeof typ === \"object\" && typ.ref !== undefined) {\n typ = typeMap[typ.ref];\n }\n if (Array.isArray(typ)) return transformEnum(typ, val);\n if (typeof typ === \"object\") {\n return typ.hasOwnProperty(\"unionMembers\") ? transformUnion(typ.unionMembers, val)\n : typ.hasOwnProperty(\"arrayItems\") ? transformArray(typ.arrayItems, val)\n : typ.hasOwnProperty(\"props\") ? transformObject(getProps(typ), typ.additional, val)\n : invalidValue(typ, val);\n }\n // Numbers can be parsed by Date but shouldn't be.\n if (typ === Date && typeof val !== \"number\") return transformDate(val);\n return transformPrimitive(typ, val);\n}\n\nfunction cast(val: any, typ: any): T {\n return transform(val, typ, jsonToJSProps);\n}\n\nfunction uncast(val: T, typ: any): any {\n return transform(val, typ, jsToJSONProps);\n}\n\nfunction a(typ: any) {\n return { arrayItems: typ };\n}\n\nfunction u(...typs: any[]) {\n return { unionMembers: typs };\n}\n\nfunction o(props: any[], additional: any) {\n return { props, additional };\n}\n\nfunction m(additional: any) {\n return { props: [], additional };\n}\n\nfunction r(name: string) {\n return { ref: name };\n}\n\nconst typeMap: any = {\n \"TypesenseResponse\": o([\n { json: \"facet_counts\", js: \"facet_counts\", typ: a(\"any\") },\n { json: \"found\", js: \"found\", typ: 0 },\n { json: \"hits\", js: \"hits\", typ: a(r(\"Hit\")) },\n { json: \"out_of\", js: \"out_of\", typ: 0 },\n { json: \"page\", js: \"page\", typ: 0 },\n { json: \"request_params\", js: \"request_params\", typ: r(\"RequestParams\") },\n { json: \"search_cutoff\", js: \"search_cutoff\", typ: true },\n { json: \"search_time_ms\", js: \"search_time_ms\", typ: 0 },\n ], false),\n \"Hit\": o([\n { json: \"document\", js: \"document\", typ: r(\"Document\") },\n { json: \"highlights\", js: \"highlights\", typ: a(\"any\") },\n { json: \"text_match\", js: \"text_match\", typ: 0 },\n ], false),\n \"Document\": o([\n { json: \"average_rating\", js: \"average_rating\", typ: 0 },\n { json: \"country_name\", js: \"country_name\", typ: r(\"CountryName\") },\n { json: \"country_slug\", js: \"country_slug\", typ: r(\"CountrySlug\") },\n { json: \"difficulty\", js: \"difficulty\", typ: r(\"Difficulty\") },\n { json: \"distance\", js: \"distance\", typ: 0 },\n { json: \"duration_minutes\", js: \"duration_minutes\", typ: 0 },\n { json: \"duration_string\", js: \"duration_string\", typ: \"\" },\n { json: \"elevation_gain\", js: \"elevation_gain\", typ: 3.14 },\n { json: \"id\", js: \"id\", typ: \"\" },\n { json: \"impressions_count\", js: \"impressions_count\", typ: 0 },\n { json: \"jumbo_image\", js: \"jumbo_image\", typ: \"\" },\n { json: \"keywords\", js: \"keywords\", typ: \"\" },\n { json: \"location\", js: \"location\", typ: a(3.14) },\n { json: \"name\", js: \"name\", typ: \"\" },\n { json: \"number_of_ratings\", js: \"number_of_ratings\", typ: 0 },\n { json: \"region_name\", js: \"region_name\", typ: \"\" },\n { json: \"region_slug\", js: \"region_slug\", typ: \"\" },\n { json: \"short_address\", js: \"short_address\", typ: \"\" },\n { json: \"tags\", js: \"tags\", typ: a(\"\") },\n { json: \"type\", js: \"type\", typ: r(\"Type\") },\n { json: \"static_map_url\",js: \"static_map_url\", typ: \"\" }\n ], false),\n \"RequestParams\": o([\n { json: \"collection_name\", js: \"collection_name\", typ: \"\" },\n { json: \"per_page\", js: \"per_page\", typ: 0 },\n { json: \"q\", js: \"q\", typ: \"\" },\n ], false),\n \"CountryName\": [\n \"*\"\n ],\n \"CountrySlug\": [\n \"*\"\n ],\n \"Difficulty\": [\n \"Difficult\",\n \"Easy\",\n \"Extra Difficult\",\n \"Medium\",\n ],\n \"Type\": [\n \"100To300KmTrail\",\n \"300KmPlusTrail\",\n \"30To100KmTrail\",\n \"<5kmTrail\",\n \"5To30KmTrail\",\n ],\n};\n\n"],"names":["window","user","fcWidget","setExternalId","firebase_user_id","setEmail","email","mixpanel","init","mixpanelKey","debug","track_pageview","persistence","identify","data","revenueCatData","upgradeSucceeded","freeImage","firebaseUserId","computed","hasActiveEntitlements","Object","keys","entitlements","active","length","activeEntitlements","hasAdditionalProducts","allPurchaseDatesByProduct","purchasesPath","location","origin","methods","subscriptionImage","identifier","includes","ProImage","FreeImage","formatDate","dateString","Date","toLocaleDateString","year","month","day","subscriptionTypeBadge","entitlement","expirationDate","willRenew","storeName","store","stripe","appstore","playstore","showManagementLink","managementLink","stripeManagementUrl","managementURLs","purchases","Purchases","rcPublicKey","getCustomerInfo","error","console","_vm","this","_c","_self","staticClass","_m","_e","_v","_s","requestDate","_l","key","attrs","originalPurchaseDate","productIdentifier","document","querySelector","vue","Vue","render","createElement","$mount","addEventListener","querySelectorAll","forEach","el","Dropdown","getElementById","Rails","log","giftButton","e","preventDefault","href","giftCheckoutUrl","onBoardingVue","launchFor","OnBoardingGoal","AuthMethods","isProOrProPlus","loading","intervalId","axiosClient","bus","$on","response","RevenueCatWrapper","alert","URL","searchParams","get","checkApi","setInterval","components","LoadingDialog","clearInterval","$toasted","show","position","icon","duration","containerClass","closeOnSwipe","singleton","require","avatar_url","admin","Toasted","h","App","beforeCreate","homeFeatureSliderOptions","direction","pagination","perPage","drag","arrows","type","heightRatio","breakpoints","homeSplideNearbyTrails","isNavigation","gap","fixedWidth","trailsSplideOptions","rewind","perMove","newFeatureSlideOptions","height","quoteSplideOptions","purchaseFeatureSplideOptions","trailOverviewImages","padding","mapPreviewsSplideOptions","homeFeatureSliderElement","homeFeatureSlider","Splide","mount","$","on","go","splideNearbyTrails","splideTopTrails","splideCountryLongTrails","splideCountryShortTrails","splideCountryDifficultTrails","newFeatureSlider","splideFreeQuotesSlider","purchaseFeatureSlider","trailOverviewImagesSlider","Grid","mapPreviewsSplide","youtubeModal","src","lozad","observe","closeSaleBannerKey","closeSaleBannerButton","closeBanner","getElementsByClassName","classList","remove","hideUntilNow","setDate","getDate","localStorage","setItem","hideUntil","getItem","setTimeout","add","targetDate","sale_countdown_time","daysBox","hoursBox","minutesBox","secondsBox","now","diffInSeconds","Math","floor","value","days","hours","minutes","seconds","innerHTML","MapStylesState","currentMapStyle","printMapMode","state","actions","async","dispatch","HiikerMapStyle","_ref","commit","params","URLSearchParams","search","has","mapStyle","isPro","saveCurrentStyle","map","setStyle","styleUrl","mutations","setCurrentMapStyle","setPrintMapMode","getters","modules","MapStylesModule","namespaced","SPEED_CONFIG","slow","durationPerKm","lookAhead","samplingDensity","maxDegreesPerFrame","minDegreesPerFrame","medium","fast","ultrafast","hyperspeed","DEFAULT_CAMERA_OPTIONS","useElevationAwarePitch","basePitch","minPitch","maxPitch","pitchDamping","gradientThreshold","pitchPerGradientPercent","elevationLookAheadMultiplier","downhillPitchMultiplier","smoothingFactor","getConsistentAverageBearing","bearings","radians","b","PI","sumCos","sumSin","r","cos","sin","C","S","sqrt","atan2","previewTrail","trailCoords","markerOptions","arguments","undefined","progressCallback","camera","config","coords3d","coord","processingEl","style","textContent","getContainer","appendChild","cumulativeDistKm","total2dDistanceKm","i","p1","p2","turf","units","push","computeCumulativeDistances","coords2d","c","fullLine","simplifiedLine","tolerance","highQuality","totalDistKm","sampledPoints","line2D","samplingInterval","seenPositions","Set","numSamples","ceil","dist","min","pt","posKey","JSON","stringify","geometry","coordinates","round","distance","startPt","endPt","sampleTrailLineImproved","sp","elevation","getElevationAtDistanceKm","elevationLookAhead","bearing","computeWeightedBearing","pitch","computePitchForElevation","targetBearings","windowSize","end","avgBearing","slice","p","targetBearing","getSource","addSource","addLayer","id","source","layout","paint","markerElement","className","backgroundImage","userLocation","width","backgroundSize","backgroundRepeat","backgroundPosition","marker","mapboxgl","element","rotationAlignment","pitchAlignment","offset","setLngLat","addTo","jumpTo","center","zoom","opts","cameraOptions","resolveFunc","lastFrameTime","performance","currentBearing","currentPitch","requestId","currentT","paused","finished","promise","Promise","resolve","updateUI","currentDistance","before","after","findSurroundingPoints","factor","currentPos","interpolatePoints","currentElev","interpolateValue","interpolateAngle","smoothBearingImproved","targetPitch","smoothPitchChange","progressCoords","getCoordsUpToDistance","setData","frame","deltaT","requestAnimationFrame","distanceKm","beforeIndex","low","high","mid","afterIndex","a1","a2","diff","v1","v2","coords","result","cumulative","segDist","fraction","current","target","deltaTime","minDeg","maxDeg","normCurrent","normTarget","cwDiff","ccwDiff","diffSize","degPerFrame","newBearing","smoothing","absDiff","abs","maxChange","smoothed","pause","cancelAnimationFrame","resume","stop","isPaused","fastForward","max","then","onFulfilled","onRejected","destroy","animateFullTrailImproved","currentDistKm","lookAheadKm","aheadDist","aheadElev","horizDist","gradientPercent","distKm","lookAheadMeters","weights","ahead","x","y","rad","averageBearing","name","props","title","String","default","mapInitialized","defaultCenter","featureCollection","mapboxToken","currentElevation","showLabels","animationController","isPlaying","finishedAnimation","labelStyle","top","left","zIndex","background","color","borderRadius","fontSize","pointerEvents","mounted","showMapModalForTrail","trail_id","track","trail_type","modal","graph_client","GetTrailLineString","parse","trail","initializeMap","showMapModalForPlannedTrail","planned_trail_id","GetPtv2PlannedTrailLineString","ptv2PlannedTrailById","lineStringFeatureCollection","showMapModalForRecordedTrail","recorded_trail_id","GetRecordedTrailLineStringById","input","recording","lineString","flyover_map","resize","beforeUnmount","off","container","$refs","mapContainer","antialias","lonlat","url","tileSize","maxzoom","setTerrain","exaggeration","renderFeatureCollection","addControl","clearLayers","getLayer","removeLayer","removeSource","lonLat","flyTo","geojson","feature","features","geometryType","elevM","convertedDistance","MeasurementPrefUtility","bigUnitFormatter","convertedElv","smallUnitFormatter","fitToCoordinates","bounds","extend","fitBounds","maxZoom","togglePlayback","ref","staticStyle","$event","flyover_vue","FlyoverPreview","MeasurementPref","constructor","measurementPref","isMetric","KilometersMeters","MilesFeet","MilesYards","KilometersFeet","MilesMeters","MilesFurlongs","MilesFathoms","NauticalMilesYards","MilesInches","LightYearsMeters","toPrettyString","static","measurement_preference","preferenceFromString","toLowerCase","string","mapbox","meter","MeterUnit","Meter","Feet","Yards","Furlongs","Fathoms","Inches","kilometer","KilometerUnit","Kilometers","Miles","NauticalMiles","LightYears","smallUnitValue","kmValue","KilometerUnitUtility","convertKilometerTo","MeterUnitUtility","convertMeterTo","bigUnitValue","meterValue","meterSymbol","kilometerSymbol","unit","Number","meterToUnitMultiplier","toFixed","kilometerToUnitMultiplier","gql","threeDimensionalModeIsEnabled","ThreeDimensionalMapManager","getTerrain","setPitch","disable3DMode","enable3DMode","SavedCenter","lat","lng","getCenter","getZoom","centerObject","centerString","lngLat","image","isPrintMap","toString","toPrintMapString","printMapUrl","localURL","protocol","hostname","port","userId","styleObject","styleString","standard","satellite","parks","hiking","national","historical","userIsPro","mapStyles","flashing","outdoors","standardMapStyleImage","satelliteMapStyleImage","parksMapStyleImage","hikingMapStyleImage","nationalMapStyleImage","historicalMapStyleImage","equals","other","TypesenseResponse","facet_counts","found","hits","out_of","page","request_params","search_cutoff","search_time_ms","query","filterString","typesensePageCount","axiosPostClient","axios","headers","typesenseSearchApiKey","postObject","createTypesensePostObject","jsonObject","post","body","results","flat","plainToClass","filterBy","ne","getNorthEast","sw","getSouthWest","nw","se","typesenseUrl","Array","toGeoJson","geoJson","trailHit","Difficulty","fromString","difficulty","Easy","Medium","Difficult","ExtraDifficult","a","typ","arrayItems","o","additional","json","js"],"sourceRoot":""}