{"version":3,"file":"index.5bab09fe.js","sources":["../../vite/dynamic-import-polyfill","../../src/routing/Router.ts","../../src/vmd-app.component.ts","../../src/components/vmd-tranche-age-selector.component.ts","../../src/components/vmd-departement-selector.component.ts","../../src/utils/Strings.ts","../../src/state/State.ts","../../src/utils/Dates.ts","../../src/components/vmd-appointment-card.component.ts","../../src/components/vmd-appointment-metadata.component.ts","../../src/views/vmd-home.view.ts","../../src/distance.ts","../../src/views/vmd-rdv.view.ts","../../src/delay.ts","../../src/views/vmd-lieux.view.ts","../../src/views/vmd-apropos.view.ts"],"sourcesContent":["const p = function polyfill(modulePath = '.', importFunctionName = '__import__') {\n try {\n self[importFunctionName] = new Function('u', `return import(u)`);\n }\n catch (error) {\n const baseURL = new URL(modulePath, location);\n const cleanup = (script) => {\n URL.revokeObjectURL(script.src);\n script.remove();\n };\n self[importFunctionName] = (url) => new Promise((resolve, reject) => {\n const absURL = new URL(url, baseURL);\n // If the module has already been imported, resolve immediately.\n if (self[importFunctionName].moduleMap[absURL]) {\n return resolve(self[importFunctionName].moduleMap[absURL]);\n }\n const moduleBlob = new Blob([\n `import * as m from '${absURL}';`,\n `${importFunctionName}.moduleMap['${absURL}']=m;`\n ], { type: 'text/javascript' });\n const script = Object.assign(document.createElement('script'), {\n type: 'module',\n src: URL.createObjectURL(moduleBlob),\n onerror() {\n reject(new Error(`Failed to import: ${url}`));\n cleanup(script);\n },\n onload() {\n resolve(self[importFunctionName].moduleMap[absURL]);\n cleanup(script);\n }\n });\n document.head.appendChild(script);\n });\n self[importFunctionName].moduleMap = {};\n }\n};__VITE_IS_MODERN__&&p(\"/test-autodeploy1/assets/\");","import page from \"page\";\nimport { TemplateResult } from \"lit-html\";\nimport {html} from \"lit-element\";\n\nexport type SlottedTemplateResultFactory = (subViewSlot: TemplateResult) => TemplateResult;\n\nexport type ViewChangedCallback = (templateResultCreator: SlottedTemplateResultFactory, path: string) => void;\nexport type ViewChangedCallbackCleaner = Function;\n\n\nclass Routing {\n public static readonly INSTANCE = new Routing();\n\n private _viewChangeCallbacks: ViewChangedCallback[] = [];\n\n private currentTemplateResultCreator: SlottedTemplateResultFactory|undefined = undefined;\n private currentPath: string|undefined = undefined;\n\n public get basePath() {\n return import.meta.env.BASE_URL;\n }\n\n installRoutes(callback?: ViewChangedCallback): ViewChangedCallbackCleaner|undefined {\n const callbackCleaner = callback?this.onViewChanged(callback):undefined;\n\n page.redirect(`${this.basePath}home`, `/`);\n page.redirect(`${this.basePath}index.html`, `/`);\n\n this.declareRoute(`/`, () => (subViewSlot) =>\n html`${subViewSlot}`);\n this.declareRoute(`/centres-vaccination-covid-dpt:codeDpt-:nomDpt/age-:trancheAge/`, (params) => (subViewSlot) =>\n html`${subViewSlot}`);\n this.declareRoute(`/centres-vaccination-covid-dpt:codeDpt-:nomDpt/ville-:codeVille-:nomVille/age-:trancheAge/`, (params) => (subViewSlot) =>\n html`${subViewSlot}`);\n this.declareRoute(`/centres`, (params) => (subViewSlot) =>\n html`${subViewSlot}`);\n this.declareRoute(`/apropos`, (params) => (subViewSlot) =>\n html`${subViewSlot}`);\n\n page(`*`, (context) => this._notFoundRoute(context));\n page();\n\n return callbackCleaner;\n }\n\n private declareRoute(path: string, viewComponentCreator: (pathParams: Record) => Promise|SlottedTemplateResultFactory) {\n page(`${this.basePath}${path.substring(path[0]==='/'?1:0)}`, (context) => {\n const slottedViewComponentFactoryResult = viewComponentCreator(context.params);\n ((slottedViewComponentFactoryResult instanceof Promise)?slottedViewComponentFactoryResult:Promise.resolve(slottedViewComponentFactoryResult)).then(slottedViewTemplateFactory => {\n this.currentPath = path;\n this.currentTemplateResultCreator = slottedViewTemplateFactory;\n\n this._viewChangeCallbacks.forEach(callback => callback(slottedViewTemplateFactory, path));\n })\n });\n }\n\n onViewChanged(callback: ViewChangedCallback): ViewChangedCallbackCleaner {\n this._viewChangeCallbacks.push(callback);\n return () => {\n const idx = this._viewChangeCallbacks.findIndex(registeredCallback => registeredCallback === callback);\n this._viewChangeCallbacks.splice(idx, 1);\n }\n }\n\n private _notFoundRoute(context: PageJS.Context) {\n console.error(`Route not found : ${context.path} ! Redirecting to home...`);\n this.navigateToHome();\n }\n\n public navigateToRendezVous(codeDepartement: string, pathLibelleDepartement: string, trancheAge: string) {\n page(`${this.basePath}centres-vaccination-covid-dpt${codeDepartement}-${pathLibelleDepartement}/age-${trancheAge}/`);\n }\n\n navigateToHome() {\n page(`${this.basePath}`);\n }\n\n navigateToUrlIfPossible(url: string) {\n if(url) {\n window.open(url, '_blank')\n }\n }\n}\n\nexport const Router = Routing.INSTANCE;\n","import {LitElement, html, customElement, property, css, unsafeCSS} from 'lit-element';\nimport {Router, SlottedTemplateResultFactory} from \"./routing/Router\";\nimport globalCss from './styles/global.scss'\nimport {TemplateResult} from \"lit-html\";\n\n@customElement('vmd-app')\nexport class VmdAppComponent extends LitElement {\n\n //language=css\n static styles = [\n css`${unsafeCSS(globalCss)}`,\n css`\n .appLogo {}\n .appLogo._phone {\n max-width: 25vw;\n }\n `\n ];\n\n @property({type: Object, attribute: false}) viewTemplateResult: SlottedTemplateResultFactory|undefined = undefined;\n\n constructor() {\n super();\n\n Router.installRoutes((viewTemplateResult, path) => {\n this.viewTemplateResult = viewTemplateResult;\n })\n }\n\n render() {\n return html`\n
\n
Router.navigateToHome()}\">\n \"Trouvez\n \"Trouvez\n
\n
\n
\n
\n À propos\n
\n \n
\n
\n
\n \n ${this.viewTemplateResult?this.viewTemplateResult(html`\n \n \n \n `):html``}\n \n \n `;\n }\n\n connectedCallback() {\n super.connectedCallback();\n // console.log(\"connected callback\")\n }\n\n disconnectedCallback() {\n super.disconnectedCallback();\n // console.log(\"disconnected callback\")\n }\n}\n","import {css, customElement, html, LitElement, property, unsafeCSS} from \"lit-element\";\nimport globalCss from \"../styles/global.scss\";\nimport {CodeTrancheAge, TrancheAge} from \"../state/State\";\n\nexport type TrancheAgeSelectionne = { trancheAge: TrancheAge|undefined };\n\n@customElement('vmd-tranche-age-selector')\nexport class VmdTrancheAgeSelectorComponent extends LitElement {\n\n //language=css\n static styles = [\n css`${unsafeCSS(globalCss)}`,\n css`\n :host {\n display: block;\n }\n `\n ];\n\n @property({type: String}) codeTrancheAgeSelectionne: CodeTrancheAge|\"\" = \"\";\n @property({type: Map, attribute: false}) tranchesAge: Map = new Map();\n\n constructor() {\n super();\n }\n\n render() {\n return html`\n \n `;\n }\n\n trancheAgeSelectionne(event: Event) {\n this.codeTrancheAgeSelectionne = (event.currentTarget as HTMLSelectElement).value as CodeTrancheAge|\"\";\n this.dispatchEvent(new CustomEvent('tranche-age-changed', {\n detail: {\n trancheAge: (this.codeTrancheAgeSelectionne === \"\")?undefined:this.tranchesAge.get(this.codeTrancheAgeSelectionne)\n }\n }));\n }\n\n connectedCallback() {\n super.connectedCallback();\n // console.log(\"connected callback\")\n }\n\n disconnectedCallback() {\n super.disconnectedCallback();\n // console.log(\"disconnected callback\")\n }\n}\n","import {LitElement, html, customElement, property, css, unsafeCSS} from 'lit-element'\nimport {repeat} from \"lit-html/directives/repeat\";\nimport globalCss from \"../styles/global.scss\";\nimport {CodeDepartement, Departement} from \"../state/State\";\n\nexport type DepartementSelected = { departement: Departement|undefined };\n\n@customElement('vmd-departement-selector')\nexport class VmdDepartementSelectorComponent extends LitElement {\n\n //language=css\n static styles = [\n css`${unsafeCSS(globalCss)}`,\n css`\n :host {\n display: block;\n }\n `\n ];\n\n @property({type: String}) codeDepartementSelectionne: CodeDepartement|undefined = undefined;\n @property({type: Array, attribute: false}) departementsDisponibles: Departement[] = [];\n\n render() {\n return html`\n \n `;\n }\n\n departementSelectionne(event: Event) {\n this.codeDepartementSelectionne = (event.currentTarget as HTMLSelectElement).value;\n this.dispatchEvent(new CustomEvent('departement-changed', {\n detail: {\n departement: this.departementsDisponibles.find(dept => dept.code_departement === this.codeDepartementSelectionne)\n }\n }));\n }\n\n connectedCallback() {\n super.connectedCallback();\n // console.log(\"connected callback\")\n }\n\n disconnectedCallback() {\n super.disconnectedCallback();\n // console.log(\"disconnected callback\")\n }\n}\n","\n\nexport class Strings {\n public static padLeft(value: number, size: number, filler: string) {\n const padSize = size - (\"\"+value).length;\n let pad = '';\n for(var i=0; i1)?pluralForm:'';\n }\n\n static toNormalizedPhoneNumber(phoneNumber: string) {\n let normaliedPhoneNumber = phoneNumber;\n if(normaliedPhoneNumber.indexOf(\"+33\") === 0) {\n normaliedPhoneNumber = `0${normaliedPhoneNumber.substring(\"+33\".length)}`\n }\n if(normaliedPhoneNumber[2] !== \" \") {\n normaliedPhoneNumber = [\n normaliedPhoneNumber[0], normaliedPhoneNumber[1], \" \",\n normaliedPhoneNumber[2], normaliedPhoneNumber[3], \" \",\n normaliedPhoneNumber[4], normaliedPhoneNumber[5], \" \",\n normaliedPhoneNumber[6], normaliedPhoneNumber[7], \" \",\n normaliedPhoneNumber[8], normaliedPhoneNumber[9]\n ].join(\"\");\n }\n\n return normaliedPhoneNumber;\n }\n\n public static toReadableURLPathValue(value: string) {\n return value.toLowerCase()\n .replace(\" \", \"_\")\n .replace(/[èéëêêéè]/gi, \"e\")\n .replace(/[áàâäãåâà]/gi, \"a\")\n .replace(/[çç]/gi, \"c\")\n .replace(/[íìîï]/gi, \"i\")\n .replace(/[ñ]/gi, \"n\")\n .replace(/[óòôöõô]/gi, \"o\")\n .replace(/[úùûüûù]/gi, \"u\")\n .replace(/[œ]/gi, \"oe\");\n }\n}\n","import {ISODateString, WeekDay} from \"../utils/Dates\";\nimport {Strings} from \"../utils/Strings\";\n\ntype Features = {\n trancheAgeFilter: boolean;\n};\nexport const FEATURES: Features = {\n trancheAgeFilter: false\n};\n\nexport type CodeTrancheAge = 'plus75ans';\nexport type TrancheAge = {\n codeTrancheAge: CodeTrancheAge;\n libelle: string;\n};\nexport const TRANCHES_AGE: Map = new Map([\n ['plus75ans', { codeTrancheAge: 'plus75ans', libelle: \"Plus de 75 ans\" }]\n]);\n\nconst USE_RAW_GITHUB = false\nconst VMD_BASE_URL = USE_RAW_GITHUB\n ? \"https://raw.githubusercontent.com/CovidTrackerFr/vitemadose/data-auto/data/output\"\n : \"https://vitemadose.gitlab.io/vitemadose\"\n\n\nexport type Plateforme = {\n // Should be the same than PLATEFORMES' key\n code: string;\n logo: string;\n nom: string;\n // Should we do promotion of this plateform ? for example on home screen ?\n // (typically, it may be not a good idea to promote the platform while JSON is not producing data for it yet)\n promoted: boolean;\n // Used for specific styling on logos, see for example _searchAppointment.scss\n styleCode: string;\n};\nexport const PLATEFORMES: Record = {\n 'Doctolib': { code: 'Doctolib', logo: 'logo_doctolib.png', nom: 'Doctolib', promoted: true, styleCode: '_doctolib'},\n 'Maiia': { code: 'Maiia', logo: 'logo_maiia.png', nom: 'Maiia', promoted: true, styleCode: '_maiia'},\n 'Ordoclic': { code: 'Ordoclic', logo: 'logo_ordoclic.png', nom: 'Ordoclic', promoted: true, styleCode: '_ordoclic'},\n 'Keldoc': { code: 'Keldoc', logo: 'logo_keldoc.png', nom: 'Keldoc', promoted: true, styleCode: '_keldoc'},\n 'Pandalab': { code: 'Pandalab', logo: 'logo_pandalab.png', nom: 'Pandalab', promoted: false, styleCode: '_pandalab'},\n 'Mapharma': { code: 'Mapharma', logo: 'logo_mapharma.png', nom: 'Mapharma', promoted: true, styleCode: '_mapharma'},\n // Beware: if you add a new plateform, don't forget to update 'hardcoded' (indexable) content\n // in index.html page, referencing the list of supported plateforms\n};\n\nexport type CodeDepartement = string;\nexport type Departement = {\n code_departement: CodeDepartement;\n nom_departement: string;\n code_region: number;\n nom_region: string;\n};\n// Permet de convertir un nom de departement en un chemin d'url correct (remplacement des caractères\n// non valides comme les accents ou les espaces)\nexport const libelleUrlPathDuDepartement = (departement: Departement) => {\n return Strings.toReadableURLPathValue(departement.nom_departement);\n}\n\nexport type TypeLieu = 'vaccination-center'|'drugstore'|'general-practitioner';\nexport const TYPES_LIEUX: {[k in TypeLieu]: string} = {\n \"vaccination-center\": 'Centre de vaccination',\n \"drugstore\": 'Pharmacie',\n \"general-practitioner\": 'Médecin généraliste',\n};\nexport type BusinessHours = Record;\nexport type Lieu = {\n appointment_count: number;\n departement: CodeDepartement;\n location: Coordinates,\n nom: string;\n url: string;\n plateforme: string;\n prochain_rdv: ISODateString|null;\n metadata: {\n address: string;\n phone_number: string|undefined;\n business_hours: BusinessHours|undefined\n },\n type: TypeLieu\n};\nfunction transformLieu(rawLieu: any): Lieu {\n return {\n ...rawLieu,\n appointment_count: rawLieu.appointment_count || 0,\n metadata: {\n ...rawLieu.metadata,\n address: (typeof rawLieu.metadata.address === 'string')?\n rawLieu.metadata.address\n :[\n rawLieu.metadata.address.adr_num,\n rawLieu.metadata.address.adr_voie,\n rawLieu.metadata.address.com_cp,\n rawLieu.metadata.address.com_nom\n ].filter(val => !!val).join(\" \"),\n phone_number: rawLieu.metadata.phone_number?Strings.toNormalizedPhoneNumber(rawLieu.metadata.phone_number):undefined\n }\n };\n}\nexport type Coordinates = { latitude: number, longitude: number }\n\nexport type LieuxParDepartement = {\n lieuxDisponibles: Lieu[];\n lieuxIndisponibles: Lieu[];\n codeDepartement: CodeDepartement;\n derniereMiseAJour: ISODateString;\n};\nexport type LieuxParDepartements = Map;\n\nfunction convertDepartementForSort(codeDepartement: CodeDepartement) {\n switch(codeDepartement) {\n case '2A': return '20A';\n case '2B': return '20B';\n default: return codeDepartement;\n }\n}\n\nexport type StatLieu = {disponibles: number, total: number};\nexport type StatLieuGlobale = StatLieu & { proportion: number };\nexport type StatsLieuParDepartement = Record\nexport type StatsLieu = {\n parDepartements: StatsLieuParDepartement;\n global: StatLieuGlobale;\n}\n\nexport class State {\n public static current = new State();\n\n private _departementsDiponibles: Departement[]|undefined = undefined;\n private _lieuxParDepartement: LieuxParDepartements = new Map();\n private _statsLieu: StatsLieu|undefined = undefined;\n\n private constructor() {\n }\n\n async lieuxPour(codeDepartement: CodeDepartement, codeTrancheAge: CodeTrancheAge): Promise {\n if(this._lieuxParDepartement.has(codeDepartement)) {\n return Promise.resolve(this._lieuxParDepartement.get(codeDepartement)!);\n } else {\n const resp = await fetch(`${VMD_BASE_URL}/${codeDepartement}.json`)\n const results = await resp.json()\n return {\n lieuxDisponibles: results.centres_disponibles.map(transformLieu),\n lieuxIndisponibles: results.centres_indisponibles.map(transformLieu),\n codeDepartement,\n derniereMiseAJour: results.last_updated\n };\n }\n }\n\n async departementsDisponibles(): Promise {\n if(this._departementsDiponibles !== undefined) {\n return Promise.resolve(this._departementsDiponibles);\n } else {\n const resp = await fetch(`${VMD_BASE_URL}/departements.json`)\n const departements: Departement[] = await resp.json()\n\n this._departementsDiponibles = departements;\n this._departementsDiponibles.sort((d1, d2) => convertDepartementForSort(d1.code_departement).localeCompare(convertDepartementForSort(d2.code_departement)));\n return departements;\n }\n }\n\n async statsLieux(): Promise {\n if(this._statsLieu !== undefined) {\n return Promise.resolve(this._statsLieu);\n } else {\n const resp = await fetch(`${VMD_BASE_URL}/stats.json`)\n const statsParDepartements: Record = await resp.json()\n\n const statsLieu = {\n parDepartements: Object.entries(statsParDepartements)\n .filter(([dpt, stats]: [CodeDepartement|\"tout_departement\", StatLieu]) => dpt !== 'tout_departement')\n .reduce((statsParDept, [dpt, stats]: [CodeDepartement, StatLieu]) => {\n statsParDepartements[dpt] = stats;\n return statsParDepartements;\n }, {} as StatsLieuParDepartement),\n global: {\n ...statsParDepartements['tout_departement'],\n proportion: Math.round(statsParDepartements['tout_departement'].disponibles * 10000 / statsParDepartements['tout_departement'].total)/100\n }\n };\n this._statsLieu = statsLieu;\n return statsLieu;\n }\n }\n\n private geolocalisationBloquée = false\n private geolocalisationIndisponible = false\n private userLocation: Coordinates | 'bloqué' | 'indisponible' | undefined\n async localisationNavigateur (): Promise {\n if(this.userLocation !== 'indisponible' && this.userLocation !== undefined) {\n return this.userLocation;\n }\n\n const promise = new Promise((resolve, reject) => {\n navigator.geolocation.getCurrentPosition(resolve, reject, {\n enableHighAccuracy: true,\n timeout: 4000,\n })\n })\n try {\n const { coords } = await (promise as Promise<{ coords: Coordinates }>)\n this.userLocation = coords\n } catch (error) {\n if (error instanceof GeolocationPositionError && error.code === 1) {\n this.userLocation = 'bloqué'\n } else {\n this.userLocation = 'indisponible'\n }\n }\n return this.userLocation\n\n }\n}\n","import {Strings} from \"./Strings\";\n\nexport type ISODateString = string;\n\nconst FR_WEEK_DAYS: Record = {\n 0: 'Dimanche', 1: 'Lundi', 2: 'Mardi', 3: 'Mercredi',\n 4: 'Jeudi', 5: 'Vendredi', 6: 'Samedi'\n};\nconst FR_MONTHES: Record = {\n 0: 'Janvier', 1: 'Février', 2: 'Mars', 3: 'Avril', 4: 'Mai', 5: 'Juin',\n 6: 'Juillet', 7: 'Août', 8: 'Septembre', 9: 'Octobre', 10: 'Novembre', 11: 'Décembre',\n};\n\nexport type Duration = {\n days: number;\n totalHours: number;\n hours: number;\n totalMinutes: number;\n minutes: number;\n totalSeconds: number;\n seconds: number;\n totalMillis: number;\n millis: number;\n};\n\nexport type WeekDay = \"lundi\"|\"mardi\"|\"mercredi\"|\"jeudi\"|\"vendredi\"|\"samedi\"|\"dimanche\";\nexport const WEEK_DAYS_DESCRIPTORS: { [k in WeekDay]: { index: number, shortName: string } } = {\n \"lundi\": { index: 0, shortName: \"Lu\" },\n \"mardi\": { index: 1, shortName: \"Ma\" },\n \"mercredi\": { index: 2, shortName: \"Me\" },\n \"jeudi\": { index: 3, shortName: \"Je\" },\n \"vendredi\": { index: 4, shortName: \"Ve\" },\n \"samedi\": { index: 5, shortName: \"Sa\" },\n \"dimanche\": { index: 6, shortName: \"Di\" },\n};\nexport const WEEK_DAYS: WeekDay[] = Object.entries(WEEK_DAYS_DESCRIPTORS).reduce((weekdays, [weekday, desc]) => {\n weekdays[desc.index] = weekday as WeekDay;\n return weekdays;\n}, Array(7).fill(null) as WeekDay[])\n\n// TODO: Replace this with Luxon or momentjs once the requirements are evolving\n// At the moment, no need to embed a multi Kb lib just for this\nexport class Dates {\n\n public static parseISO(isoDateStr: ISODateString|null|undefined): Date|undefined {\n if(!isoDateStr) {\n return undefined;\n }\n\n const ts = Date.parse(isoDateStr);\n return (isNaN(ts))?undefined:new Date(ts);\n }\n\n public static formatToFRDateTime(date: Date) {\n return `\n ${FR_WEEK_DAYS[date.getDay()]} ${date.getDate()} ${FR_MONTHES[date.getMonth()]}\n à ${Strings.padLeft(date.getHours(), 2, '0')}:${Strings.padLeft(date.getMinutes(), 2, '0')}\n `;\n }\n\n public static isoToFRDatetime(isoDateStr: ISODateString|null|undefined): string|undefined {\n const date = Dates.parseISO(isoDateStr);\n return date?Dates.formatToFRDateTime(date):undefined;\n }\n\n public static formatDurationFromNow(isoDate: ISODateString) {\n const date = this.parseISO(isoDate);\n const durationFromNow = date?Dates.durationFromNow(date):undefined;\n return durationFromNow?Dates.formatDuration(durationFromNow):undefined;\n }\n\n public static durationFromNow(date: Date) {\n return Dates.durationBetween(date, new Date());\n }\n\n public static durationBetween(date1: Date, date2: Date) {\n const totalMillis = Math.abs(date1.getTime() - date2.getTime());\n const millis = totalMillis % 1000;\n const totalSeconds = (totalMillis - millis)/(1000);\n const seconds = ((totalMillis - millis)/1000)%60;\n const totalMinutes = (totalMillis - millis - seconds*1000)/(60*1000)\n const minutes = ((totalMillis - millis - seconds*1000)/(60*1000))%60;\n const totalHours = (totalMillis - millis - seconds*1000 - minutes*60*1000)/(60*60*1000)\n const hours = ((totalMillis - millis - seconds*1000 - minutes*60*1000)/(60*60*1000))%24;\n const days = ((totalMillis - millis - seconds*1000 - minutes*60*1000 - hours*60*60*1000)/(24*60*60*1000));\n return { days, totalHours, hours, totalMinutes, minutes, totalSeconds, seconds, totalMillis, millis };\n }\n\n private static showValue(value: number, unit: string, pluralForm: string = 's', skipPlural: boolean = false) {\n return (value === 0?'':value+unit+(skipPlural?'':Strings.plural(value, pluralForm)));\n }\n\n public static formatDuration(durationFromNow: Duration): string {\n if(durationFromNow.totalHours === 0) {\n return `${Dates.showValue(durationFromNow.minutes, ' minute')}`;\n } else if(durationFromNow.totalHours <= 6) {\n return `${Dates.showValue(durationFromNow.hours, ' heure')} ${Dates.showValue(durationFromNow.minutes, ' minute')}`;\n } else if(durationFromNow.days === 0) {\n return `${Dates.showValue(durationFromNow.hours, ' heure')}`;\n } else if(durationFromNow.days < 3) {\n return `${Dates.showValue(durationFromNow.days, ' jour')} ${Dates.showValue(durationFromNow.hours, ' heure')}`;\n } else {\n return `${Dates.showValue(durationFromNow.days, ' jour')}`;\n }\n }\n}\n","import {css, customElement, html, LitElement, property, unsafeCSS} from 'lit-element';\nimport {classMap} from \"lit-html/directives/class-map\";\nimport {Lieu, Plateforme, PLATEFORMES, TYPES_LIEUX} from \"../state/State\";\nimport {Router} from \"../routing/Router\";\nimport {Dates} from \"../utils/Dates\";\nimport appointmentCardCss from \"../styles/components/_appointmentCard.scss\";\nimport globalCss from \"../styles/global.scss\";\nimport {Strings} from \"../utils/Strings\";\n\n@customElement('vmd-appointment-card')\nexport class VmdAppointmentCardComponent extends LitElement {\n\n //language=css\n static styles = [\n css`${unsafeCSS(globalCss)}`,\n css`${unsafeCSS(appointmentCardCss)}`,\n css`\n `\n ];\n\n @property({type: Object, attribute: false}) lieu!: Lieu;\n @property({type: Number, attribute: false}) distance!: number;\n /* dunno why, but boolean string is not properly converted to boolean when using attributes */\n @property({type: Boolean, attribute: false }) rdvPossible!: boolean;\n\n private get estCliquable() {\n return !!this.lieu.url;\n }\n\n constructor() {\n super();\n }\n\n render() {\n if(this.rdvPossible) {\n const plateforme: Plateforme|undefined = PLATEFORMES[this.lieu.plateforme];\n let distance: any = this.distance\n if (distance >= 10) {\n distance = distance.toFixed(0)\n } else if (distance) {\n distance = distance.toFixed(1)\n }\n return html`\n
Router.navigateToUrlIfPossible(this.lieu.url)}\">\n
\n
\n
\n
${Dates.isoToFRDatetime(this.lieu.prochain_rdv)}${distance ? `- ${distance} km` : ''}
\n
\n \n
\n ${this.lieu.nom}\n
\n ${this.lieu.metadata.address}\n
\n
\n \n ${this.lieu.metadata.phone_number}\n \n \n ${TYPES_LIEUX[this.lieu.type]}\n \n
\n
\n\n ${this.estCliquable?html`\n
\n \n Prendre rendez-vous\n \n
\n
\n ${this.lieu.appointment_count.toLocaleString()} dose${Strings.plural(this.lieu.appointment_count)}\n
\n ${this.lieu.plateforme?html`\n |\n
\n ${plateforme?html`\n \n `:html`\n ${this.lieu.plateforme}\n `}\n
\n `:html``}\n
\n
\n `:html``}\n
\n
\n
\n `;\n } else {\n return html`\n
\n
\n
\n
\n
Aucun rendez-vous
\n \n
\n ${this.lieu.nom}\n
\n ${this.lieu.metadata.address}\n
\n
\n
\n\n ${this.estCliquable?html`\n \n `:html``}\n
\n
\n
\n `;\n }\n }\n\n connectedCallback() {\n super.connectedCallback();\n // console.log(\"connected callback\")\n }\n\n disconnectedCallback() {\n super.disconnectedCallback();\n // console.log(\"disconnected callback\")\n }\n}\n","import {LitElement, html, customElement, property, css, unsafeCSS} from 'lit-element';\nimport {classMap} from \"lit-html/directives/class-map\";\nimport globalCss from \"../styles/global.scss\";\n\nexport type MetadataWidthType = 'full-width'|'fit-to-content'|'3col-equally-distributed'\nconst METADATA_WIDTH_CLASSES: {[type in MetadataWidthType]: string} = {\n 'full-width': '',\n 'fit-to-content': 'col-md-auto',\n '3col-equally-distributed': 'col-md'\n};\n\n\n@customElement('vmd-appointment-metadata')\nexport class VmdAppointmentMetadataComponent extends LitElement {\n\n //language=css\n static styles = [\n css`${unsafeCSS(globalCss)}`,\n css`\n `\n ];\n\n @property({type: Boolean, attribute: false}) displayed: boolean = true;\n @property({type: String}) widthType: MetadataWidthType|undefined = undefined;\n @property({type: String}) icon: string|undefined = undefined;\n @property({type: Boolean, attribute: false}) centerIconVertically: boolean = true;\n\n constructor() {\n super();\n }\n\n render() {\n if(!this.widthType) {\n console.error(\"No widthType defined on vmd-appointment-metadata component !\")\n return html``\n }\n\n return html`\n
\n \n

\n \n

\n
\n `;\n }\n\n connectedCallback() {\n super.connectedCallback();\n\n this.classList.add(\"col-24\");\n if(this.widthType && METADATA_WIDTH_CLASSES[this.widthType]) {\n this.classList.add(METADATA_WIDTH_CLASSES[this.widthType])\n }\n\n if(!this.displayed) {\n this.style.display = 'none';\n }\n }\n\n disconnectedCallback() {\n super.disconnectedCallback();\n // console.log(\"disconnected callback\")\n }\n}\n","import {LitElement, html, customElement, property, css, unsafeCSS} from 'lit-element';\nimport {TrancheAgeSelectionne} from \"../components/vmd-tranche-age-selector.component\";\nimport {DepartementSelected} from \"../components/vmd-departement-selector.component\";\nimport {Router} from \"../routing/Router\";\nimport globalCss from \"../styles/global.scss\";\nimport homeViewCss from \"../styles/views/_home.scss\";\nimport searchDoseCss from \"../styles/components/_searchDose.scss\";\nimport searchAppointment from \"../styles/components/_searchAppointment.scss\";\nimport {\n CodeDepartement,\n CodeTrancheAge,\n Departement, FEATURES, libelleUrlPathDuDepartement,\n PLATEFORMES,\n State, StatsLieu,\n TRANCHES_AGE\n} from \"../state/State\";\n\n@customElement('vmd-home')\nexport class VmdHomeView extends LitElement {\n\n //language=css\n static styles = [\n css`${unsafeCSS(globalCss)}`,\n css`${unsafeCSS(homeViewCss)}`,\n css`${unsafeCSS(searchDoseCss)}`,\n css`${unsafeCSS(searchAppointment)}`,\n css`\n :host {\n display: block;\n }\n `\n ];\n\n @property({type: String}) codeTrancheAgeSelectionne: CodeTrancheAge|undefined = FEATURES.trancheAgeFilter?undefined:'plus75ans';\n @property({type: String}) codeDepartementSelectionne: CodeDepartement|undefined = undefined;\n\n @property({type: Array, attribute: false}) departementsDisponibles: Departement[]|undefined = [];\n @property({type: Array, attribute: false}) statsLieu: StatsLieu|undefined = undefined;\n\n get departementSelectionne(): Departement|undefined {\n if(!this.codeDepartementSelectionne || !this.departementsDisponibles) {\n return undefined;\n }\n return this.departementsDisponibles.find(dpt => dpt.code_departement === this.codeDepartementSelectionne);\n }\n\n onDepartementSelected(event: CustomEvent) {\n this.codeDepartementSelectionne = event.detail.departement?.code_departement;\n if(this.codeDepartementSelectionne && this.codeTrancheAgeSelectionne) {\n // Auto-trigger search\n this.rechercherRdv();\n }\n }\n\n rechercherRdv() {\n Router.navigateToRendezVous(\n this.codeDepartementSelectionne!,\n libelleUrlPathDuDepartement(this.departementSelectionne!),\n this.codeTrancheAgeSelectionne!)\n }\n\n render() {\n return html`\n
\n
\n \n
\n\n
\n
\n ${FEATURES.trancheAgeFilter?html`\n
\n J'ai\n
\n
\n ) => this.codeTrancheAgeSelectionne = event.detail.trancheAge?.codeTrancheAge}\"\n .tranchesAge=\"${TRANCHES_AGE}\"\n >\n \n
\n `:html``}\n \n
\n \n \n
\n
\n
\n \n
\n
\n
\n\n
\n
Trouvez vos rendez-vous avec
\n\n
\n ${Object.values(PLATEFORMES).filter(p => p.promoted).map(plateforme => {\n return html`\n
\n \n
\n `\n })}\n
\n
\n\n
\n\n
\n
\n
\n

VaccinTracker

\n\n

\n Combien de personnes ont été vaccinées ? Combien de premières injections ? Quel pourcentage de seconde injection ? Suivez la campagne vaccinale en France sur Vaccintracker.\n

\n\n \n
\n
\n
\n
\n

Carte des centres de vaccination contre la Covid-19

\n\n

\n Trouvez un centre de vaccination contre la Covid-19 proche de chez vous, consultez les centres pour savoir s’il y a des rendez-vous\n

\n\n \n
\n
\n
\n\n
\n
\n
\n \n
${this.statsLieu?.global.disponibles.toLocaleString()}
\n

Lieux de vaccination ayant des disponibilités

\n
\n
\n \n
${this.statsLieu?.global.total.toLocaleString()}
\n

Lieux de vaccination supportés

\n
\n
\n \n
${this.statsLieu?.global.proportion.toLocaleString()}%
\n

Proportion des lieux de vaccination ayant des disponibilités

\n
\n
\n
\n\n \n `;\n }\n\n async connectedCallback() {\n super.connectedCallback();\n\n const [ departementsDisponibles, statsLieu ] = await Promise.all([\n State.current.departementsDisponibles(),\n State.current.statsLieux()\n ])\n this.departementsDisponibles = departementsDisponibles;\n this.statsLieu = statsLieu;\n }\n\n disconnectedCallback() {\n super.disconnectedCallback();\n // console.log(\"disconnected callback\")\n }\n}\n","import { Coordinates } from './state/State'\n\nexport default function distanceEntreDeuxPoints({ latitude: lat1, longitude: lon1 }: Coordinates, { latitude: lat2, longitude: lon2 }: Coordinates) {\n var R = 6371; // Radius of the earth in km\n var dLat = deg2rad(lat2-lat1); // deg2rad below\n var dLon = deg2rad(lon2-lon1);\n var a =\n Math.sin(dLat/2) * Math.sin(dLat/2) +\n Math.cos(deg2rad(lat1)) * Math.cos(deg2rad(lat2)) *\n Math.sin(dLon/2) * Math.sin(dLon/2)\n ;\n var c = 2 * Math.atan2(Math.sqrt(a), Math.sqrt(1-a));\n var kilometers = R * c; // Distance in km\n return kilometers;\n}\n\nfunction deg2rad(deg: number) {\n return deg * (Math.PI/180)\n}\n","import {css, customElement, html, LitElement, property, unsafeCSS} from 'lit-element';\nimport {TrancheAgeSelectionne} from \"../components/vmd-tranche-age-selector.component\";\nimport {DepartementSelected} from \"../components/vmd-departement-selector.component\";\nimport {repeat} from \"lit-html/directives/repeat\";\nimport {styleMap} from \"lit-html/directives/style-map\";\nimport globalCss from \"../styles/global.scss\";\nimport {Router} from \"../routing/Router\";\nimport rdvViewCss from \"../styles/views/_rdv.scss\";\nimport delay from \"../delay\"\nimport distanceEntreDeuxPoints from \"../distance\"\nimport {\n Lieu,\n LieuxParDepartement,\n Coordinates,\n CodeDepartement,\n CodeTrancheAge,\n Departement,\n FEATURES,\n State,\n TRANCHES_AGE, libelleUrlPathDuDepartement\n} from \"../state/State\";\nimport {Dates} from \"../utils/Dates\";\nimport {Strings} from \"../utils/Strings\";\nimport {classMap} from \"lit-html/directives/class-map\";\n\ntype LieuAvecDistance = Lieu & { distance: number|undefined };\ntype LieuxAvecDistanceParDepartement = LieuxParDepartement & {\n lieuxDisponibles: LieuAvecDistance[];\n lieuxIndisponibles: LieuAvecDistance[];\n};\n\n@customElement('vmd-rdv')\nexport class VmdRdvView extends LitElement {\n\n //language=css\n static styles = [\n css`${unsafeCSS(globalCss)}`,\n css`${unsafeCSS(rdvViewCss)}`,\n css`\n `\n ];\n\n @property({type: String}) codeTrancheAgeSelectionne: CodeTrancheAge | undefined = undefined;\n @property({type: String}) codeDepartementSelectionne: CodeDepartement | undefined = undefined;\n\n @property({type: Array, attribute: false}) departementsDisponibles: Departement[] = [];\n @property({type: Array, attribute: false}) lieuxParDepartementAffiches: LieuxAvecDistanceParDepartement | undefined = undefined;\n @property({type: Boolean, attribute: false}) searchInProgress: boolean = false;\n\n @property({type: String, attribute: false}) critèreDeTri: 'date' | 'distance' = 'date'\n @property({type: Boolean, attribute: false}) recuperationLocationEnCours = false\n @property({type: Boolean, attribute: false}) geolocalisationBloquée = false\n @property({type: Boolean, attribute: false}) geolocalisationIndisponible = false\n @property({type: Boolean, attribute: false}) afficherMessageGeoloc = false\n private userLocation: Coordinates | undefined\n\n private lieuxParDepartementTriesParDate: LieuxAvecDistanceParDepartement|undefined = undefined;\n private lieuxParDepartementTriesParDistance: LieuxAvecDistanceParDepartement|undefined = undefined;\n\n\n async afficherTriParDistance (e: Event) {\n let location;\n try {\n this.recuperationLocationEnCours = true\n location = await State.current.localisationNavigateur()\n } finally {\n this.recuperationLocationEnCours = false;\n }\n if (location === 'bloqué') {\n this.geolocalisationBloquée = true\n this.geolocalisationIndisponible = false;\n this.prévenirSiBloqué()\n } else if (location === 'indisponible') {\n this.geolocalisationBloquée = false\n this.geolocalisationIndisponible = true\n } else {\n this.userLocation = location\n this.critèreDeTri = 'distance'\n if(!this.lieuxParDepartementTriesParDistance) {\n this.remplirLieuxParDepartementTresParDistance();\n }\n this.lieuxParDepartementAffiches = this.lieuxParDepartementTriesParDistance;\n this.geolocalisationBloquée = false\n this.geolocalisationIndisponible = false\n this.requestUpdate('lieuxParDepartementAffiches');\n }\n this.requestUpdate('critèreDeTri');\n }\n\n afficherTriParDate(e: Event) {\n this.critèreDeTri = 'date';\n this.lieuxParDepartementAffiches = this.lieuxParDepartementTriesParDate;\n }\n\n async prévenirSiBloqué () {\n if (this.geolocalisationBloquée && !this.afficherMessageGeoloc) {\n this.afficherMessageGeoloc = true\n await delay(5000)\n this.afficherMessageGeoloc = false\n }\n }\n\n get departementSelectionne() {\n if (this.codeDepartementSelectionne) {\n return this.departementsDisponibles.find(dept => dept.code_departement === this.codeDepartementSelectionne);\n } else {\n return undefined;\n }\n }\n\n get trancheAgeSelectionee() {\n if (this.codeTrancheAgeSelectionne) {\n return TRANCHES_AGE.get(this.codeTrancheAgeSelectionne);\n } else {\n return undefined;\n }\n }\n\n get totalDoses() {\n if (!this.lieuxParDepartementTriesParDate) {\n return 0;\n }\n return this.lieuxParDepartementTriesParDate\n .lieuxDisponibles\n .reduce((total, lieu) => total+lieu.appointment_count, 0);\n }\n\n render() {\n return html`\n
\n
\n ${FEATURES.trancheAgeFilter ? html`\n
\n J'ai\n
\n
\n \n
\n ` : html``}\n \n
\n \n
\n
\n
\n\n
\n\n ${this.searchInProgress?html`\n
\n
\n
\n
\n `:html`\n

\n ${this.totalDoses.toLocaleString()} dose${Strings.plural(this.totalDoses)} de vaccination covid trouvée${Strings.plural(this.totalDoses)} pour\n ${this.departementSelectionne?.nom_departement}\n ${FEATURES.trancheAgeFilter ? html`, ${this.trancheAgeSelectionee?.libelle}` : html``}\n \n
\n ${this.lieuxParDepartementAffiches?.derniereMiseAJour ? html`Dernière mise à jour : il y a ${Dates.formatDurationFromNow(this.lieuxParDepartementAffiches?.derniereMiseAJour)}` : html``}\n

\n\n
\n
\n ${this.lieuxParDepartementAffiches?.lieuxDisponibles.length ? html`\n

\n \n \n ${this.lieuxParDepartementAffiches?.lieuxDisponibles.length} Lieu${Strings.plural(this.lieuxParDepartementAffiches?.lieuxDisponibles.length, 'x')} de vaccination covid ont des disponibilités\n \n

\n
\n \n this.afficherTriParDate(e)}\" type=\"radio\" name=\"tri\" id=\"tri-date\" ?checked=${this.critèreDeTri === 'date'} />\n \n \n \n this.afficherTriParDistance(e)}\"\n ?checked=${this.critèreDeTri === 'distance'}\n ?disabled=\"${this.geolocalisationBloquée}\" />\n \n \n

Vous n'avez pas autorisé l'accès à votre position géographique au site ViteMaDose.

\n

La géolocalisation n'est pas disponible pour ViteMaDose

\n
\n ` : html`\n

Aucun créneau de vaccination trouvé

\n

Nous n’avons pas trouvé de rendez-vous de vaccination covid sur ces centres, nous vous recommandons toutefois de vérifier manuellement les rendez-vous de vaccination auprès des sites qui gèrent la réservation de créneau de vaccination. Pour ce faire, cliquez sur le bouton “vérifier le centre de vaccination”.

\n `}\n\n
\n ${repeat(this.lieuxParDepartementAffiches?.lieuxDisponibles || [], (c => `${c.departement}||${c.nom}||${c.plateforme}||${this.critèreDeTri}`), (lieu, index) => {\n return html``;\n })}\n\n ${this.lieuxParDepartementAffiches?.lieuxIndisponibles.length ? html`\n
\n\n
\n \n \n Autres centres sans créneaux de vaccination détecté\n \n
\n\n ${repeat(this.lieuxParDepartementAffiches?.lieuxIndisponibles || [], (c => `${c.departement}||${c.nom}||${c.plateforme}`), (lieu, index) => {\n return html``;\n })}\n ` : html``}\n
\n `}\n `;\n }\n\n async connectedCallback() {\n super.connectedCallback();\n\n const [departementsDisponibles, lieuxParDepartement] = await Promise.all([\n State.current.departementsDisponibles(),\n this.refreshLieux()\n ])\n\n this.departementsDisponibles = departementsDisponibles;\n }\n\n private remplirLieuxParDepartementTresParDistance() {\n if(this.userLocation) {\n const origin = this.userLocation\n const distanceAvec = (lieu: Lieu) => lieu.location ? distanceEntreDeuxPoints(origin, lieu.location) : Infinity\n\n const lieuxDisponiblesTriesParDistance: LieuAvecDistance[] = (this.lieuxParDepartementTriesParDate?.lieuxDisponibles || []).map(l => ({\n ...l, distance: distanceAvec(l)\n })).sort((a, b) => a.distance! - b.distance!)\n const lieuxIndisponiblesTriesParDistance: LieuAvecDistance[] = (this.lieuxParDepartementTriesParDate?.lieuxIndisponibles || []).map(l => ({\n ...l, distance: distanceAvec(l)\n })).sort((a, b) => a.distance! - b.distance!)\n\n this.lieuxParDepartementTriesParDistance = {\n ...this.lieuxParDepartementTriesParDate!,\n lieuxDisponibles: lieuxDisponiblesTriesParDistance,\n lieuxIndisponibles: lieuxIndisponiblesTriesParDistance,\n }\n } else {\n this.lieuxParDepartementTriesParDistance = undefined;\n }\n }\n\n async refreshLieux() {\n if (this.codeDepartementSelectionne && this.codeTrancheAgeSelectionne) {\n try {\n this.searchInProgress = true;\n const lieuxParDepartement = await State.current.lieuxPour(this.codeDepartementSelectionne, this.codeTrancheAgeSelectionne);\n\n const { lieuxDisponibles, lieuxIndisponibles } = {\n lieuxDisponibles: lieuxParDepartement?.lieuxDisponibles || [],\n lieuxIndisponibles: lieuxParDepartement?.lieuxIndisponibles || [],\n };\n\n this.lieuxParDepartementTriesParDate = {\n ...lieuxParDepartement,\n lieuxDisponibles: lieuxDisponibles.map(l => ({...l, distance: undefined})),\n lieuxIndisponibles: lieuxIndisponibles.map(l => ({...l, distance: undefined})),\n };\n\n this.remplirLieuxParDepartementTresParDistance();\n\n this.lieuxParDepartementAffiches = this.critèreDeTri==='date'?this.lieuxParDepartementTriesParDate:this.lieuxParDepartementTriesParDistance;\n } finally {\n this.searchInProgress = false;\n }\n } else {\n this.lieuxParDepartementAffiches = undefined;\n this.lieuxParDepartementTriesParDate = undefined;\n this.lieuxParDepartementTriesParDistance = undefined;\n }\n }\n\n trancheAgeMisAJour(event: CustomEvent) {\n this.codeTrancheAgeSelectionne = event.detail.trancheAge?.codeTrancheAge;\n this.refreshLieux();\n this.refreshPageWhenValidParams();\n }\n\n departementUpdated(event: CustomEvent) {\n this.codeDepartementSelectionne = event.detail.departement?.code_departement;\n this.refreshLieux();\n this.refreshPageWhenValidParams();\n }\n\n disconnectedCallback() {\n super.disconnectedCallback();\n // console.log(\"disconnected callback\")\n }\n\n private refreshPageWhenValidParams() {\n if (this.codeDepartementSelectionne && this.codeTrancheAgeSelectionne) {\n Router.navigateToRendezVous(this.codeDepartementSelectionne, libelleUrlPathDuDepartement(this.departementSelectionne!), this.codeTrancheAgeSelectionne);\n }\n }\n}\n","export default function delay(ms: number): Promise {\n return new Promise ((resolve) => setTimeout(resolve, ms))\n}\n","import {css, customElement, html, LitElement, unsafeCSS} from 'lit-element';\nimport globalCss from \"../styles/global.scss\";\nimport {Icon, map, marker, tileLayer} from 'leaflet'\nimport leafletCss from 'leaflet/dist/leaflet.css';\nimport leafletMarkerCss from 'leaflet.markercluster/dist/MarkerCluster.Default.css';\n// @ts-ignore\nimport {MarkerClusterGroup} from 'leaflet.markercluster'\nimport {Router} from \"../routing/Router\";\n\n// Code imported (and refactored a little bit)\n// from https://github.com/rozierguillaume/covidtracker-tools/blob/main/src/ViteMaDose/carteCentres.html\n\ntype Lieu = {\n nom: string;\n longitude: number;\n latitude: number;\n reservation: string;\n date_ouverture: string;\n rdv_tel: string;\n modalites: string;\n adresse: string;\n maj: string;\n};\n\n@customElement('vmd-lieux')\nexport class VmdLieuxView extends LitElement {\n\n //language=css\n static styles = [\n css`${unsafeCSS(globalCss)}`,\n css`${unsafeCSS(leafletCss)}`,\n css`${unsafeCSS(leafletMarkerCss)}`,\n css`\n :host {\n display: block;\n }\n #mapid { height: 180px; }\n `\n ];\n\n render() {\n return html`\n

Carte des centres de vaccination contre la Covid-19

\n \n \n\n
\n `;\n }\n\n connectedCallback() {\n super.connectedCallback();\n\n this.requestUpdate().then(() => this.loadMap());\n }\n\n private loadMap() {\n const mymap = map(this.shadowRoot!.querySelector(\"#mapid\") as HTMLElement).setView([46.505, 3], 6);\n const url=\"https://www.data.gouv.fr/fr/datasets/r/5cb21a85-b0b0-4a65-a249-806a040ec372\"\n\n let request = fetch(url)\n .then(response => response.arrayBuffer())\n .then(buffer => {\n const decoder = new TextDecoder();\n const csv = decoder.decode(buffer);\n const data_array = VmdLieuxView.CSVToArray(csv, \";\");\n\n const lieux: Lieu[] = data_array.slice(1, data_array.length-1).map((value: string[], idx) => ({\n longitude: Number(value[10]),\n latitude: Number(value[11]),\n nom: value[1],\n reservation: value[34],\n date_ouverture: value[33],\n rdv_tel: value[35],\n modalites: value[37],\n adresse: value[5] + \" \" + value[6] + \", \" + value[7] + \" \" + value[9],\n maj: value[22].slice(0, 16),\n }))\n\n const markers = VmdLieuxView.creer_pins(lieux);\n mymap.addLayer(markers);\n })\n .catch(function () {\n // this.dataError = true;\n console.log(\"error1\")\n });\n\n tileLayer('https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', {\n maxZoom: 19,\n attribution: '© OpenStreetMap contributors'\n }).addTo(mymap);\n }\n\n // ref: http://stackoverflow.com/a/1293163/2343\n // This will parse a delimited string into an array of\n // arrays. The default delimiter is the comma, but this\n // can be overriden in the second argument.\n private static CSVToArray(strData: string, strDelimiter: string ): string[][]{\n // Check to see if the delimiter is defined. If not,\n // then default to comma.\n strDelimiter = (strDelimiter || \",\");\n\n // Create a regular expression to parse the CSV values.\n let objPattern = new RegExp(\n (\n // Delimiters.\n \"(\\\\\" + strDelimiter + \"|\\\\r?\\\\n|\\\\r|^)\" +\n\n // Quoted fields.\n \"(?:\\\"([^\\\"]*(?:\\\"\\\"[^\\\"]*)*)\\\"|\" +\n\n // Standard fields.\n \"([^\\\"\\\\\" + strDelimiter + \"\\\\r\\\\n]*))\"\n ),\n \"gi\"\n );\n\n\n // Create an array to hold our data. Give the array\n // a default empty first row.\n let arrData = [[]] as string[][];\n\n // Create an array to hold our individual pattern\n // matching groups.\n let arrMatches = null;\n\n\n // Keep looping over the regular expression matches\n // until we can no longer find a match.\n while (arrMatches = objPattern.exec( strData )){\n\n // Get the delimiter that was found.\n let strMatchedDelimiter = arrMatches[ 1 ];\n\n // Check to see if the given delimiter has a length\n // (is not the start of string) and if it matches\n // field delimiter. If id does not, then we know\n // that this delimiter is a row delimiter.\n if (\n strMatchedDelimiter.length &&\n strMatchedDelimiter !== strDelimiter\n ){\n\n // Since we have reached a new row of data,\n // add an empty row to our data array.\n arrData.push( [] );\n\n }\n\n let strMatchedValue;\n\n // Now that we have our delimiter out of the way,\n // let's check to see which kind of value we\n // captured (quoted or unquoted).\n if (arrMatches[ 2 ]){\n\n // We found a quoted value. When we capture\n // this value, unescape any double quotes.\n strMatchedValue = arrMatches[ 2 ].replace(\n new RegExp( \"\\\"\\\"\", \"g\" ),\n \"\\\"\"\n );\n\n } else {\n\n // We found a non-quoted value.\n strMatchedValue = arrMatches[ 3 ];\n\n }\n\n\n // Now that we have our value string, let's add\n // it to the data array.\n arrData[ arrData.length - 1 ].push( strMatchedValue );\n }\n\n // Return the parsed data.\n return arrData;\n }\n\n private static creer_pins(lieux: Lieu[]){\n const markers = lieux.reduce((markers: MarkerClusterGroup, lieu, idx)=>{\n let reservation_str = \"\"\n if (typeof lieu.reservation != 'undefined'){\n if (lieu.reservation.indexOf(\"http\") === 0){\n reservation_str = `${lieu.reservation}`\n }\n } else {\n reservation_str = lieu.reservation;\n }\n\n var string_popup = `\n ${lieu.nom}\n
\n Adresse : ${lieu.adresse}
Réservation : ${reservation_str}\n
\n Tél : ${lieu.rdv_tel}\n
\n Date d'ouverture : ${lieu.date_ouverture}
Modalités : ${lieu.modalites}\n
\n Mise à jour : ${lieu.maj}\n `;\n var newMarker = marker([lieu.longitude, lieu.latitude], {\n icon: new Icon.Default({imagePath: `${Router.basePath}assets/images/png/`})\n }).bindPopup(string_popup) //.addTo(this.mymap);\n newMarker.on('click', function(e: any) {\n // @ts-ignore\n this.openPopup();\n });\n markers.addLayer(newMarker);\n\n return markers;\n }, new MarkerClusterGroup({ disableClusteringAtZoom: 9 }));\n return markers;\n }\n\n disconnectedCallback() {\n super.disconnectedCallback();\n // console.log(\"disconnected callback\")\n }\n}\n","import {LitElement, html, customElement, property, css} from 'lit-element';\nimport {classMap} from \"lit-html/directives/class-map\";\n\n@customElement('vmd-apropos')\nexport class VmdAproposComponent extends LitElement {\n\n //language=css\n static styles = [\n css`\n `\n ];\n\n constructor() {\n super();\n }\n\n render() {\n return html`\n \n `;\n }\n\n connectedCallback() {\n super.connectedCallback();\n // console.log(\"connected callback\")\n }\n\n disconnectedCallback() {\n super.disconnectedCallback();\n // console.log(\"disconnected callback\")\n }\n}\n"],"names":["modulePath","importFunctionName","Function","error","baseURL","URL","location","cleanup","script","revokeObjectURL","src","remove","url","Promise","resolve","reject","absURL","self","moduleMap","moduleBlob","Blob","type","Object","assign","document","createElement","createObjectURL","[object Object]","Error","head","appendChild","p","callback","callbackCleaner","this","onViewChanged","redirect","basePath","declareRoute","subViewSlot","html","params","context","_notFoundRoute","path","viewComponentCreator","substring","slottedViewComponentFactoryResult","then","currentPath","currentTemplateResultCreator","slottedViewTemplateFactory","_viewChangeCallbacks","forEach","push","idx","findIndex","registeredCallback","splice","navigateToHome","codeDepartement","pathLibelleDepartement","trancheAge","open","Routing","INSTANCE","_Routing","Router","LitElement","installRoutes","viewTemplateResult","connectedCallback","disconnectedCallback","VmdAppComponent","styles","css","unsafeCSS","globalCss","__decorate","property","attribute","prototype","customElement","Map","trancheAgeSelectionne","codeTrancheAgeSelectionne","Array","from","tranchesAge","values","map","codeTrancheAge","libelle","event","currentTarget","value","dispatchEvent","CustomEvent","detail","get","VmdTrancheAgeSelectorComponent","String","departementSelectionne","codeDepartementSelectionne","repeat","departementsDisponibles","dept","code_departement","nom_departement","departement","find","VmdDepartementSelectorComponent","size","filler","padSize","length","pad","i","pluralForm","phoneNumber","normaliedPhoneNumber","indexOf","join","toLowerCase","replace","TRANCHES_AGE","VMD_BASE_URL","PLATEFORMES","Doctolib","code","logo","nom","promoted","styleCode","Maiia","Ordoclic","Keldoc","Pandalab","Mapharma","libelleUrlPathDuDepartement","Strings","toReadableURLPathValue","TYPES_LIEUX","vaccination-center","drugstore","general-practitioner","rawLieu","__assign","appointment_count","metadata","address","adr_num","adr_voie","com_cp","com_nom","filter","val","phone_number","toNormalizedPhoneNumber","_lieuxParDepartement","has","resp","fetch","results","json","lieuxDisponibles","centres_disponibles","transformLieu","lieuxIndisponibles","centres_indisponibles","derniereMiseAJour","last_updated","_departementsDiponibles","departements","sort","d1","d2","convertDepartementForSort","localeCompare","_statsLieu","statsParDepartements","statsLieu","parDepartements","entries","dpt","stats","reduce","statsParDept","global","proportion","Math","round","disponibles","total","userLocation","promise","geolocation","getCurrentPosition","enableHighAccuracy","timeout","coords","GeolocationPositionError","State","current","_State","FR_WEEK_DAYS","0","1","2","3","4","5","6","FR_MONTHES","7","8","9","10","11","lundi","index","shortName","mardi","mercredi","jeudi","vendredi","samedi","dimanche","weekdays","weekday","desc","fill","isoDateStr","ts","Date","parse","isNaN","date","getDay","getDate","getMonth","padLeft","getHours","getMinutes","Dates","parseISO","formatToFRDateTime","isoDate","durationFromNow","formatDuration","durationBetween","date1","date2","totalMillis","abs","getTime","millis","seconds","minutes","hours","days","totalHours","totalMinutes","totalSeconds","unit","skipPlural","plural","showValue","lieu","rdvPossible","plateforme","distance","toFixed","classMap","clickable","estCliquable","navigateToUrlIfPossible","isoToFRDatetime","prochain_rdv","toLocaleString","VmdAppointmentCardComponent","Number","Boolean","METADATA_WIDTH_CLASSES","full-width","fit-to-content","3col-equally-distributed","widthType","align-items-center","centerIconVertically","icon","classList","add","displayed","style","display","VmdAppointmentMetadataComponent","rechercherRdv","navigateToRendezVous","onDepartementSelected","p2","all","statsLieux","VmdHomeView","deg","PI","e","location2","recuperationLocationEnCours","localisationNavigateur","geolocalisationBloquée","geolocalisationIndisponible","prévenirSiBloqué","critèreDeTri","lieuxParDepartementTriesParDistance","remplirLieuxParDepartementTresParDistance","lieuxParDepartementAffiches","requestUpdate","lieuxParDepartementTriesParDate","ms","afficherMessageGeoloc","setTimeout","departementUpdated","searchInProgress","styleMap","totalDoses","formatDurationFromNow","afficherTriParDate","afficherTriParDistance","c","lieuxParDepartement","refreshLieux","origin","distanceAvec","latitude","lat1","longitude","lon1","lat2","lon2","dLat","deg2rad","dLon","a","sin","cos","atan2","sqrt","distanceEntreDeuxPoints","Infinity","lieuxDisponiblesTriesParDistance","l","b","lieuxIndisponiblesTriesParDistance","lieuxPour","refreshPageWhenValidParams","VmdRdvView","loadMap","mymap","shadowRoot","querySelector","setView","response","arrayBuffer","csv","TextDecoder","decode","buffer","data_array","VmdLieuxView","CSVToArray","lieux","slice","reservation","date_ouverture","rdv_tel","modalites","adresse","maj","markers","creer_pins","addLayer","catch","log","maxZoom","attribution","addTo","strData","strDelimiter","objPattern","RegExp","arrData","arrMatches","exec","strMatchedValue","strMatchedDelimiter","markers2","reservation_str","string_popup","newMarker","marker","Icon","Default","imagePath","bindPopup","on","openPopup","MarkerClusterGroup","disableClusteringAtZoom","VmdAproposComponent"],"mappings":"+bAAU,SAAkBA,EAAa,IAAKC,EAAqB,uBAEtDA,GAAsB,IAAIC,SAAS,IAAK,0BAE1CC,SACGC,EAAU,IAAIC,IAAIL,EAAYM,UAC9BC,EAAWC,QACTC,gBAAgBD,EAAOE,OACpBC,eAENV,GAAuBW,GAAQ,IAAIC,SAAQ,CAACC,EAASC,WAChDC,EAAS,IAAIX,IAAIO,EAAKR,MAExBa,KAAKhB,GAAoBiB,UAAUF,UAC5BF,EAAQG,KAAKhB,GAAoBiB,UAAUF,UAEhDG,EAAa,IAAIC,KAAK,CACxB,uBAAuBJ,MACvB,GAAGf,gBAAiCe,UACrC,CAAEK,KAAM,oBACLb,EAASc,OAAOC,OAAOC,SAASC,cAAc,UAAW,CAC3DJ,KAAM,SACNX,IAAKL,IAAIqB,gBAAgBP,GACzBQ,YACW,IAAIC,MAAM,qBAAqBhB,QAC9BJ,IAEZmB,WACYV,KAAKhB,GAAoBiB,UAAUF,MACnCR,eAGPqB,KAAKC,YAAYtB,WAEzBP,GAAoBiB,UAAY,IAEvBa,CAAE,s4vRC1BxB,cAAAJ,wCAG0D,0CAEyB,wBACvC,uBAG7B,qBAGXA,cAAcK,SACJC,EAAkBD,EAASE,KAAKC,cAAcH,QAAU,WAEzDI,SAAS,GAAGF,KAAKG,eAAgB,OACjCD,SAAS,GAAGF,KAAKG,qBAAsB,UAEvCC,aAAa,KAAK,IAAOC,GAC1BC,cAAiBD,sBAChBD,aAAa,mEAAoEG,GAAYF,GAC9FC,yCAA4CC,yCAAiDA,iBAAyBF,qBACrHD,aAAa,8FAA+FG,GAAYF,GACzHC,yCAA4CC,yCAAiDA,iBAAyBF,qBACrHD,aAAa,YAAaG,GAAYF,GACvCC,eAAkBD,uBACjBD,aAAa,YAAaG,GAAYF,GACvCC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