@geotrekce/geotrek-rando-widget 0.5.2 → 0.5.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (156) hide show
  1. package/dist/cjs/geotrek-rando-widget.cjs.js +1 -1
  2. package/dist/cjs/geotrek-rando-widget.cjs.js.br +0 -0
  3. package/dist/cjs/geotrek-rando-widget.cjs.js.gz +0 -0
  4. package/dist/cjs/grw-app_28.cjs.entry.js +572 -85
  5. package/dist/cjs/grw-app_28.cjs.entry.js.br +0 -0
  6. package/dist/cjs/grw-app_28.cjs.entry.js.gz +0 -0
  7. package/dist/cjs/grw-app_28.cjs.entry.js.map +1 -1
  8. package/dist/cjs/loader.cjs.js +1 -1
  9. package/dist/cjs/loader.cjs.js.br +0 -0
  10. package/dist/cjs/loader.cjs.js.gz +0 -0
  11. package/dist/collection/assets/parking.svg +5 -0
  12. package/dist/collection/assets/parking.svg.br +0 -0
  13. package/dist/collection/assets/parking.svg.gz +0 -0
  14. package/dist/collection/collection-manifest.json +2 -2
  15. package/dist/collection/components/grw-app/grw-app.css +8 -5
  16. package/dist/collection/components/grw-app/grw-app.css.br +0 -0
  17. package/dist/collection/components/grw-app/grw-app.css.gz +0 -0
  18. package/dist/collection/components/grw-app/grw-app.js +20 -1
  19. package/dist/collection/components/grw-app/grw-app.js.br +0 -0
  20. package/dist/collection/components/grw-app/grw-app.js.gz +0 -0
  21. package/dist/collection/components/grw-app/grw-app.js.map +1 -1
  22. package/dist/collection/components/grw-filters/grw-filters.js +1 -1
  23. package/dist/collection/components/grw-filters/grw-filters.js.br +0 -0
  24. package/dist/collection/components/grw-filters/grw-filters.js.gz +0 -0
  25. package/dist/collection/components/grw-filters/grw-filters.js.map +1 -1
  26. package/dist/collection/components/grw-information-desk/grw-information-desk.js +3 -1
  27. package/dist/collection/components/grw-information-desk/grw-information-desk.js.br +0 -0
  28. package/dist/collection/components/grw-information-desk/grw-information-desk.js.gz +0 -0
  29. package/dist/collection/components/grw-information-desk/grw-information-desk.js.map +1 -1
  30. package/dist/collection/components/grw-map/grw-map.css +15 -12
  31. package/dist/collection/components/grw-map/grw-map.css.br +0 -0
  32. package/dist/collection/components/grw-map/grw-map.css.gz +0 -0
  33. package/dist/collection/components/grw-map/grw-map.js +28 -18
  34. package/dist/collection/components/grw-map/grw-map.js.br +0 -0
  35. package/dist/collection/components/grw-map/grw-map.js.gz +0 -0
  36. package/dist/collection/components/grw-map/grw-map.js.map +1 -1
  37. package/dist/collection/components/grw-sensitive-area-detail/grw-sensitive-area-detail.css +27 -4
  38. package/dist/collection/components/grw-sensitive-area-detail/grw-sensitive-area-detail.css.br +0 -0
  39. package/dist/collection/components/grw-sensitive-area-detail/grw-sensitive-area-detail.css.gz +0 -0
  40. package/dist/collection/components/grw-sensitive-area-detail/grw-sensitive-area-detail.js +1 -1
  41. package/dist/collection/components/grw-sensitive-area-detail/grw-sensitive-area-detail.js.br +0 -0
  42. package/dist/collection/components/grw-sensitive-area-detail/grw-sensitive-area-detail.js.gz +0 -0
  43. package/dist/collection/components/grw-sensitive-area-detail/grw-sensitive-area-detail.js.map +1 -1
  44. package/dist/collection/components/{grw-touristic-content → grw-touristic-content-card}/grw-touristic-content-card.css +5 -2
  45. package/dist/collection/components/grw-touristic-content-card/grw-touristic-content-card.css.br +0 -0
  46. package/dist/collection/components/grw-touristic-content-card/grw-touristic-content-card.css.gz +0 -0
  47. package/dist/collection/components/grw-touristic-content-card/grw-touristic-content-card.js.map +1 -0
  48. package/dist/collection/components/grw-touristic-content-detail/grw-touristic-content-detail.js +1 -1
  49. package/dist/collection/components/grw-touristic-content-detail/grw-touristic-content-detail.js.br +0 -0
  50. package/dist/collection/components/grw-touristic-content-detail/grw-touristic-content-detail.js.gz +0 -0
  51. package/dist/collection/components/grw-touristic-content-detail/grw-touristic-content-detail.js.map +1 -1
  52. package/dist/collection/components/{grw-touristic-event → grw-touristic-event-card}/grw-touristic-event-card.css +0 -1
  53. package/dist/collection/components/grw-touristic-event-card/grw-touristic-event-card.css.br +0 -0
  54. package/dist/collection/components/{grw-touristic-event → grw-touristic-event-card}/grw-touristic-event-card.css.gz +0 -0
  55. package/dist/collection/components/grw-touristic-event-card/grw-touristic-event-card.js.map +1 -0
  56. package/dist/collection/components/grw-touristic-event-detail/grw-touristic-event-detail.js +1 -1
  57. package/dist/collection/components/grw-touristic-event-detail/grw-touristic-event-detail.js.br +0 -0
  58. package/dist/collection/components/grw-touristic-event-detail/grw-touristic-event-detail.js.gz +0 -0
  59. package/dist/collection/components/grw-touristic-event-detail/grw-touristic-event-detail.js.map +1 -1
  60. package/dist/collection/components/grw-trek-card/grw-trek-card.js +1 -1
  61. package/dist/collection/components/grw-trek-card/grw-trek-card.js.br +0 -0
  62. package/dist/collection/components/grw-trek-card/grw-trek-card.js.gz +0 -0
  63. package/dist/collection/components/grw-trek-detail/grw-trek-detail.css +172 -35
  64. package/dist/collection/components/grw-trek-detail/grw-trek-detail.css.br +0 -0
  65. package/dist/collection/components/grw-trek-detail/grw-trek-detail.css.gz +0 -0
  66. package/dist/collection/components/grw-trek-detail/grw-trek-detail.js +135 -44
  67. package/dist/collection/components/grw-trek-detail/grw-trek-detail.js.br +0 -0
  68. package/dist/collection/components/grw-trek-detail/grw-trek-detail.js.gz +0 -0
  69. package/dist/collection/components/grw-trek-detail/grw-trek-detail.js.map +1 -1
  70. package/dist/collection/i18n/i18n.js +16 -10
  71. package/dist/collection/i18n/i18n.js.br +0 -0
  72. package/dist/collection/i18n/i18n.js.gz +0 -0
  73. package/dist/collection/i18n/i18n.js.map +1 -1
  74. package/dist/collection/store/grw-trek-provider.js +8 -4
  75. package/dist/collection/store/grw-trek-provider.js.br +0 -0
  76. package/dist/collection/store/grw-trek-provider.js.gz +0 -0
  77. package/dist/collection/store/grw-trek-provider.js.map +1 -1
  78. package/dist/collection/store/store.js +1 -0
  79. package/dist/collection/store/store.js.br +0 -0
  80. package/dist/collection/store/store.js.gz +0 -0
  81. package/dist/collection/store/store.js.map +1 -1
  82. package/dist/collection/types/types.js.map +1 -1
  83. package/dist/collection/utils/utils.js +4 -1
  84. package/dist/collection/utils/utils.js.br +0 -0
  85. package/dist/collection/utils/utils.js.gz +0 -0
  86. package/dist/collection/utils/utils.js.map +1 -1
  87. package/dist/esm/geotrek-rando-widget.js +1 -1
  88. package/dist/esm/geotrek-rando-widget.js.br +0 -0
  89. package/dist/esm/geotrek-rando-widget.js.gz +0 -0
  90. package/dist/esm/grw-app_28.entry.js +572 -85
  91. package/dist/esm/grw-app_28.entry.js.br +0 -0
  92. package/dist/esm/grw-app_28.entry.js.gz +0 -0
  93. package/dist/esm/grw-app_28.entry.js.map +1 -1
  94. package/dist/esm/loader.js +1 -1
  95. package/dist/esm/loader.js.br +0 -0
  96. package/dist/esm/loader.js.gz +0 -0
  97. package/dist/esm-es5/geotrek-rando-widget.js +1 -1
  98. package/dist/esm-es5/geotrek-rando-widget.js.br +0 -0
  99. package/dist/esm-es5/geotrek-rando-widget.js.gz +0 -0
  100. package/dist/esm-es5/geotrek-rando-widget.js.map +1 -1
  101. package/dist/esm-es5/grw-app_28.entry.js +4 -4
  102. package/dist/esm-es5/grw-app_28.entry.js.br +0 -0
  103. package/dist/esm-es5/grw-app_28.entry.js.gz +0 -0
  104. package/dist/esm-es5/grw-app_28.entry.js.map +1 -1
  105. package/dist/esm-es5/loader.js +1 -1
  106. package/dist/esm-es5/loader.js.br +0 -0
  107. package/dist/esm-es5/loader.js.gz +0 -0
  108. package/dist/esm-es5/loader.js.map +1 -1
  109. package/dist/geotrek-rando-widget/assets/parking.svg +5 -0
  110. package/dist/geotrek-rando-widget/assets/parking.svg.br +0 -0
  111. package/dist/geotrek-rando-widget/assets/parking.svg.gz +0 -0
  112. package/dist/geotrek-rando-widget/geotrek-rando-widget.esm.js +1 -1
  113. package/dist/geotrek-rando-widget/geotrek-rando-widget.esm.js.br +0 -0
  114. package/dist/geotrek-rando-widget/geotrek-rando-widget.esm.js.gz +0 -0
  115. package/dist/geotrek-rando-widget/geotrek-rando-widget.esm.js.map +1 -1
  116. package/dist/geotrek-rando-widget/{p-37932796.entry.js → p-675fb39a.entry.js} +5 -5
  117. package/dist/geotrek-rando-widget/p-675fb39a.entry.js.br +0 -0
  118. package/dist/geotrek-rando-widget/p-675fb39a.entry.js.gz +0 -0
  119. package/dist/geotrek-rando-widget/p-675fb39a.entry.js.map +1 -0
  120. package/dist/geotrek-rando-widget/p-cdb81098.system.entry.js +15 -0
  121. package/dist/geotrek-rando-widget/p-cdb81098.system.entry.js.br +0 -0
  122. package/dist/geotrek-rando-widget/p-cdb81098.system.entry.js.gz +0 -0
  123. package/dist/geotrek-rando-widget/p-cdb81098.system.entry.js.map +1 -0
  124. package/dist/geotrek-rando-widget/p-cea4d6a2.system.js +1 -1
  125. package/dist/geotrek-rando-widget/p-cea4d6a2.system.js.br +0 -0
  126. package/dist/geotrek-rando-widget/p-cea4d6a2.system.js.gz +0 -0
  127. package/dist/geotrek-rando-widget/p-cea4d6a2.system.js.map +1 -1
  128. package/dist/types/components/grw-app/grw-app.d.ts +1 -0
  129. package/dist/types/components/grw-map/grw-map.d.ts +1 -0
  130. package/dist/types/components/grw-trek-detail/grw-trek-detail.d.ts +26 -1
  131. package/dist/types/components.d.ts +4 -0
  132. package/dist/types/i18n/i18n.d.ts +5 -2
  133. package/dist/types/store/store.d.ts +3 -1
  134. package/dist/types/types/types.d.ts +21 -1
  135. package/dist/types/utils/utils.d.ts +1 -0
  136. package/package.json +2 -1
  137. package/dist/collection/components/grw-touristic-content/grw-touristic-content-card.css.br +0 -0
  138. package/dist/collection/components/grw-touristic-content/grw-touristic-content-card.css.gz +0 -0
  139. package/dist/collection/components/grw-touristic-content/grw-touristic-content-card.js.map +0 -1
  140. package/dist/collection/components/grw-touristic-event/grw-touristic-event-card.css.br +0 -0
  141. package/dist/collection/components/grw-touristic-event/grw-touristic-event-card.js.map +0 -1
  142. package/dist/geotrek-rando-widget/p-37932796.entry.js.br +0 -0
  143. package/dist/geotrek-rando-widget/p-37932796.entry.js.gz +0 -0
  144. package/dist/geotrek-rando-widget/p-37932796.entry.js.map +0 -1
  145. package/dist/geotrek-rando-widget/p-46c11f88.system.entry.js +0 -15
  146. package/dist/geotrek-rando-widget/p-46c11f88.system.entry.js.br +0 -0
  147. package/dist/geotrek-rando-widget/p-46c11f88.system.entry.js.gz +0 -0
  148. package/dist/geotrek-rando-widget/p-46c11f88.system.entry.js.map +0 -1
  149. /package/dist/collection/components/{grw-touristic-content → grw-touristic-content-card}/grw-touristic-content-card.js +0 -0
  150. /package/dist/collection/components/{grw-touristic-content → grw-touristic-content-card}/grw-touristic-content-card.js.br +0 -0
  151. /package/dist/collection/components/{grw-touristic-content → grw-touristic-content-card}/grw-touristic-content-card.js.gz +0 -0
  152. /package/dist/collection/components/{grw-touristic-event → grw-touristic-event-card}/grw-touristic-event-card.js +0 -0
  153. /package/dist/collection/components/{grw-touristic-event → grw-touristic-event-card}/grw-touristic-event-card.js.br +0 -0
  154. /package/dist/collection/components/{grw-touristic-event → grw-touristic-event-card}/grw-touristic-event-card.js.gz +0 -0
  155. /package/dist/types/components/{grw-touristic-content → grw-touristic-content-card}/grw-touristic-content-card.d.ts +0 -0
  156. /package/dist/types/components/{grw-touristic-event → grw-touristic-event-card}/grw-touristic-event-card.d.ts +0 -0
