@geotrekce/geotrek-rando-widget 0.4.2 → 0.4.3

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 (205) 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.cjs.entry.js +2 -2
  5. package/dist/cjs/grw-app.cjs.entry.js.br +0 -0
  6. package/dist/cjs/grw-app.cjs.entry.js.gz +0 -0
  7. package/dist/cjs/grw-app.cjs.entry.js.map +1 -1
  8. package/dist/cjs/grw-filters_12.cjs.entry.js +46 -38
  9. package/dist/cjs/grw-filters_12.cjs.entry.js.br +0 -0
  10. package/dist/cjs/grw-filters_12.cjs.entry.js.gz +0 -0
  11. package/dist/cjs/grw-filters_12.cjs.entry.js.map +1 -1
  12. package/dist/cjs/grw-touristic-event-card-provider.cjs.entry.js +6 -5
  13. package/dist/cjs/grw-touristic-event-card-provider.cjs.entry.js.br +0 -0
  14. package/dist/cjs/grw-touristic-event-card-provider.cjs.entry.js.gz +0 -0
  15. package/dist/cjs/grw-touristic-event-card-provider.cjs.entry.js.map +1 -1
  16. package/dist/cjs/{i18n-cfc000c9.js → i18n-e2c62fa9.js} +7 -5
  17. package/dist/cjs/i18n-e2c62fa9.js.br +0 -0
  18. package/dist/cjs/i18n-e2c62fa9.js.gz +0 -0
  19. package/dist/cjs/i18n-e2c62fa9.js.map +1 -0
  20. package/dist/cjs/loader.cjs.js +1 -1
  21. package/dist/cjs/loader.cjs.js.br +0 -0
  22. package/dist/cjs/loader.cjs.js.gz +0 -0
  23. package/dist/cjs/utils-332e41b3.js.map +1 -1
  24. package/dist/collection/components/grw-app/grw-app.js +1 -1
  25. package/dist/collection/components/grw-app/grw-app.js.br +0 -0
  26. package/dist/collection/components/grw-app/grw-app.js.gz +0 -0
  27. package/dist/collection/components/grw-app/grw-app.js.map +1 -1
  28. package/dist/collection/components/grw-filters/grw-filters.js +1 -1
  29. package/dist/collection/components/grw-filters/grw-filters.js.br +0 -0
  30. package/dist/collection/components/grw-filters/grw-filters.js.gz +0 -0
  31. package/dist/collection/components/grw-filters/grw-filters.js.map +1 -1
  32. package/dist/collection/components/grw-map/grw-map.js +16 -20
  33. package/dist/collection/components/grw-map/grw-map.js.br +0 -0
  34. package/dist/collection/components/grw-map/grw-map.js.gz +0 -0
  35. package/dist/collection/components/grw-map/grw-map.js.map +1 -1
  36. package/dist/collection/components/grw-touristic-content-detail/grw-touristic-content-detail.js +1 -1
  37. package/dist/collection/components/grw-touristic-content-detail/grw-touristic-content-detail.js.br +0 -0
  38. package/dist/collection/components/grw-touristic-content-detail/grw-touristic-content-detail.js.gz +0 -0
  39. package/dist/collection/components/grw-touristic-content-detail/grw-touristic-content-detail.js.map +1 -1
  40. package/dist/collection/components/grw-touristic-event-detail/grw-touristic-event-detail.js +1 -1
  41. package/dist/collection/components/grw-touristic-event-detail/grw-touristic-event-detail.js.br +0 -0
  42. package/dist/collection/components/grw-touristic-event-detail/grw-touristic-event-detail.js.gz +0 -0
  43. package/dist/collection/components/grw-touristic-event-detail/grw-touristic-event-detail.js.map +1 -1
  44. package/dist/collection/components/grw-trek-detail/grw-trek-detail.js +1 -1
  45. package/dist/collection/components/grw-trek-detail/grw-trek-detail.js.br +0 -0
  46. package/dist/collection/components/grw-trek-detail/grw-trek-detail.js.gz +0 -0
  47. package/dist/collection/components/grw-trek-detail/grw-trek-detail.js.map +1 -1
  48. package/dist/collection/i18n/i18n.js +6 -4
  49. package/dist/collection/i18n/i18n.js.br +0 -0
  50. package/dist/collection/i18n/i18n.js.gz +0 -0
  51. package/dist/collection/i18n/i18n.js.map +1 -1
  52. package/dist/collection/store/grw-touristic-content-provider.js +19 -1
  53. package/dist/collection/store/grw-touristic-content-provider.js.br +0 -0
  54. package/dist/collection/store/grw-touristic-content-provider.js.gz +0 -0
  55. package/dist/collection/store/grw-touristic-content-provider.js.map +1 -1
  56. package/dist/collection/store/grw-touristic-contents-provider.js +1 -1
  57. package/dist/collection/store/grw-touristic-contents-provider.js.br +0 -0
  58. package/dist/collection/store/grw-touristic-contents-provider.js.gz +0 -0
  59. package/dist/collection/store/grw-touristic-contents-provider.js.map +1 -1
  60. package/dist/collection/store/grw-touristic-event-provider.js +23 -5
  61. package/dist/collection/store/grw-touristic-event-provider.js.br +0 -0
  62. package/dist/collection/store/grw-touristic-event-provider.js.gz +0 -0
  63. package/dist/collection/store/grw-touristic-event-provider.js.map +1 -1
  64. package/dist/collection/store/grw-trek-provider.js +33 -5
  65. package/dist/collection/store/grw-trek-provider.js.br +0 -0
  66. package/dist/collection/store/grw-trek-provider.js.gz +0 -0
  67. package/dist/collection/store/grw-trek-provider.js.map +1 -1
  68. package/dist/collection/store/grw-treks-provider.js +6 -6
  69. package/dist/collection/store/grw-treks-provider.js.br +0 -0
  70. package/dist/collection/store/grw-treks-provider.js.gz +0 -0
  71. package/dist/collection/store/grw-treks-provider.js.map +1 -1
  72. package/dist/collection/utils/utils.js.map +1 -1
  73. package/dist/esm/geotrek-rando-widget.js +1 -1
  74. package/dist/esm/geotrek-rando-widget.js.br +0 -0
  75. package/dist/esm/geotrek-rando-widget.js.gz +0 -0
  76. package/dist/esm/grw-app.entry.js +2 -2
  77. package/dist/esm/grw-app.entry.js.br +0 -0
  78. package/dist/esm/grw-app.entry.js.gz +0 -0
  79. package/dist/esm/grw-app.entry.js.map +1 -1
  80. package/dist/esm/grw-filters_12.entry.js +46 -38
  81. package/dist/esm/grw-filters_12.entry.js.br +0 -0
  82. package/dist/esm/grw-filters_12.entry.js.gz +0 -0
  83. package/dist/esm/grw-filters_12.entry.js.map +1 -1
  84. package/dist/esm/grw-touristic-event-card-provider.entry.js +6 -5
  85. package/dist/esm/grw-touristic-event-card-provider.entry.js.br +0 -0
  86. package/dist/esm/grw-touristic-event-card-provider.entry.js.gz +0 -0
  87. package/dist/esm/grw-touristic-event-card-provider.entry.js.map +1 -1
  88. package/dist/esm/{i18n-60e9fdd3.js → i18n-b5c3a8d7.js} +7 -5
  89. package/dist/esm/i18n-b5c3a8d7.js.br +0 -0
  90. package/dist/esm/i18n-b5c3a8d7.js.gz +0 -0
  91. package/dist/esm/i18n-b5c3a8d7.js.map +1 -0
  92. package/dist/esm/loader.js +1 -1
  93. package/dist/esm/loader.js.br +0 -0
  94. package/dist/esm/loader.js.gz +0 -0
  95. package/dist/esm/utils-b09ac7c9.js.map +1 -1
  96. package/dist/esm-es5/geotrek-rando-widget.js +1 -1
  97. package/dist/esm-es5/geotrek-rando-widget.js.br +0 -0
  98. package/dist/esm-es5/geotrek-rando-widget.js.gz +0 -0
  99. package/dist/esm-es5/geotrek-rando-widget.js.map +1 -1
  100. package/dist/esm-es5/grw-app.entry.js +1 -1
  101. package/dist/esm-es5/grw-app.entry.js.br +0 -0
  102. package/dist/esm-es5/grw-app.entry.js.gz +0 -0
  103. package/dist/esm-es5/grw-app.entry.js.map +1 -1
  104. package/dist/esm-es5/grw-filters_12.entry.js +3 -3
  105. package/dist/esm-es5/grw-filters_12.entry.js.br +0 -0
  106. package/dist/esm-es5/grw-filters_12.entry.js.gz +0 -0
  107. package/dist/esm-es5/grw-filters_12.entry.js.map +1 -1
  108. package/dist/esm-es5/grw-touristic-event-card-provider.entry.js +1 -1
  109. package/dist/esm-es5/grw-touristic-event-card-provider.entry.js.br +0 -0
  110. package/dist/esm-es5/grw-touristic-event-card-provider.entry.js.gz +0 -0
  111. package/dist/esm-es5/grw-touristic-event-card-provider.entry.js.map +1 -1
  112. package/dist/esm-es5/i18n-b5c3a8d7.js +2 -0
  113. package/dist/esm-es5/i18n-b5c3a8d7.js.br +0 -0
  114. package/dist/esm-es5/i18n-b5c3a8d7.js.gz +0 -0
  115. package/dist/esm-es5/i18n-b5c3a8d7.js.map +1 -0
  116. package/dist/esm-es5/loader.js +1 -1
  117. package/dist/esm-es5/loader.js.br +0 -0
  118. package/dist/esm-es5/loader.js.gz +0 -0
  119. package/dist/esm-es5/loader.js.map +1 -1
  120. package/dist/esm-es5/utils-b09ac7c9.js.map +1 -1
  121. package/dist/geotrek-rando-widget/geotrek-rando-widget.esm.js +1 -1
  122. package/dist/geotrek-rando-widget/geotrek-rando-widget.esm.js.br +0 -0
  123. package/dist/geotrek-rando-widget/geotrek-rando-widget.esm.js.gz +0 -0
  124. package/dist/geotrek-rando-widget/geotrek-rando-widget.esm.js.map +1 -1
  125. package/dist/geotrek-rando-widget/p-01d57fd7.entry.js +2 -0
  126. package/dist/geotrek-rando-widget/p-01d57fd7.entry.js.br +0 -0
  127. package/dist/geotrek-rando-widget/p-01d57fd7.entry.js.gz +0 -0
  128. package/dist/geotrek-rando-widget/{p-d5584258.entry.js.map → p-01d57fd7.entry.js.map} +1 -1
  129. package/dist/geotrek-rando-widget/p-1f8e7e57.js.map +1 -1
  130. package/dist/geotrek-rando-widget/p-23c34829.js +2 -0
  131. package/dist/geotrek-rando-widget/p-23c34829.js.br +0 -0
  132. package/dist/geotrek-rando-widget/p-23c34829.js.gz +0 -0
  133. package/dist/geotrek-rando-widget/p-23c34829.js.map +1 -0
  134. package/dist/geotrek-rando-widget/{p-3c32c109.system.entry.js → p-2545bc2a.system.entry.js} +2 -2
  135. package/dist/geotrek-rando-widget/p-2545bc2a.system.entry.js.br +0 -0
  136. package/dist/geotrek-rando-widget/p-2545bc2a.system.entry.js.gz +0 -0
  137. package/dist/geotrek-rando-widget/{p-3c32c109.system.entry.js.map → p-2545bc2a.system.entry.js.map} +1 -1
  138. package/dist/geotrek-rando-widget/p-42ee320d.entry.js +2 -0
  139. package/dist/geotrek-rando-widget/p-42ee320d.entry.js.br +0 -0
  140. package/dist/geotrek-rando-widget/p-42ee320d.entry.js.gz +0 -0
  141. package/dist/geotrek-rando-widget/p-42ee320d.entry.js.map +1 -0
  142. package/dist/geotrek-rando-widget/{p-feeb03a9.system.entry.js → p-4d2be020.system.entry.js} +3 -3
  143. package/dist/geotrek-rando-widget/p-4d2be020.system.entry.js.br +0 -0
  144. package/dist/geotrek-rando-widget/{p-feeb03a9.system.entry.js.gz → p-4d2be020.system.entry.js.gz} +0 -0
  145. package/dist/geotrek-rando-widget/p-4d2be020.system.entry.js.map +1 -0
  146. package/dist/geotrek-rando-widget/p-7b61eee1.system.js +2 -0
  147. package/dist/geotrek-rando-widget/p-7b61eee1.system.js.br +0 -0
  148. package/dist/geotrek-rando-widget/p-7b61eee1.system.js.gz +0 -0
  149. package/dist/geotrek-rando-widget/p-7b61eee1.system.js.map +1 -0
  150. package/dist/geotrek-rando-widget/p-c63228e8.system.js.map +1 -1
  151. package/dist/geotrek-rando-widget/p-cc8a7df2.system.js +1 -1
  152. package/dist/geotrek-rando-widget/p-cc8a7df2.system.js.br +0 -0
  153. package/dist/geotrek-rando-widget/p-cc8a7df2.system.js.gz +0 -0
  154. package/dist/geotrek-rando-widget/p-cc8a7df2.system.js.map +1 -1
  155. package/dist/geotrek-rando-widget/p-ea78e5f0.system.entry.js +2 -0
  156. package/dist/geotrek-rando-widget/p-ea78e5f0.system.entry.js.br +0 -0
  157. package/dist/geotrek-rando-widget/p-ea78e5f0.system.entry.js.gz +0 -0
  158. package/dist/geotrek-rando-widget/p-ea78e5f0.system.entry.js.map +1 -0
  159. package/dist/geotrek-rando-widget/{p-bcd87b5c.entry.js → p-eb0e19d4.entry.js} +3 -3
  160. package/dist/geotrek-rando-widget/p-eb0e19d4.entry.js.br +0 -0
  161. package/dist/geotrek-rando-widget/p-eb0e19d4.entry.js.gz +0 -0
  162. package/dist/geotrek-rando-widget/p-eb0e19d4.entry.js.map +1 -0
  163. package/dist/types/components/grw-map/grw-map.d.ts +2 -2
  164. package/dist/types/components.d.ts +6 -0
  165. package/dist/types/i18n/i18n.d.ts +1 -0
  166. package/dist/types/store/grw-touristic-content-provider.d.ts +1 -0
  167. package/dist/types/store/grw-touristic-event-provider.d.ts +1 -0
  168. package/dist/types/store/grw-trek-provider.d.ts +1 -0
  169. package/package.json +1 -1
  170. package/dist/cjs/i18n-cfc000c9.js.br +0 -0
  171. package/dist/cjs/i18n-cfc000c9.js.gz +0 -0
  172. package/dist/cjs/i18n-cfc000c9.js.map +0 -1
  173. package/dist/esm/i18n-60e9fdd3.js.br +0 -0
  174. package/dist/esm/i18n-60e9fdd3.js.gz +0 -0
  175. package/dist/esm/i18n-60e9fdd3.js.map +0 -1
  176. package/dist/esm-es5/i18n-60e9fdd3.js +0 -2
  177. package/dist/esm-es5/i18n-60e9fdd3.js.br +0 -0
  178. package/dist/esm-es5/i18n-60e9fdd3.js.gz +0 -0
  179. package/dist/esm-es5/i18n-60e9fdd3.js.map +0 -1
  180. package/dist/geotrek-rando-widget/p-3c32c109.system.entry.js.br +0 -0
  181. package/dist/geotrek-rando-widget/p-3c32c109.system.entry.js.gz +0 -0
  182. package/dist/geotrek-rando-widget/p-7ce01b3c.entry.js +0 -2
  183. package/dist/geotrek-rando-widget/p-7ce01b3c.entry.js.br +0 -0
  184. package/dist/geotrek-rando-widget/p-7ce01b3c.entry.js.gz +0 -0
  185. package/dist/geotrek-rando-widget/p-7ce01b3c.entry.js.map +0 -1
  186. package/dist/geotrek-rando-widget/p-7eca502d.js +0 -2
  187. package/dist/geotrek-rando-widget/p-7eca502d.js.br +0 -0
  188. package/dist/geotrek-rando-widget/p-7eca502d.js.gz +0 -0
  189. package/dist/geotrek-rando-widget/p-7eca502d.js.map +0 -1
  190. package/dist/geotrek-rando-widget/p-9bc873ce.system.entry.js +0 -2
  191. package/dist/geotrek-rando-widget/p-9bc873ce.system.entry.js.br +0 -0
  192. package/dist/geotrek-rando-widget/p-9bc873ce.system.entry.js.gz +0 -0
  193. package/dist/geotrek-rando-widget/p-9bc873ce.system.entry.js.map +0 -1
  194. package/dist/geotrek-rando-widget/p-b92fdd4e.system.js +0 -2
  195. package/dist/geotrek-rando-widget/p-b92fdd4e.system.js.br +0 -0
  196. package/dist/geotrek-rando-widget/p-b92fdd4e.system.js.gz +0 -0
  197. package/dist/geotrek-rando-widget/p-b92fdd4e.system.js.map +0 -1
  198. package/dist/geotrek-rando-widget/p-bcd87b5c.entry.js.br +0 -0
  199. package/dist/geotrek-rando-widget/p-bcd87b5c.entry.js.gz +0 -0
  200. package/dist/geotrek-rando-widget/p-bcd87b5c.entry.js.map +0 -1
  201. package/dist/geotrek-rando-widget/p-d5584258.entry.js +0 -2
  202. package/dist/geotrek-rando-widget/p-d5584258.entry.js.br +0 -0
  203. package/dist/geotrek-rando-widget/p-d5584258.entry.js.gz +0 -0
  204. package/dist/geotrek-rando-widget/p-feeb03a9.system.entry.js.br +0 -0
  205. package/dist/geotrek-rando-widget/p-feeb03a9.system.entry.js.map +0 -1
