{"version":3,"file":"BTVSwRUM.js","sources":["../../../../node_modules/vue/dist/vue.runtime.esm-bundler.js","../../../../store/map-settings/map-settings.ts"],"sourcesContent":["/**\n* vue v3.5.13\n* (c) 2018-present Yuxi (Evan) You and Vue contributors\n* @license MIT\n**/\nimport { initCustomFormatter, warn } from '@vue/runtime-dom';\nexport * from '@vue/runtime-dom';\n\nfunction initDev() {\n {\n initCustomFormatter();\n }\n}\n\nif (!!(process.env.NODE_ENV !== \"production\")) {\n initDev();\n}\nconst compile = () => {\n if (!!(process.env.NODE_ENV !== \"production\")) {\n warn(\n `Runtime compilation is not supported in this build of Vue.` + (` Configure your bundler to alias \"vue\" to \"vue/dist/vue.esm-bundler.js\".` )\n );\n }\n};\n\nexport { compile };\n","import { defineStore } from 'pinia'\nimport { StoreId } from '@/store'\n\n/* Types */\nimport { MapSettingsState } from '@/store/map-settings/map-settings.types'\nimport { MapSettings } from '@/store/city/city.types'\nimport { Success } from '@/api/results'\n\nconst defaultState: MapSettingsState = {\n mapSettings: {\n service_settings: {\n api_key: '',\n coords: [0, 0],\n zoom: 16,\n provider: '',\n },\n geocode_settings: {\n api_key: '',\n provider: '',\n },\n suggestion_settings: {\n api_key: '',\n provider: '',\n },\n },\n}\n\nexport const useMapSettingsStore = defineStore({\n id: StoreId.MAP_SETTINGS,\n state: (): MapSettingsState => defaultState,\n actions: {\n setMapSettings(mapSettings: MapSettings | null) {\n this.mapSettings = mapSettings || this.mapSettings\n },\n async fetchMapSettings() {\n const { $apiService } = useNuxtApp()\n\n const result = await $apiService.city.fetchMapSettings()\n\n if (result instanceof Success) {\n this.setMapSettings(result.data)\n }\n },\n },\n getters: {\n mapProviderName: ({ mapSettings }) =>\n mapSettings?.service_settings?.provider,\n mapProviderApiKey: ({ mapSettings }) =>\n mapSettings?.service_settings?.api_key,\n suggestionProviderApiKey: ({ mapSettings }) =>\n mapSettings?.suggestion_settings?.api_key,\n suggestionProviderName: ({ mapSettings }) =>\n mapSettings?.suggestion_settings?.provider,\n getCoords: ({ mapSettings }) => {\n return {\n longitude: mapSettings?.service_settings?.coords[1],\n latitude: mapSettings?.service_settings?.coords[0],\n }\n },\n zoom: ({ mapSettings }) => mapSettings?.service_settings?.zoom,\n },\n})\n"],"names":["defaultState","useMapSettingsStore","defineStore","StoreId","mapSettings","$apiService","useNuxtApp","result","Success","_a","_b"],"mappings":";;g0CAAA;AAAA;AAAA;AAAA;AAAA,k4DCQMA,GAAiC,CACrC,YAAa,CACX,iBAAkB,CAChB,QAAS,GACT,OAAQ,CAAC,EAAG,CAAC,EACb,KAAM,GACN,SAAU,EACZ,EACA,iBAAkB,CAChB,QAAS,GACT,SAAU,EACZ,EACA,oBAAqB,CACnB,QAAS,GACT,SAAU,EAAA,CACZ,CAEJ,EAEaC,GAAsBC,EAAY,CAC7C,GAAIC,EAAQ,aACZ,MAAO,IAAwBH,GAC/B,QAAS,CACP,eAAeI,EAAiC,CACzC,KAAA,YAAcA,GAAe,KAAK,WACzC,EACA,MAAM,kBAAmB,CACjB,KAAA,CAAE,YAAAC,CAAY,EAAIC,EAAW,EAE7BC,EAAS,MAAMF,EAAY,KAAK,iBAAiB,EAEnDE,aAAkBC,GACf,KAAA,eAAeD,EAAO,IAAI,CACjC,CAEJ,EACA,QAAS,CACP,gBAAiB,CAAC,CAAE,YAAAH,CAAY,IAAA,OAC9B,OAAAK,EAAAL,GAAA,YAAAA,EAAa,mBAAb,YAAAK,EAA+B,UACjC,kBAAmB,CAAC,CAAE,YAAAL,CAAY,IAAA,OAChC,OAAAK,EAAAL,GAAA,YAAAA,EAAa,mBAAb,YAAAK,EAA+B,SACjC,yBAA0B,CAAC,CAAE,YAAAL,CAAY,IAAA,OACvC,OAAAK,EAAAL,GAAA,YAAAA,EAAa,sBAAb,YAAAK,EAAkC,SACpC,uBAAwB,CAAC,CAAE,YAAAL,CAAY,IAAA,OACrC,OAAAK,EAAAL,GAAA,YAAAA,EAAa,sBAAb,YAAAK,EAAkC,UACpC,UAAW,CAAC,CAAE,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