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,EAAG,CAAC,SAAU,cACtB,IACHnuB,EAAAA,EAAAA,GAAoB,MAAOtJ,GAAY,EACrCsJ,EAAAA,EAAAA,GAAoB,MAAO,CAAEM,QAAS6tB,GAAiB,EACrDnuB,EAAAA,EAAAA,GAAoB,IAAK,CACvBrJ,OAAO6I,EAAAA,EAAAA,IAAgB,gBAAe0uB,EAAc7zB,MAAQ,OAAS,OACrE,cAAe,QACd,KAAM,IACT2F,EAAAA,EAAAA,GAAoB,OAAQ,MAAMH,EAAAA,EAAAA,IAAiBd,EAAKe,GAAG,YAAYouB,EAAc7zB,MAAQ,UAAY,mBAAoB,QAGjI2F,EAAAA,EAAAA,GAAoB,MAAOpJ,GAAY,EACrC8I,EAAAA,EAAAA,IAAa4uB,GAAc,CACzB3C,MAAMlsB,EAAAA,EAAAA,IAAOxG,GACbC,QAAQuG,EAAAA,EAAAA,IAAOvF,IACd,KAAM,EAAG,CAAC,OAAQ,mBAI3BqG,EAAAA,EAAAA,IAAoB,IAAI,EAE9B,ICzEA,MAAM,IAA2B,OAAgB,GAAQ,CAAC,CAAC,YAAY,qBAEvE,S","sources":["webpack://fittrackee_client/./src/components/Workout/WorkoutEdition.vue?1df7","webpack://fittrackee_client/./src/components/Workout/WorkoutEdition.vue","webpack://fittrackee_client/./src/views/workouts/AddWorkout.vue?212d","webpack://fittrackee_client/./src/views/workouts/AddWorkout.vue","webpack://fittrackee_client/./src/views/workouts/EditWorkout.vue?ba9e","webpack://fittrackee_client/./src/views/workouts/EditWorkout.vue","webpack://fittrackee_client/./src/components/Workout/WorkoutDetail/WorkoutCardTitle.vue?4e0b","webpack://fittrackee_client/./src/components/Workout/WorkoutDetail/WorkoutCardTitle.vue","webpack://fittrackee_client/./src/components/Workout/WorkoutDetail/WorkoutRecord.vue?0a89","webpack://fittrackee_client/./src/components/Workout/WorkoutDetail/WorkoutRecord.vue","webpack://fittrackee_client/./src/utils/weather.ts","webpack://fittrackee_client/./src/components/Workout/WorkoutDetail/WeatherWind.vue?bd35","webpack://fittrackee_client/./src/components/Workout/WorkoutDetail/WeatherWind.vue","webpack://fittrackee_client/./src/components/Workout/WorkoutDetail/WorkoutWeather.vue?84e1","webpack://fittrackee_client/./src/components/Workout/WorkoutDetail/WorkoutWeather.vue","webpack://fittrackee_client/./src/components/Workout/WorkoutDetail/WorkoutData.vue?ef29","webpack://fittrackee_client/./src/components/Workout/WorkoutDetail/WorkoutData.vue","webpack://fittrackee_client/./node_modules/@tmcw/togeojson/dist/togeojson.es.mjs","webpack://fittrackee_client/./node_modules/@vue-leaflet/vue-leaflet/dist/vue-leaflet.esm.js","webpack://fittrackee_client/./src/components/Workout/WorkoutDetail/WorkoutMap/CustomMarker.vue?3193","webpack://fittrackee_client/./src/components/Workout/WorkoutDetail/WorkoutMap/CustomMarker.vue","webpack://fittrackee_client/./src/components/Workout/WorkoutDetail/WorkoutMap/index.vue?a62d","webpack://fittrackee_client/./src/components/Workout/WorkoutDetail/WorkoutMap/index.vue","webpack://fittrackee_client/./src/components/Workout/WorkoutDetail/index.vue?8ebb","webpack://fittrackee_client/./src/components/Workout/WorkoutDetail/index.vue","webpack://fittrackee_client/./src/components/Workout/WorkoutDetail/WorkoutChart/legend.ts","webpack://fittrackee_client/./src/components/Workout/WorkoutDetail/WorkoutChart/index.vue?65aa","webpack://fittrackee_client/./src/components/Workout/WorkoutDetail/WorkoutChart/index.vue","webpack://fittrackee_client/./src/components/Workout/WorkoutDetail/WorkoutNotes.vue?a827","webpack://fittrackee_client/./src/components/Workout/WorkoutDetail/WorkoutNotes.vue","webpack://fittrackee_client/./src/components/Workout/WorkoutDetail/WorkoutSegments.vue?037e","webpack://fittrackee_client/./src/components/Workout/WorkoutDetail/WorkoutSegments.vue","webpack://fittrackee_client/./src/views/workouts/Workout.vue?3305","webpack://fittrackee_client/./src/views/workouts/Workout.vue","webpack://fittrackee_client/./src/components/Workouts/WorkoutsFilters.vue?c3bc","webpack://fittrackee_client/./src/components/Workouts/WorkoutsFilters.vue","webpack://fittrackee_client/./src/components/Workouts/WorkoutsList.vue?72e6","webpack://fittrackee_client/./src/components/Workouts/WorkoutsList.vue","webpack://fittrackee_client/./src/views/workouts/WorkoutsView.vue?ee31","webpack://fittrackee_client/./src/views/workouts/WorkoutsView.vue"],"sourcesContent":["import { defineComponent as _defineComponent } from 'vue'\nimport { unref as _unref, toDisplayString as _toDisplayString, createTextVNode as _createTextVNode, createElementVNode as _createElementVNode, openBlock as _openBlock, createElementBlock as _createElementBlock, createCommentVNode as _createCommentVNode, renderList as _renderList, Fragment as _Fragment, vModelSelect as _vModelSelect, withDirectives as _withDirectives, vModelText as _vModelText, normalizeClass as _normalizeClass, resolveComponent as _resolveComponent, createVNode as _createVNode, createBlock as _createBlock, withModifiers as _withModifiers, withCtx as _withCtx, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from \"vue\"\n\nconst _withScopeId = n => (_pushScopeId(\"data-v-4657c3ad\"),n=n(),_popScopeId(),n)\nconst _hoisted_1 = { id: \"workout-form\" }\nconst _hoisted_2 = [\"onSubmit\"]\nconst _hoisted_3 = { class: \"form-items\" }\nconst _hoisted_4 = {\n key: 0,\n class: \"form-item-radio\"\n}\nconst _hoisted_5 = [\"checked\", \"disabled\"]\nconst _hoisted_6 = { for: \"withGpx\" }\nconst _hoisted_7 = [\"checked\", \"disabled\"]\nconst _hoisted_8 = { for: \"withoutGpx\" }\nconst _hoisted_9 = { class: \"form-item\" }\nconst _hoisted_10 = [\"disabled\"]\nconst _hoisted_11 = [\"value\"]\nconst _hoisted_12 = {\n key: 1,\n class: \"form-item\"\n}\nconst _hoisted_13 = { for: \"gpxFile\" }\nconst _hoisted_14 = [\"disabled\"]\nconst _hoisted_15 = { class: \"files-help info-box\" }\nconst _hoisted_16 = {\n key: 2,\n class: \"form-item\"\n}\nconst _hoisted_17 = { for: \"title\" }\nconst _hoisted_18 = [\"required\", \"disabled\"]\nconst _hoisted_19 = { key: 3 }\nconst _hoisted_20 = { class: \"workout-date-duration\" }\nconst _hoisted_21 = { class: \"form-item\" }\nconst _hoisted_22 = { class: \"workout-date-time\" }\nconst _hoisted_23 = [\"disabled\"]\nconst _hoisted_24 = [\"disabled\"]\nconst _hoisted_25 = { class: \"form-item\" }\nconst _hoisted_26 = [\"disabled\"]\nconst _hoisted_27 = [\"disabled\"]\nconst _hoisted_28 = [\"disabled\"]\nconst _hoisted_29 = { class: \"form-item\" }\nconst _hoisted_30 = [\"disabled\"]\nconst _hoisted_31 = { class: \"form-item\" }\nconst _hoisted_32 = { key: 1 }\nconst _hoisted_33 = {\n key: 2,\n class: \"form-buttons\"\n}\nconst _hoisted_34 = [\"disabled\"]\nconst _hoisted_35 = [\"onClick\"]\n\nimport {\n ComputedRef,\n Ref,\n computed,\n reactive,\n ref,\n toRefs,\n watch,\n onMounted,\n onUnmounted,\n withDefaults,\n } from 'vue'\n import { useI18n } from 'vue-i18n'\n import { useRouter } from 'vue-router'\n\n import { ROOT_STORE, WORKOUTS_STORE } from '@/store/constants'\n import { TAppConfig } from '@/types/application'\n import { ISport } from '@/types/sports'\n import { IAuthUserProfile } from '@/types/user'\n import { IWorkout, IWorkoutForm } from '@/types/workouts'\n import { useStore } from '@/use/useStore'\n import { formatWorkoutDate, getDateWithTZ } from '@/utils/dates'\n import { getReadableFileSize } from '@/utils/files'\n import { translateSports } from '@/utils/sports'\n import { convertDistance } from '@/utils/units'\n\n interface Props {\n authUser: IAuthUserProfile\n sports: ISport[]\n isCreation?: boolean\n loading?: boolean\n workout?: IWorkout\n }\n \nexport default /*#__PURE__*/_defineComponent({\n __name: 'WorkoutEdition',\n props: {\n authUser: null,\n sports: null,\n isCreation: { type: Boolean, default: false },\n loading: { type: Boolean, default: false },\n workout: { default: () => ({} as IWorkout) }\n },\n setup(__props: any) {\n\nconst props = __props as { authUser: IAuthUserProfile, sports: ISport[], isCreation: boolean, loading: boolean, workout: IWorkout };\n\n \n\n const { t } = useI18n()\n const store = useStore()\n const router = useRouter()\n\n const { authUser, workout, isCreation, loading } = toRefs(props)\n const translatedSports: ComputedRef = computed(() =>\n translateSports(\n props.sports,\n t,\n 'is_active_for_user',\n workout.value.id ? [workout.value.sport_id] : []\n )\n )\n const appConfig: ComputedRef = computed(\n () => store.getters[ROOT_STORE.GETTERS.APP_CONFIG]\n )\n const fileSizeLimit = appConfig.value.max_single_file_size\n ? getReadableFileSize(appConfig.value.max_single_file_size)\n : ''\n const gpx_limit_import = appConfig.value.gpx_limit_import\n const zipSizeLimit = appConfig.value.max_zip_file_size\n ? getReadableFileSize(appConfig.value.max_zip_file_size)\n : ''\n const errorMessages: ComputedRef = computed(\n () => store.getters[ROOT_STORE.GETTERS.ERROR_MESSAGES]\n )\n const workoutForm = reactive({\n sport_id: '',\n title: '',\n notes: '',\n workoutDate: '',\n workoutTime: '',\n workoutDurationHour: '',\n workoutDurationMinutes: '',\n workoutDurationSeconds: '',\n workoutDistance: '',\n })\n const withGpx = ref(\n props.workout.id ? props.workout.with_gpx : props.isCreation\n )\n let gpxFile: File | null = null\n const formErrors = ref(false)\n const payloadErrorMessages: Ref = ref([])\n\n onMounted(() => {\n if (props.workout.id) {\n formatWorkoutForm(props.workout)\n }\n })\n\n function updateNotes(value: string) {\n workoutForm.notes = value\n }\n function updateWithGpx() {\n withGpx.value = !withGpx.value\n formErrors.value = false\n }\n function updateFile(event: Event & { target: HTMLInputElement }) {\n if (event.target.files) {\n gpxFile = event.target.files[0]\n }\n }\n function formatWorkoutForm(workout: IWorkout) {\n workoutForm.sport_id = `${workout.sport_id}`\n workoutForm.title = workout.title\n workoutForm.notes = workout.notes\n if (!workout.with_gpx) {\n const workoutDateTime = formatWorkoutDate(\n getDateWithTZ(workout.workout_date, props.authUser.timezone),\n 'yyyy-MM-dd'\n )\n const duration = workout.duration.split(':')\n workoutForm.workoutDistance = `${\n authUser.value.imperial_units\n ? convertDistance(workout.distance, 'km', 'mi', 2)\n : parseFloat(workout.distance.toFixed(2))\n }`\n workoutForm.workoutDate = workoutDateTime.workout_date\n workoutForm.workoutTime = workoutDateTime.workout_time\n workoutForm.workoutDurationHour = duration[0]\n workoutForm.workoutDurationMinutes = duration[1]\n workoutForm.workoutDurationSeconds = duration[2]\n }\n }\n function isDistanceInvalid() {\n return payloadErrorMessages.value.includes('workouts.INVALID_DISTANCE')\n }\n function isDurationInvalid() {\n return payloadErrorMessages.value.includes('workouts.INVALID_DURATION')\n }\n function formatPayload(payload: IWorkoutForm) {\n payloadErrorMessages.value = []\n payload.title = workoutForm.title\n payload.duration =\n +workoutForm.workoutDurationHour * 3600 +\n +workoutForm.workoutDurationMinutes * 60 +\n +workoutForm.workoutDurationSeconds\n if (payload.duration <= 0) {\n payloadErrorMessages.value.push('workouts.INVALID_DURATION')\n }\n payload.distance = authUser.value.imperial_units\n ? convertDistance(+workoutForm.workoutDistance, 'mi', 'km', 3)\n : +workoutForm.workoutDistance\n if (payload.distance <= 0) {\n payloadErrorMessages.value.push('workouts.INVALID_DISTANCE')\n }\n payload.workout_date = `${workoutForm.workoutDate} ${workoutForm.workoutTime}`\n }\n function updateWorkout() {\n const payload: IWorkoutForm = {\n sport_id: +workoutForm.sport_id,\n notes: workoutForm.notes,\n }\n if (props.workout.id) {\n if (props.workout.with_gpx) {\n payload.title = workoutForm.title\n } else {\n formatPayload(payload)\n }\n store.dispatch(WORKOUTS_STORE.ACTIONS.EDIT_WORKOUT, {\n workoutId: props.workout.id,\n data: payload,\n })\n } else {\n if (withGpx.value) {\n if (!gpxFile) {\n const errorMessage = 'workouts.NO_FILE_PROVIDED'\n store.commit(ROOT_STORE.MUTATIONS.SET_ERROR_MESSAGES, errorMessage)\n return\n }\n payload.file = gpxFile\n store.dispatch(WORKOUTS_STORE.ACTIONS.ADD_WORKOUT, payload)\n } else {\n formatPayload(payload)\n if (payloadErrorMessages.value.length > 0) {\n store.commit(\n ROOT_STORE.MUTATIONS.SET_ERROR_MESSAGES,\n payloadErrorMessages.value\n )\n } else {\n store.dispatch(\n WORKOUTS_STORE.ACTIONS.ADD_WORKOUT_WITHOUT_GPX,\n payload\n )\n }\n }\n }\n }\n function onCancel() {\n if (props.workout.id) {\n router.push({\n name: 'Workout',\n params: { workoutId: props.workout.id },\n })\n } else {\n router.go(-1)\n }\n }\n function invalidateForm() {\n formErrors.value = true\n }\n\n onUnmounted(() => store.commit(ROOT_STORE.MUTATIONS.EMPTY_ERROR_MESSAGES))\n\n watch(\n () => props.workout,\n async (\n newWorkout: IWorkout | undefined,\n previousWorkout: IWorkout | undefined\n ) => {\n if (newWorkout !== previousWorkout && newWorkout && newWorkout.id) {\n formatWorkoutForm(newWorkout)\n }\n }\n )\n\nreturn (_ctx: any,_cache: any) => {\n const _component_CustomTextArea = _resolveComponent(\"CustomTextArea\")!\n const _component_ErrorMessage = _resolveComponent(\"ErrorMessage\")!\n const _component_Loader = _resolveComponent(\"Loader\")!\n const _component_Card = _resolveComponent(\"Card\")!\n\n return (_openBlock(), _createElementBlock(\"div\", {\n id: \"workout-edition\",\n class: _normalizeClass([\"center-card with-margin\", { 'center-form': _unref(workout) && _unref(workout).with_gpx }])\n }, [\n _createVNode(_component_Card, null, {\n title: _withCtx(() => [\n _createTextVNode(_toDisplayString(_ctx.$t(`workouts.${_unref(isCreation) ? 'ADD' : 'EDIT'}_WORKOUT`)), 1)\n ]),\n content: _withCtx(() => [\n _createElementVNode(\"div\", _hoisted_1, [\n _createElementVNode(\"form\", {\n class: _normalizeClass({ errors: formErrors.value }),\n onSubmit: _withModifiers(updateWorkout, [\"prevent\"])\n }, [\n _createElementVNode(\"div\", _hoisted_3, [\n (_unref(isCreation))\n ? (_openBlock(), _createElementBlock(\"div\", _hoisted_4, [\n _createElementVNode(\"div\", null, [\n _createElementVNode(\"input\", {\n id: \"withGpx\",\n type: \"radio\",\n checked: withGpx.value,\n disabled: _unref(loading),\n onClick: updateWithGpx\n }, null, 8, _hoisted_5),\n _createElementVNode(\"label\", _hoisted_6, _toDisplayString(_ctx.$t('workouts.WITH_GPX')), 1)\n ]),\n _createElementVNode(\"div\", null, [\n _createElementVNode(\"input\", {\n id: \"withoutGpx\",\n type: \"radio\",\n checked: !withGpx.value,\n disabled: _unref(loading),\n onClick: updateWithGpx\n }, null, 8, _hoisted_7),\n _createElementVNode(\"label\", _hoisted_8, _toDisplayString(_ctx.$t('workouts.WITHOUT_GPX')), 1)\n ])\n ]))\n : _createCommentVNode(\"\", true),\n _createElementVNode(\"div\", _hoisted_9, [\n _createElementVNode(\"label\", null, _toDisplayString(_ctx.$t('workouts.SPORT', 1)) + \": \", 1),\n _withDirectives(_createElementVNode(\"select\", {\n id: \"sport\",\n required: \"\",\n onInvalid: invalidateForm,\n disabled: _unref(loading),\n \"onUpdate:modelValue\": _cache[0] || (_cache[0] = ($event: any) => ((workoutForm.sport_id) = $event))\n }, [\n (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(_unref(translatedSports), (sport) => {\n return (_openBlock(), _createElementBlock(\"option\", {\n value: sport.id,\n key: sport.id\n }, _toDisplayString(sport.translatedLabel), 9, _hoisted_11))\n }), 128))\n ], 40, _hoisted_10), [\n [_vModelSelect, workoutForm.sport_id]\n ])\n ]),\n (_unref(isCreation) && withGpx.value)\n ? (_openBlock(), _createElementBlock(\"div\", _hoisted_12, [\n _createElementVNode(\"label\", _hoisted_13, _toDisplayString(_ctx.$t('workouts.GPX_FILE')) + \" \" + _toDisplayString(_ctx.$t('workouts.ZIP_ARCHIVE_DESCRIPTION')) + \": \", 1),\n _createElementVNode(\"input\", {\n id: \"gpxFile\",\n name: \"gpxFile\",\n type: \"file\",\n accept: \".gpx, .zip\",\n disabled: _unref(loading),\n required: \"\",\n onInvalid: invalidateForm,\n onInput: updateFile\n }, null, 40, _hoisted_14),\n _createElementVNode(\"div\", _hoisted_15, [\n _createElementVNode(\"div\", null, [\n _createElementVNode(\"strong\", null, _toDisplayString(_ctx.$t('workouts.GPX_FILE')) + \":\", 1),\n _createElementVNode(\"ul\", null, [\n _createElementVNode(\"li\", null, _toDisplayString(_ctx.$t('workouts.MAX_SIZE')) + \": \" + _toDisplayString(_unref(fileSizeLimit)), 1)\n ])\n ]),\n _createElementVNode(\"div\", null, [\n _createElementVNode(\"strong\", null, _toDisplayString(_ctx.$t('workouts.ZIP_ARCHIVE')) + \":\", 1),\n _createElementVNode(\"ul\", null, [\n _createElementVNode(\"li\", null, _toDisplayString(_ctx.$t('workouts.NO_FOLDER')), 1),\n _createElementVNode(\"li\", null, _toDisplayString(_ctx.$t('workouts.MAX_FILES')) + \": \" + _toDisplayString(_unref(gpx_limit_import)), 1),\n _createElementVNode(\"li\", null, _toDisplayString(_ctx.$t('workouts.MAX_SIZE')) + \": \" + _toDisplayString(_unref(zipSizeLimit)), 1)\n ])\n ])\n ])\n ]))\n : (_openBlock(), _createElementBlock(\"div\", _hoisted_16, [\n _createElementVNode(\"label\", _hoisted_17, _toDisplayString(_ctx.$t('workouts.TITLE')) + \": \", 1),\n _withDirectives(_createElementVNode(\"input\", {\n id: \"title\",\n name: \"title\",\n type: \"text\",\n required: !_unref(isCreation),\n onInvalid: invalidateForm,\n disabled: _unref(loading),\n \"onUpdate:modelValue\": _cache[1] || (_cache[1] = ($event: any) => ((workoutForm.title) = $event))\n }, null, 40, _hoisted_18), [\n [_vModelText, workoutForm.title]\n ])\n ])),\n (!withGpx.value)\n ? (_openBlock(), _createElementBlock(\"div\", _hoisted_19, [\n _createElementVNode(\"div\", _hoisted_20, [\n _createElementVNode(\"div\", _hoisted_21, [\n _createElementVNode(\"label\", null, _toDisplayString(_ctx.$t('workouts.WORKOUT_DATE')) + \":\", 1),\n _createElementVNode(\"div\", _hoisted_22, [\n _withDirectives(_createElementVNode(\"input\", {\n id: \"workout-date\",\n name: \"workout-date\",\n type: \"date\",\n required: \"\",\n onInvalid: invalidateForm,\n disabled: _unref(loading),\n \"onUpdate:modelValue\": _cache[2] || (_cache[2] = ($event: any) => ((workoutForm.workoutDate) = $event))\n }, null, 40, _hoisted_23), [\n [_vModelText, workoutForm.workoutDate]\n ]),\n _withDirectives(_createElementVNode(\"input\", {\n id: \"workout-time\",\n name: \"workout-time\",\n class: \"workout-time\",\n type: \"time\",\n required: \"\",\n onInvalid: invalidateForm,\n disabled: _unref(loading),\n \"onUpdate:modelValue\": _cache[3] || (_cache[3] = ($event: any) => ((workoutForm.workoutTime) = $event))\n }, null, 40, _hoisted_24), [\n [_vModelText, workoutForm.workoutTime]\n ])\n ])\n ]),\n _createElementVNode(\"div\", _hoisted_25, [\n _createElementVNode(\"label\", null, _toDisplayString(_ctx.$t('workouts.DURATION')) + \":\", 1),\n _createElementVNode(\"div\", null, [\n _withDirectives(_createElementVNode(\"input\", {\n id: \"workout-duration-hour\",\n name: \"workout-duration-hour\",\n class: _normalizeClass([\"workout-duration\", { errored: isDurationInvalid() }]),\n type: \"text\",\n placeholder: \"HH\",\n minlength: \"1\",\n maxlength: \"2\",\n pattern: \"^([0-1]?[0-9]|2[0-3])$\",\n required: \"\",\n onInvalid: invalidateForm,\n disabled: _unref(loading),\n \"onUpdate:modelValue\": _cache[4] || (_cache[4] = ($event: any) => ((workoutForm.workoutDurationHour) = $event))\n }, null, 42, _hoisted_26), [\n [_vModelText, workoutForm.workoutDurationHour]\n ]),\n _createTextVNode(\" : \"),\n _withDirectives(_createElementVNode(\"input\", {\n id: \"workout-duration-minutes\",\n name: \"workout-duration-minutes\",\n class: _normalizeClass([\"workout-duration\", { errored: isDurationInvalid() }]),\n type: \"text\",\n pattern: \"^([0-5][0-9])$\",\n minlength: \"2\",\n maxlength: \"2\",\n placeholder: \"MM\",\n required: \"\",\n onInvalid: invalidateForm,\n disabled: _unref(loading),\n \"onUpdate:modelValue\": _cache[5] || (_cache[5] = ($event: any) => ((workoutForm.workoutDurationMinutes) = $event))\n }, null, 42, _hoisted_27), [\n [_vModelText, workoutForm.workoutDurationMinutes]\n ]),\n _createTextVNode(\" : \"),\n _withDirectives(_createElementVNode(\"input\", {\n id: \"workout-duration-seconds\",\n name: \"workout-duration-seconds\",\n class: _normalizeClass([\"workout-duration\", { errored: isDurationInvalid() }]),\n type: \"text\",\n pattern: \"^([0-5][0-9])$\",\n minlength: \"2\",\n maxlength: \"2\",\n placeholder: \"SS\",\n required: \"\",\n onInvalid: invalidateForm,\n disabled: _unref(loading),\n \"onUpdate:modelValue\": _cache[6] || (_cache[6] = ($event: any) => ((workoutForm.workoutDurationSeconds) = $event))\n }, null, 42, _hoisted_28), [\n [_vModelText, workoutForm.workoutDurationSeconds]\n ])\n ])\n ])\n ]),\n _createElementVNode(\"div\", _hoisted_29, [\n _createElementVNode(\"label\", null, _toDisplayString(_ctx.$t('workouts.DISTANCE')) + \" (\" + _toDisplayString(_unref(authUser).imperial_units ? 'mi' : 'km') + \"): \", 1),\n _withDirectives(_createElementVNode(\"input\", {\n class: _normalizeClass({ errored: isDistanceInvalid() }),\n name: \"workout-distance\",\n type: \"number\",\n min: \"0\",\n step: \"0.001\",\n required: \"\",\n onInvalid: invalidateForm,\n disabled: _unref(loading),\n \"onUpdate:modelValue\": _cache[7] || (_cache[7] = ($event: any) => ((workoutForm.workoutDistance) = $event))\n }, null, 42, _hoisted_30), [\n [_vModelText, workoutForm.workoutDistance]\n ])\n ])\n ]))\n : _createCommentVNode(\"\", true),\n _createElementVNode(\"div\", _hoisted_31, [\n _createElementVNode(\"label\", null, _toDisplayString(_ctx.$t('workouts.NOTES')) + \": \", 1),\n _createVNode(_component_CustomTextArea, {\n name: \"notes\",\n input: workoutForm.notes,\n disabled: _unref(loading),\n onUpdateValue: updateNotes\n }, null, 8, [\"input\", \"disabled\"])\n ])\n ]),\n (_unref(errorMessages))\n ? (_openBlock(), _createBlock(_component_ErrorMessage, {\n key: 0,\n message: _unref(errorMessages)\n }, null, 8, [\"message\"]))\n : _createCommentVNode(\"\", true),\n (_unref(loading))\n ? (_openBlock(), _createElementBlock(\"div\", _hoisted_32, [\n _createVNode(_component_Loader)\n ]))\n : (_openBlock(), _createElementBlock(\"div\", _hoisted_33, [\n _createElementVNode(\"button\", {\n class: \"confirm\",\n type: \"submit\",\n disabled: _unref(loading)\n }, _toDisplayString(_ctx.$t('buttons.SUBMIT')), 9, _hoisted_34),\n _createElementVNode(\"button\", {\n class: \"cancel\",\n onClick: _withModifiers(onCancel, [\"prevent\"])\n }, _toDisplayString(_ctx.$t('buttons.CANCEL')), 9, _hoisted_35)\n ]))\n ], 42, _hoisted_2)\n ])\n ]),\n _: 1\n })\n ], 2))\n}\n}\n\n})","import script from \"./WorkoutEdition.vue?vue&type=script&setup=true&lang=ts\"\nexport * from \"./WorkoutEdition.vue?vue&type=script&setup=true&lang=ts\"\n\nimport \"./WorkoutEdition.vue?vue&type=style&index=0&id=4657c3ad&lang=scss&scoped=true\"\n\nimport exportComponent from \"/mnt/data-lnx/Devs/00_Perso/FitTrackee/fittrackee_client/node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-4657c3ad\"]])\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { unref as _unref, createVNode as _createVNode, createElementVNode as _createElementVNode, openBlock as _openBlock, createElementBlock as _createElementBlock } from \"vue\"\n\nconst _hoisted_1 = {\n id: \"add-workout\",\n class: \"view\"\n}\nconst _hoisted_2 = { class: \"container\" }\n\nimport { ComputedRef, computed } from 'vue'\n\n import WorkoutEdition from '@/components/Workout/WorkoutEdition.vue'\n import {\n AUTH_USER_STORE,\n SPORTS_STORE,\n WORKOUTS_STORE,\n } from '@/store/constants'\n import { ISport } from '@/types/sports'\n import { IAuthUserProfile } from '@/types/user'\n import { IWorkoutData } from '@/types/workouts'\n import { useStore } from '@/use/useStore'\n\n \nexport default /*#__PURE__*/_defineComponent({\n __name: 'AddWorkout',\n setup(__props) {\n\n const store = useStore()\n\n const sports: ComputedRef = computed(\n () => store.getters[SPORTS_STORE.GETTERS.SPORTS]\n )\n const authUser: ComputedRef = computed(\n () => store.getters[AUTH_USER_STORE.GETTERS.AUTH_USER_PROFILE]\n )\n const workoutData: ComputedRef = computed(\n () => store.getters[WORKOUTS_STORE.GETTERS.WORKOUT_DATA]\n )\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(\"div\", _hoisted_1, [\n _createElementVNode(\"div\", _hoisted_2, [\n _createVNode(WorkoutEdition, {\n authUser: _unref(authUser),\n sports: _unref(sports),\n isCreation: true,\n loading: _unref(workoutData).loading\n }, null, 8, [\"authUser\", \"sports\", \"loading\"])\n ])\n ]))\n}\n}\n\n})","import script from \"./AddWorkout.vue?vue&type=script&setup=true&lang=ts\"\nexport * from \"./AddWorkout.vue?vue&type=script&setup=true&lang=ts\"\n\nconst __exports__ = script;\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { unref as _unref, openBlock as _openBlock, createBlock as _createBlock, createCommentVNode as _createCommentVNode, createElementVNode as _createElementVNode, createElementBlock as _createElementBlock } from \"vue\"\n\nconst _hoisted_1 = {\n id: \"edit-workout\",\n class: \"view\"\n}\nconst _hoisted_2 = { class: \"container\" }\n\nimport { computed, watch, onBeforeMount, ComputedRef } from 'vue'\n import { useRoute } from 'vue-router'\n\n import WorkoutEdition from '@/components/Workout/WorkoutEdition.vue'\n import {\n AUTH_USER_STORE,\n SPORTS_STORE,\n WORKOUTS_STORE,\n } from '@/store/constants'\n import { ISport } from '@/types/sports'\n import { IAuthUserProfile } from '@/types/user'\n import { IWorkoutData } from '@/types/workouts'\n import { useStore } from '@/use/useStore'\n\n \nexport default /*#__PURE__*/_defineComponent({\n __name: 'EditWorkout',\n setup(__props) {\n\n const route = useRoute()\n const store = useStore()\n\n const authUser: ComputedRef = computed(\n () => store.getters[AUTH_USER_STORE.GETTERS.AUTH_USER_PROFILE]\n )\n const sports: ComputedRef = computed(\n () => store.getters[SPORTS_STORE.GETTERS.SPORTS]\n )\n const workoutData: ComputedRef = computed(\n () => store.getters[WORKOUTS_STORE.GETTERS.WORKOUT_DATA]\n )\n\n onBeforeMount(() => {\n store.dispatch(WORKOUTS_STORE.ACTIONS.GET_WORKOUT_DATA, {\n workoutId: route.params.workoutId,\n })\n })\n\n watch(\n () => route.params.workoutId,\n async (newWorkoutId) => {\n if (!newWorkoutId) {\n store.commit(WORKOUTS_STORE.MUTATIONS.EMPTY_WORKOUT)\n }\n }\n )\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(\"div\", _hoisted_1, [\n _createElementVNode(\"div\", _hoisted_2, [\n (_unref(workoutData).workout.id)\n ? (_openBlock(), _createBlock(WorkoutEdition, {\n key: 0,\n authUser: _unref(authUser),\n sports: _unref(sports),\n workout: _unref(workoutData).workout,\n loading: _unref(workoutData).loading\n }, null, 8, [\"authUser\", \"sports\", \"workout\", \"loading\"]))\n : _createCommentVNode(\"\", true)\n ])\n ]))\n}\n}\n\n})","import script from \"./EditWorkout.vue?vue&type=script&setup=true&lang=ts\"\nexport * from \"./EditWorkout.vue?vue&type=script&setup=true&lang=ts\"\n\nconst __exports__ = script;\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { unref as _unref, createElementVNode as _createElementVNode, normalizeClass as _normalizeClass, resolveComponent as _resolveComponent, createVNode as _createVNode, toDisplayString as _toDisplayString, withModifiers as _withModifiers, openBlock as _openBlock, createElementBlock as _createElementBlock, createCommentVNode as _createCommentVNode, createTextVNode as _createTextVNode, withCtx as _withCtx, createBlock as _createBlock, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from \"vue\"\n\nconst _withScopeId = n => (_pushScopeId(\"data-v-4d9f9a8a\"),n=n(),_popScopeId(),n)\nconst _hoisted_1 = { id: \"workout-card-title\" }\nconst _hoisted_2 = [\"title\"]\nconst _hoisted_3 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"i\", {\n class: \"fa fa-chevron-left\",\n \"aria-hidden\": \"true\"\n}, null, -1))\nconst _hoisted_4 = [\n _hoisted_3\n]\nconst _hoisted_5 = { class: \"workout-card-title\" }\nconst _hoisted_6 = { class: \"workout-title-date\" }\nconst _hoisted_7 = {\n key: 0,\n class: \"workout-title\"\n}\nconst _hoisted_8 = {\n key: 1,\n class: \"workout-title\"\n}\nconst _hoisted_9 = { class: \"workout-segment\" }\nconst _hoisted_10 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"i\", {\n class: \"fa fa-map-marker\",\n \"aria-hidden\": \"true\"\n}, null, -1))\nconst _hoisted_11 = { class: \"workout-date\" }\nconst _hoisted_12 = { class: \"workout-link\" }\nconst _hoisted_13 = [\"title\"]\nconst _hoisted_14 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"i\", {\n class: \"fa fa-chevron-right\",\n \"aria-hidden\": \"true\"\n}, null, -1))\nconst _hoisted_15 = [\n _hoisted_14\n]\n\nimport { toRefs } from 'vue'\n\n import authApi from '@/api/authApi'\n import { ISport } from '@/types/sports'\n import { IWorkoutObject } from '@/types/workouts'\n\n interface Props {\n sport: ISport\n workoutObject: IWorkoutObject\n }\n \nexport default /*#__PURE__*/_defineComponent({\n __name: 'WorkoutCardTitle',\n props: {\n sport: null,\n workoutObject: null\n },\n emits: ['displayModal'],\n setup(__props: any, { emit }) {\n\nconst props = __props as {\n sport: ISport\n workoutObject: IWorkoutObject\n };\n\n \n\n \n\n const { sport, workoutObject } = toRefs(props)\n\n async function downloadGpx(workoutId: string) {\n await authApi\n .get(`workouts/${workoutId}/gpx/download`, {\n responseType: 'blob',\n })\n .then((response) => {\n const gpxFileUrl = window.URL.createObjectURL(\n new Blob([response.data], { type: 'application/gpx+xml' })\n )\n const gpxLink = document.createElement('a')\n gpxLink.href = gpxFileUrl\n gpxLink.setAttribute('download', `${workoutId}.gpx`)\n document.body.appendChild(gpxLink)\n gpxLink.click()\n })\n }\n\nreturn (_ctx: any,_cache: any) => {\n const _component_SportImage = _resolveComponent(\"SportImage\")!\n const _component_router_link = _resolveComponent(\"router-link\")!\n\n return (_openBlock(), _createElementBlock(\"div\", _hoisted_1, [\n _createElementVNode(\"div\", {\n class: _normalizeClass([\"workout-previous workout-arrow\", { inactive: !_unref(workoutObject).previousUrl }]),\n title: \n _unref(workoutObject).previousUrl\n ? _ctx.$t(`workouts.PREVIOUS_${_unref(workoutObject).type}`)\n : _ctx.$t(`workouts.NO_PREVIOUS_${_unref(workoutObject).type}`)\n ,\n onClick: _cache[0] || (_cache[0] = ($event: any) => (\n _unref(workoutObject).previousUrl\n ? _ctx.$router.push(_unref(workoutObject).previousUrl)\n : null\n ))\n }, _hoisted_4, 10, _hoisted_2),\n _createElementVNode(\"div\", _hoisted_5, [\n _createVNode(_component_SportImage, {\n \"sport-label\": _unref(sport).label,\n color: _unref(sport).color\n }, null, 8, [\"sport-label\", \"color\"]),\n _createElementVNode(\"div\", _hoisted_6, [\n (_unref(workoutObject).type === 'WORKOUT')\n ? (_openBlock(), _createElementBlock(\"div\", _hoisted_7, [\n _createElementVNode(\"span\", null, _toDisplayString(_unref(workoutObject).title), 1),\n _createElementVNode(\"i\", {\n class: \"fa fa-edit\",\n \"aria-hidden\": \"true\",\n onClick: _cache[1] || (_cache[1] = ($event: any) => (\n _ctx.$router.push({\n name: 'EditWorkout',\n params: { workoutId: _unref(workoutObject).workoutId },\n })\n ))\n }),\n (_unref(workoutObject).with_gpx)\n ? (_openBlock(), _createElementBlock(\"i\", {\n key: 0,\n class: \"fa fa-download\",\n \"aria-hidden\": \"true\",\n onClick: _cache[2] || (_cache[2] = _withModifiers(($event: any) => (downloadGpx(_unref(workoutObject).workoutId)), [\"prevent\"]))\n }))\n : _createCommentVNode(\"\", true),\n _createElementVNode(\"i\", {\n class: \"fa fa-trash\",\n \"aria-hidden\": \"true\",\n onClick: _cache[3] || (_cache[3] = ($event: any) => (emit('displayModal', true)))\n })\n ]))\n : (_openBlock(), _createElementBlock(\"div\", _hoisted_8, [\n _createTextVNode(_toDisplayString(_unref(workoutObject).title) + \" \", 1),\n _createElementVNode(\"span\", _hoisted_9, [\n _createTextVNode(\" — \"),\n _hoisted_10,\n _createTextVNode(\" \" + _toDisplayString(_ctx.$t('workouts.SEGMENT')) + \" \" + _toDisplayString(_unref(workoutObject).segmentId + 1), 1)\n ])\n ])),\n _createElementVNode(\"div\", _hoisted_11, [\n _createTextVNode(_toDisplayString(_unref(workoutObject).workoutDate) + \" - \" + _toDisplayString(_unref(workoutObject).workoutTime) + \" \", 1),\n _createElementVNode(\"span\", _hoisted_12, [\n (_unref(workoutObject).type === 'SEGMENT')\n ? (_openBlock(), _createBlock(_component_router_link, {\n key: 0,\n to: {\n name: 'Workout',\n params: { workoutId: _unref(workoutObject).workoutId },\n }\n }, {\n default: _withCtx(() => [\n _createTextVNode(\" > \" + _toDisplayString(_ctx.$t('workouts.BACK_TO_WORKOUT')), 1)\n ]),\n _: 1\n }, 8, [\"to\"]))\n : _createCommentVNode(\"\", true)\n ])\n ])\n ])\n ]),\n _createElementVNode(\"div\", {\n class: _normalizeClass([\"workout-next workout-arrow\", { inactive: !_unref(workoutObject).nextUrl }]),\n title: \n _unref(workoutObject).nextUrl\n ? _ctx.$t(`workouts.NEXT_${_unref(workoutObject).type}`)\n : _ctx.$t(`workouts.NO_NEXT_${_unref(workoutObject).type}`)\n ,\n onClick: _cache[4] || (_cache[4] = ($event: any) => (\n _unref(workoutObject).nextUrl ? _ctx.$router.push(_unref(workoutObject).nextUrl) : null\n ))\n }, _hoisted_15, 10, _hoisted_13)\n ]))\n}\n}\n\n})","import script from \"./WorkoutCardTitle.vue?vue&type=script&setup=true&lang=ts\"\nexport * from \"./WorkoutCardTitle.vue?vue&type=script&setup=true&lang=ts\"\n\nimport \"./WorkoutCardTitle.vue?vue&type=style&index=0&id=4d9f9a8a&lang=scss&scoped=true\"\n\nimport exportComponent from \"/mnt/data-lnx/Devs/00_Perso/FitTrackee/fittrackee_client/node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-4d9f9a8a\"]])\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { unref as _unref, createElementVNode as _createElementVNode, openBlock as _openBlock, createElementBlock as _createElementBlock, createCommentVNode as _createCommentVNode, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from \"vue\"\n\nconst _withScopeId = n => (_pushScopeId(\"data-v-1a5282f6\"),n=n(),_popScopeId(),n)\nconst _hoisted_1 = {\n key: 0,\n class: \"workout-record\"\n}\nconst _hoisted_2 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"sup\", null, [\n /*#__PURE__*/_createElementVNode(\"i\", {\n class: \"fa fa-trophy\",\n \"aria-hidden\": \"true\"\n })\n], -1))\nconst _hoisted_3 = [\n _hoisted_2\n]\n\nimport { toRefs } from 'vue'\n\n import { IWorkoutObject } from '@/types/workouts'\n\n interface Props {\n recordType: string\n workoutObject: IWorkoutObject\n }\n \nexport default /*#__PURE__*/_defineComponent({\n __name: 'WorkoutRecord',\n props: {\n recordType: null,\n workoutObject: null\n },\n setup(__props: any) {\n\nconst props = __props as {\n recordType: string\n workoutObject: IWorkoutObject\n };\n\n \n\n const { recordType, workoutObject } = toRefs(props)\n\nreturn (_ctx: any,_cache: any) => {\n return (\n _unref(workoutObject).records &&\n _unref(workoutObject).records.find((record) => record.record_type === _unref(recordType))\n )\n ? (_openBlock(), _createElementBlock(\"span\", _hoisted_1, _hoisted_3))\n : _createCommentVNode(\"\", true)\n}\n}\n\n})","import script from \"./WorkoutRecord.vue?vue&type=script&setup=true&lang=ts\"\nexport * from \"./WorkoutRecord.vue?vue&type=script&setup=true&lang=ts\"\n\nimport \"./WorkoutRecord.vue?vue&type=style&index=0&id=1a5282f6&lang=scss&scoped=true\"\n\nimport exportComponent from \"/mnt/data-lnx/Devs/00_Perso/FitTrackee/fittrackee_client/node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-1a5282f6\"]])\n\nexport default __exports__","const directions = [\n 'N',\n 'NNE',\n 'NE',\n 'ENE',\n 'E',\n 'ESE',\n 'SE',\n 'SSE',\n 'S',\n 'SSW',\n 'SW',\n 'WSW',\n 'W',\n 'WNW',\n 'NW',\n 'NNW',\n]\n\nexport const convertDegreeToDirection = (angle: number): string => {\n const value = Math.floor(angle / 22.5 + 0.5)\n return directions[value % 16]\n}\n","import { defineComponent as _defineComponent } from 'vue'\nimport { unref as _unref, resolveComponent as _resolveComponent, createVNode as _createVNode, toDisplayString as _toDisplayString, normalizeStyle as _normalizeStyle, openBlock as _openBlock, createElementBlock as _createElementBlock, createCommentVNode as _createCommentVNode, createElementVNode as _createElementVNode, createTextVNode as _createTextVNode, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from \"vue\"\n\nconst _withScopeId = n => (_pushScopeId(\"data-v-46a7c31c\"),n=n(),_popScopeId(),n)\nconst _hoisted_1 = { class: \"wind\" }\nconst _hoisted_2 = { class: \"wind-bearing\" }\nconst _hoisted_3 = [\"title\"]\n\nimport { toRefs } from 'vue'\n import { useI18n } from 'vue-i18n'\n\n import { IWeather } from '@/types/workouts'\n import { convertDegreeToDirection } from '@/utils/weather'\n\n interface Props {\n weather: IWeather\n useImperialUnits: boolean\n }\n \nexport default /*#__PURE__*/_defineComponent({\n __name: 'WeatherWind',\n props: {\n weather: null,\n useImperialUnits: { type: Boolean }\n },\n setup(__props: any) {\n\nconst props = __props as {\n weather: IWeather\n useImperialUnits: boolean\n };\n\n \n\n const { useImperialUnits, weather } = toRefs(props)\n const { t } = useI18n()\n\n function getWindDirectionTitle(windBearing: number): string {\n return t(\n `workouts.WEATHER.WIND_DIRECTIONS.${convertDegreeToDirection(\n windBearing\n )}`\n )\n }\n\nreturn (_ctx: any,_cache: any) => {\n const _component_Distance = _resolveComponent(\"Distance\")!\n\n return (_openBlock(), _createElementBlock(\"div\", _hoisted_1, [\n _createVNode(_component_Distance, {\n distance: _unref(weather).wind,\n unitFrom: \"m\",\n digits: 1,\n displayUnit: false,\n useImperialUnits: _unref(useImperialUnits)\n }, null, 8, [\"distance\", \"useImperialUnits\"]),\n _createTextVNode(\" \" + _toDisplayString(_unref(useImperialUnits) ? 'ft' : 'm') + \"/s \", 1),\n _createElementVNode(\"div\", _hoisted_2, [\n (_unref(weather).windBearing)\n ? (_openBlock(), _createElementBlock(\"i\", {\n key: 0,\n class: \"fa fa-long-arrow-down\",\n style: _normalizeStyle({\n transform: `rotate(${_unref(weather).windBearing}deg)`,\n }),\n \"aria-hidden\": \"true\",\n title: getWindDirectionTitle(_unref(weather).windBearing)\n }, null, 12, _hoisted_3))\n : _createCommentVNode(\"\", true)\n ])\n ]))\n}\n}\n\n})","import script from \"./WeatherWind.vue?vue&type=script&setup=true&lang=ts\"\nexport * from \"./WeatherWind.vue?vue&type=script&setup=true&lang=ts\"\n\nimport \"./WeatherWind.vue?vue&type=style&index=0&id=46a7c31c&lang=scss&scoped=true\"\n\nimport exportComponent from \"/mnt/data-lnx/Devs/00_Perso/FitTrackee/fittrackee_client/node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-46a7c31c\"]])\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { unref as _unref, createElementVNode as _createElementVNode, toDisplayString as _toDisplayString, createTextVNode as _createTextVNode, createVNode as _createVNode, openBlock as _openBlock, createElementBlock as _createElementBlock, createCommentVNode as _createCommentVNode, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from \"vue\"\n\nconst _withScopeId = n => (_pushScopeId(\"data-v-76e9ab62\"),n=n(),_popScopeId(),n)\nconst _hoisted_1 = {\n key: 0,\n id: \"workout-weather\"\n}\nconst _hoisted_2 = { class: \"weather-table\" }\nconst _hoisted_3 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"th\", null, null, -1))\nconst _hoisted_4 = { class: \"weather-th\" }\nconst _hoisted_5 = [\"src\", \"alt\", \"title\"]\nconst _hoisted_6 = { class: \"weather-th\" }\nconst _hoisted_7 = [\"src\", \"alt\", \"title\"]\nconst _hoisted_8 = [\"alt\", \"title\"]\nconst _hoisted_9 = [\"alt\", \"title\"]\nconst _hoisted_10 = [\"alt\", \"title\"]\n\nimport { toRefs } from 'vue'\n\n import WeatherWind from '@/components/Workout/WorkoutDetail/WeatherWind.vue'\n import { IWorkoutObject } from '@/types/workouts'\n\n interface Props {\n workoutObject: IWorkoutObject\n useImperialUnits: boolean\n }\n \nexport default /*#__PURE__*/_defineComponent({\n __name: 'WorkoutWeather',\n props: {\n workoutObject: null,\n useImperialUnits: { type: Boolean }\n },\n setup(__props: any) {\n\nconst props = __props as {\n workoutObject: IWorkoutObject\n useImperialUnits: boolean\n };\n\n \n\n const { useImperialUnits, workoutObject } = toRefs(props)\n\nreturn (_ctx: any,_cache: any) => {\n return (_unref(workoutObject).weatherStart && _unref(workoutObject).weatherEnd)\n ? (_openBlock(), _createElementBlock(\"div\", _hoisted_1, [\n _createElementVNode(\"table\", _hoisted_2, [\n _createElementVNode(\"thead\", null, [\n _createElementVNode(\"tr\", null, [\n _hoisted_3,\n _createElementVNode(\"th\", null, [\n _createElementVNode(\"div\", _hoisted_4, [\n _createTextVNode(_toDisplayString(_ctx.$t('workouts.START')) + \" \", 1),\n _createElementVNode(\"img\", {\n class: \"weather-img\",\n src: `/img/weather/${_unref(workoutObject).weatherStart.icon}.svg`,\n alt: \n _ctx.$t(\n `workouts.WEATHER.DARK_SKY.${_unref(workoutObject).weatherStart.icon}`\n )\n ,\n title: \n _ctx.$t(\n `workouts.WEATHER.DARK_SKY.${_unref(workoutObject).weatherStart.icon}`\n )\n \n }, null, 8, _hoisted_5)\n ])\n ]),\n _createElementVNode(\"th\", null, [\n _createElementVNode(\"div\", _hoisted_6, [\n _createTextVNode(_toDisplayString(_ctx.$t('workouts.END')) + \" \", 1),\n _createElementVNode(\"img\", {\n class: \"weather-img\",\n src: `/img/weather/${_unref(workoutObject).weatherEnd.icon}.svg`,\n alt: \n _ctx.$t(\n `workouts.WEATHER.DARK_SKY.${_unref(workoutObject).weatherEnd.icon}`\n )\n ,\n title: \n _ctx.$t(\n `workouts.WEATHER.DARK_SKY.${_unref(workoutObject).weatherEnd.icon}`\n )\n \n }, null, 8, _hoisted_7)\n ])\n ])\n ])\n ]),\n _createElementVNode(\"tbody\", null, [\n _createElementVNode(\"tr\", null, [\n _createElementVNode(\"td\", null, [\n _createElementVNode(\"img\", {\n class: \"weather-img weather-img-small\",\n src: \"/img/weather/temperature.svg\",\n alt: _ctx.$t(`workouts.WEATHER.TEMPERATURE`),\n title: _ctx.$t(`workouts.WEATHER.TEMPERATURE`)\n }, null, 8, _hoisted_8)\n ]),\n _createElementVNode(\"td\", null, _toDisplayString(Number(_unref(workoutObject).weatherStart.temperature).toFixed(1)) + \"°C \", 1),\n _createElementVNode(\"td\", null, _toDisplayString(Number(_unref(workoutObject).weatherEnd.temperature).toFixed(1)) + \"°C \", 1)\n ]),\n _createElementVNode(\"tr\", null, [\n _createElementVNode(\"td\", null, [\n _createElementVNode(\"img\", {\n class: \"weather-img weather-img-small\",\n src: \"/img/weather/pour-rain.svg\",\n alt: _ctx.$t(`workouts.WEATHER.HUMIDITY`),\n title: _ctx.$t(`workouts.WEATHER.HUMIDITY`)\n }, null, 8, _hoisted_9)\n ]),\n _createElementVNode(\"td\", null, _toDisplayString(Number(_unref(workoutObject).weatherStart.humidity * 100).toFixed(1)) + \"% \", 1),\n _createElementVNode(\"td\", null, _toDisplayString(Number(_unref(workoutObject).weatherEnd.humidity * 100).toFixed(1)) + \"% \", 1)\n ]),\n _createElementVNode(\"tr\", null, [\n _createElementVNode(\"td\", null, [\n _createElementVNode(\"img\", {\n class: \"weather-img weather-img-small\",\n src: \"/img/weather/breeze.svg\",\n alt: _ctx.$t(`workouts.WEATHER.WIND`),\n title: _ctx.$t(`workouts.WEATHER.WIND`)\n }, null, 8, _hoisted_10)\n ]),\n _createElementVNode(\"td\", null, [\n _createVNode(WeatherWind, {\n weather: _unref(workoutObject).weatherStart,\n useImperialUnits: _unref(useImperialUnits)\n }, null, 8, [\"weather\", \"useImperialUnits\"])\n ]),\n _createElementVNode(\"td\", null, [\n _createVNode(WeatherWind, {\n weather: _unref(workoutObject).weatherEnd,\n useImperialUnits: _unref(useImperialUnits)\n }, null, 8, [\"weather\", \"useImperialUnits\"])\n ])\n ])\n ])\n ])\n ]))\n : _createCommentVNode(\"\", true)\n}\n}\n\n})","import script from \"./WorkoutWeather.vue?vue&type=script&setup=true&lang=ts\"\nexport * from \"./WorkoutWeather.vue?vue&type=script&setup=true&lang=ts\"\n\nimport \"./WorkoutWeather.vue?vue&type=style&index=0&id=76e9ab62&lang=scss&scoped=true\"\n\nimport exportComponent from \"/mnt/data-lnx/Devs/00_Perso/FitTrackee/fittrackee_client/node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-76e9ab62\"]])\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { createElementVNode as _createElementVNode, toDisplayString as _toDisplayString, unref as _unref, createVNode as _createVNode, createTextVNode as _createTextVNode, openBlock as _openBlock, createElementBlock as _createElementBlock, createCommentVNode as _createCommentVNode, resolveComponent as _resolveComponent, createBlock as _createBlock, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from \"vue\"\n\nconst _withScopeId = n => (_pushScopeId(\"data-v-74c5993b\"),n=n(),_popScopeId(),n)\nconst _hoisted_1 = { id: \"workout-info\" }\nconst _hoisted_2 = { class: \"workout-data\" }\nconst _hoisted_3 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"i\", {\n class: \"fa fa-clock-o\",\n \"aria-hidden\": \"true\"\n}, null, -1))\nconst _hoisted_4 = { class: \"label\" }\nconst _hoisted_5 = { class: \"value\" }\nconst _hoisted_6 = { key: 0 }\nconst _hoisted_7 = { class: \"value\" }\nconst _hoisted_8 = { class: \"value\" }\nconst _hoisted_9 = { class: \"workout-data\" }\nconst _hoisted_10 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"i\", {\n class: \"fa fa-road\",\n \"aria-hidden\": \"true\"\n}, null, -1))\nconst _hoisted_11 = { class: \"label\" }\nconst _hoisted_12 = { class: \"workout-data\" }\nconst _hoisted_13 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"i\", {\n class: \"fa fa-tachometer\",\n \"aria-hidden\": \"true\"\n}, null, -1))\nconst _hoisted_14 = { class: \"label\" }\nconst _hoisted_15 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"br\", null, null, -1))\nconst _hoisted_16 = { class: \"label\" }\nconst _hoisted_17 = {\n key: 0,\n class: \"workout-data\"\n}\nconst _hoisted_18 = [\"alt\"]\nconst _hoisted_19 = { class: \"label\" }\nconst _hoisted_20 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"br\", null, null, -1))\nconst _hoisted_21 = { class: \"label\" }\nconst _hoisted_22 = {\n key: 1,\n class: \"workout-data\"\n}\nconst _hoisted_23 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"i\", {\n class: \"fa fa-location-arrow\",\n \"aria-hidden\": \"true\"\n}, null, -1))\nconst _hoisted_24 = { class: \"label\" }\nconst _hoisted_25 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"br\", null, null, -1))\nconst _hoisted_26 = { class: \"label\" }\n\nimport { computed, toRefs } from 'vue'\n\n import WorkoutRecord from '@/components/Workout/WorkoutDetail/WorkoutRecord.vue'\n import WorkoutWeather from '@/components/Workout/WorkoutDetail/WorkoutWeather.vue'\n import { IWorkoutObject } from '@/types/workouts'\n\n interface Props {\n workoutObject: IWorkoutObject\n useImperialUnits: boolean\n displayHARecord: boolean\n }\n \nexport default /*#__PURE__*/_defineComponent({\n __name: 'WorkoutData',\n props: {\n workoutObject: null,\n useImperialUnits: { type: Boolean },\n displayHARecord: { type: Boolean }\n },\n setup(__props: any) {\n\nconst props = __props as {\n workoutObject: IWorkoutObject\n useImperialUnits: boolean\n displayHARecord: boolean\n };\n\n \n\n const { displayHARecord, workoutObject, useImperialUnits } = toRefs(props)\n const withPause = computed(\n () =>\n props.workoutObject.pauses !== '0:00:00' &&\n props.workoutObject.pauses !== null\n )\n\nreturn (_ctx: any,_cache: any) => {\n const _component_Distance = _resolveComponent(\"Distance\")!\n\n return (_openBlock(), _createElementBlock(\"div\", _hoisted_1, [\n _createElementVNode(\"div\", _hoisted_2, [\n _hoisted_3,\n _createElementVNode(\"span\", _hoisted_4, _toDisplayString(_ctx.$t('workouts.DURATION')), 1),\n _createTextVNode(\": \"),\n _createElementVNode(\"span\", _hoisted_5, _toDisplayString(_unref(workoutObject).moving), 1),\n _createVNode(WorkoutRecord, {\n workoutObject: _unref(workoutObject),\n recordType: \"LD\"\n }, null, 8, [\"workoutObject\"]),\n (_unref(withPause))\n ? (_openBlock(), _createElementBlock(\"div\", _hoisted_6, [\n _createTextVNode(\" (\" + _toDisplayString(_ctx.$t('workouts.PAUSES')) + \": \", 1),\n _createElementVNode(\"span\", _hoisted_7, _toDisplayString(_unref(workoutObject).pauses), 1),\n _createTextVNode(\" - \" + _toDisplayString(_ctx.$t('workouts.TOTAL_DURATION')) + \": \", 1),\n _createElementVNode(\"span\", _hoisted_8, _toDisplayString(_unref(workoutObject).duration) + \")\", 1)\n ]))\n : _createCommentVNode(\"\", true)\n ]),\n _createElementVNode(\"div\", _hoisted_9, [\n _hoisted_10,\n _createElementVNode(\"span\", _hoisted_11, _toDisplayString(_ctx.$t('workouts.DISTANCE')), 1),\n _createTextVNode(\": \"),\n _createVNode(_component_Distance, {\n distance: _unref(workoutObject).distance,\n digits: 3,\n unitFrom: \"km\",\n strong: true,\n useImperialUnits: _unref(useImperialUnits)\n }, null, 8, [\"distance\", \"useImperialUnits\"]),\n _createVNode(WorkoutRecord, {\n workoutObject: _unref(workoutObject),\n recordType: \"FD\"\n }, null, 8, [\"workoutObject\"])\n ]),\n _createElementVNode(\"div\", _hoisted_12, [\n _hoisted_13,\n _createElementVNode(\"span\", _hoisted_14, _toDisplayString(_ctx.$t('workouts.AVERAGE_SPEED')), 1),\n _createTextVNode(\": \"),\n _createVNode(_component_Distance, {\n distance: _unref(workoutObject).aveSpeed,\n unitFrom: \"km\",\n speed: true,\n strong: true,\n useImperialUnits: _unref(useImperialUnits)\n }, null, 8, [\"distance\", \"useImperialUnits\"]),\n _createVNode(WorkoutRecord, {\n workoutObject: _unref(workoutObject),\n recordType: \"AS\"\n }, null, 8, [\"workoutObject\"]),\n _hoisted_15,\n _createElementVNode(\"span\", _hoisted_16, _toDisplayString(_ctx.$t('workouts.MAX_SPEED')), 1),\n _createTextVNode(\": \"),\n _createVNode(_component_Distance, {\n distance: _unref(workoutObject).maxSpeed,\n unitFrom: \"km\",\n speed: true,\n strong: true,\n useImperialUnits: _unref(useImperialUnits)\n }, null, 8, [\"distance\", \"useImperialUnits\"]),\n _createVNode(WorkoutRecord, {\n workoutObject: _unref(workoutObject),\n recordType: \"MS\"\n }, null, 8, [\"workoutObject\"])\n ]),\n (_unref(workoutObject).maxAlt !== null && _unref(workoutObject).minAlt !== null)\n ? (_openBlock(), _createElementBlock(\"div\", _hoisted_17, [\n _createElementVNode(\"img\", {\n class: \"mountains\",\n src: \"/img/workouts/mountains.svg\",\n alt: _ctx.$t('workouts.ELEVATION')\n }, null, 8, _hoisted_18),\n _createElementVNode(\"span\", _hoisted_19, _toDisplayString(_ctx.$t('workouts.MIN_ALTITUDE')), 1),\n _createTextVNode(\": \"),\n _createVNode(_component_Distance, {\n distance: _unref(workoutObject).minAlt,\n unitFrom: \"m\",\n strong: true,\n useImperialUnits: _unref(useImperialUnits)\n }, null, 8, [\"distance\", \"useImperialUnits\"]),\n _hoisted_20,\n _createElementVNode(\"span\", _hoisted_21, _toDisplayString(_ctx.$t('workouts.MAX_ALTITUDE')), 1),\n _createTextVNode(\": \"),\n _createVNode(_component_Distance, {\n distance: _unref(workoutObject).maxAlt,\n unitFrom: \"m\",\n strong: true,\n useImperialUnits: _unref(useImperialUnits)\n }, null, 8, [\"distance\", \"useImperialUnits\"])\n ]))\n : _createCommentVNode(\"\", true),\n (_unref(workoutObject).ascent !== null && _unref(workoutObject).descent !== null)\n ? (_openBlock(), _createElementBlock(\"div\", _hoisted_22, [\n _hoisted_23,\n _createElementVNode(\"span\", _hoisted_24, _toDisplayString(_ctx.$t('workouts.ASCENT')), 1),\n _createTextVNode(\": \"),\n _createVNode(_component_Distance, {\n distance: _unref(workoutObject).ascent,\n unitFrom: \"m\",\n strong: true,\n useImperialUnits: _unref(useImperialUnits)\n }, null, 8, [\"distance\", \"useImperialUnits\"]),\n (_unref(displayHARecord))\n ? (_openBlock(), _createBlock(WorkoutRecord, {\n key: 0,\n workoutObject: _unref(workoutObject),\n recordType: \"HA\"\n }, null, 8, [\"workoutObject\"]))\n : _createCommentVNode(\"\", true),\n _hoisted_25,\n _createElementVNode(\"span\", _hoisted_26, _toDisplayString(_ctx.$t('workouts.DESCENT')), 1),\n _createTextVNode(\": \"),\n _createVNode(_component_Distance, {\n distance: _unref(workoutObject).descent,\n unitFrom: \"m\",\n strong: true,\n useImperialUnits: _unref(useImperialUnits)\n }, null, 8, [\"distance\", \"useImperialUnits\"])\n ]))\n : _createCommentVNode(\"\", true),\n _createVNode(WorkoutWeather, {\n workoutObject: _unref(workoutObject),\n useImperialUnits: _unref(useImperialUnits)\n }, null, 8, [\"workoutObject\", \"useImperialUnits\"])\n ]))\n}\n}\n\n})","import script from \"./WorkoutData.vue?vue&type=script&setup=true&lang=ts\"\nexport * from \"./WorkoutData.vue?vue&type=script&setup=true&lang=ts\"\n\nimport \"./WorkoutData.vue?vue&type=style&index=0&id=74c5993b&lang=scss&scoped=true\"\n\nimport exportComponent from \"/mnt/data-lnx/Devs/00_Perso/FitTrackee/fittrackee_client/node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-74c5993b\"]])\n\nexport default __exports__","function $(element, tagName) {\n return Array.from(element.getElementsByTagName(tagName));\n}\nfunction normalizeId(id) {\n return id[0] === \"#\" ? id : `#${id}`;\n}\nfunction $ns(element, tagName, ns) {\n return Array.from(element.getElementsByTagNameNS(ns, tagName));\n}\n/**\n * get the content of a text node, if any\n */\nfunction nodeVal(node) {\n node?.normalize();\n return (node && node.textContent) || \"\";\n}\n/**\n * Get one Y child of X, if any, otherwise null\n */\nfunction get1(node, tagName, callback) {\n const n = node.getElementsByTagName(tagName);\n const result = n.length ? n[0] : null;\n if (result && callback)\n callback(result);\n return result;\n}\nfunction get(node, tagName, callback) {\n const properties = {};\n if (!node)\n return properties;\n const n = node.getElementsByTagName(tagName);\n const result = n.length ? n[0] : null;\n if (result && callback) {\n return callback(result, properties);\n }\n return properties;\n}\nfunction val1(node, tagName, callback) {\n const val = nodeVal(get1(node, tagName));\n if (val && callback)\n return callback(val) || {};\n return {};\n}\nfunction $num(node, tagName, callback) {\n const val = parseFloat(nodeVal(get1(node, tagName)));\n if (isNaN(val))\n return undefined;\n if (val && callback)\n return callback(val) || {};\n return {};\n}\nfunction num1(node, tagName, callback) {\n const val = parseFloat(nodeVal(get1(node, tagName)));\n if (isNaN(val))\n return undefined;\n if (val && callback)\n callback(val);\n return val;\n}\nfunction getMulti(node, propertyNames) {\n const properties = {};\n for (const property of propertyNames) {\n val1(node, property, (val) => {\n properties[property] = val;\n });\n }\n return properties;\n}\nfunction isElement(node) {\n return node?.nodeType === 1;\n}\n\nfunction getLineStyle(node) {\n return get(node, \"line\", (lineStyle) => {\n const val = Object.assign({}, val1(lineStyle, \"color\", (color) => {\n return { stroke: `#${color}` };\n }), $num(lineStyle, \"opacity\", (opacity) => {\n return { \"stroke-opacity\": opacity };\n }), $num(lineStyle, \"width\", (width) => {\n // GPX width is in mm, convert to px with 96 px per inch\n return { \"stroke-width\": (width * 96) / 25.4 };\n }));\n return val;\n });\n}\n\nfunction getExtensions(node) {\n let values = [];\n if (node === null)\n return values;\n for (const child of Array.from(node.childNodes)) {\n if (!isElement(child))\n continue;\n const name = abbreviateName(child.nodeName);\n if (name === \"gpxtpx:TrackPointExtension\") {\n // loop again for nested garmin extensions (eg. \"gpxtpx:hr\")\n values = values.concat(getExtensions(child));\n }\n else {\n // push custom extension (eg. \"power\")\n const val = nodeVal(child);\n values.push([name, parseNumeric(val)]);\n }\n }\n return values;\n}\nfunction abbreviateName(name) {\n return [\"heart\", \"gpxtpx:hr\", \"hr\"].includes(name) ? \"heart\" : name;\n}\nfunction parseNumeric(val) {\n const num = parseFloat(val);\n return isNaN(num) ? val : num;\n}\n\nfunction coordPair$1(node) {\n const ll = [\n parseFloat(node.getAttribute(\"lon\") || \"\"),\n parseFloat(node.getAttribute(\"lat\") || \"\"),\n ];\n if (isNaN(ll[0]) || isNaN(ll[1])) {\n return null;\n }\n num1(node, \"ele\", (val) => {\n ll.push(val);\n });\n const time = get1(node, \"time\");\n return {\n coordinates: ll,\n time: time ? nodeVal(time) : null,\n extendedValues: getExtensions(get1(node, \"extensions\")),\n };\n}\n\nfunction extractProperties(node) {\n const properties = getMulti(node, [\n \"name\",\n \"cmt\",\n \"desc\",\n \"type\",\n \"time\",\n \"keywords\",\n ]);\n const extensions = Array.from(node.getElementsByTagNameNS(\"http://www.garmin.com/xmlschemas/GpxExtensions/v3\", \"*\"));\n for (const child of extensions) {\n if (child.parentNode?.parentNode === node) {\n properties[child.tagName.replace(\":\", \"_\")] = nodeVal(child);\n }\n }\n const links = $(node, \"link\");\n if (links.length) {\n properties.links = links.map((link) => Object.assign({ href: link.getAttribute(\"href\") }, getMulti(link, [\"text\", \"type\"])));\n }\n return properties;\n}\n\n/**\n * Extract points from a trkseg or rte element.\n */\nfunction getPoints$1(node, pointname) {\n const pts = $(node, pointname);\n const line = [];\n const times = [];\n const extendedValues = {};\n for (let i = 0; i < pts.length; i++) {\n const c = coordPair$1(pts[i]);\n if (!c) {\n continue;\n }\n line.push(c.coordinates);\n if (c.time)\n times.push(c.time);\n for (const [name, val] of c.extendedValues) {\n const plural = name === \"heart\" ? name : name.replace(\"gpxtpx:\", \"\") + \"s\";\n if (!extendedValues[plural]) {\n extendedValues[plural] = Array(pts.length).fill(null);\n }\n extendedValues[plural][i] = val;\n }\n }\n if (line.length < 2)\n return; // Invalid line in GeoJSON\n return {\n line: line,\n times: times,\n extendedValues: extendedValues,\n };\n}\n/**\n * Extract a LineString geometry from a rte\n * element.\n */\nfunction getRoute(node) {\n const line = getPoints$1(node, \"rtept\");\n if (!line)\n return;\n return {\n type: \"Feature\",\n properties: Object.assign({ _gpxType: \"rte\" }, extractProperties(node), getLineStyle(get1(node, \"extensions\"))),\n geometry: {\n type: \"LineString\",\n coordinates: line.line,\n },\n };\n}\nfunction getTrack(node) {\n const segments = $(node, \"trkseg\");\n const track = [];\n const times = [];\n const extractedLines = [];\n for (const segment of segments) {\n const line = getPoints$1(segment, \"trkpt\");\n if (line) {\n extractedLines.push(line);\n if (line.times && line.times.length)\n times.push(line.times);\n }\n }\n if (extractedLines.length === 0)\n return null;\n const multi = extractedLines.length > 1;\n const properties = Object.assign({ _gpxType: \"trk\" }, extractProperties(node), getLineStyle(get1(node, \"extensions\")), times.length\n ? {\n coordinateProperties: {\n times: multi ? times : times[0],\n },\n }\n : {});\n for (const line of extractedLines) {\n track.push(line.line);\n if (!properties.coordinateProperties) {\n properties.coordinateProperties = {};\n }\n const props = properties.coordinateProperties;\n const entries = Object.entries(line.extendedValues);\n for (let i = 0; i < entries.length; i++) {\n const [name, val] = entries[i];\n if (multi) {\n if (!props[name]) {\n props[name] = extractedLines.map((line) => new Array(line.line.length).fill(null));\n }\n props[name][i] = val;\n }\n else {\n props[name] = val;\n }\n }\n }\n return {\n type: \"Feature\",\n properties: properties,\n geometry: multi\n ? {\n type: \"MultiLineString\",\n coordinates: track,\n }\n : {\n type: \"LineString\",\n coordinates: track[0],\n },\n };\n}\n/**\n * Extract a point, if possible, from a given node,\n * which is usually a wpt or trkpt\n */\nfunction getPoint(node) {\n const properties = Object.assign(extractProperties(node), getMulti(node, [\"sym\"]));\n const pair = coordPair$1(node);\n if (!pair)\n return null;\n return {\n type: \"Feature\",\n properties,\n geometry: {\n type: \"Point\",\n coordinates: pair.coordinates,\n },\n };\n}\n/**\n * Convert GPX to GeoJSON incrementally, returning\n * a [Generator](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Iterators_and_Generators)\n * that yields output feature by feature.\n */\nfunction* gpxGen(node) {\n for (const track of $(node, \"trk\")) {\n const feature = getTrack(track);\n if (feature)\n yield feature;\n }\n for (const route of $(node, \"rte\")) {\n const feature = getRoute(route);\n if (feature)\n yield feature;\n }\n for (const waypoint of $(node, \"wpt\")) {\n const point = getPoint(waypoint);\n if (point)\n yield point;\n }\n}\n/**\n *\n * Convert a GPX document to GeoJSON. The first argument, `doc`, must be a GPX\n * document as an XML DOM - not as a string. You can get this using jQuery's default\n * `.ajax` function or using a bare XMLHttpRequest with the `.response` property\n * holding an XML DOM.\n *\n * The output is a JavaScript object of GeoJSON data, same as `.kml` outputs, with the\n * addition of a `_gpxType` property on each `LineString` feature that indicates whether\n * the feature was encoded as a route (`rte`) or track (`trk`) in the GPX document.\n */\nfunction gpx(node) {\n return {\n type: \"FeatureCollection\",\n features: Array.from(gpxGen(node)),\n };\n}\n\nconst EXTENSIONS_NS = \"http://www.garmin.com/xmlschemas/ActivityExtension/v2\";\nconst TRACKPOINT_ATTRIBUTES = [\n [\"heartRate\", \"heartRates\"],\n [\"Cadence\", \"cadences\"],\n // Extended Trackpoint attributes\n [\"Speed\", \"speeds\"],\n [\"Watts\", \"watts\"],\n];\nconst LAP_ATTRIBUTES = [\n [\"TotalTimeSeconds\", \"totalTimeSeconds\"],\n [\"DistanceMeters\", \"distanceMeters\"],\n [\"MaximumSpeed\", \"maxSpeed\"],\n [\"AverageHeartRateBpm\", \"avgHeartRate\"],\n [\"MaximumHeartRateBpm\", \"maxHeartRate\"],\n // Extended Lap attributes\n [\"AvgSpeed\", \"avgSpeed\"],\n [\"AvgWatts\", \"avgWatts\"],\n [\"MaxWatts\", \"maxWatts\"],\n];\nfunction getProperties(node, attributeNames) {\n const properties = [];\n for (const [tag, alias] of attributeNames) {\n let elem = get1(node, tag);\n if (!elem) {\n const elements = node.getElementsByTagNameNS(EXTENSIONS_NS, tag);\n if (elements.length) {\n elem = elements[0];\n }\n }\n const val = parseFloat(nodeVal(elem));\n if (!isNaN(val)) {\n properties.push([alias, val]);\n }\n }\n return properties;\n}\nfunction coordPair(node) {\n const ll = [num1(node, \"LongitudeDegrees\"), num1(node, \"LatitudeDegrees\")];\n if (ll[0] === undefined ||\n isNaN(ll[0]) ||\n ll[1] === undefined ||\n isNaN(ll[1])) {\n return null;\n }\n const heartRate = get1(node, \"HeartRateBpm\");\n const time = nodeVal(get1(node, \"Time\"));\n get1(node, \"AltitudeMeters\", (alt) => {\n const a = parseFloat(nodeVal(alt));\n if (!isNaN(a)) {\n ll.push(a);\n }\n });\n return {\n coordinates: ll,\n time: time || null,\n heartRate: heartRate ? parseFloat(nodeVal(heartRate)) : null,\n extensions: getProperties(node, TRACKPOINT_ATTRIBUTES),\n };\n}\nfunction getPoints(node) {\n const pts = $(node, \"Trackpoint\");\n const line = [];\n const times = [];\n const heartRates = [];\n if (pts.length < 2)\n return null; // Invalid line in GeoJSON\n const extendedProperties = {};\n const result = { extendedProperties };\n for (let i = 0; i < pts.length; i++) {\n const c = coordPair(pts[i]);\n if (c === null)\n continue;\n line.push(c.coordinates);\n const { time, heartRate, extensions } = c;\n if (time)\n times.push(time);\n if (heartRate)\n heartRates.push(heartRate);\n for (const [alias, value] of extensions) {\n if (!extendedProperties[alias]) {\n extendedProperties[alias] = Array(pts.length).fill(null);\n }\n extendedProperties[alias][i] = value;\n }\n }\n if (line.length < 2)\n return null;\n return Object.assign(result, {\n line: line,\n times: times,\n heartRates: heartRates,\n });\n}\nfunction getLap(node) {\n const segments = $(node, \"Track\");\n const track = [];\n const times = [];\n const heartRates = [];\n const allExtendedProperties = [];\n let line;\n const properties = Object.assign(Object.fromEntries(getProperties(node, LAP_ATTRIBUTES)), get(node, \"Name\", (nameElement) => {\n return { name: nodeVal(nameElement) };\n }));\n for (const segment of segments) {\n line = getPoints(segment);\n if (line) {\n track.push(line.line);\n if (line.times.length)\n times.push(line.times);\n if (line.heartRates.length)\n heartRates.push(line.heartRates);\n allExtendedProperties.push(line.extendedProperties);\n }\n }\n for (let i = 0; i < allExtendedProperties.length; i++) {\n const extendedProperties = allExtendedProperties[i];\n for (const property in extendedProperties) {\n if (segments.length === 1) {\n if (line) {\n properties[property] = line.extendedProperties[property];\n }\n }\n else {\n if (!properties[property]) {\n properties[property] = track.map((track) => Array(track.length).fill(null));\n }\n properties[property][i] = extendedProperties[property];\n }\n }\n }\n if (track.length === 0)\n return null;\n if (times.length || heartRates.length) {\n properties.coordinateProperties = Object.assign(times.length\n ? {\n times: track.length === 1 ? times[0] : times,\n }\n : {}, heartRates.length\n ? {\n heart: track.length === 1 ? heartRates[0] : heartRates,\n }\n : {});\n }\n return {\n type: \"Feature\",\n properties: properties,\n geometry: track.length === 1\n ? {\n type: \"LineString\",\n coordinates: track[0],\n }\n : {\n type: \"MultiLineString\",\n coordinates: track,\n },\n };\n}\n/**\n * Incrementally convert a TCX document to GeoJSON. The\n * first argument, `doc`, must be a TCX\n * document as an XML DOM - not as a string.\n */\nfunction* tcxGen(node) {\n for (const lap of $(node, \"Lap\")) {\n const feature = getLap(lap);\n if (feature)\n yield feature;\n }\n for (const course of $(node, \"Courses\")) {\n const feature = getLap(course);\n if (feature)\n yield feature;\n }\n}\n/**\n * Convert a TCX document to GeoJSON. The first argument, `doc`, must be a TCX\n * document as an XML DOM - not as a string.\n */\nfunction tcx(node) {\n return {\n type: \"FeatureCollection\",\n features: Array.from(tcxGen(node)),\n };\n}\n\nfunction fixColor(v, prefix) {\n const properties = {};\n const colorProp = prefix == \"stroke\" || prefix === \"fill\" ? prefix : prefix + \"-color\";\n if (v[0] === \"#\") {\n v = v.substring(1);\n }\n if (v.length === 6 || v.length === 3) {\n properties[colorProp] = \"#\" + v;\n }\n else if (v.length === 8) {\n properties[prefix + \"-opacity\"] = parseInt(v.substring(0, 2), 16) / 255;\n properties[colorProp] =\n \"#\" + v.substring(6, 8) + v.substring(4, 6) + v.substring(2, 4);\n }\n return properties;\n}\n\nfunction numericProperty(node, source, target) {\n const properties = {};\n num1(node, source, (val) => {\n properties[target] = val;\n });\n return properties;\n}\nfunction getColor(node, output) {\n return get(node, \"color\", (elem) => fixColor(nodeVal(elem), output));\n}\nfunction extractIconHref(node) {\n return get(node, \"Icon\", (icon, properties) => {\n val1(icon, \"href\", (href) => {\n properties.icon = href;\n });\n return properties;\n });\n}\nfunction extractIcon(node) {\n return get(node, \"IconStyle\", (iconStyle) => {\n return Object.assign(getColor(iconStyle, \"icon\"), numericProperty(iconStyle, \"scale\", \"icon-scale\"), numericProperty(iconStyle, \"heading\", \"icon-heading\"), get(iconStyle, \"hotSpot\", (hotspot) => {\n const left = parseFloat(hotspot.getAttribute(\"x\") || \"\");\n const top = parseFloat(hotspot.getAttribute(\"y\") || \"\");\n const xunits = hotspot.getAttribute(\"xunits\") || \"\";\n const yunits = hotspot.getAttribute(\"yunits\") || \"\";\n if (!isNaN(left) && !isNaN(top))\n return {\n \"icon-offset\": [left, top],\n \"icon-offset-units\": [xunits, yunits],\n };\n return {};\n }), extractIconHref(iconStyle));\n });\n}\nfunction extractLabel(node) {\n return get(node, \"LabelStyle\", (labelStyle) => {\n return Object.assign(getColor(labelStyle, \"label\"), numericProperty(labelStyle, \"scale\", \"label-scale\"));\n });\n}\nfunction extractLine(node) {\n return get(node, \"LineStyle\", (lineStyle) => {\n return Object.assign(getColor(lineStyle, \"stroke\"), numericProperty(lineStyle, \"width\", \"stroke-width\"));\n });\n}\nfunction extractPoly(node) {\n return get(node, \"PolyStyle\", (polyStyle, properties) => {\n return Object.assign(properties, get(polyStyle, \"color\", (elem) => fixColor(nodeVal(elem), \"fill\")), val1(polyStyle, \"fill\", (fill) => {\n if (fill === \"0\")\n return { \"fill-opacity\": 0 };\n }), val1(polyStyle, \"outline\", (outline) => {\n if (outline === \"0\")\n return { \"stroke-opacity\": 0 };\n }));\n });\n}\nfunction extractStyle(node) {\n return Object.assign({}, extractPoly(node), extractLine(node), extractLabel(node), extractIcon(node));\n}\n\nfunction extractExtendedData(node) {\n return get(node, \"ExtendedData\", (extendedData, properties) => {\n for (const data of $(extendedData, \"Data\")) {\n properties[data.getAttribute(\"name\") || \"\"] = nodeVal(get1(data, \"value\"));\n }\n for (const simpleData of $(extendedData, \"SimpleData\")) {\n properties[simpleData.getAttribute(\"name\") || \"\"] = nodeVal(simpleData);\n }\n return properties;\n });\n}\nfunction getMaybeHTMLDescription(node) {\n const descriptionNode = get1(node, \"description\");\n for (const c of Array.from(descriptionNode?.childNodes || [])) {\n if (c.nodeType === 4) {\n return {\n description: {\n \"@type\": \"html\",\n value: nodeVal(c),\n },\n };\n }\n }\n return {};\n}\nfunction extractTimeSpan(node) {\n return get(node, \"TimeSpan\", (timeSpan) => {\n return {\n timespan: {\n begin: nodeVal(get1(timeSpan, \"begin\")),\n end: nodeVal(get1(timeSpan, \"end\")),\n },\n };\n });\n}\nfunction extractTimeStamp(node) {\n return get(node, \"TimeStamp\", (timeStamp) => {\n return { timestamp: nodeVal(get1(timeStamp, \"when\")) };\n });\n}\nfunction extractCascadedStyle(node, styleMap) {\n return val1(node, \"styleUrl\", (styleUrl) => {\n styleUrl = normalizeId(styleUrl);\n if (styleMap[styleUrl]) {\n return Object.assign({ styleUrl }, styleMap[styleUrl]);\n }\n // For backward-compatibility. Should we still include\n // styleUrl even if it's not resolved?\n return { styleUrl };\n });\n}\n\nconst removeSpace = /\\s*/g;\nconst trimSpace = /^\\s*|\\s*$/g;\nconst splitSpace = /\\s+/;\n/**\n * Get one coordinate from a coordinate array, if any\n */\nfunction coord1(value) {\n return value\n .replace(removeSpace, \"\")\n .split(\",\")\n .map(parseFloat)\n .filter((num) => !isNaN(num))\n .slice(0, 3);\n}\n/**\n * Get all coordinates from a coordinate array as [[],[]]\n */\nfunction coord(value) {\n return value\n .replace(trimSpace, \"\")\n .split(splitSpace)\n .map(coord1)\n .filter((coord) => {\n return coord.length >= 2;\n });\n}\nfunction gxCoords(node) {\n let elems = $(node, \"coord\");\n if (elems.length === 0) {\n elems = $ns(node, \"coord\", \"*\");\n }\n const coordinates = elems.map((elem) => {\n return nodeVal(elem).split(\" \").map(parseFloat);\n });\n if (coordinates.length === 0) {\n return null;\n }\n return {\n geometry: coordinates.length > 2\n ? {\n type: \"LineString\",\n coordinates,\n }\n : {\n type: \"Point\",\n coordinates: coordinates[0],\n },\n times: $(node, \"when\").map((elem) => nodeVal(elem)),\n };\n}\nfunction fixRing(ring) {\n if (ring.length === 0)\n return ring;\n const first = ring[0];\n const last = ring[ring.length - 1];\n let equal = true;\n for (let i = 0; i < Math.max(first.length, last.length); i++) {\n if (first[i] !== last[i]) {\n equal = false;\n break;\n }\n }\n if (!equal) {\n return ring.concat([ring[0]]);\n }\n return ring;\n}\nfunction getCoordinates(node) {\n return nodeVal(get1(node, \"coordinates\"));\n}\nfunction getGeometry(node) {\n let geometries = [];\n let coordTimes = [];\n for (let i = 0; i < node.childNodes.length; i++) {\n const child = node.childNodes.item(i);\n if (isElement(child)) {\n switch (child.tagName) {\n case \"MultiGeometry\":\n case \"MultiTrack\":\n case \"gx:MultiTrack\": {\n const childGeometries = getGeometry(child);\n geometries = geometries.concat(childGeometries.geometries);\n coordTimes = coordTimes.concat(childGeometries.coordTimes);\n break;\n }\n case \"Point\": {\n const coordinates = coord1(getCoordinates(child));\n if (coordinates.length >= 2) {\n geometries.push({\n type: \"Point\",\n coordinates,\n });\n }\n break;\n }\n case \"LineString\": {\n const coordinates = coord(getCoordinates(child));\n if (coordinates.length >= 2) {\n geometries.push({\n type: \"LineString\",\n coordinates,\n });\n }\n break;\n }\n case \"Polygon\": {\n const coords = [];\n for (const linearRing of $(child, \"LinearRing\")) {\n const ring = fixRing(coord(getCoordinates(linearRing)));\n if (ring.length >= 4) {\n coords.push(ring);\n }\n }\n if (coords.length) {\n geometries.push({\n type: \"Polygon\",\n coordinates: coords,\n });\n }\n break;\n }\n case \"Track\":\n case \"gx:Track\": {\n const gx = gxCoords(child);\n if (!gx)\n break;\n const { times, geometry } = gx;\n geometries.push(geometry);\n if (times.length)\n coordTimes.push(times);\n break;\n }\n }\n }\n }\n return {\n geometries,\n coordTimes,\n };\n}\n\nfunction geometryListToGeometry(geometries) {\n return geometries.length === 0\n ? null\n : geometries.length === 1\n ? geometries[0]\n : {\n type: \"GeometryCollection\",\n geometries,\n };\n}\nfunction getPlacemark(node, styleMap) {\n const { coordTimes, geometries } = getGeometry(node);\n const feature = {\n type: \"Feature\",\n geometry: geometryListToGeometry(geometries),\n properties: Object.assign(getMulti(node, [\n \"name\",\n \"address\",\n \"visibility\",\n \"open\",\n \"phoneNumber\",\n \"description\",\n ]), getMaybeHTMLDescription(node), extractCascadedStyle(node, styleMap), extractStyle(node), extractExtendedData(node), extractTimeSpan(node), extractTimeStamp(node), coordTimes.length\n ? {\n coordinateProperties: {\n times: coordTimes.length === 1 ? coordTimes[0] : coordTimes,\n },\n }\n : {}),\n };\n if (feature.properties?.visibility !== undefined) {\n feature.properties.visibility = feature.properties.visibility !== \"0\";\n }\n const id = node.getAttribute(\"id\");\n if (id !== null && id !== \"\")\n feature.id = id;\n return feature;\n}\n\nfunction getGroundOverlayBox(node) {\n const latLonQuad = get1(node, \"gx:LatLonQuad\");\n if (latLonQuad) {\n const ring = fixRing(coord(getCoordinates(node)));\n return {\n type: \"Polygon\",\n coordinates: [ring],\n };\n }\n return getLatLonBox(node);\n}\nconst DEGREES_TO_RADIANS = Math.PI / 180;\nfunction rotateBox(bbox, coordinates, rotation) {\n const center = [(bbox[0] + bbox[2]) / 2, (bbox[1] + bbox[3]) / 2];\n return [\n coordinates[0].map((coordinate) => {\n const dy = coordinate[1] - center[1];\n const dx = coordinate[0] - center[0];\n const distance = Math.sqrt(Math.pow(dy, 2) + Math.pow(dx, 2));\n const angle = Math.atan2(dy, dx) - rotation * DEGREES_TO_RADIANS;\n return [\n center[0] + Math.cos(angle) * distance,\n center[1] + Math.sin(angle) * distance,\n ];\n }),\n ];\n}\nfunction getLatLonBox(node) {\n const latLonBox = get1(node, \"LatLonBox\");\n if (latLonBox) {\n const north = num1(latLonBox, \"north\");\n const west = num1(latLonBox, \"west\");\n const east = num1(latLonBox, \"east\");\n const south = num1(latLonBox, \"south\");\n const rotation = num1(latLonBox, \"rotation\");\n if (typeof north === \"number\" &&\n typeof south === \"number\" &&\n typeof west === \"number\" &&\n typeof east === \"number\") {\n const bbox = [west, south, east, north];\n let coordinates = [\n [\n [west, north],\n [east, north],\n [east, south],\n [west, south],\n [west, north], // top left (again)\n ],\n ];\n if (typeof rotation === \"number\") {\n coordinates = rotateBox(bbox, coordinates, rotation);\n }\n return {\n type: \"Polygon\",\n coordinates,\n };\n }\n }\n return null;\n}\nfunction getGroundOverlay(node, styleMap) {\n const geometry = getGroundOverlayBox(node);\n const feature = {\n type: \"Feature\",\n geometry,\n properties: Object.assign(\n /**\n * Related to\n * https://gist.github.com/tmcw/037a1cb6660d74a392e9da7446540f46\n */\n { \"@geometry-type\": \"groundoverlay\" }, getMulti(node, [\n \"name\",\n \"address\",\n \"visibility\",\n \"open\",\n \"phoneNumber\",\n \"description\",\n ]), getMaybeHTMLDescription(node), extractCascadedStyle(node, styleMap), extractStyle(node), extractIconHref(node), extractExtendedData(node), extractTimeSpan(node), extractTimeStamp(node)),\n };\n if (feature.properties?.visibility !== undefined) {\n feature.properties.visibility = feature.properties.visibility !== \"0\";\n }\n const id = node.getAttribute(\"id\");\n if (id !== null && id !== \"\")\n feature.id = id;\n return feature;\n}\n\nfunction getStyleId(style) {\n let id = style.getAttribute(\"id\");\n const parentNode = style.parentNode;\n if (!id &&\n isElement(parentNode) &&\n parentNode.localName === \"CascadingStyle\") {\n id = parentNode.getAttribute(\"kml:id\") || parentNode.getAttribute(\"id\");\n }\n return normalizeId(id || \"\");\n}\nfunction buildStyleMap(node) {\n const styleMap = {};\n for (const style of $(node, \"Style\")) {\n styleMap[getStyleId(style)] = extractStyle(style);\n }\n for (const map of $(node, \"StyleMap\")) {\n const id = normalizeId(map.getAttribute(\"id\") || \"\");\n val1(map, \"styleUrl\", (styleUrl) => {\n styleUrl = normalizeId(styleUrl);\n if (styleMap[styleUrl]) {\n styleMap[id] = styleMap[styleUrl];\n }\n });\n }\n return styleMap;\n}\nconst FOLDER_PROPS = [\n \"name\",\n \"visibility\",\n \"open\",\n \"address\",\n \"description\",\n \"phoneNumber\",\n \"visibility\",\n];\nfunction getFolder(node) {\n const meta = {};\n for (const child of Array.from(node.childNodes)) {\n if (isElement(child) && FOLDER_PROPS.includes(child.tagName)) {\n meta[child.tagName] = nodeVal(child);\n }\n }\n return {\n type: \"folder\",\n meta,\n children: [],\n };\n}\n/**\n * Yield a nested tree with KML folder structure\n *\n * This generates a tree with the given structure:\n *\n * ```js\n * {\n * \"type\": \"root\",\n * \"children\": [\n * {\n * \"type\": \"folder\",\n * \"meta\": {\n * \"name\": \"Test\"\n * },\n * \"children\": [\n * // ...features and folders\n * ]\n * }\n * // ...features\n * ]\n * }\n * ```\n *\n * ### GroundOverlay\n *\n * GroundOverlay elements are converted into\n * `Feature` objects with `Polygon` geometries,\n * a property like:\n *\n * ```json\n * {\n * \"@geometry-type\": \"groundoverlay\"\n * }\n * ```\n *\n * And the ground overlay's image URL in the `href`\n * property. Ground overlays will need to be displayed\n * with a separate method to other features, depending\n * on which map framework you're using.\n */\nfunction kmlWithFolders(node) {\n const styleMap = buildStyleMap(node);\n const tree = { type: \"root\", children: [] };\n function traverse(node, pointer) {\n if (isElement(node)) {\n switch (node.tagName) {\n case \"GroundOverlay\": {\n const placemark = getGroundOverlay(node, styleMap);\n if (placemark) {\n pointer.children.push(placemark);\n }\n break;\n }\n case \"Placemark\": {\n const placemark = getPlacemark(node, styleMap);\n if (placemark) {\n pointer.children.push(placemark);\n }\n break;\n }\n case \"Folder\": {\n const folder = getFolder(node);\n pointer.children.push(folder);\n pointer = folder;\n break;\n }\n }\n }\n if (node.childNodes) {\n for (let i = 0; i < node.childNodes.length; i++) {\n traverse(node.childNodes[i], pointer);\n }\n }\n }\n traverse(node, tree);\n return tree;\n}\n/**\n * Convert KML to GeoJSON incrementally, returning\n * a [Generator](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Iterators_and_Generators)\n * that yields output feature by feature.\n */\nfunction* kmlGen(node) {\n const styleMap = buildStyleMap(node);\n for (const placemark of $(node, \"Placemark\")) {\n const feature = getPlacemark(placemark, styleMap);\n if (feature)\n yield feature;\n }\n for (const groundOverlay of $(node, \"GroundOverlay\")) {\n const feature = getGroundOverlay(groundOverlay, styleMap);\n if (feature)\n yield feature;\n }\n}\n/**\n * Convert a KML document to GeoJSON. The first argument, `doc`, must be a KML\n * document as an XML DOM - not as a string. You can get this using jQuery's default\n * `.ajax` function or using a bare XMLHttpRequest with the `.response` property\n * holding an XML DOM.\n *\n * The output is a JavaScript object of GeoJSON data. You can convert it to a string\n * with [JSON.stringify](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/stringify)\n * or use it directly in libraries.\n */\nfunction kml(node) {\n return {\n type: \"FeatureCollection\",\n features: Array.from(kmlGen(node)),\n };\n}\n\nexport { gpx, gpxGen, kml, kmlGen, kmlWithFolders, tcx, tcxGen };\n//# sourceMappingURL=togeojson.es.mjs.map\n","import { watch, ref, provide, h, inject, onUnmounted, onBeforeUnmount, onMounted, nextTick, render as render$3, reactive, computed } from 'vue';\n\nconst debounce = (fn, time) => {\n let timeout;\n\n return function (...args) {\n const context = this;\n if (timeout) {\n clearTimeout(timeout);\n }\n timeout = setTimeout(() => {\n fn.apply(context, args);\n timeout = null;\n }, time);\n };\n};\n\nconst capitalizeFirstLetter = (string) => {\n if (!string || typeof string.charAt !== \"function\") {\n return string;\n }\n return string.charAt(0).toUpperCase() + string.slice(1);\n};\n\nconst propsBinder = (methods, leafletElement, props) => {\n for (const key in props) {\n const setMethodName = \"set\" + capitalizeFirstLetter(key);\n if (methods[setMethodName]) {\n watch(\n () => props[key],\n (newVal, oldVal) => {\n methods[setMethodName](newVal, oldVal);\n }\n );\n } else if (leafletElement[setMethodName]) {\n watch(\n () => props[key],\n (newVal) => {\n leafletElement[setMethodName](newVal);\n }\n );\n }\n }\n};\n\nconst remapEvents = (contextAttrs) => {\n const result = {};\n for (const attrName in contextAttrs) {\n if (\n attrName.startsWith(\"on\") &&\n !attrName.startsWith(\"onUpdate\") &&\n attrName !== \"onReady\"\n ) {\n const eventName = attrName.slice(2).toLocaleLowerCase();\n result[eventName] = contextAttrs[attrName];\n }\n }\n return result;\n};\n\nconst resetWebpackIcon = async (Icon) => {\n const modules = await Promise.all([\n import('leaflet/dist/images/marker-icon-2x.png'),\n import('leaflet/dist/images/marker-icon.png'),\n import('leaflet/dist/images/marker-shadow.png'),\n ]);\n\n delete Icon.Default.prototype._getIconUrl;\n\n Icon.Default.mergeOptions({\n iconRetinaUrl: modules[0].default,\n iconUrl: modules[1].default,\n shadowUrl: modules[2].default,\n });\n};\n\n/**\n * Wraps a placeholder function and provides it with the given name.\n * The wrapper can later be updated with {@link updateLeafletWrapper}\n * to provide a different function.\n *\n * @param {String} methodName Key used to provide the wrapper function\n */\nconst provideLeafletWrapper = (methodName) => {\n const wrapped = ref(() =>\n console.warn(`Method ${methodName} has been invoked without being replaced`)\n );\n const wrapper = (...args) => wrapped.value(...args);\n // eslint-disable-next-line vue/no-ref-as-operand\n wrapper.wrapped = wrapped;\n provide(methodName, wrapper);\n\n return wrapper;\n};\n\n/**\n * Change the function that will be executed when an injected Leaflet wrapper\n * is invoked.\n *\n * @param {*} wrapper Provided wrapper whose wrapped function is to be updated\n * @param {function} leafletMethod New method to be wrapped by the wrapper\n */\nconst updateLeafletWrapper = (wrapper, leafletMethod) =>\n (wrapper.wrapped.value = leafletMethod);\n\nconst WINDOW_OR_GLOBAL =\n (typeof self === \"object\" && self.self === self && self) ||\n (typeof global === \"object\" && global.global === global && global) ||\n undefined;\n\nconst GLOBAL_LEAFLET_OPT = \"useGlobalLeaflet\";\n\nconst props = {\n options: {\n type: Object,\n default: () => ({}),\n },\n};\n\nconst setup = (props) => {\n return { options: props.options, methods: {} };\n};\n\nconst props$1 = {\n ...props,\n pane: {\n type: String,\n default: \"overlayPane\",\n },\n attribution: {\n type: String,\n default: null,\n },\n name: {\n type: String,\n custom: true,\n default: undefined,\n },\n layerType: {\n type: String,\n custom: true,\n default: undefined,\n },\n visible: {\n type: Boolean,\n custom: true,\n default: true,\n },\n};\n\nconst setup$1 = (props, leafletRef, context) => {\n const addLayer = inject(\"addLayer\");\n const removeLayer = inject(\"removeLayer\");\n const {\n options: componentOptions,\n methods: componentMethods,\n } = setup(props);\n\n const options = {\n ...componentOptions,\n attribution: props.attribution,\n pane: props.pane,\n };\n\n const addThisLayer = () => addLayer({ leafletObject: leafletRef.value });\n const removeThisLayer = () =>\n removeLayer({ leafletObject: leafletRef.value });\n\n const methods = {\n ...componentMethods,\n setAttribution(val, old) {\n const attributionControl = this.$parent.leafletObject.attributionControl;\n attributionControl.removeAttribution(old).addAttribution(val);\n },\n setName() {\n removeThisLayer();\n if (props.visible) {\n addThisLayer();\n }\n },\n setLayerType() {\n removeThisLayer();\n if (props.visible) {\n addThisLayer();\n }\n },\n setVisible(isVisible) {\n if (leafletRef.value) {\n if (isVisible) {\n addThisLayer();\n } else {\n removeThisLayer();\n }\n }\n },\n bindPopup({ leafletObject }) {\n leafletRef.value.bindPopup(leafletObject);\n },\n bindTooltip({ leafletObject }) {\n leafletRef.value.bindTooltip(leafletObject);\n },\n unbindTooltip() {\n const tooltip = leafletRef.value ? leafletRef.value.getTooltip() : null;\n if (tooltip) {\n tooltip.unbindTooltip();\n }\n },\n unbindPopup() {\n const popup = leafletRef.value ? leafletRef.value.getPopup() : null;\n if (popup) {\n popup.unbindPopup();\n }\n },\n updateVisibleProp(value) {\n /**\n * Triggers when the visible prop needs to be updated\n * @type {boolean}\n * @property {boolean} value - value of the visible property\n */\n context.emit(\"update:visible\", value);\n },\n };\n\n provide(\"bindPopup\", methods.bindPopup);\n provide(\"bindTooltip\", methods.bindTooltip);\n provide(\"unbindTooltip\", methods.unbindTooltip);\n provide(\"unbindPopup\", methods.unbindPopup);\n\n onUnmounted(() => {\n methods.unbindPopup();\n methods.unbindTooltip();\n removeThisLayer();\n });\n\n return { options, methods };\n};\n\nconst render = (ready, slots) => {\n if (ready && slots.default) {\n return h(\"div\", { style: { display: \"none\" } }, slots.default());\n }\n};\n\nconst props$2 = {\n ...props,\n interactive: {\n type: Boolean,\n default: true,\n },\n bubblingMouseEvents: {\n type: Boolean,\n default: true,\n },\n};\n\nconst setup$2 = (props) => {\n const { options: componentOptions, methods } = setup(props);\n const options = {\n ...componentOptions,\n interactive: props.interactive,\n bubblingMouseEvents: props.bubblingMouseEvents,\n };\n\n return { options, methods };\n};\n\nconst props$3 = {\n ...props$1,\n ...props$2,\n stroke: {\n type: Boolean,\n custom: true,\n default: true,\n },\n color: {\n type: String,\n custom: true,\n default: \"#3388ff\",\n },\n weight: {\n type: Number,\n custom: true,\n default: 3,\n },\n opacity: {\n type: Number,\n custom: true,\n default: 1.0,\n },\n lineCap: {\n type: String,\n custom: true,\n default: \"round\",\n },\n lineJoin: {\n type: String,\n custom: true,\n default: \"round\",\n },\n dashArray: {\n type: String,\n custom: true,\n default: null,\n },\n dashOffset: {\n type: String,\n custom: true,\n default: null,\n },\n fill: {\n type: Boolean,\n custom: true,\n default: false,\n },\n fillColor: {\n type: String,\n custom: true,\n default: \"#3388ff\",\n },\n fillOpacity: {\n type: Number,\n custom: true,\n default: 0.2,\n },\n fillRule: {\n type: String,\n custom: true,\n default: \"evenodd\",\n },\n className: {\n type: String,\n custom: true,\n default: null,\n },\n};\n\nconst setup$3 = (props, leafletRef, context) => {\n const { options: layerOptions, methods: layerMethods } = setup$1(\n props,\n leafletRef,\n context\n );\n const {\n options: interactiveLayerOptions,\n methods: interactiveLayerMethods,\n } = setup$2(props);\n\n const removeLayer = inject(\"removeLayer\");\n\n const options = {\n ...layerOptions,\n ...interactiveLayerOptions,\n stroke: props.stroke,\n color: props.color,\n weight: props.weight,\n opacity: props.opacity,\n lineCap: props.lineCap,\n lineJoin: props.lineJoin,\n dashArray: props.dashArray,\n dashOffset: props.dashOffset,\n fill: props.fill,\n fillColor: props.fillColor,\n fillOpacity: props.fillOpacity,\n fillRule: props.fillRule,\n className: props.className,\n };\n const methods = {\n ...layerMethods,\n ...interactiveLayerMethods,\n setStroke(stroke) {\n leafletRef.value.setStyle({ stroke });\n },\n setColor(color) {\n leafletRef.value.setStyle({ color });\n },\n setWeight(weight) {\n leafletRef.value.setStyle({ weight });\n },\n setOpacity(opacity) {\n leafletRef.value.setStyle({ opacity });\n },\n setLineCap(lineCap) {\n leafletRef.value.setStyle({ lineCap });\n },\n setLineJoin(lineJoin) {\n leafletRef.value.setStyle({ lineJoin });\n },\n setDashArray(dashArray) {\n leafletRef.value.setStyle({ dashArray });\n },\n setDashOffset(dashOffset) {\n leafletRef.value.setStyle({ dashOffset });\n },\n setFill(fill) {\n leafletRef.value.setStyle({ fill });\n },\n setFillColor(fillColor) {\n leafletRef.value.setStyle({ fillColor });\n },\n setFillOpacity(fillOpacity) {\n leafletRef.value.setStyle({ fillOpacity });\n },\n setFillRule(fillRule) {\n leafletRef.value.setStyle({ fillRule });\n },\n setClassName(className) {\n leafletRef.value.setStyle({ className });\n },\n };\n\n onBeforeUnmount(() => {\n removeLayer({ leafletObject: leafletRef.value });\n });\n\n return { options, methods };\n};\n\nconst props$4 = {\n ...props$3,\n latLng: {\n type: [Object, Array],\n custom: true,\n default: null,\n },\n /**\n * Radius of the marker in pixels.\n */\n radius: {\n type: Number,\n default: null,\n },\n};\n\nconst setup$4 = (props, leafletRef, context) => {\n const { options: pathOptions, methods: pathMethods } = setup$3(\n props,\n leafletRef,\n context\n );\n const options = {\n ...pathOptions,\n ...props,\n };\n const methods = {\n ...pathMethods,\n setRadius(radius) {\n leafletRef.value.setRadius(radius);\n },\n setLatLng(latLng) {\n leafletRef.value.setLatLng(latLng);\n },\n };\n\n return { options, methods };\n};\n\nconst props$5 = {\n ...props$4,\n /**\n * Radius of the circle in meters.\n */\n radius: {\n type: Number,\n default: null,\n },\n};\n\nconst setup$5 = (props, leafletRef, context) => {\n const {\n options: circleMarkerOptions,\n methods: circleMarkerMethods,\n } = setup$4(props, leafletRef, context);\n\n const options = {\n ...circleMarkerOptions,\n ...props,\n };\n\n const methods = {\n ...circleMarkerMethods,\n };\n\n return { options, methods };\n};\n\n/**\n * Circle component, lets you add and personalize circles on the map\n */\nvar script = {\n name: \"LCircle\",\n props: props$5,\n setup(props, context) {\n const leafletRef = ref({});\n const ready = ref(false);\n\n const useGlobalLeaflet = inject(GLOBAL_LEAFLET_OPT);\n const addLayer = inject(\"addLayer\");\n\n const { options, methods } = setup$5(props, leafletRef, context);\n\n onMounted(async () => {\n const { circle, DomEvent } = useGlobalLeaflet\n ? WINDOW_OR_GLOBAL.L\n : await import('leaflet/dist/leaflet-src.esm');\n\n leafletRef.value = circle(props.latLng, options);\n\n const listeners = remapEvents(context.attrs);\n DomEvent.on(leafletRef.value, listeners);\n\n propsBinder(methods, leafletRef.value, props);\n\n addLayer({\n ...props,\n ...methods,\n leafletObject: leafletRef.value,\n });\n ready.value = true;\n nextTick(() => context.emit(\"ready\", leafletRef.value));\n });\n return { ready, leafletObject: leafletRef };\n },\n render() {\n return render(this.ready, this.$slots);\n },\n};\n\nscript.__file = \"src/components/LCircle.vue\";\n\n/**\n * Circle Marker component, lets you add and personalize circle markers on the map\n */\nvar script$1 = {\n name: \"LCircleMarker\",\n props: props$4,\n setup(props, context) {\n const leafletRef = ref({});\n const ready = ref(false);\n\n const useGlobalLeaflet = inject(GLOBAL_LEAFLET_OPT);\n const addLayer = inject(\"addLayer\");\n\n const { options, methods } = setup$4(props, leafletRef, context);\n\n onMounted(async () => {\n const { circleMarker, DomEvent } = useGlobalLeaflet\n ? WINDOW_OR_GLOBAL.L\n : await import('leaflet/dist/leaflet-src.esm');\n\n leafletRef.value = circleMarker(props.latLng, options);\n\n const listeners = remapEvents(context.attrs);\n DomEvent.on(leafletRef.value, listeners);\n\n propsBinder(methods, leafletRef.value, props);\n\n addLayer({\n ...props,\n ...methods,\n leafletObject: leafletRef.value,\n });\n ready.value = true;\n nextTick(() => context.emit(\"ready\", leafletRef.value));\n });\n return { ready, leafletObject: leafletRef };\n },\n render() {\n return render(this.ready, this.$slots);\n },\n};\n\nscript$1.__file = \"src/components/LCircleMarker.vue\";\n\nconst props$6 = {\n ...props,\n position: {\n type: String,\n default: \"topright\",\n },\n};\n\nconst setup$6 = (props, leafletRef) => {\n const {\n options: componentOptions,\n methods: componentMethods,\n } = setup(props);\n const options = {\n ...componentOptions,\n position: props.position,\n };\n\n const methods = {\n ...componentMethods,\n setPosition(position) {\n if (leafletRef.value) {\n leafletRef.value.setPosition(position);\n }\n },\n };\n\n onUnmounted(() => {\n if (leafletRef.value) {\n leafletRef.value.remove();\n }\n });\n\n return { options, methods };\n};\n\nconst render$1 = (slots) => {\n if (slots.default) {\n return h(\"div\", { ref: \"root\" }, slots.default());\n }\n return null;\n};\n\nvar script$2 = {\n name: \"LControl\",\n props: {\n ...props$6,\n disableClickPropagation: {\n type: Boolean,\n custom: true,\n default: true,\n },\n disableScrollPropagation: {\n type: Boolean,\n custom: true,\n default: false,\n },\n },\n setup(props, context) {\n const leafletRef = ref({});\n const root = ref(null);\n\n const useGlobalLeaflet = inject(GLOBAL_LEAFLET_OPT);\n const registerControl = inject(\"registerControl\");\n\n const { options, methods } = setup$6(props, leafletRef);\n\n onMounted(async () => {\n const { Control, DomEvent } = useGlobalLeaflet\n ? WINDOW_OR_GLOBAL.L\n : await import('leaflet/dist/leaflet-src.esm');\n\n const LControl = Control.extend({\n onAdd() {\n return root.value;\n },\n });\n\n leafletRef.value = new LControl(options);\n propsBinder(methods, leafletRef.value, props);\n registerControl({ leafletObject: leafletRef.value });\n\n if (props.disableClickPropagation) {\n DomEvent.disableClickPropagation(root.value);\n }\n if (props.disableScrollPropagation) {\n DomEvent.disableScrollPropagation(root.value);\n }\n nextTick(() => context.emit(\"ready\", leafletRef.value));\n });\n return { root, leafletObject: leafletRef };\n },\n render() {\n return render$1(this.$slots);\n },\n};\n\nscript$2.__file = \"src/components/LControl.vue\";\n\nconst props$7 = {\n ...props$6,\n prefix: {\n type: String,\n default: \"Vue-Leaflet\",\n custom: true,\n },\n};\n\nconst setup$7 = (props, leafletRef) => {\n const { options: controlOptions, methods: controlMethods } = setup$6(\n props,\n leafletRef\n );\n const options = {\n ...controlOptions,\n prefix: props.prefix,\n };\n\n const methods = {\n ...controlMethods,\n setPrefix(prefix) {\n leafletRef.value.setPrefix(prefix);\n },\n };\n\n return { options, methods };\n};\n\nvar script$3 = {\n name: \"LControlAttribution\",\n props: props$7,\n setup(props, context) {\n const leafletRef = ref({});\n\n const useGlobalLeaflet = inject(GLOBAL_LEAFLET_OPT);\n const registerControl = inject(\"registerControl\");\n\n const { options, methods } = setup$7(props, leafletRef);\n\n onMounted(async () => {\n const { control } = useGlobalLeaflet\n ? WINDOW_OR_GLOBAL.L\n : await import('leaflet/dist/leaflet-src.esm');\n\n leafletRef.value = control.attribution(options);\n propsBinder(methods, leafletRef.value, props);\n registerControl({ leafletObject: leafletRef.value });\n nextTick(() => context.emit(\"ready\", leafletRef.value));\n });\n return { leafletObject: leafletRef.value };\n },\n render() {\n return null;\n },\n};\n\nscript$3.__file = \"src/components/LControlAttribution.vue\";\n\nconst props$8 = {\n ...props$6,\n collapsed: {\n type: Boolean,\n default: true,\n },\n autoZIndex: {\n type: Boolean,\n default: true,\n },\n hideSingleBase: {\n type: Boolean,\n default: false,\n },\n sortLayers: {\n type: Boolean,\n default: false,\n },\n sortFunction: {\n type: Function,\n default: undefined,\n },\n};\n\nconst setup$8 = (props, leafletRef) => {\n const { options: controlOptions } = setup$6(props, leafletRef);\n const options = {\n ...controlOptions,\n collapsed: props.collapsed,\n autoZIndex: props.autoZIndex,\n hideSingleBase: props.hideSingleBase,\n sortLayers: props.sortLayers,\n sortFunction: props.sortFunction,\n };\n\n const methods = {\n addLayer(layer) {\n if (layer.layerType === \"base\") {\n leafletRef.value.addBaseLayer(layer.leafletObject, layer.name);\n } else if (layer.layerType === \"overlay\") {\n leafletRef.value.addOverlay(layer.leafletObject, layer.name);\n }\n },\n removeLayer(layer) {\n leafletRef.value.removeLayer(layer.leafletObject);\n },\n };\n return { options, methods };\n};\n\nvar script$4 = {\n name: \"LControlLayers\",\n props: props$8,\n setup(props, context) {\n const leafletRef = ref({});\n\n const useGlobalLeaflet = inject(GLOBAL_LEAFLET_OPT);\n const registerLayerControl = inject(\"registerLayerControl\");\n\n const { options, methods } = setup$8(props, leafletRef);\n\n onMounted(async () => {\n const { control } = useGlobalLeaflet\n ? WINDOW_OR_GLOBAL.L\n : await import('leaflet/dist/leaflet-src.esm');\n\n leafletRef.value = control.layers(null, null, options);\n\n propsBinder(methods, leafletRef.value, props);\n\n registerLayerControl({\n ...props,\n ...methods,\n leafletObject: leafletRef.value,\n });\n nextTick(() => context.emit(\"ready\", leafletRef.value));\n });\n return { leafletObject: leafletRef.value };\n },\n render() {\n return null;\n },\n};\n\nscript$4.__file = \"src/components/LControlLayers.vue\";\n\nconst props$9 = {\n ...props$6,\n maxWidth: {\n type: Number,\n default: 100,\n },\n metric: {\n type: Boolean,\n default: true,\n },\n imperial: {\n type: Boolean,\n default: true,\n },\n updateWhenIdle: {\n type: Boolean,\n default: false,\n },\n};\n\nconst setup$9 = (props, leafletRef) => {\n const { options: controlOptions, methods: controlMethods } = setup$6(\n props,\n leafletRef\n );\n const options = {\n ...controlOptions,\n maxWidth: props.maxWidth,\n metric: props.metric,\n imperial: props.imperial,\n updateWhenIdle: props.updateWhenIdle,\n };\n\n return { options, methods: controlMethods };\n};\n\nvar script$5 = {\n name: \"LControlScale\",\n props: props$9,\n setup(props, context) {\n const leafletRef = ref({});\n\n const useGlobalLeaflet = inject(GLOBAL_LEAFLET_OPT);\n const registerControl = inject(\"registerControl\");\n\n const { options, methods } = setup$9(props, leafletRef);\n\n onMounted(async () => {\n const { control } = useGlobalLeaflet\n ? WINDOW_OR_GLOBAL.L\n : await import('leaflet/dist/leaflet-src.esm');\n\n leafletRef.value = control.scale(options);\n propsBinder(methods, leafletRef.value, props);\n registerControl({ leafletObject: leafletRef.value });\n nextTick(() => context.emit(\"ready\", leafletRef.value));\n });\n return { leafletObject: leafletRef.value };\n },\n render() {\n return null;\n },\n};\n\nscript$5.__file = \"src/components/LControlScale.vue\";\n\nconst props$a = {\n ...props$6,\n zoomInText: {\n type: String,\n default: \"+\",\n },\n zoomInTitle: {\n type: String,\n default: \"Zoom in\",\n },\n zoomOutText: {\n type: String,\n default: \"-\",\n },\n zoomOutTitle: {\n type: String,\n default: \"Zoom out\",\n },\n};\n\nconst setup$a = (props, leafletRef) => {\n const { options: controlOptions, methods: controlMethods } = setup$6(\n props,\n leafletRef\n );\n const options = {\n ...controlOptions,\n zoomInText: props.zoomInText,\n zoomInTitle: props.zoomInTitle,\n zoomOutText: props.zoomOutText,\n zoomOutTitle: props.zoomOutTitle,\n };\n\n return { options, methods: controlMethods };\n};\n\nvar script$6 = {\n name: \"LControlZoom\",\n props: props$a,\n setup(props, context) {\n const leafletRef = ref({});\n\n const useGlobalLeaflet = inject(GLOBAL_LEAFLET_OPT);\n const registerControl = inject(\"registerControl\");\n\n const { options, methods } = setup$a(props, leafletRef);\n\n onMounted(async () => {\n const { control } = useGlobalLeaflet\n ? WINDOW_OR_GLOBAL.L\n : await import('leaflet/dist/leaflet-src.esm');\n\n leafletRef.value = control.zoom(options);\n propsBinder(methods, leafletRef.value, props);\n registerControl({ leafletObject: leafletRef.value });\n nextTick(() => context.emit(\"ready\", leafletRef.value));\n });\n return { leafletObject: leafletRef.value };\n },\n render() {\n return null;\n },\n};\n\nscript$6.__file = \"src/components/LControlZoom.vue\";\n\nconst props$b = {\n ...props$1,\n};\n\nconst setup$b = (props, leafletRef, context) => {\n const { options: layerOptions, methods: layerMethods } = setup$1(\n props,\n leafletRef,\n context\n );\n\n const options = {\n ...layerOptions,\n };\n\n const methods = {\n ...layerMethods,\n addLayer(layer) {\n leafletRef.value.addLayer(layer.leafletObject);\n },\n removeLayer(layer) {\n leafletRef.value.removeLayer(layer.leafletObject);\n },\n };\n\n provide(\"addLayer\", methods.addLayer);\n provide(\"removeLayer\", methods.removeLayer);\n\n return { options, methods };\n};\n\nconst props$c = {\n ...props$b,\n};\n\nconst setup$c = (props, leafletRef) => {\n const { options: layerOptions, methods: layerGroupMethods } = setup$b(\n props,\n leafletRef\n );\n\n const options = {\n ...layerOptions,\n ...props,\n };\n\n const methods = {\n ...layerGroupMethods,\n };\n\n return { options, methods };\n};\n\nvar script$7 = {\n props: props$c,\n setup(props, context) {\n const leafletRef = ref({});\n const ready = ref(false);\n\n const useGlobalLeaflet = inject(GLOBAL_LEAFLET_OPT);\n const addLayer = inject(\"addLayer\");\n\n const { methods, options } = setup$c(props, leafletRef);\n\n onMounted(async () => {\n const { featureGroup, DomEvent } = useGlobalLeaflet\n ? WINDOW_OR_GLOBAL.L\n : await import('leaflet/dist/leaflet-src.esm');\n\n leafletRef.value = featureGroup(options);\n\n const listeners = remapEvents(context.attrs);\n DomEvent.on(leafletRef.value, listeners);\n\n propsBinder(methods, leafletRef.value, props);\n addLayer({\n ...props,\n ...methods,\n leafletObject: leafletRef.value,\n });\n ready.value = true;\n nextTick(() => context.emit(\"ready\", leafletRef.value));\n });\n return { ready, leafletObject: leafletRef };\n },\n render() {\n return render(this.ready, this.$slots);\n },\n};\n\nscript$7.__file = \"src/components/LFeatureGroup.vue\";\n\nconst props$d = {\n ...props$b,\n geojson: {\n type: [Object, Array],\n default: () => ({}),\n },\n};\n\nconst setup$d = (props, leafletRef) => {\n const { options: layerOptions, methods: layerGroupMethods } = setup$b(\n props,\n leafletRef\n );\n\n const options = {\n ...layerOptions,\n ...props,\n };\n\n const methods = {\n ...layerGroupMethods,\n setGeojson(newVal) {\n leafletRef.value.clearLayers();\n leafletRef.value.addData(newVal);\n },\n getGeoJSONData() {\n return leafletRef.value.toGeoJSON();\n },\n getBounds() {\n return leafletRef.value.getBounds();\n },\n };\n\n return { options, methods };\n};\n\nvar script$8 = {\n props: props$d,\n setup(props, context) {\n const leafletRef = ref({});\n const ready = ref(false);\n\n const useGlobalLeaflet = inject(GLOBAL_LEAFLET_OPT);\n const addLayer = inject(\"addLayer\");\n\n const { methods, options } = setup$d(props, leafletRef);\n\n onMounted(async () => {\n const { geoJSON, DomEvent } = useGlobalLeaflet\n ? WINDOW_OR_GLOBAL.L\n : await import('leaflet/dist/leaflet-src.esm');\n\n leafletRef.value = geoJSON(props.geojson, options);\n\n const listeners = remapEvents(context.attrs);\n DomEvent.on(leafletRef.value, listeners);\n\n propsBinder(methods, leafletRef.value, props);\n addLayer({\n ...props,\n ...methods,\n leafletObject: leafletRef.value,\n });\n ready.value = true;\n nextTick(() => context.emit(\"ready\", leafletRef.value));\n });\n return { ready, leafletObject: leafletRef };\n },\n render() {\n return render(this.ready, this.$slots);\n },\n};\n\nscript$8.__file = \"src/components/LGeoJson.vue\";\n\nconst props$e = {\n ...props$1,\n pane: {\n type: String,\n default: \"tilePane\",\n },\n opacity: {\n type: Number,\n custom: false,\n default: 1.0,\n },\n zIndex: {\n type: Number,\n default: 1,\n },\n tileSize: {\n type: Number,\n default: 256,\n },\n noWrap: {\n type: Boolean,\n default: false,\n },\n minZoom: {\n type: Number,\n default: 0,\n },\n maxZoom: {\n type: Number,\n default: undefined,\n },\n};\n\nconst setup$e = (props, leafletRef, context) => {\n const { options: layerOptions, methods: layerMethods } = setup$1(\n props,\n leafletRef,\n context\n );\n const options = {\n ...layerOptions,\n pane: props.pane,\n opacity: props.opacity,\n zIndex: props.zIndex,\n tileSize: props.tileSize,\n noWrap: props.noWrap,\n minZoom: props.minZoom,\n maxZoom: props.maxZoom,\n };\n return { options, methods: { ...layerMethods } };\n};\n\nvar script$9 = {\n props: {\n ...props$e,\n childRender: {\n type: Function,\n required: true,\n },\n },\n setup(props, context) {\n const leafletRef = ref({});\n const tileComponents = ref({});\n const root = ref(null);\n const ready = ref(false);\n\n const useGlobalLeaflet = inject(GLOBAL_LEAFLET_OPT);\n const addLayer = inject(\"addLayer\");\n\n const { options, methods } = setup$e(props, leafletRef, context);\n\n onMounted(async () => {\n const { GridLayer, DomEvent, DomUtil } = useGlobalLeaflet\n ? WINDOW_OR_GLOBAL.L\n : await import('leaflet/dist/leaflet-src.esm');\n\n methods.onUnload = (e) => {\n const key = leafletRef.value._tileCoordsToKey(e.coords);\n if (tileComponents[key]) {\n tileComponents[key].innerHTML = \"\";\n tileComponents[key] = undefined;\n }\n };\n\n methods.setTileComponent = () => {\n leafletRef.value.redraw();\n };\n\n const GLayer = GridLayer.extend({\n createTile(coords) {\n const key = leafletRef.value._tileCoordsToKey(coords);\n tileComponents[key] = DomUtil.create(\"div\");\n\n let vNode = h(\n { setup: props.childRender, props: [\"coords\"] },\n { coords }\n );\n render$3(vNode, tileComponents[key]);\n\n return tileComponents[key];\n },\n });\n\n leafletRef.value = new GLayer(options);\n\n const listeners = remapEvents(context.attrs);\n DomEvent.on(leafletRef.value, listeners);\n\n leafletRef.value.on(\"tileunload\", methods.onUnload);\n\n propsBinder(methods, leafletRef.value, props);\n addLayer({\n ...props,\n ...methods,\n leafletObject: leafletRef.value,\n });\n ready.value = true;\n nextTick(() => context.emit(\"ready\", leafletRef.value));\n });\n\n onUnmounted(() => {\n leafletRef.value.off(\"tileunload\", methods.unLoad);\n });\n\n return { root, ready, leafletObject: leafletRef };\n },\n render() {\n if (this.ready) {\n return h(\"div\", { style: { display: \"none\" }, ref: \"root\" });\n }\n return null;\n },\n};\n\nscript$9.__file = \"src/components/LGridLayer.vue\";\n\nconst props$f = {\n iconUrl: {\n type: String,\n custom: true,\n default: null,\n },\n iconRetinaUrl: {\n type: String,\n custom: true,\n default: null,\n },\n iconSize: {\n type: [Object, Array],\n custom: true,\n default: null,\n },\n iconAnchor: {\n type: [Object, Array],\n custom: true,\n default: null,\n },\n popupAnchor: {\n type: [Object, Array],\n custom: true,\n default: () => [0, 0],\n },\n tooltipAnchor: {\n type: [Object, Array],\n custom: true,\n default: () => [0, 0],\n },\n shadowUrl: {\n type: String,\n custom: true,\n default: null,\n },\n shadowRetinaUrl: {\n type: String,\n custom: true,\n default: null,\n },\n shadowSize: {\n type: [Object, Array],\n custom: true,\n default: null,\n },\n shadowAnchor: {\n type: [Object, Array],\n custom: true,\n default: null,\n },\n bgPos: {\n type: [Object, Array],\n custom: true,\n default: () => [0, 0],\n },\n className: {\n type: String,\n custom: true,\n default: \"\",\n },\n options: {\n type: Object,\n custom: true,\n default: () => ({}),\n },\n};\n\n/**\n * Icon component, lets you add and custom icons to the map\n */\nvar script$a = {\n name: \"LIcon\",\n props: {\n ...props$f,\n ...props,\n },\n setup(props, context) {\n const root = ref(null);\n\n const useGlobalLeaflet = inject(GLOBAL_LEAFLET_OPT);\n const canSetParentHtml = inject(\"canSetParentHtml\");\n const setParentHtml = inject(\"setParentHtml\");\n const setIcon = inject(\"setIcon\");\n\n let onDomEvent;\n let offDomEvent;\n let divIcon;\n let icon;\n let iconObject = undefined;\n\n const createIcon = (el, recreationNeeded, htmlSwapNeeded) => {\n const elHtml = el && el.innerHTML;\n if (!recreationNeeded) {\n if (htmlSwapNeeded && iconObject && canSetParentHtml()) {\n setParentHtml(elHtml);\n }\n return;\n }\n\n const listeners = remapEvents(context.attrs);\n if (iconObject) {\n offDomEvent(iconObject, listeners);\n }\n\n const { options: componentOptions } = setup(props);\n const options = {\n ...componentOptions,\n iconUrl: props.iconUrl,\n iconRetinaUrl: props.iconRetinaUrl,\n iconSize: props.iconSize,\n iconAnchor: props.iconAnchor,\n popupAnchor: props.popupAnchor,\n tooltipAnchor: props.tooltipAnchor,\n shadowUrl: props.shadowUrl,\n shadowRetinaUrl: props.shadowRetinaUrl,\n shadowSize: props.shadowSize,\n shadowAnchor: props.shadowAnchor,\n bgPos: props.bgPos,\n className: props.className,\n html: elHtml || props.html,\n };\n\n iconObject = options.html ? divIcon(options) : icon(options);\n onDomEvent(iconObject, listeners);\n setIcon(iconObject);\n };\n\n const scheduleCreateIcon = () => {\n nextTick(() => createIcon(root.value, true, false));\n };\n\n const scheduleHtmlSwap = () => {\n nextTick(() => createIcon(root.value, false, true));\n };\n\n const methods = {\n setIconUrl: scheduleCreateIcon,\n setIconRetinaUrl: scheduleCreateIcon,\n setIconSize: scheduleCreateIcon,\n setIconAnchor: scheduleCreateIcon,\n setPopupAnchor: scheduleCreateIcon,\n setTooltipAnchor: scheduleCreateIcon,\n setShadowUrl: scheduleCreateIcon,\n setShadowRetinaUrl: scheduleCreateIcon,\n setShadowAnchor: scheduleCreateIcon,\n setBgPos: scheduleCreateIcon,\n setClassName: scheduleCreateIcon,\n setHtml: scheduleCreateIcon,\n };\n\n onMounted(async () => {\n const { DomEvent, divIcon: lDivIcon, icon: lIcon } = useGlobalLeaflet\n ? WINDOW_OR_GLOBAL.L\n : await import('leaflet/dist/leaflet-src.esm');\n\n onDomEvent = DomEvent.on;\n offDomEvent = DomEvent.off;\n divIcon = lDivIcon;\n icon = lIcon;\n\n propsBinder(methods, {}, props);\n\n const observer = new MutationObserver(scheduleHtmlSwap);\n observer.observe(root.value, {\n attributes: true,\n childList: true,\n characterData: true,\n subtree: true,\n });\n scheduleCreateIcon();\n });\n\n return { root };\n },\n render() {\n const content = this.$slots.default ? this.$slots.default() : undefined;\n return h(\"div\", { ref: \"root\" }, content);\n },\n};\n\nscript$a.__file = \"src/components/LIcon.vue\";\n\n/**\n * @typedef {import('leaflet/dist/leaflet-src.esm.js').LatLngBounds} LatLngBounds\n */\n\nconst props$g = {\n ...props$1,\n url: {\n type: String,\n required: true,\n },\n bounds: {\n type: [Array, Object],\n required: true,\n },\n opacity: {\n type: Number,\n custom: true,\n default: 1.0,\n },\n alt: {\n type: String,\n default: \"\",\n },\n interactive: {\n type: Boolean,\n default: false,\n },\n crossOrigin: {\n type: Boolean,\n default: false,\n },\n errorOverlayUrl: {\n type: String,\n custom: true,\n default: \"\",\n },\n zIndex: {\n type: Number,\n custom: true,\n default: 1,\n },\n className: {\n type: String,\n default: \"\",\n },\n};\n\nconst setup$f = (setupProps, LeafletRef, context) => {\n const { options: layerOptions, methods: layerMethods } = setup$1(\n setupProps,\n LeafletRef,\n context\n );\n const options = {\n ...layerOptions,\n ...setupProps,\n };\n\n const methods = {\n ...layerMethods,\n /**\n * Sets the opacity of the overlay.\n * @param {number} opacity\n */\n setOpacity(opacity) {\n return LeafletRef.value.setOpacity(opacity);\n },\n /**\n * Changes the URL of the image.\n * @param {string} url\n */\n setUrl(url) {\n return LeafletRef.value.setUrl(url);\n },\n /**\n * Update the bounds that this ImageOverlay covers\n * @param {LatLngBounds | Array>} bounds\n */\n setBounds(bounds) {\n return LeafletRef.value.setBounds(bounds);\n },\n /**\n * Get the bounds that this ImageOverlay covers\n * @returns {LatLngBounds}\n */\n getBounds() {\n return LeafletRef.value.getBounds();\n },\n /**\n * Returns the instance of HTMLImageElement used by this overlay.\n * @returns {HTMLElement}\n */\n getElement() {\n return LeafletRef.value.getElement();\n },\n /**\n * Brings the layer to the top of all overlays.\n */\n bringToFront() {\n return LeafletRef.value.bringToFront();\n },\n /**\n * Brings the layer to the bottom of all overlays.\n */\n bringToBack() {\n return LeafletRef.value.bringToBack();\n },\n /**\n * Changes the zIndex of the image overlay.\n * @param {number} zIndex\n */\n setZIndex(zIndex) {\n return LeafletRef.value.setZIndex(zIndex);\n },\n };\n\n return { options, methods };\n};\n\n/**\n * ImageOverlay component, render a plain image instead of a geospatial map.\n */\nvar script$b = {\n name: \"LImageOverlay\",\n props: props$g,\n setup(props, context) {\n const leafletRef = ref({});\n const ready = ref(false);\n\n const useGlobalLeaflet = inject(GLOBAL_LEAFLET_OPT);\n const addLayer = inject(\"addLayer\");\n\n const { options, methods } = setup$f(props, leafletRef, context);\n\n onMounted(async () => {\n const { imageOverlay, DomEvent } = useGlobalLeaflet\n ? WINDOW_OR_GLOBAL.L\n : await import('leaflet/dist/leaflet-src.esm');\n leafletRef.value = imageOverlay(props.url, props.bounds, options);\n\n const listeners = remapEvents(context.attrs);\n DomEvent.on(leafletRef.value, listeners);\n propsBinder(methods, leafletRef.value, props);\n addLayer({\n ...props,\n ...methods,\n leafletObject: leafletRef.value,\n });\n ready.value = true;\n nextTick(() => context.emit(\"ready\", leafletRef.value));\n });\n\n return { ready, leafletObject: leafletRef };\n },\n render() {\n return render(this.ready, this.$slots);\n },\n};\n\nscript$b.__file = \"src/components/LImageOverlay.vue\";\n\nvar script$c = {\n props: props$b,\n setup(props, context) {\n const leafletRef = ref({});\n const ready = ref(false);\n\n const useGlobalLeaflet = inject(GLOBAL_LEAFLET_OPT);\n const addLayer = inject(\"addLayer\");\n\n const { methods } = setup$b(props, leafletRef, context);\n\n onMounted(async () => {\n const { layerGroup, DomEvent } = useGlobalLeaflet\n ? WINDOW_OR_GLOBAL.L\n : await import('leaflet/dist/leaflet-src.esm');\n leafletRef.value = layerGroup(props.options);\n\n const listeners = remapEvents(context.attrs);\n DomEvent.on(leafletRef.value, listeners);\n\n propsBinder(methods, leafletRef.value, props);\n addLayer({\n ...props,\n ...methods,\n leafletObject: leafletRef.value,\n });\n ready.value = true;\n nextTick(() => context.emit(\"ready\", leafletRef.value));\n });\n return { ready, leafletObject: leafletRef };\n },\n render() {\n return render(this.ready, this.$slots);\n },\n};\n\nscript$c.__file = \"src/components/LLayerGroup.vue\";\n\nvar script$d = {\n emits: [\"ready\", \"update:zoom\", \"update:center\", \"update:bounds\"],\n props: {\n ...props,\n /**\n * The center of the map, supports .sync modifier\n */\n center: {\n type: [Object, Array],\n default: () => [0, 0],\n },\n /**\n * The bounds of the map, supports .sync modifier\n */\n bounds: {\n type: [Array, Object],\n default: undefined,\n },\n /**\n * The max bounds of the map\n */\n maxBounds: {\n type: [Array, Object],\n default: undefined,\n },\n /**\n * The zoom of the map, supports .sync modifier\n */\n zoom: {\n type: Number,\n default: 0,\n },\n /**\n * The minZoom of the map\n */\n minZoom: {\n type: Number,\n default: undefined,\n },\n /**\n * The maxZoom of the map\n */\n maxZoom: {\n type: Number,\n default: undefined,\n },\n /**\n * The paddingBottomRight of the map\n */\n paddingBottomRight: {\n type: Array,\n default: undefined,\n },\n /**\n * The paddingTopLeft of the map\n */\n paddingTopLeft: {\n type: Array,\n default: undefined,\n },\n /**\n * The padding of the map\n */\n padding: {\n type: Array,\n default: undefined,\n },\n /**\n * The worldCopyJump option for the map\n */\n worldCopyJump: {\n type: Boolean,\n default: false,\n },\n /**\n * The CRS to use for the map. Can be an object that defines a coordinate reference\n * system for projecting geographical points into screen coordinates and back\n * (see https://leafletjs.com/reference-1.7.1.html#crs-l-crs-base), or a string\n * name identifying one of Leaflet's defined CRSs, such as \"EPSG4326\".\n */\n crs: {\n type: [String, Object],\n default: \"EPSG3857\",\n },\n maxBoundsViscosity: {\n type: Number,\n default: undefined,\n },\n inertia: {\n type: Boolean,\n default: undefined,\n },\n inertiaDeceleration: {\n type: Number,\n default: undefined,\n },\n inertiaMaxSpeed: {\n type: Number,\n default: undefined,\n },\n easeLinearity: {\n type: Number,\n default: undefined,\n },\n zoomAnimation: {\n type: Boolean,\n default: undefined,\n },\n zoomAnimationThreshold: {\n type: Number,\n default: undefined,\n },\n fadeAnimation: {\n type: Boolean,\n default: undefined,\n },\n markerZoomAnimation: {\n type: Boolean,\n default: undefined,\n },\n noBlockingAnimations: {\n type: Boolean,\n default: false,\n },\n useGlobalLeaflet: {\n type: Boolean,\n default: false,\n },\n },\n setup(props, context) {\n const root = ref(null);\n const blueprint = reactive({\n ready: false,\n leafletRef: {},\n layersToAdd: [],\n layersInControl: [],\n });\n const { options: componentOptions } = setup(props);\n const options = {\n ...componentOptions,\n minZoom: props.minZoom,\n maxZoom: props.maxZoom,\n maxBounds: props.maxBounds,\n maxBoundsViscosity: props.maxBoundsViscosity,\n worldCopyJump: props.worldCopyJump,\n crs: props.crs,\n center: props.center,\n zoom: props.zoom,\n inertia: props.inertia,\n inertiaDeceleration: props.inertiaDeceleration,\n inertiaMaxSpeed: props.inertiaMaxSpeed,\n easeLinearity: props.easeLinearity,\n zoomAnimation: props.zoomAnimation,\n zoomAnimationThreshold: props.zoomAnimationThreshold,\n fadeAnimation: props.fadeAnimation,\n markerZoomAnimation: props.markerZoomAnimation,\n };\n\n const addLayer = provideLeafletWrapper(\"addLayer\");\n const removeLayer = provideLeafletWrapper(\"removeLayer\");\n const registerControl = provideLeafletWrapper(\"registerControl\");\n const registerLayerControl = provideLeafletWrapper(\"registerLayerControl\");\n provide(GLOBAL_LEAFLET_OPT, props.useGlobalLeaflet);\n\n const eventHandlers = {\n moveEndHandler() {\n /**\n * Triggers when zoom is updated\n * @type {number,string}\n */\n context.emit(\"update:zoom\", blueprint.leafletRef.getZoom());\n /**\n * Triggers when center is updated\n * @type {object,array}\n */\n context.emit(\"update:center\", blueprint.leafletRef.getCenter());\n\n /**\n * Triggers when bounds are updated\n * @type {object}\n */\n context.emit(\"update:bounds\", blueprint.leafletRef.getBounds());\n },\n overlayAddHandler(e) {\n const layer = blueprint.layersInControl.find((l) => l.name === e.name);\n if (layer) {\n layer.updateVisibleProp(true);\n }\n },\n overlayRemoveHandler(e) {\n const layer = blueprint.layersInControl.find((l) => l.name === e.name);\n if (layer) {\n layer.updateVisibleProp(false);\n }\n },\n };\n\n onMounted(async () => {\n if (props.useGlobalLeaflet) {\n WINDOW_OR_GLOBAL.L = WINDOW_OR_GLOBAL.L || (await import('leaflet'));\n }\n const {\n map,\n CRS,\n Icon,\n latLngBounds,\n latLng,\n DomEvent,\n } = props.useGlobalLeaflet\n ? WINDOW_OR_GLOBAL.L\n : await import('leaflet/dist/leaflet-src.esm');\n\n try {\n options.beforeMapMount && (await options.beforeMapMount());\n } catch (error) {\n console.error(\n `The following error occurred running the provided beforeMapMount hook ${error.message}`\n );\n }\n\n await resetWebpackIcon(Icon);\n\n const optionsCrs =\n typeof options.crs == \"string\" ? CRS[options.crs] : options.crs;\n options.crs = optionsCrs || CRS.EPSG3857;\n\n const methods = {\n addLayer(layer) {\n if (layer.layerType !== undefined) {\n if (blueprint.layerControl === undefined) {\n blueprint.layersToAdd.push(layer);\n } else {\n const exist = blueprint.layersInControl.find(\n (l) =>\n l.leafletObject._leaflet_id ===\n layer.leafletObject._leaflet_id\n );\n if (!exist) {\n blueprint.layerControl.addLayer(layer);\n blueprint.layersInControl.push(layer);\n }\n }\n }\n if (layer.visible !== false) {\n blueprint.leafletRef.addLayer(layer.leafletObject);\n }\n },\n removeLayer(layer) {\n if (layer.layerType !== undefined) {\n if (blueprint.layerControl === undefined) {\n blueprint.layersToAdd = blueprint.layersToAdd.filter(\n (l) => l.name !== layer.name\n );\n } else {\n blueprint.layerControl.removeLayer(layer.leafletObject);\n blueprint.layersInControl = blueprint.layersInControl.filter(\n (l) =>\n l.leafletObject._leaflet_id !==\n layer.leafletObject._leaflet_id\n );\n }\n }\n blueprint.leafletRef.removeLayer(layer.leafletObject);\n },\n\n registerLayerControl(lControlLayer) {\n blueprint.layerControl = lControlLayer;\n blueprint.layersToAdd.forEach((layer) => {\n blueprint.layerControl.addLayer(layer);\n });\n blueprint.layersToAdd = [];\n\n registerControl(lControlLayer);\n },\n\n registerControl(lControl) {\n blueprint.leafletRef.addControl(lControl.leafletObject);\n },\n\n setZoom(newVal) {\n const zoom = blueprint.leafletRef.getZoom();\n if (newVal !== zoom) {\n blueprint.leafletRef.setZoom(newVal, {\n animate: props.noBlockingAnimations ? false : null,\n });\n }\n },\n\n setPaddingBottomRight(newVal) {\n blueprint.paddingBottomRight = newVal;\n },\n setPaddingTopLeft(newVal) {\n blueprint.paddingTopLeft = newVal;\n },\n setPadding(newVal) {\n blueprint.padding = newVal;\n },\n setCrs(newVal) {\n const prevBounds = blueprint.leafletRef.getBounds();\n blueprint.leafletRef.options.crs = newVal;\n blueprint.leafletRef.fitBounds(prevBounds, {\n animate: false,\n padding: [0, 0],\n });\n },\n fitBounds(bounds) {\n blueprint.leafletRef.fitBounds(bounds, {\n animate: this.noBlockingAnimations ? false : null,\n });\n },\n setBounds(newVal) {\n if (!newVal) {\n return;\n }\n const newBounds = latLngBounds(newVal);\n if (!newBounds.isValid()) {\n return;\n }\n const oldBounds =\n blueprint.lastSetBounds || blueprint.leafletRef.getBounds();\n const boundsChanged = !oldBounds.equals(newBounds, 0); // set maxMargin to 0 - check exact equals\n if (boundsChanged) {\n blueprint.lastSetBounds = newBounds;\n blueprint.leafletRef.fitBounds(newBounds, this.fitBoundsOptions);\n }\n },\n\n setCenter(newVal) {\n if (newVal == null) {\n return;\n }\n const newCenter = latLng(newVal);\n const oldCenter =\n blueprint.lastSetCenter || blueprint.leafletRef.getCenter();\n if (\n oldCenter.lat !== newCenter.lat ||\n oldCenter.lng !== newCenter.lng\n ) {\n blueprint.lastSetCenter = newCenter;\n blueprint.leafletRef.panTo(newCenter, {\n animate: this.noBlockingAnimations ? false : null,\n });\n }\n },\n };\n\n updateLeafletWrapper(addLayer, methods.addLayer);\n updateLeafletWrapper(removeLayer, methods.removeLayer);\n updateLeafletWrapper(registerControl, methods.registerControl);\n updateLeafletWrapper(registerLayerControl, methods.registerLayerControl);\n\n blueprint.leafletRef = map(root.value, options);\n\n propsBinder(methods, blueprint.leafletRef, props);\n const listeners = remapEvents(context.attrs);\n\n blueprint.leafletRef.on(\n \"moveend\",\n debounce(eventHandlers.moveEndHandler, 100)\n );\n blueprint.leafletRef.on(\"overlayadd\", eventHandlers.overlayAddHandler);\n blueprint.leafletRef.on(\n \"overlayremove\",\n eventHandlers.overlayRemoveHandler\n );\n DomEvent.on(blueprint.leafletRef, listeners);\n blueprint.ready = true;\n nextTick(() => context.emit(\"ready\", blueprint.leafletRef));\n });\n\n onBeforeUnmount(() => {\n if (blueprint.leafletRef) {\n blueprint.leafletRef.remove();\n }\n });\n\n const leafletObject = computed(() => blueprint.leafletRef);\n const ready = computed(() => blueprint.ready);\n return { root, ready, leafletObject };\n },\n render() {\n return h(\n \"div\",\n { style: { width: \"100%\", height: \"100%\" }, ref: \"root\" },\n this.ready ? this.$slots.default() : {}\n );\n },\n};\n\nscript$d.__file = \"src/components/LMap.vue\";\n\nconst props$h = {\n ...props$1,\n pane: {\n type: String,\n default: \"markerPane\",\n },\n draggable: {\n type: Boolean,\n custom: true,\n default: false,\n },\n latLng: {\n type: [Object, Array],\n custom: true,\n default: null,\n },\n icon: {\n type: [Object],\n default: () => undefined,\n custom: false,\n },\n zIndexOffset: {\n type: Number,\n custom: false,\n default: null,\n },\n};\n\nconst setup$g = (props, leafletRef, context) => {\n const { options: layerOptions, methods: layerMethods } = setup$1(\n props,\n leafletRef,\n context\n );\n const options = {\n ...layerOptions,\n ...props,\n };\n\n const methods = {\n ...layerMethods,\n setDraggable(value) {\n if (leafletRef.value.dragging) {\n value\n ? leafletRef.value.dragging.enable()\n : leafletRef.value.dragging.disable();\n }\n },\n latLngSync(event) {\n context.emit(\"update:latLng\", event.latlng);\n context.emit(\"update:lat-lng\", event.latlng);\n },\n setLatLng(newVal) {\n if (newVal == null) {\n return;\n }\n\n if (leafletRef.value) {\n const oldLatLng = leafletRef.value.getLatLng();\n if (!oldLatLng || !oldLatLng.equals(newVal)) {\n leafletRef.value.setLatLng(newVal);\n }\n }\n },\n };\n return { options, methods };\n};\n\n/**\n * Marker component, lets you add and personalize markers on the map\n */\nvar script$e = {\n name: \"LMarker\",\n props: props$h,\n setup(props, context) {\n const leafletRef = ref({});\n const ready = ref(false);\n\n const useGlobalLeaflet = inject(GLOBAL_LEAFLET_OPT);\n const addLayer = inject(\"addLayer\");\n\n provide(\"canSetParentHtml\", () => !!leafletRef.value.getElement());\n provide(\n \"setParentHtml\",\n (html) => (leafletRef.value.getElement().innerHTML = html)\n );\n provide(\n \"setIcon\",\n (newIcon) => leafletRef.value.setIcon && leafletRef.value.setIcon(newIcon)\n );\n const { options, methods } = setup$g(props, leafletRef, context);\n if (options.icon === undefined) {\n // If the options objection has a property named 'icon', then Leaflet will overwrite\n // the default icon with it for the marker, _even if it is undefined_.\n // This leads to the issue discussed in https://github.com/vue-leaflet/vue-leaflet/issues/130\n delete options.icon;\n }\n\n onMounted(async () => {\n const { marker, DomEvent } = useGlobalLeaflet\n ? WINDOW_OR_GLOBAL.L\n : await import('leaflet/dist/leaflet-src.esm');\n leafletRef.value = marker(props.latLng, options);\n\n const listeners = remapEvents(context.attrs);\n DomEvent.on(leafletRef.value, listeners);\n\n leafletRef.value.on(\"move\", debounce(methods.latLngSync, 100));\n propsBinder(methods, leafletRef.value, props);\n addLayer({\n ...props,\n ...methods,\n leafletObject: leafletRef.value,\n });\n ready.value = true;\n nextTick(() => context.emit(\"ready\", leafletRef.value));\n });\n\n return { ready, leafletObject: leafletRef };\n },\n render() {\n return render(this.ready, this.$slots);\n },\n};\n\nscript$e.__file = \"src/components/LMarker.vue\";\n\nconst props$i = {\n ...props$3,\n latLngs: {\n type: Array,\n default: () => [],\n },\n smoothFactor: {\n type: Number,\n custom: true,\n default: 1.0,\n },\n noClip: {\n type: Boolean,\n custom: true,\n default: false,\n },\n};\n\nconst setup$h = (props, leafletRef, context) => {\n const { options: pathOptions, methods: pathMethods } = setup$3(\n props,\n leafletRef,\n context\n );\n const options = {\n ...pathOptions,\n ...props,\n };\n\n const methods = {\n ...pathMethods,\n setSmoothFactor(smoothFactor) {\n leafletRef.value.setStyle({ smoothFactor });\n },\n setNoClip(noClip) {\n leafletRef.value.setStyle({ noClip });\n },\n addLatLng(latLng) {\n leafletRef.value.addLatLng(latLng);\n },\n };\n return { options, methods };\n};\n\nconst props$j = {\n ...props$i,\n};\n\nconst setup$i = (props, leafletRef, context) => {\n const { options: polylineOptions, methods: polylineMethods } = setup$h(\n props,\n leafletRef,\n context\n );\n const options = {\n ...polylineOptions,\n ...props,\n };\n\n const methods = {\n ...polylineMethods,\n toGeoJSON(precision) {\n return leafletRef.value.toGeoJSON(precision);\n },\n };\n\n return { options, methods };\n};\n\n/**\n * Polygon component, lets you add and customize polygon regions on the map\n */\nvar script$f = {\n name: \"LPolygon\",\n props: props$j,\n setup(props, context) {\n const leafletRef = ref({});\n const ready = ref(false);\n\n const useGlobalLeaflet = inject(GLOBAL_LEAFLET_OPT);\n const addLayer = inject(\"addLayer\");\n\n const { options, methods } = setup$i(props, leafletRef, context);\n\n onMounted(async () => {\n const { polygon, DomEvent } = useGlobalLeaflet\n ? WINDOW_OR_GLOBAL.L\n : await import('leaflet/dist/leaflet-src.esm');\n\n leafletRef.value = polygon(props.latLngs, options);\n\n const listeners = remapEvents(context.attrs);\n DomEvent.on(leafletRef.value, listeners);\n\n propsBinder(methods, leafletRef.value, props);\n\n addLayer({\n ...props,\n ...methods,\n leafletObject: leafletRef.value,\n });\n ready.value = true;\n nextTick(() => context.emit(\"ready\", leafletRef.value));\n });\n\n return { ready, leafletObject: leafletRef };\n },\n render() {\n return render(this.ready, this.$slots);\n },\n};\n\nscript$f.__file = \"src/components/LPolygon.vue\";\n\n/**\n * Polyline component, lets you add and personalize polylines on the map\n */\nvar script$g = {\n name: \"LPolyline\",\n props: props$i,\n setup(props, context) {\n const leafletRef = ref({});\n const ready = ref(false);\n\n const useGlobalLeaflet = inject(GLOBAL_LEAFLET_OPT);\n const addLayer = inject(\"addLayer\");\n\n const { options, methods } = setup$h(props, leafletRef, context);\n\n onMounted(async () => {\n const { polyline, DomEvent } = useGlobalLeaflet\n ? WINDOW_OR_GLOBAL.L\n : await import('leaflet/dist/leaflet-src.esm');\n\n leafletRef.value = polyline(props.latLngs, options);\n\n const listeners = remapEvents(context.attrs);\n DomEvent.on(leafletRef.value, listeners);\n\n propsBinder(methods, leafletRef.value, props);\n\n addLayer({\n ...props,\n ...methods,\n leafletObject: leafletRef.value,\n });\n ready.value = true;\n nextTick(() => context.emit(\"ready\", leafletRef.value));\n });\n return { ready, leafletObject: leafletRef };\n },\n render() {\n return render(this.ready, this.$slots);\n },\n};\n\nscript$g.__file = \"src/components/LPolyline.vue\";\n\nconst props$k = {\n ...props,\n content: {\n type: String,\n default: null,\n },\n};\n\nconst setup$j = (props, leafletRef) => {\n const { options, methods: componentMethods } = setup(props);\n const methods = {\n ...componentMethods,\n setContent(newVal) {\n if (leafletRef.value && newVal !== null && newVal !== undefined) {\n leafletRef.value.setContent(newVal);\n }\n },\n };\n return { options, methods };\n};\n\nconst render$2 = (slots) => {\n if (slots.default) {\n return h(\"div\", { ref: \"root\" }, slots.default());\n }\n return null;\n};\n\nconst props$l = {\n ...props$k,\n latLng: {\n type: [Object, Array],\n default: () => [],\n },\n};\n\nconst setup$k = (props, leafletRef) => {\n const { options, methods } = setup$j(props, leafletRef);\n const unbindPopup = inject(\"unbindPopup\");\n\n onBeforeUnmount(() => {\n unbindPopup();\n });\n\n return { options, methods };\n};\n\n/**\n * Display a popup on the map\n */\nvar script$h = {\n name: \"LPopup\",\n props: props$l,\n setup(props, context) {\n const leafletRef = ref({});\n const root = ref(null);\n\n const useGlobalLeaflet = inject(GLOBAL_LEAFLET_OPT);\n const bindPopup = inject(\"bindPopup\");\n\n const { options, methods } = setup$k(props, leafletRef);\n\n onMounted(async () => {\n const { popup, DomEvent } = useGlobalLeaflet\n ? WINDOW_OR_GLOBAL.L\n : await import('leaflet/dist/leaflet-src.esm');\n\n leafletRef.value = popup(options);\n\n if (props.latLng !== undefined) {\n leafletRef.value.setLatLng(props.latLng);\n }\n\n propsBinder(methods, leafletRef.value, props);\n const listeners = remapEvents(context.attrs);\n DomEvent.on(leafletRef.value, listeners);\n leafletRef.value.setContent(props.content || root.value);\n bindPopup({ leafletObject: leafletRef.value });\n nextTick(() => context.emit(\"ready\", leafletRef.value));\n });\n return { root, leafletObject: leafletRef };\n },\n render() {\n return render$2(this.$slots);\n },\n};\n\nscript$h.__file = \"src/components/LPopup.vue\";\n\nconst props$m = {\n ...props$j,\n bounds: {\n type: Array,\n default: undefined,\n },\n};\n\nconst setup$l = (props, leafletRef, context) => {\n const { options: polygonOptions, methods: polygonMethods } = setup$i(\n props,\n leafletRef,\n context\n );\n const options = {\n ...polygonOptions,\n ...props,\n };\n\n const methods = {\n ...polygonMethods,\n setBounds(latLngBounds) {\n leafletRef.value.setBounds(latLngBounds);\n },\n setLatLngs(latLngs) {\n // Calling setLatLngs on a Leaflet rectangle will convert it\n // to a polygon. So instead, we call setBounds here to ensure\n // that the rectangle remains a rectangle, defined by the\n // bounds of the points in the latLngs array.\n leafletRef.value.setBounds(latLngs);\n },\n };\n\n return { options, methods };\n};\n\n/**\n * Rectangle component, lets you add and customize rectangular regions on the map\n */\nvar script$i = {\n name: \"LRectangle\",\n props: props$m,\n setup(props, context) {\n const leafletRef = ref({});\n const ready = ref(false);\n\n const useGlobalLeaflet = inject(GLOBAL_LEAFLET_OPT);\n const addLayer = inject(\"addLayer\");\n\n const { options, methods } = setup$l(props, leafletRef, context);\n\n onMounted(async () => {\n const { rectangle, latLngBounds, DomEvent } = useGlobalLeaflet\n ? WINDOW_OR_GLOBAL.L\n : await import('leaflet/dist/leaflet-src.esm');\n\n const bounds =\n props.bounds && props.bounds.length\n ? latLngBounds(props.bounds)\n : latLngBounds(props.latLngs);\n leafletRef.value = rectangle(bounds, options);\n\n const listeners = remapEvents(context.attrs);\n DomEvent.on(leafletRef.value, listeners);\n\n propsBinder(methods, leafletRef.value, props);\n\n addLayer({\n ...props,\n ...methods,\n leafletObject: leafletRef.value,\n });\n ready.value = true;\n nextTick(() => context.emit(\"ready\", leafletRef.value));\n });\n\n return { ready, leafletObject: leafletRef };\n },\n render() {\n return render(this.ready, this.$slots);\n },\n};\n\nscript$i.__file = \"src/components/LRectangle.vue\";\n\nconst props$n = {\n ...props$e,\n tms: {\n type: Boolean,\n default: false,\n },\n subdomains: {\n type: String,\n default: \"abc\",\n },\n detectRetina: {\n type: Boolean,\n default: false,\n },\n url: {\n type: String,\n default: null,\n },\n};\n\nconst setup$m = (props, leafletRef) => {\n const {\n options: gridLayerOptions,\n methods: gridLayerMethods,\n } = setup$e(props, leafletRef);\n const options = {\n ...gridLayerOptions,\n tms: props.tms,\n subdomains: props.subdomains,\n detectRetina: props.detectRetina,\n };\n return {\n options,\n methods: {\n ...gridLayerMethods,\n },\n };\n};\n\nvar script$j = {\n props: props$n,\n setup(props, context) {\n const leafletRef = ref({});\n\n const useGlobalLeaflet = inject(GLOBAL_LEAFLET_OPT);\n const addLayer = inject(\"addLayer\");\n\n const { options, methods } = setup$m(props, leafletRef);\n\n onMounted(async () => {\n const { tileLayer, DomEvent } = useGlobalLeaflet\n ? WINDOW_OR_GLOBAL.L\n : await import('leaflet/dist/leaflet-src.esm');\n leafletRef.value = tileLayer(props.url, options);\n\n const listeners = remapEvents(context.attrs);\n DomEvent.on(leafletRef.value, listeners);\n\n propsBinder(methods, leafletRef.value, props);\n addLayer({\n ...props,\n ...methods,\n leafletObject: leafletRef.value,\n });\n nextTick(() => context.emit(\"ready\", leafletRef.value));\n });\n\n return { leafletObject: leafletRef };\n },\n render() {\n return null;\n },\n};\n\nscript$j.__file = \"src/components/LTileLayer.vue\";\n\nconst props$o = {\n ...props$k,\n};\n\nconst setup$n = (props, leafletRef) => {\n const { options, methods } = setup$j(props, leafletRef);\n const unbindTooltip = inject(\"unbindTooltip\");\n\n onBeforeUnmount(() => {\n unbindTooltip();\n });\n\n return { options, methods };\n};\n\n/**\n * Display a tooltip on the map\n */\nvar script$k = {\n name: \"LTooltip\",\n props: props$o,\n setup(props, context) {\n const leafletRef = ref({});\n const root = ref(null);\n\n const useGlobalLeaflet = inject(GLOBAL_LEAFLET_OPT);\n const bindTooltip = inject(\"bindTooltip\");\n\n const { options, methods } = setup$n(props, leafletRef);\n\n onMounted(async () => {\n const { tooltip, DomEvent } = useGlobalLeaflet\n ? WINDOW_OR_GLOBAL.L\n : await import('leaflet/dist/leaflet-src.esm');\n\n leafletRef.value = tooltip(options);\n\n propsBinder(methods, leafletRef.value, props);\n const listeners = remapEvents(context.attrs);\n DomEvent.on(leafletRef.value, listeners);\n leafletRef.value.setContent(props.content || root.value);\n bindTooltip({ leafletObject: leafletRef.value });\n nextTick(() => context.emit(\"ready\", leafletRef.value));\n });\n return { root, leafletObject: leafletRef };\n },\n render() {\n return render$2(this.$slots);\n },\n};\n\nscript$k.__file = \"src/components/LTooltip.vue\";\n\nconst props$p = {\n ...props$n,\n baseUrl: {\n type: String,\n default: null,\n required: true,\n },\n layers: {\n type: String,\n default: \"\",\n },\n styles: {\n type: String,\n default: \"\",\n },\n format: {\n type: String,\n default: \"image/jpeg\",\n },\n transparent: {\n type: Boolean,\n custom: false,\n },\n version: {\n type: String,\n default: \"1.1.1\",\n },\n crs: {\n default: null,\n },\n upperCase: {\n type: Boolean,\n default: false,\n },\n};\n\nconst setup$o = (props, leafletRef) => {\n const {\n options: tileLayerOptions,\n methods: tileLayerMethods,\n } = setup$m(props, leafletRef);\n const options = {\n ...tileLayerOptions,\n layers: props.layers,\n styles: props.styles,\n format: props.format,\n transparent: props.transparent,\n version: props.version,\n crs: props.crs,\n upperCase: props.upperCase,\n };\n return {\n options,\n methods: {\n ...tileLayerMethods,\n },\n };\n};\n\nvar script$l = {\n props: props$p,\n setup(props, context) {\n const leafletRef = ref({});\n\n const useGlobalLeaflet = inject(GLOBAL_LEAFLET_OPT);\n const addLayer = inject(\"addLayer\");\n\n const { options, methods } = setup$o(props, leafletRef);\n\n onMounted(async () => {\n const { tileLayer, DomEvent } = useGlobalLeaflet\n ? WINDOW_OR_GLOBAL.L\n : await import('leaflet/dist/leaflet-src.esm');\n\n leafletRef.value = tileLayer.wms(props.baseUrl, options);\n\n const listeners = remapEvents(context.attrs);\n DomEvent.on(leafletRef.value, listeners);\n\n propsBinder(methods, leafletRef.value, props);\n addLayer({\n ...props,\n ...methods,\n leafletObject: leafletRef.value,\n });\n nextTick(() => context.emit(\"ready\", leafletRef.value));\n });\n return { leafletObject: leafletRef.value };\n },\n render() {\n return null;\n },\n};\n\nscript$l.__file = \"src/components/LWmsTileLayer.vue\";\n\nexport { script as LCircle, script$1 as LCircleMarker, script$2 as LControl, script$3 as LControlAttribution, script$4 as LControlLayers, script$5 as LControlScale, script$6 as LControlZoom, script$7 as LFeatureGroup, script$8 as LGeoJson, script$9 as LGridLayer, script$a as LIcon, script$b as LImageOverlay, script$c as LLayerGroup, script$d as LMap, script$e as LMarker, script$f as LPolygon, script$g as LPolyline, script$h as LPopup, script$i as LRectangle, script$j as LTileLayer, script$k as LTooltip, script$l as LWmsTileLayer };\n//# sourceMappingURL=vue-leaflet.esm.js.map\n","import { defineComponent as _defineComponent } from 'vue'\nimport { unref as _unref, createVNode as _createVNode, withCtx as _withCtx, openBlock as _openBlock, createBlock as _createBlock, createCommentVNode as _createCommentVNode } from \"vue\"\n\nimport { LIcon, LMarker } from '@vue-leaflet/vue-leaflet'\n import { toRefs } from 'vue'\n\n import { TCoordinates } from '@/types/workouts'\n\n interface Props {\n markerCoordinates: TCoordinates\n isStart: boolean\n }\n \nexport default /*#__PURE__*/_defineComponent({\n __name: 'CustomMarker',\n props: {\n markerCoordinates: null,\n isStart: { type: Boolean }\n },\n setup(__props: any) {\n\nconst props = __props as {\n markerCoordinates: TCoordinates\n isStart: boolean\n };\n\n \n\n const { isStart, markerCoordinates } = toRefs(props)\n\nreturn (_ctx: any,_cache: any) => {\n return (_unref(markerCoordinates).latitude)\n ? (_openBlock(), _createBlock(_unref(LMarker), {\n key: 0,\n \"lat-lng\": [_unref(markerCoordinates).latitude, _unref(markerCoordinates).longitude]\n }, {\n default: _withCtx(() => [\n _createVNode(_unref(LIcon), {\n \"icon-url\": `/img/workouts/${_unref(isStart) ? 'start' : 'finish'}.svg`,\n iconSize: [15, 15]\n }, null, 8, [\"icon-url\"])\n ]),\n _: 1\n }, 8, [\"lat-lng\"]))\n : _createCommentVNode(\"\", true)\n}\n}\n\n})","import script from \"./CustomMarker.vue?vue&type=script&lang=ts&setup=true\"\nexport * from \"./CustomMarker.vue?vue&type=script&lang=ts&setup=true\"\n\nconst __exports__ = script;\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { unref as _unref, openBlock as _openBlock, createElementBlock as _createElementBlock, createCommentVNode as _createCommentVNode, createVNode as _createVNode, createElementVNode as _createElementVNode, withCtx as _withCtx, normalizeClass as _normalizeClass, createBlock as _createBlock, resolveComponent as _resolveComponent, toDisplayString as _toDisplayString, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from \"vue\"\n\nconst _withScopeId = n => (_pushScopeId(\"data-v-6b490f5d\"),n=n(),_popScopeId(),n)\nconst _hoisted_1 = { id: \"workout-map\" }\nconst _hoisted_2 = {\n key: 0,\n class: \"leaflet-container\"\n}\nconst _hoisted_3 = { key: 1 }\nconst _hoisted_4 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"i\", {\n class: \"fa fa-refresh\",\n \"aria-hidden\": \"true\"\n}, null, -1))\nconst _hoisted_5 = {\n key: 1,\n class: \"no-map\"\n}\n\nimport { gpx } from '@tmcw/togeojson'\n import {\n LControl,\n LControlLayers,\n LGeoJson,\n LLayerGroup,\n LMap,\n LMarker,\n LTileLayer,\n } from '@vue-leaflet/vue-leaflet'\n import { ComputedRef, computed, ref, toRefs, withDefaults } from 'vue'\n import 'leaflet/dist/leaflet.css'\n\n import CustomMarker from '@/components/Workout/WorkoutDetail/WorkoutMap/CustomMarker.vue'\n import { ROOT_STORE } from '@/store/constants'\n import { TAppConfig } from '@/types/application'\n import { GeoJSONData } from '@/types/geojson'\n import { IWorkoutData, TCoordinates } from '@/types/workouts'\n import { useStore } from '@/use/useStore'\n import { getApiUrl } from '@/utils'\n\n interface Props {\n workoutData: IWorkoutData\n markerCoordinates?: TCoordinates\n }\n \nexport default /*#__PURE__*/_defineComponent({\n __name: 'index',\n props: {\n workoutData: null,\n markerCoordinates: { default: () => ({} as TCoordinates) }\n },\n setup(__props: any) {\n\nconst props = __props as { workoutData: IWorkoutData, markerCoordinates: TCoordinates };\n\n \n\n const store = useStore()\n\n const { workoutData, markerCoordinates } = toRefs(props)\n const workoutMap = ref null }\n }>(null)\n const bounds = computed(() => getBounds())\n const appConfig: ComputedRef = computed(\n () => store.getters[ROOT_STORE.GETTERS.APP_CONFIG]\n )\n const center = computed(() => getCenter(bounds))\n const geoJson = computed(() =>\n props.workoutData && props.workoutData.gpx\n ? getGeoJson(props.workoutData.gpx)\n : {}\n )\n const startMarkerCoordinates = computed(() =>\n props.workoutData && props.workoutData.chartData.length > 0\n ? {\n latitude: props.workoutData.chartData[0].latitude,\n longitude: props.workoutData.chartData[0].longitude,\n }\n : {}\n )\n const endMarkerCoordinates = computed(() =>\n props.workoutData && props.workoutData.chartData.length > 0\n ? {\n latitude:\n props.workoutData.chartData[props.workoutData.chartData.length - 1]\n .latitude,\n longitude:\n props.workoutData.chartData[props.workoutData.chartData.length - 1]\n .longitude,\n }\n : {}\n )\n const isFullscreen = ref(false)\n\n function getGeoJson(gpxContent: string): GeoJSONData {\n if (!gpxContent || gpxContent !== '') {\n try {\n const jsonData = gpx(\n new DOMParser().parseFromString(gpxContent, 'text/xml')\n )\n return { jsonData }\n } catch (e) {\n console.error('Invalid gpx content')\n return {}\n }\n }\n return {}\n }\n function getCenter(bounds: ComputedRef): number[] {\n return [\n (bounds.value[0][0] + bounds.value[1][0]) / 2,\n (bounds.value[0][1] + bounds.value[1][1]) / 2,\n ]\n }\n function fitBounds(bounds: number[][]) {\n if (workoutMap.value?.leafletObject) {\n workoutMap.value?.leafletObject.fitBounds(bounds)\n }\n }\n function getBounds() {\n return props.workoutData\n ? [\n [\n props.workoutData.workout.bounds[0],\n props.workoutData.workout.bounds[1],\n ],\n [\n props.workoutData.workout.bounds[2],\n props.workoutData.workout.bounds[3],\n ],\n ]\n : []\n }\n function resetZoom() {\n workoutMap.value?.leafletObject.fitBounds(getBounds())\n }\n function toggleFullscreen() {\n isFullscreen.value = !isFullscreen.value\n if (!isFullscreen.value) {\n setTimeout(() => {\n resetZoom()\n }, 100)\n }\n }\n\nreturn (_ctx: any,_cache: any) => {\n const _component_VFullscreen = _resolveComponent(\"VFullscreen\")!\n\n return (_openBlock(), _createElementBlock(\"div\", _hoisted_1, [\n (_unref(workoutData).loading)\n ? (_openBlock(), _createElementBlock(\"div\", _hoisted_2))\n : (_openBlock(), _createElementBlock(\"div\", _hoisted_3, [\n (_unref(workoutData).workout.with_gpx)\n ? (_openBlock(), _createBlock(_component_VFullscreen, {\n key: 0,\n modelValue: isFullscreen.value,\n \"onUpdate:modelValue\": _cache[1] || (_cache[1] = ($event: any) => ((isFullscreen).value = $event))\n }, {\n default: _withCtx(() => [\n _createElementVNode(\"div\", {\n class: _normalizeClass([\"leaflet-container\", { 'fullscreen-map': isFullscreen.value }])\n }, [\n (_unref(geoJson).jsonData && _unref(center) && _unref(bounds).length === 2)\n ? (_openBlock(), _createBlock(_unref(LMap), {\n key: 0,\n zoom: 13,\n maxZoom: 19,\n center: _unref(center),\n bounds: _unref(bounds),\n ref_key: \"workoutMap\",\n ref: workoutMap,\n onReady: _cache[0] || (_cache[0] = ($event: any) => (fitBounds(_unref(bounds))))\n }, {\n default: _withCtx(() => [\n _createVNode(_unref(LControlLayers)),\n _createVNode(_unref(LControl), {\n position: \"topleft\",\n class: \"map-control\",\n onClick: resetZoom\n }, {\n default: _withCtx(() => [\n _hoisted_4\n ]),\n _: 1\n }),\n _createVNode(_unref(LControl), {\n position: \"topleft\",\n class: \"map-control\",\n onClick: toggleFullscreen\n }, {\n default: _withCtx(() => [\n _createElementVNode(\"i\", {\n class: _normalizeClass(`fa fa-${isFullscreen.value ? 'compress' : 'arrows-alt'}`),\n \"aria-hidden\": \"true\"\n }, null, 2)\n ]),\n _: 1\n }),\n _createVNode(_unref(LTileLayer), {\n url: `${_unref(getApiUrl)()}workouts/map_tile/{s}/{z}/{x}/{y}.png`,\n attribution: _unref(appConfig).map_attribution,\n bounds: _unref(bounds)\n }, null, 8, [\"url\", \"attribution\", \"bounds\"]),\n _createVNode(_unref(LGeoJson), {\n geojson: _unref(geoJson).jsonData\n }, null, 8, [\"geojson\"]),\n (_unref(markerCoordinates).latitude)\n ? (_openBlock(), _createBlock(_unref(LMarker), {\n key: 0,\n \"lat-lng\": [\n _unref(markerCoordinates).latitude,\n _unref(markerCoordinates).longitude,\n ]\n }, null, 8, [\"lat-lng\"]))\n : _createCommentVNode(\"\", true),\n _createVNode(_unref(LLayerGroup), {\n name: _ctx.$t('workouts.START_AND_FINISH'),\n \"layer-type\": \"overlay\"\n }, {\n default: _withCtx(() => [\n (_unref(startMarkerCoordinates).latitude)\n ? (_openBlock(), _createBlock(CustomMarker, {\n key: 0,\n markerCoordinates: _unref(startMarkerCoordinates),\n isStart: true\n }, null, 8, [\"markerCoordinates\"]))\n : _createCommentVNode(\"\", true),\n (_unref(endMarkerCoordinates).latitude)\n ? (_openBlock(), _createBlock(CustomMarker, {\n key: 1,\n markerCoordinates: _unref(endMarkerCoordinates),\n isStart: false\n }, null, 8, [\"markerCoordinates\"]))\n : _createCommentVNode(\"\", true)\n ]),\n _: 1\n }, 8, [\"name\"])\n ]),\n _: 1\n }, 8, [\"center\", \"bounds\"]))\n : _createCommentVNode(\"\", true)\n ], 2)\n ]),\n _: 1\n }, 8, [\"modelValue\"]))\n : (_openBlock(), _createElementBlock(\"div\", _hoisted_5, _toDisplayString(_ctx.$t('workouts.NO_MAP')), 1))\n ]))\n ]))\n}\n}\n\n})","import script from \"./index.vue?vue&type=script&setup=true&lang=ts\"\nexport * from \"./index.vue?vue&type=script&setup=true&lang=ts\"\n\nimport \"./index.vue?vue&type=style&index=0&id=6b490f5d&lang=scss&scoped=true\"\n\nimport exportComponent from \"/mnt/data-lnx/Devs/00_Perso/FitTrackee/fittrackee_client/node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-6b490f5d\"]])\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { resolveComponent as _resolveComponent, unref as _unref, openBlock as _openBlock, createBlock as _createBlock, createCommentVNode as _createCommentVNode, createVNode as _createVNode, withCtx as _withCtx, createElementBlock as _createElementBlock, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from \"vue\"\n\nconst _withScopeId = n => (_pushScopeId(\"data-v-9fc0bab8\"),n=n(),_popScopeId(),n)\nconst _hoisted_1 = { class: \"workout-detail\" }\n\nimport {\n ComputedRef,\n Ref,\n computed,\n ref,\n toRefs,\n watch,\n withDefaults,\n } from 'vue'\n import { useRoute } from 'vue-router'\n\n import WorkoutCardTitle from '@/components/Workout/WorkoutDetail/WorkoutCardTitle.vue'\n import WorkoutData from '@/components/Workout/WorkoutDetail/WorkoutData.vue'\n import WorkoutMap from '@/components/Workout/WorkoutDetail/WorkoutMap/index.vue'\n import { WORKOUTS_STORE } from '@/store/constants'\n import { ISport } from '@/types/sports'\n import { IAuthUserProfile } from '@/types/user'\n import {\n IWorkout,\n IWorkoutData,\n IWorkoutObject,\n IWorkoutSegment,\n TCoordinates,\n } from '@/types/workouts'\n import { useStore } from '@/use/useStore'\n import { formatWorkoutDate, getDateWithTZ } from '@/utils/dates'\n\n interface Props {\n authUser: IAuthUserProfile\n displaySegment: boolean\n sports: ISport[]\n workoutData: IWorkoutData\n markerCoordinates?: TCoordinates\n }\n \nexport default /*#__PURE__*/_defineComponent({\n __name: 'index',\n props: {\n authUser: null,\n displaySegment: { type: Boolean },\n sports: null,\n workoutData: null,\n markerCoordinates: { default: () => ({} as TCoordinates) }\n },\n setup(__props: any) {\n\nconst props = __props as { authUser: IAuthUserProfile, displaySegment: boolean, sports: ISport[], workoutData: IWorkoutData, markerCoordinates: TCoordinates };\n\n \n\n const route = useRoute()\n const store = useStore()\n\n const { authUser, markerCoordinates, workoutData } = toRefs(props)\n const workout: ComputedRef = computed(\n () => props.workoutData.workout\n )\n const segmentId: Ref = ref(\n route.params.workoutId ? +route.params.segmentId : null\n )\n const segment: ComputedRef = computed(() =>\n workout.value.segments.length > 0 && segmentId.value\n ? workout.value.segments[+segmentId.value - 1]\n : null\n )\n const displayModal: Ref = ref(false)\n const sport = computed(() =>\n props.sports\n ? props.sports.find(\n (sport) => sport.id === props.workoutData.workout.sport_id\n )\n : {}\n )\n const workoutObject = computed(() =>\n getWorkoutObject(workout.value, segment.value)\n )\n\n function getWorkoutObjectUrl(\n workout: IWorkout,\n displaySegment: boolean,\n segmentId: number | null\n ): Record {\n const previousUrl =\n displaySegment && segmentId && segmentId !== 1\n ? `/workouts/${workout.id}/segment/${segmentId - 1}`\n : !displaySegment && workout.previous_workout\n ? `/workouts/${workout.previous_workout}`\n : null\n const nextUrl =\n displaySegment && segmentId && segmentId < workout.segments.length\n ? `/workouts/${workout.id}/segment/${segmentId + 1}`\n : !displaySegment && workout.next_workout\n ? `/workouts/${workout.next_workout}`\n : null\n return {\n previousUrl,\n nextUrl,\n }\n }\n function getWorkoutObject(\n workout: IWorkout,\n segment: IWorkoutSegment | null\n ): IWorkoutObject {\n const urls = getWorkoutObjectUrl(\n workout,\n props.displaySegment,\n segmentId.value ? +segmentId.value : null\n )\n const workoutDate = formatWorkoutDate(\n getDateWithTZ(\n props.workoutData.workout.workout_date,\n props.authUser.timezone\n ),\n props.authUser.date_format\n )\n return {\n ascent: segment ? segment.ascent : workout.ascent,\n aveSpeed: segment ? segment.ave_speed : workout.ave_speed,\n distance: segment ? segment.distance : workout.distance,\n descent: segment ? segment.descent : workout.descent,\n duration: segment ? segment.duration : workout.duration,\n maxAlt: segment ? segment.max_alt : workout.max_alt,\n maxSpeed: segment ? segment.max_speed : workout.max_speed,\n minAlt: segment ? segment.min_alt : workout.min_alt,\n moving: segment ? segment.moving : workout.moving,\n nextUrl: urls.nextUrl,\n pauses: segment ? segment.pauses : workout.pauses,\n previousUrl: urls.previousUrl,\n records: segment ? [] : workout.records,\n segmentId: segment ? segment.segment_id : null,\n title: workout.title,\n type: props.displaySegment ? 'SEGMENT' : 'WORKOUT',\n workoutDate: workoutDate.workout_date,\n weatherEnd: segment ? null : workout.weather_end,\n weatherStart: segment ? null : workout.weather_start,\n with_gpx: workout.with_gpx,\n workoutId: workout.id,\n workoutTime: workoutDate.workout_time,\n }\n }\n function updateDisplayModal(value: boolean) {\n displayModal.value = value\n }\n function deleteWorkout(workoutId: string) {\n store.dispatch(WORKOUTS_STORE.ACTIONS.DELETE_WORKOUT, {\n workoutId: workoutId,\n })\n }\n\n watch(\n () => route.params.segmentId,\n async (newSegmentId) => {\n if (newSegmentId) {\n segmentId.value = +newSegmentId\n }\n }\n )\n\nreturn (_ctx: any,_cache: any) => {\n const _component_Modal = _resolveComponent(\"Modal\")!\n const _component_Card = _resolveComponent(\"Card\")!\n\n return (_openBlock(), _createElementBlock(\"div\", _hoisted_1, [\n (displayModal.value)\n ? (_openBlock(), _createBlock(_component_Modal, {\n key: 0,\n title: _ctx.$t('common.CONFIRMATION'),\n message: _ctx.$t('workouts.WORKOUT_DELETION_CONFIRMATION'),\n onConfirmAction: _cache[0] || (_cache[0] = ($event: any) => (deleteWorkout(_unref(workoutObject).workoutId))),\n onCancelAction: _cache[1] || (_cache[1] = ($event: any) => (updateDisplayModal(false)))\n }, null, 8, [\"title\", \"message\"]))\n : _createCommentVNode(\"\", true),\n _createVNode(_component_Card, null, {\n title: _withCtx(() => [\n _createVNode(WorkoutCardTitle, {\n sport: _unref(sport),\n workoutObject: _unref(workoutObject),\n onDisplayModal: _cache[2] || (_cache[2] = ($event: any) => (updateDisplayModal(true)))\n }, null, 8, [\"sport\", \"workoutObject\"])\n ]),\n content: _withCtx(() => [\n _createVNode(WorkoutMap, {\n workoutData: _unref(workoutData),\n markerCoordinates: _unref(markerCoordinates)\n }, null, 8, [\"workoutData\", \"markerCoordinates\"]),\n _createVNode(WorkoutData, {\n workoutObject: _unref(workoutObject),\n useImperialUnits: _unref(authUser).imperial_units,\n displayHARecord: _unref(authUser).display_ascent\n }, null, 8, [\"workoutObject\", \"useImperialUnits\", \"displayHARecord\"])\n ]),\n _: 1\n })\n ]))\n}\n}\n\n})","import script from \"./index.vue?vue&type=script&setup=true&lang=ts\"\nexport * from \"./index.vue?vue&type=script&setup=true&lang=ts\"\n\nimport \"./index.vue?vue&type=style&index=0&id=9fc0bab8&lang=scss&scoped=true\"\n\nimport exportComponent from \"/mnt/data-lnx/Devs/00_Perso/FitTrackee/fittrackee_client/node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-9fc0bab8\"]])\n\nexport default __exports__","import { Chart, LegendItem } from 'chart.js'\n\nconst getOrCreateLegendList = (id: string): HTMLUListElement => {\n const legendContainer = document.getElementById(id)\n if (legendContainer) {\n let listContainer = legendContainer.querySelector('ul')\n if (!listContainer) {\n listContainer = document.createElement('ul')\n legendContainer.appendChild(listContainer)\n }\n return listContainer\n }\n throw new Error('No legend container')\n}\n\nexport const htmlLegendPlugin = {\n id: 'htmlLegend',\n afterUpdate(\n chart: Chart,\n args: Record,\n options: Record\n ): void {\n const ul = getOrCreateLegendList(options.containerID)\n while (ul.firstChild) {\n ul.firstChild.remove()\n }\n\n const legendItems = chart.options.plugins?.legend?.labels?.generateLabels\n ? chart.options.plugins?.legend?.labels?.generateLabels(chart)\n : []\n\n legendItems.forEach((item: LegendItem) => {\n const li = document.createElement('li')\n li.onclick = () => {\n if (item.datasetIndex !== undefined) {\n chart.setDatasetVisibility(\n item.datasetIndex,\n !chart.isDatasetVisible(item.datasetIndex)\n )\n chart.update()\n }\n }\n\n const checkBox = document.createElement('input')\n if (checkBox) {\n checkBox.type = 'checkbox'\n checkBox.id = item.text\n checkBox.checked = !item.hidden\n }\n\n const text = document.createTextNode(item.text)\n\n const boxSpan = document.createElement('span')\n if (boxSpan) {\n boxSpan.style.background = String(item.fillStyle)\n boxSpan.style.borderColor = String(item.strokeStyle)\n }\n\n li.appendChild(checkBox)\n li.appendChild(text)\n li.appendChild(boxSpan)\n ul.appendChild(li)\n })\n },\n}\n","import { defineComponent as _defineComponent } from 'vue'\nimport { toDisplayString as _toDisplayString, createTextVNode as _createTextVNode, createElementVNode as _createElementVNode, unref as _unref, mergeProps as _mergeProps, createVNode as _createVNode, resolveComponent as _resolveComponent, withCtx as _withCtx, openBlock as _openBlock, createElementBlock as _createElementBlock, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from \"vue\"\n\nconst _withScopeId = n => (_pushScopeId(\"data-v-dcea1168\"),n=n(),_popScopeId(),n)\nconst _hoisted_1 = { id: \"workout-chart\" }\nconst _hoisted_2 = { class: \"chart-radio\" }\nconst _hoisted_3 = [\"checked\"]\nconst _hoisted_4 = [\"checked\"]\nconst _hoisted_5 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"div\", { id: \"chart-legend\" }, null, -1))\nconst _hoisted_6 = { class: \"chart-info\" }\nconst _hoisted_7 = { class: \"no-data-cleaning\" }\nconst _hoisted_8 = { class: \"elevation-start\" }\nconst _hoisted_9 = [\"checked\"]\n\nimport { ChartData, ChartOptions } from 'chart.js'\n import { ComputedRef, computed, ref } from 'vue'\n import { LineChart, useLineChart } from 'vue-chart-3'\n import { useI18n } from 'vue-i18n'\n\n import { htmlLegendPlugin } from '@/components/Workout/WorkoutDetail/WorkoutChart/legend'\n import { TUnit } from '@/types/units'\n import { IAuthUserProfile } from '@/types/user'\n import {\n IWorkoutChartData,\n IWorkoutData,\n TCoordinates,\n } from '@/types/workouts'\n import { units } from '@/utils/units'\n import { getDatasets } from '@/utils/workouts'\n\n interface Props {\n authUser: IAuthUserProfile\n workoutData: IWorkoutData\n }\n \nexport default /*#__PURE__*/_defineComponent({\n __name: 'index',\n props: {\n authUser: null,\n workoutData: null\n },\n emits: ['getCoordinates'],\n setup(__props: any, { emit }) {\n\nconst props = __props as {\n authUser: IAuthUserProfile\n workoutData: IWorkoutData\n };\n\n \n\n \n\n const { t } = useI18n()\n\n const displayDistance = ref(true)\n const beginElevationAtZero = ref(true)\n const datasets: ComputedRef = computed(() =>\n getDatasets(props.workoutData.chartData, t, props.authUser.imperial_units)\n )\n const fromKmUnit = getUnitTo('km')\n const fromMUnit = getUnitTo('m')\n const chartData: ComputedRef> = computed(() => ({\n labels: displayDistance.value\n ? datasets.value.distance_labels\n : datasets.value.duration_labels,\n datasets: JSON.parse(\n JSON.stringify([\n datasets.value.datasets.speed,\n datasets.value.datasets.elevation,\n ])\n ),\n }))\n const coordinates: ComputedRef = computed(\n () => datasets.value.coordinates\n )\n const options = computed>(() => ({\n responsive: true,\n maintainAspectRatio: true,\n animation: false,\n layout: {\n padding: {\n top: 22,\n },\n },\n scales: {\n [displayDistance.value ? 'xDistance' : 'xDuration']: {\n grid: {\n drawOnChartArea: false,\n },\n ticks: {\n count: 10,\n callback: function (value) {\n return displayDistance.value\n ? Number(value).toFixed(2)\n : formatDuration(value)\n },\n },\n type: 'linear',\n bounds: 'data',\n title: {\n display: true,\n text: displayDistance.value\n ? t('workouts.DISTANCE') + ` (${fromKmUnit})`\n : t('workouts.DURATION'),\n },\n },\n ySpeed: {\n grid: {\n drawOnChartArea: false,\n },\n position: 'left',\n title: {\n display: true,\n text: t('workouts.SPEED') + ` (${fromKmUnit}/h)`,\n },\n },\n yElevation: {\n beginAtZero: beginElevationAtZero.value,\n grid: {\n drawOnChartArea: false,\n },\n position: 'right',\n title: {\n display: true,\n text: t('workouts.ELEVATION') + ` (${fromMUnit})`,\n },\n },\n },\n elements: {\n point: {\n pointStyle: 'circle',\n pointRadius: 0,\n },\n },\n plugins: {\n datalabels: {\n display: false,\n },\n tooltip: {\n interaction: {\n intersect: false,\n mode: 'index',\n },\n callbacks: {\n label: function (context) {\n const label = ` ${context.dataset.label}: ${context.formattedValue}`\n return context.dataset.yAxisID === 'yElevation'\n ? label + ` ${fromMUnit}`\n : label + ` ${fromKmUnit}/h`\n },\n title: function (tooltipItems) {\n if (tooltipItems.length > 0) {\n emitCoordinates(coordinates.value[tooltipItems[0].dataIndex])\n }\n return tooltipItems.length === 0\n ? ''\n : displayDistance.value\n ? `${t('workouts.DISTANCE')}: ${\n tooltipItems[0].label\n } ${fromKmUnit}`\n : `${t('workouts.DURATION')}: ${formatDuration(\n tooltipItems[0].label.replace(',', '')\n )}`\n },\n },\n },\n legend: {\n display: false,\n },\n htmlLegend: {\n containerID: 'chart-legend',\n },\n },\n }))\n const { lineChartProps } = useLineChart({\n chartData,\n options,\n plugins: [htmlLegendPlugin],\n })\n\n function updateDisplayDistance() {\n displayDistance.value = !displayDistance.value\n }\n function formatDuration(duration: string | number): string {\n return new Date(+duration * 1000).toISOString().substr(11, 8)\n }\n function emitCoordinates(coordinates: TCoordinates) {\n emit('getCoordinates', coordinates)\n }\n function emitEmptyCoordinates() {\n emitCoordinates({ latitude: null, longitude: null })\n }\n function getUnitTo(unitFrom: TUnit): TUnit {\n return props.authUser.imperial_units\n ? units[unitFrom].defaultTarget\n : unitFrom\n }\n\nreturn (_ctx: any,_cache: any) => {\n const _component_Card = _resolveComponent(\"Card\")!\n\n return (_openBlock(), _createElementBlock(\"div\", _hoisted_1, [\n _createVNode(_component_Card, null, {\n title: _withCtx(() => [\n _createTextVNode(_toDisplayString(_ctx.$t('workouts.ANALYSIS')), 1)\n ]),\n content: _withCtx(() => [\n _createElementVNode(\"div\", _hoisted_2, [\n _createElementVNode(\"label\", null, [\n _createElementVNode(\"input\", {\n type: \"radio\",\n name: \"distance\",\n checked: displayDistance.value,\n onClick: updateDisplayDistance\n }, null, 8, _hoisted_3),\n _createTextVNode(\" \" + _toDisplayString(_ctx.$t('workouts.DISTANCE')), 1)\n ]),\n _createElementVNode(\"label\", null, [\n _createElementVNode(\"input\", {\n type: \"radio\",\n name: \"duration\",\n checked: !displayDistance.value,\n onClick: updateDisplayDistance\n }, null, 8, _hoisted_4),\n _createTextVNode(\" \" + _toDisplayString(_ctx.$t('workouts.DURATION')), 1)\n ])\n ]),\n _hoisted_5,\n _createVNode(_unref(LineChart), _mergeProps(_unref(lineChartProps), {\n class: \"line-chart\",\n onMouseleave: emitEmptyCoordinates\n }), null, 16),\n _createElementVNode(\"div\", _hoisted_6, [\n _createElementVNode(\"div\", _hoisted_7, _toDisplayString(_ctx.$t('workouts.NO_DATA_CLEANING')), 1),\n _createElementVNode(\"div\", _hoisted_8, [\n _createElementVNode(\"label\", null, [\n _createElementVNode(\"input\", {\n type: \"checkbox\",\n checked: beginElevationAtZero.value,\n onClick: _cache[0] || (_cache[0] = ($event: any) => (beginElevationAtZero.value = !beginElevationAtZero.value))\n }, null, 8, _hoisted_9),\n _createTextVNode(\" \" + _toDisplayString(_ctx.$t('workouts.START_ELEVATION_AT_ZERO')), 1)\n ])\n ])\n ])\n ]),\n _: 1\n })\n ]))\n}\n}\n\n})","import script from \"./index.vue?vue&type=script&setup=true&lang=ts\"\nexport * from \"./index.vue?vue&type=script&setup=true&lang=ts\"\n\nimport \"./index.vue?vue&type=style&index=0&id=dcea1168&lang=scss&scoped=true\"\n\nimport exportComponent from \"/mnt/data-lnx/Devs/00_Perso/FitTrackee/fittrackee_client/node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-dcea1168\"]])\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { toDisplayString as _toDisplayString, createTextVNode as _createTextVNode, unref as _unref, resolveComponent as _resolveComponent, withCtx as _withCtx, createVNode as _createVNode, openBlock as _openBlock, createElementBlock as _createElementBlock, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from \"vue\"\n\nconst _withScopeId = n => (_pushScopeId(\"data-v-028ad527\"),n=n(),_popScopeId(),n)\nconst _hoisted_1 = { id: \"workout-note\" }\n\nimport { toRefs, withDefaults } from 'vue'\n\n interface Props {\n notes?: string | null\n }\n \nexport default /*#__PURE__*/_defineComponent({\n __name: 'WorkoutNotes',\n props: {\n notes: { default: () => null }\n },\n setup(__props: any) {\n\nconst props = __props as { notes: string | null };\n\n \n\n const { notes } = toRefs(props)\n\nreturn (_ctx: any,_cache: any) => {\n const _component_Card = _resolveComponent(\"Card\")!\n\n return (_openBlock(), _createElementBlock(\"div\", _hoisted_1, [\n _createVNode(_component_Card, null, {\n title: _withCtx(() => [\n _createTextVNode(_toDisplayString(_ctx.$t('workouts.NOTES')), 1)\n ]),\n content: _withCtx(() => [\n _createTextVNode(_toDisplayString(_unref(notes) && _unref(notes) !== '' ? _unref(notes) : _ctx.$t('workouts.NO_NOTES')), 1)\n ]),\n _: 1\n })\n ]))\n}\n}\n\n})","import script from \"./WorkoutNotes.vue?vue&type=script&setup=true&lang=ts\"\nexport * from \"./WorkoutNotes.vue?vue&type=script&setup=true&lang=ts\"\n\nimport \"./WorkoutNotes.vue?vue&type=style&index=0&id=028ad527&lang=scss&scoped=true\"\n\nimport exportComponent from \"/mnt/data-lnx/Devs/00_Perso/FitTrackee/fittrackee_client/node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-028ad527\"]])\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { toDisplayString as _toDisplayString, createTextVNode as _createTextVNode, unref as _unref, renderList as _renderList, Fragment as _Fragment, openBlock as _openBlock, createElementBlock as _createElementBlock, resolveComponent as _resolveComponent, withCtx as _withCtx, createVNode as _createVNode, createElementVNode as _createElementVNode, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from \"vue\"\n\nconst _withScopeId = n => (_pushScopeId(\"data-v-6b8a27cd\"),n=n(),_popScopeId(),n)\nconst _hoisted_1 = { id: \"workout-segments\" }\n\nimport { toRefs } from 'vue'\n\n import { IWorkoutSegment } from '@/types/workouts'\n\n interface Props {\n segments: IWorkoutSegment[]\n useImperialUnits: boolean\n }\n \nexport default /*#__PURE__*/_defineComponent({\n __name: 'WorkoutSegments',\n props: {\n segments: null,\n useImperialUnits: { type: Boolean }\n },\n setup(__props: any) {\n\nconst props = __props as {\n segments: IWorkoutSegment[]\n useImperialUnits: boolean\n };\n\n \n\n const { segments, useImperialUnits } = toRefs(props)\n\nreturn (_ctx: any,_cache: any) => {\n const _component_router_link = _resolveComponent(\"router-link\")!\n const _component_Distance = _resolveComponent(\"Distance\")!\n const _component_Card = _resolveComponent(\"Card\")!\n\n return (_openBlock(), _createElementBlock(\"div\", _hoisted_1, [\n _createVNode(_component_Card, null, {\n title: _withCtx(() => [\n _createTextVNode(_toDisplayString(_ctx.$t('workouts.SEGMENT', 2)), 1)\n ]),\n content: _withCtx(() => [\n _createElementVNode(\"ul\", null, [\n (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(_unref(segments), (segment, index) => {\n return (_openBlock(), _createElementBlock(\"li\", {\n key: segment.segment_id\n }, [\n _createVNode(_component_router_link, {\n to: {\n name: 'WorkoutSegment',\n params: {\n workoutId: segment.workout_id,\n segmentId: index + 1,\n },\n }\n }, {\n default: _withCtx(() => [\n _createTextVNode(_toDisplayString(_ctx.$t('workouts.SEGMENT', 1)) + \" \" + _toDisplayString(index + 1), 1)\n ]),\n _: 2\n }, 1032, [\"to\"]),\n _createTextVNode(\" (\" + _toDisplayString(_ctx.$t('workouts.DISTANCE')) + \": \", 1),\n _createVNode(_component_Distance, {\n distance: segment.distance,\n unitFrom: \"km\",\n useImperialUnits: _unref(useImperialUnits)\n }, null, 8, [\"distance\", \"useImperialUnits\"]),\n _createTextVNode(\", \" + _toDisplayString(_ctx.$t('workouts.DURATION')) + \": \" + _toDisplayString(segment.duration) + \") \", 1)\n ]))\n }), 128))\n ])\n ]),\n _: 1\n })\n ]))\n}\n}\n\n})","import script from \"./WorkoutSegments.vue?vue&type=script&setup=true&lang=ts\"\nexport * from \"./WorkoutSegments.vue?vue&type=script&setup=true&lang=ts\"\n\nimport \"./WorkoutSegments.vue?vue&type=style&index=0&id=6b8a27cd&lang=scss&scoped=true\"\n\nimport exportComponent from \"/mnt/data-lnx/Devs/00_Perso/FitTrackee/fittrackee_client/node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-6b8a27cd\"]])\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { unref as _unref, createVNode as _createVNode, openBlock as _openBlock, createBlock as _createBlock, createCommentVNode as _createCommentVNode, createElementVNode as _createElementVNode, createElementBlock as _createElementBlock, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from \"vue\"\n\nconst _withScopeId = n => (_pushScopeId(\"data-v-53c4e53a\"),n=n(),_popScopeId(),n)\nconst _hoisted_1 = {\n id: \"workout\",\n class: \"view\"\n}\nconst _hoisted_2 = { class: \"container\" }\nconst _hoisted_3 = {\n key: 0,\n class: \"workout-container\"\n}\nconst _hoisted_4 = { key: 0 }\nconst _hoisted_5 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"div\", { id: \"bottom\" }, null, -1))\nconst _hoisted_6 = { key: 1 }\n\nimport {\n ComputedRef,\n Ref,\n computed,\n ref,\n toRefs,\n watch,\n onBeforeMount,\n onUnmounted,\n } from 'vue'\n import { useRoute } from 'vue-router'\n\n import NotFound from '@/components/Common/NotFound.vue'\n import WorkoutDetail from '@/components/Workout/WorkoutDetail/index.vue'\n import WorkoutChart from '@/components/Workout/WorkoutDetail/WorkoutChart/index.vue'\n import WorkoutNotes from '@/components/Workout/WorkoutDetail/WorkoutNotes.vue'\n import WorkoutSegments from '@/components/Workout/WorkoutDetail/WorkoutSegments.vue'\n import {\n AUTH_USER_STORE,\n SPORTS_STORE,\n WORKOUTS_STORE,\n } from '@/store/constants'\n import { ISport } from '@/types/sports'\n import { IAuthUserProfile } from '@/types/user'\n import { IWorkoutData, IWorkoutPayload, TCoordinates } from '@/types/workouts'\n import { useStore } from '@/use/useStore'\n\n interface Props {\n displaySegment: boolean\n }\n \nexport default /*#__PURE__*/_defineComponent({\n __name: 'Workout',\n props: {\n displaySegment: { type: Boolean }\n },\n setup(__props: any) {\n\nconst props = __props as {\n displaySegment: boolean\n };\n\n \n\n const route = useRoute()\n const store = useStore()\n\n const { displaySegment } = toRefs(props)\n const workoutData: ComputedRef = computed(\n () => store.getters[WORKOUTS_STORE.GETTERS.WORKOUT_DATA]\n )\n const authUser: ComputedRef = computed(\n () => store.getters[AUTH_USER_STORE.GETTERS.AUTH_USER_PROFILE]\n )\n const sports: ComputedRef = computed(\n () => store.getters[SPORTS_STORE.GETTERS.SPORTS]\n )\n const markerCoordinates: Ref = ref({\n latitude: null,\n longitude: null,\n })\n\n onBeforeMount(() => {\n const payload: IWorkoutPayload = { workoutId: route.params.workoutId }\n if (props.displaySegment) {\n payload.segmentId = route.params.segmentId\n }\n store.dispatch(WORKOUTS_STORE.ACTIONS.GET_WORKOUT_DATA, payload)\n })\n\n onUnmounted(() => {\n store.commit(WORKOUTS_STORE.MUTATIONS.EMPTY_WORKOUT)\n })\n\n function updateCoordinates(coordinates: TCoordinates) {\n markerCoordinates.value = {\n latitude: coordinates.latitude,\n longitude: coordinates.longitude,\n }\n }\n\n watch(\n () => route.params.workoutId,\n async (newWorkoutId) => {\n if (newWorkoutId) {\n store.dispatch(WORKOUTS_STORE.ACTIONS.GET_WORKOUT_DATA, {\n workoutId: newWorkoutId,\n })\n }\n }\n )\n watch(\n () => route.params.segmentId,\n async (newSegmentId) => {\n if (route.params.workoutId) {\n const payload: IWorkoutPayload = {\n workoutId: route.params.workoutId,\n }\n if (newSegmentId) {\n payload.segmentId = newSegmentId\n }\n store.dispatch(WORKOUTS_STORE.ACTIONS.GET_WORKOUT_DATA, payload)\n }\n }\n )\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(\"div\", _hoisted_1, [\n _createElementVNode(\"div\", _hoisted_2, [\n (_unref(sports).length > 0)\n ? (_openBlock(), _createElementBlock(\"div\", _hoisted_3, [\n (_unref(workoutData).workout.id)\n ? (_openBlock(), _createElementBlock(\"div\", _hoisted_4, [\n _createVNode(WorkoutDetail, {\n workoutData: _unref(workoutData),\n sports: _unref(sports),\n authUser: _unref(authUser),\n markerCoordinates: markerCoordinates.value,\n displaySegment: _unref(displaySegment)\n }, null, 8, [\"workoutData\", \"sports\", \"authUser\", \"markerCoordinates\", \"displaySegment\"]),\n (\n _unref(workoutData).workout.with_gpx && _unref(workoutData).chartData.length > 0\n )\n ? (_openBlock(), _createBlock(WorkoutChart, {\n key: 0,\n workoutData: _unref(workoutData),\n authUser: _unref(authUser),\n displaySegment: _unref(displaySegment),\n onGetCoordinates: updateCoordinates\n }, null, 8, [\"workoutData\", \"authUser\", \"displaySegment\"]))\n : _createCommentVNode(\"\", true),\n (!_unref(displaySegment) && _unref(workoutData).workout.segments.length > 1)\n ? (_openBlock(), _createBlock(WorkoutSegments, {\n key: 1,\n segments: _unref(workoutData).workout.segments,\n useImperialUnits: _unref(authUser).imperial_units\n }, null, 8, [\"segments\", \"useImperialUnits\"]))\n : _createCommentVNode(\"\", true),\n (!_unref(displaySegment))\n ? (_openBlock(), _createBlock(WorkoutNotes, {\n key: 2,\n notes: _unref(workoutData).workout.notes\n }, null, 8, [\"notes\"]))\n : _createCommentVNode(\"\", true),\n _hoisted_5\n ]))\n : (_openBlock(), _createElementBlock(\"div\", _hoisted_6, [\n (!_unref(workoutData).loading)\n ? (_openBlock(), _createBlock(NotFound, {\n key: 0,\n target: \"WORKOUT\"\n }))\n : _createCommentVNode(\"\", true)\n ]))\n ]))\n : _createCommentVNode(\"\", true)\n ])\n ]))\n}\n}\n\n})","import script from \"./Workout.vue?vue&type=script&setup=true&lang=ts\"\nexport * from \"./Workout.vue?vue&type=script&setup=true&lang=ts\"\n\nimport \"./Workout.vue?vue&type=style&index=0&id=53c4e53a&lang=scss&scoped=true\"\n\nimport exportComponent from \"/mnt/data-lnx/Devs/00_Perso/FitTrackee/fittrackee_client/node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-53c4e53a\"]])\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { toDisplayString as _toDisplayString, createElementVNode as _createElementVNode, unref as _unref, renderList as _renderList, Fragment as _Fragment, openBlock as _openBlock, createElementBlock as _createElementBlock, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from \"vue\"\n\nconst _withScopeId = n => (_pushScopeId(\"data-v-6c38593a\"),n=n(),_popScopeId(),n)\nconst _hoisted_1 = { class: \"workouts-filters\" }\nconst _hoisted_2 = { class: \"box\" }\nconst _hoisted_3 = { class: \"form\" }\nconst _hoisted_4 = { class: \"form-items-group\" }\nconst _hoisted_5 = { class: \"form-item\" }\nconst _hoisted_6 = [\"value\"]\nconst _hoisted_7 = { class: \"form-item\" }\nconst _hoisted_8 = [\"value\"]\nconst _hoisted_9 = { class: \"form-items-group\" }\nconst _hoisted_10 = { class: \"form-item\" }\nconst _hoisted_11 = [\"value\"]\nconst _hoisted_12 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"option\", { value: \"\" }, null, -1))\nconst _hoisted_13 = [\"value\"]\nconst _hoisted_14 = { class: \"form-items-group\" }\nconst _hoisted_15 = { class: \"form-item\" }\nconst _hoisted_16 = { class: \"form-inputs-group\" }\nconst _hoisted_17 = [\"value\"]\nconst _hoisted_18 = [\"value\"]\nconst _hoisted_19 = { class: \"form-items-group\" }\nconst _hoisted_20 = { class: \"form-item\" }\nconst _hoisted_21 = { class: \"form-inputs-group\" }\nconst _hoisted_22 = [\"value\"]\nconst _hoisted_23 = [\"value\"]\nconst _hoisted_24 = { class: \"form-items-group\" }\nconst _hoisted_25 = { class: \"form-item\" }\nconst _hoisted_26 = { class: \"form-inputs-group\" }\nconst _hoisted_27 = [\"value\"]\nconst _hoisted_28 = [\"value\"]\nconst _hoisted_29 = { class: \"form-items-group\" }\nconst _hoisted_30 = { class: \"form-item\" }\nconst _hoisted_31 = { class: \"form-inputs-group\" }\nconst _hoisted_32 = [\"value\"]\nconst _hoisted_33 = [\"value\"]\nconst _hoisted_34 = { class: \"form-button\" }\n\nimport { ComputedRef, computed, toRefs, watch } from 'vue'\n import { useI18n } from 'vue-i18n'\n import { LocationQuery, useRoute, useRouter } from 'vue-router'\n\n import { ISport } from '@/types/sports'\n import { IAuthUserProfile } from '@/types/user'\n import { translateSports } from '@/utils/sports'\n import { units } from '@/utils/units'\n\n interface Props {\n authUser: IAuthUserProfile\n sports: ISport[]\n }\n \nexport default /*#__PURE__*/_defineComponent({\n __name: 'WorkoutsFilters',\n props: {\n authUser: null,\n sports: null\n },\n emits: ['filter'],\n setup(__props: any, { emit }) {\n\nconst props = __props as {\n authUser: IAuthUserProfile\n sports: ISport[]\n };\n\n \n\n \n\n const { t } = useI18n()\n const route = useRoute()\n const router = useRouter()\n\n const { authUser } = toRefs(props)\n\n const toUnit = authUser.value.imperial_units\n ? units['km'].defaultTarget\n : 'km'\n const translatedSports: ComputedRef = computed(() =>\n translateSports(props.sports, t)\n )\n let params: LocationQuery = Object.assign({}, route.query)\n\n function handleFilterChange(event: Event & { target: HTMLInputElement }) {\n if (event.target.value === '') {\n delete params[event.target.name]\n } else {\n params[event.target.name] = event.target.value\n }\n }\n function onFilter() {\n emit('filter')\n if ('page' in params) {\n params['page'] = '1'\n }\n router.push({ path: '/workouts', query: params })\n }\n function onClearFilter() {\n emit('filter')\n router.push({ path: '/workouts', query: {} })\n }\n\n watch(\n () => route.query,\n (newQuery) => {\n params = Object.assign({}, newQuery)\n }\n )\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(\"div\", _hoisted_1, [\n _createElementVNode(\"div\", _hoisted_2, [\n _createElementVNode(\"div\", _hoisted_3, [\n _createElementVNode(\"div\", _hoisted_4, [\n _createElementVNode(\"div\", _hoisted_5, [\n _createElementVNode(\"label\", null, _toDisplayString(_ctx.$t('workouts.FROM')) + \": \", 1),\n _createElementVNode(\"input\", {\n name: \"from\",\n type: \"date\",\n value: _ctx.$route.query.from,\n onChange: handleFilterChange\n }, null, 40, _hoisted_6)\n ]),\n _createElementVNode(\"div\", _hoisted_7, [\n _createElementVNode(\"label\", null, _toDisplayString(_ctx.$t('workouts.TO')) + \": \", 1),\n _createElementVNode(\"input\", {\n name: \"to\",\n type: \"date\",\n value: _ctx.$route.query.to,\n onChange: handleFilterChange\n }, null, 40, _hoisted_8)\n ])\n ]),\n _createElementVNode(\"div\", _hoisted_9, [\n _createElementVNode(\"div\", _hoisted_10, [\n _createElementVNode(\"label\", null, _toDisplayString(_ctx.$t('workouts.SPORT', 1)) + \":\", 1),\n _createElementVNode(\"select\", {\n name: \"sport_id\",\n value: _ctx.$route.query.sport_id,\n onChange: handleFilterChange\n }, [\n _hoisted_12,\n (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(_unref(translatedSports).filter((s) =>\n _unref(authUser).sports_list.includes(s.id)\n ), (sport) => {\n return (_openBlock(), _createElementBlock(\"option\", {\n value: sport.id,\n key: sport.id\n }, _toDisplayString(sport.translatedLabel), 9, _hoisted_13))\n }), 128))\n ], 40, _hoisted_11)\n ])\n ]),\n _createElementVNode(\"div\", _hoisted_14, [\n _createElementVNode(\"div\", _hoisted_15, [\n _createElementVNode(\"label\", null, _toDisplayString(_ctx.$t('workouts.DISTANCE')) + \" (\" + _toDisplayString(_unref(toUnit)) + \"): \", 1),\n _createElementVNode(\"div\", _hoisted_16, [\n _createElementVNode(\"input\", {\n name: \"distance_from\",\n type: \"number\",\n min: \"0\",\n step: \"0.1\",\n value: _ctx.$route.query.distance_from,\n onChange: handleFilterChange\n }, null, 40, _hoisted_17),\n _createElementVNode(\"span\", null, _toDisplayString(_ctx.$t('workouts.TO')), 1),\n _createElementVNode(\"input\", {\n name: \"distance_to\",\n type: \"number\",\n min: \"0\",\n step: \"0.1\",\n value: _ctx.$route.query.distance_to,\n onChange: handleFilterChange\n }, null, 40, _hoisted_18)\n ])\n ])\n ]),\n _createElementVNode(\"div\", _hoisted_19, [\n _createElementVNode(\"div\", _hoisted_20, [\n _createElementVNode(\"label\", null, _toDisplayString(_ctx.$t('workouts.DURATION')) + \": \", 1),\n _createElementVNode(\"div\", _hoisted_21, [\n _createElementVNode(\"input\", {\n name: \"duration_from\",\n value: _ctx.$route.query.duration_from,\n onChange: handleFilterChange,\n pattern: \"^([0-9]*[0-9]):([0-5][0-9])$\",\n placeholder: \"hh:mm\",\n type: \"text\"\n }, null, 40, _hoisted_22),\n _createElementVNode(\"span\", null, _toDisplayString(_ctx.$t('workouts.TO')), 1),\n _createElementVNode(\"input\", {\n name: \"duration_to\",\n value: _ctx.$route.query.duration_to,\n onChange: handleFilterChange,\n pattern: \"^([0-9]*[0-9]):([0-5][0-9])$\",\n placeholder: \"hh:mm\",\n type: \"text\"\n }, null, 40, _hoisted_23)\n ])\n ])\n ]),\n _createElementVNode(\"div\", _hoisted_24, [\n _createElementVNode(\"div\", _hoisted_25, [\n _createElementVNode(\"label\", null, _toDisplayString(_ctx.$t('workouts.AVE_SPEED')) + \" (\" + _toDisplayString(_unref(toUnit)) + \"/h): \", 1),\n _createElementVNode(\"div\", _hoisted_26, [\n _createElementVNode(\"input\", {\n min: \"0\",\n name: \"ave_speed_from\",\n value: _ctx.$route.query.ave_speed_from,\n onChange: handleFilterChange,\n step: \"0.1\",\n type: \"number\"\n }, null, 40, _hoisted_27),\n _createElementVNode(\"span\", null, _toDisplayString(_ctx.$t('workouts.TO')), 1),\n _createElementVNode(\"input\", {\n min: \"0\",\n name: \"ave_speed_to\",\n value: _ctx.$route.query.ave_speed_to,\n onChange: handleFilterChange,\n step: \"0.1\",\n type: \"number\"\n }, null, 40, _hoisted_28)\n ])\n ])\n ]),\n _createElementVNode(\"div\", _hoisted_29, [\n _createElementVNode(\"div\", _hoisted_30, [\n _createElementVNode(\"label\", null, _toDisplayString(_ctx.$t('workouts.MAX_SPEED')) + \" (\" + _toDisplayString(_unref(toUnit)) + \"/h): \", 1),\n _createElementVNode(\"div\", _hoisted_31, [\n _createElementVNode(\"input\", {\n min: \"0\",\n name: \"max_speed_from\",\n value: _ctx.$route.query.max_speed_from,\n onChange: handleFilterChange,\n step: \"0.1\",\n type: \"number\"\n }, null, 40, _hoisted_32),\n _createElementVNode(\"span\", null, _toDisplayString(_ctx.$t('workouts.TO')), 1),\n _createElementVNode(\"input\", {\n min: \"0\",\n name: \"max_speed_to\",\n value: _ctx.$route.query.max_speed_to,\n onChange: handleFilterChange,\n step: \"0.1\",\n type: \"number\"\n }, null, 40, _hoisted_33)\n ])\n ])\n ])\n ]),\n _createElementVNode(\"div\", _hoisted_34, [\n _createElementVNode(\"button\", {\n class: \"confirm\",\n onClick: onFilter\n }, _toDisplayString(_ctx.$t('buttons.FILTER')), 1),\n _createElementVNode(\"button\", {\n class: \"confirm\",\n onClick: onClearFilter\n }, _toDisplayString(_ctx.$t('buttons.CLEAR_FILTER')), 1)\n ])\n ])\n ]))\n}\n}\n\n})","import script from \"./WorkoutsFilters.vue?vue&type=script&setup=true&lang=ts\"\nexport * from \"./WorkoutsFilters.vue?vue&type=script&setup=true&lang=ts\"\n\nimport \"./WorkoutsFilters.vue?vue&type=style&index=0&id=6c38593a&lang=scss&scoped=true\"\n\nimport exportComponent from \"/mnt/data-lnx/Devs/00_Perso/FitTrackee/fittrackee_client/node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-6c38593a\"]])\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { unref as _unref, toDisplayString as _toDisplayString, createElementVNode as _createElementVNode, openBlock as _openBlock, createElementBlock as _createElementBlock, createCommentVNode as _createCommentVNode, createVNode as _createVNode, normalizeClass as _normalizeClass, renderList as _renderList, Fragment as _Fragment, resolveComponent as _resolveComponent, createBlock as _createBlock, withCtx as _withCtx, createTextVNode as _createTextVNode, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from \"vue\"\n\nconst _withScopeId = n => (_pushScopeId(\"data-v-0f8ea7b0\"),n=n(),_popScopeId(),n)\nconst _hoisted_1 = { class: \"workouts-list\" }\nconst _hoisted_2 = { class: \"total\" }\nconst _hoisted_3 = { class: \"total-label\" }\nconst _hoisted_4 = { key: 0 }\nconst _hoisted_5 = {\n key: 0,\n class: \"workouts-table responsive-table\"\n}\nconst _hoisted_6 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"th\", { class: \"sport-col\" }, null, -1))\nconst _hoisted_7 = { class: \"sport-col\" }\nconst _hoisted_8 = { class: \"cell-heading\" }\nconst _hoisted_9 = [\"onMouseover\"]\nconst _hoisted_10 = { class: \"cell-heading\" }\nconst _hoisted_11 = {\n key: 0,\n class: \"fa fa-map-o\",\n \"aria-hidden\": \"true\"\n}\nconst _hoisted_12 = { class: \"title\" }\nconst _hoisted_13 = { class: \"workout-date\" }\nconst _hoisted_14 = { class: \"cell-heading\" }\nconst _hoisted_15 = { class: \"text-right\" }\nconst _hoisted_16 = { class: \"cell-heading\" }\nconst _hoisted_17 = { class: \"text-right\" }\nconst _hoisted_18 = { class: \"cell-heading\" }\nconst _hoisted_19 = { class: \"text-right\" }\nconst _hoisted_20 = { class: \"cell-heading\" }\nconst _hoisted_21 = { class: \"text-right\" }\nconst _hoisted_22 = { class: \"cell-heading\" }\nconst _hoisted_23 = { class: \"text-right\" }\nconst _hoisted_24 = { class: \"cell-heading\" }\nconst _hoisted_25 = { class: \"text-right\" }\nconst _hoisted_26 = { class: \"cell-heading\" }\nconst _hoisted_27 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"div\", { id: \"bottom\" }, null, -1))\n\nimport {\n ComputedRef,\n Ref,\n computed,\n ref,\n toRefs,\n watch,\n capitalize,\n onBeforeMount,\n } from 'vue'\n import { LocationQuery, useRoute, useRouter } from 'vue-router'\n\n import FilterSelects from '@/components/Common/FilterSelects.vue'\n import Pagination from '@/components/Common/Pagination.vue'\n import StaticMap from '@/components/Common/StaticMap.vue'\n import NoWorkouts from '@/components/Workouts/NoWorkouts.vue'\n import { ROOT_STORE, WORKOUTS_STORE } from '@/store/constants'\n import { IPagination } from '@/types/api'\n import { ITranslatedSport } from '@/types/sports'\n import { IAuthUserProfile } from '@/types/user'\n import { IWorkout, TWorkoutsPayload } from '@/types/workouts'\n import { useStore } from '@/use/useStore'\n import { getQuery, sortList, workoutsPayloadKeys } from '@/utils/api'\n import { formatDate } from '@/utils/dates'\n import { getSportColor, getSportLabel } from '@/utils/sports'\n import { convertDistance } from '@/utils/units'\n import { defaultOrder } from '@/utils/workouts'\n\n interface Props {\n user: IAuthUserProfile\n sports: ITranslatedSport[]\n }\n \nexport default /*#__PURE__*/_defineComponent({\n __name: 'WorkoutsList',\n props: {\n user: null,\n sports: null\n },\n setup(__props: any) {\n\nconst props = __props as {\n user: IAuthUserProfile\n sports: ITranslatedSport[]\n };\n\n \n\n const store = useStore()\n const route = useRoute()\n const router = useRouter()\n\n const { user, sports } = toRefs(props)\n const orderByList: string[] = [\n 'ave_speed',\n 'distance',\n 'duration',\n 'workout_date',\n ]\n const workouts: ComputedRef = computed(\n () => store.getters[WORKOUTS_STORE.GETTERS.USER_WORKOUTS]\n )\n const pagination: ComputedRef = computed(\n () => store.getters[WORKOUTS_STORE.GETTERS.WORKOUTS_PAGINATION]\n )\n const currentLanguage: ComputedRef = computed(\n () => store.getters[ROOT_STORE.GETTERS.LANGUAGE]\n )\n let query: TWorkoutsPayload = getWorkoutsQuery(route.query)\n const hoverWorkoutId: Ref = ref(null)\n\n onBeforeMount(() => {\n loadWorkouts(query)\n })\n\n function loadWorkouts(payload: TWorkoutsPayload) {\n store.dispatch(\n WORKOUTS_STORE.ACTIONS.GET_USER_WORKOUTS,\n user.value.imperial_units ? getConvertedPayload(payload) : payload\n )\n }\n function reloadWorkouts(queryParam: string, queryValue: string) {\n const newQuery: LocationQuery = Object.assign({}, route.query)\n newQuery[queryParam] = queryValue\n if (queryParam === 'per_page') {\n newQuery['page'] = '1'\n }\n query = getWorkoutsQuery(newQuery)\n router.push({ path: '/workouts', query })\n }\n\n function getWorkoutsQuery(newQuery: LocationQuery): TWorkoutsPayload {\n const workoutQuery = getQuery(\n newQuery,\n orderByList,\n defaultOrder.order_by,\n {\n defaultSort: defaultOrder.order,\n }\n )\n Object.keys(newQuery)\n .filter((k) => workoutsPayloadKeys.includes(k))\n .map((k) => {\n if (typeof newQuery[k] === 'string') {\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n workoutQuery[k] = newQuery[k]\n }\n })\n return workoutQuery\n }\n\n function getConvertedPayload(payload: TWorkoutsPayload): TWorkoutsPayload {\n const convertedPayload: TWorkoutsPayload = {\n ...payload,\n }\n Object.entries(convertedPayload).map((entry) => {\n if (entry[0].match('speed|distance') && entry[1]) {\n convertedPayload[entry[0]] = convertDistance(+entry[1], 'mi', 'km')\n }\n })\n return convertedPayload\n }\n\n function onHover(workoutId: string | null) {\n hoverWorkoutId.value = workoutId\n }\n\n watch(\n () => route.query,\n async (newQuery) => {\n query = getWorkoutsQuery(newQuery)\n loadWorkouts(query)\n }\n )\n\nreturn (_ctx: any,_cache: any) => {\n const _component_SportImage = _resolveComponent(\"SportImage\")!\n const _component_router_link = _resolveComponent(\"router-link\")!\n const _component_Distance = _resolveComponent(\"Distance\")!\n\n return (_openBlock(), _createElementBlock(\"div\", _hoisted_1, [\n _createElementVNode(\"div\", {\n class: _normalizeClass([\"box\", { 'empty-table': _unref(workouts).length === 0 }])\n }, [\n _createElementVNode(\"div\", _hoisted_2, [\n _createElementVNode(\"span\", _hoisted_3, _toDisplayString(_ctx.$t('common.TOTAL').toLowerCase()) + \": \", 1),\n (_unref(pagination).total !== null)\n ? (_openBlock(), _createElementBlock(\"span\", _hoisted_4, _toDisplayString(_unref(pagination).total) + \" \" + _toDisplayString(_ctx.$t('workouts.WORKOUT', _unref(pagination).total)), 1))\n : _createCommentVNode(\"\", true)\n ]),\n _createVNode(FilterSelects, {\n sort: _unref(sortList),\n order_by: orderByList,\n query: _unref(query),\n message: \"workouts\",\n onUpdateSelect: reloadWorkouts\n }, null, 8, [\"sort\", \"query\"]),\n (_unref(workouts).length > 0)\n ? (_openBlock(), _createElementBlock(\"div\", _hoisted_5, [\n _createVNode(Pagination, {\n class: \"top-pagination\",\n pagination: _unref(pagination),\n path: \"/workouts\",\n query: _unref(query)\n }, null, 8, [\"pagination\", \"query\"]),\n _createElementVNode(\"table\", null, [\n _createElementVNode(\"thead\", {\n class: _normalizeClass({ smaller: 'de' === _unref(currentLanguage) })\n }, [\n _createElementVNode(\"tr\", null, [\n _hoisted_6,\n _createElementVNode(\"th\", null, _toDisplayString(capitalize(_ctx.$t('workouts.WORKOUT', 1))), 1),\n _createElementVNode(\"th\", null, _toDisplayString(capitalize(_ctx.$t('workouts.DATE'))), 1),\n _createElementVNode(\"th\", null, _toDisplayString(capitalize(_ctx.$t('workouts.DISTANCE'))), 1),\n _createElementVNode(\"th\", null, _toDisplayString(capitalize(_ctx.$t('workouts.DURATION'))), 1),\n _createElementVNode(\"th\", null, _toDisplayString(capitalize(_ctx.$t('workouts.AVE_SPEED'))), 1),\n _createElementVNode(\"th\", null, _toDisplayString(capitalize(_ctx.$t('workouts.MAX_SPEED'))), 1),\n _createElementVNode(\"th\", null, _toDisplayString(capitalize(_ctx.$t('workouts.ASCENT'))), 1),\n _createElementVNode(\"th\", null, _toDisplayString(capitalize(_ctx.$t('workouts.DESCENT'))), 1)\n ])\n ], 2),\n _createElementVNode(\"tbody\", null, [\n (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(_unref(workouts), (workout) => {\n return (_openBlock(), _createElementBlock(\"tr\", {\n key: workout.id\n }, [\n _createElementVNode(\"td\", _hoisted_7, [\n _createElementVNode(\"span\", _hoisted_8, _toDisplayString(_ctx.$t('workouts.SPORT', 1)), 1),\n (_unref(sports).length > 0)\n ? (_openBlock(), _createBlock(_component_SportImage, {\n key: 0,\n title: \n _unref(sports).find((s) => s.id === workout.sport_id)\n .translatedLabel\n ,\n \"sport-label\": _unref(getSportLabel)(workout, _unref(sports)),\n color: _unref(getSportColor)(workout, _unref(sports))\n }, null, 8, [\"title\", \"sport-label\", \"color\"]))\n : _createCommentVNode(\"\", true)\n ]),\n _createElementVNode(\"td\", {\n class: \"workout-title\",\n onMouseover: ($event: any) => (onHover(workout.id)),\n onMouseleave: _cache[0] || (_cache[0] = ($event: any) => (onHover(null)))\n }, [\n _createElementVNode(\"span\", _hoisted_10, _toDisplayString(capitalize(_ctx.$t('workouts.WORKOUT', 1))), 1),\n _createVNode(_component_router_link, {\n class: \"nav-item\",\n to: { name: 'Workout', params: { workoutId: workout.id } }\n }, {\n default: _withCtx(() => [\n (workout.with_gpx)\n ? (_openBlock(), _createElementBlock(\"i\", _hoisted_11))\n : _createCommentVNode(\"\", true),\n _createElementVNode(\"span\", _hoisted_12, _toDisplayString(workout.title), 1)\n ]),\n _: 2\n }, 1032, [\"to\"]),\n (workout.with_gpx && hoverWorkoutId.value === workout.id)\n ? (_openBlock(), _createBlock(StaticMap, {\n key: 0,\n workout: workout,\n \"display-hover\": true\n }, null, 8, [\"workout\"]))\n : _createCommentVNode(\"\", true)\n ], 40, _hoisted_9),\n _createElementVNode(\"td\", _hoisted_13, [\n _createElementVNode(\"span\", _hoisted_14, _toDisplayString(_ctx.$t('workouts.DATE')), 1),\n _createTextVNode(\" \" + _toDisplayString(_unref(formatDate)(\n workout.workout_date,\n _unref(user).timezone,\n _unref(user).date_format\n )), 1)\n ]),\n _createElementVNode(\"td\", _hoisted_15, [\n _createElementVNode(\"span\", _hoisted_16, _toDisplayString(_ctx.$t('workouts.DISTANCE')), 1),\n _createVNode(_component_Distance, {\n distance: workout.distance,\n unitFrom: \"km\",\n useImperialUnits: _unref(user).imperial_units\n }, null, 8, [\"distance\", \"useImperialUnits\"])\n ]),\n _createElementVNode(\"td\", _hoisted_17, [\n _createElementVNode(\"span\", _hoisted_18, _toDisplayString(_ctx.$t('workouts.DURATION')), 1),\n _createTextVNode(\" \" + _toDisplayString(workout.moving), 1)\n ]),\n _createElementVNode(\"td\", _hoisted_19, [\n _createElementVNode(\"span\", _hoisted_20, _toDisplayString(_ctx.$t('workouts.AVE_SPEED')), 1),\n _createVNode(_component_Distance, {\n distance: workout.ave_speed,\n unitFrom: \"km\",\n speed: true,\n useImperialUnits: _unref(user).imperial_units\n }, null, 8, [\"distance\", \"useImperialUnits\"])\n ]),\n _createElementVNode(\"td\", _hoisted_21, [\n _createElementVNode(\"span\", _hoisted_22, _toDisplayString(_ctx.$t('workouts.MAX_SPEED')), 1),\n _createVNode(_component_Distance, {\n distance: workout.max_speed,\n unitFrom: \"km\",\n speed: true,\n useImperialUnits: _unref(user).imperial_units\n }, null, 8, [\"distance\", \"useImperialUnits\"])\n ]),\n _createElementVNode(\"td\", _hoisted_23, [\n _createElementVNode(\"span\", _hoisted_24, _toDisplayString(_ctx.$t('workouts.ASCENT')), 1),\n (workout.with_gpx)\n ? (_openBlock(), _createBlock(_component_Distance, {\n key: 0,\n distance: workout.ascent,\n unitFrom: \"m\",\n useImperialUnits: _unref(user).imperial_units\n }, null, 8, [\"distance\", \"useImperialUnits\"]))\n : _createCommentVNode(\"\", true)\n ]),\n _createElementVNode(\"td\", _hoisted_25, [\n _createElementVNode(\"span\", _hoisted_26, _toDisplayString(_ctx.$t('workouts.DESCENT')), 1),\n (workout.with_gpx)\n ? (_openBlock(), _createBlock(_component_Distance, {\n key: 0,\n distance: workout.descent,\n unitFrom: \"m\",\n useImperialUnits: _unref(user).imperial_units\n }, null, 8, [\"distance\", \"useImperialUnits\"]))\n : _createCommentVNode(\"\", true)\n ])\n ]))\n }), 128))\n ])\n ]),\n _createVNode(Pagination, {\n pagination: _unref(pagination),\n path: \"/workouts\",\n query: _unref(query)\n }, null, 8, [\"pagination\", \"query\"])\n ]))\n : _createCommentVNode(\"\", true)\n ], 2),\n (_unref(workouts).length === 0)\n ? (_openBlock(), _createBlock(NoWorkouts, { key: 0 }))\n : _createCommentVNode(\"\", true),\n _hoisted_27\n ]))\n}\n}\n\n})","import script from \"./WorkoutsList.vue?vue&type=script&setup=true&lang=ts\"\nexport * from \"./WorkoutsList.vue?vue&type=script&setup=true&lang=ts\"\n\nimport \"./WorkoutsList.vue?vue&type=style&index=0&id=0f8ea7b0&lang=scss&scoped=true\"\n\nimport exportComponent from \"/mnt/data-lnx/Devs/00_Perso/FitTrackee/fittrackee_client/node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-0f8ea7b0\"]])\n\nexport default __exports__","import { defineComponent as _defineComponent } from 'vue'\nimport { unref as _unref, createVNode as _createVNode, normalizeClass as _normalizeClass, createElementVNode as _createElementVNode, toDisplayString as _toDisplayString, openBlock as _openBlock, createElementBlock as _createElementBlock, createCommentVNode as _createCommentVNode, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from \"vue\"\n\nconst _withScopeId = n => (_pushScopeId(\"data-v-57ec0168\"),n=n(),_popScopeId(),n)\nconst _hoisted_1 = {\n key: 0,\n id: \"workouts\",\n class: \"view\"\n}\nconst _hoisted_2 = { class: \"container workouts-container\" }\nconst _hoisted_3 = { class: \"display-filters\" }\nconst _hoisted_4 = { class: \"list-container\" }\n\nimport { ComputedRef, computed, ref } from 'vue'\n import { useI18n } from 'vue-i18n'\n\n import WorkoutsFilters from '@/components/Workouts/WorkoutsFilters.vue'\n import WorkoutsList from '@/components/Workouts/WorkoutsList.vue'\n import { AUTH_USER_STORE, SPORTS_STORE } from '@/store/constants'\n import { ISport, ITranslatedSport } from '@/types/sports'\n import { IAuthUserProfile } from '@/types/user'\n import { useStore } from '@/use/useStore'\n import { translateSports } from '@/utils/sports'\n\n \nexport default /*#__PURE__*/_defineComponent({\n __name: 'WorkoutsView',\n setup(__props) {\n\n const { t } = useI18n()\n const store = useStore()\n\n const authUser: ComputedRef = computed(\n () => store.getters[AUTH_USER_STORE.GETTERS.AUTH_USER_PROFILE]\n )\n const sports: ComputedRef = computed(\n () => store.getters[SPORTS_STORE.GETTERS.SPORTS]\n )\n const translatedSports: ComputedRef = computed(() =>\n translateSports(sports.value, t)\n )\n const hiddenFilters = ref(true)\n\n function toggleFilters() {\n hiddenFilters.value = !hiddenFilters.value\n }\n\nreturn (_ctx: any,_cache: any) => {\n return (_unref(authUser).username)\n ? (_openBlock(), _createElementBlock(\"div\", _hoisted_1, [\n _createElementVNode(\"div\", _hoisted_2, [\n _createElementVNode(\"div\", {\n class: _normalizeClass([\"filters-container\", { hidden: hiddenFilters.value }])\n }, [\n _createVNode(WorkoutsFilters, {\n sports: _unref(translatedSports),\n authUser: _unref(authUser),\n onFilter: toggleFilters\n }, null, 8, [\"sports\", \"authUser\"])\n ], 2),\n _createElementVNode(\"div\", _hoisted_3, [\n _createElementVNode(\"div\", { onClick: toggleFilters }, [\n _createElementVNode(\"i\", {\n class: _normalizeClass(`fa fa-caret-${hiddenFilters.value ? 'down' : 'up'}`),\n \"aria-hidden\": \"true\"\n }, null, 2),\n _createElementVNode(\"span\", null, _toDisplayString(_ctx.$t(`workouts.${hiddenFilters.value ? 'DISPLAY' : 'HIDE'}_FILTERS`)), 1)\n ])\n ]),\n _createElementVNode(\"div\", _hoisted_4, [\n _createVNode(WorkoutsList, {\n user: _unref(authUser),\n sports: _unref(translatedSports)\n }, null, 8, [\"user\", \"sports\"])\n ])\n ])\n ]))\n : _createCommentVNode(\"\", true)\n}\n}\n\n})","import script from \"./WorkoutsView.vue?vue&type=script&setup=true&lang=ts\"\nexport * from \"./WorkoutsView.vue?vue&type=script&setup=true&lang=ts\"\n\nimport \"./WorkoutsView.vue?vue&type=style&index=0&id=57ec0168&lang=scss&scoped=true\"\n\nimport exportComponent from \"/mnt/data-lnx/Devs/00_Perso/FitTrackee/fittrackee_client/node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-57ec0168\"]])\n\nexport default __exports__"],"names":["_hoisted_1","id","_hoisted_2","_hoisted_3","class","_hoisted_4","key","_hoisted_5","_hoisted_6","for","_hoisted_7","_hoisted_8","_hoisted_9","_hoisted_10","_hoisted_11","_hoisted_12","_hoisted_13","_hoisted_14","_hoisted_15","_hoisted_16","_hoisted_17","_hoisted_18","_hoisted_19","_hoisted_20","_hoisted_21","_hoisted_22","_hoisted_23","_hoisted_24","_hoisted_25","_hoisted_26","_hoisted_27","_hoisted_28","_hoisted_29","_hoisted_30","_hoisted_31","_hoisted_32","_hoisted_33","_hoisted_34","_hoisted_35","_defineComponent","__name","props","authUser","sports","isCreation","type","Boolean","default","loading","workout","setup","__props","t","useI18n","store","useStore","router","useRouter","toRefs","translatedSports","computed","translateSports","value","sport_id","appConfig","getters","ROOT_STORE","fileSizeLimit","max_single_file_size","getReadableFileSize","gpx_limit_import","zipSizeLimit","max_zip_file_size","errorMessages","workoutForm","reactive","title","notes","workoutDate","workoutTime","workoutDurationHour","workoutDurationMinutes","workoutDurationSeconds","workoutDistance","withGpx","ref","with_gpx","gpxFile","formErrors","payloadErrorMessages","updateNotes","updateWithGpx","updateFile","event","target","files","formatWorkoutForm","workoutDateTime","formatWorkoutDate","getDateWithTZ","workout_date","timezone","duration","split","imperial_units","convertDistance","distance","parseFloat","toFixed","workout_time","isDistanceInvalid","includes","isDurationInvalid","formatPayload","payload","push","updateWorkout","dispatch","WORKOUTS_STORE","workoutId","data","errorMessage","commit","file","length","onCancel","name","params","go","invalidateForm","onMounted","onUnmounted","watch","async","newWorkout","previousWorkout","_ctx","_cache","_component_CustomTextArea","_resolveComponent","_component_ErrorMessage","_component_Loader","_component_Card","_openBlock","_createElementBlock","_normalizeClass","_unref","_createVNode","_withCtx","_createTextVNode","_toDisplayString","$t","content","_createElementVNode","errors","onSubmit","_withModifiers","checked","disabled","onClick","_createCommentVNode","_withDirectives","required","onInvalid","$event","_Fragment","_renderList","sport","translatedLabel","_vModelSelect","accept","onInput","_vModelText","errored","placeholder","minlength","maxlength","pattern","min","step","input","onUpdateValue","_createBlock","message","_","__exports__","SPORTS_STORE","AUTH_USER_STORE","workoutData","WorkoutEdition","route","useRoute","onBeforeMount","newWorkoutId","_withScopeId","n","_pushScopeId","_popScopeId","workoutObject","emits","emit","downloadGpx","authApi","responseType","then","response","gpxFileUrl","window","URL","createObjectURL","Blob","gpxLink","document","createElement","href","setAttribute","body","appendChild","click","_component_SportImage","_component_router_link","inactive","previousUrl","$router","label","color","segmentId","to","nextUrl","recordType","records","find","record","record_type","directions","convertDegreeToDirection","angle","Math","floor","weather","useImperialUnits","getWindDirectionTitle","windBearing","_component_Distance","wind","unitFrom","digits","displayUnit","style","_normalizeStyle","transform","weatherStart","weatherEnd","src","icon","alt","Number","temperature","humidity","WeatherWind","displayHARecord","withPause","pauses","moving","WorkoutRecord","strong","aveSpeed","speed","maxSpeed","maxAlt","minAlt","ascent","descent","WorkoutWeather","$","element","tagName","Array","from","getElementsByTagName","nodeVal","node","normalize","textContent","get1","callback","result","get","properties","val1","val","$num","isNaN","num1","getMulti","propertyNames","property","isElement","nodeType","getLineStyle","lineStyle","Object","assign","stroke","opacity","width","getExtensions","values","child","childNodes","abbreviateName","nodeName","concat","parseNumeric","num","coordPair$1","ll","getAttribute","time","coordinates","extendedValues","extractProperties","extensions","getElementsByTagNameNS","parentNode","replace","links","map","link","getPoints$1","pointname","pts","line","times","i","c","plural","fill","getRoute","_gpxType","geometry","getTrack","segments","track","extractedLines","segment","multi","coordinateProperties","entries","getPoint","pair","gpxGen","feature","waypoint","point","gpx","features","PI","debounce","fn","timeout","args","context","this","clearTimeout","setTimeout","apply","capitalizeFirstLetter","string","charAt","toUpperCase","slice","propsBinder","methods","leafletElement","setMethodName","newVal","oldVal","remapEvents","contextAttrs","attrName","startsWith","eventName","toLocaleLowerCase","resetWebpackIcon","Icon","modules","Promise","all","Default","prototype","_getIconUrl","mergeOptions","iconRetinaUrl","iconUrl","shadowUrl","provideLeafletWrapper","methodName","wrapped","console","warn","wrapper","updateLeafletWrapper","leafletMethod","WINDOW_OR_GLOBAL","self","g","global","undefined","GLOBAL_LEAFLET_OPT","options","props$1","pane","String","attribution","custom","layerType","visible","setup$1","leafletRef","addLayer","removeLayer","componentOptions","componentMethods","addThisLayer","leafletObject","removeThisLayer","setAttribution","old","attributionControl","$parent","removeAttribution","addAttribution","setName","setLayerType","setVisible","isVisible","bindPopup","bindTooltip","unbindTooltip","tooltip","getTooltip","unbindPopup","popup","getPopup","updateVisibleProp","render","ready","slots","h","display","props$2","interactive","bubblingMouseEvents","props$3","weight","lineCap","lineJoin","dashArray","dashOffset","fillColor","fillOpacity","fillRule","className","props$4","latLng","radius","props$6","position","setup$6","setPosition","remove","render$1","script$2","disableClickPropagation","disableScrollPropagation","root","useGlobalLeaflet","registerControl","Control","DomEvent","L","LControl","extend","onAdd","$slots","props$8","collapsed","autoZIndex","hideSingleBase","sortLayers","sortFunction","Function","setup$8","controlOptions","layer","addBaseLayer","addOverlay","script$4","registerLayerControl","control","layers","props$b","setup$b","layerOptions","layerMethods","props$d","geojson","setup$d","layerGroupMethods","setGeojson","clearLayers","addData","getGeoJSONData","toGeoJSON","getBounds","script$8","geoJSON","listeners","attrs","on","props$e","zIndex","tileSize","noWrap","minZoom","maxZoom","setup$e","props$f","iconSize","iconAnchor","popupAnchor","tooltipAnchor","shadowRetinaUrl","shadowSize","shadowAnchor","bgPos","script$a","canSetParentHtml","setParentHtml","setIcon","onDomEvent","offDomEvent","divIcon","iconObject","createIcon","el","recreationNeeded","htmlSwapNeeded","elHtml","innerHTML","html","scheduleCreateIcon","scheduleHtmlSwap","setIconUrl","setIconRetinaUrl","setIconSize","setIconAnchor","setPopupAnchor","setTooltipAnchor","setShadowUrl","setShadowRetinaUrl","setShadowAnchor","setBgPos","setClassName","setHtml","lDivIcon","lIcon","off","observer","MutationObserver","observe","attributes","childList","characterData","subtree","script$c","layerGroup","script$d","center","bounds","maxBounds","zoom","paddingBottomRight","paddingTopLeft","padding","worldCopyJump","crs","maxBoundsViscosity","inertia","inertiaDeceleration","inertiaMaxSpeed","easeLinearity","zoomAnimation","zoomAnimationThreshold","fadeAnimation","markerZoomAnimation","noBlockingAnimations","blueprint","layersToAdd","layersInControl","eventHandlers","moveEndHandler","getZoom","getCenter","overlayAddHandler","e","l","overlayRemoveHandler","CRS","latLngBounds","beforeMapMount","error","optionsCrs","EPSG3857","layerControl","exist","_leaflet_id","filter","lControlLayer","forEach","lControl","addControl","setZoom","animate","setPaddingBottomRight","setPaddingTopLeft","setPadding","setCrs","prevBounds","fitBounds","setBounds","newBounds","isValid","oldBounds","lastSetBounds","boundsChanged","equals","fitBoundsOptions","setCenter","newCenter","oldCenter","lastSetCenter","lat","lng","panTo","height","props$h","draggable","zIndexOffset","setup$g","setDraggable","dragging","enable","disable","latLngSync","latlng","setLatLng","oldLatLng","getLatLng","script$e","getElement","newIcon","marker","props$i","latLngs","smoothFactor","noClip","props$j","props$k","props$n","tms","subdomains","detectRetina","url","setup$m","gridLayerOptions","gridLayerMethods","script$j","tileLayer","markerCoordinates","isStart","latitude","LMarker","longitude","LIcon","workoutMap","geoJson","getGeoJson","startMarkerCoordinates","chartData","endMarkerCoordinates","isFullscreen","gpxContent","jsonData","DOMParser","parseFromString","resetZoom","toggleFullscreen","_component_VFullscreen","modelValue","LMap","ref_key","onReady","LControlLayers","LTileLayer","getApiUrl","map_attribution","LGeoJson","LLayerGroup","CustomMarker","displaySegment","displayModal","getWorkoutObject","getWorkoutObjectUrl","previous_workout","next_workout","urls","date_format","ave_speed","max_alt","max_speed","min_alt","segment_id","weather_end","weather_start","updateDisplayModal","deleteWorkout","newSegmentId","_component_Modal","onConfirmAction","onCancelAction","WorkoutCardTitle","onDisplayModal","WorkoutMap","WorkoutData","display_ascent","getOrCreateLegendList","legendContainer","getElementById","listContainer","querySelector","Error","htmlLegendPlugin","afterUpdate","chart","ul","containerID","firstChild","legendItems","plugins","legend","labels","generateLabels","item","li","onclick","datasetIndex","setDatasetVisibility","isDatasetVisible","update","checkBox","text","hidden","createTextNode","boxSpan","background","fillStyle","borderColor","strokeStyle","displayDistance","beginElevationAtZero","datasets","getDatasets","fromKmUnit","getUnitTo","fromMUnit","distance_labels","duration_labels","JSON","parse","stringify","elevation","responsive","maintainAspectRatio","animation","layout","top","scales","grid","drawOnChartArea","ticks","count","formatDuration","ySpeed","yElevation","beginAtZero","elements","pointStyle","pointRadius","datalabels","interaction","intersect","mode","callbacks","dataset","formattedValue","yAxisID","tooltipItems","emitCoordinates","dataIndex","htmlLegend","lineChartProps","useLineChart","updateDisplayDistance","Date","toISOString","substr","emitEmptyCoordinates","units","defaultTarget","LineChart","_mergeProps","onMouseleave","index","workout_id","updateCoordinates","WorkoutDetail","WorkoutChart","onGetCoordinates","WorkoutSegments","WorkoutNotes","NotFound","toUnit","query","handleFilterChange","onFilter","path","onClearFilter","newQuery","$route","onChange","s","sports_list","distance_from","distance_to","duration_from","duration_to","ave_speed_from","ave_speed_to","max_speed_from","max_speed_to","user","orderByList","workouts","pagination","currentLanguage","getWorkoutsQuery","hoverWorkoutId","loadWorkouts","getConvertedPayload","reloadWorkouts","queryParam","queryValue","workoutQuery","getQuery","defaultOrder","defaultSort","keys","k","workoutsPayloadKeys","convertedPayload","entry","match","onHover","toLowerCase","total","FilterSelects","sort","sortList","order_by","onUpdateSelect","Pagination","smaller","capitalize","getSportLabel","getSportColor","onMouseover","StaticMap","formatDate","NoWorkouts","hiddenFilters","toggleFilters","username","WorkoutsFilters","WorkoutsList"],"sourceRoot":""}