@@ -10,6 +10,7 @@ const GrwTouristicEventProvider = class {
10
10
  this.languages = 'fr';
11
11
  this.api = undefined;
12
12
  this.touristicEventId = undefined;
13
+ this.portals = undefined;
13
14
  }
14
15
  connectedCallback() {
15
16
  if (!state.api) {
@@ -22,21 +23,21 @@ const GrwTouristicEventProvider = class {
22
23
  handleTouristicEvent() {
23
24
  const requests = [];
24
25
  requests.push(!state.cities ? fetch(`${state.api}city/?language=${state.language}&fields=id,name&published=true&page_size=999`, this.init) : new Response('null'));
25
- requests.push(!state.touristicContentCategories
26
- ? fetch(`${state.api}touristicevent_type/?language=${state.language}&published=true&fields=id,type,pictogram&page_size=999`, this.init)
26
+ requests.push(!state.touristicEventTypes
27
+ ? fetch(`${state.api}touristicevent_type/?language=${state.language}${this.portals ? '&portals='.concat(this.portals) : ''}&published=true&fields=id,type,pictogram&page_size=999`, this.init)
27
28
  : new Response('null'));
28
29
  Promise.all([
29
30
  ...requests,
30
31
  fetch(`${state.api}touristicevent/${this.touristicEventId}/?language=${state.language}&fields=id,name,attachments,description,description_teaser,type,geometry,cities,pdf,practical_info,contact,email,website&published=true`, this.init),
31
32
  ])
32
33
  .then(responses => Promise.all(responses.map(response => response.json())))
33
- .then(([cities, touristicContentTypes, touristicEvent]) => {
34
+ .then(([cities, touristicEventTypes, touristicEvent]) => {
34
35
  state.trekNetworkError = false;
35
36
  if (cities) {
36
37
  state.cities = cities.results;
37
38
  }
38
- if (touristicContentTypes) {
39
- state.touristicEventTypes = touristicContentTypes.results;
39
+ if (touristicEventTypes) {
40
+ state.touristicEventTypes = touristicEventTypes.results;
40
41
  }
41
42
  state.currentTouristicEvent = touristicEvent;
42
43
  })
@@ -1 +1 @@
1
- {"file":"grw-touristic-event-card-provider.entry.js","mappings":";;;MAOa,yBAAyB;;;IAIpC,eAAU,GAAG,IAAI,eAAe,EAAE,CAAC;IACnC,WAAM,GAAG,IAAI,CAAC,UAAU,CAAC,MAAM,CAAC;IAChC,SAAI,GAAgB,EAAE,KAAK,EAAgC,SAAS,EAAE,MAAM,EAAE,IAAI,CAAC,MAAM,EAAE,CAAC;qBALxE,IAAI;;;;EAOxB,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,oBAAoB,EAAE,CAAC;GAC7B;EAED,oBAAoB;IAClB,MAAM,QAAQ,GAAG,EAAE,CAAC;IACpB,QAAQ,CAAC,IAAI,CAAC,CAAC,KAAK,CAAC,MAAM,GAAG,KAAK,CAAC,GAAG,KAAK,CAAC,GAAG,kBAAkB,KAAK,CAAC,QAAQ,8CAA8C,EAAE,IAAI,CAAC,IAAI,CAAC,GAAG,IAAI,QAAQ,CAAC,MAAM,CAAC,CAAC,CAAC;IACnK,QAAQ,CAAC,IAAI,CACX,CAAC,KAAK,CAAC,0BAA0B;QAC7B,KAAK,CAAC,GAAG,KAAK,CAAC,GAAG,iCAAiC,KAAK,CAAC,QAAQ,wDAAwD,EAAE,IAAI,CAAC,IAAI,CAAC;QACrI,IAAI,QAAQ,CAAC,MAAM,CAAC,CACzB,CAAC;IAEF,OAAO,CAAC,GAAG,CAAC;MACV,GAAG,QAAQ;MACX,KAAK,CACH,GAAG,KAAK,CAAC,GAAG,kBAAkB,IAAI,CAAC,gBAAgB,cAAc,KAAK,CAAC,QAAQ,yIAAyI,EACxN,IAAI,CAAC,IAAI,CACV;KACF,CAAC;OACC,IAAI,CAAC,SAAS,IAAI,OAAO,CAAC,GAAG,CAAC,SAAS,CAAC,GAAG,CAAC,QAAQ,IAAI,QAAQ,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC;OAC1E,IAAI,CAAC,CAAC,CAAC,MAAM,EAAE,qBAAqB,EAAE,cAAc,CAAC;MACpD,KAAK,CAAC,gBAAgB,GAAG,KAAK,CAAC;MAE/B,IAAI,MAAM,EAAE;QACV,KAAK,CAAC,MAAM,GAAG,MAAM,CAAC,OAAO,CAAC;OAC/B;MACD,IAAI,qBAAqB,EAAE;QACzB,KAAK,CAAC,mBAAmB,GAAG,qBAAqB,CAAC,OAAO,CAAC;OAC3D;MACD,KAAK,CAAC,qBAAqB,GAAG,cAAc,CAAC;KAC9C,CAAC;OACD,KAAK,CAAC;MACL,KAAK,CAAC,gBAAgB,GAAG,IAAI,CAAC;KAC/B,CAAC,CAAC;GACN;EAED,oBAAoB;IAClB,IAAI,CAAC,UAAU,CAAC,KAAK,EAAE,CAAC;IACxB,KAAK,CAAC,gBAAgB,GAAG,KAAK,CAAC;GAChC;EAED,MAAM;IACJ,OAAO,EAAC,IAAI,OAAQ,CAAC;GACtB;;;;;","names":[],"sources":["./src/store/grw-touristic-event-provider.tsx"],"sourcesContent":["import { Build, Component, h, Host, Prop } from '@stencil/core';\nimport state from 'store/store';\n\n@Component({\n tag: 'grw-touristic-event-card-provider',\n shadow: true,\n})\nexport class GrwTouristicEventProvider {\n @Prop() languages = 'fr';\n @Prop() api: string;\n @Prop() touristicEventId: string;\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.handleTouristicEvent();\n }\n\n handleTouristicEvent() {\n const requests = [];\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.touristicContentCategories\n ? fetch(`${state.api}touristicevent_type/?language=${state.language}&published=true&fields=id,type,pictogram&page_size=999`, this.init)\n : new Response('null'),\n );\n\n Promise.all([\n ...requests,\n fetch(\n `${state.api}touristicevent/${this.touristicEventId}/?language=${state.language}&fields=id,name,attachments,description,description_teaser,type,geometry,cities,pdf,practical_info,contact,email,website&published=true`,\n this.init,\n ),\n ])\n .then(responses => Promise.all(responses.map(response => response.json())))\n .then(([cities, touristicContentTypes, touristicEvent]) => {\n state.trekNetworkError = false;\n\n if (cities) {\n state.cities = cities.results;\n }\n if (touristicContentTypes) {\n state.touristicEventTypes = touristicContentTypes.results;\n }\n state.currentTouristicEvent = touristicEvent;\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"],"version":3}
1
+ {"file":"grw-touristic-event-card-provider.entry.js","mappings":";;;MAOa,yBAAyB;;;IAMpC,eAAU,GAAG,IAAI,eAAe,EAAE,CAAC;IACnC,WAAM,GAAG,IAAI,CAAC,UAAU,CAAC,MAAM,CAAC;IAChC,SAAI,GAAgB,EAAE,KAAK,EAAgC,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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AAM,GAAG,MAAM,CAAC,OAAO,CAAC;OAC/B;MACD,IAAI,mBAAmB,EAAE;QACvB,KAAK,CAAC,mBAAmB,GAAG,mBAAmB,CAAC,OAAO,CAAC;OACzD;MACD,KAAK,CAAC,qBAAqB,GAAG,cAAc,CAAC;KAC9C,CAAC;OACD,KAAK,CAAC;MACL,KAAK,CAAC,gBAAgB,GAAG,IAAI,CAAC;KAC/B,CAAC,CAAC;GACN;EAED,oBAAoB;IAClB,IAAI,CAAC,UAAU,CAAC,KAAK,EAAE,CAAC;IACxB,KAAK,CAAC,gBAAgB,GAAG,KAAK,CAAC;GAChC;EAED,MAAM;IACJ,OAAO,EAAC,IAAI,OAAQ,CAAC;GACtB;;;;;","names":[],"sources":["./src/store/grw-touristic-event-provider.tsx"],"sourcesContent":["import { Build, Component, h, Host, Prop } from '@stencil/core';\nimport state from 'store/store';\n\n@Component({\n tag: 'grw-touristic-event-card-provider',\n shadow: true,\n})\nexport class GrwTouristicEventProvider {\n @Prop() languages = 'fr';\n @Prop() api: string;\n @Prop() touristicEventId: 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.handleTouristicEvent();\n }\n\n handleTouristicEvent() {\n const requests = [];\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.touristicEventTypes\n ? fetch(\n `${state.api}touristicevent_type/?language=${state.language}${\n this.portals ? '&portals='.concat(this.portals) : ''\n }&published=true&fields=id,type,pictogram&page_size=999`,\n this.init,\n )\n : new Response('null'),\n );\n\n Promise.all([\n ...requests,\n fetch(\n `${state.api}touristicevent/${this.touristicEventId}/?language=${state.language}&fields=id,name,attachments,description,description_teaser,type,geometry,cities,pdf,practical_info,contact,email,website&published=true`,\n this.init,\n ),\n ])\n .then(responses => Promise.all(responses.map(response => response.json())))\n .then(([cities, touristicEventTypes, touristicEvent]) => {\n state.trekNetworkError = false;\n\n if (cities) {\n state.cities = cities.results;\n }\n if (touristicEventTypes) {\n state.touristicEventTypes = touristicEventTypes.results;\n }\n state.currentTouristicEvent = touristicEvent;\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"],"version":3}
@@ -37,12 +37,12 @@ const translate = {
37
37
  touristicEvents: (touristicEventsLength) => `Événements (${touristicEventsLength})`,
38
38
  sources: 'Sources',
39
39
  city: 'Commune',
40
- crossedCities: 'Communes traversées',
40
+ crossedCities: 'Communes',
41
41
  placeholderCrossedCities: 'Sélectionner une ou plusieurs communes',
42
42
  home: {
43
43
  segment: {
44
44
  treks: 'Itinéraires',
45
- touristicContents: 'À proximité',
45
+ touristicContents: 'Services',
46
46
  },
47
47
  touristicContents: 'à proximité',
48
48
  touristicContent: 'à proximité',
@@ -70,6 +70,7 @@ const translate = {
70
70
  },
71
71
  themes: 'Thèmes',
72
72
  placeholderThemes: 'Sélectionner un ou plusieurs thèmes',
73
+ placeholderPractices: 'Sélectionner une ou plusieurs pratiques',
73
74
  routes: 'Type de parcours',
74
75
  elevation: 'Denivelé positif',
75
76
  activities: 'Activités',
@@ -123,12 +124,12 @@ const translate = {
123
124
  touristicEvents: (touristicEventsLength) => `Events (${touristicEventsLength})`,
124
125
  sources: 'Sources',
125
126
  city: 'City',
126
- crossedCities: 'Cities crossed',
127
+ crossedCities: 'Cities',
127
128
  placeholderCrossedCities: 'Select one or more municipalities',
128
129
  home: {
129
130
  segment: {
130
131
  treks: 'Routes',
131
- touristicContents: 'Near',
132
+ touristicContents: 'Services',
132
133
  },
133
134
  touristicContents: 'near',
134
135
  touristicContent: 'near',
@@ -156,6 +157,7 @@ const translate = {
156
157
  },
157
158
  themes: 'Themes',
158
159
  placeholderThemes: 'Select one or more themes',
160
+ placeholderPractices: 'Select one or more practices',
159
161
  routes: 'Type of course',
160
162
  elevation: 'Positive elevation',
161
163
  activities: 'Activities',
@@ -175,4 +177,4 @@ const translate = {
175
177
 
176
178
  export { translate as t };
177
179
 
178
- //# sourceMappingURL=i18n-60e9fdd3.js.map
180
+ //# sourceMappingURL=i18n-b5c3a8d7.js.map
Binary file
Binary file
@@ -0,0 +1 @@
1
+ {"file":"i18n-b5c3a8d7.js","mappings":"MA6Fa,SAAS,GAA0B;EAC9C,EAAE,EAAE;IACF,MAAM,EAAE,SAAS;IACjB,QAAQ,EAAE,UAAU;IACpB,UAAU,EAAE,YAAY;IACxB,QAAQ,EAAE,OAAO;IACjB,MAAM,EAAE,UAAU;IAClB,KAAK,EAAE,aAAa;IACpB,IAAI,EAAE,YAAY;IAClB,QAAQ,EAAE,eAAe;IACzB,OAAO,EAAE,eAAe;IACxB,SAAS,EAAE,mBAAmB;IAC9B,WAAW,EAAE,eAAe;IAC5B,QAAQ,EAAE,gBAAgB;IAC1B,SAAS,EAAE,iBAAiB;IAC5B,WAAW,EAAE,aAAa;IAC1B,SAAS,EAAE,QAAQ;IACnB,OAAO,EAAE,SAAS;IAClB,gBAAgB,EAAE,qBAAqB;IACvC,UAAU,EAAE,eAAe;IAC3B,SAAS,EAAE,WAAW;IACtB,eAAe,EAAE,iBAAiB;IAClC,kBAAkB,EAAE,mBAAmB;IACvC,UAAU,EAAE,aAAa;IACzB,2BAA2B,EAAE,uCAAuC;IACpE,iBAAiB,EAAE,wBAAwB;IAC3C,aAAa,EAAE,eAAe;IAC9B,kBAAkB,EAAE,wBAAwB;IAC5C,kBAAkB,EAAE,OAAO;IAC3B,kBAAkB,EAAE,SAAS;IAC7B,oBAAoB,EAAE,eAAe;IACrC,qBAAqB,EAAE,YAAY;IACnC,qBAAqB,EAAE,YAAY;IACnC,oBAAoB,EAAE,UAAU;IAChC,IAAI,EAAE,CAAC,UAAkB,KAA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AAI,EAAE;MACJ,OAAO,EAAE;QACP,KAAK,EAAE,QAAQ;QACf,iBAAiB,EAAE,UAAU;OAC9B;MACD,iBAAiB,EAAE,MAAM;MACzB,gBAAgB,EAAE,MAAM;KACzB;IACD,OAAO,EAAE;MACP,YAAY,EAAE,cAAc;MAC5B,WAAW,EAAE,aAAa;MAC1B,eAAe,EAAE,iBAAiB;MAClC,2BAA2B,EAAE,iBAAiB;MAC9C,iBAAiB,EAAE,oBAAoB;MACvC,IAAI,EAAE,oBAAoB;MAC1B,KAAK,EAAE,OAAO;MACd,iBAAiB,EAAE,MAAM;MACzB,eAAe,EAAE,QAAQ;KAC1B;IACD,MAAM,EAAE;MACN,eAAe,EAAE,kBAAkB;MACnC,OAAO,EAAE,SAAS;MAClB,aAAa,EAAE,iBAAiB;MAChC,iBAAiB,EAAE,oBAAoB;MACvC,IAAI,EAAE,oBAAoB;MAC1B,KAAK,EAAE,OAAO;MACd,iBAAiB,EAAE,MAAM;MACzB,eAAe,EAAE,QAAQ;KAC1B;IACD,MAAM,EAAE,QAAQ;IAChB,iBAAiB,EAAE,2BAA2B;IAC9C,oBAAoB,EAAE,8BAA8B;IACpD,MAAM,EAAE,gBAAgB;IACxB,SAAS,EAAE,oBAAoB;IAC/B,UAAU,EAAE,YAAY;IACxB,SAAS,EAAE,WAAW;IACtB,KAAK,EAAE,OAAO;IACd,EAAE,EAAE,IAAI;IACR,QAAQ,EAAE,UAAU;IACpB,iBAAiB,EAAE,oBAAoB;IACvC,KAAK,EAAE,OAAO;IACd,OAAO,EAAE,SAAS;IAClB,KAAK,EAAE,OAAO;IACd,OAAO,EAAE,SAAS;IAClB,QAAQ,EAAE,UAAU;IACpB,QAAQ,EAAE,UAAU;GACrB;;;;;","names":[],"sources":["./src/i18n/i18n.ts"],"sourcesContent":["interface Translation {\n filter: string;\n practice: string;\n difficulty: string;\n duration: string;\n length: string;\n treks: string;\n trek: string;\n showList: string;\n showMap: string;\n showRoute: string;\n showDetails: string;\n download: string;\n downloads: string;\n description: string;\n departure: string;\n arrival: string;\n elevationProfile: string;\n roadAccess: string;\n transport: string;\n recommendations: string;\n recommendedParking: string;\n equipments: string;\n environmentalSensitiveAreas: string;\n informationPlaces: string;\n accessibility: string;\n accessibilityLevel: string;\n accessibilitySlope: string;\n accessibilityWidth: string;\n accessibilitySignage: string;\n accessibilityCovering: string;\n accessibilityExposure: string;\n accessibilityAdvices: string;\n pois: Function;\n touristicContents: Function;\n touristicEvents: Function;\n sources: string;\n city: string;\n crossedCities: string;\n placeholderCrossedCities: string;\n home: {\n segment: {\n treks: string;\n touristicContents: string;\n };\n touristicContents: string;\n touristicContent: string;\n };\n options: {\n presentation: string;\n description: string;\n recommendations: string;\n environmentalSensitiveAreas: string;\n informationPlaces: string;\n pois: string;\n steps: string;\n touristicContents: string;\n touristicEvents: string;\n };\n layers: {\n referencePoints: string;\n parking: string;\n sensitiveArea: string;\n informationPlaces: string;\n pois: string;\n steps: string;\n touristicContents: string;\n touristicEvents: string;\n };\n themes: string;\n placeholderThemes: string;\n placeholderPractices: string;\n routes: string;\n elevation: string;\n activities: string;\n districts: string;\n erase: string;\n ok: string;\n location: string;\n steps: string;\n usefulInformation: string;\n contact: string;\n email: string;\n website: string;\n category: string;\n services: string;\n}\n\ninterface AvailableTranslations {\n fr: Translation;\n en: Translation;\n}\n\nexport const translate: AvailableTranslations = {\n fr: {\n filter: 'Filtrer',\n practice: 'Pratique',\n difficulty: 'Difficulté',\n duration: 'Durée',\n length: 'Longueur',\n treks: 'itinéraires',\n trek: 'itinéraire',\n showList: 'Voir la liste',\n showMap: 'Voir la carte',\n showRoute: \"Voir l'itinéraire\",\n showDetails: 'Voir la fiche',\n download: 'Téléchargement',\n downloads: 'Téléchargements',\n description: 'Description',\n departure: 'Départ',\n arrival: 'Arrivée',\n elevationProfile: 'Profil altimétrique',\n roadAccess: 'Accès routier',\n transport: 'Transport',\n recommendations: 'Recommandations',\n recommendedParking: 'Parking conseillé',\n equipments: 'Équipements',\n environmentalSensitiveAreas: 'Zones de sensibilité environnementale',\n informationPlaces: 'Lieux de renseignement',\n accessibility: 'Accessibilité',\n accessibilityLevel: \"Niveau d'accessibilité\",\n accessibilitySlope: 'Pente',\n accessibilityWidth: 'Largeur',\n accessibilitySignage: 'Signalisation',\n accessibilityCovering: 'Revêtement',\n accessibilityExposure: 'Exposition',\n accessibilityAdvices: 'Conseils',\n pois: (poisLength: number) => `Les ${poisLength} patrimoines à découvrir`,\n touristicContents: (touristicContentsLength: number) => `À proximité (${touristicContentsLength})`,\n touristicEvents: (touristicEventsLength: number) => `Événements (${touristicEventsLength})`,\n sources: 'Sources',\n city: 'Commune',\n crossedCities: 'Communes',\n placeholderCrossedCities: 'Sélectionner une ou plusieurs communes',\n home: {\n segment: {\n treks: 'Itinéraires',\n touristicContents: 'Services',\n },\n touristicContents: 'à proximité',\n touristicContent: 'à proximité',\n },\n options: {\n presentation: 'Présentation',\n description: 'Description',\n recommendations: 'Recommandations',\n environmentalSensitiveAreas: 'Zones sensibles',\n informationPlaces: \"Lieux d'informations\",\n pois: 'Patrimoines',\n steps: 'Étapes',\n touristicContents: 'À proximité',\n touristicEvents: 'Événements',\n },\n layers: {\n referencePoints: 'Points de référence',\n parking: 'Parking conseillé',\n sensitiveArea: 'Zones de sensibilité environnementale',\n informationPlaces: 'Lieux de renseignement',\n pois: 'Patrimoines',\n steps: 'Étapes',\n touristicContents: 'À proximité',\n touristicEvents: 'Événements',\n },\n themes: 'Thèmes',\n placeholderThemes: 'Sélectionner un ou plusieurs thèmes',\n placeholderPractices: 'Sélectionner une ou plusieurs pratiques',\n routes: 'Type de parcours',\n elevation: 'Denivelé positif',\n activities: 'Activités',\n districts: 'Secteurs',\n erase: 'Effacer',\n ok: 'Ok',\n location: 'Localisation',\n steps: 'étapes',\n usefulInformation: 'Informations pratiques',\n contact: 'Contact',\n email: 'Email',\n website: 'Site web',\n category: 'Catégorie',\n services: 'Services',\n },\n en: {\n filter: 'Filter',\n practice: 'Practice',\n difficulty: 'Difficulty',\n duration: 'Duration',\n length: 'Length',\n treks: 'routes',\n trek: 'route',\n showList: 'Show the list',\n showMap: 'Show the map',\n showRoute: 'Show the route',\n showDetails: 'Show the details',\n download: 'Download',\n downloads: 'Downloads',\n description: 'Description',\n departure: 'Departure',\n arrival: 'Arrival',\n elevationProfile: 'Elevation profile',\n roadAccess: 'Road acess',\n transport: 'Transport',\n recommendations: 'Recommendations',\n recommendedParking: 'Parking recommended',\n equipments: 'Equipements',\n environmentalSensitiveAreas: 'Areas of environmental sensitivity',\n informationPlaces: 'Information places',\n accessibility: 'Accessibility',\n accessibilityLevel: 'Accessibility level',\n accessibilitySlope: 'Slope',\n accessibilityWidth: 'Width',\n accessibilitySignage: 'Signage',\n accessibilityCovering: 'Covering',\n accessibilityExposure: 'Exposure',\n accessibilityAdvices: 'Advices',\n pois: (poisLength: number) => `${poisLength} points of interest`,\n touristicContents: (touristicContentsLength: number) => `Near (${touristicContentsLength})`,\n touristicEvents: (touristicEventsLength: number) => `Events (${touristicEventsLength})`,\n sources: 'Sources',\n city: 'City',\n crossedCities: 'Cities',\n placeholderCrossedCities: 'Select one or more municipalities',\n home: {\n segment: {\n treks: 'Routes',\n touristicContents: 'Services',\n },\n touristicContents: 'near',\n touristicContent: 'near',\n },\n options: {\n presentation: 'Presentation',\n description: 'Description',\n recommendations: 'Recommendations',\n environmentalSensitiveAreas: 'Sensitive areas',\n informationPlaces: 'Information places',\n pois: 'Points of interest',\n steps: 'Steps',\n touristicContents: 'Near',\n touristicEvents: 'Events',\n },\n layers: {\n referencePoints: 'Reference points',\n parking: 'Parking',\n sensitiveArea: 'Sensitive areas',\n informationPlaces: 'Information places',\n pois: 'Points of interest',\n steps: 'Steps',\n touristicContents: 'Near',\n touristicEvents: 'Events',\n },\n themes: 'Themes',\n placeholderThemes: 'Select one or more themes',\n placeholderPractices: 'Select one or more practices',\n routes: 'Type of course',\n elevation: 'Positive elevation',\n activities: 'Activities',\n districts: 'Districts',\n erase: 'Erase',\n ok: 'Ok',\n location: 'Location',\n usefulInformation: 'Useful information',\n steps: 'steps',\n contact: 'Contact',\n email: 'Email',\n website: 'Website',\n category: 'Category',\n services: 'Services',\n },\n};\n"],"version":3}
@@ -27,7 +27,7 @@ const patchEsm = () => {
27
27
  const defineCustomElements = (win, options) => {
28
28
  if (typeof window === 'undefined') return Promise.resolve();
29
29
  return patchEsm().then(() => {
30
- return bootstrapLazy([["grw-app",[[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],"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"],"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"]]]]],["grw-select-language",[[1,"grw-select-language"]]],["grw-touristic-event-card-provider",[[1,"grw-touristic-event-card-provider",{"languages":[1],"api":[1],"touristicEventId":[1,"touristic-event-id"]}]]],["grw-filter",[[1,"grw-filter",{"filterType":[1,"filter-type"],"filterName":[1,"filter-name"],"filterPlaceholder":[1,"filter-placeholder"],"filterNameProperty":[1,"filter-name-property"],"segment":[1]},[[8,"resetFilter","onResetFilter"]]]]],["grw-information-desk_6",[[1,"grw-information-desk",{"informationDesk":[16],"displayShortDescription":[32]}],[1,"grw-poi",{"poi":[16],"displayShortDescription":[32],"displayFullscreen":[32]}],[1,"grw-sensitive-area-detail",{"sensitiveArea":[16]}],[1,"grw-touristic-event-card",{"touristicEvent":[16],"displayFullscreen":[32]}],[1,"grw-touristic-content-card",{"touristicContent":[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],"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"]]]]],["grw-filters_12",[[1,"grw-trek-detail",{"trek":[16],"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],"selectedSegment":[32]}],[1,"grw-touristic-contents-list",{"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-treks-list",{"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-map",{"nameLayer":[1,"name-layer"],"urlLayer":[1,"url-layer"],"attributionLayer":[1,"attribution-layer"],"center":[1],"zoom":[2],"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"]]],[1,"grw-search"],[1,"grw-touristic-content-detail",{"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"]}],[1,"grw-touristic-contents-provider",{"languages":[1],"api":[1],"touristicContentId":[1,"touristic-content-id"],"inBbox":[1,"in-bbox"],"cities":[1],"districts":[1],"structures":[1],"themes":[1],"portals":[1]}],[1,"grw-touristic-event-detail",{"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-trek-provider",{"languages":[1],"api":[1],"trekId":[1,"trek-id"]}],[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]}]]]], options);
30
+ return bootstrapLazy([["grw-app",[[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],"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"],"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"]]]]],["grw-select-language",[[1,"grw-select-language"]]],["grw-touristic-event-card-provider",[[1,"grw-touristic-event-card-provider",{"languages":[1],"api":[1],"touristicEventId":[1,"touristic-event-id"],"portals":[1]}]]],["grw-filter",[[1,"grw-filter",{"filterType":[1,"filter-type"],"filterName":[1,"filter-name"],"filterPlaceholder":[1,"filter-placeholder"],"filterNameProperty":[1,"filter-name-property"],"segment":[1]},[[8,"resetFilter","onResetFilter"]]]]],["grw-information-desk_6",[[1,"grw-information-desk",{"informationDesk":[16],"displayShortDescription":[32]}],[1,"grw-poi",{"poi":[16],"displayShortDescription":[32],"displayFullscreen":[32]}],[1,"grw-sensitive-area-detail",{"sensitiveArea":[16]}],[1,"grw-touristic-event-card",{"touristicEvent":[16],"displayFullscreen":[32]}],[1,"grw-touristic-content-card",{"touristicContent":[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],"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"]]]]],["grw-filters_12",[[1,"grw-trek-detail",{"trek":[16],"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],"selectedSegment":[32]}],[1,"grw-touristic-contents-list",{"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-treks-list",{"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-map",{"nameLayer":[1,"name-layer"],"urlLayer":[1,"url-layer"],"attributionLayer":[1,"attribution-layer"],"center":[1],"zoom":[2],"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"]]],[1,"grw-search"],[1,"grw-touristic-content-detail",{"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],"touristicContentId":[1,"touristic-content-id"],"inBbox":[1,"in-bbox"],"cities":[1],"districts":[1],"structures":[1],"themes":[1],"portals":[1]}],[1,"grw-touristic-event-detail",{"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-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]}]]]], options);
31
31
  });
32
32
  };
33
33
 
Binary file
Binary file
@@ -1 +1 @@
1
- {"file":"utils-b09ac7c9.js","mappings":";;SAGgB,cAAc,CAAC,QAAgB;EAC7C,IAAI,iBAAiB,CAAC;EACtB,IAAI,QAAQ,GAAG,EAAE,EAAE;IACjB,iBAAiB,GAAG,GAAG,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,GAAG,CAAC;IAC/C,IAAI,QAAQ,GAAG,CAAC,GAAG,CAAC,EAAE;MACpB,iBAAiB,IAAI,GAAG,IAAI,CAAC,KAAK,CAAC,EAAE,IAAI,QAAQ,GAAG,CAAC,CAAC,CAAC,KAAK,CAAC;KAC9D;GACF;OAAM;IACL,iBAAiB,GAAG,GAAG,QAAQ,GAAG,EAAE,GAAG,CAAC;GACzC;EACD,OAAO,iBAAiB,CAAC;AAC3B,CAAC;SAEe,YAAY,CAAC,MAAc;EACzC,OAAO,GAAG,IAAI,CAAC,KAAK,CAAC,MAAM,GAAG,IAAI,CAAC,IAAI,CAAC;AAC1C,CAAC;SAEe,YAAY,CAAC,MAAc;EACzC,OAAO,GAAG,MAAM,GAAG,CAAC;AACtB,CAAC;MAEY,YAAY,GAAgB;EACvC,EAAE,QAAQ,EAAE,WAAW,EAAE,YAAY,EAAE,UAAU,EAAE,mBAAmB,EAAE,KAAK,EAAE,IAAI,EAAE,SAAS,EAAE,OAAO,EAAE,2B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AI,aAAa,CAAC,QAAQ,GAAG,QAAQ,EAAE;cACxD,QAAQ,GAAG,aAAa,CAAC,QAAQ,CAAC;aACnC;WACF;UACD,wBAAwB,GAAG;YACzB,GAAG,KAAK,CAAC,iBAAiB,CAAC,MAAM,CAC/B,gBAAgB,IAAI,gBAAgB,CAAC,MAAM,CAAC,wBAAwB,CAAC,IAAI,QAAQ,IAAI,gBAAgB,CAAC,MAAM,CAAC,wBAAwB,CAAC,IAAI,QAAQ,CACnJ;WACF,CAAC;SACH;OACF;KACF;GACF;EAED,MAAM,uBAAuB,GAAG,aAAa,GAAG,wBAAwB,GAAG,KAAK,CAAC,iBAAiB,CAAC;EACnG,OAAO,OAAO,CAAC,KAAK,CAAC,WAAW,CAAC;MAC7B,uBAAuB,CAAC,MAAM,CAAC,wBAAwB,IAAI,wBAAwB,CAAC,IAAI,CAAC,WAAW,EAAE,CAAC,QAAQ,CAAC,KAAK,CAAC,WAAW,CAAC,WAAW,EAAE,CAAC,CAAC;MACjJ,uBAAuB,CAAC;AAC9B;;;;","names":[],"sources":["./src/utils/utils.ts"],"sourcesContent":["import state from 'store/store';\nimport { TouristicContents, TouristicContentsFilters, TrekFilters, Treks } from 'types/types';\n\nexport function formatDuration(duration: number) {\n let formattedDuration;\n if (duration < 24) {\n formattedDuration = `${Math.floor(duration)}h`;\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 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 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\n const searchTouristicContents = isUsingFilter ? filtersTouristicContents : state.touristicContents;\n return Boolean(state.searchValue)\n ? searchTouristicContents.filter(currentTouristicContents => currentTouristicContents.name.toLowerCase().includes(state.searchValue.toLowerCase()))\n : searchTouristicContents;\n}\n"],"version":3}
1
+ {"file":"utils-b09ac7c9.js","mappings":";;SAGgB,cAAc,CAAC,QAAgB;EAC7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AM,CAAC,wBAAwB,IAAI,wBAAwB,CAAC,IAAI,CAAC,WAAW,EAAE,CAAC,QAAQ,CAAC,KAAK,CAAC,WAAW,CAAC,WAAW,EAAE,CAAC,CAAC;MACjJ,uBAAuB,CAAC;AAC9B;;;;","names":[],"sources":["./src/utils/utils.ts"],"sourcesContent":["import state from 'store/store';\nimport { TouristicContents, TouristicContentsFilters, TrekFilters, Treks } from 'types/types';\n\nexport function formatDuration(duration: number) {\n let formattedDuration;\n if (duration < 24) {\n formattedDuration = `${Math.floor(duration)}h`;\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 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"],"version":3}
@@ -1,2 +1,2 @@
1
- import{p as plt,w as win,d as doc,N as NAMESPACE,a as promiseResolve,b as bootstrapLazy}from"./index-d5cacae4.js";export{s as setNonce}from"./index-d5cacae4.js";function queryNonceMetaTagContent(r){var o,e,n;return(n=(e=(o=r.head)===null||o===void 0?void 0:o.querySelector('meta[name="csp-nonce"]'))===null||e===void 0?void 0:e.getAttribute("content"))!==null&&n!==void 0?n:undefined}var getDynamicImportFunction=function(r){return"__sc_import_".concat(r.replace(/\s|-/g,"_"))};var patchBrowser=function(){{plt.$cssShim$=win.__cssshim}var r=Array.from(doc.querySelectorAll("script")).find((function(r){return new RegExp("/".concat(NAMESPACE,"(\\.esm)?\\.js($|\\?|#)")).test(r.src)||r.getAttribute("data-stencil-namespace")===NAMESPACE}));var o=(r||{})["data-opts"]||{};if("onbeforeload"in r&&!history.scrollRestoration){return{then:function(){}}}{o.resourcesUrl=new URL(".",new URL(r.getAttribute("data-resources-url")||r.src,win.location.href)).href;{patchDynamicImport(o.resourcesUrl,r)}if(!win.customElements){return import("./dom-8de30773.js").then((function(){return o}))}}return promiseResolve(o)};var patchDynamicImport=function(r,o){var e=getDynamicImportFunction(NAMESPACE);try{win[e]=new Function("w","return import(w);//".concat(Math.random()))}catch(t){var n=new Map;win[e]=function(t){var i;var c=new URL(t,r).href;var a=n.get(c);if(!a){var s=doc.createElement("script");s.type="module";s.crossOrigin=o.crossOrigin;s.src=URL.createObjectURL(new Blob(["import * as m from '".concat(c,"'; window.").concat(e,".m = m;")],{type:"application/javascript"}));var l=(i=plt.$nonce$)!==null&&i!==void 0?i:queryNonceMetaTagContent(doc);if(l!=null){s.setAttribute("nonce",l)}a=new Promise((function(r){s.onload=function(){r(win[e].m);s.remove()}}));n.set(c,a);doc.head.appendChild(s)}return a}}};patchBrowser().then((function(r){return bootstrapLazy([["grw-app",[[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],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"],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"]]]]],["grw-select-language",[[1,"grw-select-language"]]],["grw-touristic-event-card-provider",[[1,"grw-touristic-event-card-provider",{languages:[1],api:[1],touristicEventId:[1,"touristic-event-id"]}]]],["grw-filter",[[1,"grw-filter",{filterType:[1,"filter-type"],filterName:[1,"filter-name"],filterPlaceholder:[1,"filter-placeholder"],filterNameProperty:[1,"filter-name-property"],segment:[1]},[[8,"resetFilter","onResetFilter"]]]]],["grw-information-desk_6",[[1,"grw-information-desk",{informationDesk:[16],displayShortDescription:[32]}],[1,"grw-poi",{poi:[16],displayShortDescription:[32],displayFullscreen:[32]}],[1,"grw-sensitive-area-detail",{sensitiveArea:[16]}],[1,"grw-touristic-event-card",{touristicEvent:[16],displayFullscreen:[32]}],[1,"grw-touristic-content-card",{touristicContent:[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],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"]]]]],["grw-filters_12",[[1,"grw-trek-detail",{trek:[16],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],selectedSegment:[32]}],[1,"grw-touristic-contents-list",{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-treks-list",{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-map",{nameLayer:[1,"name-layer"],urlLayer:[1,"url-layer"],attributionLayer:[1,"attribution-layer"],center:[1],zoom:[2],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"]]],[1,"grw-search"],[1,"grw-touristic-content-detail",{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"]}],[1,"grw-touristic-contents-provider",{languages:[1],api:[1],touristicContentId:[1,"touristic-content-id"],inBbox:[1,"in-bbox"],cities:[1],districts:[1],structures:[1],themes:[1],portals:[1]}],[1,"grw-touristic-event-detail",{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-trek-provider",{languages:[1],api:[1],trekId:[1,"trek-id"]}],[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]}]]]],r)}));
1
+ import{p as plt,w as win,d as doc,N as NAMESPACE,a as promiseResolve,b as bootstrapLazy}from"./index-d5cacae4.js";export{s as setNonce}from"./index-d5cacae4.js";function queryNonceMetaTagContent(r){var o,e,n;return(n=(e=(o=r.head)===null||o===void 0?void 0:o.querySelector('meta[name="csp-nonce"]'))===null||e===void 0?void 0:e.getAttribute("content"))!==null&&n!==void 0?n:undefined}var getDynamicImportFunction=function(r){return"__sc_import_".concat(r.replace(/\s|-/g,"_"))};var patchBrowser=function(){{plt.$cssShim$=win.__cssshim}var r=Array.from(doc.querySelectorAll("script")).find((function(r){return new RegExp("/".concat(NAMESPACE,"(\\.esm)?\\.js($|\\?|#)")).test(r.src)||r.getAttribute("data-stencil-namespace")===NAMESPACE}));var o=(r||{})["data-opts"]||{};if("onbeforeload"in r&&!history.scrollRestoration){return{then:function(){}}}{o.resourcesUrl=new URL(".",new URL(r.getAttribute("data-resources-url")||r.src,win.location.href)).href;{patchDynamicImport(o.resourcesUrl,r)}if(!win.customElements){return import("./dom-8de30773.js").then((function(){return o}))}}return promiseResolve(o)};var patchDynamicImport=function(r,o){var e=getDynamicImportFunction(NAMESPACE);try{win[e]=new Function("w","return import(w);//".concat(Math.random()))}catch(t){var n=new Map;win[e]=function(t){var i;var c=new URL(t,r).href;var a=n.get(c);if(!a){var s=doc.createElement("script");s.type="module";s.crossOrigin=o.crossOrigin;s.src=URL.createObjectURL(new Blob(["import * as m from '".concat(c,"'; window.").concat(e,".m = m;")],{type:"application/javascript"}));var l=(i=plt.$nonce$)!==null&&i!==void 0?i:queryNonceMetaTagContent(doc);if(l!=null){s.setAttribute("nonce",l)}a=new Promise((function(r){s.onload=function(){r(win[e].m);s.remove()}}));n.set(c,a);doc.head.appendChild(s)}return a}}};patchBrowser().then((function(r){return bootstrapLazy([["grw-app",[[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],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"],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"]]]]],["grw-select-language",[[1,"grw-select-language"]]],["grw-touristic-event-card-provider",[[1,"grw-touristic-event-card-provider",{languages:[1],api:[1],touristicEventId:[1,"touristic-event-id"],portals:[1]}]]],["grw-filter",[[1,"grw-filter",{filterType:[1,"filter-type"],filterName:[1,"filter-name"],filterPlaceholder:[1,"filter-placeholder"],filterNameProperty:[1,"filter-name-property"],segment:[1]},[[8,"resetFilter","onResetFilter"]]]]],["grw-information-desk_6",[[1,"grw-information-desk",{informationDesk:[16],displayShortDescription:[32]}],[1,"grw-poi",{poi:[16],displayShortDescription:[32],displayFullscreen:[32]}],[1,"grw-sensitive-area-detail",{sensitiveArea:[16]}],[1,"grw-touristic-event-card",{touristicEvent:[16],displayFullscreen:[32]}],[1,"grw-touristic-content-card",{touristicContent:[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],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"]]]]],["grw-filters_12",[[1,"grw-trek-detail",{trek:[16],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],selectedSegment:[32]}],[1,"grw-touristic-contents-list",{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-treks-list",{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-map",{nameLayer:[1,"name-layer"],urlLayer:[1,"url-layer"],attributionLayer:[1,"attribution-layer"],center:[1],zoom:[2],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"]]],[1,"grw-search"],[1,"grw-touristic-content-detail",{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],touristicContentId:[1,"touristic-content-id"],inBbox:[1,"in-bbox"],cities:[1],districts:[1],structures:[1],themes:[1],portals:[1]}],[1,"grw-touristic-event-detail",{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-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]}]]]],r)}));
2
2
  //# sourceMappingURL=geotrek-rando-widget.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["queryNonceMetaTagContent","doc","_a","_b","_c","head","querySelector","getAttribute","undefined","getDynamicImportFunction","namespace","concat","replace","patchBrowser","plt","$cssShim$","win","__cssshim","scriptElm","Array","from","querySelectorAll","find","s","RegExp","NAMESPACE","test","src","opts","history","scrollRestoration","then","resourcesUrl","URL","location","href","patchDynamicImport","customElements","import","promiseResolve","base","orgScriptElm","importFunctionName","Function","Math","random","e","moduleMap_1","Map","url","mod","get","script_1","createElement","type","crossOrigin","createObjectURL","Blob","nonce","$nonce$","setAttribute","Promise","resolve","onload","m","remove","set","appendChild","options","bootstrapLazy","appWidth","appHeight","api","languages","inBbox","cities","districts","structures","themes","portals","routes","practices","center","zoom","nameLayer","urlLayer","attributionLayer","weather","colorPrimaryApp","colorOnPrimary","colorSurface","colorOnSurface","colorSurfaceVariant","colorOnSurfaceVariant","colorPrimaryContainer","colorOnPrimaryContainer","colorSecondaryContainer","colorOnSecondaryContainer","colorBackground","colorSurfaceContainerHigh","colorSurfaceContainerLow","fabBackgroundColor","fabColor","colorTrekLine","colorSensitiveArea","colorPoiIcon","useGradient","treks","touristicContents","touristicEvents","showTrek","showTouristicContent","showTouristicEvent","showHomeMap","showTrekMap","showTouristicContentMap","showTouristicEventMap","showFilters","isLargeView","currentTrekId","currentTouristicContentId","currentTouristicEventId","touristicEventId","filterType","filterName","filterPlaceholder","filterNameProperty","segment","informationDesk","displayShortDescription","poi","displayFullscreen","sensitiveArea","touristicEvent","touristicContent","isInsideHorizontalList","trek","resetStoreOnDisconnected","isStep","currentTrek","difficulty","route","practice","departureCity","labels","sources","accessibilities","accessibilityLevel","handleFilters","selectedSegment","touristicContentsToDisplay","treksToDisplay","mapIsReady","touristicContentId","trekId"],"sources":["node_modules/@stencil/core/internal/client/patch-browser.js","@lazy-browser-entrypoint?app-data=conditional"],"sourcesContent":["/*\n Stencil Client Patch Browser v3.4.2 | MIT Licensed | https://stenciljs.com\n */\nimport { BUILD, NAMESPACE } from '@stencil/core/internal/app-data';\nimport { consoleDevInfo, plt, win, doc, promiseResolve, H } from '@stencil/core';\n/**\n * Helper method for querying a `meta` tag that contains a nonce value\n * out of a DOM's head.\n *\n * @param doc The DOM containing the `head` to query against\n * @returns The content of the meta tag representing the nonce value, or `undefined` if no tag\n * exists or the tag has no content.\n */\nfunction queryNonceMetaTagContent(doc) {\n var _a, _b, _c;\n return (_c = (_b = (_a = doc.head) === null || _a === void 0 ? void 0 : _a.querySelector('meta[name=\"csp-nonce\"]')) === null || _b === void 0 ? void 0 : _b.getAttribute('content')) !== null && _c !== void 0 ? _c : undefined;\n}\n// TODO(STENCIL-661): Remove code related to the dynamic import shim\nconst getDynamicImportFunction = (namespace) => `__sc_import_${namespace.replace(/\\s|-/g, '_')}`;\nconst patchBrowser = () => {\n // NOTE!! This fn cannot use async/await!\n if (BUILD.isDev && !BUILD.isTesting) {\n consoleDevInfo('Running in development mode.');\n }\n // TODO(STENCIL-659): Remove code implementing the CSS variable shim\n if (BUILD.cssVarShim) {\n // shim css vars\n // TODO(STENCIL-659): Remove code implementing the CSS variable shim\n plt.$cssShim$ = win.__cssshim;\n }\n if (BUILD.cloneNodeFix) {\n // opted-in to polyfill cloneNode() for slot polyfilled components\n patchCloneNodeFix(H.prototype);\n }\n if (BUILD.profile && !performance.mark) {\n // not all browsers support performance.mark/measure (Safari 10)\n // because the mark/measure APIs are designed to write entries to a buffer in the browser that does not exist,\n // simply stub the implementations out.\n // TODO(STENCIL-323): Remove this patch when support for older browsers is removed (breaking)\n // @ts-ignore\n performance.mark = performance.measure = () => {\n /*noop*/\n };\n performance.getEntriesByName = () => [];\n }\n // @ts-ignore\n const scriptElm = \n // TODO(STENCIL-661): Remove code related to the dynamic import shim\n // TODO(STENCIL-663): Remove code related to deprecated `safari10` field.\n BUILD.scriptDataOpts || BUILD.safari10 || BUILD.dynamicImportShim\n ? Array.from(doc.querySelectorAll('script')).find((s) => new RegExp(`\\/${NAMESPACE}(\\\\.esm)?\\\\.js($|\\\\?|#)`).test(s.src) ||\n s.getAttribute('data-stencil-namespace') === NAMESPACE)\n : null;\n const importMeta = import.meta.url;\n const opts = BUILD.scriptDataOpts ? (scriptElm || {})['data-opts'] || {} : {};\n // TODO(STENCIL-663): Remove code related to deprecated `safari10` field.\n if (BUILD.safari10 && 'onbeforeload' in scriptElm && !history.scrollRestoration /* IS_ESM_BUILD */) {\n // Safari < v11 support: This IF is true if it's Safari below v11.\n // This fn cannot use async/await since Safari didn't support it until v11,\n // however, Safari 10 did support modules. Safari 10 also didn't support \"nomodule\",\n // so both the ESM file and nomodule file would get downloaded. Only Safari\n // has 'onbeforeload' in the script, and \"history.scrollRestoration\" was added\n // to Safari in v11. Return a noop then() so the async/await ESM code doesn't continue.\n // IS_ESM_BUILD is replaced at build time so this check doesn't happen in systemjs builds.\n return {\n then() {\n /* promise noop */\n },\n };\n }\n // TODO(STENCIL-663): Remove code related to deprecated `safari10` field.\n if (!BUILD.safari10 && importMeta !== '') {\n opts.resourcesUrl = new URL('.', importMeta).href;\n // TODO(STENCIL-661): Remove code related to the dynamic import shim\n // TODO(STENCIL-663): Remove code related to deprecated `safari10` field.\n }\n else if (BUILD.dynamicImportShim || BUILD.safari10) {\n opts.resourcesUrl = new URL('.', new URL(scriptElm.getAttribute('data-resources-url') || scriptElm.src, win.location.href)).href;\n // TODO(STENCIL-661): Remove code related to the dynamic import shim\n if (BUILD.dynamicImportShim) {\n patchDynamicImport(opts.resourcesUrl, scriptElm);\n }\n // TODO(STENCIL-661): Remove code related to the dynamic import shim\n if (BUILD.dynamicImportShim && !win.customElements) {\n // module support, but no custom elements support (Old Edge)\n // @ts-ignore\n return import(/* webpackChunkName: \"polyfills-dom\" */ './dom.js').then(() => opts);\n }\n }\n return promiseResolve(opts);\n};\n// TODO(STENCIL-661): Remove code related to the dynamic import shim\nconst patchDynamicImport = (base, orgScriptElm) => {\n const importFunctionName = getDynamicImportFunction(NAMESPACE);\n try {\n // test if this browser supports dynamic imports\n // There is a caching issue in V8, that breaks using import() in Function\n // By generating a random string, we can workaround it\n // Check https://bugs.chromium.org/p/chromium/issues/detail?id=990810 for more info\n win[importFunctionName] = new Function('w', `return import(w);//${Math.random()}`);\n }\n catch (e) {\n // this shim is specifically for browsers that do support \"esm\" imports\n // however, they do NOT support \"dynamic\" imports\n // basically this code is for old Edge, v18 and below\n const moduleMap = new Map();\n win[importFunctionName] = (src) => {\n var _a;\n const url = new URL(src, base).href;\n let mod = moduleMap.get(url);\n if (!mod) {\n const script = doc.createElement('script');\n script.type = 'module';\n script.crossOrigin = orgScriptElm.crossOrigin;\n script.src = URL.createObjectURL(new Blob([`import * as m from '${url}'; window.${importFunctionName}.m = m;`], {\n type: 'application/javascript',\n }));\n // Apply CSP nonce to the script tag if it exists\n const nonce = (_a = plt.$nonce$) !== null && _a !== void 0 ? _a : queryNonceMetaTagContent(doc);\n if (nonce != null) {\n script.setAttribute('nonce', nonce);\n }\n mod = new Promise((resolve) => {\n script.onload = () => {\n resolve(win[importFunctionName].m);\n script.remove();\n };\n });\n moduleMap.set(url, mod);\n doc.head.appendChild(script);\n }\n return mod;\n };\n }\n};\nconst patchCloneNodeFix = (HTMLElementPrototype) => {\n const nativeCloneNodeFn = HTMLElementPrototype.cloneNode;\n HTMLElementPrototype.cloneNode = function (deep) {\n if (this.nodeName === 'TEMPLATE') {\n return nativeCloneNodeFn.call(this, deep);\n }\n const clonedNode = nativeCloneNodeFn.call(this, false);\n const srcChildNodes = this.childNodes;\n if (deep) {\n for (let i = 0; i < srcChildNodes.length; i++) {\n // Node.ATTRIBUTE_NODE === 2, and checking because IE11\n if (srcChildNodes[i].nodeType !== 2) {\n clonedNode.appendChild(srcChildNodes[i].cloneNode(true));\n }\n }\n }\n return clonedNode;\n };\n};\nexport { patchBrowser };\n","export { setNonce } from '@stencil/core';\nimport { bootstrapLazy } from '@stencil/core';\nimport { patchBrowser } from '@stencil/core/internal/client/patch-browser';\nimport { globalScripts } from '@stencil/core/internal/app-globals';\npatchBrowser().then(options => {\n globalScripts();\n return bootstrapLazy([/*!__STENCIL_LAZY_DATA__*/], options);\n});\n"],"mappings":"iKAaA,SAASA,yBAAyBC,GAC9B,IAAIC,EAAIC,EAAIC,EACZ,OAAQA,GAAMD,GAAMD,EAAKD,EAAII,QAAU,MAAQH,SAAY,OAAS,EAAIA,EAAGI,cAAc,6BAA+B,MAAQH,SAAY,OAAS,EAAIA,EAAGI,aAAa,cAAgB,MAAQH,SAAY,EAAIA,EAAKI,SAC1N,CAEA,IAAMC,yBAA2B,SAACC,GAAc,qBAAAC,OAAeD,EAAUE,QAAQ,QAAS,KAA1C,EAChD,IAAMC,aAAe,WAMK,CAGlBC,IAAIC,UAAYC,IAAIC,S,CAkBxB,IAAMC,EAIAC,MAAMC,KAAKnB,IAAIoB,iBAAiB,WAAWC,MAAK,SAACC,GAAM,WAAIC,OAAO,IAAAb,OAAKc,UAAS,4BAA2BC,KAAKH,EAAEI,MAChHJ,EAAEhB,aAAa,4BAA8BkB,SADQ,IAI7D,IAAMG,GAA+BV,GAAa,IAAI,cAAgB,GAEtE,GAAsB,iBAAkBA,IAAcW,QAAQC,kBAAsC,CAQhG,MAAO,CACHC,KAAI,WAEhB,E,CASwD,CAChDH,EAAKI,aAAe,IAAIC,IAAI,IAAK,IAAIA,IAAIf,EAAUX,aAAa,uBAAyBW,EAAUS,IAAKX,IAAIkB,SAASC,OAAOA,KAE/F,CACzBC,mBAAmBR,EAAKI,aAAcd,E,CAG1C,IAAgCF,IAAIqB,eAAgB,CAGhD,OAAOC,OAA+C,qBAAYP,MAAK,WAAM,OAAAH,CAAA,G,EAGrF,OAAOW,eAAeX,EAC1B,EAEA,IAAMQ,mBAAqB,SAACI,EAAMC,GAC9B,IAAMC,EAAqBjC,yBAAyBgB,WACpD,IAKIT,IA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"}
1
+ {"version":3,"names":["queryNonceMetaTagContent","doc","_a","_b","_c","head","querySelector","getAttribute","undefined","getDynamicImportFunction","namespace","concat","replace","patchBrowser","plt","$cssShim$","win","__cssshim","scriptElm","Array","from","querySelectorAll","find","s","RegExp","NAMESPACE","test","src","opts","history","scrollRestoration","then","resourcesUrl","URL","location","href","patchDynamicImport","customElements","import","promiseResolve","base","orgScriptElm","importFunctionName","Function","Math","random","e","moduleMap_1","Map","url","mod","get","script_1","createElement","type","crossOrigin","createObjectURL","Blob","nonce","$nonce$","setAttribute","Promise","resolve","onload","m","remove","set","appendChild","options","bootstrapLazy","appWidth","appHeight","api","languages","inBbox","cities","districts","structures","themes","portals","routes","practices","center","zoom","nameLayer","urlLayer","attributionLayer","weather","colorPrimaryApp","colorOnPrimary","colorSurface","colorOnSurface","colorSurfaceVariant","colorOnSurfaceVariant","colorPrimaryContainer","colorOnPrimaryContainer","colorSecondaryContainer","colorOnSecondaryContainer","colorBackground","colorSurfaceContainerHigh","colorSurfaceContainerLow","fabBackgroundColor","fabColor","colorTrekLine","colorSensitiveArea","colorPoiIcon","useGradient","treks","touristicContents","touristicEvents","showTrek","showTouristicContent","showTouristicEvent","showHomeMap","showTrekMap","showTouristicContentMap","showTouristicEventMap","showFilters","isLargeView","currentTrekId","currentTouristicContentId","currentTouristicEventId","touristicEventId","filterType","filterName","filterPlaceholder","filterNameProperty","segment","informationDesk","displayShortDescription","poi","displayFullscreen","sensitiveArea","touristicEvent","touristicContent","isInsideHorizontalList","trek","resetStoreOnDisconnected","isStep","currentTrek","difficulty","route","practice","departureCity","labels","sources","accessibilities","accessibilityLevel","handleFilters","selectedSegment","touristicContentsToDisplay","treksToDisplay","mapIsReady","touristicContentId","trekId"],"sources":["node_modules/@stencil/core/internal/client/patch-browser.js","@lazy-browser-entrypoint?app-data=conditional"],"sourcesContent":["/*\n Stencil Client Patch Browser v3.4.2 | MIT Licensed | https://stenciljs.com\n */\nimport { BUILD, NAMESPACE } from '@stencil/core/internal/app-data';\nimport { consoleDevInfo, plt, win, doc, promiseResolve, H } from '@stencil/core';\n/**\n * Helper method for querying a `meta` tag that contains a nonce value\n * out of a DOM's head.\n *\n * @param doc The DOM containing the `head` to query against\n * @returns The content of the meta tag representing the nonce value, or `undefined` if no tag\n * exists or the tag has no content.\n */\nfunction queryNonceMetaTagContent(doc) {\n var _a, _b, _c;\n return (_c = (_b = (_a = doc.head) === null || _a === void 0 ? void 0 : _a.querySelector('meta[name=\"csp-nonce\"]')) === null || _b === void 0 ? void 0 : _b.getAttribute('content')) !== null && _c !== void 0 ? _c : undefined;\n}\n// TODO(STENCIL-661): Remove code related to the dynamic import shim\nconst getDynamicImportFunction = (namespace) => `__sc_import_${namespace.replace(/\\s|-/g, '_')}`;\nconst patchBrowser = () => {\n // NOTE!! This fn cannot use async/await!\n if (BUILD.isDev && !BUILD.isTesting) {\n consoleDevInfo('Running in development mode.');\n }\n // TODO(STENCIL-659): Remove code implementing the CSS variable shim\n if (BUILD.cssVarShim) {\n // shim css vars\n // TODO(STENCIL-659): Remove code implementing the CSS variable shim\n plt.$cssShim$ = win.__cssshim;\n }\n if (BUILD.cloneNodeFix) {\n // opted-in to polyfill cloneNode() for slot polyfilled components\n patchCloneNodeFix(H.prototype);\n }\n if (BUILD.profile && !performance.mark) {\n // not all browsers support performance.mark/measure (Safari 10)\n // because the mark/measure APIs are designed to write entries to a buffer in the browser that does not exist,\n // simply stub the implementations out.\n // TODO(STENCIL-323): Remove this patch when support for older browsers is removed (breaking)\n // @ts-ignore\n performance.mark = performance.measure = () => {\n /*noop*/\n };\n performance.getEntriesByName = () => [];\n }\n // @ts-ignore\n const scriptElm = \n // TODO(STENCIL-661): Remove code related to the dynamic import shim\n // TODO(STENCIL-663): Remove code related to deprecated `safari10` field.\n BUILD.scriptDataOpts || BUILD.safari10 || BUILD.dynamicImportShim\n ? Array.from(doc.querySelectorAll('script')).find((s) => new RegExp(`\\/${NAMESPACE}(\\\\.esm)?\\\\.js($|\\\\?|#)`).test(s.src) ||\n s.getAttribute('data-stencil-namespace') === NAMESPACE)\n : null;\n const importMeta = import.meta.url;\n const opts = BUILD.scriptDataOpts ? (scriptElm || {})['data-opts'] || {} : {};\n // TODO(STENCIL-663): Remove code related to deprecated `safari10` field.\n if (BUILD.safari10 && 'onbeforeload' in scriptElm && !history.scrollRestoration /* IS_ESM_BUILD */) {\n // Safari < v11 support: This IF is true if it's Safari below v11.\n // This fn cannot use async/await since Safari didn't support it until v11,\n // however, Safari 10 did support modules. Safari 10 also didn't support \"nomodule\",\n // so both the ESM file and nomodule file would get downloaded. Only Safari\n // has 'onbeforeload' in the script, and \"history.scrollRestoration\" was added\n // to Safari in v11. Return a noop then() so the async/await ESM code doesn't continue.\n // IS_ESM_BUILD is replaced at build time so this check doesn't happen in systemjs builds.\n return {\n then() {\n /* promise noop */\n },\n };\n }\n // TODO(STENCIL-663): Remove code related to deprecated `safari10` field.\n if (!BUILD.safari10 && importMeta !== '') {\n opts.resourcesUrl = new URL('.', importMeta).href;\n // TODO(STENCIL-661): Remove code related to the dynamic import shim\n // TODO(STENCIL-663): Remove code related to deprecated `safari10` field.\n }\n else if (BUILD.dynamicImportShim || BUILD.safari10) {\n opts.resourcesUrl = new URL('.', new URL(scriptElm.getAttribute('data-resources-url') || scriptElm.src, win.location.href)).href;\n // TODO(STENCIL-661): Remove code related to the dynamic import shim\n if (BUILD.dynamicImportShim) {\n patchDynamicImport(opts.resourcesUrl, scriptElm);\n }\n // TODO(STENCIL-661): Remove code related to the dynamic import shim\n if (BUILD.dynamicImportShim && !win.customElements) {\n // module support, but no custom elements support (Old Edge)\n // @ts-ignore\n return import(/* webpackChunkName: \"polyfills-dom\" */ './dom.js').then(() => opts);\n }\n }\n return promiseResolve(opts);\n};\n// TODO(STENCIL-661): Remove code related to the dynamic import shim\nconst patchDynamicImport = (base, orgScriptElm) => {\n const importFunctionName = getDynamicImportFunction(NAMESPACE);\n try {\n // test if this browser supports dynamic imports\n // There is a caching issue in V8, that breaks using import() in Function\n // By generating a random string, we can workaround it\n // Check https://bugs.chromium.org/p/chromium/issues/detail?id=990810 for more info\n win[importFunctionName] = new Function('w', `return import(w);//${Math.random()}`);\n }\n catch (e) {\n // this shim is specifically for browsers that do support \"esm\" imports\n // however, they do NOT support \"dynamic\" imports\n // basically this code is for old Edge, v18 and below\n const moduleMap = new Map();\n win[importFunctionName] = (src) => {\n var _a;\n const url = new URL(src, base).href;\n let mod = moduleMap.get(url);\n if (!mod) {\n const script = doc.createElement('script');\n script.type = 'module';\n script.crossOrigin = orgScriptElm.crossOrigin;\n script.src = URL.createObjectURL(new Blob([`import * as m from '${url}'; window.${importFunctionName}.m = m;`], {\n type: 'application/javascript',\n }));\n // Apply CSP nonce to the script tag if it exists\n const nonce = (_a = plt.$nonce$) !== null && _a !== void 0 ? _a : queryNonceMetaTagContent(doc);\n if (nonce != null) {\n script.setAttribute('nonce', nonce);\n }\n mod = new Promise((resolve) => {\n script.onload = () => {\n resolve(win[importFunctionName].m);\n script.remove();\n };\n });\n moduleMap.set(url, mod);\n doc.head.appendChild(script);\n }\n return mod;\n };\n }\n};\nconst patchCloneNodeFix = (HTMLElementPrototype) => {\n const nativeCloneNodeFn = HTMLElementPrototype.cloneNode;\n HTMLElementPrototype.cloneNode = function (deep) {\n if (this.nodeName === 'TEMPLATE') {\n return nativeCloneNodeFn.call(this, deep);\n }\n const clonedNode = nativeCloneNodeFn.call(this, false);\n const srcChildNodes = this.childNodes;\n if (deep) {\n for (let i = 0; i < srcChildNodes.length; i++) {\n // Node.ATTRIBUTE_NODE === 2, and checking because IE11\n if (srcChildNodes[i].nodeType !== 2) {\n clonedNode.appendChild(srcChildNodes[i].cloneNode(true));\n }\n }\n }\n return clonedNode;\n };\n};\nexport { patchBrowser };\n","export { setNonce } from '@stencil/core';\nimport { bootstrapLazy } from '@stencil/core';\nimport { patchBrowser } from '@stencil/core/internal/client/patch-browser';\nimport { globalScripts } from '@stencil/core/internal/app-globals';\npatchBrowser().then(options => {\n globalScrip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.js";import{s as state,o as onChange,r as reset}from"./store-032ab1f5.js";import{t as treksFilters,h as handleTreksFiltersAndSearch,a as touristicContentsFilters,b as handleTouristicContentsFiltersAndSearch}from"./utils-b09ac7c9.js";var grwAppCss='.material-symbols{font-family:"Material Symbols Outlined"}.material-symbols-outlined{font-variation-settings:"FILL" 0, "wght" 400, "GRAD" 0, "opsz" 48}grw-app{display:block;position:relative;width:var(--app-width);height:var(--app-height);font-family:"Roboto";color:var(--color-on-surface);overflow:hidden;line-height:initial;max-width:100dvw;max-height:100dvh}.app-container{position:relative;width:100%;height:100%;overflow:hidden}.header-container,.large-view-header-container{background-color:var(--color-background);-webkit-box-shadow:var(--elevation-2);box-shadow:var(--elevation-2);height:var(--header-height)}.header-container .arrow-back-container,.large-view-header-container .arrow-back-container{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;height:100%;margin:0px 16px}.header-container .arrow-back-container .arrow-back-icon,.large-view-header-container .arrow-back-container .arrow-back-icon{cursor:pointer;-webkit-tap-highlight-color:transparent;color:var(--color-on-surface);border:none;background-color:var(--color-background);border-radius:50%;height:48px;width:48px;padding:0px;text-align:left}.handle-search-filters-container{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:justify;justify-content:space-between;margin:0px 16px;height:64px}.handle-search-filters-container .handle-search-container{width:calc(50% + 48px);max-width:220px}.handle-search-filters-container .handle-filters-button{margin-left:16px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:pointer;-webkit-tap-highlight-color:transparent;display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;border:none;background-color:var(--color-background);color:var(--color-on-surface);padding:12px 24px;border-radius:20px;-webkit-box-sizing:border-box;box-sizing:border-box;position:relative;gap:8px;white-space:nowrap;line-height:20px;letter-spacing:0.1000000015px;font-size:14px;font-weight:500;-webkit-box-shadow:var(--elevation-1);box-shadow:var(--elevation-1);-webkit-transition:-webkit-box-shadow 0.2s ease-in-out 0s;transition:-webkit-box-shadow 0.2s ease-in-out 0s;transition:box-shadow 0.2s ease-in-out 0s;transition:box-shadow 0.2s ease-in-out 0s, -webkit-box-shadow 0.2s ease-in-out 0s}.handle-search-filters-container .handle-filters-button span{font-size:18px}.header-detail{height:64px}.large-view-header-container .handle-search-filters-container{-ms-flex-pack:start;justify-content:flex-start}.init-loader-container,.loader-container,.large-view-loader-container{position:absolute;display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center;height:100%;background-color:var(--color-background)}.init-loader-container .loader,.loader-container .loader,.large-view-loader-container .loader{width:48px;height:48px;border:5px solid var(--color-primary-container);border-bottom-color:var(--color-on-primary-container);border-radius:50%;display:inline-block;-webkit-box-sizing:border-box;box-sizing:border-box;-webkit-animation:rotation 1s linear infinite;animation:rotation 1s linear infinite}@-webkit-keyframes rotation{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}100%{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}@keyframes rotation{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}100%{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}.content-container{position:relative;display:-ms-flexbox;display:flex;height:calc(100% - var(--header-height));background-color:var(--color-background)}.content-treks{height:calc(100% - var(--header-height))}.content-trek{height:100%}.app-treks-list-container,.app-trek-detail-container,.app-touristic-content-detail-container,.app-touristic-event-detail-container,.large-view-app-treks-list-container,.large-view-app-trek-detail-container{max-width:100%;height:100%;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}.app-map-container,.large-view-app-map-container{width:100%;height:100%}.map-visibility-button-container{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;width:100%;position:absolute;bottom:24px;z-index:4}.map-visibility-button-container .map-visibility-button{cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;-webkit-tap-highlight-color:transparent;-ms-flex-direction:row;flex-direction:row;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;border:none;text-decoration:none;padding:16px;background-color:var(--color-primary-container);color:var(--color-on-primary-container);-webkit-box-shadow:var(--elevation-1);box-shadow:var(--elevation-1);border-radius:12px;height:56px;font-size:16px;width:unset}.map-visibility-button-container .map-visibility-button:hover{-webkit-box-shadow:var(--elevation-4);box-shadow:var(--elevation-4)}.map-visibility-button-container .map-visibility-button span{font-size:24px;margin-right:8px;color:var(--color-on-primary-container)}.init-loader-container,.loader-container{width:100%}.app-treks-list-container,.app-trek-detail-container{width:100%}grw-treks-list,grw-touristic-contents-list{max-height:calc(100vh - var(--header-height))}grw-trek-detail,grw-touristic-content-detail,grw-touristic-event-detail{max-height:calc(100vh - 64px)}.app-map-container{width:100%;position:absolute}.large-view-loader-container{width:50%}.large-view-app-treks-list-container,.large-view-app-trek-detail-container,.large-view-app-touristic-content-detail-container,.large-view-app-touristic-event-detail-container{width:50%}.large-view-app-map-container{position:relative;width:50%}.segmented-buttons-container{display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;width:calc(100% - 32px);height:40px;margin:16px;border:1px solid var(--color-outline);border-radius:20px;line-height:20px}.segmented-buttons-container .segment{cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;font-size:14px;font-weight:500;-webkit-tap-highlight-color:transparent;color:var(--color-on-surface-variant);background-color:transparent;border-radius:0px;min-width:40px;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;width:100%;height:100%}.segmented-buttons-container .segment:first-child{border-top-left-radius:20px;border-bottom-left-radius:20px}.segmented-buttons-container .segment:not(:last-child){border-right:1px solid var(--color-outline)}.segmented-buttons-container .segment:last-child{border-top-right-radius:20px;border-bottom-right-radius:20px}.segmented-buttons-container .selected-segment{color:var(--color-on-secondary-container);background-color:var(--color-secondary-container)}';var GrwApp=function(){function t(t){registerInstance(this,t);this.largeViewSize=1024;this.handlePopStateBind=this.handlePopState.bind(this);this.showTrek=false;this.showTouristicContent=false;this.showTouristicEvent=false;this.showHomeMap=false;this.showTrekMap=false;this.showTouristicContentMap=false;this.showTouristicEventMap=false;this.showFilters=false;this.isLargeView=false;this.currentTrekId=undefined;this.currentTouristicContentId=undefined;this.currentTouristicEventId=undefined;this.appWidth="100%";this.appHeight="100vh";this.api=undefined;this.languages="fr";this.inBbox=undefined;this.cities=undefined;this.districts=undefined;this.structures=undefined;this.themes=undefined;this.portals=undefined;this.routes=undefined;this.practices=undefined;this.center=undefined;this.zoom=undefined;this.nameLayer=undefined;this.urlLayer=undefined;this.attributionLayer=undefined;this.weather=false;this.colorPrimaryApp="#6750a4";this.colorOnPrimary="#ffffff";this.colorSurface="#1c1b1f";this.colorOnSurface="#49454e";this.colorSurfaceVariant="#fef7ff";this.colorOnSurfaceVariant="#1c1b1f";this.colorPrimaryContainer="#eaddff";this.colorOnPrimaryContainer="#21005e";this.colorSecondaryContainer="#e8def8";this.colorOnSecondaryContainer="#1d192b";this.colorBackground="#fef7ff";this.colorSurfaceContainerHigh="#ece6f0";this.colorSurfaceContainerLow="#f7f2fa";this.fabBackgroundColor="#eaddff";this.fabColor="#21005d";this.colorTrekLine="#6b0030";this.colorSensitiveArea="#4974a5";this.colorPoiIcon="#974c6e";this.useGradient=false;this.treks=true;this.touristicContents=false;this.touristicEvents=false}t.prototype.onTrekCardPress=function(t){this.currentTouristicContentId=null;this.showTouristicContent=false;state.currentTouristicContent=null;this.currentTouristicEventId=null;this.showTouristicEvent=false;state.currentTouristicEvent=null;var e=state.parentTrekId?state.parentTrekId:state.currentTrekSteps?this.currentTrekId:null;state.currentTrek=null;this.currentTrekId=t.detail;this.showTrek=true;this.showTrekMap=false;var i=new URL(window.location.toString());i.searchParams.set("trek",this.currentTrekId.toString());if(state.currentTrekSteps){i.searchParams.set("parenttrek",e.toString())}window.history.pushState({},"",i)};t.prototype.onParentTrekPress=function(t){state.currentTrek=null;this.currentTrekId=t.detail;this.showTrek=true;this.showTrekMap=false;var e=new URL(window.location.toString());e.searchParams.set("trek",this.currentTrekId.toString());e.searchParams.delete("parenttrek");window.history.pushState({},"",e)};t.prototype.onTouristicContentCardPress=function(t){state.currentTrek=null;this.currentTrekId=null;this.showTrek=false;this.currentTouristicContentId=t.detail;this.showTouristicContent=true;this.showTouristicContentMap=false;var e=new URL(window.location.toString());e.searchParams.delete("trek");e.searchParams.set("touristiccontent",this.currentTouristicContentId.toString());window.history.pushState({},"",e)};t.prototype.onTouristiceEventCardPress=function(t){state.currentTrek=null;this.currentTrekId=null;this.showTrek=false;this.currentTouristicEventId=t.detail;this.showTouristicEvent=true;this.showTouristicEventMap=false;var e=new URL(window.location.toString());e.searchParams.delete("trek");e.searchParams.set("touristicevent",this.currentTouristicEventId.toString());window.history.pushState({},"",e)};t.prototype.onWindowResize=function(){this.handleView()};t.prototype.onCenterOnMap=function(){if(!this.isLargeView){this.showTrekMap=true}};t.prototype.watchPropHandler=function(){window.dispatchEvent(new window.Event("resize"))};t.prototype.componentWillLoad=function(){if(this.treks){state.mode="treks"}else if(this.touristicContents){state.mode="touristicContents"}var t=new URL(window.location.toString());var e=t.searchParams.get("trek");var i=t.searchParams.get("parenttrek");var r=t.searchParams.get("touristiccontent");var o=t.searchParams.get("touristicevent");if(e){window.history.replaceState({isInitialHistoryWithDetails:true},"",t);state.parentTrekId=i?Number(i):null;this.currentTrekId=Number(e);this.showTrek=true}else if(r){window.history.replaceState({isInitialHistoryWithDetails:true},"",t);this.currentTouristicContentId=Number(r);this.showTouristicContent=true}else if(o){window.history.replaceState({isInitialHistoryWithDetails:true},"",t);this.currentTouristicEventId=Number(o);this.showTouristicEvent=true}};t.prototype.componentDidLoad=function(){var t=this;onChange("trekNetworkError",(function(){if(state.trekNetworkError){var e=new URL(window.location.toString());e.searchParams.delete("trek");e.searchParams.delete("parenttrek");e.searchParams.delete("touristiccontent");e.searchParams.delete("touristicevent");window.history.replaceState({},"",e);t.onDetailsClose()}}));window.addEventListener("popstate",this.handlePopStateBind,false);this.handleView()};t.prototype.onDetailsClose=function(){this.currentTouristicContentId=null;this.showTouristicContent=false;this.showTouristicContentMap=false;this.showTouristicEvent=false;this.showTouristicEventMap=false;state.currentTouristicContent=null;state.currentTouristicEvent=null;state.currentTrek=null;state.currentTrekSteps=null;state.parentTrekId=null;this.currentTrekId=null;this.showTrek=false};t.prototype.handleView=function(){this.isLargeView=this.appElement.getBoundingClientRect().width>=this.largeViewSize;this.showHomeMap=this.isLargeView;this.showTrekMap=this.isLargeView};t.prototype.handleFilters=function(){this.showFilters=!this.showFilters};t.prototype.handleBackButton=function(){if(window.history.state&&window.history.state.isInitialHistoryWithDetails){this.onDetailsClose();var t=new URL(window.location.toString());t.searchParams.delete("trek");t.searchParams.delete("touristiccontent");t.searchParams.delete("touristicevent");window.history.pushState({},"",t)}else{window.history.back()}};t.prototype.handlePopState=function(){var t=new URL(window.location.toString());var e=Number(t.searchParams.get("trek"));var i=t.searchParams.get("touristiccontent");var r=t.searchParams.get("touristicevent");if(e&&this.currentTrekId!==e){this.currentTouristicContentId=null;this.showTouristicContent=false;this.showTouristicEvent=false;state.currentTouristicContent=null;state.currentTouristicEvent=null;state.currentTrek=null;this.currentTrekId=e;this.showTrek=true}else if(!e&&!i&&!r){this.onDetailsClose()}};t.prototype.handleShowMap=function(){if(this.currentTrekId){this.showTrekMap=!this.showTrekMap}else if(this.showTouristicContent){this.showTouristicContentMap=!this.showTouristicContentMap}else if(this.showTouristicEvent){this.showTouristicEventMap=!this.showTouristicEventMap}else{this.showHomeMap=!this.showHomeMap}};t.prototype.getMapVisibilityIconButton=function(){var t;if(this.showTrek){t=this.showTrekMap?"summarize":"map"}else if(this.showTouristicContent){t=this.showTouristicContentMap?"summarize":"map"}else if(this.showTouristicEvent){t=this.showTouristicEventMap?"summarize":"map"}else{t=this.showHomeMap?"list":"map"}return t};t.prototype.getMapVisibilityLabelButton=function(){var t;if(this.showTrek){t=this.showTrekMap?translate[state.language].showDetails:translate[state.language].showRoute}else if(this.showTouristicContent){t=this.showTouristicContentMap?translate[state.language].showDetails:translate[state.language].showMap}else if(this.showTouristicEvent){t=this.showTouristicEventMap?translate[state.language].showDetails:translate[state.language].showMap}else{t=this.showHomeMap?translate[state.language].showList:translate[state.language].showMap}return t};t.prototype.disconnectedCallback=function(){reset();window.removeEventListener("popstate",this.handlePopStateBind)};t.prototype.changeMode=function(t){state.searchValue="";if(t==="treks"&&state.currentTreks){treksFilters.forEach((function(t){state[t.property].forEach((function(t){return t.selected=false}))}));state.selectedActivitiesFilters=0;state.selectedThemesFilters=0;state.selectedLocationFilters=0;state.currentTreks=handleTreksFiltersAndSearch()}else if(t==="touristicContents"&&state.currentTouristicContents){touristicContentsFilters.forEach((function(t){state[t.property].forEach((function(t){return t.selected=false}))}));state.selectedActivitiesFilters=0;state.selectedLocationFilters=0;state.currentTouristicContents=handleTouristicContentsFiltersAndSearch()}state.mode=t};t.prototype.render=function(){var t=this;return h(Host,{style:{"--color-primary-app":this.colorPrimaryApp,"--color-on-primary":this.colorOnPrimary,"--color-surface":this.colorSurface,"--color-on-surface":this.colorOnSurface,"--color-surface-variant":this.colorSurfaceVariant,"--color-on-surface-variant":this.colorOnSurfaceVariant,"--color-primary-container":this.colorPrimaryContainer,"--color-on-primary-container":this.colorOnPrimaryContainer,"--color-secondary-container":this.colorSecondaryContainer,"--color-on-secondary-container":this.colorOnSecondaryContainer,"--color-background":this.colorBackground,"--color-surface-container-high":this.colorSurfaceContainerHigh,"--color-surface-container-low":this.colorSurfaceContainerLow,"--fab-background-color":this.fabBackgroundColor,"--fab-color":this.fabColor,"--app-width":this.appWidth,"--app-height":this.appHeight,"--header-height":Number(this.treks)+Number(this.touristicContents)+Number(this.touristicEvents)>1?"136px":"64px"}},!state.currentTreks&&!state.currentTrek&&!state.currentTouristicContent&&!state.currentTouristicEvent&&!state.currentTouristicContents&&h("div",{class:"init-loader-container"},h("span",{class:"loader"})),this.treks&&state.mode==="treks"&&!this.showTrek&&!this.showTouristicContent&&!this.showTouristicEvent&&!state.currentTreks&&h("grw-treks-provider",{api:this.api,languages:this.languages,"in-bbox":this.inBbox,cities:this.cities,districts:this.districts,structures:this.structures,themes:this.themes,portals:this.portals,routes:this.routes,practices:this.practices}),this.showTrek&&this.currentTrekId&&!state.currentTrek&&h("grw-trek-provider",{api:this.api,languages:this.languages,"trek-id":this.currentTrekId}),this.showTouristicContent&&this.currentTouristicContentId&&h("grw-touristic-content-provider",{api:this.api,languages:this.languages,"touristic-content-id":this.currentTouristicContentId}),this.showTouristicEvent&&this.currentTouristicEventId&&h("grw-touristic-event-provider",{api:this.api,languages:this.languages,"touristic-event-id":this.currentTouristicEventId}),this.touristicContents&&state.mode==="touristicContents"&&!state.currentTouristicContents&&!this.showTouristicContent&&h("grw-touristic-contents-provider",{api:this.api,languages:this.languages,"in-bbox":this.inBbox,cities:this.cities,districts:this.districts,structures:this.structures,themes:this.themes,portals:this.portals}),(state.currentTreks||state.currentTrek||state.touristicContents||state.currentTouristicContent||state.currentTouristicEvent)&&h("div",{class:"app-container"},h("div",{class:"".concat(this.isLargeView?"large-view-header-container":"header-container").concat(this.showTrek||this.showTouristicContent||this.showTouristicEvent?" header-detail":"")},Number(this.treks)+Number(this.touristicContents)+Number(this.touristicEvents)>1&&!this.showTrek&&!this.showTouristicContent&&!this.showTouristicEvent&&h("div",{class:"segmented-buttons-container"},this.treks&&h("label",{class:"segment".concat(state.mode==="treks"?" selected-segment":""),onClick:function(){return t.changeMode("treks")}},translate[state.language].home.segment.treks),this.touristicContents&&h("label",{class:"segment".concat(state.mode==="touristicContents"?" selected-segment":""),onClick:function(){return t.changeMode("touristicContents")}},translate[state.language].home.segment.touristicContents)),!this.showTrek&&!this.showTouristicContent&&!this.showTouristicEvent?h("div",{class:"handle-search-filters-container"},h("div",{class:"handle-search-container"},h("grw-search",null)),h("div",{class:"handle-filters-container"},h("button",{onClick:function(){return t.handleFilters()},class:"handle-filters-button"},h("span",{translate:false,class:"material-symbols material-symbols-outlined margin-right-icon"},"filter_list"),translate[state.language].filter))):h("div",{class:"arrow-back-container"},h("button",{onClick:function(){return t.handleBackButton()},class:"arrow-back-icon"},h("span",{translate:false,class:"material-symbols material-symbols-outlined"},"arrow_back")))),h("div",{class:"content-container ".concat(this.showTrek||this.showTouristicContent||this.showTouristicEvent?"content-trek":"content-treks")},h("div",{class:this.isLargeView?"large-view-app-treks-list-container":"app-treks-list-container",style:{display:this.showTrek||this.showTouristicContent||this.showTouristicEvent?"none":"flex",position:this.showTrek?"absolute":"relative"}},state.mode==="treks"&&this.treks&&h("grw-treks-list",{"reset-store-on-disconnected":"false","is-large-view":this.isLargeView,"color-primary-app":this.colorPrimaryApp,"color-on-surface":this.colorOnSurface,"color-secondary-container":this.colorSecondaryContainer,"color-on-secondary-container":this.colorOnSecondaryContainer,"color-surface-container-low":this.colorSurfaceContainerLow}),state.mode==="touristicContents"&&this.touristicContents&&h("grw-touristic-contents-list",{"reset-store-on-disconnected":"false","is-large-view":this.isLargeView,"color-primary-app":this.colorPrimaryApp,"color-on-surface":this.colorOnSurface,"color-secondary-container":this.colorSecondaryContainer,"color-on-secondary-container":this.colorOnSecondaryContainer,"color-surface-container-low":this.colorSurfaceContainerLow})),this.showTrek&&!state.currentTrek||this.showTouristicContent&&!state.currentTouristicContent||this.showTouristicEvent&&!state.currentTouristicEvent||!state.currentTreks&&state.mode==="treks"||!state.touristicContents&&state.mode==="touristicContents"&&h("div",{class:this.isLargeView?"large-view-loader-container":"loader-container"},h("span",{class:"loader"})),state.currentTrek&&h("div",{class:this.isLargeView?"large-view-app-trek-detail-container":"app-trek-detail-container"},h("grw-trek-detail",{style:{visibility:!this.showTrekMap&&this.showTrek||this.isLargeView?"visible":"hidden",zIndex:!this.showTrekMap?"1":"0"},"reset-store-on-disconnected":"false","color-primary-app":this.colorPrimaryApp,"color-on-surface":this.colorOnSurface,"color-primary-container":this.colorPrimaryContainer,"color-on-primary-container":this.colorOnPrimaryContainer,"color-secondary-container":this.colorSecondaryContainer,"color-on-secondary-container":this.colorOnSecondaryContainer,"color-surface-container-low":this.colorSurfaceContainerLow,"color-background":this.colorBackground,weather:this.weather,"is-large-view":this.isLargeView})),this.showTouristicContent&&h("div",{class:this.isLargeView?"large-view-app-touristic-content-detail-container":"app-touristic-content-detail-container"},h("grw-touristic-content-detail",{style:{visibility:!this.showTouristicContentMap||this.isLargeView?"visible":"hidden",zIndex:!this.showTouristicContentMap?"1":"0"},"color-primary-app":this.colorPrimaryApp,"color-on-surface":this.colorOnSurface,"color-primary-container":this.colorPrimaryContainer,"color-on-primary-container":this.colorOnPrimaryContainer,"color-secondary-container":this.colorSecondaryContainer,"color-on-secondary-container":this.colorOnSecondaryContainer,"color-surface-container-low":this.colorSurfaceContainerLow,"color-background":this.colorBackground,"is-large-view":this.isLargeView})),this.showTouristicEvent&&h("div",{class:this.isLargeView?"large-view-app-touristic-event-detail-container":"app-touristic-event-detail-container"},h("grw-touristic-event-detail",{style:{visibility:!this.showTouristicEventMap||this.isLargeView?"visible":"hidden",zIndex:!this.showTouristicEventMap?"1":"0"},"color-primary-app":this.colorPrimaryApp,"color-on-surface":this.colorOnSurface,"color-primary-container":this.colorPrimaryContainer,"color-on-primary-container":this.colorOnPrimaryContainer,"color-secondary-container":this.colorSecondaryContainer,"color-on-secondary-container":this.colorOnSecondaryContainer,"color-surface-container-low":this.colorSurfaceContainerLow,"color-background":this.colorBackground,"is-large-view":this.isLargeView})),h("grw-map",{"reset-store-on-disconnected":"false",class:this.isLargeView?"large-view-app-map-container":"app-map-container",style:{visibility:this.showHomeMap&&!this.showTrek||this.showTrekMap&&this.showTrek||this.showTouristicContentMap&&this.showTouristicContent||this.showTouristicEventMap&&this.showTouristicEvent||this.isLargeView?"visible":"hidden",zIndex:this.showHomeMap||this.showTrekMap||this.showTouristicContentMap||this.showTouristicEventMap?"1":"0"},center:this.center,zoom:this.zoom,"name-layer":this.nameLayer,"url-layer":this.urlLayer,"attribution-layer":this.attributionLayer,"color-primary-app":this.colorPrimaryApp,"color-on-surface":this.colorOnSurface,"color-primary-container":this.colorPrimaryContainer,"color-on-primary-container":this.colorOnPrimaryContainer,"color-background":this.colorBackground,"color-trek-line":this.colorTrekLine,"color-sensitive-area":this.colorSensitiveArea,"color-poi-icon":this.colorPoiIcon,"is-large-view":this.isLargeView,"use-gradient":this.useGradient})),(!this.showTrek&&!this.showTouristicContent&&!this.showTouristicEvent||this.showTrek&&state.currentTrek||this.showTouristicContent&&state.currentTouristicContent||this.showTouristicEvent&&state.currentTouristicEvent)&&h("div",{class:"map-visibility-button-container"},h("button",{onClick:function(){return t.handleShowMap()},class:"map-visibility-button",style:{display:this.isLargeView?"none":"flex"}},h("span",{translate:false,class:"material-symbols material-symbols-outlined"},this.getMapVisibilityIconButton()),this.getMapVisibilityLabelButton()))),!this.showTrek&&this.showFilters&&h("grw-filters",{handleFilters:function(){return t.handleFilters()}}))};Object.defineProperty(t.prototype,"appElement",{get:function(){return getElement(this)},enumerable:false,configurable:true});Object.defineProperty(t,"watchers",{get:function(){return{isLargeView:["watchPropHandler"]}},enumerable:false,configurable:true});return t}();GrwApp.style=grwAppCss;export{GrwApp as grw_app};
1
+ import{r as registerInstance,h,H as Host,g as getElement}from"./index-d5cacae4.js";import{t as translate}from"./i18n-b5c3a8d7.js";import{s as state,o as onChange,r as reset}from"./store-032ab1f5.js";import{t as treksFilters,h as handleTreksFiltersAndSearch,a as touristicContentsFilters,b as handleTouristicContentsFiltersAndSearch}from"./utils-b09ac7c9.js";var grwAppCss='.material-symbols{font-family:"Material Symbols Outlined"}.material-symbols-outlined{font-variation-settings:"FILL" 0, "wght" 400, "GRAD" 0, "opsz" 48}grw-app{display:block;position:relative;width:var(--app-width);height:var(--app-height);font-family:"Roboto";color:var(--color-on-surface);overflow:hidden;line-height:initial;max-width:100dvw;max-height:100dvh}.app-container{position:relative;width:100%;height:100%;overflow:hidden}.header-container,.large-view-header-container{background-color:var(--color-background);-webkit-box-shadow:var(--elevation-2);box-shadow:var(--elevation-2);height:var(--header-height)}.header-container .arrow-back-container,.large-view-header-container .arrow-back-container{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;height:100%;margin:0px 16px}.header-container .arrow-back-container .arrow-back-icon,.large-view-header-container .arrow-back-container .arrow-back-icon{cursor:pointer;-webkit-tap-highlight-color:transparent;color:var(--color-on-surface);border:none;background-color:var(--color-background);border-radius:50%;height:48px;width:48px;padding:0px;text-align:left}.handle-search-filters-container{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:justify;justify-content:space-between;margin:0px 16px;height:64px}.handle-search-filters-container .handle-search-container{width:calc(50% + 48px);max-width:220px}.handle-search-filters-container .handle-filters-button{margin-left:16px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:pointer;-webkit-tap-highlight-color:transparent;display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;border:none;background-color:var(--color-background);color:var(--color-on-surface);padding:12px 24px;border-radius:20px;-webkit-box-sizing:border-box;box-sizing:border-box;position:relative;gap:8px;white-space:nowrap;line-height:20px;letter-spacing:0.1000000015px;font-size:14px;font-weight:500;-webkit-box-shadow:var(--elevation-1);box-shadow:var(--elevation-1);-webkit-transition:-webkit-box-shadow 0.2s ease-in-out 0s;transition:-webkit-box-shadow 0.2s ease-in-out 0s;transition:box-shadow 0.2s ease-in-out 0s;transition:box-shadow 0.2s ease-in-out 0s, -webkit-box-shadow 0.2s ease-in-out 0s}.handle-search-filters-container .handle-filters-button span{font-size:18px}.header-detail{height:64px}.large-view-header-container .handle-search-filters-container{-ms-flex-pack:start;justify-content:flex-start}.init-loader-container,.loader-container,.large-view-loader-container{position:absolute;display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center;height:100%;background-color:var(--color-background)}.init-loader-container .loader,.loader-container .loader,.large-view-loader-container .loader{width:48px;height:48px;border:5px solid var(--color-primary-container);border-bottom-color:var(--color-on-primary-container);border-radius:50%;display:inline-block;-webkit-box-sizing:border-box;box-sizing:border-box;-webkit-animation:rotation 1s linear infinite;animation:rotation 1s linear infinite}@-webkit-keyframes rotation{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}100%{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}@keyframes rotation{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}100%{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}.content-container{position:relative;display:-ms-flexbox;display:flex;height:calc(100% - var(--header-height));background-color:var(--color-background)}.content-treks{height:calc(100% - var(--header-height))}.content-trek{height:100%}.app-treks-list-container,.app-trek-detail-container,.app-touristic-content-detail-container,.app-touristic-event-detail-container,.large-view-app-treks-list-container,.large-view-app-trek-detail-container{max-width:100%;height:100%;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}.app-map-container,.large-view-app-map-container{width:100%;height:100%}.map-visibility-button-container{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;width:100%;position:absolute;bottom:24px;z-index:4}.map-visibility-button-container .map-visibility-button{cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;-webkit-tap-highlight-color:transparent;-ms-flex-direction:row;flex-direction:row;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;border:none;text-decoration:none;padding:16px;background-color:var(--color-primary-container);color:var(--color-on-primary-container);-webkit-box-shadow:var(--elevation-1);box-shadow:var(--elevation-1);border-radius:12px;height:56px;font-size:16px;width:unset}.map-visibility-button-container .map-visibility-button:hover{-webkit-box-shadow:var(--elevation-4);box-shadow:var(--elevation-4)}.map-visibility-button-container .map-visibility-button span{font-size:24px;margin-right:8px;color:var(--color-on-primary-container)}.init-loader-container,.loader-container{width:100%}.app-treks-list-container,.app-trek-detail-container{width:100%}grw-treks-list,grw-touristic-contents-list{max-height:calc(100vh - var(--header-height))}grw-trek-detail,grw-touristic-content-detail,grw-touristic-event-detail{max-height:calc(100vh - 64px)}.app-map-container{width:100%;position:absolute}.large-view-loader-container{width:50%}.large-view-app-treks-list-container,.large-view-app-trek-detail-container,.large-view-app-touristic-content-detail-container,.large-view-app-touristic-event-detail-container{width:50%}.large-view-app-map-container{position:relative;width:50%}.segmented-buttons-container{display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;width:calc(100% - 32px);height:40px;margin:16px;border:1px solid var(--color-outline);border-radius:20px;line-height:20px}.segmented-buttons-container .segment{cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;font-size:14px;font-weight:500;-webkit-tap-highlight-color:transparent;color:var(--color-on-surface-variant);background-color:transparent;border-radius:0px;min-width:40px;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;width:100%;height:100%}.segmented-buttons-container .segment:first-child{border-top-left-radius:20px;border-bottom-left-radius:20px}.segmented-buttons-container .segment:not(:last-child){border-right:1px solid var(--color-outline)}.segmented-buttons-container .segment:last-child{border-top-right-radius:20px;border-bottom-right-radius:20px}.segmented-buttons-container .selected-segment{color:var(--color-on-secondary-container);background-color:var(--color-secondary-container)}';var GrwApp=function(){function t(t){registerInstance(this,t);this.largeViewSize=1024;this.handlePopStateBind=this.handlePopState.bind(this);this.showTrek=false;this.showTouristicContent=false;this.showTouristicEvent=false;this.showHomeMap=false;this.showTrekMap=false;this.showTouristicContentMap=false;this.showTouristicEventMap=false;this.showFilters=false;this.isLargeView=false;this.currentTrekId=undefined;this.currentTouristicContentId=undefined;this.currentTouristicEventId=undefined;this.appWidth="100%";this.appHeight="100vh";this.api=undefined;this.languages="fr";this.inBbox=undefined;this.cities=undefined;this.districts=undefined;this.structures=undefined;this.themes=undefined;this.portals=undefined;this.routes=undefined;this.practices=undefined;this.center=undefined;this.zoom=undefined;this.nameLayer=undefined;this.urlLayer=undefined;this.attributionLayer=undefined;this.weather=false;this.colorPrimaryApp="#6750a4";this.colorOnPrimary="#ffffff";this.colorSurface="#1c1b1f";this.colorOnSurface="#49454e";this.colorSurfaceVariant="#fef7ff";this.colorOnSurfaceVariant="#1c1b1f";this.colorPrimaryContainer="#eaddff";this.colorOnPrimaryContainer="#21005e";this.colorSecondaryContainer="#e8def8";this.colorOnSecondaryContainer="#1d192b";this.colorBackground="#fef7ff";this.colorSurfaceContainerHigh="#ece6f0";this.colorSurfaceContainerLow="#f7f2fa";this.fabBackgroundColor="#eaddff";this.fabColor="#21005d";this.colorTrekLine="#6b0030";this.colorSensitiveArea="#4974a5";this.colorPoiIcon="#974c6e";this.useGradient=false;this.treks=true;this.touristicContents=false;this.touristicEvents=false}t.prototype.onTrekCardPress=function(t){this.currentTouristicContentId=null;this.showTouristicContent=false;state.currentTouristicContent=null;this.currentTouristicEventId=null;this.showTouristicEvent=false;state.currentTouristicEvent=null;var e=state.parentTrekId?state.parentTrekId:state.currentTrekSteps?this.currentTrekId:null;state.currentTrek=null;this.currentTrekId=t.detail;this.showTrek=true;this.showTrekMap=false;var i=new URL(window.location.toString());i.searchParams.set("trek",this.currentTrekId.toString());if(state.currentTrekSteps){i.searchParams.set("parenttrek",e.toString())}window.history.pushState({},"",i)};t.prototype.onParentTrekPress=function(t){state.currentTrek=null;this.currentTrekId=t.detail;this.showTrek=true;this.showTrekMap=false;var e=new URL(window.location.toString());e.searchParams.set("trek",this.currentTrekId.toString());e.searchParams.delete("parenttrek");window.history.pushState({},"",e)};t.prototype.onTouristicContentCardPress=function(t){state.currentTrek=null;this.currentTrekId=null;this.showTrek=false;this.currentTouristicContentId=t.detail;this.showTouristicContent=true;this.showTouristicContentMap=false;var e=new URL(window.location.toString());e.searchParams.delete("trek");e.searchParams.set("touristiccontent",this.currentTouristicContentId.toString());window.history.pushState({},"",e)};t.prototype.onTouristiceEventCardPress=function(t){state.currentTrek=null;this.currentTrekId=null;this.showTrek=false;this.currentTouristicEventId=t.detail;this.showTouristicEvent=true;this.showTouristicEventMap=false;var e=new URL(window.location.toString());e.searchParams.delete("trek");e.searchParams.set("touristicevent",this.currentTouristicEventId.toString());window.history.pushState({},"",e)};t.prototype.onWindowResize=function(){this.handleView()};t.prototype.onCenterOnMap=function(){if(!this.isLargeView){this.showTrekMap=true}};t.prototype.watchPropHandler=function(){window.dispatchEvent(new window.Event("resize"))};t.prototype.componentWillLoad=function(){if(this.treks){state.mode="treks"}else if(this.touristicContents){state.mode="touristicContents"}var t=new URL(window.location.toString());var e=t.searchParams.get("trek");var i=t.searchParams.get("parenttrek");var r=t.searchParams.get("touristiccontent");var o=t.searchParams.get("touristicevent");if(e){window.history.replaceState({isInitialHistoryWithDetails:true},"",t);state.parentTrekId=i?Number(i):null;this.currentTrekId=Number(e);this.showTrek=true}else if(r){window.history.replaceState({isInitialHistoryWithDetails:true},"",t);this.currentTouristicContentId=Number(r);this.showTouristicContent=true}else if(o){window.history.replaceState({isInitialHistoryWithDetails:true},"",t);this.currentTouristicEventId=Number(o);this.showTouristicEvent=true}};t.prototype.componentDidLoad=function(){var t=this;onChange("trekNetworkError",(function(){if(state.trekNetworkError){var e=new URL(window.location.toString());e.searchParams.delete("trek");e.searchParams.delete("parenttrek");e.searchParams.delete("touristiccontent");e.searchParams.delete("touristicevent");window.history.replaceState({},"",e);t.onDetailsClose()}}));window.addEventListener("popstate",this.handlePopStateBind,false);this.handleView()};t.prototype.onDetailsClose=function(){this.currentTouristicContentId=null;this.showTouristicContent=false;this.showTouristicContentMap=false;this.showTouristicEvent=false;this.showTouristicEventMap=false;state.currentTouristicContent=null;state.currentTouristicEvent=null;state.currentTrek=null;state.currentTrekSteps=null;state.parentTrekId=null;this.currentTrekId=null;this.showTrek=false};t.prototype.handleView=function(){this.isLargeView=this.appElement.getBoundingClientRect().width>=this.largeViewSize;this.showHomeMap=this.isLargeView;this.showTrekMap=this.isLargeView};t.prototype.handleFilters=function(){this.showFilters=!this.showFilters};t.prototype.handleBackButton=function(){if(window.history.state&&window.history.state.isInitialHistoryWithDetails){this.onDetailsClose();var t=new URL(window.location.toString());t.searchParams.delete("trek");t.searchParams.delete("touristiccontent");t.searchParams.delete("touristicevent");window.history.pushState({},"",t)}else{window.history.back()}};t.prototype.handlePopState=function(){var t=new URL(window.location.toString());var e=Number(t.searchParams.get("trek"));var i=t.searchParams.get("touristiccontent");var r=t.searchParams.get("touristicevent");if(e&&this.currentTrekId!==e){this.currentTouristicContentId=null;this.showTouristicContent=false;this.showTouristicEvent=false;state.currentTouristicContent=null;state.currentTouristicEvent=null;state.currentTrek=null;this.currentTrekId=e;this.showTrek=true}else if(!e&&!i&&!r){this.onDetailsClose()}};t.prototype.handleShowMap=function(){if(this.currentTrekId){this.showTrekMap=!this.showTrekMap}else if(this.showTouristicContent){this.showTouristicContentMap=!this.showTouristicContentMap}else if(this.showTouristicEvent){this.showTouristicEventMap=!this.showTouristicEventMap}else{this.showHomeMap=!this.showHomeMap}};t.prototype.getMapVisibilityIconButton=function(){var t;if(this.showTrek){t=this.showTrekMap?"summarize":"map"}else if(this.showTouristicContent){t=this.showTouristicContentMap?"summarize":"map"}else if(this.showTouristicEvent){t=this.showTouristicEventMap?"summarize":"map"}else{t=this.showHomeMap?"list":"map"}return t};t.prototype.getMapVisibilityLabelButton=function(){var t;if(this.showTrek){t=this.showTrekMap?translate[state.language].showDetails:translate[state.language].showRoute}else if(this.showTouristicContent){t=this.showTouristicContentMap?translate[state.language].showDetails:translate[state.language].showMap}else if(this.showTouristicEvent){t=this.showTouristicEventMap?translate[state.language].showDetails:translate[state.language].showMap}else{t=this.showHomeMap?translate[state.language].showList:translate[state.language].showMap}return t};t.prototype.disconnectedCallback=function(){reset();window.removeEventListener("popstate",this.handlePopStateBind)};t.prototype.changeMode=function(t){state.searchValue="";if(t==="treks"&&state.currentTreks){treksFilters.forEach((function(t){state[t.property].forEach((function(t){return t.selected=false}))}));state.selectedActivitiesFilters=0;state.selectedThemesFilters=0;state.selectedLocationFilters=0;state.currentTreks=handleTreksFiltersAndSearch()}else if(t==="touristicContents"&&state.currentTouristicContents){touristicContentsFilters.forEach((function(t){state[t.property].forEach((function(t){return t.selected=false}))}));state.selectedActivitiesFilters=0;state.selectedLocationFilters=0;state.currentTouristicContents=handleTouristicContentsFiltersAndSearch()}state.mode=t};t.prototype.render=function(){var t=this;return h(Host,{style:{"--color-primary-app":this.colorPrimaryApp,"--color-on-primary":this.colorOnPrimary,"--color-surface":this.colorSurface,"--color-on-surface":this.colorOnSurface,"--color-surface-variant":this.colorSurfaceVariant,"--color-on-surface-variant":this.colorOnSurfaceVariant,"--color-primary-container":this.colorPrimaryContainer,"--color-on-primary-container":this.colorOnPrimaryContainer,"--color-secondary-container":this.colorSecondaryContainer,"--color-on-secondary-container":this.colorOnSecondaryContainer,"--color-background":this.colorBackground,"--color-surface-container-high":this.colorSurfaceContainerHigh,"--color-surface-container-low":this.colorSurfaceContainerLow,"--fab-background-color":this.fabBackgroundColor,"--fab-color":this.fabColor,"--app-width":this.appWidth,"--app-height":this.appHeight,"--header-height":Number(this.treks)+Number(this.touristicContents)+Number(this.touristicEvents)>1?"136px":"64px"}},!state.currentTreks&&!state.currentTrek&&!state.currentTouristicContent&&!state.currentTouristicEvent&&!state.currentTouristicContents&&h("div",{class:"init-loader-container"},h("span",{class:"loader"})),this.treks&&state.mode==="treks"&&!this.showTrek&&!this.showTouristicContent&&!this.showTouristicEvent&&!state.currentTreks&&h("grw-treks-provider",{api:this.api,languages:this.languages,"in-bbox":this.inBbox,cities:this.cities,districts:this.districts,structures:this.structures,themes:this.themes,portals:this.portals,routes:this.routes,practices:this.practices}),this.showTrek&&this.currentTrekId&&!state.currentTrek&&h("grw-trek-provider",{api:this.api,languages:this.languages,"trek-id":this.currentTrekId,portals:this.portals}),this.showTouristicContent&&this.currentTouristicContentId&&h("grw-touristic-content-provider",{api:this.api,languages:this.languages,"touristic-content-id":this.currentTouristicContentId,portals:this.portals}),this.showTouristicEvent&&this.currentTouristicEventId&&h("grw-touristic-event-provider",{api:this.api,languages:this.languages,"touristic-event-id":this.currentTouristicEventId,portals:this.portals}),this.touristicContents&&state.mode==="touristicContents"&&!state.currentTouristicContents&&!this.showTouristicContent&&h("grw-touristic-contents-provider",{api:this.api,languages:this.languages,"in-bbox":this.inBbox,cities:this.cities,districts:this.districts,structures:this.structures,themes:this.themes,portals:this.portals}),(state.currentTreks||state.currentTrek||state.touristicContents||state.currentTouristicContent||state.currentTouristicEvent)&&h("div",{class:"app-container"},h("div",{class:"".concat(this.isLargeView?"large-view-header-container":"header-container").concat(this.showTrek||this.showTouristicContent||this.showTouristicEvent?" header-detail":"")},Number(this.treks)+Number(this.touristicContents)+Number(this.touristicEvents)>1&&!this.showTrek&&!this.showTouristicContent&&!this.showTouristicEvent&&h("div",{class:"segmented-buttons-container"},this.treks&&h("label",{class:"segment".concat(state.mode==="treks"?" selected-segment":""),onClick:function(){return t.changeMode("treks")}},translate[state.language].home.segment.treks),this.touristicContents&&h("label",{class:"segment".concat(state.mode==="touristicContents"?" selected-segment":""),onClick:function(){return t.changeMode("touristicContents")}},translate[state.language].home.segment.touristicContents)),!this.showTrek&&!this.showTouristicContent&&!this.showTouristicEvent?h("div",{class:"handle-search-filters-container"},h("div",{class:"handle-search-container"},h("grw-search",null)),h("div",{class:"handle-filters-container"},h("button",{onClick:function(){return t.handleFilters()},class:"handle-filters-button"},h("span",{translate:false,class:"material-symbols material-symbols-outlined margin-right-icon"},"filter_list"),translate[state.language].filter))):h("div",{class:"arrow-back-container"},h("button",{onClick:function(){return t.handleBackButton()},class:"arrow-back-icon"},h("span",{translate:false,class:"material-symbols material-symbols-outlined"},"arrow_back")))),h("div",{class:"content-container ".concat(this.showTrek||this.showTouristicContent||this.showTouristicEvent?"content-trek":"content-treks")},h("div",{class:this.isLargeView?"large-view-app-treks-list-container":"app-treks-list-container",style:{display:this.showTrek||this.showTouristicContent||this.showTouristicEvent?"none":"flex",position:this.showTrek?"absolute":"relative"}},state.mode==="treks"&&this.treks&&h("grw-treks-list",{"reset-store-on-disconnected":"false","is-large-view":this.isLargeView,"color-primary-app":this.colorPrimaryApp,"color-on-surface":this.colorOnSurface,"color-secondary-container":this.colorSecondaryContainer,"color-on-secondary-container":this.colorOnSecondaryContainer,"color-surface-container-low":this.colorSurfaceContainerLow}),state.mode==="touristicContents"&&this.touristicContents&&h("grw-touristic-contents-list",{"reset-store-on-disconnected":"false","is-large-view":this.isLargeView,"color-primary-app":this.colorPrimaryApp,"color-on-surface":this.colorOnSurface,"color-secondary-container":this.colorSecondaryContainer,"color-on-secondary-container":this.colorOnSecondaryContainer,"color-surface-container-low":this.colorSurfaceContainerLow})),this.showTrek&&!state.currentTrek||this.showTouristicContent&&!state.currentTouristicContent||this.showTouristicEvent&&!state.currentTouristicEvent||!state.currentTreks&&state.mode==="treks"||!state.touristicContents&&state.mode==="touristicContents"&&h("div",{class:this.isLargeView?"large-view-loader-container":"loader-container"},h("span",{class:"loader"})),state.currentTrek&&h("div",{class:this.isLargeView?"large-view-app-trek-detail-container":"app-trek-detail-container"},h("grw-trek-detail",{style:{visibility:!this.showTrekMap&&this.showTrek||this.isLargeView?"visible":"hidden",zIndex:!this.showTrekMap?"1":"0"},"reset-store-on-disconnected":"false","color-primary-app":this.colorPrimaryApp,"color-on-surface":this.colorOnSurface,"color-primary-container":this.colorPrimaryContainer,"color-on-primary-container":this.colorOnPrimaryContainer,"color-secondary-container":this.colorSecondaryContainer,"color-on-secondary-container":this.colorOnSecondaryContainer,"color-surface-container-low":this.colorSurfaceContainerLow,"color-background":this.colorBackground,weather:this.weather,"is-large-view":this.isLargeView})),this.showTouristicContent&&h("div",{class:this.isLargeView?"large-view-app-touristic-content-detail-container":"app-touristic-content-detail-container"},h("grw-touristic-content-detail",{style:{visibility:!this.showTouristicContentMap||this.isLargeView?"visible":"hidden",zIndex:!this.showTouristicContentMap?"1":"0"},"color-primary-app":this.colorPrimaryApp,"color-on-surface":this.colorOnSurface,"color-primary-container":this.colorPrimaryContainer,"color-on-primary-container":this.colorOnPrimaryContainer,"color-secondary-container":this.colorSecondaryContainer,"color-on-secondary-container":this.colorOnSecondaryContainer,"color-surface-container-low":this.colorSurfaceContainerLow,"color-background":this.colorBackground,"is-large-view":this.isLargeView})),this.showTouristicEvent&&h("div",{class:this.isLargeView?"large-view-app-touristic-event-detail-container":"app-touristic-event-detail-container"},h("grw-touristic-event-detail",{style:{visibility:!this.showTouristicEventMap||this.isLargeView?"visible":"hidden",zIndex:!this.showTouristicEventMap?"1":"0"},"color-primary-app":this.colorPrimaryApp,"color-on-surface":this.colorOnSurface,"color-primary-container":this.colorPrimaryContainer,"color-on-primary-container":this.colorOnPrimaryContainer,"color-secondary-container":this.colorSecondaryContainer,"color-on-secondary-container":this.colorOnSecondaryContainer,"color-surface-container-low":this.colorSurfaceContainerLow,"color-background":this.colorBackground,"is-large-view":this.isLargeView})),h("grw-map",{"reset-store-on-disconnected":"false",class:this.isLargeView?"large-view-app-map-container":"app-map-container",style:{visibility:this.showHomeMap&&!this.showTrek||this.showTrekMap&&this.showTrek||this.showTouristicContentMap&&this.showTouristicContent||this.showTouristicEventMap&&this.showTouristicEvent||this.isLargeView?"visible":"hidden",zIndex:this.showHomeMap||this.showTrekMap||this.showTouristicContentMap||this.showTouristicEventMap?"1":"0"},center:this.center,zoom:this.zoom,"name-layer":this.nameLayer,"url-layer":this.urlLayer,"attribution-layer":this.attributionLayer,"color-primary-app":this.colorPrimaryApp,"color-on-surface":this.colorOnSurface,"color-primary-container":this.colorPrimaryContainer,"color-on-primary-container":this.colorOnPrimaryContainer,"color-background":this.colorBackground,"color-trek-line":this.colorTrekLine,"color-sensitive-area":this.colorSensitiveArea,"color-poi-icon":this.colorPoiIcon,"is-large-view":this.isLargeView,"use-gradient":this.useGradient})),(!this.showTrek&&!this.showTouristicContent&&!this.showTouristicEvent||this.showTrek&&state.currentTrek||this.showTouristicContent&&state.currentTouristicContent||this.showTouristicEvent&&state.currentTouristicEvent)&&h("div",{class:"map-visibility-button-container"},h("button",{onClick:function(){return t.handleShowMap()},class:"map-visibility-button",style:{display:this.isLargeView?"none":"flex"}},h("span",{translate:false,class:"material-symbols material-symbols-outlined"},this.getMapVisibilityIconButton()),this.getMapVisibilityLabelButton()))),!this.showTrek&&this.showFilters&&h("grw-filters",{handleFilters:function(){return t.handleFilters()}}))};Object.defineProperty(t.prototype,"appElement",{get:function(){return getElement(this)},enumerable:false,configurable:true});Object.defineProperty(t,"watchers",{get:function(){return{isLargeView:["watchPropHandler"]}},enumerable:false,configurable:true});return t}();GrwApp.style=grwAppCss;export{GrwApp as grw_app};
2
2
  //# sourceMappingURL=grw-app.entry.js.map
Binary file
Binary file