@@ -42,7 +42,7 @@ export class GrwTrekProvider {
42
42
  requests.push(!state.ratings ? fetch(`${state.api}trek_ratingscale/?language=${state.language}&fields=id,name`, this.init) : new Response('null'));
43
43
  Promise.all([
44
44
  ...requests,
45
- fetch(`${this.api}sensitivearea/?language=${state.language}&published=true&trek=${this.trekId}&fields=id,geometry,name,description,contact,info_url,period,practices`, this.init)
45
+ fetch(`${this.api}sensitivearea/?language=${state.language}&published=true&trek=${this.trekId}&period=ignore&fields=id,geometry,name,description,contact,info_url,period,practices`, this.init)
46
46
  .then(response => {
47
47
  if (response.ok) {
48
48
  return response;
@@ -64,10 +64,11 @@ export class GrwTrekProvider {
64
64
  fetch(`${state.api}touristiccontent_category/?language=${state.language}&published=true&fields=id,label,pictogram&page_size=999`, this.init),
65
65
  fetch(`${state.api}touristicevent/?language=${state.language}&near_trek=${this.trekId}&published=true&fields=id,name,attachments,type,geometry&page_size=999`, this.init),
66
66
  fetch(`${state.api}touristicevent_type/?language=${state.language}&published=true&fields=id,type,pictogram&page_size=999`, this.init),
67
- fetch(`${state.api}trek/${this.trekId}/?language=${state.language}&published=true&fields=id,name,attachments,description,description_teaser,difficulty,duration,ascent,length_2d,practice,themes,route,geometry,gpx,kml,pdf,parking_location,departure,departure_city,arrival,cities,ambiance,access,public_transport,advice,advised_parking,gear,labels,source,points_reference,disabled_infrastructure,accessibility_level,accessibility_slope,accessibility_width,accessibility_signage,accessibility_covering,accessibility_exposure,accessibility_advice,accessibilities,ratings,ratings_description,information_desks,children`, this.init),
67
+ fetch(`${state.api}trek_network/?language=${state.language}&published=true&fields=id,label,pictogram&page_size=999`, this.init),
68
+ fetch(`${state.api}trek/${this.trekId}/?language=${state.language}&published=true&fields=id,name,attachments,description,description_teaser,difficulty,duration,ascent,descent,length_2d,practice,themes,route,geometry,gpx,kml,pdf,parking_location,departure,departure_city,arrival,cities,ambiance,access,public_transport,advice,advised_parking,gear,labels,source,points_reference,disabled_infrastructure,accessibility_level,accessibility_slope,accessibility_width,accessibility_signage,accessibility_covering,accessibility_exposure,accessibility_advice,accessibilities,ratings,ratings_description,information_desks,children,networks,web_links`, this.init),
68
69
  ])
69
70
  .then(responses => Promise.all(responses.map(response => response.json())))
70
- .then(async ([difficulties, routes, practices, themes, cities, accessibilities, ratings, ratingsScale, sensitiveAreas, labels, sources, accessibilitiesLevel, pois, poiTypes, informationDesks, touristicContent, touristicContentCategory, touristicEvent, touristicEventType, trek,]) => {
71
+ .then(async ([difficulties, routes, practices, themes, cities, accessibilities, ratings, ratingsScale, sensitiveAreas, labels, sources, accessibilitiesLevel, pois, poiTypes, informationDesks, touristicContent, touristicContentCategory, touristicEvent, touristicEventType, networks, trek,]) => {
71
72
  state.trekNetworkError = false;
72
73
  if (trek.children.length > 0 || state.parentTrekId) {
73
74
  const steps = [];
@@ -83,7 +84,7 @@ export class GrwTrekProvider {
83
84
  }
84
85
  const stepRequests = [];
85
86
  steps.forEach(stepId => {
86
- stepRequests.push(fetch(`${state.api}trek/${stepId}/?language=${state.language}&published=true&fields=id,name,attachments,description_teaser,difficulty,duration,ascent,length_2d,practice,themes,route,departure,departure_city,departure_geom,cities,accessibilities,labels,districts`));
87
+ stepRequests.push(fetch(`${state.api}trek/${stepId}/?language=${state.language}&published=true&fields=id,name,attachments,description_teaser,difficulty,duration,ascent,descent,length_2d,practice,themes,route,departure,departure_city,departure_geom,cities,accessibilities,labels,districts,networks,web_links`));
87
88
  });
88
89
  state.currentTrekSteps = await Promise.all([...stepRequests]).then(responses => Promise.all(responses.map(response => response.json())));
89
90
  }
@@ -131,6 +132,9 @@ export class GrwTrekProvider {
131
132
  if (touristicEventType) {
132
133
  state.touristicEventTypes = touristicEventType.results;
133
134
  }
135
+ if (networks) {
136
+ state.networks = networks.results;
137
+ }
134
138
  state.currentPois = pois.results;
135
139
  state.poiTypes = poiTypes.results;
136
140
  state.currentInformationDesks = informationDesks.results;
@@ -1 +1 @@
1
- {"version":3,"file":"grw-trek-provider.js","sourceRoot":"","sources":["../../src/store/grw-trek-provider.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,SAAS,EAAE,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;AAChE,OAAO,KAAK,MAAM,aAAa,CAAC;AAMhC,MAAM,OAAO,eAAe;;IAM1B,eAAU,GAAG,IAAI,eAAe,EAAE,CAAC;IACnC,WAAM,GAAG,IAAI,CAAC,UAAU,CAAC,MAAM,CAAC;IAChC,SAAI,GAAgB,EAAE,KAAK,EAAE,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,aAAa,CAAC,CAAC,CAAC,SAAS,EAAE,MAAM,EAAE,IAAI,CAAC,MAAM,EAA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,GAAG,OAAO,CAAC,OAAO,CAAC;MAChC,IAAI,oBAAoB,EAAE;QACxB,KAAK,CAAC,oBAAoB,GAAG,oBAAoB,CAAC,OAAO,CAAC;OAC3D;MACD,IAAI,gBAAgB,EAAE;QACpB,KAAK,CAAC,qBAAqB,GAAG,gBAAgB,CAAC,OAAO,CAAC;OACxD;MACD,IAAI,wBAAwB,EAAE;QAC5B,KAAK,CAAC,0BAA0B,GAAG,wBAAwB,CAAC,OAAO,CAAC;OACrE;MACD,IAAI,cAAc,EAAE;QAClB,KAAK,CAAC,eAAe,GAAG,cAAc,CAAC,OAAO,CAAC;OAChD;MACD,IAAI,kBAAkB,EAAE;QACtB,KAAK,CAAC,mBAAmB,GAAG,kBAAkB,CAAC,OAAO,CAAC;OACxD;MACD,KAAK,CAAC,WAAW,GAAG,IAAI,CAAC,OAAO,CAAC;MACjC,KAAK,CAAC,QAAQ,GAAG,QAAQ,CAAC,OAAO,CAAC;MAClC,KAAK,CAAC,uBAAuB,GAAG,gBAAgB,CAAC,OAAO,CAAC;MACzD,KAAK,CAAC,WAAW,GAAG,IAAI,CAAC;IAC3B,CAAC,CACF;OACA,KAAK,CAAC,GAAG,EAAE;MACV,KAAK,CAAC,gBAAgB,GAAG,IAAI,CAAC;IAChC,CAAC,CAAC,CAAC;EACP,CAAC;EAED,oBAAoB;IAClB,IAAI,CAAC,UAAU,CAAC,KAAK,EAAE,CAAC;IACxB,KAAK,CAAC,gBAAgB,GAAG,KAAK,CAAC;EACjC,CAAC;EAED,MAAM;IACJ,OAAO,EAAC,IAAI,OAAQ,CAAC;EACvB,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Build, Component, h, Host, Prop } from '@stencil/core';\nimport state from 'store/store';\n\n@Component({\n tag: 'grw-trek-provider',\n shadow: true,\n})\nexport class GrwTrekProvider {\n @Prop() languages = 'fr';\n @Prop() api: string;\n @Prop() trekId: string;\n @Prop() portals: string;\n\n controller = new AbortController();\n signal = this.controller.signal;\n init: RequestInit = { cache: Build.isDev ? 'force-cache' : 'default', signal: this.signal };\n\n connectedCallback() {\n if (!state.api) {\n state.api = this.api;\n state.languages = this.languages.split(',');\n state.language = state.languages[0];\n }\n this.handleTrek();\n }\n\n handleTrek() {\n const requests = [];\n requests.push(\n !state.difficulties\n ? fetch(`${state.api}trek_difficulty/?language=${state.language}${this.portals ? '&portals='.concat(this.portals) : ''}&fields=id,label,pictogram`, this.init)\n : new Response('null'),\n );\n requests.push(\n !state.routes\n ? fetch(`${state.api}trek_route/?language=${state.language}${this.portals ? '&portals='.concat(this.portals) : ''}&fields=id,route,pictogram`, this.init)\n : new Response('null'),\n );\n requests.push(\n !state.practices\n ? fetch(`${state.api}trek_practice/?language=${state.language}${this.portals ? '&portals='.concat(this.portals) : ''}&fields=id,name,pictogram`, this.init)\n : new Response('null'),\n );\n requests.push(\n !state.themes\n ? fetch(`${state.api}theme/?language=${state.language}${this.portals ? '&portals='.concat(this.portals) : ''}&fields=id,label,pictogram`, this.init)\n : new Response('null'),\n );\n requests.push(!state.cities ? fetch(`${state.api}city/?language=${state.language}&fields=id,name&published=true&page_size=999`, this.init) : new Response('null'));\n requests.push(\n !state.accessibilities\n ? fetch(`${state.api}trek_accessibility/?language=${state.language}${this.portals ? '&portals='.concat(this.portals) : ''}&fields=id,name,pictogram`, this.init)\n : new Response('null'),\n );\n requests.push(\n !state.ratings\n ? fetch(`${state.api}trek_rating/?language=${state.language}${this.portals ? '&portals='.concat(this.portals) : ''}&fields=id,name,scale`, this.init)\n : new Response('null'),\n );\n requests.push(!state.ratings ? fetch(`${state.api}trek_ratingscale/?language=${state.language}&fields=id,name`, this.init) : new Response('null'));\n\n Promise.all([\n ...requests,\n fetch(\n `${this.api}sensitivearea/?language=${state.language}&published=true&trek=${this.trekId}&fields=id,geometry,name,description,contact,info_url,period,practices`,\n this.init,\n )\n .then(response => {\n if (response.ok) {\n return response;\n } else {\n throw new Error('Sentive area error');\n }\n })\n .catch(() => {\n return new Response('null');\n }),\n fetch(`${state.api}label/?language=${state.language}&fields=id,name,advice,pictogram`, this.init),\n fetch(`${state.api}source/?language=${state.language}&fields=id,name,website,pictogram`, this.init),\n fetch(`${state.api}trek_accessibility_level/?language=${state.language}&fields=id,name`, this.init).catch(() => new Response('null')),\n fetch(`${state.api}poi/?language=${state.language}&trek=${this.trekId}&published=true&fields=id,name,description,attachments,type,geometry&page_size=999`, this.init),\n fetch(`${state.api}poi_type/?language=${state.language}&fields=id,pictogram`, this.init),\n fetch(\n `${state.api}informationdesk/?language=${state.language}&fields=id,name,description,type,phone,email,website,municipality,postal_code,street,photo_url,latitude,longitude&page_size=999`,\n this.init,\n ),\n fetch(\n `${state.api}touristiccontent/?language=${state.language}&near_trek=${this.trekId}&published=true&fields=id,name,attachments,category,geometry&page_size=999`,\n this.init,\n ),\n fetch(`${state.api}touristiccontent_category/?language=${state.language}&published=true&fields=id,label,pictogram&page_size=999`, this.init),\n fetch(`${state.api}touristicevent/?language=${state.language}&near_trek=${this.trekId}&published=true&fields=id,name,attachments,type,geometry&page_size=999`, this.init),\n fetch(`${state.api}touristicevent_type/?language=${state.language}&published=true&fields=id,type,pictogram&page_size=999`, this.init),\n fetch(\n `${state.api}trek/${this.trekId}/?language=${state.language}&published=true&fields=id,name,attachments,description,description_teaser,difficulty,duration,ascent,length_2d,practice,themes,route,geometry,gpx,kml,pdf,parking_location,departure,departure_city,arrival,cities,ambiance,access,public_transport,advice,advised_parking,gear,labels,source,points_reference,disabled_infrastructure,accessibility_level,accessibility_slope,accessibility_width,accessibility_signage,accessibility_covering,accessibility_exposure,accessibility_advice,accessibilities,ratings,ratings_description,information_desks,children`,\n this.init,\n ),\n ])\n .then(responses => Promise.all(responses.map(response => response.json())))\n .then(\n async ([\n difficulties,\n routes,\n practices,\n themes,\n cities,\n accessibilities,\n ratings,\n ratingsScale,\n sensitiveAreas,\n labels,\n sources,\n accessibilitiesLevel,\n pois,\n poiTypes,\n informationDesks,\n touristicContent,\n touristicContentCategory,\n touristicEvent,\n touristicEventType,\n trek,\n ]) => {\n state.trekNetworkError = false;\n\n if (trek.children.length > 0 || state.parentTrekId) {\n const steps: number[] = [];\n if (trek.children.length > 0) {\n state.parentTrekId = trek.id;\n state.parentTrek = trek;\n steps.push(...trek.children);\n } else {\n const parentTrek = await fetch(`${state.api}trek/${state.parentTrekId}/?language=${state.language}&published=true&fields=name,children`).then(response =>\n response.json(),\n );\n state.parentTrek = parentTrek;\n steps.push(...parentTrek.children);\n }\n const stepRequests = [];\n steps.forEach(stepId => {\n stepRequests.push(\n fetch(\n `${state.api}trek/${stepId}/?language=${state.language}&published=true&fields=id,name,attachments,description_teaser,difficulty,duration,ascent,length_2d,practice,themes,route,departure,departure_city,departure_geom,cities,accessibilities,labels,districts`,\n ),\n );\n });\n state.currentTrekSteps = await Promise.all([...stepRequests]).then(responses => Promise.all(responses.map(response => response.json())));\n }\n\n if (difficulties) {\n state.difficulties = difficulties.results;\n }\n if (routes) {\n state.routes = routes.results;\n }\n if (practices) {\n state.practices = practices.results.map(practice => ({ ...practice, selected: false }));\n }\n if (themes) {\n state.themes = themes.results;\n }\n if (cities) {\n state.cities = cities.results;\n }\n\n if (accessibilities) {\n state.accessibilities = accessibilities.results;\n }\n\n if (ratings) {\n state.ratings = ratings.results;\n }\n\n if (ratingsScale) {\n state.ratingsScale = ratingsScale.results;\n }\n\n if (sensitiveAreas) {\n state.currentSensitiveAreas = sensitiveAreas.results;\n }\n state.labels = labels.results;\n state.sources = sources.results;\n if (accessibilitiesLevel) {\n state.accessibilitiesLevel = accessibilitiesLevel.results;\n }\n if (touristicContent) {\n state.trekTouristicContents = touristicContent.results;\n }\n if (touristicContentCategory) {\n state.touristicContentCategories = touristicContentCategory.results;\n }\n if (touristicEvent) {\n state.touristicEvents = touristicEvent.results;\n }\n if (touristicEventType) {\n state.touristicEventTypes = touristicEventType.results;\n }\n state.currentPois = pois.results;\n state.poiTypes = poiTypes.results;\n state.currentInformationDesks = informationDesks.results;\n state.currentTrek = trek;\n },\n )\n .catch(() => {\n state.trekNetworkError = true;\n });\n }\n\n disconnectedCallback() {\n this.controller.abort();\n state.trekNetworkError = false;\n }\n\n render() {\n return <Host></Host>;\n }\n}\n"]}
1
+ {"version":3,"file":"grw-trek-provider.js","sourceRoot":"","sources":["../../src/store/grw-trek-provider.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,SAAS,EAAE,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;AAChE,OAAO,KAAK,MAAM,aAAa,CAAC;AAMhC,MAAM,OAAO,eAAe;;IAM1B,eAAU,GAAG,IAAI,eAAe,EAAE,CAAC;IACnC,WAAM,GAAG,IAAI,CAAC,UAAU,CAAC,MAAM,CAAC;IAChC,SAAI,GAAgB,EAAE,KAAK,EAAE,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,aAAa,CAAC,CAAC,CAAC,SAAS,EAAE,MAAM,EAAE,IAAI,CAAC,MAAM,EAAE,CAAC;qBAPxE,IAAI;;;;;EASxB,iBAAiB;IACf,IAAI,CAAC,KAAK,CAAC,GAAG,EAAE;MACd,KAAK,CAAC,GAAG,GAAG,IAAI,CAAC,GAAG,CAAC;MACrB,KAAK,CAAC,SAAS,GAAG,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;MAC5C,KAAK,CAAC,QAAQ,GAAG,KAAK,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC;KACrC;IACD,IAAI,CAAC,UAAU,EAAE,CAAC;EACpB,CAAC;EAED,UAAU;IACR,MAAM,QAAQ,GAAG,EAAE,CAAC;IACpB,QAAQ,CAAC,IAAI,CACX,CAAC,KAAK,CAAC,YAAY;MACjB,CAAC,CAAC,KAAK,CAAC,GAAG,KAAK,CAAC,GAAG,6BAA6B,KAAK,CAAC,QAAQ,GAAG,IAAI,CAAC,OAAO,CAAC,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,GAAG,kBAAkB,CAAC,OAAO,CAAC;OACxD;MACD,IAAI,QAAQ,EAAE;QACZ,KAAK,CAAC,QAAQ,GAAG,QAAQ,CAAC,OAAO,CAAC;OACnC;MACD,KAAK,CAAC,WAAW,GAAG,IAAI,CAAC,OAAO,CAAC;MACjC,KAAK,CAAC,QAAQ,GAAG,QAAQ,CAAC,OAAO,CAAC;MAClC,KAAK,CAAC,uBAAuB,GAAG,gBAAgB,CAAC,OAAO,CAAC;MACzD,KAAK,CAAC,WAAW,GAAG,IAAI,CAAC;IAC3B,CAAC,CACF;OACA,KAAK,CAAC,GAAG,EAAE;MACV,KAAK,CAAC,gBAAgB,GAAG,IAAI,CAAC;IAChC,CAAC,CAAC,CAAC;EACP,CAAC;EAED,oBAAoB;IAClB,IAAI,CAAC,UAAU,CAAC,KAAK,EAAE,CAAC;IACxB,KAAK,CAAC,gBAAgB,GAAG,KAAK,CAAC;EACjC,CAAC;EAED,MAAM;IACJ,OAAO,EAAC,IAAI,OAAQ,CAAC;EACvB,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Build, Component, h, Host, Prop } from '@stencil/core';\nimport state from 'store/store';\n\n@Component({\n tag: 'grw-trek-provider',\n shadow: true,\n})\nexport class GrwTrekProvider {\n @Prop() languages = 'fr';\n @Prop() api: string;\n @Prop() trekId: string;\n @Prop() portals: string;\n\n controller = new AbortController();\n signal = this.controller.signal;\n init: RequestInit = { cache: Build.isDev ? 'force-cache' : 'default', signal: this.signal };\n\n connectedCallback() {\n if (!state.api) {\n state.api = this.api;\n state.languages = this.languages.split(',');\n state.language = state.languages[0];\n }\n this.handleTrek();\n }\n\n handleTrek() {\n const requests = [];\n requests.push(\n !state.difficulties\n ? fetch(`${state.api}trek_difficulty/?language=${state.language}${this.portals ? '&portals='.concat(this.portals) : ''}&fields=id,label,pictogram`, this.init)\n : new Response('null'),\n );\n requests.push(\n !state.routes\n ? fetch(`${state.api}trek_route/?language=${state.language}${this.portals ? '&portals='.concat(this.portals) : ''}&fields=id,route,pictogram`, this.init)\n : new Response('null'),\n );\n requests.push(\n !state.practices\n ? fetch(`${state.api}trek_practice/?language=${state.language}${this.portals ? '&portals='.concat(this.portals) : ''}&fields=id,name,pictogram`, this.init)\n : new Response('null'),\n );\n requests.push(\n !state.themes\n ? fetch(`${state.api}theme/?language=${state.language}${this.portals ? '&portals='.concat(this.portals) : ''}&fields=id,label,pictogram`, this.init)\n : new Response('null'),\n );\n requests.push(!state.cities ? fetch(`${state.api}city/?language=${state.language}&fields=id,name&published=true&page_size=999`, this.init) : new Response('null'));\n requests.push(\n !state.accessibilities\n ? fetch(`${state.api}trek_accessibility/?language=${state.language}${this.portals ? '&portals='.concat(this.portals) : ''}&fields=id,name,pictogram`, this.init)\n : new Response('null'),\n );\n requests.push(\n !state.ratings\n ? fetch(`${state.api}trek_rating/?language=${state.language}${this.portals ? '&portals='.concat(this.portals) : ''}&fields=id,name,scale`, this.init)\n : new Response('null'),\n );\n requests.push(!state.ratings ? fetch(`${state.api}trek_ratingscale/?language=${state.language}&fields=id,name`, this.init) : new Response('null'));\n\n Promise.all([\n ...requests,\n fetch(\n `${this.api}sensitivearea/?language=${state.language}&published=true&trek=${this.trekId}&period=ignore&fields=id,geometry,name,description,contact,info_url,period,practices`,\n this.init,\n )\n .then(response => {\n if (response.ok) {\n return response;\n } else {\n throw new Error('Sentive area error');\n }\n })\n .catch(() => {\n return new Response('null');\n }),\n fetch(`${state.api}label/?language=${state.language}&fields=id,name,advice,pictogram`, this.init),\n fetch(`${state.api}source/?language=${state.language}&fields=id,name,website,pictogram`, this.init),\n fetch(`${state.api}trek_accessibility_level/?language=${state.language}&fields=id,name`, this.init).catch(() => new Response('null')),\n fetch(`${state.api}poi/?language=${state.language}&trek=${this.trekId}&published=true&fields=id,name,description,attachments,type,geometry&page_size=999`, this.init),\n fetch(`${state.api}poi_type/?language=${state.language}&fields=id,pictogram`, this.init),\n fetch(\n `${state.api}informationdesk/?language=${state.language}&fields=id,name,description,type,phone,email,website,municipality,postal_code,street,photo_url,latitude,longitude&page_size=999`,\n this.init,\n ),\n fetch(\n `${state.api}touristiccontent/?language=${state.language}&near_trek=${this.trekId}&published=true&fields=id,name,attachments,category,geometry&page_size=999`,\n this.init,\n ),\n fetch(`${state.api}touristiccontent_category/?language=${state.language}&published=true&fields=id,label,pictogram&page_size=999`, this.init),\n fetch(`${state.api}touristicevent/?language=${state.language}&near_trek=${this.trekId}&published=true&fields=id,name,attachments,type,geometry&page_size=999`, this.init),\n fetch(`${state.api}touristicevent_type/?language=${state.language}&published=true&fields=id,type,pictogram&page_size=999`, this.init),\n fetch(`${state.api}trek_network/?language=${state.language}&published=true&fields=id,label,pictogram&page_size=999`, this.init),\n fetch(\n `${state.api}trek/${this.trekId}/?language=${state.language}&published=true&fields=id,name,attachments,description,description_teaser,difficulty,duration,ascent,descent,length_2d,practice,themes,route,geometry,gpx,kml,pdf,parking_location,departure,departure_city,arrival,cities,ambiance,access,public_transport,advice,advised_parking,gear,labels,source,points_reference,disabled_infrastructure,accessibility_level,accessibility_slope,accessibility_width,accessibility_signage,accessibility_covering,accessibility_exposure,accessibility_advice,accessibilities,ratings,ratings_description,information_desks,children,networks,web_links`,\n this.init,\n ),\n ])\n .then(responses => Promise.all(responses.map(response => response.json())))\n .then(\n async ([\n difficulties,\n routes,\n practices,\n themes,\n cities,\n accessibilities,\n ratings,\n ratingsScale,\n sensitiveAreas,\n labels,\n sources,\n accessibilitiesLevel,\n pois,\n poiTypes,\n informationDesks,\n touristicContent,\n touristicContentCategory,\n touristicEvent,\n touristicEventType,\n networks,\n trek,\n ]) => {\n state.trekNetworkError = false;\n if (trek.children.length > 0 || state.parentTrekId) {\n const steps: number[] = [];\n if (trek.children.length > 0) {\n state.parentTrekId = trek.id;\n state.parentTrek = trek;\n steps.push(...trek.children);\n } else {\n const parentTrek = await fetch(`${state.api}trek/${state.parentTrekId}/?language=${state.language}&published=true&fields=name,children`).then(response =>\n response.json(),\n );\n state.parentTrek = parentTrek;\n steps.push(...parentTrek.children);\n }\n const stepRequests = [];\n steps.forEach(stepId => {\n stepRequests.push(\n fetch(\n `${state.api}trek/${stepId}/?language=${state.language}&published=true&fields=id,name,attachments,description_teaser,difficulty,duration,ascent,descent,length_2d,practice,themes,route,departure,departure_city,departure_geom,cities,accessibilities,labels,districts,networks,web_links`,\n ),\n );\n });\n state.currentTrekSteps = await Promise.all([...stepRequests]).then(responses => Promise.all(responses.map(response => response.json())));\n }\n\n if (difficulties) {\n state.difficulties = difficulties.results;\n }\n if (routes) {\n state.routes = routes.results;\n }\n if (practices) {\n state.practices = practices.results.map(practice => ({ ...practice, selected: false }));\n }\n if (themes) {\n state.themes = themes.results;\n }\n if (cities) {\n state.cities = cities.results;\n }\n\n if (accessibilities) {\n state.accessibilities = accessibilities.results;\n }\n\n if (ratings) {\n state.ratings = ratings.results;\n }\n\n if (ratingsScale) {\n state.ratingsScale = ratingsScale.results;\n }\n\n if (sensitiveAreas) {\n state.currentSensitiveAreas = sensitiveAreas.results;\n }\n state.labels = labels.results;\n state.sources = sources.results;\n if (accessibilitiesLevel) {\n state.accessibilitiesLevel = accessibilitiesLevel.results;\n }\n if (touristicContent) {\n state.trekTouristicContents = touristicContent.results;\n }\n if (touristicContentCategory) {\n state.touristicContentCategories = touristicContentCategory.results;\n }\n if (touristicEvent) {\n state.touristicEvents = touristicEvent.results;\n }\n if (touristicEventType) {\n state.touristicEventTypes = touristicEventType.results;\n }\n if (networks) {\n state.networks = networks.results;\n }\n state.currentPois = pois.results;\n state.poiTypes = poiTypes.results;\n state.currentInformationDesks = informationDesks.results;\n state.currentTrek = trek;\n },\n )\n .catch(() => {\n state.trekNetworkError = true;\n });\n }\n\n disconnectedCallback() {\n this.controller.abort();\n state.trekNetworkError = false;\n }\n\n render() {\n return <Host></Host>;\n }\n}\n"]}
@@ -52,6 +52,7 @@ const { state, onChange, reset } = createStore({
52
52
  currentTouristicEvent: null,
53
53
  selectedTouristicContentId: null,
54
54
  selectedTouristicEventId: null,
55
+ networks: null,
55
56
  });
56
57
  export { onChange, reset };
57
58
  export default state;
Binary file
Binary file
@@ -1 +1 @@
1
- {"version":3,"file":"store.js","sourceRoot":"","sources":["../../src/store/store.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAgC7C,MAAM,EAAE,KAAK,EAAE,QAAQ,EAAE,KAAK,EAAE,GAAG,WAAW,CAqD3C;EACD,IAAI,EAAE,IAAI;EACV,GAAG,EAAE,IAAI;EACT,SAAS,EAAE,IAAI;EACf,QAAQ,EAAE,IAAI;EACd,KAAK,EAAE,IAAI;EACX,YAAY,EAAE,IAAI;EAClB,iBAAiB,EAAE,IAAI;EACvB,gBAAgB,EAAE,IAAI;EACtB,YAAY,EAAE,IAAI;EAClB,MAAM,EAAE,IAAI;EACZ,SAAS,EAAE,IAAI;EACf,MAAM,EAAE,IAAI;EACZ,MAAM,EAAE,IAAI;EACZ,SAAS,EAAE,IAAI;EACf,OAAO,EAAE,IAAI;EACb,UAAU,EAAE,IAAI;EAChB,qBAAqB,EAAE,IAAI;EAC3B,MAAM,EAAE,IAAI;EACZ,SAAS,EAAE,IAAI;EACf,OAAO,EAAE,IAAI;EACb,OAAO,EAAE,IAAI;EACb,YAAY,EAAE,IAAI;EAClB,eAAe,EAAE,IAAI;EACrB,oBAAoB,EAAE,IAAI;EAC1B,QAAQ,EAAE,IAAI;EACd,WAAW,EAAE,IAAI;EACjB,WAAW,EAAE,IAAI;EACjB,uBAAuB,EAAE,IAAI;EAC7B,iBAAiB,EAAE,KAAK;EACxB,gBAAgB,EAAE,KAAK;EACvB,WAAW,EAAE,IAAI;EACjB,yBAAyB,EAAE,CAAC;EAC5B,qBAAqB,EAAE,CAAC;EACxB,uBAAuB,EAAE,CAAC;EAC1B,cAAc,EAAE,IAAI;EACpB,YAAY,EAAE,IAAI;EAClB,UAAU,EAAE,IAAI;EAChB,gBAAgB,EAAE,IAAI;EACtB,cAAc,EAAE,IAAI;EACpB,qBAAqB,EAAE,IAAI;EAC3B,iBAAiB,EAAE,IAAI;EACvB,wBAAwB,EAAE,IAAI;EAC9B,6BAA6B,EAAE,IAAI;EACnC,0BAA0B,EAAE,IAAI;EAChC,uBAAuB,EAAE,IAAI;EAC7B,eAAe,EAAE,IAAI;EACrB,sBAAsB,EAAE,IAAI;EAC5B,2BAA2B,EAAE,IAAI;EACjC,mBAAmB,EAAE,IAAI;EACzB,qBAAqB,EAAE,IAAI;EAC3B,0BAA0B,EAAE,IAAI;EAChC,wBAAwB,EAAE,IAAI;CAC/B,CAAC,CAAC;AAEH,OAAO,EAAE,QAAQ,EAAE,KAAK,EAAE,CAAC;AAE3B,eAAe,KAAK,CAAC","sourcesContent":["import { createStore } from '@stencil/store';\nimport { LatLngBounds } from 'leaflet';\nimport {\n Accessibilities,\n accessibilitiesLevel,\n Difficulties,\n Durations,\n InformationDesks,\n Labels,\n Pois,\n PoiTypes,\n Practices,\n Routes,\n SensitiveAreas,\n Sources,\n Themes,\n Cities,\n Trek,\n Treks,\n Lengths,\n Elevations,\n Districts,\n TouristicContents,\n TouristicContentCategories,\n TouristicContent,\n TouristicEvents,\n TouristicEventTypes,\n TouristicEvent,\n Ratings,\n RatingsScale,\n} from 'types/types';\n\nconst { state, onChange, reset } = createStore<{\n mode: string;\n api: string;\n languages: string[];\n language: string;\n treks: Treks;\n treksWithinBounds: Treks;\n currentMapBounds: LatLngBounds;\n currentTreks: Treks;\n difficulties: Difficulties;\n routes: Routes;\n practices: Practices;\n themes: Themes;\n cities: Cities;\n durations: Durations;\n lengths: Lengths;\n elevations: Elevations;\n labels: Labels;\n districts: Districts;\n sources: Sources;\n ratings: Ratings;\n ratingsScale: RatingsScale;\n accessibilities: Accessibilities;\n accessibilitiesLevel: accessibilitiesLevel;\n poiTypes: PoiTypes;\n currentTrek: Trek;\n currentSensitiveAreas: SensitiveAreas;\n currentPois: Pois;\n currentInformationDesks: InformationDesks;\n treksNetworkError: boolean;\n trekNetworkError: boolean;\n searchValue: string;\n selectedActivitiesFilters: number;\n selectedThemesFilters: number;\n selectedLocationFilters: number;\n selectedTrekId: number;\n parentTrekId: number;\n parentTrek: Trek;\n currentTrekSteps: Treks;\n selectedStepId: number;\n trekTouristicContents: TouristicContents;\n touristicContents: TouristicContents;\n currentTouristicContents: TouristicContents;\n touristicContentsWithinBounds: TouristicContents;\n touristicContentCategories: TouristicContentCategories;\n currentTouristicContent: TouristicContent;\n touristicEvents: TouristicEvents;\n currentTouristicEvents: TouristicEvents;\n touristicEventsWithinBounds: TouristicEvents;\n touristicEventTypes: TouristicEventTypes;\n currentTouristicEvent: TouristicEvent;\n selectedTouristicContentId: number;\n selectedTouristicEventId: number;\n}>({\n mode: null,\n api: null,\n languages: null,\n language: null,\n treks: null,\n currentTreks: null,\n treksWithinBounds: null,\n currentMapBounds: null,\n difficulties: null,\n routes: null,\n practices: null,\n themes: null,\n cities: null,\n durations: null,\n lengths: null,\n elevations: null,\n currentSensitiveAreas: null,\n labels: null,\n districts: null,\n sources: null,\n ratings: null,\n ratingsScale: null,\n accessibilities: null,\n accessibilitiesLevel: null,\n poiTypes: null,\n currentTrek: null,\n currentPois: null,\n currentInformationDesks: null,\n treksNetworkError: false,\n trekNetworkError: false,\n searchValue: null,\n selectedActivitiesFilters: 0,\n selectedThemesFilters: 0,\n selectedLocationFilters: 0,\n selectedTrekId: null,\n parentTrekId: null,\n parentTrek: null,\n currentTrekSteps: null,\n selectedStepId: null,\n trekTouristicContents: null,\n touristicContents: null,\n currentTouristicContents: null,\n touristicContentsWithinBounds: null,\n touristicContentCategories: null,\n currentTouristicContent: null,\n touristicEvents: null,\n currentTouristicEvents: null,\n touristicEventsWithinBounds: null,\n touristicEventTypes: null,\n currentTouristicEvent: null,\n selectedTouristicContentId: null,\n selectedTouristicEventId: null,\n});\n\nexport { onChange, reset };\n\nexport default state;\n"]}
1
+ {"version":3,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6B,EAAE,IAAI;EACnC,0BAA0B,EAAE,IAAI;EAChC,uBAAuB,EAAE,IAAI;EAC7B,eAAe,EAAE,IAAI;EACrB,sBAAsB,EAAE,IAAI;EAC5B,2BAA2B,EAAE,IAAI;EACjC,mBAAmB,EAAE,IAAI;EACzB,qBAAqB,EAAE,IAAI;EAC3B,0BAA0B,EAAE,IAAI;EAChC,wBAAwB,EAAE,IAAI;EAC9B,QAAQ,EAAE,IAAI;CACf,CAAC,CAAC;AAEH,OAAO,EAAE,QAAQ,EAAE,KAAK,EAAE,CAAC;AAE3B,eAAe,KAAK,CAAC","sourcesContent":["import { createStore } from '@stencil/store';\nimport { LatLngBounds } from 'leaflet';\nimport {\n Accessibilities,\n accessibilitiesLevel,\n Difficulties,\n Durations,\n InformationDesks,\n Labels,\n Pois,\n PoiTypes,\n Practices,\n Routes,\n SensitiveAreas,\n Sources,\n Themes,\n Cities,\n Trek,\n Treks,\n Lengths,\n Elevations,\n Districts,\n TouristicContents,\n TouristicContentCategories,\n TouristicContent,\n TouristicEvents,\n TouristicEventTypes,\n TouristicEvent,\n Ratings,\n RatingsScale,\n Networks,\n} from 'types/types';\n\nconst { state, onChange, reset } = createStore<{\n mode: string;\n api: string;\n languages: string[];\n language: string;\n treks: Treks;\n treksWithinBounds: Treks;\n currentMapBounds: LatLngBounds;\n currentTreks: Treks;\n difficulties: Difficulties;\n routes: Routes;\n practices: Practices;\n themes: Themes;\n cities: Cities;\n durations: Durations;\n lengths: Lengths;\n elevations: Elevations;\n labels: Labels;\n districts: Districts;\n sources: Sources;\n ratings: Ratings;\n ratingsScale: RatingsScale;\n accessibilities: Accessibilities;\n accessibilitiesLevel: accessibilitiesLevel;\n poiTypes: PoiTypes;\n currentTrek: Trek;\n currentSensitiveAreas: SensitiveAreas;\n currentPois: Pois;\n currentInformationDesks: InformationDesks;\n treksNetworkError: boolean;\n trekNetworkError: boolean;\n searchValue: string;\n selectedActivitiesFilters: number;\n selectedThemesFilters: number;\n selectedLocationFilters: number;\n selectedTrekId: number;\n parentTrekId: number;\n parentTrek: Trek;\n currentTrekSteps: Treks;\n selectedStepId: number;\n trekTouristicContents: TouristicContents;\n touristicContents: TouristicContents;\n currentTouristicContents: TouristicContents;\n touristicContentsWithinBounds: TouristicContents;\n touristicContentCategories: TouristicContentCategories;\n currentTouristicContent: TouristicContent;\n touristicEvents: TouristicEvents;\n currentTouristicEvents: TouristicEvents;\n touristicEventsWithinBounds: TouristicEvents;\n touristicEventTypes: TouristicEventTypes;\n currentTouristicEvent: TouristicEvent;\n selectedTouristicContentId: number;\n selectedTouristicEventId: number;\n networks: Networks;\n}>({\n mode: null,\n api: null,\n languages: null,\n language: null,\n treks: null,\n currentTreks: null,\n treksWithinBounds: null,\n currentMapBounds: null,\n difficulties: null,\n routes: null,\n practices: null,\n themes: null,\n cities: null,\n durations: null,\n lengths: null,\n elevations: null,\n currentSensitiveAreas: null,\n labels: null,\n districts: null,\n sources: null,\n ratings: null,\n ratingsScale: null,\n accessibilities: null,\n accessibilitiesLevel: null,\n poiTypes: null,\n currentTrek: null,\n currentPois: null,\n currentInformationDesks: null,\n treksNetworkError: false,\n trekNetworkError: false,\n searchValue: null,\n selectedActivitiesFilters: 0,\n selectedThemesFilters: 0,\n selectedLocationFilters: 0,\n selectedTrekId: null,\n parentTrekId: null,\n parentTrek: null,\n currentTrekSteps: null,\n selectedStepId: null,\n trekTouristicContents: null,\n touristicContents: null,\n currentTouristicContents: null,\n touristicContentsWithinBounds: null,\n touristicContentCategories: null,\n currentTouristicContent: null,\n touristicEvents: null,\n currentTouristicEvents: null,\n touristicEventsWithinBounds: null,\n touristicEventTypes: null,\n currentTouristicEvent: null,\n selectedTouristicContentId: null,\n selectedTouristicEventId: null,\n networks: null,\n});\n\nexport { onChange, reset };\n\nexport default state;\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/types/types.ts"],"names":[],"mappings":"","sourcesContent":["import { LineString, Geometry, Position, MultiPoint, Point } from 'geojson';\n\nexport type Treks = Trek[];\n\nexport type Trek = {\n id: number;\n name: string;\n attachments: Attachments;\n description?: string;\n description_teaser: string;\n difficulty: number;\n route: number;\n practice: number;\n themes: number[];\n duration: number;\n length_2d: number;\n ascent: number;\n departure: string;\n departure_city: string;\n arrival?: string;\n geometry?: LineString;\n departure_geom?: Position;\n gpx?: string;\n kml?: string;\n pdf?: string;\n parking_location?: Position;\n ambiance?: string;\n access?: string;\n public_transport?: string;\n advice?: string;\n advised_parking?: string;\n gear?: string;\n labels?: number[];\n points_reference?: MultiPoint;\n source?: number[];\n structure?: number;\n disabled_infrastructure?: string;\n accessibilities?: number[];\n accessibility_level?: number;\n accessibility_slope?: string;\n accessibility_width?: string;\n accessibility_signage?: string;\n accessibility_covering?: string;\n accessibility_exposure?: string;\n accessibility_advice?: string;\n cities?: string[];\n information_desks?: number[];\n children?: number[];\n ratings?: number[];\n ratings_description?: string;\n};\n\nexport type Attachments = Attachment[];\n\nexport type Attachment = {\n backend: string;\n type: string;\n author: string;\n thumbnail: string;\n legend: string;\n title: string;\n url: string;\n uuid: string;\n};\n\nexport type Difficulties = Difficulty[];\n\nexport type Difficulty = {\n id: number;\n label: string;\n pictogram: string;\n};\n\nexport type Routes = Route[];\n\nexport type Route = {\n id: number;\n route: string;\n pictogram: string;\n};\n\nexport type Practices = Practice[];\n\nexport type Practice = {\n id: number;\n name: string;\n pictogram: string;\n selected: boolean;\n};\n\nexport type Themes = Theme[];\n\nexport type Theme = {\n id: number;\n label: string;\n pictogram: string;\n};\n\nexport type Cities = City[];\n\nexport type City = {\n id: string;\n name: string;\n};\n\nexport type Labels = Label[];\n\nexport type Label = {\n id: number;\n name: string;\n advice: string;\n pictogram: string;\n};\n\nexport type Districts = District[];\n\nexport type District = {\n id: number;\n name: string;\n advice: string;\n pictogram: string;\n};\n\nexport type Sources = Source[];\n\nexport type Source = {\n id: number;\n name: string;\n website: string;\n pictogram: string;\n};\n\nexport type Accessibilities = Accessibility[];\n\nexport type Accessibility = {\n id: number;\n name: string;\n pictogram: string;\n};\n\nexport type accessibilitiesLevel = AccessibilityLevel[];\n\nexport type AccessibilityLevel = {\n id: number;\n name: string;\n};\n\nexport type Durations = Duration[];\n\nexport type Duration = {\n id: number;\n name: string;\n minValue: number;\n maxValue: number;\n selected: boolean;\n};\n\nexport type Lengths = Length[];\n\nexport type Length = {\n id: number;\n name: string;\n minValue: number;\n maxValue: number;\n selected: boolean;\n};\n\nexport type Elevations = Elevation[];\n\nexport type Elevation = {\n id: number;\n name: string;\n minValue: number;\n maxValue: number;\n selected: boolean;\n};\n\nexport type SensitiveAreas = SensitiveArea[];\n\nexport type SensitiveArea = {\n id: number;\n geometry: Geometry;\n name: string;\n description: string;\n contact: string;\n info_url: string;\n period: boolean[];\n practices: number[];\n};\n\nexport type Pois = Poi[];\n\nexport type Poi = {\n id: number;\n name: string;\n description: string;\n attachments: Attachments;\n type: number;\n geometry: Geometry;\n};\n\nexport type PoiTypes = PoiType[];\n\nexport type PoiType = {\n id: number;\n pictogram: string;\n};\n\nexport type InformationDesks = InformationDesk[];\n\nexport type InformationDesk = {\n id: number;\n name: string;\n description: string;\n type: InformationDeskType;\n phone: string;\n email: string;\n website: string;\n municipality: string;\n postal_code: string;\n street: string;\n photo_url: string;\n latitude: number;\n longitude: number;\n};\n\nexport type InformationDeskType = {\n id: number;\n label: string;\n pictogram: string;\n};\n\nexport type TouristicContent = {\n id: number;\n name: string;\n attachments: Attachments;\n description?: string;\n description_teaser?: string;\n practical_info?: string;\n category: number;\n geometry: Point;\n cities?: string[];\n source?: number[];\n pdf?: string;\n contact?: string;\n email?: string;\n website?: string;\n};\n\nexport type TouristicContents = TouristicContent[];\n\nexport type TouristicContentCategory = {\n id: number;\n label: string;\n pictogram: string;\n};\n\nexport type TouristicContentCategories = TouristicContentCategory[];\n\nexport type TouristicEvent = {\n id: number;\n name: string;\n attachments: Attachments;\n description?: string;\n description_teaser?: string;\n practical_info?: string;\n type: number;\n geometry: Point;\n cities?: string[];\n source?: number[];\n pdf?: string;\n contact?: string;\n email?: string;\n website?: string;\n begin_date?: string;\n end_date?: string;\n};\n\nexport type TouristicEvents = TouristicEvent[];\n\nexport type TouristicEventType = {\n id: number;\n type: string;\n pictogram: string;\n};\n\nexport type TouristicEventTypes = TouristicEventType[];\n\nexport type TrekFilters = TrekFilter[];\n\nexport type TrekFilter = { property: string; trekProperty: string; trekPropertyIsArray: boolean; type: string; segment: string };\n\nexport type TouristicContentsFilters = TouristicContentsFilter[];\n\nexport type TouristicContentsFilter = { property: string; touristicContentProperty: string; touristicContentPropertyIsArray: boolean; type: string; segment: string };\n\nexport type TouristicEventsFilters = TouristicEventsFilter[];\n\nexport type TouristicEventsFilter = { property: string; touristicEventProperty: string; touristicEventPropertyIsArray: boolean; type: string; segment: string };\n\nexport type Option = {\n visible: boolean;\n indicator: boolean;\n ref: string;\n};\n\nexport type Options = {\n presentation: Option;\n steps: Option;\n description: Option;\n recommendations: Option;\n sensitiveArea: Option;\n informationPlaces: Option;\n pois: Option;\n touristicContents: Option;\n touristicEvents: Option;\n};\n\nexport type Mode = 'treks' | 'touristicContents' | 'touristicEvents';\n\nexport type Ratings = Rating[];\n\nexport type Rating = {\n id: number;\n name: string;\n scale: number;\n};\n\nexport type RatingsScale = RatingScale[];\n\nexport type RatingScale = {\n id: number;\n name: string;\n};\n"]}
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/types/types.ts"],"names":[],"mappings":"","sourcesContent":["import { LineString, Geometry, Position, MultiPoint, Point } from 'geojson';\n\nexport type Treks = Trek[];\n\nexport type Trek = {\n id: number;\n name: string;\n attachments: Attachments;\n description?: string;\n description_teaser: string;\n difficulty: number;\n route: number;\n practice: number;\n themes: number[];\n duration: number;\n length_2d: number;\n ascent: number;\n descent: number;\n departure: string;\n departure_city: string;\n arrival?: string;\n geometry?: LineString;\n departure_geom?: Position;\n gpx?: string;\n kml?: string;\n pdf?: string;\n parking_location?: Position;\n ambiance?: string;\n access?: string;\n public_transport?: string;\n advice?: string;\n advised_parking?: string;\n gear?: string;\n labels?: number[];\n points_reference?: MultiPoint;\n source?: number[];\n structure?: number;\n disabled_infrastructure?: string;\n accessibilities?: number[];\n accessibility_level?: number;\n accessibility_slope?: string;\n accessibility_width?: string;\n accessibility_signage?: string;\n accessibility_covering?: string;\n accessibility_exposure?: string;\n accessibility_advice?: string;\n cities?: string[];\n information_desks?: number[];\n children?: number[];\n ratings?: number[];\n ratings_description?: string;\n networks: number[];\n web_links: Weblink[];\n};\n\nexport type Attachments = Attachment[];\n\nexport type Attachment = {\n backend: string;\n type: string;\n author: string;\n thumbnail: string;\n legend: string;\n title: string;\n url: string;\n uuid: string;\n};\n\nexport type Difficulties = Difficulty[];\n\nexport type Difficulty = {\n id: number;\n label: string;\n pictogram: string;\n};\n\nexport type Routes = Route[];\n\nexport type Route = {\n id: number;\n route: string;\n pictogram: string;\n};\n\nexport type Practices = Practice[];\n\nexport type Practice = {\n id: number;\n name: string;\n pictogram: string;\n selected: boolean;\n};\n\nexport type Themes = Theme[];\n\nexport type Theme = {\n id: number;\n label: string;\n pictogram: string;\n};\n\nexport type Cities = City[];\n\nexport type City = {\n id: string;\n name: string;\n};\n\nexport type Labels = Label[];\n\nexport type Label = {\n id: number;\n name: string;\n advice: string;\n pictogram: string;\n};\n\nexport type Districts = District[];\n\nexport type District = {\n id: number;\n name: string;\n advice: string;\n pictogram: string;\n};\n\nexport type Sources = Source[];\n\nexport type Source = {\n id: number;\n name: string;\n website: string;\n pictogram: string;\n};\n\nexport type Accessibilities = Accessibility[];\n\nexport type Accessibility = {\n id: number;\n name: string;\n pictogram: string;\n};\n\nexport type accessibilitiesLevel = AccessibilityLevel[];\n\nexport type AccessibilityLevel = {\n id: number;\n name: string;\n};\n\nexport type Durations = Duration[];\n\nexport type Duration = {\n id: number;\n name: string;\n minValue: number;\n maxValue: number;\n selected: boolean;\n};\n\nexport type Lengths = Length[];\n\nexport type Length = {\n id: number;\n name: string;\n minValue: number;\n maxValue: number;\n selected: boolean;\n};\n\nexport type Elevations = Elevation[];\n\nexport type Elevation = {\n id: number;\n name: string;\n minValue: number;\n maxValue: number;\n selected: boolean;\n};\n\nexport type SensitiveAreas = SensitiveArea[];\n\nexport type SensitiveArea = {\n id: number;\n geometry: Geometry;\n name: string;\n description: string;\n contact: string;\n info_url: string;\n period: boolean[];\n practices: number[];\n};\n\nexport type Pois = Poi[];\n\nexport type Poi = {\n id: number;\n name: string;\n description: string;\n attachments: Attachments;\n type: number;\n geometry: Geometry;\n};\n\nexport type PoiTypes = PoiType[];\n\nexport type PoiType = {\n id: number;\n pictogram: string;\n};\n\nexport type InformationDesks = InformationDesk[];\n\nexport type InformationDesk = {\n id: number;\n name: string;\n description: string;\n type: InformationDeskType;\n phone: string;\n email: string;\n website: string;\n municipality: string;\n postal_code: string;\n street: string;\n photo_url: string;\n latitude: number;\n longitude: number;\n};\n\nexport type InformationDeskType = {\n id: number;\n label: string;\n pictogram: string;\n};\n\nexport type TouristicContent = {\n id: number;\n name: string;\n attachments: Attachments;\n description?: string;\n description_teaser?: string;\n practical_info?: string;\n category: number;\n geometry: Point;\n cities?: string[];\n source?: number[];\n pdf?: string;\n contact?: string;\n email?: string;\n website?: string;\n};\n\nexport type TouristicContents = TouristicContent[];\n\nexport type TouristicContentCategory = {\n id: number;\n label: string;\n pictogram: string;\n};\n\nexport type TouristicContentCategories = TouristicContentCategory[];\n\nexport type TouristicEvent = {\n id: number;\n name: string;\n attachments: Attachments;\n description?: string;\n description_teaser?: string;\n practical_info?: string;\n type: number;\n geometry: Point;\n cities?: string[];\n source?: number[];\n pdf?: string;\n contact?: string;\n email?: string;\n website?: string;\n begin_date?: string;\n end_date?: string;\n};\n\nexport type TouristicEvents = TouristicEvent[];\n\nexport type TouristicEventType = {\n id: number;\n type: string;\n pictogram: string;\n};\n\nexport type TouristicEventTypes = TouristicEventType[];\n\nexport type TrekFilters = TrekFilter[];\n\nexport type TrekFilter = { property: string; trekProperty: string; trekPropertyIsArray: boolean; type: string; segment: string };\n\nexport type TouristicContentsFilters = TouristicContentsFilter[];\n\nexport type TouristicContentsFilter = { property: string; touristicContentProperty: string; touristicContentPropertyIsArray: boolean; type: string; segment: string };\n\nexport type TouristicEventsFilters = TouristicEventsFilter[];\n\nexport type TouristicEventsFilter = { property: string; touristicEventProperty: string; touristicEventPropertyIsArray: boolean; type: string; segment: string };\n\nexport type Option = {\n visible: boolean;\n indicator: boolean;\n ref: string;\n};\n\nexport type Options = {\n presentation: Option;\n steps: Option;\n description: Option;\n pois: Option;\n recommendations: Option;\n sensitiveArea: Option;\n informationPlaces: Option;\n accessibility: Option;\n touristicContents: Option;\n touristicEvents: Option;\n};\n\nexport type Mode = 'treks' | 'touristicContents' | 'touristicEvents';\n\nexport type Ratings = Rating[];\n\nexport type Rating = {\n id: number;\n name: string;\n scale: number;\n};\n\nexport type RatingsScale = RatingScale[];\n\nexport type RatingScale = {\n id: number;\n name: string;\n};\n\nexport type Networks = Network[];\n\nexport type Network = {\n id: number;\n label: string;\n pictogram: string;\n};\n\nexport type Weblink = {\n name: string;\n url: string;\n category: WeblinkCategory;\n};\n\nexport type WeblinkCategory = {\n id: string;\n label: string;\n pictogram: string;\n};\n"]}
@@ -18,7 +18,10 @@ export function formatLength(length) {
18
18
  return `${Math.round(length / 1000)}km`;
19
19
  }
20
20
  export function formatAscent(ascent) {
21
- return `${ascent}m`;
21
+ return `+${ascent}m`;
22
+ }
23
+ export function formatDescent(descent) {
24
+ return `${descent}m`;
22
25
  }
23
26
  export const treksFilters = [
24
27
  { property: 'practices', trekProperty: 'practice', trekPropertyIsArray: false, type: 'include', segment: 'selectedActivitiesFilters' },
Binary file
Binary file
@@ -1 +1 @@
1
- {"version":3,"file":"utils.js","sourceRoot":"","sources":["../../src/utils/utils.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,aAAa,CAAC;AAGhC,MAAM,UAAU,cAAc,CAAC,QAAgB;EAC7C,IAAI,iBAAiB,GAAG,EAAE,CAAC;EAC3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,CAAC,QAAQ,CAAC,IAAI,aAAa,CAAC,QAAQ,GAAG,QAAQ,EAAE;cACxD,QAAQ,GAAG,aAAa,CAAC,QAAQ,CAAC;aACnC;YACD,IAAI,KAAK,CAAC,QAAQ,CAAC,IAAI,aAAa,CAAC,QAAQ,GAAG,QAAQ,EAAE;cACxD,QAAQ,GAAG,aAAa,CAAC,QAAQ,CAAC;aACnC;WACF;UACD,sBAAsB,GAAG;YACvB,GAAG,KAAK,CAAC,eAAe,CAAC,MAAM,CAC7B,cAAc,CAAC,EAAE,CAAC,cAAc,CAAC,MAAM,CAAC,sBAAsB,CAAC,IAAI,QAAQ,IAAI,cAAc,CAAC,MAAM,CAAC,sBAAsB,CAAC,IAAI,QAAQ,CACzI;WACF,CAAC;SACH;OACF;KACF;GACF;EACD,MAAM,qBAAqB,GAAG,aAAa,CAAC,CAAC,CAAC,sBAAsB,CAAC,CAAC,CAAC,KAAK,CAAC,eAAe,CAAC;EAC7F,OAAO,OAAO,CAAC,KAAK,CAAC,WAAW,CAAC;IAC/B,CAAC,CAAC,qBAAqB,CAAC,MAAM,CAAC,qBAAqB,CAAC,EAAE,CAAC,qBAAqB,CAAC,IAAI,CAAC,WAAW,EAAE,CAAC,QAAQ,CAAC,KAAK,CAAC,WAAW,CAAC,WAAW,EAAE,CAAC,CAAC;IAC3I,CAAC,CAAC,qBAAqB,CAAC;AAC5B,CAAC","sourcesContent":["import state from 'store/store';\nimport { TouristicContents, TouristicContentsFilters, TouristicEvents, TouristicEventsFilters, TrekFilters, Treks } from 'types/types';\n\nexport function formatDuration(duration: number) {\n let formattedDuration = '';\n if (duration < 24) {\n if (Math.floor(duration) !== 0) {\n formattedDuration += `${Math.floor(duration)}h`;\n }\n if (duration % 1 > 0) {\n formattedDuration += `${Math.round(60 * (duration % 1))}min`;\n }\n } else {\n formattedDuration += `${duration / 24}j`;\n }\n return formattedDuration;\n}\n\nexport function formatLength(length: number) {\n return `${Math.round(length / 1000)}km`;\n}\n\nexport function formatAscent(ascent: number) {\n return `${ascent}m`;\n}\n\nexport const treksFilters: TrekFilters = [\n { property: 'practices', trekProperty: 'practice', trekPropertyIsArray: false, type: 'include', segment: 'selectedActivitiesFilters' },\n { property: 'difficulties', trekProperty: 'difficulty', trekPropertyIsArray: false, type: 'include', segment: 'selectedActivitiesFilters' },\n { property: 'durations', trekProperty: 'duration', trekPropertyIsArray: false, type: 'interval', segment: 'selectedActivitiesFilters' },\n { property: 'lengths', trekProperty: 'length_2d', trekPropertyIsArray: false, type: 'interval', segment: 'selectedActivitiesFilters' },\n { property: 'elevations', trekProperty: 'ascent', trekPropertyIsArray: false, type: 'interval', segment: 'selectedActivitiesFilters' },\n { property: 'routes', trekProperty: 'route', trekPropertyIsArray: false, type: 'include', segment: 'selectedActivitiesFilters' },\n { property: 'accessibilities', trekProperty: 'accessibilities', trekPropertyIsArray: true, type: 'include', segment: 'selectedActivitiesFilters' },\n { property: 'labels', trekProperty: 'labels', trekPropertyIsArray: true, type: 'include', segment: 'selectedActivitiesFilters' },\n { property: 'themes', trekProperty: 'themes', trekPropertyIsArray: true, type: 'include', segment: 'selectedThemesFilters' },\n { property: 'cities', trekProperty: 'cities', trekPropertyIsArray: true, type: 'include', segment: 'selectedLocationFilters' },\n { property: 'districts', trekProperty: 'districts', trekPropertyIsArray: true, type: 'include', segment: 'selectedLocationFilters' },\n];\n\nexport const touristicContentsFilters: TouristicContentsFilters = [\n { property: 'touristicContentCategories', touristicContentProperty: 'category', touristicContentPropertyIsArray: false, type: 'include', segment: 'selectedActivitiesFilters' },\n { property: 'cities', touristicContentProperty: 'cities', touristicContentPropertyIsArray: true, type: 'include', segment: 'selectedLocationFilters' },\n { property: 'districts', touristicContentProperty: 'districts', touristicContentPropertyIsArray: true, type: 'include', segment: 'selectedLocationFilters' },\n];\n\nexport const touristicEventsFilters: TouristicEventsFilters = [\n { property: 'touristicEventTypes', touristicEventProperty: 'type', touristicEventPropertyIsArray: false, type: 'include', segment: 'selectedActivitiesFilters' },\n { property: 'cities', touristicEventProperty: 'cities', touristicEventPropertyIsArray: true, type: 'include', segment: 'selectedLocationFilters' },\n { property: 'districts', touristicEventProperty: 'districts', touristicEventPropertyIsArray: true, type: 'include', segment: 'selectedLocationFilters' },\n];\n\nexport function handleTreksFiltersAndSearch(): Treks {\n let isUsingFilter = false;\n let filtersTreks = [];\n for (const filter of treksFilters) {\n const currentFiltersId: number[] = state[filter.property].filter(currentFilter => currentFilter.selected).map(currentFilter => currentFilter.id);\n if (currentFiltersId.length > 0) {\n if (filtersTreks.length > 0) {\n if (filter.type === 'include') {\n if (filter.trekPropertyIsArray) {\n filtersTreks = [...filtersTreks.filter(trek => trek[filter.trekProperty].some(trekProperty => currentFiltersId.includes(trekProperty)))];\n } else {\n filtersTreks = [...filtersTreks.filter(trek => currentFiltersId.includes(trek[filter.trekProperty]))];\n }\n } else if (filter.type === 'interval') {\n filtersTreks = [\n ...filtersTreks.filter(trek => {\n for (const currentFilterId of currentFiltersId) {\n const currentFilter = state[filter.property].find(property => property.id === currentFilterId);\n if (trek[filter.trekProperty] >= currentFilter.minValue && trek[filter.trekProperty] <= currentFilter.maxValue) {\n return true;\n }\n }\n return false;\n }),\n ];\n }\n } else {\n if (!isUsingFilter) {\n isUsingFilter = true;\n }\n if (filter.type === 'include') {\n if (filter.trekPropertyIsArray) {\n filtersTreks = [...state.treks.filter(trek => trek[filter.trekProperty].some(trekProperty => currentFiltersId.includes(trekProperty)))];\n } else {\n filtersTreks = [...state.treks.filter(trek => currentFiltersId.includes(trek[filter.trekProperty]))];\n }\n } else if (filter.type === 'interval') {\n let minValue: number;\n let maxValue: number;\n for (const currentFilterId of currentFiltersId) {\n const currentFilter = state[filter.property].find(property => property.id === currentFilterId);\n if (isNaN(minValue) || currentFilter.minValue < minValue) {\n minValue = currentFilter.minValue;\n }\n if (isNaN(maxValue) || currentFilter.maxValue > maxValue) {\n maxValue = currentFilter.maxValue;\n }\n }\n filtersTreks = [...state.treks.filter(trek => trek[filter.trekProperty] >= minValue && trek[filter.trekProperty] <= maxValue)];\n }\n }\n }\n }\n\n const searchTreks = isUsingFilter ? filtersTreks : state.treks;\n return Boolean(state.searchValue) ? searchTreks.filter(currentTrek => currentTrek.name.toLowerCase().includes(state.searchValue.toLowerCase())) : searchTreks;\n}\n\nexport function handleTouristicContentsFiltersAndSearch(): TouristicContents {\n let isUsingFilter = false;\n let filtersTouristicContents = [];\n for (const filter of touristicContentsFilters) {\n const currentFiltersId: number[] = state[filter.property].filter(currentFilter => currentFilter.selected).map(currentFilter => currentFilter.id);\n\n if (currentFiltersId.length > 0) {\n if (filtersTouristicContents.length > 0) {\n if (filter.type === 'include') {\n if (filter.touristicContentPropertyIsArray) {\n filtersTouristicContents = [\n ...filtersTouristicContents.filter(touristicContent =>\n touristicContent[filter.touristicContentProperty].some(touristicContentProperty => currentFiltersId.includes(touristicContentProperty)),\n ),\n ];\n } else {\n filtersTouristicContents = [...filtersTouristicContents.filter(touristicContent => currentFiltersId.includes(touristicContent[filter.touristicContentProperty]))];\n }\n } else if (filter.type === 'interval') {\n filtersTouristicContents = [\n ...filtersTouristicContents.filter(touristicContent => {\n for (const currentFilterId of currentFiltersId) {\n const currentFilter = state[filter.property].find(property => property.id === currentFilterId);\n if (touristicContent[filter.touristicContentProperty] >= currentFilter.minValue && touristicContent[filter.touristicContentProperty] <= currentFilter.maxValue) {\n return true;\n }\n }\n return false;\n }),\n ];\n }\n } else {\n if (!isUsingFilter) {\n isUsingFilter = true;\n }\n if (filter.type === 'include') {\n if (filter.touristicContentPropertyIsArray) {\n filtersTouristicContents = [\n ...state.touristicContents.filter(touristicContent =>\n touristicContent[filter.touristicContentProperty].some(touristicContentProperty => currentFiltersId.includes(touristicContentProperty)),\n ),\n ];\n } else {\n filtersTouristicContents = [...state.touristicContents.filter(touristicContent => currentFiltersId.includes(touristicContent[filter.touristicContentProperty]))];\n }\n } else if (filter.type === 'interval') {\n let minValue: number;\n let maxValue: number;\n for (const currentFilterId of currentFiltersId) {\n const currentFilter = state[filter.property].find(property => property.id === currentFilterId);\n if (isNaN(minValue) || currentFilter.minValue < minValue) {\n minValue = currentFilter.minValue;\n }\n if (isNaN(maxValue) || currentFilter.maxValue > maxValue) {\n maxValue = currentFilter.maxValue;\n }\n }\n filtersTouristicContents = [\n ...state.touristicContents.filter(\n touristicContent => touristicContent[filter.touristicContentProperty] >= minValue && touristicContent[filter.touristicContentProperty] <= maxValue,\n ),\n ];\n }\n }\n }\n }\n const searchTouristicContents = isUsingFilter ? filtersTouristicContents : state.touristicContents;\n\n return Boolean(state.searchValue)\n ? searchTouristicContents.filter(currentTouristicContents => currentTouristicContents.name.toLowerCase().includes(state.searchValue.toLowerCase()))\n : searchTouristicContents;\n}\n\nexport function handleTouristicEventsFiltersAndSearch(): TouristicEvents {\n let isUsingFilter = false;\n let filtersTouristicEvents = [];\n for (const filter of touristicEventsFilters) {\n const currentFiltersId: number[] = state[filter.property].filter(currentFilter => currentFilter.selected).map(currentFilter => currentFilter.id);\n\n if (currentFiltersId.length > 0) {\n if (filtersTouristicEvents.length > 0) {\n if (filter.type === 'include') {\n if (filter.touristicEventPropertyIsArray) {\n filtersTouristicEvents = [\n ...filtersTouristicEvents.filter(touristicContent =>\n touristicContent[filter.touristicEventProperty].some(touristicContentProperty => currentFiltersId.includes(touristicContentProperty)),\n ),\n ];\n } else {\n filtersTouristicEvents = [...filtersTouristicEvents.filter(touristicContent => currentFiltersId.includes(touristicContent[filter.touristicEventProperty]))];\n }\n } else if (filter.type === 'interval') {\n filtersTouristicEvents = [\n ...filtersTouristicEvents.filter(touristicContent => {\n for (const currentFilterId of currentFiltersId) {\n const currentFilter = state[filter.property].find(property => property.id === currentFilterId);\n if (touristicContent[filter.touristicEventProperty] >= currentFilter.minValue && touristicContent[filter.touristicEventProperty] <= currentFilter.maxValue) {\n return true;\n }\n }\n return false;\n }),\n ];\n }\n } else {\n if (!isUsingFilter) {\n isUsingFilter = true;\n }\n if (filter.type === 'include') {\n if (filter.touristicEventPropertyIsArray) {\n filtersTouristicEvents = [\n ...state.touristicContents.filter(touristicContent =>\n touristicContent[filter.touristicEventProperty].some(touristicContentProperty => currentFiltersId.includes(touristicContentProperty)),\n ),\n ];\n } else {\n filtersTouristicEvents = [...state.touristicEvents.filter(touristicContent => currentFiltersId.includes(touristicContent[filter.touristicEventProperty]))];\n }\n } else if (filter.type === 'interval') {\n let minValue: number;\n let maxValue: number;\n for (const currentFilterId of currentFiltersId) {\n const currentFilter = state[filter.property].find(property => property.id === currentFilterId);\n if (isNaN(minValue) || currentFilter.minValue < minValue) {\n minValue = currentFilter.minValue;\n }\n if (isNaN(maxValue) || currentFilter.maxValue > maxValue) {\n maxValue = currentFilter.maxValue;\n }\n }\n filtersTouristicEvents = [\n ...state.touristicEvents.filter(\n touristicEvent => touristicEvent[filter.touristicEventProperty] >= minValue && touristicEvent[filter.touristicEventProperty] <= maxValue,\n ),\n ];\n }\n }\n }\n }\n const searchTouristicEvents = isUsingFilter ? filtersTouristicEvents : state.touristicEvents;\n return Boolean(state.searchValue)\n ? searchTouristicEvents.filter(currentTouristicEvent => currentTouristicEvent.name.toLowerCase().includes(state.searchValue.toLowerCase()))\n : searchTouristicEvents;\n}\n"]}
1
+ {"version":3,"file":"utils.js","sourceRoot":"","sources":["../../src/utils/utils.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,aAAa,CAAC;AAGhC,MAAM,UAAU,cAAc,CAAC,QAAgB;EAC7C,IAAI,iBAAiB,GAAG,EAAE,CAAC;EAC3B,IAAI,QAAQ,GAAG,EAAE,EAAE;IACjB,IAAI,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,EAAE;MAC9B,iBAAiB,IAAI,GAAG,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,GAAG,CAAC;KACjD;IACD,IAAI,QAAQ,GAAG,CAAC,GAAG,CAAC,EAAE;MACpB,iBAAiB,IAAI,GAAG,IAAI,CAAC,KAAK,CAAC,EAAE,GAAG,CAAC,QAAQ,G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C,QAAQ,CAAC;aACnC;WACF;UACD,sBAAsB,GAAG;YACvB,GAAG,KAAK,CAAC,eAAe,CAAC,MAAM,CAC7B,cAAc,CAAC,EAAE,CAAC,cAAc,CAAC,MAAM,CAAC,sBAAsB,CAAC,IAAI,QAAQ,IAAI,cAAc,CAAC,MAAM,CAAC,sBAAsB,CAAC,IAAI,QAAQ,CACzI;WACF,CAAC;SACH;OACF;KACF;GACF;EACD,MAAM,qBAAqB,GAAG,aAAa,CAAC,CAAC,CAAC,sBAAsB,CAAC,CAAC,CAAC,KAAK,CAAC,eAAe,CAAC;EAC7F,OAAO,OAAO,CAAC,KAAK,CAAC,WAAW,CAAC;IAC/B,CAAC,CAAC,qBAAqB,CAAC,MAAM,CAAC,qBAAqB,CAAC,EAAE,CAAC,qBAAqB,CAAC,IAAI,CAAC,WAAW,EAAE,CAAC,QAAQ,CAAC,KAAK,CAAC,WAAW,CAAC,WAAW,EAAE,CAAC,CAAC;IAC3I,CAAC,CAAC,qBAAqB,CAAC;AAC5B,CAAC","sourcesContent":["import state from 'store/store';\nimport { TouristicContents, TouristicContentsFilters, TouristicEvents, TouristicEventsFilters, TrekFilters, Treks } from 'types/types';\n\nexport function formatDuration(duration: number) {\n let formattedDuration = '';\n if (duration < 24) {\n if (Math.floor(duration) !== 0) {\n formattedDuration += `${Math.floor(duration)}h`;\n }\n if (duration % 1 > 0) {\n formattedDuration += `${Math.round(60 * (duration % 1))}min`;\n }\n } else {\n formattedDuration += `${duration / 24}j`;\n }\n return formattedDuration;\n}\n\nexport function formatLength(length: number) {\n return `${Math.round(length / 1000)}km`;\n}\n\nexport function formatAscent(ascent: number) {\n return `+${ascent}m`;\n}\n\nexport function formatDescent(descent: number) {\n return `${descent}m`;\n}\n\nexport const treksFilters: TrekFilters = [\n { property: 'practices', trekProperty: 'practice', trekPropertyIsArray: false, type: 'include', segment: 'selectedActivitiesFilters' },\n { property: 'difficulties', trekProperty: 'difficulty', trekPropertyIsArray: false, type: 'include', segment: 'selectedActivitiesFilters' },\n { property: 'durations', trekProperty: 'duration', trekPropertyIsArray: false, type: 'interval', segment: 'selectedActivitiesFilters' },\n { property: 'lengths', trekProperty: 'length_2d', trekPropertyIsArray: false, type: 'interval', segment: 'selectedActivitiesFilters' },\n { property: 'elevations', trekProperty: 'ascent', trekPropertyIsArray: false, type: 'interval', segment: 'selectedActivitiesFilters' },\n { property: 'routes', trekProperty: 'route', trekPropertyIsArray: false, type: 'include', segment: 'selectedActivitiesFilters' },\n { property: 'accessibilities', trekProperty: 'accessibilities', trekPropertyIsArray: true, type: 'include', segment: 'selectedActivitiesFilters' },\n { property: 'labels', trekProperty: 'labels', trekPropertyIsArray: true, type: 'include', segment: 'selectedActivitiesFilters' },\n { property: 'themes', trekProperty: 'themes', trekPropertyIsArray: true, type: 'include', segment: 'selectedThemesFilters' },\n { property: 'cities', trekProperty: 'cities', trekPropertyIsArray: true, type: 'include', segment: 'selectedLocationFilters' },\n { property: 'districts', trekProperty: 'districts', trekPropertyIsArray: true, type: 'include', segment: 'selectedLocationFilters' },\n];\n\nexport const touristicContentsFilters: TouristicContentsFilters = [\n { property: 'touristicContentCategories', touristicContentProperty: 'category', touristicContentPropertyIsArray: false, type: 'include', segment: 'selectedActivitiesFilters' },\n { property: 'cities', touristicContentProperty: 'cities', touristicContentPropertyIsArray: true, type: 'include', segment: 'selectedLocationFilters' },\n { property: 'districts', touristicContentProperty: 'districts', touristicContentPropertyIsArray: true, type: 'include', segment: 'selectedLocationFilters' },\n];\n\nexport const touristicEventsFilters: TouristicEventsFilters = [\n { property: 'touristicEventTypes', touristicEventProperty: 'type', touristicEventPropertyIsArray: false, type: 'include', segment: 'selectedActivitiesFilters' },\n { property: 'cities', touristicEventProperty: 'cities', touristicEventPropertyIsArray: true, type: 'include', segment: 'selectedLocationFilters' },\n { property: 'districts', touristicEventProperty: 'districts', touristicEventPropertyIsArray: true, type: 'include', segment: 'selectedLocationFilters' },\n];\n\nexport function handleTreksFiltersAndSearch(): Treks {\n let isUsingFilter = false;\n let filtersTreks = [];\n for (const filter of treksFilters) {\n const currentFiltersId: number[] = state[filter.property].filter(currentFilter => currentFilter.selected).map(currentFilter => currentFilter.id);\n if (currentFiltersId.length > 0) {\n if (filtersTreks.length > 0) {\n if (filter.type === 'include') {\n if (filter.trekPropertyIsArray) {\n filtersTreks = [...filtersTreks.filter(trek => trek[filter.trekProperty].some(trekProperty => currentFiltersId.includes(trekProperty)))];\n } else {\n filtersTreks = [...filtersTreks.filter(trek => currentFiltersId.includes(trek[filter.trekProperty]))];\n }\n } else if (filter.type === 'interval') {\n filtersTreks = [\n ...filtersTreks.filter(trek => {\n for (const currentFilterId of currentFiltersId) {\n const currentFilter = state[filter.property].find(property => property.id === currentFilterId);\n if (trek[filter.trekProperty] >= currentFilter.minValue && trek[filter.trekProperty] <= currentFilter.maxValue) {\n return true;\n }\n }\n return false;\n }),\n ];\n }\n } else {\n if (!isUsingFilter) {\n isUsingFilter = true;\n }\n if (filter.type === 'include') {\n if (filter.trekPropertyIsArray) {\n filtersTreks = [...state.treks.filter(trek => trek[filter.trekProperty].some(trekProperty => currentFiltersId.includes(trekProperty)))];\n } else {\n filtersTreks = [...state.treks.filter(trek => currentFiltersId.includes(trek[filter.trekProperty]))];\n }\n } else if (filter.type === 'interval') {\n let minValue: number;\n let maxValue: number;\n for (const currentFilterId of currentFiltersId) {\n const currentFilter = state[filter.property].find(property => property.id === currentFilterId);\n if (isNaN(minValue) || currentFilter.minValue < minValue) {\n minValue = currentFilter.minValue;\n }\n if (isNaN(maxValue) || currentFilter.maxValue > maxValue) {\n maxValue = currentFilter.maxValue;\n }\n }\n filtersTreks = [...state.treks.filter(trek => trek[filter.trekProperty] >= minValue && trek[filter.trekProperty] <= maxValue)];\n }\n }\n }\n }\n\n const searchTreks = isUsingFilter ? filtersTreks : state.treks;\n return Boolean(state.searchValue) ? searchTreks.filter(currentTrek => currentTrek.name.toLowerCase().includes(state.searchValue.toLowerCase())) : searchTreks;\n}\n\nexport function handleTouristicContentsFiltersAndSearch(): TouristicContents {\n let isUsingFilter = false;\n let filtersTouristicContents = [];\n for (const filter of touristicContentsFilters) {\n const currentFiltersId: number[] = state[filter.property].filter(currentFilter => currentFilter.selected).map(currentFilter => currentFilter.id);\n\n if (currentFiltersId.length > 0) {\n if (filtersTouristicContents.length > 0) {\n if (filter.type === 'include') {\n if (filter.touristicContentPropertyIsArray) {\n filtersTouristicContents = [\n ...filtersTouristicContents.filter(touristicContent =>\n touristicContent[filter.touristicContentProperty].some(touristicContentProperty => currentFiltersId.includes(touristicContentProperty)),\n ),\n ];\n } else {\n filtersTouristicContents = [...filtersTouristicContents.filter(touristicContent => currentFiltersId.includes(touristicContent[filter.touristicContentProperty]))];\n }\n } else if (filter.type === 'interval') {\n filtersTouristicContents = [\n ...filtersTouristicContents.filter(touristicContent => {\n for (const currentFilterId of currentFiltersId) {\n const currentFilter = state[filter.property].find(property => property.id === currentFilterId);\n if (touristicContent[filter.touristicContentProperty] >= currentFilter.minValue && touristicContent[filter.touristicContentProperty] <= currentFilter.maxValue) {\n return true;\n }\n }\n return false;\n }),\n ];\n }\n } else {\n if (!isUsingFilter) {\n isUsingFilter = true;\n }\n if (filter.type === 'include') {\n if (filter.touristicContentPropertyIsArray) {\n filtersTouristicContents = [\n ...state.touristicContents.filter(touristicContent =>\n touristicContent[filter.touristicContentProperty].some(touristicContentProperty => currentFiltersId.includes(touristicContentProperty)),\n ),\n ];\n } else {\n filtersTouristicContents = [...state.touristicContents.filter(touristicContent => currentFiltersId.includes(touristicContent[filter.touristicContentProperty]))];\n }\n } else if (filter.type === 'interval') {\n let minValue: number;\n let maxValue: number;\n for (const currentFilterId of currentFiltersId) {\n const currentFilter = state[filter.property].find(property => property.id === currentFilterId);\n if (isNaN(minValue) || currentFilter.minValue < minValue) {\n minValue = currentFilter.minValue;\n }\n if (isNaN(maxValue) || currentFilter.maxValue > maxValue) {\n maxValue = currentFilter.maxValue;\n }\n }\n filtersTouristicContents = [\n ...state.touristicContents.filter(\n touristicContent => touristicContent[filter.touristicContentProperty] >= minValue && touristicContent[filter.touristicContentProperty] <= maxValue,\n ),\n ];\n }\n }\n }\n }\n const searchTouristicContents = isUsingFilter ? filtersTouristicContents : state.touristicContents;\n\n return Boolean(state.searchValue)\n ? searchTouristicContents.filter(currentTouristicContents => currentTouristicContents.name.toLowerCase().includes(state.searchValue.toLowerCase()))\n : searchTouristicContents;\n}\n\nexport function handleTouristicEventsFiltersAndSearch(): TouristicEvents {\n let isUsingFilter = false;\n let filtersTouristicEvents = [];\n for (const filter of touristicEventsFilters) {\n const currentFiltersId: number[] = state[filter.property].filter(currentFilter => currentFilter.selected).map(currentFilter => currentFilter.id);\n\n if (currentFiltersId.length > 0) {\n if (filtersTouristicEvents.length > 0) {\n if (filter.type === 'include') {\n if (filter.touristicEventPropertyIsArray) {\n filtersTouristicEvents = [\n ...filtersTouristicEvents.filter(touristicContent =>\n touristicContent[filter.touristicEventProperty].some(touristicContentProperty => currentFiltersId.includes(touristicContentProperty)),\n ),\n ];\n } else {\n filtersTouristicEvents = [...filtersTouristicEvents.filter(touristicContent => currentFiltersId.includes(touristicContent[filter.touristicEventProperty]))];\n }\n } else if (filter.type === 'interval') {\n filtersTouristicEvents = [\n ...filtersTouristicEvents.filter(touristicContent => {\n for (const currentFilterId of currentFiltersId) {\n const currentFilter = state[filter.property].find(property => property.id === currentFilterId);\n if (touristicContent[filter.touristicEventProperty] >= currentFilter.minValue && touristicContent[filter.touristicEventProperty] <= currentFilter.maxValue) {\n return true;\n }\n }\n return false;\n }),\n ];\n }\n } else {\n if (!isUsingFilter) {\n isUsingFilter = true;\n }\n if (filter.type === 'include') {\n if (filter.touristicEventPropertyIsArray) {\n filtersTouristicEvents = [\n ...state.touristicContents.filter(touristicContent =>\n touristicContent[filter.touristicEventProperty].some(touristicContentProperty => currentFiltersId.includes(touristicContentProperty)),\n ),\n ];\n } else {\n filtersTouristicEvents = [...state.touristicEvents.filter(touristicContent => currentFiltersId.includes(touristicContent[filter.touristicEventProperty]))];\n }\n } else if (filter.type === 'interval') {\n let minValue: number;\n let maxValue: number;\n for (const currentFilterId of currentFiltersId) {\n const currentFilter = state[filter.property].find(property => property.id === currentFilterId);\n if (isNaN(minValue) || currentFilter.minValue < minValue) {\n minValue = currentFilter.minValue;\n }\n if (isNaN(maxValue) || currentFilter.maxValue > maxValue) {\n maxValue = currentFilter.maxValue;\n }\n }\n filtersTouristicEvents = [\n ...state.touristicEvents.filter(\n touristicEvent => touristicEvent[filter.touristicEventProperty] >= minValue && touristicEvent[filter.touristicEventProperty] <= maxValue,\n ),\n ];\n }\n }\n }\n }\n const searchTouristicEvents = isUsingFilter ? filtersTouristicEvents : state.touristicEvents;\n return Boolean(state.searchValue)\n ? searchTouristicEvents.filter(currentTouristicEvent => currentTouristicEvent.name.toLowerCase().includes(state.searchValue.toLowerCase()))\n : searchTouristicEvents;\n}\n"]}
@@ -110,7 +110,7 @@ const patchDynamicImport = (base, orgScriptElm) => {
110
110
  };
111
111
 
112
112
  patchBrowser().then(options => {
113
- return bootstrapLazy([["grw-app_28",[[0,"grw-app",{"appWidth":[1,"app-width"],"appHeight":[1,"app-height"],"api":[1],"languages":[1],"inBbox":[1,"in-bbox"],"cities":[1],"districts":[1],"structures":[1],"themes":[1],"portals":[1],"routes":[1],"practices":[1],"center":[1],"zoom":[2],"nameLayer":[1,"name-layer"],"urlLayer":[1,"url-layer"],"attributionLayer":[1,"attribution-layer"],"weather":[4],"fontFamily":[1,"font-family"],"colorPrimaryApp":[1,"color-primary-app"],"colorOnPrimary":[1,"color-on-primary"],"colorSurface":[1,"color-surface"],"colorOnSurface":[1,"color-on-surface"],"colorSurfaceVariant":[1,"color-surface-variant"],"colorOnSurfaceVariant":[1,"color-on-surface-variant"],"colorPrimaryContainer":[1,"color-primary-container"],"colorOnPrimaryContainer":[1,"color-on-primary-container"],"colorSecondaryContainer":[1,"color-secondary-container"],"colorOnSecondaryContainer":[1,"color-on-secondary-container"],"colorBackground":[1,"color-background"],"colorSurfaceContainerHigh":[1,"color-surface-container-high"],"colorSurfaceContainerLow":[1,"color-surface-container-low"],"fabBackgroundColor":[1,"fab-background-color"],"fabColor":[1,"fab-color"],"rounded":[4],"colorTrekLine":[1,"color-trek-line"],"colorSensitiveArea":[1,"color-sensitive-area"],"colorPoiIcon":[1,"color-poi-icon"],"useGradient":[4,"use-gradient"],"treks":[4],"touristicContents":[4,"touristic-contents"],"touristicEvents":[4,"touristic-events"],"showTrek":[32],"showTouristicContent":[32],"showTouristicEvent":[32],"showHomeMap":[32],"showTrekMap":[32],"showTouristicContentMap":[32],"showTouristicEventMap":[32],"showFilters":[32],"isLargeView":[32],"currentTrekId":[32],"currentTouristicContentId":[32],"currentTouristicEventId":[32]},[[8,"trekCardPress","onTrekCardPress"],[8,"parentTrekPress","onParentTrekPress"],[8,"touristicContentCardPress","onTouristicContentCardPress"],[8,"touristicEventCardPress","onTouristiceEventCardPress"],[9,"resize","onWindowResize"],[8,"centerOnMap","onCenterOnMap"]]],[1,"grw-trek-detail",{"trek":[16],"fontFamily":[1,"font-family"],"colorPrimaryApp":[1,"color-primary-app"],"colorOnSurface":[1,"color-on-surface"],"colorPrimaryContainer":[1,"color-primary-container"],"colorOnPrimaryContainer":[1,"color-on-primary-container"],"colorSecondaryContainer":[1,"color-secondary-container"],"colorOnSecondaryContainer":[1,"color-on-secondary-container"],"colorSurfaceContainerLow":[1,"color-surface-container-low"],"colorBackground":[1,"color-background"],"resetStoreOnDisconnected":[4,"reset-store-on-disconnected"],"weather":[4],"isLargeView":[4,"is-large-view"],"currentTrek":[32],"difficulty":[32],"route":[32],"practice":[32],"themes":[32],"labels":[32],"sources":[32],"accessibilities":[32],"accessibilityLevel":[32],"displayFullscreen":[32],"cities":[32],"options":[32]}],[1,"grw-filters",{"handleFilters":[16],"fontFamily":[1,"font-family"],"selectedSegment":[32]}],[1,"grw-touristic-contents-list",{"fontFamily":[1,"font-family"],"colorPrimaryApp":[1,"color-primary-app"],"colorOnSurface":[1,"color-on-surface"],"colorSecondaryContainer":[1,"color-secondary-container"],"colorOnSecondaryContainer":[1,"color-on-secondary-container"],"colorSurfaceContainerLow":[1,"color-surface-container-low"],"isLargeView":[4,"is-large-view"],"resetStoreOnDisconnected":[4,"reset-store-on-disconnected"],"touristicContentsToDisplay":[32]}],[1,"grw-touristic-events-list",{"fontFamily":[1,"font-family"],"colorPrimaryApp":[1,"color-primary-app"],"colorOnSurface":[1,"color-on-surface"],"colorSecondaryContainer":[1,"color-secondary-container"],"colorOnSecondaryContainer":[1,"color-on-secondary-container"],"colorSurfaceContainerLow":[1,"color-surface-container-low"],"isLargeView":[4,"is-large-view"],"resetStoreOnDisconnected":[4,"reset-store-on-disconnected"],"touristicEventsToDisplay":[32]}],[1,"grw-treks-list",{"fontFamily":[1,"font-family"],"colorPrimaryApp":[1,"color-primary-app"],"colorOnSurface":[1,"color-on-surface"],"colorSecondaryContainer":[1,"color-secondary-container"],"colorOnSecondaryContainer":[1,"color-on-secondary-container"],"colorSurfaceContainerLow":[1,"color-surface-container-low"],"isLargeView":[4,"is-large-view"],"resetStoreOnDisconnected":[4,"reset-store-on-disconnected"],"treksToDisplay":[32]}],[1,"grw-common-button",{"action":[16],"icon":[1],"name":[1],"fontFamily":[1,"font-family"]}],[1,"grw-extended-fab",{"action":[16],"icon":[16],"name":[16],"display":[1],"fontFamily":[1,"font-family"]}],[1,"grw-loader",{"colorPrimaryContainer":[1,"color-primary-container"],"colorOnPrimaryContainer":[1,"color-on-primary-container"]}],[1,"grw-map",{"nameLayer":[1,"name-layer"],"urlLayer":[1,"url-layer"],"attributionLayer":[1,"attribution-layer"],"center":[1],"zoom":[2],"fontFamily":[1,"font-family"],"colorPrimaryApp":[1,"color-primary-app"],"colorOnSurface":[1,"color-on-surface"],"colorPrimaryContainer":[1,"color-primary-container"],"colorOnPrimaryContainer":[1,"color-on-primary-container"],"colorBackground":[1,"color-background"],"colorTrekLine":[1,"color-trek-line"],"colorSensitiveArea":[1,"color-sensitive-area"],"colorPoiIcon":[1,"color-poi-icon"],"useGradient":[4,"use-gradient"],"resetStoreOnDisconnected":[4,"reset-store-on-disconnected"],"isLargeView":[4,"is-large-view"],"mapIsReady":[32]},[[8,"centerOnMap","onCenterOnMap"],[8,"stepsIsInViewport","stepsIsInViewport"],[8,"descriptionIsInViewport","descriptionIsInViewport"],[8,"parkingIsInViewport","parkingIsInViewport"],[8,"informationDeskIsInViewport","onInformationDesksIsInViewport"],[8,"sensitiveAreaIsInViewport","sensitiveAreaIsInViewport"],[8,"poiIsInViewport","poiIsInViewport"],[8,"touristicContentsIsInViewport","touristicContentsIsInViewport"],[8,"touristicEventsIsInViewport","touristicEventsIsInViewport"],[8,"cardTrekMouseOver","onCardTrekMouseOver"],[8,"cardTrekMouseLeave","onCardTrekMouseLeave"],[8,"cardTouristicContentMouseOver","onTouristicContentMouseOver"],[8,"cardTouristicContentMouseLeave","onTouristicContentMouseLeave"],[8,"cardTouristicEventMouseOver","onTouristicEventMouseOver"],[8,"cardTouristicEventMouseLeave","onTouristicEventMouseLeave"]]],[1,"grw-search",{"fontFamily":[1,"font-family"]}],[1,"grw-segmented-segment",{"treks":[4],"touristicContents":[4,"touristic-contents"],"touristicEvents":[4,"touristic-events"],"fontFamily":[1,"font-family"]}],[1,"grw-select-language"],[1,"grw-touristic-content-detail",{"fontFamily":[1,"font-family"],"colorPrimaryApp":[1,"color-primary-app"],"colorOnSurface":[1,"color-on-surface"],"colorPrimaryContainer":[1,"color-primary-container"],"colorOnPrimaryContainer":[1,"color-on-primary-container"],"colorSecondaryContainer":[1,"color-secondary-container"],"colorOnSecondaryContainer":[1,"color-on-secondary-container"],"colorSurfaceContainerLow":[1,"color-surface-container-low"],"colorBackground":[1,"color-background"],"isLargeView":[4,"is-large-view"],"displayFullscreen":[32]}],[1,"grw-touristic-content-provider",{"languages":[1],"api":[1],"touristicContentId":[1,"touristic-content-id"],"portals":[1]}],[1,"grw-touristic-contents-provider",{"languages":[1],"api":[1],"inBbox":[1,"in-bbox"],"cities":[1],"districts":[1],"structures":[1],"themes":[1],"portals":[1]}],[1,"grw-touristic-event-detail",{"fontFamily":[1,"font-family"],"colorPrimaryApp":[1,"color-primary-app"],"colorOnSurface":[1,"color-on-surface"],"colorPrimaryContainer":[1,"color-primary-container"],"colorOnPrimaryContainer":[1,"color-on-primary-container"],"colorSecondaryContainer":[1,"color-secondary-container"],"colorOnSecondaryContainer":[1,"color-on-secondary-container"],"colorSurfaceContainerLow":[1,"color-surface-container-low"],"colorBackground":[1,"color-background"],"isLargeView":[4,"is-large-view"],"displayFullscreen":[32]}],[1,"grw-touristic-event-provider",{"languages":[1],"api":[1],"touristicEventId":[1,"touristic-event-id"],"portals":[1]}],[1,"grw-touristic-events-provider",{"languages":[1],"api":[1],"inBbox":[1,"in-bbox"],"cities":[1],"districts":[1],"structures":[1],"themes":[1],"portals":[1]}],[1,"grw-trek-provider",{"languages":[1],"api":[1],"trekId":[1,"trek-id"],"portals":[1]}],[1,"grw-treks-provider",{"languages":[1],"api":[1],"inBbox":[1,"in-bbox"],"cities":[1],"districts":[1],"structures":[1],"themes":[1],"portals":[1],"routes":[1],"practices":[1]}],[1,"grw-filter",{"fontFamily":[1,"font-family"],"filterType":[1,"filter-type"],"filterName":[1,"filter-name"],"filterPlaceholder":[1,"filter-placeholder"],"filterNameProperty":[1,"filter-name-property"],"segment":[1]},[[8,"resetFilter","onResetFilter"]]],[1,"grw-information-desk",{"informationDesk":[16],"displayShortDescription":[32],"showInformationDeskDescriptionButton":[32]}],[1,"grw-poi",{"poi":[16],"displayShortDescription":[32],"showPoiDescriptionButton":[32],"displayFullscreen":[32]}],[1,"grw-sensitive-area-detail",{"sensitiveArea":[16]}],[1,"grw-touristic-content-card",{"fontFamily":[1,"font-family"],"touristicContent":[16],"isLargeView":[4,"is-large-view"],"isInsideHorizontalList":[4,"is-inside-horizontal-list"],"displayFullscreen":[32]},[[1,"mouseover","handleMouseOver"],[1,"mouseleave","handleMouseLeave"]]],[1,"grw-touristic-event-card",{"fontFamily":[1,"font-family"],"touristicEvent":[16],"isLargeView":[4,"is-large-view"],"isInsideHorizontalList":[4,"is-inside-horizontal-list"],"displayFullscreen":[32]},[[1,"mouseover","handleMouseOver"],[1,"mouseleave","handleMouseLeave"]]],[1,"grw-trek-card",{"trek":[16],"fontFamily":[1,"font-family"],"colorPrimaryApp":[1,"color-primary-app"],"colorOnSurface":[1,"color-on-surface"],"colorSecondaryContainer":[1,"color-secondary-container"],"colorOnSecondaryContainer":[1,"color-on-secondary-container"],"colorSurfaceContainerLow":[1,"color-surface-container-low"],"isLargeView":[4,"is-large-view"],"resetStoreOnDisconnected":[4,"reset-store-on-disconnected"],"isStep":[4,"is-step"],"currentTrek":[32],"difficulty":[32],"route":[32],"practice":[32],"themes":[32],"departureCity":[32]},[[1,"mouseover","handleMouseOver"],[1,"mouseleave","handleMouseLeave"]]]]]], options);
113
+ return bootstrapLazy(JSON.parse("[[\"grw-app_28\",[[0,\"grw-app\",{\"appWidth\":[1,\"app-width\"],\"appHeight\":[1,\"app-height\"],\"api\":[1],\"languages\":[1],\"inBbox\":[1,\"in-bbox\"],\"cities\":[1],\"districts\":[1],\"structures\":[1],\"themes\":[1],\"portals\":[1],\"routes\":[1],\"practices\":[1],\"center\":[1],\"zoom\":[2],\"nameLayer\":[1,\"name-layer\"],\"urlLayer\":[1,\"url-layer\"],\"attributionLayer\":[1,\"attribution-layer\"],\"weather\":[4],\"emergencyNumber\":[2,\"emergency-number\"],\"fontFamily\":[1,\"font-family\"],\"colorPrimaryApp\":[1,\"color-primary-app\"],\"colorOnPrimary\":[1,\"color-on-primary\"],\"colorSurface\":[1,\"color-surface\"],\"colorOnSurface\":[1,\"color-on-surface\"],\"colorSurfaceVariant\":[1,\"color-surface-variant\"],\"colorOnSurfaceVariant\":[1,\"color-on-surface-variant\"],\"colorPrimaryContainer\":[1,\"color-primary-container\"],\"colorOnPrimaryContainer\":[1,\"color-on-primary-container\"],\"colorSecondaryContainer\":[1,\"color-secondary-container\"],\"colorOnSecondaryContainer\":[1,\"color-on-secondary-container\"],\"colorBackground\":[1,\"color-background\"],\"colorSurfaceContainerHigh\":[1,\"color-surface-container-high\"],\"colorSurfaceContainerLow\":[1,\"color-surface-container-low\"],\"fabBackgroundColor\":[1,\"fab-background-color\"],\"fabColor\":[1,\"fab-color\"],\"rounded\":[4],\"colorTrekLine\":[1,\"color-trek-line\"],\"colorSensitiveArea\":[1,\"color-sensitive-area\"],\"colorPoiIcon\":[1,\"color-poi-icon\"],\"useGradient\":[4,\"use-gradient\"],\"treks\":[4],\"touristicContents\":[4,\"touristic-contents\"],\"touristicEvents\":[4,\"touristic-events\"],\"showTrek\":[32],\"showTouristicContent\":[32],\"showTouristicEvent\":[32],\"showHomeMap\":[32],\"showTrekMap\":[32],\"showTouristicContentMap\":[32],\"showTouristicEventMap\":[32],\"showFilters\":[32],\"isLargeView\":[32],\"currentTrekId\":[32],\"currentTouristicContentId\":[32],\"currentTouristicEventId\":[32]},[[8,\"trekCardPress\",\"onTrekCardPress\"],[8,\"parentTrekPress\",\"onParentTrekPress\"],[8,\"touristicContentCardPress\",\"onTouristicContentCardPress\"],[8,\"touristicEventCardPress\",\"onTouristiceEventCardPress\"],[9,\"resize\",\"onWindowResize\"],[8,\"centerOnMap\",\"onCenterOnMap\"]]],[1,\"grw-trek-detail\",{\"trek\":[16],\"emergencyNumber\":[2,\"emergency-number\"],\"fontFamily\":[1,\"font-family\"],\"colorPrimaryApp\":[1,\"color-primary-app\"],\"colorOnSurface\":[1,\"color-on-surface\"],\"colorPrimaryContainer\":[1,\"color-primary-container\"],\"colorOnPrimaryContainer\":[1,\"color-on-primary-container\"],\"colorSecondaryContainer\":[1,\"color-secondary-container\"],\"colorOnSecondaryContainer\":[1,\"color-on-secondary-container\"],\"colorSurfaceContainerLow\":[1,\"color-surface-container-low\"],\"colorBackground\":[1,\"color-background\"],\"resetStoreOnDisconnected\":[4,\"reset-store-on-disconnected\"],\"weather\":[4],\"isLargeView\":[4,\"is-large-view\"],\"currentTrek\":[32],\"difficulty\":[32],\"route\":[32],\"practice\":[32],\"themes\":[32],\"labels\":[32],\"sources\":[32],\"accessibilities\":[32],\"accessibilityLevel\":[32],\"displayFullscreen\":[32],\"cities\":[32],\"options\":[32]}],[1,\"grw-filters\",{\"handleFilters\":[16],\"fontFamily\":[1,\"font-family\"],\"selectedSegment\":[32]}],[1,\"grw-touristic-contents-list\",{\"fontFamily\":[1,\"font-family\"],\"colorPrimaryApp\":[1,\"color-primary-app\"],\"colorOnSurface\":[1,\"color-on-surface\"],\"colorSecondaryContainer\":[1,\"color-secondary-container\"],\"colorOnSecondaryContainer\":[1,\"color-on-secondary-container\"],\"colorSurfaceContainerLow\":[1,\"color-surface-container-low\"],\"isLargeView\":[4,\"is-large-view\"],\"resetStoreOnDisconnected\":[4,\"reset-store-on-disconnected\"],\"touristicContentsToDisplay\":[32]}],[1,\"grw-touristic-events-list\",{\"fontFamily\":[1,\"font-family\"],\"colorPrimaryApp\":[1,\"color-primary-app\"],\"colorOnSurface\":[1,\"color-on-surface\"],\"colorSecondaryContainer\":[1,\"color-secondary-container\"],\"colorOnSecondaryContainer\":[1,\"color-on-secondary-container\"],\"colorSurfaceContainerLow\":[1,\"color-surface-container-low\"],\"isLargeView\":[4,\"is-large-view\"],\"resetStoreOnDisconnected\":[4,\"reset-store-on-disconnected\"],\"touristicEventsToDisplay\":[32]}],[1,\"grw-treks-list\",{\"fontFamily\":[1,\"font-family\"],\"colorPrimaryApp\":[1,\"color-primary-app\"],\"colorOnSurface\":[1,\"color-on-surface\"],\"colorSecondaryContainer\":[1,\"color-secondary-container\"],\"colorOnSecondaryContainer\":[1,\"color-on-secondary-container\"],\"colorSurfaceContainerLow\":[1,\"color-surface-container-low\"],\"isLargeView\":[4,\"is-large-view\"],\"resetStoreOnDisconnected\":[4,\"reset-store-on-disconnected\"],\"treksToDisplay\":[32]}],[1,\"grw-common-button\",{\"action\":[16],\"icon\":[1],\"name\":[1],\"fontFamily\":[1,\"font-family\"]}],[1,\"grw-extended-fab\",{\"action\":[16],\"icon\":[16],\"name\":[16],\"display\":[1],\"fontFamily\":[1,\"font-family\"]}],[1,\"grw-loader\",{\"colorPrimaryContainer\":[1,\"color-primary-container\"],\"colorOnPrimaryContainer\":[1,\"color-on-primary-container\"]}],[1,\"grw-map\",{\"nameLayer\":[1,\"name-layer\"],\"urlLayer\":[1,\"url-layer\"],\"attributionLayer\":[1,\"attribution-layer\"],\"center\":[1],\"zoom\":[2],\"fontFamily\":[1,\"font-family\"],\"colorPrimaryApp\":[1,\"color-primary-app\"],\"colorOnSurface\":[1,\"color-on-surface\"],\"colorPrimaryContainer\":[1,\"color-primary-container\"],\"colorOnPrimaryContainer\":[1,\"color-on-primary-container\"],\"colorBackground\":[1,\"color-background\"],\"colorTrekLine\":[1,\"color-trek-line\"],\"colorSensitiveArea\":[1,\"color-sensitive-area\"],\"colorPoiIcon\":[1,\"color-poi-icon\"],\"useGradient\":[4,\"use-gradient\"],\"resetStoreOnDisconnected\":[4,\"reset-store-on-disconnected\"],\"isLargeView\":[4,\"is-large-view\"],\"mapIsReady\":[32]},[[8,\"centerOnMap\",\"onCenterOnMap\"],[8,\"stepsIsInViewport\",\"stepsIsInViewport\"],[8,\"descriptionIsInViewport\",\"descriptionIsInViewport\"],[8,\"parkingIsInViewport\",\"parkingIsInViewport\"],[8,\"informationDeskIsInViewport\",\"onInformationDesksIsInViewport\"],[8,\"sensitiveAreaIsInViewport\",\"sensitiveAreaIsInViewport\"],[8,\"poiIsInViewport\",\"poiIsInViewport\"],[8,\"touristicContentsIsInViewport\",\"touristicContentsIsInViewport\"],[8,\"touristicEventsIsInViewport\",\"touristicEventsIsInViewport\"],[8,\"cardTrekMouseOver\",\"onCardTrekMouseOver\"],[8,\"cardTrekMouseLeave\",\"onCardTrekMouseLeave\"],[8,\"cardTouristicContentMouseOver\",\"onTouristicContentMouseOver\"],[8,\"cardTouristicContentMouseLeave\",\"onTouristicContentMouseLeave\"],[8,\"cardTouristicEventMouseOver\",\"onTouristicEventMouseOver\"],[8,\"cardTouristicEventMouseLeave\",\"onTouristicEventMouseLeave\"]]],[1,\"grw-search\",{\"fontFamily\":[1,\"font-family\"]}],[1,\"grw-segmented-segment\",{\"treks\":[4],\"touristicContents\":[4,\"touristic-contents\"],\"touristicEvents\":[4,\"touristic-events\"],\"fontFamily\":[1,\"font-family\"]}],[1,\"grw-select-language\"],[1,\"grw-touristic-content-detail\",{\"fontFamily\":[1,\"font-family\"],\"colorPrimaryApp\":[1,\"color-primary-app\"],\"colorOnSurface\":[1,\"color-on-surface\"],\"colorPrimaryContainer\":[1,\"color-primary-container\"],\"colorOnPrimaryContainer\":[1,\"color-on-primary-container\"],\"colorSecondaryContainer\":[1,\"color-secondary-container\"],\"colorOnSecondaryContainer\":[1,\"color-on-secondary-container\"],\"colorSurfaceContainerLow\":[1,\"color-surface-container-low\"],\"colorBackground\":[1,\"color-background\"],\"isLargeView\":[4,\"is-large-view\"],\"displayFullscreen\":[32]}],[1,\"grw-touristic-content-provider\",{\"languages\":[1],\"api\":[1],\"touristicContentId\":[1,\"touristic-content-id\"],\"portals\":[1]}],[1,\"grw-touristic-contents-provider\",{\"languages\":[1],\"api\":[1],\"inBbox\":[1,\"in-bbox\"],\"cities\":[1],\"districts\":[1],\"structures\":[1],\"themes\":[1],\"portals\":[1]}],[1,\"grw-touristic-event-detail\",{\"fontFamily\":[1,\"font-family\"],\"colorPrimaryApp\":[1,\"color-primary-app\"],\"colorOnSurface\":[1,\"color-on-surface\"],\"colorPrimaryContainer\":[1,\"color-primary-container\"],\"colorOnPrimaryContainer\":[1,\"color-on-primary-container\"],\"colorSecondaryContainer\":[1,\"color-secondary-container\"],\"colorOnSecondaryContainer\":[1,\"color-on-secondary-container\"],\"colorSurfaceContainerLow\":[1,\"color-surface-container-low\"],\"colorBackground\":[1,\"color-background\"],\"isLargeView\":[4,\"is-large-view\"],\"displayFullscreen\":[32]}],[1,\"grw-touristic-event-provider\",{\"languages\":[1],\"api\":[1],\"touristicEventId\":[1,\"touristic-event-id\"],\"portals\":[1]}],[1,\"grw-touristic-events-provider\",{\"languages\":[1],\"api\":[1],\"inBbox\":[1,\"in-bbox\"],\"cities\":[1],\"districts\":[1],\"structures\":[1],\"themes\":[1],\"portals\":[1]}],[1,\"grw-trek-provider\",{\"languages\":[1],\"api\":[1],\"trekId\":[1,\"trek-id\"],\"portals\":[1]}],[1,\"grw-treks-provider\",{\"languages\":[1],\"api\":[1],\"inBbox\":[1,\"in-bbox\"],\"cities\":[1],\"districts\":[1],\"structures\":[1],\"themes\":[1],\"portals\":[1],\"routes\":[1],\"practices\":[1]}],[1,\"grw-filter\",{\"fontFamily\":[1,\"font-family\"],\"filterType\":[1,\"filter-type\"],\"filterName\":[1,\"filter-name\"],\"filterPlaceholder\":[1,\"filter-placeholder\"],\"filterNameProperty\":[1,\"filter-name-property\"],\"segment\":[1]},[[8,\"resetFilter\",\"onResetFilter\"]]],[1,\"grw-information-desk\",{\"informationDesk\":[16],\"displayShortDescription\":[32],\"showInformationDeskDescriptionButton\":[32]}],[1,\"grw-poi\",{\"poi\":[16],\"displayShortDescription\":[32],\"showPoiDescriptionButton\":[32],\"displayFullscreen\":[32]}],[1,\"grw-sensitive-area-detail\",{\"sensitiveArea\":[16]}],[1,\"grw-touristic-content-card\",{\"fontFamily\":[1,\"font-family\"],\"touristicContent\":[16],\"isLargeView\":[4,\"is-large-view\"],\"isInsideHorizontalList\":[4,\"is-inside-horizontal-list\"],\"displayFullscreen\":[32]},[[1,\"mouseover\",\"handleMouseOver\"],[1,\"mouseleave\",\"handleMouseLeave\"]]],[1,\"grw-touristic-event-card\",{\"fontFamily\":[1,\"font-family\"],\"touristicEvent\":[16],\"isLargeView\":[4,\"is-large-view\"],\"isInsideHorizontalList\":[4,\"is-inside-horizontal-list\"],\"displayFullscreen\":[32]},[[1,\"mouseover\",\"handleMouseOver\"],[1,\"mouseleave\",\"handleMouseLeave\"]]],[1,\"grw-trek-card\",{\"trek\":[16],\"fontFamily\":[1,\"font-family\"],\"colorPrimaryApp\":[1,\"color-primary-app\"],\"colorOnSurface\":[1,\"color-on-surface\"],\"colorSecondaryContainer\":[1,\"color-secondary-container\"],\"colorOnSecondaryContainer\":[1,\"color-on-secondary-container\"],\"colorSurfaceContainerLow\":[1,\"color-surface-container-low\"],\"isLargeView\":[4,\"is-large-view\"],\"resetStoreOnDisconnected\":[4,\"reset-store-on-disconnected\"],\"isStep\":[4,\"is-step\"],\"currentTrek\":[32],\"difficulty\":[32],\"route\":[32],\"practice\":[32],\"themes\":[32],\"departureCity\":[32]},[[1,\"mouseover\",\"handleMouseOver\"],[1,\"mouseleave\",\"handleMouseLeave\"]]]]]]"), options);
114
114
  });
115
115
 
116
116
  //# sourceMappingURL=geotrek-rando-widget.js.map
Binary file
Binary file